diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8488612d6..d3b670f5a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,16 +1,16 @@ name: Generate Build Files and Update version # on: - push: + push: branches: - master jobs: yarn-build-and-update-version: name: build - runs-on: + runs-on: - ubuntu-latest env: - GITHUB_TOKEN: ${{ secrets.PAT_TOKEN }} + GITHUB_TOKEN: ${{ secrets.PAT_TOKEN }} steps: - name: Checkout uses: actions/checkout@v3 diff --git a/.github/workflows/docker-build.yml b/.github/workflows/docker-build.yml index bb7da231b..50e352bf7 100644 --- a/.github/workflows/docker-build.yml +++ b/.github/workflows/docker-build.yml @@ -9,7 +9,7 @@ on: jobs: build: runs-on: ubuntu-20.04 - name: Build and push sphinx-nav-fiber image + name: Build and push sphinx-nav-fiber image env: ACTIONS_ALLOW_UNSECURE_COMMANDS: true steps: @@ -59,5 +59,3 @@ jobs: --platform linux/amd64 \ --tag "${{ secrets.DOCKER_HUB_USER }}/sphinx-nav-fiber:latest" \ --output "type=registry" ./ - - diff --git a/build/assets/index-337682da.js b/build/assets/index-337682da.js index cc3c693c4..ab6581dca 100644 --- a/build/assets/index-337682da.js +++ b/build/assets/index-337682da.js @@ -1,643 +1,84611 @@ -var r4=Object.defineProperty;var i4=(tt,et,nt)=>et in tt?r4(tt,et,{enumerable:!0,configurable:!0,writable:!0,value:nt}):tt[et]=nt;var o4=(tt,et)=>()=>(et||tt((et={exports:{}}).exports,et),et.exports);var mw=(tt,et,nt)=>(i4(tt,typeof et!="symbol"?et+"":et,nt),nt);var s4=o4((exports,module)=>{function _mergeNamespaces(tt,et){for(var nt=0;ntrt[it]})}}}return Object.freeze(Object.defineProperty(tt,Symbol.toStringTag,{value:"Module"}))}(function(){const et=document.createElement("link").relList;if(et&&et.supports&&et.supports("modulepreload"))return;for(const it of document.querySelectorAll('link[rel="modulepreload"]'))rt(it);new MutationObserver(it=>{for(const ot of it)if(ot.type==="childList")for(const at of ot.addedNodes)at.tagName==="LINK"&&at.rel==="modulepreload"&&rt(at)}).observe(document,{childList:!0,subtree:!0});function nt(it){const ot={};return it.integrity&&(ot.integrity=it.integrity),it.referrerPolicy&&(ot.referrerPolicy=it.referrerPolicy),it.crossOrigin==="use-credentials"?ot.credentials="include":it.crossOrigin==="anonymous"?ot.credentials="omit":ot.credentials="same-origin",ot}function rt(it){if(it.ep)return;it.ep=!0;const ot=nt(it);fetch(it.href,ot)}})();var commonjsGlobal=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function getDefaultExportFromCjs(tt){return tt&&tt.__esModule&&Object.prototype.hasOwnProperty.call(tt,"default")?tt.default:tt}function getAugmentedNamespace(tt){if(tt.__esModule)return tt;var et=tt.default;if(typeof et=="function"){var nt=function rt(){return this instanceof rt?Reflect.construct(et,arguments,this.constructor):et.apply(this,arguments)};nt.prototype=et.prototype}else nt={};return Object.defineProperty(nt,"__esModule",{value:!0}),Object.keys(tt).forEach(function(rt){var it=Object.getOwnPropertyDescriptor(tt,rt);Object.defineProperty(nt,rt,it.get?it:{enumerable:!0,get:function(){return tt[rt]}})}),nt}var buffer$2={},base64Js={};base64Js.byteLength=byteLength$1;base64Js.toByteArray=toByteArray;base64Js.fromByteArray=fromByteArray;var lookup$2=[],revLookup=[],Arr=typeof Uint8Array<"u"?Uint8Array:Array,code="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(var i$8=0,len=code.length;i$80)throw new Error("Invalid string. Length must be a multiple of 4");var nt=tt.indexOf("=");nt===-1&&(nt=et);var rt=nt===et?0:4-nt%4;return[nt,rt]}function byteLength$1(tt){var et=getLens(tt),nt=et[0],rt=et[1];return(nt+rt)*3/4-rt}function _byteLength(tt,et,nt){return(et+nt)*3/4-nt}function toByteArray(tt){var et,nt=getLens(tt),rt=nt[0],it=nt[1],ot=new Arr(_byteLength(tt,rt,it)),at=0,st=it>0?rt-4:rt,lt;for(lt=0;lt>16&255,ot[at++]=et>>8&255,ot[at++]=et&255;return it===2&&(et=revLookup[tt.charCodeAt(lt)]<<2|revLookup[tt.charCodeAt(lt+1)]>>4,ot[at++]=et&255),it===1&&(et=revLookup[tt.charCodeAt(lt)]<<10|revLookup[tt.charCodeAt(lt+1)]<<4|revLookup[tt.charCodeAt(lt+2)]>>2,ot[at++]=et>>8&255,ot[at++]=et&255),ot}function tripletToBase64(tt){return lookup$2[tt>>18&63]+lookup$2[tt>>12&63]+lookup$2[tt>>6&63]+lookup$2[tt&63]}function encodeChunk(tt,et,nt){for(var rt,it=[],ot=et;otst?st:at+ot));return rt===1?(et=tt[nt-1],it.push(lookup$2[et>>2]+lookup$2[et<<4&63]+"==")):rt===2&&(et=(tt[nt-2]<<8)+tt[nt-1],it.push(lookup$2[et>>10]+lookup$2[et>>4&63]+lookup$2[et<<2&63]+"=")),it.join("")}var ieee754={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */ieee754.read=function(tt,et,nt,rt,it){var ot,at,st=it*8-rt-1,lt=(1<>1,ut=-7,ht=nt?it-1:0,dt=nt?-1:1,pt=tt[et+ht];for(ht+=dt,ot=pt&(1<<-ut)-1,pt>>=-ut,ut+=st;ut>0;ot=ot*256+tt[et+ht],ht+=dt,ut-=8);for(at=ot&(1<<-ut)-1,ot>>=-ut,ut+=rt;ut>0;at=at*256+tt[et+ht],ht+=dt,ut-=8);if(ot===0)ot=1-ct;else{if(ot===lt)return at?NaN:(pt?-1:1)*(1/0);at=at+Math.pow(2,rt),ot=ot-ct}return(pt?-1:1)*at*Math.pow(2,ot-rt)};ieee754.write=function(tt,et,nt,rt,it,ot){var at,st,lt,ct=ot*8-it-1,ut=(1<>1,dt=it===23?Math.pow(2,-24)-Math.pow(2,-77):0,pt=rt?0:ot-1,mt=rt?1:-1,gt=et<0||et===0&&1/et<0?1:0;for(et=Math.abs(et),isNaN(et)||et===1/0?(st=isNaN(et)?1:0,at=ut):(at=Math.floor(Math.log(et)/Math.LN2),et*(lt=Math.pow(2,-at))<1&&(at--,lt*=2),at+ht>=1?et+=dt/lt:et+=dt*Math.pow(2,1-ht),et*lt>=2&&(at++,lt/=2),at+ht>=ut?(st=0,at=ut):at+ht>=1?(st=(et*lt-1)*Math.pow(2,it),at=at+ht):(st=et*Math.pow(2,ht-1)*Math.pow(2,it),at=0));it>=8;tt[nt+pt]=st&255,pt+=mt,st/=256,it-=8);for(at=at<0;tt[nt+pt]=at&255,pt+=mt,at/=256,ct-=8);tt[nt+pt-mt]|=gt*128};/*! - * The buffer module from node.js, for the browser. - * - * @author Feross Aboukhadijeh - * @license MIT - */(function(tt){const et=base64Js,nt=ieee754,rt=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;tt.Buffer=st,tt.SlowBuffer=vt,tt.INSPECT_MAX_BYTES=50;const it=2147483647;tt.kMaxLength=it,st.TYPED_ARRAY_SUPPORT=ot(),!st.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function ot(){try{const un=new Uint8Array(1),Zt={foo:function(){return 42}};return Object.setPrototypeOf(Zt,Uint8Array.prototype),Object.setPrototypeOf(un,Zt),un.foo()===42}catch{return!1}}Object.defineProperty(st.prototype,"parent",{enumerable:!0,get:function(){if(st.isBuffer(this))return this.buffer}}),Object.defineProperty(st.prototype,"offset",{enumerable:!0,get:function(){if(st.isBuffer(this))return this.byteOffset}});function at(un){if(un>it)throw new RangeError('The value "'+un+'" is invalid for option "size"');const Zt=new Uint8Array(un);return Object.setPrototypeOf(Zt,st.prototype),Zt}function st(un,Zt,Xt){if(typeof un=="number"){if(typeof Zt=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return ht(un)}return lt(un,Zt,Xt)}st.poolSize=8192;function lt(un,Zt,Xt){if(typeof un=="string")return dt(un,Zt);if(ArrayBuffer.isView(un))return mt(un);if(un==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof un);if(wn(un,ArrayBuffer)||un&&wn(un.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(wn(un,SharedArrayBuffer)||un&&wn(un.buffer,SharedArrayBuffer)))return gt(un,Zt,Xt);if(typeof un=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const Sn=un.valueOf&&un.valueOf();if(Sn!=null&&Sn!==un)return st.from(Sn,Zt,Xt);const Rn=yt(un);if(Rn)return Rn;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof un[Symbol.toPrimitive]=="function")return st.from(un[Symbol.toPrimitive]("string"),Zt,Xt);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof un)}st.from=function(un,Zt,Xt){return lt(un,Zt,Xt)},Object.setPrototypeOf(st.prototype,Uint8Array.prototype),Object.setPrototypeOf(st,Uint8Array);function ct(un){if(typeof un!="number")throw new TypeError('"size" argument must be of type number');if(un<0)throw new RangeError('The value "'+un+'" is invalid for option "size"')}function ut(un,Zt,Xt){return ct(un),un<=0?at(un):Zt!==void 0?typeof Xt=="string"?at(un).fill(Zt,Xt):at(un).fill(Zt):at(un)}st.alloc=function(un,Zt,Xt){return ut(un,Zt,Xt)};function ht(un){return ct(un),at(un<0?0:bt(un)|0)}st.allocUnsafe=function(un){return ht(un)},st.allocUnsafeSlow=function(un){return ht(un)};function dt(un,Zt){if((typeof Zt!="string"||Zt==="")&&(Zt="utf8"),!st.isEncoding(Zt))throw new TypeError("Unknown encoding: "+Zt);const Xt=xt(un,Zt)|0;let Sn=at(Xt);const Rn=Sn.write(un,Zt);return Rn!==Xt&&(Sn=Sn.slice(0,Rn)),Sn}function pt(un){const Zt=un.length<0?0:bt(un.length)|0,Xt=at(Zt);for(let Sn=0;Sn=it)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+it.toString(16)+" bytes");return un|0}function vt(un){return+un!=un&&(un=0),st.alloc(+un)}st.isBuffer=function(Zt){return Zt!=null&&Zt._isBuffer===!0&&Zt!==st.prototype},st.compare=function(Zt,Xt){if(wn(Zt,Uint8Array)&&(Zt=st.from(Zt,Zt.offset,Zt.byteLength)),wn(Xt,Uint8Array)&&(Xt=st.from(Xt,Xt.offset,Xt.byteLength)),!st.isBuffer(Zt)||!st.isBuffer(Xt))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(Zt===Xt)return 0;let Sn=Zt.length,Rn=Xt.length;for(let jn=0,On=Math.min(Sn,Rn);jnRn.length?(st.isBuffer(On)||(On=st.from(On)),On.copy(Rn,jn)):Uint8Array.prototype.set.call(Rn,On,jn);else if(st.isBuffer(On))On.copy(Rn,jn);else throw new TypeError('"list" argument must be an Array of Buffers');jn+=On.length}return Rn};function xt(un,Zt){if(st.isBuffer(un))return un.length;if(ArrayBuffer.isView(un)||wn(un,ArrayBuffer))return un.byteLength;if(typeof un!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof un);const Xt=un.length,Sn=arguments.length>2&&arguments[2]===!0;if(!Sn&&Xt===0)return 0;let Rn=!1;for(;;)switch(Zt){case"ascii":case"latin1":case"binary":return Xt;case"utf8":case"utf-8":return Tn(un).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Xt*2;case"hex":return Xt>>>1;case"base64":return In(un).length;default:if(Rn)return Sn?-1:Tn(un).length;Zt=(""+Zt).toLowerCase(),Rn=!0}}st.byteLength=xt;function kt(un,Zt,Xt){let Sn=!1;if((Zt===void 0||Zt<0)&&(Zt=0),Zt>this.length||((Xt===void 0||Xt>this.length)&&(Xt=this.length),Xt<=0)||(Xt>>>=0,Zt>>>=0,Xt<=Zt))return"";for(un||(un="utf8");;)switch(un){case"hex":return Ft(this,Zt,Xt);case"utf8":case"utf-8":return wt(this,Zt,Xt);case"ascii":return Wt(this,Zt,Xt);case"latin1":case"binary":return zt(this,Zt,Xt);case"base64":return Ct(this,Zt,Xt);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Nt(this,Zt,Xt);default:if(Sn)throw new TypeError("Unknown encoding: "+un);un=(un+"").toLowerCase(),Sn=!0}}st.prototype._isBuffer=!0;function St(un,Zt,Xt){const Sn=un[Zt];un[Zt]=un[Xt],un[Xt]=Sn}st.prototype.swap16=function(){const Zt=this.length;if(Zt%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let Xt=0;XtXt&&(Zt+=" ... "),""},rt&&(st.prototype[rt]=st.prototype.inspect),st.prototype.compare=function(Zt,Xt,Sn,Rn,jn){if(wn(Zt,Uint8Array)&&(Zt=st.from(Zt,Zt.offset,Zt.byteLength)),!st.isBuffer(Zt))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof Zt);if(Xt===void 0&&(Xt=0),Sn===void 0&&(Sn=Zt?Zt.length:0),Rn===void 0&&(Rn=0),jn===void 0&&(jn=this.length),Xt<0||Sn>Zt.length||Rn<0||jn>this.length)throw new RangeError("out of range index");if(Rn>=jn&&Xt>=Sn)return 0;if(Rn>=jn)return-1;if(Xt>=Sn)return 1;if(Xt>>>=0,Sn>>>=0,Rn>>>=0,jn>>>=0,this===Zt)return 0;let On=jn-Rn,Zn=Sn-Xt;const Vn=Math.min(On,Zn),qn=this.slice(Rn,jn),zn=Zt.slice(Xt,Sn);for(let Jn=0;Jn2147483647?Xt=2147483647:Xt<-2147483648&&(Xt=-2147483648),Xt=+Xt,fn(Xt)&&(Xt=Rn?0:un.length-1),Xt<0&&(Xt=un.length+Xt),Xt>=un.length){if(Rn)return-1;Xt=un.length-1}else if(Xt<0)if(Rn)Xt=0;else return-1;if(typeof Zt=="string"&&(Zt=st.from(Zt,Sn)),st.isBuffer(Zt))return Zt.length===0?-1:At(un,Zt,Xt,Sn,Rn);if(typeof Zt=="number")return Zt=Zt&255,typeof Uint8Array.prototype.indexOf=="function"?Rn?Uint8Array.prototype.indexOf.call(un,Zt,Xt):Uint8Array.prototype.lastIndexOf.call(un,Zt,Xt):At(un,[Zt],Xt,Sn,Rn);throw new TypeError("val must be string, number or Buffer")}function At(un,Zt,Xt,Sn,Rn){let jn=1,On=un.length,Zn=Zt.length;if(Sn!==void 0&&(Sn=String(Sn).toLowerCase(),Sn==="ucs2"||Sn==="ucs-2"||Sn==="utf16le"||Sn==="utf-16le")){if(un.length<2||Zt.length<2)return-1;jn=2,On/=2,Zn/=2,Xt/=2}function Vn(zn,Jn){return jn===1?zn[Jn]:zn.readUInt16BE(Jn*jn)}let qn;if(Rn){let zn=-1;for(qn=Xt;qnOn&&(Xt=On-Zn),qn=Xt;qn>=0;qn--){let zn=!0;for(let Jn=0;JnRn&&(Sn=Rn)):Sn=Rn;const jn=Zt.length;Sn>jn/2&&(Sn=jn/2);let On;for(On=0;On>>0,isFinite(Sn)?(Sn=Sn>>>0,Rn===void 0&&(Rn="utf8")):(Rn=Sn,Sn=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const jn=this.length-Xt;if((Sn===void 0||Sn>jn)&&(Sn=jn),Zt.length>0&&(Sn<0||Xt<0)||Xt>this.length)throw new RangeError("Attempt to write outside buffer bounds");Rn||(Rn="utf8");let On=!1;for(;;)switch(Rn){case"hex":return Et(this,Zt,Xt,Sn);case"utf8":case"utf-8":return $t(this,Zt,Xt,Sn);case"ascii":case"latin1":case"binary":return Dt(this,Zt,Xt,Sn);case"base64":return jt(this,Zt,Xt,Sn);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Pt(this,Zt,Xt,Sn);default:if(On)throw new TypeError("Unknown encoding: "+Rn);Rn=(""+Rn).toLowerCase(),On=!0}},st.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function Ct(un,Zt,Xt){return Zt===0&&Xt===un.length?et.fromByteArray(un):et.fromByteArray(un.slice(Zt,Xt))}function wt(un,Zt,Xt){Xt=Math.min(un.length,Xt);const Sn=[];let Rn=Zt;for(;Rn239?4:jn>223?3:jn>191?2:1;if(Rn+Zn<=Xt){let Vn,qn,zn,Jn;switch(Zn){case 1:jn<128&&(On=jn);break;case 2:Vn=un[Rn+1],(Vn&192)===128&&(Jn=(jn&31)<<6|Vn&63,Jn>127&&(On=Jn));break;case 3:Vn=un[Rn+1],qn=un[Rn+2],(Vn&192)===128&&(qn&192)===128&&(Jn=(jn&15)<<12|(Vn&63)<<6|qn&63,Jn>2047&&(Jn<55296||Jn>57343)&&(On=Jn));break;case 4:Vn=un[Rn+1],qn=un[Rn+2],zn=un[Rn+3],(Vn&192)===128&&(qn&192)===128&&(zn&192)===128&&(Jn=(jn&15)<<18|(Vn&63)<<12|(qn&63)<<6|zn&63,Jn>65535&&Jn<1114112&&(On=Jn))}}On===null?(On=65533,Zn=1):On>65535&&(On-=65536,Sn.push(On>>>10&1023|55296),On=56320|On&1023),Sn.push(On),Rn+=Zn}return Ot(Sn)}const It=4096;function Ot(un){const Zt=un.length;if(Zt<=It)return String.fromCharCode.apply(String,un);let Xt="",Sn=0;for(;SnSn)&&(Xt=Sn);let Rn="";for(let jn=Zt;jnSn&&(Zt=Sn),Xt<0?(Xt+=Sn,Xt<0&&(Xt=0)):Xt>Sn&&(Xt=Sn),XtXt)throw new RangeError("Trying to access beyond buffer length")}st.prototype.readUintLE=st.prototype.readUIntLE=function(Zt,Xt,Sn){Zt=Zt>>>0,Xt=Xt>>>0,Sn||Ut(Zt,Xt,this.length);let Rn=this[Zt],jn=1,On=0;for(;++On>>0,Xt=Xt>>>0,Sn||Ut(Zt,Xt,this.length);let Rn=this[Zt+--Xt],jn=1;for(;Xt>0&&(jn*=256);)Rn+=this[Zt+--Xt]*jn;return Rn},st.prototype.readUint8=st.prototype.readUInt8=function(Zt,Xt){return Zt=Zt>>>0,Xt||Ut(Zt,1,this.length),this[Zt]},st.prototype.readUint16LE=st.prototype.readUInt16LE=function(Zt,Xt){return Zt=Zt>>>0,Xt||Ut(Zt,2,this.length),this[Zt]|this[Zt+1]<<8},st.prototype.readUint16BE=st.prototype.readUInt16BE=function(Zt,Xt){return Zt=Zt>>>0,Xt||Ut(Zt,2,this.length),this[Zt]<<8|this[Zt+1]},st.prototype.readUint32LE=st.prototype.readUInt32LE=function(Zt,Xt){return Zt=Zt>>>0,Xt||Ut(Zt,4,this.length),(this[Zt]|this[Zt+1]<<8|this[Zt+2]<<16)+this[Zt+3]*16777216},st.prototype.readUint32BE=st.prototype.readUInt32BE=function(Zt,Xt){return Zt=Zt>>>0,Xt||Ut(Zt,4,this.length),this[Zt]*16777216+(this[Zt+1]<<16|this[Zt+2]<<8|this[Zt+3])},st.prototype.readBigUInt64LE=kn(function(Zt){Zt=Zt>>>0,_n(Zt,"offset");const Xt=this[Zt],Sn=this[Zt+7];(Xt===void 0||Sn===void 0)&&Pn(Zt,this.length-8);const Rn=Xt+this[++Zt]*2**8+this[++Zt]*2**16+this[++Zt]*2**24,jn=this[++Zt]+this[++Zt]*2**8+this[++Zt]*2**16+Sn*2**24;return BigInt(Rn)+(BigInt(jn)<>>0,_n(Zt,"offset");const Xt=this[Zt],Sn=this[Zt+7];(Xt===void 0||Sn===void 0)&&Pn(Zt,this.length-8);const Rn=Xt*2**24+this[++Zt]*2**16+this[++Zt]*2**8+this[++Zt],jn=this[++Zt]*2**24+this[++Zt]*2**16+this[++Zt]*2**8+Sn;return(BigInt(Rn)<>>0,Xt=Xt>>>0,Sn||Ut(Zt,Xt,this.length);let Rn=this[Zt],jn=1,On=0;for(;++On=jn&&(Rn-=Math.pow(2,8*Xt)),Rn},st.prototype.readIntBE=function(Zt,Xt,Sn){Zt=Zt>>>0,Xt=Xt>>>0,Sn||Ut(Zt,Xt,this.length);let Rn=Xt,jn=1,On=this[Zt+--Rn];for(;Rn>0&&(jn*=256);)On+=this[Zt+--Rn]*jn;return jn*=128,On>=jn&&(On-=Math.pow(2,8*Xt)),On},st.prototype.readInt8=function(Zt,Xt){return Zt=Zt>>>0,Xt||Ut(Zt,1,this.length),this[Zt]&128?(255-this[Zt]+1)*-1:this[Zt]},st.prototype.readInt16LE=function(Zt,Xt){Zt=Zt>>>0,Xt||Ut(Zt,2,this.length);const Sn=this[Zt]|this[Zt+1]<<8;return Sn&32768?Sn|4294901760:Sn},st.prototype.readInt16BE=function(Zt,Xt){Zt=Zt>>>0,Xt||Ut(Zt,2,this.length);const Sn=this[Zt+1]|this[Zt]<<8;return Sn&32768?Sn|4294901760:Sn},st.prototype.readInt32LE=function(Zt,Xt){return Zt=Zt>>>0,Xt||Ut(Zt,4,this.length),this[Zt]|this[Zt+1]<<8|this[Zt+2]<<16|this[Zt+3]<<24},st.prototype.readInt32BE=function(Zt,Xt){return Zt=Zt>>>0,Xt||Ut(Zt,4,this.length),this[Zt]<<24|this[Zt+1]<<16|this[Zt+2]<<8|this[Zt+3]},st.prototype.readBigInt64LE=kn(function(Zt){Zt=Zt>>>0,_n(Zt,"offset");const Xt=this[Zt],Sn=this[Zt+7];(Xt===void 0||Sn===void 0)&&Pn(Zt,this.length-8);const Rn=this[Zt+4]+this[Zt+5]*2**8+this[Zt+6]*2**16+(Sn<<24);return(BigInt(Rn)<>>0,_n(Zt,"offset");const Xt=this[Zt],Sn=this[Zt+7];(Xt===void 0||Sn===void 0)&&Pn(Zt,this.length-8);const Rn=(Xt<<24)+this[++Zt]*2**16+this[++Zt]*2**8+this[++Zt];return(BigInt(Rn)<>>0,Xt||Ut(Zt,4,this.length),nt.read(this,Zt,!0,23,4)},st.prototype.readFloatBE=function(Zt,Xt){return Zt=Zt>>>0,Xt||Ut(Zt,4,this.length),nt.read(this,Zt,!1,23,4)},st.prototype.readDoubleLE=function(Zt,Xt){return Zt=Zt>>>0,Xt||Ut(Zt,8,this.length),nt.read(this,Zt,!0,52,8)},st.prototype.readDoubleBE=function(Zt,Xt){return Zt=Zt>>>0,Xt||Ut(Zt,8,this.length),nt.read(this,Zt,!1,52,8)};function Mt(un,Zt,Xt,Sn,Rn,jn){if(!st.isBuffer(un))throw new TypeError('"buffer" argument must be a Buffer instance');if(Zt>Rn||Ztun.length)throw new RangeError("Index out of range")}st.prototype.writeUintLE=st.prototype.writeUIntLE=function(Zt,Xt,Sn,Rn){if(Zt=+Zt,Xt=Xt>>>0,Sn=Sn>>>0,!Rn){const Zn=Math.pow(2,8*Sn)-1;Mt(this,Zt,Xt,Sn,Zn,0)}let jn=1,On=0;for(this[Xt]=Zt&255;++On>>0,Sn=Sn>>>0,!Rn){const Zn=Math.pow(2,8*Sn)-1;Mt(this,Zt,Xt,Sn,Zn,0)}let jn=Sn-1,On=1;for(this[Xt+jn]=Zt&255;--jn>=0&&(On*=256);)this[Xt+jn]=Zt/On&255;return Xt+Sn},st.prototype.writeUint8=st.prototype.writeUInt8=function(Zt,Xt,Sn){return Zt=+Zt,Xt=Xt>>>0,Sn||Mt(this,Zt,Xt,1,255,0),this[Xt]=Zt&255,Xt+1},st.prototype.writeUint16LE=st.prototype.writeUInt16LE=function(Zt,Xt,Sn){return Zt=+Zt,Xt=Xt>>>0,Sn||Mt(this,Zt,Xt,2,65535,0),this[Xt]=Zt&255,this[Xt+1]=Zt>>>8,Xt+2},st.prototype.writeUint16BE=st.prototype.writeUInt16BE=function(Zt,Xt,Sn){return Zt=+Zt,Xt=Xt>>>0,Sn||Mt(this,Zt,Xt,2,65535,0),this[Xt]=Zt>>>8,this[Xt+1]=Zt&255,Xt+2},st.prototype.writeUint32LE=st.prototype.writeUInt32LE=function(Zt,Xt,Sn){return Zt=+Zt,Xt=Xt>>>0,Sn||Mt(this,Zt,Xt,4,4294967295,0),this[Xt+3]=Zt>>>24,this[Xt+2]=Zt>>>16,this[Xt+1]=Zt>>>8,this[Xt]=Zt&255,Xt+4},st.prototype.writeUint32BE=st.prototype.writeUInt32BE=function(Zt,Xt,Sn){return Zt=+Zt,Xt=Xt>>>0,Sn||Mt(this,Zt,Xt,4,4294967295,0),this[Xt]=Zt>>>24,this[Xt+1]=Zt>>>16,this[Xt+2]=Zt>>>8,this[Xt+3]=Zt&255,Xt+4};function Ht(un,Zt,Xt,Sn,Rn){Qt(Zt,Sn,Rn,un,Xt,7);let jn=Number(Zt&BigInt(4294967295));un[Xt++]=jn,jn=jn>>8,un[Xt++]=jn,jn=jn>>8,un[Xt++]=jn,jn=jn>>8,un[Xt++]=jn;let On=Number(Zt>>BigInt(32)&BigInt(4294967295));return un[Xt++]=On,On=On>>8,un[Xt++]=On,On=On>>8,un[Xt++]=On,On=On>>8,un[Xt++]=On,Xt}function en(un,Zt,Xt,Sn,Rn){Qt(Zt,Sn,Rn,un,Xt,7);let jn=Number(Zt&BigInt(4294967295));un[Xt+7]=jn,jn=jn>>8,un[Xt+6]=jn,jn=jn>>8,un[Xt+5]=jn,jn=jn>>8,un[Xt+4]=jn;let On=Number(Zt>>BigInt(32)&BigInt(4294967295));return un[Xt+3]=On,On=On>>8,un[Xt+2]=On,On=On>>8,un[Xt+1]=On,On=On>>8,un[Xt]=On,Xt+8}st.prototype.writeBigUInt64LE=kn(function(Zt,Xt=0){return Ht(this,Zt,Xt,BigInt(0),BigInt("0xffffffffffffffff"))}),st.prototype.writeBigUInt64BE=kn(function(Zt,Xt=0){return en(this,Zt,Xt,BigInt(0),BigInt("0xffffffffffffffff"))}),st.prototype.writeIntLE=function(Zt,Xt,Sn,Rn){if(Zt=+Zt,Xt=Xt>>>0,!Rn){const Vn=Math.pow(2,8*Sn-1);Mt(this,Zt,Xt,Sn,Vn-1,-Vn)}let jn=0,On=1,Zn=0;for(this[Xt]=Zt&255;++jn>0)-Zn&255;return Xt+Sn},st.prototype.writeIntBE=function(Zt,Xt,Sn,Rn){if(Zt=+Zt,Xt=Xt>>>0,!Rn){const Vn=Math.pow(2,8*Sn-1);Mt(this,Zt,Xt,Sn,Vn-1,-Vn)}let jn=Sn-1,On=1,Zn=0;for(this[Xt+jn]=Zt&255;--jn>=0&&(On*=256);)Zt<0&&Zn===0&&this[Xt+jn+1]!==0&&(Zn=1),this[Xt+jn]=(Zt/On>>0)-Zn&255;return Xt+Sn},st.prototype.writeInt8=function(Zt,Xt,Sn){return Zt=+Zt,Xt=Xt>>>0,Sn||Mt(this,Zt,Xt,1,127,-128),Zt<0&&(Zt=255+Zt+1),this[Xt]=Zt&255,Xt+1},st.prototype.writeInt16LE=function(Zt,Xt,Sn){return Zt=+Zt,Xt=Xt>>>0,Sn||Mt(this,Zt,Xt,2,32767,-32768),this[Xt]=Zt&255,this[Xt+1]=Zt>>>8,Xt+2},st.prototype.writeInt16BE=function(Zt,Xt,Sn){return Zt=+Zt,Xt=Xt>>>0,Sn||Mt(this,Zt,Xt,2,32767,-32768),this[Xt]=Zt>>>8,this[Xt+1]=Zt&255,Xt+2},st.prototype.writeInt32LE=function(Zt,Xt,Sn){return Zt=+Zt,Xt=Xt>>>0,Sn||Mt(this,Zt,Xt,4,2147483647,-2147483648),this[Xt]=Zt&255,this[Xt+1]=Zt>>>8,this[Xt+2]=Zt>>>16,this[Xt+3]=Zt>>>24,Xt+4},st.prototype.writeInt32BE=function(Zt,Xt,Sn){return Zt=+Zt,Xt=Xt>>>0,Sn||Mt(this,Zt,Xt,4,2147483647,-2147483648),Zt<0&&(Zt=4294967295+Zt+1),this[Xt]=Zt>>>24,this[Xt+1]=Zt>>>16,this[Xt+2]=Zt>>>8,this[Xt+3]=Zt&255,Xt+4},st.prototype.writeBigInt64LE=kn(function(Zt,Xt=0){return Ht(this,Zt,Xt,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),st.prototype.writeBigInt64BE=kn(function(Zt,Xt=0){return en(this,Zt,Xt,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function sn(un,Zt,Xt,Sn,Rn,jn){if(Xt+Sn>un.length)throw new RangeError("Index out of range");if(Xt<0)throw new RangeError("Index out of range")}function Kt(un,Zt,Xt,Sn,Rn){return Zt=+Zt,Xt=Xt>>>0,Rn||sn(un,Zt,Xt,4),nt.write(un,Zt,Xt,Sn,23,4),Xt+4}st.prototype.writeFloatLE=function(Zt,Xt,Sn){return Kt(this,Zt,Xt,!0,Sn)},st.prototype.writeFloatBE=function(Zt,Xt,Sn){return Kt(this,Zt,Xt,!1,Sn)};function rn(un,Zt,Xt,Sn,Rn){return Zt=+Zt,Xt=Xt>>>0,Rn||sn(un,Zt,Xt,8),nt.write(un,Zt,Xt,Sn,52,8),Xt+8}st.prototype.writeDoubleLE=function(Zt,Xt,Sn){return rn(this,Zt,Xt,!0,Sn)},st.prototype.writeDoubleBE=function(Zt,Xt,Sn){return rn(this,Zt,Xt,!1,Sn)},st.prototype.copy=function(Zt,Xt,Sn,Rn){if(!st.isBuffer(Zt))throw new TypeError("argument should be a Buffer");if(Sn||(Sn=0),!Rn&&Rn!==0&&(Rn=this.length),Xt>=Zt.length&&(Xt=Zt.length),Xt||(Xt=0),Rn>0&&Rn=this.length)throw new RangeError("Index out of range");if(Rn<0)throw new RangeError("sourceEnd out of bounds");Rn>this.length&&(Rn=this.length),Zt.length-Xt>>0,Sn=Sn===void 0?this.length:Sn>>>0,Zt||(Zt=0);let jn;if(typeof Zt=="number")for(jn=Xt;jn2**32?Rn=vn(String(Xt)):typeof Xt=="bigint"&&(Rn=String(Xt),(Xt>BigInt(2)**BigInt(32)||Xt<-(BigInt(2)**BigInt(32)))&&(Rn=vn(Rn)),Rn+="n"),Sn+=` It must be ${Zt}. Received ${Rn}`,Sn},RangeError);function vn(un){let Zt="",Xt=un.length;const Sn=un[0]==="-"?1:0;for(;Xt>=Sn+4;Xt-=3)Zt=`_${un.slice(Xt-3,Xt)}${Zt}`;return`${un.slice(0,Xt)}${Zt}`}function an(un,Zt,Xt){_n(Zt,"offset"),(un[Zt]===void 0||un[Zt+Xt]===void 0)&&Pn(Zt,un.length-(Xt+1))}function Qt(un,Zt,Xt,Sn,Rn,jn){if(un>Xt||un3?Zt===0||Zt===BigInt(0)?Zn=`>= 0${On} and < 2${On} ** ${(jn+1)*8}${On}`:Zn=`>= -(2${On} ** ${(jn+1)*8-1}${On}) and < 2 ** ${(jn+1)*8-1}${On}`:Zn=`>= ${Zt}${On} and <= ${Xt}${On}`,new nn.ERR_OUT_OF_RANGE("value",Zn,un)}an(Sn,Rn,jn)}function _n(un,Zt){if(typeof un!="number")throw new nn.ERR_INVALID_ARG_TYPE(Zt,"number",un)}function Pn(un,Zt,Xt){throw Math.floor(un)!==un?(_n(un,Xt),new nn.ERR_OUT_OF_RANGE(Xt||"offset","an integer",un)):Zt<0?new nn.ERR_BUFFER_OUT_OF_BOUNDS:new nn.ERR_OUT_OF_RANGE(Xt||"offset",`>= ${Xt?1:0} and <= ${Zt}`,un)}const $n=/[^+/0-9A-Za-z-_]/g;function Nn(un){if(un=un.split("=")[0],un=un.trim().replace($n,""),un.length<2)return"";for(;un.length%4!==0;)un=un+"=";return un}function Tn(un,Zt){Zt=Zt||1/0;let Xt;const Sn=un.length;let Rn=null;const jn=[];for(let On=0;On55295&&Xt<57344){if(!Rn){if(Xt>56319){(Zt-=3)>-1&&jn.push(239,191,189);continue}else if(On+1===Sn){(Zt-=3)>-1&&jn.push(239,191,189);continue}Rn=Xt;continue}if(Xt<56320){(Zt-=3)>-1&&jn.push(239,191,189),Rn=Xt;continue}Xt=(Rn-55296<<10|Xt-56320)+65536}else Rn&&(Zt-=3)>-1&&jn.push(239,191,189);if(Rn=null,Xt<128){if((Zt-=1)<0)break;jn.push(Xt)}else if(Xt<2048){if((Zt-=2)<0)break;jn.push(Xt>>6|192,Xt&63|128)}else if(Xt<65536){if((Zt-=3)<0)break;jn.push(Xt>>12|224,Xt>>6&63|128,Xt&63|128)}else if(Xt<1114112){if((Zt-=4)<0)break;jn.push(Xt>>18|240,Xt>>12&63|128,Xt>>6&63|128,Xt&63|128)}else throw new Error("Invalid code point")}return jn}function cn(un){const Zt=[];for(let Xt=0;Xt>8,Rn=Xt%256,jn.push(Rn),jn.push(Sn);return jn}function In(un){return et.toByteArray(Nn(un))}function An(un,Zt,Xt,Sn){let Rn;for(Rn=0;Rn=Zt.length||Rn>=un.length);++Rn)Zt[Rn+Xt]=un[Rn];return Rn}function wn(un,Zt){return un instanceof Zt||un!=null&&un.constructor!=null&&un.constructor.name!=null&&un.constructor.name===Zt.name}function fn(un){return un!==un}const pn=function(){const un="0123456789abcdef",Zt=new Array(256);for(let Xt=0;Xt<16;++Xt){const Sn=Xt*16;for(let Rn=0;Rn<16;++Rn)Zt[Sn+Rn]=un[Xt]+un[Rn]}return Zt}();function kn(un){return typeof BigInt>"u"?Dn:un}function Dn(){throw new Error("BigInt not supported")}})(buffer$2);var browser$d={exports:{}},process$1=browser$d.exports={},cachedSetTimeout,cachedClearTimeout;function defaultSetTimout(){throw new Error("setTimeout has not been defined")}function defaultClearTimeout(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?cachedSetTimeout=setTimeout:cachedSetTimeout=defaultSetTimout}catch{cachedSetTimeout=defaultSetTimout}try{typeof clearTimeout=="function"?cachedClearTimeout=clearTimeout:cachedClearTimeout=defaultClearTimeout}catch{cachedClearTimeout=defaultClearTimeout}})();function runTimeout(tt){if(cachedSetTimeout===setTimeout)return setTimeout(tt,0);if((cachedSetTimeout===defaultSetTimout||!cachedSetTimeout)&&setTimeout)return cachedSetTimeout=setTimeout,setTimeout(tt,0);try{return cachedSetTimeout(tt,0)}catch{try{return cachedSetTimeout.call(null,tt,0)}catch{return cachedSetTimeout.call(this,tt,0)}}}function runClearTimeout(tt){if(cachedClearTimeout===clearTimeout)return clearTimeout(tt);if((cachedClearTimeout===defaultClearTimeout||!cachedClearTimeout)&&clearTimeout)return cachedClearTimeout=clearTimeout,clearTimeout(tt);try{return cachedClearTimeout(tt)}catch{try{return cachedClearTimeout.call(null,tt)}catch{return cachedClearTimeout.call(this,tt)}}}var queue$2=[],draining=!1,currentQueue,queueIndex=-1;function cleanUpNextTick(){!draining||!currentQueue||(draining=!1,currentQueue.length?queue$2=currentQueue.concat(queue$2):queueIndex=-1,queue$2.length&&drainQueue())}function drainQueue(){if(!draining){var tt=runTimeout(cleanUpNextTick);draining=!0;for(var et=queue$2.length;et;){for(currentQueue=queue$2,queue$2=[];++queueIndex1)for(var nt=1;nt>>1,Mt=zt[Ut];if(0>>1;Utit(sn,Nt))Ktit(rn,sn)?(zt[Ut]=rn,zt[Kt]=Nt,Ut=Kt):(zt[Ut]=sn,zt[en]=Nt,Ut=en);else if(Ktit(rn,Nt))zt[Ut]=rn,zt[Kt]=Nt,Ut=Kt;else break e}}return Ft}function it(zt,Ft){var Nt=zt.sortIndex-Ft.sortIndex;return Nt!==0?Nt:zt.id-Ft.id}if(typeof performance=="object"&&typeof performance.now=="function"){var ot=performance;tt.unstable_now=function(){return ot.now()}}else{var at=Date,st=at.now();tt.unstable_now=function(){return at.now()-st}}var lt=[],ct=[],ut=1,ht=null,dt=3,pt=!1,mt=!1,gt=!1,yt=typeof setTimeout=="function"?setTimeout:null,bt=typeof clearTimeout=="function"?clearTimeout:null,vt=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function xt(zt){for(var Ft=nt(ct);Ft!==null;){if(Ft.callback===null)rt(ct);else if(Ft.startTime<=zt)rt(ct),Ft.sortIndex=Ft.expirationTime,et(lt,Ft);else break;Ft=nt(ct)}}function kt(zt){if(gt=!1,xt(zt),!mt)if(nt(lt)!==null)mt=!0,Ot(St);else{var Ft=nt(ct);Ft!==null&&Wt(kt,Ft.startTime-zt)}}function St(zt,Ft){mt=!1,gt&&(gt=!1,bt(Et),Et=-1),pt=!0;var Nt=dt;try{for(xt(Ft),ht=nt(lt);ht!==null&&(!(ht.expirationTime>Ft)||zt&&!jt());){var Ut=ht.callback;if(typeof Ut=="function"){ht.callback=null,dt=ht.priorityLevel;var Mt=Ut(ht.expirationTime<=Ft);Ft=tt.unstable_now(),typeof Mt=="function"?ht.callback=Mt:ht===nt(lt)&&rt(lt),xt(Ft)}else rt(lt);ht=nt(lt)}if(ht!==null)var Ht=!0;else{var en=nt(ct);en!==null&&Wt(kt,en.startTime-Ft),Ht=!1}return Ht}finally{ht=null,dt=Nt,pt=!1}}var Tt=!1,At=null,Et=-1,$t=5,Dt=-1;function jt(){return!(tt.unstable_now()-Dt<$t)}function Pt(){if(At!==null){var zt=tt.unstable_now();Dt=zt;var Ft=!0;try{Ft=At(!0,zt)}finally{Ft?Ct():(Tt=!1,At=null)}}else Tt=!1}var Ct;if(typeof vt=="function")Ct=function(){vt(Pt)};else if(typeof MessageChannel<"u"){var wt=new MessageChannel,It=wt.port2;wt.port1.onmessage=Pt,Ct=function(){It.postMessage(null)}}else Ct=function(){yt(Pt,0)};function Ot(zt){At=zt,Tt||(Tt=!0,Ct())}function Wt(zt,Ft){Et=yt(function(){zt(tt.unstable_now())},Ft)}tt.unstable_IdlePriority=5,tt.unstable_ImmediatePriority=1,tt.unstable_LowPriority=4,tt.unstable_NormalPriority=3,tt.unstable_Profiling=null,tt.unstable_UserBlockingPriority=2,tt.unstable_cancelCallback=function(zt){zt.callback=null},tt.unstable_continueExecution=function(){mt||pt||(mt=!0,Ot(St))},tt.unstable_forceFrameRate=function(zt){0>zt||125Ut?(zt.sortIndex=Nt,et(ct,zt),nt(lt)===null&&zt===nt(ct)&&(gt?(bt(Et),Et=-1):gt=!0,Wt(kt,Nt-Ut))):(zt.sortIndex=Mt,et(lt,zt),mt||pt||(mt=!0,Ot(St))),zt},tt.unstable_shouldYield=jt,tt.unstable_wrapCallback=function(zt){var Ft=dt;return function(){var Nt=dt;dt=Ft;try{return zt.apply(this,arguments)}finally{dt=Nt}}}})(scheduler_production_min$1);scheduler$1.exports=scheduler_production_min$1;var schedulerExports$1=scheduler$1.exports;/** - * @license React - * react-dom.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var aa=reactExports,ca=schedulerExports$1;function p$a(tt){for(var et="https://reactjs.org/docs/error-decoder.html?invariant="+tt,nt=1;nt"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),ja=Object.prototype.hasOwnProperty,ka$1=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,la={},ma={};function oa(tt){return ja.call(ma,tt)?!0:ja.call(la,tt)?!1:ka$1.test(tt)?ma[tt]=!0:(la[tt]=!0,!1)}function pa(tt,et,nt,rt){if(nt!==null&&nt.type===0)return!1;switch(typeof et){case"function":case"symbol":return!0;case"boolean":return rt?!1:nt!==null?!nt.acceptsBooleans:(tt=tt.toLowerCase().slice(0,5),tt!=="data-"&&tt!=="aria-");default:return!1}}function qa(tt,et,nt,rt){if(et===null||typeof et>"u"||pa(tt,et,nt,rt))return!0;if(rt)return!1;if(nt!==null)switch(nt.type){case 3:return!et;case 4:return et===!1;case 5:return isNaN(et);case 6:return isNaN(et)||1>et}return!1}function v$a(tt,et,nt,rt,it,ot,at){this.acceptsBooleans=et===2||et===3||et===4,this.attributeName=rt,this.attributeNamespace=it,this.mustUseProperty=nt,this.propertyName=tt,this.type=et,this.sanitizeURL=ot,this.removeEmptyString=at}var z$7={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(tt){z$7[tt]=new v$a(tt,0,!1,tt,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(tt){var et=tt[0];z$7[et]=new v$a(et,1,!1,tt[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(tt){z$7[tt]=new v$a(tt,2,!1,tt.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(tt){z$7[tt]=new v$a(tt,2,!1,tt,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(tt){z$7[tt]=new v$a(tt,3,!1,tt.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(tt){z$7[tt]=new v$a(tt,3,!0,tt,null,!1,!1)});["capture","download"].forEach(function(tt){z$7[tt]=new v$a(tt,4,!1,tt,null,!1,!1)});["cols","rows","size","span"].forEach(function(tt){z$7[tt]=new v$a(tt,6,!1,tt,null,!1,!1)});["rowSpan","start"].forEach(function(tt){z$7[tt]=new v$a(tt,5,!1,tt.toLowerCase(),null,!1,!1)});var ra=/[\-:]([a-z])/g;function sa(tt){return tt[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(tt){var et=tt.replace(ra,sa);z$7[et]=new v$a(et,1,!1,tt,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(tt){var et=tt.replace(ra,sa);z$7[et]=new v$a(et,1,!1,tt,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(tt){var et=tt.replace(ra,sa);z$7[et]=new v$a(et,1,!1,tt,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(tt){z$7[tt]=new v$a(tt,1,!1,tt.toLowerCase(),null,!1,!1)});z$7.xlinkHref=new v$a("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(tt){z$7[tt]=new v$a(tt,1,!1,tt.toLowerCase(),null,!0,!0)});function ta(tt,et,nt,rt){var it=z$7.hasOwnProperty(et)?z$7[et]:null;(it!==null?it.type!==0:rt||!(2st||it[at]!==ot[st]){var lt=` -`+it[at].replace(" at new "," at ");return tt.displayName&<.includes("")&&(lt=lt.replace("",tt.displayName)),lt}while(1<=at&&0<=st);break}}}finally{Na=!1,Error.prepareStackTrace=nt}return(tt=tt?tt.displayName||tt.name:"")?Ma(tt):""}function Pa(tt){switch(tt.tag){case 5:return Ma(tt.type);case 16:return Ma("Lazy");case 13:return Ma("Suspense");case 19:return Ma("SuspenseList");case 0:case 2:case 15:return tt=Oa(tt.type,!1),tt;case 11:return tt=Oa(tt.type.render,!1),tt;case 1:return tt=Oa(tt.type,!0),tt;default:return""}}function Qa(tt){if(tt==null)return null;if(typeof tt=="function")return tt.displayName||tt.name||null;if(typeof tt=="string")return tt;switch(tt){case ya:return"Fragment";case wa:return"Portal";case Aa:return"Profiler";case za:return"StrictMode";case Ea:return"Suspense";case Fa:return"SuspenseList"}if(typeof tt=="object")switch(tt.$$typeof){case Ca:return(tt.displayName||"Context")+".Consumer";case Ba:return(tt._context.displayName||"Context")+".Provider";case Da:var et=tt.render;return tt=tt.displayName,tt||(tt=et.displayName||et.name||"",tt=tt!==""?"ForwardRef("+tt+")":"ForwardRef"),tt;case Ga:return et=tt.displayName||null,et!==null?et:Qa(tt.type)||"Memo";case Ha:et=tt._payload,tt=tt._init;try{return Qa(tt(et))}catch{}}return null}function Ra(tt){var et=tt.type;switch(tt.tag){case 24:return"Cache";case 9:return(et.displayName||"Context")+".Consumer";case 10:return(et._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return tt=et.render,tt=tt.displayName||tt.name||"",et.displayName||(tt!==""?"ForwardRef("+tt+")":"ForwardRef");case 7:return"Fragment";case 5:return et;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Qa(et);case 8:return et===za?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof et=="function")return et.displayName||et.name||null;if(typeof et=="string")return et}return null}function Sa(tt){switch(typeof tt){case"boolean":case"number":case"string":case"undefined":return tt;case"object":return tt;default:return""}}function Ta(tt){var et=tt.type;return(tt=tt.nodeName)&&tt.toLowerCase()==="input"&&(et==="checkbox"||et==="radio")}function Ua(tt){var et=Ta(tt)?"checked":"value",nt=Object.getOwnPropertyDescriptor(tt.constructor.prototype,et),rt=""+tt[et];if(!tt.hasOwnProperty(et)&&typeof nt<"u"&&typeof nt.get=="function"&&typeof nt.set=="function"){var it=nt.get,ot=nt.set;return Object.defineProperty(tt,et,{configurable:!0,get:function(){return it.call(this)},set:function(at){rt=""+at,ot.call(this,at)}}),Object.defineProperty(tt,et,{enumerable:nt.enumerable}),{getValue:function(){return rt},setValue:function(at){rt=""+at},stopTracking:function(){tt._valueTracker=null,delete tt[et]}}}}function Va(tt){tt._valueTracker||(tt._valueTracker=Ua(tt))}function Wa(tt){if(!tt)return!1;var et=tt._valueTracker;if(!et)return!0;var nt=et.getValue(),rt="";return tt&&(rt=Ta(tt)?tt.checked?"true":"false":tt.value),tt=rt,tt!==nt?(et.setValue(tt),!0):!1}function Xa(tt){if(tt=tt||(typeof document<"u"?document:void 0),typeof tt>"u")return null;try{return tt.activeElement||tt.body}catch{return tt.body}}function Ya(tt,et){var nt=et.checked;return A$3({},et,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:nt??tt._wrapperState.initialChecked})}function Za(tt,et){var nt=et.defaultValue==null?"":et.defaultValue,rt=et.checked!=null?et.checked:et.defaultChecked;nt=Sa(et.value!=null?et.value:nt),tt._wrapperState={initialChecked:rt,initialValue:nt,controlled:et.type==="checkbox"||et.type==="radio"?et.checked!=null:et.value!=null}}function ab(tt,et){et=et.checked,et!=null&&ta(tt,"checked",et,!1)}function bb(tt,et){ab(tt,et);var nt=Sa(et.value),rt=et.type;if(nt!=null)rt==="number"?(nt===0&&tt.value===""||tt.value!=nt)&&(tt.value=""+nt):tt.value!==""+nt&&(tt.value=""+nt);else if(rt==="submit"||rt==="reset"){tt.removeAttribute("value");return}et.hasOwnProperty("value")?cb(tt,et.type,nt):et.hasOwnProperty("defaultValue")&&cb(tt,et.type,Sa(et.defaultValue)),et.checked==null&&et.defaultChecked!=null&&(tt.defaultChecked=!!et.defaultChecked)}function db(tt,et,nt){if(et.hasOwnProperty("value")||et.hasOwnProperty("defaultValue")){var rt=et.type;if(!(rt!=="submit"&&rt!=="reset"||et.value!==void 0&&et.value!==null))return;et=""+tt._wrapperState.initialValue,nt||et===tt.value||(tt.value=et),tt.defaultValue=et}nt=tt.name,nt!==""&&(tt.name=""),tt.defaultChecked=!!tt._wrapperState.initialChecked,nt!==""&&(tt.name=nt)}function cb(tt,et,nt){(et!=="number"||Xa(tt.ownerDocument)!==tt)&&(nt==null?tt.defaultValue=""+tt._wrapperState.initialValue:tt.defaultValue!==""+nt&&(tt.defaultValue=""+nt))}var eb=Array.isArray;function fb(tt,et,nt,rt){if(tt=tt.options,et){et={};for(var it=0;it"+et.valueOf().toString()+"",et=mb.firstChild;tt.firstChild;)tt.removeChild(tt.firstChild);for(;et.firstChild;)tt.appendChild(et.firstChild)}});function ob(tt,et){if(et){var nt=tt.firstChild;if(nt&&nt===tt.lastChild&&nt.nodeType===3){nt.nodeValue=et;return}}tt.textContent=et}var pb={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},qb=["Webkit","ms","Moz","O"];Object.keys(pb).forEach(function(tt){qb.forEach(function(et){et=et+tt.charAt(0).toUpperCase()+tt.substring(1),pb[et]=pb[tt]})});function rb(tt,et,nt){return et==null||typeof et=="boolean"||et===""?"":nt||typeof et!="number"||et===0||pb.hasOwnProperty(tt)&&pb[tt]?(""+et).trim():et+"px"}function sb(tt,et){tt=tt.style;for(var nt in et)if(et.hasOwnProperty(nt)){var rt=nt.indexOf("--")===0,it=rb(nt,et[nt],rt);nt==="float"&&(nt="cssFloat"),rt?tt.setProperty(nt,it):tt[nt]=it}}var tb=A$3({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function ub(tt,et){if(et){if(tb[tt]&&(et.children!=null||et.dangerouslySetInnerHTML!=null))throw Error(p$a(137,tt));if(et.dangerouslySetInnerHTML!=null){if(et.children!=null)throw Error(p$a(60));if(typeof et.dangerouslySetInnerHTML!="object"||!("__html"in et.dangerouslySetInnerHTML))throw Error(p$a(61))}if(et.style!=null&&typeof et.style!="object")throw Error(p$a(62))}}function vb(tt,et){if(tt.indexOf("-")===-1)return typeof et.is=="string";switch(tt){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var wb=null;function xb(tt){return tt=tt.target||tt.srcElement||window,tt.correspondingUseElement&&(tt=tt.correspondingUseElement),tt.nodeType===3?tt.parentNode:tt}var yb=null,zb=null,Ab=null;function Bb(tt){if(tt=Cb(tt)){if(typeof yb!="function")throw Error(p$a(280));var et=tt.stateNode;et&&(et=Db(et),yb(tt.stateNode,tt.type,et))}}function Eb(tt){zb?Ab?Ab.push(tt):Ab=[tt]:zb=tt}function Fb(){if(zb){var tt=zb,et=Ab;if(Ab=zb=null,Bb(tt),et)for(tt=0;tt>>=0,tt===0?32:31-(pc(tt)/qc|0)|0}var rc=64,sc=4194304;function tc(tt){switch(tt&-tt){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return tt&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return tt&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return tt}}function uc(tt,et){var nt=tt.pendingLanes;if(nt===0)return 0;var rt=0,it=tt.suspendedLanes,ot=tt.pingedLanes,at=nt&268435455;if(at!==0){var st=at&~it;st!==0?rt=tc(st):(ot&=at,ot!==0&&(rt=tc(ot)))}else at=nt&~it,at!==0?rt=tc(at):ot!==0&&(rt=tc(ot));if(rt===0)return 0;if(et!==0&&et!==rt&&!(et&it)&&(it=rt&-rt,ot=et&-et,it>=ot||it===16&&(ot&4194240)!==0))return et;if(rt&4&&(rt|=nt&16),et=tt.entangledLanes,et!==0)for(tt=tt.entanglements,et&=rt;0nt;nt++)et.push(tt);return et}function Ac(tt,et,nt){tt.pendingLanes|=et,et!==536870912&&(tt.suspendedLanes=0,tt.pingedLanes=0),tt=tt.eventTimes,et=31-oc(et),tt[et]=nt}function Bc(tt,et){var nt=tt.pendingLanes&~et;tt.pendingLanes=et,tt.suspendedLanes=0,tt.pingedLanes=0,tt.expiredLanes&=et,tt.mutableReadLanes&=et,tt.entangledLanes&=et,et=tt.entanglements;var rt=tt.eventTimes;for(tt=tt.expirationTimes;0=be$1),ee$2=String.fromCharCode(32),fe$1=!1;function ge$1(tt,et){switch(tt){case"keyup":return $d.indexOf(et.keyCode)!==-1;case"keydown":return et.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function he$1(tt){return tt=tt.detail,typeof tt=="object"&&"data"in tt?tt.data:null}var ie$1=!1;function je$1(tt,et){switch(tt){case"compositionend":return he$1(et);case"keypress":return et.which!==32?null:(fe$1=!0,ee$2);case"textInput":return tt=et.data,tt===ee$2&&fe$1?null:tt;default:return null}}function ke$1(tt,et){if(ie$1)return tt==="compositionend"||!ae$1&&ge$1(tt,et)?(tt=nd(),md=ld=kd=null,ie$1=!1,tt):null;switch(tt){case"paste":return null;case"keypress":if(!(et.ctrlKey||et.altKey||et.metaKey)||et.ctrlKey&&et.altKey){if(et.char&&1=et)return{node:nt,offset:et-tt};tt=rt}e:{for(;nt;){if(nt.nextSibling){nt=nt.nextSibling;break e}nt=nt.parentNode}nt=void 0}nt=Je(nt)}}function Le$1(tt,et){return tt&&et?tt===et?!0:tt&&tt.nodeType===3?!1:et&&et.nodeType===3?Le$1(tt,et.parentNode):"contains"in tt?tt.contains(et):tt.compareDocumentPosition?!!(tt.compareDocumentPosition(et)&16):!1:!1}function Me$2(){for(var tt=window,et=Xa();et instanceof tt.HTMLIFrameElement;){try{var nt=typeof et.contentWindow.location.href=="string"}catch{nt=!1}if(nt)tt=et.contentWindow;else break;et=Xa(tt.document)}return et}function Ne$2(tt){var et=tt&&tt.nodeName&&tt.nodeName.toLowerCase();return et&&(et==="input"&&(tt.type==="text"||tt.type==="search"||tt.type==="tel"||tt.type==="url"||tt.type==="password")||et==="textarea"||tt.contentEditable==="true")}function Oe$1(tt){var et=Me$2(),nt=tt.focusedElem,rt=tt.selectionRange;if(et!==nt&&nt&&nt.ownerDocument&&Le$1(nt.ownerDocument.documentElement,nt)){if(rt!==null&&Ne$2(nt)){if(et=rt.start,tt=rt.end,tt===void 0&&(tt=et),"selectionStart"in nt)nt.selectionStart=et,nt.selectionEnd=Math.min(tt,nt.value.length);else if(tt=(et=nt.ownerDocument||document)&&et.defaultView||window,tt.getSelection){tt=tt.getSelection();var it=nt.textContent.length,ot=Math.min(rt.start,it);rt=rt.end===void 0?ot:Math.min(rt.end,it),!tt.extend&&ot>rt&&(it=rt,rt=ot,ot=it),it=Ke(nt,ot);var at=Ke(nt,rt);it&&at&&(tt.rangeCount!==1||tt.anchorNode!==it.node||tt.anchorOffset!==it.offset||tt.focusNode!==at.node||tt.focusOffset!==at.offset)&&(et=et.createRange(),et.setStart(it.node,it.offset),tt.removeAllRanges(),ot>rt?(tt.addRange(et),tt.extend(at.node,at.offset)):(et.setEnd(at.node,at.offset),tt.addRange(et)))}}for(et=[],tt=nt;tt=tt.parentNode;)tt.nodeType===1&&et.push({element:tt,left:tt.scrollLeft,top:tt.scrollTop});for(typeof nt.focus=="function"&&nt.focus(),nt=0;nt=document.documentMode,Qe=null,Re$1=null,Se$1=null,Te$1=!1;function Ue(tt,et,nt){var rt=nt.window===nt?nt.document:nt.nodeType===9?nt:nt.ownerDocument;Te$1||Qe==null||Qe!==Xa(rt)||(rt=Qe,"selectionStart"in rt&&Ne$2(rt)?rt={start:rt.selectionStart,end:rt.selectionEnd}:(rt=(rt.ownerDocument&&rt.ownerDocument.defaultView||window).getSelection(),rt={anchorNode:rt.anchorNode,anchorOffset:rt.anchorOffset,focusNode:rt.focusNode,focusOffset:rt.focusOffset}),Se$1&&Ie(Se$1,rt)||(Se$1=rt,rt=oe$1(Re$1,"onSelect"),0Tf||(tt.current=Sf[Tf],Sf[Tf]=null,Tf--)}function G$3(tt,et){Tf++,Sf[Tf]=tt.current,tt.current=et}var Vf={},H$3=Uf(Vf),Wf=Uf(!1),Xf=Vf;function Yf(tt,et){var nt=tt.type.contextTypes;if(!nt)return Vf;var rt=tt.stateNode;if(rt&&rt.__reactInternalMemoizedUnmaskedChildContext===et)return rt.__reactInternalMemoizedMaskedChildContext;var it={},ot;for(ot in nt)it[ot]=et[ot];return rt&&(tt=tt.stateNode,tt.__reactInternalMemoizedUnmaskedChildContext=et,tt.__reactInternalMemoizedMaskedChildContext=it),it}function Zf(tt){return tt=tt.childContextTypes,tt!=null}function $f(){E$2(Wf),E$2(H$3)}function ag(tt,et,nt){if(H$3.current!==Vf)throw Error(p$a(168));G$3(H$3,et),G$3(Wf,nt)}function bg(tt,et,nt){var rt=tt.stateNode;if(et=et.childContextTypes,typeof rt.getChildContext!="function")return nt;rt=rt.getChildContext();for(var it in rt)if(!(it in et))throw Error(p$a(108,Ra(tt)||"Unknown",it));return A$3({},nt,rt)}function cg(tt){return tt=(tt=tt.stateNode)&&tt.__reactInternalMemoizedMergedChildContext||Vf,Xf=H$3.current,G$3(H$3,tt),G$3(Wf,Wf.current),!0}function dg(tt,et,nt){var rt=tt.stateNode;if(!rt)throw Error(p$a(169));nt?(tt=bg(tt,et,Xf),rt.__reactInternalMemoizedMergedChildContext=tt,E$2(Wf),E$2(H$3),G$3(H$3,tt)):E$2(Wf),G$3(Wf,nt)}var eg=null,fg=!1,gg=!1;function hg(tt){eg===null?eg=[tt]:eg.push(tt)}function ig(tt){fg=!0,hg(tt)}function jg(){if(!gg&&eg!==null){gg=!0;var tt=0,et=C$2;try{var nt=eg;for(C$2=1;tt>=at,it-=at,rg=1<<32-oc(et)+it|nt<Et?($t=At,At=null):$t=At.sibling;var Dt=dt(bt,At,xt[Et],kt);if(Dt===null){At===null&&(At=$t);break}tt&&At&&Dt.alternate===null&&et(bt,At),vt=ot(Dt,vt,Et),Tt===null?St=Dt:Tt.sibling=Dt,Tt=Dt,At=$t}if(Et===xt.length)return nt(bt,At),I$4&&tg(bt,Et),St;if(At===null){for(;EtEt?($t=At,At=null):$t=At.sibling;var jt=dt(bt,At,Dt.value,kt);if(jt===null){At===null&&(At=$t);break}tt&&At&&jt.alternate===null&&et(bt,At),vt=ot(jt,vt,Et),Tt===null?St=jt:Tt.sibling=jt,Tt=jt,At=$t}if(Dt.done)return nt(bt,At),I$4&&tg(bt,Et),St;if(At===null){for(;!Dt.done;Et++,Dt=xt.next())Dt=ht(bt,Dt.value,kt),Dt!==null&&(vt=ot(Dt,vt,Et),Tt===null?St=Dt:Tt.sibling=Dt,Tt=Dt);return I$4&&tg(bt,Et),St}for(At=rt(bt,At);!Dt.done;Et++,Dt=xt.next())Dt=pt(At,bt,Et,Dt.value,kt),Dt!==null&&(tt&&Dt.alternate!==null&&At.delete(Dt.key===null?Et:Dt.key),vt=ot(Dt,vt,Et),Tt===null?St=Dt:Tt.sibling=Dt,Tt=Dt);return tt&&At.forEach(function(Pt){return et(bt,Pt)}),I$4&&tg(bt,Et),St}function yt(bt,vt,xt,kt){if(typeof xt=="object"&&xt!==null&&xt.type===ya&&xt.key===null&&(xt=xt.props.children),typeof xt=="object"&&xt!==null){switch(xt.$$typeof){case va:e:{for(var St=xt.key,Tt=vt;Tt!==null;){if(Tt.key===St){if(St=xt.type,St===ya){if(Tt.tag===7){nt(bt,Tt.sibling),vt=it(Tt,xt.props.children),vt.return=bt,bt=vt;break e}}else if(Tt.elementType===St||typeof St=="object"&&St!==null&&St.$$typeof===Ha&&uh(St)===Tt.type){nt(bt,Tt.sibling),vt=it(Tt,xt.props),vt.ref=sh$1(bt,Tt,xt),vt.return=bt,bt=vt;break e}nt(bt,Tt);break}else et(bt,Tt);Tt=Tt.sibling}xt.type===ya?(vt=Ah(xt.props.children,bt.mode,kt,xt.key),vt.return=bt,bt=vt):(kt=yh(xt.type,xt.key,xt.props,null,bt.mode,kt),kt.ref=sh$1(bt,vt,xt),kt.return=bt,bt=kt)}return at(bt);case wa:e:{for(Tt=xt.key;vt!==null;){if(vt.key===Tt)if(vt.tag===4&&vt.stateNode.containerInfo===xt.containerInfo&&vt.stateNode.implementation===xt.implementation){nt(bt,vt.sibling),vt=it(vt,xt.children||[]),vt.return=bt,bt=vt;break e}else{nt(bt,vt);break}else et(bt,vt);vt=vt.sibling}vt=zh(xt,bt.mode,kt),vt.return=bt,bt=vt}return at(bt);case Ha:return Tt=xt._init,yt(bt,vt,Tt(xt._payload),kt)}if(eb(xt))return mt(bt,vt,xt,kt);if(Ka(xt))return gt(bt,vt,xt,kt);th(bt,xt)}return typeof xt=="string"&&xt!==""||typeof xt=="number"?(xt=""+xt,vt!==null&&vt.tag===6?(nt(bt,vt.sibling),vt=it(vt,xt),vt.return=bt,bt=vt):(nt(bt,vt),vt=xh(xt,bt.mode,kt),vt.return=bt,bt=vt),at(bt)):nt(bt,vt)}return yt}var Bh=vh(!0),Ch$1=vh(!1),Dh={},Eh=Uf(Dh),Fh=Uf(Dh),Gh=Uf(Dh);function Hh(tt){if(tt===Dh)throw Error(p$a(174));return tt}function Ih(tt,et){switch(G$3(Gh,et),G$3(Fh,tt),G$3(Eh,Dh),tt=et.nodeType,tt){case 9:case 11:et=(et=et.documentElement)?et.namespaceURI:lb(null,"");break;default:tt=tt===8?et.parentNode:et,et=tt.namespaceURI||null,tt=tt.tagName,et=lb(et,tt)}E$2(Eh),G$3(Eh,et)}function Jh(){E$2(Eh),E$2(Fh),E$2(Gh)}function Kh$1(tt){Hh(Gh.current);var et=Hh(Eh.current),nt=lb(et,tt.type);et!==nt&&(G$3(Fh,tt),G$3(Eh,nt))}function Lh(tt){Fh.current===tt&&(E$2(Eh),E$2(Fh))}var M$3=Uf(0);function Mh(tt){for(var et=tt;et!==null;){if(et.tag===13){var nt=et.memoizedState;if(nt!==null&&(nt=nt.dehydrated,nt===null||nt.data==="$?"||nt.data==="$!"))return et}else if(et.tag===19&&et.memoizedProps.revealOrder!==void 0){if(et.flags&128)return et}else if(et.child!==null){et.child.return=et,et=et.child;continue}if(et===tt)break;for(;et.sibling===null;){if(et.return===null||et.return===tt)return null;et=et.return}et.sibling.return=et.return,et=et.sibling}return null}var Nh=[];function Oh(){for(var tt=0;ttnt?nt:4,tt(!0);var rt=Qh.transition;Qh.transition={};try{tt(!1),et()}finally{C$2=nt,Qh.transition=rt}}function Fi(){return di().memoizedState}function Gi(tt,et,nt){var rt=lh(tt);if(nt={lane:rt,action:nt,hasEagerState:!1,eagerState:null,next:null},Hi(tt))Ii(et,nt);else if(nt=Yg(tt,et,nt,rt),nt!==null){var it=L$3();mh(nt,tt,rt,it),Ji(nt,et,rt)}}function ri(tt,et,nt){var rt=lh(tt),it={lane:rt,action:nt,hasEagerState:!1,eagerState:null,next:null};if(Hi(tt))Ii(et,it);else{var ot=tt.alternate;if(tt.lanes===0&&(ot===null||ot.lanes===0)&&(ot=et.lastRenderedReducer,ot!==null))try{var at=et.lastRenderedState,st=ot(at,nt);if(it.hasEagerState=!0,it.eagerState=st,He$1(st,at)){var lt=et.interleaved;lt===null?(it.next=it,Xg(et)):(it.next=lt.next,lt.next=it),et.interleaved=it;return}}catch{}finally{}nt=Yg(tt,et,it,rt),nt!==null&&(it=L$3(),mh(nt,tt,rt,it),Ji(nt,et,rt))}}function Hi(tt){var et=tt.alternate;return tt===N$3||et!==null&&et===N$3}function Ii(tt,et){Th=Sh=!0;var nt=tt.pending;nt===null?et.next=et:(et.next=nt.next,nt.next=et),tt.pending=et}function Ji(tt,et,nt){if(nt&4194240){var rt=et.lanes;rt&=tt.pendingLanes,nt|=rt,et.lanes=nt,Cc(tt,nt)}}var ai={readContext:Vg,useCallback:Q$2,useContext:Q$2,useEffect:Q$2,useImperativeHandle:Q$2,useInsertionEffect:Q$2,useLayoutEffect:Q$2,useMemo:Q$2,useReducer:Q$2,useRef:Q$2,useState:Q$2,useDebugValue:Q$2,useDeferredValue:Q$2,useTransition:Q$2,useMutableSource:Q$2,useSyncExternalStore:Q$2,useId:Q$2,unstable_isNewReconciler:!1},Yh={readContext:Vg,useCallback:function(tt,et){return ci().memoizedState=[tt,et===void 0?null:et],tt},useContext:Vg,useEffect:vi,useImperativeHandle:function(tt,et,nt){return nt=nt!=null?nt.concat([tt]):null,ti(4194308,4,yi.bind(null,et,tt),nt)},useLayoutEffect:function(tt,et){return ti(4194308,4,tt,et)},useInsertionEffect:function(tt,et){return ti(4,2,tt,et)},useMemo:function(tt,et){var nt=ci();return et=et===void 0?null:et,tt=tt(),nt.memoizedState=[tt,et],tt},useReducer:function(tt,et,nt){var rt=ci();return et=nt!==void 0?nt(et):et,rt.memoizedState=rt.baseState=et,tt={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:tt,lastRenderedState:et},rt.queue=tt,tt=tt.dispatch=Gi.bind(null,N$3,tt),[rt.memoizedState,tt]},useRef:function(tt){var et=ci();return tt={current:tt},et.memoizedState=tt},useState:qi,useDebugValue:Ai,useDeferredValue:function(tt){return ci().memoizedState=tt},useTransition:function(){var tt=qi(!1),et=tt[0];return tt=Ei.bind(null,tt[1]),ci().memoizedState=tt,[et,tt]},useMutableSource:function(){},useSyncExternalStore:function(tt,et,nt){var rt=N$3,it=ci();if(I$4){if(nt===void 0)throw Error(p$a(407));nt=nt()}else{if(nt=et(),R$2===null)throw Error(p$a(349));Rh&30||ni(rt,et,nt)}it.memoizedState=nt;var ot={value:nt,getSnapshot:et};return it.queue=ot,vi(ki.bind(null,rt,ot,tt),[tt]),rt.flags|=2048,li(9,mi.bind(null,rt,ot,nt,et),void 0,null),nt},useId:function(){var tt=ci(),et=R$2.identifierPrefix;if(I$4){var nt=sg,rt=rg;nt=(rt&~(1<<32-oc(rt)-1)).toString(32)+nt,et=":"+et+"R"+nt,nt=Uh++,0<\/script>",tt=tt.removeChild(tt.firstChild)):typeof rt.is=="string"?tt=at.createElement(nt,{is:rt.is}):(tt=at.createElement(nt),nt==="select"&&(at=tt,rt.multiple?at.multiple=!0:rt.size&&(at.size=rt.size))):tt=at.createElementNS(tt,nt),tt[Of]=et,tt[Pf]=rt,Aj(tt,et,!1,!1),et.stateNode=tt;e:{switch(at=vb(nt,rt),nt){case"dialog":D$2("cancel",tt),D$2("close",tt),it=rt;break;case"iframe":case"object":case"embed":D$2("load",tt),it=rt;break;case"video":case"audio":for(it=0;itHj&&(et.flags|=128,rt=!0,Ej(ot,!1),et.lanes=4194304)}else{if(!rt)if(tt=Mh(at),tt!==null){if(et.flags|=128,rt=!0,nt=tt.updateQueue,nt!==null&&(et.updateQueue=nt,et.flags|=4),Ej(ot,!0),ot.tail===null&&ot.tailMode==="hidden"&&!at.alternate&&!I$4)return S$4(et),null}else 2*B$2()-ot.renderingStartTime>Hj&&nt!==1073741824&&(et.flags|=128,rt=!0,Ej(ot,!1),et.lanes=4194304);ot.isBackwards?(at.sibling=et.child,et.child=at):(nt=ot.last,nt!==null?nt.sibling=at:et.child=at,ot.last=at)}return ot.tail!==null?(et=ot.tail,ot.rendering=et,ot.tail=et.sibling,ot.renderingStartTime=B$2(),et.sibling=null,nt=M$3.current,G$3(M$3,rt?nt&1|2:nt&1),et):(S$4(et),null);case 22:case 23:return Ij(),rt=et.memoizedState!==null,tt!==null&&tt.memoizedState!==null!==rt&&(et.flags|=8192),rt&&et.mode&1?gj&1073741824&&(S$4(et),et.subtreeFlags&6&&(et.flags|=8192)):S$4(et),null;case 24:return null;case 25:return null}throw Error(p$a(156,et.tag))}function Jj(tt,et){switch(wg(et),et.tag){case 1:return Zf(et.type)&&$f(),tt=et.flags,tt&65536?(et.flags=tt&-65537|128,et):null;case 3:return Jh(),E$2(Wf),E$2(H$3),Oh(),tt=et.flags,tt&65536&&!(tt&128)?(et.flags=tt&-65537|128,et):null;case 5:return Lh(et),null;case 13:if(E$2(M$3),tt=et.memoizedState,tt!==null&&tt.dehydrated!==null){if(et.alternate===null)throw Error(p$a(340));Ig()}return tt=et.flags,tt&65536?(et.flags=tt&-65537|128,et):null;case 19:return E$2(M$3),null;case 4:return Jh(),null;case 10:return Rg(et.type._context),null;case 22:case 23:return Ij(),null;case 24:return null;default:return null}}var Kj=!1,U$3=!1,Lj=typeof WeakSet=="function"?WeakSet:Set,V$4=null;function Mj(tt,et){var nt=tt.ref;if(nt!==null)if(typeof nt=="function")try{nt(null)}catch(rt){W$8(tt,et,rt)}else nt.current=null}function Nj(tt,et,nt){try{nt()}catch(rt){W$8(tt,et,rt)}}var Oj=!1;function Pj(tt,et){if(Cf=dd,tt=Me$2(),Ne$2(tt)){if("selectionStart"in tt)var nt={start:tt.selectionStart,end:tt.selectionEnd};else e:{nt=(nt=tt.ownerDocument)&&nt.defaultView||window;var rt=nt.getSelection&&nt.getSelection();if(rt&&rt.rangeCount!==0){nt=rt.anchorNode;var it=rt.anchorOffset,ot=rt.focusNode;rt=rt.focusOffset;try{nt.nodeType,ot.nodeType}catch{nt=null;break e}var at=0,st=-1,lt=-1,ct=0,ut=0,ht=tt,dt=null;t:for(;;){for(var pt;ht!==nt||it!==0&&ht.nodeType!==3||(st=at+it),ht!==ot||rt!==0&&ht.nodeType!==3||(lt=at+rt),ht.nodeType===3&&(at+=ht.nodeValue.length),(pt=ht.firstChild)!==null;)dt=ht,ht=pt;for(;;){if(ht===tt)break t;if(dt===nt&&++ct===it&&(st=at),dt===ot&&++ut===rt&&(lt=at),(pt=ht.nextSibling)!==null)break;ht=dt,dt=ht.parentNode}ht=pt}nt=st===-1||lt===-1?null:{start:st,end:lt}}else nt=null}nt=nt||{start:0,end:0}}else nt=null;for(Df={focusedElem:tt,selectionRange:nt},dd=!1,V$4=et;V$4!==null;)if(et=V$4,tt=et.child,(et.subtreeFlags&1028)!==0&&tt!==null)tt.return=et,V$4=tt;else for(;V$4!==null;){et=V$4;try{var mt=et.alternate;if(et.flags&1024)switch(et.tag){case 0:case 11:case 15:break;case 1:if(mt!==null){var gt=mt.memoizedProps,yt=mt.memoizedState,bt=et.stateNode,vt=bt.getSnapshotBeforeUpdate(et.elementType===et.type?gt:Lg(et.type,gt),yt);bt.__reactInternalSnapshotBeforeUpdate=vt}break;case 3:var xt=et.stateNode.containerInfo;xt.nodeType===1?xt.textContent="":xt.nodeType===9&&xt.documentElement&&xt.removeChild(xt.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(p$a(163))}}catch(kt){W$8(et,et.return,kt)}if(tt=et.sibling,tt!==null){tt.return=et.return,V$4=tt;break}V$4=et.return}return mt=Oj,Oj=!1,mt}function Qj(tt,et,nt){var rt=et.updateQueue;if(rt=rt!==null?rt.lastEffect:null,rt!==null){var it=rt=rt.next;do{if((it.tag&tt)===tt){var ot=it.destroy;it.destroy=void 0,ot!==void 0&&Nj(et,nt,ot)}it=it.next}while(it!==rt)}}function Rj(tt,et){if(et=et.updateQueue,et=et!==null?et.lastEffect:null,et!==null){var nt=et=et.next;do{if((nt.tag&tt)===tt){var rt=nt.create;nt.destroy=rt()}nt=nt.next}while(nt!==et)}}function Sj(tt){var et=tt.ref;if(et!==null){var nt=tt.stateNode;switch(tt.tag){case 5:tt=nt;break;default:tt=nt}typeof et=="function"?et(tt):et.current=tt}}function Tj(tt){var et=tt.alternate;et!==null&&(tt.alternate=null,Tj(et)),tt.child=null,tt.deletions=null,tt.sibling=null,tt.tag===5&&(et=tt.stateNode,et!==null&&(delete et[Of],delete et[Pf],delete et[of],delete et[Qf],delete et[Rf])),tt.stateNode=null,tt.return=null,tt.dependencies=null,tt.memoizedProps=null,tt.memoizedState=null,tt.pendingProps=null,tt.stateNode=null,tt.updateQueue=null}function Uj(tt){return tt.tag===5||tt.tag===3||tt.tag===4}function Vj(tt){e:for(;;){for(;tt.sibling===null;){if(tt.return===null||Uj(tt.return))return null;tt=tt.return}for(tt.sibling.return=tt.return,tt=tt.sibling;tt.tag!==5&&tt.tag!==6&&tt.tag!==18;){if(tt.flags&2||tt.child===null||tt.tag===4)continue e;tt.child.return=tt,tt=tt.child}if(!(tt.flags&2))return tt.stateNode}}function Wj(tt,et,nt){var rt=tt.tag;if(rt===5||rt===6)tt=tt.stateNode,et?nt.nodeType===8?nt.parentNode.insertBefore(tt,et):nt.insertBefore(tt,et):(nt.nodeType===8?(et=nt.parentNode,et.insertBefore(tt,nt)):(et=nt,et.appendChild(tt)),nt=nt._reactRootContainer,nt!=null||et.onclick!==null||(et.onclick=Bf));else if(rt!==4&&(tt=tt.child,tt!==null))for(Wj(tt,et,nt),tt=tt.sibling;tt!==null;)Wj(tt,et,nt),tt=tt.sibling}function Xj(tt,et,nt){var rt=tt.tag;if(rt===5||rt===6)tt=tt.stateNode,et?nt.insertBefore(tt,et):nt.appendChild(tt);else if(rt!==4&&(tt=tt.child,tt!==null))for(Xj(tt,et,nt),tt=tt.sibling;tt!==null;)Xj(tt,et,nt),tt=tt.sibling}var X$2=null,Yj=!1;function Zj(tt,et,nt){for(nt=nt.child;nt!==null;)ak(tt,et,nt),nt=nt.sibling}function ak(tt,et,nt){if(lc&&typeof lc.onCommitFiberUnmount=="function")try{lc.onCommitFiberUnmount(kc,nt)}catch{}switch(nt.tag){case 5:U$3||Mj(nt,et);case 6:var rt=X$2,it=Yj;X$2=null,Zj(tt,et,nt),X$2=rt,Yj=it,X$2!==null&&(Yj?(tt=X$2,nt=nt.stateNode,tt.nodeType===8?tt.parentNode.removeChild(nt):tt.removeChild(nt)):X$2.removeChild(nt.stateNode));break;case 18:X$2!==null&&(Yj?(tt=X$2,nt=nt.stateNode,tt.nodeType===8?Kf(tt.parentNode,nt):tt.nodeType===1&&Kf(tt,nt),bd(tt)):Kf(X$2,nt.stateNode));break;case 4:rt=X$2,it=Yj,X$2=nt.stateNode.containerInfo,Yj=!0,Zj(tt,et,nt),X$2=rt,Yj=it;break;case 0:case 11:case 14:case 15:if(!U$3&&(rt=nt.updateQueue,rt!==null&&(rt=rt.lastEffect,rt!==null))){it=rt=rt.next;do{var ot=it,at=ot.destroy;ot=ot.tag,at!==void 0&&(ot&2||ot&4)&&Nj(nt,et,at),it=it.next}while(it!==rt)}Zj(tt,et,nt);break;case 1:if(!U$3&&(Mj(nt,et),rt=nt.stateNode,typeof rt.componentWillUnmount=="function"))try{rt.props=nt.memoizedProps,rt.state=nt.memoizedState,rt.componentWillUnmount()}catch(st){W$8(nt,et,st)}Zj(tt,et,nt);break;case 21:Zj(tt,et,nt);break;case 22:nt.mode&1?(U$3=(rt=U$3)||nt.memoizedState!==null,Zj(tt,et,nt),U$3=rt):Zj(tt,et,nt);break;default:Zj(tt,et,nt)}}function bk(tt){var et=tt.updateQueue;if(et!==null){tt.updateQueue=null;var nt=tt.stateNode;nt===null&&(nt=tt.stateNode=new Lj),et.forEach(function(rt){var it=ck.bind(null,tt,rt);nt.has(rt)||(nt.add(rt),rt.then(it,it))})}}function dk(tt,et){var nt=et.deletions;if(nt!==null)for(var rt=0;rtit&&(it=at),rt&=~ot}if(rt=it,rt=B$2()-rt,rt=(120>rt?120:480>rt?480:1080>rt?1080:1920>rt?1920:3e3>rt?3e3:4320>rt?4320:1960*mk(rt/1960))-rt,10tt?16:tt,xk===null)var rt=!1;else{if(tt=xk,xk=null,yk=0,K$7&6)throw Error(p$a(331));var it=K$7;for(K$7|=4,V$4=tt.current;V$4!==null;){var ot=V$4,at=ot.child;if(V$4.flags&16){var st=ot.deletions;if(st!==null){for(var lt=0;ltB$2()-gk?Lk(tt,0):sk|=nt),Ek(tt,et)}function Zk(tt,et){et===0&&(tt.mode&1?(et=sc,sc<<=1,!(sc&130023424)&&(sc=4194304)):et=1);var nt=L$3();tt=Zg(tt,et),tt!==null&&(Ac(tt,et,nt),Ek(tt,nt))}function vj(tt){var et=tt.memoizedState,nt=0;et!==null&&(nt=et.retryLane),Zk(tt,nt)}function ck(tt,et){var nt=0;switch(tt.tag){case 13:var rt=tt.stateNode,it=tt.memoizedState;it!==null&&(nt=it.retryLane);break;case 19:rt=tt.stateNode;break;default:throw Error(p$a(314))}rt!==null&&rt.delete(et),Zk(tt,nt)}var Wk;Wk=function(tt,et,nt){if(tt!==null)if(tt.memoizedProps!==et.pendingProps||Wf.current)Ug=!0;else{if(!(tt.lanes&nt)&&!(et.flags&128))return Ug=!1,zj(tt,et,nt);Ug=!!(tt.flags&131072)}else Ug=!1,I$4&&et.flags&1048576&&ug(et,ng,et.index);switch(et.lanes=0,et.tag){case 2:var rt=et.type;jj(tt,et),tt=et.pendingProps;var it=Yf(et,H$3.current);Tg(et,nt),it=Xh(null,et,rt,tt,it,nt);var ot=bi();return et.flags|=1,typeof it=="object"&&it!==null&&typeof it.render=="function"&&it.$$typeof===void 0?(et.tag=1,et.memoizedState=null,et.updateQueue=null,Zf(rt)?(ot=!0,cg(et)):ot=!1,et.memoizedState=it.state!==null&&it.state!==void 0?it.state:null,ah(et),it.updater=nh,et.stateNode=it,it._reactInternals=et,rh$1(et,rt,tt,nt),et=kj(null,et,rt,!0,ot,nt)):(et.tag=0,I$4&&ot&&vg(et),Yi(null,et,it,nt),et=et.child),et;case 16:rt=et.elementType;e:{switch(jj(tt,et),tt=et.pendingProps,it=rt._init,rt=it(rt._payload),et.type=rt,it=et.tag=$k(rt),tt=Lg(rt,tt),it){case 0:et=dj(null,et,rt,tt,nt);break e;case 1:et=ij(null,et,rt,tt,nt);break e;case 11:et=Zi(null,et,rt,tt,nt);break e;case 14:et=aj(null,et,rt,Lg(rt.type,tt),nt);break e}throw Error(p$a(306,rt,""))}return et;case 0:return rt=et.type,it=et.pendingProps,it=et.elementType===rt?it:Lg(rt,it),dj(tt,et,rt,it,nt);case 1:return rt=et.type,it=et.pendingProps,it=et.elementType===rt?it:Lg(rt,it),ij(tt,et,rt,it,nt);case 3:e:{if(lj(et),tt===null)throw Error(p$a(387));rt=et.pendingProps,ot=et.memoizedState,it=ot.element,bh(tt,et),gh(et,rt,null,nt);var at=et.memoizedState;if(rt=at.element,ot.isDehydrated)if(ot={element:rt,isDehydrated:!1,cache:at.cache,pendingSuspenseBoundaries:at.pendingSuspenseBoundaries,transitions:at.transitions},et.updateQueue.baseState=ot,et.memoizedState=ot,et.flags&256){it=Ki(Error(p$a(423)),et),et=mj(tt,et,rt,nt,it);break e}else if(rt!==it){it=Ki(Error(p$a(424)),et),et=mj(tt,et,rt,nt,it);break e}else for(yg=Lf(et.stateNode.containerInfo.firstChild),xg=et,I$4=!0,zg=null,nt=Ch$1(et,null,rt,nt),et.child=nt;nt;)nt.flags=nt.flags&-3|4096,nt=nt.sibling;else{if(Ig(),rt===it){et=$i(tt,et,nt);break e}Yi(tt,et,rt,nt)}et=et.child}return et;case 5:return Kh$1(et),tt===null&&Eg(et),rt=et.type,it=et.pendingProps,ot=tt!==null?tt.memoizedProps:null,at=it.children,Ef(rt,it)?at=null:ot!==null&&Ef(rt,ot)&&(et.flags|=32),hj(tt,et),Yi(tt,et,at,nt),et.child;case 6:return tt===null&&Eg(et),null;case 13:return pj(tt,et,nt);case 4:return Ih(et,et.stateNode.containerInfo),rt=et.pendingProps,tt===null?et.child=Bh(et,null,rt,nt):Yi(tt,et,rt,nt),et.child;case 11:return rt=et.type,it=et.pendingProps,it=et.elementType===rt?it:Lg(rt,it),Zi(tt,et,rt,it,nt);case 7:return Yi(tt,et,et.pendingProps,nt),et.child;case 8:return Yi(tt,et,et.pendingProps.children,nt),et.child;case 12:return Yi(tt,et,et.pendingProps.children,nt),et.child;case 10:e:{if(rt=et.type._context,it=et.pendingProps,ot=et.memoizedProps,at=it.value,G$3(Mg,rt._currentValue),rt._currentValue=at,ot!==null)if(He$1(ot.value,at)){if(ot.children===it.children&&!Wf.current){et=$i(tt,et,nt);break e}}else for(ot=et.child,ot!==null&&(ot.return=et);ot!==null;){var st=ot.dependencies;if(st!==null){at=ot.child;for(var lt=st.firstContext;lt!==null;){if(lt.context===rt){if(ot.tag===1){lt=ch$1(-1,nt&-nt),lt.tag=2;var ct=ot.updateQueue;if(ct!==null){ct=ct.shared;var ut=ct.pending;ut===null?lt.next=lt:(lt.next=ut.next,ut.next=lt),ct.pending=lt}}ot.lanes|=nt,lt=ot.alternate,lt!==null&&(lt.lanes|=nt),Sg(ot.return,nt,et),st.lanes|=nt;break}lt=lt.next}}else if(ot.tag===10)at=ot.type===et.type?null:ot.child;else if(ot.tag===18){if(at=ot.return,at===null)throw Error(p$a(341));at.lanes|=nt,st=at.alternate,st!==null&&(st.lanes|=nt),Sg(at,nt,et),at=ot.sibling}else at=ot.child;if(at!==null)at.return=ot;else for(at=ot;at!==null;){if(at===et){at=null;break}if(ot=at.sibling,ot!==null){ot.return=at.return,at=ot;break}at=at.return}ot=at}Yi(tt,et,it.children,nt),et=et.child}return et;case 9:return it=et.type,rt=et.pendingProps.children,Tg(et,nt),it=Vg(it),rt=rt(it),et.flags|=1,Yi(tt,et,rt,nt),et.child;case 14:return rt=et.type,it=Lg(rt,et.pendingProps),it=Lg(rt.type,it),aj(tt,et,rt,it,nt);case 15:return cj(tt,et,et.type,et.pendingProps,nt);case 17:return rt=et.type,it=et.pendingProps,it=et.elementType===rt?it:Lg(rt,it),jj(tt,et),et.tag=1,Zf(rt)?(tt=!0,cg(et)):tt=!1,Tg(et,nt),ph(et,rt,it),rh$1(et,rt,it,nt),kj(null,et,rt,!0,tt,nt);case 19:return yj(tt,et,nt);case 22:return ej(tt,et,nt)}throw Error(p$a(156,et.tag))};function Gk(tt,et){return ac(tt,et)}function al(tt,et,nt,rt){this.tag=tt,this.key=nt,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=et,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=rt,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Bg$1(tt,et,nt,rt){return new al(tt,et,nt,rt)}function bj(tt){return tt=tt.prototype,!(!tt||!tt.isReactComponent)}function $k(tt){if(typeof tt=="function")return bj(tt)?1:0;if(tt!=null){if(tt=tt.$$typeof,tt===Da)return 11;if(tt===Ga)return 14}return 2}function wh(tt,et){var nt=tt.alternate;return nt===null?(nt=Bg$1(tt.tag,et,tt.key,tt.mode),nt.elementType=tt.elementType,nt.type=tt.type,nt.stateNode=tt.stateNode,nt.alternate=tt,tt.alternate=nt):(nt.pendingProps=et,nt.type=tt.type,nt.flags=0,nt.subtreeFlags=0,nt.deletions=null),nt.flags=tt.flags&14680064,nt.childLanes=tt.childLanes,nt.lanes=tt.lanes,nt.child=tt.child,nt.memoizedProps=tt.memoizedProps,nt.memoizedState=tt.memoizedState,nt.updateQueue=tt.updateQueue,et=tt.dependencies,nt.dependencies=et===null?null:{lanes:et.lanes,firstContext:et.firstContext},nt.sibling=tt.sibling,nt.index=tt.index,nt.ref=tt.ref,nt}function yh(tt,et,nt,rt,it,ot){var at=2;if(rt=tt,typeof tt=="function")bj(tt)&&(at=1);else if(typeof tt=="string")at=5;else e:switch(tt){case ya:return Ah(nt.children,it,ot,et);case za:at=8,it|=8;break;case Aa:return tt=Bg$1(12,nt,et,it|2),tt.elementType=Aa,tt.lanes=ot,tt;case Ea:return tt=Bg$1(13,nt,et,it),tt.elementType=Ea,tt.lanes=ot,tt;case Fa:return tt=Bg$1(19,nt,et,it),tt.elementType=Fa,tt.lanes=ot,tt;case Ia:return qj(nt,it,ot,et);default:if(typeof tt=="object"&&tt!==null)switch(tt.$$typeof){case Ba:at=10;break e;case Ca:at=9;break e;case Da:at=11;break e;case Ga:at=14;break e;case Ha:at=16,rt=null;break e}throw Error(p$a(130,tt==null?tt:typeof tt,""))}return et=Bg$1(at,nt,et,it),et.elementType=tt,et.type=rt,et.lanes=ot,et}function Ah(tt,et,nt,rt){return tt=Bg$1(7,tt,rt,et),tt.lanes=nt,tt}function qj(tt,et,nt,rt){return tt=Bg$1(22,tt,rt,et),tt.elementType=Ia,tt.lanes=nt,tt.stateNode={isHidden:!1},tt}function xh(tt,et,nt){return tt=Bg$1(6,tt,null,et),tt.lanes=nt,tt}function zh(tt,et,nt){return et=Bg$1(4,tt.children!==null?tt.children:[],tt.key,et),et.lanes=nt,et.stateNode={containerInfo:tt.containerInfo,pendingChildren:null,implementation:tt.implementation},et}function bl(tt,et,nt,rt,it){this.tag=et,this.containerInfo=tt,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=zc(0),this.expirationTimes=zc(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=zc(0),this.identifierPrefix=rt,this.onRecoverableError=it,this.mutableSourceEagerHydrationData=null}function cl(tt,et,nt,rt,it,ot,at,st,lt){return tt=new bl(tt,et,nt,st,lt),et===1?(et=1,ot===!0&&(et|=8)):et=0,ot=Bg$1(3,null,null,et),tt.current=ot,ot.stateNode=tt,ot.memoizedState={element:rt,isDehydrated:nt,cache:null,transitions:null,pendingSuspenseBoundaries:null},ah(ot),tt}function dl(tt,et,nt){var rt=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(checkDCE)}catch(tt){console.error(tt)}}checkDCE(),reactDom.exports=reactDom_production_min;var reactDomExports=reactDom.exports;const ReactDOM=getDefaultExportFromCjs(reactDomExports);var createRoot$1,m$a=reactDomExports;createRoot$1=client$1.createRoot=m$a.createRoot,client$1.hydrateRoot=m$a.hydrateRoot;function _extends$u(){return _extends$u=Object.assign?Object.assign.bind():function(tt){for(var et=1;ettt.forEach(nt=>$6ed0406888f73fc4$var$setRef(nt,et))}function $6ed0406888f73fc4$export$c7b2cbe3552a0d05(...tt){return reactExports.useCallback($6ed0406888f73fc4$export$43e446d32b3d21af(...tt),tt)}const $5e63c961fc1ce211$export$8c6ed5c666ac1360=reactExports.forwardRef((tt,et)=>{const{children:nt,...rt}=tt,it=reactExports.Children.toArray(nt),ot=it.find($5e63c961fc1ce211$var$isSlottable);if(ot){const at=ot.props.children,st=it.map(lt=>lt===ot?reactExports.Children.count(at)>1?reactExports.Children.only(null):reactExports.isValidElement(at)?at.props.children:null:lt);return reactExports.createElement($5e63c961fc1ce211$var$SlotClone,_extends$u({},rt,{ref:et}),reactExports.isValidElement(at)?reactExports.cloneElement(at,void 0,st):null)}return reactExports.createElement($5e63c961fc1ce211$var$SlotClone,_extends$u({},rt,{ref:et}),nt)});$5e63c961fc1ce211$export$8c6ed5c666ac1360.displayName="Slot";const $5e63c961fc1ce211$var$SlotClone=reactExports.forwardRef((tt,et)=>{const{children:nt,...rt}=tt;return reactExports.isValidElement(nt)?reactExports.cloneElement(nt,{...$5e63c961fc1ce211$var$mergeProps(rt,nt.props),ref:et?$6ed0406888f73fc4$export$43e446d32b3d21af(et,nt.ref):nt.ref}):reactExports.Children.count(nt)>1?reactExports.Children.only(null):null});$5e63c961fc1ce211$var$SlotClone.displayName="SlotClone";const $5e63c961fc1ce211$export$d9f1ccf0bdb05d45=({children:tt})=>reactExports.createElement(reactExports.Fragment,null,tt);function $5e63c961fc1ce211$var$isSlottable(tt){return reactExports.isValidElement(tt)&&tt.type===$5e63c961fc1ce211$export$d9f1ccf0bdb05d45}function $5e63c961fc1ce211$var$mergeProps(tt,et){const nt={...et};for(const rt in et){const it=tt[rt],ot=et[rt];/^on[A-Z]/.test(rt)?it&&ot?nt[rt]=(...st)=>{ot(...st),it(...st)}:it&&(nt[rt]=it):rt==="style"?nt[rt]={...it,...ot}:rt==="className"&&(nt[rt]=[it,ot].filter(Boolean).join(" "))}return{...tt,...nt}}const $8927f6f2acc4f386$var$NODES=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],$8927f6f2acc4f386$export$250ffa63cdc0d034=$8927f6f2acc4f386$var$NODES.reduce((tt,et)=>{const nt=reactExports.forwardRef((rt,it)=>{const{asChild:ot,...at}=rt,st=ot?$5e63c961fc1ce211$export$8c6ed5c666ac1360:et;return reactExports.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),reactExports.createElement(st,_extends$u({},at,{ref:it}))});return nt.displayName=`Primitive.${et}`,{...tt,[et]:nt}},{});function $8927f6f2acc4f386$export$6d1a0317bde7de7f(tt,et){tt&&reactDomExports.flushSync(()=>tt.dispatchEvent(et))}const $f1701beae083dbae$export$602eac185826482c=reactExports.forwardRef((tt,et)=>{var nt;const{container:rt=globalThis==null||(nt=globalThis.document)===null||nt===void 0?void 0:nt.body,...it}=tt;return rt?ReactDOM.createPortal(reactExports.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div,_extends$u({},it,{ref:et})),rt):null}),$f1701beae083dbae$export$be92b6f5f03c0fe9=$f1701beae083dbae$export$602eac185826482c;var has=Object.prototype.hasOwnProperty;function dequal(tt,et){var nt,rt;if(tt===et)return!0;if(tt&&et&&(nt=tt.constructor)===et.constructor){if(nt===Date)return tt.getTime()===et.getTime();if(nt===RegExp)return tt.toString()===et.toString();if(nt===Array){if((rt=tt.length)===et.length)for(;rt--&&dequal(tt[rt],et[rt]););return rt===-1}if(!nt||typeof tt=="object"){rt=0;for(nt in tt)if(has.call(tt,nt)&&++rt&&!has.call(et,nt)||!(nt in et)||!dequal(tt[nt],et[nt]))return!1;return Object.keys(et).length===rt}}return tt!==tt&&et!==et}function shallow$2(tt,et){if(Object.is(tt,et))return!0;if(typeof tt!="object"||tt===null||typeof et!="object"||et===null)return!1;const nt=Object.keys(tt);if(nt.length!==Object.keys(et).length)return!1;for(let rt=0;rt0;)at[st]=arguments[st+4];tt.call(this,at),tt.captureStackTrace&&tt.captureStackTrace(this,et),this.rule=nt,this.value=rt,this.cause=it,this.target=ot}return tt&&(et.__proto__=tt),et.prototype=Object.create(tt&&tt.prototype),et.prototype.constructor=et,et}(Error),Context$2=function(et,nt){et===void 0&&(et=[]),nt===void 0&&(nt=[]),this.chain=et,this.nextRuleModifiers=nt};Context$2.prototype._applyRule=function(et,nt){var rt=this;return function(){for(var it=[],ot=arguments.length;ot--;)it[ot]=arguments[ot];return rt.chain.push(new Rule(nt,et.apply(rt,it),it,rt.nextRuleModifiers)),rt.nextRuleModifiers=[],rt}};Context$2.prototype._applyModifier=function(et,nt){return this.nextRuleModifiers.push(new Modifier(nt,et.simple,et.async)),this};Context$2.prototype._clone=function(){return new Context$2(this.chain.slice(),this.nextRuleModifiers.slice())};Context$2.prototype.test=function(et){return this.chain.every(function(nt){return nt._test(et)})};Context$2.prototype.testAll=function(et){var nt=[];return this.chain.forEach(function(rt){try{rt._check(et)}catch(it){nt.push(new ValidationError(rt,et,it))}}),nt};Context$2.prototype.check=function(et){this.chain.forEach(function(nt){try{nt._check(et)}catch(rt){throw new ValidationError(nt,et,rt)}})};Context$2.prototype.testAsync=function(et){var nt=this;return new Promise(function(rt,it){executeAsyncRules(et,nt.chain.slice(),rt,it)})};function executeAsyncRules(tt,et,nt,rt){if(et.length){var it=et.shift();it._testAsync(tt).then(function(){executeAsyncRules(tt,et,nt,rt)},function(ot){rt(new ValidationError(it,tt,ot))})}else nt(tt)}var consideredEmpty=function(tt,et){return et&&typeof tt=="string"&&tt.trim().length===0?!0:tt==null};function optional(tt,et){return et===void 0&&(et=!1),{simple:function(nt){return consideredEmpty(nt,et)||tt.check(nt)===void 0},async:function(nt){return consideredEmpty(nt,et)||tt.testAsync(nt)}}}function v8n(){return typeof Proxy<"u"?proxyContext(new Context$2):proxylessContext(new Context$2)}var customRules={};v8n.extend=function(tt){Object.assign(customRules,tt)};v8n.clearCustomRules=function(){customRules={}};function proxyContext(tt){return new Proxy(tt,{get:function(nt,rt){if(rt in nt)return nt[rt];var it=proxyContext(tt._clone());if(rt in availableModifiers)return it._applyModifier(availableModifiers[rt],rt);if(rt in customRules)return it._applyRule(customRules[rt],rt);if(rt in availableRules)return it._applyRule(availableRules[rt],rt)}})}function proxylessContext(tt){var et=function(it,ot){return Object.keys(it).forEach(function(at){ot[at]=function(){for(var st=[],lt=arguments.length;lt--;)st[lt]=arguments[lt];var ct=proxylessContext(ot._clone()),ut=ct._applyRule(it[at],at).apply(void 0,st);return ut}}),ot},nt=et(availableRules,tt),rt=et(customRules,nt);return Object.keys(availableModifiers).forEach(function(it){Object.defineProperty(rt,it,{get:function(){var ot=proxylessContext(rt._clone());return ot._applyModifier(availableModifiers[it],it)}})}),rt}var availableModifiers={not:{simple:function(tt){return function(et){return!tt(et)}},async:function(tt){return function(et){return Promise.resolve(tt(et)).then(function(nt){return!nt}).catch(function(){return!0})}}},some:{simple:function(tt){return function(et){return split$1(et).some(function(nt){try{return tt(nt)}catch{return!1}})}},async:function(tt){return function(et){return Promise.all(split$1(et).map(function(nt){try{return tt(nt).catch(function(){return!1})}catch{return!1}})).then(function(nt){return nt.some(Boolean)})}}},every:{simple:function(tt){return function(et){return et!==!1&&split$1(et).every(tt)}},async:function(tt){return function(et){return Promise.all(split$1(et).map(tt)).then(function(nt){return nt.every(Boolean)})}}},strict:{simple:function(tt,et){return function(nt){return isSchemaRule(et)&&nt&&typeof nt=="object"?Object.keys(et.args[0]).length===Object.keys(nt).length&&tt(nt):tt(nt)}},async:function(tt,et){return function(nt){return Promise.resolve(tt(nt)).then(function(rt){return isSchemaRule(et)&&nt&&typeof nt=="object"?Object.keys(et.args[0]).length===Object.keys(nt).length&&rt:rt}).catch(function(){return!1})}}}};function isSchemaRule(tt){return tt&&tt.name==="schema"&&tt.args.length>0&&typeof tt.args[0]=="object"}function split$1(tt){return typeof tt=="string"?tt.split(""):tt}var availableRules={equal:function(tt){return function(et){return et==tt}},exact:function(tt){return function(et){return et===tt}},number:function(tt){return tt===void 0&&(tt=!0),function(et){return typeof et=="number"&&(tt||isFinite(et))}},integer:function(){return function(tt){var et=Number.isInteger||isIntegerPolyfill;return et(tt)}},numeric:function(){return function(tt){return!isNaN(parseFloat(tt))&&isFinite(tt)}},string:function(){return testType("string")},boolean:function(){return testType("boolean")},undefined:function(){return testType("undefined")},null:function(){return testType("null")},array:function(){return testType("array")},object:function(){return testType("object")},instanceOf:function(tt){return function(et){return et instanceof tt}},pattern:function(tt){return function(et){return tt.test(et)}},lowercase:function(){return function(tt){return typeof tt=="boolean"||tt===tt.toLowerCase()&&tt.trim()!==""}},uppercase:function(){return function(tt){return tt===tt.toUpperCase()&&tt.trim()!==""}},vowel:function(){return function(tt){return/^[aeiou]+$/i.test(tt)}},consonant:function(){return function(tt){return/^(?=[^aeiou])([a-z]+)$/i.test(tt)}},first:function(tt){return function(et){return et[0]==tt}},last:function(tt){return function(et){return et[et.length-1]==tt}},empty:function(){return function(tt){return tt.length===0}},length:function(tt,et){return function(nt){return nt.length>=tt&&nt.length<=(et||tt)}},minLength:function(tt){return function(et){return et.length>=tt}},maxLength:function(tt){return function(et){return et.length<=tt}},negative:function(){return function(tt){return tt<0}},positive:function(){return function(tt){return tt>=0}},between:function(tt,et){return function(nt){return nt>=tt&&nt<=et}},range:function(tt,et){return function(nt){return nt>=tt&&nt<=et}},lessThan:function(tt){return function(et){return ettt}},greaterThanOrEqual:function(tt){return function(et){return et>=tt}},even:function(){return function(tt){return tt%2===0}},odd:function(){return function(tt){return tt%2!==0}},includes:function(tt){return function(et){return~et.indexOf(tt)}},schema:function(tt){return testSchema(tt)},passesAnyOf:function(){for(var tt=[],et=arguments.length;et--;)tt[et]=arguments[et];return function(nt){return tt.some(function(rt){return rt.test(nt)})}},optional};function testType(tt){return function(et){return Array.isArray(et)&&tt==="array"||et===null&&tt==="null"||typeof et===tt}}function isIntegerPolyfill(tt){return typeof tt=="number"&&isFinite(tt)&&Math.floor(tt)===tt}function testSchema(tt){return{simple:function(et){var nt=[];if(Object.keys(tt).forEach(function(rt){var it=tt[rt];try{it.check((et||{})[rt])}catch(ot){ot.target=rt,nt.push(ot)}}),nt.length>0)throw nt;return!0},async:function(et){var nt=[],rt=Object.keys(tt).map(function(it){var ot=tt[it];return ot.testAsync((et||{})[it]).catch(function(at){at.target=it,nt.push(at)})});return Promise.all(rt).then(function(){if(nt.length>0)throw nt;return!0})}}}var e$6="colors",t$7="sizes",r$c="space",n$7={gap:r$c,gridGap:r$c,columnGap:r$c,gridColumnGap:r$c,rowGap:r$c,gridRowGap:r$c,inset:r$c,insetBlock:r$c,insetBlockEnd:r$c,insetBlockStart:r$c,insetInline:r$c,insetInlineEnd:r$c,insetInlineStart:r$c,margin:r$c,marginTop:r$c,marginRight:r$c,marginBottom:r$c,marginLeft:r$c,marginBlock:r$c,marginBlockEnd:r$c,marginBlockStart:r$c,marginInline:r$c,marginInlineEnd:r$c,marginInlineStart:r$c,padding:r$c,paddingTop:r$c,paddingRight:r$c,paddingBottom:r$c,paddingLeft:r$c,paddingBlock:r$c,paddingBlockEnd:r$c,paddingBlockStart:r$c,paddingInline:r$c,paddingInlineEnd:r$c,paddingInlineStart:r$c,top:r$c,right:r$c,bottom:r$c,left:r$c,scrollMargin:r$c,scrollMarginTop:r$c,scrollMarginRight:r$c,scrollMarginBottom:r$c,scrollMarginLeft:r$c,scrollMarginX:r$c,scrollMarginY:r$c,scrollMarginBlock:r$c,scrollMarginBlockEnd:r$c,scrollMarginBlockStart:r$c,scrollMarginInline:r$c,scrollMarginInlineEnd:r$c,scrollMarginInlineStart:r$c,scrollPadding:r$c,scrollPaddingTop:r$c,scrollPaddingRight:r$c,scrollPaddingBottom:r$c,scrollPaddingLeft:r$c,scrollPaddingX:r$c,scrollPaddingY:r$c,scrollPaddingBlock:r$c,scrollPaddingBlockEnd:r$c,scrollPaddingBlockStart:r$c,scrollPaddingInline:r$c,scrollPaddingInlineEnd:r$c,scrollPaddingInlineStart:r$c,fontSize:"fontSizes",background:e$6,backgroundColor:e$6,backgroundImage:e$6,borderImage:e$6,border:e$6,borderBlock:e$6,borderBlockEnd:e$6,borderBlockStart:e$6,borderBottom:e$6,borderBottomColor:e$6,borderColor:e$6,borderInline:e$6,borderInlineEnd:e$6,borderInlineStart:e$6,borderLeft:e$6,borderLeftColor:e$6,borderRight:e$6,borderRightColor:e$6,borderTop:e$6,borderTopColor:e$6,caretColor:e$6,color:e$6,columnRuleColor:e$6,fill:e$6,outline:e$6,outlineColor:e$6,stroke:e$6,textDecorationColor:e$6,fontFamily:"fonts",fontWeight:"fontWeights",lineHeight:"lineHeights",letterSpacing:"letterSpacings",blockSize:t$7,minBlockSize:t$7,maxBlockSize:t$7,inlineSize:t$7,minInlineSize:t$7,maxInlineSize:t$7,width:t$7,minWidth:t$7,maxWidth:t$7,height:t$7,minHeight:t$7,maxHeight:t$7,flexBasis:t$7,gridTemplateColumns:t$7,gridTemplateRows:t$7,borderWidth:"borderWidths",borderTopWidth:"borderWidths",borderRightWidth:"borderWidths",borderBottomWidth:"borderWidths",borderLeftWidth:"borderWidths",borderStyle:"borderStyles",borderTopStyle:"borderStyles",borderRightStyle:"borderStyles",borderBottomStyle:"borderStyles",borderLeftStyle:"borderStyles",borderRadius:"radii",borderTopLeftRadius:"radii",borderTopRightRadius:"radii",borderBottomRightRadius:"radii",borderBottomLeftRadius:"radii",boxShadow:"shadows",textShadow:"shadows",transition:"transitions",zIndex:"zIndices"},i$7=(tt,et)=>typeof et=="function"?{"()":Function.prototype.toString.call(et)}:et,o$2=()=>{const tt=Object.create(null);return(et,nt,...rt)=>{const it=(ot=>JSON.stringify(ot,i$7))(et);return it in tt?tt[it]:tt[it]=nt(et,...rt)}},l$6=Symbol.for("sxs.internal"),s$5=(tt,et)=>Object.defineProperties(tt,Object.getOwnPropertyDescriptors(et)),a$4=tt=>{for(const et in tt)return!0;return!1},{hasOwnProperty:c$9}=Object.prototype,d$6=tt=>tt.includes("-")?tt:tt.replace(/[A-Z]/g,et=>"-"+et.toLowerCase()),g$9=/\s+(?![^()]*\))/,p$9=tt=>et=>tt(...typeof et=="string"?String(et).split(g$9):[et]),u$6={appearance:tt=>({WebkitAppearance:tt,appearance:tt}),backfaceVisibility:tt=>({WebkitBackfaceVisibility:tt,backfaceVisibility:tt}),backdropFilter:tt=>({WebkitBackdropFilter:tt,backdropFilter:tt}),backgroundClip:tt=>({WebkitBackgroundClip:tt,backgroundClip:tt}),boxDecorationBreak:tt=>({WebkitBoxDecorationBreak:tt,boxDecorationBreak:tt}),clipPath:tt=>({WebkitClipPath:tt,clipPath:tt}),content:tt=>({content:tt.includes('"')||tt.includes("'")||/^([A-Za-z]+\([^]*|[^]*-quote|inherit|initial|none|normal|revert|unset)$/.test(tt)?tt:`"${tt}"`}),hyphens:tt=>({WebkitHyphens:tt,hyphens:tt}),maskImage:tt=>({WebkitMaskImage:tt,maskImage:tt}),maskSize:tt=>({WebkitMaskSize:tt,maskSize:tt}),tabSize:tt=>({MozTabSize:tt,tabSize:tt}),textSizeAdjust:tt=>({WebkitTextSizeAdjust:tt,textSizeAdjust:tt}),userSelect:tt=>({WebkitUserSelect:tt,userSelect:tt}),marginBlock:p$9((tt,et)=>({marginBlockStart:tt,marginBlockEnd:et||tt})),marginInline:p$9((tt,et)=>({marginInlineStart:tt,marginInlineEnd:et||tt})),maxSize:p$9((tt,et)=>({maxBlockSize:tt,maxInlineSize:et||tt})),minSize:p$9((tt,et)=>({minBlockSize:tt,minInlineSize:et||tt})),paddingBlock:p$9((tt,et)=>({paddingBlockStart:tt,paddingBlockEnd:et||tt})),paddingInline:p$9((tt,et)=>({paddingInlineStart:tt,paddingInlineEnd:et||tt}))},h$a=/([\d.]+)([^]*)/,f$8=(tt,et)=>tt.length?tt.reduce((nt,rt)=>(nt.push(...et.map(it=>it.includes("&")?it.replace(/&/g,/[ +>|~]/.test(rt)&&/&.*&/.test(it)?`:is(${rt})`:rt):rt+" "+it)),nt),[]):et,m$9=(tt,et)=>tt in b$7&&typeof et=="string"?et.replace(/^((?:[^]*[^\w-])?)(fit-content|stretch)((?:[^\w-][^]*)?)$/,(nt,rt,it,ot)=>rt+(it==="stretch"?`-moz-available${ot};${d$6(tt)}:${rt}-webkit-fill-available`:`-moz-fit-content${ot};${d$6(tt)}:${rt}fit-content`)+ot):String(et),b$7={blockSize:1,height:1,inlineSize:1,maxBlockSize:1,maxHeight:1,maxInlineSize:1,maxWidth:1,minBlockSize:1,minHeight:1,minInlineSize:1,minWidth:1,width:1},S$3=tt=>tt?tt+"-":"",k$9=(tt,et,nt)=>tt.replace(/([+-])?((?:\d+(?:\.\d*)?|\.\d+)(?:[Ee][+-]?\d+)?)?(\$|--)([$\w-]+)/g,(rt,it,ot,at,st)=>at=="$"==!!ot?rt:(it||at=="--"?"calc(":"")+"var(--"+(at==="$"?S$3(et)+(st.includes("$")?"":S$3(nt))+st.replace(/\$/g,"-"):st)+")"+(it||at=="--"?"*"+(it||"")+(ot||"1")+")":"")),y$8=/\s*,\s*(?![^()]*\))/,B$1=Object.prototype.toString,$$3=(tt,et,nt,rt,it)=>{let ot,at,st;const lt=(ct,ut,ht)=>{let dt,pt;const mt=gt=>{for(dt in gt){const vt=dt.charCodeAt(0)===64,xt=vt&&Array.isArray(gt[dt])?gt[dt]:[gt[dt]];for(pt of xt){const kt=/[A-Z]/.test(bt=dt)?bt:bt.replace(/-[^]/g,Tt=>Tt[1].toUpperCase()),St=typeof pt=="object"&&pt&&pt.toString===B$1&&(!rt.utils[kt]||!ut.length);if(kt in rt.utils&&!St){const Tt=rt.utils[kt];if(Tt!==at){at=Tt,mt(Tt(pt)),at=null;continue}}else if(kt in u$6){const Tt=u$6[kt];if(Tt!==st){st=Tt,mt(Tt(pt)),st=null;continue}}if(vt&&(yt=dt.slice(1)in rt.media?"@media "+rt.media[dt.slice(1)]:dt,dt=yt.replace(/\(\s*([\w-]+)\s*(=|<|<=|>|>=)\s*([\w-]+)\s*(?:(<|<=|>|>=)\s*([\w-]+)\s*)?\)/g,(Tt,At,Et,$t,Dt,jt)=>{const Pt=h$a.test(At),Ct=.0625*(Pt?-1:1),[wt,It]=Pt?[$t,At]:[At,$t];return"("+(Et[0]==="="?"":Et[0]===">"===Pt?"max-":"min-")+wt+":"+(Et[0]!=="="&&Et.length===1?It.replace(h$a,(Ot,Wt,zt)=>Number(Wt)+Ct*(Et===">"?1:-1)+zt):It)+(Dt?") and ("+(Dt[0]===">"?"min-":"max-")+wt+":"+(Dt.length===1?jt.replace(h$a,(Ot,Wt,zt)=>Number(Wt)+Ct*(Dt===">"?-1:1)+zt):jt):"")+")"})),St){const Tt=vt?ht.concat(dt):[...ht],At=vt?[...ut]:f$8(ut,dt.split(y$8));ot!==void 0&&it(x$8(...ot)),ot=void 0,lt(pt,At,Tt)}else ot===void 0&&(ot=[[],ut,ht]),dt=vt||dt.charCodeAt(0)!==36?dt:`--${S$3(rt.prefix)}${dt.slice(1).replace(/\$/g,"-")}`,pt=St?pt:typeof pt=="number"?pt&&kt in I$3?String(pt)+"px":String(pt):k$9(m$9(kt,pt??""),rt.prefix,rt.themeMap[kt]),ot[0].push(`${vt?`${dt} `:`${d$6(dt)}:`}${pt}`)}}var yt,bt};mt(ct),ot!==void 0&&it(x$8(...ot)),ot=void 0};lt(tt,et,nt)},x$8=(tt,et,nt)=>`${nt.map(rt=>`${rt}{`).join("")}${et.length?`${et.join(",")}{`:""}${tt.join(";")}${et.length?"}":""}${Array(nt.length?nt.length+1:0).join("}")}`,I$3={animationDelay:1,animationDuration:1,backgroundSize:1,blockSize:1,border:1,borderBlock:1,borderBlockEnd:1,borderBlockEndWidth:1,borderBlockStart:1,borderBlockStartWidth:1,borderBlockWidth:1,borderBottom:1,borderBottomLeftRadius:1,borderBottomRightRadius:1,borderBottomWidth:1,borderEndEndRadius:1,borderEndStartRadius:1,borderInlineEnd:1,borderInlineEndWidth:1,borderInlineStart:1,borderInlineStartWidth:1,borderInlineWidth:1,borderLeft:1,borderLeftWidth:1,borderRadius:1,borderRight:1,borderRightWidth:1,borderSpacing:1,borderStartEndRadius:1,borderStartStartRadius:1,borderTop:1,borderTopLeftRadius:1,borderTopRightRadius:1,borderTopWidth:1,borderWidth:1,bottom:1,columnGap:1,columnRule:1,columnRuleWidth:1,columnWidth:1,containIntrinsicSize:1,flexBasis:1,fontSize:1,gap:1,gridAutoColumns:1,gridAutoRows:1,gridTemplateColumns:1,gridTemplateRows:1,height:1,inlineSize:1,inset:1,insetBlock:1,insetBlockEnd:1,insetBlockStart:1,insetInline:1,insetInlineEnd:1,insetInlineStart:1,left:1,letterSpacing:1,margin:1,marginBlock:1,marginBlockEnd:1,marginBlockStart:1,marginBottom:1,marginInline:1,marginInlineEnd:1,marginInlineStart:1,marginLeft:1,marginRight:1,marginTop:1,maxBlockSize:1,maxHeight:1,maxInlineSize:1,maxWidth:1,minBlockSize:1,minHeight:1,minInlineSize:1,minWidth:1,offsetDistance:1,offsetRotate:1,outline:1,outlineOffset:1,outlineWidth:1,overflowClipMargin:1,padding:1,paddingBlock:1,paddingBlockEnd:1,paddingBlockStart:1,paddingBottom:1,paddingInline:1,paddingInlineEnd:1,paddingInlineStart:1,paddingLeft:1,paddingRight:1,paddingTop:1,perspective:1,right:1,rowGap:1,scrollMargin:1,scrollMarginBlock:1,scrollMarginBlockEnd:1,scrollMarginBlockStart:1,scrollMarginBottom:1,scrollMarginInline:1,scrollMarginInlineEnd:1,scrollMarginInlineStart:1,scrollMarginLeft:1,scrollMarginRight:1,scrollMarginTop:1,scrollPadding:1,scrollPaddingBlock:1,scrollPaddingBlockEnd:1,scrollPaddingBlockStart:1,scrollPaddingBottom:1,scrollPaddingInline:1,scrollPaddingInlineEnd:1,scrollPaddingInlineStart:1,scrollPaddingLeft:1,scrollPaddingRight:1,scrollPaddingTop:1,shapeMargin:1,textDecoration:1,textDecorationThickness:1,textIndent:1,textUnderlineOffset:1,top:1,transitionDelay:1,transitionDuration:1,verticalAlign:1,width:1,wordSpacing:1},R$1=tt=>String.fromCharCode(tt+(tt>25?39:97)),z$6=tt=>(et=>{let nt,rt="";for(nt=Math.abs(et);nt>52;nt=nt/52|0)rt=R$1(nt%52)+rt;return R$1(nt%52)+rt})(((et,nt)=>{let rt=nt.length;for(;rt;)et=33*et^nt.charCodeAt(--rt);return et})(5381,JSON.stringify(tt))>>>0),W$7=["themed","global","styled","onevar","resonevar","allvar","inline"],j$2=tt=>{if(tt.href&&!tt.href.startsWith(location.origin))return!1;try{return!!tt.cssRules}catch{return!1}},E$1=tt=>{let et;const nt=()=>{const{cssRules:it}=et.sheet;return[].map.call(it,(ot,at)=>{const{cssText:st}=ot;let lt="";if(st.startsWith("--sxs"))return"";if(it[at-1]&&(lt=it[at-1].cssText).startsWith("--sxs")){if(!ot.cssRules.length)return"";for(const ct in et.rules)if(et.rules[ct].group===ot)return`--sxs{--sxs:${[...et.rules[ct].cache].join(" ")}}${st}`;return ot.cssRules.length?`${lt}${st}`:""}return st}).join("")},rt=()=>{if(et){const{rules:st,sheet:lt}=et;if(!lt.deleteRule){for(;Object(Object(lt.cssRules)[0]).type===3;)lt.cssRules.splice(0,1);lt.cssRules=[]}for(const ct in st)delete st[ct]}const it=Object(tt).styleSheets||[];for(const st of it)if(j$2(st)){for(let lt=0,ct=st.cssRules;ct[lt];++lt){const ut=Object(ct[lt]);if(ut.type!==1)continue;const ht=Object(ct[lt+1]);if(ht.type!==4)continue;++lt;const{cssText:dt}=ut;if(!dt.startsWith("--sxs"))continue;const pt=dt.slice(14,-3).trim().split(/\s+/),mt=W$7[pt[0]];mt&&(et||(et={sheet:st,reset:rt,rules:{},toString:nt}),et.rules[mt]={group:ht,index:lt,cache:new Set(pt)})}if(et)break}if(!et){const st=(lt,ct)=>({type:ct,cssRules:[],insertRule(ut,ht){this.cssRules.splice(ht,0,st(ut,{import:3,undefined:1}[(ut.toLowerCase().match(/^@([a-z]+)/)||[])[1]]||4))},get cssText(){return lt==="@media{}"?`@media{${[].map.call(this.cssRules,ut=>ut.cssText).join("")}}`:lt}});et={sheet:tt?(tt.head||tt).appendChild(document.createElement("style")).sheet:st("","text/css"),rules:{},reset:rt,toString:nt}}const{sheet:ot,rules:at}=et;for(let st=W$7.length-1;st>=0;--st){const lt=W$7[st];if(!at[lt]){const ct=W$7[st+1],ut=at[ct]?at[ct].index:ot.cssRules.length;ot.insertRule("@media{}",ut),ot.insertRule(`--sxs{--sxs:${st}}`,ut),at[lt]={group:ot.cssRules[ut+1],index:ut,cache:new Set([st])}}v$9(at[lt])}};return rt(),et},v$9=tt=>{const et=tt.group;let nt=et.cssRules.length;tt.apply=rt=>{try{et.insertRule(rt,nt),++nt}catch{}}},T$2=Symbol(),w$6=o$2(),M$2=(tt,et)=>w$6(tt,()=>(...nt)=>{let rt={type:null,composers:new Set};for(const it of nt)if(it!=null)if(it[l$6]){rt.type==null&&(rt.type=it[l$6].type);for(const ot of it[l$6].composers)rt.composers.add(ot)}else it.constructor!==Object||it.$$typeof?rt.type==null&&(rt.type=it):rt.composers.add(C$1(it,tt));return rt.type==null&&(rt.type="span"),rt.composers.size||rt.composers.add(["PJLV",{},[],[],{},[]]),P$3(tt,rt,et)}),C$1=({variants:tt,compoundVariants:et,defaultVariants:nt,...rt},it)=>{const ot=`${S$3(it.prefix)}c-${z$6(rt)}`,at=[],st=[],lt=Object.create(null),ct=[];for(const dt in nt)lt[dt]=String(nt[dt]);if(typeof tt=="object"&&tt)for(const dt in tt){ut=lt,ht=dt,c$9.call(ut,ht)||(lt[dt]="undefined");const pt=tt[dt];for(const mt in pt){const gt={[dt]:String(mt)};String(mt)==="undefined"&&ct.push(dt);const yt=pt[mt],bt=[gt,yt,!a$4(yt)];at.push(bt)}}var ut,ht;if(typeof et=="object"&&et)for(const dt of et){let{css:pt,...mt}=dt;pt=typeof pt=="object"&&pt||{};for(const yt in mt)mt[yt]=String(mt[yt]);const gt=[mt,pt,!a$4(pt)];st.push(gt)}return[ot,rt,at,st,lt,ct]},P$3=(tt,et,nt)=>{const[rt,it,ot,at]=L$2(et.composers),st=typeof et.type=="function"||et.type.$$typeof?(ht=>{function dt(){for(let pt=0;ptdt.rules[pt]={apply:mt=>dt[T$2].push([pt,mt])}),dt})(nt):null,lt=(st||nt).rules,ct=`.${rt}${it.length>1?`:where(.${it.slice(1).join(".")})`:""}`,ut=ht=>{ht=typeof ht=="object"&&ht||A$2;const{css:dt,...pt}=ht,mt={};for(const bt in ot)if(delete pt[bt],bt in ht){let vt=ht[bt];typeof vt=="object"&&vt?mt[bt]={"@initial":ot[bt],...vt}:(vt=String(vt),mt[bt]=vt!=="undefined"||at.has(bt)?vt:ot[bt])}else mt[bt]=ot[bt];const gt=new Set([...it]);for(const[bt,vt,xt,kt]of et.composers){nt.rules.styled.cache.has(bt)||(nt.rules.styled.cache.add(bt),$$3(vt,[`.${bt}`],[],tt,At=>{lt.styled.apply(At)}));const St=O(xt,mt,tt.media),Tt=O(kt,mt,tt.media,!0);for(const At of St)if(At!==void 0)for(const[Et,$t,Dt]of At){const jt=`${bt}-${z$6($t)}-${Et}`;gt.add(jt);const Pt=(Dt?nt.rules.resonevar:nt.rules.onevar).cache,Ct=Dt?lt.resonevar:lt.onevar;Pt.has(jt)||(Pt.add(jt),$$3($t,[`.${jt}`],[],tt,wt=>{Ct.apply(wt)}))}for(const At of Tt)if(At!==void 0)for(const[Et,$t]of At){const Dt=`${bt}-${z$6($t)}-${Et}`;gt.add(Dt),nt.rules.allvar.cache.has(Dt)||(nt.rules.allvar.cache.add(Dt),$$3($t,[`.${Dt}`],[],tt,jt=>{lt.allvar.apply(jt)}))}}if(typeof dt=="object"&&dt){const bt=`${rt}-i${z$6(dt)}-css`;gt.add(bt),nt.rules.inline.cache.has(bt)||(nt.rules.inline.cache.add(bt),$$3(dt,[`.${bt}`],[],tt,vt=>{lt.inline.apply(vt)}))}for(const bt of String(ht.className||"").trim().split(/\s+/))bt&>.add(bt);const yt=pt.className=[...gt].join(" ");return{type:et.type,className:yt,selector:ct,props:pt,toString:()=>yt,deferredInjector:st}};return s$5(ut,{className:rt,selector:ct,[l$6]:et,toString:()=>(nt.rules.styled.cache.has(rt)||ut(),rt)})},L$2=tt=>{let et="";const nt=[],rt={},it=[];for(const[ot,,,,at,st]of tt){et===""&&(et=ot),nt.push(ot),it.push(...st);for(const lt in at){const ct=at[lt];(rt[lt]===void 0||ct!=="undefined"||st.includes(ct))&&(rt[lt]=ct)}}return[et,nt,rt,new Set(it)]},O=(tt,et,nt,rt)=>{const it=[];e:for(let[ot,at,st]of tt){if(st)continue;let lt,ct=0,ut=!1;for(lt in ot){const ht=ot[lt];let dt=et[lt];if(dt!==ht){if(typeof dt!="object"||!dt)continue e;{let pt,mt,gt=0;for(const yt in dt){if(ht===String(dt[yt])){if(yt!=="@initial"){const bt=yt.slice(1);(mt=mt||[]).push(bt in nt?nt[bt]:yt.replace(/^@media ?/,"")),ut=!0}ct+=gt,pt=!0}++gt}if(mt&&mt.length&&(at={["@media "+mt.join(", ")]:at}),!pt)continue e}}}(it[ct]=it[ct]||[]).push([rt?"cv":`${lt}-${ot[lt]}`,at,ut])}return it},A$2={},N$2=o$2(),D$1=(tt,et)=>N$2(tt,()=>(...nt)=>{const rt=()=>{for(let it of nt){it=typeof it=="object"&&it||{};let ot=z$6(it);if(!et.rules.global.cache.has(ot)){if(et.rules.global.cache.add(ot),"@import"in it){let at=[].indexOf.call(et.sheet.cssRules,et.rules.themed.group)-1;for(let st of[].concat(it["@import"]))st=st.includes('"')||st.includes("'")?st:`"${st}"`,et.sheet.insertRule(`@import ${st};`,at++);delete it["@import"]}$$3(it,[],[],tt,at=>{et.rules.global.apply(at)})}}return""};return s$5(rt,{toString:rt})}),H$2=o$2(),V$3=(tt,et)=>H$2(tt,()=>nt=>{const rt=`${S$3(tt.prefix)}k-${z$6(nt)}`,it=()=>{if(!et.rules.global.cache.has(rt)){et.rules.global.cache.add(rt);const ot=[];$$3(nt,[],[],tt,st=>ot.push(st));const at=`@keyframes ${rt}{${ot.join("")}}`;et.rules.global.apply(at)}return rt};return s$5(it,{get name(){return it()},toString:it})}),G$2=class{constructor(et,nt,rt,it){this.token=et==null?"":String(et),this.value=nt==null?"":String(nt),this.scale=rt==null?"":String(rt),this.prefix=it==null?"":String(it)}get computedValue(){return"var("+this.variable+")"}get variable(){return"--"+S$3(this.prefix)+S$3(this.scale)+this.token}toString(){return this.computedValue}},F$2=o$2(),J$2=(tt,et)=>F$2(tt,()=>(nt,rt)=>{rt=typeof nt=="object"&&nt||Object(rt);const it=`.${nt=(nt=typeof nt=="string"?nt:"")||`${S$3(tt.prefix)}t-${z$6(rt)}`}`,ot={},at=[];for(const lt in rt){ot[lt]={};for(const ct in rt[lt]){const ut=`--${S$3(tt.prefix)}${lt}-${ct}`,ht=k$9(String(rt[lt][ct]),tt.prefix,lt);ot[lt][ct]=new G$2(ct,ht,lt,tt.prefix),at.push(`${ut}:${ht}`)}}const st=()=>{if(at.length&&!et.rules.themed.cache.has(nt)){et.rules.themed.cache.add(nt);const lt=`${rt===tt.theme?":root,":""}.${nt}{${at.join(";")}}`;et.rules.themed.apply(lt)}return nt};return{...ot,get className(){return st()},selector:it,toString:st}}),U$2=o$2(),X$1,Y$2=o$2(),q$7=tt=>{const et=(nt=>{let rt=!1;const it=U$2(nt,ot=>{rt=!0;const at="prefix"in(ot=typeof ot=="object"&&ot||{})?String(ot.prefix):"",st=typeof ot.media=="object"&&ot.media||{},lt=typeof ot.root=="object"?ot.root||null:globalThis.document||null,ct=typeof ot.theme=="object"&&ot.theme||{},ut={prefix:at,media:st,theme:ct,themeMap:typeof ot.themeMap=="object"&&ot.themeMap||{...n$7},utils:typeof ot.utils=="object"&&ot.utils||{}},ht=E$1(lt),dt={css:M$2(ut,ht),globalCss:D$1(ut,ht),keyframes:V$3(ut,ht),createTheme:J$2(ut,ht),reset(){ht.reset(),dt.theme.toString()},theme:{},sheet:ht,config:ut,prefix:at,getCssText:ht.toString,toString:ht.toString};return String(dt.theme=dt.createTheme(ct)),dt});return rt||it.reset(),it})(tt);return et.styled=(({config:nt,sheet:rt})=>Y$2(nt,()=>{const it=M$2(nt,rt);return(...ot)=>{const at=it(...ot),st=at[l$6].type,lt=React$1.forwardRef((ct,ut)=>{const ht=ct&&ct.as||st,{props:dt,deferredInjector:pt}=at(ct);return delete dt.as,dt.ref=ut,pt?React$1.createElement(React$1.Fragment,null,React$1.createElement(ht,dt),React$1.createElement(pt,null)):React$1.createElement(ht,dt)});return lt.className=at.className,lt.displayName=`Styled.${st.displayName||st.name||st}`,lt.selector=at.selector,lt.toString=()=>at.selector,lt[l$6]=at[l$6],lt}}))(et),et},K$6=()=>X$1||(X$1=q$7()),re$4=(...tt)=>K$6().styled(...tt);function clamp$a(tt,et,nt){return Math.max(et,Math.min(tt,nt))}const V$2={toVector(tt,et){return tt===void 0&&(tt=et),Array.isArray(tt)?tt:[tt,tt]},add(tt,et){return[tt[0]+et[0],tt[1]+et[1]]},sub(tt,et){return[tt[0]-et[0],tt[1]-et[1]]},addTo(tt,et){tt[0]+=et[0],tt[1]+=et[1]},subTo(tt,et){tt[0]-=et[0],tt[1]-=et[1]}};function rubberband(tt,et,nt){return et===0||Math.abs(et)===1/0?Math.pow(tt,nt*5):tt*et*nt/(et+nt*tt)}function rubberbandIfOutOfBounds(tt,et,nt,rt=.15){return rt===0?clamp$a(tt,et,nt):ttnt?+rubberband(tt-nt,nt-et,rt)+nt:tt}function computeRubberband(tt,[et,nt],[rt,it]){const[[ot,at],[st,lt]]=tt;return[rubberbandIfOutOfBounds(et,ot,at,rt),rubberbandIfOutOfBounds(nt,st,lt,it)]}function _toPrimitive$C(tt,et){if(typeof tt!="object"||tt===null)return tt;var nt=tt[Symbol.toPrimitive];if(nt!==void 0){var rt=nt.call(tt,et||"default");if(typeof rt!="object")return rt;throw new TypeError("@@toPrimitive must return a primitive value.")}return(et==="string"?String:Number)(tt)}function _toPropertyKey$C(tt){var et=_toPrimitive$C(tt,"string");return typeof et=="symbol"?et:String(et)}function _defineProperty$H(tt,et,nt){return et=_toPropertyKey$C(et),et in tt?Object.defineProperty(tt,et,{value:nt,enumerable:!0,configurable:!0,writable:!0}):tt[et]=nt,tt}function ownKeys$F(tt,et){var nt=Object.keys(tt);if(Object.getOwnPropertySymbols){var rt=Object.getOwnPropertySymbols(tt);et&&(rt=rt.filter(function(it){return Object.getOwnPropertyDescriptor(tt,it).enumerable})),nt.push.apply(nt,rt)}return nt}function _objectSpread2$2(tt){for(var et=1;et{var nt,rt;return et.target===tt.currentTarget||((nt=tt.currentTarget)===null||nt===void 0||(rt=nt.contains)===null||rt===void 0?void 0:rt.call(nt,et.target))})}function getTouchList(tt){return tt.type==="touchend"||tt.type==="touchcancel"?tt.changedTouches:tt.targetTouches}function getValueEvent(tt){return isTouch$1(tt)?getTouchList(tt)[0]:tt}function touchIds(tt){return getCurrentTargetTouchList(tt).map(et=>et.identifier)}function pointerId(tt){const et=getValueEvent(tt);return isTouch$1(tt)?et.identifier:et.pointerId}function pointerValues(tt){const et=getValueEvent(tt);return[et.clientX,et.clientY]}function getEventDetails(tt){const et={};if("buttons"in tt&&(et.buttons=tt.buttons),"shiftKey"in tt){const{shiftKey:nt,altKey:rt,metaKey:it,ctrlKey:ot}=tt;Object.assign(et,{shiftKey:nt,altKey:rt,metaKey:it,ctrlKey:ot})}return et}function call$2(tt,...et){return typeof tt=="function"?tt(...et):tt}function noop$b(){}function chain(...tt){return tt.length===0?noop$b:tt.length===1?tt[0]:function(){let et;for(const nt of tt)et=nt.apply(this,arguments)||et;return et}}function assignDefault(tt,et){return Object.assign({},et,tt||{})}const BEFORE_LAST_KINEMATICS_DELAY=32;class Engine{constructor(et,nt,rt){this.ctrl=et,this.args=nt,this.key=rt,this.state||(this.state={},this.computeValues([0,0]),this.computeInitial(),this.init&&this.init(),this.reset())}get state(){return this.ctrl.state[this.key]}set state(et){this.ctrl.state[this.key]=et}get shared(){return this.ctrl.state.shared}get eventStore(){return this.ctrl.gestureEventStores[this.key]}get timeoutStore(){return this.ctrl.gestureTimeoutStores[this.key]}get config(){return this.ctrl.config[this.key]}get sharedConfig(){return this.ctrl.config.shared}get handler(){return this.ctrl.handlers[this.key]}reset(){const{state:et,shared:nt,ingKey:rt,args:it}=this;nt[rt]=et._active=et.active=et._blocked=et._force=!1,et._step=[!1,!1],et.intentional=!1,et._movement=[0,0],et._distance=[0,0],et._direction=[0,0],et._delta=[0,0],et._bounds=[[-1/0,1/0],[-1/0,1/0]],et.args=it,et.axis=void 0,et.memo=void 0,et.elapsedTime=et.timeDelta=0,et.direction=[0,0],et.distance=[0,0],et.overflow=[0,0],et._movementBound=[!1,!1],et.velocity=[0,0],et.movement=[0,0],et.delta=[0,0],et.timeStamp=0}start(et){const nt=this.state,rt=this.config;nt._active||(this.reset(),this.computeInitial(),nt._active=!0,nt.target=et.target,nt.currentTarget=et.currentTarget,nt.lastOffset=rt.from?call$2(rt.from,nt):nt.offset,nt.offset=nt.lastOffset,nt.startTime=nt.timeStamp=et.timeStamp)}computeValues(et){const nt=this.state;nt._values=et,nt.values=this.config.transform(et)}computeInitial(){const et=this.state;et._initial=et._values,et.initial=et.values}compute(et){const{state:nt,config:rt,shared:it}=this;nt.args=this.args;let ot=0;if(et&&(nt.event=et,rt.preventDefault&&et.cancelable&&nt.event.preventDefault(),nt.type=et.type,it.touches=this.ctrl.pointerIds.size||this.ctrl.touchIds.size,it.locked=!!document.pointerLockElement,Object.assign(it,getEventDetails(et)),it.down=it.pressed=it.buttons%2===1||it.touches>0,ot=et.timeStamp-nt.timeStamp,nt.timeStamp=et.timeStamp,nt.elapsedTime=nt.timeStamp-nt.startTime),nt._active){const Tt=nt._delta.map(Math.abs);V$2.addTo(nt._distance,Tt)}this.axisIntent&&this.axisIntent(et);const[at,st]=nt._movement,[lt,ct]=rt.threshold,{_step:ut,values:ht}=nt;if(rt.hasCustomTransform?(ut[0]===!1&&(ut[0]=Math.abs(at)>=lt&&ht[0]),ut[1]===!1&&(ut[1]=Math.abs(st)>=ct&&ht[1])):(ut[0]===!1&&(ut[0]=Math.abs(at)>=lt&&Math.sign(at)*lt),ut[1]===!1&&(ut[1]=Math.abs(st)>=ct&&Math.sign(st)*ct)),nt.intentional=ut[0]!==!1||ut[1]!==!1,!nt.intentional)return;const dt=[0,0];if(rt.hasCustomTransform){const[Tt,At]=ht;dt[0]=ut[0]!==!1?Tt-ut[0]:0,dt[1]=ut[1]!==!1?At-ut[1]:0}else dt[0]=ut[0]!==!1?at-ut[0]:0,dt[1]=ut[1]!==!1?st-ut[1]:0;this.restrictToAxis&&!nt._blocked&&this.restrictToAxis(dt);const pt=nt.offset,mt=nt._active&&!nt._blocked||nt.active;mt&&(nt.first=nt._active&&!nt.active,nt.last=!nt._active&&nt.active,nt.active=it[this.ingKey]=nt._active,et&&(nt.first&&("bounds"in rt&&(nt._bounds=call$2(rt.bounds,nt)),this.setup&&this.setup()),nt.movement=dt,this.computeOffset()));const[gt,yt]=nt.offset,[[bt,vt],[xt,kt]]=nt._bounds;nt.overflow=[gtvt?1:0,ytkt?1:0],nt._movementBound[0]=nt.overflow[0]?nt._movementBound[0]===!1?nt._movement[0]:nt._movementBound[0]:!1,nt._movementBound[1]=nt.overflow[1]?nt._movementBound[1]===!1?nt._movement[1]:nt._movementBound[1]:!1;const St=nt._active?rt.rubberband||[0,0]:[0,0];if(nt.offset=computeRubberband(nt._bounds,nt.offset,St),nt.delta=V$2.sub(nt.offset,pt),this.computeMovement(),mt&&(!nt.last||ot>BEFORE_LAST_KINEMATICS_DELAY)){nt.delta=V$2.sub(nt.offset,pt);const Tt=nt.delta.map(Math.abs);V$2.addTo(nt.distance,Tt),nt.direction=nt.delta.map(Math.sign),nt._direction=nt._delta.map(Math.sign),!nt.first&&ot>0&&(nt.velocity=[Tt[0]/ot,Tt[1]/ot],nt.timeDelta=ot)}}emit(){const et=this.state,nt=this.shared,rt=this.config;if(et._active||this.clean(),(et._blocked||!et.intentional)&&!et._force&&!rt.triggerAllEvents)return;const it=this.handler(_objectSpread2$2(_objectSpread2$2(_objectSpread2$2({},nt),et),{},{[this.aliasKey]:et.values}));it!==void 0&&(et.memo=it)}clean(){this.eventStore.clean(),this.timeoutStore.clean()}}function selectAxis([tt,et],nt){const rt=Math.abs(tt),it=Math.abs(et);if(rt>it&&rt>nt)return"x";if(it>rt&&it>nt)return"y"}class CoordinatesEngine extends Engine{constructor(...et){super(...et),_defineProperty$H(this,"aliasKey","xy")}reset(){super.reset(),this.state.axis=void 0}init(){this.state.offset=[0,0],this.state.lastOffset=[0,0]}computeOffset(){this.state.offset=V$2.add(this.state.lastOffset,this.state.movement)}computeMovement(){this.state.movement=V$2.sub(this.state.offset,this.state.lastOffset)}axisIntent(et){const nt=this.state,rt=this.config;if(!nt.axis&&et){const it=typeof rt.axisThreshold=="object"?rt.axisThreshold[getPointerType(et)]:rt.axisThreshold;nt.axis=selectAxis(nt._movement,it)}nt._blocked=(rt.lockDirection||!!rt.axis)&&!nt.axis||!!rt.axis&&rt.axis!==nt.axis}restrictToAxis(et){if(this.config.axis||this.config.lockDirection)switch(this.state.axis){case"x":et[1]=0;break;case"y":et[0]=0;break}}}const identity$e=tt=>tt,DEFAULT_RUBBERBAND=.15,commonConfigResolver={enabled(tt=!0){return tt},eventOptions(tt,et,nt){return _objectSpread2$2(_objectSpread2$2({},nt.shared.eventOptions),tt)},preventDefault(tt=!1){return tt},triggerAllEvents(tt=!1){return tt},rubberband(tt=0){switch(tt){case!0:return[DEFAULT_RUBBERBAND,DEFAULT_RUBBERBAND];case!1:return[0,0];default:return V$2.toVector(tt)}},from(tt){if(typeof tt=="function")return tt;if(tt!=null)return V$2.toVector(tt)},transform(tt,et,nt){const rt=tt||nt.shared.transform;return this.hasCustomTransform=!!rt,rt||identity$e},threshold(tt){return V$2.toVector(tt,0)}},DEFAULT_AXIS_THRESHOLD=0,coordinatesConfigResolver=_objectSpread2$2(_objectSpread2$2({},commonConfigResolver),{},{axis(tt,et,{axis:nt}){if(this.lockDirection=nt==="lock",!this.lockDirection)return nt},axisThreshold(tt=DEFAULT_AXIS_THRESHOLD){return tt},bounds(tt={}){if(typeof tt=="function")return ot=>coordinatesConfigResolver.bounds(tt(ot));if("current"in tt)return()=>tt.current;if(typeof HTMLElement=="function"&&tt instanceof HTMLElement)return tt;const{left:et=-1/0,right:nt=1/0,top:rt=-1/0,bottom:it=1/0}=tt;return[[et,nt],[rt,it]]}}),KEYS_DELTA_MAP={ArrowRight:(tt,et=1)=>[tt*et,0],ArrowLeft:(tt,et=1)=>[-1*tt*et,0],ArrowUp:(tt,et=1)=>[0,-1*tt*et],ArrowDown:(tt,et=1)=>[0,tt*et]};class DragEngine extends CoordinatesEngine{constructor(...et){super(...et),_defineProperty$H(this,"ingKey","dragging")}reset(){super.reset();const et=this.state;et._pointerId=void 0,et._pointerActive=!1,et._keyboardActive=!1,et._preventScroll=!1,et._delayed=!1,et.swipe=[0,0],et.tap=!1,et.canceled=!1,et.cancel=this.cancel.bind(this)}setup(){const et=this.state;if(et._bounds instanceof HTMLElement){const nt=et._bounds.getBoundingClientRect(),rt=et.currentTarget.getBoundingClientRect(),it={left:nt.left-rt.left+et.offset[0],right:nt.right-rt.right+et.offset[0],top:nt.top-rt.top+et.offset[1],bottom:nt.bottom-rt.bottom+et.offset[1]};et._bounds=coordinatesConfigResolver.bounds(it)}}cancel(){const et=this.state;et.canceled||(et.canceled=!0,et._active=!1,setTimeout(()=>{this.compute(),this.emit()},0))}setActive(){this.state._active=this.state._pointerActive||this.state._keyboardActive}clean(){this.pointerClean(),this.state._pointerActive=!1,this.state._keyboardActive=!1,super.clean()}pointerDown(et){const nt=this.config,rt=this.state;if(et.buttons!=null&&(Array.isArray(nt.pointerButtons)?!nt.pointerButtons.includes(et.buttons):nt.pointerButtons!==-1&&nt.pointerButtons!==et.buttons))return;const it=this.ctrl.setEventIds(et);nt.pointerCapture&&et.target.setPointerCapture(et.pointerId),!(it&&it.size>1&&rt._pointerActive)&&(this.start(et),this.setupPointer(et),rt._pointerId=pointerId(et),rt._pointerActive=!0,this.computeValues(pointerValues(et)),this.computeInitial(),nt.preventScrollAxis&&getPointerType(et)!=="mouse"?(rt._active=!1,this.setupScrollPrevention(et)):nt.delay>0?(this.setupDelayTrigger(et),nt.triggerAllEvents&&(this.compute(et),this.emit())):this.startPointerDrag(et))}startPointerDrag(et){const nt=this.state;nt._active=!0,nt._preventScroll=!0,nt._delayed=!1,this.compute(et),this.emit()}pointerMove(et){const nt=this.state,rt=this.config;if(!nt._pointerActive)return;const it=pointerId(et);if(nt._pointerId!==void 0&&it!==nt._pointerId)return;const ot=pointerValues(et);if(document.pointerLockElement===et.target?nt._delta=[et.movementX,et.movementY]:(nt._delta=V$2.sub(ot,nt._values),this.computeValues(ot)),V$2.addTo(nt._movement,nt._delta),this.compute(et),nt._delayed&&nt.intentional){this.timeoutStore.remove("dragDelay"),nt.active=!1,this.startPointerDrag(et);return}if(rt.preventScrollAxis&&!nt._preventScroll)if(nt.axis)if(nt.axis===rt.preventScrollAxis||rt.preventScrollAxis==="xy"){nt._active=!1,this.clean();return}else{this.timeoutStore.remove("startPointerDrag"),this.startPointerDrag(et);return}else return;this.emit()}pointerUp(et){this.ctrl.setEventIds(et);try{this.config.pointerCapture&&et.target.hasPointerCapture(et.pointerId)&&et.target.releasePointerCapture(et.pointerId)}catch{}const nt=this.state,rt=this.config;if(!nt._active||!nt._pointerActive)return;const it=pointerId(et);if(nt._pointerId!==void 0&&it!==nt._pointerId)return;this.state._pointerActive=!1,this.setActive(),this.compute(et);const[ot,at]=nt._distance;if(nt.tap=ot<=rt.tapsThreshold&&at<=rt.tapsThreshold,nt.tap&&rt.filterTaps)nt._force=!0;else{const[st,lt]=nt._delta,[ct,ut]=nt._movement,[ht,dt]=rt.swipe.velocity,[pt,mt]=rt.swipe.distance,gt=rt.swipe.duration;if(nt.elapsedTimeht&&Math.abs(ct)>pt&&(nt.swipe[0]=Math.sign(st)),bt>dt&&Math.abs(ut)>mt&&(nt.swipe[1]=Math.sign(lt))}}this.emit()}pointerClick(et){!this.state.tap&&et.detail>0&&(et.preventDefault(),et.stopPropagation())}setupPointer(et){const nt=this.config,rt=nt.device;nt.pointerLock&&et.currentTarget.requestPointerLock(),nt.pointerCapture||(this.eventStore.add(this.sharedConfig.window,rt,"change",this.pointerMove.bind(this)),this.eventStore.add(this.sharedConfig.window,rt,"end",this.pointerUp.bind(this)),this.eventStore.add(this.sharedConfig.window,rt,"cancel",this.pointerUp.bind(this)))}pointerClean(){this.config.pointerLock&&document.pointerLockElement===this.state.currentTarget&&document.exitPointerLock()}preventScroll(et){this.state._preventScroll&&et.cancelable&&et.preventDefault()}setupScrollPrevention(et){this.state._preventScroll=!1,persistEvent(et);const nt=this.eventStore.add(this.sharedConfig.window,"touch","change",this.preventScroll.bind(this),{passive:!1});this.eventStore.add(this.sharedConfig.window,"touch","end",nt),this.eventStore.add(this.sharedConfig.window,"touch","cancel",nt),this.timeoutStore.add("startPointerDrag",this.startPointerDrag.bind(this),this.config.preventScrollDelay,et)}setupDelayTrigger(et){this.state._delayed=!0,this.timeoutStore.add("dragDelay",()=>{this.state._step=[0,0],this.startPointerDrag(et)},this.config.delay)}keyDown(et){const nt=KEYS_DELTA_MAP[et.key];if(nt){const rt=this.state,it=et.shiftKey?10:et.altKey?.1:1;this.start(et),rt._delta=nt(this.config.keyboardDisplacement,it),rt._keyboardActive=!0,V$2.addTo(rt._movement,rt._delta),this.compute(et),this.emit()}}keyUp(et){et.key in KEYS_DELTA_MAP&&(this.state._keyboardActive=!1,this.setActive(),this.compute(et),this.emit())}bind(et){const nt=this.config.device;et(nt,"start",this.pointerDown.bind(this)),this.config.pointerCapture&&(et(nt,"change",this.pointerMove.bind(this)),et(nt,"end",this.pointerUp.bind(this)),et(nt,"cancel",this.pointerUp.bind(this)),et("lostPointerCapture","",this.pointerUp.bind(this))),this.config.keys&&(et("key","down",this.keyDown.bind(this)),et("key","up",this.keyUp.bind(this))),this.config.filterTaps&&et("click","",this.pointerClick.bind(this),{capture:!0,passive:!1})}}function persistEvent(tt){"persist"in tt&&typeof tt.persist=="function"&&tt.persist()}const isBrowser$2=typeof window<"u"&&window.document&&window.document.createElement;function supportsTouchEvents(){return isBrowser$2&&"ontouchstart"in window}function isTouchScreen(){return supportsTouchEvents()||isBrowser$2&&window.navigator.maxTouchPoints>1}function supportsPointerEvents(){return isBrowser$2&&"onpointerdown"in window}function supportsPointerLock(){return isBrowser$2&&"exitPointerLock"in window.document}function supportsGestureEvents(){try{return"constructor"in GestureEvent}catch{return!1}}const SUPPORT={isBrowser:isBrowser$2,gesture:supportsGestureEvents(),touch:supportsTouchEvents(),touchscreen:isTouchScreen(),pointer:supportsPointerEvents(),pointerLock:supportsPointerLock()},DEFAULT_PREVENT_SCROLL_DELAY=250,DEFAULT_DRAG_DELAY=180,DEFAULT_SWIPE_VELOCITY=.5,DEFAULT_SWIPE_DISTANCE=50,DEFAULT_SWIPE_DURATION=250,DEFAULT_KEYBOARD_DISPLACEMENT=10,DEFAULT_DRAG_AXIS_THRESHOLD={mouse:0,touch:0,pen:8},dragConfigResolver=_objectSpread2$2(_objectSpread2$2({},coordinatesConfigResolver),{},{device(tt,et,{pointer:{touch:nt=!1,lock:rt=!1,mouse:it=!1}={}}){return this.pointerLock=rt&&SUPPORT.pointerLock,SUPPORT.touch&&nt?"touch":this.pointerLock?"mouse":SUPPORT.pointer&&!it?"pointer":SUPPORT.touch?"touch":"mouse"},preventScrollAxis(tt,et,{preventScroll:nt}){if(this.preventScrollDelay=typeof nt=="number"?nt:nt||nt===void 0&&tt?DEFAULT_PREVENT_SCROLL_DELAY:void 0,!(!SUPPORT.touchscreen||nt===!1))return tt||(nt!==void 0?"y":void 0)},pointerCapture(tt,et,{pointer:{capture:nt=!0,buttons:rt=1,keys:it=!0}={}}){return this.pointerButtons=rt,this.keys=it,!this.pointerLock&&this.device==="pointer"&&nt},threshold(tt,et,{filterTaps:nt=!1,tapsThreshold:rt=3,axis:it=void 0}){const ot=V$2.toVector(tt,nt?rt:it?1:0);return this.filterTaps=nt,this.tapsThreshold=rt,ot},swipe({velocity:tt=DEFAULT_SWIPE_VELOCITY,distance:et=DEFAULT_SWIPE_DISTANCE,duration:nt=DEFAULT_SWIPE_DURATION}={}){return{velocity:this.transform(V$2.toVector(tt)),distance:this.transform(V$2.toVector(et)),duration:nt}},delay(tt=0){switch(tt){case!0:return DEFAULT_DRAG_DELAY;case!1:return 0;default:return tt}},axisThreshold(tt){return tt?_objectSpread2$2(_objectSpread2$2({},DEFAULT_DRAG_AXIS_THRESHOLD),tt):DEFAULT_DRAG_AXIS_THRESHOLD},keyboardDisplacement(tt=DEFAULT_KEYBOARD_DISPLACEMENT){return tt}});_objectSpread2$2(_objectSpread2$2({},commonConfigResolver),{},{device(tt,et,{shared:nt,pointer:{touch:rt=!1}={}}){if(nt.target&&!SUPPORT.touch&&SUPPORT.gesture)return"gesture";if(SUPPORT.touch&&rt)return"touch";if(SUPPORT.touchscreen){if(SUPPORT.pointer)return"pointer";if(SUPPORT.touch)return"touch"}},bounds(tt,et,{scaleBounds:nt={},angleBounds:rt={}}){const it=at=>{const st=assignDefault(call$2(nt,at),{min:-1/0,max:1/0});return[st.min,st.max]},ot=at=>{const st=assignDefault(call$2(rt,at),{min:-1/0,max:1/0});return[st.min,st.max]};return typeof nt!="function"&&typeof rt!="function"?[it(),ot()]:at=>[it(at),ot(at)]},threshold(tt,et,nt){return this.lockDirection=nt.axis==="lock",V$2.toVector(tt,this.lockDirection?[.1,3]:0)},modifierKey(tt){return tt===void 0?"ctrlKey":tt},pinchOnWheel(tt=!0){return tt}});_objectSpread2$2(_objectSpread2$2({},coordinatesConfigResolver),{},{mouseOnly:(tt=!0)=>tt});_objectSpread2$2(_objectSpread2$2({},coordinatesConfigResolver),{},{mouseOnly:(tt=!0)=>tt});const EngineMap=new Map,ConfigResolverMap=new Map;function registerAction(tt){EngineMap.set(tt.key,tt.engine),ConfigResolverMap.set(tt.key,tt.resolver)}const dragAction={key:"drag",engine:DragEngine,resolver:dragConfigResolver};function _objectWithoutPropertiesLoose$p(tt,et){if(tt==null)return{};var nt={},rt=Object.keys(tt),it,ot;for(ot=0;ot=0)&&(nt[it]=tt[it]);return nt}function _objectWithoutProperties$m(tt,et){if(tt==null)return{};var nt=_objectWithoutPropertiesLoose$p(tt,et),rt,it;if(Object.getOwnPropertySymbols){var ot=Object.getOwnPropertySymbols(tt);for(it=0;it=0)&&Object.prototype.propertyIsEnumerable.call(tt,rt)&&(nt[rt]=tt[rt])}return nt}const sharedConfigResolver={target(tt){if(tt)return()=>"current"in tt?tt.current:tt},enabled(tt=!0){return tt},window(tt=SUPPORT.isBrowser?window:void 0){return tt},eventOptions({passive:tt=!0,capture:et=!1}={}){return{passive:tt,capture:et}},transform(tt){return tt}},_excluded$1N=["target","eventOptions","window","enabled","transform"];function resolveWith(tt={},et){const nt={};for(const[rt,it]of Object.entries(et))switch(typeof it){case"function":nt[rt]=it.call(nt,tt[rt],rt,tt);break;case"object":nt[rt]=resolveWith(tt[rt],it);break;case"boolean":it&&(nt[rt]=tt[rt]);break}return nt}function parse$3(tt,et,nt={}){const rt=tt,{target:it,eventOptions:ot,window:at,enabled:st,transform:lt}=rt,ct=_objectWithoutProperties$m(rt,_excluded$1N);if(nt.shared=resolveWith({target:it,eventOptions:ot,window:at,enabled:st,transform:lt},sharedConfigResolver),et){const ut=ConfigResolverMap.get(et);nt[et]=resolveWith(_objectSpread2$2({shared:nt.shared},ct),ut)}else for(const ut in ct){const ht=ConfigResolverMap.get(ut);ht&&(nt[ut]=resolveWith(_objectSpread2$2({shared:nt.shared},ct[ut]),ht))}return nt}class EventStore{constructor(et,nt){_defineProperty$H(this,"_listeners",new Set),this._ctrl=et,this._gestureKey=nt}add(et,nt,rt,it,ot){const at=this._listeners,st=toDomEventType(nt,rt),lt=this._gestureKey?this._ctrl.config[this._gestureKey].eventOptions:{},ct=_objectSpread2$2(_objectSpread2$2({},lt),ot);et.addEventListener(st,it,ct);const ut=()=>{et.removeEventListener(st,it,ct),at.delete(ut)};return at.add(ut),ut}clean(){this._listeners.forEach(et=>et()),this._listeners.clear()}}class TimeoutStore{constructor(){_defineProperty$H(this,"_timeouts",new Map)}add(et,nt,rt=140,...it){this.remove(et),this._timeouts.set(et,window.setTimeout(nt,rt,...it))}remove(et){const nt=this._timeouts.get(et);nt&&window.clearTimeout(nt)}clean(){this._timeouts.forEach(et=>void window.clearTimeout(et)),this._timeouts.clear()}}let Controller$1=class{constructor(et){_defineProperty$H(this,"gestures",new Set),_defineProperty$H(this,"_targetEventStore",new EventStore(this)),_defineProperty$H(this,"gestureEventStores",{}),_defineProperty$H(this,"gestureTimeoutStores",{}),_defineProperty$H(this,"handlers",{}),_defineProperty$H(this,"config",{}),_defineProperty$H(this,"pointerIds",new Set),_defineProperty$H(this,"touchIds",new Set),_defineProperty$H(this,"state",{shared:{shiftKey:!1,metaKey:!1,ctrlKey:!1,altKey:!1}}),resolveGestures(this,et)}setEventIds(et){if(isTouch$1(et))return this.touchIds=new Set(touchIds(et)),this.touchIds;if("pointerId"in et)return et.type==="pointerup"||et.type==="pointercancel"?this.pointerIds.delete(et.pointerId):et.type==="pointerdown"&&this.pointerIds.add(et.pointerId),this.pointerIds}applyHandlers(et,nt){this.handlers=et,this.nativeHandlers=nt}applyConfig(et,nt){this.config=parse$3(et,nt,this.config)}clean(){this._targetEventStore.clean();for(const et of this.gestures)this.gestureEventStores[et].clean(),this.gestureTimeoutStores[et].clean()}effect(){return this.config.shared.target&&this.bind(),()=>this._targetEventStore.clean()}bind(...et){const nt=this.config.shared,rt={};let it;if(!(nt.target&&(it=nt.target(),!it))){if(nt.enabled){for(const at of this.gestures){const st=this.config[at],lt=bindToProps(rt,st.eventOptions,!!it);if(st.enabled){const ct=EngineMap.get(at);new ct(this,et,at).bind(lt)}}const ot=bindToProps(rt,nt.eventOptions,!!it);for(const at in this.nativeHandlers)ot(at,"",st=>this.nativeHandlers[at](_objectSpread2$2(_objectSpread2$2({},this.state.shared),{},{event:st,args:et})),void 0,!0)}for(const ot in rt)rt[ot]=chain(...rt[ot]);if(!it)return rt;for(const ot in rt){const{device:at,capture:st,passive:lt}=parseProp(ot);this._targetEventStore.add(it,at,"",rt[ot],{capture:st,passive:lt})}}}};function setupGesture(tt,et){tt.gestures.add(et),tt.gestureEventStores[et]=new EventStore(tt,et),tt.gestureTimeoutStores[et]=new TimeoutStore}function resolveGestures(tt,et){et.drag&&setupGesture(tt,"drag"),et.wheel&&setupGesture(tt,"wheel"),et.scroll&&setupGesture(tt,"scroll"),et.move&&setupGesture(tt,"move"),et.pinch&&setupGesture(tt,"pinch"),et.hover&&setupGesture(tt,"hover")}const bindToProps=(tt,et,nt)=>(rt,it,ot,at={},st=!1)=>{var lt,ct;const ut=(lt=at.capture)!==null&<!==void 0?lt:et.capture,ht=(ct=at.passive)!==null&&ct!==void 0?ct:et.passive;let dt=st?rt:toHandlerProp(rt,it,ut);nt&&ht&&(dt+="Passive"),tt[dt]=tt[dt]||[],tt[dt].push(ot)};function useRecognizers(tt,et={},nt,rt){const it=React$1.useMemo(()=>new Controller$1(tt),[]);if(it.applyHandlers(tt,rt),it.applyConfig(et,nt),React$1.useEffect(it.effect.bind(it)),React$1.useEffect(()=>it.clean.bind(it),[]),et.target===void 0)return it.bind.bind(it)}function useDrag$2(tt,et){return registerAction(dragAction),useRecognizers({drag:tt},et||{},"drag")}function $e42e1063c40fb3ef$export$b9ecd428b558ff10(tt,et,{checkForDefaultPrevented:nt=!0}={}){return function(it){if(tt==null||tt(it),nt===!1||!it.defaultPrevented)return et==null?void 0:et(it)}}function $c512c27ab02ef895$export$50c7b4e9d9f19c1(tt,et=[]){let nt=[];function rt(ot,at){const st=reactExports.createContext(at),lt=nt.length;nt=[...nt,at];function ct(ht){const{scope:dt,children:pt,...mt}=ht,gt=(dt==null?void 0:dt[tt][lt])||st,yt=reactExports.useMemo(()=>mt,Object.values(mt));return reactExports.createElement(gt.Provider,{value:yt},pt)}function ut(ht,dt){const pt=(dt==null?void 0:dt[tt][lt])||st,mt=reactExports.useContext(pt);if(mt)return mt;if(at!==void 0)return at;throw new Error(`\`${ht}\` must be used within \`${ot}\``)}return ct.displayName=ot+"Provider",[ct,ut]}const it=()=>{const ot=nt.map(at=>reactExports.createContext(at));return function(st){const lt=(st==null?void 0:st[tt])||ot;return reactExports.useMemo(()=>({[`__scope${tt}`]:{...st,[tt]:lt}}),[st,lt])}};return it.scopeName=tt,[rt,$c512c27ab02ef895$var$composeContextScopes(it,...et)]}function $c512c27ab02ef895$var$composeContextScopes(...tt){const et=tt[0];if(tt.length===1)return et;const nt=()=>{const rt=tt.map(it=>({useScope:it(),scopeName:it.scopeName}));return function(ot){const at=rt.reduce((st,{useScope:lt,scopeName:ct})=>{const ht=lt(ot)[`__scope${ct}`];return{...st,...ht}},{});return reactExports.useMemo(()=>({[`__scope${et.scopeName}`]:at}),[at])}};return nt.scopeName=et.scopeName,nt}function $b1b2314f5f9a1d84$export$25bec8c6f54ee79a(tt){const et=reactExports.useRef(tt);return reactExports.useEffect(()=>{et.current=tt}),reactExports.useMemo(()=>(...nt)=>{var rt;return(rt=et.current)===null||rt===void 0?void 0:rt.call(et,...nt)},[])}function $addc16e1bbe58fd0$export$3a72a57244d6e765(tt,et=globalThis==null?void 0:globalThis.document){const nt=$b1b2314f5f9a1d84$export$25bec8c6f54ee79a(tt);reactExports.useEffect(()=>{const rt=it=>{it.key==="Escape"&&nt(it)};return et.addEventListener("keydown",rt),()=>et.removeEventListener("keydown",rt)},[nt,et])}const $5cb92bef7577960e$var$CONTEXT_UPDATE="dismissableLayer.update",$5cb92bef7577960e$var$POINTER_DOWN_OUTSIDE="dismissableLayer.pointerDownOutside",$5cb92bef7577960e$var$FOCUS_OUTSIDE="dismissableLayer.focusOutside";let $5cb92bef7577960e$var$originalBodyPointerEvents;const $5cb92bef7577960e$var$DismissableLayerContext=reactExports.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),$5cb92bef7577960e$export$177fb62ff3ec1f22=reactExports.forwardRef((tt,et)=>{var nt;const{disableOutsidePointerEvents:rt=!1,onEscapeKeyDown:it,onPointerDownOutside:ot,onFocusOutside:at,onInteractOutside:st,onDismiss:lt,...ct}=tt,ut=reactExports.useContext($5cb92bef7577960e$var$DismissableLayerContext),[ht,dt]=reactExports.useState(null),pt=(nt=ht==null?void 0:ht.ownerDocument)!==null&&nt!==void 0?nt:globalThis==null?void 0:globalThis.document,[,mt]=reactExports.useState({}),gt=$6ed0406888f73fc4$export$c7b2cbe3552a0d05(et,Et=>dt(Et)),yt=Array.from(ut.layers),[bt]=[...ut.layersWithOutsidePointerEventsDisabled].slice(-1),vt=yt.indexOf(bt),xt=ht?yt.indexOf(ht):-1,kt=ut.layersWithOutsidePointerEventsDisabled.size>0,St=xt>=vt,Tt=$5cb92bef7577960e$var$usePointerDownOutside(Et=>{const $t=Et.target,Dt=[...ut.branches].some(jt=>jt.contains($t));!St||Dt||(ot==null||ot(Et),st==null||st(Et),Et.defaultPrevented||lt==null||lt())},pt),At=$5cb92bef7577960e$var$useFocusOutside(Et=>{const $t=Et.target;[...ut.branches].some(jt=>jt.contains($t))||(at==null||at(Et),st==null||st(Et),Et.defaultPrevented||lt==null||lt())},pt);return $addc16e1bbe58fd0$export$3a72a57244d6e765(Et=>{xt===ut.layers.size-1&&(it==null||it(Et),!Et.defaultPrevented&<&&(Et.preventDefault(),lt()))},pt),reactExports.useEffect(()=>{if(ht)return rt&&(ut.layersWithOutsidePointerEventsDisabled.size===0&&($5cb92bef7577960e$var$originalBodyPointerEvents=pt.body.style.pointerEvents,pt.body.style.pointerEvents="none"),ut.layersWithOutsidePointerEventsDisabled.add(ht)),ut.layers.add(ht),$5cb92bef7577960e$var$dispatchUpdate(),()=>{rt&&ut.layersWithOutsidePointerEventsDisabled.size===1&&(pt.body.style.pointerEvents=$5cb92bef7577960e$var$originalBodyPointerEvents)}},[ht,pt,rt,ut]),reactExports.useEffect(()=>()=>{ht&&(ut.layers.delete(ht),ut.layersWithOutsidePointerEventsDisabled.delete(ht),$5cb92bef7577960e$var$dispatchUpdate())},[ht,ut]),reactExports.useEffect(()=>{const Et=()=>mt({});return document.addEventListener($5cb92bef7577960e$var$CONTEXT_UPDATE,Et),()=>document.removeEventListener($5cb92bef7577960e$var$CONTEXT_UPDATE,Et)},[]),reactExports.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div,_extends$u({},ct,{ref:gt,style:{pointerEvents:kt?St?"auto":"none":void 0,...tt.style},onFocusCapture:$e42e1063c40fb3ef$export$b9ecd428b558ff10(tt.onFocusCapture,At.onFocusCapture),onBlurCapture:$e42e1063c40fb3ef$export$b9ecd428b558ff10(tt.onBlurCapture,At.onBlurCapture),onPointerDownCapture:$e42e1063c40fb3ef$export$b9ecd428b558ff10(tt.onPointerDownCapture,Tt.onPointerDownCapture)}))});function $5cb92bef7577960e$var$usePointerDownOutside(tt,et=globalThis==null?void 0:globalThis.document){const nt=$b1b2314f5f9a1d84$export$25bec8c6f54ee79a(tt),rt=reactExports.useRef(!1),it=reactExports.useRef(()=>{});return reactExports.useEffect(()=>{const ot=st=>{if(st.target&&!rt.current){let ut=function(){$5cb92bef7577960e$var$handleAndDispatchCustomEvent($5cb92bef7577960e$var$POINTER_DOWN_OUTSIDE,nt,ct,{discrete:!0})};var lt=ut;const ct={originalEvent:st};st.pointerType==="touch"?(et.removeEventListener("click",it.current),it.current=ut,et.addEventListener("click",it.current,{once:!0})):ut()}else et.removeEventListener("click",it.current);rt.current=!1},at=window.setTimeout(()=>{et.addEventListener("pointerdown",ot)},0);return()=>{window.clearTimeout(at),et.removeEventListener("pointerdown",ot),et.removeEventListener("click",it.current)}},[et,nt]),{onPointerDownCapture:()=>rt.current=!0}}function $5cb92bef7577960e$var$useFocusOutside(tt,et=globalThis==null?void 0:globalThis.document){const nt=$b1b2314f5f9a1d84$export$25bec8c6f54ee79a(tt),rt=reactExports.useRef(!1);return reactExports.useEffect(()=>{const it=ot=>{ot.target&&!rt.current&&$5cb92bef7577960e$var$handleAndDispatchCustomEvent($5cb92bef7577960e$var$FOCUS_OUTSIDE,nt,{originalEvent:ot},{discrete:!1})};return et.addEventListener("focusin",it),()=>et.removeEventListener("focusin",it)},[et,nt]),{onFocusCapture:()=>rt.current=!0,onBlurCapture:()=>rt.current=!1}}function $5cb92bef7577960e$var$dispatchUpdate(){const tt=new CustomEvent($5cb92bef7577960e$var$CONTEXT_UPDATE);document.dispatchEvent(tt)}function $5cb92bef7577960e$var$handleAndDispatchCustomEvent(tt,et,nt,{discrete:rt}){const it=nt.originalEvent.target,ot=new CustomEvent(tt,{bubbles:!1,cancelable:!0,detail:nt});et&&it.addEventListener(tt,et,{once:!0}),rt?$8927f6f2acc4f386$export$6d1a0317bde7de7f(it,ot):it.dispatchEvent(ot)}const $9f79659886946c16$export$e5c5a5f917a5871c=globalThis!=null&&globalThis.document?reactExports.useLayoutEffect:()=>{},$1746a345f3d73bb7$var$useReactId=React$2["useId".toString()]||(()=>{});let $1746a345f3d73bb7$var$count=0;function $1746a345f3d73bb7$export$f680877a34711e37(tt){const[et,nt]=reactExports.useState($1746a345f3d73bb7$var$useReactId());return $9f79659886946c16$export$e5c5a5f917a5871c(()=>{tt||nt(rt=>rt??String($1746a345f3d73bb7$var$count++))},[tt]),tt||(et?`radix-${et}`:"")}const sides=["top","right","bottom","left"],min$4=Math.min,max$5=Math.max,round$4=Math.round,floor=Math.floor,createCoords=tt=>({x:tt,y:tt}),oppositeSideMap={left:"right",right:"left",bottom:"top",top:"bottom"},oppositeAlignmentMap={start:"end",end:"start"};function clamp$9(tt,et,nt){return max$5(tt,min$4(et,nt))}function evaluate$1(tt,et){return typeof tt=="function"?tt(et):tt}function getSide(tt){return tt.split("-")[0]}function getAlignment(tt){return tt.split("-")[1]}function getOppositeAxis(tt){return tt==="x"?"y":"x"}function getAxisLength(tt){return tt==="y"?"height":"width"}function getSideAxis(tt){return["top","bottom"].includes(getSide(tt))?"y":"x"}function getAlignmentAxis(tt){return getOppositeAxis(getSideAxis(tt))}function getAlignmentSides(tt,et,nt){nt===void 0&&(nt=!1);const rt=getAlignment(tt),it=getAlignmentAxis(tt),ot=getAxisLength(it);let at=it==="x"?rt===(nt?"end":"start")?"right":"left":rt==="start"?"bottom":"top";return et.reference[ot]>et.floating[ot]&&(at=getOppositePlacement$1(at)),[at,getOppositePlacement$1(at)]}function getExpandedPlacements(tt){const et=getOppositePlacement$1(tt);return[getOppositeAlignmentPlacement(tt),et,getOppositeAlignmentPlacement(et)]}function getOppositeAlignmentPlacement(tt){return tt.replace(/start|end/g,et=>oppositeAlignmentMap[et])}function getSideList(tt,et,nt){const rt=["left","right"],it=["right","left"],ot=["top","bottom"],at=["bottom","top"];switch(tt){case"top":case"bottom":return nt?et?it:rt:et?rt:it;case"left":case"right":return et?ot:at;default:return[]}}function getOppositeAxisPlacements(tt,et,nt,rt){const it=getAlignment(tt);let ot=getSideList(getSide(tt),nt==="start",rt);return it&&(ot=ot.map(at=>at+"-"+it),et&&(ot=ot.concat(ot.map(getOppositeAlignmentPlacement)))),ot}function getOppositePlacement$1(tt){return tt.replace(/left|right|bottom|top/g,et=>oppositeSideMap[et])}function expandPaddingObject(tt){return{top:0,right:0,bottom:0,left:0,...tt}}function getPaddingObject(tt){return typeof tt!="number"?expandPaddingObject(tt):{top:tt,right:tt,bottom:tt,left:tt}}function rectToClientRect$1(tt){return{...tt,top:tt.y,left:tt.x,right:tt.x+tt.width,bottom:tt.y+tt.height}}function computeCoordsFromPlacement(tt,et,nt){let{reference:rt,floating:it}=tt;const ot=getSideAxis(et),at=getAlignmentAxis(et),st=getAxisLength(at),lt=getSide(et),ct=ot==="y",ut=rt.x+rt.width/2-it.width/2,ht=rt.y+rt.height/2-it.height/2,dt=rt[st]/2-it[st]/2;let pt;switch(lt){case"top":pt={x:ut,y:rt.y-it.height};break;case"bottom":pt={x:ut,y:rt.y+rt.height};break;case"right":pt={x:rt.x+rt.width,y:ht};break;case"left":pt={x:rt.x-it.width,y:ht};break;default:pt={x:rt.x,y:rt.y}}switch(getAlignment(et)){case"start":pt[at]-=dt*(nt&&ct?-1:1);break;case"end":pt[at]+=dt*(nt&&ct?-1:1);break}return pt}const computePosition$1=async(tt,et,nt)=>{const{placement:rt="bottom",strategy:it="absolute",middleware:ot=[],platform:at}=nt,st=ot.filter(Boolean),lt=await(at.isRTL==null?void 0:at.isRTL(et));let ct=await at.getElementRects({reference:tt,floating:et,strategy:it}),{x:ut,y:ht}=computeCoordsFromPlacement(ct,rt,lt),dt=rt,pt={},mt=0;for(let gt=0;gt({name:"arrow",options:tt,async fn(et){const{x:nt,y:rt,placement:it,rects:ot,platform:at,elements:st,middlewareData:lt}=et,{element:ct,padding:ut=0}=evaluate$1(tt,et)||{};if(ct==null)return{};const ht=getPaddingObject(ut),dt={x:nt,y:rt},pt=getAlignmentAxis(it),mt=getAxisLength(pt),gt=await at.getDimensions(ct),yt=pt==="y",bt=yt?"top":"left",vt=yt?"bottom":"right",xt=yt?"clientHeight":"clientWidth",kt=ot.reference[mt]+ot.reference[pt]-dt[pt]-ot.floating[mt],St=dt[pt]-ot.reference[pt],Tt=await(at.getOffsetParent==null?void 0:at.getOffsetParent(ct));let At=Tt?Tt[xt]:0;(!At||!await(at.isElement==null?void 0:at.isElement(Tt)))&&(At=st.floating[xt]||ot.floating[mt]);const Et=kt/2-St/2,$t=At/2-gt[mt]/2-1,Dt=min$4(ht[bt],$t),jt=min$4(ht[vt],$t),Pt=Dt,Ct=At-gt[mt]-jt,wt=At/2-gt[mt]/2+Et,It=clamp$9(Pt,wt,Ct),Ot=!lt.arrow&&getAlignment(it)!=null&&wt!=It&&ot.reference[mt]/2-(wtPt<=0)){var $t,Dt;const Pt=((($t=ot.flip)==null?void 0:$t.index)||0)+1,Ct=St[Pt];if(Ct)return{data:{index:Pt,overflows:Et},reset:{placement:Ct}};let wt=(Dt=Et.filter(It=>It.overflows[0]<=0).sort((It,Ot)=>It.overflows[1]-Ot.overflows[1])[0])==null?void 0:Dt.placement;if(!wt)switch(pt){case"bestFit":{var jt;const It=(jt=Et.map(Ot=>[Ot.placement,Ot.overflows.filter(Wt=>Wt>0).reduce((Wt,zt)=>Wt+zt,0)]).sort((Ot,Wt)=>Ot[1]-Wt[1])[0])==null?void 0:jt[0];It&&(wt=It);break}case"initialPlacement":wt=st;break}if(it!==wt)return{reset:{placement:wt}}}return{}}}};function getSideOffsets$1(tt,et){return{top:tt.top-et.height,right:tt.right-et.width,bottom:tt.bottom-et.height,left:tt.left-et.width}}function isAnySideFullyClipped$1(tt){return sides.some(et=>tt[et]>=0)}const hide$2=function(tt){return tt===void 0&&(tt={}),{name:"hide",options:tt,async fn(et){const{rects:nt}=et,{strategy:rt="referenceHidden",...it}=evaluate$1(tt,et);switch(rt){case"referenceHidden":{const ot=await detectOverflow$1(et,{...it,elementContext:"reference"}),at=getSideOffsets$1(ot,nt.reference);return{data:{referenceHiddenOffsets:at,referenceHidden:isAnySideFullyClipped$1(at)}}}case"escaped":{const ot=await detectOverflow$1(et,{...it,altBoundary:!0}),at=getSideOffsets$1(ot,nt.floating);return{data:{escapedOffsets:at,escaped:isAnySideFullyClipped$1(at)}}}default:return{}}}}};async function convertValueToCoords(tt,et){const{placement:nt,platform:rt,elements:it}=tt,ot=await(rt.isRTL==null?void 0:rt.isRTL(it.floating)),at=getSide(nt),st=getAlignment(nt),lt=getSideAxis(nt)==="y",ct=["left","top"].includes(at)?-1:1,ut=ot&<?-1:1,ht=evaluate$1(et,tt);let{mainAxis:dt,crossAxis:pt,alignmentAxis:mt}=typeof ht=="number"?{mainAxis:ht,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...ht};return st&&typeof mt=="number"&&(pt=st==="end"?mt*-1:mt),lt?{x:pt*ut,y:dt*ct}:{x:dt*ct,y:pt*ut}}const offset$3=function(tt){return tt===void 0&&(tt=0),{name:"offset",options:tt,async fn(et){const{x:nt,y:rt}=et,it=await convertValueToCoords(et,tt);return{x:nt+it.x,y:rt+it.y,data:it}}}},shift=function(tt){return tt===void 0&&(tt={}),{name:"shift",options:tt,async fn(et){const{x:nt,y:rt,placement:it}=et,{mainAxis:ot=!0,crossAxis:at=!1,limiter:st={fn:yt=>{let{x:bt,y:vt}=yt;return{x:bt,y:vt}}},...lt}=evaluate$1(tt,et),ct={x:nt,y:rt},ut=await detectOverflow$1(et,lt),ht=getSideAxis(getSide(it)),dt=getOppositeAxis(ht);let pt=ct[dt],mt=ct[ht];if(ot){const yt=dt==="y"?"top":"left",bt=dt==="y"?"bottom":"right",vt=pt+ut[yt],xt=pt-ut[bt];pt=clamp$9(vt,pt,xt)}if(at){const yt=ht==="y"?"top":"left",bt=ht==="y"?"bottom":"right",vt=mt+ut[yt],xt=mt-ut[bt];mt=clamp$9(vt,mt,xt)}const gt=st.fn({...et,[dt]:pt,[ht]:mt});return{...gt,data:{x:gt.x-nt,y:gt.y-rt}}}}},limitShift=function(tt){return tt===void 0&&(tt={}),{options:tt,fn(et){const{x:nt,y:rt,placement:it,rects:ot,middlewareData:at}=et,{offset:st=0,mainAxis:lt=!0,crossAxis:ct=!0}=evaluate$1(tt,et),ut={x:nt,y:rt},ht=getSideAxis(it),dt=getOppositeAxis(ht);let pt=ut[dt],mt=ut[ht];const gt=evaluate$1(st,et),yt=typeof gt=="number"?{mainAxis:gt,crossAxis:0}:{mainAxis:0,crossAxis:0,...gt};if(lt){const xt=dt==="y"?"height":"width",kt=ot.reference[dt]-ot.floating[xt]+yt.mainAxis,St=ot.reference[dt]+ot.reference[xt]-yt.mainAxis;ptSt&&(pt=St)}if(ct){var bt,vt;const xt=dt==="y"?"width":"height",kt=["top","left"].includes(getSide(it)),St=ot.reference[ht]-ot.floating[xt]+(kt&&((bt=at.offset)==null?void 0:bt[ht])||0)+(kt?0:yt.crossAxis),Tt=ot.reference[ht]+ot.reference[xt]+(kt?0:((vt=at.offset)==null?void 0:vt[ht])||0)-(kt?yt.crossAxis:0);mtTt&&(mt=Tt)}return{[dt]:pt,[ht]:mt}}}},size=function(tt){return tt===void 0&&(tt={}),{name:"size",options:tt,async fn(et){const{placement:nt,rects:rt,platform:it,elements:ot}=et,{apply:at=()=>{},...st}=evaluate$1(tt,et),lt=await detectOverflow$1(et,st),ct=getSide(nt),ut=getAlignment(nt),ht=getSideAxis(nt)==="y",{width:dt,height:pt}=rt.floating;let mt,gt;ct==="top"||ct==="bottom"?(mt=ct,gt=ut===(await(it.isRTL==null?void 0:it.isRTL(ot.floating))?"start":"end")?"left":"right"):(gt=ct,mt=ut==="end"?"top":"bottom");const yt=pt-lt[mt],bt=dt-lt[gt],vt=!et.middlewareData.shift;let xt=yt,kt=bt;if(ht){const Tt=dt-lt.left-lt.right;kt=ut||vt?min$4(bt,Tt):Tt}else{const Tt=pt-lt.top-lt.bottom;xt=ut||vt?min$4(yt,Tt):Tt}if(vt&&!ut){const Tt=max$5(lt.left,0),At=max$5(lt.right,0),Et=max$5(lt.top,0),$t=max$5(lt.bottom,0);ht?kt=dt-2*(Tt!==0||At!==0?Tt+At:max$5(lt.left,lt.right)):xt=pt-2*(Et!==0||$t!==0?Et+$t:max$5(lt.top,lt.bottom))}await at({...et,availableWidth:kt,availableHeight:xt});const St=await it.getDimensions(ot.floating);return dt!==St.width||pt!==St.height?{reset:{rects:!0}}:{}}}};function getNodeName$1(tt){return isNode(tt)?(tt.nodeName||"").toLowerCase():"#document"}function getWindow$1(tt){var et;return(tt==null||(et=tt.ownerDocument)==null?void 0:et.defaultView)||window}function getDocumentElement$1(tt){var et;return(et=(isNode(tt)?tt.ownerDocument:tt.document)||window.document)==null?void 0:et.documentElement}function isNode(tt){return tt instanceof Node||tt instanceof getWindow$1(tt).Node}function isElement$1(tt){return tt instanceof Element||tt instanceof getWindow$1(tt).Element}function isHTMLElement$3(tt){return tt instanceof HTMLElement||tt instanceof getWindow$1(tt).HTMLElement}function isShadowRoot$1(tt){return typeof ShadowRoot>"u"?!1:tt instanceof ShadowRoot||tt instanceof getWindow$1(tt).ShadowRoot}function isOverflowElement(tt){const{overflow:et,overflowX:nt,overflowY:rt,display:it}=getComputedStyle$2(tt);return/auto|scroll|overlay|hidden|clip/.test(et+rt+nt)&&!["inline","contents"].includes(it)}function isTableElement$1(tt){return["table","td","th"].includes(getNodeName$1(tt))}function isContainingBlock(tt){const et=isWebKit(),nt=getComputedStyle$2(tt);return nt.transform!=="none"||nt.perspective!=="none"||(nt.containerType?nt.containerType!=="normal":!1)||!et&&(nt.backdropFilter?nt.backdropFilter!=="none":!1)||!et&&(nt.filter?nt.filter!=="none":!1)||["transform","perspective","filter"].some(rt=>(nt.willChange||"").includes(rt))||["paint","layout","strict","content"].some(rt=>(nt.contain||"").includes(rt))}function getContainingBlock$1(tt){let et=getParentNode$1(tt);for(;isHTMLElement$3(et)&&!isLastTraversableNode(et);){if(isContainingBlock(et))return et;et=getParentNode$1(et)}return null}function isWebKit(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function isLastTraversableNode(tt){return["html","body","#document"].includes(getNodeName$1(tt))}function getComputedStyle$2(tt){return getWindow$1(tt).getComputedStyle(tt)}function getNodeScroll$1(tt){return isElement$1(tt)?{scrollLeft:tt.scrollLeft,scrollTop:tt.scrollTop}:{scrollLeft:tt.pageXOffset,scrollTop:tt.pageYOffset}}function getParentNode$1(tt){if(getNodeName$1(tt)==="html")return tt;const et=tt.assignedSlot||tt.parentNode||isShadowRoot$1(tt)&&tt.host||getDocumentElement$1(tt);return isShadowRoot$1(et)?et.host:et}function getNearestOverflowAncestor(tt){const et=getParentNode$1(tt);return isLastTraversableNode(et)?tt.ownerDocument?tt.ownerDocument.body:tt.body:isHTMLElement$3(et)&&isOverflowElement(et)?et:getNearestOverflowAncestor(et)}function getOverflowAncestors(tt,et,nt){var rt;et===void 0&&(et=[]),nt===void 0&&(nt=!0);const it=getNearestOverflowAncestor(tt),ot=it===((rt=tt.ownerDocument)==null?void 0:rt.body),at=getWindow$1(it);return ot?et.concat(at,at.visualViewport||[],isOverflowElement(it)?it:[],at.frameElement&&nt?getOverflowAncestors(at.frameElement):[]):et.concat(it,getOverflowAncestors(it,[],nt))}function getCssDimensions(tt){const et=getComputedStyle$2(tt);let nt=parseFloat(et.width)||0,rt=parseFloat(et.height)||0;const it=isHTMLElement$3(tt),ot=it?tt.offsetWidth:nt,at=it?tt.offsetHeight:rt,st=round$4(nt)!==ot||round$4(rt)!==at;return st&&(nt=ot,rt=at),{width:nt,height:rt,$:st}}function unwrapElement(tt){return isElement$1(tt)?tt:tt.contextElement}function getScale$1(tt){const et=unwrapElement(tt);if(!isHTMLElement$3(et))return createCoords(1);const nt=et.getBoundingClientRect(),{width:rt,height:it,$:ot}=getCssDimensions(et);let at=(ot?round$4(nt.width):nt.width)/rt,st=(ot?round$4(nt.height):nt.height)/it;return(!at||!Number.isFinite(at))&&(at=1),(!st||!Number.isFinite(st))&&(st=1),{x:at,y:st}}const noOffsets=createCoords(0);function getVisualOffsets(tt){const et=getWindow$1(tt);return!isWebKit()||!et.visualViewport?noOffsets:{x:et.visualViewport.offsetLeft,y:et.visualViewport.offsetTop}}function shouldAddVisualOffsets(tt,et,nt){return et===void 0&&(et=!1),!nt||et&&nt!==getWindow$1(tt)?!1:et}function getBoundingClientRect$1(tt,et,nt,rt){et===void 0&&(et=!1),nt===void 0&&(nt=!1);const it=tt.getBoundingClientRect(),ot=unwrapElement(tt);let at=createCoords(1);et&&(rt?isElement$1(rt)&&(at=getScale$1(rt)):at=getScale$1(tt));const st=shouldAddVisualOffsets(ot,nt,rt)?getVisualOffsets(ot):createCoords(0);let lt=(it.left+st.x)/at.x,ct=(it.top+st.y)/at.y,ut=it.width/at.x,ht=it.height/at.y;if(ot){const dt=getWindow$1(ot),pt=rt&&isElement$1(rt)?getWindow$1(rt):rt;let mt=dt.frameElement;for(;mt&&rt&&pt!==dt;){const gt=getScale$1(mt),yt=mt.getBoundingClientRect(),bt=getComputedStyle$2(mt),vt=yt.left+(mt.clientLeft+parseFloat(bt.paddingLeft))*gt.x,xt=yt.top+(mt.clientTop+parseFloat(bt.paddingTop))*gt.y;lt*=gt.x,ct*=gt.y,ut*=gt.x,ht*=gt.y,lt+=vt,ct+=xt,mt=getWindow$1(mt).frameElement}}return rectToClientRect$1({width:ut,height:ht,x:lt,y:ct})}function convertOffsetParentRelativeRectToViewportRelativeRect(tt){let{rect:et,offsetParent:nt,strategy:rt}=tt;const it=isHTMLElement$3(nt),ot=getDocumentElement$1(nt);if(nt===ot)return et;let at={scrollLeft:0,scrollTop:0},st=createCoords(1);const lt=createCoords(0);if((it||!it&&rt!=="fixed")&&((getNodeName$1(nt)!=="body"||isOverflowElement(ot))&&(at=getNodeScroll$1(nt)),isHTMLElement$3(nt))){const ct=getBoundingClientRect$1(nt);st=getScale$1(nt),lt.x=ct.x+nt.clientLeft,lt.y=ct.y+nt.clientTop}return{width:et.width*st.x,height:et.height*st.y,x:et.x*st.x-at.scrollLeft*st.x+lt.x,y:et.y*st.y-at.scrollTop*st.y+lt.y}}function getClientRects(tt){return Array.from(tt.getClientRects())}function getWindowScrollBarX$1(tt){return getBoundingClientRect$1(getDocumentElement$1(tt)).left+getNodeScroll$1(tt).scrollLeft}function getDocumentRect$1(tt){const et=getDocumentElement$1(tt),nt=getNodeScroll$1(tt),rt=tt.ownerDocument.body,it=max$5(et.scrollWidth,et.clientWidth,rt.scrollWidth,rt.clientWidth),ot=max$5(et.scrollHeight,et.clientHeight,rt.scrollHeight,rt.clientHeight);let at=-nt.scrollLeft+getWindowScrollBarX$1(tt);const st=-nt.scrollTop;return getComputedStyle$2(rt).direction==="rtl"&&(at+=max$5(et.clientWidth,rt.clientWidth)-it),{width:it,height:ot,x:at,y:st}}function getViewportRect$1(tt,et){const nt=getWindow$1(tt),rt=getDocumentElement$1(tt),it=nt.visualViewport;let ot=rt.clientWidth,at=rt.clientHeight,st=0,lt=0;if(it){ot=it.width,at=it.height;const ct=isWebKit();(!ct||ct&&et==="fixed")&&(st=it.offsetLeft,lt=it.offsetTop)}return{width:ot,height:at,x:st,y:lt}}function getInnerBoundingClientRect$1(tt,et){const nt=getBoundingClientRect$1(tt,!0,et==="fixed"),rt=nt.top+tt.clientTop,it=nt.left+tt.clientLeft,ot=isHTMLElement$3(tt)?getScale$1(tt):createCoords(1),at=tt.clientWidth*ot.x,st=tt.clientHeight*ot.y,lt=it*ot.x,ct=rt*ot.y;return{width:at,height:st,x:lt,y:ct}}function getClientRectFromClippingAncestor(tt,et,nt){let rt;if(et==="viewport")rt=getViewportRect$1(tt,nt);else if(et==="document")rt=getDocumentRect$1(getDocumentElement$1(tt));else if(isElement$1(et))rt=getInnerBoundingClientRect$1(et,nt);else{const it=getVisualOffsets(tt);rt={...et,x:et.x-it.x,y:et.y-it.y}}return rectToClientRect$1(rt)}function hasFixedPositionAncestor(tt,et){const nt=getParentNode$1(tt);return nt===et||!isElement$1(nt)||isLastTraversableNode(nt)?!1:getComputedStyle$2(nt).position==="fixed"||hasFixedPositionAncestor(nt,et)}function getClippingElementAncestors(tt,et){const nt=et.get(tt);if(nt)return nt;let rt=getOverflowAncestors(tt,[],!1).filter(st=>isElement$1(st)&&getNodeName$1(st)!=="body"),it=null;const ot=getComputedStyle$2(tt).position==="fixed";let at=ot?getParentNode$1(tt):tt;for(;isElement$1(at)&&!isLastTraversableNode(at);){const st=getComputedStyle$2(at),lt=isContainingBlock(at);!lt&&st.position==="fixed"&&(it=null),(ot?!lt&&!it:!lt&&st.position==="static"&&!!it&&["absolute","fixed"].includes(it.position)||isOverflowElement(at)&&!lt&&hasFixedPositionAncestor(tt,at))?rt=rt.filter(ut=>ut!==at):it=st,at=getParentNode$1(at)}return et.set(tt,rt),rt}function getClippingRect$1(tt){let{element:et,boundary:nt,rootBoundary:rt,strategy:it}=tt;const at=[...nt==="clippingAncestors"?getClippingElementAncestors(et,this._c):[].concat(nt),rt],st=at[0],lt=at.reduce((ct,ut)=>{const ht=getClientRectFromClippingAncestor(et,ut,it);return ct.top=max$5(ht.top,ct.top),ct.right=min$4(ht.right,ct.right),ct.bottom=min$4(ht.bottom,ct.bottom),ct.left=max$5(ht.left,ct.left),ct},getClientRectFromClippingAncestor(et,st,it));return{width:lt.right-lt.left,height:lt.bottom-lt.top,x:lt.left,y:lt.top}}function getDimensions$1(tt){return getCssDimensions(tt)}function getRectRelativeToOffsetParent(tt,et,nt){const rt=isHTMLElement$3(et),it=getDocumentElement$1(et),ot=nt==="fixed",at=getBoundingClientRect$1(tt,!0,ot,et);let st={scrollLeft:0,scrollTop:0};const lt=createCoords(0);if(rt||!rt&&!ot)if((getNodeName$1(et)!=="body"||isOverflowElement(it))&&(st=getNodeScroll$1(et)),rt){const ct=getBoundingClientRect$1(et,!0,ot,et);lt.x=ct.x+et.clientLeft,lt.y=ct.y+et.clientTop}else it&&(lt.x=getWindowScrollBarX$1(it));return{x:at.left+st.scrollLeft-lt.x,y:at.top+st.scrollTop-lt.y,width:at.width,height:at.height}}function getTrueOffsetParent$1(tt,et){return!isHTMLElement$3(tt)||getComputedStyle$2(tt).position==="fixed"?null:et?et(tt):tt.offsetParent}function getOffsetParent$1(tt,et){const nt=getWindow$1(tt);if(!isHTMLElement$3(tt))return nt;let rt=getTrueOffsetParent$1(tt,et);for(;rt&&isTableElement$1(rt)&&getComputedStyle$2(rt).position==="static";)rt=getTrueOffsetParent$1(rt,et);return rt&&(getNodeName$1(rt)==="html"||getNodeName$1(rt)==="body"&&getComputedStyle$2(rt).position==="static"&&!isContainingBlock(rt))?nt:rt||getContainingBlock$1(tt)||nt}const getElementRects=async function(tt){let{reference:et,floating:nt,strategy:rt}=tt;const it=this.getOffsetParent||getOffsetParent$1,ot=this.getDimensions;return{reference:getRectRelativeToOffsetParent(et,await it(nt),rt),floating:{x:0,y:0,...await ot(nt)}}};function isRTL(tt){return getComputedStyle$2(tt).direction==="rtl"}const platform={convertOffsetParentRelativeRectToViewportRelativeRect,getDocumentElement:getDocumentElement$1,getClippingRect:getClippingRect$1,getOffsetParent:getOffsetParent$1,getElementRects,getClientRects,getDimensions:getDimensions$1,getScale:getScale$1,isElement:isElement$1,isRTL};function observeMove(tt,et){let nt=null,rt;const it=getDocumentElement$1(tt);function ot(){clearTimeout(rt),nt&&nt.disconnect(),nt=null}function at(st,lt){st===void 0&&(st=!1),lt===void 0&&(lt=1),ot();const{left:ct,top:ut,width:ht,height:dt}=tt.getBoundingClientRect();if(st||et(),!ht||!dt)return;const pt=floor(ut),mt=floor(it.clientWidth-(ct+ht)),gt=floor(it.clientHeight-(ut+dt)),yt=floor(ct),vt={rootMargin:-pt+"px "+-mt+"px "+-gt+"px "+-yt+"px",threshold:max$5(0,min$4(1,lt))||1};let xt=!0;function kt(St){const Tt=St[0].intersectionRatio;if(Tt!==lt){if(!xt)return at();Tt?at(!1,Tt):rt=setTimeout(()=>{at(!1,1e-7)},100)}xt=!1}try{nt=new IntersectionObserver(kt,{...vt,root:it.ownerDocument})}catch{nt=new IntersectionObserver(kt,vt)}nt.observe(tt)}return at(!0),ot}function autoUpdate(tt,et,nt,rt){rt===void 0&&(rt={});const{ancestorScroll:it=!0,ancestorResize:ot=!0,elementResize:at=typeof ResizeObserver=="function",layoutShift:st=typeof IntersectionObserver=="function",animationFrame:lt=!1}=rt,ct=unwrapElement(tt),ut=it||ot?[...ct?getOverflowAncestors(ct):[],...getOverflowAncestors(et)]:[];ut.forEach(bt=>{it&&bt.addEventListener("scroll",nt,{passive:!0}),ot&&bt.addEventListener("resize",nt)});const ht=ct&&st?observeMove(ct,nt):null;let dt=-1,pt=null;at&&(pt=new ResizeObserver(bt=>{let[vt]=bt;vt&&vt.target===ct&&pt&&(pt.unobserve(et),cancelAnimationFrame(dt),dt=requestAnimationFrame(()=>{pt&&pt.observe(et)})),nt()}),ct&&!lt&&pt.observe(ct),pt.observe(et));let mt,gt=lt?getBoundingClientRect$1(tt):null;lt&&yt();function yt(){const bt=getBoundingClientRect$1(tt);gt&&(bt.x!==gt.x||bt.y!==gt.y||bt.width!==gt.width||bt.height!==gt.height)&&nt(),gt=bt,mt=requestAnimationFrame(yt)}return nt(),()=>{ut.forEach(bt=>{it&&bt.removeEventListener("scroll",nt),ot&&bt.removeEventListener("resize",nt)}),ht&&ht(),pt&&pt.disconnect(),pt=null,lt&&cancelAnimationFrame(mt)}}const computePosition=(tt,et,nt)=>{const rt=new Map,it={platform,...nt},ot={...it.platform,_c:rt};return computePosition$1(tt,et,{...it,platform:ot})},arrow$2=tt=>{function et(nt){return{}.hasOwnProperty.call(nt,"current")}return{name:"arrow",options:tt,fn(nt){const{element:rt,padding:it}=typeof tt=="function"?tt(nt):tt;return rt&&et(rt)?rt.current!=null?arrow$3({element:rt.current,padding:it}).fn(nt):{}:rt?arrow$3({element:rt,padding:it}).fn(nt):{}}}};var index$2=typeof document<"u"?reactExports.useLayoutEffect:reactExports.useEffect;function deepEqual$3(tt,et){if(tt===et)return!0;if(typeof tt!=typeof et)return!1;if(typeof tt=="function"&&tt.toString()===et.toString())return!0;let nt,rt,it;if(tt&&et&&typeof tt=="object"){if(Array.isArray(tt)){if(nt=tt.length,nt!=et.length)return!1;for(rt=nt;rt--!==0;)if(!deepEqual$3(tt[rt],et[rt]))return!1;return!0}if(it=Object.keys(tt),nt=it.length,nt!==Object.keys(et).length)return!1;for(rt=nt;rt--!==0;)if(!{}.hasOwnProperty.call(et,it[rt]))return!1;for(rt=nt;rt--!==0;){const ot=it[rt];if(!(ot==="_owner"&&tt.$$typeof)&&!deepEqual$3(tt[ot],et[ot]))return!1}return!0}return tt!==tt&&et!==et}function getDPR(tt){return typeof window>"u"?1:(tt.ownerDocument.defaultView||window).devicePixelRatio||1}function roundByDPR(tt,et){const nt=getDPR(tt);return Math.round(et*nt)/nt}function useLatestRef(tt){const et=reactExports.useRef(tt);return index$2(()=>{et.current=tt}),et}function useFloating(tt){tt===void 0&&(tt={});const{placement:et="bottom",strategy:nt="absolute",middleware:rt=[],platform:it,elements:{reference:ot,floating:at}={},transform:st=!0,whileElementsMounted:lt,open:ct}=tt,[ut,ht]=reactExports.useState({x:0,y:0,strategy:nt,placement:et,middlewareData:{},isPositioned:!1}),[dt,pt]=reactExports.useState(rt);deepEqual$3(dt,rt)||pt(rt);const[mt,gt]=reactExports.useState(null),[yt,bt]=reactExports.useState(null),vt=reactExports.useCallback(Ot=>{Ot!=Tt.current&&(Tt.current=Ot,gt(Ot))},[gt]),xt=reactExports.useCallback(Ot=>{Ot!==At.current&&(At.current=Ot,bt(Ot))},[bt]),kt=ot||mt,St=at||yt,Tt=reactExports.useRef(null),At=reactExports.useRef(null),Et=reactExports.useRef(ut),$t=useLatestRef(lt),Dt=useLatestRef(it),jt=reactExports.useCallback(()=>{if(!Tt.current||!At.current)return;const Ot={placement:et,strategy:nt,middleware:dt};Dt.current&&(Ot.platform=Dt.current),computePosition(Tt.current,At.current,Ot).then(Wt=>{const zt={...Wt,isPositioned:!0};Pt.current&&!deepEqual$3(Et.current,zt)&&(Et.current=zt,reactDomExports.flushSync(()=>{ht(zt)}))})},[dt,et,nt,Dt]);index$2(()=>{ct===!1&&Et.current.isPositioned&&(Et.current.isPositioned=!1,ht(Ot=>({...Ot,isPositioned:!1})))},[ct]);const Pt=reactExports.useRef(!1);index$2(()=>(Pt.current=!0,()=>{Pt.current=!1}),[]),index$2(()=>{if(kt&&(Tt.current=kt),St&&(At.current=St),kt&&St){if($t.current)return $t.current(kt,St,jt);jt()}},[kt,St,jt,$t]);const Ct=reactExports.useMemo(()=>({reference:Tt,floating:At,setReference:vt,setFloating:xt}),[vt,xt]),wt=reactExports.useMemo(()=>({reference:kt,floating:St}),[kt,St]),It=reactExports.useMemo(()=>{const Ot={position:nt,left:0,top:0};if(!wt.floating)return Ot;const Wt=roundByDPR(wt.floating,ut.x),zt=roundByDPR(wt.floating,ut.y);return st?{...Ot,transform:"translate("+Wt+"px, "+zt+"px)",...getDPR(wt.floating)>=1.5&&{willChange:"transform"}}:{position:nt,left:Wt,top:zt}},[nt,st,wt.floating,ut.x,ut.y]);return reactExports.useMemo(()=>({...ut,update:jt,refs:Ct,elements:wt,floatingStyles:It}),[ut,jt,Ct,wt,It])}const $7e8f5cd07187803e$export$21b07c8f274aebd5=reactExports.forwardRef((tt,et)=>{const{children:nt,width:rt=10,height:it=5,...ot}=tt;return reactExports.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.svg,_extends$u({},ot,{ref:et,width:rt,height:it,viewBox:"0 0 30 10",preserveAspectRatio:"none"}),tt.asChild?nt:reactExports.createElement("polygon",{points:"0,0 30,0 15,10"}))}),$7e8f5cd07187803e$export$be92b6f5f03c0fe9=$7e8f5cd07187803e$export$21b07c8f274aebd5;function $db6c3485150b8e66$export$1ab7ae714698c4b8(tt){const[et,nt]=reactExports.useState(void 0);return $9f79659886946c16$export$e5c5a5f917a5871c(()=>{if(tt){nt({width:tt.offsetWidth,height:tt.offsetHeight});const rt=new ResizeObserver(it=>{if(!Array.isArray(it)||!it.length)return;const ot=it[0];let at,st;if("borderBoxSize"in ot){const lt=ot.borderBoxSize,ct=Array.isArray(lt)?lt[0]:lt;at=ct.inlineSize,st=ct.blockSize}else at=tt.offsetWidth,st=tt.offsetHeight;nt({width:at,height:st})});return rt.observe(tt,{box:"border-box"}),()=>rt.unobserve(tt)}else nt(void 0)},[tt]),et}const $cf1ac5d9fe0e8206$var$POPPER_NAME="Popper",[$cf1ac5d9fe0e8206$var$createPopperContext,$cf1ac5d9fe0e8206$export$722aac194ae923]=$c512c27ab02ef895$export$50c7b4e9d9f19c1($cf1ac5d9fe0e8206$var$POPPER_NAME),[$cf1ac5d9fe0e8206$var$PopperProvider,$cf1ac5d9fe0e8206$var$usePopperContext]=$cf1ac5d9fe0e8206$var$createPopperContext($cf1ac5d9fe0e8206$var$POPPER_NAME),$cf1ac5d9fe0e8206$export$badac9ada3a0bdf9=tt=>{const{__scopePopper:et,children:nt}=tt,[rt,it]=reactExports.useState(null);return reactExports.createElement($cf1ac5d9fe0e8206$var$PopperProvider,{scope:et,anchor:rt,onAnchorChange:it},nt)},$cf1ac5d9fe0e8206$var$ANCHOR_NAME="PopperAnchor",$cf1ac5d9fe0e8206$export$ecd4e1ccab6ed6d=reactExports.forwardRef((tt,et)=>{const{__scopePopper:nt,virtualRef:rt,...it}=tt,ot=$cf1ac5d9fe0e8206$var$usePopperContext($cf1ac5d9fe0e8206$var$ANCHOR_NAME,nt),at=reactExports.useRef(null),st=$6ed0406888f73fc4$export$c7b2cbe3552a0d05(et,at);return reactExports.useEffect(()=>{ot.onAnchorChange((rt==null?void 0:rt.current)||at.current)}),rt?null:reactExports.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div,_extends$u({},it,{ref:st}))}),$cf1ac5d9fe0e8206$var$CONTENT_NAME="PopperContent",[$cf1ac5d9fe0e8206$var$PopperContentProvider,$cf1ac5d9fe0e8206$var$useContentContext]=$cf1ac5d9fe0e8206$var$createPopperContext($cf1ac5d9fe0e8206$var$CONTENT_NAME),$cf1ac5d9fe0e8206$export$bc4ae5855d3c4fc=reactExports.forwardRef((tt,et)=>{var nt,rt,it,ot,at,st,lt,ct;const{__scopePopper:ut,side:ht="bottom",sideOffset:dt=0,align:pt="center",alignOffset:mt=0,arrowPadding:gt=0,avoidCollisions:yt=!0,collisionBoundary:bt=[],collisionPadding:vt=0,sticky:xt="partial",hideWhenDetached:kt=!1,updatePositionStrategy:St="optimized",onPlaced:Tt,...At}=tt,Et=$cf1ac5d9fe0e8206$var$usePopperContext($cf1ac5d9fe0e8206$var$CONTENT_NAME,ut),[$t,Dt]=reactExports.useState(null),jt=$6ed0406888f73fc4$export$c7b2cbe3552a0d05(et,$n=>Dt($n)),[Pt,Ct]=reactExports.useState(null),wt=$db6c3485150b8e66$export$1ab7ae714698c4b8(Pt),It=(nt=wt==null?void 0:wt.width)!==null&&nt!==void 0?nt:0,Ot=(rt=wt==null?void 0:wt.height)!==null&&rt!==void 0?rt:0,Wt=ht+(pt!=="center"?"-"+pt:""),zt=typeof vt=="number"?vt:{top:0,right:0,bottom:0,left:0,...vt},Ft=Array.isArray(bt)?bt:[bt],Nt=Ft.length>0,Ut={padding:zt,boundary:Ft.filter($cf1ac5d9fe0e8206$var$isNotNull),altBoundary:Nt},{refs:Mt,floatingStyles:Ht,placement:en,isPositioned:sn,middlewareData:Kt}=useFloating({strategy:"fixed",placement:Wt,whileElementsMounted:(...$n)=>autoUpdate(...$n,{animationFrame:St==="always"}),elements:{reference:Et.anchor},middleware:[offset$3({mainAxis:dt+Ot,alignmentAxis:mt}),yt&&shift({mainAxis:!0,crossAxis:!1,limiter:xt==="partial"?limitShift():void 0,...Ut}),yt&&flip$2({...Ut}),size({...Ut,apply:({elements:$n,rects:Nn,availableWidth:Tn,availableHeight:cn})=>{const{width:mn,height:In}=Nn.reference,An=$n.floating.style;An.setProperty("--radix-popper-available-width",`${Tn}px`),An.setProperty("--radix-popper-available-height",`${cn}px`),An.setProperty("--radix-popper-anchor-width",`${mn}px`),An.setProperty("--radix-popper-anchor-height",`${In}px`)}}),Pt&&arrow$2({element:Pt,padding:gt}),$cf1ac5d9fe0e8206$var$transformOrigin({arrowWidth:It,arrowHeight:Ot}),kt&&hide$2({strategy:"referenceHidden",...Ut})]}),[rn,nn]=$cf1ac5d9fe0e8206$var$getSideAndAlignFromPlacement(en),hn=$b1b2314f5f9a1d84$export$25bec8c6f54ee79a(Tt);$9f79659886946c16$export$e5c5a5f917a5871c(()=>{sn&&(hn==null||hn())},[sn,hn]);const vn=(it=Kt.arrow)===null||it===void 0?void 0:it.x,an=(ot=Kt.arrow)===null||ot===void 0?void 0:ot.y,Qt=((at=Kt.arrow)===null||at===void 0?void 0:at.centerOffset)!==0,[_n,Pn]=reactExports.useState();return $9f79659886946c16$export$e5c5a5f917a5871c(()=>{$t&&Pn(window.getComputedStyle($t).zIndex)},[$t]),reactExports.createElement("div",{ref:Mt.setFloating,"data-radix-popper-content-wrapper":"",style:{...Ht,transform:sn?Ht.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:_n,"--radix-popper-transform-origin":[(st=Kt.transformOrigin)===null||st===void 0?void 0:st.x,(lt=Kt.transformOrigin)===null||lt===void 0?void 0:lt.y].join(" ")},dir:tt.dir},reactExports.createElement($cf1ac5d9fe0e8206$var$PopperContentProvider,{scope:ut,placedSide:rn,onArrowChange:Ct,arrowX:vn,arrowY:an,shouldHideArrow:Qt},reactExports.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div,_extends$u({"data-side":rn,"data-align":nn},At,{ref:jt,style:{...At.style,animation:sn?void 0:"none",opacity:(ct=Kt.hide)!==null&&ct!==void 0&&ct.referenceHidden?0:void 0}}))))}),$cf1ac5d9fe0e8206$var$ARROW_NAME="PopperArrow",$cf1ac5d9fe0e8206$var$OPPOSITE_SIDE={top:"bottom",right:"left",bottom:"top",left:"right"},$cf1ac5d9fe0e8206$export$79d62cd4e10a3fd0=reactExports.forwardRef(function(et,nt){const{__scopePopper:rt,...it}=et,ot=$cf1ac5d9fe0e8206$var$useContentContext($cf1ac5d9fe0e8206$var$ARROW_NAME,rt),at=$cf1ac5d9fe0e8206$var$OPPOSITE_SIDE[ot.placedSide];return reactExports.createElement("span",{ref:ot.onArrowChange,style:{position:"absolute",left:ot.arrowX,top:ot.arrowY,[at]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[ot.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[ot.placedSide],visibility:ot.shouldHideArrow?"hidden":void 0}},reactExports.createElement($7e8f5cd07187803e$export$be92b6f5f03c0fe9,_extends$u({},it,{ref:nt,style:{...it.style,display:"block"}})))});function $cf1ac5d9fe0e8206$var$isNotNull(tt){return tt!==null}const $cf1ac5d9fe0e8206$var$transformOrigin=tt=>({name:"transformOrigin",options:tt,fn(et){var nt,rt,it,ot,at;const{placement:st,rects:lt,middlewareData:ct}=et,ht=((nt=ct.arrow)===null||nt===void 0?void 0:nt.centerOffset)!==0,dt=ht?0:tt.arrowWidth,pt=ht?0:tt.arrowHeight,[mt,gt]=$cf1ac5d9fe0e8206$var$getSideAndAlignFromPlacement(st),yt={start:"0%",center:"50%",end:"100%"}[gt],bt=((rt=(it=ct.arrow)===null||it===void 0?void 0:it.x)!==null&&rt!==void 0?rt:0)+dt/2,vt=((ot=(at=ct.arrow)===null||at===void 0?void 0:at.y)!==null&&ot!==void 0?ot:0)+pt/2;let xt="",kt="";return mt==="bottom"?(xt=ht?yt:`${bt}px`,kt=`${-pt}px`):mt==="top"?(xt=ht?yt:`${bt}px`,kt=`${lt.floating.height+pt}px`):mt==="right"?(xt=`${-pt}px`,kt=ht?yt:`${vt}px`):mt==="left"&&(xt=`${lt.floating.width+pt}px`,kt=ht?yt:`${vt}px`),{data:{x:xt,y:kt}}}});function $cf1ac5d9fe0e8206$var$getSideAndAlignFromPlacement(tt){const[et,nt="center"]=tt.split("-");return[et,nt]}const $cf1ac5d9fe0e8206$export$be92b6f5f03c0fe9=$cf1ac5d9fe0e8206$export$badac9ada3a0bdf9,$cf1ac5d9fe0e8206$export$b688253958b8dfe7=$cf1ac5d9fe0e8206$export$ecd4e1ccab6ed6d,$cf1ac5d9fe0e8206$export$7c6e2c02157bb7d2=$cf1ac5d9fe0e8206$export$bc4ae5855d3c4fc,$cf1ac5d9fe0e8206$export$21b07c8f274aebd5=$cf1ac5d9fe0e8206$export$79d62cd4e10a3fd0;function $fe963b355347cc68$export$3e6543de14f8614f(tt,et){return reactExports.useReducer((nt,rt)=>{const it=et[nt][rt];return it??nt},tt)}const $921a889cee6df7e8$export$99c2b779aa4e8b8b=tt=>{const{present:et,children:nt}=tt,rt=$921a889cee6df7e8$var$usePresence(et),it=typeof nt=="function"?nt({present:rt.isPresent}):reactExports.Children.only(nt),ot=$6ed0406888f73fc4$export$c7b2cbe3552a0d05(rt.ref,it.ref);return typeof nt=="function"||rt.isPresent?reactExports.cloneElement(it,{ref:ot}):null};$921a889cee6df7e8$export$99c2b779aa4e8b8b.displayName="Presence";function $921a889cee6df7e8$var$usePresence(tt){const[et,nt]=reactExports.useState(),rt=reactExports.useRef({}),it=reactExports.useRef(tt),ot=reactExports.useRef("none"),at=tt?"mounted":"unmounted",[st,lt]=$fe963b355347cc68$export$3e6543de14f8614f(at,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return reactExports.useEffect(()=>{const ct=$921a889cee6df7e8$var$getAnimationName(rt.current);ot.current=st==="mounted"?ct:"none"},[st]),$9f79659886946c16$export$e5c5a5f917a5871c(()=>{const ct=rt.current,ut=it.current;if(ut!==tt){const dt=ot.current,pt=$921a889cee6df7e8$var$getAnimationName(ct);tt?lt("MOUNT"):pt==="none"||(ct==null?void 0:ct.display)==="none"?lt("UNMOUNT"):lt(ut&&dt!==pt?"ANIMATION_OUT":"UNMOUNT"),it.current=tt}},[tt,lt]),$9f79659886946c16$export$e5c5a5f917a5871c(()=>{if(et){const ct=ht=>{const pt=$921a889cee6df7e8$var$getAnimationName(rt.current).includes(ht.animationName);ht.target===et&&pt&&reactDomExports.flushSync(()=>lt("ANIMATION_END"))},ut=ht=>{ht.target===et&&(ot.current=$921a889cee6df7e8$var$getAnimationName(rt.current))};return et.addEventListener("animationstart",ut),et.addEventListener("animationcancel",ct),et.addEventListener("animationend",ct),()=>{et.removeEventListener("animationstart",ut),et.removeEventListener("animationcancel",ct),et.removeEventListener("animationend",ct)}}else lt("ANIMATION_END")},[et,lt]),{isPresent:["mounted","unmountSuspended"].includes(st),ref:reactExports.useCallback(ct=>{ct&&(rt.current=getComputedStyle(ct)),nt(ct)},[])}}function $921a889cee6df7e8$var$getAnimationName(tt){return(tt==null?void 0:tt.animationName)||"none"}function $71cd76cc60e0454e$export$6f32135080cb4c3({prop:tt,defaultProp:et,onChange:nt=()=>{}}){const[rt,it]=$71cd76cc60e0454e$var$useUncontrolledState({defaultProp:et,onChange:nt}),ot=tt!==void 0,at=ot?tt:rt,st=$b1b2314f5f9a1d84$export$25bec8c6f54ee79a(nt),lt=reactExports.useCallback(ct=>{if(ot){const ht=typeof ct=="function"?ct(tt):ct;ht!==tt&&st(ht)}else it(ct)},[ot,tt,it,st]);return[at,lt]}function $71cd76cc60e0454e$var$useUncontrolledState({defaultProp:tt,onChange:et}){const nt=reactExports.useState(tt),[rt]=nt,it=reactExports.useRef(rt),ot=$b1b2314f5f9a1d84$export$25bec8c6f54ee79a(et);return reactExports.useEffect(()=>{it.current!==rt&&(ot(rt),it.current=rt)},[rt,it,ot]),nt}const $ea1ef594cf570d83$export$439d29a4e110a164=reactExports.forwardRef((tt,et)=>reactExports.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.span,_extends$u({},tt,{ref:et,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...tt.style}}))),$ea1ef594cf570d83$export$be92b6f5f03c0fe9=$ea1ef594cf570d83$export$439d29a4e110a164,[$a093c7e1ec25a057$var$createTooltipContext,$a093c7e1ec25a057$export$1c540a2224f0d865]=$c512c27ab02ef895$export$50c7b4e9d9f19c1("Tooltip",[$cf1ac5d9fe0e8206$export$722aac194ae923]),$a093c7e1ec25a057$var$usePopperScope=$cf1ac5d9fe0e8206$export$722aac194ae923(),$a093c7e1ec25a057$var$PROVIDER_NAME="TooltipProvider",$a093c7e1ec25a057$var$TOOLTIP_OPEN="tooltip.open",[$a093c7e1ec25a057$var$TooltipProviderContextProvider,$a093c7e1ec25a057$var$useTooltipProviderContext]=$a093c7e1ec25a057$var$createTooltipContext($a093c7e1ec25a057$var$PROVIDER_NAME),$a093c7e1ec25a057$var$TOOLTIP_NAME="Tooltip",[$a093c7e1ec25a057$var$TooltipContextProvider,$a093c7e1ec25a057$var$useTooltipContext]=$a093c7e1ec25a057$var$createTooltipContext($a093c7e1ec25a057$var$TOOLTIP_NAME),$a093c7e1ec25a057$export$28c660c63b792dea=tt=>{const{__scopeTooltip:et,children:nt,open:rt,defaultOpen:it=!1,onOpenChange:ot,disableHoverableContent:at,delayDuration:st}=tt,lt=$a093c7e1ec25a057$var$useTooltipProviderContext($a093c7e1ec25a057$var$TOOLTIP_NAME,tt.__scopeTooltip),ct=$a093c7e1ec25a057$var$usePopperScope(et),[ut,ht]=reactExports.useState(null),dt=$1746a345f3d73bb7$export$f680877a34711e37(),pt=reactExports.useRef(0),mt=at??lt.disableHoverableContent,gt=st??lt.delayDuration,yt=reactExports.useRef(!1),[bt=!1,vt]=$71cd76cc60e0454e$export$6f32135080cb4c3({prop:rt,defaultProp:it,onChange:At=>{At?(lt.onOpen(),document.dispatchEvent(new CustomEvent($a093c7e1ec25a057$var$TOOLTIP_OPEN))):lt.onClose(),ot==null||ot(At)}}),xt=reactExports.useMemo(()=>bt?yt.current?"delayed-open":"instant-open":"closed",[bt]),kt=reactExports.useCallback(()=>{window.clearTimeout(pt.current),yt.current=!1,vt(!0)},[vt]),St=reactExports.useCallback(()=>{window.clearTimeout(pt.current),vt(!1)},[vt]),Tt=reactExports.useCallback(()=>{window.clearTimeout(pt.current),pt.current=window.setTimeout(()=>{yt.current=!0,vt(!0)},gt)},[gt,vt]);return reactExports.useEffect(()=>()=>window.clearTimeout(pt.current),[]),reactExports.createElement($cf1ac5d9fe0e8206$export$be92b6f5f03c0fe9,ct,reactExports.createElement($a093c7e1ec25a057$var$TooltipContextProvider,{scope:et,contentId:dt,open:bt,stateAttribute:xt,trigger:ut,onTriggerChange:ht,onTriggerEnter:reactExports.useCallback(()=>{lt.isOpenDelayed?Tt():kt()},[lt.isOpenDelayed,Tt,kt]),onTriggerLeave:reactExports.useCallback(()=>{mt?St():window.clearTimeout(pt.current)},[St,mt]),onOpen:kt,onClose:St,disableHoverableContent:mt},nt))},$a093c7e1ec25a057$var$TRIGGER_NAME="TooltipTrigger",$a093c7e1ec25a057$export$8c610744efcf8a1d=reactExports.forwardRef((tt,et)=>{const{__scopeTooltip:nt,...rt}=tt,it=$a093c7e1ec25a057$var$useTooltipContext($a093c7e1ec25a057$var$TRIGGER_NAME,nt),ot=$a093c7e1ec25a057$var$useTooltipProviderContext($a093c7e1ec25a057$var$TRIGGER_NAME,nt),at=$a093c7e1ec25a057$var$usePopperScope(nt),st=reactExports.useRef(null),lt=$6ed0406888f73fc4$export$c7b2cbe3552a0d05(et,st,it.onTriggerChange),ct=reactExports.useRef(!1),ut=reactExports.useRef(!1),ht=reactExports.useCallback(()=>ct.current=!1,[]);return reactExports.useEffect(()=>()=>document.removeEventListener("pointerup",ht),[ht]),reactExports.createElement($cf1ac5d9fe0e8206$export$b688253958b8dfe7,_extends$u({asChild:!0},at),reactExports.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.button,_extends$u({"aria-describedby":it.open?it.contentId:void 0,"data-state":it.stateAttribute},rt,{ref:lt,onPointerMove:$e42e1063c40fb3ef$export$b9ecd428b558ff10(tt.onPointerMove,dt=>{dt.pointerType!=="touch"&&!ut.current&&!ot.isPointerInTransitRef.current&&(it.onTriggerEnter(),ut.current=!0)}),onPointerLeave:$e42e1063c40fb3ef$export$b9ecd428b558ff10(tt.onPointerLeave,()=>{it.onTriggerLeave(),ut.current=!1}),onPointerDown:$e42e1063c40fb3ef$export$b9ecd428b558ff10(tt.onPointerDown,()=>{ct.current=!0,document.addEventListener("pointerup",ht,{once:!0})}),onFocus:$e42e1063c40fb3ef$export$b9ecd428b558ff10(tt.onFocus,()=>{ct.current||it.onOpen()}),onBlur:$e42e1063c40fb3ef$export$b9ecd428b558ff10(tt.onBlur,it.onClose),onClick:$e42e1063c40fb3ef$export$b9ecd428b558ff10(tt.onClick,it.onClose)})))}),$a093c7e1ec25a057$var$PORTAL_NAME="TooltipPortal",[$a093c7e1ec25a057$var$PortalProvider,$a093c7e1ec25a057$var$usePortalContext]=$a093c7e1ec25a057$var$createTooltipContext($a093c7e1ec25a057$var$PORTAL_NAME,{forceMount:void 0}),$a093c7e1ec25a057$var$CONTENT_NAME="TooltipContent",$a093c7e1ec25a057$export$e9003e2be37ec060=reactExports.forwardRef((tt,et)=>{const nt=$a093c7e1ec25a057$var$usePortalContext($a093c7e1ec25a057$var$CONTENT_NAME,tt.__scopeTooltip),{forceMount:rt=nt.forceMount,side:it="top",...ot}=tt,at=$a093c7e1ec25a057$var$useTooltipContext($a093c7e1ec25a057$var$CONTENT_NAME,tt.__scopeTooltip);return reactExports.createElement($921a889cee6df7e8$export$99c2b779aa4e8b8b,{present:rt||at.open},at.disableHoverableContent?reactExports.createElement($a093c7e1ec25a057$var$TooltipContentImpl,_extends$u({side:it},ot,{ref:et})):reactExports.createElement($a093c7e1ec25a057$var$TooltipContentHoverable,_extends$u({side:it},ot,{ref:et})))}),$a093c7e1ec25a057$var$TooltipContentHoverable=reactExports.forwardRef((tt,et)=>{const nt=$a093c7e1ec25a057$var$useTooltipContext($a093c7e1ec25a057$var$CONTENT_NAME,tt.__scopeTooltip),rt=$a093c7e1ec25a057$var$useTooltipProviderContext($a093c7e1ec25a057$var$CONTENT_NAME,tt.__scopeTooltip),it=reactExports.useRef(null),ot=$6ed0406888f73fc4$export$c7b2cbe3552a0d05(et,it),[at,st]=reactExports.useState(null),{trigger:lt,onClose:ct}=nt,ut=it.current,{onPointerInTransitChange:ht}=rt,dt=reactExports.useCallback(()=>{st(null),ht(!1)},[ht]),pt=reactExports.useCallback((mt,gt)=>{const yt=mt.currentTarget,bt={x:mt.clientX,y:mt.clientY},vt=$a093c7e1ec25a057$var$getExitSideFromRect(bt,yt.getBoundingClientRect()),xt=$a093c7e1ec25a057$var$getPaddedExitPoints(bt,vt),kt=$a093c7e1ec25a057$var$getPointsFromRect(gt.getBoundingClientRect()),St=$a093c7e1ec25a057$var$getHull([...xt,...kt]);st(St),ht(!0)},[ht]);return reactExports.useEffect(()=>()=>dt(),[dt]),reactExports.useEffect(()=>{if(lt&&ut){const mt=yt=>pt(yt,ut),gt=yt=>pt(yt,lt);return lt.addEventListener("pointerleave",mt),ut.addEventListener("pointerleave",gt),()=>{lt.removeEventListener("pointerleave",mt),ut.removeEventListener("pointerleave",gt)}}},[lt,ut,pt,dt]),reactExports.useEffect(()=>{if(at){const mt=gt=>{const yt=gt.target,bt={x:gt.clientX,y:gt.clientY},vt=(lt==null?void 0:lt.contains(yt))||(ut==null?void 0:ut.contains(yt)),xt=!$a093c7e1ec25a057$var$isPointInPolygon(bt,at);vt?dt():xt&&(dt(),ct())};return document.addEventListener("pointermove",mt),()=>document.removeEventListener("pointermove",mt)}},[lt,ut,at,ct,dt]),reactExports.createElement($a093c7e1ec25a057$var$TooltipContentImpl,_extends$u({},tt,{ref:ot}))}),[$a093c7e1ec25a057$var$VisuallyHiddenContentContextProvider,$a093c7e1ec25a057$var$useVisuallyHiddenContentContext]=$a093c7e1ec25a057$var$createTooltipContext($a093c7e1ec25a057$var$TOOLTIP_NAME,{isInside:!1}),$a093c7e1ec25a057$var$TooltipContentImpl=reactExports.forwardRef((tt,et)=>{const{__scopeTooltip:nt,children:rt,"aria-label":it,onEscapeKeyDown:ot,onPointerDownOutside:at,...st}=tt,lt=$a093c7e1ec25a057$var$useTooltipContext($a093c7e1ec25a057$var$CONTENT_NAME,nt),ct=$a093c7e1ec25a057$var$usePopperScope(nt),{onClose:ut}=lt;return reactExports.useEffect(()=>(document.addEventListener($a093c7e1ec25a057$var$TOOLTIP_OPEN,ut),()=>document.removeEventListener($a093c7e1ec25a057$var$TOOLTIP_OPEN,ut)),[ut]),reactExports.useEffect(()=>{if(lt.trigger){const ht=dt=>{const pt=dt.target;pt!=null&&pt.contains(lt.trigger)&&ut()};return window.addEventListener("scroll",ht,{capture:!0}),()=>window.removeEventListener("scroll",ht,{capture:!0})}},[lt.trigger,ut]),reactExports.createElement($5cb92bef7577960e$export$177fb62ff3ec1f22,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:ot,onPointerDownOutside:at,onFocusOutside:ht=>ht.preventDefault(),onDismiss:ut},reactExports.createElement($cf1ac5d9fe0e8206$export$7c6e2c02157bb7d2,_extends$u({"data-state":lt.stateAttribute},ct,st,{ref:et,style:{...st.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"}}),reactExports.createElement($5e63c961fc1ce211$export$d9f1ccf0bdb05d45,null,rt),reactExports.createElement($a093c7e1ec25a057$var$VisuallyHiddenContentContextProvider,{scope:nt,isInside:!0},reactExports.createElement($ea1ef594cf570d83$export$be92b6f5f03c0fe9,{id:lt.contentId,role:"tooltip"},it||rt))))}),$a093c7e1ec25a057$var$ARROW_NAME="TooltipArrow",$a093c7e1ec25a057$export$c27ee0ad710f7559=reactExports.forwardRef((tt,et)=>{const{__scopeTooltip:nt,...rt}=tt,it=$a093c7e1ec25a057$var$usePopperScope(nt);return $a093c7e1ec25a057$var$useVisuallyHiddenContentContext($a093c7e1ec25a057$var$ARROW_NAME,nt).isInside?null:reactExports.createElement($cf1ac5d9fe0e8206$export$21b07c8f274aebd5,_extends$u({},it,rt,{ref:et}))});function $a093c7e1ec25a057$var$getExitSideFromRect(tt,et){const nt=Math.abs(et.top-tt.y),rt=Math.abs(et.bottom-tt.y),it=Math.abs(et.right-tt.x),ot=Math.abs(et.left-tt.x);switch(Math.min(nt,rt,it,ot)){case ot:return"left";case it:return"right";case nt:return"top";case rt:return"bottom";default:throw new Error("unreachable")}}function $a093c7e1ec25a057$var$getPaddedExitPoints(tt,et,nt=5){const rt=[];switch(et){case"top":rt.push({x:tt.x-nt,y:tt.y+nt},{x:tt.x+nt,y:tt.y+nt});break;case"bottom":rt.push({x:tt.x-nt,y:tt.y-nt},{x:tt.x+nt,y:tt.y-nt});break;case"left":rt.push({x:tt.x+nt,y:tt.y-nt},{x:tt.x+nt,y:tt.y+nt});break;case"right":rt.push({x:tt.x-nt,y:tt.y-nt},{x:tt.x-nt,y:tt.y+nt});break}return rt}function $a093c7e1ec25a057$var$getPointsFromRect(tt){const{top:et,right:nt,bottom:rt,left:it}=tt;return[{x:it,y:et},{x:nt,y:et},{x:nt,y:rt},{x:it,y:rt}]}function $a093c7e1ec25a057$var$isPointInPolygon(tt,et){const{x:nt,y:rt}=tt;let it=!1;for(let ot=0,at=et.length-1;otrt!=ut>rt&&nt<(ct-st)*(rt-lt)/(ut-lt)+st&&(it=!it)}return it}function $a093c7e1ec25a057$var$getHull(tt){const et=tt.slice();return et.sort((nt,rt)=>nt.xrt.x?1:nt.yrt.y?1:0),$a093c7e1ec25a057$var$getHullPresorted(et)}function $a093c7e1ec25a057$var$getHullPresorted(tt){if(tt.length<=1)return tt.slice();const et=[];for(let rt=0;rt=2;){const ot=et[et.length-1],at=et[et.length-2];if((ot.x-at.x)*(it.y-at.y)>=(ot.y-at.y)*(it.x-at.x))et.pop();else break}et.push(it)}et.pop();const nt=[];for(let rt=tt.length-1;rt>=0;rt--){const it=tt[rt];for(;nt.length>=2;){const ot=nt[nt.length-1],at=nt[nt.length-2];if((ot.x-at.x)*(it.y-at.y)>=(ot.y-at.y)*(it.x-at.x))nt.pop();else break}nt.push(it)}return nt.pop(),et.length===1&&nt.length===1&&et[0].x===nt[0].x&&et[0].y===nt[0].y?et:et.concat(nt)}const $a093c7e1ec25a057$export$be92b6f5f03c0fe9=$a093c7e1ec25a057$export$28c660c63b792dea,$a093c7e1ec25a057$export$41fb9f06171c75f4=$a093c7e1ec25a057$export$8c610744efcf8a1d,$a093c7e1ec25a057$export$7c6e2c02157bb7d2=$a093c7e1ec25a057$export$e9003e2be37ec060,$a093c7e1ec25a057$export$21b07c8f274aebd5=$a093c7e1ec25a057$export$c27ee0ad710f7559;function _objectWithoutPropertiesLoose$o(tt,et){if(tt==null)return{};var nt={},rt=Object.keys(tt),it,ot;for(ot=0;ot=0)&&(nt[it]=tt[it]);return nt}function _objectWithoutProperties$l(tt,et){if(tt==null)return{};var nt=_objectWithoutPropertiesLoose$o(tt,et),rt,it;if(Object.getOwnPropertySymbols){var ot=Object.getOwnPropertySymbols(tt);for(it=0;it=0)&&Object.prototype.propertyIsEnumerable.call(tt,rt)&&(nt[rt]=tt[rt])}return nt}let LevaErrors;(function(tt){tt[tt.UNSUPPORTED_INPUT=0]="UNSUPPORTED_INPUT",tt[tt.NO_COMPONENT_FOR_TYPE=1]="NO_COMPONENT_FOR_TYPE",tt[tt.UNKNOWN_INPUT=2]="UNKNOWN_INPUT",tt[tt.DUPLICATE_KEYS=3]="DUPLICATE_KEYS",tt[tt.ALREADY_REGISTERED_TYPE=4]="ALREADY_REGISTERED_TYPE",tt[tt.CLIPBOARD_ERROR=5]="CLIPBOARD_ERROR",tt[tt.THEME_ERROR=6]="THEME_ERROR",tt[tt.PATH_DOESNT_EXIST=7]="PATH_DOESNT_EXIST",tt[tt.INPUT_TYPE_OVERRIDE=8]="INPUT_TYPE_OVERRIDE",tt[tt.EMPTY_KEY=9]="EMPTY_KEY"})(LevaErrors||(LevaErrors={}));const ErrorList={[LevaErrors.UNSUPPORTED_INPUT]:(tt,et)=>[`An input with type \`${tt}\` input was found at path \`${et}\` but it's not supported yet.`],[LevaErrors.NO_COMPONENT_FOR_TYPE]:(tt,et)=>[`Type \`${tt}\` found at path \`${et}\` can't be displayed in panel because no component supports it yet.`],[LevaErrors.UNKNOWN_INPUT]:(tt,et)=>[`input at path \`${tt}\` is not recognized.`,et],[LevaErrors.DUPLICATE_KEYS]:(tt,et,nt)=>[`Key \`${tt}\` of path \`${et}\` already exists at path \`${nt}\`. Even nested keys need to be unique. Rename one of the keys.`],[LevaErrors.ALREADY_REGISTERED_TYPE]:tt=>[`Type ${tt} has already been registered. You can't register a component with the same type.`],[LevaErrors.CLIPBOARD_ERROR]:tt=>["Error copying the value",tt],[LevaErrors.THEME_ERROR]:(tt,et)=>[`Error accessing the theme \`${tt}.${et}\` value.`],[LevaErrors.PATH_DOESNT_EXIST]:tt=>[`Error getting the value at path \`${tt}\`. There is probably an error in your \`render\` function.`],[LevaErrors.PATH_DOESNT_EXIST]:tt=>[`Error accessing the value at path \`${tt}\``],[LevaErrors.INPUT_TYPE_OVERRIDE]:(tt,et,nt)=>[`Input at path \`${tt}\` already exists with type: \`${et}\`. Its type cannot be overridden with type \`${nt}\`.`],[LevaErrors.EMPTY_KEY]:()=>["Keys can not be empty, if you want to hide a label use whitespace."]};function _log(tt,et,...nt){const[rt,...it]=ErrorList[et](...nt);console[tt]("LEVA: "+rt,...it)}const warn$3=_log.bind(null,"warn"),log$2=_log.bind(null,"log"),_excluded$a$1=["value"],_excluded2$4$1=["schema"],_excluded3$1$1=["value"],Schemas=[],Plugins={};function getValueType(tt){let{value:et}=tt,nt=_objectWithoutProperties$l(tt,_excluded$a$1);for(let rt of Schemas){const it=rt(et,nt);if(it)return it}}function register(tt,et){let{schema:nt}=et,rt=_objectWithoutProperties$l(et,_excluded2$4$1);if(tt in Plugins){warn$3(LevaErrors.ALREADY_REGISTERED_TYPE,tt);return}Schemas.push((it,ot)=>nt(it,ot)&&tt),Plugins[tt]=rt}function createInternalPlugin(tt){return tt}function normalize$3$1(tt,et,nt,rt){const{normalize:it}=Plugins[tt];if(it)return it(et,nt,rt);if(typeof et!="object"||!("value"in et))return{value:et};const{value:ot}=et,at=_objectWithoutProperties$l(et,_excluded3$1$1);return{value:ot,settings:at}}function sanitize$4(tt,et,nt,rt,it,ot){const{sanitize:at}=Plugins[tt];return at?at(et,nt,rt,it,ot):et}function format$2$1(tt,et,nt){const{format:rt}=Plugins[tt];return rt?rt(et,nt):et}function _defineProperty$G(tt,et,nt){return et in tt?Object.defineProperty(tt,et,{value:nt,enumerable:!0,configurable:!0,writable:!0}):tt[et]=nt,tt}function ownKeys$E(tt,et){var nt=Object.keys(tt);if(Object.getOwnPropertySymbols){var rt=Object.getOwnPropertySymbols(tt);et&&(rt=rt.filter(function(it){return Object.getOwnPropertyDescriptor(tt,it).enumerable})),nt.push.apply(nt,rt)}return nt}function _objectSpread2$1(tt){for(var et=1;ettt>nt?nt:tt{if(tt===""||typeof tt=="number")return tt;try{const et=evaluate(tt);if(!isNaN(et))return et}catch{}return parseFloat(tt)},log10=Math.log(10);function getStep(tt){let et=Math.abs(+String(tt).replace(".",""));if(et===0)return .01;for(;et!==0&&et%10===0;)et/=10;const nt=Math.floor(Math.log(et)/log10)+1,rt=Math.floor(Math.log10(Math.abs(tt))),it=Math.pow(10,rt-nt);return Math.max(it,.001)}const range$8=(tt,et,nt)=>nt===et?0:(clamp$8(tt,et,nt)-et)/(nt-et),invertedRange=(tt,et,nt)=>tt*(nt-et)+et,getUid=()=>"_"+Math.random().toString(36).substr(2,9),parens=/\(([0-9+\-*/^ .]+)\)/,exp$2=/(\d+(?:\.\d+)?) ?\^ ?(\d+(?:\.\d+)?)/,mul=/(\d+(?:\.\d+)?) ?\* ?(\d+(?:\.\d+)?)/,div=/(\d+(?:\.\d+)?) ?\/ ?(\d+(?:\.\d+)?)/,add$5=/(\d+(?:\.\d+)?) ?\+ ?(\d+(?:\.\d+)?)/,sub=/(\d+(?:\.\d+)?) ?- ?(\d+(?:\.\d+)?)/;function evaluate(tt){if(isNaN(Number(tt)))if(parens.test(tt)){const et=tt.replace(parens,(nt,rt)=>String(evaluate(rt)));return evaluate(et)}else if(exp$2.test(tt)){const et=tt.replace(exp$2,(nt,rt,it)=>String(Math.pow(Number(rt),Number(it))));return evaluate(et)}else if(mul.test(tt)){const et=tt.replace(mul,(nt,rt,it)=>String(Number(rt)*Number(it)));return evaluate(et)}else if(div.test(tt)){const et=tt.replace(div,(nt,rt,it)=>{if(it!=0)return String(Number(rt)/Number(it));throw new Error("Division by zero")});return evaluate(et)}else if(add$5.test(tt)){const et=tt.replace(add$5,(nt,rt,it)=>String(Number(rt)+Number(it)));return evaluate(et)}else if(sub.test(tt)){const et=tt.replace(sub,(nt,rt,it)=>String(Number(rt)-Number(it)));return evaluate(et)}else return Number(tt);return Number(tt)}function pick$1(tt,et){return et.reduce((nt,rt)=>(tt&&tt.hasOwnProperty(rt)&&(nt[rt]=tt[rt]),nt),{})}function omit$1(tt,et){const nt=_objectSpread2$1({},tt);return et.forEach(rt=>rt in tt&&delete nt[rt]),nt}function mapArrayToKeys(tt,et){return tt.reduce((nt,rt,it)=>Object.assign(nt,{[et[it]]:rt}),{})}function isObject$o(tt){return Object.prototype.toString.call(tt)==="[object Object]"}const isEmptyObject$1=tt=>isObject$o(tt)&&Object.keys(tt).length===0;let SpecialInputs;(function(tt){tt.BUTTON="BUTTON",tt.BUTTON_GROUP="BUTTON_GROUP",tt.MONITOR="MONITOR",tt.FOLDER="FOLDER"})(SpecialInputs||(SpecialInputs={}));let LevaInputs;(function(tt){tt.SELECT="SELECT",tt.IMAGE="IMAGE",tt.NUMBER="NUMBER",tt.COLOR="COLOR",tt.STRING="STRING",tt.BOOLEAN="BOOLEAN",tt.INTERVAL="INTERVAL",tt.VECTOR3D="VECTOR3D",tt.VECTOR2D="VECTOR2D"})(LevaInputs||(LevaInputs={}));const _excluded$9$1=["type","__customInput"],_excluded2$3$1=["render","label","optional","order","disabled","hint","onChange","onEditStart","onEditEnd","transient"],_excluded3$6=["type"];function parseOptions(tt,et,nt={},rt){var it,ot;if(typeof tt!="object"||Array.isArray(tt))return{type:rt,input:tt,options:_objectSpread2$1({key:et,label:et,optional:!1,disabled:!1,order:0},nt)};if("__customInput"in tt){const{type:St,__customInput:Tt}=tt,At=_objectWithoutProperties$l(tt,_excluded$9$1);return parseOptions(Tt,et,At,St)}const{render:at,label:st,optional:lt,order:ct=0,disabled:ut,hint:ht,onChange:dt,onEditStart:pt,onEditEnd:mt,transient:gt}=tt,yt=_objectWithoutProperties$l(tt,_excluded2$3$1),bt=_objectSpread2$1({render:at,key:et,label:st??et,hint:ht,transient:gt??!!dt,onEditStart:pt,onEditEnd:mt,disabled:ut,optional:lt,order:ct},nt);let{type:vt}=yt,xt=_objectWithoutProperties$l(yt,_excluded3$6);if(vt=rt??vt,vt in SpecialInputs)return{type:vt,input:xt,options:bt};let kt;return rt&&isObject$o(xt)&&"value"in xt?kt=xt.value:kt=isEmptyObject$1(xt)?void 0:xt,{type:vt,input:kt,options:_objectSpread2$1(_objectSpread2$1({},bt),{},{onChange:dt,optional:(it=bt.optional)!==null&&it!==void 0?it:!1,disabled:(ot=bt.disabled)!==null&&ot!==void 0?ot:!1})}}function normalizeInput(tt,et,nt,rt){const it=parseOptions(tt,et),{type:ot,input:at,options:st}=it;if(ot)return ot in SpecialInputs?it:{type:ot,input:normalize$3$1(ot,at,nt,rt),options:st};let lt=getValueType(at);return lt?{type:lt,input:normalize$3$1(lt,at,nt,rt),options:st}:(lt=getValueType({value:at}),lt?{type:lt,input:normalize$3$1(lt,{value:at},nt,rt),options:st}:!1)}function updateInput(tt,et,nt,rt,it){const{value:ot,type:at,settings:st}=tt;tt.value=sanitizeValue({type:at,value:ot,settings:st},et,nt,rt),tt.fromPanel=it}const ValueError=function(et,nt,rt){this.type="LEVA_ERROR",this.message="LEVA: "+et,this.previousValue=nt,this.error=rt};function sanitizeValue({type:tt,value:et,settings:nt},rt,it,ot){const at=tt!=="SELECT"&&typeof rt=="function"?rt(et):rt;let st;try{st=sanitize$4(tt,at,nt,et,it,ot)}catch(lt){throw new ValueError(`The value \`${rt}\` did not result in a correct value.`,et,lt)}return dequal(st,et)?et:st}const debounce$6=(tt,et,nt=!1)=>{let rt=0;return function(){const it=arguments,ot=nt&&!rt,at=()=>tt.apply(this,it);window.clearTimeout(rt),rt=window.setTimeout(at,et),ot&&at()}},multiplyStep=tt=>tt.shiftKey?5:tt.altKey?1/5:1;function render(tt,et){const nt=console.error;console.error=()=>{},ReactDOM.render(tt,et),console.error=nt}const _excluded$8$1=["value"],_excluded2$2$1=["min","max"],schema$3=tt=>{if(typeof tt=="number")return!0;if(typeof tt=="string"){const et=parseFloat(tt);return isNaN(et)?!1:tt.substring((""+et).length).trim().length<4}return!1},sanitize$3=(tt,{min:et=-1/0,max:nt=1/0,suffix:rt})=>{const it=parseFloat(tt);if(tt===""||isNaN(it))throw Error("Invalid number");const ot=clamp$8(it,et,nt);return rt?ot+rt:ot},format$1$2=(tt,{pad:et=0,suffix:nt})=>{const rt=parseFloat(tt).toFixed(et);return nt?rt+nt:rt},normalize$2$2=tt=>{let{value:et}=tt,nt=_objectWithoutProperties$l(tt,_excluded$8$1);const{min:rt=-1/0,max:it=1/0}=nt,ot=_objectWithoutProperties$l(nt,_excluded2$2$1);let at=parseFloat(et);const st=typeof et=="string"?et.substring((""+at).length):void 0;at=clamp$8(at,rt,it);let lt=nt.step;lt||(Number.isFinite(rt)?Number.isFinite(it)?lt=+(Math.abs(it-rt)/100).toPrecision(1):lt=+(Math.abs(at-rt)/100).toPrecision(1):Number.isFinite(it)&&(lt=+(Math.abs(it-at)/100).toPrecision(1)));const ct=lt?getStep(lt)*10:getStep(at);lt=lt||ct/10;const ut=Math.round(clamp$8(Math.log10(1/ct),0,2));return{value:st?at+st:at,settings:_objectSpread2$1({initialValue:at,step:lt,pad:ut,min:rt,max:it,suffix:st},ot)}},sanitizeStep$1=(tt,{step:et,initialValue:nt})=>{const rt=Math.round((tt-nt)/et);return nt+rt*et};var props$3$1=Object.freeze({__proto__:null,schema:schema$3,sanitize:sanitize$3,format:format$1$2,normalize:normalize$2$2,sanitizeStep:sanitizeStep$1});function _extends$t(){return _extends$t=Object.assign?Object.assign.bind():function(tt){for(var et=1;et({colors:{elevation1:"#292d39",elevation2:"#181c20",elevation3:"#373c4b",accent1:"#0066dc",accent2:"#007bff",accent3:"#3c93ff",highlight1:"#535760",highlight2:"#8c92a4",highlight3:"#fefefe",vivid1:"#ffcc00",folderWidgetColor:"$highlight2",folderTextColor:"$highlight3",toolTipBackground:"$highlight3",toolTipText:"$elevation2"},radii:{xs:"2px",sm:"3px",lg:"10px"},space:{xs:"3px",sm:"6px",md:"10px",rowGap:"7px",colGap:"7px"},fonts:{mono:"ui-monospace, SFMono-Regular, Menlo, 'Roboto Mono', monospace",sans:"system-ui, sans-serif"},fontSizes:{root:"11px",toolTip:"$root"},sizes:{rootWidth:"280px",controlWidth:"160px",numberInputMinWidth:"38px",scrubberWidth:"8px",scrubberHeight:"16px",rowHeight:"24px",folderTitleHeight:"20px",checkboxSize:"16px",joystickWidth:"100px",joystickHeight:"100px",colorPickerWidth:"$controlWidth",colorPickerHeight:"100px",imagePreviewWidth:"$controlWidth",imagePreviewHeight:"100px",monitorHeight:"60px",titleBarHeight:"39px"},shadows:{level1:"0 0 9px 0 #00000088",level2:"0 4px 14px #00000033"},borderWidths:{root:"0px",input:"1px",focus:"1px",hover:"1px",active:"1px",folder:"1px"},fontWeights:{label:"normal",folder:"normal",button:"normal"}});function createStateClass(tt,et){const[nt,rt]=tt.split(" "),it={};return nt!=="none"&&(it.boxShadow=`${et.inset?"inset ":""}0 0 0 $borderWidths${[et.key]} $colors${nt!=="default"&&nt||et.borderColor}`),rt&&(it.backgroundColor=rt),it}const utils$r={$inputStyle:()=>tt=>createStateClass(tt,{key:"$input",borderColor:"$highlight1",inset:!0}),$focusStyle:()=>tt=>createStateClass(tt,{key:"$focus",borderColor:"$accent2"}),$hoverStyle:()=>tt=>createStateClass(tt,{key:"$hover",borderColor:"$accent1",inset:!0}),$activeStyle:()=>tt=>createStateClass(tt,{key:"$active",borderColor:"$accent1",inset:!0})},{styled:styled$5,css:css$1,createTheme:createTheme$2,globalCss,keyframes:keyframes$1}=q$7({prefix:"leva",theme:getDefaultTheme(),utils:_objectSpread2$1(_objectSpread2$1({},utils$r),{},{$flex:()=>({display:"flex",alignItems:"center"}),$flexCenter:()=>({display:"flex",alignItems:"center",justifyContent:"center"}),$reset:()=>({outline:"none",fontSize:"inherit",fontWeight:"inherit",color:"inherit",fontFamily:"inherit",border:"none",backgroundColor:"transparent",appearance:"none"}),$draggable:()=>({touchAction:"none",WebkitUserDrag:"none",userSelect:"none"}),$focus:tt=>({"&:focus":utils$r.$focusStyle()(tt)}),$focusWithin:tt=>({"&:focus-within":utils$r.$focusStyle()(tt)}),$hover:tt=>({"&:hover":utils$r.$hoverStyle()(tt)}),$active:tt=>({"&:active":utils$r.$activeStyle()(tt)})})}),globalStyles=globalCss({".leva__panel__dragged":{WebkitUserDrag:"none",userSelect:"none",input:{userSelect:"none"},"*":{cursor:"ew-resize !important"}}});function mergeTheme(tt){const et=getDefaultTheme();if(!tt)return{theme:et,className:""};Object.keys(tt).forEach(rt=>{Object.assign(et[rt],tt[rt])});const nt=createTheme$2(et);return{theme:et,className:nt.className}}function useTh(tt,et){const{theme:nt}=reactExports.useContext(ThemeContext$3);if(!(tt in nt)||!(et in nt[tt]))return warn$3(LevaErrors.THEME_ERROR,tt,et),"";let rt=et;for(;;){let it=nt[tt][rt];if(typeof it=="string"&&it.charAt(0)==="$")rt=it.substr(1);else return it}}const StyledInput$2=styled$5("input",{$reset:"",padding:"0 $sm",width:0,minWidth:0,flex:1,height:"100%",variants:{levaType:{number:{textAlign:"right"}},as:{textarea:{padding:"$sm"}}}}),InnerLabel=styled$5("div",{$draggable:"",height:"100%",$flexCenter:"",position:"relative",padding:"0 $xs",fontSize:"0.8em",opacity:.8,cursor:"default",touchAction:"none",[`& + ${StyledInput$2}`]:{paddingLeft:0}}),InnerNumberLabel=styled$5(InnerLabel,{cursor:"ew-resize",marginRight:"-$xs",textTransform:"uppercase",opacity:.3,"&:hover":{opacity:1},variants:{dragging:{true:{backgroundColor:"$accent2",opacity:1}}}}),InputContainer=styled$5("div",{$flex:"",position:"relative",borderRadius:"$sm",overflow:"hidden",color:"inherit",height:"$rowHeight",backgroundColor:"$elevation3",$inputStyle:"$elevation1",$hover:"",$focusWithin:"",variants:{textArea:{true:{height:"auto"}}}}),_excluded$7$2=["innerLabel","value","onUpdate","onChange","onKeyDown","type","id","inputType","rows"],_excluded2$1$2=["onUpdate"];function ValueInput(tt){let{innerLabel:et,value:nt,onUpdate:rt,onChange:it,onKeyDown:ot,type:at,id:st,inputType:lt="text",rows:ct=0}=tt,ut=_objectWithoutProperties$l(tt,_excluded$7$2);const{id:ht,emitOnEditStart:dt,emitOnEditEnd:pt,disabled:mt}=useInputContext(),gt=st||ht,yt=reactExports.useRef(null),bt=ct>0,vt=bt?"textarea":"input",xt=reactExports.useCallback(Tt=>At=>{const Et=At.currentTarget.value;Tt(Et)},[]);React$1.useEffect(()=>{const Tt=yt.current,At=xt(Et=>{rt(Et),pt()});return Tt==null||Tt.addEventListener("blur",At),()=>Tt==null?void 0:Tt.removeEventListener("blur",At)},[xt,rt,pt]);const kt=reactExports.useCallback(Tt=>{Tt.key==="Enter"&&xt(rt)(Tt)},[xt,rt]),St=Object.assign({as:vt},bt?{rows:ct}:{},ut);return React$1.createElement(InputContainer,{textArea:bt},et&&typeof et=="string"?React$1.createElement(InnerLabel,null,et):et,React$1.createElement(StyledInput$2,_extends$t({levaType:at,ref:yt,id:gt,type:lt,autoComplete:"off",spellCheck:"false",value:nt,onChange:xt(it),onFocus:()=>dt(),onKeyPress:kt,onKeyDown:ot,disabled:mt},St)))}function NumberInput(tt){let{onUpdate:et}=tt,nt=_objectWithoutProperties$l(tt,_excluded2$1$2);const rt=reactExports.useCallback(ot=>et(parseNumber(ot)),[et]),it=reactExports.useCallback(ot=>{const at=ot.key==="ArrowUp"?1:ot.key==="ArrowDown"?-1:0;if(at){ot.preventDefault();const st=ot.altKey?.1:ot.shiftKey?10:1;et(lt=>parseFloat(lt)+at*st)}},[et]);return React$1.createElement(ValueInput,_extends$t({},nt,{onUpdate:rt,onKeyDown:it,type:"number"}))}const StyledFolder=styled$5("div",{}),StyledWrapper=styled$5("div",{position:"relative",background:"$elevation2",transition:"height 300ms ease",variants:{fill:{true:{},false:{}},flat:{false:{},true:{}},isRoot:{true:{},false:{paddingLeft:"$md","&::after":{content:'""',position:"absolute",left:0,top:0,width:"$borderWidths$folder",height:"100%",backgroundColor:"$folderWidgetColor",opacity:.4,transform:"translateX(-50%)"}}}},compoundVariants:[{isRoot:!0,fill:!1,css:{overflowY:"auto",maxHeight:"calc(100vh - 20px - $$titleBarHeight)"}},{isRoot:!0,flat:!1,css:{borderRadius:"$lg"}}]}),StyledTitle=styled$5("div",{$flex:"",color:"$folderTextColor",userSelect:"none",cursor:"pointer",height:"$folderTitleHeight",fontWeight:"$folder","> svg":{marginLeft:-4,marginRight:4,cursor:"pointer",fill:"$folderWidgetColor",opacity:.6},"&:hover > svg":{fill:"$folderWidgetColor"},[`&:hover + ${StyledWrapper}::after`]:{opacity:.6},[`${StyledFolder}:hover > & + ${StyledWrapper}::after`]:{opacity:.6},[`${StyledFolder}:hover > & > svg`]:{opacity:1}}),StyledContent=styled$5("div",{position:"relative",display:"grid",gridTemplateColumns:"100%",rowGap:"$rowGap",transition:"opacity 250ms ease",variants:{toggled:{true:{opacity:1,transitionDelay:"250ms"},false:{opacity:0,transitionDelay:"0ms",pointerEvents:"none"}},isRoot:{true:{"& > div":{paddingLeft:"$md",paddingRight:"$md"},"& > div:first-of-type":{paddingTop:"$sm"},"& > div:last-of-type":{paddingBottom:"$sm"},[`> ${StyledFolder}:not(:first-of-type)`]:{paddingTop:"$sm",marginTop:"$md",borderTop:"$borderWidths$folder solid $colors$elevation1"}}}}}),StyledRow=styled$5("div",{position:"relative",zIndex:100,display:"grid",rowGap:"$rowGap",gridTemplateRows:"minmax($sizes$rowHeight, max-content)",alignItems:"center",color:"$highlight2",[`${StyledContent} > &`]:{"&:first-of-type":{marginTop:"$rowGap"},"&:last-of-type":{marginBottom:"$rowGap"}},variants:{disabled:{true:{pointerEvents:"none"},false:{"&:hover,&:focus-within":{color:"$highlight3"}}}}}),StyledInputRow=styled$5(StyledRow,{gridTemplateColumns:"auto $sizes$controlWidth",columnGap:"$colGap"}),CopyLabelContainer=styled$5("div",{$flex:"",height:"100%",position:"relative",overflow:"hidden","& > div":{marginLeft:"$colGap",padding:"0 $xs",opacity:.4},"& > div:hover":{opacity:.8},"& > div > svg":{display:"none",cursor:"pointer",width:13,minWidth:13,height:13,backgroundColor:"$elevation2"},"&:hover > div > svg":{display:"block"},variants:{align:{top:{height:"100%",alignItems:"flex-start",paddingTop:"$sm"}}}}),StyledOptionalToggle=styled$5("input",{$reset:"",height:0,width:0,opacity:0,margin:0,"& + label":{position:"relative",$flexCenter:"",height:"100%",userSelect:"none",cursor:"pointer",paddingLeft:2,paddingRight:"$sm",pointerEvents:"auto"},"& + label:after":{content:'""',width:6,height:6,backgroundColor:"$elevation3",borderRadius:"50%",$activeStyle:""},"&:focus + label:after":{$focusStyle:""},"& + label:active:after":{backgroundColor:"$accent1",$focusStyle:""},"&:checked + label:after":{backgroundColor:"$accent1"}}),StyledLabel=styled$5("label",{fontWeight:"$label",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap","& > svg":{display:"block"}}),StyledInputWrapper$1=styled$5("div",{opacity:1,variants:{disabled:{true:{opacity:.6,pointerEvents:"none",[`& ${StyledLabel}`]:{pointerEvents:"auto"}}}}}),Overlay$1=styled$5("div",{position:"fixed",top:0,bottom:0,right:0,left:0,zIndex:1e3,userSelect:"none"}),StyledToolTipContent=styled$5("div",{background:"$toolTipBackground",fontFamily:"$sans",fontSize:"$toolTip",padding:"$xs $sm",color:"$toolTipText",borderRadius:"$xs",boxShadow:"$level2",maxWidth:260}),ToolTipArrow=styled$5($a093c7e1ec25a057$export$21b07c8f274aebd5,{fill:"$toolTipBackground"});function Portal$2({children:tt}){const{className:et}=reactExports.useContext(ThemeContext$3);return React$1.createElement($f1701beae083dbae$export$be92b6f5f03c0fe9,{className:et},tt)}const _excluded$6$2=["align"];function OptionalToggle(){const{id:tt,disable:et,disabled:nt}=useInputContext();return React$1.createElement(React$1.Fragment,null,React$1.createElement(StyledOptionalToggle,{id:tt+"__disable",type:"checkbox",checked:!nt,onChange:()=>et(!nt)}),React$1.createElement("label",{htmlFor:tt+"__disable"}))}function RawLabel(tt){const{id:et,optional:nt,hint:rt}=useInputContext(),it=tt.htmlFor||(et?{htmlFor:et}:null),ot=!rt&&typeof tt.children=="string"?{title:tt.children}:null;return React$1.createElement(React$1.Fragment,null,nt&&React$1.createElement(OptionalToggle,null),rt!==void 0?React$1.createElement($a093c7e1ec25a057$export$be92b6f5f03c0fe9,null,React$1.createElement($a093c7e1ec25a057$export$41fb9f06171c75f4,{asChild:!0},React$1.createElement(StyledLabel,_extends$t({},it,tt))),React$1.createElement($a093c7e1ec25a057$export$7c6e2c02157bb7d2,{side:"top",sideOffset:2},React$1.createElement(StyledToolTipContent,null,rt,React$1.createElement(ToolTipArrow,null)))):React$1.createElement(StyledLabel,_extends$t({},it,ot,tt)))}function Label$4(tt){let{align:et}=tt,nt=_objectWithoutProperties$l(tt,_excluded$6$2);const{value:rt,label:it,key:ot,disabled:at}=useInputContext(),{hideCopyButton:st}=usePanelSettingsContext(),lt=!st&&ot!==void 0,[ct,ut]=reactExports.useState(!1),ht=async()=>{try{await navigator.clipboard.writeText(JSON.stringify({[ot]:rt??""})),ut(!0)}catch{warn$3(LevaErrors.CLIPBOARD_ERROR,{[ot]:rt})}};return React$1.createElement(CopyLabelContainer,{align:et,onPointerLeave:()=>ut(!1)},React$1.createElement(RawLabel,nt),lt&&!at&&React$1.createElement("div",{title:`Click to copy ${typeof it=="string"?it:ot} value`},ct?React$1.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor"},React$1.createElement("path",{d:"M9 2a1 1 0 000 2h2a1 1 0 100-2H9z"}),React$1.createElement("path",{fillRule:"evenodd",d:"M4 5a2 2 0 012-2 3 3 0 003 3h2a3 3 0 003-3 2 2 0 012 2v11a2 2 0 01-2 2H6a2 2 0 01-2-2V5zm9.707 5.707a1 1 0 00-1.414-1.414L9 12.586l-1.293-1.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z",clipRule:"evenodd"})):React$1.createElement("svg",{onClick:ht,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor"},React$1.createElement("path",{d:"M8 3a1 1 0 011-1h2a1 1 0 110 2H9a1 1 0 01-1-1z"}),React$1.createElement("path",{d:"M6 3a2 2 0 00-2 2v11a2 2 0 002 2h8a2 2 0 002-2V5a2 2 0 00-2-2 3 3 0 01-3 3H9a3 3 0 01-3-3z"}))))}const _excluded$5$2=["toggled"],Svg$1=styled$5("svg",{fill:"currentColor",transition:"transform 350ms ease, fill 250ms ease"});function Chevron(tt){let{toggled:et}=tt,nt=_objectWithoutProperties$l(tt,_excluded$5$2);return React$1.createElement(Svg$1,_extends$t({width:"9",height:"5",viewBox:"0 0 9 5",xmlns:"http://www.w3.org/2000/svg",style:{transform:`rotate(${et?0:-90}deg)`}},nt),React$1.createElement("path",{d:"M3.8 4.4c.4.3 1 .3 1.4 0L8 1.7A1 1 0 007.4 0H1.6a1 1 0 00-.7 1.7l3 2.7z"}))}const _excluded$4$2=["input"];function Row(tt){let{input:et}=tt,nt=_objectWithoutProperties$l(tt,_excluded$4$2);return et?React$1.createElement(StyledInputRow,nt):React$1.createElement(StyledRow,nt)}function useInputSetters({value:tt,type:et,settings:nt,setValue:rt}){const[it,ot]=reactExports.useState(format$2$1(et,tt,nt)),at=reactExports.useRef(tt),st=reactExports.useRef(nt);st.current=nt;const lt=reactExports.useCallback(ut=>ot(format$2$1(et,ut,st.current)),[et]),ct=reactExports.useCallback(ut=>{try{rt(ut)}catch(ht){const{type:dt,previousValue:pt}=ht;if(dt!=="LEVA_ERROR")throw ht;lt(pt)}},[lt,rt]);return reactExports.useEffect(()=>{dequal(tt,at.current)||lt(tt),at.current=tt},[tt,lt]),{displayValue:it,onChange:ot,onUpdate:ct}}function useDrag$1(tt,et){const{emitOnEditStart:nt,emitOnEditEnd:rt}=useInputContext();return useDrag$2(it=>{it.first&&(document.body.classList.add("leva__panel__dragged"),nt==null||nt());const ot=tt(it);return it.last&&(document.body.classList.remove("leva__panel__dragged"),rt==null||rt()),ot},et)}function useCanvas2d(tt){const et=reactExports.useRef(null),nt=reactExports.useRef(null),rt=reactExports.useRef(!1);return reactExports.useEffect(()=>{const it=debounce$6(()=>{et.current.width=et.current.offsetWidth*window.devicePixelRatio,et.current.height=et.current.offsetHeight*window.devicePixelRatio,tt(et.current,nt.current)},250);return window.addEventListener("resize",it),rt.current||(it(),rt.current=!0),()=>window.removeEventListener("resize",it)},[tt]),reactExports.useEffect(()=>{nt.current=et.current.getContext("2d")},[]),[et,nt]}function useTransform(){const tt=reactExports.useRef(null),et=reactExports.useRef({x:0,y:0}),nt=reactExports.useCallback(rt=>{Object.assign(et.current,rt),tt.current&&(tt.current.style.transform=`translate3d(${et.current.x}px, ${et.current.y}px, 0)`)},[]);return[tt,nt]}const _excluded$3$2=["__refCount"],getInputAtPath=(tt,et)=>{if(!tt[et])return null;const nt=tt[et];return _objectWithoutProperties$l(nt,_excluded$3$2)};function useInput(tt){const et=useStoreContext(),[nt,rt]=reactExports.useState(getInputAtPath(et.getData(),tt)),it=reactExports.useCallback(ct=>et.setValueAtPath(tt,ct,!0),[tt,et]),ot=reactExports.useCallback(ct=>et.setSettingsAtPath(tt,ct),[tt,et]),at=reactExports.useCallback(ct=>et.disableInputAtPath(tt,ct),[tt,et]),st=reactExports.useCallback(()=>et.emitOnEditStart(tt),[tt,et]),lt=reactExports.useCallback(()=>et.emitOnEditEnd(tt),[tt,et]);return reactExports.useEffect(()=>{rt(getInputAtPath(et.getData(),tt));const ct=et.useStore.subscribe(ut=>getInputAtPath(ut.data,tt),rt,{equalityFn:shallow$2});return()=>ct()},[et,tt]),[nt,{set:it,setSettings:ot,disable:at,storeId:et.storeId,emitOnEditStart:st,emitOnEditEnd:lt}]}const RangeGrid=styled$5("div",{variants:{hasRange:{true:{position:"relative",display:"grid",gridTemplateColumns:"auto $sizes$numberInputMinWidth",columnGap:"$colGap",alignItems:"center"}}}}),Range=styled$5("div",{position:"relative",width:"100%",height:2,borderRadius:"$xs",backgroundColor:"$elevation1"}),Scrubber=styled$5("div",{position:"absolute",width:"$scrubberWidth",height:"$scrubberHeight",borderRadius:"$xs",boxShadow:"0 0 0 2px $colors$elevation2",backgroundColor:"$accent2",cursor:"pointer",$active:"none $accent1",$hover:"none $accent3",variants:{position:{left:{borderTopRightRadius:0,borderBottomRightRadius:0,transform:"translateX(calc(-0.5 * ($sizes$scrubberWidth + 4px)))"},right:{borderTopLeftRadius:0,borderBottomLeftRadius:0,transform:"translateX(calc(0.5 * ($sizes$scrubberWidth + 4px)))"}}}}),RangeWrapper=styled$5("div",{position:"relative",$flex:"",height:"100%",cursor:"pointer",touchAction:"none"}),Indicator=styled$5("div",{position:"absolute",height:"100%",backgroundColor:"$accent2"});function RangeSlider({value:tt,min:et,max:nt,onDrag:rt,step:it,initialValue:ot}){const at=reactExports.useRef(null),st=reactExports.useRef(null),lt=reactExports.useRef(0),ct=useTh("sizes","scrubberWidth"),ut=useDrag$1(({event:dt,first:pt,xy:[mt],movement:[gt],memo:yt})=>{if(pt){const{width:vt,left:xt}=at.current.getBoundingClientRect();lt.current=vt-parseFloat(ct),yt=(dt==null?void 0:dt.target)===st.current?tt:invertedRange((mt-xt)/vt,et,nt)}const bt=yt+invertedRange(gt/lt.current,0,nt-et);return rt(sanitizeStep$1(bt,{step:it,initialValue:ot})),yt}),ht=range$8(tt,et,nt);return React$1.createElement(RangeWrapper,_extends$t({ref:at},ut()),React$1.createElement(Range,null,React$1.createElement(Indicator,{style:{left:0,right:`${(1-ht)*100}%`}})),React$1.createElement(Scrubber,{ref:st,style:{left:`calc(${ht} * (100% - ${ct}))`}}))}const DraggableLabel=React$1.memo(({label:tt,onUpdate:et,step:nt,innerLabelTrim:rt})=>{const[it,ot]=reactExports.useState(!1),at=useDrag$1(({active:st,delta:[lt],event:ct,memo:ut=0})=>(ot(st),ut+=lt/2,Math.abs(ut)>=1&&(et(ht=>parseFloat(ht)+Math.floor(ut)*nt*multiplyStep(ct)),ut=0),ut));return React$1.createElement(InnerNumberLabel,_extends$t({dragging:it,title:tt.length>1?tt:""},at()),tt.slice(0,rt))});function Number$1({label:tt,id:et,displayValue:nt,onUpdate:rt,onChange:it,settings:ot,innerLabelTrim:at=1}){const st=at>0&&React$1.createElement(DraggableLabel,{label:tt,step:ot.step,onUpdate:rt,innerLabelTrim:at});return React$1.createElement(NumberInput,{id:et,value:String(nt),onUpdate:rt,onChange:it,innerLabel:st})}function NumberComponent(){const tt=useInputContext(),{label:et,value:nt,onUpdate:rt,settings:it,id:ot}=tt,{min:at,max:st}=it,lt=st!==1/0&&at!==-1/0;return React$1.createElement(Row,{input:!0},React$1.createElement(Label$4,null,et),React$1.createElement(RangeGrid,{hasRange:lt},lt&&React$1.createElement(RangeSlider,_extends$t({value:parseFloat(nt),onDrag:rt},it)),React$1.createElement(Number$1,_extends$t({},tt,{id:ot,label:"value",innerLabelTrim:lt?0:1}))))}const{sanitizeStep}=props$3$1,rest=_objectWithoutProperties$l(props$3$1,["sanitizeStep"]);var number$6=_objectSpread2$1({component:NumberComponent},rest);const schema$2$1=(tt,et)=>v8n().schema({options:v8n().passesAnyOf(v8n().object(),v8n().array())}).test(et),sanitize$2$1=(tt,{values:et})=>{if(et.indexOf(tt)<0)throw Error("Selected value doesn't match Select options");return tt},format$3=(tt,{values:et})=>et.indexOf(tt),normalize$1$2=tt=>{let{value:et,options:nt}=tt,rt,it;return Array.isArray(nt)?(it=nt,rt=nt.map(ot=>String(ot))):(it=Object.values(nt),rt=Object.keys(nt)),"value"in tt?it.includes(et)||(rt.unshift(String(et)),it.unshift(et)):et=it[0],Object.values(nt).includes(et)||(nt[String(et)]=et),{value:et,settings:{keys:rt,values:it}}};var props$2$1=Object.freeze({__proto__:null,schema:schema$2$1,sanitize:sanitize$2$1,format:format$3,normalize:normalize$1$2});const SelectContainer=styled$5("div",{$flexCenter:"",position:"relative","> svg":{pointerEvents:"none",position:"absolute",right:"$md"}}),NativeSelect=styled$5("select",{position:"absolute",top:0,left:0,width:"100%",height:"100%",opacity:0}),PresentationalSelect=styled$5("div",{display:"flex",alignItems:"center",width:"100%",height:"$rowHeight",backgroundColor:"$elevation3",borderRadius:"$sm",padding:"0 $sm",cursor:"pointer",[`${NativeSelect}:focus + &`]:{$focusStyle:""},[`${NativeSelect}:hover + &`]:{$hoverStyle:""}});function Select$5({displayValue:tt,value:et,onUpdate:nt,id:rt,settings:it,disabled:ot}){const{keys:at,values:st}=it,lt=reactExports.useRef();return et===st[tt]&&(lt.current=at[tt]),React$1.createElement(SelectContainer,null,React$1.createElement(NativeSelect,{id:rt,value:tt,onChange:ct=>nt(st[Number(ct.currentTarget.value)]),disabled:ot},at.map((ct,ut)=>React$1.createElement("option",{key:ct,value:ut},ct))),React$1.createElement(PresentationalSelect,null,lt.current),React$1.createElement(Chevron,{toggled:!0}))}function SelectComponent(){const{label:tt,value:et,displayValue:nt,onUpdate:rt,id:it,disabled:ot,settings:at}=useInputContext();return React$1.createElement(Row,{input:!0},React$1.createElement(Label$4,null,tt),React$1.createElement(Select$5,{id:it,value:et,displayValue:nt,onUpdate:rt,settings:at,disabled:ot}))}var select$1=_objectSpread2$1({component:SelectComponent},props$2$1);const schema$1$1=tt=>v8n().string().test(tt),sanitize$1$1=tt=>{if(typeof tt!="string")throw Error("Invalid string");return tt},normalize$5=({value:tt,editable:et=!0,rows:nt=!1})=>({value:tt,settings:{editable:et,rows:typeof nt=="number"?nt:nt?5:0}});var props$1$1=Object.freeze({__proto__:null,schema:schema$1$1,sanitize:sanitize$1$1,normalize:normalize$5});const _excluded$2$2=["displayValue","onUpdate","onChange","editable"],NonEditableString=styled$5("div",{whiteSpace:"pre-wrap"});function String$1(tt){let{displayValue:et,onUpdate:nt,onChange:rt,editable:it=!0}=tt,ot=_objectWithoutProperties$l(tt,_excluded$2$2);return it?React$1.createElement(ValueInput,_extends$t({value:et,onUpdate:nt,onChange:rt},ot)):React$1.createElement(NonEditableString,null,et)}function StringComponent(){const{label:tt,settings:et,displayValue:nt,onUpdate:rt,onChange:it}=useInputContext();return React$1.createElement(Row,{input:!0},React$1.createElement(Label$4,null,tt),React$1.createElement(String$1,_extends$t({displayValue:nt,onUpdate:rt,onChange:it},et)))}var string$1=_objectSpread2$1({component:StringComponent},props$1$1);const schema$4=tt=>v8n().boolean().test(tt),sanitize$5=tt=>{if(typeof tt!="boolean")throw Error("Invalid boolean");return tt};var props$4=Object.freeze({__proto__:null,schema:schema$4,sanitize:sanitize$5});const StyledInputWrapper=styled$5("div",{position:"relative",$flex:"",height:"$rowHeight",input:{$reset:"",height:0,width:0,opacity:0,margin:0},label:{position:"relative",$flexCenter:"",userSelect:"none",cursor:"pointer",height:"$checkboxSize",width:"$checkboxSize",backgroundColor:"$elevation3",borderRadius:"$sm",$hover:""},"input:focus + label":{$focusStyle:""},"input:focus:checked + label, input:checked + label:hover":{$hoverStyle:"$accent3"},"input + label:active":{backgroundColor:"$accent1"},"input:checked + label:active":{backgroundColor:"$accent1"},"label > svg":{display:"none",width:"90%",height:"90%",stroke:"$highlight3"},"input:checked + label":{backgroundColor:"$accent2"},"input:checked + label > svg":{display:"block"}});function Boolean$1({value:tt,onUpdate:et,id:nt,disabled:rt}){return React$1.createElement(StyledInputWrapper,null,React$1.createElement("input",{id:nt,type:"checkbox",checked:tt,onChange:it=>et(it.currentTarget.checked),disabled:rt}),React$1.createElement("label",{htmlFor:nt},React$1.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},React$1.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"}))))}function BooleanComponent(){const{label:tt,value:et,onUpdate:nt,disabled:rt,id:it}=useInputContext();return React$1.createElement(Row,{input:!0},React$1.createElement(Label$4,null,tt),React$1.createElement(Boolean$1,{value:et,onUpdate:nt,id:it,disabled:rt}))}var boolean=_objectSpread2$1({component:BooleanComponent},props$4);const _excluded$1$4=["locked"];function Coordinate({value:tt,id:et,valueKey:nt,settings:rt,onUpdate:it,innerLabelTrim:ot}){const at=reactExports.useRef(tt[nt]);at.current=tt[nt];const st=reactExports.useCallback(ct=>it({[nt]:sanitizeValue({type:"NUMBER",value:at.current,settings:rt},ct)}),[it,rt,nt]),lt=useInputSetters({type:"NUMBER",value:tt[nt],settings:rt,setValue:st});return React$1.createElement(Number$1,{id:et,label:nt,value:tt[nt],displayValue:lt.displayValue,onUpdate:lt.onUpdate,onChange:lt.onChange,settings:rt,innerLabelTrim:ot})}const Container$2=styled$5("div",{display:"grid",columnGap:"$colGap",gridAutoFlow:"column dense",alignItems:"center",variants:{withLock:{true:{gridTemplateColumns:"10px auto","> svg":{cursor:"pointer"}}}}});function Lock(tt){let{locked:et}=tt,nt=_objectWithoutProperties$l(tt,_excluded$1$4);return React$1.createElement("svg",_extends$t({width:"10",height:"10",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},nt),et?React$1.createElement("path",{d:"M5 4.63601C5 3.76031 5.24219 3.1054 5.64323 2.67357C6.03934 2.24705 6.64582 1.9783 7.5014 1.9783C8.35745 1.9783 8.96306 2.24652 9.35823 2.67208C9.75838 3.10299 10 3.75708 10 4.63325V5.99999H5V4.63601ZM4 5.99999V4.63601C4 3.58148 4.29339 2.65754 4.91049 1.99307C5.53252 1.32329 6.42675 0.978302 7.5014 0.978302C8.57583 0.978302 9.46952 1.32233 10.091 1.99162C10.7076 2.65557 11 3.57896 11 4.63325V5.99999H12C12.5523 5.99999 13 6.44771 13 6.99999V13C13 13.5523 12.5523 14 12 14H3C2.44772 14 2 13.5523 2 13V6.99999C2 6.44771 2.44772 5.99999 3 5.99999H4ZM3 6.99999H12V13H3V6.99999Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"}):React$1.createElement("path",{d:"M9 3.63601C9 2.76044 9.24207 2.11211 9.64154 1.68623C10.0366 1.26502 10.6432 1 11.5014 1C12.4485 1 13.0839 1.30552 13.4722 1.80636C13.8031 2.23312 14 2.84313 14 3.63325H15C15 2.68242 14.7626 1.83856 14.2625 1.19361C13.6389 0.38943 12.6743 0 11.5014 0C10.4294 0 9.53523 0.337871 8.91218 1.0021C8.29351 1.66167 8 2.58135 8 3.63601V6H1C0.447715 6 0 6.44772 0 7V13C0 13.5523 0.447715 14 1 14H10C10.5523 14 11 13.5523 11 13V7C11 6.44772 10.5523 6 10 6H9V3.63601ZM1 7H10V13H1V7Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"}))}function Vector({value:tt,onUpdate:et,settings:nt,innerLabelTrim:rt}){const{id:it,setSettings:ot}=useInputContext(),{lock:at,locked:st}=nt;return React$1.createElement(Container$2,{withLock:at},at&&React$1.createElement(Lock,{locked:st,onClick:()=>ot({locked:!st})}),Object.keys(tt).map((lt,ct)=>React$1.createElement(Coordinate,{id:ct===0?it:`${it}.${lt}`,key:lt,valueKey:lt,value:tt,settings:nt[lt],onUpdate:et,innerLabelTrim:rt})))}const normalizeKeyedNumberSettings=(tt,et)=>{const nt={};let rt=0,it=1/0;Object.entries(tt).forEach(([ot,at])=>{nt[ot]=normalize$2$2(_objectSpread2$1({value:at},et[ot])).settings,rt=Math.max(rt,nt[ot].step),it=Math.min(it,nt[ot].pad)});for(let ot in nt){const{step:at,min:st,max:lt}=et[ot]||{};!isFinite(at)&&(!isFinite(st)||!isFinite(lt))&&(nt[ot].step=rt,nt[ot].pad=it)}return nt},_excluded$1M=["lock"],_excluded2$j=["value"];function getVectorSchema(tt){const et=v8n().array().length(tt).every.number(),nt=rt=>{if(!rt||typeof rt!="object")return!1;const it=Object.values(rt);return it.length===tt&&it.every(ot=>isFinite(ot))};return rt=>et.test(rt)||nt(rt)}function getVectorType(tt){return Array.isArray(tt)?"array":"object"}function convert$6(tt,et,nt){return getVectorType(tt)===et?tt:et==="array"?Object.values(tt):mapArrayToKeys(tt,nt)}const sanitizeVector=(tt,et,nt)=>{const rt=convert$6(tt,"object",et.keys);for(let at in rt)rt[at]=sanitize$3(rt[at],et[at]);const it=Object.keys(rt);let ot={};if(it.length===et.keys.length)ot=rt;else{const at=convert$6(nt,"object",et.keys);if(it.length===1&&et.locked){const st=it[0],lt=rt[st],ct=at[st],ut=ct!==0?lt/ct:1;for(let ht in at)ht===st?ot[st]=lt:ot[ht]=at[ht]*ut}else ot=_objectSpread2$1(_objectSpread2$1({},at),rt)}return convert$6(ot,et.format,et.keys)},formatVector=(tt,et)=>convert$6(tt,"object",et.keys),isNumberSettings=tt=>!!tt&&("step"in tt||"min"in tt||"max"in tt);function normalizeVector(tt,et,nt=[]){const{lock:rt=!1}=et,it=_objectWithoutProperties$l(et,_excluded$1M),ot=Array.isArray(tt)?"array":"object",at=ot==="object"?Object.keys(tt):nt,st=convert$6(tt,"object",at),lt=isNumberSettings(it)?at.reduce((ut,ht)=>Object.assign(ut,{[ht]:it}),{}):it,ct=normalizeKeyedNumberSettings(st,lt);return{value:ot==="array"?tt:st,settings:_objectSpread2$1(_objectSpread2$1({},ct),{},{format:ot,keys:at,lock:rt,locked:!1})}}function getVectorPlugin(tt){return{schema:getVectorSchema(tt.length),normalize:et=>{let{value:nt}=et,rt=_objectWithoutProperties$l(et,_excluded2$j);return normalizeVector(nt,rt,tt)},format:(et,nt)=>formatVector(et,nt),sanitize:(et,nt,rt)=>sanitizeVector(et,nt,rt)}}var r$b={grad:.9,turn:360,rad:360/(2*Math.PI)},t$6=function(tt){return typeof tt=="string"?tt.length>0:typeof tt=="number"},n$6=function(tt,et,nt){return et===void 0&&(et=0),nt===void 0&&(nt=Math.pow(10,et)),Math.round(nt*tt)/nt+0},e$5=function(tt,et,nt){return et===void 0&&(et=0),nt===void 0&&(nt=1),tt>nt?nt:tt>et?tt:et},u$5=function(tt){return(tt=isFinite(tt)?tt%360:0)>0?tt:tt+360},a$3=function(tt){return{r:e$5(tt.r,0,255),g:e$5(tt.g,0,255),b:e$5(tt.b,0,255),a:e$5(tt.a)}},o$1=function(tt){return{r:n$6(tt.r),g:n$6(tt.g),b:n$6(tt.b),a:n$6(tt.a,3)}},i$6=/^#([0-9a-f]{3,8})$/i,s$4=function(tt){var et=tt.toString(16);return et.length<2?"0"+et:et},h$9=function(tt){var et=tt.r,nt=tt.g,rt=tt.b,it=tt.a,ot=Math.max(et,nt,rt),at=ot-Math.min(et,nt,rt),st=at?ot===et?(nt-rt)/at:ot===nt?2+(rt-et)/at:4+(et-nt)/at:0;return{h:60*(st<0?st+6:st),s:ot?at/ot*100:0,v:ot/255*100,a:it}},b$6=function(tt){var et=tt.h,nt=tt.s,rt=tt.v,it=tt.a;et=et/360*6,nt/=100,rt/=100;var ot=Math.floor(et),at=rt*(1-nt),st=rt*(1-(et-ot)*nt),lt=rt*(1-(1-et+ot)*nt),ct=ot%6;return{r:255*[rt,st,at,at,lt,rt][ct],g:255*[lt,rt,rt,st,at,at][ct],b:255*[at,at,lt,rt,rt,st][ct],a:it}},g$8=function(tt){return{h:u$5(tt.h),s:e$5(tt.s,0,100),l:e$5(tt.l,0,100),a:e$5(tt.a)}},d$5=function(tt){return{h:n$6(tt.h),s:n$6(tt.s),l:n$6(tt.l),a:n$6(tt.a,3)}},f$7=function(tt){return b$6((nt=(et=tt).s,{h:et.h,s:(nt*=((rt=et.l)<50?rt:100-rt)/100)>0?2*nt/(rt+nt)*100:0,v:rt+nt,a:et.a}));var et,nt,rt},c$8=function(tt){return{h:(et=h$9(tt)).h,s:(it=(200-(nt=et.s))*(rt=et.v)/100)>0&&it<200?nt*rt/100/(it<=100?it:200-it)*100:0,l:it/2,a:et.a};var et,nt,rt,it},l$5=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,p$8=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,v$8=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,m$8=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,y$7={string:[[function(tt){var et=i$6.exec(tt);return et?(tt=et[1]).length<=4?{r:parseInt(tt[0]+tt[0],16),g:parseInt(tt[1]+tt[1],16),b:parseInt(tt[2]+tt[2],16),a:tt.length===4?n$6(parseInt(tt[3]+tt[3],16)/255,2):1}:tt.length===6||tt.length===8?{r:parseInt(tt.substr(0,2),16),g:parseInt(tt.substr(2,2),16),b:parseInt(tt.substr(4,2),16),a:tt.length===8?n$6(parseInt(tt.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(tt){var et=v$8.exec(tt)||m$8.exec(tt);return et?et[2]!==et[4]||et[4]!==et[6]?null:a$3({r:Number(et[1])/(et[2]?100/255:1),g:Number(et[3])/(et[4]?100/255:1),b:Number(et[5])/(et[6]?100/255:1),a:et[7]===void 0?1:Number(et[7])/(et[8]?100:1)}):null},"rgb"],[function(tt){var et=l$5.exec(tt)||p$8.exec(tt);if(!et)return null;var nt,rt,it=g$8({h:(nt=et[1],rt=et[2],rt===void 0&&(rt="deg"),Number(nt)*(r$b[rt]||1)),s:Number(et[3]),l:Number(et[4]),a:et[5]===void 0?1:Number(et[5])/(et[6]?100:1)});return f$7(it)},"hsl"]],object:[[function(tt){var et=tt.r,nt=tt.g,rt=tt.b,it=tt.a,ot=it===void 0?1:it;return t$6(et)&&t$6(nt)&&t$6(rt)?a$3({r:Number(et),g:Number(nt),b:Number(rt),a:Number(ot)}):null},"rgb"],[function(tt){var et=tt.h,nt=tt.s,rt=tt.l,it=tt.a,ot=it===void 0?1:it;if(!t$6(et)||!t$6(nt)||!t$6(rt))return null;var at=g$8({h:Number(et),s:Number(nt),l:Number(rt),a:Number(ot)});return f$7(at)},"hsl"],[function(tt){var et=tt.h,nt=tt.s,rt=tt.v,it=tt.a,ot=it===void 0?1:it;if(!t$6(et)||!t$6(nt)||!t$6(rt))return null;var at=function(st){return{h:u$5(st.h),s:e$5(st.s,0,100),v:e$5(st.v,0,100),a:e$5(st.a)}}({h:Number(et),s:Number(nt),v:Number(rt),a:Number(ot)});return b$6(at)},"hsv"]]},N$1=function(tt,et){for(var nt=0;nt=.5},tt.prototype.toHex=function(){return et=o$1(this.rgba),nt=et.r,rt=et.g,it=et.b,at=(ot=et.a)<1?s$4(n$6(255*ot)):"","#"+s$4(nt)+s$4(rt)+s$4(it)+at;var et,nt,rt,it,ot,at},tt.prototype.toRgb=function(){return o$1(this.rgba)},tt.prototype.toRgbString=function(){return et=o$1(this.rgba),nt=et.r,rt=et.g,it=et.b,(ot=et.a)<1?"rgba("+nt+", "+rt+", "+it+", "+ot+")":"rgb("+nt+", "+rt+", "+it+")";var et,nt,rt,it,ot},tt.prototype.toHsl=function(){return d$5(c$8(this.rgba))},tt.prototype.toHslString=function(){return et=d$5(c$8(this.rgba)),nt=et.h,rt=et.s,it=et.l,(ot=et.a)<1?"hsla("+nt+", "+rt+"%, "+it+"%, "+ot+")":"hsl("+nt+", "+rt+"%, "+it+"%)";var et,nt,rt,it,ot},tt.prototype.toHsv=function(){return et=h$9(this.rgba),{h:n$6(et.h),s:n$6(et.s),v:n$6(et.v),a:n$6(et.a,3)};var et},tt.prototype.invert=function(){return w$5({r:255-(et=this.rgba).r,g:255-et.g,b:255-et.b,a:et.a});var et},tt.prototype.saturate=function(et){return et===void 0&&(et=.1),w$5(M$1(this.rgba,et))},tt.prototype.desaturate=function(et){return et===void 0&&(et=.1),w$5(M$1(this.rgba,-et))},tt.prototype.grayscale=function(){return w$5(M$1(this.rgba,-1))},tt.prototype.lighten=function(et){return et===void 0&&(et=.1),w$5($$2(this.rgba,et))},tt.prototype.darken=function(et){return et===void 0&&(et=.1),w$5($$2(this.rgba,-et))},tt.prototype.rotate=function(et){return et===void 0&&(et=15),this.hue(this.hue()+et)},tt.prototype.alpha=function(et){return typeof et=="number"?w$5({r:(nt=this.rgba).r,g:nt.g,b:nt.b,a:et}):n$6(this.rgba.a,3);var nt},tt.prototype.hue=function(et){var nt=c$8(this.rgba);return typeof et=="number"?w$5({h:et,s:nt.s,l:nt.l,a:nt.a}):n$6(nt.h)},tt.prototype.isEqual=function(et){return this.toHex()===w$5(et).toHex()},tt}(),w$5=function(tt){return tt instanceof j$1?tt:new j$1(tt)},S$2=[],k$8=function(tt){tt.forEach(function(et){S$2.indexOf(et)<0&&(et(j$1,y$7),S$2.push(et))})};function namesPlugin(tt,et){var nt={white:"#ffffff",bisque:"#ffe4c4",blue:"#0000ff",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",antiquewhite:"#faebd7",aqua:"#00ffff",azure:"#f0ffff",whitesmoke:"#f5f5f5",papayawhip:"#ffefd5",plum:"#dda0dd",blanchedalmond:"#ffebcd",black:"#000000",gold:"#ffd700",goldenrod:"#daa520",gainsboro:"#dcdcdc",cornsilk:"#fff8dc",cornflowerblue:"#6495ed",burlywood:"#deb887",aquamarine:"#7fffd4",beige:"#f5f5dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkkhaki:"#bdb76b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",peachpuff:"#ffdab9",darkmagenta:"#8b008b",darkred:"#8b0000",darkorchid:"#9932cc",darkorange:"#ff8c00",darkslateblue:"#483d8b",gray:"#808080",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",deeppink:"#ff1493",deepskyblue:"#00bfff",wheat:"#f5deb3",firebrick:"#b22222",floralwhite:"#fffaf0",ghostwhite:"#f8f8ff",darkviolet:"#9400d3",magenta:"#ff00ff",green:"#008000",dodgerblue:"#1e90ff",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",blueviolet:"#8a2be2",forestgreen:"#228b22",lawngreen:"#7cfc00",indianred:"#cd5c5c",indigo:"#4b0082",fuchsia:"#ff00ff",brown:"#a52a2a",maroon:"#800000",mediumblue:"#0000cd",lightcoral:"#f08080",darkturquoise:"#00ced1",lightcyan:"#e0ffff",ivory:"#fffff0",lightyellow:"#ffffe0",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",linen:"#faf0e6",mediumaquamarine:"#66cdaa",lemonchiffon:"#fffacd",lime:"#00ff00",khaki:"#f0e68c",mediumseagreen:"#3cb371",limegreen:"#32cd32",mediumspringgreen:"#00fa9a",lightskyblue:"#87cefa",lightblue:"#add8e6",midnightblue:"#191970",lightpink:"#ffb6c1",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",mintcream:"#f5fffa",lightslategray:"#778899",lightslategrey:"#778899",navajowhite:"#ffdead",navy:"#000080",mediumvioletred:"#c71585",powderblue:"#b0e0e6",palegoldenrod:"#eee8aa",oldlace:"#fdf5e6",paleturquoise:"#afeeee",mediumturquoise:"#48d1cc",mediumorchid:"#ba55d3",rebeccapurple:"#663399",lightsteelblue:"#b0c4de",mediumslateblue:"#7b68ee",thistle:"#d8bfd8",tan:"#d2b48c",orchid:"#da70d6",mediumpurple:"#9370db",purple:"#800080",pink:"#ffc0cb",skyblue:"#87ceeb",springgreen:"#00ff7f",palegreen:"#98fb98",red:"#ff0000",yellow:"#ffff00",slateblue:"#6a5acd",lavenderblush:"#fff0f5",peru:"#cd853f",palevioletred:"#db7093",violet:"#ee82ee",teal:"#008080",slategray:"#708090",slategrey:"#708090",aliceblue:"#f0f8ff",darkseagreen:"#8fbc8f",darkolivegreen:"#556b2f",greenyellow:"#adff2f",seagreen:"#2e8b57",seashell:"#fff5ee",tomato:"#ff6347",silver:"#c0c0c0",sienna:"#a0522d",lavender:"#e6e6fa",lightgreen:"#90ee90",orange:"#ffa500",orangered:"#ff4500",steelblue:"#4682b4",royalblue:"#4169e1",turquoise:"#40e0d0",yellowgreen:"#9acd32",salmon:"#fa8072",saddlebrown:"#8b4513",sandybrown:"#f4a460",rosybrown:"#bc8f8f",darksalmon:"#e9967a",lightgoldenrodyellow:"#fafad2",snow:"#fffafa",lightgrey:"#d3d3d3",lightgray:"#d3d3d3",dimgray:"#696969",dimgrey:"#696969",olivedrab:"#6b8e23",olive:"#808000"},rt={};for(var it in nt)rt[nt[it]]=it;var ot={};tt.prototype.toName=function(at){if(!(this.rgba.a||this.rgba.r||this.rgba.g||this.rgba.b))return"transparent";var st,lt,ct=rt[this.toHex()];if(ct)return ct;if(at!=null&&at.closest){var ut=this.toRgb(),ht=1/0,dt="black";if(!ot.length)for(var pt in nt)ot[pt]=new tt(nt[pt]).toRgb();for(var mt in nt){var gt=(st=ut,lt=ot[mt],Math.pow(st.r-lt.r,2)+Math.pow(st.g-lt.g,2)+Math.pow(st.b-lt.b,2));gt=0||(it[nt]=tt[nt]);return it}function i$5(tt){var et=reactExports.useRef(tt),nt=reactExports.useRef(function(rt){et.current&&et.current(rt)});return et.current=tt,nt.current}var s$3=function(tt,et,nt){return et===void 0&&(et=0),nt===void 0&&(nt=1),tt>nt?nt:tt0:yt.buttons>0)&&it.current?ot(d$4(it.current,yt,st.current)):gt(!1)},mt=function(){return gt(!1)};function gt(yt){var bt=lt.current,vt=v$7(it.current),xt=yt?vt.addEventListener:vt.removeEventListener;xt(bt?"touchmove":"mousemove",pt),xt(bt?"touchend":"mouseup",mt)}return[function(yt){var bt=yt.nativeEvent,vt=it.current;if(vt&&(h$8(bt),!function(kt,St){return St&&!f$6(kt)}(bt,lt.current)&&vt)){if(f$6(bt)){lt.current=!0;var xt=bt.changedTouches||[];xt.length&&(st.current=xt[0].identifier)}vt.focus(),ot(d$4(vt,bt,st.current)),gt(!0)}},function(yt){var bt=yt.which||yt.keyCode;bt<37||bt>40||(yt.preventDefault(),at({left:bt===39?.05:bt===37?-.05:0,top:bt===40?.05:bt===38?-.05:0}))},gt]},[at,ot]),ut=ct[0],ht=ct[1],dt=ct[2];return reactExports.useEffect(function(){return dt},[dt]),React$1.createElement("div",u$4({},rt,{onTouchStart:ut,onMouseDown:ut,className:"react-colorful__interactive",ref:it,onKeyDown:ht,tabIndex:0,role:"slider"}))}),g$7=function(tt){return tt.filter(Boolean).join(" ")},p$7=function(tt){var et=tt.color,nt=tt.left,rt=tt.top,it=rt===void 0?.5:rt,ot=g$7(["react-colorful__pointer",tt.className]);return React$1.createElement("div",{className:ot,style:{top:100*it+"%",left:100*nt+"%"}},React$1.createElement("div",{className:"react-colorful__pointer-fill",style:{backgroundColor:et}}))},b$5=function(tt,et,nt){return et===void 0&&(et=0),nt===void 0&&(nt=Math.pow(10,et)),Math.round(nt*tt)/nt},y$6=function(tt){var et=tt.s,nt=tt.v,rt=tt.a,it=(200-et)*nt/100;return{h:b$5(tt.h),s:b$5(it>0&&it<200?et*nt/100/(it<=100?it:200-it)*100:0),l:b$5(it/2),a:b$5(rt,2)}},q$6=function(tt){var et=y$6(tt);return"hsl("+et.h+", "+et.s+"%, "+et.l+"%)"},k$7=function(tt){var et=y$6(tt);return"hsla("+et.h+", "+et.s+"%, "+et.l+"%, "+et.a+")"},I$1=function(tt){var et=tt.h,nt=tt.s,rt=tt.v,it=tt.a;et=et/360*6,nt/=100,rt/=100;var ot=Math.floor(et),at=rt*(1-nt),st=rt*(1-(et-ot)*nt),lt=rt*(1-(1-et+ot)*nt),ct=ot%6;return{r:b$5(255*[rt,st,at,at,lt,rt][ct]),g:b$5(255*[lt,rt,rt,st,at,at][ct]),b:b$5(255*[at,at,lt,rt,rt,st][ct]),a:b$5(it,2)}},L$1=function(tt){var et=tt.r,nt=tt.g,rt=tt.b,it=tt.a,ot=Math.max(et,nt,rt),at=ot-Math.min(et,nt,rt),st=at?ot===et?(nt-rt)/at:ot===nt?2+(rt-et)/at:4+(et-nt)/at:0;return{h:b$5(60*(st<0?st+6:st)),s:b$5(ot?at/ot*100:0),v:b$5(ot/255*100),a:it}},S$1=React$1.memo(function(tt){var et=tt.hue,nt=tt.onChange,rt=g$7(["react-colorful__hue",tt.className]);return React$1.createElement("div",{className:rt},React$1.createElement(m$7,{onMove:function(it){nt({h:360*it.left})},onKey:function(it){nt({h:s$3(et+360*it.left,0,360)})},"aria-label":"Hue","aria-valuenow":b$5(et),"aria-valuemax":"360","aria-valuemin":"0"},React$1.createElement(p$7,{className:"react-colorful__hue-pointer",left:et/360,color:q$6({h:et,s:100,v:100,a:1})})))}),T$1=React$1.memo(function(tt){var et=tt.hsva,nt=tt.onChange,rt={backgroundColor:q$6({h:et.h,s:100,v:100,a:1})};return React$1.createElement("div",{className:"react-colorful__saturation",style:rt},React$1.createElement(m$7,{onMove:function(it){nt({s:100*it.left,v:100-100*it.top})},onKey:function(it){nt({s:s$3(et.s+100*it.left,0,100),v:s$3(et.v-100*it.top,0,100)})},"aria-label":"Color","aria-valuetext":"Saturation "+b$5(et.s)+"%, Brightness "+b$5(et.v)+"%"},React$1.createElement(p$7,{className:"react-colorful__saturation-pointer",top:1-et.v/100,left:et.s/100,color:q$6(et)})))}),F$1=function(tt,et){if(tt===et)return!0;for(var nt in tt)if(tt[nt]!==et[nt])return!1;return!0};function Y$1(tt,et,nt){var rt=i$5(nt),it=reactExports.useState(function(){return tt.toHsva(et)}),ot=it[0],at=it[1],st=reactExports.useRef({color:et,hsva:ot});reactExports.useEffect(function(){if(!tt.equal(et,st.current.color)){var ct=tt.toHsva(et);st.current={hsva:ct,color:et},at(ct)}},[et,tt]),reactExports.useEffect(function(){var ct;F$1(ot,st.current.hsva)||tt.equal(ct=tt.fromHsva(ot),st.current.color)||(st.current={hsva:ot,color:ct},rt(ct))},[ot,tt,rt]);var lt=reactExports.useCallback(function(ct){at(function(ut){return Object.assign({},ut,ct)})},[]);return[ot,lt]}var V$1=typeof window<"u"?reactExports.useLayoutEffect:reactExports.useEffect,$$1=function(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:void 0},J$1=new Map,Q$1=function(tt){V$1(function(){var et=tt.current?tt.current.ownerDocument:document;if(et!==void 0&&!J$1.has(et)){var nt=et.createElement("style");nt.innerHTML=`.react-colorful{position:relative;display:flex;flex-direction:column;width:200px;height:200px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.react-colorful__saturation{position:relative;flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(0deg,#000,transparent),linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.react-colorful__alpha-gradient,.react-colorful__pointer-fill{content:"";position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;border-radius:inherit}.react-colorful__alpha-gradient,.react-colorful__saturation{box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}.react-colorful__alpha,.react-colorful__hue{position:relative;height:24px}.react-colorful__hue{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.react-colorful__last-control{border-radius:0 0 8px 8px}.react-colorful__interactive{position:absolute;left:0;top:0;right:0;bottom:0;border-radius:inherit;outline:none;touch-action:none}.react-colorful__pointer{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}.react-colorful__interactive:focus .react-colorful__pointer{transform:translate(-50%,-50%) scale(1.1)}.react-colorful__alpha,.react-colorful__alpha-pointer{background-color:#fff;background-image:url('data:image/svg+xml;charset=utf-8,')}.react-colorful__saturation-pointer{z-index:3}.react-colorful__hue-pointer{z-index:2}`,J$1.set(et,nt);var rt=$$1();rt&&nt.setAttribute("nonce",rt),et.head.appendChild(nt)}},[])},U$1=function(tt){var et=tt.className,nt=tt.colorModel,rt=tt.color,it=rt===void 0?nt.defaultColor:rt,ot=tt.onChange,at=c$7(tt,["className","colorModel","color","onChange"]),st=reactExports.useRef(null);Q$1(st);var lt=Y$1(nt,it,ot),ct=lt[0],ut=lt[1],ht=g$7(["react-colorful",et]);return React$1.createElement("div",u$4({},at,{ref:st,className:ht}),React$1.createElement(T$1,{hsva:ct,onChange:ut}),React$1.createElement(S$1,{hue:ct.h,onChange:ut,className:"react-colorful__last-control"}))},ee$1=function(tt){var et=tt.className,nt=tt.hsva,rt=tt.onChange,it={backgroundImage:"linear-gradient(90deg, "+k$7(Object.assign({},nt,{a:0}))+", "+k$7(Object.assign({},nt,{a:1}))+")"},ot=g$7(["react-colorful__alpha",et]),at=b$5(100*nt.a);return React$1.createElement("div",{className:ot},React$1.createElement("div",{className:"react-colorful__alpha-gradient",style:it}),React$1.createElement(m$7,{onMove:function(st){rt({a:st.left})},onKey:function(st){rt({a:s$3(nt.a+st.left)})},"aria-label":"Alpha","aria-valuetext":at+"%","aria-valuenow":at,"aria-valuemin":"0","aria-valuemax":"100"},React$1.createElement(p$7,{className:"react-colorful__alpha-pointer",left:nt.a,color:k$7(nt)})))},re$3=function(tt){var et=tt.className,nt=tt.colorModel,rt=tt.color,it=rt===void 0?nt.defaultColor:rt,ot=tt.onChange,at=c$7(tt,["className","colorModel","color","onChange"]),st=reactExports.useRef(null);Q$1(st);var lt=Y$1(nt,it,ot),ct=lt[0],ut=lt[1],ht=g$7(["react-colorful",et]);return React$1.createElement("div",u$4({},at,{ref:st,className:ht}),React$1.createElement(T$1,{hsva:ct,onChange:ut}),React$1.createElement(S$1,{hue:ct.h,onChange:ut}),React$1.createElement(ee$1,{hsva:ct,onChange:ut,className:"react-colorful__last-control"}))},xe$1={defaultColor:{r:0,g:0,b:0,a:1},toHsva:L$1,fromHsva:I$1,equal:F$1},Ce=function(tt){return React$1.createElement(re$3,u$4({},tt,{colorModel:xe$1}))},Me$1={defaultColor:{r:0,g:0,b:0},toHsva:function(tt){return L$1({r:tt.r,g:tt.g,b:tt.b,a:1})},fromHsva:function(tt){return{r:(et=I$1(tt)).r,g:et.g,b:et.b};var et},equal:F$1},Ne$1=function(tt){return React$1.createElement(U$1,u$4({},tt,{colorModel:Me$1}))},propTypes$1={exports:{}},ReactPropTypesSecret$1="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",ReactPropTypesSecret_1=ReactPropTypesSecret$1,ReactPropTypesSecret=ReactPropTypesSecret_1;function emptyFunction(){}function emptyFunctionWithReset(){}emptyFunctionWithReset.resetWarningCache=emptyFunction;var factoryWithThrowingShims=function(){function tt(rt,it,ot,at,st,lt){if(lt!==ReactPropTypesSecret){var ct=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw ct.name="Invariant Violation",ct}}tt.isRequired=tt;function et(){return tt}var nt={array:tt,bigint:tt,bool:tt,func:tt,number:tt,object:tt,string:tt,symbol:tt,any:tt,arrayOf:et,element:tt,elementType:tt,instanceOf:et,node:tt,objectOf:et,oneOf:et,oneOfType:et,shape:et,exact:et,checkPropTypes:emptyFunctionWithReset,resetWarningCache:emptyFunction};return nt.PropTypes=nt,nt};propTypes$1.exports=factoryWithThrowingShims();var propTypesExports=propTypes$1.exports;const PropTypes=getDefaultExportFromCjs(propTypesExports);function __decorate(tt,et,nt,rt){var it=arguments.length,ot=it<3?et:rt===null?rt=Object.getOwnPropertyDescriptor(et,nt):rt,at;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")ot=Reflect.decorate(tt,et,nt,rt);else for(var st=tt.length-1;st>=0;st--)(at=tt[st])&&(ot=(it<3?at(ot):it>3?at(et,nt,ot):at(et,nt))||ot);return it>3&&ot&&Object.defineProperty(et,nt,ot),ot}function __awaiter(tt,et,nt,rt){function it(ot){return ot instanceof nt?ot:new nt(function(at){at(ot)})}return new(nt||(nt=Promise))(function(ot,at){function st(ut){try{ct(rt.next(ut))}catch(ht){at(ht)}}function lt(ut){try{ct(rt.throw(ut))}catch(ht){at(ht)}}function ct(ut){ut.done?ot(ut.value):it(ut.value).then(st,lt)}ct((rt=rt.apply(tt,et||[])).next())})}function __generator(tt,et){var nt={label:0,sent:function(){if(ot[0]&1)throw ot[1];return ot[1]},trys:[],ops:[]},rt,it,ot,at;return at={next:st(0),throw:st(1),return:st(2)},typeof Symbol=="function"&&(at[Symbol.iterator]=function(){return this}),at;function st(ct){return function(ut){return lt([ct,ut])}}function lt(ct){if(rt)throw new TypeError("Generator is already executing.");for(;at&&(at=0,ct[0]&&(nt=0)),nt;)try{if(rt=1,it&&(ot=ct[0]&2?it.return:ct[0]?it.throw||((ot=it.return)&&ot.call(it),0):it.next)&&!(ot=ot.call(it,ct[1])).done)return ot;switch(it=0,ot&&(ct=[ct[0]&2,ot.value]),ct[0]){case 0:case 1:ot=ct;break;case 4:return nt.label++,{value:ct[1],done:!1};case 5:nt.label++,it=ct[1],ct=[0];continue;case 7:ct=nt.ops.pop(),nt.trys.pop();continue;default:if(ot=nt.trys,!(ot=ot.length>0&&ot[ot.length-1])&&(ct[0]===6||ct[0]===2)){nt=0;continue}if(ct[0]===3&&(!ot||ct[1]>ot[0]&&ct[1]0)&&!(it=rt.next()).done;)ot.push(it.value)}catch(st){at={error:st}}finally{try{it&&!it.done&&(nt=rt.return)&&nt.call(rt)}finally{if(at)throw at.error}}return ot}function __spread(){for(var tt=[],et=0;et0?rt:tt.name,writable:!1,configurable:!1,enumerable:!0})}return nt}function withMimeType(tt){var et=tt.name,nt=et&&et.lastIndexOf(".")!==-1;if(nt&&!tt.type){var rt=et.split(".").pop().toLowerCase(),it=COMMON_MIME_TYPES.get(rt);it&&Object.defineProperty(tt,"type",{value:it,writable:!1,configurable:!1,enumerable:!0})}return tt}var FILES_TO_IGNORE=[".DS_Store","Thumbs.db"];function fromEvent(tt){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(et){return isObject$n(tt)&&isDataTransfer(tt)?[2,getDataTransferFiles(tt.dataTransfer,tt.type)]:isChangeEvt(tt)?[2,getInputFiles(tt)]:Array.isArray(tt)&&tt.every(function(nt){return"getFile"in nt&&typeof nt.getFile=="function"})?[2,getFsHandleFiles(tt)]:[2,[]]})})}function isDataTransfer(tt){return isObject$n(tt.dataTransfer)}function isChangeEvt(tt){return isObject$n(tt)&&isObject$n(tt.target)}function isObject$n(tt){return typeof tt=="object"&&tt!==null}function getInputFiles(tt){return fromList(tt.target.files).map(function(et){return toFileWithPath(et)})}function getFsHandleFiles(tt){return __awaiter(this,void 0,void 0,function(){var et;return __generator(this,function(nt){switch(nt.label){case 0:return[4,Promise.all(tt.map(function(rt){return rt.getFile()}))];case 1:return et=nt.sent(),[2,et.map(function(rt){return toFileWithPath(rt)})]}})})}function getDataTransferFiles(tt,et){return __awaiter(this,void 0,void 0,function(){var nt,rt;return __generator(this,function(it){switch(it.label){case 0:return tt===null?[2,[]]:tt.items?(nt=fromList(tt.items).filter(function(ot){return ot.kind==="file"}),et!=="drop"?[2,nt]:[4,Promise.all(nt.map(toFilePromises))]):[3,2];case 1:return rt=it.sent(),[2,noIgnoredFiles(flatten$1(rt))];case 2:return[2,noIgnoredFiles(fromList(tt.files).map(function(ot){return toFileWithPath(ot)}))]}})})}function noIgnoredFiles(tt){return tt.filter(function(et){return FILES_TO_IGNORE.indexOf(et.name)===-1})}function fromList(tt){if(tt===null)return[];for(var et=[],nt=0;nttt.length)&&(et=tt.length);for(var nt=0,rt=new Array(et);ntnt)return[!1,getTooLargeRejectionErr(nt)];if(tt.sizent)return[!1,getTooLargeRejectionErr(nt)]}return[!0,null]}function isDefined$1(tt){return tt!=null}function allFilesAccepted(tt){var et=tt.files,nt=tt.accept,rt=tt.minSize,it=tt.maxSize,ot=tt.multiple,at=tt.maxFiles;return!ot&&et.length>1||ot&&at>=1&&et.length>at?!1:et.every(function(st){var lt=fileAccepted(st,nt),ct=_slicedToArray$e(lt,1),ut=ct[0],ht=fileMatchSize(st,rt,it),dt=_slicedToArray$e(ht,1),pt=dt[0];return ut&&pt})}function isPropagationStopped(tt){return typeof tt.isPropagationStopped=="function"?tt.isPropagationStopped():typeof tt.cancelBubble<"u"?tt.cancelBubble:!1}function isEvtWithFiles(tt){return tt.dataTransfer?Array.prototype.some.call(tt.dataTransfer.types,function(et){return et==="Files"||et==="application/x-moz-file"}):!!tt.target&&!!tt.target.files}function onDocumentDragOver(tt){tt.preventDefault()}function isIe(tt){return tt.indexOf("MSIE")!==-1||tt.indexOf("Trident/")!==-1}function isEdge$1(tt){return tt.indexOf("Edge/")!==-1}function isIeOrEdge(){var tt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return isIe(tt)||isEdge$1(tt)}function composeEventHandlers(){for(var tt=arguments.length,et=new Array(tt),nt=0;nt1?it-1:0),at=1;attt.length)&&(et=tt.length);for(var nt=0,rt=new Array(et);nt=0)&&Object.prototype.propertyIsEnumerable.call(tt,rt)&&(nt[rt]=tt[rt])}return nt}function _objectWithoutPropertiesLoose$n(tt,et){if(tt==null)return{};var nt={},rt=Object.keys(tt),it,ot;for(ot=0;ot=0)&&(nt[it]=tt[it]);return nt}var Dropzone=reactExports.forwardRef(function(tt,et){var nt=tt.children,rt=_objectWithoutProperties$k(tt,_excluded$1L),it=useDropzone(rt),ot=it.open,at=_objectWithoutProperties$k(it,_excluded2$i);return reactExports.useImperativeHandle(et,function(){return{open:ot}},[ot]),React$1.createElement(reactExports.Fragment,null,nt(_objectSpread$A(_objectSpread$A({},at),{},{open:ot})))});Dropzone.displayName="Dropzone";var defaultProps$8={disabled:!1,getFilesFromEvent:fromEvent,maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!0};Dropzone.defaultProps=defaultProps$8;Dropzone.propTypes={children:PropTypes.func,accept:PropTypes.oneOfType([PropTypes.string,PropTypes.arrayOf(PropTypes.string)]),multiple:PropTypes.bool,preventDropOnDocument:PropTypes.bool,noClick:PropTypes.bool,noKeyboard:PropTypes.bool,noDrag:PropTypes.bool,noDragEventsBubbling:PropTypes.bool,minSize:PropTypes.number,maxSize:PropTypes.number,maxFiles:PropTypes.number,disabled:PropTypes.bool,getFilesFromEvent:PropTypes.func,onFileDialogCancel:PropTypes.func,onFileDialogOpen:PropTypes.func,useFsAccessApi:PropTypes.bool,onDragEnter:PropTypes.func,onDragLeave:PropTypes.func,onDragOver:PropTypes.func,onDrop:PropTypes.func,onDropAccepted:PropTypes.func,onDropRejected:PropTypes.func,validator:PropTypes.func};var initialState$1={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,draggedFiles:[],acceptedFiles:[],fileRejections:[]};function useDropzone(){var tt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},et=_objectSpread$A(_objectSpread$A({},defaultProps$8),tt),nt=et.accept,rt=et.disabled,it=et.getFilesFromEvent,ot=et.maxSize,at=et.minSize,st=et.multiple,lt=et.maxFiles,ct=et.onDragEnter,ut=et.onDragLeave,ht=et.onDragOver,dt=et.onDrop,pt=et.onDropAccepted,mt=et.onDropRejected,gt=et.onFileDialogCancel,yt=et.onFileDialogOpen,bt=et.useFsAccessApi,vt=et.preventDropOnDocument,xt=et.noClick,kt=et.noKeyboard,St=et.noDrag,Tt=et.noDragEventsBubbling,At=et.validator,Et=reactExports.useMemo(function(){return typeof yt=="function"?yt:noop$a},[yt]),$t=reactExports.useMemo(function(){return typeof gt=="function"?gt:noop$a},[gt]),Dt=reactExports.useRef(null),jt=reactExports.useRef(null),Pt=reactExports.useReducer(reducer,initialState$1),Ct=_slicedToArray$d(Pt,2),wt=Ct[0],It=Ct[1],Ot=wt.isFocused,Wt=wt.isFileDialogActive,zt=wt.draggedFiles,Ft=reactExports.useRef(typeof window<"u"&&window.isSecureContext&&bt&&canUseFileSystemAccessAPI()),Nt=function(){!Ft.current&&Wt&&setTimeout(function(){if(jt.current){var pn=jt.current.files;pn.length||(It({type:"closeDialog"}),$t())}},300)};reactExports.useEffect(function(){return window.addEventListener("focus",Nt,!1),function(){window.removeEventListener("focus",Nt,!1)}},[jt,Wt,$t,Ft]);var Ut=reactExports.useRef([]),Mt=function(pn){Dt.current&&Dt.current.contains(pn.target)||(pn.preventDefault(),Ut.current=[])};reactExports.useEffect(function(){return vt&&(document.addEventListener("dragover",onDocumentDragOver,!1),document.addEventListener("drop",Mt,!1)),function(){vt&&(document.removeEventListener("dragover",onDocumentDragOver),document.removeEventListener("drop",Mt))}},[Dt,vt]);var Ht=reactExports.useCallback(function(fn){fn.preventDefault(),fn.persist(),Nn(fn),Ut.current=[].concat(_toConsumableArray$e(Ut.current),[fn.target]),isEvtWithFiles(fn)&&Promise.resolve(it(fn)).then(function(pn){isPropagationStopped(fn)&&!Tt||(It({draggedFiles:pn,isDragActive:!0,type:"setDraggedFiles"}),ct&&ct(fn))})},[it,ct,Tt]),en=reactExports.useCallback(function(fn){fn.preventDefault(),fn.persist(),Nn(fn);var pn=isEvtWithFiles(fn);if(pn&&fn.dataTransfer)try{fn.dataTransfer.dropEffect="copy"}catch{}return pn&&ht&&ht(fn),!1},[ht,Tt]),sn=reactExports.useCallback(function(fn){fn.preventDefault(),fn.persist(),Nn(fn);var pn=Ut.current.filter(function(Dn){return Dt.current&&Dt.current.contains(Dn)}),kn=pn.indexOf(fn.target);kn!==-1&&pn.splice(kn,1),Ut.current=pn,!(pn.length>0)&&(It({isDragActive:!1,type:"setDraggedFiles",draggedFiles:[]}),isEvtWithFiles(fn)&&ut&&ut(fn))},[Dt,ut,Tt]),Kt=reactExports.useCallback(function(fn,pn){var kn=[],Dn=[];fn.forEach(function(un){var Zt=fileAccepted(un,nt),Xt=_slicedToArray$d(Zt,2),Sn=Xt[0],Rn=Xt[1],jn=fileMatchSize(un,at,ot),On=_slicedToArray$d(jn,2),Zn=On[0],Vn=On[1],qn=At?At(un):null;if(Sn&&Zn&&!qn)kn.push(un);else{var zn=[Rn,Vn];qn&&(zn=zn.concat(qn)),Dn.push({file:un,errors:zn.filter(function(Jn){return Jn})})}}),(!st&&kn.length>1||st&<>=1&&kn.length>lt)&&(kn.forEach(function(un){Dn.push({file:un,errors:[TOO_MANY_FILES_REJECTION]})}),kn.splice(0)),It({acceptedFiles:kn,fileRejections:Dn,type:"setFiles"}),dt&&dt(kn,Dn,pn),Dn.length>0&&mt&&mt(Dn,pn),kn.length>0&&pt&&pt(kn,pn)},[It,st,nt,at,ot,lt,dt,pt,mt,At]),rn=reactExports.useCallback(function(fn){fn.preventDefault(),fn.persist(),Nn(fn),Ut.current=[],isEvtWithFiles(fn)&&Promise.resolve(it(fn)).then(function(pn){isPropagationStopped(fn)&&!Tt||Kt(pn,fn)}),It({type:"reset"})},[it,Kt,Tt]),nn=reactExports.useCallback(function(){if(Ft.current){It({type:"openDialog"}),Et();var fn={multiple:st,types:filePickerOptionsTypes(nt)};window.showOpenFilePicker(fn).then(function(pn){return it(pn)}).then(function(pn){Kt(pn,null),It({type:"closeDialog"})}).catch(function(pn){isAbort(pn)?($t(pn),It({type:"closeDialog"})):isSecurityError(pn)&&(Ft.current=!1,jt.current&&(jt.current.value=null,jt.current.click()))});return}jt.current&&(It({type:"openDialog"}),Et(),jt.current.value=null,jt.current.click())},[It,Et,$t,bt,Kt,nt,st]),hn=reactExports.useCallback(function(fn){!Dt.current||!Dt.current.isEqualNode(fn.target)||(fn.key===" "||fn.key==="Enter"||fn.keyCode===32||fn.keyCode===13)&&(fn.preventDefault(),nn())},[Dt,nn]),vn=reactExports.useCallback(function(){It({type:"focus"})},[]),an=reactExports.useCallback(function(){It({type:"blur"})},[]),Qt=reactExports.useCallback(function(){xt||(isIeOrEdge()?setTimeout(nn,0):nn())},[xt,nn]),_n=function(pn){return rt?null:pn},Pn=function(pn){return kt?null:_n(pn)},$n=function(pn){return St?null:_n(pn)},Nn=function(pn){Tt&&pn.stopPropagation()},Tn=reactExports.useMemo(function(){return function(){var fn=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},pn=fn.refKey,kn=pn===void 0?"ref":pn,Dn=fn.role,un=fn.onKeyDown,Zt=fn.onFocus,Xt=fn.onBlur,Sn=fn.onClick,Rn=fn.onDragEnter,jn=fn.onDragOver,On=fn.onDragLeave,Zn=fn.onDrop,Vn=_objectWithoutProperties$k(fn,_excluded3$5);return _objectSpread$A(_objectSpread$A(_defineProperty$E({onKeyDown:Pn(composeEventHandlers(un,hn)),onFocus:Pn(composeEventHandlers(Zt,vn)),onBlur:Pn(composeEventHandlers(Xt,an)),onClick:_n(composeEventHandlers(Sn,Qt)),onDragEnter:$n(composeEventHandlers(Rn,Ht)),onDragOver:$n(composeEventHandlers(jn,en)),onDragLeave:$n(composeEventHandlers(On,sn)),onDrop:$n(composeEventHandlers(Zn,rn)),role:typeof Dn=="string"&&Dn!==""?Dn:"button"},kn,Dt),!rt&&!kt?{tabIndex:0}:{}),Vn)}},[Dt,hn,vn,an,Qt,Ht,en,sn,rn,kt,St,rt]),cn=reactExports.useCallback(function(fn){fn.stopPropagation()},[]),mn=reactExports.useMemo(function(){return function(){var fn=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},pn=fn.refKey,kn=pn===void 0?"ref":pn,Dn=fn.onChange,un=fn.onClick,Zt=_objectWithoutProperties$k(fn,_excluded4),Xt=_defineProperty$E({accept:nt,multiple:st,type:"file",style:{display:"none"},onChange:_n(composeEventHandlers(Dn,rn)),onClick:_n(composeEventHandlers(un,cn)),tabIndex:-1},kn,jt);return _objectSpread$A(_objectSpread$A({},Xt),Zt)}},[jt,nt,st,rn,rt]),In=zt.length,An=In>0&&allFilesAccepted({files:zt,accept:nt,minSize:at,maxSize:ot,multiple:st,maxFiles:lt}),wn=In>0&&!An;return _objectSpread$A(_objectSpread$A({},wt),{},{isDragAccept:An,isDragReject:wn,isFocused:Ot&&!rt,getRootProps:Tn,getInputProps:mn,rootRef:Dt,inputRef:jt,open:_n(nn)})}function reducer(tt,et){switch(et.type){case"focus":return _objectSpread$A(_objectSpread$A({},tt),{},{isFocused:!0});case"blur":return _objectSpread$A(_objectSpread$A({},tt),{},{isFocused:!1});case"openDialog":return _objectSpread$A(_objectSpread$A({},initialState$1),{},{isFileDialogActive:!0});case"closeDialog":return _objectSpread$A(_objectSpread$A({},tt),{},{isFileDialogActive:!1});case"setDraggedFiles":var nt=et.isDragActive,rt=et.draggedFiles;return _objectSpread$A(_objectSpread$A({},tt),{},{draggedFiles:rt,isDragActive:nt});case"setFiles":return _objectSpread$A(_objectSpread$A({},tt),{},{acceptedFiles:et.acceptedFiles,fileRejections:et.fileRejections});case"reset":return _objectSpread$A({},initialState$1);default:return tt}}function noop$a(){}function createStore$4(tt){let et;const nt=new Set,rt=(ct,ut)=>{const ht=typeof ct=="function"?ct(et):ct;if(ht!==et){const dt=et;et=ut?ht:Object.assign({},et,ht),nt.forEach(pt=>pt(et,dt))}},it=()=>et,ot=(ct,ut=it,ht=Object.is)=>{console.warn("[DEPRECATED] Please use `subscribeWithSelector` middleware");let dt=ut(et);function pt(){const mt=ut(et);if(!ht(dt,mt)){const gt=dt;ct(dt=mt,gt)}}return nt.add(pt),()=>nt.delete(pt)},lt={setState:rt,getState:it,subscribe:(ct,ut,ht)=>ut||ht?ot(ct,ut,ht):(nt.add(ct),()=>nt.delete(ct)),destroy:()=>nt.clear()};return et=tt(rt,it,lt),lt}const isSSR$3=typeof window>"u"||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),useIsomorphicLayoutEffect$3=isSSR$3?reactExports.useEffect:reactExports.useLayoutEffect;function create$4(tt){const et=typeof tt=="function"?createStore$4(tt):tt,nt=(rt=et.getState,it=Object.is)=>{const[,ot]=reactExports.useReducer(yt=>yt+1,0),at=et.getState(),st=reactExports.useRef(at),lt=reactExports.useRef(rt),ct=reactExports.useRef(it),ut=reactExports.useRef(!1),ht=reactExports.useRef();ht.current===void 0&&(ht.current=rt(at));let dt,pt=!1;(st.current!==at||lt.current!==rt||ct.current!==it||ut.current)&&(dt=rt(at),pt=!it(ht.current,dt)),useIsomorphicLayoutEffect$3(()=>{pt&&(ht.current=dt),st.current=at,lt.current=rt,ct.current=it,ut.current=!1});const mt=reactExports.useRef(at);useIsomorphicLayoutEffect$3(()=>{const yt=()=>{try{const vt=et.getState(),xt=lt.current(vt);ct.current(ht.current,xt)||(st.current=vt,ht.current=xt,ot())}catch{ut.current=!0,ot()}},bt=et.subscribe(yt);return et.getState()!==mt.current&&yt(),bt},[]);const gt=pt?dt:ht.current;return reactExports.useDebugValue(gt),gt};return Object.assign(nt,et),nt[Symbol.iterator]=function(){console.warn("[useStore, api] = create() is deprecated and will be removed in v4");const rt=[nt,et];return{next(){const it=rt.length<=0;return{value:rt.shift(),done:it}}}},nt}const subscribeWithSelector=tt=>(et,nt,rt)=>{const it=rt.subscribe;return rt.subscribe=(at,st,lt)=>{let ct=at;if(st){const ut=(lt==null?void 0:lt.equalityFn)||Object.is;let ht=at(rt.getState());ct=dt=>{const pt=at(dt);if(!ut(ht,pt)){const mt=ht;st(ht=pt,mt)}},lt!=null&<.fireImmediately&&st(ht,ht)}return it(ct)},tt(et,nt,rt)};/*! - * isobject - * - * Copyright (c) 2014-2017, Jon Schlinkert. - * Released under the MIT License. - */var isobject=function(et){return et!=null&&typeof et=="object"&&Array.isArray(et)===!1};/*! - * is-plain-object - * - * Copyright (c) 2014-2017, Jon Schlinkert. - * Released under the MIT License. - */var isObject$m=isobject;function isObjectObject(tt){return isObject$m(tt)===!0&&Object.prototype.toString.call(tt)==="[object Object]"}var isPlainObject$5=function(et){var nt,rt;return!(isObjectObject(et)===!1||(nt=et.constructor,typeof nt!="function")||(rt=nt.prototype,isObjectObject(rt)===!1)||rt.hasOwnProperty("isPrototypeOf")===!1)};/*! - * is-extendable - * - * Copyright (c) 2015-2017, Jon Schlinkert. - * Released under the MIT License. - */var isPlainObject$4=isPlainObject$5,isExtendable$4=function(et){return isPlainObject$4(et)||typeof et=="function"||Array.isArray(et)};/*! - * for-in - * - * Copyright (c) 2014-2017, Jon Schlinkert. - * Released under the MIT License. - */var forIn$1=function(et,nt,rt){for(var it in et)if(nt.call(rt,et[it],it,et)===!1)break},isExtendable$3=isExtendable$4,forIn=forIn$1;function mixinDeep(tt,et){for(var nt=arguments.length,rt=0;++rt - * - * Copyright (c) 2014-2015, Jon Schlinkert. - * Licensed under the MIT License. - */var getValue$5=function(tt,et,nt,rt,it){if(!isObject$k(tt)||!et)return tt;if(et=toString$7(et),nt&&(et+="."+toString$7(nt)),rt&&(et+="."+toString$7(rt)),it&&(et+="."+toString$7(it)),et in tt)return tt[et];for(var ot=et.split("."),at=ot.length,st=-1;tt&&++st - * - * Copyright (c) 2015, Jon Schlinkert. - * Licensed under the MIT License. - */var assignSymbols$1=function(tt,et){if(tt===null||typeof tt>"u")throw new TypeError("expected first argument to be an object.");if(typeof et>"u"||typeof Symbol>"u"||typeof Object.getOwnPropertySymbols!="function")return tt;for(var nt=Object.prototype.propertyIsEnumerable,rt=Object(tt),it=arguments.length,ot=0;++ot"u")throw new TypeError("Cannot convert undefined or null to object");isObject$j(tt)||(tt={});for(var et=1;et - * - * Copyright (c) 2015-2017, Jon Schlinkert. - * Released under the MIT License. - */var extend$4=extendShallow$1,splitString=function(tt,et,nt){if(typeof tt!="string")throw new TypeError("expected a string");typeof et=="function"&&(nt=et,et=null),typeof et=="string"&&(et={sep:et});var rt=extend$4({sep:"."},et),it=rt.quotes||['"',"'","`"],ot;rt.brackets===!0?ot={"<":">","(":")","[":"]","{":"}"}:rt.brackets&&(ot=rt.brackets);var at=[],st=[],lt=[""],ct=rt.sep,ut=tt.length,ht=-1,dt;function pt(){if(ot&&st.length)return ot[st[st.length-1]]}for(;++ht - * - * Copyright (c) 2015, Jon Schlinkert. - * Licensed under the MIT License. - */var isExtendable$1=function(et){return typeof et<"u"&&et!==null&&(typeof et=="object"||typeof et=="function")},isObject$i=isExtendable$1,extendShallow=function(et){isObject$i(et)||(et={});for(var nt=arguments.length,rt=1;rt - * - * Copyright (c) 2015, Jon Schlinkert. - * Licensed under the MIT License. - */var isExtendable=function(et){return typeof et<"u"&&et!==null&&(typeof et=="object"||typeof et=="function")};/*! - * set-value - * - * Copyright (c) 2014-2015, 2017, Jon Schlinkert. - * Released under the MIT License. - */var split=splitString,extend$3=extendShallow,isPlainObject$3=isPlainObject$5,isObject$h=isExtendable,setValue=function(tt,et,nt){if(!isObject$h(tt)||(Array.isArray(et)&&(et=[].concat.apply([],et).join(".")),typeof et!="string"))return tt;for(var rt=split(et,{sep:".",brackets:!0}).filter(isValidKey),it=rt.length,ot=-1,at=tt;++ottt.filter(Boolean).join(".");function getKeyPath(tt){const et=tt.split(".");return[et.pop(),et.join(".")||void 0]}function getValuesForPaths(tt,et){return Object.entries(pick$1(tt,et)).reduce((nt,[,{value:rt,disabled:it,key:ot}])=>(nt[ot]=it?void 0:rt,nt),{})}function useCompareMemoize(tt,et){const nt=reactExports.useRef();return(et?dequal:shallow$2)(tt,nt.current)||(nt.current=tt),nt.current}function useDeepMemo(tt,et){return reactExports.useMemo(tt,useCompareMemoize(et,!0))}function useToggle(tt){const et=reactExports.useRef(null),nt=reactExports.useRef(null),rt=reactExports.useRef(!0);return reactExports.useLayoutEffect(()=>{tt||(et.current.style.height="0px",et.current.style.overflow="hidden")},[]),reactExports.useEffect(()=>{if(rt.current){rt.current=!1;return}let it;const ot=et.current,at=()=>{tt&&(ot.style.removeProperty("height"),ot.style.removeProperty("overflow"),nt.current.scrollIntoView({behavior:"smooth",block:"nearest"}))};ot.addEventListener("transitionend",at,{once:!0});const{height:st}=nt.current.getBoundingClientRect();return ot.style.height=st+"px",tt||(ot.style.overflow="hidden",it=window.setTimeout(()=>ot.style.height="0px",50)),()=>{ot.removeEventListener("transitionend",at),clearTimeout(it)}},[tt]),{wrapperRef:et,contentRef:nt}}const useVisiblePaths=tt=>{const[et,nt]=reactExports.useState(tt.getVisiblePaths());return reactExports.useEffect(()=>{nt(tt.getVisiblePaths());const rt=tt.useStore.subscribe(tt.getVisiblePaths,nt,{equalityFn:shallow$2});return()=>rt()},[tt]),et};function useValuesForPath(tt,et,nt){return tt.useStore(it=>{const ot=_objectSpread2$1(_objectSpread2$1({},nt),it.data);return getValuesForPaths(ot,et)},shallow$2)}function usePopin(tt=3){const et=reactExports.useRef(null),nt=reactExports.useRef(null),[rt,it]=reactExports.useState(!1),ot=reactExports.useCallback(()=>it(!0),[]),at=reactExports.useCallback(()=>it(!1),[]);return reactExports.useLayoutEffect(()=>{if(rt){const{bottom:st,top:lt,left:ct}=et.current.getBoundingClientRect(),{height:ut}=nt.current.getBoundingClientRect(),ht=st+ut>window.innerHeight-40?"up":"down";nt.current.style.position="fixed",nt.current.style.zIndex="10000",nt.current.style.left=ct+"px",ht==="down"?nt.current.style.top=st+tt+"px":nt.current.style.bottom=window.innerHeight-lt+tt+"px"}},[tt,rt]),{popinRef:et,wrapperRef:nt,shown:rt,show:ot,hide:at}}k$8([namesPlugin]);const convertMap={rgb:"toRgb",hsl:"toHsl",hsv:"toHsv",hex:"toHex"};v8n.extend({color:()=>tt=>w$5(tt).isValid()});const schema$2=tt=>v8n().color().test(tt);function convert$5(tt,{format:et,hasAlpha:nt,isString:rt}){const it=convertMap[et]+(rt&&et!=="hex"?"String":""),ot=tt[it]();return typeof ot=="object"&&!nt?omit$1(ot,["a"]):ot}const sanitize$2=(tt,et)=>{const nt=w$5(tt);if(!nt.isValid())throw Error("Invalid color");return convert$5(nt,et)},format$1$1=(tt,et)=>convert$5(w$5(tt),_objectSpread2$1(_objectSpread2$1({},et),{},{isString:!0,format:"hex"})),normalize$3=({value:tt})=>{const et=I$2(tt),nt=et==="name"?"hex":et,rt=typeof tt=="object"?"a"in tt:et==="hex"&&tt.length===8||/^(rgba)|(hsla)|(hsva)/.test(tt),it={format:nt,hasAlpha:rt,isString:typeof tt=="string"};return{value:sanitize$2(tt,it),settings:it}};var props$2=Object.freeze({__proto__:null,schema:schema$2,sanitize:sanitize$2,format:format$1$1,normalize:normalize$3});const ColorPreview=styled$5("div",{position:"relative",boxSizing:"border-box",borderRadius:"$sm",overflow:"hidden",cursor:"pointer",height:"$rowHeight",width:"$rowHeight",backgroundColor:"#fff",backgroundImage:`url('data:image/svg+xml;charset=utf-8,')`,$inputStyle:"",$hover:"",zIndex:1,variants:{active:{true:{$inputStyle:"$accent1"}}},"&::before":{content:'""',position:"absolute",top:0,bottom:0,right:0,left:0,backgroundColor:"currentColor",zIndex:1}}),PickerContainer=styled$5("div",{position:"relative",display:"grid",gridTemplateColumns:"$sizes$rowHeight auto",columnGap:"$colGap",alignItems:"center"}),PickerWrapper=styled$5("div",{width:"$colorPickerWidth",height:"$colorPickerHeight",".react-colorful":{width:"100%",height:"100%",boxShadow:"$level2",cursor:"crosshair"},".react-colorful__saturation":{borderRadius:"$sm $sm 0 0"},".react-colorful__alpha, .react-colorful__hue":{height:10},".react-colorful__last-control":{borderRadius:"0 0 $sm $sm"},".react-colorful__pointer":{height:12,width:12}});function convertToRgb(tt,et){return et!=="rgb"?w$5(tt).toRgb():tt}function Color$2({value:tt,displayValue:et,settings:nt,onUpdate:rt}){const{emitOnEditStart:it,emitOnEditEnd:ot}=useInputContext(),{format:at,hasAlpha:st}=nt,{popinRef:lt,wrapperRef:ct,shown:ut,show:ht,hide:dt}=usePopin(),pt=reactExports.useRef(0),[mt,gt]=reactExports.useState(()=>convertToRgb(tt,at)),yt=st?Ce:Ne$1,bt=()=>{gt(convertToRgb(tt,at)),ht(),it()},vt=()=>{dt(),ot(),window.clearTimeout(pt.current)},xt=()=>{pt.current=window.setTimeout(vt,500)};return reactExports.useEffect(()=>()=>window.clearTimeout(pt.current),[]),React$1.createElement(React$1.Fragment,null,React$1.createElement(ColorPreview,{ref:lt,active:ut,onClick:()=>bt(),style:{color:et}}),ut&&React$1.createElement(Portal$2,null,React$1.createElement(Overlay$1,{onPointerUp:vt}),React$1.createElement(PickerWrapper,{ref:ct,onMouseEnter:()=>window.clearTimeout(pt.current),onMouseLeave:kt=>kt.buttons===0&&xt()},React$1.createElement(yt,{color:mt,onChange:rt}))))}function ColorComponent(){const{value:tt,displayValue:et,label:nt,onChange:rt,onUpdate:it,settings:ot}=useInputContext();return React$1.createElement(Row,{input:!0},React$1.createElement(Label$4,null,nt),React$1.createElement(PickerContainer,null,React$1.createElement(Color$2,{value:tt,displayValue:et,onChange:rt,onUpdate:it,settings:ot}),React$1.createElement(ValueInput,{value:et,onChange:rt,onUpdate:it})))}var color$3=_objectSpread2$1({component:ColorComponent},props$2);function Vector3dComponent(){const{label:tt,displayValue:et,onUpdate:nt,settings:rt}=useInputContext();return React$1.createElement(Row,{input:!0},React$1.createElement(Label$4,null,tt),React$1.createElement(Vector,{value:et,settings:rt,onUpdate:nt}))}var vector3d=_objectSpread2$1({component:Vector3dComponent},getVectorPlugin(["x","y","z"]));const JoystickTrigger=styled$5("div",{$flexCenter:"",position:"relative",backgroundColor:"$elevation3",borderRadius:"$sm",cursor:"pointer",height:"$rowHeight",width:"$rowHeight",touchAction:"none",$draggable:"",$hover:"","&:active":{cursor:"none"},"&::after":{content:'""',backgroundColor:"$accent2",height:4,width:4,borderRadius:2}}),JoystickPlayground=styled$5("div",{$flexCenter:"",width:"$joystickWidth",height:"$joystickHeight",borderRadius:"$sm",boxShadow:"$level2",position:"fixed",zIndex:1e4,overflow:"hidden",$draggable:"",transform:"translate(-50%, -50%)",variants:{isOutOfBounds:{true:{backgroundColor:"$elevation1"},false:{backgroundColor:"$elevation3"}}},"> div":{position:"absolute",$flexCenter:"",borderStyle:"solid",borderWidth:1,borderColor:"$highlight1",backgroundColor:"$elevation3",width:"80%",height:"80%","&::after,&::before":{content:'""',position:"absolute",zindex:10,backgroundColor:"$highlight1"},"&::before":{width:"100%",height:1},"&::after":{height:"100%",width:1}},"> span":{position:"relative",zindex:100,width:10,height:10,backgroundColor:"$accent2",borderRadius:"50%"}});function Joystick({value:tt,settings:et,onUpdate:nt}){const rt=reactExports.useRef(),it=reactExports.useRef(0),ot=reactExports.useRef(0),at=reactExports.useRef(1),[st,lt]=reactExports.useState(!1),[ct,ut]=reactExports.useState(!1),[ht,dt]=useTransform(),pt=reactExports.useRef(null),mt=reactExports.useRef(null);reactExports.useLayoutEffect(()=>{if(st){const{top:Pt,left:Ct,width:wt,height:It}=pt.current.getBoundingClientRect();mt.current.style.left=Ct+wt/2+"px",mt.current.style.top=Pt+It/2+"px"}},[st]);const{keys:[gt,yt],joystick:bt}=et,vt=bt==="invertY"?1:-1,{[gt]:{step:xt},[yt]:{step:kt}}=et,St=useTh("sizes","joystickWidth"),Tt=useTh("sizes","joystickHeight"),At=parseFloat(St)*.8/2,Et=parseFloat(Tt)*.8/2,$t=reactExports.useCallback(()=>{rt.current||(ut(!0),it.current&&dt({x:it.current*At}),ot.current&&dt({y:ot.current*-Et}),rt.current=window.setInterval(()=>{nt(Pt=>{const Ct=xt*it.current*at.current,wt=vt*kt*ot.current*at.current;return Array.isArray(Pt)?{[gt]:Pt[0]+Ct,[yt]:Pt[1]+wt}:{[gt]:Pt[gt]+Ct,[yt]:Pt[yt]+wt}})},16))},[At,Et,nt,dt,xt,kt,gt,yt,vt]),Dt=reactExports.useCallback(()=>{window.clearTimeout(rt.current),rt.current=void 0,ut(!1)},[]);reactExports.useEffect(()=>{function Pt(Ct){at.current=multiplyStep(Ct)}return window.addEventListener("keydown",Pt),window.addEventListener("keyup",Pt),()=>{window.clearTimeout(rt.current),window.removeEventListener("keydown",Pt),window.removeEventListener("keyup",Pt)}},[]);const jt=useDrag$1(({first:Pt,active:Ct,delta:[wt,It],movement:[Ot,Wt]})=>{Pt&<(!0);const zt=clamp$8(Ot,-At,At),Ft=clamp$8(Wt,-Et,Et);it.current=Math.abs(Ot)>Math.abs(zt)?Math.sign(Ot-zt):0,ot.current=Math.abs(Wt)>Math.abs(Ft)?Math.sign(Ft-Wt):0;let Nt=tt[gt],Ut=tt[yt];Ct?(it.current||(Nt+=wt*xt*at.current,dt({x:zt})),ot.current||(Ut-=vt*It*kt*at.current,dt({y:Ft})),it.current||ot.current?$t():Dt(),nt({[gt]:Nt,[yt]:Ut})):(lt(!1),it.current=0,ot.current=0,dt({x:0,y:0}),Dt())});return React$1.createElement(JoystickTrigger,_extends$t({ref:pt},jt()),st&&React$1.createElement(Portal$2,null,React$1.createElement(JoystickPlayground,{ref:mt,isOutOfBounds:ct},React$1.createElement("div",null),React$1.createElement("span",{ref:ht}))))}const Container$1=styled$5("div",{display:"grid",columnGap:"$colGap",variants:{withJoystick:{true:{gridTemplateColumns:"$sizes$rowHeight auto"},false:{gridTemplateColumns:"auto"}}}});function Vector2dComponent(){const{label:tt,displayValue:et,onUpdate:nt,settings:rt}=useInputContext();return React$1.createElement(Row,{input:!0},React$1.createElement(Label$4,null,tt),React$1.createElement(Container$1,{withJoystick:!!rt.joystick},rt.joystick&&React$1.createElement(Joystick,{value:et,settings:rt,onUpdate:nt}),React$1.createElement(Vector,{value:et,settings:rt,onUpdate:nt})))}const _excluded$7$1=["joystick"],plugin=getVectorPlugin(["x","y"]),normalize$2$1=tt=>{let{joystick:et=!0}=tt,nt=_objectWithoutProperties$l(tt,_excluded$7$1);const{value:rt,settings:it}=plugin.normalize(nt);return{value:rt,settings:_objectSpread2$1(_objectSpread2$1({},it),{},{joystick:et})}};var vector2d=_objectSpread2$1(_objectSpread2$1({component:Vector2dComponent},plugin),{},{normalize:normalize$2$1});const sanitize$1=tt=>{if(tt!==void 0){if(tt instanceof File)try{return URL.createObjectURL(tt)}catch{return}if(typeof tt=="string"&&tt.indexOf("blob:")===0)return tt;throw Error("Invalid image format [undefined | blob | File].")}},schema$1=(tt,et)=>typeof et=="object"&&"image"in et,normalize$1$1=({image:tt})=>({value:tt});var props$1=Object.freeze({__proto__:null,sanitize:sanitize$1,schema:schema$1,normalize:normalize$1$1});const ImageContainer=styled$5("div",{position:"relative",display:"grid",gridTemplateColumns:"$sizes$rowHeight auto 20px",columnGap:"$colGap",alignItems:"center"}),DropZone=styled$5("div",{$flexCenter:"",overflow:"hidden",height:"$rowHeight",background:"$elevation3",textAlign:"center",color:"inherit",borderRadius:"$sm",outline:"none",userSelect:"none",cursor:"pointer",$inputStyle:"",$hover:"",$focusWithin:"",$active:"$accent1 $elevation1",variants:{isDragAccept:{true:{$inputStyle:"$accent1",backgroundColor:"$elevation1"}}}}),ImagePreview=styled$5("div",{boxSizing:"border-box",borderRadius:"$sm",height:"$rowHeight",width:"$rowHeight",$inputStyle:"",backgroundSize:"cover",backgroundPosition:"center",variants:{hasImage:{true:{cursor:"pointer",$hover:"",$active:""}}}}),ImageLargePreview=styled$5("div",{$flexCenter:"",width:"$imagePreviewWidth",height:"$imagePreviewHeight",borderRadius:"$sm",boxShadow:"$level2",pointerEvents:"none",$inputStyle:"",backgroundSize:"cover",backgroundPosition:"center"}),Instructions=styled$5("div",{fontSize:"0.8em",height:"100%",padding:"$rowGap $md"}),Remove=styled$5("div",{$flexCenter:"",top:"0",right:"0",marginRight:"$sm",height:"100%",cursor:"pointer",variants:{disabled:{true:{color:"$elevation3",cursor:"default"}}},"&::after,&::before":{content:'""',position:"absolute",height:2,width:10,borderRadius:1,backgroundColor:"currentColor"},"&::after":{transform:"rotate(45deg)"},"&::before":{transform:"rotate(-45deg)"}});function ImageComponent(){const{label:tt,value:et,onUpdate:nt,disabled:rt}=useInputContext(),{popinRef:it,wrapperRef:ot,shown:at,show:st,hide:lt}=usePopin(),ct=reactExports.useCallback(mt=>{mt.length&&nt(mt[0])},[nt]),ut=reactExports.useCallback(mt=>{mt.stopPropagation(),nt(void 0)},[nt]),{getRootProps:ht,getInputProps:dt,isDragAccept:pt}=useDropzone({maxFiles:1,accept:"image/*",onDrop:ct,disabled:rt});return React$1.createElement(Row,{input:!0},React$1.createElement(Label$4,null,tt),React$1.createElement(ImageContainer,null,React$1.createElement(ImagePreview,{ref:it,hasImage:!!et,onPointerDown:()=>!!et&&st(),onPointerUp:lt,style:{backgroundImage:et?`url(${et})`:"none"}}),at&&!!et&&React$1.createElement(Portal$2,null,React$1.createElement(Overlay$1,{onPointerUp:lt,style:{cursor:"pointer"}}),React$1.createElement(ImageLargePreview,{ref:ot,style:{backgroundImage:`url(${et})`}})),React$1.createElement(DropZone,ht({isDragAccept:pt}),React$1.createElement("input",dt()),React$1.createElement(Instructions,null,pt?"drop image":"click or drop")),React$1.createElement(Remove,{onClick:ut,disabled:!et})))}var image=_objectSpread2$1({component:ImageComponent},props$1);const number$5=v8n().number(),schema=(tt,et)=>v8n().array().length(2).every.number().test(tt)&&v8n().schema({min:number$5,max:number$5}).test(et),format$2=tt=>({min:tt[0],max:tt[1]}),sanitize=(tt,{bounds:[et,nt]},rt)=>{const it=Array.isArray(tt)?format$2(tt):tt,ot={min:rt[0],max:rt[1]},{min:at,max:st}=_objectSpread2$1(_objectSpread2$1({},ot),it);return[clamp$8(Number(at),et,Math.max(et,st)),clamp$8(Number(st),Math.min(nt,at),nt)]},normalize$4=({value:tt,min:et,max:nt})=>{const rt={min:et,max:nt},it=normalizeKeyedNumberSettings(format$2(tt),{min:rt,max:rt}),ot=[et,nt],at=_objectSpread2$1(_objectSpread2$1({},it),{},{bounds:ot});return{value:sanitize(format$2(tt),at,tt),settings:at}};var props$3=Object.freeze({__proto__:null,schema,format:format$2,sanitize,normalize:normalize$4});const _excluded$6$1=["value","bounds","onDrag"],_excluded2$1$1=["bounds"],Container=styled$5("div",{display:"grid",columnGap:"$colGap",gridTemplateColumns:"auto calc($sizes$numberInputMinWidth * 2 + $space$rowGap)"});function IntervalSlider(tt){let{value:et,bounds:[nt,rt],onDrag:it}=tt,ot=_objectWithoutProperties$l(tt,_excluded$6$1);const at=reactExports.useRef(null),st=reactExports.useRef(null),lt=reactExports.useRef(null),ct=reactExports.useRef(0),ut=useTh("sizes","scrubberWidth"),ht=useDrag$1(({event:mt,first:gt,xy:[yt],movement:[bt],memo:vt={}})=>{if(gt){const{width:kt,left:St}=at.current.getBoundingClientRect();ct.current=kt-parseFloat(ut);const Tt=(mt==null?void 0:mt.target)===st.current||(mt==null?void 0:mt.target)===lt.current;vt.pos=invertedRange((yt-St)/kt,nt,rt);const At=Math.abs(vt.pos-et.min)-Math.abs(vt.pos-et.max);vt.key=At<0||At===0&&vt.pos<=et.min?"min":"max",Tt&&(vt.pos=et[vt.key])}const xt=vt.pos+invertedRange(bt/ct.current,0,rt-nt);return it({[vt.key]:sanitizeStep(xt,ot[vt.key])}),vt}),dt=`calc(${range$8(et.min,nt,rt)} * (100% - ${ut} - 8px) + 4px)`,pt=`calc(${1-range$8(et.max,nt,rt)} * (100% - ${ut} - 8px) + 4px)`;return React$1.createElement(RangeWrapper,_extends$t({ref:at},ht()),React$1.createElement(Range,null,React$1.createElement(Indicator,{style:{left:dt,right:pt}})),React$1.createElement(Scrubber,{position:"left",ref:st,style:{left:dt}}),React$1.createElement(Scrubber,{position:"right",ref:lt,style:{right:pt}}))}function IntervalComponent(){const{label:tt,displayValue:et,onUpdate:nt,settings:rt}=useInputContext(),it=_objectWithoutProperties$l(rt,_excluded2$1$1);return React$1.createElement(React$1.Fragment,null,React$1.createElement(Row,{input:!0},React$1.createElement(Label$4,null,tt),React$1.createElement(Container,null,React$1.createElement(IntervalSlider,_extends$t({value:et},rt,{onDrag:nt})),React$1.createElement(Vector,{value:et,settings:it,onUpdate:nt,innerLabelTrim:0}))))}var interval$1=_objectSpread2$1({component:IntervalComponent},props$3);const createEventEmitter=()=>{const tt=new Map;return{on:(et,nt)=>{let rt=tt.get(et);rt===void 0&&(rt=new Set,tt.set(et,rt)),rt.add(nt)},off:(et,nt)=>{const rt=tt.get(et);rt!==void 0&&(rt.delete(nt),rt.size===0&&tt.delete(et))},emit:(et,...nt)=>{const rt=tt.get(et);if(rt!==void 0)for(const it of rt)it(...nt)}}},_excluded$5$1=["type","value"],_excluded2$h=["onChange","transient","onEditStart","onEditEnd"],Store=function(){const et=create$4(subscribeWithSelector(()=>({data:{}}))),nt=createEventEmitter();this.storeId=getUid(),this.useStore=et;const rt={},it=new Set;this.getVisiblePaths=()=>{const at=this.getData(),st=Object.keys(at),lt=[];Object.entries(rt).forEach(([ut,ht])=>{ht.render&&st.some(dt=>dt.indexOf(ut)===0)&&!ht.render(this.get)&<.push(ut+".")});const ct=[];return it.forEach(ut=>{ut in at&&at[ut].__refCount>0&<.every(ht=>ut.indexOf(ht)===-1)&&(!at[ut].render||at[ut].render(this.get))&&ct.push(ut)}),ct},this.setOrderedPaths=at=>{at.forEach(st=>it.add(st))},this.orderPaths=at=>(this.setOrderedPaths(at),at),this.disposePaths=at=>{et.setState(st=>{const lt=st.data;return at.forEach(ct=>{if(ct in lt){const ut=lt[ct];ut.__refCount--,ut.__refCount===0&&ut.type in SpecialInputs&&delete lt[ct]}}),{data:lt}})},this.dispose=()=>{et.setState(()=>({data:{}}))},this.getFolderSettings=at=>rt[at]||{},this.getData=()=>et.getState().data,this.addData=(at,st)=>{et.setState(lt=>{const ct=lt.data;return Object.entries(at).forEach(([ut,ht])=>{let dt=ct[ut];if(dt){const{type:pt,value:mt}=ht,gt=_objectWithoutProperties$l(ht,_excluded$5$1);pt!==dt.type?warn$3(LevaErrors.INPUT_TYPE_OVERRIDE,pt):((dt.__refCount===0||st)&&Object.assign(dt,gt),dt.__refCount++)}else ct[ut]=_objectSpread2$1(_objectSpread2$1({},ht),{},{__refCount:1})}),{data:ct}})},this.setValueAtPath=(at,st,lt)=>{et.setState(ct=>{const ut=ct.data;return updateInput(ut[at],st,at,this,lt),{data:ut}})},this.setSettingsAtPath=(at,st)=>{et.setState(lt=>{const ct=lt.data;return ct[at].settings=_objectSpread2$1(_objectSpread2$1({},ct[at].settings),st),{data:ct}})},this.disableInputAtPath=(at,st)=>{et.setState(lt=>{const ct=lt.data;return ct[at].disabled=st,{data:ct}})},this.set=(at,st)=>{et.setState(lt=>{const ct=lt.data;return Object.entries(at).forEach(([ut,ht])=>{try{updateInput(ct[ut],ht,void 0,void 0,st)}catch{}}),{data:ct}})},this.getInput=at=>{try{return this.getData()[at]}catch{warn$3(LevaErrors.PATH_DOESNT_EXIST,at)}},this.get=at=>{var st;return(st=this.getInput(at))===null||st===void 0?void 0:st.value},this.emitOnEditStart=at=>{nt.emit(`onEditStart:${at}`,this.get(at),at,_objectSpread2$1(_objectSpread2$1({},this.getInput(at)),{},{get:this.get}))},this.emitOnEditEnd=at=>{nt.emit(`onEditEnd:${at}`,this.get(at),at,_objectSpread2$1(_objectSpread2$1({},this.getInput(at)),{},{get:this.get}))},this.subscribeToEditStart=(at,st)=>{const lt=`onEditStart:${at}`;return nt.on(lt,st),()=>nt.off(lt,st)},this.subscribeToEditEnd=(at,st)=>{const lt=`onEditEnd:${at}`;return nt.on(lt,st),()=>nt.off(lt,st)};const ot=(at,st,lt)=>{const ct={};return Object.entries(at).forEach(([ut,ht])=>{if(ut==="")return warn$3(LevaErrors.EMPTY_KEY);let dt=join(st,ut);if(ht.type===SpecialInputs.FOLDER){const pt=ot(ht.schema,dt,lt);Object.assign(ct,pt),dt in rt||(rt[dt]=ht.settings)}else if(ut in lt)warn$3(LevaErrors.DUPLICATE_KEYS,ut,dt,lt[ut].path);else{const pt=normalizeInput(ht,ut,dt,ct);if(pt){const{type:mt,options:gt,input:yt}=pt,{onChange:bt,transient:vt,onEditStart:xt,onEditEnd:kt}=gt,St=_objectWithoutProperties$l(gt,_excluded2$h);ct[dt]=_objectSpread2$1(_objectSpread2$1(_objectSpread2$1({type:mt},St),yt),{},{fromPanel:!0}),lt[ut]={path:dt,onChange:bt,transient:vt,onEditStart:xt,onEditEnd:kt}}else warn$3(LevaErrors.UNKNOWN_INPUT,dt,ht)}}),ct};this.getDataFromSchema=at=>{const st={};return[ot(at,"",st),st]}},levaStore=new Store,defaultSettings$2={collapsed:!1};function folder(tt,et){return{type:SpecialInputs.FOLDER,schema:tt,settings:_objectSpread2$1(_objectSpread2$1({},defaultSettings$2),et)}}const isInput=tt=>"__levaInput"in tt,buildTree=(tt,et)=>{const nt={},rt=et?et.toLowerCase():null;return tt.forEach(it=>{const[ot,at]=getKeyPath(it);(!rt||ot.toLowerCase().indexOf(rt)>-1)&&merge$2(nt,at,{[ot]:{__levaInput:!0,path:it}})}),nt},_excluded$4$1=["type","label","path","valueKey","value","settings","setValue","disabled"];function ControlInput(tt){let{type:et,label:nt,path:rt,valueKey:it,value:ot,settings:at,setValue:st,disabled:lt}=tt,ct=_objectWithoutProperties$l(tt,_excluded$4$1);const{displayValue:ut,onChange:ht,onUpdate:dt}=useInputSetters({type:et,value:ot,settings:at,setValue:st}),pt=Plugins[et].component;return pt?React$1.createElement(InputContext.Provider,{value:_objectSpread2$1({key:it,path:rt,id:""+rt,label:nt,displayValue:ut,value:ot,onChange:ht,onUpdate:dt,settings:at,setValue:st,disabled:lt},ct)},React$1.createElement(StyledInputWrapper$1,{disabled:lt},React$1.createElement(pt,null))):(warn$3(LevaErrors.NO_COMPONENT_FOR_TYPE,et,rt),null)}const StyledButton$2=styled$5("button",{display:"block",$reset:"",fontWeight:"$button",height:"$rowHeight",borderStyle:"none",borderRadius:"$sm",backgroundColor:"$elevation1",color:"$highlight1","&:not(:disabled)":{color:"$highlight3",backgroundColor:"$accent2",cursor:"pointer",$hover:"$accent3",$active:"$accent3 $accent1",$focus:""}});function Button$3({onClick:tt,settings:et,label:nt}){const rt=useStoreContext();return React$1.createElement(Row,null,React$1.createElement(StyledButton$2,{disabled:et.disabled,onClick:()=>tt(rt.get)},nt))}const StyledButtonGroup=styled$5("div",{$flex:"",justifyContent:"flex-end",gap:"$colGap"}),StyledButtonGroupButton=styled$5("button",{$reset:"",cursor:"pointer",borderRadius:"$xs","&:hover":{backgroundColor:"$elevation3"}}),getOpts=({label:tt,opts:et})=>{let nt=typeof tt=="string"&&tt.trim()===""?null:tt,rt=et;return typeof et.opts=="object"&&(rt.label!==void 0&&(nt=et.label),rt=et.opts),{label:nt,opts:rt}};function ButtonGroup(tt){const{label:et,opts:nt}=getOpts(tt),rt=useStoreContext();return React$1.createElement(Row,{input:!!et},et&&React$1.createElement(Label$4,null,et),React$1.createElement(StyledButtonGroup,null,Object.entries(nt).map(([it,ot])=>React$1.createElement(StyledButtonGroupButton,{key:it,onClick:()=>ot(rt.get)},it))))}const Canvas$2=styled$5("canvas",{height:"$monitorHeight",width:"100%",display:"block",borderRadius:"$sm"}),POINTS=100;function push(tt,et){tt.push(et),tt.length>POINTS&&tt.shift()}const MonitorCanvas=reactExports.forwardRef(function({initialValue:tt},et){const nt=useTh("colors","highlight3"),rt=useTh("colors","elevation2"),it=useTh("colors","highlight1"),[ot,at]=reactExports.useMemo(()=>[w$5(it).alpha(.4).toRgbString(),w$5(it).alpha(.1).toRgbString()],[it]),st=reactExports.useRef([tt]),lt=reactExports.useRef(tt),ct=reactExports.useRef(tt),ut=reactExports.useRef(),ht=reactExports.useCallback((mt,gt)=>{if(!mt)return;const{width:yt,height:bt}=mt,vt=new Path2D,xt=yt/POINTS,kt=bt*.05;for(let At=0;At({frame:mt=>{(lt.current===void 0||mtct.current)&&(ct.current=mt),push(st.current,mt),ut.current=requestAnimationFrame(()=>ht(dt.current,pt.current))}}),[dt,pt,ht]),reactExports.useEffect(()=>()=>cancelAnimationFrame(ut.current),[]),React$1.createElement(Canvas$2,{ref:dt})}),parse$2=tt=>Number.isFinite(tt)?tt.toPrecision(2):tt.toString(),MonitorLog=reactExports.forwardRef(function({initialValue:tt},et){const[nt,rt]=reactExports.useState(parse$2(tt));return reactExports.useImperativeHandle(et,()=>({frame:it=>rt(parse$2(it))}),[]),React$1.createElement("div",null,nt)});function getValue$4(tt){return typeof tt=="function"?tt():tt.current}function Monitor({label:tt,objectOrFn:et,settings:nt}){const rt=reactExports.useRef(),it=reactExports.useRef(getValue$4(et));return reactExports.useEffect(()=>{const ot=window.setInterval(()=>{var at;document.hidden||(at=rt.current)===null||at===void 0||at.frame(getValue$4(et))},nt.interval);return()=>window.clearInterval(ot)},[et,nt.interval]),React$1.createElement(Row,{input:!0},React$1.createElement(Label$4,{align:"top"},tt),nt.graph?React$1.createElement(MonitorCanvas,{ref:rt,initialValue:it.current}):React$1.createElement(MonitorLog,{ref:rt,initialValue:it.current}))}const _excluded$3$1=["type","label","key"],specialComponents={[SpecialInputs.BUTTON]:Button$3,[SpecialInputs.BUTTON_GROUP]:ButtonGroup,[SpecialInputs.MONITOR]:Monitor},Control=React$1.memo(({path:tt})=>{const[et,{set:nt,setSettings:rt,disable:it,storeId:ot,emitOnEditStart:at,emitOnEditEnd:st}]=useInput(tt);if(!et)return null;const{type:lt,label:ct,key:ut}=et,ht=_objectWithoutProperties$l(et,_excluded$3$1);if(lt in SpecialInputs){const dt=specialComponents[lt];return React$1.createElement(dt,_extends$t({label:ct,path:tt},ht))}return lt in Plugins?React$1.createElement(ControlInput,_extends$t({key:ot+tt,type:lt,label:ct,storeId:ot,path:tt,valueKey:ut,setValue:nt,setSettings:rt,disable:it,emitOnEditStart:at,emitOnEditEnd:st},ht)):(log$2(LevaErrors.UNSUPPORTED_INPUT,lt,tt),null)});function FolderTitle({toggle:tt,toggled:et,name:nt}){return React$1.createElement(StyledTitle,{onClick:()=>tt()},React$1.createElement(Chevron,{toggled:et}),React$1.createElement("div",null,nt))}const Folder=({name:tt,path:et,tree:nt})=>{const rt=useStoreContext(),it=join(et,tt),{collapsed:ot,color:at}=rt.getFolderSettings(it),[st,lt]=reactExports.useState(!ot),ct=reactExports.useRef(null),ut=useTh("colors","folderWidgetColor"),ht=useTh("colors","folderTextColor");return reactExports.useLayoutEffect(()=>{ct.current.style.setProperty("--leva-colors-folderWidgetColor",at||ut),ct.current.style.setProperty("--leva-colors-folderTextColor",at||ht)},[at,ut,ht]),React$1.createElement(StyledFolder,{ref:ct},React$1.createElement(FolderTitle,{name:tt,toggled:st,toggle:()=>lt(dt=>!dt)}),React$1.createElement(TreeWrapper,{parent:it,tree:nt,toggled:st}))},TreeWrapper=React$1.memo(({isRoot:tt=!1,fill:et=!1,flat:nt=!1,parent:rt,tree:it,toggled:ot})=>{const{wrapperRef:at,contentRef:st}=useToggle(ot),lt=useStoreContext(),ct=([ht,dt])=>{var pt;return(isInput(dt)?(pt=lt.getInput(dt.path))===null||pt===void 0?void 0:pt.order:lt.getFolderSettings(join(rt,ht)).order)||0},ut=Object.entries(it).sort((ht,dt)=>ct(ht)-ct(dt));return React$1.createElement(StyledWrapper,{ref:at,isRoot:tt,fill:et,flat:nt},React$1.createElement(StyledContent,{ref:st,isRoot:tt,toggled:ot},ut.map(([ht,dt])=>isInput(dt)?React$1.createElement(Control,{key:dt.path,valueKey:dt.valueKey,path:dt.path}):React$1.createElement(Folder,{key:ht,name:ht,path:rt,tree:dt}))))}),StyledRoot=styled$5("div",{position:"relative",fontFamily:"$mono",fontSize:"$root",color:"$rootText",backgroundColor:"$elevation1",variants:{fill:{false:{position:"fixed",top:"10px",right:"10px",zIndex:1e3,width:"$rootWidth"},true:{position:"relative",width:"100%"}},flat:{false:{borderRadius:"$lg",boxShadow:"$level1"}},oneLineLabels:{true:{[`${StyledInputRow}`]:{gridTemplateColumns:"auto",gridAutoColumns:"minmax(max-content, 1fr)",gridAutoRows:"minmax($sizes$rowHeight), auto)",rowGap:0,columnGap:0,marginTop:"$rowGap"}}},hideTitleBar:{true:{$$titleBarHeight:"0px"},false:{$$titleBarHeight:"$sizes$titleBarHeight"}}},"&,*,*:after,*:before":{boxSizing:"border-box"},"*::selection":{backgroundColor:"$accent2"}}),iconWidth=40,Icon=styled$5("i",{$flexCenter:"",width:iconWidth,userSelect:"none",cursor:"pointer","> svg":{fill:"$highlight1",transition:"transform 350ms ease, fill 250ms ease"},"&:hover > svg":{fill:"$highlight3"},variants:{active:{true:{"> svg":{fill:"$highlight2"}}}}}),StyledTitleWithFilter=styled$5("div",{display:"flex",alignItems:"stretch",justifyContent:"space-between",height:"$titleBarHeight",variants:{mode:{drag:{cursor:"grab"}}}}),FilterWrapper=styled$5("div",{$flex:"",position:"relative",width:"100%",overflow:"hidden",transition:"height 250ms ease",color:"$highlight3",paddingLeft:"$md",[`> ${Icon}`]:{height:30},variants:{toggled:{true:{height:30},false:{height:0}}}}),StyledFilterInput=styled$5("input",{$reset:"",flex:1,position:"relative",height:30,width:"100%",backgroundColor:"transparent",fontSize:"10px",borderRadius:"$root","&:focus":{},"&::placeholder":{color:"$highlight2"}}),TitleContainer=styled$5("div",{touchAction:"none",$flexCenter:"",flex:1,"> svg":{fill:"$highlight1"},color:"$highlight1",variants:{drag:{true:{$draggable:"","> svg":{transition:"fill 250ms ease"},"&:hover":{color:"$highlight3"},"&:hover > svg":{fill:"$highlight3"}}},filterEnabled:{false:{paddingRight:iconWidth}}}}),FilterInput=React$1.forwardRef(({setFilter:tt,toggle:et},nt)=>{const[rt,it]=reactExports.useState(""),ot=reactExports.useMemo(()=>debounce$6(tt,250),[tt]),at=()=>{tt(""),it("")},st=lt=>{const ct=lt.currentTarget.value;et(!0),it(ct)};return reactExports.useEffect(()=>{ot(rt)},[rt,ot]),React$1.createElement(React$1.Fragment,null,React$1.createElement(StyledFilterInput,{ref:nt,value:rt,placeholder:"[Open filter with CMD+SHIFT+L]",onPointerDown:lt=>lt.stopPropagation(),onChange:st}),React$1.createElement(Icon,{onClick:()=>at(),style:{visibility:rt?"visible":"hidden"}},React$1.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",height:"14",width:"14",viewBox:"0 0 20 20",fill:"currentColor"},React$1.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z",clipRule:"evenodd"}))))});function TitleWithFilter({setFilter:tt,onDrag:et,onDragStart:nt,onDragEnd:rt,toggle:it,toggled:ot,title:at,drag:st,filterEnabled:lt,from:ct}){const[ut,ht]=reactExports.useState(!1),dt=reactExports.useRef(null);reactExports.useEffect(()=>{var mt,gt;ut?(mt=dt.current)===null||mt===void 0||mt.focus():(gt=dt.current)===null||gt===void 0||gt.blur()},[ut]);const pt=useDrag$1(({offset:[mt,gt],first:yt,last:bt})=>{et({x:mt,y:gt}),yt&&nt({x:mt,y:gt}),bt&&rt({x:mt,y:gt})},{filterTaps:!0,from:({offset:[mt,gt]})=>[(ct==null?void 0:ct.x)||mt,(ct==null?void 0:ct.y)||gt]});return reactExports.useEffect(()=>{const mt=gt=>{gt.key==="L"&>.shiftKey&>.metaKey&&ht(yt=>!yt)};return window.addEventListener("keydown",mt),()=>window.removeEventListener("keydown",mt)},[]),React$1.createElement(React$1.Fragment,null,React$1.createElement(StyledTitleWithFilter,{mode:st?"drag":void 0},React$1.createElement(Icon,{active:!ot,onClick:()=>it()},React$1.createElement(Chevron,{toggled:ot,width:12,height:8})),React$1.createElement(TitleContainer,_extends$t({},st?pt():{},{drag:st,filterEnabled:lt}),at===void 0&&st?React$1.createElement("svg",{width:"20",height:"10",viewBox:"0 0 28 14",xmlns:"http://www.w3.org/2000/svg"},React$1.createElement("circle",{cx:"2",cy:"2",r:"2"}),React$1.createElement("circle",{cx:"14",cy:"2",r:"2"}),React$1.createElement("circle",{cx:"26",cy:"2",r:"2"}),React$1.createElement("circle",{cx:"2",cy:"12",r:"2"}),React$1.createElement("circle",{cx:"14",cy:"12",r:"2"}),React$1.createElement("circle",{cx:"26",cy:"12",r:"2"})):at),lt&&React$1.createElement(Icon,{active:ut,onClick:()=>ht(mt=>!mt)},React$1.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",height:"20",viewBox:"0 0 20 20"},React$1.createElement("path",{d:"M9 9a2 2 0 114 0 2 2 0 01-4 0z"}),React$1.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm1-13a4 4 0 00-3.446 6.032l-2.261 2.26a1 1 0 101.414 1.415l2.261-2.261A4 4 0 1011 5z",clipRule:"evenodd"})))),React$1.createElement(FilterWrapper,{toggled:ut},React$1.createElement(FilterInput,{ref:dt,setFilter:tt,toggle:it})))}const _excluded$2$1=["store","hidden","theme","collapsed"];function LevaRoot(tt){let{store:et,hidden:nt=!1,theme:rt,collapsed:it=!1}=tt,ot=_objectWithoutProperties$l(tt,_excluded$2$1);const at=useDeepMemo(()=>mergeTheme(rt),[rt]),[st,lt]=reactExports.useState(!it),ct=typeof it=="object"?!it.collapsed:st,ut=reactExports.useMemo(()=>typeof it=="object"?ht=>{typeof ht=="function"?it.onChange(!ht(!it.collapsed)):it.onChange(!ht)}:lt,[it]);return!et||nt?null:React$1.createElement(ThemeContext$3.Provider,{value:at},React$1.createElement(LevaCore,_extends$t({store:et},ot,{toggled:ct,setToggle:ut,rootClass:at.className})))}const LevaCore=React$1.memo(({store:tt,rootClass:et,fill:nt=!1,flat:rt=!1,neverHide:it=!1,oneLineLabels:ot=!1,titleBar:at={title:void 0,drag:!0,filter:!0,position:void 0,onDrag:void 0,onDragStart:void 0,onDragEnd:void 0},hideCopyButton:st=!1,toggled:lt,setToggle:ct})=>{var ut,ht;const dt=useVisiblePaths(tt),[pt,mt]=reactExports.useState(""),gt=reactExports.useMemo(()=>buildTree(dt,pt),[dt,pt]),[yt,bt]=useTransform(),vt=it||dt.length>0,xt=typeof at=="object"&&at.title||void 0,kt=typeof at=="object"&&(ut=at.drag)!==null&&ut!==void 0?ut:!0,St=typeof at=="object"&&(ht=at.filter)!==null&&ht!==void 0?ht:!0,Tt=typeof at=="object"&&at.position||void 0,At=typeof at=="object"&&at.onDrag||void 0,Et=typeof at=="object"&&at.onDragStart||void 0,$t=typeof at=="object"&&at.onDragEnd||void 0;return React$1.useEffect(()=>{bt({x:Tt==null?void 0:Tt.x,y:Tt==null?void 0:Tt.y})},[Tt,bt]),globalStyles(),React$1.createElement(PanelSettingsContext.Provider,{value:{hideCopyButton:st}},React$1.createElement(StyledRoot,{ref:yt,className:et,fill:nt,flat:rt,oneLineLabels:ot,hideTitleBar:!at,style:{display:vt?"block":"none"}},at&&React$1.createElement(TitleWithFilter,{onDrag:Dt=>{bt(Dt),At==null||At(Dt)},onDragStart:Dt=>Et==null?void 0:Et(Dt),onDragEnd:Dt=>$t==null?void 0:$t(Dt),setFilter:mt,toggle:Dt=>ct(jt=>Dt??!jt),toggled:lt,title:xt,drag:kt,filterEnabled:St,from:Tt}),vt&&React$1.createElement(StoreContext$1.Provider,{value:tt},React$1.createElement(TreeWrapper,{isRoot:!0,fill:nt,flat:rt,tree:gt,toggled:lt}))))}),_excluded$1$3=["isRoot"];let rootInitialized=!1,rootEl=null;function Leva(tt){let{isRoot:et=!1}=tt,nt=_objectWithoutProperties$l(tt,_excluded$1$3);return reactExports.useEffect(()=>(rootInitialized=!0,!et&&rootEl&&(rootEl.remove(),rootEl=null),()=>{et||(rootInitialized=!1)}),[et]),React$1.createElement(LevaRoot,_extends$t({store:levaStore},nt))}function useRenderRoot(tt){reactExports.useEffect(()=>{tt&&!rootInitialized&&(rootEl||(rootEl=document.getElementById("leva__root")||Object.assign(document.createElement("div"),{id:"leva__root"}),document.body&&(document.body.appendChild(rootEl),render(React$1.createElement(Leva,{isRoot:!0}),rootEl))),rootInitialized=!0)},[tt])}function parseArgs(tt,et,nt,rt,it){let ot,at,st,lt,ct;return typeof tt=="string"?(at=tt,ot=et,Array.isArray(nt)?ct=nt:nt&&("store"in nt?(lt=nt,ct=rt):(st=nt,Array.isArray(rt)?ct=rt:(lt=rt,ct=it)))):(ot=tt,Array.isArray(et)?ct=et:(lt=et,ct=nt)),{schema:ot,folderName:at,folderSettings:st,hookSettings:lt,deps:ct||[]}}function useControls(tt,et,nt,rt,it){const{folderName:ot,schema:at,folderSettings:st,hookSettings:lt,deps:ct}=parseArgs(tt,et,nt,rt,it),ut=typeof at=="function",ht=reactExports.useRef(!1),dt=reactExports.useRef(!0),pt=useDeepMemo(()=>{ht.current=!0;const jt=typeof at=="function"?at():at;return ot?{[ot]:folder(jt,st)}:jt},ct),mt=!(lt!=null&<.store);useRenderRoot(mt);const[gt]=reactExports.useState(()=>(lt==null?void 0:lt.store)||levaStore),[yt,bt]=reactExports.useMemo(()=>gt.getDataFromSchema(pt),[gt,pt]),[vt,xt,kt,St,Tt]=reactExports.useMemo(()=>{const jt=[],Pt=[],Ct={},wt={},It={};return Object.values(bt).forEach(({path:Ot,onChange:Wt,onEditStart:zt,onEditEnd:Ft,transient:Nt})=>{jt.push(Ot),Wt?(Ct[Ot]=Wt,Nt||Pt.push(Ot)):Pt.push(Ot),zt&&(wt[Ot]=zt),Ft&&(It[Ot]=Ft)}),[jt,Pt,Ct,wt,It]},[bt]),At=reactExports.useMemo(()=>gt.orderPaths(vt),[vt,gt]),Et=useValuesForPath(gt,xt,yt),$t=reactExports.useCallback(jt=>{const Pt=Object.entries(jt).reduce((Ct,[wt,It])=>Object.assign(Ct,{[bt[wt].path]:It}),{});gt.set(Pt,!1)},[gt,bt]),Dt=reactExports.useCallback(jt=>gt.get(bt[jt].path),[gt,bt]);return reactExports.useEffect(()=>{const jt=!dt.current&&ht.current;return gt.addData(yt,jt),dt.current=!1,ht.current=!1,()=>gt.disposePaths(At)},[gt,At,yt]),reactExports.useEffect(()=>{const jt=[];return Object.entries(kt).forEach(([Pt,Ct])=>{Ct(gt.get(Pt),Pt,_objectSpread2$1({initial:!0,get:gt.get},gt.getInput(Pt)));const wt=gt.useStore.subscribe(It=>{const Ot=It.data[Pt];return[Ot.disabled?void 0:Ot.value,Ot]},([It,Ot])=>Ct(It,Pt,_objectSpread2$1({initial:!1,get:gt.get},Ot)),{equalityFn:shallow$2});jt.push(wt)}),()=>jt.forEach(Pt=>Pt())},[gt,kt]),reactExports.useEffect(()=>{const jt=[];return Object.entries(St).forEach(([Pt,Ct])=>jt.push(gt.subscribeToEditStart(Pt,Ct))),Object.entries(Tt).forEach(([Pt,Ct])=>jt.push(gt.subscribeToEditEnd(Pt,Ct))),()=>jt.forEach(Pt=>Pt())},[St,Tt,gt]),ut?[Et,$t,Dt]:Et}register(LevaInputs.SELECT,select$1);register(LevaInputs.IMAGE,image);register(LevaInputs.NUMBER,number$6);register(LevaInputs.COLOR,color$3);register(LevaInputs.STRING,string$1);register(LevaInputs.BOOLEAN,boolean);register(LevaInputs.INTERVAL,interval$1);register(LevaInputs.VECTOR3D,vector3d);register(LevaInputs.VECTOR2D,vector2d);var isCheckBoxInput=tt=>tt.type==="checkbox",isDateObject=tt=>tt instanceof Date,isNullOrUndefined=tt=>tt==null;const isObjectType=tt=>typeof tt=="object";var isObject$f=tt=>!isNullOrUndefined(tt)&&!Array.isArray(tt)&&isObjectType(tt)&&!isDateObject(tt),getEventValue=tt=>isObject$f(tt)&&tt.target?isCheckBoxInput(tt.target)?tt.target.checked:tt.target.value:tt,getNodeParentName=tt=>tt.substring(0,tt.search(/\.\d+(\.|$)/))||tt,isNameInFieldArray=(tt,et)=>tt.has(getNodeParentName(et)),isPlainObject$2=tt=>{const et=tt.constructor&&tt.constructor.prototype;return isObject$f(et)&&et.hasOwnProperty("isPrototypeOf")},isWeb=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function cloneObject(tt){let et;const nt=Array.isArray(tt);if(tt instanceof Date)et=new Date(tt);else if(tt instanceof Set)et=new Set(tt);else if(!(isWeb&&(tt instanceof Blob||tt instanceof FileList))&&(nt||isObject$f(tt)))if(et=nt?[]:{},!nt&&!isPlainObject$2(tt))et=tt;else for(const rt in tt)tt.hasOwnProperty(rt)&&(et[rt]=cloneObject(tt[rt]));else return tt;return et}var compact=tt=>Array.isArray(tt)?tt.filter(Boolean):[],isUndefined$1=tt=>tt===void 0,get$5=(tt,et,nt)=>{if(!et||!isObject$f(tt))return nt;const rt=compact(et.split(/[,[\].]+?/)).reduce((it,ot)=>isNullOrUndefined(it)?it:it[ot],tt);return isUndefined$1(rt)||rt===tt?isUndefined$1(tt[et])?nt:tt[et]:rt},isBoolean$2=tt=>typeof tt=="boolean";const EVENTS={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},VALIDATION_MODE={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},INPUT_VALIDATION_RULES={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},HookFormContext=React$1.createContext(null),useFormContext=()=>React$1.useContext(HookFormContext),FormProvider=tt=>{const{children:et,...nt}=tt;return React$1.createElement(HookFormContext.Provider,{value:nt},et)};var getProxyFormState=(tt,et,nt,rt=!0)=>{const it={defaultValues:et._defaultValues};for(const ot in tt)Object.defineProperty(it,ot,{get:()=>{const at=ot;return et._proxyFormState[at]!==VALIDATION_MODE.all&&(et._proxyFormState[at]=!rt||VALIDATION_MODE.all),nt&&(nt[at]=!0),tt[at]}});return it},isEmptyObject=tt=>isObject$f(tt)&&!Object.keys(tt).length,shouldRenderFormState=(tt,et,nt,rt)=>{nt(tt);const{name:it,...ot}=tt;return isEmptyObject(ot)||Object.keys(ot).length>=Object.keys(et).length||Object.keys(ot).find(at=>et[at]===(!rt||VALIDATION_MODE.all))},convertToArrayPayload=tt=>Array.isArray(tt)?tt:[tt],shouldSubscribeByName=(tt,et,nt)=>!tt||!et||tt===et||convertToArrayPayload(tt).some(rt=>rt&&(nt?rt===et:rt.startsWith(et)||et.startsWith(rt)));function useSubscribe(tt){const et=React$1.useRef(tt);et.current=tt,React$1.useEffect(()=>{const nt=!tt.disabled&&et.current.subject&&et.current.subject.subscribe({next:et.current.next});return()=>{nt&&nt.unsubscribe()}},[tt.disabled])}function useFormState(tt){const et=useFormContext(),{control:nt=et.control,disabled:rt,name:it,exact:ot}=tt||{},[at,st]=React$1.useState(nt._formState),lt=React$1.useRef(!0),ct=React$1.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1}),ut=React$1.useRef(it);return ut.current=it,useSubscribe({disabled:rt,next:ht=>lt.current&&shouldSubscribeByName(ut.current,ht.name,ot)&&shouldRenderFormState(ht,ct.current,nt._updateFormState)&&st({...nt._formState,...ht}),subject:nt._subjects.state}),React$1.useEffect(()=>(lt.current=!0,ct.current.isValid&&nt._updateValid(!0),()=>{lt.current=!1}),[nt]),getProxyFormState(at,nt,ct.current,!1)}var isString$3=tt=>typeof tt=="string",generateWatchOutput=(tt,et,nt,rt,it)=>isString$3(tt)?(rt&&et.watch.add(tt),get$5(nt,tt,it)):Array.isArray(tt)?tt.map(ot=>(rt&&et.watch.add(ot),get$5(nt,ot))):(rt&&(et.watchAll=!0),nt);function useWatch(tt){const et=useFormContext(),{control:nt=et.control,name:rt,defaultValue:it,disabled:ot,exact:at}=tt||{},st=React$1.useRef(rt);st.current=rt,useSubscribe({disabled:ot,subject:nt._subjects.values,next:ut=>{shouldSubscribeByName(st.current,ut.name,at)&&ct(cloneObject(generateWatchOutput(st.current,nt._names,ut.values||nt._formValues,!1,it)))}});const[lt,ct]=React$1.useState(nt._getWatch(rt,it));return React$1.useEffect(()=>nt._removeUnmounted()),lt}var isKey$4=tt=>/^\w*$/.test(tt),stringToPath$3=tt=>compact(tt.replace(/["|']|\]/g,"").split(/\.|\[/));function set$3(tt,et,nt){let rt=-1;const it=isKey$4(et)?[et]:stringToPath$3(et),ot=it.length,at=ot-1;for(;++rt{const ut=it._options.shouldUnregister||ot,ht=(dt,pt)=>{const mt=get$5(it._fields,dt);mt&&(mt._f.mount=pt)};if(ht(nt,!0),ut){const dt=cloneObject(get$5(it._options.defaultValues,nt));set$3(it._defaultValues,nt,dt),isUndefined$1(get$5(it._formValues,nt))&&set$3(it._formValues,nt,dt)}return()=>{(at?ut&&!it._state.action:ut)?it.unregister(nt):ht(nt,!1)}},[nt,it,at,ot]),React$1.useEffect(()=>{get$5(it._fields,nt)&&it._updateDisabledField({disabled:rt,fields:it._fields,name:nt})},[rt,nt,it]),{field:{name:nt,value:st,...isBoolean$2(rt)?{disabled:rt}:{},onChange:React$1.useCallback(ut=>ct.current.onChange({target:{value:getEventValue(ut),name:nt},type:EVENTS.CHANGE}),[nt]),onBlur:React$1.useCallback(()=>ct.current.onBlur({target:{value:get$5(it._formValues,nt),name:nt},type:EVENTS.BLUR}),[nt,it]),ref:ut=>{const ht=get$5(it._fields,nt);ht&&ut&&(ht._f.ref={focus:()=>ut.focus(),select:()=>ut.select(),setCustomValidity:dt=>ut.setCustomValidity(dt),reportValidity:()=>ut.reportValidity()})}},formState:lt,fieldState:Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!get$5(lt.errors,nt)},isDirty:{enumerable:!0,get:()=>!!get$5(lt.dirtyFields,nt)},isTouched:{enumerable:!0,get:()=>!!get$5(lt.touchedFields,nt)},error:{enumerable:!0,get:()=>get$5(lt.errors,nt)}})}}const Controller=tt=>tt.render(useController(tt));var appendErrors=(tt,et,nt,rt,it)=>et?{...nt[tt],types:{...nt[tt]&&nt[tt].types?nt[tt].types:{},[rt]:it||!0}}:{};const focusFieldBy=(tt,et,nt)=>{for(const rt of nt||Object.keys(tt)){const it=get$5(tt,rt);if(it){const{_f:ot,...at}=it;if(ot&&et(ot.name)){if(ot.ref.focus){ot.ref.focus();break}else if(ot.refs&&ot.refs[0].focus){ot.refs[0].focus();break}}else isObject$f(at)&&focusFieldBy(at,et)}}};var getValidationModes=tt=>({isOnSubmit:!tt||tt===VALIDATION_MODE.onSubmit,isOnBlur:tt===VALIDATION_MODE.onBlur,isOnChange:tt===VALIDATION_MODE.onChange,isOnAll:tt===VALIDATION_MODE.all,isOnTouch:tt===VALIDATION_MODE.onTouched}),isWatched=(tt,et,nt)=>!nt&&(et.watchAll||et.watch.has(tt)||[...et.watch].some(rt=>tt.startsWith(rt)&&/^\.\w+/.test(tt.slice(rt.length)))),updateFieldArrayRootError=(tt,et,nt)=>{const rt=compact(get$5(tt,nt));return set$3(rt,"root",et[nt]),set$3(tt,nt,rt),tt},isFileInput=tt=>tt.type==="file",isFunction$6=tt=>typeof tt=="function",isHTMLElement$2=tt=>{if(!isWeb)return!1;const et=tt?tt.ownerDocument:0;return tt instanceof(et&&et.defaultView?et.defaultView.HTMLElement:HTMLElement)},isMessage=tt=>isString$3(tt),isRadioInput=tt=>tt.type==="radio",isRegex=tt=>tt instanceof RegExp;const defaultResult$1={value:!1,isValid:!1},validResult={value:!0,isValid:!0};var getCheckboxValue=tt=>{if(Array.isArray(tt)){if(tt.length>1){const et=tt.filter(nt=>nt&&nt.checked&&!nt.disabled).map(nt=>nt.value);return{value:et,isValid:!!et.length}}return tt[0].checked&&!tt[0].disabled?tt[0].attributes&&!isUndefined$1(tt[0].attributes.value)?isUndefined$1(tt[0].value)||tt[0].value===""?validResult:{value:tt[0].value,isValid:!0}:validResult:defaultResult$1}return defaultResult$1};const defaultReturn={isValid:!1,value:null};var getRadioValue=tt=>Array.isArray(tt)?tt.reduce((et,nt)=>nt&&nt.checked&&!nt.disabled?{isValid:!0,value:nt.value}:et,defaultReturn):defaultReturn;function getValidateError(tt,et,nt="validate"){if(isMessage(tt)||Array.isArray(tt)&&tt.every(isMessage)||isBoolean$2(tt)&&!tt)return{type:nt,message:isMessage(tt)?tt:"",ref:et}}var getValueAndMessage=tt=>isObject$f(tt)&&!isRegex(tt)?tt:{value:tt,message:""},validateField=async(tt,et,nt,rt,it)=>{const{ref:ot,refs:at,required:st,maxLength:lt,minLength:ct,min:ut,max:ht,pattern:dt,validate:pt,name:mt,valueAsNumber:gt,mount:yt,disabled:bt}=tt._f,vt=get$5(et,mt);if(!yt||bt)return{};const xt=at?at[0]:ot,kt=Pt=>{rt&&xt.reportValidity&&(xt.setCustomValidity(isBoolean$2(Pt)?"":Pt||""),xt.reportValidity())},St={},Tt=isRadioInput(ot),At=isCheckBoxInput(ot),Et=Tt||At,$t=(gt||isFileInput(ot))&&isUndefined$1(ot.value)&&isUndefined$1(vt)||isHTMLElement$2(ot)&&ot.value===""||vt===""||Array.isArray(vt)&&!vt.length,Dt=appendErrors.bind(null,mt,nt,St),jt=(Pt,Ct,wt,It=INPUT_VALIDATION_RULES.maxLength,Ot=INPUT_VALIDATION_RULES.minLength)=>{const Wt=Pt?Ct:wt;St[mt]={type:Pt?It:Ot,message:Wt,ref:ot,...Dt(Pt?It:Ot,Wt)}};if(it?!Array.isArray(vt)||!vt.length:st&&(!Et&&($t||isNullOrUndefined(vt))||isBoolean$2(vt)&&!vt||At&&!getCheckboxValue(at).isValid||Tt&&!getRadioValue(at).isValid)){const{value:Pt,message:Ct}=isMessage(st)?{value:!!st,message:st}:getValueAndMessage(st);if(Pt&&(St[mt]={type:INPUT_VALIDATION_RULES.required,message:Ct,ref:xt,...Dt(INPUT_VALIDATION_RULES.required,Ct)},!nt))return kt(Ct),St}if(!$t&&(!isNullOrUndefined(ut)||!isNullOrUndefined(ht))){let Pt,Ct;const wt=getValueAndMessage(ht),It=getValueAndMessage(ut);if(!isNullOrUndefined(vt)&&!isNaN(vt)){const Ot=ot.valueAsNumber||vt&&+vt;isNullOrUndefined(wt.value)||(Pt=Ot>wt.value),isNullOrUndefined(It.value)||(Ct=Otnew Date(new Date().toDateString()+" "+Nt),zt=ot.type=="time",Ft=ot.type=="week";isString$3(wt.value)&&vt&&(Pt=zt?Wt(vt)>Wt(wt.value):Ft?vt>wt.value:Ot>new Date(wt.value)),isString$3(It.value)&&vt&&(Ct=zt?Wt(vt)+Pt.value,It=!isNullOrUndefined(Ct.value)&&vt.length<+Ct.value;if((wt||It)&&(jt(wt,Pt.message,Ct.message),!nt))return kt(St[mt].message),St}if(dt&&!$t&&isString$3(vt)){const{value:Pt,message:Ct}=getValueAndMessage(dt);if(isRegex(Pt)&&!vt.match(Pt)&&(St[mt]={type:INPUT_VALIDATION_RULES.pattern,message:Ct,ref:ot,...Dt(INPUT_VALIDATION_RULES.pattern,Ct)},!nt))return kt(Ct),St}if(pt){if(isFunction$6(pt)){const Pt=await pt(vt,et),Ct=getValidateError(Pt,xt);if(Ct&&(St[mt]={...Ct,...Dt(INPUT_VALIDATION_RULES.validate,Ct.message)},!nt))return kt(Ct.message),St}else if(isObject$f(pt)){let Pt={};for(const Ct in pt){if(!isEmptyObject(Pt)&&!nt)break;const wt=getValidateError(await pt[Ct](vt,et),xt,Ct);wt&&(Pt={...wt,...Dt(Ct,wt.message)},kt(wt.message),nt&&(St[mt]=Pt))}if(!isEmptyObject(Pt)&&(St[mt]={ref:xt,...Pt},!nt))return St}}return kt(!0),St};function baseGet$4(tt,et){const nt=et.slice(0,-1).length;let rt=0;for(;rt{for(const ot of tt)ot.next&&ot.next(it)},subscribe:it=>(tt.push(it),{unsubscribe:()=>{tt=tt.filter(ot=>ot!==it)}}),unsubscribe:()=>{tt=[]}}}var isPrimitive=tt=>isNullOrUndefined(tt)||!isObjectType(tt);function deepEqual$2(tt,et){if(isPrimitive(tt)||isPrimitive(et))return tt===et;if(isDateObject(tt)&&isDateObject(et))return tt.getTime()===et.getTime();const nt=Object.keys(tt),rt=Object.keys(et);if(nt.length!==rt.length)return!1;for(const it of nt){const ot=tt[it];if(!rt.includes(it))return!1;if(it!=="ref"){const at=et[it];if(isDateObject(ot)&&isDateObject(at)||isObject$f(ot)&&isObject$f(at)||Array.isArray(ot)&&Array.isArray(at)?!deepEqual$2(ot,at):ot!==at)return!1}}return!0}var isMultipleSelect=tt=>tt.type==="select-multiple",isRadioOrCheckbox=tt=>isRadioInput(tt)||isCheckBoxInput(tt),live=tt=>isHTMLElement$2(tt)&&tt.isConnected,objectHasFunction=tt=>{for(const et in tt)if(isFunction$6(tt[et]))return!0;return!1};function markFieldsDirty(tt,et={}){const nt=Array.isArray(tt);if(isObject$f(tt)||nt)for(const rt in tt)Array.isArray(tt[rt])||isObject$f(tt[rt])&&!objectHasFunction(tt[rt])?(et[rt]=Array.isArray(tt[rt])?[]:{},markFieldsDirty(tt[rt],et[rt])):isNullOrUndefined(tt[rt])||(et[rt]=!0);return et}function getDirtyFieldsFromDefaultValues(tt,et,nt){const rt=Array.isArray(tt);if(isObject$f(tt)||rt)for(const it in tt)Array.isArray(tt[it])||isObject$f(tt[it])&&!objectHasFunction(tt[it])?isUndefined$1(et)||isPrimitive(nt[it])?nt[it]=Array.isArray(tt[it])?markFieldsDirty(tt[it],[]):{...markFieldsDirty(tt[it])}:getDirtyFieldsFromDefaultValues(tt[it],isNullOrUndefined(et)?{}:et[it],nt[it]):nt[it]=!deepEqual$2(tt[it],et[it]);return nt}var getDirtyFields=(tt,et)=>getDirtyFieldsFromDefaultValues(tt,et,markFieldsDirty(et)),getFieldValueAs=(tt,{valueAsNumber:et,valueAsDate:nt,setValueAs:rt})=>isUndefined$1(tt)?tt:et?tt===""?NaN:tt&&+tt:nt&&isString$3(tt)?new Date(tt):rt?rt(tt):tt;function getFieldValue(tt){const et=tt.ref;if(!(tt.refs?tt.refs.every(nt=>nt.disabled):et.disabled))return isFileInput(et)?et.files:isRadioInput(et)?getRadioValue(tt.refs).value:isMultipleSelect(et)?[...et.selectedOptions].map(({value:nt})=>nt):isCheckBoxInput(et)?getCheckboxValue(tt.refs).value:getFieldValueAs(isUndefined$1(et.value)?tt.ref.value:et.value,tt)}var getResolverOptions=(tt,et,nt,rt)=>{const it={};for(const ot of tt){const at=get$5(et,ot);at&&set$3(it,ot,at._f)}return{criteriaMode:nt,names:[...tt],fields:it,shouldUseNativeValidation:rt}},getRuleValue=tt=>isUndefined$1(tt)?tt:isRegex(tt)?tt.source:isObject$f(tt)?isRegex(tt.value)?tt.value.source:tt.value:tt,hasValidation=tt=>tt.mount&&(tt.required||tt.min||tt.max||tt.maxLength||tt.minLength||tt.pattern||tt.validate);function schemaErrorLookup(tt,et,nt){const rt=get$5(tt,nt);if(rt||isKey$4(nt))return{error:rt,name:nt};const it=nt.split(".");for(;it.length;){const ot=it.join("."),at=get$5(et,ot),st=get$5(tt,ot);if(at&&!Array.isArray(at)&&nt!==ot)return{name:nt};if(st&&st.type)return{name:ot,error:st};it.pop()}return{name:nt}}var skipValidation=(tt,et,nt,rt,it)=>it.isOnAll?!1:!nt&&it.isOnTouch?!(et||tt):(nt?rt.isOnBlur:it.isOnBlur)?!tt:(nt?rt.isOnChange:it.isOnChange)?tt:!0,unsetEmptyArray=(tt,et)=>!compact(get$5(tt,et)).length&&unset(tt,et);const defaultOptions={mode:VALIDATION_MODE.onSubmit,reValidateMode:VALIDATION_MODE.onChange,shouldFocusError:!0};function createFormControl(tt={},et){let nt={...defaultOptions,...tt},rt={submitCount:0,isDirty:!1,isLoading:isFunction$6(nt.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},errors:{}},it={},ot=isObject$f(nt.defaultValues)||isObject$f(nt.values)?cloneObject(nt.defaultValues||nt.values)||{}:{},at=nt.shouldUnregister?{}:cloneObject(ot),st={action:!1,mount:!1,watch:!1},lt={mount:new Set,unMount:new Set,array:new Set,watch:new Set},ct,ut=0;const ht={isDirty:!1,dirtyFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},dt={values:createSubject(),array:createSubject(),state:createSubject()},pt=tt.resetOptions&&tt.resetOptions.keepDirtyValues,mt=getValidationModes(nt.mode),gt=getValidationModes(nt.reValidateMode),yt=nt.criteriaMode===VALIDATION_MODE.all,bt=Tn=>cn=>{clearTimeout(ut),ut=setTimeout(Tn,cn)},vt=async Tn=>{if(ht.isValid||Tn){const cn=nt.resolver?isEmptyObject((await $t()).errors):await jt(it,!0);cn!==rt.isValid&&dt.state.next({isValid:cn})}},xt=Tn=>ht.isValidating&&dt.state.next({isValidating:Tn}),kt=(Tn,cn=[],mn,In,An=!0,wn=!0)=>{if(In&&mn){if(st.action=!0,wn&&Array.isArray(get$5(it,Tn))){const fn=mn(get$5(it,Tn),In.argA,In.argB);An&&set$3(it,Tn,fn)}if(wn&&Array.isArray(get$5(rt.errors,Tn))){const fn=mn(get$5(rt.errors,Tn),In.argA,In.argB);An&&set$3(rt.errors,Tn,fn),unsetEmptyArray(rt.errors,Tn)}if(ht.touchedFields&&wn&&Array.isArray(get$5(rt.touchedFields,Tn))){const fn=mn(get$5(rt.touchedFields,Tn),In.argA,In.argB);An&&set$3(rt.touchedFields,Tn,fn)}ht.dirtyFields&&(rt.dirtyFields=getDirtyFields(ot,at)),dt.state.next({name:Tn,isDirty:Ct(Tn,cn),dirtyFields:rt.dirtyFields,errors:rt.errors,isValid:rt.isValid})}else set$3(at,Tn,cn)},St=(Tn,cn)=>{set$3(rt.errors,Tn,cn),dt.state.next({errors:rt.errors})},Tt=(Tn,cn,mn,In)=>{const An=get$5(it,Tn);if(An){const wn=get$5(at,Tn,isUndefined$1(mn)?get$5(ot,Tn):mn);isUndefined$1(wn)||In&&In.defaultChecked||cn?set$3(at,Tn,cn?wn:getFieldValue(An._f)):Ot(Tn,wn),st.mount&&vt()}},At=(Tn,cn,mn,In,An)=>{let wn=!1,fn=!1;const pn={name:Tn};if(!mn||In){ht.isDirty&&(fn=rt.isDirty,rt.isDirty=pn.isDirty=Ct(),wn=fn!==pn.isDirty);const kn=deepEqual$2(get$5(ot,Tn),cn);fn=get$5(rt.dirtyFields,Tn),kn?unset(rt.dirtyFields,Tn):set$3(rt.dirtyFields,Tn,!0),pn.dirtyFields=rt.dirtyFields,wn=wn||ht.dirtyFields&&fn!==!kn}if(mn){const kn=get$5(rt.touchedFields,Tn);kn||(set$3(rt.touchedFields,Tn,mn),pn.touchedFields=rt.touchedFields,wn=wn||ht.touchedFields&&kn!==mn)}return wn&&An&&dt.state.next(pn),wn?pn:{}},Et=(Tn,cn,mn,In)=>{const An=get$5(rt.errors,Tn),wn=ht.isValid&&isBoolean$2(cn)&&rt.isValid!==cn;if(tt.delayError&&mn?(ct=bt(()=>St(Tn,mn)),ct(tt.delayError)):(clearTimeout(ut),ct=null,mn?set$3(rt.errors,Tn,mn):unset(rt.errors,Tn)),(mn?!deepEqual$2(An,mn):An)||!isEmptyObject(In)||wn){const fn={...In,...wn&&isBoolean$2(cn)?{isValid:cn}:{},errors:rt.errors,name:Tn};rt={...rt,...fn},dt.state.next(fn)}xt(!1)},$t=async Tn=>nt.resolver(at,nt.context,getResolverOptions(Tn||lt.mount,it,nt.criteriaMode,nt.shouldUseNativeValidation)),Dt=async Tn=>{const{errors:cn}=await $t(Tn);if(Tn)for(const mn of Tn){const In=get$5(cn,mn);In?set$3(rt.errors,mn,In):unset(rt.errors,mn)}else rt.errors=cn;return cn},jt=async(Tn,cn,mn={valid:!0})=>{for(const In in Tn){const An=Tn[In];if(An){const{_f:wn,...fn}=An;if(wn){const pn=lt.array.has(wn.name),kn=await validateField(An,at,yt,nt.shouldUseNativeValidation&&!cn,pn);if(kn[wn.name]&&(mn.valid=!1,cn))break;!cn&&(get$5(kn,wn.name)?pn?updateFieldArrayRootError(rt.errors,kn,wn.name):set$3(rt.errors,wn.name,kn[wn.name]):unset(rt.errors,wn.name))}fn&&await jt(fn,cn,mn)}}return mn.valid},Pt=()=>{for(const Tn of lt.unMount){const cn=get$5(it,Tn);cn&&(cn._f.refs?cn._f.refs.every(mn=>!live(mn)):!live(cn._f.ref))&&Kt(Tn)}lt.unMount=new Set},Ct=(Tn,cn)=>(Tn&&cn&&set$3(at,Tn,cn),!deepEqual$2(Ut(),ot)),wt=(Tn,cn,mn)=>generateWatchOutput(Tn,lt,{...st.mount?at:isUndefined$1(cn)?ot:isString$3(Tn)?{[Tn]:cn}:cn},mn,cn),It=Tn=>compact(get$5(st.mount?at:ot,Tn,tt.shouldUnregister?get$5(ot,Tn,[]):[])),Ot=(Tn,cn,mn={})=>{const In=get$5(it,Tn);let An=cn;if(In){const wn=In._f;wn&&(!wn.disabled&&set$3(at,Tn,getFieldValueAs(cn,wn)),An=isHTMLElement$2(wn.ref)&&isNullOrUndefined(cn)?"":cn,isMultipleSelect(wn.ref)?[...wn.ref.options].forEach(fn=>fn.selected=An.includes(fn.value)):wn.refs?isCheckBoxInput(wn.ref)?wn.refs.length>1?wn.refs.forEach(fn=>(!fn.defaultChecked||!fn.disabled)&&(fn.checked=Array.isArray(An)?!!An.find(pn=>pn===fn.value):An===fn.value)):wn.refs[0]&&(wn.refs[0].checked=!!An):wn.refs.forEach(fn=>fn.checked=fn.value===An):isFileInput(wn.ref)?wn.ref.value="":(wn.ref.value=An,wn.ref.type||dt.values.next({name:Tn,values:{...at}})))}(mn.shouldDirty||mn.shouldTouch)&&At(Tn,An,mn.shouldTouch,mn.shouldDirty,!0),mn.shouldValidate&&Nt(Tn)},Wt=(Tn,cn,mn)=>{for(const In in cn){const An=cn[In],wn=`${Tn}.${In}`,fn=get$5(it,wn);(lt.array.has(Tn)||!isPrimitive(An)||fn&&!fn._f)&&!isDateObject(An)?Wt(wn,An,mn):Ot(wn,An,mn)}},zt=(Tn,cn,mn={})=>{const In=get$5(it,Tn),An=lt.array.has(Tn),wn=cloneObject(cn);set$3(at,Tn,wn),An?(dt.array.next({name:Tn,values:{...at}}),(ht.isDirty||ht.dirtyFields)&&mn.shouldDirty&&dt.state.next({name:Tn,dirtyFields:getDirtyFields(ot,at),isDirty:Ct(Tn,wn)})):In&&!In._f&&!isNullOrUndefined(wn)?Wt(Tn,wn,mn):Ot(Tn,wn,mn),isWatched(Tn,lt)&&dt.state.next({...rt}),dt.values.next({name:Tn,values:{...at}}),!st.mount&&et()},Ft=async Tn=>{const cn=Tn.target;let mn=cn.name,In=!0;const An=get$5(it,mn),wn=()=>cn.type?getFieldValue(An._f):getEventValue(Tn);if(An){let fn,pn;const kn=wn(),Dn=Tn.type===EVENTS.BLUR||Tn.type===EVENTS.FOCUS_OUT,un=!hasValidation(An._f)&&!nt.resolver&&!get$5(rt.errors,mn)&&!An._f.deps||skipValidation(Dn,get$5(rt.touchedFields,mn),rt.isSubmitted,gt,mt),Zt=isWatched(mn,lt,Dn);set$3(at,mn,kn),Dn?(An._f.onBlur&&An._f.onBlur(Tn),ct&&ct(0)):An._f.onChange&&An._f.onChange(Tn);const Xt=At(mn,kn,Dn,!1),Sn=!isEmptyObject(Xt)||Zt;if(!Dn&&dt.values.next({name:mn,type:Tn.type,values:{...at}}),un)return ht.isValid&&vt(),Sn&&dt.state.next({name:mn,...Zt?{}:Xt});if(!Dn&&Zt&&dt.state.next({...rt}),xt(!0),nt.resolver){const{errors:Rn}=await $t([mn]),jn=schemaErrorLookup(rt.errors,it,mn),On=schemaErrorLookup(Rn,it,jn.name||mn);fn=On.error,mn=On.name,pn=isEmptyObject(Rn)}else fn=(await validateField(An,at,yt,nt.shouldUseNativeValidation))[mn],In=Number.isNaN(kn)||kn===get$5(at,mn,kn),In&&(fn?pn=!1:ht.isValid&&(pn=await jt(it,!0)));In&&(An._f.deps&&Nt(An._f.deps),Et(mn,pn,fn,Xt))}},Nt=async(Tn,cn={})=>{let mn,In;const An=convertToArrayPayload(Tn);if(xt(!0),nt.resolver){const wn=await Dt(isUndefined$1(Tn)?Tn:An);mn=isEmptyObject(wn),In=Tn?!An.some(fn=>get$5(wn,fn)):mn}else Tn?(In=(await Promise.all(An.map(async wn=>{const fn=get$5(it,wn);return await jt(fn&&fn._f?{[wn]:fn}:fn)}))).every(Boolean),!(!In&&!rt.isValid)&&vt()):In=mn=await jt(it);return dt.state.next({...!isString$3(Tn)||ht.isValid&&mn!==rt.isValid?{}:{name:Tn},...nt.resolver||!Tn?{isValid:mn}:{},errors:rt.errors,isValidating:!1}),cn.shouldFocus&&!In&&focusFieldBy(it,wn=>wn&&get$5(rt.errors,wn),Tn?An:lt.mount),In},Ut=Tn=>{const cn={...ot,...st.mount?at:{}};return isUndefined$1(Tn)?cn:isString$3(Tn)?get$5(cn,Tn):Tn.map(mn=>get$5(cn,mn))},Mt=(Tn,cn)=>({invalid:!!get$5((cn||rt).errors,Tn),isDirty:!!get$5((cn||rt).dirtyFields,Tn),isTouched:!!get$5((cn||rt).touchedFields,Tn),error:get$5((cn||rt).errors,Tn)}),Ht=Tn=>{Tn&&convertToArrayPayload(Tn).forEach(cn=>unset(rt.errors,cn)),dt.state.next({errors:Tn?rt.errors:{}})},en=(Tn,cn,mn)=>{const In=(get$5(it,Tn,{_f:{}})._f||{}).ref;set$3(rt.errors,Tn,{...cn,ref:In}),dt.state.next({name:Tn,errors:rt.errors,isValid:!1}),mn&&mn.shouldFocus&&In&&In.focus&&In.focus()},sn=(Tn,cn)=>isFunction$6(Tn)?dt.values.subscribe({next:mn=>Tn(wt(void 0,cn),mn)}):wt(Tn,cn,!0),Kt=(Tn,cn={})=>{for(const mn of Tn?convertToArrayPayload(Tn):lt.mount)lt.mount.delete(mn),lt.array.delete(mn),cn.keepValue||(unset(it,mn),unset(at,mn)),!cn.keepError&&unset(rt.errors,mn),!cn.keepDirty&&unset(rt.dirtyFields,mn),!cn.keepTouched&&unset(rt.touchedFields,mn),!nt.shouldUnregister&&!cn.keepDefaultValue&&unset(ot,mn);dt.values.next({values:{...at}}),dt.state.next({...rt,...cn.keepDirty?{isDirty:Ct()}:{}}),!cn.keepIsValid&&vt()},rn=({disabled:Tn,name:cn,field:mn,fields:In})=>{if(isBoolean$2(Tn)){const An=Tn?void 0:get$5(at,cn,getFieldValue(mn?mn._f:get$5(In,cn)._f));set$3(at,cn,An),At(cn,An,!1,!1,!0)}},nn=(Tn,cn={})=>{let mn=get$5(it,Tn);const In=isBoolean$2(cn.disabled);return set$3(it,Tn,{...mn||{},_f:{...mn&&mn._f?mn._f:{ref:{name:Tn}},name:Tn,mount:!0,...cn}}),lt.mount.add(Tn),mn?rn({field:mn,disabled:cn.disabled,name:Tn}):Tt(Tn,!0,cn.value),{...In?{disabled:cn.disabled}:{},...nt.progressive?{required:!!cn.required,min:getRuleValue(cn.min),max:getRuleValue(cn.max),minLength:getRuleValue(cn.minLength),maxLength:getRuleValue(cn.maxLength),pattern:getRuleValue(cn.pattern)}:{},name:Tn,onChange:Ft,onBlur:Ft,ref:An=>{if(An){nn(Tn,cn),mn=get$5(it,Tn);const wn=isUndefined$1(An.value)&&An.querySelectorAll&&An.querySelectorAll("input,select,textarea")[0]||An,fn=isRadioOrCheckbox(wn),pn=mn._f.refs||[];if(fn?pn.find(kn=>kn===wn):wn===mn._f.ref)return;set$3(it,Tn,{_f:{...mn._f,...fn?{refs:[...pn.filter(live),wn,...Array.isArray(get$5(ot,Tn))?[{}]:[]],ref:{type:wn.type,name:Tn}}:{ref:wn}}}),Tt(Tn,!1,void 0,wn)}else mn=get$5(it,Tn,{}),mn._f&&(mn._f.mount=!1),(nt.shouldUnregister||cn.shouldUnregister)&&!(isNameInFieldArray(lt.array,Tn)&&st.action)&<.unMount.add(Tn)}}},hn=()=>nt.shouldFocusError&&focusFieldBy(it,Tn=>Tn&&get$5(rt.errors,Tn),lt.mount),vn=(Tn,cn)=>async mn=>{mn&&(mn.preventDefault&&mn.preventDefault(),mn.persist&&mn.persist());let In=cloneObject(at);if(dt.state.next({isSubmitting:!0}),nt.resolver){const{errors:An,values:wn}=await $t();rt.errors=An,In=wn}else await jt(it);unset(rt.errors,"root"),isEmptyObject(rt.errors)?(dt.state.next({errors:{}}),await Tn(In,mn)):(cn&&await cn({...rt.errors},mn),hn(),setTimeout(hn)),dt.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:isEmptyObject(rt.errors),submitCount:rt.submitCount+1,errors:rt.errors})},an=(Tn,cn={})=>{get$5(it,Tn)&&(isUndefined$1(cn.defaultValue)?zt(Tn,get$5(ot,Tn)):(zt(Tn,cn.defaultValue),set$3(ot,Tn,cn.defaultValue)),cn.keepTouched||unset(rt.touchedFields,Tn),cn.keepDirty||(unset(rt.dirtyFields,Tn),rt.isDirty=cn.defaultValue?Ct(Tn,get$5(ot,Tn)):Ct()),cn.keepError||(unset(rt.errors,Tn),ht.isValid&&vt()),dt.state.next({...rt}))},Qt=(Tn,cn={})=>{const mn=Tn?cloneObject(Tn):ot,In=cloneObject(mn),An=Tn&&!isEmptyObject(Tn)?In:ot;if(cn.keepDefaultValues||(ot=mn),!cn.keepValues){if(cn.keepDirtyValues||pt)for(const wn of lt.mount)get$5(rt.dirtyFields,wn)?set$3(An,wn,get$5(at,wn)):zt(wn,get$5(An,wn));else{if(isWeb&&isUndefined$1(Tn))for(const wn of lt.mount){const fn=get$5(it,wn);if(fn&&fn._f){const pn=Array.isArray(fn._f.refs)?fn._f.refs[0]:fn._f.ref;if(isHTMLElement$2(pn)){const kn=pn.closest("form");if(kn){kn.reset();break}}}}it={}}at=tt.shouldUnregister?cn.keepDefaultValues?cloneObject(ot):{}:cloneObject(An),dt.array.next({values:{...An}}),dt.values.next({values:{...An}})}lt={mount:new Set,unMount:new Set,array:new Set,watch:new Set,watchAll:!1,focus:""},!st.mount&&et(),st.mount=!ht.isValid||!!cn.keepIsValid,st.watch=!!tt.shouldUnregister,dt.state.next({submitCount:cn.keepSubmitCount?rt.submitCount:0,isDirty:cn.keepDirty?rt.isDirty:!!(cn.keepDefaultValues&&!deepEqual$2(Tn,ot)),isSubmitted:cn.keepIsSubmitted?rt.isSubmitted:!1,dirtyFields:cn.keepDirtyValues?rt.dirtyFields:cn.keepDefaultValues&&Tn?getDirtyFields(ot,Tn):{},touchedFields:cn.keepTouched?rt.touchedFields:{},errors:cn.keepErrors?rt.errors:{},isSubmitSuccessful:cn.keepIsSubmitSuccessful?rt.isSubmitSuccessful:!1,isSubmitting:!1})},_n=(Tn,cn)=>Qt(isFunction$6(Tn)?Tn(at):Tn,cn);return{control:{register:nn,unregister:Kt,getFieldState:Mt,handleSubmit:vn,setError:en,_executeSchema:$t,_getWatch:wt,_getDirty:Ct,_updateValid:vt,_removeUnmounted:Pt,_updateFieldArray:kt,_updateDisabledField:rn,_getFieldArray:It,_reset:Qt,_resetDefaultValues:()=>isFunction$6(nt.defaultValues)&&nt.defaultValues().then(Tn=>{_n(Tn,nt.resetOptions),dt.state.next({isLoading:!1})}),_updateFormState:Tn=>{rt={...rt,...Tn}},_subjects:dt,_proxyFormState:ht,get _fields(){return it},get _formValues(){return at},get _state(){return st},set _state(Tn){st=Tn},get _defaultValues(){return ot},get _names(){return lt},set _names(Tn){lt=Tn},get _formState(){return rt},set _formState(Tn){rt=Tn},get _options(){return nt},set _options(Tn){nt={...nt,...Tn}}},trigger:Nt,register:nn,handleSubmit:vn,watch:sn,setValue:zt,getValues:Ut,reset:_n,resetField:an,clearErrors:Ht,unregister:Kt,setError:en,setFocus:(Tn,cn={})=>{const mn=get$5(it,Tn),In=mn&&mn._f;if(In){const An=In.refs?In.refs[0]:In.ref;An.focus&&(An.focus(),cn.shouldSelect&&An.select())}},getFieldState:Mt}}function useForm(tt={}){const et=React$1.useRef(),nt=React$1.useRef(),[rt,it]=React$1.useState({isDirty:!1,isValidating:!1,isLoading:isFunction$6(tt.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},errors:{},defaultValues:isFunction$6(tt.defaultValues)?void 0:tt.defaultValues});et.current||(et.current={...createFormControl(tt,()=>it(at=>({...at}))),formState:rt});const ot=et.current.control;return ot._options=tt,useSubscribe({subject:ot._subjects.state,next:at=>{shouldRenderFormState(at,ot._proxyFormState,ot._updateFormState,!0)&&it({...ot._formState})}}),React$1.useEffect(()=>{tt.values&&!deepEqual$2(tt.values,nt.current)?(ot._reset(tt.values,ot._options.resetOptions),nt.current=tt.values):ot._resetDefaultValues()},[tt.values,ot]),React$1.useEffect(()=>{ot._state.mount||(ot._updateValid(),ot._state.mount=!0),ot._state.watch&&(ot._state.watch=!1,ot._subjects.state.next({...ot._formState})),ot._removeUnmounted()}),et.current.formState=getProxyFormState(rt,ot),et.current}const ReactToastify="";var dist$3={exports:{}},lib$4={},postMessage$2={};Object.defineProperty(postMessage$2,"__esModule",{value:!0});postMessage$2.removeEventer=postMessage$2.addEventer=postMessage$2.postMessage=void 0;function postMessage$1(tt){var et=window;if(et.sendToElectron)return et.sendToElectron("sphinx-bridge",tt);et.ReactNativeWebView&&et.ReactNativeWebView.postMessage?et.ReactNativeWebView.postMessage(JSON.stringify(tt)):et.webkit&&et.webkit.messageHandlers&&et.webkit.messageHandlers.sphinx&&et.webkit.messageHandlers.sphinx?et.webkit.messageHandlers.sphinx.postMessage(tt):et.Android?et.Android.receiveMessage(JSON.stringify(tt)):et.parent.postMessage(tt,"*")}postMessage$2.postMessage=postMessage$1;function addEventer(tt){var et=window;if(et.sendToElectron){et.EE&&et.EE.once("sphinx-bridge",tt);return}else et.ReactNativeWebView&&et.ReactNativeWebView.postMessage?document.addEventListener("message",function(nt){var rt={};try{rt=JSON.parse(nt.data)}catch{}tt({data:rt})}):et.webkit&&et.webkit.messageHandlers&&et.webkit.messageHandlers.sphinx&&et.webkit.messageHandlers.sphinx?et.sphinxMessage=function(nt){var rt={};try{rt=JSON.parse(nt)}catch{}tt({data:rt})}:et.Android?et.sphinxMessage=function(nt){var rt={};try{rt=JSON.parse(nt)}catch{}tt({data:rt})}:et.addEventListener("message",tt)}postMessage$2.addEventer=addEventer;function removeEventer(tt){var et=window;et.sendToElectron||(et.ReactNativeWebView&&et.ReactNativeWebView.postMessage?document.removeEventListener("message",tt):et.webkit&&et.webkit.messageHandlers&&et.webkit.messageHandlers.sphinx&&et.webkit.messageHandlers.sphinx||et.Android?et.sphinxMessage=null:et.removeEventListener("message",tt))}postMessage$2.removeEventer=removeEventer;(function(tt){var et=commonjsGlobal&&commonjsGlobal.__assign||function(){return et=Object.assign||function(lt){for(var ct,ut=1,ht=arguments.length;ut0&&pt[pt.length-1])&&(bt[0]===6||bt[0]===2)){ut=0;continue}if(bt[0]===3&&(!pt||bt[1]>pt[0]&&bt[1] ENABLE!"),this.isEnabled)return[2,{budget:this.budget,pubkey:this.pubkey,application:at}];pt.label=1;case 1:return pt.trys.push([1,3,,4]),[4,this.postMsg(ot.AUTHORIZE)];case 2:return ut=pt.sent(),ht=ut.budget||ut.budget===0,ht&&ut.pubkey?(this.isEnabled=!0,this.budget=ut.budget,this.pubkey=ut.pubkey,[2,ut]):[3,4];case 3:return dt=pt.sent(),this.logging&&console.log(dt),[3,4];case 4:return[2,null]}})})},lt.prototype.authorize=function(ct,ut,ht){return nt(this,void 0,void 0,function(){var dt,pt,mt,gt;return rt(this,function(yt){switch(yt.label){case 0:ht&&(this.logging=!0),this.logging&&console.log("=> AUTHORIZE!"),yt.label=1;case 1:return yt.trys.push([1,3,,4]),dt=ut||!1,[4,this.postMsg(ot.AUTHORIZE,{challenge:ct,noBudget:dt})];case 2:return pt=yt.sent(),mt=pt.budget||pt.budget===0,(dt||mt)&&pt.pubkey?(this.isEnabled=!0,this.budget=pt.budget||0,this.pubkey=pt.pubkey,[2,pt]):[3,4];case 3:return gt=yt.sent(),this.logging&&console.log(gt),[3,4];case 4:return[2,null]}})})},lt.prototype.topup=function(){return nt(this,void 0,void 0,function(){var ct,ut,ht;return rt(this,function(dt){switch(dt.label){case 0:this.logging&&console.log("=> TOP UP"),dt.label=1;case 1:return dt.trys.push([1,3,,4]),[4,this.postMsg(ot.AUTHORIZE)];case 2:return ct=dt.sent(),ut=ct.budget||ct.budget===0,ut&&ct.pubkey?(this.budget=ct.budget,this.pubkey=ct.pubkey,[2,ct]):[3,4];case 3:return ht=dt.sent(),this.logging&&console.log(ht),[3,4];case 4:return[2,null]}})})},lt.prototype.keysend=function(ct,ut){return nt(this,void 0,void 0,function(){var ht,dt,pt;return rt(this,function(mt){switch(mt.label){case 0:if(this.logging&&console.log("=> KEYSEND"),!this.isEnabled)return[2,null];if(!ct||!ut)return[2,null];if(ct.length!==66)return[2,null];if(ut<1)return[2,null];if(ut>this.budget)return[2,null];mt.label=1;case 1:return mt.trys.push([1,3,,4]),ht={dest:ct,amt:ut},[4,this.postMsg(ot.KEYSEND,ht)];case 2:return dt=mt.sent(),dt&&dt.success&&(this.budget=this.budget-ut,dt.budget=this.budget),[2,dt];case 3:return pt=mt.sent(),this.logging&&console.log(pt),[2,null];case 4:return[2]}})})},lt.prototype.updated=function(){return nt(this,void 0,void 0,function(){var ct,ut;return rt(this,function(ht){switch(ht.label){case 0:if(this.logging&&console.log("=> UDPATED"),!this.isEnabled)return[2,null];ht.label=1;case 1:return ht.trys.push([1,3,,4]),[4,this.postMsg(ot.UPDATED)];case 2:return ct=ht.sent(),[2,ct];case 3:return ut=ht.sent(),this.logging&&console.log(ut),[2,null];case 4:return[2]}})})},lt.prototype.sendPayment=function(ct){return nt(this,void 0,void 0,function(){var ut,ht;return rt(this,function(dt){switch(dt.label){case 0:if(this.logging&&console.log("=> SEND PAYMENT"),!this.isEnabled)return[2,null];dt.label=1;case 1:return dt.trys.push([1,3,,4]),[4,this.postMsg(ot.PAYMENT,{paymentRequest:ct})];case 2:return ut=dt.sent(),[2,ut];case 3:return ht=dt.sent(),this.logging&&console.log(ht),[2,null];case 4:return[2]}})})},lt.prototype.saveLsat=function(ct,ut,ht){return nt(this,void 0,void 0,function(){var dt,pt;return rt(this,function(mt){switch(mt.label){case 0:this.logging&&console.log("=> SAVE LSAT"),mt.label=1;case 1:return mt.trys.push([1,3,,4]),[4,this.postMsg(ot.LSAT,{paymentRequest:ct,macaroon:ut,issuer:ht})];case 2:return dt=mt.sent(),[2,dt];case 3:return pt=mt.sent(),this.logging&&console.log(pt),[2,pt];case 4:return[2]}})})},lt.prototype.getLsat=function(ct){return nt(this,void 0,void 0,function(){var ut,ht;return rt(this,function(dt){switch(dt.label){case 0:if(this.logging&&console.log("=> GET LSAT"),!this.isEnabled)return[2,null];dt.label=1;case 1:return dt.trys.push([1,3,,4]),[4,this.postMsg(ot.GETLSAT,{issuer:ct})];case 2:return ut=dt.sent(),[2,ut];case 3:return ht=dt.sent(),this.logging&&console.log(ht),[2,ht];case 4:return[2]}})})},lt.prototype.updateLsat=function(ct,ut){return nt(this,void 0,void 0,function(){var ht,dt;return rt(this,function(pt){switch(pt.label){case 0:if(this.logging&&console.log("=> UPDATE LSAT"),!this.isEnabled)return[2,null];pt.label=1;case 1:return pt.trys.push([1,3,,4]),[4,this.postMsg(ot.UPDATELSAT,{identifier:ct,status:ut})];case 2:return ht=pt.sent(),[2,ht];case 3:return dt=pt.sent(),this.logging&&console.log(dt),[2,dt];case 4:return[2]}})})},lt.prototype.makeInvoice=function(ct,ut){return nt(this,void 0,void 0,function(){var ht,dt;return rt(this,function(pt){switch(pt.label){case 0:if(this.logging&&console.log("=> MAKE INVOICE"),!this.isEnabled)return[2,null];pt.label=1;case 1:return pt.trys.push([1,3,,4]),[4,this.postMsg(ot.INVOICE,{amt:ct,memo:ut})];case 2:return ht=pt.sent(),[2,ht];case 3:return dt=pt.sent(),this.logging&&console.log(dt),[2,null];case 4:return[2]}})})},lt.prototype.signMessage=function(ct){return nt(this,void 0,void 0,function(){var ut,ht;return rt(this,function(dt){switch(dt.label){case 0:if(this.logging&&console.log("=> SIGN MESSAGE"),!this.isEnabled)return[2,null];dt.label=1;case 1:return dt.trys.push([1,3,,4]),[4,this.postMsg(ot.SIGN,{message:ct})];case 2:return ut=dt.sent(),[2,ut];case 3:return ht=dt.sent(),this.logging&&console.log(ht),[2,null];case 4:return[2]}})})},lt.prototype.verifyMessage=function(ct,ut){return nt(this,void 0,void 0,function(){var ht,dt;return rt(this,function(pt){switch(pt.label){case 0:if(this.logging&&console.log("=> VERIFY MESSAGE"),!this.isEnabled)return[2,null];pt.label=1;case 1:return pt.trys.push([1,3,,4]),[4,this.postMsg(ot.SIGN,{signature:ct,message:ut})];case 2:return ht=pt.sent(),[2,ht];case 3:return dt=pt.sent(),this.logging&&console.log(dt),[2,null];case 4:return[2]}})})},lt.prototype.reload=function(ct){return nt(this,void 0,void 0,function(){var ut,ht,dt;return rt(this,function(pt){switch(pt.label){case 0:this.logging&&console.log("=> RELOAD"),pt.label=1;case 1:return pt.trys.push([1,3,,4]),[4,this.postMsg(ot.RELOAD,{password:ct})];case 2:return ut=pt.sent(),ht=ut.budget||ut.budget===0,ht&&ut.pubkey?(this.isEnabled=!0,this.budget=ut.budget,this.pubkey=ut.pubkey,[2,ut]):[3,4];case 3:return dt=pt.sent(),this.logging&&console.log(dt),[3,4];case 4:return[2,null]}})})},lt.prototype.saveGraphData=function(ct){return nt(this,void 0,void 0,function(){var ut,ht;return rt(this,function(dt){switch(dt.label){case 0:if(this.logging&&console.log("=> SAVEDATA"),!this.isEnabled)return[2,null];dt.label=1;case 1:return dt.trys.push([1,3,,4]),[4,this.postMsg(ot.SAVEDATA,{data:{type:ct.type,metaData:ct.metaData}})];case 2:return ut=dt.sent(),[2,ut];case 3:return ht=dt.sent(),this.logging&&console.log(ht),[2,null];case 4:return[2]}})})},lt.prototype.getPersonData=function(){return nt(this,void 0,void 0,function(){var ct,ut;return rt(this,function(ht){switch(ht.label){case 0:if(this.logging&&console.log("=> GETPERSONDATA"),!this.isEnabled)return[2,null];ht.label=1;case 1:return ht.trys.push([1,3,,4]),[4,this.postMsg(ot.GETPERSONDATA)];case 2:return ct=ht.sent(),[2,ct];case 3:return ut=ht.sent(),this.logging&&console.log(ut),[2,null];case 4:return[2]}})})},lt.prototype.getBudget=function(){return nt(this,void 0,void 0,function(){var ct,ut;return rt(this,function(ht){switch(ht.label){case 0:if(this.logging&&console.log("=> GETBUDGET"),!this.isEnabled)return[2,null];ht.label=1;case 1:return ht.trys.push([1,3,,4]),[4,this.postMsg(ot.GETBUDGET)];case 2:return ct=ht.sent(),[2,ct];case 3:return ut=ht.sent(),this.logging&&console.log(ut),[2,null];case 4:return[2]}})})},lt.prototype.postMsg=function(ct,ut){var ht=this;return ht.active&&Promise.reject(new Error("User is busy")),ht.active=ct,new Promise(function(dt,pt){it.postMessage(et({application:at,type:ct},ut||{}));function mt(gt){!gt.data||gt.data.application!==at||(gt.data.error?(ht.active=null,pt(gt.data.error)):(ht.active=null,dt(gt.data)),it.removeEventer(mt))}it.addEventer(mt)})},lt}();tt.default=st})(lib$4);var dist$2=dist$3.exports;Object.defineProperty(dist$2,"__esModule",{value:!0});var lib_1=lib$4,sphinx=new lib_1.default;dist$3.exports=sphinx;var distExports$1=dist$3.exports,reactIs$3={exports:{}},reactIs_production_min$2={};/** - * @license React - * react-is.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var b$4=Symbol.for("react.element"),c$6=Symbol.for("react.portal"),d$3=Symbol.for("react.fragment"),e$4=Symbol.for("react.strict_mode"),f$5=Symbol.for("react.profiler"),g$6=Symbol.for("react.provider"),h$7=Symbol.for("react.context"),k$6=Symbol.for("react.server_context"),l$4=Symbol.for("react.forward_ref"),m$6=Symbol.for("react.suspense"),n$5=Symbol.for("react.suspense_list"),p$6=Symbol.for("react.memo"),q$5=Symbol.for("react.lazy"),t$5=Symbol.for("react.offscreen"),u$3;u$3=Symbol.for("react.module.reference");function v$6(tt){if(typeof tt=="object"&&tt!==null){var et=tt.$$typeof;switch(et){case b$4:switch(tt=tt.type,tt){case d$3:case f$5:case e$4:case m$6:case n$5:return tt;default:switch(tt=tt&&tt.$$typeof,tt){case k$6:case h$7:case l$4:case q$5:case p$6:case g$6:return tt;default:return et}}case c$6:return et}}}reactIs_production_min$2.ContextConsumer=h$7;reactIs_production_min$2.ContextProvider=g$6;reactIs_production_min$2.Element=b$4;reactIs_production_min$2.ForwardRef=l$4;reactIs_production_min$2.Fragment=d$3;reactIs_production_min$2.Lazy=q$5;reactIs_production_min$2.Memo=p$6;reactIs_production_min$2.Portal=c$6;reactIs_production_min$2.Profiler=f$5;reactIs_production_min$2.StrictMode=e$4;reactIs_production_min$2.Suspense=m$6;reactIs_production_min$2.SuspenseList=n$5;reactIs_production_min$2.isAsyncMode=function(){return!1};reactIs_production_min$2.isConcurrentMode=function(){return!1};reactIs_production_min$2.isContextConsumer=function(tt){return v$6(tt)===h$7};reactIs_production_min$2.isContextProvider=function(tt){return v$6(tt)===g$6};reactIs_production_min$2.isElement=function(tt){return typeof tt=="object"&&tt!==null&&tt.$$typeof===b$4};reactIs_production_min$2.isForwardRef=function(tt){return v$6(tt)===l$4};reactIs_production_min$2.isFragment=function(tt){return v$6(tt)===d$3};reactIs_production_min$2.isLazy=function(tt){return v$6(tt)===q$5};reactIs_production_min$2.isMemo=function(tt){return v$6(tt)===p$6};reactIs_production_min$2.isPortal=function(tt){return v$6(tt)===c$6};reactIs_production_min$2.isProfiler=function(tt){return v$6(tt)===f$5};reactIs_production_min$2.isStrictMode=function(tt){return v$6(tt)===e$4};reactIs_production_min$2.isSuspense=function(tt){return v$6(tt)===m$6};reactIs_production_min$2.isSuspenseList=function(tt){return v$6(tt)===n$5};reactIs_production_min$2.isValidElementType=function(tt){return typeof tt=="string"||typeof tt=="function"||tt===d$3||tt===f$5||tt===e$4||tt===m$6||tt===n$5||tt===t$5||typeof tt=="object"&&tt!==null&&(tt.$$typeof===q$5||tt.$$typeof===p$6||tt.$$typeof===g$6||tt.$$typeof===h$7||tt.$$typeof===l$4||tt.$$typeof===u$3||tt.getModuleId!==void 0)};reactIs_production_min$2.typeOf=v$6;reactIs$3.exports=reactIs_production_min$2;var reactIsExports$2=reactIs$3.exports;function stylis_min(tt){function et(Mt,Ht,en,sn,Kt){for(var rn=0,nn=0,hn=0,vn=0,an,Qt,_n=0,Pn=0,$n,Nn=$n=an=0,Tn=0,cn=0,mn=0,In=0,An=en.length,wn=An-1,fn,pn="",kn="",Dn="",un="",Zt;Tnan)&&(In=(pn=pn.replace(" ",":")).length),0sn&&(sn=(Ht=Ht.trim()).charCodeAt(0)),sn){case 38:return Ht.replace(bt,"$1"+Mt.trim());case 58:return Mt.trim()+Ht.replace(bt,"$1"+Mt.trim());default:if(0<1*en&&0nn.charCodeAt(8))break;case 115:Kt=Kt.replace(nn,"-webkit-"+nn)+";"+Kt;break;case 207:case 102:Kt=Kt.replace(nn,"-webkit-"+(102en.charCodeAt(0)&&(en=en.trim()),Ut=en,en=[Ut],01?et-1:0),rt=1;rt0?" Args: "+nt.join(", "):""))}var j=function(){function tt(nt){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=nt}var et=tt.prototype;return et.indexOfGroup=function(nt){for(var rt=0,it=0;it=this.groupSizes.length){for(var it=this.groupSizes,ot=it.length,at=ot;nt>=at;)(at<<=1)<0&&D(16,""+nt);this.groupSizes=new Uint32Array(at),this.groupSizes.set(it),this.length=at;for(var st=ot;st=this.length||this.groupSizes[nt]===0)return rt;for(var it=this.groupSizes[nt],ot=this.indexOfGroup(nt),at=ot+it,st=ot;st=k$4&&(k$4=et+1),T.set(tt,et),x$5.set(et,tt)},M="style["+N+'][data-styled-version="5.3.11"]',G$1=new RegExp("^"+N+'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)'),L=function(tt,et,nt){for(var rt,it=nt.split(","),ot=0,at=it.length;ot=0;ct--){var ut=lt[ct];if(ut&&ut.nodeType===1&&ut.hasAttribute(N))return ut}}(nt),ot=it!==void 0?it.nextSibling:null;rt.setAttribute(N,"active"),rt.setAttribute("data-styled-version","5.3.11");var at=Y();return at&&rt.setAttribute("nonce",at),nt.insertBefore(rt,ot),rt},H=function(){function tt(nt){var rt=this.element=q$3(nt);rt.appendChild(document.createTextNode("")),this.sheet=function(it){if(it.sheet)return it.sheet;for(var ot=document.styleSheets,at=0,st=ot.length;at=0){var it=document.createTextNode(rt),ot=this.nodes[nt];return this.element.insertBefore(it,ot||null),this.length++,!0}return!1},et.deleteRule=function(nt){this.element.removeChild(this.nodes[nt]),this.length--},et.getRule=function(nt){return nt0&&(ht+=dt+",")}),ot+=""+ct+ut+'{content:"'+ht+`"}/*!sc*/ -`}}}return ot}(this)},tt}(),Z=/(a)(d)/gi,K$5=function(tt){return String.fromCharCode(tt+(tt>25?39:97))};function Q(tt){var et,nt="";for(et=Math.abs(tt);et>52;et=et/52|0)nt=K$5(et%52)+nt;return(K$5(et%52)+nt).replace(Z,"$1-$2")}var ee=function(tt,et){for(var nt=et.length;nt;)tt=33*tt^et.charCodeAt(--nt);return tt},te=function(tt){return ee(5381,tt)};function ne(tt){for(var et=0;et>>0);if(!nt.hasNameForId(it,st)){var lt=rt(at,"."+st,void 0,it);nt.insertRules(it,st,lt)}ot.push(st),this.staticRulesId=st}else{for(var ct=this.rules.length,ut=ee(this.baseHash,rt.hash),ht="",dt=0;dt>>0);if(!nt.hasNameForId(it,yt)){var bt=rt(ht,"."+yt,void 0,it);nt.insertRules(it,yt,bt)}ot.push(yt)}}return ot.join(" ")},tt}(),se=/^\s*\/\/.*$/gm,ie=[":","[",".","#"];function ae(tt){var et,nt,rt,it,ot=tt===void 0?w$3:tt,at=ot.options,st=at===void 0?w$3:at,lt=ot.plugins,ct=lt===void 0?S:lt,ut=new stylis_min(st),ht=[],dt=function(gt){function yt(bt){if(bt)try{gt(bt+"}")}catch{}}return function(bt,vt,xt,kt,St,Tt,At,Et,$t,Dt){switch(bt){case 1:if($t===0&&vt.charCodeAt(0)===64)return gt(vt+";"),"";break;case 2:if(Et===0)return vt+"/*|*/";break;case 3:switch(Et){case 102:case 112:return gt(xt[0]+vt),"";default:return vt+(Dt===0?"/*|*/":"")}case-2:vt.split("/*|*/}").forEach(yt)}}}(function(gt){ht.push(gt)}),pt=function(gt,yt,bt){return yt===0&&ie.indexOf(bt[nt.length])!==-1||bt.match(it)?gt:"."+et};function mt(gt,yt,bt,vt){vt===void 0&&(vt="&");var xt=gt.replace(se,""),kt=yt&&bt?bt+" "+yt+" { "+xt+" }":xt;return et=vt,nt=yt,rt=new RegExp("\\"+nt+"\\b","g"),it=new RegExp("(\\"+nt+"\\b){2,}"),ut(bt||!yt?"":yt,kt)}return ut.use([].concat(ct,[function(gt,yt,bt){gt===2&&bt.length&&bt[0].lastIndexOf(nt)>0&&(bt[0]=bt[0].replace(rt,pt))},dt,function(gt){if(gt===-2){var yt=ht;return ht=[],yt}}])),mt.hash=ct.length?ct.reduce(function(gt,yt){return yt.name||D(15),ee(gt,yt.name)},5381).toString():"",mt}var ce=React$1.createContext();ce.Consumer;var le=React$1.createContext(),de=(le.Consumer,new X),he=ae();function pe(){return reactExports.useContext(ce)||de}function fe(){return reactExports.useContext(le)||he}var ye=function(){function tt(et,nt){var rt=this;this.inject=function(it,ot){ot===void 0&&(ot=he);var at=rt.name+ot.hash;it.hasNameForId(rt.id,at)||it.insertRules(rt.id,at,ot(rt.rules,at,"@keyframes"))},this.toString=function(){return D(12,String(rt.name))},this.name=et,this.id="sc-keyframes-"+et,this.rules=nt}return tt.prototype.getName=function(et){return et===void 0&&(et=he),this.name+et.hash},tt}(),ve=/([A-Z])/,ge=/([A-Z])/g,Se=/^ms-/,we=function(tt){return"-"+tt.toLowerCase()};function Ee(tt){return ve.test(tt)?tt.replace(ge,we).replace(Se,"-ms-"):tt}var be=function(tt){return tt==null||tt===!1||tt===""};function _e(tt,et,nt,rt){if(Array.isArray(tt)){for(var it,ot=[],at=0,st=tt.length;at1?et-1:0),rt=1;rt?@[\\\]^`{|}~-]+/g,De=/(^-|-$)/g;function je(tt){return tt.replace(Re,"-").replace(De,"")}var Te=function(tt){return Q(te(tt)>>>0)};function xe(tt){return typeof tt=="string"&&!0}var ke=function(tt){return typeof tt=="function"||typeof tt=="object"&&tt!==null&&!Array.isArray(tt)},Ve=function(tt){return tt!=="__proto__"&&tt!=="constructor"&&tt!=="prototype"};function Be(tt,et,nt){var rt=tt[nt];ke(et)&&ke(rt)?ze(rt,et):tt[nt]=et}function ze(tt){for(var et=arguments.length,nt=new Array(et>1?et-1:0),rt=1;rt=0||(Dt[Et]=Tt[Et]);return Dt}(et,["componentId"]),St=xt&&xt+"-"+(xe(vt)?vt:je(b$2(vt)));return Ye(vt,y$4({},kt,{attrs:dt,componentId:St}),nt)},Object.defineProperty(mt,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(vt){this._foldedDefaultProps=rt?ze({},tt.defaultProps,vt):vt}}),Object.defineProperty(mt,"toString",{value:function(){return"."+mt.styledComponentId}}),it&&hoistNonReactStatics$1(mt,tt,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0,withComponent:!0}),mt}var qe=function(tt){return function et(nt,rt,it){if(it===void 0&&(it=w$3),!reactIsExports$2.isValidElementType(rt))return D(1,String(rt));var ot=function(){return nt(rt,it,Ae.apply(void 0,arguments))};return ot.withConfig=function(at){return et(nt,rt,y$4({},it,{},at))},ot.attrs=function(at){return et(nt,rt,y$4({},it,{attrs:Array.prototype.concat(it.attrs,at).filter(Boolean)}))},ot}(Ye,tt)};["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","textPath","tspan"].forEach(function(tt){qe[tt]=qe(tt)});var He=function(){function tt(nt,rt){this.rules=nt,this.componentId=rt,this.isStatic=ne(nt),X.registerId(this.componentId+1)}var et=tt.prototype;return et.createStyles=function(nt,rt,it,ot){var at=ot(_e(this.rules,rt,it,ot).join(""),""),st=this.componentId+nt;it.insertRules(st,st,at)},et.removeStyles=function(nt,rt){rt.clearRules(this.componentId+nt)},et.renderStyles=function(nt,rt,it,ot){nt>2&&X.registerId(this.componentId+nt),this.removeStyles(nt,it),this.createStyles(nt,rt,it,ot)},tt}();function $e(tt){for(var et=arguments.length,nt=new Array(et>1?et-1:0),rt=1;rt1?et-1:0),rt=1;rt{et[nt]=deepClone(tt[nt])}),et}function deepmerge$1(tt,et,nt={clone:!0}){const rt=nt.clone?_extends$u({},tt):tt;return isPlainObject$1(tt)&&isPlainObject$1(et)&&Object.keys(et).forEach(it=>{it!=="__proto__"&&(isPlainObject$1(et[it])&&it in tt&&isPlainObject$1(tt[it])?rt[it]=deepmerge$1(tt[it],et[it],nt):nt.clone?rt[it]=isPlainObject$1(et[it])?deepClone(et[it]):et[it]:rt[it]=et[it])}),rt}function formatMuiErrorMessage(tt){let et="https://mui.com/production-error/?code="+tt;for(let nt=1;ntnt==null?et:function(...it){et.apply(this,it),nt.apply(this,it)},()=>{})}function debounce$5(tt,et=166){let nt;function rt(...it){const ot=()=>{tt.apply(this,it)};clearTimeout(nt),nt=setTimeout(ot,et)}return rt.clear=()=>{clearTimeout(nt)},rt}function isMuiElement(tt,et){var nt,rt;return reactExports.isValidElement(tt)&&et.indexOf((nt=tt.type.muiName)!=null?nt:(rt=tt.type)==null||(rt=rt._payload)==null||(rt=rt.value)==null?void 0:rt.muiName)!==-1}function ownerDocument(tt){return tt&&tt.ownerDocument||document}function ownerWindow(tt){return ownerDocument(tt).defaultView||window}function setRef(tt,et){typeof tt=="function"?tt(et):tt&&(tt.current=et)}const useEnhancedEffect=typeof window<"u"?reactExports.useLayoutEffect:reactExports.useEffect,useEnhancedEffect$1=useEnhancedEffect;let globalId=0;function useGlobalId(tt){const[et,nt]=reactExports.useState(tt),rt=tt||et;return reactExports.useEffect(()=>{et==null&&(globalId+=1,nt(`mui-${globalId}`))},[et]),rt}const maybeReactUseId=React$2["useId".toString()];function useId(tt){if(maybeReactUseId!==void 0){const et=maybeReactUseId();return tt??et}return useGlobalId(tt)}function useControlled({controlled:tt,default:et,name:nt,state:rt="value"}){const{current:it}=reactExports.useRef(tt!==void 0),[ot,at]=reactExports.useState(et),st=it?tt:ot,lt=reactExports.useCallback(ct=>{it||at(ct)},[]);return[st,lt]}function useEventCallback(tt){const et=reactExports.useRef(tt);return useEnhancedEffect$1(()=>{et.current=tt}),reactExports.useCallback((...nt)=>(0,et.current)(...nt),[])}function useForkRef(...tt){return reactExports.useMemo(()=>tt.every(et=>et==null)?null:et=>{tt.forEach(nt=>{setRef(nt,et)})},tt)}let hadKeyboardEvent=!0,hadFocusVisibleRecently=!1,hadFocusVisibleRecentlyTimeout;const inputTypesWhitelist={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function focusTriggersKeyboardModality(tt){const{type:et,tagName:nt}=tt;return!!(nt==="INPUT"&&inputTypesWhitelist[et]&&!tt.readOnly||nt==="TEXTAREA"&&!tt.readOnly||tt.isContentEditable)}function handleKeyDown(tt){tt.metaKey||tt.altKey||tt.ctrlKey||(hadKeyboardEvent=!0)}function handlePointerDown$1(){hadKeyboardEvent=!1}function handleVisibilityChange(){this.visibilityState==="hidden"&&hadFocusVisibleRecently&&(hadKeyboardEvent=!0)}function prepare$1(tt){tt.addEventListener("keydown",handleKeyDown,!0),tt.addEventListener("mousedown",handlePointerDown$1,!0),tt.addEventListener("pointerdown",handlePointerDown$1,!0),tt.addEventListener("touchstart",handlePointerDown$1,!0),tt.addEventListener("visibilitychange",handleVisibilityChange,!0)}function isFocusVisible(tt){const{target:et}=tt;try{return et.matches(":focus-visible")}catch{}return hadKeyboardEvent||focusTriggersKeyboardModality(et)}function useIsFocusVisible(){const tt=reactExports.useCallback(it=>{it!=null&&prepare$1(it.ownerDocument)},[]),et=reactExports.useRef(!1);function nt(){return et.current?(hadFocusVisibleRecently=!0,window.clearTimeout(hadFocusVisibleRecentlyTimeout),hadFocusVisibleRecentlyTimeout=window.setTimeout(()=>{hadFocusVisibleRecently=!1},100),et.current=!1,!0):!1}function rt(it){return isFocusVisible(it)?(et.current=!0,!0):!1}return{isFocusVisibleRef:et,onFocus:rt,onBlur:nt,ref:tt}}function getScrollbarSize(tt){const et=tt.documentElement.clientWidth;return Math.abs(window.innerWidth-et)}let cachedType;function detectScrollType(){if(cachedType)return cachedType;const tt=document.createElement("div"),et=document.createElement("div");return et.style.width="10px",et.style.height="1px",tt.appendChild(et),tt.dir="rtl",tt.style.fontSize="14px",tt.style.width="4px",tt.style.height="1px",tt.style.position="absolute",tt.style.top="-1000px",tt.style.overflow="scroll",document.body.appendChild(tt),cachedType="reverse",tt.scrollLeft>0?cachedType="default":(tt.scrollLeft=1,tt.scrollLeft===0&&(cachedType="negative")),document.body.removeChild(tt),cachedType}function getNormalizedScrollLeft(tt,et){const nt=tt.scrollLeft;if(et!=="rtl")return nt;switch(detectScrollType()){case"negative":return tt.scrollWidth-tt.clientWidth+nt;case"reverse":return tt.scrollWidth-tt.clientWidth-nt;default:return nt}}const visuallyHidden={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:-1,overflow:"hidden",padding:0,position:"absolute",whiteSpace:"nowrap",width:"1px"},visuallyHidden$1=visuallyHidden;function resolveProps(tt,et){const nt=_extends$u({},et);return Object.keys(tt).forEach(rt=>{if(rt.toString().match(/^(components|slots)$/))nt[rt]=_extends$u({},tt[rt],nt[rt]);else if(rt.toString().match(/^(componentsProps|slotProps)$/)){const it=tt[rt]||{},ot=et[rt];nt[rt]={},!ot||!Object.keys(ot)?nt[rt]=it:!it||!Object.keys(it)?nt[rt]=ot:(nt[rt]=_extends$u({},ot),Object.keys(it).forEach(at=>{nt[rt][at]=resolveProps(it[at],ot[at])}))}else nt[rt]===void 0&&(nt[rt]=tt[rt])}),nt}function composeClasses(tt,et,nt=void 0){const rt={};return Object.keys(tt).forEach(it=>{rt[it]=tt[it].reduce((ot,at)=>{if(at){const st=et(at);st!==""&&ot.push(st),nt&&nt[at]&&ot.push(nt[at])}return ot},[]).join(" ")}),rt}const defaultGenerator=tt=>tt,createClassNameGenerator=()=>{let tt=defaultGenerator;return{configure(et){tt=et},generate(et){return tt(et)},reset(){tt=defaultGenerator}}},ClassNameGenerator=createClassNameGenerator(),ClassNameGenerator$1=ClassNameGenerator,globalStateClassesMapping={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function generateUtilityClass(tt,et,nt="Mui"){const rt=globalStateClassesMapping[et];return rt?`${nt}-${rt}`:`${ClassNameGenerator$1.generate(tt)}-${et}`}function generateUtilityClasses(tt,et,nt="Mui"){const rt={};return et.forEach(it=>{rt[it]=generateUtilityClass(tt,it,nt)}),rt}const THEME_ID="$$material";function _objectWithoutPropertiesLoose$m(tt,et){if(tt==null)return{};var nt={},rt=Object.keys(tt),it,ot;for(ot=0;ot=0)&&(nt[it]=tt[it]);return nt}function sheetForTag(tt){if(tt.sheet)return tt.sheet;for(var et=0;et0?charat(characters,--position):0,column--,character===10&&(column=1,line--),character}function next(){return character=position2||token$1(character)>3?"":" "}function escaping(tt,et){for(;--et&&next()&&!(character<48||character>102||character>57&&character<65||character>70&&character<97););return slice$1(tt,caret()+(et<6&&peek()==32&&next()==32))}function delimiter(tt){for(;next();)switch(character){case tt:return position;case 34:case 39:tt!==34&&tt!==39&&delimiter(character);break;case 40:tt===41&&delimiter(tt);break;case 92:next();break}return position}function commenter(tt,et){for(;next()&&tt+character!==47+10;)if(tt+character===42+42&&peek()===47)break;return"/*"+slice$1(et,position-1)+"*"+from$1(tt===47?tt:next())}function identifier$1(tt){for(;!token$1(peek());)next();return slice$1(tt,position)}function compile$1(tt){return dealloc(parse$1("",null,null,null,[""],tt=alloc(tt),0,[0],tt))}function parse$1(tt,et,nt,rt,it,ot,at,st,lt){for(var ct=0,ut=0,ht=at,dt=0,pt=0,mt=0,gt=1,yt=1,bt=1,vt=0,xt="",kt=it,St=ot,Tt=rt,At=xt;yt;)switch(mt=vt,vt=next()){case 40:if(mt!=108&&charat(At,ht-1)==58){indexof(At+=replace(delimit(vt),"&","&\f"),"&\f")!=-1&&(bt=-1);break}case 34:case 39:case 91:At+=delimit(vt);break;case 9:case 10:case 13:case 32:At+=whitespace(mt);break;case 92:At+=escaping(caret()-1,7);continue;case 47:switch(peek()){case 42:case 47:append$1(comment(commenter(next(),caret()),et,nt),lt);break;default:At+="/"}break;case 123*gt:st[ct++]=strlen(At)*bt;case 125*gt:case 59:case 0:switch(vt){case 0:case 125:yt=0;case 59+ut:bt==-1&&(At=replace(At,/\f/g,"")),pt>0&&strlen(At)-ht&&append$1(pt>32?declaration(At+";",rt,nt,ht-1):declaration(replace(At," ","")+";",rt,nt,ht-2),lt);break;case 59:At+=";";default:if(append$1(Tt=ruleset(At,et,nt,ct,ut,it,st,xt,kt=[],St=[],ht),ot),vt===123)if(ut===0)parse$1(At,et,Tt,Tt,kt,ot,ht,st,St);else switch(dt===99&&charat(At,3)===110?100:dt){case 100:case 108:case 109:case 115:parse$1(tt,Tt,Tt,rt&&append$1(ruleset(tt,Tt,Tt,0,0,it,st,xt,it,kt=[],ht),St),it,St,ht,st,rt?kt:St);break;default:parse$1(At,Tt,Tt,Tt,[""],St,0,st,St)}}ct=ut=pt=0,gt=bt=1,xt=At="",ht=at;break;case 58:ht=1+strlen(At),pt=mt;default:if(gt<1){if(vt==123)--gt;else if(vt==125&>++==0&&prev$1()==125)continue}switch(At+=from$1(vt),vt*gt){case 38:bt=ut>0?1:(At+="\f",-1);break;case 44:st[ct++]=(strlen(At)-1)*bt,bt=1;break;case 64:peek()===45&&(At+=delimit(next())),dt=peek(),ut=ht=strlen(xt=At+=identifier$1(caret())),vt++;break;case 45:mt===45&&strlen(At)==2&&(gt=0)}}return ot}function ruleset(tt,et,nt,rt,it,ot,at,st,lt,ct,ut){for(var ht=it-1,dt=it===0?ot:[""],pt=sizeof(dt),mt=0,gt=0,yt=0;mt0?dt[bt]+" "+vt:replace(vt,/&\f/g,dt[bt])))&&(lt[yt++]=xt);return node$2(tt,et,nt,it===0?RULESET:st,lt,ct,ut)}function comment(tt,et,nt){return node$2(tt,et,nt,COMMENT,from$1(char()),substr(tt,2,-2),0)}function declaration(tt,et,nt,rt){return node$2(tt,et,nt,DECLARATION,substr(tt,0,rt),substr(tt,rt+1,-1),rt)}function serialize(tt,et){for(var nt="",rt=sizeof(tt),it=0;it6)switch(charat(tt,et+1)){case 109:if(charat(tt,et+4)!==45)break;case 102:return replace(tt,/(.+:)(.+)-([^]+)/,"$1"+WEBKIT+"$2-$3$1"+MOZ+(charat(tt,et+3)==108?"$3":"$2-$3"))+tt;case 115:return~indexof(tt,"stretch")?prefix$1(replace(tt,"stretch","fill-available"),et)+tt:tt}break;case 4949:if(charat(tt,et+1)!==115)break;case 6444:switch(charat(tt,strlen(tt)-3-(~indexof(tt,"!important")&&10))){case 107:return replace(tt,":",":"+WEBKIT)+tt;case 101:return replace(tt,/(.+:)([^;!]+)(;|!.+)?/,"$1"+WEBKIT+(charat(tt,14)===45?"inline-":"")+"box$3$1"+WEBKIT+"$2$3$1"+MS+"$2box$3")+tt}break;case 5936:switch(charat(tt,et+11)){case 114:return WEBKIT+tt+MS+replace(tt,/[svh]\w+-[tblr]{2}/,"tb")+tt;case 108:return WEBKIT+tt+MS+replace(tt,/[svh]\w+-[tblr]{2}/,"tb-rl")+tt;case 45:return WEBKIT+tt+MS+replace(tt,/[svh]\w+-[tblr]{2}/,"lr")+tt}return WEBKIT+tt+MS+tt+tt}return tt}var prefixer=function(et,nt,rt,it){if(et.length>-1&&!et.return)switch(et.type){case DECLARATION:et.return=prefix$1(et.value,et.length);break;case KEYFRAMES:return serialize([copy$3(et,{value:replace(et.value,"@","@"+WEBKIT)})],it);case RULESET:if(et.length)return combine$1(et.props,function(ot){switch(match(ot,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return serialize([copy$3(et,{props:[replace(ot,/:(read-\w+)/,":"+MOZ+"$1")]})],it);case"::placeholder":return serialize([copy$3(et,{props:[replace(ot,/:(plac\w+)/,":"+WEBKIT+"input-$1")]}),copy$3(et,{props:[replace(ot,/:(plac\w+)/,":"+MOZ+"$1")]}),copy$3(et,{props:[replace(ot,/:(plac\w+)/,MS+"input-$1")]})],it)}return""})}},defaultStylisPlugins=[prefixer],createCache=function(et){var nt=et.key;if(nt==="css"){var rt=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(rt,function(gt){var yt=gt.getAttribute("data-emotion");yt.indexOf(" ")!==-1&&(document.head.appendChild(gt),gt.setAttribute("data-s",""))})}var it=et.stylisPlugins||defaultStylisPlugins,ot={},at,st=[];at=et.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+nt+' "]'),function(gt){for(var yt=gt.getAttribute("data-emotion").split(" "),bt=1;bt=4;++rt,it-=4)nt=tt.charCodeAt(rt)&255|(tt.charCodeAt(++rt)&255)<<8|(tt.charCodeAt(++rt)&255)<<16|(tt.charCodeAt(++rt)&255)<<24,nt=(nt&65535)*1540483477+((nt>>>16)*59797<<16),nt^=nt>>>24,et=(nt&65535)*1540483477+((nt>>>16)*59797<<16)^(et&65535)*1540483477+((et>>>16)*59797<<16);switch(it){case 3:et^=(tt.charCodeAt(rt+2)&255)<<16;case 2:et^=(tt.charCodeAt(rt+1)&255)<<8;case 1:et^=tt.charCodeAt(rt)&255,et=(et&65535)*1540483477+((et>>>16)*59797<<16)}return et^=et>>>13,et=(et&65535)*1540483477+((et>>>16)*59797<<16),((et^et>>>15)>>>0).toString(36)}var unitlessKeys={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},hyphenateRegex=/[A-Z]|^ms/g,animationRegex=/_EMO_([^_]+?)_([^]*?)_EMO_/g,isCustomProperty=function(et){return et.charCodeAt(1)===45},isProcessableValue=function(et){return et!=null&&typeof et!="boolean"},processStyleName=memoize$4(function(tt){return isCustomProperty(tt)?tt:tt.replace(hyphenateRegex,"-$&").toLowerCase()}),processStyleValue=function(et,nt){switch(et){case"animation":case"animationName":if(typeof nt=="string")return nt.replace(animationRegex,function(rt,it,ot){return cursor={name:it,styles:ot,next:cursor},it})}return unitlessKeys[et]!==1&&!isCustomProperty(et)&&typeof nt=="number"&&nt!==0?nt+"px":nt},noComponentSelectorMessage="Component selectors can only be used in conjunction with @emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware compiler transform.";function handleInterpolation(tt,et,nt){if(nt==null)return"";if(nt.__emotion_styles!==void 0)return nt;switch(typeof nt){case"boolean":return"";case"object":{if(nt.anim===1)return cursor={name:nt.name,styles:nt.styles,next:cursor},nt.name;if(nt.styles!==void 0){var rt=nt.next;if(rt!==void 0)for(;rt!==void 0;)cursor={name:rt.name,styles:rt.styles,next:cursor},rt=rt.next;var it=nt.styles+";";return it}return createStringFromObject(tt,et,nt)}case"function":{if(tt!==void 0){var ot=cursor,at=nt(tt);return cursor=ot,handleInterpolation(tt,et,at)}break}}if(et==null)return nt;var st=et[nt];return st!==void 0?st:nt}function createStringFromObject(tt,et,nt){var rt="";if(Array.isArray(nt))for(var it=0;it96?testOmitPropsOnStringTag:testOmitPropsOnComponent},composeShouldForwardProps=function(et,nt,rt){var it;if(nt){var ot=nt.shouldForwardProp;it=et.__emotion_forwardProp&&ot?function(at){return et.__emotion_forwardProp(at)&&ot(at)}:ot}return typeof it!="function"&&rt&&(it=et.__emotion_forwardProp),it},Insertion=function(et){var nt=et.cache,rt=et.serialized,it=et.isStringTag;return registerStyles(nt,rt,it),useInsertionEffectAlwaysWithSyncFallback(function(){return insertStyles(nt,rt,it)}),null},createStyled$1=function tt(et,nt){var rt=et.__emotion_real===et,it=rt&&et.__emotion_base||et,ot,at;nt!==void 0&&(ot=nt.label,at=nt.target);var st=composeShouldForwardProps(et,nt,rt),lt=st||getDefaultShouldForwardProp(it),ct=!lt("as");return function(){var ut=arguments,ht=rt&&et.__emotion_styles!==void 0?et.__emotion_styles.slice(0):[];if(ot!==void 0&&ht.push("label:"+ot+";"),ut[0]==null||ut[0].raw===void 0)ht.push.apply(ht,ut);else{ht.push(ut[0][0]);for(var dt=ut.length,pt=1;ptet(isEmpty$4(it)?nt:it):et;return jsxRuntimeExports.jsx(Global$1,{styles:rt})}/** - * @mui/styled-engine v5.14.13 - * - * @license MIT - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */function styled$3(tt,et){return newStyled(tt,et)}const internal_processStyles=(tt,et)=>{Array.isArray(tt.__emotion_styles)&&(tt.__emotion_styles=et(tt.__emotion_styles))},_excluded$1K=["values","unit","step"],sortBreakpointsValues=tt=>{const et=Object.keys(tt).map(nt=>({key:nt,val:tt[nt]}))||[];return et.sort((nt,rt)=>nt.val-rt.val),et.reduce((nt,rt)=>_extends$u({},nt,{[rt.key]:rt.val}),{})};function createBreakpoints(tt){const{values:et={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:nt="px",step:rt=5}=tt,it=_objectWithoutPropertiesLoose$m(tt,_excluded$1K),ot=sortBreakpointsValues(et),at=Object.keys(ot);function st(dt){return`@media (min-width:${typeof et[dt]=="number"?et[dt]:dt}${nt})`}function lt(dt){return`@media (max-width:${(typeof et[dt]=="number"?et[dt]:dt)-rt/100}${nt})`}function ct(dt,pt){const mt=at.indexOf(pt);return`@media (min-width:${typeof et[dt]=="number"?et[dt]:dt}${nt}) and (max-width:${(mt!==-1&&typeof et[at[mt]]=="number"?et[at[mt]]:pt)-rt/100}${nt})`}function ut(dt){return at.indexOf(dt)+1`@media (min-width:${values$1[tt]}px)`};function handleBreakpoints(tt,et,nt){const rt=tt.theme||{};if(Array.isArray(et)){const ot=rt.breakpoints||defaultBreakpoints;return et.reduce((at,st,lt)=>(at[ot.up(ot.keys[lt])]=nt(et[lt]),at),{})}if(typeof et=="object"){const ot=rt.breakpoints||defaultBreakpoints;return Object.keys(et).reduce((at,st)=>{if(Object.keys(ot.values||values$1).indexOf(st)!==-1){const lt=ot.up(st);at[lt]=nt(et[st],st)}else{const lt=st;at[lt]=et[lt]}return at},{})}return nt(et)}function createEmptyBreakpointObject(tt={}){var et;return((et=tt.keys)==null?void 0:et.reduce((rt,it)=>{const ot=tt.up(it);return rt[ot]={},rt},{}))||{}}function removeUnusedBreakpoints(tt,et){return tt.reduce((nt,rt)=>{const it=nt[rt];return(!it||Object.keys(it).length===0)&&delete nt[rt],nt},et)}function mergeBreakpointsInOrder(tt,...et){const nt=createEmptyBreakpointObject(tt),rt=[nt,...et].reduce((it,ot)=>deepmerge$1(it,ot),{});return removeUnusedBreakpoints(Object.keys(nt),rt)}function computeBreakpointsBase(tt,et){if(typeof tt!="object")return{};const nt={},rt=Object.keys(et);return Array.isArray(tt)?rt.forEach((it,ot)=>{ot{tt[it]!=null&&(nt[it]=!0)}),nt}function resolveBreakpointValues({values:tt,breakpoints:et,base:nt}){const rt=nt||computeBreakpointsBase(tt,et),it=Object.keys(rt);if(it.length===0)return tt;let ot;return it.reduce((at,st,lt)=>(Array.isArray(tt)?(at[st]=tt[lt]!=null?tt[lt]:tt[ot],ot=lt):typeof tt=="object"?(at[st]=tt[st]!=null?tt[st]:tt[ot],ot=st):at[st]=tt,at),{})}function getPath$2(tt,et,nt=!0){if(!et||typeof et!="string")return null;if(tt&&tt.vars&&nt){const rt=`vars.${et}`.split(".").reduce((it,ot)=>it&&it[ot]?it[ot]:null,tt);if(rt!=null)return rt}return et.split(".").reduce((rt,it)=>rt&&rt[it]!=null?rt[it]:null,tt)}function getStyleValue$1(tt,et,nt,rt=nt){let it;return typeof tt=="function"?it=tt(nt):Array.isArray(tt)?it=tt[nt]||rt:it=getPath$2(tt,nt)||rt,et&&(it=et(it,rt,tt)),it}function style$5(tt){const{prop:et,cssProperty:nt=tt.prop,themeKey:rt,transform:it}=tt,ot=at=>{if(at[et]==null)return null;const st=at[et],lt=at.theme,ct=getPath$2(lt,rt)||{};return handleBreakpoints(at,st,ht=>{let dt=getStyleValue$1(ct,it,ht);return ht===dt&&typeof ht=="string"&&(dt=getStyleValue$1(ct,it,`${et}${ht==="default"?"":capitalize(ht)}`,ht)),nt===!1?dt:{[nt]:dt}})};return ot.propTypes={},ot.filterProps=[et],ot}function memoize$3(tt){const et={};return nt=>(et[nt]===void 0&&(et[nt]=tt(nt)),et[nt])}const properties={m:"margin",p:"padding"},directions={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},aliases$1={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},getCssProperties=memoize$3(tt=>{if(tt.length>2)if(aliases$1[tt])tt=aliases$1[tt];else return[tt];const[et,nt]=tt.split(""),rt=properties[et],it=directions[nt]||"";return Array.isArray(it)?it.map(ot=>rt+ot):[rt+it]}),marginKeys=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],paddingKeys=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"];[...marginKeys,...paddingKeys];function createUnaryUnit(tt,et,nt,rt){var it;const ot=(it=getPath$2(tt,et,!1))!=null?it:nt;return typeof ot=="number"?at=>typeof at=="string"?at:ot*at:Array.isArray(ot)?at=>typeof at=="string"?at:ot[at]:typeof ot=="function"?ot:()=>{}}function createUnarySpacing(tt){return createUnaryUnit(tt,"spacing",8)}function getValue$3(tt,et){if(typeof et=="string"||et==null)return et;const nt=Math.abs(et),rt=tt(nt);return et>=0?rt:typeof rt=="number"?-rt:`-${rt}`}function getStyleFromPropValue(tt,et){return nt=>tt.reduce((rt,it)=>(rt[it]=getValue$3(et,nt),rt),{})}function resolveCssProperty(tt,et,nt,rt){if(et.indexOf(nt)===-1)return null;const it=getCssProperties(nt),ot=getStyleFromPropValue(it,rt),at=tt[nt];return handleBreakpoints(tt,at,ot)}function style$4(tt,et){const nt=createUnarySpacing(tt.theme);return Object.keys(tt).map(rt=>resolveCssProperty(tt,et,rt,nt)).reduce(merge,{})}function margin(tt){return style$4(tt,marginKeys)}margin.propTypes={};margin.filterProps=marginKeys;function padding$2(tt){return style$4(tt,paddingKeys)}padding$2.propTypes={};padding$2.filterProps=paddingKeys;function createSpacing(tt=8){if(tt.mui)return tt;const et=createUnarySpacing({spacing:tt}),nt=(...rt)=>(rt.length===0?[1]:rt).map(ot=>{const at=et(ot);return typeof at=="number"?`${at}px`:at}).join(" ");return nt.mui=!0,nt}function compose$1(...tt){const et=tt.reduce((rt,it)=>(it.filterProps.forEach(ot=>{rt[ot]=it}),rt),{}),nt=rt=>Object.keys(rt).reduce((it,ot)=>et[ot]?merge(it,et[ot](rt)):it,{});return nt.propTypes={},nt.filterProps=tt.reduce((rt,it)=>rt.concat(it.filterProps),[]),nt}function borderTransform(tt){return typeof tt!="number"?tt:`${tt}px solid`}const border$1=style$5({prop:"border",themeKey:"borders",transform:borderTransform}),borderTop=style$5({prop:"borderTop",themeKey:"borders",transform:borderTransform}),borderRight=style$5({prop:"borderRight",themeKey:"borders",transform:borderTransform}),borderBottom=style$5({prop:"borderBottom",themeKey:"borders",transform:borderTransform}),borderLeft=style$5({prop:"borderLeft",themeKey:"borders",transform:borderTransform}),borderColor=style$5({prop:"borderColor",themeKey:"palette"}),borderTopColor=style$5({prop:"borderTopColor",themeKey:"palette"}),borderRightColor=style$5({prop:"borderRightColor",themeKey:"palette"}),borderBottomColor=style$5({prop:"borderBottomColor",themeKey:"palette"}),borderLeftColor=style$5({prop:"borderLeftColor",themeKey:"palette"}),borderRadius=tt=>{if(tt.borderRadius!==void 0&&tt.borderRadius!==null){const et=createUnaryUnit(tt.theme,"shape.borderRadius",4),nt=rt=>({borderRadius:getValue$3(et,rt)});return handleBreakpoints(tt,tt.borderRadius,nt)}return null};borderRadius.propTypes={};borderRadius.filterProps=["borderRadius"];compose$1(border$1,borderTop,borderRight,borderBottom,borderLeft,borderColor,borderTopColor,borderRightColor,borderBottomColor,borderLeftColor,borderRadius);const gap=tt=>{if(tt.gap!==void 0&&tt.gap!==null){const et=createUnaryUnit(tt.theme,"spacing",8),nt=rt=>({gap:getValue$3(et,rt)});return handleBreakpoints(tt,tt.gap,nt)}return null};gap.propTypes={};gap.filterProps=["gap"];const columnGap=tt=>{if(tt.columnGap!==void 0&&tt.columnGap!==null){const et=createUnaryUnit(tt.theme,"spacing",8),nt=rt=>({columnGap:getValue$3(et,rt)});return handleBreakpoints(tt,tt.columnGap,nt)}return null};columnGap.propTypes={};columnGap.filterProps=["columnGap"];const rowGap=tt=>{if(tt.rowGap!==void 0&&tt.rowGap!==null){const et=createUnaryUnit(tt.theme,"spacing",8),nt=rt=>({rowGap:getValue$3(et,rt)});return handleBreakpoints(tt,tt.rowGap,nt)}return null};rowGap.propTypes={};rowGap.filterProps=["rowGap"];const gridColumn=style$5({prop:"gridColumn"}),gridRow=style$5({prop:"gridRow"}),gridAutoFlow=style$5({prop:"gridAutoFlow"}),gridAutoColumns=style$5({prop:"gridAutoColumns"}),gridAutoRows=style$5({prop:"gridAutoRows"}),gridTemplateColumns=style$5({prop:"gridTemplateColumns"}),gridTemplateRows=style$5({prop:"gridTemplateRows"}),gridTemplateAreas=style$5({prop:"gridTemplateAreas"}),gridArea=style$5({prop:"gridArea"});compose$1(gap,columnGap,rowGap,gridColumn,gridRow,gridAutoFlow,gridAutoColumns,gridAutoRows,gridTemplateColumns,gridTemplateRows,gridTemplateAreas,gridArea);function paletteTransform(tt,et){return et==="grey"?et:tt}const color$2=style$5({prop:"color",themeKey:"palette",transform:paletteTransform}),bgcolor=style$5({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:paletteTransform}),backgroundColor$1=style$5({prop:"backgroundColor",themeKey:"palette",transform:paletteTransform});compose$1(color$2,bgcolor,backgroundColor$1);function sizingTransform(tt){return tt<=1&&tt!==0?`${tt*100}%`:tt}const width=style$5({prop:"width",transform:sizingTransform}),maxWidth=tt=>{if(tt.maxWidth!==void 0&&tt.maxWidth!==null){const et=nt=>{var rt,it;const ot=((rt=tt.theme)==null||(rt=rt.breakpoints)==null||(rt=rt.values)==null?void 0:rt[nt])||values$1[nt];return ot?((it=tt.theme)==null||(it=it.breakpoints)==null?void 0:it.unit)!=="px"?{maxWidth:`${ot}${tt.theme.breakpoints.unit}`}:{maxWidth:ot}:{maxWidth:sizingTransform(nt)}};return handleBreakpoints(tt,tt.maxWidth,et)}return null};maxWidth.filterProps=["maxWidth"];const minWidth=style$5({prop:"minWidth",transform:sizingTransform}),height=style$5({prop:"height",transform:sizingTransform}),maxHeight=style$5({prop:"maxHeight",transform:sizingTransform}),minHeight=style$5({prop:"minHeight",transform:sizingTransform});style$5({prop:"size",cssProperty:"width",transform:sizingTransform});style$5({prop:"size",cssProperty:"height",transform:sizingTransform});const boxSizing=style$5({prop:"boxSizing"});compose$1(width,maxWidth,minWidth,height,maxHeight,minHeight,boxSizing);const defaultSxConfig={border:{themeKey:"borders",transform:borderTransform},borderTop:{themeKey:"borders",transform:borderTransform},borderRight:{themeKey:"borders",transform:borderTransform},borderBottom:{themeKey:"borders",transform:borderTransform},borderLeft:{themeKey:"borders",transform:borderTransform},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:borderRadius},color:{themeKey:"palette",transform:paletteTransform},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:paletteTransform},backgroundColor:{themeKey:"palette",transform:paletteTransform},p:{style:padding$2},pt:{style:padding$2},pr:{style:padding$2},pb:{style:padding$2},pl:{style:padding$2},px:{style:padding$2},py:{style:padding$2},padding:{style:padding$2},paddingTop:{style:padding$2},paddingRight:{style:padding$2},paddingBottom:{style:padding$2},paddingLeft:{style:padding$2},paddingX:{style:padding$2},paddingY:{style:padding$2},paddingInline:{style:padding$2},paddingInlineStart:{style:padding$2},paddingInlineEnd:{style:padding$2},paddingBlock:{style:padding$2},paddingBlockStart:{style:padding$2},paddingBlockEnd:{style:padding$2},m:{style:margin},mt:{style:margin},mr:{style:margin},mb:{style:margin},ml:{style:margin},mx:{style:margin},my:{style:margin},margin:{style:margin},marginTop:{style:margin},marginRight:{style:margin},marginBottom:{style:margin},marginLeft:{style:margin},marginX:{style:margin},marginY:{style:margin},marginInline:{style:margin},marginInlineStart:{style:margin},marginInlineEnd:{style:margin},marginBlock:{style:margin},marginBlockStart:{style:margin},marginBlockEnd:{style:margin},displayPrint:{cssProperty:!1,transform:tt=>({"@media print":{display:tt}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:gap},rowGap:{style:rowGap},columnGap:{style:columnGap},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:sizingTransform},maxWidth:{style:maxWidth},minWidth:{transform:sizingTransform},height:{transform:sizingTransform},maxHeight:{transform:sizingTransform},minHeight:{transform:sizingTransform},boxSizing:{},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}},defaultSxConfig$1=defaultSxConfig;function objectsHaveSameKeys(...tt){const et=tt.reduce((rt,it)=>rt.concat(Object.keys(it)),[]),nt=new Set(et);return tt.every(rt=>nt.size===Object.keys(rt).length)}function callIfFn(tt,et){return typeof tt=="function"?tt(et):tt}function unstable_createStyleFunctionSx(){function tt(nt,rt,it,ot){const at={[nt]:rt,theme:it},st=ot[nt];if(!st)return{[nt]:rt};const{cssProperty:lt=nt,themeKey:ct,transform:ut,style:ht}=st;if(rt==null)return null;if(ct==="typography"&&rt==="inherit")return{[nt]:rt};const dt=getPath$2(it,ct)||{};return ht?ht(at):handleBreakpoints(at,rt,mt=>{let gt=getStyleValue$1(dt,ut,mt);return mt===gt&&typeof mt=="string"&&(gt=getStyleValue$1(dt,ut,`${nt}${mt==="default"?"":capitalize(mt)}`,mt)),lt===!1?gt:{[lt]:gt}})}function et(nt){var rt;const{sx:it,theme:ot={}}=nt||{};if(!it)return null;const at=(rt=ot.unstable_sxConfig)!=null?rt:defaultSxConfig$1;function st(lt){let ct=lt;if(typeof lt=="function")ct=lt(ot);else if(typeof lt!="object")return lt;if(!ct)return null;const ut=createEmptyBreakpointObject(ot.breakpoints),ht=Object.keys(ut);let dt=ut;return Object.keys(ct).forEach(pt=>{const mt=callIfFn(ct[pt],ot);if(mt!=null)if(typeof mt=="object")if(at[pt])dt=merge(dt,tt(pt,mt,ot,at));else{const gt=handleBreakpoints({theme:ot},mt,yt=>({[pt]:yt}));objectsHaveSameKeys(gt,mt)?dt[pt]=et({sx:mt,theme:ot}):dt=merge(dt,gt)}else dt=merge(dt,tt(pt,mt,ot,at))}),removeUnusedBreakpoints(ht,dt)}return Array.isArray(it)?it.map(st):st(it)}return et}const styleFunctionSx=unstable_createStyleFunctionSx();styleFunctionSx.filterProps=["sx"];const styleFunctionSx$1=styleFunctionSx,_excluded$1J=["breakpoints","palette","spacing","shape"];function createTheme$1(tt={},...et){const{breakpoints:nt={},palette:rt={},spacing:it,shape:ot={}}=tt,at=_objectWithoutPropertiesLoose$m(tt,_excluded$1J),st=createBreakpoints(nt),lt=createSpacing(it);let ct=deepmerge$1({breakpoints:st,direction:"ltr",components:{},palette:_extends$u({mode:"light"},rt),spacing:lt,shape:_extends$u({},shape$2,ot)},at);return ct=et.reduce((ut,ht)=>deepmerge$1(ut,ht),ct),ct.unstable_sxConfig=_extends$u({},defaultSxConfig$1,at==null?void 0:at.unstable_sxConfig),ct.unstable_sx=function(ht){return styleFunctionSx$1({sx:ht,theme:this})},ct}function isObjectEmpty$1(tt){return Object.keys(tt).length===0}function useTheme$3(tt=null){const et=reactExports.useContext(ThemeContext$2);return!et||isObjectEmpty$1(et)?tt:et}const systemDefaultTheme$1=createTheme$1();function useTheme$2(tt=systemDefaultTheme$1){return useTheme$3(tt)}function GlobalStyles$1({styles:tt,themeId:et,defaultTheme:nt={}}){const rt=useTheme$2(nt),it=typeof tt=="function"?tt(et&&rt[et]||rt):tt;return jsxRuntimeExports.jsx(GlobalStyles$2,{styles:it})}const _excluded$1I=["sx"],splitProps=tt=>{var et,nt;const rt={systemProps:{},otherProps:{}},it=(et=tt==null||(nt=tt.theme)==null?void 0:nt.unstable_sxConfig)!=null?et:defaultSxConfig$1;return Object.keys(tt).forEach(ot=>{it[ot]?rt.systemProps[ot]=tt[ot]:rt.otherProps[ot]=tt[ot]}),rt};function extendSxProp(tt){const{sx:et}=tt,nt=_objectWithoutPropertiesLoose$m(tt,_excluded$1I),{systemProps:rt,otherProps:it}=splitProps(nt);let ot;return Array.isArray(et)?ot=[rt,...et]:typeof et=="function"?ot=(...at)=>{const st=et(...at);return isPlainObject$1(st)?_extends$u({},rt,st):rt}:ot=_extends$u({},rt,et),_extends$u({},it,{sx:ot})}function r$9(tt){var et,nt,rt="";if(typeof tt=="string"||typeof tt=="number")rt+=tt;else if(typeof tt=="object")if(Array.isArray(tt))for(et=0;et{it==="color"?rt+=isEmpty$3(rt)?tt[it]:capitalize(tt[it]):rt+=`${isEmpty$3(rt)?it:capitalize(it)}${capitalize(tt[it].toString())}`}),rt}const _excluded$1F=["name","slot","skipVariantsResolver","skipSx","overridesResolver"];function isEmpty$2(tt){return Object.keys(tt).length===0}function isStringTag(tt){return typeof tt=="string"&&tt.charCodeAt(0)>96}const getStyleOverrides=(tt,et)=>et.components&&et.components[tt]&&et.components[tt].styleOverrides?et.components[tt].styleOverrides:null,transformVariants=tt=>{const et={};return tt&&tt.forEach(nt=>{const rt=propsToClassKey(nt.props);et[rt]=nt.style}),et},getVariantStyles=(tt,et)=>{let nt=[];return et&&et.components&&et.components[tt]&&et.components[tt].variants&&(nt=et.components[tt].variants),transformVariants(nt)},variantsResolver=(tt,et,nt)=>{const{ownerState:rt={}}=tt,it=[];return nt&&nt.forEach(ot=>{let at=!0;Object.keys(ot.props).forEach(st=>{rt[st]!==ot.props[st]&&tt[st]!==ot.props[st]&&(at=!1)}),at&&it.push(et[propsToClassKey(ot.props)])}),it},themeVariantsResolver=(tt,et,nt,rt)=>{var it;const ot=nt==null||(it=nt.components)==null||(it=it[rt])==null?void 0:it.variants;return variantsResolver(tt,et,ot)};function shouldForwardProp(tt){return tt!=="ownerState"&&tt!=="theme"&&tt!=="sx"&&tt!=="as"}const systemDefaultTheme=createTheme$1(),lowercaseFirstLetter=tt=>tt&&tt.charAt(0).toLowerCase()+tt.slice(1);function resolveTheme({defaultTheme:tt,theme:et,themeId:nt}){return isEmpty$2(et)?tt:et[nt]||et}function defaultOverridesResolver(tt){return tt?(et,nt)=>nt[tt]:null}const muiStyledFunctionResolver=({styledArg:tt,props:et,defaultTheme:nt,themeId:rt})=>{const it=tt(_extends$u({},et,{theme:resolveTheme(_extends$u({},et,{defaultTheme:nt,themeId:rt}))}));let ot;if(it&&it.variants&&(ot=it.variants,delete it.variants),ot){const at=variantsResolver(et,transformVariants(ot),ot);return[it,...at]}return it};function createStyled(tt={}){const{themeId:et,defaultTheme:nt=systemDefaultTheme,rootShouldForwardProp:rt=shouldForwardProp,slotShouldForwardProp:it=shouldForwardProp}=tt,ot=at=>styleFunctionSx$1(_extends$u({},at,{theme:resolveTheme(_extends$u({},at,{defaultTheme:nt,themeId:et}))}));return ot.__mui_systemSx=!0,(at,st={})=>{internal_processStyles(at,kt=>kt.filter(St=>!(St!=null&&St.__mui_systemSx)));const{name:lt,slot:ct,skipVariantsResolver:ut,skipSx:ht,overridesResolver:dt=defaultOverridesResolver(lowercaseFirstLetter(ct))}=st,pt=_objectWithoutPropertiesLoose$m(st,_excluded$1F),mt=ut!==void 0?ut:ct&&ct!=="Root"&&ct!=="root"||!1,gt=ht||!1;let yt,bt=shouldForwardProp;ct==="Root"||ct==="root"?bt=rt:ct?bt=it:isStringTag(at)&&(bt=void 0);const vt=styled$3(at,_extends$u({shouldForwardProp:bt,label:yt},pt)),xt=(kt,...St)=>{const Tt=St?St.map(Dt=>{if(typeof Dt=="function"&&Dt.__emotion_real!==Dt)return jt=>muiStyledFunctionResolver({styledArg:Dt,props:jt,defaultTheme:nt,themeId:et});if(isPlainObject$1(Dt)){let jt=Dt,Pt;return Dt&&Dt.variants&&(Pt=Dt.variants,delete jt.variants,jt=Ct=>{let wt=Dt;return variantsResolver(Ct,transformVariants(Pt),Pt).forEach(Ot=>{wt=deepmerge$1(wt,Ot)}),wt}),jt}return Dt}):[];let At=kt;if(isPlainObject$1(kt)){let Dt;kt&&kt.variants&&(Dt=kt.variants,delete At.variants,At=jt=>{let Pt=kt;return variantsResolver(jt,transformVariants(Dt),Dt).forEach(wt=>{Pt=deepmerge$1(Pt,wt)}),Pt})}else typeof kt=="function"&&kt.__emotion_real!==kt&&(At=Dt=>muiStyledFunctionResolver({styledArg:kt,props:Dt,defaultTheme:nt,themeId:et}));lt&&dt&&Tt.push(Dt=>{const jt=resolveTheme(_extends$u({},Dt,{defaultTheme:nt,themeId:et})),Pt=getStyleOverrides(lt,jt);if(Pt){const Ct={};return Object.entries(Pt).forEach(([wt,It])=>{Ct[wt]=typeof It=="function"?It(_extends$u({},Dt,{theme:jt})):It}),dt(Dt,Ct)}return null}),lt&&!mt&&Tt.push(Dt=>{const jt=resolveTheme(_extends$u({},Dt,{defaultTheme:nt,themeId:et}));return themeVariantsResolver(Dt,getVariantStyles(lt,jt),jt,lt)}),gt||Tt.push(ot);const Et=Tt.length-St.length;if(Array.isArray(kt)&&Et>0){const Dt=new Array(Et).fill("");At=[...kt,...Dt],At.raw=[...kt.raw,...Dt]}const $t=vt(At,...Tt);return at.muiName&&($t.muiName=at.muiName),$t};return vt.withConfig&&(xt.withConfig=vt.withConfig),xt}}const styled$2=createStyled(),systemStyled=styled$2;function getThemeProps(tt){const{theme:et,name:nt,props:rt}=tt;return!et||!et.components||!et.components[nt]||!et.components[nt].defaultProps?rt:resolveProps(et.components[nt].defaultProps,rt)}function useThemeProps$1({props:tt,name:et,defaultTheme:nt,themeId:rt}){let it=useTheme$2(nt);return rt&&(it=it[rt]||it),getThemeProps({theme:it,name:et,props:tt})}function clamp$7(tt,et=0,nt=1){return Math.min(Math.max(et,tt),nt)}function hexToRgb(tt){tt=tt.slice(1);const et=new RegExp(`.{1,${tt.length>=6?2:1}}`,"g");let nt=tt.match(et);return nt&&nt[0].length===1&&(nt=nt.map(rt=>rt+rt)),nt?`rgb${nt.length===4?"a":""}(${nt.map((rt,it)=>it<3?parseInt(rt,16):Math.round(parseInt(rt,16)/255*1e3)/1e3).join(", ")})`:""}function decomposeColor(tt){if(tt.type)return tt;if(tt.charAt(0)==="#")return decomposeColor(hexToRgb(tt));const et=tt.indexOf("("),nt=tt.substring(0,et);if(["rgb","rgba","hsl","hsla","color"].indexOf(nt)===-1)throw new Error(formatMuiErrorMessage(9,tt));let rt=tt.substring(et+1,tt.length-1),it;if(nt==="color"){if(rt=rt.split(" "),it=rt.shift(),rt.length===4&&rt[3].charAt(0)==="/"&&(rt[3]=rt[3].slice(1)),["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].indexOf(it)===-1)throw new Error(formatMuiErrorMessage(10,it))}else rt=rt.split(",");return rt=rt.map(ot=>parseFloat(ot)),{type:nt,values:rt,colorSpace:it}}function recomposeColor(tt){const{type:et,colorSpace:nt}=tt;let{values:rt}=tt;return et.indexOf("rgb")!==-1?rt=rt.map((it,ot)=>ot<3?parseInt(it,10):it):et.indexOf("hsl")!==-1&&(rt[1]=`${rt[1]}%`,rt[2]=`${rt[2]}%`),et.indexOf("color")!==-1?rt=`${nt} ${rt.join(" ")}`:rt=`${rt.join(", ")}`,`${et}(${rt})`}function hslToRgb(tt){tt=decomposeColor(tt);const{values:et}=tt,nt=et[0],rt=et[1]/100,it=et[2]/100,ot=rt*Math.min(it,1-it),at=(ct,ut=(ct+nt/30)%12)=>it-ot*Math.max(Math.min(ut-3,9-ut,1),-1);let st="rgb";const lt=[Math.round(at(0)*255),Math.round(at(8)*255),Math.round(at(4)*255)];return tt.type==="hsla"&&(st+="a",lt.push(et[3])),recomposeColor({type:st,values:lt})}function getLuminance(tt){tt=decomposeColor(tt);let et=tt.type==="hsl"||tt.type==="hsla"?decomposeColor(hslToRgb(tt)).values:tt.values;return et=et.map(nt=>(tt.type!=="color"&&(nt/=255),nt<=.03928?nt/12.92:((nt+.055)/1.055)**2.4)),Number((.2126*et[0]+.7152*et[1]+.0722*et[2]).toFixed(3))}function getContrastRatio(tt,et){const nt=getLuminance(tt),rt=getLuminance(et);return(Math.max(nt,rt)+.05)/(Math.min(nt,rt)+.05)}function alpha$1(tt,et){return tt=decomposeColor(tt),et=clamp$7(et),(tt.type==="rgb"||tt.type==="hsl")&&(tt.type+="a"),tt.type==="color"?tt.values[3]=`/${et}`:tt.values[3]=et,recomposeColor(tt)}function darken(tt,et){if(tt=decomposeColor(tt),et=clamp$7(et),tt.type.indexOf("hsl")!==-1)tt.values[2]*=1-et;else if(tt.type.indexOf("rgb")!==-1||tt.type.indexOf("color")!==-1)for(let nt=0;nt<3;nt+=1)tt.values[nt]*=1-et;return recomposeColor(tt)}function lighten(tt,et){if(tt=decomposeColor(tt),et=clamp$7(et),tt.type.indexOf("hsl")!==-1)tt.values[2]+=(100-tt.values[2])*et;else if(tt.type.indexOf("rgb")!==-1)for(let nt=0;nt<3;nt+=1)tt.values[nt]+=(255-tt.values[nt])*et;else if(tt.type.indexOf("color")!==-1)for(let nt=0;nt<3;nt+=1)tt.values[nt]+=(1-tt.values[nt])*et;return recomposeColor(tt)}const ThemeContext=reactExports.createContext(null),ThemeContext$1=ThemeContext;function useTheme$1(){return reactExports.useContext(ThemeContext$1)}const hasSymbol=typeof Symbol=="function"&&Symbol.for,nested=hasSymbol?Symbol.for("mui.nested"):"__THEME_NESTED__";function mergeOuterLocalTheme(tt,et){return typeof et=="function"?et(tt):_extends$u({},tt,et)}function ThemeProvider$2(tt){const{children:et,theme:nt}=tt,rt=useTheme$1(),it=reactExports.useMemo(()=>{const ot=rt===null?nt:mergeOuterLocalTheme(rt,nt);return ot!=null&&(ot[nested]=rt!==null),ot},[nt,rt]);return jsxRuntimeExports.jsx(ThemeContext$1.Provider,{value:it,children:et})}const EMPTY_THEME={};function useThemeScoping(tt,et,nt,rt=!1){return reactExports.useMemo(()=>{const it=tt&&et[tt]||et;if(typeof nt=="function"){const ot=nt(it),at=tt?_extends$u({},et,{[tt]:ot}):ot;return rt?()=>at:at}return tt?_extends$u({},et,{[tt]:nt}):_extends$u({},et,nt)},[tt,et,nt,rt])}function ThemeProvider$1(tt){const{children:et,theme:nt,themeId:rt}=tt,it=useTheme$3(EMPTY_THEME),ot=useTheme$1()||EMPTY_THEME,at=useThemeScoping(rt,it,nt),st=useThemeScoping(rt,ot,nt,!0);return jsxRuntimeExports.jsx(ThemeProvider$2,{theme:st,children:jsxRuntimeExports.jsx(ThemeContext$2.Provider,{value:at,children:et})})}const _excluded$1E=["component","direction","spacing","divider","children","className","useFlexGap"],defaultTheme$2=createTheme$1(),defaultCreateStyledComponent=systemStyled("div",{name:"MuiStack",slot:"Root",overridesResolver:(tt,et)=>et.root});function useThemePropsDefault(tt){return useThemeProps$1({props:tt,name:"MuiStack",defaultTheme:defaultTheme$2})}function joinChildren(tt,et){const nt=reactExports.Children.toArray(tt).filter(Boolean);return nt.reduce((rt,it,ot)=>(rt.push(it),ot({row:"Left","row-reverse":"Right",column:"Top","column-reverse":"Bottom"})[tt],style$3=({ownerState:tt,theme:et})=>{let nt=_extends$u({display:"flex",flexDirection:"column"},handleBreakpoints({theme:et},resolveBreakpointValues({values:tt.direction,breakpoints:et.breakpoints.values}),rt=>({flexDirection:rt})));if(tt.spacing){const rt=createUnarySpacing(et),it=Object.keys(et.breakpoints.values).reduce((lt,ct)=>((typeof tt.spacing=="object"&&tt.spacing[ct]!=null||typeof tt.direction=="object"&&tt.direction[ct]!=null)&&(lt[ct]=!0),lt),{}),ot=resolveBreakpointValues({values:tt.direction,base:it}),at=resolveBreakpointValues({values:tt.spacing,base:it});typeof ot=="object"&&Object.keys(ot).forEach((lt,ct,ut)=>{if(!ot[lt]){const dt=ct>0?ot[ut[ct-1]]:"column";ot[lt]=dt}}),nt=deepmerge$1(nt,handleBreakpoints({theme:et},at,(lt,ct)=>tt.useFlexGap?{gap:getValue$3(rt,lt)}:{"& > :not(style):not(style)":{margin:0},"& > :not(style) ~ :not(style)":{[`margin${getSideFromDirection(ct?ot[ct]:tt.direction)}`]:getValue$3(rt,lt)}}))}return nt=mergeBreakpointsInOrder(et.breakpoints,nt),nt};function createStack(tt={}){const{createStyledComponent:et=defaultCreateStyledComponent,useThemeProps:nt=useThemePropsDefault,componentName:rt="MuiStack"}=tt,it=()=>composeClasses({root:["root"]},lt=>generateUtilityClass(rt,lt),{}),ot=et(style$3);return reactExports.forwardRef(function(lt,ct){const ut=nt(lt),ht=extendSxProp(ut),{component:dt="div",direction:pt="column",spacing:mt=0,divider:gt,children:yt,className:bt,useFlexGap:vt=!1}=ht,xt=_objectWithoutPropertiesLoose$m(ht,_excluded$1E),kt={direction:pt,spacing:mt,useFlexGap:vt},St=it();return jsxRuntimeExports.jsx(ot,_extends$u({as:dt,ownerState:kt,ref:ct,className:clsx$4(St.root,bt)},xt,{children:gt?joinChildren(yt,gt):yt}))})}function createMixins(tt,et){return _extends$u({toolbar:{minHeight:56,[tt.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[tt.up("sm")]:{minHeight:64}}},et)}const _excluded$1D=["mode","contrastThreshold","tonalOffset"],light={text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:common$8.white,default:common$8.white},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}},dark={text:{primary:common$8.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:"#121212",default:"#121212"},action:{active:common$8.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}};function addLightOrDark(tt,et,nt,rt){const it=rt.light||rt,ot=rt.dark||rt*1.5;tt[et]||(tt.hasOwnProperty(nt)?tt[et]=tt[nt]:et==="light"?tt.light=lighten(tt.main,it):et==="dark"&&(tt.dark=darken(tt.main,ot)))}function getDefaultPrimary(tt="light"){return tt==="dark"?{main:blue$1[200],light:blue$1[50],dark:blue$1[400]}:{main:blue$1[700],light:blue$1[400],dark:blue$1[800]}}function getDefaultSecondary(tt="light"){return tt==="dark"?{main:purple$1[200],light:purple$1[50],dark:purple$1[400]}:{main:purple$1[500],light:purple$1[300],dark:purple$1[700]}}function getDefaultError(tt="light"){return tt==="dark"?{main:red$1[500],light:red$1[300],dark:red$1[700]}:{main:red$1[700],light:red$1[400],dark:red$1[800]}}function getDefaultInfo(tt="light"){return tt==="dark"?{main:lightBlue$1[400],light:lightBlue$1[300],dark:lightBlue$1[700]}:{main:lightBlue$1[700],light:lightBlue$1[500],dark:lightBlue$1[900]}}function getDefaultSuccess(tt="light"){return tt==="dark"?{main:green$1[400],light:green$1[300],dark:green$1[700]}:{main:green$1[800],light:green$1[500],dark:green$1[900]}}function getDefaultWarning(tt="light"){return tt==="dark"?{main:orange$1[400],light:orange$1[300],dark:orange$1[700]}:{main:"#ed6c02",light:orange$1[500],dark:orange$1[900]}}function createPalette(tt){const{mode:et="light",contrastThreshold:nt=3,tonalOffset:rt=.2}=tt,it=_objectWithoutPropertiesLoose$m(tt,_excluded$1D),ot=tt.primary||getDefaultPrimary(et),at=tt.secondary||getDefaultSecondary(et),st=tt.error||getDefaultError(et),lt=tt.info||getDefaultInfo(et),ct=tt.success||getDefaultSuccess(et),ut=tt.warning||getDefaultWarning(et);function ht(gt){return getContrastRatio(gt,dark.text.primary)>=nt?dark.text.primary:light.text.primary}const dt=({color:gt,name:yt,mainShade:bt=500,lightShade:vt=300,darkShade:xt=700})=>{if(gt=_extends$u({},gt),!gt.main&>[bt]&&(gt.main=gt[bt]),!gt.hasOwnProperty("main"))throw new Error(formatMuiErrorMessage(11,yt?` (${yt})`:"",bt));if(typeof gt.main!="string")throw new Error(formatMuiErrorMessage(12,yt?` (${yt})`:"",JSON.stringify(gt.main)));return addLightOrDark(gt,"light",vt,rt),addLightOrDark(gt,"dark",xt,rt),gt.contrastText||(gt.contrastText=ht(gt.main)),gt},pt={dark,light};return deepmerge$1(_extends$u({common:_extends$u({},common$8),mode:et,primary:dt({color:ot,name:"primary"}),secondary:dt({color:at,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:dt({color:st,name:"error"}),warning:dt({color:ut,name:"warning"}),info:dt({color:lt,name:"info"}),success:dt({color:ct,name:"success"}),grey:grey$1,contrastThreshold:nt,getContrastText:ht,augmentColor:dt,tonalOffset:rt},pt[et]),it)}const _excluded$1C=["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"];function round$3(tt){return Math.round(tt*1e5)/1e5}const caseAllCaps={textTransform:"uppercase"},defaultFontFamily='"Roboto", "Helvetica", "Arial", sans-serif';function createTypography(tt,et){const nt=typeof et=="function"?et(tt):et,{fontFamily:rt=defaultFontFamily,fontSize:it=14,fontWeightLight:ot=300,fontWeightRegular:at=400,fontWeightMedium:st=500,fontWeightBold:lt=700,htmlFontSize:ct=16,allVariants:ut,pxToRem:ht}=nt,dt=_objectWithoutPropertiesLoose$m(nt,_excluded$1C),pt=it/14,mt=ht||(bt=>`${bt/ct*pt}rem`),gt=(bt,vt,xt,kt,St)=>_extends$u({fontFamily:rt,fontWeight:bt,fontSize:mt(vt),lineHeight:xt},rt===defaultFontFamily?{letterSpacing:`${round$3(kt/vt)}em`}:{},St,ut),yt={h1:gt(ot,96,1.167,-1.5),h2:gt(ot,60,1.2,-.5),h3:gt(at,48,1.167,0),h4:gt(at,34,1.235,.25),h5:gt(at,24,1.334,0),h6:gt(st,20,1.6,.15),subtitle1:gt(at,16,1.75,.15),subtitle2:gt(st,14,1.57,.1),body1:gt(at,16,1.5,.15),body2:gt(at,14,1.43,.15),button:gt(st,14,1.75,.4,caseAllCaps),caption:gt(at,12,1.66,.4),overline:gt(at,12,2.66,1,caseAllCaps),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return deepmerge$1(_extends$u({htmlFontSize:ct,pxToRem:mt,fontFamily:rt,fontSize:it,fontWeightLight:ot,fontWeightRegular:at,fontWeightMedium:st,fontWeightBold:lt},yt),dt,{clone:!1})}const shadowKeyUmbraOpacity=.2,shadowKeyPenumbraOpacity=.14,shadowAmbientShadowOpacity=.12;function createShadow(...tt){return[`${tt[0]}px ${tt[1]}px ${tt[2]}px ${tt[3]}px rgba(0,0,0,${shadowKeyUmbraOpacity})`,`${tt[4]}px ${tt[5]}px ${tt[6]}px ${tt[7]}px rgba(0,0,0,${shadowKeyPenumbraOpacity})`,`${tt[8]}px ${tt[9]}px ${tt[10]}px ${tt[11]}px rgba(0,0,0,${shadowAmbientShadowOpacity})`].join(",")}const shadows=["none",createShadow(0,2,1,-1,0,1,1,0,0,1,3,0),createShadow(0,3,1,-2,0,2,2,0,0,1,5,0),createShadow(0,3,3,-2,0,3,4,0,0,1,8,0),createShadow(0,2,4,-1,0,4,5,0,0,1,10,0),createShadow(0,3,5,-1,0,5,8,0,0,1,14,0),createShadow(0,3,5,-1,0,6,10,0,0,1,18,0),createShadow(0,4,5,-2,0,7,10,1,0,2,16,1),createShadow(0,5,5,-3,0,8,10,1,0,3,14,2),createShadow(0,5,6,-3,0,9,12,1,0,3,16,2),createShadow(0,6,6,-3,0,10,14,1,0,4,18,3),createShadow(0,6,7,-4,0,11,15,1,0,4,20,3),createShadow(0,7,8,-4,0,12,17,2,0,5,22,4),createShadow(0,7,8,-4,0,13,19,2,0,5,24,4),createShadow(0,7,9,-4,0,14,21,2,0,5,26,4),createShadow(0,8,9,-5,0,15,22,2,0,6,28,5),createShadow(0,8,10,-5,0,16,24,2,0,6,30,5),createShadow(0,8,11,-5,0,17,26,2,0,6,32,5),createShadow(0,9,11,-5,0,18,28,2,0,7,34,6),createShadow(0,9,12,-6,0,19,29,2,0,7,36,6),createShadow(0,10,13,-6,0,20,31,3,0,8,38,7),createShadow(0,10,13,-6,0,21,33,3,0,8,40,7),createShadow(0,10,14,-6,0,22,35,3,0,8,42,7),createShadow(0,11,14,-7,0,23,36,3,0,9,44,8),createShadow(0,11,15,-7,0,24,38,3,0,9,46,8)],shadows$1=shadows,_excluded$1B=["duration","easing","delay"],easing$1={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},duration={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function formatMs(tt){return`${Math.round(tt)}ms`}function getAutoHeightDuration(tt){if(!tt)return 0;const et=tt/36;return Math.round((4+15*et**.25+et/5)*10)}function createTransitions(tt){const et=_extends$u({},easing$1,tt.easing),nt=_extends$u({},duration,tt.duration);return _extends$u({getAutoHeightDuration,create:(it=["all"],ot={})=>{const{duration:at=nt.standard,easing:st=et.easeInOut,delay:lt=0}=ot;return _objectWithoutPropertiesLoose$m(ot,_excluded$1B),(Array.isArray(it)?it:[it]).map(ct=>`${ct} ${typeof at=="string"?at:formatMs(at)} ${st} ${typeof lt=="string"?lt:formatMs(lt)}`).join(",")}},tt,{easing:et,duration:nt})}const zIndex={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500},zIndex$1=zIndex,_excluded$1A=["breakpoints","mixins","spacing","palette","transitions","typography","shape"];function createTheme(tt={},...et){const{mixins:nt={},palette:rt={},transitions:it={},typography:ot={}}=tt,at=_objectWithoutPropertiesLoose$m(tt,_excluded$1A);if(tt.vars)throw new Error(formatMuiErrorMessage(18));const st=createPalette(rt),lt=createTheme$1(tt);let ct=deepmerge$1(lt,{mixins:createMixins(lt.breakpoints,nt),palette:st,shadows:shadows$1.slice(),typography:createTypography(st,ot),transitions:createTransitions(it),zIndex:_extends$u({},zIndex$1)});return ct=deepmerge$1(ct,at),ct=et.reduce((ut,ht)=>deepmerge$1(ut,ht),ct),ct.unstable_sxConfig=_extends$u({},defaultSxConfig$1,at==null?void 0:at.unstable_sxConfig),ct.unstable_sx=function(ht){return styleFunctionSx$1({sx:ht,theme:this})},ct}function getUnit$1(tt){return String(tt).match(/[\d.\-+]*\s*(.*)/)[1]||""}function toUnitless(tt){return parseFloat(tt)}const defaultTheme=createTheme(),defaultTheme$1=defaultTheme;function useTheme(){const tt=useTheme$2(defaultTheme$1);return tt[THEME_ID]||tt}function useThemeProps({props:tt,name:et}){return useThemeProps$1({props:tt,name:et,defaultTheme:defaultTheme$1,themeId:THEME_ID})}const rootShouldForwardProp=tt=>shouldForwardProp(tt)&&tt!=="classes",slotShouldForwardProp=shouldForwardProp,styled=createStyled({themeId:THEME_ID,defaultTheme:defaultTheme$1,rootShouldForwardProp}),styled$1=styled,_excluded$1z=["theme"];function ThemeProvider(tt){let{theme:et}=tt,nt=_objectWithoutPropertiesLoose$m(tt,_excluded$1z);const rt=et[THEME_ID];return jsxRuntimeExports.jsx(ThemeProvider$1,_extends$u({},nt,{themeId:rt?THEME_ID:void 0,theme:rt||et}))}const getOverlayAlpha=tt=>{let et;return tt<1?et=5.11916*tt**2:et=4.5*Math.log(tt+1)+2,(et/100).toFixed(2)},getOverlayAlpha$1=getOverlayAlpha;function r$8(tt){var et,nt,rt="";if(typeof tt=="string"||typeof tt=="number")rt+=tt;else if(typeof tt=="object")if(Array.isArray(tt))for(et=0;et{const{color:et,fontSize:nt,classes:rt}=tt,it={root:["root",et!=="inherit"&&`color${capitalize(et)}`,`fontSize${capitalize(nt)}`]};return composeClasses(it,getSvgIconUtilityClass,rt)},SvgIconRoot=styled$1("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(tt,et)=>{const{ownerState:nt}=tt;return[et.root,nt.color!=="inherit"&&et[`color${capitalize(nt.color)}`],et[`fontSize${capitalize(nt.fontSize)}`]]}})(({theme:tt,ownerState:et})=>{var nt,rt,it,ot,at,st,lt,ct,ut,ht,dt,pt,mt;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",fill:et.hasSvgAsChild?void 0:"currentColor",flexShrink:0,transition:(nt=tt.transitions)==null||(rt=nt.create)==null?void 0:rt.call(nt,"fill",{duration:(it=tt.transitions)==null||(it=it.duration)==null?void 0:it.shorter}),fontSize:{inherit:"inherit",small:((ot=tt.typography)==null||(at=ot.pxToRem)==null?void 0:at.call(ot,20))||"1.25rem",medium:((st=tt.typography)==null||(lt=st.pxToRem)==null?void 0:lt.call(st,24))||"1.5rem",large:((ct=tt.typography)==null||(ut=ct.pxToRem)==null?void 0:ut.call(ct,35))||"2.1875rem"}[et.fontSize],color:(ht=(dt=(tt.vars||tt).palette)==null||(dt=dt[et.color])==null?void 0:dt.main)!=null?ht:{action:(pt=(tt.vars||tt).palette)==null||(pt=pt.action)==null?void 0:pt.active,disabled:(mt=(tt.vars||tt).palette)==null||(mt=mt.action)==null?void 0:mt.disabled,inherit:void 0}[et.color]}}),SvgIcon=reactExports.forwardRef(function(et,nt){const rt=useThemeProps({props:et,name:"MuiSvgIcon"}),{children:it,className:ot,color:at="inherit",component:st="svg",fontSize:lt="medium",htmlColor:ct,inheritViewBox:ut=!1,titleAccess:ht,viewBox:dt="0 0 24 24"}=rt,pt=_objectWithoutPropertiesLoose$m(rt,_excluded$1y),mt=reactExports.isValidElement(it)&&it.type==="svg",gt=_extends$u({},rt,{color:at,component:st,fontSize:lt,instanceFontSize:et.fontSize,inheritViewBox:ut,viewBox:dt,hasSvgAsChild:mt}),yt={};ut||(yt.viewBox=dt);const bt=useUtilityClasses$W(gt);return jsxRuntimeExports.jsxs(SvgIconRoot,_extends$u({as:st,className:clsx$3(bt.root,ot),focusable:"false",color:ct,"aria-hidden":ht?void 0:!0,role:ht?"img":void 0,ref:nt},yt,pt,mt&&it.props,{ownerState:gt,children:[mt?it.props.children:it,ht?jsxRuntimeExports.jsx("title",{children:ht}):null]}))});SvgIcon.muiName="SvgIcon";const SvgIcon$1=SvgIcon;function createSvgIcon(tt,et){function nt(rt,it){return jsxRuntimeExports.jsx(SvgIcon$1,_extends$u({"data-testid":`${et}Icon`,ref:it},rt,{children:tt}))}return nt.muiName=SvgIcon$1.muiName,reactExports.memo(reactExports.forwardRef(nt))}function _setPrototypeOf$c(tt,et){return _setPrototypeOf$c=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(rt,it){return rt.__proto__=it,rt},_setPrototypeOf$c(tt,et)}function _inheritsLoose$2(tt,et){tt.prototype=Object.create(et.prototype),tt.prototype.constructor=tt,_setPrototypeOf$c(tt,et)}function hasClass(tt,et){return tt.classList?!!et&&tt.classList.contains(et):(" "+(tt.className.baseVal||tt.className)+" ").indexOf(" "+et+" ")!==-1}function addClass(tt,et){tt.classList?tt.classList.add(et):hasClass(tt,et)||(typeof tt.className=="string"?tt.className=tt.className+" "+et:tt.setAttribute("class",(tt.className&&tt.className.baseVal||"")+" "+et))}function replaceClassName(tt,et){return tt.replace(new RegExp("(^|\\s)"+et+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}function removeClass$1(tt,et){tt.classList?tt.classList.remove(et):typeof tt.className=="string"?tt.className=replaceClassName(tt.className,et):tt.setAttribute("class",replaceClassName(tt.className&&tt.className.baseVal||"",et))}const config$2={disabled:!1},TransitionGroupContext=React$1.createContext(null);var forceReflow=function(et){return et.scrollTop},UNMOUNTED="unmounted",EXITED="exited",ENTERING="entering",ENTERED="entered",EXITING="exiting",Transition$1=function(tt){_inheritsLoose$2(et,tt);function et(rt,it){var ot;ot=tt.call(this,rt,it)||this;var at=it,st=at&&!at.isMounting?rt.enter:rt.appear,lt;return ot.appearStatus=null,rt.in?st?(lt=EXITED,ot.appearStatus=ENTERING):lt=ENTERED:rt.unmountOnExit||rt.mountOnEnter?lt=UNMOUNTED:lt=EXITED,ot.state={status:lt},ot.nextCallback=null,ot}et.getDerivedStateFromProps=function(it,ot){var at=it.in;return at&&ot.status===UNMOUNTED?{status:EXITED}:null};var nt=et.prototype;return nt.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},nt.componentDidUpdate=function(it){var ot=null;if(it!==this.props){var at=this.state.status;this.props.in?at!==ENTERING&&at!==ENTERED&&(ot=ENTERING):(at===ENTERING||at===ENTERED)&&(ot=EXITING)}this.updateStatus(!1,ot)},nt.componentWillUnmount=function(){this.cancelNextCallback()},nt.getTimeouts=function(){var it=this.props.timeout,ot,at,st;return ot=at=st=it,it!=null&&typeof it!="number"&&(ot=it.exit,at=it.enter,st=it.appear!==void 0?it.appear:at),{exit:ot,enter:at,appear:st}},nt.updateStatus=function(it,ot){if(it===void 0&&(it=!1),ot!==null)if(this.cancelNextCallback(),ot===ENTERING){if(this.props.unmountOnExit||this.props.mountOnEnter){var at=this.props.nodeRef?this.props.nodeRef.current:ReactDOM.findDOMNode(this);at&&forceReflow(at)}this.performEnter(it)}else this.performExit();else this.props.unmountOnExit&&this.state.status===EXITED&&this.setState({status:UNMOUNTED})},nt.performEnter=function(it){var ot=this,at=this.props.enter,st=this.context?this.context.isMounting:it,lt=this.props.nodeRef?[st]:[ReactDOM.findDOMNode(this),st],ct=lt[0],ut=lt[1],ht=this.getTimeouts(),dt=st?ht.appear:ht.enter;if(!it&&!at||config$2.disabled){this.safeSetState({status:ENTERED},function(){ot.props.onEntered(ct)});return}this.props.onEnter(ct,ut),this.safeSetState({status:ENTERING},function(){ot.props.onEntering(ct,ut),ot.onTransitionEnd(dt,function(){ot.safeSetState({status:ENTERED},function(){ot.props.onEntered(ct,ut)})})})},nt.performExit=function(){var it=this,ot=this.props.exit,at=this.getTimeouts(),st=this.props.nodeRef?void 0:ReactDOM.findDOMNode(this);if(!ot||config$2.disabled){this.safeSetState({status:EXITED},function(){it.props.onExited(st)});return}this.props.onExit(st),this.safeSetState({status:EXITING},function(){it.props.onExiting(st),it.onTransitionEnd(at.exit,function(){it.safeSetState({status:EXITED},function(){it.props.onExited(st)})})})},nt.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},nt.safeSetState=function(it,ot){ot=this.setNextCallback(ot),this.setState(it,ot)},nt.setNextCallback=function(it){var ot=this,at=!0;return this.nextCallback=function(st){at&&(at=!1,ot.nextCallback=null,it(st))},this.nextCallback.cancel=function(){at=!1},this.nextCallback},nt.onTransitionEnd=function(it,ot){this.setNextCallback(ot);var at=this.props.nodeRef?this.props.nodeRef.current:ReactDOM.findDOMNode(this),st=it==null&&!this.props.addEndListener;if(!at||st){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var lt=this.props.nodeRef?[this.nextCallback]:[at,this.nextCallback],ct=lt[0],ut=lt[1];this.props.addEndListener(ct,ut)}it!=null&&setTimeout(this.nextCallback,it)},nt.render=function(){var it=this.state.status;if(it===UNMOUNTED)return null;var ot=this.props,at=ot.children;ot.in,ot.mountOnEnter,ot.unmountOnExit,ot.appear,ot.enter,ot.exit,ot.timeout,ot.addEndListener,ot.onEnter,ot.onEntering,ot.onEntered,ot.onExit,ot.onExiting,ot.onExited,ot.nodeRef;var st=_objectWithoutPropertiesLoose$m(ot,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return React$1.createElement(TransitionGroupContext.Provider,{value:null},typeof at=="function"?at(it,st):React$1.cloneElement(React$1.Children.only(at),st))},et}(React$1.Component);Transition$1.contextType=TransitionGroupContext;Transition$1.propTypes={};function noop$9(){}Transition$1.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:noop$9,onEntering:noop$9,onEntered:noop$9,onExit:noop$9,onExiting:noop$9,onExited:noop$9};Transition$1.UNMOUNTED=UNMOUNTED;Transition$1.EXITED=EXITED;Transition$1.ENTERING=ENTERING;Transition$1.ENTERED=ENTERED;Transition$1.EXITING=EXITING;const Transition$2=Transition$1;var _addClass=function(et,nt){return et&&nt&&nt.split(" ").forEach(function(rt){return addClass(et,rt)})},removeClass=function(et,nt){return et&&nt&&nt.split(" ").forEach(function(rt){return removeClass$1(et,rt)})},CSSTransition=function(tt){_inheritsLoose$2(et,tt);function et(){for(var rt,it=arguments.length,ot=new Array(it),at=0;attt.scrollTop;function getTransitionProps(tt,et){var nt,rt;const{timeout:it,easing:ot,style:at={}}=tt;return{duration:(nt=at.transitionDuration)!=null?nt:typeof it=="number"?it:it[et.mode]||0,easing:(rt=at.transitionTimingFunction)!=null?rt:typeof ot=="object"?ot[et.mode]:ot,delay:at.transitionDelay}}function getPaperUtilityClass(tt){return generateUtilityClass("MuiPaper",tt)}generateUtilityClasses("MuiPaper",["root","rounded","outlined","elevation","elevation0","elevation1","elevation2","elevation3","elevation4","elevation5","elevation6","elevation7","elevation8","elevation9","elevation10","elevation11","elevation12","elevation13","elevation14","elevation15","elevation16","elevation17","elevation18","elevation19","elevation20","elevation21","elevation22","elevation23","elevation24"]);const _excluded$1x=["className","component","elevation","square","variant"],useUtilityClasses$V=tt=>{const{square:et,elevation:nt,variant:rt,classes:it}=tt,ot={root:["root",rt,!et&&"rounded",rt==="elevation"&&`elevation${nt}`]};return composeClasses(ot,getPaperUtilityClass,it)},PaperRoot=styled$1("div",{name:"MuiPaper",slot:"Root",overridesResolver:(tt,et)=>{const{ownerState:nt}=tt;return[et.root,et[nt.variant],!nt.square&&et.rounded,nt.variant==="elevation"&&et[`elevation${nt.elevation}`]]}})(({theme:tt,ownerState:et})=>{var nt;return _extends$u({backgroundColor:(tt.vars||tt).palette.background.paper,color:(tt.vars||tt).palette.text.primary,transition:tt.transitions.create("box-shadow")},!et.square&&{borderRadius:tt.shape.borderRadius},et.variant==="outlined"&&{border:`1px solid ${(tt.vars||tt).palette.divider}`},et.variant==="elevation"&&_extends$u({boxShadow:(tt.vars||tt).shadows[et.elevation]},!tt.vars&&tt.palette.mode==="dark"&&{backgroundImage:`linear-gradient(${alpha$1("#fff",getOverlayAlpha$1(et.elevation))}, ${alpha$1("#fff",getOverlayAlpha$1(et.elevation))})`},tt.vars&&{backgroundImage:(nt=tt.vars.overlays)==null?void 0:nt[et.elevation]}))}),Paper=reactExports.forwardRef(function(et,nt){const rt=useThemeProps({props:et,name:"MuiPaper"}),{className:it,component:ot="div",elevation:at=1,square:st=!1,variant:lt="elevation"}=rt,ct=_objectWithoutPropertiesLoose$m(rt,_excluded$1x),ut=_extends$u({},rt,{component:ot,elevation:at,square:st,variant:lt}),ht=useUtilityClasses$V(ut);return jsxRuntimeExports.jsx(PaperRoot,_extends$u({as:ot,ownerState:ut,className:clsx$3(ht.root,it),ref:nt},ct))}),Paper$1=Paper;function Ripple(tt){const{className:et,classes:nt,pulsate:rt=!1,rippleX:it,rippleY:ot,rippleSize:at,in:st,onExited:lt,timeout:ct}=tt,[ut,ht]=reactExports.useState(!1),dt=clsx$3(et,nt.ripple,nt.rippleVisible,rt&&nt.ripplePulsate),pt={width:at,height:at,top:-(at/2)+ot,left:-(at/2)+it},mt=clsx$3(nt.child,ut&&nt.childLeaving,rt&&nt.childPulsate);return!st&&!ut&&ht(!0),reactExports.useEffect(()=>{if(!st&<!=null){const gt=setTimeout(lt,ct);return()=>{clearTimeout(gt)}}},[lt,st,ct]),jsxRuntimeExports.jsx("span",{className:dt,style:pt,children:jsxRuntimeExports.jsx("span",{className:mt})})}const touchRippleClasses=generateUtilityClasses("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]),touchRippleClasses$1=touchRippleClasses,_excluded$1v=["center","classes","className"];let _$1=tt=>tt,_t$1,_t2$1,_t3$1,_t4$1;const DURATION=550,DELAY_RIPPLE=80,enterKeyframe=keyframes(_t$1||(_t$1=_$1` - 0% { - transform: scale(0); - opacity: 0.1; - } - - 100% { - transform: scale(1); - opacity: 0.3; +var r4 = Object.defineProperty +var i4 = (tt, et, nt) => + et in tt ? r4(tt, et, { enumerable: !0, configurable: !0, writable: !0, value: nt }) : (tt[et] = nt) +var o4 = (tt, et) => () => (et || tt((et = { exports: {} }).exports, et), et.exports) +var mw = (tt, et, nt) => (i4(tt, typeof et != 'symbol' ? et + '' : et, nt), nt) +var s4 = o4((exports, module) => { + function _mergeNamespaces(tt, et) { + for (var nt = 0; nt < et.length; nt++) { + const rt = et[nt] + if (typeof rt != 'string' && !Array.isArray(rt)) { + for (const it in rt) + if (it !== 'default' && !(it in tt)) { + const ot = Object.getOwnPropertyDescriptor(rt, it) + ot && Object.defineProperty(tt, it, ot.get ? ot : { enumerable: !0, get: () => rt[it] }) + } + } + } + return Object.freeze(Object.defineProperty(tt, Symbol.toStringTag, { value: 'Module' })) } -`)),exitKeyframe=keyframes(_t2$1||(_t2$1=_$1` - 0% { - opacity: 1; + ;(function () { + const et = document.createElement('link').relList + if (et && et.supports && et.supports('modulepreload')) return + for (const it of document.querySelectorAll('link[rel="modulepreload"]')) rt(it) + new MutationObserver((it) => { + for (const ot of it) + if (ot.type === 'childList') + for (const at of ot.addedNodes) at.tagName === 'LINK' && at.rel === 'modulepreload' && rt(at) + }).observe(document, { childList: !0, subtree: !0 }) + function nt(it) { + const ot = {} + return ( + it.integrity && (ot.integrity = it.integrity), + it.referrerPolicy && (ot.referrerPolicy = it.referrerPolicy), + it.crossOrigin === 'use-credentials' + ? (ot.credentials = 'include') + : it.crossOrigin === 'anonymous' + ? (ot.credentials = 'omit') + : (ot.credentials = 'same-origin'), + ot + ) + } + function rt(it) { + if (it.ep) return + it.ep = !0 + const ot = nt(it) + fetch(it.href, ot) + } + })() + var commonjsGlobal = + typeof globalThis < 'u' + ? globalThis + : typeof window < 'u' + ? window + : typeof global < 'u' + ? global + : typeof self < 'u' + ? self + : {} + function getDefaultExportFromCjs(tt) { + return tt && tt.__esModule && Object.prototype.hasOwnProperty.call(tt, 'default') ? tt.default : tt } - - 100% { - opacity: 0; + function getAugmentedNamespace(tt) { + if (tt.__esModule) return tt + var et = tt.default + if (typeof et == 'function') { + var nt = function rt() { + return this instanceof rt ? Reflect.construct(et, arguments, this.constructor) : et.apply(this, arguments) + } + nt.prototype = et.prototype + } else nt = {} + return ( + Object.defineProperty(nt, '__esModule', { value: !0 }), + Object.keys(tt).forEach(function (rt) { + var it = Object.getOwnPropertyDescriptor(tt, rt) + Object.defineProperty( + nt, + rt, + it.get + ? it + : { + enumerable: !0, + get: function () { + return tt[rt] + }, + }, + ) + }), + nt + ) } -`)),pulsateKeyframe=keyframes(_t3$1||(_t3$1=_$1` - 0% { - transform: scale(1); + var buffer$2 = {}, + base64Js = {} + base64Js.byteLength = byteLength$1 + base64Js.toByteArray = toByteArray + base64Js.fromByteArray = fromByteArray + var lookup$2 = [], + revLookup = [], + Arr = typeof Uint8Array < 'u' ? Uint8Array : Array, + code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/' + for (var i$8 = 0, len = code.length; i$8 < len; ++i$8) + (lookup$2[i$8] = code[i$8]), (revLookup[code.charCodeAt(i$8)] = i$8) + revLookup['-'.charCodeAt(0)] = 62 + revLookup['_'.charCodeAt(0)] = 63 + function getLens(tt) { + var et = tt.length + if (et % 4 > 0) throw new Error('Invalid string. Length must be a multiple of 4') + var nt = tt.indexOf('=') + nt === -1 && (nt = et) + var rt = nt === et ? 0 : 4 - (nt % 4) + return [nt, rt] } - - 50% { - transform: scale(0.92); + function byteLength$1(tt) { + var et = getLens(tt), + nt = et[0], + rt = et[1] + return ((nt + rt) * 3) / 4 - rt } - - 100% { - transform: scale(1); + function _byteLength(tt, et, nt) { + return ((et + nt) * 3) / 4 - nt } -`)),TouchRippleRoot=styled$1("span",{name:"MuiTouchRipple",slot:"Root"})({overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"}),TouchRippleRipple=styled$1(Ripple,{name:"MuiTouchRipple",slot:"Ripple"})(_t4$1||(_t4$1=_$1` - opacity: 0; - position: absolute; - - &.${0} { - opacity: 0.3; - transform: scale(1); - animation-name: ${0}; - animation-duration: ${0}ms; - animation-timing-function: ${0}; + function toByteArray(tt) { + var et, + nt = getLens(tt), + rt = nt[0], + it = nt[1], + ot = new Arr(_byteLength(tt, rt, it)), + at = 0, + st = it > 0 ? rt - 4 : rt, + lt + for (lt = 0; lt < st; lt += 4) + (et = + (revLookup[tt.charCodeAt(lt)] << 18) | + (revLookup[tt.charCodeAt(lt + 1)] << 12) | + (revLookup[tt.charCodeAt(lt + 2)] << 6) | + revLookup[tt.charCodeAt(lt + 3)]), + (ot[at++] = (et >> 16) & 255), + (ot[at++] = (et >> 8) & 255), + (ot[at++] = et & 255) + return ( + it === 2 && + ((et = (revLookup[tt.charCodeAt(lt)] << 2) | (revLookup[tt.charCodeAt(lt + 1)] >> 4)), (ot[at++] = et & 255)), + it === 1 && + ((et = + (revLookup[tt.charCodeAt(lt)] << 10) | + (revLookup[tt.charCodeAt(lt + 1)] << 4) | + (revLookup[tt.charCodeAt(lt + 2)] >> 2)), + (ot[at++] = (et >> 8) & 255), + (ot[at++] = et & 255)), + ot + ) } - - &.${0} { - animation-duration: ${0}ms; + function tripletToBase64(tt) { + return lookup$2[(tt >> 18) & 63] + lookup$2[(tt >> 12) & 63] + lookup$2[(tt >> 6) & 63] + lookup$2[tt & 63] } - - & .${0} { - opacity: 1; - display: block; - width: 100%; - height: 100%; - border-radius: 50%; - background-color: currentColor; + function encodeChunk(tt, et, nt) { + for (var rt, it = [], ot = et; ot < nt; ot += 3) + (rt = ((tt[ot] << 16) & 16711680) + ((tt[ot + 1] << 8) & 65280) + (tt[ot + 2] & 255)), + it.push(tripletToBase64(rt)) + return it.join('') } - - & .${0} { - opacity: 0; - animation-name: ${0}; - animation-duration: ${0}ms; - animation-timing-function: ${0}; + function fromByteArray(tt) { + for (var et, nt = tt.length, rt = nt % 3, it = [], ot = 16383, at = 0, st = nt - rt; at < st; at += ot) + it.push(encodeChunk(tt, at, at + ot > st ? st : at + ot)) + return ( + rt === 1 + ? ((et = tt[nt - 1]), it.push(lookup$2[et >> 2] + lookup$2[(et << 4) & 63] + '==')) + : rt === 2 && + ((et = (tt[nt - 2] << 8) + tt[nt - 1]), + it.push(lookup$2[et >> 10] + lookup$2[(et >> 4) & 63] + lookup$2[(et << 2) & 63] + '=')), + it.join('') + ) } - - & .${0} { - position: absolute; - /* @noflip */ - left: 0px; - top: 0; - animation-name: ${0}; - animation-duration: 2500ms; - animation-timing-function: ${0}; - animation-iteration-count: infinite; - animation-delay: 200ms; + var ieee754 = {} + /*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */ ieee754.read = function ( + tt, + et, + nt, + rt, + it, + ) { + var ot, + at, + st = it * 8 - rt - 1, + lt = (1 << st) - 1, + ct = lt >> 1, + ut = -7, + ht = nt ? it - 1 : 0, + dt = nt ? -1 : 1, + pt = tt[et + ht] + for ( + ht += dt, ot = pt & ((1 << -ut) - 1), pt >>= -ut, ut += st; + ut > 0; + ot = ot * 256 + tt[et + ht], ht += dt, ut -= 8 + ); + for (at = ot & ((1 << -ut) - 1), ot >>= -ut, ut += rt; ut > 0; at = at * 256 + tt[et + ht], ht += dt, ut -= 8); + if (ot === 0) ot = 1 - ct + else { + if (ot === lt) return at ? NaN : (pt ? -1 : 1) * (1 / 0) + ;(at = at + Math.pow(2, rt)), (ot = ot - ct) + } + return (pt ? -1 : 1) * at * Math.pow(2, ot - rt) } -`),touchRippleClasses$1.rippleVisible,enterKeyframe,DURATION,({theme:tt})=>tt.transitions.easing.easeInOut,touchRippleClasses$1.ripplePulsate,({theme:tt})=>tt.transitions.duration.shorter,touchRippleClasses$1.child,touchRippleClasses$1.childLeaving,exitKeyframe,DURATION,({theme:tt})=>tt.transitions.easing.easeInOut,touchRippleClasses$1.childPulsate,pulsateKeyframe,({theme:tt})=>tt.transitions.easing.easeInOut),TouchRipple=reactExports.forwardRef(function(et,nt){const rt=useThemeProps({props:et,name:"MuiTouchRipple"}),{center:it=!1,classes:ot={},className:at}=rt,st=_objectWithoutPropertiesLoose$m(rt,_excluded$1v),[lt,ct]=reactExports.useState([]),ut=reactExports.useRef(0),ht=reactExports.useRef(null);reactExports.useEffect(()=>{ht.current&&(ht.current(),ht.current=null)},[lt]);const dt=reactExports.useRef(!1),pt=reactExports.useRef(0),mt=reactExports.useRef(null),gt=reactExports.useRef(null);reactExports.useEffect(()=>()=>{pt.current&&clearTimeout(pt.current)},[]);const yt=reactExports.useCallback(kt=>{const{pulsate:St,rippleX:Tt,rippleY:At,rippleSize:Et,cb:$t}=kt;ct(Dt=>[...Dt,jsxRuntimeExports.jsx(TouchRippleRipple,{classes:{ripple:clsx$3(ot.ripple,touchRippleClasses$1.ripple),rippleVisible:clsx$3(ot.rippleVisible,touchRippleClasses$1.rippleVisible),ripplePulsate:clsx$3(ot.ripplePulsate,touchRippleClasses$1.ripplePulsate),child:clsx$3(ot.child,touchRippleClasses$1.child),childLeaving:clsx$3(ot.childLeaving,touchRippleClasses$1.childLeaving),childPulsate:clsx$3(ot.childPulsate,touchRippleClasses$1.childPulsate)},timeout:DURATION,pulsate:St,rippleX:Tt,rippleY:At,rippleSize:Et},ut.current)]),ut.current+=1,ht.current=$t},[ot]),bt=reactExports.useCallback((kt={},St={},Tt=()=>{})=>{const{pulsate:At=!1,center:Et=it||St.pulsate,fakeElement:$t=!1}=St;if((kt==null?void 0:kt.type)==="mousedown"&&dt.current){dt.current=!1;return}(kt==null?void 0:kt.type)==="touchstart"&&(dt.current=!0);const Dt=$t?null:gt.current,jt=Dt?Dt.getBoundingClientRect():{width:0,height:0,left:0,top:0};let Pt,Ct,wt;if(Et||kt===void 0||kt.clientX===0&&kt.clientY===0||!kt.clientX&&!kt.touches)Pt=Math.round(jt.width/2),Ct=Math.round(jt.height/2);else{const{clientX:It,clientY:Ot}=kt.touches&&kt.touches.length>0?kt.touches[0]:kt;Pt=Math.round(It-jt.left),Ct=Math.round(Ot-jt.top)}if(Et)wt=Math.sqrt((2*jt.width**2+jt.height**2)/3),wt%2===0&&(wt+=1);else{const It=Math.max(Math.abs((Dt?Dt.clientWidth:0)-Pt),Pt)*2+2,Ot=Math.max(Math.abs((Dt?Dt.clientHeight:0)-Ct),Ct)*2+2;wt=Math.sqrt(It**2+Ot**2)}kt!=null&&kt.touches?mt.current===null&&(mt.current=()=>{yt({pulsate:At,rippleX:Pt,rippleY:Ct,rippleSize:wt,cb:Tt})},pt.current=setTimeout(()=>{mt.current&&(mt.current(),mt.current=null)},DELAY_RIPPLE)):yt({pulsate:At,rippleX:Pt,rippleY:Ct,rippleSize:wt,cb:Tt})},[it,yt]),vt=reactExports.useCallback(()=>{bt({},{pulsate:!0})},[bt]),xt=reactExports.useCallback((kt,St)=>{if(clearTimeout(pt.current),(kt==null?void 0:kt.type)==="touchend"&&mt.current){mt.current(),mt.current=null,pt.current=setTimeout(()=>{xt(kt,St)});return}mt.current=null,ct(Tt=>Tt.length>0?Tt.slice(1):Tt),ht.current=St},[]);return reactExports.useImperativeHandle(nt,()=>({pulsate:vt,start:bt,stop:xt}),[vt,bt,xt]),jsxRuntimeExports.jsx(TouchRippleRoot,_extends$u({className:clsx$3(touchRippleClasses$1.root,ot.root,at),ref:gt},st,{children:jsxRuntimeExports.jsx(TransitionGroup$1,{component:null,exit:!0,children:lt})}))}),TouchRipple$1=TouchRipple;function getButtonBaseUtilityClass(tt){return generateUtilityClass("MuiButtonBase",tt)}const buttonBaseClasses=generateUtilityClasses("MuiButtonBase",["root","disabled","focusVisible"]),buttonBaseClasses$1=buttonBaseClasses,_excluded$1u=["action","centerRipple","children","className","component","disabled","disableRipple","disableTouchRipple","focusRipple","focusVisibleClassName","LinkComponent","onBlur","onClick","onContextMenu","onDragLeave","onFocus","onFocusVisible","onKeyDown","onKeyUp","onMouseDown","onMouseLeave","onMouseUp","onTouchEnd","onTouchMove","onTouchStart","tabIndex","TouchRippleProps","touchRippleRef","type"],useUtilityClasses$U=tt=>{const{disabled:et,focusVisible:nt,focusVisibleClassName:rt,classes:it}=tt,at=composeClasses({root:["root",et&&"disabled",nt&&"focusVisible"]},getButtonBaseUtilityClass,it);return nt&&rt&&(at.root+=` ${rt}`),at},ButtonBaseRoot=styled$1("button",{name:"MuiButtonBase",slot:"Root",overridesResolver:(tt,et)=>et.root})({display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",boxSizing:"border-box",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},[`&.${buttonBaseClasses$1.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),ButtonBase=reactExports.forwardRef(function(et,nt){const rt=useThemeProps({props:et,name:"MuiButtonBase"}),{action:it,centerRipple:ot=!1,children:at,className:st,component:lt="button",disabled:ct=!1,disableRipple:ut=!1,disableTouchRipple:ht=!1,focusRipple:dt=!1,LinkComponent:pt="a",onBlur:mt,onClick:gt,onContextMenu:yt,onDragLeave:bt,onFocus:vt,onFocusVisible:xt,onKeyDown:kt,onKeyUp:St,onMouseDown:Tt,onMouseLeave:At,onMouseUp:Et,onTouchEnd:$t,onTouchMove:Dt,onTouchStart:jt,tabIndex:Pt=0,TouchRippleProps:Ct,touchRippleRef:wt,type:It}=rt,Ot=_objectWithoutPropertiesLoose$m(rt,_excluded$1u),Wt=reactExports.useRef(null),zt=reactExports.useRef(null),Ft=useForkRef(zt,wt),{isFocusVisibleRef:Nt,onFocus:Ut,onBlur:Mt,ref:Ht}=useIsFocusVisible(),[en,sn]=reactExports.useState(!1);ct&&en&&sn(!1),reactExports.useImperativeHandle(it,()=>({focusVisible:()=>{sn(!0),Wt.current.focus()}}),[]);const[Kt,rn]=reactExports.useState(!1);reactExports.useEffect(()=>{rn(!0)},[]);const nn=Kt&&!ut&&!ct;reactExports.useEffect(()=>{en&&dt&&!ut&&Kt&&zt.current.pulsate()},[ut,dt,en,Kt]);function hn(Xt,Sn,Rn=ht){return useEventCallback(jn=>(Sn&&Sn(jn),!Rn&&zt.current&&zt.current[Xt](jn),!0))}const vn=hn("start",Tt),an=hn("stop",yt),Qt=hn("stop",bt),_n=hn("stop",Et),Pn=hn("stop",Xt=>{en&&Xt.preventDefault(),At&&At(Xt)}),$n=hn("start",jt),Nn=hn("stop",$t),Tn=hn("stop",Dt),cn=hn("stop",Xt=>{Mt(Xt),Nt.current===!1&&sn(!1),mt&&mt(Xt)},!1),mn=useEventCallback(Xt=>{Wt.current||(Wt.current=Xt.currentTarget),Ut(Xt),Nt.current===!0&&(sn(!0),xt&&xt(Xt)),vt&&vt(Xt)}),In=()=>{const Xt=Wt.current;return lt&<!=="button"&&!(Xt.tagName==="A"&&Xt.href)},An=reactExports.useRef(!1),wn=useEventCallback(Xt=>{dt&&!An.current&&en&&zt.current&&Xt.key===" "&&(An.current=!0,zt.current.stop(Xt,()=>{zt.current.start(Xt)})),Xt.target===Xt.currentTarget&&In()&&Xt.key===" "&&Xt.preventDefault(),kt&&kt(Xt),Xt.target===Xt.currentTarget&&In()&&Xt.key==="Enter"&&!ct&&(Xt.preventDefault(),gt&>(Xt))}),fn=useEventCallback(Xt=>{dt&&Xt.key===" "&&zt.current&&en&&!Xt.defaultPrevented&&(An.current=!1,zt.current.stop(Xt,()=>{zt.current.pulsate(Xt)})),St&&St(Xt),gt&&Xt.target===Xt.currentTarget&&In()&&Xt.key===" "&&!Xt.defaultPrevented&>(Xt)});let pn=lt;pn==="button"&&(Ot.href||Ot.to)&&(pn=pt);const kn={};pn==="button"?(kn.type=It===void 0?"button":It,kn.disabled=ct):(!Ot.href&&!Ot.to&&(kn.role="button"),ct&&(kn["aria-disabled"]=ct));const Dn=useForkRef(nt,Ht,Wt),un=_extends$u({},rt,{centerRipple:ot,component:lt,disabled:ct,disableRipple:ut,disableTouchRipple:ht,focusRipple:dt,tabIndex:Pt,focusVisible:en}),Zt=useUtilityClasses$U(un);return jsxRuntimeExports.jsxs(ButtonBaseRoot,_extends$u({as:pn,className:clsx$3(Zt.root,st),ownerState:un,onBlur:cn,onClick:gt,onContextMenu:an,onFocus:mn,onKeyDown:wn,onKeyUp:fn,onMouseDown:vn,onMouseLeave:Pn,onMouseUp:_n,onDragLeave:Qt,onTouchEnd:Nn,onTouchMove:Tn,onTouchStart:$n,ref:Dn,tabIndex:ct?-1:Pt,type:It},kn,Ot,{children:[at,nn?jsxRuntimeExports.jsx(TouchRipple$1,_extends$u({ref:Ft,center:ot},Ct)):null]}))}),ButtonBase$1=ButtonBase;function getIconButtonUtilityClass(tt){return generateUtilityClass("MuiIconButton",tt)}const iconButtonClasses=generateUtilityClasses("MuiIconButton",["root","disabled","colorInherit","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","edgeStart","edgeEnd","sizeSmall","sizeMedium","sizeLarge"]),iconButtonClasses$1=iconButtonClasses,_excluded$1t=["edge","children","className","color","disabled","disableFocusRipple","size"],useUtilityClasses$T=tt=>{const{classes:et,disabled:nt,color:rt,edge:it,size:ot}=tt,at={root:["root",nt&&"disabled",rt!=="default"&&`color${capitalize(rt)}`,it&&`edge${capitalize(it)}`,`size${capitalize(ot)}`]};return composeClasses(at,getIconButtonUtilityClass,et)},IconButtonRoot=styled$1(ButtonBase$1,{name:"MuiIconButton",slot:"Root",overridesResolver:(tt,et)=>{const{ownerState:nt}=tt;return[et.root,nt.color!=="default"&&et[`color${capitalize(nt.color)}`],nt.edge&&et[`edge${capitalize(nt.edge)}`],et[`size${capitalize(nt.size)}`]]}})(({theme:tt,ownerState:et})=>_extends$u({textAlign:"center",flex:"0 0 auto",fontSize:tt.typography.pxToRem(24),padding:8,borderRadius:"50%",overflow:"visible",color:(tt.vars||tt).palette.action.active,transition:tt.transitions.create("background-color",{duration:tt.transitions.duration.shortest})},!et.disableRipple&&{"&:hover":{backgroundColor:tt.vars?`rgba(${tt.vars.palette.action.activeChannel} / ${tt.vars.palette.action.hoverOpacity})`:alpha$1(tt.palette.action.active,tt.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},et.edge==="start"&&{marginLeft:et.size==="small"?-3:-12},et.edge==="end"&&{marginRight:et.size==="small"?-3:-12}),({theme:tt,ownerState:et})=>{var nt;const rt=(nt=(tt.vars||tt).palette)==null?void 0:nt[et.color];return _extends$u({},et.color==="inherit"&&{color:"inherit"},et.color!=="inherit"&&et.color!=="default"&&_extends$u({color:rt==null?void 0:rt.main},!et.disableRipple&&{"&:hover":_extends$u({},rt&&{backgroundColor:tt.vars?`rgba(${rt.mainChannel} / ${tt.vars.palette.action.hoverOpacity})`:alpha$1(rt.main,tt.palette.action.hoverOpacity)},{"@media (hover: none)":{backgroundColor:"transparent"}})}),et.size==="small"&&{padding:5,fontSize:tt.typography.pxToRem(18)},et.size==="large"&&{padding:12,fontSize:tt.typography.pxToRem(28)},{[`&.${iconButtonClasses$1.disabled}`]:{backgroundColor:"transparent",color:(tt.vars||tt).palette.action.disabled}})}),IconButton$1=reactExports.forwardRef(function(et,nt){const rt=useThemeProps({props:et,name:"MuiIconButton"}),{edge:it=!1,children:ot,className:at,color:st="default",disabled:lt=!1,disableFocusRipple:ct=!1,size:ut="medium"}=rt,ht=_objectWithoutPropertiesLoose$m(rt,_excluded$1t),dt=_extends$u({},rt,{edge:it,color:st,disabled:lt,disableFocusRipple:ct,size:ut}),pt=useUtilityClasses$T(dt);return jsxRuntimeExports.jsx(IconButtonRoot,_extends$u({className:clsx$3(pt.root,at),centerRipple:!0,focusRipple:!ct,disabled:lt,ref:nt,ownerState:dt},ht,{children:ot}))}),IconButton$2=IconButton$1;function getTypographyUtilityClass(tt){return generateUtilityClass("MuiTypography",tt)}generateUtilityClasses("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"]);const _excluded$1s=["align","className","component","gutterBottom","noWrap","paragraph","variant","variantMapping"],useUtilityClasses$S=tt=>{const{align:et,gutterBottom:nt,noWrap:rt,paragraph:it,variant:ot,classes:at}=tt,st={root:["root",ot,tt.align!=="inherit"&&`align${capitalize(et)}`,nt&&"gutterBottom",rt&&"noWrap",it&&"paragraph"]};return composeClasses(st,getTypographyUtilityClass,at)},TypographyRoot=styled$1("span",{name:"MuiTypography",slot:"Root",overridesResolver:(tt,et)=>{const{ownerState:nt}=tt;return[et.root,nt.variant&&et[nt.variant],nt.align!=="inherit"&&et[`align${capitalize(nt.align)}`],nt.noWrap&&et.noWrap,nt.gutterBottom&&et.gutterBottom,nt.paragraph&&et.paragraph]}})(({theme:tt,ownerState:et})=>_extends$u({margin:0},et.variant==="inherit"&&{font:"inherit"},et.variant!=="inherit"&&tt.typography[et.variant],et.align!=="inherit"&&{textAlign:et.align},et.noWrap&&{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},et.gutterBottom&&{marginBottom:"0.35em"},et.paragraph&&{marginBottom:16})),defaultVariantMapping={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},colorTransformations={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"},transformDeprecatedColors=tt=>colorTransformations[tt]||tt,Typography=reactExports.forwardRef(function(et,nt){const rt=useThemeProps({props:et,name:"MuiTypography"}),it=transformDeprecatedColors(rt.color),ot=extendSxProp(_extends$u({},rt,{color:it})),{align:at="inherit",className:st,component:lt,gutterBottom:ct=!1,noWrap:ut=!1,paragraph:ht=!1,variant:dt="body1",variantMapping:pt=defaultVariantMapping}=ot,mt=_objectWithoutPropertiesLoose$m(ot,_excluded$1s),gt=_extends$u({},ot,{align:at,color:it,className:st,component:lt,gutterBottom:ct,noWrap:ut,paragraph:ht,variant:dt,variantMapping:pt}),yt=lt||(ht?"p":pt[dt]||defaultVariantMapping[dt])||"span",bt=useUtilityClasses$S(gt);return jsxRuntimeExports.jsx(TypographyRoot,_extends$u({as:yt,ref:nt,ownerState:gt,className:clsx$3(bt.root,st)},mt))}),Typography$1=Typography;function isHostComponent(tt){return typeof tt=="string"}function appendOwnerState(tt,et,nt){return tt===void 0||isHostComponent(tt)?et:_extends$u({},et,{ownerState:_extends$u({},et.ownerState,nt)})}function areArraysEqual$1(tt,et,nt=(rt,it)=>rt===it){return tt.length===et.length&&tt.every((rt,it)=>nt(rt,et[it]))}const defaultContextValue={disableDefaultClasses:!1},ClassNameConfiguratorContext=reactExports.createContext(defaultContextValue);function useClassNamesOverride(tt){const{disableDefaultClasses:et}=reactExports.useContext(ClassNameConfiguratorContext);return nt=>et?"":tt(nt)}function extractEventHandlers(tt,et=[]){if(tt===void 0)return{};const nt={};return Object.keys(tt).filter(rt=>rt.match(/^on[A-Z]/)&&typeof tt[rt]=="function"&&!et.includes(rt)).forEach(rt=>{nt[rt]=tt[rt]}),nt}function resolveComponentProps(tt,et,nt){return typeof tt=="function"?tt(et,nt):tt}function r$7(tt){var et,nt,rt="";if(typeof tt=="string"||typeof tt=="number")rt+=tt;else if(typeof tt=="object")if(Array.isArray(tt))for(et=0;et!(nt.match(/^on[A-Z]/)&&typeof tt[nt]=="function")).forEach(nt=>{et[nt]=tt[nt]}),et}function mergeSlotProps(tt){const{getSlotProps:et,additionalProps:nt,externalSlotProps:rt,externalForwardedProps:it,className:ot}=tt;if(!et){const pt=clsx$2(it==null?void 0:it.className,rt==null?void 0:rt.className,ot,nt==null?void 0:nt.className),mt=_extends$u({},nt==null?void 0:nt.style,it==null?void 0:it.style,rt==null?void 0:rt.style),gt=_extends$u({},nt,it,rt);return pt.length>0&&(gt.className=pt),Object.keys(mt).length>0&&(gt.style=mt),{props:gt,internalRef:void 0}}const at=extractEventHandlers(_extends$u({},it,rt)),st=omitEventHandlers(rt),lt=omitEventHandlers(it),ct=et(at),ut=clsx$2(ct==null?void 0:ct.className,nt==null?void 0:nt.className,ot,it==null?void 0:it.className,rt==null?void 0:rt.className),ht=_extends$u({},ct==null?void 0:ct.style,nt==null?void 0:nt.style,it==null?void 0:it.style,rt==null?void 0:rt.style),dt=_extends$u({},ct,nt,lt,st);return ut.length>0&&(dt.className=ut),Object.keys(ht).length>0&&(dt.style=ht),{props:dt,internalRef:ct.ref}}const _excluded$1r=["elementType","externalSlotProps","ownerState","skipResolvingSlotProps"];function useSlotProps(tt){var et;const{elementType:nt,externalSlotProps:rt,ownerState:it,skipResolvingSlotProps:ot=!1}=tt,at=_objectWithoutPropertiesLoose$m(tt,_excluded$1r),st=ot?{}:resolveComponentProps(rt,it),{props:lt,internalRef:ct}=mergeSlotProps(_extends$u({},at,{externalSlotProps:st})),ut=useForkRef(ct,st==null?void 0:st.ref,(et=tt.additionalProps)==null?void 0:et.ref);return appendOwnerState(nt,_extends$u({},lt,{ref:ut}),it)}const candidatesSelector=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function getTabIndex(tt){const et=parseInt(tt.getAttribute("tabindex")||"",10);return Number.isNaN(et)?tt.contentEditable==="true"||(tt.nodeName==="AUDIO"||tt.nodeName==="VIDEO"||tt.nodeName==="DETAILS")&&tt.getAttribute("tabindex")===null?0:tt.tabIndex:et}function isNonTabbableRadio(tt){if(tt.tagName!=="INPUT"||tt.type!=="radio"||!tt.name)return!1;const et=rt=>tt.ownerDocument.querySelector(`input[type="radio"]${rt}`);let nt=et(`[name="${tt.name}"]:checked`);return nt||(nt=et(`[name="${tt.name}"]`)),nt!==tt}function isNodeMatchingSelectorFocusable(tt){return!(tt.disabled||tt.tagName==="INPUT"&&tt.type==="hidden"||isNonTabbableRadio(tt))}function defaultGetTabbable(tt){const et=[],nt=[];return Array.from(tt.querySelectorAll(candidatesSelector)).forEach((rt,it)=>{const ot=getTabIndex(rt);ot===-1||!isNodeMatchingSelectorFocusable(rt)||(ot===0?et.push(rt):nt.push({documentOrder:it,tabIndex:ot,node:rt}))}),nt.sort((rt,it)=>rt.tabIndex===it.tabIndex?rt.documentOrder-it.documentOrder:rt.tabIndex-it.tabIndex).map(rt=>rt.node).concat(et)}function defaultIsEnabled(){return!0}function FocusTrap(tt){const{children:et,disableAutoFocus:nt=!1,disableEnforceFocus:rt=!1,disableRestoreFocus:it=!1,getTabbable:ot=defaultGetTabbable,isEnabled:at=defaultIsEnabled,open:st}=tt,lt=reactExports.useRef(!1),ct=reactExports.useRef(null),ut=reactExports.useRef(null),ht=reactExports.useRef(null),dt=reactExports.useRef(null),pt=reactExports.useRef(!1),mt=reactExports.useRef(null),gt=useForkRef(et.ref,mt),yt=reactExports.useRef(null);reactExports.useEffect(()=>{!st||!mt.current||(pt.current=!nt)},[nt,st]),reactExports.useEffect(()=>{if(!st||!mt.current)return;const xt=ownerDocument(mt.current);return mt.current.contains(xt.activeElement)||(mt.current.hasAttribute("tabIndex")||mt.current.setAttribute("tabIndex","-1"),pt.current&&mt.current.focus()),()=>{it||(ht.current&&ht.current.focus&&(lt.current=!0,ht.current.focus()),ht.current=null)}},[st]),reactExports.useEffect(()=>{if(!st||!mt.current)return;const xt=ownerDocument(mt.current),kt=At=>{yt.current=At,!(rt||!at()||At.key!=="Tab")&&xt.activeElement===mt.current&&At.shiftKey&&(lt.current=!0,ut.current&&ut.current.focus())},St=()=>{const At=mt.current;if(At===null)return;if(!xt.hasFocus()||!at()||lt.current){lt.current=!1;return}if(At.contains(xt.activeElement)||rt&&xt.activeElement!==ct.current&&xt.activeElement!==ut.current)return;if(xt.activeElement!==dt.current)dt.current=null;else if(dt.current!==null)return;if(!pt.current)return;let Et=[];if((xt.activeElement===ct.current||xt.activeElement===ut.current)&&(Et=ot(mt.current)),Et.length>0){var $t,Dt;const jt=!!(($t=yt.current)!=null&&$t.shiftKey&&((Dt=yt.current)==null?void 0:Dt.key)==="Tab"),Pt=Et[0],Ct=Et[Et.length-1];typeof Pt!="string"&&typeof Ct!="string"&&(jt?Ct.focus():Pt.focus())}else At.focus()};xt.addEventListener("focusin",St),xt.addEventListener("keydown",kt,!0);const Tt=setInterval(()=>{xt.activeElement&&xt.activeElement.tagName==="BODY"&&St()},50);return()=>{clearInterval(Tt),xt.removeEventListener("focusin",St),xt.removeEventListener("keydown",kt,!0)}},[nt,rt,it,at,st,ot]);const bt=xt=>{ht.current===null&&(ht.current=xt.relatedTarget),pt.current=!0,dt.current=xt.target;const kt=et.props.onFocus;kt&&kt(xt)},vt=xt=>{ht.current===null&&(ht.current=xt.relatedTarget),pt.current=!0};return jsxRuntimeExports.jsxs(reactExports.Fragment,{children:[jsxRuntimeExports.jsx("div",{tabIndex:st?0:-1,onFocus:vt,ref:ct,"data-testid":"sentinelStart"}),reactExports.cloneElement(et,{ref:gt,onFocus:bt}),jsxRuntimeExports.jsx("div",{tabIndex:st?0:-1,onFocus:vt,ref:ut,"data-testid":"sentinelEnd"})]})}var top="top",bottom="bottom",right="right",left="left",auto="auto",basePlacements=[top,bottom,right,left],start$2="start",end="end",clippingParents="clippingParents",viewport="viewport",popper="popper",reference="reference",variationPlacements=basePlacements.reduce(function(tt,et){return tt.concat([et+"-"+start$2,et+"-"+end])},[]),placements=[].concat(basePlacements,[auto]).reduce(function(tt,et){return tt.concat([et,et+"-"+start$2,et+"-"+end])},[]),beforeRead="beforeRead",read="read",afterRead="afterRead",beforeMain="beforeMain",main$1="main",afterMain="afterMain",beforeWrite="beforeWrite",write="write",afterWrite="afterWrite",modifierPhases=[beforeRead,read,afterRead,beforeMain,main$1,afterMain,beforeWrite,write,afterWrite];function getNodeName(tt){return tt?(tt.nodeName||"").toLowerCase():null}function getWindow(tt){if(tt==null)return window;if(tt.toString()!=="[object Window]"){var et=tt.ownerDocument;return et&&et.defaultView||window}return tt}function isElement(tt){var et=getWindow(tt).Element;return tt instanceof et||tt instanceof Element}function isHTMLElement$1(tt){var et=getWindow(tt).HTMLElement;return tt instanceof et||tt instanceof HTMLElement}function isShadowRoot(tt){if(typeof ShadowRoot>"u")return!1;var et=getWindow(tt).ShadowRoot;return tt instanceof et||tt instanceof ShadowRoot}function applyStyles(tt){var et=tt.state;Object.keys(et.elements).forEach(function(nt){var rt=et.styles[nt]||{},it=et.attributes[nt]||{},ot=et.elements[nt];!isHTMLElement$1(ot)||!getNodeName(ot)||(Object.assign(ot.style,rt),Object.keys(it).forEach(function(at){var st=it[at];st===!1?ot.removeAttribute(at):ot.setAttribute(at,st===!0?"":st)}))})}function effect$2(tt){var et=tt.state,nt={popper:{position:et.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(et.elements.popper.style,nt.popper),et.styles=nt,et.elements.arrow&&Object.assign(et.elements.arrow.style,nt.arrow),function(){Object.keys(et.elements).forEach(function(rt){var it=et.elements[rt],ot=et.attributes[rt]||{},at=Object.keys(et.styles.hasOwnProperty(rt)?et.styles[rt]:nt[rt]),st=at.reduce(function(lt,ct){return lt[ct]="",lt},{});!isHTMLElement$1(it)||!getNodeName(it)||(Object.assign(it.style,st),Object.keys(ot).forEach(function(lt){it.removeAttribute(lt)}))})}}const applyStyles$1={name:"applyStyles",enabled:!0,phase:"write",fn:applyStyles,effect:effect$2,requires:["computeStyles"]};function getBasePlacement(tt){return tt.split("-")[0]}var max$4=Math.max,min$3=Math.min,round$2=Math.round;function getUAString(){var tt=navigator.userAgentData;return tt!=null&&tt.brands&&Array.isArray(tt.brands)?tt.brands.map(function(et){return et.brand+"/"+et.version}).join(" "):navigator.userAgent}function isLayoutViewport(){return!/^((?!chrome|android).)*safari/i.test(getUAString())}function getBoundingClientRect(tt,et,nt){et===void 0&&(et=!1),nt===void 0&&(nt=!1);var rt=tt.getBoundingClientRect(),it=1,ot=1;et&&isHTMLElement$1(tt)&&(it=tt.offsetWidth>0&&round$2(rt.width)/tt.offsetWidth||1,ot=tt.offsetHeight>0&&round$2(rt.height)/tt.offsetHeight||1);var at=isElement(tt)?getWindow(tt):window,st=at.visualViewport,lt=!isLayoutViewport()&&nt,ct=(rt.left+(lt&&st?st.offsetLeft:0))/it,ut=(rt.top+(lt&&st?st.offsetTop:0))/ot,ht=rt.width/it,dt=rt.height/ot;return{width:ht,height:dt,top:ut,right:ct+ht,bottom:ut+dt,left:ct,x:ct,y:ut}}function getLayoutRect(tt){var et=getBoundingClientRect(tt),nt=tt.offsetWidth,rt=tt.offsetHeight;return Math.abs(et.width-nt)<=1&&(nt=et.width),Math.abs(et.height-rt)<=1&&(rt=et.height),{x:tt.offsetLeft,y:tt.offsetTop,width:nt,height:rt}}function contains(tt,et){var nt=et.getRootNode&&et.getRootNode();if(tt.contains(et))return!0;if(nt&&isShadowRoot(nt)){var rt=et;do{if(rt&&tt.isSameNode(rt))return!0;rt=rt.parentNode||rt.host}while(rt)}return!1}function getComputedStyle$1(tt){return getWindow(tt).getComputedStyle(tt)}function isTableElement(tt){return["table","td","th"].indexOf(getNodeName(tt))>=0}function getDocumentElement(tt){return((isElement(tt)?tt.ownerDocument:tt.document)||window.document).documentElement}function getParentNode(tt){return getNodeName(tt)==="html"?tt:tt.assignedSlot||tt.parentNode||(isShadowRoot(tt)?tt.host:null)||getDocumentElement(tt)}function getTrueOffsetParent(tt){return!isHTMLElement$1(tt)||getComputedStyle$1(tt).position==="fixed"?null:tt.offsetParent}function getContainingBlock(tt){var et=/firefox/i.test(getUAString()),nt=/Trident/i.test(getUAString());if(nt&&isHTMLElement$1(tt)){var rt=getComputedStyle$1(tt);if(rt.position==="fixed")return null}var it=getParentNode(tt);for(isShadowRoot(it)&&(it=it.host);isHTMLElement$1(it)&&["html","body"].indexOf(getNodeName(it))<0;){var ot=getComputedStyle$1(it);if(ot.transform!=="none"||ot.perspective!=="none"||ot.contain==="paint"||["transform","perspective"].indexOf(ot.willChange)!==-1||et&&ot.willChange==="filter"||et&&ot.filter&&ot.filter!=="none")return it;it=it.parentNode}return null}function getOffsetParent(tt){for(var et=getWindow(tt),nt=getTrueOffsetParent(tt);nt&&isTableElement(nt)&&getComputedStyle$1(nt).position==="static";)nt=getTrueOffsetParent(nt);return nt&&(getNodeName(nt)==="html"||getNodeName(nt)==="body"&&getComputedStyle$1(nt).position==="static")?et:nt||getContainingBlock(tt)||et}function getMainAxisFromPlacement(tt){return["top","bottom"].indexOf(tt)>=0?"x":"y"}function within(tt,et,nt){return max$4(tt,min$3(et,nt))}function withinMaxClamp(tt,et,nt){var rt=within(tt,et,nt);return rt>nt?nt:rt}function getFreshSideObject(){return{top:0,right:0,bottom:0,left:0}}function mergePaddingObject(tt){return Object.assign({},getFreshSideObject(),tt)}function expandToHashMap(tt,et){return et.reduce(function(nt,rt){return nt[rt]=tt,nt},{})}var toPaddingObject=function(et,nt){return et=typeof et=="function"?et(Object.assign({},nt.rects,{placement:nt.placement})):et,mergePaddingObject(typeof et!="number"?et:expandToHashMap(et,basePlacements))};function arrow(tt){var et,nt=tt.state,rt=tt.name,it=tt.options,ot=nt.elements.arrow,at=nt.modifiersData.popperOffsets,st=getBasePlacement(nt.placement),lt=getMainAxisFromPlacement(st),ct=[left,right].indexOf(st)>=0,ut=ct?"height":"width";if(!(!ot||!at)){var ht=toPaddingObject(it.padding,nt),dt=getLayoutRect(ot),pt=lt==="y"?top:left,mt=lt==="y"?bottom:right,gt=nt.rects.reference[ut]+nt.rects.reference[lt]-at[lt]-nt.rects.popper[ut],yt=at[lt]-nt.rects.reference[lt],bt=getOffsetParent(ot),vt=bt?lt==="y"?bt.clientHeight||0:bt.clientWidth||0:0,xt=gt/2-yt/2,kt=ht[pt],St=vt-dt[ut]-ht[mt],Tt=vt/2-dt[ut]/2+xt,At=within(kt,Tt,St),Et=lt;nt.modifiersData[rt]=(et={},et[Et]=At,et.centerOffset=At-Tt,et)}}function effect$1(tt){var et=tt.state,nt=tt.options,rt=nt.element,it=rt===void 0?"[data-popper-arrow]":rt;it!=null&&(typeof it=="string"&&(it=et.elements.popper.querySelector(it),!it)||contains(et.elements.popper,it)&&(et.elements.arrow=it))}const arrow$1={name:"arrow",enabled:!0,phase:"main",fn:arrow,effect:effect$1,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function getVariation(tt){return tt.split("-")[1]}var unsetSides={top:"auto",right:"auto",bottom:"auto",left:"auto"};function roundOffsetsByDPR(tt,et){var nt=tt.x,rt=tt.y,it=et.devicePixelRatio||1;return{x:round$2(nt*it)/it||0,y:round$2(rt*it)/it||0}}function mapToStyles(tt){var et,nt=tt.popper,rt=tt.popperRect,it=tt.placement,ot=tt.variation,at=tt.offsets,st=tt.position,lt=tt.gpuAcceleration,ct=tt.adaptive,ut=tt.roundOffsets,ht=tt.isFixed,dt=at.x,pt=dt===void 0?0:dt,mt=at.y,gt=mt===void 0?0:mt,yt=typeof ut=="function"?ut({x:pt,y:gt}):{x:pt,y:gt};pt=yt.x,gt=yt.y;var bt=at.hasOwnProperty("x"),vt=at.hasOwnProperty("y"),xt=left,kt=top,St=window;if(ct){var Tt=getOffsetParent(nt),At="clientHeight",Et="clientWidth";if(Tt===getWindow(nt)&&(Tt=getDocumentElement(nt),getComputedStyle$1(Tt).position!=="static"&&st==="absolute"&&(At="scrollHeight",Et="scrollWidth")),Tt=Tt,it===top||(it===left||it===right)&&ot===end){kt=bottom;var $t=ht&&Tt===St&&St.visualViewport?St.visualViewport.height:Tt[At];gt-=$t-rt.height,gt*=lt?1:-1}if(it===left||(it===top||it===bottom)&&ot===end){xt=right;var Dt=ht&&Tt===St&&St.visualViewport?St.visualViewport.width:Tt[Et];pt-=Dt-rt.width,pt*=lt?1:-1}}var jt=Object.assign({position:st},ct&&unsetSides),Pt=ut===!0?roundOffsetsByDPR({x:pt,y:gt},getWindow(nt)):{x:pt,y:gt};if(pt=Pt.x,gt=Pt.y,lt){var Ct;return Object.assign({},jt,(Ct={},Ct[kt]=vt?"0":"",Ct[xt]=bt?"0":"",Ct.transform=(St.devicePixelRatio||1)<=1?"translate("+pt+"px, "+gt+"px)":"translate3d("+pt+"px, "+gt+"px, 0)",Ct))}return Object.assign({},jt,(et={},et[kt]=vt?gt+"px":"",et[xt]=bt?pt+"px":"",et.transform="",et))}function computeStyles(tt){var et=tt.state,nt=tt.options,rt=nt.gpuAcceleration,it=rt===void 0?!0:rt,ot=nt.adaptive,at=ot===void 0?!0:ot,st=nt.roundOffsets,lt=st===void 0?!0:st,ct={placement:getBasePlacement(et.placement),variation:getVariation(et.placement),popper:et.elements.popper,popperRect:et.rects.popper,gpuAcceleration:it,isFixed:et.options.strategy==="fixed"};et.modifiersData.popperOffsets!=null&&(et.styles.popper=Object.assign({},et.styles.popper,mapToStyles(Object.assign({},ct,{offsets:et.modifiersData.popperOffsets,position:et.options.strategy,adaptive:at,roundOffsets:lt})))),et.modifiersData.arrow!=null&&(et.styles.arrow=Object.assign({},et.styles.arrow,mapToStyles(Object.assign({},ct,{offsets:et.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:lt})))),et.attributes.popper=Object.assign({},et.attributes.popper,{"data-popper-placement":et.placement})}const computeStyles$1={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:computeStyles,data:{}};var passive={passive:!0};function effect(tt){var et=tt.state,nt=tt.instance,rt=tt.options,it=rt.scroll,ot=it===void 0?!0:it,at=rt.resize,st=at===void 0?!0:at,lt=getWindow(et.elements.popper),ct=[].concat(et.scrollParents.reference,et.scrollParents.popper);return ot&&ct.forEach(function(ut){ut.addEventListener("scroll",nt.update,passive)}),st&<.addEventListener("resize",nt.update,passive),function(){ot&&ct.forEach(function(ut){ut.removeEventListener("scroll",nt.update,passive)}),st&<.removeEventListener("resize",nt.update,passive)}}const eventListeners={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect,data:{}};var hash$6={left:"right",right:"left",bottom:"top",top:"bottom"};function getOppositePlacement(tt){return tt.replace(/left|right|bottom|top/g,function(et){return hash$6[et]})}var hash$5={start:"end",end:"start"};function getOppositeVariationPlacement(tt){return tt.replace(/start|end/g,function(et){return hash$5[et]})}function getWindowScroll(tt){var et=getWindow(tt),nt=et.pageXOffset,rt=et.pageYOffset;return{scrollLeft:nt,scrollTop:rt}}function getWindowScrollBarX(tt){return getBoundingClientRect(getDocumentElement(tt)).left+getWindowScroll(tt).scrollLeft}function getViewportRect(tt,et){var nt=getWindow(tt),rt=getDocumentElement(tt),it=nt.visualViewport,ot=rt.clientWidth,at=rt.clientHeight,st=0,lt=0;if(it){ot=it.width,at=it.height;var ct=isLayoutViewport();(ct||!ct&&et==="fixed")&&(st=it.offsetLeft,lt=it.offsetTop)}return{width:ot,height:at,x:st+getWindowScrollBarX(tt),y:lt}}function getDocumentRect(tt){var et,nt=getDocumentElement(tt),rt=getWindowScroll(tt),it=(et=tt.ownerDocument)==null?void 0:et.body,ot=max$4(nt.scrollWidth,nt.clientWidth,it?it.scrollWidth:0,it?it.clientWidth:0),at=max$4(nt.scrollHeight,nt.clientHeight,it?it.scrollHeight:0,it?it.clientHeight:0),st=-rt.scrollLeft+getWindowScrollBarX(tt),lt=-rt.scrollTop;return getComputedStyle$1(it||nt).direction==="rtl"&&(st+=max$4(nt.clientWidth,it?it.clientWidth:0)-ot),{width:ot,height:at,x:st,y:lt}}function isScrollParent(tt){var et=getComputedStyle$1(tt),nt=et.overflow,rt=et.overflowX,it=et.overflowY;return/auto|scroll|overlay|hidden/.test(nt+it+rt)}function getScrollParent(tt){return["html","body","#document"].indexOf(getNodeName(tt))>=0?tt.ownerDocument.body:isHTMLElement$1(tt)&&isScrollParent(tt)?tt:getScrollParent(getParentNode(tt))}function listScrollParents(tt,et){var nt;et===void 0&&(et=[]);var rt=getScrollParent(tt),it=rt===((nt=tt.ownerDocument)==null?void 0:nt.body),ot=getWindow(rt),at=it?[ot].concat(ot.visualViewport||[],isScrollParent(rt)?rt:[]):rt,st=et.concat(at);return it?st:st.concat(listScrollParents(getParentNode(at)))}function rectToClientRect(tt){return Object.assign({},tt,{left:tt.x,top:tt.y,right:tt.x+tt.width,bottom:tt.y+tt.height})}function getInnerBoundingClientRect(tt,et){var nt=getBoundingClientRect(tt,!1,et==="fixed");return nt.top=nt.top+tt.clientTop,nt.left=nt.left+tt.clientLeft,nt.bottom=nt.top+tt.clientHeight,nt.right=nt.left+tt.clientWidth,nt.width=tt.clientWidth,nt.height=tt.clientHeight,nt.x=nt.left,nt.y=nt.top,nt}function getClientRectFromMixedType(tt,et,nt){return et===viewport?rectToClientRect(getViewportRect(tt,nt)):isElement(et)?getInnerBoundingClientRect(et,nt):rectToClientRect(getDocumentRect(getDocumentElement(tt)))}function getClippingParents(tt){var et=listScrollParents(getParentNode(tt)),nt=["absolute","fixed"].indexOf(getComputedStyle$1(tt).position)>=0,rt=nt&&isHTMLElement$1(tt)?getOffsetParent(tt):tt;return isElement(rt)?et.filter(function(it){return isElement(it)&&contains(it,rt)&&getNodeName(it)!=="body"}):[]}function getClippingRect(tt,et,nt,rt){var it=et==="clippingParents"?getClippingParents(tt):[].concat(et),ot=[].concat(it,[nt]),at=ot[0],st=ot.reduce(function(lt,ct){var ut=getClientRectFromMixedType(tt,ct,rt);return lt.top=max$4(ut.top,lt.top),lt.right=min$3(ut.right,lt.right),lt.bottom=min$3(ut.bottom,lt.bottom),lt.left=max$4(ut.left,lt.left),lt},getClientRectFromMixedType(tt,at,rt));return st.width=st.right-st.left,st.height=st.bottom-st.top,st.x=st.left,st.y=st.top,st}function computeOffsets(tt){var et=tt.reference,nt=tt.element,rt=tt.placement,it=rt?getBasePlacement(rt):null,ot=rt?getVariation(rt):null,at=et.x+et.width/2-nt.width/2,st=et.y+et.height/2-nt.height/2,lt;switch(it){case top:lt={x:at,y:et.y-nt.height};break;case bottom:lt={x:at,y:et.y+et.height};break;case right:lt={x:et.x+et.width,y:st};break;case left:lt={x:et.x-nt.width,y:st};break;default:lt={x:et.x,y:et.y}}var ct=it?getMainAxisFromPlacement(it):null;if(ct!=null){var ut=ct==="y"?"height":"width";switch(ot){case start$2:lt[ct]=lt[ct]-(et[ut]/2-nt[ut]/2);break;case end:lt[ct]=lt[ct]+(et[ut]/2-nt[ut]/2);break}}return lt}function detectOverflow(tt,et){et===void 0&&(et={});var nt=et,rt=nt.placement,it=rt===void 0?tt.placement:rt,ot=nt.strategy,at=ot===void 0?tt.strategy:ot,st=nt.boundary,lt=st===void 0?clippingParents:st,ct=nt.rootBoundary,ut=ct===void 0?viewport:ct,ht=nt.elementContext,dt=ht===void 0?popper:ht,pt=nt.altBoundary,mt=pt===void 0?!1:pt,gt=nt.padding,yt=gt===void 0?0:gt,bt=mergePaddingObject(typeof yt!="number"?yt:expandToHashMap(yt,basePlacements)),vt=dt===popper?reference:popper,xt=tt.rects.popper,kt=tt.elements[mt?vt:dt],St=getClippingRect(isElement(kt)?kt:kt.contextElement||getDocumentElement(tt.elements.popper),lt,ut,at),Tt=getBoundingClientRect(tt.elements.reference),At=computeOffsets({reference:Tt,element:xt,strategy:"absolute",placement:it}),Et=rectToClientRect(Object.assign({},xt,At)),$t=dt===popper?Et:Tt,Dt={top:St.top-$t.top+bt.top,bottom:$t.bottom-St.bottom+bt.bottom,left:St.left-$t.left+bt.left,right:$t.right-St.right+bt.right},jt=tt.modifiersData.offset;if(dt===popper&&jt){var Pt=jt[it];Object.keys(Dt).forEach(function(Ct){var wt=[right,bottom].indexOf(Ct)>=0?1:-1,It=[top,bottom].indexOf(Ct)>=0?"y":"x";Dt[Ct]+=Pt[It]*wt})}return Dt}function computeAutoPlacement(tt,et){et===void 0&&(et={});var nt=et,rt=nt.placement,it=nt.boundary,ot=nt.rootBoundary,at=nt.padding,st=nt.flipVariations,lt=nt.allowedAutoPlacements,ct=lt===void 0?placements:lt,ut=getVariation(rt),ht=ut?st?variationPlacements:variationPlacements.filter(function(mt){return getVariation(mt)===ut}):basePlacements,dt=ht.filter(function(mt){return ct.indexOf(mt)>=0});dt.length===0&&(dt=ht);var pt=dt.reduce(function(mt,gt){return mt[gt]=detectOverflow(tt,{placement:gt,boundary:it,rootBoundary:ot,padding:at})[getBasePlacement(gt)],mt},{});return Object.keys(pt).sort(function(mt,gt){return pt[mt]-pt[gt]})}function getExpandedFallbackPlacements(tt){if(getBasePlacement(tt)===auto)return[];var et=getOppositePlacement(tt);return[getOppositeVariationPlacement(tt),et,getOppositeVariationPlacement(et)]}function flip(tt){var et=tt.state,nt=tt.options,rt=tt.name;if(!et.modifiersData[rt]._skip){for(var it=nt.mainAxis,ot=it===void 0?!0:it,at=nt.altAxis,st=at===void 0?!0:at,lt=nt.fallbackPlacements,ct=nt.padding,ut=nt.boundary,ht=nt.rootBoundary,dt=nt.altBoundary,pt=nt.flipVariations,mt=pt===void 0?!0:pt,gt=nt.allowedAutoPlacements,yt=et.options.placement,bt=getBasePlacement(yt),vt=bt===yt,xt=lt||(vt||!mt?[getOppositePlacement(yt)]:getExpandedFallbackPlacements(yt)),kt=[yt].concat(xt).reduce(function(en,sn){return en.concat(getBasePlacement(sn)===auto?computeAutoPlacement(et,{placement:sn,boundary:ut,rootBoundary:ht,padding:ct,flipVariations:mt,allowedAutoPlacements:gt}):sn)},[]),St=et.rects.reference,Tt=et.rects.popper,At=new Map,Et=!0,$t=kt[0],Dt=0;Dt=0,It=wt?"width":"height",Ot=detectOverflow(et,{placement:jt,boundary:ut,rootBoundary:ht,altBoundary:dt,padding:ct}),Wt=wt?Ct?right:left:Ct?bottom:top;St[It]>Tt[It]&&(Wt=getOppositePlacement(Wt));var zt=getOppositePlacement(Wt),Ft=[];if(ot&&Ft.push(Ot[Pt]<=0),st&&Ft.push(Ot[Wt]<=0,Ot[zt]<=0),Ft.every(function(en){return en})){$t=jt,Et=!1;break}At.set(jt,Ft)}if(Et)for(var Nt=mt?3:1,Ut=function(sn){var Kt=kt.find(function(rn){var nn=At.get(rn);if(nn)return nn.slice(0,sn).every(function(hn){return hn})});if(Kt)return $t=Kt,"break"},Mt=Nt;Mt>0;Mt--){var Ht=Ut(Mt);if(Ht==="break")break}et.placement!==$t&&(et.modifiersData[rt]._skip=!0,et.placement=$t,et.reset=!0)}}const flip$1={name:"flip",enabled:!0,phase:"main",fn:flip,requiresIfExists:["offset"],data:{_skip:!1}};function getSideOffsets(tt,et,nt){return nt===void 0&&(nt={x:0,y:0}),{top:tt.top-et.height-nt.y,right:tt.right-et.width+nt.x,bottom:tt.bottom-et.height+nt.y,left:tt.left-et.width-nt.x}}function isAnySideFullyClipped(tt){return[top,right,bottom,left].some(function(et){return tt[et]>=0})}function hide(tt){var et=tt.state,nt=tt.name,rt=et.rects.reference,it=et.rects.popper,ot=et.modifiersData.preventOverflow,at=detectOverflow(et,{elementContext:"reference"}),st=detectOverflow(et,{altBoundary:!0}),lt=getSideOffsets(at,rt),ct=getSideOffsets(st,it,ot),ut=isAnySideFullyClipped(lt),ht=isAnySideFullyClipped(ct);et.modifiersData[nt]={referenceClippingOffsets:lt,popperEscapeOffsets:ct,isReferenceHidden:ut,hasPopperEscaped:ht},et.attributes.popper=Object.assign({},et.attributes.popper,{"data-popper-reference-hidden":ut,"data-popper-escaped":ht})}const hide$1={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:hide};function distanceAndSkiddingToXY(tt,et,nt){var rt=getBasePlacement(tt),it=[left,top].indexOf(rt)>=0?-1:1,ot=typeof nt=="function"?nt(Object.assign({},et,{placement:tt})):nt,at=ot[0],st=ot[1];return at=at||0,st=(st||0)*it,[left,right].indexOf(rt)>=0?{x:st,y:at}:{x:at,y:st}}function offset$1(tt){var et=tt.state,nt=tt.options,rt=tt.name,it=nt.offset,ot=it===void 0?[0,0]:it,at=placements.reduce(function(ut,ht){return ut[ht]=distanceAndSkiddingToXY(ht,et.rects,ot),ut},{}),st=at[et.placement],lt=st.x,ct=st.y;et.modifiersData.popperOffsets!=null&&(et.modifiersData.popperOffsets.x+=lt,et.modifiersData.popperOffsets.y+=ct),et.modifiersData[rt]=at}const offset$2={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:offset$1};function popperOffsets(tt){var et=tt.state,nt=tt.name;et.modifiersData[nt]=computeOffsets({reference:et.rects.reference,element:et.rects.popper,strategy:"absolute",placement:et.placement})}const popperOffsets$1={name:"popperOffsets",enabled:!0,phase:"read",fn:popperOffsets,data:{}};function getAltAxis(tt){return tt==="x"?"y":"x"}function preventOverflow(tt){var et=tt.state,nt=tt.options,rt=tt.name,it=nt.mainAxis,ot=it===void 0?!0:it,at=nt.altAxis,st=at===void 0?!1:at,lt=nt.boundary,ct=nt.rootBoundary,ut=nt.altBoundary,ht=nt.padding,dt=nt.tether,pt=dt===void 0?!0:dt,mt=nt.tetherOffset,gt=mt===void 0?0:mt,yt=detectOverflow(et,{boundary:lt,rootBoundary:ct,padding:ht,altBoundary:ut}),bt=getBasePlacement(et.placement),vt=getVariation(et.placement),xt=!vt,kt=getMainAxisFromPlacement(bt),St=getAltAxis(kt),Tt=et.modifiersData.popperOffsets,At=et.rects.reference,Et=et.rects.popper,$t=typeof gt=="function"?gt(Object.assign({},et.rects,{placement:et.placement})):gt,Dt=typeof $t=="number"?{mainAxis:$t,altAxis:$t}:Object.assign({mainAxis:0,altAxis:0},$t),jt=et.modifiersData.offset?et.modifiersData.offset[et.placement]:null,Pt={x:0,y:0};if(Tt){if(ot){var Ct,wt=kt==="y"?top:left,It=kt==="y"?bottom:right,Ot=kt==="y"?"height":"width",Wt=Tt[kt],zt=Wt+yt[wt],Ft=Wt-yt[It],Nt=pt?-Et[Ot]/2:0,Ut=vt===start$2?At[Ot]:Et[Ot],Mt=vt===start$2?-Et[Ot]:-At[Ot],Ht=et.elements.arrow,en=pt&&Ht?getLayoutRect(Ht):{width:0,height:0},sn=et.modifiersData["arrow#persistent"]?et.modifiersData["arrow#persistent"].padding:getFreshSideObject(),Kt=sn[wt],rn=sn[It],nn=within(0,At[Ot],en[Ot]),hn=xt?At[Ot]/2-Nt-nn-Kt-Dt.mainAxis:Ut-nn-Kt-Dt.mainAxis,vn=xt?-At[Ot]/2+Nt+nn+rn+Dt.mainAxis:Mt+nn+rn+Dt.mainAxis,an=et.elements.arrow&&getOffsetParent(et.elements.arrow),Qt=an?kt==="y"?an.clientTop||0:an.clientLeft||0:0,_n=(Ct=jt==null?void 0:jt[kt])!=null?Ct:0,Pn=Wt+hn-_n-Qt,$n=Wt+vn-_n,Nn=within(pt?min$3(zt,Pn):zt,Wt,pt?max$4(Ft,$n):Ft);Tt[kt]=Nn,Pt[kt]=Nn-Wt}if(st){var Tn,cn=kt==="x"?top:left,mn=kt==="x"?bottom:right,In=Tt[St],An=St==="y"?"height":"width",wn=In+yt[cn],fn=In-yt[mn],pn=[top,left].indexOf(bt)!==-1,kn=(Tn=jt==null?void 0:jt[St])!=null?Tn:0,Dn=pn?wn:In-At[An]-Et[An]-kn+Dt.altAxis,un=pn?In+At[An]+Et[An]-kn-Dt.altAxis:fn,Zt=pt&&pn?withinMaxClamp(Dn,In,un):within(pt?Dn:wn,In,pt?un:fn);Tt[St]=Zt,Pt[St]=Zt-In}et.modifiersData[rt]=Pt}}const preventOverflow$1={name:"preventOverflow",enabled:!0,phase:"main",fn:preventOverflow,requiresIfExists:["offset"]};function getHTMLElementScroll(tt){return{scrollLeft:tt.scrollLeft,scrollTop:tt.scrollTop}}function getNodeScroll(tt){return tt===getWindow(tt)||!isHTMLElement$1(tt)?getWindowScroll(tt):getHTMLElementScroll(tt)}function isElementScaled(tt){var et=tt.getBoundingClientRect(),nt=round$2(et.width)/tt.offsetWidth||1,rt=round$2(et.height)/tt.offsetHeight||1;return nt!==1||rt!==1}function getCompositeRect(tt,et,nt){nt===void 0&&(nt=!1);var rt=isHTMLElement$1(et),it=isHTMLElement$1(et)&&isElementScaled(et),ot=getDocumentElement(et),at=getBoundingClientRect(tt,it,nt),st={scrollLeft:0,scrollTop:0},lt={x:0,y:0};return(rt||!rt&&!nt)&&((getNodeName(et)!=="body"||isScrollParent(ot))&&(st=getNodeScroll(et)),isHTMLElement$1(et)?(lt=getBoundingClientRect(et,!0),lt.x+=et.clientLeft,lt.y+=et.clientTop):ot&&(lt.x=getWindowScrollBarX(ot))),{x:at.left+st.scrollLeft-lt.x,y:at.top+st.scrollTop-lt.y,width:at.width,height:at.height}}function order(tt){var et=new Map,nt=new Set,rt=[];tt.forEach(function(ot){et.set(ot.name,ot)});function it(ot){nt.add(ot.name);var at=[].concat(ot.requires||[],ot.requiresIfExists||[]);at.forEach(function(st){if(!nt.has(st)){var lt=et.get(st);lt&&it(lt)}}),rt.push(ot)}return tt.forEach(function(ot){nt.has(ot.name)||it(ot)}),rt}function orderModifiers(tt){var et=order(tt);return modifierPhases.reduce(function(nt,rt){return nt.concat(et.filter(function(it){return it.phase===rt}))},[])}function debounce$4(tt){var et;return function(){return et||(et=new Promise(function(nt){Promise.resolve().then(function(){et=void 0,nt(tt())})})),et}}function mergeByName(tt){var et=tt.reduce(function(nt,rt){var it=nt[rt.name];return nt[rt.name]=it?Object.assign({},it,rt,{options:Object.assign({},it.options,rt.options),data:Object.assign({},it.data,rt.data)}):rt,nt},{});return Object.keys(et).map(function(nt){return et[nt]})}var DEFAULT_OPTIONS$k={placement:"bottom",modifiers:[],strategy:"absolute"};function areValidElements(){for(var tt=arguments.length,et=new Array(tt),nt=0;nt{ot||st(getContainer$1(it)||document.body)},[it,ot]),useEnhancedEffect$1(()=>{if(at&&!ot)return setRef(nt,at),()=>{setRef(nt,null)}},[nt,at,ot]),ot){if(reactExports.isValidElement(rt)){const ct={ref:lt};return reactExports.cloneElement(rt,ct)}return jsxRuntimeExports.jsx(reactExports.Fragment,{children:rt})}return jsxRuntimeExports.jsx(reactExports.Fragment,{children:at&&reactDomExports.createPortal(rt,at)})});function getPopperUtilityClass(tt){return generateUtilityClass("MuiPopper",tt)}generateUtilityClasses("MuiPopper",["root"]);const _excluded$1q=["anchorEl","children","direction","disablePortal","modifiers","open","placement","popperOptions","popperRef","slotProps","slots","TransitionProps","ownerState"],_excluded2$g=["anchorEl","children","container","direction","disablePortal","keepMounted","modifiers","open","placement","popperOptions","popperRef","style","transition","slotProps","slots"];function flipPlacement(tt,et){if(et==="ltr")return tt;switch(tt){case"bottom-end":return"bottom-start";case"bottom-start":return"bottom-end";case"top-end":return"top-start";case"top-start":return"top-end";default:return tt}}function resolveAnchorEl$1(tt){return typeof tt=="function"?tt():tt}function isHTMLElement(tt){return tt.nodeType!==void 0}const useUtilityClasses$R=()=>composeClasses({root:["root"]},useClassNamesOverride(getPopperUtilityClass)),defaultPopperOptions={},PopperTooltip=reactExports.forwardRef(function(et,nt){var rt;const{anchorEl:it,children:ot,direction:at,disablePortal:st,modifiers:lt,open:ct,placement:ut,popperOptions:ht,popperRef:dt,slotProps:pt={},slots:mt={},TransitionProps:gt}=et,yt=_objectWithoutPropertiesLoose$m(et,_excluded$1q),bt=reactExports.useRef(null),vt=useForkRef(bt,nt),xt=reactExports.useRef(null),kt=useForkRef(xt,dt),St=reactExports.useRef(kt);useEnhancedEffect$1(()=>{St.current=kt},[kt]),reactExports.useImperativeHandle(dt,()=>xt.current,[]);const Tt=flipPlacement(ut,at),[At,Et]=reactExports.useState(Tt),[$t,Dt]=reactExports.useState(resolveAnchorEl$1(it));reactExports.useEffect(()=>{xt.current&&xt.current.forceUpdate()}),reactExports.useEffect(()=>{it&&Dt(resolveAnchorEl$1(it))},[it]),useEnhancedEffect$1(()=>{if(!$t||!ct)return;const It=zt=>{Et(zt.placement)};let Ot=[{name:"preventOverflow",options:{altBoundary:st}},{name:"flip",options:{altBoundary:st}},{name:"onUpdate",enabled:!0,phase:"afterWrite",fn:({state:zt})=>{It(zt)}}];lt!=null&&(Ot=Ot.concat(lt)),ht&&ht.modifiers!=null&&(Ot=Ot.concat(ht.modifiers));const Wt=createPopper($t,bt.current,_extends$u({placement:Tt},ht,{modifiers:Ot}));return St.current(Wt),()=>{Wt.destroy(),St.current(null)}},[$t,st,lt,ct,ht,Tt]);const jt={placement:At};gt!==null&&(jt.TransitionProps=gt);const Pt=useUtilityClasses$R(),Ct=(rt=mt.root)!=null?rt:"div",wt=useSlotProps({elementType:Ct,externalSlotProps:pt.root,externalForwardedProps:yt,additionalProps:{role:"tooltip",ref:vt},ownerState:et,className:Pt.root});return jsxRuntimeExports.jsx(Ct,_extends$u({},wt,{children:typeof ot=="function"?ot(jt):ot}))}),Popper$1=reactExports.forwardRef(function(et,nt){const{anchorEl:rt,children:it,container:ot,direction:at="ltr",disablePortal:st=!1,keepMounted:lt=!1,modifiers:ct,open:ut,placement:ht="bottom",popperOptions:dt=defaultPopperOptions,popperRef:pt,style:mt,transition:gt=!1,slotProps:yt={},slots:bt={}}=et,vt=_objectWithoutPropertiesLoose$m(et,_excluded2$g),[xt,kt]=reactExports.useState(!0),St=()=>{kt(!1)},Tt=()=>{kt(!0)};if(!lt&&!ut&&(!gt||xt))return null;let At;if(ot)At=ot;else if(rt){const Dt=resolveAnchorEl$1(rt);At=Dt&&isHTMLElement(Dt)?ownerDocument(Dt).body:ownerDocument(null).body}const Et=!ut&<&&(!gt||xt)?"none":void 0,$t=gt?{in:ut,onEnter:St,onExited:Tt}:void 0;return jsxRuntimeExports.jsx(Portal$1,{disablePortal:st,container:At,children:jsxRuntimeExports.jsx(PopperTooltip,_extends$u({anchorEl:rt,direction:at,disablePortal:st,modifiers:ct,ref:nt,open:gt?!xt:ut,placement:ht,popperOptions:dt,popperRef:pt,slotProps:yt,slots:bt},vt,{style:_extends$u({position:"fixed",top:0,left:0,display:Et},mt),TransitionProps:$t,children:it}))})});function isOverflowing(tt){const et=ownerDocument(tt);return et.body===tt?ownerWindow(tt).innerWidth>et.documentElement.clientWidth:tt.scrollHeight>tt.clientHeight}function ariaHidden(tt,et){et?tt.setAttribute("aria-hidden","true"):tt.removeAttribute("aria-hidden")}function getPaddingRight(tt){return parseInt(ownerWindow(tt).getComputedStyle(tt).paddingRight,10)||0}function isAriaHiddenForbiddenOnElement(tt){const nt=["TEMPLATE","SCRIPT","STYLE","LINK","MAP","META","NOSCRIPT","PICTURE","COL","COLGROUP","PARAM","SLOT","SOURCE","TRACK"].indexOf(tt.tagName)!==-1,rt=tt.tagName==="INPUT"&&tt.getAttribute("type")==="hidden";return nt||rt}function ariaHiddenSiblings(tt,et,nt,rt,it){const ot=[et,nt,...rt];[].forEach.call(tt.children,at=>{const st=ot.indexOf(at)===-1,lt=!isAriaHiddenForbiddenOnElement(at);st&<&&ariaHidden(at,it)})}function findIndexOf(tt,et){let nt=-1;return tt.some((rt,it)=>et(rt)?(nt=it,!0):!1),nt}function handleContainer(tt,et){const nt=[],rt=tt.container;if(!et.disableScrollLock){if(isOverflowing(rt)){const at=getScrollbarSize(ownerDocument(rt));nt.push({value:rt.style.paddingRight,property:"padding-right",el:rt}),rt.style.paddingRight=`${getPaddingRight(rt)+at}px`;const st=ownerDocument(rt).querySelectorAll(".mui-fixed");[].forEach.call(st,lt=>{nt.push({value:lt.style.paddingRight,property:"padding-right",el:lt}),lt.style.paddingRight=`${getPaddingRight(lt)+at}px`})}let ot;if(rt.parentNode instanceof DocumentFragment)ot=ownerDocument(rt).body;else{const at=rt.parentElement,st=ownerWindow(rt);ot=(at==null?void 0:at.nodeName)==="HTML"&&st.getComputedStyle(at).overflowY==="scroll"?at:rt}nt.push({value:ot.style.overflow,property:"overflow",el:ot},{value:ot.style.overflowX,property:"overflow-x",el:ot},{value:ot.style.overflowY,property:"overflow-y",el:ot}),ot.style.overflow="hidden"}return()=>{nt.forEach(({value:ot,el:at,property:st})=>{ot?at.style.setProperty(st,ot):at.style.removeProperty(st)})}}function getHiddenSiblings(tt){const et=[];return[].forEach.call(tt.children,nt=>{nt.getAttribute("aria-hidden")==="true"&&et.push(nt)}),et}class ModalManager{constructor(){this.containers=void 0,this.modals=void 0,this.modals=[],this.containers=[]}add(et,nt){let rt=this.modals.indexOf(et);if(rt!==-1)return rt;rt=this.modals.length,this.modals.push(et),et.modalRef&&ariaHidden(et.modalRef,!1);const it=getHiddenSiblings(nt);ariaHiddenSiblings(nt,et.mount,et.modalRef,it,!0);const ot=findIndexOf(this.containers,at=>at.container===nt);return ot!==-1?(this.containers[ot].modals.push(et),rt):(this.containers.push({modals:[et],container:nt,restore:null,hiddenSiblings:it}),rt)}mount(et,nt){const rt=findIndexOf(this.containers,ot=>ot.modals.indexOf(et)!==-1),it=this.containers[rt];it.restore||(it.restore=handleContainer(it,nt))}remove(et,nt=!0){const rt=this.modals.indexOf(et);if(rt===-1)return rt;const it=findIndexOf(this.containers,at=>at.modals.indexOf(et)!==-1),ot=this.containers[it];if(ot.modals.splice(ot.modals.indexOf(et),1),this.modals.splice(rt,1),ot.modals.length===0)ot.restore&&ot.restore(),et.modalRef&&ariaHidden(et.modalRef,nt),ariaHiddenSiblings(ot.container,et.mount,et.modalRef,ot.hiddenSiblings,!1),this.containers.splice(it,1);else{const at=ot.modals[ot.modals.length-1];at.modalRef&&ariaHidden(at.modalRef,!1)}return rt}isTopModal(et){return this.modals.length>0&&this.modals[this.modals.length-1]===et}}function getContainer(tt){return typeof tt=="function"?tt():tt}function getHasTransition(tt){return tt?tt.props.hasOwnProperty("in"):!1}const defaultManager=new ModalManager;function useModal$1(tt){const{container:et,disableEscapeKeyDown:nt=!1,disableScrollLock:rt=!1,manager:it=defaultManager,closeAfterTransition:ot=!1,onTransitionEnter:at,onTransitionExited:st,children:lt,onClose:ct,open:ut,rootRef:ht}=tt,dt=reactExports.useRef({}),pt=reactExports.useRef(null),mt=reactExports.useRef(null),gt=useForkRef(mt,ht),[yt,bt]=reactExports.useState(!ut),vt=getHasTransition(lt);let xt=!0;(tt["aria-hidden"]==="false"||tt["aria-hidden"]===!1)&&(xt=!1);const kt=()=>ownerDocument(pt.current),St=()=>(dt.current.modalRef=mt.current,dt.current.mount=pt.current,dt.current),Tt=()=>{it.mount(St(),{disableScrollLock:rt}),mt.current&&(mt.current.scrollTop=0)},At=useEventCallback(()=>{const Ot=getContainer(et)||kt().body;it.add(St(),Ot),mt.current&&Tt()}),Et=reactExports.useCallback(()=>it.isTopModal(St()),[it]),$t=useEventCallback(Ot=>{pt.current=Ot,Ot&&(ut&&Et()?Tt():mt.current&&ariaHidden(mt.current,xt))}),Dt=reactExports.useCallback(()=>{it.remove(St(),xt)},[xt,it]);reactExports.useEffect(()=>()=>{Dt()},[Dt]),reactExports.useEffect(()=>{ut?At():(!vt||!ot)&&Dt()},[ut,Dt,vt,ot,At]);const jt=Ot=>Wt=>{var zt;(zt=Ot.onKeyDown)==null||zt.call(Ot,Wt),!(Wt.key!=="Escape"||!Et())&&(nt||(Wt.stopPropagation(),ct&&ct(Wt,"escapeKeyDown")))},Pt=Ot=>Wt=>{var zt;(zt=Ot.onClick)==null||zt.call(Ot,Wt),Wt.target===Wt.currentTarget&&ct&&ct(Wt,"backdropClick")};return{getRootProps:(Ot={})=>{const Wt=extractEventHandlers(tt);delete Wt.onTransitionEnter,delete Wt.onTransitionExited;const zt=_extends$u({},Wt,Ot);return _extends$u({role:"presentation"},zt,{onKeyDown:jt(zt),ref:gt})},getBackdropProps:(Ot={})=>{const Wt=Ot;return _extends$u({"aria-hidden":!0},Wt,{onClick:Pt(Wt),open:ut})},getTransitionProps:()=>{const Ot=()=>{bt(!1),at&&at()},Wt=()=>{bt(!0),st&&st(),ot&&Dt()};return{onEnter:createChainedFunction(Ot,lt==null?void 0:lt.props.onEnter),onExited:createChainedFunction(Wt,lt==null?void 0:lt.props.onExited)}},rootRef:gt,portalRef:$t,isTopModal:Et,exited:yt,hasTransition:vt}}const INTENTIONAL_DRAG_COUNT_THRESHOLD=2;function asc(tt,et){return tt-et}function clamp$6(tt,et,nt){return tt==null?et:Math.min(Math.max(et,tt),nt)}function findClosest(tt,et){var nt;const{index:rt}=(nt=tt.reduce((it,ot,at)=>{const st=Math.abs(et-ot);return it===null||st({left:`${tt}%`}),leap:tt=>({width:`${tt}%`})},"horizontal-reverse":{offset:tt=>({right:`${tt}%`}),leap:tt=>({width:`${tt}%`})},vertical:{offset:tt=>({bottom:`${tt}%`}),leap:tt=>({height:`${tt}%`})}},Identity$1=tt=>tt;let cachedSupportsTouchActionNone;function doesSupportTouchActionNone(){return cachedSupportsTouchActionNone===void 0&&(typeof CSS<"u"&&typeof CSS.supports=="function"?cachedSupportsTouchActionNone=CSS.supports("touch-action","none"):cachedSupportsTouchActionNone=!0),cachedSupportsTouchActionNone}function useSlider(tt){const{"aria-labelledby":et,defaultValue:nt,disabled:rt=!1,disableSwap:it=!1,isRtl:ot=!1,marks:at=!1,max:st=100,min:lt=0,name:ct,onChange:ut,onChangeCommitted:ht,orientation:dt="horizontal",rootRef:pt,scale:mt=Identity$1,step:gt=1,tabIndex:yt,value:bt}=tt,vt=reactExports.useRef(),[xt,kt]=reactExports.useState(-1),[St,Tt]=reactExports.useState(-1),[At,Et]=reactExports.useState(!1),$t=reactExports.useRef(0),[Dt,jt]=useControlled({controlled:bt,default:nt??lt,name:"Slider"}),Pt=ut&&((kn,Dn,un)=>{const Zt=kn.nativeEvent||kn,Xt=new Zt.constructor(Zt.type,Zt);Object.defineProperty(Xt,"target",{writable:!0,value:{value:Dn,name:ct}}),ut(Xt,Dn,un)}),Ct=Array.isArray(Dt);let wt=Ct?Dt.slice().sort(asc):[Dt];wt=wt.map(kn=>clamp$6(kn,lt,st));const It=at===!0&>!==null?[...Array(Math.floor((st-lt)/gt)+1)].map((kn,Dn)=>({value:lt+gt*Dn})):at||[],Ot=It.map(kn=>kn.value),{isFocusVisibleRef:Wt,onBlur:zt,onFocus:Ft,ref:Nt}=useIsFocusVisible(),[Ut,Mt]=reactExports.useState(-1),Ht=reactExports.useRef(),en=useForkRef(Nt,Ht),sn=useForkRef(pt,en),Kt=kn=>Dn=>{var un;const Zt=Number(Dn.currentTarget.getAttribute("data-index"));Ft(Dn),Wt.current===!0&&Mt(Zt),Tt(Zt),kn==null||(un=kn.onFocus)==null||un.call(kn,Dn)},rn=kn=>Dn=>{var un;zt(Dn),Wt.current===!1&&Mt(-1),Tt(-1),kn==null||(un=kn.onBlur)==null||un.call(kn,Dn)};useEnhancedEffect$1(()=>{if(rt&&Ht.current.contains(document.activeElement)){var kn;(kn=document.activeElement)==null||kn.blur()}},[rt]),rt&&xt!==-1&&kt(-1),rt&&Ut!==-1&&Mt(-1);const nn=kn=>Dn=>{var un;(un=kn.onChange)==null||un.call(kn,Dn);const Zt=Number(Dn.currentTarget.getAttribute("data-index")),Xt=wt[Zt],Sn=Ot.indexOf(Xt);let Rn=Dn.target.valueAsNumber;if(It&>==null){const jn=Ot[Ot.length-1];Rn>jn?Rn=jn:Rn{const{current:un}=Ht,{width:Zt,height:Xt,bottom:Sn,left:Rn}=un.getBoundingClientRect();let jn;vn.indexOf("vertical")===0?jn=(Sn-kn.y)/Xt:jn=(kn.x-Rn)/Zt,vn.indexOf("-reverse")!==-1&&(jn=1-jn);let On;if(On=percentToValue(jn,lt,st),gt)On=roundValueToStep(On,gt,lt);else{const Vn=findClosest(Ot,On);On=Ot[Vn]}On=clamp$6(On,lt,st);let Zn=0;if(Ct){Dn?Zn=hn.current:Zn=findClosest(wt,On),it&&(On=clamp$6(On,wt[Zn-1]||-1/0,wt[Zn+1]||1/0));const Vn=On;On=setValueIndex({values:wt,newValue:On,index:Zn}),it&&Dn||(Zn=On.indexOf(Vn),hn.current=Zn)}return{newValue:On,activeIndex:Zn}},Qt=useEventCallback(kn=>{const Dn=trackFinger(kn,vt);if(!Dn)return;if($t.current+=1,kn.type==="mousemove"&&kn.buttons===0){_n(kn);return}const{newValue:un,activeIndex:Zt}=an({finger:Dn,move:!0});focusThumb({sliderRef:Ht,activeIndex:Zt,setActive:kt}),jt(un),!At&&$t.current>INTENTIONAL_DRAG_COUNT_THRESHOLD&&Et(!0),Pt&&!areValuesEqual(un,Dt)&&Pt(kn,un,Zt)}),_n=useEventCallback(kn=>{const Dn=trackFinger(kn,vt);if(Et(!1),!Dn)return;const{newValue:un}=an({finger:Dn,move:!0});kt(-1),kn.type==="touchend"&&Tt(-1),ht&&ht(kn,un),vt.current=void 0,$n()}),Pn=useEventCallback(kn=>{if(rt)return;doesSupportTouchActionNone()||kn.preventDefault();const Dn=kn.changedTouches[0];Dn!=null&&(vt.current=Dn.identifier);const un=trackFinger(kn,vt);if(un!==!1){const{newValue:Xt,activeIndex:Sn}=an({finger:un});focusThumb({sliderRef:Ht,activeIndex:Sn,setActive:kt}),jt(Xt),Pt&&!areValuesEqual(Xt,Dt)&&Pt(kn,Xt,Sn)}$t.current=0;const Zt=ownerDocument(Ht.current);Zt.addEventListener("touchmove",Qt),Zt.addEventListener("touchend",_n)}),$n=reactExports.useCallback(()=>{const kn=ownerDocument(Ht.current);kn.removeEventListener("mousemove",Qt),kn.removeEventListener("mouseup",_n),kn.removeEventListener("touchmove",Qt),kn.removeEventListener("touchend",_n)},[_n,Qt]);reactExports.useEffect(()=>{const{current:kn}=Ht;return kn.addEventListener("touchstart",Pn,{passive:doesSupportTouchActionNone()}),()=>{kn.removeEventListener("touchstart",Pn,{passive:doesSupportTouchActionNone()}),$n()}},[$n,Pn]),reactExports.useEffect(()=>{rt&&$n()},[rt,$n]);const Nn=kn=>Dn=>{var un;if((un=kn.onMouseDown)==null||un.call(kn,Dn),rt||Dn.defaultPrevented||Dn.button!==0)return;Dn.preventDefault();const Zt=trackFinger(Dn,vt);if(Zt!==!1){const{newValue:Sn,activeIndex:Rn}=an({finger:Zt});focusThumb({sliderRef:Ht,activeIndex:Rn,setActive:kt}),jt(Sn),Pt&&!areValuesEqual(Sn,Dt)&&Pt(Dn,Sn,Rn)}$t.current=0;const Xt=ownerDocument(Ht.current);Xt.addEventListener("mousemove",Qt),Xt.addEventListener("mouseup",_n)},Tn=valueToPercent(Ct?wt[0]:lt,lt,st),cn=valueToPercent(wt[wt.length-1],lt,st)-Tn,mn=(kn={})=>{const Dn=extractEventHandlers(kn),un={onMouseDown:Nn(Dn||{})},Zt=_extends$u({},Dn,un);return _extends$u({},kn,{ref:sn},Zt)},In=kn=>Dn=>{var un;(un=kn.onMouseOver)==null||un.call(kn,Dn);const Zt=Number(Dn.currentTarget.getAttribute("data-index"));Tt(Zt)},An=kn=>Dn=>{var un;(un=kn.onMouseLeave)==null||un.call(kn,Dn),Tt(-1)};return{active:xt,axis:vn,axisProps,dragging:At,focusedThumbIndex:Ut,getHiddenInputProps:(kn={})=>{var Dn;const un=extractEventHandlers(kn),Zt={onChange:nn(un||{}),onFocus:Kt(un||{}),onBlur:rn(un||{})},Xt=_extends$u({},un,Zt);return _extends$u({tabIndex:yt,"aria-labelledby":et,"aria-orientation":dt,"aria-valuemax":mt(st),"aria-valuemin":mt(lt),name:ct,type:"range",min:tt.min,max:tt.max,step:tt.step===null&&tt.marks?"any":(Dn=tt.step)!=null?Dn:void 0,disabled:rt},kn,Xt,{style:_extends$u({},visuallyHidden$1,{direction:ot?"rtl":"ltr",width:"100%",height:"100%"})})},getRootProps:mn,getThumbProps:(kn={})=>{const Dn=extractEventHandlers(kn),un={onMouseOver:In(Dn||{}),onMouseLeave:An(Dn||{})};return _extends$u({},kn,Dn,un)},marks:It,open:St,range:Ct,rootRef:sn,trackLeap:cn,trackOffset:Tn,values:wt,getThumbStyle:kn=>({pointerEvents:xt!==-1&&xt!==kn?"none":void 0})}}const _excluded$1p=["onChange","maxRows","minRows","style","value"];function getStyleValue(tt){return parseInt(tt,10)||0}const styles$5={shadow:{visibility:"hidden",position:"absolute",overflow:"hidden",height:0,top:0,left:0,transform:"translateZ(0)"}};function isEmpty$1(tt){return tt==null||Object.keys(tt).length===0||tt.outerHeightStyle===0&&!tt.overflow}const TextareaAutosize=reactExports.forwardRef(function(et,nt){const{onChange:rt,maxRows:it,minRows:ot=1,style:at,value:st}=et,lt=_objectWithoutPropertiesLoose$m(et,_excluded$1p),{current:ct}=reactExports.useRef(st!=null),ut=reactExports.useRef(null),ht=useForkRef(nt,ut),dt=reactExports.useRef(null),pt=reactExports.useRef(0),[mt,gt]=reactExports.useState({outerHeightStyle:0}),yt=reactExports.useCallback(()=>{const kt=ut.current,Tt=ownerWindow(kt).getComputedStyle(kt);if(Tt.width==="0px")return{outerHeightStyle:0};const At=dt.current;At.style.width=Tt.width,At.value=kt.value||et.placeholder||"x",At.value.slice(-1)===` -`&&(At.value+=" ");const Et=Tt.boxSizing,$t=getStyleValue(Tt.paddingBottom)+getStyleValue(Tt.paddingTop),Dt=getStyleValue(Tt.borderBottomWidth)+getStyleValue(Tt.borderTopWidth),jt=At.scrollHeight;At.value="x";const Pt=At.scrollHeight;let Ct=jt;ot&&(Ct=Math.max(Number(ot)*Pt,Ct)),it&&(Ct=Math.min(Number(it)*Pt,Ct)),Ct=Math.max(Ct,Pt);const wt=Ct+(Et==="border-box"?$t+Dt:0),It=Math.abs(Ct-jt)<=1;return{outerHeightStyle:wt,overflow:It}},[it,ot,et.placeholder]),bt=(kt,St)=>{const{outerHeightStyle:Tt,overflow:At}=St;return pt.current<20&&(Tt>0&&Math.abs((kt.outerHeightStyle||0)-Tt)>1||kt.overflow!==At)?(pt.current+=1,{overflow:At,outerHeightStyle:Tt}):kt},vt=reactExports.useCallback(()=>{const kt=yt();isEmpty$1(kt)||gt(St=>bt(St,kt))},[yt]);useEnhancedEffect$1(()=>{const kt=()=>{const jt=yt();isEmpty$1(jt)||reactDomExports.flushSync(()=>{gt(Pt=>bt(Pt,jt))})},St=()=>{pt.current=0,kt()};let Tt;const At=debounce$5(St),Et=ut.current,$t=ownerWindow(Et);$t.addEventListener("resize",At);let Dt;return typeof ResizeObserver<"u"&&(Dt=new ResizeObserver(St),Dt.observe(Et)),()=>{At.clear(),cancelAnimationFrame(Tt),$t.removeEventListener("resize",At),Dt&&Dt.disconnect()}},[yt]),useEnhancedEffect$1(()=>{vt()}),reactExports.useEffect(()=>{pt.current=0},[st]);const xt=kt=>{pt.current=0,ct||vt(),rt&&rt(kt)};return jsxRuntimeExports.jsxs(reactExports.Fragment,{children:[jsxRuntimeExports.jsx("textarea",_extends$u({value:st,onChange:xt,ref:ht,rows:ot,style:_extends$u({height:mt.outerHeightStyle,overflow:mt.overflow?"hidden":void 0},at)},lt)),jsxRuntimeExports.jsx("textarea",{"aria-hidden":!0,className:et.className,readOnly:!0,ref:dt,tabIndex:-1,style:_extends$u({},styles$5.shadow,at,{paddingTop:0,paddingBottom:0})})]})}),_excluded$1o=["anchorEl","component","components","componentsProps","container","disablePortal","keepMounted","modifiers","open","placement","popperOptions","popperRef","transition","slots","slotProps"],PopperRoot=styled$1(Popper$1,{name:"MuiPopper",slot:"Root",overridesResolver:(tt,et)=>et.root})({}),Popper=reactExports.forwardRef(function(et,nt){var rt;const it=useTheme$3(),ot=useThemeProps({props:et,name:"MuiPopper"}),{anchorEl:at,component:st,components:lt,componentsProps:ct,container:ut,disablePortal:ht,keepMounted:dt,modifiers:pt,open:mt,placement:gt,popperOptions:yt,popperRef:bt,transition:vt,slots:xt,slotProps:kt}=ot,St=_objectWithoutPropertiesLoose$m(ot,_excluded$1o),Tt=(rt=xt==null?void 0:xt.root)!=null?rt:lt==null?void 0:lt.Root,At=_extends$u({anchorEl:at,container:ut,disablePortal:ht,keepMounted:dt,modifiers:pt,open:mt,placement:gt,popperOptions:yt,popperRef:bt,transition:vt},St);return jsxRuntimeExports.jsx(PopperRoot,_extends$u({as:st,direction:it==null?void 0:it.direction,slots:{root:Tt},slotProps:kt??ct},At,{ref:nt}))}),MuiPopper=Popper,CancelIcon=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"}),"Cancel");function getChipUtilityClass(tt){return generateUtilityClass("MuiChip",tt)}const chipClasses=generateUtilityClasses("MuiChip",["root","sizeSmall","sizeMedium","colorError","colorInfo","colorPrimary","colorSecondary","colorSuccess","colorWarning","disabled","clickable","clickableColorPrimary","clickableColorSecondary","deletable","deletableColorPrimary","deletableColorSecondary","outlined","filled","outlinedPrimary","outlinedSecondary","filledPrimary","filledSecondary","avatar","avatarSmall","avatarMedium","avatarColorPrimary","avatarColorSecondary","icon","iconSmall","iconMedium","iconColorPrimary","iconColorSecondary","label","labelSmall","labelMedium","deleteIcon","deleteIconSmall","deleteIconMedium","deleteIconColorPrimary","deleteIconColorSecondary","deleteIconOutlinedColorPrimary","deleteIconOutlinedColorSecondary","deleteIconFilledColorPrimary","deleteIconFilledColorSecondary","focusVisible"]),chipClasses$1=chipClasses,_excluded$1n=["avatar","className","clickable","color","component","deleteIcon","disabled","icon","label","onClick","onDelete","onKeyDown","onKeyUp","size","variant","tabIndex","skipFocusWhenDisabled"],useUtilityClasses$Q=tt=>{const{classes:et,disabled:nt,size:rt,color:it,iconColor:ot,onDelete:at,clickable:st,variant:lt}=tt,ct={root:["root",lt,nt&&"disabled",`size${capitalize(rt)}`,`color${capitalize(it)}`,st&&"clickable",st&&`clickableColor${capitalize(it)}`,at&&"deletable",at&&`deletableColor${capitalize(it)}`,`${lt}${capitalize(it)}`],label:["label",`label${capitalize(rt)}`],avatar:["avatar",`avatar${capitalize(rt)}`,`avatarColor${capitalize(it)}`],icon:["icon",`icon${capitalize(rt)}`,`iconColor${capitalize(ot)}`],deleteIcon:["deleteIcon",`deleteIcon${capitalize(rt)}`,`deleteIconColor${capitalize(it)}`,`deleteIcon${capitalize(lt)}Color${capitalize(it)}`]};return composeClasses(ct,getChipUtilityClass,et)},ChipRoot=styled$1("div",{name:"MuiChip",slot:"Root",overridesResolver:(tt,et)=>{const{ownerState:nt}=tt,{color:rt,iconColor:it,clickable:ot,onDelete:at,size:st,variant:lt}=nt;return[{[`& .${chipClasses$1.avatar}`]:et.avatar},{[`& .${chipClasses$1.avatar}`]:et[`avatar${capitalize(st)}`]},{[`& .${chipClasses$1.avatar}`]:et[`avatarColor${capitalize(rt)}`]},{[`& .${chipClasses$1.icon}`]:et.icon},{[`& .${chipClasses$1.icon}`]:et[`icon${capitalize(st)}`]},{[`& .${chipClasses$1.icon}`]:et[`iconColor${capitalize(it)}`]},{[`& .${chipClasses$1.deleteIcon}`]:et.deleteIcon},{[`& .${chipClasses$1.deleteIcon}`]:et[`deleteIcon${capitalize(st)}`]},{[`& .${chipClasses$1.deleteIcon}`]:et[`deleteIconColor${capitalize(rt)}`]},{[`& .${chipClasses$1.deleteIcon}`]:et[`deleteIcon${capitalize(lt)}Color${capitalize(rt)}`]},et.root,et[`size${capitalize(st)}`],et[`color${capitalize(rt)}`],ot&&et.clickable,ot&&rt!=="default"&&et[`clickableColor${capitalize(rt)})`],at&&et.deletable,at&&rt!=="default"&&et[`deletableColor${capitalize(rt)}`],et[lt],et[`${lt}${capitalize(rt)}`]]}})(({theme:tt,ownerState:et})=>{const nt=tt.palette.mode==="light"?tt.palette.grey[700]:tt.palette.grey[300];return _extends$u({maxWidth:"100%",fontFamily:tt.typography.fontFamily,fontSize:tt.typography.pxToRem(13),display:"inline-flex",alignItems:"center",justifyContent:"center",height:32,color:(tt.vars||tt).palette.text.primary,backgroundColor:(tt.vars||tt).palette.action.selected,borderRadius:32/2,whiteSpace:"nowrap",transition:tt.transitions.create(["background-color","box-shadow"]),cursor:"unset",outline:0,textDecoration:"none",border:0,padding:0,verticalAlign:"middle",boxSizing:"border-box",[`&.${chipClasses$1.disabled}`]:{opacity:(tt.vars||tt).palette.action.disabledOpacity,pointerEvents:"none"},[`& .${chipClasses$1.avatar}`]:{marginLeft:5,marginRight:-6,width:24,height:24,color:tt.vars?tt.vars.palette.Chip.defaultAvatarColor:nt,fontSize:tt.typography.pxToRem(12)},[`& .${chipClasses$1.avatarColorPrimary}`]:{color:(tt.vars||tt).palette.primary.contrastText,backgroundColor:(tt.vars||tt).palette.primary.dark},[`& .${chipClasses$1.avatarColorSecondary}`]:{color:(tt.vars||tt).palette.secondary.contrastText,backgroundColor:(tt.vars||tt).palette.secondary.dark},[`& .${chipClasses$1.avatarSmall}`]:{marginLeft:4,marginRight:-4,width:18,height:18,fontSize:tt.typography.pxToRem(10)},[`& .${chipClasses$1.icon}`]:_extends$u({marginLeft:5,marginRight:-6},et.size==="small"&&{fontSize:18,marginLeft:4,marginRight:-4},et.iconColor===et.color&&_extends$u({color:tt.vars?tt.vars.palette.Chip.defaultIconColor:nt},et.color!=="default"&&{color:"inherit"})),[`& .${chipClasses$1.deleteIcon}`]:_extends$u({WebkitTapHighlightColor:"transparent",color:tt.vars?`rgba(${tt.vars.palette.text.primaryChannel} / 0.26)`:alpha$1(tt.palette.text.primary,.26),fontSize:22,cursor:"pointer",margin:"0 5px 0 -6px","&:hover":{color:tt.vars?`rgba(${tt.vars.palette.text.primaryChannel} / 0.4)`:alpha$1(tt.palette.text.primary,.4)}},et.size==="small"&&{fontSize:16,marginRight:4,marginLeft:-4},et.color!=="default"&&{color:tt.vars?`rgba(${tt.vars.palette[et.color].contrastTextChannel} / 0.7)`:alpha$1(tt.palette[et.color].contrastText,.7),"&:hover, &:active":{color:(tt.vars||tt).palette[et.color].contrastText}})},et.size==="small"&&{height:24},et.color!=="default"&&{backgroundColor:(tt.vars||tt).palette[et.color].main,color:(tt.vars||tt).palette[et.color].contrastText},et.onDelete&&{[`&.${chipClasses$1.focusVisible}`]:{backgroundColor:tt.vars?`rgba(${tt.vars.palette.action.selectedChannel} / calc(${tt.vars.palette.action.selectedOpacity} + ${tt.vars.palette.action.focusOpacity}))`:alpha$1(tt.palette.action.selected,tt.palette.action.selectedOpacity+tt.palette.action.focusOpacity)}},et.onDelete&&et.color!=="default"&&{[`&.${chipClasses$1.focusVisible}`]:{backgroundColor:(tt.vars||tt).palette[et.color].dark}})},({theme:tt,ownerState:et})=>_extends$u({},et.clickable&&{userSelect:"none",WebkitTapHighlightColor:"transparent",cursor:"pointer","&:hover":{backgroundColor:tt.vars?`rgba(${tt.vars.palette.action.selectedChannel} / calc(${tt.vars.palette.action.selectedOpacity} + ${tt.vars.palette.action.hoverOpacity}))`:alpha$1(tt.palette.action.selected,tt.palette.action.selectedOpacity+tt.palette.action.hoverOpacity)},[`&.${chipClasses$1.focusVisible}`]:{backgroundColor:tt.vars?`rgba(${tt.vars.palette.action.selectedChannel} / calc(${tt.vars.palette.action.selectedOpacity} + ${tt.vars.palette.action.focusOpacity}))`:alpha$1(tt.palette.action.selected,tt.palette.action.selectedOpacity+tt.palette.action.focusOpacity)},"&:active":{boxShadow:(tt.vars||tt).shadows[1]}},et.clickable&&et.color!=="default"&&{[`&:hover, &.${chipClasses$1.focusVisible}`]:{backgroundColor:(tt.vars||tt).palette[et.color].dark}}),({theme:tt,ownerState:et})=>_extends$u({},et.variant==="outlined"&&{backgroundColor:"transparent",border:tt.vars?`1px solid ${tt.vars.palette.Chip.defaultBorder}`:`1px solid ${tt.palette.mode==="light"?tt.palette.grey[400]:tt.palette.grey[700]}`,[`&.${chipClasses$1.clickable}:hover`]:{backgroundColor:(tt.vars||tt).palette.action.hover},[`&.${chipClasses$1.focusVisible}`]:{backgroundColor:(tt.vars||tt).palette.action.focus},[`& .${chipClasses$1.avatar}`]:{marginLeft:4},[`& .${chipClasses$1.avatarSmall}`]:{marginLeft:2},[`& .${chipClasses$1.icon}`]:{marginLeft:4},[`& .${chipClasses$1.iconSmall}`]:{marginLeft:2},[`& .${chipClasses$1.deleteIcon}`]:{marginRight:5},[`& .${chipClasses$1.deleteIconSmall}`]:{marginRight:3}},et.variant==="outlined"&&et.color!=="default"&&{color:(tt.vars||tt).palette[et.color].main,border:`1px solid ${tt.vars?`rgba(${tt.vars.palette[et.color].mainChannel} / 0.7)`:alpha$1(tt.palette[et.color].main,.7)}`,[`&.${chipClasses$1.clickable}:hover`]:{backgroundColor:tt.vars?`rgba(${tt.vars.palette[et.color].mainChannel} / ${tt.vars.palette.action.hoverOpacity})`:alpha$1(tt.palette[et.color].main,tt.palette.action.hoverOpacity)},[`&.${chipClasses$1.focusVisible}`]:{backgroundColor:tt.vars?`rgba(${tt.vars.palette[et.color].mainChannel} / ${tt.vars.palette.action.focusOpacity})`:alpha$1(tt.palette[et.color].main,tt.palette.action.focusOpacity)},[`& .${chipClasses$1.deleteIcon}`]:{color:tt.vars?`rgba(${tt.vars.palette[et.color].mainChannel} / 0.7)`:alpha$1(tt.palette[et.color].main,.7),"&:hover, &:active":{color:(tt.vars||tt).palette[et.color].main}}})),ChipLabel=styled$1("span",{name:"MuiChip",slot:"Label",overridesResolver:(tt,et)=>{const{ownerState:nt}=tt,{size:rt}=nt;return[et.label,et[`label${capitalize(rt)}`]]}})(({ownerState:tt})=>_extends$u({overflow:"hidden",textOverflow:"ellipsis",paddingLeft:12,paddingRight:12,whiteSpace:"nowrap"},tt.variant==="outlined"&&{paddingLeft:11,paddingRight:11},tt.size==="small"&&{paddingLeft:8,paddingRight:8},tt.size==="small"&&tt.variant==="outlined"&&{paddingLeft:7,paddingRight:7}));function isDeleteKeyboardEvent(tt){return tt.key==="Backspace"||tt.key==="Delete"}const Chip=reactExports.forwardRef(function(et,nt){const rt=useThemeProps({props:et,name:"MuiChip"}),{avatar:it,className:ot,clickable:at,color:st="default",component:lt,deleteIcon:ct,disabled:ut=!1,icon:ht,label:dt,onClick:pt,onDelete:mt,onKeyDown:gt,onKeyUp:yt,size:bt="medium",variant:vt="filled",tabIndex:xt,skipFocusWhenDisabled:kt=!1}=rt,St=_objectWithoutPropertiesLoose$m(rt,_excluded$1n),Tt=reactExports.useRef(null),At=useForkRef(Tt,nt),Et=Ft=>{Ft.stopPropagation(),mt&&mt(Ft)},$t=Ft=>{Ft.currentTarget===Ft.target&&isDeleteKeyboardEvent(Ft)&&Ft.preventDefault(),gt&>(Ft)},Dt=Ft=>{Ft.currentTarget===Ft.target&&(mt&&isDeleteKeyboardEvent(Ft)?mt(Ft):Ft.key==="Escape"&&Tt.current&&Tt.current.blur()),yt&&yt(Ft)},jt=at!==!1&&pt?!0:at,Pt=jt||mt?ButtonBase$1:lt||"div",Ct=_extends$u({},rt,{component:Pt,disabled:ut,size:bt,color:st,iconColor:reactExports.isValidElement(ht)&&ht.props.color||st,onDelete:!!mt,clickable:jt,variant:vt}),wt=useUtilityClasses$Q(Ct),It=Pt===ButtonBase$1?_extends$u({component:lt||"div",focusVisibleClassName:wt.focusVisible},mt&&{disableRipple:!0}):{};let Ot=null;mt&&(Ot=ct&&reactExports.isValidElement(ct)?reactExports.cloneElement(ct,{className:clsx$3(ct.props.className,wt.deleteIcon),onClick:Et}):jsxRuntimeExports.jsx(CancelIcon,{className:clsx$3(wt.deleteIcon),onClick:Et}));let Wt=null;it&&reactExports.isValidElement(it)&&(Wt=reactExports.cloneElement(it,{className:clsx$3(wt.avatar,it.props.className)}));let zt=null;return ht&&reactExports.isValidElement(ht)&&(zt=reactExports.cloneElement(ht,{className:clsx$3(wt.icon,ht.props.className)})),jsxRuntimeExports.jsxs(ChipRoot,_extends$u({as:Pt,className:clsx$3(wt.root,ot),disabled:jt&&ut?!0:void 0,onClick:pt,onKeyDown:$t,onKeyUp:Dt,ref:At,tabIndex:kt&&ut?-1:xt,ownerState:Ct},It,St,{children:[Wt||zt,jsxRuntimeExports.jsx(ChipLabel,{className:clsx$3(wt.label),ownerState:Ct,children:dt}),Ot]}))}),Chip$1=Chip;function formControlState({props:tt,states:et,muiFormControl:nt}){return et.reduce((rt,it)=>(rt[it]=tt[it],nt&&typeof tt[it]>"u"&&(rt[it]=nt[it]),rt),{})}const FormControlContext=reactExports.createContext(void 0),FormControlContext$1=FormControlContext;function useFormControl(){return reactExports.useContext(FormControlContext$1)}function GlobalStyles(tt){return jsxRuntimeExports.jsx(GlobalStyles$1,_extends$u({},tt,{defaultTheme:defaultTheme$1,themeId:THEME_ID}))}function hasValue(tt){return tt!=null&&!(Array.isArray(tt)&&tt.length===0)}function isFilled(tt,et=!1){return tt&&(hasValue(tt.value)&&tt.value!==""||et&&hasValue(tt.defaultValue)&&tt.defaultValue!=="")}function isAdornedStart(tt){return tt.startAdornment}function getInputBaseUtilityClass(tt){return generateUtilityClass("MuiInputBase",tt)}const inputBaseClasses=generateUtilityClasses("MuiInputBase",["root","formControl","focused","disabled","adornedStart","adornedEnd","error","sizeSmall","multiline","colorSecondary","fullWidth","hiddenLabel","readOnly","input","inputSizeSmall","inputMultiline","inputTypeSearch","inputAdornedStart","inputAdornedEnd","inputHiddenLabel"]),inputBaseClasses$1=inputBaseClasses,_excluded$1m=["aria-describedby","autoComplete","autoFocus","className","color","components","componentsProps","defaultValue","disabled","disableInjectingGlobalStyles","endAdornment","error","fullWidth","id","inputComponent","inputProps","inputRef","margin","maxRows","minRows","multiline","name","onBlur","onChange","onClick","onFocus","onKeyDown","onKeyUp","placeholder","readOnly","renderSuffix","rows","size","slotProps","slots","startAdornment","type","value"],rootOverridesResolver=(tt,et)=>{const{ownerState:nt}=tt;return[et.root,nt.formControl&&et.formControl,nt.startAdornment&&et.adornedStart,nt.endAdornment&&et.adornedEnd,nt.error&&et.error,nt.size==="small"&&et.sizeSmall,nt.multiline&&et.multiline,nt.color&&et[`color${capitalize(nt.color)}`],nt.fullWidth&&et.fullWidth,nt.hiddenLabel&&et.hiddenLabel]},inputOverridesResolver=(tt,et)=>{const{ownerState:nt}=tt;return[et.input,nt.size==="small"&&et.inputSizeSmall,nt.multiline&&et.inputMultiline,nt.type==="search"&&et.inputTypeSearch,nt.startAdornment&&et.inputAdornedStart,nt.endAdornment&&et.inputAdornedEnd,nt.hiddenLabel&&et.inputHiddenLabel]},useUtilityClasses$P=tt=>{const{classes:et,color:nt,disabled:rt,error:it,endAdornment:ot,focused:at,formControl:st,fullWidth:lt,hiddenLabel:ct,multiline:ut,readOnly:ht,size:dt,startAdornment:pt,type:mt}=tt,gt={root:["root",`color${capitalize(nt)}`,rt&&"disabled",it&&"error",lt&&"fullWidth",at&&"focused",st&&"formControl",dt&&dt!=="medium"&&`size${capitalize(dt)}`,ut&&"multiline",pt&&"adornedStart",ot&&"adornedEnd",ct&&"hiddenLabel",ht&&"readOnly"],input:["input",rt&&"disabled",mt==="search"&&"inputTypeSearch",ut&&"inputMultiline",dt==="small"&&"inputSizeSmall",ct&&"inputHiddenLabel",pt&&"inputAdornedStart",ot&&"inputAdornedEnd",ht&&"readOnly"]};return composeClasses(gt,getInputBaseUtilityClass,et)},InputBaseRoot=styled$1("div",{name:"MuiInputBase",slot:"Root",overridesResolver:rootOverridesResolver})(({theme:tt,ownerState:et})=>_extends$u({},tt.typography.body1,{color:(tt.vars||tt).palette.text.primary,lineHeight:"1.4375em",boxSizing:"border-box",position:"relative",cursor:"text",display:"inline-flex",alignItems:"center",[`&.${inputBaseClasses$1.disabled}`]:{color:(tt.vars||tt).palette.text.disabled,cursor:"default"}},et.multiline&&_extends$u({padding:"4px 0 5px"},et.size==="small"&&{paddingTop:1}),et.fullWidth&&{width:"100%"})),InputBaseComponent=styled$1("input",{name:"MuiInputBase",slot:"Input",overridesResolver:inputOverridesResolver})(({theme:tt,ownerState:et})=>{const nt=tt.palette.mode==="light",rt=_extends$u({color:"currentColor"},tt.vars?{opacity:tt.vars.opacity.inputPlaceholder}:{opacity:nt?.42:.5},{transition:tt.transitions.create("opacity",{duration:tt.transitions.duration.shorter})}),it={opacity:"0 !important"},ot=tt.vars?{opacity:tt.vars.opacity.inputPlaceholder}:{opacity:nt?.42:.5};return _extends$u({font:"inherit",letterSpacing:"inherit",color:"currentColor",padding:"4px 0 5px",border:0,boxSizing:"content-box",background:"none",height:"1.4375em",margin:0,WebkitTapHighlightColor:"transparent",display:"block",minWidth:0,width:"100%",animationName:"mui-auto-fill-cancel",animationDuration:"10ms","&::-webkit-input-placeholder":rt,"&::-moz-placeholder":rt,"&:-ms-input-placeholder":rt,"&::-ms-input-placeholder":rt,"&:focus":{outline:0},"&:invalid":{boxShadow:"none"},"&::-webkit-search-decoration":{WebkitAppearance:"none"},[`label[data-shrink=false] + .${inputBaseClasses$1.formControl} &`]:{"&::-webkit-input-placeholder":it,"&::-moz-placeholder":it,"&:-ms-input-placeholder":it,"&::-ms-input-placeholder":it,"&:focus::-webkit-input-placeholder":ot,"&:focus::-moz-placeholder":ot,"&:focus:-ms-input-placeholder":ot,"&:focus::-ms-input-placeholder":ot},[`&.${inputBaseClasses$1.disabled}`]:{opacity:1,WebkitTextFillColor:(tt.vars||tt).palette.text.disabled},"&:-webkit-autofill":{animationDuration:"5000s",animationName:"mui-auto-fill"}},et.size==="small"&&{paddingTop:1},et.multiline&&{height:"auto",resize:"none",padding:0,paddingTop:0},et.type==="search"&&{MozAppearance:"textfield"})}),inputGlobalStyles=jsxRuntimeExports.jsx(GlobalStyles,{styles:{"@keyframes mui-auto-fill":{from:{display:"block"}},"@keyframes mui-auto-fill-cancel":{from:{display:"block"}}}}),InputBase=reactExports.forwardRef(function(et,nt){var rt;const it=useThemeProps({props:et,name:"MuiInputBase"}),{"aria-describedby":ot,autoComplete:at,autoFocus:st,className:lt,components:ct={},componentsProps:ut={},defaultValue:ht,disabled:dt,disableInjectingGlobalStyles:pt,endAdornment:mt,fullWidth:gt=!1,id:yt,inputComponent:bt="input",inputProps:vt={},inputRef:xt,maxRows:kt,minRows:St,multiline:Tt=!1,name:At,onBlur:Et,onChange:$t,onClick:Dt,onFocus:jt,onKeyDown:Pt,onKeyUp:Ct,placeholder:wt,readOnly:It,renderSuffix:Ot,rows:Wt,slotProps:zt={},slots:Ft={},startAdornment:Nt,type:Ut="text",value:Mt}=it,Ht=_objectWithoutPropertiesLoose$m(it,_excluded$1m),en=vt.value!=null?vt.value:Mt,{current:sn}=reactExports.useRef(en!=null),Kt=reactExports.useRef(),rn=reactExports.useCallback(Zt=>{},[]),nn=useForkRef(Kt,xt,vt.ref,rn),[hn,vn]=reactExports.useState(!1),an=useFormControl(),Qt=formControlState({props:it,muiFormControl:an,states:["color","disabled","error","hiddenLabel","size","required","filled"]});Qt.focused=an?an.focused:hn,reactExports.useEffect(()=>{!an&&dt&&hn&&(vn(!1),Et&&Et())},[an,dt,hn,Et]);const _n=an&&an.onFilled,Pn=an&&an.onEmpty,$n=reactExports.useCallback(Zt=>{isFilled(Zt)?_n&&_n():Pn&&Pn()},[_n,Pn]);useEnhancedEffect$1(()=>{sn&&$n({value:en})},[en,$n,sn]);const Nn=Zt=>{if(Qt.disabled){Zt.stopPropagation();return}jt&&jt(Zt),vt.onFocus&&vt.onFocus(Zt),an&&an.onFocus?an.onFocus(Zt):vn(!0)},Tn=Zt=>{Et&&Et(Zt),vt.onBlur&&vt.onBlur(Zt),an&&an.onBlur?an.onBlur(Zt):vn(!1)},cn=(Zt,...Xt)=>{if(!sn){const Sn=Zt.target||Kt.current;if(Sn==null)throw new Error(formatMuiErrorMessage(1));$n({value:Sn.value})}vt.onChange&&vt.onChange(Zt,...Xt),$t&&$t(Zt,...Xt)};reactExports.useEffect(()=>{$n(Kt.current)},[]);const mn=Zt=>{Kt.current&&Zt.currentTarget===Zt.target&&Kt.current.focus(),Dt&&Dt(Zt)};let In=bt,An=vt;Tt&&In==="input"&&(Wt?An=_extends$u({type:void 0,minRows:Wt,maxRows:Wt},An):An=_extends$u({type:void 0,maxRows:kt,minRows:St},An),In=TextareaAutosize);const wn=Zt=>{$n(Zt.animationName==="mui-auto-fill-cancel"?Kt.current:{value:"x"})};reactExports.useEffect(()=>{an&&an.setAdornedStart(!!Nt)},[an,Nt]);const fn=_extends$u({},it,{color:Qt.color||"primary",disabled:Qt.disabled,endAdornment:mt,error:Qt.error,focused:Qt.focused,formControl:an,fullWidth:gt,hiddenLabel:Qt.hiddenLabel,multiline:Tt,size:Qt.size,startAdornment:Nt,type:Ut}),pn=useUtilityClasses$P(fn),kn=Ft.root||ct.Root||InputBaseRoot,Dn=zt.root||ut.root||{},un=Ft.input||ct.Input||InputBaseComponent;return An=_extends$u({},An,(rt=zt.input)!=null?rt:ut.input),jsxRuntimeExports.jsxs(reactExports.Fragment,{children:[!pt&&inputGlobalStyles,jsxRuntimeExports.jsxs(kn,_extends$u({},Dn,!isHostComponent(kn)&&{ownerState:_extends$u({},fn,Dn.ownerState)},{ref:nt,onClick:mn},Ht,{className:clsx$3(pn.root,Dn.className,lt,It&&"MuiInputBase-readOnly"),children:[Nt,jsxRuntimeExports.jsx(FormControlContext$1.Provider,{value:null,children:jsxRuntimeExports.jsx(un,_extends$u({ownerState:fn,"aria-invalid":Qt.error,"aria-describedby":ot,autoComplete:at,autoFocus:st,defaultValue:ht,disabled:Qt.disabled,id:yt,onAnimationStart:wn,name:At,placeholder:wt,readOnly:It,required:Qt.required,rows:Wt,value:en,onKeyDown:Pt,onKeyUp:Ct,type:Ut},An,!isHostComponent(un)&&{as:In,ownerState:_extends$u({},fn,An.ownerState)},{ref:nn,className:clsx$3(pn.input,An.className,It&&"MuiInputBase-readOnly"),onBlur:Tn,onChange:cn,onFocus:Nn}))}),mt,Ot?Ot(_extends$u({},Qt,{startAdornment:Nt})):null]}))]})}),InputBase$1=InputBase;function getInputUtilityClass(tt){return generateUtilityClass("MuiInput",tt)}const inputClasses=_extends$u({},inputBaseClasses$1,generateUtilityClasses("MuiInput",["root","underline","input"])),inputClasses$1=inputClasses;function getOutlinedInputUtilityClass(tt){return generateUtilityClass("MuiOutlinedInput",tt)}const outlinedInputClasses=_extends$u({},inputBaseClasses$1,generateUtilityClasses("MuiOutlinedInput",["root","notchedOutline","input"])),outlinedInputClasses$1=outlinedInputClasses;function getFilledInputUtilityClass(tt){return generateUtilityClass("MuiFilledInput",tt)}const filledInputClasses=_extends$u({},inputBaseClasses$1,generateUtilityClasses("MuiFilledInput",["root","underline","input"])),filledInputClasses$1=filledInputClasses,ArrowDropDownIcon$1=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown"),_excluded$1l=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"],styles$4={entering:{opacity:1},entered:{opacity:1}},Fade=reactExports.forwardRef(function(et,nt){const rt=useTheme(),it={enter:rt.transitions.duration.enteringScreen,exit:rt.transitions.duration.leavingScreen},{addEndListener:ot,appear:at=!0,children:st,easing:lt,in:ct,onEnter:ut,onEntered:ht,onEntering:dt,onExit:pt,onExited:mt,onExiting:gt,style:yt,timeout:bt=it,TransitionComponent:vt=Transition$2}=et,xt=_objectWithoutPropertiesLoose$m(et,_excluded$1l),kt=reactExports.useRef(null),St=useForkRef(kt,st.ref,nt),Tt=wt=>It=>{if(wt){const Ot=kt.current;It===void 0?wt(Ot):wt(Ot,It)}},At=Tt(dt),Et=Tt((wt,It)=>{reflow(wt);const Ot=getTransitionProps({style:yt,timeout:bt,easing:lt},{mode:"enter"});wt.style.webkitTransition=rt.transitions.create("opacity",Ot),wt.style.transition=rt.transitions.create("opacity",Ot),ut&&ut(wt,It)}),$t=Tt(ht),Dt=Tt(gt),jt=Tt(wt=>{const It=getTransitionProps({style:yt,timeout:bt,easing:lt},{mode:"exit"});wt.style.webkitTransition=rt.transitions.create("opacity",It),wt.style.transition=rt.transitions.create("opacity",It),pt&&pt(wt)}),Pt=Tt(mt),Ct=wt=>{ot&&ot(kt.current,wt)};return jsxRuntimeExports.jsx(vt,_extends$u({appear:at,in:ct,nodeRef:kt,onEnter:Et,onEntered:$t,onEntering:At,onExit:jt,onExited:Pt,onExiting:Dt,addEndListener:Ct,timeout:bt},xt,{children:(wt,It)=>reactExports.cloneElement(st,_extends$u({style:_extends$u({opacity:0,visibility:wt==="exited"&&!ct?"hidden":void 0},styles$4[wt],yt,st.props.style),ref:St},It))}))}),Fade$1=Fade;function getBackdropUtilityClass(tt){return generateUtilityClass("MuiBackdrop",tt)}generateUtilityClasses("MuiBackdrop",["root","invisible"]);const _excluded$1k=["children","className","component","components","componentsProps","invisible","open","slotProps","slots","TransitionComponent","transitionDuration"],useUtilityClasses$O=tt=>{const{classes:et,invisible:nt}=tt;return composeClasses({root:["root",nt&&"invisible"]},getBackdropUtilityClass,et)},BackdropRoot=styled$1("div",{name:"MuiBackdrop",slot:"Root",overridesResolver:(tt,et)=>{const{ownerState:nt}=tt;return[et.root,nt.invisible&&et.invisible]}})(({ownerState:tt})=>_extends$u({position:"fixed",display:"flex",alignItems:"center",justifyContent:"center",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent"},tt.invisible&&{backgroundColor:"transparent"})),Backdrop=reactExports.forwardRef(function(et,nt){var rt,it,ot;const at=useThemeProps({props:et,name:"MuiBackdrop"}),{children:st,className:lt,component:ct="div",components:ut={},componentsProps:ht={},invisible:dt=!1,open:pt,slotProps:mt={},slots:gt={},TransitionComponent:yt=Fade$1,transitionDuration:bt}=at,vt=_objectWithoutPropertiesLoose$m(at,_excluded$1k),xt=_extends$u({},at,{component:ct,invisible:dt}),kt=useUtilityClasses$O(xt),St=(rt=mt.root)!=null?rt:ht.root;return jsxRuntimeExports.jsx(yt,_extends$u({in:pt,timeout:bt},vt,{children:jsxRuntimeExports.jsx(BackdropRoot,_extends$u({"aria-hidden":!0},St,{as:(it=(ot=gt.root)!=null?ot:ut.Root)!=null?it:ct,className:clsx$3(kt.root,lt,St==null?void 0:St.className),ownerState:_extends$u({},xt,St==null?void 0:St.ownerState),classes:kt,ref:nt,children:st}))}))}),Backdrop$1=Backdrop;function getButtonUtilityClass(tt){return generateUtilityClass("MuiButton",tt)}const buttonClasses=generateUtilityClasses("MuiButton",["root","text","textInherit","textPrimary","textSecondary","textSuccess","textError","textInfo","textWarning","outlined","outlinedInherit","outlinedPrimary","outlinedSecondary","outlinedSuccess","outlinedError","outlinedInfo","outlinedWarning","contained","containedInherit","containedPrimary","containedSecondary","containedSuccess","containedError","containedInfo","containedWarning","disableElevation","focusVisible","disabled","colorInherit","textSizeSmall","textSizeMedium","textSizeLarge","outlinedSizeSmall","outlinedSizeMedium","outlinedSizeLarge","containedSizeSmall","containedSizeMedium","containedSizeLarge","sizeMedium","sizeSmall","sizeLarge","fullWidth","startIcon","endIcon","iconSizeSmall","iconSizeMedium","iconSizeLarge"]),buttonClasses$1=buttonClasses,ButtonGroupContext=reactExports.createContext({}),ButtonGroupContext$1=ButtonGroupContext,ButtonGroupButtonContext=reactExports.createContext(void 0),ButtonGroupButtonContext$1=ButtonGroupButtonContext,_excluded$1j=["children","color","component","className","disabled","disableElevation","disableFocusRipple","endIcon","focusVisibleClassName","fullWidth","size","startIcon","type","variant"],useUtilityClasses$N=tt=>{const{color:et,disableElevation:nt,fullWidth:rt,size:it,variant:ot,classes:at}=tt,st={root:["root",ot,`${ot}${capitalize(et)}`,`size${capitalize(it)}`,`${ot}Size${capitalize(it)}`,et==="inherit"&&"colorInherit",nt&&"disableElevation",rt&&"fullWidth"],label:["label"],startIcon:["startIcon",`iconSize${capitalize(it)}`],endIcon:["endIcon",`iconSize${capitalize(it)}`]},lt=composeClasses(st,getButtonUtilityClass,at);return _extends$u({},at,lt)},commonIconStyles=tt=>_extends$u({},tt.size==="small"&&{"& > *:nth-of-type(1)":{fontSize:18}},tt.size==="medium"&&{"& > *:nth-of-type(1)":{fontSize:20}},tt.size==="large"&&{"& > *:nth-of-type(1)":{fontSize:22}}),ButtonRoot=styled$1(ButtonBase$1,{shouldForwardProp:tt=>rootShouldForwardProp(tt)||tt==="classes",name:"MuiButton",slot:"Root",overridesResolver:(tt,et)=>{const{ownerState:nt}=tt;return[et.root,et[nt.variant],et[`${nt.variant}${capitalize(nt.color)}`],et[`size${capitalize(nt.size)}`],et[`${nt.variant}Size${capitalize(nt.size)}`],nt.color==="inherit"&&et.colorInherit,nt.disableElevation&&et.disableElevation,nt.fullWidth&&et.fullWidth]}})(({theme:tt,ownerState:et})=>{var nt,rt;const it=tt.palette.mode==="light"?tt.palette.grey[300]:tt.palette.grey[800],ot=tt.palette.mode==="light"?tt.palette.grey.A100:tt.palette.grey[700];return _extends$u({},tt.typography.button,{minWidth:64,padding:"6px 16px",borderRadius:(tt.vars||tt).shape.borderRadius,transition:tt.transitions.create(["background-color","box-shadow","border-color","color"],{duration:tt.transitions.duration.short}),"&:hover":_extends$u({textDecoration:"none",backgroundColor:tt.vars?`rgba(${tt.vars.palette.text.primaryChannel} / ${tt.vars.palette.action.hoverOpacity})`:alpha$1(tt.palette.text.primary,tt.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},et.variant==="text"&&et.color!=="inherit"&&{backgroundColor:tt.vars?`rgba(${tt.vars.palette[et.color].mainChannel} / ${tt.vars.palette.action.hoverOpacity})`:alpha$1(tt.palette[et.color].main,tt.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},et.variant==="outlined"&&et.color!=="inherit"&&{border:`1px solid ${(tt.vars||tt).palette[et.color].main}`,backgroundColor:tt.vars?`rgba(${tt.vars.palette[et.color].mainChannel} / ${tt.vars.palette.action.hoverOpacity})`:alpha$1(tt.palette[et.color].main,tt.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},et.variant==="contained"&&{backgroundColor:tt.vars?tt.vars.palette.Button.inheritContainedHoverBg:ot,boxShadow:(tt.vars||tt).shadows[4],"@media (hover: none)":{boxShadow:(tt.vars||tt).shadows[2],backgroundColor:(tt.vars||tt).palette.grey[300]}},et.variant==="contained"&&et.color!=="inherit"&&{backgroundColor:(tt.vars||tt).palette[et.color].dark,"@media (hover: none)":{backgroundColor:(tt.vars||tt).palette[et.color].main}}),"&:active":_extends$u({},et.variant==="contained"&&{boxShadow:(tt.vars||tt).shadows[8]}),[`&.${buttonClasses$1.focusVisible}`]:_extends$u({},et.variant==="contained"&&{boxShadow:(tt.vars||tt).shadows[6]}),[`&.${buttonClasses$1.disabled}`]:_extends$u({color:(tt.vars||tt).palette.action.disabled},et.variant==="outlined"&&{border:`1px solid ${(tt.vars||tt).palette.action.disabledBackground}`},et.variant==="contained"&&{color:(tt.vars||tt).palette.action.disabled,boxShadow:(tt.vars||tt).shadows[0],backgroundColor:(tt.vars||tt).palette.action.disabledBackground})},et.variant==="text"&&{padding:"6px 8px"},et.variant==="text"&&et.color!=="inherit"&&{color:(tt.vars||tt).palette[et.color].main},et.variant==="outlined"&&{padding:"5px 15px",border:"1px solid currentColor"},et.variant==="outlined"&&et.color!=="inherit"&&{color:(tt.vars||tt).palette[et.color].main,border:tt.vars?`1px solid rgba(${tt.vars.palette[et.color].mainChannel} / 0.5)`:`1px solid ${alpha$1(tt.palette[et.color].main,.5)}`},et.variant==="contained"&&{color:tt.vars?tt.vars.palette.text.primary:(nt=(rt=tt.palette).getContrastText)==null?void 0:nt.call(rt,tt.palette.grey[300]),backgroundColor:tt.vars?tt.vars.palette.Button.inheritContainedBg:it,boxShadow:(tt.vars||tt).shadows[2]},et.variant==="contained"&&et.color!=="inherit"&&{color:(tt.vars||tt).palette[et.color].contrastText,backgroundColor:(tt.vars||tt).palette[et.color].main},et.color==="inherit"&&{color:"inherit",borderColor:"currentColor"},et.size==="small"&&et.variant==="text"&&{padding:"4px 5px",fontSize:tt.typography.pxToRem(13)},et.size==="large"&&et.variant==="text"&&{padding:"8px 11px",fontSize:tt.typography.pxToRem(15)},et.size==="small"&&et.variant==="outlined"&&{padding:"3px 9px",fontSize:tt.typography.pxToRem(13)},et.size==="large"&&et.variant==="outlined"&&{padding:"7px 21px",fontSize:tt.typography.pxToRem(15)},et.size==="small"&&et.variant==="contained"&&{padding:"4px 10px",fontSize:tt.typography.pxToRem(13)},et.size==="large"&&et.variant==="contained"&&{padding:"8px 22px",fontSize:tt.typography.pxToRem(15)},et.fullWidth&&{width:"100%"})},({ownerState:tt})=>tt.disableElevation&&{boxShadow:"none","&:hover":{boxShadow:"none"},[`&.${buttonClasses$1.focusVisible}`]:{boxShadow:"none"},"&:active":{boxShadow:"none"},[`&.${buttonClasses$1.disabled}`]:{boxShadow:"none"}}),ButtonStartIcon=styled$1("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:(tt,et)=>{const{ownerState:nt}=tt;return[et.startIcon,et[`iconSize${capitalize(nt.size)}`]]}})(({ownerState:tt})=>_extends$u({display:"inherit",marginRight:8,marginLeft:-4},tt.size==="small"&&{marginLeft:-2},commonIconStyles(tt))),ButtonEndIcon=styled$1("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:(tt,et)=>{const{ownerState:nt}=tt;return[et.endIcon,et[`iconSize${capitalize(nt.size)}`]]}})(({ownerState:tt})=>_extends$u({display:"inherit",marginRight:-4,marginLeft:8},tt.size==="small"&&{marginRight:-2},commonIconStyles(tt))),Button$1=reactExports.forwardRef(function(et,nt){const rt=reactExports.useContext(ButtonGroupContext$1),it=reactExports.useContext(ButtonGroupButtonContext$1),ot=resolveProps(rt,et),at=useThemeProps({props:ot,name:"MuiButton"}),{children:st,color:lt="primary",component:ct="button",className:ut,disabled:ht=!1,disableElevation:dt=!1,disableFocusRipple:pt=!1,endIcon:mt,focusVisibleClassName:gt,fullWidth:yt=!1,size:bt="medium",startIcon:vt,type:xt,variant:kt="text"}=at,St=_objectWithoutPropertiesLoose$m(at,_excluded$1j),Tt=_extends$u({},at,{color:lt,component:ct,disabled:ht,disableElevation:dt,disableFocusRipple:pt,fullWidth:yt,size:bt,type:xt,variant:kt}),At=useUtilityClasses$N(Tt),Et=vt&&jsxRuntimeExports.jsx(ButtonStartIcon,{className:At.startIcon,ownerState:Tt,children:vt}),$t=mt&&jsxRuntimeExports.jsx(ButtonEndIcon,{className:At.endIcon,ownerState:Tt,children:mt}),Dt=it||"";return jsxRuntimeExports.jsxs(ButtonRoot,_extends$u({ownerState:Tt,className:clsx$3(rt.className,At.root,ut,Dt),component:ct,disabled:ht,focusRipple:!pt,focusVisibleClassName:clsx$3(At.focusVisible,gt),ref:nt,type:xt},St,{classes:At,children:[Et,st,$t]}))}),Button$2=Button$1;function getModalUtilityClass(tt){return generateUtilityClass("MuiModal",tt)}generateUtilityClasses("MuiModal",["root","hidden","backdrop"]);const _excluded$1i=["BackdropComponent","BackdropProps","classes","className","closeAfterTransition","children","container","component","components","componentsProps","disableAutoFocus","disableEnforceFocus","disableEscapeKeyDown","disablePortal","disableRestoreFocus","disableScrollLock","hideBackdrop","keepMounted","onBackdropClick","onClose","onTransitionEnter","onTransitionExited","open","slotProps","slots","theme"],useUtilityClasses$M=tt=>{const{open:et,exited:nt,classes:rt}=tt;return composeClasses({root:["root",!et&&nt&&"hidden"],backdrop:["backdrop"]},getModalUtilityClass,rt)},ModalRoot=styled$1("div",{name:"MuiModal",slot:"Root",overridesResolver:(tt,et)=>{const{ownerState:nt}=tt;return[et.root,!nt.open&&nt.exited&&et.hidden]}})(({theme:tt,ownerState:et})=>_extends$u({position:"fixed",zIndex:(tt.vars||tt).zIndex.modal,right:0,bottom:0,top:0,left:0},!et.open&&et.exited&&{visibility:"hidden"})),ModalBackdrop=styled$1(Backdrop$1,{name:"MuiModal",slot:"Backdrop",overridesResolver:(tt,et)=>et.backdrop})({zIndex:-1}),Modal=reactExports.forwardRef(function(et,nt){var rt,it,ot,at,st,lt;const ct=useThemeProps({name:"MuiModal",props:et}),{BackdropComponent:ut=ModalBackdrop,BackdropProps:ht,className:dt,closeAfterTransition:pt=!1,children:mt,container:gt,component:yt,components:bt={},componentsProps:vt={},disableAutoFocus:xt=!1,disableEnforceFocus:kt=!1,disableEscapeKeyDown:St=!1,disablePortal:Tt=!1,disableRestoreFocus:At=!1,disableScrollLock:Et=!1,hideBackdrop:$t=!1,keepMounted:Dt=!1,onBackdropClick:jt,open:Pt,slotProps:Ct,slots:wt}=ct,It=_objectWithoutPropertiesLoose$m(ct,_excluded$1i),Ot=_extends$u({},ct,{closeAfterTransition:pt,disableAutoFocus:xt,disableEnforceFocus:kt,disableEscapeKeyDown:St,disablePortal:Tt,disableRestoreFocus:At,disableScrollLock:Et,hideBackdrop:$t,keepMounted:Dt}),{getRootProps:Wt,getBackdropProps:zt,getTransitionProps:Ft,portalRef:Nt,isTopModal:Ut,exited:Mt,hasTransition:Ht}=useModal$1(_extends$u({},Ot,{rootRef:nt})),en=_extends$u({},Ot,{exited:Mt}),sn=useUtilityClasses$M(en),Kt={};if(mt.props.tabIndex===void 0&&(Kt.tabIndex="-1"),Ht){const{onEnter:_n,onExited:Pn}=Ft();Kt.onEnter=_n,Kt.onExited=Pn}const rn=(rt=(it=wt==null?void 0:wt.root)!=null?it:bt.Root)!=null?rt:ModalRoot,nn=(ot=(at=wt==null?void 0:wt.backdrop)!=null?at:bt.Backdrop)!=null?ot:ut,hn=(st=Ct==null?void 0:Ct.root)!=null?st:vt.root,vn=(lt=Ct==null?void 0:Ct.backdrop)!=null?lt:vt.backdrop,an=useSlotProps({elementType:rn,externalSlotProps:hn,externalForwardedProps:It,getSlotProps:Wt,additionalProps:{ref:nt,as:yt},ownerState:en,className:clsx$3(dt,hn==null?void 0:hn.className,sn==null?void 0:sn.root,!en.open&&en.exited&&(sn==null?void 0:sn.hidden))}),Qt=useSlotProps({elementType:nn,externalSlotProps:vn,additionalProps:ht,getSlotProps:_n=>zt(_extends$u({},_n,{onClick:Pn=>{jt&&jt(Pn),_n!=null&&_n.onClick&&_n.onClick(Pn)}})),className:clsx$3(vn==null?void 0:vn.className,ht==null?void 0:ht.className,sn==null?void 0:sn.backdrop),ownerState:en});return!Dt&&!Pt&&(!Ht||Mt)?null:jsxRuntimeExports.jsx(Portal$1,{ref:Nt,container:gt,disablePortal:Tt,children:jsxRuntimeExports.jsxs(rn,_extends$u({},an,{children:[!$t&&ut?jsxRuntimeExports.jsx(nn,_extends$u({},Qt)):null,jsxRuntimeExports.jsx(FocusTrap,{disableEnforceFocus:kt,disableAutoFocus:xt,disableRestoreFocus:At,isEnabled:Ut,open:Pt,children:reactExports.cloneElement(mt,Kt)})]}))})}),Modal$1=Modal;function getDialogUtilityClass(tt){return generateUtilityClass("MuiDialog",tt)}const dialogClasses=generateUtilityClasses("MuiDialog",["root","scrollPaper","scrollBody","container","paper","paperScrollPaper","paperScrollBody","paperWidthFalse","paperWidthXs","paperWidthSm","paperWidthMd","paperWidthLg","paperWidthXl","paperFullWidth","paperFullScreen"]),dialogClasses$1=dialogClasses,DialogContext=reactExports.createContext({}),DialogContext$1=DialogContext,_excluded$1h=["aria-describedby","aria-labelledby","BackdropComponent","BackdropProps","children","className","disableEscapeKeyDown","fullScreen","fullWidth","maxWidth","onBackdropClick","onClose","open","PaperComponent","PaperProps","scroll","TransitionComponent","transitionDuration","TransitionProps"],DialogBackdrop=styled$1(Backdrop$1,{name:"MuiDialog",slot:"Backdrop",overrides:(tt,et)=>et.backdrop})({zIndex:-1}),useUtilityClasses$L=tt=>{const{classes:et,scroll:nt,maxWidth:rt,fullWidth:it,fullScreen:ot}=tt,at={root:["root"],container:["container",`scroll${capitalize(nt)}`],paper:["paper",`paperScroll${capitalize(nt)}`,`paperWidth${capitalize(String(rt))}`,it&&"paperFullWidth",ot&&"paperFullScreen"]};return composeClasses(at,getDialogUtilityClass,et)},DialogRoot=styled$1(Modal$1,{name:"MuiDialog",slot:"Root",overridesResolver:(tt,et)=>et.root})({"@media print":{position:"absolute !important"}}),DialogContainer=styled$1("div",{name:"MuiDialog",slot:"Container",overridesResolver:(tt,et)=>{const{ownerState:nt}=tt;return[et.container,et[`scroll${capitalize(nt.scroll)}`]]}})(({ownerState:tt})=>_extends$u({height:"100%","@media print":{height:"auto"},outline:0},tt.scroll==="paper"&&{display:"flex",justifyContent:"center",alignItems:"center"},tt.scroll==="body"&&{overflowY:"auto",overflowX:"hidden",textAlign:"center","&:after":{content:'""',display:"inline-block",verticalAlign:"middle",height:"100%",width:"0"}})),DialogPaper=styled$1(Paper$1,{name:"MuiDialog",slot:"Paper",overridesResolver:(tt,et)=>{const{ownerState:nt}=tt;return[et.paper,et[`scrollPaper${capitalize(nt.scroll)}`],et[`paperWidth${capitalize(String(nt.maxWidth))}`],nt.fullWidth&&et.paperFullWidth,nt.fullScreen&&et.paperFullScreen]}})(({theme:tt,ownerState:et})=>_extends$u({margin:32,position:"relative",overflowY:"auto","@media print":{overflowY:"visible",boxShadow:"none"}},et.scroll==="paper"&&{display:"flex",flexDirection:"column",maxHeight:"calc(100% - 64px)"},et.scroll==="body"&&{display:"inline-block",verticalAlign:"middle",textAlign:"left"},!et.maxWidth&&{maxWidth:"calc(100% - 64px)"},et.maxWidth==="xs"&&{maxWidth:tt.breakpoints.unit==="px"?Math.max(tt.breakpoints.values.xs,444):`max(${tt.breakpoints.values.xs}${tt.breakpoints.unit}, 444px)`,[`&.${dialogClasses$1.paperScrollBody}`]:{[tt.breakpoints.down(Math.max(tt.breakpoints.values.xs,444)+32*2)]:{maxWidth:"calc(100% - 64px)"}}},et.maxWidth&&et.maxWidth!=="xs"&&{maxWidth:`${tt.breakpoints.values[et.maxWidth]}${tt.breakpoints.unit}`,[`&.${dialogClasses$1.paperScrollBody}`]:{[tt.breakpoints.down(tt.breakpoints.values[et.maxWidth]+32*2)]:{maxWidth:"calc(100% - 64px)"}}},et.fullWidth&&{width:"calc(100% - 64px)"},et.fullScreen&&{margin:0,width:"100%",maxWidth:"100%",height:"100%",maxHeight:"none",borderRadius:0,[`&.${dialogClasses$1.paperScrollBody}`]:{margin:0,maxWidth:"100%"}})),Dialog=reactExports.forwardRef(function(et,nt){const rt=useThemeProps({props:et,name:"MuiDialog"}),it=useTheme(),ot={enter:it.transitions.duration.enteringScreen,exit:it.transitions.duration.leavingScreen},{"aria-describedby":at,"aria-labelledby":st,BackdropComponent:lt,BackdropProps:ct,children:ut,className:ht,disableEscapeKeyDown:dt=!1,fullScreen:pt=!1,fullWidth:mt=!1,maxWidth:gt="sm",onBackdropClick:yt,onClose:bt,open:vt,PaperComponent:xt=Paper$1,PaperProps:kt={},scroll:St="paper",TransitionComponent:Tt=Fade$1,transitionDuration:At=ot,TransitionProps:Et}=rt,$t=_objectWithoutPropertiesLoose$m(rt,_excluded$1h),Dt=_extends$u({},rt,{disableEscapeKeyDown:dt,fullScreen:pt,fullWidth:mt,maxWidth:gt,scroll:St}),jt=useUtilityClasses$L(Dt),Pt=reactExports.useRef(),Ct=Wt=>{Pt.current=Wt.target===Wt.currentTarget},wt=Wt=>{Pt.current&&(Pt.current=null,yt&&yt(Wt),bt&&bt(Wt,"backdropClick"))},It=useId(st),Ot=reactExports.useMemo(()=>({titleId:It}),[It]);return jsxRuntimeExports.jsx(DialogRoot,_extends$u({className:clsx$3(jt.root,ht),closeAfterTransition:!0,components:{Backdrop:DialogBackdrop},componentsProps:{backdrop:_extends$u({transitionDuration:At,as:lt},ct)},disableEscapeKeyDown:dt,onClose:bt,open:vt,ref:nt,onClick:wt,ownerState:Dt},$t,{children:jsxRuntimeExports.jsx(Tt,_extends$u({appear:!0,in:vt,timeout:At,role:"presentation"},Et,{children:jsxRuntimeExports.jsx(DialogContainer,{className:clsx$3(jt.container),onMouseDown:Ct,ownerState:Dt,children:jsxRuntimeExports.jsx(DialogPaper,_extends$u({as:xt,elevation:24,role:"dialog","aria-describedby":at,"aria-labelledby":It},kt,{className:clsx$3(jt.paper,kt.className),ownerState:Dt,children:jsxRuntimeExports.jsx(DialogContext$1.Provider,{value:Ot,children:ut})}))})}))}))}),MuiDialog=Dialog;function getDialogActionsUtilityClass(tt){return generateUtilityClass("MuiDialogActions",tt)}generateUtilityClasses("MuiDialogActions",["root","spacing"]);const _excluded$1g=["className","disableSpacing"],useUtilityClasses$K=tt=>{const{classes:et,disableSpacing:nt}=tt;return composeClasses({root:["root",!nt&&"spacing"]},getDialogActionsUtilityClass,et)},DialogActionsRoot=styled$1("div",{name:"MuiDialogActions",slot:"Root",overridesResolver:(tt,et)=>{const{ownerState:nt}=tt;return[et.root,!nt.disableSpacing&&et.spacing]}})(({ownerState:tt})=>_extends$u({display:"flex",alignItems:"center",padding:8,justifyContent:"flex-end",flex:"0 0 auto"},!tt.disableSpacing&&{"& > :not(style) ~ :not(style)":{marginLeft:8}})),DialogActions=reactExports.forwardRef(function(et,nt){const rt=useThemeProps({props:et,name:"MuiDialogActions"}),{className:it,disableSpacing:ot=!1}=rt,at=_objectWithoutPropertiesLoose$m(rt,_excluded$1g),st=_extends$u({},rt,{disableSpacing:ot}),lt=useUtilityClasses$K(st);return jsxRuntimeExports.jsx(DialogActionsRoot,_extends$u({className:clsx$3(lt.root,it),ownerState:st,ref:nt},at))}),DialogActions$1=DialogActions;function getDialogContentUtilityClass(tt){return generateUtilityClass("MuiDialogContent",tt)}generateUtilityClasses("MuiDialogContent",["root","dividers"]);const dialogTitleClasses=generateUtilityClasses("MuiDialogTitle",["root"]),dialogTitleClasses$1=dialogTitleClasses,_excluded$1f=["className","dividers"],useUtilityClasses$J=tt=>{const{classes:et,dividers:nt}=tt;return composeClasses({root:["root",nt&&"dividers"]},getDialogContentUtilityClass,et)},DialogContentRoot=styled$1("div",{name:"MuiDialogContent",slot:"Root",overridesResolver:(tt,et)=>{const{ownerState:nt}=tt;return[et.root,nt.dividers&&et.dividers]}})(({theme:tt,ownerState:et})=>_extends$u({flex:"1 1 auto",WebkitOverflowScrolling:"touch",overflowY:"auto",padding:"20px 24px"},et.dividers?{padding:"16px 24px",borderTop:`1px solid ${(tt.vars||tt).palette.divider}`,borderBottom:`1px solid ${(tt.vars||tt).palette.divider}`}:{[`.${dialogTitleClasses$1.root} + &`]:{paddingTop:0}})),DialogContent=reactExports.forwardRef(function(et,nt){const rt=useThemeProps({props:et,name:"MuiDialogContent"}),{className:it,dividers:ot=!1}=rt,at=_objectWithoutPropertiesLoose$m(rt,_excluded$1f),st=_extends$u({},rt,{dividers:ot}),lt=useUtilityClasses$J(st);return jsxRuntimeExports.jsx(DialogContentRoot,_extends$u({className:clsx$3(lt.root,it),ownerState:st,ref:nt},at))}),DialogContent$1=DialogContent;function getDividerUtilityClass(tt){return generateUtilityClass("MuiDivider",tt)}const dividerClasses=generateUtilityClasses("MuiDivider",["root","absolute","fullWidth","inset","middle","flexItem","light","vertical","withChildren","withChildrenVertical","textAlignRight","textAlignLeft","wrapper","wrapperVertical"]),_excluded$1e=["absolute","children","className","component","flexItem","light","orientation","role","textAlign","variant"],useUtilityClasses$I=tt=>{const{absolute:et,children:nt,classes:rt,flexItem:it,light:ot,orientation:at,textAlign:st,variant:lt}=tt;return composeClasses({root:["root",et&&"absolute",lt,ot&&"light",at==="vertical"&&"vertical",it&&"flexItem",nt&&"withChildren",nt&&at==="vertical"&&"withChildrenVertical",st==="right"&&at!=="vertical"&&"textAlignRight",st==="left"&&at!=="vertical"&&"textAlignLeft"],wrapper:["wrapper",at==="vertical"&&"wrapperVertical"]},getDividerUtilityClass,rt)},DividerRoot=styled$1("div",{name:"MuiDivider",slot:"Root",overridesResolver:(tt,et)=>{const{ownerState:nt}=tt;return[et.root,nt.absolute&&et.absolute,et[nt.variant],nt.light&&et.light,nt.orientation==="vertical"&&et.vertical,nt.flexItem&&et.flexItem,nt.children&&et.withChildren,nt.children&&nt.orientation==="vertical"&&et.withChildrenVertical,nt.textAlign==="right"&&nt.orientation!=="vertical"&&et.textAlignRight,nt.textAlign==="left"&&nt.orientation!=="vertical"&&et.textAlignLeft]}})(({theme:tt,ownerState:et})=>_extends$u({margin:0,flexShrink:0,borderWidth:0,borderStyle:"solid",borderColor:(tt.vars||tt).palette.divider,borderBottomWidth:"thin"},et.absolute&&{position:"absolute",bottom:0,left:0,width:"100%"},et.light&&{borderColor:tt.vars?`rgba(${tt.vars.palette.dividerChannel} / 0.08)`:alpha$1(tt.palette.divider,.08)},et.variant==="inset"&&{marginLeft:72},et.variant==="middle"&&et.orientation==="horizontal"&&{marginLeft:tt.spacing(2),marginRight:tt.spacing(2)},et.variant==="middle"&&et.orientation==="vertical"&&{marginTop:tt.spacing(1),marginBottom:tt.spacing(1)},et.orientation==="vertical"&&{height:"100%",borderBottomWidth:0,borderRightWidth:"thin"},et.flexItem&&{alignSelf:"stretch",height:"auto"}),({ownerState:tt})=>_extends$u({},tt.children&&{display:"flex",whiteSpace:"nowrap",textAlign:"center",border:0,"&::before, &::after":{content:'""',alignSelf:"center"}}),({theme:tt,ownerState:et})=>_extends$u({},et.children&&et.orientation!=="vertical"&&{"&::before, &::after":{width:"100%",borderTop:`thin solid ${(tt.vars||tt).palette.divider}`}}),({theme:tt,ownerState:et})=>_extends$u({},et.children&&et.orientation==="vertical"&&{flexDirection:"column","&::before, &::after":{height:"100%",borderLeft:`thin solid ${(tt.vars||tt).palette.divider}`}}),({ownerState:tt})=>_extends$u({},tt.textAlign==="right"&&tt.orientation!=="vertical"&&{"&::before":{width:"90%"},"&::after":{width:"10%"}},tt.textAlign==="left"&&tt.orientation!=="vertical"&&{"&::before":{width:"10%"},"&::after":{width:"90%"}})),DividerWrapper=styled$1("span",{name:"MuiDivider",slot:"Wrapper",overridesResolver:(tt,et)=>{const{ownerState:nt}=tt;return[et.wrapper,nt.orientation==="vertical"&&et.wrapperVertical]}})(({theme:tt,ownerState:et})=>_extends$u({display:"inline-block",paddingLeft:`calc(${tt.spacing(1)} * 1.2)`,paddingRight:`calc(${tt.spacing(1)} * 1.2)`},et.orientation==="vertical"&&{paddingTop:`calc(${tt.spacing(1)} * 1.2)`,paddingBottom:`calc(${tt.spacing(1)} * 1.2)`})),Divider$2=reactExports.forwardRef(function(et,nt){const rt=useThemeProps({props:et,name:"MuiDivider"}),{absolute:it=!1,children:ot,className:at,component:st=ot?"div":"hr",flexItem:lt=!1,light:ct=!1,orientation:ut="horizontal",role:ht=st!=="hr"?"separator":void 0,textAlign:dt="center",variant:pt="fullWidth"}=rt,mt=_objectWithoutPropertiesLoose$m(rt,_excluded$1e),gt=_extends$u({},rt,{absolute:it,component:st,flexItem:lt,light:ct,orientation:ut,role:ht,textAlign:dt,variant:pt}),yt=useUtilityClasses$I(gt);return jsxRuntimeExports.jsx(DividerRoot,_extends$u({as:st,className:clsx$3(yt.root,at),role:ht,ref:nt,ownerState:gt},mt,{children:ot?jsxRuntimeExports.jsx(DividerWrapper,{className:yt.wrapper,ownerState:gt,children:ot}):null}))});Divider$2.muiSkipListHighlight=!0;const Divider$3=Divider$2,_excluded$1d=["addEndListener","appear","children","container","direction","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"];function getTranslateValue(tt,et,nt){const rt=et.getBoundingClientRect(),it=nt&&nt.getBoundingClientRect(),ot=ownerWindow(et);let at;if(et.fakeTransform)at=et.fakeTransform;else{const ct=ot.getComputedStyle(et);at=ct.getPropertyValue("-webkit-transform")||ct.getPropertyValue("transform")}let st=0,lt=0;if(at&&at!=="none"&&typeof at=="string"){const ct=at.split("(")[1].split(")")[0].split(",");st=parseInt(ct[4],10),lt=parseInt(ct[5],10)}return tt==="left"?it?`translateX(${it.right+st-rt.left}px)`:`translateX(${ot.innerWidth+st-rt.left}px)`:tt==="right"?it?`translateX(-${rt.right-it.left-st}px)`:`translateX(-${rt.left+rt.width-st}px)`:tt==="up"?it?`translateY(${it.bottom+lt-rt.top}px)`:`translateY(${ot.innerHeight+lt-rt.top}px)`:it?`translateY(-${rt.top-it.top+rt.height-lt}px)`:`translateY(-${rt.top+rt.height-lt}px)`}function resolveContainer(tt){return typeof tt=="function"?tt():tt}function setTranslateValue(tt,et,nt){const rt=resolveContainer(nt),it=getTranslateValue(tt,et,rt);it&&(et.style.webkitTransform=it,et.style.transform=it)}const Slide=reactExports.forwardRef(function(et,nt){const rt=useTheme(),it={enter:rt.transitions.easing.easeOut,exit:rt.transitions.easing.sharp},ot={enter:rt.transitions.duration.enteringScreen,exit:rt.transitions.duration.leavingScreen},{addEndListener:at,appear:st=!0,children:lt,container:ct,direction:ut="down",easing:ht=it,in:dt,onEnter:pt,onEntered:mt,onEntering:gt,onExit:yt,onExited:bt,onExiting:vt,style:xt,timeout:kt=ot,TransitionComponent:St=Transition$2}=et,Tt=_objectWithoutPropertiesLoose$m(et,_excluded$1d),At=reactExports.useRef(null),Et=useForkRef(lt.ref,At,nt),$t=zt=>Ft=>{zt&&(Ft===void 0?zt(At.current):zt(At.current,Ft))},Dt=$t((zt,Ft)=>{setTranslateValue(ut,zt,ct),reflow(zt),pt&&pt(zt,Ft)}),jt=$t((zt,Ft)=>{const Nt=getTransitionProps({timeout:kt,style:xt,easing:ht},{mode:"enter"});zt.style.webkitTransition=rt.transitions.create("-webkit-transform",_extends$u({},Nt)),zt.style.transition=rt.transitions.create("transform",_extends$u({},Nt)),zt.style.webkitTransform="none",zt.style.transform="none",gt&>(zt,Ft)}),Pt=$t(mt),Ct=$t(vt),wt=$t(zt=>{const Ft=getTransitionProps({timeout:kt,style:xt,easing:ht},{mode:"exit"});zt.style.webkitTransition=rt.transitions.create("-webkit-transform",Ft),zt.style.transition=rt.transitions.create("transform",Ft),setTranslateValue(ut,zt,ct),yt&&yt(zt)}),It=$t(zt=>{zt.style.webkitTransition="",zt.style.transition="",bt&&bt(zt)}),Ot=zt=>{at&&at(At.current,zt)},Wt=reactExports.useCallback(()=>{At.current&&setTranslateValue(ut,At.current,ct)},[ut,ct]);return reactExports.useEffect(()=>{if(dt||ut==="down"||ut==="right")return;const zt=debounce$5(()=>{At.current&&setTranslateValue(ut,At.current,ct)}),Ft=ownerWindow(At.current);return Ft.addEventListener("resize",zt),()=>{zt.clear(),Ft.removeEventListener("resize",zt)}},[ut,dt,ct]),reactExports.useEffect(()=>{dt||Wt()},[dt,Wt]),jsxRuntimeExports.jsx(St,_extends$u({nodeRef:At,onEnter:Dt,onEntered:Pt,onEntering:jt,onExit:wt,onExited:It,onExiting:Ct,addEndListener:Ot,appear:st,in:dt,timeout:kt},Tt,{children:(zt,Ft)=>reactExports.cloneElement(lt,_extends$u({ref:Et,style:_extends$u({visibility:zt==="exited"&&!dt?"hidden":void 0},xt,lt.props.style)},Ft))}))}),Slide$1=Slide,_excluded$1c=["disableUnderline","components","componentsProps","fullWidth","hiddenLabel","inputComponent","multiline","slotProps","slots","type"],useUtilityClasses$H=tt=>{const{classes:et,disableUnderline:nt}=tt,it=composeClasses({root:["root",!nt&&"underline"],input:["input"]},getFilledInputUtilityClass,et);return _extends$u({},et,it)},FilledInputRoot=styled$1(InputBaseRoot,{shouldForwardProp:tt=>rootShouldForwardProp(tt)||tt==="classes",name:"MuiFilledInput",slot:"Root",overridesResolver:(tt,et)=>{const{ownerState:nt}=tt;return[...rootOverridesResolver(tt,et),!nt.disableUnderline&&et.underline]}})(({theme:tt,ownerState:et})=>{var nt;const rt=tt.palette.mode==="light",it=rt?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)",ot=rt?"rgba(0, 0, 0, 0.06)":"rgba(255, 255, 255, 0.09)",at=rt?"rgba(0, 0, 0, 0.09)":"rgba(255, 255, 255, 0.13)",st=rt?"rgba(0, 0, 0, 0.12)":"rgba(255, 255, 255, 0.12)";return _extends$u({position:"relative",backgroundColor:tt.vars?tt.vars.palette.FilledInput.bg:ot,borderTopLeftRadius:(tt.vars||tt).shape.borderRadius,borderTopRightRadius:(tt.vars||tt).shape.borderRadius,transition:tt.transitions.create("background-color",{duration:tt.transitions.duration.shorter,easing:tt.transitions.easing.easeOut}),"&:hover":{backgroundColor:tt.vars?tt.vars.palette.FilledInput.hoverBg:at,"@media (hover: none)":{backgroundColor:tt.vars?tt.vars.palette.FilledInput.bg:ot}},[`&.${filledInputClasses$1.focused}`]:{backgroundColor:tt.vars?tt.vars.palette.FilledInput.bg:ot},[`&.${filledInputClasses$1.disabled}`]:{backgroundColor:tt.vars?tt.vars.palette.FilledInput.disabledBg:st}},!et.disableUnderline&&{"&:after":{borderBottom:`2px solid ${(nt=(tt.vars||tt).palette[et.color||"primary"])==null?void 0:nt.main}`,left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:tt.transitions.create("transform",{duration:tt.transitions.duration.shorter,easing:tt.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${filledInputClasses$1.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${filledInputClasses$1.error}`]:{"&:before, &:after":{borderBottomColor:(tt.vars||tt).palette.error.main}},"&:before":{borderBottom:`1px solid ${tt.vars?`rgba(${tt.vars.palette.common.onBackgroundChannel} / ${tt.vars.opacity.inputUnderline})`:it}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:tt.transitions.create("border-bottom-color",{duration:tt.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${filledInputClasses$1.disabled}, .${filledInputClasses$1.error}):before`]:{borderBottom:`1px solid ${(tt.vars||tt).palette.text.primary}`},[`&.${filledInputClasses$1.disabled}:before`]:{borderBottomStyle:"dotted"}},et.startAdornment&&{paddingLeft:12},et.endAdornment&&{paddingRight:12},et.multiline&&_extends$u({padding:"25px 12px 8px"},et.size==="small"&&{paddingTop:21,paddingBottom:4},et.hiddenLabel&&{paddingTop:16,paddingBottom:17}))}),FilledInputInput=styled$1(InputBaseComponent,{name:"MuiFilledInput",slot:"Input",overridesResolver:inputOverridesResolver})(({theme:tt,ownerState:et})=>_extends$u({paddingTop:25,paddingRight:12,paddingBottom:8,paddingLeft:12},!tt.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:tt.palette.mode==="light"?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:tt.palette.mode==="light"?null:"#fff",caretColor:tt.palette.mode==="light"?null:"#fff",borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"}},tt.vars&&{"&:-webkit-autofill":{borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"},[tt.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},et.size==="small"&&{paddingTop:21,paddingBottom:4},et.hiddenLabel&&{paddingTop:16,paddingBottom:17},et.multiline&&{paddingTop:0,paddingBottom:0,paddingLeft:0,paddingRight:0},et.startAdornment&&{paddingLeft:0},et.endAdornment&&{paddingRight:0},et.hiddenLabel&&et.size==="small"&&{paddingTop:8,paddingBottom:9})),FilledInput=reactExports.forwardRef(function(et,nt){var rt,it,ot,at;const st=useThemeProps({props:et,name:"MuiFilledInput"}),{components:lt={},componentsProps:ct,fullWidth:ut=!1,inputComponent:ht="input",multiline:dt=!1,slotProps:pt,slots:mt={},type:gt="text"}=st,yt=_objectWithoutPropertiesLoose$m(st,_excluded$1c),bt=_extends$u({},st,{fullWidth:ut,inputComponent:ht,multiline:dt,type:gt}),vt=useUtilityClasses$H(st),xt={root:{ownerState:bt},input:{ownerState:bt}},kt=pt??ct?deepmerge$1(pt??ct,xt):xt,St=(rt=(it=mt.root)!=null?it:lt.Root)!=null?rt:FilledInputRoot,Tt=(ot=(at=mt.input)!=null?at:lt.Input)!=null?ot:FilledInputInput;return jsxRuntimeExports.jsx(InputBase$1,_extends$u({slots:{root:St,input:Tt},componentsProps:kt,fullWidth:ut,inputComponent:ht,multiline:dt,ref:nt,type:gt},yt,{classes:vt}))});FilledInput.muiName="Input";const FilledInput$1=FilledInput;function getFormControlUtilityClasses(tt){return generateUtilityClass("MuiFormControl",tt)}generateUtilityClasses("MuiFormControl",["root","marginNone","marginNormal","marginDense","fullWidth","disabled"]);const _excluded$1b=["children","className","color","component","disabled","error","focused","fullWidth","hiddenLabel","margin","required","size","variant"],useUtilityClasses$G=tt=>{const{classes:et,margin:nt,fullWidth:rt}=tt,it={root:["root",nt!=="none"&&`margin${capitalize(nt)}`,rt&&"fullWidth"]};return composeClasses(it,getFormControlUtilityClasses,et)},FormControlRoot=styled$1("div",{name:"MuiFormControl",slot:"Root",overridesResolver:({ownerState:tt},et)=>_extends$u({},et.root,et[`margin${capitalize(tt.margin)}`],tt.fullWidth&&et.fullWidth)})(({ownerState:tt})=>_extends$u({display:"inline-flex",flexDirection:"column",position:"relative",minWidth:0,padding:0,margin:0,border:0,verticalAlign:"top"},tt.margin==="normal"&&{marginTop:16,marginBottom:8},tt.margin==="dense"&&{marginTop:8,marginBottom:4},tt.fullWidth&&{width:"100%"})),FormControl=reactExports.forwardRef(function(et,nt){const rt=useThemeProps({props:et,name:"MuiFormControl"}),{children:it,className:ot,color:at="primary",component:st="div",disabled:lt=!1,error:ct=!1,focused:ut,fullWidth:ht=!1,hiddenLabel:dt=!1,margin:pt="none",required:mt=!1,size:gt="medium",variant:yt="outlined"}=rt,bt=_objectWithoutPropertiesLoose$m(rt,_excluded$1b),vt=_extends$u({},rt,{color:at,component:st,disabled:lt,error:ct,fullWidth:ht,hiddenLabel:dt,margin:pt,required:mt,size:gt,variant:yt}),xt=useUtilityClasses$G(vt),[kt,St]=reactExports.useState(()=>{let Ct=!1;return it&&reactExports.Children.forEach(it,wt=>{if(!isMuiElement(wt,["Input","Select"]))return;const It=isMuiElement(wt,["Select"])?wt.props.input:wt;It&&isAdornedStart(It.props)&&(Ct=!0)}),Ct}),[Tt,At]=reactExports.useState(()=>{let Ct=!1;return it&&reactExports.Children.forEach(it,wt=>{isMuiElement(wt,["Input","Select"])&&(isFilled(wt.props,!0)||isFilled(wt.props.inputProps,!0))&&(Ct=!0)}),Ct}),[Et,$t]=reactExports.useState(!1);lt&&Et&&$t(!1);const Dt=ut!==void 0&&!lt?ut:Et;let jt;const Pt=reactExports.useMemo(()=>({adornedStart:kt,setAdornedStart:St,color:at,disabled:lt,error:ct,filled:Tt,focused:Dt,fullWidth:ht,hiddenLabel:dt,size:gt,onBlur:()=>{$t(!1)},onEmpty:()=>{At(!1)},onFilled:()=>{At(!0)},onFocus:()=>{$t(!0)},registerEffect:jt,required:mt,variant:yt}),[kt,at,lt,ct,Tt,Dt,ht,dt,jt,mt,gt,yt]);return jsxRuntimeExports.jsx(FormControlContext$1.Provider,{value:Pt,children:jsxRuntimeExports.jsx(FormControlRoot,_extends$u({as:st,ownerState:vt,className:clsx$3(xt.root,ot),ref:nt},bt,{children:it}))})}),FormControl$1=FormControl,Stack$4=createStack({createStyledComponent:styled$1("div",{name:"MuiStack",slot:"Root",overridesResolver:(tt,et)=>et.root}),useThemeProps:tt=>useThemeProps({props:tt,name:"MuiStack"})}),Stack$5=Stack$4;function getFormHelperTextUtilityClasses(tt){return generateUtilityClass("MuiFormHelperText",tt)}const formHelperTextClasses=generateUtilityClasses("MuiFormHelperText",["root","error","disabled","sizeSmall","sizeMedium","contained","focused","filled","required"]),formHelperTextClasses$1=formHelperTextClasses;var _span$3;const _excluded$1a=["children","className","component","disabled","error","filled","focused","margin","required","variant"],useUtilityClasses$F=tt=>{const{classes:et,contained:nt,size:rt,disabled:it,error:ot,filled:at,focused:st,required:lt}=tt,ct={root:["root",it&&"disabled",ot&&"error",rt&&`size${capitalize(rt)}`,nt&&"contained",st&&"focused",at&&"filled",lt&&"required"]};return composeClasses(ct,getFormHelperTextUtilityClasses,et)},FormHelperTextRoot=styled$1("p",{name:"MuiFormHelperText",slot:"Root",overridesResolver:(tt,et)=>{const{ownerState:nt}=tt;return[et.root,nt.size&&et[`size${capitalize(nt.size)}`],nt.contained&&et.contained,nt.filled&&et.filled]}})(({theme:tt,ownerState:et})=>_extends$u({color:(tt.vars||tt).palette.text.secondary},tt.typography.caption,{textAlign:"left",marginTop:3,marginRight:0,marginBottom:0,marginLeft:0,[`&.${formHelperTextClasses$1.disabled}`]:{color:(tt.vars||tt).palette.text.disabled},[`&.${formHelperTextClasses$1.error}`]:{color:(tt.vars||tt).palette.error.main}},et.size==="small"&&{marginTop:4},et.contained&&{marginLeft:14,marginRight:14})),FormHelperText=reactExports.forwardRef(function(et,nt){const rt=useThemeProps({props:et,name:"MuiFormHelperText"}),{children:it,className:ot,component:at="p"}=rt,st=_objectWithoutPropertiesLoose$m(rt,_excluded$1a),lt=useFormControl(),ct=formControlState({props:rt,muiFormControl:lt,states:["variant","size","disabled","error","filled","focused","required"]}),ut=_extends$u({},rt,{component:at,contained:ct.variant==="filled"||ct.variant==="outlined",variant:ct.variant,size:ct.size,disabled:ct.disabled,error:ct.error,filled:ct.filled,focused:ct.focused,required:ct.required}),ht=useUtilityClasses$F(ut);return jsxRuntimeExports.jsx(FormHelperTextRoot,_extends$u({as:at,ownerState:ut,className:clsx$3(ht.root,ot),ref:nt},st,{children:it===" "?_span$3||(_span$3=jsxRuntimeExports.jsx("span",{className:"notranslate",children:"​"})):it}))}),FormHelperText$1=FormHelperText;function getFormLabelUtilityClasses(tt){return generateUtilityClass("MuiFormLabel",tt)}const formLabelClasses=generateUtilityClasses("MuiFormLabel",["root","colorSecondary","focused","disabled","error","filled","required","asterisk"]),formLabelClasses$1=formLabelClasses,_excluded$19=["children","className","color","component","disabled","error","filled","focused","required"],useUtilityClasses$E=tt=>{const{classes:et,color:nt,focused:rt,disabled:it,error:ot,filled:at,required:st}=tt,lt={root:["root",`color${capitalize(nt)}`,it&&"disabled",ot&&"error",at&&"filled",rt&&"focused",st&&"required"],asterisk:["asterisk",ot&&"error"]};return composeClasses(lt,getFormLabelUtilityClasses,et)},FormLabelRoot=styled$1("label",{name:"MuiFormLabel",slot:"Root",overridesResolver:({ownerState:tt},et)=>_extends$u({},et.root,tt.color==="secondary"&&et.colorSecondary,tt.filled&&et.filled)})(({theme:tt,ownerState:et})=>_extends$u({color:(tt.vars||tt).palette.text.secondary},tt.typography.body1,{lineHeight:"1.4375em",padding:0,position:"relative",[`&.${formLabelClasses$1.focused}`]:{color:(tt.vars||tt).palette[et.color].main},[`&.${formLabelClasses$1.disabled}`]:{color:(tt.vars||tt).palette.text.disabled},[`&.${formLabelClasses$1.error}`]:{color:(tt.vars||tt).palette.error.main}})),AsteriskComponent=styled$1("span",{name:"MuiFormLabel",slot:"Asterisk",overridesResolver:(tt,et)=>et.asterisk})(({theme:tt})=>({[`&.${formLabelClasses$1.error}`]:{color:(tt.vars||tt).palette.error.main}})),FormLabel=reactExports.forwardRef(function(et,nt){const rt=useThemeProps({props:et,name:"MuiFormLabel"}),{children:it,className:ot,component:at="label"}=rt,st=_objectWithoutPropertiesLoose$m(rt,_excluded$19),lt=useFormControl(),ct=formControlState({props:rt,muiFormControl:lt,states:["color","required","focused","disabled","error","filled"]}),ut=_extends$u({},rt,{color:ct.color||"primary",component:at,disabled:ct.disabled,error:ct.error,filled:ct.filled,focused:ct.focused,required:ct.required}),ht=useUtilityClasses$E(ut);return jsxRuntimeExports.jsxs(FormLabelRoot,_extends$u({as:at,ownerState:ut,className:clsx$3(ht.root,ot),ref:nt},st,{children:[it,ct.required&&jsxRuntimeExports.jsxs(AsteriskComponent,{ownerState:ut,"aria-hidden":!0,className:ht.asterisk,children:[" ","*"]})]}))}),FormLabel$1=FormLabel,_excluded$18=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"];function getScale(tt){return`scale(${tt}, ${tt**2})`}const styles$3={entering:{opacity:1,transform:getScale(1)},entered:{opacity:1,transform:"none"}},isWebKit154=typeof navigator<"u"&&/^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent)&&/(os |version\/)15(.|_)4/i.test(navigator.userAgent),Grow=reactExports.forwardRef(function(et,nt){const{addEndListener:rt,appear:it=!0,children:ot,easing:at,in:st,onEnter:lt,onEntered:ct,onEntering:ut,onExit:ht,onExited:dt,onExiting:pt,style:mt,timeout:gt="auto",TransitionComponent:yt=Transition$2}=et,bt=_objectWithoutPropertiesLoose$m(et,_excluded$18),vt=reactExports.useRef(),xt=reactExports.useRef(),kt=useTheme(),St=reactExports.useRef(null),Tt=useForkRef(St,ot.ref,nt),At=It=>Ot=>{if(It){const Wt=St.current;Ot===void 0?It(Wt):It(Wt,Ot)}},Et=At(ut),$t=At((It,Ot)=>{reflow(It);const{duration:Wt,delay:zt,easing:Ft}=getTransitionProps({style:mt,timeout:gt,easing:at},{mode:"enter"});let Nt;gt==="auto"?(Nt=kt.transitions.getAutoHeightDuration(It.clientHeight),xt.current=Nt):Nt=Wt,It.style.transition=[kt.transitions.create("opacity",{duration:Nt,delay:zt}),kt.transitions.create("transform",{duration:isWebKit154?Nt:Nt*.666,delay:zt,easing:Ft})].join(","),lt&<(It,Ot)}),Dt=At(ct),jt=At(pt),Pt=At(It=>{const{duration:Ot,delay:Wt,easing:zt}=getTransitionProps({style:mt,timeout:gt,easing:at},{mode:"exit"});let Ft;gt==="auto"?(Ft=kt.transitions.getAutoHeightDuration(It.clientHeight),xt.current=Ft):Ft=Ot,It.style.transition=[kt.transitions.create("opacity",{duration:Ft,delay:Wt}),kt.transitions.create("transform",{duration:isWebKit154?Ft:Ft*.666,delay:isWebKit154?Wt:Wt||Ft*.333,easing:zt})].join(","),It.style.opacity=0,It.style.transform=getScale(.75),ht&&ht(It)}),Ct=At(dt),wt=It=>{gt==="auto"&&(vt.current=setTimeout(It,xt.current||0)),rt&&rt(St.current,It)};return reactExports.useEffect(()=>()=>{clearTimeout(vt.current)},[]),jsxRuntimeExports.jsx(yt,_extends$u({appear:it,in:st,nodeRef:St,onEnter:$t,onEntered:Dt,onEntering:Et,onExit:Pt,onExited:Ct,onExiting:jt,addEndListener:wt,timeout:gt==="auto"?null:gt},bt,{children:(It,Ot)=>reactExports.cloneElement(ot,_extends$u({style:_extends$u({opacity:0,transform:getScale(.75),visibility:It==="exited"&&!st?"hidden":void 0},styles$3[It],mt,ot.props.style),ref:Tt},Ot))}))});Grow.muiSupportAuto=!0;const Grow$1=Grow;function useMediaQueryOld(tt,et,nt,rt,it){const[ot,at]=reactExports.useState(()=>it&&nt?nt(tt).matches:rt?rt(tt).matches:et);return useEnhancedEffect$1(()=>{let st=!0;if(!nt)return;const lt=nt(tt),ct=()=>{st&&at(lt.matches)};return ct(),lt.addListener(ct),()=>{st=!1,lt.removeListener(ct)}},[tt,nt]),ot}const maybeReactUseSyncExternalStore=React$2["useSyncExternalStore"];function useMediaQueryNew(tt,et,nt,rt,it){const ot=reactExports.useCallback(()=>et,[et]),at=reactExports.useMemo(()=>{if(it&&nt)return()=>nt(tt).matches;if(rt!==null){const{matches:ut}=rt(tt);return()=>ut}return ot},[ot,tt,rt,it,nt]),[st,lt]=reactExports.useMemo(()=>{if(nt===null)return[ot,()=>()=>{}];const ut=nt(tt);return[()=>ut.matches,ht=>(ut.addListener(ht),()=>{ut.removeListener(ht)})]},[ot,nt,tt]);return maybeReactUseSyncExternalStore(lt,st,at)}function useMediaQuery(tt,et={}){const nt=useTheme$3(),rt=typeof window<"u"&&typeof window.matchMedia<"u",{defaultMatches:it=!1,matchMedia:ot=rt?window.matchMedia:null,ssrMatchMedia:at=null,noSsr:st=!1}=getThemeProps({name:"MuiUseMediaQuery",props:et,theme:nt});let lt=typeof tt=="function"?tt(nt):tt;return lt=lt.replace(/^@media( ?)/m,""),(maybeReactUseSyncExternalStore!==void 0?useMediaQueryNew:useMediaQueryOld)(lt,it,ot,at,st)}const _excluded$17=["disableUnderline","components","componentsProps","fullWidth","inputComponent","multiline","slotProps","slots","type"],useUtilityClasses$D=tt=>{const{classes:et,disableUnderline:nt}=tt,it=composeClasses({root:["root",!nt&&"underline"],input:["input"]},getInputUtilityClass,et);return _extends$u({},et,it)},InputRoot=styled$1(InputBaseRoot,{shouldForwardProp:tt=>rootShouldForwardProp(tt)||tt==="classes",name:"MuiInput",slot:"Root",overridesResolver:(tt,et)=>{const{ownerState:nt}=tt;return[...rootOverridesResolver(tt,et),!nt.disableUnderline&&et.underline]}})(({theme:tt,ownerState:et})=>{let rt=tt.palette.mode==="light"?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)";return tt.vars&&(rt=`rgba(${tt.vars.palette.common.onBackgroundChannel} / ${tt.vars.opacity.inputUnderline})`),_extends$u({position:"relative"},et.formControl&&{"label + &":{marginTop:16}},!et.disableUnderline&&{"&:after":{borderBottom:`2px solid ${(tt.vars||tt).palette[et.color].main}`,left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:tt.transitions.create("transform",{duration:tt.transitions.duration.shorter,easing:tt.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${inputClasses$1.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${inputClasses$1.error}`]:{"&:before, &:after":{borderBottomColor:(tt.vars||tt).palette.error.main}},"&:before":{borderBottom:`1px solid ${rt}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:tt.transitions.create("border-bottom-color",{duration:tt.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${inputClasses$1.disabled}, .${inputClasses$1.error}):before`]:{borderBottom:`2px solid ${(tt.vars||tt).palette.text.primary}`,"@media (hover: none)":{borderBottom:`1px solid ${rt}`}},[`&.${inputClasses$1.disabled}:before`]:{borderBottomStyle:"dotted"}})}),InputInput=styled$1(InputBaseComponent,{name:"MuiInput",slot:"Input",overridesResolver:inputOverridesResolver})({}),Input$2=reactExports.forwardRef(function(et,nt){var rt,it,ot,at;const st=useThemeProps({props:et,name:"MuiInput"}),{disableUnderline:lt,components:ct={},componentsProps:ut,fullWidth:ht=!1,inputComponent:dt="input",multiline:pt=!1,slotProps:mt,slots:gt={},type:yt="text"}=st,bt=_objectWithoutPropertiesLoose$m(st,_excluded$17),vt=useUtilityClasses$D(st),kt={root:{ownerState:{disableUnderline:lt}}},St=mt??ut?deepmerge$1(mt??ut,kt):kt,Tt=(rt=(it=gt.root)!=null?it:ct.Root)!=null?rt:InputRoot,At=(ot=(at=gt.input)!=null?at:ct.Input)!=null?ot:InputInput;return jsxRuntimeExports.jsx(InputBase$1,_extends$u({slots:{root:Tt,input:At},slotProps:St,fullWidth:ht,inputComponent:dt,multiline:pt,ref:nt,type:yt},bt,{classes:vt}))});Input$2.muiName="Input";const Input$3=Input$2;function getInputAdornmentUtilityClass(tt){return generateUtilityClass("MuiInputAdornment",tt)}const inputAdornmentClasses=generateUtilityClasses("MuiInputAdornment",["root","filled","standard","outlined","positionStart","positionEnd","disablePointerEvents","hiddenLabel","sizeSmall"]),inputAdornmentClasses$1=inputAdornmentClasses;var _span$2;const _excluded$16=["children","className","component","disablePointerEvents","disableTypography","position","variant"],overridesResolver$3=(tt,et)=>{const{ownerState:nt}=tt;return[et.root,et[`position${capitalize(nt.position)}`],nt.disablePointerEvents===!0&&et.disablePointerEvents,et[nt.variant]]},useUtilityClasses$C=tt=>{const{classes:et,disablePointerEvents:nt,hiddenLabel:rt,position:it,size:ot,variant:at}=tt,st={root:["root",nt&&"disablePointerEvents",it&&`position${capitalize(it)}`,at,rt&&"hiddenLabel",ot&&`size${capitalize(ot)}`]};return composeClasses(st,getInputAdornmentUtilityClass,et)},InputAdornmentRoot=styled$1("div",{name:"MuiInputAdornment",slot:"Root",overridesResolver:overridesResolver$3})(({theme:tt,ownerState:et})=>_extends$u({display:"flex",height:"0.01em",maxHeight:"2em",alignItems:"center",whiteSpace:"nowrap",color:(tt.vars||tt).palette.action.active},et.variant==="filled"&&{[`&.${inputAdornmentClasses$1.positionStart}&:not(.${inputAdornmentClasses$1.hiddenLabel})`]:{marginTop:16}},et.position==="start"&&{marginRight:8},et.position==="end"&&{marginLeft:8},et.disablePointerEvents===!0&&{pointerEvents:"none"})),InputAdornment=reactExports.forwardRef(function(et,nt){const rt=useThemeProps({props:et,name:"MuiInputAdornment"}),{children:it,className:ot,component:at="div",disablePointerEvents:st=!1,disableTypography:lt=!1,position:ct,variant:ut}=rt,ht=_objectWithoutPropertiesLoose$m(rt,_excluded$16),dt=useFormControl()||{};let pt=ut;ut&&dt.variant,dt&&!pt&&(pt=dt.variant);const mt=_extends$u({},rt,{hiddenLabel:dt.hiddenLabel,size:dt.size,disablePointerEvents:st,position:ct,variant:pt}),gt=useUtilityClasses$C(mt);return jsxRuntimeExports.jsx(FormControlContext$1.Provider,{value:null,children:jsxRuntimeExports.jsx(InputAdornmentRoot,_extends$u({as:at,ownerState:mt,className:clsx$3(gt.root,ot),ref:nt},ht,{children:typeof it=="string"&&!lt?jsxRuntimeExports.jsx(Typography$1,{color:"text.secondary",children:it}):jsxRuntimeExports.jsxs(reactExports.Fragment,{children:[ct==="start"?_span$2||(_span$2=jsxRuntimeExports.jsx("span",{className:"notranslate",children:"​"})):null,it]})}))})}),MuiInputAdornment=InputAdornment;function getInputLabelUtilityClasses(tt){return generateUtilityClass("MuiInputLabel",tt)}generateUtilityClasses("MuiInputLabel",["root","focused","disabled","error","required","asterisk","formControl","sizeSmall","shrink","animated","standard","filled","outlined"]);const _excluded$15=["disableAnimation","margin","shrink","variant","className"],useUtilityClasses$B=tt=>{const{classes:et,formControl:nt,size:rt,shrink:it,disableAnimation:ot,variant:at,required:st}=tt,lt={root:["root",nt&&"formControl",!ot&&"animated",it&&"shrink",rt&&rt!=="normal"&&`size${capitalize(rt)}`,at],asterisk:[st&&"asterisk"]},ct=composeClasses(lt,getInputLabelUtilityClasses,et);return _extends$u({},et,ct)},InputLabelRoot=styled$1(FormLabel$1,{shouldForwardProp:tt=>rootShouldForwardProp(tt)||tt==="classes",name:"MuiInputLabel",slot:"Root",overridesResolver:(tt,et)=>{const{ownerState:nt}=tt;return[{[`& .${formLabelClasses$1.asterisk}`]:et.asterisk},et.root,nt.formControl&&et.formControl,nt.size==="small"&&et.sizeSmall,nt.shrink&&et.shrink,!nt.disableAnimation&&et.animated,et[nt.variant]]}})(({theme:tt,ownerState:et})=>_extends$u({display:"block",transformOrigin:"top left",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:"100%"},et.formControl&&{position:"absolute",left:0,top:0,transform:"translate(0, 20px) scale(1)"},et.size==="small"&&{transform:"translate(0, 17px) scale(1)"},et.shrink&&{transform:"translate(0, -1.5px) scale(0.75)",transformOrigin:"top left",maxWidth:"133%"},!et.disableAnimation&&{transition:tt.transitions.create(["color","transform","max-width"],{duration:tt.transitions.duration.shorter,easing:tt.transitions.easing.easeOut})},et.variant==="filled"&&_extends$u({zIndex:1,pointerEvents:"none",transform:"translate(12px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"},et.size==="small"&&{transform:"translate(12px, 13px) scale(1)"},et.shrink&&_extends$u({userSelect:"none",pointerEvents:"auto",transform:"translate(12px, 7px) scale(0.75)",maxWidth:"calc(133% - 24px)"},et.size==="small"&&{transform:"translate(12px, 4px) scale(0.75)"})),et.variant==="outlined"&&_extends$u({zIndex:1,pointerEvents:"none",transform:"translate(14px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"},et.size==="small"&&{transform:"translate(14px, 9px) scale(1)"},et.shrink&&{userSelect:"none",pointerEvents:"auto",maxWidth:"calc(133% - 32px)",transform:"translate(14px, -9px) scale(0.75)"}))),InputLabel=reactExports.forwardRef(function(et,nt){const rt=useThemeProps({name:"MuiInputLabel",props:et}),{disableAnimation:it=!1,shrink:ot,className:at}=rt,st=_objectWithoutPropertiesLoose$m(rt,_excluded$15),lt=useFormControl();let ct=ot;typeof ct>"u"&<&&(ct=lt.filled||lt.focused||lt.adornedStart);const ut=formControlState({props:rt,muiFormControl:lt,states:["size","variant","required"]}),ht=_extends$u({},rt,{disableAnimation:it,formControl:lt,shrink:ct,size:ut.size,variant:ut.variant,required:ut.required}),dt=useUtilityClasses$B(ht);return jsxRuntimeExports.jsx(InputLabelRoot,_extends$u({"data-shrink":ct,ownerState:ht,ref:nt,className:clsx$3(dt.root,at)},st,{classes:dt}))}),InputLabel$1=InputLabel,ListContext=reactExports.createContext({}),ListContext$1=ListContext;function getListUtilityClass(tt){return generateUtilityClass("MuiList",tt)}generateUtilityClasses("MuiList",["root","padding","dense","subheader"]);const _excluded$14=["children","className","component","dense","disablePadding","subheader"],useUtilityClasses$A=tt=>{const{classes:et,disablePadding:nt,dense:rt,subheader:it}=tt;return composeClasses({root:["root",!nt&&"padding",rt&&"dense",it&&"subheader"]},getListUtilityClass,et)},ListRoot=styled$1("ul",{name:"MuiList",slot:"Root",overridesResolver:(tt,et)=>{const{ownerState:nt}=tt;return[et.root,!nt.disablePadding&&et.padding,nt.dense&&et.dense,nt.subheader&&et.subheader]}})(({ownerState:tt})=>_extends$u({listStyle:"none",margin:0,padding:0,position:"relative"},!tt.disablePadding&&{paddingTop:8,paddingBottom:8},tt.subheader&&{paddingTop:0})),List=reactExports.forwardRef(function(et,nt){const rt=useThemeProps({props:et,name:"MuiList"}),{children:it,className:ot,component:at="ul",dense:st=!1,disablePadding:lt=!1,subheader:ct}=rt,ut=_objectWithoutPropertiesLoose$m(rt,_excluded$14),ht=reactExports.useMemo(()=>({dense:st}),[st]),dt=_extends$u({},rt,{component:at,dense:st,disablePadding:lt}),pt=useUtilityClasses$A(dt);return jsxRuntimeExports.jsx(ListContext$1.Provider,{value:ht,children:jsxRuntimeExports.jsxs(ListRoot,_extends$u({as:at,className:clsx$3(pt.root,ot),ref:nt,ownerState:dt},ut,{children:[ct,it]}))})}),List$1=List;function getListItemUtilityClass(tt){return generateUtilityClass("MuiListItem",tt)}const listItemClasses=generateUtilityClasses("MuiListItem",["root","container","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","padding","button","secondaryAction","selected"]),listItemClasses$1=listItemClasses,listItemButtonClasses=generateUtilityClasses("MuiListItemButton",["root","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","selected"]),listItemButtonClasses$1=listItemButtonClasses;function getListItemSecondaryActionClassesUtilityClass(tt){return generateUtilityClass("MuiListItemSecondaryAction",tt)}generateUtilityClasses("MuiListItemSecondaryAction",["root","disableGutters"]);const _excluded$13=["className"],useUtilityClasses$z=tt=>{const{disableGutters:et,classes:nt}=tt;return composeClasses({root:["root",et&&"disableGutters"]},getListItemSecondaryActionClassesUtilityClass,nt)},ListItemSecondaryActionRoot=styled$1("div",{name:"MuiListItemSecondaryAction",slot:"Root",overridesResolver:(tt,et)=>{const{ownerState:nt}=tt;return[et.root,nt.disableGutters&&et.disableGutters]}})(({ownerState:tt})=>_extends$u({position:"absolute",right:16,top:"50%",transform:"translateY(-50%)"},tt.disableGutters&&{right:0})),ListItemSecondaryAction=reactExports.forwardRef(function(et,nt){const rt=useThemeProps({props:et,name:"MuiListItemSecondaryAction"}),{className:it}=rt,ot=_objectWithoutPropertiesLoose$m(rt,_excluded$13),at=reactExports.useContext(ListContext$1),st=_extends$u({},rt,{disableGutters:at.disableGutters}),lt=useUtilityClasses$z(st);return jsxRuntimeExports.jsx(ListItemSecondaryActionRoot,_extends$u({className:clsx$3(lt.root,it),ownerState:st,ref:nt},ot))});ListItemSecondaryAction.muiName="ListItemSecondaryAction";const ListItemSecondaryAction$1=ListItemSecondaryAction,_excluded$12=["className"],_excluded2$f=["alignItems","autoFocus","button","children","className","component","components","componentsProps","ContainerComponent","ContainerProps","dense","disabled","disableGutters","disablePadding","divider","focusVisibleClassName","secondaryAction","selected","slotProps","slots"],overridesResolver$2=(tt,et)=>{const{ownerState:nt}=tt;return[et.root,nt.dense&&et.dense,nt.alignItems==="flex-start"&&et.alignItemsFlexStart,nt.divider&&et.divider,!nt.disableGutters&&et.gutters,!nt.disablePadding&&et.padding,nt.button&&et.button,nt.hasSecondaryAction&&et.secondaryAction]},useUtilityClasses$y=tt=>{const{alignItems:et,button:nt,classes:rt,dense:it,disabled:ot,disableGutters:at,disablePadding:st,divider:lt,hasSecondaryAction:ct,selected:ut}=tt;return composeClasses({root:["root",it&&"dense",!at&&"gutters",!st&&"padding",lt&&"divider",ot&&"disabled",nt&&"button",et==="flex-start"&&"alignItemsFlexStart",ct&&"secondaryAction",ut&&"selected"],container:["container"]},getListItemUtilityClass,rt)},ListItemRoot=styled$1("div",{name:"MuiListItem",slot:"Root",overridesResolver:overridesResolver$2})(({theme:tt,ownerState:et})=>_extends$u({display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",width:"100%",boxSizing:"border-box",textAlign:"left"},!et.disablePadding&&_extends$u({paddingTop:8,paddingBottom:8},et.dense&&{paddingTop:4,paddingBottom:4},!et.disableGutters&&{paddingLeft:16,paddingRight:16},!!et.secondaryAction&&{paddingRight:48}),!!et.secondaryAction&&{[`& > .${listItemButtonClasses$1.root}`]:{paddingRight:48}},{[`&.${listItemClasses$1.focusVisible}`]:{backgroundColor:(tt.vars||tt).palette.action.focus},[`&.${listItemClasses$1.selected}`]:{backgroundColor:tt.vars?`rgba(${tt.vars.palette.primary.mainChannel} / ${tt.vars.palette.action.selectedOpacity})`:alpha$1(tt.palette.primary.main,tt.palette.action.selectedOpacity),[`&.${listItemClasses$1.focusVisible}`]:{backgroundColor:tt.vars?`rgba(${tt.vars.palette.primary.mainChannel} / calc(${tt.vars.palette.action.selectedOpacity} + ${tt.vars.palette.action.focusOpacity}))`:alpha$1(tt.palette.primary.main,tt.palette.action.selectedOpacity+tt.palette.action.focusOpacity)}},[`&.${listItemClasses$1.disabled}`]:{opacity:(tt.vars||tt).palette.action.disabledOpacity}},et.alignItems==="flex-start"&&{alignItems:"flex-start"},et.divider&&{borderBottom:`1px solid ${(tt.vars||tt).palette.divider}`,backgroundClip:"padding-box"},et.button&&{transition:tt.transitions.create("background-color",{duration:tt.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:(tt.vars||tt).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${listItemClasses$1.selected}:hover`]:{backgroundColor:tt.vars?`rgba(${tt.vars.palette.primary.mainChannel} / calc(${tt.vars.palette.action.selectedOpacity} + ${tt.vars.palette.action.hoverOpacity}))`:alpha$1(tt.palette.primary.main,tt.palette.action.selectedOpacity+tt.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:tt.vars?`rgba(${tt.vars.palette.primary.mainChannel} / ${tt.vars.palette.action.selectedOpacity})`:alpha$1(tt.palette.primary.main,tt.palette.action.selectedOpacity)}}},et.hasSecondaryAction&&{paddingRight:48})),ListItemContainer=styled$1("li",{name:"MuiListItem",slot:"Container",overridesResolver:(tt,et)=>et.container})({position:"relative"}),ListItem=reactExports.forwardRef(function(et,nt){const rt=useThemeProps({props:et,name:"MuiListItem"}),{alignItems:it="center",autoFocus:ot=!1,button:at=!1,children:st,className:lt,component:ct,components:ut={},componentsProps:ht={},ContainerComponent:dt="li",ContainerProps:{className:pt}={},dense:mt=!1,disabled:gt=!1,disableGutters:yt=!1,disablePadding:bt=!1,divider:vt=!1,focusVisibleClassName:xt,secondaryAction:kt,selected:St=!1,slotProps:Tt={},slots:At={}}=rt,Et=_objectWithoutPropertiesLoose$m(rt.ContainerProps,_excluded$12),$t=_objectWithoutPropertiesLoose$m(rt,_excluded2$f),Dt=reactExports.useContext(ListContext$1),jt=reactExports.useMemo(()=>({dense:mt||Dt.dense||!1,alignItems:it,disableGutters:yt}),[it,Dt.dense,mt,yt]),Pt=reactExports.useRef(null);useEnhancedEffect$1(()=>{ot&&Pt.current&&Pt.current.focus()},[ot]);const Ct=reactExports.Children.toArray(st),wt=Ct.length&&isMuiElement(Ct[Ct.length-1],["ListItemSecondaryAction"]),It=_extends$u({},rt,{alignItems:it,autoFocus:ot,button:at,dense:jt.dense,disabled:gt,disableGutters:yt,disablePadding:bt,divider:vt,hasSecondaryAction:wt,selected:St}),Ot=useUtilityClasses$y(It),Wt=useForkRef(Pt,nt),zt=At.root||ut.Root||ListItemRoot,Ft=Tt.root||ht.root||{},Nt=_extends$u({className:clsx$3(Ot.root,Ft.className,lt),disabled:gt},$t);let Ut=ct||"li";return at&&(Nt.component=ct||"div",Nt.focusVisibleClassName=clsx$3(listItemClasses$1.focusVisible,xt),Ut=ButtonBase$1),wt?(Ut=!Nt.component&&!ct?"div":Ut,dt==="li"&&(Ut==="li"?Ut="div":Nt.component==="li"&&(Nt.component="div")),jsxRuntimeExports.jsx(ListContext$1.Provider,{value:jt,children:jsxRuntimeExports.jsxs(ListItemContainer,_extends$u({as:dt,className:clsx$3(Ot.container,pt),ref:Wt,ownerState:It},Et,{children:[jsxRuntimeExports.jsx(zt,_extends$u({},Ft,!isHostComponent(zt)&&{as:Ut,ownerState:_extends$u({},It,Ft.ownerState)},Nt,{children:Ct})),Ct.pop()]}))})):jsxRuntimeExports.jsx(ListContext$1.Provider,{value:jt,children:jsxRuntimeExports.jsxs(zt,_extends$u({},Ft,{as:Ut,ref:Wt},!isHostComponent(zt)&&{ownerState:_extends$u({},It,Ft.ownerState)},Nt,{children:[Ct,kt&&jsxRuntimeExports.jsx(ListItemSecondaryAction$1,{children:kt})]}))})}),ListItem$1=ListItem,listItemIconClasses=generateUtilityClasses("MuiListItemIcon",["root","alignItemsFlexStart"]),listItemIconClasses$1=listItemIconClasses,listItemTextClasses=generateUtilityClasses("MuiListItemText",["root","multiline","dense","inset","primary","secondary"]),listItemTextClasses$1=listItemTextClasses,_excluded$11=["actions","autoFocus","autoFocusItem","children","className","disabledItemsFocusable","disableListWrap","onKeyDown","variant"];function nextItem$1(tt,et,nt){return tt===et?tt.firstChild:et&&et.nextElementSibling?et.nextElementSibling:nt?null:tt.firstChild}function previousItem$1(tt,et,nt){return tt===et?nt?tt.firstChild:tt.lastChild:et&&et.previousElementSibling?et.previousElementSibling:nt?null:tt.lastChild}function textCriteriaMatches(tt,et){if(et===void 0)return!0;let nt=tt.innerText;return nt===void 0&&(nt=tt.textContent),nt=nt.trim().toLowerCase(),nt.length===0?!1:et.repeating?nt[0]===et.keys[0]:nt.indexOf(et.keys.join(""))===0}function moveFocus$1(tt,et,nt,rt,it,ot){let at=!1,st=it(tt,et,et?nt:!1);for(;st;){if(st===tt.firstChild){if(at)return!1;at=!0}const lt=rt?!1:st.disabled||st.getAttribute("aria-disabled")==="true";if(!st.hasAttribute("tabindex")||!textCriteriaMatches(st,ot)||lt)st=it(tt,st,nt);else return st.focus(),!0}return!1}const MenuList=reactExports.forwardRef(function(et,nt){const{actions:rt,autoFocus:it=!1,autoFocusItem:ot=!1,children:at,className:st,disabledItemsFocusable:lt=!1,disableListWrap:ct=!1,onKeyDown:ut,variant:ht="selectedMenu"}=et,dt=_objectWithoutPropertiesLoose$m(et,_excluded$11),pt=reactExports.useRef(null),mt=reactExports.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});useEnhancedEffect$1(()=>{it&&pt.current.focus()},[it]),reactExports.useImperativeHandle(rt,()=>({adjustStyleForScrollbar:(xt,kt)=>{const St=!pt.current.style.width;if(xt.clientHeight{const kt=pt.current,St=xt.key,Tt=ownerDocument(kt).activeElement;if(St==="ArrowDown")xt.preventDefault(),moveFocus$1(kt,Tt,ct,lt,nextItem$1);else if(St==="ArrowUp")xt.preventDefault(),moveFocus$1(kt,Tt,ct,lt,previousItem$1);else if(St==="Home")xt.preventDefault(),moveFocus$1(kt,null,ct,lt,nextItem$1);else if(St==="End")xt.preventDefault(),moveFocus$1(kt,null,ct,lt,previousItem$1);else if(St.length===1){const At=mt.current,Et=St.toLowerCase(),$t=performance.now();At.keys.length>0&&($t-At.lastTime>500?(At.keys=[],At.repeating=!0,At.previousKeyMatched=!0):At.repeating&&Et!==At.keys[0]&&(At.repeating=!1)),At.lastTime=$t,At.keys.push(Et);const Dt=Tt&&!At.repeating&&textCriteriaMatches(Tt,At);At.previousKeyMatched&&(Dt||moveFocus$1(kt,Tt,!1,lt,nextItem$1,At))?xt.preventDefault():At.previousKeyMatched=!1}ut&&ut(xt)},yt=useForkRef(pt,nt);let bt=-1;reactExports.Children.forEach(at,(xt,kt)=>{if(!reactExports.isValidElement(xt)){bt===kt&&(bt+=1,bt>=at.length&&(bt=-1));return}xt.props.disabled||(ht==="selectedMenu"&&xt.props.selected||bt===-1)&&(bt=kt),bt===kt&&(xt.props.disabled||xt.props.muiSkipListHighlight||xt.type.muiSkipListHighlight)&&(bt+=1,bt>=at.length&&(bt=-1))});const vt=reactExports.Children.map(at,(xt,kt)=>{if(kt===bt){const St={};return ot&&(St.autoFocus=!0),xt.props.tabIndex===void 0&&ht==="selectedMenu"&&(St.tabIndex=0),reactExports.cloneElement(xt,St)}return xt});return jsxRuntimeExports.jsx(List$1,_extends$u({role:"menu",ref:yt,className:st,onKeyDown:gt,tabIndex:it?0:-1},dt,{children:vt}))}),MenuList$1=MenuList;function getPopoverUtilityClass(tt){return generateUtilityClass("MuiPopover",tt)}generateUtilityClasses("MuiPopover",["root","paper"]);const _excluded$10=["onEntering"],_excluded2$e=["action","anchorEl","anchorOrigin","anchorPosition","anchorReference","children","className","container","elevation","marginThreshold","open","PaperProps","slots","slotProps","transformOrigin","TransitionComponent","transitionDuration","TransitionProps","disableScrollLock"],_excluded3$4=["slotProps"];function getOffsetTop(tt,et){let nt=0;return typeof et=="number"?nt=et:et==="center"?nt=tt.height/2:et==="bottom"&&(nt=tt.height),nt}function getOffsetLeft(tt,et){let nt=0;return typeof et=="number"?nt=et:et==="center"?nt=tt.width/2:et==="right"&&(nt=tt.width),nt}function getTransformOriginValue(tt){return[tt.horizontal,tt.vertical].map(et=>typeof et=="number"?`${et}px`:et).join(" ")}function resolveAnchorEl(tt){return typeof tt=="function"?tt():tt}const useUtilityClasses$x=tt=>{const{classes:et}=tt;return composeClasses({root:["root"],paper:["paper"]},getPopoverUtilityClass,et)},PopoverRoot=styled$1(Modal$1,{name:"MuiPopover",slot:"Root",overridesResolver:(tt,et)=>et.root})({}),PopoverPaper=styled$1(Paper$1,{name:"MuiPopover",slot:"Paper",overridesResolver:(tt,et)=>et.paper})({position:"absolute",overflowY:"auto",overflowX:"hidden",minWidth:16,minHeight:16,maxWidth:"calc(100% - 32px)",maxHeight:"calc(100% - 32px)",outline:0}),Popover=reactExports.forwardRef(function(et,nt){var rt,it,ot;const at=useThemeProps({props:et,name:"MuiPopover"}),{action:st,anchorEl:lt,anchorOrigin:ct={vertical:"top",horizontal:"left"},anchorPosition:ut,anchorReference:ht="anchorEl",children:dt,className:pt,container:mt,elevation:gt=8,marginThreshold:yt=16,open:bt,PaperProps:vt={},slots:xt,slotProps:kt,transformOrigin:St={vertical:"top",horizontal:"left"},TransitionComponent:Tt=Grow$1,transitionDuration:At="auto",TransitionProps:{onEntering:Et}={},disableScrollLock:$t=!1}=at,Dt=_objectWithoutPropertiesLoose$m(at.TransitionProps,_excluded$10),jt=_objectWithoutPropertiesLoose$m(at,_excluded2$e),Pt=(rt=kt==null?void 0:kt.paper)!=null?rt:vt,Ct=reactExports.useRef(),wt=useForkRef(Ct,Pt.ref),It=_extends$u({},at,{anchorOrigin:ct,anchorReference:ht,elevation:gt,marginThreshold:yt,externalPaperSlotProps:Pt,transformOrigin:St,TransitionComponent:Tt,transitionDuration:At,TransitionProps:Dt}),Ot=useUtilityClasses$x(It),Wt=reactExports.useCallback(()=>{if(ht==="anchorPosition")return ut;const _n=resolveAnchorEl(lt),$n=(_n&&_n.nodeType===1?_n:ownerDocument(Ct.current).body).getBoundingClientRect();return{top:$n.top+getOffsetTop($n,ct.vertical),left:$n.left+getOffsetLeft($n,ct.horizontal)}},[lt,ct.horizontal,ct.vertical,ut,ht]),zt=reactExports.useCallback(_n=>({vertical:getOffsetTop(_n,St.vertical),horizontal:getOffsetLeft(_n,St.horizontal)}),[St.horizontal,St.vertical]),Ft=reactExports.useCallback(_n=>{const Pn={width:_n.offsetWidth,height:_n.offsetHeight},$n=zt(Pn);if(ht==="none")return{top:null,left:null,transformOrigin:getTransformOriginValue($n)};const Nn=Wt();let Tn=Nn.top-$n.vertical,cn=Nn.left-$n.horizontal;const mn=Tn+Pn.height,In=cn+Pn.width,An=ownerWindow(resolveAnchorEl(lt)),wn=An.innerHeight-yt,fn=An.innerWidth-yt;if(yt!==null&&Tnwn){const pn=mn-wn;Tn-=pn,$n.vertical+=pn}if(yt!==null&&cnfn){const pn=In-fn;cn-=pn,$n.horizontal+=pn}return{top:`${Math.round(Tn)}px`,left:`${Math.round(cn)}px`,transformOrigin:getTransformOriginValue($n)}},[lt,ht,Wt,zt,yt]),[Nt,Ut]=reactExports.useState(bt),Mt=reactExports.useCallback(()=>{const _n=Ct.current;if(!_n)return;const Pn=Ft(_n);Pn.top!==null&&(_n.style.top=Pn.top),Pn.left!==null&&(_n.style.left=Pn.left),_n.style.transformOrigin=Pn.transformOrigin,Ut(!0)},[Ft]);reactExports.useEffect(()=>($t&&window.addEventListener("scroll",Mt),()=>window.removeEventListener("scroll",Mt)),[lt,$t,Mt]);const Ht=(_n,Pn)=>{Et&&Et(_n,Pn),Mt()},en=()=>{Ut(!1)};reactExports.useEffect(()=>{bt&&Mt()}),reactExports.useImperativeHandle(st,()=>bt?{updatePosition:()=>{Mt()}}:null,[bt,Mt]),reactExports.useEffect(()=>{if(!bt)return;const _n=debounce$5(()=>{Mt()}),Pn=ownerWindow(lt);return Pn.addEventListener("resize",_n),()=>{_n.clear(),Pn.removeEventListener("resize",_n)}},[lt,bt,Mt]);let sn=At;At==="auto"&&!Tt.muiSupportAuto&&(sn=void 0);const Kt=mt||(lt?ownerDocument(resolveAnchorEl(lt)).body:void 0),rn=(it=xt==null?void 0:xt.root)!=null?it:PopoverRoot,nn=(ot=xt==null?void 0:xt.paper)!=null?ot:PopoverPaper,hn=useSlotProps({elementType:nn,externalSlotProps:_extends$u({},Pt,{style:Nt?Pt.style:_extends$u({},Pt.style,{opacity:0})}),additionalProps:{elevation:gt,ref:wt},ownerState:It,className:clsx$3(Ot.paper,Pt==null?void 0:Pt.className)}),vn=useSlotProps({elementType:rn,externalSlotProps:(kt==null?void 0:kt.root)||{},externalForwardedProps:jt,additionalProps:{ref:nt,slotProps:{backdrop:{invisible:!0}},container:Kt,open:bt},ownerState:It,className:clsx$3(Ot.root,pt)}),{slotProps:an}=vn,Qt=_objectWithoutPropertiesLoose$m(vn,_excluded3$4);return jsxRuntimeExports.jsx(rn,_extends$u({},Qt,!isHostComponent(rn)&&{slotProps:an,disableScrollLock:$t},{children:jsxRuntimeExports.jsx(Tt,_extends$u({appear:!0,in:bt,onEntering:Ht,onExited:en,timeout:sn},Dt,{children:jsxRuntimeExports.jsx(nn,_extends$u({},hn,{children:dt}))}))}))}),Popover$1=Popover;function getMenuUtilityClass(tt){return generateUtilityClass("MuiMenu",tt)}generateUtilityClasses("MuiMenu",["root","paper","list"]);const _excluded$$=["onEntering"],_excluded2$d=["autoFocus","children","className","disableAutoFocusItem","MenuListProps","onClose","open","PaperProps","PopoverClasses","transitionDuration","TransitionProps","variant","slots","slotProps"],RTL_ORIGIN={vertical:"top",horizontal:"right"},LTR_ORIGIN={vertical:"top",horizontal:"left"},useUtilityClasses$w=tt=>{const{classes:et}=tt;return composeClasses({root:["root"],paper:["paper"],list:["list"]},getMenuUtilityClass,et)},MenuRoot=styled$1(Popover$1,{shouldForwardProp:tt=>rootShouldForwardProp(tt)||tt==="classes",name:"MuiMenu",slot:"Root",overridesResolver:(tt,et)=>et.root})({}),MenuPaper=styled$1(PopoverPaper,{name:"MuiMenu",slot:"Paper",overridesResolver:(tt,et)=>et.paper})({maxHeight:"calc(100% - 96px)",WebkitOverflowScrolling:"touch"}),MenuMenuList=styled$1(MenuList$1,{name:"MuiMenu",slot:"List",overridesResolver:(tt,et)=>et.list})({outline:0}),Menu=reactExports.forwardRef(function(et,nt){var rt,it;const ot=useThemeProps({props:et,name:"MuiMenu"}),{autoFocus:at=!0,children:st,className:lt,disableAutoFocusItem:ct=!1,MenuListProps:ut={},onClose:ht,open:dt,PaperProps:pt={},PopoverClasses:mt,transitionDuration:gt="auto",TransitionProps:{onEntering:yt}={},variant:bt="selectedMenu",slots:vt={},slotProps:xt={}}=ot,kt=_objectWithoutPropertiesLoose$m(ot.TransitionProps,_excluded$$),St=_objectWithoutPropertiesLoose$m(ot,_excluded2$d),Tt=useTheme(),At=Tt.direction==="rtl",Et=_extends$u({},ot,{autoFocus:at,disableAutoFocusItem:ct,MenuListProps:ut,onEntering:yt,PaperProps:pt,transitionDuration:gt,TransitionProps:kt,variant:bt}),$t=useUtilityClasses$w(Et),Dt=at&&!ct&&dt,jt=reactExports.useRef(null),Pt=(Ft,Nt)=>{jt.current&&jt.current.adjustStyleForScrollbar(Ft,Tt),yt&&yt(Ft,Nt)},Ct=Ft=>{Ft.key==="Tab"&&(Ft.preventDefault(),ht&&ht(Ft,"tabKeyDown"))};let wt=-1;reactExports.Children.map(st,(Ft,Nt)=>{reactExports.isValidElement(Ft)&&(Ft.props.disabled||(bt==="selectedMenu"&&Ft.props.selected||wt===-1)&&(wt=Nt))});const It=(rt=vt.paper)!=null?rt:MenuPaper,Ot=(it=xt.paper)!=null?it:pt,Wt=useSlotProps({elementType:vt.root,externalSlotProps:xt.root,ownerState:Et,className:[$t.root,lt]}),zt=useSlotProps({elementType:It,externalSlotProps:Ot,ownerState:Et,className:$t.paper});return jsxRuntimeExports.jsx(MenuRoot,_extends$u({onClose:ht,anchorOrigin:{vertical:"bottom",horizontal:At?"right":"left"},transformOrigin:At?RTL_ORIGIN:LTR_ORIGIN,slots:{paper:It,root:vt.root},slotProps:{root:Wt,paper:zt},open:dt,ref:nt,transitionDuration:gt,TransitionProps:_extends$u({onEntering:Pt},kt),ownerState:Et},St,{classes:mt,children:jsxRuntimeExports.jsx(MenuMenuList,_extends$u({onKeyDown:Ct,actions:jt,autoFocus:at&&(wt===-1||ct),autoFocusItem:Dt,variant:bt},ut,{className:clsx$3($t.list,ut.className),children:st}))}))}),Menu$1=Menu;function getMenuItemUtilityClass(tt){return generateUtilityClass("MuiMenuItem",tt)}const menuItemClasses=generateUtilityClasses("MuiMenuItem",["root","focusVisible","dense","disabled","divider","gutters","selected"]),menuItemClasses$1=menuItemClasses,_excluded$_=["autoFocus","component","dense","divider","disableGutters","focusVisibleClassName","role","tabIndex","className"],overridesResolver$1=(tt,et)=>{const{ownerState:nt}=tt;return[et.root,nt.dense&&et.dense,nt.divider&&et.divider,!nt.disableGutters&&et.gutters]},useUtilityClasses$v=tt=>{const{disabled:et,dense:nt,divider:rt,disableGutters:it,selected:ot,classes:at}=tt,lt=composeClasses({root:["root",nt&&"dense",et&&"disabled",!it&&"gutters",rt&&"divider",ot&&"selected"]},getMenuItemUtilityClass,at);return _extends$u({},at,lt)},MenuItemRoot=styled$1(ButtonBase$1,{shouldForwardProp:tt=>rootShouldForwardProp(tt)||tt==="classes",name:"MuiMenuItem",slot:"Root",overridesResolver:overridesResolver$1})(({theme:tt,ownerState:et})=>_extends$u({},tt.typography.body1,{display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minHeight:48,paddingTop:6,paddingBottom:6,boxSizing:"border-box",whiteSpace:"nowrap"},!et.disableGutters&&{paddingLeft:16,paddingRight:16},et.divider&&{borderBottom:`1px solid ${(tt.vars||tt).palette.divider}`,backgroundClip:"padding-box"},{"&:hover":{textDecoration:"none",backgroundColor:(tt.vars||tt).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${menuItemClasses$1.selected}`]:{backgroundColor:tt.vars?`rgba(${tt.vars.palette.primary.mainChannel} / ${tt.vars.palette.action.selectedOpacity})`:alpha$1(tt.palette.primary.main,tt.palette.action.selectedOpacity),[`&.${menuItemClasses$1.focusVisible}`]:{backgroundColor:tt.vars?`rgba(${tt.vars.palette.primary.mainChannel} / calc(${tt.vars.palette.action.selectedOpacity} + ${tt.vars.palette.action.focusOpacity}))`:alpha$1(tt.palette.primary.main,tt.palette.action.selectedOpacity+tt.palette.action.focusOpacity)}},[`&.${menuItemClasses$1.selected}:hover`]:{backgroundColor:tt.vars?`rgba(${tt.vars.palette.primary.mainChannel} / calc(${tt.vars.palette.action.selectedOpacity} + ${tt.vars.palette.action.hoverOpacity}))`:alpha$1(tt.palette.primary.main,tt.palette.action.selectedOpacity+tt.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:tt.vars?`rgba(${tt.vars.palette.primary.mainChannel} / ${tt.vars.palette.action.selectedOpacity})`:alpha$1(tt.palette.primary.main,tt.palette.action.selectedOpacity)}},[`&.${menuItemClasses$1.focusVisible}`]:{backgroundColor:(tt.vars||tt).palette.action.focus},[`&.${menuItemClasses$1.disabled}`]:{opacity:(tt.vars||tt).palette.action.disabledOpacity},[`& + .${dividerClasses.root}`]:{marginTop:tt.spacing(1),marginBottom:tt.spacing(1)},[`& + .${dividerClasses.inset}`]:{marginLeft:52},[`& .${listItemTextClasses$1.root}`]:{marginTop:0,marginBottom:0},[`& .${listItemTextClasses$1.inset}`]:{paddingLeft:36},[`& .${listItemIconClasses$1.root}`]:{minWidth:36}},!et.dense&&{[tt.breakpoints.up("sm")]:{minHeight:"auto"}},et.dense&&_extends$u({minHeight:32,paddingTop:4,paddingBottom:4},tt.typography.body2,{[`& .${listItemIconClasses$1.root} svg`]:{fontSize:"1.25rem"}}))),MenuItem=reactExports.forwardRef(function(et,nt){const rt=useThemeProps({props:et,name:"MuiMenuItem"}),{autoFocus:it=!1,component:ot="li",dense:at=!1,divider:st=!1,disableGutters:lt=!1,focusVisibleClassName:ct,role:ut="menuitem",tabIndex:ht,className:dt}=rt,pt=_objectWithoutPropertiesLoose$m(rt,_excluded$_),mt=reactExports.useContext(ListContext$1),gt=reactExports.useMemo(()=>({dense:at||mt.dense||!1,disableGutters:lt}),[mt.dense,at,lt]),yt=reactExports.useRef(null);useEnhancedEffect$1(()=>{it&&yt.current&&yt.current.focus()},[it]);const bt=_extends$u({},rt,{dense:gt.dense,divider:st,disableGutters:lt}),vt=useUtilityClasses$v(rt),xt=useForkRef(yt,nt);let kt;return rt.disabled||(kt=ht!==void 0?ht:-1),jsxRuntimeExports.jsx(ListContext$1.Provider,{value:gt,children:jsxRuntimeExports.jsx(MenuItemRoot,_extends$u({ref:xt,role:ut,tabIndex:kt,component:ot,focusVisibleClassName:clsx$3(vt.focusVisible,ct),className:clsx$3(vt.root,dt)},pt,{ownerState:bt,classes:vt}))})}),MenuItem$1=MenuItem;function getNativeSelectUtilityClasses(tt){return generateUtilityClass("MuiNativeSelect",tt)}const nativeSelectClasses=generateUtilityClasses("MuiNativeSelect",["root","select","multiple","filled","outlined","standard","disabled","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]),nativeSelectClasses$1=nativeSelectClasses,_excluded$Z=["className","disabled","error","IconComponent","inputRef","variant"],useUtilityClasses$u=tt=>{const{classes:et,variant:nt,disabled:rt,multiple:it,open:ot,error:at}=tt,st={select:["select",nt,rt&&"disabled",it&&"multiple",at&&"error"],icon:["icon",`icon${capitalize(nt)}`,ot&&"iconOpen",rt&&"disabled"]};return composeClasses(st,getNativeSelectUtilityClasses,et)},nativeSelectSelectStyles=({ownerState:tt,theme:et})=>_extends$u({MozAppearance:"none",WebkitAppearance:"none",userSelect:"none",borderRadius:0,cursor:"pointer","&:focus":_extends$u({},et.vars?{backgroundColor:`rgba(${et.vars.palette.common.onBackgroundChannel} / 0.05)`}:{backgroundColor:et.palette.mode==="light"?"rgba(0, 0, 0, 0.05)":"rgba(255, 255, 255, 0.05)"},{borderRadius:0}),"&::-ms-expand":{display:"none"},[`&.${nativeSelectClasses$1.disabled}`]:{cursor:"default"},"&[multiple]":{height:"auto"},"&:not([multiple]) option, &:not([multiple]) optgroup":{backgroundColor:(et.vars||et).palette.background.paper},"&&&":{paddingRight:24,minWidth:16}},tt.variant==="filled"&&{"&&&":{paddingRight:32}},tt.variant==="outlined"&&{borderRadius:(et.vars||et).shape.borderRadius,"&:focus":{borderRadius:(et.vars||et).shape.borderRadius},"&&&":{paddingRight:32}}),NativeSelectSelect=styled$1("select",{name:"MuiNativeSelect",slot:"Select",shouldForwardProp:rootShouldForwardProp,overridesResolver:(tt,et)=>{const{ownerState:nt}=tt;return[et.select,et[nt.variant],nt.error&&et.error,{[`&.${nativeSelectClasses$1.multiple}`]:et.multiple}]}})(nativeSelectSelectStyles),nativeSelectIconStyles=({ownerState:tt,theme:et})=>_extends$u({position:"absolute",right:0,top:"calc(50% - .5em)",pointerEvents:"none",color:(et.vars||et).palette.action.active,[`&.${nativeSelectClasses$1.disabled}`]:{color:(et.vars||et).palette.action.disabled}},tt.open&&{transform:"rotate(180deg)"},tt.variant==="filled"&&{right:7},tt.variant==="outlined"&&{right:7}),NativeSelectIcon=styled$1("svg",{name:"MuiNativeSelect",slot:"Icon",overridesResolver:(tt,et)=>{const{ownerState:nt}=tt;return[et.icon,nt.variant&&et[`icon${capitalize(nt.variant)}`],nt.open&&et.iconOpen]}})(nativeSelectIconStyles),NativeSelectInput=reactExports.forwardRef(function(et,nt){const{className:rt,disabled:it,error:ot,IconComponent:at,inputRef:st,variant:lt="standard"}=et,ct=_objectWithoutPropertiesLoose$m(et,_excluded$Z),ut=_extends$u({},et,{disabled:it,variant:lt,error:ot}),ht=useUtilityClasses$u(ut);return jsxRuntimeExports.jsxs(reactExports.Fragment,{children:[jsxRuntimeExports.jsx(NativeSelectSelect,_extends$u({ownerState:ut,className:clsx$3(ht.select,rt),disabled:it,ref:st||nt},ct)),et.multiple?null:jsxRuntimeExports.jsx(NativeSelectIcon,{as:at,ownerState:ut,className:ht.icon})]})}),NativeSelectInput$1=NativeSelectInput;var _span$1;const _excluded$Y=["children","classes","className","label","notched"],NotchedOutlineRoot$1=styled$1("fieldset")({textAlign:"left",position:"absolute",bottom:0,right:0,top:-5,left:0,margin:0,padding:"0 8px",pointerEvents:"none",borderRadius:"inherit",borderStyle:"solid",borderWidth:1,overflow:"hidden",minWidth:"0%"}),NotchedOutlineLegend=styled$1("legend")(({ownerState:tt,theme:et})=>_extends$u({float:"unset",width:"auto",overflow:"hidden"},!tt.withLabel&&{padding:0,lineHeight:"11px",transition:et.transitions.create("width",{duration:150,easing:et.transitions.easing.easeOut})},tt.withLabel&&_extends$u({display:"block",padding:0,height:11,fontSize:"0.75em",visibility:"hidden",maxWidth:.01,transition:et.transitions.create("max-width",{duration:50,easing:et.transitions.easing.easeOut}),whiteSpace:"nowrap","& > span":{paddingLeft:5,paddingRight:5,display:"inline-block",opacity:0,visibility:"visible"}},tt.notched&&{maxWidth:"100%",transition:et.transitions.create("max-width",{duration:100,easing:et.transitions.easing.easeOut,delay:50})})));function NotchedOutline(tt){const{className:et,label:nt,notched:rt}=tt,it=_objectWithoutPropertiesLoose$m(tt,_excluded$Y),ot=nt!=null&&nt!=="",at=_extends$u({},tt,{notched:rt,withLabel:ot});return jsxRuntimeExports.jsx(NotchedOutlineRoot$1,_extends$u({"aria-hidden":!0,className:et,ownerState:at},it,{children:jsxRuntimeExports.jsx(NotchedOutlineLegend,{ownerState:at,children:ot?jsxRuntimeExports.jsx("span",{children:nt}):_span$1||(_span$1=jsxRuntimeExports.jsx("span",{className:"notranslate",children:"​"}))})}))}const _excluded$X=["components","fullWidth","inputComponent","label","multiline","notched","slots","type"],useUtilityClasses$t=tt=>{const{classes:et}=tt,rt=composeClasses({root:["root"],notchedOutline:["notchedOutline"],input:["input"]},getOutlinedInputUtilityClass,et);return _extends$u({},et,rt)},OutlinedInputRoot=styled$1(InputBaseRoot,{shouldForwardProp:tt=>rootShouldForwardProp(tt)||tt==="classes",name:"MuiOutlinedInput",slot:"Root",overridesResolver:rootOverridesResolver})(({theme:tt,ownerState:et})=>{const nt=tt.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return _extends$u({position:"relative",borderRadius:(tt.vars||tt).shape.borderRadius,[`&:hover .${outlinedInputClasses$1.notchedOutline}`]:{borderColor:(tt.vars||tt).palette.text.primary},"@media (hover: none)":{[`&:hover .${outlinedInputClasses$1.notchedOutline}`]:{borderColor:tt.vars?`rgba(${tt.vars.palette.common.onBackgroundChannel} / 0.23)`:nt}},[`&.${outlinedInputClasses$1.focused} .${outlinedInputClasses$1.notchedOutline}`]:{borderColor:(tt.vars||tt).palette[et.color].main,borderWidth:2},[`&.${outlinedInputClasses$1.error} .${outlinedInputClasses$1.notchedOutline}`]:{borderColor:(tt.vars||tt).palette.error.main},[`&.${outlinedInputClasses$1.disabled} .${outlinedInputClasses$1.notchedOutline}`]:{borderColor:(tt.vars||tt).palette.action.disabled}},et.startAdornment&&{paddingLeft:14},et.endAdornment&&{paddingRight:14},et.multiline&&_extends$u({padding:"16.5px 14px"},et.size==="small"&&{padding:"8.5px 14px"}))}),NotchedOutlineRoot=styled$1(NotchedOutline,{name:"MuiOutlinedInput",slot:"NotchedOutline",overridesResolver:(tt,et)=>et.notchedOutline})(({theme:tt})=>{const et=tt.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{borderColor:tt.vars?`rgba(${tt.vars.palette.common.onBackgroundChannel} / 0.23)`:et}}),OutlinedInputInput=styled$1(InputBaseComponent,{name:"MuiOutlinedInput",slot:"Input",overridesResolver:inputOverridesResolver})(({theme:tt,ownerState:et})=>_extends$u({padding:"16.5px 14px"},!tt.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:tt.palette.mode==="light"?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:tt.palette.mode==="light"?null:"#fff",caretColor:tt.palette.mode==="light"?null:"#fff",borderRadius:"inherit"}},tt.vars&&{"&:-webkit-autofill":{borderRadius:"inherit"},[tt.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},et.size==="small"&&{padding:"8.5px 14px"},et.multiline&&{padding:0},et.startAdornment&&{paddingLeft:0},et.endAdornment&&{paddingRight:0})),OutlinedInput=reactExports.forwardRef(function(et,nt){var rt,it,ot,at,st;const lt=useThemeProps({props:et,name:"MuiOutlinedInput"}),{components:ct={},fullWidth:ut=!1,inputComponent:ht="input",label:dt,multiline:pt=!1,notched:mt,slots:gt={},type:yt="text"}=lt,bt=_objectWithoutPropertiesLoose$m(lt,_excluded$X),vt=useUtilityClasses$t(lt),xt=useFormControl(),kt=formControlState({props:lt,muiFormControl:xt,states:["color","disabled","error","focused","hiddenLabel","size","required"]}),St=_extends$u({},lt,{color:kt.color||"primary",disabled:kt.disabled,error:kt.error,focused:kt.focused,formControl:xt,fullWidth:ut,hiddenLabel:kt.hiddenLabel,multiline:pt,size:kt.size,type:yt}),Tt=(rt=(it=gt.root)!=null?it:ct.Root)!=null?rt:OutlinedInputRoot,At=(ot=(at=gt.input)!=null?at:ct.Input)!=null?ot:OutlinedInputInput;return jsxRuntimeExports.jsx(InputBase$1,_extends$u({slots:{root:Tt,input:At},renderSuffix:Et=>jsxRuntimeExports.jsx(NotchedOutlineRoot,{ownerState:St,className:vt.notchedOutline,label:dt!=null&&dt!==""&&kt.required?st||(st=jsxRuntimeExports.jsxs(reactExports.Fragment,{children:[dt," ","*"]})):dt,notched:typeof mt<"u"?mt:!!(Et.startAdornment||Et.filled||Et.focused)}),fullWidth:ut,inputComponent:ht,multiline:pt,ref:nt,type:yt},bt,{classes:_extends$u({},vt,{notchedOutline:null})}))});OutlinedInput.muiName="Input";const OutlinedInput$1=OutlinedInput;function getSelectUtilityClasses(tt){return generateUtilityClass("MuiSelect",tt)}const selectClasses=generateUtilityClasses("MuiSelect",["root","select","multiple","filled","outlined","standard","disabled","focused","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]),selectClasses$1=selectClasses;var _span;const _excluded$W=["aria-describedby","aria-label","autoFocus","autoWidth","children","className","defaultOpen","defaultValue","disabled","displayEmpty","error","IconComponent","inputRef","labelId","MenuProps","multiple","name","onBlur","onChange","onClose","onFocus","onOpen","open","readOnly","renderValue","SelectDisplayProps","tabIndex","type","value","variant"],SelectSelect=styled$1("div",{name:"MuiSelect",slot:"Select",overridesResolver:(tt,et)=>{const{ownerState:nt}=tt;return[{[`&.${selectClasses$1.select}`]:et.select},{[`&.${selectClasses$1.select}`]:et[nt.variant]},{[`&.${selectClasses$1.error}`]:et.error},{[`&.${selectClasses$1.multiple}`]:et.multiple}]}})(nativeSelectSelectStyles,{[`&.${selectClasses$1.select}`]:{height:"auto",minHeight:"1.4375em",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"}}),SelectIcon=styled$1("svg",{name:"MuiSelect",slot:"Icon",overridesResolver:(tt,et)=>{const{ownerState:nt}=tt;return[et.icon,nt.variant&&et[`icon${capitalize(nt.variant)}`],nt.open&&et.iconOpen]}})(nativeSelectIconStyles),SelectNativeInput=styled$1("input",{shouldForwardProp:tt=>slotShouldForwardProp(tt)&&tt!=="classes",name:"MuiSelect",slot:"NativeInput",overridesResolver:(tt,et)=>et.nativeInput})({bottom:0,left:0,position:"absolute",opacity:0,pointerEvents:"none",width:"100%",boxSizing:"border-box"});function areEqualValues(tt,et){return typeof et=="object"&&et!==null?tt===et:String(tt)===String(et)}function isEmpty(tt){return tt==null||typeof tt=="string"&&!tt.trim()}const useUtilityClasses$s=tt=>{const{classes:et,variant:nt,disabled:rt,multiple:it,open:ot,error:at}=tt,st={select:["select",nt,rt&&"disabled",it&&"multiple",at&&"error"],icon:["icon",`icon${capitalize(nt)}`,ot&&"iconOpen",rt&&"disabled"],nativeInput:["nativeInput"]};return composeClasses(st,getSelectUtilityClasses,et)},SelectInput=reactExports.forwardRef(function(et,nt){var rt;const{"aria-describedby":it,"aria-label":ot,autoFocus:at,autoWidth:st,children:lt,className:ct,defaultOpen:ut,defaultValue:ht,disabled:dt,displayEmpty:pt,error:mt=!1,IconComponent:gt,inputRef:yt,labelId:bt,MenuProps:vt={},multiple:xt,name:kt,onBlur:St,onChange:Tt,onClose:At,onFocus:Et,onOpen:$t,open:Dt,readOnly:jt,renderValue:Pt,SelectDisplayProps:Ct={},tabIndex:wt,value:It,variant:Ot="standard"}=et,Wt=_objectWithoutPropertiesLoose$m(et,_excluded$W),[zt,Ft]=useControlled({controlled:It,default:ht,name:"Select"}),[Nt,Ut]=useControlled({controlled:Dt,default:ut,name:"Select"}),Mt=reactExports.useRef(null),Ht=reactExports.useRef(null),[en,sn]=reactExports.useState(null),{current:Kt}=reactExports.useRef(Dt!=null),[rn,nn]=reactExports.useState(),hn=useForkRef(nt,yt),vn=reactExports.useCallback(On=>{Ht.current=On,On&&sn(On)},[]),an=en==null?void 0:en.parentNode;reactExports.useImperativeHandle(hn,()=>({focus:()=>{Ht.current.focus()},node:Mt.current,value:zt}),[zt]),reactExports.useEffect(()=>{ut&&Nt&&en&&!Kt&&(nn(st?null:an.clientWidth),Ht.current.focus())},[en,st]),reactExports.useEffect(()=>{at&&Ht.current.focus()},[at]),reactExports.useEffect(()=>{if(!bt)return;const On=ownerDocument(Ht.current).getElementById(bt);if(On){const Zn=()=>{getSelection().isCollapsed&&Ht.current.focus()};return On.addEventListener("click",Zn),()=>{On.removeEventListener("click",Zn)}}},[bt]);const Qt=(On,Zn)=>{On?$t&&$t(Zn):At&&At(Zn),Kt||(nn(st?null:an.clientWidth),Ut(On))},_n=On=>{On.button===0&&(On.preventDefault(),Ht.current.focus(),Qt(!0,On))},Pn=On=>{Qt(!1,On)},$n=reactExports.Children.toArray(lt),Nn=On=>{const Zn=$n.find(Vn=>Vn.props.value===On.target.value);Zn!==void 0&&(Ft(Zn.props.value),Tt&&Tt(On,Zn))},Tn=On=>Zn=>{let Vn;if(Zn.currentTarget.hasAttribute("tabindex")){if(xt){Vn=Array.isArray(zt)?zt.slice():[];const qn=zt.indexOf(On.props.value);qn===-1?Vn.push(On.props.value):Vn.splice(qn,1)}else Vn=On.props.value;if(On.props.onClick&&On.props.onClick(Zn),zt!==Vn&&(Ft(Vn),Tt)){const qn=Zn.nativeEvent||Zn,zn=new qn.constructor(qn.type,qn);Object.defineProperty(zn,"target",{writable:!0,value:{value:Vn,name:kt}}),Tt(zn,On)}xt||Qt(!1,Zn)}},cn=On=>{jt||[" ","ArrowUp","ArrowDown","Enter"].indexOf(On.key)!==-1&&(On.preventDefault(),Qt(!0,On))},mn=en!==null&&Nt,In=On=>{!mn&&St&&(Object.defineProperty(On,"target",{writable:!0,value:{value:zt,name:kt}}),St(On))};delete Wt["aria-invalid"];let An,wn;const fn=[];let pn=!1;(isFilled({value:zt})||pt)&&(Pt?An=Pt(zt):pn=!0);const kn=$n.map(On=>{if(!reactExports.isValidElement(On))return null;let Zn;if(xt){if(!Array.isArray(zt))throw new Error(formatMuiErrorMessage(2));Zn=zt.some(Vn=>areEqualValues(Vn,On.props.value)),Zn&&pn&&fn.push(On.props.children)}else Zn=areEqualValues(zt,On.props.value),Zn&&pn&&(wn=On.props.children);return reactExports.cloneElement(On,{"aria-selected":Zn?"true":"false",onClick:Tn(On),onKeyUp:Vn=>{Vn.key===" "&&Vn.preventDefault(),On.props.onKeyUp&&On.props.onKeyUp(Vn)},role:"option",selected:Zn,value:void 0,"data-value":On.props.value})});pn&&(xt?fn.length===0?An=null:An=fn.reduce((On,Zn,Vn)=>(On.push(Zn),Vn{const{classes:et}=tt;return et},styledRootConfig={name:"MuiSelect",overridesResolver:(tt,et)=>et.root,shouldForwardProp:tt=>rootShouldForwardProp(tt)&&tt!=="variant",slot:"Root"},StyledInput$1=styled$1(Input$3,styledRootConfig)(""),StyledOutlinedInput=styled$1(OutlinedInput$1,styledRootConfig)(""),StyledFilledInput=styled$1(FilledInput$1,styledRootConfig)(""),Select$3=reactExports.forwardRef(function(et,nt){const rt=useThemeProps({name:"MuiSelect",props:et}),{autoWidth:it=!1,children:ot,classes:at={},className:st,defaultOpen:lt=!1,displayEmpty:ct=!1,IconComponent:ut=ArrowDropDownIcon$1,id:ht,input:dt,inputProps:pt,label:mt,labelId:gt,MenuProps:yt,multiple:bt=!1,native:vt=!1,onClose:xt,onOpen:kt,open:St,renderValue:Tt,SelectDisplayProps:At,variant:Et="outlined"}=rt,$t=_objectWithoutPropertiesLoose$m(rt,_excluded$V),Dt=vt?NativeSelectInput$1:SelectInput$1,jt=useFormControl(),Pt=formControlState({props:rt,muiFormControl:jt,states:["variant","error"]}),Ct=Pt.variant||Et,wt=_extends$u({},rt,{variant:Ct,classes:at}),It=useUtilityClasses$r(wt),Ot=_objectWithoutPropertiesLoose$m(It,_excluded2$c),Wt=dt||{standard:jsxRuntimeExports.jsx(StyledInput$1,{ownerState:wt}),outlined:jsxRuntimeExports.jsx(StyledOutlinedInput,{label:mt,ownerState:wt}),filled:jsxRuntimeExports.jsx(StyledFilledInput,{ownerState:wt})}[Ct],zt=useForkRef(nt,Wt.ref);return jsxRuntimeExports.jsx(reactExports.Fragment,{children:reactExports.cloneElement(Wt,_extends$u({inputComponent:Dt,inputProps:_extends$u({children:ot,error:Pt.error,IconComponent:ut,variant:Ct,type:void 0,multiple:bt},vt?{id:ht}:{autoWidth:it,defaultOpen:lt,displayEmpty:ct,labelId:gt,MenuProps:yt,onClose:xt,onOpen:kt,open:St,renderValue:Tt,SelectDisplayProps:_extends$u({id:ht},At)},pt,{classes:pt?deepmerge$1(Ot,pt.classes):Ot},dt?dt.props.inputProps:{})},bt&&vt&&Ct==="outlined"?{notched:!0}:{},{ref:zt,className:clsx$3(Wt.props.className,st,It.root)},!dt&&{variant:Ct},$t))})});Select$3.muiName="Select";const Select$4=Select$3;function getSkeletonUtilityClass(tt){return generateUtilityClass("MuiSkeleton",tt)}generateUtilityClasses("MuiSkeleton",["root","text","rectangular","rounded","circular","pulse","wave","withChildren","fitContent","heightAuto"]);const _excluded$U=["animation","className","component","height","style","variant","width"];let _=tt=>tt,_t,_t2,_t3,_t4;const useUtilityClasses$q=tt=>{const{classes:et,variant:nt,animation:rt,hasChildren:it,width:ot,height:at}=tt;return composeClasses({root:["root",nt,rt,it&&"withChildren",it&&!ot&&"fitContent",it&&!at&&"heightAuto"]},getSkeletonUtilityClass,et)},pulseKeyframe=keyframes(_t||(_t=_` - 0% { - opacity: 1; + ieee754.write = function (tt, et, nt, rt, it, ot) { + var at, + st, + lt, + ct = ot * 8 - it - 1, + ut = (1 << ct) - 1, + ht = ut >> 1, + dt = it === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0, + pt = rt ? 0 : ot - 1, + mt = rt ? 1 : -1, + gt = et < 0 || (et === 0 && 1 / et < 0) ? 1 : 0 + for ( + et = Math.abs(et), + isNaN(et) || et === 1 / 0 + ? ((st = isNaN(et) ? 1 : 0), (at = ut)) + : ((at = Math.floor(Math.log(et) / Math.LN2)), + et * (lt = Math.pow(2, -at)) < 1 && (at--, (lt *= 2)), + at + ht >= 1 ? (et += dt / lt) : (et += dt * Math.pow(2, 1 - ht)), + et * lt >= 2 && (at++, (lt /= 2)), + at + ht >= ut + ? ((st = 0), (at = ut)) + : at + ht >= 1 + ? ((st = (et * lt - 1) * Math.pow(2, it)), (at = at + ht)) + : ((st = et * Math.pow(2, ht - 1) * Math.pow(2, it)), (at = 0))); + it >= 8; + tt[nt + pt] = st & 255, pt += mt, st /= 256, it -= 8 + ); + for (at = (at << it) | st, ct += it; ct > 0; tt[nt + pt] = at & 255, pt += mt, at /= 256, ct -= 8); + tt[nt + pt - mt] |= gt * 128 } - - 50% { - opacity: 0.4; + /*! + * The buffer module from node.js, for the browser. + * + * @author Feross Aboukhadijeh + * @license MIT + */ ;(function (tt) { + const et = base64Js, + nt = ieee754, + rt = + typeof Symbol == 'function' && typeof Symbol.for == 'function' ? Symbol.for('nodejs.util.inspect.custom') : null + ;(tt.Buffer = st), (tt.SlowBuffer = vt), (tt.INSPECT_MAX_BYTES = 50) + const it = 2147483647 + ;(tt.kMaxLength = it), + (st.TYPED_ARRAY_SUPPORT = ot()), + !st.TYPED_ARRAY_SUPPORT && + typeof console < 'u' && + typeof console.error == 'function' && + console.error( + 'This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.', + ) + function ot() { + try { + const un = new Uint8Array(1), + Zt = { + foo: function () { + return 42 + }, + } + return Object.setPrototypeOf(Zt, Uint8Array.prototype), Object.setPrototypeOf(un, Zt), un.foo() === 42 + } catch { + return !1 + } + } + Object.defineProperty(st.prototype, 'parent', { + enumerable: !0, + get: function () { + if (st.isBuffer(this)) return this.buffer + }, + }), + Object.defineProperty(st.prototype, 'offset', { + enumerable: !0, + get: function () { + if (st.isBuffer(this)) return this.byteOffset + }, + }) + function at(un) { + if (un > it) throw new RangeError('The value "' + un + '" is invalid for option "size"') + const Zt = new Uint8Array(un) + return Object.setPrototypeOf(Zt, st.prototype), Zt + } + function st(un, Zt, Xt) { + if (typeof un == 'number') { + if (typeof Zt == 'string') + throw new TypeError('The "string" argument must be of type string. Received type number') + return ht(un) + } + return lt(un, Zt, Xt) + } + st.poolSize = 8192 + function lt(un, Zt, Xt) { + if (typeof un == 'string') return dt(un, Zt) + if (ArrayBuffer.isView(un)) return mt(un) + if (un == null) + throw new TypeError( + 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type ' + + typeof un, + ) + if ( + wn(un, ArrayBuffer) || + (un && wn(un.buffer, ArrayBuffer)) || + (typeof SharedArrayBuffer < 'u' && (wn(un, SharedArrayBuffer) || (un && wn(un.buffer, SharedArrayBuffer)))) + ) + return gt(un, Zt, Xt) + if (typeof un == 'number') + throw new TypeError('The "value" argument must not be of type number. Received type number') + const Sn = un.valueOf && un.valueOf() + if (Sn != null && Sn !== un) return st.from(Sn, Zt, Xt) + const Rn = yt(un) + if (Rn) return Rn + if (typeof Symbol < 'u' && Symbol.toPrimitive != null && typeof un[Symbol.toPrimitive] == 'function') + return st.from(un[Symbol.toPrimitive]('string'), Zt, Xt) + throw new TypeError( + 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type ' + + typeof un, + ) + } + ;(st.from = function (un, Zt, Xt) { + return lt(un, Zt, Xt) + }), + Object.setPrototypeOf(st.prototype, Uint8Array.prototype), + Object.setPrototypeOf(st, Uint8Array) + function ct(un) { + if (typeof un != 'number') throw new TypeError('"size" argument must be of type number') + if (un < 0) throw new RangeError('The value "' + un + '" is invalid for option "size"') + } + function ut(un, Zt, Xt) { + return ( + ct(un), + un <= 0 ? at(un) : Zt !== void 0 ? (typeof Xt == 'string' ? at(un).fill(Zt, Xt) : at(un).fill(Zt)) : at(un) + ) + } + st.alloc = function (un, Zt, Xt) { + return ut(un, Zt, Xt) + } + function ht(un) { + return ct(un), at(un < 0 ? 0 : bt(un) | 0) + } + ;(st.allocUnsafe = function (un) { + return ht(un) + }), + (st.allocUnsafeSlow = function (un) { + return ht(un) + }) + function dt(un, Zt) { + if (((typeof Zt != 'string' || Zt === '') && (Zt = 'utf8'), !st.isEncoding(Zt))) + throw new TypeError('Unknown encoding: ' + Zt) + const Xt = xt(un, Zt) | 0 + let Sn = at(Xt) + const Rn = Sn.write(un, Zt) + return Rn !== Xt && (Sn = Sn.slice(0, Rn)), Sn + } + function pt(un) { + const Zt = un.length < 0 ? 0 : bt(un.length) | 0, + Xt = at(Zt) + for (let Sn = 0; Sn < Zt; Sn += 1) Xt[Sn] = un[Sn] & 255 + return Xt + } + function mt(un) { + if (wn(un, Uint8Array)) { + const Zt = new Uint8Array(un) + return gt(Zt.buffer, Zt.byteOffset, Zt.byteLength) + } + return pt(un) + } + function gt(un, Zt, Xt) { + if (Zt < 0 || un.byteLength < Zt) throw new RangeError('"offset" is outside of buffer bounds') + if (un.byteLength < Zt + (Xt || 0)) throw new RangeError('"length" is outside of buffer bounds') + let Sn + return ( + Zt === void 0 && Xt === void 0 + ? (Sn = new Uint8Array(un)) + : Xt === void 0 + ? (Sn = new Uint8Array(un, Zt)) + : (Sn = new Uint8Array(un, Zt, Xt)), + Object.setPrototypeOf(Sn, st.prototype), + Sn + ) + } + function yt(un) { + if (st.isBuffer(un)) { + const Zt = bt(un.length) | 0, + Xt = at(Zt) + return Xt.length === 0 || un.copy(Xt, 0, 0, Zt), Xt + } + if (un.length !== void 0) return typeof un.length != 'number' || fn(un.length) ? at(0) : pt(un) + if (un.type === 'Buffer' && Array.isArray(un.data)) return pt(un.data) + } + function bt(un) { + if (un >= it) + throw new RangeError('Attempt to allocate Buffer larger than maximum size: 0x' + it.toString(16) + ' bytes') + return un | 0 + } + function vt(un) { + return +un != un && (un = 0), st.alloc(+un) + } + ;(st.isBuffer = function (Zt) { + return Zt != null && Zt._isBuffer === !0 && Zt !== st.prototype + }), + (st.compare = function (Zt, Xt) { + if ( + (wn(Zt, Uint8Array) && (Zt = st.from(Zt, Zt.offset, Zt.byteLength)), + wn(Xt, Uint8Array) && (Xt = st.from(Xt, Xt.offset, Xt.byteLength)), + !st.isBuffer(Zt) || !st.isBuffer(Xt)) + ) + throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array') + if (Zt === Xt) return 0 + let Sn = Zt.length, + Rn = Xt.length + for (let jn = 0, On = Math.min(Sn, Rn); jn < On; ++jn) + if (Zt[jn] !== Xt[jn]) { + ;(Sn = Zt[jn]), (Rn = Xt[jn]) + break + } + return Sn < Rn ? -1 : Rn < Sn ? 1 : 0 + }), + (st.isEncoding = function (Zt) { + switch (String(Zt).toLowerCase()) { + case 'hex': + case 'utf8': + case 'utf-8': + case 'ascii': + case 'latin1': + case 'binary': + case 'base64': + case 'ucs2': + case 'ucs-2': + case 'utf16le': + case 'utf-16le': + return !0 + default: + return !1 + } + }), + (st.concat = function (Zt, Xt) { + if (!Array.isArray(Zt)) throw new TypeError('"list" argument must be an Array of Buffers') + if (Zt.length === 0) return st.alloc(0) + let Sn + if (Xt === void 0) for (Xt = 0, Sn = 0; Sn < Zt.length; ++Sn) Xt += Zt[Sn].length + const Rn = st.allocUnsafe(Xt) + let jn = 0 + for (Sn = 0; Sn < Zt.length; ++Sn) { + let On = Zt[Sn] + if (wn(On, Uint8Array)) + jn + On.length > Rn.length + ? (st.isBuffer(On) || (On = st.from(On)), On.copy(Rn, jn)) + : Uint8Array.prototype.set.call(Rn, On, jn) + else if (st.isBuffer(On)) On.copy(Rn, jn) + else throw new TypeError('"list" argument must be an Array of Buffers') + jn += On.length + } + return Rn + }) + function xt(un, Zt) { + if (st.isBuffer(un)) return un.length + if (ArrayBuffer.isView(un) || wn(un, ArrayBuffer)) return un.byteLength + if (typeof un != 'string') + throw new TypeError( + 'The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type ' + typeof un, + ) + const Xt = un.length, + Sn = arguments.length > 2 && arguments[2] === !0 + if (!Sn && Xt === 0) return 0 + let Rn = !1 + for (;;) + switch (Zt) { + case 'ascii': + case 'latin1': + case 'binary': + return Xt + case 'utf8': + case 'utf-8': + return Tn(un).length + case 'ucs2': + case 'ucs-2': + case 'utf16le': + case 'utf-16le': + return Xt * 2 + case 'hex': + return Xt >>> 1 + case 'base64': + return In(un).length + default: + if (Rn) return Sn ? -1 : Tn(un).length + ;(Zt = ('' + Zt).toLowerCase()), (Rn = !0) + } + } + st.byteLength = xt + function kt(un, Zt, Xt) { + let Sn = !1 + if ( + ((Zt === void 0 || Zt < 0) && (Zt = 0), + Zt > this.length || + ((Xt === void 0 || Xt > this.length) && (Xt = this.length), Xt <= 0) || + ((Xt >>>= 0), (Zt >>>= 0), Xt <= Zt)) + ) + return '' + for (un || (un = 'utf8'); ; ) + switch (un) { + case 'hex': + return Ft(this, Zt, Xt) + case 'utf8': + case 'utf-8': + return wt(this, Zt, Xt) + case 'ascii': + return Wt(this, Zt, Xt) + case 'latin1': + case 'binary': + return zt(this, Zt, Xt) + case 'base64': + return Ct(this, Zt, Xt) + case 'ucs2': + case 'ucs-2': + case 'utf16le': + case 'utf-16le': + return Nt(this, Zt, Xt) + default: + if (Sn) throw new TypeError('Unknown encoding: ' + un) + ;(un = (un + '').toLowerCase()), (Sn = !0) + } + } + st.prototype._isBuffer = !0 + function St(un, Zt, Xt) { + const Sn = un[Zt] + ;(un[Zt] = un[Xt]), (un[Xt] = Sn) + } + ;(st.prototype.swap16 = function () { + const Zt = this.length + if (Zt % 2 !== 0) throw new RangeError('Buffer size must be a multiple of 16-bits') + for (let Xt = 0; Xt < Zt; Xt += 2) St(this, Xt, Xt + 1) + return this + }), + (st.prototype.swap32 = function () { + const Zt = this.length + if (Zt % 4 !== 0) throw new RangeError('Buffer size must be a multiple of 32-bits') + for (let Xt = 0; Xt < Zt; Xt += 4) St(this, Xt, Xt + 3), St(this, Xt + 1, Xt + 2) + return this + }), + (st.prototype.swap64 = function () { + const Zt = this.length + if (Zt % 8 !== 0) throw new RangeError('Buffer size must be a multiple of 64-bits') + for (let Xt = 0; Xt < Zt; Xt += 8) + St(this, Xt, Xt + 7), St(this, Xt + 1, Xt + 6), St(this, Xt + 2, Xt + 5), St(this, Xt + 3, Xt + 4) + return this + }), + (st.prototype.toString = function () { + const Zt = this.length + return Zt === 0 ? '' : arguments.length === 0 ? wt(this, 0, Zt) : kt.apply(this, arguments) + }), + (st.prototype.toLocaleString = st.prototype.toString), + (st.prototype.equals = function (Zt) { + if (!st.isBuffer(Zt)) throw new TypeError('Argument must be a Buffer') + return this === Zt ? !0 : st.compare(this, Zt) === 0 + }), + (st.prototype.inspect = function () { + let Zt = '' + const Xt = tt.INSPECT_MAX_BYTES + return ( + (Zt = this.toString('hex', 0, Xt) + .replace(/(.{2})/g, '$1 ') + .trim()), + this.length > Xt && (Zt += ' ... '), + '' + ) + }), + rt && (st.prototype[rt] = st.prototype.inspect), + (st.prototype.compare = function (Zt, Xt, Sn, Rn, jn) { + if ((wn(Zt, Uint8Array) && (Zt = st.from(Zt, Zt.offset, Zt.byteLength)), !st.isBuffer(Zt))) + throw new TypeError( + 'The "target" argument must be one of type Buffer or Uint8Array. Received type ' + typeof Zt, + ) + if ( + (Xt === void 0 && (Xt = 0), + Sn === void 0 && (Sn = Zt ? Zt.length : 0), + Rn === void 0 && (Rn = 0), + jn === void 0 && (jn = this.length), + Xt < 0 || Sn > Zt.length || Rn < 0 || jn > this.length) + ) + throw new RangeError('out of range index') + if (Rn >= jn && Xt >= Sn) return 0 + if (Rn >= jn) return -1 + if (Xt >= Sn) return 1 + if (((Xt >>>= 0), (Sn >>>= 0), (Rn >>>= 0), (jn >>>= 0), this === Zt)) return 0 + let On = jn - Rn, + Zn = Sn - Xt + const Vn = Math.min(On, Zn), + qn = this.slice(Rn, jn), + zn = Zt.slice(Xt, Sn) + for (let Jn = 0; Jn < Vn; ++Jn) + if (qn[Jn] !== zn[Jn]) { + ;(On = qn[Jn]), (Zn = zn[Jn]) + break + } + return On < Zn ? -1 : Zn < On ? 1 : 0 + }) + function Tt(un, Zt, Xt, Sn, Rn) { + if (un.length === 0) return -1 + if ( + (typeof Xt == 'string' + ? ((Sn = Xt), (Xt = 0)) + : Xt > 2147483647 + ? (Xt = 2147483647) + : Xt < -2147483648 && (Xt = -2147483648), + (Xt = +Xt), + fn(Xt) && (Xt = Rn ? 0 : un.length - 1), + Xt < 0 && (Xt = un.length + Xt), + Xt >= un.length) + ) { + if (Rn) return -1 + Xt = un.length - 1 + } else if (Xt < 0) + if (Rn) Xt = 0 + else return -1 + if ((typeof Zt == 'string' && (Zt = st.from(Zt, Sn)), st.isBuffer(Zt))) + return Zt.length === 0 ? -1 : At(un, Zt, Xt, Sn, Rn) + if (typeof Zt == 'number') + return ( + (Zt = Zt & 255), + typeof Uint8Array.prototype.indexOf == 'function' + ? Rn + ? Uint8Array.prototype.indexOf.call(un, Zt, Xt) + : Uint8Array.prototype.lastIndexOf.call(un, Zt, Xt) + : At(un, [Zt], Xt, Sn, Rn) + ) + throw new TypeError('val must be string, number or Buffer') + } + function At(un, Zt, Xt, Sn, Rn) { + let jn = 1, + On = un.length, + Zn = Zt.length + if ( + Sn !== void 0 && + ((Sn = String(Sn).toLowerCase()), Sn === 'ucs2' || Sn === 'ucs-2' || Sn === 'utf16le' || Sn === 'utf-16le') + ) { + if (un.length < 2 || Zt.length < 2) return -1 + ;(jn = 2), (On /= 2), (Zn /= 2), (Xt /= 2) + } + function Vn(zn, Jn) { + return jn === 1 ? zn[Jn] : zn.readUInt16BE(Jn * jn) + } + let qn + if (Rn) { + let zn = -1 + for (qn = Xt; qn < On; qn++) + if (Vn(un, qn) === Vn(Zt, zn === -1 ? 0 : qn - zn)) { + if ((zn === -1 && (zn = qn), qn - zn + 1 === Zn)) return zn * jn + } else zn !== -1 && (qn -= qn - zn), (zn = -1) + } else + for (Xt + Zn > On && (Xt = On - Zn), qn = Xt; qn >= 0; qn--) { + let zn = !0 + for (let Jn = 0; Jn < Zn; Jn++) + if (Vn(un, qn + Jn) !== Vn(Zt, Jn)) { + zn = !1 + break + } + if (zn) return qn + } + return -1 + } + ;(st.prototype.includes = function (Zt, Xt, Sn) { + return this.indexOf(Zt, Xt, Sn) !== -1 + }), + (st.prototype.indexOf = function (Zt, Xt, Sn) { + return Tt(this, Zt, Xt, Sn, !0) + }), + (st.prototype.lastIndexOf = function (Zt, Xt, Sn) { + return Tt(this, Zt, Xt, Sn, !1) + }) + function Et(un, Zt, Xt, Sn) { + Xt = Number(Xt) || 0 + const Rn = un.length - Xt + Sn ? ((Sn = Number(Sn)), Sn > Rn && (Sn = Rn)) : (Sn = Rn) + const jn = Zt.length + Sn > jn / 2 && (Sn = jn / 2) + let On + for (On = 0; On < Sn; ++On) { + const Zn = parseInt(Zt.substr(On * 2, 2), 16) + if (fn(Zn)) return On + un[Xt + On] = Zn + } + return On + } + function $t(un, Zt, Xt, Sn) { + return An(Tn(Zt, un.length - Xt), un, Xt, Sn) + } + function Dt(un, Zt, Xt, Sn) { + return An(cn(Zt), un, Xt, Sn) + } + function jt(un, Zt, Xt, Sn) { + return An(In(Zt), un, Xt, Sn) + } + function Pt(un, Zt, Xt, Sn) { + return An(mn(Zt, un.length - Xt), un, Xt, Sn) + } + ;(st.prototype.write = function (Zt, Xt, Sn, Rn) { + if (Xt === void 0) (Rn = 'utf8'), (Sn = this.length), (Xt = 0) + else if (Sn === void 0 && typeof Xt == 'string') (Rn = Xt), (Sn = this.length), (Xt = 0) + else if (isFinite(Xt)) + (Xt = Xt >>> 0), isFinite(Sn) ? ((Sn = Sn >>> 0), Rn === void 0 && (Rn = 'utf8')) : ((Rn = Sn), (Sn = void 0)) + else throw new Error('Buffer.write(string, encoding, offset[, length]) is no longer supported') + const jn = this.length - Xt + if (((Sn === void 0 || Sn > jn) && (Sn = jn), (Zt.length > 0 && (Sn < 0 || Xt < 0)) || Xt > this.length)) + throw new RangeError('Attempt to write outside buffer bounds') + Rn || (Rn = 'utf8') + let On = !1 + for (;;) + switch (Rn) { + case 'hex': + return Et(this, Zt, Xt, Sn) + case 'utf8': + case 'utf-8': + return $t(this, Zt, Xt, Sn) + case 'ascii': + case 'latin1': + case 'binary': + return Dt(this, Zt, Xt, Sn) + case 'base64': + return jt(this, Zt, Xt, Sn) + case 'ucs2': + case 'ucs-2': + case 'utf16le': + case 'utf-16le': + return Pt(this, Zt, Xt, Sn) + default: + if (On) throw new TypeError('Unknown encoding: ' + Rn) + ;(Rn = ('' + Rn).toLowerCase()), (On = !0) + } + }), + (st.prototype.toJSON = function () { + return { type: 'Buffer', data: Array.prototype.slice.call(this._arr || this, 0) } + }) + function Ct(un, Zt, Xt) { + return Zt === 0 && Xt === un.length ? et.fromByteArray(un) : et.fromByteArray(un.slice(Zt, Xt)) + } + function wt(un, Zt, Xt) { + Xt = Math.min(un.length, Xt) + const Sn = [] + let Rn = Zt + for (; Rn < Xt; ) { + const jn = un[Rn] + let On = null, + Zn = jn > 239 ? 4 : jn > 223 ? 3 : jn > 191 ? 2 : 1 + if (Rn + Zn <= Xt) { + let Vn, qn, zn, Jn + switch (Zn) { + case 1: + jn < 128 && (On = jn) + break + case 2: + ;(Vn = un[Rn + 1]), (Vn & 192) === 128 && ((Jn = ((jn & 31) << 6) | (Vn & 63)), Jn > 127 && (On = Jn)) + break + case 3: + ;(Vn = un[Rn + 1]), + (qn = un[Rn + 2]), + (Vn & 192) === 128 && + (qn & 192) === 128 && + ((Jn = ((jn & 15) << 12) | ((Vn & 63) << 6) | (qn & 63)), + Jn > 2047 && (Jn < 55296 || Jn > 57343) && (On = Jn)) + break + case 4: + ;(Vn = un[Rn + 1]), + (qn = un[Rn + 2]), + (zn = un[Rn + 3]), + (Vn & 192) === 128 && + (qn & 192) === 128 && + (zn & 192) === 128 && + ((Jn = ((jn & 15) << 18) | ((Vn & 63) << 12) | ((qn & 63) << 6) | (zn & 63)), + Jn > 65535 && Jn < 1114112 && (On = Jn)) + } + } + On === null + ? ((On = 65533), (Zn = 1)) + : On > 65535 && ((On -= 65536), Sn.push(((On >>> 10) & 1023) | 55296), (On = 56320 | (On & 1023))), + Sn.push(On), + (Rn += Zn) + } + return Ot(Sn) + } + const It = 4096 + function Ot(un) { + const Zt = un.length + if (Zt <= It) return String.fromCharCode.apply(String, un) + let Xt = '', + Sn = 0 + for (; Sn < Zt; ) Xt += String.fromCharCode.apply(String, un.slice(Sn, (Sn += It))) + return Xt + } + function Wt(un, Zt, Xt) { + let Sn = '' + Xt = Math.min(un.length, Xt) + for (let Rn = Zt; Rn < Xt; ++Rn) Sn += String.fromCharCode(un[Rn] & 127) + return Sn + } + function zt(un, Zt, Xt) { + let Sn = '' + Xt = Math.min(un.length, Xt) + for (let Rn = Zt; Rn < Xt; ++Rn) Sn += String.fromCharCode(un[Rn]) + return Sn + } + function Ft(un, Zt, Xt) { + const Sn = un.length + ;(!Zt || Zt < 0) && (Zt = 0), (!Xt || Xt < 0 || Xt > Sn) && (Xt = Sn) + let Rn = '' + for (let jn = Zt; jn < Xt; ++jn) Rn += pn[un[jn]] + return Rn + } + function Nt(un, Zt, Xt) { + const Sn = un.slice(Zt, Xt) + let Rn = '' + for (let jn = 0; jn < Sn.length - 1; jn += 2) Rn += String.fromCharCode(Sn[jn] + Sn[jn + 1] * 256) + return Rn + } + st.prototype.slice = function (Zt, Xt) { + const Sn = this.length + ;(Zt = ~~Zt), + (Xt = Xt === void 0 ? Sn : ~~Xt), + Zt < 0 ? ((Zt += Sn), Zt < 0 && (Zt = 0)) : Zt > Sn && (Zt = Sn), + Xt < 0 ? ((Xt += Sn), Xt < 0 && (Xt = 0)) : Xt > Sn && (Xt = Sn), + Xt < Zt && (Xt = Zt) + const Rn = this.subarray(Zt, Xt) + return Object.setPrototypeOf(Rn, st.prototype), Rn + } + function Ut(un, Zt, Xt) { + if (un % 1 !== 0 || un < 0) throw new RangeError('offset is not uint') + if (un + Zt > Xt) throw new RangeError('Trying to access beyond buffer length') + } + ;(st.prototype.readUintLE = st.prototype.readUIntLE = + function (Zt, Xt, Sn) { + ;(Zt = Zt >>> 0), (Xt = Xt >>> 0), Sn || Ut(Zt, Xt, this.length) + let Rn = this[Zt], + jn = 1, + On = 0 + for (; ++On < Xt && (jn *= 256); ) Rn += this[Zt + On] * jn + return Rn + }), + (st.prototype.readUintBE = st.prototype.readUIntBE = + function (Zt, Xt, Sn) { + ;(Zt = Zt >>> 0), (Xt = Xt >>> 0), Sn || Ut(Zt, Xt, this.length) + let Rn = this[Zt + --Xt], + jn = 1 + for (; Xt > 0 && (jn *= 256); ) Rn += this[Zt + --Xt] * jn + return Rn + }), + (st.prototype.readUint8 = st.prototype.readUInt8 = + function (Zt, Xt) { + return (Zt = Zt >>> 0), Xt || Ut(Zt, 1, this.length), this[Zt] + }), + (st.prototype.readUint16LE = st.prototype.readUInt16LE = + function (Zt, Xt) { + return (Zt = Zt >>> 0), Xt || Ut(Zt, 2, this.length), this[Zt] | (this[Zt + 1] << 8) + }), + (st.prototype.readUint16BE = st.prototype.readUInt16BE = + function (Zt, Xt) { + return (Zt = Zt >>> 0), Xt || Ut(Zt, 2, this.length), (this[Zt] << 8) | this[Zt + 1] + }), + (st.prototype.readUint32LE = st.prototype.readUInt32LE = + function (Zt, Xt) { + return ( + (Zt = Zt >>> 0), + Xt || Ut(Zt, 4, this.length), + (this[Zt] | (this[Zt + 1] << 8) | (this[Zt + 2] << 16)) + this[Zt + 3] * 16777216 + ) + }), + (st.prototype.readUint32BE = st.prototype.readUInt32BE = + function (Zt, Xt) { + return ( + (Zt = Zt >>> 0), + Xt || Ut(Zt, 4, this.length), + this[Zt] * 16777216 + ((this[Zt + 1] << 16) | (this[Zt + 2] << 8) | this[Zt + 3]) + ) + }), + (st.prototype.readBigUInt64LE = kn(function (Zt) { + ;(Zt = Zt >>> 0), _n(Zt, 'offset') + const Xt = this[Zt], + Sn = this[Zt + 7] + ;(Xt === void 0 || Sn === void 0) && Pn(Zt, this.length - 8) + const Rn = Xt + this[++Zt] * 2 ** 8 + this[++Zt] * 2 ** 16 + this[++Zt] * 2 ** 24, + jn = this[++Zt] + this[++Zt] * 2 ** 8 + this[++Zt] * 2 ** 16 + Sn * 2 ** 24 + return BigInt(Rn) + (BigInt(jn) << BigInt(32)) + })), + (st.prototype.readBigUInt64BE = kn(function (Zt) { + ;(Zt = Zt >>> 0), _n(Zt, 'offset') + const Xt = this[Zt], + Sn = this[Zt + 7] + ;(Xt === void 0 || Sn === void 0) && Pn(Zt, this.length - 8) + const Rn = Xt * 2 ** 24 + this[++Zt] * 2 ** 16 + this[++Zt] * 2 ** 8 + this[++Zt], + jn = this[++Zt] * 2 ** 24 + this[++Zt] * 2 ** 16 + this[++Zt] * 2 ** 8 + Sn + return (BigInt(Rn) << BigInt(32)) + BigInt(jn) + })), + (st.prototype.readIntLE = function (Zt, Xt, Sn) { + ;(Zt = Zt >>> 0), (Xt = Xt >>> 0), Sn || Ut(Zt, Xt, this.length) + let Rn = this[Zt], + jn = 1, + On = 0 + for (; ++On < Xt && (jn *= 256); ) Rn += this[Zt + On] * jn + return (jn *= 128), Rn >= jn && (Rn -= Math.pow(2, 8 * Xt)), Rn + }), + (st.prototype.readIntBE = function (Zt, Xt, Sn) { + ;(Zt = Zt >>> 0), (Xt = Xt >>> 0), Sn || Ut(Zt, Xt, this.length) + let Rn = Xt, + jn = 1, + On = this[Zt + --Rn] + for (; Rn > 0 && (jn *= 256); ) On += this[Zt + --Rn] * jn + return (jn *= 128), On >= jn && (On -= Math.pow(2, 8 * Xt)), On + }), + (st.prototype.readInt8 = function (Zt, Xt) { + return (Zt = Zt >>> 0), Xt || Ut(Zt, 1, this.length), this[Zt] & 128 ? (255 - this[Zt] + 1) * -1 : this[Zt] + }), + (st.prototype.readInt16LE = function (Zt, Xt) { + ;(Zt = Zt >>> 0), Xt || Ut(Zt, 2, this.length) + const Sn = this[Zt] | (this[Zt + 1] << 8) + return Sn & 32768 ? Sn | 4294901760 : Sn + }), + (st.prototype.readInt16BE = function (Zt, Xt) { + ;(Zt = Zt >>> 0), Xt || Ut(Zt, 2, this.length) + const Sn = this[Zt + 1] | (this[Zt] << 8) + return Sn & 32768 ? Sn | 4294901760 : Sn + }), + (st.prototype.readInt32LE = function (Zt, Xt) { + return ( + (Zt = Zt >>> 0), + Xt || Ut(Zt, 4, this.length), + this[Zt] | (this[Zt + 1] << 8) | (this[Zt + 2] << 16) | (this[Zt + 3] << 24) + ) + }), + (st.prototype.readInt32BE = function (Zt, Xt) { + return ( + (Zt = Zt >>> 0), + Xt || Ut(Zt, 4, this.length), + (this[Zt] << 24) | (this[Zt + 1] << 16) | (this[Zt + 2] << 8) | this[Zt + 3] + ) + }), + (st.prototype.readBigInt64LE = kn(function (Zt) { + ;(Zt = Zt >>> 0), _n(Zt, 'offset') + const Xt = this[Zt], + Sn = this[Zt + 7] + ;(Xt === void 0 || Sn === void 0) && Pn(Zt, this.length - 8) + const Rn = this[Zt + 4] + this[Zt + 5] * 2 ** 8 + this[Zt + 6] * 2 ** 16 + (Sn << 24) + return ( + (BigInt(Rn) << BigInt(32)) + BigInt(Xt + this[++Zt] * 2 ** 8 + this[++Zt] * 2 ** 16 + this[++Zt] * 2 ** 24) + ) + })), + (st.prototype.readBigInt64BE = kn(function (Zt) { + ;(Zt = Zt >>> 0), _n(Zt, 'offset') + const Xt = this[Zt], + Sn = this[Zt + 7] + ;(Xt === void 0 || Sn === void 0) && Pn(Zt, this.length - 8) + const Rn = (Xt << 24) + this[++Zt] * 2 ** 16 + this[++Zt] * 2 ** 8 + this[++Zt] + return ( + (BigInt(Rn) << BigInt(32)) + BigInt(this[++Zt] * 2 ** 24 + this[++Zt] * 2 ** 16 + this[++Zt] * 2 ** 8 + Sn) + ) + })), + (st.prototype.readFloatLE = function (Zt, Xt) { + return (Zt = Zt >>> 0), Xt || Ut(Zt, 4, this.length), nt.read(this, Zt, !0, 23, 4) + }), + (st.prototype.readFloatBE = function (Zt, Xt) { + return (Zt = Zt >>> 0), Xt || Ut(Zt, 4, this.length), nt.read(this, Zt, !1, 23, 4) + }), + (st.prototype.readDoubleLE = function (Zt, Xt) { + return (Zt = Zt >>> 0), Xt || Ut(Zt, 8, this.length), nt.read(this, Zt, !0, 52, 8) + }), + (st.prototype.readDoubleBE = function (Zt, Xt) { + return (Zt = Zt >>> 0), Xt || Ut(Zt, 8, this.length), nt.read(this, Zt, !1, 52, 8) + }) + function Mt(un, Zt, Xt, Sn, Rn, jn) { + if (!st.isBuffer(un)) throw new TypeError('"buffer" argument must be a Buffer instance') + if (Zt > Rn || Zt < jn) throw new RangeError('"value" argument is out of bounds') + if (Xt + Sn > un.length) throw new RangeError('Index out of range') + } + ;(st.prototype.writeUintLE = st.prototype.writeUIntLE = + function (Zt, Xt, Sn, Rn) { + if (((Zt = +Zt), (Xt = Xt >>> 0), (Sn = Sn >>> 0), !Rn)) { + const Zn = Math.pow(2, 8 * Sn) - 1 + Mt(this, Zt, Xt, Sn, Zn, 0) + } + let jn = 1, + On = 0 + for (this[Xt] = Zt & 255; ++On < Sn && (jn *= 256); ) this[Xt + On] = (Zt / jn) & 255 + return Xt + Sn + }), + (st.prototype.writeUintBE = st.prototype.writeUIntBE = + function (Zt, Xt, Sn, Rn) { + if (((Zt = +Zt), (Xt = Xt >>> 0), (Sn = Sn >>> 0), !Rn)) { + const Zn = Math.pow(2, 8 * Sn) - 1 + Mt(this, Zt, Xt, Sn, Zn, 0) + } + let jn = Sn - 1, + On = 1 + for (this[Xt + jn] = Zt & 255; --jn >= 0 && (On *= 256); ) this[Xt + jn] = (Zt / On) & 255 + return Xt + Sn + }), + (st.prototype.writeUint8 = st.prototype.writeUInt8 = + function (Zt, Xt, Sn) { + return (Zt = +Zt), (Xt = Xt >>> 0), Sn || Mt(this, Zt, Xt, 1, 255, 0), (this[Xt] = Zt & 255), Xt + 1 + }), + (st.prototype.writeUint16LE = st.prototype.writeUInt16LE = + function (Zt, Xt, Sn) { + return ( + (Zt = +Zt), + (Xt = Xt >>> 0), + Sn || Mt(this, Zt, Xt, 2, 65535, 0), + (this[Xt] = Zt & 255), + (this[Xt + 1] = Zt >>> 8), + Xt + 2 + ) + }), + (st.prototype.writeUint16BE = st.prototype.writeUInt16BE = + function (Zt, Xt, Sn) { + return ( + (Zt = +Zt), + (Xt = Xt >>> 0), + Sn || Mt(this, Zt, Xt, 2, 65535, 0), + (this[Xt] = Zt >>> 8), + (this[Xt + 1] = Zt & 255), + Xt + 2 + ) + }), + (st.prototype.writeUint32LE = st.prototype.writeUInt32LE = + function (Zt, Xt, Sn) { + return ( + (Zt = +Zt), + (Xt = Xt >>> 0), + Sn || Mt(this, Zt, Xt, 4, 4294967295, 0), + (this[Xt + 3] = Zt >>> 24), + (this[Xt + 2] = Zt >>> 16), + (this[Xt + 1] = Zt >>> 8), + (this[Xt] = Zt & 255), + Xt + 4 + ) + }), + (st.prototype.writeUint32BE = st.prototype.writeUInt32BE = + function (Zt, Xt, Sn) { + return ( + (Zt = +Zt), + (Xt = Xt >>> 0), + Sn || Mt(this, Zt, Xt, 4, 4294967295, 0), + (this[Xt] = Zt >>> 24), + (this[Xt + 1] = Zt >>> 16), + (this[Xt + 2] = Zt >>> 8), + (this[Xt + 3] = Zt & 255), + Xt + 4 + ) + }) + function Ht(un, Zt, Xt, Sn, Rn) { + Qt(Zt, Sn, Rn, un, Xt, 7) + let jn = Number(Zt & BigInt(4294967295)) + ;(un[Xt++] = jn), + (jn = jn >> 8), + (un[Xt++] = jn), + (jn = jn >> 8), + (un[Xt++] = jn), + (jn = jn >> 8), + (un[Xt++] = jn) + let On = Number((Zt >> BigInt(32)) & BigInt(4294967295)) + return ( + (un[Xt++] = On), + (On = On >> 8), + (un[Xt++] = On), + (On = On >> 8), + (un[Xt++] = On), + (On = On >> 8), + (un[Xt++] = On), + Xt + ) + } + function en(un, Zt, Xt, Sn, Rn) { + Qt(Zt, Sn, Rn, un, Xt, 7) + let jn = Number(Zt & BigInt(4294967295)) + ;(un[Xt + 7] = jn), + (jn = jn >> 8), + (un[Xt + 6] = jn), + (jn = jn >> 8), + (un[Xt + 5] = jn), + (jn = jn >> 8), + (un[Xt + 4] = jn) + let On = Number((Zt >> BigInt(32)) & BigInt(4294967295)) + return ( + (un[Xt + 3] = On), + (On = On >> 8), + (un[Xt + 2] = On), + (On = On >> 8), + (un[Xt + 1] = On), + (On = On >> 8), + (un[Xt] = On), + Xt + 8 + ) + } + ;(st.prototype.writeBigUInt64LE = kn(function (Zt, Xt = 0) { + return Ht(this, Zt, Xt, BigInt(0), BigInt('0xffffffffffffffff')) + })), + (st.prototype.writeBigUInt64BE = kn(function (Zt, Xt = 0) { + return en(this, Zt, Xt, BigInt(0), BigInt('0xffffffffffffffff')) + })), + (st.prototype.writeIntLE = function (Zt, Xt, Sn, Rn) { + if (((Zt = +Zt), (Xt = Xt >>> 0), !Rn)) { + const Vn = Math.pow(2, 8 * Sn - 1) + Mt(this, Zt, Xt, Sn, Vn - 1, -Vn) + } + let jn = 0, + On = 1, + Zn = 0 + for (this[Xt] = Zt & 255; ++jn < Sn && (On *= 256); ) + Zt < 0 && Zn === 0 && this[Xt + jn - 1] !== 0 && (Zn = 1), (this[Xt + jn] = (((Zt / On) >> 0) - Zn) & 255) + return Xt + Sn + }), + (st.prototype.writeIntBE = function (Zt, Xt, Sn, Rn) { + if (((Zt = +Zt), (Xt = Xt >>> 0), !Rn)) { + const Vn = Math.pow(2, 8 * Sn - 1) + Mt(this, Zt, Xt, Sn, Vn - 1, -Vn) + } + let jn = Sn - 1, + On = 1, + Zn = 0 + for (this[Xt + jn] = Zt & 255; --jn >= 0 && (On *= 256); ) + Zt < 0 && Zn === 0 && this[Xt + jn + 1] !== 0 && (Zn = 1), (this[Xt + jn] = (((Zt / On) >> 0) - Zn) & 255) + return Xt + Sn + }), + (st.prototype.writeInt8 = function (Zt, Xt, Sn) { + return ( + (Zt = +Zt), + (Xt = Xt >>> 0), + Sn || Mt(this, Zt, Xt, 1, 127, -128), + Zt < 0 && (Zt = 255 + Zt + 1), + (this[Xt] = Zt & 255), + Xt + 1 + ) + }), + (st.prototype.writeInt16LE = function (Zt, Xt, Sn) { + return ( + (Zt = +Zt), + (Xt = Xt >>> 0), + Sn || Mt(this, Zt, Xt, 2, 32767, -32768), + (this[Xt] = Zt & 255), + (this[Xt + 1] = Zt >>> 8), + Xt + 2 + ) + }), + (st.prototype.writeInt16BE = function (Zt, Xt, Sn) { + return ( + (Zt = +Zt), + (Xt = Xt >>> 0), + Sn || Mt(this, Zt, Xt, 2, 32767, -32768), + (this[Xt] = Zt >>> 8), + (this[Xt + 1] = Zt & 255), + Xt + 2 + ) + }), + (st.prototype.writeInt32LE = function (Zt, Xt, Sn) { + return ( + (Zt = +Zt), + (Xt = Xt >>> 0), + Sn || Mt(this, Zt, Xt, 4, 2147483647, -2147483648), + (this[Xt] = Zt & 255), + (this[Xt + 1] = Zt >>> 8), + (this[Xt + 2] = Zt >>> 16), + (this[Xt + 3] = Zt >>> 24), + Xt + 4 + ) + }), + (st.prototype.writeInt32BE = function (Zt, Xt, Sn) { + return ( + (Zt = +Zt), + (Xt = Xt >>> 0), + Sn || Mt(this, Zt, Xt, 4, 2147483647, -2147483648), + Zt < 0 && (Zt = 4294967295 + Zt + 1), + (this[Xt] = Zt >>> 24), + (this[Xt + 1] = Zt >>> 16), + (this[Xt + 2] = Zt >>> 8), + (this[Xt + 3] = Zt & 255), + Xt + 4 + ) + }), + (st.prototype.writeBigInt64LE = kn(function (Zt, Xt = 0) { + return Ht(this, Zt, Xt, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffffff')) + })), + (st.prototype.writeBigInt64BE = kn(function (Zt, Xt = 0) { + return en(this, Zt, Xt, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffffff')) + })) + function sn(un, Zt, Xt, Sn, Rn, jn) { + if (Xt + Sn > un.length) throw new RangeError('Index out of range') + if (Xt < 0) throw new RangeError('Index out of range') + } + function Kt(un, Zt, Xt, Sn, Rn) { + return (Zt = +Zt), (Xt = Xt >>> 0), Rn || sn(un, Zt, Xt, 4), nt.write(un, Zt, Xt, Sn, 23, 4), Xt + 4 + } + ;(st.prototype.writeFloatLE = function (Zt, Xt, Sn) { + return Kt(this, Zt, Xt, !0, Sn) + }), + (st.prototype.writeFloatBE = function (Zt, Xt, Sn) { + return Kt(this, Zt, Xt, !1, Sn) + }) + function rn(un, Zt, Xt, Sn, Rn) { + return (Zt = +Zt), (Xt = Xt >>> 0), Rn || sn(un, Zt, Xt, 8), nt.write(un, Zt, Xt, Sn, 52, 8), Xt + 8 + } + ;(st.prototype.writeDoubleLE = function (Zt, Xt, Sn) { + return rn(this, Zt, Xt, !0, Sn) + }), + (st.prototype.writeDoubleBE = function (Zt, Xt, Sn) { + return rn(this, Zt, Xt, !1, Sn) + }), + (st.prototype.copy = function (Zt, Xt, Sn, Rn) { + if (!st.isBuffer(Zt)) throw new TypeError('argument should be a Buffer') + if ( + (Sn || (Sn = 0), + !Rn && Rn !== 0 && (Rn = this.length), + Xt >= Zt.length && (Xt = Zt.length), + Xt || (Xt = 0), + Rn > 0 && Rn < Sn && (Rn = Sn), + Rn === Sn || Zt.length === 0 || this.length === 0) + ) + return 0 + if (Xt < 0) throw new RangeError('targetStart out of bounds') + if (Sn < 0 || Sn >= this.length) throw new RangeError('Index out of range') + if (Rn < 0) throw new RangeError('sourceEnd out of bounds') + Rn > this.length && (Rn = this.length), Zt.length - Xt < Rn - Sn && (Rn = Zt.length - Xt + Sn) + const jn = Rn - Sn + return ( + this === Zt && typeof Uint8Array.prototype.copyWithin == 'function' + ? this.copyWithin(Xt, Sn, Rn) + : Uint8Array.prototype.set.call(Zt, this.subarray(Sn, Rn), Xt), + jn + ) + }), + (st.prototype.fill = function (Zt, Xt, Sn, Rn) { + if (typeof Zt == 'string') { + if ( + (typeof Xt == 'string' + ? ((Rn = Xt), (Xt = 0), (Sn = this.length)) + : typeof Sn == 'string' && ((Rn = Sn), (Sn = this.length)), + Rn !== void 0 && typeof Rn != 'string') + ) + throw new TypeError('encoding must be a string') + if (typeof Rn == 'string' && !st.isEncoding(Rn)) throw new TypeError('Unknown encoding: ' + Rn) + if (Zt.length === 1) { + const On = Zt.charCodeAt(0) + ;((Rn === 'utf8' && On < 128) || Rn === 'latin1') && (Zt = On) + } + } else typeof Zt == 'number' ? (Zt = Zt & 255) : typeof Zt == 'boolean' && (Zt = Number(Zt)) + if (Xt < 0 || this.length < Xt || this.length < Sn) throw new RangeError('Out of range index') + if (Sn <= Xt) return this + ;(Xt = Xt >>> 0), (Sn = Sn === void 0 ? this.length : Sn >>> 0), Zt || (Zt = 0) + let jn + if (typeof Zt == 'number') for (jn = Xt; jn < Sn; ++jn) this[jn] = Zt + else { + const On = st.isBuffer(Zt) ? Zt : st.from(Zt, Rn), + Zn = On.length + if (Zn === 0) throw new TypeError('The value "' + Zt + '" is invalid for argument "value"') + for (jn = 0; jn < Sn - Xt; ++jn) this[jn + Xt] = On[jn % Zn] + } + return this + }) + const nn = {} + function hn(un, Zt, Xt) { + nn[un] = class extends Xt { + constructor() { + super(), + Object.defineProperty(this, 'message', { + value: Zt.apply(this, arguments), + writable: !0, + configurable: !0, + }), + (this.name = `${this.name} [${un}]`), + this.stack, + delete this.name + } + get code() { + return un + } + set code(Rn) { + Object.defineProperty(this, 'code', { configurable: !0, enumerable: !0, value: Rn, writable: !0 }) + } + toString() { + return `${this.name} [${un}]: ${this.message}` + } + } + } + hn( + 'ERR_BUFFER_OUT_OF_BOUNDS', + function (un) { + return un ? `${un} is outside of buffer bounds` : 'Attempt to access memory outside buffer bounds' + }, + RangeError, + ), + hn( + 'ERR_INVALID_ARG_TYPE', + function (un, Zt) { + return `The "${un}" argument must be of type number. Received type ${typeof Zt}` + }, + TypeError, + ), + hn( + 'ERR_OUT_OF_RANGE', + function (un, Zt, Xt) { + let Sn = `The value of "${un}" is out of range.`, + Rn = Xt + return ( + Number.isInteger(Xt) && Math.abs(Xt) > 2 ** 32 + ? (Rn = vn(String(Xt))) + : typeof Xt == 'bigint' && + ((Rn = String(Xt)), + (Xt > BigInt(2) ** BigInt(32) || Xt < -(BigInt(2) ** BigInt(32))) && (Rn = vn(Rn)), + (Rn += 'n')), + (Sn += ` It must be ${Zt}. Received ${Rn}`), + Sn + ) + }, + RangeError, + ) + function vn(un) { + let Zt = '', + Xt = un.length + const Sn = un[0] === '-' ? 1 : 0 + for (; Xt >= Sn + 4; Xt -= 3) Zt = `_${un.slice(Xt - 3, Xt)}${Zt}` + return `${un.slice(0, Xt)}${Zt}` + } + function an(un, Zt, Xt) { + _n(Zt, 'offset'), (un[Zt] === void 0 || un[Zt + Xt] === void 0) && Pn(Zt, un.length - (Xt + 1)) + } + function Qt(un, Zt, Xt, Sn, Rn, jn) { + if (un > Xt || un < Zt) { + const On = typeof Zt == 'bigint' ? 'n' : '' + let Zn + throw ( + (jn > 3 + ? Zt === 0 || Zt === BigInt(0) + ? (Zn = `>= 0${On} and < 2${On} ** ${(jn + 1) * 8}${On}`) + : (Zn = `>= -(2${On} ** ${(jn + 1) * 8 - 1}${On}) and < 2 ** ${(jn + 1) * 8 - 1}${On}`) + : (Zn = `>= ${Zt}${On} and <= ${Xt}${On}`), + new nn.ERR_OUT_OF_RANGE('value', Zn, un)) + ) + } + an(Sn, Rn, jn) + } + function _n(un, Zt) { + if (typeof un != 'number') throw new nn.ERR_INVALID_ARG_TYPE(Zt, 'number', un) + } + function Pn(un, Zt, Xt) { + throw Math.floor(un) !== un + ? (_n(un, Xt), new nn.ERR_OUT_OF_RANGE(Xt || 'offset', 'an integer', un)) + : Zt < 0 + ? new nn.ERR_BUFFER_OUT_OF_BOUNDS() + : new nn.ERR_OUT_OF_RANGE(Xt || 'offset', `>= ${Xt ? 1 : 0} and <= ${Zt}`, un) + } + const $n = /[^+/0-9A-Za-z-_]/g + function Nn(un) { + if (((un = un.split('=')[0]), (un = un.trim().replace($n, '')), un.length < 2)) return '' + for (; un.length % 4 !== 0; ) un = un + '=' + return un + } + function Tn(un, Zt) { + Zt = Zt || 1 / 0 + let Xt + const Sn = un.length + let Rn = null + const jn = [] + for (let On = 0; On < Sn; ++On) { + if (((Xt = un.charCodeAt(On)), Xt > 55295 && Xt < 57344)) { + if (!Rn) { + if (Xt > 56319) { + ;(Zt -= 3) > -1 && jn.push(239, 191, 189) + continue + } else if (On + 1 === Sn) { + ;(Zt -= 3) > -1 && jn.push(239, 191, 189) + continue + } + Rn = Xt + continue + } + if (Xt < 56320) { + ;(Zt -= 3) > -1 && jn.push(239, 191, 189), (Rn = Xt) + continue + } + Xt = (((Rn - 55296) << 10) | (Xt - 56320)) + 65536 + } else Rn && (Zt -= 3) > -1 && jn.push(239, 191, 189) + if (((Rn = null), Xt < 128)) { + if ((Zt -= 1) < 0) break + jn.push(Xt) + } else if (Xt < 2048) { + if ((Zt -= 2) < 0) break + jn.push((Xt >> 6) | 192, (Xt & 63) | 128) + } else if (Xt < 65536) { + if ((Zt -= 3) < 0) break + jn.push((Xt >> 12) | 224, ((Xt >> 6) & 63) | 128, (Xt & 63) | 128) + } else if (Xt < 1114112) { + if ((Zt -= 4) < 0) break + jn.push((Xt >> 18) | 240, ((Xt >> 12) & 63) | 128, ((Xt >> 6) & 63) | 128, (Xt & 63) | 128) + } else throw new Error('Invalid code point') + } + return jn + } + function cn(un) { + const Zt = [] + for (let Xt = 0; Xt < un.length; ++Xt) Zt.push(un.charCodeAt(Xt) & 255) + return Zt + } + function mn(un, Zt) { + let Xt, Sn, Rn + const jn = [] + for (let On = 0; On < un.length && !((Zt -= 2) < 0); ++On) + (Xt = un.charCodeAt(On)), (Sn = Xt >> 8), (Rn = Xt % 256), jn.push(Rn), jn.push(Sn) + return jn + } + function In(un) { + return et.toByteArray(Nn(un)) + } + function An(un, Zt, Xt, Sn) { + let Rn + for (Rn = 0; Rn < Sn && !(Rn + Xt >= Zt.length || Rn >= un.length); ++Rn) Zt[Rn + Xt] = un[Rn] + return Rn + } + function wn(un, Zt) { + return ( + un instanceof Zt || + (un != null && un.constructor != null && un.constructor.name != null && un.constructor.name === Zt.name) + ) + } + function fn(un) { + return un !== un + } + const pn = (function () { + const un = '0123456789abcdef', + Zt = new Array(256) + for (let Xt = 0; Xt < 16; ++Xt) { + const Sn = Xt * 16 + for (let Rn = 0; Rn < 16; ++Rn) Zt[Sn + Rn] = un[Xt] + un[Rn] + } + return Zt + })() + function kn(un) { + return typeof BigInt > 'u' ? Dn : un + } + function Dn() { + throw new Error('BigInt not supported') + } + })(buffer$2) + var browser$d = { exports: {} }, + process$1 = (browser$d.exports = {}), + cachedSetTimeout, + cachedClearTimeout + function defaultSetTimout() { + throw new Error('setTimeout has not been defined') } - - 100% { - opacity: 1; + function defaultClearTimeout() { + throw new Error('clearTimeout has not been defined') } -`)),waveKeyframe=keyframes(_t2||(_t2=_` - 0% { - transform: translateX(-100%); + ;(function () { + try { + typeof setTimeout == 'function' ? (cachedSetTimeout = setTimeout) : (cachedSetTimeout = defaultSetTimout) + } catch { + cachedSetTimeout = defaultSetTimout + } + try { + typeof clearTimeout == 'function' + ? (cachedClearTimeout = clearTimeout) + : (cachedClearTimeout = defaultClearTimeout) + } catch { + cachedClearTimeout = defaultClearTimeout + } + })() + function runTimeout(tt) { + if (cachedSetTimeout === setTimeout) return setTimeout(tt, 0) + if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) + return (cachedSetTimeout = setTimeout), setTimeout(tt, 0) + try { + return cachedSetTimeout(tt, 0) + } catch { + try { + return cachedSetTimeout.call(null, tt, 0) + } catch { + return cachedSetTimeout.call(this, tt, 0) + } + } } - - 50% { - /* +0.5s of delay between each loop */ - transform: translateX(100%); + function runClearTimeout(tt) { + if (cachedClearTimeout === clearTimeout) return clearTimeout(tt) + if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) + return (cachedClearTimeout = clearTimeout), clearTimeout(tt) + try { + return cachedClearTimeout(tt) + } catch { + try { + return cachedClearTimeout.call(null, tt) + } catch { + return cachedClearTimeout.call(this, tt) + } + } } - - 100% { - transform: translateX(100%); + var queue$2 = [], + draining = !1, + currentQueue, + queueIndex = -1 + function cleanUpNextTick() { + !draining || + !currentQueue || + ((draining = !1), + currentQueue.length ? (queue$2 = currentQueue.concat(queue$2)) : (queueIndex = -1), + queue$2.length && drainQueue()) } -`)),SkeletonRoot=styled$1("span",{name:"MuiSkeleton",slot:"Root",overridesResolver:(tt,et)=>{const{ownerState:nt}=tt;return[et.root,et[nt.variant],nt.animation!==!1&&et[nt.animation],nt.hasChildren&&et.withChildren,nt.hasChildren&&!nt.width&&et.fitContent,nt.hasChildren&&!nt.height&&et.heightAuto]}})(({theme:tt,ownerState:et})=>{const nt=getUnit$1(tt.shape.borderRadius)||"px",rt=toUnitless(tt.shape.borderRadius);return _extends$u({display:"block",backgroundColor:tt.vars?tt.vars.palette.Skeleton.bg:alpha$1(tt.palette.text.primary,tt.palette.mode==="light"?.11:.13),height:"1.2em"},et.variant==="text"&&{marginTop:0,marginBottom:0,height:"auto",transformOrigin:"0 55%",transform:"scale(1, 0.60)",borderRadius:`${rt}${nt}/${Math.round(rt/.6*10)/10}${nt}`,"&:empty:before":{content:'"\\00a0"'}},et.variant==="circular"&&{borderRadius:"50%"},et.variant==="rounded"&&{borderRadius:(tt.vars||tt).shape.borderRadius},et.hasChildren&&{"& > *":{visibility:"hidden"}},et.hasChildren&&!et.width&&{maxWidth:"fit-content"},et.hasChildren&&!et.height&&{height:"auto"})},({ownerState:tt})=>tt.animation==="pulse"&&css(_t3||(_t3=_` - animation: ${0} 2s ease-in-out 0.5s infinite; - `),pulseKeyframe),({ownerState:tt,theme:et})=>tt.animation==="wave"&&css(_t4||(_t4=_` - position: relative; - overflow: hidden; - - /* Fix bug in Safari https://bugs.webkit.org/show_bug.cgi?id=68196 */ - -webkit-mask-image: -webkit-radial-gradient(white, black); - - &::after { - animation: ${0} 2s linear 0.5s infinite; - background: linear-gradient( - 90deg, - transparent, - ${0}, - transparent - ); - content: ''; - position: absolute; - transform: translateX(-100%); /* Avoid flash during server-side hydration */ - bottom: 0; - left: 0; - right: 0; - top: 0; - } - `),waveKeyframe,(et.vars||et).palette.action.hover)),Skeleton$1=reactExports.forwardRef(function(et,nt){const rt=useThemeProps({props:et,name:"MuiSkeleton"}),{animation:it="pulse",className:ot,component:at="span",height:st,style:lt,variant:ct="text",width:ut}=rt,ht=_objectWithoutPropertiesLoose$m(rt,_excluded$U),dt=_extends$u({},rt,{animation:it,component:at,variant:ct,hasChildren:!!ht.children}),pt=useUtilityClasses$q(dt);return jsxRuntimeExports.jsx(SkeletonRoot,_extends$u({as:at,ref:nt,className:clsx$3(pt.root,ot),ownerState:dt},ht,{style:_extends$u({width:ut,height:st},lt)}))}),Skeleton$2=Skeleton$1,shouldSpreadAdditionalProps=tt=>!tt||!isHostComponent(tt),shouldSpreadAdditionalProps$1=shouldSpreadAdditionalProps;function getSliderUtilityClass(tt){return generateUtilityClass("MuiSlider",tt)}const sliderClasses=generateUtilityClasses("MuiSlider",["root","active","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","disabled","dragging","focusVisible","mark","markActive","marked","markLabel","markLabelActive","rail","sizeSmall","thumb","thumbColorPrimary","thumbColorSecondary","thumbColorError","thumbColorSuccess","thumbColorInfo","thumbColorWarning","track","trackInverted","trackFalse","thumbSizeSmall","valueLabel","valueLabelOpen","valueLabelCircle","valueLabelLabel","vertical"]),sliderClasses$1=sliderClasses,useValueLabelClasses=tt=>{const{open:et}=tt;return{offset:clsx$3(et&&sliderClasses$1.valueLabelOpen),circle:sliderClasses$1.valueLabelCircle,label:sliderClasses$1.valueLabelLabel}};function SliderValueLabel$1(tt){const{children:et,className:nt,value:rt}=tt,it=useValueLabelClasses(tt);return et?reactExports.cloneElement(et,{className:clsx$3(et.props.className)},jsxRuntimeExports.jsxs(reactExports.Fragment,{children:[et.props.children,jsxRuntimeExports.jsx("span",{className:clsx$3(it.offset,nt),"aria-hidden":!0,children:jsxRuntimeExports.jsx("span",{className:it.circle,children:jsxRuntimeExports.jsx("span",{className:it.label,children:rt})})})]})):null}const _excluded$T=["aria-label","aria-valuetext","aria-labelledby","component","components","componentsProps","color","classes","className","disableSwap","disabled","getAriaLabel","getAriaValueText","marks","max","min","name","onChange","onChangeCommitted","orientation","size","step","scale","slotProps","slots","tabIndex","track","value","valueLabelDisplay","valueLabelFormat"];function Identity(tt){return tt}const SliderRoot=styled$1("span",{name:"MuiSlider",slot:"Root",overridesResolver:(tt,et)=>{const{ownerState:nt}=tt;return[et.root,et[`color${capitalize(nt.color)}`],nt.size!=="medium"&&et[`size${capitalize(nt.size)}`],nt.marked&&et.marked,nt.orientation==="vertical"&&et.vertical,nt.track==="inverted"&&et.trackInverted,nt.track===!1&&et.trackFalse]}})(({theme:tt,ownerState:et})=>_extends$u({borderRadius:12,boxSizing:"content-box",display:"inline-block",position:"relative",cursor:"pointer",touchAction:"none",color:(tt.vars||tt).palette[et.color].main,WebkitTapHighlightColor:"transparent"},et.orientation==="horizontal"&&_extends$u({height:4,width:"100%",padding:"13px 0","@media (pointer: coarse)":{padding:"20px 0"}},et.size==="small"&&{height:2},et.marked&&{marginBottom:20}),et.orientation==="vertical"&&_extends$u({height:"100%",width:4,padding:"0 13px","@media (pointer: coarse)":{padding:"0 20px"}},et.size==="small"&&{width:2},et.marked&&{marginRight:44}),{"@media print":{colorAdjust:"exact"},[`&.${sliderClasses$1.disabled}`]:{pointerEvents:"none",cursor:"default",color:(tt.vars||tt).palette.grey[400]},[`&.${sliderClasses$1.dragging}`]:{[`& .${sliderClasses$1.thumb}, & .${sliderClasses$1.track}`]:{transition:"none"}}})),SliderRail=styled$1("span",{name:"MuiSlider",slot:"Rail",overridesResolver:(tt,et)=>et.rail})(({ownerState:tt})=>_extends$u({display:"block",position:"absolute",borderRadius:"inherit",backgroundColor:"currentColor",opacity:.38},tt.orientation==="horizontal"&&{width:"100%",height:"inherit",top:"50%",transform:"translateY(-50%)"},tt.orientation==="vertical"&&{height:"100%",width:"inherit",left:"50%",transform:"translateX(-50%)"},tt.track==="inverted"&&{opacity:1})),SliderTrack=styled$1("span",{name:"MuiSlider",slot:"Track",overridesResolver:(tt,et)=>et.track})(({theme:tt,ownerState:et})=>{const nt=tt.palette.mode==="light"?lighten(tt.palette[et.color].main,.62):darken(tt.palette[et.color].main,.5);return _extends$u({display:"block",position:"absolute",borderRadius:"inherit",border:"1px solid currentColor",backgroundColor:"currentColor",transition:tt.transitions.create(["left","width","bottom","height"],{duration:tt.transitions.duration.shortest})},et.size==="small"&&{border:"none"},et.orientation==="horizontal"&&{height:"inherit",top:"50%",transform:"translateY(-50%)"},et.orientation==="vertical"&&{width:"inherit",left:"50%",transform:"translateX(-50%)"},et.track===!1&&{display:"none"},et.track==="inverted"&&{backgroundColor:tt.vars?tt.vars.palette.Slider[`${et.color}Track`]:nt,borderColor:tt.vars?tt.vars.palette.Slider[`${et.color}Track`]:nt})}),SliderThumb=styled$1("span",{name:"MuiSlider",slot:"Thumb",overridesResolver:(tt,et)=>{const{ownerState:nt}=tt;return[et.thumb,et[`thumbColor${capitalize(nt.color)}`],nt.size!=="medium"&&et[`thumbSize${capitalize(nt.size)}`]]}})(({theme:tt,ownerState:et})=>_extends$u({position:"absolute",width:20,height:20,boxSizing:"border-box",borderRadius:"50%",outline:0,backgroundColor:"currentColor",display:"flex",alignItems:"center",justifyContent:"center",transition:tt.transitions.create(["box-shadow","left","bottom"],{duration:tt.transitions.duration.shortest})},et.size==="small"&&{width:12,height:12},et.orientation==="horizontal"&&{top:"50%",transform:"translate(-50%, -50%)"},et.orientation==="vertical"&&{left:"50%",transform:"translate(-50%, 50%)"},{"&:before":_extends$u({position:"absolute",content:'""',borderRadius:"inherit",width:"100%",height:"100%",boxShadow:(tt.vars||tt).shadows[2]},et.size==="small"&&{boxShadow:"none"}),"&::after":{position:"absolute",content:'""',borderRadius:"50%",width:42,height:42,top:"50%",left:"50%",transform:"translate(-50%, -50%)"},[`&:hover, &.${sliderClasses$1.focusVisible}`]:{boxShadow:`0px 0px 0px 8px ${tt.vars?`rgba(${tt.vars.palette[et.color].mainChannel} / 0.16)`:alpha$1(tt.palette[et.color].main,.16)}`,"@media (hover: none)":{boxShadow:"none"}},[`&.${sliderClasses$1.active}`]:{boxShadow:`0px 0px 0px 14px ${tt.vars?`rgba(${tt.vars.palette[et.color].mainChannel} / 0.16)`:alpha$1(tt.palette[et.color].main,.16)}`},[`&.${sliderClasses$1.disabled}`]:{"&:hover":{boxShadow:"none"}}})),SliderValueLabel=styled$1(SliderValueLabel$1,{name:"MuiSlider",slot:"ValueLabel",overridesResolver:(tt,et)=>et.valueLabel})(({theme:tt,ownerState:et})=>_extends$u({[`&.${sliderClasses$1.valueLabelOpen}`]:{transform:`${et.orientation==="vertical"?"translateY(-50%)":"translateY(-100%)"} scale(1)`},zIndex:1,whiteSpace:"nowrap"},tt.typography.body2,{fontWeight:500,transition:tt.transitions.create(["transform"],{duration:tt.transitions.duration.shortest}),transform:`${et.orientation==="vertical"?"translateY(-50%)":"translateY(-100%)"} scale(0)`,position:"absolute",backgroundColor:(tt.vars||tt).palette.grey[600],borderRadius:2,color:(tt.vars||tt).palette.common.white,display:"flex",alignItems:"center",justifyContent:"center",padding:"0.25rem 0.75rem"},et.orientation==="horizontal"&&{top:"-10px",transformOrigin:"bottom center","&:before":{position:"absolute",content:'""',width:8,height:8,transform:"translate(-50%, 50%) rotate(45deg)",backgroundColor:"inherit",bottom:0,left:"50%"}},et.orientation==="vertical"&&{right:et.size==="small"?"20px":"30px",top:"50%",transformOrigin:"right center","&:before":{position:"absolute",content:'""',width:8,height:8,transform:"translate(-50%, -50%) rotate(45deg)",backgroundColor:"inherit",right:-8,top:"50%"}},et.size==="small"&&{fontSize:tt.typography.pxToRem(12),padding:"0.25rem 0.5rem"})),SliderMark=styled$1("span",{name:"MuiSlider",slot:"Mark",shouldForwardProp:tt=>slotShouldForwardProp(tt)&&tt!=="markActive",overridesResolver:(tt,et)=>{const{markActive:nt}=tt;return[et.mark,nt&&et.markActive]}})(({theme:tt,ownerState:et,markActive:nt})=>_extends$u({position:"absolute",width:2,height:2,borderRadius:1,backgroundColor:"currentColor"},et.orientation==="horizontal"&&{top:"50%",transform:"translate(-1px, -50%)"},et.orientation==="vertical"&&{left:"50%",transform:"translate(-50%, 1px)"},nt&&{backgroundColor:(tt.vars||tt).palette.background.paper,opacity:.8})),SliderMarkLabel=styled$1("span",{name:"MuiSlider",slot:"MarkLabel",shouldForwardProp:tt=>slotShouldForwardProp(tt)&&tt!=="markLabelActive",overridesResolver:(tt,et)=>et.markLabel})(({theme:tt,ownerState:et,markLabelActive:nt})=>_extends$u({},tt.typography.body2,{color:(tt.vars||tt).palette.text.secondary,position:"absolute",whiteSpace:"nowrap"},et.orientation==="horizontal"&&{top:30,transform:"translateX(-50%)","@media (pointer: coarse)":{top:40}},et.orientation==="vertical"&&{left:36,transform:"translateY(50%)","@media (pointer: coarse)":{left:44}},nt&&{color:(tt.vars||tt).palette.text.primary})),useUtilityClasses$p=tt=>{const{disabled:et,dragging:nt,marked:rt,orientation:it,track:ot,classes:at,color:st,size:lt}=tt,ct={root:["root",et&&"disabled",nt&&"dragging",rt&&"marked",it==="vertical"&&"vertical",ot==="inverted"&&"trackInverted",ot===!1&&"trackFalse",st&&`color${capitalize(st)}`,lt&&`size${capitalize(lt)}`],rail:["rail"],track:["track"],mark:["mark"],markActive:["markActive"],markLabel:["markLabel"],markLabelActive:["markLabelActive"],valueLabel:["valueLabel"],thumb:["thumb",et&&"disabled",lt&&`thumbSize${capitalize(lt)}`,st&&`thumbColor${capitalize(st)}`],active:["active"],disabled:["disabled"],focusVisible:["focusVisible"]};return composeClasses(ct,getSliderUtilityClass,at)},Forward=({children:tt})=>tt,Slider=reactExports.forwardRef(function(et,nt){var rt,it,ot,at,st,lt,ct,ut,ht,dt,pt,mt,gt,yt,bt,vt,xt,kt,St,Tt,At,Et,$t,Dt;const jt=useThemeProps({props:et,name:"MuiSlider"}),Ct=useTheme().direction==="rtl",{"aria-label":wt,"aria-valuetext":It,"aria-labelledby":Ot,component:Wt="span",components:zt={},componentsProps:Ft={},color:Nt="primary",classes:Ut,className:Mt,disableSwap:Ht=!1,disabled:en=!1,getAriaLabel:sn,getAriaValueText:Kt,marks:rn=!1,max:nn=100,min:hn=0,orientation:vn="horizontal",size:an="medium",step:Qt=1,scale:_n=Identity,slotProps:Pn,slots:$n,track:Nn="normal",valueLabelDisplay:Tn="off",valueLabelFormat:cn=Identity}=jt,mn=_objectWithoutPropertiesLoose$m(jt,_excluded$T),In=_extends$u({},jt,{isRtl:Ct,max:nn,min:hn,classes:Ut,disabled:en,disableSwap:Ht,orientation:vn,marks:rn,color:Nt,size:an,step:Qt,scale:_n,track:Nn,valueLabelDisplay:Tn,valueLabelFormat:cn}),{axisProps:An,getRootProps:wn,getHiddenInputProps:fn,getThumbProps:pn,open:kn,active:Dn,axis:un,focusedThumbIndex:Zt,range:Xt,dragging:Sn,marks:Rn,values:jn,trackOffset:On,trackLeap:Zn,getThumbStyle:Vn}=useSlider(_extends$u({},In,{rootRef:nt}));In.marked=Rn.length>0&&Rn.some(nr=>nr.label),In.dragging=Sn,In.focusedThumbIndex=Zt;const qn=useUtilityClasses$p(In),zn=(rt=(it=$n==null?void 0:$n.root)!=null?it:zt.Root)!=null?rt:SliderRoot,Jn=(ot=(at=$n==null?void 0:$n.rail)!=null?at:zt.Rail)!=null?ot:SliderRail,Hn=(st=(lt=$n==null?void 0:$n.track)!=null?lt:zt.Track)!=null?st:SliderTrack,pr=(ct=(ut=$n==null?void 0:$n.thumb)!=null?ut:zt.Thumb)!=null?ct:SliderThumb,fr=(ht=(dt=$n==null?void 0:$n.valueLabel)!=null?dt:zt.ValueLabel)!=null?ht:SliderValueLabel,xr=(pt=(mt=$n==null?void 0:$n.mark)!=null?mt:zt.Mark)!=null?pt:SliderMark,io=(gt=(yt=$n==null?void 0:$n.markLabel)!=null?yt:zt.MarkLabel)!=null?gt:SliderMarkLabel,Tr=(bt=(vt=$n==null?void 0:$n.input)!=null?vt:zt.Input)!=null?bt:"input",Ar=(xt=Pn==null?void 0:Pn.root)!=null?xt:Ft.root,qr=(kt=Pn==null?void 0:Pn.rail)!=null?kt:Ft.rail,jr=(St=Pn==null?void 0:Pn.track)!=null?St:Ft.track,Fr=(Tt=Pn==null?void 0:Pn.thumb)!=null?Tt:Ft.thumb,ao=(At=Pn==null?void 0:Pn.valueLabel)!=null?At:Ft.valueLabel,Yr=(Et=Pn==null?void 0:Pn.mark)!=null?Et:Ft.mark,Dr=($t=Pn==null?void 0:Pn.markLabel)!=null?$t:Ft.markLabel,go=(Dt=Pn==null?void 0:Pn.input)!=null?Dt:Ft.input,xn=useSlotProps({elementType:zn,getSlotProps:wn,externalSlotProps:Ar,externalForwardedProps:mn,additionalProps:_extends$u({},shouldSpreadAdditionalProps$1(zn)&&{as:Wt}),ownerState:_extends$u({},In,Ar==null?void 0:Ar.ownerState),className:[qn.root,Mt]}),Mn=useSlotProps({elementType:Jn,externalSlotProps:qr,ownerState:In,className:qn.rail}),dn=useSlotProps({elementType:Hn,externalSlotProps:jr,additionalProps:{style:_extends$u({},An[un].offset(On),An[un].leap(Zn))},ownerState:_extends$u({},In,jr==null?void 0:jr.ownerState),className:qn.track}),Jt=useSlotProps({elementType:pr,getSlotProps:pn,externalSlotProps:Fr,ownerState:_extends$u({},In,Fr==null?void 0:Fr.ownerState),className:qn.thumb}),En=useSlotProps({elementType:fr,externalSlotProps:ao,ownerState:_extends$u({},In,ao==null?void 0:ao.ownerState),className:qn.valueLabel}),Ln=useSlotProps({elementType:xr,externalSlotProps:Yr,ownerState:In,className:qn.mark}),Un=useSlotProps({elementType:io,externalSlotProps:Dr,ownerState:In,className:qn.markLabel}),Kn=useSlotProps({elementType:Tr,getSlotProps:fn,externalSlotProps:go,ownerState:In});return jsxRuntimeExports.jsxs(zn,_extends$u({},xn,{children:[jsxRuntimeExports.jsx(Jn,_extends$u({},Mn)),jsxRuntimeExports.jsx(Hn,_extends$u({},dn)),Rn.filter(nr=>nr.value>=hn&&nr.value<=nn).map((nr,lr)=>{const cr=valueToPercent(nr.value,hn,nn),Hr=An[un].offset(cr);let vr;return Nn===!1?vr=jn.indexOf(nr.value)!==-1:vr=Nn==="normal"&&(Xt?nr.value>=jn[0]&&nr.value<=jn[jn.length-1]:nr.value<=jn[0])||Nn==="inverted"&&(Xt?nr.value<=jn[0]||nr.value>=jn[jn.length-1]:nr.value>=jn[0]),jsxRuntimeExports.jsxs(reactExports.Fragment,{children:[jsxRuntimeExports.jsx(xr,_extends$u({"data-index":lr},Ln,!isHostComponent(xr)&&{markActive:vr},{style:_extends$u({},Hr,Ln.style),className:clsx$3(Ln.className,vr&&qn.markActive)})),nr.label!=null?jsxRuntimeExports.jsx(io,_extends$u({"aria-hidden":!0,"data-index":lr},Un,!isHostComponent(io)&&{markLabelActive:vr},{style:_extends$u({},Hr,Un.style),className:clsx$3(qn.markLabel,Un.className,vr&&qn.markLabelActive),children:nr.label})):null]},lr)}),jn.map((nr,lr)=>{const cr=valueToPercent(nr,hn,nn),Hr=An[un].offset(cr),vr=Tn==="off"?Forward:fr;return jsxRuntimeExports.jsx(vr,_extends$u({},!isHostComponent(vr)&&{valueLabelFormat:cn,valueLabelDisplay:Tn,value:typeof cn=="function"?cn(_n(nr),lr):cn,index:lr,open:kn===lr||Dn===lr||Tn==="on",disabled:en},En,{children:jsxRuntimeExports.jsx(pr,_extends$u({"data-index":lr},Jt,{className:clsx$3(qn.thumb,Jt.className,Dn===lr&&qn.active,Zt===lr&&qn.focusVisible),style:_extends$u({},Hr,Vn(lr),Jt.style),children:jsxRuntimeExports.jsx(Tr,_extends$u({"data-index":lr,"aria-label":sn?sn(lr):wt,"aria-valuenow":_n(nr),"aria-labelledby":Ot,"aria-valuetext":Kt?Kt(_n(nr),lr):It,value:jn[lr]},Kn))}))}),lr)})]}))}),Slider$1=Slider;function getTabUtilityClass(tt){return generateUtilityClass("MuiTab",tt)}const tabClasses=generateUtilityClasses("MuiTab",["root","labelIcon","textColorInherit","textColorPrimary","textColorSecondary","selected","disabled","fullWidth","wrapped","iconWrapper"]),tabClasses$1=tabClasses,_excluded$S=["className","disabled","disableFocusRipple","fullWidth","icon","iconPosition","indicator","label","onChange","onClick","onFocus","selected","selectionFollowsFocus","textColor","value","wrapped"],useUtilityClasses$o=tt=>{const{classes:et,textColor:nt,fullWidth:rt,wrapped:it,icon:ot,label:at,selected:st,disabled:lt}=tt,ct={root:["root",ot&&at&&"labelIcon",`textColor${capitalize(nt)}`,rt&&"fullWidth",it&&"wrapped",st&&"selected",lt&&"disabled"],iconWrapper:["iconWrapper"]};return composeClasses(ct,getTabUtilityClass,et)},TabRoot=styled$1(ButtonBase$1,{name:"MuiTab",slot:"Root",overridesResolver:(tt,et)=>{const{ownerState:nt}=tt;return[et.root,nt.label&&nt.icon&&et.labelIcon,et[`textColor${capitalize(nt.textColor)}`],nt.fullWidth&&et.fullWidth,nt.wrapped&&et.wrapped]}})(({theme:tt,ownerState:et})=>_extends$u({},tt.typography.button,{maxWidth:360,minWidth:90,position:"relative",minHeight:48,flexShrink:0,padding:"12px 16px",overflow:"hidden",whiteSpace:"normal",textAlign:"center"},et.label&&{flexDirection:et.iconPosition==="top"||et.iconPosition==="bottom"?"column":"row"},{lineHeight:1.25},et.icon&&et.label&&{minHeight:72,paddingTop:9,paddingBottom:9,[`& > .${tabClasses$1.iconWrapper}`]:_extends$u({},et.iconPosition==="top"&&{marginBottom:6},et.iconPosition==="bottom"&&{marginTop:6},et.iconPosition==="start"&&{marginRight:tt.spacing(1)},et.iconPosition==="end"&&{marginLeft:tt.spacing(1)})},et.textColor==="inherit"&&{color:"inherit",opacity:.6,[`&.${tabClasses$1.selected}`]:{opacity:1},[`&.${tabClasses$1.disabled}`]:{opacity:(tt.vars||tt).palette.action.disabledOpacity}},et.textColor==="primary"&&{color:(tt.vars||tt).palette.text.secondary,[`&.${tabClasses$1.selected}`]:{color:(tt.vars||tt).palette.primary.main},[`&.${tabClasses$1.disabled}`]:{color:(tt.vars||tt).palette.text.disabled}},et.textColor==="secondary"&&{color:(tt.vars||tt).palette.text.secondary,[`&.${tabClasses$1.selected}`]:{color:(tt.vars||tt).palette.secondary.main},[`&.${tabClasses$1.disabled}`]:{color:(tt.vars||tt).palette.text.disabled}},et.fullWidth&&{flexShrink:1,flexGrow:1,flexBasis:0,maxWidth:"none"},et.wrapped&&{fontSize:tt.typography.pxToRem(12)})),Tab$1=reactExports.forwardRef(function(et,nt){const rt=useThemeProps({props:et,name:"MuiTab"}),{className:it,disabled:ot=!1,disableFocusRipple:at=!1,fullWidth:st,icon:lt,iconPosition:ct="top",indicator:ut,label:ht,onChange:dt,onClick:pt,onFocus:mt,selected:gt,selectionFollowsFocus:yt,textColor:bt="inherit",value:vt,wrapped:xt=!1}=rt,kt=_objectWithoutPropertiesLoose$m(rt,_excluded$S),St=_extends$u({},rt,{disabled:ot,disableFocusRipple:at,selected:gt,icon:!!lt,iconPosition:ct,label:!!ht,fullWidth:st,textColor:bt,wrapped:xt}),Tt=useUtilityClasses$o(St),At=lt&&ht&&reactExports.isValidElement(lt)?reactExports.cloneElement(lt,{className:clsx$3(Tt.iconWrapper,lt.props.className)}):lt,Et=Dt=>{!gt&&dt&&dt(Dt,vt),pt&&pt(Dt)},$t=Dt=>{yt&&!gt&&dt&&dt(Dt,vt),mt&&mt(Dt)};return jsxRuntimeExports.jsxs(TabRoot,_extends$u({focusRipple:!at,className:clsx$3(Tt.root,it),ref:nt,role:"tab","aria-selected":gt,disabled:ot,onClick:Et,onFocus:$t,ownerState:St,tabIndex:gt?0:-1},kt,{children:[ct==="top"||ct==="start"?jsxRuntimeExports.jsxs(reactExports.Fragment,{children:[At,ht]}):jsxRuntimeExports.jsxs(reactExports.Fragment,{children:[ht,At]}),ut]}))}),Tab$2=Tab$1,TableContext=reactExports.createContext(),TableContext$1=TableContext;function getTableUtilityClass(tt){return generateUtilityClass("MuiTable",tt)}generateUtilityClasses("MuiTable",["root","stickyHeader"]);const _excluded$R=["className","component","padding","size","stickyHeader"],useUtilityClasses$n=tt=>{const{classes:et,stickyHeader:nt}=tt;return composeClasses({root:["root",nt&&"stickyHeader"]},getTableUtilityClass,et)},TableRoot=styled$1("table",{name:"MuiTable",slot:"Root",overridesResolver:(tt,et)=>{const{ownerState:nt}=tt;return[et.root,nt.stickyHeader&&et.stickyHeader]}})(({theme:tt,ownerState:et})=>_extends$u({display:"table",width:"100%",borderCollapse:"collapse",borderSpacing:0,"& caption":_extends$u({},tt.typography.body2,{padding:tt.spacing(2),color:(tt.vars||tt).palette.text.secondary,textAlign:"left",captionSide:"bottom"})},et.stickyHeader&&{borderCollapse:"separate"})),defaultComponent$3="table",Table$3=reactExports.forwardRef(function(et,nt){const rt=useThemeProps({props:et,name:"MuiTable"}),{className:it,component:ot=defaultComponent$3,padding:at="normal",size:st="medium",stickyHeader:lt=!1}=rt,ct=_objectWithoutPropertiesLoose$m(rt,_excluded$R),ut=_extends$u({},rt,{component:ot,padding:at,size:st,stickyHeader:lt}),ht=useUtilityClasses$n(ut),dt=reactExports.useMemo(()=>({padding:at,size:st,stickyHeader:lt}),[at,st,lt]);return jsxRuntimeExports.jsx(TableContext$1.Provider,{value:dt,children:jsxRuntimeExports.jsx(TableRoot,_extends$u({as:ot,role:ot===defaultComponent$3?null:"table",ref:nt,className:clsx$3(ht.root,it),ownerState:ut},ct))})}),MaterialTable=Table$3,Tablelvl2Context=reactExports.createContext(),Tablelvl2Context$1=Tablelvl2Context;function getTableBodyUtilityClass(tt){return generateUtilityClass("MuiTableBody",tt)}generateUtilityClasses("MuiTableBody",["root"]);const _excluded$Q=["className","component"],useUtilityClasses$m=tt=>{const{classes:et}=tt;return composeClasses({root:["root"]},getTableBodyUtilityClass,et)},TableBodyRoot=styled$1("tbody",{name:"MuiTableBody",slot:"Root",overridesResolver:(tt,et)=>et.root})({display:"table-row-group"}),tablelvl2$1={variant:"body"},defaultComponent$2="tbody",TableBody=reactExports.forwardRef(function(et,nt){const rt=useThemeProps({props:et,name:"MuiTableBody"}),{className:it,component:ot=defaultComponent$2}=rt,at=_objectWithoutPropertiesLoose$m(rt,_excluded$Q),st=_extends$u({},rt,{component:ot}),lt=useUtilityClasses$m(st);return jsxRuntimeExports.jsx(Tablelvl2Context$1.Provider,{value:tablelvl2$1,children:jsxRuntimeExports.jsx(TableBodyRoot,_extends$u({className:clsx$3(lt.root,it),as:ot,ref:nt,role:ot===defaultComponent$2?null:"rowgroup",ownerState:st},at))})}),TableBody$1=TableBody;function getTableCellUtilityClass(tt){return generateUtilityClass("MuiTableCell",tt)}const tableCellClasses=generateUtilityClasses("MuiTableCell",["root","head","body","footer","sizeSmall","sizeMedium","paddingCheckbox","paddingNone","alignLeft","alignCenter","alignRight","alignJustify","stickyHeader"]),tableCellClasses$1=tableCellClasses,_excluded$P=["align","className","component","padding","scope","size","sortDirection","variant"],useUtilityClasses$l=tt=>{const{classes:et,variant:nt,align:rt,padding:it,size:ot,stickyHeader:at}=tt,st={root:["root",nt,at&&"stickyHeader",rt!=="inherit"&&`align${capitalize(rt)}`,it!=="normal"&&`padding${capitalize(it)}`,`size${capitalize(ot)}`]};return composeClasses(st,getTableCellUtilityClass,et)},TableCellRoot=styled$1("td",{name:"MuiTableCell",slot:"Root",overridesResolver:(tt,et)=>{const{ownerState:nt}=tt;return[et.root,et[nt.variant],et[`size${capitalize(nt.size)}`],nt.padding!=="normal"&&et[`padding${capitalize(nt.padding)}`],nt.align!=="inherit"&&et[`align${capitalize(nt.align)}`],nt.stickyHeader&&et.stickyHeader]}})(({theme:tt,ownerState:et})=>_extends$u({},tt.typography.body2,{display:"table-cell",verticalAlign:"inherit",borderBottom:tt.vars?`1px solid ${tt.vars.palette.TableCell.border}`:`1px solid - ${tt.palette.mode==="light"?lighten(alpha$1(tt.palette.divider,1),.88):darken(alpha$1(tt.palette.divider,1),.68)}`,textAlign:"left",padding:16},et.variant==="head"&&{color:(tt.vars||tt).palette.text.primary,lineHeight:tt.typography.pxToRem(24),fontWeight:tt.typography.fontWeightMedium},et.variant==="body"&&{color:(tt.vars||tt).palette.text.primary},et.variant==="footer"&&{color:(tt.vars||tt).palette.text.secondary,lineHeight:tt.typography.pxToRem(21),fontSize:tt.typography.pxToRem(12)},et.size==="small"&&{padding:"6px 16px",[`&.${tableCellClasses$1.paddingCheckbox}`]:{width:24,padding:"0 12px 0 16px","& > *":{padding:0}}},et.padding==="checkbox"&&{width:48,padding:"0 0 0 4px"},et.padding==="none"&&{padding:0},et.align==="left"&&{textAlign:"left"},et.align==="center"&&{textAlign:"center"},et.align==="right"&&{textAlign:"right",flexDirection:"row-reverse"},et.align==="justify"&&{textAlign:"justify"},et.stickyHeader&&{position:"sticky",top:0,zIndex:2,backgroundColor:(tt.vars||tt).palette.background.default})),TableCell=reactExports.forwardRef(function(et,nt){const rt=useThemeProps({props:et,name:"MuiTableCell"}),{align:it="inherit",className:ot,component:at,padding:st,scope:lt,size:ct,sortDirection:ut,variant:ht}=rt,dt=_objectWithoutPropertiesLoose$m(rt,_excluded$P),pt=reactExports.useContext(TableContext$1),mt=reactExports.useContext(Tablelvl2Context$1),gt=mt&&mt.variant==="head";let yt;at?yt=at:yt=gt?"th":"td";let bt=lt;yt==="td"?bt=void 0:!bt&>&&(bt="col");const vt=ht||mt&&mt.variant,xt=_extends$u({},rt,{align:it,component:yt,padding:st||(pt&&pt.padding?pt.padding:"normal"),size:ct||(pt&&pt.size?pt.size:"medium"),sortDirection:ut,stickyHeader:vt==="head"&&pt&&pt.stickyHeader,variant:vt}),kt=useUtilityClasses$l(xt);let St=null;return ut&&(St=ut==="asc"?"ascending":"descending"),jsxRuntimeExports.jsx(TableCellRoot,_extends$u({as:yt,ref:nt,className:clsx$3(kt.root,ot),"aria-sort":St,scope:bt,ownerState:xt},dt))}),TableCell$1=TableCell;function getTableHeadUtilityClass(tt){return generateUtilityClass("MuiTableHead",tt)}generateUtilityClasses("MuiTableHead",["root"]);const _excluded$O=["className","component"],useUtilityClasses$k=tt=>{const{classes:et}=tt;return composeClasses({root:["root"]},getTableHeadUtilityClass,et)},TableHeadRoot=styled$1("thead",{name:"MuiTableHead",slot:"Root",overridesResolver:(tt,et)=>et.root})({display:"table-header-group"}),tablelvl2={variant:"head"},defaultComponent$1="thead",TableHead=reactExports.forwardRef(function(et,nt){const rt=useThemeProps({props:et,name:"MuiTableHead"}),{className:it,component:ot=defaultComponent$1}=rt,at=_objectWithoutPropertiesLoose$m(rt,_excluded$O),st=_extends$u({},rt,{component:ot}),lt=useUtilityClasses$k(st);return jsxRuntimeExports.jsx(Tablelvl2Context$1.Provider,{value:tablelvl2,children:jsxRuntimeExports.jsx(TableHeadRoot,_extends$u({as:ot,className:clsx$3(lt.root,it),ref:nt,role:ot===defaultComponent$1?null:"rowgroup",ownerState:st},at))})}),TableHead$1=TableHead,KeyboardArrowLeft=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z"}),"KeyboardArrowLeft"),KeyboardArrowRight=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"}),"KeyboardArrowRight");function getTableRowUtilityClass(tt){return generateUtilityClass("MuiTableRow",tt)}const tableRowClasses=generateUtilityClasses("MuiTableRow",["root","selected","hover","head","footer"]),tableRowClasses$1=tableRowClasses,_excluded$N=["className","component","hover","selected"],useUtilityClasses$j=tt=>{const{classes:et,selected:nt,hover:rt,head:it,footer:ot}=tt;return composeClasses({root:["root",nt&&"selected",rt&&"hover",it&&"head",ot&&"footer"]},getTableRowUtilityClass,et)},TableRowRoot=styled$1("tr",{name:"MuiTableRow",slot:"Root",overridesResolver:(tt,et)=>{const{ownerState:nt}=tt;return[et.root,nt.head&&et.head,nt.footer&&et.footer]}})(({theme:tt})=>({color:"inherit",display:"table-row",verticalAlign:"middle",outline:0,[`&.${tableRowClasses$1.hover}:hover`]:{backgroundColor:(tt.vars||tt).palette.action.hover},[`&.${tableRowClasses$1.selected}`]:{backgroundColor:tt.vars?`rgba(${tt.vars.palette.primary.mainChannel} / ${tt.vars.palette.action.selectedOpacity})`:alpha$1(tt.palette.primary.main,tt.palette.action.selectedOpacity),"&:hover":{backgroundColor:tt.vars?`rgba(${tt.vars.palette.primary.mainChannel} / calc(${tt.vars.palette.action.selectedOpacity} + ${tt.vars.palette.action.hoverOpacity}))`:alpha$1(tt.palette.primary.main,tt.palette.action.selectedOpacity+tt.palette.action.hoverOpacity)}}})),defaultComponent="tr",TableRow=reactExports.forwardRef(function(et,nt){const rt=useThemeProps({props:et,name:"MuiTableRow"}),{className:it,component:ot=defaultComponent,hover:at=!1,selected:st=!1}=rt,lt=_objectWithoutPropertiesLoose$m(rt,_excluded$N),ct=reactExports.useContext(Tablelvl2Context$1),ut=_extends$u({},rt,{component:ot,hover:at,selected:st,head:ct&&ct.variant==="head",footer:ct&&ct.variant==="footer"}),ht=useUtilityClasses$j(ut);return jsxRuntimeExports.jsx(TableRowRoot,_extends$u({as:ot,ref:nt,className:clsx$3(ht.root,it),role:ot===defaultComponent?null:"row",ownerState:ut},lt))}),TableRow$1=TableRow;function easeInOutSin(tt){return(1+Math.sin(Math.PI*tt-Math.PI/2))/2}function animate(tt,et,nt,rt={},it=()=>{}){const{ease:ot=easeInOutSin,duration:at=300}=rt;let st=null;const lt=et[tt];let ct=!1;const ut=()=>{ct=!0},ht=dt=>{if(ct){it(new Error("Animation cancelled"));return}st===null&&(st=dt);const pt=Math.min(1,(dt-st)/at);if(et[tt]=ot(pt)*(nt-lt)+lt,pt>=1){requestAnimationFrame(()=>{it(null)});return}requestAnimationFrame(ht)};return lt===nt?(it(new Error("Element already at target position")),ut):(requestAnimationFrame(ht),ut)}const _excluded$M=["onChange"],styles$2={width:99,height:99,position:"absolute",top:-9999,overflow:"scroll"};function ScrollbarSize(tt){const{onChange:et}=tt,nt=_objectWithoutPropertiesLoose$m(tt,_excluded$M),rt=reactExports.useRef(),it=reactExports.useRef(null),ot=()=>{rt.current=it.current.offsetHeight-it.current.clientHeight};return useEnhancedEffect$1(()=>{const at=debounce$5(()=>{const lt=rt.current;ot(),lt!==rt.current&&et(rt.current)}),st=ownerWindow(it.current);return st.addEventListener("resize",at),()=>{at.clear(),st.removeEventListener("resize",at)}},[et]),reactExports.useEffect(()=>{ot(),et(rt.current)},[et]),jsxRuntimeExports.jsx("div",_extends$u({style:styles$2,ref:it},nt))}function getTabScrollButtonUtilityClass(tt){return generateUtilityClass("MuiTabScrollButton",tt)}const tabScrollButtonClasses=generateUtilityClasses("MuiTabScrollButton",["root","vertical","horizontal","disabled"]),tabScrollButtonClasses$1=tabScrollButtonClasses,_excluded$L=["className","slots","slotProps","direction","orientation","disabled"],useUtilityClasses$i=tt=>{const{classes:et,orientation:nt,disabled:rt}=tt;return composeClasses({root:["root",nt,rt&&"disabled"]},getTabScrollButtonUtilityClass,et)},TabScrollButtonRoot=styled$1(ButtonBase$1,{name:"MuiTabScrollButton",slot:"Root",overridesResolver:(tt,et)=>{const{ownerState:nt}=tt;return[et.root,nt.orientation&&et[nt.orientation]]}})(({ownerState:tt})=>_extends$u({width:40,flexShrink:0,opacity:.8,[`&.${tabScrollButtonClasses$1.disabled}`]:{opacity:0}},tt.orientation==="vertical"&&{width:"100%",height:40,"& svg":{transform:`rotate(${tt.isRtl?-90:90}deg)`}})),TabScrollButton=reactExports.forwardRef(function(et,nt){var rt,it;const ot=useThemeProps({props:et,name:"MuiTabScrollButton"}),{className:at,slots:st={},slotProps:lt={},direction:ct}=ot,ut=_objectWithoutPropertiesLoose$m(ot,_excluded$L),dt=useTheme().direction==="rtl",pt=_extends$u({isRtl:dt},ot),mt=useUtilityClasses$i(pt),gt=(rt=st.StartScrollButtonIcon)!=null?rt:KeyboardArrowLeft,yt=(it=st.EndScrollButtonIcon)!=null?it:KeyboardArrowRight,bt=useSlotProps({elementType:gt,externalSlotProps:lt.startScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:pt}),vt=useSlotProps({elementType:yt,externalSlotProps:lt.endScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:pt});return jsxRuntimeExports.jsx(TabScrollButtonRoot,_extends$u({component:"div",className:clsx$3(mt.root,at),ref:nt,role:null,ownerState:pt,tabIndex:null},ut,{children:ct==="left"?jsxRuntimeExports.jsx(gt,_extends$u({},bt)):jsxRuntimeExports.jsx(yt,_extends$u({},vt))}))}),TabScrollButton$1=TabScrollButton;function getTabsUtilityClass(tt){return generateUtilityClass("MuiTabs",tt)}const tabsClasses=generateUtilityClasses("MuiTabs",["root","vertical","flexContainer","flexContainerVertical","centered","scroller","fixed","scrollableX","scrollableY","hideScrollbar","scrollButtons","scrollButtonsHideMobile","indicator"]),tabsClasses$1=tabsClasses,_excluded$K=["aria-label","aria-labelledby","action","centered","children","className","component","allowScrollButtonsMobile","indicatorColor","onChange","orientation","ScrollButtonComponent","scrollButtons","selectionFollowsFocus","slots","slotProps","TabIndicatorProps","TabScrollButtonProps","textColor","value","variant","visibleScrollbar"],nextItem=(tt,et)=>tt===et?tt.firstChild:et&&et.nextElementSibling?et.nextElementSibling:tt.firstChild,previousItem=(tt,et)=>tt===et?tt.lastChild:et&&et.previousElementSibling?et.previousElementSibling:tt.lastChild,moveFocus=(tt,et,nt)=>{let rt=!1,it=nt(tt,et);for(;it;){if(it===tt.firstChild){if(rt)return;rt=!0}const ot=it.disabled||it.getAttribute("aria-disabled")==="true";if(!it.hasAttribute("tabindex")||ot)it=nt(tt,it);else{it.focus();return}}},useUtilityClasses$h=tt=>{const{vertical:et,fixed:nt,hideScrollbar:rt,scrollableX:it,scrollableY:ot,centered:at,scrollButtonsHideMobile:st,classes:lt}=tt;return composeClasses({root:["root",et&&"vertical"],scroller:["scroller",nt&&"fixed",rt&&"hideScrollbar",it&&"scrollableX",ot&&"scrollableY"],flexContainer:["flexContainer",et&&"flexContainerVertical",at&&"centered"],indicator:["indicator"],scrollButtons:["scrollButtons",st&&"scrollButtonsHideMobile"],scrollableX:[it&&"scrollableX"],hideScrollbar:[rt&&"hideScrollbar"]},getTabsUtilityClass,lt)},TabsRoot=styled$1("div",{name:"MuiTabs",slot:"Root",overridesResolver:(tt,et)=>{const{ownerState:nt}=tt;return[{[`& .${tabsClasses$1.scrollButtons}`]:et.scrollButtons},{[`& .${tabsClasses$1.scrollButtons}`]:nt.scrollButtonsHideMobile&&et.scrollButtonsHideMobile},et.root,nt.vertical&&et.vertical]}})(({ownerState:tt,theme:et})=>_extends$u({overflow:"hidden",minHeight:48,WebkitOverflowScrolling:"touch",display:"flex"},tt.vertical&&{flexDirection:"column"},tt.scrollButtonsHideMobile&&{[`& .${tabsClasses$1.scrollButtons}`]:{[et.breakpoints.down("sm")]:{display:"none"}}})),TabsScroller=styled$1("div",{name:"MuiTabs",slot:"Scroller",overridesResolver:(tt,et)=>{const{ownerState:nt}=tt;return[et.scroller,nt.fixed&&et.fixed,nt.hideScrollbar&&et.hideScrollbar,nt.scrollableX&&et.scrollableX,nt.scrollableY&&et.scrollableY]}})(({ownerState:tt})=>_extends$u({position:"relative",display:"inline-block",flex:"1 1 auto",whiteSpace:"nowrap"},tt.fixed&&{overflowX:"hidden",width:"100%"},tt.hideScrollbar&&{scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}},tt.scrollableX&&{overflowX:"auto",overflowY:"hidden"},tt.scrollableY&&{overflowY:"auto",overflowX:"hidden"})),FlexContainer=styled$1("div",{name:"MuiTabs",slot:"FlexContainer",overridesResolver:(tt,et)=>{const{ownerState:nt}=tt;return[et.flexContainer,nt.vertical&&et.flexContainerVertical,nt.centered&&et.centered]}})(({ownerState:tt})=>_extends$u({display:"flex"},tt.vertical&&{flexDirection:"column"},tt.centered&&{justifyContent:"center"})),TabsIndicator=styled$1("span",{name:"MuiTabs",slot:"Indicator",overridesResolver:(tt,et)=>et.indicator})(({ownerState:tt,theme:et})=>_extends$u({position:"absolute",height:2,bottom:0,width:"100%",transition:et.transitions.create()},tt.indicatorColor==="primary"&&{backgroundColor:(et.vars||et).palette.primary.main},tt.indicatorColor==="secondary"&&{backgroundColor:(et.vars||et).palette.secondary.main},tt.vertical&&{height:"100%",width:2,right:0})),TabsScrollbarSize=styled$1(ScrollbarSize)({overflowX:"auto",overflowY:"hidden",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}}),defaultIndicatorStyle={},Tabs=reactExports.forwardRef(function(et,nt){const rt=useThemeProps({props:et,name:"MuiTabs"}),it=useTheme(),ot=it.direction==="rtl",{"aria-label":at,"aria-labelledby":st,action:lt,centered:ct=!1,children:ut,className:ht,component:dt="div",allowScrollButtonsMobile:pt=!1,indicatorColor:mt="primary",onChange:gt,orientation:yt="horizontal",ScrollButtonComponent:bt=TabScrollButton$1,scrollButtons:vt="auto",selectionFollowsFocus:xt,slots:kt={},slotProps:St={},TabIndicatorProps:Tt={},TabScrollButtonProps:At={},textColor:Et="primary",value:$t,variant:Dt="standard",visibleScrollbar:jt=!1}=rt,Pt=_objectWithoutPropertiesLoose$m(rt,_excluded$K),Ct=Dt==="scrollable",wt=yt==="vertical",It=wt?"scrollTop":"scrollLeft",Ot=wt?"top":"left",Wt=wt?"bottom":"right",zt=wt?"clientHeight":"clientWidth",Ft=wt?"height":"width",Nt=_extends$u({},rt,{component:dt,allowScrollButtonsMobile:pt,indicatorColor:mt,orientation:yt,vertical:wt,scrollButtons:vt,textColor:Et,variant:Dt,visibleScrollbar:jt,fixed:!Ct,hideScrollbar:Ct&&!jt,scrollableX:Ct&&!wt,scrollableY:Ct&&wt,centered:ct&&!Ct,scrollButtonsHideMobile:!pt}),Ut=useUtilityClasses$h(Nt),Mt=useSlotProps({elementType:kt.StartScrollButtonIcon,externalSlotProps:St.startScrollButtonIcon,ownerState:Nt}),Ht=useSlotProps({elementType:kt.EndScrollButtonIcon,externalSlotProps:St.endScrollButtonIcon,ownerState:Nt}),[en,sn]=reactExports.useState(!1),[Kt,rn]=reactExports.useState(defaultIndicatorStyle),[nn,hn]=reactExports.useState(!1),[vn,an]=reactExports.useState(!1),[Qt,_n]=reactExports.useState(!1),[Pn,$n]=reactExports.useState({overflow:"hidden",scrollbarWidth:0}),Nn=new Map,Tn=reactExports.useRef(null),cn=reactExports.useRef(null),mn=()=>{const Vn=Tn.current;let qn;if(Vn){const Jn=Vn.getBoundingClientRect();qn={clientWidth:Vn.clientWidth,scrollLeft:Vn.scrollLeft,scrollTop:Vn.scrollTop,scrollLeftNormalized:getNormalizedScrollLeft(Vn,it.direction),scrollWidth:Vn.scrollWidth,top:Jn.top,bottom:Jn.bottom,left:Jn.left,right:Jn.right}}let zn;if(Vn&&$t!==!1){const Jn=cn.current.children;if(Jn.length>0){const Hn=Jn[Nn.get($t)];zn=Hn?Hn.getBoundingClientRect():null}}return{tabsMeta:qn,tabMeta:zn}},In=useEventCallback(()=>{const{tabsMeta:Vn,tabMeta:qn}=mn();let zn=0,Jn;if(wt)Jn="top",qn&&Vn&&(zn=qn.top-Vn.top+Vn.scrollTop);else if(Jn=ot?"right":"left",qn&&Vn){const pr=ot?Vn.scrollLeftNormalized+Vn.clientWidth-Vn.scrollWidth:Vn.scrollLeft;zn=(ot?-1:1)*(qn[Jn]-Vn[Jn]+pr)}const Hn={[Jn]:zn,[Ft]:qn?qn[Ft]:0};if(isNaN(Kt[Jn])||isNaN(Kt[Ft]))rn(Hn);else{const pr=Math.abs(Kt[Jn]-Hn[Jn]),fr=Math.abs(Kt[Ft]-Hn[Ft]);(pr>=1||fr>=1)&&rn(Hn)}}),An=(Vn,{animation:qn=!0}={})=>{qn?animate(It,Tn.current,Vn,{duration:it.transitions.duration.standard}):Tn.current[It]=Vn},wn=Vn=>{let qn=Tn.current[It];wt?qn+=Vn:(qn+=Vn*(ot?-1:1),qn*=ot&&detectScrollType()==="reverse"?-1:1),An(qn)},fn=()=>{const Vn=Tn.current[zt];let qn=0;const zn=Array.from(cn.current.children);for(let Jn=0;JnVn){Jn===0&&(qn=Vn);break}qn+=Hn[zt]}return qn},pn=()=>{wn(-1*fn())},kn=()=>{wn(fn())},Dn=reactExports.useCallback(Vn=>{$n({overflow:null,scrollbarWidth:Vn})},[]),un=()=>{const Vn={};Vn.scrollbarSizeListener=Ct?jsxRuntimeExports.jsx(TabsScrollbarSize,{onChange:Dn,className:clsx$3(Ut.scrollableX,Ut.hideScrollbar)}):null;const zn=Ct&&(vt==="auto"&&(nn||vn)||vt===!0);return Vn.scrollButtonStart=zn?jsxRuntimeExports.jsx(bt,_extends$u({slots:{StartScrollButtonIcon:kt.StartScrollButtonIcon},slotProps:{startScrollButtonIcon:Mt},orientation:yt,direction:ot?"right":"left",onClick:pn,disabled:!nn},At,{className:clsx$3(Ut.scrollButtons,At.className)})):null,Vn.scrollButtonEnd=zn?jsxRuntimeExports.jsx(bt,_extends$u({slots:{EndScrollButtonIcon:kt.EndScrollButtonIcon},slotProps:{endScrollButtonIcon:Ht},orientation:yt,direction:ot?"left":"right",onClick:kn,disabled:!vn},At,{className:clsx$3(Ut.scrollButtons,At.className)})):null,Vn},Zt=useEventCallback(Vn=>{const{tabsMeta:qn,tabMeta:zn}=mn();if(!(!zn||!qn)){if(zn[Ot]qn[Wt]){const Jn=qn[It]+(zn[Wt]-qn[Wt]);An(Jn,{animation:Vn})}}}),Xt=useEventCallback(()=>{Ct&&vt!==!1&&_n(!Qt)});reactExports.useEffect(()=>{const Vn=debounce$5(()=>{Tn.current&&In()}),qn=ownerWindow(Tn.current);qn.addEventListener("resize",Vn);let zn;return typeof ResizeObserver<"u"&&(zn=new ResizeObserver(Vn),Array.from(cn.current.children).forEach(Jn=>{zn.observe(Jn)})),()=>{Vn.clear(),qn.removeEventListener("resize",Vn),zn&&zn.disconnect()}},[In]),reactExports.useEffect(()=>{const Vn=Array.from(cn.current.children),qn=Vn.length;if(typeof IntersectionObserver<"u"&&qn>0&&Ct&&vt!==!1){const zn=Vn[0],Jn=Vn[qn-1],Hn={root:Tn.current,threshold:.99},pr=Tr=>{hn(!Tr[0].isIntersecting)},fr=new IntersectionObserver(pr,Hn);fr.observe(zn);const xr=Tr=>{an(!Tr[0].isIntersecting)},io=new IntersectionObserver(xr,Hn);return io.observe(Jn),()=>{fr.disconnect(),io.disconnect()}}},[Ct,vt,Qt,ut==null?void 0:ut.length]),reactExports.useEffect(()=>{sn(!0)},[]),reactExports.useEffect(()=>{In()}),reactExports.useEffect(()=>{Zt(defaultIndicatorStyle!==Kt)},[Zt,Kt]),reactExports.useImperativeHandle(lt,()=>({updateIndicator:In,updateScrollButtons:Xt}),[In,Xt]);const Sn=jsxRuntimeExports.jsx(TabsIndicator,_extends$u({},Tt,{className:clsx$3(Ut.indicator,Tt.className),ownerState:Nt,style:_extends$u({},Kt,Tt.style)}));let Rn=0;const jn=reactExports.Children.map(ut,Vn=>{if(!reactExports.isValidElement(Vn))return null;const qn=Vn.props.value===void 0?Rn:Vn.props.value;Nn.set(qn,Rn);const zn=qn===$t;return Rn+=1,reactExports.cloneElement(Vn,_extends$u({fullWidth:Dt==="fullWidth",indicator:zn&&!en&&Sn,selected:zn,selectionFollowsFocus:xt,onChange:gt,textColor:Et,value:qn},Rn===1&&$t===!1&&!Vn.props.tabIndex?{tabIndex:0}:{}))}),On=Vn=>{const qn=cn.current,zn=ownerDocument(qn).activeElement;if(zn.getAttribute("role")!=="tab")return;let Hn=yt==="horizontal"?"ArrowLeft":"ArrowUp",pr=yt==="horizontal"?"ArrowRight":"ArrowDown";switch(yt==="horizontal"&&ot&&(Hn="ArrowRight",pr="ArrowLeft"),Vn.key){case Hn:Vn.preventDefault(),moveFocus(qn,zn,previousItem);break;case pr:Vn.preventDefault(),moveFocus(qn,zn,nextItem);break;case"Home":Vn.preventDefault(),moveFocus(qn,null,nextItem);break;case"End":Vn.preventDefault(),moveFocus(qn,null,previousItem);break}},Zn=un();return jsxRuntimeExports.jsxs(TabsRoot,_extends$u({className:clsx$3(Ut.root,ht),ownerState:Nt,ref:nt,as:dt},Pt,{children:[Zn.scrollButtonStart,Zn.scrollbarSizeListener,jsxRuntimeExports.jsxs(TabsScroller,{className:Ut.scroller,ownerState:Nt,style:{overflow:Pn.overflow,[wt?`margin${ot?"Left":"Right"}`:"marginBottom"]:jt?void 0:-Pn.scrollbarWidth},ref:Tn,children:[jsxRuntimeExports.jsx(FlexContainer,{"aria-label":at,"aria-labelledby":st,"aria-orientation":yt==="vertical"?"vertical":null,className:Ut.flexContainer,ownerState:Nt,onKeyDown:On,ref:cn,role:"tablist",children:jn}),en&&Sn]}),Zn.scrollButtonEnd]}))}),Tabs$1=Tabs;function getTextFieldUtilityClass(tt){return generateUtilityClass("MuiTextField",tt)}generateUtilityClasses("MuiTextField",["root"]);const _excluded$J=["autoComplete","autoFocus","children","className","color","defaultValue","disabled","error","FormHelperTextProps","fullWidth","helperText","id","InputLabelProps","inputProps","InputProps","inputRef","label","maxRows","minRows","multiline","name","onBlur","onChange","onFocus","placeholder","required","rows","select","SelectProps","type","value","variant"],variantComponent={standard:Input$3,filled:FilledInput$1,outlined:OutlinedInput$1},useUtilityClasses$g=tt=>{const{classes:et}=tt;return composeClasses({root:["root"]},getTextFieldUtilityClass,et)},TextFieldRoot=styled$1(FormControl$1,{name:"MuiTextField",slot:"Root",overridesResolver:(tt,et)=>et.root})({}),TextField=reactExports.forwardRef(function(et,nt){const rt=useThemeProps({props:et,name:"MuiTextField"}),{autoComplete:it,autoFocus:ot=!1,children:at,className:st,color:lt="primary",defaultValue:ct,disabled:ut=!1,error:ht=!1,FormHelperTextProps:dt,fullWidth:pt=!1,helperText:mt,id:gt,InputLabelProps:yt,inputProps:bt,InputProps:vt,inputRef:xt,label:kt,maxRows:St,minRows:Tt,multiline:At=!1,name:Et,onBlur:$t,onChange:Dt,onFocus:jt,placeholder:Pt,required:Ct=!1,rows:wt,select:It=!1,SelectProps:Ot,type:Wt,value:zt,variant:Ft="outlined"}=rt,Nt=_objectWithoutPropertiesLoose$m(rt,_excluded$J),Ut=_extends$u({},rt,{autoFocus:ot,color:lt,disabled:ut,error:ht,fullWidth:pt,multiline:At,required:Ct,select:It,variant:Ft}),Mt=useUtilityClasses$g(Ut),Ht={};Ft==="outlined"&&(yt&&typeof yt.shrink<"u"&&(Ht.notched=yt.shrink),Ht.label=kt),It&&((!Ot||!Ot.native)&&(Ht.id=void 0),Ht["aria-describedby"]=void 0);const en=useId(gt),sn=mt&&en?`${en}-helper-text`:void 0,Kt=kt&&en?`${en}-label`:void 0,rn=variantComponent[Ft],nn=jsxRuntimeExports.jsx(rn,_extends$u({"aria-describedby":sn,autoComplete:it,autoFocus:ot,defaultValue:ct,fullWidth:pt,multiline:At,name:Et,rows:wt,maxRows:St,minRows:Tt,type:Wt,value:zt,id:en,inputRef:xt,onBlur:$t,onChange:Dt,onFocus:jt,placeholder:Pt,inputProps:bt},Ht,vt));return jsxRuntimeExports.jsxs(TextFieldRoot,_extends$u({className:clsx$3(Mt.root,st),disabled:ut,error:ht,fullWidth:pt,ref:nt,required:Ct,color:lt,variant:Ft,ownerState:Ut},Nt,{children:[kt!=null&&kt!==""&&jsxRuntimeExports.jsx(InputLabel$1,_extends$u({htmlFor:en,id:Kt},yt,{children:kt})),It?jsxRuntimeExports.jsx(Select$4,_extends$u({"aria-describedby":sn,id:en,labelId:Kt,value:zt,input:nn},Ot,{children:at})):nn,mt&&jsxRuntimeExports.jsx(FormHelperText$1,_extends$u({id:sn},dt,{children:mt}))]}))}),MuiTextField=TextField;function r$6(tt){var et,nt,rt="";if(typeof tt=="string"||typeof tt=="number")rt+=tt;else if(typeof tt=="object")if(Array.isArray(tt))for(et=0;et"u"||!getProto$1?undefined$1:getProto$1(Uint8Array),INTRINSICS={"%AggregateError%":typeof AggregateError>"u"?undefined$1:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?undefined$1:ArrayBuffer,"%ArrayIteratorPrototype%":hasSymbols$1&&getProto$1?getProto$1([][Symbol.iterator]()):undefined$1,"%AsyncFromSyncIteratorPrototype%":undefined$1,"%AsyncFunction%":needsEval,"%AsyncGenerator%":needsEval,"%AsyncGeneratorFunction%":needsEval,"%AsyncIteratorPrototype%":needsEval,"%Atomics%":typeof Atomics>"u"?undefined$1:Atomics,"%BigInt%":typeof BigInt>"u"?undefined$1:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?undefined$1:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?undefined$1:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?undefined$1:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?undefined$1:Float32Array,"%Float64Array%":typeof Float64Array>"u"?undefined$1:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?undefined$1:FinalizationRegistry,"%Function%":$Function,"%GeneratorFunction%":needsEval,"%Int8Array%":typeof Int8Array>"u"?undefined$1:Int8Array,"%Int16Array%":typeof Int16Array>"u"?undefined$1:Int16Array,"%Int32Array%":typeof Int32Array>"u"?undefined$1:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":hasSymbols$1&&getProto$1?getProto$1(getProto$1([][Symbol.iterator]())):undefined$1,"%JSON%":typeof JSON=="object"?JSON:undefined$1,"%Map%":typeof Map>"u"?undefined$1:Map,"%MapIteratorPrototype%":typeof Map>"u"||!hasSymbols$1||!getProto$1?undefined$1:getProto$1(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?undefined$1:Promise,"%Proxy%":typeof Proxy>"u"?undefined$1:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?undefined$1:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?undefined$1:Set,"%SetIteratorPrototype%":typeof Set>"u"||!hasSymbols$1||!getProto$1?undefined$1:getProto$1(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?undefined$1:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":hasSymbols$1&&getProto$1?getProto$1(""[Symbol.iterator]()):undefined$1,"%Symbol%":hasSymbols$1?Symbol:undefined$1,"%SyntaxError%":$SyntaxError,"%ThrowTypeError%":ThrowTypeError,"%TypedArray%":TypedArray,"%TypeError%":$TypeError,"%Uint8Array%":typeof Uint8Array>"u"?undefined$1:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?undefined$1:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?undefined$1:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?undefined$1:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?undefined$1:WeakMap,"%WeakRef%":typeof WeakRef>"u"?undefined$1:WeakRef,"%WeakSet%":typeof WeakSet>"u"?undefined$1:WeakSet};if(getProto$1)try{null.error}catch(tt){var errorProto=getProto$1(getProto$1(tt));INTRINSICS["%Error.prototype%"]=errorProto}var doEval=function tt(et){var nt;if(et==="%AsyncFunction%")nt=getEvalledConstructor("async function () {}");else if(et==="%GeneratorFunction%")nt=getEvalledConstructor("function* () {}");else if(et==="%AsyncGeneratorFunction%")nt=getEvalledConstructor("async function* () {}");else if(et==="%AsyncGenerator%"){var rt=tt("%AsyncGeneratorFunction%");rt&&(nt=rt.prototype)}else if(et==="%AsyncIteratorPrototype%"){var it=tt("%AsyncGenerator%");it&&getProto$1&&(nt=getProto$1(it.prototype))}return INTRINSICS[et]=nt,nt},LEGACY_ALIASES={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},bind=functionBind,hasOwn$1=src$2,$concat=bind.call(Function.call,Array.prototype.concat),$spliceApply=bind.call(Function.apply,Array.prototype.splice),$replace=bind.call(Function.call,String.prototype.replace),$strSlice=bind.call(Function.call,String.prototype.slice),$exec=bind.call(Function.call,RegExp.prototype.exec),rePropName$1=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,reEscapeChar$1=/\\(\\)?/g,stringToPath$2=function(et){var nt=$strSlice(et,0,1),rt=$strSlice(et,-1);if(nt==="%"&&rt!=="%")throw new $SyntaxError("invalid intrinsic syntax, expected closing `%`");if(rt==="%"&&nt!=="%")throw new $SyntaxError("invalid intrinsic syntax, expected opening `%`");var it=[];return $replace(et,rePropName$1,function(ot,at,st,lt){it[it.length]=st?$replace(lt,reEscapeChar$1,"$1"):at||ot}),it},getBaseIntrinsic=function(et,nt){var rt=et,it;if(hasOwn$1(LEGACY_ALIASES,rt)&&(it=LEGACY_ALIASES[rt],rt="%"+it[0]+"%"),hasOwn$1(INTRINSICS,rt)){var ot=INTRINSICS[rt];if(ot===needsEval&&(ot=doEval(rt)),typeof ot>"u"&&!nt)throw new $TypeError("intrinsic "+et+" exists, but is not available. Please file an issue!");return{alias:it,name:rt,value:ot}}throw new $SyntaxError("intrinsic "+et+" does not exist!")},getIntrinsic=function(et,nt){if(typeof et!="string"||et.length===0)throw new $TypeError("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof nt!="boolean")throw new $TypeError('"allowMissing" argument must be a boolean');if($exec(/^%?[^%]*%?$/,et)===null)throw new $SyntaxError("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var rt=stringToPath$2(et),it=rt.length>0?rt[0]:"",ot=getBaseIntrinsic("%"+it+"%",nt),at=ot.name,st=ot.value,lt=!1,ct=ot.alias;ct&&(it=ct[0],$spliceApply(rt,$concat([0,1],ct)));for(var ut=1,ht=!0;ut=rt.length){var gt=$gOPD$1(st,dt);ht=!!gt,ht&&"get"in gt&&!("originalValue"in gt.get)?st=gt.get:st=st[dt]}else ht=hasOwn$1(st,dt),st=st[dt];ht&&!lt&&(INTRINSICS[at]=st)}}return st},callBind$2={exports:{}};(function(tt){var et=functionBind,nt=getIntrinsic,rt=nt("%Function.prototype.apply%"),it=nt("%Function.prototype.call%"),ot=nt("%Reflect.apply%",!0)||et.call(it,rt),at=nt("%Object.getOwnPropertyDescriptor%",!0),st=nt("%Object.defineProperty%",!0),lt=nt("%Math.max%");if(st)try{st({},"a",{value:1})}catch{st=null}tt.exports=function(ht){var dt=ot(et,it,arguments);if(at&&st){var pt=at(dt,"length");pt.configurable&&st(dt,"length",{value:1+lt(0,ht.length-(arguments.length-1))})}return dt};var ct=function(){return ot(et,rt,arguments)};st?st(tt.exports,"apply",{value:ct}):tt.exports.apply=ct})(callBind$2);var callBindExports=callBind$2.exports,GetIntrinsic$1=getIntrinsic,callBind$1=callBindExports,$indexOf$1=callBind$1(GetIntrinsic$1("String.prototype.indexOf")),callBound$3=function(et,nt){var rt=GetIntrinsic$1(et,!!nt);return typeof rt=="function"&&$indexOf$1(et,".prototype.")>-1?callBind$1(rt):rt},hasToStringTag$3=shams(),callBound$2=callBound$3,$toString$1=callBound$2("Object.prototype.toString"),isStandardArguments=function(et){return hasToStringTag$3&&et&&typeof et=="object"&&Symbol.toStringTag in et?!1:$toString$1(et)==="[object Arguments]"},isLegacyArguments=function(et){return isStandardArguments(et)?!0:et!==null&&typeof et=="object"&&typeof et.length=="number"&&et.length>=0&&$toString$1(et)!=="[object Array]"&&$toString$1(et.callee)==="[object Function]"},supportsStandardArguments=function(){return isStandardArguments(arguments)}();isStandardArguments.isLegacyArguments=isLegacyArguments;var isArguments$5=supportsStandardArguments?isStandardArguments:isLegacyArguments,toStr$3=Object.prototype.toString,fnToStr$1=Function.prototype.toString,isFnRegex=/^\s*(?:function)?\*/,hasToStringTag$2=shams(),getProto=Object.getPrototypeOf,getGeneratorFunc=function(){if(!hasToStringTag$2)return!1;try{return Function("return function*() {}")()}catch{}},GeneratorFunction,isGeneratorFunction=function(et){if(typeof et!="function")return!1;if(isFnRegex.test(fnToStr$1.call(et)))return!0;if(!hasToStringTag$2){var nt=toStr$3.call(et);return nt==="[object GeneratorFunction]"}if(!getProto)return!1;if(typeof GeneratorFunction>"u"){var rt=getGeneratorFunc();GeneratorFunction=rt?getProto(rt):!1}return getProto(et)===GeneratorFunction},fnToStr=Function.prototype.toString,reflectApply=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,badArrayLike,isCallableMarker;if(typeof reflectApply=="function"&&typeof Object.defineProperty=="function")try{badArrayLike=Object.defineProperty({},"length",{get:function(){throw isCallableMarker}}),isCallableMarker={},reflectApply(function(){throw 42},null,badArrayLike)}catch(tt){tt!==isCallableMarker&&(reflectApply=null)}else reflectApply=null;var constructorRegex=/^\s*class\b/,isES6ClassFn=function(et){try{var nt=fnToStr.call(et);return constructorRegex.test(nt)}catch{return!1}},tryFunctionObject=function(et){try{return isES6ClassFn(et)?!1:(fnToStr.call(et),!0)}catch{return!1}},toStr$2=Object.prototype.toString,objectClass="[object Object]",fnClass="[object Function]",genClass="[object GeneratorFunction]",ddaClass="[object HTMLAllCollection]",ddaClass2="[object HTML document.all class]",ddaClass3="[object HTMLCollection]",hasToStringTag$1=typeof Symbol=="function"&&!!Symbol.toStringTag,isIE68=!(0 in[,]),isDDA=function(){return!1};if(typeof document=="object"){var all=document.all;toStr$2.call(all)===toStr$2.call(document.all)&&(isDDA=function(et){if((isIE68||!et)&&(typeof et>"u"||typeof et=="object"))try{var nt=toStr$2.call(et);return(nt===ddaClass||nt===ddaClass2||nt===ddaClass3||nt===objectClass)&&et("")==null}catch{}return!1})}var isCallable$1=reflectApply?function(et){if(isDDA(et))return!0;if(!et||typeof et!="function"&&typeof et!="object")return!1;try{reflectApply(et,null,badArrayLike)}catch(nt){if(nt!==isCallableMarker)return!1}return!isES6ClassFn(et)&&tryFunctionObject(et)}:function(et){if(isDDA(et))return!0;if(!et||typeof et!="function"&&typeof et!="object")return!1;if(hasToStringTag$1)return tryFunctionObject(et);if(isES6ClassFn(et))return!1;var nt=toStr$2.call(et);return nt!==fnClass&&nt!==genClass&&!/^\[object HTML/.test(nt)?!1:tryFunctionObject(et)},isCallable=isCallable$1,toStr$1=Object.prototype.toString,hasOwnProperty$e=Object.prototype.hasOwnProperty,forEachArray=function(et,nt,rt){for(var it=0,ot=et.length;it=3&&(it=rt),toStr$1.call(et)==="[object Array]"?forEachArray(et,nt,it):typeof et=="string"?forEachString(et,nt,it):forEachObject(et,nt,it)},forEach_1=forEach$1,possibleNames=["BigInt64Array","BigUint64Array","Float32Array","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray"],g$3=typeof globalThis>"u"?commonjsGlobal:globalThis,availableTypedArrays$1=function(){for(var et=[],nt=0;nt"u"?commonjsGlobal:globalThis,typedArrays=availableTypedArrays(),$slice=callBound$1("String.prototype.slice"),getPrototypeOf=Object.getPrototypeOf,$indexOf=callBound$1("Array.prototype.indexOf",!0)||function(et,nt){for(var rt=0;rt-1?nt:nt!=="Object"?!1:trySlices(et)}return gOPD?tryTypedArrays(et):null},whichTypedArray=whichTypedArray$1,isTypedArray$5=function(et){return!!whichTypedArray(et)};(function(tt){var et=isArguments$5,nt=isGeneratorFunction,rt=whichTypedArray$1,it=isTypedArray$5;function ot(mn){return mn.call.bind(mn)}var at=typeof BigInt<"u",st=typeof Symbol<"u",lt=ot(Object.prototype.toString),ct=ot(Number.prototype.valueOf),ut=ot(String.prototype.valueOf),ht=ot(Boolean.prototype.valueOf);if(at)var dt=ot(BigInt.prototype.valueOf);if(st)var pt=ot(Symbol.prototype.valueOf);function mt(mn,In){if(typeof mn!="object")return!1;try{return In(mn),!0}catch{return!1}}tt.isArgumentsObject=et,tt.isGeneratorFunction=nt,tt.isTypedArray=it;function gt(mn){return typeof Promise<"u"&&mn instanceof Promise||mn!==null&&typeof mn=="object"&&typeof mn.then=="function"&&typeof mn.catch=="function"}tt.isPromise=gt;function yt(mn){return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?ArrayBuffer.isView(mn):it(mn)||Ht(mn)}tt.isArrayBufferView=yt;function bt(mn){return rt(mn)==="Uint8Array"}tt.isUint8Array=bt;function vt(mn){return rt(mn)==="Uint8ClampedArray"}tt.isUint8ClampedArray=vt;function xt(mn){return rt(mn)==="Uint16Array"}tt.isUint16Array=xt;function kt(mn){return rt(mn)==="Uint32Array"}tt.isUint32Array=kt;function St(mn){return rt(mn)==="Int8Array"}tt.isInt8Array=St;function Tt(mn){return rt(mn)==="Int16Array"}tt.isInt16Array=Tt;function At(mn){return rt(mn)==="Int32Array"}tt.isInt32Array=At;function Et(mn){return rt(mn)==="Float32Array"}tt.isFloat32Array=Et;function $t(mn){return rt(mn)==="Float64Array"}tt.isFloat64Array=$t;function Dt(mn){return rt(mn)==="BigInt64Array"}tt.isBigInt64Array=Dt;function jt(mn){return rt(mn)==="BigUint64Array"}tt.isBigUint64Array=jt;function Pt(mn){return lt(mn)==="[object Map]"}Pt.working=typeof Map<"u"&&Pt(new Map);function Ct(mn){return typeof Map>"u"?!1:Pt.working?Pt(mn):mn instanceof Map}tt.isMap=Ct;function wt(mn){return lt(mn)==="[object Set]"}wt.working=typeof Set<"u"&&wt(new Set);function It(mn){return typeof Set>"u"?!1:wt.working?wt(mn):mn instanceof Set}tt.isSet=It;function Ot(mn){return lt(mn)==="[object WeakMap]"}Ot.working=typeof WeakMap<"u"&&Ot(new WeakMap);function Wt(mn){return typeof WeakMap>"u"?!1:Ot.working?Ot(mn):mn instanceof WeakMap}tt.isWeakMap=Wt;function zt(mn){return lt(mn)==="[object WeakSet]"}zt.working=typeof WeakSet<"u"&&zt(new WeakSet);function Ft(mn){return zt(mn)}tt.isWeakSet=Ft;function Nt(mn){return lt(mn)==="[object ArrayBuffer]"}Nt.working=typeof ArrayBuffer<"u"&&Nt(new ArrayBuffer);function Ut(mn){return typeof ArrayBuffer>"u"?!1:Nt.working?Nt(mn):mn instanceof ArrayBuffer}tt.isArrayBuffer=Ut;function Mt(mn){return lt(mn)==="[object DataView]"}Mt.working=typeof ArrayBuffer<"u"&&typeof DataView<"u"&&Mt(new DataView(new ArrayBuffer(1),0,1));function Ht(mn){return typeof DataView>"u"?!1:Mt.working?Mt(mn):mn instanceof DataView}tt.isDataView=Ht;var en=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:void 0;function sn(mn){return lt(mn)==="[object SharedArrayBuffer]"}function Kt(mn){return typeof en>"u"?!1:(typeof sn.working>"u"&&(sn.working=sn(new en)),sn.working?sn(mn):mn instanceof en)}tt.isSharedArrayBuffer=Kt;function rn(mn){return lt(mn)==="[object AsyncFunction]"}tt.isAsyncFunction=rn;function nn(mn){return lt(mn)==="[object Map Iterator]"}tt.isMapIterator=nn;function hn(mn){return lt(mn)==="[object Set Iterator]"}tt.isSetIterator=hn;function vn(mn){return lt(mn)==="[object Generator]"}tt.isGeneratorObject=vn;function an(mn){return lt(mn)==="[object WebAssembly.Module]"}tt.isWebAssemblyCompiledModule=an;function Qt(mn){return mt(mn,ct)}tt.isNumberObject=Qt;function _n(mn){return mt(mn,ut)}tt.isStringObject=_n;function Pn(mn){return mt(mn,ht)}tt.isBooleanObject=Pn;function $n(mn){return at&&mt(mn,dt)}tt.isBigIntObject=$n;function Nn(mn){return st&&mt(mn,pt)}tt.isSymbolObject=Nn;function Tn(mn){return Qt(mn)||_n(mn)||Pn(mn)||$n(mn)||Nn(mn)}tt.isBoxedPrimitive=Tn;function cn(mn){return typeof Uint8Array<"u"&&(Ut(mn)||Kt(mn))}tt.isAnyArrayBuffer=cn,["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(mn){Object.defineProperty(tt,mn,{enumerable:!1,value:function(){throw new Error(mn+" is not supported in userland")}})})})(types$7);var isBufferBrowser=function(et){return et&&typeof et=="object"&&typeof et.copy=="function"&&typeof et.fill=="function"&&typeof et.readUInt8=="function"},inherits_browser={exports:{}};typeof Object.create=="function"?inherits_browser.exports=function(et,nt){nt&&(et.super_=nt,et.prototype=Object.create(nt.prototype,{constructor:{value:et,enumerable:!1,writable:!0,configurable:!0}}))}:inherits_browser.exports=function(et,nt){if(nt){et.super_=nt;var rt=function(){};rt.prototype=nt.prototype,et.prototype=new rt,et.prototype.constructor=et}};var inherits_browserExports=inherits_browser.exports;(function(tt){var et=Object.getOwnPropertyDescriptors||function(Ht){for(var en=Object.keys(Ht),sn={},Kt=0;Kt=Kt)return hn;switch(hn){case"%s":return String(sn[en++]);case"%d":return Number(sn[en++]);case"%j":try{return JSON.stringify(sn[en++])}catch{return"[Circular]"}default:return hn}}),nn=sn[en];en"u")return function(){return tt.deprecate(Mt,Ht).apply(this,arguments)};var en=!1;function sn(){if(!en){if(process.throwDeprecation)throw new Error(Ht);process.traceDeprecation?console.trace(Ht):console.error(Ht),en=!0}return Mt.apply(this,arguments)}return sn};var rt={},it=/^$/;if({}.NODE_DEBUG){var ot={}.NODE_DEBUG;ot=ot.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),it=new RegExp("^"+ot+"$","i")}tt.debuglog=function(Mt){if(Mt=Mt.toUpperCase(),!rt[Mt])if(it.test(Mt)){var Ht=process.pid;rt[Mt]=function(){var en=tt.format.apply(tt,arguments);console.error("%s %d: %s",Mt,Ht,en)}}else rt[Mt]=function(){};return rt[Mt]};function at(Mt,Ht){var en={seen:[],stylize:lt};return arguments.length>=3&&(en.depth=arguments[2]),arguments.length>=4&&(en.colors=arguments[3]),bt(Ht)?en.showHidden=Ht:Ht&&tt._extend(en,Ht),At(en.showHidden)&&(en.showHidden=!1),At(en.depth)&&(en.depth=2),At(en.colors)&&(en.colors=!1),At(en.customInspect)&&(en.customInspect=!0),en.colors&&(en.stylize=st),ut(en,Mt,en.depth)}tt.inspect=at,at.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},at.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function st(Mt,Ht){var en=at.styles[Ht];return en?"\x1B["+at.colors[en][0]+"m"+Mt+"\x1B["+at.colors[en][1]+"m":Mt}function lt(Mt,Ht){return Mt}function ct(Mt){var Ht={};return Mt.forEach(function(en,sn){Ht[en]=!0}),Ht}function ut(Mt,Ht,en){if(Mt.customInspect&&Ht&&Pt(Ht.inspect)&&Ht.inspect!==tt.inspect&&!(Ht.constructor&&Ht.constructor.prototype===Ht)){var sn=Ht.inspect(en,Mt);return St(sn)||(sn=ut(Mt,sn,en)),sn}var Kt=ht(Mt,Ht);if(Kt)return Kt;var rn=Object.keys(Ht),nn=ct(rn);if(Mt.showHidden&&(rn=Object.getOwnPropertyNames(Ht)),jt(Ht)&&(rn.indexOf("message")>=0||rn.indexOf("description")>=0))return dt(Ht);if(rn.length===0){if(Pt(Ht)){var hn=Ht.name?": "+Ht.name:"";return Mt.stylize("[Function"+hn+"]","special")}if(Et(Ht))return Mt.stylize(RegExp.prototype.toString.call(Ht),"regexp");if(Dt(Ht))return Mt.stylize(Date.prototype.toString.call(Ht),"date");if(jt(Ht))return dt(Ht)}var vn="",an=!1,Qt=["{","}"];if(yt(Ht)&&(an=!0,Qt=["[","]"]),Pt(Ht)){var _n=Ht.name?": "+Ht.name:"";vn=" [Function"+_n+"]"}if(Et(Ht)&&(vn=" "+RegExp.prototype.toString.call(Ht)),Dt(Ht)&&(vn=" "+Date.prototype.toUTCString.call(Ht)),jt(Ht)&&(vn=" "+dt(Ht)),rn.length===0&&(!an||Ht.length==0))return Qt[0]+vn+Qt[1];if(en<0)return Et(Ht)?Mt.stylize(RegExp.prototype.toString.call(Ht),"regexp"):Mt.stylize("[Object]","special");Mt.seen.push(Ht);var Pn;return an?Pn=pt(Mt,Ht,en,nn,rn):Pn=rn.map(function($n){return mt(Mt,Ht,en,nn,$n,an)}),Mt.seen.pop(),gt(Pn,vn,Qt)}function ht(Mt,Ht){if(At(Ht))return Mt.stylize("undefined","undefined");if(St(Ht)){var en="'"+JSON.stringify(Ht).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return Mt.stylize(en,"string")}if(kt(Ht))return Mt.stylize(""+Ht,"number");if(bt(Ht))return Mt.stylize(""+Ht,"boolean");if(vt(Ht))return Mt.stylize("null","null")}function dt(Mt){return"["+Error.prototype.toString.call(Mt)+"]"}function pt(Mt,Ht,en,sn,Kt){for(var rn=[],nn=0,hn=Ht.length;nn-1&&(rn?hn=hn.split(` -`).map(function(an){return" "+an}).join(` -`).slice(2):hn=` -`+hn.split(` -`).map(function(an){return" "+an}).join(` -`))):hn=Mt.stylize("[Circular]","special")),At(nn)){if(rn&&Kt.match(/^\d+$/))return hn;nn=JSON.stringify(""+Kt),nn.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(nn=nn.slice(1,-1),nn=Mt.stylize(nn,"name")):(nn=nn.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),nn=Mt.stylize(nn,"string"))}return nn+": "+hn}function gt(Mt,Ht,en){var sn=Mt.reduce(function(Kt,rn){return rn.indexOf(` -`)>=0,Kt+rn.replace(/\u001b\[\d\d?m/g,"").length+1},0);return sn>60?en[0]+(Ht===""?"":Ht+` - `)+" "+Mt.join(`, - `)+" "+en[1]:en[0]+Ht+" "+Mt.join(", ")+" "+en[1]}tt.types=types$7;function yt(Mt){return Array.isArray(Mt)}tt.isArray=yt;function bt(Mt){return typeof Mt=="boolean"}tt.isBoolean=bt;function vt(Mt){return Mt===null}tt.isNull=vt;function xt(Mt){return Mt==null}tt.isNullOrUndefined=xt;function kt(Mt){return typeof Mt=="number"}tt.isNumber=kt;function St(Mt){return typeof Mt=="string"}tt.isString=St;function Tt(Mt){return typeof Mt=="symbol"}tt.isSymbol=Tt;function At(Mt){return Mt===void 0}tt.isUndefined=At;function Et(Mt){return $t(Mt)&&wt(Mt)==="[object RegExp]"}tt.isRegExp=Et,tt.types.isRegExp=Et;function $t(Mt){return typeof Mt=="object"&&Mt!==null}tt.isObject=$t;function Dt(Mt){return $t(Mt)&&wt(Mt)==="[object Date]"}tt.isDate=Dt,tt.types.isDate=Dt;function jt(Mt){return $t(Mt)&&(wt(Mt)==="[object Error]"||Mt instanceof Error)}tt.isError=jt,tt.types.isNativeError=jt;function Pt(Mt){return typeof Mt=="function"}tt.isFunction=Pt;function Ct(Mt){return Mt===null||typeof Mt=="boolean"||typeof Mt=="number"||typeof Mt=="string"||typeof Mt=="symbol"||typeof Mt>"u"}tt.isPrimitive=Ct,tt.isBuffer=isBufferBrowser;function wt(Mt){return Object.prototype.toString.call(Mt)}function It(Mt){return Mt<10?"0"+Mt.toString(10):Mt.toString(10)}var Ot=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function Wt(){var Mt=new Date,Ht=[It(Mt.getHours()),It(Mt.getMinutes()),It(Mt.getSeconds())].join(":");return[Mt.getDate(),Ot[Mt.getMonth()],Ht].join(" ")}tt.log=function(){console.log("%s - %s",Wt(),tt.format.apply(tt,arguments))},tt.inherits=inherits_browserExports,tt._extend=function(Mt,Ht){if(!Ht||!$t(Ht))return Mt;for(var en=Object.keys(Ht),sn=en.length;sn--;)Mt[en[sn]]=Ht[en[sn]];return Mt};function zt(Mt,Ht){return Object.prototype.hasOwnProperty.call(Mt,Ht)}var Ft=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;tt.promisify=function(Ht){if(typeof Ht!="function")throw new TypeError('The "original" argument must be of type Function');if(Ft&&Ht[Ft]){var en=Ht[Ft];if(typeof en!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(en,Ft,{value:en,enumerable:!1,writable:!1,configurable:!0}),en}function en(){for(var sn,Kt,rn=new Promise(function(vn,an){sn=vn,Kt=an}),nn=[],hn=0;hn"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function dt(St){return dt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(At){return At.__proto__||Object.getPrototypeOf(At)},dt(St)}var pt={},mt,gt;function yt(St,Tt,At){At||(At=Error);function Et(Dt,jt,Pt){return typeof Tt=="string"?Tt:Tt(Dt,jt,Pt)}var $t=function(Dt){at(Pt,Dt);var jt=lt(Pt);function Pt(Ct,wt,It){var Ot;return ot(this,Pt),Ot=jt.call(this,Et(Ct,wt,It)),Ot.code=St,Ot}return nt(Pt)}(At);pt[St]=$t}function bt(St,Tt){if(Array.isArray(St)){var At=St.length;return St=St.map(function(Et){return String(Et)}),At>2?"one of ".concat(Tt," ").concat(St.slice(0,At-1).join(", "),", or ")+St[At-1]:At===2?"one of ".concat(Tt," ").concat(St[0]," or ").concat(St[1]):"of ".concat(Tt," ").concat(St[0])}else return"of ".concat(Tt," ").concat(String(St))}function vt(St,Tt,At){return St.substr(!At||At<0?0:+At,Tt.length)===Tt}function xt(St,Tt,At){return(At===void 0||At>St.length)&&(At=St.length),St.substring(At-Tt.length,At)===Tt}function kt(St,Tt,At){return typeof At!="number"&&(At=0),At+Tt.length>St.length?!1:St.indexOf(Tt,At)!==-1}return yt("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),yt("ERR_INVALID_ARG_TYPE",function(St,Tt,At){mt===void 0&&(mt=requireAssert()),mt(typeof St=="string","'name' must be a string");var Et;typeof Tt=="string"&&vt(Tt,"not ")?(Et="must not be",Tt=Tt.replace(/^not /,"")):Et="must be";var $t;if(xt(St," argument"))$t="The ".concat(St," ").concat(Et," ").concat(bt(Tt,"type"));else{var Dt=kt(St,".")?"property":"argument";$t='The "'.concat(St,'" ').concat(Dt," ").concat(Et," ").concat(bt(Tt,"type"))}return $t+=". Received type ".concat(tt(At)),$t},TypeError),yt("ERR_INVALID_ARG_VALUE",function(St,Tt){var At=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"is invalid";gt===void 0&&(gt=util$1);var Et=gt.inspect(Tt);return Et.length>128&&(Et="".concat(Et.slice(0,128),"...")),"The argument '".concat(St,"' ").concat(At,". Received ").concat(Et)},TypeError),yt("ERR_INVALID_RETURN_VALUE",function(St,Tt,At){var Et;return At&&At.constructor&&At.constructor.name?Et="instance of ".concat(At.constructor.name):Et="type ".concat(tt(At)),"Expected ".concat(St,' to be returned from the "').concat(Tt,'"')+" function but got ".concat(Et,".")},TypeError),yt("ERR_MISSING_ARGS",function(){for(var St=arguments.length,Tt=new Array(St),At=0;At0,"At least one arg needs to be specified");var Et="The ",$t=Tt.length;switch(Tt=Tt.map(function(Dt){return'"'.concat(Dt,'"')}),$t){case 1:Et+="".concat(Tt[0]," argument");break;case 2:Et+="".concat(Tt[0]," and ").concat(Tt[1]," arguments");break;default:Et+=Tt.slice(0,$t-1).join(", "),Et+=", and ".concat(Tt[$t-1]," arguments");break}return"".concat(Et," must be specified")},TypeError),errors$3.codes=pt,errors$3}var assertion_error,hasRequiredAssertion_error;function requireAssertion_error(){if(hasRequiredAssertion_error)return assertion_error;hasRequiredAssertion_error=1;function tt(Ft,Nt){var Ut=Object.keys(Ft);if(Object.getOwnPropertySymbols){var Mt=Object.getOwnPropertySymbols(Ft);Nt&&(Mt=Mt.filter(function(Ht){return Object.getOwnPropertyDescriptor(Ft,Ht).enumerable})),Ut.push.apply(Ut,Mt)}return Ut}function et(Ft){for(var Nt=1;Nt"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function gt(Ft){return Function.toString.call(Ft).indexOf("[native code]")!==-1}function yt(Ft,Nt){return yt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(Mt,Ht){return Mt.__proto__=Ht,Mt},yt(Ft,Nt)}function bt(Ft){return bt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(Ut){return Ut.__proto__||Object.getPrototypeOf(Ut)},bt(Ft)}function vt(Ft){"@babel/helpers - typeof";return vt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(Nt){return typeof Nt}:function(Nt){return Nt&&typeof Symbol=="function"&&Nt.constructor===Symbol&&Nt!==Symbol.prototype?"symbol":typeof Nt},vt(Ft)}var xt=util$1,kt=xt.inspect,St=requireErrors(),Tt=St.codes.ERR_INVALID_ARG_TYPE;function At(Ft,Nt,Ut){return(Ut===void 0||Ut>Ft.length)&&(Ut=Ft.length),Ft.substring(Ut-Nt.length,Ut)===Nt}function Et(Ft,Nt){if(Nt=Math.floor(Nt),Ft.length==0||Nt==0)return"";var Ut=Ft.length*Nt;for(Nt=Math.floor(Math.log(Nt)/Math.log(2));Nt;)Ft+=Ft,Nt--;return Ft+=Ft.substring(0,Ut-Ft.length),Ft}var $t="",Dt="",jt="",Pt="",Ct={deepStrictEqual:"Expected values to be strictly deep-equal:",strictEqual:"Expected values to be strictly equal:",strictEqualObject:'Expected "actual" to be reference-equal to "expected":',deepEqual:"Expected values to be loosely deep-equal:",equal:"Expected values to be loosely equal:",notDeepStrictEqual:'Expected "actual" not to be strictly deep-equal to:',notStrictEqual:'Expected "actual" to be strictly unequal to:',notStrictEqualObject:'Expected "actual" not to be reference-equal to "expected":',notDeepEqual:'Expected "actual" not to be loosely deep-equal to:',notEqual:'Expected "actual" to be loosely unequal to:',notIdentical:"Values identical but not reference-equal:"},wt=10;function It(Ft){var Nt=Object.keys(Ft),Ut=Object.create(Object.getPrototypeOf(Ft));return Nt.forEach(function(Mt){Ut[Mt]=Ft[Mt]}),Object.defineProperty(Ut,"message",{value:Ft.message}),Ut}function Ot(Ft){return kt(Ft,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}function Wt(Ft,Nt,Ut){var Mt="",Ht="",en=0,sn="",Kt=!1,rn=Ot(Ft),nn=rn.split(` -`),hn=Ot(Nt).split(` -`),vn=0,an="";if(Ut==="strictEqual"&&vt(Ft)==="object"&&vt(Nt)==="object"&&Ft!==null&&Nt!==null&&(Ut="strictEqualObject"),nn.length===1&&hn.length===1&&nn[0]!==hn[0]){var Qt=nn[0].length+hn[0].length;if(Qt<=wt){if((vt(Ft)!=="object"||Ft===null)&&(vt(Nt)!=="object"||Nt===null)&&(Ft!==0||Nt!==0))return"".concat(Ct[Ut],` - -`)+"".concat(nn[0]," !== ").concat(hn[0],` -`)}else if(Ut!=="strictEqualObject"){var _n=process.stderr&&process.stderr.isTTY?process.stderr.columns:80;if(Qt<_n){for(;nn[0][vn]===hn[0][vn];)vn++;vn>2&&(an=` - `.concat(Et(" ",vn),"^"),vn=0)}}}for(var Pn=nn[nn.length-1],$n=hn[hn.length-1];Pn===$n&&(vn++<2?sn=` - `.concat(Pn).concat(sn):Mt=Pn,nn.pop(),hn.pop(),!(nn.length===0||hn.length===0));)Pn=nn[nn.length-1],$n=hn[hn.length-1];var Nn=Math.max(nn.length,hn.length);if(Nn===0){var Tn=rn.split(` -`);if(Tn.length>30)for(Tn[26]="".concat($t,"...").concat(Pt);Tn.length>27;)Tn.pop();return"".concat(Ct.notIdentical,` - -`).concat(Tn.join(` -`),` -`)}vn>3&&(sn=` -`.concat($t,"...").concat(Pt).concat(sn),Kt=!0),Mt!==""&&(sn=` - `.concat(Mt).concat(sn),Mt="");var cn=0,mn=Ct[Ut]+` -`.concat(Dt,"+ actual").concat(Pt," ").concat(jt,"- expected").concat(Pt),In=" ".concat($t,"...").concat(Pt," Lines skipped");for(vn=0;vn1&&vn>2&&(An>4?(Ht+=` -`.concat($t,"...").concat(Pt),Kt=!0):An>3&&(Ht+=` - `.concat(hn[vn-2]),cn++),Ht+=` - `.concat(hn[vn-1]),cn++),en=vn,Mt+=` -`.concat(jt,"-").concat(Pt," ").concat(hn[vn]),cn++;else if(hn.length1&&vn>2&&(An>4?(Ht+=` -`.concat($t,"...").concat(Pt),Kt=!0):An>3&&(Ht+=` - `.concat(nn[vn-2]),cn++),Ht+=` - `.concat(nn[vn-1]),cn++),en=vn,Ht+=` -`.concat(Dt,"+").concat(Pt," ").concat(nn[vn]),cn++;else{var wn=hn[vn],fn=nn[vn],pn=fn!==wn&&(!At(fn,",")||fn.slice(0,-1)!==wn);pn&&At(wn,",")&&wn.slice(0,-1)===fn&&(pn=!1,fn+=","),pn?(An>1&&vn>2&&(An>4?(Ht+=` -`.concat($t,"...").concat(Pt),Kt=!0):An>3&&(Ht+=` - `.concat(nn[vn-2]),cn++),Ht+=` - `.concat(nn[vn-1]),cn++),en=vn,Ht+=` -`.concat(Dt,"+").concat(Pt," ").concat(fn),Mt+=` -`.concat(jt,"-").concat(Pt," ").concat(wn),cn+=2):(Ht+=Mt,Mt="",(An===1||vn===0)&&(Ht+=` - `.concat(fn),cn++))}if(cn>20&&vn30)for(Qt[26]="".concat($t,"...").concat(Pt);Qt.length>27;)Qt.pop();Qt.length===1?en=Ut.call(this,"".concat(an," ").concat(Qt[0])):en=Ut.call(this,"".concat(an,` - -`).concat(Qt.join(` -`),` -`))}else{var _n=Ot(nn),Pn="",$n=Ct[Kt];Kt==="notDeepEqual"||Kt==="notEqual"?(_n="".concat(Ct[Kt],` - -`).concat(_n),_n.length>1024&&(_n="".concat(_n.slice(0,1021),"..."))):(Pn="".concat(Ot(hn)),_n.length>512&&(_n="".concat(_n.slice(0,509),"...")),Pn.length>512&&(Pn="".concat(Pn.slice(0,509),"...")),Kt==="deepEqual"||Kt==="equal"?_n="".concat($n,` - -`).concat(_n,` - -should equal - -`):Pn=" ".concat(Kt," ").concat(Pn)),en=Ut.call(this,"".concat(_n).concat(Pn))}return Error.stackTraceLimit=vn,en.generatedMessage=!sn,Object.defineProperty(ht(en),"name",{value:"AssertionError [ERR_ASSERTION]",enumerable:!1,writable:!0,configurable:!0}),en.code="ERR_ASSERTION",en.actual=nn,en.expected=hn,en.operator=Kt,Error.captureStackTrace&&Error.captureStackTrace(ht(en),rn),en.stack,en.name="AssertionError",ut(en)}return ot(Mt,[{key:"toString",value:function(){return"".concat(this.name," [").concat(this.code,"]: ").concat(this.message)}},{key:Nt,value:function(en,sn){return kt(this,et(et({},sn),{},{customInspect:!1,depth:0}))}}]),Mt}(dt(Error),kt.custom);return assertion_error=zt,assertion_error}var toStr=Object.prototype.toString,isArguments$4=function(et){var nt=toStr.call(et),rt=nt==="[object Arguments]";return rt||(rt=nt!=="[object Array]"&&et!==null&&typeof et=="object"&&typeof et.length=="number"&&et.length>=0&&toStr.call(et.callee)==="[object Function]"),rt},implementation$5,hasRequiredImplementation$1;function requireImplementation$1(){if(hasRequiredImplementation$1)return implementation$5;hasRequiredImplementation$1=1;var tt;if(!Object.keys){var et=Object.prototype.hasOwnProperty,nt=Object.prototype.toString,rt=isArguments$4,it=Object.prototype.propertyIsEnumerable,ot=!it.call({toString:null},"toString"),at=it.call(function(){},"prototype"),st=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],lt=function(dt){var pt=dt.constructor;return pt&&pt.prototype===dt},ct={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},ut=function(){if(typeof window>"u")return!1;for(var dt in window)try{if(!ct["$"+dt]&&et.call(window,dt)&&window[dt]!==null&&typeof window[dt]=="object")try{lt(window[dt])}catch{return!0}}catch{return!0}return!1}(),ht=function(dt){if(typeof window>"u"||!ut)return lt(dt);try{return lt(dt)}catch{return!1}};tt=function(pt){var mt=pt!==null&&typeof pt=="object",gt=nt.call(pt)==="[object Function]",yt=rt(pt),bt=mt&&nt.call(pt)==="[object String]",vt=[];if(!mt&&!gt&&!yt)throw new TypeError("Object.keys called on a non-object");var xt=at&>if(bt&&pt.length>0&&!et.call(pt,0))for(var kt=0;kt0)for(var St=0;St3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new it("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new it("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new it("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new it("`loose`, if provided, must be a boolean");var ut=arguments.length>3?arguments[3]:null,ht=arguments.length>4?arguments[4]:null,dt=arguments.length>5?arguments[5]:null,pt=arguments.length>6?arguments[6]:!1,mt=!!ot&&ot(st,lt);if(nt)nt(st,lt,{configurable:dt===null&&mt?mt.configurable:!dt,enumerable:ut===null&&mt?mt.enumerable:!ut,value:ct,writable:ht===null&&mt?mt.writable:!ht});else if(pt||!ut&&!ht&&!dt)st[lt]=ct;else throw new rt("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},defineDataProperty}var defineProperties_1,hasRequiredDefineProperties;function requireDefineProperties(){if(hasRequiredDefineProperties)return defineProperties_1;hasRequiredDefineProperties=1;var tt=objectKeys$1,et=typeof Symbol=="function"&&typeof Symbol("foo")=="symbol",nt=Object.prototype.toString,rt=Array.prototype.concat,it=requireDefineDataProperty(),ot=function(ct){return typeof ct=="function"&&nt.call(ct)==="[object Function]"},at=requireHasPropertyDescriptors()(),st=function(ct,ut,ht,dt){if(ut in ct){if(dt===!0){if(ct[ut]===ht)return}else if(!ot(dt)||!dt())return}at?it(ct,ut,ht,!0):it(ct,ut,ht)},lt=function(ct,ut){var ht=arguments.length>2?arguments[2]:{},dt=tt(ut);et&&(dt=rt.call(dt,Object.getOwnPropertySymbols(ut)));for(var pt=0;ptpn.length)&&(kn=pn.length);for(var Dn=0,un=new Array(kn);Dn10)return!0;for(var kn=0;kn57)return!0}return pn.length===10&&pn>=Math.pow(2,32)}function zt(pn){return Object.keys(pn).filter(Wt).concat(ht(pn).filter(Object.prototype.propertyIsEnumerable.bind(pn)))}/*! - * The buffer module from node.js, for the browser. - * - * @author Feross Aboukhadijeh - * @license MIT - */function Ft(pn,kn){if(pn===kn)return 0;for(var Dn=pn.length,un=kn.length,Zt=0,Xt=Math.min(Dn,un);Zt1?hn-1:0),an=1;an1?hn-1:0),an=1;an1?hn-1:0),an=1;an1?hn-1:0),an=1;an>BigInt(128),it=et&BIG_U128_MAX;return nt=writeBigU128(tt,it,nt),nt=writeBigU128(tt,rt,nt),nt}function writeBigU128(tt,et,nt){enforce$6(typeof et=="bigint","num","bigint"),et&=BIG_U128_MAX;const rt=et>>BigInt(64),it=et&BIG_U64_MAX;return nt=writeBigU64(tt,it,nt),nt=writeBigU64(tt,rt,nt),nt}function writeBigU64(tt,et,nt){enforce$6(typeof et=="bigint","num","bigint"),et&=BIG_U64_MAX;const rt=Number(et>>BigInt(32)),it=Number(et&BigInt(4294967295));return nt=writeU32(tt,it,nt),nt=writeU32(tt,rt,nt),nt}function writeBigU56(tt,et,nt){enforce$6(typeof et=="bigint","num","bigint"),et&=BIG_U56_MAX;const rt=Number(et>>BigInt(32)),it=Number(et&BigInt(4294967295));return nt=writeU32(tt,it,nt),nt=writeU24(tt,rt,nt),nt}function writeU64(tt,et,nt){return enforce$6(Number.isSafeInteger(et),"num","integer"),write64(tt,et,nt,!1)}function writeU56(tt,et,nt){return enforce$6(Number.isSafeInteger(et),"num","integer"),write56(tt,et,nt,!1)}function writeU48(tt,et,nt){enforce$6(Number.isSafeInteger(et),"num","integer");const rt=et*HI|0;return tt[nt++]=et,et>>>=8,tt[nt++]=et,et>>>=8,tt[nt++]=et,et>>>=8,tt[nt++]=et,tt[nt++]=rt,tt[nt++]=rt>>>8,nt}function writeU40(tt,et,nt){enforce$6(Number.isSafeInteger(et),"num","integer");const rt=et*HI|0;return tt[nt++]=et,et>>>=8,tt[nt++]=et,et>>>=8,tt[nt++]=et,et>>>=8,tt[nt++]=et,tt[nt++]=rt,nt}function writeU32(tt,et,nt){return enforce$6(Number.isSafeInteger(et),"num","integer"),tt[nt++]=et,et>>>=8,tt[nt++]=et,et>>>=8,tt[nt++]=et,et>>>=8,tt[nt++]=et,nt}function writeU24(tt,et,nt){return enforce$6(Number.isSafeInteger(et),"num","integer"),tt[nt++]=et,et>>>=8,tt[nt++]=et,et>>>=8,tt[nt++]=et,nt}function writeU16(tt,et,nt){return enforce$6(Number.isSafeInteger(et),"num","integer"),tt[nt++]=et,tt[nt++]=et>>>8,nt}function writeU8(tt,et,nt){return enforce$6(Number.isSafeInteger(et),"num","integer"),tt[nt]=et,nt+1}function writeUBE(tt,et,nt,rt){switch(rt){case 8:return writeU64BE(tt,et,nt);case 7:return writeU56BE(tt,et,nt);case 6:return writeU48BE(tt,et,nt);case 5:return writeU40BE(tt,et,nt);case 4:return writeU32BE(tt,et,nt);case 3:return writeU24BE(tt,et,nt);case 2:return writeU16BE(tt,et,nt);case 1:return writeU8(tt,et,nt);default:throw new EncodingError$4(nt,"Invalid write length")}}function writeBigU256BE(tt,et,nt){enforce$6(typeof et=="bigint","num","bigint"),et&=BIG_U256_MAX;const rt=et>>BigInt(128),it=et&BIG_U128_MAX;return nt=writeBigU128BE(tt,rt,nt),nt=writeBigU128BE(tt,it,nt),nt}function writeBigU128BE(tt,et,nt){enforce$6(typeof et=="bigint","num","bigint"),et&=BIG_U128_MAX;const rt=et>>BigInt(64),it=et&BIG_U64_MAX;return nt=writeBigU64BE(tt,rt,nt),nt=writeBigU64BE(tt,it,nt),nt}function writeBigU64BE(tt,et,nt){enforce$6(typeof et=="bigint","num","bigint"),et&=BIG_U64_MAX;const rt=Number(et>>BigInt(32)),it=Number(et&BigInt(4294967295));return nt=writeU32BE(tt,rt,nt),nt=writeU32BE(tt,it,nt),nt}function writeBigU56BE(tt,et,nt){enforce$6(typeof et=="bigint","num","bigint"),et&=BIG_U56_MAX;const rt=Number(et>>BigInt(32)),it=Number(et&BigInt(4294967295));return nt=writeU24BE(tt,rt,nt),nt=writeU32BE(tt,it,nt),nt}function writeU64BE(tt,et,nt){return enforce$6(Number.isSafeInteger(et),"num","integer"),write64(tt,et,nt,!0)}function writeU56BE(tt,et,nt){return enforce$6(Number.isSafeInteger(et),"num","integer"),write56(tt,et,nt,!0)}function writeU48BE(tt,et,nt){enforce$6(Number.isSafeInteger(et),"num","integer");const rt=et*HI|0;return tt[nt++]=rt>>>8,tt[nt++]=rt,tt[nt+3]=et,et>>>=8,tt[nt+2]=et,et>>>=8,tt[nt+1]=et,et>>>=8,tt[nt]=et,nt+4}function writeU40BE(tt,et,nt){enforce$6(Number.isSafeInteger(et),"num","integer");const rt=et*HI|0;return tt[nt++]=rt,tt[nt+3]=et,et>>>=8,tt[nt+2]=et,et>>>=8,tt[nt+1]=et,et>>>=8,tt[nt]=et,nt+4}function writeU32BE(tt,et,nt){return enforce$6(Number.isSafeInteger(et),"num","integer"),tt[nt+3]=et,et>>>=8,tt[nt+2]=et,et>>>=8,tt[nt+1]=et,et>>>=8,tt[nt]=et,nt+4}function writeU24BE(tt,et,nt){return enforce$6(Number.isSafeInteger(et),"num","integer"),tt[nt+2]=et,et>>>=8,tt[nt+1]=et,et>>>=8,tt[nt]=et,nt+3}function writeU16BE(tt,et,nt){return enforce$6(Number.isSafeInteger(et),"num","integer"),tt[nt++]=et>>>8,tt[nt++]=et,nt}function writeI(tt,et,nt,rt){switch(rt){case 8:return writeU64(tt,et,nt);case 7:return writeU56(tt,et,nt);case 6:return writeU48(tt,et,nt);case 5:return writeU40(tt,et,nt);case 4:return writeU24(tt,et,nt);case 3:return writeU32(tt,et,nt);case 2:return writeU16(tt,et,nt);case 1:return writeU8(tt,et,nt);default:throw new EncodingError$4(nt,"Invalid write length")}}function writeBigI64(tt,et,nt){return writeBigU64(tt,et,nt)}function writeBigI56(tt,et,nt){return writeBigU56(tt,et,nt)}function writeI64(tt,et,nt){return writeU64(tt,et,nt)}function writeI56(tt,et,nt){return writeU56(tt,et,nt)}function writeI48(tt,et,nt){return writeU48(tt,et,nt)}function writeI40(tt,et,nt){return writeU40(tt,et,nt)}function writeI32(tt,et,nt){return writeU32(tt,et,nt)}function writeI24(tt,et,nt){return writeU24(tt,et,nt)}function writeI16(tt,et,nt){return writeU16(tt,et,nt)}function writeI8(tt,et,nt){return writeU8(tt,et,nt)}function writeIBE(tt,et,nt,rt){switch(rt){case 8:return writeU64BE(tt,et,nt);case 7:return writeU56BE(tt,et,nt);case 6:return writeU48BE(tt,et,nt);case 5:return writeU40BE(tt,et,nt);case 4:return writeU32BE(tt,et,nt);case 3:return writeU24BE(tt,et,nt);case 2:return writeU16BE(tt,et,nt);case 1:return writeU8(tt,et,nt);default:throw new EncodingError$4(nt,"Invalid write length")}}function writeBigI64BE(tt,et,nt){return writeBigU64BE(tt,et,nt)}function writeBigI56BE(tt,et,nt){return writeBigU56BE(tt,et,nt)}function writeI64BE(tt,et,nt){return writeU64BE(tt,et,nt)}function writeI56BE(tt,et,nt){return writeU56BE(tt,et,nt)}function writeI48BE(tt,et,nt){return writeU48BE(tt,et,nt)}function writeI40BE(tt,et,nt){return writeU40BE(tt,et,nt)}function writeI32BE(tt,et,nt){return writeU32BE(tt,et,nt)}function writeI24BE(tt,et,nt){return writeU24BE(tt,et,nt)}function writeI16BE(tt,et,nt){return writeU16BE(tt,et,nt)}function _writeDoubleForwards(tt,et,nt){return enforce$6(isNumber$5(et),"num","number"),F64_ARRAY[0]=et,tt[nt++]=F648_ARRAY[0],tt[nt++]=F648_ARRAY[1],tt[nt++]=F648_ARRAY[2],tt[nt++]=F648_ARRAY[3],tt[nt++]=F648_ARRAY[4],tt[nt++]=F648_ARRAY[5],tt[nt++]=F648_ARRAY[6],tt[nt++]=F648_ARRAY[7],nt}function _writeDoubleBackwards(tt,et,nt){return enforce$6(isNumber$5(et),"num","number"),F64_ARRAY[0]=et,tt[nt++]=F648_ARRAY[7],tt[nt++]=F648_ARRAY[6],tt[nt++]=F648_ARRAY[5],tt[nt++]=F648_ARRAY[4],tt[nt++]=F648_ARRAY[3],tt[nt++]=F648_ARRAY[2],tt[nt++]=F648_ARRAY[1],tt[nt++]=F648_ARRAY[0],nt}function _writeFloatForwards(tt,et,nt){return enforce$6(isNumber$5(et),"num","number"),F32_ARRAY[0]=et,tt[nt++]=F328_ARRAY[0],tt[nt++]=F328_ARRAY[1],tt[nt++]=F328_ARRAY[2],tt[nt++]=F328_ARRAY[3],nt}function _writeFloatBackwards(tt,et,nt){return enforce$6(isNumber$5(et),"num","number"),F32_ARRAY[0]=et,tt[nt++]=F328_ARRAY[3],tt[nt++]=F328_ARRAY[2],tt[nt++]=F328_ARRAY[1],tt[nt++]=F328_ARRAY[0],nt}const writeFloat=BIG_ENDIAN?_writeFloatBackwards:_writeFloatForwards,writeFloatBE=BIG_ENDIAN?_writeFloatForwards:_writeFloatBackwards,writeDouble=BIG_ENDIAN?_writeDoubleBackwards:_writeDoubleForwards,writeDoubleBE=BIG_ENDIAN?_writeDoubleForwards:_writeDoubleBackwards;function readVarint(tt,et){let nt,rt;switch(checkRead(et4294967295,et,"Non-canonical varint");break;case 254:rt=5,checkRead(et+rt<=tt.length,et),nt=readU32(tt,et+1),check$e(nt>65535,et,"Non-canonical varint");break;case 253:rt=3,checkRead(et+rt<=tt.length,et),nt=readU16(tt,et+1),check$e(nt>=253,et,"Non-canonical varint");break;default:rt=1,nt=tt[et];break}return new Varint(rt,nt)}function writeVarint(tt,et,nt){return enforce$6(Number.isSafeInteger(et),"num","integer"),et<253?(tt[nt++]=et,nt):et<=65535?(tt[nt++]=253,writeU16(tt,et,nt)):et<=4294967295?(tt[nt++]=254,writeU32(tt,et,nt)):(tt[nt++]=255,writeU64(tt,et,nt))}function sizeVarint(tt){return enforce$6(Number.isSafeInteger(tt),"num","integer"),tt<253?1:tt<=65535?3:tt<=4294967295?5:9}function readVarint2(tt,et){let nt=0,rt=0;for(;;){checkRead(et>>0===et,"off","integer"),enforce$6(nt>>>0===nt,"size","integer"),et+nt>tt.length)throw new EncodingError$4(et,"Out of bounds read");return tt.slice(et,et+nt)}function readBytes(tt,et,nt){if(enforce$6(Buffer.isBuffer(tt),"data","buffer"),enforce$6(et>>>0===et,"off","integer"),enforce$6(nt>>>0===nt,"size","integer"),et+nt>tt.length)throw new EncodingError$4(et,"Out of bounds read");const rt=Buffer.allocUnsafeSlow(nt);return tt.copy(rt,0,et,et+nt),rt}function writeBytes(tt,et,nt){if(enforce$6(Buffer.isBuffer(tt),"data","buffer"),enforce$6(Buffer.isBuffer(et),"value","buffer"),enforce$6(nt>>>0===nt,"off","integer"),nt+et.length>tt.length)throw new EncodingError$4(nt,"Out of bounds write");return et.copy(tt,nt,0,et.length)}function readString(tt,et,nt,rt){if(rt==null&&(rt="binary"),enforce$6(Buffer.isBuffer(tt),"data","buffer"),enforce$6(et>>>0===et,"off","integer"),enforce$6(nt>>>0===nt,"size","integer"),enforce$6(typeof rt=="string","enc","string"),et+nt>tt.length)throw new EncodingError$4(et,"Out of bounds read");return tt.toString(rt,et,et+nt)}function writeString(tt,et,nt,rt){if(rt==null&&(rt="binary"),enforce$6(Buffer.isBuffer(tt),"data","buffer"),enforce$6(typeof et=="string","str","string"),enforce$6(nt>>>0===nt,"off","integer"),enforce$6(typeof rt=="string","enc","string"),et.length===0)return 0;const it=Buffer.byteLength(et,rt);if(nt+it>tt.length)throw new EncodingError$4(nt,"Out of bounds write");return tt.write(et,nt,rt)}function realloc(tt,et){enforce$6(Buffer.isBuffer(tt),"data","buffer");const nt=Buffer.allocUnsafeSlow(et);return tt.copy(nt,0),nt}function copy$2(tt){return enforce$6(Buffer.isBuffer(tt),"data","buffer"),realloc(tt,tt.length)}function concat(tt,et){enforce$6(Buffer.isBuffer(tt),"a","buffer"),enforce$6(Buffer.isBuffer(et),"b","buffer");const nt=tt.length+et.length,rt=Buffer.allocUnsafeSlow(nt);return tt.copy(rt,0),et.copy(rt,tt.length),rt}function sizeVarBytes(tt){return enforce$6(Buffer.isBuffer(tt),"data","buffer"),sizeVarint(tt.length)+tt.length}function sizeVarlen(tt){return sizeVarint(tt)+tt}function sizeVarString(tt,et){if(et==null&&(et="binary"),enforce$6(typeof tt=="string","str","string"),enforce$6(typeof et=="string","enc","string"),tt.length===0)return 1;const nt=Buffer.byteLength(tt,et);return sizeVarint(nt)+nt}function isSafe(tt,et){return tt<0&&(tt=~tt,et===0&&(tt+=1)),(tt&4292870144)===0}function write64(tt,et,nt,rt){let it=!1;et<0&&(et=-et,it=!0);let ot=et*HI|0,at=et|0;return it&&(at===0?ot=~ot+1|0:(ot=~ot,at=~at+1)),rt?(nt=writeI32BE(tt,ot,nt),nt=writeI32BE(tt,at,nt)):(nt=writeI32(tt,at,nt),nt=writeI32(tt,ot,nt)),nt}function write56(tt,et,nt,rt){let it=!1;et<0&&(et=-et,it=!0);let ot=et*HI|0,at=et|0;return it&&(at===0?ot=~ot+1|0:(ot=~ot,at=~at+1)),rt?(nt=writeI24BE(tt,ot,nt),nt=writeI32BE(tt,at,nt)):(nt=writeI32(tt,at,nt),nt=writeI24(tt,ot,nt)),nt}class Varint{constructor(et,nt){this.size=et,this.value=nt}}function isNumber$5(tt){return typeof tt=="number"&&isFinite(tt)}function checkRead(tt,et){if(!tt)throw new EncodingError$4(et,"Out of bounds read",checkRead)}function check$e(tt,et,nt){if(!tt)throw new EncodingError$4(et,nt,check$e)}function throwNoBigInt(){throw new Error("BigInt not supported.")}function ensureBigInt(tt){return typeof BigInt=="function"?tt:throwNoBigInt}encoding$4.readU=readU;encoding$4.readBigU256=ensureBigInt(readBigU256);encoding$4.readBigU128=ensureBigInt(readBigU128);encoding$4.readBigU64=ensureBigInt(readBigU64);encoding$4.readBigU56=ensureBigInt(readBigU56);encoding$4.readU64=readU64;encoding$4.readU56=readU56;encoding$4.readU48=readU48;encoding$4.readU40=readU40;encoding$4.readU32=readU32;encoding$4.readU24=readU24;encoding$4.readU16=readU16;encoding$4.readU8=readU8;encoding$4.readUBE=readUBE;encoding$4.readBigU256BE=ensureBigInt(readBigU256BE);encoding$4.readBigU128BE=ensureBigInt(readBigU128BE);encoding$4.readBigU64BE=ensureBigInt(readBigU64BE);encoding$4.readBigU56BE=ensureBigInt(readBigU56BE);encoding$4.readU64BE=readU64BE;encoding$4.readU56BE=readU56BE;encoding$4.readU48BE=readU48BE;encoding$4.readU40BE=readU40BE;encoding$4.readU32BE=readU32BE;encoding$4.readU24BE=readU24BE;encoding$4.readU16BE=readU16BE;encoding$4.readI=readI;encoding$4.readBigI64=ensureBigInt(readBigI64);encoding$4.readBigI56=ensureBigInt(readBigI56);encoding$4.readI64=readI64;encoding$4.readI56=readI56;encoding$4.readI48=readI48;encoding$4.readI40=readI40;encoding$4.readI32=readI32;encoding$4.readI24=readI24;encoding$4.readI16=readI16;encoding$4.readI8=readI8;encoding$4.readIBE=readIBE;encoding$4.readBigI64BE=ensureBigInt(readBigI64BE);encoding$4.readBigI56BE=ensureBigInt(readBigI56BE);encoding$4.readI64BE=readI64BE;encoding$4.readI56BE=readI56BE;encoding$4.readI48BE=readI48BE;encoding$4.readI40BE=readI40BE;encoding$4.readI32BE=readI32BE;encoding$4.readI24BE=readI24BE;encoding$4.readI16BE=readI16BE;encoding$4.readFloat=readFloat;encoding$4.readFloatBE=readFloatBE;encoding$4.readDouble=readDouble;encoding$4.readDoubleBE=readDoubleBE;encoding$4.writeU=writeU;encoding$4.writeBigU256=ensureBigInt(writeBigU256);encoding$4.writeBigU128=ensureBigInt(writeBigU128);encoding$4.writeBigU64=ensureBigInt(writeBigU64);encoding$4.writeBigU56=ensureBigInt(writeBigU56);encoding$4.writeU64=writeU64;encoding$4.writeU56=writeU56;encoding$4.writeU48=writeU48;encoding$4.writeU40=writeU40;encoding$4.writeU32=writeU32;encoding$4.writeU24=writeU24;encoding$4.writeU16=writeU16;encoding$4.writeU8=writeU8;encoding$4.writeUBE=writeUBE;encoding$4.writeBigU256BE=ensureBigInt(writeBigU256BE);encoding$4.writeBigU128BE=ensureBigInt(writeBigU128BE);encoding$4.writeBigU64BE=ensureBigInt(writeBigU64BE);encoding$4.writeBigU56BE=ensureBigInt(writeBigU56BE);encoding$4.writeU64BE=writeU64BE;encoding$4.writeU56BE=writeU56BE;encoding$4.writeU48BE=writeU48BE;encoding$4.writeU40BE=writeU40BE;encoding$4.writeU32BE=writeU32BE;encoding$4.writeU24BE=writeU24BE;encoding$4.writeU16BE=writeU16BE;encoding$4.writeI=writeI;encoding$4.writeBigI64=ensureBigInt(writeBigI64);encoding$4.writeBigI56=ensureBigInt(writeBigI56);encoding$4.writeI64=writeI64;encoding$4.writeI56=writeI56;encoding$4.writeI48=writeI48;encoding$4.writeI40=writeI40;encoding$4.writeI32=writeI32;encoding$4.writeI24=writeI24;encoding$4.writeI16=writeI16;encoding$4.writeI8=writeI8;encoding$4.writeIBE=writeIBE;encoding$4.writeBigI64BE=ensureBigInt(writeBigI64BE);encoding$4.writeBigI56BE=ensureBigInt(writeBigI56BE);encoding$4.writeI64BE=writeI64BE;encoding$4.writeI56BE=writeI56BE;encoding$4.writeI48BE=writeI48BE;encoding$4.writeI40BE=writeI40BE;encoding$4.writeI32BE=writeI32BE;encoding$4.writeI24BE=writeI24BE;encoding$4.writeI16BE=writeI16BE;encoding$4.writeFloat=writeFloat;encoding$4.writeFloatBE=writeFloatBE;encoding$4.writeDouble=writeDouble;encoding$4.writeDoubleBE=writeDoubleBE;encoding$4.readVarint=readVarint;encoding$4.writeVarint=writeVarint;encoding$4.sizeVarint=sizeVarint;encoding$4.readVarint2=readVarint2;encoding$4.writeVarint2=writeVarint2;encoding$4.sizeVarint2=sizeVarint2;encoding$4.sliceBytes=sliceBytes;encoding$4.readBytes=readBytes;encoding$4.writeBytes=writeBytes;encoding$4.readString=readString;encoding$4.writeString=writeString;encoding$4.realloc=realloc;encoding$4.copy=copy$2;encoding$4.concat=concat;encoding$4.sizeVarBytes=sizeVarBytes;encoding$4.sizeVarlen=sizeVarlen;encoding$4.sizeVarString=sizeVarString;/*! - * reader.js - buffer reader for bcoin - * Copyright (c) 2014-2015, Fedor Indutny (MIT License) - * Copyright (c) 2014-2017, Christopher Jeffrey (MIT License). - * https://github.com/bcoin-org/bcoin - */const enforce$5=enforce_1,encoding$3=encoding$4,EncodingError$3=error,EMPTY$1=Buffer.alloc(0);let BufferReader$3=class{constructor(et,nt=!1){mw(this,"data");enforce$5(Buffer.isBuffer(et),"data","buffer"),enforce$5(typeof nt=="boolean","zeroCopy","boolean"),this.data=et,this.offset=0,this.zeroCopy=nt,this.stack=[]}check(et){if(this.offset+et>this.data.length)throw new EncodingError$3(this.offset,"Out of bounds read",this.check)}getSize(){return this.data.length}left(){return this.check(0),this.data.length-this.offset}seek(et){if(enforce$5(Number.isSafeInteger(et),"off","integer"),this.offset+et<0)throw new EncodingError$3(this.offset,"Out of bounds read");return this.check(et),this.offset+=et,this}start(){return this.stack.push(this.offset),this.offset}end(){if(this.stack.length===0)throw new Error("Cannot end without a stack item.");const et=this.stack.pop();return this.offset-et}endData(et=!1){if(enforce$5(typeof et=="boolean","zeroCopy","boolean"),this.stack.length===0)throw new Error("Cannot end without a stack item.");const nt=this.stack.pop(),rt=this.offset,it=rt-nt,ot=this.data;if(it===ot.length)return ot;if(this.zeroCopy||et)return ot.slice(nt,rt);const at=Buffer.allocUnsafeSlow(it);return ot.copy(at,0,nt,rt),at}destroy(){return this.data=EMPTY$1,this.offset=0,this.stack.length=0,this}readU8(){this.check(1);const et=this.data[this.offset];return this.offset+=1,et}readU16(){this.check(2);const et=encoding$3.readU16(this.data,this.offset);return this.offset+=2,et}readU16BE(){this.check(2);const et=encoding$3.readU16BE(this.data,this.offset);return this.offset+=2,et}readU24(){this.check(3);const et=encoding$3.readU24(this.data,this.offset);return this.offset+=3,et}readU24BE(){this.check(3);const et=encoding$3.readU24BE(this.data,this.offset);return this.offset+=3,et}readU32(){this.check(4);const et=encoding$3.readU32(this.data,this.offset);return this.offset+=4,et}readU32BE(){this.check(4);const et=encoding$3.readU32BE(this.data,this.offset);return this.offset+=4,et}readU40(){this.check(5);const et=encoding$3.readU40(this.data,this.offset);return this.offset+=5,et}readU40BE(){this.check(5);const et=encoding$3.readU40BE(this.data,this.offset);return this.offset+=5,et}readU48(){this.check(6);const et=encoding$3.readU48(this.data,this.offset);return this.offset+=6,et}readU48BE(){this.check(6);const et=encoding$3.readU48BE(this.data,this.offset);return this.offset+=6,et}readU56(){this.check(7);const et=encoding$3.readU56(this.data,this.offset);return this.offset+=7,et}readU56BE(){this.check(7);const et=encoding$3.readU56BE(this.data,this.offset);return this.offset+=7,et}readBigU56(){this.check(7);const et=encoding$3.readBigU56(this.data,this.offset);return this.offset+=7,et}readBigU56BE(){this.check(7);const et=encoding$3.readBigU56BE(this.data,this.offset);return this.offset+=7,et}readU64(){this.check(8);const et=encoding$3.readU64(this.data,this.offset);return this.offset+=8,et}readU64BE(){this.check(8);const et=encoding$3.readU64BE(this.data,this.offset);return this.offset+=8,et}readBigU64(){this.check(8);const et=encoding$3.readBigU64(this.data,this.offset);return this.offset+=8,et}readBigU64BE(){this.check(8);const et=encoding$3.readBigU64BE(this.data,this.offset);return this.offset+=8,et}readBigU128(){this.check(16);const et=encoding$3.readBigU128(this.data,this.offset);return this.offset+=16,et}readBigU128BE(){this.check(16);const et=encoding$3.readBigU128BE(this.data,this.offset);return this.offset+=16,et}readBigU256(){this.check(32);const et=encoding$3.readBigU256(this.data,this.offset);return this.offset+=32,et}readBigU256BE(){this.check(32);const et=encoding$3.readBigU256BE(this.data,this.offset);return this.offset+=32,et}readI8(){this.check(1);const et=encoding$3.readI8(this.data,this.offset);return this.offset+=1,et}readI16(){this.check(2);const et=encoding$3.readI16(this.data,this.offset);return this.offset+=2,et}readI16BE(){this.check(2);const et=encoding$3.readI16BE(this.data,this.offset);return this.offset+=2,et}readI24(){this.check(3);const et=encoding$3.readI24(this.data,this.offset);return this.offset+=3,et}readI24BE(){this.check(3);const et=encoding$3.readI24BE(this.data,this.offset);return this.offset+=3,et}readI32(){this.check(4);const et=encoding$3.readI32(this.data,this.offset);return this.offset+=4,et}readI32BE(){this.check(4);const et=encoding$3.readI32BE(this.data,this.offset);return this.offset+=4,et}readI40(){this.check(5);const et=encoding$3.readI40(this.data,this.offset);return this.offset+=5,et}readI40BE(){this.check(5);const et=encoding$3.readI40BE(this.data,this.offset);return this.offset+=5,et}readI48(){this.check(6);const et=encoding$3.readI48(this.data,this.offset);return this.offset+=6,et}readI48BE(){this.check(6);const et=encoding$3.readI48BE(this.data,this.offset);return this.offset+=6,et}readI56(){this.check(7);const et=encoding$3.readI56(this.data,this.offset);return this.offset+=7,et}readI56BE(){this.check(7);const et=encoding$3.readI56BE(this.data,this.offset);return this.offset+=7,et}readBigI56(){this.check(7);const et=encoding$3.readBigI56(this.data,this.offset);return this.offset+=7,et}readBigI56BE(){this.check(7);const et=encoding$3.readBigI56BE(this.data,this.offset);return this.offset+=7,et}readI64(){this.check(8);const et=encoding$3.readI64(this.data,this.offset);return this.offset+=8,et}readI64BE(){this.check(8);const et=encoding$3.readI64BE(this.data,this.offset);return this.offset+=8,et}readBigI64(){this.check(8);const et=encoding$3.readBigI64(this.data,this.offset);return this.offset+=8,et}readBigI64BE(){this.check(8);const et=encoding$3.readBigI64BE(this.data,this.offset);return this.offset+=8,et}readFloat(){this.check(4);const et=encoding$3.readFloat(this.data,this.offset);return this.offset+=4,et}readFloatBE(){this.check(4);const et=encoding$3.readFloatBE(this.data,this.offset);return this.offset+=4,et}readDouble(){this.check(8);const et=encoding$3.readDouble(this.data,this.offset);return this.offset+=8,et}readDoubleBE(){this.check(8);const et=encoding$3.readDoubleBE(this.data,this.offset);return this.offset+=8,et}readVarint(){const{size:et,value:nt}=encoding$3.readVarint(this.data,this.offset);return this.offset+=et,nt}readVarint2(){const{size:et,value:nt}=encoding$3.readVarint2(this.data,this.offset);return this.offset+=et,nt}readBytes(et,nt=!1){enforce$5(et>>>0===et,"size","integer"),enforce$5(typeof nt=="boolean","zeroCopy","boolean"),this.check(et);let rt;return this.zeroCopy||nt?rt=this.data.slice(this.offset,this.offset+et):(rt=Buffer.allocUnsafeSlow(et),this.data.copy(rt,0,this.offset,this.offset+et)),this.offset+=et,rt}readVarBytes(et=!1){return this.readBytes(this.readVarint(),et)}readChild(et){enforce$5(et>>>0===et,"size","integer"),this.check(et);const nt=this.data.slice(0,this.offset+et),rt=new this.constructor(nt);return rt.offset=this.offset,this.offset+=et,rt}readString(et,nt){nt==null&&(nt="binary"),enforce$5(et>>>0===et,"size","integer"),enforce$5(typeof nt=="string","enc","string"),this.check(et);const rt=this.data.toString(nt,this.offset,this.offset+et);return this.offset+=et,rt}readHash(et){return et?this.readString(32,et):this.readBytes(32)}readVarString(et,nt=0){et==null&&(et="binary"),enforce$5(typeof et=="string","enc","string"),enforce$5(nt>>>0===nt,"limit","integer");const rt=this.readVarint();if(nt!==0&&rt>nt)throw new EncodingError$3(this.offset,"String exceeds limit");return this.readString(rt,et)}readNullString(et){et==null&&(et="binary"),enforce$5(typeof et=="string","enc","string");let nt=this.offset;for(;nt0&&(nt=this.stack[this.stack.length-1]);const rt=this.data.slice(nt,this.offset),it=et.digest?et.digest(rt):et(rt);return encoding$3.readU32(it,0)}verifyChecksum(et){const nt=this.createChecksum(et),rt=this.readU32();if(nt!==rt)throw new EncodingError$3(this.offset,"Checksum mismatch");return nt}};var reader=BufferReader$3;/*! - * writer.js - buffer writer for bcoin - * Copyright (c) 2014-2015, Fedor Indutny (MIT License) - * Copyright (c) 2014-2017, Christopher Jeffrey (MIT License). - * https://github.com/bcoin-org/bcoin - */const enforce$4=enforce_1,encoding$2=encoding$4,EncodingError$2=error,SEEK=0,U8=1,U16=2,U16BE=3,U24=4,U24BE=5,U32=6,U32BE=7,U40=8,U40BE=9,U48=10,U48BE=11,U56=12,U56BE=13,U64=14,U64BE=15,I8=16,I16=17,I16BE=18,I24=19,I24BE=20,I32=21,I32BE=22,I40=23,I40BE=24,I48=25,I48BE=26,I56=27,I56BE=28,I64=29,I64BE=30,FL=31,FLBE=32,DBL=33,DBLBE=34,VARINT=35,VARINT2=36,BYTES=37,STR=38,CHECKSUM=39,FILL=40,BIG_U56=41,BIG_U56BE=42,BIG_U64=43,BIG_U64BE=44,BIG_I56=45,BIG_I56BE=46,BIG_I64=47,BIG_I64BE=48,BIG_U128=49,BIG_U128BE=50,BIG_U256=51,BIG_U256BE=52;let BufferWriter$3=class{constructor(){this.ops=[],this.offset=0}render(){const et=Buffer.allocUnsafeSlow(this.offset);let nt=0;for(const rt of this.ops)switch(rt.type){case SEEK:nt+=rt.value;break;case U8:nt=encoding$2.writeU8(et,rt.value,nt);break;case U16:nt=encoding$2.writeU16(et,rt.value,nt);break;case U16BE:nt=encoding$2.writeU16BE(et,rt.value,nt);break;case U24:nt=encoding$2.writeU24(et,rt.value,nt);break;case U24BE:nt=encoding$2.writeU24BE(et,rt.value,nt);break;case U32:nt=encoding$2.writeU32(et,rt.value,nt);break;case U32BE:nt=encoding$2.writeU32BE(et,rt.value,nt);break;case U40:nt=encoding$2.writeU40(et,rt.value,nt);break;case U40BE:nt=encoding$2.writeU40BE(et,rt.value,nt);break;case U48:nt=encoding$2.writeU48(et,rt.value,nt);break;case U48BE:nt=encoding$2.writeU48BE(et,rt.value,nt);break;case U56:nt=encoding$2.writeU56(et,rt.value,nt);break;case U56BE:nt=encoding$2.writeU56BE(et,rt.value,nt);break;case U64:nt=encoding$2.writeU64(et,rt.value,nt);break;case U64BE:nt=encoding$2.writeU64BE(et,rt.value,nt);break;case I8:nt=encoding$2.writeI8(et,rt.value,nt);break;case I16:nt=encoding$2.writeI16(et,rt.value,nt);break;case I16BE:nt=encoding$2.writeI16BE(et,rt.value,nt);break;case I24:nt=encoding$2.writeI24(et,rt.value,nt);break;case I24BE:nt=encoding$2.writeI24BE(et,rt.value,nt);break;case I32:nt=encoding$2.writeI32(et,rt.value,nt);break;case I32BE:nt=encoding$2.writeI32BE(et,rt.value,nt);break;case I40:nt=encoding$2.writeI40(et,rt.value,nt);break;case I40BE:nt=encoding$2.writeI40BE(et,rt.value,nt);break;case I48:nt=encoding$2.writeI48(et,rt.value,nt);break;case I48BE:nt=encoding$2.writeI48BE(et,rt.value,nt);break;case I56:nt=encoding$2.writeI56(et,rt.value,nt);break;case I56BE:nt=encoding$2.writeI56BE(et,rt.value,nt);break;case I64:nt=encoding$2.writeI64(et,rt.value,nt);break;case I64BE:nt=encoding$2.writeI64BE(et,rt.value,nt);break;case FL:nt=encoding$2.writeFloat(et,rt.value,nt);break;case FLBE:nt=encoding$2.writeFloatBE(et,rt.value,nt);break;case DBL:nt=encoding$2.writeDouble(et,rt.value,nt);break;case DBLBE:nt=encoding$2.writeDoubleBE(et,rt.value,nt);break;case VARINT:nt=encoding$2.writeVarint(et,rt.value,nt);break;case VARINT2:nt=encoding$2.writeVarint2(et,rt.value,nt);break;case BYTES:nt+=rt.data.copy(et,nt);break;case STR:nt+=et.write(rt.value,nt,rt.enc);break;case CHECKSUM:nt+=rt.func(et.slice(0,nt)).copy(et,nt,0,4);break;case FILL:et.fill(rt.value,nt,nt+rt.size),nt+=rt.size;break;case BIG_U56:nt=encoding$2.writeBigU56(et,rt.value,nt);break;case BIG_U56BE:nt=encoding$2.writeBigU56BE(et,rt.value,nt);break;case BIG_U64:nt=encoding$2.writeBigU64(et,rt.value,nt);break;case BIG_U64BE:nt=encoding$2.writeBigU64BE(et,rt.value,nt);break;case BIG_I56:nt=encoding$2.writeBigI56(et,rt.value,nt);break;case BIG_I56BE:nt=encoding$2.writeBigI56BE(et,rt.value,nt);break;case BIG_I64:nt=encoding$2.writeBigI64(et,rt.value,nt);break;case BIG_I64BE:nt=encoding$2.writeBigI64BE(et,rt.value,nt);break;case BIG_U128:nt=encoding$2.writeBigU128(et,rt.value,nt);break;case BIG_U128BE:nt=encoding$2.writeBigU128BE(et,rt.value,nt);break;case BIG_U256:nt=encoding$2.writeBigU256(et,rt.value,nt);break;case BIG_U256BE:nt=encoding$2.writeBigU256BE(et,rt.value,nt);break;default:throw new Error("Invalid type.")}if(nt!==et.length)throw new EncodingError$2(nt,"Out of bounds write");return this.destroy(),et}encode(){return this.render()}finish(et){if(enforce$4(et>>>0===et,"size","integer"),this.offset>et)throw new EncodingError$2(this.offset,"Out of bounds write");return this.fill(0,et-this.offset),this.render()}getSize(){return this.offset}seek(et){if(enforce$4(Number.isSafeInteger(et),"off","integer"),this.offset+et<0)throw new EncodingError$2(this.offset,"Out of bounds write");return this.offset+=et,this.ops.push(new NumberOp(SEEK,et)),this}destroy(){return this.ops.length=0,this.offset=0,this}writeU8(et){return this.offset+=1,this.ops.push(new NumberOp(U8,et)),this}writeU16(et){return this.offset+=2,this.ops.push(new NumberOp(U16,et)),this}writeU16BE(et){return this.offset+=2,this.ops.push(new NumberOp(U16BE,et)),this}writeU24(et){return this.offset+=3,this.ops.push(new NumberOp(U24,et)),this}writeU24BE(et){return this.offset+=3,this.ops.push(new NumberOp(U24BE,et)),this}writeU32(et){return this.offset+=4,this.ops.push(new NumberOp(U32,et)),this}writeU32BE(et){return this.offset+=4,this.ops.push(new NumberOp(U32BE,et)),this}writeU40(et){return this.offset+=5,this.ops.push(new NumberOp(U40,et)),this}writeU40BE(et){return this.offset+=5,this.ops.push(new NumberOp(U40BE,et)),this}writeU48(et){return this.offset+=6,this.ops.push(new NumberOp(U48,et)),this}writeU48BE(et){return this.offset+=6,this.ops.push(new NumberOp(U48BE,et)),this}writeU56(et){return this.offset+=7,this.ops.push(new NumberOp(U56,et)),this}writeU56BE(et){return this.offset+=7,this.ops.push(new NumberOp(U56BE,et)),this}writeBigU56(et){return this.offset+=7,this.ops.push(new BigOp(BIG_U56,et)),this}writeBigU56BE(et){return this.offset+=7,this.ops.push(new BigOp(BIG_U56BE,et)),this}writeU64(et){return this.offset+=8,this.ops.push(new NumberOp(U64,et)),this}writeU64BE(et){return this.offset+=8,this.ops.push(new NumberOp(U64BE,et)),this}writeBigU64(et){return this.offset+=8,this.ops.push(new BigOp(BIG_U64,et)),this}writeBigU64BE(et){return this.offset+=8,this.ops.push(new BigOp(BIG_U64BE,et)),this}writeBigU128(et){return this.offset+=16,this.ops.push(new BigOp(BIG_U128,et)),this}writeBigU128BE(et){return this.offset+=16,this.ops.push(new BigOp(BIG_U128BE,et)),this}writeBigU256(et){return this.offset+=32,this.ops.push(new BigOp(BIG_U256,et)),this}writeBigU256BE(et){return this.offset+=32,this.ops.push(new BigOp(BIG_U256BE,et)),this}writeI8(et){return this.offset+=1,this.ops.push(new NumberOp(I8,et)),this}writeI16(et){return this.offset+=2,this.ops.push(new NumberOp(I16,et)),this}writeI16BE(et){return this.offset+=2,this.ops.push(new NumberOp(I16BE,et)),this}writeI24(et){return this.offset+=3,this.ops.push(new NumberOp(I24,et)),this}writeI24BE(et){return this.offset+=3,this.ops.push(new NumberOp(I24BE,et)),this}writeI32(et){return this.offset+=4,this.ops.push(new NumberOp(I32,et)),this}writeI32BE(et){return this.offset+=4,this.ops.push(new NumberOp(I32BE,et)),this}writeI40(et){return this.offset+=5,this.ops.push(new NumberOp(I40,et)),this}writeI40BE(et){return this.offset+=5,this.ops.push(new NumberOp(I40BE,et)),this}writeI48(et){return this.offset+=6,this.ops.push(new NumberOp(I48,et)),this}writeI48BE(et){return this.offset+=6,this.ops.push(new NumberOp(I48BE,et)),this}writeI56(et){return this.offset+=7,this.ops.push(new NumberOp(I56,et)),this}writeI56BE(et){return this.offset+=7,this.ops.push(new NumberOp(I56BE,et)),this}writeBigI56(et){return this.offset+=7,this.ops.push(new BigOp(BIG_I56,et)),this}writeBigI56BE(et){return this.offset+=7,this.ops.push(new BigOp(BIG_I56BE,et)),this}writeI64(et){return this.offset+=8,this.ops.push(new NumberOp(I64,et)),this}writeI64BE(et){return this.offset+=8,this.ops.push(new NumberOp(I64BE,et)),this}writeBigI64(et){return this.offset+=8,this.ops.push(new BigOp(BIG_I64,et)),this}writeBigI64BE(et){return this.offset+=8,this.ops.push(new BigOp(BIG_I64BE,et)),this}writeFloat(et){return this.offset+=4,this.ops.push(new NumberOp(FL,et)),this}writeFloatBE(et){return this.offset+=4,this.ops.push(new NumberOp(FLBE,et)),this}writeDouble(et){return this.offset+=8,this.ops.push(new NumberOp(DBL,et)),this}writeDoubleBE(et){return this.offset+=8,this.ops.push(new NumberOp(DBLBE,et)),this}writeVarint(et){return this.offset+=encoding$2.sizeVarint(et),this.ops.push(new NumberOp(VARINT,et)),this}writeVarint2(et){return this.offset+=encoding$2.sizeVarint2(et),this.ops.push(new NumberOp(VARINT2,et)),this}writeBytes(et){return enforce$4(Buffer.isBuffer(et),"value","buffer"),et.length===0?this:(this.offset+=et.length,this.ops.push(new BufferOp(BYTES,et)),this)}writeVarBytes(et){return enforce$4(Buffer.isBuffer(et),"value","buffer"),this.offset+=encoding$2.sizeVarint(et.length),this.ops.push(new NumberOp(VARINT,et.length)),et.length===0?this:(this.offset+=et.length,this.ops.push(new BufferOp(BYTES,et)),this)}copy(et,nt,rt){enforce$4(Buffer.isBuffer(et),"value","buffer"),enforce$4(nt>>>0===nt,"start","integer"),enforce$4(rt>>>0===rt,"end","integer"),enforce$4(rt>=nt,"start","integer");const it=et.slice(nt,rt);return this.writeBytes(it),this}writeString(et,nt){return nt==null&&(nt="binary"),enforce$4(typeof et=="string","value","string"),enforce$4(typeof nt=="string","enc","string"),et.length===0?this:(this.offset+=Buffer.byteLength(et,nt),this.ops.push(new StringOp(STR,et,nt)),this)}writeHash(et){return typeof et!="string"?(enforce$4(Buffer.isBuffer(et),"value","buffer"),enforce$4(et.length===32,"value","32-byte hash"),this.writeBytes(et),this):(enforce$4(et.length===64,"value","32-byte hash"),this.writeString(et,"hex"),this)}writeVarString(et,nt){if(nt==null&&(nt="binary"),enforce$4(typeof et=="string","value","string"),enforce$4(typeof nt=="string","enc","string"),et.length===0)return this.ops.push(new NumberOp(VARINT,0)),this;const rt=Buffer.byteLength(et,nt);return this.offset+=encoding$2.sizeVarint(rt),this.offset+=rt,this.ops.push(new NumberOp(VARINT,rt)),this.ops.push(new StringOp(STR,et,nt)),this}writeNullString(et,nt){return this.writeString(et,nt),this.writeU8(0),this}writeChecksum(et){return et&&typeof et.digest=="function"&&(et=et.digest.bind(et)),enforce$4(typeof et=="function","hash","function"),this.offset+=4,this.ops.push(new FunctionOp(CHECKSUM,et)),this}fill(et,nt){return enforce$4((et&255)===et,"value","byte"),enforce$4(nt>>>0===nt,"size","integer"),nt===0?this:(this.offset+=nt,this.ops.push(new FillOp(FILL,et,nt)),this)}pad(et,nt=0){return this.fill(nt,et)}};class WriteOp{constructor(et){this.type=et}}class NumberOp extends WriteOp{constructor(et,nt){super(et),this.value=nt}}class BigOp extends WriteOp{constructor(et,nt){super(et),this.value=nt}}class BufferOp extends WriteOp{constructor(et,nt){super(et),this.data=nt}}class StringOp extends WriteOp{constructor(et,nt,rt){super(et),this.value=nt,this.enc=rt}}class FunctionOp extends WriteOp{constructor(et,nt){super(et),this.func=nt}}class FillOp extends WriteOp{constructor(et,nt,rt){super(et),this.value=nt,this.size=rt}}var writer=BufferWriter$3;/*! - * staticwriter.js - buffer writer for bcoin - * Copyright (c) 2014-2017, Christopher Jeffrey (MIT License). - * https://github.com/bcoin-org/bcoin - */const enforce$3=enforce_1,encoding$1=encoding$4,EncodingError$1=error,EMPTY=Buffer.alloc(0),POOL_SIZE=102400;let POOL=null,StaticWriter$2=class g1{constructor(et){this.data=EMPTY,this.offset=0,et!=null&&this.init(et)}check(et){if(this.offset+et>this.data.length)throw new EncodingError$1(this.offset,"Out of bounds write",this.check)}init(et){return Buffer.isBuffer(et)?(this.data=et,this.offset=0,this):(enforce$3(et>>>0===et,"size","integer"),this.data=Buffer.allocUnsafeSlow(et),this.offset=0,this)}static pool(et){if(enforce$3(et>>>0===et,"size","integer"),et<=POOL_SIZE){POOL||(POOL=Buffer.allocUnsafeSlow(POOL_SIZE));const nt=new g1;return nt.data=POOL.slice(0,et),nt}return new g1(et)}render(){const{data:et,offset:nt}=this;if(nt!==et.length)throw new EncodingError$1(nt,"Out of bounds write");return this.destroy(),et}encode(){return this.render()}slice(){const{data:et,offset:nt}=this;if(nt>et.length)throw new EncodingError$1(nt,"Out of bounds write");return this.destroy(),et.slice(0,nt)}finish(){const{data:et,offset:nt}=this;if(nt>et.length)throw new EncodingError$1(nt,"Out of bounds write");return et.fill(0,nt,et.length),this.destroy(),et}getSize(){return this.offset}seek(et){if(enforce$3(Number.isSafeInteger(et),"off","integer"),this.offset+et<0)throw new EncodingError$1(this.offset,"Out of bounds write");return this.check(et),this.offset+=et,this}destroy(){return this.data=EMPTY,this.offset=0,this}writeU8(et){return this.check(1),this.offset=encoding$1.writeU8(this.data,et,this.offset),this}writeU16(et){return this.check(2),this.offset=encoding$1.writeU16(this.data,et,this.offset),this}writeU16BE(et){return this.check(2),this.offset=encoding$1.writeU16BE(this.data,et,this.offset),this}writeU24(et){return this.check(3),this.offset=encoding$1.writeU24(this.data,et,this.offset),this}writeU24BE(et){return this.check(3),this.offset=encoding$1.writeU24BE(this.data,et,this.offset),this}writeU32(et){return this.check(4),this.offset=encoding$1.writeU32(this.data,et,this.offset),this}writeU32BE(et){return this.check(4),this.offset=encoding$1.writeU32BE(this.data,et,this.offset),this}writeU40(et){return this.check(5),this.offset=encoding$1.writeU40(this.data,et,this.offset),this}writeU40BE(et){return this.check(5),this.offset=encoding$1.writeU40BE(this.data,et,this.offset),this}writeU48(et){return this.check(6),this.offset=encoding$1.writeU48(this.data,et,this.offset),this}writeU48BE(et){return this.check(6),this.offset=encoding$1.writeU48BE(this.data,et,this.offset),this}writeU56(et){return this.check(7),this.offset=encoding$1.writeU56(this.data,et,this.offset),this}writeU56BE(et){return this.check(7),this.offset=encoding$1.writeU56BE(this.data,et,this.offset),this}writeBigU56(et){return this.check(7),this.offset=encoding$1.writeBigU56(this.data,et,this.offset),this}writeBigU56BE(et){return this.check(7),this.offset=encoding$1.writeBigU56BE(this.data,et,this.offset),this}writeU64(et){return this.check(8),this.offset=encoding$1.writeU64(this.data,et,this.offset),this}writeU64BE(et){return this.check(8),this.offset=encoding$1.writeU64BE(this.data,et,this.offset),this}writeBigU64(et){return this.check(8),this.offset=encoding$1.writeBigU64(this.data,et,this.offset),this}writeBigU64BE(et){return this.check(8),this.offset=encoding$1.writeBigU64BE(this.data,et,this.offset),this}writeBigU128(et){return this.check(16),this.offset=encoding$1.writeBigU128(this.data,et,this.offset),this}writeBigU128BE(et){return this.check(16),this.offset=encoding$1.writeBigU128BE(this.data,et,this.offset),this}writeBigU256(et){return this.check(32),this.offset=encoding$1.writeBigU256(this.data,et,this.offset),this}writeBigU256BE(et){return this.check(32),this.offset=encoding$1.writeBigU256BE(this.data,et,this.offset),this}writeI8(et){return this.check(1),this.offset=encoding$1.writeI8(this.data,et,this.offset),this}writeI16(et){return this.check(2),this.offset=encoding$1.writeI16(this.data,et,this.offset),this}writeI16BE(et){return this.check(2),this.offset=encoding$1.writeI16BE(this.data,et,this.offset),this}writeI24(et){return this.check(3),this.offset=encoding$1.writeI24(this.data,et,this.offset),this}writeI24BE(et){return this.check(3),this.offset=encoding$1.writeI24BE(this.data,et,this.offset),this}writeI32(et){return this.check(4),this.offset=encoding$1.writeI32(this.data,et,this.offset),this}writeI32BE(et){return this.check(4),this.offset=encoding$1.writeI32BE(this.data,et,this.offset),this}writeI40(et){return this.check(5),this.offset=encoding$1.writeI40(this.data,et,this.offset),this}writeI40BE(et){return this.check(5),this.offset=encoding$1.writeI40BE(this.data,et,this.offset),this}writeI48(et){return this.check(6),this.offset=encoding$1.writeI48(this.data,et,this.offset),this}writeI48BE(et){return this.check(6),this.offset=encoding$1.writeI48BE(this.data,et,this.offset),this}writeI56(et){return this.check(7),this.offset=encoding$1.writeI56(this.data,et,this.offset),this}writeI56BE(et){return this.check(7),this.offset=encoding$1.writeI56BE(this.data,et,this.offset),this}writeBigI56(et){return this.check(7),this.offset=encoding$1.writeBigI56(this.data,et,this.offset),this}writeBigI56BE(et){return this.check(7),this.offset=encoding$1.writeBigI56BE(this.data,et,this.offset),this}writeI64(et){return this.check(8),this.offset=encoding$1.writeI64(this.data,et,this.offset),this}writeI64BE(et){return this.check(8),this.offset=encoding$1.writeI64BE(this.data,et,this.offset),this}writeBigI64(et){return this.check(8),this.offset=encoding$1.writeBigI64(this.data,et,this.offset),this}writeBigI64BE(et){return this.check(8),this.offset=encoding$1.writeBigI64BE(this.data,et,this.offset),this}writeFloat(et){return this.check(4),this.offset=encoding$1.writeFloat(this.data,et,this.offset),this}writeFloatBE(et){return this.check(4),this.offset=encoding$1.writeFloatBE(this.data,et,this.offset),this}writeDouble(et){return this.check(8),this.offset=encoding$1.writeDouble(this.data,et,this.offset),this}writeDoubleBE(et){return this.check(8),this.offset=encoding$1.writeDoubleBE(this.data,et,this.offset),this}writeVarint(et){return this.offset=encoding$1.writeVarint(this.data,et,this.offset),this}writeVarint2(et){return this.offset=encoding$1.writeVarint2(this.data,et,this.offset),this}writeBytes(et){return enforce$3(Buffer.isBuffer(et),"value","buffer"),this.check(et.length),this.offset+=et.copy(this.data,this.offset),this}writeVarBytes(et){return enforce$3(Buffer.isBuffer(et),"value","buffer"),this.writeVarint(et.length),this.writeBytes(et),this}copy(et,nt,rt){return enforce$3(Buffer.isBuffer(et),"value","buffer"),enforce$3(nt>>>0===nt,"start","integer"),enforce$3(rt>>>0===rt,"end","integer"),enforce$3(rt>=nt,"start","integer"),this.check(rt-nt),this.offset+=et.copy(this.data,this.offset,nt,rt),this}writeString(et,nt){if(nt==null&&(nt="binary"),enforce$3(typeof et=="string","value","string"),enforce$3(typeof nt=="string","enc","string"),et.length===0)return this;const rt=Buffer.byteLength(et,nt);return this.check(rt),this.offset+=this.data.write(et,this.offset,nt),this}writeHash(et){return typeof et!="string"?(enforce$3(Buffer.isBuffer(et),"value","buffer"),enforce$3(et.length===32,"value","32-byte hash"),this.writeBytes(et),this):(enforce$3(et.length===64,"value","32-byte hash"),this.check(32),this.offset+=this.data.write(et,this.offset,"hex"),this)}writeVarString(et,nt){if(nt==null&&(nt="binary"),enforce$3(typeof et=="string","value","string"),enforce$3(typeof nt=="string","enc","string"),et.length===0)return this.writeVarint(0),this;const rt=Buffer.byteLength(et,nt);return this.writeVarint(rt),this.check(rt),this.offset+=this.data.write(et,this.offset,nt),this}writeNullString(et,nt){return this.writeString(et,nt),this.writeU8(0),this}writeChecksum(et){(!et||typeof et.digest!="function")&&enforce$3(typeof et=="function","hash","function"),this.check(4);const nt=this.data.slice(0,this.offset);return(et.digest?et.digest(nt):et(nt)).copy(this.data,this.offset,0,4),this.offset+=4,this}fill(et,nt){return enforce$3((et&255)===et,"value","byte"),enforce$3(nt>>>0===nt,"size","integer"),nt===0?this:(this.check(nt),this.data.fill(et,this.offset,this.offset+nt),this.offset+=nt,this)}pad(et,nt=0){return this.fill(nt,et)}};var staticwriter=StaticWriter$2;/*! - * struct.js - struct object for bcoin - * Copyright (c) 2018, Christopher Jeffrey (MIT License). - * https://github.com/bcoin-org/bcoin - */const enforce$2=enforce_1,BufferReader$2=reader,BufferWriter$2=writer,StaticWriter$1=staticwriter,{custom:custom$1}=customBrowser;let Struct$1=class{constructor(){}inject(et){return enforce$2(et instanceof this.constructor,"obj","struct"),this.decode(et.encode())}clone(){return new this.constructor().inject(this)}getSize(et){return-1}write(et,nt){return et}read(et,nt){return this}toString(){return Object.prototype.toString.call(this)}fromString(et,nt){return this}getJSON(){return this}fromJSON(et,nt){return this}fromOptions(et,nt){return this}from(et,nt){return this.fromOptions(et,nt)}format(){return this.getJSON()}encode(et){const nt=this.getSize(et),rt=nt===-1?new BufferWriter$2:new StaticWriter$1(nt);return this.write(rt,et),rt.render()}decode(et,nt){const rt=new BufferReader$2(et);return this.read(rt,nt),this}toHex(et){return this.encode(et).toString("hex")}fromHex(et,nt){enforce$2(typeof et=="string","str","string");const rt=et.length>>>1,it=Buffer.from(et,"hex");if(it.length!==rt)throw new Error("Invalid hex string.");return this.decode(it,nt)}toBase64(et){return this.encode(et).toString("base64")}fromBase64(et,nt){enforce$2(typeof et=="string","str","string");const rt=Buffer.from(et,"base64");if(et.length>size64(rt.length))throw new Error("Invalid base64 string.");return this.decode(rt,nt)}toJSON(){return this.getJSON()}[custom$1](){return this.format()}static read(et,nt){return new this().read(et,nt)}static decode(et,nt){return new this().decode(et,nt)}static fromHex(et,nt){return new this().fromHex(et,nt)}static fromBase64(et,nt){return new this().fromBase64(et,nt)}static fromString(et,nt){return new this().fromString(et,nt)}static fromJSON(et,nt){return new this().fromJSON(et,nt)}static fromOptions(et,nt){return new this().fromOptions(et,nt)}static from(et,nt){return new this().from(et,nt)}toWriter(et,nt){return this.write(et,nt)}fromReader(et,nt){return this.read(et,nt)}toRaw(et){return this.encode(et)}fromRaw(et,nt){return this.decode(et,nt)}static fromReader(et,nt){return this.read(et,nt)}static fromRaw(et,nt){return this.decode(et,nt)}};function size64(tt){return(4*tt/3+3&-4)>>>0}var struct=Struct$1;/*! - * bufio.js - buffer utilities for javascript - * Copyright (c) 2014-2017, Christopher Jeffrey (MIT License). - * https://github.com/bcoin-org/bcoin - */const custom=customBrowser,encoding=encoding$4,enforce$1=enforce_1,EncodingError=error,BufferReader$1=reader,BufferWriter$1=writer,StaticWriter=staticwriter,Struct=struct;bufio.custom=custom;bufio.encoding=encoding;bufio.EncodingError=EncodingError;bufio.BufferReader=BufferReader$1;bufio.BufferWriter=BufferWriter$1;bufio.StaticWriter=StaticWriter;bufio.Struct=Struct;bufio.read=function(et,nt){return new BufferReader$1(et,nt)};bufio.write=function(et){return et!=null?new StaticWriter(et):new BufferWriter$1};bufio.pool=function(et){return StaticWriter.pool(et)};function _read(tt,et){return function(nt,rt){if(enforce$1(Buffer.isBuffer(nt),"data","buffer"),enforce$1(rt>>>0===rt,"off","integer"),rt+et>nt.length)throw new EncodingError(rt,"Out of bounds read");return tt(nt,rt)}}function _readn(tt){return function(et,nt,rt){if(enforce$1(Buffer.isBuffer(et),"data","buffer"),enforce$1(nt>>>0===nt,"off","integer"),enforce$1(rt>>>0===rt,"len","integer"),nt+rt>et.length)throw new EncodingError(nt,"Out of bounds read");return tt(et,nt,rt)}}function _readvar(tt){return function(et,nt){return enforce$1(Buffer.isBuffer(et),"data","buffer"),enforce$1(nt>>>0===nt,"off","integer"),tt(et,nt)}}function _write(tt,et){return function(nt,rt,it){if(enforce$1(Buffer.isBuffer(nt),"data","buffer"),enforce$1(it>>>0===it,"off","integer"),it+et>nt.length)throw new EncodingError(it,"Out of bounds write");return tt(nt,rt,it)}}function _writen(tt){return function(et,nt,rt,it){if(enforce$1(Buffer.isBuffer(et),"data","buffer"),enforce$1(rt>>>0===rt,"off","integer"),enforce$1(it>>>0===it,"len","integer"),rt+it>et.length)throw new EncodingError(rt,"Out of bounds write");return tt(et,nt,rt,it)}}function _writecb(tt,et){return function(nt,rt,it){if(enforce$1(Buffer.isBuffer(nt),"data","buffer"),enforce$1(it>>>0===it,"off","integer"),it+et(rt)>nt.length)throw new EncodingError(it,"Out of bounds write");return tt(nt,rt,it)}}bufio.readU=_readn(encoding.readU);bufio.readBigU256=_read(encoding.readBigU256,32);bufio.readBigU128=_read(encoding.readBigU128,16);bufio.readBigU64=_read(encoding.readBigU64,8);bufio.readBigU56=_read(encoding.readBigU56,7);bufio.readU64=_read(encoding.readU64,8);bufio.readU56=_read(encoding.readU56,7);bufio.readU48=_read(encoding.readU48,6);bufio.readU40=_read(encoding.readU40,5);bufio.readU32=_read(encoding.readU32,4);bufio.readU24=_read(encoding.readU24,3);bufio.readU16=_read(encoding.readU16,2);bufio.readU8=_read(encoding.readU8,1);bufio.readUBE=_readn(encoding.readUBE);bufio.readBigU256BE=_read(encoding.readBigU256BE,32);bufio.readBigU128BE=_read(encoding.readBigU128BE,16);bufio.readBigU64BE=_read(encoding.readBigU64BE,8);bufio.readBigU56BE=_read(encoding.readBigU56BE,7);bufio.readU64BE=_read(encoding.readU64BE,8);bufio.readU56BE=_read(encoding.readU56BE,7);bufio.readU48BE=_read(encoding.readU48BE,6);bufio.readU40BE=_read(encoding.readU40BE,5);bufio.readU32BE=_read(encoding.readU32BE,4);bufio.readU24BE=_read(encoding.readU24BE,3);bufio.readU16BE=_read(encoding.readU16BE,2);bufio.readI=_readn(encoding.readI);bufio.readBigI64=_read(encoding.readBigI64,8);bufio.readBigI56=_read(encoding.readBigI56,7);bufio.readI64=_read(encoding.readI64,8);bufio.readI56=_read(encoding.readI56,7);bufio.readI48=_read(encoding.readI48,6);bufio.readI40=_read(encoding.readI40,5);bufio.readI32=_read(encoding.readI32,4);bufio.readI24=_read(encoding.readI24,3);bufio.readI16=_read(encoding.readI16,2);bufio.readI8=_read(encoding.readI8,1);bufio.readIBE=_readn(encoding.readIBE);bufio.readBigI64BE=_read(encoding.readBigI64BE,8);bufio.readBigI56BE=_read(encoding.readBigI56BE,7);bufio.readI64BE=_read(encoding.readI64BE,8);bufio.readI56BE=_read(encoding.readI56BE,7);bufio.readI48BE=_read(encoding.readI48BE,6);bufio.readI40BE=_read(encoding.readI40BE,5);bufio.readI32BE=_read(encoding.readI32BE,4);bufio.readI24BE=_read(encoding.readI24BE,3);bufio.readI16BE=_read(encoding.readI16BE,2);bufio.readFloat=_read(encoding.readFloat,4);bufio.readFloatBE=_read(encoding.readFloatBE,4);bufio.readDouble=_read(encoding.readDouble,8);bufio.readDoubleBE=_read(encoding.readDoubleBE,8);bufio.writeU=_writen(encoding.writeU);bufio.writeBigU256=_write(encoding.writeBigU256,32);bufio.writeBigU128=_write(encoding.writeBigU128,16);bufio.writeBigU64=_write(encoding.writeBigU64,8);bufio.writeBigU56=_write(encoding.writeBigU56,7);bufio.writeU64=_write(encoding.writeU64,8);bufio.writeU56=_write(encoding.writeU56,7);bufio.writeU48=_write(encoding.writeU48,6);bufio.writeU40=_write(encoding.writeU40,5);bufio.writeU32=_write(encoding.writeU32,4);bufio.writeU24=_write(encoding.writeU24,3);bufio.writeU16=_write(encoding.writeU16,2);bufio.writeU8=_write(encoding.writeU8,1);bufio.writeUBE=_writen(encoding.writeUBE);bufio.writeBigU256BE=_write(encoding.writeBigU256BE,32);bufio.writeBigU128BE=_write(encoding.writeBigU128BE,16);bufio.writeBigU64BE=_write(encoding.writeBigU64BE,8);bufio.writeBigU56BE=_write(encoding.writeBigU56BE,7);bufio.writeU64BE=_write(encoding.writeU64BE,8);bufio.writeU56BE=_write(encoding.writeU56BE,7);bufio.writeU48BE=_write(encoding.writeU48BE,6);bufio.writeU40BE=_write(encoding.writeU40BE,5);bufio.writeU32BE=_write(encoding.writeU32BE,4);bufio.writeU24BE=_write(encoding.writeU24BE,3);bufio.writeU16BE=_write(encoding.writeU16BE,2);bufio.writeI=_writen(encoding.writeI);bufio.writeBigI64=_write(encoding.writeBigI64,8);bufio.writeBigI56=_write(encoding.writeBigI56,7);bufio.writeI64=_write(encoding.writeI64,8);bufio.writeI56=_write(encoding.writeI56,7);bufio.writeI48=_write(encoding.writeI48,6);bufio.writeI40=_write(encoding.writeI40,5);bufio.writeI32=_write(encoding.writeI32,4);bufio.writeI24=_write(encoding.writeI24,3);bufio.writeI16=_write(encoding.writeI16,2);bufio.writeI8=_write(encoding.writeI8,1);bufio.writeIBE=_writen(encoding.writeIBE);bufio.writeBigI64BE=_write(encoding.writeBigI64BE,8);bufio.writeBigI56BE=_write(encoding.writeBigI56BE,7);bufio.writeI64BE=_write(encoding.writeI64BE,8);bufio.writeI56BE=_write(encoding.writeI56BE,7);bufio.writeI48BE=_write(encoding.writeI48BE,6);bufio.writeI40BE=_write(encoding.writeI40BE,5);bufio.writeI32BE=_write(encoding.writeI32BE,4);bufio.writeI24BE=_write(encoding.writeI24BE,3);bufio.writeI16BE=_write(encoding.writeI16BE,2);bufio.writeFloat=_write(encoding.writeFloat,4);bufio.writeFloatBE=_write(encoding.writeFloatBE,4);bufio.writeDouble=_write(encoding.writeDouble,8);bufio.writeDoubleBE=_write(encoding.writeDoubleBE,8);bufio.readVarint=_readvar(encoding.readVarint);bufio.writeVarint=_writecb(encoding.writeVarint,encoding.sizeVarint);bufio.sizeVarint=encoding.sizeVarint;bufio.readVarint2=_readvar(encoding.readVarint2);bufio.writeVarint2=_writecb(encoding.writeVarint2,encoding.sizeVarint2);bufio.sizeVarint2=encoding.sizeVarint2;bufio.sliceBytes=encoding.sliceBytes;bufio.readBytes=encoding.readBytes;bufio.writeBytes=encoding.writeBytes;bufio.readString=encoding.readString;bufio.writeString=encoding.writeString;bufio.realloc=encoding.realloc;bufio.copy=encoding.copy;bufio.concat=encoding.concat;bufio.sizeVarBytes=encoding.sizeVarBytes;bufio.sizeVarlen=encoding.sizeVarlen;bufio.sizeVarString=encoding.sizeVarString;var cryptoBrowserify={},browser$c={exports:{}},safeBuffer$1={exports:{}};/*! safe-buffer. MIT License. Feross Aboukhadijeh */(function(tt,et){var nt=buffer$2,rt=nt.Buffer;function it(at,st){for(var lt in at)st[lt]=at[lt]}rt.from&&rt.alloc&&rt.allocUnsafe&&rt.allocUnsafeSlow?tt.exports=nt:(it(nt,et),et.Buffer=ot);function ot(at,st,lt){return rt(at,st,lt)}ot.prototype=Object.create(rt.prototype),it(rt,ot),ot.from=function(at,st,lt){if(typeof at=="number")throw new TypeError("Argument must not be a number");return rt(at,st,lt)},ot.alloc=function(at,st,lt){if(typeof at!="number")throw new TypeError("Argument must be a number");var ct=rt(at);return st!==void 0?typeof lt=="string"?ct.fill(st,lt):ct.fill(st):ct.fill(0),ct},ot.allocUnsafe=function(at){if(typeof at!="number")throw new TypeError("Argument must be a number");return rt(at)},ot.allocUnsafeSlow=function(at){if(typeof at!="number")throw new TypeError("Argument must be a number");return nt.SlowBuffer(at)}})(safeBuffer$1,safeBuffer$1.exports);var safeBufferExports=safeBuffer$1.exports,MAX_BYTES=65536,MAX_UINT32=4294967295;function oldBrowser$1(){throw new Error(`Secure random number generation is not supported by this browser. -Use Chrome, Firefox or Internet Explorer 11`)}var Buffer$H=safeBufferExports.Buffer,crypto$4=commonjsGlobal.crypto||commonjsGlobal.msCrypto;crypto$4&&crypto$4.getRandomValues?browser$c.exports=randomBytes$2:browser$c.exports=oldBrowser$1;function randomBytes$2(tt,et){if(tt>MAX_UINT32)throw new RangeError("requested too many random bytes");var nt=Buffer$H.allocUnsafe(tt);if(tt>0)if(tt>MAX_BYTES)for(var rt=0;rt0&&(at=nt[0]),at instanceof Error)throw at;var st=new Error("Unhandled error."+(at?" ("+at.message+")":""));throw st.context=at,st}var lt=ot[et];if(lt===void 0)return!1;if(typeof lt=="function")ReflectApply(lt,this,nt);else for(var ct=lt.length,ut=arrayClone(lt,ct),rt=0;rt0&&at.length>it&&!at.warned){at.warned=!0;var st=new Error("Possible EventEmitter memory leak detected. "+at.length+" "+String(et)+" listeners added. Use emitter.setMaxListeners() to increase limit");st.name="MaxListenersExceededWarning",st.emitter=tt,st.type=et,st.count=at.length,ProcessEmitWarning(st)}return tt}EventEmitter$1.prototype.addListener=function(et,nt){return _addListener(this,et,nt,!1)};EventEmitter$1.prototype.on=EventEmitter$1.prototype.addListener;EventEmitter$1.prototype.prependListener=function(et,nt){return _addListener(this,et,nt,!0)};function onceWrapper(){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 _onceWrap(tt,et,nt){var rt={fired:!1,wrapFn:void 0,target:tt,type:et,listener:nt},it=onceWrapper.bind(rt);return it.listener=nt,rt.wrapFn=it,it}EventEmitter$1.prototype.once=function(et,nt){return checkListener(nt),this.on(et,_onceWrap(this,et,nt)),this};EventEmitter$1.prototype.prependOnceListener=function(et,nt){return checkListener(nt),this.prependListener(et,_onceWrap(this,et,nt)),this};EventEmitter$1.prototype.removeListener=function(et,nt){var rt,it,ot,at,st;if(checkListener(nt),it=this._events,it===void 0)return this;if(rt=it[et],rt===void 0)return this;if(rt===nt||rt.listener===nt)--this._eventsCount===0?this._events=Object.create(null):(delete it[et],it.removeListener&&this.emit("removeListener",et,rt.listener||nt));else if(typeof rt!="function"){for(ot=-1,at=rt.length-1;at>=0;at--)if(rt[at]===nt||rt[at].listener===nt){st=rt[at].listener,ot=at;break}if(ot<0)return this;ot===0?rt.shift():spliceOne(rt,ot),rt.length===1&&(it[et]=rt[0]),it.removeListener!==void 0&&this.emit("removeListener",et,st||nt)}return this};EventEmitter$1.prototype.off=EventEmitter$1.prototype.removeListener;EventEmitter$1.prototype.removeAllListeners=function(et){var nt,rt,it;if(rt=this._events,rt===void 0)return this;if(rt.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):rt[et]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete rt[et]),this;if(arguments.length===0){var ot=Object.keys(rt),at;for(it=0;it=0;it--)this.removeListener(et,nt[it]);return this};function _listeners$1(tt,et,nt){var rt=tt._events;if(rt===void 0)return[];var it=rt[et];return it===void 0?[]:typeof it=="function"?nt?[it.listener||it]:[it]:nt?unwrapListeners(it):arrayClone(it,it.length)}EventEmitter$1.prototype.listeners=function(et){return _listeners$1(this,et,!0)};EventEmitter$1.prototype.rawListeners=function(et){return _listeners$1(this,et,!1)};EventEmitter$1.listenerCount=function(tt,et){return typeof tt.listenerCount=="function"?tt.listenerCount(et):listenerCount.call(tt,et)};EventEmitter$1.prototype.listenerCount=listenerCount;function listenerCount(tt){var et=this._events;if(et!==void 0){var nt=et[tt];if(typeof nt=="function")return 1;if(nt!==void 0)return nt.length}return 0}EventEmitter$1.prototype.eventNames=function(){return this._eventsCount>0?ReflectOwnKeys(this._events):[]};function arrayClone(tt,et){for(var nt=new Array(et),rt=0;rt0?this.tail.next=bt:this.head=bt,this.tail=bt,++this.length}},{key:"unshift",value:function(yt){var bt={data:yt,next:this.head};this.length===0&&(this.tail=bt),this.head=bt,++this.length}},{key:"shift",value:function(){if(this.length!==0){var yt=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,yt}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(yt){if(this.length===0)return"";for(var bt=this.head,vt=""+bt.data;bt=bt.next;)vt+=yt+bt.data;return vt}},{key:"concat",value:function(yt){if(this.length===0)return ct.alloc(0);for(var bt=ct.allocUnsafe(yt>>>0),vt=this.head,xt=0;vt;)pt(vt.data,bt,xt),xt+=vt.data.length,vt=vt.next;return bt}},{key:"consume",value:function(yt,bt){var vt;return ytkt.length?kt.length:yt;if(St===kt.length?xt+=kt:xt+=kt.slice(0,yt),yt-=St,yt===0){St===kt.length?(++vt,bt.next?this.head=bt.next:this.head=this.tail=null):(this.head=bt,bt.data=kt.slice(St));break}++vt}return this.length-=vt,xt}},{key:"_getBuffer",value:function(yt){var bt=ct.allocUnsafe(yt),vt=this.head,xt=1;for(vt.data.copy(bt),yt-=vt.data.length;vt=vt.next;){var kt=vt.data,St=yt>kt.length?kt.length:yt;if(kt.copy(bt,bt.length-yt,0,St),yt-=St,yt===0){St===kt.length?(++xt,vt.next?this.head=vt.next:this.head=this.tail=null):(this.head=vt,vt.data=kt.slice(St));break}++xt}return this.length-=xt,bt}},{key:dt,value:function(yt,bt){return ht(this,et(et({},bt),{},{depth:0,customInspect:!1}))}}]),mt}(),buffer_list}function destroy(tt,et){var nt=this,rt=this._readableState&&this._readableState.destroyed,it=this._writableState&&this._writableState.destroyed;return rt||it?(et?et(tt):tt&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(emitErrorNT,this,tt)):process.nextTick(emitErrorNT,this,tt)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(tt||null,function(ot){!et&&ot?nt._writableState?nt._writableState.errorEmitted?process.nextTick(emitCloseNT,nt):(nt._writableState.errorEmitted=!0,process.nextTick(emitErrorAndCloseNT,nt,ot)):process.nextTick(emitErrorAndCloseNT,nt,ot):et?(process.nextTick(emitCloseNT,nt),et(ot)):process.nextTick(emitCloseNT,nt)}),this)}function emitErrorAndCloseNT(tt,et){emitErrorNT(tt,et),emitCloseNT(tt)}function emitCloseNT(tt){tt._writableState&&!tt._writableState.emitClose||tt._readableState&&!tt._readableState.emitClose||tt.emit("close")}function undestroy(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function emitErrorNT(tt,et){tt.emit("error",et)}function errorOrDestroy(tt,et){var nt=tt._readableState,rt=tt._writableState;nt&&nt.autoDestroy||rt&&rt.autoDestroy?tt.destroy(et):tt.emit("error",et)}var destroy_1={destroy,undestroy,errorOrDestroy},errorsBrowser={};function _inheritsLoose$1(tt,et){tt.prototype=Object.create(et.prototype),tt.prototype.constructor=tt,tt.__proto__=et}var codes={};function createErrorType(tt,et,nt){nt||(nt=Error);function rt(ot,at,st){return typeof et=="string"?et:et(ot,at,st)}var it=function(ot){_inheritsLoose$1(at,ot);function at(st,lt,ct){return ot.call(this,rt(st,lt,ct))||this}return at}(nt);it.prototype.name=nt.name,it.prototype.code=tt,codes[tt]=it}function oneOf(tt,et){if(Array.isArray(tt)){var nt=tt.length;return tt=tt.map(function(rt){return String(rt)}),nt>2?"one of ".concat(et," ").concat(tt.slice(0,nt-1).join(", "),", or ")+tt[nt-1]:nt===2?"one of ".concat(et," ").concat(tt[0]," or ").concat(tt[1]):"of ".concat(et," ").concat(tt[0])}else return"of ".concat(et," ").concat(String(tt))}function startsWith(tt,et,nt){return tt.substr(!nt||nt<0?0:+nt,et.length)===et}function endsWith(tt,et,nt){return(nt===void 0||nt>tt.length)&&(nt=tt.length),tt.substring(nt-et.length,nt)===et}function includes(tt,et,nt){return typeof nt!="number"&&(nt=0),nt+et.length>tt.length?!1:tt.indexOf(et,nt)!==-1}createErrorType("ERR_INVALID_OPT_VALUE",function(tt,et){return'The value "'+et+'" is invalid for option "'+tt+'"'},TypeError);createErrorType("ERR_INVALID_ARG_TYPE",function(tt,et,nt){var rt;typeof et=="string"&&startsWith(et,"not ")?(rt="must not be",et=et.replace(/^not /,"")):rt="must be";var it;if(endsWith(tt," argument"))it="The ".concat(tt," ").concat(rt," ").concat(oneOf(et,"type"));else{var ot=includes(tt,".")?"property":"argument";it='The "'.concat(tt,'" ').concat(ot," ").concat(rt," ").concat(oneOf(et,"type"))}return it+=". Received type ".concat(typeof nt),it},TypeError);createErrorType("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF");createErrorType("ERR_METHOD_NOT_IMPLEMENTED",function(tt){return"The "+tt+" method is not implemented"});createErrorType("ERR_STREAM_PREMATURE_CLOSE","Premature close");createErrorType("ERR_STREAM_DESTROYED",function(tt){return"Cannot call "+tt+" after a stream was destroyed"});createErrorType("ERR_MULTIPLE_CALLBACK","Callback called multiple times");createErrorType("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable");createErrorType("ERR_STREAM_WRITE_AFTER_END","write after end");createErrorType("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError);createErrorType("ERR_UNKNOWN_ENCODING",function(tt){return"Unknown encoding: "+tt},TypeError);createErrorType("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event");errorsBrowser.codes=codes;var ERR_INVALID_OPT_VALUE=errorsBrowser.codes.ERR_INVALID_OPT_VALUE;function highWaterMarkFrom(tt,et,nt){return tt.highWaterMark!=null?tt.highWaterMark:et?tt[nt]:null}function getHighWaterMark(tt,et,nt,rt){var it=highWaterMarkFrom(et,rt,nt);if(it!=null){if(!(isFinite(it)&&Math.floor(it)===it)||it<0){var ot=rt?nt:"highWaterMark";throw new ERR_INVALID_OPT_VALUE(ot,it)}return Math.floor(it)}return tt.objectMode?16:16*1024}var state={getHighWaterMark},browser$b=deprecate$1;function deprecate$1(tt,et){if(config$1("noDeprecation"))return tt;var nt=!1;function rt(){if(!nt){if(config$1("throwDeprecation"))throw new Error(et);config$1("traceDeprecation")?console.trace(et):console.warn(et),nt=!0}return tt.apply(this,arguments)}return rt}function config$1(tt){try{if(!commonjsGlobal.localStorage)return!1}catch{return!1}var et=commonjsGlobal.localStorage[tt];return et==null?!1:String(et).toLowerCase()==="true"}var _stream_writable,hasRequired_stream_writable;function require_stream_writable(){if(hasRequired_stream_writable)return _stream_writable;hasRequired_stream_writable=1,_stream_writable=Et;function tt(Kt){var rn=this;this.next=null,this.entry=null,this.finish=function(){sn(rn,Kt)}}var et;Et.WritableState=Tt;var nt={deprecate:browser$b},rt=streamBrowser,it=buffer$2.Buffer,ot=(typeof commonjsGlobal<"u"?commonjsGlobal:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function at(Kt){return it.from(Kt)}function st(Kt){return it.isBuffer(Kt)||Kt instanceof ot}var lt=destroy_1,ct=state,ut=ct.getHighWaterMark,ht=errorsBrowser.codes,dt=ht.ERR_INVALID_ARG_TYPE,pt=ht.ERR_METHOD_NOT_IMPLEMENTED,mt=ht.ERR_MULTIPLE_CALLBACK,gt=ht.ERR_STREAM_CANNOT_PIPE,yt=ht.ERR_STREAM_DESTROYED,bt=ht.ERR_STREAM_NULL_VALUES,vt=ht.ERR_STREAM_WRITE_AFTER_END,xt=ht.ERR_UNKNOWN_ENCODING,kt=lt.errorOrDestroy;inherits_browserExports(Et,rt);function St(){}function Tt(Kt,rn,nn){et=et||require_stream_duplex(),Kt=Kt||{},typeof nn!="boolean"&&(nn=rn instanceof et),this.objectMode=!!Kt.objectMode,nn&&(this.objectMode=this.objectMode||!!Kt.writableObjectMode),this.highWaterMark=ut(this,Kt,"writableHighWaterMark",nn),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var hn=Kt.decodeStrings===!1;this.decodeStrings=!hn,this.defaultEncoding=Kt.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(vn){Ot(rn,vn)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=Kt.emitClose!==!1,this.autoDestroy=!!Kt.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new tt(this)}Tt.prototype.getBuffer=function(){for(var rn=this.bufferedRequest,nn=[];rn;)nn.push(rn),rn=rn.next;return nn},function(){try{Object.defineProperty(Tt.prototype,"buffer",{get:nt.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}}();var At;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(At=Function.prototype[Symbol.hasInstance],Object.defineProperty(Et,Symbol.hasInstance,{value:function(rn){return At.call(this,rn)?!0:this!==Et?!1:rn&&rn._writableState instanceof Tt}})):At=function(rn){return rn instanceof this};function Et(Kt){et=et||require_stream_duplex();var rn=this instanceof et;if(!rn&&!At.call(Et,this))return new Et(Kt);this._writableState=new Tt(Kt,this,rn),this.writable=!0,Kt&&(typeof Kt.write=="function"&&(this._write=Kt.write),typeof Kt.writev=="function"&&(this._writev=Kt.writev),typeof Kt.destroy=="function"&&(this._destroy=Kt.destroy),typeof Kt.final=="function"&&(this._final=Kt.final)),rt.call(this)}Et.prototype.pipe=function(){kt(this,new gt)};function $t(Kt,rn){var nn=new vt;kt(Kt,nn),process.nextTick(rn,nn)}function Dt(Kt,rn,nn,hn){var vn;return nn===null?vn=new bt:typeof nn!="string"&&!rn.objectMode&&(vn=new dt("chunk",["string","Buffer"],nn)),vn?(kt(Kt,vn),process.nextTick(hn,vn),!1):!0}Et.prototype.write=function(Kt,rn,nn){var hn=this._writableState,vn=!1,an=!hn.objectMode&&st(Kt);return an&&!it.isBuffer(Kt)&&(Kt=at(Kt)),typeof rn=="function"&&(nn=rn,rn=null),an?rn="buffer":rn||(rn=hn.defaultEncoding),typeof nn!="function"&&(nn=St),hn.ending?$t(this,nn):(an||Dt(this,hn,Kt,nn))&&(hn.pendingcb++,vn=Pt(this,hn,an,Kt,rn,nn)),vn},Et.prototype.cork=function(){this._writableState.corked++},Et.prototype.uncork=function(){var Kt=this._writableState;Kt.corked&&(Kt.corked--,!Kt.writing&&!Kt.corked&&!Kt.bufferProcessing&&Kt.bufferedRequest&&Ft(this,Kt))},Et.prototype.setDefaultEncoding=function(rn){if(typeof rn=="string"&&(rn=rn.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((rn+"").toLowerCase())>-1))throw new xt(rn);return this._writableState.defaultEncoding=rn,this},Object.defineProperty(Et.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function jt(Kt,rn,nn){return!Kt.objectMode&&Kt.decodeStrings!==!1&&typeof rn=="string"&&(rn=it.from(rn,nn)),rn}Object.defineProperty(Et.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function Pt(Kt,rn,nn,hn,vn,an){if(!nn){var Qt=jt(rn,hn,vn);hn!==Qt&&(nn=!0,vn="buffer",hn=Qt)}var _n=rn.objectMode?1:hn.length;rn.length+=_n;var Pn=rn.length>5===6?2:tt>>4===14?3:tt>>3===30?4:tt>>6===2?-1:-2}function utf8CheckIncomplete(tt,et,nt){var rt=et.length-1;if(rt=0?(it>0&&(tt.lastNeed=it-1),it):--rt=0?(it>0&&(tt.lastNeed=it-2),it):--rt=0?(it>0&&(it===2?it=0:tt.lastNeed=it-3),it):0))}function utf8CheckExtraBytes(tt,et,nt){if((et[0]&192)!==128)return tt.lastNeed=0,"�";if(tt.lastNeed>1&&et.length>1){if((et[1]&192)!==128)return tt.lastNeed=1,"�";if(tt.lastNeed>2&&et.length>2&&(et[2]&192)!==128)return tt.lastNeed=2,"�"}}function utf8FillLast(tt){var et=this.lastTotal-this.lastNeed,nt=utf8CheckExtraBytes(this,tt);if(nt!==void 0)return nt;if(this.lastNeed<=tt.length)return tt.copy(this.lastChar,et,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);tt.copy(this.lastChar,et,0,tt.length),this.lastNeed-=tt.length}function utf8Text(tt,et){var nt=utf8CheckIncomplete(this,tt,et);if(!this.lastNeed)return tt.toString("utf8",et);this.lastTotal=nt;var rt=tt.length-(nt-this.lastNeed);return tt.copy(this.lastChar,0,rt),tt.toString("utf8",et,rt)}function utf8End(tt){var et=tt&&tt.length?this.write(tt):"";return this.lastNeed?et+"�":et}function utf16Text(tt,et){if((tt.length-et)%2===0){var nt=tt.toString("utf16le",et);if(nt){var rt=nt.charCodeAt(nt.length-1);if(rt>=55296&&rt<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=tt[tt.length-2],this.lastChar[1]=tt[tt.length-1],nt.slice(0,-1)}return nt}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=tt[tt.length-1],tt.toString("utf16le",et,tt.length-1)}function utf16End(tt){var et=tt&&tt.length?this.write(tt):"";if(this.lastNeed){var nt=this.lastTotal-this.lastNeed;return et+this.lastChar.toString("utf16le",0,nt)}return et}function base64Text(tt,et){var nt=(tt.length-et)%3;return nt===0?tt.toString("base64",et):(this.lastNeed=3-nt,this.lastTotal=3,nt===1?this.lastChar[0]=tt[tt.length-1]:(this.lastChar[0]=tt[tt.length-2],this.lastChar[1]=tt[tt.length-1]),tt.toString("base64",et,tt.length-nt))}function base64End(tt){var et=tt&&tt.length?this.write(tt):"";return this.lastNeed?et+this.lastChar.toString("base64",0,3-this.lastNeed):et}function simpleWrite(tt){return tt.toString(this.encoding)}function simpleEnd(tt){return tt&&tt.length?this.write(tt):""}var ERR_STREAM_PREMATURE_CLOSE=errorsBrowser.codes.ERR_STREAM_PREMATURE_CLOSE;function once$1(tt){var et=!1;return function(){if(!et){et=!0;for(var nt=arguments.length,rt=new Array(nt),it=0;it0)if(typeof Qt!="string"&&!Nn.objectMode&&Object.getPrototypeOf(Qt)!==rt.prototype&&(Qt=ot(Qt)),Pn)Nn.endEmitted?St(an,new bt):jt(an,Nn,Qt,!0);else if(Nn.ended)St(an,new gt);else{if(Nn.destroyed)return!1;Nn.reading=!1,Nn.decoder&&!_n?(Qt=Nn.decoder.write(Qt),Nn.objectMode||Qt.length!==0?jt(an,Nn,Qt,!1):Ft(an,Nn)):jt(an,Nn,Qt,!1)}else Pn||(Nn.reading=!1,Ft(an,Nn))}return!Nn.ended&&(Nn.length=Ct?an=Ct:(an--,an|=an>>>1,an|=an>>>2,an|=an>>>4,an|=an>>>8,an|=an>>>16,an++),an}function It(an,Qt){return an<=0||Qt.length===0&&Qt.ended?0:Qt.objectMode?1:an!==an?Qt.flowing&&Qt.length?Qt.buffer.head.data.length:Qt.length:(an>Qt.highWaterMark&&(Qt.highWaterMark=wt(an)),an<=Qt.length?an:Qt.ended?Qt.length:(Qt.needReadable=!0,0))}$t.prototype.read=function(an){lt("read",an),an=parseInt(an,10);var Qt=this._readableState,_n=an;if(an!==0&&(Qt.emittedReadable=!1),an===0&&Qt.needReadable&&((Qt.highWaterMark!==0?Qt.length>=Qt.highWaterMark:Qt.length>0)||Qt.ended))return lt("read: emitReadable",Qt.length,Qt.ended),Qt.length===0&&Qt.ended?nn(this):Wt(this),null;if(an=It(an,Qt),an===0&&Qt.ended)return Qt.length===0&&nn(this),null;var Pn=Qt.needReadable;lt("need readable",Pn),(Qt.length===0||Qt.length-an0?$n=rn(an,Qt):$n=null,$n===null?(Qt.needReadable=Qt.length<=Qt.highWaterMark,an=0):(Qt.length-=an,Qt.awaitDrain=0),Qt.length===0&&(Qt.ended||(Qt.needReadable=!0),_n!==an&&Qt.ended&&nn(this)),$n!==null&&this.emit("data",$n),$n};function Ot(an,Qt){if(lt("onEofChunk"),!Qt.ended){if(Qt.decoder){var _n=Qt.decoder.end();_n&&_n.length&&(Qt.buffer.push(_n),Qt.length+=Qt.objectMode?1:_n.length)}Qt.ended=!0,Qt.sync?Wt(an):(Qt.needReadable=!1,Qt.emittedReadable||(Qt.emittedReadable=!0,zt(an)))}}function Wt(an){var Qt=an._readableState;lt("emitReadable",Qt.needReadable,Qt.emittedReadable),Qt.needReadable=!1,Qt.emittedReadable||(lt("emitReadable",Qt.flowing),Qt.emittedReadable=!0,process.nextTick(zt,an))}function zt(an){var Qt=an._readableState;lt("emitReadable_",Qt.destroyed,Qt.length,Qt.ended),!Qt.destroyed&&(Qt.length||Qt.ended)&&(an.emit("readable"),Qt.emittedReadable=!1),Qt.needReadable=!Qt.flowing&&!Qt.ended&&Qt.length<=Qt.highWaterMark,Kt(an)}function Ft(an,Qt){Qt.readingMore||(Qt.readingMore=!0,process.nextTick(Nt,an,Qt))}function Nt(an,Qt){for(;!Qt.reading&&!Qt.ended&&(Qt.length1&&vn(Pn.pipes,an)!==-1)&&!In&&(lt("false write response, pause",Pn.awaitDrain),Pn.awaitDrain++),_n.pause())}function fn(un){lt("onerror",un),Dn(),an.removeListener("error",fn),et(an,"error")===0&&St(an,un)}At(an,"error",fn);function pn(){an.removeListener("finish",kn),Dn()}an.once("close",pn);function kn(){lt("onfinish"),an.removeListener("close",pn),Dn()}an.once("finish",kn);function Dn(){lt("unpipe"),_n.unpipe(an)}return an.emit("pipe",_n),Pn.flowing||(lt("pipe resume"),_n.resume()),an};function Ut(an){return function(){var _n=an._readableState;lt("pipeOnDrain",_n.awaitDrain),_n.awaitDrain&&_n.awaitDrain--,_n.awaitDrain===0&&et(an,"data")&&(_n.flowing=!0,Kt(an))}}$t.prototype.unpipe=function(an){var Qt=this._readableState,_n={hasUnpiped:!1};if(Qt.pipesCount===0)return this;if(Qt.pipesCount===1)return an&&an!==Qt.pipes?this:(an||(an=Qt.pipes),Qt.pipes=null,Qt.pipesCount=0,Qt.flowing=!1,an&&an.emit("unpipe",this,_n),this);if(!an){var Pn=Qt.pipes,$n=Qt.pipesCount;Qt.pipes=null,Qt.pipesCount=0,Qt.flowing=!1;for(var Nn=0;Nn<$n;Nn++)Pn[Nn].emit("unpipe",this,{hasUnpiped:!1});return this}var Tn=vn(Qt.pipes,an);return Tn===-1?this:(Qt.pipes.splice(Tn,1),Qt.pipesCount-=1,Qt.pipesCount===1&&(Qt.pipes=Qt.pipes[0]),an.emit("unpipe",this,_n),this)},$t.prototype.on=function(an,Qt){var _n=nt.prototype.on.call(this,an,Qt),Pn=this._readableState;return an==="data"?(Pn.readableListening=this.listenerCount("readable")>0,Pn.flowing!==!1&&this.resume()):an==="readable"&&!Pn.endEmitted&&!Pn.readableListening&&(Pn.readableListening=Pn.needReadable=!0,Pn.flowing=!1,Pn.emittedReadable=!1,lt("on readable",Pn.length,Pn.reading),Pn.length?Wt(this):Pn.reading||process.nextTick(Ht,this)),_n},$t.prototype.addListener=$t.prototype.on,$t.prototype.removeListener=function(an,Qt){var _n=nt.prototype.removeListener.call(this,an,Qt);return an==="readable"&&process.nextTick(Mt,this),_n},$t.prototype.removeAllListeners=function(an){var Qt=nt.prototype.removeAllListeners.apply(this,arguments);return(an==="readable"||an===void 0)&&process.nextTick(Mt,this),Qt};function Mt(an){var Qt=an._readableState;Qt.readableListening=an.listenerCount("readable")>0,Qt.resumeScheduled&&!Qt.paused?Qt.flowing=!0:an.listenerCount("data")>0&&an.resume()}function Ht(an){lt("readable nexttick read 0"),an.read(0)}$t.prototype.resume=function(){var an=this._readableState;return an.flowing||(lt("resume"),an.flowing=!an.readableListening,en(this,an)),an.paused=!1,this};function en(an,Qt){Qt.resumeScheduled||(Qt.resumeScheduled=!0,process.nextTick(sn,an,Qt))}function sn(an,Qt){lt("resume",Qt.reading),Qt.reading||an.read(0),Qt.resumeScheduled=!1,an.emit("resume"),Kt(an),Qt.flowing&&!Qt.reading&&an.read(0)}$t.prototype.pause=function(){return lt("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(lt("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function Kt(an){var Qt=an._readableState;for(lt("flow",Qt.flowing);Qt.flowing&&an.read()!==null;);}$t.prototype.wrap=function(an){var Qt=this,_n=this._readableState,Pn=!1;an.on("end",function(){if(lt("wrapped end"),_n.decoder&&!_n.ended){var Tn=_n.decoder.end();Tn&&Tn.length&&Qt.push(Tn)}Qt.push(null)}),an.on("data",function(Tn){if(lt("wrapped data"),_n.decoder&&(Tn=_n.decoder.write(Tn)),!(_n.objectMode&&Tn==null)&&!(!_n.objectMode&&(!Tn||!Tn.length))){var cn=Qt.push(Tn);cn||(Pn=!0,an.pause())}});for(var $n in an)this[$n]===void 0&&typeof an[$n]=="function"&&(this[$n]=function(cn){return function(){return an[cn].apply(an,arguments)}}($n));for(var Nn=0;Nn=Qt.length?(Qt.decoder?_n=Qt.buffer.join(""):Qt.buffer.length===1?_n=Qt.buffer.first():_n=Qt.buffer.concat(Qt.length),Qt.buffer.clear()):_n=Qt.buffer.consume(an,Qt.decoder),_n}function nn(an){var Qt=an._readableState;lt("endReadable",Qt.endEmitted),Qt.endEmitted||(Qt.ended=!0,process.nextTick(hn,Qt,an))}function hn(an,Qt){if(lt("endReadableNT",an.endEmitted,an.length),!an.endEmitted&&an.length===0&&(an.endEmitted=!0,Qt.readable=!1,Qt.emit("end"),an.autoDestroy)){var _n=Qt._writableState;(!_n||_n.autoDestroy&&_n.finished)&&Qt.destroy()}}typeof Symbol=="function"&&($t.from=function(an,Qt){return kt===void 0&&(kt=requireFromBrowser()),kt($t,an,Qt)});function vn(an,Qt){for(var _n=0,Pn=an.length;_n0;return destroyer(at,lt,ct,function(ut){it||(it=ut),ut&&ot.forEach(call),!lt&&(ot.forEach(call),rt(it))})});return et.reduce(pipe$1)}var pipeline_1=pipeline;(function(tt,et){et=tt.exports=require_stream_readable(),et.Stream=et,et.Readable=et,et.Writable=require_stream_writable(),et.Duplex=require_stream_duplex(),et.Transform=_stream_transform,et.PassThrough=_stream_passthrough,et.finished=endOfStream,et.pipeline=pipeline_1})(readableBrowser,readableBrowser.exports);var readableBrowserExports=readableBrowser.exports,Buffer$F=safeBufferExports.Buffer,Transform$6=readableBrowserExports.Transform,inherits$v=inherits_browserExports;function throwIfNotStringOrBuffer(tt,et){if(!Buffer$F.isBuffer(tt)&&typeof tt!="string")throw new TypeError(et+" must be a string or a buffer")}function HashBase$2(tt){Transform$6.call(this),this._block=Buffer$F.allocUnsafe(tt),this._blockSize=tt,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}inherits$v(HashBase$2,Transform$6);HashBase$2.prototype._transform=function(tt,et,nt){var rt=null;try{this.update(tt,et)}catch(it){rt=it}nt(rt)};HashBase$2.prototype._flush=function(tt){var et=null;try{this.push(this.digest())}catch(nt){et=nt}tt(et)};HashBase$2.prototype.update=function(tt,et){if(throwIfNotStringOrBuffer(tt,"Data"),this._finalized)throw new Error("Digest already called");Buffer$F.isBuffer(tt)||(tt=Buffer$F.from(tt,et));for(var nt=this._block,rt=0;this._blockOffset+tt.length-rt>=this._blockSize;){for(var it=this._blockOffset;it0;++ot)this._length[ot]+=at,at=this._length[ot]/4294967296|0,at>0&&(this._length[ot]-=4294967296*at);return this};HashBase$2.prototype._update=function(){throw new Error("_update is not implemented")};HashBase$2.prototype.digest=function(tt){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var et=this._digest();tt!==void 0&&(et=et.toString(tt)),this._block.fill(0),this._blockOffset=0;for(var nt=0;nt<4;++nt)this._length[nt]=0;return et};HashBase$2.prototype._digest=function(){throw new Error("_digest is not implemented")};var hashBase=HashBase$2,inherits$u=inherits_browserExports,HashBase$1=hashBase,Buffer$E=safeBufferExports.Buffer,ARRAY16$1=new Array(16);function MD5$3(){HashBase$1.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}inherits$u(MD5$3,HashBase$1);MD5$3.prototype._update=function(){for(var tt=ARRAY16$1,et=0;et<16;++et)tt[et]=this._block.readInt32LE(et*4);var nt=this._a,rt=this._b,it=this._c,ot=this._d;nt=fnF(nt,rt,it,ot,tt[0],3614090360,7),ot=fnF(ot,nt,rt,it,tt[1],3905402710,12),it=fnF(it,ot,nt,rt,tt[2],606105819,17),rt=fnF(rt,it,ot,nt,tt[3],3250441966,22),nt=fnF(nt,rt,it,ot,tt[4],4118548399,7),ot=fnF(ot,nt,rt,it,tt[5],1200080426,12),it=fnF(it,ot,nt,rt,tt[6],2821735955,17),rt=fnF(rt,it,ot,nt,tt[7],4249261313,22),nt=fnF(nt,rt,it,ot,tt[8],1770035416,7),ot=fnF(ot,nt,rt,it,tt[9],2336552879,12),it=fnF(it,ot,nt,rt,tt[10],4294925233,17),rt=fnF(rt,it,ot,nt,tt[11],2304563134,22),nt=fnF(nt,rt,it,ot,tt[12],1804603682,7),ot=fnF(ot,nt,rt,it,tt[13],4254626195,12),it=fnF(it,ot,nt,rt,tt[14],2792965006,17),rt=fnF(rt,it,ot,nt,tt[15],1236535329,22),nt=fnG(nt,rt,it,ot,tt[1],4129170786,5),ot=fnG(ot,nt,rt,it,tt[6],3225465664,9),it=fnG(it,ot,nt,rt,tt[11],643717713,14),rt=fnG(rt,it,ot,nt,tt[0],3921069994,20),nt=fnG(nt,rt,it,ot,tt[5],3593408605,5),ot=fnG(ot,nt,rt,it,tt[10],38016083,9),it=fnG(it,ot,nt,rt,tt[15],3634488961,14),rt=fnG(rt,it,ot,nt,tt[4],3889429448,20),nt=fnG(nt,rt,it,ot,tt[9],568446438,5),ot=fnG(ot,nt,rt,it,tt[14],3275163606,9),it=fnG(it,ot,nt,rt,tt[3],4107603335,14),rt=fnG(rt,it,ot,nt,tt[8],1163531501,20),nt=fnG(nt,rt,it,ot,tt[13],2850285829,5),ot=fnG(ot,nt,rt,it,tt[2],4243563512,9),it=fnG(it,ot,nt,rt,tt[7],1735328473,14),rt=fnG(rt,it,ot,nt,tt[12],2368359562,20),nt=fnH(nt,rt,it,ot,tt[5],4294588738,4),ot=fnH(ot,nt,rt,it,tt[8],2272392833,11),it=fnH(it,ot,nt,rt,tt[11],1839030562,16),rt=fnH(rt,it,ot,nt,tt[14],4259657740,23),nt=fnH(nt,rt,it,ot,tt[1],2763975236,4),ot=fnH(ot,nt,rt,it,tt[4],1272893353,11),it=fnH(it,ot,nt,rt,tt[7],4139469664,16),rt=fnH(rt,it,ot,nt,tt[10],3200236656,23),nt=fnH(nt,rt,it,ot,tt[13],681279174,4),ot=fnH(ot,nt,rt,it,tt[0],3936430074,11),it=fnH(it,ot,nt,rt,tt[3],3572445317,16),rt=fnH(rt,it,ot,nt,tt[6],76029189,23),nt=fnH(nt,rt,it,ot,tt[9],3654602809,4),ot=fnH(ot,nt,rt,it,tt[12],3873151461,11),it=fnH(it,ot,nt,rt,tt[15],530742520,16),rt=fnH(rt,it,ot,nt,tt[2],3299628645,23),nt=fnI(nt,rt,it,ot,tt[0],4096336452,6),ot=fnI(ot,nt,rt,it,tt[7],1126891415,10),it=fnI(it,ot,nt,rt,tt[14],2878612391,15),rt=fnI(rt,it,ot,nt,tt[5],4237533241,21),nt=fnI(nt,rt,it,ot,tt[12],1700485571,6),ot=fnI(ot,nt,rt,it,tt[3],2399980690,10),it=fnI(it,ot,nt,rt,tt[10],4293915773,15),rt=fnI(rt,it,ot,nt,tt[1],2240044497,21),nt=fnI(nt,rt,it,ot,tt[8],1873313359,6),ot=fnI(ot,nt,rt,it,tt[15],4264355552,10),it=fnI(it,ot,nt,rt,tt[6],2734768916,15),rt=fnI(rt,it,ot,nt,tt[13],1309151649,21),nt=fnI(nt,rt,it,ot,tt[4],4149444226,6),ot=fnI(ot,nt,rt,it,tt[11],3174756917,10),it=fnI(it,ot,nt,rt,tt[2],718787259,15),rt=fnI(rt,it,ot,nt,tt[9],3951481745,21),this._a=this._a+nt|0,this._b=this._b+rt|0,this._c=this._c+it|0,this._d=this._d+ot|0};MD5$3.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var tt=Buffer$E.allocUnsafe(16);return tt.writeInt32LE(this._a,0),tt.writeInt32LE(this._b,4),tt.writeInt32LE(this._c,8),tt.writeInt32LE(this._d,12),tt};function rotl$3(tt,et){return tt<>>32-et}function fnF(tt,et,nt,rt,it,ot,at){return rotl$3(tt+(et&nt|~et&rt)+it+ot|0,at)+et|0}function fnG(tt,et,nt,rt,it,ot,at){return rotl$3(tt+(et&rt|nt&~rt)+it+ot|0,at)+et|0}function fnH(tt,et,nt,rt,it,ot,at){return rotl$3(tt+(et^nt^rt)+it+ot|0,at)+et|0}function fnI(tt,et,nt,rt,it,ot,at){return rotl$3(tt+(nt^(et|~rt))+it+ot|0,at)+et|0}var md5_js=MD5$3,Buffer$D=buffer$2.Buffer,inherits$t=inherits_browserExports,HashBase=hashBase,ARRAY16=new Array(16),zl=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],zr=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],sl=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],sr=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11],hl=[0,1518500249,1859775393,2400959708,2840853838],hr=[1352829926,1548603684,1836072691,2053994217,0];function RIPEMD160$5(){HashBase.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}inherits$t(RIPEMD160$5,HashBase);RIPEMD160$5.prototype._update=function(){for(var tt=ARRAY16,et=0;et<16;++et)tt[et]=this._block.readInt32LE(et*4);for(var nt=this._a|0,rt=this._b|0,it=this._c|0,ot=this._d|0,at=this._e|0,st=this._a|0,lt=this._b|0,ct=this._c|0,ut=this._d|0,ht=this._e|0,dt=0;dt<80;dt+=1){var pt,mt;dt<16?(pt=fn1(nt,rt,it,ot,at,tt[zl[dt]],hl[0],sl[dt]),mt=fn5(st,lt,ct,ut,ht,tt[zr[dt]],hr[0],sr[dt])):dt<32?(pt=fn2(nt,rt,it,ot,at,tt[zl[dt]],hl[1],sl[dt]),mt=fn4(st,lt,ct,ut,ht,tt[zr[dt]],hr[1],sr[dt])):dt<48?(pt=fn3(nt,rt,it,ot,at,tt[zl[dt]],hl[2],sl[dt]),mt=fn3(st,lt,ct,ut,ht,tt[zr[dt]],hr[2],sr[dt])):dt<64?(pt=fn4(nt,rt,it,ot,at,tt[zl[dt]],hl[3],sl[dt]),mt=fn2(st,lt,ct,ut,ht,tt[zr[dt]],hr[3],sr[dt])):(pt=fn5(nt,rt,it,ot,at,tt[zl[dt]],hl[4],sl[dt]),mt=fn1(st,lt,ct,ut,ht,tt[zr[dt]],hr[4],sr[dt])),nt=at,at=ot,ot=rotl$2(it,10),it=rt,rt=pt,st=ht,ht=ut,ut=rotl$2(ct,10),ct=lt,lt=mt}var gt=this._b+it+ut|0;this._b=this._c+ot+ht|0,this._c=this._d+at+st|0,this._d=this._e+nt+lt|0,this._e=this._a+rt+ct|0,this._a=gt};RIPEMD160$5.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var tt=Buffer$D.alloc?Buffer$D.alloc(20):new Buffer$D(20);return tt.writeInt32LE(this._a,0),tt.writeInt32LE(this._b,4),tt.writeInt32LE(this._c,8),tt.writeInt32LE(this._d,12),tt.writeInt32LE(this._e,16),tt};function rotl$2(tt,et){return tt<>>32-et}function fn1(tt,et,nt,rt,it,ot,at,st){return rotl$2(tt+(et^nt^rt)+ot+at|0,st)+it|0}function fn2(tt,et,nt,rt,it,ot,at,st){return rotl$2(tt+(et&nt|~et&rt)+ot+at|0,st)+it|0}function fn3(tt,et,nt,rt,it,ot,at,st){return rotl$2(tt+((et|~nt)^rt)+ot+at|0,st)+it|0}function fn4(tt,et,nt,rt,it,ot,at,st){return rotl$2(tt+(et&rt|nt&~rt)+ot+at|0,st)+it|0}function fn5(tt,et,nt,rt,it,ot,at,st){return rotl$2(tt+(et^(nt|~rt))+ot+at|0,st)+it|0}var ripemd160$1=RIPEMD160$5,sha_js={exports:{}},Buffer$C=safeBufferExports.Buffer;function Hash$9(tt,et){this._block=Buffer$C.alloc(tt),this._finalSize=et,this._blockSize=tt,this._len=0}Hash$9.prototype.update=function(tt,et){typeof tt=="string"&&(et=et||"utf8",tt=Buffer$C.from(tt,et));for(var nt=this._block,rt=this._blockSize,it=tt.length,ot=this._len,at=0;at=this._finalSize&&(this._update(this._block),this._block.fill(0));var nt=this._len*8;if(nt<=4294967295)this._block.writeUInt32BE(nt,this._blockSize-4);else{var rt=(nt&4294967295)>>>0,it=(nt-rt)/4294967296;this._block.writeUInt32BE(it,this._blockSize-8),this._block.writeUInt32BE(rt,this._blockSize-4)}this._update(this._block);var ot=this._hash();return tt?ot.toString(tt):ot};Hash$9.prototype._update=function(){throw new Error("_update must be implemented by subclass")};var hash$4=Hash$9,inherits$s=inherits_browserExports,Hash$8=hash$4,Buffer$B=safeBufferExports.Buffer,K$4=[1518500249,1859775393,-1894007588,-899497514],W$5=new Array(80);function Sha(){this.init(),this._w=W$5,Hash$8.call(this,64,56)}inherits$s(Sha,Hash$8);Sha.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this};function rotl5$1(tt){return tt<<5|tt>>>27}function rotl30$1(tt){return tt<<30|tt>>>2}function ft$1(tt,et,nt,rt){return tt===0?et&nt|~et&rt:tt===2?et&nt|et&rt|nt&rt:et^nt^rt}Sha.prototype._update=function(tt){for(var et=this._w,nt=this._a|0,rt=this._b|0,it=this._c|0,ot=this._d|0,at=this._e|0,st=0;st<16;++st)et[st]=tt.readInt32BE(st*4);for(;st<80;++st)et[st]=et[st-3]^et[st-8]^et[st-14]^et[st-16];for(var lt=0;lt<80;++lt){var ct=~~(lt/20),ut=rotl5$1(nt)+ft$1(ct,rt,it,ot)+at+et[lt]+K$4[ct]|0;at=ot,ot=it,it=rotl30$1(rt),rt=nt,nt=ut}this._a=nt+this._a|0,this._b=rt+this._b|0,this._c=it+this._c|0,this._d=ot+this._d|0,this._e=at+this._e|0};Sha.prototype._hash=function(){var tt=Buffer$B.allocUnsafe(20);return tt.writeInt32BE(this._a|0,0),tt.writeInt32BE(this._b|0,4),tt.writeInt32BE(this._c|0,8),tt.writeInt32BE(this._d|0,12),tt.writeInt32BE(this._e|0,16),tt};var sha$4=Sha,inherits$r=inherits_browserExports,Hash$7=hash$4,Buffer$A=safeBufferExports.Buffer,K$3=[1518500249,1859775393,-1894007588,-899497514],W$4=new Array(80);function Sha1(){this.init(),this._w=W$4,Hash$7.call(this,64,56)}inherits$r(Sha1,Hash$7);Sha1.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this};function rotl1(tt){return tt<<1|tt>>>31}function rotl5(tt){return tt<<5|tt>>>27}function rotl30(tt){return tt<<30|tt>>>2}function ft(tt,et,nt,rt){return tt===0?et&nt|~et&rt:tt===2?et&nt|et&rt|nt&rt:et^nt^rt}Sha1.prototype._update=function(tt){for(var et=this._w,nt=this._a|0,rt=this._b|0,it=this._c|0,ot=this._d|0,at=this._e|0,st=0;st<16;++st)et[st]=tt.readInt32BE(st*4);for(;st<80;++st)et[st]=rotl1(et[st-3]^et[st-8]^et[st-14]^et[st-16]);for(var lt=0;lt<80;++lt){var ct=~~(lt/20),ut=rotl5(nt)+ft(ct,rt,it,ot)+at+et[lt]+K$3[ct]|0;at=ot,ot=it,it=rotl30(rt),rt=nt,nt=ut}this._a=nt+this._a|0,this._b=rt+this._b|0,this._c=it+this._c|0,this._d=ot+this._d|0,this._e=at+this._e|0};Sha1.prototype._hash=function(){var tt=Buffer$A.allocUnsafe(20);return tt.writeInt32BE(this._a|0,0),tt.writeInt32BE(this._b|0,4),tt.writeInt32BE(this._c|0,8),tt.writeInt32BE(this._d|0,12),tt.writeInt32BE(this._e|0,16),tt};var sha1$1=Sha1,inherits$q=inherits_browserExports,Hash$6=hash$4,Buffer$z=safeBufferExports.Buffer,K$2=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],W$3=new Array(64);function Sha256$1(){this.init(),this._w=W$3,Hash$6.call(this,64,56)}inherits$q(Sha256$1,Hash$6);Sha256$1.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this};function ch(tt,et,nt){return nt^tt&(et^nt)}function maj$1(tt,et,nt){return tt&et|nt&(tt|et)}function sigma0$1(tt){return(tt>>>2|tt<<30)^(tt>>>13|tt<<19)^(tt>>>22|tt<<10)}function sigma1$1(tt){return(tt>>>6|tt<<26)^(tt>>>11|tt<<21)^(tt>>>25|tt<<7)}function gamma0(tt){return(tt>>>7|tt<<25)^(tt>>>18|tt<<14)^tt>>>3}function gamma1(tt){return(tt>>>17|tt<<15)^(tt>>>19|tt<<13)^tt>>>10}Sha256$1.prototype._update=function(tt){for(var et=this._w,nt=this._a|0,rt=this._b|0,it=this._c|0,ot=this._d|0,at=this._e|0,st=this._f|0,lt=this._g|0,ct=this._h|0,ut=0;ut<16;++ut)et[ut]=tt.readInt32BE(ut*4);for(;ut<64;++ut)et[ut]=gamma1(et[ut-2])+et[ut-7]+gamma0(et[ut-15])+et[ut-16]|0;for(var ht=0;ht<64;++ht){var dt=ct+sigma1$1(at)+ch(at,st,lt)+K$2[ht]+et[ht]|0,pt=sigma0$1(nt)+maj$1(nt,rt,it)|0;ct=lt,lt=st,st=at,at=ot+dt|0,ot=it,it=rt,rt=nt,nt=dt+pt|0}this._a=nt+this._a|0,this._b=rt+this._b|0,this._c=it+this._c|0,this._d=ot+this._d|0,this._e=at+this._e|0,this._f=st+this._f|0,this._g=lt+this._g|0,this._h=ct+this._h|0};Sha256$1.prototype._hash=function(){var tt=Buffer$z.allocUnsafe(32);return tt.writeInt32BE(this._a,0),tt.writeInt32BE(this._b,4),tt.writeInt32BE(this._c,8),tt.writeInt32BE(this._d,12),tt.writeInt32BE(this._e,16),tt.writeInt32BE(this._f,20),tt.writeInt32BE(this._g,24),tt.writeInt32BE(this._h,28),tt};var sha256$4=Sha256$1,inherits$p=inherits_browserExports,Sha256=sha256$4,Hash$5=hash$4,Buffer$y=safeBufferExports.Buffer,W$2=new Array(64);function Sha224(){this.init(),this._w=W$2,Hash$5.call(this,64,56)}inherits$p(Sha224,Sha256);Sha224.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this};Sha224.prototype._hash=function(){var tt=Buffer$y.allocUnsafe(28);return tt.writeInt32BE(this._a,0),tt.writeInt32BE(this._b,4),tt.writeInt32BE(this._c,8),tt.writeInt32BE(this._d,12),tt.writeInt32BE(this._e,16),tt.writeInt32BE(this._f,20),tt.writeInt32BE(this._g,24),tt};var sha224$1=Sha224,inherits$o=inherits_browserExports,Hash$4=hash$4,Buffer$x=safeBufferExports.Buffer,K$1=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],W$1=new Array(160);function Sha512(){this.init(),this._w=W$1,Hash$4.call(this,128,112)}inherits$o(Sha512,Hash$4);Sha512.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this};function Ch(tt,et,nt){return nt^tt&(et^nt)}function maj(tt,et,nt){return tt&et|nt&(tt|et)}function sigma0(tt,et){return(tt>>>28|et<<4)^(et>>>2|tt<<30)^(et>>>7|tt<<25)}function sigma1(tt,et){return(tt>>>14|et<<18)^(tt>>>18|et<<14)^(et>>>9|tt<<23)}function Gamma0(tt,et){return(tt>>>1|et<<31)^(tt>>>8|et<<24)^tt>>>7}function Gamma0l(tt,et){return(tt>>>1|et<<31)^(tt>>>8|et<<24)^(tt>>>7|et<<25)}function Gamma1(tt,et){return(tt>>>19|et<<13)^(et>>>29|tt<<3)^tt>>>6}function Gamma1l(tt,et){return(tt>>>19|et<<13)^(et>>>29|tt<<3)^(tt>>>6|et<<26)}function getCarry(tt,et){return tt>>>0>>0?1:0}Sha512.prototype._update=function(tt){for(var et=this._w,nt=this._ah|0,rt=this._bh|0,it=this._ch|0,ot=this._dh|0,at=this._eh|0,st=this._fh|0,lt=this._gh|0,ct=this._hh|0,ut=this._al|0,ht=this._bl|0,dt=this._cl|0,pt=this._dl|0,mt=this._el|0,gt=this._fl|0,yt=this._gl|0,bt=this._hl|0,vt=0;vt<32;vt+=2)et[vt]=tt.readInt32BE(vt*4),et[vt+1]=tt.readInt32BE(vt*4+4);for(;vt<160;vt+=2){var xt=et[vt-30],kt=et[vt-15*2+1],St=Gamma0(xt,kt),Tt=Gamma0l(kt,xt);xt=et[vt-2*2],kt=et[vt-2*2+1];var At=Gamma1(xt,kt),Et=Gamma1l(kt,xt),$t=et[vt-7*2],Dt=et[vt-7*2+1],jt=et[vt-16*2],Pt=et[vt-16*2+1],Ct=Tt+Dt|0,wt=St+$t+getCarry(Ct,Tt)|0;Ct=Ct+Et|0,wt=wt+At+getCarry(Ct,Et)|0,Ct=Ct+Pt|0,wt=wt+jt+getCarry(Ct,Pt)|0,et[vt]=wt,et[vt+1]=Ct}for(var It=0;It<160;It+=2){wt=et[It],Ct=et[It+1];var Ot=maj(nt,rt,it),Wt=maj(ut,ht,dt),zt=sigma0(nt,ut),Ft=sigma0(ut,nt),Nt=sigma1(at,mt),Ut=sigma1(mt,at),Mt=K$1[It],Ht=K$1[It+1],en=Ch(at,st,lt),sn=Ch(mt,gt,yt),Kt=bt+Ut|0,rn=ct+Nt+getCarry(Kt,bt)|0;Kt=Kt+sn|0,rn=rn+en+getCarry(Kt,sn)|0,Kt=Kt+Ht|0,rn=rn+Mt+getCarry(Kt,Ht)|0,Kt=Kt+Ct|0,rn=rn+wt+getCarry(Kt,Ct)|0;var nn=Ft+Wt|0,hn=zt+Ot+getCarry(nn,Ft)|0;ct=lt,bt=yt,lt=st,yt=gt,st=at,gt=mt,mt=pt+Kt|0,at=ot+rn+getCarry(mt,pt)|0,ot=it,pt=dt,it=rt,dt=ht,rt=nt,ht=ut,ut=Kt+nn|0,nt=rn+hn+getCarry(ut,Kt)|0}this._al=this._al+ut|0,this._bl=this._bl+ht|0,this._cl=this._cl+dt|0,this._dl=this._dl+pt|0,this._el=this._el+mt|0,this._fl=this._fl+gt|0,this._gl=this._gl+yt|0,this._hl=this._hl+bt|0,this._ah=this._ah+nt+getCarry(this._al,ut)|0,this._bh=this._bh+rt+getCarry(this._bl,ht)|0,this._ch=this._ch+it+getCarry(this._cl,dt)|0,this._dh=this._dh+ot+getCarry(this._dl,pt)|0,this._eh=this._eh+at+getCarry(this._el,mt)|0,this._fh=this._fh+st+getCarry(this._fl,gt)|0,this._gh=this._gh+lt+getCarry(this._gl,yt)|0,this._hh=this._hh+ct+getCarry(this._hl,bt)|0};Sha512.prototype._hash=function(){var tt=Buffer$x.allocUnsafe(64);function et(nt,rt,it){tt.writeInt32BE(nt,it),tt.writeInt32BE(rt,it+4)}return et(this._ah,this._al,0),et(this._bh,this._bl,8),et(this._ch,this._cl,16),et(this._dh,this._dl,24),et(this._eh,this._el,32),et(this._fh,this._fl,40),et(this._gh,this._gl,48),et(this._hh,this._hl,56),tt};var sha512$1=Sha512,inherits$n=inherits_browserExports,SHA512$2=sha512$1,Hash$3=hash$4,Buffer$w=safeBufferExports.Buffer,W=new Array(160);function Sha384(){this.init(),this._w=W,Hash$3.call(this,128,112)}inherits$n(Sha384,SHA512$2);Sha384.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this};Sha384.prototype._hash=function(){var tt=Buffer$w.allocUnsafe(48);function et(nt,rt,it){tt.writeInt32BE(nt,it),tt.writeInt32BE(rt,it+4)}return et(this._ah,this._al,0),et(this._bh,this._bl,8),et(this._ch,this._cl,16),et(this._dh,this._dl,24),et(this._eh,this._el,32),et(this._fh,this._fl,40),tt};var sha384$1=Sha384,exports=sha_js.exports=function(et){et=et.toLowerCase();var nt=exports[et];if(!nt)throw new Error(et+" is not supported (we accept pull requests)");return new nt};exports.sha=sha$4;exports.sha1=sha1$1;exports.sha224=sha224$1;exports.sha256=sha256$4;exports.sha384=sha384$1;exports.sha512=sha512$1;var sha_jsExports=sha_js.exports,streamBrowserify=Stream,EE=eventsExports.EventEmitter,inherits$m=inherits_browserExports;inherits$m(Stream,EE);Stream.Readable=require_stream_readable();Stream.Writable=require_stream_writable();Stream.Duplex=require_stream_duplex();Stream.Transform=_stream_transform;Stream.PassThrough=_stream_passthrough;Stream.finished=endOfStream;Stream.pipeline=pipeline_1;Stream.Stream=Stream;function Stream(){EE.call(this)}Stream.prototype.pipe=function(tt,et){var nt=this;function rt(ut){tt.writable&&tt.write(ut)===!1&&nt.pause&&nt.pause()}nt.on("data",rt);function it(){nt.readable&&nt.resume&&nt.resume()}tt.on("drain",it),!tt._isStdio&&(!et||et.end!==!1)&&(nt.on("end",at),nt.on("close",st));var ot=!1;function at(){ot||(ot=!0,tt.end())}function st(){ot||(ot=!0,typeof tt.destroy=="function"&&tt.destroy())}function lt(ut){if(ct(),EE.listenerCount(this,"error")===0)throw ut}nt.on("error",lt),tt.on("error",lt);function ct(){nt.removeListener("data",rt),tt.removeListener("drain",it),nt.removeListener("end",at),nt.removeListener("close",st),nt.removeListener("error",lt),tt.removeListener("error",lt),nt.removeListener("end",ct),nt.removeListener("close",ct),tt.removeListener("close",ct)}return nt.on("end",ct),nt.on("close",ct),tt.on("close",ct),tt.emit("pipe",nt),tt};var Buffer$v=safeBufferExports.Buffer,Transform$5=streamBrowserify.Transform,StringDecoder=string_decoder.StringDecoder,inherits$l=inherits_browserExports;function CipherBase$1(tt){Transform$5.call(this),this.hashMode=typeof tt=="string",this.hashMode?this[tt]=this._finalOrDigest:this.final=this._finalOrDigest,this._final&&(this.__final=this._final,this._final=null),this._decoder=null,this._encoding=null}inherits$l(CipherBase$1,Transform$5);CipherBase$1.prototype.update=function(tt,et,nt){typeof tt=="string"&&(tt=Buffer$v.from(tt,et));var rt=this._update(tt);return this.hashMode?this:(nt&&(rt=this._toString(rt,nt)),rt)};CipherBase$1.prototype.setAutoPadding=function(){};CipherBase$1.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")};CipherBase$1.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")};CipherBase$1.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")};CipherBase$1.prototype._transform=function(tt,et,nt){var rt;try{this.hashMode?this._update(tt):this.push(this._update(tt))}catch(it){rt=it}finally{nt(rt)}};CipherBase$1.prototype._flush=function(tt){var et;try{this.push(this.__final())}catch(nt){et=nt}tt(et)};CipherBase$1.prototype._finalOrDigest=function(tt){var et=this.__final()||Buffer$v.alloc(0);return tt&&(et=this._toString(et,tt,!0)),et};CipherBase$1.prototype._toString=function(tt,et,nt){if(this._decoder||(this._decoder=new StringDecoder(et),this._encoding=et),this._encoding!==et)throw new Error("can't switch encodings");var rt=this._decoder.write(tt);return nt&&(rt+=this._decoder.end()),rt};var cipherBase=CipherBase$1,inherits$k=inherits_browserExports,MD5$2=md5_js,RIPEMD160$4=ripemd160$1,sha$3=sha_jsExports,Base$5=cipherBase;function Hash$2(tt){Base$5.call(this,"digest"),this._hash=tt}inherits$k(Hash$2,Base$5);Hash$2.prototype._update=function(tt){this._hash.update(tt)};Hash$2.prototype._final=function(){return this._hash.digest()};var browser$a=function(et){return et=et.toLowerCase(),et==="md5"?new MD5$2:et==="rmd160"||et==="ripemd160"?new RIPEMD160$4:new Hash$2(sha$3(et))},inherits$j=inherits_browserExports,Buffer$u=safeBufferExports.Buffer,Base$4=cipherBase,ZEROS$2=Buffer$u.alloc(128),blocksize=64;function Hmac$3(tt,et){Base$4.call(this,"digest"),typeof et=="string"&&(et=Buffer$u.from(et)),this._alg=tt,this._key=et,et.length>blocksize?et=tt(et):et.lengthnt){var rt=tt==="rmd160"?new RIPEMD160$3:sha$2(tt);et=rt.update(et).digest()}else et.lengthMAX_ALLOC||et!==et)throw new TypeError("Bad key length")},defaultEncoding$2;if(commonjsGlobal.process&&commonjsGlobal.process.browser)defaultEncoding$2="utf-8";else if(commonjsGlobal.process&&commonjsGlobal.process.version){var pVersionMajor=parseInt(process.version.split(".")[0].slice(1),10);defaultEncoding$2=pVersionMajor>=6?"utf-8":"binary"}else defaultEncoding$2="utf-8";var defaultEncoding_1=defaultEncoding$2,Buffer$s=safeBufferExports.Buffer,toBuffer$3=function(tt,et,nt){if(Buffer$s.isBuffer(tt))return tt;if(typeof tt=="string")return Buffer$s.from(tt,et);if(ArrayBuffer.isView(tt))return Buffer$s.from(tt.buffer);throw new TypeError(nt+" must be a string, a Buffer, a typed array or a DataView")},md5=md5$2,RIPEMD160$2=ripemd160$1,sha$1=sha_jsExports,Buffer$r=safeBufferExports.Buffer,checkParameters$1=precondition,defaultEncoding$1=defaultEncoding_1,toBuffer$2=toBuffer$3,ZEROS=Buffer$r.alloc(128),sizes={md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,rmd160:20,ripemd160:20};function Hmac$1(tt,et,nt){var rt=getDigest(tt),it=tt==="sha512"||tt==="sha384"?128:64;et.length>it?et=rt(et):et.length>>0};utils$q.writeUInt32BE=function(et,nt,rt){et[0+rt]=nt>>>24,et[1+rt]=nt>>>16&255,et[2+rt]=nt>>>8&255,et[3+rt]=nt&255};utils$q.ip=function(et,nt,rt,it){for(var ot=0,at=0,st=6;st>=0;st-=2){for(var lt=0;lt<=24;lt+=8)ot<<=1,ot|=nt>>>lt+st&1;for(var lt=0;lt<=24;lt+=8)ot<<=1,ot|=et>>>lt+st&1}for(var st=6;st>=0;st-=2){for(var lt=1;lt<=25;lt+=8)at<<=1,at|=nt>>>lt+st&1;for(var lt=1;lt<=25;lt+=8)at<<=1,at|=et>>>lt+st&1}rt[it+0]=ot>>>0,rt[it+1]=at>>>0};utils$q.rip=function(et,nt,rt,it){for(var ot=0,at=0,st=0;st<4;st++)for(var lt=24;lt>=0;lt-=8)ot<<=1,ot|=nt>>>lt+st&1,ot<<=1,ot|=et>>>lt+st&1;for(var st=4;st<8;st++)for(var lt=24;lt>=0;lt-=8)at<<=1,at|=nt>>>lt+st&1,at<<=1,at|=et>>>lt+st&1;rt[it+0]=ot>>>0,rt[it+1]=at>>>0};utils$q.pc1=function(et,nt,rt,it){for(var ot=0,at=0,st=7;st>=5;st--){for(var lt=0;lt<=24;lt+=8)ot<<=1,ot|=nt>>lt+st&1;for(var lt=0;lt<=24;lt+=8)ot<<=1,ot|=et>>lt+st&1}for(var lt=0;lt<=24;lt+=8)ot<<=1,ot|=nt>>lt+st&1;for(var st=1;st<=3;st++){for(var lt=0;lt<=24;lt+=8)at<<=1,at|=nt>>lt+st&1;for(var lt=0;lt<=24;lt+=8)at<<=1,at|=et>>lt+st&1}for(var lt=0;lt<=24;lt+=8)at<<=1,at|=et>>lt+st&1;rt[it+0]=ot>>>0,rt[it+1]=at>>>0};utils$q.r28shl=function(et,nt){return et<>>28-nt};var pc2table=[14,11,17,4,27,23,25,0,13,22,7,18,5,9,16,24,2,20,12,21,1,8,15,26,15,4,25,19,9,1,26,16,5,11,23,8,12,7,17,0,22,3,10,14,6,20,27,24];utils$q.pc2=function(et,nt,rt,it){for(var ot=0,at=0,st=pc2table.length>>>1,lt=0;lt>>pc2table[lt]&1;for(var lt=st;lt>>pc2table[lt]&1;rt[it+0]=ot>>>0,rt[it+1]=at>>>0};utils$q.expand=function(et,nt,rt){var it=0,ot=0;it=(et&1)<<5|et>>>27;for(var at=23;at>=15;at-=4)it<<=6,it|=et>>>at&63;for(var at=11;at>=3;at-=4)ot|=et>>>at&63,ot<<=6;ot|=(et&31)<<1|et>>>31,nt[rt+0]=it>>>0,nt[rt+1]=ot>>>0};var sTable=[14,0,4,15,13,7,1,4,2,14,15,2,11,13,8,1,3,10,10,6,6,12,12,11,5,9,9,5,0,3,7,8,4,15,1,12,14,8,8,2,13,4,6,9,2,1,11,7,15,5,12,11,9,3,7,14,3,10,10,0,5,6,0,13,15,3,1,13,8,4,14,7,6,15,11,2,3,8,4,14,9,12,7,0,2,1,13,10,12,6,0,9,5,11,10,5,0,13,14,8,7,10,11,1,10,3,4,15,13,4,1,2,5,11,8,6,12,7,6,12,9,0,3,5,2,14,15,9,10,13,0,7,9,0,14,9,6,3,3,4,15,6,5,10,1,2,13,8,12,5,7,14,11,12,4,11,2,15,8,1,13,1,6,10,4,13,9,0,8,6,15,9,3,8,0,7,11,4,1,15,2,14,12,3,5,11,10,5,14,2,7,12,7,13,13,8,14,11,3,5,0,6,6,15,9,0,10,3,1,4,2,7,8,2,5,12,11,1,12,10,4,14,15,9,10,3,6,15,9,0,0,6,12,10,11,1,7,13,13,8,15,9,1,4,3,5,14,11,5,12,2,7,8,2,4,14,2,14,12,11,4,2,1,12,7,4,10,7,11,13,6,1,8,5,5,0,3,15,15,10,13,3,0,9,14,8,9,6,4,11,2,8,1,12,11,7,10,1,13,14,7,2,8,13,15,6,9,15,12,0,5,9,6,10,3,4,0,5,14,3,12,10,1,15,10,4,15,2,9,7,2,12,6,9,8,5,0,6,13,1,3,13,4,14,14,0,7,11,5,3,11,8,9,4,14,3,15,2,5,12,2,9,8,5,12,15,3,10,7,11,0,14,4,1,10,7,1,6,13,0,11,8,6,13,4,13,11,0,2,11,14,7,15,4,0,9,8,1,13,10,3,14,12,3,9,5,7,12,5,2,10,15,6,8,1,6,1,6,4,11,11,13,13,8,12,1,3,4,7,10,14,7,10,9,15,5,6,0,8,15,0,14,5,2,9,3,2,12,13,1,2,15,8,13,4,8,6,10,15,3,11,7,1,4,10,12,9,5,3,6,14,11,5,0,0,14,12,9,7,2,7,2,11,1,4,14,1,7,9,4,12,10,14,8,2,13,0,15,6,12,10,9,13,0,15,3,3,5,5,6,8,11];utils$q.substitute=function(et,nt){for(var rt=0,it=0;it<4;it++){var ot=et>>>18-it*6&63,at=sTable[it*64+ot];rt<<=4,rt|=at}for(var it=0;it<4;it++){var ot=nt>>>18-it*6&63,at=sTable[4*64+it*64+ot];rt<<=4,rt|=at}return rt>>>0};var permuteTable=[16,25,12,11,3,20,4,15,31,17,9,6,27,14,1,22,30,24,8,18,0,5,29,23,13,19,2,26,10,21,28,7];utils$q.permute=function(et){for(var nt=0,rt=0;rt>>permuteTable[rt]&1;return nt>>>0};utils$q.padSplit=function(et,nt,rt){for(var it=et.toString(2);it.length0;it--)nt+=this._buffer(et,nt),rt+=this._flushBuffer(ot,rt);return nt+=this._buffer(et,nt),ot};Cipher$3.prototype.final=function(et){var nt;et&&(nt=this.update(et));var rt;return this.type==="encrypt"?rt=this._finalEncrypt():rt=this._finalDecrypt(),nt?nt.concat(rt):rt};Cipher$3.prototype._pad=function(et,nt){if(nt===0)return!1;for(;nt>>1];rt=utils$p.r28shl(rt,at),it=utils$p.r28shl(it,at),utils$p.pc2(rt,it,et.keys,ot)}};DES$3.prototype._update=function(et,nt,rt,it){var ot=this._desState,at=utils$p.readUInt32BE(et,nt),st=utils$p.readUInt32BE(et,nt+4);utils$p.ip(at,st,ot.tmp,0),at=ot.tmp[0],st=ot.tmp[1],this.type==="encrypt"?this._encrypt(ot,at,st,ot.tmp,0):this._decrypt(ot,at,st,ot.tmp,0),at=ot.tmp[0],st=ot.tmp[1],utils$p.writeUInt32BE(rt,at,it),utils$p.writeUInt32BE(rt,st,it+4)};DES$3.prototype._pad=function(et,nt){if(this.padding===!1)return!1;for(var rt=et.length-nt,it=nt;it>>0,at=pt}utils$p.rip(st,at,it,ot)};DES$3.prototype._decrypt=function(et,nt,rt,it,ot){for(var at=rt,st=nt,lt=et.keys.length-2;lt>=0;lt-=2){var ct=et.keys[lt],ut=et.keys[lt+1];utils$p.expand(at,et.tmp,0),ct^=et.tmp[0],ut^=et.tmp[1];var ht=utils$p.substitute(ct,ut),dt=utils$p.permute(ht),pt=at;at=(st^dt)>>>0,st=pt}utils$p.rip(at,st,it,ot)};var cbc$1={},assert$l=minimalisticAssert,inherits$g=inherits_browserExports,proto$3={};function CBCState(tt){assert$l.equal(tt.length,8,"Invalid IV length"),this.iv=new Array(8);for(var et=0;et>it%8,tt._prev=shiftIn(tt._prev,nt?st:lt);return at}function shiftIn(tt,et){var nt=tt.length,rt=-1,it=Buffer$m.allocUnsafe(tt.length);for(tt=Buffer$m.concat([tt,Buffer$m.from([et])]);++rt>7;return it}cfb1.encrypt=function(tt,et,nt){for(var rt=et.length,it=Buffer$m.allocUnsafe(rt),ot=-1;++ot>>24]^at[ut>>>16&255]^st[ht>>>8&255]^lt[dt&255]^et[bt++],mt=ot[ut>>>24]^at[ht>>>16&255]^st[dt>>>8&255]^lt[ct&255]^et[bt++],gt=ot[ht>>>24]^at[dt>>>16&255]^st[ct>>>8&255]^lt[ut&255]^et[bt++],yt=ot[dt>>>24]^at[ct>>>16&255]^st[ut>>>8&255]^lt[ht&255]^et[bt++],ct=pt,ut=mt,ht=gt,dt=yt;return pt=(rt[ct>>>24]<<24|rt[ut>>>16&255]<<16|rt[ht>>>8&255]<<8|rt[dt&255])^et[bt++],mt=(rt[ut>>>24]<<24|rt[ht>>>16&255]<<16|rt[dt>>>8&255]<<8|rt[ct&255])^et[bt++],gt=(rt[ht>>>24]<<24|rt[dt>>>16&255]<<16|rt[ct>>>8&255]<<8|rt[ut&255])^et[bt++],yt=(rt[dt>>>24]<<24|rt[ct>>>16&255]<<16|rt[ut>>>8&255]<<8|rt[ht&255])^et[bt++],pt=pt>>>0,mt=mt>>>0,gt=gt>>>0,yt=yt>>>0,[pt,mt,gt,yt]}var RCON=[0,1,2,4,8,16,32,64,128,27,54],G=function(){for(var tt=new Array(256),et=0;et<256;et++)et<128?tt[et]=et<<1:tt[et]=et<<1^283;for(var nt=[],rt=[],it=[[],[],[],[]],ot=[[],[],[],[]],at=0,st=0,lt=0;lt<256;++lt){var ct=st^st<<1^st<<2^st<<3^st<<4;ct=ct>>>8^ct&255^99,nt[at]=ct,rt[ct]=at;var ut=tt[at],ht=tt[ut],dt=tt[ht],pt=tt[ct]*257^ct*16843008;it[0][at]=pt<<24|pt>>>8,it[1][at]=pt<<16|pt>>>16,it[2][at]=pt<<8|pt>>>24,it[3][at]=pt,pt=dt*16843009^ht*65537^ut*257^at*16843008,ot[0][ct]=pt<<24|pt>>>8,ot[1][ct]=pt<<16|pt>>>16,ot[2][ct]=pt<<8|pt>>>24,ot[3][ct]=pt,at===0?at=st=1:(at=ut^tt[tt[tt[dt^ut]]],st^=tt[tt[st]])}return{SBOX:nt,INV_SBOX:rt,SUB_MIX:it,INV_SUB_MIX:ot}}();function AES(tt){this._key=asUInt32Array(tt),this._reset()}AES.blockSize=4*4;AES.keySize=256/8;AES.prototype.blockSize=AES.blockSize;AES.prototype.keySize=AES.keySize;AES.prototype._reset=function(){for(var tt=this._key,et=tt.length,nt=et+6,rt=(nt+1)*4,it=[],ot=0;ot>>24,at=G.SBOX[at>>>24]<<24|G.SBOX[at>>>16&255]<<16|G.SBOX[at>>>8&255]<<8|G.SBOX[at&255],at^=RCON[ot/et|0]<<24):et>6&&ot%et===4&&(at=G.SBOX[at>>>24]<<24|G.SBOX[at>>>16&255]<<16|G.SBOX[at>>>8&255]<<8|G.SBOX[at&255]),it[ot]=it[ot-et]^at}for(var st=[],lt=0;lt>>24]]^G.INV_SUB_MIX[1][G.SBOX[ut>>>16&255]]^G.INV_SUB_MIX[2][G.SBOX[ut>>>8&255]]^G.INV_SUB_MIX[3][G.SBOX[ut&255]]}this._nRounds=nt,this._keySchedule=it,this._invKeySchedule=st};AES.prototype.encryptBlockRaw=function(tt){return tt=asUInt32Array(tt),cryptBlock(tt,this._keySchedule,G.SUB_MIX,G.SBOX,this._nRounds)};AES.prototype.encryptBlock=function(tt){var et=this.encryptBlockRaw(tt),nt=Buffer$k.allocUnsafe(16);return nt.writeUInt32BE(et[0],0),nt.writeUInt32BE(et[1],4),nt.writeUInt32BE(et[2],8),nt.writeUInt32BE(et[3],12),nt};AES.prototype.decryptBlock=function(tt){tt=asUInt32Array(tt);var et=tt[1];tt[1]=tt[3],tt[3]=et;var nt=cryptBlock(tt,this._invKeySchedule,G.INV_SUB_MIX,G.INV_SBOX,this._nRounds),rt=Buffer$k.allocUnsafe(16);return rt.writeUInt32BE(nt[0],0),rt.writeUInt32BE(nt[3],4),rt.writeUInt32BE(nt[2],8),rt.writeUInt32BE(nt[1],12),rt};AES.prototype.scrub=function(){scrubVec(this._keySchedule),scrubVec(this._invKeySchedule),scrubVec(this._key)};aes$5.AES=AES;var Buffer$j=safeBufferExports.Buffer,ZEROES=Buffer$j.alloc(16,0);function toArray$5(tt){return[tt.readUInt32BE(0),tt.readUInt32BE(4),tt.readUInt32BE(8),tt.readUInt32BE(12)]}function fromArray(tt){var et=Buffer$j.allocUnsafe(16);return et.writeUInt32BE(tt[0]>>>0,0),et.writeUInt32BE(tt[1]>>>0,4),et.writeUInt32BE(tt[2]>>>0,8),et.writeUInt32BE(tt[3]>>>0,12),et}function GHASH$1(tt){this.h=tt,this.state=Buffer$j.alloc(16,0),this.cache=Buffer$j.allocUnsafe(0)}GHASH$1.prototype.ghash=function(tt){for(var et=-1;++et0;nt--)tt[nt]=tt[nt]>>>1|(tt[nt-1]&1)<<31;tt[0]=tt[0]>>>1,it&&(tt[0]=tt[0]^225<<24)}this.state=fromArray(et)};GHASH$1.prototype.update=function(tt){this.cache=Buffer$j.concat([this.cache,tt]);for(var et;this.cache.length>=16;)et=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(et)};GHASH$1.prototype.final=function(tt,et){return this.cache.length&&this.ghash(Buffer$j.concat([this.cache,ZEROES],16)),this.ghash(fromArray([0,tt,0,et])),this.state};var ghash=GHASH$1,aes$4=aes$5,Buffer$i=safeBufferExports.Buffer,Transform$4=cipherBase,inherits$d=inherits_browserExports,GHASH=ghash,xor$3=bufferXor,incr32=incr32_1;function xorTest(tt,et){var nt=0;tt.length!==et.length&&nt++;for(var rt=Math.min(tt.length,et.length),it=0;it0||rt>0;){var lt=new MD5;lt.update(st),lt.update(tt),et&<.update(et),st=lt.digest();var ct=0;if(it>0){var ut=ot.length-it;ct=Math.min(it,st.length),st.copy(ot,ut,0,ct),it-=ct}if(ct0){var ht=at.length-rt,dt=Math.min(rt,st.length-ct);st.copy(at,ht,ct,ct+dt),rt-=dt}}return st.fill(0),{key:ot,iv:at}}var evp_bytestokey=EVP_BytesToKey,MODES$1=modes_1,AuthCipher$1=authCipher,Buffer$f=safeBufferExports.Buffer,StreamCipher$1=streamCipher,Transform$2=cipherBase,aes$2=aes$5,ebtk$2=evp_bytestokey,inherits$b=inherits_browserExports;function Cipher(tt,et,nt){Transform$2.call(this),this._cache=new Splitter$1,this._cipher=new aes$2.AES(et),this._prev=Buffer$f.from(nt),this._mode=tt,this._autopadding=!0}inherits$b(Cipher,Transform$2);Cipher.prototype._update=function(tt){this._cache.add(tt);for(var et,nt,rt=[];et=this._cache.get();)nt=this._mode.encrypt(this,et),rt.push(nt);return Buffer$f.concat(rt)};var PADDING=Buffer$f.alloc(16,16);Cipher.prototype._final=function(){var tt=this._cache.flush();if(this._autopadding)return tt=this._mode.encrypt(this,tt),this._cipher.scrub(),tt;if(!tt.equals(PADDING))throw this._cipher.scrub(),new Error("data not multiple of block length")};Cipher.prototype.setAutoPadding=function(tt){return this._autopadding=!!tt,this};function Splitter$1(){this.cache=Buffer$f.allocUnsafe(0)}Splitter$1.prototype.add=function(tt){this.cache=Buffer$f.concat([this.cache,tt])};Splitter$1.prototype.get=function(){if(this.cache.length>15){var tt=this.cache.slice(0,16);return this.cache=this.cache.slice(16),tt}return null};Splitter$1.prototype.flush=function(){for(var tt=16-this.cache.length,et=Buffer$f.allocUnsafe(tt),nt=-1;++nt16)return et=this.cache.slice(0,16),this.cache=this.cache.slice(16),et}else if(this.cache.length>=16)return et=this.cache.slice(0,16),this.cache=this.cache.slice(16),et;return null};Splitter.prototype.flush=function(){if(this.cache.length)return this.cache};function unpad(tt){var et=tt[15];if(et<1||et>16)throw new Error("unable to decrypt data");for(var nt=-1;++nt0?Pt:Ct},ot.min=function(Pt,Ct){return Pt.cmp(Ct)<0?Pt:Ct},ot.prototype._init=function(Pt,Ct,wt){if(typeof Pt=="number")return this._initNumber(Pt,Ct,wt);if(typeof Pt=="object")return this._initArray(Pt,Ct,wt);Ct==="hex"&&(Ct=16),rt(Ct===(Ct|0)&&Ct>=2&&Ct<=36),Pt=Pt.toString().replace(/\s+/g,"");var It=0;Pt[0]==="-"&&(It++,this.negative=1),It=0;It-=3)Wt=Pt[It]|Pt[It-1]<<8|Pt[It-2]<<16,this.words[Ot]|=Wt<>>26-zt&67108863,zt+=24,zt>=26&&(zt-=26,Ot++);else if(wt==="le")for(It=0,Ot=0;It>>26-zt&67108863,zt+=24,zt>=26&&(zt-=26,Ot++);return this.strip()};function st(jt,Pt){var Ct=jt.charCodeAt(Pt);return Ct>=65&&Ct<=70?Ct-55:Ct>=97&&Ct<=102?Ct-87:Ct-48&15}function lt(jt,Pt,Ct){var wt=st(jt,Ct);return Ct-1>=Pt&&(wt|=st(jt,Ct-1)<<4),wt}ot.prototype._parseHex=function(Pt,Ct,wt){this.length=Math.ceil((Pt.length-Ct)/6),this.words=new Array(this.length);for(var It=0;It=Ct;It-=2)zt=lt(Pt,Ct,It)<=18?(Ot-=18,Wt+=1,this.words[Wt]|=zt>>>26):Ot+=8;else{var Ft=Pt.length-Ct;for(It=Ft%2===0?Ct+1:Ct;It=18?(Ot-=18,Wt+=1,this.words[Wt]|=zt>>>26):Ot+=8}this.strip()};function ct(jt,Pt,Ct,wt){for(var It=0,Ot=Math.min(jt.length,Ct),Wt=Pt;Wt=49?It+=zt-49+10:zt>=17?It+=zt-17+10:It+=zt}return It}ot.prototype._parseBase=function(Pt,Ct,wt){this.words=[0],this.length=1;for(var It=0,Ot=1;Ot<=67108863;Ot*=Ct)It++;It--,Ot=Ot/Ct|0;for(var Wt=Pt.length-wt,zt=Wt%It,Ft=Math.min(Wt,Wt-zt)+wt,Nt=0,Ut=wt;Ut1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},ot.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},ot.prototype.inspect=function(){return(this.red?""};var ut=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],ht=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],dt=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];ot.prototype.toString=function(Pt,Ct){Pt=Pt||10,Ct=Ct|0||1;var wt;if(Pt===16||Pt==="hex"){wt="";for(var It=0,Ot=0,Wt=0;Wt>>24-It&16777215,Ot!==0||Wt!==this.length-1?wt=ut[6-Ft.length]+Ft+wt:wt=Ft+wt,It+=2,It>=26&&(It-=26,Wt--)}for(Ot!==0&&(wt=Ot.toString(16)+wt);wt.length%Ct!==0;)wt="0"+wt;return this.negative!==0&&(wt="-"+wt),wt}if(Pt===(Pt|0)&&Pt>=2&&Pt<=36){var Nt=ht[Pt],Ut=dt[Pt];wt="";var Mt=this.clone();for(Mt.negative=0;!Mt.isZero();){var Ht=Mt.modn(Ut).toString(Pt);Mt=Mt.idivn(Ut),Mt.isZero()?wt=Ht+wt:wt=ut[Nt-Ht.length]+Ht+wt}for(this.isZero()&&(wt="0"+wt);wt.length%Ct!==0;)wt="0"+wt;return this.negative!==0&&(wt="-"+wt),wt}rt(!1,"Base should be between 2 and 36")},ot.prototype.toNumber=function(){var Pt=this.words[0];return this.length===2?Pt+=this.words[1]*67108864:this.length===3&&this.words[2]===1?Pt+=4503599627370496+this.words[1]*67108864:this.length>2&&rt(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-Pt:Pt},ot.prototype.toJSON=function(){return this.toString(16)},ot.prototype.toBuffer=function(Pt,Ct){return rt(typeof at<"u"),this.toArrayLike(at,Pt,Ct)},ot.prototype.toArray=function(Pt,Ct){return this.toArrayLike(Array,Pt,Ct)},ot.prototype.toArrayLike=function(Pt,Ct,wt){var It=this.byteLength(),Ot=wt||Math.max(1,It);rt(It<=Ot,"byte array longer than desired length"),rt(Ot>0,"Requested array length <= 0"),this.strip();var Wt=Ct==="le",zt=new Pt(Ot),Ft,Nt,Ut=this.clone();if(Wt){for(Nt=0;!Ut.isZero();Nt++)Ft=Ut.andln(255),Ut.iushrn(8),zt[Nt]=Ft;for(;Nt=4096&&(wt+=13,Ct>>>=13),Ct>=64&&(wt+=7,Ct>>>=7),Ct>=8&&(wt+=4,Ct>>>=4),Ct>=2&&(wt+=2,Ct>>>=2),wt+Ct},ot.prototype._zeroBits=function(Pt){if(Pt===0)return 26;var Ct=Pt,wt=0;return Ct&8191||(wt+=13,Ct>>>=13),Ct&127||(wt+=7,Ct>>>=7),Ct&15||(wt+=4,Ct>>>=4),Ct&3||(wt+=2,Ct>>>=2),Ct&1||wt++,wt},ot.prototype.bitLength=function(){var Pt=this.words[this.length-1],Ct=this._countBits(Pt);return(this.length-1)*26+Ct};function pt(jt){for(var Pt=new Array(jt.bitLength()),Ct=0;Ct>>It}return Pt}ot.prototype.zeroBits=function(){if(this.isZero())return 0;for(var Pt=0,Ct=0;CtPt.length?this.clone().ior(Pt):Pt.clone().ior(this)},ot.prototype.uor=function(Pt){return this.length>Pt.length?this.clone().iuor(Pt):Pt.clone().iuor(this)},ot.prototype.iuand=function(Pt){var Ct;this.length>Pt.length?Ct=Pt:Ct=this;for(var wt=0;wtPt.length?this.clone().iand(Pt):Pt.clone().iand(this)},ot.prototype.uand=function(Pt){return this.length>Pt.length?this.clone().iuand(Pt):Pt.clone().iuand(this)},ot.prototype.iuxor=function(Pt){var Ct,wt;this.length>Pt.length?(Ct=this,wt=Pt):(Ct=Pt,wt=this);for(var It=0;ItPt.length?this.clone().ixor(Pt):Pt.clone().ixor(this)},ot.prototype.uxor=function(Pt){return this.length>Pt.length?this.clone().iuxor(Pt):Pt.clone().iuxor(this)},ot.prototype.inotn=function(Pt){rt(typeof Pt=="number"&&Pt>=0);var Ct=Math.ceil(Pt/26)|0,wt=Pt%26;this._expand(Ct),wt>0&&Ct--;for(var It=0;It0&&(this.words[It]=~this.words[It]&67108863>>26-wt),this.strip()},ot.prototype.notn=function(Pt){return this.clone().inotn(Pt)},ot.prototype.setn=function(Pt,Ct){rt(typeof Pt=="number"&&Pt>=0);var wt=Pt/26|0,It=Pt%26;return this._expand(wt+1),Ct?this.words[wt]=this.words[wt]|1<Pt.length?(wt=this,It=Pt):(wt=Pt,It=this);for(var Ot=0,Wt=0;Wt>>26;for(;Ot!==0&&Wt>>26;if(this.length=wt.length,Ot!==0)this.words[this.length]=Ot,this.length++;else if(wt!==this)for(;WtPt.length?this.clone().iadd(Pt):Pt.clone().iadd(this)},ot.prototype.isub=function(Pt){if(Pt.negative!==0){Pt.negative=0;var Ct=this.iadd(Pt);return Pt.negative=1,Ct._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(Pt),this.negative=1,this._normSign();var wt=this.cmp(Pt);if(wt===0)return this.negative=0,this.length=1,this.words[0]=0,this;var It,Ot;wt>0?(It=this,Ot=Pt):(It=Pt,Ot=this);for(var Wt=0,zt=0;zt>26,this.words[zt]=Ct&67108863;for(;Wt!==0&&zt>26,this.words[zt]=Ct&67108863;if(Wt===0&&zt>>26,Mt=Ft&67108863,Ht=Math.min(Nt,Pt.length-1),en=Math.max(0,Nt-jt.length+1);en<=Ht;en++){var sn=Nt-en|0;It=jt.words[sn]|0,Ot=Pt.words[en]|0,Wt=It*Ot+Mt,Ut+=Wt/67108864|0,Mt=Wt&67108863}Ct.words[Nt]=Mt|0,Ft=Ut|0}return Ft!==0?Ct.words[Nt]=Ft|0:Ct.length--,Ct.strip()}var gt=function(Pt,Ct,wt){var It=Pt.words,Ot=Ct.words,Wt=wt.words,zt=0,Ft,Nt,Ut,Mt=It[0]|0,Ht=Mt&8191,en=Mt>>>13,sn=It[1]|0,Kt=sn&8191,rn=sn>>>13,nn=It[2]|0,hn=nn&8191,vn=nn>>>13,an=It[3]|0,Qt=an&8191,_n=an>>>13,Pn=It[4]|0,$n=Pn&8191,Nn=Pn>>>13,Tn=It[5]|0,cn=Tn&8191,mn=Tn>>>13,In=It[6]|0,An=In&8191,wn=In>>>13,fn=It[7]|0,pn=fn&8191,kn=fn>>>13,Dn=It[8]|0,un=Dn&8191,Zt=Dn>>>13,Xt=It[9]|0,Sn=Xt&8191,Rn=Xt>>>13,jn=Ot[0]|0,On=jn&8191,Zn=jn>>>13,Vn=Ot[1]|0,qn=Vn&8191,zn=Vn>>>13,Jn=Ot[2]|0,Hn=Jn&8191,pr=Jn>>>13,fr=Ot[3]|0,xr=fr&8191,io=fr>>>13,Tr=Ot[4]|0,Ar=Tr&8191,qr=Tr>>>13,jr=Ot[5]|0,Fr=jr&8191,ao=jr>>>13,Yr=Ot[6]|0,Dr=Yr&8191,go=Yr>>>13,xn=Ot[7]|0,Mn=xn&8191,dn=xn>>>13,Jt=Ot[8]|0,En=Jt&8191,Ln=Jt>>>13,Un=Ot[9]|0,Kn=Un&8191,nr=Un>>>13;wt.negative=Pt.negative^Ct.negative,wt.length=19,Ft=Math.imul(Ht,On),Nt=Math.imul(Ht,Zn),Nt=Nt+Math.imul(en,On)|0,Ut=Math.imul(en,Zn);var lr=(zt+Ft|0)+((Nt&8191)<<13)|0;zt=(Ut+(Nt>>>13)|0)+(lr>>>26)|0,lr&=67108863,Ft=Math.imul(Kt,On),Nt=Math.imul(Kt,Zn),Nt=Nt+Math.imul(rn,On)|0,Ut=Math.imul(rn,Zn),Ft=Ft+Math.imul(Ht,qn)|0,Nt=Nt+Math.imul(Ht,zn)|0,Nt=Nt+Math.imul(en,qn)|0,Ut=Ut+Math.imul(en,zn)|0;var cr=(zt+Ft|0)+((Nt&8191)<<13)|0;zt=(Ut+(Nt>>>13)|0)+(cr>>>26)|0,cr&=67108863,Ft=Math.imul(hn,On),Nt=Math.imul(hn,Zn),Nt=Nt+Math.imul(vn,On)|0,Ut=Math.imul(vn,Zn),Ft=Ft+Math.imul(Kt,qn)|0,Nt=Nt+Math.imul(Kt,zn)|0,Nt=Nt+Math.imul(rn,qn)|0,Ut=Ut+Math.imul(rn,zn)|0,Ft=Ft+Math.imul(Ht,Hn)|0,Nt=Nt+Math.imul(Ht,pr)|0,Nt=Nt+Math.imul(en,Hn)|0,Ut=Ut+Math.imul(en,pr)|0;var Hr=(zt+Ft|0)+((Nt&8191)<<13)|0;zt=(Ut+(Nt>>>13)|0)+(Hr>>>26)|0,Hr&=67108863,Ft=Math.imul(Qt,On),Nt=Math.imul(Qt,Zn),Nt=Nt+Math.imul(_n,On)|0,Ut=Math.imul(_n,Zn),Ft=Ft+Math.imul(hn,qn)|0,Nt=Nt+Math.imul(hn,zn)|0,Nt=Nt+Math.imul(vn,qn)|0,Ut=Ut+Math.imul(vn,zn)|0,Ft=Ft+Math.imul(Kt,Hn)|0,Nt=Nt+Math.imul(Kt,pr)|0,Nt=Nt+Math.imul(rn,Hn)|0,Ut=Ut+Math.imul(rn,pr)|0,Ft=Ft+Math.imul(Ht,xr)|0,Nt=Nt+Math.imul(Ht,io)|0,Nt=Nt+Math.imul(en,xr)|0,Ut=Ut+Math.imul(en,io)|0;var vr=(zt+Ft|0)+((Nt&8191)<<13)|0;zt=(Ut+(Nt>>>13)|0)+(vr>>>26)|0,vr&=67108863,Ft=Math.imul($n,On),Nt=Math.imul($n,Zn),Nt=Nt+Math.imul(Nn,On)|0,Ut=Math.imul(Nn,Zn),Ft=Ft+Math.imul(Qt,qn)|0,Nt=Nt+Math.imul(Qt,zn)|0,Nt=Nt+Math.imul(_n,qn)|0,Ut=Ut+Math.imul(_n,zn)|0,Ft=Ft+Math.imul(hn,Hn)|0,Nt=Nt+Math.imul(hn,pr)|0,Nt=Nt+Math.imul(vn,Hn)|0,Ut=Ut+Math.imul(vn,pr)|0,Ft=Ft+Math.imul(Kt,xr)|0,Nt=Nt+Math.imul(Kt,io)|0,Nt=Nt+Math.imul(rn,xr)|0,Ut=Ut+Math.imul(rn,io)|0,Ft=Ft+Math.imul(Ht,Ar)|0,Nt=Nt+Math.imul(Ht,qr)|0,Nt=Nt+Math.imul(en,Ar)|0,Ut=Ut+Math.imul(en,qr)|0;var Nr=(zt+Ft|0)+((Nt&8191)<<13)|0;zt=(Ut+(Nt>>>13)|0)+(Nr>>>26)|0,Nr&=67108863,Ft=Math.imul(cn,On),Nt=Math.imul(cn,Zn),Nt=Nt+Math.imul(mn,On)|0,Ut=Math.imul(mn,Zn),Ft=Ft+Math.imul($n,qn)|0,Nt=Nt+Math.imul($n,zn)|0,Nt=Nt+Math.imul(Nn,qn)|0,Ut=Ut+Math.imul(Nn,zn)|0,Ft=Ft+Math.imul(Qt,Hn)|0,Nt=Nt+Math.imul(Qt,pr)|0,Nt=Nt+Math.imul(_n,Hn)|0,Ut=Ut+Math.imul(_n,pr)|0,Ft=Ft+Math.imul(hn,xr)|0,Nt=Nt+Math.imul(hn,io)|0,Nt=Nt+Math.imul(vn,xr)|0,Ut=Ut+Math.imul(vn,io)|0,Ft=Ft+Math.imul(Kt,Ar)|0,Nt=Nt+Math.imul(Kt,qr)|0,Nt=Nt+Math.imul(rn,Ar)|0,Ut=Ut+Math.imul(rn,qr)|0,Ft=Ft+Math.imul(Ht,Fr)|0,Nt=Nt+Math.imul(Ht,ao)|0,Nt=Nt+Math.imul(en,Fr)|0,Ut=Ut+Math.imul(en,ao)|0;var Gr=(zt+Ft|0)+((Nt&8191)<<13)|0;zt=(Ut+(Nt>>>13)|0)+(Gr>>>26)|0,Gr&=67108863,Ft=Math.imul(An,On),Nt=Math.imul(An,Zn),Nt=Nt+Math.imul(wn,On)|0,Ut=Math.imul(wn,Zn),Ft=Ft+Math.imul(cn,qn)|0,Nt=Nt+Math.imul(cn,zn)|0,Nt=Nt+Math.imul(mn,qn)|0,Ut=Ut+Math.imul(mn,zn)|0,Ft=Ft+Math.imul($n,Hn)|0,Nt=Nt+Math.imul($n,pr)|0,Nt=Nt+Math.imul(Nn,Hn)|0,Ut=Ut+Math.imul(Nn,pr)|0,Ft=Ft+Math.imul(Qt,xr)|0,Nt=Nt+Math.imul(Qt,io)|0,Nt=Nt+Math.imul(_n,xr)|0,Ut=Ut+Math.imul(_n,io)|0,Ft=Ft+Math.imul(hn,Ar)|0,Nt=Nt+Math.imul(hn,qr)|0,Nt=Nt+Math.imul(vn,Ar)|0,Ut=Ut+Math.imul(vn,qr)|0,Ft=Ft+Math.imul(Kt,Fr)|0,Nt=Nt+Math.imul(Kt,ao)|0,Nt=Nt+Math.imul(rn,Fr)|0,Ut=Ut+Math.imul(rn,ao)|0,Ft=Ft+Math.imul(Ht,Dr)|0,Nt=Nt+Math.imul(Ht,go)|0,Nt=Nt+Math.imul(en,Dr)|0,Ut=Ut+Math.imul(en,go)|0;var eo=(zt+Ft|0)+((Nt&8191)<<13)|0;zt=(Ut+(Nt>>>13)|0)+(eo>>>26)|0,eo&=67108863,Ft=Math.imul(pn,On),Nt=Math.imul(pn,Zn),Nt=Nt+Math.imul(kn,On)|0,Ut=Math.imul(kn,Zn),Ft=Ft+Math.imul(An,qn)|0,Nt=Nt+Math.imul(An,zn)|0,Nt=Nt+Math.imul(wn,qn)|0,Ut=Ut+Math.imul(wn,zn)|0,Ft=Ft+Math.imul(cn,Hn)|0,Nt=Nt+Math.imul(cn,pr)|0,Nt=Nt+Math.imul(mn,Hn)|0,Ut=Ut+Math.imul(mn,pr)|0,Ft=Ft+Math.imul($n,xr)|0,Nt=Nt+Math.imul($n,io)|0,Nt=Nt+Math.imul(Nn,xr)|0,Ut=Ut+Math.imul(Nn,io)|0,Ft=Ft+Math.imul(Qt,Ar)|0,Nt=Nt+Math.imul(Qt,qr)|0,Nt=Nt+Math.imul(_n,Ar)|0,Ut=Ut+Math.imul(_n,qr)|0,Ft=Ft+Math.imul(hn,Fr)|0,Nt=Nt+Math.imul(hn,ao)|0,Nt=Nt+Math.imul(vn,Fr)|0,Ut=Ut+Math.imul(vn,ao)|0,Ft=Ft+Math.imul(Kt,Dr)|0,Nt=Nt+Math.imul(Kt,go)|0,Nt=Nt+Math.imul(rn,Dr)|0,Ut=Ut+Math.imul(rn,go)|0,Ft=Ft+Math.imul(Ht,Mn)|0,Nt=Nt+Math.imul(Ht,dn)|0,Nt=Nt+Math.imul(en,Mn)|0,Ut=Ut+Math.imul(en,dn)|0;var Zr=(zt+Ft|0)+((Nt&8191)<<13)|0;zt=(Ut+(Nt>>>13)|0)+(Zr>>>26)|0,Zr&=67108863,Ft=Math.imul(un,On),Nt=Math.imul(un,Zn),Nt=Nt+Math.imul(Zt,On)|0,Ut=Math.imul(Zt,Zn),Ft=Ft+Math.imul(pn,qn)|0,Nt=Nt+Math.imul(pn,zn)|0,Nt=Nt+Math.imul(kn,qn)|0,Ut=Ut+Math.imul(kn,zn)|0,Ft=Ft+Math.imul(An,Hn)|0,Nt=Nt+Math.imul(An,pr)|0,Nt=Nt+Math.imul(wn,Hn)|0,Ut=Ut+Math.imul(wn,pr)|0,Ft=Ft+Math.imul(cn,xr)|0,Nt=Nt+Math.imul(cn,io)|0,Nt=Nt+Math.imul(mn,xr)|0,Ut=Ut+Math.imul(mn,io)|0,Ft=Ft+Math.imul($n,Ar)|0,Nt=Nt+Math.imul($n,qr)|0,Nt=Nt+Math.imul(Nn,Ar)|0,Ut=Ut+Math.imul(Nn,qr)|0,Ft=Ft+Math.imul(Qt,Fr)|0,Nt=Nt+Math.imul(Qt,ao)|0,Nt=Nt+Math.imul(_n,Fr)|0,Ut=Ut+Math.imul(_n,ao)|0,Ft=Ft+Math.imul(hn,Dr)|0,Nt=Nt+Math.imul(hn,go)|0,Nt=Nt+Math.imul(vn,Dr)|0,Ut=Ut+Math.imul(vn,go)|0,Ft=Ft+Math.imul(Kt,Mn)|0,Nt=Nt+Math.imul(Kt,dn)|0,Nt=Nt+Math.imul(rn,Mn)|0,Ut=Ut+Math.imul(rn,dn)|0,Ft=Ft+Math.imul(Ht,En)|0,Nt=Nt+Math.imul(Ht,Ln)|0,Nt=Nt+Math.imul(en,En)|0,Ut=Ut+Math.imul(en,Ln)|0;var Jr=(zt+Ft|0)+((Nt&8191)<<13)|0;zt=(Ut+(Nt>>>13)|0)+(Jr>>>26)|0,Jr&=67108863,Ft=Math.imul(Sn,On),Nt=Math.imul(Sn,Zn),Nt=Nt+Math.imul(Rn,On)|0,Ut=Math.imul(Rn,Zn),Ft=Ft+Math.imul(un,qn)|0,Nt=Nt+Math.imul(un,zn)|0,Nt=Nt+Math.imul(Zt,qn)|0,Ut=Ut+Math.imul(Zt,zn)|0,Ft=Ft+Math.imul(pn,Hn)|0,Nt=Nt+Math.imul(pn,pr)|0,Nt=Nt+Math.imul(kn,Hn)|0,Ut=Ut+Math.imul(kn,pr)|0,Ft=Ft+Math.imul(An,xr)|0,Nt=Nt+Math.imul(An,io)|0,Nt=Nt+Math.imul(wn,xr)|0,Ut=Ut+Math.imul(wn,io)|0,Ft=Ft+Math.imul(cn,Ar)|0,Nt=Nt+Math.imul(cn,qr)|0,Nt=Nt+Math.imul(mn,Ar)|0,Ut=Ut+Math.imul(mn,qr)|0,Ft=Ft+Math.imul($n,Fr)|0,Nt=Nt+Math.imul($n,ao)|0,Nt=Nt+Math.imul(Nn,Fr)|0,Ut=Ut+Math.imul(Nn,ao)|0,Ft=Ft+Math.imul(Qt,Dr)|0,Nt=Nt+Math.imul(Qt,go)|0,Nt=Nt+Math.imul(_n,Dr)|0,Ut=Ut+Math.imul(_n,go)|0,Ft=Ft+Math.imul(hn,Mn)|0,Nt=Nt+Math.imul(hn,dn)|0,Nt=Nt+Math.imul(vn,Mn)|0,Ut=Ut+Math.imul(vn,dn)|0,Ft=Ft+Math.imul(Kt,En)|0,Nt=Nt+Math.imul(Kt,Ln)|0,Nt=Nt+Math.imul(rn,En)|0,Ut=Ut+Math.imul(rn,Ln)|0,Ft=Ft+Math.imul(Ht,Kn)|0,Nt=Nt+Math.imul(Ht,nr)|0,Nt=Nt+Math.imul(en,Kn)|0,Ut=Ut+Math.imul(en,nr)|0;var wr=(zt+Ft|0)+((Nt&8191)<<13)|0;zt=(Ut+(Nt>>>13)|0)+(wr>>>26)|0,wr&=67108863,Ft=Math.imul(Sn,qn),Nt=Math.imul(Sn,zn),Nt=Nt+Math.imul(Rn,qn)|0,Ut=Math.imul(Rn,zn),Ft=Ft+Math.imul(un,Hn)|0,Nt=Nt+Math.imul(un,pr)|0,Nt=Nt+Math.imul(Zt,Hn)|0,Ut=Ut+Math.imul(Zt,pr)|0,Ft=Ft+Math.imul(pn,xr)|0,Nt=Nt+Math.imul(pn,io)|0,Nt=Nt+Math.imul(kn,xr)|0,Ut=Ut+Math.imul(kn,io)|0,Ft=Ft+Math.imul(An,Ar)|0,Nt=Nt+Math.imul(An,qr)|0,Nt=Nt+Math.imul(wn,Ar)|0,Ut=Ut+Math.imul(wn,qr)|0,Ft=Ft+Math.imul(cn,Fr)|0,Nt=Nt+Math.imul(cn,ao)|0,Nt=Nt+Math.imul(mn,Fr)|0,Ut=Ut+Math.imul(mn,ao)|0,Ft=Ft+Math.imul($n,Dr)|0,Nt=Nt+Math.imul($n,go)|0,Nt=Nt+Math.imul(Nn,Dr)|0,Ut=Ut+Math.imul(Nn,go)|0,Ft=Ft+Math.imul(Qt,Mn)|0,Nt=Nt+Math.imul(Qt,dn)|0,Nt=Nt+Math.imul(_n,Mn)|0,Ut=Ut+Math.imul(_n,dn)|0,Ft=Ft+Math.imul(hn,En)|0,Nt=Nt+Math.imul(hn,Ln)|0,Nt=Nt+Math.imul(vn,En)|0,Ut=Ut+Math.imul(vn,Ln)|0,Ft=Ft+Math.imul(Kt,Kn)|0,Nt=Nt+Math.imul(Kt,nr)|0,Nt=Nt+Math.imul(rn,Kn)|0,Ut=Ut+Math.imul(rn,nr)|0;var Mr=(zt+Ft|0)+((Nt&8191)<<13)|0;zt=(Ut+(Nt>>>13)|0)+(Mr>>>26)|0,Mr&=67108863,Ft=Math.imul(Sn,Hn),Nt=Math.imul(Sn,pr),Nt=Nt+Math.imul(Rn,Hn)|0,Ut=Math.imul(Rn,pr),Ft=Ft+Math.imul(un,xr)|0,Nt=Nt+Math.imul(un,io)|0,Nt=Nt+Math.imul(Zt,xr)|0,Ut=Ut+Math.imul(Zt,io)|0,Ft=Ft+Math.imul(pn,Ar)|0,Nt=Nt+Math.imul(pn,qr)|0,Nt=Nt+Math.imul(kn,Ar)|0,Ut=Ut+Math.imul(kn,qr)|0,Ft=Ft+Math.imul(An,Fr)|0,Nt=Nt+Math.imul(An,ao)|0,Nt=Nt+Math.imul(wn,Fr)|0,Ut=Ut+Math.imul(wn,ao)|0,Ft=Ft+Math.imul(cn,Dr)|0,Nt=Nt+Math.imul(cn,go)|0,Nt=Nt+Math.imul(mn,Dr)|0,Ut=Ut+Math.imul(mn,go)|0,Ft=Ft+Math.imul($n,Mn)|0,Nt=Nt+Math.imul($n,dn)|0,Nt=Nt+Math.imul(Nn,Mn)|0,Ut=Ut+Math.imul(Nn,dn)|0,Ft=Ft+Math.imul(Qt,En)|0,Nt=Nt+Math.imul(Qt,Ln)|0,Nt=Nt+Math.imul(_n,En)|0,Ut=Ut+Math.imul(_n,Ln)|0,Ft=Ft+Math.imul(hn,Kn)|0,Nt=Nt+Math.imul(hn,nr)|0,Nt=Nt+Math.imul(vn,Kn)|0,Ut=Ut+Math.imul(vn,nr)|0;var Ur=(zt+Ft|0)+((Nt&8191)<<13)|0;zt=(Ut+(Nt>>>13)|0)+(Ur>>>26)|0,Ur&=67108863,Ft=Math.imul(Sn,xr),Nt=Math.imul(Sn,io),Nt=Nt+Math.imul(Rn,xr)|0,Ut=Math.imul(Rn,io),Ft=Ft+Math.imul(un,Ar)|0,Nt=Nt+Math.imul(un,qr)|0,Nt=Nt+Math.imul(Zt,Ar)|0,Ut=Ut+Math.imul(Zt,qr)|0,Ft=Ft+Math.imul(pn,Fr)|0,Nt=Nt+Math.imul(pn,ao)|0,Nt=Nt+Math.imul(kn,Fr)|0,Ut=Ut+Math.imul(kn,ao)|0,Ft=Ft+Math.imul(An,Dr)|0,Nt=Nt+Math.imul(An,go)|0,Nt=Nt+Math.imul(wn,Dr)|0,Ut=Ut+Math.imul(wn,go)|0,Ft=Ft+Math.imul(cn,Mn)|0,Nt=Nt+Math.imul(cn,dn)|0,Nt=Nt+Math.imul(mn,Mn)|0,Ut=Ut+Math.imul(mn,dn)|0,Ft=Ft+Math.imul($n,En)|0,Nt=Nt+Math.imul($n,Ln)|0,Nt=Nt+Math.imul(Nn,En)|0,Ut=Ut+Math.imul(Nn,Ln)|0,Ft=Ft+Math.imul(Qt,Kn)|0,Nt=Nt+Math.imul(Qt,nr)|0,Nt=Nt+Math.imul(_n,Kn)|0,Ut=Ut+Math.imul(_n,nr)|0;var Rr=(zt+Ft|0)+((Nt&8191)<<13)|0;zt=(Ut+(Nt>>>13)|0)+(Rr>>>26)|0,Rr&=67108863,Ft=Math.imul(Sn,Ar),Nt=Math.imul(Sn,qr),Nt=Nt+Math.imul(Rn,Ar)|0,Ut=Math.imul(Rn,qr),Ft=Ft+Math.imul(un,Fr)|0,Nt=Nt+Math.imul(un,ao)|0,Nt=Nt+Math.imul(Zt,Fr)|0,Ut=Ut+Math.imul(Zt,ao)|0,Ft=Ft+Math.imul(pn,Dr)|0,Nt=Nt+Math.imul(pn,go)|0,Nt=Nt+Math.imul(kn,Dr)|0,Ut=Ut+Math.imul(kn,go)|0,Ft=Ft+Math.imul(An,Mn)|0,Nt=Nt+Math.imul(An,dn)|0,Nt=Nt+Math.imul(wn,Mn)|0,Ut=Ut+Math.imul(wn,dn)|0,Ft=Ft+Math.imul(cn,En)|0,Nt=Nt+Math.imul(cn,Ln)|0,Nt=Nt+Math.imul(mn,En)|0,Ut=Ut+Math.imul(mn,Ln)|0,Ft=Ft+Math.imul($n,Kn)|0,Nt=Nt+Math.imul($n,nr)|0,Nt=Nt+Math.imul(Nn,Kn)|0,Ut=Ut+Math.imul(Nn,nr)|0;var Pr=(zt+Ft|0)+((Nt&8191)<<13)|0;zt=(Ut+(Nt>>>13)|0)+(Pr>>>26)|0,Pr&=67108863,Ft=Math.imul(Sn,Fr),Nt=Math.imul(Sn,ao),Nt=Nt+Math.imul(Rn,Fr)|0,Ut=Math.imul(Rn,ao),Ft=Ft+Math.imul(un,Dr)|0,Nt=Nt+Math.imul(un,go)|0,Nt=Nt+Math.imul(Zt,Dr)|0,Ut=Ut+Math.imul(Zt,go)|0,Ft=Ft+Math.imul(pn,Mn)|0,Nt=Nt+Math.imul(pn,dn)|0,Nt=Nt+Math.imul(kn,Mn)|0,Ut=Ut+Math.imul(kn,dn)|0,Ft=Ft+Math.imul(An,En)|0,Nt=Nt+Math.imul(An,Ln)|0,Nt=Nt+Math.imul(wn,En)|0,Ut=Ut+Math.imul(wn,Ln)|0,Ft=Ft+Math.imul(cn,Kn)|0,Nt=Nt+Math.imul(cn,nr)|0,Nt=Nt+Math.imul(mn,Kn)|0,Ut=Ut+Math.imul(mn,nr)|0;var Lr=(zt+Ft|0)+((Nt&8191)<<13)|0;zt=(Ut+(Nt>>>13)|0)+(Lr>>>26)|0,Lr&=67108863,Ft=Math.imul(Sn,Dr),Nt=Math.imul(Sn,go),Nt=Nt+Math.imul(Rn,Dr)|0,Ut=Math.imul(Rn,go),Ft=Ft+Math.imul(un,Mn)|0,Nt=Nt+Math.imul(un,dn)|0,Nt=Nt+Math.imul(Zt,Mn)|0,Ut=Ut+Math.imul(Zt,dn)|0,Ft=Ft+Math.imul(pn,En)|0,Nt=Nt+Math.imul(pn,Ln)|0,Nt=Nt+Math.imul(kn,En)|0,Ut=Ut+Math.imul(kn,Ln)|0,Ft=Ft+Math.imul(An,Kn)|0,Nt=Nt+Math.imul(An,nr)|0,Nt=Nt+Math.imul(wn,Kn)|0,Ut=Ut+Math.imul(wn,nr)|0;var Wr=(zt+Ft|0)+((Nt&8191)<<13)|0;zt=(Ut+(Nt>>>13)|0)+(Wr>>>26)|0,Wr&=67108863,Ft=Math.imul(Sn,Mn),Nt=Math.imul(Sn,dn),Nt=Nt+Math.imul(Rn,Mn)|0,Ut=Math.imul(Rn,dn),Ft=Ft+Math.imul(un,En)|0,Nt=Nt+Math.imul(un,Ln)|0,Nt=Nt+Math.imul(Zt,En)|0,Ut=Ut+Math.imul(Zt,Ln)|0,Ft=Ft+Math.imul(pn,Kn)|0,Nt=Nt+Math.imul(pn,nr)|0,Nt=Nt+Math.imul(kn,Kn)|0,Ut=Ut+Math.imul(kn,nr)|0;var Br=(zt+Ft|0)+((Nt&8191)<<13)|0;zt=(Ut+(Nt>>>13)|0)+(Br>>>26)|0,Br&=67108863,Ft=Math.imul(Sn,En),Nt=Math.imul(Sn,Ln),Nt=Nt+Math.imul(Rn,En)|0,Ut=Math.imul(Rn,Ln),Ft=Ft+Math.imul(un,Kn)|0,Nt=Nt+Math.imul(un,nr)|0,Nt=Nt+Math.imul(Zt,Kn)|0,Ut=Ut+Math.imul(Zt,nr)|0;var tr=(zt+Ft|0)+((Nt&8191)<<13)|0;zt=(Ut+(Nt>>>13)|0)+(tr>>>26)|0,tr&=67108863,Ft=Math.imul(Sn,Kn),Nt=Math.imul(Sn,nr),Nt=Nt+Math.imul(Rn,Kn)|0,Ut=Math.imul(Rn,nr);var ir=(zt+Ft|0)+((Nt&8191)<<13)|0;return zt=(Ut+(Nt>>>13)|0)+(ir>>>26)|0,ir&=67108863,Wt[0]=lr,Wt[1]=cr,Wt[2]=Hr,Wt[3]=vr,Wt[4]=Nr,Wt[5]=Gr,Wt[6]=eo,Wt[7]=Zr,Wt[8]=Jr,Wt[9]=wr,Wt[10]=Mr,Wt[11]=Ur,Wt[12]=Rr,Wt[13]=Pr,Wt[14]=Lr,Wt[15]=Wr,Wt[16]=Br,Wt[17]=tr,Wt[18]=ir,zt!==0&&(Wt[19]=zt,wt.length++),wt};Math.imul||(gt=mt);function yt(jt,Pt,Ct){Ct.negative=Pt.negative^jt.negative,Ct.length=jt.length+Pt.length;for(var wt=0,It=0,Ot=0;Ot>>26)|0,It+=Wt>>>26,Wt&=67108863}Ct.words[Ot]=zt,wt=Wt,Wt=It}return wt!==0?Ct.words[Ot]=wt:Ct.length--,Ct.strip()}function bt(jt,Pt,Ct){var wt=new vt;return wt.mulp(jt,Pt,Ct)}ot.prototype.mulTo=function(Pt,Ct){var wt,It=this.length+Pt.length;return this.length===10&&Pt.length===10?wt=gt(this,Pt,Ct):It<63?wt=mt(this,Pt,Ct):It<1024?wt=yt(this,Pt,Ct):wt=bt(this,Pt,Ct),wt};function vt(jt,Pt){this.x=jt,this.y=Pt}vt.prototype.makeRBT=function(Pt){for(var Ct=new Array(Pt),wt=ot.prototype._countBits(Pt)-1,It=0;It>=1;return It},vt.prototype.permute=function(Pt,Ct,wt,It,Ot,Wt){for(var zt=0;zt>>1)Ot++;return 1<>>13,wt[2*Wt+1]=Ot&8191,Ot=Ot>>>13;for(Wt=2*Ct;Wt>=26,Ct+=It/67108864|0,Ct+=Ot>>>26,this.words[wt]=Ot&67108863}return Ct!==0&&(this.words[wt]=Ct,this.length++),this},ot.prototype.muln=function(Pt){return this.clone().imuln(Pt)},ot.prototype.sqr=function(){return this.mul(this)},ot.prototype.isqr=function(){return this.imul(this.clone())},ot.prototype.pow=function(Pt){var Ct=pt(Pt);if(Ct.length===0)return new ot(1);for(var wt=this,It=0;It=0);var Ct=Pt%26,wt=(Pt-Ct)/26,It=67108863>>>26-Ct<<26-Ct,Ot;if(Ct!==0){var Wt=0;for(Ot=0;Ot>>26-Ct}Wt&&(this.words[Ot]=Wt,this.length++)}if(wt!==0){for(Ot=this.length-1;Ot>=0;Ot--)this.words[Ot+wt]=this.words[Ot];for(Ot=0;Ot=0);var It;Ct?It=(Ct-Ct%26)/26:It=0;var Ot=Pt%26,Wt=Math.min((Pt-Ot)/26,this.length),zt=67108863^67108863>>>Ot<Wt)for(this.length-=Wt,Nt=0;Nt=0&&(Ut!==0||Nt>=It);Nt--){var Mt=this.words[Nt]|0;this.words[Nt]=Ut<<26-Ot|Mt>>>Ot,Ut=Mt&zt}return Ft&&Ut!==0&&(Ft.words[Ft.length++]=Ut),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},ot.prototype.ishrn=function(Pt,Ct,wt){return rt(this.negative===0),this.iushrn(Pt,Ct,wt)},ot.prototype.shln=function(Pt){return this.clone().ishln(Pt)},ot.prototype.ushln=function(Pt){return this.clone().iushln(Pt)},ot.prototype.shrn=function(Pt){return this.clone().ishrn(Pt)},ot.prototype.ushrn=function(Pt){return this.clone().iushrn(Pt)},ot.prototype.testn=function(Pt){rt(typeof Pt=="number"&&Pt>=0);var Ct=Pt%26,wt=(Pt-Ct)/26,It=1<=0);var Ct=Pt%26,wt=(Pt-Ct)/26;if(rt(this.negative===0,"imaskn works only with positive numbers"),this.length<=wt)return this;if(Ct!==0&&wt++,this.length=Math.min(wt,this.length),Ct!==0){var It=67108863^67108863>>>Ct<=67108864;Ct++)this.words[Ct]-=67108864,Ct===this.length-1?this.words[Ct+1]=1:this.words[Ct+1]++;return this.length=Math.max(this.length,Ct+1),this},ot.prototype.isubn=function(Pt){if(rt(typeof Pt=="number"),rt(Pt<67108864),Pt<0)return this.iaddn(-Pt);if(this.negative!==0)return this.negative=0,this.iaddn(Pt),this.negative=1,this;if(this.words[0]-=Pt,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var Ct=0;Ct>26)-(Ft/67108864|0),this.words[Ot+wt]=Wt&67108863}for(;Ot>26,this.words[Ot+wt]=Wt&67108863;if(zt===0)return this.strip();for(rt(zt===-1),zt=0,Ot=0;Ot>26,this.words[Ot]=Wt&67108863;return this.negative=1,this.strip()},ot.prototype._wordDiv=function(Pt,Ct){var wt=this.length-Pt.length,It=this.clone(),Ot=Pt,Wt=Ot.words[Ot.length-1]|0,zt=this._countBits(Wt);wt=26-zt,wt!==0&&(Ot=Ot.ushln(wt),It.iushln(wt),Wt=Ot.words[Ot.length-1]|0);var Ft=It.length-Ot.length,Nt;if(Ct!=="mod"){Nt=new ot(null),Nt.length=Ft+1,Nt.words=new Array(Nt.length);for(var Ut=0;Ut=0;Ht--){var en=(It.words[Ot.length+Ht]|0)*67108864+(It.words[Ot.length+Ht-1]|0);for(en=Math.min(en/Wt|0,67108863),It._ishlnsubmul(Ot,en,Ht);It.negative!==0;)en--,It.negative=0,It._ishlnsubmul(Ot,1,Ht),It.isZero()||(It.negative^=1);Nt&&(Nt.words[Ht]=en)}return Nt&&Nt.strip(),It.strip(),Ct!=="div"&&wt!==0&&It.iushrn(wt),{div:Nt||null,mod:It}},ot.prototype.divmod=function(Pt,Ct,wt){if(rt(!Pt.isZero()),this.isZero())return{div:new ot(0),mod:new ot(0)};var It,Ot,Wt;return this.negative!==0&&Pt.negative===0?(Wt=this.neg().divmod(Pt,Ct),Ct!=="mod"&&(It=Wt.div.neg()),Ct!=="div"&&(Ot=Wt.mod.neg(),wt&&Ot.negative!==0&&Ot.iadd(Pt)),{div:It,mod:Ot}):this.negative===0&&Pt.negative!==0?(Wt=this.divmod(Pt.neg(),Ct),Ct!=="mod"&&(It=Wt.div.neg()),{div:It,mod:Wt.mod}):this.negative&Pt.negative?(Wt=this.neg().divmod(Pt.neg(),Ct),Ct!=="div"&&(Ot=Wt.mod.neg(),wt&&Ot.negative!==0&&Ot.isub(Pt)),{div:Wt.div,mod:Ot}):Pt.length>this.length||this.cmp(Pt)<0?{div:new ot(0),mod:this}:Pt.length===1?Ct==="div"?{div:this.divn(Pt.words[0]),mod:null}:Ct==="mod"?{div:null,mod:new ot(this.modn(Pt.words[0]))}:{div:this.divn(Pt.words[0]),mod:new ot(this.modn(Pt.words[0]))}:this._wordDiv(Pt,Ct)},ot.prototype.div=function(Pt){return this.divmod(Pt,"div",!1).div},ot.prototype.mod=function(Pt){return this.divmod(Pt,"mod",!1).mod},ot.prototype.umod=function(Pt){return this.divmod(Pt,"mod",!0).mod},ot.prototype.divRound=function(Pt){var Ct=this.divmod(Pt);if(Ct.mod.isZero())return Ct.div;var wt=Ct.div.negative!==0?Ct.mod.isub(Pt):Ct.mod,It=Pt.ushrn(1),Ot=Pt.andln(1),Wt=wt.cmp(It);return Wt<0||Ot===1&&Wt===0?Ct.div:Ct.div.negative!==0?Ct.div.isubn(1):Ct.div.iaddn(1)},ot.prototype.modn=function(Pt){rt(Pt<=67108863);for(var Ct=(1<<26)%Pt,wt=0,It=this.length-1;It>=0;It--)wt=(Ct*wt+(this.words[It]|0))%Pt;return wt},ot.prototype.idivn=function(Pt){rt(Pt<=67108863);for(var Ct=0,wt=this.length-1;wt>=0;wt--){var It=(this.words[wt]|0)+Ct*67108864;this.words[wt]=It/Pt|0,Ct=It%Pt}return this.strip()},ot.prototype.divn=function(Pt){return this.clone().idivn(Pt)},ot.prototype.egcd=function(Pt){rt(Pt.negative===0),rt(!Pt.isZero());var Ct=this,wt=Pt.clone();Ct.negative!==0?Ct=Ct.umod(Pt):Ct=Ct.clone();for(var It=new ot(1),Ot=new ot(0),Wt=new ot(0),zt=new ot(1),Ft=0;Ct.isEven()&&wt.isEven();)Ct.iushrn(1),wt.iushrn(1),++Ft;for(var Nt=wt.clone(),Ut=Ct.clone();!Ct.isZero();){for(var Mt=0,Ht=1;!(Ct.words[0]&Ht)&&Mt<26;++Mt,Ht<<=1);if(Mt>0)for(Ct.iushrn(Mt);Mt-- >0;)(It.isOdd()||Ot.isOdd())&&(It.iadd(Nt),Ot.isub(Ut)),It.iushrn(1),Ot.iushrn(1);for(var en=0,sn=1;!(wt.words[0]&sn)&&en<26;++en,sn<<=1);if(en>0)for(wt.iushrn(en);en-- >0;)(Wt.isOdd()||zt.isOdd())&&(Wt.iadd(Nt),zt.isub(Ut)),Wt.iushrn(1),zt.iushrn(1);Ct.cmp(wt)>=0?(Ct.isub(wt),It.isub(Wt),Ot.isub(zt)):(wt.isub(Ct),Wt.isub(It),zt.isub(Ot))}return{a:Wt,b:zt,gcd:wt.iushln(Ft)}},ot.prototype._invmp=function(Pt){rt(Pt.negative===0),rt(!Pt.isZero());var Ct=this,wt=Pt.clone();Ct.negative!==0?Ct=Ct.umod(Pt):Ct=Ct.clone();for(var It=new ot(1),Ot=new ot(0),Wt=wt.clone();Ct.cmpn(1)>0&&wt.cmpn(1)>0;){for(var zt=0,Ft=1;!(Ct.words[0]&Ft)&&zt<26;++zt,Ft<<=1);if(zt>0)for(Ct.iushrn(zt);zt-- >0;)It.isOdd()&&It.iadd(Wt),It.iushrn(1);for(var Nt=0,Ut=1;!(wt.words[0]&Ut)&&Nt<26;++Nt,Ut<<=1);if(Nt>0)for(wt.iushrn(Nt);Nt-- >0;)Ot.isOdd()&&Ot.iadd(Wt),Ot.iushrn(1);Ct.cmp(wt)>=0?(Ct.isub(wt),It.isub(Ot)):(wt.isub(Ct),Ot.isub(It))}var Mt;return Ct.cmpn(1)===0?Mt=It:Mt=Ot,Mt.cmpn(0)<0&&Mt.iadd(Pt),Mt},ot.prototype.gcd=function(Pt){if(this.isZero())return Pt.abs();if(Pt.isZero())return this.abs();var Ct=this.clone(),wt=Pt.clone();Ct.negative=0,wt.negative=0;for(var It=0;Ct.isEven()&&wt.isEven();It++)Ct.iushrn(1),wt.iushrn(1);do{for(;Ct.isEven();)Ct.iushrn(1);for(;wt.isEven();)wt.iushrn(1);var Ot=Ct.cmp(wt);if(Ot<0){var Wt=Ct;Ct=wt,wt=Wt}else if(Ot===0||wt.cmpn(1)===0)break;Ct.isub(wt)}while(!0);return wt.iushln(It)},ot.prototype.invm=function(Pt){return this.egcd(Pt).a.umod(Pt)},ot.prototype.isEven=function(){return(this.words[0]&1)===0},ot.prototype.isOdd=function(){return(this.words[0]&1)===1},ot.prototype.andln=function(Pt){return this.words[0]&Pt},ot.prototype.bincn=function(Pt){rt(typeof Pt=="number");var Ct=Pt%26,wt=(Pt-Ct)/26,It=1<>>26,zt&=67108863,this.words[Wt]=zt}return Ot!==0&&(this.words[Wt]=Ot,this.length++),this},ot.prototype.isZero=function(){return this.length===1&&this.words[0]===0},ot.prototype.cmpn=function(Pt){var Ct=Pt<0;if(this.negative!==0&&!Ct)return-1;if(this.negative===0&&Ct)return 1;this.strip();var wt;if(this.length>1)wt=1;else{Ct&&(Pt=-Pt),rt(Pt<=67108863,"Number is too big");var It=this.words[0]|0;wt=It===Pt?0:ItPt.length)return 1;if(this.length=0;wt--){var It=this.words[wt]|0,Ot=Pt.words[wt]|0;if(It!==Ot){ItOt&&(Ct=1);break}}return Ct},ot.prototype.gtn=function(Pt){return this.cmpn(Pt)===1},ot.prototype.gt=function(Pt){return this.cmp(Pt)===1},ot.prototype.gten=function(Pt){return this.cmpn(Pt)>=0},ot.prototype.gte=function(Pt){return this.cmp(Pt)>=0},ot.prototype.ltn=function(Pt){return this.cmpn(Pt)===-1},ot.prototype.lt=function(Pt){return this.cmp(Pt)===-1},ot.prototype.lten=function(Pt){return this.cmpn(Pt)<=0},ot.prototype.lte=function(Pt){return this.cmp(Pt)<=0},ot.prototype.eqn=function(Pt){return this.cmpn(Pt)===0},ot.prototype.eq=function(Pt){return this.cmp(Pt)===0},ot.red=function(Pt){return new $t(Pt)},ot.prototype.toRed=function(Pt){return rt(!this.red,"Already a number in reduction context"),rt(this.negative===0,"red works only with positives"),Pt.convertTo(this)._forceRed(Pt)},ot.prototype.fromRed=function(){return rt(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},ot.prototype._forceRed=function(Pt){return this.red=Pt,this},ot.prototype.forceRed=function(Pt){return rt(!this.red,"Already a number in reduction context"),this._forceRed(Pt)},ot.prototype.redAdd=function(Pt){return rt(this.red,"redAdd works only with red numbers"),this.red.add(this,Pt)},ot.prototype.redIAdd=function(Pt){return rt(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,Pt)},ot.prototype.redSub=function(Pt){return rt(this.red,"redSub works only with red numbers"),this.red.sub(this,Pt)},ot.prototype.redISub=function(Pt){return rt(this.red,"redISub works only with red numbers"),this.red.isub(this,Pt)},ot.prototype.redShl=function(Pt){return rt(this.red,"redShl works only with red numbers"),this.red.shl(this,Pt)},ot.prototype.redMul=function(Pt){return rt(this.red,"redMul works only with red numbers"),this.red._verify2(this,Pt),this.red.mul(this,Pt)},ot.prototype.redIMul=function(Pt){return rt(this.red,"redMul works only with red numbers"),this.red._verify2(this,Pt),this.red.imul(this,Pt)},ot.prototype.redSqr=function(){return rt(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},ot.prototype.redISqr=function(){return rt(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},ot.prototype.redSqrt=function(){return rt(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},ot.prototype.redInvm=function(){return rt(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},ot.prototype.redNeg=function(){return rt(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},ot.prototype.redPow=function(Pt){return rt(this.red&&!Pt.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,Pt)};var xt={k256:null,p224:null,p192:null,p25519:null};function kt(jt,Pt){this.name=jt,this.p=new ot(Pt,16),this.n=this.p.bitLength(),this.k=new ot(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}kt.prototype._tmp=function(){var Pt=new ot(null);return Pt.words=new Array(Math.ceil(this.n/13)),Pt},kt.prototype.ireduce=function(Pt){var Ct=Pt,wt;do this.split(Ct,this.tmp),Ct=this.imulK(Ct),Ct=Ct.iadd(this.tmp),wt=Ct.bitLength();while(wt>this.n);var It=wt0?Ct.isub(this.p):Ct.strip!==void 0?Ct.strip():Ct._strip(),Ct},kt.prototype.split=function(Pt,Ct){Pt.iushrn(this.n,0,Ct)},kt.prototype.imulK=function(Pt){return Pt.imul(this.k)};function St(){kt.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}it(St,kt),St.prototype.split=function(Pt,Ct){for(var wt=4194303,It=Math.min(Pt.length,9),Ot=0;Ot>>22,Wt=zt}Wt>>>=22,Pt.words[Ot-10]=Wt,Wt===0&&Pt.length>10?Pt.length-=10:Pt.length-=9},St.prototype.imulK=function(Pt){Pt.words[Pt.length]=0,Pt.words[Pt.length+1]=0,Pt.length+=2;for(var Ct=0,wt=0;wt>>=26,Pt.words[wt]=Ot,Ct=It}return Ct!==0&&(Pt.words[Pt.length++]=Ct),Pt},ot._prime=function(Pt){if(xt[Pt])return xt[Pt];var Ct;if(Pt==="k256")Ct=new St;else if(Pt==="p224")Ct=new Tt;else if(Pt==="p192")Ct=new At;else if(Pt==="p25519")Ct=new Et;else throw new Error("Unknown prime "+Pt);return xt[Pt]=Ct,Ct};function $t(jt){if(typeof jt=="string"){var Pt=ot._prime(jt);this.m=Pt.p,this.prime=Pt}else rt(jt.gtn(1),"modulus must be greater than 1"),this.m=jt,this.prime=null}$t.prototype._verify1=function(Pt){rt(Pt.negative===0,"red works only with positives"),rt(Pt.red,"red works only with red numbers")},$t.prototype._verify2=function(Pt,Ct){rt((Pt.negative|Ct.negative)===0,"red works only with positives"),rt(Pt.red&&Pt.red===Ct.red,"red works only with red numbers")},$t.prototype.imod=function(Pt){return this.prime?this.prime.ireduce(Pt)._forceRed(this):Pt.umod(this.m)._forceRed(this)},$t.prototype.neg=function(Pt){return Pt.isZero()?Pt.clone():this.m.sub(Pt)._forceRed(this)},$t.prototype.add=function(Pt,Ct){this._verify2(Pt,Ct);var wt=Pt.add(Ct);return wt.cmp(this.m)>=0&&wt.isub(this.m),wt._forceRed(this)},$t.prototype.iadd=function(Pt,Ct){this._verify2(Pt,Ct);var wt=Pt.iadd(Ct);return wt.cmp(this.m)>=0&&wt.isub(this.m),wt},$t.prototype.sub=function(Pt,Ct){this._verify2(Pt,Ct);var wt=Pt.sub(Ct);return wt.cmpn(0)<0&&wt.iadd(this.m),wt._forceRed(this)},$t.prototype.isub=function(Pt,Ct){this._verify2(Pt,Ct);var wt=Pt.isub(Ct);return wt.cmpn(0)<0&&wt.iadd(this.m),wt},$t.prototype.shl=function(Pt,Ct){return this._verify1(Pt),this.imod(Pt.ushln(Ct))},$t.prototype.imul=function(Pt,Ct){return this._verify2(Pt,Ct),this.imod(Pt.imul(Ct))},$t.prototype.mul=function(Pt,Ct){return this._verify2(Pt,Ct),this.imod(Pt.mul(Ct))},$t.prototype.isqr=function(Pt){return this.imul(Pt,Pt.clone())},$t.prototype.sqr=function(Pt){return this.mul(Pt,Pt)},$t.prototype.sqrt=function(Pt){if(Pt.isZero())return Pt.clone();var Ct=this.m.andln(3);if(rt(Ct%2===1),Ct===3){var wt=this.m.add(new ot(1)).iushrn(2);return this.pow(Pt,wt)}for(var It=this.m.subn(1),Ot=0;!It.isZero()&&It.andln(1)===0;)Ot++,It.iushrn(1);rt(!It.isZero());var Wt=new ot(1).toRed(this),zt=Wt.redNeg(),Ft=this.m.subn(1).iushrn(1),Nt=this.m.bitLength();for(Nt=new ot(2*Nt*Nt).toRed(this);this.pow(Nt,Ft).cmp(zt)!==0;)Nt.redIAdd(zt);for(var Ut=this.pow(Nt,It),Mt=this.pow(Pt,It.addn(1).iushrn(1)),Ht=this.pow(Pt,It),en=Ot;Ht.cmp(Wt)!==0;){for(var sn=Ht,Kt=0;sn.cmp(Wt)!==0;Kt++)sn=sn.redSqr();rt(Kt=0;Ot--){for(var Ut=Ct.words[Ot],Mt=Nt-1;Mt>=0;Mt--){var Ht=Ut>>Mt&1;if(Wt!==It[0]&&(Wt=this.sqr(Wt)),Ht===0&&zt===0){Ft=0;continue}zt<<=1,zt|=Ht,Ft++,!(Ft!==wt&&(Ot!==0||Mt!==0))&&(Wt=this.mul(Wt,It[zt]),Ft=0,zt=0)}Nt=26}return Wt},$t.prototype.convertTo=function(Pt){var Ct=Pt.umod(this.m);return Ct===Pt?Ct.clone():Ct},$t.prototype.convertFrom=function(Pt){var Ct=Pt.clone();return Ct.red=null,Ct},ot.mont=function(Pt){return new Dt(Pt)};function Dt(jt){$t.call(this,jt),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new ot(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}it(Dt,$t),Dt.prototype.convertTo=function(Pt){return this.imod(Pt.ushln(this.shift))},Dt.prototype.convertFrom=function(Pt){var Ct=this.imod(Pt.mul(this.rinv));return Ct.red=null,Ct},Dt.prototype.imul=function(Pt,Ct){if(Pt.isZero()||Ct.isZero())return Pt.words[0]=0,Pt.length=1,Pt;var wt=Pt.imul(Ct),It=wt.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),Ot=wt.isub(It).iushrn(this.shift),Wt=Ot;return Ot.cmp(this.m)>=0?Wt=Ot.isub(this.m):Ot.cmpn(0)<0&&(Wt=Ot.iadd(this.m)),Wt._forceRed(this)},Dt.prototype.mul=function(Pt,Ct){if(Pt.isZero()||Ct.isZero())return new ot(0)._forceRed(this);var wt=Pt.mul(Ct),It=wt.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),Ot=wt.isub(It).iushrn(this.shift),Wt=Ot;return Ot.cmp(this.m)>=0?Wt=Ot.isub(this.m):Ot.cmpn(0)<0&&(Wt=Ot.iadd(this.m)),Wt._forceRed(this)},Dt.prototype.invm=function(Pt){var Ct=this.imod(Pt._invmp(this.m).mul(this.r2));return Ct._forceRed(this)}})(tt,commonjsGlobal)})(bn$2);var bnExports$2=bn$2.exports,brorand={exports:{}},hasRequiredBrorand;function requireBrorand(){if(hasRequiredBrorand)return brorand.exports;hasRequiredBrorand=1;var tt;brorand.exports=function(it){return tt||(tt=new et(null)),tt.generate(it)};function et(rt){this.rand=rt}if(brorand.exports.Rand=et,et.prototype.generate=function(it){return this._rand(it)},et.prototype._rand=function(it){if(this.rand.getBytes)return this.rand.getBytes(it);for(var ot=new Uint8Array(it),at=0;at=0);return st},nt.prototype._randrange=function(it,ot){var at=ot.sub(it);return it.add(this._randbelow(at))},nt.prototype.test=function(it,ot,at){var st=it.bitLength(),lt=tt.mont(it),ct=new tt(1).toRed(lt);ot||(ot=Math.max(1,st/48|0));for(var ut=it.subn(1),ht=0;!ut.testn(ht);ht++);for(var dt=it.shrn(ht),pt=ut.toRed(lt),mt=!0;ot>0;ot--){var gt=this._randrange(new tt(2),ut);at&&at(gt);var yt=gt.toRed(lt).redPow(dt);if(!(yt.cmp(ct)===0||yt.cmp(pt)===0)){for(var bt=1;bt0;ot--){var pt=this._randrange(new tt(2),ct),mt=it.gcd(pt);if(mt.cmpn(1)!==0)return mt;var gt=pt.toRed(st).redPow(ht);if(!(gt.cmp(lt)===0||gt.cmp(dt)===0)){for(var yt=1;ytbt;)xt.ishrn(1);if(xt.isEven()&&xt.iadd(ot),xt.testn(1)||xt.iadd(at),vt.cmp(at)){if(!vt.cmp(st))for(;xt.mod(lt).cmp(ct);)xt.iadd(ht)}else for(;xt.mod(nt).cmp(ut);)xt.iadd(ht);if(kt=xt.shrn(1),mt(kt)&&mt(xt)&>(kt)&>(xt)&&it.test(kt)&&it.test(xt))return xt}}return generatePrime}const modp1={gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a63a3620ffffffffffffffff"},modp2={gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece65381ffffffffffffffff"},modp5={gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca237327ffffffffffffffff"},modp14={gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aacaa68ffffffffffffffff"},modp15={gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a93ad2caffffffffffffffff"},modp16={gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c934063199ffffffffffffffff"},modp17={gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dcc4024ffffffffffffffff"},modp18={gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dbe115974a3926f12fee5e438777cb6a932df8cd8bec4d073b931ba3bc832b68d9dd300741fa7bf8afc47ed2576f6936ba424663aab639c5ae4f5683423b4742bf1c978238f16cbe39d652de3fdb8befc848ad922222e04a4037c0713eb57a81a23f0c73473fc646cea306b4bcbc8862f8385ddfa9d4b7fa2c087e879683303ed5bdd3a062b3cf5b3a278a66d2a13f83f44f82ddf310ee074ab6a364597e899a0255dc164f31cc50846851df9ab48195ded7ea1b1d510bd7ee74d73faf36bc31ecfa268359046f4eb879f924009438b481c6cd7889a002ed5ee382bc9190da6fc026e479558e4475677e9aa9e3050e2765694dfc81f56e880b96e7160c980dd98edd3dfffffffffffffffff"},require$$1$1={modp1,modp2,modp5,modp14,modp15,modp16,modp17,modp18};var dh,hasRequiredDh;function requireDh(){if(hasRequiredDh)return dh;hasRequiredDh=1;var tt=bnExports$2,et=requireMr(),nt=new et,rt=new tt(24),it=new tt(11),ot=new tt(10),at=new tt(3),st=new tt(7),lt=requireGeneratePrime(),ct=browserExports;dh=mt;function ut(yt,bt){return bt=bt||"utf8",Buffer.isBuffer(yt)||(yt=new Buffer(yt,bt)),this._pub=new tt(yt),this}function ht(yt,bt){return bt=bt||"utf8",Buffer.isBuffer(yt)||(yt=new Buffer(yt,bt)),this._priv=new tt(yt),this}var dt={};function pt(yt,bt){var vt=bt.toString("hex"),xt=[vt,yt.toString(16)].join("_");if(xt in dt)return dt[xt];var kt=0;if(yt.isEven()||!lt.simpleSieve||!lt.fermatTest(yt)||!nt.test(yt))return kt+=1,vt==="02"||vt==="05"?kt+=8:kt+=4,dt[xt]=kt,kt;nt.test(yt.shrn(1))||(kt+=2);var St;switch(vt){case"02":yt.mod(rt).cmp(it)&&(kt+=8);break;case"05":St=yt.mod(ot),St.cmp(at)&&St.cmp(st)&&(kt+=8);break;default:kt+=4}return dt[xt]=kt,kt}function mt(yt,bt,vt){this.setGenerator(bt),this.__prime=new tt(yt),this._prime=tt.mont(this.__prime),this._primeLen=yt.length,this._pub=void 0,this._priv=void 0,this._primeCode=void 0,vt?(this.setPublicKey=ut,this.setPrivateKey=ht):this._primeCode=8}Object.defineProperty(mt.prototype,"verifyError",{enumerable:!0,get:function(){return typeof this._primeCode!="number"&&(this._primeCode=pt(this.__prime,this.__gen)),this._primeCode}}),mt.prototype.generateKeys=function(){return this._priv||(this._priv=new tt(ct(this._primeLen))),this._pub=this._gen.toRed(this._prime).redPow(this._priv).fromRed(),this.getPublicKey()},mt.prototype.computeSecret=function(yt){yt=new tt(yt),yt=yt.toRed(this._prime);var bt=yt.redPow(this._priv).fromRed(),vt=new Buffer(bt.toArray()),xt=this.getPrime();if(vt.length0?wt:It},ot.min=function(wt,It){return wt.cmp(It)<0?wt:It},ot.prototype._init=function(wt,It,Ot){if(typeof wt=="number")return this._initNumber(wt,It,Ot);if(typeof wt=="object")return this._initArray(wt,It,Ot);It==="hex"&&(It=16),rt(It===(It|0)&&It>=2&&It<=36),wt=wt.toString().replace(/\s+/g,"");var Wt=0;wt[0]==="-"&&(Wt++,this.negative=1),Wt=0;Wt-=3)Ft=wt[Wt]|wt[Wt-1]<<8|wt[Wt-2]<<16,this.words[zt]|=Ft<>>26-Nt&67108863,Nt+=24,Nt>=26&&(Nt-=26,zt++);else if(Ot==="le")for(Wt=0,zt=0;Wt>>26-Nt&67108863,Nt+=24,Nt>=26&&(Nt-=26,zt++);return this._strip()};function st(Ct,wt){var It=Ct.charCodeAt(wt);if(It>=48&&It<=57)return It-48;if(It>=65&&It<=70)return It-55;if(It>=97&&It<=102)return It-87;rt(!1,"Invalid character in "+Ct)}function lt(Ct,wt,It){var Ot=st(Ct,It);return It-1>=wt&&(Ot|=st(Ct,It-1)<<4),Ot}ot.prototype._parseHex=function(wt,It,Ot){this.length=Math.ceil((wt.length-It)/6),this.words=new Array(this.length);for(var Wt=0;Wt=It;Wt-=2)Nt=lt(wt,It,Wt)<=18?(zt-=18,Ft+=1,this.words[Ft]|=Nt>>>26):zt+=8;else{var Ut=wt.length-It;for(Wt=Ut%2===0?It+1:It;Wt=18?(zt-=18,Ft+=1,this.words[Ft]|=Nt>>>26):zt+=8}this._strip()};function ct(Ct,wt,It,Ot){for(var Wt=0,zt=0,Ft=Math.min(Ct.length,It),Nt=wt;Nt=49?zt=Ut-49+10:Ut>=17?zt=Ut-17+10:zt=Ut,rt(Ut>=0&&zt1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},ot.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},typeof Symbol<"u"&&typeof Symbol.for=="function")try{ot.prototype[Symbol.for("nodejs.util.inspect.custom")]=ht}catch{ot.prototype.inspect=ht}else ot.prototype.inspect=ht;function ht(){return(this.red?""}var dt=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],pt=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],mt=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];ot.prototype.toString=function(wt,It){wt=wt||10,It=It|0||1;var Ot;if(wt===16||wt==="hex"){Ot="";for(var Wt=0,zt=0,Ft=0;Ft>>24-Wt&16777215,Wt+=2,Wt>=26&&(Wt-=26,Ft--),zt!==0||Ft!==this.length-1?Ot=dt[6-Ut.length]+Ut+Ot:Ot=Ut+Ot}for(zt!==0&&(Ot=zt.toString(16)+Ot);Ot.length%It!==0;)Ot="0"+Ot;return this.negative!==0&&(Ot="-"+Ot),Ot}if(wt===(wt|0)&&wt>=2&&wt<=36){var Mt=pt[wt],Ht=mt[wt];Ot="";var en=this.clone();for(en.negative=0;!en.isZero();){var sn=en.modrn(Ht).toString(wt);en=en.idivn(Ht),en.isZero()?Ot=sn+Ot:Ot=dt[Mt-sn.length]+sn+Ot}for(this.isZero()&&(Ot="0"+Ot);Ot.length%It!==0;)Ot="0"+Ot;return this.negative!==0&&(Ot="-"+Ot),Ot}rt(!1,"Base should be between 2 and 36")},ot.prototype.toNumber=function(){var wt=this.words[0];return this.length===2?wt+=this.words[1]*67108864:this.length===3&&this.words[2]===1?wt+=4503599627370496+this.words[1]*67108864:this.length>2&&rt(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-wt:wt},ot.prototype.toJSON=function(){return this.toString(16,2)},at&&(ot.prototype.toBuffer=function(wt,It){return this.toArrayLike(at,wt,It)}),ot.prototype.toArray=function(wt,It){return this.toArrayLike(Array,wt,It)};var gt=function(wt,It){return wt.allocUnsafe?wt.allocUnsafe(It):new wt(It)};ot.prototype.toArrayLike=function(wt,It,Ot){this._strip();var Wt=this.byteLength(),zt=Ot||Math.max(1,Wt);rt(Wt<=zt,"byte array longer than desired length"),rt(zt>0,"Requested array length <= 0");var Ft=gt(wt,zt),Nt=It==="le"?"LE":"BE";return this["_toArrayLike"+Nt](Ft,Wt),Ft},ot.prototype._toArrayLikeLE=function(wt,It){for(var Ot=0,Wt=0,zt=0,Ft=0;zt>8&255),Ot>16&255),Ft===6?(Ot>24&255),Wt=0,Ft=0):(Wt=Nt>>>24,Ft+=2)}if(Ot=0&&(wt[Ot--]=Nt>>8&255),Ot>=0&&(wt[Ot--]=Nt>>16&255),Ft===6?(Ot>=0&&(wt[Ot--]=Nt>>24&255),Wt=0,Ft=0):(Wt=Nt>>>24,Ft+=2)}if(Ot>=0)for(wt[Ot--]=Wt;Ot>=0;)wt[Ot--]=0},Math.clz32?ot.prototype._countBits=function(wt){return 32-Math.clz32(wt)}:ot.prototype._countBits=function(wt){var It=wt,Ot=0;return It>=4096&&(Ot+=13,It>>>=13),It>=64&&(Ot+=7,It>>>=7),It>=8&&(Ot+=4,It>>>=4),It>=2&&(Ot+=2,It>>>=2),Ot+It},ot.prototype._zeroBits=function(wt){if(wt===0)return 26;var It=wt,Ot=0;return It&8191||(Ot+=13,It>>>=13),It&127||(Ot+=7,It>>>=7),It&15||(Ot+=4,It>>>=4),It&3||(Ot+=2,It>>>=2),It&1||Ot++,Ot},ot.prototype.bitLength=function(){var wt=this.words[this.length-1],It=this._countBits(wt);return(this.length-1)*26+It};function yt(Ct){for(var wt=new Array(Ct.bitLength()),It=0;It>>Wt&1}return wt}ot.prototype.zeroBits=function(){if(this.isZero())return 0;for(var wt=0,It=0;Itwt.length?this.clone().ior(wt):wt.clone().ior(this)},ot.prototype.uor=function(wt){return this.length>wt.length?this.clone().iuor(wt):wt.clone().iuor(this)},ot.prototype.iuand=function(wt){var It;this.length>wt.length?It=wt:It=this;for(var Ot=0;Otwt.length?this.clone().iand(wt):wt.clone().iand(this)},ot.prototype.uand=function(wt){return this.length>wt.length?this.clone().iuand(wt):wt.clone().iuand(this)},ot.prototype.iuxor=function(wt){var It,Ot;this.length>wt.length?(It=this,Ot=wt):(It=wt,Ot=this);for(var Wt=0;Wtwt.length?this.clone().ixor(wt):wt.clone().ixor(this)},ot.prototype.uxor=function(wt){return this.length>wt.length?this.clone().iuxor(wt):wt.clone().iuxor(this)},ot.prototype.inotn=function(wt){rt(typeof wt=="number"&&wt>=0);var It=Math.ceil(wt/26)|0,Ot=wt%26;this._expand(It),Ot>0&&It--;for(var Wt=0;Wt0&&(this.words[Wt]=~this.words[Wt]&67108863>>26-Ot),this._strip()},ot.prototype.notn=function(wt){return this.clone().inotn(wt)},ot.prototype.setn=function(wt,It){rt(typeof wt=="number"&&wt>=0);var Ot=wt/26|0,Wt=wt%26;return this._expand(Ot+1),It?this.words[Ot]=this.words[Ot]|1<wt.length?(Ot=this,Wt=wt):(Ot=wt,Wt=this);for(var zt=0,Ft=0;Ft>>26;for(;zt!==0&&Ft>>26;if(this.length=Ot.length,zt!==0)this.words[this.length]=zt,this.length++;else if(Ot!==this)for(;Ftwt.length?this.clone().iadd(wt):wt.clone().iadd(this)},ot.prototype.isub=function(wt){if(wt.negative!==0){wt.negative=0;var It=this.iadd(wt);return wt.negative=1,It._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(wt),this.negative=1,this._normSign();var Ot=this.cmp(wt);if(Ot===0)return this.negative=0,this.length=1,this.words[0]=0,this;var Wt,zt;Ot>0?(Wt=this,zt=wt):(Wt=wt,zt=this);for(var Ft=0,Nt=0;Nt>26,this.words[Nt]=It&67108863;for(;Ft!==0&&Nt>26,this.words[Nt]=It&67108863;if(Ft===0&&Nt>>26,en=Ut&67108863,sn=Math.min(Mt,wt.length-1),Kt=Math.max(0,Mt-Ct.length+1);Kt<=sn;Kt++){var rn=Mt-Kt|0;Wt=Ct.words[rn]|0,zt=wt.words[Kt]|0,Ft=Wt*zt+en,Ht+=Ft/67108864|0,en=Ft&67108863}It.words[Mt]=en|0,Ut=Ht|0}return Ut!==0?It.words[Mt]=Ut|0:It.length--,It._strip()}var vt=function(wt,It,Ot){var Wt=wt.words,zt=It.words,Ft=Ot.words,Nt=0,Ut,Mt,Ht,en=Wt[0]|0,sn=en&8191,Kt=en>>>13,rn=Wt[1]|0,nn=rn&8191,hn=rn>>>13,vn=Wt[2]|0,an=vn&8191,Qt=vn>>>13,_n=Wt[3]|0,Pn=_n&8191,$n=_n>>>13,Nn=Wt[4]|0,Tn=Nn&8191,cn=Nn>>>13,mn=Wt[5]|0,In=mn&8191,An=mn>>>13,wn=Wt[6]|0,fn=wn&8191,pn=wn>>>13,kn=Wt[7]|0,Dn=kn&8191,un=kn>>>13,Zt=Wt[8]|0,Xt=Zt&8191,Sn=Zt>>>13,Rn=Wt[9]|0,jn=Rn&8191,On=Rn>>>13,Zn=zt[0]|0,Vn=Zn&8191,qn=Zn>>>13,zn=zt[1]|0,Jn=zn&8191,Hn=zn>>>13,pr=zt[2]|0,fr=pr&8191,xr=pr>>>13,io=zt[3]|0,Tr=io&8191,Ar=io>>>13,qr=zt[4]|0,jr=qr&8191,Fr=qr>>>13,ao=zt[5]|0,Yr=ao&8191,Dr=ao>>>13,go=zt[6]|0,xn=go&8191,Mn=go>>>13,dn=zt[7]|0,Jt=dn&8191,En=dn>>>13,Ln=zt[8]|0,Un=Ln&8191,Kn=Ln>>>13,nr=zt[9]|0,lr=nr&8191,cr=nr>>>13;Ot.negative=wt.negative^It.negative,Ot.length=19,Ut=Math.imul(sn,Vn),Mt=Math.imul(sn,qn),Mt=Mt+Math.imul(Kt,Vn)|0,Ht=Math.imul(Kt,qn);var Hr=(Nt+Ut|0)+((Mt&8191)<<13)|0;Nt=(Ht+(Mt>>>13)|0)+(Hr>>>26)|0,Hr&=67108863,Ut=Math.imul(nn,Vn),Mt=Math.imul(nn,qn),Mt=Mt+Math.imul(hn,Vn)|0,Ht=Math.imul(hn,qn),Ut=Ut+Math.imul(sn,Jn)|0,Mt=Mt+Math.imul(sn,Hn)|0,Mt=Mt+Math.imul(Kt,Jn)|0,Ht=Ht+Math.imul(Kt,Hn)|0;var vr=(Nt+Ut|0)+((Mt&8191)<<13)|0;Nt=(Ht+(Mt>>>13)|0)+(vr>>>26)|0,vr&=67108863,Ut=Math.imul(an,Vn),Mt=Math.imul(an,qn),Mt=Mt+Math.imul(Qt,Vn)|0,Ht=Math.imul(Qt,qn),Ut=Ut+Math.imul(nn,Jn)|0,Mt=Mt+Math.imul(nn,Hn)|0,Mt=Mt+Math.imul(hn,Jn)|0,Ht=Ht+Math.imul(hn,Hn)|0,Ut=Ut+Math.imul(sn,fr)|0,Mt=Mt+Math.imul(sn,xr)|0,Mt=Mt+Math.imul(Kt,fr)|0,Ht=Ht+Math.imul(Kt,xr)|0;var Nr=(Nt+Ut|0)+((Mt&8191)<<13)|0;Nt=(Ht+(Mt>>>13)|0)+(Nr>>>26)|0,Nr&=67108863,Ut=Math.imul(Pn,Vn),Mt=Math.imul(Pn,qn),Mt=Mt+Math.imul($n,Vn)|0,Ht=Math.imul($n,qn),Ut=Ut+Math.imul(an,Jn)|0,Mt=Mt+Math.imul(an,Hn)|0,Mt=Mt+Math.imul(Qt,Jn)|0,Ht=Ht+Math.imul(Qt,Hn)|0,Ut=Ut+Math.imul(nn,fr)|0,Mt=Mt+Math.imul(nn,xr)|0,Mt=Mt+Math.imul(hn,fr)|0,Ht=Ht+Math.imul(hn,xr)|0,Ut=Ut+Math.imul(sn,Tr)|0,Mt=Mt+Math.imul(sn,Ar)|0,Mt=Mt+Math.imul(Kt,Tr)|0,Ht=Ht+Math.imul(Kt,Ar)|0;var Gr=(Nt+Ut|0)+((Mt&8191)<<13)|0;Nt=(Ht+(Mt>>>13)|0)+(Gr>>>26)|0,Gr&=67108863,Ut=Math.imul(Tn,Vn),Mt=Math.imul(Tn,qn),Mt=Mt+Math.imul(cn,Vn)|0,Ht=Math.imul(cn,qn),Ut=Ut+Math.imul(Pn,Jn)|0,Mt=Mt+Math.imul(Pn,Hn)|0,Mt=Mt+Math.imul($n,Jn)|0,Ht=Ht+Math.imul($n,Hn)|0,Ut=Ut+Math.imul(an,fr)|0,Mt=Mt+Math.imul(an,xr)|0,Mt=Mt+Math.imul(Qt,fr)|0,Ht=Ht+Math.imul(Qt,xr)|0,Ut=Ut+Math.imul(nn,Tr)|0,Mt=Mt+Math.imul(nn,Ar)|0,Mt=Mt+Math.imul(hn,Tr)|0,Ht=Ht+Math.imul(hn,Ar)|0,Ut=Ut+Math.imul(sn,jr)|0,Mt=Mt+Math.imul(sn,Fr)|0,Mt=Mt+Math.imul(Kt,jr)|0,Ht=Ht+Math.imul(Kt,Fr)|0;var eo=(Nt+Ut|0)+((Mt&8191)<<13)|0;Nt=(Ht+(Mt>>>13)|0)+(eo>>>26)|0,eo&=67108863,Ut=Math.imul(In,Vn),Mt=Math.imul(In,qn),Mt=Mt+Math.imul(An,Vn)|0,Ht=Math.imul(An,qn),Ut=Ut+Math.imul(Tn,Jn)|0,Mt=Mt+Math.imul(Tn,Hn)|0,Mt=Mt+Math.imul(cn,Jn)|0,Ht=Ht+Math.imul(cn,Hn)|0,Ut=Ut+Math.imul(Pn,fr)|0,Mt=Mt+Math.imul(Pn,xr)|0,Mt=Mt+Math.imul($n,fr)|0,Ht=Ht+Math.imul($n,xr)|0,Ut=Ut+Math.imul(an,Tr)|0,Mt=Mt+Math.imul(an,Ar)|0,Mt=Mt+Math.imul(Qt,Tr)|0,Ht=Ht+Math.imul(Qt,Ar)|0,Ut=Ut+Math.imul(nn,jr)|0,Mt=Mt+Math.imul(nn,Fr)|0,Mt=Mt+Math.imul(hn,jr)|0,Ht=Ht+Math.imul(hn,Fr)|0,Ut=Ut+Math.imul(sn,Yr)|0,Mt=Mt+Math.imul(sn,Dr)|0,Mt=Mt+Math.imul(Kt,Yr)|0,Ht=Ht+Math.imul(Kt,Dr)|0;var Zr=(Nt+Ut|0)+((Mt&8191)<<13)|0;Nt=(Ht+(Mt>>>13)|0)+(Zr>>>26)|0,Zr&=67108863,Ut=Math.imul(fn,Vn),Mt=Math.imul(fn,qn),Mt=Mt+Math.imul(pn,Vn)|0,Ht=Math.imul(pn,qn),Ut=Ut+Math.imul(In,Jn)|0,Mt=Mt+Math.imul(In,Hn)|0,Mt=Mt+Math.imul(An,Jn)|0,Ht=Ht+Math.imul(An,Hn)|0,Ut=Ut+Math.imul(Tn,fr)|0,Mt=Mt+Math.imul(Tn,xr)|0,Mt=Mt+Math.imul(cn,fr)|0,Ht=Ht+Math.imul(cn,xr)|0,Ut=Ut+Math.imul(Pn,Tr)|0,Mt=Mt+Math.imul(Pn,Ar)|0,Mt=Mt+Math.imul($n,Tr)|0,Ht=Ht+Math.imul($n,Ar)|0,Ut=Ut+Math.imul(an,jr)|0,Mt=Mt+Math.imul(an,Fr)|0,Mt=Mt+Math.imul(Qt,jr)|0,Ht=Ht+Math.imul(Qt,Fr)|0,Ut=Ut+Math.imul(nn,Yr)|0,Mt=Mt+Math.imul(nn,Dr)|0,Mt=Mt+Math.imul(hn,Yr)|0,Ht=Ht+Math.imul(hn,Dr)|0,Ut=Ut+Math.imul(sn,xn)|0,Mt=Mt+Math.imul(sn,Mn)|0,Mt=Mt+Math.imul(Kt,xn)|0,Ht=Ht+Math.imul(Kt,Mn)|0;var Jr=(Nt+Ut|0)+((Mt&8191)<<13)|0;Nt=(Ht+(Mt>>>13)|0)+(Jr>>>26)|0,Jr&=67108863,Ut=Math.imul(Dn,Vn),Mt=Math.imul(Dn,qn),Mt=Mt+Math.imul(un,Vn)|0,Ht=Math.imul(un,qn),Ut=Ut+Math.imul(fn,Jn)|0,Mt=Mt+Math.imul(fn,Hn)|0,Mt=Mt+Math.imul(pn,Jn)|0,Ht=Ht+Math.imul(pn,Hn)|0,Ut=Ut+Math.imul(In,fr)|0,Mt=Mt+Math.imul(In,xr)|0,Mt=Mt+Math.imul(An,fr)|0,Ht=Ht+Math.imul(An,xr)|0,Ut=Ut+Math.imul(Tn,Tr)|0,Mt=Mt+Math.imul(Tn,Ar)|0,Mt=Mt+Math.imul(cn,Tr)|0,Ht=Ht+Math.imul(cn,Ar)|0,Ut=Ut+Math.imul(Pn,jr)|0,Mt=Mt+Math.imul(Pn,Fr)|0,Mt=Mt+Math.imul($n,jr)|0,Ht=Ht+Math.imul($n,Fr)|0,Ut=Ut+Math.imul(an,Yr)|0,Mt=Mt+Math.imul(an,Dr)|0,Mt=Mt+Math.imul(Qt,Yr)|0,Ht=Ht+Math.imul(Qt,Dr)|0,Ut=Ut+Math.imul(nn,xn)|0,Mt=Mt+Math.imul(nn,Mn)|0,Mt=Mt+Math.imul(hn,xn)|0,Ht=Ht+Math.imul(hn,Mn)|0,Ut=Ut+Math.imul(sn,Jt)|0,Mt=Mt+Math.imul(sn,En)|0,Mt=Mt+Math.imul(Kt,Jt)|0,Ht=Ht+Math.imul(Kt,En)|0;var wr=(Nt+Ut|0)+((Mt&8191)<<13)|0;Nt=(Ht+(Mt>>>13)|0)+(wr>>>26)|0,wr&=67108863,Ut=Math.imul(Xt,Vn),Mt=Math.imul(Xt,qn),Mt=Mt+Math.imul(Sn,Vn)|0,Ht=Math.imul(Sn,qn),Ut=Ut+Math.imul(Dn,Jn)|0,Mt=Mt+Math.imul(Dn,Hn)|0,Mt=Mt+Math.imul(un,Jn)|0,Ht=Ht+Math.imul(un,Hn)|0,Ut=Ut+Math.imul(fn,fr)|0,Mt=Mt+Math.imul(fn,xr)|0,Mt=Mt+Math.imul(pn,fr)|0,Ht=Ht+Math.imul(pn,xr)|0,Ut=Ut+Math.imul(In,Tr)|0,Mt=Mt+Math.imul(In,Ar)|0,Mt=Mt+Math.imul(An,Tr)|0,Ht=Ht+Math.imul(An,Ar)|0,Ut=Ut+Math.imul(Tn,jr)|0,Mt=Mt+Math.imul(Tn,Fr)|0,Mt=Mt+Math.imul(cn,jr)|0,Ht=Ht+Math.imul(cn,Fr)|0,Ut=Ut+Math.imul(Pn,Yr)|0,Mt=Mt+Math.imul(Pn,Dr)|0,Mt=Mt+Math.imul($n,Yr)|0,Ht=Ht+Math.imul($n,Dr)|0,Ut=Ut+Math.imul(an,xn)|0,Mt=Mt+Math.imul(an,Mn)|0,Mt=Mt+Math.imul(Qt,xn)|0,Ht=Ht+Math.imul(Qt,Mn)|0,Ut=Ut+Math.imul(nn,Jt)|0,Mt=Mt+Math.imul(nn,En)|0,Mt=Mt+Math.imul(hn,Jt)|0,Ht=Ht+Math.imul(hn,En)|0,Ut=Ut+Math.imul(sn,Un)|0,Mt=Mt+Math.imul(sn,Kn)|0,Mt=Mt+Math.imul(Kt,Un)|0,Ht=Ht+Math.imul(Kt,Kn)|0;var Mr=(Nt+Ut|0)+((Mt&8191)<<13)|0;Nt=(Ht+(Mt>>>13)|0)+(Mr>>>26)|0,Mr&=67108863,Ut=Math.imul(jn,Vn),Mt=Math.imul(jn,qn),Mt=Mt+Math.imul(On,Vn)|0,Ht=Math.imul(On,qn),Ut=Ut+Math.imul(Xt,Jn)|0,Mt=Mt+Math.imul(Xt,Hn)|0,Mt=Mt+Math.imul(Sn,Jn)|0,Ht=Ht+Math.imul(Sn,Hn)|0,Ut=Ut+Math.imul(Dn,fr)|0,Mt=Mt+Math.imul(Dn,xr)|0,Mt=Mt+Math.imul(un,fr)|0,Ht=Ht+Math.imul(un,xr)|0,Ut=Ut+Math.imul(fn,Tr)|0,Mt=Mt+Math.imul(fn,Ar)|0,Mt=Mt+Math.imul(pn,Tr)|0,Ht=Ht+Math.imul(pn,Ar)|0,Ut=Ut+Math.imul(In,jr)|0,Mt=Mt+Math.imul(In,Fr)|0,Mt=Mt+Math.imul(An,jr)|0,Ht=Ht+Math.imul(An,Fr)|0,Ut=Ut+Math.imul(Tn,Yr)|0,Mt=Mt+Math.imul(Tn,Dr)|0,Mt=Mt+Math.imul(cn,Yr)|0,Ht=Ht+Math.imul(cn,Dr)|0,Ut=Ut+Math.imul(Pn,xn)|0,Mt=Mt+Math.imul(Pn,Mn)|0,Mt=Mt+Math.imul($n,xn)|0,Ht=Ht+Math.imul($n,Mn)|0,Ut=Ut+Math.imul(an,Jt)|0,Mt=Mt+Math.imul(an,En)|0,Mt=Mt+Math.imul(Qt,Jt)|0,Ht=Ht+Math.imul(Qt,En)|0,Ut=Ut+Math.imul(nn,Un)|0,Mt=Mt+Math.imul(nn,Kn)|0,Mt=Mt+Math.imul(hn,Un)|0,Ht=Ht+Math.imul(hn,Kn)|0,Ut=Ut+Math.imul(sn,lr)|0,Mt=Mt+Math.imul(sn,cr)|0,Mt=Mt+Math.imul(Kt,lr)|0,Ht=Ht+Math.imul(Kt,cr)|0;var Ur=(Nt+Ut|0)+((Mt&8191)<<13)|0;Nt=(Ht+(Mt>>>13)|0)+(Ur>>>26)|0,Ur&=67108863,Ut=Math.imul(jn,Jn),Mt=Math.imul(jn,Hn),Mt=Mt+Math.imul(On,Jn)|0,Ht=Math.imul(On,Hn),Ut=Ut+Math.imul(Xt,fr)|0,Mt=Mt+Math.imul(Xt,xr)|0,Mt=Mt+Math.imul(Sn,fr)|0,Ht=Ht+Math.imul(Sn,xr)|0,Ut=Ut+Math.imul(Dn,Tr)|0,Mt=Mt+Math.imul(Dn,Ar)|0,Mt=Mt+Math.imul(un,Tr)|0,Ht=Ht+Math.imul(un,Ar)|0,Ut=Ut+Math.imul(fn,jr)|0,Mt=Mt+Math.imul(fn,Fr)|0,Mt=Mt+Math.imul(pn,jr)|0,Ht=Ht+Math.imul(pn,Fr)|0,Ut=Ut+Math.imul(In,Yr)|0,Mt=Mt+Math.imul(In,Dr)|0,Mt=Mt+Math.imul(An,Yr)|0,Ht=Ht+Math.imul(An,Dr)|0,Ut=Ut+Math.imul(Tn,xn)|0,Mt=Mt+Math.imul(Tn,Mn)|0,Mt=Mt+Math.imul(cn,xn)|0,Ht=Ht+Math.imul(cn,Mn)|0,Ut=Ut+Math.imul(Pn,Jt)|0,Mt=Mt+Math.imul(Pn,En)|0,Mt=Mt+Math.imul($n,Jt)|0,Ht=Ht+Math.imul($n,En)|0,Ut=Ut+Math.imul(an,Un)|0,Mt=Mt+Math.imul(an,Kn)|0,Mt=Mt+Math.imul(Qt,Un)|0,Ht=Ht+Math.imul(Qt,Kn)|0,Ut=Ut+Math.imul(nn,lr)|0,Mt=Mt+Math.imul(nn,cr)|0,Mt=Mt+Math.imul(hn,lr)|0,Ht=Ht+Math.imul(hn,cr)|0;var Rr=(Nt+Ut|0)+((Mt&8191)<<13)|0;Nt=(Ht+(Mt>>>13)|0)+(Rr>>>26)|0,Rr&=67108863,Ut=Math.imul(jn,fr),Mt=Math.imul(jn,xr),Mt=Mt+Math.imul(On,fr)|0,Ht=Math.imul(On,xr),Ut=Ut+Math.imul(Xt,Tr)|0,Mt=Mt+Math.imul(Xt,Ar)|0,Mt=Mt+Math.imul(Sn,Tr)|0,Ht=Ht+Math.imul(Sn,Ar)|0,Ut=Ut+Math.imul(Dn,jr)|0,Mt=Mt+Math.imul(Dn,Fr)|0,Mt=Mt+Math.imul(un,jr)|0,Ht=Ht+Math.imul(un,Fr)|0,Ut=Ut+Math.imul(fn,Yr)|0,Mt=Mt+Math.imul(fn,Dr)|0,Mt=Mt+Math.imul(pn,Yr)|0,Ht=Ht+Math.imul(pn,Dr)|0,Ut=Ut+Math.imul(In,xn)|0,Mt=Mt+Math.imul(In,Mn)|0,Mt=Mt+Math.imul(An,xn)|0,Ht=Ht+Math.imul(An,Mn)|0,Ut=Ut+Math.imul(Tn,Jt)|0,Mt=Mt+Math.imul(Tn,En)|0,Mt=Mt+Math.imul(cn,Jt)|0,Ht=Ht+Math.imul(cn,En)|0,Ut=Ut+Math.imul(Pn,Un)|0,Mt=Mt+Math.imul(Pn,Kn)|0,Mt=Mt+Math.imul($n,Un)|0,Ht=Ht+Math.imul($n,Kn)|0,Ut=Ut+Math.imul(an,lr)|0,Mt=Mt+Math.imul(an,cr)|0,Mt=Mt+Math.imul(Qt,lr)|0,Ht=Ht+Math.imul(Qt,cr)|0;var Pr=(Nt+Ut|0)+((Mt&8191)<<13)|0;Nt=(Ht+(Mt>>>13)|0)+(Pr>>>26)|0,Pr&=67108863,Ut=Math.imul(jn,Tr),Mt=Math.imul(jn,Ar),Mt=Mt+Math.imul(On,Tr)|0,Ht=Math.imul(On,Ar),Ut=Ut+Math.imul(Xt,jr)|0,Mt=Mt+Math.imul(Xt,Fr)|0,Mt=Mt+Math.imul(Sn,jr)|0,Ht=Ht+Math.imul(Sn,Fr)|0,Ut=Ut+Math.imul(Dn,Yr)|0,Mt=Mt+Math.imul(Dn,Dr)|0,Mt=Mt+Math.imul(un,Yr)|0,Ht=Ht+Math.imul(un,Dr)|0,Ut=Ut+Math.imul(fn,xn)|0,Mt=Mt+Math.imul(fn,Mn)|0,Mt=Mt+Math.imul(pn,xn)|0,Ht=Ht+Math.imul(pn,Mn)|0,Ut=Ut+Math.imul(In,Jt)|0,Mt=Mt+Math.imul(In,En)|0,Mt=Mt+Math.imul(An,Jt)|0,Ht=Ht+Math.imul(An,En)|0,Ut=Ut+Math.imul(Tn,Un)|0,Mt=Mt+Math.imul(Tn,Kn)|0,Mt=Mt+Math.imul(cn,Un)|0,Ht=Ht+Math.imul(cn,Kn)|0,Ut=Ut+Math.imul(Pn,lr)|0,Mt=Mt+Math.imul(Pn,cr)|0,Mt=Mt+Math.imul($n,lr)|0,Ht=Ht+Math.imul($n,cr)|0;var Lr=(Nt+Ut|0)+((Mt&8191)<<13)|0;Nt=(Ht+(Mt>>>13)|0)+(Lr>>>26)|0,Lr&=67108863,Ut=Math.imul(jn,jr),Mt=Math.imul(jn,Fr),Mt=Mt+Math.imul(On,jr)|0,Ht=Math.imul(On,Fr),Ut=Ut+Math.imul(Xt,Yr)|0,Mt=Mt+Math.imul(Xt,Dr)|0,Mt=Mt+Math.imul(Sn,Yr)|0,Ht=Ht+Math.imul(Sn,Dr)|0,Ut=Ut+Math.imul(Dn,xn)|0,Mt=Mt+Math.imul(Dn,Mn)|0,Mt=Mt+Math.imul(un,xn)|0,Ht=Ht+Math.imul(un,Mn)|0,Ut=Ut+Math.imul(fn,Jt)|0,Mt=Mt+Math.imul(fn,En)|0,Mt=Mt+Math.imul(pn,Jt)|0,Ht=Ht+Math.imul(pn,En)|0,Ut=Ut+Math.imul(In,Un)|0,Mt=Mt+Math.imul(In,Kn)|0,Mt=Mt+Math.imul(An,Un)|0,Ht=Ht+Math.imul(An,Kn)|0,Ut=Ut+Math.imul(Tn,lr)|0,Mt=Mt+Math.imul(Tn,cr)|0,Mt=Mt+Math.imul(cn,lr)|0,Ht=Ht+Math.imul(cn,cr)|0;var Wr=(Nt+Ut|0)+((Mt&8191)<<13)|0;Nt=(Ht+(Mt>>>13)|0)+(Wr>>>26)|0,Wr&=67108863,Ut=Math.imul(jn,Yr),Mt=Math.imul(jn,Dr),Mt=Mt+Math.imul(On,Yr)|0,Ht=Math.imul(On,Dr),Ut=Ut+Math.imul(Xt,xn)|0,Mt=Mt+Math.imul(Xt,Mn)|0,Mt=Mt+Math.imul(Sn,xn)|0,Ht=Ht+Math.imul(Sn,Mn)|0,Ut=Ut+Math.imul(Dn,Jt)|0,Mt=Mt+Math.imul(Dn,En)|0,Mt=Mt+Math.imul(un,Jt)|0,Ht=Ht+Math.imul(un,En)|0,Ut=Ut+Math.imul(fn,Un)|0,Mt=Mt+Math.imul(fn,Kn)|0,Mt=Mt+Math.imul(pn,Un)|0,Ht=Ht+Math.imul(pn,Kn)|0,Ut=Ut+Math.imul(In,lr)|0,Mt=Mt+Math.imul(In,cr)|0,Mt=Mt+Math.imul(An,lr)|0,Ht=Ht+Math.imul(An,cr)|0;var Br=(Nt+Ut|0)+((Mt&8191)<<13)|0;Nt=(Ht+(Mt>>>13)|0)+(Br>>>26)|0,Br&=67108863,Ut=Math.imul(jn,xn),Mt=Math.imul(jn,Mn),Mt=Mt+Math.imul(On,xn)|0,Ht=Math.imul(On,Mn),Ut=Ut+Math.imul(Xt,Jt)|0,Mt=Mt+Math.imul(Xt,En)|0,Mt=Mt+Math.imul(Sn,Jt)|0,Ht=Ht+Math.imul(Sn,En)|0,Ut=Ut+Math.imul(Dn,Un)|0,Mt=Mt+Math.imul(Dn,Kn)|0,Mt=Mt+Math.imul(un,Un)|0,Ht=Ht+Math.imul(un,Kn)|0,Ut=Ut+Math.imul(fn,lr)|0,Mt=Mt+Math.imul(fn,cr)|0,Mt=Mt+Math.imul(pn,lr)|0,Ht=Ht+Math.imul(pn,cr)|0;var tr=(Nt+Ut|0)+((Mt&8191)<<13)|0;Nt=(Ht+(Mt>>>13)|0)+(tr>>>26)|0,tr&=67108863,Ut=Math.imul(jn,Jt),Mt=Math.imul(jn,En),Mt=Mt+Math.imul(On,Jt)|0,Ht=Math.imul(On,En),Ut=Ut+Math.imul(Xt,Un)|0,Mt=Mt+Math.imul(Xt,Kn)|0,Mt=Mt+Math.imul(Sn,Un)|0,Ht=Ht+Math.imul(Sn,Kn)|0,Ut=Ut+Math.imul(Dn,lr)|0,Mt=Mt+Math.imul(Dn,cr)|0,Mt=Mt+Math.imul(un,lr)|0,Ht=Ht+Math.imul(un,cr)|0;var ir=(Nt+Ut|0)+((Mt&8191)<<13)|0;Nt=(Ht+(Mt>>>13)|0)+(ir>>>26)|0,ir&=67108863,Ut=Math.imul(jn,Un),Mt=Math.imul(jn,Kn),Mt=Mt+Math.imul(On,Un)|0,Ht=Math.imul(On,Kn),Ut=Ut+Math.imul(Xt,lr)|0,Mt=Mt+Math.imul(Xt,cr)|0,Mt=Mt+Math.imul(Sn,lr)|0,Ht=Ht+Math.imul(Sn,cr)|0;var Sr=(Nt+Ut|0)+((Mt&8191)<<13)|0;Nt=(Ht+(Mt>>>13)|0)+(Sr>>>26)|0,Sr&=67108863,Ut=Math.imul(jn,lr),Mt=Math.imul(jn,cr),Mt=Mt+Math.imul(On,lr)|0,Ht=Math.imul(On,cr);var dr=(Nt+Ut|0)+((Mt&8191)<<13)|0;return Nt=(Ht+(Mt>>>13)|0)+(dr>>>26)|0,dr&=67108863,Ft[0]=Hr,Ft[1]=vr,Ft[2]=Nr,Ft[3]=Gr,Ft[4]=eo,Ft[5]=Zr,Ft[6]=Jr,Ft[7]=wr,Ft[8]=Mr,Ft[9]=Ur,Ft[10]=Rr,Ft[11]=Pr,Ft[12]=Lr,Ft[13]=Wr,Ft[14]=Br,Ft[15]=tr,Ft[16]=ir,Ft[17]=Sr,Ft[18]=dr,Nt!==0&&(Ft[19]=Nt,Ot.length++),Ot};Math.imul||(vt=bt);function xt(Ct,wt,It){It.negative=wt.negative^Ct.negative,It.length=Ct.length+wt.length;for(var Ot=0,Wt=0,zt=0;zt>>26)|0,Wt+=Ft>>>26,Ft&=67108863}It.words[zt]=Nt,Ot=Ft,Ft=Wt}return Ot!==0?It.words[zt]=Ot:It.length--,It._strip()}function kt(Ct,wt,It){return xt(Ct,wt,It)}ot.prototype.mulTo=function(wt,It){var Ot,Wt=this.length+wt.length;return this.length===10&&wt.length===10?Ot=vt(this,wt,It):Wt<63?Ot=bt(this,wt,It):Wt<1024?Ot=xt(this,wt,It):Ot=kt(this,wt,It),Ot},ot.prototype.mul=function(wt){var It=new ot(null);return It.words=new Array(this.length+wt.length),this.mulTo(wt,It)},ot.prototype.mulf=function(wt){var It=new ot(null);return It.words=new Array(this.length+wt.length),kt(this,wt,It)},ot.prototype.imul=function(wt){return this.clone().mulTo(wt,this)},ot.prototype.imuln=function(wt){var It=wt<0;It&&(wt=-wt),rt(typeof wt=="number"),rt(wt<67108864);for(var Ot=0,Wt=0;Wt>=26,Ot+=zt/67108864|0,Ot+=Ft>>>26,this.words[Wt]=Ft&67108863}return Ot!==0&&(this.words[Wt]=Ot,this.length++),It?this.ineg():this},ot.prototype.muln=function(wt){return this.clone().imuln(wt)},ot.prototype.sqr=function(){return this.mul(this)},ot.prototype.isqr=function(){return this.imul(this.clone())},ot.prototype.pow=function(wt){var It=yt(wt);if(It.length===0)return new ot(1);for(var Ot=this,Wt=0;Wt=0);var It=wt%26,Ot=(wt-It)/26,Wt=67108863>>>26-It<<26-It,zt;if(It!==0){var Ft=0;for(zt=0;zt>>26-It}Ft&&(this.words[zt]=Ft,this.length++)}if(Ot!==0){for(zt=this.length-1;zt>=0;zt--)this.words[zt+Ot]=this.words[zt];for(zt=0;zt=0);var Wt;It?Wt=(It-It%26)/26:Wt=0;var zt=wt%26,Ft=Math.min((wt-zt)/26,this.length),Nt=67108863^67108863>>>zt<Ft)for(this.length-=Ft,Mt=0;Mt=0&&(Ht!==0||Mt>=Wt);Mt--){var en=this.words[Mt]|0;this.words[Mt]=Ht<<26-zt|en>>>zt,Ht=en&Nt}return Ut&&Ht!==0&&(Ut.words[Ut.length++]=Ht),this.length===0&&(this.words[0]=0,this.length=1),this._strip()},ot.prototype.ishrn=function(wt,It,Ot){return rt(this.negative===0),this.iushrn(wt,It,Ot)},ot.prototype.shln=function(wt){return this.clone().ishln(wt)},ot.prototype.ushln=function(wt){return this.clone().iushln(wt)},ot.prototype.shrn=function(wt){return this.clone().ishrn(wt)},ot.prototype.ushrn=function(wt){return this.clone().iushrn(wt)},ot.prototype.testn=function(wt){rt(typeof wt=="number"&&wt>=0);var It=wt%26,Ot=(wt-It)/26,Wt=1<=0);var It=wt%26,Ot=(wt-It)/26;if(rt(this.negative===0,"imaskn works only with positive numbers"),this.length<=Ot)return this;if(It!==0&&Ot++,this.length=Math.min(Ot,this.length),It!==0){var Wt=67108863^67108863>>>It<=67108864;It++)this.words[It]-=67108864,It===this.length-1?this.words[It+1]=1:this.words[It+1]++;return this.length=Math.max(this.length,It+1),this},ot.prototype.isubn=function(wt){if(rt(typeof wt=="number"),rt(wt<67108864),wt<0)return this.iaddn(-wt);if(this.negative!==0)return this.negative=0,this.iaddn(wt),this.negative=1,this;if(this.words[0]-=wt,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var It=0;It>26)-(Ut/67108864|0),this.words[zt+Ot]=Ft&67108863}for(;zt>26,this.words[zt+Ot]=Ft&67108863;if(Nt===0)return this._strip();for(rt(Nt===-1),Nt=0,zt=0;zt>26,this.words[zt]=Ft&67108863;return this.negative=1,this._strip()},ot.prototype._wordDiv=function(wt,It){var Ot=this.length-wt.length,Wt=this.clone(),zt=wt,Ft=zt.words[zt.length-1]|0,Nt=this._countBits(Ft);Ot=26-Nt,Ot!==0&&(zt=zt.ushln(Ot),Wt.iushln(Ot),Ft=zt.words[zt.length-1]|0);var Ut=Wt.length-zt.length,Mt;if(It!=="mod"){Mt=new ot(null),Mt.length=Ut+1,Mt.words=new Array(Mt.length);for(var Ht=0;Ht=0;sn--){var Kt=(Wt.words[zt.length+sn]|0)*67108864+(Wt.words[zt.length+sn-1]|0);for(Kt=Math.min(Kt/Ft|0,67108863),Wt._ishlnsubmul(zt,Kt,sn);Wt.negative!==0;)Kt--,Wt.negative=0,Wt._ishlnsubmul(zt,1,sn),Wt.isZero()||(Wt.negative^=1);Mt&&(Mt.words[sn]=Kt)}return Mt&&Mt._strip(),Wt._strip(),It!=="div"&&Ot!==0&&Wt.iushrn(Ot),{div:Mt||null,mod:Wt}},ot.prototype.divmod=function(wt,It,Ot){if(rt(!wt.isZero()),this.isZero())return{div:new ot(0),mod:new ot(0)};var Wt,zt,Ft;return this.negative!==0&&wt.negative===0?(Ft=this.neg().divmod(wt,It),It!=="mod"&&(Wt=Ft.div.neg()),It!=="div"&&(zt=Ft.mod.neg(),Ot&&zt.negative!==0&&zt.iadd(wt)),{div:Wt,mod:zt}):this.negative===0&&wt.negative!==0?(Ft=this.divmod(wt.neg(),It),It!=="mod"&&(Wt=Ft.div.neg()),{div:Wt,mod:Ft.mod}):this.negative&wt.negative?(Ft=this.neg().divmod(wt.neg(),It),It!=="div"&&(zt=Ft.mod.neg(),Ot&&zt.negative!==0&&zt.isub(wt)),{div:Ft.div,mod:zt}):wt.length>this.length||this.cmp(wt)<0?{div:new ot(0),mod:this}:wt.length===1?It==="div"?{div:this.divn(wt.words[0]),mod:null}:It==="mod"?{div:null,mod:new ot(this.modrn(wt.words[0]))}:{div:this.divn(wt.words[0]),mod:new ot(this.modrn(wt.words[0]))}:this._wordDiv(wt,It)},ot.prototype.div=function(wt){return this.divmod(wt,"div",!1).div},ot.prototype.mod=function(wt){return this.divmod(wt,"mod",!1).mod},ot.prototype.umod=function(wt){return this.divmod(wt,"mod",!0).mod},ot.prototype.divRound=function(wt){var It=this.divmod(wt);if(It.mod.isZero())return It.div;var Ot=It.div.negative!==0?It.mod.isub(wt):It.mod,Wt=wt.ushrn(1),zt=wt.andln(1),Ft=Ot.cmp(Wt);return Ft<0||zt===1&&Ft===0?It.div:It.div.negative!==0?It.div.isubn(1):It.div.iaddn(1)},ot.prototype.modrn=function(wt){var It=wt<0;It&&(wt=-wt),rt(wt<=67108863);for(var Ot=(1<<26)%wt,Wt=0,zt=this.length-1;zt>=0;zt--)Wt=(Ot*Wt+(this.words[zt]|0))%wt;return It?-Wt:Wt},ot.prototype.modn=function(wt){return this.modrn(wt)},ot.prototype.idivn=function(wt){var It=wt<0;It&&(wt=-wt),rt(wt<=67108863);for(var Ot=0,Wt=this.length-1;Wt>=0;Wt--){var zt=(this.words[Wt]|0)+Ot*67108864;this.words[Wt]=zt/wt|0,Ot=zt%wt}return this._strip(),It?this.ineg():this},ot.prototype.divn=function(wt){return this.clone().idivn(wt)},ot.prototype.egcd=function(wt){rt(wt.negative===0),rt(!wt.isZero());var It=this,Ot=wt.clone();It.negative!==0?It=It.umod(wt):It=It.clone();for(var Wt=new ot(1),zt=new ot(0),Ft=new ot(0),Nt=new ot(1),Ut=0;It.isEven()&&Ot.isEven();)It.iushrn(1),Ot.iushrn(1),++Ut;for(var Mt=Ot.clone(),Ht=It.clone();!It.isZero();){for(var en=0,sn=1;!(It.words[0]&sn)&&en<26;++en,sn<<=1);if(en>0)for(It.iushrn(en);en-- >0;)(Wt.isOdd()||zt.isOdd())&&(Wt.iadd(Mt),zt.isub(Ht)),Wt.iushrn(1),zt.iushrn(1);for(var Kt=0,rn=1;!(Ot.words[0]&rn)&&Kt<26;++Kt,rn<<=1);if(Kt>0)for(Ot.iushrn(Kt);Kt-- >0;)(Ft.isOdd()||Nt.isOdd())&&(Ft.iadd(Mt),Nt.isub(Ht)),Ft.iushrn(1),Nt.iushrn(1);It.cmp(Ot)>=0?(It.isub(Ot),Wt.isub(Ft),zt.isub(Nt)):(Ot.isub(It),Ft.isub(Wt),Nt.isub(zt))}return{a:Ft,b:Nt,gcd:Ot.iushln(Ut)}},ot.prototype._invmp=function(wt){rt(wt.negative===0),rt(!wt.isZero());var It=this,Ot=wt.clone();It.negative!==0?It=It.umod(wt):It=It.clone();for(var Wt=new ot(1),zt=new ot(0),Ft=Ot.clone();It.cmpn(1)>0&&Ot.cmpn(1)>0;){for(var Nt=0,Ut=1;!(It.words[0]&Ut)&&Nt<26;++Nt,Ut<<=1);if(Nt>0)for(It.iushrn(Nt);Nt-- >0;)Wt.isOdd()&&Wt.iadd(Ft),Wt.iushrn(1);for(var Mt=0,Ht=1;!(Ot.words[0]&Ht)&&Mt<26;++Mt,Ht<<=1);if(Mt>0)for(Ot.iushrn(Mt);Mt-- >0;)zt.isOdd()&&zt.iadd(Ft),zt.iushrn(1);It.cmp(Ot)>=0?(It.isub(Ot),Wt.isub(zt)):(Ot.isub(It),zt.isub(Wt))}var en;return It.cmpn(1)===0?en=Wt:en=zt,en.cmpn(0)<0&&en.iadd(wt),en},ot.prototype.gcd=function(wt){if(this.isZero())return wt.abs();if(wt.isZero())return this.abs();var It=this.clone(),Ot=wt.clone();It.negative=0,Ot.negative=0;for(var Wt=0;It.isEven()&&Ot.isEven();Wt++)It.iushrn(1),Ot.iushrn(1);do{for(;It.isEven();)It.iushrn(1);for(;Ot.isEven();)Ot.iushrn(1);var zt=It.cmp(Ot);if(zt<0){var Ft=It;It=Ot,Ot=Ft}else if(zt===0||Ot.cmpn(1)===0)break;It.isub(Ot)}while(!0);return Ot.iushln(Wt)},ot.prototype.invm=function(wt){return this.egcd(wt).a.umod(wt)},ot.prototype.isEven=function(){return(this.words[0]&1)===0},ot.prototype.isOdd=function(){return(this.words[0]&1)===1},ot.prototype.andln=function(wt){return this.words[0]&wt},ot.prototype.bincn=function(wt){rt(typeof wt=="number");var It=wt%26,Ot=(wt-It)/26,Wt=1<>>26,Nt&=67108863,this.words[Ft]=Nt}return zt!==0&&(this.words[Ft]=zt,this.length++),this},ot.prototype.isZero=function(){return this.length===1&&this.words[0]===0},ot.prototype.cmpn=function(wt){var It=wt<0;if(this.negative!==0&&!It)return-1;if(this.negative===0&&It)return 1;this._strip();var Ot;if(this.length>1)Ot=1;else{It&&(wt=-wt),rt(wt<=67108863,"Number is too big");var Wt=this.words[0]|0;Ot=Wt===wt?0:Wtwt.length)return 1;if(this.length=0;Ot--){var Wt=this.words[Ot]|0,zt=wt.words[Ot]|0;if(Wt!==zt){Wtzt&&(It=1);break}}return It},ot.prototype.gtn=function(wt){return this.cmpn(wt)===1},ot.prototype.gt=function(wt){return this.cmp(wt)===1},ot.prototype.gten=function(wt){return this.cmpn(wt)>=0},ot.prototype.gte=function(wt){return this.cmp(wt)>=0},ot.prototype.ltn=function(wt){return this.cmpn(wt)===-1},ot.prototype.lt=function(wt){return this.cmp(wt)===-1},ot.prototype.lten=function(wt){return this.cmpn(wt)<=0},ot.prototype.lte=function(wt){return this.cmp(wt)<=0},ot.prototype.eqn=function(wt){return this.cmpn(wt)===0},ot.prototype.eq=function(wt){return this.cmp(wt)===0},ot.red=function(wt){return new jt(wt)},ot.prototype.toRed=function(wt){return rt(!this.red,"Already a number in reduction context"),rt(this.negative===0,"red works only with positives"),wt.convertTo(this)._forceRed(wt)},ot.prototype.fromRed=function(){return rt(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},ot.prototype._forceRed=function(wt){return this.red=wt,this},ot.prototype.forceRed=function(wt){return rt(!this.red,"Already a number in reduction context"),this._forceRed(wt)},ot.prototype.redAdd=function(wt){return rt(this.red,"redAdd works only with red numbers"),this.red.add(this,wt)},ot.prototype.redIAdd=function(wt){return rt(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,wt)},ot.prototype.redSub=function(wt){return rt(this.red,"redSub works only with red numbers"),this.red.sub(this,wt)},ot.prototype.redISub=function(wt){return rt(this.red,"redISub works only with red numbers"),this.red.isub(this,wt)},ot.prototype.redShl=function(wt){return rt(this.red,"redShl works only with red numbers"),this.red.shl(this,wt)},ot.prototype.redMul=function(wt){return rt(this.red,"redMul works only with red numbers"),this.red._verify2(this,wt),this.red.mul(this,wt)},ot.prototype.redIMul=function(wt){return rt(this.red,"redMul works only with red numbers"),this.red._verify2(this,wt),this.red.imul(this,wt)},ot.prototype.redSqr=function(){return rt(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},ot.prototype.redISqr=function(){return rt(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},ot.prototype.redSqrt=function(){return rt(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},ot.prototype.redInvm=function(){return rt(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},ot.prototype.redNeg=function(){return rt(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},ot.prototype.redPow=function(wt){return rt(this.red&&!wt.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,wt)};var St={k256:null,p224:null,p192:null,p25519:null};function Tt(Ct,wt){this.name=Ct,this.p=new ot(wt,16),this.n=this.p.bitLength(),this.k=new ot(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}Tt.prototype._tmp=function(){var wt=new ot(null);return wt.words=new Array(Math.ceil(this.n/13)),wt},Tt.prototype.ireduce=function(wt){var It=wt,Ot;do this.split(It,this.tmp),It=this.imulK(It),It=It.iadd(this.tmp),Ot=It.bitLength();while(Ot>this.n);var Wt=Ot0?It.isub(this.p):It.strip!==void 0?It.strip():It._strip(),It},Tt.prototype.split=function(wt,It){wt.iushrn(this.n,0,It)},Tt.prototype.imulK=function(wt){return wt.imul(this.k)};function At(){Tt.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}it(At,Tt),At.prototype.split=function(wt,It){for(var Ot=4194303,Wt=Math.min(wt.length,9),zt=0;zt>>22,Ft=Nt}Ft>>>=22,wt.words[zt-10]=Ft,Ft===0&&wt.length>10?wt.length-=10:wt.length-=9},At.prototype.imulK=function(wt){wt.words[wt.length]=0,wt.words[wt.length+1]=0,wt.length+=2;for(var It=0,Ot=0;Ot>>=26,wt.words[Ot]=zt,It=Wt}return It!==0&&(wt.words[wt.length++]=It),wt},ot._prime=function(wt){if(St[wt])return St[wt];var It;if(wt==="k256")It=new At;else if(wt==="p224")It=new Et;else if(wt==="p192")It=new $t;else if(wt==="p25519")It=new Dt;else throw new Error("Unknown prime "+wt);return St[wt]=It,It};function jt(Ct){if(typeof Ct=="string"){var wt=ot._prime(Ct);this.m=wt.p,this.prime=wt}else rt(Ct.gtn(1),"modulus must be greater than 1"),this.m=Ct,this.prime=null}jt.prototype._verify1=function(wt){rt(wt.negative===0,"red works only with positives"),rt(wt.red,"red works only with red numbers")},jt.prototype._verify2=function(wt,It){rt((wt.negative|It.negative)===0,"red works only with positives"),rt(wt.red&&wt.red===It.red,"red works only with red numbers")},jt.prototype.imod=function(wt){return this.prime?this.prime.ireduce(wt)._forceRed(this):(ut(wt,wt.umod(this.m)._forceRed(this)),wt)},jt.prototype.neg=function(wt){return wt.isZero()?wt.clone():this.m.sub(wt)._forceRed(this)},jt.prototype.add=function(wt,It){this._verify2(wt,It);var Ot=wt.add(It);return Ot.cmp(this.m)>=0&&Ot.isub(this.m),Ot._forceRed(this)},jt.prototype.iadd=function(wt,It){this._verify2(wt,It);var Ot=wt.iadd(It);return Ot.cmp(this.m)>=0&&Ot.isub(this.m),Ot},jt.prototype.sub=function(wt,It){this._verify2(wt,It);var Ot=wt.sub(It);return Ot.cmpn(0)<0&&Ot.iadd(this.m),Ot._forceRed(this)},jt.prototype.isub=function(wt,It){this._verify2(wt,It);var Ot=wt.isub(It);return Ot.cmpn(0)<0&&Ot.iadd(this.m),Ot},jt.prototype.shl=function(wt,It){return this._verify1(wt),this.imod(wt.ushln(It))},jt.prototype.imul=function(wt,It){return this._verify2(wt,It),this.imod(wt.imul(It))},jt.prototype.mul=function(wt,It){return this._verify2(wt,It),this.imod(wt.mul(It))},jt.prototype.isqr=function(wt){return this.imul(wt,wt.clone())},jt.prototype.sqr=function(wt){return this.mul(wt,wt)},jt.prototype.sqrt=function(wt){if(wt.isZero())return wt.clone();var It=this.m.andln(3);if(rt(It%2===1),It===3){var Ot=this.m.add(new ot(1)).iushrn(2);return this.pow(wt,Ot)}for(var Wt=this.m.subn(1),zt=0;!Wt.isZero()&&Wt.andln(1)===0;)zt++,Wt.iushrn(1);rt(!Wt.isZero());var Ft=new ot(1).toRed(this),Nt=Ft.redNeg(),Ut=this.m.subn(1).iushrn(1),Mt=this.m.bitLength();for(Mt=new ot(2*Mt*Mt).toRed(this);this.pow(Mt,Ut).cmp(Nt)!==0;)Mt.redIAdd(Nt);for(var Ht=this.pow(Mt,Wt),en=this.pow(wt,Wt.addn(1).iushrn(1)),sn=this.pow(wt,Wt),Kt=zt;sn.cmp(Ft)!==0;){for(var rn=sn,nn=0;rn.cmp(Ft)!==0;nn++)rn=rn.redSqr();rt(nn=0;zt--){for(var Ht=It.words[zt],en=Mt-1;en>=0;en--){var sn=Ht>>en&1;if(Ft!==Wt[0]&&(Ft=this.sqr(Ft)),sn===0&&Nt===0){Ut=0;continue}Nt<<=1,Nt|=sn,Ut++,!(Ut!==Ot&&(zt!==0||en!==0))&&(Ft=this.mul(Ft,Wt[Nt]),Ut=0,Nt=0)}Mt=26}return Ft},jt.prototype.convertTo=function(wt){var It=wt.umod(this.m);return It===wt?It.clone():It},jt.prototype.convertFrom=function(wt){var It=wt.clone();return It.red=null,It},ot.mont=function(wt){return new Pt(wt)};function Pt(Ct){jt.call(this,Ct),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new ot(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}it(Pt,jt),Pt.prototype.convertTo=function(wt){return this.imod(wt.ushln(this.shift))},Pt.prototype.convertFrom=function(wt){var It=this.imod(wt.mul(this.rinv));return It.red=null,It},Pt.prototype.imul=function(wt,It){if(wt.isZero()||It.isZero())return wt.words[0]=0,wt.length=1,wt;var Ot=wt.imul(It),Wt=Ot.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),zt=Ot.isub(Wt).iushrn(this.shift),Ft=zt;return zt.cmp(this.m)>=0?Ft=zt.isub(this.m):zt.cmpn(0)<0&&(Ft=zt.iadd(this.m)),Ft._forceRed(this)},Pt.prototype.mul=function(wt,It){if(wt.isZero()||It.isZero())return new ot(0)._forceRed(this);var Ot=wt.mul(It),Wt=Ot.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),zt=Ot.isub(Wt).iushrn(this.shift),Ft=zt;return zt.cmp(this.m)>=0?Ft=zt.isub(this.m):zt.cmpn(0)<0&&(Ft=zt.iadd(this.m)),Ft._forceRed(this)},Pt.prototype.invm=function(wt){var It=this.imod(wt._invmp(this.m).mul(this.r2));return It._forceRed(this)}})(tt,commonjsGlobal)})(bn$1);var bnExports$1=bn$1.exports,BN$c=bnExports$1,randomBytes$1=browserExports;function blind(tt){var et=getr(tt),nt=et.toRed(BN$c.mont(tt.modulus)).redPow(new BN$c(tt.publicExponent)).fromRed();return{blinder:nt,unblinder:et.invm(tt.modulus)}}function getr(tt){var et=tt.modulus.byteLength(),nt;do nt=new BN$c(randomBytes$1(et));while(nt.cmp(tt.modulus)>=0||!nt.umod(tt.prime1)||!nt.umod(tt.prime2));return nt}function crt$2(tt,et){var nt=blind(et),rt=et.modulus.byteLength(),it=new BN$c(tt).mul(nt.blinder).umod(et.modulus),ot=it.toRed(BN$c.mont(et.prime1)),at=it.toRed(BN$c.mont(et.prime2)),st=et.coefficient,lt=et.prime1,ct=et.prime2,ut=ot.redPow(et.exponent1).fromRed(),ht=at.redPow(et.exponent2).fromRed(),dt=ut.isub(ht).imul(st).umod(lt).imul(ct);return ht.iadd(dt).imul(nt.unblinder).umod(et.modulus).toArrayLike(Buffer,"be",rt)}crt$2.getr=getr;var browserifyRsa=crt$2,elliptic$2={};const name$1="elliptic",version$2="6.5.4",description="EC cryptography",main="lib/elliptic.js",files=["lib"],scripts={lint:"eslint lib test","lint:fix":"npm run lint -- --fix",unit:"istanbul test _mocha --reporter=spec test/index.js",test:"npm run lint && npm run unit",version:"grunt dist && git add dist/"},repository={type:"git",url:"git@github.com:indutny/elliptic"},keywords=["EC","Elliptic","curve","Cryptography"],author="Fedor Indutny ",license="MIT",bugs={url:"https://github.com/indutny/elliptic/issues"},homepage="https://github.com/indutny/elliptic",devDependencies={brfs:"^2.0.2",coveralls:"^3.1.0",eslint:"^7.6.0",grunt:"^1.2.1","grunt-browserify":"^5.3.0","grunt-cli":"^1.3.2","grunt-contrib-connect":"^3.0.0","grunt-contrib-copy":"^1.0.0","grunt-contrib-uglify":"^5.0.0","grunt-mocha-istanbul":"^5.0.2","grunt-saucelabs":"^9.0.1",istanbul:"^0.4.5",mocha:"^8.0.1"},dependencies={"bn.js":"^4.11.9",brorand:"^1.1.0","hash.js":"^1.0.0","hmac-drbg":"^1.0.1",inherits:"^2.0.4","minimalistic-assert":"^1.0.1","minimalistic-crypto-utils":"^1.0.1"},require$$0$1={name:name$1,version:version$2,description,main,files,scripts,repository,keywords,author,license,bugs,homepage,devDependencies,dependencies};var utils$o={},utils$n={};(function(tt){var et=tt;function nt(ot,at){if(Array.isArray(ot))return ot.slice();if(!ot)return[];var st=[];if(typeof ot!="string"){for(var lt=0;lt>8,ht=ct&255;ut?st.push(ut,ht):st.push(ht)}return st}et.toArray=nt;function rt(ot){return ot.length===1?"0"+ot:ot}et.zero2=rt;function it(ot){for(var at="",st=0;st(mt>>1)-1?bt=(mt>>1)-vt:bt=vt,gt.isubn(bt)):bt=0,pt[yt]=bt,gt.iushrn(1)}return pt}et.getNAF=ot;function at(ut,ht){var dt=[[],[]];ut=ut.clone(),ht=ht.clone();for(var pt=0,mt=0,gt;ut.cmpn(-pt)>0||ht.cmpn(-mt)>0;){var yt=ut.andln(3)+pt&3,bt=ht.andln(3)+mt&3;yt===3&&(yt=-1),bt===3&&(bt=-1);var vt;yt&1?(gt=ut.andln(7)+pt&7,(gt===3||gt===5)&&bt===2?vt=-yt:vt=yt):vt=0,dt[0].push(vt);var xt;bt&1?(gt=ht.andln(7)+mt&7,(gt===3||gt===5)&&yt===2?xt=-bt:xt=bt):xt=0,dt[1].push(xt),2*pt===vt+1&&(pt=1-pt),2*mt===xt+1&&(mt=1-mt),ut.iushrn(1),ht.iushrn(1)}return dt}et.getJSF=at;function st(ut,ht,dt){var pt="_"+ht;ut.prototype[ht]=function(){return this[pt]!==void 0?this[pt]:this[pt]=dt.call(this)}}et.cachedProperty=st;function lt(ut){return typeof ut=="string"?et.toArray(ut,"hex"):ut}et.parseBytes=lt;function ct(ut){return new nt(ut,"hex","le")}et.intFromLE=ct})(utils$o);var curve={},BN$b=bnExports$2,utils$m=utils$o,getNAF=utils$m.getNAF,getJSF=utils$m.getJSF,assert$j=utils$m.assert;function BaseCurve(tt,et){this.type=tt,this.p=new BN$b(et.p,16),this.red=et.prime?BN$b.red(et.prime):BN$b.mont(this.p),this.zero=new BN$b(0).toRed(this.red),this.one=new BN$b(1).toRed(this.red),this.two=new BN$b(2).toRed(this.red),this.n=et.n&&new BN$b(et.n,16),this.g=et.g&&this.pointFromJSON(et.g,et.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var nt=this.n&&this.p.div(this.n);!nt||nt.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}var base$3=BaseCurve;BaseCurve.prototype.point=function(){throw new Error("Not implemented")};BaseCurve.prototype.validate=function(){throw new Error("Not implemented")};BaseCurve.prototype._fixedNafMul=function(et,nt){assert$j(et.precomputed);var rt=et._getDoubles(),it=getNAF(nt,1,this._bitLength),ot=(1<=st;ct--)lt=(lt<<1)+it[ct];at.push(lt)}for(var ut=this.jpoint(null,null,null),ht=this.jpoint(null,null,null),dt=ot;dt>0;dt--){for(st=0;st=0;lt--){for(var ct=0;lt>=0&&at[lt]===0;lt--)ct++;if(lt>=0&&ct++,st=st.dblp(ct),lt<0)break;var ut=at[lt];assert$j(ut!==0),et.type==="affine"?ut>0?st=st.mixedAdd(ot[ut-1>>1]):st=st.mixedAdd(ot[-ut-1>>1].neg()):ut>0?st=st.add(ot[ut-1>>1]):st=st.add(ot[-ut-1>>1].neg())}return et.type==="affine"?st.toP():st};BaseCurve.prototype._wnafMulAdd=function(et,nt,rt,it,ot){var at=this._wnafT1,st=this._wnafT2,lt=this._wnafT3,ct=0,ut,ht,dt;for(ut=0;ut=1;ut-=2){var mt=ut-1,gt=ut;if(at[mt]!==1||at[gt]!==1){lt[mt]=getNAF(rt[mt],at[mt],this._bitLength),lt[gt]=getNAF(rt[gt],at[gt],this._bitLength),ct=Math.max(lt[mt].length,ct),ct=Math.max(lt[gt].length,ct);continue}var yt=[nt[mt],null,null,nt[gt]];nt[mt].y.cmp(nt[gt].y)===0?(yt[1]=nt[mt].add(nt[gt]),yt[2]=nt[mt].toJ().mixedAdd(nt[gt].neg())):nt[mt].y.cmp(nt[gt].y.redNeg())===0?(yt[1]=nt[mt].toJ().mixedAdd(nt[gt]),yt[2]=nt[mt].add(nt[gt].neg())):(yt[1]=nt[mt].toJ().mixedAdd(nt[gt]),yt[2]=nt[mt].toJ().mixedAdd(nt[gt].neg()));var bt=[-3,-1,-5,-7,0,7,5,1,3],vt=getJSF(rt[mt],rt[gt]);for(ct=Math.max(vt[0].length,ct),lt[mt]=new Array(ct),lt[gt]=new Array(ct),ht=0;ht=0;ut--){for(var At=0;ut>=0;){var Et=!0;for(ht=0;ht=0&&At++,St=St.dblp(At),ut<0)break;for(ht=0;ht0?dt=st[ht][$t-1>>1]:$t<0&&(dt=st[ht][-$t-1>>1].neg()),dt.type==="affine"?St=St.mixedAdd(dt):St=St.add(dt))}}for(ut=0;ut=Math.ceil((et.bitLength()+1)/nt.step):!1};BasePoint.prototype._getDoubles=function(et,nt){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var rt=[this],it=this,ot=0;ot=0&&(pt=ct,mt=ut),ht.negative&&(ht=ht.neg(),dt=dt.neg()),pt.negative&&(pt=pt.neg(),mt=mt.neg()),[{a:ht,b:dt},{a:pt,b:mt}]};ShortCurve.prototype._endoSplit=function(et){var nt=this.endo.basis,rt=nt[0],it=nt[1],ot=it.b.mul(et).divRound(this.n),at=rt.b.neg().mul(et).divRound(this.n),st=ot.mul(rt.a),lt=at.mul(it.a),ct=ot.mul(rt.b),ut=at.mul(it.b),ht=et.sub(st).sub(lt),dt=ct.add(ut).neg();return{k1:ht,k2:dt}};ShortCurve.prototype.pointFromX=function(et,nt){et=new BN$a(et,16),et.red||(et=et.toRed(this.red));var rt=et.redSqr().redMul(et).redIAdd(et.redMul(this.a)).redIAdd(this.b),it=rt.redSqrt();if(it.redSqr().redSub(rt).cmp(this.zero)!==0)throw new Error("invalid point");var ot=it.fromRed().isOdd();return(nt&&!ot||!nt&&ot)&&(it=it.redNeg()),this.point(et,it)};ShortCurve.prototype.validate=function(et){if(et.inf)return!0;var nt=et.x,rt=et.y,it=this.a.redMul(nt),ot=nt.redSqr().redMul(nt).redIAdd(it).redIAdd(this.b);return rt.redSqr().redISub(ot).cmpn(0)===0};ShortCurve.prototype._endoWnafMulAdd=function(et,nt,rt){for(var it=this._endoWnafT1,ot=this._endoWnafT2,at=0;at":""};Point$2.prototype.isInfinity=function(){return this.inf};Point$2.prototype.add=function(et){if(this.inf)return et;if(et.inf)return this;if(this.eq(et))return this.dbl();if(this.neg().eq(et))return this.curve.point(null,null);if(this.x.cmp(et.x)===0)return this.curve.point(null,null);var nt=this.y.redSub(et.y);nt.cmpn(0)!==0&&(nt=nt.redMul(this.x.redSub(et.x).redInvm()));var rt=nt.redSqr().redISub(this.x).redISub(et.x),it=nt.redMul(this.x.redSub(rt)).redISub(this.y);return this.curve.point(rt,it)};Point$2.prototype.dbl=function(){if(this.inf)return this;var et=this.y.redAdd(this.y);if(et.cmpn(0)===0)return this.curve.point(null,null);var nt=this.curve.a,rt=this.x.redSqr(),it=et.redInvm(),ot=rt.redAdd(rt).redIAdd(rt).redIAdd(nt).redMul(it),at=ot.redSqr().redISub(this.x.redAdd(this.x)),st=ot.redMul(this.x.redSub(at)).redISub(this.y);return this.curve.point(at,st)};Point$2.prototype.getX=function(){return this.x.fromRed()};Point$2.prototype.getY=function(){return this.y.fromRed()};Point$2.prototype.mul=function(et){return et=new BN$a(et,16),this.isInfinity()?this:this._hasDoubles(et)?this.curve._fixedNafMul(this,et):this.curve.endo?this.curve._endoWnafMulAdd([this],[et]):this.curve._wnafMul(this,et)};Point$2.prototype.mulAdd=function(et,nt,rt){var it=[this,nt],ot=[et,rt];return this.curve.endo?this.curve._endoWnafMulAdd(it,ot):this.curve._wnafMulAdd(1,it,ot,2)};Point$2.prototype.jmulAdd=function(et,nt,rt){var it=[this,nt],ot=[et,rt];return this.curve.endo?this.curve._endoWnafMulAdd(it,ot,!0):this.curve._wnafMulAdd(1,it,ot,2,!0)};Point$2.prototype.eq=function(et){return this===et||this.inf===et.inf&&(this.inf||this.x.cmp(et.x)===0&&this.y.cmp(et.y)===0)};Point$2.prototype.neg=function(et){if(this.inf)return this;var nt=this.curve.point(this.x,this.y.redNeg());if(et&&this.precomputed){var rt=this.precomputed,it=function(ot){return ot.neg()};nt.precomputed={naf:rt.naf&&{wnd:rt.naf.wnd,points:rt.naf.points.map(it)},doubles:rt.doubles&&{step:rt.doubles.step,points:rt.doubles.points.map(it)}}}return nt};Point$2.prototype.toJ=function(){if(this.inf)return this.curve.jpoint(null,null,null);var et=this.curve.jpoint(this.x,this.y,this.curve.one);return et};function JPoint(tt,et,nt,rt){Base$2.BasePoint.call(this,tt,"jacobian"),et===null&&nt===null&&rt===null?(this.x=this.curve.one,this.y=this.curve.one,this.z=new BN$a(0)):(this.x=new BN$a(et,16),this.y=new BN$a(nt,16),this.z=new BN$a(rt,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}inherits$9(JPoint,Base$2.BasePoint);ShortCurve.prototype.jpoint=function(et,nt,rt){return new JPoint(this,et,nt,rt)};JPoint.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var et=this.z.redInvm(),nt=et.redSqr(),rt=this.x.redMul(nt),it=this.y.redMul(nt).redMul(et);return this.curve.point(rt,it)};JPoint.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)};JPoint.prototype.add=function(et){if(this.isInfinity())return et;if(et.isInfinity())return this;var nt=et.z.redSqr(),rt=this.z.redSqr(),it=this.x.redMul(nt),ot=et.x.redMul(rt),at=this.y.redMul(nt.redMul(et.z)),st=et.y.redMul(rt.redMul(this.z)),lt=it.redSub(ot),ct=at.redSub(st);if(lt.cmpn(0)===0)return ct.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var ut=lt.redSqr(),ht=ut.redMul(lt),dt=it.redMul(ut),pt=ct.redSqr().redIAdd(ht).redISub(dt).redISub(dt),mt=ct.redMul(dt.redISub(pt)).redISub(at.redMul(ht)),gt=this.z.redMul(et.z).redMul(lt);return this.curve.jpoint(pt,mt,gt)};JPoint.prototype.mixedAdd=function(et){if(this.isInfinity())return et.toJ();if(et.isInfinity())return this;var nt=this.z.redSqr(),rt=this.x,it=et.x.redMul(nt),ot=this.y,at=et.y.redMul(nt).redMul(this.z),st=rt.redSub(it),lt=ot.redSub(at);if(st.cmpn(0)===0)return lt.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var ct=st.redSqr(),ut=ct.redMul(st),ht=rt.redMul(ct),dt=lt.redSqr().redIAdd(ut).redISub(ht).redISub(ht),pt=lt.redMul(ht.redISub(dt)).redISub(ot.redMul(ut)),mt=this.z.redMul(st);return this.curve.jpoint(dt,pt,mt)};JPoint.prototype.dblp=function(et){if(et===0)return this;if(this.isInfinity())return this;if(!et)return this.dbl();var nt;if(this.curve.zeroA||this.curve.threeA){var rt=this;for(nt=0;nt=0)return!1;if(rt.redIAdd(ot),this.x.cmp(rt)===0)return!0}};JPoint.prototype.inspect=function(){return this.isInfinity()?"":""};JPoint.prototype.isInfinity=function(){return this.z.cmpn(0)===0};var BN$9=bnExports$2,inherits$8=inherits_browserExports,Base$1=base$3,utils$k=utils$o;function MontCurve(tt){Base$1.call(this,"mont",tt),this.a=new BN$9(tt.a,16).toRed(this.red),this.b=new BN$9(tt.b,16).toRed(this.red),this.i4=new BN$9(4).toRed(this.red).redInvm(),this.two=new BN$9(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}inherits$8(MontCurve,Base$1);var mont=MontCurve;MontCurve.prototype.validate=function(et){var nt=et.normalize().x,rt=nt.redSqr(),it=rt.redMul(nt).redAdd(rt.redMul(this.a)).redAdd(nt),ot=it.redSqrt();return ot.redSqr().cmp(it)===0};function Point$1(tt,et,nt){Base$1.BasePoint.call(this,tt,"projective"),et===null&&nt===null?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new BN$9(et,16),this.z=new BN$9(nt,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}inherits$8(Point$1,Base$1.BasePoint);MontCurve.prototype.decodePoint=function(et,nt){return this.point(utils$k.toArray(et,nt),1)};MontCurve.prototype.point=function(et,nt){return new Point$1(this,et,nt)};MontCurve.prototype.pointFromJSON=function(et){return Point$1.fromJSON(this,et)};Point$1.prototype.precompute=function(){};Point$1.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())};Point$1.fromJSON=function(et,nt){return new Point$1(et,nt[0],nt[1]||et.one)};Point$1.prototype.inspect=function(){return this.isInfinity()?"":""};Point$1.prototype.isInfinity=function(){return this.z.cmpn(0)===0};Point$1.prototype.dbl=function(){var et=this.x.redAdd(this.z),nt=et.redSqr(),rt=this.x.redSub(this.z),it=rt.redSqr(),ot=nt.redSub(it),at=nt.redMul(it),st=ot.redMul(it.redAdd(this.curve.a24.redMul(ot)));return this.curve.point(at,st)};Point$1.prototype.add=function(){throw new Error("Not supported on Montgomery curve")};Point$1.prototype.diffAdd=function(et,nt){var rt=this.x.redAdd(this.z),it=this.x.redSub(this.z),ot=et.x.redAdd(et.z),at=et.x.redSub(et.z),st=at.redMul(rt),lt=ot.redMul(it),ct=nt.z.redMul(st.redAdd(lt).redSqr()),ut=nt.x.redMul(st.redISub(lt).redSqr());return this.curve.point(ct,ut)};Point$1.prototype.mul=function(et){for(var nt=et.clone(),rt=this,it=this.curve.point(null,null),ot=this,at=[];nt.cmpn(0)!==0;nt.iushrn(1))at.push(nt.andln(1));for(var st=at.length-1;st>=0;st--)at[st]===0?(rt=rt.diffAdd(it,ot),it=it.dbl()):(it=rt.diffAdd(it,ot),rt=rt.dbl());return it};Point$1.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")};Point$1.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")};Point$1.prototype.eq=function(et){return this.getX().cmp(et.getX())===0};Point$1.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this};Point$1.prototype.getX=function(){return this.normalize(),this.x.fromRed()};var utils$j=utils$o,BN$8=bnExports$2,inherits$7=inherits_browserExports,Base=base$3,assert$h=utils$j.assert;function EdwardsCurve(tt){this.twisted=(tt.a|0)!==1,this.mOneA=this.twisted&&(tt.a|0)===-1,this.extended=this.mOneA,Base.call(this,"edwards",tt),this.a=new BN$8(tt.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new BN$8(tt.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new BN$8(tt.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),assert$h(!this.twisted||this.c.fromRed().cmpn(1)===0),this.oneC=(tt.c|0)===1}inherits$7(EdwardsCurve,Base);var edwards=EdwardsCurve;EdwardsCurve.prototype._mulA=function(et){return this.mOneA?et.redNeg():this.a.redMul(et)};EdwardsCurve.prototype._mulC=function(et){return this.oneC?et:this.c.redMul(et)};EdwardsCurve.prototype.jpoint=function(et,nt,rt,it){return this.point(et,nt,rt,it)};EdwardsCurve.prototype.pointFromX=function(et,nt){et=new BN$8(et,16),et.red||(et=et.toRed(this.red));var rt=et.redSqr(),it=this.c2.redSub(this.a.redMul(rt)),ot=this.one.redSub(this.c2.redMul(this.d).redMul(rt)),at=it.redMul(ot.redInvm()),st=at.redSqrt();if(st.redSqr().redSub(at).cmp(this.zero)!==0)throw new Error("invalid point");var lt=st.fromRed().isOdd();return(nt&&!lt||!nt&<)&&(st=st.redNeg()),this.point(et,st)};EdwardsCurve.prototype.pointFromY=function(et,nt){et=new BN$8(et,16),et.red||(et=et.toRed(this.red));var rt=et.redSqr(),it=rt.redSub(this.c2),ot=rt.redMul(this.d).redMul(this.c2).redSub(this.a),at=it.redMul(ot.redInvm());if(at.cmp(this.zero)===0){if(nt)throw new Error("invalid point");return this.point(this.zero,et)}var st=at.redSqrt();if(st.redSqr().redSub(at).cmp(this.zero)!==0)throw new Error("invalid point");return st.fromRed().isOdd()!==nt&&(st=st.redNeg()),this.point(st,et)};EdwardsCurve.prototype.validate=function(et){if(et.isInfinity())return!0;et.normalize();var nt=et.x.redSqr(),rt=et.y.redSqr(),it=nt.redMul(this.a).redAdd(rt),ot=this.c2.redMul(this.one.redAdd(this.d.redMul(nt).redMul(rt)));return it.cmp(ot)===0};function Point(tt,et,nt,rt,it){Base.BasePoint.call(this,tt,"projective"),et===null&&nt===null&&rt===null?(this.x=this.curve.zero,this.y=this.curve.one,this.z=this.curve.one,this.t=this.curve.zero,this.zOne=!0):(this.x=new BN$8(et,16),this.y=new BN$8(nt,16),this.z=rt?new BN$8(rt,16):this.curve.one,this.t=it&&new BN$8(it,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.t&&!this.t.red&&(this.t=this.t.toRed(this.curve.red)),this.zOne=this.z===this.curve.one,this.curve.extended&&!this.t&&(this.t=this.x.redMul(this.y),this.zOne||(this.t=this.t.redMul(this.z.redInvm()))))}inherits$7(Point,Base.BasePoint);EdwardsCurve.prototype.pointFromJSON=function(et){return Point.fromJSON(this,et)};EdwardsCurve.prototype.point=function(et,nt,rt,it){return new Point(this,et,nt,rt,it)};Point.fromJSON=function(et,nt){return new Point(et,nt[0],nt[1],nt[2])};Point.prototype.inspect=function(){return this.isInfinity()?"":""};Point.prototype.isInfinity=function(){return this.x.cmpn(0)===0&&(this.y.cmp(this.z)===0||this.zOne&&this.y.cmp(this.curve.c)===0)};Point.prototype._extDbl=function(){var et=this.x.redSqr(),nt=this.y.redSqr(),rt=this.z.redSqr();rt=rt.redIAdd(rt);var it=this.curve._mulA(et),ot=this.x.redAdd(this.y).redSqr().redISub(et).redISub(nt),at=it.redAdd(nt),st=at.redSub(rt),lt=it.redSub(nt),ct=ot.redMul(st),ut=at.redMul(lt),ht=ot.redMul(lt),dt=st.redMul(at);return this.curve.point(ct,ut,dt,ht)};Point.prototype._projDbl=function(){var et=this.x.redAdd(this.y).redSqr(),nt=this.x.redSqr(),rt=this.y.redSqr(),it,ot,at,st,lt,ct;if(this.curve.twisted){st=this.curve._mulA(nt);var ut=st.redAdd(rt);this.zOne?(it=et.redSub(nt).redSub(rt).redMul(ut.redSub(this.curve.two)),ot=ut.redMul(st.redSub(rt)),at=ut.redSqr().redSub(ut).redSub(ut)):(lt=this.z.redSqr(),ct=ut.redSub(lt).redISub(lt),it=et.redSub(nt).redISub(rt).redMul(ct),ot=ut.redMul(st.redSub(rt)),at=ut.redMul(ct))}else st=nt.redAdd(rt),lt=this.curve._mulC(this.z).redSqr(),ct=st.redSub(lt).redSub(lt),it=this.curve._mulC(et.redISub(st)).redMul(ct),ot=this.curve._mulC(st).redMul(nt.redISub(rt)),at=st.redMul(ct);return this.curve.point(it,ot,at)};Point.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()};Point.prototype._extAdd=function(et){var nt=this.y.redSub(this.x).redMul(et.y.redSub(et.x)),rt=this.y.redAdd(this.x).redMul(et.y.redAdd(et.x)),it=this.t.redMul(this.curve.dd).redMul(et.t),ot=this.z.redMul(et.z.redAdd(et.z)),at=rt.redSub(nt),st=ot.redSub(it),lt=ot.redAdd(it),ct=rt.redAdd(nt),ut=at.redMul(st),ht=lt.redMul(ct),dt=at.redMul(ct),pt=st.redMul(lt);return this.curve.point(ut,ht,pt,dt)};Point.prototype._projAdd=function(et){var nt=this.z.redMul(et.z),rt=nt.redSqr(),it=this.x.redMul(et.x),ot=this.y.redMul(et.y),at=this.curve.d.redMul(it).redMul(ot),st=rt.redSub(at),lt=rt.redAdd(at),ct=this.x.redAdd(this.y).redMul(et.x.redAdd(et.y)).redISub(it).redISub(ot),ut=nt.redMul(st).redMul(ct),ht,dt;return this.curve.twisted?(ht=nt.redMul(lt).redMul(ot.redSub(this.curve._mulA(it))),dt=st.redMul(lt)):(ht=nt.redMul(lt).redMul(ot.redSub(it)),dt=this.curve._mulC(st).redMul(lt)),this.curve.point(ut,ht,dt)};Point.prototype.add=function(et){return this.isInfinity()?et:et.isInfinity()?this:this.curve.extended?this._extAdd(et):this._projAdd(et)};Point.prototype.mul=function(et){return this._hasDoubles(et)?this.curve._fixedNafMul(this,et):this.curve._wnafMul(this,et)};Point.prototype.mulAdd=function(et,nt,rt){return this.curve._wnafMulAdd(1,[this,nt],[et,rt],2,!1)};Point.prototype.jmulAdd=function(et,nt,rt){return this.curve._wnafMulAdd(1,[this,nt],[et,rt],2,!0)};Point.prototype.normalize=function(){if(this.zOne)return this;var et=this.z.redInvm();return this.x=this.x.redMul(et),this.y=this.y.redMul(et),this.t&&(this.t=this.t.redMul(et)),this.z=this.curve.one,this.zOne=!0,this};Point.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())};Point.prototype.getX=function(){return this.normalize(),this.x.fromRed()};Point.prototype.getY=function(){return this.normalize(),this.y.fromRed()};Point.prototype.eq=function(et){return this===et||this.getX().cmp(et.getX())===0&&this.getY().cmp(et.getY())===0};Point.prototype.eqXToP=function(et){var nt=et.toRed(this.curve.red).redMul(this.z);if(this.x.cmp(nt)===0)return!0;for(var rt=et.clone(),it=this.curve.redN.redMul(this.z);;){if(rt.iadd(this.curve.n),rt.cmp(this.curve.p)>=0)return!1;if(nt.redIAdd(it),this.x.cmp(nt)===0)return!0}};Point.prototype.toP=Point.prototype.normalize;Point.prototype.mixedAdd=Point.prototype.add;(function(tt){var et=tt;et.base=base$3,et.short=short,et.mont=mont,et.edwards=edwards})(curve);var curves$1={},hash$3={},utils$i={},assert$g=minimalisticAssert,inherits$6=inherits_browserExports;utils$i.inherits=inherits$6;function isSurrogatePair(tt,et){return(tt.charCodeAt(et)&64512)!==55296||et<0||et+1>=tt.length?!1:(tt.charCodeAt(et+1)&64512)===56320}function toArray$4(tt,et){if(Array.isArray(tt))return tt.slice();if(!tt)return[];var nt=[];if(typeof tt=="string")if(et){if(et==="hex")for(tt=tt.replace(/[^a-z0-9]+/ig,""),tt.length%2!==0&&(tt="0"+tt),it=0;it>6|192,nt[rt++]=ot&63|128):isSurrogatePair(tt,it)?(ot=65536+((ot&1023)<<10)+(tt.charCodeAt(++it)&1023),nt[rt++]=ot>>18|240,nt[rt++]=ot>>12&63|128,nt[rt++]=ot>>6&63|128,nt[rt++]=ot&63|128):(nt[rt++]=ot>>12|224,nt[rt++]=ot>>6&63|128,nt[rt++]=ot&63|128)}else for(it=0;it>>24|tt>>>8&65280|tt<<8&16711680|(tt&255)<<24;return et>>>0}utils$i.htonl=htonl;function toHex32(tt,et){for(var nt="",rt=0;rt>>0}return ot}utils$i.join32=join32;function split32(tt,et){for(var nt=new Array(tt.length*4),rt=0,it=0;rt>>24,nt[it+1]=ot>>>16&255,nt[it+2]=ot>>>8&255,nt[it+3]=ot&255):(nt[it+3]=ot>>>24,nt[it+2]=ot>>>16&255,nt[it+1]=ot>>>8&255,nt[it]=ot&255)}return nt}utils$i.split32=split32;function rotr32$1(tt,et){return tt>>>et|tt<<32-et}utils$i.rotr32=rotr32$1;function rotl32$2(tt,et){return tt<>>32-et}utils$i.rotl32=rotl32$2;function sum32$3(tt,et){return tt+et>>>0}utils$i.sum32=sum32$3;function sum32_3$1(tt,et,nt){return tt+et+nt>>>0}utils$i.sum32_3=sum32_3$1;function sum32_4$2(tt,et,nt,rt){return tt+et+nt+rt>>>0}utils$i.sum32_4=sum32_4$2;function sum32_5$2(tt,et,nt,rt,it){return tt+et+nt+rt+it>>>0}utils$i.sum32_5=sum32_5$2;function sum64$1(tt,et,nt,rt){var it=tt[et],ot=tt[et+1],at=rt+ot>>>0,st=(at>>0,tt[et+1]=at}utils$i.sum64=sum64$1;function sum64_hi$1(tt,et,nt,rt){var it=et+rt>>>0,ot=(it>>0}utils$i.sum64_hi=sum64_hi$1;function sum64_lo$1(tt,et,nt,rt){var it=et+rt;return it>>>0}utils$i.sum64_lo=sum64_lo$1;function sum64_4_hi$1(tt,et,nt,rt,it,ot,at,st){var lt=0,ct=et;ct=ct+rt>>>0,lt+=ct>>0,lt+=ct>>0,lt+=ct>>0}utils$i.sum64_4_hi=sum64_4_hi$1;function sum64_4_lo$1(tt,et,nt,rt,it,ot,at,st){var lt=et+rt+ot+st;return lt>>>0}utils$i.sum64_4_lo=sum64_4_lo$1;function sum64_5_hi$1(tt,et,nt,rt,it,ot,at,st,lt,ct){var ut=0,ht=et;ht=ht+rt>>>0,ut+=ht>>0,ut+=ht>>0,ut+=ht>>0,ut+=ht>>0}utils$i.sum64_5_hi=sum64_5_hi$1;function sum64_5_lo$1(tt,et,nt,rt,it,ot,at,st,lt,ct){var ut=et+rt+ot+st+ct;return ut>>>0}utils$i.sum64_5_lo=sum64_5_lo$1;function rotr64_hi$1(tt,et,nt){var rt=et<<32-nt|tt>>>nt;return rt>>>0}utils$i.rotr64_hi=rotr64_hi$1;function rotr64_lo$1(tt,et,nt){var rt=tt<<32-nt|et>>>nt;return rt>>>0}utils$i.rotr64_lo=rotr64_lo$1;function shr64_hi$1(tt,et,nt){return tt>>>nt}utils$i.shr64_hi=shr64_hi$1;function shr64_lo$1(tt,et,nt){var rt=tt<<32-nt|et>>>nt;return rt>>>0}utils$i.shr64_lo=shr64_lo$1;var common$6={},utils$h=utils$i,assert$f=minimalisticAssert;function BlockHash$4(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}common$6.BlockHash=BlockHash$4;BlockHash$4.prototype.update=function(et,nt){if(et=utils$h.toArray(et,nt),this.pending?this.pending=this.pending.concat(et):this.pending=et,this.pendingTotal+=et.length,this.pending.length>=this._delta8){et=this.pending;var rt=et.length%this._delta8;this.pending=et.slice(et.length-rt,et.length),this.pending.length===0&&(this.pending=null),et=utils$h.join32(et,0,et.length-rt,this.endian);for(var it=0;it>>24&255,it[ot++]=et>>>16&255,it[ot++]=et>>>8&255,it[ot++]=et&255}else for(it[ot++]=et&255,it[ot++]=et>>>8&255,it[ot++]=et>>>16&255,it[ot++]=et>>>24&255,it[ot++]=0,it[ot++]=0,it[ot++]=0,it[ot++]=0,at=8;at>>3}common$5.g0_256=g0_256$1;function g1_256$1(tt){return rotr32(tt,17)^rotr32(tt,19)^tt>>>10}common$5.g1_256=g1_256$1;var utils$f=utils$i,common$4=common$6,shaCommon$1=common$5,rotl32$1=utils$f.rotl32,sum32$2=utils$f.sum32,sum32_5$1=utils$f.sum32_5,ft_1=shaCommon$1.ft_1,BlockHash$3=common$4.BlockHash,sha1_K=[1518500249,1859775393,2400959708,3395469782];function SHA1$1(){if(!(this instanceof SHA1$1))return new SHA1$1;BlockHash$3.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}utils$f.inherits(SHA1$1,BlockHash$3);var _1=SHA1$1;SHA1$1.blockSize=512;SHA1$1.outSize=160;SHA1$1.hmacStrength=80;SHA1$1.padLength=64;SHA1$1.prototype._update=function(et,nt){for(var rt=this.W,it=0;it<16;it++)rt[it]=et[nt+it];for(;itthis.blockSize&&(et=new this.Hash().update(et).digest()),assert$c(et.length<=this.blockSize);for(var nt=et.length;nt=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(et,nt,rt)}var hmacDrbg=HmacDRBG;HmacDRBG.prototype._init=function(et,nt,rt){var it=et.concat(nt).concat(rt);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var ot=0;ot=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(et.concat(rt||[])),this._reseed=1};HmacDRBG.prototype.generate=function(et,nt,rt,it){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");typeof nt!="string"&&(it=rt,rt=nt,nt=null),rt&&(rt=utils$8.toArray(rt,it||"hex"),this._update(rt));for(var ot=[];ot.length"};var BN$6=bnExports$2,utils$6=utils$o,assert$9=utils$6.assert;function Signature$2(tt,et){if(tt instanceof Signature$2)return tt;this._importDER(tt,et)||(assert$9(tt.r&&tt.s,"Signature without r or s"),this.r=new BN$6(tt.r,16),this.s=new BN$6(tt.s,16),tt.recoveryParam===void 0?this.recoveryParam=null:this.recoveryParam=tt.recoveryParam)}var signature$1=Signature$2;function Position$1(){this.place=0}function getLength(tt,et){var nt=tt[et.place++];if(!(nt&128))return nt;var rt=nt&15;if(rt===0||rt>4)return!1;for(var it=0,ot=0,at=et.place;ot>>=0;return it<=127?!1:(et.place=at,it)}function rmPadding(tt){for(var et=0,nt=tt.length-1;!tt[et]&&!(tt[et+1]&128)&&et>>3);for(tt.push(nt|128);--nt;)tt.push(et>>>(nt<<3)&255);tt.push(et)}Signature$2.prototype.toDER=function(et){var nt=this.r.toArray(),rt=this.s.toArray();for(nt[0]&128&&(nt=[0].concat(nt)),rt[0]&128&&(rt=[0].concat(rt)),nt=rmPadding(nt),rt=rmPadding(rt);!rt[0]&&!(rt[1]&128);)rt=rt.slice(1);var it=[2];constructLength(it,nt.length),it=it.concat(nt),it.push(2),constructLength(it,rt.length);var ot=it.concat(rt),at=[48];return constructLength(at,ot.length),at=at.concat(ot),utils$6.encode(at,et)};var ec$1,hasRequiredEc;function requireEc(){if(hasRequiredEc)return ec$1;hasRequiredEc=1;var tt=bnExports$2,et=hmacDrbg,nt=utils$o,rt=curves$1,it=requireBrorand(),ot=nt.assert,at=key$2,st=signature$1;function lt(ct){if(!(this instanceof lt))return new lt(ct);typeof ct=="string"&&(ot(Object.prototype.hasOwnProperty.call(rt,ct),"Unknown curve "+ct),ct=rt[ct]),ct instanceof rt.PresetCurve&&(ct={curve:ct}),this.curve=ct.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=ct.curve.g,this.g.precompute(ct.curve.n.bitLength()+1),this.hash=ct.hash||ct.curve.hash}return ec$1=lt,lt.prototype.keyPair=function(ut){return new at(this,ut)},lt.prototype.keyFromPrivate=function(ut,ht){return at.fromPrivate(this,ut,ht)},lt.prototype.keyFromPublic=function(ut,ht){return at.fromPublic(this,ut,ht)},lt.prototype.genKeyPair=function(ut){ut||(ut={});for(var ht=new et({hash:this.hash,pers:ut.pers,persEnc:ut.persEnc||"utf8",entropy:ut.entropy||it(this.hash.hmacStrength),entropyEnc:ut.entropy&&ut.entropyEnc||"utf8",nonce:this.n.toArray()}),dt=this.n.byteLength(),pt=this.n.sub(new tt(2));;){var mt=new tt(ht.generate(dt));if(!(mt.cmp(pt)>0))return mt.iaddn(1),this.keyFromPrivate(mt)}},lt.prototype._truncateToN=function(ut,ht){var dt=ut.byteLength()*8-this.n.bitLength();return dt>0&&(ut=ut.ushrn(dt)),!ht&&ut.cmp(this.n)>=0?ut.sub(this.n):ut},lt.prototype.sign=function(ut,ht,dt,pt){typeof dt=="object"&&(pt=dt,dt=null),pt||(pt={}),ht=this.keyFromPrivate(ht,dt),ut=this._truncateToN(new tt(ut,16));for(var mt=this.n.byteLength(),gt=ht.getPrivate().toArray("be",mt),yt=ut.toArray("be",mt),bt=new et({hash:this.hash,entropy:gt,nonce:yt,pers:pt.pers,persEnc:pt.persEnc||"utf8"}),vt=this.n.sub(new tt(1)),xt=0;;xt++){var kt=pt.k?pt.k(xt):new tt(bt.generate(this.n.byteLength()));if(kt=this._truncateToN(kt,!0),!(kt.cmpn(1)<=0||kt.cmp(vt)>=0)){var St=this.g.mul(kt);if(!St.isInfinity()){var Tt=St.getX(),At=Tt.umod(this.n);if(At.cmpn(0)!==0){var Et=kt.invm(this.n).mul(At.mul(ht.getPrivate()).iadd(ut));if(Et=Et.umod(this.n),Et.cmpn(0)!==0){var $t=(St.getY().isOdd()?1:0)|(Tt.cmp(At)!==0?2:0);return pt.canonical&&Et.cmp(this.nh)>0&&(Et=this.n.sub(Et),$t^=1),new st({r:At,s:Et,recoveryParam:$t})}}}}}},lt.prototype.verify=function(ut,ht,dt,pt){ut=this._truncateToN(new tt(ut,16)),dt=this.keyFromPublic(dt,pt),ht=new st(ht,"hex");var mt=ht.r,gt=ht.s;if(mt.cmpn(1)<0||mt.cmp(this.n)>=0||gt.cmpn(1)<0||gt.cmp(this.n)>=0)return!1;var yt=gt.invm(this.n),bt=yt.mul(ut).umod(this.n),vt=yt.mul(mt).umod(this.n),xt;return this.curve._maxwellTrick?(xt=this.g.jmulAdd(bt,dt.getPublic(),vt),xt.isInfinity()?!1:xt.eqXToP(mt)):(xt=this.g.mulAdd(bt,dt.getPublic(),vt),xt.isInfinity()?!1:xt.getX().umod(this.n).cmp(mt)===0)},lt.prototype.recoverPubKey=function(ct,ut,ht,dt){ot((3&ht)===ht,"The recovery param is more than two bits"),ut=new st(ut,dt);var pt=this.n,mt=new tt(ct),gt=ut.r,yt=ut.s,bt=ht&1,vt=ht>>1;if(gt.cmp(this.curve.p.umod(this.curve.n))>=0&&vt)throw new Error("Unable to find sencond key candinate");vt?gt=this.curve.pointFromX(gt.add(this.curve.n),bt):gt=this.curve.pointFromX(gt,bt);var xt=ut.r.invm(pt),kt=pt.sub(mt).mul(xt).umod(pt),St=yt.mul(xt).umod(pt);return this.g.mulAdd(kt,gt,St)},lt.prototype.getKeyRecoveryParam=function(ct,ut,ht,dt){if(ut=new st(ut,dt),ut.recoveryParam!==null)return ut.recoveryParam;for(var pt=0;pt<4;pt++){var mt;try{mt=this.recoverPubKey(ct,ut,pt)}catch{continue}if(mt.eq(ht))return pt}throw new Error("Unable to find valid recovery factor")},ec$1}var utils$5=utils$o,assert$8=utils$5.assert,parseBytes$2=utils$5.parseBytes,cachedProperty$1=utils$5.cachedProperty;function KeyPair$1(tt,et){this.eddsa=tt,this._secret=parseBytes$2(et.secret),tt.isPoint(et.pub)?this._pub=et.pub:this._pubBytes=parseBytes$2(et.pub)}KeyPair$1.fromPublic=function(et,nt){return nt instanceof KeyPair$1?nt:new KeyPair$1(et,{pub:nt})};KeyPair$1.fromSecret=function(et,nt){return nt instanceof KeyPair$1?nt:new KeyPair$1(et,{secret:nt})};KeyPair$1.prototype.secret=function(){return this._secret};cachedProperty$1(KeyPair$1,"pubBytes",function(){return this.eddsa.encodePoint(this.pub())});cachedProperty$1(KeyPair$1,"pub",function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())});cachedProperty$1(KeyPair$1,"privBytes",function(){var et=this.eddsa,nt=this.hash(),rt=et.encodingLength-1,it=nt.slice(0,et.encodingLength);return it[0]&=248,it[rt]&=127,it[rt]|=64,it});cachedProperty$1(KeyPair$1,"priv",function(){return this.eddsa.decodeInt(this.privBytes())});cachedProperty$1(KeyPair$1,"hash",function(){return this.eddsa.hash().update(this.secret()).digest()});cachedProperty$1(KeyPair$1,"messagePrefix",function(){return this.hash().slice(this.eddsa.encodingLength)});KeyPair$1.prototype.sign=function(et){return assert$8(this._secret,"KeyPair can only verify"),this.eddsa.sign(et,this)};KeyPair$1.prototype.verify=function(et,nt){return this.eddsa.verify(et,nt,this)};KeyPair$1.prototype.getSecret=function(et){return assert$8(this._secret,"KeyPair is public only"),utils$5.encode(this.secret(),et)};KeyPair$1.prototype.getPublic=function(et){return utils$5.encode(this.pubBytes(),et)};var key$1=KeyPair$1,BN$5=bnExports$2,utils$4=utils$o,assert$7=utils$4.assert,cachedProperty=utils$4.cachedProperty,parseBytes$1=utils$4.parseBytes;function Signature$1(tt,et){this.eddsa=tt,typeof et!="object"&&(et=parseBytes$1(et)),Array.isArray(et)&&(et={R:et.slice(0,tt.encodingLength),S:et.slice(tt.encodingLength)}),assert$7(et.R&&et.S,"Signature without R or S"),tt.isPoint(et.R)&&(this._R=et.R),et.S instanceof BN$5&&(this._S=et.S),this._Rencoded=Array.isArray(et.R)?et.R:et.Rencoded,this._Sencoded=Array.isArray(et.S)?et.S:et.Sencoded}cachedProperty(Signature$1,"S",function(){return this.eddsa.decodeInt(this.Sencoded())});cachedProperty(Signature$1,"R",function(){return this.eddsa.decodePoint(this.Rencoded())});cachedProperty(Signature$1,"Rencoded",function(){return this.eddsa.encodePoint(this.R())});cachedProperty(Signature$1,"Sencoded",function(){return this.eddsa.encodeInt(this.S())});Signature$1.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())};Signature$1.prototype.toHex=function(){return utils$4.encode(this.toBytes(),"hex").toUpperCase()};var signature=Signature$1,hash$1=hash$3,curves=curves$1,utils$3=utils$o,assert$6=utils$3.assert,parseBytes=utils$3.parseBytes,KeyPair=key$1,Signature=signature;function EDDSA(tt){if(assert$6(tt==="ed25519","only tested with ed25519 so far"),!(this instanceof EDDSA))return new EDDSA(tt);tt=curves[tt].curve,this.curve=tt,this.g=tt.g,this.g.precompute(tt.n.bitLength()+1),this.pointClass=tt.point().constructor,this.encodingLength=Math.ceil(tt.n.bitLength()/8),this.hash=hash$1.sha512}var eddsa=EDDSA;EDDSA.prototype.sign=function(et,nt){et=parseBytes(et);var rt=this.keyFromSecret(nt),it=this.hashInt(rt.messagePrefix(),et),ot=this.g.mul(it),at=this.encodePoint(ot),st=this.hashInt(at,rt.pubBytes(),et).mul(rt.priv()),lt=it.add(st).umod(this.curve.n);return this.makeSignature({R:ot,S:lt,Rencoded:at})};EDDSA.prototype.verify=function(et,nt,rt){et=parseBytes(et),nt=this.makeSignature(nt);var it=this.keyFromPublic(rt),ot=this.hashInt(nt.Rencoded(),it.pubBytes(),et),at=this.g.mul(nt.S()),st=nt.R().add(it.pub().mul(ot));return st.eq(at)};EDDSA.prototype.hashInt=function(){for(var et=this.hash(),nt=0;nt0?wt:It},ot.min=function(wt,It){return wt.cmp(It)<0?wt:It},ot.prototype._init=function(wt,It,Ot){if(typeof wt=="number")return this._initNumber(wt,It,Ot);if(typeof wt=="object")return this._initArray(wt,It,Ot);It==="hex"&&(It=16),rt(It===(It|0)&&It>=2&&It<=36),wt=wt.toString().replace(/\s+/g,"");var Wt=0;wt[0]==="-"&&(Wt++,this.negative=1),Wt=0;Wt-=3)Ft=wt[Wt]|wt[Wt-1]<<8|wt[Wt-2]<<16,this.words[zt]|=Ft<>>26-Nt&67108863,Nt+=24,Nt>=26&&(Nt-=26,zt++);else if(Ot==="le")for(Wt=0,zt=0;Wt>>26-Nt&67108863,Nt+=24,Nt>=26&&(Nt-=26,zt++);return this._strip()};function st(Ct,wt){var It=Ct.charCodeAt(wt);if(It>=48&&It<=57)return It-48;if(It>=65&&It<=70)return It-55;if(It>=97&&It<=102)return It-87;rt(!1,"Invalid character in "+Ct)}function lt(Ct,wt,It){var Ot=st(Ct,It);return It-1>=wt&&(Ot|=st(Ct,It-1)<<4),Ot}ot.prototype._parseHex=function(wt,It,Ot){this.length=Math.ceil((wt.length-It)/6),this.words=new Array(this.length);for(var Wt=0;Wt=It;Wt-=2)Nt=lt(wt,It,Wt)<=18?(zt-=18,Ft+=1,this.words[Ft]|=Nt>>>26):zt+=8;else{var Ut=wt.length-It;for(Wt=Ut%2===0?It+1:It;Wt=18?(zt-=18,Ft+=1,this.words[Ft]|=Nt>>>26):zt+=8}this._strip()};function ct(Ct,wt,It,Ot){for(var Wt=0,zt=0,Ft=Math.min(Ct.length,It),Nt=wt;Nt=49?zt=Ut-49+10:Ut>=17?zt=Ut-17+10:zt=Ut,rt(Ut>=0&&zt1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},ot.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},typeof Symbol<"u"&&typeof Symbol.for=="function")try{ot.prototype[Symbol.for("nodejs.util.inspect.custom")]=ht}catch{ot.prototype.inspect=ht}else ot.prototype.inspect=ht;function ht(){return(this.red?""}var dt=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],pt=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],mt=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];ot.prototype.toString=function(wt,It){wt=wt||10,It=It|0||1;var Ot;if(wt===16||wt==="hex"){Ot="";for(var Wt=0,zt=0,Ft=0;Ft>>24-Wt&16777215,Wt+=2,Wt>=26&&(Wt-=26,Ft--),zt!==0||Ft!==this.length-1?Ot=dt[6-Ut.length]+Ut+Ot:Ot=Ut+Ot}for(zt!==0&&(Ot=zt.toString(16)+Ot);Ot.length%It!==0;)Ot="0"+Ot;return this.negative!==0&&(Ot="-"+Ot),Ot}if(wt===(wt|0)&&wt>=2&&wt<=36){var Mt=pt[wt],Ht=mt[wt];Ot="";var en=this.clone();for(en.negative=0;!en.isZero();){var sn=en.modrn(Ht).toString(wt);en=en.idivn(Ht),en.isZero()?Ot=sn+Ot:Ot=dt[Mt-sn.length]+sn+Ot}for(this.isZero()&&(Ot="0"+Ot);Ot.length%It!==0;)Ot="0"+Ot;return this.negative!==0&&(Ot="-"+Ot),Ot}rt(!1,"Base should be between 2 and 36")},ot.prototype.toNumber=function(){var wt=this.words[0];return this.length===2?wt+=this.words[1]*67108864:this.length===3&&this.words[2]===1?wt+=4503599627370496+this.words[1]*67108864:this.length>2&&rt(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-wt:wt},ot.prototype.toJSON=function(){return this.toString(16,2)},at&&(ot.prototype.toBuffer=function(wt,It){return this.toArrayLike(at,wt,It)}),ot.prototype.toArray=function(wt,It){return this.toArrayLike(Array,wt,It)};var gt=function(wt,It){return wt.allocUnsafe?wt.allocUnsafe(It):new wt(It)};ot.prototype.toArrayLike=function(wt,It,Ot){this._strip();var Wt=this.byteLength(),zt=Ot||Math.max(1,Wt);rt(Wt<=zt,"byte array longer than desired length"),rt(zt>0,"Requested array length <= 0");var Ft=gt(wt,zt),Nt=It==="le"?"LE":"BE";return this["_toArrayLike"+Nt](Ft,Wt),Ft},ot.prototype._toArrayLikeLE=function(wt,It){for(var Ot=0,Wt=0,zt=0,Ft=0;zt>8&255),Ot>16&255),Ft===6?(Ot>24&255),Wt=0,Ft=0):(Wt=Nt>>>24,Ft+=2)}if(Ot=0&&(wt[Ot--]=Nt>>8&255),Ot>=0&&(wt[Ot--]=Nt>>16&255),Ft===6?(Ot>=0&&(wt[Ot--]=Nt>>24&255),Wt=0,Ft=0):(Wt=Nt>>>24,Ft+=2)}if(Ot>=0)for(wt[Ot--]=Wt;Ot>=0;)wt[Ot--]=0},Math.clz32?ot.prototype._countBits=function(wt){return 32-Math.clz32(wt)}:ot.prototype._countBits=function(wt){var It=wt,Ot=0;return It>=4096&&(Ot+=13,It>>>=13),It>=64&&(Ot+=7,It>>>=7),It>=8&&(Ot+=4,It>>>=4),It>=2&&(Ot+=2,It>>>=2),Ot+It},ot.prototype._zeroBits=function(wt){if(wt===0)return 26;var It=wt,Ot=0;return It&8191||(Ot+=13,It>>>=13),It&127||(Ot+=7,It>>>=7),It&15||(Ot+=4,It>>>=4),It&3||(Ot+=2,It>>>=2),It&1||Ot++,Ot},ot.prototype.bitLength=function(){var wt=this.words[this.length-1],It=this._countBits(wt);return(this.length-1)*26+It};function yt(Ct){for(var wt=new Array(Ct.bitLength()),It=0;It>>Wt&1}return wt}ot.prototype.zeroBits=function(){if(this.isZero())return 0;for(var wt=0,It=0;Itwt.length?this.clone().ior(wt):wt.clone().ior(this)},ot.prototype.uor=function(wt){return this.length>wt.length?this.clone().iuor(wt):wt.clone().iuor(this)},ot.prototype.iuand=function(wt){var It;this.length>wt.length?It=wt:It=this;for(var Ot=0;Otwt.length?this.clone().iand(wt):wt.clone().iand(this)},ot.prototype.uand=function(wt){return this.length>wt.length?this.clone().iuand(wt):wt.clone().iuand(this)},ot.prototype.iuxor=function(wt){var It,Ot;this.length>wt.length?(It=this,Ot=wt):(It=wt,Ot=this);for(var Wt=0;Wtwt.length?this.clone().ixor(wt):wt.clone().ixor(this)},ot.prototype.uxor=function(wt){return this.length>wt.length?this.clone().iuxor(wt):wt.clone().iuxor(this)},ot.prototype.inotn=function(wt){rt(typeof wt=="number"&&wt>=0);var It=Math.ceil(wt/26)|0,Ot=wt%26;this._expand(It),Ot>0&&It--;for(var Wt=0;Wt0&&(this.words[Wt]=~this.words[Wt]&67108863>>26-Ot),this._strip()},ot.prototype.notn=function(wt){return this.clone().inotn(wt)},ot.prototype.setn=function(wt,It){rt(typeof wt=="number"&&wt>=0);var Ot=wt/26|0,Wt=wt%26;return this._expand(Ot+1),It?this.words[Ot]=this.words[Ot]|1<wt.length?(Ot=this,Wt=wt):(Ot=wt,Wt=this);for(var zt=0,Ft=0;Ft>>26;for(;zt!==0&&Ft>>26;if(this.length=Ot.length,zt!==0)this.words[this.length]=zt,this.length++;else if(Ot!==this)for(;Ftwt.length?this.clone().iadd(wt):wt.clone().iadd(this)},ot.prototype.isub=function(wt){if(wt.negative!==0){wt.negative=0;var It=this.iadd(wt);return wt.negative=1,It._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(wt),this.negative=1,this._normSign();var Ot=this.cmp(wt);if(Ot===0)return this.negative=0,this.length=1,this.words[0]=0,this;var Wt,zt;Ot>0?(Wt=this,zt=wt):(Wt=wt,zt=this);for(var Ft=0,Nt=0;Nt>26,this.words[Nt]=It&67108863;for(;Ft!==0&&Nt>26,this.words[Nt]=It&67108863;if(Ft===0&&Nt>>26,en=Ut&67108863,sn=Math.min(Mt,wt.length-1),Kt=Math.max(0,Mt-Ct.length+1);Kt<=sn;Kt++){var rn=Mt-Kt|0;Wt=Ct.words[rn]|0,zt=wt.words[Kt]|0,Ft=Wt*zt+en,Ht+=Ft/67108864|0,en=Ft&67108863}It.words[Mt]=en|0,Ut=Ht|0}return Ut!==0?It.words[Mt]=Ut|0:It.length--,It._strip()}var vt=function(wt,It,Ot){var Wt=wt.words,zt=It.words,Ft=Ot.words,Nt=0,Ut,Mt,Ht,en=Wt[0]|0,sn=en&8191,Kt=en>>>13,rn=Wt[1]|0,nn=rn&8191,hn=rn>>>13,vn=Wt[2]|0,an=vn&8191,Qt=vn>>>13,_n=Wt[3]|0,Pn=_n&8191,$n=_n>>>13,Nn=Wt[4]|0,Tn=Nn&8191,cn=Nn>>>13,mn=Wt[5]|0,In=mn&8191,An=mn>>>13,wn=Wt[6]|0,fn=wn&8191,pn=wn>>>13,kn=Wt[7]|0,Dn=kn&8191,un=kn>>>13,Zt=Wt[8]|0,Xt=Zt&8191,Sn=Zt>>>13,Rn=Wt[9]|0,jn=Rn&8191,On=Rn>>>13,Zn=zt[0]|0,Vn=Zn&8191,qn=Zn>>>13,zn=zt[1]|0,Jn=zn&8191,Hn=zn>>>13,pr=zt[2]|0,fr=pr&8191,xr=pr>>>13,io=zt[3]|0,Tr=io&8191,Ar=io>>>13,qr=zt[4]|0,jr=qr&8191,Fr=qr>>>13,ao=zt[5]|0,Yr=ao&8191,Dr=ao>>>13,go=zt[6]|0,xn=go&8191,Mn=go>>>13,dn=zt[7]|0,Jt=dn&8191,En=dn>>>13,Ln=zt[8]|0,Un=Ln&8191,Kn=Ln>>>13,nr=zt[9]|0,lr=nr&8191,cr=nr>>>13;Ot.negative=wt.negative^It.negative,Ot.length=19,Ut=Math.imul(sn,Vn),Mt=Math.imul(sn,qn),Mt=Mt+Math.imul(Kt,Vn)|0,Ht=Math.imul(Kt,qn);var Hr=(Nt+Ut|0)+((Mt&8191)<<13)|0;Nt=(Ht+(Mt>>>13)|0)+(Hr>>>26)|0,Hr&=67108863,Ut=Math.imul(nn,Vn),Mt=Math.imul(nn,qn),Mt=Mt+Math.imul(hn,Vn)|0,Ht=Math.imul(hn,qn),Ut=Ut+Math.imul(sn,Jn)|0,Mt=Mt+Math.imul(sn,Hn)|0,Mt=Mt+Math.imul(Kt,Jn)|0,Ht=Ht+Math.imul(Kt,Hn)|0;var vr=(Nt+Ut|0)+((Mt&8191)<<13)|0;Nt=(Ht+(Mt>>>13)|0)+(vr>>>26)|0,vr&=67108863,Ut=Math.imul(an,Vn),Mt=Math.imul(an,qn),Mt=Mt+Math.imul(Qt,Vn)|0,Ht=Math.imul(Qt,qn),Ut=Ut+Math.imul(nn,Jn)|0,Mt=Mt+Math.imul(nn,Hn)|0,Mt=Mt+Math.imul(hn,Jn)|0,Ht=Ht+Math.imul(hn,Hn)|0,Ut=Ut+Math.imul(sn,fr)|0,Mt=Mt+Math.imul(sn,xr)|0,Mt=Mt+Math.imul(Kt,fr)|0,Ht=Ht+Math.imul(Kt,xr)|0;var Nr=(Nt+Ut|0)+((Mt&8191)<<13)|0;Nt=(Ht+(Mt>>>13)|0)+(Nr>>>26)|0,Nr&=67108863,Ut=Math.imul(Pn,Vn),Mt=Math.imul(Pn,qn),Mt=Mt+Math.imul($n,Vn)|0,Ht=Math.imul($n,qn),Ut=Ut+Math.imul(an,Jn)|0,Mt=Mt+Math.imul(an,Hn)|0,Mt=Mt+Math.imul(Qt,Jn)|0,Ht=Ht+Math.imul(Qt,Hn)|0,Ut=Ut+Math.imul(nn,fr)|0,Mt=Mt+Math.imul(nn,xr)|0,Mt=Mt+Math.imul(hn,fr)|0,Ht=Ht+Math.imul(hn,xr)|0,Ut=Ut+Math.imul(sn,Tr)|0,Mt=Mt+Math.imul(sn,Ar)|0,Mt=Mt+Math.imul(Kt,Tr)|0,Ht=Ht+Math.imul(Kt,Ar)|0;var Gr=(Nt+Ut|0)+((Mt&8191)<<13)|0;Nt=(Ht+(Mt>>>13)|0)+(Gr>>>26)|0,Gr&=67108863,Ut=Math.imul(Tn,Vn),Mt=Math.imul(Tn,qn),Mt=Mt+Math.imul(cn,Vn)|0,Ht=Math.imul(cn,qn),Ut=Ut+Math.imul(Pn,Jn)|0,Mt=Mt+Math.imul(Pn,Hn)|0,Mt=Mt+Math.imul($n,Jn)|0,Ht=Ht+Math.imul($n,Hn)|0,Ut=Ut+Math.imul(an,fr)|0,Mt=Mt+Math.imul(an,xr)|0,Mt=Mt+Math.imul(Qt,fr)|0,Ht=Ht+Math.imul(Qt,xr)|0,Ut=Ut+Math.imul(nn,Tr)|0,Mt=Mt+Math.imul(nn,Ar)|0,Mt=Mt+Math.imul(hn,Tr)|0,Ht=Ht+Math.imul(hn,Ar)|0,Ut=Ut+Math.imul(sn,jr)|0,Mt=Mt+Math.imul(sn,Fr)|0,Mt=Mt+Math.imul(Kt,jr)|0,Ht=Ht+Math.imul(Kt,Fr)|0;var eo=(Nt+Ut|0)+((Mt&8191)<<13)|0;Nt=(Ht+(Mt>>>13)|0)+(eo>>>26)|0,eo&=67108863,Ut=Math.imul(In,Vn),Mt=Math.imul(In,qn),Mt=Mt+Math.imul(An,Vn)|0,Ht=Math.imul(An,qn),Ut=Ut+Math.imul(Tn,Jn)|0,Mt=Mt+Math.imul(Tn,Hn)|0,Mt=Mt+Math.imul(cn,Jn)|0,Ht=Ht+Math.imul(cn,Hn)|0,Ut=Ut+Math.imul(Pn,fr)|0,Mt=Mt+Math.imul(Pn,xr)|0,Mt=Mt+Math.imul($n,fr)|0,Ht=Ht+Math.imul($n,xr)|0,Ut=Ut+Math.imul(an,Tr)|0,Mt=Mt+Math.imul(an,Ar)|0,Mt=Mt+Math.imul(Qt,Tr)|0,Ht=Ht+Math.imul(Qt,Ar)|0,Ut=Ut+Math.imul(nn,jr)|0,Mt=Mt+Math.imul(nn,Fr)|0,Mt=Mt+Math.imul(hn,jr)|0,Ht=Ht+Math.imul(hn,Fr)|0,Ut=Ut+Math.imul(sn,Yr)|0,Mt=Mt+Math.imul(sn,Dr)|0,Mt=Mt+Math.imul(Kt,Yr)|0,Ht=Ht+Math.imul(Kt,Dr)|0;var Zr=(Nt+Ut|0)+((Mt&8191)<<13)|0;Nt=(Ht+(Mt>>>13)|0)+(Zr>>>26)|0,Zr&=67108863,Ut=Math.imul(fn,Vn),Mt=Math.imul(fn,qn),Mt=Mt+Math.imul(pn,Vn)|0,Ht=Math.imul(pn,qn),Ut=Ut+Math.imul(In,Jn)|0,Mt=Mt+Math.imul(In,Hn)|0,Mt=Mt+Math.imul(An,Jn)|0,Ht=Ht+Math.imul(An,Hn)|0,Ut=Ut+Math.imul(Tn,fr)|0,Mt=Mt+Math.imul(Tn,xr)|0,Mt=Mt+Math.imul(cn,fr)|0,Ht=Ht+Math.imul(cn,xr)|0,Ut=Ut+Math.imul(Pn,Tr)|0,Mt=Mt+Math.imul(Pn,Ar)|0,Mt=Mt+Math.imul($n,Tr)|0,Ht=Ht+Math.imul($n,Ar)|0,Ut=Ut+Math.imul(an,jr)|0,Mt=Mt+Math.imul(an,Fr)|0,Mt=Mt+Math.imul(Qt,jr)|0,Ht=Ht+Math.imul(Qt,Fr)|0,Ut=Ut+Math.imul(nn,Yr)|0,Mt=Mt+Math.imul(nn,Dr)|0,Mt=Mt+Math.imul(hn,Yr)|0,Ht=Ht+Math.imul(hn,Dr)|0,Ut=Ut+Math.imul(sn,xn)|0,Mt=Mt+Math.imul(sn,Mn)|0,Mt=Mt+Math.imul(Kt,xn)|0,Ht=Ht+Math.imul(Kt,Mn)|0;var Jr=(Nt+Ut|0)+((Mt&8191)<<13)|0;Nt=(Ht+(Mt>>>13)|0)+(Jr>>>26)|0,Jr&=67108863,Ut=Math.imul(Dn,Vn),Mt=Math.imul(Dn,qn),Mt=Mt+Math.imul(un,Vn)|0,Ht=Math.imul(un,qn),Ut=Ut+Math.imul(fn,Jn)|0,Mt=Mt+Math.imul(fn,Hn)|0,Mt=Mt+Math.imul(pn,Jn)|0,Ht=Ht+Math.imul(pn,Hn)|0,Ut=Ut+Math.imul(In,fr)|0,Mt=Mt+Math.imul(In,xr)|0,Mt=Mt+Math.imul(An,fr)|0,Ht=Ht+Math.imul(An,xr)|0,Ut=Ut+Math.imul(Tn,Tr)|0,Mt=Mt+Math.imul(Tn,Ar)|0,Mt=Mt+Math.imul(cn,Tr)|0,Ht=Ht+Math.imul(cn,Ar)|0,Ut=Ut+Math.imul(Pn,jr)|0,Mt=Mt+Math.imul(Pn,Fr)|0,Mt=Mt+Math.imul($n,jr)|0,Ht=Ht+Math.imul($n,Fr)|0,Ut=Ut+Math.imul(an,Yr)|0,Mt=Mt+Math.imul(an,Dr)|0,Mt=Mt+Math.imul(Qt,Yr)|0,Ht=Ht+Math.imul(Qt,Dr)|0,Ut=Ut+Math.imul(nn,xn)|0,Mt=Mt+Math.imul(nn,Mn)|0,Mt=Mt+Math.imul(hn,xn)|0,Ht=Ht+Math.imul(hn,Mn)|0,Ut=Ut+Math.imul(sn,Jt)|0,Mt=Mt+Math.imul(sn,En)|0,Mt=Mt+Math.imul(Kt,Jt)|0,Ht=Ht+Math.imul(Kt,En)|0;var wr=(Nt+Ut|0)+((Mt&8191)<<13)|0;Nt=(Ht+(Mt>>>13)|0)+(wr>>>26)|0,wr&=67108863,Ut=Math.imul(Xt,Vn),Mt=Math.imul(Xt,qn),Mt=Mt+Math.imul(Sn,Vn)|0,Ht=Math.imul(Sn,qn),Ut=Ut+Math.imul(Dn,Jn)|0,Mt=Mt+Math.imul(Dn,Hn)|0,Mt=Mt+Math.imul(un,Jn)|0,Ht=Ht+Math.imul(un,Hn)|0,Ut=Ut+Math.imul(fn,fr)|0,Mt=Mt+Math.imul(fn,xr)|0,Mt=Mt+Math.imul(pn,fr)|0,Ht=Ht+Math.imul(pn,xr)|0,Ut=Ut+Math.imul(In,Tr)|0,Mt=Mt+Math.imul(In,Ar)|0,Mt=Mt+Math.imul(An,Tr)|0,Ht=Ht+Math.imul(An,Ar)|0,Ut=Ut+Math.imul(Tn,jr)|0,Mt=Mt+Math.imul(Tn,Fr)|0,Mt=Mt+Math.imul(cn,jr)|0,Ht=Ht+Math.imul(cn,Fr)|0,Ut=Ut+Math.imul(Pn,Yr)|0,Mt=Mt+Math.imul(Pn,Dr)|0,Mt=Mt+Math.imul($n,Yr)|0,Ht=Ht+Math.imul($n,Dr)|0,Ut=Ut+Math.imul(an,xn)|0,Mt=Mt+Math.imul(an,Mn)|0,Mt=Mt+Math.imul(Qt,xn)|0,Ht=Ht+Math.imul(Qt,Mn)|0,Ut=Ut+Math.imul(nn,Jt)|0,Mt=Mt+Math.imul(nn,En)|0,Mt=Mt+Math.imul(hn,Jt)|0,Ht=Ht+Math.imul(hn,En)|0,Ut=Ut+Math.imul(sn,Un)|0,Mt=Mt+Math.imul(sn,Kn)|0,Mt=Mt+Math.imul(Kt,Un)|0,Ht=Ht+Math.imul(Kt,Kn)|0;var Mr=(Nt+Ut|0)+((Mt&8191)<<13)|0;Nt=(Ht+(Mt>>>13)|0)+(Mr>>>26)|0,Mr&=67108863,Ut=Math.imul(jn,Vn),Mt=Math.imul(jn,qn),Mt=Mt+Math.imul(On,Vn)|0,Ht=Math.imul(On,qn),Ut=Ut+Math.imul(Xt,Jn)|0,Mt=Mt+Math.imul(Xt,Hn)|0,Mt=Mt+Math.imul(Sn,Jn)|0,Ht=Ht+Math.imul(Sn,Hn)|0,Ut=Ut+Math.imul(Dn,fr)|0,Mt=Mt+Math.imul(Dn,xr)|0,Mt=Mt+Math.imul(un,fr)|0,Ht=Ht+Math.imul(un,xr)|0,Ut=Ut+Math.imul(fn,Tr)|0,Mt=Mt+Math.imul(fn,Ar)|0,Mt=Mt+Math.imul(pn,Tr)|0,Ht=Ht+Math.imul(pn,Ar)|0,Ut=Ut+Math.imul(In,jr)|0,Mt=Mt+Math.imul(In,Fr)|0,Mt=Mt+Math.imul(An,jr)|0,Ht=Ht+Math.imul(An,Fr)|0,Ut=Ut+Math.imul(Tn,Yr)|0,Mt=Mt+Math.imul(Tn,Dr)|0,Mt=Mt+Math.imul(cn,Yr)|0,Ht=Ht+Math.imul(cn,Dr)|0,Ut=Ut+Math.imul(Pn,xn)|0,Mt=Mt+Math.imul(Pn,Mn)|0,Mt=Mt+Math.imul($n,xn)|0,Ht=Ht+Math.imul($n,Mn)|0,Ut=Ut+Math.imul(an,Jt)|0,Mt=Mt+Math.imul(an,En)|0,Mt=Mt+Math.imul(Qt,Jt)|0,Ht=Ht+Math.imul(Qt,En)|0,Ut=Ut+Math.imul(nn,Un)|0,Mt=Mt+Math.imul(nn,Kn)|0,Mt=Mt+Math.imul(hn,Un)|0,Ht=Ht+Math.imul(hn,Kn)|0,Ut=Ut+Math.imul(sn,lr)|0,Mt=Mt+Math.imul(sn,cr)|0,Mt=Mt+Math.imul(Kt,lr)|0,Ht=Ht+Math.imul(Kt,cr)|0;var Ur=(Nt+Ut|0)+((Mt&8191)<<13)|0;Nt=(Ht+(Mt>>>13)|0)+(Ur>>>26)|0,Ur&=67108863,Ut=Math.imul(jn,Jn),Mt=Math.imul(jn,Hn),Mt=Mt+Math.imul(On,Jn)|0,Ht=Math.imul(On,Hn),Ut=Ut+Math.imul(Xt,fr)|0,Mt=Mt+Math.imul(Xt,xr)|0,Mt=Mt+Math.imul(Sn,fr)|0,Ht=Ht+Math.imul(Sn,xr)|0,Ut=Ut+Math.imul(Dn,Tr)|0,Mt=Mt+Math.imul(Dn,Ar)|0,Mt=Mt+Math.imul(un,Tr)|0,Ht=Ht+Math.imul(un,Ar)|0,Ut=Ut+Math.imul(fn,jr)|0,Mt=Mt+Math.imul(fn,Fr)|0,Mt=Mt+Math.imul(pn,jr)|0,Ht=Ht+Math.imul(pn,Fr)|0,Ut=Ut+Math.imul(In,Yr)|0,Mt=Mt+Math.imul(In,Dr)|0,Mt=Mt+Math.imul(An,Yr)|0,Ht=Ht+Math.imul(An,Dr)|0,Ut=Ut+Math.imul(Tn,xn)|0,Mt=Mt+Math.imul(Tn,Mn)|0,Mt=Mt+Math.imul(cn,xn)|0,Ht=Ht+Math.imul(cn,Mn)|0,Ut=Ut+Math.imul(Pn,Jt)|0,Mt=Mt+Math.imul(Pn,En)|0,Mt=Mt+Math.imul($n,Jt)|0,Ht=Ht+Math.imul($n,En)|0,Ut=Ut+Math.imul(an,Un)|0,Mt=Mt+Math.imul(an,Kn)|0,Mt=Mt+Math.imul(Qt,Un)|0,Ht=Ht+Math.imul(Qt,Kn)|0,Ut=Ut+Math.imul(nn,lr)|0,Mt=Mt+Math.imul(nn,cr)|0,Mt=Mt+Math.imul(hn,lr)|0,Ht=Ht+Math.imul(hn,cr)|0;var Rr=(Nt+Ut|0)+((Mt&8191)<<13)|0;Nt=(Ht+(Mt>>>13)|0)+(Rr>>>26)|0,Rr&=67108863,Ut=Math.imul(jn,fr),Mt=Math.imul(jn,xr),Mt=Mt+Math.imul(On,fr)|0,Ht=Math.imul(On,xr),Ut=Ut+Math.imul(Xt,Tr)|0,Mt=Mt+Math.imul(Xt,Ar)|0,Mt=Mt+Math.imul(Sn,Tr)|0,Ht=Ht+Math.imul(Sn,Ar)|0,Ut=Ut+Math.imul(Dn,jr)|0,Mt=Mt+Math.imul(Dn,Fr)|0,Mt=Mt+Math.imul(un,jr)|0,Ht=Ht+Math.imul(un,Fr)|0,Ut=Ut+Math.imul(fn,Yr)|0,Mt=Mt+Math.imul(fn,Dr)|0,Mt=Mt+Math.imul(pn,Yr)|0,Ht=Ht+Math.imul(pn,Dr)|0,Ut=Ut+Math.imul(In,xn)|0,Mt=Mt+Math.imul(In,Mn)|0,Mt=Mt+Math.imul(An,xn)|0,Ht=Ht+Math.imul(An,Mn)|0,Ut=Ut+Math.imul(Tn,Jt)|0,Mt=Mt+Math.imul(Tn,En)|0,Mt=Mt+Math.imul(cn,Jt)|0,Ht=Ht+Math.imul(cn,En)|0,Ut=Ut+Math.imul(Pn,Un)|0,Mt=Mt+Math.imul(Pn,Kn)|0,Mt=Mt+Math.imul($n,Un)|0,Ht=Ht+Math.imul($n,Kn)|0,Ut=Ut+Math.imul(an,lr)|0,Mt=Mt+Math.imul(an,cr)|0,Mt=Mt+Math.imul(Qt,lr)|0,Ht=Ht+Math.imul(Qt,cr)|0;var Pr=(Nt+Ut|0)+((Mt&8191)<<13)|0;Nt=(Ht+(Mt>>>13)|0)+(Pr>>>26)|0,Pr&=67108863,Ut=Math.imul(jn,Tr),Mt=Math.imul(jn,Ar),Mt=Mt+Math.imul(On,Tr)|0,Ht=Math.imul(On,Ar),Ut=Ut+Math.imul(Xt,jr)|0,Mt=Mt+Math.imul(Xt,Fr)|0,Mt=Mt+Math.imul(Sn,jr)|0,Ht=Ht+Math.imul(Sn,Fr)|0,Ut=Ut+Math.imul(Dn,Yr)|0,Mt=Mt+Math.imul(Dn,Dr)|0,Mt=Mt+Math.imul(un,Yr)|0,Ht=Ht+Math.imul(un,Dr)|0,Ut=Ut+Math.imul(fn,xn)|0,Mt=Mt+Math.imul(fn,Mn)|0,Mt=Mt+Math.imul(pn,xn)|0,Ht=Ht+Math.imul(pn,Mn)|0,Ut=Ut+Math.imul(In,Jt)|0,Mt=Mt+Math.imul(In,En)|0,Mt=Mt+Math.imul(An,Jt)|0,Ht=Ht+Math.imul(An,En)|0,Ut=Ut+Math.imul(Tn,Un)|0,Mt=Mt+Math.imul(Tn,Kn)|0,Mt=Mt+Math.imul(cn,Un)|0,Ht=Ht+Math.imul(cn,Kn)|0,Ut=Ut+Math.imul(Pn,lr)|0,Mt=Mt+Math.imul(Pn,cr)|0,Mt=Mt+Math.imul($n,lr)|0,Ht=Ht+Math.imul($n,cr)|0;var Lr=(Nt+Ut|0)+((Mt&8191)<<13)|0;Nt=(Ht+(Mt>>>13)|0)+(Lr>>>26)|0,Lr&=67108863,Ut=Math.imul(jn,jr),Mt=Math.imul(jn,Fr),Mt=Mt+Math.imul(On,jr)|0,Ht=Math.imul(On,Fr),Ut=Ut+Math.imul(Xt,Yr)|0,Mt=Mt+Math.imul(Xt,Dr)|0,Mt=Mt+Math.imul(Sn,Yr)|0,Ht=Ht+Math.imul(Sn,Dr)|0,Ut=Ut+Math.imul(Dn,xn)|0,Mt=Mt+Math.imul(Dn,Mn)|0,Mt=Mt+Math.imul(un,xn)|0,Ht=Ht+Math.imul(un,Mn)|0,Ut=Ut+Math.imul(fn,Jt)|0,Mt=Mt+Math.imul(fn,En)|0,Mt=Mt+Math.imul(pn,Jt)|0,Ht=Ht+Math.imul(pn,En)|0,Ut=Ut+Math.imul(In,Un)|0,Mt=Mt+Math.imul(In,Kn)|0,Mt=Mt+Math.imul(An,Un)|0,Ht=Ht+Math.imul(An,Kn)|0,Ut=Ut+Math.imul(Tn,lr)|0,Mt=Mt+Math.imul(Tn,cr)|0,Mt=Mt+Math.imul(cn,lr)|0,Ht=Ht+Math.imul(cn,cr)|0;var Wr=(Nt+Ut|0)+((Mt&8191)<<13)|0;Nt=(Ht+(Mt>>>13)|0)+(Wr>>>26)|0,Wr&=67108863,Ut=Math.imul(jn,Yr),Mt=Math.imul(jn,Dr),Mt=Mt+Math.imul(On,Yr)|0,Ht=Math.imul(On,Dr),Ut=Ut+Math.imul(Xt,xn)|0,Mt=Mt+Math.imul(Xt,Mn)|0,Mt=Mt+Math.imul(Sn,xn)|0,Ht=Ht+Math.imul(Sn,Mn)|0,Ut=Ut+Math.imul(Dn,Jt)|0,Mt=Mt+Math.imul(Dn,En)|0,Mt=Mt+Math.imul(un,Jt)|0,Ht=Ht+Math.imul(un,En)|0,Ut=Ut+Math.imul(fn,Un)|0,Mt=Mt+Math.imul(fn,Kn)|0,Mt=Mt+Math.imul(pn,Un)|0,Ht=Ht+Math.imul(pn,Kn)|0,Ut=Ut+Math.imul(In,lr)|0,Mt=Mt+Math.imul(In,cr)|0,Mt=Mt+Math.imul(An,lr)|0,Ht=Ht+Math.imul(An,cr)|0;var Br=(Nt+Ut|0)+((Mt&8191)<<13)|0;Nt=(Ht+(Mt>>>13)|0)+(Br>>>26)|0,Br&=67108863,Ut=Math.imul(jn,xn),Mt=Math.imul(jn,Mn),Mt=Mt+Math.imul(On,xn)|0,Ht=Math.imul(On,Mn),Ut=Ut+Math.imul(Xt,Jt)|0,Mt=Mt+Math.imul(Xt,En)|0,Mt=Mt+Math.imul(Sn,Jt)|0,Ht=Ht+Math.imul(Sn,En)|0,Ut=Ut+Math.imul(Dn,Un)|0,Mt=Mt+Math.imul(Dn,Kn)|0,Mt=Mt+Math.imul(un,Un)|0,Ht=Ht+Math.imul(un,Kn)|0,Ut=Ut+Math.imul(fn,lr)|0,Mt=Mt+Math.imul(fn,cr)|0,Mt=Mt+Math.imul(pn,lr)|0,Ht=Ht+Math.imul(pn,cr)|0;var tr=(Nt+Ut|0)+((Mt&8191)<<13)|0;Nt=(Ht+(Mt>>>13)|0)+(tr>>>26)|0,tr&=67108863,Ut=Math.imul(jn,Jt),Mt=Math.imul(jn,En),Mt=Mt+Math.imul(On,Jt)|0,Ht=Math.imul(On,En),Ut=Ut+Math.imul(Xt,Un)|0,Mt=Mt+Math.imul(Xt,Kn)|0,Mt=Mt+Math.imul(Sn,Un)|0,Ht=Ht+Math.imul(Sn,Kn)|0,Ut=Ut+Math.imul(Dn,lr)|0,Mt=Mt+Math.imul(Dn,cr)|0,Mt=Mt+Math.imul(un,lr)|0,Ht=Ht+Math.imul(un,cr)|0;var ir=(Nt+Ut|0)+((Mt&8191)<<13)|0;Nt=(Ht+(Mt>>>13)|0)+(ir>>>26)|0,ir&=67108863,Ut=Math.imul(jn,Un),Mt=Math.imul(jn,Kn),Mt=Mt+Math.imul(On,Un)|0,Ht=Math.imul(On,Kn),Ut=Ut+Math.imul(Xt,lr)|0,Mt=Mt+Math.imul(Xt,cr)|0,Mt=Mt+Math.imul(Sn,lr)|0,Ht=Ht+Math.imul(Sn,cr)|0;var Sr=(Nt+Ut|0)+((Mt&8191)<<13)|0;Nt=(Ht+(Mt>>>13)|0)+(Sr>>>26)|0,Sr&=67108863,Ut=Math.imul(jn,lr),Mt=Math.imul(jn,cr),Mt=Mt+Math.imul(On,lr)|0,Ht=Math.imul(On,cr);var dr=(Nt+Ut|0)+((Mt&8191)<<13)|0;return Nt=(Ht+(Mt>>>13)|0)+(dr>>>26)|0,dr&=67108863,Ft[0]=Hr,Ft[1]=vr,Ft[2]=Nr,Ft[3]=Gr,Ft[4]=eo,Ft[5]=Zr,Ft[6]=Jr,Ft[7]=wr,Ft[8]=Mr,Ft[9]=Ur,Ft[10]=Rr,Ft[11]=Pr,Ft[12]=Lr,Ft[13]=Wr,Ft[14]=Br,Ft[15]=tr,Ft[16]=ir,Ft[17]=Sr,Ft[18]=dr,Nt!==0&&(Ft[19]=Nt,Ot.length++),Ot};Math.imul||(vt=bt);function xt(Ct,wt,It){It.negative=wt.negative^Ct.negative,It.length=Ct.length+wt.length;for(var Ot=0,Wt=0,zt=0;zt>>26)|0,Wt+=Ft>>>26,Ft&=67108863}It.words[zt]=Nt,Ot=Ft,Ft=Wt}return Ot!==0?It.words[zt]=Ot:It.length--,It._strip()}function kt(Ct,wt,It){return xt(Ct,wt,It)}ot.prototype.mulTo=function(wt,It){var Ot,Wt=this.length+wt.length;return this.length===10&&wt.length===10?Ot=vt(this,wt,It):Wt<63?Ot=bt(this,wt,It):Wt<1024?Ot=xt(this,wt,It):Ot=kt(this,wt,It),Ot},ot.prototype.mul=function(wt){var It=new ot(null);return It.words=new Array(this.length+wt.length),this.mulTo(wt,It)},ot.prototype.mulf=function(wt){var It=new ot(null);return It.words=new Array(this.length+wt.length),kt(this,wt,It)},ot.prototype.imul=function(wt){return this.clone().mulTo(wt,this)},ot.prototype.imuln=function(wt){var It=wt<0;It&&(wt=-wt),rt(typeof wt=="number"),rt(wt<67108864);for(var Ot=0,Wt=0;Wt>=26,Ot+=zt/67108864|0,Ot+=Ft>>>26,this.words[Wt]=Ft&67108863}return Ot!==0&&(this.words[Wt]=Ot,this.length++),It?this.ineg():this},ot.prototype.muln=function(wt){return this.clone().imuln(wt)},ot.prototype.sqr=function(){return this.mul(this)},ot.prototype.isqr=function(){return this.imul(this.clone())},ot.prototype.pow=function(wt){var It=yt(wt);if(It.length===0)return new ot(1);for(var Ot=this,Wt=0;Wt=0);var It=wt%26,Ot=(wt-It)/26,Wt=67108863>>>26-It<<26-It,zt;if(It!==0){var Ft=0;for(zt=0;zt>>26-It}Ft&&(this.words[zt]=Ft,this.length++)}if(Ot!==0){for(zt=this.length-1;zt>=0;zt--)this.words[zt+Ot]=this.words[zt];for(zt=0;zt=0);var Wt;It?Wt=(It-It%26)/26:Wt=0;var zt=wt%26,Ft=Math.min((wt-zt)/26,this.length),Nt=67108863^67108863>>>zt<Ft)for(this.length-=Ft,Mt=0;Mt=0&&(Ht!==0||Mt>=Wt);Mt--){var en=this.words[Mt]|0;this.words[Mt]=Ht<<26-zt|en>>>zt,Ht=en&Nt}return Ut&&Ht!==0&&(Ut.words[Ut.length++]=Ht),this.length===0&&(this.words[0]=0,this.length=1),this._strip()},ot.prototype.ishrn=function(wt,It,Ot){return rt(this.negative===0),this.iushrn(wt,It,Ot)},ot.prototype.shln=function(wt){return this.clone().ishln(wt)},ot.prototype.ushln=function(wt){return this.clone().iushln(wt)},ot.prototype.shrn=function(wt){return this.clone().ishrn(wt)},ot.prototype.ushrn=function(wt){return this.clone().iushrn(wt)},ot.prototype.testn=function(wt){rt(typeof wt=="number"&&wt>=0);var It=wt%26,Ot=(wt-It)/26,Wt=1<=0);var It=wt%26,Ot=(wt-It)/26;if(rt(this.negative===0,"imaskn works only with positive numbers"),this.length<=Ot)return this;if(It!==0&&Ot++,this.length=Math.min(Ot,this.length),It!==0){var Wt=67108863^67108863>>>It<=67108864;It++)this.words[It]-=67108864,It===this.length-1?this.words[It+1]=1:this.words[It+1]++;return this.length=Math.max(this.length,It+1),this},ot.prototype.isubn=function(wt){if(rt(typeof wt=="number"),rt(wt<67108864),wt<0)return this.iaddn(-wt);if(this.negative!==0)return this.negative=0,this.iaddn(wt),this.negative=1,this;if(this.words[0]-=wt,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var It=0;It>26)-(Ut/67108864|0),this.words[zt+Ot]=Ft&67108863}for(;zt>26,this.words[zt+Ot]=Ft&67108863;if(Nt===0)return this._strip();for(rt(Nt===-1),Nt=0,zt=0;zt>26,this.words[zt]=Ft&67108863;return this.negative=1,this._strip()},ot.prototype._wordDiv=function(wt,It){var Ot=this.length-wt.length,Wt=this.clone(),zt=wt,Ft=zt.words[zt.length-1]|0,Nt=this._countBits(Ft);Ot=26-Nt,Ot!==0&&(zt=zt.ushln(Ot),Wt.iushln(Ot),Ft=zt.words[zt.length-1]|0);var Ut=Wt.length-zt.length,Mt;if(It!=="mod"){Mt=new ot(null),Mt.length=Ut+1,Mt.words=new Array(Mt.length);for(var Ht=0;Ht=0;sn--){var Kt=(Wt.words[zt.length+sn]|0)*67108864+(Wt.words[zt.length+sn-1]|0);for(Kt=Math.min(Kt/Ft|0,67108863),Wt._ishlnsubmul(zt,Kt,sn);Wt.negative!==0;)Kt--,Wt.negative=0,Wt._ishlnsubmul(zt,1,sn),Wt.isZero()||(Wt.negative^=1);Mt&&(Mt.words[sn]=Kt)}return Mt&&Mt._strip(),Wt._strip(),It!=="div"&&Ot!==0&&Wt.iushrn(Ot),{div:Mt||null,mod:Wt}},ot.prototype.divmod=function(wt,It,Ot){if(rt(!wt.isZero()),this.isZero())return{div:new ot(0),mod:new ot(0)};var Wt,zt,Ft;return this.negative!==0&&wt.negative===0?(Ft=this.neg().divmod(wt,It),It!=="mod"&&(Wt=Ft.div.neg()),It!=="div"&&(zt=Ft.mod.neg(),Ot&&zt.negative!==0&&zt.iadd(wt)),{div:Wt,mod:zt}):this.negative===0&&wt.negative!==0?(Ft=this.divmod(wt.neg(),It),It!=="mod"&&(Wt=Ft.div.neg()),{div:Wt,mod:Ft.mod}):this.negative&wt.negative?(Ft=this.neg().divmod(wt.neg(),It),It!=="div"&&(zt=Ft.mod.neg(),Ot&&zt.negative!==0&&zt.isub(wt)),{div:Ft.div,mod:zt}):wt.length>this.length||this.cmp(wt)<0?{div:new ot(0),mod:this}:wt.length===1?It==="div"?{div:this.divn(wt.words[0]),mod:null}:It==="mod"?{div:null,mod:new ot(this.modrn(wt.words[0]))}:{div:this.divn(wt.words[0]),mod:new ot(this.modrn(wt.words[0]))}:this._wordDiv(wt,It)},ot.prototype.div=function(wt){return this.divmod(wt,"div",!1).div},ot.prototype.mod=function(wt){return this.divmod(wt,"mod",!1).mod},ot.prototype.umod=function(wt){return this.divmod(wt,"mod",!0).mod},ot.prototype.divRound=function(wt){var It=this.divmod(wt);if(It.mod.isZero())return It.div;var Ot=It.div.negative!==0?It.mod.isub(wt):It.mod,Wt=wt.ushrn(1),zt=wt.andln(1),Ft=Ot.cmp(Wt);return Ft<0||zt===1&&Ft===0?It.div:It.div.negative!==0?It.div.isubn(1):It.div.iaddn(1)},ot.prototype.modrn=function(wt){var It=wt<0;It&&(wt=-wt),rt(wt<=67108863);for(var Ot=(1<<26)%wt,Wt=0,zt=this.length-1;zt>=0;zt--)Wt=(Ot*Wt+(this.words[zt]|0))%wt;return It?-Wt:Wt},ot.prototype.modn=function(wt){return this.modrn(wt)},ot.prototype.idivn=function(wt){var It=wt<0;It&&(wt=-wt),rt(wt<=67108863);for(var Ot=0,Wt=this.length-1;Wt>=0;Wt--){var zt=(this.words[Wt]|0)+Ot*67108864;this.words[Wt]=zt/wt|0,Ot=zt%wt}return this._strip(),It?this.ineg():this},ot.prototype.divn=function(wt){return this.clone().idivn(wt)},ot.prototype.egcd=function(wt){rt(wt.negative===0),rt(!wt.isZero());var It=this,Ot=wt.clone();It.negative!==0?It=It.umod(wt):It=It.clone();for(var Wt=new ot(1),zt=new ot(0),Ft=new ot(0),Nt=new ot(1),Ut=0;It.isEven()&&Ot.isEven();)It.iushrn(1),Ot.iushrn(1),++Ut;for(var Mt=Ot.clone(),Ht=It.clone();!It.isZero();){for(var en=0,sn=1;!(It.words[0]&sn)&&en<26;++en,sn<<=1);if(en>0)for(It.iushrn(en);en-- >0;)(Wt.isOdd()||zt.isOdd())&&(Wt.iadd(Mt),zt.isub(Ht)),Wt.iushrn(1),zt.iushrn(1);for(var Kt=0,rn=1;!(Ot.words[0]&rn)&&Kt<26;++Kt,rn<<=1);if(Kt>0)for(Ot.iushrn(Kt);Kt-- >0;)(Ft.isOdd()||Nt.isOdd())&&(Ft.iadd(Mt),Nt.isub(Ht)),Ft.iushrn(1),Nt.iushrn(1);It.cmp(Ot)>=0?(It.isub(Ot),Wt.isub(Ft),zt.isub(Nt)):(Ot.isub(It),Ft.isub(Wt),Nt.isub(zt))}return{a:Ft,b:Nt,gcd:Ot.iushln(Ut)}},ot.prototype._invmp=function(wt){rt(wt.negative===0),rt(!wt.isZero());var It=this,Ot=wt.clone();It.negative!==0?It=It.umod(wt):It=It.clone();for(var Wt=new ot(1),zt=new ot(0),Ft=Ot.clone();It.cmpn(1)>0&&Ot.cmpn(1)>0;){for(var Nt=0,Ut=1;!(It.words[0]&Ut)&&Nt<26;++Nt,Ut<<=1);if(Nt>0)for(It.iushrn(Nt);Nt-- >0;)Wt.isOdd()&&Wt.iadd(Ft),Wt.iushrn(1);for(var Mt=0,Ht=1;!(Ot.words[0]&Ht)&&Mt<26;++Mt,Ht<<=1);if(Mt>0)for(Ot.iushrn(Mt);Mt-- >0;)zt.isOdd()&&zt.iadd(Ft),zt.iushrn(1);It.cmp(Ot)>=0?(It.isub(Ot),Wt.isub(zt)):(Ot.isub(It),zt.isub(Wt))}var en;return It.cmpn(1)===0?en=Wt:en=zt,en.cmpn(0)<0&&en.iadd(wt),en},ot.prototype.gcd=function(wt){if(this.isZero())return wt.abs();if(wt.isZero())return this.abs();var It=this.clone(),Ot=wt.clone();It.negative=0,Ot.negative=0;for(var Wt=0;It.isEven()&&Ot.isEven();Wt++)It.iushrn(1),Ot.iushrn(1);do{for(;It.isEven();)It.iushrn(1);for(;Ot.isEven();)Ot.iushrn(1);var zt=It.cmp(Ot);if(zt<0){var Ft=It;It=Ot,Ot=Ft}else if(zt===0||Ot.cmpn(1)===0)break;It.isub(Ot)}while(!0);return Ot.iushln(Wt)},ot.prototype.invm=function(wt){return this.egcd(wt).a.umod(wt)},ot.prototype.isEven=function(){return(this.words[0]&1)===0},ot.prototype.isOdd=function(){return(this.words[0]&1)===1},ot.prototype.andln=function(wt){return this.words[0]&wt},ot.prototype.bincn=function(wt){rt(typeof wt=="number");var It=wt%26,Ot=(wt-It)/26,Wt=1<>>26,Nt&=67108863,this.words[Ft]=Nt}return zt!==0&&(this.words[Ft]=zt,this.length++),this},ot.prototype.isZero=function(){return this.length===1&&this.words[0]===0},ot.prototype.cmpn=function(wt){var It=wt<0;if(this.negative!==0&&!It)return-1;if(this.negative===0&&It)return 1;this._strip();var Ot;if(this.length>1)Ot=1;else{It&&(wt=-wt),rt(wt<=67108863,"Number is too big");var Wt=this.words[0]|0;Ot=Wt===wt?0:Wtwt.length)return 1;if(this.length=0;Ot--){var Wt=this.words[Ot]|0,zt=wt.words[Ot]|0;if(Wt!==zt){Wtzt&&(It=1);break}}return It},ot.prototype.gtn=function(wt){return this.cmpn(wt)===1},ot.prototype.gt=function(wt){return this.cmp(wt)===1},ot.prototype.gten=function(wt){return this.cmpn(wt)>=0},ot.prototype.gte=function(wt){return this.cmp(wt)>=0},ot.prototype.ltn=function(wt){return this.cmpn(wt)===-1},ot.prototype.lt=function(wt){return this.cmp(wt)===-1},ot.prototype.lten=function(wt){return this.cmpn(wt)<=0},ot.prototype.lte=function(wt){return this.cmp(wt)<=0},ot.prototype.eqn=function(wt){return this.cmpn(wt)===0},ot.prototype.eq=function(wt){return this.cmp(wt)===0},ot.red=function(wt){return new jt(wt)},ot.prototype.toRed=function(wt){return rt(!this.red,"Already a number in reduction context"),rt(this.negative===0,"red works only with positives"),wt.convertTo(this)._forceRed(wt)},ot.prototype.fromRed=function(){return rt(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},ot.prototype._forceRed=function(wt){return this.red=wt,this},ot.prototype.forceRed=function(wt){return rt(!this.red,"Already a number in reduction context"),this._forceRed(wt)},ot.prototype.redAdd=function(wt){return rt(this.red,"redAdd works only with red numbers"),this.red.add(this,wt)},ot.prototype.redIAdd=function(wt){return rt(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,wt)},ot.prototype.redSub=function(wt){return rt(this.red,"redSub works only with red numbers"),this.red.sub(this,wt)},ot.prototype.redISub=function(wt){return rt(this.red,"redISub works only with red numbers"),this.red.isub(this,wt)},ot.prototype.redShl=function(wt){return rt(this.red,"redShl works only with red numbers"),this.red.shl(this,wt)},ot.prototype.redMul=function(wt){return rt(this.red,"redMul works only with red numbers"),this.red._verify2(this,wt),this.red.mul(this,wt)},ot.prototype.redIMul=function(wt){return rt(this.red,"redMul works only with red numbers"),this.red._verify2(this,wt),this.red.imul(this,wt)},ot.prototype.redSqr=function(){return rt(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},ot.prototype.redISqr=function(){return rt(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},ot.prototype.redSqrt=function(){return rt(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},ot.prototype.redInvm=function(){return rt(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},ot.prototype.redNeg=function(){return rt(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},ot.prototype.redPow=function(wt){return rt(this.red&&!wt.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,wt)};var St={k256:null,p224:null,p192:null,p25519:null};function Tt(Ct,wt){this.name=Ct,this.p=new ot(wt,16),this.n=this.p.bitLength(),this.k=new ot(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}Tt.prototype._tmp=function(){var wt=new ot(null);return wt.words=new Array(Math.ceil(this.n/13)),wt},Tt.prototype.ireduce=function(wt){var It=wt,Ot;do this.split(It,this.tmp),It=this.imulK(It),It=It.iadd(this.tmp),Ot=It.bitLength();while(Ot>this.n);var Wt=Ot0?It.isub(this.p):It.strip!==void 0?It.strip():It._strip(),It},Tt.prototype.split=function(wt,It){wt.iushrn(this.n,0,It)},Tt.prototype.imulK=function(wt){return wt.imul(this.k)};function At(){Tt.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}it(At,Tt),At.prototype.split=function(wt,It){for(var Ot=4194303,Wt=Math.min(wt.length,9),zt=0;zt>>22,Ft=Nt}Ft>>>=22,wt.words[zt-10]=Ft,Ft===0&&wt.length>10?wt.length-=10:wt.length-=9},At.prototype.imulK=function(wt){wt.words[wt.length]=0,wt.words[wt.length+1]=0,wt.length+=2;for(var It=0,Ot=0;Ot>>=26,wt.words[Ot]=zt,It=Wt}return It!==0&&(wt.words[wt.length++]=It),wt},ot._prime=function(wt){if(St[wt])return St[wt];var It;if(wt==="k256")It=new At;else if(wt==="p224")It=new Et;else if(wt==="p192")It=new $t;else if(wt==="p25519")It=new Dt;else throw new Error("Unknown prime "+wt);return St[wt]=It,It};function jt(Ct){if(typeof Ct=="string"){var wt=ot._prime(Ct);this.m=wt.p,this.prime=wt}else rt(Ct.gtn(1),"modulus must be greater than 1"),this.m=Ct,this.prime=null}jt.prototype._verify1=function(wt){rt(wt.negative===0,"red works only with positives"),rt(wt.red,"red works only with red numbers")},jt.prototype._verify2=function(wt,It){rt((wt.negative|It.negative)===0,"red works only with positives"),rt(wt.red&&wt.red===It.red,"red works only with red numbers")},jt.prototype.imod=function(wt){return this.prime?this.prime.ireduce(wt)._forceRed(this):(ut(wt,wt.umod(this.m)._forceRed(this)),wt)},jt.prototype.neg=function(wt){return wt.isZero()?wt.clone():this.m.sub(wt)._forceRed(this)},jt.prototype.add=function(wt,It){this._verify2(wt,It);var Ot=wt.add(It);return Ot.cmp(this.m)>=0&&Ot.isub(this.m),Ot._forceRed(this)},jt.prototype.iadd=function(wt,It){this._verify2(wt,It);var Ot=wt.iadd(It);return Ot.cmp(this.m)>=0&&Ot.isub(this.m),Ot},jt.prototype.sub=function(wt,It){this._verify2(wt,It);var Ot=wt.sub(It);return Ot.cmpn(0)<0&&Ot.iadd(this.m),Ot._forceRed(this)},jt.prototype.isub=function(wt,It){this._verify2(wt,It);var Ot=wt.isub(It);return Ot.cmpn(0)<0&&Ot.iadd(this.m),Ot},jt.prototype.shl=function(wt,It){return this._verify1(wt),this.imod(wt.ushln(It))},jt.prototype.imul=function(wt,It){return this._verify2(wt,It),this.imod(wt.imul(It))},jt.prototype.mul=function(wt,It){return this._verify2(wt,It),this.imod(wt.mul(It))},jt.prototype.isqr=function(wt){return this.imul(wt,wt.clone())},jt.prototype.sqr=function(wt){return this.mul(wt,wt)},jt.prototype.sqrt=function(wt){if(wt.isZero())return wt.clone();var It=this.m.andln(3);if(rt(It%2===1),It===3){var Ot=this.m.add(new ot(1)).iushrn(2);return this.pow(wt,Ot)}for(var Wt=this.m.subn(1),zt=0;!Wt.isZero()&&Wt.andln(1)===0;)zt++,Wt.iushrn(1);rt(!Wt.isZero());var Ft=new ot(1).toRed(this),Nt=Ft.redNeg(),Ut=this.m.subn(1).iushrn(1),Mt=this.m.bitLength();for(Mt=new ot(2*Mt*Mt).toRed(this);this.pow(Mt,Ut).cmp(Nt)!==0;)Mt.redIAdd(Nt);for(var Ht=this.pow(Mt,Wt),en=this.pow(wt,Wt.addn(1).iushrn(1)),sn=this.pow(wt,Wt),Kt=zt;sn.cmp(Ft)!==0;){for(var rn=sn,nn=0;rn.cmp(Ft)!==0;nn++)rn=rn.redSqr();rt(nn=0;zt--){for(var Ht=It.words[zt],en=Mt-1;en>=0;en--){var sn=Ht>>en&1;if(Ft!==Wt[0]&&(Ft=this.sqr(Ft)),sn===0&&Nt===0){Ut=0;continue}Nt<<=1,Nt|=sn,Ut++,!(Ut!==Ot&&(zt!==0||en!==0))&&(Ft=this.mul(Ft,Wt[Nt]),Ut=0,Nt=0)}Mt=26}return Ft},jt.prototype.convertTo=function(wt){var It=wt.umod(this.m);return It===wt?It.clone():It},jt.prototype.convertFrom=function(wt){var It=wt.clone();return It.red=null,It},ot.mont=function(wt){return new Pt(wt)};function Pt(Ct){jt.call(this,Ct),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new ot(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}it(Pt,jt),Pt.prototype.convertTo=function(wt){return this.imod(wt.ushln(this.shift))},Pt.prototype.convertFrom=function(wt){var It=this.imod(wt.mul(this.rinv));return It.red=null,It},Pt.prototype.imul=function(wt,It){if(wt.isZero()||It.isZero())return wt.words[0]=0,wt.length=1,wt;var Ot=wt.imul(It),Wt=Ot.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),zt=Ot.isub(Wt).iushrn(this.shift),Ft=zt;return zt.cmp(this.m)>=0?Ft=zt.isub(this.m):zt.cmpn(0)<0&&(Ft=zt.iadd(this.m)),Ft._forceRed(this)},Pt.prototype.mul=function(wt,It){if(wt.isZero()||It.isZero())return new ot(0)._forceRed(this);var Ot=wt.mul(It),Wt=Ot.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),zt=Ot.isub(Wt).iushrn(this.shift),Ft=zt;return zt.cmp(this.m)>=0?Ft=zt.isub(this.m):zt.cmpn(0)<0&&(Ft=zt.iadd(this.m)),Ft._forceRed(this)},Pt.prototype.invm=function(wt){var It=this.imod(wt._invmp(this.m).mul(this.r2));return It._forceRed(this)}})(tt,commonjsGlobal)})(bn);var bnExports=bn.exports,asn1$3={},asn1$2={},api$1={},encoders={},buffer$1=buffer$2,Buffer$d=buffer$1.Buffer,safer={},key;for(key in buffer$1)buffer$1.hasOwnProperty(key)&&(key==="SlowBuffer"||key==="Buffer"||(safer[key]=buffer$1[key]));var Safer=safer.Buffer={};for(key in Buffer$d)Buffer$d.hasOwnProperty(key)&&(key==="allocUnsafe"||key==="allocUnsafeSlow"||(Safer[key]=Buffer$d[key]));safer.Buffer.prototype=Buffer$d.prototype;(!Safer.from||Safer.from===Uint8Array.from)&&(Safer.from=function(tt,et,nt){if(typeof tt=="number")throw new TypeError('The "value" argument must not be of type number. Received type '+typeof tt);if(tt&&typeof tt.length>"u")throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof tt);return Buffer$d(tt,et,nt)});Safer.alloc||(Safer.alloc=function(tt,et,nt){if(typeof tt!="number")throw new TypeError('The "size" argument must be of type number. Received type '+typeof tt);if(tt<0||tt>=2*(1<<30))throw new RangeError('The value "'+tt+'" is invalid for option "size"');var rt=Buffer$d(tt);return!et||et.length===0?rt.fill(0):typeof nt=="string"?rt.fill(et,nt):rt.fill(et),rt});if(!safer.kStringMaxLength)try{safer.kStringMaxLength=process.binding("buffer").kStringMaxLength}catch{}safer.constants||(safer.constants={MAX_LENGTH:safer.kMaxLength},safer.kStringMaxLength&&(safer.constants.MAX_STRING_LENGTH=safer.kStringMaxLength));var safer_1=safer,reporter={};const inherits$5=inherits_browserExports;function Reporter$2(tt){this._reporterState={obj:null,path:[],options:tt||{},errors:[]}}reporter.Reporter=Reporter$2;Reporter$2.prototype.isError=function(et){return et instanceof ReporterError};Reporter$2.prototype.save=function(){const et=this._reporterState;return{obj:et.obj,pathLen:et.path.length}};Reporter$2.prototype.restore=function(et){const nt=this._reporterState;nt.obj=et.obj,nt.path=nt.path.slice(0,et.pathLen)};Reporter$2.prototype.enterKey=function(et){return this._reporterState.path.push(et)};Reporter$2.prototype.exitKey=function(et){const nt=this._reporterState;nt.path=nt.path.slice(0,et-1)};Reporter$2.prototype.leaveKey=function(et,nt,rt){const it=this._reporterState;this.exitKey(et),it.obj!==null&&(it.obj[nt]=rt)};Reporter$2.prototype.path=function(){return this._reporterState.path.join("/")};Reporter$2.prototype.enterObject=function(){const et=this._reporterState,nt=et.obj;return et.obj={},nt};Reporter$2.prototype.leaveObject=function(et){const nt=this._reporterState,rt=nt.obj;return nt.obj=et,rt};Reporter$2.prototype.error=function(et){let nt;const rt=this._reporterState,it=et instanceof ReporterError;if(it?nt=et:nt=new ReporterError(rt.path.map(function(ot){return"["+JSON.stringify(ot)+"]"}).join(""),et.message||et,et.stack),!rt.options.partial)throw nt;return it||rt.errors.push(nt),nt};Reporter$2.prototype.wrapResult=function(et){const nt=this._reporterState;return nt.options.partial?{result:this.isError(et)?null:et,errors:nt.errors}:et};function ReporterError(tt,et){this.path=tt,this.rethrow(et)}inherits$5(ReporterError,Error);ReporterError.prototype.rethrow=function(et){if(this.message=et+" at: "+(this.path||"(shallow)"),Error.captureStackTrace&&Error.captureStackTrace(this,ReporterError),!this.stack)try{throw new Error(this.message)}catch(nt){this.stack=nt.stack}return this};var buffer={};const inherits$4=inherits_browserExports,Reporter$1=reporter.Reporter,Buffer$c=safer_1.Buffer;function DecoderBuffer$2(tt,et){if(Reporter$1.call(this,et),!Buffer$c.isBuffer(tt)){this.error("Input not Buffer");return}this.base=tt,this.offset=0,this.length=tt.length}inherits$4(DecoderBuffer$2,Reporter$1);buffer.DecoderBuffer=DecoderBuffer$2;DecoderBuffer$2.isDecoderBuffer=function(et){return et instanceof DecoderBuffer$2?!0:typeof et=="object"&&Buffer$c.isBuffer(et.base)&&et.constructor.name==="DecoderBuffer"&&typeof et.offset=="number"&&typeof et.length=="number"&&typeof et.save=="function"&&typeof et.restore=="function"&&typeof et.isEmpty=="function"&&typeof et.readUInt8=="function"&&typeof et.skip=="function"&&typeof et.raw=="function"};DecoderBuffer$2.prototype.save=function(){return{offset:this.offset,reporter:Reporter$1.prototype.save.call(this)}};DecoderBuffer$2.prototype.restore=function(et){const nt=new DecoderBuffer$2(this.base);return nt.offset=et.offset,nt.length=this.offset,this.offset=et.offset,Reporter$1.prototype.restore.call(this,et.reporter),nt};DecoderBuffer$2.prototype.isEmpty=function(){return this.offset===this.length};DecoderBuffer$2.prototype.readUInt8=function(et){return this.offset+1<=this.length?this.base.readUInt8(this.offset++,!0):this.error(et||"DecoderBuffer overrun")};DecoderBuffer$2.prototype.skip=function(et,nt){if(!(this.offset+et<=this.length))return this.error(nt||"DecoderBuffer overrun");const rt=new DecoderBuffer$2(this.base);return rt._reporterState=this._reporterState,rt.offset=this.offset,rt.length=this.offset+et,this.offset+=et,rt};DecoderBuffer$2.prototype.raw=function(et){return this.base.slice(et?et.offset:this.offset,this.length)};function EncoderBuffer$1(tt,et){if(Array.isArray(tt))this.length=0,this.value=tt.map(function(nt){return EncoderBuffer$1.isEncoderBuffer(nt)||(nt=new EncoderBuffer$1(nt,et)),this.length+=nt.length,nt},this);else if(typeof tt=="number"){if(!(0<=tt&&tt<=255))return et.error("non-byte EncoderBuffer value");this.value=tt,this.length=1}else if(typeof tt=="string")this.value=tt,this.length=Buffer$c.byteLength(tt);else if(Buffer$c.isBuffer(tt))this.value=tt,this.length=tt.length;else return et.error("Unsupported type: "+typeof tt)}buffer.EncoderBuffer=EncoderBuffer$1;EncoderBuffer$1.isEncoderBuffer=function(et){return et instanceof EncoderBuffer$1?!0:typeof et=="object"&&et.constructor.name==="EncoderBuffer"&&typeof et.length=="number"&&typeof et.join=="function"};EncoderBuffer$1.prototype.join=function(et,nt){return et||(et=Buffer$c.alloc(this.length)),nt||(nt=0),this.length===0||(Array.isArray(this.value)?this.value.forEach(function(rt){rt.join(et,nt),nt+=rt.length}):(typeof this.value=="number"?et[nt]=this.value:typeof this.value=="string"?et.write(this.value,nt):Buffer$c.isBuffer(this.value)&&this.value.copy(et,nt),nt+=this.length)),et};const Reporter=reporter.Reporter,EncoderBuffer=buffer.EncoderBuffer,DecoderBuffer$1=buffer.DecoderBuffer,assert$5=minimalisticAssert,tags=["seq","seqof","set","setof","objid","bool","gentime","utctime","null_","enum","int","objDesc","bitstr","bmpstr","charstr","genstr","graphstr","ia5str","iso646str","numstr","octstr","printstr","t61str","unistr","utf8str","videostr"],methods=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(tags),overrided=["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"];function Node$4(tt,et,nt){const rt={};this._baseState=rt,rt.name=nt,rt.enc=tt,rt.parent=et||null,rt.children=null,rt.tag=null,rt.args=null,rt.reverseArgs=null,rt.choice=null,rt.optional=!1,rt.any=!1,rt.obj=!1,rt.use=null,rt.useDecoder=null,rt.key=null,rt.default=null,rt.explicit=null,rt.implicit=null,rt.contains=null,rt.parent||(rt.children=[],this._wrap())}var node$1=Node$4;const stateProps=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];Node$4.prototype.clone=function(){const et=this._baseState,nt={};stateProps.forEach(function(it){nt[it]=et[it]});const rt=new this.constructor(nt.parent);return rt._baseState=nt,rt};Node$4.prototype._wrap=function(){const et=this._baseState;methods.forEach(function(nt){this[nt]=function(){const it=new this.constructor(this);return et.children.push(it),it[nt].apply(it,arguments)}},this)};Node$4.prototype._init=function(et){const nt=this._baseState;assert$5(nt.parent===null),et.call(this),nt.children=nt.children.filter(function(rt){return rt._baseState.parent===this},this),assert$5.equal(nt.children.length,1,"Root node can have only one child")};Node$4.prototype._useArgs=function(et){const nt=this._baseState,rt=et.filter(function(it){return it instanceof this.constructor},this);et=et.filter(function(it){return!(it instanceof this.constructor)},this),rt.length!==0&&(assert$5(nt.children===null),nt.children=rt,rt.forEach(function(it){it._baseState.parent=this},this)),et.length!==0&&(assert$5(nt.args===null),nt.args=et,nt.reverseArgs=et.map(function(it){if(typeof it!="object"||it.constructor!==Object)return it;const ot={};return Object.keys(it).forEach(function(at){at==(at|0)&&(at|=0);const st=it[at];ot[st]=at}),ot}))};overrided.forEach(function(tt){Node$4.prototype[tt]=function(){const nt=this._baseState;throw new Error(tt+" not implemented for encoding: "+nt.enc)}});tags.forEach(function(tt){Node$4.prototype[tt]=function(){const nt=this._baseState,rt=Array.prototype.slice.call(arguments);return assert$5(nt.tag===null),nt.tag=tt,this._useArgs(rt),this}});Node$4.prototype.use=function(et){assert$5(et);const nt=this._baseState;return assert$5(nt.use===null),nt.use=et,this};Node$4.prototype.optional=function(){const et=this._baseState;return et.optional=!0,this};Node$4.prototype.def=function(et){const nt=this._baseState;return assert$5(nt.default===null),nt.default=et,nt.optional=!0,this};Node$4.prototype.explicit=function(et){const nt=this._baseState;return assert$5(nt.explicit===null&&nt.implicit===null),nt.explicit=et,this};Node$4.prototype.implicit=function(et){const nt=this._baseState;return assert$5(nt.explicit===null&&nt.implicit===null),nt.implicit=et,this};Node$4.prototype.obj=function(){const et=this._baseState,nt=Array.prototype.slice.call(arguments);return et.obj=!0,nt.length!==0&&this._useArgs(nt),this};Node$4.prototype.key=function(et){const nt=this._baseState;return assert$5(nt.key===null),nt.key=et,this};Node$4.prototype.any=function(){const et=this._baseState;return et.any=!0,this};Node$4.prototype.choice=function(et){const nt=this._baseState;return assert$5(nt.choice===null),nt.choice=et,this._useArgs(Object.keys(et).map(function(rt){return et[rt]})),this};Node$4.prototype.contains=function(et){const nt=this._baseState;return assert$5(nt.use===null),nt.contains=et,this};Node$4.prototype._decode=function(et,nt){const rt=this._baseState;if(rt.parent===null)return et.wrapResult(rt.children[0]._decode(et,nt));let it=rt.default,ot=!0,at=null;if(rt.key!==null&&(at=et.enterKey(rt.key)),rt.optional){let lt=null;if(rt.explicit!==null?lt=rt.explicit:rt.implicit!==null?lt=rt.implicit:rt.tag!==null&&(lt=rt.tag),lt===null&&!rt.any){const ct=et.save();try{rt.choice===null?this._decodeGeneric(rt.tag,et,nt):this._decodeChoice(et,nt),ot=!0}catch{ot=!1}et.restore(ct)}else if(ot=this._peekTag(et,lt,rt.any),et.isError(ot))return ot}let st;if(rt.obj&&ot&&(st=et.enterObject()),ot){if(rt.explicit!==null){const ct=this._decodeTag(et,rt.explicit);if(et.isError(ct))return ct;et=ct}const lt=et.offset;if(rt.use===null&&rt.choice===null){let ct;rt.any&&(ct=et.save());const ut=this._decodeTag(et,rt.implicit!==null?rt.implicit:rt.tag,rt.any);if(et.isError(ut))return ut;rt.any?it=et.raw(ct):et=ut}if(nt&&nt.track&&rt.tag!==null&&nt.track(et.path(),lt,et.length,"tagged"),nt&&nt.track&&rt.tag!==null&&nt.track(et.path(),et.offset,et.length,"content"),rt.any||(rt.choice===null?it=this._decodeGeneric(rt.tag,et,nt):it=this._decodeChoice(et,nt)),et.isError(it))return it;if(!rt.any&&rt.choice===null&&rt.children!==null&&rt.children.forEach(function(ut){ut._decode(et,nt)}),rt.contains&&(rt.tag==="octstr"||rt.tag==="bitstr")){const ct=new DecoderBuffer$1(it);it=this._getUse(rt.contains,et._reporterState.obj)._decode(ct,nt)}}return rt.obj&&ot&&(it=et.leaveObject(st)),rt.key!==null&&(it!==null||ot===!0)?et.leaveKey(at,rt.key,it):at!==null&&et.exitKey(at),it};Node$4.prototype._decodeGeneric=function(et,nt,rt){const it=this._baseState;return et==="seq"||et==="set"?null:et==="seqof"||et==="setof"?this._decodeList(nt,et,it.args[0],rt):/str$/.test(et)?this._decodeStr(nt,et,rt):et==="objid"&&it.args?this._decodeObjid(nt,it.args[0],it.args[1],rt):et==="objid"?this._decodeObjid(nt,null,null,rt):et==="gentime"||et==="utctime"?this._decodeTime(nt,et,rt):et==="null_"?this._decodeNull(nt,rt):et==="bool"?this._decodeBool(nt,rt):et==="objDesc"?this._decodeStr(nt,et,rt):et==="int"||et==="enum"?this._decodeInt(nt,it.args&&it.args[0],rt):it.use!==null?this._getUse(it.use,nt._reporterState.obj)._decode(nt,rt):nt.error("unknown tag: "+et)};Node$4.prototype._getUse=function(et,nt){const rt=this._baseState;return rt.useDecoder=this._use(et,nt),assert$5(rt.useDecoder._baseState.parent===null),rt.useDecoder=rt.useDecoder._baseState.children[0],rt.implicit!==rt.useDecoder._baseState.implicit&&(rt.useDecoder=rt.useDecoder.clone(),rt.useDecoder._baseState.implicit=rt.implicit),rt.useDecoder};Node$4.prototype._decodeChoice=function(et,nt){const rt=this._baseState;let it=null,ot=!1;return Object.keys(rt.choice).some(function(at){const st=et.save(),lt=rt.choice[at];try{const ct=lt._decode(et,nt);if(et.isError(ct))return!1;it={type:at,value:ct},ot=!0}catch{return et.restore(st),!1}return!0},this),ot?it:et.error("Choice not matched")};Node$4.prototype._createEncoderBuffer=function(et){return new EncoderBuffer(et,this.reporter)};Node$4.prototype._encode=function(et,nt,rt){const it=this._baseState;if(it.default!==null&&it.default===et)return;const ot=this._encodeValue(et,nt,rt);if(ot!==void 0&&!this._skipDefault(ot,nt,rt))return ot};Node$4.prototype._encodeValue=function(et,nt,rt){const it=this._baseState;if(it.parent===null)return it.children[0]._encode(et,nt||new Reporter);let ot=null;if(this.reporter=nt,it.optional&&et===void 0)if(it.default!==null)et=it.default;else return;let at=null,st=!1;if(it.any)ot=this._createEncoderBuffer(et);else if(it.choice)ot=this._encodeChoice(et,nt);else if(it.contains)at=this._getUse(it.contains,rt)._encode(et,nt),st=!0;else if(it.children)at=it.children.map(function(lt){if(lt._baseState.tag==="null_")return lt._encode(null,nt,et);if(lt._baseState.key===null)return nt.error("Child should have a key");const ct=nt.enterKey(lt._baseState.key);if(typeof et!="object")return nt.error("Child expected, but input is not object");const ut=lt._encode(et[lt._baseState.key],nt,et);return nt.leaveKey(ct),ut},this).filter(function(lt){return lt}),at=this._createEncoderBuffer(at);else if(it.tag==="seqof"||it.tag==="setof"){if(!(it.args&&it.args.length===1))return nt.error("Too many args for : "+it.tag);if(!Array.isArray(et))return nt.error("seqof/setof, but data is not Array");const lt=this.clone();lt._baseState.implicit=null,at=this._createEncoderBuffer(et.map(function(ct){const ut=this._baseState;return this._getUse(ut.args[0],et)._encode(ct,nt)},lt))}else it.use!==null?ot=this._getUse(it.use,rt)._encode(et,nt):(at=this._encodePrimitive(it.tag,et),st=!0);if(!it.any&&it.choice===null){const lt=it.implicit!==null?it.implicit:it.tag,ct=it.implicit===null?"universal":"context";lt===null?it.use===null&&nt.error("Tag could be omitted only for .use()"):it.use===null&&(ot=this._encodeComposite(lt,st,ct,at))}return it.explicit!==null&&(ot=this._encodeComposite(it.explicit,!1,"context",ot)),ot};Node$4.prototype._encodeChoice=function(et,nt){const rt=this._baseState,it=rt.choice[et.type];return it||assert$5(!1,et.type+" not found in "+JSON.stringify(Object.keys(rt.choice))),it._encode(et.value,nt)};Node$4.prototype._encodePrimitive=function(et,nt){const rt=this._baseState;if(/str$/.test(et))return this._encodeStr(nt,et);if(et==="objid"&&rt.args)return this._encodeObjid(nt,rt.reverseArgs[0],rt.args[1]);if(et==="objid")return this._encodeObjid(nt,null,null);if(et==="gentime"||et==="utctime")return this._encodeTime(nt,et);if(et==="null_")return this._encodeNull();if(et==="int"||et==="enum")return this._encodeInt(nt,rt.args&&rt.reverseArgs[0]);if(et==="bool")return this._encodeBool(nt);if(et==="objDesc")return this._encodeStr(nt,et);throw new Error("Unsupported tag: "+et)};Node$4.prototype._isNumstr=function(et){return/^[0-9 ]*$/.test(et)};Node$4.prototype._isPrintstr=function(et){return/^[A-Za-z0-9 '()+,-./:=?]*$/.test(et)};var der$2={};(function(tt){function et(nt){const rt={};return Object.keys(nt).forEach(function(it){(it|0)==it&&(it=it|0);const ot=nt[it];rt[ot]=it}),rt}tt.tagClass={0:"universal",1:"application",2:"context",3:"private"},tt.tagClassByName=et(tt.tagClass),tt.tag={0:"end",1:"bool",2:"int",3:"bitstr",4:"octstr",5:"null_",6:"objid",7:"objDesc",8:"external",9:"real",10:"enum",11:"embed",12:"utf8str",13:"relativeOid",16:"seq",17:"set",18:"numstr",19:"printstr",20:"t61str",21:"videostr",22:"ia5str",23:"utctime",24:"gentime",25:"graphstr",26:"iso646str",27:"genstr",28:"unistr",29:"charstr",30:"bmpstr"},tt.tagByName=et(tt.tag)})(der$2);const inherits$3=inherits_browserExports,Buffer$b=safer_1.Buffer,Node$3=node$1,der$1=der$2;function DEREncoder$1(tt){this.enc="der",this.name=tt.name,this.entity=tt,this.tree=new DERNode$1,this.tree._init(tt.body)}var der_1$1=DEREncoder$1;DEREncoder$1.prototype.encode=function(et,nt){return this.tree._encode(et,nt).join()};function DERNode$1(tt){Node$3.call(this,"der",tt)}inherits$3(DERNode$1,Node$3);DERNode$1.prototype._encodeComposite=function(et,nt,rt,it){const ot=encodeTag(et,nt,rt,this.reporter);if(it.length<128){const lt=Buffer$b.alloc(2);return lt[0]=ot,lt[1]=it.length,this._createEncoderBuffer([lt,it])}let at=1;for(let lt=it.length;lt>=256;lt>>=8)at++;const st=Buffer$b.alloc(1+1+at);st[0]=ot,st[1]=128|at;for(let lt=1+at,ct=it.length;ct>0;lt--,ct>>=8)st[lt]=ct&255;return this._createEncoderBuffer([st,it])};DERNode$1.prototype._encodeStr=function(et,nt){if(nt==="bitstr")return this._createEncoderBuffer([et.unused|0,et.data]);if(nt==="bmpstr"){const rt=Buffer$b.alloc(et.length*2);for(let it=0;it=40)return this.reporter.error("Second objid identifier OOB");et.splice(0,2,et[0]*40+et[1])}let it=0;for(let st=0;st=128;lt>>=7)it++}const ot=Buffer$b.alloc(it);let at=ot.length-1;for(let st=et.length-1;st>=0;st--){let lt=et[st];for(ot[at--]=lt&127;(lt>>=7)>0;)ot[at--]=128|lt&127}return this._createEncoderBuffer(ot)};function two(tt){return tt<10?"0"+tt:tt}DERNode$1.prototype._encodeTime=function(et,nt){let rt;const it=new Date(et);return nt==="gentime"?rt=[two(it.getUTCFullYear()),two(it.getUTCMonth()+1),two(it.getUTCDate()),two(it.getUTCHours()),two(it.getUTCMinutes()),two(it.getUTCSeconds()),"Z"].join(""):nt==="utctime"?rt=[two(it.getUTCFullYear()%100),two(it.getUTCMonth()+1),two(it.getUTCDate()),two(it.getUTCHours()),two(it.getUTCMinutes()),two(it.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+nt+" time is not supported yet"),this._encodeStr(rt,"octstr")};DERNode$1.prototype._encodeNull=function(){return this._createEncoderBuffer("")};DERNode$1.prototype._encodeInt=function(et,nt){if(typeof et=="string"){if(!nt)return this.reporter.error("String int or enum given, but no values map");if(!nt.hasOwnProperty(et))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(et));et=nt[et]}if(typeof et!="number"&&!Buffer$b.isBuffer(et)){const ot=et.toArray();!et.sign&&ot[0]&128&&ot.unshift(0),et=Buffer$b.from(ot)}if(Buffer$b.isBuffer(et)){let ot=et.length;et.length===0&&ot++;const at=Buffer$b.alloc(ot);return et.copy(at),et.length===0&&(at[0]=0),this._createEncoderBuffer(at)}if(et<128)return this._createEncoderBuffer(et);if(et<256)return this._createEncoderBuffer([0,et]);let rt=1;for(let ot=et;ot>=256;ot>>=8)rt++;const it=new Array(rt);for(let ot=it.length-1;ot>=0;ot--)it[ot]=et&255,et>>=8;return it[0]&128&&it.unshift(0),this._createEncoderBuffer(Buffer$b.from(it))};DERNode$1.prototype._encodeBool=function(et){return this._createEncoderBuffer(et?255:0)};DERNode$1.prototype._use=function(et,nt){return typeof et=="function"&&(et=et(nt)),et._getEncoder("der").tree};DERNode$1.prototype._skipDefault=function(et,nt,rt){const it=this._baseState;let ot;if(it.default===null)return!1;const at=et.join();if(it.defaultBuffer===void 0&&(it.defaultBuffer=this._encodeValue(it.default,nt,rt).join()),at.length!==it.defaultBuffer.length)return!1;for(ot=0;ot=31?rt.error("Multi-octet tag encoding unsupported"):(et||(it|=32),it|=der$1.tagClassByName[nt||"universal"]<<6,it)}const inherits$2=inherits_browserExports,DEREncoder=der_1$1;function PEMEncoder(tt){DEREncoder.call(this,tt),this.enc="pem"}inherits$2(PEMEncoder,DEREncoder);var pem$1=PEMEncoder;PEMEncoder.prototype.encode=function(et,nt){const it=DEREncoder.prototype.encode.call(this,et).toString("base64"),ot=["-----BEGIN "+nt.label+"-----"];for(let at=0;at>6],it=(nt&32)===0;if((nt&31)===31){let at=nt;for(nt=0;(at&128)===128;){if(at=tt.readUInt8(et),tt.isError(at))return at;nt<<=7,nt|=at&127}}else nt&=31;const ot=der.tag[nt];return{cls:rt,primitive:it,tag:nt,tagStr:ot}}function derDecodeLen(tt,et,nt){let rt=tt.readUInt8(nt);if(tt.isError(rt))return rt;if(!et&&rt===128)return null;if(!(rt&128))return rt;const it=rt&127;if(it>4)return tt.error("length octect is too long");rt=0;for(let ot=0;ot0&&vt.ishrn(xt),vt}function pt(yt,bt){yt=dt(yt,bt),yt=yt.mod(bt);var vt=tt.from(yt.toArray());if(vt.length=ut)throw new Error("invalid sig")}return verify_1=ot,verify_1}var browser$4,hasRequiredBrowser$1;function requireBrowser$1(){if(hasRequiredBrowser$1)return browser$4;hasRequiredBrowser$1=1;var tt=safeBufferExports.Buffer,et=browser$a,nt=readableBrowserExports,rt=inherits_browserExports,it=requireSign(),ot=requireVerify(),at=require$$6;Object.keys(at).forEach(function(ht){at[ht].id=tt.from(at[ht].id,"hex"),at[ht.toLowerCase()]=at[ht]});function st(ht){nt.Writable.call(this);var dt=at[ht];if(!dt)throw new Error("Unknown message digest");this._hashType=dt.hash,this._hash=et(dt.hash),this._tag=dt.id,this._signType=dt.sign}rt(st,nt.Writable),st.prototype._write=function(dt,pt,mt){this._hash.update(dt),mt()},st.prototype.update=function(dt,pt){return typeof dt=="string"&&(dt=tt.from(dt,pt)),this._hash.update(dt),this},st.prototype.sign=function(dt,pt){this.end();var mt=this._hash.digest(),gt=it(mt,dt,this._hashType,this._signType,this._tag);return pt?gt.toString(pt):gt};function lt(ht){nt.Writable.call(this);var dt=at[ht];if(!dt)throw new Error("Unknown message digest");this._hash=et(dt.hash),this._tag=dt.id,this._signType=dt.sign}rt(lt,nt.Writable),lt.prototype._write=function(dt,pt,mt){this._hash.update(dt),mt()},lt.prototype.update=function(dt,pt){return typeof dt=="string"&&(dt=tt.from(dt,pt)),this._hash.update(dt),this},lt.prototype.verify=function(dt,pt,mt){typeof pt=="string"&&(pt=tt.from(pt,mt)),this.end();var gt=this._hash.digest();return ot(pt,gt,dt,this._signType,this._tag)};function ct(ht){return new st(ht)}function ut(ht){return new lt(ht)}return browser$4={Sign:ct,Verify:ut,createSign:ct,createVerify:ut},browser$4}var browser$3,hasRequiredBrowser;function requireBrowser(){if(hasRequiredBrowser)return browser$3;hasRequiredBrowser=1;var tt=requireElliptic(),et=bnExports$2;browser$3=function(at){return new rt(at)};var nt={secp256k1:{name:"secp256k1",byteLength:32},secp224r1:{name:"p224",byteLength:28},prime256v1:{name:"p256",byteLength:32},prime192v1:{name:"p192",byteLength:24},ed25519:{name:"ed25519",byteLength:32},secp384r1:{name:"p384",byteLength:48},secp521r1:{name:"p521",byteLength:66}};nt.p224=nt.secp224r1,nt.p256=nt.secp256r1=nt.prime256v1,nt.p192=nt.secp192r1=nt.prime192v1,nt.p384=nt.secp384r1,nt.p521=nt.secp521r1;function rt(ot){this.curveType=nt[ot],this.curveType||(this.curveType={name:ot}),this.curve=new tt.ec(this.curveType.name),this.keys=void 0}rt.prototype.generateKeys=function(ot,at){return this.keys=this.curve.genKeyPair(),this.getPublicKey(ot,at)},rt.prototype.computeSecret=function(ot,at,st){at=at||"utf8",Buffer.isBuffer(ot)||(ot=new Buffer(ot,at));var lt=this.curve.keyFromPublic(ot).getPublic(),ct=lt.mul(this.keys.getPrivate()).getX();return it(ct,st,this.curveType.byteLength)},rt.prototype.getPublicKey=function(ot,at){var st=this.keys.getPublic(at==="compressed",!0);return at==="hybrid"&&(st[st.length-1]%2?st[0]=7:st[0]=6),it(st,ot)},rt.prototype.getPrivateKey=function(ot){return it(this.keys.getPrivate(),ot)},rt.prototype.setPublicKey=function(ot,at){return at=at||"utf8",Buffer.isBuffer(ot)||(ot=new Buffer(ot,at)),this.keys._importPublic(ot),this},rt.prototype.setPrivateKey=function(ot,at){at=at||"utf8",Buffer.isBuffer(ot)||(ot=new Buffer(ot,at));var st=new et(ot);return st=st.toString(16),this.keys=this.curve.genKeyPair(),this.keys._importPrivate(st),this};function it(ot,at,st){Array.isArray(ot)||(ot=ot.toArray());var lt=new Buffer(ot);if(st&<.length=0)throw new Error("data too long for modulus")}else throw new Error("unknown padding");return rt?crt$1(at,ot):withPublic$1(at,ot)};function oaep$1(tt,et){var nt=tt.modulus.byteLength(),rt=et.length,it=createHash$2("sha1").update(Buffer$5.alloc(0)).digest(),ot=it.length,at=2*ot;if(rt>nt-at-2)throw new Error("message too long");var st=Buffer$5.alloc(nt-rt-at-2),lt=nt-ot-1,ct=randomBytes(ot),ut=xor$1(Buffer$5.concat([it,st,Buffer$5.alloc(1,1),et],lt),mgf$1(ct,lt)),ht=xor$1(ct,mgf$1(ut,ot));return new BN$3(Buffer$5.concat([Buffer$5.alloc(1),ht,ut],nt))}function pkcs1$1(tt,et,nt){var rt=et.length,it=tt.modulus.byteLength();if(rt>it-11)throw new Error("message too long");var ot;return nt?ot=Buffer$5.alloc(it-rt-3,255):ot=nonZero(it-rt-3),new BN$3(Buffer$5.concat([Buffer$5.from([0,nt?1:2]),ot,Buffer$5.alloc(1),et],it))}function nonZero(tt){for(var et=Buffer$5.allocUnsafe(tt),nt=0,rt=randomBytes(tt*2),it=0,ot;ntat||new BN$2(nt).cmp(ot.modulus)>=0)throw new Error("decryption error");var st;rt?st=withPublic(new BN$2(nt),ot):st=crt(nt,ot);var lt=Buffer$4.alloc(at-st.length);if(st=Buffer$4.concat([lt,st],at),it===4)return oaep(ot,st);if(it===1)return pkcs1(ot,st,rt);if(it===3)return st;throw new Error("unknown padding")};function oaep(tt,et){var nt=tt.modulus.byteLength(),rt=createHash$1("sha1").update(Buffer$4.alloc(0)).digest(),it=rt.length;if(et[0]!==0)throw new Error("decryption error");var ot=et.slice(1,it+1),at=et.slice(it+1),st=xor(ot,mgf(at,it)),lt=xor(at,mgf(st,nt-it-1));if(compare$1(rt,lt.slice(0,it)))throw new Error("decryption error");for(var ct=it;lt[ct]===0;)ct++;if(lt[ct++]!==1)throw new Error("decryption error");return lt.slice(ct)}function pkcs1(tt,et,nt){for(var rt=et.slice(0,2),it=2,ot=0;et[it++]!==0;)if(it>=et.length){ot++;break}var at=et.slice(2,it-1);if((rt.toString("hex")!=="0002"&&!nt||rt.toString("hex")!=="0001"&&nt)&&ot++,at.length<8&&ot++,ot)throw new Error("decryption error");return et.slice(it)}function compare$1(tt,et){tt=Buffer$4.from(tt),et=Buffer$4.from(et);var nt=0,rt=tt.length;tt.length!==et.length&&(nt++,rt=Math.min(tt.length,et.length));for(var it=-1;++itkMaxUint32||tt<0)throw new TypeError("offset must be a uint32");if(tt>kBufferMaxLength||tt>et)throw new RangeError("offset out of range")}function assertSize(tt,et,nt){if(typeof tt!="number"||tt!==tt)throw new TypeError("size must be a number");if(tt>kMaxUint32||tt<0)throw new TypeError("size must be a uint32");if(tt+et>nt||tt>kBufferMaxLength)throw new RangeError("buffer too small")}crypto$3&&crypto$3.getRandomValues||!process.browser?(browser$1.randomFill=randomFill,browser$1.randomFillSync=randomFillSync):(browser$1.randomFill=oldBrowser,browser$1.randomFillSync=oldBrowser);function randomFill(tt,et,nt,rt){if(!Buffer$3.isBuffer(tt)&&!(tt instanceof commonjsGlobal.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');if(typeof et=="function")rt=et,et=0,nt=tt.length;else if(typeof nt=="function")rt=nt,nt=tt.length-et;else if(typeof rt!="function")throw new TypeError('"cb" argument must be a function');return assertOffset(et,tt.length),assertSize(nt,et,tt.length),actualFill(tt,et,nt,rt)}function actualFill(tt,et,nt,rt){if(process.browser){var it=tt.buffer,ot=new Uint8Array(it,et,nt);if(crypto$3.getRandomValues(ot),rt){process.nextTick(function(){rt(null,tt)});return}return tt}if(rt){randombytes(nt,function(st,lt){if(st)return rt(st);lt.copy(tt,et),rt(null,tt)});return}var at=randombytes(nt);return at.copy(tt,et),tt}function randomFillSync(tt,et,nt){if(typeof et>"u"&&(et=0),!Buffer$3.isBuffer(tt)&&!(tt instanceof commonjsGlobal.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');return assertOffset(et,tt.length),nt===void 0&&(nt=tt.length-et),assertSize(nt,et,tt.length),actualFill(tt,et,nt)}var hasRequiredCryptoBrowserify;function requireCryptoBrowserify(){if(hasRequiredCryptoBrowserify)return cryptoBrowserify;hasRequiredCryptoBrowserify=1,cryptoBrowserify.randomBytes=cryptoBrowserify.rng=cryptoBrowserify.pseudoRandomBytes=cryptoBrowserify.prng=browserExports,cryptoBrowserify.createHash=cryptoBrowserify.Hash=browser$a,cryptoBrowserify.createHmac=cryptoBrowserify.Hmac=browser$9;var tt=algos,et=Object.keys(tt),nt=["sha1","sha224","sha256","sha384","sha512","md5","rmd160"].concat(et);cryptoBrowserify.getHashes=function(){return nt};var rt=browser$8;cryptoBrowserify.pbkdf2=rt.pbkdf2,cryptoBrowserify.pbkdf2Sync=rt.pbkdf2Sync;var it=browser$7;cryptoBrowserify.Cipher=it.Cipher,cryptoBrowserify.createCipher=it.createCipher,cryptoBrowserify.Cipheriv=it.Cipheriv,cryptoBrowserify.createCipheriv=it.createCipheriv,cryptoBrowserify.Decipher=it.Decipher,cryptoBrowserify.createDecipher=it.createDecipher,cryptoBrowserify.Decipheriv=it.Decipheriv,cryptoBrowserify.createDecipheriv=it.createDecipheriv,cryptoBrowserify.getCiphers=it.getCiphers,cryptoBrowserify.listCiphers=it.listCiphers;var ot=requireBrowser$2();cryptoBrowserify.DiffieHellmanGroup=ot.DiffieHellmanGroup,cryptoBrowserify.createDiffieHellmanGroup=ot.createDiffieHellmanGroup,cryptoBrowserify.getDiffieHellman=ot.getDiffieHellman,cryptoBrowserify.createDiffieHellman=ot.createDiffieHellman,cryptoBrowserify.DiffieHellman=ot.DiffieHellman;var at=requireBrowser$1();cryptoBrowserify.createSign=at.createSign,cryptoBrowserify.Sign=at.Sign,cryptoBrowserify.createVerify=at.createVerify,cryptoBrowserify.Verify=at.Verify,cryptoBrowserify.createECDH=requireBrowser();var st=browser$2;cryptoBrowserify.publicEncrypt=st.publicEncrypt,cryptoBrowserify.privateEncrypt=st.privateEncrypt,cryptoBrowserify.publicDecrypt=st.publicDecrypt,cryptoBrowserify.privateDecrypt=st.privateDecrypt;var lt=browser$1;return cryptoBrowserify.randomFill=lt.randomFill,cryptoBrowserify.randomFillSync=lt.randomFillSync,cryptoBrowserify.createCredentials=function(){throw new Error(["sorry, createCredentials is not implemented yet","we accept pull requests","https://github.com/crypto-browserify/crypto-browserify"].join(` -`))},cryptoBrowserify.constants={DH_CHECK_P_NOT_SAFE_PRIME:2,DH_CHECK_P_NOT_PRIME:1,DH_UNABLE_TO_CHECK_GENERATOR:4,DH_NOT_SUITABLE_GENERATOR:8,NPN_ENABLED:1,ALPN_ENABLED:1,RSA_PKCS1_PADDING:1,RSA_SSLV23_PADDING:2,RSA_NO_PADDING:3,RSA_PKCS1_OAEP_PADDING:4,RSA_X931_PADDING:5,RSA_PKCS1_PSS_PADDING:6,POINT_CONVERSION_COMPRESSED:2,POINT_CONVERSION_UNCOMPRESSED:4,POINT_CONVERSION_HYBRID:6},cryptoBrowserify}var rngBrowser={exports:{}},getRandomValues=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto<"u"&&typeof window.msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto);if(getRandomValues){var rnds8=new Uint8Array(16);rngBrowser.exports=function(){return getRandomValues(rnds8),rnds8}}else{var rnds=new Array(16);rngBrowser.exports=function(){for(var et=0,nt;et<16;et++)et&3||(nt=Math.random()*4294967296),rnds[et]=nt>>>((et&3)<<3)&255;return rnds}}var rngBrowserExports=rngBrowser.exports,byteToHex=[];for(var i$4=0;i$4<256;++i$4)byteToHex[i$4]=(i$4+256).toString(16).substr(1);function bytesToUuid$1(tt,et){var nt=et||0,rt=byteToHex;return[rt[tt[nt++]],rt[tt[nt++]],rt[tt[nt++]],rt[tt[nt++]],"-",rt[tt[nt++]],rt[tt[nt++]],"-",rt[tt[nt++]],rt[tt[nt++]],"-",rt[tt[nt++]],rt[tt[nt++]],"-",rt[tt[nt++]],rt[tt[nt++]],rt[tt[nt++]],rt[tt[nt++]],rt[tt[nt++]],rt[tt[nt++]]].join("")}var bytesToUuid_1=bytesToUuid$1,rng=rngBrowserExports,bytesToUuid=bytesToUuid_1;function v4(tt,et,nt){var rt=et&&nt||0;typeof tt=="string"&&(et=tt==="binary"?new Array(16):null,tt=null),tt=tt||{};var it=tt.random||(tt.rng||rng)();if(it[6]=it[6]&15|64,it[8]=it[8]&63|128,et)for(var ot=0;ot<16;++ot)et[rt+ot]=it[ot];return et||bytesToUuid(it)}var v4_1=v4,macaroon$1={},sjcl={exports:{}};(function(tt){var et={cipher:{},hash:{},keyexchange:{},mode:{},misc:{},codec:{},exception:{corrupt:function(mt){this.toString=function(){return"CORRUPT: "+this.message},this.message=mt},invalid:function(mt){this.toString=function(){return"INVALID: "+this.message},this.message=mt},bug:function(mt){this.toString=function(){return"BUG: "+this.message},this.message=mt},notReady:function(mt){this.toString=function(){return"NOT READY: "+this.message},this.message=mt}}};et.cipher.aes=function(mt){this.s[0][0][0]||this.O();var gt,yt,bt,vt,xt=this.s[0][4],kt=this.s[1];gt=mt.length;var St=1;if(gt!==4&>!==6&>!==8)throw new et.exception.invalid("invalid aes key size");for(this.b=[bt=mt.slice(0),vt=[]],mt=gt;mt<4*gt+28;mt++)yt=bt[mt-1],(mt%gt===0||gt===8&&mt%gt===4)&&(yt=xt[yt>>>24]<<24^xt[yt>>16&255]<<16^xt[yt>>8&255]<<8^xt[yt&255],mt%gt===0&&(yt=yt<<8^yt>>>24^St<<24,St=St<<1^283*(St>>7))),bt[mt]=bt[mt-gt]^yt;for(gt=0;mt;gt++,mt--)yt=bt[gt&3?mt:mt-4],vt[gt]=4>=mt||4>gt?yt:kt[0][xt[yt>>>24]]^kt[1][xt[yt>>16&255]]^kt[2][xt[yt>>8&255]]^kt[3][xt[yt&255]]},et.cipher.aes.prototype={encrypt:function(mt){return nt(this,mt,0)},decrypt:function(mt){return nt(this,mt,1)},s:[[[],[],[],[],[]],[[],[],[],[],[]]],O:function(){var mt=this.s[0],gt=this.s[1],yt=mt[4],bt=gt[4],vt,xt,kt,St=[],Tt=[],At,Et,$t,Dt;for(vt=0;256>vt;vt++)Tt[(St[vt]=vt<<1^283*(vt>>7))^vt]=vt;for(xt=kt=0;!yt[xt];xt^=At||1,kt=Tt[kt]||1)for($t=kt^kt<<1^kt<<2^kt<<3^kt<<4,$t=$t>>8^$t&255^99,yt[xt]=$t,bt[$t]=xt,Et=St[vt=St[At=St[xt]]],Dt=16843009*Et^65537*vt^257*At^16843008*xt,Et=257*St[$t]^16843008*$t,vt=0;4>vt;vt++)mt[vt][xt]=Et=Et<<24^Et>>>8,gt[vt][$t]=Dt=Dt<<24^Dt>>>8;for(vt=0;5>vt;vt++)mt[vt]=mt[vt].slice(0),gt[vt]=gt[vt].slice(0)}};function nt(mt,gt,yt){if(gt.length!==4)throw new et.exception.invalid("invalid aes block size");var bt=mt.b[yt],vt=gt[0]^bt[0],xt=gt[yt?3:1]^bt[1],kt=gt[2]^bt[2];gt=gt[yt?1:3]^bt[3];var St,Tt,At,Et=bt.length/4-2,$t,Dt=4,jt=[0,0,0,0];St=mt.s[yt],mt=St[0];var Pt=St[1],Ct=St[2],wt=St[3],It=St[4];for($t=0;$t>>24]^Pt[xt>>16&255]^Ct[kt>>8&255]^wt[gt&255]^bt[Dt],Tt=mt[xt>>>24]^Pt[kt>>16&255]^Ct[gt>>8&255]^wt[vt&255]^bt[Dt+1],At=mt[kt>>>24]^Pt[gt>>16&255]^Ct[vt>>8&255]^wt[xt&255]^bt[Dt+2],gt=mt[gt>>>24]^Pt[vt>>16&255]^Ct[xt>>8&255]^wt[kt&255]^bt[Dt+3],Dt+=4,vt=St,xt=Tt,kt=At;for($t=0;4>$t;$t++)jt[yt?3&-$t:$t]=It[vt>>>24]<<24^It[xt>>16&255]<<16^It[kt>>8&255]<<8^It[gt&255]^bt[Dt++],St=vt,vt=xt,xt=kt,kt=gt,gt=St;return jt}et.bitArray={bitSlice:function(mt,gt,yt){return mt=et.bitArray.$(mt.slice(gt/32),32-(gt&31)).slice(1),yt===void 0?mt:et.bitArray.clamp(mt,yt-gt)},extract:function(mt,gt,yt){var bt=Math.floor(-gt-yt&31);return((gt+yt-1^gt)&-32?mt[gt/32|0]<<32-bt^mt[gt/32+1|0]>>>bt:mt[gt/32|0]>>>bt)&(1<>gt-1,1)),mt},partial:function(mt,gt,yt){return mt===32?gt:(yt?gt|0:gt<<32-mt)+1099511627776*mt},getPartial:function(mt){return Math.round(mt/1099511627776)||32},equal:function(mt,gt){if(et.bitArray.bitLength(mt)!==et.bitArray.bitLength(gt))return!1;var yt=0,bt;for(bt=0;bt>>gt),yt=mt[vt]<<32-gt;return vt=mt.length?mt[mt.length-1]:0,mt=et.bitArray.getPartial(vt),bt.push(et.bitArray.partial(gt+mt&31,32>>24|yt>>>8&65280|(yt&65280)<<8|yt<<24;return mt}},et.codec.utf8String={fromBits:function(mt){var gt="",yt=et.bitArray.bitLength(mt),bt,vt;for(bt=0;bt>>8>>>8>>>8),vt<<=8;return decodeURIComponent(escape(gt))},toBits:function(mt){mt=unescape(encodeURIComponent(mt));var gt=[],yt,bt=0;for(yt=0;yt>>kt)>>>vt),ktEt){if(!gt)try{return et.codec.base32hex.toBits(mt)}catch{}throw new et.exception.invalid("this isn't "+$t+"!")}St>vt?(St-=vt,xt.push(At^Et>>>St),At=Et<>>vt)>>>26),6>vt?(kt=mt[yt]<<6-vt,vt+=26,yt++):(kt<<=6,vt-=6);for(;bt.length&3&&!gt;)bt+="=";return bt},toBits:function(mt,gt){mt=mt.replace(/\s|=/g,"");var yt=[],bt,vt=0,xt=et.codec.base64.B,kt=0,St;for(gt&&(xt=xt.substr(0,62)+"-_"),bt=0;btSt)throw new et.exception.invalid("this isn't base64!");26>>vt),kt=St<<32-vt):(vt+=6,kt^=St<<32-vt)}return vt&56&&yt.push(et.bitArray.partial(vt&56,kt,1)),yt}},et.codec.base64url={fromBits:function(mt){return et.codec.base64.fromBits(mt,1,1)},toBits:function(mt){return et.codec.base64.toBits(mt,1)}},et.hash.sha256=function(mt){this.b[0]||this.O(),mt?(this.F=mt.F.slice(0),this.A=mt.A.slice(0),this.l=mt.l):this.reset()},et.hash.sha256.hash=function(mt){return new et.hash.sha256().update(mt).finalize()},et.hash.sha256.prototype={blockSize:512,reset:function(){return this.F=this.Y.slice(0),this.A=[],this.l=0,this},update:function(mt){typeof mt=="string"&&(mt=et.codec.utf8String.toBits(mt));var gt,yt=this.A=et.bitArray.concat(this.A,mt);if(gt=this.l,mt=this.l=gt+et.bitArray.bitLength(mt),9007199254740991gt;yt++){for(vt=!0,bt=2;bt*bt<=yt;bt++)if(yt%bt===0){vt=!1;break}vt&&(8>gt&&(this.Y[gt]=mt(Math.pow(yt,.5))),this.b[gt]=mt(Math.pow(yt,1/3)),gt++)}}};function rt(mt,gt){var yt,bt,vt,xt=mt.F,kt=mt.b,St=xt[0],Tt=xt[1],At=xt[2],Et=xt[3],$t=xt[4],Dt=xt[5],jt=xt[6],Pt=xt[7];for(yt=0;64>yt;yt++)16>yt?bt=gt[yt]:(bt=gt[yt+1&15],vt=gt[yt+14&15],bt=gt[yt&15]=(bt>>>7^bt>>>18^bt>>>3^bt<<25^bt<<14)+(vt>>>17^vt>>>19^vt>>>10^vt<<15^vt<<13)+gt[yt&15]+gt[yt+9&15]|0),bt=bt+Pt+($t>>>6^$t>>>11^$t>>>25^$t<<26^$t<<21^$t<<7)+(jt^$t&(Dt^jt))+kt[yt],Pt=jt,jt=Dt,Dt=$t,$t=Et+bt|0,Et=At,At=Tt,Tt=St,St=bt+(Tt&At^Et&(Tt^At))+(Tt>>>2^Tt>>>13^Tt>>>22^Tt<<30^Tt<<19^Tt<<10)|0;xt[0]=xt[0]+St|0,xt[1]=xt[1]+Tt|0,xt[2]=xt[2]+At|0,xt[3]=xt[3]+Et|0,xt[4]=xt[4]+$t|0,xt[5]=xt[5]+Dt|0,xt[6]=xt[6]+jt|0,xt[7]=xt[7]+Pt|0}et.mode.ccm={name:"ccm",G:[],listenProgress:function(mt){et.mode.ccm.G.push(mt)},unListenProgress:function(mt){mt=et.mode.ccm.G.indexOf(mt),-1Tt)throw new et.exception.invalid("ccm: iv must be at least 7 bytes");for(xt=2;4>xt&&At>>>8*xt;xt++);return xt<15-Tt&&(xt=15-Tt),yt=St.clamp(yt,8*(15-xt)),gt=et.mode.ccm.V(mt,gt,yt,bt,vt,xt),kt=et.mode.ccm.C(mt,kt,yt,gt,vt,xt),St.concat(kt.data,kt.tag)},decrypt:function(mt,gt,yt,bt,vt){vt=vt||64,bt=bt||[];var xt=et.bitArray,kt=xt.bitLength(yt)/8,At=xt.bitLength(gt),St=xt.clamp(gt,At-vt),Tt=xt.bitSlice(gt,At-vt),At=(At-vt)/8;if(7>kt)throw new et.exception.invalid("ccm: iv must be at least 7 bytes");for(gt=2;4>gt&&At>>>8*gt;gt++);if(gt<15-kt&&(gt=15-kt),yt=xt.clamp(yt,8*(15-gt)),St=et.mode.ccm.C(mt,St,yt,Tt,vt,gt),mt=et.mode.ccm.V(mt,St.data,yt,bt,vt,gt),!xt.equal(St.tag,mt))throw new et.exception.corrupt("ccm: tag doesn't match");return St.data},na:function(mt,gt,yt,bt,vt,xt){var kt=[],St=et.bitArray,Tt=St.i;if(bt=[St.partial(8,(gt.length?64:0)|bt-2<<2|xt-1)],bt=St.concat(bt,yt),bt[3]|=vt,bt=mt.encrypt(bt),gt.length)for(yt=St.bitLength(gt)/8,65279>=yt?kt=[St.partial(16,yt)]:4294967295>=yt&&(kt=St.concat([St.partial(16,65534)],[yt])),kt=St.concat(kt,gt),gt=0;gtvt||16Et&&(et.mode.ccm.fa(kt/Tt),Et+=$t),yt[3]++,vt=mt.encrypt(yt),gt[kt]^=vt[0],gt[kt+1]^=vt[1],gt[kt+2]^=vt[2],gt[kt+3]^=vt[3];return{tag:bt,data:St.clamp(gt,At)}}},et.mode.ocb2={name:"ocb2",encrypt:function(mt,gt,yt,bt,vt,xt){if(et.bitArray.bitLength(yt)!==128)throw new et.exception.invalid("ocb iv must be 128 bits");var kt,St=et.mode.ocb2.S,Tt=et.bitArray,At=Tt.i,Et=[0,0,0,0];yt=St(mt.encrypt(yt));var $t,Dt=[];for(bt=bt||[],vt=vt||64,kt=0;kt+4vt.bitLength(yt)&&(St=xt(St,bt(St)),yt=vt.concat(yt,[-2147483648,0,0,0])),kt=xt(kt,yt),mt.encrypt(xt(bt(xt(St,bt(St))),kt))},S:function(mt){return[mt[0]<<1^mt[1]>>>31,mt[1]<<1^mt[2]>>>31,mt[2]<<1^mt[3]>>>31,mt[3]<<1^135*(mt[0]>>>31)]}},et.mode.gcm={name:"gcm",encrypt:function(mt,gt,yt,bt,vt){var xt=gt.slice(0);return gt=et.bitArray,bt=bt||[],mt=et.mode.gcm.C(!0,mt,xt,bt,yt,vt||128),gt.concat(mt.data,mt.tag)},decrypt:function(mt,gt,yt,bt,vt){var xt=gt.slice(0),kt=et.bitArray,St=kt.bitLength(xt);if(vt=vt||128,bt=bt||[],vt<=St?(gt=kt.bitSlice(xt,St-vt),xt=kt.bitSlice(xt,0,St-vt)):(gt=xt,xt=[]),mt=et.mode.gcm.C(!1,mt,xt,bt,yt,vt),!kt.equal(mt.tag,gt))throw new et.exception.corrupt("gcm: tag doesn't match");return mt.data},ka:function(mt,gt){var yt,bt,vt,xt,kt,St=et.bitArray.i;for(vt=[0,0,0,0],xt=gt.slice(0),yt=0;128>yt;yt++){for((bt=(mt[Math.floor(yt/32)]&1<<31-yt%32)!==0)&&(vt=St(vt,xt)),kt=(xt[3]&1)!==0,bt=3;0>>1|(xt[bt-1]&1)<<31;xt[0]>>>=1,kt&&(xt[0]^=-520093696)}return vt},j:function(mt,gt,yt){var bt,vt=yt.length;for(gt=gt.slice(0),bt=0;btvt&&(mt=gt.hash(mt)),bt=0;btbt||0>yt)throw new et.exception.invalid("invalid params to pbkdf2");typeof mt=="string"&&(mt=et.codec.utf8String.toBits(mt)),typeof gt=="string"&&(gt=et.codec.utf8String.toBits(gt)),vt=vt||et.misc.hmac,mt=new vt(mt);var xt,kt,St,Tt,At=[],Et=et.bitArray;for(Tt=1;32*At.length<(bt||1);Tt++){for(vt=xt=mt.encrypt(Et.concat(gt,[Tt])),kt=1;ktkt;kt++)vt.push(4294967296*Math.random()|0);for(kt=0;kt=1<this.o&&(this.o=xt),this.P++,this.b=et.hash.sha256.hash(this.b.concat(vt)),this.L=new et.cipher.aes(this.b),bt=0;4>bt&&(this.h[bt]=this.h[bt]+1|0,!this.h[bt]);bt++);}for(bt=0;bt>>1;this.c[kt].update([bt,this.N++,2,gt,xt,mt.length].concat(mt))}break;case"string":gt===void 0&&(gt=mt.length),this.c[kt].update([bt,this.N++,3,gt,xt,mt.length]),this.c[kt].update(mt);break;default:Tt=1}if(Tt)throw new et.exception.bug("random: addEntropy only supports number, array of numbers or string");this.m[kt]+=gt,this.f+=gt,St===this.u&&(this.isReady()!==this.u&&it("seeded",Math.max(this.o,this.f)),it("progress",this.getProgress()))},isReady:function(mt){return mt=this.T[mt!==void 0?mt:this.M],this.o&&this.o>=mt?this.m[0]>this.ba&&new Date().valueOf()>this.Z?this.J|this.I:this.I:this.f>=mt?this.J|this.u:this.u},getProgress:function(mt){return mt=this.T[mt||this.M],this.o>=mt||this.f>mt?1:this.f/mt},startCollectors:function(){if(!this.D){if(this.a={loadTimeCollector:lt(this,this.ma),mouseCollector:lt(this,this.oa),keyboardCollector:lt(this,this.la),accelerometerCollector:lt(this,this.ea),touchCollector:lt(this,this.qa)},window.addEventListener)window.addEventListener("load",this.a.loadTimeCollector,!1),window.addEventListener("mousemove",this.a.mouseCollector,!1),window.addEventListener("keypress",this.a.keyboardCollector,!1),window.addEventListener("devicemotion",this.a.accelerometerCollector,!1),window.addEventListener("touchmove",this.a.touchCollector,!1);else if(document.attachEvent)document.attachEvent("onload",this.a.loadTimeCollector),document.attachEvent("onmousemove",this.a.mouseCollector),document.attachEvent("keypress",this.a.keyboardCollector);else throw new et.exception.bug("can't attach event");this.D=!0}},stopCollectors:function(){this.D&&(window.removeEventListener?(window.removeEventListener("load",this.a.loadTimeCollector,!1),window.removeEventListener("mousemove",this.a.mouseCollector,!1),window.removeEventListener("keypress",this.a.keyboardCollector,!1),window.removeEventListener("devicemotion",this.a.accelerometerCollector,!1),window.removeEventListener("touchmove",this.a.touchCollector,!1)):document.detachEvent&&(document.detachEvent("onload",this.a.loadTimeCollector),document.detachEvent("onmousemove",this.a.mouseCollector),document.detachEvent("keypress",this.a.keyboardCollector)),this.D=!1)},addEventListener:function(mt,gt){this.K[mt][this.ga++]=gt},removeEventListener:function(mt,gt){var yt,bt,vt=this.K[mt],xt=[];for(bt in vt)vt.hasOwnProperty(bt)&&vt[bt]===gt&&xt.push(bt);for(yt=0;ytgt&&(mt.h[gt]=mt.h[gt]+1|0,!mt.h[gt]);gt++);return mt.L.encrypt(mt.h)}function lt(mt,gt){return function(){gt.apply(mt,arguments)}}et.random=new et.prng(6);e:try{var ct,ut,ht,dt;if(dt=tt.exports){var pt;try{pt=requireCryptoBrowserify()}catch{pt=null}dt=ut=pt}if(dt&&ut.randomBytes)ct=ut.randomBytes(128),ct=new Uint32Array(new Uint8Array(ct).buffer),et.random.addEntropy(ct,1024,"crypto['randomBytes']");else if(typeof window<"u"&&typeof Uint32Array<"u"){if(ht=new Uint32Array(32),window.crypto&&window.crypto.getRandomValues)window.crypto.getRandomValues(ht);else if(window.msCrypto&&window.msCrypto.getRandomValues)window.msCrypto.getRandomValues(ht);else break e;et.random.addEntropy(ht,1024,"crypto['getRandomValues']")}}catch(mt){typeof window<"u"&&window.console&&(console.log("There was an error collecting entropy from the browser:"),console.log(mt))}et.json={defaults:{v:1,iter:1e4,ks:128,ts:64,mode:"ccm",adata:"",cipher:"aes"},ja:function(mt,gt,yt,bt){yt=yt||{},bt=bt||{};var vt=et.json,xt=vt.g({iv:et.random.randomWords(4,0)},vt.defaults),kt;if(vt.g(xt,yt),yt=xt.adata,typeof xt.salt=="string"&&(xt.salt=et.codec.base64.toBits(xt.salt)),typeof xt.iv=="string"&&(xt.iv=et.codec.base64.toBits(xt.iv)),!et.mode[xt.mode]||!et.cipher[xt.cipher]||typeof mt=="string"&&100>=xt.iter||xt.ts!==64&&xt.ts!==96&&xt.ts!==128||xt.ks!==128&&xt.ks!==192&&xt.ks!==256||2>xt.iv.length||4=gt.iter||gt.ts!==64&>.ts!==96&>.ts!==128||gt.ks!==128&>.ks!==192&>.ks!==256||!gt.iv||2>gt.iv.length||4>24&255,xn[Mn+1]=dn>>16&255,xn[Mn+2]=dn>>8&255,xn[Mn+3]=dn&255,xn[Mn+4]=Jt>>24&255,xn[Mn+5]=Jt>>16&255,xn[Mn+6]=Jt>>8&255,xn[Mn+7]=Jt&255}function gt(xn,Mn,dn,Jt,En){var Ln,Un=0;for(Ln=0;Ln>>8)-1}function yt(xn,Mn,dn,Jt){return gt(xn,Mn,dn,Jt,16)}function bt(xn,Mn,dn,Jt){return gt(xn,Mn,dn,Jt,32)}function vt(xn,Mn,dn,Jt){for(var En=Jt[0]&255|(Jt[1]&255)<<8|(Jt[2]&255)<<16|(Jt[3]&255)<<24,Ln=dn[0]&255|(dn[1]&255)<<8|(dn[2]&255)<<16|(dn[3]&255)<<24,Un=dn[4]&255|(dn[5]&255)<<8|(dn[6]&255)<<16|(dn[7]&255)<<24,Kn=dn[8]&255|(dn[9]&255)<<8|(dn[10]&255)<<16|(dn[11]&255)<<24,nr=dn[12]&255|(dn[13]&255)<<8|(dn[14]&255)<<16|(dn[15]&255)<<24,lr=Jt[4]&255|(Jt[5]&255)<<8|(Jt[6]&255)<<16|(Jt[7]&255)<<24,cr=Mn[0]&255|(Mn[1]&255)<<8|(Mn[2]&255)<<16|(Mn[3]&255)<<24,Hr=Mn[4]&255|(Mn[5]&255)<<8|(Mn[6]&255)<<16|(Mn[7]&255)<<24,vr=Mn[8]&255|(Mn[9]&255)<<8|(Mn[10]&255)<<16|(Mn[11]&255)<<24,Nr=Mn[12]&255|(Mn[13]&255)<<8|(Mn[14]&255)<<16|(Mn[15]&255)<<24,Gr=Jt[8]&255|(Jt[9]&255)<<8|(Jt[10]&255)<<16|(Jt[11]&255)<<24,eo=dn[16]&255|(dn[17]&255)<<8|(dn[18]&255)<<16|(dn[19]&255)<<24,Zr=dn[20]&255|(dn[21]&255)<<8|(dn[22]&255)<<16|(dn[23]&255)<<24,Jr=dn[24]&255|(dn[25]&255)<<8|(dn[26]&255)<<16|(dn[27]&255)<<24,wr=dn[28]&255|(dn[29]&255)<<8|(dn[30]&255)<<16|(dn[31]&255)<<24,Mr=Jt[12]&255|(Jt[13]&255)<<8|(Jt[14]&255)<<16|(Jt[15]&255)<<24,Ur=En,Rr=Ln,Pr=Un,Lr=Kn,Wr=nr,Br=lr,tr=cr,ir=Hr,Sr=vr,dr=Nr,br=Gr,$r=eo,no=Zr,so=Jr,fo=wr,po=Mr,Yn,vo=0;vo<20;vo+=2)Yn=Ur+no|0,Wr^=Yn<<7|Yn>>>32-7,Yn=Wr+Ur|0,Sr^=Yn<<9|Yn>>>32-9,Yn=Sr+Wr|0,no^=Yn<<13|Yn>>>32-13,Yn=no+Sr|0,Ur^=Yn<<18|Yn>>>32-18,Yn=Br+Rr|0,dr^=Yn<<7|Yn>>>32-7,Yn=dr+Br|0,so^=Yn<<9|Yn>>>32-9,Yn=so+dr|0,Rr^=Yn<<13|Yn>>>32-13,Yn=Rr+so|0,Br^=Yn<<18|Yn>>>32-18,Yn=br+tr|0,fo^=Yn<<7|Yn>>>32-7,Yn=fo+br|0,Pr^=Yn<<9|Yn>>>32-9,Yn=Pr+fo|0,tr^=Yn<<13|Yn>>>32-13,Yn=tr+Pr|0,br^=Yn<<18|Yn>>>32-18,Yn=po+$r|0,Lr^=Yn<<7|Yn>>>32-7,Yn=Lr+po|0,ir^=Yn<<9|Yn>>>32-9,Yn=ir+Lr|0,$r^=Yn<<13|Yn>>>32-13,Yn=$r+ir|0,po^=Yn<<18|Yn>>>32-18,Yn=Ur+Lr|0,Rr^=Yn<<7|Yn>>>32-7,Yn=Rr+Ur|0,Pr^=Yn<<9|Yn>>>32-9,Yn=Pr+Rr|0,Lr^=Yn<<13|Yn>>>32-13,Yn=Lr+Pr|0,Ur^=Yn<<18|Yn>>>32-18,Yn=Br+Wr|0,tr^=Yn<<7|Yn>>>32-7,Yn=tr+Br|0,ir^=Yn<<9|Yn>>>32-9,Yn=ir+tr|0,Wr^=Yn<<13|Yn>>>32-13,Yn=Wr+ir|0,Br^=Yn<<18|Yn>>>32-18,Yn=br+dr|0,$r^=Yn<<7|Yn>>>32-7,Yn=$r+br|0,Sr^=Yn<<9|Yn>>>32-9,Yn=Sr+$r|0,dr^=Yn<<13|Yn>>>32-13,Yn=dr+Sr|0,br^=Yn<<18|Yn>>>32-18,Yn=po+fo|0,no^=Yn<<7|Yn>>>32-7,Yn=no+po|0,so^=Yn<<9|Yn>>>32-9,Yn=so+no|0,fo^=Yn<<13|Yn>>>32-13,Yn=fo+so|0,po^=Yn<<18|Yn>>>32-18;Ur=Ur+En|0,Rr=Rr+Ln|0,Pr=Pr+Un|0,Lr=Lr+Kn|0,Wr=Wr+nr|0,Br=Br+lr|0,tr=tr+cr|0,ir=ir+Hr|0,Sr=Sr+vr|0,dr=dr+Nr|0,br=br+Gr|0,$r=$r+eo|0,no=no+Zr|0,so=so+Jr|0,fo=fo+wr|0,po=po+Mr|0,xn[0]=Ur>>>0&255,xn[1]=Ur>>>8&255,xn[2]=Ur>>>16&255,xn[3]=Ur>>>24&255,xn[4]=Rr>>>0&255,xn[5]=Rr>>>8&255,xn[6]=Rr>>>16&255,xn[7]=Rr>>>24&255,xn[8]=Pr>>>0&255,xn[9]=Pr>>>8&255,xn[10]=Pr>>>16&255,xn[11]=Pr>>>24&255,xn[12]=Lr>>>0&255,xn[13]=Lr>>>8&255,xn[14]=Lr>>>16&255,xn[15]=Lr>>>24&255,xn[16]=Wr>>>0&255,xn[17]=Wr>>>8&255,xn[18]=Wr>>>16&255,xn[19]=Wr>>>24&255,xn[20]=Br>>>0&255,xn[21]=Br>>>8&255,xn[22]=Br>>>16&255,xn[23]=Br>>>24&255,xn[24]=tr>>>0&255,xn[25]=tr>>>8&255,xn[26]=tr>>>16&255,xn[27]=tr>>>24&255,xn[28]=ir>>>0&255,xn[29]=ir>>>8&255,xn[30]=ir>>>16&255,xn[31]=ir>>>24&255,xn[32]=Sr>>>0&255,xn[33]=Sr>>>8&255,xn[34]=Sr>>>16&255,xn[35]=Sr>>>24&255,xn[36]=dr>>>0&255,xn[37]=dr>>>8&255,xn[38]=dr>>>16&255,xn[39]=dr>>>24&255,xn[40]=br>>>0&255,xn[41]=br>>>8&255,xn[42]=br>>>16&255,xn[43]=br>>>24&255,xn[44]=$r>>>0&255,xn[45]=$r>>>8&255,xn[46]=$r>>>16&255,xn[47]=$r>>>24&255,xn[48]=no>>>0&255,xn[49]=no>>>8&255,xn[50]=no>>>16&255,xn[51]=no>>>24&255,xn[52]=so>>>0&255,xn[53]=so>>>8&255,xn[54]=so>>>16&255,xn[55]=so>>>24&255,xn[56]=fo>>>0&255,xn[57]=fo>>>8&255,xn[58]=fo>>>16&255,xn[59]=fo>>>24&255,xn[60]=po>>>0&255,xn[61]=po>>>8&255,xn[62]=po>>>16&255,xn[63]=po>>>24&255}function xt(xn,Mn,dn,Jt){for(var En=Jt[0]&255|(Jt[1]&255)<<8|(Jt[2]&255)<<16|(Jt[3]&255)<<24,Ln=dn[0]&255|(dn[1]&255)<<8|(dn[2]&255)<<16|(dn[3]&255)<<24,Un=dn[4]&255|(dn[5]&255)<<8|(dn[6]&255)<<16|(dn[7]&255)<<24,Kn=dn[8]&255|(dn[9]&255)<<8|(dn[10]&255)<<16|(dn[11]&255)<<24,nr=dn[12]&255|(dn[13]&255)<<8|(dn[14]&255)<<16|(dn[15]&255)<<24,lr=Jt[4]&255|(Jt[5]&255)<<8|(Jt[6]&255)<<16|(Jt[7]&255)<<24,cr=Mn[0]&255|(Mn[1]&255)<<8|(Mn[2]&255)<<16|(Mn[3]&255)<<24,Hr=Mn[4]&255|(Mn[5]&255)<<8|(Mn[6]&255)<<16|(Mn[7]&255)<<24,vr=Mn[8]&255|(Mn[9]&255)<<8|(Mn[10]&255)<<16|(Mn[11]&255)<<24,Nr=Mn[12]&255|(Mn[13]&255)<<8|(Mn[14]&255)<<16|(Mn[15]&255)<<24,Gr=Jt[8]&255|(Jt[9]&255)<<8|(Jt[10]&255)<<16|(Jt[11]&255)<<24,eo=dn[16]&255|(dn[17]&255)<<8|(dn[18]&255)<<16|(dn[19]&255)<<24,Zr=dn[20]&255|(dn[21]&255)<<8|(dn[22]&255)<<16|(dn[23]&255)<<24,Jr=dn[24]&255|(dn[25]&255)<<8|(dn[26]&255)<<16|(dn[27]&255)<<24,wr=dn[28]&255|(dn[29]&255)<<8|(dn[30]&255)<<16|(dn[31]&255)<<24,Mr=Jt[12]&255|(Jt[13]&255)<<8|(Jt[14]&255)<<16|(Jt[15]&255)<<24,Ur=En,Rr=Ln,Pr=Un,Lr=Kn,Wr=nr,Br=lr,tr=cr,ir=Hr,Sr=vr,dr=Nr,br=Gr,$r=eo,no=Zr,so=Jr,fo=wr,po=Mr,Yn,vo=0;vo<20;vo+=2)Yn=Ur+no|0,Wr^=Yn<<7|Yn>>>32-7,Yn=Wr+Ur|0,Sr^=Yn<<9|Yn>>>32-9,Yn=Sr+Wr|0,no^=Yn<<13|Yn>>>32-13,Yn=no+Sr|0,Ur^=Yn<<18|Yn>>>32-18,Yn=Br+Rr|0,dr^=Yn<<7|Yn>>>32-7,Yn=dr+Br|0,so^=Yn<<9|Yn>>>32-9,Yn=so+dr|0,Rr^=Yn<<13|Yn>>>32-13,Yn=Rr+so|0,Br^=Yn<<18|Yn>>>32-18,Yn=br+tr|0,fo^=Yn<<7|Yn>>>32-7,Yn=fo+br|0,Pr^=Yn<<9|Yn>>>32-9,Yn=Pr+fo|0,tr^=Yn<<13|Yn>>>32-13,Yn=tr+Pr|0,br^=Yn<<18|Yn>>>32-18,Yn=po+$r|0,Lr^=Yn<<7|Yn>>>32-7,Yn=Lr+po|0,ir^=Yn<<9|Yn>>>32-9,Yn=ir+Lr|0,$r^=Yn<<13|Yn>>>32-13,Yn=$r+ir|0,po^=Yn<<18|Yn>>>32-18,Yn=Ur+Lr|0,Rr^=Yn<<7|Yn>>>32-7,Yn=Rr+Ur|0,Pr^=Yn<<9|Yn>>>32-9,Yn=Pr+Rr|0,Lr^=Yn<<13|Yn>>>32-13,Yn=Lr+Pr|0,Ur^=Yn<<18|Yn>>>32-18,Yn=Br+Wr|0,tr^=Yn<<7|Yn>>>32-7,Yn=tr+Br|0,ir^=Yn<<9|Yn>>>32-9,Yn=ir+tr|0,Wr^=Yn<<13|Yn>>>32-13,Yn=Wr+ir|0,Br^=Yn<<18|Yn>>>32-18,Yn=br+dr|0,$r^=Yn<<7|Yn>>>32-7,Yn=$r+br|0,Sr^=Yn<<9|Yn>>>32-9,Yn=Sr+$r|0,dr^=Yn<<13|Yn>>>32-13,Yn=dr+Sr|0,br^=Yn<<18|Yn>>>32-18,Yn=po+fo|0,no^=Yn<<7|Yn>>>32-7,Yn=no+po|0,so^=Yn<<9|Yn>>>32-9,Yn=so+no|0,fo^=Yn<<13|Yn>>>32-13,Yn=fo+so|0,po^=Yn<<18|Yn>>>32-18;xn[0]=Ur>>>0&255,xn[1]=Ur>>>8&255,xn[2]=Ur>>>16&255,xn[3]=Ur>>>24&255,xn[4]=Br>>>0&255,xn[5]=Br>>>8&255,xn[6]=Br>>>16&255,xn[7]=Br>>>24&255,xn[8]=br>>>0&255,xn[9]=br>>>8&255,xn[10]=br>>>16&255,xn[11]=br>>>24&255,xn[12]=po>>>0&255,xn[13]=po>>>8&255,xn[14]=po>>>16&255,xn[15]=po>>>24&255,xn[16]=tr>>>0&255,xn[17]=tr>>>8&255,xn[18]=tr>>>16&255,xn[19]=tr>>>24&255,xn[20]=ir>>>0&255,xn[21]=ir>>>8&255,xn[22]=ir>>>16&255,xn[23]=ir>>>24&255,xn[24]=Sr>>>0&255,xn[25]=Sr>>>8&255,xn[26]=Sr>>>16&255,xn[27]=Sr>>>24&255,xn[28]=dr>>>0&255,xn[29]=dr>>>8&255,xn[30]=dr>>>16&255,xn[31]=dr>>>24&255}function kt(xn,Mn,dn,Jt){vt(xn,Mn,dn,Jt)}function St(xn,Mn,dn,Jt){xt(xn,Mn,dn,Jt)}var Tt=new Uint8Array([101,120,112,97,110,100,32,51,50,45,98,121,116,101,32,107]);function At(xn,Mn,dn,Jt,En,Ln,Un){var Kn=new Uint8Array(16),nr=new Uint8Array(64),lr,cr;for(cr=0;cr<16;cr++)Kn[cr]=0;for(cr=0;cr<8;cr++)Kn[cr]=Ln[cr];for(;En>=64;){for(kt(nr,Kn,Un,Tt),cr=0;cr<64;cr++)xn[Mn+cr]=dn[Jt+cr]^nr[cr];for(lr=1,cr=8;cr<16;cr++)lr=lr+(Kn[cr]&255)|0,Kn[cr]=lr&255,lr>>>=8;En-=64,Mn+=64,Jt+=64}if(En>0)for(kt(nr,Kn,Un,Tt),cr=0;cr=64;){for(kt(Un,Ln,En,Tt),nr=0;nr<64;nr++)xn[Mn+nr]=Un[nr];for(Kn=1,nr=8;nr<16;nr++)Kn=Kn+(Ln[nr]&255)|0,Ln[nr]=Kn&255,Kn>>>=8;dn-=64,Mn+=64}if(dn>0)for(kt(Un,Ln,En,Tt),nr=0;nr>>13|dn<<3)&8191,Jt=xn[4]&255|(xn[5]&255)<<8,this.r[2]=(dn>>>10|Jt<<6)&7939,En=xn[6]&255|(xn[7]&255)<<8,this.r[3]=(Jt>>>7|En<<9)&8191,Ln=xn[8]&255|(xn[9]&255)<<8,this.r[4]=(En>>>4|Ln<<12)&255,this.r[5]=Ln>>>1&8190,Un=xn[10]&255|(xn[11]&255)<<8,this.r[6]=(Ln>>>14|Un<<2)&8191,Kn=xn[12]&255|(xn[13]&255)<<8,this.r[7]=(Un>>>11|Kn<<5)&8065,nr=xn[14]&255|(xn[15]&255)<<8,this.r[8]=(Kn>>>8|nr<<8)&8191,this.r[9]=nr>>>5&127,this.pad[0]=xn[16]&255|(xn[17]&255)<<8,this.pad[1]=xn[18]&255|(xn[19]&255)<<8,this.pad[2]=xn[20]&255|(xn[21]&255)<<8,this.pad[3]=xn[22]&255|(xn[23]&255)<<8,this.pad[4]=xn[24]&255|(xn[25]&255)<<8,this.pad[5]=xn[26]&255|(xn[27]&255)<<8,this.pad[6]=xn[28]&255|(xn[29]&255)<<8,this.pad[7]=xn[30]&255|(xn[31]&255)<<8};jt.prototype.blocks=function(xn,Mn,dn){for(var Jt=this.fin?0:2048,En,Ln,Un,Kn,nr,lr,cr,Hr,vr,Nr,Gr,eo,Zr,Jr,wr,Mr,Ur,Rr,Pr,Lr=this.h[0],Wr=this.h[1],Br=this.h[2],tr=this.h[3],ir=this.h[4],Sr=this.h[5],dr=this.h[6],br=this.h[7],$r=this.h[8],no=this.h[9],so=this.r[0],fo=this.r[1],po=this.r[2],Yn=this.r[3],vo=this.r[4],_o=this.r[5],xo=this.r[6],bo=this.r[7],Co=this.r[8],Ro=this.r[9];dn>=16;)En=xn[Mn+0]&255|(xn[Mn+1]&255)<<8,Lr+=En&8191,Ln=xn[Mn+2]&255|(xn[Mn+3]&255)<<8,Wr+=(En>>>13|Ln<<3)&8191,Un=xn[Mn+4]&255|(xn[Mn+5]&255)<<8,Br+=(Ln>>>10|Un<<6)&8191,Kn=xn[Mn+6]&255|(xn[Mn+7]&255)<<8,tr+=(Un>>>7|Kn<<9)&8191,nr=xn[Mn+8]&255|(xn[Mn+9]&255)<<8,ir+=(Kn>>>4|nr<<12)&8191,Sr+=nr>>>1&8191,lr=xn[Mn+10]&255|(xn[Mn+11]&255)<<8,dr+=(nr>>>14|lr<<2)&8191,cr=xn[Mn+12]&255|(xn[Mn+13]&255)<<8,br+=(lr>>>11|cr<<5)&8191,Hr=xn[Mn+14]&255|(xn[Mn+15]&255)<<8,$r+=(cr>>>8|Hr<<8)&8191,no+=Hr>>>5|Jt,vr=0,Nr=vr,Nr+=Lr*so,Nr+=Wr*(5*Ro),Nr+=Br*(5*Co),Nr+=tr*(5*bo),Nr+=ir*(5*xo),vr=Nr>>>13,Nr&=8191,Nr+=Sr*(5*_o),Nr+=dr*(5*vo),Nr+=br*(5*Yn),Nr+=$r*(5*po),Nr+=no*(5*fo),vr+=Nr>>>13,Nr&=8191,Gr=vr,Gr+=Lr*fo,Gr+=Wr*so,Gr+=Br*(5*Ro),Gr+=tr*(5*Co),Gr+=ir*(5*bo),vr=Gr>>>13,Gr&=8191,Gr+=Sr*(5*xo),Gr+=dr*(5*_o),Gr+=br*(5*vo),Gr+=$r*(5*Yn),Gr+=no*(5*po),vr+=Gr>>>13,Gr&=8191,eo=vr,eo+=Lr*po,eo+=Wr*fo,eo+=Br*so,eo+=tr*(5*Ro),eo+=ir*(5*Co),vr=eo>>>13,eo&=8191,eo+=Sr*(5*bo),eo+=dr*(5*xo),eo+=br*(5*_o),eo+=$r*(5*vo),eo+=no*(5*Yn),vr+=eo>>>13,eo&=8191,Zr=vr,Zr+=Lr*Yn,Zr+=Wr*po,Zr+=Br*fo,Zr+=tr*so,Zr+=ir*(5*Ro),vr=Zr>>>13,Zr&=8191,Zr+=Sr*(5*Co),Zr+=dr*(5*bo),Zr+=br*(5*xo),Zr+=$r*(5*_o),Zr+=no*(5*vo),vr+=Zr>>>13,Zr&=8191,Jr=vr,Jr+=Lr*vo,Jr+=Wr*Yn,Jr+=Br*po,Jr+=tr*fo,Jr+=ir*so,vr=Jr>>>13,Jr&=8191,Jr+=Sr*(5*Ro),Jr+=dr*(5*Co),Jr+=br*(5*bo),Jr+=$r*(5*xo),Jr+=no*(5*_o),vr+=Jr>>>13,Jr&=8191,wr=vr,wr+=Lr*_o,wr+=Wr*vo,wr+=Br*Yn,wr+=tr*po,wr+=ir*fo,vr=wr>>>13,wr&=8191,wr+=Sr*so,wr+=dr*(5*Ro),wr+=br*(5*Co),wr+=$r*(5*bo),wr+=no*(5*xo),vr+=wr>>>13,wr&=8191,Mr=vr,Mr+=Lr*xo,Mr+=Wr*_o,Mr+=Br*vo,Mr+=tr*Yn,Mr+=ir*po,vr=Mr>>>13,Mr&=8191,Mr+=Sr*fo,Mr+=dr*so,Mr+=br*(5*Ro),Mr+=$r*(5*Co),Mr+=no*(5*bo),vr+=Mr>>>13,Mr&=8191,Ur=vr,Ur+=Lr*bo,Ur+=Wr*xo,Ur+=Br*_o,Ur+=tr*vo,Ur+=ir*Yn,vr=Ur>>>13,Ur&=8191,Ur+=Sr*po,Ur+=dr*fo,Ur+=br*so,Ur+=$r*(5*Ro),Ur+=no*(5*Co),vr+=Ur>>>13,Ur&=8191,Rr=vr,Rr+=Lr*Co,Rr+=Wr*bo,Rr+=Br*xo,Rr+=tr*_o,Rr+=ir*vo,vr=Rr>>>13,Rr&=8191,Rr+=Sr*Yn,Rr+=dr*po,Rr+=br*fo,Rr+=$r*so,Rr+=no*(5*Ro),vr+=Rr>>>13,Rr&=8191,Pr=vr,Pr+=Lr*Ro,Pr+=Wr*Co,Pr+=Br*bo,Pr+=tr*xo,Pr+=ir*_o,vr=Pr>>>13,Pr&=8191,Pr+=Sr*vo,Pr+=dr*Yn,Pr+=br*po,Pr+=$r*fo,Pr+=no*so,vr+=Pr>>>13,Pr&=8191,vr=(vr<<2)+vr|0,vr=vr+Nr|0,Nr=vr&8191,vr=vr>>>13,Gr+=vr,Lr=Nr,Wr=Gr,Br=eo,tr=Zr,ir=Jr,Sr=wr,dr=Mr,br=Ur,$r=Rr,no=Pr,Mn+=16,dn-=16;this.h[0]=Lr,this.h[1]=Wr,this.h[2]=Br,this.h[3]=tr,this.h[4]=ir,this.h[5]=Sr,this.h[6]=dr,this.h[7]=br,this.h[8]=$r,this.h[9]=no},jt.prototype.finish=function(xn,Mn){var dn=new Uint16Array(10),Jt,En,Ln,Un;if(this.leftover){for(Un=this.leftover,this.buffer[Un++]=1;Un<16;Un++)this.buffer[Un]=0;this.fin=1,this.blocks(this.buffer,0,16)}for(Jt=this.h[1]>>>13,this.h[1]&=8191,Un=2;Un<10;Un++)this.h[Un]+=Jt,Jt=this.h[Un]>>>13,this.h[Un]&=8191;for(this.h[0]+=Jt*5,Jt=this.h[0]>>>13,this.h[0]&=8191,this.h[1]+=Jt,Jt=this.h[1]>>>13,this.h[1]&=8191,this.h[2]+=Jt,dn[0]=this.h[0]+5,Jt=dn[0]>>>13,dn[0]&=8191,Un=1;Un<10;Un++)dn[Un]=this.h[Un]+Jt,Jt=dn[Un]>>>13,dn[Un]&=8191;for(dn[9]-=8192,En=(Jt^1)-1,Un=0;Un<10;Un++)dn[Un]&=En;for(En=~En,Un=0;Un<10;Un++)this.h[Un]=this.h[Un]&En|dn[Un];for(this.h[0]=(this.h[0]|this.h[1]<<13)&65535,this.h[1]=(this.h[1]>>>3|this.h[2]<<10)&65535,this.h[2]=(this.h[2]>>>6|this.h[3]<<7)&65535,this.h[3]=(this.h[3]>>>9|this.h[4]<<4)&65535,this.h[4]=(this.h[4]>>>12|this.h[5]<<1|this.h[6]<<14)&65535,this.h[5]=(this.h[6]>>>2|this.h[7]<<11)&65535,this.h[6]=(this.h[7]>>>5|this.h[8]<<8)&65535,this.h[7]=(this.h[8]>>>8|this.h[9]<<5)&65535,Ln=this.h[0]+this.pad[0],this.h[0]=Ln&65535,Un=1;Un<8;Un++)Ln=(this.h[Un]+this.pad[Un]|0)+(Ln>>>16)|0,this.h[Un]=Ln&65535;xn[Mn+0]=this.h[0]>>>0&255,xn[Mn+1]=this.h[0]>>>8&255,xn[Mn+2]=this.h[1]>>>0&255,xn[Mn+3]=this.h[1]>>>8&255,xn[Mn+4]=this.h[2]>>>0&255,xn[Mn+5]=this.h[2]>>>8&255,xn[Mn+6]=this.h[3]>>>0&255,xn[Mn+7]=this.h[3]>>>8&255,xn[Mn+8]=this.h[4]>>>0&255,xn[Mn+9]=this.h[4]>>>8&255,xn[Mn+10]=this.h[5]>>>0&255,xn[Mn+11]=this.h[5]>>>8&255,xn[Mn+12]=this.h[6]>>>0&255,xn[Mn+13]=this.h[6]>>>8&255,xn[Mn+14]=this.h[7]>>>0&255,xn[Mn+15]=this.h[7]>>>8&255},jt.prototype.update=function(xn,Mn,dn){var Jt,En;if(this.leftover){for(En=16-this.leftover,En>dn&&(En=dn),Jt=0;Jt=16&&(En=dn-dn%16,this.blocks(xn,Mn,En),Mn+=En,dn-=En),dn){for(Jt=0;Jt>16&1),Ln[dn-1]&=65535;Ln[15]=Un[15]-32767-(Ln[14]>>16&1),En=Ln[15]>>16&1,Ln[14]&=65535,zt(Un,Ln,1-En)}for(dn=0;dn<16;dn++)xn[2*dn]=Un[dn]&255,xn[2*dn+1]=Un[dn]>>8}function Nt(xn,Mn){var dn=new Uint8Array(32),Jt=new Uint8Array(32);return Ft(dn,xn),Ft(Jt,Mn),bt(dn,0,Jt,0)}function Ut(xn){var Mn=new Uint8Array(32);return Ft(Mn,xn),Mn[0]&1}function Mt(xn,Mn){var dn;for(dn=0;dn<16;dn++)xn[dn]=Mn[2*dn]+(Mn[2*dn+1]<<8);xn[15]&=32767}function Ht(xn,Mn,dn){for(var Jt=0;Jt<16;Jt++)xn[Jt]=Mn[Jt]+dn[Jt]}function en(xn,Mn,dn){for(var Jt=0;Jt<16;Jt++)xn[Jt]=Mn[Jt]-dn[Jt]}function sn(xn,Mn,dn){var Jt,En,Ln=0,Un=0,Kn=0,nr=0,lr=0,cr=0,Hr=0,vr=0,Nr=0,Gr=0,eo=0,Zr=0,Jr=0,wr=0,Mr=0,Ur=0,Rr=0,Pr=0,Lr=0,Wr=0,Br=0,tr=0,ir=0,Sr=0,dr=0,br=0,$r=0,no=0,so=0,fo=0,po=0,Yn=dn[0],vo=dn[1],_o=dn[2],xo=dn[3],bo=dn[4],Co=dn[5],Ro=dn[6],Wo=dn[7],Po=dn[8],Fo=dn[9],Go=dn[10],Xo=dn[11],ga=dn[12],na=dn[13],$a=dn[14],Zo=dn[15];Jt=Mn[0],Ln+=Jt*Yn,Un+=Jt*vo,Kn+=Jt*_o,nr+=Jt*xo,lr+=Jt*bo,cr+=Jt*Co,Hr+=Jt*Ro,vr+=Jt*Wo,Nr+=Jt*Po,Gr+=Jt*Fo,eo+=Jt*Go,Zr+=Jt*Xo,Jr+=Jt*ga,wr+=Jt*na,Mr+=Jt*$a,Ur+=Jt*Zo,Jt=Mn[1],Un+=Jt*Yn,Kn+=Jt*vo,nr+=Jt*_o,lr+=Jt*xo,cr+=Jt*bo,Hr+=Jt*Co,vr+=Jt*Ro,Nr+=Jt*Wo,Gr+=Jt*Po,eo+=Jt*Fo,Zr+=Jt*Go,Jr+=Jt*Xo,wr+=Jt*ga,Mr+=Jt*na,Ur+=Jt*$a,Rr+=Jt*Zo,Jt=Mn[2],Kn+=Jt*Yn,nr+=Jt*vo,lr+=Jt*_o,cr+=Jt*xo,Hr+=Jt*bo,vr+=Jt*Co,Nr+=Jt*Ro,Gr+=Jt*Wo,eo+=Jt*Po,Zr+=Jt*Fo,Jr+=Jt*Go,wr+=Jt*Xo,Mr+=Jt*ga,Ur+=Jt*na,Rr+=Jt*$a,Pr+=Jt*Zo,Jt=Mn[3],nr+=Jt*Yn,lr+=Jt*vo,cr+=Jt*_o,Hr+=Jt*xo,vr+=Jt*bo,Nr+=Jt*Co,Gr+=Jt*Ro,eo+=Jt*Wo,Zr+=Jt*Po,Jr+=Jt*Fo,wr+=Jt*Go,Mr+=Jt*Xo,Ur+=Jt*ga,Rr+=Jt*na,Pr+=Jt*$a,Lr+=Jt*Zo,Jt=Mn[4],lr+=Jt*Yn,cr+=Jt*vo,Hr+=Jt*_o,vr+=Jt*xo,Nr+=Jt*bo,Gr+=Jt*Co,eo+=Jt*Ro,Zr+=Jt*Wo,Jr+=Jt*Po,wr+=Jt*Fo,Mr+=Jt*Go,Ur+=Jt*Xo,Rr+=Jt*ga,Pr+=Jt*na,Lr+=Jt*$a,Wr+=Jt*Zo,Jt=Mn[5],cr+=Jt*Yn,Hr+=Jt*vo,vr+=Jt*_o,Nr+=Jt*xo,Gr+=Jt*bo,eo+=Jt*Co,Zr+=Jt*Ro,Jr+=Jt*Wo,wr+=Jt*Po,Mr+=Jt*Fo,Ur+=Jt*Go,Rr+=Jt*Xo,Pr+=Jt*ga,Lr+=Jt*na,Wr+=Jt*$a,Br+=Jt*Zo,Jt=Mn[6],Hr+=Jt*Yn,vr+=Jt*vo,Nr+=Jt*_o,Gr+=Jt*xo,eo+=Jt*bo,Zr+=Jt*Co,Jr+=Jt*Ro,wr+=Jt*Wo,Mr+=Jt*Po,Ur+=Jt*Fo,Rr+=Jt*Go,Pr+=Jt*Xo,Lr+=Jt*ga,Wr+=Jt*na,Br+=Jt*$a,tr+=Jt*Zo,Jt=Mn[7],vr+=Jt*Yn,Nr+=Jt*vo,Gr+=Jt*_o,eo+=Jt*xo,Zr+=Jt*bo,Jr+=Jt*Co,wr+=Jt*Ro,Mr+=Jt*Wo,Ur+=Jt*Po,Rr+=Jt*Fo,Pr+=Jt*Go,Lr+=Jt*Xo,Wr+=Jt*ga,Br+=Jt*na,tr+=Jt*$a,ir+=Jt*Zo,Jt=Mn[8],Nr+=Jt*Yn,Gr+=Jt*vo,eo+=Jt*_o,Zr+=Jt*xo,Jr+=Jt*bo,wr+=Jt*Co,Mr+=Jt*Ro,Ur+=Jt*Wo,Rr+=Jt*Po,Pr+=Jt*Fo,Lr+=Jt*Go,Wr+=Jt*Xo,Br+=Jt*ga,tr+=Jt*na,ir+=Jt*$a,Sr+=Jt*Zo,Jt=Mn[9],Gr+=Jt*Yn,eo+=Jt*vo,Zr+=Jt*_o,Jr+=Jt*xo,wr+=Jt*bo,Mr+=Jt*Co,Ur+=Jt*Ro,Rr+=Jt*Wo,Pr+=Jt*Po,Lr+=Jt*Fo,Wr+=Jt*Go,Br+=Jt*Xo,tr+=Jt*ga,ir+=Jt*na,Sr+=Jt*$a,dr+=Jt*Zo,Jt=Mn[10],eo+=Jt*Yn,Zr+=Jt*vo,Jr+=Jt*_o,wr+=Jt*xo,Mr+=Jt*bo,Ur+=Jt*Co,Rr+=Jt*Ro,Pr+=Jt*Wo,Lr+=Jt*Po,Wr+=Jt*Fo,Br+=Jt*Go,tr+=Jt*Xo,ir+=Jt*ga,Sr+=Jt*na,dr+=Jt*$a,br+=Jt*Zo,Jt=Mn[11],Zr+=Jt*Yn,Jr+=Jt*vo,wr+=Jt*_o,Mr+=Jt*xo,Ur+=Jt*bo,Rr+=Jt*Co,Pr+=Jt*Ro,Lr+=Jt*Wo,Wr+=Jt*Po,Br+=Jt*Fo,tr+=Jt*Go,ir+=Jt*Xo,Sr+=Jt*ga,dr+=Jt*na,br+=Jt*$a,$r+=Jt*Zo,Jt=Mn[12],Jr+=Jt*Yn,wr+=Jt*vo,Mr+=Jt*_o,Ur+=Jt*xo,Rr+=Jt*bo,Pr+=Jt*Co,Lr+=Jt*Ro,Wr+=Jt*Wo,Br+=Jt*Po,tr+=Jt*Fo,ir+=Jt*Go,Sr+=Jt*Xo,dr+=Jt*ga,br+=Jt*na,$r+=Jt*$a,no+=Jt*Zo,Jt=Mn[13],wr+=Jt*Yn,Mr+=Jt*vo,Ur+=Jt*_o,Rr+=Jt*xo,Pr+=Jt*bo,Lr+=Jt*Co,Wr+=Jt*Ro,Br+=Jt*Wo,tr+=Jt*Po,ir+=Jt*Fo,Sr+=Jt*Go,dr+=Jt*Xo,br+=Jt*ga,$r+=Jt*na,no+=Jt*$a,so+=Jt*Zo,Jt=Mn[14],Mr+=Jt*Yn,Ur+=Jt*vo,Rr+=Jt*_o,Pr+=Jt*xo,Lr+=Jt*bo,Wr+=Jt*Co,Br+=Jt*Ro,tr+=Jt*Wo,ir+=Jt*Po,Sr+=Jt*Fo,dr+=Jt*Go,br+=Jt*Xo,$r+=Jt*ga,no+=Jt*na,so+=Jt*$a,fo+=Jt*Zo,Jt=Mn[15],Ur+=Jt*Yn,Rr+=Jt*vo,Pr+=Jt*_o,Lr+=Jt*xo,Wr+=Jt*bo,Br+=Jt*Co,tr+=Jt*Ro,ir+=Jt*Wo,Sr+=Jt*Po,dr+=Jt*Fo,br+=Jt*Go,$r+=Jt*Xo,no+=Jt*ga,so+=Jt*na,fo+=Jt*$a,po+=Jt*Zo,Ln+=38*Rr,Un+=38*Pr,Kn+=38*Lr,nr+=38*Wr,lr+=38*Br,cr+=38*tr,Hr+=38*ir,vr+=38*Sr,Nr+=38*dr,Gr+=38*br,eo+=38*$r,Zr+=38*no,Jr+=38*so,wr+=38*fo,Mr+=38*po,En=1,Jt=Ln+En+65535,En=Math.floor(Jt/65536),Ln=Jt-En*65536,Jt=Un+En+65535,En=Math.floor(Jt/65536),Un=Jt-En*65536,Jt=Kn+En+65535,En=Math.floor(Jt/65536),Kn=Jt-En*65536,Jt=nr+En+65535,En=Math.floor(Jt/65536),nr=Jt-En*65536,Jt=lr+En+65535,En=Math.floor(Jt/65536),lr=Jt-En*65536,Jt=cr+En+65535,En=Math.floor(Jt/65536),cr=Jt-En*65536,Jt=Hr+En+65535,En=Math.floor(Jt/65536),Hr=Jt-En*65536,Jt=vr+En+65535,En=Math.floor(Jt/65536),vr=Jt-En*65536,Jt=Nr+En+65535,En=Math.floor(Jt/65536),Nr=Jt-En*65536,Jt=Gr+En+65535,En=Math.floor(Jt/65536),Gr=Jt-En*65536,Jt=eo+En+65535,En=Math.floor(Jt/65536),eo=Jt-En*65536,Jt=Zr+En+65535,En=Math.floor(Jt/65536),Zr=Jt-En*65536,Jt=Jr+En+65535,En=Math.floor(Jt/65536),Jr=Jt-En*65536,Jt=wr+En+65535,En=Math.floor(Jt/65536),wr=Jt-En*65536,Jt=Mr+En+65535,En=Math.floor(Jt/65536),Mr=Jt-En*65536,Jt=Ur+En+65535,En=Math.floor(Jt/65536),Ur=Jt-En*65536,Ln+=En-1+37*(En-1),En=1,Jt=Ln+En+65535,En=Math.floor(Jt/65536),Ln=Jt-En*65536,Jt=Un+En+65535,En=Math.floor(Jt/65536),Un=Jt-En*65536,Jt=Kn+En+65535,En=Math.floor(Jt/65536),Kn=Jt-En*65536,Jt=nr+En+65535,En=Math.floor(Jt/65536),nr=Jt-En*65536,Jt=lr+En+65535,En=Math.floor(Jt/65536),lr=Jt-En*65536,Jt=cr+En+65535,En=Math.floor(Jt/65536),cr=Jt-En*65536,Jt=Hr+En+65535,En=Math.floor(Jt/65536),Hr=Jt-En*65536,Jt=vr+En+65535,En=Math.floor(Jt/65536),vr=Jt-En*65536,Jt=Nr+En+65535,En=Math.floor(Jt/65536),Nr=Jt-En*65536,Jt=Gr+En+65535,En=Math.floor(Jt/65536),Gr=Jt-En*65536,Jt=eo+En+65535,En=Math.floor(Jt/65536),eo=Jt-En*65536,Jt=Zr+En+65535,En=Math.floor(Jt/65536),Zr=Jt-En*65536,Jt=Jr+En+65535,En=Math.floor(Jt/65536),Jr=Jt-En*65536,Jt=wr+En+65535,En=Math.floor(Jt/65536),wr=Jt-En*65536,Jt=Mr+En+65535,En=Math.floor(Jt/65536),Mr=Jt-En*65536,Jt=Ur+En+65535,En=Math.floor(Jt/65536),Ur=Jt-En*65536,Ln+=En-1+37*(En-1),xn[0]=Ln,xn[1]=Un,xn[2]=Kn,xn[3]=nr,xn[4]=lr,xn[5]=cr,xn[6]=Hr,xn[7]=vr,xn[8]=Nr,xn[9]=Gr,xn[10]=eo,xn[11]=Zr,xn[12]=Jr,xn[13]=wr,xn[14]=Mr,xn[15]=Ur}function Kt(xn,Mn){sn(xn,Mn,Mn)}function rn(xn,Mn){var dn=nt(),Jt;for(Jt=0;Jt<16;Jt++)dn[Jt]=Mn[Jt];for(Jt=253;Jt>=0;Jt--)Kt(dn,dn),Jt!==2&&Jt!==4&&sn(dn,dn,Mn);for(Jt=0;Jt<16;Jt++)xn[Jt]=dn[Jt]}function nn(xn,Mn){var dn=nt(),Jt;for(Jt=0;Jt<16;Jt++)dn[Jt]=Mn[Jt];for(Jt=250;Jt>=0;Jt--)Kt(dn,dn),Jt!==1&&sn(dn,dn,Mn);for(Jt=0;Jt<16;Jt++)xn[Jt]=dn[Jt]}function hn(xn,Mn,dn){var Jt=new Uint8Array(32),En=new Float64Array(80),Ln,Un,Kn=nt(),nr=nt(),lr=nt(),cr=nt(),Hr=nt(),vr=nt();for(Un=0;Un<31;Un++)Jt[Un]=Mn[Un];for(Jt[31]=Mn[31]&127|64,Jt[0]&=248,Mt(En,dn),Un=0;Un<16;Un++)nr[Un]=En[Un],cr[Un]=Kn[Un]=lr[Un]=0;for(Kn[0]=cr[0]=1,Un=254;Un>=0;--Un)Ln=Jt[Un>>>3]>>>(Un&7)&1,zt(Kn,nr,Ln),zt(lr,cr,Ln),Ht(Hr,Kn,lr),en(Kn,Kn,lr),Ht(lr,nr,cr),en(nr,nr,cr),Kt(cr,Hr),Kt(vr,Kn),sn(Kn,lr,Kn),sn(lr,nr,Hr),Ht(Hr,Kn,lr),en(Kn,Kn,lr),Kt(nr,Kn),en(lr,cr,vr),sn(Kn,lr,lt),Ht(Kn,Kn,cr),sn(lr,lr,Kn),sn(Kn,cr,vr),sn(cr,nr,En),Kt(nr,Hr),zt(Kn,nr,Ln),zt(lr,cr,Ln);for(Un=0;Un<16;Un++)En[Un+16]=Kn[Un],En[Un+32]=lr[Un],En[Un+48]=nr[Un],En[Un+64]=cr[Un];var Nr=En.subarray(32),Gr=En.subarray(16);return rn(Nr,Nr),sn(Gr,Gr,Nr),Ft(xn,Gr),0}function vn(xn,Mn){return hn(xn,Mn,ot)}function an(xn,Mn){return rt(Mn,32),vn(xn,Mn)}function Qt(xn,Mn,dn){var Jt=new Uint8Array(32);return hn(Jt,dn,Mn),St(xn,it,Jt,Tt)}var _n=wt,Pn=It;function $n(xn,Mn,dn,Jt,En,Ln){var Un=new Uint8Array(32);return Qt(Un,En,Ln),_n(xn,Mn,dn,Jt,Un)}function Nn(xn,Mn,dn,Jt,En,Ln){var Un=new Uint8Array(32);return Qt(Un,En,Ln),Pn(xn,Mn,dn,Jt,Un)}var Tn=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function cn(xn,Mn,dn,Jt){for(var En=new Int32Array(16),Ln=new Int32Array(16),Un,Kn,nr,lr,cr,Hr,vr,Nr,Gr,eo,Zr,Jr,wr,Mr,Ur,Rr,Pr,Lr,Wr,Br,tr,ir,Sr,dr,br,$r,no=xn[0],so=xn[1],fo=xn[2],po=xn[3],Yn=xn[4],vo=xn[5],_o=xn[6],xo=xn[7],bo=Mn[0],Co=Mn[1],Ro=Mn[2],Wo=Mn[3],Po=Mn[4],Fo=Mn[5],Go=Mn[6],Xo=Mn[7],ga=0;Jt>=128;){for(Wr=0;Wr<16;Wr++)Br=8*Wr+ga,En[Wr]=dn[Br+0]<<24|dn[Br+1]<<16|dn[Br+2]<<8|dn[Br+3],Ln[Wr]=dn[Br+4]<<24|dn[Br+5]<<16|dn[Br+6]<<8|dn[Br+7];for(Wr=0;Wr<80;Wr++)if(Un=no,Kn=so,nr=fo,lr=po,cr=Yn,Hr=vo,vr=_o,Nr=xo,Gr=bo,eo=Co,Zr=Ro,Jr=Wo,wr=Po,Mr=Fo,Ur=Go,Rr=Xo,tr=xo,ir=Xo,Sr=ir&65535,dr=ir>>>16,br=tr&65535,$r=tr>>>16,tr=(Yn>>>14|Po<<32-14)^(Yn>>>18|Po<<32-18)^(Po>>>41-32|Yn<<32-(41-32)),ir=(Po>>>14|Yn<<32-14)^(Po>>>18|Yn<<32-18)^(Yn>>>41-32|Po<<32-(41-32)),Sr+=ir&65535,dr+=ir>>>16,br+=tr&65535,$r+=tr>>>16,tr=Yn&vo^~Yn&_o,ir=Po&Fo^~Po&Go,Sr+=ir&65535,dr+=ir>>>16,br+=tr&65535,$r+=tr>>>16,tr=Tn[Wr*2],ir=Tn[Wr*2+1],Sr+=ir&65535,dr+=ir>>>16,br+=tr&65535,$r+=tr>>>16,tr=En[Wr%16],ir=Ln[Wr%16],Sr+=ir&65535,dr+=ir>>>16,br+=tr&65535,$r+=tr>>>16,dr+=Sr>>>16,br+=dr>>>16,$r+=br>>>16,Pr=br&65535|$r<<16,Lr=Sr&65535|dr<<16,tr=Pr,ir=Lr,Sr=ir&65535,dr=ir>>>16,br=tr&65535,$r=tr>>>16,tr=(no>>>28|bo<<32-28)^(bo>>>34-32|no<<32-(34-32))^(bo>>>39-32|no<<32-(39-32)),ir=(bo>>>28|no<<32-28)^(no>>>34-32|bo<<32-(34-32))^(no>>>39-32|bo<<32-(39-32)),Sr+=ir&65535,dr+=ir>>>16,br+=tr&65535,$r+=tr>>>16,tr=no&so^no&fo^so&fo,ir=bo&Co^bo&Ro^Co&Ro,Sr+=ir&65535,dr+=ir>>>16,br+=tr&65535,$r+=tr>>>16,dr+=Sr>>>16,br+=dr>>>16,$r+=br>>>16,Nr=br&65535|$r<<16,Rr=Sr&65535|dr<<16,tr=lr,ir=Jr,Sr=ir&65535,dr=ir>>>16,br=tr&65535,$r=tr>>>16,tr=Pr,ir=Lr,Sr+=ir&65535,dr+=ir>>>16,br+=tr&65535,$r+=tr>>>16,dr+=Sr>>>16,br+=dr>>>16,$r+=br>>>16,lr=br&65535|$r<<16,Jr=Sr&65535|dr<<16,so=Un,fo=Kn,po=nr,Yn=lr,vo=cr,_o=Hr,xo=vr,no=Nr,Co=Gr,Ro=eo,Wo=Zr,Po=Jr,Fo=wr,Go=Mr,Xo=Ur,bo=Rr,Wr%16===15)for(Br=0;Br<16;Br++)tr=En[Br],ir=Ln[Br],Sr=ir&65535,dr=ir>>>16,br=tr&65535,$r=tr>>>16,tr=En[(Br+9)%16],ir=Ln[(Br+9)%16],Sr+=ir&65535,dr+=ir>>>16,br+=tr&65535,$r+=tr>>>16,Pr=En[(Br+1)%16],Lr=Ln[(Br+1)%16],tr=(Pr>>>1|Lr<<32-1)^(Pr>>>8|Lr<<32-8)^Pr>>>7,ir=(Lr>>>1|Pr<<32-1)^(Lr>>>8|Pr<<32-8)^(Lr>>>7|Pr<<32-7),Sr+=ir&65535,dr+=ir>>>16,br+=tr&65535,$r+=tr>>>16,Pr=En[(Br+14)%16],Lr=Ln[(Br+14)%16],tr=(Pr>>>19|Lr<<32-19)^(Lr>>>61-32|Pr<<32-(61-32))^Pr>>>6,ir=(Lr>>>19|Pr<<32-19)^(Pr>>>61-32|Lr<<32-(61-32))^(Lr>>>6|Pr<<32-6),Sr+=ir&65535,dr+=ir>>>16,br+=tr&65535,$r+=tr>>>16,dr+=Sr>>>16,br+=dr>>>16,$r+=br>>>16,En[Br]=br&65535|$r<<16,Ln[Br]=Sr&65535|dr<<16;tr=no,ir=bo,Sr=ir&65535,dr=ir>>>16,br=tr&65535,$r=tr>>>16,tr=xn[0],ir=Mn[0],Sr+=ir&65535,dr+=ir>>>16,br+=tr&65535,$r+=tr>>>16,dr+=Sr>>>16,br+=dr>>>16,$r+=br>>>16,xn[0]=no=br&65535|$r<<16,Mn[0]=bo=Sr&65535|dr<<16,tr=so,ir=Co,Sr=ir&65535,dr=ir>>>16,br=tr&65535,$r=tr>>>16,tr=xn[1],ir=Mn[1],Sr+=ir&65535,dr+=ir>>>16,br+=tr&65535,$r+=tr>>>16,dr+=Sr>>>16,br+=dr>>>16,$r+=br>>>16,xn[1]=so=br&65535|$r<<16,Mn[1]=Co=Sr&65535|dr<<16,tr=fo,ir=Ro,Sr=ir&65535,dr=ir>>>16,br=tr&65535,$r=tr>>>16,tr=xn[2],ir=Mn[2],Sr+=ir&65535,dr+=ir>>>16,br+=tr&65535,$r+=tr>>>16,dr+=Sr>>>16,br+=dr>>>16,$r+=br>>>16,xn[2]=fo=br&65535|$r<<16,Mn[2]=Ro=Sr&65535|dr<<16,tr=po,ir=Wo,Sr=ir&65535,dr=ir>>>16,br=tr&65535,$r=tr>>>16,tr=xn[3],ir=Mn[3],Sr+=ir&65535,dr+=ir>>>16,br+=tr&65535,$r+=tr>>>16,dr+=Sr>>>16,br+=dr>>>16,$r+=br>>>16,xn[3]=po=br&65535|$r<<16,Mn[3]=Wo=Sr&65535|dr<<16,tr=Yn,ir=Po,Sr=ir&65535,dr=ir>>>16,br=tr&65535,$r=tr>>>16,tr=xn[4],ir=Mn[4],Sr+=ir&65535,dr+=ir>>>16,br+=tr&65535,$r+=tr>>>16,dr+=Sr>>>16,br+=dr>>>16,$r+=br>>>16,xn[4]=Yn=br&65535|$r<<16,Mn[4]=Po=Sr&65535|dr<<16,tr=vo,ir=Fo,Sr=ir&65535,dr=ir>>>16,br=tr&65535,$r=tr>>>16,tr=xn[5],ir=Mn[5],Sr+=ir&65535,dr+=ir>>>16,br+=tr&65535,$r+=tr>>>16,dr+=Sr>>>16,br+=dr>>>16,$r+=br>>>16,xn[5]=vo=br&65535|$r<<16,Mn[5]=Fo=Sr&65535|dr<<16,tr=_o,ir=Go,Sr=ir&65535,dr=ir>>>16,br=tr&65535,$r=tr>>>16,tr=xn[6],ir=Mn[6],Sr+=ir&65535,dr+=ir>>>16,br+=tr&65535,$r+=tr>>>16,dr+=Sr>>>16,br+=dr>>>16,$r+=br>>>16,xn[6]=_o=br&65535|$r<<16,Mn[6]=Go=Sr&65535|dr<<16,tr=xo,ir=Xo,Sr=ir&65535,dr=ir>>>16,br=tr&65535,$r=tr>>>16,tr=xn[7],ir=Mn[7],Sr+=ir&65535,dr+=ir>>>16,br+=tr&65535,$r+=tr>>>16,dr+=Sr>>>16,br+=dr>>>16,$r+=br>>>16,xn[7]=xo=br&65535|$r<<16,Mn[7]=Xo=Sr&65535|dr<<16,ga+=128,Jt-=128}return Jt}function mn(xn,Mn,dn){var Jt=new Int32Array(8),En=new Int32Array(8),Ln=new Uint8Array(256),Un,Kn=dn;for(Jt[0]=1779033703,Jt[1]=3144134277,Jt[2]=1013904242,Jt[3]=2773480762,Jt[4]=1359893119,Jt[5]=2600822924,Jt[6]=528734635,Jt[7]=1541459225,En[0]=4089235720,En[1]=2227873595,En[2]=4271175723,En[3]=1595750129,En[4]=2917565137,En[5]=725511199,En[6]=4215389547,En[7]=327033209,cn(Jt,En,Mn,dn),dn%=128,Un=0;Un=0;--En)Jt=dn[En/8|0]>>(En&7)&1,An(xn,Mn,Jt),In(Mn,xn),In(xn,xn),An(xn,Mn,Jt)}function pn(xn,Mn){var dn=[nt(),nt(),nt(),nt()];Ot(dn[0],ht),Ot(dn[1],dt),Ot(dn[2],st),sn(dn[3],ht,dt),fn(xn,dn,Mn)}function kn(xn,Mn,dn){var Jt=new Uint8Array(64),En=[nt(),nt(),nt(),nt()],Ln;for(dn||rt(Mn,32),mn(Jt,Mn,32),Jt[0]&=248,Jt[31]&=127,Jt[31]|=64,pn(En,Jt),wn(xn,En),Ln=0;Ln<32;Ln++)Mn[Ln+32]=xn[Ln];return 0}var Dn=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]);function un(xn,Mn){var dn,Jt,En,Ln;for(Jt=63;Jt>=32;--Jt){for(dn=0,En=Jt-32,Ln=Jt-12;En>4)*Dn[En],dn=Mn[En]>>8,Mn[En]&=255;for(En=0;En<32;En++)Mn[En]-=dn*Dn[En];for(Jt=0;Jt<32;Jt++)Mn[Jt+1]+=Mn[Jt]>>8,xn[Jt]=Mn[Jt]&255}function Zt(xn){var Mn=new Float64Array(64),dn;for(dn=0;dn<64;dn++)Mn[dn]=xn[dn];for(dn=0;dn<64;dn++)xn[dn]=0;un(xn,Mn)}function Xt(xn,Mn,dn,Jt){var En=new Uint8Array(64),Ln=new Uint8Array(64),Un=new Uint8Array(64),Kn,nr,lr=new Float64Array(64),cr=[nt(),nt(),nt(),nt()];mn(En,Jt,32),En[0]&=248,En[31]&=127,En[31]|=64;var Hr=dn+64;for(Kn=0;Kn>7&&en(xn[0],at,xn[0]),sn(xn[3],xn[0],xn[1]),0)}function Rn(xn,Mn,dn,Jt){var En,Ln=new Uint8Array(32),Un=new Uint8Array(64),Kn=[nt(),nt(),nt(),nt()],nr=[nt(),nt(),nt(),nt()];if(dn<64||Sn(nr,Jt))return-1;for(En=0;En=0},et.sign.keyPair=function(){var xn=new Uint8Array(Ar),Mn=new Uint8Array(qr);return kn(xn,Mn),{publicKey:xn,secretKey:Mn}},et.sign.keyPair.fromSecretKey=function(xn){if(Dr(xn),xn.length!==qr)throw new Error("bad secret key size");for(var Mn=new Uint8Array(Ar),dn=0;dn"u"?typeof Buffer.from<"u"?(et.encodeBase64=function(rt){return Buffer.from(rt).toString("base64")},et.decodeBase64=function(rt){return nt(rt),new Uint8Array(Array.prototype.slice.call(Buffer.from(rt,"base64"),0))}):(et.encodeBase64=function(rt){return new Buffer(rt).toString("base64")},et.decodeBase64=function(rt){return nt(rt),new Uint8Array(Array.prototype.slice.call(new Buffer(rt,"base64"),0))}):(et.encodeBase64=function(rt){var it,ot=[],at=rt.length;for(it=0;itgt||mn<0)throw new RangeError(`varint ${mn} out of range`);this._grow(this._length+vt);let In=this._length;for(;mn>=128;)this._buf[In++]=mn&255|128,mn>>>=7;this._buf[In++]=mn|0,this._length=In}get bytes(){return this._buf.subarray(0,this._length)}_grow(mn){const In=this._buf.length;if(mn<=In)return;const An=In*2,wn=mn>An?mn:An,fn=new Uint8Array(wn);fn.set(this._buf.subarray(0,this._length)),this._buf=fn}}const vt=5;class xt{constructor(mn){this._buf=mn,this._index=0}readByte(){if(this.length<=0)throw new RangeError("Read past end of buffer");return this._buf[this._index++]}peekByte(){if(this.length<=0)throw new RangeError("Read past end of buffer");return this._buf[this._index]}readN(mn){if(this.lengthvt||pn===vt&&fn>1)throw new RangeError("Overflow error decoding varint");return(In|fn<>>0}In|=(fn&127)<cn!=null,St=cn=>kt(cn)?st.encode(cn):cn,Tt=cn=>kt(cn)?lt.decode(cn):cn,At=cn=>nt.default.codec.utf8String.fromBits(cn);tt.base64ToBytes=function(cn){return cn=cn.replace(/-/g,"+").replace(/_/g,"/"),cn.length%4!==0&&!cn.match(/=$/)&&(cn+="=".repeat(4-cn.length%4)),it.default.decodeBase64(cn)},tt.bytesToBase64=function(cn){return it.default.encodeBase64(cn).replace(/=+$/,"").replace(/\+/g,"-").replace(/\//g,"_")};const Et=function(cn){return nt.default.codec.base64.toBits(it.default.encodeBase64(cn))},$t=function(cn){return it.default.decodeBase64(nt.default.codec.base64.fromBits(cn))},Dt=function(cn){const mn=new Uint8Array(Math.ceil(cn.length/2));for(let In=0;Inkt(cn)?Pt(cn,mn):"",wt=function(cn,mn){if(cn instanceof Uint8Array)return cn;if(typeof cn=="string")return St(cn);throw new TypeError(`${mn} has the wrong type; want string or Uint8Array, got ${typeof cn}.`)},It=new Uint8Array,Ot=function(cn,mn){const In=cn.readByte();if(In!==mn)throw new Error(`Unexpected field type, got ${In} want ${mn}`);return In===ut?It:cn.readN(cn.readUvarint())},Wt=function(cn,mn,In){cn.appendByte(mn),mn!==ut&&(cn.appendUvarint(In.length),cn.appendBytes(In))},zt=function(cn,mn){return cn.peekByte()!==mn?null:Ot(cn,mn)},Ft=function(cn,mn,In){jt(In)?cn[mn]=Tt(In):cn[mn+"64"]=tt.bytesToBase64(In)},Nt=function(cn,mn){const In=new nt.default.misc.hmac(cn,nt.default.hash.sha256);return In.update(mn),In.digest()},Ut=function(cn,mn,In){const An=Nt(cn,mn),wn=Nt(cn,In);return Nt(cn,nt.default.bitArray.concat(An,wn))},Mt=Et(St("macaroons-key-generator")),Ht=function(cn){return Nt(Mt,cn)},en=function(){return rt.default.randomBytes(ct)},sn=function(cn,mn){const In=$t(cn),An=$t(mn),wn=en(),fn=rt.default.secretbox(An,wn,In),pn=new Uint8Array(wn.length+fn.length);return pn.set(wn,0),pn.set(fn,wn.length),Et(pn)},Kt=function(cn,mn){const In=$t(cn),An=$t(mn),wn=An.slice(0,ct),fn=An.slice(ct);let pn=rt.default.secretbox.open(fn,wn,In);if(!pn)throw new Error("decryption failed");return Et(pn)},rn=Et(St("\0".repeat(32))),nn=function(cn,mn){return nt.default.bitArray.equal(cn,mn)?cn:Ut(rn,cn,mn)};class hn{constructor(mn){if(!mn)return;let{version:In,identifierBytes:An,locationStr:wn,caveats:fn,signatureBytes:pn}=mn;if(In!==1&&In!==2)throw new Error(`Unexpected version ${In}`);if(this._version=In,this._locationStr=wn,An=wt(An,"Identifier"),In===1&&!jt(An))throw new Error("Version 1 macaroon identifier must be well-formed UTF-8");this._identifierBits=An&&Et(An),this._signatureBits=pn&&Et(wt(pn,"Signature")),this._caveats=fn?fn.map(kn=>{const Dn=wt(kn.identifierBytes,"Caveat identifier");if(In===1&&!jt(Dn))throw new Error("Version 1 caveat identifier must be well-formed UTF-8");return{_locationStr:Ct(kn.locationStr),_identifierBits:Et(Dn),_vidBits:kn.vidBytes&&Et(wt(kn.vidBytes,"Verification ID"))}}):[]}get caveats(){return this._caveats.map(mn=>kt(mn._vidBits)?{identifier:$t(mn._identifierBits),location:mn._locationStr,vid:$t(mn._vidBits)}:{identifier:$t(mn._identifierBits)})}get location(){return this._locationStr}get identifier(){return $t(this._identifierBits)}get signature(){return $t(this._signatureBits)}addThirdPartyCaveat(mn,In,An){const wn={_identifierBits:Et(wt(In,"Caveat id")),_vidBits:sn(this._signatureBits,Ht(Et(wt(mn,"Caveat root key")))),_locationStr:Ct(An)};this._signatureBits=Ut(this._signatureBits,wn._vidBits,wn._identifierBits),this._caveats.push(wn)}addFirstPartyCaveat(mn){const In=Et(wt(mn,"Condition"));this._caveats.push({_identifierBits:In}),this._signatureBits=Nt(this._signatureBits,In)}bindToRoot(mn){const In=Et(wt(mn,"Primary macaroon signature"));this._signatureBits=nn(In,this._signatureBits)}clone(){const mn=new hn;return mn._version=this._version,mn._signatureBits=this._signatureBits,mn._identifierBits=this._identifierBits,mn._locationStr=this._locationStr,mn._caveats=this._caveats.slice(),mn}verify(mn,In,An=[]){const wn=Ht(Et(wt(mn,"Root key"))),fn=An.map(pn=>0);this._verify(this._signatureBits,wn,In,An,fn),An.forEach((pn,kn)=>{if(fn[kn]===0)throw new Error(`discharge macaroon ${yt(pn.identifier)} was not used`);if(fn[kn]!==1)throw new Error(`discharge macaroon ${yt(pn.identifier)} was used more than once`)})}_verify(mn,In,An,wn,fn){let pn=Nt(In,this._identifierBits);this._caveats.forEach(Dn=>{if(Dn._vidBits){const un=Kt(pn,Dn._vidBits);let Zt=!1,Xt,Sn;for(Xt=0;Xt1)throw new Error(`discharge macaroon ${yt(Sn.identifier)} was used more than once`);Sn._verify(mn,un,An,wn,fn);break}if(!Zt)throw new Error(`cannot find discharge macaroon for caveat ${yt(Dn._identifierBits)}`);pn=Ut(pn,Dn._vidBits,Dn._identifierBits)}else{const un=At(Dn._identifierBits),Zt=An(un);if(Zt)throw new Error(`caveat check failed (${un}): ${Zt}`);pn=Nt(pn,Dn._identifierBits)}});const kn=nn(mn,pn);if(!nt.default.bitArray.equal(kn,this._signatureBits))throw new Error("signature mismatch after caveat verification")}exportJSON(){switch(this._version){case 1:return this._exportAsJSONObjectV1();case 2:return this._exportAsJSONObjectV2();default:throw new Error(`unexpected macaroon version ${this._version}`)}}_exportAsJSONObjectV1(){const mn={identifier:At(this._identifierBits),signature:nt.default.codec.hex.fromBits(this._signatureBits)};return this._locationStr&&(mn.location=this._locationStr),this._caveats.length>0&&(mn.caveats=this._caveats.map(In=>{const An={cid:At(In._identifierBits)};return In._vidBits&&(An.vid=nt.default.codec.base64.fromBits(In._vidBits,!0,!0),An.cl=In._locationStr),An})),mn}_exportAsJSONObjectV2(){const mn={v:2};return Ft(mn,"s",$t(this._signatureBits)),Ft(mn,"i",$t(this._identifierBits)),this._locationStr&&(mn.l=this._locationStr),this._caveats&&this._caveats.length>0&&(mn.c=this._caveats.map(In=>{const An={};return Ft(An,"i",$t(In._identifierBits)),In._vidBits&&(Ft(An,"v",$t(In._vidBits)),An.l=In._locationStr),An})),mn}_exportBinaryV1(){throw new Error("V1 binary export not supported")}_exportBinaryV2(){const mn=new bt(200);return mn.appendByte(2),this._locationStr&&Wt(mn,ht,St(this._locationStr)),Wt(mn,dt,$t(this._identifierBits)),Wt(mn,ut),this._caveats.forEach(function(In){In._locationStr&&Wt(mn,ht,St(In._locationStr)),Wt(mn,dt,$t(In._identifierBits)),In._vidBits&&Wt(mn,pt,$t(In._vidBits)),Wt(mn,ut)}),Wt(mn,ut),Wt(mn,mt,$t(this._signatureBits)),mn.bytes}exportBinary(){switch(this._version){case 1:return this._exportBinaryV1();case 2:return this._exportBinaryV2();default:throw new Error(`unexpected macaroon version ${this._version}`)}}}tt.importMacaroon=function(cn){if(typeof cn=="string"&&(cn=tt.base64ToBytes(cn)),cn instanceof Uint8Array){const mn=new xt(cn),In=Tn(mn);if(mn.length!==0)throw new TypeError("extra data found at end of serialized macaroon");return In}if(Array.isArray(cn))throw new TypeError("cannot import an array of macaroons as a single macaroon");return vn(cn)},tt.importMacaroons=function(cn){if(typeof cn=="string"&&(cn=tt.base64ToBytes(cn)),cn instanceof Uint8Array){if(cn.length===0)throw new TypeError("empty macaroon data");const mn=new xt(cn),In=[];do In.push(Tn(mn));while(mn.length>0);return In}return Array.isArray(cn)?cn.map(mn=>vn(mn)):[vn(cn)]};const vn=function(cn){return an(cn)?Qt(cn):_n(cn)};function an(cn){return kt(cn.signature)}const Qt=function(cn){const mn=cn.caveats&&cn.caveats.map(In=>{const An={identifierBytes:St(Pt(In.cid,"Caveat id")),locationStr:Ct(In.cl,"Caveat location")};return In.vid&&(An.vidBytes=tt.base64ToBytes(Pt(In.vid,"Caveat verification id"))),An});return new hn({version:1,locationStr:Ct(cn.location,"Macaroon location"),identifierBytes:St(Pt(cn.identifier,"Macaroon identifier")),caveats:mn,signatureBytes:Dt(cn.signature)})},_n=function(cn){if(cn.v!==2&&cn.v!==void 0)throw new Error(`Unsupported macaroon version ${cn.v}`);const mn={version:2,signatureBytes:Pn(cn,"s",!0),locationStr:Tt(Pn(cn,"l",!1)),identifierBytes:Pn(cn,"i",!0)};if(cn.c){if(!Array.isArray(cn.c))throw new Error("caveats field does not hold an array");mn.caveats=cn.c.map(In=>({identifierBytes:Pn(In,"i",!0),locationStr:Tt(Pn(In,"l")),vidBytes:Pn(In,"v",!1)}))}return new hn(mn)};function Pn(cn,mn,In){if(cn.hasOwnProperty(mn))return St(cn[mn]);const An=mn+"64";if(cn.hasOwnProperty(An))return tt.base64ToBytes(cn[An]);if(In)throw new Error("Expected key: "+mn);return null}const $n=function(cn){const mn=cn.readByte();if(mn!==2)throw new Error(`Only version 2 is supported, found version ${mn}`);const In=Tt(zt(cn,ht)),An=Ot(cn,dt),wn=[];for(Ot(cn,ut);!zt(cn,ut);){const pn={locationStr:Tt(zt(cn,ht)),identifierBytes:Ot(cn,dt),vidBytes:zt(cn,pt)};Ot(cn,ut),wn.push(pn)}const fn=Ot(cn,mt);if(cn.length!==0)throw new Error("unexpected extra data at end of macaroon");return new hn({version:mn,locationStr:In,identifierBytes:An,signatureBytes:fn,caveats:wn})},Nn=function(cn){return 48<=cn&&cn<=58||97<=cn&&cn<=102},Tn=function(cn){if(cn.length===0)throw new Error("Empty macaroon data");const mn=cn.peekByte();if(mn===2)return $n(cn);throw Nn(mn)?new Error("Version 1 binary format not supported"):new Error("Cannot determine data format of binary-encoded macaroon")};tt.newMacaroon=function({identifier:cn,location:mn,rootKey:In,version:An}){const wn=wt(cn,"Macaroon identifier"),fn=wt(In,"Macaroon root key");return new hn({version:An===void 0?2:An,identifierBytes:wn,locationStr:Ct(mn,"Macaroon location"),signatureBytes:$t(Nt(Ht(Et(fn)),Et(wn)))})},tt.dischargeMacaroon=function(cn,mn,In,An){const wn=cn.signature,fn=[cn];let pn=0,kn=!1;const Dn=cn.location,un=Sn=>{kn||(Sn.bindToRoot(wn),fn.push(Sn),pn--,Xt(Sn))},Zt=Sn=>{kn||(An(Sn),kn=!0)},Xt=Sn=>{let Rn,jn;for(jn=0;jntt.LATEST_VERSION)throw new ut(mt.version);if(mt.version&&(this.version=mt.version),ot(typeof this.version=="number","Identifier version must be a number"),ot(mt.paymentHash.length===32,`Expected 32-byte hash, instead got ${mt.paymentHash.length}`),this.paymentHash=mt.paymentHash,mt.tokenId)this.tokenId=mt.tokenId;else{const gt=(0,lt.default)();this.tokenId=st.default.createHash("sha256").update(Buffer.from(gt)).digest()}return ot(this.tokenId.length===tt.TOKEN_ID_SIZE,"Token Id of unexpected size"),this}toString(){return this.toHex()}static fromString(mt){try{return new this().fromHex(mt)}catch{return new this().fromBase64(mt)}}write(mt){switch(mt.writeU16BE(this.version),this.version){case 0:return mt.writeHash(this.paymentHash),ot(Buffer.isBuffer(this.tokenId)&&this.tokenId.length===tt.TOKEN_ID_SIZE,`Token ID must be ${tt.TOKEN_ID_SIZE}-byte hash`),mt.writeBytes(this.tokenId),this;default:throw new ut(this.version)}}read(mt){switch(this.version=mt.readU16BE(),this.version){case 0:return this.paymentHash=mt.readHash(),this.tokenId=mt.readBytes(tt.TOKEN_ID_SIZE),this;default:throw new ut(this.version)}}}tt.Identifier=ht;const dt=pt=>{const mt=ct.importMacaroon(pt);let gt=mt._exportAsJSONObjectV2().i;if(gt==null&&(gt=mt._exportAsJSONObjectV2().i64,gt==null))throw new Error("Problem parsing macaroon identifier");return gt};tt.decodeIdentifierFromMacaroon=dt})(identifier);var caveat={};/*! - * assert.js - assertions for javascript - * Copyright (c) 2018, Christopher Jeffrey (MIT License). - * https://github.com/chjj/bsert - */class AssertionError extends Error{constructor(et){typeof et=="string"&&(et={message:et}),(et===null||typeof et!="object")&&(et={});let nt=null,rt="fail",it=!!et.generatedMessage;if(et.message!=null&&(nt=toString$6(et.message)),typeof et.operator=="string"&&(rt=et.operator),nt==null){if(rt==="fail")nt="Assertion failed.";else{const at=stringify(et.actual),st=stringify(et.expected);nt=`${at} ${rt} ${st}`}it=!0}super(nt);let ot=this.constructor;typeof et.stackStartFunction=="function"?ot=et.stackStartFunction:typeof et.stackStartFn=="function"&&(ot=et.stackStartFn),this.type="AssertionError",this.name="AssertionError [ERR_ASSERTION]",this.code="ERR_ASSERTION",this.generatedMessage=it,this.actual=et.actual,this.expected=et.expected,this.operator=rt,Error.captureStackTrace&&Error.captureStackTrace(this,ot)}}function assert$4(tt,et){if(!tt){let nt=!1;if(arguments.length===0)et="No value argument passed to `assert()`.",nt=!0;else if(et==null)et="Assertion failed.",nt=!0;else if(isError(et))throw et;throw new AssertionError({message:et,actual:tt,expected:!0,operator:"==",generatedMessage:nt,stackStartFn:assert$4})}}function equal$1(tt,et,nt){if(!Object.is(tt,et))throw isError(nt)?nt:new AssertionError({message:nt,actual:tt,expected:et,operator:"strictEqual",stackStartFn:equal$1})}function notEqual(tt,et,nt){if(Object.is(tt,et))throw isError(nt)?nt:new AssertionError({message:nt,actual:tt,expected:et,operator:"notStrictEqual",stackStartFn:notEqual})}function fail(tt){let et=!1;throw isError(tt)?tt:(tt==null&&(tt="Assertion failed.",et=!0),new AssertionError({message:tt,actual:!1,expected:!0,operator:"fail",generatedMessage:et,stackStartFn:fail}))}function throws(tt,et,nt){typeof et=="string"&&(nt=et,et=void 0);let rt=!1,it=null;enforce(typeof tt=="function","func","function");try{tt()}catch(ot){rt=!0,it=ot}if(!rt){let ot=!1;throw nt==null&&(nt="Missing expected exception.",ot=!0),new AssertionError({message:nt,actual:void 0,expected:et,operator:"throws",generatedMessage:ot,stackStartFn:throws})}if(!testError(it,et,nt,throws))throw it}function doesNotThrow(tt,et,nt){typeof et=="string"&&(nt=et,et=void 0);let rt=!1,it=null;enforce(typeof tt=="function","func","function");try{tt()}catch(ot){rt=!0,it=ot}if(rt){if(testError(it,et,nt,doesNotThrow)){let ot=!1;throw nt==null&&(nt="Got unwanted exception.",ot=!0),new AssertionError({message:nt,actual:it,expected:et,operator:"doesNotThrow",generatedMessage:ot,stackStartFn:doesNotThrow})}throw it}}async function rejects(tt,et,nt){typeof et=="string"&&(nt=et,et=void 0);let rt=!1,it=null;typeof tt!="function"&&enforce(isPromise$1(tt),"func","promise");try{isPromise$1(tt)?await tt:await tt()}catch(ot){rt=!0,it=ot}if(!rt){let ot=!1;throw nt==null&&(nt="Missing expected rejection.",ot=!0),new AssertionError({message:nt,actual:void 0,expected:et,operator:"rejects",generatedMessage:ot,stackStartFn:rejects})}if(!testError(it,et,nt,rejects))throw it}async function doesNotReject(tt,et,nt){typeof et=="string"&&(nt=et,et=void 0);let rt=!1,it=null;typeof tt!="function"&&enforce(isPromise$1(tt),"func","promise");try{isPromise$1(tt)?await tt:await tt()}catch(ot){rt=!0,it=ot}if(rt){if(testError(it,et,nt,doesNotReject)){let ot=!1;throw nt==null&&(nt="Got unwanted rejection.",ot=!0),new AssertionError({message:nt,actual:void 0,expected:et,operator:"doesNotReject",generatedMessage:ot,stackStartFn:doesNotReject})}throw it}}function ifError(tt){if(tt!=null){let et="ifError got unwanted exception: ";throw typeof tt=="object"&&typeof tt.message=="string"?tt.message.length===0&&tt.constructor?et+=tt.constructor.name:et+=tt.message:et+=stringify(tt),new AssertionError({message:et,actual:tt,expected:null,operator:"ifError",generatedMessage:!0,stackStartFn:ifError})}}function deepEqual$1(tt,et,nt){if(!isDeepEqual(tt,et,!1))throw isError(nt)?nt:new AssertionError({message:nt,actual:tt,expected:et,operator:"deepStrictEqual",stackStartFn:deepEqual$1})}function notDeepEqual(tt,et,nt){if(isDeepEqual(tt,et,!0))throw isError(nt)?nt:new AssertionError({message:nt,actual:tt,expected:et,operator:"notDeepStrictEqual",stackStartFn:notDeepEqual})}function bufferEqual(tt,et,nt,rt){if(isEncoding(nt)||(rt=nt,nt=null),nt==null&&(nt="hex"),et=bufferize(tt,et,nt),enforce(isBuffer$4(tt),"actual","buffer"),enforce(isBuffer$4(et),"expected","buffer"),tt!==et&&!tt.equals(et))throw isError(rt)?rt:new AssertionError({message:rt,actual:tt.toString(nt),expected:et.toString(nt),operator:"bufferEqual",stackStartFn:bufferEqual})}function notBufferEqual(tt,et,nt,rt){if(isEncoding(nt)||(rt=nt,nt=null),nt==null&&(nt="hex"),et=bufferize(tt,et,nt),enforce(isBuffer$4(tt),"actual","buffer"),enforce(isBuffer$4(et),"expected","buffer"),tt===et||tt.equals(et))throw isError(rt)?rt:new AssertionError({message:rt,actual:tt.toString(nt),expected:et.toString(nt),operator:"notBufferEqual",stackStartFn:notBufferEqual})}function enforce(tt,et,nt){if(!tt){let rt;et==null?rt="Invalid type for parameter.":nt==null?rt=`Invalid type for "${et}".`:rt=`"${et}" must be a(n) ${nt}.`;const it=new TypeError(rt);throw Error.captureStackTrace&&Error.captureStackTrace(it,enforce),it}}function range$7(tt,et){if(!tt){const nt=et!=null?`"${et}" is out of range.`:"Parameter is out of range.",rt=new RangeError(nt);throw Error.captureStackTrace&&Error.captureStackTrace(rt,range$7),rt}}function stringify(tt){switch(typeof tt){case"undefined":return"undefined";case"object":return tt===null?"null":`[${objectName(tt)}]`;case"boolean":return`${tt}`;case"number":return`${tt}`;case"string":return tt.length>80&&(tt=`${tt.substring(0,77)}...`),JSON.stringify(tt);case"symbol":return tryString(tt);case"function":return`[${funcName(tt)}]`;case"bigint":return`${tt}n`;default:return`[${typeof tt}]`}}function toString$6(tt){return typeof tt=="string"?tt:isError(tt)?tryString(tt):stringify(tt)}function tryString(tt){try{return String(tt)}catch{return"Object"}}function testError(tt,et,nt,rt){if(et==null)return!0;if(isRegExp(et))return et.test(tt);if(typeof et!="function"){if(rt===doesNotThrow||rt===doesNotReject)throw new TypeError('"expected" must not be an object.');if(typeof et!="object")throw new TypeError('"expected" must be an object.');let it=!1;if(nt==null&&(nt=`Missing expected ${rt===rejects?"rejection":"exception"}.`,it=!0),tt==null||typeof tt!="object")throw new AssertionError({actual:tt,expected:et,message:nt,operator:rt.name,generatedMessage:it,stackStartFn:rt});const ot=Object.keys(et);if(isError(et)&&ot.push("name","message"),ot.length===0)throw new TypeError('"expected" may not be an empty object.');for(const at of ot){const st=et[at],lt=tt[at];if(!(typeof lt=="string"&&isRegExp(st)&&st.test(lt))&&!(at in tt&&isDeepEqual(lt,st,!1)))throw new AssertionError({actual:tt,expected:et,message:nt,operator:rt.name,generatedMessage:it,stackStartFn:rt})}return!0}return et.prototype!==void 0&&tt instanceof et?!0:Error.isPrototypeOf(et)?!1:et.call({},tt)===!0}function isDeepEqual(tt,et,nt){try{return compare(tt,et,null)}catch{return nt}}function compare(tt,et,nt){if(Object.is(tt,et))return!0;if(!isObject$e(tt)||!isObject$e(et)||objectString(tt)!==objectString(et)||Object.getPrototypeOf(tt)!==Object.getPrototypeOf(et))return!1;if(isBuffer$4(tt)&&isBuffer$4(et))return tt.equals(et);if(isDate$1(tt))return Object.is(tt.getTime(),et.getTime());if(isRegExp(tt))return tt.source===et.source&&tt.global===et.global&&tt.multiline===et.multiline&&tt.lastIndex===et.lastIndex&&tt.ignoreCase===et.ignoreCase;if(isError(tt)&&tt.message!==et.message)return!1;if(isArrayBuffer(tt)&&(tt=new Uint8Array(tt),et=new Uint8Array(et)),isView$2(tt)&&!isBuffer$4(tt)){if(isBuffer$4(et))return!1;const it=new Uint8Array(tt.buffer),ot=new Uint8Array(et.buffer);if(it.length!==ot.length)return!1;for(let at=0;at>>1?null:it}return et}assert$4.AssertionError=AssertionError;assert$4.assert=assert$4;assert$4.strict=assert$4;assert$4.ok=assert$4;assert$4.equal=equal$1;assert$4.notEqual=notEqual;assert$4.strictEqual=equal$1;assert$4.notStrictEqual=notEqual;assert$4.fail=fail;assert$4.throws=throws;assert$4.doesNotThrow=doesNotThrow;assert$4.rejects=rejects;assert$4.doesNotReject=doesNotReject;assert$4.ifError=ifError;assert$4.deepEqual=deepEqual$1;assert$4.notDeepEqual=notDeepEqual;assert$4.deepStrictEqual=deepEqual$1;assert$4.notDeepStrictEqual=notDeepEqual;assert$4.bufferEqual=bufferEqual;assert$4.notBufferEqual=notBufferEqual;assert$4.enforce=enforce;assert$4.range=range$7;var assert_1=assert$4,__createBinding$2=commonjsGlobal&&commonjsGlobal.__createBinding||(Object.create?function(tt,et,nt,rt){rt===void 0&&(rt=nt);var it=Object.getOwnPropertyDescriptor(et,nt);(!it||("get"in it?!et.__esModule:it.writable||it.configurable))&&(it={enumerable:!0,get:function(){return et[nt]}}),Object.defineProperty(tt,rt,it)}:function(tt,et,nt,rt){rt===void 0&&(rt=nt),tt[rt]=et[nt]}),__setModuleDefault$2=commonjsGlobal&&commonjsGlobal.__setModuleDefault||(Object.create?function(tt,et){Object.defineProperty(tt,"default",{enumerable:!0,value:et})}:function(tt,et){tt.default=et}),__importStar$2=commonjsGlobal&&commonjsGlobal.__importStar||function(tt){if(tt&&tt.__esModule)return tt;var et={};if(tt!=null)for(var nt in tt)nt!=="default"&&Object.prototype.hasOwnProperty.call(tt,nt)&&__createBinding$2(et,tt,nt);return __setModuleDefault$2(et,tt),et},__importDefault=commonjsGlobal&&commonjsGlobal.__importDefault||function(tt){return tt&&tt.__esModule?tt:{default:tt}};Object.defineProperty(caveat,"__esModule",{value:!0});caveat.verifyCaveats=caveat.hasCaveat=caveat.Caveat=caveat.ErrInvalidCaveat=void 0;const bsert_1=__importDefault(assert_1),Macaroon$1=__importStar$2(macaroon$1);class ErrInvalidCaveat extends Error{constructor(...et){super(...et),Error.captureStackTrace&&Error.captureStackTrace(this,ErrInvalidCaveat),this.name="ErrInvalidCaveat",this.message='Caveat must be of the form "condition[<,=,>]value"'}}caveat.ErrInvalidCaveat=ErrInvalidCaveat;const validComp=new Set(["<",">","="]);class Caveat{constructor(et){this.condition="",this.value="",this.comp="=",et&&this.fromOptions(et)}fromOptions(et){if((0,bsert_1.default)(et,"Data required to create new caveat"),(0,bsert_1.default)(typeof et.condition=="string"&&et.condition.length,"Require a condition"),this.condition=et.condition,et.value.toString(),this.value=et.value,et.comp){if(!validComp.has(et.comp))throw new ErrInvalidCaveat;this.comp=et.comp}return this}encode(){return`${this.condition}${this.comp}${this.value}`}static decode(et){let nt;for(let at=0;at{try{if(at.i!=null){const st=Caveat.decode(at.i);it===st.condition&&(ot=st.value)}}catch{}}),ot||!1}caveat.hasCaveat=hasCaveat;function verifyCaveats(tt,et,nt={}){if(et)Array.isArray(et)||(et=[et]);else return!0;const rt=new Map;for(const ot of et)rt.set(ot.condition,ot);const it=new Map;for(const ot of tt){const at=ot.condition;if(!rt.has(at))continue;it.has(at)||it.set(at,[]);const st=it.get(at);st.push(ot),it.set(at,st)}for(const[ot,at]of it){const st=rt.get(ot);for(let lt=0;lt>25;return(tt&33554431)<<5^-(et>>0&1)&996825010^-(et>>1&1)&642813549^-(et>>2&1)&513874426^-(et>>3&1)&1027748829^-(et>>4&1)&705979059}function prefixChk$1(tt){for(var et=1,nt=0;nt126)return"Invalid prefix ("+tt+")";et=polymodStep$1(et)^rt>>5}for(et=polymodStep$1(et),nt=0;ntnt)throw new TypeError("Exceeds length limit");tt=tt.toLowerCase();var rt=prefixChk$1(tt);if(typeof rt=="string")throw new Error(rt);for(var it=tt+"1",ot=0;ot>5)throw new Error("Non 5-bit word");rt=polymodStep$1(rt)^at,it+=ALPHABET$2.charAt(at)}for(ot=0;ot<6;++ot)rt=polymodStep$1(rt);for(rt^=1,ot=0;ot<6;++ot){var st=rt>>(5-ot)*5&31;it+=ALPHABET$2.charAt(st)}return it}function __decode(tt,et){if(et=et||90,tt.length<8)return tt+" too short";if(tt.length>et)return"Exceeds length limit";var nt=tt.toLowerCase(),rt=tt.toUpperCase();if(tt!==nt&&tt!==rt)return"Mixed-case string "+tt;tt=nt;var it=tt.lastIndexOf("1");if(it===-1)return"No separator character for "+tt;if(it===0)return"Missing prefix for "+tt;var ot=tt.slice(0,it),at=tt.slice(it+1);if(at.length<6)return"Data too short";var st=prefixChk$1(ot);if(typeof st=="string")return st;for(var lt=[],ct=0;ct=at.length)&<.push(ht)}return st!==1?"Invalid checksum for "+tt:{prefix:ot,words:lt}}function decodeUnsafe(){var tt=__decode.apply(null,arguments);if(typeof tt=="object")return tt}function decode$n(tt){var et=__decode.apply(null,arguments);if(typeof et=="object")return et;throw new Error(et)}function convert$4(tt,et,nt,rt){for(var it=0,ot=0,at=(1<=nt;)ot-=nt,st.push(it>>ot&at);if(rt)ot>0&&st.push(it<=et)return"Excess padding";if(it<new Uint8Array(nt),et){return typeof tt=="function"&&(tt=tt(et)),isUint8Array("output",tt,et),tt}function toTypeString(tt){return Object.prototype.toString.call(tt).slice(8,-1)}var lib$3=tt=>({contextRandomize(et){switch(assert$3(et===null||et instanceof Uint8Array,"Expected seed to be an Uint8Array or null"),et!==null&&isUint8Array("seed",et,32),tt.contextRandomize(et)){case 1:throw new Error(errors$2.CONTEXT_RANDOMIZE_UNKNOW)}},privateKeyVerify(et){return isUint8Array("private key",et,32),tt.privateKeyVerify(et)===0},privateKeyNegate(et){switch(isUint8Array("private key",et,32),tt.privateKeyNegate(et)){case 0:return et;case 1:throw new Error(errors$2.IMPOSSIBLE_CASE)}},privateKeyTweakAdd(et,nt){switch(isUint8Array("private key",et,32),isUint8Array("tweak",nt,32),tt.privateKeyTweakAdd(et,nt)){case 0:return et;case 1:throw new Error(errors$2.TWEAK_ADD)}},privateKeyTweakMul(et,nt){switch(isUint8Array("private key",et,32),isUint8Array("tweak",nt,32),tt.privateKeyTweakMul(et,nt)){case 0:return et;case 1:throw new Error(errors$2.TWEAK_MUL)}},publicKeyVerify(et){return isUint8Array("public key",et,[33,65]),tt.publicKeyVerify(et)===0},publicKeyCreate(et,nt=!0,rt){switch(isUint8Array("private key",et,32),isCompressed(nt),rt=getAssertedOutput(rt,nt?33:65),tt.publicKeyCreate(rt,et)){case 0:return rt;case 1:throw new Error(errors$2.SECKEY_INVALID);case 2:throw new Error(errors$2.PUBKEY_SERIALIZE)}},publicKeyConvert(et,nt=!0,rt){switch(isUint8Array("public key",et,[33,65]),isCompressed(nt),rt=getAssertedOutput(rt,nt?33:65),tt.publicKeyConvert(rt,et)){case 0:return rt;case 1:throw new Error(errors$2.PUBKEY_PARSE);case 2:throw new Error(errors$2.PUBKEY_SERIALIZE)}},publicKeyNegate(et,nt=!0,rt){switch(isUint8Array("public key",et,[33,65]),isCompressed(nt),rt=getAssertedOutput(rt,nt?33:65),tt.publicKeyNegate(rt,et)){case 0:return rt;case 1:throw new Error(errors$2.PUBKEY_PARSE);case 2:throw new Error(errors$2.IMPOSSIBLE_CASE);case 3:throw new Error(errors$2.PUBKEY_SERIALIZE)}},publicKeyCombine(et,nt=!0,rt){assert$3(Array.isArray(et),"Expected public keys to be an Array"),assert$3(et.length>0,"Expected public keys array will have more than zero items");for(const it of et)isUint8Array("public key",it,[33,65]);switch(isCompressed(nt),rt=getAssertedOutput(rt,nt?33:65),tt.publicKeyCombine(rt,et)){case 0:return rt;case 1:throw new Error(errors$2.PUBKEY_PARSE);case 2:throw new Error(errors$2.PUBKEY_COMBINE);case 3:throw new Error(errors$2.PUBKEY_SERIALIZE)}},publicKeyTweakAdd(et,nt,rt=!0,it){switch(isUint8Array("public key",et,[33,65]),isUint8Array("tweak",nt,32),isCompressed(rt),it=getAssertedOutput(it,rt?33:65),tt.publicKeyTweakAdd(it,et,nt)){case 0:return it;case 1:throw new Error(errors$2.PUBKEY_PARSE);case 2:throw new Error(errors$2.TWEAK_ADD)}},publicKeyTweakMul(et,nt,rt=!0,it){switch(isUint8Array("public key",et,[33,65]),isUint8Array("tweak",nt,32),isCompressed(rt),it=getAssertedOutput(it,rt?33:65),tt.publicKeyTweakMul(it,et,nt)){case 0:return it;case 1:throw new Error(errors$2.PUBKEY_PARSE);case 2:throw new Error(errors$2.TWEAK_MUL)}},signatureNormalize(et){switch(isUint8Array("signature",et,64),tt.signatureNormalize(et)){case 0:return et;case 1:throw new Error(errors$2.SIG_PARSE)}},signatureExport(et,nt){isUint8Array("signature",et,64),nt=getAssertedOutput(nt,72);const rt={output:nt,outputlen:72};switch(tt.signatureExport(rt,et)){case 0:return nt.slice(0,rt.outputlen);case 1:throw new Error(errors$2.SIG_PARSE);case 2:throw new Error(errors$2.IMPOSSIBLE_CASE)}},signatureImport(et,nt){switch(isUint8Array("signature",et),nt=getAssertedOutput(nt,64),tt.signatureImport(nt,et)){case 0:return nt;case 1:throw new Error(errors$2.SIG_PARSE);case 2:throw new Error(errors$2.IMPOSSIBLE_CASE)}},ecdsaSign(et,nt,rt={},it){isUint8Array("message",et,32),isUint8Array("private key",nt,32),assert$3(toTypeString(rt)==="Object","Expected options to be an Object"),rt.data!==void 0&&isUint8Array("options.data",rt.data),rt.noncefn!==void 0&&assert$3(toTypeString(rt.noncefn)==="Function","Expected options.noncefn to be a Function"),it=getAssertedOutput(it,64);const ot={signature:it,recid:null};switch(tt.ecdsaSign(ot,et,nt,rt.data,rt.noncefn)){case 0:return ot;case 1:throw new Error(errors$2.SIGN);case 2:throw new Error(errors$2.IMPOSSIBLE_CASE)}},ecdsaVerify(et,nt,rt){switch(isUint8Array("signature",et,64),isUint8Array("message",nt,32),isUint8Array("public key",rt,[33,65]),tt.ecdsaVerify(et,nt,rt)){case 0:return!0;case 3:return!1;case 1:throw new Error(errors$2.SIG_PARSE);case 2:throw new Error(errors$2.PUBKEY_PARSE)}},ecdsaRecover(et,nt,rt,it=!0,ot){switch(isUint8Array("signature",et,64),assert$3(toTypeString(nt)==="Number"&&nt>=0&&nt<=3,"Expected recovery id to be a Number within interval [0, 3]"),isUint8Array("message",rt,32),isCompressed(it),ot=getAssertedOutput(ot,it?33:65),tt.ecdsaRecover(ot,et,nt,rt)){case 0:return ot;case 1:throw new Error(errors$2.SIG_PARSE);case 2:throw new Error(errors$2.RECOVER);case 3:throw new Error(errors$2.IMPOSSIBLE_CASE)}},ecdh(et,nt,rt={},it){switch(isUint8Array("public key",et,[33,65]),isUint8Array("private key",nt,32),assert$3(toTypeString(rt)==="Object","Expected options to be an Object"),rt.data!==void 0&&isUint8Array("options.data",rt.data),rt.hashfn!==void 0?(assert$3(toTypeString(rt.hashfn)==="Function","Expected options.hashfn to be a Function"),rt.xbuf!==void 0&&isUint8Array("options.xbuf",rt.xbuf,32),rt.ybuf!==void 0&&isUint8Array("options.ybuf",rt.ybuf,32),isUint8Array("output",it)):it=getAssertedOutput(it,32),tt.ecdh(it,et,nt,rt.data,rt.hashfn,rt.xbuf,rt.ybuf)){case 0:return it;case 1:throw new Error(errors$2.PUBKEY_PARSE);case 2:throw new Error(errors$2.ECDH)}}});const EC=requireElliptic().ec,ec=new EC("secp256k1"),ecparams=ec.curve,BN$1=ecparams.n.constructor;function loadCompressedPublicKey(tt,et){let nt=new BN$1(et);if(nt.cmp(ecparams.p)>=0)return null;nt=nt.toRed(ecparams.red);let rt=nt.redSqr().redIMul(nt).redIAdd(ecparams.b).redSqrt();return tt===3!==rt.isOdd()&&(rt=rt.redNeg()),ec.keyPair({pub:{x:nt,y:rt}})}function loadUncompressedPublicKey(tt,et,nt){let rt=new BN$1(et),it=new BN$1(nt);if(rt.cmp(ecparams.p)>=0||it.cmp(ecparams.p)>=0||(rt=rt.toRed(ecparams.red),it=it.toRed(ecparams.red),(tt===6||tt===7)&&it.isOdd()!==(tt===7)))return null;const ot=rt.redSqr().redIMul(rt);return it.redSqr().redISub(ot.redIAdd(ecparams.b)).isZero()?ec.keyPair({pub:{x:rt,y:it}}):null}function loadPublicKey(tt){const et=tt[0];switch(et){case 2:case 3:return tt.length!==33?null:loadCompressedPublicKey(et,tt.subarray(1,33));case 4:case 6:case 7:return tt.length!==65?null:loadUncompressedPublicKey(et,tt.subarray(1,33),tt.subarray(33,65));default:return null}}function savePublicKey(tt,et){const nt=et.encode(null,tt.length===33);for(let rt=0;rt=0||(nt.iadd(new BN$1(tt)),nt.cmp(ecparams.n)>=0&&nt.isub(ecparams.n),nt.isZero()))return 1;const rt=nt.toArrayLike(Uint8Array,"be",32);return tt.set(rt),0},privateKeyTweakMul(tt,et){let nt=new BN$1(et);if(nt.cmp(ecparams.n)>=0||nt.isZero())return 1;nt.imul(new BN$1(tt)),nt.cmp(ecparams.n)>=0&&(nt=nt.umod(ecparams.n));const rt=nt.toArrayLike(Uint8Array,"be",32);return tt.set(rt),0},publicKeyVerify(tt){return loadPublicKey(tt)===null?1:0},publicKeyCreate(tt,et){const nt=new BN$1(et);if(nt.cmp(ecparams.n)>=0||nt.isZero())return 1;const rt=ec.keyFromPrivate(et).getPublic();return savePublicKey(tt,rt),0},publicKeyConvert(tt,et){const nt=loadPublicKey(et);if(nt===null)return 1;const rt=nt.getPublic();return savePublicKey(tt,rt),0},publicKeyNegate(tt,et){const nt=loadPublicKey(et);if(nt===null)return 1;const rt=nt.getPublic();return rt.y=rt.y.redNeg(),savePublicKey(tt,rt),0},publicKeyCombine(tt,et){const nt=new Array(et.length);for(let it=0;it=0)return 2;const it=rt.getPublic().add(ecparams.g.mul(nt));return it.isInfinity()?2:(savePublicKey(tt,it),0)},publicKeyTweakMul(tt,et,nt){const rt=loadPublicKey(et);if(rt===null)return 1;if(nt=new BN$1(nt),nt.cmp(ecparams.n)>=0||nt.isZero())return 2;const it=rt.getPublic().mul(nt);return savePublicKey(tt,it),0},signatureNormalize(tt){const et=new BN$1(tt.subarray(0,32)),nt=new BN$1(tt.subarray(32,64));return et.cmp(ecparams.n)>=0||nt.cmp(ecparams.n)>=0?1:(nt.cmp(ec.nh)===1&&tt.set(ecparams.n.sub(nt).toArrayLike(Uint8Array,"be",32),32),0)},signatureExport(tt,et){const nt=et.subarray(0,32),rt=et.subarray(32,64);if(new BN$1(nt).cmp(ecparams.n)>=0||new BN$1(rt).cmp(ecparams.n)>=0)return 1;const{output:it}=tt;let ot=it.subarray(4,4+33);ot[0]=0,ot.set(nt,1);let at=33,st=0;for(;at>1&&ot[st]===0&&!(ot[st+1]&128);--at,++st);if(ot=ot.subarray(st),ot[0]&128||at>1&&ot[0]===0&&!(ot[1]&128))return 1;let lt=it.subarray(6+33,6+33+33);lt[0]=0,lt.set(rt,1);let ct=33,ut=0;for(;ct>1&<[ut]===0&&!(lt[ut+1]&128);--ct,++ut);return lt=lt.subarray(ut),lt[0]&128||ct>1&<[0]===0&&!(lt[1]&128)?1:(tt.outputlen=6+at+ct,it[0]=48,it[1]=tt.outputlen-2,it[2]=2,it[3]=ot.length,it.set(ot,4),it[4+at]=2,it[5+at]=lt.length,it.set(lt,6+at),0)},signatureImport(tt,et){if(et.length<8||et.length>72||et[0]!==48||et[1]!==et.length-2||et[2]!==2)return 1;const nt=et[3];if(nt===0||5+nt>=et.length||et[4+nt]!==2)return 1;const rt=et[5+nt];if(rt===0||6+nt+rt!==et.length||et[4]&128||nt>1&&et[4]===0&&!(et[5]&128)||et[nt+6]&128||rt>1&&et[nt+6]===0&&!(et[nt+7]&128))return 1;let it=et.subarray(4,4+nt);if(it.length===33&&it[0]===0&&(it=it.subarray(1)),it.length>32)return 1;let ot=et.subarray(6+nt);if(ot.length===33&&ot[0]===0&&(ot=ot.slice(1)),ot.length>32)throw new Error("S length is too long");let at=new BN$1(it);at.cmp(ecparams.n)>=0&&(at=new BN$1(0));let st=new BN$1(et.subarray(6+nt));return st.cmp(ecparams.n)>=0&&(st=new BN$1(0)),tt.set(at.toArrayLike(Uint8Array,"be",32),0),tt.set(st.toArrayLike(Uint8Array,"be",32),32),0},ecdsaSign(tt,et,nt,rt,it){if(it){const st=it;it=lt=>{const ct=st(et,nt,null,rt,lt);if(!(ct instanceof Uint8Array&&ct.length===32))throw new Error("This is the way");return new BN$1(ct)}}const ot=new BN$1(nt);if(ot.cmp(ecparams.n)>=0||ot.isZero())return 1;let at;try{at=ec.sign(et,nt,{canonical:!0,k:it,pers:rt})}catch{return 1}return tt.signature.set(at.r.toArrayLike(Uint8Array,"be",32),0),tt.signature.set(at.s.toArrayLike(Uint8Array,"be",32),32),tt.recid=at.recoveryParam,0},ecdsaVerify(tt,et,nt){const rt={r:tt.subarray(0,32),s:tt.subarray(32,64)},it=new BN$1(rt.r),ot=new BN$1(rt.s);if(it.cmp(ecparams.n)>=0||ot.cmp(ecparams.n)>=0)return 1;if(ot.cmp(ec.nh)===1||it.isZero()||ot.isZero())return 3;const at=loadPublicKey(nt);if(at===null)return 2;const st=at.getPublic();return ec.verify(et,rt,st)?0:3},ecdsaRecover(tt,et,nt,rt){const it={r:et.slice(0,32),s:et.slice(32,64)},ot=new BN$1(it.r),at=new BN$1(it.s);if(ot.cmp(ecparams.n)>=0||at.cmp(ecparams.n)>=0)return 1;if(ot.isZero()||at.isZero())return 2;let st;try{st=ec.recoverPubKey(rt,it,nt)}catch{return 2}return savePublicKey(tt,st),0},ecdh(tt,et,nt,rt,it,ot,at){const st=loadPublicKey(et);if(st===null)return 1;const lt=new BN$1(nt);if(lt.cmp(ecparams.n)>=0||lt.isZero())return 2;const ct=st.getPublic().mul(lt);if(it===void 0){const ut=ct.encode(null,!0),ht=ec.hash().update(ut).digest();for(let dt=0;dt<32;++dt)tt[dt]=ht[dt]}else{ot||(ot=new Uint8Array(32));const ut=ct.getX().toArray("be",32);for(let mt=0;mt<32;++mt)ot[mt]=ut[mt];at||(at=new Uint8Array(32));const ht=ct.getY().toArray("be",32);for(let mt=0;mt<32;++mt)at[mt]=ht[mt];const dt=it(ot,at,rt);if(!(dt instanceof Uint8Array&&dt.length===tt.length))return 2;tt.set(dt)}return 0}},elliptic=lib$3(elliptic$1),src$1={},address={},networks$1={};Object.defineProperty(networks$1,"__esModule",{value:!0});networks$1.testnet=networks$1.regtest=networks$1.bitcoin=void 0;networks$1.bitcoin={messagePrefix:`Bitcoin Signed Message: -`,bech32:"bc",bip32:{public:76067358,private:76066276},pubKeyHash:0,scriptHash:5,wif:128};networks$1.regtest={messagePrefix:`Bitcoin Signed Message: -`,bech32:"bcrt",bip32:{public:70617039,private:70615956},pubKeyHash:111,scriptHash:196,wif:239};networks$1.testnet={messagePrefix:`Bitcoin Signed Message: -`,bech32:"tb",bip32:{public:70617039,private:70615956},pubKeyHash:111,scriptHash:196,wif:239};var payments$3={},embed={},script={},bip66$1={};Object.defineProperty(bip66$1,"__esModule",{value:!0});bip66$1.encode=bip66$1.decode=bip66$1.check=void 0;function check$d(tt){if(tt.length<8||tt.length>72||tt[0]!==48||tt[1]!==tt.length-2||tt[2]!==2)return!1;const et=tt[3];if(et===0||5+et>=tt.length||tt[4+et]!==2)return!1;const nt=tt[5+et];return!(nt===0||6+et+nt!==tt.length||tt[4]&128||et>1&&tt[4]===0&&!(tt[5]&128)||tt[et+6]&128||nt>1&&tt[et+6]===0&&!(tt[et+7]&128))}bip66$1.check=check$d;function decode$m(tt){if(tt.length<8)throw new Error("DER sequence length is too short");if(tt.length>72)throw new Error("DER sequence length is too long");if(tt[0]!==48)throw new Error("Expected DER sequence");if(tt[1]!==tt.length-2)throw new Error("DER sequence length is invalid");if(tt[2]!==2)throw new Error("Expected DER integer");const et=tt[3];if(et===0)throw new Error("R length is zero");if(5+et>=tt.length)throw new Error("R length is too long");if(tt[4+et]!==2)throw new Error("Expected DER integer (2)");const nt=tt[5+et];if(nt===0)throw new Error("S length is zero");if(6+et+nt!==tt.length)throw new Error("S length is invalid");if(tt[4]&128)throw new Error("R value is negative");if(et>1&&tt[4]===0&&!(tt[5]&128))throw new Error("R value excessively padded");if(tt[et+6]&128)throw new Error("S value is negative");if(nt>1&&tt[et+6]===0&&!(tt[et+7]&128))throw new Error("S value excessively padded");return{r:tt.slice(4,4+et),s:tt.slice(6+et)}}bip66$1.decode=decode$m;function encode$n(tt,et){const nt=tt.length,rt=et.length;if(nt===0)throw new Error("R length is zero");if(rt===0)throw new Error("S length is zero");if(nt>33)throw new Error("R length is too long");if(rt>33)throw new Error("S length is too long");if(tt[0]&128)throw new Error("R value is negative");if(et[0]&128)throw new Error("S value is negative");if(nt>1&&tt[0]===0&&!(tt[1]&128))throw new Error("R value excessively padded");if(rt>1&&et[0]===0&&!(et[1]&128))throw new Error("S value excessively padded");const it=Buffer.allocUnsafe(6+nt+rt);return it[0]=48,it[1]=it.length-2,it[2]=2,it[3]=tt.length,tt.copy(it,4),it[4+nt]=2,it[5+nt]=et.length,et.copy(it,6+nt),it}bip66$1.encode=encode$n;var ops={};Object.defineProperty(ops,"__esModule",{value:!0});ops.REVERSE_OPS=ops.OPS=void 0;const OPS$8={OP_FALSE:0,OP_0:0,OP_PUSHDATA1:76,OP_PUSHDATA2:77,OP_PUSHDATA4:78,OP_1NEGATE:79,OP_RESERVED:80,OP_TRUE:81,OP_1:81,OP_2:82,OP_3:83,OP_4:84,OP_5:85,OP_6:86,OP_7:87,OP_8:88,OP_9:89,OP_10:90,OP_11:91,OP_12:92,OP_13:93,OP_14:94,OP_15:95,OP_16:96,OP_NOP:97,OP_VER:98,OP_IF:99,OP_NOTIF:100,OP_VERIF:101,OP_VERNOTIF:102,OP_ELSE:103,OP_ENDIF:104,OP_VERIFY:105,OP_RETURN:106,OP_TOALTSTACK:107,OP_FROMALTSTACK:108,OP_2DROP:109,OP_2DUP:110,OP_3DUP:111,OP_2OVER:112,OP_2ROT:113,OP_2SWAP:114,OP_IFDUP:115,OP_DEPTH:116,OP_DROP:117,OP_DUP:118,OP_NIP:119,OP_OVER:120,OP_PICK:121,OP_ROLL:122,OP_ROT:123,OP_SWAP:124,OP_TUCK:125,OP_CAT:126,OP_SUBSTR:127,OP_LEFT:128,OP_RIGHT:129,OP_SIZE:130,OP_INVERT:131,OP_AND:132,OP_OR:133,OP_XOR:134,OP_EQUAL:135,OP_EQUALVERIFY:136,OP_RESERVED1:137,OP_RESERVED2:138,OP_1ADD:139,OP_1SUB:140,OP_2MUL:141,OP_2DIV:142,OP_NEGATE:143,OP_ABS:144,OP_NOT:145,OP_0NOTEQUAL:146,OP_ADD:147,OP_SUB:148,OP_MUL:149,OP_DIV:150,OP_MOD:151,OP_LSHIFT:152,OP_RSHIFT:153,OP_BOOLAND:154,OP_BOOLOR:155,OP_NUMEQUAL:156,OP_NUMEQUALVERIFY:157,OP_NUMNOTEQUAL:158,OP_LESSTHAN:159,OP_GREATERTHAN:160,OP_LESSTHANOREQUAL:161,OP_GREATERTHANOREQUAL:162,OP_MIN:163,OP_MAX:164,OP_WITHIN:165,OP_RIPEMD160:166,OP_SHA1:167,OP_SHA256:168,OP_HASH160:169,OP_HASH256:170,OP_CODESEPARATOR:171,OP_CHECKSIG:172,OP_CHECKSIGVERIFY:173,OP_CHECKMULTISIG:174,OP_CHECKMULTISIGVERIFY:175,OP_NOP1:176,OP_NOP2:177,OP_CHECKLOCKTIMEVERIFY:177,OP_NOP3:178,OP_CHECKSEQUENCEVERIFY:178,OP_NOP4:179,OP_NOP5:180,OP_NOP6:181,OP_NOP7:182,OP_NOP8:183,OP_NOP9:184,OP_NOP10:185,OP_CHECKSIGADD:186,OP_PUBKEYHASH:253,OP_PUBKEY:254,OP_INVALIDOPCODE:255};ops.OPS=OPS$8;const REVERSE_OPS={};ops.REVERSE_OPS=REVERSE_OPS;for(const tt of Object.keys(OPS$8)){const et=OPS$8[tt];REVERSE_OPS[et]=tt}var push_data={};Object.defineProperty(push_data,"__esModule",{value:!0});push_data.decode=push_data.encode=push_data.encodingLength=void 0;const ops_1=ops;function encodingLength$2(tt){return tttt.length)return null;rt=tt.readUInt8(et+1),it=2}else if(nt===ops_1.OPS.OP_PUSHDATA2){if(et+3>tt.length)return null;rt=tt.readUInt16LE(et+1),it=3}else{if(et+5>tt.length)return null;if(nt!==ops_1.OPS.OP_PUSHDATA4)throw new Error("Unexpected opcode");rt=tt.readUInt32LE(et+1),it=5}return{opcode:nt,number:rt,size:it}}push_data.decode=decode$l;var script_number={};Object.defineProperty(script_number,"__esModule",{value:!0});script_number.encode=script_number.decode=void 0;function decode$k(tt,et,nt){et=et||4,nt=nt===void 0?!0:nt;const rt=tt.length;if(rt===0)return 0;if(rt>et)throw new TypeError("Script number overflow");if(nt&&!(tt[rt-1]&127)&&(rt<=1||!(tt[rt-2]&128)))throw new Error("Non-minimally encoded script number");if(rt===5){const ot=tt.readUInt32LE(0),at=tt.readUInt8(4);return at&128?-((at&-129)*4294967296+ot):at*4294967296+ot}let it=0;for(let ot=0;ot2147483647?5:tt>8388607?4:tt>32767?3:tt>127?2:tt>0?1:0}function encode$l(tt){let et=Math.abs(tt);const nt=scriptNumSize(et),rt=Buffer.allocUnsafe(nt),it=tt<0;for(let ot=0;ot>=8;return rt[nt-1]&128?rt.writeUInt8(it?128:0,nt-1):it&&(rt[nt-1]|=128),rt}script_number.encode=encode$l;var script_signature={},types$6={},types$5={Array:function(tt){return tt!=null&&tt.constructor===Array},Boolean:function(tt){return typeof tt=="boolean"},Function:function(tt){return typeof tt=="function"},Nil:function(tt){return tt==null},Number:function(tt){return typeof tt=="number"},Object:function(tt){return typeof tt=="object"},String:function(tt){return typeof tt=="string"},"":function(){return!0}};types$5.Null=types$5.Nil;for(var typeName$1 in types$5)types$5[typeName$1].toJSON=(function(tt){return tt}).bind(null,typeName$1);var native$1=types$5,native=native$1;function getTypeName(tt){return tt.name||tt.toString().match(/function (.*?)\s*\(/)[1]}function getValueTypeName$1(tt){return native.Nil(tt)?"":getTypeName(tt.constructor)}function getValue$2(tt){return native.Function(tt)?"":native.String(tt)?JSON.stringify(tt):tt&&native.Object(tt)?"":tt}function captureStackTrace(tt,et){Error.captureStackTrace&&Error.captureStackTrace(tt,et)}function tfJSON$1(tt){return native.Function(tt)?tt.toJSON?tt.toJSON():getTypeName(tt):native.Array(tt)?"Array":tt&&native.Object(tt)?"Object":tt!==void 0?tt:""}function tfErrorString(tt,et,nt){var rt=getValue$2(et);return"Expected "+tfJSON$1(tt)+", got"+(nt!==""?" "+nt:"")+(rt!==""?" "+rt:"")}function TfTypeError$1(tt,et,nt){nt=nt||getValueTypeName$1(et),this.message=tfErrorString(tt,et,nt),captureStackTrace(this,TfTypeError$1),this.__type=tt,this.__value=et,this.__valueTypeName=nt}TfTypeError$1.prototype=Object.create(Error.prototype);TfTypeError$1.prototype.constructor=TfTypeError$1;function tfPropertyErrorString(tt,et,nt,rt,it){var ot='" of type ';return et==="key"&&(ot='" with key type '),tfErrorString('property "'+tfJSON$1(nt)+ot+tfJSON$1(tt),rt,it)}function TfPropertyTypeError$1(tt,et,nt,rt,it){tt?(it=it||getValueTypeName$1(rt),this.message=tfPropertyErrorString(tt,nt,et,rt,it)):this.message='Unexpected property "'+et+'"',captureStackTrace(this,TfTypeError$1),this.__label=nt,this.__property=et,this.__type=tt,this.__value=rt,this.__valueTypeName=it}TfPropertyTypeError$1.prototype=Object.create(Error.prototype);TfPropertyTypeError$1.prototype.constructor=TfTypeError$1;function tfCustomError(tt,et){return new TfTypeError$1(tt,{},et)}function tfSubError$1(tt,et,nt){return tt instanceof TfPropertyTypeError$1?(et=et+"."+tt.__property,tt=new TfPropertyTypeError$1(tt.__type,et,tt.__label,tt.__value,tt.__valueTypeName)):tt instanceof TfTypeError$1&&(tt=new TfPropertyTypeError$1(tt.__type,et,nt,tt.__value,tt.__valueTypeName)),captureStackTrace(tt),tt}var errors$1={TfTypeError:TfTypeError$1,TfPropertyTypeError:TfPropertyTypeError$1,tfCustomError,tfSubError:tfSubError$1,tfJSON:tfJSON$1,getValueTypeName:getValueTypeName$1},extra,hasRequiredExtra;function requireExtra(){if(hasRequiredExtra)return extra;hasRequiredExtra=1;var tt=native$1,et=errors$1;function nt(Tt){return Buffer.isBuffer(Tt)}function rt(Tt){return typeof Tt=="string"&&/^([0-9a-f]{2})+$/i.test(Tt)}function it(Tt,At){var Et=Tt.toJSON();function $t(Dt){if(!Tt(Dt))return!1;if(Dt.length===At)return!0;throw et.tfCustomError(Et+"(Length: "+At+")",Et+"(Length: "+Dt.length+")")}return $t.toJSON=function(){return Et},$t}var ot=it.bind(null,tt.Array),at=it.bind(null,nt),st=it.bind(null,rt),lt=it.bind(null,tt.String);function ct(Tt,At,Et){Et=Et||tt.Number;function $t(Dt,jt){return Et(Dt,jt)&&Dt>Tt&&Dt>24===Tt}function pt(Tt){return Tt<<16>>16===Tt}function mt(Tt){return(Tt|0)===Tt}function gt(Tt){return typeof Tt=="number"&&Tt>=-ut&&Tt<=ut&&Math.floor(Tt)===Tt}function yt(Tt){return(Tt&255)===Tt}function bt(Tt){return(Tt&65535)===Tt}function vt(Tt){return Tt>>>0===Tt}function xt(Tt){return typeof Tt=="number"&&Tt>=0&&Tt<=ut&&Math.floor(Tt)===Tt}var kt={ArrayN:ot,Buffer:nt,BufferN:at,Finite:ht,Hex:rt,HexN:st,Int8:dt,Int16:pt,Int32:mt,Int53:gt,Range:ct,StringN:lt,UInt8:yt,UInt16:bt,UInt32:vt,UInt53:xt};for(var St in kt)kt[St].toJSON=(function(Tt){return Tt}).bind(null,St);return extra=kt,extra}var ERRORS=errors$1,NATIVE=native$1,tfJSON=ERRORS.tfJSON,TfTypeError=ERRORS.TfTypeError,TfPropertyTypeError=ERRORS.TfPropertyTypeError,tfSubError=ERRORS.tfSubError,getValueTypeName=ERRORS.getValueTypeName,TYPES={arrayOf:function(et,nt){et=compile(et),nt=nt||{};function rt(it,ot){return!NATIVE.Array(it)||NATIVE.Nil(it)||nt.minLength!==void 0&&it.lengthnt.maxLength||nt.length!==void 0&&it.length!==nt.length?!1:it.every(function(at,st){try{return typeforce$4(et,at,ot)}catch(lt){throw tfSubError(lt,st)}})}return rt.toJSON=function(){var it="["+tfJSON(et)+"]";return nt.length!==void 0?it+="{"+nt.length+"}":(nt.minLength!==void 0||nt.maxLength!==void 0)&&(it+="{"+(nt.minLength===void 0?0:nt.minLength)+","+(nt.maxLength===void 0?1/0:nt.maxLength)+"}"),it},rt},maybe:function tt(et){et=compile(et);function nt(rt,it){return NATIVE.Nil(rt)||et(rt,it,tt)}return nt.toJSON=function(){return"?"+tfJSON(et)},nt},map:function(et,nt){et=compile(et),nt&&(nt=compile(nt));function rt(it,ot){if(!NATIVE.Object(it)||NATIVE.Nil(it))return!1;for(var at in it){try{nt&&typeforce$4(nt,at,ot)}catch(lt){throw tfSubError(lt,at,"key")}try{var st=it[at];typeforce$4(et,st,ot)}catch(lt){throw tfSubError(lt,at)}}return!0}return nt?rt.toJSON=function(){return"{"+tfJSON(nt)+": "+tfJSON(et)+"}"}:rt.toJSON=function(){return"{"+tfJSON(et)+"}"},rt},object:function(et){var nt={};for(var rt in et)nt[rt]=compile(et[rt]);function it(ot,at){if(!NATIVE.Object(ot)||NATIVE.Nil(ot))return!1;var st;try{for(st in nt){var lt=nt[st],ct=ot[st];typeforce$4(lt,ct,at)}}catch(ut){throw tfSubError(ut,st)}if(at){for(st in ot)if(!nt[st])throw new TfPropertyTypeError(void 0,st)}return!0}return it.toJSON=function(){return tfJSON(nt)},it},anyOf:function(){var et=[].slice.call(arguments).map(compile);function nt(rt,it){return et.some(function(ot){try{return typeforce$4(ot,rt,it)}catch{return!1}})}return nt.toJSON=function(){return et.map(tfJSON).join("|")},nt},allOf:function(){var et=[].slice.call(arguments).map(compile);function nt(rt,it){return et.every(function(ot){try{return typeforce$4(ot,rt,it)}catch{return!1}})}return nt.toJSON=function(){return et.map(tfJSON).join(" & ")},nt},quacksLike:function(et){function nt(rt){return et===getValueTypeName(rt)}return nt.toJSON=function(){return et},nt},tuple:function(){var et=[].slice.call(arguments).map(compile);function nt(rt,it){return NATIVE.Nil(rt)||NATIVE.Nil(rt.length)||it&&rt.length!==et.length?!1:et.every(function(ot,at){try{return typeforce$4(ot,rt[at],it)}catch(st){throw tfSubError(st,at)}})}return nt.toJSON=function(){return"("+et.map(tfJSON).join(", ")+")"},nt},value:function(et){function nt(rt){return rt===et}return nt.toJSON=function(){return et},nt}};TYPES.oneOf=TYPES.anyOf;function compile(tt){if(NATIVE.String(tt))return tt[0]==="?"?TYPES.maybe(tt.slice(1)):NATIVE[tt]||TYPES.quacksLike(tt);if(tt&&NATIVE.Object(tt)){if(NATIVE.Array(tt)){if(tt.length!==1)throw new TypeError("Expected compile() parameter of type Array of length 1");return TYPES.arrayOf(tt[0])}return TYPES.object(tt)}else if(NATIVE.Function(tt))return tt;return TYPES.value(tt)}function typeforce$4(tt,et,nt,rt){if(NATIVE.Function(tt)){if(tt(et,nt))return!0;throw new TfTypeError(rt||tt,et)}return typeforce$4(compile(tt),et,nt)}for(var typeName in NATIVE)typeforce$4[typeName]=NATIVE[typeName];for(typeName in TYPES)typeforce$4[typeName]=TYPES[typeName];var EXTRA=requireExtra();for(typeName in EXTRA)typeforce$4[typeName]=EXTRA[typeName];typeforce$4.compile=compile;typeforce$4.TfTypeError=TfTypeError;typeforce$4.TfPropertyTypeError=TfPropertyTypeError;var typeforce_1=typeforce$4;(function(tt){Object.defineProperty(tt,"__esModule",{value:!0}),tt.oneOf=tt.Null=tt.BufferN=tt.Function=tt.UInt32=tt.UInt8=tt.tuple=tt.maybe=tt.Hex=tt.Buffer=tt.String=tt.Boolean=tt.Array=tt.Number=tt.Hash256bit=tt.Hash160bit=tt.Buffer256bit=tt.isTaptree=tt.isTapleaf=tt.TAPLEAF_VERSION_MASK=tt.Network=tt.ECPoint=tt.Satoshi=tt.Signer=tt.BIP32Path=tt.UInt31=tt.isPoint=tt.typeforce=void 0;const et=buffer$2;tt.typeforce=typeforce_1;const nt=et.Buffer.alloc(32,0),rt=et.Buffer.from("fffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f","hex");function it(pt){if(!et.Buffer.isBuffer(pt)||pt.length<33)return!1;const mt=pt[0],gt=pt.slice(1,33);if(gt.compare(nt)===0||gt.compare(rt)>=0)return!1;if((mt===2||mt===3)&&pt.length===33)return!0;const yt=pt.slice(33);return yt.compare(nt)===0||yt.compare(rt)>=0?!1:mt===4&&pt.length===65}tt.isPoint=it;const ot=Math.pow(2,31)-1;function at(pt){return tt.typeforce.UInt32(pt)&&pt<=ot}tt.UInt31=at;function st(pt){return tt.typeforce.String(pt)&&!!pt.match(/^(m\/)?(\d+'?\/)*\d+'?$/)}tt.BIP32Path=st,st.toJSON=()=>"BIP32 derivation path";function lt(pt){return(tt.typeforce.Buffer(pt.publicKey)||typeof pt.getPublicKey=="function")&&typeof pt.sign=="function"}tt.Signer=lt;const ct=21*1e14;function ut(pt){return tt.typeforce.UInt53(pt)&&pt<=ct}tt.Satoshi=ut,tt.ECPoint=tt.typeforce.quacksLike("Point"),tt.Network=tt.typeforce.compile({messagePrefix:tt.typeforce.oneOf(tt.typeforce.Buffer,tt.typeforce.String),bip32:{public:tt.typeforce.UInt32,private:tt.typeforce.UInt32},pubKeyHash:tt.typeforce.UInt8,scriptHash:tt.typeforce.UInt8,wif:tt.typeforce.UInt8}),tt.TAPLEAF_VERSION_MASK=254;function ht(pt){return!pt||!("output"in pt)||!et.Buffer.isBuffer(pt.output)?!1:pt.version!==void 0?(pt.version&tt.TAPLEAF_VERSION_MASK)===pt.version:!0}tt.isTapleaf=ht;function dt(pt){return(0,tt.Array)(pt)?pt.length!==2?!1:pt.every(mt=>dt(mt)):ht(pt)}tt.isTaptree=dt,tt.Buffer256bit=tt.typeforce.BufferN(32),tt.Hash160bit=tt.typeforce.BufferN(20),tt.Hash256bit=tt.typeforce.BufferN(32),tt.Number=tt.typeforce.Number,tt.Array=tt.typeforce.Array,tt.Boolean=tt.typeforce.Boolean,tt.String=tt.typeforce.String,tt.Buffer=tt.typeforce.Buffer,tt.Hex=tt.typeforce.Hex,tt.maybe=tt.typeforce.maybe,tt.tuple=tt.typeforce.tuple,tt.UInt8=tt.typeforce.UInt8,tt.UInt32=tt.typeforce.UInt32,tt.Function=tt.typeforce.Function,tt.BufferN=tt.typeforce.BufferN,tt.Null=tt.typeforce.Null,tt.oneOf=tt.typeforce.oneOf})(types$6);Object.defineProperty(script_signature,"__esModule",{value:!0});script_signature.encode=script_signature.decode=void 0;const bip66=bip66$1,types$4=types$6,{typeforce:typeforce$3}=types$4,ZERO$1=Buffer.alloc(1,0);function toDER(tt){let et=0;for(;tt[et]===0;)++et;return et===tt.length?ZERO$1:(tt=tt.slice(et),tt[0]&128?Buffer.concat([ZERO$1,tt],1+tt.length):tt)}function fromDER(tt){tt[0]===0&&(tt=tt.slice(1));const et=Buffer.alloc(32,0),nt=Math.max(0,32-tt.length);return tt.copy(et,nt),et}function decode$j(tt){const et=tt.readUInt8(tt.length-1),nt=et&-129;if(nt<=0||nt>=4)throw new Error("Invalid hashType "+et);const rt=bip66.decode(tt.slice(0,-1)),it=fromDER(rt.r),ot=fromDER(rt.s);return{signature:Buffer.concat([it,ot],64),hashType:et}}script_signature.decode=decode$j;function encode$k(tt,et){typeforce$3({signature:types$4.BufferN(64),hashType:types$4.UInt8},{signature:tt,hashType:et});const nt=et&-129;if(nt<=0||nt>=4)throw new Error("Invalid hashType "+et);const rt=Buffer.allocUnsafe(1);rt.writeUInt8(et,0);const it=toDER(tt.slice(0,32)),ot=toDER(tt.slice(32,64));return Buffer.concat([bip66.encode(it,ot),rt])}script_signature.encode=encode$k;(function(tt){Object.defineProperty(tt,"__esModule",{value:!0}),tt.signature=tt.number=tt.isCanonicalScriptSignature=tt.isDefinedHashType=tt.isCanonicalPubKey=tt.toStack=tt.fromASM=tt.toASM=tt.decompile=tt.compile=tt.countNonPushOnlyOPs=tt.isPushOnly=tt.OPS=void 0;const et=bip66$1,nt=ops;Object.defineProperty(tt,"OPS",{enumerable:!0,get:function(){return nt.OPS}});const rt=push_data,it=script_number,ot=script_signature,at=types$6,{typeforce:st}=at,lt=nt.OPS.OP_RESERVED;function ct($t){return at.Number($t)&&($t===nt.OPS.OP_0||$t>=nt.OPS.OP_1&&$t<=nt.OPS.OP_16||$t===nt.OPS.OP_1NEGATE)}function ut($t){return at.Buffer($t)||ct($t)}function ht($t){return at.Array($t)&&$t.every(ut)}tt.isPushOnly=ht;function dt($t){return $t.length-$t.filter(ut).length}tt.countNonPushOnlyOPs=dt;function pt($t){if($t.length===0)return nt.OPS.OP_0;if($t.length===1){if($t[0]>=1&&$t[0]<=16)return lt+$t[0];if($t[0]===129)return nt.OPS.OP_1NEGATE}}function mt($t){return Buffer.isBuffer($t)}function gt($t){return at.Array($t)}function yt($t){return Buffer.isBuffer($t)}function bt($t){if(mt($t))return $t;st(at.Array,$t);const Dt=$t.reduce((Ct,wt)=>yt(wt)?wt.length===1&&pt(wt)!==void 0?Ct+1:Ct+rt.encodingLength(wt.length)+wt.length:Ct+1,0),jt=Buffer.allocUnsafe(Dt);let Pt=0;if($t.forEach(Ct=>{if(yt(Ct)){const wt=pt(Ct);if(wt!==void 0){jt.writeUInt8(wt,Pt),Pt+=1;return}Pt+=rt.encode(jt,Ct.length,Pt),Ct.copy(jt,Pt),Pt+=Ct.length}else jt.writeUInt8(Ct,Pt),Pt+=1}),Pt!==jt.length)throw new Error("Could not decode chunks");return jt}tt.compile=bt;function vt($t){if(gt($t))return $t;st(at.Buffer,$t);const Dt=[];let jt=0;for(;jt<$t.length;){const Pt=$t[jt];if(Pt>nt.OPS.OP_0&&Pt<=nt.OPS.OP_PUSHDATA4){const Ct=rt.decode($t,jt);if(Ct===null||(jt+=Ct.size,jt+Ct.number>$t.length))return null;const wt=$t.slice(jt,jt+Ct.number);jt+=Ct.number;const It=pt(wt);It!==void 0?Dt.push(It):Dt.push(wt)}else Dt.push(Pt),jt+=1}return Dt}tt.decompile=vt;function xt($t){return mt($t)&&($t=vt($t)),$t.map(Dt=>{if(yt(Dt)){const jt=pt(Dt);if(jt===void 0)return Dt.toString("hex");Dt=jt}return nt.REVERSE_OPS[Dt]}).join(" ")}tt.toASM=xt;function kt($t){return st(at.String,$t),bt($t.split(" ").map(Dt=>nt.OPS[Dt]!==void 0?nt.OPS[Dt]:(st(at.Hex,Dt),Buffer.from(Dt,"hex"))))}tt.fromASM=kt;function St($t){return $t=vt($t),st(ht,$t),$t.map(Dt=>yt(Dt)?Dt:Dt===nt.OPS.OP_0?Buffer.allocUnsafe(0):it.encode(Dt-lt))}tt.toStack=St;function Tt($t){return at.isPoint($t)}tt.isCanonicalPubKey=Tt;function At($t){const Dt=$t&-129;return Dt>0&&Dt<4}tt.isDefinedHashType=At;function Et($t){return!Buffer.isBuffer($t)||!At($t[$t.length-1])?!1:et.check($t.slice(0,-1))}tt.isCanonicalScriptSignature=Et,tt.number=it,tt.signature=ot})(script);var lazy$9={};Object.defineProperty(lazy$9,"__esModule",{value:!0});lazy$9.value=lazy$9.prop=void 0;function prop(tt,et,nt){Object.defineProperty(tt,et,{configurable:!0,enumerable:!0,get(){const rt=nt.call(this);return this[et]=rt,rt},set(rt){Object.defineProperty(this,et,{configurable:!0,enumerable:!0,value:rt,writable:!0})}})}lazy$9.prop=prop;function value$1(tt){let et;return()=>(et!==void 0||(et=tt()),et)}lazy$9.value=value$1;Object.defineProperty(embed,"__esModule",{value:!0});embed.p2data=void 0;const networks_1$8=networks$1,bscript$b=script,types_1$9=types$6,lazy$8=lazy$9,OPS$7=bscript$b.OPS;function stacksEqual$4(tt,et){return tt.length!==et.length?!1:tt.every((nt,rt)=>nt.equals(et[rt]))}function p2data(tt,et){if(!tt.data&&!tt.output)throw new TypeError("Not enough data");et=Object.assign({validate:!0},et||{}),(0,types_1$9.typeforce)({network:types_1$9.typeforce.maybe(types_1$9.typeforce.Object),output:types_1$9.typeforce.maybe(types_1$9.typeforce.Buffer),data:types_1$9.typeforce.maybe(types_1$9.typeforce.arrayOf(types_1$9.typeforce.Buffer))},tt);const rt={name:"embed",network:tt.network||networks_1$8.bitcoin};if(lazy$8.prop(rt,"output",()=>{if(tt.data)return bscript$b.compile([OPS$7.OP_RETURN].concat(tt.data))}),lazy$8.prop(rt,"data",()=>{if(tt.output)return bscript$b.decompile(tt.output).slice(1)}),et.validate&&tt.output){const it=bscript$b.decompile(tt.output);if(it[0]!==OPS$7.OP_RETURN)throw new TypeError("Output is invalid");if(!it.slice(1).every(types_1$9.typeforce.Buffer))throw new TypeError("Output is invalid");if(tt.data&&!stacksEqual$4(tt.data,rt.data))throw new TypeError("Data mismatch")}return Object.assign(rt,tt)}embed.p2data=p2data;var p2ms$1={};Object.defineProperty(p2ms$1,"__esModule",{value:!0});p2ms$1.p2ms=void 0;const networks_1$7=networks$1,bscript$a=script,types_1$8=types$6,lazy$7=lazy$9,OPS$6=bscript$a.OPS,OP_INT_BASE=OPS$6.OP_RESERVED;function stacksEqual$3(tt,et){return tt.length!==et.length?!1:tt.every((nt,rt)=>nt.equals(et[rt]))}function p2ms(tt,et){if(!tt.input&&!tt.output&&!(tt.pubkeys&&tt.m!==void 0)&&!tt.signatures)throw new TypeError("Not enough data");et=Object.assign({validate:!0},et||{});function nt(lt){return bscript$a.isCanonicalScriptSignature(lt)||(et.allowIncomplete&<===OPS$6.OP_0)!==void 0}(0,types_1$8.typeforce)({network:types_1$8.typeforce.maybe(types_1$8.typeforce.Object),m:types_1$8.typeforce.maybe(types_1$8.typeforce.Number),n:types_1$8.typeforce.maybe(types_1$8.typeforce.Number),output:types_1$8.typeforce.maybe(types_1$8.typeforce.Buffer),pubkeys:types_1$8.typeforce.maybe(types_1$8.typeforce.arrayOf(types_1$8.isPoint)),signatures:types_1$8.typeforce.maybe(types_1$8.typeforce.arrayOf(nt)),input:types_1$8.typeforce.maybe(types_1$8.typeforce.Buffer)},tt);const it={network:tt.network||networks_1$7.bitcoin};let ot=[],at=!1;function st(lt){at||(at=!0,ot=bscript$a.decompile(lt),it.m=ot[0]-OP_INT_BASE,it.n=ot[ot.length-2]-OP_INT_BASE,it.pubkeys=ot.slice(1,-2))}if(lazy$7.prop(it,"output",()=>{if(tt.m&&it.n&&tt.pubkeys)return bscript$a.compile([].concat(OP_INT_BASE+tt.m,tt.pubkeys,OP_INT_BASE+it.n,OPS$6.OP_CHECKMULTISIG))}),lazy$7.prop(it,"m",()=>{if(it.output)return st(it.output),it.m}),lazy$7.prop(it,"n",()=>{if(it.pubkeys)return it.pubkeys.length}),lazy$7.prop(it,"pubkeys",()=>{if(tt.output)return st(tt.output),it.pubkeys}),lazy$7.prop(it,"signatures",()=>{if(tt.input)return bscript$a.decompile(tt.input).slice(1)}),lazy$7.prop(it,"input",()=>{if(tt.signatures)return bscript$a.compile([OPS$6.OP_0].concat(tt.signatures))}),lazy$7.prop(it,"witness",()=>{if(it.input)return[]}),lazy$7.prop(it,"name",()=>{if(!(!it.m||!it.n))return`p2ms(${it.m} of ${it.n})`}),et.validate){if(tt.output){if(st(tt.output),!types_1$8.typeforce.Number(ot[0]))throw new TypeError("Output is invalid");if(!types_1$8.typeforce.Number(ot[ot.length-2]))throw new TypeError("Output is invalid");if(ot[ot.length-1]!==OPS$6.OP_CHECKMULTISIG)throw new TypeError("Output is invalid");if(it.m<=0||it.n>16||it.m>it.n||it.n!==ot.length-3)throw new TypeError("Output is invalid");if(!it.pubkeys.every(lt=>(0,types_1$8.isPoint)(lt)))throw new TypeError("Output is invalid");if(tt.m!==void 0&&tt.m!==it.m)throw new TypeError("m mismatch");if(tt.n!==void 0&&tt.n!==it.n)throw new TypeError("n mismatch");if(tt.pubkeys&&!stacksEqual$3(tt.pubkeys,it.pubkeys))throw new TypeError("Pubkeys mismatch")}if(tt.pubkeys){if(tt.n!==void 0&&tt.n!==tt.pubkeys.length)throw new TypeError("Pubkey count mismatch");if(it.n=tt.pubkeys.length,it.nit.m)throw new TypeError("Too many signatures provided")}if(tt.input){if(tt.input[0]!==OPS$6.OP_0)throw new TypeError("Input is invalid");if(it.signatures.length===0||!it.signatures.every(nt))throw new TypeError("Input has invalid signature(s)");if(tt.signatures&&!stacksEqual$3(tt.signatures,it.signatures))throw new TypeError("Signature mismatch");if(tt.m!==void 0&&tt.m!==tt.signatures.length)throw new TypeError("Signature count mismatch")}}return Object.assign(it,tt)}p2ms$1.p2ms=p2ms;var p2pk$1={};Object.defineProperty(p2pk$1,"__esModule",{value:!0});p2pk$1.p2pk=void 0;const networks_1$6=networks$1,bscript$9=script,types_1$7=types$6,lazy$6=lazy$9,OPS$5=bscript$9.OPS;function p2pk(tt,et){if(!tt.input&&!tt.output&&!tt.pubkey&&!tt.input&&!tt.signature)throw new TypeError("Not enough data");et=Object.assign({validate:!0},et||{}),(0,types_1$7.typeforce)({network:types_1$7.typeforce.maybe(types_1$7.typeforce.Object),output:types_1$7.typeforce.maybe(types_1$7.typeforce.Buffer),pubkey:types_1$7.typeforce.maybe(types_1$7.isPoint),signature:types_1$7.typeforce.maybe(bscript$9.isCanonicalScriptSignature),input:types_1$7.typeforce.maybe(types_1$7.typeforce.Buffer)},tt);const nt=lazy$6.value(()=>bscript$9.decompile(tt.input)),it={name:"p2pk",network:tt.network||networks_1$6.bitcoin};if(lazy$6.prop(it,"output",()=>{if(tt.pubkey)return bscript$9.compile([tt.pubkey,OPS$5.OP_CHECKSIG])}),lazy$6.prop(it,"pubkey",()=>{if(tt.output)return tt.output.slice(1,-1)}),lazy$6.prop(it,"signature",()=>{if(tt.input)return nt()[0]}),lazy$6.prop(it,"input",()=>{if(tt.signature)return bscript$9.compile([tt.signature])}),lazy$6.prop(it,"witness",()=>{if(it.input)return[]}),et.validate){if(tt.output){if(tt.output[tt.output.length-1]!==OPS$5.OP_CHECKSIG)throw new TypeError("Output is invalid");if(!(0,types_1$7.isPoint)(it.pubkey))throw new TypeError("Output pubkey is invalid");if(tt.pubkey&&!tt.pubkey.equals(it.pubkey))throw new TypeError("Pubkey mismatch")}if(tt.signature&&tt.input&&!tt.input.equals(it.input))throw new TypeError("Signature mismatch");if(tt.input){if(nt().length!==1)throw new TypeError("Input is invalid");if(!bscript$9.isCanonicalScriptSignature(it.signature))throw new TypeError("Input has invalid signature")}}return Object.assign(it,tt)}p2pk$1.p2pk=p2pk;var p2pkh$1={},crypto$2={},ripemd160={},_sha2={},_assert={};Object.defineProperty(_assert,"__esModule",{value:!0});_assert.output=_assert.exists=_assert.hash=_assert.bytes=_assert.bool=_assert.number=void 0;function number$4(tt){if(!Number.isSafeInteger(tt)||tt<0)throw new Error(`Wrong positive integer: ${tt}`)}_assert.number=number$4;function bool$1(tt){if(typeof tt!="boolean")throw new Error(`Expected boolean, not ${tt}`)}_assert.bool=bool$1;function bytes(tt,...et){if(!(tt instanceof Uint8Array))throw new Error("Expected Uint8Array");if(et.length>0&&!et.includes(tt.length))throw new Error(`Expected Uint8Array of length ${et}, not of length=${tt.length}`)}_assert.bytes=bytes;function hash(tt){if(typeof tt!="function"||typeof tt.create!="function")throw new Error("Hash should be wrapped by utils.wrapConstructor");number$4(tt.outputLen),number$4(tt.blockLen)}_assert.hash=hash;function exists(tt,et=!0){if(tt.destroyed)throw new Error("Hash instance has been destroyed");if(et&&tt.finished)throw new Error("Hash#digest() has already been called")}_assert.exists=exists;function output(tt,et){bytes(tt);const nt=et.outputLen;if(tt.lengthTt instanceof Uint8Array,rt=Tt=>new Uint8Array(Tt.buffer,Tt.byteOffset,Tt.byteLength);tt.u8=rt;const it=Tt=>new Uint32Array(Tt.buffer,Tt.byteOffset,Math.floor(Tt.byteLength/4));tt.u32=it;const ot=Tt=>new DataView(Tt.buffer,Tt.byteOffset,Tt.byteLength);tt.createView=ot;const at=(Tt,At)=>Tt<<32-At|Tt>>>At;if(tt.rotr=at,tt.isLE=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68,!tt.isLE)throw new Error("Non little-endian hardware is not supported");const st=Array.from({length:256},(Tt,At)=>At.toString(16).padStart(2,"0"));function lt(Tt){if(!nt(Tt))throw new Error("Uint8Array expected");let At="";for(let Et=0;Et{};tt.nextTick=ut;async function ht(Tt,At,Et){let $t=Date.now();for(let Dt=0;Dt=0&&jt$t+Dt.length,0));let Et=0;return Tt.forEach($t=>{if(!nt($t))throw new Error("Uint8Array expected");At.set($t,Et),Et+=$t.length}),At}tt.concatBytes=mt;class gt{clone(){return this._cloneInto()}}tt.Hash=gt;const yt={}.toString;function bt(Tt,At){if(At!==void 0&&yt.call(At)!=="[object Object]")throw new Error("Options should be object or undefined");return Object.assign(Tt,At)}tt.checkOpts=bt;function vt(Tt){const At=$t=>Tt().update(pt($t)).digest(),Et=Tt();return At.outputLen=Et.outputLen,At.blockLen=Et.blockLen,At.create=()=>Tt(),At}tt.wrapConstructor=vt;function xt(Tt){const At=($t,Dt)=>Tt(Dt).update(pt($t)).digest(),Et=Tt({});return At.outputLen=Et.outputLen,At.blockLen=Et.blockLen,At.create=$t=>Tt($t),At}tt.wrapConstructorWithOpts=xt;function kt(Tt){const At=($t,Dt)=>Tt(Dt).update(pt($t)).digest(),Et=Tt({});return At.outputLen=Et.outputLen,At.blockLen=Et.blockLen,At.create=$t=>Tt($t),At}tt.wrapXOFConstructorWithOpts=kt;function St(Tt=32){if(et.crypto&&typeof et.crypto.getRandomValues=="function")return et.crypto.getRandomValues(new Uint8Array(Tt));throw new Error("crypto.getRandomValues must be defined")}tt.randomBytes=St})(utils$2);Object.defineProperty(_sha2,"__esModule",{value:!0});_sha2.SHA2=void 0;const _assert_js_1=_assert,utils_js_1$3=utils$2;function setBigUint64(tt,et,nt,rt){if(typeof tt.setBigUint64=="function")return tt.setBigUint64(et,nt,rt);const it=BigInt(32),ot=BigInt(4294967295),at=Number(nt>>it&ot),st=Number(nt&ot),lt=rt?4:0,ct=rt?0:4;tt.setUint32(et+lt,at,rt),tt.setUint32(et+ct,st,rt)}class SHA2 extends utils_js_1$3.Hash{constructor(et,nt,rt,it){super(),this.blockLen=et,this.outputLen=nt,this.padOffset=rt,this.isLE=it,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(et),this.view=(0,utils_js_1$3.createView)(this.buffer)}update(et){(0,_assert_js_1.exists)(this);const{view:nt,buffer:rt,blockLen:it}=this;et=(0,utils_js_1$3.toBytes)(et);const ot=et.length;for(let at=0;atit-at&&(this.process(rt,0),at=0);for(let ht=at;htut.length)throw new Error("_sha2: outputLen bigger than state");for(let ht=0;htet),Pi=Id.map(tt=>(9*tt+5)%16);let idxL=[Id],idxR=[Pi];for(let tt=0;tt<4;tt++)for(let et of[idxL,idxR])et.push(et[tt].map(nt=>Rho[nt]));const shifts=[[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8],[12,13,11,15,6,9,9,7,12,15,11,13,7,8,7,7],[13,15,14,11,7,7,6,8,13,14,13,12,5,5,6,9],[14,11,12,14,8,6,5,5,15,12,15,14,9,9,8,6],[15,12,13,13,9,5,8,6,14,11,12,11,8,6,5,5]].map(tt=>new Uint8Array(tt)),shiftsL=idxL.map((tt,et)=>tt.map(nt=>shifts[et][nt])),shiftsR=idxR.map((tt,et)=>tt.map(nt=>shifts[et][nt])),Kl=new Uint32Array([0,1518500249,1859775393,2400959708,2840853838]),Kr=new Uint32Array([1352829926,1548603684,1836072691,2053994217,0]),rotl$1=(tt,et)=>tt<>>32-et;function f$2(tt,et,nt,rt){return tt===0?et^nt^rt:tt===1?et&nt|~et&rt:tt===2?(et|~nt)^rt:tt===3?et&rt|nt&~rt:et^(nt|~rt)}const BUF=new Uint32Array(16);class RIPEMD160 extends _sha2_js_1$2.SHA2{constructor(){super(64,20,8,!0),this.h0=1732584193,this.h1=-271733879,this.h2=-1732584194,this.h3=271733878,this.h4=-1009589776}get(){const{h0:et,h1:nt,h2:rt,h3:it,h4:ot}=this;return[et,nt,rt,it,ot]}set(et,nt,rt,it,ot){this.h0=et|0,this.h1=nt|0,this.h2=rt|0,this.h3=it|0,this.h4=ot|0}process(et,nt){for(let pt=0;pt<16;pt++,nt+=4)BUF[pt]=et.getUint32(nt,!0);let rt=this.h0|0,it=rt,ot=this.h1|0,at=ot,st=this.h2|0,lt=st,ct=this.h3|0,ut=ct,ht=this.h4|0,dt=ht;for(let pt=0;pt<5;pt++){const mt=4-pt,gt=Kl[pt],yt=Kr[pt],bt=idxL[pt],vt=idxR[pt],xt=shiftsL[pt],kt=shiftsR[pt];for(let St=0;St<16;St++){const Tt=rotl$1(rt+f$2(pt,ot,st,ct)+BUF[bt[St]]+gt,xt[St])+ht|0;rt=ht,ht=ct,ct=rotl$1(st,10)|0,st=ot,ot=Tt}for(let St=0;St<16;St++){const Tt=rotl$1(it+f$2(mt,at,lt,ut)+BUF[vt[St]]+yt,kt[St])+dt|0;it=dt,dt=ut,ut=rotl$1(lt,10)|0,lt=at,at=Tt}}this.set(this.h1+st+ut|0,this.h2+ct+dt|0,this.h3+ht+it|0,this.h4+rt+at|0,this.h0+ot+lt|0)}roundClean(){BUF.fill(0)}destroy(){this.destroyed=!0,this.buffer.fill(0),this.set(0,0,0,0,0)}}ripemd160.RIPEMD160=RIPEMD160;ripemd160.ripemd160=(0,utils_js_1$2.wrapConstructor)(()=>new RIPEMD160);var sha1={};Object.defineProperty(sha1,"__esModule",{value:!0});sha1.sha1=void 0;const _sha2_js_1$1=_sha2,utils_js_1$1=utils$2,rotl=(tt,et)=>tt<>>32-et>>>0,Chi$1=(tt,et,nt)=>tt&et^~tt&nt,Maj$1=(tt,et,nt)=>tt&et^tt&nt^et&nt,IV$1=new Uint32Array([1732584193,4023233417,2562383102,271733878,3285377520]),SHA1_W=new Uint32Array(80);class SHA1 extends _sha2_js_1$1.SHA2{constructor(){super(64,20,8,!1),this.A=IV$1[0]|0,this.B=IV$1[1]|0,this.C=IV$1[2]|0,this.D=IV$1[3]|0,this.E=IV$1[4]|0}get(){const{A:et,B:nt,C:rt,D:it,E:ot}=this;return[et,nt,rt,it,ot]}set(et,nt,rt,it,ot){this.A=et|0,this.B=nt|0,this.C=rt|0,this.D=it|0,this.E=ot|0}process(et,nt){for(let lt=0;lt<16;lt++,nt+=4)SHA1_W[lt]=et.getUint32(nt,!1);for(let lt=16;lt<80;lt++)SHA1_W[lt]=rotl(SHA1_W[lt-3]^SHA1_W[lt-8]^SHA1_W[lt-14]^SHA1_W[lt-16],1);let{A:rt,B:it,C:ot,D:at,E:st}=this;for(let lt=0;lt<80;lt++){let ct,ut;lt<20?(ct=Chi$1(it,ot,at),ut=1518500249):lt<40?(ct=it^ot^at,ut=1859775393):lt<60?(ct=Maj$1(it,ot,at),ut=2400959708):(ct=it^ot^at,ut=3395469782);const ht=rotl(rt,5)+ct+st+ut+SHA1_W[lt]|0;st=at,at=ot,ot=rotl(it,30),it=rt,rt=ht}rt=rt+this.A|0,it=it+this.B|0,ot=ot+this.C|0,at=at+this.D|0,st=st+this.E|0,this.set(rt,it,ot,at,st)}roundClean(){SHA1_W.fill(0)}destroy(){this.set(0,0,0,0,0),this.buffer.fill(0)}}sha1.sha1=(0,utils_js_1$1.wrapConstructor)(()=>new SHA1);var sha256$2={};Object.defineProperty(sha256$2,"__esModule",{value:!0});sha256$2.sha224=sha256$2.sha256=void 0;const _sha2_js_1=_sha2,utils_js_1=utils$2,Chi=(tt,et,nt)=>tt&et^~tt&nt,Maj=(tt,et,nt)=>tt&et^tt&nt^et&nt,SHA256_K=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),IV=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),SHA256_W=new Uint32Array(64);class SHA256 extends _sha2_js_1.SHA2{constructor(){super(64,32,8,!1),this.A=IV[0]|0,this.B=IV[1]|0,this.C=IV[2]|0,this.D=IV[3]|0,this.E=IV[4]|0,this.F=IV[5]|0,this.G=IV[6]|0,this.H=IV[7]|0}get(){const{A:et,B:nt,C:rt,D:it,E:ot,F:at,G:st,H:lt}=this;return[et,nt,rt,it,ot,at,st,lt]}set(et,nt,rt,it,ot,at,st,lt){this.A=et|0,this.B=nt|0,this.C=rt|0,this.D=it|0,this.E=ot|0,this.F=at|0,this.G=st|0,this.H=lt|0}process(et,nt){for(let ht=0;ht<16;ht++,nt+=4)SHA256_W[ht]=et.getUint32(nt,!1);for(let ht=16;ht<64;ht++){const dt=SHA256_W[ht-15],pt=SHA256_W[ht-2],mt=(0,utils_js_1.rotr)(dt,7)^(0,utils_js_1.rotr)(dt,18)^dt>>>3,gt=(0,utils_js_1.rotr)(pt,17)^(0,utils_js_1.rotr)(pt,19)^pt>>>10;SHA256_W[ht]=gt+SHA256_W[ht-7]+mt+SHA256_W[ht-16]|0}let{A:rt,B:it,C:ot,D:at,E:st,F:lt,G:ct,H:ut}=this;for(let ht=0;ht<64;ht++){const dt=(0,utils_js_1.rotr)(st,6)^(0,utils_js_1.rotr)(st,11)^(0,utils_js_1.rotr)(st,25),pt=ut+dt+Chi(st,lt,ct)+SHA256_K[ht]+SHA256_W[ht]|0,gt=((0,utils_js_1.rotr)(rt,2)^(0,utils_js_1.rotr)(rt,13)^(0,utils_js_1.rotr)(rt,22))+Maj(rt,it,ot)|0;ut=ct,ct=lt,lt=st,st=at+pt|0,at=ot,ot=it,it=rt,rt=pt+gt|0}rt=rt+this.A|0,it=it+this.B|0,ot=ot+this.C|0,at=at+this.D|0,st=st+this.E|0,lt=lt+this.F|0,ct=ct+this.G|0,ut=ut+this.H|0,this.set(rt,it,ot,at,st,lt,ct,ut)}roundClean(){SHA256_W.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}class SHA224 extends SHA256{constructor(){super(),this.A=-1056596264,this.B=914150663,this.C=812702999,this.D=-150054599,this.E=-4191439,this.F=1750603025,this.G=1694076839,this.H=-1090891868,this.outputLen=28}}sha256$2.sha256=(0,utils_js_1.wrapConstructor)(()=>new SHA256);sha256$2.sha224=(0,utils_js_1.wrapConstructor)(()=>new SHA224);(function(tt){Object.defineProperty(tt,"__esModule",{value:!0}),tt.taggedHash=tt.TAGGED_HASH_PREFIXES=tt.TAGS=tt.hash256=tt.hash160=tt.sha256=tt.sha1=tt.ripemd160=void 0;const et=ripemd160,nt=sha1,rt=sha256$2;function it(ut){return Buffer.from((0,et.ripemd160)(Uint8Array.from(ut)))}tt.ripemd160=it;function ot(ut){return Buffer.from((0,nt.sha1)(Uint8Array.from(ut)))}tt.sha1=ot;function at(ut){return Buffer.from((0,rt.sha256)(Uint8Array.from(ut)))}tt.sha256=at;function st(ut){return Buffer.from((0,et.ripemd160)((0,rt.sha256)(Uint8Array.from(ut))))}tt.hash160=st;function lt(ut){return Buffer.from((0,rt.sha256)((0,rt.sha256)(Uint8Array.from(ut))))}tt.hash256=lt,tt.TAGS=["BIP0340/challenge","BIP0340/aux","BIP0340/nonce","TapLeaf","TapBranch","TapSighash","TapTweak","KeyAgg list","KeyAgg coefficient"],tt.TAGGED_HASH_PREFIXES={"BIP0340/challenge":Buffer.from([123,181,45,122,159,239,88,50,62,177,191,122,64,125,179,130,210,243,242,216,27,177,34,79,73,254,81,143,109,72,211,124,123,181,45,122,159,239,88,50,62,177,191,122,64,125,179,130,210,243,242,216,27,177,34,79,73,254,81,143,109,72,211,124]),"BIP0340/aux":Buffer.from([241,239,78,94,192,99,202,218,109,148,202,250,157,152,126,160,105,38,88,57,236,193,31,151,45,119,165,46,216,193,204,144,241,239,78,94,192,99,202,218,109,148,202,250,157,152,126,160,105,38,88,57,236,193,31,151,45,119,165,46,216,193,204,144]),"BIP0340/nonce":Buffer.from([7,73,119,52,167,155,203,53,91,155,140,125,3,79,18,28,244,52,215,62,247,45,218,25,135,0,97,251,82,191,235,47,7,73,119,52,167,155,203,53,91,155,140,125,3,79,18,28,244,52,215,62,247,45,218,25,135,0,97,251,82,191,235,47]),TapLeaf:Buffer.from([174,234,143,220,66,8,152,49,5,115,75,88,8,29,30,38,56,211,95,28,181,64,8,212,211,87,202,3,190,120,233,238,174,234,143,220,66,8,152,49,5,115,75,88,8,29,30,38,56,211,95,28,181,64,8,212,211,87,202,3,190,120,233,238]),TapBranch:Buffer.from([25,65,161,242,229,110,185,95,162,169,241,148,190,92,1,247,33,111,51,237,130,176,145,70,52,144,208,91,245,22,160,21,25,65,161,242,229,110,185,95,162,169,241,148,190,92,1,247,33,111,51,237,130,176,145,70,52,144,208,91,245,22,160,21]),TapSighash:Buffer.from([244,10,72,223,75,42,112,200,180,146,75,242,101,70,97,237,61,149,253,102,163,19,235,135,35,117,151,198,40,228,160,49,244,10,72,223,75,42,112,200,180,146,75,242,101,70,97,237,61,149,253,102,163,19,235,135,35,117,151,198,40,228,160,49]),TapTweak:Buffer.from([232,15,225,99,156,156,160,80,227,175,27,57,193,67,198,62,66,156,188,235,21,217,64,251,181,197,161,244,175,87,197,233,232,15,225,99,156,156,160,80,227,175,27,57,193,67,198,62,66,156,188,235,21,217,64,251,181,197,161,244,175,87,197,233]),"KeyAgg list":Buffer.from([72,28,151,28,60,11,70,215,240,178,117,174,89,141,78,44,126,215,49,156,89,74,92,110,199,158,160,212,153,2,148,240,72,28,151,28,60,11,70,215,240,178,117,174,89,141,78,44,126,215,49,156,89,74,92,110,199,158,160,212,153,2,148,240]),"KeyAgg coefficient":Buffer.from([191,201,4,3,77,28,136,232,200,14,34,229,61,36,86,109,100,130,78,214,66,114,129,192,145,0,249,77,205,82,201,129,191,201,4,3,77,28,136,232,200,14,34,229,61,36,86,109,100,130,78,214,66,114,129,192,145,0,249,77,205,82,201,129])};function ct(ut,ht){return at(Buffer.concat([tt.TAGGED_HASH_PREFIXES[ut],ht]))}tt.taggedHash=ct})(crypto$2);function base$1(tt){if(tt.length>=255)throw new TypeError("Alphabet too long");for(var et=new Uint8Array(256),nt=0;nt>>0,xt=new Uint8Array(vt);yt!==bt;){for(var kt=pt[yt],St=0,Tt=vt-1;(kt!==0||St>>0,xt[Tt]=kt%at>>>0,kt=kt/at>>>0;if(kt!==0)throw new Error("Non-zero carry");gt=St,yt++}for(var At=vt-gt;At!==vt&&xt[At]===0;)At++;for(var Et=st.repeat(mt);At>>0,vt=new Uint8Array(bt);pt[mt];){var xt=et[pt.charCodeAt(mt)];if(xt===255)return;for(var kt=0,St=bt-1;(xt!==0||kt>>0,vt[St]=xt%256>>>0,xt=xt/256>>>0;if(xt!==0)throw new Error("Non-zero carry");yt=kt,mt++}for(var Tt=bt-yt;Tt!==bt&&vt[Tt]===0;)Tt++;for(var At=new Uint8Array(gt+(bt-Tt)),Et=gt;Tt!==bt;)At[Et++]=vt[Tt++];return At}function dt(pt){var mt=ht(pt);if(mt)return mt;throw new Error("Non-base"+at+" character")}return{encode:ut,decodeUnsafe:ht,decode:dt}}var src=base$1;const basex=src,ALPHABET$1="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";var bs58=basex(ALPHABET$1),base58=bs58,base=function(tt){function et(ot){var at=Uint8Array.from(ot),st=tt(at),lt=at.length+4,ct=new Uint8Array(lt);return ct.set(at,0),ct.set(st.subarray(0,4),at.length),base58.encode(ct,lt)}function nt(ot){var at=ot.slice(0,-4),st=ot.slice(-4),lt=tt(at);if(!(st[0]^lt[0]|st[1]^lt[1]|st[2]^lt[2]|st[3]^lt[3]))return at}function rt(ot){var at=base58.decodeUnsafe(ot);if(at)return nt(at)}function it(ot){var at=base58.decode(ot),st=nt(at);if(!st)throw new Error("Invalid checksum");return st}return{encode:et,decode:it,decodeUnsafe:rt}},{sha256:sha256$1}=sha256$2,bs58checkBase=base;function sha256x2(tt){return sha256$1(sha256$1(tt))}var bs58check$3=bs58checkBase(sha256x2);Object.defineProperty(p2pkh$1,"__esModule",{value:!0});p2pkh$1.p2pkh=void 0;const bcrypto$5=crypto$2,networks_1$5=networks$1,bscript$8=script,types_1$6=types$6,lazy$5=lazy$9,bs58check$2=bs58check$3,OPS$4=bscript$8.OPS;function p2pkh(tt,et){if(!tt.address&&!tt.hash&&!tt.output&&!tt.pubkey&&!tt.input)throw new TypeError("Not enough data");et=Object.assign({validate:!0},et||{}),(0,types_1$6.typeforce)({network:types_1$6.typeforce.maybe(types_1$6.typeforce.Object),address:types_1$6.typeforce.maybe(types_1$6.typeforce.String),hash:types_1$6.typeforce.maybe(types_1$6.typeforce.BufferN(20)),output:types_1$6.typeforce.maybe(types_1$6.typeforce.BufferN(25)),pubkey:types_1$6.typeforce.maybe(types_1$6.isPoint),signature:types_1$6.typeforce.maybe(bscript$8.isCanonicalScriptSignature),input:types_1$6.typeforce.maybe(types_1$6.typeforce.Buffer)},tt);const nt=lazy$5.value(()=>{const at=Buffer.from(bs58check$2.decode(tt.address)),st=at.readUInt8(0),lt=at.slice(1);return{version:st,hash:lt}}),rt=lazy$5.value(()=>bscript$8.decompile(tt.input)),it=tt.network||networks_1$5.bitcoin,ot={name:"p2pkh",network:it};if(lazy$5.prop(ot,"address",()=>{if(!ot.hash)return;const at=Buffer.allocUnsafe(21);return at.writeUInt8(it.pubKeyHash,0),ot.hash.copy(at,1),bs58check$2.encode(at)}),lazy$5.prop(ot,"hash",()=>{if(tt.output)return tt.output.slice(3,23);if(tt.address)return nt().hash;if(tt.pubkey||ot.pubkey)return bcrypto$5.hash160(tt.pubkey||ot.pubkey)}),lazy$5.prop(ot,"output",()=>{if(ot.hash)return bscript$8.compile([OPS$4.OP_DUP,OPS$4.OP_HASH160,ot.hash,OPS$4.OP_EQUALVERIFY,OPS$4.OP_CHECKSIG])}),lazy$5.prop(ot,"pubkey",()=>{if(tt.input)return rt()[1]}),lazy$5.prop(ot,"signature",()=>{if(tt.input)return rt()[0]}),lazy$5.prop(ot,"input",()=>{if(tt.pubkey&&tt.signature)return bscript$8.compile([tt.signature,tt.pubkey])}),lazy$5.prop(ot,"witness",()=>{if(ot.input)return[]}),et.validate){let at=Buffer.from([]);if(tt.address){if(nt().version!==it.pubKeyHash)throw new TypeError("Invalid version or Network mismatch");if(nt().hash.length!==20)throw new TypeError("Invalid address");at=nt().hash}if(tt.hash){if(at.length>0&&!at.equals(tt.hash))throw new TypeError("Hash mismatch");at=tt.hash}if(tt.output){if(tt.output.length!==25||tt.output[0]!==OPS$4.OP_DUP||tt.output[1]!==OPS$4.OP_HASH160||tt.output[2]!==20||tt.output[23]!==OPS$4.OP_EQUALVERIFY||tt.output[24]!==OPS$4.OP_CHECKSIG)throw new TypeError("Output is invalid");const st=tt.output.slice(3,23);if(at.length>0&&!at.equals(st))throw new TypeError("Hash mismatch");at=st}if(tt.pubkey){const st=bcrypto$5.hash160(tt.pubkey);if(at.length>0&&!at.equals(st))throw new TypeError("Hash mismatch");at=st}if(tt.input){const st=rt();if(st.length!==2)throw new TypeError("Input is invalid");if(!bscript$8.isCanonicalScriptSignature(st[0]))throw new TypeError("Input has invalid signature");if(!(0,types_1$6.isPoint)(st[1]))throw new TypeError("Input has invalid pubkey");if(tt.signature&&!tt.signature.equals(st[0]))throw new TypeError("Signature mismatch");if(tt.pubkey&&!tt.pubkey.equals(st[1]))throw new TypeError("Pubkey mismatch");const lt=bcrypto$5.hash160(st[1]);if(at.length>0&&!at.equals(lt))throw new TypeError("Hash mismatch")}}return Object.assign(ot,tt)}p2pkh$1.p2pkh=p2pkh;var p2sh$1={};Object.defineProperty(p2sh$1,"__esModule",{value:!0});p2sh$1.p2sh=void 0;const bcrypto$4=crypto$2,networks_1$4=networks$1,bscript$7=script,types_1$5=types$6,lazy$4=lazy$9,bs58check$1=bs58check$3,OPS$3=bscript$7.OPS;function stacksEqual$2(tt,et){return tt.length!==et.length?!1:tt.every((nt,rt)=>nt.equals(et[rt]))}function p2sh(tt,et){if(!tt.address&&!tt.hash&&!tt.output&&!tt.redeem&&!tt.input)throw new TypeError("Not enough data");et=Object.assign({validate:!0},et||{}),(0,types_1$5.typeforce)({network:types_1$5.typeforce.maybe(types_1$5.typeforce.Object),address:types_1$5.typeforce.maybe(types_1$5.typeforce.String),hash:types_1$5.typeforce.maybe(types_1$5.typeforce.BufferN(20)),output:types_1$5.typeforce.maybe(types_1$5.typeforce.BufferN(23)),redeem:types_1$5.typeforce.maybe({network:types_1$5.typeforce.maybe(types_1$5.typeforce.Object),output:types_1$5.typeforce.maybe(types_1$5.typeforce.Buffer),input:types_1$5.typeforce.maybe(types_1$5.typeforce.Buffer),witness:types_1$5.typeforce.maybe(types_1$5.typeforce.arrayOf(types_1$5.typeforce.Buffer))}),input:types_1$5.typeforce.maybe(types_1$5.typeforce.Buffer),witness:types_1$5.typeforce.maybe(types_1$5.typeforce.arrayOf(types_1$5.typeforce.Buffer))},tt);let nt=tt.network;nt||(nt=tt.redeem&&tt.redeem.network||networks_1$4.bitcoin);const rt={network:nt},it=lazy$4.value(()=>{const st=Buffer.from(bs58check$1.decode(tt.address)),lt=st.readUInt8(0),ct=st.slice(1);return{version:lt,hash:ct}}),ot=lazy$4.value(()=>bscript$7.decompile(tt.input)),at=lazy$4.value(()=>{const st=ot(),lt=st[st.length-1];return{network:nt,output:lt===OPS$3.OP_FALSE?Buffer.from([]):lt,input:bscript$7.compile(st.slice(0,-1)),witness:tt.witness||[]}});if(lazy$4.prop(rt,"address",()=>{if(!rt.hash)return;const st=Buffer.allocUnsafe(21);return st.writeUInt8(rt.network.scriptHash,0),rt.hash.copy(st,1),bs58check$1.encode(st)}),lazy$4.prop(rt,"hash",()=>{if(tt.output)return tt.output.slice(2,22);if(tt.address)return it().hash;if(rt.redeem&&rt.redeem.output)return bcrypto$4.hash160(rt.redeem.output)}),lazy$4.prop(rt,"output",()=>{if(rt.hash)return bscript$7.compile([OPS$3.OP_HASH160,rt.hash,OPS$3.OP_EQUAL])}),lazy$4.prop(rt,"redeem",()=>{if(tt.input)return at()}),lazy$4.prop(rt,"input",()=>{if(!(!tt.redeem||!tt.redeem.input||!tt.redeem.output))return bscript$7.compile([].concat(bscript$7.decompile(tt.redeem.input),tt.redeem.output))}),lazy$4.prop(rt,"witness",()=>{if(rt.redeem&&rt.redeem.witness)return rt.redeem.witness;if(rt.input)return[]}),lazy$4.prop(rt,"name",()=>{const st=["p2sh"];return rt.redeem!==void 0&&rt.redeem.name!==void 0&&st.push(rt.redeem.name),st.join("-")}),et.validate){let st=Buffer.from([]);if(tt.address){if(it().version!==nt.scriptHash)throw new TypeError("Invalid version or Network mismatch");if(it().hash.length!==20)throw new TypeError("Invalid address");st=it().hash}if(tt.hash){if(st.length>0&&!st.equals(tt.hash))throw new TypeError("Hash mismatch");st=tt.hash}if(tt.output){if(tt.output.length!==23||tt.output[0]!==OPS$3.OP_HASH160||tt.output[1]!==20||tt.output[22]!==OPS$3.OP_EQUAL)throw new TypeError("Output is invalid");const ct=tt.output.slice(2,22);if(st.length>0&&!st.equals(ct))throw new TypeError("Hash mismatch");st=ct}const lt=ct=>{if(ct.output){const ut=bscript$7.decompile(ct.output);if(!ut||ut.length<1)throw new TypeError("Redeem.output too short");if(ct.output.byteLength>520)throw new TypeError("Redeem.output unspendable if larger than 520 bytes");if(bscript$7.countNonPushOnlyOPs(ut)>201)throw new TypeError("Redeem.output unspendable with more than 201 non-push ops");const ht=bcrypto$4.hash160(ct.output);if(st.length>0&&!st.equals(ht))throw new TypeError("Hash mismatch");st=ht}if(ct.input){const ut=ct.input.length>0,ht=ct.witness&&ct.witness.length>0;if(!ut&&!ht)throw new TypeError("Empty input");if(ut&&ht)throw new TypeError("Input and witness provided");if(ut){const dt=bscript$7.decompile(ct.input);if(!bscript$7.isPushOnly(dt))throw new TypeError("Non push-only scriptSig")}}};if(tt.input){const ct=ot();if(!ct||ct.length<1)throw new TypeError("Input too short");if(!Buffer.isBuffer(at().output))throw new TypeError("Input is invalid");lt(at())}if(tt.redeem){if(tt.redeem.network&&tt.redeem.network!==nt)throw new TypeError("Network mismatch");if(tt.input){const ct=at();if(tt.redeem.output&&!tt.redeem.output.equals(ct.output))throw new TypeError("Redeem.output mismatch");if(tt.redeem.input&&!tt.redeem.input.equals(ct.input))throw new TypeError("Redeem.input mismatch")}lt(tt.redeem)}if(tt.witness&&tt.redeem&&tt.redeem.witness&&!stacksEqual$2(tt.redeem.witness,tt.witness))throw new TypeError("Witness and redeem.witness mismatch")}return Object.assign(rt,tt)}p2sh$1.p2sh=p2sh;var p2wpkh$1={},dist={};Object.defineProperty(dist,"__esModule",{value:!0});dist.bech32m=dist.bech32=void 0;const ALPHABET="qpzry9x8gf2tvdw0s3jn54khce6mua7l",ALPHABET_MAP={};for(let tt=0;tt>25;return(tt&33554431)<<5^-(et>>0&1)&996825010^-(et>>1&1)&642813549^-(et>>2&1)&513874426^-(et>>3&1)&1027748829^-(et>>4&1)&705979059}function prefixChk(tt){let et=1;for(let nt=0;nt126)return"Invalid prefix ("+tt+")";et=polymodStep(et)^rt>>5}et=polymodStep(et);for(let nt=0;nt=nt;)ot-=nt,st.push(it>>ot&at);if(rt)ot>0&&st.push(it<=et)return"Excess padding";if(it<lt)throw new TypeError("Exceeds length limit");at=at.toLowerCase();let ct=prefixChk(at);if(typeof ct=="string")throw new Error(ct);let ut=at+"1";for(let ht=0;ht>5)throw new Error("Non 5-bit word");ct=polymodStep(ct)^dt,ut+=ALPHABET.charAt(dt)}for(let ht=0;ht<6;++ht)ct=polymodStep(ct);ct^=et;for(let ht=0;ht<6;++ht){const dt=ct>>(5-ht)*5&31;ut+=ALPHABET.charAt(dt)}return ut}function rt(at,st){if(st=st||90,at.length<8)return at+" too short";if(at.length>st)return"Exceeds length limit";const lt=at.toLowerCase(),ct=at.toUpperCase();if(at!==lt&&at!==ct)return"Mixed-case string "+at;at=lt;const ut=at.lastIndexOf("1");if(ut===-1)return"No separator character for "+at;if(ut===0)return"Missing prefix for "+at;const ht=at.slice(0,ut),dt=at.slice(ut+1);if(dt.length<6)return"Data too short";let pt=prefixChk(ht);if(typeof pt=="string")return pt;const mt=[];for(let gt=0;gt=dt.length)&&mt.push(bt)}return pt!==et?"Invalid checksum for "+at:{prefix:ht,words:mt}}function it(at,st){const lt=rt(at,st);if(typeof lt=="object")return lt}function ot(at,st){const lt=rt(at,st);if(typeof lt=="object")return lt;throw new Error(lt)}return{decodeUnsafe:it,decode:ot,encode:nt,toWords,fromWordsUnsafe,fromWords}}dist.bech32=getLibraryFromEncoding("bech32");dist.bech32m=getLibraryFromEncoding("bech32m");Object.defineProperty(p2wpkh$1,"__esModule",{value:!0});p2wpkh$1.p2wpkh=void 0;const bcrypto$3=crypto$2,networks_1$3=networks$1,bscript$6=script,types_1$4=types$6,lazy$3=lazy$9,bech32_1$3=dist,OPS$2=bscript$6.OPS,EMPTY_BUFFER$2=Buffer.alloc(0);function p2wpkh(tt,et){if(!tt.address&&!tt.hash&&!tt.output&&!tt.pubkey&&!tt.witness)throw new TypeError("Not enough data");et=Object.assign({validate:!0},et||{}),(0,types_1$4.typeforce)({address:types_1$4.typeforce.maybe(types_1$4.typeforce.String),hash:types_1$4.typeforce.maybe(types_1$4.typeforce.BufferN(20)),input:types_1$4.typeforce.maybe(types_1$4.typeforce.BufferN(0)),network:types_1$4.typeforce.maybe(types_1$4.typeforce.Object),output:types_1$4.typeforce.maybe(types_1$4.typeforce.BufferN(22)),pubkey:types_1$4.typeforce.maybe(types_1$4.isPoint),signature:types_1$4.typeforce.maybe(bscript$6.isCanonicalScriptSignature),witness:types_1$4.typeforce.maybe(types_1$4.typeforce.arrayOf(types_1$4.typeforce.Buffer))},tt);const nt=lazy$3.value(()=>{const ot=bech32_1$3.bech32.decode(tt.address),at=ot.words.shift(),st=bech32_1$3.bech32.fromWords(ot.words);return{version:at,prefix:ot.prefix,data:Buffer.from(st)}}),rt=tt.network||networks_1$3.bitcoin,it={name:"p2wpkh",network:rt};if(lazy$3.prop(it,"address",()=>{if(!it.hash)return;const ot=bech32_1$3.bech32.toWords(it.hash);return ot.unshift(0),bech32_1$3.bech32.encode(rt.bech32,ot)}),lazy$3.prop(it,"hash",()=>{if(tt.output)return tt.output.slice(2,22);if(tt.address)return nt().data;if(tt.pubkey||it.pubkey)return bcrypto$3.hash160(tt.pubkey||it.pubkey)}),lazy$3.prop(it,"output",()=>{if(it.hash)return bscript$6.compile([OPS$2.OP_0,it.hash])}),lazy$3.prop(it,"pubkey",()=>{if(tt.pubkey)return tt.pubkey;if(tt.witness)return tt.witness[1]}),lazy$3.prop(it,"signature",()=>{if(tt.witness)return tt.witness[0]}),lazy$3.prop(it,"input",()=>{if(it.witness)return EMPTY_BUFFER$2}),lazy$3.prop(it,"witness",()=>{if(tt.pubkey&&tt.signature)return[tt.signature,tt.pubkey]}),et.validate){let ot=Buffer.from([]);if(tt.address){if(rt&&rt.bech32!==nt().prefix)throw new TypeError("Invalid prefix or Network mismatch");if(nt().version!==0)throw new TypeError("Invalid address version");if(nt().data.length!==20)throw new TypeError("Invalid address data");ot=nt().data}if(tt.hash){if(ot.length>0&&!ot.equals(tt.hash))throw new TypeError("Hash mismatch");ot=tt.hash}if(tt.output){if(tt.output.length!==22||tt.output[0]!==OPS$2.OP_0||tt.output[1]!==20)throw new TypeError("Output is invalid");if(ot.length>0&&!ot.equals(tt.output.slice(2)))throw new TypeError("Hash mismatch");ot=tt.output.slice(2)}if(tt.pubkey){const at=bcrypto$3.hash160(tt.pubkey);if(ot.length>0&&!ot.equals(at))throw new TypeError("Hash mismatch");if(ot=at,!(0,types_1$4.isPoint)(tt.pubkey)||tt.pubkey.length!==33)throw new TypeError("Invalid pubkey for p2wpkh")}if(tt.witness){if(tt.witness.length!==2)throw new TypeError("Witness is invalid");if(!bscript$6.isCanonicalScriptSignature(tt.witness[0]))throw new TypeError("Witness has invalid signature");if(!(0,types_1$4.isPoint)(tt.witness[1])||tt.witness[1].length!==33)throw new TypeError("Witness has invalid pubkey");if(tt.signature&&!tt.signature.equals(tt.witness[0]))throw new TypeError("Signature mismatch");if(tt.pubkey&&!tt.pubkey.equals(tt.witness[1]))throw new TypeError("Pubkey mismatch");const at=bcrypto$3.hash160(tt.witness[1]);if(ot.length>0&&!ot.equals(at))throw new TypeError("Hash mismatch")}}return Object.assign(it,tt)}p2wpkh$1.p2wpkh=p2wpkh;var p2wsh$1={};Object.defineProperty(p2wsh$1,"__esModule",{value:!0});p2wsh$1.p2wsh=void 0;const bcrypto$2=crypto$2,networks_1$2=networks$1,bscript$5=script,types_1$3=types$6,lazy$2=lazy$9,bech32_1$2=dist,OPS$1=bscript$5.OPS,EMPTY_BUFFER$1=Buffer.alloc(0);function stacksEqual$1(tt,et){return tt.length!==et.length?!1:tt.every((nt,rt)=>nt.equals(et[rt]))}function chunkHasUncompressedPubkey(tt){return!!(Buffer.isBuffer(tt)&&tt.length===65&&tt[0]===4&&(0,types_1$3.isPoint)(tt))}function p2wsh(tt,et){if(!tt.address&&!tt.hash&&!tt.output&&!tt.redeem&&!tt.witness)throw new TypeError("Not enough data");et=Object.assign({validate:!0},et||{}),(0,types_1$3.typeforce)({network:types_1$3.typeforce.maybe(types_1$3.typeforce.Object),address:types_1$3.typeforce.maybe(types_1$3.typeforce.String),hash:types_1$3.typeforce.maybe(types_1$3.typeforce.BufferN(32)),output:types_1$3.typeforce.maybe(types_1$3.typeforce.BufferN(34)),redeem:types_1$3.typeforce.maybe({input:types_1$3.typeforce.maybe(types_1$3.typeforce.Buffer),network:types_1$3.typeforce.maybe(types_1$3.typeforce.Object),output:types_1$3.typeforce.maybe(types_1$3.typeforce.Buffer),witness:types_1$3.typeforce.maybe(types_1$3.typeforce.arrayOf(types_1$3.typeforce.Buffer))}),input:types_1$3.typeforce.maybe(types_1$3.typeforce.BufferN(0)),witness:types_1$3.typeforce.maybe(types_1$3.typeforce.arrayOf(types_1$3.typeforce.Buffer))},tt);const nt=lazy$2.value(()=>{const at=bech32_1$2.bech32.decode(tt.address),st=at.words.shift(),lt=bech32_1$2.bech32.fromWords(at.words);return{version:st,prefix:at.prefix,data:Buffer.from(lt)}}),rt=lazy$2.value(()=>bscript$5.decompile(tt.redeem.input));let it=tt.network;it||(it=tt.redeem&&tt.redeem.network||networks_1$2.bitcoin);const ot={network:it};if(lazy$2.prop(ot,"address",()=>{if(!ot.hash)return;const at=bech32_1$2.bech32.toWords(ot.hash);return at.unshift(0),bech32_1$2.bech32.encode(it.bech32,at)}),lazy$2.prop(ot,"hash",()=>{if(tt.output)return tt.output.slice(2);if(tt.address)return nt().data;if(ot.redeem&&ot.redeem.output)return bcrypto$2.sha256(ot.redeem.output)}),lazy$2.prop(ot,"output",()=>{if(ot.hash)return bscript$5.compile([OPS$1.OP_0,ot.hash])}),lazy$2.prop(ot,"redeem",()=>{if(tt.witness)return{output:tt.witness[tt.witness.length-1],input:EMPTY_BUFFER$1,witness:tt.witness.slice(0,-1)}}),lazy$2.prop(ot,"input",()=>{if(ot.witness)return EMPTY_BUFFER$1}),lazy$2.prop(ot,"witness",()=>{if(tt.redeem&&tt.redeem.input&&tt.redeem.input.length>0&&tt.redeem.output&&tt.redeem.output.length>0){const at=bscript$5.toStack(rt());return ot.redeem=Object.assign({witness:at},tt.redeem),ot.redeem.input=EMPTY_BUFFER$1,[].concat(at,tt.redeem.output)}if(tt.redeem&&tt.redeem.output&&tt.redeem.witness)return[].concat(tt.redeem.witness,tt.redeem.output)}),lazy$2.prop(ot,"name",()=>{const at=["p2wsh"];return ot.redeem!==void 0&&ot.redeem.name!==void 0&&at.push(ot.redeem.name),at.join("-")}),et.validate){let at=Buffer.from([]);if(tt.address){if(nt().prefix!==it.bech32)throw new TypeError("Invalid prefix or Network mismatch");if(nt().version!==0)throw new TypeError("Invalid address version");if(nt().data.length!==32)throw new TypeError("Invalid address data");at=nt().data}if(tt.hash){if(at.length>0&&!at.equals(tt.hash))throw new TypeError("Hash mismatch");at=tt.hash}if(tt.output){if(tt.output.length!==34||tt.output[0]!==OPS$1.OP_0||tt.output[1]!==32)throw new TypeError("Output is invalid");const st=tt.output.slice(2);if(at.length>0&&!at.equals(st))throw new TypeError("Hash mismatch");at=st}if(tt.redeem){if(tt.redeem.network&&tt.redeem.network!==it)throw new TypeError("Network mismatch");if(tt.redeem.input&&tt.redeem.input.length>0&&tt.redeem.witness&&tt.redeem.witness.length>0)throw new TypeError("Ambiguous witness source");if(tt.redeem.output){const st=bscript$5.decompile(tt.redeem.output);if(!st||st.length<1)throw new TypeError("Redeem.output is invalid");if(tt.redeem.output.byteLength>3600)throw new TypeError("Redeem.output unspendable if larger than 3600 bytes");if(bscript$5.countNonPushOnlyOPs(st)>201)throw new TypeError("Redeem.output unspendable with more than 201 non-push ops");const lt=bcrypto$2.sha256(tt.redeem.output);if(at.length>0&&!at.equals(lt))throw new TypeError("Hash mismatch");at=lt}if(tt.redeem.input&&!bscript$5.isPushOnly(rt()))throw new TypeError("Non push-only scriptSig");if(tt.witness&&tt.redeem.witness&&!stacksEqual$1(tt.witness,tt.redeem.witness))throw new TypeError("Witness and redeem.witness mismatch");if(tt.redeem.input&&rt().some(chunkHasUncompressedPubkey)||tt.redeem.output&&(bscript$5.decompile(tt.redeem.output)||[]).some(chunkHasUncompressedPubkey))throw new TypeError("redeem.input or redeem.output contains uncompressed pubkey")}if(tt.witness&&tt.witness.length>0){const st=tt.witness[tt.witness.length-1];if(tt.redeem&&tt.redeem.output&&!tt.redeem.output.equals(st))throw new TypeError("Witness and redeem.output mismatch");if(tt.witness.some(chunkHasUncompressedPubkey)||(bscript$5.decompile(st)||[]).some(chunkHasUncompressedPubkey))throw new TypeError("Witness contains uncompressed pubkey")}}return Object.assign(ot,tt)}p2wsh$1.p2wsh=p2wsh;var p2tr$1={},ecc_lib={};Object.defineProperty(ecc_lib,"__esModule",{value:!0});ecc_lib.getEccLib=ecc_lib.initEccLib=void 0;const _ECCLIB_CACHE={};function initEccLib(tt){tt?tt!==_ECCLIB_CACHE.eccLib&&(verifyEcc(tt),_ECCLIB_CACHE.eccLib=tt):_ECCLIB_CACHE.eccLib=tt}ecc_lib.initEccLib=initEccLib;function getEccLib(){if(!_ECCLIB_CACHE.eccLib)throw new Error("No ECC Library provided. You must call initEccLib() with a valid TinySecp256k1Interface instance");return _ECCLIB_CACHE.eccLib}ecc_lib.getEccLib=getEccLib;const h$5=tt=>Buffer.from(tt,"hex");function verifyEcc(tt){assert$1(typeof tt.isXOnlyPoint=="function"),assert$1(tt.isXOnlyPoint(h$5("79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798"))),assert$1(tt.isXOnlyPoint(h$5("fffffffffffffffffffffffffffffffffffffffffffffffffffffffeeffffc2e"))),assert$1(tt.isXOnlyPoint(h$5("f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9"))),assert$1(tt.isXOnlyPoint(h$5("0000000000000000000000000000000000000000000000000000000000000001"))),assert$1(!tt.isXOnlyPoint(h$5("0000000000000000000000000000000000000000000000000000000000000000"))),assert$1(!tt.isXOnlyPoint(h$5("fffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"))),assert$1(typeof tt.xOnlyPointAddTweak=="function"),tweakAddVectors.forEach(et=>{const nt=tt.xOnlyPointAddTweak(h$5(et.pubkey),h$5(et.tweak));et.result===null?assert$1(nt===null):(assert$1(nt!==null),assert$1(nt.parity===et.parity),assert$1(Buffer.from(nt.xOnlyPubkey).equals(h$5(et.result))))})}function assert$1(tt){if(!tt)throw new Error("ecc library invalid")}const tweakAddVectors=[{pubkey:"79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798",tweak:"fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364140",parity:-1,result:null},{pubkey:"1617d38ed8d8657da4d4761e8057bc396ea9e4b9d29776d4be096016dbd2509b",tweak:"a8397a935f0dfceba6ba9618f6451ef4d80637abf4e6af2669fbc9de6a8fd2ac",parity:1,result:"e478f99dab91052ab39a33ea35fd5e6e4933f4d28023cd597c9a1f6760346adf"},{pubkey:"2c0b7cf95324a07d05398b240174dc0c2be444d96b159aa6c7f7b1e668680991",tweak:"823c3cd2142744b075a87eade7e1b8678ba308d566226a0056ca2b7a76f86b47",parity:0,result:"9534f8dc8c6deda2dc007655981c78b49c5d96c778fbf363462a11ec9dfd948c"}];var bip341={},bufferutils={},Buffer$2=safeBufferExports.Buffer,MAX_SAFE_INTEGER$4=9007199254740991;function checkUInt53$1(tt){if(tt<0||tt>MAX_SAFE_INTEGER$4||tt%1!==0)throw new RangeError("value out of range")}function encode$j(tt,et,nt){if(checkUInt53$1(tt),et||(et=Buffer$2.allocUnsafe(encodingLength$1(tt))),!Buffer$2.isBuffer(et))throw new TypeError("buffer must be a Buffer instance");return nt||(nt=0),tt<253?(et.writeUInt8(tt,nt),encode$j.bytes=1):tt<=65535?(et.writeUInt8(253,nt),et.writeUInt16LE(tt,nt+1),encode$j.bytes=3):tt<=4294967295?(et.writeUInt8(254,nt),et.writeUInt32LE(tt,nt+1),encode$j.bytes=5):(et.writeUInt8(255,nt),et.writeUInt32LE(tt>>>0,nt+1),et.writeUInt32LE(tt/4294967296|0,nt+5),encode$j.bytes=9),et}function decode$i(tt,et){if(!Buffer$2.isBuffer(tt))throw new TypeError("buffer must be a Buffer instance");et||(et=0);var nt=tt.readUInt8(et);if(nt<253)return decode$i.bytes=1,nt;if(nt===253)return decode$i.bytes=3,tt.readUInt16LE(et+1);if(nt===254)return decode$i.bytes=5,tt.readUInt32LE(et+1);decode$i.bytes=9;var rt=tt.readUInt32LE(et+1),it=tt.readUInt32LE(et+5),ot=it*4294967296+rt;return checkUInt53$1(ot),ot}function encodingLength$1(tt){return checkUInt53$1(tt),tt<253?1:tt<=65535?3:tt<=4294967295?5:9}var varuintBitcoin={encode:encode$j,decode:decode$i,encodingLength:encodingLength$1};Object.defineProperty(bufferutils,"__esModule",{value:!0});bufferutils.BufferReader=bufferutils.BufferWriter=bufferutils.cloneBuffer=bufferutils.reverseBuffer=bufferutils.writeUInt64LE=bufferutils.readUInt64LE=bufferutils.varuint=void 0;const types$3=types$6,{typeforce:typeforce$2}=types$3,varuint$7=varuintBitcoin;bufferutils.varuint=varuint$7;function verifuint$1(tt,et){if(typeof tt!="number")throw new Error("cannot write a non-number as a number");if(tt<0)throw new Error("specified a negative value for writing an unsigned value");if(tt>et)throw new Error("RangeError: value out of range");if(Math.floor(tt)!==tt)throw new Error("value has a fractional component")}function readUInt64LE$1(tt,et){const nt=tt.readUInt32LE(et);let rt=tt.readUInt32LE(et+4);return rt*=4294967296,verifuint$1(rt+nt,9007199254740991),rt+nt}bufferutils.readUInt64LE=readUInt64LE$1;function writeUInt64LE$1(tt,et,nt){return verifuint$1(et,9007199254740991),tt.writeInt32LE(et&-1,nt),tt.writeUInt32LE(Math.floor(et/4294967296),nt+4),nt+8}bufferutils.writeUInt64LE=writeUInt64LE$1;function reverseBuffer$1(tt){if(tt.length<1)return tt;let et=tt.length-1,nt=0;for(let rt=0;rtthis.writeVarSlice(nt))}end(){if(this.buffer.length===this.offset)return this.buffer;throw new Error(`buffer size ${this.buffer.length}, offset ${this.offset}`)}}bufferutils.BufferWriter=BufferWriter;class BufferReader{constructor(et,nt=0){this.buffer=et,this.offset=nt,typeforce$2(types$3.tuple(types$3.Buffer,types$3.UInt32),[et,nt])}readUInt8(){const et=this.buffer.readUInt8(this.offset);return this.offset++,et}readInt32(){const et=this.buffer.readInt32LE(this.offset);return this.offset+=4,et}readUInt32(){const et=this.buffer.readUInt32LE(this.offset);return this.offset+=4,et}readUInt64(){const et=readUInt64LE$1(this.buffer,this.offset);return this.offset+=8,et}readVarInt(){const et=varuint$7.decode(this.buffer,this.offset);return this.offset+=varuint$7.decode.bytes,et}readSlice(et){if(this.buffer.length"left"in gt&&"right"in gt;function st(gt,yt){if(gt.length<33)throw new TypeError(`The control-block length is too small. Got ${gt.length}, expected min 33.`);const bt=(gt.length-33)/32;let vt=yt;for(let xt=0;xtxt.hash.compare(kt.hash));const[bt,vt]=yt;return{hash:pt(bt.hash,vt.hash),left:bt,right:vt}}tt.toHashTree=lt;function ct(gt,yt){if(at(gt)){const bt=ct(gt.left,yt);if(bt!==void 0)return[...bt,gt.right.hash];const vt=ct(gt.right,yt);if(vt!==void 0)return[...vt,gt.left.hash]}else if(gt.hash.equals(yt))return[]}tt.findScriptPath=ct;function ut(gt){const yt=gt.version||tt.LEAF_VERSION_TAPSCRIPT;return rt.taggedHash("TapLeaf",et.Buffer.concat([et.Buffer.from([yt]),mt(gt.output)]))}tt.tapleafHash=ut;function ht(gt,yt){return rt.taggedHash("TapTweak",et.Buffer.concat(yt?[gt,yt]:[gt]))}tt.tapTweakHash=ht;function dt(gt,yt){if(!et.Buffer.isBuffer(gt)||gt.length!==32||yt&&yt.length!==32)return null;const bt=ht(gt,yt),vt=(0,nt.getEccLib)().xOnlyPointAddTweak(gt,bt);return!vt||vt.xOnlyPubkey===null?null:{parity:vt.parity,x:et.Buffer.from(vt.xOnlyPubkey)}}tt.tweakKey=dt;function pt(gt,yt){return rt.taggedHash("TapBranch",et.Buffer.concat([gt,yt]))}function mt(gt){const yt=it.varuint.encodingLength(gt.length),bt=et.Buffer.allocUnsafe(yt);return it.varuint.encode(gt.length,bt),et.Buffer.concat([bt,gt])}})(bip341);Object.defineProperty(p2tr$1,"__esModule",{value:!0});p2tr$1.p2tr=void 0;const buffer_1=buffer$2,networks_1$1=networks$1,bscript$4=script,types_1$2=types$6,ecc_lib_1=ecc_lib,bip341_1$2=bip341,lazy$1=lazy$9,bech32_1$1=dist,OPS=bscript$4.OPS,TAPROOT_WITNESS_VERSION=1,ANNEX_PREFIX=80;function p2tr(tt,et){if(!tt.address&&!tt.output&&!tt.pubkey&&!tt.internalPubkey&&!(tt.witness&&tt.witness.length>1))throw new TypeError("Not enough data");et=Object.assign({validate:!0},et||{}),(0,types_1$2.typeforce)({address:types_1$2.typeforce.maybe(types_1$2.typeforce.String),input:types_1$2.typeforce.maybe(types_1$2.typeforce.BufferN(0)),network:types_1$2.typeforce.maybe(types_1$2.typeforce.Object),output:types_1$2.typeforce.maybe(types_1$2.typeforce.BufferN(34)),internalPubkey:types_1$2.typeforce.maybe(types_1$2.typeforce.BufferN(32)),hash:types_1$2.typeforce.maybe(types_1$2.typeforce.BufferN(32)),pubkey:types_1$2.typeforce.maybe(types_1$2.typeforce.BufferN(32)),signature:types_1$2.typeforce.maybe(types_1$2.typeforce.anyOf(types_1$2.typeforce.BufferN(64),types_1$2.typeforce.BufferN(65))),witness:types_1$2.typeforce.maybe(types_1$2.typeforce.arrayOf(types_1$2.typeforce.Buffer)),scriptTree:types_1$2.typeforce.maybe(types_1$2.isTaptree),redeem:types_1$2.typeforce.maybe({output:types_1$2.typeforce.maybe(types_1$2.typeforce.Buffer),redeemVersion:types_1$2.typeforce.maybe(types_1$2.typeforce.Number),witness:types_1$2.typeforce.maybe(types_1$2.typeforce.arrayOf(types_1$2.typeforce.Buffer))}),redeemVersion:types_1$2.typeforce.maybe(types_1$2.typeforce.Number)},tt);const nt=lazy$1.value(()=>{const st=bech32_1$1.bech32m.decode(tt.address),lt=st.words.shift(),ct=bech32_1$1.bech32m.fromWords(st.words);return{version:lt,prefix:st.prefix,data:buffer_1.Buffer.from(ct)}}),rt=lazy$1.value(()=>{if(!(!tt.witness||!tt.witness.length))return tt.witness.length>=2&&tt.witness[tt.witness.length-1][0]===ANNEX_PREFIX?tt.witness.slice(0,-1):tt.witness.slice()}),it=lazy$1.value(()=>{if(tt.scriptTree)return(0,bip341_1$2.toHashTree)(tt.scriptTree);if(tt.hash)return{hash:tt.hash}}),ot=tt.network||networks_1$1.bitcoin,at={name:"p2tr",network:ot};if(lazy$1.prop(at,"address",()=>{if(!at.pubkey)return;const st=bech32_1$1.bech32m.toWords(at.pubkey);return st.unshift(TAPROOT_WITNESS_VERSION),bech32_1$1.bech32m.encode(ot.bech32,st)}),lazy$1.prop(at,"hash",()=>{const st=it();if(st)return st.hash;const lt=rt();if(lt&<.length>1){const ct=lt[lt.length-1],ut=ct[0]&types_1$2.TAPLEAF_VERSION_MASK,ht=lt[lt.length-2],dt=(0,bip341_1$2.tapleafHash)({output:ht,version:ut});return(0,bip341_1$2.rootHashFromPath)(ct,dt)}return null}),lazy$1.prop(at,"output",()=>{if(at.pubkey)return bscript$4.compile([OPS.OP_1,at.pubkey])}),lazy$1.prop(at,"redeemVersion",()=>tt.redeemVersion?tt.redeemVersion:tt.redeem&&tt.redeem.redeemVersion!==void 0&&tt.redeem.redeemVersion!==null?tt.redeem.redeemVersion:bip341_1$2.LEAF_VERSION_TAPSCRIPT),lazy$1.prop(at,"redeem",()=>{const st=rt();if(!(!st||st.length<2))return{output:st[st.length-2],witness:st.slice(0,-2),redeemVersion:st[st.length-1][0]&types_1$2.TAPLEAF_VERSION_MASK}}),lazy$1.prop(at,"pubkey",()=>{if(tt.pubkey)return tt.pubkey;if(tt.output)return tt.output.slice(2);if(tt.address)return nt().data;if(at.internalPubkey){const st=(0,bip341_1$2.tweakKey)(at.internalPubkey,at.hash);if(st)return st.x}}),lazy$1.prop(at,"internalPubkey",()=>{if(tt.internalPubkey)return tt.internalPubkey;const st=rt();if(st&&st.length>1)return st[st.length-1].slice(1,33)}),lazy$1.prop(at,"signature",()=>{if(tt.signature)return tt.signature;const st=rt();if(!(!st||st.length!==1))return st[0]}),lazy$1.prop(at,"witness",()=>{if(tt.witness)return tt.witness;const st=it();if(st&&tt.redeem&&tt.redeem.output&&tt.internalPubkey){const lt=(0,bip341_1$2.tapleafHash)({output:tt.redeem.output,version:at.redeemVersion}),ct=(0,bip341_1$2.findScriptPath)(st,lt);if(!ct)return;const ut=(0,bip341_1$2.tweakKey)(tt.internalPubkey,st.hash);if(!ut)return;const ht=buffer_1.Buffer.concat([buffer_1.Buffer.from([at.redeemVersion|ut.parity]),tt.internalPubkey].concat(ct));return[tt.redeem.output,ht]}if(tt.signature)return[tt.signature]}),et.validate){let st=buffer_1.Buffer.from([]);if(tt.address){if(ot&&ot.bech32!==nt().prefix)throw new TypeError("Invalid prefix or Network mismatch");if(nt().version!==TAPROOT_WITNESS_VERSION)throw new TypeError("Invalid address version");if(nt().data.length!==32)throw new TypeError("Invalid address data");st=nt().data}if(tt.pubkey){if(st.length>0&&!st.equals(tt.pubkey))throw new TypeError("Pubkey mismatch");st=tt.pubkey}if(tt.output){if(tt.output.length!==34||tt.output[0]!==OPS.OP_1||tt.output[1]!==32)throw new TypeError("Output is invalid");if(st.length>0&&!st.equals(tt.output.slice(2)))throw new TypeError("Pubkey mismatch");st=tt.output.slice(2)}if(tt.internalPubkey){const ut=(0,bip341_1$2.tweakKey)(tt.internalPubkey,at.hash);if(st.length>0&&!st.equals(ut.x))throw new TypeError("Pubkey mismatch");st=ut.x}if(st&&st.length&&!(0,ecc_lib_1.getEccLib)().isXOnlyPoint(st))throw new TypeError("Invalid pubkey for p2tr");const lt=it();if(tt.hash&<&&!tt.hash.equals(lt.hash))throw new TypeError("Hash mismatch");if(tt.redeem&&tt.redeem.output&<){const ut=(0,bip341_1$2.tapleafHash)({output:tt.redeem.output,version:at.redeemVersion});if(!(0,bip341_1$2.findScriptPath)(lt,ut))throw new TypeError("Redeem script not in tree")}const ct=rt();if(tt.redeem&&at.redeem){if(tt.redeem.redeemVersion&&tt.redeem.redeemVersion!==at.redeem.redeemVersion)throw new TypeError("Redeem.redeemVersion and witness mismatch");if(tt.redeem.output){if(bscript$4.decompile(tt.redeem.output).length===0)throw new TypeError("Redeem.output is invalid");if(at.redeem.output&&!tt.redeem.output.equals(at.redeem.output))throw new TypeError("Redeem.output and witness mismatch")}if(tt.redeem.witness&&at.redeem.witness&&!stacksEqual(tt.redeem.witness,at.redeem.witness))throw new TypeError("Redeem.witness and witness mismatch")}if(ct&&ct.length)if(ct.length===1){if(tt.signature&&!tt.signature.equals(ct[0]))throw new TypeError("Signature mismatch")}else{const ut=ct[ct.length-1];if(ut.length<33)throw new TypeError(`The control-block length is too small. Got ${ut.length}, expected min 33.`);if((ut.length-33)%32!==0)throw new TypeError(`The control-block length of ${ut.length} is incorrect!`);const ht=(ut.length-33)/32;if(ht>128)throw new TypeError(`The script path is too long. Got ${ht}, expected max 128.`);const dt=ut.slice(1,33);if(tt.internalPubkey&&!tt.internalPubkey.equals(dt))throw new TypeError("Internal pubkey mismatch");if(!(0,ecc_lib_1.getEccLib)().isXOnlyPoint(dt))throw new TypeError("Invalid internalPubkey for p2tr witness");const pt=ut[0]&types_1$2.TAPLEAF_VERSION_MASK,mt=ct[ct.length-2],gt=(0,bip341_1$2.tapleafHash)({output:mt,version:pt}),yt=(0,bip341_1$2.rootHashFromPath)(ut,gt),bt=(0,bip341_1$2.tweakKey)(dt,yt);if(!bt)throw new TypeError("Invalid outputKey for p2tr witness");if(st.length&&!st.equals(bt.x))throw new TypeError("Pubkey mismatch for p2tr witness");if(bt.parity!==(ut[0]&1))throw new Error("Incorrect parity")}}return Object.assign(at,tt)}p2tr$1.p2tr=p2tr;function stacksEqual(tt,et){return tt.length!==et.length?!1:tt.every((nt,rt)=>nt.equals(et[rt]))}(function(tt){Object.defineProperty(tt,"__esModule",{value:!0}),tt.p2tr=tt.p2wsh=tt.p2wpkh=tt.p2sh=tt.p2pkh=tt.p2pk=tt.p2ms=tt.embed=void 0;const et=embed;Object.defineProperty(tt,"embed",{enumerable:!0,get:function(){return et.p2data}});const nt=p2ms$1;Object.defineProperty(tt,"p2ms",{enumerable:!0,get:function(){return nt.p2ms}});const rt=p2pk$1;Object.defineProperty(tt,"p2pk",{enumerable:!0,get:function(){return rt.p2pk}});const it=p2pkh$1;Object.defineProperty(tt,"p2pkh",{enumerable:!0,get:function(){return it.p2pkh}});const ot=p2sh$1;Object.defineProperty(tt,"p2sh",{enumerable:!0,get:function(){return ot.p2sh}});const at=p2wpkh$1;Object.defineProperty(tt,"p2wpkh",{enumerable:!0,get:function(){return at.p2wpkh}});const st=p2wsh$1;Object.defineProperty(tt,"p2wsh",{enumerable:!0,get:function(){return st.p2wsh}});const lt=p2tr$1;Object.defineProperty(tt,"p2tr",{enumerable:!0,get:function(){return lt.p2tr}})})(payments$3);Object.defineProperty(address,"__esModule",{value:!0});address.toOutputScript=address.fromOutputScript=address.toBech32=address.toBase58Check=address.fromBech32=address.fromBase58Check=void 0;const networks=networks$1,payments$2=payments$3,bscript$3=script,types_1$1=types$6,bech32_1=dist,bs58check=bs58check$3,FUTURE_SEGWIT_MAX_SIZE=40,FUTURE_SEGWIT_MIN_SIZE=2,FUTURE_SEGWIT_MAX_VERSION=16,FUTURE_SEGWIT_MIN_VERSION=2,FUTURE_SEGWIT_VERSION_DIFF=80,FUTURE_SEGWIT_VERSION_WARNING="WARNING: Sending to a future segwit version address can lead to loss of funds. End users MUST be warned carefully in the GUI and asked if they wish to proceed with caution. Wallets should verify the segwit version from the output of fromBech32, then decide when it is safe to use which version of segwit.";function _toFutureSegwitAddress(tt,et){const nt=tt.slice(2);if(nt.lengthFUTURE_SEGWIT_MAX_SIZE)throw new TypeError("Invalid program length for segwit address");const rt=tt[0]-FUTURE_SEGWIT_VERSION_DIFF;if(rtFUTURE_SEGWIT_MAX_VERSION)throw new TypeError("Invalid version for segwit address");if(tt[1]!==nt.length)throw new TypeError("Invalid script for segwit address");return console.warn(FUTURE_SEGWIT_VERSION_WARNING),toBech32(nt,rt,et.bech32)}function fromBase58Check(tt){const et=Buffer.from(bs58check.decode(tt));if(et.length<21)throw new TypeError(tt+" is too short");if(et.length>21)throw new TypeError(tt+" is too long");const nt=et.readUInt8(0),rt=et.slice(1);return{version:nt,hash:rt}}address.fromBase58Check=fromBase58Check;function fromBech32(tt){let et,nt;try{et=bech32_1.bech32.decode(tt)}catch{}if(et){if(nt=et.words[0],nt!==0)throw new TypeError(tt+" uses wrong encoding")}else if(et=bech32_1.bech32m.decode(tt),nt=et.words[0],nt===0)throw new TypeError(tt+" uses wrong encoding");const rt=bech32_1.bech32.fromWords(et.words.slice(1));return{version:nt,prefix:et.prefix,data:Buffer.from(rt)}}address.fromBech32=fromBech32;function toBase58Check(tt,et){(0,types_1$1.typeforce)((0,types_1$1.tuple)(types_1$1.Hash160bit,types_1$1.UInt8),arguments);const nt=Buffer.allocUnsafe(21);return nt.writeUInt8(et,0),tt.copy(nt,1),bs58check.encode(nt)}address.toBase58Check=toBase58Check;function toBech32(tt,et,nt){const rt=bech32_1.bech32.toWords(tt);return rt.unshift(et),et===0?bech32_1.bech32.encode(nt,rt):bech32_1.bech32m.encode(nt,rt)}address.toBech32=toBech32;function fromOutputScript(tt,et){et=et||networks.bitcoin;try{return payments$2.p2pkh({output:tt,network:et}).address}catch{}try{return payments$2.p2sh({output:tt,network:et}).address}catch{}try{return payments$2.p2wpkh({output:tt,network:et}).address}catch{}try{return payments$2.p2wsh({output:tt,network:et}).address}catch{}try{return payments$2.p2tr({output:tt,network:et}).address}catch{}try{return _toFutureSegwitAddress(tt,et)}catch{}throw new Error(bscript$3.toASM(tt)+" has no matching Address")}address.fromOutputScript=fromOutputScript;function toOutputScript(tt,et){et=et||networks.bitcoin;let nt,rt;try{nt=fromBase58Check(tt)}catch{}if(nt){if(nt.version===et.pubKeyHash)return payments$2.p2pkh({hash:nt.hash}).output;if(nt.version===et.scriptHash)return payments$2.p2sh({hash:nt.hash}).output}else{try{rt=fromBech32(tt)}catch{}if(rt){if(rt.prefix!==et.bech32)throw new Error(tt+" has an invalid prefix");if(rt.version===0){if(rt.data.length===20)return payments$2.p2wpkh({hash:rt.data}).output;if(rt.data.length===32)return payments$2.p2wsh({hash:rt.data}).output}else if(rt.version===1){if(rt.data.length===32)return payments$2.p2tr({pubkey:rt.data}).output}else if(rt.version>=FUTURE_SEGWIT_MIN_VERSION&&rt.version<=FUTURE_SEGWIT_MAX_VERSION&&rt.data.length>=FUTURE_SEGWIT_MIN_SIZE&&rt.data.length<=FUTURE_SEGWIT_MAX_SIZE)return console.warn(FUTURE_SEGWIT_VERSION_WARNING),bscript$3.compile([rt.version+FUTURE_SEGWIT_VERSION_DIFF,rt.data])}}throw new Error(tt+" has no matching Script")}address.toOutputScript=toOutputScript;var block={},merkle={};Object.defineProperty(merkle,"__esModule",{value:!0});merkle.fastMerkleRoot=void 0;function fastMerkleRoot(tt,et){if(!Array.isArray(tt))throw TypeError("Expected values Array");if(typeof et!="function")throw TypeError("Expected digest Function");let nt=tt.length;const rt=tt.concat();for(;nt>1;){let it=0;for(let ot=0;otnt+varSliceSize(rt),0)}const EMPTY_BUFFER=Buffer.allocUnsafe(0),EMPTY_WITNESS=[],ZERO=Buffer.from("0000000000000000000000000000000000000000000000000000000000000000","hex"),ONE$1=Buffer.from("0000000000000000000000000000000000000000000000000000000000000001","hex"),VALUE_UINT64_MAX=Buffer.from("ffffffffffffffff","hex"),BLANK_OUTPUT={script:EMPTY_BUFFER,valueBuffer:VALUE_UINT64_MAX};function isOutput(tt){return tt.value!==void 0}class Transaction{constructor(){this.version=1,this.locktime=0,this.ins=[],this.outs=[]}static fromBuffer(et,nt){const rt=new bufferutils_1$2.BufferReader(et),it=new Transaction;it.version=rt.readInt32();const ot=rt.readUInt8(),at=rt.readUInt8();let st=!1;ot===Transaction.ADVANCED_TRANSACTION_MARKER&&at===Transaction.ADVANCED_TRANSACTION_FLAG?st=!0:rt.offset-=2;const lt=rt.readVarInt();for(let ut=0;utet.witness.length!==0)}weight(){const et=this.byteLength(!1),nt=this.byteLength(!0);return et*3+nt}virtualSize(){return Math.ceil(this.weight()/4)}byteLength(et=!0){const nt=et&&this.hasWitnesses();return(nt?10:8)+bufferutils_1$2.varuint.encodingLength(this.ins.length)+bufferutils_1$2.varuint.encodingLength(this.outs.length)+this.ins.reduce((rt,it)=>rt+40+varSliceSize(it.script),0)+this.outs.reduce((rt,it)=>rt+8+varSliceSize(it.script),0)+(nt?this.ins.reduce((rt,it)=>rt+vectorSize(it.witness),0):0)}clone(){const et=new Transaction;return et.version=this.version,et.locktime=this.locktime,et.ins=this.ins.map(nt=>({hash:nt.hash,index:nt.index,script:nt.script,sequence:nt.sequence,witness:nt.witness})),et.outs=this.outs.map(nt=>({script:nt.script,value:nt.value})),et}hashForSignature(et,nt,rt){if(typeforce$1(types$2.tuple(types$2.UInt32,types$2.Buffer,types$2.Number),arguments),et>=this.ins.length)return ONE$1;const it=bscript$2.compile(bscript$2.decompile(nt).filter(st=>st!==script_1.OPS.OP_CODESEPARATOR)),ot=this.clone();if((rt&31)===Transaction.SIGHASH_NONE)ot.outs=[],ot.ins.forEach((st,lt)=>{lt!==et&&(st.sequence=0)});else if((rt&31)===Transaction.SIGHASH_SINGLE){if(et>=this.outs.length)return ONE$1;ot.outs.length=et+1;for(let st=0;st{lt!==et&&(st.sequence=0)})}rt&Transaction.SIGHASH_ANYONECANPAY?(ot.ins=[ot.ins[et]],ot.ins[0].script=it):(ot.ins.forEach(st=>{st.script=EMPTY_BUFFER}),ot.ins[et].script=it);const at=Buffer.allocUnsafe(ot.byteLength(!1)+4);return at.writeInt32LE(rt,at.length-4),ot.__toBuffer(at,0,!1),bcrypto$1.hash256(at)}hashForWitnessV1(et,nt,rt,it,ot,at){if(typeforce$1(types$2.tuple(types$2.UInt32,typeforce$1.arrayOf(types$2.Buffer),typeforce$1.arrayOf(types$2.Satoshi),types$2.UInt32),arguments),rt.length!==this.ins.length||nt.length!==this.ins.length)throw new Error("Must supply prevout script and value for all inputs");const st=it===Transaction.SIGHASH_DEFAULT?Transaction.SIGHASH_ALL:it&Transaction.SIGHASH_OUTPUT_MASK,ct=(it&Transaction.SIGHASH_INPUT_MASK)===Transaction.SIGHASH_ANYONECANPAY,ut=st===Transaction.SIGHASH_NONE,ht=st===Transaction.SIGHASH_SINGLE;let dt=EMPTY_BUFFER,pt=EMPTY_BUFFER,mt=EMPTY_BUFFER,gt=EMPTY_BUFFER,yt=EMPTY_BUFFER;if(!ct){let kt=bufferutils_1$2.BufferWriter.withCapacity(36*this.ins.length);this.ins.forEach(St=>{kt.writeSlice(St.hash),kt.writeUInt32(St.index)}),dt=bcrypto$1.sha256(kt.end()),kt=bufferutils_1$2.BufferWriter.withCapacity(8*this.ins.length),rt.forEach(St=>kt.writeUInt64(St)),pt=bcrypto$1.sha256(kt.end()),kt=bufferutils_1$2.BufferWriter.withCapacity(nt.map(varSliceSize).reduce((St,Tt)=>St+Tt)),nt.forEach(St=>kt.writeVarSlice(St)),mt=bcrypto$1.sha256(kt.end()),kt=bufferutils_1$2.BufferWriter.withCapacity(4*this.ins.length),this.ins.forEach(St=>kt.writeUInt32(St.sequence)),gt=bcrypto$1.sha256(kt.end())}if(ut||ht){if(ht&&et8+varSliceSize(Tt.script)).reduce((Tt,At)=>Tt+At),St=bufferutils_1$2.BufferWriter.withCapacity(kt);this.outs.forEach(Tt=>{St.writeUInt64(Tt.value),St.writeVarSlice(Tt.script)}),yt=bcrypto$1.sha256(St.end())}const bt=(ot?2:0)+(at?1:0),vt=174-(ct?49:0)-(ut?32:0)+(at?32:0)+(ot?37:0),xt=bufferutils_1$2.BufferWriter.withCapacity(vt);if(xt.writeUInt8(it),xt.writeInt32(this.version),xt.writeUInt32(this.locktime),xt.writeSlice(dt),xt.writeSlice(pt),xt.writeSlice(mt),xt.writeSlice(gt),ut||ht||xt.writeSlice(yt),xt.writeUInt8(bt),ct){const kt=this.ins[et];xt.writeSlice(kt.hash),xt.writeUInt32(kt.index),xt.writeUInt64(rt[et]),xt.writeVarSlice(nt[et]),xt.writeUInt32(kt.sequence)}else xt.writeUInt32(et);if(at){const kt=bufferutils_1$2.BufferWriter.withCapacity(varSliceSize(at));kt.writeVarSlice(at),xt.writeSlice(bcrypto$1.sha256(kt.end()))}return ht&&xt.writeSlice(yt),ot&&(xt.writeSlice(ot),xt.writeUInt8(0),xt.writeUInt32(4294967295)),bcrypto$1.taggedHash("TapSighash",Buffer.concat([Buffer.from([0]),xt.end()]))}hashForWitnessV0(et,nt,rt,it){typeforce$1(types$2.tuple(types$2.UInt32,types$2.Buffer,types$2.Satoshi,types$2.UInt32),arguments);let ot=Buffer.from([]),at,st=ZERO,lt=ZERO,ct=ZERO;if(it&Transaction.SIGHASH_ANYONECANPAY||(ot=Buffer.allocUnsafe(36*this.ins.length),at=new bufferutils_1$2.BufferWriter(ot,0),this.ins.forEach(ht=>{at.writeSlice(ht.hash),at.writeUInt32(ht.index)}),lt=bcrypto$1.hash256(ot)),!(it&Transaction.SIGHASH_ANYONECANPAY)&&(it&31)!==Transaction.SIGHASH_SINGLE&&(it&31)!==Transaction.SIGHASH_NONE&&(ot=Buffer.allocUnsafe(4*this.ins.length),at=new bufferutils_1$2.BufferWriter(ot,0),this.ins.forEach(ht=>{at.writeUInt32(ht.sequence)}),ct=bcrypto$1.hash256(ot)),(it&31)!==Transaction.SIGHASH_SINGLE&&(it&31)!==Transaction.SIGHASH_NONE){const ht=this.outs.reduce((dt,pt)=>dt+8+varSliceSize(pt.script),0);ot=Buffer.allocUnsafe(ht),at=new bufferutils_1$2.BufferWriter(ot,0),this.outs.forEach(dt=>{at.writeUInt64(dt.value),at.writeVarSlice(dt.script)}),st=bcrypto$1.hash256(ot)}else if((it&31)===Transaction.SIGHASH_SINGLE&&et{it.writeSlice(at.hash),it.writeUInt32(at.index),it.writeVarSlice(at.script),it.writeUInt32(at.sequence)}),it.writeVarInt(this.outs.length),this.outs.forEach(at=>{isOutput(at)?it.writeUInt64(at.value):it.writeSlice(at.valueBuffer),it.writeVarSlice(at.script)}),ot&&this.ins.forEach(at=>{it.writeVector(at.witness)}),it.writeUInt32(this.locktime),nt!==void 0?et.slice(nt,it.offset):et}}transaction.Transaction=Transaction;Transaction.DEFAULT_SEQUENCE=4294967295;Transaction.SIGHASH_DEFAULT=0;Transaction.SIGHASH_ALL=1;Transaction.SIGHASH_NONE=2;Transaction.SIGHASH_SINGLE=3;Transaction.SIGHASH_ANYONECANPAY=128;Transaction.SIGHASH_OUTPUT_MASK=3;Transaction.SIGHASH_INPUT_MASK=128;Transaction.ADVANCED_TRANSACTION_MARKER=0;Transaction.ADVANCED_TRANSACTION_FLAG=1;Object.defineProperty(block,"__esModule",{value:!0});block.Block=void 0;const bufferutils_1$1=bufferutils,bcrypto=crypto$2,merkle_1=merkle,transaction_1$3=transaction,types$1=types$6,{typeforce}=types$1,errorMerkleNoTxes=new TypeError("Cannot compute merkle root for zero transactions"),errorWitnessNotSegwit=new TypeError("Cannot compute witness commit for non-segwit block");let Block$1=class Hm{constructor(){this.version=1,this.prevHash=void 0,this.merkleRoot=void 0,this.timestamp=0,this.witnessCommit=void 0,this.bits=0,this.nonce=0,this.transactions=void 0}static fromBuffer(et){if(et.length<80)throw new Error("Buffer too small (< 80 bytes)");const nt=new bufferutils_1$1.BufferReader(et),rt=new Hm;if(rt.version=nt.readInt32(),rt.prevHash=nt.readSlice(32),rt.merkleRoot=nt.readSlice(32),rt.timestamp=nt.readUInt32(),rt.bits=nt.readUInt32(),rt.nonce=nt.readUInt32(),et.length===80)return rt;const it=()=>{const st=transaction_1$3.Transaction.fromBuffer(nt.buffer.slice(nt.offset),!0);return nt.offset+=st.byteLength(),st},ot=nt.readVarInt();rt.transactions=[];for(let st=0;st>24)-3,rt=et&8388607,it=Buffer.alloc(32,0);return it.writeUIntBE(rt,29-nt,3),it}static calculateMerkleRoot(et,nt){if(typeforce([{getHash:types$1.Function}],et),et.length===0)throw errorMerkleNoTxes;if(nt&&!txesHaveWitnessCommit(et))throw errorWitnessNotSegwit;const rt=et.map(ot=>ot.getHash(nt)),it=(0,merkle_1.fastMerkleRoot)(rt,bcrypto.hash256);return nt?bcrypto.hash256(Buffer.concat([it,et[0].ins[0].witness[0]])):it}getWitnessCommit(){if(!txesHaveWitnessCommit(this.transactions))return null;const et=this.transactions[0].outs.filter(rt=>rt.script.slice(0,6).equals(Buffer.from("6a24aa21a9ed","hex"))).map(rt=>rt.script.slice(6,38));if(et.length===0)return null;const nt=et[et.length-1];return nt instanceof Buffer&&nt.length===32?nt:null}hasWitnessCommit(){return this.witnessCommit instanceof Buffer&&this.witnessCommit.length===32||this.getWitnessCommit()!==null}hasWitness(){return anyTxHasWitness(this.transactions)}weight(){const et=this.byteLength(!1,!1),nt=this.byteLength(!1,!0);return et*3+nt}byteLength(et,nt=!0){return et||!this.transactions?80:80+bufferutils_1$1.varuint.encodingLength(this.transactions.length)+this.transactions.reduce((rt,it)=>rt+it.byteLength(nt),0)}getHash(){return bcrypto.hash256(this.toBuffer(!0))}getId(){return(0,bufferutils_1$1.reverseBuffer)(this.getHash()).toString("hex")}getUTCDate(){const et=new Date(0);return et.setUTCSeconds(this.timestamp),et}toBuffer(et){const nt=Buffer.allocUnsafe(this.byteLength(et)),rt=new bufferutils_1$1.BufferWriter(nt);return rt.writeInt32(this.version),rt.writeSlice(this.prevHash),rt.writeSlice(this.merkleRoot),rt.writeUInt32(this.timestamp),rt.writeUInt32(this.bits),rt.writeUInt32(this.nonce),et||!this.transactions||(bufferutils_1$1.varuint.encode(this.transactions.length,nt,rt.offset),rt.offset+=bufferutils_1$1.varuint.encode.bytes,this.transactions.forEach(it=>{const ot=it.byteLength();it.toBuffer(nt,rt.offset),rt.offset+=ot})),nt}toHex(et){return this.toBuffer(et).toString("hex")}checkTxRoots(){const et=this.hasWitnessCommit();return!et&&this.hasWitness()?!1:this.__checkMerkleRoot()&&(et?this.__checkWitnessCommit():!0)}checkProofOfWork(){const et=(0,bufferutils_1$1.reverseBuffer)(this.getHash()),nt=Hm.calculateTarget(this.bits);return et.compare(nt)<=0}__checkMerkleRoot(){if(!this.transactions)throw errorMerkleNoTxes;const et=Hm.calculateMerkleRoot(this.transactions);return this.merkleRoot.compare(et)===0}__checkWitnessCommit(){if(!this.transactions)throw errorMerkleNoTxes;if(!this.hasWitnessCommit())throw errorWitnessNotSegwit;const et=Hm.calculateMerkleRoot(this.transactions,!0);return this.witnessCommit.compare(et)===0}};block.Block=Block$1;function txesHaveWitnessCommit(tt){return tt instanceof Array&&tt[0]&&tt[0].ins&&tt[0].ins instanceof Array&&tt[0].ins[0]&&tt[0].ins[0].witness&&tt[0].ins[0].witness instanceof Array&&tt[0].ins[0].witness.length>0}function anyTxHasWitness(tt){return tt instanceof Array&&tt.some(et=>typeof et=="object"&&et.ins instanceof Array&&et.ins.some(nt=>typeof nt=="object"&&nt.witness instanceof Array&&nt.witness.length>0))}var psbt$1={},psbt={},combiner={},parser$1={},fromBuffer={},converter={},typeFields={};(function(tt){Object.defineProperty(tt,"__esModule",{value:!0}),function(et){et[et.UNSIGNED_TX=0]="UNSIGNED_TX",et[et.GLOBAL_XPUB=1]="GLOBAL_XPUB"}(tt.GlobalTypes||(tt.GlobalTypes={})),tt.GLOBAL_TYPE_NAMES=["unsignedTx","globalXpub"],function(et){et[et.NON_WITNESS_UTXO=0]="NON_WITNESS_UTXO",et[et.WITNESS_UTXO=1]="WITNESS_UTXO",et[et.PARTIAL_SIG=2]="PARTIAL_SIG",et[et.SIGHASH_TYPE=3]="SIGHASH_TYPE",et[et.REDEEM_SCRIPT=4]="REDEEM_SCRIPT",et[et.WITNESS_SCRIPT=5]="WITNESS_SCRIPT",et[et.BIP32_DERIVATION=6]="BIP32_DERIVATION",et[et.FINAL_SCRIPTSIG=7]="FINAL_SCRIPTSIG",et[et.FINAL_SCRIPTWITNESS=8]="FINAL_SCRIPTWITNESS",et[et.POR_COMMITMENT=9]="POR_COMMITMENT",et[et.TAP_KEY_SIG=19]="TAP_KEY_SIG",et[et.TAP_SCRIPT_SIG=20]="TAP_SCRIPT_SIG",et[et.TAP_LEAF_SCRIPT=21]="TAP_LEAF_SCRIPT",et[et.TAP_BIP32_DERIVATION=22]="TAP_BIP32_DERIVATION",et[et.TAP_INTERNAL_KEY=23]="TAP_INTERNAL_KEY",et[et.TAP_MERKLE_ROOT=24]="TAP_MERKLE_ROOT"}(tt.InputTypes||(tt.InputTypes={})),tt.INPUT_TYPE_NAMES=["nonWitnessUtxo","witnessUtxo","partialSig","sighashType","redeemScript","witnessScript","bip32Derivation","finalScriptSig","finalScriptWitness","porCommitment","tapKeySig","tapScriptSig","tapLeafScript","tapBip32Derivation","tapInternalKey","tapMerkleRoot"],function(et){et[et.REDEEM_SCRIPT=0]="REDEEM_SCRIPT",et[et.WITNESS_SCRIPT=1]="WITNESS_SCRIPT",et[et.BIP32_DERIVATION=2]="BIP32_DERIVATION",et[et.TAP_INTERNAL_KEY=5]="TAP_INTERNAL_KEY",et[et.TAP_TREE=6]="TAP_TREE",et[et.TAP_BIP32_DERIVATION=7]="TAP_BIP32_DERIVATION"}(tt.OutputTypes||(tt.OutputTypes={})),tt.OUTPUT_TYPE_NAMES=["redeemScript","witnessScript","bip32Derivation","tapInternalKey","tapTree","tapBip32Derivation"]})(typeFields);var globalXpub$1={};Object.defineProperty(globalXpub$1,"__esModule",{value:!0});const typeFields_1$g=typeFields,range$6=tt=>[...Array(tt).keys()];function decode$h(tt){if(tt.key[0]!==typeFields_1$g.GlobalTypes.GLOBAL_XPUB)throw new Error("Decode Error: could not decode globalXpub with key 0x"+tt.key.toString("hex"));if(tt.key.length!==79||![2,3].includes(tt.key[46]))throw new Error("Decode Error: globalXpub has invalid extended pubkey in key 0x"+tt.key.toString("hex"));if(tt.value.length/4%1!==0)throw new Error("Decode Error: Global GLOBAL_XPUB value length should be multiple of 4");const et=tt.key.slice(1),nt={masterFingerprint:tt.value.slice(0,4),extendedPubkey:et,path:"m"};for(const rt of range$6(tt.value.length/4-1)){const it=tt.value.readUInt32LE(rt*4+4),ot=!!(it&2147483648),at=it&2147483647;nt.path+="/"+at.toString(10)+(ot?"'":"")}return nt}globalXpub$1.decode=decode$h;function encode$i(tt){const et=Buffer.from([typeFields_1$g.GlobalTypes.GLOBAL_XPUB]),nt=Buffer.concat([et,tt.extendedPubkey]),rt=tt.path.split("/"),it=Buffer.allocUnsafe(rt.length*4);tt.masterFingerprint.copy(it,0);let ot=4;return rt.slice(1).forEach(at=>{const st=at.slice(-1)==="'";let lt=2147483647&parseInt(st?at.slice(0,-1):at,10);st&&(lt+=2147483648),it.writeUInt32LE(lt,ot),ot+=4}),{key:nt,value:it}}globalXpub$1.encode=encode$i;globalXpub$1.expected="{ masterFingerprint: Buffer; extendedPubkey: Buffer; path: string; }";function check$c(tt){const et=tt.extendedPubkey,nt=tt.masterFingerprint,rt=tt.path;return Buffer.isBuffer(et)&&et.length===78&&[2,3].indexOf(et[45])>-1&&Buffer.isBuffer(nt)&&nt.length===4&&typeof rt=="string"&&!!rt.match(/^m(\/\d+'?)*$/)}globalXpub$1.check=check$c;function canAddToArray$3(tt,et,nt){const rt=et.extendedPubkey.toString("hex");return nt.has(rt)?!1:(nt.add(rt),tt.filter(it=>it.extendedPubkey.equals(et.extendedPubkey)).length===0)}globalXpub$1.canAddToArray=canAddToArray$3;var unsignedTx$1={};Object.defineProperty(unsignedTx$1,"__esModule",{value:!0});const typeFields_1$f=typeFields;function encode$h(tt){return{key:Buffer.from([typeFields_1$f.GlobalTypes.UNSIGNED_TX]),value:tt.toBuffer()}}unsignedTx$1.encode=encode$h;var finalScriptSig$1={};Object.defineProperty(finalScriptSig$1,"__esModule",{value:!0});const typeFields_1$e=typeFields;function decode$g(tt){if(tt.key[0]!==typeFields_1$e.InputTypes.FINAL_SCRIPTSIG)throw new Error("Decode Error: could not decode finalScriptSig with key 0x"+tt.key.toString("hex"));return tt.value}finalScriptSig$1.decode=decode$g;function encode$g(tt){return{key:Buffer.from([typeFields_1$e.InputTypes.FINAL_SCRIPTSIG]),value:tt}}finalScriptSig$1.encode=encode$g;finalScriptSig$1.expected="Buffer";function check$b(tt){return Buffer.isBuffer(tt)}finalScriptSig$1.check=check$b;function canAdd$8(tt,et){return!!tt&&!!et&&tt.finalScriptSig===void 0}finalScriptSig$1.canAdd=canAdd$8;var finalScriptWitness$1={};Object.defineProperty(finalScriptWitness$1,"__esModule",{value:!0});const typeFields_1$d=typeFields;function decode$f(tt){if(tt.key[0]!==typeFields_1$d.InputTypes.FINAL_SCRIPTWITNESS)throw new Error("Decode Error: could not decode finalScriptWitness with key 0x"+tt.key.toString("hex"));return tt.value}finalScriptWitness$1.decode=decode$f;function encode$f(tt){return{key:Buffer.from([typeFields_1$d.InputTypes.FINAL_SCRIPTWITNESS]),value:tt}}finalScriptWitness$1.encode=encode$f;finalScriptWitness$1.expected="Buffer";function check$a(tt){return Buffer.isBuffer(tt)}finalScriptWitness$1.check=check$a;function canAdd$7(tt,et){return!!tt&&!!et&&tt.finalScriptWitness===void 0}finalScriptWitness$1.canAdd=canAdd$7;var nonWitnessUtxo$1={};Object.defineProperty(nonWitnessUtxo$1,"__esModule",{value:!0});const typeFields_1$c=typeFields;function decode$e(tt){if(tt.key[0]!==typeFields_1$c.InputTypes.NON_WITNESS_UTXO)throw new Error("Decode Error: could not decode nonWitnessUtxo with key 0x"+tt.key.toString("hex"));return tt.value}nonWitnessUtxo$1.decode=decode$e;function encode$e(tt){return{key:Buffer.from([typeFields_1$c.InputTypes.NON_WITNESS_UTXO]),value:tt}}nonWitnessUtxo$1.encode=encode$e;nonWitnessUtxo$1.expected="Buffer";function check$9(tt){return Buffer.isBuffer(tt)}nonWitnessUtxo$1.check=check$9;function canAdd$6(tt,et){return!!tt&&!!et&&tt.nonWitnessUtxo===void 0}nonWitnessUtxo$1.canAdd=canAdd$6;var partialSig$1={};Object.defineProperty(partialSig$1,"__esModule",{value:!0});const typeFields_1$b=typeFields;function decode$d(tt){if(tt.key[0]!==typeFields_1$b.InputTypes.PARTIAL_SIG)throw new Error("Decode Error: could not decode partialSig with key 0x"+tt.key.toString("hex"));if(!(tt.key.length===34||tt.key.length===66)||![2,3,4].includes(tt.key[1]))throw new Error("Decode Error: partialSig has invalid pubkey in key 0x"+tt.key.toString("hex"));return{pubkey:tt.key.slice(1),signature:tt.value}}partialSig$1.decode=decode$d;function encode$d(tt){const et=Buffer.from([typeFields_1$b.InputTypes.PARTIAL_SIG]);return{key:Buffer.concat([et,tt.pubkey]),value:tt.signature}}partialSig$1.encode=encode$d;partialSig$1.expected="{ pubkey: Buffer; signature: Buffer; }";function check$8(tt){return Buffer.isBuffer(tt.pubkey)&&Buffer.isBuffer(tt.signature)&&[33,65].includes(tt.pubkey.length)&&[2,3,4].includes(tt.pubkey[0])&&isDerSigWithSighash(tt.signature)}partialSig$1.check=check$8;function isDerSigWithSighash(tt){if(!Buffer.isBuffer(tt)||tt.length<9||tt[0]!==48||tt.length!==tt[1]+3||tt[2]!==2)return!1;const et=tt[3];if(et>33||et<1||tt[3+et+1]!==2)return!1;const nt=tt[3+et+2];return!(nt>33||nt<1||tt.length!==3+et+2+nt+2)}function canAddToArray$2(tt,et,nt){const rt=et.pubkey.toString("hex");return nt.has(rt)?!1:(nt.add(rt),tt.filter(it=>it.pubkey.equals(et.pubkey)).length===0)}partialSig$1.canAddToArray=canAddToArray$2;var porCommitment$1={};Object.defineProperty(porCommitment$1,"__esModule",{value:!0});const typeFields_1$a=typeFields;function decode$c(tt){if(tt.key[0]!==typeFields_1$a.InputTypes.POR_COMMITMENT)throw new Error("Decode Error: could not decode porCommitment with key 0x"+tt.key.toString("hex"));return tt.value.toString("utf8")}porCommitment$1.decode=decode$c;function encode$c(tt){return{key:Buffer.from([typeFields_1$a.InputTypes.POR_COMMITMENT]),value:Buffer.from(tt,"utf8")}}porCommitment$1.encode=encode$c;porCommitment$1.expected="string";function check$7(tt){return typeof tt=="string"}porCommitment$1.check=check$7;function canAdd$5(tt,et){return!!tt&&!!et&&tt.porCommitment===void 0}porCommitment$1.canAdd=canAdd$5;var sighashType$1={};Object.defineProperty(sighashType$1,"__esModule",{value:!0});const typeFields_1$9=typeFields;function decode$b(tt){if(tt.key[0]!==typeFields_1$9.InputTypes.SIGHASH_TYPE)throw new Error("Decode Error: could not decode sighashType with key 0x"+tt.key.toString("hex"));return tt.value.readUInt32LE(0)}sighashType$1.decode=decode$b;function encode$b(tt){const et=Buffer.from([typeFields_1$9.InputTypes.SIGHASH_TYPE]),nt=Buffer.allocUnsafe(4);return nt.writeUInt32LE(tt,0),{key:et,value:nt}}sighashType$1.encode=encode$b;sighashType$1.expected="number";function check$6(tt){return typeof tt=="number"}sighashType$1.check=check$6;function canAdd$4(tt,et){return!!tt&&!!et&&tt.sighashType===void 0}sighashType$1.canAdd=canAdd$4;var tapKeySig$1={};Object.defineProperty(tapKeySig$1,"__esModule",{value:!0});const typeFields_1$8=typeFields;function decode$a(tt){if(tt.key[0]!==typeFields_1$8.InputTypes.TAP_KEY_SIG||tt.key.length!==1)throw new Error("Decode Error: could not decode tapKeySig with key 0x"+tt.key.toString("hex"));if(!check$5(tt.value))throw new Error("Decode Error: tapKeySig not a valid 64-65-byte BIP340 signature");return tt.value}tapKeySig$1.decode=decode$a;function encode$a(tt){return{key:Buffer.from([typeFields_1$8.InputTypes.TAP_KEY_SIG]),value:tt}}tapKeySig$1.encode=encode$a;tapKeySig$1.expected="Buffer";function check$5(tt){return Buffer.isBuffer(tt)&&(tt.length===64||tt.length===65)}tapKeySig$1.check=check$5;function canAdd$3(tt,et){return!!tt&&!!et&&tt.tapKeySig===void 0}tapKeySig$1.canAdd=canAdd$3;var tapLeafScript$1={};Object.defineProperty(tapLeafScript$1,"__esModule",{value:!0});const typeFields_1$7=typeFields;function decode$9(tt){if(tt.key[0]!==typeFields_1$7.InputTypes.TAP_LEAF_SCRIPT)throw new Error("Decode Error: could not decode tapLeafScript with key 0x"+tt.key.toString("hex"));if((tt.key.length-2)%32!==0)throw new Error("Decode Error: tapLeafScript has invalid control block in key 0x"+tt.key.toString("hex"));const et=tt.value[tt.value.length-1];if((tt.key[1]&254)!==et)throw new Error("Decode Error: tapLeafScript bad leaf version in key 0x"+tt.key.toString("hex"));const nt=tt.value.slice(0,-1);return{controlBlock:tt.key.slice(1),script:nt,leafVersion:et}}tapLeafScript$1.decode=decode$9;function encode$9(tt){const et=Buffer.from([typeFields_1$7.InputTypes.TAP_LEAF_SCRIPT]),nt=Buffer.from([tt.leafVersion]);return{key:Buffer.concat([et,tt.controlBlock]),value:Buffer.concat([tt.script,nt])}}tapLeafScript$1.encode=encode$9;tapLeafScript$1.expected="{ controlBlock: Buffer; leafVersion: number, script: Buffer; }";function check$4(tt){return Buffer.isBuffer(tt.controlBlock)&&(tt.controlBlock.length-1)%32===0&&(tt.controlBlock[0]&254)===tt.leafVersion&&Buffer.isBuffer(tt.script)}tapLeafScript$1.check=check$4;function canAddToArray$1(tt,et,nt){const rt=et.controlBlock.toString("hex");return nt.has(rt)?!1:(nt.add(rt),tt.filter(it=>it.controlBlock.equals(et.controlBlock)).length===0)}tapLeafScript$1.canAddToArray=canAddToArray$1;var tapMerkleRoot$1={};Object.defineProperty(tapMerkleRoot$1,"__esModule",{value:!0});const typeFields_1$6=typeFields;function decode$8(tt){if(tt.key[0]!==typeFields_1$6.InputTypes.TAP_MERKLE_ROOT||tt.key.length!==1)throw new Error("Decode Error: could not decode tapMerkleRoot with key 0x"+tt.key.toString("hex"));if(!check$3(tt.value))throw new Error("Decode Error: tapMerkleRoot not a 32-byte hash");return tt.value}tapMerkleRoot$1.decode=decode$8;function encode$8(tt){return{key:Buffer.from([typeFields_1$6.InputTypes.TAP_MERKLE_ROOT]),value:tt}}tapMerkleRoot$1.encode=encode$8;tapMerkleRoot$1.expected="Buffer";function check$3(tt){return Buffer.isBuffer(tt)&&tt.length===32}tapMerkleRoot$1.check=check$3;function canAdd$2(tt,et){return!!tt&&!!et&&tt.tapMerkleRoot===void 0}tapMerkleRoot$1.canAdd=canAdd$2;var tapScriptSig$1={};Object.defineProperty(tapScriptSig$1,"__esModule",{value:!0});const typeFields_1$5=typeFields;function decode$7(tt){if(tt.key[0]!==typeFields_1$5.InputTypes.TAP_SCRIPT_SIG)throw new Error("Decode Error: could not decode tapScriptSig with key 0x"+tt.key.toString("hex"));if(tt.key.length!==65)throw new Error("Decode Error: tapScriptSig has invalid key 0x"+tt.key.toString("hex"));if(tt.value.length!==64&&tt.value.length!==65)throw new Error("Decode Error: tapScriptSig has invalid signature in key 0x"+tt.key.toString("hex"));const et=tt.key.slice(1,33),nt=tt.key.slice(33);return{pubkey:et,leafHash:nt,signature:tt.value}}tapScriptSig$1.decode=decode$7;function encode$7(tt){const et=Buffer.from([typeFields_1$5.InputTypes.TAP_SCRIPT_SIG]);return{key:Buffer.concat([et,tt.pubkey,tt.leafHash]),value:tt.signature}}tapScriptSig$1.encode=encode$7;tapScriptSig$1.expected="{ pubkey: Buffer; leafHash: Buffer; signature: Buffer; }";function check$2(tt){return Buffer.isBuffer(tt.pubkey)&&Buffer.isBuffer(tt.leafHash)&&Buffer.isBuffer(tt.signature)&&tt.pubkey.length===32&&tt.leafHash.length===32&&(tt.signature.length===64||tt.signature.length===65)}tapScriptSig$1.check=check$2;function canAddToArray(tt,et,nt){const rt=et.pubkey.toString("hex")+et.leafHash.toString("hex");return nt.has(rt)?!1:(nt.add(rt),tt.filter(it=>it.pubkey.equals(et.pubkey)&&it.leafHash.equals(et.leafHash)).length===0)}tapScriptSig$1.canAddToArray=canAddToArray;var witnessUtxo$1={},tools={},varint={};Object.defineProperty(varint,"__esModule",{value:!0});const MAX_SAFE_INTEGER$3=9007199254740991;function checkUInt53(tt){if(tt<0||tt>MAX_SAFE_INTEGER$3||tt%1!==0)throw new RangeError("value out of range")}function encode$6(tt,et,nt){if(checkUInt53(tt),et||(et=Buffer.allocUnsafe(encodingLength(tt))),!Buffer.isBuffer(et))throw new TypeError("buffer must be a Buffer instance");return nt||(nt=0),tt<253?(et.writeUInt8(tt,nt),Object.assign(encode$6,{bytes:1})):tt<=65535?(et.writeUInt8(253,nt),et.writeUInt16LE(tt,nt+1),Object.assign(encode$6,{bytes:3})):tt<=4294967295?(et.writeUInt8(254,nt),et.writeUInt32LE(tt,nt+1),Object.assign(encode$6,{bytes:5})):(et.writeUInt8(255,nt),et.writeUInt32LE(tt>>>0,nt+1),et.writeUInt32LE(tt/4294967296|0,nt+5),Object.assign(encode$6,{bytes:9})),et}varint.encode=encode$6;function decode$6(tt,et){if(!Buffer.isBuffer(tt))throw new TypeError("buffer must be a Buffer instance");et||(et=0);const nt=tt.readUInt8(et);if(nt<253)return Object.assign(decode$6,{bytes:1}),nt;if(nt===253)return Object.assign(decode$6,{bytes:3}),tt.readUInt16LE(et+1);if(nt===254)return Object.assign(decode$6,{bytes:5}),tt.readUInt32LE(et+1);{Object.assign(decode$6,{bytes:9});const rt=tt.readUInt32LE(et+1),ot=tt.readUInt32LE(et+5)*4294967296+rt;return checkUInt53(ot),ot}}varint.decode=decode$6;function encodingLength(tt){return checkUInt53(tt),tt<253?1:tt<=65535?3:tt<=4294967295?5:9}varint.encodingLength=encodingLength;Object.defineProperty(tools,"__esModule",{value:!0});const varuint$6=varint;tools.range=tt=>[...Array(tt).keys()];function reverseBuffer(tt){if(tt.length<1)return tt;let et=tt.length-1,nt=0;for(let rt=0;rtet)throw new Error("RangeError: value out of range");if(Math.floor(tt)!==tt)throw new Error("value has a fractional component")}function readUInt64LE(tt,et){const nt=tt.readUInt32LE(et);let rt=tt.readUInt32LE(et+4);return rt*=4294967296,verifuint(rt+nt,9007199254740991),rt+nt}tools.readUInt64LE=readUInt64LE;function writeUInt64LE(tt,et,nt){return verifuint(et,9007199254740991),tt.writeInt32LE(et&-1,nt),tt.writeUInt32LE(Math.floor(et/4294967296),nt+4),nt+8}tools.writeUInt64LE=writeUInt64LE;Object.defineProperty(witnessUtxo$1,"__esModule",{value:!0});const typeFields_1$4=typeFields,tools_1$2=tools,varuint$5=varint;function decode$5(tt){if(tt.key[0]!==typeFields_1$4.InputTypes.WITNESS_UTXO)throw new Error("Decode Error: could not decode witnessUtxo with key 0x"+tt.key.toString("hex"));const et=tools_1$2.readUInt64LE(tt.value,0);let nt=8;const rt=varuint$5.decode(tt.value,nt);nt+=varuint$5.encodingLength(rt);const it=tt.value.slice(nt);if(it.length!==rt)throw new Error("Decode Error: WITNESS_UTXO script is not proper length");return{script:it,value:et}}witnessUtxo$1.decode=decode$5;function encode$5(tt){const{script:et,value:nt}=tt,rt=varuint$5.encodingLength(et.length),it=Buffer.allocUnsafe(8+rt+et.length);return tools_1$2.writeUInt64LE(it,nt,0),varuint$5.encode(et.length,it,8),et.copy(it,8+rt),{key:Buffer.from([typeFields_1$4.InputTypes.WITNESS_UTXO]),value:it}}witnessUtxo$1.encode=encode$5;witnessUtxo$1.expected="{ script: Buffer; value: number; }";function check$1(tt){return Buffer.isBuffer(tt.script)&&typeof tt.value=="number"}witnessUtxo$1.check=check$1;function canAdd$1(tt,et){return!!tt&&!!et&&tt.witnessUtxo===void 0}witnessUtxo$1.canAdd=canAdd$1;var tapTree$1={};Object.defineProperty(tapTree$1,"__esModule",{value:!0});const typeFields_1$3=typeFields,varuint$4=varint;function decode$4(tt){if(tt.key[0]!==typeFields_1$3.OutputTypes.TAP_TREE||tt.key.length!==1)throw new Error("Decode Error: could not decode tapTree with key 0x"+tt.key.toString("hex"));let et=0;const nt=[];for(;et[Buffer.of(rt.depth,rt.leafVersion),varuint$4.encode(rt.script.length),rt.script]));return{key:et,value:Buffer.concat(nt)}}tapTree$1.encode=encode$4;tapTree$1.expected="{ leaves: [{ depth: number; leafVersion: number, script: Buffer; }] }";function check(tt){return Array.isArray(tt.leaves)&&tt.leaves.every(et=>et.depth>=0&&et.depth<=128&&(et.leafVersion&254)===et.leafVersion&&Buffer.isBuffer(et.script))}tapTree$1.check=check;function canAdd(tt,et){return!!tt&&!!et&&tt.tapTree===void 0}tapTree$1.canAdd=canAdd;var bip32Derivation$2={};Object.defineProperty(bip32Derivation$2,"__esModule",{value:!0});const range$5=tt=>[...Array(tt).keys()],isValidDERKey=tt=>tt.length===33&&[2,3].includes(tt[0])||tt.length===65&&tt[0]===4;function makeConverter$4(tt,et=isValidDERKey){function nt(st){if(st.key[0]!==tt)throw new Error("Decode Error: could not decode bip32Derivation with key 0x"+st.key.toString("hex"));const lt=st.key.slice(1);if(!et(lt))throw new Error("Decode Error: bip32Derivation has invalid pubkey in key 0x"+st.key.toString("hex"));if(st.value.length/4%1!==0)throw new Error("Decode Error: Input BIP32_DERIVATION value length should be multiple of 4");const ct={masterFingerprint:st.value.slice(0,4),pubkey:lt,path:"m"};for(const ut of range$5(st.value.length/4-1)){const ht=st.value.readUInt32LE(ut*4+4),dt=!!(ht&2147483648),pt=ht&2147483647;ct.path+="/"+pt.toString(10)+(dt?"'":"")}return ct}function rt(st){const lt=Buffer.from([tt]),ct=Buffer.concat([lt,st.pubkey]),ut=st.path.split("/"),ht=Buffer.allocUnsafe(ut.length*4);st.masterFingerprint.copy(ht,0);let dt=4;return ut.slice(1).forEach(pt=>{const mt=pt.slice(-1)==="'";let gt=2147483647&parseInt(mt?pt.slice(0,-1):pt,10);mt&&(gt+=2147483648),ht.writeUInt32LE(gt,dt),dt+=4}),{key:ct,value:ht}}const it="{ masterFingerprint: Buffer; pubkey: Buffer; path: string; }";function ot(st){return Buffer.isBuffer(st.pubkey)&&Buffer.isBuffer(st.masterFingerprint)&&typeof st.path=="string"&&et(st.pubkey)&&st.masterFingerprint.length===4}function at(st,lt,ct){const ut=lt.pubkey.toString("hex");return ct.has(ut)?!1:(ct.add(ut),st.filter(ht=>ht.pubkey.equals(lt.pubkey)).length===0)}return{decode:nt,encode:rt,check:ot,expected:it,canAddToArray:at}}bip32Derivation$2.makeConverter=makeConverter$4;var checkPubkey$1={};Object.defineProperty(checkPubkey$1,"__esModule",{value:!0});function makeChecker(tt){return et;function et(nt){let rt;if(tt.includes(nt.key[0])&&(rt=nt.key.slice(1),!(rt.length===33||rt.length===65)||![2,3,4].includes(rt[0])))throw new Error("Format Error: invalid pubkey in key 0x"+nt.key.toString("hex"));return rt}}checkPubkey$1.makeChecker=makeChecker;var redeemScript$1={};Object.defineProperty(redeemScript$1,"__esModule",{value:!0});function makeConverter$3(tt){function et(at){if(at.key[0]!==tt)throw new Error("Decode Error: could not decode redeemScript with key 0x"+at.key.toString("hex"));return at.value}function nt(at){return{key:Buffer.from([tt]),value:at}}const rt="Buffer";function it(at){return Buffer.isBuffer(at)}function ot(at,st){return!!at&&!!st&&at.redeemScript===void 0}return{decode:et,encode:nt,check:it,expected:rt,canAdd:ot}}redeemScript$1.makeConverter=makeConverter$3;var tapBip32Derivation$1={};Object.defineProperty(tapBip32Derivation$1,"__esModule",{value:!0});const varuint$3=varint,bip32Derivation$1=bip32Derivation$2,isValidBIP340Key=tt=>tt.length===32;function makeConverter$2(tt){const et=bip32Derivation$1.makeConverter(tt,isValidBIP340Key);function nt(at){const st=varuint$3.decode(at.value),lt=varuint$3.encodingLength(st),ct=et.decode({key:at.key,value:at.value.slice(lt+st*32)}),ut=new Array(st);for(let ht=0,dt=lt;htBuffer.isBuffer(st)&&st.length===32)&&et.check(at)}return{decode:nt,encode:rt,check:ot,expected:it,canAddToArray:et.canAddToArray}}tapBip32Derivation$1.makeConverter=makeConverter$2;var tapInternalKey$1={};Object.defineProperty(tapInternalKey$1,"__esModule",{value:!0});function makeConverter$1(tt){function et(at){if(at.key[0]!==tt||at.key.length!==1)throw new Error("Decode Error: could not decode tapInternalKey with key 0x"+at.key.toString("hex"));if(at.value.length!==32)throw new Error("Decode Error: tapInternalKey not a 32-byte x-only pubkey");return at.value}function nt(at){return{key:Buffer.from([tt]),value:at}}const rt="Buffer";function it(at){return Buffer.isBuffer(at)&&at.length===32}function ot(at,st){return!!at&&!!st&&at.tapInternalKey===void 0}return{decode:et,encode:nt,check:it,expected:rt,canAdd:ot}}tapInternalKey$1.makeConverter=makeConverter$1;var witnessScript$1={};Object.defineProperty(witnessScript$1,"__esModule",{value:!0});function makeConverter(tt){function et(at){if(at.key[0]!==tt)throw new Error("Decode Error: could not decode witnessScript with key 0x"+at.key.toString("hex"));return at.value}function nt(at){return{key:Buffer.from([tt]),value:at}}const rt="Buffer";function it(at){return Buffer.isBuffer(at)}function ot(at,st){return!!at&&!!st&&at.witnessScript===void 0}return{decode:et,encode:nt,check:it,expected:rt,canAdd:ot}}witnessScript$1.makeConverter=makeConverter;Object.defineProperty(converter,"__esModule",{value:!0});const typeFields_1$2=typeFields,globalXpub=globalXpub$1,unsignedTx=unsignedTx$1,finalScriptSig=finalScriptSig$1,finalScriptWitness=finalScriptWitness$1,nonWitnessUtxo=nonWitnessUtxo$1,partialSig=partialSig$1,porCommitment=porCommitment$1,sighashType=sighashType$1,tapKeySig=tapKeySig$1,tapLeafScript=tapLeafScript$1,tapMerkleRoot=tapMerkleRoot$1,tapScriptSig=tapScriptSig$1,witnessUtxo=witnessUtxo$1,tapTree=tapTree$1,bip32Derivation=bip32Derivation$2,checkPubkey=checkPubkey$1,redeemScript=redeemScript$1,tapBip32Derivation=tapBip32Derivation$1,tapInternalKey=tapInternalKey$1,witnessScript=witnessScript$1,globals={unsignedTx,globalXpub,checkPubkey:checkPubkey.makeChecker([])};converter.globals=globals;const inputs={nonWitnessUtxo,partialSig,sighashType,finalScriptSig,finalScriptWitness,porCommitment,witnessUtxo,bip32Derivation:bip32Derivation.makeConverter(typeFields_1$2.InputTypes.BIP32_DERIVATION),redeemScript:redeemScript.makeConverter(typeFields_1$2.InputTypes.REDEEM_SCRIPT),witnessScript:witnessScript.makeConverter(typeFields_1$2.InputTypes.WITNESS_SCRIPT),checkPubkey:checkPubkey.makeChecker([typeFields_1$2.InputTypes.PARTIAL_SIG,typeFields_1$2.InputTypes.BIP32_DERIVATION]),tapKeySig,tapScriptSig,tapLeafScript,tapBip32Derivation:tapBip32Derivation.makeConverter(typeFields_1$2.InputTypes.TAP_BIP32_DERIVATION),tapInternalKey:tapInternalKey.makeConverter(typeFields_1$2.InputTypes.TAP_INTERNAL_KEY),tapMerkleRoot};converter.inputs=inputs;const outputs={bip32Derivation:bip32Derivation.makeConverter(typeFields_1$2.OutputTypes.BIP32_DERIVATION),redeemScript:redeemScript.makeConverter(typeFields_1$2.OutputTypes.REDEEM_SCRIPT),witnessScript:witnessScript.makeConverter(typeFields_1$2.OutputTypes.WITNESS_SCRIPT),checkPubkey:checkPubkey.makeChecker([typeFields_1$2.OutputTypes.BIP32_DERIVATION]),tapBip32Derivation:tapBip32Derivation.makeConverter(typeFields_1$2.OutputTypes.TAP_BIP32_DERIVATION),tapTree,tapInternalKey:tapInternalKey.makeConverter(typeFields_1$2.OutputTypes.TAP_INTERNAL_KEY)};converter.outputs=outputs;Object.defineProperty(fromBuffer,"__esModule",{value:!0});const convert$2=converter,tools_1$1=tools,varuint$2=varint,typeFields_1$1=typeFields;function psbtFromBuffer(tt,et){let nt=0;function rt(){const yt=varuint$2.decode(tt,nt);nt+=varuint$2.encodingLength(yt);const bt=tt.slice(nt,nt+yt);return nt+=yt,bt}function it(){const yt=tt.readUInt32BE(nt);return nt+=4,yt}function ot(){const yt=tt.readUInt8(nt);return nt+=1,yt}function at(){const yt=rt(),bt=rt();return{key:yt,value:bt}}function st(){if(nt>=tt.length)throw new Error("Format Error: Unexpected End of PSBT");const yt=tt.readUInt8(nt)===0;return yt&&nt++,yt}if(it()!==1886610036)throw new Error("Format Error: Invalid Magic Number");if(ot()!==255)throw new Error("Format Error: Magic Number must be followed by 0xff separator");const lt=[],ct={};for(;!st();){const yt=at(),bt=yt.key.toString("hex");if(ct[bt])throw new Error("Format Error: Keys must be unique for global keymap: key "+bt);ct[bt]=1,lt.push(yt)}const ut=lt.filter(yt=>yt.key[0]===typeFields_1$1.GlobalTypes.UNSIGNED_TX);if(ut.length!==1)throw new Error("Format Error: Only one UNSIGNED_TX allowed");const ht=et(ut[0].value),{inputCount:dt,outputCount:pt}=ht.getInputOutputCounts(),mt=[],gt=[];for(const yt of tools_1$1.range(dt)){const bt={},vt=[];for(;!st();){const xt=at(),kt=xt.key.toString("hex");if(bt[kt])throw new Error("Format Error: Keys must be unique for each input: input index "+yt+" key "+kt);bt[kt]=1,vt.push(xt)}mt.push(vt)}for(const yt of tools_1$1.range(pt)){const bt={},vt=[];for(;!st();){const xt=at(),kt=xt.key.toString("hex");if(bt[kt])throw new Error("Format Error: Keys must be unique for each output: output index "+yt+" key "+kt);bt[kt]=1,vt.push(xt)}gt.push(vt)}return psbtFromKeyVals(ht,{globalMapKeyVals:lt,inputKeyVals:mt,outputKeyVals:gt})}fromBuffer.psbtFromBuffer=psbtFromBuffer;function checkKeyBuffer(tt,et,nt){if(!et.equals(Buffer.from([nt])))throw new Error(`Format Error: Invalid ${tt} key: ${et.toString("hex")}`)}fromBuffer.checkKeyBuffer=checkKeyBuffer;function psbtFromKeyVals(tt,{globalMapKeyVals:et,inputKeyVals:nt,outputKeyVals:rt}){const it={unsignedTx:tt};let ot=0;for(const ut of et)switch(ut.key[0]){case typeFields_1$1.GlobalTypes.UNSIGNED_TX:if(checkKeyBuffer("global",ut.key,typeFields_1$1.GlobalTypes.UNSIGNED_TX),ot>0)throw new Error("Format Error: GlobalMap has multiple UNSIGNED_TX");ot++;break;case typeFields_1$1.GlobalTypes.GLOBAL_XPUB:it.globalXpub===void 0&&(it.globalXpub=[]),it.globalXpub.push(convert$2.globals.globalXpub.decode(ut));break;default:it.unknownKeyVals||(it.unknownKeyVals=[]),it.unknownKeyVals.push(ut)}const at=nt.length,st=rt.length,lt=[],ct=[];for(const ut of tools_1$1.range(at)){const ht={};for(const dt of nt[ut])switch(convert$2.inputs.checkPubkey(dt),dt.key[0]){case typeFields_1$1.InputTypes.NON_WITNESS_UTXO:if(checkKeyBuffer("input",dt.key,typeFields_1$1.InputTypes.NON_WITNESS_UTXO),ht.nonWitnessUtxo!==void 0)throw new Error("Format Error: Input has multiple NON_WITNESS_UTXO");ht.nonWitnessUtxo=convert$2.inputs.nonWitnessUtxo.decode(dt);break;case typeFields_1$1.InputTypes.WITNESS_UTXO:if(checkKeyBuffer("input",dt.key,typeFields_1$1.InputTypes.WITNESS_UTXO),ht.witnessUtxo!==void 0)throw new Error("Format Error: Input has multiple WITNESS_UTXO");ht.witnessUtxo=convert$2.inputs.witnessUtxo.decode(dt);break;case typeFields_1$1.InputTypes.PARTIAL_SIG:ht.partialSig===void 0&&(ht.partialSig=[]),ht.partialSig.push(convert$2.inputs.partialSig.decode(dt));break;case typeFields_1$1.InputTypes.SIGHASH_TYPE:if(checkKeyBuffer("input",dt.key,typeFields_1$1.InputTypes.SIGHASH_TYPE),ht.sighashType!==void 0)throw new Error("Format Error: Input has multiple SIGHASH_TYPE");ht.sighashType=convert$2.inputs.sighashType.decode(dt);break;case typeFields_1$1.InputTypes.REDEEM_SCRIPT:if(checkKeyBuffer("input",dt.key,typeFields_1$1.InputTypes.REDEEM_SCRIPT),ht.redeemScript!==void 0)throw new Error("Format Error: Input has multiple REDEEM_SCRIPT");ht.redeemScript=convert$2.inputs.redeemScript.decode(dt);break;case typeFields_1$1.InputTypes.WITNESS_SCRIPT:if(checkKeyBuffer("input",dt.key,typeFields_1$1.InputTypes.WITNESS_SCRIPT),ht.witnessScript!==void 0)throw new Error("Format Error: Input has multiple WITNESS_SCRIPT");ht.witnessScript=convert$2.inputs.witnessScript.decode(dt);break;case typeFields_1$1.InputTypes.BIP32_DERIVATION:ht.bip32Derivation===void 0&&(ht.bip32Derivation=[]),ht.bip32Derivation.push(convert$2.inputs.bip32Derivation.decode(dt));break;case typeFields_1$1.InputTypes.FINAL_SCRIPTSIG:checkKeyBuffer("input",dt.key,typeFields_1$1.InputTypes.FINAL_SCRIPTSIG),ht.finalScriptSig=convert$2.inputs.finalScriptSig.decode(dt);break;case typeFields_1$1.InputTypes.FINAL_SCRIPTWITNESS:checkKeyBuffer("input",dt.key,typeFields_1$1.InputTypes.FINAL_SCRIPTWITNESS),ht.finalScriptWitness=convert$2.inputs.finalScriptWitness.decode(dt);break;case typeFields_1$1.InputTypes.POR_COMMITMENT:checkKeyBuffer("input",dt.key,typeFields_1$1.InputTypes.POR_COMMITMENT),ht.porCommitment=convert$2.inputs.porCommitment.decode(dt);break;case typeFields_1$1.InputTypes.TAP_KEY_SIG:checkKeyBuffer("input",dt.key,typeFields_1$1.InputTypes.TAP_KEY_SIG),ht.tapKeySig=convert$2.inputs.tapKeySig.decode(dt);break;case typeFields_1$1.InputTypes.TAP_SCRIPT_SIG:ht.tapScriptSig===void 0&&(ht.tapScriptSig=[]),ht.tapScriptSig.push(convert$2.inputs.tapScriptSig.decode(dt));break;case typeFields_1$1.InputTypes.TAP_LEAF_SCRIPT:ht.tapLeafScript===void 0&&(ht.tapLeafScript=[]),ht.tapLeafScript.push(convert$2.inputs.tapLeafScript.decode(dt));break;case typeFields_1$1.InputTypes.TAP_BIP32_DERIVATION:ht.tapBip32Derivation===void 0&&(ht.tapBip32Derivation=[]),ht.tapBip32Derivation.push(convert$2.inputs.tapBip32Derivation.decode(dt));break;case typeFields_1$1.InputTypes.TAP_INTERNAL_KEY:checkKeyBuffer("input",dt.key,typeFields_1$1.InputTypes.TAP_INTERNAL_KEY),ht.tapInternalKey=convert$2.inputs.tapInternalKey.decode(dt);break;case typeFields_1$1.InputTypes.TAP_MERKLE_ROOT:checkKeyBuffer("input",dt.key,typeFields_1$1.InputTypes.TAP_MERKLE_ROOT),ht.tapMerkleRoot=convert$2.inputs.tapMerkleRoot.decode(dt);break;default:ht.unknownKeyVals||(ht.unknownKeyVals=[]),ht.unknownKeyVals.push(dt)}lt.push(ht)}for(const ut of tools_1$1.range(st)){const ht={};for(const dt of rt[ut])switch(convert$2.outputs.checkPubkey(dt),dt.key[0]){case typeFields_1$1.OutputTypes.REDEEM_SCRIPT:if(checkKeyBuffer("output",dt.key,typeFields_1$1.OutputTypes.REDEEM_SCRIPT),ht.redeemScript!==void 0)throw new Error("Format Error: Output has multiple REDEEM_SCRIPT");ht.redeemScript=convert$2.outputs.redeemScript.decode(dt);break;case typeFields_1$1.OutputTypes.WITNESS_SCRIPT:if(checkKeyBuffer("output",dt.key,typeFields_1$1.OutputTypes.WITNESS_SCRIPT),ht.witnessScript!==void 0)throw new Error("Format Error: Output has multiple WITNESS_SCRIPT");ht.witnessScript=convert$2.outputs.witnessScript.decode(dt);break;case typeFields_1$1.OutputTypes.BIP32_DERIVATION:ht.bip32Derivation===void 0&&(ht.bip32Derivation=[]),ht.bip32Derivation.push(convert$2.outputs.bip32Derivation.decode(dt));break;case typeFields_1$1.OutputTypes.TAP_INTERNAL_KEY:checkKeyBuffer("output",dt.key,typeFields_1$1.OutputTypes.TAP_INTERNAL_KEY),ht.tapInternalKey=convert$2.outputs.tapInternalKey.decode(dt);break;case typeFields_1$1.OutputTypes.TAP_TREE:checkKeyBuffer("output",dt.key,typeFields_1$1.OutputTypes.TAP_TREE),ht.tapTree=convert$2.outputs.tapTree.decode(dt);break;case typeFields_1$1.OutputTypes.TAP_BIP32_DERIVATION:ht.tapBip32Derivation===void 0&&(ht.tapBip32Derivation=[]),ht.tapBip32Derivation.push(convert$2.outputs.tapBip32Derivation.decode(dt));break;default:ht.unknownKeyVals||(ht.unknownKeyVals=[]),ht.unknownKeyVals.push(dt)}ct.push(ht)}return{globalMap:it,inputs:lt,outputs:ct}}fromBuffer.psbtFromKeyVals=psbtFromKeyVals;var toBuffer={};Object.defineProperty(toBuffer,"__esModule",{value:!0});const convert$1=converter,tools_1=tools;function psbtToBuffer({globalMap:tt,inputs:et,outputs:nt}){const{globalKeyVals:rt,inputKeyVals:it,outputKeyVals:ot}=psbtToKeyVals({globalMap:tt,inputs:et,outputs:nt}),at=tools_1.keyValsToBuffer(rt),st=ht=>ht.length===0?[Buffer.from([0])]:ht.map(tools_1.keyValsToBuffer),lt=st(it),ct=st(ot),ut=Buffer.allocUnsafe(5);return ut.writeUIntBE(482972169471,0,5),Buffer.concat([ut,at].concat(lt,ct))}toBuffer.psbtToBuffer=psbtToBuffer;const sortKeyVals=(tt,et)=>tt.key.compare(et.key);function keyValsFromMap(tt,et){const nt=new Set,rt=Object.entries(tt).reduce((ot,[at,st])=>{if(at==="unknownKeyVals")return ot;const lt=et[at];if(lt===void 0)return ot;const ct=(Array.isArray(st)?st:[st]).map(lt.encode);return ct.map(ht=>ht.key.toString("hex")).forEach(ht=>{if(nt.has(ht))throw new Error("Serialize Error: Duplicate key: "+ht);nt.add(ht)}),ot.concat(ct)},[]),it=tt.unknownKeyVals?tt.unknownKeyVals.filter(ot=>!nt.has(ot.key.toString("hex"))):[];return rt.concat(it).sort(sortKeyVals)}function psbtToKeyVals({globalMap:tt,inputs:et,outputs:nt}){return{globalKeyVals:keyValsFromMap(tt,convert$1.globals),inputKeyVals:et.map(rt=>keyValsFromMap(rt,convert$1.inputs)),outputKeyVals:nt.map(rt=>keyValsFromMap(rt,convert$1.outputs))}}toBuffer.psbtToKeyVals=psbtToKeyVals;(function(tt){function et(nt){for(var rt in nt)tt.hasOwnProperty(rt)||(tt[rt]=nt[rt])}Object.defineProperty(tt,"__esModule",{value:!0}),et(fromBuffer),et(toBuffer)})(parser$1);Object.defineProperty(combiner,"__esModule",{value:!0});const parser_1$1=parser$1;function combine(tt){const et=tt[0],nt=parser_1$1.psbtToKeyVals(et),rt=tt.slice(1);if(rt.length===0)throw new Error("Combine: Nothing to combine");const it=getTx(et);if(it===void 0)throw new Error("Combine: Self missing transaction");const ot=getKeySet(nt.globalKeyVals),at=nt.inputKeyVals.map(getKeySet),st=nt.outputKeyVals.map(getKeySet);for(const lt of rt){const ct=getTx(lt);if(ct===void 0||!ct.toBuffer().equals(it.toBuffer()))throw new Error("Combine: One of the Psbts does not have the same transaction.");const ut=parser_1$1.psbtToKeyVals(lt);getKeySet(ut.globalKeyVals).forEach(keyPusher(ot,nt.globalKeyVals,ut.globalKeyVals)),ut.inputKeyVals.map(getKeySet).forEach((mt,gt)=>mt.forEach(keyPusher(at[gt],nt.inputKeyVals[gt],ut.inputKeyVals[gt]))),ut.outputKeyVals.map(getKeySet).forEach((mt,gt)=>mt.forEach(keyPusher(st[gt],nt.outputKeyVals[gt],ut.outputKeyVals[gt])))}return parser_1$1.psbtFromKeyVals(it,{globalMapKeyVals:nt.globalKeyVals,inputKeyVals:nt.inputKeyVals,outputKeyVals:nt.outputKeyVals})}combiner.combine=combine;function keyPusher(tt,et,nt){return rt=>{if(tt.has(rt))return;const it=nt.filter(ot=>ot.key.toString("hex")===rt)[0];et.push(it),tt.add(rt)}}function getTx(tt){return tt.globalMap.unsignedTx}function getKeySet(tt){const et=new Set;return tt.forEach(nt=>{const rt=nt.key.toString("hex");if(et.has(rt))throw new Error("Combine: KeyValue Map keys should be unique");et.add(rt)}),et}var utils$1={};(function(tt){Object.defineProperty(tt,"__esModule",{value:!0});const et=converter;function nt(pt,mt){const gt=pt[mt];if(gt===void 0)throw new Error(`No input #${mt}`);return gt}tt.checkForInput=nt;function rt(pt,mt){const gt=pt[mt];if(gt===void 0)throw new Error(`No output #${mt}`);return gt}tt.checkForOutput=rt;function it(pt,mt,gt){if(pt.key[0]yt.key.equals(pt.key)).length!==0)throw new Error(`Duplicate Key: ${pt.key.toString("hex")}`)}tt.checkHasKey=it;function ot(pt){let mt=0;return Object.keys(pt).forEach(gt=>{Number(isNaN(Number(gt)))&&mt++}),mt}tt.getEnumLength=ot;function at(pt,mt){let gt=!1;if(mt.nonWitnessUtxo||mt.witnessUtxo){const yt=!!mt.redeemScript,bt=!!mt.witnessScript,vt=!yt||!!mt.finalScriptSig,xt=!bt||!!mt.finalScriptWitness,kt=!!mt.finalScriptSig||!!mt.finalScriptWitness;gt=vt&&xt&&kt}if(gt===!1)throw new Error(`Input #${pt} has too much or too little data to clean`)}tt.inputCheckUncleanFinalized=at;function st(pt,mt,gt,yt){throw new Error(`Data for ${pt} key ${mt} is incorrect: Expected ${gt} and got ${JSON.stringify(yt)}`)}function lt(pt){return(mt,gt)=>{for(const yt of Object.keys(mt)){const bt=mt[yt],{canAdd:vt,canAddToArray:xt,check:kt,expected:St}=et[pt+"s"][yt]||{},Tt=!!xt;if(kt)if(Tt){if(!Array.isArray(bt)||gt[yt]&&!Array.isArray(gt[yt]))throw new Error(`Key type ${yt} must be an array`);bt.every(kt)||st(pt,yt,St,bt);const At=gt[yt]||[],Et=new Set;if(!bt.every($t=>xt(At,$t,Et)))throw new Error("Can not add duplicate data to array");gt[yt]=At.concat(bt)}else{if(kt(bt)||st(pt,yt,St,bt),!vt(gt,bt))throw new Error(`Can not add duplicate data to ${pt}`);gt[yt]=bt}}}}tt.updateGlobal=lt("global"),tt.updateInput=lt("input"),tt.updateOutput=lt("output");function ct(pt,mt){const gt=pt.length-1,yt=nt(pt,gt);tt.updateInput(mt,yt)}tt.addInputAttributes=ct;function ut(pt,mt){const gt=pt.length-1,yt=rt(pt,gt);tt.updateOutput(mt,yt)}tt.addOutputAttributes=ut;function ht(pt,mt){if(!Buffer.isBuffer(mt)||mt.length<4)throw new Error("Set Version: Invalid Transaction");return mt.writeUInt32LE(pt,0),mt}tt.defaultVersionSetter=ht;function dt(pt,mt){if(!Buffer.isBuffer(mt)||mt.length<4)throw new Error("Set Locktime: Invalid Transaction");return mt.writeUInt32LE(pt,mt.length-4),mt}tt.defaultLocktimeSetter=dt})(utils$1);Object.defineProperty(psbt,"__esModule",{value:!0});const combiner_1=combiner,parser_1=parser$1,typeFields_1=typeFields,utils_1$1=utils$1;let Psbt$1=class{constructor(et){this.inputs=[],this.outputs=[],this.globalMap={unsignedTx:et}}static fromBase64(et,nt){const rt=Buffer.from(et,"base64");return this.fromBuffer(rt,nt)}static fromHex(et,nt){const rt=Buffer.from(et,"hex");return this.fromBuffer(rt,nt)}static fromBuffer(et,nt){const rt=parser_1.psbtFromBuffer(et,nt),it=new this(rt.globalMap.unsignedTx);return Object.assign(it,rt),it}toBase64(){return this.toBuffer().toString("base64")}toHex(){return this.toBuffer().toString("hex")}toBuffer(){return parser_1.psbtToBuffer(this)}updateGlobal(et){return utils_1$1.updateGlobal(et,this.globalMap),this}updateInput(et,nt){const rt=utils_1$1.checkForInput(this.inputs,et);return utils_1$1.updateInput(nt,rt),this}updateOutput(et,nt){const rt=utils_1$1.checkForOutput(this.outputs,et);return utils_1$1.updateOutput(nt,rt),this}addUnknownKeyValToGlobal(et){return utils_1$1.checkHasKey(et,this.globalMap.unknownKeyVals,utils_1$1.getEnumLength(typeFields_1.GlobalTypes)),this.globalMap.unknownKeyVals||(this.globalMap.unknownKeyVals=[]),this.globalMap.unknownKeyVals.push(et),this}addUnknownKeyValToInput(et,nt){const rt=utils_1$1.checkForInput(this.inputs,et);return utils_1$1.checkHasKey(nt,rt.unknownKeyVals,utils_1$1.getEnumLength(typeFields_1.InputTypes)),rt.unknownKeyVals||(rt.unknownKeyVals=[]),rt.unknownKeyVals.push(nt),this}addUnknownKeyValToOutput(et,nt){const rt=utils_1$1.checkForOutput(this.outputs,et);return utils_1$1.checkHasKey(nt,rt.unknownKeyVals,utils_1$1.getEnumLength(typeFields_1.OutputTypes)),rt.unknownKeyVals||(rt.unknownKeyVals=[]),rt.unknownKeyVals.push(nt),this}addInput(et){this.globalMap.unsignedTx.addInput(et),this.inputs.push({unknownKeyVals:[]});const nt=et.unknownKeyVals||[],rt=this.inputs.length-1;if(!Array.isArray(nt))throw new Error("unknownKeyVals must be an Array");return nt.forEach(it=>this.addUnknownKeyValToInput(rt,it)),utils_1$1.addInputAttributes(this.inputs,et),this}addOutput(et){this.globalMap.unsignedTx.addOutput(et),this.outputs.push({unknownKeyVals:[]});const nt=et.unknownKeyVals||[],rt=this.outputs.length-1;if(!Array.isArray(nt))throw new Error("unknownKeyVals must be an Array");return nt.forEach(it=>this.addUnknownKeyValToOutput(rt,it)),utils_1$1.addOutputAttributes(this.outputs,et),this}clearFinalizedInput(et){const nt=utils_1$1.checkForInput(this.inputs,et);utils_1$1.inputCheckUncleanFinalized(et,nt);for(const rt of Object.keys(nt))["witnessUtxo","nonWitnessUtxo","finalScriptSig","finalScriptWitness","unknownKeyVals"].includes(rt)||delete nt[rt];return this}combine(...et){const nt=combiner_1.combine([this].concat(et));return Object.assign(this,nt),this}getTransaction(){return this.globalMap.unsignedTx.toBuffer()}};psbt.Psbt=Psbt$1;var bip371={},psbtutils={};Object.defineProperty(psbtutils,"__esModule",{value:!0});psbtutils.signatureBlocksAction=psbtutils.checkInputForSig=psbtutils.pubkeyInScript=psbtutils.pubkeyPositionInScript=psbtutils.witnessStackToScriptWitness=psbtutils.isP2TR=psbtutils.isP2SHScript=psbtutils.isP2WSHScript=psbtutils.isP2WPKH=psbtutils.isP2PKH=psbtutils.isP2PK=psbtutils.isP2MS=void 0;const varuint$1=varint,bscript$1=script,transaction_1$2=transaction,crypto_1=crypto$2,payments$1=payments$3;function isPaymentFactory(tt){return et=>{try{return tt({output:et}),!0}catch{return!1}}}psbtutils.isP2MS=isPaymentFactory(payments$1.p2ms);psbtutils.isP2PK=isPaymentFactory(payments$1.p2pk);psbtutils.isP2PKH=isPaymentFactory(payments$1.p2pkh);psbtutils.isP2WPKH=isPaymentFactory(payments$1.p2wpkh);psbtutils.isP2WSHScript=isPaymentFactory(payments$1.p2wsh);psbtutils.isP2SHScript=isPaymentFactory(payments$1.p2sh);psbtutils.isP2TR=isPaymentFactory(payments$1.p2tr);function witnessStackToScriptWitness(tt){let et=Buffer.allocUnsafe(0);function nt(at){et=Buffer.concat([et,Buffer.from(at)])}function rt(at){const st=et.length,lt=varuint$1.encodingLength(at);et=Buffer.concat([et,Buffer.allocUnsafe(lt)]),varuint$1.encode(at,et,st)}function it(at){rt(at.length),nt(at)}function ot(at){rt(at.length),at.forEach(it)}return ot(tt),et}psbtutils.witnessStackToScriptWitness=witnessStackToScriptWitness;function pubkeyPositionInScript(tt,et){const nt=(0,crypto_1.hash160)(tt),rt=tt.slice(1,33),it=bscript$1.decompile(et);if(it===null)throw new Error("Unknown script error");return it.findIndex(ot=>typeof ot=="number"?!1:ot.equals(tt)||ot.equals(nt)||ot.equals(rt))}psbtutils.pubkeyPositionInScript=pubkeyPositionInScript;function pubkeyInScript(tt,et){return pubkeyPositionInScript(tt,et)!==-1}psbtutils.pubkeyInScript=pubkeyInScript;function checkInputForSig(tt,et){return extractPartialSigs(tt).some(rt=>signatureBlocksAction(rt,bscript$1.signature.decode,et))}psbtutils.checkInputForSig=checkInputForSig;function signatureBlocksAction(tt,et,nt){const{hashType:rt}=et(tt),it=[];switch(rt&transaction_1$2.Transaction.SIGHASH_ANYONECANPAY&&it.push("addInput"),rt&31){case transaction_1$2.Transaction.SIGHASH_ALL:break;case transaction_1$2.Transaction.SIGHASH_SINGLE:case transaction_1$2.Transaction.SIGHASH_NONE:it.push("addOutput"),it.push("setInputSequence");break}return it.indexOf(nt)===-1}psbtutils.signatureBlocksAction=signatureBlocksAction;function extractPartialSigs(tt){let et=[];if((tt.partialSig||[]).length===0){if(!tt.finalScriptSig&&!tt.finalScriptWitness)return[];et=getPsigsFromInputFinalScripts(tt)}else et=tt.partialSig;return et.map(nt=>nt.signature)}function getPsigsFromInputFinalScripts(tt){const et=tt.finalScriptSig?bscript$1.decompile(tt.finalScriptSig)||[]:[],nt=tt.finalScriptWitness?bscript$1.decompile(tt.finalScriptWitness)||[]:[];return et.concat(nt).filter(rt=>Buffer.isBuffer(rt)&&bscript$1.isCanonicalScriptSignature(rt)).map(rt=>({signature:rt}))}Object.defineProperty(bip371,"__esModule",{value:!0});bip371.checkTaprootInputForSigs=bip371.tapTreeFromList=bip371.tapTreeToList=bip371.tweakInternalPubKey=bip371.checkTaprootOutputFields=bip371.checkTaprootInputFields=bip371.isTaprootOutput=bip371.isTaprootInput=bip371.serializeTaprootSignature=bip371.tapScriptFinalizer=bip371.toXOnly=void 0;const types_1=types$6,transaction_1$1=transaction,psbtutils_1$1=psbtutils,bip341_1$1=bip341,payments_1=payments$3,psbtutils_2=psbtutils,toXOnly=tt=>tt.length===32?tt:tt.slice(1,33);bip371.toXOnly=toXOnly;function tapScriptFinalizer(tt,et,nt){const rt=findTapLeafToFinalize(et,tt,nt);try{const ot=sortSignatures(et,rt).concat(rt.script).concat(rt.controlBlock);return{finalScriptWitness:(0,psbtutils_1$1.witnessStackToScriptWitness)(ot)}}catch(it){throw new Error(`Can not finalize taproot input #${tt}: ${it}`)}}bip371.tapScriptFinalizer=tapScriptFinalizer;function serializeTaprootSignature(tt,et){const nt=et?Buffer.from([et]):Buffer.from([]);return Buffer.concat([tt,nt])}bip371.serializeTaprootSignature=serializeTaprootSignature;function isTaprootInput(tt){return tt&&!!(tt.tapInternalKey||tt.tapMerkleRoot||tt.tapLeafScript&&tt.tapLeafScript.length||tt.tapBip32Derivation&&tt.tapBip32Derivation.length||tt.witnessUtxo&&(0,psbtutils_1$1.isP2TR)(tt.witnessUtxo.script))}bip371.isTaprootInput=isTaprootInput;function isTaprootOutput(tt,et){return tt&&!!(tt.tapInternalKey||tt.tapTree||tt.tapBip32Derivation&&tt.tapBip32Derivation.length||et&&(0,psbtutils_1$1.isP2TR)(et))}bip371.isTaprootOutput=isTaprootOutput;function checkTaprootInputFields(tt,et,nt){checkMixedTaprootAndNonTaprootInputFields(tt,et,nt),checkIfTapLeafInTree(tt,et,nt)}bip371.checkTaprootInputFields=checkTaprootInputFields;function checkTaprootOutputFields(tt,et,nt){checkMixedTaprootAndNonTaprootOutputFields(tt,et,nt),checkTaprootScriptPubkey(tt,et)}bip371.checkTaprootOutputFields=checkTaprootOutputFields;function checkTaprootScriptPubkey(tt,et){if(!et.tapTree&&!et.tapInternalKey)return;const nt=et.tapInternalKey||tt.tapInternalKey,rt=et.tapTree||tt.tapTree;if(nt){const{script:it}=tt,ot=getTaprootScripPubkey(nt,rt);if(it&&!it.equals(ot))throw new Error("Error adding output. Script or address missmatch.")}}function getTaprootScripPubkey(tt,et){const nt=et&&tapTreeFromList(et.leaves),{output:rt}=(0,payments_1.p2tr)({internalPubkey:tt,scriptTree:nt});return rt}function tweakInternalPubKey(tt,et){const nt=et.tapInternalKey,rt=nt&&(0,bip341_1$1.tweakKey)(nt,et.tapMerkleRoot);if(!rt)throw new Error(`Cannot tweak tap internal key for input #${tt}. Public key: ${nt&&nt.toString("hex")}`);return rt.x}bip371.tweakInternalPubKey=tweakInternalPubKey;function tapTreeToList(tt){if(!(0,types_1.isTaptree)(tt))throw new Error("Cannot convert taptree to tapleaf list. Expecting a tapree structure.");return _tapTreeToList(tt)}bip371.tapTreeToList=tapTreeToList;function tapTreeFromList(tt=[]){return tt.length===1&&tt[0].depth===0?{output:tt[0].script,version:tt[0].leafVersion}:instertLeavesInTree(tt)}bip371.tapTreeFromList=tapTreeFromList;function checkTaprootInputForSigs(tt,et){return extractTaprootSigs(tt).some(rt=>(0,psbtutils_2.signatureBlocksAction)(rt,decodeSchnorrSignature,et))}bip371.checkTaprootInputForSigs=checkTaprootInputForSigs;function decodeSchnorrSignature(tt){return{signature:tt.slice(0,64),hashType:tt.slice(64)[0]||transaction_1$1.Transaction.SIGHASH_DEFAULT}}function extractTaprootSigs(tt){const et=[];if(tt.tapKeySig&&et.push(tt.tapKeySig),tt.tapScriptSig&&et.push(...tt.tapScriptSig.map(nt=>nt.signature)),!et.length){const nt=getTapKeySigFromWithness(tt.finalScriptWitness);nt&&et.push(nt)}return et}function getTapKeySigFromWithness(tt){if(!tt)return;const et=tt.slice(2);if(et.length===64||et.length===65)return et}function _tapTreeToList(tt,et=[],nt=0){if(nt>bip341_1$1.MAX_TAPTREE_DEPTH)throw new Error("Max taptree depth exceeded.");return tt?(0,types_1.isTapleaf)(tt)?(et.push({depth:nt,leafVersion:tt.version||bip341_1$1.LEAF_VERSION_TAPSCRIPT,script:tt.output}),et):(tt[0]&&_tapTreeToList(tt[0],et,nt+1),tt[1]&&_tapTreeToList(tt[1],et,nt+1),et):[]}function instertLeavesInTree(tt){let et;for(const nt of tt)if(et=instertLeafInTree(nt,et),!et)throw new Error("No room left to insert tapleaf in tree");return et}function instertLeafInTree(tt,et,nt=0){if(nt>bip341_1$1.MAX_TAPTREE_DEPTH)throw new Error("Max taptree depth exceeded.");if(tt.depth===nt)return et?void 0:{output:tt.script,version:tt.leafVersion};if((0,types_1.isTapleaf)(et))return;const rt=instertLeafInTree(tt,et&&et[0],nt+1);if(rt)return[rt,et&&et[1]];const it=instertLeafInTree(tt,et&&et[1],nt+1);if(it)return[et&&et[0],it]}function checkMixedTaprootAndNonTaprootInputFields(tt,et,nt){const rt=isTaprootInput(tt)&&hasNonTaprootFields(et),it=hasNonTaprootFields(tt)&&isTaprootInput(et),ot=tt===et&&isTaprootInput(et)&&hasNonTaprootFields(et);if(rt||it||ot)throw new Error(`Invalid arguments for Psbt.${nt}. Cannot use both taproot and non-taproot fields.`)}function checkMixedTaprootAndNonTaprootOutputFields(tt,et,nt){const rt=isTaprootOutput(tt)&&hasNonTaprootFields(et),it=hasNonTaprootFields(tt)&&isTaprootOutput(et),ot=tt===et&&isTaprootOutput(et)&&hasNonTaprootFields(et);if(rt||it||ot)throw new Error(`Invalid arguments for Psbt.${nt}. Cannot use both taproot and non-taproot fields.`)}function checkIfTapLeafInTree(tt,et,nt){if(et.tapMerkleRoot){const rt=(et.tapLeafScript||[]).every(ot=>isTapLeafInTree(ot,et.tapMerkleRoot)),it=(tt.tapLeafScript||[]).every(ot=>isTapLeafInTree(ot,et.tapMerkleRoot));if(!rt||!it)throw new Error(`Invalid arguments for Psbt.${nt}. Tapleaf not part of taptree.`)}else if(tt.tapMerkleRoot&&!(et.tapLeafScript||[]).every(it=>isTapLeafInTree(it,tt.tapMerkleRoot)))throw new Error(`Invalid arguments for Psbt.${nt}. Tapleaf not part of taptree.`)}function isTapLeafInTree(tt,et){if(!et)return!0;const nt=(0,bip341_1$1.tapleafHash)({output:tt.script,version:tt.leafVersion});return(0,bip341_1$1.rootHashFromPath)(tt.controlBlock,nt).equals(et)}function sortSignatures(tt,et){const nt=(0,bip341_1$1.tapleafHash)({output:et.script,version:et.leafVersion});return(tt.tapScriptSig||[]).filter(rt=>rt.leafHash.equals(nt)).map(rt=>addPubkeyPositionInScript(et.script,rt)).sort((rt,it)=>it.positionInScript-rt.positionInScript).map(rt=>rt.signature)}function addPubkeyPositionInScript(tt,et){return Object.assign({positionInScript:(0,psbtutils_1$1.pubkeyPositionInScript)(et.pubkey,tt)},et)}function findTapLeafToFinalize(tt,et,nt){if(!tt.tapScriptSig||!tt.tapScriptSig.length)throw new Error(`Can not finalize taproot input #${et}. No tapleaf script signature provided.`);const rt=(tt.tapLeafScript||[]).sort((it,ot)=>it.controlBlock.length-ot.controlBlock.length).find(it=>canFinalizeLeaf(it,tt.tapScriptSig,nt));if(!rt)throw new Error(`Can not finalize taproot input #${et}. Signature for tapleaf script not found.`);return rt}function canFinalizeLeaf(tt,et,nt){const rt=(0,bip341_1$1.tapleafHash)({output:tt.script,version:tt.leafVersion});return(!nt||nt.equals(rt))&&et.find(ot=>ot.leafHash.equals(rt))!==void 0}function hasNonTaprootFields(tt){return tt&&!!(tt.redeemScript||tt.witnessScript||tt.bip32Derivation&&tt.bip32Derivation.length)}Object.defineProperty(psbt$1,"__esModule",{value:!0});psbt$1.Psbt=void 0;const bip174_1=psbt,varuint=varint,utils_1=utils$1,address_1=address,bufferutils_1=bufferutils,networks_1=networks$1,payments=payments$3,bip341_1=bip341,bscript=script,transaction_1=transaction,bip371_1=bip371,psbtutils_1=psbtutils,DEFAULT_OPTS={network:networks_1.bitcoin,maximumFeeRate:5e3};class Psbt{static fromBase64(et,nt={}){const rt=Buffer.from(et,"base64");return this.fromBuffer(rt,nt)}static fromHex(et,nt={}){const rt=Buffer.from(et,"hex");return this.fromBuffer(rt,nt)}static fromBuffer(et,nt={}){const rt=bip174_1.Psbt.fromBuffer(et,transactionFromBuffer),it=new Psbt(nt,rt);return checkTxForDupeIns(it.__CACHE.__TX,it.__CACHE),it}constructor(et={},nt=new bip174_1.Psbt(new PsbtTransaction)){this.data=nt,this.opts=Object.assign({},DEFAULT_OPTS,et),this.__CACHE={__NON_WITNESS_UTXO_TX_CACHE:[],__NON_WITNESS_UTXO_BUF_CACHE:[],__TX_IN_CACHE:{},__TX:this.data.globalMap.unsignedTx.tx,__UNSAFE_SIGN_NONSEGWIT:!1},this.data.inputs.length===0&&this.setVersion(2);const rt=(it,ot,at,st)=>Object.defineProperty(it,ot,{enumerable:at,writable:st});rt(this,"__CACHE",!1,!0),rt(this,"opts",!1,!0)}get inputCount(){return this.data.inputs.length}get version(){return this.__CACHE.__TX.version}set version(et){this.setVersion(et)}get locktime(){return this.__CACHE.__TX.locktime}set locktime(et){this.setLocktime(et)}get txInputs(){return this.__CACHE.__TX.ins.map(et=>({hash:(0,bufferutils_1.cloneBuffer)(et.hash),index:et.index,sequence:et.sequence}))}get txOutputs(){return this.__CACHE.__TX.outs.map(et=>{let nt;try{nt=(0,address_1.fromOutputScript)(et.script,this.opts.network)}catch{}return{script:(0,bufferutils_1.cloneBuffer)(et.script),value:et.value,address:nt}})}combine(...et){return this.data.combine(...et.map(nt=>nt.data)),this}clone(){const et=Psbt.fromBuffer(this.data.toBuffer());return et.opts=JSON.parse(JSON.stringify(this.opts)),et}setMaximumFeeRate(et){check32Bit(et),this.opts.maximumFeeRate=et}setVersion(et){check32Bit(et),checkInputsForPartialSig(this.data.inputs,"setVersion");const nt=this.__CACHE;return nt.__TX.version=et,nt.__EXTRACTED_TX=void 0,this}setLocktime(et){check32Bit(et),checkInputsForPartialSig(this.data.inputs,"setLocktime");const nt=this.__CACHE;return nt.__TX.locktime=et,nt.__EXTRACTED_TX=void 0,this}setInputSequence(et,nt){check32Bit(nt),checkInputsForPartialSig(this.data.inputs,"setInputSequence");const rt=this.__CACHE;if(rt.__TX.ins.length<=et)throw new Error("Input index too high");return rt.__TX.ins[et].sequence=nt,rt.__EXTRACTED_TX=void 0,this}addInputs(et){return et.forEach(nt=>this.addInput(nt)),this}addInput(et){if(arguments.length>1||!et||et.hash===void 0||et.index===void 0)throw new Error("Invalid arguments for Psbt.addInput. Requires single object with at least [hash] and [index]");(0,bip371_1.checkTaprootInputFields)(et,et,"addInput"),checkInputsForPartialSig(this.data.inputs,"addInput"),et.witnessScript&&checkInvalidP2WSH(et.witnessScript);const nt=this.__CACHE;this.data.addInput(et);const rt=nt.__TX.ins[nt.__TX.ins.length-1];checkTxInputCache(nt,rt);const it=this.data.inputs.length-1,ot=this.data.inputs[it];return ot.nonWitnessUtxo&&addNonWitnessTxCache(this.__CACHE,ot,it),nt.__FEE=void 0,nt.__FEE_RATE=void 0,nt.__EXTRACTED_TX=void 0,this}addOutputs(et){return et.forEach(nt=>this.addOutput(nt)),this}addOutput(et){if(arguments.length>1||!et||et.value===void 0||et.address===void 0&&et.script===void 0)throw new Error("Invalid arguments for Psbt.addOutput. Requires single object with at least [script or address] and [value]");checkInputsForPartialSig(this.data.inputs,"addOutput");const{address:nt}=et;if(typeof nt=="string"){const{network:it}=this.opts,ot=(0,address_1.toOutputScript)(nt,it);et=Object.assign(et,{script:ot})}(0,bip371_1.checkTaprootOutputFields)(et,et,"addOutput");const rt=this.__CACHE;return this.data.addOutput(et),rt.__FEE=void 0,rt.__FEE_RATE=void 0,rt.__EXTRACTED_TX=void 0,this}extractTransaction(et){if(!this.data.inputs.every(isFinalized))throw new Error("Not finalized");const nt=this.__CACHE;if(et||checkFees(this,nt,this.opts),nt.__EXTRACTED_TX)return nt.__EXTRACTED_TX;const rt=nt.__TX.clone();return inputFinalizeGetAmts(this.data.inputs,rt,nt,!0),rt}getFeeRate(){return getTxCacheValue("__FEE_RATE","fee rate",this.data.inputs,this.__CACHE)}getFee(){return getTxCacheValue("__FEE","fee",this.data.inputs,this.__CACHE)}finalizeAllInputs(){return(0,utils_1.checkForInput)(this.data.inputs,0),range$4(this.data.inputs.length).forEach(et=>this.finalizeInput(et)),this}finalizeInput(et,nt){const rt=(0,utils_1.checkForInput)(this.data.inputs,et);return(0,bip371_1.isTaprootInput)(rt)?this._finalizeTaprootInput(et,rt,void 0,nt):this._finalizeInput(et,rt,nt)}finalizeTaprootInput(et,nt,rt=bip371_1.tapScriptFinalizer){const it=(0,utils_1.checkForInput)(this.data.inputs,et);if((0,bip371_1.isTaprootInput)(it))return this._finalizeTaprootInput(et,it,nt,rt);throw new Error(`Cannot finalize input #${et}. Not Taproot.`)}_finalizeInput(et,nt,rt=getFinalScripts){const{script:it,isP2SH:ot,isP2WSH:at,isSegwit:st}=getScriptFromInput(et,nt,this.__CACHE);if(!it)throw new Error(`No script found for input #${et}`);checkPartialSigSighashes(nt);const{finalScriptSig:lt,finalScriptWitness:ct}=rt(et,nt,it,st,ot,at);if(lt&&this.data.updateInput(et,{finalScriptSig:lt}),ct&&this.data.updateInput(et,{finalScriptWitness:ct}),!lt&&!ct)throw new Error(`Unknown error finalizing input #${et}`);return this.data.clearFinalizedInput(et),this}_finalizeTaprootInput(et,nt,rt,it=bip371_1.tapScriptFinalizer){if(!nt.witnessUtxo)throw new Error(`Cannot finalize input #${et}. Missing withness utxo.`);if(nt.tapKeySig){const ot=payments.p2tr({output:nt.witnessUtxo.script,signature:nt.tapKeySig}),at=(0,psbtutils_1.witnessStackToScriptWitness)(ot.witness);this.data.updateInput(et,{finalScriptWitness:at})}else{const{finalScriptWitness:ot}=it(et,nt,rt);this.data.updateInput(et,{finalScriptWitness:ot})}return this.data.clearFinalizedInput(et),this}getInputType(et){const nt=(0,utils_1.checkForInput)(this.data.inputs,et),rt=getScriptFromUtxo(et,nt,this.__CACHE),it=getMeaningfulScript(rt,et,"input",nt.redeemScript||redeemFromFinalScriptSig(nt.finalScriptSig),nt.witnessScript||redeemFromFinalWitnessScript(nt.finalScriptWitness)),ot=it.type==="raw"?"":it.type+"-",at=classifyScript(it.meaningfulScript);return ot+at}inputHasPubkey(et,nt){const rt=(0,utils_1.checkForInput)(this.data.inputs,et);return pubkeyInInput(nt,rt,et,this.__CACHE)}inputHasHDKey(et,nt){const rt=(0,utils_1.checkForInput)(this.data.inputs,et),it=bip32DerivationIsMine(nt);return!!rt.bip32Derivation&&rt.bip32Derivation.some(it)}outputHasPubkey(et,nt){const rt=(0,utils_1.checkForOutput)(this.data.outputs,et);return pubkeyInOutput(nt,rt,et,this.__CACHE)}outputHasHDKey(et,nt){const rt=(0,utils_1.checkForOutput)(this.data.outputs,et),it=bip32DerivationIsMine(nt);return!!rt.bip32Derivation&&rt.bip32Derivation.some(it)}validateSignaturesOfAllInputs(et){return(0,utils_1.checkForInput)(this.data.inputs,0),range$4(this.data.inputs.length).map(rt=>this.validateSignaturesOfInput(rt,et)).reduce((rt,it)=>it===!0&&rt,!0)}validateSignaturesOfInput(et,nt,rt){const it=this.data.inputs[et];return(0,bip371_1.isTaprootInput)(it)?this.validateSignaturesOfTaprootInput(et,nt,rt):this._validateSignaturesOfInput(et,nt,rt)}_validateSignaturesOfInput(et,nt,rt){const it=this.data.inputs[et],ot=(it||{}).partialSig;if(!it||!ot||ot.length<1)throw new Error("No signatures to validate");if(typeof nt!="function")throw new Error("Need validator function to validate signatures");const at=rt?ot.filter(ht=>ht.pubkey.equals(rt)):ot;if(at.length<1)throw new Error("No signatures for this pubkey");const st=[];let lt,ct,ut;for(const ht of at){const dt=bscript.signature.decode(ht.signature),{hash:pt,script:mt}=ut!==dt.hashType?getHashForSig(et,Object.assign({},it,{sighashType:dt.hashType}),this.__CACHE,!0):{hash:lt,script:ct};ut=dt.hashType,lt=pt,ct=mt,checkScriptForPubkey(ht.pubkey,mt,"verify"),st.push(nt(ht.pubkey,pt,dt.signature))}return st.every(ht=>ht===!0)}validateSignaturesOfTaprootInput(et,nt,rt){const it=this.data.inputs[et],ot=(it||{}).tapKeySig,at=(it||{}).tapScriptSig;if(!it&&!ot&&!(at&&!at.length))throw new Error("No signatures to validate");if(typeof nt!="function")throw new Error("Need validator function to validate signatures");rt=rt&&(0,bip371_1.toXOnly)(rt);const st=rt?getTaprootHashesForSig(et,it,this.data.inputs,rt,this.__CACHE):getAllTaprootHashesForSig(et,it,this.data.inputs,this.__CACHE);if(!st.length)throw new Error("No signatures for this pubkey");const lt=st.find(ut=>!ut.leafHash);let ct=0;if(ot&<){if(!nt(lt.pubkey,lt.hash,trimTaprootSig(ot)))return!1;ct++}if(at)for(const ut of at){const ht=st.find(dt=>ut.pubkey.equals(dt.pubkey));if(ht){if(!nt(ut.pubkey,ht.hash,trimTaprootSig(ut.signature)))return!1;ct++}}return ct>0}signAllInputsHD(et,nt=[transaction_1.Transaction.SIGHASH_ALL]){if(!et||!et.publicKey||!et.fingerprint)throw new Error("Need HDSigner to sign input");const rt=[];for(const it of range$4(this.data.inputs.length))try{this.signInputHD(it,et,nt),rt.push(!0)}catch{rt.push(!1)}if(rt.every(it=>it===!1))throw new Error("No inputs were signed");return this}signAllInputsHDAsync(et,nt=[transaction_1.Transaction.SIGHASH_ALL]){return new Promise((rt,it)=>{if(!et||!et.publicKey||!et.fingerprint)return it(new Error("Need HDSigner to sign input"));const ot=[],at=[];for(const st of range$4(this.data.inputs.length))at.push(this.signInputHDAsync(st,et,nt).then(()=>{ot.push(!0)},()=>{ot.push(!1)}));return Promise.all(at).then(()=>{if(ot.every(st=>st===!1))return it(new Error("No inputs were signed"));rt()})})}signInputHD(et,nt,rt=[transaction_1.Transaction.SIGHASH_ALL]){if(!nt||!nt.publicKey||!nt.fingerprint)throw new Error("Need HDSigner to sign input");return getSignersFromHD(et,this.data.inputs,nt).forEach(ot=>this.signInput(et,ot,rt)),this}signInputHDAsync(et,nt,rt=[transaction_1.Transaction.SIGHASH_ALL]){return new Promise((it,ot)=>{if(!nt||!nt.publicKey||!nt.fingerprint)return ot(new Error("Need HDSigner to sign input"));const st=getSignersFromHD(et,this.data.inputs,nt).map(lt=>this.signInputAsync(et,lt,rt));return Promise.all(st).then(()=>{it()}).catch(ot)})}signAllInputs(et,nt){if(!et||!et.publicKey)throw new Error("Need Signer to sign input");const rt=[];for(const it of range$4(this.data.inputs.length))try{this.signInput(it,et,nt),rt.push(!0)}catch{rt.push(!1)}if(rt.every(it=>it===!1))throw new Error("No inputs were signed");return this}signAllInputsAsync(et,nt){return new Promise((rt,it)=>{if(!et||!et.publicKey)return it(new Error("Need Signer to sign input"));const ot=[],at=[];for(const[st]of this.data.inputs.entries())at.push(this.signInputAsync(st,et,nt).then(()=>{ot.push(!0)},()=>{ot.push(!1)}));return Promise.all(at).then(()=>{if(ot.every(st=>st===!1))return it(new Error("No inputs were signed"));rt()})})}signInput(et,nt,rt){if(!nt||!nt.publicKey)throw new Error("Need Signer to sign input");const it=(0,utils_1.checkForInput)(this.data.inputs,et);return(0,bip371_1.isTaprootInput)(it)?this._signTaprootInput(et,it,nt,void 0,rt):this._signInput(et,nt,rt)}signTaprootInput(et,nt,rt,it){if(!nt||!nt.publicKey)throw new Error("Need Signer to sign input");const ot=(0,utils_1.checkForInput)(this.data.inputs,et);if((0,bip371_1.isTaprootInput)(ot))return this._signTaprootInput(et,ot,nt,rt,it);throw new Error(`Input #${et} is not of type Taproot.`)}_signInput(et,nt,rt=[transaction_1.Transaction.SIGHASH_ALL]){const{hash:it,sighashType:ot}=getHashAndSighashType(this.data.inputs,et,nt.publicKey,this.__CACHE,rt),at=[{pubkey:nt.publicKey,signature:bscript.signature.encode(nt.sign(it),ot)}];return this.data.updateInput(et,{partialSig:at}),this}_signTaprootInput(et,nt,rt,it,ot=[transaction_1.Transaction.SIGHASH_DEFAULT]){const at=this.checkTaprootHashesForSig(et,nt,rt,it,ot),st=at.filter(ct=>!ct.leafHash).map(ct=>(0,bip371_1.serializeTaprootSignature)(rt.signSchnorr(ct.hash),nt.sighashType))[0],lt=at.filter(ct=>!!ct.leafHash).map(ct=>({pubkey:(0,bip371_1.toXOnly)(rt.publicKey),signature:(0,bip371_1.serializeTaprootSignature)(rt.signSchnorr(ct.hash),nt.sighashType),leafHash:ct.leafHash}));return st&&this.data.updateInput(et,{tapKeySig:st}),lt.length&&this.data.updateInput(et,{tapScriptSig:lt}),this}signInputAsync(et,nt,rt){return Promise.resolve().then(()=>{if(!nt||!nt.publicKey)throw new Error("Need Signer to sign input");const it=(0,utils_1.checkForInput)(this.data.inputs,et);return(0,bip371_1.isTaprootInput)(it)?this._signTaprootInputAsync(et,it,nt,void 0,rt):this._signInputAsync(et,nt,rt)})}signTaprootInputAsync(et,nt,rt,it){return Promise.resolve().then(()=>{if(!nt||!nt.publicKey)throw new Error("Need Signer to sign input");const ot=(0,utils_1.checkForInput)(this.data.inputs,et);if((0,bip371_1.isTaprootInput)(ot))return this._signTaprootInputAsync(et,ot,nt,rt,it);throw new Error(`Input #${et} is not of type Taproot.`)})}_signInputAsync(et,nt,rt=[transaction_1.Transaction.SIGHASH_ALL]){const{hash:it,sighashType:ot}=getHashAndSighashType(this.data.inputs,et,nt.publicKey,this.__CACHE,rt);return Promise.resolve(nt.sign(it)).then(at=>{const st=[{pubkey:nt.publicKey,signature:bscript.signature.encode(at,ot)}];this.data.updateInput(et,{partialSig:st})})}async _signTaprootInputAsync(et,nt,rt,it,ot=[transaction_1.Transaction.SIGHASH_DEFAULT]){const at=this.checkTaprootHashesForSig(et,nt,rt,it,ot),st=[],lt=at.filter(ut=>!ut.leafHash)[0];if(lt){const ut=Promise.resolve(rt.signSchnorr(lt.hash)).then(ht=>({tapKeySig:(0,bip371_1.serializeTaprootSignature)(ht,nt.sighashType)}));st.push(ut)}const ct=at.filter(ut=>!!ut.leafHash);if(ct.length){const ut=ct.map(ht=>Promise.resolve(rt.signSchnorr(ht.hash)).then(dt=>({tapScriptSig:[{pubkey:(0,bip371_1.toXOnly)(rt.publicKey),signature:(0,bip371_1.serializeTaprootSignature)(dt,nt.sighashType),leafHash:ht.leafHash}]})));st.push(...ut)}return Promise.all(st).then(ut=>{ut.forEach(ht=>this.data.updateInput(et,ht))})}checkTaprootHashesForSig(et,nt,rt,it,ot){if(typeof rt.signSchnorr!="function")throw new Error(`Need Schnorr Signer to sign taproot input #${et}.`);const at=getTaprootHashesForSig(et,nt,this.data.inputs,rt.publicKey,this.__CACHE,it,ot);if(!at||!at.length)throw new Error(`Can not sign for input #${et} with the key ${rt.publicKey.toString("hex")}`);return at}toBuffer(){return checkCache(this.__CACHE),this.data.toBuffer()}toHex(){return checkCache(this.__CACHE),this.data.toHex()}toBase64(){return checkCache(this.__CACHE),this.data.toBase64()}updateGlobal(et){return this.data.updateGlobal(et),this}updateInput(et,nt){return nt.witnessScript&&checkInvalidP2WSH(nt.witnessScript),(0,bip371_1.checkTaprootInputFields)(this.data.inputs[et],nt,"updateInput"),this.data.updateInput(et,nt),nt.nonWitnessUtxo&&addNonWitnessTxCache(this.__CACHE,this.data.inputs[et],et),this}updateOutput(et,nt){const rt=this.data.outputs[et];return(0,bip371_1.checkTaprootOutputFields)(rt,nt,"updateOutput"),this.data.updateOutput(et,nt),this}addUnknownKeyValToGlobal(et){return this.data.addUnknownKeyValToGlobal(et),this}addUnknownKeyValToInput(et,nt){return this.data.addUnknownKeyValToInput(et,nt),this}addUnknownKeyValToOutput(et,nt){return this.data.addUnknownKeyValToOutput(et,nt),this}clearFinalizedInput(et){return this.data.clearFinalizedInput(et),this}}psbt$1.Psbt=Psbt;const transactionFromBuffer=tt=>new PsbtTransaction(tt);class PsbtTransaction{constructor(et=Buffer.from([2,0,0,0,0,0,0,0,0,0])){this.tx=transaction_1.Transaction.fromBuffer(et),checkTxEmpty(this.tx),Object.defineProperty(this,"tx",{enumerable:!1,writable:!0})}getInputOutputCounts(){return{inputCount:this.tx.ins.length,outputCount:this.tx.outs.length}}addInput(et){if(et.hash===void 0||et.index===void 0||!Buffer.isBuffer(et.hash)&&typeof et.hash!="string"||typeof et.index!="number")throw new Error("Error adding input.");const nt=typeof et.hash=="string"?(0,bufferutils_1.reverseBuffer)(Buffer.from(et.hash,"hex")):et.hash;this.tx.addInput(nt,et.index,et.sequence)}addOutput(et){if(et.script===void 0||et.value===void 0||!Buffer.isBuffer(et.script)||typeof et.value!="number")throw new Error("Error adding output.");this.tx.addOutput(et.script,et.value)}toBuffer(){return this.tx.toBuffer()}}function canFinalize(tt,et,nt){switch(nt){case"pubkey":case"pubkeyhash":case"witnesspubkeyhash":return hasSigs(1,tt.partialSig);case"multisig":const rt=payments.p2ms({output:et});return hasSigs(rt.m,tt.partialSig,rt.pubkeys);default:return!1}}function checkCache(tt){if(tt.__UNSAFE_SIGN_NONSEGWIT!==!1)throw new Error("Not BIP174 compliant, can not export")}function hasSigs(tt,et,nt){if(!et)return!1;let rt;if(nt?rt=nt.map(it=>{const ot=compressPubkey(it);return et.find(at=>at.pubkey.equals(ot))}).filter(it=>!!it):rt=et,rt.length>tt)throw new Error("Too many signatures");return rt.length===tt}function isFinalized(tt){return!!tt.finalScriptSig||!!tt.finalScriptWitness}function bip32DerivationIsMine(tt){return et=>!(!et.masterFingerprint.equals(tt.fingerprint)||!tt.derivePath(et.path).publicKey.equals(et.pubkey))}function check32Bit(tt){if(typeof tt!="number"||tt!==Math.floor(tt)||tt>4294967295||tt<0)throw new Error("Invalid 32 bit integer")}function checkFees(tt,et,nt){const rt=et.__FEE_RATE||tt.getFeeRate(),it=et.__EXTRACTED_TX.virtualSize(),ot=rt*it;if(rt>=nt.maximumFeeRate)throw new Error(`Warning: You are paying around ${(ot/1e8).toFixed(8)} in fees, which is ${rt} satoshi per byte for a transaction with a VSize of ${it} bytes (segwit counted as 0.25 byte per byte). Use setMaximumFeeRate method to raise your threshold, or pass true to the first arg of extractTransaction.`)}function checkInputsForPartialSig(tt,et){tt.forEach(nt=>{if((0,bip371_1.isTaprootInput)(nt)?(0,bip371_1.checkTaprootInputForSigs)(nt,et):(0,psbtutils_1.checkInputForSig)(nt,et))throw new Error("Can not modify transaction, signatures exist.")})}function checkPartialSigSighashes(tt){if(!tt.sighashType||!tt.partialSig)return;const{partialSig:et,sighashType:nt}=tt;et.forEach(rt=>{const{hashType:it}=bscript.signature.decode(rt.signature);if(nt!==it)throw new Error("Signature sighash does not match input sighash type")})}function checkScriptForPubkey(tt,et,nt){if(!(0,psbtutils_1.pubkeyInScript)(tt,et))throw new Error(`Can not ${nt} for this input with the key ${tt.toString("hex")}`)}function checkTxEmpty(tt){if(!tt.ins.every(nt=>nt.script&&nt.script.length===0&&nt.witness&&nt.witness.length===0))throw new Error("Format Error: Transaction ScriptSigs are not empty")}function checkTxForDupeIns(tt,et){tt.ins.forEach(nt=>{checkTxInputCache(et,nt)})}function checkTxInputCache(tt,et){const nt=(0,bufferutils_1.reverseBuffer)(Buffer.from(et.hash)).toString("hex")+":"+et.index;if(tt.__TX_IN_CACHE[nt])throw new Error("Duplicate input detected.");tt.__TX_IN_CACHE[nt]=1}function scriptCheckerFactory(tt,et){return(nt,rt,it,ot)=>{const at=tt({redeem:{output:it}}).output;if(!rt.equals(at))throw new Error(`${et} for ${ot} #${nt} doesn't match the scriptPubKey in the prevout`)}}const checkRedeemScript=scriptCheckerFactory(payments.p2sh,"Redeem script"),checkWitnessScript=scriptCheckerFactory(payments.p2wsh,"Witness script");function getTxCacheValue(tt,et,nt,rt){if(!nt.every(isFinalized))throw new Error(`PSBT must be finalized to calculate ${et}`);if(tt==="__FEE_RATE"&&rt.__FEE_RATE)return rt.__FEE_RATE;if(tt==="__FEE"&&rt.__FEE)return rt.__FEE;let it,ot=!0;if(rt.__EXTRACTED_TX?(it=rt.__EXTRACTED_TX,ot=!1):it=rt.__TX.clone(),inputFinalizeGetAmts(nt,it,rt,ot),tt==="__FEE_RATE")return rt.__FEE_RATE;if(tt==="__FEE")return rt.__FEE}function getFinalScripts(tt,et,nt,rt,it,ot){const at=classifyScript(nt);if(!canFinalize(et,nt,at))throw new Error(`Can not finalize input #${tt}`);return prepareFinalScripts(nt,at,et.partialSig,rt,it,ot)}function prepareFinalScripts(tt,et,nt,rt,it,ot){let at,st;const lt=getPayment(tt,et,nt),ct=ot?payments.p2wsh({redeem:lt}):null,ut=it?payments.p2sh({redeem:ct||lt}):null;return rt?(ct?st=(0,psbtutils_1.witnessStackToScriptWitness)(ct.witness):st=(0,psbtutils_1.witnessStackToScriptWitness)(lt.witness),ut&&(at=ut.input)):ut?at=ut.input:at=lt.input,{finalScriptSig:at,finalScriptWitness:st}}function getHashAndSighashType(tt,et,nt,rt,it){const ot=(0,utils_1.checkForInput)(tt,et),{hash:at,sighashType:st,script:lt}=getHashForSig(et,ot,rt,!1,it);return checkScriptForPubkey(nt,lt,"sign"),{hash:at,sighashType:st}}function getHashForSig(tt,et,nt,rt,it){const ot=nt.__TX,at=et.sighashType||transaction_1.Transaction.SIGHASH_ALL;checkSighashTypeAllowed(at,it);let st,lt;if(et.nonWitnessUtxo){const ht=nonWitnessUtxoTxFromCache(nt,et,tt),dt=ot.ins[tt].hash,pt=ht.getHash();if(!dt.equals(pt))throw new Error(`Non-witness UTXO hash for input #${tt} doesn't match the hash specified in the prevout`);const mt=ot.ins[tt].index;lt=ht.outs[mt]}else if(et.witnessUtxo)lt=et.witnessUtxo;else throw new Error("Need a Utxo input item for signing");const{meaningfulScript:ct,type:ut}=getMeaningfulScript(lt.script,tt,"input",et.redeemScript,et.witnessScript);if(["p2sh-p2wsh","p2wsh"].indexOf(ut)>=0)st=ot.hashForWitnessV0(tt,ct,lt.value,at);else if((0,psbtutils_1.isP2WPKH)(ct)){const ht=payments.p2pkh({hash:ct.slice(2)}).output;st=ot.hashForWitnessV0(tt,ht,lt.value,at)}else{if(et.nonWitnessUtxo===void 0&&nt.__UNSAFE_SIGN_NONSEGWIT===!1)throw new Error(`Input #${tt} has witnessUtxo but non-segwit script: ${ct.toString("hex")}`);!rt&&nt.__UNSAFE_SIGN_NONSEGWIT!==!1&&console.warn(`Warning: Signing non-segwit inputs without the full parent transaction means there is a chance that a miner could feed you incorrect information to trick you into paying large fees. This behavior is the same as Psbt's predecesor (TransactionBuilder - now removed) when signing non-segwit scripts. You are not able to export this Psbt with toBuffer|toBase64|toHex since it is not BIP174 compliant. -********************* -PROCEED WITH CAUTION! -*********************`),st=ot.hashForSignature(tt,ct,at)}return{script:ct,sighashType:at,hash:st}}function getAllTaprootHashesForSig(tt,et,nt,rt){const it=[];if(et.tapInternalKey){const at=getPrevoutTaprootKey(tt,et,rt);at&&it.push(at)}if(et.tapScriptSig){const at=et.tapScriptSig.map(st=>st.pubkey);it.push(...at)}return it.map(at=>getTaprootHashesForSig(tt,et,nt,at,rt)).flat()}function getPrevoutTaprootKey(tt,et,nt){const{script:rt}=getScriptAndAmountFromUtxo(tt,et,nt);return(0,psbtutils_1.isP2TR)(rt)?rt.subarray(2,34):null}function trimTaprootSig(tt){return tt.length===64?tt:tt.subarray(0,64)}function getTaprootHashesForSig(tt,et,nt,rt,it,ot,at){const st=it.__TX,lt=et.sighashType||transaction_1.Transaction.SIGHASH_DEFAULT;checkSighashTypeAllowed(lt,at);const ct=nt.map((mt,gt)=>getScriptAndAmountFromUtxo(gt,mt,it)),ut=ct.map(mt=>mt.script),ht=ct.map(mt=>mt.value),dt=[];if(et.tapInternalKey&&!ot){const mt=getPrevoutTaprootKey(tt,et,it)||Buffer.from([]);if((0,bip371_1.toXOnly)(rt).equals(mt)){const gt=st.hashForWitnessV1(tt,ut,ht,lt);dt.push({pubkey:rt,hash:gt})}}const pt=(et.tapLeafScript||[]).filter(mt=>(0,psbtutils_1.pubkeyInScript)(rt,mt.script)).map(mt=>{const gt=(0,bip341_1.tapleafHash)({output:mt.script,version:mt.leafVersion});return Object.assign({hash:gt},mt)}).filter(mt=>!ot||ot.equals(mt.hash)).map(mt=>{const gt=st.hashForWitnessV1(tt,ut,ht,transaction_1.Transaction.SIGHASH_DEFAULT,mt.hash);return{pubkey:rt,hash:gt,leafHash:mt.hash}});return dt.concat(pt)}function checkSighashTypeAllowed(tt,et){if(et&&et.indexOf(tt)<0){const nt=sighashTypeToString(tt);throw new Error(`Sighash type is not allowed. Retry the sign method passing the sighashTypes array of whitelisted types. Sighash type: ${nt}`)}}function getPayment(tt,et,nt){let rt;switch(et){case"multisig":const it=getSortedSigs(tt,nt);rt=payments.p2ms({output:tt,signatures:it});break;case"pubkey":rt=payments.p2pk({output:tt,signature:nt[0].signature});break;case"pubkeyhash":rt=payments.p2pkh({output:tt,pubkey:nt[0].pubkey,signature:nt[0].signature});break;case"witnesspubkeyhash":rt=payments.p2wpkh({output:tt,pubkey:nt[0].pubkey,signature:nt[0].signature});break}return rt}function getScriptFromInput(tt,et,nt){const rt=nt.__TX,it={script:null,isSegwit:!1,isP2SH:!1,isP2WSH:!1};if(it.isP2SH=!!et.redeemScript,it.isP2WSH=!!et.witnessScript,et.witnessScript)it.script=et.witnessScript;else if(et.redeemScript)it.script=et.redeemScript;else if(et.nonWitnessUtxo){const ot=nonWitnessUtxoTxFromCache(nt,et,tt),at=rt.ins[tt].index;it.script=ot.outs[at].script}else et.witnessUtxo&&(it.script=et.witnessUtxo.script);return(et.witnessScript||(0,psbtutils_1.isP2WPKH)(it.script))&&(it.isSegwit=!0),it}function getSignersFromHD(tt,et,nt){const rt=(0,utils_1.checkForInput)(et,tt);if(!rt.bip32Derivation||rt.bip32Derivation.length===0)throw new Error("Need bip32Derivation to sign with HD");const it=rt.bip32Derivation.map(at=>{if(at.masterFingerprint.equals(nt.fingerprint))return at}).filter(at=>!!at);if(it.length===0)throw new Error("Need one bip32Derivation masterFingerprint to match the HDSigner fingerprint");return it.map(at=>{const st=nt.derivePath(at.path);if(!at.pubkey.equals(st.publicKey))throw new Error("pubkey did not match bip32Derivation");return st})}function getSortedSigs(tt,et){return payments.p2ms({output:tt}).pubkeys.map(rt=>(et.filter(it=>it.pubkey.equals(rt))[0]||{}).signature).filter(rt=>!!rt)}function scriptWitnessToWitnessStack(tt){let et=0;function nt(at){return et+=at,tt.slice(et-at,et)}function rt(){const at=varuint.decode(tt,et);return et+=varuint.decode.bytes,at}function it(){return nt(rt())}function ot(){const at=rt(),st=[];for(let lt=0;lt{if(rt&<.finalScriptSig&&(et.ins[ct].script=lt.finalScriptSig),rt&<.finalScriptWitness&&(et.ins[ct].witness=scriptWitnessToWitnessStack(lt.finalScriptWitness)),lt.witnessUtxo)it+=lt.witnessUtxo.value;else if(lt.nonWitnessUtxo){const ut=nonWitnessUtxoTxFromCache(nt,lt,ct),ht=et.ins[ct].index,dt=ut.outs[ht];it+=dt.value}});const ot=et.outs.reduce((lt,ct)=>lt+ct.value,0),at=it-ot;if(at<0)throw new Error("Outputs are spending more than Inputs");const st=et.virtualSize();nt.__FEE=at,nt.__EXTRACTED_TX=et,nt.__FEE_RATE=Math.floor(at/st)}function nonWitnessUtxoTxFromCache(tt,et,nt){const rt=tt.__NON_WITNESS_UTXO_TX_CACHE;return rt[nt]||addNonWitnessTxCache(tt,et,nt),rt[nt]}function getScriptFromUtxo(tt,et,nt){const{script:rt}=getScriptAndAmountFromUtxo(tt,et,nt);return rt}function getScriptAndAmountFromUtxo(tt,et,nt){if(et.witnessUtxo!==void 0)return{script:et.witnessUtxo.script,value:et.witnessUtxo.value};if(et.nonWitnessUtxo!==void 0){const it=nonWitnessUtxoTxFromCache(nt,et,tt).outs[nt.__TX.ins[tt].index];return{script:it.script,value:it.value}}else throw new Error("Can't find pubkey in input without Utxo data")}function pubkeyInInput(tt,et,nt,rt){const it=getScriptFromUtxo(nt,et,rt),{meaningfulScript:ot}=getMeaningfulScript(it,nt,"input",et.redeemScript,et.witnessScript);return(0,psbtutils_1.pubkeyInScript)(tt,ot)}function pubkeyInOutput(tt,et,nt,rt){const it=rt.__TX.outs[nt].script,{meaningfulScript:ot}=getMeaningfulScript(it,nt,"output",et.redeemScript,et.witnessScript);return(0,psbtutils_1.pubkeyInScript)(tt,ot)}function redeemFromFinalScriptSig(tt){if(!tt)return;const et=bscript.decompile(tt);if(!et)return;const nt=et[et.length-1];if(!(!Buffer.isBuffer(nt)||isPubkeyLike(nt)||isSigLike(nt)||!bscript.decompile(nt)))return nt}function redeemFromFinalWitnessScript(tt){if(!tt)return;const et=scriptWitnessToWitnessStack(tt),nt=et[et.length-1];if(!(isPubkeyLike(nt)||!bscript.decompile(nt)))return nt}function compressPubkey(tt){if(tt.length===65){const et=tt[64]&1,nt=tt.slice(0,33);return nt[0]=2|et,nt}return tt.slice()}function isPubkeyLike(tt){return tt.length===33&&bscript.isCanonicalPubKey(tt)}function isSigLike(tt){return bscript.isCanonicalScriptSignature(tt)}function getMeaningfulScript(tt,et,nt,rt,it){const ot=(0,psbtutils_1.isP2SHScript)(tt),at=ot&&rt&&(0,psbtutils_1.isP2WSHScript)(rt),st=(0,psbtutils_1.isP2WSHScript)(tt);if(ot&&rt===void 0)throw new Error("scriptPubkey is P2SH but redeemScript missing");if((st||at)&&it===void 0)throw new Error("scriptPubkey or redeemScript is P2WSH but witnessScript missing");let lt;return at?(lt=it,checkRedeemScript(et,tt,rt,nt),checkWitnessScript(et,rt,it,nt),checkInvalidP2WSH(lt)):st?(lt=it,checkWitnessScript(et,tt,it,nt),checkInvalidP2WSH(lt)):ot?(lt=rt,checkRedeemScript(et,tt,rt,nt)):lt=tt,{meaningfulScript:lt,type:at?"p2sh-p2wsh":ot?"p2sh":st?"p2wsh":"raw"}}function checkInvalidP2WSH(tt){if((0,psbtutils_1.isP2WPKH)(tt)||(0,psbtutils_1.isP2SHScript)(tt))throw new Error("P2WPKH or P2SH can not be contained within P2WSH")}function classifyScript(tt){return(0,psbtutils_1.isP2WPKH)(tt)?"witnesspubkeyhash":(0,psbtutils_1.isP2PKH)(tt)?"pubkeyhash":(0,psbtutils_1.isP2MS)(tt)?"multisig":(0,psbtutils_1.isP2PK)(tt)?"pubkey":"nonstandard"}function range$4(tt){return[...Array(tt).keys()]}(function(tt){Object.defineProperty(tt,"__esModule",{value:!0}),tt.initEccLib=tt.Transaction=tt.opcodes=tt.Psbt=tt.Block=tt.script=tt.payments=tt.networks=tt.crypto=tt.address=void 0;const et=address;tt.address=et;const nt=crypto$2;tt.crypto=nt;const rt=networks$1;tt.networks=rt;const it=payments$3;tt.payments=it;const ot=script;tt.script=ot;var at=block;Object.defineProperty(tt,"Block",{enumerable:!0,get:function(){return at.Block}});var st=psbt$1;Object.defineProperty(tt,"Psbt",{enumerable:!0,get:function(){return st.Psbt}});var lt=ops;Object.defineProperty(tt,"opcodes",{enumerable:!0,get:function(){return lt.OPS}});var ct=transaction;Object.defineProperty(tt,"Transaction",{enumerable:!0,get:function(){return ct.Transaction}});var ut=ecc_lib;Object.defineProperty(tt,"initEccLib",{enumerable:!0,get:function(){return ut.initEccLib}})})(src$1);function listCacheClear$1(){this.__data__=[],this.size=0}var _listCacheClear=listCacheClear$1;function eq$4(tt,et){return tt===et||tt!==tt&&et!==et}var eq_1=eq$4,eq$3=eq_1;function assocIndexOf$4(tt,et){for(var nt=tt.length;nt--;)if(eq$3(tt[nt][0],et))return nt;return-1}var _assocIndexOf=assocIndexOf$4,assocIndexOf$3=_assocIndexOf,arrayProto=Array.prototype,splice=arrayProto.splice;function listCacheDelete$1(tt){var et=this.__data__,nt=assocIndexOf$3(et,tt);if(nt<0)return!1;var rt=et.length-1;return nt==rt?et.pop():splice.call(et,nt,1),--this.size,!0}var _listCacheDelete=listCacheDelete$1,assocIndexOf$2=_assocIndexOf;function listCacheGet$1(tt){var et=this.__data__,nt=assocIndexOf$2(et,tt);return nt<0?void 0:et[nt][1]}var _listCacheGet=listCacheGet$1,assocIndexOf$1=_assocIndexOf;function listCacheHas$1(tt){return assocIndexOf$1(this.__data__,tt)>-1}var _listCacheHas=listCacheHas$1,assocIndexOf=_assocIndexOf;function listCacheSet$1(tt,et){var nt=this.__data__,rt=assocIndexOf(nt,tt);return rt<0?(++this.size,nt.push([tt,et])):nt[rt][1]=et,this}var _listCacheSet=listCacheSet$1,listCacheClear=_listCacheClear,listCacheDelete=_listCacheDelete,listCacheGet=_listCacheGet,listCacheHas=_listCacheHas,listCacheSet=_listCacheSet;function ListCache$4(tt){var et=-1,nt=tt==null?0:tt.length;for(this.clear();++et-1&&tt%1==0&&tt-1&&tt%1==0&&tt<=MAX_SAFE_INTEGER$1}var isLength_1=isLength$3,baseGetTag$6=_baseGetTag,isLength$2=isLength_1,isObjectLike$8=isObjectLike_1,argsTag$2="[object Arguments]",arrayTag$2="[object Array]",boolTag$4="[object Boolean]",dateTag$3="[object Date]",errorTag$2="[object Error]",funcTag$1="[object Function]",mapTag$5="[object Map]",numberTag$4="[object Number]",objectTag$4="[object Object]",regexpTag$3="[object RegExp]",setTag$5="[object Set]",stringTag$4="[object String]",weakMapTag$2="[object WeakMap]",arrayBufferTag$3="[object ArrayBuffer]",dataViewTag$4="[object DataView]",float32Tag$2="[object Float32Array]",float64Tag$2="[object Float64Array]",int8Tag$2="[object Int8Array]",int16Tag$2="[object Int16Array]",int32Tag$2="[object Int32Array]",uint8Tag$2="[object Uint8Array]",uint8ClampedTag$2="[object Uint8ClampedArray]",uint16Tag$2="[object Uint16Array]",uint32Tag$2="[object Uint32Array]",typedArrayTags={};typedArrayTags[float32Tag$2]=typedArrayTags[float64Tag$2]=typedArrayTags[int8Tag$2]=typedArrayTags[int16Tag$2]=typedArrayTags[int32Tag$2]=typedArrayTags[uint8Tag$2]=typedArrayTags[uint8ClampedTag$2]=typedArrayTags[uint16Tag$2]=typedArrayTags[uint32Tag$2]=!0;typedArrayTags[argsTag$2]=typedArrayTags[arrayTag$2]=typedArrayTags[arrayBufferTag$3]=typedArrayTags[boolTag$4]=typedArrayTags[dataViewTag$4]=typedArrayTags[dateTag$3]=typedArrayTags[errorTag$2]=typedArrayTags[funcTag$1]=typedArrayTags[mapTag$5]=typedArrayTags[numberTag$4]=typedArrayTags[objectTag$4]=typedArrayTags[regexpTag$3]=typedArrayTags[setTag$5]=typedArrayTags[stringTag$4]=typedArrayTags[weakMapTag$2]=!1;function baseIsTypedArray$1(tt){return isObjectLike$8(tt)&&isLength$2(tt.length)&&!!typedArrayTags[baseGetTag$6(tt)]}var _baseIsTypedArray=baseIsTypedArray$1;function baseUnary$4(tt){return function(et){return tt(et)}}var _baseUnary=baseUnary$4,_nodeUtil={exports:{}};_nodeUtil.exports;(function(tt,et){var nt=_freeGlobal,rt=et&&!et.nodeType&&et,it=rt&&!0&&tt&&!tt.nodeType&&tt,ot=it&&it.exports===rt,at=ot&&nt.process,st=function(){try{var lt=it&&it.require&&it.require("util").types;return lt||at&&at.binding&&at.binding("util")}catch{}}();tt.exports=st})(_nodeUtil,_nodeUtil.exports);var _nodeUtilExports=_nodeUtil.exports,baseIsTypedArray=_baseIsTypedArray,baseUnary$3=_baseUnary,nodeUtil$2=_nodeUtilExports,nodeIsTypedArray=nodeUtil$2&&nodeUtil$2.isTypedArray,isTypedArray$4=nodeIsTypedArray?baseUnary$3(nodeIsTypedArray):baseIsTypedArray,isTypedArray_1=isTypedArray$4,baseTimes=_baseTimes,isArguments$2=isArguments_1,isArray$h=isArray_1,isBuffer$2=isBufferExports,isIndex$2=_isIndex,isTypedArray$3=isTypedArray_1,objectProto$8=Object.prototype,hasOwnProperty$7=objectProto$8.hasOwnProperty;function arrayLikeKeys$2(tt,et){var nt=isArray$h(tt),rt=!nt&&isArguments$2(tt),it=!nt&&!rt&&isBuffer$2(tt),ot=!nt&&!rt&&!it&&isTypedArray$3(tt),at=nt||rt||it||ot,st=at?baseTimes(tt.length,String):[],lt=st.length;for(var ct in tt)(et||hasOwnProperty$7.call(tt,ct))&&!(at&&(ct=="length"||it&&(ct=="offset"||ct=="parent")||ot&&(ct=="buffer"||ct=="byteLength"||ct=="byteOffset")||isIndex$2(ct,lt)))&&st.push(ct);return st}var _arrayLikeKeys=arrayLikeKeys$2,objectProto$7=Object.prototype;function isPrototype$3(tt){var et=tt&&tt.constructor,nt=typeof et=="function"&&et.prototype||objectProto$7;return tt===nt}var _isPrototype=isPrototype$3;function overArg$2(tt,et){return function(nt){return tt(et(nt))}}var _overArg=overArg$2,overArg$1=_overArg,nativeKeys$1=overArg$1(Object.keys,Object),_nativeKeys=nativeKeys$1,isPrototype$2=_isPrototype,nativeKeys=_nativeKeys,objectProto$6=Object.prototype,hasOwnProperty$6=objectProto$6.hasOwnProperty;function baseKeys$1(tt){if(!isPrototype$2(tt))return nativeKeys(tt);var et=[];for(var nt in Object(tt))hasOwnProperty$6.call(tt,nt)&&nt!="constructor"&&et.push(nt);return et}var _baseKeys=baseKeys$1,isFunction$3=isFunction_1,isLength$1=isLength_1;function isArrayLike$6(tt){return tt!=null&&isLength$1(tt.length)&&!isFunction$3(tt)}var isArrayLike_1=isArrayLike$6,arrayLikeKeys$1=_arrayLikeKeys,baseKeys=_baseKeys,isArrayLike$5=isArrayLike_1;function keys$9(tt){return isArrayLike$5(tt)?arrayLikeKeys$1(tt):baseKeys(tt)}var keys_1=keys$9,copyObject$3=_copyObject,keys$8=keys_1;function baseAssign$1(tt,et){return tt&©Object$3(et,keys$8(et),tt)}var _baseAssign=baseAssign$1;function nativeKeysIn$1(tt){var et=[];if(tt!=null)for(var nt in Object(tt))et.push(nt);return et}var _nativeKeysIn=nativeKeysIn$1,isObject$a=isObject_1,isPrototype$1=_isPrototype,nativeKeysIn=_nativeKeysIn,objectProto$5=Object.prototype,hasOwnProperty$5=objectProto$5.hasOwnProperty;function baseKeysIn$1(tt){if(!isObject$a(tt))return nativeKeysIn(tt);var et=isPrototype$1(tt),nt=[];for(var rt in tt)rt=="constructor"&&(et||!hasOwnProperty$5.call(tt,rt))||nt.push(rt);return nt}var _baseKeysIn=baseKeysIn$1,arrayLikeKeys=_arrayLikeKeys,baseKeysIn=_baseKeysIn,isArrayLike$4=isArrayLike_1;function keysIn$3(tt){return isArrayLike$4(tt)?arrayLikeKeys(tt,!0):baseKeysIn(tt)}var keysIn_1=keysIn$3,copyObject$2=_copyObject,keysIn$2=keysIn_1;function baseAssignIn$1(tt,et){return tt&©Object$2(et,keysIn$2(et),tt)}var _baseAssignIn=baseAssignIn$1,_cloneBuffer={exports:{}};_cloneBuffer.exports;(function(tt,et){var nt=_root,rt=et&&!et.nodeType&&et,it=rt&&!0&&tt&&!tt.nodeType&&tt,ot=it&&it.exports===rt,at=ot?nt.Buffer:void 0,st=at?at.allocUnsafe:void 0;function lt(ct,ut){if(ut)return ct.slice();var ht=ct.length,dt=st?st(ht):new ct.constructor(ht);return ct.copy(dt),dt}tt.exports=lt})(_cloneBuffer,_cloneBuffer.exports);var _cloneBufferExports=_cloneBuffer.exports;function copyArray$2(tt,et){var nt=-1,rt=tt.length;for(et||(et=Array(rt));++ntwordsToBuffer(tt,!0).toString("hex"),16:tt=>wordsToBuffer(tt,!0).toString("hex"),13:tt=>wordsToBuffer(tt,!0).toString("utf8"),19:tt=>wordsToBuffer(tt,!0).toString("hex"),23:tt=>wordsToBuffer(tt,!0).toString("hex"),6:wordsToIntBE,24:wordsToIntBE,9:fallbackAddressParser,3:routingInfoParser,5:featureBitsParser},unknownTagName="unknownTag";function unknownEncoder(tt){return tt.words=bech32.decode(tt.words,Number.MAX_SAFE_INTEGER).words,tt}function getUnknownParser(tt){return et=>({tagCode:parseInt(tt),words:bech32.encode("unknown",et,Number.MAX_SAFE_INTEGER)})}function wordsToIntBE(tt){return tt.reverse().reduce((et,nt,rt)=>et+nt*Math.pow(32,rt),0)}function intBEToWords(tt,et){const nt=[];if(et===void 0&&(et=5),tt=Math.floor(tt),tt===0)return[0];for(;tt>0;)nt.push(tt&Math.pow(2,et)-1),tt=Math.floor(tt/Math.pow(2,et));return nt.reverse()}function sha256(tt){return createHash("sha256").update(tt).digest()}function convert(tt,et,nt){let rt=0,it=0;const ot=(1<=nt;)it-=nt,at.push(rt>>it&ot);return it>0&&at.push(rt<0;)nt=st.slice(0,33).toString("hex"),rt=st.slice(33,41).toString("hex"),it=parseInt(st.slice(41,45).toString("hex"),16),ot=parseInt(st.slice(45,49).toString("hex"),16),at=parseInt(st.slice(49,51).toString("hex"),16),st=st.slice(51),et.push({pubkey:nt,short_channel_id:rt,fee_base_msat:it,fee_proportional_millionths:ot,cltv_expiry_delta:at});return et}function featureBitsParser(tt){const et=tt.slice().reverse().map(rt=>[!!(rt&1),!!(rt&2),!!(rt&4),!!(rt&8),!!(rt&16)]).reduce((rt,it)=>rt.concat(it),[]);for(;et.length{nt[rt]={required:et[it*2],supported:et[it*2+1]}}),et.length>FEATUREBIT_ORDER.length*2){const rt=et.slice(FEATUREBIT_ORDER.length*2);nt.extra_bits={start_bit:FEATUREBIT_ORDER.length*2,bits:rt,has_required:rt.reduce((it,ot,at)=>at%2!==0?it||!1:it||ot,!1)}}else nt.extra_bits={start_bit:FEATUREBIT_ORDER.length*2,bits:[],has_required:!1};return nt}function featureBitsEncoder(tt){let et=tt.word_length,nt=[];for(FEATUREBIT_ORDER.forEach(rt=>{nt.push(!!(tt[rt]||{}).required),nt.push(!!(tt[rt]||{}).supported)});nt[nt.length-1]===!1;)nt.pop();for(;nt.length%5!==0;)nt.push(!1);if(tt.extra_bits&&Array.isArray(tt.extra_bits.bits)&&tt.extra_bits.bits.length>0){for(;nt.lengthet)throw new Error("word_length is too small to contain all featureBits");return et===void 0&&(et=Math.ceil(nt.length/5)),new Array(et).fill(0).map((rt,it)=>nt[it*5+4]<<4|nt[it*5+3]<<3|nt[it*5+2]<<2|nt[it*5+1]<<1|nt[it*5]<<0).reverse()}function routingInfoEncoder(tt){let et=Buffer$1.from([]);return tt.forEach(nt=>{et=Buffer$1.concat([et,hexToBuffer(nt.pubkey)]),et=Buffer$1.concat([et,hexToBuffer(nt.short_channel_id)]),et=Buffer$1.concat([et,Buffer$1.from([0,0,0].concat(intBEToWords(nt.fee_base_msat,8)).slice(-4))]),et=Buffer$1.concat([et,Buffer$1.from([0,0,0].concat(intBEToWords(nt.fee_proportional_millionths,8)).slice(-4))]),et=Buffer$1.concat([et,Buffer$1.from([0].concat(intBEToWords(nt.cltv_expiry_delta,8)).slice(-2))])}),hexToWord(et)}function purposeCommitEncoder(tt){let et;if(tt!==void 0&&(typeof tt=="string"||tt instanceof String))tt.match(/^([a-zA-Z0-9]{2})*$/)?et=Buffer$1.from(tt,"hex"):et=sha256(Buffer$1.from(tt,"utf8"));else throw new Error("purpose or purpose commit must be a string or hex string");return bech32.toWords(et)}function tagsItems(tt,et){const nt=tt.filter(it=>it.tagName===et);return nt.length>0?nt[0].data:null}function tagsContainItem(tt,et){return tagsItems(tt,et)!==null}function orderKeys(tt,et){const nt={};if(Object.keys(tt).sort().forEach(rt=>{nt[rt]=tt[rt]}),et===!0){const rt="__tagsObject_cache";Object.defineProperty(nt,"tagsObject",{get(){return this[rt]||Object.defineProperty(this,rt,{value:getTagsObject(this.tags)}),this[rt]}})}return nt}function satToHrp(tt){if(!tt.toString().match(/^\d+$/))throw new Error("satoshis must be an integer");const et=new BN(tt,10);return millisatToHrp(et.mul(new BN(1e3,10)))}function millisatToHrp(tt){if(!tt.toString().match(/^\d+$/))throw new Error("millisatoshis must be an integer");const et=new BN(tt,10),nt=et.toString(10),rt=nt.length;let it,ot;return rt>11&&/0{11}$/.test(nt)?(it="",ot=et.div(MILLISATS_PER_BTC).toString(10)):rt>8&&/0{8}$/.test(nt)?(it="m",ot=et.div(MILLISATS_PER_MILLIBTC).toString(10)):rt>5&&/0{5}$/.test(nt)?(it="u",ot=et.div(MILLISATS_PER_MICROBTC).toString(10)):rt>2&&/0{2}$/.test(nt)?(it="n",ot=et.div(MILLISATS_PER_NANOBTC).toString(10)):(it="p",ot=et.mul(PICOBTC_PER_MILLISATS).toString(10)),ot+it}function hrpToSat(tt,et){const nt=hrpToMillisat(tt,!1);if(!nt.mod(new BN(1e3,10)).eq(new BN(0,10)))throw new Error("Amount is outside of valid range");const rt=nt.div(new BN(1e3,10));return et?rt.toString():rt}function hrpToMillisat(tt,et){let nt,rt;if(tt.slice(-1).match(/^[munp]$/))nt=tt.slice(-1),rt=tt.slice(0,-1);else{if(tt.slice(-1).match(/^[^munp0-9]$/))throw new Error("Not a valid multiplier for the amount");rt=tt}if(!rt.match(/^\d+$/))throw new Error("Not a valid human readable amount");const it=new BN(rt,10),ot=nt?it.mul(MILLISATS_PER_BTC).div(DIVISORS[nt]):it.mul(MILLISATS_PER_BTC);if(nt==="p"&&!it.mod(new BN(10,10)).eq(new BN(0,10))||ot.gt(MAX_MILLISATS))throw new Error("Amount is outside of valid range");return et?ot.toString():ot}function sign$3(tt,et){const nt=cloneDeep(tt),rt=hexToBuffer(et);if(nt.complete&&nt.paymentRequest)return nt;if(rt===void 0||rt.length!==32||!secp256k1.privateKeyVerify(rt))throw new Error("privateKey must be a 32 byte Buffer and valid private key");let it,ot;if(tagsContainItem(nt.tags,TAGNAMES[19])&&(ot=hexToBuffer(tagsItems(nt.tags,TAGNAMES[19]))),nt.payeeNodeKey&&(it=hexToBuffer(nt.payeeNodeKey)),it&&ot&&!ot.equals(it))throw new Error("payee node key tag and payeeNodeKey attribute must match");it=ot||it;const at=Buffer$1.from(secp256k1.publicKeyCreate(rt));if(it&&!at.equals(it))throw new Error("The private key given is not the private key of the node public key given");const st=bech32.decode(nt.wordsTemp,Number.MAX_SAFE_INTEGER).words,lt=Buffer$1.concat([Buffer$1.from(nt.prefix,"utf8"),wordsToBuffer(st)]),ct=sha256(lt),ut=secp256k1.ecdsaSign(ct,rt);ut.signature=Buffer$1.from(ut.signature);const ht=hexToWord(ut.signature.toString("hex")+"0"+ut.recid);return nt.payeeNodeKey=at.toString("hex"),nt.signature=ut.signature.toString("hex"),nt.recoveryFlag=ut.recid,nt.wordsTemp=bech32.encode("temp",st.concat(ht),Number.MAX_SAFE_INTEGER),nt.complete=!0,nt.paymentRequest=bech32.encode(nt.prefix,st.concat(ht),Number.MAX_SAFE_INTEGER),orderKeys(nt)}function encode$3(tt,et){const nt=cloneDeep(tt);et===void 0&&(et=!0);const rt=!(nt.signature===void 0||nt.recoveryFlag===void 0);let it;if(nt.network===void 0&&!rt)nt.network=DEFAULTNETWORK,it=DEFAULTNETWORK;else{if(nt.network===void 0&&rt)throw new Error("Need network for proper payment request reconstruction");if(!nt.network.bech32||nt.network.pubKeyHash===void 0||nt.network.scriptHash===void 0||!Array.isArray(nt.network.validWitnessVersions))throw new Error("Invalid network");it=nt.network}if(nt.timestamp===void 0&&!rt)nt.timestamp=Math.floor(new Date().getTime()/1e3);else if(nt.timestamp===void 0&&rt)throw new Error("Need timestamp for proper payment request reconstruction");if(nt.tags===void 0)throw new Error("Payment Requests need tags array");if(!tagsContainItem(nt.tags,TAGNAMES[1]))throw new Error("Lightning Payment Request needs a payment hash");if(tagsContainItem(nt.tags,TAGNAMES[16]))if(tagsContainItem(nt.tags,TAGNAMES[5])){const xt=tagsItems(nt.tags,TAGNAMES[5]);if(!xt.payment_secret||!xt.payment_secret.supported&&!xt.payment_secret.required)throw new Error("Payment request requires feature bits with at least payment secret support flagged if payment secret is included")}else if(et)nt.tags.push({tagName:TAGNAMES[5],data:DEFAULTFEATUREBITS});else throw new Error("Payment request requires feature bits with at least payment secret support flagged if payment secret is included");if(!tagsContainItem(nt.tags,TAGNAMES[13])&&!tagsContainItem(nt.tags,TAGNAMES[23]))if(et)nt.tags.push({tagName:TAGNAMES[13],data:DEFAULTDESCRIPTION});else throw new Error("Payment request requires description or purpose commit hash");if(tagsContainItem(nt.tags,TAGNAMES[13])&&Buffer$1.from(tagsItems(nt.tags,TAGNAMES[13]),"utf8").length>639)throw new Error("Description is too long: Max length 639 bytes");!tagsContainItem(nt.tags,TAGNAMES[6])&&!rt&&et&&nt.tags.push({tagName:TAGNAMES[6],data:DEFAULTEXPIRETIME}),!tagsContainItem(nt.tags,TAGNAMES[24])&&!rt&&et&&nt.tags.push({tagName:TAGNAMES[24],data:DEFAULTCLTVEXPIRY});let ot,at;if(tagsContainItem(nt.tags,TAGNAMES[19])&&(at=hexToBuffer(tagsItems(nt.tags,TAGNAMES[19]))),nt.payeeNodeKey&&(ot=hexToBuffer(nt.payeeNodeKey)),ot&&at&&!at.equals(ot))throw new Error("payeeNodeKey and tag payee node key do not match");ot=ot||at,ot&&(nt.payeeNodeKey=ot.toString("hex"));let st,lt,ct;if(tagsContainItem(nt.tags,TAGNAMES[9])){const xt=tagsItems(nt.tags,TAGNAMES[9]);if(ct=xt.address,lt=xt.addressHash,st=xt.code,lt===void 0||st===void 0){let kt,St;try{kt=bitcoinjsAddress.fromBech32(ct),lt=kt.data,st=kt.version}catch{try{St=bitcoinjsAddress.fromBase58Check(ct),St.version===it.pubKeyHash?st=17:St.version===it.scriptHash&&(st=18),lt=St.hash}catch{throw new Error("Fallback address type is unknown")}}if(kt&&!(kt.version in it.validWitnessVersions))throw new Error("Fallback address witness version is unknown");if(kt&&kt.prefix!==it.bech32)throw new Error("Fallback address network type does not match payment request network type");if(St&&St.version!==it.pubKeyHash&&St.version!==it.scriptHash)throw new Error("Fallback address version (base58) is unknown or the network type is incorrect");xt.addressHash=lt.toString("hex"),xt.code=st}}tagsContainItem(nt.tags,TAGNAMES[3])&&tagsItems(nt.tags,TAGNAMES[3]).forEach(kt=>{if(kt.pubkey===void 0||kt.short_channel_id===void 0||kt.fee_base_msat===void 0||kt.fee_proportional_millionths===void 0||kt.cltv_expiry_delta===void 0)throw new Error("Routing info is incomplete");if(!secp256k1.publicKeyVerify(hexToBuffer(kt.pubkey)))throw new Error("Routing info pubkey is not a valid pubkey");const St=hexToBuffer(kt.short_channel_id);if(!(St instanceof Buffer$1)||St.length!==8)throw new Error("Routing info short channel id must be 8 bytes");if(typeof kt.fee_base_msat!="number"||Math.floor(kt.fee_base_msat)!==kt.fee_base_msat)throw new Error("Routing info fee base msat is not an integer");if(typeof kt.fee_proportional_millionths!="number"||Math.floor(kt.fee_proportional_millionths)!==kt.fee_proportional_millionths)throw new Error("Routing info fee proportional millionths is not an integer");if(typeof kt.cltv_expiry_delta!="number"||Math.floor(kt.cltv_expiry_delta)!==kt.cltv_expiry_delta)throw new Error("Routing info cltv expiry delta is not an integer")});let ut="ln";ut+=it.bech32;let ht;if(nt.millisatoshis&&nt.satoshis){if(ht=millisatToHrp(new BN(nt.millisatoshis,10)),satToHrp(new BN(nt.satoshis,10))!==ht)throw new Error("satoshis and millisatoshis do not match")}else nt.millisatoshis?ht=millisatToHrp(new BN(nt.millisatoshis,10)):nt.satoshis?ht=satToHrp(new BN(nt.satoshis,10)):ht="";ut+=ht;const dt=intBEToWords(nt.timestamp);for(;dt.length<7;)dt.unshift(0);const pt=nt.tags;let mt=[];pt.forEach(xt=>{const kt=Object.keys(TAGENCODERS);if(rt&&kt.push(unknownTagName),kt.indexOf(xt.tagName)===-1)throw new Error("Unknown tag key: "+xt.tagName);let St;if(xt.tagName!==unknownTagName){mt.push(TAGCODES[xt.tagName]);const Tt=TAGENCODERS[xt.tagName];St=Tt(xt.data)}else{const Tt=unknownEncoder(xt.data);mt.push(Tt.tagCode),St=Tt.words}mt=mt.concat([0].concat(intBEToWords(St.length)).slice(-2)),mt=mt.concat(St)});let gt=dt.concat(mt);const yt=Buffer$1.concat([Buffer$1.from(ut,"utf8"),Buffer$1.from(convert(gt,5,8))]),bt=sha256(yt);let vt;if(rt)if(ot){const xt=Buffer$1.from(secp256k1.ecdsaRecover(Buffer$1.from(nt.signature,"hex"),nt.recoveryFlag,bt,!0));if(ot&&!ot.equals(xt))throw new Error("Signature, message, and recoveryID did not produce the same pubkey as payeeNodeKey");vt=hexToWord(nt.signature+"0"+nt.recoveryFlag)}else throw new Error("Reconstruction with signature and recoveryID requires payeeNodeKey to verify correctness of input data.");return vt&&(gt=gt.concat(vt)),tagsContainItem(nt.tags,TAGNAMES[6])&&(nt.timeExpireDate=nt.timestamp+tagsItems(nt.tags,TAGNAMES[6]),nt.timeExpireDateString=new Date(nt.timeExpireDate*1e3).toISOString()),nt.timestampString=new Date(nt.timestamp*1e3).toISOString(),nt.complete=!!vt,nt.paymentRequest=nt.complete?bech32.encode(ut,gt,Number.MAX_SAFE_INTEGER):"",nt.prefix=ut,nt.wordsTemp=bech32.encode("temp",gt,Number.MAX_SAFE_INTEGER),orderKeys(nt)}function decode$3(tt,et){if(typeof tt!="string")throw new Error("Lightning Payment Request must be string");if(tt.slice(0,2).toLowerCase()!=="ln")throw new Error("Not a proper lightning payment request");const nt=bech32.decode(tt,Number.MAX_SAFE_INTEGER);tt=tt.toLowerCase();const rt=nt.prefix;let it=nt.words;const ot=it.slice(-104),at=it.slice(0,-104);it=it.slice(0,-104);let st=wordsToBuffer(ot,!0);const lt=st.slice(-1)[0];if(st=st.slice(0,-1),!(lt in[0,1,2,3])||st.length!==64)throw new Error("Signature is missing or incorrect");let ct=rt.match(/^ln(\S+?)(\d*)([a-zA-Z]?)$/);if(ct&&!ct[2]&&(ct=rt.match(/^ln(\S+)$/)),!ct)throw new Error("Not a proper lightning payment request");const ut=ct[1];let ht;if(et){if(et.bech32===void 0||et.pubKeyHash===void 0||et.scriptHash===void 0||!Array.isArray(et.validWitnessVersions))throw new Error("Invalid network");ht=et}else switch(ut){case DEFAULTNETWORK.bech32:ht=DEFAULTNETWORK;break;case TESTNETWORK.bech32:ht=TESTNETWORK;break;case REGTESTNETWORK.bech32:ht=REGTESTNETWORK;break;case SIMNETWORK.bech32:ht=SIMNETWORK;break}if(!ht||ht.bech32!==ut)throw new Error("Unknown coin bech32 prefix");const dt=ct[2];let pt,mt,gt;if(dt){const Ct=ct[3];try{pt=parseInt(hrpToSat(dt+Ct,!0))}catch{pt=null,gt=!0}mt=hrpToMillisat(dt+Ct,!0)}else pt=null,mt=null;const yt=wordsToIntBE(it.slice(0,7)),bt=new Date(yt*1e3).toISOString();it=it.slice(7);const vt=[];let xt,kt,St,Tt;for(;it.length>0;){const Ct=it[0].toString();xt=TAGNAMES[Ct]||unknownTagName,kt=TAGPARSERS[Ct]||getUnknownParser(Ct),it=it.slice(1),St=wordsToIntBE(it.slice(0,2)),it=it.slice(2),Tt=it.slice(0,St),it=it.slice(St),vt.push({tagName:xt,data:kt(Tt,ht)})}let At,Et;tagsContainItem(vt,TAGNAMES[6])&&(At=yt+tagsItems(vt,TAGNAMES[6]),Et=new Date(At*1e3).toISOString());const $t=Buffer$1.concat([Buffer$1.from(rt,"utf8"),Buffer$1.from(convert(at,5,8))]),Dt=sha256($t),jt=Buffer$1.from(secp256k1.ecdsaRecover(st,lt,Dt,!0));if(tagsContainItem(vt,TAGNAMES[19])&&tagsItems(vt,TAGNAMES[19])!==jt.toString("hex"))throw new Error("Lightning Payment Request signature pubkey does not match payee pubkey");let Pt={paymentRequest:tt,complete:!0,prefix:rt,wordsTemp:bech32.encode("temp",at.concat(ot),Number.MAX_SAFE_INTEGER),network:ht,satoshis:pt,millisatoshis:mt,timestamp:yt,timestampString:bt,payeeNodeKey:jt.toString("hex"),signature:st.toString("hex"),recoveryFlag:lt,tags:vt};return gt&&delete Pt.satoshis,At&&(Pt=Object.assign(Pt,{timeExpireDate:At,timeExpireDateString:Et})),orderKeys(Pt,!0)}function getTagsObject(tt){const et={};return tt.forEach(nt=>{nt.tagName===unknownTagName?(et.unknownTags||(et.unknownTags=[]),et.unknownTags.push(nt.data)):et[nt.tagName]=nt.data}),et}var payreq={encode:encode$3,decode:decode$3,sign:sign$3,satToHrp,millisatToHrp,hrpToSat,hrpToMillisat};(function(tt){var et=commonjsGlobal&&commonjsGlobal.__importDefault||function(ut){return ut&&ut.__esModule?ut:{default:ut}};Object.defineProperty(tt,"__esModule",{value:!0}),tt.getIdFromRequest=tt.decode=tt.isHex=tt.stringToBytes=tt.isValue=tt.utf8Encoder=void 0;const nt=et(payreq),rt=et(assert_1);let it;typeof window<"u"&&window&&window.TextEncoder?it=window.TextEncoder:it=util$1.TextEncoder,tt.utf8Encoder=new it;const ot=ut=>ut!=null;tt.isValue=ot;const at=ut=>(0,tt.isValue)(ut)?tt.utf8Encoder.encode(ut):ut;tt.stringToBytes=at;function st(ut){return Buffer.from(ut,"hex").toString("hex")===ut}tt.isHex=st;function lt(ut){let ht;return ut.indexOf("lnsb")===0&&(ht={bech32:"sb"}),nt.default.decode(ut,ht)}tt.decode=lt;function ct(ut){const dt=lt(ut).tags.find(mt=>mt.tagName==="payment_hash");(0,rt.default)(dt&&dt.data,"Could not find payment hash on invoice request");const pt=dt==null?void 0:dt.data.toString();if(!pt||!pt.length)throw new Error("Could not get payment hash from payment request");return pt}tt.getIdFromRequest=ct})(helpers);var hasRequiredLsat;function requireLsat(){if(hasRequiredLsat)return lsat$1;hasRequiredLsat=1;var tt=commonjsGlobal&&commonjsGlobal.__createBinding||(Object.create?function(dt,pt,mt,gt){gt===void 0&&(gt=mt);var yt=Object.getOwnPropertyDescriptor(pt,mt);(!yt||("get"in yt?!pt.__esModule:yt.writable||yt.configurable))&&(yt={enumerable:!0,get:function(){return pt[mt]}}),Object.defineProperty(dt,gt,yt)}:function(dt,pt,mt,gt){gt===void 0&&(gt=mt),dt[gt]=pt[mt]}),et=commonjsGlobal&&commonjsGlobal.__setModuleDefault||(Object.create?function(dt,pt){Object.defineProperty(dt,"default",{enumerable:!0,value:pt})}:function(dt,pt){dt.default=pt}),nt=commonjsGlobal&&commonjsGlobal.__importStar||function(dt){if(dt&&dt.__esModule)return dt;var pt={};if(dt!=null)for(var mt in dt)mt!=="default"&&Object.prototype.hasOwnProperty.call(dt,mt)&&tt(pt,dt,mt);return et(pt,dt),pt},rt=commonjsGlobal&&commonjsGlobal.__importDefault||function(dt){return dt&&dt.__esModule?dt:{default:dt}};Object.defineProperty(lsat$1,"__esModule",{value:!0}),lsat$1.Lsat=lsat$1.parseChallengePart=void 0;const it=assert_1,ot=bufio,at=rt(requireCryptoBrowserify()),st=nt(macaroon$1),lt=requireDist(),ct=helpers;function ut(dt){let pt;const mt=dt.indexOf("=");it(mt>-1,'Incorrectly encoded challenge. Missing "=" separator.');const gt=dt.length-1-mt;return pt=dt.slice(-gt),it(pt.length,"Incorrectly encoded macaroon challenge"),it(pt[0]==='"'&&pt[pt.length-1]==='"',"Incorectly encoded challenge, challenges must be enclosed in double quotes."),pt=pt.slice(1,pt.length-1),pt}lsat$1.parseChallengePart=ut;class ht extends ot.Struct{constructor(pt){super(pt),this.id="",this.validUntil=0,this.invoice="",this.baseMacaroon="",this.paymentHash=Buffer.alloc(32).toString("hex"),this.timeCreated=Date.now(),this.paymentPreimage=null,this.amountPaid=0,this.routingFeePaid=0,this.invoiceAmount=0,pt&&this.fromOptions(pt)}fromOptions(pt){it(typeof pt.baseMacaroon=="string","Require serialized macaroon"),this.baseMacaroon=pt.baseMacaroon,it(typeof pt.id=="string","Require string id"),this.id=pt.id,it(typeof pt.paymentHash=="string","Require paymentHash"),this.paymentHash=pt.paymentHash;const mt=this.getExpirationFromMacaroon(pt.baseMacaroon);return mt&&(this.validUntil=mt),pt.invoice&&this.addInvoice(pt.invoice),pt.timeCreated&&(this.timeCreated=pt.timeCreated),pt.paymentPreimage&&(this.paymentPreimage=pt.paymentPreimage),pt.amountPaid&&(this.amountPaid=pt.amountPaid),pt.routingFeePaid&&(this.routingFeePaid=pt.routingFeePaid),this}isExpired(){return this.validUntil===0?!1:this.validUntilvt.tagName==="payment_hash");it(yt,"Could not find payment hash on invoice request");const bt=yt==null?void 0:yt.data;it(bt===this.paymentHash,"paymentHash from invoice did not match LSAT"),this.invoiceAmount=gt||0,this.invoice=pt}catch(mt){throw new Error(`Problem adding invoice data to LSAT: ${mt.message}`)}}static fromMacaroon(pt,mt){it(typeof pt=="string","Requires a raw macaroon string for macaroon to generate LSAT");let gt,yt;try{yt=(0,lt.decodeIdentifierFromMacaroon)(pt),gt=lt.Identifier.fromString(yt)}catch(xt){throw new Error(`Unexpected encoding for macaroon identifier: ${xt.message}`)}const bt={id:yt,baseMacaroon:pt,paymentHash:gt.paymentHash.toString("hex")},vt=new this(bt);return mt&&vt.addInvoice(mt),vt}static fromToken(pt,mt){it(pt.includes(this.type),"Token must include LSAT prefix"),pt=pt.slice(this.type.length).trim();const[gt,yt]=pt.split(":"),bt=ht.fromMacaroon(gt,mt);return yt&&bt.setPreimage(yt),bt}static fromChallenge(pt){const mt="macaroon=",gt="invoice=";let yt;yt=pt.split(","),yt.length<2&&(yt=pt.split(" ")),it(yt.length>=2,"Expected at least two challenges in the LSAT: invoice and macaroon");let bt="",vt="";for(const St of yt){if(!bt.length&&St.indexOf(mt)>-1)try{bt=ut(St)}catch(Tt){throw new Error(`Problem parsing macaroon challenge: ${Tt.message}`)}if(!vt.length&&St.indexOf(gt)>-1)try{vt=ut(St)}catch(Tt){throw new Error(`Problem parsing macaroon challenge: ${Tt.message}`)}if(vt.length&&bt.length)break}it(vt.length&&bt.length,"Expected WWW-Authenticate challenge with macaroon and invoice data");const xt=(0,ct.getIdFromRequest)(vt),kt=(0,lt.decodeIdentifierFromMacaroon)(bt);return new this({id:kt,baseMacaroon:bt,paymentHash:xt,invoice:vt})}static fromHeader(pt){const mt=pt.slice(this.type.length).trim();return it(pt.length!==mt.length,'header missing token type prefix "LSAT"'),ht.fromChallenge(mt)}}return lsat$1.Lsat=ht,ht.type="LSAT",lsat$1}var types={},lsat={};Object.defineProperty(lsat,"__esModule",{value:!0});var satisfier={};Object.defineProperty(satisfier,"__esModule",{value:!0});(function(tt){var et=commonjsGlobal&&commonjsGlobal.__createBinding||(Object.create?function(rt,it,ot,at){at===void 0&&(at=ot);var st=Object.getOwnPropertyDescriptor(it,ot);(!st||("get"in st?!it.__esModule:st.writable||st.configurable))&&(st={enumerable:!0,get:function(){return it[ot]}}),Object.defineProperty(rt,at,st)}:function(rt,it,ot,at){at===void 0&&(at=ot),rt[at]=it[ot]}),nt=commonjsGlobal&&commonjsGlobal.__exportStar||function(rt,it){for(var ot in rt)ot!=="default"&&!Object.prototype.hasOwnProperty.call(it,ot)&&et(it,rt,ot)};Object.defineProperty(tt,"__esModule",{value:!0}),nt(lsat,tt),nt(satisfier,tt)})(types);var satisfiers={},hasRequiredSatisfiers;function requireSatisfiers(){if(hasRequiredSatisfiers)return satisfiers;hasRequiredSatisfiers=1,Object.defineProperty(satisfiers,"__esModule",{value:!0}),satisfiers.createCapabilitiesSatisfier=satisfiers.createServicesSatisfier=satisfiers.expirationSatisfier=void 0;const tt=requireDist();satisfiers.expirationSatisfier={condition:"expiration",satisfyPrevious:(rt,it)=>rt.condition!=="expiration"||it.condition!=="expiration"?!1:!(rt.value!(rt.condition!=="expiration"||rt.value{if(typeof rt!="string")throw new tt.InvalidServicesError;return{condition:tt.SERVICES_CAVEAT_CONDITION,satisfyPrevious:(it,ot)=>{const at=(0,tt.decodeServicesCaveat)(it.value.toString()),st=(0,tt.decodeServicesCaveat)(ot.value.toString());if(!Array.isArray(at)||!Array.isArray(st))throw new tt.InvalidServicesError;let lt=new Map;lt=at.reduce((ct,ut)=>ct.set(ut.name,ut.tier),lt);for(const ct of st)if(!lt.has(ct.name)||lt.get(ct.name)>ct.tier)return!1;return!0},satisfyFinal:it=>{const ot=(0,tt.decodeServicesCaveat)(it.value.toString());if(!Array.isArray(ot))throw new tt.InvalidServicesError;for(const at of ot)if(at.name===rt)return!0;return!1}}};satisfiers.createServicesSatisfier=et;const nt=(rt,it)=>{if(typeof it!="string")throw new tt.InvalidCapabilitiesError;if(typeof rt!="string")throw new tt.InvalidCapabilitiesError;return{condition:rt+tt.SERVICE_CAPABILITIES_SUFFIX,satisfyPrevious:(ot,at)=>{const st=(0,tt.decodeCapabilitiesValue)(ot.value.toString()),lt=(0,tt.decodeCapabilitiesValue)(at.value.toString());if(!Array.isArray(st)||!Array.isArray(lt))throw new tt.InvalidServicesError;let ct=new Set;ct=st.reduce((ut,ht)=>ut.add(ht),ct);for(const ut of lt)if(!ct.has(ut))return!1;return!0},satisfyFinal:ot=>{const at=(0,tt.decodeCapabilitiesValue)(ot.value.toString());if(!Array.isArray(at))throw new tt.InvalidServicesError;for(const st of at)if(st===it)return!0;return!1}}};return satisfiers.createCapabilitiesSatisfier=nt,satisfiers}var macaroon={},base64={},__extends$2=commonjsGlobal&&commonjsGlobal.__extends||function(){var tt=function(et,nt){return tt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(rt,it){rt.__proto__=it}||function(rt,it){for(var ot in it)it.hasOwnProperty(ot)&&(rt[ot]=it[ot])},tt(et,nt)};return function(et,nt){tt(et,nt);function rt(){this.constructor=et}et.prototype=nt===null?Object.create(nt):(rt.prototype=nt.prototype,new rt)}}();Object.defineProperty(base64,"__esModule",{value:!0});var INVALID_BYTE=256,Coder=function(){function tt(et){et===void 0&&(et="="),this._paddingCharacter=et}return tt.prototype.encodedLength=function(et){return this._paddingCharacter?(et+2)/3*4|0:(et*8+5)/6|0},tt.prototype.encode=function(et){for(var nt="",rt=0;rt>>3*6&63),nt+=this._encodeByte(it>>>2*6&63),nt+=this._encodeByte(it>>>1*6&63),nt+=this._encodeByte(it>>>0*6&63)}var ot=et.length-rt;if(ot>0){var it=et[rt]<<16|(ot===2?et[rt+1]<<8:0);nt+=this._encodeByte(it>>>3*6&63),nt+=this._encodeByte(it>>>2*6&63),ot===2?nt+=this._encodeByte(it>>>1*6&63):nt+=this._paddingCharacter||"",nt+=this._paddingCharacter||""}return nt},tt.prototype.maxDecodedLength=function(et){return this._paddingCharacter?et/4*3|0:(et*6+7)/8|0},tt.prototype.decodedLength=function(et){return this.maxDecodedLength(et.length-this._getPaddingLength(et))},tt.prototype.decode=function(et){if(et.length===0)return new Uint8Array(0);for(var nt=this._getPaddingLength(et),rt=et.length-nt,it=new Uint8Array(this.maxDecodedLength(rt)),ot=0,at=0,st=0,lt=0,ct=0,ut=0,ht=0;at>>4,it[ot++]=ct<<4|ut>>>2,it[ot++]=ut<<6|ht,st|=lt&INVALID_BYTE,st|=ct&INVALID_BYTE,st|=ut&INVALID_BYTE,st|=ht&INVALID_BYTE;if(at>>4,st|=lt&INVALID_BYTE,st|=ct&INVALID_BYTE),at>>2,st|=ut&INVALID_BYTE),at>>8&0-65-26+97,nt+=51-et>>>8&26-97-52+48,nt+=61-et>>>8&52-48-62+43,nt+=62-et>>>8&62-43-63+47,String.fromCharCode(nt)},tt.prototype._decodeChar=function(et){var nt=INVALID_BYTE;return nt+=(42-et&et-44)>>>8&-INVALID_BYTE+et-43+62,nt+=(46-et&et-48)>>>8&-INVALID_BYTE+et-47+63,nt+=(47-et&et-58)>>>8&-INVALID_BYTE+et-48+52,nt+=(64-et&et-91)>>>8&-INVALID_BYTE+et-65+0,nt+=(96-et&et-123)>>>8&-INVALID_BYTE+et-97+26,nt},tt.prototype._getPaddingLength=function(et){var nt=0;if(this._paddingCharacter){for(var rt=et.length-1;rt>=0&&et[rt]===this._paddingCharacter;rt--)nt++;if(et.length<4||nt>2)throw new Error("Base64Coder: incorrect padding")}return nt},tt}();base64.Coder=Coder;var stdCoder=new Coder;function encode$2(tt){return stdCoder.encode(tt)}base64.encode=encode$2;function decode$2(tt){return stdCoder.decode(tt)}base64.decode=decode$2;var URLSafeCoder=function(tt){__extends$2(et,tt);function et(){return tt!==null&&tt.apply(this,arguments)||this}return et.prototype._encodeByte=function(nt){var rt=nt;return rt+=65,rt+=25-nt>>>8&0-65-26+97,rt+=51-nt>>>8&26-97-52+48,rt+=61-nt>>>8&52-48-62+45,rt+=62-nt>>>8&62-45-63+95,String.fromCharCode(rt)},et.prototype._decodeChar=function(nt){var rt=INVALID_BYTE;return rt+=(44-nt&nt-46)>>>8&-INVALID_BYTE+nt-45+62,rt+=(94-nt&nt-96)>>>8&-INVALID_BYTE+nt-95+63,rt+=(47-nt&nt-58)>>>8&-INVALID_BYTE+nt-48+52,rt+=(64-nt&nt-91)>>>8&-INVALID_BYTE+nt-65+0,rt+=(96-nt&nt-123)>>>8&-INVALID_BYTE+nt-97+26,rt},et}(Coder);base64.URLSafeCoder=URLSafeCoder;var urlSafeCoder=new URLSafeCoder;function encodeURLSafe(tt){return urlSafeCoder.encode(tt)}base64.encodeURLSafe=encodeURLSafe;function decodeURLSafe(tt){return urlSafeCoder.decode(tt)}base64.decodeURLSafe=decodeURLSafe;base64.encodedLength=function(tt){return stdCoder.encodedLength(tt)};base64.maxDecodedLength=function(tt){return stdCoder.maxDecodedLength(tt)};base64.decodedLength=function(tt){return stdCoder.decodedLength(tt)};var __createBinding$1=commonjsGlobal&&commonjsGlobal.__createBinding||(Object.create?function(tt,et,nt,rt){rt===void 0&&(rt=nt);var it=Object.getOwnPropertyDescriptor(et,nt);(!it||("get"in it?!et.__esModule:it.writable||it.configurable))&&(it={enumerable:!0,get:function(){return et[nt]}}),Object.defineProperty(tt,rt,it)}:function(tt,et,nt,rt){rt===void 0&&(rt=nt),tt[rt]=et[nt]}),__setModuleDefault$1=commonjsGlobal&&commonjsGlobal.__setModuleDefault||(Object.create?function(tt,et){Object.defineProperty(tt,"default",{enumerable:!0,value:et})}:function(tt,et){tt.default=et}),__importStar$1=commonjsGlobal&&commonjsGlobal.__importStar||function(tt){if(tt&&tt.__esModule)return tt;var et={};if(tt!=null)for(var nt in tt)nt!=="default"&&Object.prototype.hasOwnProperty.call(tt,nt)&&__createBinding$1(et,tt,nt);return __setModuleDefault$1(et,tt),et};Object.defineProperty(macaroon,"__esModule",{value:!0});macaroon.getRawMacaroon=macaroon.verifyMacaroonCaveats=macaroon.getCaveatsFromMacaroon=void 0;const caveat_1=caveat,helpers_1=helpers,Macaroon=__importStar$1(macaroon$1),base64_1=base64;function getCaveatsFromMacaroon(tt){var et;const nt=Macaroon.importMacaroon(tt),rt=[],it=(et=nt._exportAsJSONObjectV2())===null||et===void 0?void 0:et.c;if(it)for(const ot of it){if(!ot.i)continue;const at=caveat_1.Caveat.decode(ot.i);rt.push(at)}return rt}macaroon.getCaveatsFromMacaroon=getCaveatsFromMacaroon;function verifyMacaroonCaveats(tt,et,nt,rt={}){try{const it=Macaroon.importMacaroon(tt),ot=(0,helpers_1.stringToBytes)(et);it.verify(ot,()=>null);const at=getCaveatsFromMacaroon(tt);return nt&&!Array.isArray(nt)&&(nt=[nt]),!at.length&&(!nt||!nt.length)?!0:(0,caveat_1.verifyCaveats)(at,nt,rt)}catch{return!1}}macaroon.verifyMacaroonCaveats=verifyMacaroonCaveats;function getRawMacaroon(tt,et=!1){const nt=tt._exportBinaryV2();return et?(0,base64_1.encodeURLSafe)(nt):(0,base64_1.encode)(nt)}macaroon.getRawMacaroon=getRawMacaroon;var service={};(function(tt){var et=commonjsGlobal&&commonjsGlobal.__importDefault||function(dt){return dt&&dt.__esModule?dt:{default:dt}};Object.defineProperty(tt,"__esModule",{value:!0}),tt.decodeCapabilitiesValue=tt.createNewCapabilitiesCaveat=tt.SERVICE_CAPABILITIES_SUFFIX=tt.encodeServicesCaveatValue=tt.decodeServicesCaveat=tt.SERVICES_CAVEAT_CONDITION=tt.Service=tt.InvalidCapabilitiesError=tt.InvalidServicesError=tt.NoServicesError=void 0;const nt=et(bufio),rt=caveat;class it extends Error{constructor(...pt){super(...pt),this.name="NoServicesError",this.message="no services found",Error.captureStackTrace&&Error.captureStackTrace(this,it)}}tt.NoServicesError=it;class ot extends Error{constructor(pt){super(pt),this.name="InvalidServicesError",pt||(this.message='service must be of the form "name:tier"'),Error.captureStackTrace&&Error.captureStackTrace(this,ot)}}tt.InvalidServicesError=ot;class at extends Error{constructor(pt){super(pt),this.name="InvalidCapabilitiesError",pt||(this.message="capabilities must be a string or array of strings"),Error.captureStackTrace&&Error.captureStackTrace(this,ot)}}tt.InvalidCapabilitiesError=at;class st extends nt.default.Struct{constructor(pt){super(pt),this.name=pt.name,this.tier=pt.tier}}tt.Service=st,tt.SERVICES_CAVEAT_CONDITION="services";const lt=dt=>{if(!dt.length)throw new it;const pt=[],mt=dt.split(",");for(const gt of mt){const[yt,bt]=gt.split(":");if(!yt||!bt)throw new ot;if(isNaN(+bt))throw new ot("tier must be a number");if(!isNaN(+yt))throw new ot("service name must be a string");pt.push(new st({name:yt,tier:+bt}))}return pt};tt.decodeServicesCaveat=lt;const ct=dt=>{if(!dt.length)throw new it;let pt="";for(let mt=0;mt{let mt;if(!pt)mt="";else if(Array.isArray(pt))mt=pt.join(",");else{if(typeof pt!="string")throw new at;mt=pt}return new rt.Caveat({condition:dt+tt.SERVICE_CAPABILITIES_SUFFIX,value:mt,comp:"="})};tt.createNewCapabilitiesCaveat=ut;const ht=dt=>{if(typeof dt!="string")throw new at;return dt.toString().split(",").map(pt=>pt.trim())};tt.decodeCapabilitiesValue=ht})(service);var hasRequiredDist;function requireDist(){return hasRequiredDist||(hasRequiredDist=1,function(tt){var et=commonjsGlobal&&commonjsGlobal.__createBinding||(Object.create?function(rt,it,ot,at){at===void 0&&(at=ot);var st=Object.getOwnPropertyDescriptor(it,ot);(!st||("get"in st?!it.__esModule:st.writable||st.configurable))&&(st={enumerable:!0,get:function(){return it[ot]}}),Object.defineProperty(rt,at,st)}:function(rt,it,ot,at){at===void 0&&(at=ot),rt[at]=it[ot]}),nt=commonjsGlobal&&commonjsGlobal.__exportStar||function(rt,it){for(var ot in rt)ot!=="default"&&!Object.prototype.hasOwnProperty.call(it,ot)&&et(it,rt,ot)};Object.defineProperty(tt,"__esModule",{value:!0}),nt(identifier,tt),nt(caveat,tt),nt(requireLsat(),tt),nt(types,tt),nt(requireSatisfiers(),tt),nt(macaroon,tt),nt(service,tt)}(dist$1)),dist$1}var distExports=requireDist(),DefaultContext={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},IconContext=React$1.createContext&&React$1.createContext(DefaultContext),__assign$4=globalThis&&globalThis.__assign||function(){return __assign$4=Object.assign||function(tt){for(var et,nt=1,rt=arguments.length;nt"u"||!window.document)return rt;var it=document.createElement("style");document.head.appendChild(it);var ot=it.sheet,at=` - @keyframes `.concat(rt,` { - `).concat(et,` - } - `);return ot&&ot.insertRule(at,0),rt},__assign$3=globalThis&&globalThis.__assign||function(){return __assign$3=Object.assign||function(tt){for(var et,nt=1,rt=arguments.length;nt=0)&&(nt[it]=tt[it]);return nt}function isNum(tt){return typeof tt=="number"&&!isNaN(tt)}function isBool(tt){return typeof tt=="boolean"}function isStr(tt){return typeof tt=="string"}function isFn(tt){return typeof tt=="function"}function parseClassName(tt){return isStr(tt)||isFn(tt)?tt:null}function isToastIdValid(tt){return tt===0||tt}function getAutoCloseDelay(tt,et){return tt===!1||isNum(tt)&&tt>0?tt:et}var canUseDom=!!(typeof window<"u"&&window.document&&window.document.createElement);function canBeRendered(tt){return reactExports.isValidElement(tt)||isStr(tt)||isFn(tt)||isNum(tt)}var POSITION={TOP_LEFT:"top-left",TOP_RIGHT:"top-right",TOP_CENTER:"top-center",BOTTOM_LEFT:"bottom-left",BOTTOM_RIGHT:"bottom-right",BOTTOM_CENTER:"bottom-center"},TYPE={INFO:"info",SUCCESS:"success",WARNING:"warning",ERROR:"error",DEFAULT:"default"};function collapseToast(tt,et,nt){nt===void 0&&(nt=300);var rt=tt.scrollHeight,it=tt.style;requestAnimationFrame(function(){it.minHeight="initial",it.height=rt+"px",it.transition="all "+nt+"ms",requestAnimationFrame(function(){it.height="0",it.padding="0",it.margin="0",setTimeout(et,nt)})})}function cssTransition(tt){var et=tt.enter,nt=tt.exit,rt=tt.appendPosition,it=rt===void 0?!1:rt,ot=tt.collapse,at=ot===void 0?!0:ot,st=tt.collapseDuration,lt=st===void 0?300:st;return function(ut){var ht=ut.children,dt=ut.position,pt=ut.preventExitTransition,mt=ut.done,gt=ut.nodeRef,yt=ut.isIn,bt=it?et+"--"+dt:et,vt=it?nt+"--"+dt:nt,xt=reactExports.useRef(),kt=reactExports.useRef(0);reactExports.useLayoutEffect(function(){St()},[]),reactExports.useEffect(function(){yt||(pt?Et():At())},[yt]);function St(){var $t=gt.current;xt.current=$t.className,$t.className+=" "+bt,$t.addEventListener("animationend",Tt),$t.addEventListener("animationcancel",Tt)}function Tt($t){if($t.target===gt.current){var Dt=gt.current;Dt.dispatchEvent(new Event("d")),Dt.removeEventListener("animationend",Tt),Dt.removeEventListener("animationcancel",Tt),kt.current===0&&(Dt.className=xt.current)}}function At(){kt.current=1;var $t=gt.current;$t.className+=" "+vt,$t.addEventListener("animationend",Et)}function Et(){var $t=gt.current;$t.removeEventListener("animationend",Et),at?collapseToast($t,mt,lt):mt()}return React$1.createElement(React$1.Fragment,null,ht)}}var eventManager={list:new Map,emitQueue:new Map,on:function(et,nt){return this.list.has(et)||this.list.set(et,[]),this.list.get(et).push(nt),this},off:function(et,nt){if(nt){var rt=this.list.get(et).filter(function(it){return it!==nt});return this.list.set(et,rt),this}return this.list.delete(et),this},cancelEmit:function(et){var nt=this.emitQueue.get(et);return nt&&(nt.forEach(clearTimeout),this.emitQueue.delete(et)),this},emit:function(et){for(var nt=this,rt=arguments.length,it=new Array(rt>1?rt-1:0),ot=1;ot0){var Ot=isToastIdValid(Tt)?1:ct.props.limit;if(It===1||Ot===1)ct.displayedToast++,dt();else{var Wt=Ot>It?It:Ot;ct.displayedToast=Wt;for(var zt=0;zt0&&ct.count>$t.limit&&jt?ct.queue.push({toastContent:Ct,toastProps:Pt,staleId:kt}):isNum(xt)&&xt>0?setTimeout(function(){gt(Ct,Pt,kt)},xt):gt(Ct,Pt,kt)}}function gt(bt,vt,xt){var kt=vt.toastId;xt&&st.delete(xt),st.set(kt,{content:bt,props:vt}),ot(function(St){return[].concat(St,[kt]).filter(function(Tt){return Tt!==xt})})}function yt(bt){var vt=new Map,xt=Array.from(st.values());return tt.newestOnTop&&xt.reverse(),xt.forEach(function(kt){var St=kt.props.position;vt.has(St)||vt.set(St,[]),vt.get(St).push(kt)}),Array.from(vt,function(kt){return bt(kt[0],kt[1])})}return{getToastToRender:yt,containerRef:at,isToastActive:lt}}function getX$1(tt){return tt.targetTouches&&tt.targetTouches.length>=1?tt.targetTouches[0].clientX:tt.clientX}function getY$1(tt){return tt.targetTouches&&tt.targetTouches.length>=1?tt.targetTouches[0].clientY:tt.clientY}function useToast(tt){var et=reactExports.useState(!1),nt=et[0],rt=et[1],it=reactExports.useState(!1),ot=it[0],at=it[1],st=reactExports.useRef(null),lt=reactExports.useRef({start:0,x:0,y:0,delta:0,removalDistance:0,canCloseOnClick:!0,canDrag:!1,boundingRect:null,didMove:!1}).current,ct=reactExports.useRef(tt),ut=tt.autoClose,ht=tt.pauseOnHover,dt=tt.closeToast,pt=tt.onClick,mt=tt.closeOnClick;reactExports.useEffect(function(){ct.current=tt}),reactExports.useEffect(function(){return st.current&&st.current.addEventListener("d",bt,{once:!0}),isFn(tt.onOpen)&&tt.onOpen(reactExports.isValidElement(tt.children)&&tt.children.props),function(){var Dt=ct.current;isFn(Dt.onClose)&&Dt.onClose(reactExports.isValidElement(Dt.children)&&Dt.children.props)}},[]),reactExports.useEffect(function(){return tt.pauseOnFocusLoss&&xt(),function(){tt.pauseOnFocusLoss&&kt()}},[tt.pauseOnFocusLoss]);function gt(Dt){if(tt.draggable){St();var jt=st.current;lt.canCloseOnClick=!0,lt.canDrag=!0,lt.boundingRect=jt.getBoundingClientRect(),jt.style.transition="",lt.x=getX$1(Dt.nativeEvent),lt.y=getY$1(Dt.nativeEvent),tt.draggableDirection==="x"?(lt.start=lt.x,lt.removalDistance=jt.offsetWidth*(tt.draggablePercent/100)):(lt.start=lt.y,lt.removalDistance=jt.offsetHeight*(tt.draggablePercent===80?tt.draggablePercent*1.5:tt.draggablePercent/100))}}function yt(){if(lt.boundingRect){var Dt=lt.boundingRect,jt=Dt.top,Pt=Dt.bottom,Ct=Dt.left,wt=Dt.right;tt.pauseOnHover&<.x>=Ct&<.x<=wt&<.y>=jt&<.y<=Pt?vt():bt()}}function bt(){rt(!0)}function vt(){rt(!1)}function xt(){document.hasFocus()||vt(),window.addEventListener("focus",bt),window.addEventListener("blur",vt)}function kt(){window.removeEventListener("focus",bt),window.removeEventListener("blur",vt)}function St(){lt.didMove=!1,document.addEventListener("mousemove",At),document.addEventListener("mouseup",Et),document.addEventListener("touchmove",At),document.addEventListener("touchend",Et)}function Tt(){document.removeEventListener("mousemove",At),document.removeEventListener("mouseup",Et),document.removeEventListener("touchmove",At),document.removeEventListener("touchend",Et)}function At(Dt){var jt=st.current;lt.canDrag&&jt&&(lt.didMove=!0,nt&&vt(),lt.x=getX$1(Dt),lt.y=getY$1(Dt),tt.draggableDirection==="x"?lt.delta=lt.x-lt.start:lt.delta=lt.y-lt.start,lt.start!==lt.x&&(lt.canCloseOnClick=!1),jt.style.transform="translate"+tt.draggableDirection+"("+lt.delta+"px)",jt.style.opacity=""+(1-Math.abs(lt.delta/lt.removalDistance)))}function Et(){Tt();var Dt=st.current;if(lt.canDrag&<.didMove&&Dt){if(lt.canDrag=!1,Math.abs(lt.delta)>lt.removalDistance){at(!0),tt.closeToast();return}Dt.style.transition="transform 0.2s, opacity 0.2s",Dt.style.transform="translate"+tt.draggableDirection+"(0)",Dt.style.opacity="1"}}var $t={onMouseDown:gt,onTouchStart:gt,onMouseUp:yt,onTouchEnd:yt};return ut&&ht&&($t.onMouseEnter=vt,$t.onMouseLeave=bt),mt&&($t.onClick=function(Dt){pt&&pt(Dt),lt.canCloseOnClick&&dt()}),{playToast:bt,pauseToast:vt,isRunning:nt,preventExitTransition:ot,toastRef:st,eventHandlers:$t}}function CloseButton$8(tt){var et=tt.closeToast,nt=tt.theme,rt=tt.ariaLabel,it=rt===void 0?"close":rt;return reactExports.createElement("button",{className:"Toastify__close-button Toastify__close-button--"+nt,type:"button",onClick:function(at){at.stopPropagation(),et(at)},"aria-label":it},reactExports.createElement("svg",{"aria-hidden":"true",viewBox:"0 0 14 16"},reactExports.createElement("path",{fillRule:"evenodd",d:"M7.71 8.23l3.75 3.75-1.48 1.48-3.75-3.75-3.75 3.75L1 11.98l3.75-3.75L1 4.48 2.48 3l3.75 3.75L9.98 3l1.48 1.48-3.75 3.75z"})))}function ProgressBar(tt){var et,nt,rt=tt.delay,it=tt.isRunning,ot=tt.closeToast,at=tt.type,st=tt.hide,lt=tt.className,ct=tt.style,ut=tt.controlledProgress,ht=tt.progress,dt=tt.rtl,pt=tt.isIn,mt=tt.theme,gt=_extends$s({},ct,{animationDuration:rt+"ms",animationPlayState:it?"running":"paused",opacity:st?0:1});ut&&(gt.transform="scaleX("+ht+")");var yt=clsx$1("Toastify__progress-bar",ut?"Toastify__progress-bar--controlled":"Toastify__progress-bar--animated","Toastify__progress-bar-theme--"+mt,"Toastify__progress-bar--"+at,(et={},et["Toastify__progress-bar--rtl"]=dt,et)),bt=isFn(lt)?lt({rtl:dt,type:at,defaultClassName:yt}):clsx$1(yt,lt),vt=(nt={},nt[ut&&ht>=1?"onTransitionEnd":"onAnimationEnd"]=ut&&ht<1?null:function(){pt&&ot()},nt);return reactExports.createElement("div",Object.assign({role:"progressbar","aria-hidden":st?"true":"false","aria-label":"notification timer",className:bt,style:gt},vt))}ProgressBar.defaultProps={type:TYPE.DEFAULT,hide:!1};var _excluded$1$2=["theme","type"],Svg=function(et){var nt=et.theme,rt=et.type,it=_objectWithoutPropertiesLoose$l(et,_excluded$1$2);return reactExports.createElement("svg",Object.assign({viewBox:"0 0 24 24",width:"100%",height:"100%",fill:nt==="colored"?"currentColor":"var(--toastify-icon-color-"+rt+")"},it))};function Warning(tt){return reactExports.createElement(Svg,Object.assign({},tt),reactExports.createElement("path",{d:"M23.32 17.191L15.438 2.184C14.728.833 13.416 0 11.996 0c-1.42 0-2.733.833-3.443 2.184L.533 17.448a4.744 4.744 0 000 4.368C1.243 23.167 2.555 24 3.975 24h16.05C22.22 24 24 22.044 24 19.632c0-.904-.251-1.746-.68-2.44zm-9.622 1.46c0 1.033-.724 1.823-1.698 1.823s-1.698-.79-1.698-1.822v-.043c0-1.028.724-1.822 1.698-1.822s1.698.79 1.698 1.822v.043zm.039-12.285l-.84 8.06c-.057.581-.408.943-.897.943-.49 0-.84-.367-.896-.942l-.84-8.065c-.057-.624.25-1.095.779-1.095h1.91c.528.005.84.476.784 1.1z"}))}function Info(tt){return reactExports.createElement(Svg,Object.assign({},tt),reactExports.createElement("path",{d:"M12 0a12 12 0 1012 12A12.013 12.013 0 0012 0zm.25 5a1.5 1.5 0 11-1.5 1.5 1.5 1.5 0 011.5-1.5zm2.25 13.5h-4a1 1 0 010-2h.75a.25.25 0 00.25-.25v-4.5a.25.25 0 00-.25-.25h-.75a1 1 0 010-2h1a2 2 0 012 2v4.75a.25.25 0 00.25.25h.75a1 1 0 110 2z"}))}function Success(tt){return reactExports.createElement(Svg,Object.assign({},tt),reactExports.createElement("path",{d:"M12 0a12 12 0 1012 12A12.014 12.014 0 0012 0zm6.927 8.2l-6.845 9.289a1.011 1.011 0 01-1.43.188l-4.888-3.908a1 1 0 111.25-1.562l4.076 3.261 6.227-8.451a1 1 0 111.61 1.183z"}))}function Error$2(tt){return reactExports.createElement(Svg,Object.assign({},tt),reactExports.createElement("path",{d:"M11.983 0a12.206 12.206 0 00-8.51 3.653A11.8 11.8 0 000 12.207 11.779 11.779 0 0011.8 24h.214A12.111 12.111 0 0024 11.791 11.766 11.766 0 0011.983 0zM10.5 16.542a1.476 1.476 0 011.449-1.53h.027a1.527 1.527 0 011.523 1.47 1.475 1.475 0 01-1.449 1.53h-.027a1.529 1.529 0 01-1.523-1.47zM11 12.5v-6a1 1 0 012 0v6a1 1 0 11-2 0z"}))}function Spinner(){return reactExports.createElement("div",{className:"Toastify__spinner"})}var Icons={info:Info,warning:Warning,success:Success,error:Error$2,spinner:Spinner},Toast=function(et){var nt,rt,it=useToast(et),ot=it.isRunning,at=it.preventExitTransition,st=it.toastRef,lt=it.eventHandlers,ct=et.closeButton,ut=et.children,ht=et.autoClose,dt=et.onClick,pt=et.type,mt=et.hideProgressBar,gt=et.closeToast,yt=et.transition,bt=et.position,vt=et.className,xt=et.style,kt=et.bodyClassName,St=et.bodyStyle,Tt=et.progressClassName,At=et.progressStyle,Et=et.updateId,$t=et.role,Dt=et.progress,jt=et.rtl,Pt=et.toastId,Ct=et.deleteToast,wt=et.isIn,It=et.isLoading,Ot=et.icon,Wt=et.theme,zt=clsx$1("Toastify__toast","Toastify__toast-theme--"+Wt,"Toastify__toast--"+pt,(nt={},nt["Toastify__toast--rtl"]=jt,nt)),Ft=isFn(vt)?vt({rtl:jt,position:bt,type:pt,defaultClassName:zt}):clsx$1(zt,vt),Nt=!!Dt,Ut=Icons[pt],Mt={theme:Wt,type:pt},Ht=Ut&&Ut(Mt);Ot===!1?Ht=void 0:isFn(Ot)?Ht=Ot(Mt):reactExports.isValidElement(Ot)?Ht=reactExports.cloneElement(Ot,Mt):isStr(Ot)?Ht=Ot:It&&(Ht=Icons.spinner());function en(sn){if(sn){var Kt={closeToast:gt,type:pt,theme:Wt};if(isFn(sn))return sn(Kt);if(reactExports.isValidElement(sn))return reactExports.cloneElement(sn,Kt)}}return reactExports.createElement(yt,{isIn:wt,done:Ct,position:bt,preventExitTransition:at,nodeRef:st},reactExports.createElement("div",Object.assign({id:Pt,onClick:dt,className:Ft},lt,{style:xt,ref:st}),reactExports.createElement("div",Object.assign({},wt&&{role:$t},{className:isFn(kt)?kt({type:pt}):clsx$1("Toastify__toast-body",kt),style:St}),Ht&&reactExports.createElement("div",{className:clsx$1("Toastify__toast-icon",(rt={},rt["Toastify--animate-icon Toastify__zoom-enter"]=!It,rt))},Ht),reactExports.createElement("div",null,ut)),en(ct),(ht||Nt)&&reactExports.createElement(ProgressBar,Object.assign({},Et&&!Nt?{key:"pb-"+Et}:{},{rtl:jt,theme:Wt,delay:ht,isRunning:ot,isIn:wt,closeToast:gt,hide:mt,type:pt,style:At,className:Tt,controlledProgress:Nt,progress:Dt}))))},Bounce=cssTransition({enter:"Toastify--animate Toastify__bounce-enter",exit:"Toastify--animate Toastify__bounce-exit",appendPosition:!0}),ToastContainer=function(et){var nt=useToastContainer(et),rt=nt.getToastToRender,it=nt.containerRef,ot=nt.isToastActive,at=et.className,st=et.style,lt=et.rtl,ct=et.containerId;function ut(ht){var dt,pt=clsx$1("Toastify__toast-container","Toastify__toast-container--"+ht,(dt={},dt["Toastify__toast-container--rtl"]=lt,dt));return isFn(at)?at({position:ht,rtl:lt,defaultClassName:pt}):clsx$1(pt,parseClassName(at))}return reactExports.createElement("div",{ref:it,className:"Toastify",id:ct},rt(function(ht,dt){var pt=dt.length?_extends$s({},st):_extends$s({},st,{pointerEvents:"none"});return reactExports.createElement("div",{className:ut(ht),style:pt,key:"container-"+ht},dt.map(function(mt){var gt=mt.content,yt=mt.props;return reactExports.createElement(Toast,Object.assign({},yt,{isIn:ot(yt.toastId),key:"toast-"+yt.key,closeButton:yt.closeButton===!0?CloseButton$8:yt.closeButton}),gt)}))}))};ToastContainer.defaultProps={position:POSITION.TOP_RIGHT,transition:Bounce,rtl:!1,autoClose:5e3,hideProgressBar:!1,closeButton:CloseButton$8,pauseOnHover:!0,pauseOnFocusLoss:!0,closeOnClick:!0,newestOnTop:!1,draggable:!0,draggablePercent:80,draggableDirection:"x",role:"alert",theme:"light"};var containers=new Map,latestInstance,containerDomNode,containerConfig,queue$1=[],lazy=!1;function getToast(tt,et){var nt=et.containerId,rt=containers.get(nt||latestInstance);return rt?rt.getToast(tt):null}function generateToastId(){return Math.random().toString(36).substring(2,9)}function getToastId(tt){return tt&&(isStr(tt.toastId)||isNum(tt.toastId))?tt.toastId:generateToastId()}function dispatchToast(tt,et){return containers.size>0?eventManager.emit(0,tt,et):(queue$1.push({content:tt,options:et}),lazy&&canUseDom&&(lazy=!1,containerDomNode=document.createElement("div"),document.body.appendChild(containerDomNode),reactDomExports.render(reactExports.createElement(ToastContainer,Object.assign({},containerConfig)),containerDomNode))),et.toastId}function mergeOptions(tt,et){return _extends$s({},et,{type:et&&et.type||tt,toastId:getToastId(et)})}function createToastByType(tt){return function(et,nt){return dispatchToast(et,mergeOptions(tt,nt))}}function toast(tt,et){return dispatchToast(tt,mergeOptions(TYPE.DEFAULT,et))}toast.loading=function(tt,et){return dispatchToast(tt,mergeOptions(TYPE.DEFAULT,_extends$s({isLoading:!0,autoClose:!1,closeOnClick:!1,closeButton:!1,draggable:!1},et)))};function handlePromise(tt,et,nt){var rt=et.pending,it=et.error,ot=et.success,at;rt&&(at=isStr(rt)?toast.loading(rt,nt):toast.loading(rt.render,_extends$s({},nt,rt)));var st={isLoading:null,autoClose:null,closeOnClick:null,closeButton:null,draggable:null},lt=function(ht,dt,pt){if(dt==null){toast.dismiss(at);return}var mt=_extends$s({type:ht},st,nt,{data:pt}),gt=isStr(dt)?{render:dt}:dt;return at?toast.update(at,_extends$s({},mt,gt)):toast(gt.render,_extends$s({},mt,gt)),pt},ct=isFn(tt)?tt():tt;return ct.then(function(ut){return lt("success",ot,ut)}).catch(function(ut){return lt("error",it,ut)}),ct}toast.promise=handlePromise;toast.success=createToastByType(TYPE.SUCCESS);toast.info=createToastByType(TYPE.INFO);toast.error=createToastByType(TYPE.ERROR);toast.warning=createToastByType(TYPE.WARNING);toast.warn=toast.warning;toast.dark=function(tt,et){return dispatchToast(tt,mergeOptions(TYPE.DEFAULT,_extends$s({theme:"dark"},et)))};toast.dismiss=function(tt){return eventManager.emit(1,tt)};toast.clearWaitingQueue=function(tt){return tt===void 0&&(tt={}),eventManager.emit(5,tt)};toast.isActive=function(tt){var et=!1;return containers.forEach(function(nt){nt.isToastActive&&nt.isToastActive(tt)&&(et=!0)}),et};toast.update=function(tt,et){et===void 0&&(et={}),setTimeout(function(){var nt=getToast(tt,et);if(nt){var rt=nt.props,it=nt.content,ot=_extends$s({},rt,et,{toastId:et.toastId||tt,updateId:generateToastId()});ot.toastId!==tt&&(ot.staleId=tt);var at=ot.render||it;delete ot.render,dispatchToast(at,ot)}},0)};toast.done=function(tt){toast.update(tt,{progress:1})};toast.onChange=function(tt){return isFn(tt)&&eventManager.on(4,tt),function(){isFn(tt)&&eventManager.off(4,tt)}};toast.configure=function(tt){tt===void 0&&(tt={}),lazy=!0,containerConfig=tt};toast.POSITION=POSITION;toast.TYPE=TYPE;eventManager.on(2,function(tt){latestInstance=tt.containerId||tt,containers.set(latestInstance,tt),queue$1.forEach(function(et){eventManager.emit(0,et.content,et.options)}),queue$1=[]}).on(3,function(tt){containers.delete(tt.containerId||tt),containers.size===0&&eventManager.off(0).off(1).off(5),canUseDom&&containerDomNode&&document.body.removeChild(containerDomNode)});const colors={black:"rgb(0, 0, 0)",bluePressState:"rgb(57, 97, 220)",blueTextAccent:"rgb(130, 180, 255)",body:"rgb(21, 30, 39)",boostBg1:"rgb(32, 63, 62)",budgetExplanationModalBg:"rgb(21, 28, 35)",dashboardHeader:"rgba(26, 36, 46, 0.3)",dashboardSearch:"rgb(21, 30, 39)",dashboardWashedoutText:"rgb(107, 122, 141)",divider1:"rgb(21, 30, 39)",divider2:"rgb(16, 19, 23)",divider3:"rgb(71, 81, 94)",gray100:"rgba(51, 51, 51, 0.2)",gray200:"rgba(51, 51, 51, 0.4)",gray300:"rgba(51, 51, 51, 0.6)",gray400:"rgba(51, 51, 51, 0.8)",gray500:"rgb(51, 51, 51)",green100:"rgba(73, 201, 152, 0.2)",green200:"rgba(73, 201, 152, 0.4)",green300:"rgba(73, 201, 152, 0.6)",green400:"rgba(73, 201, 152, 0.8)",greenBorder:"rgb(47, 179, 121)",headerBackground:"rgb(26, 36, 46)",inputBg1:"rgb(32, 39, 47)",inputBg2:"rgb(20, 22, 26)",inputOutline1:"rgb(71, 81, 94)",inputPlaceholder:"rgb(76, 86, 101)",lightBlue100:"rgba(93, 143, 221, 0.2)",lightBlue200:"rgba(93, 143, 221, 0.4)",lightBlue300:"rgba(93, 143, 221, 0.6)",lightBlue400:"rgba(93, 143, 221, 0.8)",lightBlue500:"rgb(93, 143, 221)",lightGray:"rgb(187, 187, 187)",listBg:"rgb(21, 30, 39)",mainBottomIcons:"rgb(144, 155, 170)",modalAuth:"#909baa",modalBg:"rgb(25, 33, 40)",modalShield:"#618aff",modalWhiteOverlayBg:"rgba(255, 255, 255, 0.2)",placeholderText:"rgb(85, 97, 113)",primaryBlueBorder:"rgb(80, 120, 242)",primaryBlue:"rgba(97, 138, 255, 1)",primaryButton:"rgb(130, 180, 255)",primaryGreen:"rgb(73, 201, 152)",primaryRed:"rgb(237, 116, 116)",primaryText1:"rgb(255, 255, 255)",receivedIcon:"rgb(130, 180, 255)",receivedMsgBg:"rgb(34, 46, 58)",secondaryRed:"rgb(255, 143, 128)",secondaryText4:"rgb(107, 122, 141)",sentMsgBg:"rgb(62, 97, 137)",sentMsgBgPress:"rgb(44, 66, 91)",text2:"rgb(255, 255, 255)",textMessages:"rgb(255, 255, 255)",transactionBg:"rgb(30, 41, 52)",transactionBgBorder:"rgb(21, 30, 39)",transactionBlueText:"rgb(130, 180, 255)",unreadMsgText:"rgb(186, 193, 198)",washedOutGreen:"rgb(47, 116, 96)",washedOutReceivedText:"rgb(85, 97, 113)",washedOutSentText:"rgb(130, 156, 185)",white:"rgb(255, 255, 255)",transparentWhite:"#ffffff88",transparentBlack:"#000000bb",BG1:"rgba(35, 37, 47, 1)",BG1_NORMAL:"rgba(28, 30, 38, 1)",BG1_HOVER:"rgba(21, 22, 28, 1)",BG1_PRESS:"#0E0F13",BG2:"rgba(22, 23, 29, 1)",BG3:"rgba(28, 30, 38, 1)",GRAY3:"rgba(186, 193, 198, 1)",GRAY6:"#909BAA",GRAY7:"rgba(107, 122, 141, 1)",SECONDARY_BLUE:"rgba(130, 180, 255, 1)",PRIMARY_BLUE:"rgba(97, 138, 255, 1)",BUTTON1:"rgba(48, 51, 66, 1)",BUTTON1_HOVER:"rgba(44, 47, 60, 1)",BUTTON1_PRESS:"rgba(41, 44, 56, 1)",PRIMARY_BLUE_BORDER:"rgba(80, 120, 242, 1)",BLUE_PRESS_STATE:"rgba(57, 97, 220, 1)"},background=Ae` - ${({background:tt})=>tt&&`background-color: ${colors[tt]};`} -`,switchProp$2=(tt,et)=>{switch(tt){case"borderColor":return`border-color: ${et};`;case"borderRadius":return`border-radius: ${et}px;`;case"borderRadiusBottomLeft":return`border-bottom-left-radius: ${et}px;`;case"borderRadiusBottomRight":return`border-bottom-right-radius: ${et}px;`;case"borderRadiusTopLeft":return`border-top-left-radius: ${et}px;`;case"borderRadiusTopRight":return`border-top-right-radius: ${et}px;`;case"borderSize":return` - border-style: solid; - border-width: ${et}px; - `;default:return""}},getPropStyle$2=(tt,et)=>et===void 0?"":switchProp$2(tt,et),getOverflowHidden=({borderRadius:tt,borderRadiusBottomLeft:et,borderRadiusBottomRight:nt,borderRadiusTopLeft:rt,borderRadiusTopRight:it})=>[tt,et,nt,rt,it].every(ot=>ot===void 0)?"":"overflow: hidden;",border=Ae` - ${({borderColor:tt,borderRadius:et,borderRadiusBottomLeft:nt,borderRadiusBottomRight:rt,borderRadiusTopLeft:it,borderRadiusTopRight:ot,borderSize:at})=>` - ${getOverflowHidden({borderRadius:et,borderRadiusBottomLeft:nt,borderRadiusBottomRight:rt,borderRadiusTopLeft:it,borderRadiusTopRight:ot})} - ${getPropStyle$2("borderColor",tt)} - ${getPropStyle$2("borderRadius",et)} - ${getPropStyle$2("borderRadiusBottomLeft",nt)} - ${getPropStyle$2("borderRadiusBottomRight",rt)} - ${getPropStyle$2("borderRadiusTopLeft",it)} - ${getPropStyle$2("borderRadiusTopRight",ot)} - ${getPropStyle$2("borderSize",at)} - `} -`,assertNever=tt=>{throw new Error(`Unexpected object: ${tt}`)},switchProp$1=(tt,et)=>{switch(tt){case"align":return`align-items: ${et};`;case"justify":return`justify-content: ${et};`;case"basis":case"direction":case"grow":case"shrink":case"wrap":return`flex-${tt}: ${et};`;case"opacity":return`opacity: ${et}`;default:return assertNever(tt)}},getPropStyle$1=(tt,et)=>et===void 0?"":switchProp$1(tt,et),flexbox=Ae` - display: flex; - min-height: 0; - min-width: 0; - - ${({align:tt,basis:et,direction:nt,grow:rt,justify:it,shrink:ot,wrap:at})=>` - ${getPropStyle$1("align",tt)} - ${getPropStyle$1("basis",et)} - ${getPropStyle$1("direction",nt)} - ${getPropStyle$1("grow",rt)} - ${getPropStyle$1("justify",it)} - ${getPropStyle$1("shrink",ot)} - ${getPropStyle$1("wrap",at)} - `} -`,switchProp=(tt,et)=>{switch(tt){case"p":return`padding: ${et}px;`;case"pb":return`padding-bottom: ${et}px;`;case"pl":return`padding-left: ${et}px;`;case"pr":return`padding-right: ${et}px;`;case"pt":return`padding-top: ${et}px;`;case"px":return` - padding-left: ${et}px; - padding-right: ${et}px; - `;case"py":return` - padding-bottom: ${et}px; - padding-top: ${et}px; - `;default:return assertNever(tt)}},getPropStyle=(tt,et)=>et===void 0?"":switchProp(tt,et),padding$1=Ae` - ${({p:tt,pb:et,pl:nt,pr:rt,pt:it,px:ot,py:at})=>` - ${getPropStyle("p",tt)} - ${getPropStyle("px",ot)} - ${getPropStyle("py",at)} - ${getPropStyle("pb",et)} - ${getPropStyle("pl",nt)} - ${getPropStyle("pr",rt)} - ${getPropStyle("pt",it)} - `} -`,defaultProps$6={align:"stretch",basis:"auto",direction:"column",grow:0,justify:"flex-start",opacity:1,shrink:0,wrap:"nowrap"},Flex=styled$4.div.withConfig({shouldForwardProp:(tt,et)=>!["direction","wrap"].includes(tt)&&et(tt)}).attrs(tt=>({...defaultProps$6,...tt}))` - ${background} - ${border} - ${flexbox} - ${padding$1} -`,cssWithMediaQuery=tt=>(et,...nt)=>{const rt=Ae(et,...nt);return rt.join("").trim()?Ae` - @media ${tt} { - ${rt} + function drainQueue() { + if (!draining) { + var tt = runTimeout(cleanUpNextTick) + draining = !0 + for (var et = queue$2.length; et; ) { + for (currentQueue = queue$2, queue$2 = []; ++queueIndex < et; ) currentQueue && currentQueue[queueIndex].run() + ;(queueIndex = -1), (et = queue$2.length) } - `:[""]},breakpoints={large:1024,medium:640,small:0},media={large:cssWithMediaQuery(`(min-width: ${breakpoints.large}px)`),medium:cssWithMediaQuery(`(min-width: ${breakpoints.medium}px)`),mediumOnly:cssWithMediaQuery(`(min-width: ${breakpoints.medium}px) and (max-width: ${breakpoints.large-1}px)`),small:cssWithMediaQuery(`(min-width: ${breakpoints.small}px)`),smallOnly:cssWithMediaQuery(`(min-width: ${breakpoints.small}px) and (max-width: ${breakpoints.medium-1}px)`)},fontSizes={bigHeading:30,bigHeadingBold:30,heading:24,headingBold:24,hugeHeading:40,hugeHeadingBold:40,medium:16,mediumBold:16,regular:14,regularBold:14,tiny:12,tinyBold:12},fontSizesMobile={bigHeading:24,bigHeadingBold:24,heading:18,headingBold:18,hugeHeading:32,hugeHeadingBold:32,medium:16,mediumBold:16,regular:14,regularBold:14,tiny:12,tinyBold:12},fontWeights={bigHeading:400,bigHeadingBold:700,heading:400,headingBold:700,hugeHeading:400,hugeHeadingBold:700,medium:500,mediumBold:600,regular:500,regularBold:600,tiny:300,tinyBold:500},style$2=Ae` - ${({kind:tt="regular"})=>Ae` - font-size: ${fontSizes[tt]}px; - font-weight: ${fontWeights[tt]}; - ${media.smallOnly` - font-size: ${fontSizesMobile[tt]}px; - `} - `} -`,Text$3=styled$4.span.withConfig({shouldForwardProp:(tt,et)=>!["kind"].includes(tt)&&et(tt)})` - ${style$2} - - ${({color:tt="primaryText1"})=>`color: ${colors[tt]};`} -`,getButtonKindDimensions=({kind:tt,shape:et})=>{switch(tt){case"small":return Ae` - padding: 4px 8px; - border-radius: ${et==="rounded"?"16px":"8px"}; - height: 32px; - `;case"big":return Ae` - padding: 16px 24px; - border-radius: ${et==="rounded"?"24px":"8px"}; - height: 48px; - `;default:return Ae` - padding: 8px 16px; - border-radius: ${et==="rounded"?"32px":"8px"}; - height: 64px; - `}},getTextKind=({kind:tt})=>{switch(tt){case"small":return"regularBold";case"big":return"mediumBold";default:return"regularBold"}},Wrapper$s=styled$4(Flex).attrs({align:"center",direction:"row",justify:"center"})` - border: none; - cursor: pointer; - pointer-events: auto; - - ${getButtonKindDimensions} - - &:hover { - opacity: ${({disabled:tt})=>tt?.5:.9}; + ;(currentQueue = null), (draining = !1), runClearTimeout(tt) + } } - - ${({disabled:tt})=>tt&&Ae` - opacity: 0.5; - pointer-events: none; - `} -`,Button=({background:tt="primaryButton",children:et,className:nt="button",startIcon:rt,endIcon:it,disabled:ot,id:at,kind:st="regular",onClick:lt,onPointerDown:ct,shape:ut="squared",textColor:ht="white",type:dt})=>jsxRuntimeExports.jsxs(Wrapper$s,{as:"button",background:tt,className:nt,disabled:ot,id:at,kind:st,onClick:lt,onPointerDown:ct,shape:ut,type:dt,children:[rt&&rt,jsxRuntimeExports.jsx(Text$3,{color:ht,kind:getTextKind({kind:st}),children:et}),it&&it]}),createStoreImpl=tt=>{let et;const nt=new Set,rt=(lt,ct)=>{const ut=typeof lt=="function"?lt(et):lt;if(!Object.is(ut,et)){const ht=et;et=ct??typeof ut!="object"?ut:Object.assign({},et,ut),nt.forEach(dt=>dt(et,ht))}},it=()=>et,st={setState:rt,getState:it,subscribe:lt=>(nt.add(lt),()=>nt.delete(lt)),destroy:()=>{nt.clear()}};return et=tt(rt,it,st),st},createStore$3=tt=>tt?createStoreImpl(tt):createStoreImpl;var withSelector={exports:{}},withSelector_production_min={},shim={exports:{}},useSyncExternalStoreShim_production_min={};/** - * @license React - * use-sync-external-store-shim.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var e$2=reactExports;function h$4(tt,et){return tt===et&&(tt!==0||1/tt===1/et)||tt!==tt&&et!==et}var k$3=typeof Object.is=="function"?Object.is:h$4,l$2=e$2.useState,m$4=e$2.useEffect,n$3=e$2.useLayoutEffect,p$4=e$2.useDebugValue;function q$2(tt,et){var nt=et(),rt=l$2({inst:{value:nt,getSnapshot:et}}),it=rt[0].inst,ot=rt[1];return n$3(function(){it.value=nt,it.getSnapshot=et,r$4(it)&&ot({inst:it})},[tt,nt,et]),m$4(function(){return r$4(it)&&ot({inst:it}),tt(function(){r$4(it)&&ot({inst:it})})},[tt]),p$4(nt),nt}function r$4(tt){var et=tt.getSnapshot;tt=tt.value;try{var nt=et();return!k$3(tt,nt)}catch{return!0}}function t$3(tt,et){return et()}var u$2=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?t$3:q$2;useSyncExternalStoreShim_production_min.useSyncExternalStore=e$2.useSyncExternalStore!==void 0?e$2.useSyncExternalStore:u$2;shim.exports=useSyncExternalStoreShim_production_min;var shimExports=shim.exports;/** - * @license React - * use-sync-external-store-shim/with-selector.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var h$3=reactExports,n$2=shimExports;function p$3(tt,et){return tt===et&&(tt!==0||1/tt===1/et)||tt!==tt&&et!==et}var q$1=typeof Object.is=="function"?Object.is:p$3,r$3=n$2.useSyncExternalStore,t$2=h$3.useRef,u$1=h$3.useEffect,v$3=h$3.useMemo,w$2=h$3.useDebugValue;withSelector_production_min.useSyncExternalStoreWithSelector=function(tt,et,nt,rt,it){var ot=t$2(null);if(ot.current===null){var at={hasValue:!1,value:null};ot.current=at}else at=ot.current;ot=v$3(function(){function lt(pt){if(!ct){if(ct=!0,ut=pt,pt=rt(pt),it!==void 0&&at.hasValue){var mt=at.value;if(it(mt,pt))return ht=mt}return ht=pt}if(mt=ht,q$1(ut,pt))return mt;var gt=rt(pt);return it!==void 0&&it(mt,gt)?mt:(ut=pt,ht=gt)}var ct=!1,ut,ht,dt=nt===void 0?null:nt;return[function(){return lt(et())},dt===null?void 0:function(){return lt(dt())}]},[et,nt,rt,it]);var st=r$3(tt,ot[0],ot[1]);return u$1(function(){at.hasValue=!0,at.value=st},[st]),w$2(st),st};withSelector.exports=withSelector_production_min;var withSelectorExports=withSelector.exports;const useSyncExternalStoreExports=getDefaultExportFromCjs(withSelectorExports),{useSyncExternalStoreWithSelector:useSyncExternalStoreWithSelector$1}=useSyncExternalStoreExports;let didWarnAboutEqualityFn=!1;function useStore$2(tt,et=tt.getState,nt){const rt=useSyncExternalStoreWithSelector$1(tt.subscribe,tt.getState,tt.getServerState||tt.getState,et,nt);return reactExports.useDebugValue(rt),rt}const createImpl=tt=>{const et=typeof tt=="function"?createStore$3(tt):tt,nt=(rt,it)=>useStore$2(et,rt,it);return Object.assign(nt,et),nt},create$3=tt=>tt?createImpl(tt):createImpl;var react=tt=>create$3(tt);const defaultData$a={addNodeModalData:null,currentModals:{addNode:!1,budgetExplanation:!1,sourcesTable:!1}},useModalStore=create$3(tt=>({...defaultData$a,close:et=>{tt(nt=>({addNodeModalData:null,currentModals:{...nt.currentModals,[et]:!1}}))},open:et=>{tt(nt=>({currentModals:{...nt.currentModals,[et]:!0}}))},setAddNodeModalData:et=>{tt(()=>({addNodeModalData:et}))}})),useModal=tt=>{const{open:et,close:nt,setAddNodeModalData:rt,currentModals:it,addNodeModalData:ot}=useModalStore();return{addNodeModalData:ot,close:()=>nt(tt),open:()=>et(tt),setAddNodeModalData:at=>rt(at),visible:it[tt]}},ClearIcon$1=tt=>jsxRuntimeExports.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 32 32",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("g",{id:"Property 1=press",children:jsxRuntimeExports.jsx("path",{id:"close",d:"M16 17.2833L11.5083 21.775C11.3403 21.943 11.1264 22.0271 10.8667 22.0271C10.6069 22.0271 10.393 21.943 10.225 21.775C10.0569 21.6069 9.9729 21.393 9.9729 21.1333C9.9729 20.8736 10.0569 20.6597 10.225 20.4917L14.7167 16L10.225 11.5083C10.0569 11.3403 9.9729 11.1264 9.9729 10.8667C9.9729 10.6069 10.0569 10.393 10.225 10.225C10.393 10.0569 10.6069 9.9729 10.8667 9.9729C11.1264 9.9729 11.3403 10.0569 11.5083 10.225L16 14.7167L20.4917 10.225C20.6597 10.0569 20.8736 9.9729 21.1333 9.9729C21.393 9.9729 21.6069 10.0569 21.775 10.225C21.943 10.393 22.0271 10.6069 22.0271 10.8667C22.0271 11.1264 21.943 11.3403 21.775 11.5083L17.2833 16L21.775 20.4917C21.943 20.6597 22.0271 20.8736 22.0271 21.1333C22.0271 21.393 21.943 21.6069 21.775 21.775C21.6069 21.943 21.393 22.0271 21.1333 22.0271C20.8736 22.0271 20.6597 21.943 20.4917 21.775L16 17.2833Z",fill:"currentColor"})})}),scaleAnimation=We` - 0% { - transform: scale(0.8); + process$1.nextTick = function (tt) { + var et = new Array(arguments.length - 1) + if (arguments.length > 1) for (var nt = 1; nt < arguments.length; nt++) et[nt - 1] = arguments[nt] + queue$2.push(new Item$1(tt, et)), queue$2.length === 1 && !draining && runTimeout(drainQueue) } - - 100% { - transform: scale(1); + function Item$1(tt, et) { + ;(this.fun = tt), (this.array = et) } -`,getModalKindStyles=({kind:tt="regular"})=>{switch(tt){case"small":return Ae` - width: 300px; - height: 502px; - `;case"large":return Ae` - width: 709px; - `;default:return Ae` - width: 520px; - `}},ModalContainer=styled$4(Flex)` - z-index: 2000; - margin: 0 auto; - overflow: visible; - animation: ${scaleAnimation} 0.2s ease-in-out; - position: relative; - max-width: 100%; - overflow: hidden; - ${getModalKindStyles} -`,fadeAnimation=We` - 0% { - opacity: 0; + Item$1.prototype.run = function () { + this.fun.apply(null, this.array) } - - 100% { - opacity: 1; + process$1.title = 'browser' + process$1.browser = !0 + process$1.env = {} + process$1.argv = [] + process$1.version = '' + process$1.versions = {} + function noop$c() {} + process$1.on = noop$c + process$1.addListener = noop$c + process$1.once = noop$c + process$1.off = noop$c + process$1.removeListener = noop$c + process$1.removeAllListeners = noop$c + process$1.emit = noop$c + process$1.prependListener = noop$c + process$1.prependOnceListener = noop$c + process$1.listeners = function (tt) { + return [] } -`,Bg=styled$4(Flex)` - position: fixed; - width: 100%; - height: 100vh; - transition: all; - z-index: 1500; - animation: ${fadeAnimation} 0.2s ease-in-out; - padding: 1rem; - - ${({hideBg:tt})=>!tt&&Ae` - background-color: ${colors.modalWhiteOverlayBg}; - `} -`,CloseButton$7=styled$4(Flex)` - position: absolute; - top: 16px; - right: 16px; - font-size: 20px; - color: ${colors.GRAY6}; - cursor: pointer; - z-index: 1; -`,BaseModal=({background:tt="modalBg",children:et,id:nt,hideBg:rt,kind:it,preventOutsideClose:ot,noWrap:at=!1,onClose:st})=>{const{visible:lt,close:ct}=useModal(nt);return lt?jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsx(Bg,{align:"center",hideBg:rt,justify:"center",onClick:ut=>{ot||(ut.stopPropagation(),ct())},children:jsxRuntimeExports.jsxs(ModalContainer,{background:tt,borderRadius:9,id:nt,kind:it,onClick:ut=>{ut.stopPropagation()},px:at?0:20,py:at?0:20,children:[st&&jsxRuntimeExports.jsx(CloseButton$7,{onClick:st,children:jsxRuntimeExports.jsx(ClearIcon$1,{})}),et]})})}):null},{origin:origin$1,host}=window.location,isDevelopment=origin$1==="http://localhost:3000"||origin$1==="http://localhost:3001"||origin$1==="https://sphinx-jarvis-david.sphinx1.repl.co",getUrlFormEnv=()=>({}).VITE_APP_API_URL,API_URL=getUrlFormEnv()||apiUrlFromSwarmHost()||"https://knowledge-graph.sphinx.chat";console.log("🚀 ~ file: index.ts:12 ~ API_URL:",API_URL);console.log("🚀 ~ file: index.ts:12 ~ getUrlFormEnv:",getUrlFormEnv());const isChileGraph=API_URL.includes("boltwall");function apiUrlFromSwarmHost(){if(host.includes("swarm")&&host.startsWith("nav")){const tt=host.split(".");tt[0]="boltwall";const nt=`https://${tt.join(".")}`;return console.log("API URL:",nt),nt}}const AWS_IMAGE_BUCKET_URL="https://stakwork-uploads.s3.amazonaws.com/",CLOUDFRONT_IMAGE_BUCKET_URL="https://d1gd7b7slyku8k.cloudfront.net/",GRAPH_FOG_COLOR="blue",GRAPH_GROUND_COLOR=13421772,GRAPH_LIGHT_INTENSITY=.8,BOOST_SUCCESS="Boosted successfully",BOOST_ERROR_BUDGET="Boost failed, insufficient budget",NODE_ADD_SUCCESS="Submitted!",NODE_ADD_ERROR="Submission failed, please try again.",NODE_RELATIVE_HIGHLIGHT_COLORS={children:{nodeColor:"green",segmentColor:4063109},guests:{nodeColor:"purple",segmentColor:14504191},topics:{nodeColor:"purple",segmentColor:5273842},pathway:{nodeColor:"#ffffff",segmentColor:16777215}},LINK="link",TWITTER_HANDLE="twitter_handle",GITHUB_REPOSITORY="github_repository",YOUTUBE_CHANNEL="youtube_channel",WEB_PAGE="web_page",RSS="rss",TWITTER_SOURCE="tweet",TOPIC="topic",DOCUMENT="document",isE2E=!!{}.VITE_APP_IS_E2E,request=async(tt,et)=>{const nt=await fetch(tt,et);if(!nt.ok)throw nt;return nt.json()},api={delete:(tt,et)=>request(`${API_URL}${tt}`,{headers:{...et,"Content-Type":"application/json"},method:"DELETE"}),get:(tt,et)=>request(`${API_URL}${tt}`,et?{headers:et}:void 0),post:(tt,et,nt)=>request(`${API_URL}${tt}`,{body:et,headers:{...nt,"Content-Type":"application/json"},method:"POST"}),put:(tt,et,nt)=>request(`${API_URL}${tt}`,{body:et,headers:{...nt,"Content-Type":"application/json"},method:"PUT"})},defaultParams={skip:"0",limit:"500"},getRadarData=async(tt=defaultParams)=>await api.get(`/radar?${new URLSearchParams({...defaultParams,...tt}).toString()}`),getTopicsData=async(tt=defaultParams)=>await api.get(`/topics?${new URLSearchParams({...defaultParams,...tt}).toString()}`),getAboutData=async()=>await api.get("/about"),postAboutData=async tt=>await api.post("/about",JSON.stringify(tt)),triggerRadarJob=async()=>api.get("/radar/trigger-job"),putRadarData=async(tt,et)=>await api.put(`/radar/${tt}`,JSON.stringify(et)),putNodeData=async tt=>await api.put("/node",JSON.stringify(tt)),approveRadarData=async(tt,et)=>await api.put(`/radar/${tt}/approve`,JSON.stringify({approve:"True",pubkey:et})),deleteRadarData=async tt=>await api.delete(`/radar/${tt}`),defaultData$9={isAdmin:!1,pubKey:"",budget:0},useUserStore=react(tt=>({...defaultData$9,setIsAdmin:et=>tt({isAdmin:et}),setPubKey:et=>tt({pubKey:et}),setBudget:et=>tt({budget:et})})),getLSat=async()=>{try{const tt=localStorage.getItem("lsat");if(tt){const nt=JSON.parse(tt);return lsatToken(nt.macaroon,nt.preimage)}if(await distExports$1.enable()){const nt=await distExports$1.getLsat();return nt.macaroon?(localStorage.setItem("lsat",JSON.stringify({macaroon:nt.macaroon,identifier:nt.identifier,preimage:nt.preimage})),lsatToken(nt.macaroon,nt.preimage)):""}return""}catch(tt){return console.warn(tt),""}};function lsatToken(tt,et){return`LSAT ${tt}:${et}`}var lib$2={},client={},errors={},__extends$1=commonjsGlobal&&commonjsGlobal.__extends||function(){var tt=function(et,nt){return tt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(rt,it){rt.__proto__=it}||function(rt,it){for(var ot in it)Object.prototype.hasOwnProperty.call(it,ot)&&(rt[ot]=it[ot])},tt(et,nt)};return function(et,nt){if(typeof nt!="function"&&nt!==null)throw new TypeError("Class extends value "+String(nt)+" is not a constructor or null");tt(et,nt);function rt(){this.constructor=et}et.prototype=nt===null?Object.create(nt):(rt.prototype=nt.prototype,new rt)}}();Object.defineProperty(errors,"__esModule",{value:!0});errors.InternalError=errors.InvalidDataError=errors.RoutingError=errors.UnsupportedMethodError=errors.ConnectionError=errors.RejectionError=errors.MissingProviderError=void 0;function fixError(tt,et,nt){if(Object.setPrototypeOf(tt,nt.prototype),et===nt)if(tt.name=et.name,Error.captureStackTrace)Error.captureStackTrace(tt,nt);else{var rt=new Error(tt.message).stack;rt&&(tt.stack=fixStack(rt,"new ".concat(et.name)))}}function fixStack(tt,et){if(!tt||!et)return tt;var nt=new RegExp("\\s+at\\s".concat(et,"\\s")),rt=tt.split(` -`),it=rt.filter(function(ot){return!ot.match(nt)});return it.join(` -`)}var MissingProviderError=function(tt){__extends$1(et,tt);function et(nt){var rt=this.constructor,it=tt.call(this,nt)||this;return fixError(it,rt,et),it}return et}(Error);errors.MissingProviderError=MissingProviderError;var RejectionError=function(tt){__extends$1(et,tt);function et(nt){var rt=this.constructor,it=tt.call(this,nt)||this;return fixError(it,rt,et),it}return et}(Error);errors.RejectionError=RejectionError;var ConnectionError=function(tt){__extends$1(et,tt);function et(nt){var rt=this.constructor,it=tt.call(this,nt)||this;return fixError(it,rt,et),it}return et}(Error);errors.ConnectionError=ConnectionError;var UnsupportedMethodError=function(tt){__extends$1(et,tt);function et(nt){var rt=this.constructor,it=tt.call(this,nt)||this;return fixError(it,rt,et),it}return et}(Error);errors.UnsupportedMethodError=UnsupportedMethodError;var RoutingError=function(tt){__extends$1(et,tt);function et(nt){var rt=this.constructor,it=tt.call(this,nt)||this;return fixError(it,rt,et),it}return et}(Error);errors.RoutingError=RoutingError;var InvalidDataError=function(tt){__extends$1(et,tt);function et(nt){var rt=this.constructor,it=tt.call(this,nt)||this;return fixError(it,rt,et),it}return et}(Error);errors.InvalidDataError=InvalidDataError;var InternalError=function(tt){__extends$1(et,tt);function et(nt){var rt=this.constructor,it=tt.call(this,nt)||this;return fixError(it,rt,et),it}return et}(Error);errors.InternalError=InternalError;Object.defineProperty(client,"__esModule",{value:!0});client.requestProvider=void 0;var errors_1=errors;function requestProvider(tt){return new Promise(function(et,nt){if(typeof window>"u")return nt(new Error("Must be called in a browser context"));var rt=window.webln;if(!rt)return nt(new errors_1.MissingProviderError("Your browser has no WebLN provider"));rt.enable().then(function(){return et(rt)}).catch(function(it){return nt(it)})})}client.requestProvider=requestProvider;var provider={};Object.defineProperty(provider,"__esModule",{value:!0});(function(tt){var et=commonjsGlobal&&commonjsGlobal.__createBinding||(Object.create?function(rt,it,ot,at){at===void 0&&(at=ot);var st=Object.getOwnPropertyDescriptor(it,ot);(!st||("get"in st?!it.__esModule:st.writable||st.configurable))&&(st={enumerable:!0,get:function(){return it[ot]}}),Object.defineProperty(rt,at,st)}:function(rt,it,ot,at){at===void 0&&(at=ot),rt[at]=it[ot]}),nt=commonjsGlobal&&commonjsGlobal.__exportStar||function(rt,it){for(var ot in rt)ot!=="default"&&!Object.prototype.hasOwnProperty.call(it,ot)&&et(it,rt,ot)};Object.defineProperty(tt,"__esModule",{value:!0}),nt(client,tt),nt(provider,tt),nt(errors,tt)})(lib$2);async function payLsat(tt){if(await distExports$1.enable()){const it=localStorage.getItem("lsat");if(it){localStorage.removeItem("lsat");const at=JSON.parse(it);await distExports$1.updateLsat(at.identifier,"expired")}const ot=await distExports$1.saveLsat(tt.invoice,tt.baseMacaroon,window.location.host);ot.success===!1&&await distExports$1.topup(),localStorage.setItem("lsat",JSON.stringify({macaroon:tt.baseMacaroon,identifier:tt.id,preimage:ot.lsat.split(":")[1]}));return}localStorage.removeItem("lsat");const rt=await(await lib$2.requestProvider()).sendPayment(tt.invoice);localStorage.setItem("lsat",JSON.stringify({macaroon:tt.baseMacaroon,identifier:tt.id,preimage:rt.preimage}))}async function updateBudget(tt){await distExports$1.enable();const et=await distExports$1.getBudget();(et==null?void 0:et.msg)==="Invalid Action"?tt(null):et!=null&&et.budget&&tt(et.budget)}const executeIfTetsRunning=tt=>{isE2E&&tt()};function executeIfProd(tt){return isDevelopment||isE2E?null:tt()}function addToGlobalForE2e(tt,et){executeIfTetsRunning(()=>{window.e2e||(window.e2e={}),window.e2e[et]=tt})}const E2E=()=>{const tt=useUserStore();return reactExports.useEffect(()=>{isE2E&&(console.log({isE2E}),addToGlobalForE2e(tt,"userStore"))},[tt]),jsxRuntimeExports.jsx("div",{id:"e2e-check"})},E2ETests=reactExports.memo(()=>isE2E?jsxRuntimeExports.jsx(E2E,{}):null);function timeToMilliseconds(tt){const[et,nt,rt]=tt.split(":").map(Number);return Number((et*60*60*1e3+nt*60*1e3+rt*1e3).toFixed(6))}/** - * @license - * Copyright 2010-2022 Three.js Authors - * SPDX-License-Identifier: MIT - */const REVISION="143",MOUSE={LEFT:0,MIDDLE:1,RIGHT:2,ROTATE:0,DOLLY:1,PAN:2},TOUCH={ROTATE:0,PAN:1,DOLLY_PAN:2,DOLLY_ROTATE:3},CullFaceNone=0,CullFaceBack=1,CullFaceFront=2,CullFaceFrontBack=3,BasicShadowMap=0,PCFShadowMap=1,PCFSoftShadowMap=2,VSMShadowMap=3,FrontSide=0,BackSide=1,DoubleSide=2,FlatShading=1,SmoothShading=2,NoBlending=0,NormalBlending=1,AdditiveBlending=2,SubtractiveBlending=3,MultiplyBlending=4,CustomBlending=5,AddEquation=100,SubtractEquation=101,ReverseSubtractEquation=102,MinEquation=103,MaxEquation=104,ZeroFactor=200,OneFactor=201,SrcColorFactor=202,OneMinusSrcColorFactor=203,SrcAlphaFactor=204,OneMinusSrcAlphaFactor=205,DstAlphaFactor=206,OneMinusDstAlphaFactor=207,DstColorFactor=208,OneMinusDstColorFactor=209,SrcAlphaSaturateFactor=210,NeverDepth=0,AlwaysDepth=1,LessDepth=2,LessEqualDepth=3,EqualDepth=4,GreaterEqualDepth=5,GreaterDepth=6,NotEqualDepth=7,MultiplyOperation=0,MixOperation=1,AddOperation=2,NoToneMapping=0,LinearToneMapping=1,ReinhardToneMapping=2,CineonToneMapping=3,ACESFilmicToneMapping=4,CustomToneMapping=5,UVMapping=300,CubeReflectionMapping=301,CubeRefractionMapping=302,EquirectangularReflectionMapping=303,EquirectangularRefractionMapping=304,CubeUVReflectionMapping=306,RepeatWrapping=1e3,ClampToEdgeWrapping=1001,MirroredRepeatWrapping=1002,NearestFilter=1003,NearestMipmapNearestFilter=1004,NearestMipMapNearestFilter=1004,NearestMipmapLinearFilter=1005,NearestMipMapLinearFilter=1005,LinearFilter=1006,LinearMipmapNearestFilter=1007,LinearMipMapNearestFilter=1007,LinearMipmapLinearFilter=1008,LinearMipMapLinearFilter=1008,UnsignedByteType=1009,ByteType=1010,ShortType=1011,UnsignedShortType=1012,IntType=1013,UnsignedIntType=1014,FloatType=1015,HalfFloatType=1016,UnsignedShort4444Type=1017,UnsignedShort5551Type=1018,UnsignedInt248Type=1020,AlphaFormat=1021,RGBFormat=1022,RGBAFormat=1023,LuminanceFormat=1024,LuminanceAlphaFormat=1025,DepthFormat=1026,DepthStencilFormat=1027,RedFormat=1028,RedIntegerFormat=1029,RGFormat=1030,RGIntegerFormat=1031,RGBAIntegerFormat=1033,RGB_S3TC_DXT1_Format=33776,RGBA_S3TC_DXT1_Format=33777,RGBA_S3TC_DXT3_Format=33778,RGBA_S3TC_DXT5_Format=33779,RGB_PVRTC_4BPPV1_Format=35840,RGB_PVRTC_2BPPV1_Format=35841,RGBA_PVRTC_4BPPV1_Format=35842,RGBA_PVRTC_2BPPV1_Format=35843,RGB_ETC1_Format=36196,RGB_ETC2_Format=37492,RGBA_ETC2_EAC_Format=37496,RGBA_ASTC_4x4_Format=37808,RGBA_ASTC_5x4_Format=37809,RGBA_ASTC_5x5_Format=37810,RGBA_ASTC_6x5_Format=37811,RGBA_ASTC_6x6_Format=37812,RGBA_ASTC_8x5_Format=37813,RGBA_ASTC_8x6_Format=37814,RGBA_ASTC_8x8_Format=37815,RGBA_ASTC_10x5_Format=37816,RGBA_ASTC_10x6_Format=37817,RGBA_ASTC_10x8_Format=37818,RGBA_ASTC_10x10_Format=37819,RGBA_ASTC_12x10_Format=37820,RGBA_ASTC_12x12_Format=37821,RGBA_BPTC_Format=36492,LoopOnce=2200,LoopRepeat=2201,LoopPingPong=2202,InterpolateDiscrete=2300,InterpolateLinear=2301,InterpolateSmooth=2302,ZeroCurvatureEnding=2400,ZeroSlopeEnding=2401,WrapAroundEnding=2402,NormalAnimationBlendMode=2500,AdditiveAnimationBlendMode=2501,TrianglesDrawMode=0,TriangleStripDrawMode=1,TriangleFanDrawMode=2,LinearEncoding=3e3,sRGBEncoding=3001,BasicDepthPacking=3200,RGBADepthPacking=3201,TangentSpaceNormalMap=0,ObjectSpaceNormalMap=1,NoColorSpace$1="",SRGBColorSpace$1="srgb",LinearSRGBColorSpace$1="srgb-linear",ZeroStencilOp=0,KeepStencilOp=7680,ReplaceStencilOp=7681,IncrementStencilOp=7682,DecrementStencilOp=7683,IncrementWrapStencilOp=34055,DecrementWrapStencilOp=34056,InvertStencilOp=5386,NeverStencilFunc=512,LessStencilFunc=513,EqualStencilFunc=514,LessEqualStencilFunc=515,GreaterStencilFunc=516,NotEqualStencilFunc=517,GreaterEqualStencilFunc=518,AlwaysStencilFunc=519,StaticDrawUsage=35044,DynamicDrawUsage=35048,StreamDrawUsage=35040,StaticReadUsage=35045,DynamicReadUsage=35049,StreamReadUsage=35041,StaticCopyUsage=35046,DynamicCopyUsage=35050,StreamCopyUsage=35042,GLSL1="100",GLSL3="300 es",_SRGBAFormat=1035;let EventDispatcher$1=class{addEventListener(et,nt){this._listeners===void 0&&(this._listeners={});const rt=this._listeners;rt[et]===void 0&&(rt[et]=[]),rt[et].indexOf(nt)===-1&&rt[et].push(nt)}hasEventListener(et,nt){if(this._listeners===void 0)return!1;const rt=this._listeners;return rt[et]!==void 0&&rt[et].indexOf(nt)!==-1}removeEventListener(et,nt){if(this._listeners===void 0)return;const it=this._listeners[et];if(it!==void 0){const ot=it.indexOf(nt);ot!==-1&&it.splice(ot,1)}}dispatchEvent(et){if(this._listeners===void 0)return;const rt=this._listeners[et.type];if(rt!==void 0){et.target=this;const it=rt.slice(0);for(let ot=0,at=it.length;ot>8&255]+_lut$1[tt>>16&255]+_lut$1[tt>>24&255]+"-"+_lut$1[et&255]+_lut$1[et>>8&255]+"-"+_lut$1[et>>16&15|64]+_lut$1[et>>24&255]+"-"+_lut$1[nt&63|128]+_lut$1[nt>>8&255]+"-"+_lut$1[nt>>16&255]+_lut$1[nt>>24&255]+_lut$1[rt&255]+_lut$1[rt>>8&255]+_lut$1[rt>>16&255]+_lut$1[rt>>24&255]).toLowerCase()}function clamp$5(tt,et,nt){return Math.max(et,Math.min(nt,tt))}function euclideanModulo(tt,et){return(tt%et+et)%et}function mapLinear(tt,et,nt,rt,it){return rt+(tt-et)*(it-rt)/(nt-et)}function inverseLerp(tt,et,nt){return tt!==et?(nt-tt)/(et-tt):0}function lerp(tt,et,nt){return(1-nt)*tt+nt*et}function damp$1(tt,et,nt,rt){return lerp(tt,et,1-Math.exp(-nt*rt))}function pingpong(tt,et=1){return et-Math.abs(euclideanModulo(tt,et*2)-et)}function smoothstep(tt,et,nt){return tt<=et?0:tt>=nt?1:(tt=(tt-et)/(nt-et),tt*tt*(3-2*tt))}function smootherstep(tt,et,nt){return tt<=et?0:tt>=nt?1:(tt=(tt-et)/(nt-et),tt*tt*tt*(tt*(tt*6-15)+10))}function randInt(tt,et){return tt+Math.floor(Math.random()*(et-tt+1))}function randFloat(tt,et){return tt+Math.random()*(et-tt)}function randFloatSpread(tt){return tt*(.5-Math.random())}function seededRandom(tt){tt!==void 0&&(_seed=tt);let et=_seed+=1831565813;return et=Math.imul(et^et>>>15,et|1),et^=et+Math.imul(et^et>>>7,et|61),((et^et>>>14)>>>0)/4294967296}function degToRad(tt){return tt*DEG2RAD$1}function radToDeg(tt){return tt*RAD2DEG}function isPowerOfTwo(tt){return(tt&tt-1)===0&&tt!==0}function ceilPowerOfTwo(tt){return Math.pow(2,Math.ceil(Math.log(tt)/Math.LN2))}function floorPowerOfTwo(tt){return Math.pow(2,Math.floor(Math.log(tt)/Math.LN2))}function setQuaternionFromProperEuler(tt,et,nt,rt,it){const ot=Math.cos,at=Math.sin,st=ot(nt/2),lt=at(nt/2),ct=ot((et+rt)/2),ut=at((et+rt)/2),ht=ot((et-rt)/2),dt=at((et-rt)/2),pt=ot((rt-et)/2),mt=at((rt-et)/2);switch(it){case"XYX":tt.set(st*ut,lt*ht,lt*dt,st*ct);break;case"YZY":tt.set(lt*dt,st*ut,lt*ht,st*ct);break;case"ZXZ":tt.set(lt*ht,lt*dt,st*ut,st*ct);break;case"XZX":tt.set(st*ut,lt*mt,lt*pt,st*ct);break;case"YXY":tt.set(lt*pt,st*ut,lt*mt,st*ct);break;case"ZYZ":tt.set(lt*mt,lt*pt,st*ut,st*ct);break;default:console.warn("THREE.MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: "+it)}}function denormalize$1(tt,et){switch(et.constructor){case Float32Array:return tt;case Uint16Array:return tt/65535;case Uint8Array:return tt/255;case Int16Array:return Math.max(tt/32767,-1);case Int8Array:return Math.max(tt/127,-1);default:throw new Error("Invalid component type.")}}function normalize$2(tt,et){switch(et.constructor){case Float32Array:return tt;case Uint16Array:return Math.round(tt*65535);case Uint8Array:return Math.round(tt*255);case Int16Array:return Math.round(tt*32767);case Int8Array:return Math.round(tt*127);default:throw new Error("Invalid component type.")}}var MathUtils=Object.freeze({__proto__:null,DEG2RAD:DEG2RAD$1,RAD2DEG,generateUUID:generateUUID$1,clamp:clamp$5,euclideanModulo,mapLinear,inverseLerp,lerp,damp:damp$1,pingpong,smoothstep,smootherstep,randInt,randFloat,randFloatSpread,seededRandom,degToRad,radToDeg,isPowerOfTwo,ceilPowerOfTwo,floorPowerOfTwo,setQuaternionFromProperEuler,normalize:normalize$2,denormalize:denormalize$1});class Vector2{constructor(et=0,nt=0){Vector2.prototype.isVector2=!0,this.x=et,this.y=nt}get width(){return this.x}set width(et){this.x=et}get height(){return this.y}set height(et){this.y=et}set(et,nt){return this.x=et,this.y=nt,this}setScalar(et){return this.x=et,this.y=et,this}setX(et){return this.x=et,this}setY(et){return this.y=et,this}setComponent(et,nt){switch(et){case 0:this.x=nt;break;case 1:this.y=nt;break;default:throw new Error("index is out of range: "+et)}return this}getComponent(et){switch(et){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+et)}}clone(){return new this.constructor(this.x,this.y)}copy(et){return this.x=et.x,this.y=et.y,this}add(et){return this.x+=et.x,this.y+=et.y,this}addScalar(et){return this.x+=et,this.y+=et,this}addVectors(et,nt){return this.x=et.x+nt.x,this.y=et.y+nt.y,this}addScaledVector(et,nt){return this.x+=et.x*nt,this.y+=et.y*nt,this}sub(et){return this.x-=et.x,this.y-=et.y,this}subScalar(et){return this.x-=et,this.y-=et,this}subVectors(et,nt){return this.x=et.x-nt.x,this.y=et.y-nt.y,this}multiply(et){return this.x*=et.x,this.y*=et.y,this}multiplyScalar(et){return this.x*=et,this.y*=et,this}divide(et){return this.x/=et.x,this.y/=et.y,this}divideScalar(et){return this.multiplyScalar(1/et)}applyMatrix3(et){const nt=this.x,rt=this.y,it=et.elements;return this.x=it[0]*nt+it[3]*rt+it[6],this.y=it[1]*nt+it[4]*rt+it[7],this}min(et){return this.x=Math.min(this.x,et.x),this.y=Math.min(this.y,et.y),this}max(et){return this.x=Math.max(this.x,et.x),this.y=Math.max(this.y,et.y),this}clamp(et,nt){return this.x=Math.max(et.x,Math.min(nt.x,this.x)),this.y=Math.max(et.y,Math.min(nt.y,this.y)),this}clampScalar(et,nt){return this.x=Math.max(et,Math.min(nt,this.x)),this.y=Math.max(et,Math.min(nt,this.y)),this}clampLength(et,nt){const rt=this.length();return this.divideScalar(rt||1).multiplyScalar(Math.max(et,Math.min(nt,rt)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this}negate(){return this.x=-this.x,this.y=-this.y,this}dot(et){return this.x*et.x+this.y*et.y}cross(et){return this.x*et.y-this.y*et.x}lengthSq(){return this.x*this.x+this.y*this.y}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}normalize(){return this.divideScalar(this.length()||1)}angle(){return Math.atan2(-this.y,-this.x)+Math.PI}distanceTo(et){return Math.sqrt(this.distanceToSquared(et))}distanceToSquared(et){const nt=this.x-et.x,rt=this.y-et.y;return nt*nt+rt*rt}manhattanDistanceTo(et){return Math.abs(this.x-et.x)+Math.abs(this.y-et.y)}setLength(et){return this.normalize().multiplyScalar(et)}lerp(et,nt){return this.x+=(et.x-this.x)*nt,this.y+=(et.y-this.y)*nt,this}lerpVectors(et,nt,rt){return this.x=et.x+(nt.x-et.x)*rt,this.y=et.y+(nt.y-et.y)*rt,this}equals(et){return et.x===this.x&&et.y===this.y}fromArray(et,nt=0){return this.x=et[nt],this.y=et[nt+1],this}toArray(et=[],nt=0){return et[nt]=this.x,et[nt+1]=this.y,et}fromBufferAttribute(et,nt){return this.x=et.getX(nt),this.y=et.getY(nt),this}rotateAround(et,nt){const rt=Math.cos(nt),it=Math.sin(nt),ot=this.x-et.x,at=this.y-et.y;return this.x=ot*rt-at*it+et.x,this.y=ot*it+at*rt+et.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}}class Matrix3{constructor(){Matrix3.prototype.isMatrix3=!0,this.elements=[1,0,0,0,1,0,0,0,1]}set(et,nt,rt,it,ot,at,st,lt,ct){const ut=this.elements;return ut[0]=et,ut[1]=it,ut[2]=st,ut[3]=nt,ut[4]=ot,ut[5]=lt,ut[6]=rt,ut[7]=at,ut[8]=ct,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(et){const nt=this.elements,rt=et.elements;return nt[0]=rt[0],nt[1]=rt[1],nt[2]=rt[2],nt[3]=rt[3],nt[4]=rt[4],nt[5]=rt[5],nt[6]=rt[6],nt[7]=rt[7],nt[8]=rt[8],this}extractBasis(et,nt,rt){return et.setFromMatrix3Column(this,0),nt.setFromMatrix3Column(this,1),rt.setFromMatrix3Column(this,2),this}setFromMatrix4(et){const nt=et.elements;return this.set(nt[0],nt[4],nt[8],nt[1],nt[5],nt[9],nt[2],nt[6],nt[10]),this}multiply(et){return this.multiplyMatrices(this,et)}premultiply(et){return this.multiplyMatrices(et,this)}multiplyMatrices(et,nt){const rt=et.elements,it=nt.elements,ot=this.elements,at=rt[0],st=rt[3],lt=rt[6],ct=rt[1],ut=rt[4],ht=rt[7],dt=rt[2],pt=rt[5],mt=rt[8],gt=it[0],yt=it[3],bt=it[6],vt=it[1],xt=it[4],kt=it[7],St=it[2],Tt=it[5],At=it[8];return ot[0]=at*gt+st*vt+lt*St,ot[3]=at*yt+st*xt+lt*Tt,ot[6]=at*bt+st*kt+lt*At,ot[1]=ct*gt+ut*vt+ht*St,ot[4]=ct*yt+ut*xt+ht*Tt,ot[7]=ct*bt+ut*kt+ht*At,ot[2]=dt*gt+pt*vt+mt*St,ot[5]=dt*yt+pt*xt+mt*Tt,ot[8]=dt*bt+pt*kt+mt*At,this}multiplyScalar(et){const nt=this.elements;return nt[0]*=et,nt[3]*=et,nt[6]*=et,nt[1]*=et,nt[4]*=et,nt[7]*=et,nt[2]*=et,nt[5]*=et,nt[8]*=et,this}determinant(){const et=this.elements,nt=et[0],rt=et[1],it=et[2],ot=et[3],at=et[4],st=et[5],lt=et[6],ct=et[7],ut=et[8];return nt*at*ut-nt*st*ct-rt*ot*ut+rt*st*lt+it*ot*ct-it*at*lt}invert(){const et=this.elements,nt=et[0],rt=et[1],it=et[2],ot=et[3],at=et[4],st=et[5],lt=et[6],ct=et[7],ut=et[8],ht=ut*at-st*ct,dt=st*lt-ut*ot,pt=ct*ot-at*lt,mt=nt*ht+rt*dt+it*pt;if(mt===0)return this.set(0,0,0,0,0,0,0,0,0);const gt=1/mt;return et[0]=ht*gt,et[1]=(it*ct-ut*rt)*gt,et[2]=(st*rt-it*at)*gt,et[3]=dt*gt,et[4]=(ut*nt-it*lt)*gt,et[5]=(it*ot-st*nt)*gt,et[6]=pt*gt,et[7]=(rt*lt-ct*nt)*gt,et[8]=(at*nt-rt*ot)*gt,this}transpose(){let et;const nt=this.elements;return et=nt[1],nt[1]=nt[3],nt[3]=et,et=nt[2],nt[2]=nt[6],nt[6]=et,et=nt[5],nt[5]=nt[7],nt[7]=et,this}getNormalMatrix(et){return this.setFromMatrix4(et).invert().transpose()}transposeIntoArray(et){const nt=this.elements;return et[0]=nt[0],et[1]=nt[3],et[2]=nt[6],et[3]=nt[1],et[4]=nt[4],et[5]=nt[7],et[6]=nt[2],et[7]=nt[5],et[8]=nt[8],this}setUvTransform(et,nt,rt,it,ot,at,st){const lt=Math.cos(ot),ct=Math.sin(ot);return this.set(rt*lt,rt*ct,-rt*(lt*at+ct*st)+at+et,-it*ct,it*lt,-it*(-ct*at+lt*st)+st+nt,0,0,1),this}scale(et,nt){const rt=this.elements;return rt[0]*=et,rt[3]*=et,rt[6]*=et,rt[1]*=nt,rt[4]*=nt,rt[7]*=nt,this}rotate(et){const nt=Math.cos(et),rt=Math.sin(et),it=this.elements,ot=it[0],at=it[3],st=it[6],lt=it[1],ct=it[4],ut=it[7];return it[0]=nt*ot+rt*lt,it[3]=nt*at+rt*ct,it[6]=nt*st+rt*ut,it[1]=-rt*ot+nt*lt,it[4]=-rt*at+nt*ct,it[7]=-rt*st+nt*ut,this}translate(et,nt){const rt=this.elements;return rt[0]+=et*rt[2],rt[3]+=et*rt[5],rt[6]+=et*rt[8],rt[1]+=nt*rt[2],rt[4]+=nt*rt[5],rt[7]+=nt*rt[8],this}equals(et){const nt=this.elements,rt=et.elements;for(let it=0;it<9;it++)if(nt[it]!==rt[it])return!1;return!0}fromArray(et,nt=0){for(let rt=0;rt<9;rt++)this.elements[rt]=et[rt+nt];return this}toArray(et=[],nt=0){const rt=this.elements;return et[nt]=rt[0],et[nt+1]=rt[1],et[nt+2]=rt[2],et[nt+3]=rt[3],et[nt+4]=rt[4],et[nt+5]=rt[5],et[nt+6]=rt[6],et[nt+7]=rt[7],et[nt+8]=rt[8],et}clone(){return new this.constructor().fromArray(this.elements)}}function arrayNeedsUint32(tt){for(let et=tt.length-1;et>=0;--et)if(tt[et]>65535)return!0;return!1}const TYPED_ARRAYS={Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array};function getTypedArray(tt,et){return new TYPED_ARRAYS[tt](et)}function createElementNS(tt){return document.createElementNS("http://www.w3.org/1999/xhtml",tt)}function SRGBToLinear(tt){return tt<.04045?tt*.0773993808:Math.pow(tt*.9478672986+.0521327014,2.4)}function LinearToSRGB(tt){return tt<.0031308?tt*12.92:1.055*Math.pow(tt,.41666)-.055}const FN={[SRGBColorSpace$1]:{[LinearSRGBColorSpace$1]:SRGBToLinear},[LinearSRGBColorSpace$1]:{[SRGBColorSpace$1]:LinearToSRGB}},ColorManagement={legacyMode:!0,get workingColorSpace(){return LinearSRGBColorSpace$1},set workingColorSpace(tt){console.warn("THREE.ColorManagement: .workingColorSpace is readonly.")},convert:function(tt,et,nt){if(this.legacyMode||et===nt||!et||!nt)return tt;if(FN[et]&&FN[et][nt]!==void 0){const rt=FN[et][nt];return tt.r=rt(tt.r),tt.g=rt(tt.g),tt.b=rt(tt.b),tt}throw new Error("Unsupported color space conversion.")},fromWorkingColorSpace:function(tt,et){return this.convert(tt,this.workingColorSpace,et)},toWorkingColorSpace:function(tt,et){return this.convert(tt,et,this.workingColorSpace)}},_colorKeywords={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},_rgb={r:0,g:0,b:0},_hslA={h:0,s:0,l:0},_hslB={h:0,s:0,l:0};function hue2rgb(tt,et,nt){return nt<0&&(nt+=1),nt>1&&(nt-=1),nt<1/6?tt+(et-tt)*6*nt:nt<1/2?et:nt<2/3?tt+(et-tt)*6*(2/3-nt):tt}function toComponents(tt,et){return et.r=tt.r,et.g=tt.g,et.b=tt.b,et}let Color$1=class{constructor(et,nt,rt){return this.isColor=!0,this.r=1,this.g=1,this.b=1,nt===void 0&&rt===void 0?this.set(et):this.setRGB(et,nt,rt)}set(et){return et&&et.isColor?this.copy(et):typeof et=="number"?this.setHex(et):typeof et=="string"&&this.setStyle(et),this}setScalar(et){return this.r=et,this.g=et,this.b=et,this}setHex(et,nt=SRGBColorSpace$1){return et=Math.floor(et),this.r=(et>>16&255)/255,this.g=(et>>8&255)/255,this.b=(et&255)/255,ColorManagement.toWorkingColorSpace(this,nt),this}setRGB(et,nt,rt,it=LinearSRGBColorSpace$1){return this.r=et,this.g=nt,this.b=rt,ColorManagement.toWorkingColorSpace(this,it),this}setHSL(et,nt,rt,it=LinearSRGBColorSpace$1){if(et=euclideanModulo(et,1),nt=clamp$5(nt,0,1),rt=clamp$5(rt,0,1),nt===0)this.r=this.g=this.b=rt;else{const ot=rt<=.5?rt*(1+nt):rt+nt-rt*nt,at=2*rt-ot;this.r=hue2rgb(at,ot,et+1/3),this.g=hue2rgb(at,ot,et),this.b=hue2rgb(at,ot,et-1/3)}return ColorManagement.toWorkingColorSpace(this,it),this}setStyle(et,nt=SRGBColorSpace$1){function rt(ot){ot!==void 0&&parseFloat(ot)<1&&console.warn("THREE.Color: Alpha component of "+et+" will be ignored.")}let it;if(it=/^((?:rgb|hsl)a?)\(([^\)]*)\)/.exec(et)){let ot;const at=it[1],st=it[2];switch(at){case"rgb":case"rgba":if(ot=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(st))return this.r=Math.min(255,parseInt(ot[1],10))/255,this.g=Math.min(255,parseInt(ot[2],10))/255,this.b=Math.min(255,parseInt(ot[3],10))/255,ColorManagement.toWorkingColorSpace(this,nt),rt(ot[4]),this;if(ot=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(st))return this.r=Math.min(100,parseInt(ot[1],10))/100,this.g=Math.min(100,parseInt(ot[2],10))/100,this.b=Math.min(100,parseInt(ot[3],10))/100,ColorManagement.toWorkingColorSpace(this,nt),rt(ot[4]),this;break;case"hsl":case"hsla":if(ot=/^\s*(\d*\.?\d+)\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(st)){const lt=parseFloat(ot[1])/360,ct=parseInt(ot[2],10)/100,ut=parseInt(ot[3],10)/100;return rt(ot[4]),this.setHSL(lt,ct,ut,nt)}break}}else if(it=/^\#([A-Fa-f\d]+)$/.exec(et)){const ot=it[1],at=ot.length;if(at===3)return this.r=parseInt(ot.charAt(0)+ot.charAt(0),16)/255,this.g=parseInt(ot.charAt(1)+ot.charAt(1),16)/255,this.b=parseInt(ot.charAt(2)+ot.charAt(2),16)/255,ColorManagement.toWorkingColorSpace(this,nt),this;if(at===6)return this.r=parseInt(ot.charAt(0)+ot.charAt(1),16)/255,this.g=parseInt(ot.charAt(2)+ot.charAt(3),16)/255,this.b=parseInt(ot.charAt(4)+ot.charAt(5),16)/255,ColorManagement.toWorkingColorSpace(this,nt),this}return et&&et.length>0?this.setColorName(et,nt):this}setColorName(et,nt=SRGBColorSpace$1){const rt=_colorKeywords[et.toLowerCase()];return rt!==void 0?this.setHex(rt,nt):console.warn("THREE.Color: Unknown color "+et),this}clone(){return new this.constructor(this.r,this.g,this.b)}copy(et){return this.r=et.r,this.g=et.g,this.b=et.b,this}copySRGBToLinear(et){return this.r=SRGBToLinear(et.r),this.g=SRGBToLinear(et.g),this.b=SRGBToLinear(et.b),this}copyLinearToSRGB(et){return this.r=LinearToSRGB(et.r),this.g=LinearToSRGB(et.g),this.b=LinearToSRGB(et.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(et=SRGBColorSpace$1){return ColorManagement.fromWorkingColorSpace(toComponents(this,_rgb),et),clamp$5(_rgb.r*255,0,255)<<16^clamp$5(_rgb.g*255,0,255)<<8^clamp$5(_rgb.b*255,0,255)<<0}getHexString(et=SRGBColorSpace$1){return("000000"+this.getHex(et).toString(16)).slice(-6)}getHSL(et,nt=LinearSRGBColorSpace$1){ColorManagement.fromWorkingColorSpace(toComponents(this,_rgb),nt);const rt=_rgb.r,it=_rgb.g,ot=_rgb.b,at=Math.max(rt,it,ot),st=Math.min(rt,it,ot);let lt,ct;const ut=(st+at)/2;if(st===at)lt=0,ct=0;else{const ht=at-st;switch(ct=ut<=.5?ht/(at+st):ht/(2-at-st),at){case rt:lt=(it-ot)/ht+(it"u")return et.src;let nt;if(et instanceof HTMLCanvasElement)nt=et;else{_canvas===void 0&&(_canvas=createElementNS("canvas")),_canvas.width=et.width,_canvas.height=et.height;const rt=_canvas.getContext("2d");et instanceof ImageData?rt.putImageData(et,0,0):rt.drawImage(et,0,0,et.width,et.height),nt=_canvas}return nt.width>2048||nt.height>2048?(console.warn("THREE.ImageUtils.getDataURL: Image converted to jpg for performance reasons",et),nt.toDataURL("image/jpeg",.6)):nt.toDataURL("image/png")}static sRGBToLinear(et){if(typeof HTMLImageElement<"u"&&et instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&et instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&et instanceof ImageBitmap){const nt=createElementNS("canvas");nt.width=et.width,nt.height=et.height;const rt=nt.getContext("2d");rt.drawImage(et,0,0,et.width,et.height);const it=rt.getImageData(0,0,et.width,et.height),ot=it.data;for(let at=0;at1)switch(this.wrapS){case RepeatWrapping:et.x=et.x-Math.floor(et.x);break;case ClampToEdgeWrapping:et.x=et.x<0?0:1;break;case MirroredRepeatWrapping:Math.abs(Math.floor(et.x)%2)===1?et.x=Math.ceil(et.x)-et.x:et.x=et.x-Math.floor(et.x);break}if(et.y<0||et.y>1)switch(this.wrapT){case RepeatWrapping:et.y=et.y-Math.floor(et.y);break;case ClampToEdgeWrapping:et.y=et.y<0?0:1;break;case MirroredRepeatWrapping:Math.abs(Math.floor(et.y)%2)===1?et.y=Math.ceil(et.y)-et.y:et.y=et.y-Math.floor(et.y);break}return this.flipY&&(et.y=1-et.y),et}set needsUpdate(et){et===!0&&(this.version++,this.source.needsUpdate=!0)}}Texture.DEFAULT_IMAGE=null;Texture.DEFAULT_MAPPING=UVMapping;class Vector4{constructor(et=0,nt=0,rt=0,it=1){Vector4.prototype.isVector4=!0,this.x=et,this.y=nt,this.z=rt,this.w=it}get width(){return this.z}set width(et){this.z=et}get height(){return this.w}set height(et){this.w=et}set(et,nt,rt,it){return this.x=et,this.y=nt,this.z=rt,this.w=it,this}setScalar(et){return this.x=et,this.y=et,this.z=et,this.w=et,this}setX(et){return this.x=et,this}setY(et){return this.y=et,this}setZ(et){return this.z=et,this}setW(et){return this.w=et,this}setComponent(et,nt){switch(et){case 0:this.x=nt;break;case 1:this.y=nt;break;case 2:this.z=nt;break;case 3:this.w=nt;break;default:throw new Error("index is out of range: "+et)}return this}getComponent(et){switch(et){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw new Error("index is out of range: "+et)}}clone(){return new this.constructor(this.x,this.y,this.z,this.w)}copy(et){return this.x=et.x,this.y=et.y,this.z=et.z,this.w=et.w!==void 0?et.w:1,this}add(et){return this.x+=et.x,this.y+=et.y,this.z+=et.z,this.w+=et.w,this}addScalar(et){return this.x+=et,this.y+=et,this.z+=et,this.w+=et,this}addVectors(et,nt){return this.x=et.x+nt.x,this.y=et.y+nt.y,this.z=et.z+nt.z,this.w=et.w+nt.w,this}addScaledVector(et,nt){return this.x+=et.x*nt,this.y+=et.y*nt,this.z+=et.z*nt,this.w+=et.w*nt,this}sub(et){return this.x-=et.x,this.y-=et.y,this.z-=et.z,this.w-=et.w,this}subScalar(et){return this.x-=et,this.y-=et,this.z-=et,this.w-=et,this}subVectors(et,nt){return this.x=et.x-nt.x,this.y=et.y-nt.y,this.z=et.z-nt.z,this.w=et.w-nt.w,this}multiply(et){return this.x*=et.x,this.y*=et.y,this.z*=et.z,this.w*=et.w,this}multiplyScalar(et){return this.x*=et,this.y*=et,this.z*=et,this.w*=et,this}applyMatrix4(et){const nt=this.x,rt=this.y,it=this.z,ot=this.w,at=et.elements;return this.x=at[0]*nt+at[4]*rt+at[8]*it+at[12]*ot,this.y=at[1]*nt+at[5]*rt+at[9]*it+at[13]*ot,this.z=at[2]*nt+at[6]*rt+at[10]*it+at[14]*ot,this.w=at[3]*nt+at[7]*rt+at[11]*it+at[15]*ot,this}divideScalar(et){return this.multiplyScalar(1/et)}setAxisAngleFromQuaternion(et){this.w=2*Math.acos(et.w);const nt=Math.sqrt(1-et.w*et.w);return nt<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=et.x/nt,this.y=et.y/nt,this.z=et.z/nt),this}setAxisAngleFromRotationMatrix(et){let nt,rt,it,ot;const lt=et.elements,ct=lt[0],ut=lt[4],ht=lt[8],dt=lt[1],pt=lt[5],mt=lt[9],gt=lt[2],yt=lt[6],bt=lt[10];if(Math.abs(ut-dt)<.01&&Math.abs(ht-gt)<.01&&Math.abs(mt-yt)<.01){if(Math.abs(ut+dt)<.1&&Math.abs(ht+gt)<.1&&Math.abs(mt+yt)<.1&&Math.abs(ct+pt+bt-3)<.1)return this.set(1,0,0,0),this;nt=Math.PI;const xt=(ct+1)/2,kt=(pt+1)/2,St=(bt+1)/2,Tt=(ut+dt)/4,At=(ht+gt)/4,Et=(mt+yt)/4;return xt>kt&&xt>St?xt<.01?(rt=0,it=.707106781,ot=.707106781):(rt=Math.sqrt(xt),it=Tt/rt,ot=At/rt):kt>St?kt<.01?(rt=.707106781,it=0,ot=.707106781):(it=Math.sqrt(kt),rt=Tt/it,ot=Et/it):St<.01?(rt=.707106781,it=.707106781,ot=0):(ot=Math.sqrt(St),rt=At/ot,it=Et/ot),this.set(rt,it,ot,nt),this}let vt=Math.sqrt((yt-mt)*(yt-mt)+(ht-gt)*(ht-gt)+(dt-ut)*(dt-ut));return Math.abs(vt)<.001&&(vt=1),this.x=(yt-mt)/vt,this.y=(ht-gt)/vt,this.z=(dt-ut)/vt,this.w=Math.acos((ct+pt+bt-1)/2),this}min(et){return this.x=Math.min(this.x,et.x),this.y=Math.min(this.y,et.y),this.z=Math.min(this.z,et.z),this.w=Math.min(this.w,et.w),this}max(et){return this.x=Math.max(this.x,et.x),this.y=Math.max(this.y,et.y),this.z=Math.max(this.z,et.z),this.w=Math.max(this.w,et.w),this}clamp(et,nt){return this.x=Math.max(et.x,Math.min(nt.x,this.x)),this.y=Math.max(et.y,Math.min(nt.y,this.y)),this.z=Math.max(et.z,Math.min(nt.z,this.z)),this.w=Math.max(et.w,Math.min(nt.w,this.w)),this}clampScalar(et,nt){return this.x=Math.max(et,Math.min(nt,this.x)),this.y=Math.max(et,Math.min(nt,this.y)),this.z=Math.max(et,Math.min(nt,this.z)),this.w=Math.max(et,Math.min(nt,this.w)),this}clampLength(et,nt){const rt=this.length();return this.divideScalar(rt||1).multiplyScalar(Math.max(et,Math.min(nt,rt)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this.w=Math.floor(this.w),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this.w=Math.ceil(this.w),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this.w=Math.round(this.w),this}roundToZero(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this.z=this.z<0?Math.ceil(this.z):Math.floor(this.z),this.w=this.w<0?Math.ceil(this.w):Math.floor(this.w),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this}dot(et){return this.x*et.x+this.y*et.y+this.z*et.z+this.w*et.w}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)}normalize(){return this.divideScalar(this.length()||1)}setLength(et){return this.normalize().multiplyScalar(et)}lerp(et,nt){return this.x+=(et.x-this.x)*nt,this.y+=(et.y-this.y)*nt,this.z+=(et.z-this.z)*nt,this.w+=(et.w-this.w)*nt,this}lerpVectors(et,nt,rt){return this.x=et.x+(nt.x-et.x)*rt,this.y=et.y+(nt.y-et.y)*rt,this.z=et.z+(nt.z-et.z)*rt,this.w=et.w+(nt.w-et.w)*rt,this}equals(et){return et.x===this.x&&et.y===this.y&&et.z===this.z&&et.w===this.w}fromArray(et,nt=0){return this.x=et[nt],this.y=et[nt+1],this.z=et[nt+2],this.w=et[nt+3],this}toArray(et=[],nt=0){return et[nt]=this.x,et[nt+1]=this.y,et[nt+2]=this.z,et[nt+3]=this.w,et}fromBufferAttribute(et,nt){return this.x=et.getX(nt),this.y=et.getY(nt),this.z=et.getZ(nt),this.w=et.getW(nt),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this.w=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z,yield this.w}}class WebGLRenderTarget extends EventDispatcher$1{constructor(et,nt,rt={}){super(),this.isWebGLRenderTarget=!0,this.width=et,this.height=nt,this.depth=1,this.scissor=new Vector4(0,0,et,nt),this.scissorTest=!1,this.viewport=new Vector4(0,0,et,nt);const it={width:et,height:nt,depth:1};this.texture=new Texture(it,rt.mapping,rt.wrapS,rt.wrapT,rt.magFilter,rt.minFilter,rt.format,rt.type,rt.anisotropy,rt.encoding),this.texture.isRenderTargetTexture=!0,this.texture.flipY=!1,this.texture.generateMipmaps=rt.generateMipmaps!==void 0?rt.generateMipmaps:!1,this.texture.internalFormat=rt.internalFormat!==void 0?rt.internalFormat:null,this.texture.minFilter=rt.minFilter!==void 0?rt.minFilter:LinearFilter,this.depthBuffer=rt.depthBuffer!==void 0?rt.depthBuffer:!0,this.stencilBuffer=rt.stencilBuffer!==void 0?rt.stencilBuffer:!1,this.depthTexture=rt.depthTexture!==void 0?rt.depthTexture:null,this.samples=rt.samples!==void 0?rt.samples:0}setSize(et,nt,rt=1){(this.width!==et||this.height!==nt||this.depth!==rt)&&(this.width=et,this.height=nt,this.depth=rt,this.texture.image.width=et,this.texture.image.height=nt,this.texture.image.depth=rt,this.dispose()),this.viewport.set(0,0,et,nt),this.scissor.set(0,0,et,nt)}clone(){return new this.constructor().copy(this)}copy(et){this.width=et.width,this.height=et.height,this.depth=et.depth,this.viewport.copy(et.viewport),this.texture=et.texture.clone(),this.texture.isRenderTargetTexture=!0;const nt=Object.assign({},et.texture.image);return this.texture.source=new Source$1(nt),this.depthBuffer=et.depthBuffer,this.stencilBuffer=et.stencilBuffer,et.depthTexture!==null&&(this.depthTexture=et.depthTexture.clone()),this.samples=et.samples,this}dispose(){this.dispatchEvent({type:"dispose"})}}class DataArrayTexture extends Texture{constructor(et=null,nt=1,rt=1,it=1){super(null),this.isDataArrayTexture=!0,this.image={data:et,width:nt,height:rt,depth:it},this.magFilter=NearestFilter,this.minFilter=NearestFilter,this.wrapR=ClampToEdgeWrapping,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}class WebGLArrayRenderTarget extends WebGLRenderTarget{constructor(et,nt,rt){super(et,nt),this.isWebGLArrayRenderTarget=!0,this.depth=rt,this.texture=new DataArrayTexture(null,et,nt,rt),this.texture.isRenderTargetTexture=!0}}class Data3DTexture extends Texture{constructor(et=null,nt=1,rt=1,it=1){super(null),this.isData3DTexture=!0,this.image={data:et,width:nt,height:rt,depth:it},this.magFilter=NearestFilter,this.minFilter=NearestFilter,this.wrapR=ClampToEdgeWrapping,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}class WebGL3DRenderTarget extends WebGLRenderTarget{constructor(et,nt,rt){super(et,nt),this.isWebGL3DRenderTarget=!0,this.depth=rt,this.texture=new Data3DTexture(null,et,nt,rt),this.texture.isRenderTargetTexture=!0}}class WebGLMultipleRenderTargets extends WebGLRenderTarget{constructor(et,nt,rt,it={}){super(et,nt,it),this.isWebGLMultipleRenderTargets=!0;const ot=this.texture;this.texture=[];for(let at=0;at=0?1:-1,xt=1-bt*bt;if(xt>Number.EPSILON){const St=Math.sqrt(xt),Tt=Math.atan2(St,bt*vt);yt=Math.sin(yt*Tt)/St,st=Math.sin(st*Tt)/St}const kt=st*vt;if(lt=lt*yt+dt*kt,ct=ct*yt+pt*kt,ut=ut*yt+mt*kt,ht=ht*yt+gt*kt,yt===1-st){const St=1/Math.sqrt(lt*lt+ct*ct+ut*ut+ht*ht);lt*=St,ct*=St,ut*=St,ht*=St}}et[nt]=lt,et[nt+1]=ct,et[nt+2]=ut,et[nt+3]=ht}static multiplyQuaternionsFlat(et,nt,rt,it,ot,at){const st=rt[it],lt=rt[it+1],ct=rt[it+2],ut=rt[it+3],ht=ot[at],dt=ot[at+1],pt=ot[at+2],mt=ot[at+3];return et[nt]=st*mt+ut*ht+lt*pt-ct*dt,et[nt+1]=lt*mt+ut*dt+ct*ht-st*pt,et[nt+2]=ct*mt+ut*pt+st*dt-lt*ht,et[nt+3]=ut*mt-st*ht-lt*dt-ct*pt,et}get x(){return this._x}set x(et){this._x=et,this._onChangeCallback()}get y(){return this._y}set y(et){this._y=et,this._onChangeCallback()}get z(){return this._z}set z(et){this._z=et,this._onChangeCallback()}get w(){return this._w}set w(et){this._w=et,this._onChangeCallback()}set(et,nt,rt,it){return this._x=et,this._y=nt,this._z=rt,this._w=it,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(et){return this._x=et.x,this._y=et.y,this._z=et.z,this._w=et.w,this._onChangeCallback(),this}setFromEuler(et,nt){if(!(et&&et.isEuler))throw new Error("THREE.Quaternion: .setFromEuler() now expects an Euler rotation rather than a Vector3 and order.");const rt=et._x,it=et._y,ot=et._z,at=et._order,st=Math.cos,lt=Math.sin,ct=st(rt/2),ut=st(it/2),ht=st(ot/2),dt=lt(rt/2),pt=lt(it/2),mt=lt(ot/2);switch(at){case"XYZ":this._x=dt*ut*ht+ct*pt*mt,this._y=ct*pt*ht-dt*ut*mt,this._z=ct*ut*mt+dt*pt*ht,this._w=ct*ut*ht-dt*pt*mt;break;case"YXZ":this._x=dt*ut*ht+ct*pt*mt,this._y=ct*pt*ht-dt*ut*mt,this._z=ct*ut*mt-dt*pt*ht,this._w=ct*ut*ht+dt*pt*mt;break;case"ZXY":this._x=dt*ut*ht-ct*pt*mt,this._y=ct*pt*ht+dt*ut*mt,this._z=ct*ut*mt+dt*pt*ht,this._w=ct*ut*ht-dt*pt*mt;break;case"ZYX":this._x=dt*ut*ht-ct*pt*mt,this._y=ct*pt*ht+dt*ut*mt,this._z=ct*ut*mt-dt*pt*ht,this._w=ct*ut*ht+dt*pt*mt;break;case"YZX":this._x=dt*ut*ht+ct*pt*mt,this._y=ct*pt*ht+dt*ut*mt,this._z=ct*ut*mt-dt*pt*ht,this._w=ct*ut*ht-dt*pt*mt;break;case"XZY":this._x=dt*ut*ht-ct*pt*mt,this._y=ct*pt*ht-dt*ut*mt,this._z=ct*ut*mt+dt*pt*ht,this._w=ct*ut*ht+dt*pt*mt;break;default:console.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: "+at)}return nt!==!1&&this._onChangeCallback(),this}setFromAxisAngle(et,nt){const rt=nt/2,it=Math.sin(rt);return this._x=et.x*it,this._y=et.y*it,this._z=et.z*it,this._w=Math.cos(rt),this._onChangeCallback(),this}setFromRotationMatrix(et){const nt=et.elements,rt=nt[0],it=nt[4],ot=nt[8],at=nt[1],st=nt[5],lt=nt[9],ct=nt[2],ut=nt[6],ht=nt[10],dt=rt+st+ht;if(dt>0){const pt=.5/Math.sqrt(dt+1);this._w=.25/pt,this._x=(ut-lt)*pt,this._y=(ot-ct)*pt,this._z=(at-it)*pt}else if(rt>st&&rt>ht){const pt=2*Math.sqrt(1+rt-st-ht);this._w=(ut-lt)/pt,this._x=.25*pt,this._y=(it+at)/pt,this._z=(ot+ct)/pt}else if(st>ht){const pt=2*Math.sqrt(1+st-rt-ht);this._w=(ot-ct)/pt,this._x=(it+at)/pt,this._y=.25*pt,this._z=(lt+ut)/pt}else{const pt=2*Math.sqrt(1+ht-rt-st);this._w=(at-it)/pt,this._x=(ot+ct)/pt,this._y=(lt+ut)/pt,this._z=.25*pt}return this._onChangeCallback(),this}setFromUnitVectors(et,nt){let rt=et.dot(nt)+1;return rtMath.abs(et.z)?(this._x=-et.y,this._y=et.x,this._z=0,this._w=rt):(this._x=0,this._y=-et.z,this._z=et.y,this._w=rt)):(this._x=et.y*nt.z-et.z*nt.y,this._y=et.z*nt.x-et.x*nt.z,this._z=et.x*nt.y-et.y*nt.x,this._w=rt),this.normalize()}angleTo(et){return 2*Math.acos(Math.abs(clamp$5(this.dot(et),-1,1)))}rotateTowards(et,nt){const rt=this.angleTo(et);if(rt===0)return this;const it=Math.min(1,nt/rt);return this.slerp(et,it),this}identity(){return this.set(0,0,0,1)}invert(){return this.conjugate()}conjugate(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this}dot(et){return this._x*et._x+this._y*et._y+this._z*et._z+this._w*et._w}lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}normalize(){let et=this.length();return et===0?(this._x=0,this._y=0,this._z=0,this._w=1):(et=1/et,this._x=this._x*et,this._y=this._y*et,this._z=this._z*et,this._w=this._w*et),this._onChangeCallback(),this}multiply(et){return this.multiplyQuaternions(this,et)}premultiply(et){return this.multiplyQuaternions(et,this)}multiplyQuaternions(et,nt){const rt=et._x,it=et._y,ot=et._z,at=et._w,st=nt._x,lt=nt._y,ct=nt._z,ut=nt._w;return this._x=rt*ut+at*st+it*ct-ot*lt,this._y=it*ut+at*lt+ot*st-rt*ct,this._z=ot*ut+at*ct+rt*lt-it*st,this._w=at*ut-rt*st-it*lt-ot*ct,this._onChangeCallback(),this}slerp(et,nt){if(nt===0)return this;if(nt===1)return this.copy(et);const rt=this._x,it=this._y,ot=this._z,at=this._w;let st=at*et._w+rt*et._x+it*et._y+ot*et._z;if(st<0?(this._w=-et._w,this._x=-et._x,this._y=-et._y,this._z=-et._z,st=-st):this.copy(et),st>=1)return this._w=at,this._x=rt,this._y=it,this._z=ot,this;const lt=1-st*st;if(lt<=Number.EPSILON){const pt=1-nt;return this._w=pt*at+nt*this._w,this._x=pt*rt+nt*this._x,this._y=pt*it+nt*this._y,this._z=pt*ot+nt*this._z,this.normalize(),this._onChangeCallback(),this}const ct=Math.sqrt(lt),ut=Math.atan2(ct,st),ht=Math.sin((1-nt)*ut)/ct,dt=Math.sin(nt*ut)/ct;return this._w=at*ht+this._w*dt,this._x=rt*ht+this._x*dt,this._y=it*ht+this._y*dt,this._z=ot*ht+this._z*dt,this._onChangeCallback(),this}slerpQuaternions(et,nt,rt){return this.copy(et).slerp(nt,rt)}random(){const et=Math.random(),nt=Math.sqrt(1-et),rt=Math.sqrt(et),it=2*Math.PI*Math.random(),ot=2*Math.PI*Math.random();return this.set(nt*Math.cos(it),rt*Math.sin(ot),rt*Math.cos(ot),nt*Math.sin(it))}equals(et){return et._x===this._x&&et._y===this._y&&et._z===this._z&&et._w===this._w}fromArray(et,nt=0){return this._x=et[nt],this._y=et[nt+1],this._z=et[nt+2],this._w=et[nt+3],this._onChangeCallback(),this}toArray(et=[],nt=0){return et[nt]=this._x,et[nt+1]=this._y,et[nt+2]=this._z,et[nt+3]=this._w,et}fromBufferAttribute(et,nt){return this._x=et.getX(nt),this._y=et.getY(nt),this._z=et.getZ(nt),this._w=et.getW(nt),this}_onChange(et){return this._onChangeCallback=et,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._w}}class Vector3{constructor(et=0,nt=0,rt=0){Vector3.prototype.isVector3=!0,this.x=et,this.y=nt,this.z=rt}set(et,nt,rt){return rt===void 0&&(rt=this.z),this.x=et,this.y=nt,this.z=rt,this}setScalar(et){return this.x=et,this.y=et,this.z=et,this}setX(et){return this.x=et,this}setY(et){return this.y=et,this}setZ(et){return this.z=et,this}setComponent(et,nt){switch(et){case 0:this.x=nt;break;case 1:this.y=nt;break;case 2:this.z=nt;break;default:throw new Error("index is out of range: "+et)}return this}getComponent(et){switch(et){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+et)}}clone(){return new this.constructor(this.x,this.y,this.z)}copy(et){return this.x=et.x,this.y=et.y,this.z=et.z,this}add(et){return this.x+=et.x,this.y+=et.y,this.z+=et.z,this}addScalar(et){return this.x+=et,this.y+=et,this.z+=et,this}addVectors(et,nt){return this.x=et.x+nt.x,this.y=et.y+nt.y,this.z=et.z+nt.z,this}addScaledVector(et,nt){return this.x+=et.x*nt,this.y+=et.y*nt,this.z+=et.z*nt,this}sub(et){return this.x-=et.x,this.y-=et.y,this.z-=et.z,this}subScalar(et){return this.x-=et,this.y-=et,this.z-=et,this}subVectors(et,nt){return this.x=et.x-nt.x,this.y=et.y-nt.y,this.z=et.z-nt.z,this}multiply(et){return this.x*=et.x,this.y*=et.y,this.z*=et.z,this}multiplyScalar(et){return this.x*=et,this.y*=et,this.z*=et,this}multiplyVectors(et,nt){return this.x=et.x*nt.x,this.y=et.y*nt.y,this.z=et.z*nt.z,this}applyEuler(et){return this.applyQuaternion(_quaternion$4.setFromEuler(et))}applyAxisAngle(et,nt){return this.applyQuaternion(_quaternion$4.setFromAxisAngle(et,nt))}applyMatrix3(et){const nt=this.x,rt=this.y,it=this.z,ot=et.elements;return this.x=ot[0]*nt+ot[3]*rt+ot[6]*it,this.y=ot[1]*nt+ot[4]*rt+ot[7]*it,this.z=ot[2]*nt+ot[5]*rt+ot[8]*it,this}applyNormalMatrix(et){return this.applyMatrix3(et).normalize()}applyMatrix4(et){const nt=this.x,rt=this.y,it=this.z,ot=et.elements,at=1/(ot[3]*nt+ot[7]*rt+ot[11]*it+ot[15]);return this.x=(ot[0]*nt+ot[4]*rt+ot[8]*it+ot[12])*at,this.y=(ot[1]*nt+ot[5]*rt+ot[9]*it+ot[13])*at,this.z=(ot[2]*nt+ot[6]*rt+ot[10]*it+ot[14])*at,this}applyQuaternion(et){const nt=this.x,rt=this.y,it=this.z,ot=et.x,at=et.y,st=et.z,lt=et.w,ct=lt*nt+at*it-st*rt,ut=lt*rt+st*nt-ot*it,ht=lt*it+ot*rt-at*nt,dt=-ot*nt-at*rt-st*it;return this.x=ct*lt+dt*-ot+ut*-st-ht*-at,this.y=ut*lt+dt*-at+ht*-ot-ct*-st,this.z=ht*lt+dt*-st+ct*-at-ut*-ot,this}project(et){return this.applyMatrix4(et.matrixWorldInverse).applyMatrix4(et.projectionMatrix)}unproject(et){return this.applyMatrix4(et.projectionMatrixInverse).applyMatrix4(et.matrixWorld)}transformDirection(et){const nt=this.x,rt=this.y,it=this.z,ot=et.elements;return this.x=ot[0]*nt+ot[4]*rt+ot[8]*it,this.y=ot[1]*nt+ot[5]*rt+ot[9]*it,this.z=ot[2]*nt+ot[6]*rt+ot[10]*it,this.normalize()}divide(et){return this.x/=et.x,this.y/=et.y,this.z/=et.z,this}divideScalar(et){return this.multiplyScalar(1/et)}min(et){return this.x=Math.min(this.x,et.x),this.y=Math.min(this.y,et.y),this.z=Math.min(this.z,et.z),this}max(et){return this.x=Math.max(this.x,et.x),this.y=Math.max(this.y,et.y),this.z=Math.max(this.z,et.z),this}clamp(et,nt){return this.x=Math.max(et.x,Math.min(nt.x,this.x)),this.y=Math.max(et.y,Math.min(nt.y,this.y)),this.z=Math.max(et.z,Math.min(nt.z,this.z)),this}clampScalar(et,nt){return this.x=Math.max(et,Math.min(nt,this.x)),this.y=Math.max(et,Math.min(nt,this.y)),this.z=Math.max(et,Math.min(nt,this.z)),this}clampLength(et,nt){const rt=this.length();return this.divideScalar(rt||1).multiplyScalar(Math.max(et,Math.min(nt,rt)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this.z=this.z<0?Math.ceil(this.z):Math.floor(this.z),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(et){return this.x*et.x+this.y*et.y+this.z*et.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(et){return this.normalize().multiplyScalar(et)}lerp(et,nt){return this.x+=(et.x-this.x)*nt,this.y+=(et.y-this.y)*nt,this.z+=(et.z-this.z)*nt,this}lerpVectors(et,nt,rt){return this.x=et.x+(nt.x-et.x)*rt,this.y=et.y+(nt.y-et.y)*rt,this.z=et.z+(nt.z-et.z)*rt,this}cross(et){return this.crossVectors(this,et)}crossVectors(et,nt){const rt=et.x,it=et.y,ot=et.z,at=nt.x,st=nt.y,lt=nt.z;return this.x=it*lt-ot*st,this.y=ot*at-rt*lt,this.z=rt*st-it*at,this}projectOnVector(et){const nt=et.lengthSq();if(nt===0)return this.set(0,0,0);const rt=et.dot(this)/nt;return this.copy(et).multiplyScalar(rt)}projectOnPlane(et){return _vector$c.copy(this).projectOnVector(et),this.sub(_vector$c)}reflect(et){return this.sub(_vector$c.copy(et).multiplyScalar(2*this.dot(et)))}angleTo(et){const nt=Math.sqrt(this.lengthSq()*et.lengthSq());if(nt===0)return Math.PI/2;const rt=this.dot(et)/nt;return Math.acos(clamp$5(rt,-1,1))}distanceTo(et){return Math.sqrt(this.distanceToSquared(et))}distanceToSquared(et){const nt=this.x-et.x,rt=this.y-et.y,it=this.z-et.z;return nt*nt+rt*rt+it*it}manhattanDistanceTo(et){return Math.abs(this.x-et.x)+Math.abs(this.y-et.y)+Math.abs(this.z-et.z)}setFromSpherical(et){return this.setFromSphericalCoords(et.radius,et.phi,et.theta)}setFromSphericalCoords(et,nt,rt){const it=Math.sin(nt)*et;return this.x=it*Math.sin(rt),this.y=Math.cos(nt)*et,this.z=it*Math.cos(rt),this}setFromCylindrical(et){return this.setFromCylindricalCoords(et.radius,et.theta,et.y)}setFromCylindricalCoords(et,nt,rt){return this.x=et*Math.sin(nt),this.y=rt,this.z=et*Math.cos(nt),this}setFromMatrixPosition(et){const nt=et.elements;return this.x=nt[12],this.y=nt[13],this.z=nt[14],this}setFromMatrixScale(et){const nt=this.setFromMatrixColumn(et,0).length(),rt=this.setFromMatrixColumn(et,1).length(),it=this.setFromMatrixColumn(et,2).length();return this.x=nt,this.y=rt,this.z=it,this}setFromMatrixColumn(et,nt){return this.fromArray(et.elements,nt*4)}setFromMatrix3Column(et,nt){return this.fromArray(et.elements,nt*3)}setFromEuler(et){return this.x=et._x,this.y=et._y,this.z=et._z,this}equals(et){return et.x===this.x&&et.y===this.y&&et.z===this.z}fromArray(et,nt=0){return this.x=et[nt],this.y=et[nt+1],this.z=et[nt+2],this}toArray(et=[],nt=0){return et[nt]=this.x,et[nt+1]=this.y,et[nt+2]=this.z,et}fromBufferAttribute(et,nt){return this.x=et.getX(nt),this.y=et.getY(nt),this.z=et.getZ(nt),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){const et=(Math.random()-.5)*2,nt=Math.random()*Math.PI*2,rt=Math.sqrt(1-et**2);return this.x=rt*Math.cos(nt),this.y=rt*Math.sin(nt),this.z=et,this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}}const _vector$c=new Vector3,_quaternion$4=new Quaternion;class Box3{constructor(et=new Vector3(1/0,1/0,1/0),nt=new Vector3(-1/0,-1/0,-1/0)){this.isBox3=!0,this.min=et,this.max=nt}set(et,nt){return this.min.copy(et),this.max.copy(nt),this}setFromArray(et){let nt=1/0,rt=1/0,it=1/0,ot=-1/0,at=-1/0,st=-1/0;for(let lt=0,ct=et.length;ltot&&(ot=ut),ht>at&&(at=ht),dt>st&&(st=dt)}return this.min.set(nt,rt,it),this.max.set(ot,at,st),this}setFromBufferAttribute(et){let nt=1/0,rt=1/0,it=1/0,ot=-1/0,at=-1/0,st=-1/0;for(let lt=0,ct=et.count;ltot&&(ot=ut),ht>at&&(at=ht),dt>st&&(st=dt)}return this.min.set(nt,rt,it),this.max.set(ot,at,st),this}setFromPoints(et){this.makeEmpty();for(let nt=0,rt=et.length;ntthis.max.x||et.ythis.max.y||et.zthis.max.z)}containsBox(et){return this.min.x<=et.min.x&&et.max.x<=this.max.x&&this.min.y<=et.min.y&&et.max.y<=this.max.y&&this.min.z<=et.min.z&&et.max.z<=this.max.z}getParameter(et,nt){return nt.set((et.x-this.min.x)/(this.max.x-this.min.x),(et.y-this.min.y)/(this.max.y-this.min.y),(et.z-this.min.z)/(this.max.z-this.min.z))}intersectsBox(et){return!(et.max.xthis.max.x||et.max.ythis.max.y||et.max.zthis.max.z)}intersectsSphere(et){return this.clampPoint(et.center,_vector$b),_vector$b.distanceToSquared(et.center)<=et.radius*et.radius}intersectsPlane(et){let nt,rt;return et.normal.x>0?(nt=et.normal.x*this.min.x,rt=et.normal.x*this.max.x):(nt=et.normal.x*this.max.x,rt=et.normal.x*this.min.x),et.normal.y>0?(nt+=et.normal.y*this.min.y,rt+=et.normal.y*this.max.y):(nt+=et.normal.y*this.max.y,rt+=et.normal.y*this.min.y),et.normal.z>0?(nt+=et.normal.z*this.min.z,rt+=et.normal.z*this.max.z):(nt+=et.normal.z*this.max.z,rt+=et.normal.z*this.min.z),nt<=-et.constant&&rt>=-et.constant}intersectsTriangle(et){if(this.isEmpty())return!1;this.getCenter(_center),_extents.subVectors(this.max,_center),_v0$2.subVectors(et.a,_center),_v1$7.subVectors(et.b,_center),_v2$3.subVectors(et.c,_center),_f0.subVectors(_v1$7,_v0$2),_f1.subVectors(_v2$3,_v1$7),_f2.subVectors(_v0$2,_v2$3);let nt=[0,-_f0.z,_f0.y,0,-_f1.z,_f1.y,0,-_f2.z,_f2.y,_f0.z,0,-_f0.x,_f1.z,0,-_f1.x,_f2.z,0,-_f2.x,-_f0.y,_f0.x,0,-_f1.y,_f1.x,0,-_f2.y,_f2.x,0];return!satForAxes(nt,_v0$2,_v1$7,_v2$3,_extents)||(nt=[1,0,0,0,1,0,0,0,1],!satForAxes(nt,_v0$2,_v1$7,_v2$3,_extents))?!1:(_triangleNormal.crossVectors(_f0,_f1),nt=[_triangleNormal.x,_triangleNormal.y,_triangleNormal.z],satForAxes(nt,_v0$2,_v1$7,_v2$3,_extents))}clampPoint(et,nt){return nt.copy(et).clamp(this.min,this.max)}distanceToPoint(et){return _vector$b.copy(et).clamp(this.min,this.max).sub(et).length()}getBoundingSphere(et){return this.getCenter(et.center),et.radius=this.getSize(_vector$b).length()*.5,et}intersect(et){return this.min.max(et.min),this.max.min(et.max),this.isEmpty()&&this.makeEmpty(),this}union(et){return this.min.min(et.min),this.max.max(et.max),this}applyMatrix4(et){return this.isEmpty()?this:(_points[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(et),_points[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(et),_points[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(et),_points[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(et),_points[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(et),_points[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(et),_points[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(et),_points[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(et),this.setFromPoints(_points),this)}translate(et){return this.min.add(et),this.max.add(et),this}equals(et){return et.min.equals(this.min)&&et.max.equals(this.max)}}const _points=[new Vector3,new Vector3,new Vector3,new Vector3,new Vector3,new Vector3,new Vector3,new Vector3],_vector$b=new Vector3,_box$3=new Box3,_v0$2=new Vector3,_v1$7=new Vector3,_v2$3=new Vector3,_f0=new Vector3,_f1=new Vector3,_f2=new Vector3,_center=new Vector3,_extents=new Vector3,_triangleNormal=new Vector3,_testAxis=new Vector3;function satForAxes(tt,et,nt,rt,it){for(let ot=0,at=tt.length-3;ot<=at;ot+=3){_testAxis.fromArray(tt,ot);const st=it.x*Math.abs(_testAxis.x)+it.y*Math.abs(_testAxis.y)+it.z*Math.abs(_testAxis.z),lt=et.dot(_testAxis),ct=nt.dot(_testAxis),ut=rt.dot(_testAxis);if(Math.max(-Math.max(lt,ct,ut),Math.min(lt,ct,ut))>st)return!1}return!0}const _box$2=new Box3,_v1$6=new Vector3,_toFarthestPoint=new Vector3,_toPoint=new Vector3;class Sphere{constructor(et=new Vector3,nt=-1){this.center=et,this.radius=nt}set(et,nt){return this.center.copy(et),this.radius=nt,this}setFromPoints(et,nt){const rt=this.center;nt!==void 0?rt.copy(nt):_box$2.setFromPoints(et).getCenter(rt);let it=0;for(let ot=0,at=et.length;otthis.radius*this.radius&&(nt.sub(this.center).normalize(),nt.multiplyScalar(this.radius).add(this.center)),nt}getBoundingBox(et){return this.isEmpty()?(et.makeEmpty(),et):(et.set(this.center,this.center),et.expandByScalar(this.radius),et)}applyMatrix4(et){return this.center.applyMatrix4(et),this.radius=this.radius*et.getMaxScaleOnAxis(),this}translate(et){return this.center.add(et),this}expandByPoint(et){_toPoint.subVectors(et,this.center);const nt=_toPoint.lengthSq();if(nt>this.radius*this.radius){const rt=Math.sqrt(nt),it=(rt-this.radius)*.5;this.center.add(_toPoint.multiplyScalar(it/rt)),this.radius+=it}return this}union(et){return this.center.equals(et.center)===!0?_toFarthestPoint.set(0,0,1).multiplyScalar(et.radius):_toFarthestPoint.subVectors(et.center,this.center).normalize().multiplyScalar(et.radius),this.expandByPoint(_v1$6.copy(et.center).add(_toFarthestPoint)),this.expandByPoint(_v1$6.copy(et.center).sub(_toFarthestPoint)),this}equals(et){return et.center.equals(this.center)&&et.radius===this.radius}clone(){return new this.constructor().copy(this)}}const _vector$a=new Vector3,_segCenter=new Vector3,_segDir=new Vector3,_diff=new Vector3,_edge1=new Vector3,_edge2=new Vector3,_normal$1=new Vector3;class Ray{constructor(et=new Vector3,nt=new Vector3(0,0,-1)){this.origin=et,this.direction=nt}set(et,nt){return this.origin.copy(et),this.direction.copy(nt),this}copy(et){return this.origin.copy(et.origin),this.direction.copy(et.direction),this}at(et,nt){return nt.copy(this.direction).multiplyScalar(et).add(this.origin)}lookAt(et){return this.direction.copy(et).sub(this.origin).normalize(),this}recast(et){return this.origin.copy(this.at(et,_vector$a)),this}closestPointToPoint(et,nt){nt.subVectors(et,this.origin);const rt=nt.dot(this.direction);return rt<0?nt.copy(this.origin):nt.copy(this.direction).multiplyScalar(rt).add(this.origin)}distanceToPoint(et){return Math.sqrt(this.distanceSqToPoint(et))}distanceSqToPoint(et){const nt=_vector$a.subVectors(et,this.origin).dot(this.direction);return nt<0?this.origin.distanceToSquared(et):(_vector$a.copy(this.direction).multiplyScalar(nt).add(this.origin),_vector$a.distanceToSquared(et))}distanceSqToSegment(et,nt,rt,it){_segCenter.copy(et).add(nt).multiplyScalar(.5),_segDir.copy(nt).sub(et).normalize(),_diff.copy(this.origin).sub(_segCenter);const ot=et.distanceTo(nt)*.5,at=-this.direction.dot(_segDir),st=_diff.dot(this.direction),lt=-_diff.dot(_segDir),ct=_diff.lengthSq(),ut=Math.abs(1-at*at);let ht,dt,pt,mt;if(ut>0)if(ht=at*lt-st,dt=at*st-lt,mt=ot*ut,ht>=0)if(dt>=-mt)if(dt<=mt){const gt=1/ut;ht*=gt,dt*=gt,pt=ht*(ht+at*dt+2*st)+dt*(at*ht+dt+2*lt)+ct}else dt=ot,ht=Math.max(0,-(at*dt+st)),pt=-ht*ht+dt*(dt+2*lt)+ct;else dt=-ot,ht=Math.max(0,-(at*dt+st)),pt=-ht*ht+dt*(dt+2*lt)+ct;else dt<=-mt?(ht=Math.max(0,-(-at*ot+st)),dt=ht>0?-ot:Math.min(Math.max(-ot,-lt),ot),pt=-ht*ht+dt*(dt+2*lt)+ct):dt<=mt?(ht=0,dt=Math.min(Math.max(-ot,-lt),ot),pt=dt*(dt+2*lt)+ct):(ht=Math.max(0,-(at*ot+st)),dt=ht>0?ot:Math.min(Math.max(-ot,-lt),ot),pt=-ht*ht+dt*(dt+2*lt)+ct);else dt=at>0?-ot:ot,ht=Math.max(0,-(at*dt+st)),pt=-ht*ht+dt*(dt+2*lt)+ct;return rt&&rt.copy(this.direction).multiplyScalar(ht).add(this.origin),it&&it.copy(_segDir).multiplyScalar(dt).add(_segCenter),pt}intersectSphere(et,nt){_vector$a.subVectors(et.center,this.origin);const rt=_vector$a.dot(this.direction),it=_vector$a.dot(_vector$a)-rt*rt,ot=et.radius*et.radius;if(it>ot)return null;const at=Math.sqrt(ot-it),st=rt-at,lt=rt+at;return st<0&<<0?null:st<0?this.at(lt,nt):this.at(st,nt)}intersectsSphere(et){return this.distanceSqToPoint(et.center)<=et.radius*et.radius}distanceToPlane(et){const nt=et.normal.dot(this.direction);if(nt===0)return et.distanceToPoint(this.origin)===0?0:null;const rt=-(this.origin.dot(et.normal)+et.constant)/nt;return rt>=0?rt:null}intersectPlane(et,nt){const rt=this.distanceToPlane(et);return rt===null?null:this.at(rt,nt)}intersectsPlane(et){const nt=et.distanceToPoint(this.origin);return nt===0||et.normal.dot(this.direction)*nt<0}intersectBox(et,nt){let rt,it,ot,at,st,lt;const ct=1/this.direction.x,ut=1/this.direction.y,ht=1/this.direction.z,dt=this.origin;return ct>=0?(rt=(et.min.x-dt.x)*ct,it=(et.max.x-dt.x)*ct):(rt=(et.max.x-dt.x)*ct,it=(et.min.x-dt.x)*ct),ut>=0?(ot=(et.min.y-dt.y)*ut,at=(et.max.y-dt.y)*ut):(ot=(et.max.y-dt.y)*ut,at=(et.min.y-dt.y)*ut),rt>at||ot>it||((ot>rt||rt!==rt)&&(rt=ot),(at=0?(st=(et.min.z-dt.z)*ht,lt=(et.max.z-dt.z)*ht):(st=(et.max.z-dt.z)*ht,lt=(et.min.z-dt.z)*ht),rt>lt||st>it)||((st>rt||rt!==rt)&&(rt=st),(lt=0?rt:it,nt)}intersectsBox(et){return this.intersectBox(et,_vector$a)!==null}intersectTriangle(et,nt,rt,it,ot){_edge1.subVectors(nt,et),_edge2.subVectors(rt,et),_normal$1.crossVectors(_edge1,_edge2);let at=this.direction.dot(_normal$1),st;if(at>0){if(it)return null;st=1}else if(at<0)st=-1,at=-at;else return null;_diff.subVectors(this.origin,et);const lt=st*this.direction.dot(_edge2.crossVectors(_diff,_edge2));if(lt<0)return null;const ct=st*this.direction.dot(_edge1.cross(_diff));if(ct<0||lt+ct>at)return null;const ut=-st*_diff.dot(_normal$1);return ut<0?null:this.at(ut/at,ot)}applyMatrix4(et){return this.origin.applyMatrix4(et),this.direction.transformDirection(et),this}equals(et){return et.origin.equals(this.origin)&&et.direction.equals(this.direction)}clone(){return new this.constructor().copy(this)}}class Matrix4{constructor(){Matrix4.prototype.isMatrix4=!0,this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}set(et,nt,rt,it,ot,at,st,lt,ct,ut,ht,dt,pt,mt,gt,yt){const bt=this.elements;return bt[0]=et,bt[4]=nt,bt[8]=rt,bt[12]=it,bt[1]=ot,bt[5]=at,bt[9]=st,bt[13]=lt,bt[2]=ct,bt[6]=ut,bt[10]=ht,bt[14]=dt,bt[3]=pt,bt[7]=mt,bt[11]=gt,bt[15]=yt,this}identity(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this}clone(){return new Matrix4().fromArray(this.elements)}copy(et){const nt=this.elements,rt=et.elements;return nt[0]=rt[0],nt[1]=rt[1],nt[2]=rt[2],nt[3]=rt[3],nt[4]=rt[4],nt[5]=rt[5],nt[6]=rt[6],nt[7]=rt[7],nt[8]=rt[8],nt[9]=rt[9],nt[10]=rt[10],nt[11]=rt[11],nt[12]=rt[12],nt[13]=rt[13],nt[14]=rt[14],nt[15]=rt[15],this}copyPosition(et){const nt=this.elements,rt=et.elements;return nt[12]=rt[12],nt[13]=rt[13],nt[14]=rt[14],this}setFromMatrix3(et){const nt=et.elements;return this.set(nt[0],nt[3],nt[6],0,nt[1],nt[4],nt[7],0,nt[2],nt[5],nt[8],0,0,0,0,1),this}extractBasis(et,nt,rt){return et.setFromMatrixColumn(this,0),nt.setFromMatrixColumn(this,1),rt.setFromMatrixColumn(this,2),this}makeBasis(et,nt,rt){return this.set(et.x,nt.x,rt.x,0,et.y,nt.y,rt.y,0,et.z,nt.z,rt.z,0,0,0,0,1),this}extractRotation(et){const nt=this.elements,rt=et.elements,it=1/_v1$5.setFromMatrixColumn(et,0).length(),ot=1/_v1$5.setFromMatrixColumn(et,1).length(),at=1/_v1$5.setFromMatrixColumn(et,2).length();return nt[0]=rt[0]*it,nt[1]=rt[1]*it,nt[2]=rt[2]*it,nt[3]=0,nt[4]=rt[4]*ot,nt[5]=rt[5]*ot,nt[6]=rt[6]*ot,nt[7]=0,nt[8]=rt[8]*at,nt[9]=rt[9]*at,nt[10]=rt[10]*at,nt[11]=0,nt[12]=0,nt[13]=0,nt[14]=0,nt[15]=1,this}makeRotationFromEuler(et){const nt=this.elements,rt=et.x,it=et.y,ot=et.z,at=Math.cos(rt),st=Math.sin(rt),lt=Math.cos(it),ct=Math.sin(it),ut=Math.cos(ot),ht=Math.sin(ot);if(et.order==="XYZ"){const dt=at*ut,pt=at*ht,mt=st*ut,gt=st*ht;nt[0]=lt*ut,nt[4]=-lt*ht,nt[8]=ct,nt[1]=pt+mt*ct,nt[5]=dt-gt*ct,nt[9]=-st*lt,nt[2]=gt-dt*ct,nt[6]=mt+pt*ct,nt[10]=at*lt}else if(et.order==="YXZ"){const dt=lt*ut,pt=lt*ht,mt=ct*ut,gt=ct*ht;nt[0]=dt+gt*st,nt[4]=mt*st-pt,nt[8]=at*ct,nt[1]=at*ht,nt[5]=at*ut,nt[9]=-st,nt[2]=pt*st-mt,nt[6]=gt+dt*st,nt[10]=at*lt}else if(et.order==="ZXY"){const dt=lt*ut,pt=lt*ht,mt=ct*ut,gt=ct*ht;nt[0]=dt-gt*st,nt[4]=-at*ht,nt[8]=mt+pt*st,nt[1]=pt+mt*st,nt[5]=at*ut,nt[9]=gt-dt*st,nt[2]=-at*ct,nt[6]=st,nt[10]=at*lt}else if(et.order==="ZYX"){const dt=at*ut,pt=at*ht,mt=st*ut,gt=st*ht;nt[0]=lt*ut,nt[4]=mt*ct-pt,nt[8]=dt*ct+gt,nt[1]=lt*ht,nt[5]=gt*ct+dt,nt[9]=pt*ct-mt,nt[2]=-ct,nt[6]=st*lt,nt[10]=at*lt}else if(et.order==="YZX"){const dt=at*lt,pt=at*ct,mt=st*lt,gt=st*ct;nt[0]=lt*ut,nt[4]=gt-dt*ht,nt[8]=mt*ht+pt,nt[1]=ht,nt[5]=at*ut,nt[9]=-st*ut,nt[2]=-ct*ut,nt[6]=pt*ht+mt,nt[10]=dt-gt*ht}else if(et.order==="XZY"){const dt=at*lt,pt=at*ct,mt=st*lt,gt=st*ct;nt[0]=lt*ut,nt[4]=-ht,nt[8]=ct*ut,nt[1]=dt*ht+gt,nt[5]=at*ut,nt[9]=pt*ht-mt,nt[2]=mt*ht-pt,nt[6]=st*ut,nt[10]=gt*ht+dt}return nt[3]=0,nt[7]=0,nt[11]=0,nt[12]=0,nt[13]=0,nt[14]=0,nt[15]=1,this}makeRotationFromQuaternion(et){return this.compose(_zero,et,_one)}lookAt(et,nt,rt){const it=this.elements;return _z.subVectors(et,nt),_z.lengthSq()===0&&(_z.z=1),_z.normalize(),_x.crossVectors(rt,_z),_x.lengthSq()===0&&(Math.abs(rt.z)===1?_z.x+=1e-4:_z.z+=1e-4,_z.normalize(),_x.crossVectors(rt,_z)),_x.normalize(),_y.crossVectors(_z,_x),it[0]=_x.x,it[4]=_y.x,it[8]=_z.x,it[1]=_x.y,it[5]=_y.y,it[9]=_z.y,it[2]=_x.z,it[6]=_y.z,it[10]=_z.z,this}multiply(et){return this.multiplyMatrices(this,et)}premultiply(et){return this.multiplyMatrices(et,this)}multiplyMatrices(et,nt){const rt=et.elements,it=nt.elements,ot=this.elements,at=rt[0],st=rt[4],lt=rt[8],ct=rt[12],ut=rt[1],ht=rt[5],dt=rt[9],pt=rt[13],mt=rt[2],gt=rt[6],yt=rt[10],bt=rt[14],vt=rt[3],xt=rt[7],kt=rt[11],St=rt[15],Tt=it[0],At=it[4],Et=it[8],$t=it[12],Dt=it[1],jt=it[5],Pt=it[9],Ct=it[13],wt=it[2],It=it[6],Ot=it[10],Wt=it[14],zt=it[3],Ft=it[7],Nt=it[11],Ut=it[15];return ot[0]=at*Tt+st*Dt+lt*wt+ct*zt,ot[4]=at*At+st*jt+lt*It+ct*Ft,ot[8]=at*Et+st*Pt+lt*Ot+ct*Nt,ot[12]=at*$t+st*Ct+lt*Wt+ct*Ut,ot[1]=ut*Tt+ht*Dt+dt*wt+pt*zt,ot[5]=ut*At+ht*jt+dt*It+pt*Ft,ot[9]=ut*Et+ht*Pt+dt*Ot+pt*Nt,ot[13]=ut*$t+ht*Ct+dt*Wt+pt*Ut,ot[2]=mt*Tt+gt*Dt+yt*wt+bt*zt,ot[6]=mt*At+gt*jt+yt*It+bt*Ft,ot[10]=mt*Et+gt*Pt+yt*Ot+bt*Nt,ot[14]=mt*$t+gt*Ct+yt*Wt+bt*Ut,ot[3]=vt*Tt+xt*Dt+kt*wt+St*zt,ot[7]=vt*At+xt*jt+kt*It+St*Ft,ot[11]=vt*Et+xt*Pt+kt*Ot+St*Nt,ot[15]=vt*$t+xt*Ct+kt*Wt+St*Ut,this}multiplyScalar(et){const nt=this.elements;return nt[0]*=et,nt[4]*=et,nt[8]*=et,nt[12]*=et,nt[1]*=et,nt[5]*=et,nt[9]*=et,nt[13]*=et,nt[2]*=et,nt[6]*=et,nt[10]*=et,nt[14]*=et,nt[3]*=et,nt[7]*=et,nt[11]*=et,nt[15]*=et,this}determinant(){const et=this.elements,nt=et[0],rt=et[4],it=et[8],ot=et[12],at=et[1],st=et[5],lt=et[9],ct=et[13],ut=et[2],ht=et[6],dt=et[10],pt=et[14],mt=et[3],gt=et[7],yt=et[11],bt=et[15];return mt*(+ot*lt*ht-it*ct*ht-ot*st*dt+rt*ct*dt+it*st*pt-rt*lt*pt)+gt*(+nt*lt*pt-nt*ct*dt+ot*at*dt-it*at*pt+it*ct*ut-ot*lt*ut)+yt*(+nt*ct*ht-nt*st*pt-ot*at*ht+rt*at*pt+ot*st*ut-rt*ct*ut)+bt*(-it*st*ut-nt*lt*ht+nt*st*dt+it*at*ht-rt*at*dt+rt*lt*ut)}transpose(){const et=this.elements;let nt;return nt=et[1],et[1]=et[4],et[4]=nt,nt=et[2],et[2]=et[8],et[8]=nt,nt=et[6],et[6]=et[9],et[9]=nt,nt=et[3],et[3]=et[12],et[12]=nt,nt=et[7],et[7]=et[13],et[13]=nt,nt=et[11],et[11]=et[14],et[14]=nt,this}setPosition(et,nt,rt){const it=this.elements;return et.isVector3?(it[12]=et.x,it[13]=et.y,it[14]=et.z):(it[12]=et,it[13]=nt,it[14]=rt),this}invert(){const et=this.elements,nt=et[0],rt=et[1],it=et[2],ot=et[3],at=et[4],st=et[5],lt=et[6],ct=et[7],ut=et[8],ht=et[9],dt=et[10],pt=et[11],mt=et[12],gt=et[13],yt=et[14],bt=et[15],vt=ht*yt*ct-gt*dt*ct+gt*lt*pt-st*yt*pt-ht*lt*bt+st*dt*bt,xt=mt*dt*ct-ut*yt*ct-mt*lt*pt+at*yt*pt+ut*lt*bt-at*dt*bt,kt=ut*gt*ct-mt*ht*ct+mt*st*pt-at*gt*pt-ut*st*bt+at*ht*bt,St=mt*ht*lt-ut*gt*lt-mt*st*dt+at*gt*dt+ut*st*yt-at*ht*yt,Tt=nt*vt+rt*xt+it*kt+ot*St;if(Tt===0)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const At=1/Tt;return et[0]=vt*At,et[1]=(gt*dt*ot-ht*yt*ot-gt*it*pt+rt*yt*pt+ht*it*bt-rt*dt*bt)*At,et[2]=(st*yt*ot-gt*lt*ot+gt*it*ct-rt*yt*ct-st*it*bt+rt*lt*bt)*At,et[3]=(ht*lt*ot-st*dt*ot-ht*it*ct+rt*dt*ct+st*it*pt-rt*lt*pt)*At,et[4]=xt*At,et[5]=(ut*yt*ot-mt*dt*ot+mt*it*pt-nt*yt*pt-ut*it*bt+nt*dt*bt)*At,et[6]=(mt*lt*ot-at*yt*ot-mt*it*ct+nt*yt*ct+at*it*bt-nt*lt*bt)*At,et[7]=(at*dt*ot-ut*lt*ot+ut*it*ct-nt*dt*ct-at*it*pt+nt*lt*pt)*At,et[8]=kt*At,et[9]=(mt*ht*ot-ut*gt*ot-mt*rt*pt+nt*gt*pt+ut*rt*bt-nt*ht*bt)*At,et[10]=(at*gt*ot-mt*st*ot+mt*rt*ct-nt*gt*ct-at*rt*bt+nt*st*bt)*At,et[11]=(ut*st*ot-at*ht*ot-ut*rt*ct+nt*ht*ct+at*rt*pt-nt*st*pt)*At,et[12]=St*At,et[13]=(ut*gt*it-mt*ht*it+mt*rt*dt-nt*gt*dt-ut*rt*yt+nt*ht*yt)*At,et[14]=(mt*st*it-at*gt*it-mt*rt*lt+nt*gt*lt+at*rt*yt-nt*st*yt)*At,et[15]=(at*ht*it-ut*st*it+ut*rt*lt-nt*ht*lt-at*rt*dt+nt*st*dt)*At,this}scale(et){const nt=this.elements,rt=et.x,it=et.y,ot=et.z;return nt[0]*=rt,nt[4]*=it,nt[8]*=ot,nt[1]*=rt,nt[5]*=it,nt[9]*=ot,nt[2]*=rt,nt[6]*=it,nt[10]*=ot,nt[3]*=rt,nt[7]*=it,nt[11]*=ot,this}getMaxScaleOnAxis(){const et=this.elements,nt=et[0]*et[0]+et[1]*et[1]+et[2]*et[2],rt=et[4]*et[4]+et[5]*et[5]+et[6]*et[6],it=et[8]*et[8]+et[9]*et[9]+et[10]*et[10];return Math.sqrt(Math.max(nt,rt,it))}makeTranslation(et,nt,rt){return this.set(1,0,0,et,0,1,0,nt,0,0,1,rt,0,0,0,1),this}makeRotationX(et){const nt=Math.cos(et),rt=Math.sin(et);return this.set(1,0,0,0,0,nt,-rt,0,0,rt,nt,0,0,0,0,1),this}makeRotationY(et){const nt=Math.cos(et),rt=Math.sin(et);return this.set(nt,0,rt,0,0,1,0,0,-rt,0,nt,0,0,0,0,1),this}makeRotationZ(et){const nt=Math.cos(et),rt=Math.sin(et);return this.set(nt,-rt,0,0,rt,nt,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(et,nt){const rt=Math.cos(nt),it=Math.sin(nt),ot=1-rt,at=et.x,st=et.y,lt=et.z,ct=ot*at,ut=ot*st;return this.set(ct*at+rt,ct*st-it*lt,ct*lt+it*st,0,ct*st+it*lt,ut*st+rt,ut*lt-it*at,0,ct*lt-it*st,ut*lt+it*at,ot*lt*lt+rt,0,0,0,0,1),this}makeScale(et,nt,rt){return this.set(et,0,0,0,0,nt,0,0,0,0,rt,0,0,0,0,1),this}makeShear(et,nt,rt,it,ot,at){return this.set(1,rt,ot,0,et,1,at,0,nt,it,1,0,0,0,0,1),this}compose(et,nt,rt){const it=this.elements,ot=nt._x,at=nt._y,st=nt._z,lt=nt._w,ct=ot+ot,ut=at+at,ht=st+st,dt=ot*ct,pt=ot*ut,mt=ot*ht,gt=at*ut,yt=at*ht,bt=st*ht,vt=lt*ct,xt=lt*ut,kt=lt*ht,St=rt.x,Tt=rt.y,At=rt.z;return it[0]=(1-(gt+bt))*St,it[1]=(pt+kt)*St,it[2]=(mt-xt)*St,it[3]=0,it[4]=(pt-kt)*Tt,it[5]=(1-(dt+bt))*Tt,it[6]=(yt+vt)*Tt,it[7]=0,it[8]=(mt+xt)*At,it[9]=(yt-vt)*At,it[10]=(1-(dt+gt))*At,it[11]=0,it[12]=et.x,it[13]=et.y,it[14]=et.z,it[15]=1,this}decompose(et,nt,rt){const it=this.elements;let ot=_v1$5.set(it[0],it[1],it[2]).length();const at=_v1$5.set(it[4],it[5],it[6]).length(),st=_v1$5.set(it[8],it[9],it[10]).length();this.determinant()<0&&(ot=-ot),et.x=it[12],et.y=it[13],et.z=it[14],_m1$2.copy(this);const ct=1/ot,ut=1/at,ht=1/st;return _m1$2.elements[0]*=ct,_m1$2.elements[1]*=ct,_m1$2.elements[2]*=ct,_m1$2.elements[4]*=ut,_m1$2.elements[5]*=ut,_m1$2.elements[6]*=ut,_m1$2.elements[8]*=ht,_m1$2.elements[9]*=ht,_m1$2.elements[10]*=ht,nt.setFromRotationMatrix(_m1$2),rt.x=ot,rt.y=at,rt.z=st,this}makePerspective(et,nt,rt,it,ot,at){const st=this.elements,lt=2*ot/(nt-et),ct=2*ot/(rt-it),ut=(nt+et)/(nt-et),ht=(rt+it)/(rt-it),dt=-(at+ot)/(at-ot),pt=-2*at*ot/(at-ot);return st[0]=lt,st[4]=0,st[8]=ut,st[12]=0,st[1]=0,st[5]=ct,st[9]=ht,st[13]=0,st[2]=0,st[6]=0,st[10]=dt,st[14]=pt,st[3]=0,st[7]=0,st[11]=-1,st[15]=0,this}makeOrthographic(et,nt,rt,it,ot,at){const st=this.elements,lt=1/(nt-et),ct=1/(rt-it),ut=1/(at-ot),ht=(nt+et)*lt,dt=(rt+it)*ct,pt=(at+ot)*ut;return st[0]=2*lt,st[4]=0,st[8]=0,st[12]=-ht,st[1]=0,st[5]=2*ct,st[9]=0,st[13]=-dt,st[2]=0,st[6]=0,st[10]=-2*ut,st[14]=-pt,st[3]=0,st[7]=0,st[11]=0,st[15]=1,this}equals(et){const nt=this.elements,rt=et.elements;for(let it=0;it<16;it++)if(nt[it]!==rt[it])return!1;return!0}fromArray(et,nt=0){for(let rt=0;rt<16;rt++)this.elements[rt]=et[rt+nt];return this}toArray(et=[],nt=0){const rt=this.elements;return et[nt]=rt[0],et[nt+1]=rt[1],et[nt+2]=rt[2],et[nt+3]=rt[3],et[nt+4]=rt[4],et[nt+5]=rt[5],et[nt+6]=rt[6],et[nt+7]=rt[7],et[nt+8]=rt[8],et[nt+9]=rt[9],et[nt+10]=rt[10],et[nt+11]=rt[11],et[nt+12]=rt[12],et[nt+13]=rt[13],et[nt+14]=rt[14],et[nt+15]=rt[15],et}}const _v1$5=new Vector3,_m1$2=new Matrix4,_zero=new Vector3(0,0,0),_one=new Vector3(1,1,1),_x=new Vector3,_y=new Vector3,_z=new Vector3,_matrix$1=new Matrix4,_quaternion$3=new Quaternion;class Euler{constructor(et=0,nt=0,rt=0,it=Euler.DefaultOrder){this.isEuler=!0,this._x=et,this._y=nt,this._z=rt,this._order=it}get x(){return this._x}set x(et){this._x=et,this._onChangeCallback()}get y(){return this._y}set y(et){this._y=et,this._onChangeCallback()}get z(){return this._z}set z(et){this._z=et,this._onChangeCallback()}get order(){return this._order}set order(et){this._order=et,this._onChangeCallback()}set(et,nt,rt,it=this._order){return this._x=et,this._y=nt,this._z=rt,this._order=it,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._order)}copy(et){return this._x=et._x,this._y=et._y,this._z=et._z,this._order=et._order,this._onChangeCallback(),this}setFromRotationMatrix(et,nt=this._order,rt=!0){const it=et.elements,ot=it[0],at=it[4],st=it[8],lt=it[1],ct=it[5],ut=it[9],ht=it[2],dt=it[6],pt=it[10];switch(nt){case"XYZ":this._y=Math.asin(clamp$5(st,-1,1)),Math.abs(st)<.9999999?(this._x=Math.atan2(-ut,pt),this._z=Math.atan2(-at,ot)):(this._x=Math.atan2(dt,ct),this._z=0);break;case"YXZ":this._x=Math.asin(-clamp$5(ut,-1,1)),Math.abs(ut)<.9999999?(this._y=Math.atan2(st,pt),this._z=Math.atan2(lt,ct)):(this._y=Math.atan2(-ht,ot),this._z=0);break;case"ZXY":this._x=Math.asin(clamp$5(dt,-1,1)),Math.abs(dt)<.9999999?(this._y=Math.atan2(-ht,pt),this._z=Math.atan2(-at,ct)):(this._y=0,this._z=Math.atan2(lt,ot));break;case"ZYX":this._y=Math.asin(-clamp$5(ht,-1,1)),Math.abs(ht)<.9999999?(this._x=Math.atan2(dt,pt),this._z=Math.atan2(lt,ot)):(this._x=0,this._z=Math.atan2(-at,ct));break;case"YZX":this._z=Math.asin(clamp$5(lt,-1,1)),Math.abs(lt)<.9999999?(this._x=Math.atan2(-ut,ct),this._y=Math.atan2(-ht,ot)):(this._x=0,this._y=Math.atan2(st,pt));break;case"XZY":this._z=Math.asin(-clamp$5(at,-1,1)),Math.abs(at)<.9999999?(this._x=Math.atan2(dt,ct),this._y=Math.atan2(st,ot)):(this._x=Math.atan2(-ut,pt),this._y=0);break;default:console.warn("THREE.Euler: .setFromRotationMatrix() encountered an unknown order: "+nt)}return this._order=nt,rt===!0&&this._onChangeCallback(),this}setFromQuaternion(et,nt,rt){return _matrix$1.makeRotationFromQuaternion(et),this.setFromRotationMatrix(_matrix$1,nt,rt)}setFromVector3(et,nt=this._order){return this.set(et.x,et.y,et.z,nt)}reorder(et){return _quaternion$3.setFromEuler(this),this.setFromQuaternion(_quaternion$3,et)}equals(et){return et._x===this._x&&et._y===this._y&&et._z===this._z&&et._order===this._order}fromArray(et){return this._x=et[0],this._y=et[1],this._z=et[2],et[3]!==void 0&&(this._order=et[3]),this._onChangeCallback(),this}toArray(et=[],nt=0){return et[nt]=this._x,et[nt+1]=this._y,et[nt+2]=this._z,et[nt+3]=this._order,et}_onChange(et){return this._onChangeCallback=et,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._order}toVector3(){console.error("THREE.Euler: .toVector3() has been removed. Use Vector3.setFromEuler() instead")}}Euler.DefaultOrder="XYZ";Euler.RotationOrders=["XYZ","YZX","ZXY","XZY","YXZ","ZYX"];class Layers{constructor(){this.mask=1}set(et){this.mask=(1<>>0}enable(et){this.mask|=1<1){for(let nt=0;nt1){for(let rt=0;rt0){it.children=[];for(let st=0;st0){it.animations=[];for(let st=0;st0&&(rt.geometries=st),lt.length>0&&(rt.materials=lt),ct.length>0&&(rt.textures=ct),ut.length>0&&(rt.images=ut),ht.length>0&&(rt.shapes=ht),dt.length>0&&(rt.skeletons=dt),pt.length>0&&(rt.animations=pt),mt.length>0&&(rt.nodes=mt)}return rt.object=it,rt;function at(st){const lt=[];for(const ct in st){const ut=st[ct];delete ut.metadata,lt.push(ut)}return lt}}clone(et){return new this.constructor().copy(this,et)}copy(et,nt=!0){if(this.name=et.name,this.up.copy(et.up),this.position.copy(et.position),this.rotation.order=et.rotation.order,this.quaternion.copy(et.quaternion),this.scale.copy(et.scale),this.matrix.copy(et.matrix),this.matrixWorld.copy(et.matrixWorld),this.matrixAutoUpdate=et.matrixAutoUpdate,this.matrixWorldNeedsUpdate=et.matrixWorldNeedsUpdate,this.layers.mask=et.layers.mask,this.visible=et.visible,this.castShadow=et.castShadow,this.receiveShadow=et.receiveShadow,this.frustumCulled=et.frustumCulled,this.renderOrder=et.renderOrder,this.userData=JSON.parse(JSON.stringify(et.userData)),nt===!0)for(let rt=0;rt0?it.multiplyScalar(1/Math.sqrt(ot)):it.set(0,0,0)}static getBarycoord(et,nt,rt,it,ot){_v0$1.subVectors(it,nt),_v1$3.subVectors(rt,nt),_v2$2.subVectors(et,nt);const at=_v0$1.dot(_v0$1),st=_v0$1.dot(_v1$3),lt=_v0$1.dot(_v2$2),ct=_v1$3.dot(_v1$3),ut=_v1$3.dot(_v2$2),ht=at*ct-st*st;if(ht===0)return ot.set(-2,-1,-1);const dt=1/ht,pt=(ct*lt-st*ut)*dt,mt=(at*ut-st*lt)*dt;return ot.set(1-pt-mt,mt,pt)}static containsPoint(et,nt,rt,it){return this.getBarycoord(et,nt,rt,it,_v3$1),_v3$1.x>=0&&_v3$1.y>=0&&_v3$1.x+_v3$1.y<=1}static getUV(et,nt,rt,it,ot,at,st,lt){return this.getBarycoord(et,nt,rt,it,_v3$1),lt.set(0,0),lt.addScaledVector(ot,_v3$1.x),lt.addScaledVector(at,_v3$1.y),lt.addScaledVector(st,_v3$1.z),lt}static isFrontFacing(et,nt,rt,it){return _v0$1.subVectors(rt,nt),_v1$3.subVectors(et,nt),_v0$1.cross(_v1$3).dot(it)<0}set(et,nt,rt){return this.a.copy(et),this.b.copy(nt),this.c.copy(rt),this}setFromPointsAndIndices(et,nt,rt,it){return this.a.copy(et[nt]),this.b.copy(et[rt]),this.c.copy(et[it]),this}setFromAttributeAndIndices(et,nt,rt,it){return this.a.fromBufferAttribute(et,nt),this.b.fromBufferAttribute(et,rt),this.c.fromBufferAttribute(et,it),this}clone(){return new this.constructor().copy(this)}copy(et){return this.a.copy(et.a),this.b.copy(et.b),this.c.copy(et.c),this}getArea(){return _v0$1.subVectors(this.c,this.b),_v1$3.subVectors(this.a,this.b),_v0$1.cross(_v1$3).length()*.5}getMidpoint(et){return et.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(et){return Triangle.getNormal(this.a,this.b,this.c,et)}getPlane(et){return et.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(et,nt){return Triangle.getBarycoord(et,this.a,this.b,this.c,nt)}getUV(et,nt,rt,it,ot){return Triangle.getUV(et,this.a,this.b,this.c,nt,rt,it,ot)}containsPoint(et){return Triangle.containsPoint(et,this.a,this.b,this.c)}isFrontFacing(et){return Triangle.isFrontFacing(this.a,this.b,this.c,et)}intersectsBox(et){return et.intersectsTriangle(this)}closestPointToPoint(et,nt){const rt=this.a,it=this.b,ot=this.c;let at,st;_vab.subVectors(it,rt),_vac.subVectors(ot,rt),_vap.subVectors(et,rt);const lt=_vab.dot(_vap),ct=_vac.dot(_vap);if(lt<=0&&ct<=0)return nt.copy(rt);_vbp.subVectors(et,it);const ut=_vab.dot(_vbp),ht=_vac.dot(_vbp);if(ut>=0&&ht<=ut)return nt.copy(it);const dt=lt*ht-ut*ct;if(dt<=0&<>=0&&ut<=0)return at=lt/(lt-ut),nt.copy(rt).addScaledVector(_vab,at);_vcp.subVectors(et,ot);const pt=_vab.dot(_vcp),mt=_vac.dot(_vcp);if(mt>=0&&pt<=mt)return nt.copy(ot);const gt=pt*ct-lt*mt;if(gt<=0&&ct>=0&&mt<=0)return st=ct/(ct-mt),nt.copy(rt).addScaledVector(_vac,st);const yt=ut*mt-pt*ht;if(yt<=0&&ht-ut>=0&&pt-mt>=0)return _vbc.subVectors(ot,it),st=(ht-ut)/(ht-ut+(pt-mt)),nt.copy(it).addScaledVector(_vbc,st);const bt=1/(yt+gt+dt);return at=gt*bt,st=dt*bt,nt.copy(rt).addScaledVector(_vab,at).addScaledVector(_vac,st)}equals(et){return et.a.equals(this.a)&&et.b.equals(this.b)&&et.c.equals(this.c)}}let materialId=0;class Material extends EventDispatcher$1{constructor(){super(),this.isMaterial=!0,Object.defineProperty(this,"id",{value:materialId++}),this.uuid=generateUUID$1(),this.name="",this.type="Material",this.blending=NormalBlending,this.side=FrontSide,this.vertexColors=!1,this.opacity=1,this.transparent=!1,this.blendSrc=SrcAlphaFactor,this.blendDst=OneMinusSrcAlphaFactor,this.blendEquation=AddEquation,this.blendSrcAlpha=null,this.blendDstAlpha=null,this.blendEquationAlpha=null,this.depthFunc=LessEqualDepth,this.depthTest=!0,this.depthWrite=!0,this.stencilWriteMask=255,this.stencilFunc=AlwaysStencilFunc,this.stencilRef=0,this.stencilFuncMask=255,this.stencilFail=KeepStencilOp,this.stencilZFail=KeepStencilOp,this.stencilZPass=KeepStencilOp,this.stencilWrite=!1,this.clippingPlanes=null,this.clipIntersection=!1,this.clipShadows=!1,this.shadowSide=null,this.colorWrite=!0,this.precision=null,this.polygonOffset=!1,this.polygonOffsetFactor=0,this.polygonOffsetUnits=0,this.dithering=!1,this.alphaToCoverage=!1,this.premultipliedAlpha=!1,this.visible=!0,this.toneMapped=!0,this.userData={},this.version=0,this._alphaTest=0}get alphaTest(){return this._alphaTest}set alphaTest(et){this._alphaTest>0!=et>0&&this.version++,this._alphaTest=et}onBuild(){}onBeforeRender(){}onBeforeCompile(){}customProgramCacheKey(){return this.onBeforeCompile.toString()}setValues(et){if(et!==void 0)for(const nt in et){const rt=et[nt];if(rt===void 0){console.warn("THREE.Material: '"+nt+"' parameter is undefined.");continue}if(nt==="shading"){console.warn("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead."),this.flatShading=rt===FlatShading;continue}const it=this[nt];if(it===void 0){console.warn("THREE."+this.type+": '"+nt+"' is not a property of this material.");continue}it&&it.isColor?it.set(rt):it&&it.isVector3&&rt&&rt.isVector3?it.copy(rt):this[nt]=rt}}toJSON(et){const nt=et===void 0||typeof et=="string";nt&&(et={textures:{},images:{}});const rt={metadata:{version:4.5,type:"Material",generator:"Material.toJSON"}};rt.uuid=this.uuid,rt.type=this.type,this.name!==""&&(rt.name=this.name),this.color&&this.color.isColor&&(rt.color=this.color.getHex()),this.roughness!==void 0&&(rt.roughness=this.roughness),this.metalness!==void 0&&(rt.metalness=this.metalness),this.sheen!==void 0&&(rt.sheen=this.sheen),this.sheenColor&&this.sheenColor.isColor&&(rt.sheenColor=this.sheenColor.getHex()),this.sheenRoughness!==void 0&&(rt.sheenRoughness=this.sheenRoughness),this.emissive&&this.emissive.isColor&&(rt.emissive=this.emissive.getHex()),this.emissiveIntensity&&this.emissiveIntensity!==1&&(rt.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(rt.specular=this.specular.getHex()),this.specularIntensity!==void 0&&(rt.specularIntensity=this.specularIntensity),this.specularColor&&this.specularColor.isColor&&(rt.specularColor=this.specularColor.getHex()),this.shininess!==void 0&&(rt.shininess=this.shininess),this.clearcoat!==void 0&&(rt.clearcoat=this.clearcoat),this.clearcoatRoughness!==void 0&&(rt.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatMap&&this.clearcoatMap.isTexture&&(rt.clearcoatMap=this.clearcoatMap.toJSON(et).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(rt.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(et).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(rt.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(et).uuid,rt.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),this.iridescence!==void 0&&(rt.iridescence=this.iridescence),this.iridescenceIOR!==void 0&&(rt.iridescenceIOR=this.iridescenceIOR),this.iridescenceThicknessRange!==void 0&&(rt.iridescenceThicknessRange=this.iridescenceThicknessRange),this.iridescenceMap&&this.iridescenceMap.isTexture&&(rt.iridescenceMap=this.iridescenceMap.toJSON(et).uuid),this.iridescenceThicknessMap&&this.iridescenceThicknessMap.isTexture&&(rt.iridescenceThicknessMap=this.iridescenceThicknessMap.toJSON(et).uuid),this.map&&this.map.isTexture&&(rt.map=this.map.toJSON(et).uuid),this.matcap&&this.matcap.isTexture&&(rt.matcap=this.matcap.toJSON(et).uuid),this.alphaMap&&this.alphaMap.isTexture&&(rt.alphaMap=this.alphaMap.toJSON(et).uuid),this.lightMap&&this.lightMap.isTexture&&(rt.lightMap=this.lightMap.toJSON(et).uuid,rt.lightMapIntensity=this.lightMapIntensity),this.aoMap&&this.aoMap.isTexture&&(rt.aoMap=this.aoMap.toJSON(et).uuid,rt.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(rt.bumpMap=this.bumpMap.toJSON(et).uuid,rt.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(rt.normalMap=this.normalMap.toJSON(et).uuid,rt.normalMapType=this.normalMapType,rt.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(rt.displacementMap=this.displacementMap.toJSON(et).uuid,rt.displacementScale=this.displacementScale,rt.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(rt.roughnessMap=this.roughnessMap.toJSON(et).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(rt.metalnessMap=this.metalnessMap.toJSON(et).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(rt.emissiveMap=this.emissiveMap.toJSON(et).uuid),this.specularMap&&this.specularMap.isTexture&&(rt.specularMap=this.specularMap.toJSON(et).uuid),this.specularIntensityMap&&this.specularIntensityMap.isTexture&&(rt.specularIntensityMap=this.specularIntensityMap.toJSON(et).uuid),this.specularColorMap&&this.specularColorMap.isTexture&&(rt.specularColorMap=this.specularColorMap.toJSON(et).uuid),this.envMap&&this.envMap.isTexture&&(rt.envMap=this.envMap.toJSON(et).uuid,this.combine!==void 0&&(rt.combine=this.combine)),this.envMapIntensity!==void 0&&(rt.envMapIntensity=this.envMapIntensity),this.reflectivity!==void 0&&(rt.reflectivity=this.reflectivity),this.refractionRatio!==void 0&&(rt.refractionRatio=this.refractionRatio),this.gradientMap&&this.gradientMap.isTexture&&(rt.gradientMap=this.gradientMap.toJSON(et).uuid),this.transmission!==void 0&&(rt.transmission=this.transmission),this.transmissionMap&&this.transmissionMap.isTexture&&(rt.transmissionMap=this.transmissionMap.toJSON(et).uuid),this.thickness!==void 0&&(rt.thickness=this.thickness),this.thicknessMap&&this.thicknessMap.isTexture&&(rt.thicknessMap=this.thicknessMap.toJSON(et).uuid),this.attenuationDistance!==void 0&&(rt.attenuationDistance=this.attenuationDistance),this.attenuationColor!==void 0&&(rt.attenuationColor=this.attenuationColor.getHex()),this.size!==void 0&&(rt.size=this.size),this.shadowSide!==null&&(rt.shadowSide=this.shadowSide),this.sizeAttenuation!==void 0&&(rt.sizeAttenuation=this.sizeAttenuation),this.blending!==NormalBlending&&(rt.blending=this.blending),this.side!==FrontSide&&(rt.side=this.side),this.vertexColors&&(rt.vertexColors=!0),this.opacity<1&&(rt.opacity=this.opacity),this.transparent===!0&&(rt.transparent=this.transparent),rt.depthFunc=this.depthFunc,rt.depthTest=this.depthTest,rt.depthWrite=this.depthWrite,rt.colorWrite=this.colorWrite,rt.stencilWrite=this.stencilWrite,rt.stencilWriteMask=this.stencilWriteMask,rt.stencilFunc=this.stencilFunc,rt.stencilRef=this.stencilRef,rt.stencilFuncMask=this.stencilFuncMask,rt.stencilFail=this.stencilFail,rt.stencilZFail=this.stencilZFail,rt.stencilZPass=this.stencilZPass,this.rotation!==void 0&&this.rotation!==0&&(rt.rotation=this.rotation),this.polygonOffset===!0&&(rt.polygonOffset=!0),this.polygonOffsetFactor!==0&&(rt.polygonOffsetFactor=this.polygonOffsetFactor),this.polygonOffsetUnits!==0&&(rt.polygonOffsetUnits=this.polygonOffsetUnits),this.linewidth!==void 0&&this.linewidth!==1&&(rt.linewidth=this.linewidth),this.dashSize!==void 0&&(rt.dashSize=this.dashSize),this.gapSize!==void 0&&(rt.gapSize=this.gapSize),this.scale!==void 0&&(rt.scale=this.scale),this.dithering===!0&&(rt.dithering=!0),this.alphaTest>0&&(rt.alphaTest=this.alphaTest),this.alphaToCoverage===!0&&(rt.alphaToCoverage=this.alphaToCoverage),this.premultipliedAlpha===!0&&(rt.premultipliedAlpha=this.premultipliedAlpha),this.wireframe===!0&&(rt.wireframe=this.wireframe),this.wireframeLinewidth>1&&(rt.wireframeLinewidth=this.wireframeLinewidth),this.wireframeLinecap!=="round"&&(rt.wireframeLinecap=this.wireframeLinecap),this.wireframeLinejoin!=="round"&&(rt.wireframeLinejoin=this.wireframeLinejoin),this.flatShading===!0&&(rt.flatShading=this.flatShading),this.visible===!1&&(rt.visible=!1),this.toneMapped===!1&&(rt.toneMapped=!1),this.fog===!1&&(rt.fog=!1),JSON.stringify(this.userData)!=="{}"&&(rt.userData=this.userData);function it(ot){const at=[];for(const st in ot){const lt=ot[st];delete lt.metadata,at.push(lt)}return at}if(nt){const ot=it(et.textures),at=it(et.images);ot.length>0&&(rt.textures=ot),at.length>0&&(rt.images=at)}return rt}clone(){return new this.constructor().copy(this)}copy(et){this.name=et.name,this.blending=et.blending,this.side=et.side,this.vertexColors=et.vertexColors,this.opacity=et.opacity,this.transparent=et.transparent,this.blendSrc=et.blendSrc,this.blendDst=et.blendDst,this.blendEquation=et.blendEquation,this.blendSrcAlpha=et.blendSrcAlpha,this.blendDstAlpha=et.blendDstAlpha,this.blendEquationAlpha=et.blendEquationAlpha,this.depthFunc=et.depthFunc,this.depthTest=et.depthTest,this.depthWrite=et.depthWrite,this.stencilWriteMask=et.stencilWriteMask,this.stencilFunc=et.stencilFunc,this.stencilRef=et.stencilRef,this.stencilFuncMask=et.stencilFuncMask,this.stencilFail=et.stencilFail,this.stencilZFail=et.stencilZFail,this.stencilZPass=et.stencilZPass,this.stencilWrite=et.stencilWrite;const nt=et.clippingPlanes;let rt=null;if(nt!==null){const it=nt.length;rt=new Array(it);for(let ot=0;ot!==it;++ot)rt[ot]=nt[ot].clone()}return this.clippingPlanes=rt,this.clipIntersection=et.clipIntersection,this.clipShadows=et.clipShadows,this.shadowSide=et.shadowSide,this.colorWrite=et.colorWrite,this.precision=et.precision,this.polygonOffset=et.polygonOffset,this.polygonOffsetFactor=et.polygonOffsetFactor,this.polygonOffsetUnits=et.polygonOffsetUnits,this.dithering=et.dithering,this.alphaTest=et.alphaTest,this.alphaToCoverage=et.alphaToCoverage,this.premultipliedAlpha=et.premultipliedAlpha,this.visible=et.visible,this.toneMapped=et.toneMapped,this.userData=JSON.parse(JSON.stringify(et.userData)),this}dispose(){this.dispatchEvent({type:"dispose"})}set needsUpdate(et){et===!0&&this.version++}}class MeshBasicMaterial extends Material{constructor(et){super(),this.isMeshBasicMaterial=!0,this.type="MeshBasicMaterial",this.color=new Color$1(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=MultiplyOperation,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.fog=!0,this.setValues(et)}copy(et){return super.copy(et),this.color.copy(et.color),this.map=et.map,this.lightMap=et.lightMap,this.lightMapIntensity=et.lightMapIntensity,this.aoMap=et.aoMap,this.aoMapIntensity=et.aoMapIntensity,this.specularMap=et.specularMap,this.alphaMap=et.alphaMap,this.envMap=et.envMap,this.combine=et.combine,this.reflectivity=et.reflectivity,this.refractionRatio=et.refractionRatio,this.wireframe=et.wireframe,this.wireframeLinewidth=et.wireframeLinewidth,this.wireframeLinecap=et.wireframeLinecap,this.wireframeLinejoin=et.wireframeLinejoin,this.fog=et.fog,this}}const _vector$9=new Vector3,_vector2$1=new Vector2;class BufferAttribute{constructor(et,nt,rt){if(Array.isArray(et))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.isBufferAttribute=!0,this.name="",this.array=et,this.itemSize=nt,this.count=et!==void 0?et.length/nt:0,this.normalized=rt===!0,this.usage=StaticDrawUsage,this.updateRange={offset:0,count:-1},this.version=0}onUploadCallback(){}set needsUpdate(et){et===!0&&this.version++}setUsage(et){return this.usage=et,this}copy(et){return this.name=et.name,this.array=new et.array.constructor(et.array),this.itemSize=et.itemSize,this.count=et.count,this.normalized=et.normalized,this.usage=et.usage,this}copyAt(et,nt,rt){et*=this.itemSize,rt*=nt.itemSize;for(let it=0,ot=this.itemSize;it0&&(et.userData=this.userData),this.parameters!==void 0){const lt=this.parameters;for(const ct in lt)lt[ct]!==void 0&&(et[ct]=lt[ct]);return et}et.data={attributes:{}};const nt=this.index;nt!==null&&(et.data.index={type:nt.array.constructor.name,array:Array.prototype.slice.call(nt.array)});const rt=this.attributes;for(const lt in rt){const ct=rt[lt];et.data.attributes[lt]=ct.toJSON(et.data)}const it={};let ot=!1;for(const lt in this.morphAttributes){const ct=this.morphAttributes[lt],ut=[];for(let ht=0,dt=ct.length;ht0&&(it[lt]=ut,ot=!0)}ot&&(et.data.morphAttributes=it,et.data.morphTargetsRelative=this.morphTargetsRelative);const at=this.groups;at.length>0&&(et.data.groups=JSON.parse(JSON.stringify(at)));const st=this.boundingSphere;return st!==null&&(et.data.boundingSphere={center:st.center.toArray(),radius:st.radius}),et}clone(){return new this.constructor().copy(this)}copy(et){this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null;const nt={};this.name=et.name;const rt=et.index;rt!==null&&this.setIndex(rt.clone(nt));const it=et.attributes;for(const ct in it){const ut=it[ct];this.setAttribute(ct,ut.clone(nt))}const ot=et.morphAttributes;for(const ct in ot){const ut=[],ht=ot[ct];for(let dt=0,pt=ht.length;dt0){const it=nt[rt[0]];if(it!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let ot=0,at=it.length;otnt.far?null:{distance:ct,point:_intersectionPointWorld.clone(),object:tt}}function checkBufferGeometryIntersection(tt,et,nt,rt,it,ot,at,st,lt,ct,ut,ht){_vA$1.fromBufferAttribute(it,ct),_vB$1.fromBufferAttribute(it,ut),_vC$1.fromBufferAttribute(it,ht);const dt=tt.morphTargetInfluences;if(ot&&dt){_morphA.set(0,0,0),_morphB.set(0,0,0),_morphC.set(0,0,0);for(let mt=0,gt=ot.length;mt0?1:-1,ut.push(Ft.x,Ft.y,Ft.z),ht.push(Mt/At),ht.push(1-Nt/Et),Wt+=1}}for(let Nt=0;Nt0&&(nt.defines=this.defines),nt.vertexShader=this.vertexShader,nt.fragmentShader=this.fragmentShader;const rt={};for(const it in this.extensions)this.extensions[it]===!0&&(rt[it]=!0);return Object.keys(rt).length>0&&(nt.extensions=rt),nt}}class Camera extends Object3D{constructor(){super(),this.isCamera=!0,this.type="Camera",this.matrixWorldInverse=new Matrix4,this.projectionMatrix=new Matrix4,this.projectionMatrixInverse=new Matrix4}copy(et,nt){return super.copy(et,nt),this.matrixWorldInverse.copy(et.matrixWorldInverse),this.projectionMatrix.copy(et.projectionMatrix),this.projectionMatrixInverse.copy(et.projectionMatrixInverse),this}getWorldDirection(et){this.updateWorldMatrix(!0,!1);const nt=this.matrixWorld.elements;return et.set(-nt[8],-nt[9],-nt[10]).normalize()}updateMatrixWorld(et){super.updateMatrixWorld(et),this.matrixWorldInverse.copy(this.matrixWorld).invert()}updateWorldMatrix(et,nt){super.updateWorldMatrix(et,nt),this.matrixWorldInverse.copy(this.matrixWorld).invert()}clone(){return new this.constructor().copy(this)}}class PerspectiveCamera extends Camera{constructor(et=50,nt=1,rt=.1,it=2e3){super(),this.isPerspectiveCamera=!0,this.type="PerspectiveCamera",this.fov=et,this.zoom=1,this.near=rt,this.far=it,this.focus=10,this.aspect=nt,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}copy(et,nt){return super.copy(et,nt),this.fov=et.fov,this.zoom=et.zoom,this.near=et.near,this.far=et.far,this.focus=et.focus,this.aspect=et.aspect,this.view=et.view===null?null:Object.assign({},et.view),this.filmGauge=et.filmGauge,this.filmOffset=et.filmOffset,this}setFocalLength(et){const nt=.5*this.getFilmHeight()/et;this.fov=RAD2DEG*2*Math.atan(nt),this.updateProjectionMatrix()}getFocalLength(){const et=Math.tan(DEG2RAD$1*.5*this.fov);return .5*this.getFilmHeight()/et}getEffectiveFOV(){return RAD2DEG*2*Math.atan(Math.tan(DEG2RAD$1*.5*this.fov)/this.zoom)}getFilmWidth(){return this.filmGauge*Math.min(this.aspect,1)}getFilmHeight(){return this.filmGauge/Math.max(this.aspect,1)}setViewOffset(et,nt,rt,it,ot,at){this.aspect=et/nt,this.view===null&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=et,this.view.fullHeight=nt,this.view.offsetX=rt,this.view.offsetY=it,this.view.width=ot,this.view.height=at,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const et=this.near;let nt=et*Math.tan(DEG2RAD$1*.5*this.fov)/this.zoom,rt=2*nt,it=this.aspect*rt,ot=-.5*it;const at=this.view;if(this.view!==null&&this.view.enabled){const lt=at.fullWidth,ct=at.fullHeight;ot+=at.offsetX*it/lt,nt-=at.offsetY*rt/ct,it*=at.width/lt,rt*=at.height/ct}const st=this.filmOffset;st!==0&&(ot+=et*st/this.getFilmWidth()),this.projectionMatrix.makePerspective(ot,ot+it,nt,nt-rt,et,this.far),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(et){const nt=super.toJSON(et);return nt.object.fov=this.fov,nt.object.zoom=this.zoom,nt.object.near=this.near,nt.object.far=this.far,nt.object.focus=this.focus,nt.object.aspect=this.aspect,this.view!==null&&(nt.object.view=Object.assign({},this.view)),nt.object.filmGauge=this.filmGauge,nt.object.filmOffset=this.filmOffset,nt}}const fov=90,aspect=1;class CubeCamera extends Object3D{constructor(et,nt,rt){if(super(),this.type="CubeCamera",rt.isWebGLCubeRenderTarget!==!0){console.error("THREE.CubeCamera: The constructor now expects an instance of WebGLCubeRenderTarget as third parameter.");return}this.renderTarget=rt;const it=new PerspectiveCamera(fov,aspect,et,nt);it.layers=this.layers,it.up.set(0,-1,0),it.lookAt(new Vector3(1,0,0)),this.add(it);const ot=new PerspectiveCamera(fov,aspect,et,nt);ot.layers=this.layers,ot.up.set(0,-1,0),ot.lookAt(new Vector3(-1,0,0)),this.add(ot);const at=new PerspectiveCamera(fov,aspect,et,nt);at.layers=this.layers,at.up.set(0,0,1),at.lookAt(new Vector3(0,1,0)),this.add(at);const st=new PerspectiveCamera(fov,aspect,et,nt);st.layers=this.layers,st.up.set(0,0,-1),st.lookAt(new Vector3(0,-1,0)),this.add(st);const lt=new PerspectiveCamera(fov,aspect,et,nt);lt.layers=this.layers,lt.up.set(0,-1,0),lt.lookAt(new Vector3(0,0,1)),this.add(lt);const ct=new PerspectiveCamera(fov,aspect,et,nt);ct.layers=this.layers,ct.up.set(0,-1,0),ct.lookAt(new Vector3(0,0,-1)),this.add(ct)}update(et,nt){this.parent===null&&this.updateMatrixWorld();const rt=this.renderTarget,[it,ot,at,st,lt,ct]=this.children,ut=et.getRenderTarget(),ht=et.toneMapping,dt=et.xr.enabled;et.toneMapping=NoToneMapping,et.xr.enabled=!1;const pt=rt.texture.generateMipmaps;rt.texture.generateMipmaps=!1,et.setRenderTarget(rt,0),et.render(nt,it),et.setRenderTarget(rt,1),et.render(nt,ot),et.setRenderTarget(rt,2),et.render(nt,at),et.setRenderTarget(rt,3),et.render(nt,st),et.setRenderTarget(rt,4),et.render(nt,lt),rt.texture.generateMipmaps=pt,et.setRenderTarget(rt,5),et.render(nt,ct),et.setRenderTarget(ut),et.toneMapping=ht,et.xr.enabled=dt,rt.texture.needsPMREMUpdate=!0}}class CubeTexture extends Texture{constructor(et,nt,rt,it,ot,at,st,lt,ct,ut){et=et!==void 0?et:[],nt=nt!==void 0?nt:CubeReflectionMapping,super(et,nt,rt,it,ot,at,st,lt,ct,ut),this.isCubeTexture=!0,this.flipY=!1}get images(){return this.image}set images(et){this.image=et}}class WebGLCubeRenderTarget extends WebGLRenderTarget{constructor(et,nt={}){super(et,et,nt),this.isWebGLCubeRenderTarget=!0;const rt={width:et,height:et,depth:1},it=[rt,rt,rt,rt,rt,rt];this.texture=new CubeTexture(it,nt.mapping,nt.wrapS,nt.wrapT,nt.magFilter,nt.minFilter,nt.format,nt.type,nt.anisotropy,nt.encoding),this.texture.isRenderTargetTexture=!0,this.texture.generateMipmaps=nt.generateMipmaps!==void 0?nt.generateMipmaps:!1,this.texture.minFilter=nt.minFilter!==void 0?nt.minFilter:LinearFilter}fromEquirectangularTexture(et,nt){this.texture.type=nt.type,this.texture.encoding=nt.encoding,this.texture.generateMipmaps=nt.generateMipmaps,this.texture.minFilter=nt.minFilter,this.texture.magFilter=nt.magFilter;const rt={uniforms:{tEquirect:{value:null}},vertexShader:` - - varying vec3 vWorldDirection; - - vec3 transformDirection( in vec3 dir, in mat4 matrix ) { - - return normalize( ( matrix * vec4( dir, 0.0 ) ).xyz ); - - } - - void main() { - - vWorldDirection = transformDirection( position, modelMatrix ); - - #include - #include - - } - `,fragmentShader:` - - uniform sampler2D tEquirect; - - varying vec3 vWorldDirection; - - #include - - void main() { - - vec3 direction = normalize( vWorldDirection ); - - vec2 sampleUV = equirectUv( direction ); + process$1.binding = function (tt) { + throw new Error('process.binding is not supported') + } + process$1.cwd = function () { + return '/' + } + process$1.chdir = function (tt) { + throw new Error('process.chdir is not supported') + } + process$1.umask = function () { + return 0 + } + var browserExports$1 = browser$d.exports + const Process = getDefaultExportFromCjs(browserExports$1) + globalThis.Buffer = buffer$2.Buffer + globalThis.process = Process + var jsxRuntime = { exports: {} }, + reactJsxRuntime_production_min = {}, + react$1 = { exports: {} }, + react_production_min = {} + /** + * @license React + * react.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ var l$8 = Symbol.for('react.element'), + n$9 = Symbol.for('react.portal'), + p$c = Symbol.for('react.fragment'), + q$9 = Symbol.for('react.strict_mode'), + r$d = Symbol.for('react.profiler'), + t$8 = Symbol.for('react.provider'), + u$7 = Symbol.for('react.context'), + v$b = Symbol.for('react.forward_ref'), + w$7 = Symbol.for('react.suspense'), + x$9 = Symbol.for('react.memo'), + y$9 = Symbol.for('react.lazy'), + z$8 = Symbol.iterator + function A$4(tt) { + return tt === null || typeof tt != 'object' + ? null + : ((tt = (z$8 && tt[z$8]) || tt['@@iterator']), typeof tt == 'function' ? tt : null) + } + var B$3 = { + isMounted: function () { + return !1 + }, + enqueueForceUpdate: function () {}, + enqueueReplaceState: function () {}, + enqueueSetState: function () {}, + }, + C$3 = Object.assign, + D$3 = {} + function E$3(tt, et, nt) { + ;(this.props = tt), (this.context = et), (this.refs = D$3), (this.updater = nt || B$3) + } + E$3.prototype.isReactComponent = {} + E$3.prototype.setState = function (tt, et) { + if (typeof tt != 'object' && typeof tt != 'function' && tt != null) + throw Error( + 'setState(...): takes an object of state variables to update or a function which returns an object of state variables.', + ) + this.updater.enqueueSetState(this, tt, et, 'setState') + } + E$3.prototype.forceUpdate = function (tt) { + this.updater.enqueueForceUpdate(this, tt, 'forceUpdate') + } + function F$3() {} + F$3.prototype = E$3.prototype + function G$4(tt, et, nt) { + ;(this.props = tt), (this.context = et), (this.refs = D$3), (this.updater = nt || B$3) + } + var H$4 = (G$4.prototype = new F$3()) + H$4.constructor = G$4 + C$3(H$4, E$3.prototype) + H$4.isPureReactComponent = !0 + var I$5 = Array.isArray, + J$3 = Object.prototype.hasOwnProperty, + K$8 = { current: null }, + L$4 = { key: !0, ref: !0, __self: !0, __source: !0 } + function M$4(tt, et, nt) { + var rt, + it = {}, + ot = null, + at = null + if (et != null) + for (rt in (et.ref !== void 0 && (at = et.ref), et.key !== void 0 && (ot = '' + et.key), et)) + J$3.call(et, rt) && !L$4.hasOwnProperty(rt) && (it[rt] = et[rt]) + var st = arguments.length - 2 + if (st === 1) it.children = nt + else if (1 < st) { + for (var lt = Array(st), ct = 0; ct < st; ct++) lt[ct] = arguments[ct + 2] + it.children = lt + } + if (tt && tt.defaultProps) for (rt in ((st = tt.defaultProps), st)) it[rt] === void 0 && (it[rt] = st[rt]) + return { $$typeof: l$8, type: tt, key: ot, ref: at, props: it, _owner: K$8.current } + } + function N$4(tt, et) { + return { $$typeof: l$8, type: tt.type, key: et, ref: tt.ref, props: tt.props, _owner: tt._owner } + } + function O$2(tt) { + return typeof tt == 'object' && tt !== null && tt.$$typeof === l$8 + } + function escape$1(tt) { + var et = { '=': '=0', ':': '=2' } + return ( + '$' + + tt.replace(/[=:]/g, function (nt) { + return et[nt] + }) + ) + } + var P$5 = /\/+/g + function Q$3(tt, et) { + return typeof tt == 'object' && tt !== null && tt.key != null ? escape$1('' + tt.key) : et.toString(36) + } + function R$3(tt, et, nt, rt, it) { + var ot = typeof tt + ;(ot === 'undefined' || ot === 'boolean') && (tt = null) + var at = !1 + if (tt === null) at = !0 + else + switch (ot) { + case 'string': + case 'number': + at = !0 + break + case 'object': + switch (tt.$$typeof) { + case l$8: + case n$9: + at = !0 + } + } + if (at) + return ( + (at = tt), + (it = it(at)), + (tt = rt === '' ? '.' + Q$3(at, 0) : rt), + I$5(it) + ? ((nt = ''), + tt != null && (nt = tt.replace(P$5, '$&/') + '/'), + R$3(it, et, nt, '', function (ct) { + return ct + })) + : it != null && + (O$2(it) && + (it = N$4( + it, + nt + (!it.key || (at && at.key === it.key) ? '' : ('' + it.key).replace(P$5, '$&/') + '/') + tt, + )), + et.push(it)), + 1 + ) + if (((at = 0), (rt = rt === '' ? '.' : rt + ':'), I$5(tt))) + for (var st = 0; st < tt.length; st++) { + ot = tt[st] + var lt = rt + Q$3(ot, st) + at += R$3(ot, et, nt, lt, it) + } + else if (((lt = A$4(tt)), typeof lt == 'function')) + for (tt = lt.call(tt), st = 0; !(ot = tt.next()).done; ) + (ot = ot.value), (lt = rt + Q$3(ot, st++)), (at += R$3(ot, et, nt, lt, it)) + else if (ot === 'object') + throw ( + ((et = String(tt)), + Error( + 'Objects are not valid as a React child (found: ' + + (et === '[object Object]' ? 'object with keys {' + Object.keys(tt).join(', ') + '}' : et) + + '). If you meant to render a collection of children, use an array instead.', + )) + ) + return at + } + function S$5(tt, et, nt) { + if (tt == null) return tt + var rt = [], + it = 0 + return ( + R$3(tt, rt, '', '', function (ot) { + return et.call(nt, ot, it++) + }), + rt + ) + } + function T$4(tt) { + if (tt._status === -1) { + var et = tt._result + ;(et = et()), + et.then( + function (nt) { + ;(tt._status === 0 || tt._status === -1) && ((tt._status = 1), (tt._result = nt)) + }, + function (nt) { + ;(tt._status === 0 || tt._status === -1) && ((tt._status = 2), (tt._result = nt)) + }, + ), + tt._status === -1 && ((tt._status = 0), (tt._result = et)) + } + if (tt._status === 1) return tt._result.default + throw tt._result + } + var U$4 = { current: null }, + V$5 = { transition: null }, + W$9 = { ReactCurrentDispatcher: U$4, ReactCurrentBatchConfig: V$5, ReactCurrentOwner: K$8 } + react_production_min.Children = { + map: S$5, + forEach: function (tt, et, nt) { + S$5( + tt, + function () { + et.apply(this, arguments) + }, + nt, + ) + }, + count: function (tt) { + var et = 0 + return ( + S$5(tt, function () { + et++ + }), + et + ) + }, + toArray: function (tt) { + return ( + S$5(tt, function (et) { + return et + }) || [] + ) + }, + only: function (tt) { + if (!O$2(tt)) throw Error('React.Children.only expected to receive a single React element child.') + return tt + }, + } + react_production_min.Component = E$3 + react_production_min.Fragment = p$c + react_production_min.Profiler = r$d + react_production_min.PureComponent = G$4 + react_production_min.StrictMode = q$9 + react_production_min.Suspense = w$7 + react_production_min.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = W$9 + react_production_min.cloneElement = function (tt, et, nt) { + if (tt == null) + throw Error('React.cloneElement(...): The argument must be a React element, but you passed ' + tt + '.') + var rt = C$3({}, tt.props), + it = tt.key, + ot = tt.ref, + at = tt._owner + if (et != null) { + if ( + (et.ref !== void 0 && ((ot = et.ref), (at = K$8.current)), + et.key !== void 0 && (it = '' + et.key), + tt.type && tt.type.defaultProps) + ) + var st = tt.type.defaultProps + for (lt in et) + J$3.call(et, lt) && !L$4.hasOwnProperty(lt) && (rt[lt] = et[lt] === void 0 && st !== void 0 ? st[lt] : et[lt]) + } + var lt = arguments.length - 2 + if (lt === 1) rt.children = nt + else if (1 < lt) { + st = Array(lt) + for (var ct = 0; ct < lt; ct++) st[ct] = arguments[ct + 2] + rt.children = st + } + return { $$typeof: l$8, type: tt.type, key: it, ref: ot, props: rt, _owner: at } + } + react_production_min.createContext = function (tt) { + return ( + (tt = { + $$typeof: u$7, + _currentValue: tt, + _currentValue2: tt, + _threadCount: 0, + Provider: null, + Consumer: null, + _defaultValue: null, + _globalName: null, + }), + (tt.Provider = { $$typeof: t$8, _context: tt }), + (tt.Consumer = tt) + ) + } + react_production_min.createElement = M$4 + react_production_min.createFactory = function (tt) { + var et = M$4.bind(null, tt) + return (et.type = tt), et + } + react_production_min.createRef = function () { + return { current: null } + } + react_production_min.forwardRef = function (tt) { + return { $$typeof: v$b, render: tt } + } + react_production_min.isValidElement = O$2 + react_production_min.lazy = function (tt) { + return { $$typeof: y$9, _payload: { _status: -1, _result: tt }, _init: T$4 } + } + react_production_min.memo = function (tt, et) { + return { $$typeof: x$9, type: tt, compare: et === void 0 ? null : et } + } + react_production_min.startTransition = function (tt) { + var et = V$5.transition + V$5.transition = {} + try { + tt() + } finally { + V$5.transition = et + } + } + react_production_min.unstable_act = function () { + throw Error('act(...) is not supported in production builds of React.') + } + react_production_min.useCallback = function (tt, et) { + return U$4.current.useCallback(tt, et) + } + react_production_min.useContext = function (tt) { + return U$4.current.useContext(tt) + } + react_production_min.useDebugValue = function () {} + react_production_min.useDeferredValue = function (tt) { + return U$4.current.useDeferredValue(tt) + } + react_production_min.useEffect = function (tt, et) { + return U$4.current.useEffect(tt, et) + } + react_production_min.useId = function () { + return U$4.current.useId() + } + react_production_min.useImperativeHandle = function (tt, et, nt) { + return U$4.current.useImperativeHandle(tt, et, nt) + } + react_production_min.useInsertionEffect = function (tt, et) { + return U$4.current.useInsertionEffect(tt, et) + } + react_production_min.useLayoutEffect = function (tt, et) { + return U$4.current.useLayoutEffect(tt, et) + } + react_production_min.useMemo = function (tt, et) { + return U$4.current.useMemo(tt, et) + } + react_production_min.useReducer = function (tt, et, nt) { + return U$4.current.useReducer(tt, et, nt) + } + react_production_min.useRef = function (tt) { + return U$4.current.useRef(tt) + } + react_production_min.useState = function (tt) { + return U$4.current.useState(tt) + } + react_production_min.useSyncExternalStore = function (tt, et, nt) { + return U$4.current.useSyncExternalStore(tt, et, nt) + } + react_production_min.useTransition = function () { + return U$4.current.useTransition() + } + react_production_min.version = '18.2.0' + react$1.exports = react_production_min + var reactExports = react$1.exports + const React$1 = getDefaultExportFromCjs(reactExports), + React$2 = _mergeNamespaces({ __proto__: null, default: React$1 }, [reactExports]) + /** + * @license React + * react-jsx-runtime.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ var f$9 = reactExports, + k$a = Symbol.for('react.element'), + l$7 = Symbol.for('react.fragment'), + m$b = Object.prototype.hasOwnProperty, + n$8 = f$9.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, + p$b = { key: !0, ref: !0, __self: !0, __source: !0 } + function q$8(tt, et, nt) { + var rt, + it = {}, + ot = null, + at = null + nt !== void 0 && (ot = '' + nt), et.key !== void 0 && (ot = '' + et.key), et.ref !== void 0 && (at = et.ref) + for (rt in et) m$b.call(et, rt) && !p$b.hasOwnProperty(rt) && (it[rt] = et[rt]) + if (tt && tt.defaultProps) for (rt in ((et = tt.defaultProps), et)) it[rt] === void 0 && (it[rt] = et[rt]) + return { $$typeof: k$a, type: tt, key: ot, ref: at, props: it, _owner: n$8.current } + } + reactJsxRuntime_production_min.Fragment = l$7 + reactJsxRuntime_production_min.jsx = q$8 + reactJsxRuntime_production_min.jsxs = q$8 + jsxRuntime.exports = reactJsxRuntime_production_min + var jsxRuntimeExports = jsxRuntime.exports, + client$1 = {}, + reactDom = { exports: {} }, + reactDom_production_min = {}, + scheduler$1 = { exports: {} }, + scheduler_production_min$1 = {} + /** + * @license React + * scheduler.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ ;(function (tt) { + function et(zt, Ft) { + var Nt = zt.length + zt.push(Ft) + e: for (; 0 < Nt; ) { + var Ut = (Nt - 1) >>> 1, + Mt = zt[Ut] + if (0 < it(Mt, Ft)) (zt[Ut] = Ft), (zt[Nt] = Mt), (Nt = Ut) + else break e + } + } + function nt(zt) { + return zt.length === 0 ? null : zt[0] + } + function rt(zt) { + if (zt.length === 0) return null + var Ft = zt[0], + Nt = zt.pop() + if (Nt !== Ft) { + zt[0] = Nt + e: for (var Ut = 0, Mt = zt.length, Ht = Mt >>> 1; Ut < Ht; ) { + var en = 2 * (Ut + 1) - 1, + sn = zt[en], + Kt = en + 1, + rn = zt[Kt] + if (0 > it(sn, Nt)) + Kt < Mt && 0 > it(rn, sn) + ? ((zt[Ut] = rn), (zt[Kt] = Nt), (Ut = Kt)) + : ((zt[Ut] = sn), (zt[en] = Nt), (Ut = en)) + else if (Kt < Mt && 0 > it(rn, Nt)) (zt[Ut] = rn), (zt[Kt] = Nt), (Ut = Kt) + else break e + } + } + return Ft + } + function it(zt, Ft) { + var Nt = zt.sortIndex - Ft.sortIndex + return Nt !== 0 ? Nt : zt.id - Ft.id + } + if (typeof performance == 'object' && typeof performance.now == 'function') { + var ot = performance + tt.unstable_now = function () { + return ot.now() + } + } else { + var at = Date, + st = at.now() + tt.unstable_now = function () { + return at.now() - st + } + } + var lt = [], + ct = [], + ut = 1, + ht = null, + dt = 3, + pt = !1, + mt = !1, + gt = !1, + yt = typeof setTimeout == 'function' ? setTimeout : null, + bt = typeof clearTimeout == 'function' ? clearTimeout : null, + vt = typeof setImmediate < 'u' ? setImmediate : null + typeof navigator < 'u' && + navigator.scheduling !== void 0 && + navigator.scheduling.isInputPending !== void 0 && + navigator.scheduling.isInputPending.bind(navigator.scheduling) + function xt(zt) { + for (var Ft = nt(ct); Ft !== null; ) { + if (Ft.callback === null) rt(ct) + else if (Ft.startTime <= zt) rt(ct), (Ft.sortIndex = Ft.expirationTime), et(lt, Ft) + else break + Ft = nt(ct) + } + } + function kt(zt) { + if (((gt = !1), xt(zt), !mt)) + if (nt(lt) !== null) (mt = !0), Ot(St) + else { + var Ft = nt(ct) + Ft !== null && Wt(kt, Ft.startTime - zt) + } + } + function St(zt, Ft) { + ;(mt = !1), gt && ((gt = !1), bt(Et), (Et = -1)), (pt = !0) + var Nt = dt + try { + for (xt(Ft), ht = nt(lt); ht !== null && (!(ht.expirationTime > Ft) || (zt && !jt())); ) { + var Ut = ht.callback + if (typeof Ut == 'function') { + ;(ht.callback = null), (dt = ht.priorityLevel) + var Mt = Ut(ht.expirationTime <= Ft) + ;(Ft = tt.unstable_now()), typeof Mt == 'function' ? (ht.callback = Mt) : ht === nt(lt) && rt(lt), xt(Ft) + } else rt(lt) + ht = nt(lt) + } + if (ht !== null) var Ht = !0 + else { + var en = nt(ct) + en !== null && Wt(kt, en.startTime - Ft), (Ht = !1) + } + return Ht + } finally { + ;(ht = null), (dt = Nt), (pt = !1) + } + } + var Tt = !1, + At = null, + Et = -1, + $t = 5, + Dt = -1 + function jt() { + return !(tt.unstable_now() - Dt < $t) + } + function Pt() { + if (At !== null) { + var zt = tt.unstable_now() + Dt = zt + var Ft = !0 + try { + Ft = At(!0, zt) + } finally { + Ft ? Ct() : ((Tt = !1), (At = null)) + } + } else Tt = !1 + } + var Ct + if (typeof vt == 'function') + Ct = function () { + vt(Pt) + } + else if (typeof MessageChannel < 'u') { + var wt = new MessageChannel(), + It = wt.port2 + ;(wt.port1.onmessage = Pt), + (Ct = function () { + It.postMessage(null) + }) + } else + Ct = function () { + yt(Pt, 0) + } + function Ot(zt) { + ;(At = zt), Tt || ((Tt = !0), Ct()) + } + function Wt(zt, Ft) { + Et = yt(function () { + zt(tt.unstable_now()) + }, Ft) + } + ;(tt.unstable_IdlePriority = 5), + (tt.unstable_ImmediatePriority = 1), + (tt.unstable_LowPriority = 4), + (tt.unstable_NormalPriority = 3), + (tt.unstable_Profiling = null), + (tt.unstable_UserBlockingPriority = 2), + (tt.unstable_cancelCallback = function (zt) { + zt.callback = null + }), + (tt.unstable_continueExecution = function () { + mt || pt || ((mt = !0), Ot(St)) + }), + (tt.unstable_forceFrameRate = function (zt) { + 0 > zt || 125 < zt + ? console.error( + 'forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported', + ) + : ($t = 0 < zt ? Math.floor(1e3 / zt) : 5) + }), + (tt.unstable_getCurrentPriorityLevel = function () { + return dt + }), + (tt.unstable_getFirstCallbackNode = function () { + return nt(lt) + }), + (tt.unstable_next = function (zt) { + switch (dt) { + case 1: + case 2: + case 3: + var Ft = 3 + break + default: + Ft = dt + } + var Nt = dt + dt = Ft + try { + return zt() + } finally { + dt = Nt + } + }), + (tt.unstable_pauseExecution = function () {}), + (tt.unstable_requestPaint = function () {}), + (tt.unstable_runWithPriority = function (zt, Ft) { + switch (zt) { + case 1: + case 2: + case 3: + case 4: + case 5: + break + default: + zt = 3 + } + var Nt = dt + dt = zt + try { + return Ft() + } finally { + dt = Nt + } + }), + (tt.unstable_scheduleCallback = function (zt, Ft, Nt) { + var Ut = tt.unstable_now() + switch ( + (typeof Nt == 'object' && Nt !== null + ? ((Nt = Nt.delay), (Nt = typeof Nt == 'number' && 0 < Nt ? Ut + Nt : Ut)) + : (Nt = Ut), + zt) + ) { + case 1: + var Mt = -1 + break + case 2: + Mt = 250 + break + case 5: + Mt = 1073741823 + break + case 4: + Mt = 1e4 + break + default: + Mt = 5e3 + } + return ( + (Mt = Nt + Mt), + (zt = { id: ut++, callback: Ft, priorityLevel: zt, startTime: Nt, expirationTime: Mt, sortIndex: -1 }), + Nt > Ut + ? ((zt.sortIndex = Nt), + et(ct, zt), + nt(lt) === null && zt === nt(ct) && (gt ? (bt(Et), (Et = -1)) : (gt = !0), Wt(kt, Nt - Ut))) + : ((zt.sortIndex = Mt), et(lt, zt), mt || pt || ((mt = !0), Ot(St))), + zt + ) + }), + (tt.unstable_shouldYield = jt), + (tt.unstable_wrapCallback = function (zt) { + var Ft = dt + return function () { + var Nt = dt + dt = Ft + try { + return zt.apply(this, arguments) + } finally { + dt = Nt + } + } + }) + })(scheduler_production_min$1) + scheduler$1.exports = scheduler_production_min$1 + var schedulerExports$1 = scheduler$1.exports + /** + * @license React + * react-dom.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ var aa = reactExports, + ca = schedulerExports$1 + function p$a(tt) { + for (var et = 'https://reactjs.org/docs/error-decoder.html?invariant=' + tt, nt = 1; nt < arguments.length; nt++) + et += '&args[]=' + encodeURIComponent(arguments[nt]) + return ( + 'Minified React error #' + + tt + + '; visit ' + + et + + ' for the full message or use the non-minified dev environment for full errors and additional helpful warnings.' + ) + } + var da = new Set(), + ea = {} + function fa(tt, et) { + ha(tt, et), ha(tt + 'Capture', et) + } + function ha(tt, et) { + for (ea[tt] = et, tt = 0; tt < et.length; tt++) da.add(et[tt]) + } + var ia = !(typeof window > 'u' || typeof window.document > 'u' || typeof window.document.createElement > 'u'), + ja = Object.prototype.hasOwnProperty, + ka$1 = + /^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/, + la = {}, + ma = {} + function oa(tt) { + return ja.call(ma, tt) ? !0 : ja.call(la, tt) ? !1 : ka$1.test(tt) ? (ma[tt] = !0) : ((la[tt] = !0), !1) + } + function pa(tt, et, nt, rt) { + if (nt !== null && nt.type === 0) return !1 + switch (typeof et) { + case 'function': + case 'symbol': + return !0 + case 'boolean': + return rt + ? !1 + : nt !== null + ? !nt.acceptsBooleans + : ((tt = tt.toLowerCase().slice(0, 5)), tt !== 'data-' && tt !== 'aria-') + default: + return !1 + } + } + function qa(tt, et, nt, rt) { + if (et === null || typeof et > 'u' || pa(tt, et, nt, rt)) return !0 + if (rt) return !1 + if (nt !== null) + switch (nt.type) { + case 3: + return !et + case 4: + return et === !1 + case 5: + return isNaN(et) + case 6: + return isNaN(et) || 1 > et + } + return !1 + } + function v$a(tt, et, nt, rt, it, ot, at) { + ;(this.acceptsBooleans = et === 2 || et === 3 || et === 4), + (this.attributeName = rt), + (this.attributeNamespace = it), + (this.mustUseProperty = nt), + (this.propertyName = tt), + (this.type = et), + (this.sanitizeURL = ot), + (this.removeEmptyString = at) + } + var z$7 = {} + 'children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style' + .split(' ') + .forEach(function (tt) { + z$7[tt] = new v$a(tt, 0, !1, tt, null, !1, !1) + }) + ;[ + ['acceptCharset', 'accept-charset'], + ['className', 'class'], + ['htmlFor', 'for'], + ['httpEquiv', 'http-equiv'], + ].forEach(function (tt) { + var et = tt[0] + z$7[et] = new v$a(et, 1, !1, tt[1], null, !1, !1) + }) + ;['contentEditable', 'draggable', 'spellCheck', 'value'].forEach(function (tt) { + z$7[tt] = new v$a(tt, 2, !1, tt.toLowerCase(), null, !1, !1) + }) + ;['autoReverse', 'externalResourcesRequired', 'focusable', 'preserveAlpha'].forEach(function (tt) { + z$7[tt] = new v$a(tt, 2, !1, tt, null, !1, !1) + }) + 'allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope' + .split(' ') + .forEach(function (tt) { + z$7[tt] = new v$a(tt, 3, !1, tt.toLowerCase(), null, !1, !1) + }) + ;['checked', 'multiple', 'muted', 'selected'].forEach(function (tt) { + z$7[tt] = new v$a(tt, 3, !0, tt, null, !1, !1) + }) + ;['capture', 'download'].forEach(function (tt) { + z$7[tt] = new v$a(tt, 4, !1, tt, null, !1, !1) + }) + ;['cols', 'rows', 'size', 'span'].forEach(function (tt) { + z$7[tt] = new v$a(tt, 6, !1, tt, null, !1, !1) + }) + ;['rowSpan', 'start'].forEach(function (tt) { + z$7[tt] = new v$a(tt, 5, !1, tt.toLowerCase(), null, !1, !1) + }) + var ra = /[\-:]([a-z])/g + function sa(tt) { + return tt[1].toUpperCase() + } + 'accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height' + .split(' ') + .forEach(function (tt) { + var et = tt.replace(ra, sa) + z$7[et] = new v$a(et, 1, !1, tt, null, !1, !1) + }) + 'xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type'.split(' ').forEach(function (tt) { + var et = tt.replace(ra, sa) + z$7[et] = new v$a(et, 1, !1, tt, 'http://www.w3.org/1999/xlink', !1, !1) + }) + ;['xml:base', 'xml:lang', 'xml:space'].forEach(function (tt) { + var et = tt.replace(ra, sa) + z$7[et] = new v$a(et, 1, !1, tt, 'http://www.w3.org/XML/1998/namespace', !1, !1) + }) + ;['tabIndex', 'crossOrigin'].forEach(function (tt) { + z$7[tt] = new v$a(tt, 1, !1, tt.toLowerCase(), null, !1, !1) + }) + z$7.xlinkHref = new v$a('xlinkHref', 1, !1, 'xlink:href', 'http://www.w3.org/1999/xlink', !0, !1) + ;['src', 'href', 'action', 'formAction'].forEach(function (tt) { + z$7[tt] = new v$a(tt, 1, !1, tt.toLowerCase(), null, !0, !0) + }) + function ta(tt, et, nt, rt) { + var it = z$7.hasOwnProperty(et) ? z$7[et] : null + ;(it !== null + ? it.type !== 0 + : rt || !(2 < et.length) || (et[0] !== 'o' && et[0] !== 'O') || (et[1] !== 'n' && et[1] !== 'N')) && + (qa(et, nt, it, rt) && (nt = null), + rt || it === null + ? oa(et) && (nt === null ? tt.removeAttribute(et) : tt.setAttribute(et, '' + nt)) + : it.mustUseProperty + ? (tt[it.propertyName] = nt === null ? (it.type === 3 ? !1 : '') : nt) + : ((et = it.attributeName), + (rt = it.attributeNamespace), + nt === null + ? tt.removeAttribute(et) + : ((it = it.type), + (nt = it === 3 || (it === 4 && nt === !0) ? '' : '' + nt), + rt ? tt.setAttributeNS(rt, et, nt) : tt.setAttribute(et, nt)))) + } + var ua = aa.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED, + va = Symbol.for('react.element'), + wa = Symbol.for('react.portal'), + ya = Symbol.for('react.fragment'), + za = Symbol.for('react.strict_mode'), + Aa = Symbol.for('react.profiler'), + Ba = Symbol.for('react.provider'), + Ca = Symbol.for('react.context'), + Da = Symbol.for('react.forward_ref'), + Ea = Symbol.for('react.suspense'), + Fa = Symbol.for('react.suspense_list'), + Ga = Symbol.for('react.memo'), + Ha = Symbol.for('react.lazy'), + Ia = Symbol.for('react.offscreen'), + Ja = Symbol.iterator + function Ka(tt) { + return tt === null || typeof tt != 'object' + ? null + : ((tt = (Ja && tt[Ja]) || tt['@@iterator']), typeof tt == 'function' ? tt : null) + } + var A$3 = Object.assign, + La + function Ma(tt) { + if (La === void 0) + try { + throw Error() + } catch (nt) { + var et = nt.stack.trim().match(/\n( *(at )?)/) + La = (et && et[1]) || '' + } + return ( + ` +` + + La + + tt + ) + } + var Na = !1 + function Oa(tt, et) { + if (!tt || Na) return '' + Na = !0 + var nt = Error.prepareStackTrace + Error.prepareStackTrace = void 0 + try { + if (et) + if ( + ((et = function () { + throw Error() + }), + Object.defineProperty(et.prototype, 'props', { + set: function () { + throw Error() + }, + }), + typeof Reflect == 'object' && Reflect.construct) + ) { + try { + Reflect.construct(et, []) + } catch (ct) { + var rt = ct + } + Reflect.construct(tt, [], et) + } else { + try { + et.call() + } catch (ct) { + rt = ct + } + tt.call(et.prototype) + } + else { + try { + throw Error() + } catch (ct) { + rt = ct + } + tt() + } + } catch (ct) { + if (ct && rt && typeof ct.stack == 'string') { + for ( + var it = ct.stack.split(` +`), + ot = rt.stack.split(` +`), + at = it.length - 1, + st = ot.length - 1; + 1 <= at && 0 <= st && it[at] !== ot[st]; - gl_FragColor = texture2D( tEquirect, sampleUV ); + ) + st-- + for (; 1 <= at && 0 <= st; at--, st--) + if (it[at] !== ot[st]) { + if (at !== 1 || st !== 1) + do + if ((at--, st--, 0 > st || it[at] !== ot[st])) { + var lt = + ` +` + it[at].replace(' at new ', ' at ') + return ( + tt.displayName && lt.includes('') && (lt = lt.replace('', tt.displayName)), lt + ) + } + while (1 <= at && 0 <= st) + break + } + } + } finally { + ;(Na = !1), (Error.prepareStackTrace = nt) + } + return (tt = tt ? tt.displayName || tt.name : '') ? Ma(tt) : '' + } + function Pa(tt) { + switch (tt.tag) { + case 5: + return Ma(tt.type) + case 16: + return Ma('Lazy') + case 13: + return Ma('Suspense') + case 19: + return Ma('SuspenseList') + case 0: + case 2: + case 15: + return (tt = Oa(tt.type, !1)), tt + case 11: + return (tt = Oa(tt.type.render, !1)), tt + case 1: + return (tt = Oa(tt.type, !0)), tt + default: + return '' + } + } + function Qa(tt) { + if (tt == null) return null + if (typeof tt == 'function') return tt.displayName || tt.name || null + if (typeof tt == 'string') return tt + switch (tt) { + case ya: + return 'Fragment' + case wa: + return 'Portal' + case Aa: + return 'Profiler' + case za: + return 'StrictMode' + case Ea: + return 'Suspense' + case Fa: + return 'SuspenseList' + } + if (typeof tt == 'object') + switch (tt.$$typeof) { + case Ca: + return (tt.displayName || 'Context') + '.Consumer' + case Ba: + return (tt._context.displayName || 'Context') + '.Provider' + case Da: + var et = tt.render + return ( + (tt = tt.displayName), + tt || ((tt = et.displayName || et.name || ''), (tt = tt !== '' ? 'ForwardRef(' + tt + ')' : 'ForwardRef')), + tt + ) + case Ga: + return (et = tt.displayName || null), et !== null ? et : Qa(tt.type) || 'Memo' + case Ha: + ;(et = tt._payload), (tt = tt._init) + try { + return Qa(tt(et)) + } catch {} + } + return null + } + function Ra(tt) { + var et = tt.type + switch (tt.tag) { + case 24: + return 'Cache' + case 9: + return (et.displayName || 'Context') + '.Consumer' + case 10: + return (et._context.displayName || 'Context') + '.Provider' + case 18: + return 'DehydratedFragment' + case 11: + return ( + (tt = et.render), + (tt = tt.displayName || tt.name || ''), + et.displayName || (tt !== '' ? 'ForwardRef(' + tt + ')' : 'ForwardRef') + ) + case 7: + return 'Fragment' + case 5: + return et + case 4: + return 'Portal' + case 3: + return 'Root' + case 6: + return 'Text' + case 16: + return Qa(et) + case 8: + return et === za ? 'StrictMode' : 'Mode' + case 22: + return 'Offscreen' + case 12: + return 'Profiler' + case 21: + return 'Scope' + case 13: + return 'Suspense' + case 19: + return 'SuspenseList' + case 25: + return 'TracingMarker' + case 1: + case 0: + case 17: + case 2: + case 14: + case 15: + if (typeof et == 'function') return et.displayName || et.name || null + if (typeof et == 'string') return et + } + return null + } + function Sa(tt) { + switch (typeof tt) { + case 'boolean': + case 'number': + case 'string': + case 'undefined': + return tt + case 'object': + return tt + default: + return '' + } + } + function Ta(tt) { + var et = tt.type + return (tt = tt.nodeName) && tt.toLowerCase() === 'input' && (et === 'checkbox' || et === 'radio') + } + function Ua(tt) { + var et = Ta(tt) ? 'checked' : 'value', + nt = Object.getOwnPropertyDescriptor(tt.constructor.prototype, et), + rt = '' + tt[et] + if (!tt.hasOwnProperty(et) && typeof nt < 'u' && typeof nt.get == 'function' && typeof nt.set == 'function') { + var it = nt.get, + ot = nt.set + return ( + Object.defineProperty(tt, et, { + configurable: !0, + get: function () { + return it.call(this) + }, + set: function (at) { + ;(rt = '' + at), ot.call(this, at) + }, + }), + Object.defineProperty(tt, et, { enumerable: nt.enumerable }), + { + getValue: function () { + return rt + }, + setValue: function (at) { + rt = '' + at + }, + stopTracking: function () { + ;(tt._valueTracker = null), delete tt[et] + }, + } + ) + } + } + function Va(tt) { + tt._valueTracker || (tt._valueTracker = Ua(tt)) + } + function Wa(tt) { + if (!tt) return !1 + var et = tt._valueTracker + if (!et) return !0 + var nt = et.getValue(), + rt = '' + return ( + tt && (rt = Ta(tt) ? (tt.checked ? 'true' : 'false') : tt.value), + (tt = rt), + tt !== nt ? (et.setValue(tt), !0) : !1 + ) + } + function Xa(tt) { + if (((tt = tt || (typeof document < 'u' ? document : void 0)), typeof tt > 'u')) return null + try { + return tt.activeElement || tt.body + } catch { + return tt.body + } + } + function Ya(tt, et) { + var nt = et.checked + return A$3({}, et, { + defaultChecked: void 0, + defaultValue: void 0, + value: void 0, + checked: nt ?? tt._wrapperState.initialChecked, + }) + } + function Za(tt, et) { + var nt = et.defaultValue == null ? '' : et.defaultValue, + rt = et.checked != null ? et.checked : et.defaultChecked + ;(nt = Sa(et.value != null ? et.value : nt)), + (tt._wrapperState = { + initialChecked: rt, + initialValue: nt, + controlled: et.type === 'checkbox' || et.type === 'radio' ? et.checked != null : et.value != null, + }) + } + function ab(tt, et) { + ;(et = et.checked), et != null && ta(tt, 'checked', et, !1) + } + function bb(tt, et) { + ab(tt, et) + var nt = Sa(et.value), + rt = et.type + if (nt != null) + rt === 'number' + ? ((nt === 0 && tt.value === '') || tt.value != nt) && (tt.value = '' + nt) + : tt.value !== '' + nt && (tt.value = '' + nt) + else if (rt === 'submit' || rt === 'reset') { + tt.removeAttribute('value') + return + } + et.hasOwnProperty('value') + ? cb(tt, et.type, nt) + : et.hasOwnProperty('defaultValue') && cb(tt, et.type, Sa(et.defaultValue)), + et.checked == null && et.defaultChecked != null && (tt.defaultChecked = !!et.defaultChecked) + } + function db(tt, et, nt) { + if (et.hasOwnProperty('value') || et.hasOwnProperty('defaultValue')) { + var rt = et.type + if (!((rt !== 'submit' && rt !== 'reset') || (et.value !== void 0 && et.value !== null))) return + ;(et = '' + tt._wrapperState.initialValue), nt || et === tt.value || (tt.value = et), (tt.defaultValue = et) + } + ;(nt = tt.name), + nt !== '' && (tt.name = ''), + (tt.defaultChecked = !!tt._wrapperState.initialChecked), + nt !== '' && (tt.name = nt) + } + function cb(tt, et, nt) { + ;(et !== 'number' || Xa(tt.ownerDocument) !== tt) && + (nt == null + ? (tt.defaultValue = '' + tt._wrapperState.initialValue) + : tt.defaultValue !== '' + nt && (tt.defaultValue = '' + nt)) + } + var eb = Array.isArray + function fb(tt, et, nt, rt) { + if (((tt = tt.options), et)) { + et = {} + for (var it = 0; it < nt.length; it++) et['$' + nt[it]] = !0 + for (nt = 0; nt < tt.length; nt++) + (it = et.hasOwnProperty('$' + tt[nt].value)), + tt[nt].selected !== it && (tt[nt].selected = it), + it && rt && (tt[nt].defaultSelected = !0) + } else { + for (nt = '' + Sa(nt), et = null, it = 0; it < tt.length; it++) { + if (tt[it].value === nt) { + ;(tt[it].selected = !0), rt && (tt[it].defaultSelected = !0) + return + } + et !== null || tt[it].disabled || (et = tt[it]) + } + et !== null && (et.selected = !0) + } + } + function gb(tt, et) { + if (et.dangerouslySetInnerHTML != null) throw Error(p$a(91)) + return A$3({}, et, { value: void 0, defaultValue: void 0, children: '' + tt._wrapperState.initialValue }) + } + function hb(tt, et) { + var nt = et.value + if (nt == null) { + if (((nt = et.children), (et = et.defaultValue), nt != null)) { + if (et != null) throw Error(p$a(92)) + if (eb(nt)) { + if (1 < nt.length) throw Error(p$a(93)) + nt = nt[0] + } + et = nt + } + et == null && (et = ''), (nt = et) + } + tt._wrapperState = { initialValue: Sa(nt) } + } + function ib(tt, et) { + var nt = Sa(et.value), + rt = Sa(et.defaultValue) + nt != null && + ((nt = '' + nt), + nt !== tt.value && (tt.value = nt), + et.defaultValue == null && tt.defaultValue !== nt && (tt.defaultValue = nt)), + rt != null && (tt.defaultValue = '' + rt) + } + function jb(tt) { + var et = tt.textContent + et === tt._wrapperState.initialValue && et !== '' && et !== null && (tt.value = et) + } + function kb(tt) { + switch (tt) { + case 'svg': + return 'http://www.w3.org/2000/svg' + case 'math': + return 'http://www.w3.org/1998/Math/MathML' + default: + return 'http://www.w3.org/1999/xhtml' + } + } + function lb(tt, et) { + return tt == null || tt === 'http://www.w3.org/1999/xhtml' + ? kb(et) + : tt === 'http://www.w3.org/2000/svg' && et === 'foreignObject' + ? 'http://www.w3.org/1999/xhtml' + : tt + } + var mb, + nb = (function (tt) { + return typeof MSApp < 'u' && MSApp.execUnsafeLocalFunction + ? function (et, nt, rt, it) { + MSApp.execUnsafeLocalFunction(function () { + return tt(et, nt, rt, it) + }) + } + : tt + })(function (tt, et) { + if (tt.namespaceURI !== 'http://www.w3.org/2000/svg' || 'innerHTML' in tt) tt.innerHTML = et + else { + for ( + mb = mb || document.createElement('div'), + mb.innerHTML = '' + et.valueOf().toString() + '', + et = mb.firstChild; + tt.firstChild; - } - `},it=new BoxGeometry(5,5,5),ot=new ShaderMaterial({name:"CubemapFromEquirect",uniforms:cloneUniforms(rt.uniforms),vertexShader:rt.vertexShader,fragmentShader:rt.fragmentShader,side:BackSide,blending:NoBlending});ot.uniforms.tEquirect.value=nt;const at=new Mesh(it,ot),st=nt.minFilter;return nt.minFilter===LinearMipmapLinearFilter&&(nt.minFilter=LinearFilter),new CubeCamera(1,10,this).update(et,at),nt.minFilter=st,at.geometry.dispose(),at.material.dispose(),this}clear(et,nt,rt,it){const ot=et.getRenderTarget();for(let at=0;at<6;at++)et.setRenderTarget(this,at),et.clear(nt,rt,it);et.setRenderTarget(ot)}}const _vector1=new Vector3,_vector2=new Vector3,_normalMatrix=new Matrix3;class Plane{constructor(et=new Vector3(1,0,0),nt=0){this.isPlane=!0,this.normal=et,this.constant=nt}set(et,nt){return this.normal.copy(et),this.constant=nt,this}setComponents(et,nt,rt,it){return this.normal.set(et,nt,rt),this.constant=it,this}setFromNormalAndCoplanarPoint(et,nt){return this.normal.copy(et),this.constant=-nt.dot(this.normal),this}setFromCoplanarPoints(et,nt,rt){const it=_vector1.subVectors(rt,nt).cross(_vector2.subVectors(et,nt)).normalize();return this.setFromNormalAndCoplanarPoint(it,et),this}copy(et){return this.normal.copy(et.normal),this.constant=et.constant,this}normalize(){const et=1/this.normal.length();return this.normal.multiplyScalar(et),this.constant*=et,this}negate(){return this.constant*=-1,this.normal.negate(),this}distanceToPoint(et){return this.normal.dot(et)+this.constant}distanceToSphere(et){return this.distanceToPoint(et.center)-et.radius}projectPoint(et,nt){return nt.copy(this.normal).multiplyScalar(-this.distanceToPoint(et)).add(et)}intersectLine(et,nt){const rt=et.delta(_vector1),it=this.normal.dot(rt);if(it===0)return this.distanceToPoint(et.start)===0?nt.copy(et.start):null;const ot=-(et.start.dot(this.normal)+this.constant)/it;return ot<0||ot>1?null:nt.copy(rt).multiplyScalar(ot).add(et.start)}intersectsLine(et){const nt=this.distanceToPoint(et.start),rt=this.distanceToPoint(et.end);return nt<0&&rt>0||rt<0&&nt>0}intersectsBox(et){return et.intersectsPlane(this)}intersectsSphere(et){return et.intersectsPlane(this)}coplanarPoint(et){return et.copy(this.normal).multiplyScalar(-this.constant)}applyMatrix4(et,nt){const rt=nt||_normalMatrix.getNormalMatrix(et),it=this.coplanarPoint(_vector1).applyMatrix4(et),ot=this.normal.applyMatrix3(rt).normalize();return this.constant=-it.dot(ot),this}translate(et){return this.constant-=et.dot(this.normal),this}equals(et){return et.normal.equals(this.normal)&&et.constant===this.constant}clone(){return new this.constructor().copy(this)}}const _sphere$2=new Sphere,_vector$7=new Vector3;class Frustum{constructor(et=new Plane,nt=new Plane,rt=new Plane,it=new Plane,ot=new Plane,at=new Plane){this.planes=[et,nt,rt,it,ot,at]}set(et,nt,rt,it,ot,at){const st=this.planes;return st[0].copy(et),st[1].copy(nt),st[2].copy(rt),st[3].copy(it),st[4].copy(ot),st[5].copy(at),this}copy(et){const nt=this.planes;for(let rt=0;rt<6;rt++)nt[rt].copy(et.planes[rt]);return this}setFromProjectionMatrix(et){const nt=this.planes,rt=et.elements,it=rt[0],ot=rt[1],at=rt[2],st=rt[3],lt=rt[4],ct=rt[5],ut=rt[6],ht=rt[7],dt=rt[8],pt=rt[9],mt=rt[10],gt=rt[11],yt=rt[12],bt=rt[13],vt=rt[14],xt=rt[15];return nt[0].setComponents(st-it,ht-lt,gt-dt,xt-yt).normalize(),nt[1].setComponents(st+it,ht+lt,gt+dt,xt+yt).normalize(),nt[2].setComponents(st+ot,ht+ct,gt+pt,xt+bt).normalize(),nt[3].setComponents(st-ot,ht-ct,gt-pt,xt-bt).normalize(),nt[4].setComponents(st-at,ht-ut,gt-mt,xt-vt).normalize(),nt[5].setComponents(st+at,ht+ut,gt+mt,xt+vt).normalize(),this}intersectsObject(et){const nt=et.geometry;return nt.boundingSphere===null&&nt.computeBoundingSphere(),_sphere$2.copy(nt.boundingSphere).applyMatrix4(et.matrixWorld),this.intersectsSphere(_sphere$2)}intersectsSprite(et){return _sphere$2.center.set(0,0,0),_sphere$2.radius=.7071067811865476,_sphere$2.applyMatrix4(et.matrixWorld),this.intersectsSphere(_sphere$2)}intersectsSphere(et){const nt=this.planes,rt=et.center,it=-et.radius;for(let ot=0;ot<6;ot++)if(nt[ot].distanceToPoint(rt)0?et.max.x:et.min.x,_vector$7.y=it.normal.y>0?et.max.y:et.min.y,_vector$7.z=it.normal.z>0?et.max.z:et.min.z,it.distanceToPoint(_vector$7)<0)return!1}return!0}containsPoint(et){const nt=this.planes;for(let rt=0;rt<6;rt++)if(nt[rt].distanceToPoint(et)<0)return!1;return!0}clone(){return new this.constructor().copy(this)}}function WebGLAnimation(){let tt=null,et=!1,nt=null,rt=null;function it(ot,at){nt(ot,at),rt=tt.requestAnimationFrame(it)}return{start:function(){et!==!0&&nt!==null&&(rt=tt.requestAnimationFrame(it),et=!0)},stop:function(){tt.cancelAnimationFrame(rt),et=!1},setAnimationLoop:function(ot){nt=ot},setContext:function(ot){tt=ot}}}function WebGLAttributes(tt,et){const nt=et.isWebGL2,rt=new WeakMap;function it(ct,ut){const ht=ct.array,dt=ct.usage,pt=tt.createBuffer();tt.bindBuffer(ut,pt),tt.bufferData(ut,ht,dt),ct.onUploadCallback();let mt;if(ht instanceof Float32Array)mt=5126;else if(ht instanceof Uint16Array)if(ct.isFloat16BufferAttribute)if(nt)mt=5131;else throw new Error("THREE.WebGLAttributes: Usage of Float16BufferAttribute requires WebGL2.");else mt=5123;else if(ht instanceof Int16Array)mt=5122;else if(ht instanceof Uint32Array)mt=5125;else if(ht instanceof Int32Array)mt=5124;else if(ht instanceof Int8Array)mt=5120;else if(ht instanceof Uint8Array)mt=5121;else if(ht instanceof Uint8ClampedArray)mt=5121;else throw new Error("THREE.WebGLAttributes: Unsupported buffer data format: "+ht);return{buffer:pt,type:mt,bytesPerElement:ht.BYTES_PER_ELEMENT,version:ct.version}}function ot(ct,ut,ht){const dt=ut.array,pt=ut.updateRange;tt.bindBuffer(ht,ct),pt.count===-1?tt.bufferSubData(ht,0,dt):(nt?tt.bufferSubData(ht,pt.offset*dt.BYTES_PER_ELEMENT,dt,pt.offset,pt.count):tt.bufferSubData(ht,pt.offset*dt.BYTES_PER_ELEMENT,dt.subarray(pt.offset,pt.offset+pt.count)),pt.count=-1)}function at(ct){return ct.isInterleavedBufferAttribute&&(ct=ct.data),rt.get(ct)}function st(ct){ct.isInterleavedBufferAttribute&&(ct=ct.data);const ut=rt.get(ct);ut&&(tt.deleteBuffer(ut.buffer),rt.delete(ct))}function lt(ct,ut){if(ct.isGLBufferAttribute){const dt=rt.get(ct);(!dt||dt.version>>= 0), tt === 0 ? 32 : (31 - ((pc(tt) / qc) | 0)) | 0 + } + var rc = 64, + sc = 4194304 + function tc(tt) { + switch (tt & -tt) { + case 1: + return 1 + case 2: + return 2 + case 4: + return 4 + case 8: + return 8 + case 16: + return 16 + case 32: + return 32 + case 64: + case 128: + case 256: + case 512: + case 1024: + case 2048: + case 4096: + case 8192: + case 16384: + case 32768: + case 65536: + case 131072: + case 262144: + case 524288: + case 1048576: + case 2097152: + return tt & 4194240 + case 4194304: + case 8388608: + case 16777216: + case 33554432: + case 67108864: + return tt & 130023424 + case 134217728: + return 134217728 + case 268435456: + return 268435456 + case 536870912: + return 536870912 + case 1073741824: + return 1073741824 + default: + return tt + } + } + function uc(tt, et) { + var nt = tt.pendingLanes + if (nt === 0) return 0 + var rt = 0, + it = tt.suspendedLanes, + ot = tt.pingedLanes, + at = nt & 268435455 + if (at !== 0) { + var st = at & ~it + st !== 0 ? (rt = tc(st)) : ((ot &= at), ot !== 0 && (rt = tc(ot))) + } else (at = nt & ~it), at !== 0 ? (rt = tc(at)) : ot !== 0 && (rt = tc(ot)) + if (rt === 0) return 0 + if ( + et !== 0 && + et !== rt && + !(et & it) && + ((it = rt & -rt), (ot = et & -et), it >= ot || (it === 16 && (ot & 4194240) !== 0)) + ) + return et + if ((rt & 4 && (rt |= nt & 16), (et = tt.entangledLanes), et !== 0)) + for (tt = tt.entanglements, et &= rt; 0 < et; ) (nt = 31 - oc(et)), (it = 1 << nt), (rt |= tt[nt]), (et &= ~it) + return rt + } + function vc(tt, et) { + switch (tt) { + case 1: + case 2: + case 4: + return et + 250 + case 8: + case 16: + case 32: + case 64: + case 128: + case 256: + case 512: + case 1024: + case 2048: + case 4096: + case 8192: + case 16384: + case 32768: + case 65536: + case 131072: + case 262144: + case 524288: + case 1048576: + case 2097152: + return et + 5e3 + case 4194304: + case 8388608: + case 16777216: + case 33554432: + case 67108864: + return -1 + case 134217728: + case 268435456: + case 536870912: + case 1073741824: + return -1 + default: + return -1 + } + } + function wc(tt, et) { + for (var nt = tt.suspendedLanes, rt = tt.pingedLanes, it = tt.expirationTimes, ot = tt.pendingLanes; 0 < ot; ) { + var at = 31 - oc(ot), + st = 1 << at, + lt = it[at] + lt === -1 ? (!(st & nt) || st & rt) && (it[at] = vc(st, et)) : lt <= et && (tt.expiredLanes |= st), (ot &= ~st) + } + } + function xc(tt) { + return (tt = tt.pendingLanes & -1073741825), tt !== 0 ? tt : tt & 1073741824 ? 1073741824 : 0 + } + function yc() { + var tt = rc + return (rc <<= 1), !(rc & 4194240) && (rc = 64), tt + } + function zc(tt) { + for (var et = [], nt = 0; 31 > nt; nt++) et.push(tt) + return et + } + function Ac(tt, et, nt) { + ;(tt.pendingLanes |= et), + et !== 536870912 && ((tt.suspendedLanes = 0), (tt.pingedLanes = 0)), + (tt = tt.eventTimes), + (et = 31 - oc(et)), + (tt[et] = nt) + } + function Bc(tt, et) { + var nt = tt.pendingLanes & ~et + ;(tt.pendingLanes = et), + (tt.suspendedLanes = 0), + (tt.pingedLanes = 0), + (tt.expiredLanes &= et), + (tt.mutableReadLanes &= et), + (tt.entangledLanes &= et), + (et = tt.entanglements) + var rt = tt.eventTimes + for (tt = tt.expirationTimes; 0 < nt; ) { + var it = 31 - oc(nt), + ot = 1 << it + ;(et[it] = 0), (rt[it] = -1), (tt[it] = -1), (nt &= ~ot) + } + } + function Cc(tt, et) { + var nt = (tt.entangledLanes |= et) + for (tt = tt.entanglements; nt; ) { + var rt = 31 - oc(nt), + it = 1 << rt + ;(it & et) | (tt[rt] & et) && (tt[rt] |= et), (nt &= ~it) + } + } + var C$2 = 0 + function Dc(tt) { + return (tt &= -tt), 1 < tt ? (4 < tt ? (tt & 268435455 ? 16 : 536870912) : 4) : 1 + } + var Ec, + Fc, + Gc, + Hc, + Ic, + Jc = !1, + Kc = [], + Lc = null, + Mc = null, + Nc = null, + Oc = new Map(), + Pc = new Map(), + Qc = [], + Rc = + 'mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit'.split( + ' ', + ) + function Sc(tt, et) { + switch (tt) { + case 'focusin': + case 'focusout': + Lc = null + break + case 'dragenter': + case 'dragleave': + Mc = null + break + case 'mouseover': + case 'mouseout': + Nc = null + break + case 'pointerover': + case 'pointerout': + Oc.delete(et.pointerId) + break + case 'gotpointercapture': + case 'lostpointercapture': + Pc.delete(et.pointerId) + } + } + function Tc(tt, et, nt, rt, it, ot) { + return tt === null || tt.nativeEvent !== ot + ? ((tt = { blockedOn: et, domEventName: nt, eventSystemFlags: rt, nativeEvent: ot, targetContainers: [it] }), + et !== null && ((et = Cb(et)), et !== null && Fc(et)), + tt) + : ((tt.eventSystemFlags |= rt), + (et = tt.targetContainers), + it !== null && et.indexOf(it) === -1 && et.push(it), + tt) + } + function Uc(tt, et, nt, rt, it) { + switch (et) { + case 'focusin': + return (Lc = Tc(Lc, tt, et, nt, rt, it)), !0 + case 'dragenter': + return (Mc = Tc(Mc, tt, et, nt, rt, it)), !0 + case 'mouseover': + return (Nc = Tc(Nc, tt, et, nt, rt, it)), !0 + case 'pointerover': + var ot = it.pointerId + return Oc.set(ot, Tc(Oc.get(ot) || null, tt, et, nt, rt, it)), !0 + case 'gotpointercapture': + return (ot = it.pointerId), Pc.set(ot, Tc(Pc.get(ot) || null, tt, et, nt, rt, it)), !0 + } + return !1 + } + function Vc(tt) { + var et = Wc(tt.target) + if (et !== null) { + var nt = Vb(et) + if (nt !== null) { + if (((et = nt.tag), et === 13)) { + if (((et = Wb(nt)), et !== null)) { + ;(tt.blockedOn = et), + Ic(tt.priority, function () { + Gc(nt) + }) + return + } + } else if (et === 3 && nt.stateNode.current.memoizedState.isDehydrated) { + tt.blockedOn = nt.tag === 3 ? nt.stateNode.containerInfo : null + return + } + } + } + tt.blockedOn = null + } + function Xc(tt) { + if (tt.blockedOn !== null) return !1 + for (var et = tt.targetContainers; 0 < et.length; ) { + var nt = Yc(tt.domEventName, tt.eventSystemFlags, et[0], tt.nativeEvent) + if (nt === null) { + nt = tt.nativeEvent + var rt = new nt.constructor(nt.type, nt) + ;(wb = rt), nt.target.dispatchEvent(rt), (wb = null) + } else return (et = Cb(nt)), et !== null && Fc(et), (tt.blockedOn = nt), !1 + et.shift() + } + return !0 + } + function Zc(tt, et, nt) { + Xc(tt) && nt.delete(et) + } + function $c() { + ;(Jc = !1), + Lc !== null && Xc(Lc) && (Lc = null), + Mc !== null && Xc(Mc) && (Mc = null), + Nc !== null && Xc(Nc) && (Nc = null), + Oc.forEach(Zc), + Pc.forEach(Zc) + } + function ad(tt, et) { + tt.blockedOn === et && + ((tt.blockedOn = null), Jc || ((Jc = !0), ca.unstable_scheduleCallback(ca.unstable_NormalPriority, $c))) + } + function bd(tt) { + function et(it) { + return ad(it, tt) + } + if (0 < Kc.length) { + ad(Kc[0], tt) + for (var nt = 1; nt < Kc.length; nt++) { + var rt = Kc[nt] + rt.blockedOn === tt && (rt.blockedOn = null) + } + } + for ( + Lc !== null && ad(Lc, tt), + Mc !== null && ad(Mc, tt), + Nc !== null && ad(Nc, tt), + Oc.forEach(et), + Pc.forEach(et), + nt = 0; + nt < Qc.length; + nt++ + ) + (rt = Qc[nt]), rt.blockedOn === tt && (rt.blockedOn = null) + for (; 0 < Qc.length && ((nt = Qc[0]), nt.blockedOn === null); ) Vc(nt), nt.blockedOn === null && Qc.shift() + } + var cd = ua.ReactCurrentBatchConfig, + dd = !0 + function ed(tt, et, nt, rt) { + var it = C$2, + ot = cd.transition + cd.transition = null + try { + ;(C$2 = 1), fd(tt, et, nt, rt) + } finally { + ;(C$2 = it), (cd.transition = ot) + } + } + function gd(tt, et, nt, rt) { + var it = C$2, + ot = cd.transition + cd.transition = null + try { + ;(C$2 = 4), fd(tt, et, nt, rt) + } finally { + ;(C$2 = it), (cd.transition = ot) + } + } + function fd(tt, et, nt, rt) { + if (dd) { + var it = Yc(tt, et, nt, rt) + if (it === null) hd(tt, et, rt, id$2, nt), Sc(tt, rt) + else if (Uc(it, tt, et, nt, rt)) rt.stopPropagation() + else if ((Sc(tt, rt), et & 4 && -1 < Rc.indexOf(tt))) { + for (; it !== null; ) { + var ot = Cb(it) + if ((ot !== null && Ec(ot), (ot = Yc(tt, et, nt, rt)), ot === null && hd(tt, et, rt, id$2, nt), ot === it)) + break + it = ot + } + it !== null && rt.stopPropagation() + } else hd(tt, et, rt, null, nt) + } + } + var id$2 = null + function Yc(tt, et, nt, rt) { + if (((id$2 = null), (tt = xb(rt)), (tt = Wc(tt)), tt !== null)) + if (((et = Vb(tt)), et === null)) tt = null + else if (((nt = et.tag), nt === 13)) { + if (((tt = Wb(et)), tt !== null)) return tt + tt = null + } else if (nt === 3) { + if (et.stateNode.current.memoizedState.isDehydrated) return et.tag === 3 ? et.stateNode.containerInfo : null + tt = null + } else et !== tt && (tt = null) + return (id$2 = tt), null + } + function jd(tt) { + switch (tt) { + case 'cancel': + case 'click': + case 'close': + case 'contextmenu': + case 'copy': + case 'cut': + case 'auxclick': + case 'dblclick': + case 'dragend': + case 'dragstart': + case 'drop': + case 'focusin': + case 'focusout': + case 'input': + case 'invalid': + case 'keydown': + case 'keypress': + case 'keyup': + case 'mousedown': + case 'mouseup': + case 'paste': + case 'pause': + case 'play': + case 'pointercancel': + case 'pointerdown': + case 'pointerup': + case 'ratechange': + case 'reset': + case 'resize': + case 'seeked': + case 'submit': + case 'touchcancel': + case 'touchend': + case 'touchstart': + case 'volumechange': + case 'change': + case 'selectionchange': + case 'textInput': + case 'compositionstart': + case 'compositionend': + case 'compositionupdate': + case 'beforeblur': + case 'afterblur': + case 'beforeinput': + case 'blur': + case 'fullscreenchange': + case 'focus': + case 'hashchange': + case 'popstate': + case 'select': + case 'selectstart': + return 1 + case 'drag': + case 'dragenter': + case 'dragexit': + case 'dragleave': + case 'dragover': + case 'mousemove': + case 'mouseout': + case 'mouseover': + case 'pointermove': + case 'pointerout': + case 'pointerover': + case 'scroll': + case 'toggle': + case 'touchmove': + case 'wheel': + case 'mouseenter': + case 'mouseleave': + case 'pointerenter': + case 'pointerleave': + return 4 + case 'message': + switch (ec$2()) { + case fc: + return 1 + case gc: + return 4 + case hc: + case ic: + return 16 + case jc: + return 536870912 + default: + return 16 + } + default: + return 16 + } + } + var kd = null, + ld = null, + md = null + function nd() { + if (md) return md + var tt, + et = ld, + nt = et.length, + rt, + it = 'value' in kd ? kd.value : kd.textContent, + ot = it.length + for (tt = 0; tt < nt && et[tt] === it[tt]; tt++); + var at = nt - tt + for (rt = 1; rt <= at && et[nt - rt] === it[ot - rt]; rt++); + return (md = it.slice(tt, 1 < rt ? 1 - rt : void 0)) + } + function od(tt) { + var et = tt.keyCode + return ( + 'charCode' in tt ? ((tt = tt.charCode), tt === 0 && et === 13 && (tt = 13)) : (tt = et), + tt === 10 && (tt = 13), + 32 <= tt || tt === 13 ? tt : 0 + ) + } + function pd() { + return !0 + } + function qd() { + return !1 + } + function rd(tt) { + function et(nt, rt, it, ot, at) { + ;(this._reactName = nt), + (this._targetInst = it), + (this.type = rt), + (this.nativeEvent = ot), + (this.target = at), + (this.currentTarget = null) + for (var st in tt) tt.hasOwnProperty(st) && ((nt = tt[st]), (this[st] = nt ? nt(ot) : ot[st])) + return ( + (this.isDefaultPrevented = (ot.defaultPrevented != null ? ot.defaultPrevented : ot.returnValue === !1) + ? pd + : qd), + (this.isPropagationStopped = qd), + this + ) + } + return ( + A$3(et.prototype, { + preventDefault: function () { + this.defaultPrevented = !0 + var nt = this.nativeEvent + nt && + (nt.preventDefault ? nt.preventDefault() : typeof nt.returnValue != 'unknown' && (nt.returnValue = !1), + (this.isDefaultPrevented = pd)) + }, + stopPropagation: function () { + var nt = this.nativeEvent + nt && + (nt.stopPropagation ? nt.stopPropagation() : typeof nt.cancelBubble != 'unknown' && (nt.cancelBubble = !0), + (this.isPropagationStopped = pd)) + }, + persist: function () {}, + isPersistent: pd, + }), + et + ) + } + var sd = { + eventPhase: 0, + bubbles: 0, + cancelable: 0, + timeStamp: function (tt) { + return tt.timeStamp || Date.now() + }, + defaultPrevented: 0, + isTrusted: 0, + }, + td = rd(sd), + ud = A$3({}, sd, { view: 0, detail: 0 }), + vd = rd(ud), + wd, + xd, + yd, + Ad = A$3({}, ud, { + screenX: 0, + screenY: 0, + clientX: 0, + clientY: 0, + pageX: 0, + pageY: 0, + ctrlKey: 0, + shiftKey: 0, + altKey: 0, + metaKey: 0, + getModifierState: zd, + button: 0, + buttons: 0, + relatedTarget: function (tt) { + return tt.relatedTarget === void 0 + ? tt.fromElement === tt.srcElement + ? tt.toElement + : tt.fromElement + : tt.relatedTarget + }, + movementX: function (tt) { + return 'movementX' in tt + ? tt.movementX + : (tt !== yd && + (yd && tt.type === 'mousemove' + ? ((wd = tt.screenX - yd.screenX), (xd = tt.screenY - yd.screenY)) + : (xd = wd = 0), + (yd = tt)), + wd) + }, + movementY: function (tt) { + return 'movementY' in tt ? tt.movementY : xd + }, + }), + Bd = rd(Ad), + Cd = A$3({}, Ad, { dataTransfer: 0 }), + Dd = rd(Cd), + Ed = A$3({}, ud, { relatedTarget: 0 }), + Fd = rd(Ed), + Gd = A$3({}, sd, { animationName: 0, elapsedTime: 0, pseudoElement: 0 }), + Hd = rd(Gd), + Id$1 = A$3({}, sd, { + clipboardData: function (tt) { + return 'clipboardData' in tt ? tt.clipboardData : window.clipboardData + }, + }), + Jd = rd(Id$1), + Kd = A$3({}, sd, { data: 0 }), + Ld = rd(Kd), + Md = { + Esc: 'Escape', + Spacebar: ' ', + Left: 'ArrowLeft', + Up: 'ArrowUp', + Right: 'ArrowRight', + Down: 'ArrowDown', + Del: 'Delete', + Win: 'OS', + Menu: 'ContextMenu', + Apps: 'ContextMenu', + Scroll: 'ScrollLock', + MozPrintableKey: 'Unidentified', + }, + Nd = { + 8: 'Backspace', + 9: 'Tab', + 12: 'Clear', + 13: 'Enter', + 16: 'Shift', + 17: 'Control', + 18: 'Alt', + 19: 'Pause', + 20: 'CapsLock', + 27: 'Escape', + 32: ' ', + 33: 'PageUp', + 34: 'PageDown', + 35: 'End', + 36: 'Home', + 37: 'ArrowLeft', + 38: 'ArrowUp', + 39: 'ArrowRight', + 40: 'ArrowDown', + 45: 'Insert', + 46: 'Delete', + 112: 'F1', + 113: 'F2', + 114: 'F3', + 115: 'F4', + 116: 'F5', + 117: 'F6', + 118: 'F7', + 119: 'F8', + 120: 'F9', + 121: 'F10', + 122: 'F11', + 123: 'F12', + 144: 'NumLock', + 145: 'ScrollLock', + 224: 'Meta', + }, + Od = { Alt: 'altKey', Control: 'ctrlKey', Meta: 'metaKey', Shift: 'shiftKey' } + function Pd(tt) { + var et = this.nativeEvent + return et.getModifierState ? et.getModifierState(tt) : (tt = Od[tt]) ? !!et[tt] : !1 + } + function zd() { + return Pd + } + var Qd = A$3({}, ud, { + key: function (tt) { + if (tt.key) { + var et = Md[tt.key] || tt.key + if (et !== 'Unidentified') return et + } + return tt.type === 'keypress' + ? ((tt = od(tt)), tt === 13 ? 'Enter' : String.fromCharCode(tt)) + : tt.type === 'keydown' || tt.type === 'keyup' + ? Nd[tt.keyCode] || 'Unidentified' + : '' + }, + code: 0, + location: 0, + ctrlKey: 0, + shiftKey: 0, + altKey: 0, + metaKey: 0, + repeat: 0, + locale: 0, + getModifierState: zd, + charCode: function (tt) { + return tt.type === 'keypress' ? od(tt) : 0 + }, + keyCode: function (tt) { + return tt.type === 'keydown' || tt.type === 'keyup' ? tt.keyCode : 0 + }, + which: function (tt) { + return tt.type === 'keypress' ? od(tt) : tt.type === 'keydown' || tt.type === 'keyup' ? tt.keyCode : 0 + }, + }), + Rd = rd(Qd), + Sd = A$3({}, Ad, { + pointerId: 0, + width: 0, + height: 0, + pressure: 0, + tangentialPressure: 0, + tiltX: 0, + tiltY: 0, + twist: 0, + pointerType: 0, + isPrimary: 0, + }), + Td = rd(Sd), + Ud = A$3({}, ud, { + touches: 0, + targetTouches: 0, + changedTouches: 0, + altKey: 0, + metaKey: 0, + ctrlKey: 0, + shiftKey: 0, + getModifierState: zd, + }), + Vd = rd(Ud), + Wd = A$3({}, sd, { propertyName: 0, elapsedTime: 0, pseudoElement: 0 }), + Xd = rd(Wd), + Yd = A$3({}, Ad, { + deltaX: function (tt) { + return 'deltaX' in tt ? tt.deltaX : 'wheelDeltaX' in tt ? -tt.wheelDeltaX : 0 + }, + deltaY: function (tt) { + return 'deltaY' in tt + ? tt.deltaY + : 'wheelDeltaY' in tt + ? -tt.wheelDeltaY + : 'wheelDelta' in tt + ? -tt.wheelDelta + : 0 + }, + deltaZ: 0, + deltaMode: 0, + }), + Zd = rd(Yd), + $d = [9, 13, 27, 32], + ae$1 = ia && 'CompositionEvent' in window, + be$1 = null + ia && 'documentMode' in document && (be$1 = document.documentMode) + var ce$1 = ia && 'TextEvent' in window && !be$1, + de$1 = ia && (!ae$1 || (be$1 && 8 < be$1 && 11 >= be$1)), + ee$2 = String.fromCharCode(32), + fe$1 = !1 + function ge$1(tt, et) { + switch (tt) { + case 'keyup': + return $d.indexOf(et.keyCode) !== -1 + case 'keydown': + return et.keyCode !== 229 + case 'keypress': + case 'mousedown': + case 'focusout': + return !0 + default: + return !1 + } + } + function he$1(tt) { + return (tt = tt.detail), typeof tt == 'object' && 'data' in tt ? tt.data : null + } + var ie$1 = !1 + function je$1(tt, et) { + switch (tt) { + case 'compositionend': + return he$1(et) + case 'keypress': + return et.which !== 32 ? null : ((fe$1 = !0), ee$2) + case 'textInput': + return (tt = et.data), tt === ee$2 && fe$1 ? null : tt + default: + return null + } + } + function ke$1(tt, et) { + if (ie$1) + return tt === 'compositionend' || (!ae$1 && ge$1(tt, et)) + ? ((tt = nd()), (md = ld = kd = null), (ie$1 = !1), tt) + : null + switch (tt) { + case 'paste': + return null + case 'keypress': + if (!(et.ctrlKey || et.altKey || et.metaKey) || (et.ctrlKey && et.altKey)) { + if (et.char && 1 < et.char.length) return et.char + if (et.which) return String.fromCharCode(et.which) + } + return null + case 'compositionend': + return de$1 && et.locale !== 'ko' ? null : et.data + default: + return null + } + } + var le$1 = { + color: !0, + date: !0, + datetime: !0, + 'datetime-local': !0, + email: !0, + month: !0, + number: !0, + password: !0, + range: !0, + search: !0, + tel: !0, + text: !0, + time: !0, + url: !0, + week: !0, + } + function me(tt) { + var et = tt && tt.nodeName && tt.nodeName.toLowerCase() + return et === 'input' ? !!le$1[tt.type] : et === 'textarea' + } + function ne$1(tt, et, nt, rt) { + Eb(rt), + (et = oe$1(et, 'onChange')), + 0 < et.length && ((nt = new td('onChange', 'change', null, nt, rt)), tt.push({ event: nt, listeners: et })) + } + var pe$1 = null, + qe$1 = null + function re$5(tt) { + se$1(tt, 0) + } + function te$1(tt) { + var et = ue(tt) + if (Wa(et)) return tt + } + function ve$1(tt, et) { + if (tt === 'change') return et + } + var we$1 = !1 + if (ia) { + var xe$2 + if (ia) { + var ye$1 = 'oninput' in document + if (!ye$1) { + var ze$1 = document.createElement('div') + ze$1.setAttribute('oninput', 'return;'), (ye$1 = typeof ze$1.oninput == 'function') + } + xe$2 = ye$1 + } else xe$2 = !1 + we$1 = xe$2 && (!document.documentMode || 9 < document.documentMode) + } + function Ae$1() { + pe$1 && (pe$1.detachEvent('onpropertychange', Be$1), (qe$1 = pe$1 = null)) + } + function Be$1(tt) { + if (tt.propertyName === 'value' && te$1(qe$1)) { + var et = [] + ne$1(et, qe$1, tt, xb(tt)), Jb(re$5, et) + } + } + function Ce$1(tt, et, nt) { + tt === 'focusin' + ? (Ae$1(), (pe$1 = et), (qe$1 = nt), pe$1.attachEvent('onpropertychange', Be$1)) + : tt === 'focusout' && Ae$1() + } + function De$1(tt) { + if (tt === 'selectionchange' || tt === 'keyup' || tt === 'keydown') return te$1(qe$1) + } + function Ee$1(tt, et) { + if (tt === 'click') return te$1(et) + } + function Fe$1(tt, et) { + if (tt === 'input' || tt === 'change') return te$1(et) + } + function Ge(tt, et) { + return (tt === et && (tt !== 0 || 1 / tt === 1 / et)) || (tt !== tt && et !== et) + } + var He$1 = typeof Object.is == 'function' ? Object.is : Ge + function Ie(tt, et) { + if (He$1(tt, et)) return !0 + if (typeof tt != 'object' || tt === null || typeof et != 'object' || et === null) return !1 + var nt = Object.keys(tt), + rt = Object.keys(et) + if (nt.length !== rt.length) return !1 + for (rt = 0; rt < nt.length; rt++) { + var it = nt[rt] + if (!ja.call(et, it) || !He$1(tt[it], et[it])) return !1 + } + return !0 + } + function Je(tt) { + for (; tt && tt.firstChild; ) tt = tt.firstChild + return tt + } + function Ke(tt, et) { + var nt = Je(tt) + tt = 0 + for (var rt; nt; ) { + if (nt.nodeType === 3) { + if (((rt = tt + nt.textContent.length), tt <= et && rt >= et)) return { node: nt, offset: et - tt } + tt = rt + } + e: { + for (; nt; ) { + if (nt.nextSibling) { + nt = nt.nextSibling + break e + } + nt = nt.parentNode + } + nt = void 0 + } + nt = Je(nt) + } + } + function Le$1(tt, et) { + return tt && et + ? tt === et + ? !0 + : tt && tt.nodeType === 3 + ? !1 + : et && et.nodeType === 3 + ? Le$1(tt, et.parentNode) + : 'contains' in tt + ? tt.contains(et) + : tt.compareDocumentPosition + ? !!(tt.compareDocumentPosition(et) & 16) + : !1 + : !1 + } + function Me$2() { + for (var tt = window, et = Xa(); et instanceof tt.HTMLIFrameElement; ) { + try { + var nt = typeof et.contentWindow.location.href == 'string' + } catch { + nt = !1 + } + if (nt) tt = et.contentWindow + else break + et = Xa(tt.document) + } + return et + } + function Ne$2(tt) { + var et = tt && tt.nodeName && tt.nodeName.toLowerCase() + return ( + et && + ((et === 'input' && + (tt.type === 'text' || + tt.type === 'search' || + tt.type === 'tel' || + tt.type === 'url' || + tt.type === 'password')) || + et === 'textarea' || + tt.contentEditable === 'true') + ) + } + function Oe$1(tt) { + var et = Me$2(), + nt = tt.focusedElem, + rt = tt.selectionRange + if (et !== nt && nt && nt.ownerDocument && Le$1(nt.ownerDocument.documentElement, nt)) { + if (rt !== null && Ne$2(nt)) { + if (((et = rt.start), (tt = rt.end), tt === void 0 && (tt = et), 'selectionStart' in nt)) + (nt.selectionStart = et), (nt.selectionEnd = Math.min(tt, nt.value.length)) + else if (((tt = ((et = nt.ownerDocument || document) && et.defaultView) || window), tt.getSelection)) { + tt = tt.getSelection() + var it = nt.textContent.length, + ot = Math.min(rt.start, it) + ;(rt = rt.end === void 0 ? ot : Math.min(rt.end, it)), + !tt.extend && ot > rt && ((it = rt), (rt = ot), (ot = it)), + (it = Ke(nt, ot)) + var at = Ke(nt, rt) + it && + at && + (tt.rangeCount !== 1 || + tt.anchorNode !== it.node || + tt.anchorOffset !== it.offset || + tt.focusNode !== at.node || + tt.focusOffset !== at.offset) && + ((et = et.createRange()), + et.setStart(it.node, it.offset), + tt.removeAllRanges(), + ot > rt + ? (tt.addRange(et), tt.extend(at.node, at.offset)) + : (et.setEnd(at.node, at.offset), tt.addRange(et))) + } + } + for (et = [], tt = nt; (tt = tt.parentNode); ) + tt.nodeType === 1 && et.push({ element: tt, left: tt.scrollLeft, top: tt.scrollTop }) + for (typeof nt.focus == 'function' && nt.focus(), nt = 0; nt < et.length; nt++) + (tt = et[nt]), (tt.element.scrollLeft = tt.left), (tt.element.scrollTop = tt.top) + } + } + var Pe = ia && 'documentMode' in document && 11 >= document.documentMode, + Qe = null, + Re$1 = null, + Se$1 = null, + Te$1 = !1 + function Ue(tt, et, nt) { + var rt = nt.window === nt ? nt.document : nt.nodeType === 9 ? nt : nt.ownerDocument + Te$1 || + Qe == null || + Qe !== Xa(rt) || + ((rt = Qe), + 'selectionStart' in rt && Ne$2(rt) + ? (rt = { start: rt.selectionStart, end: rt.selectionEnd }) + : ((rt = ((rt.ownerDocument && rt.ownerDocument.defaultView) || window).getSelection()), + (rt = { + anchorNode: rt.anchorNode, + anchorOffset: rt.anchorOffset, + focusNode: rt.focusNode, + focusOffset: rt.focusOffset, + })), + (Se$1 && Ie(Se$1, rt)) || + ((Se$1 = rt), + (rt = oe$1(Re$1, 'onSelect')), + 0 < rt.length && + ((et = new td('onSelect', 'select', null, et, nt)), tt.push({ event: et, listeners: rt }), (et.target = Qe)))) + } + function Ve$1(tt, et) { + var nt = {} + return ( + (nt[tt.toLowerCase()] = et.toLowerCase()), (nt['Webkit' + tt] = 'webkit' + et), (nt['Moz' + tt] = 'moz' + et), nt + ) + } + var We$1 = { + animationend: Ve$1('Animation', 'AnimationEnd'), + animationiteration: Ve$1('Animation', 'AnimationIteration'), + animationstart: Ve$1('Animation', 'AnimationStart'), + transitionend: Ve$1('Transition', 'TransitionEnd'), + }, + Xe = {}, + Ye$1 = {} + ia && + ((Ye$1 = document.createElement('div').style), + 'AnimationEvent' in window || + (delete We$1.animationend.animation, + delete We$1.animationiteration.animation, + delete We$1.animationstart.animation), + 'TransitionEvent' in window || delete We$1.transitionend.transition) + function Ze(tt) { + if (Xe[tt]) return Xe[tt] + if (!We$1[tt]) return tt + var et = We$1[tt], + nt + for (nt in et) if (et.hasOwnProperty(nt) && nt in Ye$1) return (Xe[tt] = et[nt]) + return tt + } + var $e$1 = Ze('animationend'), + af = Ze('animationiteration'), + bf = Ze('animationstart'), + cf = Ze('transitionend'), + df = new Map(), + ef = + 'abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel'.split( + ' ', + ) + function ff(tt, et) { + df.set(tt, et), fa(et, [tt]) + } + for (var gf = 0; gf < ef.length; gf++) { + var hf = ef[gf], + jf = hf.toLowerCase(), + kf = hf[0].toUpperCase() + hf.slice(1) + ff(jf, 'on' + kf) + } + ff($e$1, 'onAnimationEnd') + ff(af, 'onAnimationIteration') + ff(bf, 'onAnimationStart') + ff('dblclick', 'onDoubleClick') + ff('focusin', 'onFocus') + ff('focusout', 'onBlur') + ff(cf, 'onTransitionEnd') + ha('onMouseEnter', ['mouseout', 'mouseover']) + ha('onMouseLeave', ['mouseout', 'mouseover']) + ha('onPointerEnter', ['pointerout', 'pointerover']) + ha('onPointerLeave', ['pointerout', 'pointerover']) + fa('onChange', 'change click focusin focusout input keydown keyup selectionchange'.split(' ')) + fa('onSelect', 'focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange'.split(' ')) + fa('onBeforeInput', ['compositionend', 'keypress', 'textInput', 'paste']) + fa('onCompositionEnd', 'compositionend focusout keydown keypress keyup mousedown'.split(' ')) + fa('onCompositionStart', 'compositionstart focusout keydown keypress keyup mousedown'.split(' ')) + fa('onCompositionUpdate', 'compositionupdate focusout keydown keypress keyup mousedown'.split(' ')) + var lf = + 'abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting'.split( + ' ', + ), + mf = new Set('cancel close invalid load scroll toggle'.split(' ').concat(lf)) + function nf(tt, et, nt) { + var rt = tt.type || 'unknown-event' + ;(tt.currentTarget = nt), Ub(rt, et, void 0, tt), (tt.currentTarget = null) + } + function se$1(tt, et) { + et = (et & 4) !== 0 + for (var nt = 0; nt < tt.length; nt++) { + var rt = tt[nt], + it = rt.event + rt = rt.listeners + e: { + var ot = void 0 + if (et) + for (var at = rt.length - 1; 0 <= at; at--) { + var st = rt[at], + lt = st.instance, + ct = st.currentTarget + if (((st = st.listener), lt !== ot && it.isPropagationStopped())) break e + nf(it, st, ct), (ot = lt) + } + else + for (at = 0; at < rt.length; at++) { + if ( + ((st = rt[at]), + (lt = st.instance), + (ct = st.currentTarget), + (st = st.listener), + lt !== ot && it.isPropagationStopped()) + ) + break e + nf(it, st, ct), (ot = lt) + } + } + } + if (Qb) throw ((tt = Rb), (Qb = !1), (Rb = null), tt) + } + function D$2(tt, et) { + var nt = et[of] + nt === void 0 && (nt = et[of] = new Set()) + var rt = tt + '__bubble' + nt.has(rt) || (pf(et, tt, 2, !1), nt.add(rt)) + } + function qf(tt, et, nt) { + var rt = 0 + et && (rt |= 4), pf(nt, tt, rt, et) + } + var rf = '_reactListening' + Math.random().toString(36).slice(2) + function sf(tt) { + if (!tt[rf]) { + ;(tt[rf] = !0), + da.forEach(function (nt) { + nt !== 'selectionchange' && (mf.has(nt) || qf(nt, !1, tt), qf(nt, !0, tt)) + }) + var et = tt.nodeType === 9 ? tt : tt.ownerDocument + et === null || et[rf] || ((et[rf] = !0), qf('selectionchange', !1, et)) + } + } + function pf(tt, et, nt, rt) { + switch (jd(et)) { + case 1: + var it = ed + break + case 4: + it = gd + break + default: + it = fd + } + ;(nt = it.bind(null, et, nt, tt)), + (it = void 0), + !Lb || (et !== 'touchstart' && et !== 'touchmove' && et !== 'wheel') || (it = !0), + rt + ? it !== void 0 + ? tt.addEventListener(et, nt, { capture: !0, passive: it }) + : tt.addEventListener(et, nt, !0) + : it !== void 0 + ? tt.addEventListener(et, nt, { passive: it }) + : tt.addEventListener(et, nt, !1) + } + function hd(tt, et, nt, rt, it) { + var ot = rt + if (!(et & 1) && !(et & 2) && rt !== null) + e: for (;;) { + if (rt === null) return + var at = rt.tag + if (at === 3 || at === 4) { + var st = rt.stateNode.containerInfo + if (st === it || (st.nodeType === 8 && st.parentNode === it)) break + if (at === 4) + for (at = rt.return; at !== null; ) { + var lt = at.tag + if ( + (lt === 3 || lt === 4) && + ((lt = at.stateNode.containerInfo), lt === it || (lt.nodeType === 8 && lt.parentNode === it)) + ) + return + at = at.return + } + for (; st !== null; ) { + if (((at = Wc(st)), at === null)) return + if (((lt = at.tag), lt === 5 || lt === 6)) { + rt = ot = at + continue e + } + st = st.parentNode + } + } + rt = rt.return + } + Jb(function () { + var ct = ot, + ut = xb(nt), + ht = [] + e: { + var dt = df.get(tt) + if (dt !== void 0) { + var pt = td, + mt = tt + switch (tt) { + case 'keypress': + if (od(nt) === 0) break e + case 'keydown': + case 'keyup': + pt = Rd + break + case 'focusin': + ;(mt = 'focus'), (pt = Fd) + break + case 'focusout': + ;(mt = 'blur'), (pt = Fd) + break + case 'beforeblur': + case 'afterblur': + pt = Fd + break + case 'click': + if (nt.button === 2) break e + case 'auxclick': + case 'dblclick': + case 'mousedown': + case 'mousemove': + case 'mouseup': + case 'mouseout': + case 'mouseover': + case 'contextmenu': + pt = Bd + break + case 'drag': + case 'dragend': + case 'dragenter': + case 'dragexit': + case 'dragleave': + case 'dragover': + case 'dragstart': + case 'drop': + pt = Dd + break + case 'touchcancel': + case 'touchend': + case 'touchmove': + case 'touchstart': + pt = Vd + break + case $e$1: + case af: + case bf: + pt = Hd + break + case cf: + pt = Xd + break + case 'scroll': + pt = vd + break + case 'wheel': + pt = Zd + break + case 'copy': + case 'cut': + case 'paste': + pt = Jd + break + case 'gotpointercapture': + case 'lostpointercapture': + case 'pointercancel': + case 'pointerdown': + case 'pointermove': + case 'pointerout': + case 'pointerover': + case 'pointerup': + pt = Td + } + var gt = (et & 4) !== 0, + yt = !gt && tt === 'scroll', + bt = gt ? (dt !== null ? dt + 'Capture' : null) : dt + gt = [] + for (var vt = ct, xt; vt !== null; ) { + xt = vt + var kt = xt.stateNode + if ( + (xt.tag === 5 && + kt !== null && + ((xt = kt), bt !== null && ((kt = Kb(vt, bt)), kt != null && gt.push(tf(vt, kt, xt)))), + yt) + ) + break + vt = vt.return + } + 0 < gt.length && ((dt = new pt(dt, mt, null, nt, ut)), ht.push({ event: dt, listeners: gt })) + } + } + if (!(et & 7)) { + e: { + if ( + ((dt = tt === 'mouseover' || tt === 'pointerover'), + (pt = tt === 'mouseout' || tt === 'pointerout'), + dt && nt !== wb && (mt = nt.relatedTarget || nt.fromElement) && (Wc(mt) || mt[uf])) + ) + break e + if ( + (pt || dt) && + ((dt = ut.window === ut ? ut : (dt = ut.ownerDocument) ? dt.defaultView || dt.parentWindow : window), + pt + ? ((mt = nt.relatedTarget || nt.toElement), + (pt = ct), + (mt = mt ? Wc(mt) : null), + mt !== null && ((yt = Vb(mt)), mt !== yt || (mt.tag !== 5 && mt.tag !== 6)) && (mt = null)) + : ((pt = null), (mt = ct)), + pt !== mt) + ) { + if ( + ((gt = Bd), + (kt = 'onMouseLeave'), + (bt = 'onMouseEnter'), + (vt = 'mouse'), + (tt === 'pointerout' || tt === 'pointerover') && + ((gt = Td), (kt = 'onPointerLeave'), (bt = 'onPointerEnter'), (vt = 'pointer')), + (yt = pt == null ? dt : ue(pt)), + (xt = mt == null ? dt : ue(mt)), + (dt = new gt(kt, vt + 'leave', pt, nt, ut)), + (dt.target = yt), + (dt.relatedTarget = xt), + (kt = null), + Wc(ut) === ct && + ((gt = new gt(bt, vt + 'enter', mt, nt, ut)), (gt.target = xt), (gt.relatedTarget = yt), (kt = gt)), + (yt = kt), + pt && mt) + ) + t: { + for (gt = pt, bt = mt, vt = 0, xt = gt; xt; xt = vf(xt)) vt++ + for (xt = 0, kt = bt; kt; kt = vf(kt)) xt++ + for (; 0 < vt - xt; ) (gt = vf(gt)), vt-- + for (; 0 < xt - vt; ) (bt = vf(bt)), xt-- + for (; vt--; ) { + if (gt === bt || (bt !== null && gt === bt.alternate)) break t + ;(gt = vf(gt)), (bt = vf(bt)) + } + gt = null + } + else gt = null + pt !== null && wf(ht, dt, pt, gt, !1), mt !== null && yt !== null && wf(ht, yt, mt, gt, !0) + } + } + e: { + if ( + ((dt = ct ? ue(ct) : window), + (pt = dt.nodeName && dt.nodeName.toLowerCase()), + pt === 'select' || (pt === 'input' && dt.type === 'file')) + ) + var St = ve$1 + else if (me(dt)) + if (we$1) St = Fe$1 + else { + St = De$1 + var Tt = Ce$1 + } + else + (pt = dt.nodeName) && + pt.toLowerCase() === 'input' && + (dt.type === 'checkbox' || dt.type === 'radio') && + (St = Ee$1) + if (St && (St = St(tt, ct))) { + ne$1(ht, St, nt, ut) + break e + } + Tt && Tt(tt, dt, ct), + tt === 'focusout' && + (Tt = dt._wrapperState) && + Tt.controlled && + dt.type === 'number' && + cb(dt, 'number', dt.value) + } + switch (((Tt = ct ? ue(ct) : window), tt)) { + case 'focusin': + ;(me(Tt) || Tt.contentEditable === 'true') && ((Qe = Tt), (Re$1 = ct), (Se$1 = null)) + break + case 'focusout': + Se$1 = Re$1 = Qe = null + break + case 'mousedown': + Te$1 = !0 + break + case 'contextmenu': + case 'mouseup': + case 'dragend': + ;(Te$1 = !1), Ue(ht, nt, ut) + break + case 'selectionchange': + if (Pe) break + case 'keydown': + case 'keyup': + Ue(ht, nt, ut) + } + var At + if (ae$1) + e: { + switch (tt) { + case 'compositionstart': + var Et = 'onCompositionStart' + break e + case 'compositionend': + Et = 'onCompositionEnd' + break e + case 'compositionupdate': + Et = 'onCompositionUpdate' + break e + } + Et = void 0 + } + else + ie$1 + ? ge$1(tt, nt) && (Et = 'onCompositionEnd') + : tt === 'keydown' && nt.keyCode === 229 && (Et = 'onCompositionStart') + Et && + (de$1 && + nt.locale !== 'ko' && + (ie$1 || Et !== 'onCompositionStart' + ? Et === 'onCompositionEnd' && ie$1 && (At = nd()) + : ((kd = ut), (ld = 'value' in kd ? kd.value : kd.textContent), (ie$1 = !0))), + (Tt = oe$1(ct, Et)), + 0 < Tt.length && + ((Et = new Ld(Et, tt, null, nt, ut)), + ht.push({ event: Et, listeners: Tt }), + At ? (Et.data = At) : ((At = he$1(nt)), At !== null && (Et.data = At)))), + (At = ce$1 ? je$1(tt, nt) : ke$1(tt, nt)) && + ((ct = oe$1(ct, 'onBeforeInput')), + 0 < ct.length && + ((ut = new Ld('onBeforeInput', 'beforeinput', null, nt, ut)), + ht.push({ event: ut, listeners: ct }), + (ut.data = At))) + } + se$1(ht, et) + }) + } + function tf(tt, et, nt) { + return { instance: tt, listener: et, currentTarget: nt } + } + function oe$1(tt, et) { + for (var nt = et + 'Capture', rt = []; tt !== null; ) { + var it = tt, + ot = it.stateNode + it.tag === 5 && + ot !== null && + ((it = ot), + (ot = Kb(tt, nt)), + ot != null && rt.unshift(tf(tt, ot, it)), + (ot = Kb(tt, et)), + ot != null && rt.push(tf(tt, ot, it))), + (tt = tt.return) + } + return rt + } + function vf(tt) { + if (tt === null) return null + do tt = tt.return + while (tt && tt.tag !== 5) + return tt || null + } + function wf(tt, et, nt, rt, it) { + for (var ot = et._reactName, at = []; nt !== null && nt !== rt; ) { + var st = nt, + lt = st.alternate, + ct = st.stateNode + if (lt !== null && lt === rt) break + st.tag === 5 && + ct !== null && + ((st = ct), + it + ? ((lt = Kb(nt, ot)), lt != null && at.unshift(tf(nt, lt, st))) + : it || ((lt = Kb(nt, ot)), lt != null && at.push(tf(nt, lt, st)))), + (nt = nt.return) + } + at.length !== 0 && tt.push({ event: et, listeners: at }) + } + var xf = /\r\n?/g, + yf = /\u0000|\uFFFD/g + function zf(tt) { + return (typeof tt == 'string' ? tt : '' + tt) + .replace( + xf, + ` +`, + ) + .replace(yf, '') + } + function Af(tt, et, nt) { + if (((et = zf(et)), zf(tt) !== et && nt)) throw Error(p$a(425)) + } + function Bf() {} + var Cf = null, + Df = null + function Ef(tt, et) { + return ( + tt === 'textarea' || + tt === 'noscript' || + typeof et.children == 'string' || + typeof et.children == 'number' || + (typeof et.dangerouslySetInnerHTML == 'object' && + et.dangerouslySetInnerHTML !== null && + et.dangerouslySetInnerHTML.__html != null) + ) + } + var Ff = typeof setTimeout == 'function' ? setTimeout : void 0, + Gf = typeof clearTimeout == 'function' ? clearTimeout : void 0, + Hf = typeof Promise == 'function' ? Promise : void 0, + Jf = + typeof queueMicrotask == 'function' + ? queueMicrotask + : typeof Hf < 'u' + ? function (tt) { + return Hf.resolve(null).then(tt).catch(If) + } + : Ff + function If(tt) { + setTimeout(function () { + throw tt + }) + } + function Kf(tt, et) { + var nt = et, + rt = 0 + do { + var it = nt.nextSibling + if ((tt.removeChild(nt), it && it.nodeType === 8)) + if (((nt = it.data), nt === '/$')) { + if (rt === 0) { + tt.removeChild(it), bd(et) + return + } + rt-- + } else (nt !== '$' && nt !== '$?' && nt !== '$!') || rt++ + nt = it + } while (nt) + bd(et) + } + function Lf(tt) { + for (; tt != null; tt = tt.nextSibling) { + var et = tt.nodeType + if (et === 1 || et === 3) break + if (et === 8) { + if (((et = tt.data), et === '$' || et === '$!' || et === '$?')) break + if (et === '/$') return null + } + } + return tt + } + function Mf(tt) { + tt = tt.previousSibling + for (var et = 0; tt; ) { + if (tt.nodeType === 8) { + var nt = tt.data + if (nt === '$' || nt === '$!' || nt === '$?') { + if (et === 0) return tt + et-- + } else nt === '/$' && et++ + } + tt = tt.previousSibling + } + return null + } + var Nf = Math.random().toString(36).slice(2), + Of = '__reactFiber$' + Nf, + Pf = '__reactProps$' + Nf, + uf = '__reactContainer$' + Nf, + of = '__reactEvents$' + Nf, + Qf = '__reactListeners$' + Nf, + Rf = '__reactHandles$' + Nf + function Wc(tt) { + var et = tt[Of] + if (et) return et + for (var nt = tt.parentNode; nt; ) { + if ((et = nt[uf] || nt[Of])) { + if (((nt = et.alternate), et.child !== null || (nt !== null && nt.child !== null))) + for (tt = Mf(tt); tt !== null; ) { + if ((nt = tt[Of])) return nt + tt = Mf(tt) + } + return et + } + ;(tt = nt), (nt = tt.parentNode) + } + return null + } + function Cb(tt) { + return (tt = tt[Of] || tt[uf]), !tt || (tt.tag !== 5 && tt.tag !== 6 && tt.tag !== 13 && tt.tag !== 3) ? null : tt + } + function ue(tt) { + if (tt.tag === 5 || tt.tag === 6) return tt.stateNode + throw Error(p$a(33)) + } + function Db(tt) { + return tt[Pf] || null + } + var Sf = [], + Tf = -1 + function Uf(tt) { + return { current: tt } + } + function E$2(tt) { + 0 > Tf || ((tt.current = Sf[Tf]), (Sf[Tf] = null), Tf--) + } + function G$3(tt, et) { + Tf++, (Sf[Tf] = tt.current), (tt.current = et) + } + var Vf = {}, + H$3 = Uf(Vf), + Wf = Uf(!1), + Xf = Vf + function Yf(tt, et) { + var nt = tt.type.contextTypes + if (!nt) return Vf + var rt = tt.stateNode + if (rt && rt.__reactInternalMemoizedUnmaskedChildContext === et) return rt.__reactInternalMemoizedMaskedChildContext + var it = {}, + ot + for (ot in nt) it[ot] = et[ot] + return ( + rt && + ((tt = tt.stateNode), + (tt.__reactInternalMemoizedUnmaskedChildContext = et), + (tt.__reactInternalMemoizedMaskedChildContext = it)), + it + ) + } + function Zf(tt) { + return (tt = tt.childContextTypes), tt != null + } + function $f() { + E$2(Wf), E$2(H$3) + } + function ag(tt, et, nt) { + if (H$3.current !== Vf) throw Error(p$a(168)) + G$3(H$3, et), G$3(Wf, nt) + } + function bg(tt, et, nt) { + var rt = tt.stateNode + if (((et = et.childContextTypes), typeof rt.getChildContext != 'function')) return nt + rt = rt.getChildContext() + for (var it in rt) if (!(it in et)) throw Error(p$a(108, Ra(tt) || 'Unknown', it)) + return A$3({}, nt, rt) + } + function cg(tt) { + return ( + (tt = ((tt = tt.stateNode) && tt.__reactInternalMemoizedMergedChildContext) || Vf), + (Xf = H$3.current), + G$3(H$3, tt), + G$3(Wf, Wf.current), + !0 + ) + } + function dg(tt, et, nt) { + var rt = tt.stateNode + if (!rt) throw Error(p$a(169)) + nt + ? ((tt = bg(tt, et, Xf)), (rt.__reactInternalMemoizedMergedChildContext = tt), E$2(Wf), E$2(H$3), G$3(H$3, tt)) + : E$2(Wf), + G$3(Wf, nt) + } + var eg = null, + fg = !1, + gg = !1 + function hg(tt) { + eg === null ? (eg = [tt]) : eg.push(tt) + } + function ig(tt) { + ;(fg = !0), hg(tt) + } + function jg() { + if (!gg && eg !== null) { + gg = !0 + var tt = 0, + et = C$2 + try { + var nt = eg + for (C$2 = 1; tt < nt.length; tt++) { + var rt = nt[tt] + do rt = rt(!0) + while (rt !== null) + } + ;(eg = null), (fg = !1) + } catch (it) { + throw (eg !== null && (eg = eg.slice(tt + 1)), ac(fc, jg), it) + } finally { + ;(C$2 = et), (gg = !1) + } + } + return null + } + var kg = [], + lg = 0, + mg = null, + ng = 0, + og = [], + pg = 0, + qg = null, + rg = 1, + sg = '' + function tg(tt, et) { + ;(kg[lg++] = ng), (kg[lg++] = mg), (mg = tt), (ng = et) + } + function ug(tt, et, nt) { + ;(og[pg++] = rg), (og[pg++] = sg), (og[pg++] = qg), (qg = tt) + var rt = rg + tt = sg + var it = 32 - oc(rt) - 1 + ;(rt &= ~(1 << it)), (nt += 1) + var ot = 32 - oc(et) + it + if (30 < ot) { + var at = it - (it % 5) + ;(ot = (rt & ((1 << at) - 1)).toString(32)), + (rt >>= at), + (it -= at), + (rg = (1 << (32 - oc(et) + it)) | (nt << it) | rt), + (sg = ot + tt) + } else (rg = (1 << ot) | (nt << it) | rt), (sg = tt) + } + function vg(tt) { + tt.return !== null && (tg(tt, 1), ug(tt, 1, 0)) + } + function wg(tt) { + for (; tt === mg; ) (mg = kg[--lg]), (kg[lg] = null), (ng = kg[--lg]), (kg[lg] = null) + for (; tt === qg; ) + (qg = og[--pg]), (og[pg] = null), (sg = og[--pg]), (og[pg] = null), (rg = og[--pg]), (og[pg] = null) + } + var xg = null, + yg = null, + I$4 = !1, + zg = null + function Ag(tt, et) { + var nt = Bg$1(5, null, null, 0) + ;(nt.elementType = 'DELETED'), + (nt.stateNode = et), + (nt.return = tt), + (et = tt.deletions), + et === null ? ((tt.deletions = [nt]), (tt.flags |= 16)) : et.push(nt) + } + function Cg(tt, et) { + switch (tt.tag) { + case 5: + var nt = tt.type + return ( + (et = et.nodeType !== 1 || nt.toLowerCase() !== et.nodeName.toLowerCase() ? null : et), + et !== null ? ((tt.stateNode = et), (xg = tt), (yg = Lf(et.firstChild)), !0) : !1 + ) + case 6: + return ( + (et = tt.pendingProps === '' || et.nodeType !== 3 ? null : et), + et !== null ? ((tt.stateNode = et), (xg = tt), (yg = null), !0) : !1 + ) + case 13: + return ( + (et = et.nodeType !== 8 ? null : et), + et !== null + ? ((nt = qg !== null ? { id: rg, overflow: sg } : null), + (tt.memoizedState = { dehydrated: et, treeContext: nt, retryLane: 1073741824 }), + (nt = Bg$1(18, null, null, 0)), + (nt.stateNode = et), + (nt.return = tt), + (tt.child = nt), + (xg = tt), + (yg = null), + !0) + : !1 + ) + default: + return !1 + } + } + function Dg(tt) { + return (tt.mode & 1) !== 0 && (tt.flags & 128) === 0 + } + function Eg(tt) { + if (I$4) { + var et = yg + if (et) { + var nt = et + if (!Cg(tt, et)) { + if (Dg(tt)) throw Error(p$a(418)) + et = Lf(nt.nextSibling) + var rt = xg + et && Cg(tt, et) ? Ag(rt, nt) : ((tt.flags = (tt.flags & -4097) | 2), (I$4 = !1), (xg = tt)) + } + } else { + if (Dg(tt)) throw Error(p$a(418)) + ;(tt.flags = (tt.flags & -4097) | 2), (I$4 = !1), (xg = tt) + } + } + } + function Fg(tt) { + for (tt = tt.return; tt !== null && tt.tag !== 5 && tt.tag !== 3 && tt.tag !== 13; ) tt = tt.return + xg = tt + } + function Gg(tt) { + if (tt !== xg) return !1 + if (!I$4) return Fg(tt), (I$4 = !0), !1 + var et + if ( + ((et = tt.tag !== 3) && + !(et = tt.tag !== 5) && + ((et = tt.type), (et = et !== 'head' && et !== 'body' && !Ef(tt.type, tt.memoizedProps))), + et && (et = yg)) + ) { + if (Dg(tt)) throw (Hg(), Error(p$a(418))) + for (; et; ) Ag(tt, et), (et = Lf(et.nextSibling)) + } + if ((Fg(tt), tt.tag === 13)) { + if (((tt = tt.memoizedState), (tt = tt !== null ? tt.dehydrated : null), !tt)) throw Error(p$a(317)) + e: { + for (tt = tt.nextSibling, et = 0; tt; ) { + if (tt.nodeType === 8) { + var nt = tt.data + if (nt === '/$') { + if (et === 0) { + yg = Lf(tt.nextSibling) + break e + } + et-- + } else (nt !== '$' && nt !== '$!' && nt !== '$?') || et++ + } + tt = tt.nextSibling + } + yg = null + } + } else yg = xg ? Lf(tt.stateNode.nextSibling) : null + return !0 + } + function Hg() { + for (var tt = yg; tt; ) tt = Lf(tt.nextSibling) + } + function Ig() { + ;(yg = xg = null), (I$4 = !1) + } + function Jg(tt) { + zg === null ? (zg = [tt]) : zg.push(tt) + } + var Kg = ua.ReactCurrentBatchConfig + function Lg(tt, et) { + if (tt && tt.defaultProps) { + ;(et = A$3({}, et)), (tt = tt.defaultProps) + for (var nt in tt) et[nt] === void 0 && (et[nt] = tt[nt]) + return et + } + return et + } + var Mg = Uf(null), + Ng = null, + Og = null, + Pg = null + function Qg() { + Pg = Og = Ng = null + } + function Rg(tt) { + var et = Mg.current + E$2(Mg), (tt._currentValue = et) + } + function Sg(tt, et, nt) { + for (; tt !== null; ) { + var rt = tt.alternate + if ( + ((tt.childLanes & et) !== et + ? ((tt.childLanes |= et), rt !== null && (rt.childLanes |= et)) + : rt !== null && (rt.childLanes & et) !== et && (rt.childLanes |= et), + tt === nt) + ) + break + tt = tt.return + } + } + function Tg(tt, et) { + ;(Ng = tt), + (Pg = Og = null), + (tt = tt.dependencies), + tt !== null && tt.firstContext !== null && (tt.lanes & et && (Ug = !0), (tt.firstContext = null)) + } + function Vg(tt) { + var et = tt._currentValue + if (Pg !== tt) + if (((tt = { context: tt, memoizedValue: et, next: null }), Og === null)) { + if (Ng === null) throw Error(p$a(308)) + ;(Og = tt), (Ng.dependencies = { lanes: 0, firstContext: tt }) + } else Og = Og.next = tt + return et + } + var Wg = null + function Xg(tt) { + Wg === null ? (Wg = [tt]) : Wg.push(tt) + } + function Yg(tt, et, nt, rt) { + var it = et.interleaved + return ( + it === null ? ((nt.next = nt), Xg(et)) : ((nt.next = it.next), (it.next = nt)), (et.interleaved = nt), Zg(tt, rt) + ) + } + function Zg(tt, et) { + tt.lanes |= et + var nt = tt.alternate + for (nt !== null && (nt.lanes |= et), nt = tt, tt = tt.return; tt !== null; ) + (tt.childLanes |= et), (nt = tt.alternate), nt !== null && (nt.childLanes |= et), (nt = tt), (tt = tt.return) + return nt.tag === 3 ? nt.stateNode : null + } + var $g = !1 + function ah(tt) { + tt.updateQueue = { + baseState: tt.memoizedState, + firstBaseUpdate: null, + lastBaseUpdate: null, + shared: { pending: null, interleaved: null, lanes: 0 }, + effects: null, + } + } + function bh(tt, et) { + ;(tt = tt.updateQueue), + et.updateQueue === tt && + (et.updateQueue = { + baseState: tt.baseState, + firstBaseUpdate: tt.firstBaseUpdate, + lastBaseUpdate: tt.lastBaseUpdate, + shared: tt.shared, + effects: tt.effects, + }) + } + function ch$1(tt, et) { + return { eventTime: tt, lane: et, tag: 0, payload: null, callback: null, next: null } + } + function dh$1(tt, et, nt) { + var rt = tt.updateQueue + if (rt === null) return null + if (((rt = rt.shared), K$7 & 2)) { + var it = rt.pending + return it === null ? (et.next = et) : ((et.next = it.next), (it.next = et)), (rt.pending = et), Zg(tt, nt) + } + return ( + (it = rt.interleaved), + it === null ? ((et.next = et), Xg(rt)) : ((et.next = it.next), (it.next = et)), + (rt.interleaved = et), + Zg(tt, nt) + ) + } + function eh(tt, et, nt) { + if (((et = et.updateQueue), et !== null && ((et = et.shared), (nt & 4194240) !== 0))) { + var rt = et.lanes + ;(rt &= tt.pendingLanes), (nt |= rt), (et.lanes = nt), Cc(tt, nt) + } + } + function fh(tt, et) { + var nt = tt.updateQueue, + rt = tt.alternate + if (rt !== null && ((rt = rt.updateQueue), nt === rt)) { + var it = null, + ot = null + if (((nt = nt.firstBaseUpdate), nt !== null)) { + do { + var at = { + eventTime: nt.eventTime, + lane: nt.lane, + tag: nt.tag, + payload: nt.payload, + callback: nt.callback, + next: null, + } + ot === null ? (it = ot = at) : (ot = ot.next = at), (nt = nt.next) + } while (nt !== null) + ot === null ? (it = ot = et) : (ot = ot.next = et) + } else it = ot = et + ;(nt = { + baseState: rt.baseState, + firstBaseUpdate: it, + lastBaseUpdate: ot, + shared: rt.shared, + effects: rt.effects, + }), + (tt.updateQueue = nt) + return + } + ;(tt = nt.lastBaseUpdate), tt === null ? (nt.firstBaseUpdate = et) : (tt.next = et), (nt.lastBaseUpdate = et) + } + function gh(tt, et, nt, rt) { + var it = tt.updateQueue + $g = !1 + var ot = it.firstBaseUpdate, + at = it.lastBaseUpdate, + st = it.shared.pending + if (st !== null) { + it.shared.pending = null + var lt = st, + ct = lt.next + ;(lt.next = null), at === null ? (ot = ct) : (at.next = ct), (at = lt) + var ut = tt.alternate + ut !== null && + ((ut = ut.updateQueue), + (st = ut.lastBaseUpdate), + st !== at && (st === null ? (ut.firstBaseUpdate = ct) : (st.next = ct), (ut.lastBaseUpdate = lt))) + } + if (ot !== null) { + var ht = it.baseState + ;(at = 0), (ut = ct = lt = null), (st = ot) + do { + var dt = st.lane, + pt = st.eventTime + if ((rt & dt) === dt) { + ut !== null && + (ut = ut.next = + { eventTime: pt, lane: 0, tag: st.tag, payload: st.payload, callback: st.callback, next: null }) + e: { + var mt = tt, + gt = st + switch (((dt = et), (pt = nt), gt.tag)) { + case 1: + if (((mt = gt.payload), typeof mt == 'function')) { + ht = mt.call(pt, ht, dt) + break e + } + ht = mt + break e + case 3: + mt.flags = (mt.flags & -65537) | 128 + case 0: + if (((mt = gt.payload), (dt = typeof mt == 'function' ? mt.call(pt, ht, dt) : mt), dt == null)) break e + ht = A$3({}, ht, dt) + break e + case 2: + $g = !0 + } + } + st.callback !== null && + st.lane !== 0 && + ((tt.flags |= 64), (dt = it.effects), dt === null ? (it.effects = [st]) : dt.push(st)) + } else + (pt = { eventTime: pt, lane: dt, tag: st.tag, payload: st.payload, callback: st.callback, next: null }), + ut === null ? ((ct = ut = pt), (lt = ht)) : (ut = ut.next = pt), + (at |= dt) + if (((st = st.next), st === null)) { + if (((st = it.shared.pending), st === null)) break + ;(dt = st), (st = dt.next), (dt.next = null), (it.lastBaseUpdate = dt), (it.shared.pending = null) + } + } while (1) + if ( + (ut === null && (lt = ht), + (it.baseState = lt), + (it.firstBaseUpdate = ct), + (it.lastBaseUpdate = ut), + (et = it.shared.interleaved), + et !== null) + ) { + it = et + do (at |= it.lane), (it = it.next) + while (it !== et) + } else ot === null && (it.shared.lanes = 0) + ;(hh |= at), (tt.lanes = at), (tt.memoizedState = ht) + } + } + function ih(tt, et, nt) { + if (((tt = et.effects), (et.effects = null), tt !== null)) + for (et = 0; et < tt.length; et++) { + var rt = tt[et], + it = rt.callback + if (it !== null) { + if (((rt.callback = null), (rt = nt), typeof it != 'function')) throw Error(p$a(191, it)) + it.call(rt) + } + } + } + var jh = new aa.Component().refs + function kh(tt, et, nt, rt) { + ;(et = tt.memoizedState), + (nt = nt(rt, et)), + (nt = nt == null ? et : A$3({}, et, nt)), + (tt.memoizedState = nt), + tt.lanes === 0 && (tt.updateQueue.baseState = nt) + } + var nh = { + isMounted: function (tt) { + return (tt = tt._reactInternals) ? Vb(tt) === tt : !1 + }, + enqueueSetState: function (tt, et, nt) { + tt = tt._reactInternals + var rt = L$3(), + it = lh(tt), + ot = ch$1(rt, it) + ;(ot.payload = et), + nt != null && (ot.callback = nt), + (et = dh$1(tt, ot, it)), + et !== null && (mh(et, tt, it, rt), eh(et, tt, it)) + }, + enqueueReplaceState: function (tt, et, nt) { + tt = tt._reactInternals + var rt = L$3(), + it = lh(tt), + ot = ch$1(rt, it) + ;(ot.tag = 1), + (ot.payload = et), + nt != null && (ot.callback = nt), + (et = dh$1(tt, ot, it)), + et !== null && (mh(et, tt, it, rt), eh(et, tt, it)) + }, + enqueueForceUpdate: function (tt, et) { + tt = tt._reactInternals + var nt = L$3(), + rt = lh(tt), + it = ch$1(nt, rt) + ;(it.tag = 2), + et != null && (it.callback = et), + (et = dh$1(tt, it, rt)), + et !== null && (mh(et, tt, rt, nt), eh(et, tt, rt)) + }, + } + function oh(tt, et, nt, rt, it, ot, at) { + return ( + (tt = tt.stateNode), + typeof tt.shouldComponentUpdate == 'function' + ? tt.shouldComponentUpdate(rt, ot, at) + : et.prototype && et.prototype.isPureReactComponent + ? !Ie(nt, rt) || !Ie(it, ot) + : !0 + ) + } + function ph(tt, et, nt) { + var rt = !1, + it = Vf, + ot = et.contextType + return ( + typeof ot == 'object' && ot !== null + ? (ot = Vg(ot)) + : ((it = Zf(et) ? Xf : H$3.current), (rt = et.contextTypes), (ot = (rt = rt != null) ? Yf(tt, it) : Vf)), + (et = new et(nt, ot)), + (tt.memoizedState = et.state !== null && et.state !== void 0 ? et.state : null), + (et.updater = nh), + (tt.stateNode = et), + (et._reactInternals = tt), + rt && + ((tt = tt.stateNode), + (tt.__reactInternalMemoizedUnmaskedChildContext = it), + (tt.__reactInternalMemoizedMaskedChildContext = ot)), + et + ) + } + function qh(tt, et, nt, rt) { + ;(tt = et.state), + typeof et.componentWillReceiveProps == 'function' && et.componentWillReceiveProps(nt, rt), + typeof et.UNSAFE_componentWillReceiveProps == 'function' && et.UNSAFE_componentWillReceiveProps(nt, rt), + et.state !== tt && nh.enqueueReplaceState(et, et.state, null) + } + function rh$1(tt, et, nt, rt) { + var it = tt.stateNode + ;(it.props = nt), (it.state = tt.memoizedState), (it.refs = jh), ah(tt) + var ot = et.contextType + typeof ot == 'object' && ot !== null + ? (it.context = Vg(ot)) + : ((ot = Zf(et) ? Xf : H$3.current), (it.context = Yf(tt, ot))), + (it.state = tt.memoizedState), + (ot = et.getDerivedStateFromProps), + typeof ot == 'function' && (kh(tt, et, ot, nt), (it.state = tt.memoizedState)), + typeof et.getDerivedStateFromProps == 'function' || + typeof it.getSnapshotBeforeUpdate == 'function' || + (typeof it.UNSAFE_componentWillMount != 'function' && typeof it.componentWillMount != 'function') || + ((et = it.state), + typeof it.componentWillMount == 'function' && it.componentWillMount(), + typeof it.UNSAFE_componentWillMount == 'function' && it.UNSAFE_componentWillMount(), + et !== it.state && nh.enqueueReplaceState(it, it.state, null), + gh(tt, nt, it, rt), + (it.state = tt.memoizedState)), + typeof it.componentDidMount == 'function' && (tt.flags |= 4194308) + } + function sh$1(tt, et, nt) { + if (((tt = nt.ref), tt !== null && typeof tt != 'function' && typeof tt != 'object')) { + if (nt._owner) { + if (((nt = nt._owner), nt)) { + if (nt.tag !== 1) throw Error(p$a(309)) + var rt = nt.stateNode + } + if (!rt) throw Error(p$a(147, tt)) + var it = rt, + ot = '' + tt + return et !== null && et.ref !== null && typeof et.ref == 'function' && et.ref._stringRef === ot + ? et.ref + : ((et = function (at) { + var st = it.refs + st === jh && (st = it.refs = {}), at === null ? delete st[ot] : (st[ot] = at) + }), + (et._stringRef = ot), + et) + } + if (typeof tt != 'string') throw Error(p$a(284)) + if (!nt._owner) throw Error(p$a(290, tt)) + } + return tt + } + function th(tt, et) { + throw ( + ((tt = Object.prototype.toString.call(et)), + Error(p$a(31, tt === '[object Object]' ? 'object with keys {' + Object.keys(et).join(', ') + '}' : tt))) + ) + } + function uh(tt) { + var et = tt._init + return et(tt._payload) + } + function vh(tt) { + function et(bt, vt) { + if (tt) { + var xt = bt.deletions + xt === null ? ((bt.deletions = [vt]), (bt.flags |= 16)) : xt.push(vt) + } + } + function nt(bt, vt) { + if (!tt) return null + for (; vt !== null; ) et(bt, vt), (vt = vt.sibling) + return null + } + function rt(bt, vt) { + for (bt = new Map(); vt !== null; ) vt.key !== null ? bt.set(vt.key, vt) : bt.set(vt.index, vt), (vt = vt.sibling) + return bt + } + function it(bt, vt) { + return (bt = wh(bt, vt)), (bt.index = 0), (bt.sibling = null), bt + } + function ot(bt, vt, xt) { + return ( + (bt.index = xt), + tt + ? ((xt = bt.alternate), + xt !== null ? ((xt = xt.index), xt < vt ? ((bt.flags |= 2), vt) : xt) : ((bt.flags |= 2), vt)) + : ((bt.flags |= 1048576), vt) + ) + } + function at(bt) { + return tt && bt.alternate === null && (bt.flags |= 2), bt + } + function st(bt, vt, xt, kt) { + return vt === null || vt.tag !== 6 + ? ((vt = xh(xt, bt.mode, kt)), (vt.return = bt), vt) + : ((vt = it(vt, xt)), (vt.return = bt), vt) + } + function lt(bt, vt, xt, kt) { + var St = xt.type + return St === ya + ? ut(bt, vt, xt.props.children, kt, xt.key) + : vt !== null && + (vt.elementType === St || (typeof St == 'object' && St !== null && St.$$typeof === Ha && uh(St) === vt.type)) + ? ((kt = it(vt, xt.props)), (kt.ref = sh$1(bt, vt, xt)), (kt.return = bt), kt) + : ((kt = yh(xt.type, xt.key, xt.props, null, bt.mode, kt)), (kt.ref = sh$1(bt, vt, xt)), (kt.return = bt), kt) + } + function ct(bt, vt, xt, kt) { + return vt === null || + vt.tag !== 4 || + vt.stateNode.containerInfo !== xt.containerInfo || + vt.stateNode.implementation !== xt.implementation + ? ((vt = zh(xt, bt.mode, kt)), (vt.return = bt), vt) + : ((vt = it(vt, xt.children || [])), (vt.return = bt), vt) + } + function ut(bt, vt, xt, kt, St) { + return vt === null || vt.tag !== 7 + ? ((vt = Ah(xt, bt.mode, kt, St)), (vt.return = bt), vt) + : ((vt = it(vt, xt)), (vt.return = bt), vt) + } + function ht(bt, vt, xt) { + if ((typeof vt == 'string' && vt !== '') || typeof vt == 'number') + return (vt = xh('' + vt, bt.mode, xt)), (vt.return = bt), vt + if (typeof vt == 'object' && vt !== null) { + switch (vt.$$typeof) { + case va: + return ( + (xt = yh(vt.type, vt.key, vt.props, null, bt.mode, xt)), + (xt.ref = sh$1(bt, null, vt)), + (xt.return = bt), + xt + ) + case wa: + return (vt = zh(vt, bt.mode, xt)), (vt.return = bt), vt + case Ha: + var kt = vt._init + return ht(bt, kt(vt._payload), xt) + } + if (eb(vt) || Ka(vt)) return (vt = Ah(vt, bt.mode, xt, null)), (vt.return = bt), vt + th(bt, vt) + } + return null + } + function dt(bt, vt, xt, kt) { + var St = vt !== null ? vt.key : null + if ((typeof xt == 'string' && xt !== '') || typeof xt == 'number') + return St !== null ? null : st(bt, vt, '' + xt, kt) + if (typeof xt == 'object' && xt !== null) { + switch (xt.$$typeof) { + case va: + return xt.key === St ? lt(bt, vt, xt, kt) : null + case wa: + return xt.key === St ? ct(bt, vt, xt, kt) : null + case Ha: + return (St = xt._init), dt(bt, vt, St(xt._payload), kt) + } + if (eb(xt) || Ka(xt)) return St !== null ? null : ut(bt, vt, xt, kt, null) + th(bt, xt) + } + return null + } + function pt(bt, vt, xt, kt, St) { + if ((typeof kt == 'string' && kt !== '') || typeof kt == 'number') + return (bt = bt.get(xt) || null), st(vt, bt, '' + kt, St) + if (typeof kt == 'object' && kt !== null) { + switch (kt.$$typeof) { + case va: + return (bt = bt.get(kt.key === null ? xt : kt.key) || null), lt(vt, bt, kt, St) + case wa: + return (bt = bt.get(kt.key === null ? xt : kt.key) || null), ct(vt, bt, kt, St) + case Ha: + var Tt = kt._init + return pt(bt, vt, xt, Tt(kt._payload), St) + } + if (eb(kt) || Ka(kt)) return (bt = bt.get(xt) || null), ut(vt, bt, kt, St, null) + th(vt, kt) + } + return null + } + function mt(bt, vt, xt, kt) { + for (var St = null, Tt = null, At = vt, Et = (vt = 0), $t = null; At !== null && Et < xt.length; Et++) { + At.index > Et ? (($t = At), (At = null)) : ($t = At.sibling) + var Dt = dt(bt, At, xt[Et], kt) + if (Dt === null) { + At === null && (At = $t) + break + } + tt && At && Dt.alternate === null && et(bt, At), + (vt = ot(Dt, vt, Et)), + Tt === null ? (St = Dt) : (Tt.sibling = Dt), + (Tt = Dt), + (At = $t) + } + if (Et === xt.length) return nt(bt, At), I$4 && tg(bt, Et), St + if (At === null) { + for (; Et < xt.length; Et++) + (At = ht(bt, xt[Et], kt)), + At !== null && ((vt = ot(At, vt, Et)), Tt === null ? (St = At) : (Tt.sibling = At), (Tt = At)) + return I$4 && tg(bt, Et), St + } + for (At = rt(bt, At); Et < xt.length; Et++) + ($t = pt(At, bt, Et, xt[Et], kt)), + $t !== null && + (tt && $t.alternate !== null && At.delete($t.key === null ? Et : $t.key), + (vt = ot($t, vt, Et)), + Tt === null ? (St = $t) : (Tt.sibling = $t), + (Tt = $t)) + return ( + tt && + At.forEach(function (jt) { + return et(bt, jt) + }), + I$4 && tg(bt, Et), + St + ) + } + function gt(bt, vt, xt, kt) { + var St = Ka(xt) + if (typeof St != 'function') throw Error(p$a(150)) + if (((xt = St.call(xt)), xt == null)) throw Error(p$a(151)) + for ( + var Tt = (St = null), At = vt, Et = (vt = 0), $t = null, Dt = xt.next(); + At !== null && !Dt.done; + Et++, Dt = xt.next() + ) { + At.index > Et ? (($t = At), (At = null)) : ($t = At.sibling) + var jt = dt(bt, At, Dt.value, kt) + if (jt === null) { + At === null && (At = $t) + break + } + tt && At && jt.alternate === null && et(bt, At), + (vt = ot(jt, vt, Et)), + Tt === null ? (St = jt) : (Tt.sibling = jt), + (Tt = jt), + (At = $t) + } + if (Dt.done) return nt(bt, At), I$4 && tg(bt, Et), St + if (At === null) { + for (; !Dt.done; Et++, Dt = xt.next()) + (Dt = ht(bt, Dt.value, kt)), + Dt !== null && ((vt = ot(Dt, vt, Et)), Tt === null ? (St = Dt) : (Tt.sibling = Dt), (Tt = Dt)) + return I$4 && tg(bt, Et), St + } + for (At = rt(bt, At); !Dt.done; Et++, Dt = xt.next()) + (Dt = pt(At, bt, Et, Dt.value, kt)), + Dt !== null && + (tt && Dt.alternate !== null && At.delete(Dt.key === null ? Et : Dt.key), + (vt = ot(Dt, vt, Et)), + Tt === null ? (St = Dt) : (Tt.sibling = Dt), + (Tt = Dt)) + return ( + tt && + At.forEach(function (Pt) { + return et(bt, Pt) + }), + I$4 && tg(bt, Et), + St + ) + } + function yt(bt, vt, xt, kt) { + if ( + (typeof xt == 'object' && xt !== null && xt.type === ya && xt.key === null && (xt = xt.props.children), + typeof xt == 'object' && xt !== null) + ) { + switch (xt.$$typeof) { + case va: + e: { + for (var St = xt.key, Tt = vt; Tt !== null; ) { + if (Tt.key === St) { + if (((St = xt.type), St === ya)) { + if (Tt.tag === 7) { + nt(bt, Tt.sibling), (vt = it(Tt, xt.props.children)), (vt.return = bt), (bt = vt) + break e + } + } else if ( + Tt.elementType === St || + (typeof St == 'object' && St !== null && St.$$typeof === Ha && uh(St) === Tt.type) + ) { + nt(bt, Tt.sibling), + (vt = it(Tt, xt.props)), + (vt.ref = sh$1(bt, Tt, xt)), + (vt.return = bt), + (bt = vt) + break e + } + nt(bt, Tt) + break + } else et(bt, Tt) + Tt = Tt.sibling + } + xt.type === ya + ? ((vt = Ah(xt.props.children, bt.mode, kt, xt.key)), (vt.return = bt), (bt = vt)) + : ((kt = yh(xt.type, xt.key, xt.props, null, bt.mode, kt)), + (kt.ref = sh$1(bt, vt, xt)), + (kt.return = bt), + (bt = kt)) + } + return at(bt) + case wa: + e: { + for (Tt = xt.key; vt !== null; ) { + if (vt.key === Tt) + if ( + vt.tag === 4 && + vt.stateNode.containerInfo === xt.containerInfo && + vt.stateNode.implementation === xt.implementation + ) { + nt(bt, vt.sibling), (vt = it(vt, xt.children || [])), (vt.return = bt), (bt = vt) + break e + } else { + nt(bt, vt) + break + } + else et(bt, vt) + vt = vt.sibling + } + ;(vt = zh(xt, bt.mode, kt)), (vt.return = bt), (bt = vt) + } + return at(bt) + case Ha: + return (Tt = xt._init), yt(bt, vt, Tt(xt._payload), kt) + } + if (eb(xt)) return mt(bt, vt, xt, kt) + if (Ka(xt)) return gt(bt, vt, xt, kt) + th(bt, xt) + } + return (typeof xt == 'string' && xt !== '') || typeof xt == 'number' + ? ((xt = '' + xt), + vt !== null && vt.tag === 6 + ? (nt(bt, vt.sibling), (vt = it(vt, xt)), (vt.return = bt), (bt = vt)) + : (nt(bt, vt), (vt = xh(xt, bt.mode, kt)), (vt.return = bt), (bt = vt)), + at(bt)) + : nt(bt, vt) + } + return yt + } + var Bh = vh(!0), + Ch$1 = vh(!1), + Dh = {}, + Eh = Uf(Dh), + Fh = Uf(Dh), + Gh = Uf(Dh) + function Hh(tt) { + if (tt === Dh) throw Error(p$a(174)) + return tt + } + function Ih(tt, et) { + switch ((G$3(Gh, et), G$3(Fh, tt), G$3(Eh, Dh), (tt = et.nodeType), tt)) { + case 9: + case 11: + et = (et = et.documentElement) ? et.namespaceURI : lb(null, '') + break + default: + ;(tt = tt === 8 ? et.parentNode : et), (et = tt.namespaceURI || null), (tt = tt.tagName), (et = lb(et, tt)) + } + E$2(Eh), G$3(Eh, et) + } + function Jh() { + E$2(Eh), E$2(Fh), E$2(Gh) + } + function Kh$1(tt) { + Hh(Gh.current) + var et = Hh(Eh.current), + nt = lb(et, tt.type) + et !== nt && (G$3(Fh, tt), G$3(Eh, nt)) + } + function Lh(tt) { + Fh.current === tt && (E$2(Eh), E$2(Fh)) + } + var M$3 = Uf(0) + function Mh(tt) { + for (var et = tt; et !== null; ) { + if (et.tag === 13) { + var nt = et.memoizedState + if (nt !== null && ((nt = nt.dehydrated), nt === null || nt.data === '$?' || nt.data === '$!')) return et + } else if (et.tag === 19 && et.memoizedProps.revealOrder !== void 0) { + if (et.flags & 128) return et + } else if (et.child !== null) { + ;(et.child.return = et), (et = et.child) + continue + } + if (et === tt) break + for (; et.sibling === null; ) { + if (et.return === null || et.return === tt) return null + et = et.return + } + ;(et.sibling.return = et.return), (et = et.sibling) + } + return null + } + var Nh = [] + function Oh() { + for (var tt = 0; tt < Nh.length; tt++) Nh[tt]._workInProgressVersionPrimary = null + Nh.length = 0 + } + var Ph = ua.ReactCurrentDispatcher, + Qh = ua.ReactCurrentBatchConfig, + Rh = 0, + N$3 = null, + O$1 = null, + P$4 = null, + Sh = !1, + Th = !1, + Uh = 0, + Vh = 0 + function Q$2() { + throw Error(p$a(321)) + } + function Wh(tt, et) { + if (et === null) return !1 + for (var nt = 0; nt < et.length && nt < tt.length; nt++) if (!He$1(tt[nt], et[nt])) return !1 + return !0 + } + function Xh(tt, et, nt, rt, it, ot) { + if ( + ((Rh = ot), + (N$3 = et), + (et.memoizedState = null), + (et.updateQueue = null), + (et.lanes = 0), + (Ph.current = tt === null || tt.memoizedState === null ? Yh : Zh), + (tt = nt(rt, it)), + Th) + ) { + ot = 0 + do { + if (((Th = !1), (Uh = 0), 25 <= ot)) throw Error(p$a(301)) + ;(ot += 1), (P$4 = O$1 = null), (et.updateQueue = null), (Ph.current = $h), (tt = nt(rt, it)) + } while (Th) + } + if ( + ((Ph.current = ai), (et = O$1 !== null && O$1.next !== null), (Rh = 0), (P$4 = O$1 = N$3 = null), (Sh = !1), et) + ) + throw Error(p$a(300)) + return tt + } + function bi() { + var tt = Uh !== 0 + return (Uh = 0), tt + } + function ci() { + var tt = { memoizedState: null, baseState: null, baseQueue: null, queue: null, next: null } + return P$4 === null ? (N$3.memoizedState = P$4 = tt) : (P$4 = P$4.next = tt), P$4 + } + function di() { + if (O$1 === null) { + var tt = N$3.alternate + tt = tt !== null ? tt.memoizedState : null + } else tt = O$1.next + var et = P$4 === null ? N$3.memoizedState : P$4.next + if (et !== null) (P$4 = et), (O$1 = tt) + else { + if (tt === null) throw Error(p$a(310)) + ;(O$1 = tt), + (tt = { + memoizedState: O$1.memoizedState, + baseState: O$1.baseState, + baseQueue: O$1.baseQueue, + queue: O$1.queue, + next: null, + }), + P$4 === null ? (N$3.memoizedState = P$4 = tt) : (P$4 = P$4.next = tt) + } + return P$4 + } + function ei(tt, et) { + return typeof et == 'function' ? et(tt) : et + } + function fi(tt) { + var et = di(), + nt = et.queue + if (nt === null) throw Error(p$a(311)) + nt.lastRenderedReducer = tt + var rt = O$1, + it = rt.baseQueue, + ot = nt.pending + if (ot !== null) { + if (it !== null) { + var at = it.next + ;(it.next = ot.next), (ot.next = at) + } + ;(rt.baseQueue = it = ot), (nt.pending = null) + } + if (it !== null) { + ;(ot = it.next), (rt = rt.baseState) + var st = (at = null), + lt = null, + ct = ot + do { + var ut = ct.lane + if ((Rh & ut) === ut) + lt !== null && + (lt = lt.next = + { lane: 0, action: ct.action, hasEagerState: ct.hasEagerState, eagerState: ct.eagerState, next: null }), + (rt = ct.hasEagerState ? ct.eagerState : tt(rt, ct.action)) + else { + var ht = { + lane: ut, + action: ct.action, + hasEagerState: ct.hasEagerState, + eagerState: ct.eagerState, + next: null, + } + lt === null ? ((st = lt = ht), (at = rt)) : (lt = lt.next = ht), (N$3.lanes |= ut), (hh |= ut) + } + ct = ct.next + } while (ct !== null && ct !== ot) + lt === null ? (at = rt) : (lt.next = st), + He$1(rt, et.memoizedState) || (Ug = !0), + (et.memoizedState = rt), + (et.baseState = at), + (et.baseQueue = lt), + (nt.lastRenderedState = rt) + } + if (((tt = nt.interleaved), tt !== null)) { + it = tt + do (ot = it.lane), (N$3.lanes |= ot), (hh |= ot), (it = it.next) + while (it !== tt) + } else it === null && (nt.lanes = 0) + return [et.memoizedState, nt.dispatch] + } + function gi(tt) { + var et = di(), + nt = et.queue + if (nt === null) throw Error(p$a(311)) + nt.lastRenderedReducer = tt + var rt = nt.dispatch, + it = nt.pending, + ot = et.memoizedState + if (it !== null) { + nt.pending = null + var at = (it = it.next) + do (ot = tt(ot, at.action)), (at = at.next) + while (at !== it) + He$1(ot, et.memoizedState) || (Ug = !0), + (et.memoizedState = ot), + et.baseQueue === null && (et.baseState = ot), + (nt.lastRenderedState = ot) + } + return [ot, rt] + } + function hi() {} + function ii(tt, et) { + var nt = N$3, + rt = di(), + it = et(), + ot = !He$1(rt.memoizedState, it) + if ( + (ot && ((rt.memoizedState = it), (Ug = !0)), + (rt = rt.queue), + ji(ki.bind(null, nt, rt, tt), [tt]), + rt.getSnapshot !== et || ot || (P$4 !== null && P$4.memoizedState.tag & 1)) + ) { + if (((nt.flags |= 2048), li(9, mi.bind(null, nt, rt, it, et), void 0, null), R$2 === null)) throw Error(p$a(349)) + Rh & 30 || ni(nt, et, it) + } + return it + } + function ni(tt, et, nt) { + ;(tt.flags |= 16384), + (tt = { getSnapshot: et, value: nt }), + (et = N$3.updateQueue), + et === null + ? ((et = { lastEffect: null, stores: null }), (N$3.updateQueue = et), (et.stores = [tt])) + : ((nt = et.stores), nt === null ? (et.stores = [tt]) : nt.push(tt)) + } + function mi(tt, et, nt, rt) { + ;(et.value = nt), (et.getSnapshot = rt), oi(et) && pi$3(tt) + } + function ki(tt, et, nt) { + return nt(function () { + oi(et) && pi$3(tt) + }) + } + function oi(tt) { + var et = tt.getSnapshot + tt = tt.value + try { + var nt = et() + return !He$1(tt, nt) + } catch { + return !0 + } + } + function pi$3(tt) { + var et = Zg(tt, 1) + et !== null && mh(et, tt, 1, -1) + } + function qi(tt) { + var et = ci() + return ( + typeof tt == 'function' && (tt = tt()), + (et.memoizedState = et.baseState = tt), + (tt = { + pending: null, + interleaved: null, + lanes: 0, + dispatch: null, + lastRenderedReducer: ei, + lastRenderedState: tt, + }), + (et.queue = tt), + (tt = tt.dispatch = ri.bind(null, N$3, tt)), + [et.memoizedState, tt] + ) + } + function li(tt, et, nt, rt) { + return ( + (tt = { tag: tt, create: et, destroy: nt, deps: rt, next: null }), + (et = N$3.updateQueue), + et === null + ? ((et = { lastEffect: null, stores: null }), (N$3.updateQueue = et), (et.lastEffect = tt.next = tt)) + : ((nt = et.lastEffect), + nt === null + ? (et.lastEffect = tt.next = tt) + : ((rt = nt.next), (nt.next = tt), (tt.next = rt), (et.lastEffect = tt))), + tt + ) + } + function si() { + return di().memoizedState + } + function ti(tt, et, nt, rt) { + var it = ci() + ;(N$3.flags |= tt), (it.memoizedState = li(1 | et, nt, void 0, rt === void 0 ? null : rt)) + } + function ui(tt, et, nt, rt) { + var it = di() + rt = rt === void 0 ? null : rt + var ot = void 0 + if (O$1 !== null) { + var at = O$1.memoizedState + if (((ot = at.destroy), rt !== null && Wh(rt, at.deps))) { + it.memoizedState = li(et, nt, ot, rt) + return + } + } + ;(N$3.flags |= tt), (it.memoizedState = li(1 | et, nt, ot, rt)) + } + function vi(tt, et) { + return ti(8390656, 8, tt, et) + } + function ji(tt, et) { + return ui(2048, 8, tt, et) + } + function wi(tt, et) { + return ui(4, 2, tt, et) + } + function xi(tt, et) { + return ui(4, 4, tt, et) + } + function yi(tt, et) { + if (typeof et == 'function') + return ( + (tt = tt()), + et(tt), + function () { + et(null) + } + ) + if (et != null) + return ( + (tt = tt()), + (et.current = tt), + function () { + et.current = null + } + ) + } + function zi(tt, et, nt) { + return (nt = nt != null ? nt.concat([tt]) : null), ui(4, 4, yi.bind(null, et, tt), nt) + } + function Ai() {} + function Bi(tt, et) { + var nt = di() + et = et === void 0 ? null : et + var rt = nt.memoizedState + return rt !== null && et !== null && Wh(et, rt[1]) ? rt[0] : ((nt.memoizedState = [tt, et]), tt) + } + function Ci(tt, et) { + var nt = di() + et = et === void 0 ? null : et + var rt = nt.memoizedState + return rt !== null && et !== null && Wh(et, rt[1]) ? rt[0] : ((tt = tt()), (nt.memoizedState = [tt, et]), tt) + } + function Di(tt, et, nt) { + return Rh & 21 + ? (He$1(nt, et) || ((nt = yc()), (N$3.lanes |= nt), (hh |= nt), (tt.baseState = !0)), et) + : (tt.baseState && ((tt.baseState = !1), (Ug = !0)), (tt.memoizedState = nt)) + } + function Ei(tt, et) { + var nt = C$2 + ;(C$2 = nt !== 0 && 4 > nt ? nt : 4), tt(!0) + var rt = Qh.transition + Qh.transition = {} + try { + tt(!1), et() + } finally { + ;(C$2 = nt), (Qh.transition = rt) + } + } + function Fi() { + return di().memoizedState + } + function Gi(tt, et, nt) { + var rt = lh(tt) + if (((nt = { lane: rt, action: nt, hasEagerState: !1, eagerState: null, next: null }), Hi(tt))) Ii(et, nt) + else if (((nt = Yg(tt, et, nt, rt)), nt !== null)) { + var it = L$3() + mh(nt, tt, rt, it), Ji(nt, et, rt) + } + } + function ri(tt, et, nt) { + var rt = lh(tt), + it = { lane: rt, action: nt, hasEagerState: !1, eagerState: null, next: null } + if (Hi(tt)) Ii(et, it) + else { + var ot = tt.alternate + if (tt.lanes === 0 && (ot === null || ot.lanes === 0) && ((ot = et.lastRenderedReducer), ot !== null)) + try { + var at = et.lastRenderedState, + st = ot(at, nt) + if (((it.hasEagerState = !0), (it.eagerState = st), He$1(st, at))) { + var lt = et.interleaved + lt === null ? ((it.next = it), Xg(et)) : ((it.next = lt.next), (lt.next = it)), (et.interleaved = it) + return + } + } catch { + } finally { + } + ;(nt = Yg(tt, et, it, rt)), nt !== null && ((it = L$3()), mh(nt, tt, rt, it), Ji(nt, et, rt)) + } + } + function Hi(tt) { + var et = tt.alternate + return tt === N$3 || (et !== null && et === N$3) + } + function Ii(tt, et) { + Th = Sh = !0 + var nt = tt.pending + nt === null ? (et.next = et) : ((et.next = nt.next), (nt.next = et)), (tt.pending = et) + } + function Ji(tt, et, nt) { + if (nt & 4194240) { + var rt = et.lanes + ;(rt &= tt.pendingLanes), (nt |= rt), (et.lanes = nt), Cc(tt, nt) + } + } + var ai = { + readContext: Vg, + useCallback: Q$2, + useContext: Q$2, + useEffect: Q$2, + useImperativeHandle: Q$2, + useInsertionEffect: Q$2, + useLayoutEffect: Q$2, + useMemo: Q$2, + useReducer: Q$2, + useRef: Q$2, + useState: Q$2, + useDebugValue: Q$2, + useDeferredValue: Q$2, + useTransition: Q$2, + useMutableSource: Q$2, + useSyncExternalStore: Q$2, + useId: Q$2, + unstable_isNewReconciler: !1, + }, + Yh = { + readContext: Vg, + useCallback: function (tt, et) { + return (ci().memoizedState = [tt, et === void 0 ? null : et]), tt + }, + useContext: Vg, + useEffect: vi, + useImperativeHandle: function (tt, et, nt) { + return (nt = nt != null ? nt.concat([tt]) : null), ti(4194308, 4, yi.bind(null, et, tt), nt) + }, + useLayoutEffect: function (tt, et) { + return ti(4194308, 4, tt, et) + }, + useInsertionEffect: function (tt, et) { + return ti(4, 2, tt, et) + }, + useMemo: function (tt, et) { + var nt = ci() + return (et = et === void 0 ? null : et), (tt = tt()), (nt.memoizedState = [tt, et]), tt + }, + useReducer: function (tt, et, nt) { + var rt = ci() + return ( + (et = nt !== void 0 ? nt(et) : et), + (rt.memoizedState = rt.baseState = et), + (tt = { + pending: null, + interleaved: null, + lanes: 0, + dispatch: null, + lastRenderedReducer: tt, + lastRenderedState: et, + }), + (rt.queue = tt), + (tt = tt.dispatch = Gi.bind(null, N$3, tt)), + [rt.memoizedState, tt] + ) + }, + useRef: function (tt) { + var et = ci() + return (tt = { current: tt }), (et.memoizedState = tt) + }, + useState: qi, + useDebugValue: Ai, + useDeferredValue: function (tt) { + return (ci().memoizedState = tt) + }, + useTransition: function () { + var tt = qi(!1), + et = tt[0] + return (tt = Ei.bind(null, tt[1])), (ci().memoizedState = tt), [et, tt] + }, + useMutableSource: function () {}, + useSyncExternalStore: function (tt, et, nt) { + var rt = N$3, + it = ci() + if (I$4) { + if (nt === void 0) throw Error(p$a(407)) + nt = nt() + } else { + if (((nt = et()), R$2 === null)) throw Error(p$a(349)) + Rh & 30 || ni(rt, et, nt) + } + it.memoizedState = nt + var ot = { value: nt, getSnapshot: et } + return ( + (it.queue = ot), + vi(ki.bind(null, rt, ot, tt), [tt]), + (rt.flags |= 2048), + li(9, mi.bind(null, rt, ot, nt, et), void 0, null), + nt + ) + }, + useId: function () { + var tt = ci(), + et = R$2.identifierPrefix + if (I$4) { + var nt = sg, + rt = rg + ;(nt = (rt & ~(1 << (32 - oc(rt) - 1))).toString(32) + nt), + (et = ':' + et + 'R' + nt), + (nt = Uh++), + 0 < nt && (et += 'H' + nt.toString(32)), + (et += ':') + } else (nt = Vh++), (et = ':' + et + 'r' + nt.toString(32) + ':') + return (tt.memoizedState = et) + }, + unstable_isNewReconciler: !1, + }, + Zh = { + readContext: Vg, + useCallback: Bi, + useContext: Vg, + useEffect: ji, + useImperativeHandle: zi, + useInsertionEffect: wi, + useLayoutEffect: xi, + useMemo: Ci, + useReducer: fi, + useRef: si, + useState: function () { + return fi(ei) + }, + useDebugValue: Ai, + useDeferredValue: function (tt) { + var et = di() + return Di(et, O$1.memoizedState, tt) + }, + useTransition: function () { + var tt = fi(ei)[0], + et = di().memoizedState + return [tt, et] + }, + useMutableSource: hi, + useSyncExternalStore: ii, + useId: Fi, + unstable_isNewReconciler: !1, + }, + $h = { + readContext: Vg, + useCallback: Bi, + useContext: Vg, + useEffect: ji, + useImperativeHandle: zi, + useInsertionEffect: wi, + useLayoutEffect: xi, + useMemo: Ci, + useReducer: gi, + useRef: si, + useState: function () { + return gi(ei) + }, + useDebugValue: Ai, + useDeferredValue: function (tt) { + var et = di() + return O$1 === null ? (et.memoizedState = tt) : Di(et, O$1.memoizedState, tt) + }, + useTransition: function () { + var tt = gi(ei)[0], + et = di().memoizedState + return [tt, et] + }, + useMutableSource: hi, + useSyncExternalStore: ii, + useId: Fi, + unstable_isNewReconciler: !1, + } + function Ki(tt, et) { + try { + var nt = '', + rt = et + do (nt += Pa(rt)), (rt = rt.return) + while (rt) + var it = nt + } catch (ot) { + it = + ` +Error generating stack: ` + + ot.message + + ` +` + + ot.stack + } + return { value: tt, source: et, stack: it, digest: null } + } + function Li(tt, et, nt) { + return { value: tt, source: null, stack: nt ?? null, digest: et ?? null } + } + function Mi(tt, et) { + try { + console.error(et.value) + } catch (nt) { + setTimeout(function () { + throw nt + }) + } + } + var Ni = typeof WeakMap == 'function' ? WeakMap : Map + function Oi(tt, et, nt) { + ;(nt = ch$1(-1, nt)), (nt.tag = 3), (nt.payload = { element: null }) + var rt = et.value + return ( + (nt.callback = function () { + Pi$1 || ((Pi$1 = !0), (Qi = rt)), Mi(tt, et) + }), + nt + ) + } + function Ri(tt, et, nt) { + ;(nt = ch$1(-1, nt)), (nt.tag = 3) + var rt = tt.type.getDerivedStateFromError + if (typeof rt == 'function') { + var it = et.value + ;(nt.payload = function () { + return rt(it) + }), + (nt.callback = function () { + Mi(tt, et) + }) + } + var ot = tt.stateNode + return ( + ot !== null && + typeof ot.componentDidCatch == 'function' && + (nt.callback = function () { + Mi(tt, et), typeof rt != 'function' && (Si === null ? (Si = new Set([this])) : Si.add(this)) + var at = et.stack + this.componentDidCatch(et.value, { componentStack: at !== null ? at : '' }) + }), + nt + ) + } + function Ti(tt, et, nt) { + var rt = tt.pingCache + if (rt === null) { + rt = tt.pingCache = new Ni() + var it = new Set() + rt.set(et, it) + } else (it = rt.get(et)), it === void 0 && ((it = new Set()), rt.set(et, it)) + it.has(nt) || (it.add(nt), (tt = Ui.bind(null, tt, et, nt)), et.then(tt, tt)) + } + function Vi(tt) { + do { + var et + if (((et = tt.tag === 13) && ((et = tt.memoizedState), (et = et !== null ? et.dehydrated !== null : !0)), et)) + return tt + tt = tt.return + } while (tt !== null) + return null + } + function Wi(tt, et, nt, rt, it) { + return tt.mode & 1 + ? ((tt.flags |= 65536), (tt.lanes = it), tt) + : (tt === et + ? (tt.flags |= 65536) + : ((tt.flags |= 128), + (nt.flags |= 131072), + (nt.flags &= -52805), + nt.tag === 1 && + (nt.alternate === null ? (nt.tag = 17) : ((et = ch$1(-1, 1)), (et.tag = 2), dh$1(nt, et, 1))), + (nt.lanes |= 1)), + tt) + } + var Xi = ua.ReactCurrentOwner, + Ug = !1 + function Yi(tt, et, nt, rt) { + et.child = tt === null ? Ch$1(et, null, nt, rt) : Bh(et, tt.child, nt, rt) + } + function Zi(tt, et, nt, rt, it) { + nt = nt.render + var ot = et.ref + return ( + Tg(et, it), + (rt = Xh(tt, et, nt, rt, ot, it)), + (nt = bi()), + tt !== null && !Ug + ? ((et.updateQueue = tt.updateQueue), (et.flags &= -2053), (tt.lanes &= ~it), $i(tt, et, it)) + : (I$4 && nt && vg(et), (et.flags |= 1), Yi(tt, et, rt, it), et.child) + ) + } + function aj(tt, et, nt, rt, it) { + if (tt === null) { + var ot = nt.type + return typeof ot == 'function' && + !bj(ot) && + ot.defaultProps === void 0 && + nt.compare === null && + nt.defaultProps === void 0 + ? ((et.tag = 15), (et.type = ot), cj(tt, et, ot, rt, it)) + : ((tt = yh(nt.type, null, rt, et, et.mode, it)), (tt.ref = et.ref), (tt.return = et), (et.child = tt)) + } + if (((ot = tt.child), !(tt.lanes & it))) { + var at = ot.memoizedProps + if (((nt = nt.compare), (nt = nt !== null ? nt : Ie), nt(at, rt) && tt.ref === et.ref)) return $i(tt, et, it) + } + return (et.flags |= 1), (tt = wh(ot, rt)), (tt.ref = et.ref), (tt.return = et), (et.child = tt) + } + function cj(tt, et, nt, rt, it) { + if (tt !== null) { + var ot = tt.memoizedProps + if (Ie(ot, rt) && tt.ref === et.ref) + if (((Ug = !1), (et.pendingProps = rt = ot), (tt.lanes & it) !== 0)) tt.flags & 131072 && (Ug = !0) + else return (et.lanes = tt.lanes), $i(tt, et, it) + } + return dj(tt, et, nt, rt, it) + } + function ej(tt, et, nt) { + var rt = et.pendingProps, + it = rt.children, + ot = tt !== null ? tt.memoizedState : null + if (rt.mode === 'hidden') + if (!(et.mode & 1)) + (et.memoizedState = { baseLanes: 0, cachePool: null, transitions: null }), G$3(fj, gj), (gj |= nt) + else { + if (!(nt & 1073741824)) + return ( + (tt = ot !== null ? ot.baseLanes | nt : nt), + (et.lanes = et.childLanes = 1073741824), + (et.memoizedState = { baseLanes: tt, cachePool: null, transitions: null }), + (et.updateQueue = null), + G$3(fj, gj), + (gj |= tt), + null + ) + ;(et.memoizedState = { baseLanes: 0, cachePool: null, transitions: null }), + (rt = ot !== null ? ot.baseLanes : nt), + G$3(fj, gj), + (gj |= rt) + } + else ot !== null ? ((rt = ot.baseLanes | nt), (et.memoizedState = null)) : (rt = nt), G$3(fj, gj), (gj |= rt) + return Yi(tt, et, it, nt), et.child + } + function hj(tt, et) { + var nt = et.ref + ;((tt === null && nt !== null) || (tt !== null && tt.ref !== nt)) && ((et.flags |= 512), (et.flags |= 2097152)) + } + function dj(tt, et, nt, rt, it) { + var ot = Zf(nt) ? Xf : H$3.current + return ( + (ot = Yf(et, ot)), + Tg(et, it), + (nt = Xh(tt, et, nt, rt, ot, it)), + (rt = bi()), + tt !== null && !Ug + ? ((et.updateQueue = tt.updateQueue), (et.flags &= -2053), (tt.lanes &= ~it), $i(tt, et, it)) + : (I$4 && rt && vg(et), (et.flags |= 1), Yi(tt, et, nt, it), et.child) + ) + } + function ij(tt, et, nt, rt, it) { + if (Zf(nt)) { + var ot = !0 + cg(et) + } else ot = !1 + if ((Tg(et, it), et.stateNode === null)) jj(tt, et), ph(et, nt, rt), rh$1(et, nt, rt, it), (rt = !0) + else if (tt === null) { + var at = et.stateNode, + st = et.memoizedProps + at.props = st + var lt = at.context, + ct = nt.contextType + typeof ct == 'object' && ct !== null ? (ct = Vg(ct)) : ((ct = Zf(nt) ? Xf : H$3.current), (ct = Yf(et, ct))) + var ut = nt.getDerivedStateFromProps, + ht = typeof ut == 'function' || typeof at.getSnapshotBeforeUpdate == 'function' + ht || + (typeof at.UNSAFE_componentWillReceiveProps != 'function' && + typeof at.componentWillReceiveProps != 'function') || + ((st !== rt || lt !== ct) && qh(et, at, rt, ct)), + ($g = !1) + var dt = et.memoizedState + ;(at.state = dt), + gh(et, rt, at, it), + (lt = et.memoizedState), + st !== rt || dt !== lt || Wf.current || $g + ? (typeof ut == 'function' && (kh(et, nt, ut, rt), (lt = et.memoizedState)), + (st = $g || oh(et, nt, st, rt, dt, lt, ct)) + ? (ht || + (typeof at.UNSAFE_componentWillMount != 'function' && typeof at.componentWillMount != 'function') || + (typeof at.componentWillMount == 'function' && at.componentWillMount(), + typeof at.UNSAFE_componentWillMount == 'function' && at.UNSAFE_componentWillMount()), + typeof at.componentDidMount == 'function' && (et.flags |= 4194308)) + : (typeof at.componentDidMount == 'function' && (et.flags |= 4194308), + (et.memoizedProps = rt), + (et.memoizedState = lt)), + (at.props = rt), + (at.state = lt), + (at.context = ct), + (rt = st)) + : (typeof at.componentDidMount == 'function' && (et.flags |= 4194308), (rt = !1)) + } else { + ;(at = et.stateNode), + bh(tt, et), + (st = et.memoizedProps), + (ct = et.type === et.elementType ? st : Lg(et.type, st)), + (at.props = ct), + (ht = et.pendingProps), + (dt = at.context), + (lt = nt.contextType), + typeof lt == 'object' && lt !== null ? (lt = Vg(lt)) : ((lt = Zf(nt) ? Xf : H$3.current), (lt = Yf(et, lt))) + var pt = nt.getDerivedStateFromProps + ;(ut = typeof pt == 'function' || typeof at.getSnapshotBeforeUpdate == 'function') || + (typeof at.UNSAFE_componentWillReceiveProps != 'function' && + typeof at.componentWillReceiveProps != 'function') || + ((st !== ht || dt !== lt) && qh(et, at, rt, lt)), + ($g = !1), + (dt = et.memoizedState), + (at.state = dt), + gh(et, rt, at, it) + var mt = et.memoizedState + st !== ht || dt !== mt || Wf.current || $g + ? (typeof pt == 'function' && (kh(et, nt, pt, rt), (mt = et.memoizedState)), + (ct = $g || oh(et, nt, ct, rt, dt, mt, lt) || !1) + ? (ut || + (typeof at.UNSAFE_componentWillUpdate != 'function' && typeof at.componentWillUpdate != 'function') || + (typeof at.componentWillUpdate == 'function' && at.componentWillUpdate(rt, mt, lt), + typeof at.UNSAFE_componentWillUpdate == 'function' && at.UNSAFE_componentWillUpdate(rt, mt, lt)), + typeof at.componentDidUpdate == 'function' && (et.flags |= 4), + typeof at.getSnapshotBeforeUpdate == 'function' && (et.flags |= 1024)) + : (typeof at.componentDidUpdate != 'function' || + (st === tt.memoizedProps && dt === tt.memoizedState) || + (et.flags |= 4), + typeof at.getSnapshotBeforeUpdate != 'function' || + (st === tt.memoizedProps && dt === tt.memoizedState) || + (et.flags |= 1024), + (et.memoizedProps = rt), + (et.memoizedState = mt)), + (at.props = rt), + (at.state = mt), + (at.context = lt), + (rt = ct)) + : (typeof at.componentDidUpdate != 'function' || + (st === tt.memoizedProps && dt === tt.memoizedState) || + (et.flags |= 4), + typeof at.getSnapshotBeforeUpdate != 'function' || + (st === tt.memoizedProps && dt === tt.memoizedState) || + (et.flags |= 1024), + (rt = !1)) + } + return kj(tt, et, nt, rt, ot, it) + } + function kj(tt, et, nt, rt, it, ot) { + hj(tt, et) + var at = (et.flags & 128) !== 0 + if (!rt && !at) return it && dg(et, nt, !1), $i(tt, et, ot) + ;(rt = et.stateNode), (Xi.current = et) + var st = at && typeof nt.getDerivedStateFromError != 'function' ? null : rt.render() + return ( + (et.flags |= 1), + tt !== null && at + ? ((et.child = Bh(et, tt.child, null, ot)), (et.child = Bh(et, null, st, ot))) + : Yi(tt, et, st, ot), + (et.memoizedState = rt.state), + it && dg(et, nt, !0), + et.child + ) + } + function lj(tt) { + var et = tt.stateNode + et.pendingContext + ? ag(tt, et.pendingContext, et.pendingContext !== et.context) + : et.context && ag(tt, et.context, !1), + Ih(tt, et.containerInfo) + } + function mj(tt, et, nt, rt, it) { + return Ig(), Jg(it), (et.flags |= 256), Yi(tt, et, nt, rt), et.child + } + var nj = { dehydrated: null, treeContext: null, retryLane: 0 } + function oj(tt) { + return { baseLanes: tt, cachePool: null, transitions: null } + } + function pj(tt, et, nt) { + var rt = et.pendingProps, + it = M$3.current, + ot = !1, + at = (et.flags & 128) !== 0, + st + if ( + ((st = at) || (st = tt !== null && tt.memoizedState === null ? !1 : (it & 2) !== 0), + st ? ((ot = !0), (et.flags &= -129)) : (tt === null || tt.memoizedState !== null) && (it |= 1), + G$3(M$3, it & 1), + tt === null) + ) + return ( + Eg(et), + (tt = et.memoizedState), + tt !== null && ((tt = tt.dehydrated), tt !== null) + ? (et.mode & 1 ? (tt.data === '$!' ? (et.lanes = 8) : (et.lanes = 1073741824)) : (et.lanes = 1), null) + : ((at = rt.children), + (tt = rt.fallback), + ot + ? ((rt = et.mode), + (ot = et.child), + (at = { mode: 'hidden', children: at }), + !(rt & 1) && ot !== null ? ((ot.childLanes = 0), (ot.pendingProps = at)) : (ot = qj(at, rt, 0, null)), + (tt = Ah(tt, rt, nt, null)), + (ot.return = et), + (tt.return = et), + (ot.sibling = tt), + (et.child = ot), + (et.child.memoizedState = oj(nt)), + (et.memoizedState = nj), + tt) + : rj(et, at)) + ) + if (((it = tt.memoizedState), it !== null && ((st = it.dehydrated), st !== null))) + return sj(tt, et, at, rt, st, it, nt) + if (ot) { + ;(ot = rt.fallback), (at = et.mode), (it = tt.child), (st = it.sibling) + var lt = { mode: 'hidden', children: rt.children } + return ( + !(at & 1) && et.child !== it + ? ((rt = et.child), (rt.childLanes = 0), (rt.pendingProps = lt), (et.deletions = null)) + : ((rt = wh(it, lt)), (rt.subtreeFlags = it.subtreeFlags & 14680064)), + st !== null ? (ot = wh(st, ot)) : ((ot = Ah(ot, at, nt, null)), (ot.flags |= 2)), + (ot.return = et), + (rt.return = et), + (rt.sibling = ot), + (et.child = rt), + (rt = ot), + (ot = et.child), + (at = tt.child.memoizedState), + (at = at === null ? oj(nt) : { baseLanes: at.baseLanes | nt, cachePool: null, transitions: at.transitions }), + (ot.memoizedState = at), + (ot.childLanes = tt.childLanes & ~nt), + (et.memoizedState = nj), + rt + ) + } + return ( + (ot = tt.child), + (tt = ot.sibling), + (rt = wh(ot, { mode: 'visible', children: rt.children })), + !(et.mode & 1) && (rt.lanes = nt), + (rt.return = et), + (rt.sibling = null), + tt !== null && ((nt = et.deletions), nt === null ? ((et.deletions = [tt]), (et.flags |= 16)) : nt.push(tt)), + (et.child = rt), + (et.memoizedState = null), + rt + ) + } + function rj(tt, et) { + return (et = qj({ mode: 'visible', children: et }, tt.mode, 0, null)), (et.return = tt), (tt.child = et) + } + function tj(tt, et, nt, rt) { + return ( + rt !== null && Jg(rt), + Bh(et, tt.child, null, nt), + (tt = rj(et, et.pendingProps.children)), + (tt.flags |= 2), + (et.memoizedState = null), + tt + ) + } + function sj(tt, et, nt, rt, it, ot, at) { + if (nt) + return et.flags & 256 + ? ((et.flags &= -257), (rt = Li(Error(p$a(422)))), tj(tt, et, at, rt)) + : et.memoizedState !== null + ? ((et.child = tt.child), (et.flags |= 128), null) + : ((ot = rt.fallback), + (it = et.mode), + (rt = qj({ mode: 'visible', children: rt.children }, it, 0, null)), + (ot = Ah(ot, it, at, null)), + (ot.flags |= 2), + (rt.return = et), + (ot.return = et), + (rt.sibling = ot), + (et.child = rt), + et.mode & 1 && Bh(et, tt.child, null, at), + (et.child.memoizedState = oj(at)), + (et.memoizedState = nj), + ot) + if (!(et.mode & 1)) return tj(tt, et, at, null) + if (it.data === '$!') { + if (((rt = it.nextSibling && it.nextSibling.dataset), rt)) var st = rt.dgst + return (rt = st), (ot = Error(p$a(419))), (rt = Li(ot, rt, void 0)), tj(tt, et, at, rt) + } + if (((st = (at & tt.childLanes) !== 0), Ug || st)) { + if (((rt = R$2), rt !== null)) { + switch (at & -at) { + case 4: + it = 2 + break + case 16: + it = 8 + break + case 64: + case 128: + case 256: + case 512: + case 1024: + case 2048: + case 4096: + case 8192: + case 16384: + case 32768: + case 65536: + case 131072: + case 262144: + case 524288: + case 1048576: + case 2097152: + case 4194304: + case 8388608: + case 16777216: + case 33554432: + case 67108864: + it = 32 + break + case 536870912: + it = 268435456 + break + default: + it = 0 + } + ;(it = it & (rt.suspendedLanes | at) ? 0 : it), + it !== 0 && it !== ot.retryLane && ((ot.retryLane = it), Zg(tt, it), mh(rt, tt, it, -1)) + } + return uj(), (rt = Li(Error(p$a(421)))), tj(tt, et, at, rt) + } + return it.data === '$?' + ? ((et.flags |= 128), (et.child = tt.child), (et = vj.bind(null, tt)), (it._reactRetry = et), null) + : ((tt = ot.treeContext), + (yg = Lf(it.nextSibling)), + (xg = et), + (I$4 = !0), + (zg = null), + tt !== null && ((og[pg++] = rg), (og[pg++] = sg), (og[pg++] = qg), (rg = tt.id), (sg = tt.overflow), (qg = et)), + (et = rj(et, rt.children)), + (et.flags |= 4096), + et) + } + function wj(tt, et, nt) { + tt.lanes |= et + var rt = tt.alternate + rt !== null && (rt.lanes |= et), Sg(tt.return, et, nt) + } + function xj(tt, et, nt, rt, it) { + var ot = tt.memoizedState + ot === null + ? (tt.memoizedState = { + isBackwards: et, + rendering: null, + renderingStartTime: 0, + last: rt, + tail: nt, + tailMode: it, + }) + : ((ot.isBackwards = et), + (ot.rendering = null), + (ot.renderingStartTime = 0), + (ot.last = rt), + (ot.tail = nt), + (ot.tailMode = it)) + } + function yj(tt, et, nt) { + var rt = et.pendingProps, + it = rt.revealOrder, + ot = rt.tail + if ((Yi(tt, et, rt.children, nt), (rt = M$3.current), rt & 2)) (rt = (rt & 1) | 2), (et.flags |= 128) + else { + if (tt !== null && tt.flags & 128) + e: for (tt = et.child; tt !== null; ) { + if (tt.tag === 13) tt.memoizedState !== null && wj(tt, nt, et) + else if (tt.tag === 19) wj(tt, nt, et) + else if (tt.child !== null) { + ;(tt.child.return = tt), (tt = tt.child) + continue + } + if (tt === et) break e + for (; tt.sibling === null; ) { + if (tt.return === null || tt.return === et) break e + tt = tt.return + } + ;(tt.sibling.return = tt.return), (tt = tt.sibling) + } + rt &= 1 + } + if ((G$3(M$3, rt), !(et.mode & 1))) et.memoizedState = null + else + switch (it) { + case 'forwards': + for (nt = et.child, it = null; nt !== null; ) + (tt = nt.alternate), tt !== null && Mh(tt) === null && (it = nt), (nt = nt.sibling) + ;(nt = it), + nt === null ? ((it = et.child), (et.child = null)) : ((it = nt.sibling), (nt.sibling = null)), + xj(et, !1, it, nt, ot) + break + case 'backwards': + for (nt = null, it = et.child, et.child = null; it !== null; ) { + if (((tt = it.alternate), tt !== null && Mh(tt) === null)) { + et.child = it + break + } + ;(tt = it.sibling), (it.sibling = nt), (nt = it), (it = tt) + } + xj(et, !0, nt, null, ot) + break + case 'together': + xj(et, !1, null, null, void 0) + break + default: + et.memoizedState = null + } + return et.child + } + function jj(tt, et) { + !(et.mode & 1) && tt !== null && ((tt.alternate = null), (et.alternate = null), (et.flags |= 2)) + } + function $i(tt, et, nt) { + if ((tt !== null && (et.dependencies = tt.dependencies), (hh |= et.lanes), !(nt & et.childLanes))) return null + if (tt !== null && et.child !== tt.child) throw Error(p$a(153)) + if (et.child !== null) { + for (tt = et.child, nt = wh(tt, tt.pendingProps), et.child = nt, nt.return = et; tt.sibling !== null; ) + (tt = tt.sibling), (nt = nt.sibling = wh(tt, tt.pendingProps)), (nt.return = et) + nt.sibling = null + } + return et.child + } + function zj(tt, et, nt) { + switch (et.tag) { + case 3: + lj(et), Ig() + break + case 5: + Kh$1(et) + break + case 1: + Zf(et.type) && cg(et) + break + case 4: + Ih(et, et.stateNode.containerInfo) + break + case 10: + var rt = et.type._context, + it = et.memoizedProps.value + G$3(Mg, rt._currentValue), (rt._currentValue = it) + break + case 13: + if (((rt = et.memoizedState), rt !== null)) + return rt.dehydrated !== null + ? (G$3(M$3, M$3.current & 1), (et.flags |= 128), null) + : nt & et.child.childLanes + ? pj(tt, et, nt) + : (G$3(M$3, M$3.current & 1), (tt = $i(tt, et, nt)), tt !== null ? tt.sibling : null) + G$3(M$3, M$3.current & 1) + break + case 19: + if (((rt = (nt & et.childLanes) !== 0), tt.flags & 128)) { + if (rt) return yj(tt, et, nt) + et.flags |= 128 + } + if ( + ((it = et.memoizedState), + it !== null && ((it.rendering = null), (it.tail = null), (it.lastEffect = null)), + G$3(M$3, M$3.current), + rt) + ) + break + return null + case 22: + case 23: + return (et.lanes = 0), ej(tt, et, nt) + } + return $i(tt, et, nt) + } + var Aj, Bj, Cj, Dj + Aj = function (tt, et) { + for (var nt = et.child; nt !== null; ) { + if (nt.tag === 5 || nt.tag === 6) tt.appendChild(nt.stateNode) + else if (nt.tag !== 4 && nt.child !== null) { + ;(nt.child.return = nt), (nt = nt.child) + continue + } + if (nt === et) break + for (; nt.sibling === null; ) { + if (nt.return === null || nt.return === et) return + nt = nt.return + } + ;(nt.sibling.return = nt.return), (nt = nt.sibling) + } + } + Bj = function () {} + Cj = function (tt, et, nt, rt) { + var it = tt.memoizedProps + if (it !== rt) { + ;(tt = et.stateNode), Hh(Eh.current) + var ot = null + switch (nt) { + case 'input': + ;(it = Ya(tt, it)), (rt = Ya(tt, rt)), (ot = []) + break + case 'select': + ;(it = A$3({}, it, { value: void 0 })), (rt = A$3({}, rt, { value: void 0 })), (ot = []) + break + case 'textarea': + ;(it = gb(tt, it)), (rt = gb(tt, rt)), (ot = []) + break + default: + typeof it.onClick != 'function' && typeof rt.onClick == 'function' && (tt.onclick = Bf) + } + ub(nt, rt) + var at + nt = null + for (ct in it) + if (!rt.hasOwnProperty(ct) && it.hasOwnProperty(ct) && it[ct] != null) + if (ct === 'style') { + var st = it[ct] + for (at in st) st.hasOwnProperty(at) && (nt || (nt = {}), (nt[at] = '')) + } else + ct !== 'dangerouslySetInnerHTML' && + ct !== 'children' && + ct !== 'suppressContentEditableWarning' && + ct !== 'suppressHydrationWarning' && + ct !== 'autoFocus' && + (ea.hasOwnProperty(ct) ? ot || (ot = []) : (ot = ot || []).push(ct, null)) + for (ct in rt) { + var lt = rt[ct] + if (((st = it != null ? it[ct] : void 0), rt.hasOwnProperty(ct) && lt !== st && (lt != null || st != null))) + if (ct === 'style') + if (st) { + for (at in st) !st.hasOwnProperty(at) || (lt && lt.hasOwnProperty(at)) || (nt || (nt = {}), (nt[at] = '')) + for (at in lt) lt.hasOwnProperty(at) && st[at] !== lt[at] && (nt || (nt = {}), (nt[at] = lt[at])) + } else nt || (ot || (ot = []), ot.push(ct, nt)), (nt = lt) + else + ct === 'dangerouslySetInnerHTML' + ? ((lt = lt ? lt.__html : void 0), + (st = st ? st.__html : void 0), + lt != null && st !== lt && (ot = ot || []).push(ct, lt)) + : ct === 'children' + ? (typeof lt != 'string' && typeof lt != 'number') || (ot = ot || []).push(ct, '' + lt) + : ct !== 'suppressContentEditableWarning' && + ct !== 'suppressHydrationWarning' && + (ea.hasOwnProperty(ct) + ? (lt != null && ct === 'onScroll' && D$2('scroll', tt), ot || st === lt || (ot = [])) + : (ot = ot || []).push(ct, lt)) + } + nt && (ot = ot || []).push('style', nt) + var ct = ot + ;(et.updateQueue = ct) && (et.flags |= 4) + } + } + Dj = function (tt, et, nt, rt) { + nt !== rt && (et.flags |= 4) + } + function Ej(tt, et) { + if (!I$4) + switch (tt.tailMode) { + case 'hidden': + et = tt.tail + for (var nt = null; et !== null; ) et.alternate !== null && (nt = et), (et = et.sibling) + nt === null ? (tt.tail = null) : (nt.sibling = null) + break + case 'collapsed': + nt = tt.tail + for (var rt = null; nt !== null; ) nt.alternate !== null && (rt = nt), (nt = nt.sibling) + rt === null ? (et || tt.tail === null ? (tt.tail = null) : (tt.tail.sibling = null)) : (rt.sibling = null) + } + } + function S$4(tt) { + var et = tt.alternate !== null && tt.alternate.child === tt.child, + nt = 0, + rt = 0 + if (et) + for (var it = tt.child; it !== null; ) + (nt |= it.lanes | it.childLanes), + (rt |= it.subtreeFlags & 14680064), + (rt |= it.flags & 14680064), + (it.return = tt), + (it = it.sibling) + else + for (it = tt.child; it !== null; ) + (nt |= it.lanes | it.childLanes), (rt |= it.subtreeFlags), (rt |= it.flags), (it.return = tt), (it = it.sibling) + return (tt.subtreeFlags |= rt), (tt.childLanes = nt), et + } + function Fj(tt, et, nt) { + var rt = et.pendingProps + switch ((wg(et), et.tag)) { + case 2: + case 16: + case 15: + case 0: + case 11: + case 7: + case 8: + case 12: + case 9: + case 14: + return S$4(et), null + case 1: + return Zf(et.type) && $f(), S$4(et), null + case 3: + return ( + (rt = et.stateNode), + Jh(), + E$2(Wf), + E$2(H$3), + Oh(), + rt.pendingContext && ((rt.context = rt.pendingContext), (rt.pendingContext = null)), + (tt === null || tt.child === null) && + (Gg(et) + ? (et.flags |= 4) + : tt === null || + (tt.memoizedState.isDehydrated && !(et.flags & 256)) || + ((et.flags |= 1024), zg !== null && (Gj(zg), (zg = null)))), + Bj(tt, et), + S$4(et), + null + ) + case 5: + Lh(et) + var it = Hh(Gh.current) + if (((nt = et.type), tt !== null && et.stateNode != null)) + Cj(tt, et, nt, rt, it), tt.ref !== et.ref && ((et.flags |= 512), (et.flags |= 2097152)) + else { + if (!rt) { + if (et.stateNode === null) throw Error(p$a(166)) + return S$4(et), null + } + if (((tt = Hh(Eh.current)), Gg(et))) { + ;(rt = et.stateNode), (nt = et.type) + var ot = et.memoizedProps + switch (((rt[Of] = et), (rt[Pf] = ot), (tt = (et.mode & 1) !== 0), nt)) { + case 'dialog': + D$2('cancel', rt), D$2('close', rt) + break + case 'iframe': + case 'object': + case 'embed': + D$2('load', rt) + break + case 'video': + case 'audio': + for (it = 0; it < lf.length; it++) D$2(lf[it], rt) + break + case 'source': + D$2('error', rt) + break + case 'img': + case 'image': + case 'link': + D$2('error', rt), D$2('load', rt) + break + case 'details': + D$2('toggle', rt) + break + case 'input': + Za(rt, ot), D$2('invalid', rt) + break + case 'select': + ;(rt._wrapperState = { wasMultiple: !!ot.multiple }), D$2('invalid', rt) + break + case 'textarea': + hb(rt, ot), D$2('invalid', rt) + } + ub(nt, ot), (it = null) + for (var at in ot) + if (ot.hasOwnProperty(at)) { + var st = ot[at] + at === 'children' + ? typeof st == 'string' + ? rt.textContent !== st && + (ot.suppressHydrationWarning !== !0 && Af(rt.textContent, st, tt), (it = ['children', st])) + : typeof st == 'number' && + rt.textContent !== '' + st && + (ot.suppressHydrationWarning !== !0 && Af(rt.textContent, st, tt), (it = ['children', '' + st])) + : ea.hasOwnProperty(at) && st != null && at === 'onScroll' && D$2('scroll', rt) + } + switch (nt) { + case 'input': + Va(rt), db(rt, ot, !0) + break + case 'textarea': + Va(rt), jb(rt) + break + case 'select': + case 'option': + break + default: + typeof ot.onClick == 'function' && (rt.onclick = Bf) + } + ;(rt = it), (et.updateQueue = rt), rt !== null && (et.flags |= 4) + } else { + ;(at = it.nodeType === 9 ? it : it.ownerDocument), + tt === 'http://www.w3.org/1999/xhtml' && (tt = kb(nt)), + tt === 'http://www.w3.org/1999/xhtml' + ? nt === 'script' + ? ((tt = at.createElement('div')), + (tt.innerHTML = ''), + (tt = tt.removeChild(tt.firstChild))) + : typeof rt.is == 'string' + ? (tt = at.createElement(nt, { is: rt.is })) + : ((tt = at.createElement(nt)), + nt === 'select' && ((at = tt), rt.multiple ? (at.multiple = !0) : rt.size && (at.size = rt.size))) + : (tt = at.createElementNS(tt, nt)), + (tt[Of] = et), + (tt[Pf] = rt), + Aj(tt, et, !1, !1), + (et.stateNode = tt) + e: { + switch (((at = vb(nt, rt)), nt)) { + case 'dialog': + D$2('cancel', tt), D$2('close', tt), (it = rt) + break + case 'iframe': + case 'object': + case 'embed': + D$2('load', tt), (it = rt) + break + case 'video': + case 'audio': + for (it = 0; it < lf.length; it++) D$2(lf[it], tt) + it = rt + break + case 'source': + D$2('error', tt), (it = rt) + break + case 'img': + case 'image': + case 'link': + D$2('error', tt), D$2('load', tt), (it = rt) + break + case 'details': + D$2('toggle', tt), (it = rt) + break + case 'input': + Za(tt, rt), (it = Ya(tt, rt)), D$2('invalid', tt) + break + case 'option': + it = rt + break + case 'select': + ;(tt._wrapperState = { wasMultiple: !!rt.multiple }), + (it = A$3({}, rt, { value: void 0 })), + D$2('invalid', tt) + break + case 'textarea': + hb(tt, rt), (it = gb(tt, rt)), D$2('invalid', tt) + break + default: + it = rt + } + ub(nt, it), (st = it) + for (ot in st) + if (st.hasOwnProperty(ot)) { + var lt = st[ot] + ot === 'style' + ? sb(tt, lt) + : ot === 'dangerouslySetInnerHTML' + ? ((lt = lt ? lt.__html : void 0), lt != null && nb(tt, lt)) + : ot === 'children' + ? typeof lt == 'string' + ? (nt !== 'textarea' || lt !== '') && ob(tt, lt) + : typeof lt == 'number' && ob(tt, '' + lt) + : ot !== 'suppressContentEditableWarning' && + ot !== 'suppressHydrationWarning' && + ot !== 'autoFocus' && + (ea.hasOwnProperty(ot) + ? lt != null && ot === 'onScroll' && D$2('scroll', tt) + : lt != null && ta(tt, ot, lt, at)) + } + switch (nt) { + case 'input': + Va(tt), db(tt, rt, !1) + break + case 'textarea': + Va(tt), jb(tt) + break + case 'option': + rt.value != null && tt.setAttribute('value', '' + Sa(rt.value)) + break + case 'select': + ;(tt.multiple = !!rt.multiple), + (ot = rt.value), + ot != null + ? fb(tt, !!rt.multiple, ot, !1) + : rt.defaultValue != null && fb(tt, !!rt.multiple, rt.defaultValue, !0) + break + default: + typeof it.onClick == 'function' && (tt.onclick = Bf) + } + switch (nt) { + case 'button': + case 'input': + case 'select': + case 'textarea': + rt = !!rt.autoFocus + break e + case 'img': + rt = !0 + break e + default: + rt = !1 + } + } + rt && (et.flags |= 4) + } + et.ref !== null && ((et.flags |= 512), (et.flags |= 2097152)) + } + return S$4(et), null + case 6: + if (tt && et.stateNode != null) Dj(tt, et, tt.memoizedProps, rt) + else { + if (typeof rt != 'string' && et.stateNode === null) throw Error(p$a(166)) + if (((nt = Hh(Gh.current)), Hh(Eh.current), Gg(et))) { + if ( + ((rt = et.stateNode), + (nt = et.memoizedProps), + (rt[Of] = et), + (ot = rt.nodeValue !== nt) && ((tt = xg), tt !== null)) + ) + switch (tt.tag) { + case 3: + Af(rt.nodeValue, nt, (tt.mode & 1) !== 0) + break + case 5: + tt.memoizedProps.suppressHydrationWarning !== !0 && Af(rt.nodeValue, nt, (tt.mode & 1) !== 0) + } + ot && (et.flags |= 4) + } else + (rt = (nt.nodeType === 9 ? nt : nt.ownerDocument).createTextNode(rt)), (rt[Of] = et), (et.stateNode = rt) + } + return S$4(et), null + case 13: + if ( + (E$2(M$3), + (rt = et.memoizedState), + tt === null || (tt.memoizedState !== null && tt.memoizedState.dehydrated !== null)) + ) { + if (I$4 && yg !== null && et.mode & 1 && !(et.flags & 128)) Hg(), Ig(), (et.flags |= 98560), (ot = !1) + else if (((ot = Gg(et)), rt !== null && rt.dehydrated !== null)) { + if (tt === null) { + if (!ot) throw Error(p$a(318)) + if (((ot = et.memoizedState), (ot = ot !== null ? ot.dehydrated : null), !ot)) throw Error(p$a(317)) + ot[Of] = et + } else Ig(), !(et.flags & 128) && (et.memoizedState = null), (et.flags |= 4) + S$4(et), (ot = !1) + } else zg !== null && (Gj(zg), (zg = null)), (ot = !0) + if (!ot) return et.flags & 65536 ? et : null + } + return et.flags & 128 + ? ((et.lanes = nt), et) + : ((rt = rt !== null), + rt !== (tt !== null && tt.memoizedState !== null) && + rt && + ((et.child.flags |= 8192), + et.mode & 1 && (tt === null || M$3.current & 1 ? T$3 === 0 && (T$3 = 3) : uj())), + et.updateQueue !== null && (et.flags |= 4), + S$4(et), + null) + case 4: + return Jh(), Bj(tt, et), tt === null && sf(et.stateNode.containerInfo), S$4(et), null + case 10: + return Rg(et.type._context), S$4(et), null + case 17: + return Zf(et.type) && $f(), S$4(et), null + case 19: + if ((E$2(M$3), (ot = et.memoizedState), ot === null)) return S$4(et), null + if (((rt = (et.flags & 128) !== 0), (at = ot.rendering), at === null)) + if (rt) Ej(ot, !1) + else { + if (T$3 !== 0 || (tt !== null && tt.flags & 128)) + for (tt = et.child; tt !== null; ) { + if (((at = Mh(tt)), at !== null)) { + for ( + et.flags |= 128, + Ej(ot, !1), + rt = at.updateQueue, + rt !== null && ((et.updateQueue = rt), (et.flags |= 4)), + et.subtreeFlags = 0, + rt = nt, + nt = et.child; + nt !== null; + + ) + (ot = nt), + (tt = rt), + (ot.flags &= 14680066), + (at = ot.alternate), + at === null + ? ((ot.childLanes = 0), + (ot.lanes = tt), + (ot.child = null), + (ot.subtreeFlags = 0), + (ot.memoizedProps = null), + (ot.memoizedState = null), + (ot.updateQueue = null), + (ot.dependencies = null), + (ot.stateNode = null)) + : ((ot.childLanes = at.childLanes), + (ot.lanes = at.lanes), + (ot.child = at.child), + (ot.subtreeFlags = 0), + (ot.deletions = null), + (ot.memoizedProps = at.memoizedProps), + (ot.memoizedState = at.memoizedState), + (ot.updateQueue = at.updateQueue), + (ot.type = at.type), + (tt = at.dependencies), + (ot.dependencies = tt === null ? null : { lanes: tt.lanes, firstContext: tt.firstContext })), + (nt = nt.sibling) + return G$3(M$3, (M$3.current & 1) | 2), et.child + } + tt = tt.sibling + } + ot.tail !== null && B$2() > Hj && ((et.flags |= 128), (rt = !0), Ej(ot, !1), (et.lanes = 4194304)) + } + else { + if (!rt) + if (((tt = Mh(at)), tt !== null)) { + if ( + ((et.flags |= 128), + (rt = !0), + (nt = tt.updateQueue), + nt !== null && ((et.updateQueue = nt), (et.flags |= 4)), + Ej(ot, !0), + ot.tail === null && ot.tailMode === 'hidden' && !at.alternate && !I$4) + ) + return S$4(et), null + } else + 2 * B$2() - ot.renderingStartTime > Hj && + nt !== 1073741824 && + ((et.flags |= 128), (rt = !0), Ej(ot, !1), (et.lanes = 4194304)) + ot.isBackwards + ? ((at.sibling = et.child), (et.child = at)) + : ((nt = ot.last), nt !== null ? (nt.sibling = at) : (et.child = at), (ot.last = at)) + } + return ot.tail !== null + ? ((et = ot.tail), + (ot.rendering = et), + (ot.tail = et.sibling), + (ot.renderingStartTime = B$2()), + (et.sibling = null), + (nt = M$3.current), + G$3(M$3, rt ? (nt & 1) | 2 : nt & 1), + et) + : (S$4(et), null) + case 22: + case 23: + return ( + Ij(), + (rt = et.memoizedState !== null), + tt !== null && (tt.memoizedState !== null) !== rt && (et.flags |= 8192), + rt && et.mode & 1 ? gj & 1073741824 && (S$4(et), et.subtreeFlags & 6 && (et.flags |= 8192)) : S$4(et), + null + ) + case 24: + return null + case 25: + return null + } + throw Error(p$a(156, et.tag)) + } + function Jj(tt, et) { + switch ((wg(et), et.tag)) { + case 1: + return Zf(et.type) && $f(), (tt = et.flags), tt & 65536 ? ((et.flags = (tt & -65537) | 128), et) : null + case 3: + return ( + Jh(), + E$2(Wf), + E$2(H$3), + Oh(), + (tt = et.flags), + tt & 65536 && !(tt & 128) ? ((et.flags = (tt & -65537) | 128), et) : null + ) + case 5: + return Lh(et), null + case 13: + if ((E$2(M$3), (tt = et.memoizedState), tt !== null && tt.dehydrated !== null)) { + if (et.alternate === null) throw Error(p$a(340)) + Ig() + } + return (tt = et.flags), tt & 65536 ? ((et.flags = (tt & -65537) | 128), et) : null + case 19: + return E$2(M$3), null + case 4: + return Jh(), null + case 10: + return Rg(et.type._context), null + case 22: + case 23: + return Ij(), null + case 24: + return null + default: + return null + } + } + var Kj = !1, + U$3 = !1, + Lj = typeof WeakSet == 'function' ? WeakSet : Set, + V$4 = null + function Mj(tt, et) { + var nt = tt.ref + if (nt !== null) + if (typeof nt == 'function') + try { + nt(null) + } catch (rt) { + W$8(tt, et, rt) + } + else nt.current = null + } + function Nj(tt, et, nt) { + try { + nt() + } catch (rt) { + W$8(tt, et, rt) + } + } + var Oj = !1 + function Pj(tt, et) { + if (((Cf = dd), (tt = Me$2()), Ne$2(tt))) { + if ('selectionStart' in tt) var nt = { start: tt.selectionStart, end: tt.selectionEnd } + else + e: { + nt = ((nt = tt.ownerDocument) && nt.defaultView) || window + var rt = nt.getSelection && nt.getSelection() + if (rt && rt.rangeCount !== 0) { + nt = rt.anchorNode + var it = rt.anchorOffset, + ot = rt.focusNode + rt = rt.focusOffset + try { + nt.nodeType, ot.nodeType + } catch { + nt = null + break e + } + var at = 0, + st = -1, + lt = -1, + ct = 0, + ut = 0, + ht = tt, + dt = null + t: for (;;) { + for ( + var pt; + ht !== nt || (it !== 0 && ht.nodeType !== 3) || (st = at + it), + ht !== ot || (rt !== 0 && ht.nodeType !== 3) || (lt = at + rt), + ht.nodeType === 3 && (at += ht.nodeValue.length), + (pt = ht.firstChild) !== null; + + ) + (dt = ht), (ht = pt) + for (;;) { + if (ht === tt) break t + if ( + (dt === nt && ++ct === it && (st = at), + dt === ot && ++ut === rt && (lt = at), + (pt = ht.nextSibling) !== null) + ) + break + ;(ht = dt), (dt = ht.parentNode) + } + ht = pt + } + nt = st === -1 || lt === -1 ? null : { start: st, end: lt } + } else nt = null + } + nt = nt || { start: 0, end: 0 } + } else nt = null + for (Df = { focusedElem: tt, selectionRange: nt }, dd = !1, V$4 = et; V$4 !== null; ) + if (((et = V$4), (tt = et.child), (et.subtreeFlags & 1028) !== 0 && tt !== null)) (tt.return = et), (V$4 = tt) + else + for (; V$4 !== null; ) { + et = V$4 + try { + var mt = et.alternate + if (et.flags & 1024) + switch (et.tag) { + case 0: + case 11: + case 15: + break + case 1: + if (mt !== null) { + var gt = mt.memoizedProps, + yt = mt.memoizedState, + bt = et.stateNode, + vt = bt.getSnapshotBeforeUpdate(et.elementType === et.type ? gt : Lg(et.type, gt), yt) + bt.__reactInternalSnapshotBeforeUpdate = vt + } + break + case 3: + var xt = et.stateNode.containerInfo + xt.nodeType === 1 + ? (xt.textContent = '') + : xt.nodeType === 9 && xt.documentElement && xt.removeChild(xt.documentElement) + break + case 5: + case 6: + case 4: + case 17: + break + default: + throw Error(p$a(163)) + } + } catch (kt) { + W$8(et, et.return, kt) + } + if (((tt = et.sibling), tt !== null)) { + ;(tt.return = et.return), (V$4 = tt) + break + } + V$4 = et.return + } + return (mt = Oj), (Oj = !1), mt + } + function Qj(tt, et, nt) { + var rt = et.updateQueue + if (((rt = rt !== null ? rt.lastEffect : null), rt !== null)) { + var it = (rt = rt.next) + do { + if ((it.tag & tt) === tt) { + var ot = it.destroy + ;(it.destroy = void 0), ot !== void 0 && Nj(et, nt, ot) + } + it = it.next + } while (it !== rt) + } + } + function Rj(tt, et) { + if (((et = et.updateQueue), (et = et !== null ? et.lastEffect : null), et !== null)) { + var nt = (et = et.next) + do { + if ((nt.tag & tt) === tt) { + var rt = nt.create + nt.destroy = rt() + } + nt = nt.next + } while (nt !== et) + } + } + function Sj(tt) { + var et = tt.ref + if (et !== null) { + var nt = tt.stateNode + switch (tt.tag) { + case 5: + tt = nt + break + default: + tt = nt + } + typeof et == 'function' ? et(tt) : (et.current = tt) + } + } + function Tj(tt) { + var et = tt.alternate + et !== null && ((tt.alternate = null), Tj(et)), + (tt.child = null), + (tt.deletions = null), + (tt.sibling = null), + tt.tag === 5 && + ((et = tt.stateNode), + et !== null && (delete et[Of], delete et[Pf], delete et[of], delete et[Qf], delete et[Rf])), + (tt.stateNode = null), + (tt.return = null), + (tt.dependencies = null), + (tt.memoizedProps = null), + (tt.memoizedState = null), + (tt.pendingProps = null), + (tt.stateNode = null), + (tt.updateQueue = null) + } + function Uj(tt) { + return tt.tag === 5 || tt.tag === 3 || tt.tag === 4 + } + function Vj(tt) { + e: for (;;) { + for (; tt.sibling === null; ) { + if (tt.return === null || Uj(tt.return)) return null + tt = tt.return + } + for (tt.sibling.return = tt.return, tt = tt.sibling; tt.tag !== 5 && tt.tag !== 6 && tt.tag !== 18; ) { + if (tt.flags & 2 || tt.child === null || tt.tag === 4) continue e + ;(tt.child.return = tt), (tt = tt.child) + } + if (!(tt.flags & 2)) return tt.stateNode + } + } + function Wj(tt, et, nt) { + var rt = tt.tag + if (rt === 5 || rt === 6) + (tt = tt.stateNode), + et + ? nt.nodeType === 8 + ? nt.parentNode.insertBefore(tt, et) + : nt.insertBefore(tt, et) + : (nt.nodeType === 8 ? ((et = nt.parentNode), et.insertBefore(tt, nt)) : ((et = nt), et.appendChild(tt)), + (nt = nt._reactRootContainer), + nt != null || et.onclick !== null || (et.onclick = Bf)) + else if (rt !== 4 && ((tt = tt.child), tt !== null)) + for (Wj(tt, et, nt), tt = tt.sibling; tt !== null; ) Wj(tt, et, nt), (tt = tt.sibling) + } + function Xj(tt, et, nt) { + var rt = tt.tag + if (rt === 5 || rt === 6) (tt = tt.stateNode), et ? nt.insertBefore(tt, et) : nt.appendChild(tt) + else if (rt !== 4 && ((tt = tt.child), tt !== null)) + for (Xj(tt, et, nt), tt = tt.sibling; tt !== null; ) Xj(tt, et, nt), (tt = tt.sibling) + } + var X$2 = null, + Yj = !1 + function Zj(tt, et, nt) { + for (nt = nt.child; nt !== null; ) ak(tt, et, nt), (nt = nt.sibling) + } + function ak(tt, et, nt) { + if (lc && typeof lc.onCommitFiberUnmount == 'function') + try { + lc.onCommitFiberUnmount(kc, nt) + } catch {} + switch (nt.tag) { + case 5: + U$3 || Mj(nt, et) + case 6: + var rt = X$2, + it = Yj + ;(X$2 = null), + Zj(tt, et, nt), + (X$2 = rt), + (Yj = it), + X$2 !== null && + (Yj + ? ((tt = X$2), + (nt = nt.stateNode), + tt.nodeType === 8 ? tt.parentNode.removeChild(nt) : tt.removeChild(nt)) + : X$2.removeChild(nt.stateNode)) + break + case 18: + X$2 !== null && + (Yj + ? ((tt = X$2), + (nt = nt.stateNode), + tt.nodeType === 8 ? Kf(tt.parentNode, nt) : tt.nodeType === 1 && Kf(tt, nt), + bd(tt)) + : Kf(X$2, nt.stateNode)) + break + case 4: + ;(rt = X$2), (it = Yj), (X$2 = nt.stateNode.containerInfo), (Yj = !0), Zj(tt, et, nt), (X$2 = rt), (Yj = it) + break + case 0: + case 11: + case 14: + case 15: + if (!U$3 && ((rt = nt.updateQueue), rt !== null && ((rt = rt.lastEffect), rt !== null))) { + it = rt = rt.next + do { + var ot = it, + at = ot.destroy + ;(ot = ot.tag), at !== void 0 && (ot & 2 || ot & 4) && Nj(nt, et, at), (it = it.next) + } while (it !== rt) + } + Zj(tt, et, nt) + break + case 1: + if (!U$3 && (Mj(nt, et), (rt = nt.stateNode), typeof rt.componentWillUnmount == 'function')) + try { + ;(rt.props = nt.memoizedProps), (rt.state = nt.memoizedState), rt.componentWillUnmount() + } catch (st) { + W$8(nt, et, st) + } + Zj(tt, et, nt) + break + case 21: + Zj(tt, et, nt) + break + case 22: + nt.mode & 1 ? ((U$3 = (rt = U$3) || nt.memoizedState !== null), Zj(tt, et, nt), (U$3 = rt)) : Zj(tt, et, nt) + break + default: + Zj(tt, et, nt) + } + } + function bk(tt) { + var et = tt.updateQueue + if (et !== null) { + tt.updateQueue = null + var nt = tt.stateNode + nt === null && (nt = tt.stateNode = new Lj()), + et.forEach(function (rt) { + var it = ck.bind(null, tt, rt) + nt.has(rt) || (nt.add(rt), rt.then(it, it)) + }) + } + } + function dk(tt, et) { + var nt = et.deletions + if (nt !== null) + for (var rt = 0; rt < nt.length; rt++) { + var it = nt[rt] + try { + var ot = tt, + at = et, + st = at + e: for (; st !== null; ) { + switch (st.tag) { + case 5: + ;(X$2 = st.stateNode), (Yj = !1) + break e + case 3: + ;(X$2 = st.stateNode.containerInfo), (Yj = !0) + break e + case 4: + ;(X$2 = st.stateNode.containerInfo), (Yj = !0) + break e + } + st = st.return + } + if (X$2 === null) throw Error(p$a(160)) + ak(ot, at, it), (X$2 = null), (Yj = !1) + var lt = it.alternate + lt !== null && (lt.return = null), (it.return = null) + } catch (ct) { + W$8(it, et, ct) + } + } + if (et.subtreeFlags & 12854) for (et = et.child; et !== null; ) ek(et, tt), (et = et.sibling) + } + function ek(tt, et) { + var nt = tt.alternate, + rt = tt.flags + switch (tt.tag) { + case 0: + case 11: + case 14: + case 15: + if ((dk(et, tt), fk(tt), rt & 4)) { + try { + Qj(3, tt, tt.return), Rj(3, tt) + } catch (gt) { + W$8(tt, tt.return, gt) + } + try { + Qj(5, tt, tt.return) + } catch (gt) { + W$8(tt, tt.return, gt) + } + } + break + case 1: + dk(et, tt), fk(tt), rt & 512 && nt !== null && Mj(nt, nt.return) + break + case 5: + if ((dk(et, tt), fk(tt), rt & 512 && nt !== null && Mj(nt, nt.return), tt.flags & 32)) { + var it = tt.stateNode + try { + ob(it, '') + } catch (gt) { + W$8(tt, tt.return, gt) + } + } + if (rt & 4 && ((it = tt.stateNode), it != null)) { + var ot = tt.memoizedProps, + at = nt !== null ? nt.memoizedProps : ot, + st = tt.type, + lt = tt.updateQueue + if (((tt.updateQueue = null), lt !== null)) + try { + st === 'input' && ot.type === 'radio' && ot.name != null && ab(it, ot), vb(st, at) + var ct = vb(st, ot) + for (at = 0; at < lt.length; at += 2) { + var ut = lt[at], + ht = lt[at + 1] + ut === 'style' + ? sb(it, ht) + : ut === 'dangerouslySetInnerHTML' + ? nb(it, ht) + : ut === 'children' + ? ob(it, ht) + : ta(it, ut, ht, ct) + } + switch (st) { + case 'input': + bb(it, ot) + break + case 'textarea': + ib(it, ot) + break + case 'select': + var dt = it._wrapperState.wasMultiple + it._wrapperState.wasMultiple = !!ot.multiple + var pt = ot.value + pt != null + ? fb(it, !!ot.multiple, pt, !1) + : dt !== !!ot.multiple && + (ot.defaultValue != null + ? fb(it, !!ot.multiple, ot.defaultValue, !0) + : fb(it, !!ot.multiple, ot.multiple ? [] : '', !1)) + } + it[Pf] = ot + } catch (gt) { + W$8(tt, tt.return, gt) + } + } + break + case 6: + if ((dk(et, tt), fk(tt), rt & 4)) { + if (tt.stateNode === null) throw Error(p$a(162)) + ;(it = tt.stateNode), (ot = tt.memoizedProps) + try { + it.nodeValue = ot + } catch (gt) { + W$8(tt, tt.return, gt) + } + } + break + case 3: + if ((dk(et, tt), fk(tt), rt & 4 && nt !== null && nt.memoizedState.isDehydrated)) + try { + bd(et.containerInfo) + } catch (gt) { + W$8(tt, tt.return, gt) + } + break + case 4: + dk(et, tt), fk(tt) + break + case 13: + dk(et, tt), + fk(tt), + (it = tt.child), + it.flags & 8192 && + ((ot = it.memoizedState !== null), + (it.stateNode.isHidden = ot), + !ot || (it.alternate !== null && it.alternate.memoizedState !== null) || (gk = B$2())), + rt & 4 && bk(tt) + break + case 22: + if ( + ((ut = nt !== null && nt.memoizedState !== null), + tt.mode & 1 ? ((U$3 = (ct = U$3) || ut), dk(et, tt), (U$3 = ct)) : dk(et, tt), + fk(tt), + rt & 8192) + ) { + if (((ct = tt.memoizedState !== null), (tt.stateNode.isHidden = ct) && !ut && tt.mode & 1)) + for (V$4 = tt, ut = tt.child; ut !== null; ) { + for (ht = V$4 = ut; V$4 !== null; ) { + switch (((dt = V$4), (pt = dt.child), dt.tag)) { + case 0: + case 11: + case 14: + case 15: + Qj(4, dt, dt.return) + break + case 1: + Mj(dt, dt.return) + var mt = dt.stateNode + if (typeof mt.componentWillUnmount == 'function') { + ;(rt = dt), (nt = dt.return) + try { + ;(et = rt), + (mt.props = et.memoizedProps), + (mt.state = et.memoizedState), + mt.componentWillUnmount() + } catch (gt) { + W$8(rt, nt, gt) + } + } + break + case 5: + Mj(dt, dt.return) + break + case 22: + if (dt.memoizedState !== null) { + hk(ht) + continue + } + } + pt !== null ? ((pt.return = dt), (V$4 = pt)) : hk(ht) + } + ut = ut.sibling + } + e: for (ut = null, ht = tt; ; ) { + if (ht.tag === 5) { + if (ut === null) { + ut = ht + try { + ;(it = ht.stateNode), + ct + ? ((ot = it.style), + typeof ot.setProperty == 'function' + ? ot.setProperty('display', 'none', 'important') + : (ot.display = 'none')) + : ((st = ht.stateNode), + (lt = ht.memoizedProps.style), + (at = lt != null && lt.hasOwnProperty('display') ? lt.display : null), + (st.style.display = rb('display', at))) + } catch (gt) { + W$8(tt, tt.return, gt) + } + } + } else if (ht.tag === 6) { + if (ut === null) + try { + ht.stateNode.nodeValue = ct ? '' : ht.memoizedProps + } catch (gt) { + W$8(tt, tt.return, gt) + } + } else if ( + ((ht.tag !== 22 && ht.tag !== 23) || ht.memoizedState === null || ht === tt) && + ht.child !== null + ) { + ;(ht.child.return = ht), (ht = ht.child) + continue + } + if (ht === tt) break e + for (; ht.sibling === null; ) { + if (ht.return === null || ht.return === tt) break e + ut === ht && (ut = null), (ht = ht.return) + } + ut === ht && (ut = null), (ht.sibling.return = ht.return), (ht = ht.sibling) + } + } + break + case 19: + dk(et, tt), fk(tt), rt & 4 && bk(tt) + break + case 21: + break + default: + dk(et, tt), fk(tt) + } + } + function fk(tt) { + var et = tt.flags + if (et & 2) { + try { + e: { + for (var nt = tt.return; nt !== null; ) { + if (Uj(nt)) { + var rt = nt + break e + } + nt = nt.return + } + throw Error(p$a(160)) + } + switch (rt.tag) { + case 5: + var it = rt.stateNode + rt.flags & 32 && (ob(it, ''), (rt.flags &= -33)) + var ot = Vj(tt) + Xj(tt, ot, it) + break + case 3: + case 4: + var at = rt.stateNode.containerInfo, + st = Vj(tt) + Wj(tt, st, at) + break + default: + throw Error(p$a(161)) + } + } catch (lt) { + W$8(tt, tt.return, lt) + } + tt.flags &= -3 + } + et & 4096 && (tt.flags &= -4097) + } + function ik(tt, et, nt) { + ;(V$4 = tt), jk(tt) + } + function jk(tt, et, nt) { + for (var rt = (tt.mode & 1) !== 0; V$4 !== null; ) { + var it = V$4, + ot = it.child + if (it.tag === 22 && rt) { + var at = it.memoizedState !== null || Kj + if (!at) { + var st = it.alternate, + lt = (st !== null && st.memoizedState !== null) || U$3 + st = Kj + var ct = U$3 + if (((Kj = at), (U$3 = lt) && !ct)) + for (V$4 = it; V$4 !== null; ) + (at = V$4), + (lt = at.child), + at.tag === 22 && at.memoizedState !== null + ? kk(it) + : lt !== null + ? ((lt.return = at), (V$4 = lt)) + : kk(it) + for (; ot !== null; ) (V$4 = ot), jk(ot), (ot = ot.sibling) + ;(V$4 = it), (Kj = st), (U$3 = ct) + } + lk(tt) + } else it.subtreeFlags & 8772 && ot !== null ? ((ot.return = it), (V$4 = ot)) : lk(tt) + } + } + function lk(tt) { + for (; V$4 !== null; ) { + var et = V$4 + if (et.flags & 8772) { + var nt = et.alternate + try { + if (et.flags & 8772) + switch (et.tag) { + case 0: + case 11: + case 15: + U$3 || Rj(5, et) + break + case 1: + var rt = et.stateNode + if (et.flags & 4 && !U$3) + if (nt === null) rt.componentDidMount() + else { + var it = et.elementType === et.type ? nt.memoizedProps : Lg(et.type, nt.memoizedProps) + rt.componentDidUpdate(it, nt.memoizedState, rt.__reactInternalSnapshotBeforeUpdate) + } + var ot = et.updateQueue + ot !== null && ih(et, ot, rt) + break + case 3: + var at = et.updateQueue + if (at !== null) { + if (((nt = null), et.child !== null)) + switch (et.child.tag) { + case 5: + nt = et.child.stateNode + break + case 1: + nt = et.child.stateNode + } + ih(et, at, nt) + } + break + case 5: + var st = et.stateNode + if (nt === null && et.flags & 4) { + nt = st + var lt = et.memoizedProps + switch (et.type) { + case 'button': + case 'input': + case 'select': + case 'textarea': + lt.autoFocus && nt.focus() + break + case 'img': + lt.src && (nt.src = lt.src) + } + } + break + case 6: + break + case 4: + break + case 12: + break + case 13: + if (et.memoizedState === null) { + var ct = et.alternate + if (ct !== null) { + var ut = ct.memoizedState + if (ut !== null) { + var ht = ut.dehydrated + ht !== null && bd(ht) + } + } + } + break + case 19: + case 17: + case 21: + case 22: + case 23: + case 25: + break + default: + throw Error(p$a(163)) + } + U$3 || (et.flags & 512 && Sj(et)) + } catch (dt) { + W$8(et, et.return, dt) + } + } + if (et === tt) { + V$4 = null + break + } + if (((nt = et.sibling), nt !== null)) { + ;(nt.return = et.return), (V$4 = nt) + break + } + V$4 = et.return + } + } + function hk(tt) { + for (; V$4 !== null; ) { + var et = V$4 + if (et === tt) { + V$4 = null + break + } + var nt = et.sibling + if (nt !== null) { + ;(nt.return = et.return), (V$4 = nt) + break + } + V$4 = et.return + } + } + function kk(tt) { + for (; V$4 !== null; ) { + var et = V$4 + try { + switch (et.tag) { + case 0: + case 11: + case 15: + var nt = et.return + try { + Rj(4, et) + } catch (lt) { + W$8(et, nt, lt) + } + break + case 1: + var rt = et.stateNode + if (typeof rt.componentDidMount == 'function') { + var it = et.return + try { + rt.componentDidMount() + } catch (lt) { + W$8(et, it, lt) + } + } + var ot = et.return + try { + Sj(et) + } catch (lt) { + W$8(et, ot, lt) + } + break + case 5: + var at = et.return + try { + Sj(et) + } catch (lt) { + W$8(et, at, lt) + } + } + } catch (lt) { + W$8(et, et.return, lt) + } + if (et === tt) { + V$4 = null + break + } + var st = et.sibling + if (st !== null) { + ;(st.return = et.return), (V$4 = st) + break + } + V$4 = et.return + } + } + var mk = Math.ceil, + nk = ua.ReactCurrentDispatcher, + ok = ua.ReactCurrentOwner, + pk = ua.ReactCurrentBatchConfig, + K$7 = 0, + R$2 = null, + Y$3 = null, + Z$1 = 0, + gj = 0, + fj = Uf(0), + T$3 = 0, + qk = null, + hh = 0, + rk = 0, + sk = 0, + tk = null, + uk = null, + gk = 0, + Hj = 1 / 0, + vk = null, + Pi$1 = !1, + Qi = null, + Si = null, + wk = !1, + xk = null, + yk = 0, + zk = 0, + Ak = null, + Bk = -1, + Ck = 0 + function L$3() { + return K$7 & 6 ? B$2() : Bk !== -1 ? Bk : (Bk = B$2()) + } + function lh(tt) { + return tt.mode & 1 + ? K$7 & 2 && Z$1 !== 0 + ? Z$1 & -Z$1 + : Kg.transition !== null + ? (Ck === 0 && (Ck = yc()), Ck) + : ((tt = C$2), tt !== 0 || ((tt = window.event), (tt = tt === void 0 ? 16 : jd(tt.type))), tt) + : 1 + } + function mh(tt, et, nt, rt) { + if (50 < zk) throw ((zk = 0), (Ak = null), Error(p$a(185))) + Ac(tt, nt, rt), + (!(K$7 & 2) || tt !== R$2) && + (tt === R$2 && (!(K$7 & 2) && (rk |= nt), T$3 === 4 && Dk(tt, Z$1)), + Ek(tt, rt), + nt === 1 && K$7 === 0 && !(et.mode & 1) && ((Hj = B$2() + 500), fg && jg())) + } + function Ek(tt, et) { + var nt = tt.callbackNode + wc(tt, et) + var rt = uc(tt, tt === R$2 ? Z$1 : 0) + if (rt === 0) nt !== null && bc(nt), (tt.callbackNode = null), (tt.callbackPriority = 0) + else if (((et = rt & -rt), tt.callbackPriority !== et)) { + if ((nt != null && bc(nt), et === 1)) + tt.tag === 0 ? ig(Fk.bind(null, tt)) : hg(Fk.bind(null, tt)), + Jf(function () { + !(K$7 & 6) && jg() + }), + (nt = null) + else { + switch (Dc(rt)) { + case 1: + nt = fc + break + case 4: + nt = gc + break + case 16: + nt = hc + break + case 536870912: + nt = jc + break + default: + nt = hc + } + nt = Gk(nt, Hk.bind(null, tt)) + } + ;(tt.callbackPriority = et), (tt.callbackNode = nt) + } + } + function Hk(tt, et) { + if (((Bk = -1), (Ck = 0), K$7 & 6)) throw Error(p$a(327)) + var nt = tt.callbackNode + if (Ik() && tt.callbackNode !== nt) return null + var rt = uc(tt, tt === R$2 ? Z$1 : 0) + if (rt === 0) return null + if (rt & 30 || rt & tt.expiredLanes || et) et = Jk(tt, rt) + else { + et = rt + var it = K$7 + K$7 |= 2 + var ot = Kk() + ;(R$2 !== tt || Z$1 !== et) && ((vk = null), (Hj = B$2() + 500), Lk(tt, et)) + do + try { + Mk() + break + } catch (st) { + Nk(tt, st) + } + while (1) + Qg(), (nk.current = ot), (K$7 = it), Y$3 !== null ? (et = 0) : ((R$2 = null), (Z$1 = 0), (et = T$3)) + } + if (et !== 0) { + if ((et === 2 && ((it = xc(tt)), it !== 0 && ((rt = it), (et = Ok(tt, it)))), et === 1)) + throw ((nt = qk), Lk(tt, 0), Dk(tt, rt), Ek(tt, B$2()), nt) + if (et === 6) Dk(tt, rt) + else { + if ( + ((it = tt.current.alternate), + !(rt & 30) && + !Pk(it) && + ((et = Jk(tt, rt)), et === 2 && ((ot = xc(tt)), ot !== 0 && ((rt = ot), (et = Ok(tt, ot)))), et === 1)) + ) + throw ((nt = qk), Lk(tt, 0), Dk(tt, rt), Ek(tt, B$2()), nt) + switch (((tt.finishedWork = it), (tt.finishedLanes = rt), et)) { + case 0: + case 1: + throw Error(p$a(345)) + case 2: + Qk(tt, uk, vk) + break + case 3: + if ((Dk(tt, rt), (rt & 130023424) === rt && ((et = gk + 500 - B$2()), 10 < et))) { + if (uc(tt, 0) !== 0) break + if (((it = tt.suspendedLanes), (it & rt) !== rt)) { + L$3(), (tt.pingedLanes |= tt.suspendedLanes & it) + break + } + tt.timeoutHandle = Ff(Qk.bind(null, tt, uk, vk), et) + break + } + Qk(tt, uk, vk) + break + case 4: + if ((Dk(tt, rt), (rt & 4194240) === rt)) break + for (et = tt.eventTimes, it = -1; 0 < rt; ) { + var at = 31 - oc(rt) + ;(ot = 1 << at), (at = et[at]), at > it && (it = at), (rt &= ~ot) + } + if ( + ((rt = it), + (rt = B$2() - rt), + (rt = + (120 > rt + ? 120 + : 480 > rt + ? 480 + : 1080 > rt + ? 1080 + : 1920 > rt + ? 1920 + : 3e3 > rt + ? 3e3 + : 4320 > rt + ? 4320 + : 1960 * mk(rt / 1960)) - rt), + 10 < rt) + ) { + tt.timeoutHandle = Ff(Qk.bind(null, tt, uk, vk), rt) + break + } + Qk(tt, uk, vk) + break + case 5: + Qk(tt, uk, vk) + break + default: + throw Error(p$a(329)) + } + } + } + return Ek(tt, B$2()), tt.callbackNode === nt ? Hk.bind(null, tt) : null + } + function Ok(tt, et) { + var nt = tk + return ( + tt.current.memoizedState.isDehydrated && (Lk(tt, et).flags |= 256), + (tt = Jk(tt, et)), + tt !== 2 && ((et = uk), (uk = nt), et !== null && Gj(et)), + tt + ) + } + function Gj(tt) { + uk === null ? (uk = tt) : uk.push.apply(uk, tt) + } + function Pk(tt) { + for (var et = tt; ; ) { + if (et.flags & 16384) { + var nt = et.updateQueue + if (nt !== null && ((nt = nt.stores), nt !== null)) + for (var rt = 0; rt < nt.length; rt++) { + var it = nt[rt], + ot = it.getSnapshot + it = it.value + try { + if (!He$1(ot(), it)) return !1 + } catch { + return !1 + } + } + } + if (((nt = et.child), et.subtreeFlags & 16384 && nt !== null)) (nt.return = et), (et = nt) + else { + if (et === tt) break + for (; et.sibling === null; ) { + if (et.return === null || et.return === tt) return !0 + et = et.return + } + ;(et.sibling.return = et.return), (et = et.sibling) + } + } + return !0 + } + function Dk(tt, et) { + for (et &= ~sk, et &= ~rk, tt.suspendedLanes |= et, tt.pingedLanes &= ~et, tt = tt.expirationTimes; 0 < et; ) { + var nt = 31 - oc(et), + rt = 1 << nt + ;(tt[nt] = -1), (et &= ~rt) + } + } + function Fk(tt) { + if (K$7 & 6) throw Error(p$a(327)) + Ik() + var et = uc(tt, 0) + if (!(et & 1)) return Ek(tt, B$2()), null + var nt = Jk(tt, et) + if (tt.tag !== 0 && nt === 2) { + var rt = xc(tt) + rt !== 0 && ((et = rt), (nt = Ok(tt, rt))) + } + if (nt === 1) throw ((nt = qk), Lk(tt, 0), Dk(tt, et), Ek(tt, B$2()), nt) + if (nt === 6) throw Error(p$a(345)) + return (tt.finishedWork = tt.current.alternate), (tt.finishedLanes = et), Qk(tt, uk, vk), Ek(tt, B$2()), null + } + function Rk(tt, et) { + var nt = K$7 + K$7 |= 1 + try { + return tt(et) + } finally { + ;(K$7 = nt), K$7 === 0 && ((Hj = B$2() + 500), fg && jg()) + } + } + function Sk(tt) { + xk !== null && xk.tag === 0 && !(K$7 & 6) && Ik() + var et = K$7 + K$7 |= 1 + var nt = pk.transition, + rt = C$2 + try { + if (((pk.transition = null), (C$2 = 1), tt)) return tt() + } finally { + ;(C$2 = rt), (pk.transition = nt), (K$7 = et), !(K$7 & 6) && jg() + } + } + function Ij() { + ;(gj = fj.current), E$2(fj) + } + function Lk(tt, et) { + ;(tt.finishedWork = null), (tt.finishedLanes = 0) + var nt = tt.timeoutHandle + if ((nt !== -1 && ((tt.timeoutHandle = -1), Gf(nt)), Y$3 !== null)) + for (nt = Y$3.return; nt !== null; ) { + var rt = nt + switch ((wg(rt), rt.tag)) { + case 1: + ;(rt = rt.type.childContextTypes), rt != null && $f() + break + case 3: + Jh(), E$2(Wf), E$2(H$3), Oh() + break + case 5: + Lh(rt) + break + case 4: + Jh() + break + case 13: + E$2(M$3) + break + case 19: + E$2(M$3) + break + case 10: + Rg(rt.type._context) + break + case 22: + case 23: + Ij() + } + nt = nt.return + } + if ( + ((R$2 = tt), + (Y$3 = tt = wh(tt.current, null)), + (Z$1 = gj = et), + (T$3 = 0), + (qk = null), + (sk = rk = hh = 0), + (uk = tk = null), + Wg !== null) + ) { + for (et = 0; et < Wg.length; et++) + if (((nt = Wg[et]), (rt = nt.interleaved), rt !== null)) { + nt.interleaved = null + var it = rt.next, + ot = nt.pending + if (ot !== null) { + var at = ot.next + ;(ot.next = it), (rt.next = at) + } + nt.pending = rt + } + Wg = null + } + return tt + } + function Nk(tt, et) { + do { + var nt = Y$3 + try { + if ((Qg(), (Ph.current = ai), Sh)) { + for (var rt = N$3.memoizedState; rt !== null; ) { + var it = rt.queue + it !== null && (it.pending = null), (rt = rt.next) + } + Sh = !1 + } + if ( + ((Rh = 0), + (P$4 = O$1 = N$3 = null), + (Th = !1), + (Uh = 0), + (ok.current = null), + nt === null || nt.return === null) + ) { + ;(T$3 = 1), (qk = et), (Y$3 = null) + break + } + e: { + var ot = tt, + at = nt.return, + st = nt, + lt = et + if (((et = Z$1), (st.flags |= 32768), lt !== null && typeof lt == 'object' && typeof lt.then == 'function')) { + var ct = lt, + ut = st, + ht = ut.tag + if (!(ut.mode & 1) && (ht === 0 || ht === 11 || ht === 15)) { + var dt = ut.alternate + dt + ? ((ut.updateQueue = dt.updateQueue), (ut.memoizedState = dt.memoizedState), (ut.lanes = dt.lanes)) + : ((ut.updateQueue = null), (ut.memoizedState = null)) + } + var pt = Vi(at) + if (pt !== null) { + ;(pt.flags &= -257), Wi(pt, at, st, ot, et), pt.mode & 1 && Ti(ot, ct, et), (et = pt), (lt = ct) + var mt = et.updateQueue + if (mt === null) { + var gt = new Set() + gt.add(lt), (et.updateQueue = gt) + } else mt.add(lt) + break e + } else { + if (!(et & 1)) { + Ti(ot, ct, et), uj() + break e + } + lt = Error(p$a(426)) + } + } else if (I$4 && st.mode & 1) { + var yt = Vi(at) + if (yt !== null) { + !(yt.flags & 65536) && (yt.flags |= 256), Wi(yt, at, st, ot, et), Jg(Ki(lt, st)) + break e + } + } + ;(ot = lt = Ki(lt, st)), T$3 !== 4 && (T$3 = 2), tk === null ? (tk = [ot]) : tk.push(ot), (ot = at) + do { + switch (ot.tag) { + case 3: + ;(ot.flags |= 65536), (et &= -et), (ot.lanes |= et) + var bt = Oi(ot, lt, et) + fh(ot, bt) + break e + case 1: + st = lt + var vt = ot.type, + xt = ot.stateNode + if ( + !(ot.flags & 128) && + (typeof vt.getDerivedStateFromError == 'function' || + (xt !== null && typeof xt.componentDidCatch == 'function' && (Si === null || !Si.has(xt)))) + ) { + ;(ot.flags |= 65536), (et &= -et), (ot.lanes |= et) + var kt = Ri(ot, st, et) + fh(ot, kt) + break e + } + } + ot = ot.return + } while (ot !== null) + } + Tk(nt) + } catch (St) { + ;(et = St), Y$3 === nt && nt !== null && (Y$3 = nt = nt.return) + continue + } + break + } while (1) + } + function Kk() { + var tt = nk.current + return (nk.current = ai), tt === null ? ai : tt + } + function uj() { + ;(T$3 === 0 || T$3 === 3 || T$3 === 2) && (T$3 = 4), + R$2 === null || (!(hh & 268435455) && !(rk & 268435455)) || Dk(R$2, Z$1) + } + function Jk(tt, et) { + var nt = K$7 + K$7 |= 2 + var rt = Kk() + ;(R$2 !== tt || Z$1 !== et) && ((vk = null), Lk(tt, et)) + do + try { + Uk() + break + } catch (it) { + Nk(tt, it) + } + while (1) + if ((Qg(), (K$7 = nt), (nk.current = rt), Y$3 !== null)) throw Error(p$a(261)) + return (R$2 = null), (Z$1 = 0), T$3 + } + function Uk() { + for (; Y$3 !== null; ) Vk(Y$3) + } + function Mk() { + for (; Y$3 !== null && !cc$1(); ) Vk(Y$3) + } + function Vk(tt) { + var et = Wk(tt.alternate, tt, gj) + ;(tt.memoizedProps = tt.pendingProps), et === null ? Tk(tt) : (Y$3 = et), (ok.current = null) + } + function Tk(tt) { + var et = tt + do { + var nt = et.alternate + if (((tt = et.return), et.flags & 32768)) { + if (((nt = Jj(nt, et)), nt !== null)) { + ;(nt.flags &= 32767), (Y$3 = nt) + return + } + if (tt !== null) (tt.flags |= 32768), (tt.subtreeFlags = 0), (tt.deletions = null) + else { + ;(T$3 = 6), (Y$3 = null) + return + } + } else if (((nt = Fj(nt, et, gj)), nt !== null)) { + Y$3 = nt + return + } + if (((et = et.sibling), et !== null)) { + Y$3 = et + return + } + Y$3 = et = tt + } while (et !== null) + T$3 === 0 && (T$3 = 5) + } + function Qk(tt, et, nt) { + var rt = C$2, + it = pk.transition + try { + ;(pk.transition = null), (C$2 = 1), Xk(tt, et, nt, rt) + } finally { + ;(pk.transition = it), (C$2 = rt) + } + return null + } + function Xk(tt, et, nt, rt) { + do Ik() + while (xk !== null) + if (K$7 & 6) throw Error(p$a(327)) + nt = tt.finishedWork + var it = tt.finishedLanes + if (nt === null) return null + if (((tt.finishedWork = null), (tt.finishedLanes = 0), nt === tt.current)) throw Error(p$a(177)) + ;(tt.callbackNode = null), (tt.callbackPriority = 0) + var ot = nt.lanes | nt.childLanes + if ( + (Bc(tt, ot), + tt === R$2 && ((Y$3 = R$2 = null), (Z$1 = 0)), + (!(nt.subtreeFlags & 2064) && !(nt.flags & 2064)) || + wk || + ((wk = !0), + Gk(hc, function () { + return Ik(), null + })), + (ot = (nt.flags & 15990) !== 0), + nt.subtreeFlags & 15990 || ot) + ) { + ;(ot = pk.transition), (pk.transition = null) + var at = C$2 + C$2 = 1 + var st = K$7 + ;(K$7 |= 4), + (ok.current = null), + Pj(tt, nt), + ek(nt, tt), + Oe$1(Df), + (dd = !!Cf), + (Df = Cf = null), + (tt.current = nt), + ik(nt), + dc(), + (K$7 = st), + (C$2 = at), + (pk.transition = ot) + } else tt.current = nt + if ( + (wk && ((wk = !1), (xk = tt), (yk = it)), + (ot = tt.pendingLanes), + ot === 0 && (Si = null), + mc(nt.stateNode), + Ek(tt, B$2()), + et !== null) + ) + for (rt = tt.onRecoverableError, nt = 0; nt < et.length; nt++) + (it = et[nt]), rt(it.value, { componentStack: it.stack, digest: it.digest }) + if (Pi$1) throw ((Pi$1 = !1), (tt = Qi), (Qi = null), tt) + return ( + yk & 1 && tt.tag !== 0 && Ik(), + (ot = tt.pendingLanes), + ot & 1 ? (tt === Ak ? zk++ : ((zk = 0), (Ak = tt))) : (zk = 0), + jg(), + null + ) + } + function Ik() { + if (xk !== null) { + var tt = Dc(yk), + et = pk.transition, + nt = C$2 + try { + if (((pk.transition = null), (C$2 = 16 > tt ? 16 : tt), xk === null)) var rt = !1 + else { + if (((tt = xk), (xk = null), (yk = 0), K$7 & 6)) throw Error(p$a(331)) + var it = K$7 + for (K$7 |= 4, V$4 = tt.current; V$4 !== null; ) { + var ot = V$4, + at = ot.child + if (V$4.flags & 16) { + var st = ot.deletions + if (st !== null) { + for (var lt = 0; lt < st.length; lt++) { + var ct = st[lt] + for (V$4 = ct; V$4 !== null; ) { + var ut = V$4 + switch (ut.tag) { + case 0: + case 11: + case 15: + Qj(8, ut, ot) + } + var ht = ut.child + if (ht !== null) (ht.return = ut), (V$4 = ht) + else + for (; V$4 !== null; ) { + ut = V$4 + var dt = ut.sibling, + pt = ut.return + if ((Tj(ut), ut === ct)) { + V$4 = null + break + } + if (dt !== null) { + ;(dt.return = pt), (V$4 = dt) + break + } + V$4 = pt + } + } + } + var mt = ot.alternate + if (mt !== null) { + var gt = mt.child + if (gt !== null) { + mt.child = null + do { + var yt = gt.sibling + ;(gt.sibling = null), (gt = yt) + } while (gt !== null) + } + } + V$4 = ot + } + } + if (ot.subtreeFlags & 2064 && at !== null) (at.return = ot), (V$4 = at) + else + e: for (; V$4 !== null; ) { + if (((ot = V$4), ot.flags & 2048)) + switch (ot.tag) { + case 0: + case 11: + case 15: + Qj(9, ot, ot.return) + } + var bt = ot.sibling + if (bt !== null) { + ;(bt.return = ot.return), (V$4 = bt) + break e + } + V$4 = ot.return + } + } + var vt = tt.current + for (V$4 = vt; V$4 !== null; ) { + at = V$4 + var xt = at.child + if (at.subtreeFlags & 2064 && xt !== null) (xt.return = at), (V$4 = xt) + else + e: for (at = vt; V$4 !== null; ) { + if (((st = V$4), st.flags & 2048)) + try { + switch (st.tag) { + case 0: + case 11: + case 15: + Rj(9, st) + } + } catch (St) { + W$8(st, st.return, St) + } + if (st === at) { + V$4 = null + break e + } + var kt = st.sibling + if (kt !== null) { + ;(kt.return = st.return), (V$4 = kt) + break e + } + V$4 = st.return + } + } + if (((K$7 = it), jg(), lc && typeof lc.onPostCommitFiberRoot == 'function')) + try { + lc.onPostCommitFiberRoot(kc, tt) + } catch {} + rt = !0 + } + return rt + } finally { + ;(C$2 = nt), (pk.transition = et) + } + } + return !1 + } + function Yk(tt, et, nt) { + ;(et = Ki(nt, et)), + (et = Oi(tt, et, 1)), + (tt = dh$1(tt, et, 1)), + (et = L$3()), + tt !== null && (Ac(tt, 1, et), Ek(tt, et)) + } + function W$8(tt, et, nt) { + if (tt.tag === 3) Yk(tt, tt, nt) + else + for (; et !== null; ) { + if (et.tag === 3) { + Yk(et, tt, nt) + break + } else if (et.tag === 1) { + var rt = et.stateNode + if ( + typeof et.type.getDerivedStateFromError == 'function' || + (typeof rt.componentDidCatch == 'function' && (Si === null || !Si.has(rt))) + ) { + ;(tt = Ki(nt, tt)), + (tt = Ri(et, tt, 1)), + (et = dh$1(et, tt, 1)), + (tt = L$3()), + et !== null && (Ac(et, 1, tt), Ek(et, tt)) + break + } + } + et = et.return + } + } + function Ui(tt, et, nt) { + var rt = tt.pingCache + rt !== null && rt.delete(et), + (et = L$3()), + (tt.pingedLanes |= tt.suspendedLanes & nt), + R$2 === tt && + (Z$1 & nt) === nt && + (T$3 === 4 || (T$3 === 3 && (Z$1 & 130023424) === Z$1 && 500 > B$2() - gk) ? Lk(tt, 0) : (sk |= nt)), + Ek(tt, et) + } + function Zk(tt, et) { + et === 0 && (tt.mode & 1 ? ((et = sc), (sc <<= 1), !(sc & 130023424) && (sc = 4194304)) : (et = 1)) + var nt = L$3() + ;(tt = Zg(tt, et)), tt !== null && (Ac(tt, et, nt), Ek(tt, nt)) + } + function vj(tt) { + var et = tt.memoizedState, + nt = 0 + et !== null && (nt = et.retryLane), Zk(tt, nt) + } + function ck(tt, et) { + var nt = 0 + switch (tt.tag) { + case 13: + var rt = tt.stateNode, + it = tt.memoizedState + it !== null && (nt = it.retryLane) + break + case 19: + rt = tt.stateNode + break + default: + throw Error(p$a(314)) + } + rt !== null && rt.delete(et), Zk(tt, nt) + } + var Wk + Wk = function (tt, et, nt) { + if (tt !== null) + if (tt.memoizedProps !== et.pendingProps || Wf.current) Ug = !0 + else { + if (!(tt.lanes & nt) && !(et.flags & 128)) return (Ug = !1), zj(tt, et, nt) + Ug = !!(tt.flags & 131072) + } + else (Ug = !1), I$4 && et.flags & 1048576 && ug(et, ng, et.index) + switch (((et.lanes = 0), et.tag)) { + case 2: + var rt = et.type + jj(tt, et), (tt = et.pendingProps) + var it = Yf(et, H$3.current) + Tg(et, nt), (it = Xh(null, et, rt, tt, it, nt)) + var ot = bi() + return ( + (et.flags |= 1), + typeof it == 'object' && it !== null && typeof it.render == 'function' && it.$$typeof === void 0 + ? ((et.tag = 1), + (et.memoizedState = null), + (et.updateQueue = null), + Zf(rt) ? ((ot = !0), cg(et)) : (ot = !1), + (et.memoizedState = it.state !== null && it.state !== void 0 ? it.state : null), + ah(et), + (it.updater = nh), + (et.stateNode = it), + (it._reactInternals = et), + rh$1(et, rt, tt, nt), + (et = kj(null, et, rt, !0, ot, nt))) + : ((et.tag = 0), I$4 && ot && vg(et), Yi(null, et, it, nt), (et = et.child)), + et + ) + case 16: + rt = et.elementType + e: { + switch ( + (jj(tt, et), + (tt = et.pendingProps), + (it = rt._init), + (rt = it(rt._payload)), + (et.type = rt), + (it = et.tag = $k(rt)), + (tt = Lg(rt, tt)), + it) + ) { + case 0: + et = dj(null, et, rt, tt, nt) + break e + case 1: + et = ij(null, et, rt, tt, nt) + break e + case 11: + et = Zi(null, et, rt, tt, nt) + break e + case 14: + et = aj(null, et, rt, Lg(rt.type, tt), nt) + break e + } + throw Error(p$a(306, rt, '')) + } + return et + case 0: + return ( + (rt = et.type), (it = et.pendingProps), (it = et.elementType === rt ? it : Lg(rt, it)), dj(tt, et, rt, it, nt) + ) + case 1: + return ( + (rt = et.type), (it = et.pendingProps), (it = et.elementType === rt ? it : Lg(rt, it)), ij(tt, et, rt, it, nt) + ) + case 3: + e: { + if ((lj(et), tt === null)) throw Error(p$a(387)) + ;(rt = et.pendingProps), (ot = et.memoizedState), (it = ot.element), bh(tt, et), gh(et, rt, null, nt) + var at = et.memoizedState + if (((rt = at.element), ot.isDehydrated)) + if ( + ((ot = { + element: rt, + isDehydrated: !1, + cache: at.cache, + pendingSuspenseBoundaries: at.pendingSuspenseBoundaries, + transitions: at.transitions, + }), + (et.updateQueue.baseState = ot), + (et.memoizedState = ot), + et.flags & 256) + ) { + ;(it = Ki(Error(p$a(423)), et)), (et = mj(tt, et, rt, nt, it)) + break e + } else if (rt !== it) { + ;(it = Ki(Error(p$a(424)), et)), (et = mj(tt, et, rt, nt, it)) + break e + } else + for ( + yg = Lf(et.stateNode.containerInfo.firstChild), + xg = et, + I$4 = !0, + zg = null, + nt = Ch$1(et, null, rt, nt), + et.child = nt; + nt; + + ) + (nt.flags = (nt.flags & -3) | 4096), (nt = nt.sibling) + else { + if ((Ig(), rt === it)) { + et = $i(tt, et, nt) + break e + } + Yi(tt, et, rt, nt) + } + et = et.child + } + return et + case 5: + return ( + Kh$1(et), + tt === null && Eg(et), + (rt = et.type), + (it = et.pendingProps), + (ot = tt !== null ? tt.memoizedProps : null), + (at = it.children), + Ef(rt, it) ? (at = null) : ot !== null && Ef(rt, ot) && (et.flags |= 32), + hj(tt, et), + Yi(tt, et, at, nt), + et.child + ) + case 6: + return tt === null && Eg(et), null + case 13: + return pj(tt, et, nt) + case 4: + return ( + Ih(et, et.stateNode.containerInfo), + (rt = et.pendingProps), + tt === null ? (et.child = Bh(et, null, rt, nt)) : Yi(tt, et, rt, nt), + et.child + ) + case 11: + return ( + (rt = et.type), (it = et.pendingProps), (it = et.elementType === rt ? it : Lg(rt, it)), Zi(tt, et, rt, it, nt) + ) + case 7: + return Yi(tt, et, et.pendingProps, nt), et.child + case 8: + return Yi(tt, et, et.pendingProps.children, nt), et.child + case 12: + return Yi(tt, et, et.pendingProps.children, nt), et.child + case 10: + e: { + if ( + ((rt = et.type._context), + (it = et.pendingProps), + (ot = et.memoizedProps), + (at = it.value), + G$3(Mg, rt._currentValue), + (rt._currentValue = at), + ot !== null) + ) + if (He$1(ot.value, at)) { + if (ot.children === it.children && !Wf.current) { + et = $i(tt, et, nt) + break e + } + } else + for (ot = et.child, ot !== null && (ot.return = et); ot !== null; ) { + var st = ot.dependencies + if (st !== null) { + at = ot.child + for (var lt = st.firstContext; lt !== null; ) { + if (lt.context === rt) { + if (ot.tag === 1) { + ;(lt = ch$1(-1, nt & -nt)), (lt.tag = 2) + var ct = ot.updateQueue + if (ct !== null) { + ct = ct.shared + var ut = ct.pending + ut === null ? (lt.next = lt) : ((lt.next = ut.next), (ut.next = lt)), (ct.pending = lt) + } + } + ;(ot.lanes |= nt), + (lt = ot.alternate), + lt !== null && (lt.lanes |= nt), + Sg(ot.return, nt, et), + (st.lanes |= nt) + break + } + lt = lt.next + } + } else if (ot.tag === 10) at = ot.type === et.type ? null : ot.child + else if (ot.tag === 18) { + if (((at = ot.return), at === null)) throw Error(p$a(341)) + ;(at.lanes |= nt), + (st = at.alternate), + st !== null && (st.lanes |= nt), + Sg(at, nt, et), + (at = ot.sibling) + } else at = ot.child + if (at !== null) at.return = ot + else + for (at = ot; at !== null; ) { + if (at === et) { + at = null + break + } + if (((ot = at.sibling), ot !== null)) { + ;(ot.return = at.return), (at = ot) + break + } + at = at.return + } + ot = at + } + Yi(tt, et, it.children, nt), (et = et.child) + } + return et + case 9: + return ( + (it = et.type), + (rt = et.pendingProps.children), + Tg(et, nt), + (it = Vg(it)), + (rt = rt(it)), + (et.flags |= 1), + Yi(tt, et, rt, nt), + et.child + ) + case 14: + return (rt = et.type), (it = Lg(rt, et.pendingProps)), (it = Lg(rt.type, it)), aj(tt, et, rt, it, nt) + case 15: + return cj(tt, et, et.type, et.pendingProps, nt) + case 17: + return ( + (rt = et.type), + (it = et.pendingProps), + (it = et.elementType === rt ? it : Lg(rt, it)), + jj(tt, et), + (et.tag = 1), + Zf(rt) ? ((tt = !0), cg(et)) : (tt = !1), + Tg(et, nt), + ph(et, rt, it), + rh$1(et, rt, it, nt), + kj(null, et, rt, !0, tt, nt) + ) + case 19: + return yj(tt, et, nt) + case 22: + return ej(tt, et, nt) + } + throw Error(p$a(156, et.tag)) + } + function Gk(tt, et) { + return ac(tt, et) + } + function al(tt, et, nt, rt) { + ;(this.tag = tt), + (this.key = nt), + (this.sibling = this.child = this.return = this.stateNode = this.type = this.elementType = null), + (this.index = 0), + (this.ref = null), + (this.pendingProps = et), + (this.dependencies = this.memoizedState = this.updateQueue = this.memoizedProps = null), + (this.mode = rt), + (this.subtreeFlags = this.flags = 0), + (this.deletions = null), + (this.childLanes = this.lanes = 0), + (this.alternate = null) + } + function Bg$1(tt, et, nt, rt) { + return new al(tt, et, nt, rt) + } + function bj(tt) { + return (tt = tt.prototype), !(!tt || !tt.isReactComponent) + } + function $k(tt) { + if (typeof tt == 'function') return bj(tt) ? 1 : 0 + if (tt != null) { + if (((tt = tt.$$typeof), tt === Da)) return 11 + if (tt === Ga) return 14 + } + return 2 + } + function wh(tt, et) { + var nt = tt.alternate + return ( + nt === null + ? ((nt = Bg$1(tt.tag, et, tt.key, tt.mode)), + (nt.elementType = tt.elementType), + (nt.type = tt.type), + (nt.stateNode = tt.stateNode), + (nt.alternate = tt), + (tt.alternate = nt)) + : ((nt.pendingProps = et), (nt.type = tt.type), (nt.flags = 0), (nt.subtreeFlags = 0), (nt.deletions = null)), + (nt.flags = tt.flags & 14680064), + (nt.childLanes = tt.childLanes), + (nt.lanes = tt.lanes), + (nt.child = tt.child), + (nt.memoizedProps = tt.memoizedProps), + (nt.memoizedState = tt.memoizedState), + (nt.updateQueue = tt.updateQueue), + (et = tt.dependencies), + (nt.dependencies = et === null ? null : { lanes: et.lanes, firstContext: et.firstContext }), + (nt.sibling = tt.sibling), + (nt.index = tt.index), + (nt.ref = tt.ref), + nt + ) + } + function yh(tt, et, nt, rt, it, ot) { + var at = 2 + if (((rt = tt), typeof tt == 'function')) bj(tt) && (at = 1) + else if (typeof tt == 'string') at = 5 + else + e: switch (tt) { + case ya: + return Ah(nt.children, it, ot, et) + case za: + ;(at = 8), (it |= 8) + break + case Aa: + return (tt = Bg$1(12, nt, et, it | 2)), (tt.elementType = Aa), (tt.lanes = ot), tt + case Ea: + return (tt = Bg$1(13, nt, et, it)), (tt.elementType = Ea), (tt.lanes = ot), tt + case Fa: + return (tt = Bg$1(19, nt, et, it)), (tt.elementType = Fa), (tt.lanes = ot), tt + case Ia: + return qj(nt, it, ot, et) + default: + if (typeof tt == 'object' && tt !== null) + switch (tt.$$typeof) { + case Ba: + at = 10 + break e + case Ca: + at = 9 + break e + case Da: + at = 11 + break e + case Ga: + at = 14 + break e + case Ha: + ;(at = 16), (rt = null) + break e + } + throw Error(p$a(130, tt == null ? tt : typeof tt, '')) + } + return (et = Bg$1(at, nt, et, it)), (et.elementType = tt), (et.type = rt), (et.lanes = ot), et + } + function Ah(tt, et, nt, rt) { + return (tt = Bg$1(7, tt, rt, et)), (tt.lanes = nt), tt + } + function qj(tt, et, nt, rt) { + return (tt = Bg$1(22, tt, rt, et)), (tt.elementType = Ia), (tt.lanes = nt), (tt.stateNode = { isHidden: !1 }), tt + } + function xh(tt, et, nt) { + return (tt = Bg$1(6, tt, null, et)), (tt.lanes = nt), tt + } + function zh(tt, et, nt) { + return ( + (et = Bg$1(4, tt.children !== null ? tt.children : [], tt.key, et)), + (et.lanes = nt), + (et.stateNode = { containerInfo: tt.containerInfo, pendingChildren: null, implementation: tt.implementation }), + et + ) + } + function bl(tt, et, nt, rt, it) { + ;(this.tag = et), + (this.containerInfo = tt), + (this.finishedWork = this.pingCache = this.current = this.pendingChildren = null), + (this.timeoutHandle = -1), + (this.callbackNode = this.pendingContext = this.context = null), + (this.callbackPriority = 0), + (this.eventTimes = zc(0)), + (this.expirationTimes = zc(-1)), + (this.entangledLanes = + this.finishedLanes = + this.mutableReadLanes = + this.expiredLanes = + this.pingedLanes = + this.suspendedLanes = + this.pendingLanes = + 0), + (this.entanglements = zc(0)), + (this.identifierPrefix = rt), + (this.onRecoverableError = it), + (this.mutableSourceEagerHydrationData = null) + } + function cl(tt, et, nt, rt, it, ot, at, st, lt) { + return ( + (tt = new bl(tt, et, nt, st, lt)), + et === 1 ? ((et = 1), ot === !0 && (et |= 8)) : (et = 0), + (ot = Bg$1(3, null, null, et)), + (tt.current = ot), + (ot.stateNode = tt), + (ot.memoizedState = { + element: rt, + isDehydrated: nt, + cache: null, + transitions: null, + pendingSuspenseBoundaries: null, + }), + ah(ot), + tt + ) + } + function dl(tt, et, nt) { + var rt = 3 < arguments.length && arguments[3] !== void 0 ? arguments[3] : null + return { $$typeof: wa, key: rt == null ? null : '' + rt, children: tt, containerInfo: et, implementation: nt } + } + function el(tt) { + if (!tt) return Vf + tt = tt._reactInternals + e: { + if (Vb(tt) !== tt || tt.tag !== 1) throw Error(p$a(170)) + var et = tt + do { + switch (et.tag) { + case 3: + et = et.stateNode.context + break e + case 1: + if (Zf(et.type)) { + et = et.stateNode.__reactInternalMemoizedMergedChildContext + break e + } + } + et = et.return + } while (et !== null) + throw Error(p$a(171)) + } + if (tt.tag === 1) { + var nt = tt.type + if (Zf(nt)) return bg(tt, nt, et) + } + return et + } + function fl(tt, et, nt, rt, it, ot, at, st, lt) { + return ( + (tt = cl(nt, rt, !0, tt, it, ot, at, st, lt)), + (tt.context = el(null)), + (nt = tt.current), + (rt = L$3()), + (it = lh(nt)), + (ot = ch$1(rt, it)), + (ot.callback = et ?? null), + dh$1(nt, ot, it), + (tt.current.lanes = it), + Ac(tt, it, rt), + Ek(tt, rt), + tt + ) + } + function gl(tt, et, nt, rt) { + var it = et.current, + ot = L$3(), + at = lh(it) + return ( + (nt = el(nt)), + et.context === null ? (et.context = nt) : (et.pendingContext = nt), + (et = ch$1(ot, at)), + (et.payload = { element: tt }), + (rt = rt === void 0 ? null : rt), + rt !== null && (et.callback = rt), + (tt = dh$1(it, et, at)), + tt !== null && (mh(tt, it, at, ot), eh(tt, it, at)), + at + ) + } + function hl$1(tt) { + if (((tt = tt.current), !tt.child)) return null + switch (tt.child.tag) { + case 5: + return tt.child.stateNode + default: + return tt.child.stateNode + } + } + function il(tt, et) { + if (((tt = tt.memoizedState), tt !== null && tt.dehydrated !== null)) { + var nt = tt.retryLane + tt.retryLane = nt !== 0 && nt < et ? nt : et + } + } + function jl(tt, et) { + il(tt, et), (tt = tt.alternate) && il(tt, et) + } + function kl() { + return null + } + var ll = + typeof reportError == 'function' + ? reportError + : function (tt) { + console.error(tt) + } + function ml(tt) { + this._internalRoot = tt + } + nl.prototype.render = ml.prototype.render = function (tt) { + var et = this._internalRoot + if (et === null) throw Error(p$a(409)) + gl(tt, et, null, null) + } + nl.prototype.unmount = ml.prototype.unmount = function () { + var tt = this._internalRoot + if (tt !== null) { + this._internalRoot = null + var et = tt.containerInfo + Sk(function () { + gl(null, tt, null, null) + }), + (et[uf] = null) + } + } + function nl(tt) { + this._internalRoot = tt + } + nl.prototype.unstable_scheduleHydration = function (tt) { + if (tt) { + var et = Hc() + tt = { blockedOn: null, target: tt, priority: et } + for (var nt = 0; nt < Qc.length && et !== 0 && et < Qc[nt].priority; nt++); + Qc.splice(nt, 0, tt), nt === 0 && Vc(tt) + } + } + function ol(tt) { + return !(!tt || (tt.nodeType !== 1 && tt.nodeType !== 9 && tt.nodeType !== 11)) + } + function pl(tt) { + return !( + !tt || + (tt.nodeType !== 1 && + tt.nodeType !== 9 && + tt.nodeType !== 11 && + (tt.nodeType !== 8 || tt.nodeValue !== ' react-mount-point-unstable ')) + ) + } + function ql() {} + function rl(tt, et, nt, rt, it) { + if (it) { + if (typeof rt == 'function') { + var ot = rt + rt = function () { + var ct = hl$1(at) + ot.call(ct) + } + } + var at = fl(et, rt, tt, 0, null, !1, !1, '', ql) + return (tt._reactRootContainer = at), (tt[uf] = at.current), sf(tt.nodeType === 8 ? tt.parentNode : tt), Sk(), at + } + for (; (it = tt.lastChild); ) tt.removeChild(it) + if (typeof rt == 'function') { + var st = rt + rt = function () { + var ct = hl$1(lt) + st.call(ct) + } + } + var lt = cl(tt, 0, !1, null, null, !1, !1, '', ql) + return ( + (tt._reactRootContainer = lt), + (tt[uf] = lt.current), + sf(tt.nodeType === 8 ? tt.parentNode : tt), + Sk(function () { + gl(et, lt, nt, rt) + }), + lt + ) + } + function sl$1(tt, et, nt, rt, it) { + var ot = nt._reactRootContainer + if (ot) { + var at = ot + if (typeof it == 'function') { + var st = it + it = function () { + var lt = hl$1(at) + st.call(lt) + } + } + gl(et, at, tt, it) + } else at = rl(nt, et, tt, it, rt) + return hl$1(at) + } + Ec = function (tt) { + switch (tt.tag) { + case 3: + var et = tt.stateNode + if (et.current.memoizedState.isDehydrated) { + var nt = tc(et.pendingLanes) + nt !== 0 && (Cc(et, nt | 1), Ek(et, B$2()), !(K$7 & 6) && ((Hj = B$2() + 500), jg())) + } + break + case 13: + Sk(function () { + var rt = Zg(tt, 1) + if (rt !== null) { + var it = L$3() + mh(rt, tt, 1, it) + } + }), + jl(tt, 1) + } + } + Fc = function (tt) { + if (tt.tag === 13) { + var et = Zg(tt, 134217728) + if (et !== null) { + var nt = L$3() + mh(et, tt, 134217728, nt) + } + jl(tt, 134217728) + } + } + Gc = function (tt) { + if (tt.tag === 13) { + var et = lh(tt), + nt = Zg(tt, et) + if (nt !== null) { + var rt = L$3() + mh(nt, tt, et, rt) + } + jl(tt, et) + } + } + Hc = function () { + return C$2 + } + Ic = function (tt, et) { + var nt = C$2 + try { + return (C$2 = tt), et() + } finally { + C$2 = nt + } + } + yb = function (tt, et, nt) { + switch (et) { + case 'input': + if ((bb(tt, nt), (et = nt.name), nt.type === 'radio' && et != null)) { + for (nt = tt; nt.parentNode; ) nt = nt.parentNode + for ( + nt = nt.querySelectorAll('input[name=' + JSON.stringify('' + et) + '][type="radio"]'), et = 0; + et < nt.length; + et++ + ) { + var rt = nt[et] + if (rt !== tt && rt.form === tt.form) { + var it = Db(rt) + if (!it) throw Error(p$a(90)) + Wa(rt), bb(rt, it) + } + } + } + break + case 'textarea': + ib(tt, nt) + break + case 'select': + ;(et = nt.value), et != null && fb(tt, !!nt.multiple, et, !1) + } + } + Gb = Rk + Hb = Sk + var tl = { usingClientEntryPoint: !1, Events: [Cb, ue, Db, Eb, Fb, Rk] }, + ul = { findFiberByHostInstance: Wc, bundleType: 0, version: '18.2.0', rendererPackageName: 'react-dom' }, + vl = { + bundleType: ul.bundleType, + version: ul.version, + rendererPackageName: ul.rendererPackageName, + rendererConfig: ul.rendererConfig, + overrideHookState: null, + overrideHookStateDeletePath: null, + overrideHookStateRenamePath: null, + overrideProps: null, + overridePropsDeletePath: null, + overridePropsRenamePath: null, + setErrorHandler: null, + setSuspenseHandler: null, + scheduleUpdate: null, + currentDispatcherRef: ua.ReactCurrentDispatcher, + findHostInstanceByFiber: function (tt) { + return (tt = Zb(tt)), tt === null ? null : tt.stateNode + }, + findFiberByHostInstance: ul.findFiberByHostInstance || kl, + findHostInstancesForRefresh: null, + scheduleRefresh: null, + scheduleRoot: null, + setRefreshHandler: null, + getCurrentFiber: null, + reconcilerVersion: '18.2.0-next-9e3b772b8-20220608', + } + if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < 'u') { + var wl = __REACT_DEVTOOLS_GLOBAL_HOOK__ + if (!wl.isDisabled && wl.supportsFiber) + try { + ;(kc = wl.inject(vl)), (lc = wl) + } catch {} + } + reactDom_production_min.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = tl + reactDom_production_min.createPortal = function (tt, et) { + var nt = 2 < arguments.length && arguments[2] !== void 0 ? arguments[2] : null + if (!ol(et)) throw Error(p$a(200)) + return dl(tt, et, null, nt) + } + reactDom_production_min.createRoot = function (tt, et) { + if (!ol(tt)) throw Error(p$a(299)) + var nt = !1, + rt = '', + it = ll + return ( + et != null && + (et.unstable_strictMode === !0 && (nt = !0), + et.identifierPrefix !== void 0 && (rt = et.identifierPrefix), + et.onRecoverableError !== void 0 && (it = et.onRecoverableError)), + (et = cl(tt, 1, !1, null, null, nt, !1, rt, it)), + (tt[uf] = et.current), + sf(tt.nodeType === 8 ? tt.parentNode : tt), + new ml(et) + ) + } + reactDom_production_min.findDOMNode = function (tt) { + if (tt == null) return null + if (tt.nodeType === 1) return tt + var et = tt._reactInternals + if (et === void 0) + throw typeof tt.render == 'function' ? Error(p$a(188)) : ((tt = Object.keys(tt).join(',')), Error(p$a(268, tt))) + return (tt = Zb(et)), (tt = tt === null ? null : tt.stateNode), tt + } + reactDom_production_min.flushSync = function (tt) { + return Sk(tt) + } + reactDom_production_min.hydrate = function (tt, et, nt) { + if (!pl(et)) throw Error(p$a(200)) + return sl$1(null, tt, et, !0, nt) + } + reactDom_production_min.hydrateRoot = function (tt, et, nt) { + if (!ol(tt)) throw Error(p$a(405)) + var rt = (nt != null && nt.hydratedSources) || null, + it = !1, + ot = '', + at = ll + if ( + (nt != null && + (nt.unstable_strictMode === !0 && (it = !0), + nt.identifierPrefix !== void 0 && (ot = nt.identifierPrefix), + nt.onRecoverableError !== void 0 && (at = nt.onRecoverableError)), + (et = fl(et, null, tt, 1, nt ?? null, it, !1, ot, at)), + (tt[uf] = et.current), + sf(tt), + rt) + ) + for (tt = 0; tt < rt.length; tt++) + (nt = rt[tt]), + (it = nt._getVersion), + (it = it(nt._source)), + et.mutableSourceEagerHydrationData == null + ? (et.mutableSourceEagerHydrationData = [nt, it]) + : et.mutableSourceEagerHydrationData.push(nt, it) + return new nl(et) + } + reactDom_production_min.render = function (tt, et, nt) { + if (!pl(et)) throw Error(p$a(200)) + return sl$1(null, tt, et, !1, nt) + } + reactDom_production_min.unmountComponentAtNode = function (tt) { + if (!pl(tt)) throw Error(p$a(40)) + return tt._reactRootContainer + ? (Sk(function () { + sl$1(null, null, tt, !1, function () { + ;(tt._reactRootContainer = null), (tt[uf] = null) + }) + }), + !0) + : !1 + } + reactDom_production_min.unstable_batchedUpdates = Rk + reactDom_production_min.unstable_renderSubtreeIntoContainer = function (tt, et, nt, rt) { + if (!pl(nt)) throw Error(p$a(200)) + if (tt == null || tt._reactInternals === void 0) throw Error(p$a(38)) + return sl$1(tt, et, nt, !1, rt) + } + reactDom_production_min.version = '18.2.0-next-9e3b772b8-20220608' + function checkDCE() { + if (!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ > 'u' || typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE != 'function')) + try { + __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(checkDCE) + } catch (tt) { + console.error(tt) + } + } + checkDCE(), (reactDom.exports = reactDom_production_min) + var reactDomExports = reactDom.exports + const ReactDOM = getDefaultExportFromCjs(reactDomExports) + var createRoot$1, + m$a = reactDomExports + ;(createRoot$1 = client$1.createRoot = m$a.createRoot), (client$1.hydrateRoot = m$a.hydrateRoot) + function _extends$u() { + return ( + (_extends$u = Object.assign + ? Object.assign.bind() + : function (tt) { + for (var et = 1; et < arguments.length; et++) { + var nt = arguments[et] + for (var rt in nt) Object.prototype.hasOwnProperty.call(nt, rt) && (tt[rt] = nt[rt]) + } + return tt + }), + _extends$u.apply(this, arguments) + ) + } + function $6ed0406888f73fc4$var$setRef(tt, et) { + typeof tt == 'function' ? tt(et) : tt != null && (tt.current = et) + } + function $6ed0406888f73fc4$export$43e446d32b3d21af(...tt) { + return (et) => tt.forEach((nt) => $6ed0406888f73fc4$var$setRef(nt, et)) + } + function $6ed0406888f73fc4$export$c7b2cbe3552a0d05(...tt) { + return reactExports.useCallback($6ed0406888f73fc4$export$43e446d32b3d21af(...tt), tt) + } + const $5e63c961fc1ce211$export$8c6ed5c666ac1360 = reactExports.forwardRef((tt, et) => { + const { children: nt, ...rt } = tt, + it = reactExports.Children.toArray(nt), + ot = it.find($5e63c961fc1ce211$var$isSlottable) + if (ot) { + const at = ot.props.children, + st = it.map((lt) => + lt === ot + ? reactExports.Children.count(at) > 1 + ? reactExports.Children.only(null) + : reactExports.isValidElement(at) + ? at.props.children + : null + : lt, + ) + return reactExports.createElement( + $5e63c961fc1ce211$var$SlotClone, + _extends$u({}, rt, { ref: et }), + reactExports.isValidElement(at) ? reactExports.cloneElement(at, void 0, st) : null, + ) + } + return reactExports.createElement($5e63c961fc1ce211$var$SlotClone, _extends$u({}, rt, { ref: et }), nt) + }) + $5e63c961fc1ce211$export$8c6ed5c666ac1360.displayName = 'Slot' + const $5e63c961fc1ce211$var$SlotClone = reactExports.forwardRef((tt, et) => { + const { children: nt, ...rt } = tt + return reactExports.isValidElement(nt) + ? reactExports.cloneElement(nt, { + ...$5e63c961fc1ce211$var$mergeProps(rt, nt.props), + ref: et ? $6ed0406888f73fc4$export$43e446d32b3d21af(et, nt.ref) : nt.ref, + }) + : reactExports.Children.count(nt) > 1 + ? reactExports.Children.only(null) + : null + }) + $5e63c961fc1ce211$var$SlotClone.displayName = 'SlotClone' + const $5e63c961fc1ce211$export$d9f1ccf0bdb05d45 = ({ children: tt }) => + reactExports.createElement(reactExports.Fragment, null, tt) + function $5e63c961fc1ce211$var$isSlottable(tt) { + return reactExports.isValidElement(tt) && tt.type === $5e63c961fc1ce211$export$d9f1ccf0bdb05d45 + } + function $5e63c961fc1ce211$var$mergeProps(tt, et) { + const nt = { ...et } + for (const rt in et) { + const it = tt[rt], + ot = et[rt] + ;/^on[A-Z]/.test(rt) + ? it && ot + ? (nt[rt] = (...st) => { + ot(...st), it(...st) + }) + : it && (nt[rt] = it) + : rt === 'style' + ? (nt[rt] = { ...it, ...ot }) + : rt === 'className' && (nt[rt] = [it, ot].filter(Boolean).join(' ')) + } + return { ...tt, ...nt } + } + const $8927f6f2acc4f386$var$NODES = [ + 'a', + 'button', + 'div', + 'form', + 'h2', + 'h3', + 'img', + 'input', + 'label', + 'li', + 'nav', + 'ol', + 'p', + 'span', + 'svg', + 'ul', + ], + $8927f6f2acc4f386$export$250ffa63cdc0d034 = $8927f6f2acc4f386$var$NODES.reduce((tt, et) => { + const nt = reactExports.forwardRef((rt, it) => { + const { asChild: ot, ...at } = rt, + st = ot ? $5e63c961fc1ce211$export$8c6ed5c666ac1360 : et + return ( + reactExports.useEffect(() => { + window[Symbol.for('radix-ui')] = !0 + }, []), + reactExports.createElement(st, _extends$u({}, at, { ref: it })) + ) + }) + return (nt.displayName = `Primitive.${et}`), { ...tt, [et]: nt } + }, {}) + function $8927f6f2acc4f386$export$6d1a0317bde7de7f(tt, et) { + tt && reactDomExports.flushSync(() => tt.dispatchEvent(et)) + } + const $f1701beae083dbae$export$602eac185826482c = reactExports.forwardRef((tt, et) => { + var nt + const { + container: rt = globalThis == null || (nt = globalThis.document) === null || nt === void 0 ? void 0 : nt.body, + ...it + } = tt + return rt + ? ReactDOM.createPortal( + reactExports.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div, _extends$u({}, it, { ref: et })), + rt, + ) + : null + }), + $f1701beae083dbae$export$be92b6f5f03c0fe9 = $f1701beae083dbae$export$602eac185826482c + var has = Object.prototype.hasOwnProperty + function dequal(tt, et) { + var nt, rt + if (tt === et) return !0 + if (tt && et && (nt = tt.constructor) === et.constructor) { + if (nt === Date) return tt.getTime() === et.getTime() + if (nt === RegExp) return tt.toString() === et.toString() + if (nt === Array) { + if ((rt = tt.length) === et.length) for (; rt-- && dequal(tt[rt], et[rt]); ); + return rt === -1 + } + if (!nt || typeof tt == 'object') { + rt = 0 + for (nt in tt) + if ((has.call(tt, nt) && ++rt && !has.call(et, nt)) || !(nt in et) || !dequal(tt[nt], et[nt])) return !1 + return Object.keys(et).length === rt + } + } + return tt !== tt && et !== et + } + function shallow$2(tt, et) { + if (Object.is(tt, et)) return !0 + if (typeof tt != 'object' || tt === null || typeof et != 'object' || et === null) return !1 + const nt = Object.keys(tt) + if (nt.length !== Object.keys(et).length) return !1 + for (let rt = 0; rt < nt.length; rt++) + if (!Object.prototype.hasOwnProperty.call(et, nt[rt]) || !Object.is(tt[nt[rt]], et[nt[rt]])) return !1 + return !0 + } + var Rule = function (et, nt, rt, it) { + ;(this.name = et), (this.fn = nt), (this.args = rt), (this.modifiers = it) + } + Rule.prototype._test = function (et) { + var nt = this.fn + try { + testAux(this.modifiers.slice(), nt, this)(et) + } catch { + nt = function () { + return !1 + } + } + try { + return testAux(this.modifiers.slice(), nt, this)(et) + } catch { + return !1 + } + } + Rule.prototype._check = function (et) { + try { + testAux(this.modifiers.slice(), this.fn, this)(et) + } catch { + if ( + testAux( + this.modifiers.slice(), + function (rt) { + return rt + }, + this, + )(!1) + ) + return + } + if (!testAux(this.modifiers.slice(), this.fn, this)(et)) throw null + } + Rule.prototype._testAsync = function (et) { + var nt = this + return new Promise(function (rt, it) { + testAsyncAux( + nt.modifiers.slice(), + nt.fn, + nt, + )(et) + .then(function (ot) { + ot ? rt(et) : it(null) + }) + .catch(function (ot) { + return it(ot) + }) + }) + } + function pickFn(tt, et) { + return et === void 0 && (et = 'simple'), typeof tt == 'object' ? tt[et] : tt + } + function testAux(tt, et, nt) { + if (tt.length) { + var rt = tt.shift(), + it = testAux(tt, et, nt) + return rt.perform(it, nt) + } else return pickFn(et) + } + function testAsyncAux(tt, et, nt) { + if (tt.length) { + var rt = tt.shift(), + it = testAsyncAux(tt, et, nt) + return rt.performAsync(it, nt) + } else + return function (ot) { + return Promise.resolve(pickFn(et, 'async')(ot)) + } + } + var Modifier = function (et, nt, rt) { + ;(this.name = et), (this.perform = nt), (this.performAsync = rt) + }, + ValidationError = (function (tt) { + function et(nt, rt, it, ot) { + for (var at = [], st = arguments.length - 4; st-- > 0; ) at[st] = arguments[st + 4] + tt.call(this, at), + tt.captureStackTrace && tt.captureStackTrace(this, et), + (this.rule = nt), + (this.value = rt), + (this.cause = it), + (this.target = ot) + } + return ( + tt && (et.__proto__ = tt), + (et.prototype = Object.create(tt && tt.prototype)), + (et.prototype.constructor = et), + et + ) + })(Error), + Context$2 = function (et, nt) { + et === void 0 && (et = []), nt === void 0 && (nt = []), (this.chain = et), (this.nextRuleModifiers = nt) + } + Context$2.prototype._applyRule = function (et, nt) { + var rt = this + return function () { + for (var it = [], ot = arguments.length; ot--; ) it[ot] = arguments[ot] + return rt.chain.push(new Rule(nt, et.apply(rt, it), it, rt.nextRuleModifiers)), (rt.nextRuleModifiers = []), rt + } + } + Context$2.prototype._applyModifier = function (et, nt) { + return this.nextRuleModifiers.push(new Modifier(nt, et.simple, et.async)), this + } + Context$2.prototype._clone = function () { + return new Context$2(this.chain.slice(), this.nextRuleModifiers.slice()) + } + Context$2.prototype.test = function (et) { + return this.chain.every(function (nt) { + return nt._test(et) + }) + } + Context$2.prototype.testAll = function (et) { + var nt = [] + return ( + this.chain.forEach(function (rt) { + try { + rt._check(et) + } catch (it) { + nt.push(new ValidationError(rt, et, it)) + } + }), + nt + ) + } + Context$2.prototype.check = function (et) { + this.chain.forEach(function (nt) { + try { + nt._check(et) + } catch (rt) { + throw new ValidationError(nt, et, rt) + } + }) + } + Context$2.prototype.testAsync = function (et) { + var nt = this + return new Promise(function (rt, it) { + executeAsyncRules(et, nt.chain.slice(), rt, it) + }) + } + function executeAsyncRules(tt, et, nt, rt) { + if (et.length) { + var it = et.shift() + it._testAsync(tt).then( + function () { + executeAsyncRules(tt, et, nt, rt) + }, + function (ot) { + rt(new ValidationError(it, tt, ot)) + }, + ) + } else nt(tt) + } + var consideredEmpty = function (tt, et) { + return et && typeof tt == 'string' && tt.trim().length === 0 ? !0 : tt == null + } + function optional(tt, et) { + return ( + et === void 0 && (et = !1), + { + simple: function (nt) { + return consideredEmpty(nt, et) || tt.check(nt) === void 0 + }, + async: function (nt) { + return consideredEmpty(nt, et) || tt.testAsync(nt) + }, + } + ) + } + function v8n() { + return typeof Proxy < 'u' ? proxyContext(new Context$2()) : proxylessContext(new Context$2()) + } + var customRules = {} + v8n.extend = function (tt) { + Object.assign(customRules, tt) + } + v8n.clearCustomRules = function () { + customRules = {} + } + function proxyContext(tt) { + return new Proxy(tt, { + get: function (nt, rt) { + if (rt in nt) return nt[rt] + var it = proxyContext(tt._clone()) + if (rt in availableModifiers) return it._applyModifier(availableModifiers[rt], rt) + if (rt in customRules) return it._applyRule(customRules[rt], rt) + if (rt in availableRules) return it._applyRule(availableRules[rt], rt) + }, + }) + } + function proxylessContext(tt) { + var et = function (it, ot) { + return ( + Object.keys(it).forEach(function (at) { + ot[at] = function () { + for (var st = [], lt = arguments.length; lt--; ) st[lt] = arguments[lt] + var ct = proxylessContext(ot._clone()), + ut = ct._applyRule(it[at], at).apply(void 0, st) + return ut + } + }), + ot + ) + }, + nt = et(availableRules, tt), + rt = et(customRules, nt) + return ( + Object.keys(availableModifiers).forEach(function (it) { + Object.defineProperty(rt, it, { + get: function () { + var ot = proxylessContext(rt._clone()) + return ot._applyModifier(availableModifiers[it], it) + }, + }) + }), + rt + ) + } + var availableModifiers = { + not: { + simple: function (tt) { + return function (et) { + return !tt(et) + } + }, + async: function (tt) { + return function (et) { + return Promise.resolve(tt(et)) + .then(function (nt) { + return !nt + }) + .catch(function () { + return !0 + }) + } + }, + }, + some: { + simple: function (tt) { + return function (et) { + return split$1(et).some(function (nt) { + try { + return tt(nt) + } catch { + return !1 + } + }) + } + }, + async: function (tt) { + return function (et) { + return Promise.all( + split$1(et).map(function (nt) { + try { + return tt(nt).catch(function () { + return !1 + }) + } catch { + return !1 + } + }), + ).then(function (nt) { + return nt.some(Boolean) + }) + } + }, + }, + every: { + simple: function (tt) { + return function (et) { + return et !== !1 && split$1(et).every(tt) + } + }, + async: function (tt) { + return function (et) { + return Promise.all(split$1(et).map(tt)).then(function (nt) { + return nt.every(Boolean) + }) + } + }, + }, + strict: { + simple: function (tt, et) { + return function (nt) { + return isSchemaRule(et) && nt && typeof nt == 'object' + ? Object.keys(et.args[0]).length === Object.keys(nt).length && tt(nt) + : tt(nt) + } + }, + async: function (tt, et) { + return function (nt) { + return Promise.resolve(tt(nt)) + .then(function (rt) { + return isSchemaRule(et) && nt && typeof nt == 'object' + ? Object.keys(et.args[0]).length === Object.keys(nt).length && rt + : rt + }) + .catch(function () { + return !1 + }) + } + }, + }, + } + function isSchemaRule(tt) { + return tt && tt.name === 'schema' && tt.args.length > 0 && typeof tt.args[0] == 'object' + } + function split$1(tt) { + return typeof tt == 'string' ? tt.split('') : tt + } + var availableRules = { + equal: function (tt) { + return function (et) { + return et == tt + } + }, + exact: function (tt) { + return function (et) { + return et === tt + } + }, + number: function (tt) { + return ( + tt === void 0 && (tt = !0), + function (et) { + return typeof et == 'number' && (tt || isFinite(et)) + } + ) + }, + integer: function () { + return function (tt) { + var et = Number.isInteger || isIntegerPolyfill + return et(tt) + } + }, + numeric: function () { + return function (tt) { + return !isNaN(parseFloat(tt)) && isFinite(tt) + } + }, + string: function () { + return testType('string') + }, + boolean: function () { + return testType('boolean') + }, + undefined: function () { + return testType('undefined') + }, + null: function () { + return testType('null') + }, + array: function () { + return testType('array') + }, + object: function () { + return testType('object') + }, + instanceOf: function (tt) { + return function (et) { + return et instanceof tt + } + }, + pattern: function (tt) { + return function (et) { + return tt.test(et) + } + }, + lowercase: function () { + return function (tt) { + return typeof tt == 'boolean' || (tt === tt.toLowerCase() && tt.trim() !== '') + } + }, + uppercase: function () { + return function (tt) { + return tt === tt.toUpperCase() && tt.trim() !== '' + } + }, + vowel: function () { + return function (tt) { + return /^[aeiou]+$/i.test(tt) + } + }, + consonant: function () { + return function (tt) { + return /^(?=[^aeiou])([a-z]+)$/i.test(tt) + } + }, + first: function (tt) { + return function (et) { + return et[0] == tt + } + }, + last: function (tt) { + return function (et) { + return et[et.length - 1] == tt + } + }, + empty: function () { + return function (tt) { + return tt.length === 0 + } + }, + length: function (tt, et) { + return function (nt) { + return nt.length >= tt && nt.length <= (et || tt) + } + }, + minLength: function (tt) { + return function (et) { + return et.length >= tt + } + }, + maxLength: function (tt) { + return function (et) { + return et.length <= tt + } + }, + negative: function () { + return function (tt) { + return tt < 0 + } + }, + positive: function () { + return function (tt) { + return tt >= 0 + } + }, + between: function (tt, et) { + return function (nt) { + return nt >= tt && nt <= et + } + }, + range: function (tt, et) { + return function (nt) { + return nt >= tt && nt <= et + } + }, + lessThan: function (tt) { + return function (et) { + return et < tt + } + }, + lessThanOrEqual: function (tt) { + return function (et) { + return et <= tt + } + }, + greaterThan: function (tt) { + return function (et) { + return et > tt + } + }, + greaterThanOrEqual: function (tt) { + return function (et) { + return et >= tt + } + }, + even: function () { + return function (tt) { + return tt % 2 === 0 + } + }, + odd: function () { + return function (tt) { + return tt % 2 !== 0 + } + }, + includes: function (tt) { + return function (et) { + return ~et.indexOf(tt) + } + }, + schema: function (tt) { + return testSchema(tt) + }, + passesAnyOf: function () { + for (var tt = [], et = arguments.length; et--; ) tt[et] = arguments[et] + return function (nt) { + return tt.some(function (rt) { + return rt.test(nt) + }) + } + }, + optional, + } + function testType(tt) { + return function (et) { + return (Array.isArray(et) && tt === 'array') || (et === null && tt === 'null') || typeof et === tt + } + } + function isIntegerPolyfill(tt) { + return typeof tt == 'number' && isFinite(tt) && Math.floor(tt) === tt + } + function testSchema(tt) { + return { + simple: function (et) { + var nt = [] + if ( + (Object.keys(tt).forEach(function (rt) { + var it = tt[rt] + try { + it.check((et || {})[rt]) + } catch (ot) { + ;(ot.target = rt), nt.push(ot) + } + }), + nt.length > 0) + ) + throw nt + return !0 + }, + async: function (et) { + var nt = [], + rt = Object.keys(tt).map(function (it) { + var ot = tt[it] + return ot.testAsync((et || {})[it]).catch(function (at) { + ;(at.target = it), nt.push(at) + }) + }) + return Promise.all(rt).then(function () { + if (nt.length > 0) throw nt + return !0 + }) + }, + } + } + var e$6 = 'colors', + t$7 = 'sizes', + r$c = 'space', + n$7 = { + gap: r$c, + gridGap: r$c, + columnGap: r$c, + gridColumnGap: r$c, + rowGap: r$c, + gridRowGap: r$c, + inset: r$c, + insetBlock: r$c, + insetBlockEnd: r$c, + insetBlockStart: r$c, + insetInline: r$c, + insetInlineEnd: r$c, + insetInlineStart: r$c, + margin: r$c, + marginTop: r$c, + marginRight: r$c, + marginBottom: r$c, + marginLeft: r$c, + marginBlock: r$c, + marginBlockEnd: r$c, + marginBlockStart: r$c, + marginInline: r$c, + marginInlineEnd: r$c, + marginInlineStart: r$c, + padding: r$c, + paddingTop: r$c, + paddingRight: r$c, + paddingBottom: r$c, + paddingLeft: r$c, + paddingBlock: r$c, + paddingBlockEnd: r$c, + paddingBlockStart: r$c, + paddingInline: r$c, + paddingInlineEnd: r$c, + paddingInlineStart: r$c, + top: r$c, + right: r$c, + bottom: r$c, + left: r$c, + scrollMargin: r$c, + scrollMarginTop: r$c, + scrollMarginRight: r$c, + scrollMarginBottom: r$c, + scrollMarginLeft: r$c, + scrollMarginX: r$c, + scrollMarginY: r$c, + scrollMarginBlock: r$c, + scrollMarginBlockEnd: r$c, + scrollMarginBlockStart: r$c, + scrollMarginInline: r$c, + scrollMarginInlineEnd: r$c, + scrollMarginInlineStart: r$c, + scrollPadding: r$c, + scrollPaddingTop: r$c, + scrollPaddingRight: r$c, + scrollPaddingBottom: r$c, + scrollPaddingLeft: r$c, + scrollPaddingX: r$c, + scrollPaddingY: r$c, + scrollPaddingBlock: r$c, + scrollPaddingBlockEnd: r$c, + scrollPaddingBlockStart: r$c, + scrollPaddingInline: r$c, + scrollPaddingInlineEnd: r$c, + scrollPaddingInlineStart: r$c, + fontSize: 'fontSizes', + background: e$6, + backgroundColor: e$6, + backgroundImage: e$6, + borderImage: e$6, + border: e$6, + borderBlock: e$6, + borderBlockEnd: e$6, + borderBlockStart: e$6, + borderBottom: e$6, + borderBottomColor: e$6, + borderColor: e$6, + borderInline: e$6, + borderInlineEnd: e$6, + borderInlineStart: e$6, + borderLeft: e$6, + borderLeftColor: e$6, + borderRight: e$6, + borderRightColor: e$6, + borderTop: e$6, + borderTopColor: e$6, + caretColor: e$6, + color: e$6, + columnRuleColor: e$6, + fill: e$6, + outline: e$6, + outlineColor: e$6, + stroke: e$6, + textDecorationColor: e$6, + fontFamily: 'fonts', + fontWeight: 'fontWeights', + lineHeight: 'lineHeights', + letterSpacing: 'letterSpacings', + blockSize: t$7, + minBlockSize: t$7, + maxBlockSize: t$7, + inlineSize: t$7, + minInlineSize: t$7, + maxInlineSize: t$7, + width: t$7, + minWidth: t$7, + maxWidth: t$7, + height: t$7, + minHeight: t$7, + maxHeight: t$7, + flexBasis: t$7, + gridTemplateColumns: t$7, + gridTemplateRows: t$7, + borderWidth: 'borderWidths', + borderTopWidth: 'borderWidths', + borderRightWidth: 'borderWidths', + borderBottomWidth: 'borderWidths', + borderLeftWidth: 'borderWidths', + borderStyle: 'borderStyles', + borderTopStyle: 'borderStyles', + borderRightStyle: 'borderStyles', + borderBottomStyle: 'borderStyles', + borderLeftStyle: 'borderStyles', + borderRadius: 'radii', + borderTopLeftRadius: 'radii', + borderTopRightRadius: 'radii', + borderBottomRightRadius: 'radii', + borderBottomLeftRadius: 'radii', + boxShadow: 'shadows', + textShadow: 'shadows', + transition: 'transitions', + zIndex: 'zIndices', + }, + i$7 = (tt, et) => (typeof et == 'function' ? { '()': Function.prototype.toString.call(et) } : et), + o$2 = () => { + const tt = Object.create(null) + return (et, nt, ...rt) => { + const it = ((ot) => JSON.stringify(ot, i$7))(et) + return it in tt ? tt[it] : (tt[it] = nt(et, ...rt)) + } + }, + l$6 = Symbol.for('sxs.internal'), + s$5 = (tt, et) => Object.defineProperties(tt, Object.getOwnPropertyDescriptors(et)), + a$4 = (tt) => { + for (const et in tt) return !0 + return !1 + }, + { hasOwnProperty: c$9 } = Object.prototype, + d$6 = (tt) => (tt.includes('-') ? tt : tt.replace(/[A-Z]/g, (et) => '-' + et.toLowerCase())), + g$9 = /\s+(?![^()]*\))/, + p$9 = (tt) => (et) => tt(...(typeof et == 'string' ? String(et).split(g$9) : [et])), + u$6 = { + appearance: (tt) => ({ WebkitAppearance: tt, appearance: tt }), + backfaceVisibility: (tt) => ({ WebkitBackfaceVisibility: tt, backfaceVisibility: tt }), + backdropFilter: (tt) => ({ WebkitBackdropFilter: tt, backdropFilter: tt }), + backgroundClip: (tt) => ({ WebkitBackgroundClip: tt, backgroundClip: tt }), + boxDecorationBreak: (tt) => ({ WebkitBoxDecorationBreak: tt, boxDecorationBreak: tt }), + clipPath: (tt) => ({ WebkitClipPath: tt, clipPath: tt }), + content: (tt) => ({ + content: + tt.includes('"') || + tt.includes("'") || + /^([A-Za-z]+\([^]*|[^]*-quote|inherit|initial|none|normal|revert|unset)$/.test(tt) + ? tt + : `"${tt}"`, + }), + hyphens: (tt) => ({ WebkitHyphens: tt, hyphens: tt }), + maskImage: (tt) => ({ WebkitMaskImage: tt, maskImage: tt }), + maskSize: (tt) => ({ WebkitMaskSize: tt, maskSize: tt }), + tabSize: (tt) => ({ MozTabSize: tt, tabSize: tt }), + textSizeAdjust: (tt) => ({ WebkitTextSizeAdjust: tt, textSizeAdjust: tt }), + userSelect: (tt) => ({ WebkitUserSelect: tt, userSelect: tt }), + marginBlock: p$9((tt, et) => ({ marginBlockStart: tt, marginBlockEnd: et || tt })), + marginInline: p$9((tt, et) => ({ marginInlineStart: tt, marginInlineEnd: et || tt })), + maxSize: p$9((tt, et) => ({ maxBlockSize: tt, maxInlineSize: et || tt })), + minSize: p$9((tt, et) => ({ minBlockSize: tt, minInlineSize: et || tt })), + paddingBlock: p$9((tt, et) => ({ paddingBlockStart: tt, paddingBlockEnd: et || tt })), + paddingInline: p$9((tt, et) => ({ paddingInlineStart: tt, paddingInlineEnd: et || tt })), + }, + h$a = /([\d.]+)([^]*)/, + f$8 = (tt, et) => + tt.length + ? tt.reduce( + (nt, rt) => ( + nt.push( + ...et.map((it) => + it.includes('&') + ? it.replace(/&/g, /[ +>|~]/.test(rt) && /&.*&/.test(it) ? `:is(${rt})` : rt) + : rt + ' ' + it, + ), + ), + nt + ), + [], + ) + : et, + m$9 = (tt, et) => + tt in b$7 && typeof et == 'string' + ? et.replace( + /^((?:[^]*[^\w-])?)(fit-content|stretch)((?:[^\w-][^]*)?)$/, + (nt, rt, it, ot) => + rt + + (it === 'stretch' + ? `-moz-available${ot};${d$6(tt)}:${rt}-webkit-fill-available` + : `-moz-fit-content${ot};${d$6(tt)}:${rt}fit-content`) + + ot, + ) + : String(et), + b$7 = { + blockSize: 1, + height: 1, + inlineSize: 1, + maxBlockSize: 1, + maxHeight: 1, + maxInlineSize: 1, + maxWidth: 1, + minBlockSize: 1, + minHeight: 1, + minInlineSize: 1, + minWidth: 1, + width: 1, + }, + S$3 = (tt) => (tt ? tt + '-' : ''), + k$9 = (tt, et, nt) => + tt.replace(/([+-])?((?:\d+(?:\.\d*)?|\.\d+)(?:[Ee][+-]?\d+)?)?(\$|--)([$\w-]+)/g, (rt, it, ot, at, st) => + (at == '$') == !!ot + ? rt + : (it || at == '--' ? 'calc(' : '') + + 'var(--' + + (at === '$' ? S$3(et) + (st.includes('$') ? '' : S$3(nt)) + st.replace(/\$/g, '-') : st) + + ')' + + (it || at == '--' ? '*' + (it || '') + (ot || '1') + ')' : ''), + ), + y$8 = /\s*,\s*(?![^()]*\))/, + B$1 = Object.prototype.toString, + $$3 = (tt, et, nt, rt, it) => { + let ot, at, st + const lt = (ct, ut, ht) => { + let dt, pt + const mt = (gt) => { + for (dt in gt) { + const vt = dt.charCodeAt(0) === 64, + xt = vt && Array.isArray(gt[dt]) ? gt[dt] : [gt[dt]] + for (pt of xt) { + const kt = /[A-Z]/.test((bt = dt)) ? bt : bt.replace(/-[^]/g, (Tt) => Tt[1].toUpperCase()), + St = typeof pt == 'object' && pt && pt.toString === B$1 && (!rt.utils[kt] || !ut.length) + if (kt in rt.utils && !St) { + const Tt = rt.utils[kt] + if (Tt !== at) { + ;(at = Tt), mt(Tt(pt)), (at = null) + continue + } + } else if (kt in u$6) { + const Tt = u$6[kt] + if (Tt !== st) { + ;(st = Tt), mt(Tt(pt)), (st = null) + continue + } + } + if ( + (vt && + ((yt = dt.slice(1) in rt.media ? '@media ' + rt.media[dt.slice(1)] : dt), + (dt = yt.replace( + /\(\s*([\w-]+)\s*(=|<|<=|>|>=)\s*([\w-]+)\s*(?:(<|<=|>|>=)\s*([\w-]+)\s*)?\)/g, + (Tt, At, Et, $t, Dt, jt) => { + const Pt = h$a.test(At), + Ct = 0.0625 * (Pt ? -1 : 1), + [wt, It] = Pt ? [$t, At] : [At, $t] + return ( + '(' + + (Et[0] === '=' ? '' : (Et[0] === '>') === Pt ? 'max-' : 'min-') + + wt + + ':' + + (Et[0] !== '=' && Et.length === 1 + ? It.replace(h$a, (Ot, Wt, zt) => Number(Wt) + Ct * (Et === '>' ? 1 : -1) + zt) + : It) + + (Dt + ? ') and (' + + (Dt[0] === '>' ? 'min-' : 'max-') + + wt + + ':' + + (Dt.length === 1 + ? jt.replace(h$a, (Ot, Wt, zt) => Number(Wt) + Ct * (Dt === '>' ? -1 : 1) + zt) + : jt) + : '') + + ')' + ) + }, + ))), + St) + ) { + const Tt = vt ? ht.concat(dt) : [...ht], + At = vt ? [...ut] : f$8(ut, dt.split(y$8)) + ot !== void 0 && it(x$8(...ot)), (ot = void 0), lt(pt, At, Tt) + } else + ot === void 0 && (ot = [[], ut, ht]), + (dt = vt || dt.charCodeAt(0) !== 36 ? dt : `--${S$3(rt.prefix)}${dt.slice(1).replace(/\$/g, '-')}`), + (pt = St + ? pt + : typeof pt == 'number' + ? pt && kt in I$3 + ? String(pt) + 'px' + : String(pt) + : k$9(m$9(kt, pt ?? ''), rt.prefix, rt.themeMap[kt])), + ot[0].push(`${vt ? `${dt} ` : `${d$6(dt)}:`}${pt}`) + } + } + var yt, bt + } + mt(ct), ot !== void 0 && it(x$8(...ot)), (ot = void 0) + } + lt(tt, et, nt) + }, + x$8 = (tt, et, nt) => + `${nt.map((rt) => `${rt}{`).join('')}${et.length ? `${et.join(',')}{` : ''}${tt.join(';')}${ + et.length ? '}' : '' + }${Array(nt.length ? nt.length + 1 : 0).join('}')}`, + I$3 = { + animationDelay: 1, + animationDuration: 1, + backgroundSize: 1, + blockSize: 1, + border: 1, + borderBlock: 1, + borderBlockEnd: 1, + borderBlockEndWidth: 1, + borderBlockStart: 1, + borderBlockStartWidth: 1, + borderBlockWidth: 1, + borderBottom: 1, + borderBottomLeftRadius: 1, + borderBottomRightRadius: 1, + borderBottomWidth: 1, + borderEndEndRadius: 1, + borderEndStartRadius: 1, + borderInlineEnd: 1, + borderInlineEndWidth: 1, + borderInlineStart: 1, + borderInlineStartWidth: 1, + borderInlineWidth: 1, + borderLeft: 1, + borderLeftWidth: 1, + borderRadius: 1, + borderRight: 1, + borderRightWidth: 1, + borderSpacing: 1, + borderStartEndRadius: 1, + borderStartStartRadius: 1, + borderTop: 1, + borderTopLeftRadius: 1, + borderTopRightRadius: 1, + borderTopWidth: 1, + borderWidth: 1, + bottom: 1, + columnGap: 1, + columnRule: 1, + columnRuleWidth: 1, + columnWidth: 1, + containIntrinsicSize: 1, + flexBasis: 1, + fontSize: 1, + gap: 1, + gridAutoColumns: 1, + gridAutoRows: 1, + gridTemplateColumns: 1, + gridTemplateRows: 1, + height: 1, + inlineSize: 1, + inset: 1, + insetBlock: 1, + insetBlockEnd: 1, + insetBlockStart: 1, + insetInline: 1, + insetInlineEnd: 1, + insetInlineStart: 1, + left: 1, + letterSpacing: 1, + margin: 1, + marginBlock: 1, + marginBlockEnd: 1, + marginBlockStart: 1, + marginBottom: 1, + marginInline: 1, + marginInlineEnd: 1, + marginInlineStart: 1, + marginLeft: 1, + marginRight: 1, + marginTop: 1, + maxBlockSize: 1, + maxHeight: 1, + maxInlineSize: 1, + maxWidth: 1, + minBlockSize: 1, + minHeight: 1, + minInlineSize: 1, + minWidth: 1, + offsetDistance: 1, + offsetRotate: 1, + outline: 1, + outlineOffset: 1, + outlineWidth: 1, + overflowClipMargin: 1, + padding: 1, + paddingBlock: 1, + paddingBlockEnd: 1, + paddingBlockStart: 1, + paddingBottom: 1, + paddingInline: 1, + paddingInlineEnd: 1, + paddingInlineStart: 1, + paddingLeft: 1, + paddingRight: 1, + paddingTop: 1, + perspective: 1, + right: 1, + rowGap: 1, + scrollMargin: 1, + scrollMarginBlock: 1, + scrollMarginBlockEnd: 1, + scrollMarginBlockStart: 1, + scrollMarginBottom: 1, + scrollMarginInline: 1, + scrollMarginInlineEnd: 1, + scrollMarginInlineStart: 1, + scrollMarginLeft: 1, + scrollMarginRight: 1, + scrollMarginTop: 1, + scrollPadding: 1, + scrollPaddingBlock: 1, + scrollPaddingBlockEnd: 1, + scrollPaddingBlockStart: 1, + scrollPaddingBottom: 1, + scrollPaddingInline: 1, + scrollPaddingInlineEnd: 1, + scrollPaddingInlineStart: 1, + scrollPaddingLeft: 1, + scrollPaddingRight: 1, + scrollPaddingTop: 1, + shapeMargin: 1, + textDecoration: 1, + textDecorationThickness: 1, + textIndent: 1, + textUnderlineOffset: 1, + top: 1, + transitionDelay: 1, + transitionDuration: 1, + verticalAlign: 1, + width: 1, + wordSpacing: 1, + }, + R$1 = (tt) => String.fromCharCode(tt + (tt > 25 ? 39 : 97)), + z$6 = (tt) => + ((et) => { + let nt, + rt = '' + for (nt = Math.abs(et); nt > 52; nt = (nt / 52) | 0) rt = R$1(nt % 52) + rt + return R$1(nt % 52) + rt + })( + ((et, nt) => { + let rt = nt.length + for (; rt; ) et = (33 * et) ^ nt.charCodeAt(--rt) + return et + })(5381, JSON.stringify(tt)) >>> 0, + ), + W$7 = ['themed', 'global', 'styled', 'onevar', 'resonevar', 'allvar', 'inline'], + j$2 = (tt) => { + if (tt.href && !tt.href.startsWith(location.origin)) return !1 + try { + return !!tt.cssRules + } catch { + return !1 + } + }, + E$1 = (tt) => { + let et + const nt = () => { + const { cssRules: it } = et.sheet + return [].map + .call(it, (ot, at) => { + const { cssText: st } = ot + let lt = '' + if (st.startsWith('--sxs')) return '' + if (it[at - 1] && (lt = it[at - 1].cssText).startsWith('--sxs')) { + if (!ot.cssRules.length) return '' + for (const ct in et.rules) + if (et.rules[ct].group === ot) return `--sxs{--sxs:${[...et.rules[ct].cache].join(' ')}}${st}` + return ot.cssRules.length ? `${lt}${st}` : '' + } + return st + }) + .join('') + }, + rt = () => { + if (et) { + const { rules: st, sheet: lt } = et + if (!lt.deleteRule) { + for (; Object(Object(lt.cssRules)[0]).type === 3; ) lt.cssRules.splice(0, 1) + lt.cssRules = [] + } + for (const ct in st) delete st[ct] + } + const it = Object(tt).styleSheets || [] + for (const st of it) + if (j$2(st)) { + for (let lt = 0, ct = st.cssRules; ct[lt]; ++lt) { + const ut = Object(ct[lt]) + if (ut.type !== 1) continue + const ht = Object(ct[lt + 1]) + if (ht.type !== 4) continue + ++lt + const { cssText: dt } = ut + if (!dt.startsWith('--sxs')) continue + const pt = dt.slice(14, -3).trim().split(/\s+/), + mt = W$7[pt[0]] + mt && + (et || (et = { sheet: st, reset: rt, rules: {}, toString: nt }), + (et.rules[mt] = { group: ht, index: lt, cache: new Set(pt) })) + } + if (et) break + } + if (!et) { + const st = (lt, ct) => ({ + type: ct, + cssRules: [], + insertRule(ut, ht) { + this.cssRules.splice( + ht, + 0, + st(ut, { import: 3, undefined: 1 }[(ut.toLowerCase().match(/^@([a-z]+)/) || [])[1]] || 4), + ) + }, + get cssText() { + return lt === '@media{}' ? `@media{${[].map.call(this.cssRules, (ut) => ut.cssText).join('')}}` : lt + }, + }) + et = { + sheet: tt ? (tt.head || tt).appendChild(document.createElement('style')).sheet : st('', 'text/css'), + rules: {}, + reset: rt, + toString: nt, + } + } + const { sheet: ot, rules: at } = et + for (let st = W$7.length - 1; st >= 0; --st) { + const lt = W$7[st] + if (!at[lt]) { + const ct = W$7[st + 1], + ut = at[ct] ? at[ct].index : ot.cssRules.length + ot.insertRule('@media{}', ut), + ot.insertRule(`--sxs{--sxs:${st}}`, ut), + (at[lt] = { group: ot.cssRules[ut + 1], index: ut, cache: new Set([st]) }) + } + v$9(at[lt]) + } + } + return rt(), et + }, + v$9 = (tt) => { + const et = tt.group + let nt = et.cssRules.length + tt.apply = (rt) => { + try { + et.insertRule(rt, nt), ++nt + } catch {} + } + }, + T$2 = Symbol(), + w$6 = o$2(), + M$2 = (tt, et) => + w$6(tt, () => (...nt) => { + let rt = { type: null, composers: new Set() } + for (const it of nt) + if (it != null) + if (it[l$6]) { + rt.type == null && (rt.type = it[l$6].type) + for (const ot of it[l$6].composers) rt.composers.add(ot) + } else + it.constructor !== Object || it.$$typeof + ? rt.type == null && (rt.type = it) + : rt.composers.add(C$1(it, tt)) + return ( + rt.type == null && (rt.type = 'span'), + rt.composers.size || rt.composers.add(['PJLV', {}, [], [], {}, []]), + P$3(tt, rt, et) + ) + }), + C$1 = ({ variants: tt, compoundVariants: et, defaultVariants: nt, ...rt }, it) => { + const ot = `${S$3(it.prefix)}c-${z$6(rt)}`, + at = [], + st = [], + lt = Object.create(null), + ct = [] + for (const dt in nt) lt[dt] = String(nt[dt]) + if (typeof tt == 'object' && tt) + for (const dt in tt) { + ;(ut = lt), (ht = dt), c$9.call(ut, ht) || (lt[dt] = 'undefined') + const pt = tt[dt] + for (const mt in pt) { + const gt = { [dt]: String(mt) } + String(mt) === 'undefined' && ct.push(dt) + const yt = pt[mt], + bt = [gt, yt, !a$4(yt)] + at.push(bt) + } + } + var ut, ht + if (typeof et == 'object' && et) + for (const dt of et) { + let { css: pt, ...mt } = dt + pt = (typeof pt == 'object' && pt) || {} + for (const yt in mt) mt[yt] = String(mt[yt]) + const gt = [mt, pt, !a$4(pt)] + st.push(gt) + } + return [ot, rt, at, st, lt, ct] + }, + P$3 = (tt, et, nt) => { + const [rt, it, ot, at] = L$2(et.composers), + st = + typeof et.type == 'function' || et.type.$$typeof + ? ((ht) => { + function dt() { + for (let pt = 0; pt < dt[T$2].length; pt++) { + const [mt, gt] = dt[T$2][pt] + ht.rules[mt].apply(gt) + } + return (dt[T$2] = []), null + } + return ( + (dt[T$2] = []), + (dt.rules = {}), + W$7.forEach((pt) => (dt.rules[pt] = { apply: (mt) => dt[T$2].push([pt, mt]) })), + dt + ) + })(nt) + : null, + lt = (st || nt).rules, + ct = `.${rt}${it.length > 1 ? `:where(.${it.slice(1).join('.')})` : ''}`, + ut = (ht) => { + ht = (typeof ht == 'object' && ht) || A$2 + const { css: dt, ...pt } = ht, + mt = {} + for (const bt in ot) + if ((delete pt[bt], bt in ht)) { + let vt = ht[bt] + typeof vt == 'object' && vt + ? (mt[bt] = { '@initial': ot[bt], ...vt }) + : ((vt = String(vt)), (mt[bt] = vt !== 'undefined' || at.has(bt) ? vt : ot[bt])) + } else mt[bt] = ot[bt] + const gt = new Set([...it]) + for (const [bt, vt, xt, kt] of et.composers) { + nt.rules.styled.cache.has(bt) || + (nt.rules.styled.cache.add(bt), + $$3(vt, [`.${bt}`], [], tt, (At) => { + lt.styled.apply(At) + })) + const St = O(xt, mt, tt.media), + Tt = O(kt, mt, tt.media, !0) + for (const At of St) + if (At !== void 0) + for (const [Et, $t, Dt] of At) { + const jt = `${bt}-${z$6($t)}-${Et}` + gt.add(jt) + const Pt = (Dt ? nt.rules.resonevar : nt.rules.onevar).cache, + Ct = Dt ? lt.resonevar : lt.onevar + Pt.has(jt) || + (Pt.add(jt), + $$3($t, [`.${jt}`], [], tt, (wt) => { + Ct.apply(wt) + })) + } + for (const At of Tt) + if (At !== void 0) + for (const [Et, $t] of At) { + const Dt = `${bt}-${z$6($t)}-${Et}` + gt.add(Dt), + nt.rules.allvar.cache.has(Dt) || + (nt.rules.allvar.cache.add(Dt), + $$3($t, [`.${Dt}`], [], tt, (jt) => { + lt.allvar.apply(jt) + })) + } + } + if (typeof dt == 'object' && dt) { + const bt = `${rt}-i${z$6(dt)}-css` + gt.add(bt), + nt.rules.inline.cache.has(bt) || + (nt.rules.inline.cache.add(bt), + $$3(dt, [`.${bt}`], [], tt, (vt) => { + lt.inline.apply(vt) + })) + } + for (const bt of String(ht.className || '') + .trim() + .split(/\s+/)) + bt && gt.add(bt) + const yt = (pt.className = [...gt].join(' ')) + return { type: et.type, className: yt, selector: ct, props: pt, toString: () => yt, deferredInjector: st } + } + return s$5(ut, { + className: rt, + selector: ct, + [l$6]: et, + toString: () => (nt.rules.styled.cache.has(rt) || ut(), rt), + }) + }, + L$2 = (tt) => { + let et = '' + const nt = [], + rt = {}, + it = [] + for (const [ot, , , , at, st] of tt) { + et === '' && (et = ot), nt.push(ot), it.push(...st) + for (const lt in at) { + const ct = at[lt] + ;(rt[lt] === void 0 || ct !== 'undefined' || st.includes(ct)) && (rt[lt] = ct) + } + } + return [et, nt, rt, new Set(it)] + }, + O = (tt, et, nt, rt) => { + const it = [] + e: for (let [ot, at, st] of tt) { + if (st) continue + let lt, + ct = 0, + ut = !1 + for (lt in ot) { + const ht = ot[lt] + let dt = et[lt] + if (dt !== ht) { + if (typeof dt != 'object' || !dt) continue e + { + let pt, + mt, + gt = 0 + for (const yt in dt) { + if (ht === String(dt[yt])) { + if (yt !== '@initial') { + const bt = yt.slice(1) + ;(mt = mt || []).push(bt in nt ? nt[bt] : yt.replace(/^@media ?/, '')), (ut = !0) + } + ;(ct += gt), (pt = !0) + } + ++gt + } + if ((mt && mt.length && (at = { ['@media ' + mt.join(', ')]: at }), !pt)) continue e + } + } + } + ;(it[ct] = it[ct] || []).push([rt ? 'cv' : `${lt}-${ot[lt]}`, at, ut]) + } + return it + }, + A$2 = {}, + N$2 = o$2(), + D$1 = (tt, et) => + N$2(tt, () => (...nt) => { + const rt = () => { + for (let it of nt) { + it = (typeof it == 'object' && it) || {} + let ot = z$6(it) + if (!et.rules.global.cache.has(ot)) { + if ((et.rules.global.cache.add(ot), '@import' in it)) { + let at = [].indexOf.call(et.sheet.cssRules, et.rules.themed.group) - 1 + for (let st of [].concat(it['@import'])) + (st = st.includes('"') || st.includes("'") ? st : `"${st}"`), + et.sheet.insertRule(`@import ${st};`, at++) + delete it['@import'] + } + $$3(it, [], [], tt, (at) => { + et.rules.global.apply(at) + }) + } + } + return '' + } + return s$5(rt, { toString: rt }) + }), + H$2 = o$2(), + V$3 = (tt, et) => + H$2(tt, () => (nt) => { + const rt = `${S$3(tt.prefix)}k-${z$6(nt)}`, + it = () => { + if (!et.rules.global.cache.has(rt)) { + et.rules.global.cache.add(rt) + const ot = [] + $$3(nt, [], [], tt, (st) => ot.push(st)) + const at = `@keyframes ${rt}{${ot.join('')}}` + et.rules.global.apply(at) + } + return rt + } + return s$5(it, { + get name() { + return it() + }, + toString: it, + }) + }), + G$2 = class { + constructor(et, nt, rt, it) { + ;(this.token = et == null ? '' : String(et)), + (this.value = nt == null ? '' : String(nt)), + (this.scale = rt == null ? '' : String(rt)), + (this.prefix = it == null ? '' : String(it)) + } + get computedValue() { + return 'var(' + this.variable + ')' + } + get variable() { + return '--' + S$3(this.prefix) + S$3(this.scale) + this.token + } + toString() { + return this.computedValue + } + }, + F$2 = o$2(), + J$2 = (tt, et) => + F$2(tt, () => (nt, rt) => { + rt = (typeof nt == 'object' && nt) || Object(rt) + const it = `.${(nt = (nt = typeof nt == 'string' ? nt : '') || `${S$3(tt.prefix)}t-${z$6(rt)}`)}`, + ot = {}, + at = [] + for (const lt in rt) { + ot[lt] = {} + for (const ct in rt[lt]) { + const ut = `--${S$3(tt.prefix)}${lt}-${ct}`, + ht = k$9(String(rt[lt][ct]), tt.prefix, lt) + ;(ot[lt][ct] = new G$2(ct, ht, lt, tt.prefix)), at.push(`${ut}:${ht}`) + } + } + const st = () => { + if (at.length && !et.rules.themed.cache.has(nt)) { + et.rules.themed.cache.add(nt) + const lt = `${rt === tt.theme ? ':root,' : ''}.${nt}{${at.join(';')}}` + et.rules.themed.apply(lt) + } + return nt + } + return { + ...ot, + get className() { + return st() + }, + selector: it, + toString: st, + } + }), + U$2 = o$2(), + X$1, + Y$2 = o$2(), + q$7 = (tt) => { + const et = ((nt) => { + let rt = !1 + const it = U$2(nt, (ot) => { + rt = !0 + const at = 'prefix' in (ot = (typeof ot == 'object' && ot) || {}) ? String(ot.prefix) : '', + st = (typeof ot.media == 'object' && ot.media) || {}, + lt = typeof ot.root == 'object' ? ot.root || null : globalThis.document || null, + ct = (typeof ot.theme == 'object' && ot.theme) || {}, + ut = { + prefix: at, + media: st, + theme: ct, + themeMap: (typeof ot.themeMap == 'object' && ot.themeMap) || { ...n$7 }, + utils: (typeof ot.utils == 'object' && ot.utils) || {}, + }, + ht = E$1(lt), + dt = { + css: M$2(ut, ht), + globalCss: D$1(ut, ht), + keyframes: V$3(ut, ht), + createTheme: J$2(ut, ht), + reset() { + ht.reset(), dt.theme.toString() + }, + theme: {}, + sheet: ht, + config: ut, + prefix: at, + getCssText: ht.toString, + toString: ht.toString, + } + return String((dt.theme = dt.createTheme(ct))), dt + }) + return rt || it.reset(), it + })(tt) + return ( + (et.styled = (({ config: nt, sheet: rt }) => + Y$2(nt, () => { + const it = M$2(nt, rt) + return (...ot) => { + const at = it(...ot), + st = at[l$6].type, + lt = React$1.forwardRef((ct, ut) => { + const ht = (ct && ct.as) || st, + { props: dt, deferredInjector: pt } = at(ct) + return ( + delete dt.as, + (dt.ref = ut), + pt + ? React$1.createElement( + React$1.Fragment, + null, + React$1.createElement(ht, dt), + React$1.createElement(pt, null), + ) + : React$1.createElement(ht, dt) + ) + }) + return ( + (lt.className = at.className), + (lt.displayName = `Styled.${st.displayName || st.name || st}`), + (lt.selector = at.selector), + (lt.toString = () => at.selector), + (lt[l$6] = at[l$6]), + lt + ) + } + }))(et)), + et + ) + }, + K$6 = () => X$1 || (X$1 = q$7()), + re$4 = (...tt) => K$6().styled(...tt) + function clamp$a(tt, et, nt) { + return Math.max(et, Math.min(tt, nt)) + } + const V$2 = { + toVector(tt, et) { + return tt === void 0 && (tt = et), Array.isArray(tt) ? tt : [tt, tt] + }, + add(tt, et) { + return [tt[0] + et[0], tt[1] + et[1]] + }, + sub(tt, et) { + return [tt[0] - et[0], tt[1] - et[1]] + }, + addTo(tt, et) { + ;(tt[0] += et[0]), (tt[1] += et[1]) + }, + subTo(tt, et) { + ;(tt[0] -= et[0]), (tt[1] -= et[1]) + }, + } + function rubberband(tt, et, nt) { + return et === 0 || Math.abs(et) === 1 / 0 ? Math.pow(tt, nt * 5) : (tt * et * nt) / (et + nt * tt) + } + function rubberbandIfOutOfBounds(tt, et, nt, rt = 0.15) { + return rt === 0 + ? clamp$a(tt, et, nt) + : tt < et + ? -rubberband(et - tt, nt - et, rt) + et + : tt > nt + ? +rubberband(tt - nt, nt - et, rt) + nt + : tt + } + function computeRubberband(tt, [et, nt], [rt, it]) { + const [[ot, at], [st, lt]] = tt + return [rubberbandIfOutOfBounds(et, ot, at, rt), rubberbandIfOutOfBounds(nt, st, lt, it)] + } + function _toPrimitive$C(tt, et) { + if (typeof tt != 'object' || tt === null) return tt + var nt = tt[Symbol.toPrimitive] + if (nt !== void 0) { + var rt = nt.call(tt, et || 'default') + if (typeof rt != 'object') return rt + throw new TypeError('@@toPrimitive must return a primitive value.') + } + return (et === 'string' ? String : Number)(tt) + } + function _toPropertyKey$C(tt) { + var et = _toPrimitive$C(tt, 'string') + return typeof et == 'symbol' ? et : String(et) + } + function _defineProperty$H(tt, et, nt) { + return ( + (et = _toPropertyKey$C(et)), + et in tt + ? Object.defineProperty(tt, et, { value: nt, enumerable: !0, configurable: !0, writable: !0 }) + : (tt[et] = nt), + tt + ) + } + function ownKeys$F(tt, et) { + var nt = Object.keys(tt) + if (Object.getOwnPropertySymbols) { + var rt = Object.getOwnPropertySymbols(tt) + et && + (rt = rt.filter(function (it) { + return Object.getOwnPropertyDescriptor(tt, it).enumerable + })), + nt.push.apply(nt, rt) + } + return nt + } + function _objectSpread2$2(tt) { + for (var et = 1; et < arguments.length; et++) { + var nt = arguments[et] != null ? arguments[et] : {} + et % 2 + ? ownKeys$F(Object(nt), !0).forEach(function (rt) { + _defineProperty$H(tt, rt, nt[rt]) + }) + : Object.getOwnPropertyDescriptors + ? Object.defineProperties(tt, Object.getOwnPropertyDescriptors(nt)) + : ownKeys$F(Object(nt)).forEach(function (rt) { + Object.defineProperty(tt, rt, Object.getOwnPropertyDescriptor(nt, rt)) + }) + } + return tt + } + const EVENT_TYPE_MAP = { + pointer: { start: 'down', change: 'move', end: 'up' }, + mouse: { start: 'down', change: 'move', end: 'up' }, + touch: { start: 'start', change: 'move', end: 'end' }, + gesture: { start: 'start', change: 'change', end: 'end' }, + } + function capitalize$1(tt) { + return tt ? tt[0].toUpperCase() + tt.slice(1) : '' + } + const actionsWithoutCaptureSupported = ['enter', 'leave'] + function hasCapture(tt = !1, et) { + return tt && !actionsWithoutCaptureSupported.includes(et) + } + function toHandlerProp(tt, et = '', nt = !1) { + const rt = EVENT_TYPE_MAP[tt], + it = (rt && rt[et]) || et + return 'on' + capitalize$1(tt) + capitalize$1(it) + (hasCapture(nt, it) ? 'Capture' : '') + } + const pointerCaptureEvents = ['gotpointercapture', 'lostpointercapture'] + function parseProp(tt) { + let et = tt.substring(2).toLowerCase() + const nt = !!~et.indexOf('passive') + nt && (et = et.replace('passive', '')) + const rt = pointerCaptureEvents.includes(et) ? 'capturecapture' : 'capture', + it = !!~et.indexOf(rt) + return it && (et = et.replace('capture', '')), { device: et, capture: it, passive: nt } + } + function toDomEventType(tt, et = '') { + const nt = EVENT_TYPE_MAP[tt], + rt = (nt && nt[et]) || et + return tt + rt + } + function isTouch$1(tt) { + return 'touches' in tt + } + function getPointerType(tt) { + return isTouch$1(tt) ? 'touch' : 'pointerType' in tt ? tt.pointerType : 'mouse' + } + function getCurrentTargetTouchList(tt) { + return Array.from(tt.touches).filter((et) => { + var nt, rt + return ( + et.target === tt.currentTarget || + ((nt = tt.currentTarget) === null || nt === void 0 || (rt = nt.contains) === null || rt === void 0 + ? void 0 + : rt.call(nt, et.target)) + ) + }) + } + function getTouchList(tt) { + return tt.type === 'touchend' || tt.type === 'touchcancel' ? tt.changedTouches : tt.targetTouches + } + function getValueEvent(tt) { + return isTouch$1(tt) ? getTouchList(tt)[0] : tt + } + function touchIds(tt) { + return getCurrentTargetTouchList(tt).map((et) => et.identifier) + } + function pointerId(tt) { + const et = getValueEvent(tt) + return isTouch$1(tt) ? et.identifier : et.pointerId + } + function pointerValues(tt) { + const et = getValueEvent(tt) + return [et.clientX, et.clientY] + } + function getEventDetails(tt) { + const et = {} + if (('buttons' in tt && (et.buttons = tt.buttons), 'shiftKey' in tt)) { + const { shiftKey: nt, altKey: rt, metaKey: it, ctrlKey: ot } = tt + Object.assign(et, { shiftKey: nt, altKey: rt, metaKey: it, ctrlKey: ot }) + } + return et + } + function call$2(tt, ...et) { + return typeof tt == 'function' ? tt(...et) : tt + } + function noop$b() {} + function chain(...tt) { + return tt.length === 0 + ? noop$b + : tt.length === 1 + ? tt[0] + : function () { + let et + for (const nt of tt) et = nt.apply(this, arguments) || et + return et + } + } + function assignDefault(tt, et) { + return Object.assign({}, et, tt || {}) + } + const BEFORE_LAST_KINEMATICS_DELAY = 32 + class Engine { + constructor(et, nt, rt) { + ;(this.ctrl = et), + (this.args = nt), + (this.key = rt), + this.state || + ((this.state = {}), this.computeValues([0, 0]), this.computeInitial(), this.init && this.init(), this.reset()) + } + get state() { + return this.ctrl.state[this.key] + } + set state(et) { + this.ctrl.state[this.key] = et + } + get shared() { + return this.ctrl.state.shared + } + get eventStore() { + return this.ctrl.gestureEventStores[this.key] + } + get timeoutStore() { + return this.ctrl.gestureTimeoutStores[this.key] + } + get config() { + return this.ctrl.config[this.key] + } + get sharedConfig() { + return this.ctrl.config.shared + } + get handler() { + return this.ctrl.handlers[this.key] + } + reset() { + const { state: et, shared: nt, ingKey: rt, args: it } = this + ;(nt[rt] = et._active = et.active = et._blocked = et._force = !1), + (et._step = [!1, !1]), + (et.intentional = !1), + (et._movement = [0, 0]), + (et._distance = [0, 0]), + (et._direction = [0, 0]), + (et._delta = [0, 0]), + (et._bounds = [ + [-1 / 0, 1 / 0], + [-1 / 0, 1 / 0], + ]), + (et.args = it), + (et.axis = void 0), + (et.memo = void 0), + (et.elapsedTime = et.timeDelta = 0), + (et.direction = [0, 0]), + (et.distance = [0, 0]), + (et.overflow = [0, 0]), + (et._movementBound = [!1, !1]), + (et.velocity = [0, 0]), + (et.movement = [0, 0]), + (et.delta = [0, 0]), + (et.timeStamp = 0) + } + start(et) { + const nt = this.state, + rt = this.config + nt._active || + (this.reset(), + this.computeInitial(), + (nt._active = !0), + (nt.target = et.target), + (nt.currentTarget = et.currentTarget), + (nt.lastOffset = rt.from ? call$2(rt.from, nt) : nt.offset), + (nt.offset = nt.lastOffset), + (nt.startTime = nt.timeStamp = et.timeStamp)) + } + computeValues(et) { + const nt = this.state + ;(nt._values = et), (nt.values = this.config.transform(et)) + } + computeInitial() { + const et = this.state + ;(et._initial = et._values), (et.initial = et.values) + } + compute(et) { + const { state: nt, config: rt, shared: it } = this + nt.args = this.args + let ot = 0 + if ( + (et && + ((nt.event = et), + rt.preventDefault && et.cancelable && nt.event.preventDefault(), + (nt.type = et.type), + (it.touches = this.ctrl.pointerIds.size || this.ctrl.touchIds.size), + (it.locked = !!document.pointerLockElement), + Object.assign(it, getEventDetails(et)), + (it.down = it.pressed = it.buttons % 2 === 1 || it.touches > 0), + (ot = et.timeStamp - nt.timeStamp), + (nt.timeStamp = et.timeStamp), + (nt.elapsedTime = nt.timeStamp - nt.startTime)), + nt._active) + ) { + const Tt = nt._delta.map(Math.abs) + V$2.addTo(nt._distance, Tt) + } + this.axisIntent && this.axisIntent(et) + const [at, st] = nt._movement, + [lt, ct] = rt.threshold, + { _step: ut, values: ht } = nt + if ( + (rt.hasCustomTransform + ? (ut[0] === !1 && (ut[0] = Math.abs(at) >= lt && ht[0]), + ut[1] === !1 && (ut[1] = Math.abs(st) >= ct && ht[1])) + : (ut[0] === !1 && (ut[0] = Math.abs(at) >= lt && Math.sign(at) * lt), + ut[1] === !1 && (ut[1] = Math.abs(st) >= ct && Math.sign(st) * ct)), + (nt.intentional = ut[0] !== !1 || ut[1] !== !1), + !nt.intentional) + ) + return + const dt = [0, 0] + if (rt.hasCustomTransform) { + const [Tt, At] = ht + ;(dt[0] = ut[0] !== !1 ? Tt - ut[0] : 0), (dt[1] = ut[1] !== !1 ? At - ut[1] : 0) + } else (dt[0] = ut[0] !== !1 ? at - ut[0] : 0), (dt[1] = ut[1] !== !1 ? st - ut[1] : 0) + this.restrictToAxis && !nt._blocked && this.restrictToAxis(dt) + const pt = nt.offset, + mt = (nt._active && !nt._blocked) || nt.active + mt && + ((nt.first = nt._active && !nt.active), + (nt.last = !nt._active && nt.active), + (nt.active = it[this.ingKey] = nt._active), + et && + (nt.first && ('bounds' in rt && (nt._bounds = call$2(rt.bounds, nt)), this.setup && this.setup()), + (nt.movement = dt), + this.computeOffset())) + const [gt, yt] = nt.offset, + [[bt, vt], [xt, kt]] = nt._bounds + ;(nt.overflow = [gt < bt ? -1 : gt > vt ? 1 : 0, yt < xt ? -1 : yt > kt ? 1 : 0]), + (nt._movementBound[0] = nt.overflow[0] + ? nt._movementBound[0] === !1 + ? nt._movement[0] + : nt._movementBound[0] + : !1), + (nt._movementBound[1] = nt.overflow[1] + ? nt._movementBound[1] === !1 + ? nt._movement[1] + : nt._movementBound[1] + : !1) + const St = nt._active ? rt.rubberband || [0, 0] : [0, 0] + if ( + ((nt.offset = computeRubberband(nt._bounds, nt.offset, St)), + (nt.delta = V$2.sub(nt.offset, pt)), + this.computeMovement(), + mt && (!nt.last || ot > BEFORE_LAST_KINEMATICS_DELAY)) + ) { + nt.delta = V$2.sub(nt.offset, pt) + const Tt = nt.delta.map(Math.abs) + V$2.addTo(nt.distance, Tt), + (nt.direction = nt.delta.map(Math.sign)), + (nt._direction = nt._delta.map(Math.sign)), + !nt.first && ot > 0 && ((nt.velocity = [Tt[0] / ot, Tt[1] / ot]), (nt.timeDelta = ot)) + } + } + emit() { + const et = this.state, + nt = this.shared, + rt = this.config + if ((et._active || this.clean(), (et._blocked || !et.intentional) && !et._force && !rt.triggerAllEvents)) return + const it = this.handler( + _objectSpread2$2(_objectSpread2$2(_objectSpread2$2({}, nt), et), {}, { [this.aliasKey]: et.values }), + ) + it !== void 0 && (et.memo = it) + } + clean() { + this.eventStore.clean(), this.timeoutStore.clean() + } + } + function selectAxis([tt, et], nt) { + const rt = Math.abs(tt), + it = Math.abs(et) + if (rt > it && rt > nt) return 'x' + if (it > rt && it > nt) return 'y' + } + class CoordinatesEngine extends Engine { + constructor(...et) { + super(...et), _defineProperty$H(this, 'aliasKey', 'xy') + } + reset() { + super.reset(), (this.state.axis = void 0) + } + init() { + ;(this.state.offset = [0, 0]), (this.state.lastOffset = [0, 0]) + } + computeOffset() { + this.state.offset = V$2.add(this.state.lastOffset, this.state.movement) + } + computeMovement() { + this.state.movement = V$2.sub(this.state.offset, this.state.lastOffset) + } + axisIntent(et) { + const nt = this.state, + rt = this.config + if (!nt.axis && et) { + const it = typeof rt.axisThreshold == 'object' ? rt.axisThreshold[getPointerType(et)] : rt.axisThreshold + nt.axis = selectAxis(nt._movement, it) + } + nt._blocked = ((rt.lockDirection || !!rt.axis) && !nt.axis) || (!!rt.axis && rt.axis !== nt.axis) + } + restrictToAxis(et) { + if (this.config.axis || this.config.lockDirection) + switch (this.state.axis) { + case 'x': + et[1] = 0 + break + case 'y': + et[0] = 0 + break + } + } + } + const identity$e = (tt) => tt, + DEFAULT_RUBBERBAND = 0.15, + commonConfigResolver = { + enabled(tt = !0) { + return tt + }, + eventOptions(tt, et, nt) { + return _objectSpread2$2(_objectSpread2$2({}, nt.shared.eventOptions), tt) + }, + preventDefault(tt = !1) { + return tt + }, + triggerAllEvents(tt = !1) { + return tt + }, + rubberband(tt = 0) { + switch (tt) { + case !0: + return [DEFAULT_RUBBERBAND, DEFAULT_RUBBERBAND] + case !1: + return [0, 0] + default: + return V$2.toVector(tt) + } + }, + from(tt) { + if (typeof tt == 'function') return tt + if (tt != null) return V$2.toVector(tt) + }, + transform(tt, et, nt) { + const rt = tt || nt.shared.transform + return (this.hasCustomTransform = !!rt), rt || identity$e + }, + threshold(tt) { + return V$2.toVector(tt, 0) + }, + }, + DEFAULT_AXIS_THRESHOLD = 0, + coordinatesConfigResolver = _objectSpread2$2( + _objectSpread2$2({}, commonConfigResolver), + {}, + { + axis(tt, et, { axis: nt }) { + if (((this.lockDirection = nt === 'lock'), !this.lockDirection)) return nt + }, + axisThreshold(tt = DEFAULT_AXIS_THRESHOLD) { + return tt + }, + bounds(tt = {}) { + if (typeof tt == 'function') return (ot) => coordinatesConfigResolver.bounds(tt(ot)) + if ('current' in tt) return () => tt.current + if (typeof HTMLElement == 'function' && tt instanceof HTMLElement) return tt + const { left: et = -1 / 0, right: nt = 1 / 0, top: rt = -1 / 0, bottom: it = 1 / 0 } = tt + return [ + [et, nt], + [rt, it], + ] + }, + }, + ), + KEYS_DELTA_MAP = { + ArrowRight: (tt, et = 1) => [tt * et, 0], + ArrowLeft: (tt, et = 1) => [-1 * tt * et, 0], + ArrowUp: (tt, et = 1) => [0, -1 * tt * et], + ArrowDown: (tt, et = 1) => [0, tt * et], + } + class DragEngine extends CoordinatesEngine { + constructor(...et) { + super(...et), _defineProperty$H(this, 'ingKey', 'dragging') + } + reset() { + super.reset() + const et = this.state + ;(et._pointerId = void 0), + (et._pointerActive = !1), + (et._keyboardActive = !1), + (et._preventScroll = !1), + (et._delayed = !1), + (et.swipe = [0, 0]), + (et.tap = !1), + (et.canceled = !1), + (et.cancel = this.cancel.bind(this)) + } + setup() { + const et = this.state + if (et._bounds instanceof HTMLElement) { + const nt = et._bounds.getBoundingClientRect(), + rt = et.currentTarget.getBoundingClientRect(), + it = { + left: nt.left - rt.left + et.offset[0], + right: nt.right - rt.right + et.offset[0], + top: nt.top - rt.top + et.offset[1], + bottom: nt.bottom - rt.bottom + et.offset[1], + } + et._bounds = coordinatesConfigResolver.bounds(it) + } + } + cancel() { + const et = this.state + et.canceled || + ((et.canceled = !0), + (et._active = !1), + setTimeout(() => { + this.compute(), this.emit() + }, 0)) + } + setActive() { + this.state._active = this.state._pointerActive || this.state._keyboardActive + } + clean() { + this.pointerClean(), (this.state._pointerActive = !1), (this.state._keyboardActive = !1), super.clean() + } + pointerDown(et) { + const nt = this.config, + rt = this.state + if ( + et.buttons != null && + (Array.isArray(nt.pointerButtons) + ? !nt.pointerButtons.includes(et.buttons) + : nt.pointerButtons !== -1 && nt.pointerButtons !== et.buttons) + ) + return + const it = this.ctrl.setEventIds(et) + nt.pointerCapture && et.target.setPointerCapture(et.pointerId), + !(it && it.size > 1 && rt._pointerActive) && + (this.start(et), + this.setupPointer(et), + (rt._pointerId = pointerId(et)), + (rt._pointerActive = !0), + this.computeValues(pointerValues(et)), + this.computeInitial(), + nt.preventScrollAxis && getPointerType(et) !== 'mouse' + ? ((rt._active = !1), this.setupScrollPrevention(et)) + : nt.delay > 0 + ? (this.setupDelayTrigger(et), nt.triggerAllEvents && (this.compute(et), this.emit())) + : this.startPointerDrag(et)) + } + startPointerDrag(et) { + const nt = this.state + ;(nt._active = !0), (nt._preventScroll = !0), (nt._delayed = !1), this.compute(et), this.emit() + } + pointerMove(et) { + const nt = this.state, + rt = this.config + if (!nt._pointerActive) return + const it = pointerId(et) + if (nt._pointerId !== void 0 && it !== nt._pointerId) return + const ot = pointerValues(et) + if ( + (document.pointerLockElement === et.target + ? (nt._delta = [et.movementX, et.movementY]) + : ((nt._delta = V$2.sub(ot, nt._values)), this.computeValues(ot)), + V$2.addTo(nt._movement, nt._delta), + this.compute(et), + nt._delayed && nt.intentional) + ) { + this.timeoutStore.remove('dragDelay'), (nt.active = !1), this.startPointerDrag(et) + return + } + if (rt.preventScrollAxis && !nt._preventScroll) + if (nt.axis) + if (nt.axis === rt.preventScrollAxis || rt.preventScrollAxis === 'xy') { + ;(nt._active = !1), this.clean() + return + } else { + this.timeoutStore.remove('startPointerDrag'), this.startPointerDrag(et) + return + } + else return + this.emit() + } + pointerUp(et) { + this.ctrl.setEventIds(et) + try { + this.config.pointerCapture && + et.target.hasPointerCapture(et.pointerId) && + et.target.releasePointerCapture(et.pointerId) + } catch {} + const nt = this.state, + rt = this.config + if (!nt._active || !nt._pointerActive) return + const it = pointerId(et) + if (nt._pointerId !== void 0 && it !== nt._pointerId) return + ;(this.state._pointerActive = !1), this.setActive(), this.compute(et) + const [ot, at] = nt._distance + if (((nt.tap = ot <= rt.tapsThreshold && at <= rt.tapsThreshold), nt.tap && rt.filterTaps)) nt._force = !0 + else { + const [st, lt] = nt._delta, + [ct, ut] = nt._movement, + [ht, dt] = rt.swipe.velocity, + [pt, mt] = rt.swipe.distance, + gt = rt.swipe.duration + if (nt.elapsedTime < gt) { + const yt = Math.abs(st / nt.timeDelta), + bt = Math.abs(lt / nt.timeDelta) + yt > ht && Math.abs(ct) > pt && (nt.swipe[0] = Math.sign(st)), + bt > dt && Math.abs(ut) > mt && (nt.swipe[1] = Math.sign(lt)) + } + } + this.emit() + } + pointerClick(et) { + !this.state.tap && et.detail > 0 && (et.preventDefault(), et.stopPropagation()) + } + setupPointer(et) { + const nt = this.config, + rt = nt.device + nt.pointerLock && et.currentTarget.requestPointerLock(), + nt.pointerCapture || + (this.eventStore.add(this.sharedConfig.window, rt, 'change', this.pointerMove.bind(this)), + this.eventStore.add(this.sharedConfig.window, rt, 'end', this.pointerUp.bind(this)), + this.eventStore.add(this.sharedConfig.window, rt, 'cancel', this.pointerUp.bind(this))) + } + pointerClean() { + this.config.pointerLock && document.pointerLockElement === this.state.currentTarget && document.exitPointerLock() + } + preventScroll(et) { + this.state._preventScroll && et.cancelable && et.preventDefault() + } + setupScrollPrevention(et) { + ;(this.state._preventScroll = !1), persistEvent(et) + const nt = this.eventStore.add(this.sharedConfig.window, 'touch', 'change', this.preventScroll.bind(this), { + passive: !1, + }) + this.eventStore.add(this.sharedConfig.window, 'touch', 'end', nt), + this.eventStore.add(this.sharedConfig.window, 'touch', 'cancel', nt), + this.timeoutStore.add('startPointerDrag', this.startPointerDrag.bind(this), this.config.preventScrollDelay, et) + } + setupDelayTrigger(et) { + ;(this.state._delayed = !0), + this.timeoutStore.add( + 'dragDelay', + () => { + ;(this.state._step = [0, 0]), this.startPointerDrag(et) + }, + this.config.delay, + ) + } + keyDown(et) { + const nt = KEYS_DELTA_MAP[et.key] + if (nt) { + const rt = this.state, + it = et.shiftKey ? 10 : et.altKey ? 0.1 : 1 + this.start(et), + (rt._delta = nt(this.config.keyboardDisplacement, it)), + (rt._keyboardActive = !0), + V$2.addTo(rt._movement, rt._delta), + this.compute(et), + this.emit() + } + } + keyUp(et) { + et.key in KEYS_DELTA_MAP && ((this.state._keyboardActive = !1), this.setActive(), this.compute(et), this.emit()) + } + bind(et) { + const nt = this.config.device + et(nt, 'start', this.pointerDown.bind(this)), + this.config.pointerCapture && + (et(nt, 'change', this.pointerMove.bind(this)), + et(nt, 'end', this.pointerUp.bind(this)), + et(nt, 'cancel', this.pointerUp.bind(this)), + et('lostPointerCapture', '', this.pointerUp.bind(this))), + this.config.keys && (et('key', 'down', this.keyDown.bind(this)), et('key', 'up', this.keyUp.bind(this))), + this.config.filterTaps && et('click', '', this.pointerClick.bind(this), { capture: !0, passive: !1 }) + } + } + function persistEvent(tt) { + 'persist' in tt && typeof tt.persist == 'function' && tt.persist() + } + const isBrowser$2 = typeof window < 'u' && window.document && window.document.createElement + function supportsTouchEvents() { + return isBrowser$2 && 'ontouchstart' in window + } + function isTouchScreen() { + return supportsTouchEvents() || (isBrowser$2 && window.navigator.maxTouchPoints > 1) + } + function supportsPointerEvents() { + return isBrowser$2 && 'onpointerdown' in window + } + function supportsPointerLock() { + return isBrowser$2 && 'exitPointerLock' in window.document + } + function supportsGestureEvents() { + try { + return 'constructor' in GestureEvent + } catch { + return !1 + } + } + const SUPPORT = { + isBrowser: isBrowser$2, + gesture: supportsGestureEvents(), + touch: supportsTouchEvents(), + touchscreen: isTouchScreen(), + pointer: supportsPointerEvents(), + pointerLock: supportsPointerLock(), + }, + DEFAULT_PREVENT_SCROLL_DELAY = 250, + DEFAULT_DRAG_DELAY = 180, + DEFAULT_SWIPE_VELOCITY = 0.5, + DEFAULT_SWIPE_DISTANCE = 50, + DEFAULT_SWIPE_DURATION = 250, + DEFAULT_KEYBOARD_DISPLACEMENT = 10, + DEFAULT_DRAG_AXIS_THRESHOLD = { mouse: 0, touch: 0, pen: 8 }, + dragConfigResolver = _objectSpread2$2( + _objectSpread2$2({}, coordinatesConfigResolver), + {}, + { + device(tt, et, { pointer: { touch: nt = !1, lock: rt = !1, mouse: it = !1 } = {} }) { + return ( + (this.pointerLock = rt && SUPPORT.pointerLock), + SUPPORT.touch && nt + ? 'touch' + : this.pointerLock + ? 'mouse' + : SUPPORT.pointer && !it + ? 'pointer' + : SUPPORT.touch + ? 'touch' + : 'mouse' + ) + }, + preventScrollAxis(tt, et, { preventScroll: nt }) { + if ( + ((this.preventScrollDelay = + typeof nt == 'number' ? nt : nt || (nt === void 0 && tt) ? DEFAULT_PREVENT_SCROLL_DELAY : void 0), + !(!SUPPORT.touchscreen || nt === !1)) + ) + return tt || (nt !== void 0 ? 'y' : void 0) + }, + pointerCapture(tt, et, { pointer: { capture: nt = !0, buttons: rt = 1, keys: it = !0 } = {} }) { + return (this.pointerButtons = rt), (this.keys = it), !this.pointerLock && this.device === 'pointer' && nt + }, + threshold(tt, et, { filterTaps: nt = !1, tapsThreshold: rt = 3, axis: it = void 0 }) { + const ot = V$2.toVector(tt, nt ? rt : it ? 1 : 0) + return (this.filterTaps = nt), (this.tapsThreshold = rt), ot + }, + swipe({ + velocity: tt = DEFAULT_SWIPE_VELOCITY, + distance: et = DEFAULT_SWIPE_DISTANCE, + duration: nt = DEFAULT_SWIPE_DURATION, + } = {}) { + return { + velocity: this.transform(V$2.toVector(tt)), + distance: this.transform(V$2.toVector(et)), + duration: nt, + } + }, + delay(tt = 0) { + switch (tt) { + case !0: + return DEFAULT_DRAG_DELAY + case !1: + return 0 + default: + return tt + } + }, + axisThreshold(tt) { + return tt + ? _objectSpread2$2(_objectSpread2$2({}, DEFAULT_DRAG_AXIS_THRESHOLD), tt) + : DEFAULT_DRAG_AXIS_THRESHOLD + }, + keyboardDisplacement(tt = DEFAULT_KEYBOARD_DISPLACEMENT) { + return tt + }, + }, + ) + _objectSpread2$2( + _objectSpread2$2({}, commonConfigResolver), + {}, + { + device(tt, et, { shared: nt, pointer: { touch: rt = !1 } = {} }) { + if (nt.target && !SUPPORT.touch && SUPPORT.gesture) return 'gesture' + if (SUPPORT.touch && rt) return 'touch' + if (SUPPORT.touchscreen) { + if (SUPPORT.pointer) return 'pointer' + if (SUPPORT.touch) return 'touch' + } + }, + bounds(tt, et, { scaleBounds: nt = {}, angleBounds: rt = {} }) { + const it = (at) => { + const st = assignDefault(call$2(nt, at), { min: -1 / 0, max: 1 / 0 }) + return [st.min, st.max] + }, + ot = (at) => { + const st = assignDefault(call$2(rt, at), { min: -1 / 0, max: 1 / 0 }) + return [st.min, st.max] + } + return typeof nt != 'function' && typeof rt != 'function' ? [it(), ot()] : (at) => [it(at), ot(at)] + }, + threshold(tt, et, nt) { + return (this.lockDirection = nt.axis === 'lock'), V$2.toVector(tt, this.lockDirection ? [0.1, 3] : 0) + }, + modifierKey(tt) { + return tt === void 0 ? 'ctrlKey' : tt + }, + pinchOnWheel(tt = !0) { + return tt + }, + }, + ) + _objectSpread2$2(_objectSpread2$2({}, coordinatesConfigResolver), {}, { mouseOnly: (tt = !0) => tt }) + _objectSpread2$2(_objectSpread2$2({}, coordinatesConfigResolver), {}, { mouseOnly: (tt = !0) => tt }) + const EngineMap = new Map(), + ConfigResolverMap = new Map() + function registerAction(tt) { + EngineMap.set(tt.key, tt.engine), ConfigResolverMap.set(tt.key, tt.resolver) + } + const dragAction = { key: 'drag', engine: DragEngine, resolver: dragConfigResolver } + function _objectWithoutPropertiesLoose$p(tt, et) { + if (tt == null) return {} + var nt = {}, + rt = Object.keys(tt), + it, + ot + for (ot = 0; ot < rt.length; ot++) (it = rt[ot]), !(et.indexOf(it) >= 0) && (nt[it] = tt[it]) + return nt + } + function _objectWithoutProperties$m(tt, et) { + if (tt == null) return {} + var nt = _objectWithoutPropertiesLoose$p(tt, et), + rt, + it + if (Object.getOwnPropertySymbols) { + var ot = Object.getOwnPropertySymbols(tt) + for (it = 0; it < ot.length; it++) + (rt = ot[it]), !(et.indexOf(rt) >= 0) && Object.prototype.propertyIsEnumerable.call(tt, rt) && (nt[rt] = tt[rt]) + } + return nt + } + const sharedConfigResolver = { + target(tt) { + if (tt) return () => ('current' in tt ? tt.current : tt) + }, + enabled(tt = !0) { + return tt + }, + window(tt = SUPPORT.isBrowser ? window : void 0) { + return tt + }, + eventOptions({ passive: tt = !0, capture: et = !1 } = {}) { + return { passive: tt, capture: et } + }, + transform(tt) { + return tt + }, + }, + _excluded$1N = ['target', 'eventOptions', 'window', 'enabled', 'transform'] + function resolveWith(tt = {}, et) { + const nt = {} + for (const [rt, it] of Object.entries(et)) + switch (typeof it) { + case 'function': + nt[rt] = it.call(nt, tt[rt], rt, tt) + break + case 'object': + nt[rt] = resolveWith(tt[rt], it) + break + case 'boolean': + it && (nt[rt] = tt[rt]) + break + } + return nt + } + function parse$3(tt, et, nt = {}) { + const rt = tt, + { target: it, eventOptions: ot, window: at, enabled: st, transform: lt } = rt, + ct = _objectWithoutProperties$m(rt, _excluded$1N) + if ( + ((nt.shared = resolveWith( + { target: it, eventOptions: ot, window: at, enabled: st, transform: lt }, + sharedConfigResolver, + )), + et) + ) { + const ut = ConfigResolverMap.get(et) + nt[et] = resolveWith(_objectSpread2$2({ shared: nt.shared }, ct), ut) + } else + for (const ut in ct) { + const ht = ConfigResolverMap.get(ut) + ht && (nt[ut] = resolveWith(_objectSpread2$2({ shared: nt.shared }, ct[ut]), ht)) + } + return nt + } + class EventStore { + constructor(et, nt) { + _defineProperty$H(this, '_listeners', new Set()), (this._ctrl = et), (this._gestureKey = nt) + } + add(et, nt, rt, it, ot) { + const at = this._listeners, + st = toDomEventType(nt, rt), + lt = this._gestureKey ? this._ctrl.config[this._gestureKey].eventOptions : {}, + ct = _objectSpread2$2(_objectSpread2$2({}, lt), ot) + et.addEventListener(st, it, ct) + const ut = () => { + et.removeEventListener(st, it, ct), at.delete(ut) + } + return at.add(ut), ut + } + clean() { + this._listeners.forEach((et) => et()), this._listeners.clear() + } + } + class TimeoutStore { + constructor() { + _defineProperty$H(this, '_timeouts', new Map()) + } + add(et, nt, rt = 140, ...it) { + this.remove(et), this._timeouts.set(et, window.setTimeout(nt, rt, ...it)) + } + remove(et) { + const nt = this._timeouts.get(et) + nt && window.clearTimeout(nt) + } + clean() { + this._timeouts.forEach((et) => void window.clearTimeout(et)), this._timeouts.clear() + } + } + let Controller$1 = class { + constructor(et) { + _defineProperty$H(this, 'gestures', new Set()), + _defineProperty$H(this, '_targetEventStore', new EventStore(this)), + _defineProperty$H(this, 'gestureEventStores', {}), + _defineProperty$H(this, 'gestureTimeoutStores', {}), + _defineProperty$H(this, 'handlers', {}), + _defineProperty$H(this, 'config', {}), + _defineProperty$H(this, 'pointerIds', new Set()), + _defineProperty$H(this, 'touchIds', new Set()), + _defineProperty$H(this, 'state', { shared: { shiftKey: !1, metaKey: !1, ctrlKey: !1, altKey: !1 } }), + resolveGestures(this, et) + } + setEventIds(et) { + if (isTouch$1(et)) return (this.touchIds = new Set(touchIds(et))), this.touchIds + if ('pointerId' in et) + return ( + et.type === 'pointerup' || et.type === 'pointercancel' + ? this.pointerIds.delete(et.pointerId) + : et.type === 'pointerdown' && this.pointerIds.add(et.pointerId), + this.pointerIds + ) + } + applyHandlers(et, nt) { + ;(this.handlers = et), (this.nativeHandlers = nt) + } + applyConfig(et, nt) { + this.config = parse$3(et, nt, this.config) + } + clean() { + this._targetEventStore.clean() + for (const et of this.gestures) this.gestureEventStores[et].clean(), this.gestureTimeoutStores[et].clean() + } + effect() { + return this.config.shared.target && this.bind(), () => this._targetEventStore.clean() + } + bind(...et) { + const nt = this.config.shared, + rt = {} + let it + if (!(nt.target && ((it = nt.target()), !it))) { + if (nt.enabled) { + for (const at of this.gestures) { + const st = this.config[at], + lt = bindToProps(rt, st.eventOptions, !!it) + if (st.enabled) { + const ct = EngineMap.get(at) + new ct(this, et, at).bind(lt) + } + } + const ot = bindToProps(rt, nt.eventOptions, !!it) + for (const at in this.nativeHandlers) + ot( + at, + '', + (st) => + this.nativeHandlers[at]( + _objectSpread2$2(_objectSpread2$2({}, this.state.shared), {}, { event: st, args: et }), + ), + void 0, + !0, + ) + } + for (const ot in rt) rt[ot] = chain(...rt[ot]) + if (!it) return rt + for (const ot in rt) { + const { device: at, capture: st, passive: lt } = parseProp(ot) + this._targetEventStore.add(it, at, '', rt[ot], { capture: st, passive: lt }) + } + } + } + } + function setupGesture(tt, et) { + tt.gestures.add(et), + (tt.gestureEventStores[et] = new EventStore(tt, et)), + (tt.gestureTimeoutStores[et] = new TimeoutStore()) + } + function resolveGestures(tt, et) { + et.drag && setupGesture(tt, 'drag'), + et.wheel && setupGesture(tt, 'wheel'), + et.scroll && setupGesture(tt, 'scroll'), + et.move && setupGesture(tt, 'move'), + et.pinch && setupGesture(tt, 'pinch'), + et.hover && setupGesture(tt, 'hover') + } + const bindToProps = + (tt, et, nt) => + (rt, it, ot, at = {}, st = !1) => { + var lt, ct + const ut = (lt = at.capture) !== null && lt !== void 0 ? lt : et.capture, + ht = (ct = at.passive) !== null && ct !== void 0 ? ct : et.passive + let dt = st ? rt : toHandlerProp(rt, it, ut) + nt && ht && (dt += 'Passive'), (tt[dt] = tt[dt] || []), tt[dt].push(ot) + } + function useRecognizers(tt, et = {}, nt, rt) { + const it = React$1.useMemo(() => new Controller$1(tt), []) + if ( + (it.applyHandlers(tt, rt), + it.applyConfig(et, nt), + React$1.useEffect(it.effect.bind(it)), + React$1.useEffect(() => it.clean.bind(it), []), + et.target === void 0) + ) + return it.bind.bind(it) + } + function useDrag$2(tt, et) { + return registerAction(dragAction), useRecognizers({ drag: tt }, et || {}, 'drag') + } + function $e42e1063c40fb3ef$export$b9ecd428b558ff10(tt, et, { checkForDefaultPrevented: nt = !0 } = {}) { + return function (it) { + if ((tt == null || tt(it), nt === !1 || !it.defaultPrevented)) return et == null ? void 0 : et(it) + } + } + function $c512c27ab02ef895$export$50c7b4e9d9f19c1(tt, et = []) { + let nt = [] + function rt(ot, at) { + const st = reactExports.createContext(at), + lt = nt.length + nt = [...nt, at] + function ct(ht) { + const { scope: dt, children: pt, ...mt } = ht, + gt = (dt == null ? void 0 : dt[tt][lt]) || st, + yt = reactExports.useMemo(() => mt, Object.values(mt)) + return reactExports.createElement(gt.Provider, { value: yt }, pt) + } + function ut(ht, dt) { + const pt = (dt == null ? void 0 : dt[tt][lt]) || st, + mt = reactExports.useContext(pt) + if (mt) return mt + if (at !== void 0) return at + throw new Error(`\`${ht}\` must be used within \`${ot}\``) + } + return (ct.displayName = ot + 'Provider'), [ct, ut] + } + const it = () => { + const ot = nt.map((at) => reactExports.createContext(at)) + return function (st) { + const lt = (st == null ? void 0 : st[tt]) || ot + return reactExports.useMemo(() => ({ [`__scope${tt}`]: { ...st, [tt]: lt } }), [st, lt]) + } + } + return (it.scopeName = tt), [rt, $c512c27ab02ef895$var$composeContextScopes(it, ...et)] + } + function $c512c27ab02ef895$var$composeContextScopes(...tt) { + const et = tt[0] + if (tt.length === 1) return et + const nt = () => { + const rt = tt.map((it) => ({ useScope: it(), scopeName: it.scopeName })) + return function (ot) { + const at = rt.reduce((st, { useScope: lt, scopeName: ct }) => { + const ht = lt(ot)[`__scope${ct}`] + return { ...st, ...ht } + }, {}) + return reactExports.useMemo(() => ({ [`__scope${et.scopeName}`]: at }), [at]) + } + } + return (nt.scopeName = et.scopeName), nt + } + function $b1b2314f5f9a1d84$export$25bec8c6f54ee79a(tt) { + const et = reactExports.useRef(tt) + return ( + reactExports.useEffect(() => { + et.current = tt + }), + reactExports.useMemo( + () => + (...nt) => { + var rt + return (rt = et.current) === null || rt === void 0 ? void 0 : rt.call(et, ...nt) + }, + [], + ) + ) + } + function $addc16e1bbe58fd0$export$3a72a57244d6e765(tt, et = globalThis == null ? void 0 : globalThis.document) { + const nt = $b1b2314f5f9a1d84$export$25bec8c6f54ee79a(tt) + reactExports.useEffect(() => { + const rt = (it) => { + it.key === 'Escape' && nt(it) + } + return et.addEventListener('keydown', rt), () => et.removeEventListener('keydown', rt) + }, [nt, et]) + } + const $5cb92bef7577960e$var$CONTEXT_UPDATE = 'dismissableLayer.update', + $5cb92bef7577960e$var$POINTER_DOWN_OUTSIDE = 'dismissableLayer.pointerDownOutside', + $5cb92bef7577960e$var$FOCUS_OUTSIDE = 'dismissableLayer.focusOutside' + let $5cb92bef7577960e$var$originalBodyPointerEvents + const $5cb92bef7577960e$var$DismissableLayerContext = reactExports.createContext({ + layers: new Set(), + layersWithOutsidePointerEventsDisabled: new Set(), + branches: new Set(), + }), + $5cb92bef7577960e$export$177fb62ff3ec1f22 = reactExports.forwardRef((tt, et) => { + var nt + const { + disableOutsidePointerEvents: rt = !1, + onEscapeKeyDown: it, + onPointerDownOutside: ot, + onFocusOutside: at, + onInteractOutside: st, + onDismiss: lt, + ...ct + } = tt, + ut = reactExports.useContext($5cb92bef7577960e$var$DismissableLayerContext), + [ht, dt] = reactExports.useState(null), + pt = + (nt = ht == null ? void 0 : ht.ownerDocument) !== null && nt !== void 0 + ? nt + : globalThis == null + ? void 0 + : globalThis.document, + [, mt] = reactExports.useState({}), + gt = $6ed0406888f73fc4$export$c7b2cbe3552a0d05(et, (Et) => dt(Et)), + yt = Array.from(ut.layers), + [bt] = [...ut.layersWithOutsidePointerEventsDisabled].slice(-1), + vt = yt.indexOf(bt), + xt = ht ? yt.indexOf(ht) : -1, + kt = ut.layersWithOutsidePointerEventsDisabled.size > 0, + St = xt >= vt, + Tt = $5cb92bef7577960e$var$usePointerDownOutside((Et) => { + const $t = Et.target, + Dt = [...ut.branches].some((jt) => jt.contains($t)) + !St || Dt || (ot == null || ot(Et), st == null || st(Et), Et.defaultPrevented || lt == null || lt()) + }, pt), + At = $5cb92bef7577960e$var$useFocusOutside((Et) => { + const $t = Et.target + ;[...ut.branches].some((jt) => jt.contains($t)) || + (at == null || at(Et), st == null || st(Et), Et.defaultPrevented || lt == null || lt()) + }, pt) + return ( + $addc16e1bbe58fd0$export$3a72a57244d6e765((Et) => { + xt === ut.layers.size - 1 && (it == null || it(Et), !Et.defaultPrevented && lt && (Et.preventDefault(), lt())) + }, pt), + reactExports.useEffect(() => { + if (ht) + return ( + rt && + (ut.layersWithOutsidePointerEventsDisabled.size === 0 && + (($5cb92bef7577960e$var$originalBodyPointerEvents = pt.body.style.pointerEvents), + (pt.body.style.pointerEvents = 'none')), + ut.layersWithOutsidePointerEventsDisabled.add(ht)), + ut.layers.add(ht), + $5cb92bef7577960e$var$dispatchUpdate(), + () => { + rt && + ut.layersWithOutsidePointerEventsDisabled.size === 1 && + (pt.body.style.pointerEvents = $5cb92bef7577960e$var$originalBodyPointerEvents) + } + ) + }, [ht, pt, rt, ut]), + reactExports.useEffect( + () => () => { + ht && + (ut.layers.delete(ht), + ut.layersWithOutsidePointerEventsDisabled.delete(ht), + $5cb92bef7577960e$var$dispatchUpdate()) + }, + [ht, ut], + ), + reactExports.useEffect(() => { + const Et = () => mt({}) + return ( + document.addEventListener($5cb92bef7577960e$var$CONTEXT_UPDATE, Et), + () => document.removeEventListener($5cb92bef7577960e$var$CONTEXT_UPDATE, Et) + ) + }, []), + reactExports.createElement( + $8927f6f2acc4f386$export$250ffa63cdc0d034.div, + _extends$u({}, ct, { + ref: gt, + style: { pointerEvents: kt ? (St ? 'auto' : 'none') : void 0, ...tt.style }, + onFocusCapture: $e42e1063c40fb3ef$export$b9ecd428b558ff10(tt.onFocusCapture, At.onFocusCapture), + onBlurCapture: $e42e1063c40fb3ef$export$b9ecd428b558ff10(tt.onBlurCapture, At.onBlurCapture), + onPointerDownCapture: $e42e1063c40fb3ef$export$b9ecd428b558ff10( + tt.onPointerDownCapture, + Tt.onPointerDownCapture, + ), + }), + ) + ) + }) + function $5cb92bef7577960e$var$usePointerDownOutside(tt, et = globalThis == null ? void 0 : globalThis.document) { + const nt = $b1b2314f5f9a1d84$export$25bec8c6f54ee79a(tt), + rt = reactExports.useRef(!1), + it = reactExports.useRef(() => {}) + return ( + reactExports.useEffect(() => { + const ot = (st) => { + if (st.target && !rt.current) { + let ut = function () { + $5cb92bef7577960e$var$handleAndDispatchCustomEvent($5cb92bef7577960e$var$POINTER_DOWN_OUTSIDE, nt, ct, { + discrete: !0, + }) + } + var lt = ut + const ct = { originalEvent: st } + st.pointerType === 'touch' + ? (et.removeEventListener('click', it.current), + (it.current = ut), + et.addEventListener('click', it.current, { once: !0 })) + : ut() + } else et.removeEventListener('click', it.current) + rt.current = !1 + }, + at = window.setTimeout(() => { + et.addEventListener('pointerdown', ot) + }, 0) + return () => { + window.clearTimeout(at), + et.removeEventListener('pointerdown', ot), + et.removeEventListener('click', it.current) + } + }, [et, nt]), + { onPointerDownCapture: () => (rt.current = !0) } + ) + } + function $5cb92bef7577960e$var$useFocusOutside(tt, et = globalThis == null ? void 0 : globalThis.document) { + const nt = $b1b2314f5f9a1d84$export$25bec8c6f54ee79a(tt), + rt = reactExports.useRef(!1) + return ( + reactExports.useEffect(() => { + const it = (ot) => { + ot.target && + !rt.current && + $5cb92bef7577960e$var$handleAndDispatchCustomEvent( + $5cb92bef7577960e$var$FOCUS_OUTSIDE, + nt, + { originalEvent: ot }, + { discrete: !1 }, + ) + } + return et.addEventListener('focusin', it), () => et.removeEventListener('focusin', it) + }, [et, nt]), + { onFocusCapture: () => (rt.current = !0), onBlurCapture: () => (rt.current = !1) } + ) + } + function $5cb92bef7577960e$var$dispatchUpdate() { + const tt = new CustomEvent($5cb92bef7577960e$var$CONTEXT_UPDATE) + document.dispatchEvent(tt) + } + function $5cb92bef7577960e$var$handleAndDispatchCustomEvent(tt, et, nt, { discrete: rt }) { + const it = nt.originalEvent.target, + ot = new CustomEvent(tt, { bubbles: !1, cancelable: !0, detail: nt }) + et && it.addEventListener(tt, et, { once: !0 }), + rt ? $8927f6f2acc4f386$export$6d1a0317bde7de7f(it, ot) : it.dispatchEvent(ot) + } + const $9f79659886946c16$export$e5c5a5f917a5871c = + globalThis != null && globalThis.document ? reactExports.useLayoutEffect : () => {}, + $1746a345f3d73bb7$var$useReactId = React$2['useId'.toString()] || (() => {}) + let $1746a345f3d73bb7$var$count = 0 + function $1746a345f3d73bb7$export$f680877a34711e37(tt) { + const [et, nt] = reactExports.useState($1746a345f3d73bb7$var$useReactId()) + return ( + $9f79659886946c16$export$e5c5a5f917a5871c(() => { + tt || nt((rt) => rt ?? String($1746a345f3d73bb7$var$count++)) + }, [tt]), + tt || (et ? `radix-${et}` : '') + ) + } + const sides = ['top', 'right', 'bottom', 'left'], + min$4 = Math.min, + max$5 = Math.max, + round$4 = Math.round, + floor = Math.floor, + createCoords = (tt) => ({ x: tt, y: tt }), + oppositeSideMap = { left: 'right', right: 'left', bottom: 'top', top: 'bottom' }, + oppositeAlignmentMap = { start: 'end', end: 'start' } + function clamp$9(tt, et, nt) { + return max$5(tt, min$4(et, nt)) + } + function evaluate$1(tt, et) { + return typeof tt == 'function' ? tt(et) : tt + } + function getSide(tt) { + return tt.split('-')[0] + } + function getAlignment(tt) { + return tt.split('-')[1] + } + function getOppositeAxis(tt) { + return tt === 'x' ? 'y' : 'x' + } + function getAxisLength(tt) { + return tt === 'y' ? 'height' : 'width' + } + function getSideAxis(tt) { + return ['top', 'bottom'].includes(getSide(tt)) ? 'y' : 'x' + } + function getAlignmentAxis(tt) { + return getOppositeAxis(getSideAxis(tt)) + } + function getAlignmentSides(tt, et, nt) { + nt === void 0 && (nt = !1) + const rt = getAlignment(tt), + it = getAlignmentAxis(tt), + ot = getAxisLength(it) + let at = it === 'x' ? (rt === (nt ? 'end' : 'start') ? 'right' : 'left') : rt === 'start' ? 'bottom' : 'top' + return et.reference[ot] > et.floating[ot] && (at = getOppositePlacement$1(at)), [at, getOppositePlacement$1(at)] + } + function getExpandedPlacements(tt) { + const et = getOppositePlacement$1(tt) + return [getOppositeAlignmentPlacement(tt), et, getOppositeAlignmentPlacement(et)] + } + function getOppositeAlignmentPlacement(tt) { + return tt.replace(/start|end/g, (et) => oppositeAlignmentMap[et]) + } + function getSideList(tt, et, nt) { + const rt = ['left', 'right'], + it = ['right', 'left'], + ot = ['top', 'bottom'], + at = ['bottom', 'top'] + switch (tt) { + case 'top': + case 'bottom': + return nt ? (et ? it : rt) : et ? rt : it + case 'left': + case 'right': + return et ? ot : at + default: + return [] + } + } + function getOppositeAxisPlacements(tt, et, nt, rt) { + const it = getAlignment(tt) + let ot = getSideList(getSide(tt), nt === 'start', rt) + return ( + it && ((ot = ot.map((at) => at + '-' + it)), et && (ot = ot.concat(ot.map(getOppositeAlignmentPlacement)))), ot + ) + } + function getOppositePlacement$1(tt) { + return tt.replace(/left|right|bottom|top/g, (et) => oppositeSideMap[et]) + } + function expandPaddingObject(tt) { + return { top: 0, right: 0, bottom: 0, left: 0, ...tt } + } + function getPaddingObject(tt) { + return typeof tt != 'number' ? expandPaddingObject(tt) : { top: tt, right: tt, bottom: tt, left: tt } + } + function rectToClientRect$1(tt) { + return { ...tt, top: tt.y, left: tt.x, right: tt.x + tt.width, bottom: tt.y + tt.height } + } + function computeCoordsFromPlacement(tt, et, nt) { + let { reference: rt, floating: it } = tt + const ot = getSideAxis(et), + at = getAlignmentAxis(et), + st = getAxisLength(at), + lt = getSide(et), + ct = ot === 'y', + ut = rt.x + rt.width / 2 - it.width / 2, + ht = rt.y + rt.height / 2 - it.height / 2, + dt = rt[st] / 2 - it[st] / 2 + let pt + switch (lt) { + case 'top': + pt = { x: ut, y: rt.y - it.height } + break + case 'bottom': + pt = { x: ut, y: rt.y + rt.height } + break + case 'right': + pt = { x: rt.x + rt.width, y: ht } + break + case 'left': + pt = { x: rt.x - it.width, y: ht } + break + default: + pt = { x: rt.x, y: rt.y } + } + switch (getAlignment(et)) { + case 'start': + pt[at] -= dt * (nt && ct ? -1 : 1) + break + case 'end': + pt[at] += dt * (nt && ct ? -1 : 1) + break + } + return pt + } + const computePosition$1 = async (tt, et, nt) => { + const { placement: rt = 'bottom', strategy: it = 'absolute', middleware: ot = [], platform: at } = nt, + st = ot.filter(Boolean), + lt = await (at.isRTL == null ? void 0 : at.isRTL(et)) + let ct = await at.getElementRects({ reference: tt, floating: et, strategy: it }), + { x: ut, y: ht } = computeCoordsFromPlacement(ct, rt, lt), + dt = rt, + pt = {}, + mt = 0 + for (let gt = 0; gt < st.length; gt++) { + const { name: yt, fn: bt } = st[gt], + { + x: vt, + y: xt, + data: kt, + reset: St, + } = await bt({ + x: ut, + y: ht, + initialPlacement: rt, + placement: dt, + strategy: it, + middlewareData: pt, + rects: ct, + platform: at, + elements: { reference: tt, floating: et }, + }) + if (((ut = vt ?? ut), (ht = xt ?? ht), (pt = { ...pt, [yt]: { ...pt[yt], ...kt } }), St && mt <= 50)) { + mt++, + typeof St == 'object' && + (St.placement && (dt = St.placement), + St.rects && + (ct = + St.rects === !0 ? await at.getElementRects({ reference: tt, floating: et, strategy: it }) : St.rects), + ({ x: ut, y: ht } = computeCoordsFromPlacement(ct, dt, lt))), + (gt = -1) + continue + } + } + return { x: ut, y: ht, placement: dt, strategy: it, middlewareData: pt } + } + async function detectOverflow$1(tt, et) { + var nt + et === void 0 && (et = {}) + const { x: rt, y: it, platform: ot, rects: at, elements: st, strategy: lt } = tt, + { + boundary: ct = 'clippingAncestors', + rootBoundary: ut = 'viewport', + elementContext: ht = 'floating', + altBoundary: dt = !1, + padding: pt = 0, + } = evaluate$1(et, tt), + mt = getPaddingObject(pt), + yt = st[dt ? (ht === 'floating' ? 'reference' : 'floating') : ht], + bt = rectToClientRect$1( + await ot.getClippingRect({ + element: + (nt = await (ot.isElement == null ? void 0 : ot.isElement(yt))) == null || nt + ? yt + : yt.contextElement || + (await (ot.getDocumentElement == null ? void 0 : ot.getDocumentElement(st.floating))), + boundary: ct, + rootBoundary: ut, + strategy: lt, + }), + ), + vt = ht === 'floating' ? { ...at.floating, x: rt, y: it } : at.reference, + xt = await (ot.getOffsetParent == null ? void 0 : ot.getOffsetParent(st.floating)), + kt = (await (ot.isElement == null ? void 0 : ot.isElement(xt))) + ? (await (ot.getScale == null ? void 0 : ot.getScale(xt))) || { x: 1, y: 1 } + : { x: 1, y: 1 }, + St = rectToClientRect$1( + ot.convertOffsetParentRelativeRectToViewportRelativeRect + ? await ot.convertOffsetParentRelativeRectToViewportRelativeRect({ rect: vt, offsetParent: xt, strategy: lt }) + : vt, + ) + return { + top: (bt.top - St.top + mt.top) / kt.y, + bottom: (St.bottom - bt.bottom + mt.bottom) / kt.y, + left: (bt.left - St.left + mt.left) / kt.x, + right: (St.right - bt.right + mt.right) / kt.x, + } + } + const arrow$3 = (tt) => ({ + name: 'arrow', + options: tt, + async fn(et) { + const { x: nt, y: rt, placement: it, rects: ot, platform: at, elements: st, middlewareData: lt } = et, + { element: ct, padding: ut = 0 } = evaluate$1(tt, et) || {} + if (ct == null) return {} + const ht = getPaddingObject(ut), + dt = { x: nt, y: rt }, + pt = getAlignmentAxis(it), + mt = getAxisLength(pt), + gt = await at.getDimensions(ct), + yt = pt === 'y', + bt = yt ? 'top' : 'left', + vt = yt ? 'bottom' : 'right', + xt = yt ? 'clientHeight' : 'clientWidth', + kt = ot.reference[mt] + ot.reference[pt] - dt[pt] - ot.floating[mt], + St = dt[pt] - ot.reference[pt], + Tt = await (at.getOffsetParent == null ? void 0 : at.getOffsetParent(ct)) + let At = Tt ? Tt[xt] : 0 + ;(!At || !(await (at.isElement == null ? void 0 : at.isElement(Tt)))) && + (At = st.floating[xt] || ot.floating[mt]) + const Et = kt / 2 - St / 2, + $t = At / 2 - gt[mt] / 2 - 1, + Dt = min$4(ht[bt], $t), + jt = min$4(ht[vt], $t), + Pt = Dt, + Ct = At - gt[mt] - jt, + wt = At / 2 - gt[mt] / 2 + Et, + It = clamp$9(Pt, wt, Ct), + Ot = + !lt.arrow && + getAlignment(it) != null && + wt != It && + ot.reference[mt] / 2 - (wt < Pt ? Dt : jt) - gt[mt] / 2 < 0, + Wt = Ot ? (wt < Pt ? wt - Pt : wt - Ct) : 0 + return { + [pt]: dt[pt] + Wt, + data: { [pt]: It, centerOffset: wt - It - Wt, ...(Ot && { alignmentOffset: Wt }) }, + reset: Ot, + } + }, + }), + flip$2 = function (tt) { + return ( + tt === void 0 && (tt = {}), + { + name: 'flip', + options: tt, + async fn(et) { + var nt, rt + const { + placement: it, + middlewareData: ot, + rects: at, + initialPlacement: st, + platform: lt, + elements: ct, + } = et, + { + mainAxis: ut = !0, + crossAxis: ht = !0, + fallbackPlacements: dt, + fallbackStrategy: pt = 'bestFit', + fallbackAxisSideDirection: mt = 'none', + flipAlignment: gt = !0, + ...yt + } = evaluate$1(tt, et) + if ((nt = ot.arrow) != null && nt.alignmentOffset) return {} + const bt = getSide(it), + vt = getSide(st) === st, + xt = await (lt.isRTL == null ? void 0 : lt.isRTL(ct.floating)), + kt = dt || (vt || !gt ? [getOppositePlacement$1(st)] : getExpandedPlacements(st)) + !dt && mt !== 'none' && kt.push(...getOppositeAxisPlacements(st, gt, mt, xt)) + const St = [st, ...kt], + Tt = await detectOverflow$1(et, yt), + At = [] + let Et = ((rt = ot.flip) == null ? void 0 : rt.overflows) || [] + if ((ut && At.push(Tt[bt]), ht)) { + const Pt = getAlignmentSides(it, at, xt) + At.push(Tt[Pt[0]], Tt[Pt[1]]) + } + if (((Et = [...Et, { placement: it, overflows: At }]), !At.every((Pt) => Pt <= 0))) { + var $t, Dt + const Pt = ((($t = ot.flip) == null ? void 0 : $t.index) || 0) + 1, + Ct = St[Pt] + if (Ct) return { data: { index: Pt, overflows: Et }, reset: { placement: Ct } } + let wt = + (Dt = Et.filter((It) => It.overflows[0] <= 0).sort((It, Ot) => It.overflows[1] - Ot.overflows[1])[0]) == + null + ? void 0 + : Dt.placement + if (!wt) + switch (pt) { + case 'bestFit': { + var jt + const It = + (jt = Et.map((Ot) => [ + Ot.placement, + Ot.overflows.filter((Wt) => Wt > 0).reduce((Wt, zt) => Wt + zt, 0), + ]).sort((Ot, Wt) => Ot[1] - Wt[1])[0]) == null + ? void 0 + : jt[0] + It && (wt = It) + break + } + case 'initialPlacement': + wt = st + break + } + if (it !== wt) return { reset: { placement: wt } } + } + return {} + }, + } + ) + } + function getSideOffsets$1(tt, et) { + return { + top: tt.top - et.height, + right: tt.right - et.width, + bottom: tt.bottom - et.height, + left: tt.left - et.width, + } + } + function isAnySideFullyClipped$1(tt) { + return sides.some((et) => tt[et] >= 0) + } + const hide$2 = function (tt) { + return ( + tt === void 0 && (tt = {}), + { + name: 'hide', + options: tt, + async fn(et) { + const { rects: nt } = et, + { strategy: rt = 'referenceHidden', ...it } = evaluate$1(tt, et) + switch (rt) { + case 'referenceHidden': { + const ot = await detectOverflow$1(et, { ...it, elementContext: 'reference' }), + at = getSideOffsets$1(ot, nt.reference) + return { data: { referenceHiddenOffsets: at, referenceHidden: isAnySideFullyClipped$1(at) } } + } + case 'escaped': { + const ot = await detectOverflow$1(et, { ...it, altBoundary: !0 }), + at = getSideOffsets$1(ot, nt.floating) + return { data: { escapedOffsets: at, escaped: isAnySideFullyClipped$1(at) } } + } + default: + return {} + } + }, + } + ) + } + async function convertValueToCoords(tt, et) { + const { placement: nt, platform: rt, elements: it } = tt, + ot = await (rt.isRTL == null ? void 0 : rt.isRTL(it.floating)), + at = getSide(nt), + st = getAlignment(nt), + lt = getSideAxis(nt) === 'y', + ct = ['left', 'top'].includes(at) ? -1 : 1, + ut = ot && lt ? -1 : 1, + ht = evaluate$1(et, tt) + let { + mainAxis: dt, + crossAxis: pt, + alignmentAxis: mt, + } = typeof ht == 'number' + ? { mainAxis: ht, crossAxis: 0, alignmentAxis: null } + : { mainAxis: 0, crossAxis: 0, alignmentAxis: null, ...ht } + return ( + st && typeof mt == 'number' && (pt = st === 'end' ? mt * -1 : mt), + lt ? { x: pt * ut, y: dt * ct } : { x: dt * ct, y: pt * ut } + ) + } + const offset$3 = function (tt) { + return ( + tt === void 0 && (tt = 0), + { + name: 'offset', + options: tt, + async fn(et) { + const { x: nt, y: rt } = et, + it = await convertValueToCoords(et, tt) + return { x: nt + it.x, y: rt + it.y, data: it } + }, + } + ) + }, + shift = function (tt) { + return ( + tt === void 0 && (tt = {}), + { + name: 'shift', + options: tt, + async fn(et) { + const { x: nt, y: rt, placement: it } = et, + { + mainAxis: ot = !0, + crossAxis: at = !1, + limiter: st = { + fn: (yt) => { + let { x: bt, y: vt } = yt + return { x: bt, y: vt } + }, + }, + ...lt + } = evaluate$1(tt, et), + ct = { x: nt, y: rt }, + ut = await detectOverflow$1(et, lt), + ht = getSideAxis(getSide(it)), + dt = getOppositeAxis(ht) + let pt = ct[dt], + mt = ct[ht] + if (ot) { + const yt = dt === 'y' ? 'top' : 'left', + bt = dt === 'y' ? 'bottom' : 'right', + vt = pt + ut[yt], + xt = pt - ut[bt] + pt = clamp$9(vt, pt, xt) + } + if (at) { + const yt = ht === 'y' ? 'top' : 'left', + bt = ht === 'y' ? 'bottom' : 'right', + vt = mt + ut[yt], + xt = mt - ut[bt] + mt = clamp$9(vt, mt, xt) + } + const gt = st.fn({ ...et, [dt]: pt, [ht]: mt }) + return { ...gt, data: { x: gt.x - nt, y: gt.y - rt } } + }, + } + ) + }, + limitShift = function (tt) { + return ( + tt === void 0 && (tt = {}), + { + options: tt, + fn(et) { + const { x: nt, y: rt, placement: it, rects: ot, middlewareData: at } = et, + { offset: st = 0, mainAxis: lt = !0, crossAxis: ct = !0 } = evaluate$1(tt, et), + ut = { x: nt, y: rt }, + ht = getSideAxis(it), + dt = getOppositeAxis(ht) + let pt = ut[dt], + mt = ut[ht] + const gt = evaluate$1(st, et), + yt = typeof gt == 'number' ? { mainAxis: gt, crossAxis: 0 } : { mainAxis: 0, crossAxis: 0, ...gt } + if (lt) { + const xt = dt === 'y' ? 'height' : 'width', + kt = ot.reference[dt] - ot.floating[xt] + yt.mainAxis, + St = ot.reference[dt] + ot.reference[xt] - yt.mainAxis + pt < kt ? (pt = kt) : pt > St && (pt = St) + } + if (ct) { + var bt, vt + const xt = dt === 'y' ? 'width' : 'height', + kt = ['top', 'left'].includes(getSide(it)), + St = + ot.reference[ht] - + ot.floating[xt] + + ((kt && ((bt = at.offset) == null ? void 0 : bt[ht])) || 0) + + (kt ? 0 : yt.crossAxis), + Tt = + ot.reference[ht] + + ot.reference[xt] + + (kt ? 0 : ((vt = at.offset) == null ? void 0 : vt[ht]) || 0) - + (kt ? yt.crossAxis : 0) + mt < St ? (mt = St) : mt > Tt && (mt = Tt) + } + return { [dt]: pt, [ht]: mt } + }, + } + ) + }, + size = function (tt) { + return ( + tt === void 0 && (tt = {}), + { + name: 'size', + options: tt, + async fn(et) { + const { placement: nt, rects: rt, platform: it, elements: ot } = et, + { apply: at = () => {}, ...st } = evaluate$1(tt, et), + lt = await detectOverflow$1(et, st), + ct = getSide(nt), + ut = getAlignment(nt), + ht = getSideAxis(nt) === 'y', + { width: dt, height: pt } = rt.floating + let mt, gt + ct === 'top' || ct === 'bottom' + ? ((mt = ct), + (gt = + ut === ((await (it.isRTL == null ? void 0 : it.isRTL(ot.floating))) ? 'start' : 'end') + ? 'left' + : 'right')) + : ((gt = ct), (mt = ut === 'end' ? 'top' : 'bottom')) + const yt = pt - lt[mt], + bt = dt - lt[gt], + vt = !et.middlewareData.shift + let xt = yt, + kt = bt + if (ht) { + const Tt = dt - lt.left - lt.right + kt = ut || vt ? min$4(bt, Tt) : Tt + } else { + const Tt = pt - lt.top - lt.bottom + xt = ut || vt ? min$4(yt, Tt) : Tt + } + if (vt && !ut) { + const Tt = max$5(lt.left, 0), + At = max$5(lt.right, 0), + Et = max$5(lt.top, 0), + $t = max$5(lt.bottom, 0) + ht + ? (kt = dt - 2 * (Tt !== 0 || At !== 0 ? Tt + At : max$5(lt.left, lt.right))) + : (xt = pt - 2 * (Et !== 0 || $t !== 0 ? Et + $t : max$5(lt.top, lt.bottom))) + } + await at({ ...et, availableWidth: kt, availableHeight: xt }) + const St = await it.getDimensions(ot.floating) + return dt !== St.width || pt !== St.height ? { reset: { rects: !0 } } : {} + }, + } + ) + } + function getNodeName$1(tt) { + return isNode(tt) ? (tt.nodeName || '').toLowerCase() : '#document' + } + function getWindow$1(tt) { + var et + return (tt == null || (et = tt.ownerDocument) == null ? void 0 : et.defaultView) || window + } + function getDocumentElement$1(tt) { + var et + return (et = (isNode(tt) ? tt.ownerDocument : tt.document) || window.document) == null ? void 0 : et.documentElement + } + function isNode(tt) { + return tt instanceof Node || tt instanceof getWindow$1(tt).Node + } + function isElement$1(tt) { + return tt instanceof Element || tt instanceof getWindow$1(tt).Element + } + function isHTMLElement$3(tt) { + return tt instanceof HTMLElement || tt instanceof getWindow$1(tt).HTMLElement + } + function isShadowRoot$1(tt) { + return typeof ShadowRoot > 'u' ? !1 : tt instanceof ShadowRoot || tt instanceof getWindow$1(tt).ShadowRoot + } + function isOverflowElement(tt) { + const { overflow: et, overflowX: nt, overflowY: rt, display: it } = getComputedStyle$2(tt) + return /auto|scroll|overlay|hidden|clip/.test(et + rt + nt) && !['inline', 'contents'].includes(it) + } + function isTableElement$1(tt) { + return ['table', 'td', 'th'].includes(getNodeName$1(tt)) + } + function isContainingBlock(tt) { + const et = isWebKit(), + nt = getComputedStyle$2(tt) + return ( + nt.transform !== 'none' || + nt.perspective !== 'none' || + (nt.containerType ? nt.containerType !== 'normal' : !1) || + (!et && (nt.backdropFilter ? nt.backdropFilter !== 'none' : !1)) || + (!et && (nt.filter ? nt.filter !== 'none' : !1)) || + ['transform', 'perspective', 'filter'].some((rt) => (nt.willChange || '').includes(rt)) || + ['paint', 'layout', 'strict', 'content'].some((rt) => (nt.contain || '').includes(rt)) + ) + } + function getContainingBlock$1(tt) { + let et = getParentNode$1(tt) + for (; isHTMLElement$3(et) && !isLastTraversableNode(et); ) { + if (isContainingBlock(et)) return et + et = getParentNode$1(et) + } + return null + } + function isWebKit() { + return typeof CSS > 'u' || !CSS.supports ? !1 : CSS.supports('-webkit-backdrop-filter', 'none') + } + function isLastTraversableNode(tt) { + return ['html', 'body', '#document'].includes(getNodeName$1(tt)) + } + function getComputedStyle$2(tt) { + return getWindow$1(tt).getComputedStyle(tt) + } + function getNodeScroll$1(tt) { + return isElement$1(tt) + ? { scrollLeft: tt.scrollLeft, scrollTop: tt.scrollTop } + : { scrollLeft: tt.pageXOffset, scrollTop: tt.pageYOffset } + } + function getParentNode$1(tt) { + if (getNodeName$1(tt) === 'html') return tt + const et = tt.assignedSlot || tt.parentNode || (isShadowRoot$1(tt) && tt.host) || getDocumentElement$1(tt) + return isShadowRoot$1(et) ? et.host : et + } + function getNearestOverflowAncestor(tt) { + const et = getParentNode$1(tt) + return isLastTraversableNode(et) + ? tt.ownerDocument + ? tt.ownerDocument.body + : tt.body + : isHTMLElement$3(et) && isOverflowElement(et) + ? et + : getNearestOverflowAncestor(et) + } + function getOverflowAncestors(tt, et, nt) { + var rt + et === void 0 && (et = []), nt === void 0 && (nt = !0) + const it = getNearestOverflowAncestor(tt), + ot = it === ((rt = tt.ownerDocument) == null ? void 0 : rt.body), + at = getWindow$1(it) + return ot + ? et.concat( + at, + at.visualViewport || [], + isOverflowElement(it) ? it : [], + at.frameElement && nt ? getOverflowAncestors(at.frameElement) : [], + ) + : et.concat(it, getOverflowAncestors(it, [], nt)) + } + function getCssDimensions(tt) { + const et = getComputedStyle$2(tt) + let nt = parseFloat(et.width) || 0, + rt = parseFloat(et.height) || 0 + const it = isHTMLElement$3(tt), + ot = it ? tt.offsetWidth : nt, + at = it ? tt.offsetHeight : rt, + st = round$4(nt) !== ot || round$4(rt) !== at + return st && ((nt = ot), (rt = at)), { width: nt, height: rt, $: st } + } + function unwrapElement(tt) { + return isElement$1(tt) ? tt : tt.contextElement + } + function getScale$1(tt) { + const et = unwrapElement(tt) + if (!isHTMLElement$3(et)) return createCoords(1) + const nt = et.getBoundingClientRect(), + { width: rt, height: it, $: ot } = getCssDimensions(et) + let at = (ot ? round$4(nt.width) : nt.width) / rt, + st = (ot ? round$4(nt.height) : nt.height) / it + return (!at || !Number.isFinite(at)) && (at = 1), (!st || !Number.isFinite(st)) && (st = 1), { x: at, y: st } + } + const noOffsets = createCoords(0) + function getVisualOffsets(tt) { + const et = getWindow$1(tt) + return !isWebKit() || !et.visualViewport + ? noOffsets + : { x: et.visualViewport.offsetLeft, y: et.visualViewport.offsetTop } + } + function shouldAddVisualOffsets(tt, et, nt) { + return et === void 0 && (et = !1), !nt || (et && nt !== getWindow$1(tt)) ? !1 : et + } + function getBoundingClientRect$1(tt, et, nt, rt) { + et === void 0 && (et = !1), nt === void 0 && (nt = !1) + const it = tt.getBoundingClientRect(), + ot = unwrapElement(tt) + let at = createCoords(1) + et && (rt ? isElement$1(rt) && (at = getScale$1(rt)) : (at = getScale$1(tt))) + const st = shouldAddVisualOffsets(ot, nt, rt) ? getVisualOffsets(ot) : createCoords(0) + let lt = (it.left + st.x) / at.x, + ct = (it.top + st.y) / at.y, + ut = it.width / at.x, + ht = it.height / at.y + if (ot) { + const dt = getWindow$1(ot), + pt = rt && isElement$1(rt) ? getWindow$1(rt) : rt + let mt = dt.frameElement + for (; mt && rt && pt !== dt; ) { + const gt = getScale$1(mt), + yt = mt.getBoundingClientRect(), + bt = getComputedStyle$2(mt), + vt = yt.left + (mt.clientLeft + parseFloat(bt.paddingLeft)) * gt.x, + xt = yt.top + (mt.clientTop + parseFloat(bt.paddingTop)) * gt.y + ;(lt *= gt.x), + (ct *= gt.y), + (ut *= gt.x), + (ht *= gt.y), + (lt += vt), + (ct += xt), + (mt = getWindow$1(mt).frameElement) + } + } + return rectToClientRect$1({ width: ut, height: ht, x: lt, y: ct }) + } + function convertOffsetParentRelativeRectToViewportRelativeRect(tt) { + let { rect: et, offsetParent: nt, strategy: rt } = tt + const it = isHTMLElement$3(nt), + ot = getDocumentElement$1(nt) + if (nt === ot) return et + let at = { scrollLeft: 0, scrollTop: 0 }, + st = createCoords(1) + const lt = createCoords(0) + if ( + (it || (!it && rt !== 'fixed')) && + ((getNodeName$1(nt) !== 'body' || isOverflowElement(ot)) && (at = getNodeScroll$1(nt)), isHTMLElement$3(nt)) + ) { + const ct = getBoundingClientRect$1(nt) + ;(st = getScale$1(nt)), (lt.x = ct.x + nt.clientLeft), (lt.y = ct.y + nt.clientTop) + } + return { + width: et.width * st.x, + height: et.height * st.y, + x: et.x * st.x - at.scrollLeft * st.x + lt.x, + y: et.y * st.y - at.scrollTop * st.y + lt.y, + } + } + function getClientRects(tt) { + return Array.from(tt.getClientRects()) + } + function getWindowScrollBarX$1(tt) { + return getBoundingClientRect$1(getDocumentElement$1(tt)).left + getNodeScroll$1(tt).scrollLeft + } + function getDocumentRect$1(tt) { + const et = getDocumentElement$1(tt), + nt = getNodeScroll$1(tt), + rt = tt.ownerDocument.body, + it = max$5(et.scrollWidth, et.clientWidth, rt.scrollWidth, rt.clientWidth), + ot = max$5(et.scrollHeight, et.clientHeight, rt.scrollHeight, rt.clientHeight) + let at = -nt.scrollLeft + getWindowScrollBarX$1(tt) + const st = -nt.scrollTop + return ( + getComputedStyle$2(rt).direction === 'rtl' && (at += max$5(et.clientWidth, rt.clientWidth) - it), + { width: it, height: ot, x: at, y: st } + ) + } + function getViewportRect$1(tt, et) { + const nt = getWindow$1(tt), + rt = getDocumentElement$1(tt), + it = nt.visualViewport + let ot = rt.clientWidth, + at = rt.clientHeight, + st = 0, + lt = 0 + if (it) { + ;(ot = it.width), (at = it.height) + const ct = isWebKit() + ;(!ct || (ct && et === 'fixed')) && ((st = it.offsetLeft), (lt = it.offsetTop)) + } + return { width: ot, height: at, x: st, y: lt } + } + function getInnerBoundingClientRect$1(tt, et) { + const nt = getBoundingClientRect$1(tt, !0, et === 'fixed'), + rt = nt.top + tt.clientTop, + it = nt.left + tt.clientLeft, + ot = isHTMLElement$3(tt) ? getScale$1(tt) : createCoords(1), + at = tt.clientWidth * ot.x, + st = tt.clientHeight * ot.y, + lt = it * ot.x, + ct = rt * ot.y + return { width: at, height: st, x: lt, y: ct } + } + function getClientRectFromClippingAncestor(tt, et, nt) { + let rt + if (et === 'viewport') rt = getViewportRect$1(tt, nt) + else if (et === 'document') rt = getDocumentRect$1(getDocumentElement$1(tt)) + else if (isElement$1(et)) rt = getInnerBoundingClientRect$1(et, nt) + else { + const it = getVisualOffsets(tt) + rt = { ...et, x: et.x - it.x, y: et.y - it.y } + } + return rectToClientRect$1(rt) + } + function hasFixedPositionAncestor(tt, et) { + const nt = getParentNode$1(tt) + return nt === et || !isElement$1(nt) || isLastTraversableNode(nt) + ? !1 + : getComputedStyle$2(nt).position === 'fixed' || hasFixedPositionAncestor(nt, et) + } + function getClippingElementAncestors(tt, et) { + const nt = et.get(tt) + if (nt) return nt + let rt = getOverflowAncestors(tt, [], !1).filter((st) => isElement$1(st) && getNodeName$1(st) !== 'body'), + it = null + const ot = getComputedStyle$2(tt).position === 'fixed' + let at = ot ? getParentNode$1(tt) : tt + for (; isElement$1(at) && !isLastTraversableNode(at); ) { + const st = getComputedStyle$2(at), + lt = isContainingBlock(at) + !lt && st.position === 'fixed' && (it = null), + ( + ot + ? !lt && !it + : (!lt && st.position === 'static' && !!it && ['absolute', 'fixed'].includes(it.position)) || + (isOverflowElement(at) && !lt && hasFixedPositionAncestor(tt, at)) + ) + ? (rt = rt.filter((ut) => ut !== at)) + : (it = st), + (at = getParentNode$1(at)) + } + return et.set(tt, rt), rt + } + function getClippingRect$1(tt) { + let { element: et, boundary: nt, rootBoundary: rt, strategy: it } = tt + const at = [...(nt === 'clippingAncestors' ? getClippingElementAncestors(et, this._c) : [].concat(nt)), rt], + st = at[0], + lt = at.reduce((ct, ut) => { + const ht = getClientRectFromClippingAncestor(et, ut, it) + return ( + (ct.top = max$5(ht.top, ct.top)), + (ct.right = min$4(ht.right, ct.right)), + (ct.bottom = min$4(ht.bottom, ct.bottom)), + (ct.left = max$5(ht.left, ct.left)), + ct + ) + }, getClientRectFromClippingAncestor(et, st, it)) + return { width: lt.right - lt.left, height: lt.bottom - lt.top, x: lt.left, y: lt.top } + } + function getDimensions$1(tt) { + return getCssDimensions(tt) + } + function getRectRelativeToOffsetParent(tt, et, nt) { + const rt = isHTMLElement$3(et), + it = getDocumentElement$1(et), + ot = nt === 'fixed', + at = getBoundingClientRect$1(tt, !0, ot, et) + let st = { scrollLeft: 0, scrollTop: 0 } + const lt = createCoords(0) + if (rt || (!rt && !ot)) + if (((getNodeName$1(et) !== 'body' || isOverflowElement(it)) && (st = getNodeScroll$1(et)), rt)) { + const ct = getBoundingClientRect$1(et, !0, ot, et) + ;(lt.x = ct.x + et.clientLeft), (lt.y = ct.y + et.clientTop) + } else it && (lt.x = getWindowScrollBarX$1(it)) + return { x: at.left + st.scrollLeft - lt.x, y: at.top + st.scrollTop - lt.y, width: at.width, height: at.height } + } + function getTrueOffsetParent$1(tt, et) { + return !isHTMLElement$3(tt) || getComputedStyle$2(tt).position === 'fixed' ? null : et ? et(tt) : tt.offsetParent + } + function getOffsetParent$1(tt, et) { + const nt = getWindow$1(tt) + if (!isHTMLElement$3(tt)) return nt + let rt = getTrueOffsetParent$1(tt, et) + for (; rt && isTableElement$1(rt) && getComputedStyle$2(rt).position === 'static'; ) + rt = getTrueOffsetParent$1(rt, et) + return rt && + (getNodeName$1(rt) === 'html' || + (getNodeName$1(rt) === 'body' && getComputedStyle$2(rt).position === 'static' && !isContainingBlock(rt))) + ? nt + : rt || getContainingBlock$1(tt) || nt + } + const getElementRects = async function (tt) { + let { reference: et, floating: nt, strategy: rt } = tt + const it = this.getOffsetParent || getOffsetParent$1, + ot = this.getDimensions + return { + reference: getRectRelativeToOffsetParent(et, await it(nt), rt), + floating: { x: 0, y: 0, ...(await ot(nt)) }, + } + } + function isRTL(tt) { + return getComputedStyle$2(tt).direction === 'rtl' + } + const platform = { + convertOffsetParentRelativeRectToViewportRelativeRect, + getDocumentElement: getDocumentElement$1, + getClippingRect: getClippingRect$1, + getOffsetParent: getOffsetParent$1, + getElementRects, + getClientRects, + getDimensions: getDimensions$1, + getScale: getScale$1, + isElement: isElement$1, + isRTL, + } + function observeMove(tt, et) { + let nt = null, + rt + const it = getDocumentElement$1(tt) + function ot() { + clearTimeout(rt), nt && nt.disconnect(), (nt = null) + } + function at(st, lt) { + st === void 0 && (st = !1), lt === void 0 && (lt = 1), ot() + const { left: ct, top: ut, width: ht, height: dt } = tt.getBoundingClientRect() + if ((st || et(), !ht || !dt)) return + const pt = floor(ut), + mt = floor(it.clientWidth - (ct + ht)), + gt = floor(it.clientHeight - (ut + dt)), + yt = floor(ct), + vt = { + rootMargin: -pt + 'px ' + -mt + 'px ' + -gt + 'px ' + -yt + 'px', + threshold: max$5(0, min$4(1, lt)) || 1, + } + let xt = !0 + function kt(St) { + const Tt = St[0].intersectionRatio + if (Tt !== lt) { + if (!xt) return at() + Tt + ? at(!1, Tt) + : (rt = setTimeout(() => { + at(!1, 1e-7) + }, 100)) + } + xt = !1 + } + try { + nt = new IntersectionObserver(kt, { ...vt, root: it.ownerDocument }) + } catch { + nt = new IntersectionObserver(kt, vt) + } + nt.observe(tt) + } + return at(!0), ot + } + function autoUpdate(tt, et, nt, rt) { + rt === void 0 && (rt = {}) + const { + ancestorScroll: it = !0, + ancestorResize: ot = !0, + elementResize: at = typeof ResizeObserver == 'function', + layoutShift: st = typeof IntersectionObserver == 'function', + animationFrame: lt = !1, + } = rt, + ct = unwrapElement(tt), + ut = it || ot ? [...(ct ? getOverflowAncestors(ct) : []), ...getOverflowAncestors(et)] : [] + ut.forEach((bt) => { + it && bt.addEventListener('scroll', nt, { passive: !0 }), ot && bt.addEventListener('resize', nt) + }) + const ht = ct && st ? observeMove(ct, nt) : null + let dt = -1, + pt = null + at && + ((pt = new ResizeObserver((bt) => { + let [vt] = bt + vt && + vt.target === ct && + pt && + (pt.unobserve(et), + cancelAnimationFrame(dt), + (dt = requestAnimationFrame(() => { + pt && pt.observe(et) + }))), + nt() + })), + ct && !lt && pt.observe(ct), + pt.observe(et)) + let mt, + gt = lt ? getBoundingClientRect$1(tt) : null + lt && yt() + function yt() { + const bt = getBoundingClientRect$1(tt) + gt && (bt.x !== gt.x || bt.y !== gt.y || bt.width !== gt.width || bt.height !== gt.height) && nt(), + (gt = bt), + (mt = requestAnimationFrame(yt)) + } + return ( + nt(), + () => { + ut.forEach((bt) => { + it && bt.removeEventListener('scroll', nt), ot && bt.removeEventListener('resize', nt) + }), + ht && ht(), + pt && pt.disconnect(), + (pt = null), + lt && cancelAnimationFrame(mt) + } + ) + } + const computePosition = (tt, et, nt) => { + const rt = new Map(), + it = { platform, ...nt }, + ot = { ...it.platform, _c: rt } + return computePosition$1(tt, et, { ...it, platform: ot }) + }, + arrow$2 = (tt) => { + function et(nt) { + return {}.hasOwnProperty.call(nt, 'current') + } + return { + name: 'arrow', + options: tt, + fn(nt) { + const { element: rt, padding: it } = typeof tt == 'function' ? tt(nt) : tt + return rt && et(rt) + ? rt.current != null + ? arrow$3({ element: rt.current, padding: it }).fn(nt) + : {} + : rt + ? arrow$3({ element: rt, padding: it }).fn(nt) + : {} + }, + } + } + var index$2 = typeof document < 'u' ? reactExports.useLayoutEffect : reactExports.useEffect + function deepEqual$3(tt, et) { + if (tt === et) return !0 + if (typeof tt != typeof et) return !1 + if (typeof tt == 'function' && tt.toString() === et.toString()) return !0 + let nt, rt, it + if (tt && et && typeof tt == 'object') { + if (Array.isArray(tt)) { + if (((nt = tt.length), nt != et.length)) return !1 + for (rt = nt; rt-- !== 0; ) if (!deepEqual$3(tt[rt], et[rt])) return !1 + return !0 + } + if (((it = Object.keys(tt)), (nt = it.length), nt !== Object.keys(et).length)) return !1 + for (rt = nt; rt-- !== 0; ) if (!{}.hasOwnProperty.call(et, it[rt])) return !1 + for (rt = nt; rt-- !== 0; ) { + const ot = it[rt] + if (!(ot === '_owner' && tt.$$typeof) && !deepEqual$3(tt[ot], et[ot])) return !1 + } + return !0 + } + return tt !== tt && et !== et + } + function getDPR(tt) { + return typeof window > 'u' ? 1 : (tt.ownerDocument.defaultView || window).devicePixelRatio || 1 + } + function roundByDPR(tt, et) { + const nt = getDPR(tt) + return Math.round(et * nt) / nt + } + function useLatestRef(tt) { + const et = reactExports.useRef(tt) + return ( + index$2(() => { + et.current = tt + }), + et + ) + } + function useFloating(tt) { + tt === void 0 && (tt = {}) + const { + placement: et = 'bottom', + strategy: nt = 'absolute', + middleware: rt = [], + platform: it, + elements: { reference: ot, floating: at } = {}, + transform: st = !0, + whileElementsMounted: lt, + open: ct, + } = tt, + [ut, ht] = reactExports.useState({ + x: 0, + y: 0, + strategy: nt, + placement: et, + middlewareData: {}, + isPositioned: !1, + }), + [dt, pt] = reactExports.useState(rt) + deepEqual$3(dt, rt) || pt(rt) + const [mt, gt] = reactExports.useState(null), + [yt, bt] = reactExports.useState(null), + vt = reactExports.useCallback( + (Ot) => { + Ot != Tt.current && ((Tt.current = Ot), gt(Ot)) + }, + [gt], + ), + xt = reactExports.useCallback( + (Ot) => { + Ot !== At.current && ((At.current = Ot), bt(Ot)) + }, + [bt], + ), + kt = ot || mt, + St = at || yt, + Tt = reactExports.useRef(null), + At = reactExports.useRef(null), + Et = reactExports.useRef(ut), + $t = useLatestRef(lt), + Dt = useLatestRef(it), + jt = reactExports.useCallback(() => { + if (!Tt.current || !At.current) return + const Ot = { placement: et, strategy: nt, middleware: dt } + Dt.current && (Ot.platform = Dt.current), + computePosition(Tt.current, At.current, Ot).then((Wt) => { + const zt = { ...Wt, isPositioned: !0 } + Pt.current && + !deepEqual$3(Et.current, zt) && + ((Et.current = zt), + reactDomExports.flushSync(() => { + ht(zt) + })) + }) + }, [dt, et, nt, Dt]) + index$2(() => { + ct === !1 && + Et.current.isPositioned && + ((Et.current.isPositioned = !1), ht((Ot) => ({ ...Ot, isPositioned: !1 }))) + }, [ct]) + const Pt = reactExports.useRef(!1) + index$2( + () => ( + (Pt.current = !0), + () => { + Pt.current = !1 + } + ), + [], + ), + index$2(() => { + if ((kt && (Tt.current = kt), St && (At.current = St), kt && St)) { + if ($t.current) return $t.current(kt, St, jt) + jt() + } + }, [kt, St, jt, $t]) + const Ct = reactExports.useMemo( + () => ({ reference: Tt, floating: At, setReference: vt, setFloating: xt }), + [vt, xt], + ), + wt = reactExports.useMemo(() => ({ reference: kt, floating: St }), [kt, St]), + It = reactExports.useMemo(() => { + const Ot = { position: nt, left: 0, top: 0 } + if (!wt.floating) return Ot + const Wt = roundByDPR(wt.floating, ut.x), + zt = roundByDPR(wt.floating, ut.y) + return st + ? { + ...Ot, + transform: 'translate(' + Wt + 'px, ' + zt + 'px)', + ...(getDPR(wt.floating) >= 1.5 && { willChange: 'transform' }), + } + : { position: nt, left: Wt, top: zt } + }, [nt, st, wt.floating, ut.x, ut.y]) + return reactExports.useMemo( + () => ({ ...ut, update: jt, refs: Ct, elements: wt, floatingStyles: It }), + [ut, jt, Ct, wt, It], + ) + } + const $7e8f5cd07187803e$export$21b07c8f274aebd5 = reactExports.forwardRef((tt, et) => { + const { children: nt, width: rt = 10, height: it = 5, ...ot } = tt + return reactExports.createElement( + $8927f6f2acc4f386$export$250ffa63cdc0d034.svg, + _extends$u({}, ot, { ref: et, width: rt, height: it, viewBox: '0 0 30 10', preserveAspectRatio: 'none' }), + tt.asChild ? nt : reactExports.createElement('polygon', { points: '0,0 30,0 15,10' }), + ) + }), + $7e8f5cd07187803e$export$be92b6f5f03c0fe9 = $7e8f5cd07187803e$export$21b07c8f274aebd5 + function $db6c3485150b8e66$export$1ab7ae714698c4b8(tt) { + const [et, nt] = reactExports.useState(void 0) + return ( + $9f79659886946c16$export$e5c5a5f917a5871c(() => { + if (tt) { + nt({ width: tt.offsetWidth, height: tt.offsetHeight }) + const rt = new ResizeObserver((it) => { + if (!Array.isArray(it) || !it.length) return + const ot = it[0] + let at, st + if ('borderBoxSize' in ot) { + const lt = ot.borderBoxSize, + ct = Array.isArray(lt) ? lt[0] : lt + ;(at = ct.inlineSize), (st = ct.blockSize) + } else (at = tt.offsetWidth), (st = tt.offsetHeight) + nt({ width: at, height: st }) + }) + return rt.observe(tt, { box: 'border-box' }), () => rt.unobserve(tt) + } else nt(void 0) + }, [tt]), + et + ) + } + const $cf1ac5d9fe0e8206$var$POPPER_NAME = 'Popper', + [$cf1ac5d9fe0e8206$var$createPopperContext, $cf1ac5d9fe0e8206$export$722aac194ae923] = + $c512c27ab02ef895$export$50c7b4e9d9f19c1($cf1ac5d9fe0e8206$var$POPPER_NAME), + [$cf1ac5d9fe0e8206$var$PopperProvider, $cf1ac5d9fe0e8206$var$usePopperContext] = + $cf1ac5d9fe0e8206$var$createPopperContext($cf1ac5d9fe0e8206$var$POPPER_NAME), + $cf1ac5d9fe0e8206$export$badac9ada3a0bdf9 = (tt) => { + const { __scopePopper: et, children: nt } = tt, + [rt, it] = reactExports.useState(null) + return reactExports.createElement( + $cf1ac5d9fe0e8206$var$PopperProvider, + { scope: et, anchor: rt, onAnchorChange: it }, + nt, + ) + }, + $cf1ac5d9fe0e8206$var$ANCHOR_NAME = 'PopperAnchor', + $cf1ac5d9fe0e8206$export$ecd4e1ccab6ed6d = reactExports.forwardRef((tt, et) => { + const { __scopePopper: nt, virtualRef: rt, ...it } = tt, + ot = $cf1ac5d9fe0e8206$var$usePopperContext($cf1ac5d9fe0e8206$var$ANCHOR_NAME, nt), + at = reactExports.useRef(null), + st = $6ed0406888f73fc4$export$c7b2cbe3552a0d05(et, at) + return ( + reactExports.useEffect(() => { + ot.onAnchorChange((rt == null ? void 0 : rt.current) || at.current) + }), + rt + ? null + : reactExports.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div, _extends$u({}, it, { ref: st })) + ) + }), + $cf1ac5d9fe0e8206$var$CONTENT_NAME = 'PopperContent', + [$cf1ac5d9fe0e8206$var$PopperContentProvider, $cf1ac5d9fe0e8206$var$useContentContext] = + $cf1ac5d9fe0e8206$var$createPopperContext($cf1ac5d9fe0e8206$var$CONTENT_NAME), + $cf1ac5d9fe0e8206$export$bc4ae5855d3c4fc = reactExports.forwardRef((tt, et) => { + var nt, rt, it, ot, at, st, lt, ct + const { + __scopePopper: ut, + side: ht = 'bottom', + sideOffset: dt = 0, + align: pt = 'center', + alignOffset: mt = 0, + arrowPadding: gt = 0, + avoidCollisions: yt = !0, + collisionBoundary: bt = [], + collisionPadding: vt = 0, + sticky: xt = 'partial', + hideWhenDetached: kt = !1, + updatePositionStrategy: St = 'optimized', + onPlaced: Tt, + ...At + } = tt, + Et = $cf1ac5d9fe0e8206$var$usePopperContext($cf1ac5d9fe0e8206$var$CONTENT_NAME, ut), + [$t, Dt] = reactExports.useState(null), + jt = $6ed0406888f73fc4$export$c7b2cbe3552a0d05(et, ($n) => Dt($n)), + [Pt, Ct] = reactExports.useState(null), + wt = $db6c3485150b8e66$export$1ab7ae714698c4b8(Pt), + It = (nt = wt == null ? void 0 : wt.width) !== null && nt !== void 0 ? nt : 0, + Ot = (rt = wt == null ? void 0 : wt.height) !== null && rt !== void 0 ? rt : 0, + Wt = ht + (pt !== 'center' ? '-' + pt : ''), + zt = typeof vt == 'number' ? vt : { top: 0, right: 0, bottom: 0, left: 0, ...vt }, + Ft = Array.isArray(bt) ? bt : [bt], + Nt = Ft.length > 0, + Ut = { padding: zt, boundary: Ft.filter($cf1ac5d9fe0e8206$var$isNotNull), altBoundary: Nt }, + { + refs: Mt, + floatingStyles: Ht, + placement: en, + isPositioned: sn, + middlewareData: Kt, + } = useFloating({ + strategy: 'fixed', + placement: Wt, + whileElementsMounted: (...$n) => autoUpdate(...$n, { animationFrame: St === 'always' }), + elements: { reference: Et.anchor }, + middleware: [ + offset$3({ mainAxis: dt + Ot, alignmentAxis: mt }), + yt && shift({ mainAxis: !0, crossAxis: !1, limiter: xt === 'partial' ? limitShift() : void 0, ...Ut }), + yt && flip$2({ ...Ut }), + size({ + ...Ut, + apply: ({ elements: $n, rects: Nn, availableWidth: Tn, availableHeight: cn }) => { + const { width: mn, height: In } = Nn.reference, + An = $n.floating.style + An.setProperty('--radix-popper-available-width', `${Tn}px`), + An.setProperty('--radix-popper-available-height', `${cn}px`), + An.setProperty('--radix-popper-anchor-width', `${mn}px`), + An.setProperty('--radix-popper-anchor-height', `${In}px`) + }, + }), + Pt && arrow$2({ element: Pt, padding: gt }), + $cf1ac5d9fe0e8206$var$transformOrigin({ arrowWidth: It, arrowHeight: Ot }), + kt && hide$2({ strategy: 'referenceHidden', ...Ut }), + ], + }), + [rn, nn] = $cf1ac5d9fe0e8206$var$getSideAndAlignFromPlacement(en), + hn = $b1b2314f5f9a1d84$export$25bec8c6f54ee79a(Tt) + $9f79659886946c16$export$e5c5a5f917a5871c(() => { + sn && (hn == null || hn()) + }, [sn, hn]) + const vn = (it = Kt.arrow) === null || it === void 0 ? void 0 : it.x, + an = (ot = Kt.arrow) === null || ot === void 0 ? void 0 : ot.y, + Qt = ((at = Kt.arrow) === null || at === void 0 ? void 0 : at.centerOffset) !== 0, + [_n, Pn] = reactExports.useState() + return ( + $9f79659886946c16$export$e5c5a5f917a5871c(() => { + $t && Pn(window.getComputedStyle($t).zIndex) + }, [$t]), + reactExports.createElement( + 'div', + { + ref: Mt.setFloating, + 'data-radix-popper-content-wrapper': '', + style: { + ...Ht, + transform: sn ? Ht.transform : 'translate(0, -200%)', + minWidth: 'max-content', + zIndex: _n, + '--radix-popper-transform-origin': [ + (st = Kt.transformOrigin) === null || st === void 0 ? void 0 : st.x, + (lt = Kt.transformOrigin) === null || lt === void 0 ? void 0 : lt.y, + ].join(' '), + }, + dir: tt.dir, + }, + reactExports.createElement( + $cf1ac5d9fe0e8206$var$PopperContentProvider, + { scope: ut, placedSide: rn, onArrowChange: Ct, arrowX: vn, arrowY: an, shouldHideArrow: Qt }, + reactExports.createElement( + $8927f6f2acc4f386$export$250ffa63cdc0d034.div, + _extends$u({ 'data-side': rn, 'data-align': nn }, At, { + ref: jt, + style: { + ...At.style, + animation: sn ? void 0 : 'none', + opacity: (ct = Kt.hide) !== null && ct !== void 0 && ct.referenceHidden ? 0 : void 0, + }, + }), + ), + ), + ) + ) + }), + $cf1ac5d9fe0e8206$var$ARROW_NAME = 'PopperArrow', + $cf1ac5d9fe0e8206$var$OPPOSITE_SIDE = { top: 'bottom', right: 'left', bottom: 'top', left: 'right' }, + $cf1ac5d9fe0e8206$export$79d62cd4e10a3fd0 = reactExports.forwardRef(function (et, nt) { + const { __scopePopper: rt, ...it } = et, + ot = $cf1ac5d9fe0e8206$var$useContentContext($cf1ac5d9fe0e8206$var$ARROW_NAME, rt), + at = $cf1ac5d9fe0e8206$var$OPPOSITE_SIDE[ot.placedSide] + return reactExports.createElement( + 'span', + { + ref: ot.onArrowChange, + style: { + position: 'absolute', + left: ot.arrowX, + top: ot.arrowY, + [at]: 0, + transformOrigin: { top: '', right: '0 0', bottom: 'center 0', left: '100% 0' }[ot.placedSide], + transform: { + top: 'translateY(100%)', + right: 'translateY(50%) rotate(90deg) translateX(-50%)', + bottom: 'rotate(180deg)', + left: 'translateY(50%) rotate(-90deg) translateX(50%)', + }[ot.placedSide], + visibility: ot.shouldHideArrow ? 'hidden' : void 0, + }, + }, + reactExports.createElement( + $7e8f5cd07187803e$export$be92b6f5f03c0fe9, + _extends$u({}, it, { ref: nt, style: { ...it.style, display: 'block' } }), + ), + ) + }) + function $cf1ac5d9fe0e8206$var$isNotNull(tt) { + return tt !== null + } + const $cf1ac5d9fe0e8206$var$transformOrigin = (tt) => ({ + name: 'transformOrigin', + options: tt, + fn(et) { + var nt, rt, it, ot, at + const { placement: st, rects: lt, middlewareData: ct } = et, + ht = ((nt = ct.arrow) === null || nt === void 0 ? void 0 : nt.centerOffset) !== 0, + dt = ht ? 0 : tt.arrowWidth, + pt = ht ? 0 : tt.arrowHeight, + [mt, gt] = $cf1ac5d9fe0e8206$var$getSideAndAlignFromPlacement(st), + yt = { start: '0%', center: '50%', end: '100%' }[gt], + bt = + ((rt = (it = ct.arrow) === null || it === void 0 ? void 0 : it.x) !== null && rt !== void 0 ? rt : 0) + + dt / 2, + vt = + ((ot = (at = ct.arrow) === null || at === void 0 ? void 0 : at.y) !== null && ot !== void 0 ? ot : 0) + pt / 2 + let xt = '', + kt = '' + return ( + mt === 'bottom' + ? ((xt = ht ? yt : `${bt}px`), (kt = `${-pt}px`)) + : mt === 'top' + ? ((xt = ht ? yt : `${bt}px`), (kt = `${lt.floating.height + pt}px`)) + : mt === 'right' + ? ((xt = `${-pt}px`), (kt = ht ? yt : `${vt}px`)) + : mt === 'left' && ((xt = `${lt.floating.width + pt}px`), (kt = ht ? yt : `${vt}px`)), + { data: { x: xt, y: kt } } + ) + }, + }) + function $cf1ac5d9fe0e8206$var$getSideAndAlignFromPlacement(tt) { + const [et, nt = 'center'] = tt.split('-') + return [et, nt] + } + const $cf1ac5d9fe0e8206$export$be92b6f5f03c0fe9 = $cf1ac5d9fe0e8206$export$badac9ada3a0bdf9, + $cf1ac5d9fe0e8206$export$b688253958b8dfe7 = $cf1ac5d9fe0e8206$export$ecd4e1ccab6ed6d, + $cf1ac5d9fe0e8206$export$7c6e2c02157bb7d2 = $cf1ac5d9fe0e8206$export$bc4ae5855d3c4fc, + $cf1ac5d9fe0e8206$export$21b07c8f274aebd5 = $cf1ac5d9fe0e8206$export$79d62cd4e10a3fd0 + function $fe963b355347cc68$export$3e6543de14f8614f(tt, et) { + return reactExports.useReducer((nt, rt) => { + const it = et[nt][rt] + return it ?? nt + }, tt) + } + const $921a889cee6df7e8$export$99c2b779aa4e8b8b = (tt) => { + const { present: et, children: nt } = tt, + rt = $921a889cee6df7e8$var$usePresence(et), + it = typeof nt == 'function' ? nt({ present: rt.isPresent }) : reactExports.Children.only(nt), + ot = $6ed0406888f73fc4$export$c7b2cbe3552a0d05(rt.ref, it.ref) + return typeof nt == 'function' || rt.isPresent ? reactExports.cloneElement(it, { ref: ot }) : null + } + $921a889cee6df7e8$export$99c2b779aa4e8b8b.displayName = 'Presence' + function $921a889cee6df7e8$var$usePresence(tt) { + const [et, nt] = reactExports.useState(), + rt = reactExports.useRef({}), + it = reactExports.useRef(tt), + ot = reactExports.useRef('none'), + at = tt ? 'mounted' : 'unmounted', + [st, lt] = $fe963b355347cc68$export$3e6543de14f8614f(at, { + mounted: { UNMOUNT: 'unmounted', ANIMATION_OUT: 'unmountSuspended' }, + unmountSuspended: { MOUNT: 'mounted', ANIMATION_END: 'unmounted' }, + unmounted: { MOUNT: 'mounted' }, + }) + return ( + reactExports.useEffect(() => { + const ct = $921a889cee6df7e8$var$getAnimationName(rt.current) + ot.current = st === 'mounted' ? ct : 'none' + }, [st]), + $9f79659886946c16$export$e5c5a5f917a5871c(() => { + const ct = rt.current, + ut = it.current + if (ut !== tt) { + const dt = ot.current, + pt = $921a889cee6df7e8$var$getAnimationName(ct) + tt + ? lt('MOUNT') + : pt === 'none' || (ct == null ? void 0 : ct.display) === 'none' + ? lt('UNMOUNT') + : lt(ut && dt !== pt ? 'ANIMATION_OUT' : 'UNMOUNT'), + (it.current = tt) + } + }, [tt, lt]), + $9f79659886946c16$export$e5c5a5f917a5871c(() => { + if (et) { + const ct = (ht) => { + const pt = $921a889cee6df7e8$var$getAnimationName(rt.current).includes(ht.animationName) + ht.target === et && pt && reactDomExports.flushSync(() => lt('ANIMATION_END')) + }, + ut = (ht) => { + ht.target === et && (ot.current = $921a889cee6df7e8$var$getAnimationName(rt.current)) + } + return ( + et.addEventListener('animationstart', ut), + et.addEventListener('animationcancel', ct), + et.addEventListener('animationend', ct), + () => { + et.removeEventListener('animationstart', ut), + et.removeEventListener('animationcancel', ct), + et.removeEventListener('animationend', ct) + } + ) + } else lt('ANIMATION_END') + }, [et, lt]), + { + isPresent: ['mounted', 'unmountSuspended'].includes(st), + ref: reactExports.useCallback((ct) => { + ct && (rt.current = getComputedStyle(ct)), nt(ct) + }, []), + } + ) + } + function $921a889cee6df7e8$var$getAnimationName(tt) { + return (tt == null ? void 0 : tt.animationName) || 'none' + } + function $71cd76cc60e0454e$export$6f32135080cb4c3({ prop: tt, defaultProp: et, onChange: nt = () => {} }) { + const [rt, it] = $71cd76cc60e0454e$var$useUncontrolledState({ defaultProp: et, onChange: nt }), + ot = tt !== void 0, + at = ot ? tt : rt, + st = $b1b2314f5f9a1d84$export$25bec8c6f54ee79a(nt), + lt = reactExports.useCallback( + (ct) => { + if (ot) { + const ht = typeof ct == 'function' ? ct(tt) : ct + ht !== tt && st(ht) + } else it(ct) + }, + [ot, tt, it, st], + ) + return [at, lt] + } + function $71cd76cc60e0454e$var$useUncontrolledState({ defaultProp: tt, onChange: et }) { + const nt = reactExports.useState(tt), + [rt] = nt, + it = reactExports.useRef(rt), + ot = $b1b2314f5f9a1d84$export$25bec8c6f54ee79a(et) + return ( + reactExports.useEffect(() => { + it.current !== rt && (ot(rt), (it.current = rt)) + }, [rt, it, ot]), + nt + ) + } + const $ea1ef594cf570d83$export$439d29a4e110a164 = reactExports.forwardRef((tt, et) => + reactExports.createElement( + $8927f6f2acc4f386$export$250ffa63cdc0d034.span, + _extends$u({}, tt, { + ref: et, + style: { + position: 'absolute', + border: 0, + width: 1, + height: 1, + padding: 0, + margin: -1, + overflow: 'hidden', + clip: 'rect(0, 0, 0, 0)', + whiteSpace: 'nowrap', + wordWrap: 'normal', + ...tt.style, + }, + }), + ), + ), + $ea1ef594cf570d83$export$be92b6f5f03c0fe9 = $ea1ef594cf570d83$export$439d29a4e110a164, + [$a093c7e1ec25a057$var$createTooltipContext, $a093c7e1ec25a057$export$1c540a2224f0d865] = + $c512c27ab02ef895$export$50c7b4e9d9f19c1('Tooltip', [$cf1ac5d9fe0e8206$export$722aac194ae923]), + $a093c7e1ec25a057$var$usePopperScope = $cf1ac5d9fe0e8206$export$722aac194ae923(), + $a093c7e1ec25a057$var$PROVIDER_NAME = 'TooltipProvider', + $a093c7e1ec25a057$var$TOOLTIP_OPEN = 'tooltip.open', + [$a093c7e1ec25a057$var$TooltipProviderContextProvider, $a093c7e1ec25a057$var$useTooltipProviderContext] = + $a093c7e1ec25a057$var$createTooltipContext($a093c7e1ec25a057$var$PROVIDER_NAME), + $a093c7e1ec25a057$var$TOOLTIP_NAME = 'Tooltip', + [$a093c7e1ec25a057$var$TooltipContextProvider, $a093c7e1ec25a057$var$useTooltipContext] = + $a093c7e1ec25a057$var$createTooltipContext($a093c7e1ec25a057$var$TOOLTIP_NAME), + $a093c7e1ec25a057$export$28c660c63b792dea = (tt) => { + const { + __scopeTooltip: et, + children: nt, + open: rt, + defaultOpen: it = !1, + onOpenChange: ot, + disableHoverableContent: at, + delayDuration: st, + } = tt, + lt = $a093c7e1ec25a057$var$useTooltipProviderContext($a093c7e1ec25a057$var$TOOLTIP_NAME, tt.__scopeTooltip), + ct = $a093c7e1ec25a057$var$usePopperScope(et), + [ut, ht] = reactExports.useState(null), + dt = $1746a345f3d73bb7$export$f680877a34711e37(), + pt = reactExports.useRef(0), + mt = at ?? lt.disableHoverableContent, + gt = st ?? lt.delayDuration, + yt = reactExports.useRef(!1), + [bt = !1, vt] = $71cd76cc60e0454e$export$6f32135080cb4c3({ + prop: rt, + defaultProp: it, + onChange: (At) => { + At + ? (lt.onOpen(), document.dispatchEvent(new CustomEvent($a093c7e1ec25a057$var$TOOLTIP_OPEN))) + : lt.onClose(), + ot == null || ot(At) + }, + }), + xt = reactExports.useMemo(() => (bt ? (yt.current ? 'delayed-open' : 'instant-open') : 'closed'), [bt]), + kt = reactExports.useCallback(() => { + window.clearTimeout(pt.current), (yt.current = !1), vt(!0) + }, [vt]), + St = reactExports.useCallback(() => { + window.clearTimeout(pt.current), vt(!1) + }, [vt]), + Tt = reactExports.useCallback(() => { + window.clearTimeout(pt.current), + (pt.current = window.setTimeout(() => { + ;(yt.current = !0), vt(!0) + }, gt)) + }, [gt, vt]) + return ( + reactExports.useEffect(() => () => window.clearTimeout(pt.current), []), + reactExports.createElement( + $cf1ac5d9fe0e8206$export$be92b6f5f03c0fe9, + ct, + reactExports.createElement( + $a093c7e1ec25a057$var$TooltipContextProvider, + { + scope: et, + contentId: dt, + open: bt, + stateAttribute: xt, + trigger: ut, + onTriggerChange: ht, + onTriggerEnter: reactExports.useCallback(() => { + lt.isOpenDelayed ? Tt() : kt() + }, [lt.isOpenDelayed, Tt, kt]), + onTriggerLeave: reactExports.useCallback(() => { + mt ? St() : window.clearTimeout(pt.current) + }, [St, mt]), + onOpen: kt, + onClose: St, + disableHoverableContent: mt, + }, + nt, + ), + ) + ) + }, + $a093c7e1ec25a057$var$TRIGGER_NAME = 'TooltipTrigger', + $a093c7e1ec25a057$export$8c610744efcf8a1d = reactExports.forwardRef((tt, et) => { + const { __scopeTooltip: nt, ...rt } = tt, + it = $a093c7e1ec25a057$var$useTooltipContext($a093c7e1ec25a057$var$TRIGGER_NAME, nt), + ot = $a093c7e1ec25a057$var$useTooltipProviderContext($a093c7e1ec25a057$var$TRIGGER_NAME, nt), + at = $a093c7e1ec25a057$var$usePopperScope(nt), + st = reactExports.useRef(null), + lt = $6ed0406888f73fc4$export$c7b2cbe3552a0d05(et, st, it.onTriggerChange), + ct = reactExports.useRef(!1), + ut = reactExports.useRef(!1), + ht = reactExports.useCallback(() => (ct.current = !1), []) + return ( + reactExports.useEffect(() => () => document.removeEventListener('pointerup', ht), [ht]), + reactExports.createElement( + $cf1ac5d9fe0e8206$export$b688253958b8dfe7, + _extends$u({ asChild: !0 }, at), + reactExports.createElement( + $8927f6f2acc4f386$export$250ffa63cdc0d034.button, + _extends$u({ 'aria-describedby': it.open ? it.contentId : void 0, 'data-state': it.stateAttribute }, rt, { + ref: lt, + onPointerMove: $e42e1063c40fb3ef$export$b9ecd428b558ff10(tt.onPointerMove, (dt) => { + dt.pointerType !== 'touch' && + !ut.current && + !ot.isPointerInTransitRef.current && + (it.onTriggerEnter(), (ut.current = !0)) + }), + onPointerLeave: $e42e1063c40fb3ef$export$b9ecd428b558ff10(tt.onPointerLeave, () => { + it.onTriggerLeave(), (ut.current = !1) + }), + onPointerDown: $e42e1063c40fb3ef$export$b9ecd428b558ff10(tt.onPointerDown, () => { + ;(ct.current = !0), document.addEventListener('pointerup', ht, { once: !0 }) + }), + onFocus: $e42e1063c40fb3ef$export$b9ecd428b558ff10(tt.onFocus, () => { + ct.current || it.onOpen() + }), + onBlur: $e42e1063c40fb3ef$export$b9ecd428b558ff10(tt.onBlur, it.onClose), + onClick: $e42e1063c40fb3ef$export$b9ecd428b558ff10(tt.onClick, it.onClose), + }), + ), + ) + ) + }), + $a093c7e1ec25a057$var$PORTAL_NAME = 'TooltipPortal', + [$a093c7e1ec25a057$var$PortalProvider, $a093c7e1ec25a057$var$usePortalContext] = + $a093c7e1ec25a057$var$createTooltipContext($a093c7e1ec25a057$var$PORTAL_NAME, { forceMount: void 0 }), + $a093c7e1ec25a057$var$CONTENT_NAME = 'TooltipContent', + $a093c7e1ec25a057$export$e9003e2be37ec060 = reactExports.forwardRef((tt, et) => { + const nt = $a093c7e1ec25a057$var$usePortalContext($a093c7e1ec25a057$var$CONTENT_NAME, tt.__scopeTooltip), + { forceMount: rt = nt.forceMount, side: it = 'top', ...ot } = tt, + at = $a093c7e1ec25a057$var$useTooltipContext($a093c7e1ec25a057$var$CONTENT_NAME, tt.__scopeTooltip) + return reactExports.createElement( + $921a889cee6df7e8$export$99c2b779aa4e8b8b, + { present: rt || at.open }, + at.disableHoverableContent + ? reactExports.createElement( + $a093c7e1ec25a057$var$TooltipContentImpl, + _extends$u({ side: it }, ot, { ref: et }), + ) + : reactExports.createElement( + $a093c7e1ec25a057$var$TooltipContentHoverable, + _extends$u({ side: it }, ot, { ref: et }), + ), + ) + }), + $a093c7e1ec25a057$var$TooltipContentHoverable = reactExports.forwardRef((tt, et) => { + const nt = $a093c7e1ec25a057$var$useTooltipContext($a093c7e1ec25a057$var$CONTENT_NAME, tt.__scopeTooltip), + rt = $a093c7e1ec25a057$var$useTooltipProviderContext($a093c7e1ec25a057$var$CONTENT_NAME, tt.__scopeTooltip), + it = reactExports.useRef(null), + ot = $6ed0406888f73fc4$export$c7b2cbe3552a0d05(et, it), + [at, st] = reactExports.useState(null), + { trigger: lt, onClose: ct } = nt, + ut = it.current, + { onPointerInTransitChange: ht } = rt, + dt = reactExports.useCallback(() => { + st(null), ht(!1) + }, [ht]), + pt = reactExports.useCallback( + (mt, gt) => { + const yt = mt.currentTarget, + bt = { x: mt.clientX, y: mt.clientY }, + vt = $a093c7e1ec25a057$var$getExitSideFromRect(bt, yt.getBoundingClientRect()), + xt = $a093c7e1ec25a057$var$getPaddedExitPoints(bt, vt), + kt = $a093c7e1ec25a057$var$getPointsFromRect(gt.getBoundingClientRect()), + St = $a093c7e1ec25a057$var$getHull([...xt, ...kt]) + st(St), ht(!0) + }, + [ht], + ) + return ( + reactExports.useEffect(() => () => dt(), [dt]), + reactExports.useEffect(() => { + if (lt && ut) { + const mt = (yt) => pt(yt, ut), + gt = (yt) => pt(yt, lt) + return ( + lt.addEventListener('pointerleave', mt), + ut.addEventListener('pointerleave', gt), + () => { + lt.removeEventListener('pointerleave', mt), ut.removeEventListener('pointerleave', gt) + } + ) + } + }, [lt, ut, pt, dt]), + reactExports.useEffect(() => { + if (at) { + const mt = (gt) => { + const yt = gt.target, + bt = { x: gt.clientX, y: gt.clientY }, + vt = (lt == null ? void 0 : lt.contains(yt)) || (ut == null ? void 0 : ut.contains(yt)), + xt = !$a093c7e1ec25a057$var$isPointInPolygon(bt, at) + vt ? dt() : xt && (dt(), ct()) + } + return document.addEventListener('pointermove', mt), () => document.removeEventListener('pointermove', mt) + } + }, [lt, ut, at, ct, dt]), + reactExports.createElement($a093c7e1ec25a057$var$TooltipContentImpl, _extends$u({}, tt, { ref: ot })) + ) + }), + [ + $a093c7e1ec25a057$var$VisuallyHiddenContentContextProvider, + $a093c7e1ec25a057$var$useVisuallyHiddenContentContext, + ] = $a093c7e1ec25a057$var$createTooltipContext($a093c7e1ec25a057$var$TOOLTIP_NAME, { isInside: !1 }), + $a093c7e1ec25a057$var$TooltipContentImpl = reactExports.forwardRef((tt, et) => { + const { + __scopeTooltip: nt, + children: rt, + 'aria-label': it, + onEscapeKeyDown: ot, + onPointerDownOutside: at, + ...st + } = tt, + lt = $a093c7e1ec25a057$var$useTooltipContext($a093c7e1ec25a057$var$CONTENT_NAME, nt), + ct = $a093c7e1ec25a057$var$usePopperScope(nt), + { onClose: ut } = lt + return ( + reactExports.useEffect( + () => ( + document.addEventListener($a093c7e1ec25a057$var$TOOLTIP_OPEN, ut), + () => document.removeEventListener($a093c7e1ec25a057$var$TOOLTIP_OPEN, ut) + ), + [ut], + ), + reactExports.useEffect(() => { + if (lt.trigger) { + const ht = (dt) => { + const pt = dt.target + pt != null && pt.contains(lt.trigger) && ut() + } + return ( + window.addEventListener('scroll', ht, { capture: !0 }), + () => window.removeEventListener('scroll', ht, { capture: !0 }) + ) + } + }, [lt.trigger, ut]), + reactExports.createElement( + $5cb92bef7577960e$export$177fb62ff3ec1f22, + { + asChild: !0, + disableOutsidePointerEvents: !1, + onEscapeKeyDown: ot, + onPointerDownOutside: at, + onFocusOutside: (ht) => ht.preventDefault(), + onDismiss: ut, + }, + reactExports.createElement( + $cf1ac5d9fe0e8206$export$7c6e2c02157bb7d2, + _extends$u({ 'data-state': lt.stateAttribute }, ct, st, { + ref: et, + style: { + ...st.style, + '--radix-tooltip-content-transform-origin': 'var(--radix-popper-transform-origin)', + '--radix-tooltip-content-available-width': 'var(--radix-popper-available-width)', + '--radix-tooltip-content-available-height': 'var(--radix-popper-available-height)', + '--radix-tooltip-trigger-width': 'var(--radix-popper-anchor-width)', + '--radix-tooltip-trigger-height': 'var(--radix-popper-anchor-height)', + }, + }), + reactExports.createElement($5e63c961fc1ce211$export$d9f1ccf0bdb05d45, null, rt), + reactExports.createElement( + $a093c7e1ec25a057$var$VisuallyHiddenContentContextProvider, + { scope: nt, isInside: !0 }, + reactExports.createElement( + $ea1ef594cf570d83$export$be92b6f5f03c0fe9, + { id: lt.contentId, role: 'tooltip' }, + it || rt, + ), + ), + ), + ) + ) + }), + $a093c7e1ec25a057$var$ARROW_NAME = 'TooltipArrow', + $a093c7e1ec25a057$export$c27ee0ad710f7559 = reactExports.forwardRef((tt, et) => { + const { __scopeTooltip: nt, ...rt } = tt, + it = $a093c7e1ec25a057$var$usePopperScope(nt) + return $a093c7e1ec25a057$var$useVisuallyHiddenContentContext($a093c7e1ec25a057$var$ARROW_NAME, nt).isInside + ? null + : reactExports.createElement($cf1ac5d9fe0e8206$export$21b07c8f274aebd5, _extends$u({}, it, rt, { ref: et })) + }) + function $a093c7e1ec25a057$var$getExitSideFromRect(tt, et) { + const nt = Math.abs(et.top - tt.y), + rt = Math.abs(et.bottom - tt.y), + it = Math.abs(et.right - tt.x), + ot = Math.abs(et.left - tt.x) + switch (Math.min(nt, rt, it, ot)) { + case ot: + return 'left' + case it: + return 'right' + case nt: + return 'top' + case rt: + return 'bottom' + default: + throw new Error('unreachable') + } + } + function $a093c7e1ec25a057$var$getPaddedExitPoints(tt, et, nt = 5) { + const rt = [] + switch (et) { + case 'top': + rt.push({ x: tt.x - nt, y: tt.y + nt }, { x: tt.x + nt, y: tt.y + nt }) + break + case 'bottom': + rt.push({ x: tt.x - nt, y: tt.y - nt }, { x: tt.x + nt, y: tt.y - nt }) + break + case 'left': + rt.push({ x: tt.x + nt, y: tt.y - nt }, { x: tt.x + nt, y: tt.y + nt }) + break + case 'right': + rt.push({ x: tt.x - nt, y: tt.y - nt }, { x: tt.x - nt, y: tt.y + nt }) + break + } + return rt + } + function $a093c7e1ec25a057$var$getPointsFromRect(tt) { + const { top: et, right: nt, bottom: rt, left: it } = tt + return [ + { x: it, y: et }, + { x: nt, y: et }, + { x: nt, y: rt }, + { x: it, y: rt }, + ] + } + function $a093c7e1ec25a057$var$isPointInPolygon(tt, et) { + const { x: nt, y: rt } = tt + let it = !1 + for (let ot = 0, at = et.length - 1; ot < et.length; at = ot++) { + const st = et[ot].x, + lt = et[ot].y, + ct = et[at].x, + ut = et[at].y + lt > rt != ut > rt && nt < ((ct - st) * (rt - lt)) / (ut - lt) + st && (it = !it) + } + return it + } + function $a093c7e1ec25a057$var$getHull(tt) { + const et = tt.slice() + return ( + et.sort((nt, rt) => (nt.x < rt.x ? -1 : nt.x > rt.x ? 1 : nt.y < rt.y ? -1 : nt.y > rt.y ? 1 : 0)), + $a093c7e1ec25a057$var$getHullPresorted(et) + ) + } + function $a093c7e1ec25a057$var$getHullPresorted(tt) { + if (tt.length <= 1) return tt.slice() + const et = [] + for (let rt = 0; rt < tt.length; rt++) { + const it = tt[rt] + for (; et.length >= 2; ) { + const ot = et[et.length - 1], + at = et[et.length - 2] + if ((ot.x - at.x) * (it.y - at.y) >= (ot.y - at.y) * (it.x - at.x)) et.pop() + else break + } + et.push(it) + } + et.pop() + const nt = [] + for (let rt = tt.length - 1; rt >= 0; rt--) { + const it = tt[rt] + for (; nt.length >= 2; ) { + const ot = nt[nt.length - 1], + at = nt[nt.length - 2] + if ((ot.x - at.x) * (it.y - at.y) >= (ot.y - at.y) * (it.x - at.x)) nt.pop() + else break + } + nt.push(it) + } + return ( + nt.pop(), et.length === 1 && nt.length === 1 && et[0].x === nt[0].x && et[0].y === nt[0].y ? et : et.concat(nt) + ) + } + const $a093c7e1ec25a057$export$be92b6f5f03c0fe9 = $a093c7e1ec25a057$export$28c660c63b792dea, + $a093c7e1ec25a057$export$41fb9f06171c75f4 = $a093c7e1ec25a057$export$8c610744efcf8a1d, + $a093c7e1ec25a057$export$7c6e2c02157bb7d2 = $a093c7e1ec25a057$export$e9003e2be37ec060, + $a093c7e1ec25a057$export$21b07c8f274aebd5 = $a093c7e1ec25a057$export$c27ee0ad710f7559 + function _objectWithoutPropertiesLoose$o(tt, et) { + if (tt == null) return {} + var nt = {}, + rt = Object.keys(tt), + it, + ot + for (ot = 0; ot < rt.length; ot++) (it = rt[ot]), !(et.indexOf(it) >= 0) && (nt[it] = tt[it]) + return nt + } + function _objectWithoutProperties$l(tt, et) { + if (tt == null) return {} + var nt = _objectWithoutPropertiesLoose$o(tt, et), + rt, + it + if (Object.getOwnPropertySymbols) { + var ot = Object.getOwnPropertySymbols(tt) + for (it = 0; it < ot.length; it++) + (rt = ot[it]), !(et.indexOf(rt) >= 0) && Object.prototype.propertyIsEnumerable.call(tt, rt) && (nt[rt] = tt[rt]) + } + return nt + } + let LevaErrors + ;(function (tt) { + ;(tt[(tt.UNSUPPORTED_INPUT = 0)] = 'UNSUPPORTED_INPUT'), + (tt[(tt.NO_COMPONENT_FOR_TYPE = 1)] = 'NO_COMPONENT_FOR_TYPE'), + (tt[(tt.UNKNOWN_INPUT = 2)] = 'UNKNOWN_INPUT'), + (tt[(tt.DUPLICATE_KEYS = 3)] = 'DUPLICATE_KEYS'), + (tt[(tt.ALREADY_REGISTERED_TYPE = 4)] = 'ALREADY_REGISTERED_TYPE'), + (tt[(tt.CLIPBOARD_ERROR = 5)] = 'CLIPBOARD_ERROR'), + (tt[(tt.THEME_ERROR = 6)] = 'THEME_ERROR'), + (tt[(tt.PATH_DOESNT_EXIST = 7)] = 'PATH_DOESNT_EXIST'), + (tt[(tt.INPUT_TYPE_OVERRIDE = 8)] = 'INPUT_TYPE_OVERRIDE'), + (tt[(tt.EMPTY_KEY = 9)] = 'EMPTY_KEY') + })(LevaErrors || (LevaErrors = {})) + const ErrorList = { + [LevaErrors.UNSUPPORTED_INPUT]: (tt, et) => [ + `An input with type \`${tt}\` input was found at path \`${et}\` but it's not supported yet.`, + ], + [LevaErrors.NO_COMPONENT_FOR_TYPE]: (tt, et) => [ + `Type \`${tt}\` found at path \`${et}\` can't be displayed in panel because no component supports it yet.`, + ], + [LevaErrors.UNKNOWN_INPUT]: (tt, et) => [`input at path \`${tt}\` is not recognized.`, et], + [LevaErrors.DUPLICATE_KEYS]: (tt, et, nt) => [ + `Key \`${tt}\` of path \`${et}\` already exists at path \`${nt}\`. Even nested keys need to be unique. Rename one of the keys.`, + ], + [LevaErrors.ALREADY_REGISTERED_TYPE]: (tt) => [ + `Type ${tt} has already been registered. You can't register a component with the same type.`, + ], + [LevaErrors.CLIPBOARD_ERROR]: (tt) => ['Error copying the value', tt], + [LevaErrors.THEME_ERROR]: (tt, et) => [`Error accessing the theme \`${tt}.${et}\` value.`], + [LevaErrors.PATH_DOESNT_EXIST]: (tt) => [ + `Error getting the value at path \`${tt}\`. There is probably an error in your \`render\` function.`, + ], + [LevaErrors.PATH_DOESNT_EXIST]: (tt) => [`Error accessing the value at path \`${tt}\``], + [LevaErrors.INPUT_TYPE_OVERRIDE]: (tt, et, nt) => [ + `Input at path \`${tt}\` already exists with type: \`${et}\`. Its type cannot be overridden with type \`${nt}\`.`, + ], + [LevaErrors.EMPTY_KEY]: () => ['Keys can not be empty, if you want to hide a label use whitespace.'], + } + function _log(tt, et, ...nt) { + const [rt, ...it] = ErrorList[et](...nt) + console[tt]('LEVA: ' + rt, ...it) + } + const warn$3 = _log.bind(null, 'warn'), + log$2 = _log.bind(null, 'log'), + _excluded$a$1 = ['value'], + _excluded2$4$1 = ['schema'], + _excluded3$1$1 = ['value'], + Schemas = [], + Plugins = {} + function getValueType(tt) { + let { value: et } = tt, + nt = _objectWithoutProperties$l(tt, _excluded$a$1) + for (let rt of Schemas) { + const it = rt(et, nt) + if (it) return it + } + } + function register(tt, et) { + let { schema: nt } = et, + rt = _objectWithoutProperties$l(et, _excluded2$4$1) + if (tt in Plugins) { + warn$3(LevaErrors.ALREADY_REGISTERED_TYPE, tt) + return + } + Schemas.push((it, ot) => nt(it, ot) && tt), (Plugins[tt] = rt) + } + function createInternalPlugin(tt) { + return tt + } + function normalize$3$1(tt, et, nt, rt) { + const { normalize: it } = Plugins[tt] + if (it) return it(et, nt, rt) + if (typeof et != 'object' || !('value' in et)) return { value: et } + const { value: ot } = et, + at = _objectWithoutProperties$l(et, _excluded3$1$1) + return { value: ot, settings: at } + } + function sanitize$4(tt, et, nt, rt, it, ot) { + const { sanitize: at } = Plugins[tt] + return at ? at(et, nt, rt, it, ot) : et + } + function format$2$1(tt, et, nt) { + const { format: rt } = Plugins[tt] + return rt ? rt(et, nt) : et + } + function _defineProperty$G(tt, et, nt) { + return ( + et in tt + ? Object.defineProperty(tt, et, { value: nt, enumerable: !0, configurable: !0, writable: !0 }) + : (tt[et] = nt), + tt + ) + } + function ownKeys$E(tt, et) { + var nt = Object.keys(tt) + if (Object.getOwnPropertySymbols) { + var rt = Object.getOwnPropertySymbols(tt) + et && + (rt = rt.filter(function (it) { + return Object.getOwnPropertyDescriptor(tt, it).enumerable + })), + nt.push.apply(nt, rt) + } + return nt + } + function _objectSpread2$1(tt) { + for (var et = 1; et < arguments.length; et++) { + var nt = arguments[et] != null ? arguments[et] : {} + et % 2 + ? ownKeys$E(Object(nt), !0).forEach(function (rt) { + _defineProperty$G(tt, rt, nt[rt]) + }) + : Object.getOwnPropertyDescriptors + ? Object.defineProperties(tt, Object.getOwnPropertyDescriptors(nt)) + : ownKeys$E(Object(nt)).forEach(function (rt) { + Object.defineProperty(tt, rt, Object.getOwnPropertyDescriptor(nt, rt)) + }) + } + return tt + } + const clamp$8 = (tt, et, nt) => (tt > nt ? nt : tt < et ? et : tt), + parseNumber = (tt) => { + if (tt === '' || typeof tt == 'number') return tt + try { + const et = evaluate(tt) + if (!isNaN(et)) return et + } catch {} + return parseFloat(tt) + }, + log10 = Math.log(10) + function getStep(tt) { + let et = Math.abs(+String(tt).replace('.', '')) + if (et === 0) return 0.01 + for (; et !== 0 && et % 10 === 0; ) et /= 10 + const nt = Math.floor(Math.log(et) / log10) + 1, + rt = Math.floor(Math.log10(Math.abs(tt))), + it = Math.pow(10, rt - nt) + return Math.max(it, 0.001) + } + const range$8 = (tt, et, nt) => (nt === et ? 0 : (clamp$8(tt, et, nt) - et) / (nt - et)), + invertedRange = (tt, et, nt) => tt * (nt - et) + et, + getUid = () => '_' + Math.random().toString(36).substr(2, 9), + parens = /\(([0-9+\-*/^ .]+)\)/, + exp$2 = /(\d+(?:\.\d+)?) ?\^ ?(\d+(?:\.\d+)?)/, + mul = /(\d+(?:\.\d+)?) ?\* ?(\d+(?:\.\d+)?)/, + div = /(\d+(?:\.\d+)?) ?\/ ?(\d+(?:\.\d+)?)/, + add$5 = /(\d+(?:\.\d+)?) ?\+ ?(\d+(?:\.\d+)?)/, + sub = /(\d+(?:\.\d+)?) ?- ?(\d+(?:\.\d+)?)/ + function evaluate(tt) { + if (isNaN(Number(tt))) + if (parens.test(tt)) { + const et = tt.replace(parens, (nt, rt) => String(evaluate(rt))) + return evaluate(et) + } else if (exp$2.test(tt)) { + const et = tt.replace(exp$2, (nt, rt, it) => String(Math.pow(Number(rt), Number(it)))) + return evaluate(et) + } else if (mul.test(tt)) { + const et = tt.replace(mul, (nt, rt, it) => String(Number(rt) * Number(it))) + return evaluate(et) + } else if (div.test(tt)) { + const et = tt.replace(div, (nt, rt, it) => { + if (it != 0) return String(Number(rt) / Number(it)) + throw new Error('Division by zero') + }) + return evaluate(et) + } else if (add$5.test(tt)) { + const et = tt.replace(add$5, (nt, rt, it) => String(Number(rt) + Number(it))) + return evaluate(et) + } else if (sub.test(tt)) { + const et = tt.replace(sub, (nt, rt, it) => String(Number(rt) - Number(it))) + return evaluate(et) + } else return Number(tt) + return Number(tt) + } + function pick$1(tt, et) { + return et.reduce((nt, rt) => (tt && tt.hasOwnProperty(rt) && (nt[rt] = tt[rt]), nt), {}) + } + function omit$1(tt, et) { + const nt = _objectSpread2$1({}, tt) + return et.forEach((rt) => rt in tt && delete nt[rt]), nt + } + function mapArrayToKeys(tt, et) { + return tt.reduce((nt, rt, it) => Object.assign(nt, { [et[it]]: rt }), {}) + } + function isObject$o(tt) { + return Object.prototype.toString.call(tt) === '[object Object]' + } + const isEmptyObject$1 = (tt) => isObject$o(tt) && Object.keys(tt).length === 0 + let SpecialInputs + ;(function (tt) { + ;(tt.BUTTON = 'BUTTON'), (tt.BUTTON_GROUP = 'BUTTON_GROUP'), (tt.MONITOR = 'MONITOR'), (tt.FOLDER = 'FOLDER') + })(SpecialInputs || (SpecialInputs = {})) + let LevaInputs + ;(function (tt) { + ;(tt.SELECT = 'SELECT'), + (tt.IMAGE = 'IMAGE'), + (tt.NUMBER = 'NUMBER'), + (tt.COLOR = 'COLOR'), + (tt.STRING = 'STRING'), + (tt.BOOLEAN = 'BOOLEAN'), + (tt.INTERVAL = 'INTERVAL'), + (tt.VECTOR3D = 'VECTOR3D'), + (tt.VECTOR2D = 'VECTOR2D') + })(LevaInputs || (LevaInputs = {})) + const _excluded$9$1 = ['type', '__customInput'], + _excluded2$3$1 = [ + 'render', + 'label', + 'optional', + 'order', + 'disabled', + 'hint', + 'onChange', + 'onEditStart', + 'onEditEnd', + 'transient', + ], + _excluded3$6 = ['type'] + function parseOptions(tt, et, nt = {}, rt) { + var it, ot + if (typeof tt != 'object' || Array.isArray(tt)) + return { + type: rt, + input: tt, + options: _objectSpread2$1({ key: et, label: et, optional: !1, disabled: !1, order: 0 }, nt), + } + if ('__customInput' in tt) { + const { type: St, __customInput: Tt } = tt, + At = _objectWithoutProperties$l(tt, _excluded$9$1) + return parseOptions(Tt, et, At, St) + } + const { + render: at, + label: st, + optional: lt, + order: ct = 0, + disabled: ut, + hint: ht, + onChange: dt, + onEditStart: pt, + onEditEnd: mt, + transient: gt, + } = tt, + yt = _objectWithoutProperties$l(tt, _excluded2$3$1), + bt = _objectSpread2$1( + { + render: at, + key: et, + label: st ?? et, + hint: ht, + transient: gt ?? !!dt, + onEditStart: pt, + onEditEnd: mt, + disabled: ut, + optional: lt, + order: ct, + }, + nt, + ) + let { type: vt } = yt, + xt = _objectWithoutProperties$l(yt, _excluded3$6) + if (((vt = rt ?? vt), vt in SpecialInputs)) return { type: vt, input: xt, options: bt } + let kt + return ( + rt && isObject$o(xt) && 'value' in xt ? (kt = xt.value) : (kt = isEmptyObject$1(xt) ? void 0 : xt), + { + type: vt, + input: kt, + options: _objectSpread2$1( + _objectSpread2$1({}, bt), + {}, + { + onChange: dt, + optional: (it = bt.optional) !== null && it !== void 0 ? it : !1, + disabled: (ot = bt.disabled) !== null && ot !== void 0 ? ot : !1, + }, + ), + } + ) + } + function normalizeInput(tt, et, nt, rt) { + const it = parseOptions(tt, et), + { type: ot, input: at, options: st } = it + if (ot) return ot in SpecialInputs ? it : { type: ot, input: normalize$3$1(ot, at, nt, rt), options: st } + let lt = getValueType(at) + return lt + ? { type: lt, input: normalize$3$1(lt, at, nt, rt), options: st } + : ((lt = getValueType({ value: at })), + lt ? { type: lt, input: normalize$3$1(lt, { value: at }, nt, rt), options: st } : !1) + } + function updateInput(tt, et, nt, rt, it) { + const { value: ot, type: at, settings: st } = tt + ;(tt.value = sanitizeValue({ type: at, value: ot, settings: st }, et, nt, rt)), (tt.fromPanel = it) + } + const ValueError = function (et, nt, rt) { + ;(this.type = 'LEVA_ERROR'), (this.message = 'LEVA: ' + et), (this.previousValue = nt), (this.error = rt) + } + function sanitizeValue({ type: tt, value: et, settings: nt }, rt, it, ot) { + const at = tt !== 'SELECT' && typeof rt == 'function' ? rt(et) : rt + let st + try { + st = sanitize$4(tt, at, nt, et, it, ot) + } catch (lt) { + throw new ValueError(`The value \`${rt}\` did not result in a correct value.`, et, lt) + } + return dequal(st, et) ? et : st + } + const debounce$6 = (tt, et, nt = !1) => { + let rt = 0 + return function () { + const it = arguments, + ot = nt && !rt, + at = () => tt.apply(this, it) + window.clearTimeout(rt), (rt = window.setTimeout(at, et)), ot && at() + } + }, + multiplyStep = (tt) => (tt.shiftKey ? 5 : tt.altKey ? 1 / 5 : 1) + function render(tt, et) { + const nt = console.error + ;(console.error = () => {}), ReactDOM.render(tt, et), (console.error = nt) + } + const _excluded$8$1 = ['value'], + _excluded2$2$1 = ['min', 'max'], + schema$3 = (tt) => { + if (typeof tt == 'number') return !0 + if (typeof tt == 'string') { + const et = parseFloat(tt) + return isNaN(et) ? !1 : tt.substring(('' + et).length).trim().length < 4 + } + return !1 + }, + sanitize$3 = (tt, { min: et = -1 / 0, max: nt = 1 / 0, suffix: rt }) => { + const it = parseFloat(tt) + if (tt === '' || isNaN(it)) throw Error('Invalid number') + const ot = clamp$8(it, et, nt) + return rt ? ot + rt : ot + }, + format$1$2 = (tt, { pad: et = 0, suffix: nt }) => { + const rt = parseFloat(tt).toFixed(et) + return nt ? rt + nt : rt + }, + normalize$2$2 = (tt) => { + let { value: et } = tt, + nt = _objectWithoutProperties$l(tt, _excluded$8$1) + const { min: rt = -1 / 0, max: it = 1 / 0 } = nt, + ot = _objectWithoutProperties$l(nt, _excluded2$2$1) + let at = parseFloat(et) + const st = typeof et == 'string' ? et.substring(('' + at).length) : void 0 + at = clamp$8(at, rt, it) + let lt = nt.step + lt || + (Number.isFinite(rt) + ? Number.isFinite(it) + ? (lt = +(Math.abs(it - rt) / 100).toPrecision(1)) + : (lt = +(Math.abs(at - rt) / 100).toPrecision(1)) + : Number.isFinite(it) && (lt = +(Math.abs(it - at) / 100).toPrecision(1))) + const ct = lt ? getStep(lt) * 10 : getStep(at) + lt = lt || ct / 10 + const ut = Math.round(clamp$8(Math.log10(1 / ct), 0, 2)) + return { + value: st ? at + st : at, + settings: _objectSpread2$1({ initialValue: at, step: lt, pad: ut, min: rt, max: it, suffix: st }, ot), + } + }, + sanitizeStep$1 = (tt, { step: et, initialValue: nt }) => { + const rt = Math.round((tt - nt) / et) + return nt + rt * et + } + var props$3$1 = Object.freeze({ + __proto__: null, + schema: schema$3, + sanitize: sanitize$3, + format: format$1$2, + normalize: normalize$2$2, + sanitizeStep: sanitizeStep$1, + }) + function _extends$t() { + return ( + (_extends$t = Object.assign + ? Object.assign.bind() + : function (tt) { + for (var et = 1; et < arguments.length; et++) { + var nt = arguments[et] + for (var rt in nt) Object.prototype.hasOwnProperty.call(nt, rt) && (tt[rt] = nt[rt]) + } + return tt + }), + _extends$t.apply(this, arguments) + ) + } + const InputContext = reactExports.createContext({}) + function useInputContext() { + return reactExports.useContext(InputContext) + } + const ThemeContext$3 = reactExports.createContext(null), + StoreContext$1 = reactExports.createContext(null), + PanelSettingsContext = reactExports.createContext(null) + function useStoreContext() { + return reactExports.useContext(StoreContext$1) + } + function usePanelSettingsContext() { + return reactExports.useContext(PanelSettingsContext) + } + const getDefaultTheme = () => ({ + colors: { + elevation1: '#292d39', + elevation2: '#181c20', + elevation3: '#373c4b', + accent1: '#0066dc', + accent2: '#007bff', + accent3: '#3c93ff', + highlight1: '#535760', + highlight2: '#8c92a4', + highlight3: '#fefefe', + vivid1: '#ffcc00', + folderWidgetColor: '$highlight2', + folderTextColor: '$highlight3', + toolTipBackground: '$highlight3', + toolTipText: '$elevation2', + }, + radii: { xs: '2px', sm: '3px', lg: '10px' }, + space: { xs: '3px', sm: '6px', md: '10px', rowGap: '7px', colGap: '7px' }, + fonts: { mono: "ui-monospace, SFMono-Regular, Menlo, 'Roboto Mono', monospace", sans: 'system-ui, sans-serif' }, + fontSizes: { root: '11px', toolTip: '$root' }, + sizes: { + rootWidth: '280px', + controlWidth: '160px', + numberInputMinWidth: '38px', + scrubberWidth: '8px', + scrubberHeight: '16px', + rowHeight: '24px', + folderTitleHeight: '20px', + checkboxSize: '16px', + joystickWidth: '100px', + joystickHeight: '100px', + colorPickerWidth: '$controlWidth', + colorPickerHeight: '100px', + imagePreviewWidth: '$controlWidth', + imagePreviewHeight: '100px', + monitorHeight: '60px', + titleBarHeight: '39px', + }, + shadows: { level1: '0 0 9px 0 #00000088', level2: '0 4px 14px #00000033' }, + borderWidths: { root: '0px', input: '1px', focus: '1px', hover: '1px', active: '1px', folder: '1px' }, + fontWeights: { label: 'normal', folder: 'normal', button: 'normal' }, + }) + function createStateClass(tt, et) { + const [nt, rt] = tt.split(' '), + it = {} + return ( + nt !== 'none' && + (it.boxShadow = `${et.inset ? 'inset ' : ''}0 0 0 $borderWidths${[et.key]} $colors${ + (nt !== 'default' && nt) || et.borderColor + }`), + rt && (it.backgroundColor = rt), + it + ) + } + const utils$r = { + $inputStyle: () => (tt) => createStateClass(tt, { key: '$input', borderColor: '$highlight1', inset: !0 }), + $focusStyle: () => (tt) => createStateClass(tt, { key: '$focus', borderColor: '$accent2' }), + $hoverStyle: () => (tt) => createStateClass(tt, { key: '$hover', borderColor: '$accent1', inset: !0 }), + $activeStyle: () => (tt) => createStateClass(tt, { key: '$active', borderColor: '$accent1', inset: !0 }), + }, + { + styled: styled$5, + css: css$1, + createTheme: createTheme$2, + globalCss, + keyframes: keyframes$1, + } = q$7({ + prefix: 'leva', + theme: getDefaultTheme(), + utils: _objectSpread2$1( + _objectSpread2$1({}, utils$r), + {}, + { + $flex: () => ({ display: 'flex', alignItems: 'center' }), + $flexCenter: () => ({ display: 'flex', alignItems: 'center', justifyContent: 'center' }), + $reset: () => ({ + outline: 'none', + fontSize: 'inherit', + fontWeight: 'inherit', + color: 'inherit', + fontFamily: 'inherit', + border: 'none', + backgroundColor: 'transparent', + appearance: 'none', + }), + $draggable: () => ({ touchAction: 'none', WebkitUserDrag: 'none', userSelect: 'none' }), + $focus: (tt) => ({ '&:focus': utils$r.$focusStyle()(tt) }), + $focusWithin: (tt) => ({ '&:focus-within': utils$r.$focusStyle()(tt) }), + $hover: (tt) => ({ '&:hover': utils$r.$hoverStyle()(tt) }), + $active: (tt) => ({ '&:active': utils$r.$activeStyle()(tt) }), + }, + ), + }), + globalStyles = globalCss({ + '.leva__panel__dragged': { + WebkitUserDrag: 'none', + userSelect: 'none', + input: { userSelect: 'none' }, + '*': { cursor: 'ew-resize !important' }, + }, + }) + function mergeTheme(tt) { + const et = getDefaultTheme() + if (!tt) return { theme: et, className: '' } + Object.keys(tt).forEach((rt) => { + Object.assign(et[rt], tt[rt]) + }) + const nt = createTheme$2(et) + return { theme: et, className: nt.className } + } + function useTh(tt, et) { + const { theme: nt } = reactExports.useContext(ThemeContext$3) + if (!(tt in nt) || !(et in nt[tt])) return warn$3(LevaErrors.THEME_ERROR, tt, et), '' + let rt = et + for (;;) { + let it = nt[tt][rt] + if (typeof it == 'string' && it.charAt(0) === '$') rt = it.substr(1) + else return it + } + } + const StyledInput$2 = styled$5('input', { + $reset: '', + padding: '0 $sm', + width: 0, + minWidth: 0, + flex: 1, + height: '100%', + variants: { levaType: { number: { textAlign: 'right' } }, as: { textarea: { padding: '$sm' } } }, + }), + InnerLabel = styled$5('div', { + $draggable: '', + height: '100%', + $flexCenter: '', + position: 'relative', + padding: '0 $xs', + fontSize: '0.8em', + opacity: 0.8, + cursor: 'default', + touchAction: 'none', + [`& + ${StyledInput$2}`]: { paddingLeft: 0 }, + }), + InnerNumberLabel = styled$5(InnerLabel, { + cursor: 'ew-resize', + marginRight: '-$xs', + textTransform: 'uppercase', + opacity: 0.3, + '&:hover': { opacity: 1 }, + variants: { dragging: { true: { backgroundColor: '$accent2', opacity: 1 } } }, + }), + InputContainer = styled$5('div', { + $flex: '', + position: 'relative', + borderRadius: '$sm', + overflow: 'hidden', + color: 'inherit', + height: '$rowHeight', + backgroundColor: '$elevation3', + $inputStyle: '$elevation1', + $hover: '', + $focusWithin: '', + variants: { textArea: { true: { height: 'auto' } } }, + }), + _excluded$7$2 = ['innerLabel', 'value', 'onUpdate', 'onChange', 'onKeyDown', 'type', 'id', 'inputType', 'rows'], + _excluded2$1$2 = ['onUpdate'] + function ValueInput(tt) { + let { + innerLabel: et, + value: nt, + onUpdate: rt, + onChange: it, + onKeyDown: ot, + type: at, + id: st, + inputType: lt = 'text', + rows: ct = 0, + } = tt, + ut = _objectWithoutProperties$l(tt, _excluded$7$2) + const { id: ht, emitOnEditStart: dt, emitOnEditEnd: pt, disabled: mt } = useInputContext(), + gt = st || ht, + yt = reactExports.useRef(null), + bt = ct > 0, + vt = bt ? 'textarea' : 'input', + xt = reactExports.useCallback( + (Tt) => (At) => { + const Et = At.currentTarget.value + Tt(Et) + }, + [], + ) + React$1.useEffect(() => { + const Tt = yt.current, + At = xt((Et) => { + rt(Et), pt() + }) + return ( + Tt == null || Tt.addEventListener('blur', At), () => (Tt == null ? void 0 : Tt.removeEventListener('blur', At)) + ) + }, [xt, rt, pt]) + const kt = reactExports.useCallback( + (Tt) => { + Tt.key === 'Enter' && xt(rt)(Tt) + }, + [xt, rt], + ), + St = Object.assign({ as: vt }, bt ? { rows: ct } : {}, ut) + return React$1.createElement( + InputContainer, + { textArea: bt }, + et && typeof et == 'string' ? React$1.createElement(InnerLabel, null, et) : et, + React$1.createElement( + StyledInput$2, + _extends$t( + { + levaType: at, + ref: yt, + id: gt, + type: lt, + autoComplete: 'off', + spellCheck: 'false', + value: nt, + onChange: xt(it), + onFocus: () => dt(), + onKeyPress: kt, + onKeyDown: ot, + disabled: mt, + }, + St, + ), + ), + ) + } + function NumberInput(tt) { + let { onUpdate: et } = tt, + nt = _objectWithoutProperties$l(tt, _excluded2$1$2) + const rt = reactExports.useCallback((ot) => et(parseNumber(ot)), [et]), + it = reactExports.useCallback( + (ot) => { + const at = ot.key === 'ArrowUp' ? 1 : ot.key === 'ArrowDown' ? -1 : 0 + if (at) { + ot.preventDefault() + const st = ot.altKey ? 0.1 : ot.shiftKey ? 10 : 1 + et((lt) => parseFloat(lt) + at * st) + } + }, + [et], + ) + return React$1.createElement(ValueInput, _extends$t({}, nt, { onUpdate: rt, onKeyDown: it, type: 'number' })) + } + const StyledFolder = styled$5('div', {}), + StyledWrapper = styled$5('div', { + position: 'relative', + background: '$elevation2', + transition: 'height 300ms ease', + variants: { + fill: { true: {}, false: {} }, + flat: { false: {}, true: {} }, + isRoot: { + true: {}, + false: { + paddingLeft: '$md', + '&::after': { + content: '""', + position: 'absolute', + left: 0, + top: 0, + width: '$borderWidths$folder', + height: '100%', + backgroundColor: '$folderWidgetColor', + opacity: 0.4, + transform: 'translateX(-50%)', + }, + }, + }, + }, + compoundVariants: [ + { isRoot: !0, fill: !1, css: { overflowY: 'auto', maxHeight: 'calc(100vh - 20px - $$titleBarHeight)' } }, + { isRoot: !0, flat: !1, css: { borderRadius: '$lg' } }, + ], + }), + StyledTitle = styled$5('div', { + $flex: '', + color: '$folderTextColor', + userSelect: 'none', + cursor: 'pointer', + height: '$folderTitleHeight', + fontWeight: '$folder', + '> svg': { marginLeft: -4, marginRight: 4, cursor: 'pointer', fill: '$folderWidgetColor', opacity: 0.6 }, + '&:hover > svg': { fill: '$folderWidgetColor' }, + [`&:hover + ${StyledWrapper}::after`]: { opacity: 0.6 }, + [`${StyledFolder}:hover > & + ${StyledWrapper}::after`]: { opacity: 0.6 }, + [`${StyledFolder}:hover > & > svg`]: { opacity: 1 }, + }), + StyledContent = styled$5('div', { + position: 'relative', + display: 'grid', + gridTemplateColumns: '100%', + rowGap: '$rowGap', + transition: 'opacity 250ms ease', + variants: { + toggled: { + true: { opacity: 1, transitionDelay: '250ms' }, + false: { opacity: 0, transitionDelay: '0ms', pointerEvents: 'none' }, + }, + isRoot: { + true: { + '& > div': { paddingLeft: '$md', paddingRight: '$md' }, + '& > div:first-of-type': { paddingTop: '$sm' }, + '& > div:last-of-type': { paddingBottom: '$sm' }, + [`> ${StyledFolder}:not(:first-of-type)`]: { + paddingTop: '$sm', + marginTop: '$md', + borderTop: '$borderWidths$folder solid $colors$elevation1', + }, + }, + }, + }, + }), + StyledRow = styled$5('div', { + position: 'relative', + zIndex: 100, + display: 'grid', + rowGap: '$rowGap', + gridTemplateRows: 'minmax($sizes$rowHeight, max-content)', + alignItems: 'center', + color: '$highlight2', + [`${StyledContent} > &`]: { + '&:first-of-type': { marginTop: '$rowGap' }, + '&:last-of-type': { marginBottom: '$rowGap' }, + }, + variants: { + disabled: { true: { pointerEvents: 'none' }, false: { '&:hover,&:focus-within': { color: '$highlight3' } } }, + }, + }), + StyledInputRow = styled$5(StyledRow, { gridTemplateColumns: 'auto $sizes$controlWidth', columnGap: '$colGap' }), + CopyLabelContainer = styled$5('div', { + $flex: '', + height: '100%', + position: 'relative', + overflow: 'hidden', + '& > div': { marginLeft: '$colGap', padding: '0 $xs', opacity: 0.4 }, + '& > div:hover': { opacity: 0.8 }, + '& > div > svg': { + display: 'none', + cursor: 'pointer', + width: 13, + minWidth: 13, + height: 13, + backgroundColor: '$elevation2', + }, + '&:hover > div > svg': { display: 'block' }, + variants: { align: { top: { height: '100%', alignItems: 'flex-start', paddingTop: '$sm' } } }, + }), + StyledOptionalToggle = styled$5('input', { + $reset: '', + height: 0, + width: 0, + opacity: 0, + margin: 0, + '& + label': { + position: 'relative', + $flexCenter: '', + height: '100%', + userSelect: 'none', + cursor: 'pointer', + paddingLeft: 2, + paddingRight: '$sm', + pointerEvents: 'auto', + }, + '& + label:after': { + content: '""', + width: 6, + height: 6, + backgroundColor: '$elevation3', + borderRadius: '50%', + $activeStyle: '', + }, + '&:focus + label:after': { $focusStyle: '' }, + '& + label:active:after': { backgroundColor: '$accent1', $focusStyle: '' }, + '&:checked + label:after': { backgroundColor: '$accent1' }, + }), + StyledLabel = styled$5('label', { + fontWeight: '$label', + overflow: 'hidden', + textOverflow: 'ellipsis', + whiteSpace: 'nowrap', + '& > svg': { display: 'block' }, + }), + StyledInputWrapper$1 = styled$5('div', { + opacity: 1, + variants: { + disabled: { true: { opacity: 0.6, pointerEvents: 'none', [`& ${StyledLabel}`]: { pointerEvents: 'auto' } } }, + }, + }), + Overlay$1 = styled$5('div', { + position: 'fixed', + top: 0, + bottom: 0, + right: 0, + left: 0, + zIndex: 1e3, + userSelect: 'none', + }), + StyledToolTipContent = styled$5('div', { + background: '$toolTipBackground', + fontFamily: '$sans', + fontSize: '$toolTip', + padding: '$xs $sm', + color: '$toolTipText', + borderRadius: '$xs', + boxShadow: '$level2', + maxWidth: 260, + }), + ToolTipArrow = styled$5($a093c7e1ec25a057$export$21b07c8f274aebd5, { fill: '$toolTipBackground' }) + function Portal$2({ children: tt }) { + const { className: et } = reactExports.useContext(ThemeContext$3) + return React$1.createElement($f1701beae083dbae$export$be92b6f5f03c0fe9, { className: et }, tt) + } + const _excluded$6$2 = ['align'] + function OptionalToggle() { + const { id: tt, disable: et, disabled: nt } = useInputContext() + return React$1.createElement( + React$1.Fragment, + null, + React$1.createElement(StyledOptionalToggle, { + id: tt + '__disable', + type: 'checkbox', + checked: !nt, + onChange: () => et(!nt), + }), + React$1.createElement('label', { htmlFor: tt + '__disable' }), + ) + } + function RawLabel(tt) { + const { id: et, optional: nt, hint: rt } = useInputContext(), + it = tt.htmlFor || (et ? { htmlFor: et } : null), + ot = !rt && typeof tt.children == 'string' ? { title: tt.children } : null + return React$1.createElement( + React$1.Fragment, + null, + nt && React$1.createElement(OptionalToggle, null), + rt !== void 0 + ? React$1.createElement( + $a093c7e1ec25a057$export$be92b6f5f03c0fe9, + null, + React$1.createElement( + $a093c7e1ec25a057$export$41fb9f06171c75f4, + { asChild: !0 }, + React$1.createElement(StyledLabel, _extends$t({}, it, tt)), + ), + React$1.createElement( + $a093c7e1ec25a057$export$7c6e2c02157bb7d2, + { side: 'top', sideOffset: 2 }, + React$1.createElement(StyledToolTipContent, null, rt, React$1.createElement(ToolTipArrow, null)), + ), + ) + : React$1.createElement(StyledLabel, _extends$t({}, it, ot, tt)), + ) + } + function Label$4(tt) { + let { align: et } = tt, + nt = _objectWithoutProperties$l(tt, _excluded$6$2) + const { value: rt, label: it, key: ot, disabled: at } = useInputContext(), + { hideCopyButton: st } = usePanelSettingsContext(), + lt = !st && ot !== void 0, + [ct, ut] = reactExports.useState(!1), + ht = async () => { + try { + await navigator.clipboard.writeText(JSON.stringify({ [ot]: rt ?? '' })), ut(!0) + } catch { + warn$3(LevaErrors.CLIPBOARD_ERROR, { [ot]: rt }) + } + } + return React$1.createElement( + CopyLabelContainer, + { align: et, onPointerLeave: () => ut(!1) }, + React$1.createElement(RawLabel, nt), + lt && + !at && + React$1.createElement( + 'div', + { title: `Click to copy ${typeof it == 'string' ? it : ot} value` }, + ct + ? React$1.createElement( + 'svg', + { xmlns: 'http://www.w3.org/2000/svg', viewBox: '0 0 20 20', fill: 'currentColor' }, + React$1.createElement('path', { d: 'M9 2a1 1 0 000 2h2a1 1 0 100-2H9z' }), + React$1.createElement('path', { + fillRule: 'evenodd', + d: 'M4 5a2 2 0 012-2 3 3 0 003 3h2a3 3 0 003-3 2 2 0 012 2v11a2 2 0 01-2 2H6a2 2 0 01-2-2V5zm9.707 5.707a1 1 0 00-1.414-1.414L9 12.586l-1.293-1.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z', + clipRule: 'evenodd', + }), + ) + : React$1.createElement( + 'svg', + { onClick: ht, xmlns: 'http://www.w3.org/2000/svg', viewBox: '0 0 20 20', fill: 'currentColor' }, + React$1.createElement('path', { d: 'M8 3a1 1 0 011-1h2a1 1 0 110 2H9a1 1 0 01-1-1z' }), + React$1.createElement('path', { + d: 'M6 3a2 2 0 00-2 2v11a2 2 0 002 2h8a2 2 0 002-2V5a2 2 0 00-2-2 3 3 0 01-3 3H9a3 3 0 01-3-3z', + }), + ), + ), + ) + } + const _excluded$5$2 = ['toggled'], + Svg$1 = styled$5('svg', { fill: 'currentColor', transition: 'transform 350ms ease, fill 250ms ease' }) + function Chevron(tt) { + let { toggled: et } = tt, + nt = _objectWithoutProperties$l(tt, _excluded$5$2) + return React$1.createElement( + Svg$1, + _extends$t( + { + width: '9', + height: '5', + viewBox: '0 0 9 5', + xmlns: 'http://www.w3.org/2000/svg', + style: { transform: `rotate(${et ? 0 : -90}deg)` }, + }, + nt, + ), + React$1.createElement('path', { d: 'M3.8 4.4c.4.3 1 .3 1.4 0L8 1.7A1 1 0 007.4 0H1.6a1 1 0 00-.7 1.7l3 2.7z' }), + ) + } + const _excluded$4$2 = ['input'] + function Row(tt) { + let { input: et } = tt, + nt = _objectWithoutProperties$l(tt, _excluded$4$2) + return et ? React$1.createElement(StyledInputRow, nt) : React$1.createElement(StyledRow, nt) + } + function useInputSetters({ value: tt, type: et, settings: nt, setValue: rt }) { + const [it, ot] = reactExports.useState(format$2$1(et, tt, nt)), + at = reactExports.useRef(tt), + st = reactExports.useRef(nt) + st.current = nt + const lt = reactExports.useCallback((ut) => ot(format$2$1(et, ut, st.current)), [et]), + ct = reactExports.useCallback( + (ut) => { + try { + rt(ut) + } catch (ht) { + const { type: dt, previousValue: pt } = ht + if (dt !== 'LEVA_ERROR') throw ht + lt(pt) + } + }, + [lt, rt], + ) + return ( + reactExports.useEffect(() => { + dequal(tt, at.current) || lt(tt), (at.current = tt) + }, [tt, lt]), + { displayValue: it, onChange: ot, onUpdate: ct } + ) + } + function useDrag$1(tt, et) { + const { emitOnEditStart: nt, emitOnEditEnd: rt } = useInputContext() + return useDrag$2((it) => { + it.first && (document.body.classList.add('leva__panel__dragged'), nt == null || nt()) + const ot = tt(it) + return it.last && (document.body.classList.remove('leva__panel__dragged'), rt == null || rt()), ot + }, et) + } + function useCanvas2d(tt) { + const et = reactExports.useRef(null), + nt = reactExports.useRef(null), + rt = reactExports.useRef(!1) + return ( + reactExports.useEffect(() => { + const it = debounce$6(() => { + ;(et.current.width = et.current.offsetWidth * window.devicePixelRatio), + (et.current.height = et.current.offsetHeight * window.devicePixelRatio), + tt(et.current, nt.current) + }, 250) + return ( + window.addEventListener('resize', it), + rt.current || (it(), (rt.current = !0)), + () => window.removeEventListener('resize', it) + ) + }, [tt]), + reactExports.useEffect(() => { + nt.current = et.current.getContext('2d') + }, []), + [et, nt] + ) + } + function useTransform() { + const tt = reactExports.useRef(null), + et = reactExports.useRef({ x: 0, y: 0 }), + nt = reactExports.useCallback((rt) => { + Object.assign(et.current, rt), + tt.current && (tt.current.style.transform = `translate3d(${et.current.x}px, ${et.current.y}px, 0)`) + }, []) + return [tt, nt] + } + const _excluded$3$2 = ['__refCount'], + getInputAtPath = (tt, et) => { + if (!tt[et]) return null + const nt = tt[et] + return _objectWithoutProperties$l(nt, _excluded$3$2) + } + function useInput(tt) { + const et = useStoreContext(), + [nt, rt] = reactExports.useState(getInputAtPath(et.getData(), tt)), + it = reactExports.useCallback((ct) => et.setValueAtPath(tt, ct, !0), [tt, et]), + ot = reactExports.useCallback((ct) => et.setSettingsAtPath(tt, ct), [tt, et]), + at = reactExports.useCallback((ct) => et.disableInputAtPath(tt, ct), [tt, et]), + st = reactExports.useCallback(() => et.emitOnEditStart(tt), [tt, et]), + lt = reactExports.useCallback(() => et.emitOnEditEnd(tt), [tt, et]) + return ( + reactExports.useEffect(() => { + rt(getInputAtPath(et.getData(), tt)) + const ct = et.useStore.subscribe((ut) => getInputAtPath(ut.data, tt), rt, { equalityFn: shallow$2 }) + return () => ct() + }, [et, tt]), + [nt, { set: it, setSettings: ot, disable: at, storeId: et.storeId, emitOnEditStart: st, emitOnEditEnd: lt }] + ) + } + const RangeGrid = styled$5('div', { + variants: { + hasRange: { + true: { + position: 'relative', + display: 'grid', + gridTemplateColumns: 'auto $sizes$numberInputMinWidth', + columnGap: '$colGap', + alignItems: 'center', + }, + }, + }, + }), + Range = styled$5('div', { + position: 'relative', + width: '100%', + height: 2, + borderRadius: '$xs', + backgroundColor: '$elevation1', + }), + Scrubber = styled$5('div', { + position: 'absolute', + width: '$scrubberWidth', + height: '$scrubberHeight', + borderRadius: '$xs', + boxShadow: '0 0 0 2px $colors$elevation2', + backgroundColor: '$accent2', + cursor: 'pointer', + $active: 'none $accent1', + $hover: 'none $accent3', + variants: { + position: { + left: { + borderTopRightRadius: 0, + borderBottomRightRadius: 0, + transform: 'translateX(calc(-0.5 * ($sizes$scrubberWidth + 4px)))', + }, + right: { + borderTopLeftRadius: 0, + borderBottomLeftRadius: 0, + transform: 'translateX(calc(0.5 * ($sizes$scrubberWidth + 4px)))', + }, + }, + }, + }), + RangeWrapper = styled$5('div', { + position: 'relative', + $flex: '', + height: '100%', + cursor: 'pointer', + touchAction: 'none', + }), + Indicator = styled$5('div', { position: 'absolute', height: '100%', backgroundColor: '$accent2' }) + function RangeSlider({ value: tt, min: et, max: nt, onDrag: rt, step: it, initialValue: ot }) { + const at = reactExports.useRef(null), + st = reactExports.useRef(null), + lt = reactExports.useRef(0), + ct = useTh('sizes', 'scrubberWidth'), + ut = useDrag$1(({ event: dt, first: pt, xy: [mt], movement: [gt], memo: yt }) => { + if (pt) { + const { width: vt, left: xt } = at.current.getBoundingClientRect() + ;(lt.current = vt - parseFloat(ct)), + (yt = (dt == null ? void 0 : dt.target) === st.current ? tt : invertedRange((mt - xt) / vt, et, nt)) + } + const bt = yt + invertedRange(gt / lt.current, 0, nt - et) + return rt(sanitizeStep$1(bt, { step: it, initialValue: ot })), yt + }), + ht = range$8(tt, et, nt) + return React$1.createElement( + RangeWrapper, + _extends$t({ ref: at }, ut()), + React$1.createElement( + Range, + null, + React$1.createElement(Indicator, { style: { left: 0, right: `${(1 - ht) * 100}%` } }), + ), + React$1.createElement(Scrubber, { ref: st, style: { left: `calc(${ht} * (100% - ${ct}))` } }), + ) + } + const DraggableLabel = React$1.memo(({ label: tt, onUpdate: et, step: nt, innerLabelTrim: rt }) => { + const [it, ot] = reactExports.useState(!1), + at = useDrag$1( + ({ active: st, delta: [lt], event: ct, memo: ut = 0 }) => ( + ot(st), + (ut += lt / 2), + Math.abs(ut) >= 1 && (et((ht) => parseFloat(ht) + Math.floor(ut) * nt * multiplyStep(ct)), (ut = 0)), + ut + ), + ) + return React$1.createElement( + InnerNumberLabel, + _extends$t({ dragging: it, title: tt.length > 1 ? tt : '' }, at()), + tt.slice(0, rt), + ) + }) + function Number$1({ + label: tt, + id: et, + displayValue: nt, + onUpdate: rt, + onChange: it, + settings: ot, + innerLabelTrim: at = 1, + }) { + const st = + at > 0 && React$1.createElement(DraggableLabel, { label: tt, step: ot.step, onUpdate: rt, innerLabelTrim: at }) + return React$1.createElement(NumberInput, { id: et, value: String(nt), onUpdate: rt, onChange: it, innerLabel: st }) + } + function NumberComponent() { + const tt = useInputContext(), + { label: et, value: nt, onUpdate: rt, settings: it, id: ot } = tt, + { min: at, max: st } = it, + lt = st !== 1 / 0 && at !== -1 / 0 + return React$1.createElement( + Row, + { input: !0 }, + React$1.createElement(Label$4, null, et), + React$1.createElement( + RangeGrid, + { hasRange: lt }, + lt && React$1.createElement(RangeSlider, _extends$t({ value: parseFloat(nt), onDrag: rt }, it)), + React$1.createElement(Number$1, _extends$t({}, tt, { id: ot, label: 'value', innerLabelTrim: lt ? 0 : 1 })), + ), + ) + } + const { sanitizeStep } = props$3$1, + rest = _objectWithoutProperties$l(props$3$1, ['sanitizeStep']) + var number$6 = _objectSpread2$1({ component: NumberComponent }, rest) + const schema$2$1 = (tt, et) => + v8n() + .schema({ options: v8n().passesAnyOf(v8n().object(), v8n().array()) }) + .test(et), + sanitize$2$1 = (tt, { values: et }) => { + if (et.indexOf(tt) < 0) throw Error("Selected value doesn't match Select options") + return tt + }, + format$3 = (tt, { values: et }) => et.indexOf(tt), + normalize$1$2 = (tt) => { + let { value: et, options: nt } = tt, + rt, + it + return ( + Array.isArray(nt) + ? ((it = nt), (rt = nt.map((ot) => String(ot)))) + : ((it = Object.values(nt)), (rt = Object.keys(nt))), + 'value' in tt ? it.includes(et) || (rt.unshift(String(et)), it.unshift(et)) : (et = it[0]), + Object.values(nt).includes(et) || (nt[String(et)] = et), + { value: et, settings: { keys: rt, values: it } } + ) + } + var props$2$1 = Object.freeze({ + __proto__: null, + schema: schema$2$1, + sanitize: sanitize$2$1, + format: format$3, + normalize: normalize$1$2, + }) + const SelectContainer = styled$5('div', { + $flexCenter: '', + position: 'relative', + '> svg': { pointerEvents: 'none', position: 'absolute', right: '$md' }, + }), + NativeSelect = styled$5('select', { + position: 'absolute', + top: 0, + left: 0, + width: '100%', + height: '100%', + opacity: 0, + }), + PresentationalSelect = styled$5('div', { + display: 'flex', + alignItems: 'center', + width: '100%', + height: '$rowHeight', + backgroundColor: '$elevation3', + borderRadius: '$sm', + padding: '0 $sm', + cursor: 'pointer', + [`${NativeSelect}:focus + &`]: { $focusStyle: '' }, + [`${NativeSelect}:hover + &`]: { $hoverStyle: '' }, + }) + function Select$5({ displayValue: tt, value: et, onUpdate: nt, id: rt, settings: it, disabled: ot }) { + const { keys: at, values: st } = it, + lt = reactExports.useRef() + return ( + et === st[tt] && (lt.current = at[tt]), + React$1.createElement( + SelectContainer, + null, + React$1.createElement( + NativeSelect, + { id: rt, value: tt, onChange: (ct) => nt(st[Number(ct.currentTarget.value)]), disabled: ot }, + at.map((ct, ut) => React$1.createElement('option', { key: ct, value: ut }, ct)), + ), + React$1.createElement(PresentationalSelect, null, lt.current), + React$1.createElement(Chevron, { toggled: !0 }), + ) + ) + } + function SelectComponent() { + const { + label: tt, + value: et, + displayValue: nt, + onUpdate: rt, + id: it, + disabled: ot, + settings: at, + } = useInputContext() + return React$1.createElement( + Row, + { input: !0 }, + React$1.createElement(Label$4, null, tt), + React$1.createElement(Select$5, { + id: it, + value: et, + displayValue: nt, + onUpdate: rt, + settings: at, + disabled: ot, + }), + ) + } + var select$1 = _objectSpread2$1({ component: SelectComponent }, props$2$1) + const schema$1$1 = (tt) => v8n().string().test(tt), + sanitize$1$1 = (tt) => { + if (typeof tt != 'string') throw Error('Invalid string') + return tt + }, + normalize$5 = ({ value: tt, editable: et = !0, rows: nt = !1 }) => ({ + value: tt, + settings: { editable: et, rows: typeof nt == 'number' ? nt : nt ? 5 : 0 }, + }) + var props$1$1 = Object.freeze({ __proto__: null, schema: schema$1$1, sanitize: sanitize$1$1, normalize: normalize$5 }) + const _excluded$2$2 = ['displayValue', 'onUpdate', 'onChange', 'editable'], + NonEditableString = styled$5('div', { whiteSpace: 'pre-wrap' }) + function String$1(tt) { + let { displayValue: et, onUpdate: nt, onChange: rt, editable: it = !0 } = tt, + ot = _objectWithoutProperties$l(tt, _excluded$2$2) + return it + ? React$1.createElement(ValueInput, _extends$t({ value: et, onUpdate: nt, onChange: rt }, ot)) + : React$1.createElement(NonEditableString, null, et) + } + function StringComponent() { + const { label: tt, settings: et, displayValue: nt, onUpdate: rt, onChange: it } = useInputContext() + return React$1.createElement( + Row, + { input: !0 }, + React$1.createElement(Label$4, null, tt), + React$1.createElement(String$1, _extends$t({ displayValue: nt, onUpdate: rt, onChange: it }, et)), + ) + } + var string$1 = _objectSpread2$1({ component: StringComponent }, props$1$1) + const schema$4 = (tt) => v8n().boolean().test(tt), + sanitize$5 = (tt) => { + if (typeof tt != 'boolean') throw Error('Invalid boolean') + return tt + } + var props$4 = Object.freeze({ __proto__: null, schema: schema$4, sanitize: sanitize$5 }) + const StyledInputWrapper = styled$5('div', { + position: 'relative', + $flex: '', + height: '$rowHeight', + input: { $reset: '', height: 0, width: 0, opacity: 0, margin: 0 }, + label: { + position: 'relative', + $flexCenter: '', + userSelect: 'none', + cursor: 'pointer', + height: '$checkboxSize', + width: '$checkboxSize', + backgroundColor: '$elevation3', + borderRadius: '$sm', + $hover: '', + }, + 'input:focus + label': { $focusStyle: '' }, + 'input:focus:checked + label, input:checked + label:hover': { $hoverStyle: '$accent3' }, + 'input + label:active': { backgroundColor: '$accent1' }, + 'input:checked + label:active': { backgroundColor: '$accent1' }, + 'label > svg': { display: 'none', width: '90%', height: '90%', stroke: '$highlight3' }, + 'input:checked + label': { backgroundColor: '$accent2' }, + 'input:checked + label > svg': { display: 'block' }, + }) + function Boolean$1({ value: tt, onUpdate: et, id: nt, disabled: rt }) { + return React$1.createElement( + StyledInputWrapper, + null, + React$1.createElement('input', { + id: nt, + type: 'checkbox', + checked: tt, + onChange: (it) => et(it.currentTarget.checked), + disabled: rt, + }), + React$1.createElement( + 'label', + { htmlFor: nt }, + React$1.createElement( + 'svg', + { xmlns: 'http://www.w3.org/2000/svg', fill: 'none', viewBox: '0 0 24 24' }, + React$1.createElement('path', { + strokeLinecap: 'round', + strokeLinejoin: 'round', + strokeWidth: 2, + d: 'M5 13l4 4L19 7', + }), + ), + ), + ) + } + function BooleanComponent() { + const { label: tt, value: et, onUpdate: nt, disabled: rt, id: it } = useInputContext() + return React$1.createElement( + Row, + { input: !0 }, + React$1.createElement(Label$4, null, tt), + React$1.createElement(Boolean$1, { value: et, onUpdate: nt, id: it, disabled: rt }), + ) + } + var boolean = _objectSpread2$1({ component: BooleanComponent }, props$4) + const _excluded$1$4 = ['locked'] + function Coordinate({ value: tt, id: et, valueKey: nt, settings: rt, onUpdate: it, innerLabelTrim: ot }) { + const at = reactExports.useRef(tt[nt]) + at.current = tt[nt] + const st = reactExports.useCallback( + (ct) => it({ [nt]: sanitizeValue({ type: 'NUMBER', value: at.current, settings: rt }, ct) }), + [it, rt, nt], + ), + lt = useInputSetters({ type: 'NUMBER', value: tt[nt], settings: rt, setValue: st }) + return React$1.createElement(Number$1, { + id: et, + label: nt, + value: tt[nt], + displayValue: lt.displayValue, + onUpdate: lt.onUpdate, + onChange: lt.onChange, + settings: rt, + innerLabelTrim: ot, + }) + } + const Container$2 = styled$5('div', { + display: 'grid', + columnGap: '$colGap', + gridAutoFlow: 'column dense', + alignItems: 'center', + variants: { withLock: { true: { gridTemplateColumns: '10px auto', '> svg': { cursor: 'pointer' } } } }, + }) + function Lock(tt) { + let { locked: et } = tt, + nt = _objectWithoutProperties$l(tt, _excluded$1$4) + return React$1.createElement( + 'svg', + _extends$t( + { width: '10', height: '10', viewBox: '0 0 15 15', fill: 'none', xmlns: 'http://www.w3.org/2000/svg' }, + nt, + ), + et + ? React$1.createElement('path', { + d: 'M5 4.63601C5 3.76031 5.24219 3.1054 5.64323 2.67357C6.03934 2.24705 6.64582 1.9783 7.5014 1.9783C8.35745 1.9783 8.96306 2.24652 9.35823 2.67208C9.75838 3.10299 10 3.75708 10 4.63325V5.99999H5V4.63601ZM4 5.99999V4.63601C4 3.58148 4.29339 2.65754 4.91049 1.99307C5.53252 1.32329 6.42675 0.978302 7.5014 0.978302C8.57583 0.978302 9.46952 1.32233 10.091 1.99162C10.7076 2.65557 11 3.57896 11 4.63325V5.99999H12C12.5523 5.99999 13 6.44771 13 6.99999V13C13 13.5523 12.5523 14 12 14H3C2.44772 14 2 13.5523 2 13V6.99999C2 6.44771 2.44772 5.99999 3 5.99999H4ZM3 6.99999H12V13H3V6.99999Z', + fill: 'currentColor', + fillRule: 'evenodd', + clipRule: 'evenodd', + }) + : React$1.createElement('path', { + d: 'M9 3.63601C9 2.76044 9.24207 2.11211 9.64154 1.68623C10.0366 1.26502 10.6432 1 11.5014 1C12.4485 1 13.0839 1.30552 13.4722 1.80636C13.8031 2.23312 14 2.84313 14 3.63325H15C15 2.68242 14.7626 1.83856 14.2625 1.19361C13.6389 0.38943 12.6743 0 11.5014 0C10.4294 0 9.53523 0.337871 8.91218 1.0021C8.29351 1.66167 8 2.58135 8 3.63601V6H1C0.447715 6 0 6.44772 0 7V13C0 13.5523 0.447715 14 1 14H10C10.5523 14 11 13.5523 11 13V7C11 6.44772 10.5523 6 10 6H9V3.63601ZM1 7H10V13H1V7Z', + fill: 'currentColor', + fillRule: 'evenodd', + clipRule: 'evenodd', + }), + ) + } + function Vector({ value: tt, onUpdate: et, settings: nt, innerLabelTrim: rt }) { + const { id: it, setSettings: ot } = useInputContext(), + { lock: at, locked: st } = nt + return React$1.createElement( + Container$2, + { withLock: at }, + at && React$1.createElement(Lock, { locked: st, onClick: () => ot({ locked: !st }) }), + Object.keys(tt).map((lt, ct) => + React$1.createElement(Coordinate, { + id: ct === 0 ? it : `${it}.${lt}`, + key: lt, + valueKey: lt, + value: tt, + settings: nt[lt], + onUpdate: et, + innerLabelTrim: rt, + }), + ), + ) + } + const normalizeKeyedNumberSettings = (tt, et) => { + const nt = {} + let rt = 0, + it = 1 / 0 + Object.entries(tt).forEach(([ot, at]) => { + ;(nt[ot] = normalize$2$2(_objectSpread2$1({ value: at }, et[ot])).settings), + (rt = Math.max(rt, nt[ot].step)), + (it = Math.min(it, nt[ot].pad)) + }) + for (let ot in nt) { + const { step: at, min: st, max: lt } = et[ot] || {} + !isFinite(at) && (!isFinite(st) || !isFinite(lt)) && ((nt[ot].step = rt), (nt[ot].pad = it)) + } + return nt + }, + _excluded$1M = ['lock'], + _excluded2$j = ['value'] + function getVectorSchema(tt) { + const et = v8n().array().length(tt).every.number(), + nt = (rt) => { + if (!rt || typeof rt != 'object') return !1 + const it = Object.values(rt) + return it.length === tt && it.every((ot) => isFinite(ot)) + } + return (rt) => et.test(rt) || nt(rt) + } + function getVectorType(tt) { + return Array.isArray(tt) ? 'array' : 'object' + } + function convert$6(tt, et, nt) { + return getVectorType(tt) === et ? tt : et === 'array' ? Object.values(tt) : mapArrayToKeys(tt, nt) + } + const sanitizeVector = (tt, et, nt) => { + const rt = convert$6(tt, 'object', et.keys) + for (let at in rt) rt[at] = sanitize$3(rt[at], et[at]) + const it = Object.keys(rt) + let ot = {} + if (it.length === et.keys.length) ot = rt + else { + const at = convert$6(nt, 'object', et.keys) + if (it.length === 1 && et.locked) { + const st = it[0], + lt = rt[st], + ct = at[st], + ut = ct !== 0 ? lt / ct : 1 + for (let ht in at) ht === st ? (ot[st] = lt) : (ot[ht] = at[ht] * ut) + } else ot = _objectSpread2$1(_objectSpread2$1({}, at), rt) + } + return convert$6(ot, et.format, et.keys) + }, + formatVector = (tt, et) => convert$6(tt, 'object', et.keys), + isNumberSettings = (tt) => !!tt && ('step' in tt || 'min' in tt || 'max' in tt) + function normalizeVector(tt, et, nt = []) { + const { lock: rt = !1 } = et, + it = _objectWithoutProperties$l(et, _excluded$1M), + ot = Array.isArray(tt) ? 'array' : 'object', + at = ot === 'object' ? Object.keys(tt) : nt, + st = convert$6(tt, 'object', at), + lt = isNumberSettings(it) ? at.reduce((ut, ht) => Object.assign(ut, { [ht]: it }), {}) : it, + ct = normalizeKeyedNumberSettings(st, lt) + return { + value: ot === 'array' ? tt : st, + settings: _objectSpread2$1(_objectSpread2$1({}, ct), {}, { format: ot, keys: at, lock: rt, locked: !1 }), + } + } + function getVectorPlugin(tt) { + return { + schema: getVectorSchema(tt.length), + normalize: (et) => { + let { value: nt } = et, + rt = _objectWithoutProperties$l(et, _excluded2$j) + return normalizeVector(nt, rt, tt) + }, + format: (et, nt) => formatVector(et, nt), + sanitize: (et, nt, rt) => sanitizeVector(et, nt, rt), + } + } + var r$b = { grad: 0.9, turn: 360, rad: 360 / (2 * Math.PI) }, + t$6 = function (tt) { + return typeof tt == 'string' ? tt.length > 0 : typeof tt == 'number' + }, + n$6 = function (tt, et, nt) { + return et === void 0 && (et = 0), nt === void 0 && (nt = Math.pow(10, et)), Math.round(nt * tt) / nt + 0 + }, + e$5 = function (tt, et, nt) { + return et === void 0 && (et = 0), nt === void 0 && (nt = 1), tt > nt ? nt : tt > et ? tt : et + }, + u$5 = function (tt) { + return (tt = isFinite(tt) ? tt % 360 : 0) > 0 ? tt : tt + 360 + }, + a$3 = function (tt) { + return { r: e$5(tt.r, 0, 255), g: e$5(tt.g, 0, 255), b: e$5(tt.b, 0, 255), a: e$5(tt.a) } + }, + o$1 = function (tt) { + return { r: n$6(tt.r), g: n$6(tt.g), b: n$6(tt.b), a: n$6(tt.a, 3) } + }, + i$6 = /^#([0-9a-f]{3,8})$/i, + s$4 = function (tt) { + var et = tt.toString(16) + return et.length < 2 ? '0' + et : et + }, + h$9 = function (tt) { + var et = tt.r, + nt = tt.g, + rt = tt.b, + it = tt.a, + ot = Math.max(et, nt, rt), + at = ot - Math.min(et, nt, rt), + st = at ? (ot === et ? (nt - rt) / at : ot === nt ? 2 + (rt - et) / at : 4 + (et - nt) / at) : 0 + return { h: 60 * (st < 0 ? st + 6 : st), s: ot ? (at / ot) * 100 : 0, v: (ot / 255) * 100, a: it } + }, + b$6 = function (tt) { + var et = tt.h, + nt = tt.s, + rt = tt.v, + it = tt.a + ;(et = (et / 360) * 6), (nt /= 100), (rt /= 100) + var ot = Math.floor(et), + at = rt * (1 - nt), + st = rt * (1 - (et - ot) * nt), + lt = rt * (1 - (1 - et + ot) * nt), + ct = ot % 6 + return { + r: 255 * [rt, st, at, at, lt, rt][ct], + g: 255 * [lt, rt, rt, st, at, at][ct], + b: 255 * [at, at, lt, rt, rt, st][ct], + a: it, + } + }, + g$8 = function (tt) { + return { h: u$5(tt.h), s: e$5(tt.s, 0, 100), l: e$5(tt.l, 0, 100), a: e$5(tt.a) } + }, + d$5 = function (tt) { + return { h: n$6(tt.h), s: n$6(tt.s), l: n$6(tt.l), a: n$6(tt.a, 3) } + }, + f$7 = function (tt) { + return b$6( + ((nt = (et = tt).s), + { + h: et.h, + s: (nt *= ((rt = et.l) < 50 ? rt : 100 - rt) / 100) > 0 ? ((2 * nt) / (rt + nt)) * 100 : 0, + v: rt + nt, + a: et.a, + }), + ) + var et, nt, rt + }, + c$8 = function (tt) { + return { + h: (et = h$9(tt)).h, + s: + (it = ((200 - (nt = et.s)) * (rt = et.v)) / 100) > 0 && it < 200 + ? ((nt * rt) / 100 / (it <= 100 ? it : 200 - it)) * 100 + : 0, + l: it / 2, + a: et.a, + } + var et, nt, rt, it + }, + l$5 = + /^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i, + p$8 = + /^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i, + v$8 = + /^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i, + m$8 = + /^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i, + y$7 = { + string: [ + [ + function (tt) { + var et = i$6.exec(tt) + return et + ? (tt = et[1]).length <= 4 + ? { + r: parseInt(tt[0] + tt[0], 16), + g: parseInt(tt[1] + tt[1], 16), + b: parseInt(tt[2] + tt[2], 16), + a: tt.length === 4 ? n$6(parseInt(tt[3] + tt[3], 16) / 255, 2) : 1, + } + : tt.length === 6 || tt.length === 8 + ? { + r: parseInt(tt.substr(0, 2), 16), + g: parseInt(tt.substr(2, 2), 16), + b: parseInt(tt.substr(4, 2), 16), + a: tt.length === 8 ? n$6(parseInt(tt.substr(6, 2), 16) / 255, 2) : 1, + } + : null + : null + }, + 'hex', + ], + [ + function (tt) { + var et = v$8.exec(tt) || m$8.exec(tt) + return et + ? et[2] !== et[4] || et[4] !== et[6] + ? null + : a$3({ + r: Number(et[1]) / (et[2] ? 100 / 255 : 1), + g: Number(et[3]) / (et[4] ? 100 / 255 : 1), + b: Number(et[5]) / (et[6] ? 100 / 255 : 1), + a: et[7] === void 0 ? 1 : Number(et[7]) / (et[8] ? 100 : 1), + }) + : null + }, + 'rgb', + ], + [ + function (tt) { + var et = l$5.exec(tt) || p$8.exec(tt) + if (!et) return null + var nt, + rt, + it = g$8({ + h: ((nt = et[1]), (rt = et[2]), rt === void 0 && (rt = 'deg'), Number(nt) * (r$b[rt] || 1)), + s: Number(et[3]), + l: Number(et[4]), + a: et[5] === void 0 ? 1 : Number(et[5]) / (et[6] ? 100 : 1), + }) + return f$7(it) + }, + 'hsl', + ], + ], + object: [ + [ + function (tt) { + var et = tt.r, + nt = tt.g, + rt = tt.b, + it = tt.a, + ot = it === void 0 ? 1 : it + return t$6(et) && t$6(nt) && t$6(rt) + ? a$3({ r: Number(et), g: Number(nt), b: Number(rt), a: Number(ot) }) + : null + }, + 'rgb', + ], + [ + function (tt) { + var et = tt.h, + nt = tt.s, + rt = tt.l, + it = tt.a, + ot = it === void 0 ? 1 : it + if (!t$6(et) || !t$6(nt) || !t$6(rt)) return null + var at = g$8({ h: Number(et), s: Number(nt), l: Number(rt), a: Number(ot) }) + return f$7(at) + }, + 'hsl', + ], + [ + function (tt) { + var et = tt.h, + nt = tt.s, + rt = tt.v, + it = tt.a, + ot = it === void 0 ? 1 : it + if (!t$6(et) || !t$6(nt) || !t$6(rt)) return null + var at = (function (st) { + return { h: u$5(st.h), s: e$5(st.s, 0, 100), v: e$5(st.v, 0, 100), a: e$5(st.a) } + })({ h: Number(et), s: Number(nt), v: Number(rt), a: Number(ot) }) + return b$6(at) + }, + 'hsv', + ], + ], + }, + N$1 = function (tt, et) { + for (var nt = 0; nt < et.length; nt++) { + var rt = et[nt][0](tt) + if (rt) return [rt, et[nt][1]] + } + return [null, void 0] + }, + x$7 = function (tt) { + return typeof tt == 'string' + ? N$1(tt.trim(), y$7.string) + : typeof tt == 'object' && tt !== null + ? N$1(tt, y$7.object) + : [null, void 0] + }, + I$2 = function (tt) { + return x$7(tt)[1] + }, + M$1 = function (tt, et) { + var nt = c$8(tt) + return { h: nt.h, s: e$5(nt.s + 100 * et, 0, 100), l: nt.l, a: nt.a } + }, + H$1 = function (tt) { + return (299 * tt.r + 587 * tt.g + 114 * tt.b) / 1e3 / 255 + }, + $$2 = function (tt, et) { + var nt = c$8(tt) + return { h: nt.h, s: nt.s, l: e$5(nt.l + 100 * et, 0, 100), a: nt.a } + }, + j$1 = (function () { + function tt(et) { + ;(this.parsed = x$7(et)[0]), (this.rgba = this.parsed || { r: 0, g: 0, b: 0, a: 1 }) + } + return ( + (tt.prototype.isValid = function () { + return this.parsed !== null + }), + (tt.prototype.brightness = function () { + return n$6(H$1(this.rgba), 2) + }), + (tt.prototype.isDark = function () { + return H$1(this.rgba) < 0.5 + }), + (tt.prototype.isLight = function () { + return H$1(this.rgba) >= 0.5 + }), + (tt.prototype.toHex = function () { + return ( + (et = o$1(this.rgba)), + (nt = et.r), + (rt = et.g), + (it = et.b), + (at = (ot = et.a) < 1 ? s$4(n$6(255 * ot)) : ''), + '#' + s$4(nt) + s$4(rt) + s$4(it) + at + ) + var et, nt, rt, it, ot, at + }), + (tt.prototype.toRgb = function () { + return o$1(this.rgba) + }), + (tt.prototype.toRgbString = function () { + return ( + (et = o$1(this.rgba)), + (nt = et.r), + (rt = et.g), + (it = et.b), + (ot = et.a) < 1 + ? 'rgba(' + nt + ', ' + rt + ', ' + it + ', ' + ot + ')' + : 'rgb(' + nt + ', ' + rt + ', ' + it + ')' + ) + var et, nt, rt, it, ot + }), + (tt.prototype.toHsl = function () { + return d$5(c$8(this.rgba)) + }), + (tt.prototype.toHslString = function () { + return ( + (et = d$5(c$8(this.rgba))), + (nt = et.h), + (rt = et.s), + (it = et.l), + (ot = et.a) < 1 + ? 'hsla(' + nt + ', ' + rt + '%, ' + it + '%, ' + ot + ')' + : 'hsl(' + nt + ', ' + rt + '%, ' + it + '%)' + ) + var et, nt, rt, it, ot + }), + (tt.prototype.toHsv = function () { + return (et = h$9(this.rgba)), { h: n$6(et.h), s: n$6(et.s), v: n$6(et.v), a: n$6(et.a, 3) } + var et + }), + (tt.prototype.invert = function () { + return w$5({ r: 255 - (et = this.rgba).r, g: 255 - et.g, b: 255 - et.b, a: et.a }) + var et + }), + (tt.prototype.saturate = function (et) { + return et === void 0 && (et = 0.1), w$5(M$1(this.rgba, et)) + }), + (tt.prototype.desaturate = function (et) { + return et === void 0 && (et = 0.1), w$5(M$1(this.rgba, -et)) + }), + (tt.prototype.grayscale = function () { + return w$5(M$1(this.rgba, -1)) + }), + (tt.prototype.lighten = function (et) { + return et === void 0 && (et = 0.1), w$5($$2(this.rgba, et)) + }), + (tt.prototype.darken = function (et) { + return et === void 0 && (et = 0.1), w$5($$2(this.rgba, -et)) + }), + (tt.prototype.rotate = function (et) { + return et === void 0 && (et = 15), this.hue(this.hue() + et) + }), + (tt.prototype.alpha = function (et) { + return typeof et == 'number' ? w$5({ r: (nt = this.rgba).r, g: nt.g, b: nt.b, a: et }) : n$6(this.rgba.a, 3) + var nt + }), + (tt.prototype.hue = function (et) { + var nt = c$8(this.rgba) + return typeof et == 'number' ? w$5({ h: et, s: nt.s, l: nt.l, a: nt.a }) : n$6(nt.h) + }), + (tt.prototype.isEqual = function (et) { + return this.toHex() === w$5(et).toHex() + }), + tt + ) + })(), + w$5 = function (tt) { + return tt instanceof j$1 ? tt : new j$1(tt) + }, + S$2 = [], + k$8 = function (tt) { + tt.forEach(function (et) { + S$2.indexOf(et) < 0 && (et(j$1, y$7), S$2.push(et)) + }) + } + function namesPlugin(tt, et) { + var nt = { + white: '#ffffff', + bisque: '#ffe4c4', + blue: '#0000ff', + cadetblue: '#5f9ea0', + chartreuse: '#7fff00', + chocolate: '#d2691e', + coral: '#ff7f50', + antiquewhite: '#faebd7', + aqua: '#00ffff', + azure: '#f0ffff', + whitesmoke: '#f5f5f5', + papayawhip: '#ffefd5', + plum: '#dda0dd', + blanchedalmond: '#ffebcd', + black: '#000000', + gold: '#ffd700', + goldenrod: '#daa520', + gainsboro: '#dcdcdc', + cornsilk: '#fff8dc', + cornflowerblue: '#6495ed', + burlywood: '#deb887', + aquamarine: '#7fffd4', + beige: '#f5f5dc', + crimson: '#dc143c', + cyan: '#00ffff', + darkblue: '#00008b', + darkcyan: '#008b8b', + darkgoldenrod: '#b8860b', + darkkhaki: '#bdb76b', + darkgray: '#a9a9a9', + darkgreen: '#006400', + darkgrey: '#a9a9a9', + peachpuff: '#ffdab9', + darkmagenta: '#8b008b', + darkred: '#8b0000', + darkorchid: '#9932cc', + darkorange: '#ff8c00', + darkslateblue: '#483d8b', + gray: '#808080', + darkslategray: '#2f4f4f', + darkslategrey: '#2f4f4f', + deeppink: '#ff1493', + deepskyblue: '#00bfff', + wheat: '#f5deb3', + firebrick: '#b22222', + floralwhite: '#fffaf0', + ghostwhite: '#f8f8ff', + darkviolet: '#9400d3', + magenta: '#ff00ff', + green: '#008000', + dodgerblue: '#1e90ff', + grey: '#808080', + honeydew: '#f0fff0', + hotpink: '#ff69b4', + blueviolet: '#8a2be2', + forestgreen: '#228b22', + lawngreen: '#7cfc00', + indianred: '#cd5c5c', + indigo: '#4b0082', + fuchsia: '#ff00ff', + brown: '#a52a2a', + maroon: '#800000', + mediumblue: '#0000cd', + lightcoral: '#f08080', + darkturquoise: '#00ced1', + lightcyan: '#e0ffff', + ivory: '#fffff0', + lightyellow: '#ffffe0', + lightsalmon: '#ffa07a', + lightseagreen: '#20b2aa', + linen: '#faf0e6', + mediumaquamarine: '#66cdaa', + lemonchiffon: '#fffacd', + lime: '#00ff00', + khaki: '#f0e68c', + mediumseagreen: '#3cb371', + limegreen: '#32cd32', + mediumspringgreen: '#00fa9a', + lightskyblue: '#87cefa', + lightblue: '#add8e6', + midnightblue: '#191970', + lightpink: '#ffb6c1', + mistyrose: '#ffe4e1', + moccasin: '#ffe4b5', + mintcream: '#f5fffa', + lightslategray: '#778899', + lightslategrey: '#778899', + navajowhite: '#ffdead', + navy: '#000080', + mediumvioletred: '#c71585', + powderblue: '#b0e0e6', + palegoldenrod: '#eee8aa', + oldlace: '#fdf5e6', + paleturquoise: '#afeeee', + mediumturquoise: '#48d1cc', + mediumorchid: '#ba55d3', + rebeccapurple: '#663399', + lightsteelblue: '#b0c4de', + mediumslateblue: '#7b68ee', + thistle: '#d8bfd8', + tan: '#d2b48c', + orchid: '#da70d6', + mediumpurple: '#9370db', + purple: '#800080', + pink: '#ffc0cb', + skyblue: '#87ceeb', + springgreen: '#00ff7f', + palegreen: '#98fb98', + red: '#ff0000', + yellow: '#ffff00', + slateblue: '#6a5acd', + lavenderblush: '#fff0f5', + peru: '#cd853f', + palevioletred: '#db7093', + violet: '#ee82ee', + teal: '#008080', + slategray: '#708090', + slategrey: '#708090', + aliceblue: '#f0f8ff', + darkseagreen: '#8fbc8f', + darkolivegreen: '#556b2f', + greenyellow: '#adff2f', + seagreen: '#2e8b57', + seashell: '#fff5ee', + tomato: '#ff6347', + silver: '#c0c0c0', + sienna: '#a0522d', + lavender: '#e6e6fa', + lightgreen: '#90ee90', + orange: '#ffa500', + orangered: '#ff4500', + steelblue: '#4682b4', + royalblue: '#4169e1', + turquoise: '#40e0d0', + yellowgreen: '#9acd32', + salmon: '#fa8072', + saddlebrown: '#8b4513', + sandybrown: '#f4a460', + rosybrown: '#bc8f8f', + darksalmon: '#e9967a', + lightgoldenrodyellow: '#fafad2', + snow: '#fffafa', + lightgrey: '#d3d3d3', + lightgray: '#d3d3d3', + dimgray: '#696969', + dimgrey: '#696969', + olivedrab: '#6b8e23', + olive: '#808000', + }, + rt = {} + for (var it in nt) rt[nt[it]] = it + var ot = {} + ;(tt.prototype.toName = function (at) { + if (!(this.rgba.a || this.rgba.r || this.rgba.g || this.rgba.b)) return 'transparent' + var st, + lt, + ct = rt[this.toHex()] + if (ct) return ct + if (at != null && at.closest) { + var ut = this.toRgb(), + ht = 1 / 0, + dt = 'black' + if (!ot.length) for (var pt in nt) ot[pt] = new tt(nt[pt]).toRgb() + for (var mt in nt) { + var gt = + ((st = ut), (lt = ot[mt]), Math.pow(st.r - lt.r, 2) + Math.pow(st.g - lt.g, 2) + Math.pow(st.b - lt.b, 2)) + gt < ht && ((ht = gt), (dt = mt)) + } + return dt + } + }), + et.string.push([ + function (at) { + var st = at.toLowerCase(), + lt = st === 'transparent' ? '#0000' : nt[st] + return lt ? new tt(lt).toRgb() : null + }, + 'name', + ]) + } + function u$4() { + return (u$4 = + Object.assign || + function (tt) { + for (var et = 1; et < arguments.length; et++) { + var nt = arguments[et] + for (var rt in nt) Object.prototype.hasOwnProperty.call(nt, rt) && (tt[rt] = nt[rt]) + } + return tt + }).apply(this, arguments) + } + function c$7(tt, et) { + if (tt == null) return {} + var nt, + rt, + it = {}, + ot = Object.keys(tt) + for (rt = 0; rt < ot.length; rt++) et.indexOf((nt = ot[rt])) >= 0 || (it[nt] = tt[nt]) + return it + } + function i$5(tt) { + var et = reactExports.useRef(tt), + nt = reactExports.useRef(function (rt) { + et.current && et.current(rt) + }) + return (et.current = tt), nt.current + } + var s$3 = function (tt, et, nt) { + return et === void 0 && (et = 0), nt === void 0 && (nt = 1), tt > nt ? nt : tt < et ? et : tt + }, + f$6 = function (tt) { + return 'touches' in tt + }, + v$7 = function (tt) { + return (tt && tt.ownerDocument.defaultView) || self + }, + d$4 = function (tt, et, nt) { + var rt = tt.getBoundingClientRect(), + it = f$6(et) + ? (function (ot, at) { + for (var st = 0; st < ot.length; st++) if (ot[st].identifier === at) return ot[st] + return ot[0] + })(et.touches, nt) + : et + return { + left: s$3((it.pageX - (rt.left + v$7(tt).pageXOffset)) / rt.width), + top: s$3((it.pageY - (rt.top + v$7(tt).pageYOffset)) / rt.height), + } + }, + h$8 = function (tt) { + !f$6(tt) && tt.preventDefault() + }, + m$7 = React$1.memo(function (tt) { + var et = tt.onMove, + nt = tt.onKey, + rt = c$7(tt, ['onMove', 'onKey']), + it = reactExports.useRef(null), + ot = i$5(et), + at = i$5(nt), + st = reactExports.useRef(null), + lt = reactExports.useRef(!1), + ct = reactExports.useMemo( + function () { + var pt = function (yt) { + h$8(yt), + (f$6(yt) ? yt.touches.length > 0 : yt.buttons > 0) && it.current + ? ot(d$4(it.current, yt, st.current)) + : gt(!1) + }, + mt = function () { + return gt(!1) + } + function gt(yt) { + var bt = lt.current, + vt = v$7(it.current), + xt = yt ? vt.addEventListener : vt.removeEventListener + xt(bt ? 'touchmove' : 'mousemove', pt), xt(bt ? 'touchend' : 'mouseup', mt) + } + return [ + function (yt) { + var bt = yt.nativeEvent, + vt = it.current + if ( + vt && + (h$8(bt), + !(function (kt, St) { + return St && !f$6(kt) + })(bt, lt.current) && vt) + ) { + if (f$6(bt)) { + lt.current = !0 + var xt = bt.changedTouches || [] + xt.length && (st.current = xt[0].identifier) + } + vt.focus(), ot(d$4(vt, bt, st.current)), gt(!0) + } + }, + function (yt) { + var bt = yt.which || yt.keyCode + bt < 37 || + bt > 40 || + (yt.preventDefault(), + at({ left: bt === 39 ? 0.05 : bt === 37 ? -0.05 : 0, top: bt === 40 ? 0.05 : bt === 38 ? -0.05 : 0 })) + }, + gt, + ] + }, + [at, ot], + ), + ut = ct[0], + ht = ct[1], + dt = ct[2] + return ( + reactExports.useEffect( + function () { + return dt + }, + [dt], + ), + React$1.createElement( + 'div', + u$4({}, rt, { + onTouchStart: ut, + onMouseDown: ut, + className: 'react-colorful__interactive', + ref: it, + onKeyDown: ht, + tabIndex: 0, + role: 'slider', + }), + ) + ) + }), + g$7 = function (tt) { + return tt.filter(Boolean).join(' ') + }, + p$7 = function (tt) { + var et = tt.color, + nt = tt.left, + rt = tt.top, + it = rt === void 0 ? 0.5 : rt, + ot = g$7(['react-colorful__pointer', tt.className]) + return React$1.createElement( + 'div', + { className: ot, style: { top: 100 * it + '%', left: 100 * nt + '%' } }, + React$1.createElement('div', { className: 'react-colorful__pointer-fill', style: { backgroundColor: et } }), + ) + }, + b$5 = function (tt, et, nt) { + return et === void 0 && (et = 0), nt === void 0 && (nt = Math.pow(10, et)), Math.round(nt * tt) / nt + }, + y$6 = function (tt) { + var et = tt.s, + nt = tt.v, + rt = tt.a, + it = ((200 - et) * nt) / 100 + return { + h: b$5(tt.h), + s: b$5(it > 0 && it < 200 ? ((et * nt) / 100 / (it <= 100 ? it : 200 - it)) * 100 : 0), + l: b$5(it / 2), + a: b$5(rt, 2), + } + }, + q$6 = function (tt) { + var et = y$6(tt) + return 'hsl(' + et.h + ', ' + et.s + '%, ' + et.l + '%)' + }, + k$7 = function (tt) { + var et = y$6(tt) + return 'hsla(' + et.h + ', ' + et.s + '%, ' + et.l + '%, ' + et.a + ')' + }, + I$1 = function (tt) { + var et = tt.h, + nt = tt.s, + rt = tt.v, + it = tt.a + ;(et = (et / 360) * 6), (nt /= 100), (rt /= 100) + var ot = Math.floor(et), + at = rt * (1 - nt), + st = rt * (1 - (et - ot) * nt), + lt = rt * (1 - (1 - et + ot) * nt), + ct = ot % 6 + return { + r: b$5(255 * [rt, st, at, at, lt, rt][ct]), + g: b$5(255 * [lt, rt, rt, st, at, at][ct]), + b: b$5(255 * [at, at, lt, rt, rt, st][ct]), + a: b$5(it, 2), + } + }, + L$1 = function (tt) { + var et = tt.r, + nt = tt.g, + rt = tt.b, + it = tt.a, + ot = Math.max(et, nt, rt), + at = ot - Math.min(et, nt, rt), + st = at ? (ot === et ? (nt - rt) / at : ot === nt ? 2 + (rt - et) / at : 4 + (et - nt) / at) : 0 + return { h: b$5(60 * (st < 0 ? st + 6 : st)), s: b$5(ot ? (at / ot) * 100 : 0), v: b$5((ot / 255) * 100), a: it } + }, + S$1 = React$1.memo(function (tt) { + var et = tt.hue, + nt = tt.onChange, + rt = g$7(['react-colorful__hue', tt.className]) + return React$1.createElement( + 'div', + { className: rt }, + React$1.createElement( + m$7, + { + onMove: function (it) { + nt({ h: 360 * it.left }) + }, + onKey: function (it) { + nt({ h: s$3(et + 360 * it.left, 0, 360) }) + }, + 'aria-label': 'Hue', + 'aria-valuenow': b$5(et), + 'aria-valuemax': '360', + 'aria-valuemin': '0', + }, + React$1.createElement(p$7, { + className: 'react-colorful__hue-pointer', + left: et / 360, + color: q$6({ h: et, s: 100, v: 100, a: 1 }), + }), + ), + ) + }), + T$1 = React$1.memo(function (tt) { + var et = tt.hsva, + nt = tt.onChange, + rt = { backgroundColor: q$6({ h: et.h, s: 100, v: 100, a: 1 }) } + return React$1.createElement( + 'div', + { className: 'react-colorful__saturation', style: rt }, + React$1.createElement( + m$7, + { + onMove: function (it) { + nt({ s: 100 * it.left, v: 100 - 100 * it.top }) + }, + onKey: function (it) { + nt({ s: s$3(et.s + 100 * it.left, 0, 100), v: s$3(et.v - 100 * it.top, 0, 100) }) + }, + 'aria-label': 'Color', + 'aria-valuetext': 'Saturation ' + b$5(et.s) + '%, Brightness ' + b$5(et.v) + '%', + }, + React$1.createElement(p$7, { + className: 'react-colorful__saturation-pointer', + top: 1 - et.v / 100, + left: et.s / 100, + color: q$6(et), + }), + ), + ) + }), + F$1 = function (tt, et) { + if (tt === et) return !0 + for (var nt in tt) if (tt[nt] !== et[nt]) return !1 + return !0 + } + function Y$1(tt, et, nt) { + var rt = i$5(nt), + it = reactExports.useState(function () { + return tt.toHsva(et) + }), + ot = it[0], + at = it[1], + st = reactExports.useRef({ color: et, hsva: ot }) + reactExports.useEffect( + function () { + if (!tt.equal(et, st.current.color)) { + var ct = tt.toHsva(et) + ;(st.current = { hsva: ct, color: et }), at(ct) + } + }, + [et, tt], + ), + reactExports.useEffect( + function () { + var ct + F$1(ot, st.current.hsva) || + tt.equal((ct = tt.fromHsva(ot)), st.current.color) || + ((st.current = { hsva: ot, color: ct }), rt(ct)) + }, + [ot, tt, rt], + ) + var lt = reactExports.useCallback(function (ct) { + at(function (ut) { + return Object.assign({}, ut, ct) + }) + }, []) + return [ot, lt] + } + var V$1 = typeof window < 'u' ? reactExports.useLayoutEffect : reactExports.useEffect, + $$1 = function () { + return typeof __webpack_nonce__ < 'u' ? __webpack_nonce__ : void 0 + }, + J$1 = new Map(), + Q$1 = function (tt) { + V$1(function () { + var et = tt.current ? tt.current.ownerDocument : document + if (et !== void 0 && !J$1.has(et)) { + var nt = et.createElement('style') + ;(nt.innerHTML = `.react-colorful{position:relative;display:flex;flex-direction:column;width:200px;height:200px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.react-colorful__saturation{position:relative;flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(0deg,#000,transparent),linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.react-colorful__alpha-gradient,.react-colorful__pointer-fill{content:"";position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;border-radius:inherit}.react-colorful__alpha-gradient,.react-colorful__saturation{box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}.react-colorful__alpha,.react-colorful__hue{position:relative;height:24px}.react-colorful__hue{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.react-colorful__last-control{border-radius:0 0 8px 8px}.react-colorful__interactive{position:absolute;left:0;top:0;right:0;bottom:0;border-radius:inherit;outline:none;touch-action:none}.react-colorful__pointer{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}.react-colorful__interactive:focus .react-colorful__pointer{transform:translate(-50%,-50%) scale(1.1)}.react-colorful__alpha,.react-colorful__alpha-pointer{background-color:#fff;background-image:url('data:image/svg+xml;charset=utf-8,')}.react-colorful__saturation-pointer{z-index:3}.react-colorful__hue-pointer{z-index:2}`), + J$1.set(et, nt) + var rt = $$1() + rt && nt.setAttribute('nonce', rt), et.head.appendChild(nt) + } + }, []) + }, + U$1 = function (tt) { + var et = tt.className, + nt = tt.colorModel, + rt = tt.color, + it = rt === void 0 ? nt.defaultColor : rt, + ot = tt.onChange, + at = c$7(tt, ['className', 'colorModel', 'color', 'onChange']), + st = reactExports.useRef(null) + Q$1(st) + var lt = Y$1(nt, it, ot), + ct = lt[0], + ut = lt[1], + ht = g$7(['react-colorful', et]) + return React$1.createElement( + 'div', + u$4({}, at, { ref: st, className: ht }), + React$1.createElement(T$1, { hsva: ct, onChange: ut }), + React$1.createElement(S$1, { hue: ct.h, onChange: ut, className: 'react-colorful__last-control' }), + ) + }, + ee$1 = function (tt) { + var et = tt.className, + nt = tt.hsva, + rt = tt.onChange, + it = { + backgroundImage: + 'linear-gradient(90deg, ' + + k$7(Object.assign({}, nt, { a: 0 })) + + ', ' + + k$7(Object.assign({}, nt, { a: 1 })) + + ')', + }, + ot = g$7(['react-colorful__alpha', et]), + at = b$5(100 * nt.a) + return React$1.createElement( + 'div', + { className: ot }, + React$1.createElement('div', { className: 'react-colorful__alpha-gradient', style: it }), + React$1.createElement( + m$7, + { + onMove: function (st) { + rt({ a: st.left }) + }, + onKey: function (st) { + rt({ a: s$3(nt.a + st.left) }) + }, + 'aria-label': 'Alpha', + 'aria-valuetext': at + '%', + 'aria-valuenow': at, + 'aria-valuemin': '0', + 'aria-valuemax': '100', + }, + React$1.createElement(p$7, { className: 'react-colorful__alpha-pointer', left: nt.a, color: k$7(nt) }), + ), + ) + }, + re$3 = function (tt) { + var et = tt.className, + nt = tt.colorModel, + rt = tt.color, + it = rt === void 0 ? nt.defaultColor : rt, + ot = tt.onChange, + at = c$7(tt, ['className', 'colorModel', 'color', 'onChange']), + st = reactExports.useRef(null) + Q$1(st) + var lt = Y$1(nt, it, ot), + ct = lt[0], + ut = lt[1], + ht = g$7(['react-colorful', et]) + return React$1.createElement( + 'div', + u$4({}, at, { ref: st, className: ht }), + React$1.createElement(T$1, { hsva: ct, onChange: ut }), + React$1.createElement(S$1, { hue: ct.h, onChange: ut }), + React$1.createElement(ee$1, { hsva: ct, onChange: ut, className: 'react-colorful__last-control' }), + ) + }, + xe$1 = { defaultColor: { r: 0, g: 0, b: 0, a: 1 }, toHsva: L$1, fromHsva: I$1, equal: F$1 }, + Ce = function (tt) { + return React$1.createElement(re$3, u$4({}, tt, { colorModel: xe$1 })) + }, + Me$1 = { + defaultColor: { r: 0, g: 0, b: 0 }, + toHsva: function (tt) { + return L$1({ r: tt.r, g: tt.g, b: tt.b, a: 1 }) + }, + fromHsva: function (tt) { + return { r: (et = I$1(tt)).r, g: et.g, b: et.b } + var et + }, + equal: F$1, + }, + Ne$1 = function (tt) { + return React$1.createElement(U$1, u$4({}, tt, { colorModel: Me$1 })) + }, + propTypes$1 = { exports: {} }, + ReactPropTypesSecret$1 = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED', + ReactPropTypesSecret_1 = ReactPropTypesSecret$1, + ReactPropTypesSecret = ReactPropTypesSecret_1 + function emptyFunction() {} + function emptyFunctionWithReset() {} + emptyFunctionWithReset.resetWarningCache = emptyFunction + var factoryWithThrowingShims = function () { + function tt(rt, it, ot, at, st, lt) { + if (lt !== ReactPropTypesSecret) { + var ct = new Error( + 'Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types', + ) + throw ((ct.name = 'Invariant Violation'), ct) + } + } + tt.isRequired = tt + function et() { + return tt + } + var nt = { + array: tt, + bigint: tt, + bool: tt, + func: tt, + number: tt, + object: tt, + string: tt, + symbol: tt, + any: tt, + arrayOf: et, + element: tt, + elementType: tt, + instanceOf: et, + node: tt, + objectOf: et, + oneOf: et, + oneOfType: et, + shape: et, + exact: et, + checkPropTypes: emptyFunctionWithReset, + resetWarningCache: emptyFunction, + } + return (nt.PropTypes = nt), nt + } + propTypes$1.exports = factoryWithThrowingShims() + var propTypesExports = propTypes$1.exports + const PropTypes = getDefaultExportFromCjs(propTypesExports) + function __decorate(tt, et, nt, rt) { + var it = arguments.length, + ot = it < 3 ? et : rt === null ? (rt = Object.getOwnPropertyDescriptor(et, nt)) : rt, + at + if (typeof Reflect == 'object' && typeof Reflect.decorate == 'function') ot = Reflect.decorate(tt, et, nt, rt) + else + for (var st = tt.length - 1; st >= 0; st--) + (at = tt[st]) && (ot = (it < 3 ? at(ot) : it > 3 ? at(et, nt, ot) : at(et, nt)) || ot) + return it > 3 && ot && Object.defineProperty(et, nt, ot), ot + } + function __awaiter(tt, et, nt, rt) { + function it(ot) { + return ot instanceof nt + ? ot + : new nt(function (at) { + at(ot) + }) + } + return new (nt || (nt = Promise))(function (ot, at) { + function st(ut) { + try { + ct(rt.next(ut)) + } catch (ht) { + at(ht) + } + } + function lt(ut) { + try { + ct(rt.throw(ut)) + } catch (ht) { + at(ht) + } + } + function ct(ut) { + ut.done ? ot(ut.value) : it(ut.value).then(st, lt) + } + ct((rt = rt.apply(tt, et || [])).next()) + }) + } + function __generator(tt, et) { + var nt = { + label: 0, + sent: function () { + if (ot[0] & 1) throw ot[1] + return ot[1] + }, + trys: [], + ops: [], + }, + rt, + it, + ot, + at + return ( + (at = { next: st(0), throw: st(1), return: st(2) }), + typeof Symbol == 'function' && + (at[Symbol.iterator] = function () { + return this + }), + at + ) + function st(ct) { + return function (ut) { + return lt([ct, ut]) + } + } + function lt(ct) { + if (rt) throw new TypeError('Generator is already executing.') + for (; at && ((at = 0), ct[0] && (nt = 0)), nt; ) + try { + if ( + ((rt = 1), + it && + (ot = ct[0] & 2 ? it.return : ct[0] ? it.throw || ((ot = it.return) && ot.call(it), 0) : it.next) && + !(ot = ot.call(it, ct[1])).done) + ) + return ot + switch (((it = 0), ot && (ct = [ct[0] & 2, ot.value]), ct[0])) { + case 0: + case 1: + ot = ct + break + case 4: + return nt.label++, { value: ct[1], done: !1 } + case 5: + nt.label++, (it = ct[1]), (ct = [0]) + continue + case 7: + ;(ct = nt.ops.pop()), nt.trys.pop() + continue + default: + if (((ot = nt.trys), !(ot = ot.length > 0 && ot[ot.length - 1]) && (ct[0] === 6 || ct[0] === 2))) { + nt = 0 + continue + } + if (ct[0] === 3 && (!ot || (ct[1] > ot[0] && ct[1] < ot[3]))) { + nt.label = ct[1] + break + } + if (ct[0] === 6 && nt.label < ot[1]) { + ;(nt.label = ot[1]), (ot = ct) + break + } + if (ot && nt.label < ot[2]) { + ;(nt.label = ot[2]), nt.ops.push(ct) + break + } + ot[2] && nt.ops.pop(), nt.trys.pop() + continue + } + ct = et.call(tt, nt) + } catch (ut) { + ;(ct = [6, ut]), (it = 0) + } finally { + rt = ot = 0 + } + if (ct[0] & 5) throw ct[1] + return { value: ct[0] ? ct[1] : void 0, done: !0 } + } + } + function __read(tt, et) { + var nt = typeof Symbol == 'function' && tt[Symbol.iterator] + if (!nt) return tt + var rt = nt.call(tt), + it, + ot = [], + at + try { + for (; (et === void 0 || et-- > 0) && !(it = rt.next()).done; ) ot.push(it.value) + } catch (st) { + at = { error: st } + } finally { + try { + it && !it.done && (nt = rt.return) && nt.call(rt) + } finally { + if (at) throw at.error + } + } + return ot + } + function __spread() { + for (var tt = [], et = 0; et < arguments.length; et++) tt = tt.concat(__read(arguments[et])) + return tt + } + typeof SuppressedError == 'function' && SuppressedError + var COMMON_MIME_TYPES = new Map([ + ['aac', 'audio/aac'], + ['abw', 'application/x-abiword'], + ['arc', 'application/x-freearc'], + ['avif', 'image/avif'], + ['avi', 'video/x-msvideo'], + ['azw', 'application/vnd.amazon.ebook'], + ['bin', 'application/octet-stream'], + ['bmp', 'image/bmp'], + ['bz', 'application/x-bzip'], + ['bz2', 'application/x-bzip2'], + ['cda', 'application/x-cdf'], + ['csh', 'application/x-csh'], + ['css', 'text/css'], + ['csv', 'text/csv'], + ['doc', 'application/msword'], + ['docx', 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'], + ['eot', 'application/vnd.ms-fontobject'], + ['epub', 'application/epub+zip'], + ['gz', 'application/gzip'], + ['gif', 'image/gif'], + ['heic', 'image/heic'], + ['heif', 'image/heif'], + ['htm', 'text/html'], + ['html', 'text/html'], + ['ico', 'image/vnd.microsoft.icon'], + ['ics', 'text/calendar'], + ['jar', 'application/java-archive'], + ['jpeg', 'image/jpeg'], + ['jpg', 'image/jpeg'], + ['js', 'text/javascript'], + ['json', 'application/json'], + ['jsonld', 'application/ld+json'], + ['mid', 'audio/midi'], + ['midi', 'audio/midi'], + ['mjs', 'text/javascript'], + ['mp3', 'audio/mpeg'], + ['mp4', 'video/mp4'], + ['mpeg', 'video/mpeg'], + ['mpkg', 'application/vnd.apple.installer+xml'], + ['odp', 'application/vnd.oasis.opendocument.presentation'], + ['ods', 'application/vnd.oasis.opendocument.spreadsheet'], + ['odt', 'application/vnd.oasis.opendocument.text'], + ['oga', 'audio/ogg'], + ['ogv', 'video/ogg'], + ['ogx', 'application/ogg'], + ['opus', 'audio/opus'], + ['otf', 'font/otf'], + ['png', 'image/png'], + ['pdf', 'application/pdf'], + ['php', 'application/x-httpd-php'], + ['ppt', 'application/vnd.ms-powerpoint'], + ['pptx', 'application/vnd.openxmlformats-officedocument.presentationml.presentation'], + ['rar', 'application/vnd.rar'], + ['rtf', 'application/rtf'], + ['sh', 'application/x-sh'], + ['svg', 'image/svg+xml'], + ['swf', 'application/x-shockwave-flash'], + ['tar', 'application/x-tar'], + ['tif', 'image/tiff'], + ['tiff', 'image/tiff'], + ['ts', 'video/mp2t'], + ['ttf', 'font/ttf'], + ['txt', 'text/plain'], + ['vsd', 'application/vnd.visio'], + ['wav', 'audio/wav'], + ['weba', 'audio/webm'], + ['webm', 'video/webm'], + ['webp', 'image/webp'], + ['woff', 'font/woff'], + ['woff2', 'font/woff2'], + ['xhtml', 'application/xhtml+xml'], + ['xls', 'application/vnd.ms-excel'], + ['xlsx', 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'], + ['xml', 'application/xml'], + ['xul', 'application/vnd.mozilla.xul+xml'], + ['zip', 'application/zip'], + ['7z', 'application/x-7z-compressed'], + ['mkv', 'video/x-matroska'], + ['mov', 'video/quicktime'], + ['msg', 'application/vnd.ms-outlook'], + ]) + function toFileWithPath(tt, et) { + var nt = withMimeType(tt) + if (typeof nt.path != 'string') { + var rt = tt.webkitRelativePath + Object.defineProperty(nt, 'path', { + value: typeof et == 'string' ? et : typeof rt == 'string' && rt.length > 0 ? rt : tt.name, + writable: !1, + configurable: !1, + enumerable: !0, + }) + } + return nt + } + function withMimeType(tt) { + var et = tt.name, + nt = et && et.lastIndexOf('.') !== -1 + if (nt && !tt.type) { + var rt = et.split('.').pop().toLowerCase(), + it = COMMON_MIME_TYPES.get(rt) + it && Object.defineProperty(tt, 'type', { value: it, writable: !1, configurable: !1, enumerable: !0 }) + } + return tt + } + var FILES_TO_IGNORE = ['.DS_Store', 'Thumbs.db'] + function fromEvent(tt) { + return __awaiter(this, void 0, void 0, function () { + return __generator(this, function (et) { + return isObject$n(tt) && isDataTransfer(tt) + ? [2, getDataTransferFiles(tt.dataTransfer, tt.type)] + : isChangeEvt(tt) + ? [2, getInputFiles(tt)] + : Array.isArray(tt) && + tt.every(function (nt) { + return 'getFile' in nt && typeof nt.getFile == 'function' + }) + ? [2, getFsHandleFiles(tt)] + : [2, []] + }) + }) + } + function isDataTransfer(tt) { + return isObject$n(tt.dataTransfer) + } + function isChangeEvt(tt) { + return isObject$n(tt) && isObject$n(tt.target) + } + function isObject$n(tt) { + return typeof tt == 'object' && tt !== null + } + function getInputFiles(tt) { + return fromList(tt.target.files).map(function (et) { + return toFileWithPath(et) + }) + } + function getFsHandleFiles(tt) { + return __awaiter(this, void 0, void 0, function () { + var et + return __generator(this, function (nt) { + switch (nt.label) { + case 0: + return [ + 4, + Promise.all( + tt.map(function (rt) { + return rt.getFile() + }), + ), + ] + case 1: + return ( + (et = nt.sent()), + [ + 2, + et.map(function (rt) { + return toFileWithPath(rt) + }), + ] + ) + } + }) + }) + } + function getDataTransferFiles(tt, et) { + return __awaiter(this, void 0, void 0, function () { + var nt, rt + return __generator(this, function (it) { + switch (it.label) { + case 0: + return tt === null + ? [2, []] + : tt.items + ? ((nt = fromList(tt.items).filter(function (ot) { + return ot.kind === 'file' + })), + et !== 'drop' ? [2, nt] : [4, Promise.all(nt.map(toFilePromises))]) + : [3, 2] + case 1: + return (rt = it.sent()), [2, noIgnoredFiles(flatten$1(rt))] + case 2: + return [ + 2, + noIgnoredFiles( + fromList(tt.files).map(function (ot) { + return toFileWithPath(ot) + }), + ), + ] + } + }) + }) + } + function noIgnoredFiles(tt) { + return tt.filter(function (et) { + return FILES_TO_IGNORE.indexOf(et.name) === -1 + }) + } + function fromList(tt) { + if (tt === null) return [] + for (var et = [], nt = 0; nt < tt.length; nt++) { + var rt = tt[nt] + et.push(rt) + } + return et + } + function toFilePromises(tt) { + if (typeof tt.webkitGetAsEntry != 'function') return fromDataTransferItem(tt) + var et = tt.webkitGetAsEntry() + return et && et.isDirectory ? fromDirEntry(et) : fromDataTransferItem(tt) + } + function flatten$1(tt) { + return tt.reduce(function (et, nt) { + return __spread(et, Array.isArray(nt) ? flatten$1(nt) : [nt]) + }, []) + } + function fromDataTransferItem(tt) { + var et = tt.getAsFile() + if (!et) return Promise.reject(tt + ' is not a File') + var nt = toFileWithPath(et) + return Promise.resolve(nt) + } + function fromEntry(tt) { + return __awaiter(this, void 0, void 0, function () { + return __generator(this, function (et) { + return [2, tt.isDirectory ? fromDirEntry(tt) : fromFileEntry(tt)] + }) + }) + } + function fromDirEntry(tt) { + var et = tt.createReader() + return new Promise(function (nt, rt) { + var it = [] + function ot() { + var at = this + et.readEntries( + function (st) { + return __awaiter(at, void 0, void 0, function () { + var lt, ct, ut + return __generator(this, function (ht) { + switch (ht.label) { + case 0: + if (st.length) return [3, 5] + ht.label = 1 + case 1: + return ht.trys.push([1, 3, , 4]), [4, Promise.all(it)] + case 2: + return (lt = ht.sent()), nt(lt), [3, 4] + case 3: + return (ct = ht.sent()), rt(ct), [3, 4] + case 4: + return [3, 6] + case 5: + ;(ut = Promise.all(st.map(fromEntry))), it.push(ut), ot(), (ht.label = 6) + case 6: + return [2] + } + }) + }) + }, + function (st) { + rt(st) + }, + ) + } + ot() + }) + } + function fromFileEntry(tt) { + return __awaiter(this, void 0, void 0, function () { + return __generator(this, function (et) { + return [ + 2, + new Promise(function (nt, rt) { + tt.file( + function (it) { + var ot = toFileWithPath(it, tt.fullPath) + nt(ot) + }, + function (it) { + rt(it) + }, + ) + }), + ] + }) + }) + } + var _default$1 = function (tt, et) { + if (tt && et) { + var nt = Array.isArray(et) ? et : et.split(','), + rt = tt.name || '', + it = (tt.type || '').toLowerCase(), + ot = it.replace(/\/.*$/, '') + return nt.some(function (at) { + var st = at.trim().toLowerCase() + return st.charAt(0) === '.' + ? rt.toLowerCase().endsWith(st) + : st.endsWith('/*') + ? ot === st.replace(/\/.*$/, '') + : it === st + }) + } + return !0 + } + function ownKeys$D(tt, et) { + var nt = Object.keys(tt) + if (Object.getOwnPropertySymbols) { + var rt = Object.getOwnPropertySymbols(tt) + et && + (rt = rt.filter(function (it) { + return Object.getOwnPropertyDescriptor(tt, it).enumerable + })), + nt.push.apply(nt, rt) + } + return nt + } + function _objectSpread$B(tt) { + for (var et = 1; et < arguments.length; et++) { + var nt = arguments[et] != null ? arguments[et] : {} + et % 2 + ? ownKeys$D(Object(nt), !0).forEach(function (rt) { + _defineProperty$F(tt, rt, nt[rt]) + }) + : Object.getOwnPropertyDescriptors + ? Object.defineProperties(tt, Object.getOwnPropertyDescriptors(nt)) + : ownKeys$D(Object(nt)).forEach(function (rt) { + Object.defineProperty(tt, rt, Object.getOwnPropertyDescriptor(nt, rt)) + }) + } + return tt + } + function _defineProperty$F(tt, et, nt) { + return ( + et in tt + ? Object.defineProperty(tt, et, { value: nt, enumerable: !0, configurable: !0, writable: !0 }) + : (tt[et] = nt), + tt + ) + } + function _slicedToArray$e(tt, et) { + return ( + _arrayWithHoles$f(tt) || + _iterableToArrayLimit$e(tt, et) || + _unsupportedIterableToArray$q(tt, et) || + _nonIterableRest$f() + ) + } + function _nonIterableRest$f() { + throw new TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`) + } + function _unsupportedIterableToArray$q(tt, et) { + if (tt) { + if (typeof tt == 'string') return _arrayLikeToArray$q(tt, et) + var nt = Object.prototype.toString.call(tt).slice(8, -1) + if ((nt === 'Object' && tt.constructor && (nt = tt.constructor.name), nt === 'Map' || nt === 'Set')) + return Array.from(tt) + if (nt === 'Arguments' || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(nt)) return _arrayLikeToArray$q(tt, et) + } + } + function _arrayLikeToArray$q(tt, et) { + ;(et == null || et > tt.length) && (et = tt.length) + for (var nt = 0, rt = new Array(et); nt < et; nt++) rt[nt] = tt[nt] + return rt + } + function _iterableToArrayLimit$e(tt, et) { + var nt = tt == null ? null : (typeof Symbol < 'u' && tt[Symbol.iterator]) || tt['@@iterator'] + if (nt != null) { + var rt = [], + it = !0, + ot = !1, + at, + st + try { + for ( + nt = nt.call(tt); + !(it = (at = nt.next()).done) && (rt.push(at.value), !(et && rt.length === et)); + it = !0 + ); + } catch (lt) { + ;(ot = !0), (st = lt) + } finally { + try { + !it && nt.return != null && nt.return() + } finally { + if (ot) throw st + } + } + return rt + } + } + function _arrayWithHoles$f(tt) { + if (Array.isArray(tt)) return tt + } + var FILE_INVALID_TYPE = 'file-invalid-type', + FILE_TOO_LARGE = 'file-too-large', + FILE_TOO_SMALL = 'file-too-small', + TOO_MANY_FILES = 'too-many-files', + getInvalidTypeRejectionErr = function (et) { + et = Array.isArray(et) && et.length === 1 ? et[0] : et + var nt = Array.isArray(et) ? 'one of '.concat(et.join(', ')) : et + return { code: FILE_INVALID_TYPE, message: 'File type must be '.concat(nt) } + }, + getTooLargeRejectionErr = function (et) { + return { + code: FILE_TOO_LARGE, + message: 'File is larger than '.concat(et, ' ').concat(et === 1 ? 'byte' : 'bytes'), + } + }, + getTooSmallRejectionErr = function (et) { + return { + code: FILE_TOO_SMALL, + message: 'File is smaller than '.concat(et, ' ').concat(et === 1 ? 'byte' : 'bytes'), + } + }, + TOO_MANY_FILES_REJECTION = { code: TOO_MANY_FILES, message: 'Too many files' } + function fileAccepted(tt, et) { + var nt = tt.type === 'application/x-moz-file' || _default$1(tt, et) + return [nt, nt ? null : getInvalidTypeRejectionErr(et)] + } + function fileMatchSize(tt, et, nt) { + if (isDefined$1(tt.size)) + if (isDefined$1(et) && isDefined$1(nt)) { + if (tt.size > nt) return [!1, getTooLargeRejectionErr(nt)] + if (tt.size < et) return [!1, getTooSmallRejectionErr(et)] + } else { + if (isDefined$1(et) && tt.size < et) return [!1, getTooSmallRejectionErr(et)] + if (isDefined$1(nt) && tt.size > nt) return [!1, getTooLargeRejectionErr(nt)] + } + return [!0, null] + } + function isDefined$1(tt) { + return tt != null + } + function allFilesAccepted(tt) { + var et = tt.files, + nt = tt.accept, + rt = tt.minSize, + it = tt.maxSize, + ot = tt.multiple, + at = tt.maxFiles + return (!ot && et.length > 1) || (ot && at >= 1 && et.length > at) + ? !1 + : et.every(function (st) { + var lt = fileAccepted(st, nt), + ct = _slicedToArray$e(lt, 1), + ut = ct[0], + ht = fileMatchSize(st, rt, it), + dt = _slicedToArray$e(ht, 1), + pt = dt[0] + return ut && pt + }) + } + function isPropagationStopped(tt) { + return typeof tt.isPropagationStopped == 'function' + ? tt.isPropagationStopped() + : typeof tt.cancelBubble < 'u' + ? tt.cancelBubble + : !1 + } + function isEvtWithFiles(tt) { + return tt.dataTransfer + ? Array.prototype.some.call(tt.dataTransfer.types, function (et) { + return et === 'Files' || et === 'application/x-moz-file' + }) + : !!tt.target && !!tt.target.files + } + function onDocumentDragOver(tt) { + tt.preventDefault() + } + function isIe(tt) { + return tt.indexOf('MSIE') !== -1 || tt.indexOf('Trident/') !== -1 + } + function isEdge$1(tt) { + return tt.indexOf('Edge/') !== -1 + } + function isIeOrEdge() { + var tt = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : window.navigator.userAgent + return isIe(tt) || isEdge$1(tt) + } + function composeEventHandlers() { + for (var tt = arguments.length, et = new Array(tt), nt = 0; nt < tt; nt++) et[nt] = arguments[nt] + return function (rt) { + for (var it = arguments.length, ot = new Array(it > 1 ? it - 1 : 0), at = 1; at < it; at++) + ot[at - 1] = arguments[at] + return et.some(function (st) { + return !isPropagationStopped(rt) && st && st.apply(void 0, [rt].concat(ot)), isPropagationStopped(rt) + }) + } + } + function canUseFileSystemAccessAPI() { + return 'showOpenFilePicker' in window + } + function filePickerOptionsTypes(tt) { + return ( + (tt = typeof tt == 'string' ? tt.split(',') : tt), + [ + { + description: 'everything', + accept: Array.isArray(tt) + ? tt + .filter(function (et) { + return ( + et === 'audio/*' || + et === 'video/*' || + et === 'image/*' || + et === 'text/*' || + /\w+\/[-+.\w]+/g.test(et) + ) + }) + .reduce(function (et, nt) { + return _objectSpread$B(_objectSpread$B({}, et), {}, _defineProperty$F({}, nt, [])) + }, {}) + : {}, + }, + ] + ) + } + function isAbort(tt) { + return tt instanceof DOMException && (tt.name === 'AbortError' || tt.code === tt.ABORT_ERR) + } + function isSecurityError(tt) { + return tt instanceof DOMException && (tt.name === 'SecurityError' || tt.code === tt.SECURITY_ERR) + } + var _excluded$1L = ['children'], + _excluded2$i = ['open'], + _excluded3$5 = [ + 'refKey', + 'role', + 'onKeyDown', + 'onFocus', + 'onBlur', + 'onClick', + 'onDragEnter', + 'onDragOver', + 'onDragLeave', + 'onDrop', + ], + _excluded4 = ['refKey', 'onChange', 'onClick'] + function _toConsumableArray$e(tt) { + return ( + _arrayWithoutHoles$e(tt) || _iterableToArray$f(tt) || _unsupportedIterableToArray$p(tt) || _nonIterableSpread$e() + ) + } + function _nonIterableSpread$e() { + throw new TypeError(`Invalid attempt to spread non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`) + } + function _iterableToArray$f(tt) { + if ((typeof Symbol < 'u' && tt[Symbol.iterator] != null) || tt['@@iterator'] != null) return Array.from(tt) + } + function _arrayWithoutHoles$e(tt) { + if (Array.isArray(tt)) return _arrayLikeToArray$p(tt) + } + function _slicedToArray$d(tt, et) { + return ( + _arrayWithHoles$e(tt) || + _iterableToArrayLimit$d(tt, et) || + _unsupportedIterableToArray$p(tt, et) || + _nonIterableRest$e() + ) + } + function _nonIterableRest$e() { + throw new TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`) + } + function _unsupportedIterableToArray$p(tt, et) { + if (tt) { + if (typeof tt == 'string') return _arrayLikeToArray$p(tt, et) + var nt = Object.prototype.toString.call(tt).slice(8, -1) + if ((nt === 'Object' && tt.constructor && (nt = tt.constructor.name), nt === 'Map' || nt === 'Set')) + return Array.from(tt) + if (nt === 'Arguments' || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(nt)) return _arrayLikeToArray$p(tt, et) + } + } + function _arrayLikeToArray$p(tt, et) { + ;(et == null || et > tt.length) && (et = tt.length) + for (var nt = 0, rt = new Array(et); nt < et; nt++) rt[nt] = tt[nt] + return rt + } + function _iterableToArrayLimit$d(tt, et) { + var nt = tt == null ? null : (typeof Symbol < 'u' && tt[Symbol.iterator]) || tt['@@iterator'] + if (nt != null) { + var rt = [], + it = !0, + ot = !1, + at, + st + try { + for ( + nt = nt.call(tt); + !(it = (at = nt.next()).done) && (rt.push(at.value), !(et && rt.length === et)); + it = !0 + ); + } catch (lt) { + ;(ot = !0), (st = lt) + } finally { + try { + !it && nt.return != null && nt.return() + } finally { + if (ot) throw st + } + } + return rt + } + } + function _arrayWithHoles$e(tt) { + if (Array.isArray(tt)) return tt + } + function ownKeys$C(tt, et) { + var nt = Object.keys(tt) + if (Object.getOwnPropertySymbols) { + var rt = Object.getOwnPropertySymbols(tt) + et && + (rt = rt.filter(function (it) { + return Object.getOwnPropertyDescriptor(tt, it).enumerable + })), + nt.push.apply(nt, rt) + } + return nt + } + function _objectSpread$A(tt) { + for (var et = 1; et < arguments.length; et++) { + var nt = arguments[et] != null ? arguments[et] : {} + et % 2 + ? ownKeys$C(Object(nt), !0).forEach(function (rt) { + _defineProperty$E(tt, rt, nt[rt]) + }) + : Object.getOwnPropertyDescriptors + ? Object.defineProperties(tt, Object.getOwnPropertyDescriptors(nt)) + : ownKeys$C(Object(nt)).forEach(function (rt) { + Object.defineProperty(tt, rt, Object.getOwnPropertyDescriptor(nt, rt)) + }) + } + return tt + } + function _defineProperty$E(tt, et, nt) { + return ( + et in tt + ? Object.defineProperty(tt, et, { value: nt, enumerable: !0, configurable: !0, writable: !0 }) + : (tt[et] = nt), + tt + ) + } + function _objectWithoutProperties$k(tt, et) { + if (tt == null) return {} + var nt = _objectWithoutPropertiesLoose$n(tt, et), + rt, + it + if (Object.getOwnPropertySymbols) { + var ot = Object.getOwnPropertySymbols(tt) + for (it = 0; it < ot.length; it++) + (rt = ot[it]), !(et.indexOf(rt) >= 0) && Object.prototype.propertyIsEnumerable.call(tt, rt) && (nt[rt] = tt[rt]) + } + return nt + } + function _objectWithoutPropertiesLoose$n(tt, et) { + if (tt == null) return {} + var nt = {}, + rt = Object.keys(tt), + it, + ot + for (ot = 0; ot < rt.length; ot++) (it = rt[ot]), !(et.indexOf(it) >= 0) && (nt[it] = tt[it]) + return nt + } + var Dropzone = reactExports.forwardRef(function (tt, et) { + var nt = tt.children, + rt = _objectWithoutProperties$k(tt, _excluded$1L), + it = useDropzone(rt), + ot = it.open, + at = _objectWithoutProperties$k(it, _excluded2$i) + return ( + reactExports.useImperativeHandle( + et, + function () { + return { open: ot } + }, + [ot], + ), + React$1.createElement(reactExports.Fragment, null, nt(_objectSpread$A(_objectSpread$A({}, at), {}, { open: ot }))) + ) + }) + Dropzone.displayName = 'Dropzone' + var defaultProps$8 = { + disabled: !1, + getFilesFromEvent: fromEvent, + maxSize: 1 / 0, + minSize: 0, + multiple: !0, + maxFiles: 0, + preventDropOnDocument: !0, + noClick: !1, + noKeyboard: !1, + noDrag: !1, + noDragEventsBubbling: !1, + validator: null, + useFsAccessApi: !0, + } + Dropzone.defaultProps = defaultProps$8 + Dropzone.propTypes = { + children: PropTypes.func, + accept: PropTypes.oneOfType([PropTypes.string, PropTypes.arrayOf(PropTypes.string)]), + multiple: PropTypes.bool, + preventDropOnDocument: PropTypes.bool, + noClick: PropTypes.bool, + noKeyboard: PropTypes.bool, + noDrag: PropTypes.bool, + noDragEventsBubbling: PropTypes.bool, + minSize: PropTypes.number, + maxSize: PropTypes.number, + maxFiles: PropTypes.number, + disabled: PropTypes.bool, + getFilesFromEvent: PropTypes.func, + onFileDialogCancel: PropTypes.func, + onFileDialogOpen: PropTypes.func, + useFsAccessApi: PropTypes.bool, + onDragEnter: PropTypes.func, + onDragLeave: PropTypes.func, + onDragOver: PropTypes.func, + onDrop: PropTypes.func, + onDropAccepted: PropTypes.func, + onDropRejected: PropTypes.func, + validator: PropTypes.func, + } + var initialState$1 = { + isFocused: !1, + isFileDialogActive: !1, + isDragActive: !1, + isDragAccept: !1, + isDragReject: !1, + draggedFiles: [], + acceptedFiles: [], + fileRejections: [], + } + function useDropzone() { + var tt = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, + et = _objectSpread$A(_objectSpread$A({}, defaultProps$8), tt), + nt = et.accept, + rt = et.disabled, + it = et.getFilesFromEvent, + ot = et.maxSize, + at = et.minSize, + st = et.multiple, + lt = et.maxFiles, + ct = et.onDragEnter, + ut = et.onDragLeave, + ht = et.onDragOver, + dt = et.onDrop, + pt = et.onDropAccepted, + mt = et.onDropRejected, + gt = et.onFileDialogCancel, + yt = et.onFileDialogOpen, + bt = et.useFsAccessApi, + vt = et.preventDropOnDocument, + xt = et.noClick, + kt = et.noKeyboard, + St = et.noDrag, + Tt = et.noDragEventsBubbling, + At = et.validator, + Et = reactExports.useMemo( + function () { + return typeof yt == 'function' ? yt : noop$a + }, + [yt], + ), + $t = reactExports.useMemo( + function () { + return typeof gt == 'function' ? gt : noop$a + }, + [gt], + ), + Dt = reactExports.useRef(null), + jt = reactExports.useRef(null), + Pt = reactExports.useReducer(reducer, initialState$1), + Ct = _slicedToArray$d(Pt, 2), + wt = Ct[0], + It = Ct[1], + Ot = wt.isFocused, + Wt = wt.isFileDialogActive, + zt = wt.draggedFiles, + Ft = reactExports.useRef(typeof window < 'u' && window.isSecureContext && bt && canUseFileSystemAccessAPI()), + Nt = function () { + !Ft.current && + Wt && + setTimeout(function () { + if (jt.current) { + var pn = jt.current.files + pn.length || (It({ type: 'closeDialog' }), $t()) + } + }, 300) + } + reactExports.useEffect( + function () { + return ( + window.addEventListener('focus', Nt, !1), + function () { + window.removeEventListener('focus', Nt, !1) + } + ) + }, + [jt, Wt, $t, Ft], + ) + var Ut = reactExports.useRef([]), + Mt = function (pn) { + ;(Dt.current && Dt.current.contains(pn.target)) || (pn.preventDefault(), (Ut.current = [])) + } + reactExports.useEffect( + function () { + return ( + vt && + (document.addEventListener('dragover', onDocumentDragOver, !1), document.addEventListener('drop', Mt, !1)), + function () { + vt && + (document.removeEventListener('dragover', onDocumentDragOver), document.removeEventListener('drop', Mt)) + } + ) + }, + [Dt, vt], + ) + var Ht = reactExports.useCallback( + function (fn) { + fn.preventDefault(), + fn.persist(), + Nn(fn), + (Ut.current = [].concat(_toConsumableArray$e(Ut.current), [fn.target])), + isEvtWithFiles(fn) && + Promise.resolve(it(fn)).then(function (pn) { + ;(isPropagationStopped(fn) && !Tt) || + (It({ draggedFiles: pn, isDragActive: !0, type: 'setDraggedFiles' }), ct && ct(fn)) + }) + }, + [it, ct, Tt], + ), + en = reactExports.useCallback( + function (fn) { + fn.preventDefault(), fn.persist(), Nn(fn) + var pn = isEvtWithFiles(fn) + if (pn && fn.dataTransfer) + try { + fn.dataTransfer.dropEffect = 'copy' + } catch {} + return pn && ht && ht(fn), !1 + }, + [ht, Tt], + ), + sn = reactExports.useCallback( + function (fn) { + fn.preventDefault(), fn.persist(), Nn(fn) + var pn = Ut.current.filter(function (Dn) { + return Dt.current && Dt.current.contains(Dn) + }), + kn = pn.indexOf(fn.target) + kn !== -1 && pn.splice(kn, 1), + (Ut.current = pn), + !(pn.length > 0) && + (It({ isDragActive: !1, type: 'setDraggedFiles', draggedFiles: [] }), isEvtWithFiles(fn) && ut && ut(fn)) + }, + [Dt, ut, Tt], + ), + Kt = reactExports.useCallback( + function (fn, pn) { + var kn = [], + Dn = [] + fn.forEach(function (un) { + var Zt = fileAccepted(un, nt), + Xt = _slicedToArray$d(Zt, 2), + Sn = Xt[0], + Rn = Xt[1], + jn = fileMatchSize(un, at, ot), + On = _slicedToArray$d(jn, 2), + Zn = On[0], + Vn = On[1], + qn = At ? At(un) : null + if (Sn && Zn && !qn) kn.push(un) + else { + var zn = [Rn, Vn] + qn && (zn = zn.concat(qn)), + Dn.push({ + file: un, + errors: zn.filter(function (Jn) { + return Jn + }), + }) + } + }), + ((!st && kn.length > 1) || (st && lt >= 1 && kn.length > lt)) && + (kn.forEach(function (un) { + Dn.push({ file: un, errors: [TOO_MANY_FILES_REJECTION] }) + }), + kn.splice(0)), + It({ acceptedFiles: kn, fileRejections: Dn, type: 'setFiles' }), + dt && dt(kn, Dn, pn), + Dn.length > 0 && mt && mt(Dn, pn), + kn.length > 0 && pt && pt(kn, pn) + }, + [It, st, nt, at, ot, lt, dt, pt, mt, At], + ), + rn = reactExports.useCallback( + function (fn) { + fn.preventDefault(), + fn.persist(), + Nn(fn), + (Ut.current = []), + isEvtWithFiles(fn) && + Promise.resolve(it(fn)).then(function (pn) { + ;(isPropagationStopped(fn) && !Tt) || Kt(pn, fn) + }), + It({ type: 'reset' }) + }, + [it, Kt, Tt], + ), + nn = reactExports.useCallback( + function () { + if (Ft.current) { + It({ type: 'openDialog' }), Et() + var fn = { multiple: st, types: filePickerOptionsTypes(nt) } + window + .showOpenFilePicker(fn) + .then(function (pn) { + return it(pn) + }) + .then(function (pn) { + Kt(pn, null), It({ type: 'closeDialog' }) + }) + .catch(function (pn) { + isAbort(pn) + ? ($t(pn), It({ type: 'closeDialog' })) + : isSecurityError(pn) && + ((Ft.current = !1), jt.current && ((jt.current.value = null), jt.current.click())) + }) + return + } + jt.current && (It({ type: 'openDialog' }), Et(), (jt.current.value = null), jt.current.click()) + }, + [It, Et, $t, bt, Kt, nt, st], + ), + hn = reactExports.useCallback( + function (fn) { + !Dt.current || + !Dt.current.isEqualNode(fn.target) || + ((fn.key === ' ' || fn.key === 'Enter' || fn.keyCode === 32 || fn.keyCode === 13) && + (fn.preventDefault(), nn())) + }, + [Dt, nn], + ), + vn = reactExports.useCallback(function () { + It({ type: 'focus' }) + }, []), + an = reactExports.useCallback(function () { + It({ type: 'blur' }) + }, []), + Qt = reactExports.useCallback( + function () { + xt || (isIeOrEdge() ? setTimeout(nn, 0) : nn()) + }, + [xt, nn], + ), + _n = function (pn) { + return rt ? null : pn + }, + Pn = function (pn) { + return kt ? null : _n(pn) + }, + $n = function (pn) { + return St ? null : _n(pn) + }, + Nn = function (pn) { + Tt && pn.stopPropagation() + }, + Tn = reactExports.useMemo( + function () { + return function () { + var fn = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, + pn = fn.refKey, + kn = pn === void 0 ? 'ref' : pn, + Dn = fn.role, + un = fn.onKeyDown, + Zt = fn.onFocus, + Xt = fn.onBlur, + Sn = fn.onClick, + Rn = fn.onDragEnter, + jn = fn.onDragOver, + On = fn.onDragLeave, + Zn = fn.onDrop, + Vn = _objectWithoutProperties$k(fn, _excluded3$5) + return _objectSpread$A( + _objectSpread$A( + _defineProperty$E( + { + onKeyDown: Pn(composeEventHandlers(un, hn)), + onFocus: Pn(composeEventHandlers(Zt, vn)), + onBlur: Pn(composeEventHandlers(Xt, an)), + onClick: _n(composeEventHandlers(Sn, Qt)), + onDragEnter: $n(composeEventHandlers(Rn, Ht)), + onDragOver: $n(composeEventHandlers(jn, en)), + onDragLeave: $n(composeEventHandlers(On, sn)), + onDrop: $n(composeEventHandlers(Zn, rn)), + role: typeof Dn == 'string' && Dn !== '' ? Dn : 'button', + }, + kn, + Dt, + ), + !rt && !kt ? { tabIndex: 0 } : {}, + ), + Vn, + ) + } + }, + [Dt, hn, vn, an, Qt, Ht, en, sn, rn, kt, St, rt], + ), + cn = reactExports.useCallback(function (fn) { + fn.stopPropagation() + }, []), + mn = reactExports.useMemo( + function () { + return function () { + var fn = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, + pn = fn.refKey, + kn = pn === void 0 ? 'ref' : pn, + Dn = fn.onChange, + un = fn.onClick, + Zt = _objectWithoutProperties$k(fn, _excluded4), + Xt = _defineProperty$E( + { + accept: nt, + multiple: st, + type: 'file', + style: { display: 'none' }, + onChange: _n(composeEventHandlers(Dn, rn)), + onClick: _n(composeEventHandlers(un, cn)), + tabIndex: -1, + }, + kn, + jt, + ) + return _objectSpread$A(_objectSpread$A({}, Xt), Zt) + } + }, + [jt, nt, st, rn, rt], + ), + In = zt.length, + An = In > 0 && allFilesAccepted({ files: zt, accept: nt, minSize: at, maxSize: ot, multiple: st, maxFiles: lt }), + wn = In > 0 && !An + return _objectSpread$A( + _objectSpread$A({}, wt), + {}, + { + isDragAccept: An, + isDragReject: wn, + isFocused: Ot && !rt, + getRootProps: Tn, + getInputProps: mn, + rootRef: Dt, + inputRef: jt, + open: _n(nn), + }, + ) + } + function reducer(tt, et) { + switch (et.type) { + case 'focus': + return _objectSpread$A(_objectSpread$A({}, tt), {}, { isFocused: !0 }) + case 'blur': + return _objectSpread$A(_objectSpread$A({}, tt), {}, { isFocused: !1 }) + case 'openDialog': + return _objectSpread$A(_objectSpread$A({}, initialState$1), {}, { isFileDialogActive: !0 }) + case 'closeDialog': + return _objectSpread$A(_objectSpread$A({}, tt), {}, { isFileDialogActive: !1 }) + case 'setDraggedFiles': + var nt = et.isDragActive, + rt = et.draggedFiles + return _objectSpread$A(_objectSpread$A({}, tt), {}, { draggedFiles: rt, isDragActive: nt }) + case 'setFiles': + return _objectSpread$A( + _objectSpread$A({}, tt), + {}, + { acceptedFiles: et.acceptedFiles, fileRejections: et.fileRejections }, + ) + case 'reset': + return _objectSpread$A({}, initialState$1) + default: + return tt + } + } + function noop$a() {} + function createStore$4(tt) { + let et + const nt = new Set(), + rt = (ct, ut) => { + const ht = typeof ct == 'function' ? ct(et) : ct + if (ht !== et) { + const dt = et + ;(et = ut ? ht : Object.assign({}, et, ht)), nt.forEach((pt) => pt(et, dt)) + } + }, + it = () => et, + ot = (ct, ut = it, ht = Object.is) => { + console.warn('[DEPRECATED] Please use `subscribeWithSelector` middleware') + let dt = ut(et) + function pt() { + const mt = ut(et) + if (!ht(dt, mt)) { + const gt = dt + ct((dt = mt), gt) + } + } + return nt.add(pt), () => nt.delete(pt) + }, + lt = { + setState: rt, + getState: it, + subscribe: (ct, ut, ht) => (ut || ht ? ot(ct, ut, ht) : (nt.add(ct), () => nt.delete(ct))), + destroy: () => nt.clear(), + } + return (et = tt(rt, it, lt)), lt + } + const isSSR$3 = + typeof window > 'u' || !window.navigator || /ServerSideRendering|^Deno\//.test(window.navigator.userAgent), + useIsomorphicLayoutEffect$3 = isSSR$3 ? reactExports.useEffect : reactExports.useLayoutEffect + function create$4(tt) { + const et = typeof tt == 'function' ? createStore$4(tt) : tt, + nt = (rt = et.getState, it = Object.is) => { + const [, ot] = reactExports.useReducer((yt) => yt + 1, 0), + at = et.getState(), + st = reactExports.useRef(at), + lt = reactExports.useRef(rt), + ct = reactExports.useRef(it), + ut = reactExports.useRef(!1), + ht = reactExports.useRef() + ht.current === void 0 && (ht.current = rt(at)) + let dt, + pt = !1 + ;(st.current !== at || lt.current !== rt || ct.current !== it || ut.current) && + ((dt = rt(at)), (pt = !it(ht.current, dt))), + useIsomorphicLayoutEffect$3(() => { + pt && (ht.current = dt), (st.current = at), (lt.current = rt), (ct.current = it), (ut.current = !1) + }) + const mt = reactExports.useRef(at) + useIsomorphicLayoutEffect$3(() => { + const yt = () => { + try { + const vt = et.getState(), + xt = lt.current(vt) + ct.current(ht.current, xt) || ((st.current = vt), (ht.current = xt), ot()) + } catch { + ;(ut.current = !0), ot() + } + }, + bt = et.subscribe(yt) + return et.getState() !== mt.current && yt(), bt + }, []) + const gt = pt ? dt : ht.current + return reactExports.useDebugValue(gt), gt + } + return ( + Object.assign(nt, et), + (nt[Symbol.iterator] = function () { + console.warn('[useStore, api] = create() is deprecated and will be removed in v4') + const rt = [nt, et] + return { + next() { + const it = rt.length <= 0 + return { value: rt.shift(), done: it } + }, + } + }), + nt + ) + } + const subscribeWithSelector = (tt) => (et, nt, rt) => { + const it = rt.subscribe + return ( + (rt.subscribe = (at, st, lt) => { + let ct = at + if (st) { + const ut = (lt == null ? void 0 : lt.equalityFn) || Object.is + let ht = at(rt.getState()) + ;(ct = (dt) => { + const pt = at(dt) + if (!ut(ht, pt)) { + const mt = ht + st((ht = pt), mt) + } + }), + lt != null && lt.fireImmediately && st(ht, ht) + } + return it(ct) + }), + tt(et, nt, rt) + ) + } + /*! + * isobject + * + * Copyright (c) 2014-2017, Jon Schlinkert. + * Released under the MIT License. + */ var isobject = function (et) { + return et != null && typeof et == 'object' && Array.isArray(et) === !1 + } + /*! + * is-plain-object + * + * Copyright (c) 2014-2017, Jon Schlinkert. + * Released under the MIT License. + */ var isObject$m = isobject + function isObjectObject(tt) { + return isObject$m(tt) === !0 && Object.prototype.toString.call(tt) === '[object Object]' + } + var isPlainObject$5 = function (et) { + var nt, rt + return !( + isObjectObject(et) === !1 || + ((nt = et.constructor), typeof nt != 'function') || + ((rt = nt.prototype), isObjectObject(rt) === !1) || + rt.hasOwnProperty('isPrototypeOf') === !1 + ) + } + /*! + * is-extendable + * + * Copyright (c) 2015-2017, Jon Schlinkert. + * Released under the MIT License. + */ var isPlainObject$4 = isPlainObject$5, + isExtendable$4 = function (et) { + return isPlainObject$4(et) || typeof et == 'function' || Array.isArray(et) + } + /*! + * for-in + * + * Copyright (c) 2014-2017, Jon Schlinkert. + * Released under the MIT License. + */ var forIn$1 = function (et, nt, rt) { + for (var it in et) if (nt.call(rt, et[it], it, et) === !1) break + }, + isExtendable$3 = isExtendable$4, + forIn = forIn$1 + function mixinDeep(tt, et) { + for (var nt = arguments.length, rt = 0; ++rt < nt; ) { + var it = arguments[rt] + isObject$l(it) && forIn(it, copy$4, tt) + } + return tt + } + function copy$4(tt, et) { + if (isValidKey$1(et)) { + var nt = this[et] + isObject$l(tt) && isObject$l(nt) ? mixinDeep(nt, tt) : (this[et] = tt) + } + } + function isObject$l(tt) { + return isExtendable$3(tt) && !Array.isArray(tt) + } + function isValidKey$1(tt) { + return tt !== '__proto__' && tt !== 'constructor' && tt !== 'prototype' + } + var mixinDeep_1 = mixinDeep + /*! + * get-value + * + * Copyright (c) 2014-2015, Jon Schlinkert. + * Licensed under the MIT License. + */ var getValue$5 = function (tt, et, nt, rt, it) { + if (!isObject$k(tt) || !et) return tt + if ( + ((et = toString$7(et)), + nt && (et += '.' + toString$7(nt)), + rt && (et += '.' + toString$7(rt)), + it && (et += '.' + toString$7(it)), + et in tt) + ) + return tt[et] + for (var ot = et.split('.'), at = ot.length, st = -1; tt && ++st < at; ) { + for (var lt = ot[st]; lt[lt.length - 1] === '\\'; ) lt = lt.slice(0, -1) + '.' + ot[++st] + tt = tt[lt] + } + return tt + } + function isObject$k(tt) { + return tt !== null && (typeof tt == 'object' || typeof tt == 'function') + } + function toString$7(tt) { + return tt ? (Array.isArray(tt) ? tt.join('.') : tt) : '' + } + /*! + * assign-symbols + * + * Copyright (c) 2015, Jon Schlinkert. + * Licensed under the MIT License. + */ var assignSymbols$1 = function (tt, et) { + if (tt === null || typeof tt > 'u') throw new TypeError('expected first argument to be an object.') + if (typeof et > 'u' || typeof Symbol > 'u' || typeof Object.getOwnPropertySymbols != 'function') return tt + for (var nt = Object.prototype.propertyIsEnumerable, rt = Object(tt), it = arguments.length, ot = 0; ++ot < it; ) + for (var at = Object(arguments[ot]), st = Object.getOwnPropertySymbols(at), lt = 0; lt < st.length; lt++) { + var ct = st[lt] + nt.call(at, ct) && (rt[ct] = at[ct]) + } + return rt + }, + isExtendable$2 = isExtendable$4, + assignSymbols = assignSymbols$1, + extendShallow$1 = + Object.assign || + function (tt) { + if (tt === null || typeof tt > 'u') throw new TypeError('Cannot convert undefined or null to object') + isObject$j(tt) || (tt = {}) + for (var et = 1; et < arguments.length; et++) { + var nt = arguments[et] + isString$4(nt) && (nt = toObject$2(nt)), isObject$j(nt) && (assign$5(tt, nt), assignSymbols(tt, nt)) + } + return tt + } + function assign$5(tt, et) { + for (var nt in et) hasOwn$3(et, nt) && (tt[nt] = et[nt]) + } + function isString$4(tt) { + return tt && typeof tt == 'string' + } + function toObject$2(tt) { + var et = {} + for (var nt in tt) et[nt] = tt[nt] + return et + } + function isObject$j(tt) { + return (tt && typeof tt == 'object') || isExtendable$2(tt) + } + function hasOwn$3(tt, et) { + return Object.prototype.hasOwnProperty.call(tt, et) + } + /*! + * split-string + * + * Copyright (c) 2015-2017, Jon Schlinkert. + * Released under the MIT License. + */ var extend$4 = extendShallow$1, + splitString = function (tt, et, nt) { + if (typeof tt != 'string') throw new TypeError('expected a string') + typeof et == 'function' && ((nt = et), (et = null)), typeof et == 'string' && (et = { sep: et }) + var rt = extend$4({ sep: '.' }, et), + it = rt.quotes || ['"', "'", '`'], + ot + rt.brackets === !0 ? (ot = { '<': '>', '(': ')', '[': ']', '{': '}' }) : rt.brackets && (ot = rt.brackets) + var at = [], + st = [], + lt = [''], + ct = rt.sep, + ut = tt.length, + ht = -1, + dt + function pt() { + if (ot && st.length) return ot[st[st.length - 1]] + } + for (; ++ht < ut; ) { + var mt = tt[ht], + gt = tt[ht + 1], + yt = { val: mt, idx: ht, arr: lt, str: tt } + if ((at.push(yt), mt === '\\')) { + ;(yt.val = keepEscaping(rt, tt, ht) === !0 ? mt + gt : gt), + (yt.escaped = !0), + typeof nt == 'function' && nt(yt), + (lt[lt.length - 1] += yt.val), + ht++ + continue + } + if (ot && ot[mt]) { + st.push(mt) + var bt = pt(), + vt = ht + 1 + if (tt.indexOf(bt, vt + 1) !== -1) + for (; st.length && vt < ut; ) { + var xt = tt[++vt] + if (xt === '\\') { + xt++ + continue + } + if (it.indexOf(xt) !== -1) { + vt = getClosingQuote(tt, xt, vt + 1) + continue + } + if (((bt = pt()), st.length && tt.indexOf(bt, vt + 1) === -1)) break + if (ot[xt]) { + st.push(xt) + continue + } + bt === xt && st.pop() + } + if (((dt = vt), dt === -1)) { + lt[lt.length - 1] += mt + continue + } + ;(mt = tt.slice(ht, dt + 1)), (yt.val = mt), (yt.idx = ht = dt) + } + if (it.indexOf(mt) !== -1) { + if (((dt = getClosingQuote(tt, mt, ht + 1)), dt === -1)) { + lt[lt.length - 1] += mt + continue + } + keepQuotes(mt, rt) === !0 ? (mt = tt.slice(ht, dt + 1)) : (mt = tt.slice(ht + 1, dt)), + (yt.val = mt), + (yt.idx = ht = dt) + } + if ((typeof nt == 'function' && (nt(yt, at), (mt = yt.val), (ht = yt.idx)), yt.val === ct && yt.split !== !1)) { + lt.push('') + continue + } + lt[lt.length - 1] += yt.val + } + return lt + } + function getClosingQuote(tt, et, nt, rt) { + var it = tt.indexOf(et, nt) + return tt.charAt(it - 1) === '\\' ? getClosingQuote(tt, et, it + 1) : it + } + function keepQuotes(tt, et) { + return (et.keepDoubleQuotes === !0 && tt === '"') || (et.keepSingleQuotes === !0 && tt === "'") ? !0 : et.keepQuotes + } + function keepEscaping(tt, et, nt) { + return typeof tt.keepEscaping == 'function' + ? tt.keepEscaping(et, nt) + : tt.keepEscaping === !0 || et[nt + 1] === '\\' + } + /*! + * is-extendable + * + * Copyright (c) 2015, Jon Schlinkert. + * Licensed under the MIT License. + */ var isExtendable$1 = function (et) { + return typeof et < 'u' && et !== null && (typeof et == 'object' || typeof et == 'function') + }, + isObject$i = isExtendable$1, + extendShallow = function (et) { + isObject$i(et) || (et = {}) + for (var nt = arguments.length, rt = 1; rt < nt; rt++) { + var it = arguments[rt] + isObject$i(it) && assign$4(et, it) + } + return et + } + function assign$4(tt, et) { + for (var nt in et) hasOwn$2(et, nt) && (tt[nt] = et[nt]) + } + function hasOwn$2(tt, et) { + return Object.prototype.hasOwnProperty.call(tt, et) + } + /*! + * is-extendable + * + * Copyright (c) 2015, Jon Schlinkert. + * Licensed under the MIT License. + */ var isExtendable = function (et) { + return typeof et < 'u' && et !== null && (typeof et == 'object' || typeof et == 'function') + } + /*! + * set-value + * + * Copyright (c) 2014-2015, 2017, Jon Schlinkert. + * Released under the MIT License. + */ var split = splitString, + extend$3 = extendShallow, + isPlainObject$3 = isPlainObject$5, + isObject$h = isExtendable, + setValue = function (tt, et, nt) { + if (!isObject$h(tt) || (Array.isArray(et) && (et = [].concat.apply([], et).join('.')), typeof et != 'string')) + return tt + for ( + var rt = split(et, { sep: '.', brackets: !0 }).filter(isValidKey), it = rt.length, ot = -1, at = tt; + ++ot < it; + + ) { + var st = rt[ot] + if (ot !== it - 1) { + isObject$h(at[st]) || (at[st] = {}), (at = at[st]) + continue + } + isPlainObject$3(at[st]) && isPlainObject$3(nt) ? (at[st] = extend$3({}, at[st], nt)) : (at[st] = nt) + } + return tt + } + function isValidKey(tt) { + return tt !== '__proto__' && tt !== 'constructor' && tt !== 'prototype' + } + var isObject$g = isExtendable$4, + merge$1 = mixinDeep_1, + get$6 = getValue$5, + set$4 = setValue, + mergeValue = function (et, nt, rt) { + if (!isObject$g(et)) throw new TypeError('expected an object') + if (typeof nt != 'string' || rt == null) return merge$1.apply(null, arguments) + if (typeof rt == 'string') return set$4(et, nt, rt), et + var it = get$6(et, nt) + return isObject$g(rt) && isObject$g(it) && (rt = merge$1({}, it, rt)), set$4(et, nt, rt), et + } + const merge$2 = getDefaultExportFromCjs(mergeValue), + join = (...tt) => tt.filter(Boolean).join('.') + function getKeyPath(tt) { + const et = tt.split('.') + return [et.pop(), et.join('.') || void 0] + } + function getValuesForPaths(tt, et) { + return Object.entries(pick$1(tt, et)).reduce( + (nt, [, { value: rt, disabled: it, key: ot }]) => ((nt[ot] = it ? void 0 : rt), nt), + {}, + ) + } + function useCompareMemoize(tt, et) { + const nt = reactExports.useRef() + return (et ? dequal : shallow$2)(tt, nt.current) || (nt.current = tt), nt.current + } + function useDeepMemo(tt, et) { + return reactExports.useMemo(tt, useCompareMemoize(et, !0)) + } + function useToggle(tt) { + const et = reactExports.useRef(null), + nt = reactExports.useRef(null), + rt = reactExports.useRef(!0) + return ( + reactExports.useLayoutEffect(() => { + tt || ((et.current.style.height = '0px'), (et.current.style.overflow = 'hidden')) + }, []), + reactExports.useEffect(() => { + if (rt.current) { + rt.current = !1 + return + } + let it + const ot = et.current, + at = () => { + tt && + (ot.style.removeProperty('height'), + ot.style.removeProperty('overflow'), + nt.current.scrollIntoView({ behavior: 'smooth', block: 'nearest' })) + } + ot.addEventListener('transitionend', at, { once: !0 }) + const { height: st } = nt.current.getBoundingClientRect() + return ( + (ot.style.height = st + 'px'), + tt || ((ot.style.overflow = 'hidden'), (it = window.setTimeout(() => (ot.style.height = '0px'), 50))), + () => { + ot.removeEventListener('transitionend', at), clearTimeout(it) + } + ) + }, [tt]), + { wrapperRef: et, contentRef: nt } + ) + } + const useVisiblePaths = (tt) => { + const [et, nt] = reactExports.useState(tt.getVisiblePaths()) + return ( + reactExports.useEffect(() => { + nt(tt.getVisiblePaths()) + const rt = tt.useStore.subscribe(tt.getVisiblePaths, nt, { equalityFn: shallow$2 }) + return () => rt() + }, [tt]), + et + ) + } + function useValuesForPath(tt, et, nt) { + return tt.useStore((it) => { + const ot = _objectSpread2$1(_objectSpread2$1({}, nt), it.data) + return getValuesForPaths(ot, et) + }, shallow$2) + } + function usePopin(tt = 3) { + const et = reactExports.useRef(null), + nt = reactExports.useRef(null), + [rt, it] = reactExports.useState(!1), + ot = reactExports.useCallback(() => it(!0), []), + at = reactExports.useCallback(() => it(!1), []) + return ( + reactExports.useLayoutEffect(() => { + if (rt) { + const { bottom: st, top: lt, left: ct } = et.current.getBoundingClientRect(), + { height: ut } = nt.current.getBoundingClientRect(), + ht = st + ut > window.innerHeight - 40 ? 'up' : 'down' + ;(nt.current.style.position = 'fixed'), + (nt.current.style.zIndex = '10000'), + (nt.current.style.left = ct + 'px'), + ht === 'down' + ? (nt.current.style.top = st + tt + 'px') + : (nt.current.style.bottom = window.innerHeight - lt + tt + 'px') + } + }, [tt, rt]), + { popinRef: et, wrapperRef: nt, shown: rt, show: ot, hide: at } + ) + } + k$8([namesPlugin]) + const convertMap = { rgb: 'toRgb', hsl: 'toHsl', hsv: 'toHsv', hex: 'toHex' } + v8n.extend({ color: () => (tt) => w$5(tt).isValid() }) + const schema$2 = (tt) => v8n().color().test(tt) + function convert$5(tt, { format: et, hasAlpha: nt, isString: rt }) { + const it = convertMap[et] + (rt && et !== 'hex' ? 'String' : ''), + ot = tt[it]() + return typeof ot == 'object' && !nt ? omit$1(ot, ['a']) : ot + } + const sanitize$2 = (tt, et) => { + const nt = w$5(tt) + if (!nt.isValid()) throw Error('Invalid color') + return convert$5(nt, et) + }, + format$1$1 = (tt, et) => + convert$5(w$5(tt), _objectSpread2$1(_objectSpread2$1({}, et), {}, { isString: !0, format: 'hex' })), + normalize$3 = ({ value: tt }) => { + const et = I$2(tt), + nt = et === 'name' ? 'hex' : et, + rt = typeof tt == 'object' ? 'a' in tt : (et === 'hex' && tt.length === 8) || /^(rgba)|(hsla)|(hsva)/.test(tt), + it = { format: nt, hasAlpha: rt, isString: typeof tt == 'string' } + return { value: sanitize$2(tt, it), settings: it } + } + var props$2 = Object.freeze({ + __proto__: null, + schema: schema$2, + sanitize: sanitize$2, + format: format$1$1, + normalize: normalize$3, + }) + const ColorPreview = styled$5('div', { + position: 'relative', + boxSizing: 'border-box', + borderRadius: '$sm', + overflow: 'hidden', + cursor: 'pointer', + height: '$rowHeight', + width: '$rowHeight', + backgroundColor: '#fff', + backgroundImage: `url('data:image/svg+xml;charset=utf-8,')`, + $inputStyle: '', + $hover: '', + zIndex: 1, + variants: { active: { true: { $inputStyle: '$accent1' } } }, + '&::before': { + content: '""', + position: 'absolute', + top: 0, + bottom: 0, + right: 0, + left: 0, + backgroundColor: 'currentColor', + zIndex: 1, + }, + }), + PickerContainer = styled$5('div', { + position: 'relative', + display: 'grid', + gridTemplateColumns: '$sizes$rowHeight auto', + columnGap: '$colGap', + alignItems: 'center', + }), + PickerWrapper = styled$5('div', { + width: '$colorPickerWidth', + height: '$colorPickerHeight', + '.react-colorful': { width: '100%', height: '100%', boxShadow: '$level2', cursor: 'crosshair' }, + '.react-colorful__saturation': { borderRadius: '$sm $sm 0 0' }, + '.react-colorful__alpha, .react-colorful__hue': { height: 10 }, + '.react-colorful__last-control': { borderRadius: '0 0 $sm $sm' }, + '.react-colorful__pointer': { height: 12, width: 12 }, + }) + function convertToRgb(tt, et) { + return et !== 'rgb' ? w$5(tt).toRgb() : tt + } + function Color$2({ value: tt, displayValue: et, settings: nt, onUpdate: rt }) { + const { emitOnEditStart: it, emitOnEditEnd: ot } = useInputContext(), + { format: at, hasAlpha: st } = nt, + { popinRef: lt, wrapperRef: ct, shown: ut, show: ht, hide: dt } = usePopin(), + pt = reactExports.useRef(0), + [mt, gt] = reactExports.useState(() => convertToRgb(tt, at)), + yt = st ? Ce : Ne$1, + bt = () => { + gt(convertToRgb(tt, at)), ht(), it() + }, + vt = () => { + dt(), ot(), window.clearTimeout(pt.current) + }, + xt = () => { + pt.current = window.setTimeout(vt, 500) + } + return ( + reactExports.useEffect(() => () => window.clearTimeout(pt.current), []), + React$1.createElement( + React$1.Fragment, + null, + React$1.createElement(ColorPreview, { ref: lt, active: ut, onClick: () => bt(), style: { color: et } }), + ut && + React$1.createElement( + Portal$2, + null, + React$1.createElement(Overlay$1, { onPointerUp: vt }), + React$1.createElement( + PickerWrapper, + { + ref: ct, + onMouseEnter: () => window.clearTimeout(pt.current), + onMouseLeave: (kt) => kt.buttons === 0 && xt(), + }, + React$1.createElement(yt, { color: mt, onChange: rt }), + ), + ), + ) + ) + } + function ColorComponent() { + const { value: tt, displayValue: et, label: nt, onChange: rt, onUpdate: it, settings: ot } = useInputContext() + return React$1.createElement( + Row, + { input: !0 }, + React$1.createElement(Label$4, null, nt), + React$1.createElement( + PickerContainer, + null, + React$1.createElement(Color$2, { value: tt, displayValue: et, onChange: rt, onUpdate: it, settings: ot }), + React$1.createElement(ValueInput, { value: et, onChange: rt, onUpdate: it }), + ), + ) + } + var color$3 = _objectSpread2$1({ component: ColorComponent }, props$2) + function Vector3dComponent() { + const { label: tt, displayValue: et, onUpdate: nt, settings: rt } = useInputContext() + return React$1.createElement( + Row, + { input: !0 }, + React$1.createElement(Label$4, null, tt), + React$1.createElement(Vector, { value: et, settings: rt, onUpdate: nt }), + ) + } + var vector3d = _objectSpread2$1({ component: Vector3dComponent }, getVectorPlugin(['x', 'y', 'z'])) + const JoystickTrigger = styled$5('div', { + $flexCenter: '', + position: 'relative', + backgroundColor: '$elevation3', + borderRadius: '$sm', + cursor: 'pointer', + height: '$rowHeight', + width: '$rowHeight', + touchAction: 'none', + $draggable: '', + $hover: '', + '&:active': { cursor: 'none' }, + '&::after': { content: '""', backgroundColor: '$accent2', height: 4, width: 4, borderRadius: 2 }, + }), + JoystickPlayground = styled$5('div', { + $flexCenter: '', + width: '$joystickWidth', + height: '$joystickHeight', + borderRadius: '$sm', + boxShadow: '$level2', + position: 'fixed', + zIndex: 1e4, + overflow: 'hidden', + $draggable: '', + transform: 'translate(-50%, -50%)', + variants: { + isOutOfBounds: { true: { backgroundColor: '$elevation1' }, false: { backgroundColor: '$elevation3' } }, + }, + '> div': { + position: 'absolute', + $flexCenter: '', + borderStyle: 'solid', + borderWidth: 1, + borderColor: '$highlight1', + backgroundColor: '$elevation3', + width: '80%', + height: '80%', + '&::after,&::before': { content: '""', position: 'absolute', zindex: 10, backgroundColor: '$highlight1' }, + '&::before': { width: '100%', height: 1 }, + '&::after': { height: '100%', width: 1 }, + }, + '> span': { + position: 'relative', + zindex: 100, + width: 10, + height: 10, + backgroundColor: '$accent2', + borderRadius: '50%', + }, + }) + function Joystick({ value: tt, settings: et, onUpdate: nt }) { + const rt = reactExports.useRef(), + it = reactExports.useRef(0), + ot = reactExports.useRef(0), + at = reactExports.useRef(1), + [st, lt] = reactExports.useState(!1), + [ct, ut] = reactExports.useState(!1), + [ht, dt] = useTransform(), + pt = reactExports.useRef(null), + mt = reactExports.useRef(null) + reactExports.useLayoutEffect(() => { + if (st) { + const { top: Pt, left: Ct, width: wt, height: It } = pt.current.getBoundingClientRect() + ;(mt.current.style.left = Ct + wt / 2 + 'px'), (mt.current.style.top = Pt + It / 2 + 'px') + } + }, [st]) + const { + keys: [gt, yt], + joystick: bt, + } = et, + vt = bt === 'invertY' ? 1 : -1, + { + [gt]: { step: xt }, + [yt]: { step: kt }, + } = et, + St = useTh('sizes', 'joystickWidth'), + Tt = useTh('sizes', 'joystickHeight'), + At = (parseFloat(St) * 0.8) / 2, + Et = (parseFloat(Tt) * 0.8) / 2, + $t = reactExports.useCallback(() => { + rt.current || + (ut(!0), + it.current && dt({ x: it.current * At }), + ot.current && dt({ y: ot.current * -Et }), + (rt.current = window.setInterval(() => { + nt((Pt) => { + const Ct = xt * it.current * at.current, + wt = vt * kt * ot.current * at.current + return Array.isArray(Pt) + ? { [gt]: Pt[0] + Ct, [yt]: Pt[1] + wt } + : { [gt]: Pt[gt] + Ct, [yt]: Pt[yt] + wt } + }) + }, 16))) + }, [At, Et, nt, dt, xt, kt, gt, yt, vt]), + Dt = reactExports.useCallback(() => { + window.clearTimeout(rt.current), (rt.current = void 0), ut(!1) + }, []) + reactExports.useEffect(() => { + function Pt(Ct) { + at.current = multiplyStep(Ct) + } + return ( + window.addEventListener('keydown', Pt), + window.addEventListener('keyup', Pt), + () => { + window.clearTimeout(rt.current), + window.removeEventListener('keydown', Pt), + window.removeEventListener('keyup', Pt) + } + ) + }, []) + const jt = useDrag$1(({ first: Pt, active: Ct, delta: [wt, It], movement: [Ot, Wt] }) => { + Pt && lt(!0) + const zt = clamp$8(Ot, -At, At), + Ft = clamp$8(Wt, -Et, Et) + ;(it.current = Math.abs(Ot) > Math.abs(zt) ? Math.sign(Ot - zt) : 0), + (ot.current = Math.abs(Wt) > Math.abs(Ft) ? Math.sign(Ft - Wt) : 0) + let Nt = tt[gt], + Ut = tt[yt] + Ct + ? (it.current || ((Nt += wt * xt * at.current), dt({ x: zt })), + ot.current || ((Ut -= vt * It * kt * at.current), dt({ y: Ft })), + it.current || ot.current ? $t() : Dt(), + nt({ [gt]: Nt, [yt]: Ut })) + : (lt(!1), (it.current = 0), (ot.current = 0), dt({ x: 0, y: 0 }), Dt()) + }) + return React$1.createElement( + JoystickTrigger, + _extends$t({ ref: pt }, jt()), + st && + React$1.createElement( + Portal$2, + null, + React$1.createElement( + JoystickPlayground, + { ref: mt, isOutOfBounds: ct }, + React$1.createElement('div', null), + React$1.createElement('span', { ref: ht }), + ), + ), + ) + } + const Container$1 = styled$5('div', { + display: 'grid', + columnGap: '$colGap', + variants: { + withJoystick: { true: { gridTemplateColumns: '$sizes$rowHeight auto' }, false: { gridTemplateColumns: 'auto' } }, + }, + }) + function Vector2dComponent() { + const { label: tt, displayValue: et, onUpdate: nt, settings: rt } = useInputContext() + return React$1.createElement( + Row, + { input: !0 }, + React$1.createElement(Label$4, null, tt), + React$1.createElement( + Container$1, + { withJoystick: !!rt.joystick }, + rt.joystick && React$1.createElement(Joystick, { value: et, settings: rt, onUpdate: nt }), + React$1.createElement(Vector, { value: et, settings: rt, onUpdate: nt }), + ), + ) + } + const _excluded$7$1 = ['joystick'], + plugin = getVectorPlugin(['x', 'y']), + normalize$2$1 = (tt) => { + let { joystick: et = !0 } = tt, + nt = _objectWithoutProperties$l(tt, _excluded$7$1) + const { value: rt, settings: it } = plugin.normalize(nt) + return { value: rt, settings: _objectSpread2$1(_objectSpread2$1({}, it), {}, { joystick: et }) } + } + var vector2d = _objectSpread2$1( + _objectSpread2$1({ component: Vector2dComponent }, plugin), + {}, + { normalize: normalize$2$1 }, + ) + const sanitize$1 = (tt) => { + if (tt !== void 0) { + if (tt instanceof File) + try { + return URL.createObjectURL(tt) + } catch { + return + } + if (typeof tt == 'string' && tt.indexOf('blob:') === 0) return tt + throw Error('Invalid image format [undefined | blob | File].') + } + }, + schema$1 = (tt, et) => typeof et == 'object' && 'image' in et, + normalize$1$1 = ({ image: tt }) => ({ value: tt }) + var props$1 = Object.freeze({ __proto__: null, sanitize: sanitize$1, schema: schema$1, normalize: normalize$1$1 }) + const ImageContainer = styled$5('div', { + position: 'relative', + display: 'grid', + gridTemplateColumns: '$sizes$rowHeight auto 20px', + columnGap: '$colGap', + alignItems: 'center', + }), + DropZone = styled$5('div', { + $flexCenter: '', + overflow: 'hidden', + height: '$rowHeight', + background: '$elevation3', + textAlign: 'center', + color: 'inherit', + borderRadius: '$sm', + outline: 'none', + userSelect: 'none', + cursor: 'pointer', + $inputStyle: '', + $hover: '', + $focusWithin: '', + $active: '$accent1 $elevation1', + variants: { isDragAccept: { true: { $inputStyle: '$accent1', backgroundColor: '$elevation1' } } }, + }), + ImagePreview = styled$5('div', { + boxSizing: 'border-box', + borderRadius: '$sm', + height: '$rowHeight', + width: '$rowHeight', + $inputStyle: '', + backgroundSize: 'cover', + backgroundPosition: 'center', + variants: { hasImage: { true: { cursor: 'pointer', $hover: '', $active: '' } } }, + }), + ImageLargePreview = styled$5('div', { + $flexCenter: '', + width: '$imagePreviewWidth', + height: '$imagePreviewHeight', + borderRadius: '$sm', + boxShadow: '$level2', + pointerEvents: 'none', + $inputStyle: '', + backgroundSize: 'cover', + backgroundPosition: 'center', + }), + Instructions = styled$5('div', { fontSize: '0.8em', height: '100%', padding: '$rowGap $md' }), + Remove = styled$5('div', { + $flexCenter: '', + top: '0', + right: '0', + marginRight: '$sm', + height: '100%', + cursor: 'pointer', + variants: { disabled: { true: { color: '$elevation3', cursor: 'default' } } }, + '&::after,&::before': { + content: '""', + position: 'absolute', + height: 2, + width: 10, + borderRadius: 1, + backgroundColor: 'currentColor', + }, + '&::after': { transform: 'rotate(45deg)' }, + '&::before': { transform: 'rotate(-45deg)' }, + }) + function ImageComponent() { + const { label: tt, value: et, onUpdate: nt, disabled: rt } = useInputContext(), + { popinRef: it, wrapperRef: ot, shown: at, show: st, hide: lt } = usePopin(), + ct = reactExports.useCallback( + (mt) => { + mt.length && nt(mt[0]) + }, + [nt], + ), + ut = reactExports.useCallback( + (mt) => { + mt.stopPropagation(), nt(void 0) + }, + [nt], + ), + { + getRootProps: ht, + getInputProps: dt, + isDragAccept: pt, + } = useDropzone({ maxFiles: 1, accept: 'image/*', onDrop: ct, disabled: rt }) + return React$1.createElement( + Row, + { input: !0 }, + React$1.createElement(Label$4, null, tt), + React$1.createElement( + ImageContainer, + null, + React$1.createElement(ImagePreview, { + ref: it, + hasImage: !!et, + onPointerDown: () => !!et && st(), + onPointerUp: lt, + style: { backgroundImage: et ? `url(${et})` : 'none' }, + }), + at && + !!et && + React$1.createElement( + Portal$2, + null, + React$1.createElement(Overlay$1, { onPointerUp: lt, style: { cursor: 'pointer' } }), + React$1.createElement(ImageLargePreview, { ref: ot, style: { backgroundImage: `url(${et})` } }), + ), + React$1.createElement( + DropZone, + ht({ isDragAccept: pt }), + React$1.createElement('input', dt()), + React$1.createElement(Instructions, null, pt ? 'drop image' : 'click or drop'), + ), + React$1.createElement(Remove, { onClick: ut, disabled: !et }), + ), + ) + } + var image = _objectSpread2$1({ component: ImageComponent }, props$1) + const number$5 = v8n().number(), + schema = (tt, et) => + v8n().array().length(2).every.number().test(tt) && v8n().schema({ min: number$5, max: number$5 }).test(et), + format$2 = (tt) => ({ min: tt[0], max: tt[1] }), + sanitize = (tt, { bounds: [et, nt] }, rt) => { + const it = Array.isArray(tt) ? format$2(tt) : tt, + ot = { min: rt[0], max: rt[1] }, + { min: at, max: st } = _objectSpread2$1(_objectSpread2$1({}, ot), it) + return [clamp$8(Number(at), et, Math.max(et, st)), clamp$8(Number(st), Math.min(nt, at), nt)] + }, + normalize$4 = ({ value: tt, min: et, max: nt }) => { + const rt = { min: et, max: nt }, + it = normalizeKeyedNumberSettings(format$2(tt), { min: rt, max: rt }), + ot = [et, nt], + at = _objectSpread2$1(_objectSpread2$1({}, it), {}, { bounds: ot }) + return { value: sanitize(format$2(tt), at, tt), settings: at } + } + var props$3 = Object.freeze({ __proto__: null, schema, format: format$2, sanitize, normalize: normalize$4 }) + const _excluded$6$1 = ['value', 'bounds', 'onDrag'], + _excluded2$1$1 = ['bounds'], + Container = styled$5('div', { + display: 'grid', + columnGap: '$colGap', + gridTemplateColumns: 'auto calc($sizes$numberInputMinWidth * 2 + $space$rowGap)', + }) + function IntervalSlider(tt) { + let { + value: et, + bounds: [nt, rt], + onDrag: it, + } = tt, + ot = _objectWithoutProperties$l(tt, _excluded$6$1) + const at = reactExports.useRef(null), + st = reactExports.useRef(null), + lt = reactExports.useRef(null), + ct = reactExports.useRef(0), + ut = useTh('sizes', 'scrubberWidth'), + ht = useDrag$1(({ event: mt, first: gt, xy: [yt], movement: [bt], memo: vt = {} }) => { + if (gt) { + const { width: kt, left: St } = at.current.getBoundingClientRect() + ct.current = kt - parseFloat(ut) + const Tt = + (mt == null ? void 0 : mt.target) === st.current || (mt == null ? void 0 : mt.target) === lt.current + vt.pos = invertedRange((yt - St) / kt, nt, rt) + const At = Math.abs(vt.pos - et.min) - Math.abs(vt.pos - et.max) + ;(vt.key = At < 0 || (At === 0 && vt.pos <= et.min) ? 'min' : 'max'), Tt && (vt.pos = et[vt.key]) + } + const xt = vt.pos + invertedRange(bt / ct.current, 0, rt - nt) + return it({ [vt.key]: sanitizeStep(xt, ot[vt.key]) }), vt + }), + dt = `calc(${range$8(et.min, nt, rt)} * (100% - ${ut} - 8px) + 4px)`, + pt = `calc(${1 - range$8(et.max, nt, rt)} * (100% - ${ut} - 8px) + 4px)` + return React$1.createElement( + RangeWrapper, + _extends$t({ ref: at }, ht()), + React$1.createElement(Range, null, React$1.createElement(Indicator, { style: { left: dt, right: pt } })), + React$1.createElement(Scrubber, { position: 'left', ref: st, style: { left: dt } }), + React$1.createElement(Scrubber, { position: 'right', ref: lt, style: { right: pt } }), + ) + } + function IntervalComponent() { + const { label: tt, displayValue: et, onUpdate: nt, settings: rt } = useInputContext(), + it = _objectWithoutProperties$l(rt, _excluded2$1$1) + return React$1.createElement( + React$1.Fragment, + null, + React$1.createElement( + Row, + { input: !0 }, + React$1.createElement(Label$4, null, tt), + React$1.createElement( + Container, + null, + React$1.createElement(IntervalSlider, _extends$t({ value: et }, rt, { onDrag: nt })), + React$1.createElement(Vector, { value: et, settings: it, onUpdate: nt, innerLabelTrim: 0 }), + ), + ), + ) + } + var interval$1 = _objectSpread2$1({ component: IntervalComponent }, props$3) + const createEventEmitter = () => { + const tt = new Map() + return { + on: (et, nt) => { + let rt = tt.get(et) + rt === void 0 && ((rt = new Set()), tt.set(et, rt)), rt.add(nt) + }, + off: (et, nt) => { + const rt = tt.get(et) + rt !== void 0 && (rt.delete(nt), rt.size === 0 && tt.delete(et)) + }, + emit: (et, ...nt) => { + const rt = tt.get(et) + if (rt !== void 0) for (const it of rt) it(...nt) + }, + } + }, + _excluded$5$1 = ['type', 'value'], + _excluded2$h = ['onChange', 'transient', 'onEditStart', 'onEditEnd'], + Store = function () { + const et = create$4(subscribeWithSelector(() => ({ data: {} }))), + nt = createEventEmitter() + ;(this.storeId = getUid()), (this.useStore = et) + const rt = {}, + it = new Set() + ;(this.getVisiblePaths = () => { + const at = this.getData(), + st = Object.keys(at), + lt = [] + Object.entries(rt).forEach(([ut, ht]) => { + ht.render && st.some((dt) => dt.indexOf(ut) === 0) && !ht.render(this.get) && lt.push(ut + '.') + }) + const ct = [] + return ( + it.forEach((ut) => { + ut in at && + at[ut].__refCount > 0 && + lt.every((ht) => ut.indexOf(ht) === -1) && + (!at[ut].render || at[ut].render(this.get)) && + ct.push(ut) + }), + ct + ) + }), + (this.setOrderedPaths = (at) => { + at.forEach((st) => it.add(st)) + }), + (this.orderPaths = (at) => (this.setOrderedPaths(at), at)), + (this.disposePaths = (at) => { + et.setState((st) => { + const lt = st.data + return ( + at.forEach((ct) => { + if (ct in lt) { + const ut = lt[ct] + ut.__refCount--, ut.__refCount === 0 && ut.type in SpecialInputs && delete lt[ct] + } + }), + { data: lt } + ) + }) + }), + (this.dispose = () => { + et.setState(() => ({ data: {} })) + }), + (this.getFolderSettings = (at) => rt[at] || {}), + (this.getData = () => et.getState().data), + (this.addData = (at, st) => { + et.setState((lt) => { + const ct = lt.data + return ( + Object.entries(at).forEach(([ut, ht]) => { + let dt = ct[ut] + if (dt) { + const { type: pt, value: mt } = ht, + gt = _objectWithoutProperties$l(ht, _excluded$5$1) + pt !== dt.type + ? warn$3(LevaErrors.INPUT_TYPE_OVERRIDE, pt) + : ((dt.__refCount === 0 || st) && Object.assign(dt, gt), dt.__refCount++) + } else ct[ut] = _objectSpread2$1(_objectSpread2$1({}, ht), {}, { __refCount: 1 }) + }), + { data: ct } + ) + }) + }), + (this.setValueAtPath = (at, st, lt) => { + et.setState((ct) => { + const ut = ct.data + return updateInput(ut[at], st, at, this, lt), { data: ut } + }) + }), + (this.setSettingsAtPath = (at, st) => { + et.setState((lt) => { + const ct = lt.data + return (ct[at].settings = _objectSpread2$1(_objectSpread2$1({}, ct[at].settings), st)), { data: ct } + }) + }), + (this.disableInputAtPath = (at, st) => { + et.setState((lt) => { + const ct = lt.data + return (ct[at].disabled = st), { data: ct } + }) + }), + (this.set = (at, st) => { + et.setState((lt) => { + const ct = lt.data + return ( + Object.entries(at).forEach(([ut, ht]) => { + try { + updateInput(ct[ut], ht, void 0, void 0, st) + } catch {} + }), + { data: ct } + ) + }) + }), + (this.getInput = (at) => { + try { + return this.getData()[at] + } catch { + warn$3(LevaErrors.PATH_DOESNT_EXIST, at) + } + }), + (this.get = (at) => { + var st + return (st = this.getInput(at)) === null || st === void 0 ? void 0 : st.value + }), + (this.emitOnEditStart = (at) => { + nt.emit( + `onEditStart:${at}`, + this.get(at), + at, + _objectSpread2$1(_objectSpread2$1({}, this.getInput(at)), {}, { get: this.get }), + ) + }), + (this.emitOnEditEnd = (at) => { + nt.emit( + `onEditEnd:${at}`, + this.get(at), + at, + _objectSpread2$1(_objectSpread2$1({}, this.getInput(at)), {}, { get: this.get }), + ) + }), + (this.subscribeToEditStart = (at, st) => { + const lt = `onEditStart:${at}` + return nt.on(lt, st), () => nt.off(lt, st) + }), + (this.subscribeToEditEnd = (at, st) => { + const lt = `onEditEnd:${at}` + return nt.on(lt, st), () => nt.off(lt, st) + }) + const ot = (at, st, lt) => { + const ct = {} + return ( + Object.entries(at).forEach(([ut, ht]) => { + if (ut === '') return warn$3(LevaErrors.EMPTY_KEY) + let dt = join(st, ut) + if (ht.type === SpecialInputs.FOLDER) { + const pt = ot(ht.schema, dt, lt) + Object.assign(ct, pt), dt in rt || (rt[dt] = ht.settings) + } else if (ut in lt) warn$3(LevaErrors.DUPLICATE_KEYS, ut, dt, lt[ut].path) + else { + const pt = normalizeInput(ht, ut, dt, ct) + if (pt) { + const { type: mt, options: gt, input: yt } = pt, + { onChange: bt, transient: vt, onEditStart: xt, onEditEnd: kt } = gt, + St = _objectWithoutProperties$l(gt, _excluded2$h) + ;(ct[dt] = _objectSpread2$1( + _objectSpread2$1(_objectSpread2$1({ type: mt }, St), yt), + {}, + { fromPanel: !0 }, + )), + (lt[ut] = { path: dt, onChange: bt, transient: vt, onEditStart: xt, onEditEnd: kt }) + } else warn$3(LevaErrors.UNKNOWN_INPUT, dt, ht) + } + }), + ct + ) + } + this.getDataFromSchema = (at) => { + const st = {} + return [ot(at, '', st), st] + } + }, + levaStore = new Store(), + defaultSettings$2 = { collapsed: !1 } + function folder(tt, et) { + return { + type: SpecialInputs.FOLDER, + schema: tt, + settings: _objectSpread2$1(_objectSpread2$1({}, defaultSettings$2), et), + } + } + const isInput = (tt) => '__levaInput' in tt, + buildTree = (tt, et) => { + const nt = {}, + rt = et ? et.toLowerCase() : null + return ( + tt.forEach((it) => { + const [ot, at] = getKeyPath(it) + ;(!rt || ot.toLowerCase().indexOf(rt) > -1) && merge$2(nt, at, { [ot]: { __levaInput: !0, path: it } }) + }), + nt + ) + }, + _excluded$4$1 = ['type', 'label', 'path', 'valueKey', 'value', 'settings', 'setValue', 'disabled'] + function ControlInput(tt) { + let { type: et, label: nt, path: rt, valueKey: it, value: ot, settings: at, setValue: st, disabled: lt } = tt, + ct = _objectWithoutProperties$l(tt, _excluded$4$1) + const { + displayValue: ut, + onChange: ht, + onUpdate: dt, + } = useInputSetters({ type: et, value: ot, settings: at, setValue: st }), + pt = Plugins[et].component + return pt + ? React$1.createElement( + InputContext.Provider, + { + value: _objectSpread2$1( + { + key: it, + path: rt, + id: '' + rt, + label: nt, + displayValue: ut, + value: ot, + onChange: ht, + onUpdate: dt, + settings: at, + setValue: st, + disabled: lt, + }, + ct, + ), + }, + React$1.createElement(StyledInputWrapper$1, { disabled: lt }, React$1.createElement(pt, null)), + ) + : (warn$3(LevaErrors.NO_COMPONENT_FOR_TYPE, et, rt), null) + } + const StyledButton$2 = styled$5('button', { + display: 'block', + $reset: '', + fontWeight: '$button', + height: '$rowHeight', + borderStyle: 'none', + borderRadius: '$sm', + backgroundColor: '$elevation1', + color: '$highlight1', + '&:not(:disabled)': { + color: '$highlight3', + backgroundColor: '$accent2', + cursor: 'pointer', + $hover: '$accent3', + $active: '$accent3 $accent1', + $focus: '', + }, + }) + function Button$3({ onClick: tt, settings: et, label: nt }) { + const rt = useStoreContext() + return React$1.createElement( + Row, + null, + React$1.createElement(StyledButton$2, { disabled: et.disabled, onClick: () => tt(rt.get) }, nt), + ) + } + const StyledButtonGroup = styled$5('div', { $flex: '', justifyContent: 'flex-end', gap: '$colGap' }), + StyledButtonGroupButton = styled$5('button', { + $reset: '', + cursor: 'pointer', + borderRadius: '$xs', + '&:hover': { backgroundColor: '$elevation3' }, + }), + getOpts = ({ label: tt, opts: et }) => { + let nt = typeof tt == 'string' && tt.trim() === '' ? null : tt, + rt = et + return ( + typeof et.opts == 'object' && (rt.label !== void 0 && (nt = et.label), (rt = et.opts)), { label: nt, opts: rt } + ) + } + function ButtonGroup(tt) { + const { label: et, opts: nt } = getOpts(tt), + rt = useStoreContext() + return React$1.createElement( + Row, + { input: !!et }, + et && React$1.createElement(Label$4, null, et), + React$1.createElement( + StyledButtonGroup, + null, + Object.entries(nt).map(([it, ot]) => + React$1.createElement(StyledButtonGroupButton, { key: it, onClick: () => ot(rt.get) }, it), + ), + ), + ) + } + const Canvas$2 = styled$5('canvas', { + height: '$monitorHeight', + width: '100%', + display: 'block', + borderRadius: '$sm', + }), + POINTS = 100 + function push(tt, et) { + tt.push(et), tt.length > POINTS && tt.shift() + } + const MonitorCanvas = reactExports.forwardRef(function ({ initialValue: tt }, et) { + const nt = useTh('colors', 'highlight3'), + rt = useTh('colors', 'elevation2'), + it = useTh('colors', 'highlight1'), + [ot, at] = reactExports.useMemo( + () => [w$5(it).alpha(0.4).toRgbString(), w$5(it).alpha(0.1).toRgbString()], + [it], + ), + st = reactExports.useRef([tt]), + lt = reactExports.useRef(tt), + ct = reactExports.useRef(tt), + ut = reactExports.useRef(), + ht = reactExports.useCallback( + (mt, gt) => { + if (!mt) return + const { width: yt, height: bt } = mt, + vt = new Path2D(), + xt = yt / POINTS, + kt = bt * 0.05 + for (let At = 0; At < st.current.length; At++) { + const Et = range$8(st.current[At], lt.current, ct.current), + $t = xt * At, + Dt = bt - Et * (bt - kt * 2) - kt + vt.lineTo($t, Dt) + } + gt.clearRect(0, 0, yt, bt) + const St = new Path2D(vt) + St.lineTo(xt * (st.current.length + 1), bt), St.lineTo(0, bt), St.lineTo(0, 0) + const Tt = gt.createLinearGradient(0, 0, 0, bt) + Tt.addColorStop(0, ot), + Tt.addColorStop(1, at), + (gt.fillStyle = Tt), + gt.fill(St), + (gt.strokeStyle = rt), + (gt.lineJoin = 'round'), + (gt.lineWidth = 14), + gt.stroke(vt), + (gt.strokeStyle = nt), + (gt.lineWidth = 2), + gt.stroke(vt) + }, + [nt, rt, ot, at], + ), + [dt, pt] = useCanvas2d(ht) + return ( + reactExports.useImperativeHandle( + et, + () => ({ + frame: (mt) => { + ;(lt.current === void 0 || mt < lt.current) && (lt.current = mt), + (ct.current === void 0 || mt > ct.current) && (ct.current = mt), + push(st.current, mt), + (ut.current = requestAnimationFrame(() => ht(dt.current, pt.current))) + }, + }), + [dt, pt, ht], + ), + reactExports.useEffect(() => () => cancelAnimationFrame(ut.current), []), + React$1.createElement(Canvas$2, { ref: dt }) + ) + }), + parse$2 = (tt) => (Number.isFinite(tt) ? tt.toPrecision(2) : tt.toString()), + MonitorLog = reactExports.forwardRef(function ({ initialValue: tt }, et) { + const [nt, rt] = reactExports.useState(parse$2(tt)) + return ( + reactExports.useImperativeHandle(et, () => ({ frame: (it) => rt(parse$2(it)) }), []), + React$1.createElement('div', null, nt) + ) + }) + function getValue$4(tt) { + return typeof tt == 'function' ? tt() : tt.current + } + function Monitor({ label: tt, objectOrFn: et, settings: nt }) { + const rt = reactExports.useRef(), + it = reactExports.useRef(getValue$4(et)) + return ( + reactExports.useEffect(() => { + const ot = window.setInterval(() => { + var at + document.hidden || (at = rt.current) === null || at === void 0 || at.frame(getValue$4(et)) + }, nt.interval) + return () => window.clearInterval(ot) + }, [et, nt.interval]), + React$1.createElement( + Row, + { input: !0 }, + React$1.createElement(Label$4, { align: 'top' }, tt), + nt.graph + ? React$1.createElement(MonitorCanvas, { ref: rt, initialValue: it.current }) + : React$1.createElement(MonitorLog, { ref: rt, initialValue: it.current }), + ) + ) + } + const _excluded$3$1 = ['type', 'label', 'key'], + specialComponents = { + [SpecialInputs.BUTTON]: Button$3, + [SpecialInputs.BUTTON_GROUP]: ButtonGroup, + [SpecialInputs.MONITOR]: Monitor, + }, + Control = React$1.memo(({ path: tt }) => { + const [et, { set: nt, setSettings: rt, disable: it, storeId: ot, emitOnEditStart: at, emitOnEditEnd: st }] = + useInput(tt) + if (!et) return null + const { type: lt, label: ct, key: ut } = et, + ht = _objectWithoutProperties$l(et, _excluded$3$1) + if (lt in SpecialInputs) { + const dt = specialComponents[lt] + return React$1.createElement(dt, _extends$t({ label: ct, path: tt }, ht)) + } + return lt in Plugins + ? React$1.createElement( + ControlInput, + _extends$t( + { + key: ot + tt, + type: lt, + label: ct, + storeId: ot, + path: tt, + valueKey: ut, + setValue: nt, + setSettings: rt, + disable: it, + emitOnEditStart: at, + emitOnEditEnd: st, + }, + ht, + ), + ) + : (log$2(LevaErrors.UNSUPPORTED_INPUT, lt, tt), null) + }) + function FolderTitle({ toggle: tt, toggled: et, name: nt }) { + return React$1.createElement( + StyledTitle, + { onClick: () => tt() }, + React$1.createElement(Chevron, { toggled: et }), + React$1.createElement('div', null, nt), + ) + } + const Folder = ({ name: tt, path: et, tree: nt }) => { + const rt = useStoreContext(), + it = join(et, tt), + { collapsed: ot, color: at } = rt.getFolderSettings(it), + [st, lt] = reactExports.useState(!ot), + ct = reactExports.useRef(null), + ut = useTh('colors', 'folderWidgetColor'), + ht = useTh('colors', 'folderTextColor') + return ( + reactExports.useLayoutEffect(() => { + ct.current.style.setProperty('--leva-colors-folderWidgetColor', at || ut), + ct.current.style.setProperty('--leva-colors-folderTextColor', at || ht) + }, [at, ut, ht]), + React$1.createElement( + StyledFolder, + { ref: ct }, + React$1.createElement(FolderTitle, { name: tt, toggled: st, toggle: () => lt((dt) => !dt) }), + React$1.createElement(TreeWrapper, { parent: it, tree: nt, toggled: st }), + ) + ) + }, + TreeWrapper = React$1.memo( + ({ isRoot: tt = !1, fill: et = !1, flat: nt = !1, parent: rt, tree: it, toggled: ot }) => { + const { wrapperRef: at, contentRef: st } = useToggle(ot), + lt = useStoreContext(), + ct = ([ht, dt]) => { + var pt + return ( + (isInput(dt) + ? (pt = lt.getInput(dt.path)) === null || pt === void 0 + ? void 0 + : pt.order + : lt.getFolderSettings(join(rt, ht)).order) || 0 + ) + }, + ut = Object.entries(it).sort((ht, dt) => ct(ht) - ct(dt)) + return React$1.createElement( + StyledWrapper, + { ref: at, isRoot: tt, fill: et, flat: nt }, + React$1.createElement( + StyledContent, + { ref: st, isRoot: tt, toggled: ot }, + ut.map(([ht, dt]) => + isInput(dt) + ? React$1.createElement(Control, { key: dt.path, valueKey: dt.valueKey, path: dt.path }) + : React$1.createElement(Folder, { key: ht, name: ht, path: rt, tree: dt }), + ), + ), + ) + }, + ), + StyledRoot = styled$5('div', { + position: 'relative', + fontFamily: '$mono', + fontSize: '$root', + color: '$rootText', + backgroundColor: '$elevation1', + variants: { + fill: { + false: { position: 'fixed', top: '10px', right: '10px', zIndex: 1e3, width: '$rootWidth' }, + true: { position: 'relative', width: '100%' }, + }, + flat: { false: { borderRadius: '$lg', boxShadow: '$level1' } }, + oneLineLabels: { + true: { + [`${StyledInputRow}`]: { + gridTemplateColumns: 'auto', + gridAutoColumns: 'minmax(max-content, 1fr)', + gridAutoRows: 'minmax($sizes$rowHeight), auto)', + rowGap: 0, + columnGap: 0, + marginTop: '$rowGap', + }, + }, + }, + hideTitleBar: { true: { $$titleBarHeight: '0px' }, false: { $$titleBarHeight: '$sizes$titleBarHeight' } }, + }, + '&,*,*:after,*:before': { boxSizing: 'border-box' }, + '*::selection': { backgroundColor: '$accent2' }, + }), + iconWidth = 40, + Icon = styled$5('i', { + $flexCenter: '', + width: iconWidth, + userSelect: 'none', + cursor: 'pointer', + '> svg': { fill: '$highlight1', transition: 'transform 350ms ease, fill 250ms ease' }, + '&:hover > svg': { fill: '$highlight3' }, + variants: { active: { true: { '> svg': { fill: '$highlight2' } } } }, + }), + StyledTitleWithFilter = styled$5('div', { + display: 'flex', + alignItems: 'stretch', + justifyContent: 'space-between', + height: '$titleBarHeight', + variants: { mode: { drag: { cursor: 'grab' } } }, + }), + FilterWrapper = styled$5('div', { + $flex: '', + position: 'relative', + width: '100%', + overflow: 'hidden', + transition: 'height 250ms ease', + color: '$highlight3', + paddingLeft: '$md', + [`> ${Icon}`]: { height: 30 }, + variants: { toggled: { true: { height: 30 }, false: { height: 0 } } }, + }), + StyledFilterInput = styled$5('input', { + $reset: '', + flex: 1, + position: 'relative', + height: 30, + width: '100%', + backgroundColor: 'transparent', + fontSize: '10px', + borderRadius: '$root', + '&:focus': {}, + '&::placeholder': { color: '$highlight2' }, + }), + TitleContainer = styled$5('div', { + touchAction: 'none', + $flexCenter: '', + flex: 1, + '> svg': { fill: '$highlight1' }, + color: '$highlight1', + variants: { + drag: { + true: { + $draggable: '', + '> svg': { transition: 'fill 250ms ease' }, + '&:hover': { color: '$highlight3' }, + '&:hover > svg': { fill: '$highlight3' }, + }, + }, + filterEnabled: { false: { paddingRight: iconWidth } }, + }, + }), + FilterInput = React$1.forwardRef(({ setFilter: tt, toggle: et }, nt) => { + const [rt, it] = reactExports.useState(''), + ot = reactExports.useMemo(() => debounce$6(tt, 250), [tt]), + at = () => { + tt(''), it('') + }, + st = (lt) => { + const ct = lt.currentTarget.value + et(!0), it(ct) + } + return ( + reactExports.useEffect(() => { + ot(rt) + }, [rt, ot]), + React$1.createElement( + React$1.Fragment, + null, + React$1.createElement(StyledFilterInput, { + ref: nt, + value: rt, + placeholder: '[Open filter with CMD+SHIFT+L]', + onPointerDown: (lt) => lt.stopPropagation(), + onChange: st, + }), + React$1.createElement( + Icon, + { onClick: () => at(), style: { visibility: rt ? 'visible' : 'hidden' } }, + React$1.createElement( + 'svg', + { + xmlns: 'http://www.w3.org/2000/svg', + height: '14', + width: '14', + viewBox: '0 0 20 20', + fill: 'currentColor', + }, + React$1.createElement('path', { + fillRule: 'evenodd', + d: 'M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z', + clipRule: 'evenodd', + }), + ), + ), + ) + ) + }) + function TitleWithFilter({ + setFilter: tt, + onDrag: et, + onDragStart: nt, + onDragEnd: rt, + toggle: it, + toggled: ot, + title: at, + drag: st, + filterEnabled: lt, + from: ct, + }) { + const [ut, ht] = reactExports.useState(!1), + dt = reactExports.useRef(null) + reactExports.useEffect(() => { + var mt, gt + ut + ? (mt = dt.current) === null || mt === void 0 || mt.focus() + : (gt = dt.current) === null || gt === void 0 || gt.blur() + }, [ut]) + const pt = useDrag$1( + ({ offset: [mt, gt], first: yt, last: bt }) => { + et({ x: mt, y: gt }), yt && nt({ x: mt, y: gt }), bt && rt({ x: mt, y: gt }) + }, + { + filterTaps: !0, + from: ({ offset: [mt, gt] }) => [(ct == null ? void 0 : ct.x) || mt, (ct == null ? void 0 : ct.y) || gt], + }, + ) + return ( + reactExports.useEffect(() => { + const mt = (gt) => { + gt.key === 'L' && gt.shiftKey && gt.metaKey && ht((yt) => !yt) + } + return window.addEventListener('keydown', mt), () => window.removeEventListener('keydown', mt) + }, []), + React$1.createElement( + React$1.Fragment, + null, + React$1.createElement( + StyledTitleWithFilter, + { mode: st ? 'drag' : void 0 }, + React$1.createElement( + Icon, + { active: !ot, onClick: () => it() }, + React$1.createElement(Chevron, { toggled: ot, width: 12, height: 8 }), + ), + React$1.createElement( + TitleContainer, + _extends$t({}, st ? pt() : {}, { drag: st, filterEnabled: lt }), + at === void 0 && st + ? React$1.createElement( + 'svg', + { width: '20', height: '10', viewBox: '0 0 28 14', xmlns: 'http://www.w3.org/2000/svg' }, + React$1.createElement('circle', { cx: '2', cy: '2', r: '2' }), + React$1.createElement('circle', { cx: '14', cy: '2', r: '2' }), + React$1.createElement('circle', { cx: '26', cy: '2', r: '2' }), + React$1.createElement('circle', { cx: '2', cy: '12', r: '2' }), + React$1.createElement('circle', { cx: '14', cy: '12', r: '2' }), + React$1.createElement('circle', { cx: '26', cy: '12', r: '2' }), + ) + : at, + ), + lt && + React$1.createElement( + Icon, + { active: ut, onClick: () => ht((mt) => !mt) }, + React$1.createElement( + 'svg', + { xmlns: 'http://www.w3.org/2000/svg', height: '20', viewBox: '0 0 20 20' }, + React$1.createElement('path', { d: 'M9 9a2 2 0 114 0 2 2 0 01-4 0z' }), + React$1.createElement('path', { + fillRule: 'evenodd', + d: 'M10 18a8 8 0 100-16 8 8 0 000 16zm1-13a4 4 0 00-3.446 6.032l-2.261 2.26a1 1 0 101.414 1.415l2.261-2.261A4 4 0 1011 5z', + clipRule: 'evenodd', + }), + ), + ), + ), + React$1.createElement( + FilterWrapper, + { toggled: ut }, + React$1.createElement(FilterInput, { ref: dt, setFilter: tt, toggle: it }), + ), + ) + ) + } + const _excluded$2$1 = ['store', 'hidden', 'theme', 'collapsed'] + function LevaRoot(tt) { + let { store: et, hidden: nt = !1, theme: rt, collapsed: it = !1 } = tt, + ot = _objectWithoutProperties$l(tt, _excluded$2$1) + const at = useDeepMemo(() => mergeTheme(rt), [rt]), + [st, lt] = reactExports.useState(!it), + ct = typeof it == 'object' ? !it.collapsed : st, + ut = reactExports.useMemo( + () => + typeof it == 'object' + ? (ht) => { + typeof ht == 'function' ? it.onChange(!ht(!it.collapsed)) : it.onChange(!ht) + } + : lt, + [it], + ) + return !et || nt + ? null + : React$1.createElement( + ThemeContext$3.Provider, + { value: at }, + React$1.createElement( + LevaCore, + _extends$t({ store: et }, ot, { toggled: ct, setToggle: ut, rootClass: at.className }), + ), + ) + } + const LevaCore = React$1.memo( + ({ + store: tt, + rootClass: et, + fill: nt = !1, + flat: rt = !1, + neverHide: it = !1, + oneLineLabels: ot = !1, + titleBar: at = { + title: void 0, + drag: !0, + filter: !0, + position: void 0, + onDrag: void 0, + onDragStart: void 0, + onDragEnd: void 0, + }, + hideCopyButton: st = !1, + toggled: lt, + setToggle: ct, + }) => { + var ut, ht + const dt = useVisiblePaths(tt), + [pt, mt] = reactExports.useState(''), + gt = reactExports.useMemo(() => buildTree(dt, pt), [dt, pt]), + [yt, bt] = useTransform(), + vt = it || dt.length > 0, + xt = (typeof at == 'object' && at.title) || void 0, + kt = typeof at == 'object' && (ut = at.drag) !== null && ut !== void 0 ? ut : !0, + St = typeof at == 'object' && (ht = at.filter) !== null && ht !== void 0 ? ht : !0, + Tt = (typeof at == 'object' && at.position) || void 0, + At = (typeof at == 'object' && at.onDrag) || void 0, + Et = (typeof at == 'object' && at.onDragStart) || void 0, + $t = (typeof at == 'object' && at.onDragEnd) || void 0 + return ( + React$1.useEffect(() => { + bt({ x: Tt == null ? void 0 : Tt.x, y: Tt == null ? void 0 : Tt.y }) + }, [Tt, bt]), + globalStyles(), + React$1.createElement( + PanelSettingsContext.Provider, + { value: { hideCopyButton: st } }, + React$1.createElement( + StyledRoot, + { + ref: yt, + className: et, + fill: nt, + flat: rt, + oneLineLabels: ot, + hideTitleBar: !at, + style: { display: vt ? 'block' : 'none' }, + }, + at && + React$1.createElement(TitleWithFilter, { + onDrag: (Dt) => { + bt(Dt), At == null || At(Dt) + }, + onDragStart: (Dt) => (Et == null ? void 0 : Et(Dt)), + onDragEnd: (Dt) => ($t == null ? void 0 : $t(Dt)), + setFilter: mt, + toggle: (Dt) => ct((jt) => Dt ?? !jt), + toggled: lt, + title: xt, + drag: kt, + filterEnabled: St, + from: Tt, + }), + vt && + React$1.createElement( + StoreContext$1.Provider, + { value: tt }, + React$1.createElement(TreeWrapper, { isRoot: !0, fill: nt, flat: rt, tree: gt, toggled: lt }), + ), + ), + ) + ) + }, + ), + _excluded$1$3 = ['isRoot'] + let rootInitialized = !1, + rootEl = null + function Leva(tt) { + let { isRoot: et = !1 } = tt, + nt = _objectWithoutProperties$l(tt, _excluded$1$3) + return ( + reactExports.useEffect( + () => ( + (rootInitialized = !0), + !et && rootEl && (rootEl.remove(), (rootEl = null)), + () => { + et || (rootInitialized = !1) + } + ), + [et], + ), + React$1.createElement(LevaRoot, _extends$t({ store: levaStore }, nt)) + ) + } + function useRenderRoot(tt) { + reactExports.useEffect(() => { + tt && + !rootInitialized && + (rootEl || + ((rootEl = + document.getElementById('leva__root') || + Object.assign(document.createElement('div'), { id: 'leva__root' })), + document.body && + (document.body.appendChild(rootEl), render(React$1.createElement(Leva, { isRoot: !0 }), rootEl))), + (rootInitialized = !0)) + }, [tt]) + } + function parseArgs(tt, et, nt, rt, it) { + let ot, at, st, lt, ct + return ( + typeof tt == 'string' + ? ((at = tt), + (ot = et), + Array.isArray(nt) + ? (ct = nt) + : nt && + ('store' in nt + ? ((lt = nt), (ct = rt)) + : ((st = nt), Array.isArray(rt) ? (ct = rt) : ((lt = rt), (ct = it))))) + : ((ot = tt), Array.isArray(et) ? (ct = et) : ((lt = et), (ct = nt))), + { schema: ot, folderName: at, folderSettings: st, hookSettings: lt, deps: ct || [] } + ) + } + function useControls(tt, et, nt, rt, it) { + const { + folderName: ot, + schema: at, + folderSettings: st, + hookSettings: lt, + deps: ct, + } = parseArgs(tt, et, nt, rt, it), + ut = typeof at == 'function', + ht = reactExports.useRef(!1), + dt = reactExports.useRef(!0), + pt = useDeepMemo(() => { + ht.current = !0 + const jt = typeof at == 'function' ? at() : at + return ot ? { [ot]: folder(jt, st) } : jt + }, ct), + mt = !(lt != null && lt.store) + useRenderRoot(mt) + const [gt] = reactExports.useState(() => (lt == null ? void 0 : lt.store) || levaStore), + [yt, bt] = reactExports.useMemo(() => gt.getDataFromSchema(pt), [gt, pt]), + [vt, xt, kt, St, Tt] = reactExports.useMemo(() => { + const jt = [], + Pt = [], + Ct = {}, + wt = {}, + It = {} + return ( + Object.values(bt).forEach(({ path: Ot, onChange: Wt, onEditStart: zt, onEditEnd: Ft, transient: Nt }) => { + jt.push(Ot), Wt ? ((Ct[Ot] = Wt), Nt || Pt.push(Ot)) : Pt.push(Ot), zt && (wt[Ot] = zt), Ft && (It[Ot] = Ft) + }), + [jt, Pt, Ct, wt, It] + ) + }, [bt]), + At = reactExports.useMemo(() => gt.orderPaths(vt), [vt, gt]), + Et = useValuesForPath(gt, xt, yt), + $t = reactExports.useCallback( + (jt) => { + const Pt = Object.entries(jt).reduce((Ct, [wt, It]) => Object.assign(Ct, { [bt[wt].path]: It }), {}) + gt.set(Pt, !1) + }, + [gt, bt], + ), + Dt = reactExports.useCallback((jt) => gt.get(bt[jt].path), [gt, bt]) + return ( + reactExports.useEffect(() => { + const jt = !dt.current && ht.current + return gt.addData(yt, jt), (dt.current = !1), (ht.current = !1), () => gt.disposePaths(At) + }, [gt, At, yt]), + reactExports.useEffect(() => { + const jt = [] + return ( + Object.entries(kt).forEach(([Pt, Ct]) => { + Ct(gt.get(Pt), Pt, _objectSpread2$1({ initial: !0, get: gt.get }, gt.getInput(Pt))) + const wt = gt.useStore.subscribe( + (It) => { + const Ot = It.data[Pt] + return [Ot.disabled ? void 0 : Ot.value, Ot] + }, + ([It, Ot]) => Ct(It, Pt, _objectSpread2$1({ initial: !1, get: gt.get }, Ot)), + { equalityFn: shallow$2 }, + ) + jt.push(wt) + }), + () => jt.forEach((Pt) => Pt()) + ) + }, [gt, kt]), + reactExports.useEffect(() => { + const jt = [] + return ( + Object.entries(St).forEach(([Pt, Ct]) => jt.push(gt.subscribeToEditStart(Pt, Ct))), + Object.entries(Tt).forEach(([Pt, Ct]) => jt.push(gt.subscribeToEditEnd(Pt, Ct))), + () => jt.forEach((Pt) => Pt()) + ) + }, [St, Tt, gt]), + ut ? [Et, $t, Dt] : Et + ) + } + register(LevaInputs.SELECT, select$1) + register(LevaInputs.IMAGE, image) + register(LevaInputs.NUMBER, number$6) + register(LevaInputs.COLOR, color$3) + register(LevaInputs.STRING, string$1) + register(LevaInputs.BOOLEAN, boolean) + register(LevaInputs.INTERVAL, interval$1) + register(LevaInputs.VECTOR3D, vector3d) + register(LevaInputs.VECTOR2D, vector2d) + var isCheckBoxInput = (tt) => tt.type === 'checkbox', + isDateObject = (tt) => tt instanceof Date, + isNullOrUndefined = (tt) => tt == null + const isObjectType = (tt) => typeof tt == 'object' + var isObject$f = (tt) => !isNullOrUndefined(tt) && !Array.isArray(tt) && isObjectType(tt) && !isDateObject(tt), + getEventValue = (tt) => + isObject$f(tt) && tt.target ? (isCheckBoxInput(tt.target) ? tt.target.checked : tt.target.value) : tt, + getNodeParentName = (tt) => tt.substring(0, tt.search(/\.\d+(\.|$)/)) || tt, + isNameInFieldArray = (tt, et) => tt.has(getNodeParentName(et)), + isPlainObject$2 = (tt) => { + const et = tt.constructor && tt.constructor.prototype + return isObject$f(et) && et.hasOwnProperty('isPrototypeOf') + }, + isWeb = typeof window < 'u' && typeof window.HTMLElement < 'u' && typeof document < 'u' + function cloneObject(tt) { + let et + const nt = Array.isArray(tt) + if (tt instanceof Date) et = new Date(tt) + else if (tt instanceof Set) et = new Set(tt) + else if (!(isWeb && (tt instanceof Blob || tt instanceof FileList)) && (nt || isObject$f(tt))) + if (((et = nt ? [] : {}), !nt && !isPlainObject$2(tt))) et = tt + else for (const rt in tt) tt.hasOwnProperty(rt) && (et[rt] = cloneObject(tt[rt])) + else return tt + return et + } + var compact = (tt) => (Array.isArray(tt) ? tt.filter(Boolean) : []), + isUndefined$1 = (tt) => tt === void 0, + get$5 = (tt, et, nt) => { + if (!et || !isObject$f(tt)) return nt + const rt = compact(et.split(/[,[\].]+?/)).reduce((it, ot) => (isNullOrUndefined(it) ? it : it[ot]), tt) + return isUndefined$1(rt) || rt === tt ? (isUndefined$1(tt[et]) ? nt : tt[et]) : rt + }, + isBoolean$2 = (tt) => typeof tt == 'boolean' + const EVENTS = { BLUR: 'blur', FOCUS_OUT: 'focusout', CHANGE: 'change' }, + VALIDATION_MODE = { + onBlur: 'onBlur', + onChange: 'onChange', + onSubmit: 'onSubmit', + onTouched: 'onTouched', + all: 'all', + }, + INPUT_VALIDATION_RULES = { + max: 'max', + min: 'min', + maxLength: 'maxLength', + minLength: 'minLength', + pattern: 'pattern', + required: 'required', + validate: 'validate', + }, + HookFormContext = React$1.createContext(null), + useFormContext = () => React$1.useContext(HookFormContext), + FormProvider = (tt) => { + const { children: et, ...nt } = tt + return React$1.createElement(HookFormContext.Provider, { value: nt }, et) + } + var getProxyFormState = (tt, et, nt, rt = !0) => { + const it = { defaultValues: et._defaultValues } + for (const ot in tt) + Object.defineProperty(it, ot, { + get: () => { + const at = ot + return ( + et._proxyFormState[at] !== VALIDATION_MODE.all && (et._proxyFormState[at] = !rt || VALIDATION_MODE.all), + nt && (nt[at] = !0), + tt[at] + ) + }, + }) + return it + }, + isEmptyObject = (tt) => isObject$f(tt) && !Object.keys(tt).length, + shouldRenderFormState = (tt, et, nt, rt) => { + nt(tt) + const { name: it, ...ot } = tt + return ( + isEmptyObject(ot) || + Object.keys(ot).length >= Object.keys(et).length || + Object.keys(ot).find((at) => et[at] === (!rt || VALIDATION_MODE.all)) + ) + }, + convertToArrayPayload = (tt) => (Array.isArray(tt) ? tt : [tt]), + shouldSubscribeByName = (tt, et, nt) => + !tt || + !et || + tt === et || + convertToArrayPayload(tt).some((rt) => rt && (nt ? rt === et : rt.startsWith(et) || et.startsWith(rt))) + function useSubscribe(tt) { + const et = React$1.useRef(tt) + ;(et.current = tt), + React$1.useEffect(() => { + const nt = !tt.disabled && et.current.subject && et.current.subject.subscribe({ next: et.current.next }) + return () => { + nt && nt.unsubscribe() + } + }, [tt.disabled]) + } + function useFormState(tt) { + const et = useFormContext(), + { control: nt = et.control, disabled: rt, name: it, exact: ot } = tt || {}, + [at, st] = React$1.useState(nt._formState), + lt = React$1.useRef(!0), + ct = React$1.useRef({ + isDirty: !1, + isLoading: !1, + dirtyFields: !1, + touchedFields: !1, + isValidating: !1, + isValid: !1, + errors: !1, + }), + ut = React$1.useRef(it) + return ( + (ut.current = it), + useSubscribe({ + disabled: rt, + next: (ht) => + lt.current && + shouldSubscribeByName(ut.current, ht.name, ot) && + shouldRenderFormState(ht, ct.current, nt._updateFormState) && + st({ ...nt._formState, ...ht }), + subject: nt._subjects.state, + }), + React$1.useEffect( + () => ( + (lt.current = !0), + ct.current.isValid && nt._updateValid(!0), + () => { + lt.current = !1 + } + ), + [nt], + ), + getProxyFormState(at, nt, ct.current, !1) + ) + } + var isString$3 = (tt) => typeof tt == 'string', + generateWatchOutput = (tt, et, nt, rt, it) => + isString$3(tt) + ? (rt && et.watch.add(tt), get$5(nt, tt, it)) + : Array.isArray(tt) + ? tt.map((ot) => (rt && et.watch.add(ot), get$5(nt, ot))) + : (rt && (et.watchAll = !0), nt) + function useWatch(tt) { + const et = useFormContext(), + { control: nt = et.control, name: rt, defaultValue: it, disabled: ot, exact: at } = tt || {}, + st = React$1.useRef(rt) + ;(st.current = rt), + useSubscribe({ + disabled: ot, + subject: nt._subjects.values, + next: (ut) => { + shouldSubscribeByName(st.current, ut.name, at) && + ct(cloneObject(generateWatchOutput(st.current, nt._names, ut.values || nt._formValues, !1, it))) + }, + }) + const [lt, ct] = React$1.useState(nt._getWatch(rt, it)) + return React$1.useEffect(() => nt._removeUnmounted()), lt + } + var isKey$4 = (tt) => /^\w*$/.test(tt), + stringToPath$3 = (tt) => compact(tt.replace(/["|']|\]/g, '').split(/\.|\[/)) + function set$3(tt, et, nt) { + let rt = -1 + const it = isKey$4(et) ? [et] : stringToPath$3(et), + ot = it.length, + at = ot - 1 + for (; ++rt < ot; ) { + const st = it[rt] + let lt = nt + if (rt !== at) { + const ct = tt[st] + lt = isObject$f(ct) || Array.isArray(ct) ? ct : isNaN(+it[rt + 1]) ? {} : [] + } + ;(tt[st] = lt), (tt = tt[st]) + } + return tt + } + function useController(tt) { + const et = useFormContext(), + { name: nt, disabled: rt, control: it = et.control, shouldUnregister: ot } = tt, + at = isNameInFieldArray(it._names.array, nt), + st = useWatch({ + control: it, + name: nt, + defaultValue: get$5(it._formValues, nt, get$5(it._defaultValues, nt, tt.defaultValue)), + exact: !0, + }), + lt = useFormState({ control: it, name: nt }), + ct = React$1.useRef(it.register(nt, { ...tt.rules, value: st })) + return ( + (ct.current = it.register(nt, tt.rules)), + React$1.useEffect(() => { + const ut = it._options.shouldUnregister || ot, + ht = (dt, pt) => { + const mt = get$5(it._fields, dt) + mt && (mt._f.mount = pt) + } + if ((ht(nt, !0), ut)) { + const dt = cloneObject(get$5(it._options.defaultValues, nt)) + set$3(it._defaultValues, nt, dt), isUndefined$1(get$5(it._formValues, nt)) && set$3(it._formValues, nt, dt) + } + return () => { + ;(at ? ut && !it._state.action : ut) ? it.unregister(nt) : ht(nt, !1) + } + }, [nt, it, at, ot]), + React$1.useEffect(() => { + get$5(it._fields, nt) && it._updateDisabledField({ disabled: rt, fields: it._fields, name: nt }) + }, [rt, nt, it]), + { + field: { + name: nt, + value: st, + ...(isBoolean$2(rt) ? { disabled: rt } : {}), + onChange: React$1.useCallback( + (ut) => ct.current.onChange({ target: { value: getEventValue(ut), name: nt }, type: EVENTS.CHANGE }), + [nt], + ), + onBlur: React$1.useCallback( + () => ct.current.onBlur({ target: { value: get$5(it._formValues, nt), name: nt }, type: EVENTS.BLUR }), + [nt, it], + ), + ref: (ut) => { + const ht = get$5(it._fields, nt) + ht && + ut && + (ht._f.ref = { + focus: () => ut.focus(), + select: () => ut.select(), + setCustomValidity: (dt) => ut.setCustomValidity(dt), + reportValidity: () => ut.reportValidity(), + }) + }, + }, + formState: lt, + fieldState: Object.defineProperties( + {}, + { + invalid: { enumerable: !0, get: () => !!get$5(lt.errors, nt) }, + isDirty: { enumerable: !0, get: () => !!get$5(lt.dirtyFields, nt) }, + isTouched: { enumerable: !0, get: () => !!get$5(lt.touchedFields, nt) }, + error: { enumerable: !0, get: () => get$5(lt.errors, nt) }, + }, + ), + } + ) + } + const Controller = (tt) => tt.render(useController(tt)) + var appendErrors = (tt, et, nt, rt, it) => + et ? { ...nt[tt], types: { ...(nt[tt] && nt[tt].types ? nt[tt].types : {}), [rt]: it || !0 } } : {} + const focusFieldBy = (tt, et, nt) => { + for (const rt of nt || Object.keys(tt)) { + const it = get$5(tt, rt) + if (it) { + const { _f: ot, ...at } = it + if (ot && et(ot.name)) { + if (ot.ref.focus) { + ot.ref.focus() + break + } else if (ot.refs && ot.refs[0].focus) { + ot.refs[0].focus() + break + } + } else isObject$f(at) && focusFieldBy(at, et) + } + } + } + var getValidationModes = (tt) => ({ + isOnSubmit: !tt || tt === VALIDATION_MODE.onSubmit, + isOnBlur: tt === VALIDATION_MODE.onBlur, + isOnChange: tt === VALIDATION_MODE.onChange, + isOnAll: tt === VALIDATION_MODE.all, + isOnTouch: tt === VALIDATION_MODE.onTouched, + }), + isWatched = (tt, et, nt) => + !nt && + (et.watchAll || + et.watch.has(tt) || + [...et.watch].some((rt) => tt.startsWith(rt) && /^\.\w+/.test(tt.slice(rt.length)))), + updateFieldArrayRootError = (tt, et, nt) => { + const rt = compact(get$5(tt, nt)) + return set$3(rt, 'root', et[nt]), set$3(tt, nt, rt), tt + }, + isFileInput = (tt) => tt.type === 'file', + isFunction$6 = (tt) => typeof tt == 'function', + isHTMLElement$2 = (tt) => { + if (!isWeb) return !1 + const et = tt ? tt.ownerDocument : 0 + return tt instanceof (et && et.defaultView ? et.defaultView.HTMLElement : HTMLElement) + }, + isMessage = (tt) => isString$3(tt), + isRadioInput = (tt) => tt.type === 'radio', + isRegex = (tt) => tt instanceof RegExp + const defaultResult$1 = { value: !1, isValid: !1 }, + validResult = { value: !0, isValid: !0 } + var getCheckboxValue = (tt) => { + if (Array.isArray(tt)) { + if (tt.length > 1) { + const et = tt.filter((nt) => nt && nt.checked && !nt.disabled).map((nt) => nt.value) + return { value: et, isValid: !!et.length } + } + return tt[0].checked && !tt[0].disabled + ? tt[0].attributes && !isUndefined$1(tt[0].attributes.value) + ? isUndefined$1(tt[0].value) || tt[0].value === '' + ? validResult + : { value: tt[0].value, isValid: !0 } + : validResult + : defaultResult$1 + } + return defaultResult$1 + } + const defaultReturn = { isValid: !1, value: null } + var getRadioValue = (tt) => + Array.isArray(tt) + ? tt.reduce((et, nt) => (nt && nt.checked && !nt.disabled ? { isValid: !0, value: nt.value } : et), defaultReturn) + : defaultReturn + function getValidateError(tt, et, nt = 'validate') { + if (isMessage(tt) || (Array.isArray(tt) && tt.every(isMessage)) || (isBoolean$2(tt) && !tt)) + return { type: nt, message: isMessage(tt) ? tt : '', ref: et } + } + var getValueAndMessage = (tt) => (isObject$f(tt) && !isRegex(tt) ? tt : { value: tt, message: '' }), + validateField = async (tt, et, nt, rt, it) => { + const { + ref: ot, + refs: at, + required: st, + maxLength: lt, + minLength: ct, + min: ut, + max: ht, + pattern: dt, + validate: pt, + name: mt, + valueAsNumber: gt, + mount: yt, + disabled: bt, + } = tt._f, + vt = get$5(et, mt) + if (!yt || bt) return {} + const xt = at ? at[0] : ot, + kt = (Pt) => { + rt && xt.reportValidity && (xt.setCustomValidity(isBoolean$2(Pt) ? '' : Pt || ''), xt.reportValidity()) + }, + St = {}, + Tt = isRadioInput(ot), + At = isCheckBoxInput(ot), + Et = Tt || At, + $t = + ((gt || isFileInput(ot)) && isUndefined$1(ot.value) && isUndefined$1(vt)) || + (isHTMLElement$2(ot) && ot.value === '') || + vt === '' || + (Array.isArray(vt) && !vt.length), + Dt = appendErrors.bind(null, mt, nt, St), + jt = (Pt, Ct, wt, It = INPUT_VALIDATION_RULES.maxLength, Ot = INPUT_VALIDATION_RULES.minLength) => { + const Wt = Pt ? Ct : wt + St[mt] = { type: Pt ? It : Ot, message: Wt, ref: ot, ...Dt(Pt ? It : Ot, Wt) } + } + if ( + it + ? !Array.isArray(vt) || !vt.length + : st && + ((!Et && ($t || isNullOrUndefined(vt))) || + (isBoolean$2(vt) && !vt) || + (At && !getCheckboxValue(at).isValid) || + (Tt && !getRadioValue(at).isValid)) + ) { + const { value: Pt, message: Ct } = isMessage(st) ? { value: !!st, message: st } : getValueAndMessage(st) + if ( + Pt && + ((St[mt] = { + type: INPUT_VALIDATION_RULES.required, + message: Ct, + ref: xt, + ...Dt(INPUT_VALIDATION_RULES.required, Ct), + }), + !nt) + ) + return kt(Ct), St + } + if (!$t && (!isNullOrUndefined(ut) || !isNullOrUndefined(ht))) { + let Pt, Ct + const wt = getValueAndMessage(ht), + It = getValueAndMessage(ut) + if (!isNullOrUndefined(vt) && !isNaN(vt)) { + const Ot = ot.valueAsNumber || (vt && +vt) + isNullOrUndefined(wt.value) || (Pt = Ot > wt.value), isNullOrUndefined(It.value) || (Ct = Ot < It.value) + } else { + const Ot = ot.valueAsDate || new Date(vt), + Wt = (Nt) => new Date(new Date().toDateString() + ' ' + Nt), + zt = ot.type == 'time', + Ft = ot.type == 'week' + isString$3(wt.value) && + vt && + (Pt = zt ? Wt(vt) > Wt(wt.value) : Ft ? vt > wt.value : Ot > new Date(wt.value)), + isString$3(It.value) && + vt && + (Ct = zt ? Wt(vt) < Wt(It.value) : Ft ? vt < It.value : Ot < new Date(It.value)) + } + if ( + (Pt || Ct) && + (jt(!!Pt, wt.message, It.message, INPUT_VALIDATION_RULES.max, INPUT_VALIDATION_RULES.min), !nt) + ) + return kt(St[mt].message), St + } + if ((lt || ct) && !$t && (isString$3(vt) || (it && Array.isArray(vt)))) { + const Pt = getValueAndMessage(lt), + Ct = getValueAndMessage(ct), + wt = !isNullOrUndefined(Pt.value) && vt.length > +Pt.value, + It = !isNullOrUndefined(Ct.value) && vt.length < +Ct.value + if ((wt || It) && (jt(wt, Pt.message, Ct.message), !nt)) return kt(St[mt].message), St + } + if (dt && !$t && isString$3(vt)) { + const { value: Pt, message: Ct } = getValueAndMessage(dt) + if ( + isRegex(Pt) && + !vt.match(Pt) && + ((St[mt] = { + type: INPUT_VALIDATION_RULES.pattern, + message: Ct, + ref: ot, + ...Dt(INPUT_VALIDATION_RULES.pattern, Ct), + }), + !nt) + ) + return kt(Ct), St + } + if (pt) { + if (isFunction$6(pt)) { + const Pt = await pt(vt, et), + Ct = getValidateError(Pt, xt) + if (Ct && ((St[mt] = { ...Ct, ...Dt(INPUT_VALIDATION_RULES.validate, Ct.message) }), !nt)) + return kt(Ct.message), St + } else if (isObject$f(pt)) { + let Pt = {} + for (const Ct in pt) { + if (!isEmptyObject(Pt) && !nt) break + const wt = getValidateError(await pt[Ct](vt, et), xt, Ct) + wt && ((Pt = { ...wt, ...Dt(Ct, wt.message) }), kt(wt.message), nt && (St[mt] = Pt)) + } + if (!isEmptyObject(Pt) && ((St[mt] = { ref: xt, ...Pt }), !nt)) return St + } + } + return kt(!0), St + } + function baseGet$4(tt, et) { + const nt = et.slice(0, -1).length + let rt = 0 + for (; rt < nt; ) tt = isUndefined$1(tt) ? rt++ : tt[et[rt++]] + return tt + } + function isEmptyArray(tt) { + for (const et in tt) if (tt.hasOwnProperty(et) && !isUndefined$1(tt[et])) return !1 + return !0 + } + function unset(tt, et) { + const nt = Array.isArray(et) ? et : isKey$4(et) ? [et] : stringToPath$3(et), + rt = nt.length === 1 ? tt : baseGet$4(tt, nt), + it = nt.length - 1, + ot = nt[it] + return ( + rt && delete rt[ot], + it !== 0 && + ((isObject$f(rt) && isEmptyObject(rt)) || (Array.isArray(rt) && isEmptyArray(rt))) && + unset(tt, nt.slice(0, -1)), + tt + ) + } + function createSubject() { + let tt = [] + return { + get observers() { + return tt + }, + next: (it) => { + for (const ot of tt) ot.next && ot.next(it) + }, + subscribe: (it) => ( + tt.push(it), + { + unsubscribe: () => { + tt = tt.filter((ot) => ot !== it) + }, + } + ), + unsubscribe: () => { + tt = [] + }, + } + } + var isPrimitive = (tt) => isNullOrUndefined(tt) || !isObjectType(tt) + function deepEqual$2(tt, et) { + if (isPrimitive(tt) || isPrimitive(et)) return tt === et + if (isDateObject(tt) && isDateObject(et)) return tt.getTime() === et.getTime() + const nt = Object.keys(tt), + rt = Object.keys(et) + if (nt.length !== rt.length) return !1 + for (const it of nt) { + const ot = tt[it] + if (!rt.includes(it)) return !1 + if (it !== 'ref') { + const at = et[it] + if ( + (isDateObject(ot) && isDateObject(at)) || + (isObject$f(ot) && isObject$f(at)) || + (Array.isArray(ot) && Array.isArray(at)) + ? !deepEqual$2(ot, at) + : ot !== at + ) + return !1 + } + } + return !0 + } + var isMultipleSelect = (tt) => tt.type === 'select-multiple', + isRadioOrCheckbox = (tt) => isRadioInput(tt) || isCheckBoxInput(tt), + live = (tt) => isHTMLElement$2(tt) && tt.isConnected, + objectHasFunction = (tt) => { + for (const et in tt) if (isFunction$6(tt[et])) return !0 + return !1 + } + function markFieldsDirty(tt, et = {}) { + const nt = Array.isArray(tt) + if (isObject$f(tt) || nt) + for (const rt in tt) + Array.isArray(tt[rt]) || (isObject$f(tt[rt]) && !objectHasFunction(tt[rt])) + ? ((et[rt] = Array.isArray(tt[rt]) ? [] : {}), markFieldsDirty(tt[rt], et[rt])) + : isNullOrUndefined(tt[rt]) || (et[rt] = !0) + return et + } + function getDirtyFieldsFromDefaultValues(tt, et, nt) { + const rt = Array.isArray(tt) + if (isObject$f(tt) || rt) + for (const it in tt) + Array.isArray(tt[it]) || (isObject$f(tt[it]) && !objectHasFunction(tt[it])) + ? isUndefined$1(et) || isPrimitive(nt[it]) + ? (nt[it] = Array.isArray(tt[it]) ? markFieldsDirty(tt[it], []) : { ...markFieldsDirty(tt[it]) }) + : getDirtyFieldsFromDefaultValues(tt[it], isNullOrUndefined(et) ? {} : et[it], nt[it]) + : (nt[it] = !deepEqual$2(tt[it], et[it])) + return nt + } + var getDirtyFields = (tt, et) => getDirtyFieldsFromDefaultValues(tt, et, markFieldsDirty(et)), + getFieldValueAs = (tt, { valueAsNumber: et, valueAsDate: nt, setValueAs: rt }) => + isUndefined$1(tt) + ? tt + : et + ? tt === '' + ? NaN + : tt && +tt + : nt && isString$3(tt) + ? new Date(tt) + : rt + ? rt(tt) + : tt + function getFieldValue(tt) { + const et = tt.ref + if (!(tt.refs ? tt.refs.every((nt) => nt.disabled) : et.disabled)) + return isFileInput(et) + ? et.files + : isRadioInput(et) + ? getRadioValue(tt.refs).value + : isMultipleSelect(et) + ? [...et.selectedOptions].map(({ value: nt }) => nt) + : isCheckBoxInput(et) + ? getCheckboxValue(tt.refs).value + : getFieldValueAs(isUndefined$1(et.value) ? tt.ref.value : et.value, tt) + } + var getResolverOptions = (tt, et, nt, rt) => { + const it = {} + for (const ot of tt) { + const at = get$5(et, ot) + at && set$3(it, ot, at._f) + } + return { criteriaMode: nt, names: [...tt], fields: it, shouldUseNativeValidation: rt } + }, + getRuleValue = (tt) => + isUndefined$1(tt) + ? tt + : isRegex(tt) + ? tt.source + : isObject$f(tt) + ? isRegex(tt.value) + ? tt.value.source + : tt.value + : tt, + hasValidation = (tt) => + tt.mount && (tt.required || tt.min || tt.max || tt.maxLength || tt.minLength || tt.pattern || tt.validate) + function schemaErrorLookup(tt, et, nt) { + const rt = get$5(tt, nt) + if (rt || isKey$4(nt)) return { error: rt, name: nt } + const it = nt.split('.') + for (; it.length; ) { + const ot = it.join('.'), + at = get$5(et, ot), + st = get$5(tt, ot) + if (at && !Array.isArray(at) && nt !== ot) return { name: nt } + if (st && st.type) return { name: ot, error: st } + it.pop() + } + return { name: nt } + } + var skipValidation = (tt, et, nt, rt, it) => + it.isOnAll + ? !1 + : !nt && it.isOnTouch + ? !(et || tt) + : (nt ? rt.isOnBlur : it.isOnBlur) + ? !tt + : (nt ? rt.isOnChange : it.isOnChange) + ? tt + : !0, + unsetEmptyArray = (tt, et) => !compact(get$5(tt, et)).length && unset(tt, et) + const defaultOptions = { + mode: VALIDATION_MODE.onSubmit, + reValidateMode: VALIDATION_MODE.onChange, + shouldFocusError: !0, + } + function createFormControl(tt = {}, et) { + let nt = { ...defaultOptions, ...tt }, + rt = { + submitCount: 0, + isDirty: !1, + isLoading: isFunction$6(nt.defaultValues), + isValidating: !1, + isSubmitted: !1, + isSubmitting: !1, + isSubmitSuccessful: !1, + isValid: !1, + touchedFields: {}, + dirtyFields: {}, + errors: {}, + }, + it = {}, + ot = + isObject$f(nt.defaultValues) || isObject$f(nt.values) ? cloneObject(nt.defaultValues || nt.values) || {} : {}, + at = nt.shouldUnregister ? {} : cloneObject(ot), + st = { action: !1, mount: !1, watch: !1 }, + lt = { mount: new Set(), unMount: new Set(), array: new Set(), watch: new Set() }, + ct, + ut = 0 + const ht = { isDirty: !1, dirtyFields: !1, touchedFields: !1, isValidating: !1, isValid: !1, errors: !1 }, + dt = { values: createSubject(), array: createSubject(), state: createSubject() }, + pt = tt.resetOptions && tt.resetOptions.keepDirtyValues, + mt = getValidationModes(nt.mode), + gt = getValidationModes(nt.reValidateMode), + yt = nt.criteriaMode === VALIDATION_MODE.all, + bt = (Tn) => (cn) => { + clearTimeout(ut), (ut = setTimeout(Tn, cn)) + }, + vt = async (Tn) => { + if (ht.isValid || Tn) { + const cn = nt.resolver ? isEmptyObject((await $t()).errors) : await jt(it, !0) + cn !== rt.isValid && dt.state.next({ isValid: cn }) + } + }, + xt = (Tn) => ht.isValidating && dt.state.next({ isValidating: Tn }), + kt = (Tn, cn = [], mn, In, An = !0, wn = !0) => { + if (In && mn) { + if (((st.action = !0), wn && Array.isArray(get$5(it, Tn)))) { + const fn = mn(get$5(it, Tn), In.argA, In.argB) + An && set$3(it, Tn, fn) + } + if (wn && Array.isArray(get$5(rt.errors, Tn))) { + const fn = mn(get$5(rt.errors, Tn), In.argA, In.argB) + An && set$3(rt.errors, Tn, fn), unsetEmptyArray(rt.errors, Tn) + } + if (ht.touchedFields && wn && Array.isArray(get$5(rt.touchedFields, Tn))) { + const fn = mn(get$5(rt.touchedFields, Tn), In.argA, In.argB) + An && set$3(rt.touchedFields, Tn, fn) + } + ht.dirtyFields && (rt.dirtyFields = getDirtyFields(ot, at)), + dt.state.next({ + name: Tn, + isDirty: Ct(Tn, cn), + dirtyFields: rt.dirtyFields, + errors: rt.errors, + isValid: rt.isValid, + }) + } else set$3(at, Tn, cn) + }, + St = (Tn, cn) => { + set$3(rt.errors, Tn, cn), dt.state.next({ errors: rt.errors }) + }, + Tt = (Tn, cn, mn, In) => { + const An = get$5(it, Tn) + if (An) { + const wn = get$5(at, Tn, isUndefined$1(mn) ? get$5(ot, Tn) : mn) + isUndefined$1(wn) || (In && In.defaultChecked) || cn + ? set$3(at, Tn, cn ? wn : getFieldValue(An._f)) + : Ot(Tn, wn), + st.mount && vt() + } + }, + At = (Tn, cn, mn, In, An) => { + let wn = !1, + fn = !1 + const pn = { name: Tn } + if (!mn || In) { + ht.isDirty && ((fn = rt.isDirty), (rt.isDirty = pn.isDirty = Ct()), (wn = fn !== pn.isDirty)) + const kn = deepEqual$2(get$5(ot, Tn), cn) + ;(fn = get$5(rt.dirtyFields, Tn)), + kn ? unset(rt.dirtyFields, Tn) : set$3(rt.dirtyFields, Tn, !0), + (pn.dirtyFields = rt.dirtyFields), + (wn = wn || (ht.dirtyFields && fn !== !kn)) + } + if (mn) { + const kn = get$5(rt.touchedFields, Tn) + kn || + (set$3(rt.touchedFields, Tn, mn), + (pn.touchedFields = rt.touchedFields), + (wn = wn || (ht.touchedFields && kn !== mn))) + } + return wn && An && dt.state.next(pn), wn ? pn : {} + }, + Et = (Tn, cn, mn, In) => { + const An = get$5(rt.errors, Tn), + wn = ht.isValid && isBoolean$2(cn) && rt.isValid !== cn + if ( + (tt.delayError && mn + ? ((ct = bt(() => St(Tn, mn))), ct(tt.delayError)) + : (clearTimeout(ut), (ct = null), mn ? set$3(rt.errors, Tn, mn) : unset(rt.errors, Tn)), + (mn ? !deepEqual$2(An, mn) : An) || !isEmptyObject(In) || wn) + ) { + const fn = { ...In, ...(wn && isBoolean$2(cn) ? { isValid: cn } : {}), errors: rt.errors, name: Tn } + ;(rt = { ...rt, ...fn }), dt.state.next(fn) + } + xt(!1) + }, + $t = async (Tn) => + nt.resolver( + at, + nt.context, + getResolverOptions(Tn || lt.mount, it, nt.criteriaMode, nt.shouldUseNativeValidation), + ), + Dt = async (Tn) => { + const { errors: cn } = await $t(Tn) + if (Tn) + for (const mn of Tn) { + const In = get$5(cn, mn) + In ? set$3(rt.errors, mn, In) : unset(rt.errors, mn) + } + else rt.errors = cn + return cn + }, + jt = async (Tn, cn, mn = { valid: !0 }) => { + for (const In in Tn) { + const An = Tn[In] + if (An) { + const { _f: wn, ...fn } = An + if (wn) { + const pn = lt.array.has(wn.name), + kn = await validateField(An, at, yt, nt.shouldUseNativeValidation && !cn, pn) + if (kn[wn.name] && ((mn.valid = !1), cn)) break + !cn && + (get$5(kn, wn.name) + ? pn + ? updateFieldArrayRootError(rt.errors, kn, wn.name) + : set$3(rt.errors, wn.name, kn[wn.name]) + : unset(rt.errors, wn.name)) + } + fn && (await jt(fn, cn, mn)) + } + } + return mn.valid + }, + Pt = () => { + for (const Tn of lt.unMount) { + const cn = get$5(it, Tn) + cn && (cn._f.refs ? cn._f.refs.every((mn) => !live(mn)) : !live(cn._f.ref)) && Kt(Tn) + } + lt.unMount = new Set() + }, + Ct = (Tn, cn) => (Tn && cn && set$3(at, Tn, cn), !deepEqual$2(Ut(), ot)), + wt = (Tn, cn, mn) => + generateWatchOutput( + Tn, + lt, + { ...(st.mount ? at : isUndefined$1(cn) ? ot : isString$3(Tn) ? { [Tn]: cn } : cn) }, + mn, + cn, + ), + It = (Tn) => compact(get$5(st.mount ? at : ot, Tn, tt.shouldUnregister ? get$5(ot, Tn, []) : [])), + Ot = (Tn, cn, mn = {}) => { + const In = get$5(it, Tn) + let An = cn + if (In) { + const wn = In._f + wn && + (!wn.disabled && set$3(at, Tn, getFieldValueAs(cn, wn)), + (An = isHTMLElement$2(wn.ref) && isNullOrUndefined(cn) ? '' : cn), + isMultipleSelect(wn.ref) + ? [...wn.ref.options].forEach((fn) => (fn.selected = An.includes(fn.value))) + : wn.refs + ? isCheckBoxInput(wn.ref) + ? wn.refs.length > 1 + ? wn.refs.forEach( + (fn) => + (!fn.defaultChecked || !fn.disabled) && + (fn.checked = Array.isArray(An) ? !!An.find((pn) => pn === fn.value) : An === fn.value), + ) + : wn.refs[0] && (wn.refs[0].checked = !!An) + : wn.refs.forEach((fn) => (fn.checked = fn.value === An)) + : isFileInput(wn.ref) + ? (wn.ref.value = '') + : ((wn.ref.value = An), wn.ref.type || dt.values.next({ name: Tn, values: { ...at } }))) + } + ;(mn.shouldDirty || mn.shouldTouch) && At(Tn, An, mn.shouldTouch, mn.shouldDirty, !0), + mn.shouldValidate && Nt(Tn) + }, + Wt = (Tn, cn, mn) => { + for (const In in cn) { + const An = cn[In], + wn = `${Tn}.${In}`, + fn = get$5(it, wn) + ;(lt.array.has(Tn) || !isPrimitive(An) || (fn && !fn._f)) && !isDateObject(An) + ? Wt(wn, An, mn) + : Ot(wn, An, mn) + } + }, + zt = (Tn, cn, mn = {}) => { + const In = get$5(it, Tn), + An = lt.array.has(Tn), + wn = cloneObject(cn) + set$3(at, Tn, wn), + An + ? (dt.array.next({ name: Tn, values: { ...at } }), + (ht.isDirty || ht.dirtyFields) && + mn.shouldDirty && + dt.state.next({ name: Tn, dirtyFields: getDirtyFields(ot, at), isDirty: Ct(Tn, wn) })) + : In && !In._f && !isNullOrUndefined(wn) + ? Wt(Tn, wn, mn) + : Ot(Tn, wn, mn), + isWatched(Tn, lt) && dt.state.next({ ...rt }), + dt.values.next({ name: Tn, values: { ...at } }), + !st.mount && et() + }, + Ft = async (Tn) => { + const cn = Tn.target + let mn = cn.name, + In = !0 + const An = get$5(it, mn), + wn = () => (cn.type ? getFieldValue(An._f) : getEventValue(Tn)) + if (An) { + let fn, pn + const kn = wn(), + Dn = Tn.type === EVENTS.BLUR || Tn.type === EVENTS.FOCUS_OUT, + un = + (!hasValidation(An._f) && !nt.resolver && !get$5(rt.errors, mn) && !An._f.deps) || + skipValidation(Dn, get$5(rt.touchedFields, mn), rt.isSubmitted, gt, mt), + Zt = isWatched(mn, lt, Dn) + set$3(at, mn, kn), Dn ? (An._f.onBlur && An._f.onBlur(Tn), ct && ct(0)) : An._f.onChange && An._f.onChange(Tn) + const Xt = At(mn, kn, Dn, !1), + Sn = !isEmptyObject(Xt) || Zt + if ((!Dn && dt.values.next({ name: mn, type: Tn.type, values: { ...at } }), un)) + return ht.isValid && vt(), Sn && dt.state.next({ name: mn, ...(Zt ? {} : Xt) }) + if ((!Dn && Zt && dt.state.next({ ...rt }), xt(!0), nt.resolver)) { + const { errors: Rn } = await $t([mn]), + jn = schemaErrorLookup(rt.errors, it, mn), + On = schemaErrorLookup(Rn, it, jn.name || mn) + ;(fn = On.error), (mn = On.name), (pn = isEmptyObject(Rn)) + } else + (fn = (await validateField(An, at, yt, nt.shouldUseNativeValidation))[mn]), + (In = Number.isNaN(kn) || kn === get$5(at, mn, kn)), + In && (fn ? (pn = !1) : ht.isValid && (pn = await jt(it, !0))) + In && (An._f.deps && Nt(An._f.deps), Et(mn, pn, fn, Xt)) + } + }, + Nt = async (Tn, cn = {}) => { + let mn, In + const An = convertToArrayPayload(Tn) + if ((xt(!0), nt.resolver)) { + const wn = await Dt(isUndefined$1(Tn) ? Tn : An) + ;(mn = isEmptyObject(wn)), (In = Tn ? !An.some((fn) => get$5(wn, fn)) : mn) + } else + Tn + ? ((In = ( + await Promise.all( + An.map(async (wn) => { + const fn = get$5(it, wn) + return await jt(fn && fn._f ? { [wn]: fn } : fn) + }), + ) + ).every(Boolean)), + !(!In && !rt.isValid) && vt()) + : (In = mn = await jt(it)) + return ( + dt.state.next({ + ...(!isString$3(Tn) || (ht.isValid && mn !== rt.isValid) ? {} : { name: Tn }), + ...(nt.resolver || !Tn ? { isValid: mn } : {}), + errors: rt.errors, + isValidating: !1, + }), + cn.shouldFocus && !In && focusFieldBy(it, (wn) => wn && get$5(rt.errors, wn), Tn ? An : lt.mount), + In + ) + }, + Ut = (Tn) => { + const cn = { ...ot, ...(st.mount ? at : {}) } + return isUndefined$1(Tn) ? cn : isString$3(Tn) ? get$5(cn, Tn) : Tn.map((mn) => get$5(cn, mn)) + }, + Mt = (Tn, cn) => ({ + invalid: !!get$5((cn || rt).errors, Tn), + isDirty: !!get$5((cn || rt).dirtyFields, Tn), + isTouched: !!get$5((cn || rt).touchedFields, Tn), + error: get$5((cn || rt).errors, Tn), + }), + Ht = (Tn) => { + Tn && convertToArrayPayload(Tn).forEach((cn) => unset(rt.errors, cn)), + dt.state.next({ errors: Tn ? rt.errors : {} }) + }, + en = (Tn, cn, mn) => { + const In = (get$5(it, Tn, { _f: {} })._f || {}).ref + set$3(rt.errors, Tn, { ...cn, ref: In }), + dt.state.next({ name: Tn, errors: rt.errors, isValid: !1 }), + mn && mn.shouldFocus && In && In.focus && In.focus() + }, + sn = (Tn, cn) => + isFunction$6(Tn) ? dt.values.subscribe({ next: (mn) => Tn(wt(void 0, cn), mn) }) : wt(Tn, cn, !0), + Kt = (Tn, cn = {}) => { + for (const mn of Tn ? convertToArrayPayload(Tn) : lt.mount) + lt.mount.delete(mn), + lt.array.delete(mn), + cn.keepValue || (unset(it, mn), unset(at, mn)), + !cn.keepError && unset(rt.errors, mn), + !cn.keepDirty && unset(rt.dirtyFields, mn), + !cn.keepTouched && unset(rt.touchedFields, mn), + !nt.shouldUnregister && !cn.keepDefaultValue && unset(ot, mn) + dt.values.next({ values: { ...at } }), + dt.state.next({ ...rt, ...(cn.keepDirty ? { isDirty: Ct() } : {}) }), + !cn.keepIsValid && vt() + }, + rn = ({ disabled: Tn, name: cn, field: mn, fields: In }) => { + if (isBoolean$2(Tn)) { + const An = Tn ? void 0 : get$5(at, cn, getFieldValue(mn ? mn._f : get$5(In, cn)._f)) + set$3(at, cn, An), At(cn, An, !1, !1, !0) + } + }, + nn = (Tn, cn = {}) => { + let mn = get$5(it, Tn) + const In = isBoolean$2(cn.disabled) + return ( + set$3(it, Tn, { + ...(mn || {}), + _f: { ...(mn && mn._f ? mn._f : { ref: { name: Tn } }), name: Tn, mount: !0, ...cn }, + }), + lt.mount.add(Tn), + mn ? rn({ field: mn, disabled: cn.disabled, name: Tn }) : Tt(Tn, !0, cn.value), + { + ...(In ? { disabled: cn.disabled } : {}), + ...(nt.progressive + ? { + required: !!cn.required, + min: getRuleValue(cn.min), + max: getRuleValue(cn.max), + minLength: getRuleValue(cn.minLength), + maxLength: getRuleValue(cn.maxLength), + pattern: getRuleValue(cn.pattern), + } + : {}), + name: Tn, + onChange: Ft, + onBlur: Ft, + ref: (An) => { + if (An) { + nn(Tn, cn), (mn = get$5(it, Tn)) + const wn = + (isUndefined$1(An.value) && + An.querySelectorAll && + An.querySelectorAll('input,select,textarea')[0]) || + An, + fn = isRadioOrCheckbox(wn), + pn = mn._f.refs || [] + if (fn ? pn.find((kn) => kn === wn) : wn === mn._f.ref) return + set$3(it, Tn, { + _f: { + ...mn._f, + ...(fn + ? { + refs: [...pn.filter(live), wn, ...(Array.isArray(get$5(ot, Tn)) ? [{}] : [])], + ref: { type: wn.type, name: Tn }, + } + : { ref: wn }), + }, + }), + Tt(Tn, !1, void 0, wn) + } else + (mn = get$5(it, Tn, {})), + mn._f && (mn._f.mount = !1), + (nt.shouldUnregister || cn.shouldUnregister) && + !(isNameInFieldArray(lt.array, Tn) && st.action) && + lt.unMount.add(Tn) + }, + } + ) + }, + hn = () => nt.shouldFocusError && focusFieldBy(it, (Tn) => Tn && get$5(rt.errors, Tn), lt.mount), + vn = (Tn, cn) => async (mn) => { + mn && (mn.preventDefault && mn.preventDefault(), mn.persist && mn.persist()) + let In = cloneObject(at) + if ((dt.state.next({ isSubmitting: !0 }), nt.resolver)) { + const { errors: An, values: wn } = await $t() + ;(rt.errors = An), (In = wn) + } else await jt(it) + unset(rt.errors, 'root'), + isEmptyObject(rt.errors) + ? (dt.state.next({ errors: {} }), await Tn(In, mn)) + : (cn && (await cn({ ...rt.errors }, mn)), hn(), setTimeout(hn)), + dt.state.next({ + isSubmitted: !0, + isSubmitting: !1, + isSubmitSuccessful: isEmptyObject(rt.errors), + submitCount: rt.submitCount + 1, + errors: rt.errors, + }) + }, + an = (Tn, cn = {}) => { + get$5(it, Tn) && + (isUndefined$1(cn.defaultValue) + ? zt(Tn, get$5(ot, Tn)) + : (zt(Tn, cn.defaultValue), set$3(ot, Tn, cn.defaultValue)), + cn.keepTouched || unset(rt.touchedFields, Tn), + cn.keepDirty || (unset(rt.dirtyFields, Tn), (rt.isDirty = cn.defaultValue ? Ct(Tn, get$5(ot, Tn)) : Ct())), + cn.keepError || (unset(rt.errors, Tn), ht.isValid && vt()), + dt.state.next({ ...rt })) + }, + Qt = (Tn, cn = {}) => { + const mn = Tn ? cloneObject(Tn) : ot, + In = cloneObject(mn), + An = Tn && !isEmptyObject(Tn) ? In : ot + if ((cn.keepDefaultValues || (ot = mn), !cn.keepValues)) { + if (cn.keepDirtyValues || pt) + for (const wn of lt.mount) get$5(rt.dirtyFields, wn) ? set$3(An, wn, get$5(at, wn)) : zt(wn, get$5(An, wn)) + else { + if (isWeb && isUndefined$1(Tn)) + for (const wn of lt.mount) { + const fn = get$5(it, wn) + if (fn && fn._f) { + const pn = Array.isArray(fn._f.refs) ? fn._f.refs[0] : fn._f.ref + if (isHTMLElement$2(pn)) { + const kn = pn.closest('form') + if (kn) { + kn.reset() + break + } + } + } + } + it = {} + } + ;(at = tt.shouldUnregister ? (cn.keepDefaultValues ? cloneObject(ot) : {}) : cloneObject(An)), + dt.array.next({ values: { ...An } }), + dt.values.next({ values: { ...An } }) + } + ;(lt = { mount: new Set(), unMount: new Set(), array: new Set(), watch: new Set(), watchAll: !1, focus: '' }), + !st.mount && et(), + (st.mount = !ht.isValid || !!cn.keepIsValid), + (st.watch = !!tt.shouldUnregister), + dt.state.next({ + submitCount: cn.keepSubmitCount ? rt.submitCount : 0, + isDirty: cn.keepDirty ? rt.isDirty : !!(cn.keepDefaultValues && !deepEqual$2(Tn, ot)), + isSubmitted: cn.keepIsSubmitted ? rt.isSubmitted : !1, + dirtyFields: cn.keepDirtyValues ? rt.dirtyFields : cn.keepDefaultValues && Tn ? getDirtyFields(ot, Tn) : {}, + touchedFields: cn.keepTouched ? rt.touchedFields : {}, + errors: cn.keepErrors ? rt.errors : {}, + isSubmitSuccessful: cn.keepIsSubmitSuccessful ? rt.isSubmitSuccessful : !1, + isSubmitting: !1, + }) + }, + _n = (Tn, cn) => Qt(isFunction$6(Tn) ? Tn(at) : Tn, cn) + return { + control: { + register: nn, + unregister: Kt, + getFieldState: Mt, + handleSubmit: vn, + setError: en, + _executeSchema: $t, + _getWatch: wt, + _getDirty: Ct, + _updateValid: vt, + _removeUnmounted: Pt, + _updateFieldArray: kt, + _updateDisabledField: rn, + _getFieldArray: It, + _reset: Qt, + _resetDefaultValues: () => + isFunction$6(nt.defaultValues) && + nt.defaultValues().then((Tn) => { + _n(Tn, nt.resetOptions), dt.state.next({ isLoading: !1 }) + }), + _updateFormState: (Tn) => { + rt = { ...rt, ...Tn } + }, + _subjects: dt, + _proxyFormState: ht, + get _fields() { + return it + }, + get _formValues() { + return at + }, + get _state() { + return st + }, + set _state(Tn) { + st = Tn + }, + get _defaultValues() { + return ot + }, + get _names() { + return lt + }, + set _names(Tn) { + lt = Tn + }, + get _formState() { + return rt + }, + set _formState(Tn) { + rt = Tn + }, + get _options() { + return nt + }, + set _options(Tn) { + nt = { ...nt, ...Tn } + }, + }, + trigger: Nt, + register: nn, + handleSubmit: vn, + watch: sn, + setValue: zt, + getValues: Ut, + reset: _n, + resetField: an, + clearErrors: Ht, + unregister: Kt, + setError: en, + setFocus: (Tn, cn = {}) => { + const mn = get$5(it, Tn), + In = mn && mn._f + if (In) { + const An = In.refs ? In.refs[0] : In.ref + An.focus && (An.focus(), cn.shouldSelect && An.select()) + } + }, + getFieldState: Mt, + } + } + function useForm(tt = {}) { + const et = React$1.useRef(), + nt = React$1.useRef(), + [rt, it] = React$1.useState({ + isDirty: !1, + isValidating: !1, + isLoading: isFunction$6(tt.defaultValues), + isSubmitted: !1, + isSubmitting: !1, + isSubmitSuccessful: !1, + isValid: !1, + submitCount: 0, + dirtyFields: {}, + touchedFields: {}, + errors: {}, + defaultValues: isFunction$6(tt.defaultValues) ? void 0 : tt.defaultValues, + }) + et.current || (et.current = { ...createFormControl(tt, () => it((at) => ({ ...at }))), formState: rt }) + const ot = et.current.control + return ( + (ot._options = tt), + useSubscribe({ + subject: ot._subjects.state, + next: (at) => { + shouldRenderFormState(at, ot._proxyFormState, ot._updateFormState, !0) && it({ ...ot._formState }) + }, + }), + React$1.useEffect(() => { + tt.values && !deepEqual$2(tt.values, nt.current) + ? (ot._reset(tt.values, ot._options.resetOptions), (nt.current = tt.values)) + : ot._resetDefaultValues() + }, [tt.values, ot]), + React$1.useEffect(() => { + ot._state.mount || (ot._updateValid(), (ot._state.mount = !0)), + ot._state.watch && ((ot._state.watch = !1), ot._subjects.state.next({ ...ot._formState })), + ot._removeUnmounted() + }), + (et.current.formState = getProxyFormState(rt, ot)), + et.current + ) + } + const ReactToastify = '' + var dist$3 = { exports: {} }, + lib$4 = {}, + postMessage$2 = {} + Object.defineProperty(postMessage$2, '__esModule', { value: !0 }) + postMessage$2.removeEventer = postMessage$2.addEventer = postMessage$2.postMessage = void 0 + function postMessage$1(tt) { + var et = window + if (et.sendToElectron) return et.sendToElectron('sphinx-bridge', tt) + et.ReactNativeWebView && et.ReactNativeWebView.postMessage + ? et.ReactNativeWebView.postMessage(JSON.stringify(tt)) + : et.webkit && et.webkit.messageHandlers && et.webkit.messageHandlers.sphinx && et.webkit.messageHandlers.sphinx + ? et.webkit.messageHandlers.sphinx.postMessage(tt) + : et.Android + ? et.Android.receiveMessage(JSON.stringify(tt)) + : et.parent.postMessage(tt, '*') + } + postMessage$2.postMessage = postMessage$1 + function addEventer(tt) { + var et = window + if (et.sendToElectron) { + et.EE && et.EE.once('sphinx-bridge', tt) + return + } else + et.ReactNativeWebView && et.ReactNativeWebView.postMessage + ? document.addEventListener('message', function (nt) { + var rt = {} + try { + rt = JSON.parse(nt.data) + } catch {} + tt({ data: rt }) + }) + : et.webkit && et.webkit.messageHandlers && et.webkit.messageHandlers.sphinx && et.webkit.messageHandlers.sphinx + ? (et.sphinxMessage = function (nt) { + var rt = {} + try { + rt = JSON.parse(nt) + } catch {} + tt({ data: rt }) + }) + : et.Android + ? (et.sphinxMessage = function (nt) { + var rt = {} + try { + rt = JSON.parse(nt) + } catch {} + tt({ data: rt }) + }) + : et.addEventListener('message', tt) + } + postMessage$2.addEventer = addEventer + function removeEventer(tt) { + var et = window + et.sendToElectron || + (et.ReactNativeWebView && et.ReactNativeWebView.postMessage + ? document.removeEventListener('message', tt) + : (et.webkit && + et.webkit.messageHandlers && + et.webkit.messageHandlers.sphinx && + et.webkit.messageHandlers.sphinx) || + et.Android + ? (et.sphinxMessage = null) + : et.removeEventListener('message', tt)) + } + postMessage$2.removeEventer = removeEventer + ;(function (tt) { + var et = + (commonjsGlobal && commonjsGlobal.__assign) || + function () { + return ( + (et = + Object.assign || + function (lt) { + for (var ct, ut = 1, ht = arguments.length; ut < ht; ut++) { + ct = arguments[ut] + for (var dt in ct) Object.prototype.hasOwnProperty.call(ct, dt) && (lt[dt] = ct[dt]) + } + return lt + }), + et.apply(this, arguments) + ) + }, + nt = + (commonjsGlobal && commonjsGlobal.__awaiter) || + function (lt, ct, ut, ht) { + function dt(pt) { + return pt instanceof ut + ? pt + : new ut(function (mt) { + mt(pt) + }) + } + return new (ut || (ut = Promise))(function (pt, mt) { + function gt(vt) { + try { + bt(ht.next(vt)) + } catch (xt) { + mt(xt) + } + } + function yt(vt) { + try { + bt(ht.throw(vt)) + } catch (xt) { + mt(xt) + } + } + function bt(vt) { + vt.done ? pt(vt.value) : dt(vt.value).then(gt, yt) + } + bt((ht = ht.apply(lt, ct || [])).next()) + }) + }, + rt = + (commonjsGlobal && commonjsGlobal.__generator) || + function (lt, ct) { + var ut = { + label: 0, + sent: function () { + if (pt[0] & 1) throw pt[1] + return pt[1] + }, + trys: [], + ops: [], + }, + ht, + dt, + pt, + mt + return ( + (mt = { next: gt(0), throw: gt(1), return: gt(2) }), + typeof Symbol == 'function' && + (mt[Symbol.iterator] = function () { + return this + }), + mt + ) + function gt(bt) { + return function (vt) { + return yt([bt, vt]) + } + } + function yt(bt) { + if (ht) throw new TypeError('Generator is already executing.') + for (; ut; ) + try { + if ( + ((ht = 1), + dt && + (pt = bt[0] & 2 ? dt.return : bt[0] ? dt.throw || ((pt = dt.return) && pt.call(dt), 0) : dt.next) && + !(pt = pt.call(dt, bt[1])).done) + ) + return pt + switch (((dt = 0), pt && (bt = [bt[0] & 2, pt.value]), bt[0])) { + case 0: + case 1: + pt = bt + break + case 4: + return ut.label++, { value: bt[1], done: !1 } + case 5: + ut.label++, (dt = bt[1]), (bt = [0]) + continue + case 7: + ;(bt = ut.ops.pop()), ut.trys.pop() + continue + default: + if (((pt = ut.trys), !(pt = pt.length > 0 && pt[pt.length - 1]) && (bt[0] === 6 || bt[0] === 2))) { + ut = 0 + continue + } + if (bt[0] === 3 && (!pt || (bt[1] > pt[0] && bt[1] < pt[3]))) { + ut.label = bt[1] + break + } + if (bt[0] === 6 && ut.label < pt[1]) { + ;(ut.label = pt[1]), (pt = bt) + break + } + if (pt && ut.label < pt[2]) { + ;(ut.label = pt[2]), ut.ops.push(bt) + break + } + pt[2] && ut.ops.pop(), ut.trys.pop() + continue + } + bt = ct.call(lt, ut) + } catch (vt) { + ;(bt = [6, vt]), (dt = 0) + } finally { + ht = pt = 0 + } + if (bt[0] & 5) throw bt[1] + return { value: bt[0] ? bt[1] : void 0, done: !0 } + } + } + Object.defineProperty(tt, '__esModule', { value: !0 }), (tt.MSG_TYPE = void 0) + var it = postMessage$2, + ot + ;(function (lt) { + ;(lt.AUTHORIZE = 'AUTHORIZE'), + (lt.INFO = 'INFO'), + (lt.KEYSEND = 'KEYSEND'), + (lt.UPDATED = 'UPDATED'), + (lt.PAYMENT = 'PAYMENT'), + (lt.INVOICE = 'INVOICE'), + (lt.SIGN = 'SIGN'), + (lt.VERIFY = 'VERIFY'), + (lt.LOGIN = 'LOGIN'), + (lt.MEME = 'MEME'), + (lt.MESSAGE = 'MESSAGE'), + (lt.RELOAD = 'RELOAD'), + (lt.LSAT = 'LSAT'), + (lt.SAVEDATA = 'SAVEDATA'), + (lt.GETLSAT = 'GETLSAT'), + (lt.UPDATELSAT = 'UPDATELSAT'), + (lt.GETPERSONDATA = 'GETPERSONDATA'), + (lt.GETBUDGET = 'GETBUDGET') + })((ot = tt.MSG_TYPE || (tt.MSG_TYPE = {}))) + var at = 'Sphinx', + st = (function () { + function lt() { + ;(this.isEnabled = !1), (this.active = null), (this.budget = 0), (this.pubkey = ''), (this.logging = !1) + } + return ( + (lt.prototype.enable = function (ct) { + return nt(this, void 0, void 0, function () { + var ut, ht, dt + return rt(this, function (pt) { + switch (pt.label) { + case 0: + if ((ct && (this.logging = !0), this.logging && console.log('=> ENABLE!'), this.isEnabled)) + return [2, { budget: this.budget, pubkey: this.pubkey, application: at }] + pt.label = 1 + case 1: + return pt.trys.push([1, 3, , 4]), [4, this.postMsg(ot.AUTHORIZE)] + case 2: + return ( + (ut = pt.sent()), + (ht = ut.budget || ut.budget === 0), + ht && ut.pubkey + ? ((this.isEnabled = !0), (this.budget = ut.budget), (this.pubkey = ut.pubkey), [2, ut]) + : [3, 4] + ) + case 3: + return (dt = pt.sent()), this.logging && console.log(dt), [3, 4] + case 4: + return [2, null] + } + }) + }) + }), + (lt.prototype.authorize = function (ct, ut, ht) { + return nt(this, void 0, void 0, function () { + var dt, pt, mt, gt + return rt(this, function (yt) { + switch (yt.label) { + case 0: + ht && (this.logging = !0), this.logging && console.log('=> AUTHORIZE!'), (yt.label = 1) + case 1: + return ( + yt.trys.push([1, 3, , 4]), + (dt = ut || !1), + [4, this.postMsg(ot.AUTHORIZE, { challenge: ct, noBudget: dt })] + ) + case 2: + return ( + (pt = yt.sent()), + (mt = pt.budget || pt.budget === 0), + (dt || mt) && pt.pubkey + ? ((this.isEnabled = !0), (this.budget = pt.budget || 0), (this.pubkey = pt.pubkey), [2, pt]) + : [3, 4] + ) + case 3: + return (gt = yt.sent()), this.logging && console.log(gt), [3, 4] + case 4: + return [2, null] + } + }) + }) + }), + (lt.prototype.topup = function () { + return nt(this, void 0, void 0, function () { + var ct, ut, ht + return rt(this, function (dt) { + switch (dt.label) { + case 0: + this.logging && console.log('=> TOP UP'), (dt.label = 1) + case 1: + return dt.trys.push([1, 3, , 4]), [4, this.postMsg(ot.AUTHORIZE)] + case 2: + return ( + (ct = dt.sent()), + (ut = ct.budget || ct.budget === 0), + ut && ct.pubkey ? ((this.budget = ct.budget), (this.pubkey = ct.pubkey), [2, ct]) : [3, 4] + ) + case 3: + return (ht = dt.sent()), this.logging && console.log(ht), [3, 4] + case 4: + return [2, null] + } + }) + }) + }), + (lt.prototype.keysend = function (ct, ut) { + return nt(this, void 0, void 0, function () { + var ht, dt, pt + return rt(this, function (mt) { + switch (mt.label) { + case 0: + if ((this.logging && console.log('=> KEYSEND'), !this.isEnabled)) return [2, null] + if (!ct || !ut) return [2, null] + if (ct.length !== 66) return [2, null] + if (ut < 1) return [2, null] + if (ut > this.budget) return [2, null] + mt.label = 1 + case 1: + return mt.trys.push([1, 3, , 4]), (ht = { dest: ct, amt: ut }), [4, this.postMsg(ot.KEYSEND, ht)] + case 2: + return ( + (dt = mt.sent()), + dt && dt.success && ((this.budget = this.budget - ut), (dt.budget = this.budget)), + [2, dt] + ) + case 3: + return (pt = mt.sent()), this.logging && console.log(pt), [2, null] + case 4: + return [2] + } + }) + }) + }), + (lt.prototype.updated = function () { + return nt(this, void 0, void 0, function () { + var ct, ut + return rt(this, function (ht) { + switch (ht.label) { + case 0: + if ((this.logging && console.log('=> UDPATED'), !this.isEnabled)) return [2, null] + ht.label = 1 + case 1: + return ht.trys.push([1, 3, , 4]), [4, this.postMsg(ot.UPDATED)] + case 2: + return (ct = ht.sent()), [2, ct] + case 3: + return (ut = ht.sent()), this.logging && console.log(ut), [2, null] + case 4: + return [2] + } + }) + }) + }), + (lt.prototype.sendPayment = function (ct) { + return nt(this, void 0, void 0, function () { + var ut, ht + return rt(this, function (dt) { + switch (dt.label) { + case 0: + if ((this.logging && console.log('=> SEND PAYMENT'), !this.isEnabled)) return [2, null] + dt.label = 1 + case 1: + return dt.trys.push([1, 3, , 4]), [4, this.postMsg(ot.PAYMENT, { paymentRequest: ct })] + case 2: + return (ut = dt.sent()), [2, ut] + case 3: + return (ht = dt.sent()), this.logging && console.log(ht), [2, null] + case 4: + return [2] + } + }) + }) + }), + (lt.prototype.saveLsat = function (ct, ut, ht) { + return nt(this, void 0, void 0, function () { + var dt, pt + return rt(this, function (mt) { + switch (mt.label) { + case 0: + this.logging && console.log('=> SAVE LSAT'), (mt.label = 1) + case 1: + return ( + mt.trys.push([1, 3, , 4]), + [4, this.postMsg(ot.LSAT, { paymentRequest: ct, macaroon: ut, issuer: ht })] + ) + case 2: + return (dt = mt.sent()), [2, dt] + case 3: + return (pt = mt.sent()), this.logging && console.log(pt), [2, pt] + case 4: + return [2] + } + }) + }) + }), + (lt.prototype.getLsat = function (ct) { + return nt(this, void 0, void 0, function () { + var ut, ht + return rt(this, function (dt) { + switch (dt.label) { + case 0: + if ((this.logging && console.log('=> GET LSAT'), !this.isEnabled)) return [2, null] + dt.label = 1 + case 1: + return dt.trys.push([1, 3, , 4]), [4, this.postMsg(ot.GETLSAT, { issuer: ct })] + case 2: + return (ut = dt.sent()), [2, ut] + case 3: + return (ht = dt.sent()), this.logging && console.log(ht), [2, ht] + case 4: + return [2] + } + }) + }) + }), + (lt.prototype.updateLsat = function (ct, ut) { + return nt(this, void 0, void 0, function () { + var ht, dt + return rt(this, function (pt) { + switch (pt.label) { + case 0: + if ((this.logging && console.log('=> UPDATE LSAT'), !this.isEnabled)) return [2, null] + pt.label = 1 + case 1: + return pt.trys.push([1, 3, , 4]), [4, this.postMsg(ot.UPDATELSAT, { identifier: ct, status: ut })] + case 2: + return (ht = pt.sent()), [2, ht] + case 3: + return (dt = pt.sent()), this.logging && console.log(dt), [2, dt] + case 4: + return [2] + } + }) + }) + }), + (lt.prototype.makeInvoice = function (ct, ut) { + return nt(this, void 0, void 0, function () { + var ht, dt + return rt(this, function (pt) { + switch (pt.label) { + case 0: + if ((this.logging && console.log('=> MAKE INVOICE'), !this.isEnabled)) return [2, null] + pt.label = 1 + case 1: + return pt.trys.push([1, 3, , 4]), [4, this.postMsg(ot.INVOICE, { amt: ct, memo: ut })] + case 2: + return (ht = pt.sent()), [2, ht] + case 3: + return (dt = pt.sent()), this.logging && console.log(dt), [2, null] + case 4: + return [2] + } + }) + }) + }), + (lt.prototype.signMessage = function (ct) { + return nt(this, void 0, void 0, function () { + var ut, ht + return rt(this, function (dt) { + switch (dt.label) { + case 0: + if ((this.logging && console.log('=> SIGN MESSAGE'), !this.isEnabled)) return [2, null] + dt.label = 1 + case 1: + return dt.trys.push([1, 3, , 4]), [4, this.postMsg(ot.SIGN, { message: ct })] + case 2: + return (ut = dt.sent()), [2, ut] + case 3: + return (ht = dt.sent()), this.logging && console.log(ht), [2, null] + case 4: + return [2] + } + }) + }) + }), + (lt.prototype.verifyMessage = function (ct, ut) { + return nt(this, void 0, void 0, function () { + var ht, dt + return rt(this, function (pt) { + switch (pt.label) { + case 0: + if ((this.logging && console.log('=> VERIFY MESSAGE'), !this.isEnabled)) return [2, null] + pt.label = 1 + case 1: + return pt.trys.push([1, 3, , 4]), [4, this.postMsg(ot.SIGN, { signature: ct, message: ut })] + case 2: + return (ht = pt.sent()), [2, ht] + case 3: + return (dt = pt.sent()), this.logging && console.log(dt), [2, null] + case 4: + return [2] + } + }) + }) + }), + (lt.prototype.reload = function (ct) { + return nt(this, void 0, void 0, function () { + var ut, ht, dt + return rt(this, function (pt) { + switch (pt.label) { + case 0: + this.logging && console.log('=> RELOAD'), (pt.label = 1) + case 1: + return pt.trys.push([1, 3, , 4]), [4, this.postMsg(ot.RELOAD, { password: ct })] + case 2: + return ( + (ut = pt.sent()), + (ht = ut.budget || ut.budget === 0), + ht && ut.pubkey + ? ((this.isEnabled = !0), (this.budget = ut.budget), (this.pubkey = ut.pubkey), [2, ut]) + : [3, 4] + ) + case 3: + return (dt = pt.sent()), this.logging && console.log(dt), [3, 4] + case 4: + return [2, null] + } + }) + }) + }), + (lt.prototype.saveGraphData = function (ct) { + return nt(this, void 0, void 0, function () { + var ut, ht + return rt(this, function (dt) { + switch (dt.label) { + case 0: + if ((this.logging && console.log('=> SAVEDATA'), !this.isEnabled)) return [2, null] + dt.label = 1 + case 1: + return ( + dt.trys.push([1, 3, , 4]), + [4, this.postMsg(ot.SAVEDATA, { data: { type: ct.type, metaData: ct.metaData } })] + ) + case 2: + return (ut = dt.sent()), [2, ut] + case 3: + return (ht = dt.sent()), this.logging && console.log(ht), [2, null] + case 4: + return [2] + } + }) + }) + }), + (lt.prototype.getPersonData = function () { + return nt(this, void 0, void 0, function () { + var ct, ut + return rt(this, function (ht) { + switch (ht.label) { + case 0: + if ((this.logging && console.log('=> GETPERSONDATA'), !this.isEnabled)) return [2, null] + ht.label = 1 + case 1: + return ht.trys.push([1, 3, , 4]), [4, this.postMsg(ot.GETPERSONDATA)] + case 2: + return (ct = ht.sent()), [2, ct] + case 3: + return (ut = ht.sent()), this.logging && console.log(ut), [2, null] + case 4: + return [2] + } + }) + }) + }), + (lt.prototype.getBudget = function () { + return nt(this, void 0, void 0, function () { + var ct, ut + return rt(this, function (ht) { + switch (ht.label) { + case 0: + if ((this.logging && console.log('=> GETBUDGET'), !this.isEnabled)) return [2, null] + ht.label = 1 + case 1: + return ht.trys.push([1, 3, , 4]), [4, this.postMsg(ot.GETBUDGET)] + case 2: + return (ct = ht.sent()), [2, ct] + case 3: + return (ut = ht.sent()), this.logging && console.log(ut), [2, null] + case 4: + return [2] + } + }) + }) + }), + (lt.prototype.postMsg = function (ct, ut) { + var ht = this + return ( + ht.active && Promise.reject(new Error('User is busy')), + (ht.active = ct), + new Promise(function (dt, pt) { + it.postMessage(et({ application: at, type: ct }, ut || {})) + function mt(gt) { + !gt.data || + gt.data.application !== at || + (gt.data.error ? ((ht.active = null), pt(gt.data.error)) : ((ht.active = null), dt(gt.data)), + it.removeEventer(mt)) + } + it.addEventer(mt) + }) + ) + }), + lt + ) + })() + tt.default = st + })(lib$4) + var dist$2 = dist$3.exports + Object.defineProperty(dist$2, '__esModule', { value: !0 }) + var lib_1 = lib$4, + sphinx = new lib_1.default() + dist$3.exports = sphinx + var distExports$1 = dist$3.exports, + reactIs$3 = { exports: {} }, + reactIs_production_min$2 = {} + /** + * @license React + * react-is.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ var b$4 = Symbol.for('react.element'), + c$6 = Symbol.for('react.portal'), + d$3 = Symbol.for('react.fragment'), + e$4 = Symbol.for('react.strict_mode'), + f$5 = Symbol.for('react.profiler'), + g$6 = Symbol.for('react.provider'), + h$7 = Symbol.for('react.context'), + k$6 = Symbol.for('react.server_context'), + l$4 = Symbol.for('react.forward_ref'), + m$6 = Symbol.for('react.suspense'), + n$5 = Symbol.for('react.suspense_list'), + p$6 = Symbol.for('react.memo'), + q$5 = Symbol.for('react.lazy'), + t$5 = Symbol.for('react.offscreen'), + u$3 + u$3 = Symbol.for('react.module.reference') + function v$6(tt) { + if (typeof tt == 'object' && tt !== null) { + var et = tt.$$typeof + switch (et) { + case b$4: + switch (((tt = tt.type), tt)) { + case d$3: + case f$5: + case e$4: + case m$6: + case n$5: + return tt + default: + switch (((tt = tt && tt.$$typeof), tt)) { + case k$6: + case h$7: + case l$4: + case q$5: + case p$6: + case g$6: + return tt + default: + return et + } + } + case c$6: + return et + } + } + } + reactIs_production_min$2.ContextConsumer = h$7 + reactIs_production_min$2.ContextProvider = g$6 + reactIs_production_min$2.Element = b$4 + reactIs_production_min$2.ForwardRef = l$4 + reactIs_production_min$2.Fragment = d$3 + reactIs_production_min$2.Lazy = q$5 + reactIs_production_min$2.Memo = p$6 + reactIs_production_min$2.Portal = c$6 + reactIs_production_min$2.Profiler = f$5 + reactIs_production_min$2.StrictMode = e$4 + reactIs_production_min$2.Suspense = m$6 + reactIs_production_min$2.SuspenseList = n$5 + reactIs_production_min$2.isAsyncMode = function () { + return !1 + } + reactIs_production_min$2.isConcurrentMode = function () { + return !1 + } + reactIs_production_min$2.isContextConsumer = function (tt) { + return v$6(tt) === h$7 + } + reactIs_production_min$2.isContextProvider = function (tt) { + return v$6(tt) === g$6 + } + reactIs_production_min$2.isElement = function (tt) { + return typeof tt == 'object' && tt !== null && tt.$$typeof === b$4 + } + reactIs_production_min$2.isForwardRef = function (tt) { + return v$6(tt) === l$4 + } + reactIs_production_min$2.isFragment = function (tt) { + return v$6(tt) === d$3 + } + reactIs_production_min$2.isLazy = function (tt) { + return v$6(tt) === q$5 + } + reactIs_production_min$2.isMemo = function (tt) { + return v$6(tt) === p$6 + } + reactIs_production_min$2.isPortal = function (tt) { + return v$6(tt) === c$6 + } + reactIs_production_min$2.isProfiler = function (tt) { + return v$6(tt) === f$5 + } + reactIs_production_min$2.isStrictMode = function (tt) { + return v$6(tt) === e$4 + } + reactIs_production_min$2.isSuspense = function (tt) { + return v$6(tt) === m$6 + } + reactIs_production_min$2.isSuspenseList = function (tt) { + return v$6(tt) === n$5 + } + reactIs_production_min$2.isValidElementType = function (tt) { + return ( + typeof tt == 'string' || + typeof tt == 'function' || + tt === d$3 || + tt === f$5 || + tt === e$4 || + tt === m$6 || + tt === n$5 || + tt === t$5 || + (typeof tt == 'object' && + tt !== null && + (tt.$$typeof === q$5 || + tt.$$typeof === p$6 || + tt.$$typeof === g$6 || + tt.$$typeof === h$7 || + tt.$$typeof === l$4 || + tt.$$typeof === u$3 || + tt.getModuleId !== void 0)) + ) + } + reactIs_production_min$2.typeOf = v$6 + reactIs$3.exports = reactIs_production_min$2 + var reactIsExports$2 = reactIs$3.exports + function stylis_min(tt) { + function et(Mt, Ht, en, sn, Kt) { + for ( + var rn = 0, + nn = 0, + hn = 0, + vn = 0, + an, + Qt, + _n = 0, + Pn = 0, + $n, + Nn = ($n = an = 0), + Tn = 0, + cn = 0, + mn = 0, + In = 0, + An = en.length, + wn = An - 1, + fn, + pn = '', + kn = '', + Dn = '', + un = '', + Zt; + Tn < An; + + ) { + if ( + ((Qt = en.charCodeAt(Tn)), + Tn === wn && + nn + vn + hn + rn !== 0 && + (nn !== 0 && (Qt = nn === 47 ? 10 : 47), (vn = hn = rn = 0), An++, wn++), + nn + vn + hn + rn === 0) + ) { + if (Tn === wn && (0 < cn && (pn = pn.replace(dt, '')), 0 < pn.trim().length)) { + switch (Qt) { + case 32: + case 9: + case 59: + case 13: + case 10: + break + default: + pn += en.charAt(Tn) + } + Qt = 59 + } + switch (Qt) { + case 123: + for (pn = pn.trim(), an = pn.charCodeAt(0), $n = 1, In = ++Tn; Tn < An; ) { + switch ((Qt = en.charCodeAt(Tn))) { + case 123: + $n++ + break + case 125: + $n-- + break + case 47: + switch ((Qt = en.charCodeAt(Tn + 1))) { + case 42: + case 47: + e: { + for (Nn = Tn + 1; Nn < wn; ++Nn) + switch (en.charCodeAt(Nn)) { + case 47: + if (Qt === 42 && en.charCodeAt(Nn - 1) === 42 && Tn + 2 !== Nn) { + Tn = Nn + 1 + break e + } + break + case 10: + if (Qt === 47) { + Tn = Nn + 1 + break e + } + } + Tn = Nn + } + } + break + case 91: + Qt++ + case 40: + Qt++ + case 34: + case 39: + for (; Tn++ < wn && en.charCodeAt(Tn) !== Qt; ); + } + if ($n === 0) break + Tn++ + } + switch ( + (($n = en.substring(In, Tn)), an === 0 && (an = (pn = pn.replace(ht, '').trim()).charCodeAt(0)), an) + ) { + case 64: + switch ((0 < cn && (pn = pn.replace(dt, '')), (Qt = pn.charCodeAt(1)), Qt)) { + case 100: + case 109: + case 115: + case 45: + cn = Ht + break + default: + cn = Ot + } + if ( + (($n = et(Ht, cn, $n, Qt, Kt + 1)), + (In = $n.length), + 0 < zt && + ((cn = nt(Ot, pn, mn)), + (Zt = st(3, $n, cn, Ht, Ct, Pt, In, Qt, Kt, sn)), + (pn = cn.join('')), + Zt !== void 0 && (In = ($n = Zt.trim()).length) === 0 && ((Qt = 0), ($n = ''))), + 0 < In) + ) + switch (Qt) { + case 115: + pn = pn.replace(Tt, at) + case 100: + case 109: + case 45: + $n = pn + '{' + $n + '}' + break + case 107: + ;(pn = pn.replace(vt, '$1 $2')), + ($n = pn + '{' + $n + '}'), + ($n = It === 1 || (It === 2 && ot('@' + $n, 3)) ? '@-webkit-' + $n + '@' + $n : '@' + $n) + break + default: + ;($n = pn + $n), sn === 112 && ($n = ((kn += $n), '')) + } + else $n = '' + break + default: + $n = et(Ht, nt(Ht, pn, mn), $n, sn, Kt + 1) + } + ;(Dn += $n), ($n = mn = cn = Nn = an = 0), (pn = ''), (Qt = en.charCodeAt(++Tn)) + break + case 125: + case 59: + if (((pn = (0 < cn ? pn.replace(dt, '') : pn).trim()), 1 < (In = pn.length))) + switch ( + (Nn === 0 && + ((an = pn.charCodeAt(0)), an === 45 || (96 < an && 123 > an)) && + (In = (pn = pn.replace(' ', ':')).length), + 0 < zt && + (Zt = st(1, pn, Ht, Mt, Ct, Pt, kn.length, sn, Kt, sn)) !== void 0 && + (In = (pn = Zt.trim()).length) === 0 && + (pn = '\0\0'), + (an = pn.charCodeAt(0)), + (Qt = pn.charCodeAt(1)), + an) + ) { + case 0: + break + case 64: + if (Qt === 105 || Qt === 99) { + un += pn + en.charAt(Tn) + break + } + default: + pn.charCodeAt(In - 1) !== 58 && (kn += it(pn, an, Qt, pn.charCodeAt(2))) + } + ;(mn = cn = Nn = an = 0), (pn = ''), (Qt = en.charCodeAt(++Tn)) + } + } + switch (Qt) { + case 13: + case 10: + nn === 47 ? (nn = 0) : 1 + an === 0 && sn !== 107 && 0 < pn.length && ((cn = 1), (pn += '\0')), + 0 < zt * Nt && st(0, pn, Ht, Mt, Ct, Pt, kn.length, sn, Kt, sn), + (Pt = 1), + Ct++ + break + case 59: + case 125: + if (nn + vn + hn + rn === 0) { + Pt++ + break + } + default: + switch ((Pt++, (fn = en.charAt(Tn)), Qt)) { + case 9: + case 32: + if (vn + rn + nn === 0) + switch (_n) { + case 44: + case 58: + case 9: + case 32: + fn = '' + break + default: + Qt !== 32 && (fn = ' ') + } + break + case 0: + fn = '\\0' + break + case 12: + fn = '\\f' + break + case 11: + fn = '\\v' + break + case 38: + vn + nn + rn === 0 && ((cn = mn = 1), (fn = '\f' + fn)) + break + case 108: + if (vn + nn + rn + wt === 0 && 0 < Nn) + switch (Tn - Nn) { + case 2: + _n === 112 && en.charCodeAt(Tn - 3) === 58 && (wt = _n) + case 8: + Pn === 111 && (wt = Pn) + } + break + case 58: + vn + nn + rn === 0 && (Nn = Tn) + break + case 44: + nn + hn + vn + rn === 0 && ((cn = 1), (fn += '\r')) + break + case 34: + case 39: + nn === 0 && (vn = vn === Qt ? 0 : vn === 0 ? Qt : vn) + break + case 91: + vn + nn + hn === 0 && rn++ + break + case 93: + vn + nn + hn === 0 && rn-- + break + case 41: + vn + nn + rn === 0 && hn-- + break + case 40: + if (vn + nn + rn === 0) { + if (an === 0) + switch (2 * _n + 3 * Pn) { + case 533: + break + default: + an = 1 + } + hn++ + } + break + case 64: + nn + hn + vn + rn + Nn + $n === 0 && ($n = 1) + break + case 42: + case 47: + if (!(0 < vn + rn + hn)) + switch (nn) { + case 0: + switch (2 * Qt + 3 * en.charCodeAt(Tn + 1)) { + case 235: + nn = 47 + break + case 220: + ;(In = Tn), (nn = 42) + } + break + case 42: + Qt === 47 && + _n === 42 && + In + 2 !== Tn && + (en.charCodeAt(In + 2) === 33 && (kn += en.substring(In, Tn + 1)), (fn = ''), (nn = 0)) + } + } + nn === 0 && (pn += fn) + } + ;(Pn = _n), (_n = Qt), Tn++ + } + if (((In = kn.length), 0 < In)) { + if ( + ((cn = Ht), + 0 < zt && ((Zt = st(2, kn, cn, Mt, Ct, Pt, In, sn, Kt, sn)), Zt !== void 0 && (kn = Zt).length === 0)) + ) + return un + kn + Dn + if (((kn = cn.join(',') + '{' + kn + '}'), It * wt !== 0)) { + switch ((It !== 2 || ot(kn, 2) || (wt = 0), wt)) { + case 111: + kn = kn.replace(kt, ':-moz-$1') + kn + break + case 112: + kn = + kn.replace(xt, '::-webkit-input-$1') + + kn.replace(xt, '::-moz-$1') + + kn.replace(xt, ':-ms-input-$1') + + kn + } + wt = 0 + } + } + return un + kn + Dn + } + function nt(Mt, Ht, en) { + var sn = Ht.trim().split(yt) + Ht = sn + var Kt = sn.length, + rn = Mt.length + switch (rn) { + case 0: + case 1: + var nn = 0 + for (Mt = rn === 0 ? '' : Mt[0] + ' '; nn < Kt; ++nn) Ht[nn] = rt(Mt, Ht[nn], en).trim() + break + default: + var hn = (nn = 0) + for (Ht = []; nn < Kt; ++nn) for (var vn = 0; vn < rn; ++vn) Ht[hn++] = rt(Mt[vn] + ' ', sn[nn], en).trim() + } + return Ht + } + function rt(Mt, Ht, en) { + var sn = Ht.charCodeAt(0) + switch ((33 > sn && (sn = (Ht = Ht.trim()).charCodeAt(0)), sn)) { + case 38: + return Ht.replace(bt, '$1' + Mt.trim()) + case 58: + return Mt.trim() + Ht.replace(bt, '$1' + Mt.trim()) + default: + if (0 < 1 * en && 0 < Ht.indexOf('\f')) + return Ht.replace(bt, (Mt.charCodeAt(0) === 58 ? '' : '$1') + Mt.trim()) + } + return Mt + Ht + } + function it(Mt, Ht, en, sn) { + var Kt = Mt + ';', + rn = 2 * Ht + 3 * en + 4 * sn + if (rn === 944) { + Mt = Kt.indexOf(':', 9) + 1 + var nn = Kt.substring(Mt, Kt.length - 1).trim() + return ( + (nn = Kt.substring(0, Mt).trim() + nn + ';'), It === 1 || (It === 2 && ot(nn, 1)) ? '-webkit-' + nn + nn : nn + ) + } + if (It === 0 || (It === 2 && !ot(Kt, 1))) return Kt + switch (rn) { + case 1015: + return Kt.charCodeAt(10) === 97 ? '-webkit-' + Kt + Kt : Kt + case 951: + return Kt.charCodeAt(3) === 116 ? '-webkit-' + Kt + Kt : Kt + case 963: + return Kt.charCodeAt(5) === 110 ? '-webkit-' + Kt + Kt : Kt + case 1009: + if (Kt.charCodeAt(4) !== 100) break + case 969: + case 942: + return '-webkit-' + Kt + Kt + case 978: + return '-webkit-' + Kt + '-moz-' + Kt + Kt + case 1019: + case 983: + return '-webkit-' + Kt + '-moz-' + Kt + '-ms-' + Kt + Kt + case 883: + if (Kt.charCodeAt(8) === 45) return '-webkit-' + Kt + Kt + if (0 < Kt.indexOf('image-set(', 11)) return Kt.replace(jt, '$1-webkit-$2') + Kt + break + case 932: + if (Kt.charCodeAt(4) === 45) + switch (Kt.charCodeAt(5)) { + case 103: + return ( + '-webkit-box-' + + Kt.replace('-grow', '') + + '-webkit-' + + Kt + + '-ms-' + + Kt.replace('grow', 'positive') + + Kt + ) + case 115: + return '-webkit-' + Kt + '-ms-' + Kt.replace('shrink', 'negative') + Kt + case 98: + return '-webkit-' + Kt + '-ms-' + Kt.replace('basis', 'preferred-size') + Kt + } + return '-webkit-' + Kt + '-ms-' + Kt + Kt + case 964: + return '-webkit-' + Kt + '-ms-flex-' + Kt + Kt + case 1023: + if (Kt.charCodeAt(8) !== 99) break + return ( + (nn = Kt.substring(Kt.indexOf(':', 15)).replace('flex-', '').replace('space-between', 'justify')), + '-webkit-box-pack' + nn + '-webkit-' + Kt + '-ms-flex-pack' + nn + Kt + ) + case 1005: + return mt.test(Kt) ? Kt.replace(pt, ':-webkit-') + Kt.replace(pt, ':-moz-') + Kt : Kt + case 1e3: + switch (((nn = Kt.substring(13).trim()), (Ht = nn.indexOf('-') + 1), nn.charCodeAt(0) + nn.charCodeAt(Ht))) { + case 226: + nn = Kt.replace(St, 'tb') + break + case 232: + nn = Kt.replace(St, 'tb-rl') + break + case 220: + nn = Kt.replace(St, 'lr') + break + default: + return Kt + } + return '-webkit-' + Kt + '-ms-' + nn + Kt + case 1017: + if (Kt.indexOf('sticky', 9) === -1) break + case 975: + switch ( + ((Ht = (Kt = Mt).length - 10), + (nn = (Kt.charCodeAt(Ht) === 33 ? Kt.substring(0, Ht) : Kt).substring(Mt.indexOf(':', 7) + 1).trim()), + (rn = nn.charCodeAt(0) + (nn.charCodeAt(7) | 0))) + ) { + case 203: + if (111 > nn.charCodeAt(8)) break + case 115: + Kt = Kt.replace(nn, '-webkit-' + nn) + ';' + Kt + break + case 207: + case 102: + Kt = + Kt.replace(nn, '-webkit-' + (102 < rn ? 'inline-' : '') + 'box') + + ';' + + Kt.replace(nn, '-webkit-' + nn) + + ';' + + Kt.replace(nn, '-ms-' + nn + 'box') + + ';' + + Kt + } + return Kt + ';' + case 938: + if (Kt.charCodeAt(5) === 45) + switch (Kt.charCodeAt(6)) { + case 105: + return (nn = Kt.replace('-items', '')), '-webkit-' + Kt + '-webkit-box-' + nn + '-ms-flex-' + nn + Kt + case 115: + return '-webkit-' + Kt + '-ms-flex-item-' + Kt.replace(Et, '') + Kt + default: + return '-webkit-' + Kt + '-ms-flex-line-pack' + Kt.replace('align-content', '').replace(Et, '') + Kt + } + break + case 973: + case 989: + if (Kt.charCodeAt(3) !== 45 || Kt.charCodeAt(4) === 122) break + case 931: + case 953: + if (Dt.test(Mt) === !0) + return (nn = Mt.substring(Mt.indexOf(':') + 1)).charCodeAt(0) === 115 + ? it(Mt.replace('stretch', 'fill-available'), Ht, en, sn).replace(':fill-available', ':stretch') + : Kt.replace(nn, '-webkit-' + nn) + Kt.replace(nn, '-moz-' + nn.replace('fill-', '')) + Kt + break + case 962: + if ( + ((Kt = '-webkit-' + Kt + (Kt.charCodeAt(5) === 102 ? '-ms-' + Kt : '') + Kt), + en + sn === 211 && Kt.charCodeAt(13) === 105 && 0 < Kt.indexOf('transform', 10)) + ) + return Kt.substring(0, Kt.indexOf(';', 27) + 1).replace(gt, '$1-webkit-$2') + Kt + } + return Kt + } + function ot(Mt, Ht) { + var en = Mt.indexOf(Ht === 1 ? ':' : '{'), + sn = Mt.substring(0, Ht !== 3 ? en : 10) + return (en = Mt.substring(en + 1, Mt.length - 1)), Ft(Ht !== 2 ? sn : sn.replace($t, '$1'), en, Ht) + } + function at(Mt, Ht) { + var en = it(Ht, Ht.charCodeAt(0), Ht.charCodeAt(1), Ht.charCodeAt(2)) + return en !== Ht + ';' ? en.replace(At, ' or ($1)').substring(4) : '(' + Ht + ')' + } + function st(Mt, Ht, en, sn, Kt, rn, nn, hn, vn, an) { + for (var Qt = 0, _n = Ht, Pn; Qt < zt; ++Qt) + switch ((Pn = Wt[Qt].call(ut, Mt, _n, en, sn, Kt, rn, nn, hn, vn, an))) { + case void 0: + case !1: + case !0: + case null: + break + default: + _n = Pn + } + if (_n !== Ht) return _n + } + function lt(Mt) { + switch (Mt) { + case void 0: + case null: + zt = Wt.length = 0 + break + default: + if (typeof Mt == 'function') Wt[zt++] = Mt + else if (typeof Mt == 'object') for (var Ht = 0, en = Mt.length; Ht < en; ++Ht) lt(Mt[Ht]) + else Nt = !!Mt | 0 + } + return lt + } + function ct(Mt) { + return ( + (Mt = Mt.prefix), + Mt !== void 0 && ((Ft = null), Mt ? (typeof Mt != 'function' ? (It = 1) : ((It = 2), (Ft = Mt))) : (It = 0)), + ct + ) + } + function ut(Mt, Ht) { + var en = Mt + if ((33 > en.charCodeAt(0) && (en = en.trim()), (Ut = en), (en = [Ut]), 0 < zt)) { + var sn = st(-1, Ht, en, en, Ct, Pt, 0, 0, 0, 0) + sn !== void 0 && typeof sn == 'string' && (Ht = sn) + } + var Kt = et(Ot, en, Ht, 0, 0) + return ( + 0 < zt && ((sn = st(-2, Kt, en, en, Ct, Pt, Kt.length, 0, 0, 0)), sn !== void 0 && (Kt = sn)), + (Ut = ''), + (wt = 0), + (Pt = Ct = 1), + Kt + ) + } + var ht = /^\0+/g, + dt = /[\0\r\f]/g, + pt = /: */g, + mt = /zoo|gra/, + gt = /([,: ])(transform)/g, + yt = /,\r+?/g, + bt = /([\t\r\n ])*\f?&/g, + vt = /@(k\w+)\s*(\S*)\s*/, + xt = /::(place)/g, + kt = /:(read-only)/g, + St = /[svh]\w+-[tblr]{2}/, + Tt = /\(\s*(.*)\s*\)/g, + At = /([\s\S]*?);/g, + Et = /-self|flex-/g, + $t = /[^]*?(:[rp][el]a[\w-]+)[^]*/, + Dt = /stretch|:\s*\w+\-(?:conte|avail)/, + jt = /([^-])(image-set\()/, + Pt = 1, + Ct = 1, + wt = 0, + It = 1, + Ot = [], + Wt = [], + zt = 0, + Ft = null, + Nt = 0, + Ut = '' + return (ut.use = lt), (ut.set = ct), tt !== void 0 && ct(tt), ut + } + var unitlessKeys$1 = { + animationIterationCount: 1, + borderImageOutset: 1, + borderImageSlice: 1, + borderImageWidth: 1, + boxFlex: 1, + boxFlexGroup: 1, + boxOrdinalGroup: 1, + columnCount: 1, + columns: 1, + flex: 1, + flexGrow: 1, + flexPositive: 1, + flexShrink: 1, + flexNegative: 1, + flexOrder: 1, + gridRow: 1, + gridRowEnd: 1, + gridRowSpan: 1, + gridRowStart: 1, + gridColumn: 1, + gridColumnEnd: 1, + gridColumnSpan: 1, + gridColumnStart: 1, + msGridRow: 1, + msGridRowSpan: 1, + msGridColumn: 1, + msGridColumnSpan: 1, + fontWeight: 1, + lineHeight: 1, + opacity: 1, + order: 1, + orphans: 1, + tabSize: 1, + widows: 1, + zIndex: 1, + zoom: 1, + WebkitLineClamp: 1, + fillOpacity: 1, + floodOpacity: 1, + stopOpacity: 1, + strokeDasharray: 1, + strokeDashoffset: 1, + strokeMiterlimit: 1, + strokeOpacity: 1, + strokeWidth: 1, + } + function memoize$4(tt) { + var et = Object.create(null) + return function (nt) { + return et[nt] === void 0 && (et[nt] = tt(nt)), et[nt] + } + } + var reactPropsRegex = + /^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/, + isPropValid = memoize$4(function (tt) { + return reactPropsRegex.test(tt) || (tt.charCodeAt(0) === 111 && tt.charCodeAt(1) === 110 && tt.charCodeAt(2) < 91) + }), + reactIs$2 = { exports: {} }, + reactIs_production_min$1 = {} + /** @license React v16.13.1 + * react-is.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ var b$3 = typeof Symbol == 'function' && Symbol.for, + c$5 = b$3 ? Symbol.for('react.element') : 60103, + d$2 = b$3 ? Symbol.for('react.portal') : 60106, + e$3 = b$3 ? Symbol.for('react.fragment') : 60107, + f$4 = b$3 ? Symbol.for('react.strict_mode') : 60108, + g$5 = b$3 ? Symbol.for('react.profiler') : 60114, + h$6 = b$3 ? Symbol.for('react.provider') : 60109, + k$5 = b$3 ? Symbol.for('react.context') : 60110, + l$3 = b$3 ? Symbol.for('react.async_mode') : 60111, + m$5 = b$3 ? Symbol.for('react.concurrent_mode') : 60111, + n$4 = b$3 ? Symbol.for('react.forward_ref') : 60112, + p$5 = b$3 ? Symbol.for('react.suspense') : 60113, + q$4 = b$3 ? Symbol.for('react.suspense_list') : 60120, + r$a = b$3 ? Symbol.for('react.memo') : 60115, + t$4 = b$3 ? Symbol.for('react.lazy') : 60116, + v$5 = b$3 ? Symbol.for('react.block') : 60121, + w$4 = b$3 ? Symbol.for('react.fundamental') : 60117, + x$6 = b$3 ? Symbol.for('react.responder') : 60118, + y$5 = b$3 ? Symbol.for('react.scope') : 60119 + function z$5(tt) { + if (typeof tt == 'object' && tt !== null) { + var et = tt.$$typeof + switch (et) { + case c$5: + switch (((tt = tt.type), tt)) { + case l$3: + case m$5: + case e$3: + case g$5: + case f$4: + case p$5: + return tt + default: + switch (((tt = tt && tt.$$typeof), tt)) { + case k$5: + case n$4: + case t$4: + case r$a: + case h$6: + return tt + default: + return et + } + } + case d$2: + return et + } + } + } + function A$1(tt) { + return z$5(tt) === m$5 + } + reactIs_production_min$1.AsyncMode = l$3 + reactIs_production_min$1.ConcurrentMode = m$5 + reactIs_production_min$1.ContextConsumer = k$5 + reactIs_production_min$1.ContextProvider = h$6 + reactIs_production_min$1.Element = c$5 + reactIs_production_min$1.ForwardRef = n$4 + reactIs_production_min$1.Fragment = e$3 + reactIs_production_min$1.Lazy = t$4 + reactIs_production_min$1.Memo = r$a + reactIs_production_min$1.Portal = d$2 + reactIs_production_min$1.Profiler = g$5 + reactIs_production_min$1.StrictMode = f$4 + reactIs_production_min$1.Suspense = p$5 + reactIs_production_min$1.isAsyncMode = function (tt) { + return A$1(tt) || z$5(tt) === l$3 + } + reactIs_production_min$1.isConcurrentMode = A$1 + reactIs_production_min$1.isContextConsumer = function (tt) { + return z$5(tt) === k$5 + } + reactIs_production_min$1.isContextProvider = function (tt) { + return z$5(tt) === h$6 + } + reactIs_production_min$1.isElement = function (tt) { + return typeof tt == 'object' && tt !== null && tt.$$typeof === c$5 + } + reactIs_production_min$1.isForwardRef = function (tt) { + return z$5(tt) === n$4 + } + reactIs_production_min$1.isFragment = function (tt) { + return z$5(tt) === e$3 + } + reactIs_production_min$1.isLazy = function (tt) { + return z$5(tt) === t$4 + } + reactIs_production_min$1.isMemo = function (tt) { + return z$5(tt) === r$a + } + reactIs_production_min$1.isPortal = function (tt) { + return z$5(tt) === d$2 + } + reactIs_production_min$1.isProfiler = function (tt) { + return z$5(tt) === g$5 + } + reactIs_production_min$1.isStrictMode = function (tt) { + return z$5(tt) === f$4 + } + reactIs_production_min$1.isSuspense = function (tt) { + return z$5(tt) === p$5 + } + reactIs_production_min$1.isValidElementType = function (tt) { + return ( + typeof tt == 'string' || + typeof tt == 'function' || + tt === e$3 || + tt === m$5 || + tt === g$5 || + tt === f$4 || + tt === p$5 || + tt === q$4 || + (typeof tt == 'object' && + tt !== null && + (tt.$$typeof === t$4 || + tt.$$typeof === r$a || + tt.$$typeof === h$6 || + tt.$$typeof === k$5 || + tt.$$typeof === n$4 || + tt.$$typeof === w$4 || + tt.$$typeof === x$6 || + tt.$$typeof === y$5 || + tt.$$typeof === v$5)) + ) + } + reactIs_production_min$1.typeOf = z$5 + reactIs$2.exports = reactIs_production_min$1 + var reactIsExports$1 = reactIs$2.exports, + reactIs$1 = reactIsExports$1, + REACT_STATICS = { + childContextTypes: !0, + contextType: !0, + contextTypes: !0, + defaultProps: !0, + displayName: !0, + getDefaultProps: !0, + getDerivedStateFromError: !0, + getDerivedStateFromProps: !0, + mixins: !0, + propTypes: !0, + type: !0, + }, + KNOWN_STATICS = { name: !0, length: !0, prototype: !0, caller: !0, callee: !0, arguments: !0, arity: !0 }, + FORWARD_REF_STATICS = { $$typeof: !0, render: !0, defaultProps: !0, displayName: !0, propTypes: !0 }, + MEMO_STATICS = { $$typeof: !0, compare: !0, defaultProps: !0, displayName: !0, propTypes: !0, type: !0 }, + TYPE_STATICS = {} + TYPE_STATICS[reactIs$1.ForwardRef] = FORWARD_REF_STATICS + TYPE_STATICS[reactIs$1.Memo] = MEMO_STATICS + function getStatics(tt) { + return reactIs$1.isMemo(tt) ? MEMO_STATICS : TYPE_STATICS[tt.$$typeof] || REACT_STATICS + } + var defineProperty$3 = Object.defineProperty, + getOwnPropertyNames$1 = Object.getOwnPropertyNames, + getOwnPropertySymbols$1 = Object.getOwnPropertySymbols, + getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor, + getPrototypeOf$1 = Object.getPrototypeOf, + objectPrototype = Object.prototype + function hoistNonReactStatics(tt, et, nt) { + if (typeof et != 'string') { + if (objectPrototype) { + var rt = getPrototypeOf$1(et) + rt && rt !== objectPrototype && hoistNonReactStatics(tt, rt, nt) + } + var it = getOwnPropertyNames$1(et) + getOwnPropertySymbols$1 && (it = it.concat(getOwnPropertySymbols$1(et))) + for (var ot = getStatics(tt), at = getStatics(et), st = 0; st < it.length; ++st) { + var lt = it[st] + if (!KNOWN_STATICS[lt] && !(nt && nt[lt]) && !(at && at[lt]) && !(ot && ot[lt])) { + var ct = getOwnPropertyDescriptor$1(et, lt) + try { + defineProperty$3(tt, lt, ct) + } catch {} + } + } + } + return tt + } + var hoistNonReactStatics_cjs = hoistNonReactStatics + const hoistNonReactStatics$1 = getDefaultExportFromCjs(hoistNonReactStatics_cjs) + function y$4() { + return (y$4 = + Object.assign || + function (tt) { + for (var et = 1; et < arguments.length; et++) { + var nt = arguments[et] + for (var rt in nt) Object.prototype.hasOwnProperty.call(nt, rt) && (tt[rt] = nt[rt]) + } + return tt + }).apply(this, arguments) + } + var v$4 = function (tt, et) { + for (var nt = [tt[0]], rt = 0, it = et.length; rt < it; rt += 1) nt.push(et[rt], tt[rt + 1]) + return nt + }, + g$4 = function (tt) { + return ( + tt !== null && + typeof tt == 'object' && + (tt.toString ? tt.toString() : Object.prototype.toString.call(tt)) === '[object Object]' && + !reactIsExports$2.typeOf(tt) + ) + }, + S = Object.freeze([]), + w$3 = Object.freeze({}) + function E(tt) { + return typeof tt == 'function' + } + function b$2(tt) { + return tt.displayName || tt.name || 'Component' + } + function _$2(tt) { + return tt && typeof tt.styledComponentId == 'string' + } + var N = (typeof process < 'u' && process.env !== void 0 && ({}.REACT_APP_SC_ATTR || {}.SC_ATTR)) || 'data-styled', + C = typeof window < 'u' && 'HTMLElement' in window, + I = !!(typeof SC_DISABLE_SPEEDY == 'boolean' + ? SC_DISABLE_SPEEDY + : typeof process < 'u' && + process.env !== void 0 && + ({}.REACT_APP_SC_DISABLE_SPEEDY !== void 0 && {}.REACT_APP_SC_DISABLE_SPEEDY !== '' + ? {}.REACT_APP_SC_DISABLE_SPEEDY !== 'false' && {}.REACT_APP_SC_DISABLE_SPEEDY + : {}.SC_DISABLE_SPEEDY !== void 0 && + {}.SC_DISABLE_SPEEDY !== '' && + {}.SC_DISABLE_SPEEDY !== 'false' && + {}.SC_DISABLE_SPEEDY)), + P$2 = {} + function D(tt) { + for (var et = arguments.length, nt = new Array(et > 1 ? et - 1 : 0), rt = 1; rt < et; rt++) + nt[rt - 1] = arguments[rt] + throw new Error( + 'An error occurred. See https://git.io/JUIaE#' + + tt + + ' for more information.' + + (nt.length > 0 ? ' Args: ' + nt.join(', ') : ''), + ) + } + var j = (function () { + function tt(nt) { + ;(this.groupSizes = new Uint32Array(512)), (this.length = 512), (this.tag = nt) + } + var et = tt.prototype + return ( + (et.indexOfGroup = function (nt) { + for (var rt = 0, it = 0; it < nt; it++) rt += this.groupSizes[it] + return rt + }), + (et.insertRules = function (nt, rt) { + if (nt >= this.groupSizes.length) { + for (var it = this.groupSizes, ot = it.length, at = ot; nt >= at; ) (at <<= 1) < 0 && D(16, '' + nt) + ;(this.groupSizes = new Uint32Array(at)), this.groupSizes.set(it), (this.length = at) + for (var st = ot; st < at; st++) this.groupSizes[st] = 0 + } + for (var lt = this.indexOfGroup(nt + 1), ct = 0, ut = rt.length; ct < ut; ct++) + this.tag.insertRule(lt, rt[ct]) && (this.groupSizes[nt]++, lt++) + }), + (et.clearGroup = function (nt) { + if (nt < this.length) { + var rt = this.groupSizes[nt], + it = this.indexOfGroup(nt), + ot = it + rt + this.groupSizes[nt] = 0 + for (var at = it; at < ot; at++) this.tag.deleteRule(it) + } + }), + (et.getGroup = function (nt) { + var rt = '' + if (nt >= this.length || this.groupSizes[nt] === 0) return rt + for (var it = this.groupSizes[nt], ot = this.indexOfGroup(nt), at = ot + it, st = ot; st < at; st++) + rt += + this.tag.getRule(st) + + `/*!sc*/ +` + return rt + }), + tt + ) + })(), + T = new Map(), + x$5 = new Map(), + k$4 = 1, + V = function (tt) { + if (T.has(tt)) return T.get(tt) + for (; x$5.has(k$4); ) k$4++ + var et = k$4++ + return T.set(tt, et), x$5.set(et, tt), et + }, + B = function (tt) { + return x$5.get(tt) + }, + z$4 = function (tt, et) { + et >= k$4 && (k$4 = et + 1), T.set(tt, et), x$5.set(et, tt) + }, + M = 'style[' + N + '][data-styled-version="5.3.11"]', + G$1 = new RegExp('^' + N + '\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)'), + L = function (tt, et, nt) { + for (var rt, it = nt.split(','), ot = 0, at = it.length; ot < at; ot++) (rt = it[ot]) && tt.registerName(et, rt) + }, + F = function (tt, et) { + for ( + var nt = (et.textContent || '').split(`/*!sc*/ +`), + rt = [], + it = 0, + ot = nt.length; + it < ot; + it++ + ) { + var at = nt[it].trim() + if (at) { + var st = at.match(G$1) + if (st) { + var lt = 0 | parseInt(st[1], 10), + ct = st[2] + lt !== 0 && (z$4(ct, lt), L(tt, ct, st[3]), tt.getTag().insertRules(lt, rt)), (rt.length = 0) + } else rt.push(at) + } + } + }, + Y = function () { + return typeof __webpack_nonce__ < 'u' ? __webpack_nonce__ : null + }, + q$3 = function (tt) { + var et = document.head, + nt = tt || et, + rt = document.createElement('style'), + it = (function (st) { + for (var lt = st.childNodes, ct = lt.length; ct >= 0; ct--) { + var ut = lt[ct] + if (ut && ut.nodeType === 1 && ut.hasAttribute(N)) return ut + } + })(nt), + ot = it !== void 0 ? it.nextSibling : null + rt.setAttribute(N, 'active'), rt.setAttribute('data-styled-version', '5.3.11') + var at = Y() + return at && rt.setAttribute('nonce', at), nt.insertBefore(rt, ot), rt + }, + H = (function () { + function tt(nt) { + var rt = (this.element = q$3(nt)) + rt.appendChild(document.createTextNode('')), + (this.sheet = (function (it) { + if (it.sheet) return it.sheet + for (var ot = document.styleSheets, at = 0, st = ot.length; at < st; at++) { + var lt = ot[at] + if (lt.ownerNode === it) return lt + } + D(17) + })(rt)), + (this.length = 0) + } + var et = tt.prototype + return ( + (et.insertRule = function (nt, rt) { + try { + return this.sheet.insertRule(rt, nt), this.length++, !0 + } catch { + return !1 + } + }), + (et.deleteRule = function (nt) { + this.sheet.deleteRule(nt), this.length-- + }), + (et.getRule = function (nt) { + var rt = this.sheet.cssRules[nt] + return rt !== void 0 && typeof rt.cssText == 'string' ? rt.cssText : '' + }), + tt + ) + })(), + $ = (function () { + function tt(nt) { + var rt = (this.element = q$3(nt)) + ;(this.nodes = rt.childNodes), (this.length = 0) + } + var et = tt.prototype + return ( + (et.insertRule = function (nt, rt) { + if (nt <= this.length && nt >= 0) { + var it = document.createTextNode(rt), + ot = this.nodes[nt] + return this.element.insertBefore(it, ot || null), this.length++, !0 + } + return !1 + }), + (et.deleteRule = function (nt) { + this.element.removeChild(this.nodes[nt]), this.length-- + }), + (et.getRule = function (nt) { + return nt < this.length ? this.nodes[nt].textContent : '' + }), + tt + ) + })(), + W$6 = (function () { + function tt(nt) { + ;(this.rules = []), (this.length = 0) + } + var et = tt.prototype + return ( + (et.insertRule = function (nt, rt) { + return nt <= this.length && (this.rules.splice(nt, 0, rt), this.length++, !0) + }), + (et.deleteRule = function (nt) { + this.rules.splice(nt, 1), this.length-- + }), + (et.getRule = function (nt) { + return nt < this.length ? this.rules[nt] : '' + }), + tt + ) + })(), + U = C, + J = { isServer: !C, useCSSOMInjection: !I }, + X = (function () { + function tt(nt, rt, it) { + nt === void 0 && (nt = w$3), + rt === void 0 && (rt = {}), + (this.options = y$4({}, J, {}, nt)), + (this.gs = rt), + (this.names = new Map(it)), + (this.server = !!nt.isServer), + !this.server && + C && + U && + ((U = !1), + (function (ot) { + for (var at = document.querySelectorAll(M), st = 0, lt = at.length; st < lt; st++) { + var ct = at[st] + ct && ct.getAttribute(N) !== 'active' && (F(ot, ct), ct.parentNode && ct.parentNode.removeChild(ct)) + } + })(this)) + } + tt.registerId = function (nt) { + return V(nt) + } + var et = tt.prototype + return ( + (et.reconstructWithOptions = function (nt, rt) { + return ( + rt === void 0 && (rt = !0), new tt(y$4({}, this.options, {}, nt), this.gs, (rt && this.names) || void 0) + ) + }), + (et.allocateGSInstance = function (nt) { + return (this.gs[nt] = (this.gs[nt] || 0) + 1) + }), + (et.getTag = function () { + return ( + this.tag || + (this.tag = + ((it = (rt = this.options).isServer), + (ot = rt.useCSSOMInjection), + (at = rt.target), + (nt = it ? new W$6(at) : ot ? new H(at) : new $(at)), + new j(nt))) + ) + var nt, rt, it, ot, at + }), + (et.hasNameForId = function (nt, rt) { + return this.names.has(nt) && this.names.get(nt).has(rt) + }), + (et.registerName = function (nt, rt) { + if ((V(nt), this.names.has(nt))) this.names.get(nt).add(rt) + else { + var it = new Set() + it.add(rt), this.names.set(nt, it) + } + }), + (et.insertRules = function (nt, rt, it) { + this.registerName(nt, rt), this.getTag().insertRules(V(nt), it) + }), + (et.clearNames = function (nt) { + this.names.has(nt) && this.names.get(nt).clear() + }), + (et.clearRules = function (nt) { + this.getTag().clearGroup(V(nt)), this.clearNames(nt) + }), + (et.clearTag = function () { + this.tag = void 0 + }), + (et.toString = function () { + return (function (nt) { + for (var rt = nt.getTag(), it = rt.length, ot = '', at = 0; at < it; at++) { + var st = B(at) + if (st !== void 0) { + var lt = nt.names.get(st), + ct = rt.getGroup(at) + if (lt && ct && lt.size) { + var ut = N + '.g' + at + '[id="' + st + '"]', + ht = '' + lt !== void 0 && + lt.forEach(function (dt) { + dt.length > 0 && (ht += dt + ',') + }), + (ot += + '' + + ct + + ut + + '{content:"' + + ht + + `"}/*!sc*/ +`) + } + } + } + return ot + })(this) + }), + tt + ) + })(), + Z = /(a)(d)/gi, + K$5 = function (tt) { + return String.fromCharCode(tt + (tt > 25 ? 39 : 97)) + } + function Q(tt) { + var et, + nt = '' + for (et = Math.abs(tt); et > 52; et = (et / 52) | 0) nt = K$5(et % 52) + nt + return (K$5(et % 52) + nt).replace(Z, '$1-$2') + } + var ee = function (tt, et) { + for (var nt = et.length; nt; ) tt = (33 * tt) ^ et.charCodeAt(--nt) + return tt + }, + te = function (tt) { + return ee(5381, tt) + } + function ne(tt) { + for (var et = 0; et < tt.length; et += 1) { + var nt = tt[et] + if (E(nt) && !_$2(nt)) return !1 + } + return !0 + } + var re$2 = te('5.3.11'), + oe = (function () { + function tt(et, nt, rt) { + ;(this.rules = et), + (this.staticRulesId = ''), + (this.isStatic = (rt === void 0 || rt.isStatic) && ne(et)), + (this.componentId = nt), + (this.baseHash = ee(re$2, nt)), + (this.baseStyle = rt), + X.registerId(nt) + } + return ( + (tt.prototype.generateAndInjectStyles = function (et, nt, rt) { + var it = this.componentId, + ot = [] + if ( + (this.baseStyle && ot.push(this.baseStyle.generateAndInjectStyles(et, nt, rt)), this.isStatic && !rt.hash) + ) + if (this.staticRulesId && nt.hasNameForId(it, this.staticRulesId)) ot.push(this.staticRulesId) + else { + var at = _e(this.rules, et, nt, rt).join(''), + st = Q(ee(this.baseHash, at) >>> 0) + if (!nt.hasNameForId(it, st)) { + var lt = rt(at, '.' + st, void 0, it) + nt.insertRules(it, st, lt) + } + ot.push(st), (this.staticRulesId = st) + } + else { + for (var ct = this.rules.length, ut = ee(this.baseHash, rt.hash), ht = '', dt = 0; dt < ct; dt++) { + var pt = this.rules[dt] + if (typeof pt == 'string') ht += pt + else if (pt) { + var mt = _e(pt, et, nt, rt), + gt = Array.isArray(mt) ? mt.join('') : mt + ;(ut = ee(ut, gt + dt)), (ht += gt) + } + } + if (ht) { + var yt = Q(ut >>> 0) + if (!nt.hasNameForId(it, yt)) { + var bt = rt(ht, '.' + yt, void 0, it) + nt.insertRules(it, yt, bt) + } + ot.push(yt) + } + } + return ot.join(' ') + }), + tt + ) + })(), + se = /^\s*\/\/.*$/gm, + ie = [':', '[', '.', '#'] + function ae(tt) { + var et, + nt, + rt, + it, + ot = tt === void 0 ? w$3 : tt, + at = ot.options, + st = at === void 0 ? w$3 : at, + lt = ot.plugins, + ct = lt === void 0 ? S : lt, + ut = new stylis_min(st), + ht = [], + dt = (function (gt) { + function yt(bt) { + if (bt) + try { + gt(bt + '}') + } catch {} + } + return function (bt, vt, xt, kt, St, Tt, At, Et, $t, Dt) { + switch (bt) { + case 1: + if ($t === 0 && vt.charCodeAt(0) === 64) return gt(vt + ';'), '' + break + case 2: + if (Et === 0) return vt + '/*|*/' + break + case 3: + switch (Et) { + case 102: + case 112: + return gt(xt[0] + vt), '' + default: + return vt + (Dt === 0 ? '/*|*/' : '') + } + case -2: + vt.split('/*|*/}').forEach(yt) + } + } + })(function (gt) { + ht.push(gt) + }), + pt = function (gt, yt, bt) { + return (yt === 0 && ie.indexOf(bt[nt.length]) !== -1) || bt.match(it) ? gt : '.' + et + } + function mt(gt, yt, bt, vt) { + vt === void 0 && (vt = '&') + var xt = gt.replace(se, ''), + kt = yt && bt ? bt + ' ' + yt + ' { ' + xt + ' }' : xt + return ( + (et = vt), + (nt = yt), + (rt = new RegExp('\\' + nt + '\\b', 'g')), + (it = new RegExp('(\\' + nt + '\\b){2,}')), + ut(bt || !yt ? '' : yt, kt) + ) + } + return ( + ut.use( + [].concat(ct, [ + function (gt, yt, bt) { + gt === 2 && bt.length && bt[0].lastIndexOf(nt) > 0 && (bt[0] = bt[0].replace(rt, pt)) + }, + dt, + function (gt) { + if (gt === -2) { + var yt = ht + return (ht = []), yt + } + }, + ]), + ), + (mt.hash = ct.length + ? ct + .reduce(function (gt, yt) { + return yt.name || D(15), ee(gt, yt.name) + }, 5381) + .toString() + : ''), + mt + ) + } + var ce = React$1.createContext() + ce.Consumer + var le = React$1.createContext(), + de = (le.Consumer, new X()), + he = ae() + function pe() { + return reactExports.useContext(ce) || de + } + function fe() { + return reactExports.useContext(le) || he + } + var ye = (function () { + function tt(et, nt) { + var rt = this + ;(this.inject = function (it, ot) { + ot === void 0 && (ot = he) + var at = rt.name + ot.hash + it.hasNameForId(rt.id, at) || it.insertRules(rt.id, at, ot(rt.rules, at, '@keyframes')) + }), + (this.toString = function () { + return D(12, String(rt.name)) + }), + (this.name = et), + (this.id = 'sc-keyframes-' + et), + (this.rules = nt) + } + return ( + (tt.prototype.getName = function (et) { + return et === void 0 && (et = he), this.name + et.hash + }), + tt + ) + })(), + ve = /([A-Z])/, + ge = /([A-Z])/g, + Se = /^ms-/, + we = function (tt) { + return '-' + tt.toLowerCase() + } + function Ee(tt) { + return ve.test(tt) ? tt.replace(ge, we).replace(Se, '-ms-') : tt + } + var be = function (tt) { + return tt == null || tt === !1 || tt === '' + } + function _e(tt, et, nt, rt) { + if (Array.isArray(tt)) { + for (var it, ot = [], at = 0, st = tt.length; at < st; at += 1) + (it = _e(tt[at], et, nt, rt)) !== '' && (Array.isArray(it) ? ot.push.apply(ot, it) : ot.push(it)) + return ot + } + if (be(tt)) return '' + if (_$2(tt)) return '.' + tt.styledComponentId + if (E(tt)) { + if (typeof (ct = tt) != 'function' || (ct.prototype && ct.prototype.isReactComponent) || !et) return tt + var lt = tt(et) + return _e(lt, et, nt, rt) + } + var ct + return tt instanceof ye + ? nt + ? (tt.inject(nt, rt), tt.getName(rt)) + : tt + : g$4(tt) + ? (function ut(ht, dt) { + var pt, + mt, + gt = [] + for (var yt in ht) + ht.hasOwnProperty(yt) && + !be(ht[yt]) && + ((Array.isArray(ht[yt]) && ht[yt].isCss) || E(ht[yt]) + ? gt.push(Ee(yt) + ':', ht[yt], ';') + : g$4(ht[yt]) + ? gt.push.apply(gt, ut(ht[yt], yt)) + : gt.push( + Ee(yt) + + ': ' + + ((pt = yt), + (mt = ht[yt]) == null || typeof mt == 'boolean' || mt === '' + ? '' + : typeof mt != 'number' || mt === 0 || pt in unitlessKeys$1 || pt.startsWith('--') + ? String(mt).trim() + : mt + 'px') + + ';', + )) + return dt ? [dt + ' {'].concat(gt, ['}']) : gt + })(tt) + : tt.toString() + } + var Ne = function (tt) { + return Array.isArray(tt) && (tt.isCss = !0), tt + } + function Ae(tt) { + for (var et = arguments.length, nt = new Array(et > 1 ? et - 1 : 0), rt = 1; rt < et; rt++) + nt[rt - 1] = arguments[rt] + return E(tt) || g$4(tt) + ? Ne(_e(v$4(S, [tt].concat(nt)))) + : nt.length === 0 && tt.length === 1 && typeof tt[0] == 'string' + ? tt + : Ne(_e(v$4(tt, nt))) + } + var Oe = function (tt, et, nt) { + return nt === void 0 && (nt = w$3), (tt.theme !== nt.theme && tt.theme) || et || nt.theme + }, + Re = /[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g, + De = /(^-|-$)/g + function je(tt) { + return tt.replace(Re, '-').replace(De, '') + } + var Te = function (tt) { + return Q(te(tt) >>> 0) + } + function xe(tt) { + return typeof tt == 'string' && !0 + } + var ke = function (tt) { + return typeof tt == 'function' || (typeof tt == 'object' && tt !== null && !Array.isArray(tt)) + }, + Ve = function (tt) { + return tt !== '__proto__' && tt !== 'constructor' && tt !== 'prototype' + } + function Be(tt, et, nt) { + var rt = tt[nt] + ke(et) && ke(rt) ? ze(rt, et) : (tt[nt] = et) + } + function ze(tt) { + for (var et = arguments.length, nt = new Array(et > 1 ? et - 1 : 0), rt = 1; rt < et; rt++) + nt[rt - 1] = arguments[rt] + for (var it = 0, ot = nt; it < ot.length; it++) { + var at = ot[it] + if (ke(at)) for (var st in at) Ve(st) && Be(tt, at[st], st) + } + return tt + } + var Me = React$1.createContext() + Me.Consumer + function Le(tt) { + var et = reactExports.useContext(Me), + nt = reactExports.useMemo( + function () { + return (function (rt, it) { + if (!rt) return D(14) + if (E(rt)) { + var ot = rt(it) + return ot + } + return Array.isArray(rt) || typeof rt != 'object' ? D(8) : it ? y$4({}, it, {}, rt) : rt + })(tt.theme, et) + }, + [tt.theme, et], + ) + return tt.children ? React$1.createElement(Me.Provider, { value: nt }, tt.children) : null + } + var Fe = {} + function Ye(tt, et, nt) { + var rt = _$2(tt), + it = !xe(tt), + ot = et.attrs, + at = ot === void 0 ? S : ot, + st = et.componentId, + lt = + st === void 0 + ? (function (vt, xt) { + var kt = typeof vt != 'string' ? 'sc' : je(vt) + Fe[kt] = (Fe[kt] || 0) + 1 + var St = kt + '-' + Te('5.3.11' + kt + Fe[kt]) + return xt ? xt + '-' + St : St + })(et.displayName, et.parentComponentId) + : st, + ct = et.displayName, + ut = + ct === void 0 + ? (function (vt) { + return xe(vt) ? 'styled.' + vt : 'Styled(' + b$2(vt) + ')' + })(tt) + : ct, + ht = et.displayName && et.componentId ? je(et.displayName) + '-' + et.componentId : et.componentId || lt, + dt = rt && tt.attrs ? Array.prototype.concat(tt.attrs, at).filter(Boolean) : at, + pt = et.shouldForwardProp + rt && + tt.shouldForwardProp && + (pt = et.shouldForwardProp + ? function (vt, xt, kt) { + return tt.shouldForwardProp(vt, xt, kt) && et.shouldForwardProp(vt, xt, kt) + } + : tt.shouldForwardProp) + var mt, + gt = new oe(nt, ht, rt ? tt.componentStyle : void 0), + yt = gt.isStatic && at.length === 0, + bt = function (vt, xt) { + return (function (kt, St, Tt, At) { + var Et = kt.attrs, + $t = kt.componentStyle, + Dt = kt.defaultProps, + jt = kt.foldedComponentIds, + Pt = kt.shouldForwardProp, + Ct = kt.styledComponentId, + wt = kt.target, + It = (function (sn, Kt, rn) { + sn === void 0 && (sn = w$3) + var nn = y$4({}, Kt, { theme: sn }), + hn = {} + return ( + rn.forEach(function (vn) { + var an, + Qt, + _n, + Pn = vn + for (an in (E(Pn) && (Pn = Pn(nn)), Pn)) + nn[an] = hn[an] = + an === 'className' ? ((Qt = hn[an]), (_n = Pn[an]), Qt && _n ? Qt + ' ' + _n : Qt || _n) : Pn[an] + }), + [nn, hn] + ) + })(Oe(St, reactExports.useContext(Me), Dt) || w$3, St, Et), + Ot = It[0], + Wt = It[1], + zt = (function (sn, Kt, rn, nn) { + var hn = pe(), + vn = fe(), + an = Kt ? sn.generateAndInjectStyles(w$3, hn, vn) : sn.generateAndInjectStyles(rn, hn, vn) + return an + })($t, At, Ot), + Ft = Tt, + Nt = Wt.$as || St.$as || Wt.as || St.as || wt, + Ut = xe(Nt), + Mt = Wt !== St ? y$4({}, St, {}, Wt) : St, + Ht = {} + for (var en in Mt) + en[0] !== '$' && + en !== 'as' && + (en === 'forwardedAs' + ? (Ht.as = Mt[en]) + : (Pt ? Pt(en, isPropValid, Nt) : !Ut || isPropValid(en)) && (Ht[en] = Mt[en])) + return ( + St.style && Wt.style !== St.style && (Ht.style = y$4({}, St.style, {}, Wt.style)), + (Ht.className = Array.prototype + .concat(jt, Ct, zt !== Ct ? zt : null, St.className, Wt.className) + .filter(Boolean) + .join(' ')), + (Ht.ref = Ft), + reactExports.createElement(Nt, Ht) + ) + })(mt, vt, xt, yt) + } + return ( + (bt.displayName = ut), + ((mt = React$1.forwardRef(bt)).attrs = dt), + (mt.componentStyle = gt), + (mt.displayName = ut), + (mt.shouldForwardProp = pt), + (mt.foldedComponentIds = rt ? Array.prototype.concat(tt.foldedComponentIds, tt.styledComponentId) : S), + (mt.styledComponentId = ht), + (mt.target = rt ? tt.target : tt), + (mt.withComponent = function (vt) { + var xt = et.componentId, + kt = (function (Tt, At) { + if (Tt == null) return {} + var Et, + $t, + Dt = {}, + jt = Object.keys(Tt) + for ($t = 0; $t < jt.length; $t++) (Et = jt[$t]), At.indexOf(Et) >= 0 || (Dt[Et] = Tt[Et]) + return Dt + })(et, ['componentId']), + St = xt && xt + '-' + (xe(vt) ? vt : je(b$2(vt))) + return Ye(vt, y$4({}, kt, { attrs: dt, componentId: St }), nt) + }), + Object.defineProperty(mt, 'defaultProps', { + get: function () { + return this._foldedDefaultProps + }, + set: function (vt) { + this._foldedDefaultProps = rt ? ze({}, tt.defaultProps, vt) : vt + }, + }), + Object.defineProperty(mt, 'toString', { + value: function () { + return '.' + mt.styledComponentId + }, + }), + it && + hoistNonReactStatics$1(mt, tt, { + attrs: !0, + componentStyle: !0, + displayName: !0, + foldedComponentIds: !0, + shouldForwardProp: !0, + styledComponentId: !0, + target: !0, + withComponent: !0, + }), + mt + ) + } + var qe = function (tt) { + return (function et(nt, rt, it) { + if ((it === void 0 && (it = w$3), !reactIsExports$2.isValidElementType(rt))) return D(1, String(rt)) + var ot = function () { + return nt(rt, it, Ae.apply(void 0, arguments)) + } + return ( + (ot.withConfig = function (at) { + return et(nt, rt, y$4({}, it, {}, at)) + }), + (ot.attrs = function (at) { + return et(nt, rt, y$4({}, it, { attrs: Array.prototype.concat(it.attrs, at).filter(Boolean) })) + }), + ot + ) + })(Ye, tt) + } + ;[ + 'a', + 'abbr', + 'address', + 'area', + 'article', + 'aside', + 'audio', + 'b', + 'base', + 'bdi', + 'bdo', + 'big', + 'blockquote', + 'body', + 'br', + 'button', + 'canvas', + 'caption', + 'cite', + 'code', + 'col', + 'colgroup', + 'data', + 'datalist', + 'dd', + 'del', + 'details', + 'dfn', + 'dialog', + 'div', + 'dl', + 'dt', + 'em', + 'embed', + 'fieldset', + 'figcaption', + 'figure', + 'footer', + 'form', + 'h1', + 'h2', + 'h3', + 'h4', + 'h5', + 'h6', + 'head', + 'header', + 'hgroup', + 'hr', + 'html', + 'i', + 'iframe', + 'img', + 'input', + 'ins', + 'kbd', + 'keygen', + 'label', + 'legend', + 'li', + 'link', + 'main', + 'map', + 'mark', + 'marquee', + 'menu', + 'menuitem', + 'meta', + 'meter', + 'nav', + 'noscript', + 'object', + 'ol', + 'optgroup', + 'option', + 'output', + 'p', + 'param', + 'picture', + 'pre', + 'progress', + 'q', + 'rp', + 'rt', + 'ruby', + 's', + 'samp', + 'script', + 'section', + 'select', + 'small', + 'source', + 'span', + 'strong', + 'style', + 'sub', + 'summary', + 'sup', + 'table', + 'tbody', + 'td', + 'textarea', + 'tfoot', + 'th', + 'thead', + 'time', + 'title', + 'tr', + 'track', + 'u', + 'ul', + 'var', + 'video', + 'wbr', + 'circle', + 'clipPath', + 'defs', + 'ellipse', + 'foreignObject', + 'g', + 'image', + 'line', + 'linearGradient', + 'marker', + 'mask', + 'path', + 'pattern', + 'polygon', + 'polyline', + 'radialGradient', + 'rect', + 'stop', + 'svg', + 'text', + 'textPath', + 'tspan', + ].forEach(function (tt) { + qe[tt] = qe(tt) + }) + var He = (function () { + function tt(nt, rt) { + ;(this.rules = nt), (this.componentId = rt), (this.isStatic = ne(nt)), X.registerId(this.componentId + 1) + } + var et = tt.prototype + return ( + (et.createStyles = function (nt, rt, it, ot) { + var at = ot(_e(this.rules, rt, it, ot).join(''), ''), + st = this.componentId + nt + it.insertRules(st, st, at) + }), + (et.removeStyles = function (nt, rt) { + rt.clearRules(this.componentId + nt) + }), + (et.renderStyles = function (nt, rt, it, ot) { + nt > 2 && X.registerId(this.componentId + nt), this.removeStyles(nt, it), this.createStyles(nt, rt, it, ot) + }), + tt + ) + })() + function $e(tt) { + for (var et = arguments.length, nt = new Array(et > 1 ? et - 1 : 0), rt = 1; rt < et; rt++) + nt[rt - 1] = arguments[rt] + var it = Ae.apply(void 0, [tt].concat(nt)), + ot = 'sc-global-' + Te(JSON.stringify(it)), + at = new He(it, ot) + function st(ct) { + var ut = pe(), + ht = fe(), + dt = reactExports.useContext(Me), + pt = reactExports.useRef(ut.allocateGSInstance(ot)).current + return ( + ut.server && lt(pt, ct, ut, dt, ht), + reactExports.useLayoutEffect( + function () { + if (!ut.server) + return ( + lt(pt, ct, ut, dt, ht), + function () { + return at.removeStyles(pt, ut) + } + ) + }, + [pt, ct, ut, dt, ht], + ), + null + ) + } + function lt(ct, ut, ht, dt, pt) { + if (at.isStatic) at.renderStyles(ct, P$2, ht, pt) + else { + var mt = y$4({}, ut, { theme: Oe(ut, dt, st.defaultProps) }) + at.renderStyles(ct, mt, ht, pt) + } + } + return React$1.memo(st) + } + function We(tt) { + for (var et = arguments.length, nt = new Array(et > 1 ? et - 1 : 0), rt = 1; rt < et; rt++) + nt[rt - 1] = arguments[rt] + var it = Ae.apply(void 0, [tt].concat(nt)).join(''), + ot = Te(it) + return new ye(ot, it) + } + const styled$4 = qe, + common$7 = { black: '#000', white: '#fff' }, + common$8 = common$7, + red = { + 50: '#ffebee', + 100: '#ffcdd2', + 200: '#ef9a9a', + 300: '#e57373', + 400: '#ef5350', + 500: '#f44336', + 600: '#e53935', + 700: '#d32f2f', + 800: '#c62828', + 900: '#b71c1c', + A100: '#ff8a80', + A200: '#ff5252', + A400: '#ff1744', + A700: '#d50000', + }, + red$1 = red, + purple = { + 50: '#f3e5f5', + 100: '#e1bee7', + 200: '#ce93d8', + 300: '#ba68c8', + 400: '#ab47bc', + 500: '#9c27b0', + 600: '#8e24aa', + 700: '#7b1fa2', + 800: '#6a1b9a', + 900: '#4a148c', + A100: '#ea80fc', + A200: '#e040fb', + A400: '#d500f9', + A700: '#aa00ff', + }, + purple$1 = purple, + blue = { + 50: '#e3f2fd', + 100: '#bbdefb', + 200: '#90caf9', + 300: '#64b5f6', + 400: '#42a5f5', + 500: '#2196f3', + 600: '#1e88e5', + 700: '#1976d2', + 800: '#1565c0', + 900: '#0d47a1', + A100: '#82b1ff', + A200: '#448aff', + A400: '#2979ff', + A700: '#2962ff', + }, + blue$1 = blue, + lightBlue = { + 50: '#e1f5fe', + 100: '#b3e5fc', + 200: '#81d4fa', + 300: '#4fc3f7', + 400: '#29b6f6', + 500: '#03a9f4', + 600: '#039be5', + 700: '#0288d1', + 800: '#0277bd', + 900: '#01579b', + A100: '#80d8ff', + A200: '#40c4ff', + A400: '#00b0ff', + A700: '#0091ea', + }, + lightBlue$1 = lightBlue, + green = { + 50: '#e8f5e9', + 100: '#c8e6c9', + 200: '#a5d6a7', + 300: '#81c784', + 400: '#66bb6a', + 500: '#4caf50', + 600: '#43a047', + 700: '#388e3c', + 800: '#2e7d32', + 900: '#1b5e20', + A100: '#b9f6ca', + A200: '#69f0ae', + A400: '#00e676', + A700: '#00c853', + }, + green$1 = green, + orange = { + 50: '#fff3e0', + 100: '#ffe0b2', + 200: '#ffcc80', + 300: '#ffb74d', + 400: '#ffa726', + 500: '#ff9800', + 600: '#fb8c00', + 700: '#f57c00', + 800: '#ef6c00', + 900: '#e65100', + A100: '#ffd180', + A200: '#ffab40', + A400: '#ff9100', + A700: '#ff6d00', + }, + orange$1 = orange, + grey = { + 50: '#fafafa', + 100: '#f5f5f5', + 200: '#eeeeee', + 300: '#e0e0e0', + 400: '#bdbdbd', + 500: '#9e9e9e', + 600: '#757575', + 700: '#616161', + 800: '#424242', + 900: '#212121', + A100: '#f5f5f5', + A200: '#eeeeee', + A400: '#bdbdbd', + A700: '#616161', + }, + grey$1 = grey + function isPlainObject$1(tt) { + return tt !== null && typeof tt == 'object' && tt.constructor === Object + } + function deepClone(tt) { + if (!isPlainObject$1(tt)) return tt + const et = {} + return ( + Object.keys(tt).forEach((nt) => { + et[nt] = deepClone(tt[nt]) + }), + et + ) + } + function deepmerge$1(tt, et, nt = { clone: !0 }) { + const rt = nt.clone ? _extends$u({}, tt) : tt + return ( + isPlainObject$1(tt) && + isPlainObject$1(et) && + Object.keys(et).forEach((it) => { + it !== '__proto__' && + (isPlainObject$1(et[it]) && it in tt && isPlainObject$1(tt[it]) + ? (rt[it] = deepmerge$1(tt[it], et[it], nt)) + : nt.clone + ? (rt[it] = isPlainObject$1(et[it]) ? deepClone(et[it]) : et[it]) + : (rt[it] = et[it])) + }), + rt + ) + } + function formatMuiErrorMessage(tt) { + let et = 'https://mui.com/production-error/?code=' + tt + for (let nt = 1; nt < arguments.length; nt += 1) et += '&args[]=' + encodeURIComponent(arguments[nt]) + return 'Minified MUI error #' + tt + '; visit ' + et + ' for the full message.' + } + const refType = PropTypes.oneOfType([PropTypes.func, PropTypes.object]), + refType$1 = refType + function capitalize(tt) { + if (typeof tt != 'string') throw new Error(formatMuiErrorMessage(7)) + return tt.charAt(0).toUpperCase() + tt.slice(1) + } + function createChainedFunction(...tt) { + return tt.reduce( + (et, nt) => + nt == null + ? et + : function (...it) { + et.apply(this, it), nt.apply(this, it) + }, + () => {}, + ) + } + function debounce$5(tt, et = 166) { + let nt + function rt(...it) { + const ot = () => { + tt.apply(this, it) + } + clearTimeout(nt), (nt = setTimeout(ot, et)) + } + return ( + (rt.clear = () => { + clearTimeout(nt) + }), + rt + ) + } + function isMuiElement(tt, et) { + var nt, rt + return ( + reactExports.isValidElement(tt) && + et.indexOf( + (nt = tt.type.muiName) != null + ? nt + : (rt = tt.type) == null || (rt = rt._payload) == null || (rt = rt.value) == null + ? void 0 + : rt.muiName, + ) !== -1 + ) + } + function ownerDocument(tt) { + return (tt && tt.ownerDocument) || document + } + function ownerWindow(tt) { + return ownerDocument(tt).defaultView || window + } + function setRef(tt, et) { + typeof tt == 'function' ? tt(et) : tt && (tt.current = et) + } + const useEnhancedEffect = typeof window < 'u' ? reactExports.useLayoutEffect : reactExports.useEffect, + useEnhancedEffect$1 = useEnhancedEffect + let globalId = 0 + function useGlobalId(tt) { + const [et, nt] = reactExports.useState(tt), + rt = tt || et + return ( + reactExports.useEffect(() => { + et == null && ((globalId += 1), nt(`mui-${globalId}`)) + }, [et]), + rt + ) + } + const maybeReactUseId = React$2['useId'.toString()] + function useId(tt) { + if (maybeReactUseId !== void 0) { + const et = maybeReactUseId() + return tt ?? et + } + return useGlobalId(tt) + } + function useControlled({ controlled: tt, default: et, name: nt, state: rt = 'value' }) { + const { current: it } = reactExports.useRef(tt !== void 0), + [ot, at] = reactExports.useState(et), + st = it ? tt : ot, + lt = reactExports.useCallback((ct) => { + it || at(ct) + }, []) + return [st, lt] + } + function useEventCallback(tt) { + const et = reactExports.useRef(tt) + return ( + useEnhancedEffect$1(() => { + et.current = tt + }), + reactExports.useCallback((...nt) => (0, et.current)(...nt), []) + ) + } + function useForkRef(...tt) { + return reactExports.useMemo( + () => + tt.every((et) => et == null) + ? null + : (et) => { + tt.forEach((nt) => { + setRef(nt, et) + }) + }, + tt, + ) + } + let hadKeyboardEvent = !0, + hadFocusVisibleRecently = !1, + hadFocusVisibleRecentlyTimeout + const inputTypesWhitelist = { + text: !0, + search: !0, + url: !0, + tel: !0, + email: !0, + password: !0, + number: !0, + date: !0, + month: !0, + week: !0, + time: !0, + datetime: !0, + 'datetime-local': !0, + } + function focusTriggersKeyboardModality(tt) { + const { type: et, tagName: nt } = tt + return !!( + (nt === 'INPUT' && inputTypesWhitelist[et] && !tt.readOnly) || + (nt === 'TEXTAREA' && !tt.readOnly) || + tt.isContentEditable + ) + } + function handleKeyDown(tt) { + tt.metaKey || tt.altKey || tt.ctrlKey || (hadKeyboardEvent = !0) + } + function handlePointerDown$1() { + hadKeyboardEvent = !1 + } + function handleVisibilityChange() { + this.visibilityState === 'hidden' && hadFocusVisibleRecently && (hadKeyboardEvent = !0) + } + function prepare$1(tt) { + tt.addEventListener('keydown', handleKeyDown, !0), + tt.addEventListener('mousedown', handlePointerDown$1, !0), + tt.addEventListener('pointerdown', handlePointerDown$1, !0), + tt.addEventListener('touchstart', handlePointerDown$1, !0), + tt.addEventListener('visibilitychange', handleVisibilityChange, !0) + } + function isFocusVisible(tt) { + const { target: et } = tt + try { + return et.matches(':focus-visible') + } catch {} + return hadKeyboardEvent || focusTriggersKeyboardModality(et) + } + function useIsFocusVisible() { + const tt = reactExports.useCallback((it) => { + it != null && prepare$1(it.ownerDocument) + }, []), + et = reactExports.useRef(!1) + function nt() { + return et.current + ? ((hadFocusVisibleRecently = !0), + window.clearTimeout(hadFocusVisibleRecentlyTimeout), + (hadFocusVisibleRecentlyTimeout = window.setTimeout(() => { + hadFocusVisibleRecently = !1 + }, 100)), + (et.current = !1), + !0) + : !1 + } + function rt(it) { + return isFocusVisible(it) ? ((et.current = !0), !0) : !1 + } + return { isFocusVisibleRef: et, onFocus: rt, onBlur: nt, ref: tt } + } + function getScrollbarSize(tt) { + const et = tt.documentElement.clientWidth + return Math.abs(window.innerWidth - et) + } + let cachedType + function detectScrollType() { + if (cachedType) return cachedType + const tt = document.createElement('div'), + et = document.createElement('div') + return ( + (et.style.width = '10px'), + (et.style.height = '1px'), + tt.appendChild(et), + (tt.dir = 'rtl'), + (tt.style.fontSize = '14px'), + (tt.style.width = '4px'), + (tt.style.height = '1px'), + (tt.style.position = 'absolute'), + (tt.style.top = '-1000px'), + (tt.style.overflow = 'scroll'), + document.body.appendChild(tt), + (cachedType = 'reverse'), + tt.scrollLeft > 0 + ? (cachedType = 'default') + : ((tt.scrollLeft = 1), tt.scrollLeft === 0 && (cachedType = 'negative')), + document.body.removeChild(tt), + cachedType + ) + } + function getNormalizedScrollLeft(tt, et) { + const nt = tt.scrollLeft + if (et !== 'rtl') return nt + switch (detectScrollType()) { + case 'negative': + return tt.scrollWidth - tt.clientWidth + nt + case 'reverse': + return tt.scrollWidth - tt.clientWidth - nt + default: + return nt + } + } + const visuallyHidden = { + border: 0, + clip: 'rect(0 0 0 0)', + height: '1px', + margin: -1, + overflow: 'hidden', + padding: 0, + position: 'absolute', + whiteSpace: 'nowrap', + width: '1px', + }, + visuallyHidden$1 = visuallyHidden + function resolveProps(tt, et) { + const nt = _extends$u({}, et) + return ( + Object.keys(tt).forEach((rt) => { + if (rt.toString().match(/^(components|slots)$/)) nt[rt] = _extends$u({}, tt[rt], nt[rt]) + else if (rt.toString().match(/^(componentsProps|slotProps)$/)) { + const it = tt[rt] || {}, + ot = et[rt] + ;(nt[rt] = {}), + !ot || !Object.keys(ot) + ? (nt[rt] = it) + : !it || !Object.keys(it) + ? (nt[rt] = ot) + : ((nt[rt] = _extends$u({}, ot)), + Object.keys(it).forEach((at) => { + nt[rt][at] = resolveProps(it[at], ot[at]) + })) + } else nt[rt] === void 0 && (nt[rt] = tt[rt]) + }), + nt + ) + } + function composeClasses(tt, et, nt = void 0) { + const rt = {} + return ( + Object.keys(tt).forEach((it) => { + rt[it] = tt[it] + .reduce((ot, at) => { + if (at) { + const st = et(at) + st !== '' && ot.push(st), nt && nt[at] && ot.push(nt[at]) + } + return ot + }, []) + .join(' ') + }), + rt + ) + } + const defaultGenerator = (tt) => tt, + createClassNameGenerator = () => { + let tt = defaultGenerator + return { + configure(et) { + tt = et + }, + generate(et) { + return tt(et) + }, + reset() { + tt = defaultGenerator + }, + } + }, + ClassNameGenerator = createClassNameGenerator(), + ClassNameGenerator$1 = ClassNameGenerator, + globalStateClassesMapping = { + active: 'active', + checked: 'checked', + completed: 'completed', + disabled: 'disabled', + error: 'error', + expanded: 'expanded', + focused: 'focused', + focusVisible: 'focusVisible', + open: 'open', + readOnly: 'readOnly', + required: 'required', + selected: 'selected', + } + function generateUtilityClass(tt, et, nt = 'Mui') { + const rt = globalStateClassesMapping[et] + return rt ? `${nt}-${rt}` : `${ClassNameGenerator$1.generate(tt)}-${et}` + } + function generateUtilityClasses(tt, et, nt = 'Mui') { + const rt = {} + return ( + et.forEach((it) => { + rt[it] = generateUtilityClass(tt, it, nt) + }), + rt + ) + } + const THEME_ID = '$$material' + function _objectWithoutPropertiesLoose$m(tt, et) { + if (tt == null) return {} + var nt = {}, + rt = Object.keys(tt), + it, + ot + for (ot = 0; ot < rt.length; ot++) (it = rt[ot]), !(et.indexOf(it) >= 0) && (nt[it] = tt[it]) + return nt + } + function sheetForTag(tt) { + if (tt.sheet) return tt.sheet + for (var et = 0; et < document.styleSheets.length; et++) + if (document.styleSheets[et].ownerNode === tt) return document.styleSheets[et] + } + function createStyleElement(tt) { + var et = document.createElement('style') + return ( + et.setAttribute('data-emotion', tt.key), + tt.nonce !== void 0 && et.setAttribute('nonce', tt.nonce), + et.appendChild(document.createTextNode('')), + et.setAttribute('data-s', ''), + et + ) + } + var StyleSheet = (function () { + function tt(nt) { + var rt = this + ;(this._insertTag = function (it) { + var ot + rt.tags.length === 0 + ? rt.insertionPoint + ? (ot = rt.insertionPoint.nextSibling) + : rt.prepend + ? (ot = rt.container.firstChild) + : (ot = rt.before) + : (ot = rt.tags[rt.tags.length - 1].nextSibling), + rt.container.insertBefore(it, ot), + rt.tags.push(it) + }), + (this.isSpeedy = nt.speedy === void 0 ? !0 : nt.speedy), + (this.tags = []), + (this.ctr = 0), + (this.nonce = nt.nonce), + (this.key = nt.key), + (this.container = nt.container), + (this.prepend = nt.prepend), + (this.insertionPoint = nt.insertionPoint), + (this.before = null) + } + var et = tt.prototype + return ( + (et.hydrate = function (rt) { + rt.forEach(this._insertTag) + }), + (et.insert = function (rt) { + this.ctr % (this.isSpeedy ? 65e3 : 1) === 0 && this._insertTag(createStyleElement(this)) + var it = this.tags[this.tags.length - 1] + if (this.isSpeedy) { + var ot = sheetForTag(it) + try { + ot.insertRule(rt, ot.cssRules.length) + } catch {} + } else it.appendChild(document.createTextNode(rt)) + this.ctr++ + }), + (et.flush = function () { + this.tags.forEach(function (rt) { + return rt.parentNode && rt.parentNode.removeChild(rt) + }), + (this.tags = []), + (this.ctr = 0) + }), + tt + ) + })(), + MS = '-ms-', + MOZ = '-moz-', + WEBKIT = '-webkit-', + COMMENT = 'comm', + RULESET = 'rule', + DECLARATION = 'decl', + IMPORT = '@import', + KEYFRAMES = '@keyframes', + LAYER = '@layer', + abs$2 = Math.abs, + from$1 = String.fromCharCode, + assign$3 = Object.assign + function hash$7(tt, et) { + return charat(tt, 0) ^ 45 + ? (((((((et << 2) ^ charat(tt, 0)) << 2) ^ charat(tt, 1)) << 2) ^ charat(tt, 2)) << 2) ^ charat(tt, 3) + : 0 + } + function trim(tt) { + return tt.trim() + } + function match(tt, et) { + return (tt = et.exec(tt)) ? tt[0] : tt + } + function replace(tt, et, nt) { + return tt.replace(et, nt) + } + function indexof(tt, et) { + return tt.indexOf(et) + } + function charat(tt, et) { + return tt.charCodeAt(et) | 0 + } + function substr(tt, et, nt) { + return tt.slice(et, nt) + } + function strlen(tt) { + return tt.length + } + function sizeof(tt) { + return tt.length + } + function append$1(tt, et) { + return et.push(tt), tt + } + function combine$1(tt, et) { + return tt.map(et).join('') + } + var line = 1, + column = 1, + length$1 = 0, + position = 0, + character = 0, + characters = '' + function node$2(tt, et, nt, rt, it, ot, at) { + return { value: tt, root: et, parent: nt, type: rt, props: it, children: ot, line, column, length: at, return: '' } + } + function copy$3(tt, et) { + return assign$3(node$2('', null, null, '', null, null, 0), tt, { length: -tt.length }, et) + } + function char() { + return character + } + function prev$1() { + return ( + (character = position > 0 ? charat(characters, --position) : 0), + column--, + character === 10 && ((column = 1), line--), + character + ) + } + function next() { + return ( + (character = position < length$1 ? charat(characters, position++) : 0), + column++, + character === 10 && ((column = 1), line++), + character + ) + } + function peek() { + return charat(characters, position) + } + function caret() { + return position + } + function slice$1(tt, et) { + return substr(characters, tt, et) + } + function token$1(tt) { + switch (tt) { + case 0: + case 9: + case 10: + case 13: + case 32: + return 5 + case 33: + case 43: + case 44: + case 47: + case 62: + case 64: + case 126: + case 59: + case 123: + case 125: + return 4 + case 58: + return 3 + case 34: + case 39: + case 40: + case 91: + return 2 + case 41: + case 93: + return 1 + } + return 0 + } + function alloc(tt) { + return (line = column = 1), (length$1 = strlen((characters = tt))), (position = 0), [] + } + function dealloc(tt) { + return (characters = ''), tt + } + function delimit(tt) { + return trim(slice$1(position - 1, delimiter(tt === 91 ? tt + 2 : tt === 40 ? tt + 1 : tt))) + } + function whitespace(tt) { + for (; (character = peek()) && character < 33; ) next() + return token$1(tt) > 2 || token$1(character) > 3 ? '' : ' ' + } + function escaping(tt, et) { + for ( + ; + --et && + next() && + !(character < 48 || character > 102 || (character > 57 && character < 65) || (character > 70 && character < 97)); + + ); + return slice$1(tt, caret() + (et < 6 && peek() == 32 && next() == 32)) + } + function delimiter(tt) { + for (; next(); ) + switch (character) { + case tt: + return position + case 34: + case 39: + tt !== 34 && tt !== 39 && delimiter(character) + break + case 40: + tt === 41 && delimiter(tt) + break + case 92: + next() + break + } + return position + } + function commenter(tt, et) { + for (; next() && tt + character !== 47 + 10; ) if (tt + character === 42 + 42 && peek() === 47) break + return '/*' + slice$1(et, position - 1) + '*' + from$1(tt === 47 ? tt : next()) + } + function identifier$1(tt) { + for (; !token$1(peek()); ) next() + return slice$1(tt, position) + } + function compile$1(tt) { + return dealloc(parse$1('', null, null, null, [''], (tt = alloc(tt)), 0, [0], tt)) + } + function parse$1(tt, et, nt, rt, it, ot, at, st, lt) { + for ( + var ct = 0, + ut = 0, + ht = at, + dt = 0, + pt = 0, + mt = 0, + gt = 1, + yt = 1, + bt = 1, + vt = 0, + xt = '', + kt = it, + St = ot, + Tt = rt, + At = xt; + yt; + + ) + switch (((mt = vt), (vt = next()))) { + case 40: + if (mt != 108 && charat(At, ht - 1) == 58) { + indexof((At += replace(delimit(vt), '&', '&\f')), '&\f') != -1 && (bt = -1) + break + } + case 34: + case 39: + case 91: + At += delimit(vt) + break + case 9: + case 10: + case 13: + case 32: + At += whitespace(mt) + break + case 92: + At += escaping(caret() - 1, 7) + continue + case 47: + switch (peek()) { + case 42: + case 47: + append$1(comment(commenter(next(), caret()), et, nt), lt) + break + default: + At += '/' + } + break + case 123 * gt: + st[ct++] = strlen(At) * bt + case 125 * gt: + case 59: + case 0: + switch (vt) { + case 0: + case 125: + yt = 0 + case 59 + ut: + bt == -1 && (At = replace(At, /\f/g, '')), + pt > 0 && + strlen(At) - ht && + append$1( + pt > 32 + ? declaration(At + ';', rt, nt, ht - 1) + : declaration(replace(At, ' ', '') + ';', rt, nt, ht - 2), + lt, + ) + break + case 59: + At += ';' + default: + if ((append$1((Tt = ruleset(At, et, nt, ct, ut, it, st, xt, (kt = []), (St = []), ht)), ot), vt === 123)) + if (ut === 0) parse$1(At, et, Tt, Tt, kt, ot, ht, st, St) + else + switch (dt === 99 && charat(At, 3) === 110 ? 100 : dt) { + case 100: + case 108: + case 109: + case 115: + parse$1( + tt, + Tt, + Tt, + rt && append$1(ruleset(tt, Tt, Tt, 0, 0, it, st, xt, it, (kt = []), ht), St), + it, + St, + ht, + st, + rt ? kt : St, + ) + break + default: + parse$1(At, Tt, Tt, Tt, [''], St, 0, st, St) + } + } + ;(ct = ut = pt = 0), (gt = bt = 1), (xt = At = ''), (ht = at) + break + case 58: + ;(ht = 1 + strlen(At)), (pt = mt) + default: + if (gt < 1) { + if (vt == 123) --gt + else if (vt == 125 && gt++ == 0 && prev$1() == 125) continue + } + switch (((At += from$1(vt)), vt * gt)) { + case 38: + bt = ut > 0 ? 1 : ((At += '\f'), -1) + break + case 44: + ;(st[ct++] = (strlen(At) - 1) * bt), (bt = 1) + break + case 64: + peek() === 45 && (At += delimit(next())), + (dt = peek()), + (ut = ht = strlen((xt = At += identifier$1(caret())))), + vt++ + break + case 45: + mt === 45 && strlen(At) == 2 && (gt = 0) + } + } + return ot + } + function ruleset(tt, et, nt, rt, it, ot, at, st, lt, ct, ut) { + for (var ht = it - 1, dt = it === 0 ? ot : [''], pt = sizeof(dt), mt = 0, gt = 0, yt = 0; mt < rt; ++mt) + for (var bt = 0, vt = substr(tt, ht + 1, (ht = abs$2((gt = at[mt])))), xt = tt; bt < pt; ++bt) + (xt = trim(gt > 0 ? dt[bt] + ' ' + vt : replace(vt, /&\f/g, dt[bt]))) && (lt[yt++] = xt) + return node$2(tt, et, nt, it === 0 ? RULESET : st, lt, ct, ut) + } + function comment(tt, et, nt) { + return node$2(tt, et, nt, COMMENT, from$1(char()), substr(tt, 2, -2), 0) + } + function declaration(tt, et, nt, rt) { + return node$2(tt, et, nt, DECLARATION, substr(tt, 0, rt), substr(tt, rt + 1, -1), rt) + } + function serialize(tt, et) { + for (var nt = '', rt = sizeof(tt), it = 0; it < rt; it++) nt += et(tt[it], it, tt, et) || '' + return nt + } + function stringify$1(tt, et, nt, rt) { + switch (tt.type) { + case LAYER: + if (tt.children.length) break + case IMPORT: + case DECLARATION: + return (tt.return = tt.return || tt.value) + case COMMENT: + return '' + case KEYFRAMES: + return (tt.return = tt.value + '{' + serialize(tt.children, rt) + '}') + case RULESET: + tt.value = tt.props.join(',') + } + return strlen((nt = serialize(tt.children, rt))) ? (tt.return = tt.value + '{' + nt + '}') : '' + } + function middleware(tt) { + var et = sizeof(tt) + return function (nt, rt, it, ot) { + for (var at = '', st = 0; st < et; st++) at += tt[st](nt, rt, it, ot) || '' + return at + } + } + function rulesheet(tt) { + return function (et) { + et.root || ((et = et.return) && tt(et)) + } + } + var identifierWithPointTracking = function (et, nt, rt) { + for (var it = 0, ot = 0; (it = ot), (ot = peek()), it === 38 && ot === 12 && (nt[rt] = 1), !token$1(ot); ) next() + return slice$1(et, position) + }, + toRules = function (et, nt) { + var rt = -1, + it = 44 + do + switch (token$1(it)) { + case 0: + it === 38 && peek() === 12 && (nt[rt] = 1), (et[rt] += identifierWithPointTracking(position - 1, nt, rt)) + break + case 2: + et[rt] += delimit(it) + break + case 4: + if (it === 44) { + ;(et[++rt] = peek() === 58 ? '&\f' : ''), (nt[rt] = et[rt].length) + break + } + default: + et[rt] += from$1(it) + } + while ((it = next())) + return et + }, + getRules = function (et, nt) { + return dealloc(toRules(alloc(et), nt)) + }, + fixedElements = new WeakMap(), + compat$1 = function (et) { + if (!(et.type !== 'rule' || !et.parent || et.length < 1)) { + for ( + var nt = et.value, rt = et.parent, it = et.column === rt.column && et.line === rt.line; + rt.type !== 'rule'; + + ) + if (((rt = rt.parent), !rt)) return + if (!(et.props.length === 1 && nt.charCodeAt(0) !== 58 && !fixedElements.get(rt)) && !it) { + fixedElements.set(et, !0) + for (var ot = [], at = getRules(nt, ot), st = rt.props, lt = 0, ct = 0; lt < at.length; lt++) + for (var ut = 0; ut < st.length; ut++, ct++) + et.props[ct] = ot[lt] ? at[lt].replace(/&\f/g, st[ut]) : st[ut] + ' ' + at[lt] + } + } + }, + removeLabel = function (et) { + if (et.type === 'decl') { + var nt = et.value + nt.charCodeAt(0) === 108 && nt.charCodeAt(2) === 98 && ((et.return = ''), (et.value = '')) + } + } + function prefix$1(tt, et) { + switch (hash$7(tt, et)) { + case 5103: + return WEBKIT + 'print-' + tt + tt + case 5737: + case 4201: + case 3177: + case 3433: + case 1641: + case 4457: + case 2921: + case 5572: + case 6356: + case 5844: + case 3191: + case 6645: + case 3005: + case 6391: + case 5879: + case 5623: + case 6135: + case 4599: + case 4855: + case 4215: + case 6389: + case 5109: + case 5365: + case 5621: + case 3829: + return WEBKIT + tt + tt + case 5349: + case 4246: + case 4810: + case 6968: + case 2756: + return WEBKIT + tt + MOZ + tt + MS + tt + tt + case 6828: + case 4268: + return WEBKIT + tt + MS + tt + tt + case 6165: + return WEBKIT + tt + MS + 'flex-' + tt + tt + case 5187: + return WEBKIT + tt + replace(tt, /(\w+).+(:[^]+)/, WEBKIT + 'box-$1$2' + MS + 'flex-$1$2') + tt + case 5443: + return WEBKIT + tt + MS + 'flex-item-' + replace(tt, /flex-|-self/, '') + tt + case 4675: + return WEBKIT + tt + MS + 'flex-line-pack' + replace(tt, /align-content|flex-|-self/, '') + tt + case 5548: + return WEBKIT + tt + MS + replace(tt, 'shrink', 'negative') + tt + case 5292: + return WEBKIT + tt + MS + replace(tt, 'basis', 'preferred-size') + tt + case 6060: + return WEBKIT + 'box-' + replace(tt, '-grow', '') + WEBKIT + tt + MS + replace(tt, 'grow', 'positive') + tt + case 4554: + return WEBKIT + replace(tt, /([^-])(transform)/g, '$1' + WEBKIT + '$2') + tt + case 6187: + return replace(replace(replace(tt, /(zoom-|grab)/, WEBKIT + '$1'), /(image-set)/, WEBKIT + '$1'), tt, '') + tt + case 5495: + case 3959: + return replace(tt, /(image-set\([^]*)/, WEBKIT + '$1$`$1') + case 4968: + return ( + replace( + replace(tt, /(.+:)(flex-)?(.*)/, WEBKIT + 'box-pack:$3' + MS + 'flex-pack:$3'), + /s.+-b[^;]+/, + 'justify', + ) + + WEBKIT + + tt + + tt + ) + case 4095: + case 3583: + case 4068: + case 2532: + return replace(tt, /(.+)-inline(.+)/, WEBKIT + '$1$2') + tt + case 8116: + case 7059: + case 5753: + case 5535: + case 5445: + case 5701: + case 4933: + case 4677: + case 5533: + case 5789: + case 5021: + case 4765: + if (strlen(tt) - 1 - et > 6) + switch (charat(tt, et + 1)) { + case 109: + if (charat(tt, et + 4) !== 45) break + case 102: + return ( + replace( + tt, + /(.+:)(.+)-([^]+)/, + '$1' + WEBKIT + '$2-$3$1' + MOZ + (charat(tt, et + 3) == 108 ? '$3' : '$2-$3'), + ) + tt + ) + case 115: + return ~indexof(tt, 'stretch') ? prefix$1(replace(tt, 'stretch', 'fill-available'), et) + tt : tt + } + break + case 4949: + if (charat(tt, et + 1) !== 115) break + case 6444: + switch (charat(tt, strlen(tt) - 3 - (~indexof(tt, '!important') && 10))) { + case 107: + return replace(tt, ':', ':' + WEBKIT) + tt + case 101: + return ( + replace( + tt, + /(.+:)([^;!]+)(;|!.+)?/, + '$1' + + WEBKIT + + (charat(tt, 14) === 45 ? 'inline-' : '') + + 'box$3$1' + + WEBKIT + + '$2$3$1' + + MS + + '$2box$3', + ) + tt + ) + } + break + case 5936: + switch (charat(tt, et + 11)) { + case 114: + return WEBKIT + tt + MS + replace(tt, /[svh]\w+-[tblr]{2}/, 'tb') + tt + case 108: + return WEBKIT + tt + MS + replace(tt, /[svh]\w+-[tblr]{2}/, 'tb-rl') + tt + case 45: + return WEBKIT + tt + MS + replace(tt, /[svh]\w+-[tblr]{2}/, 'lr') + tt + } + return WEBKIT + tt + MS + tt + tt + } + return tt + } + var prefixer = function (et, nt, rt, it) { + if (et.length > -1 && !et.return) + switch (et.type) { + case DECLARATION: + et.return = prefix$1(et.value, et.length) + break + case KEYFRAMES: + return serialize([copy$3(et, { value: replace(et.value, '@', '@' + WEBKIT) })], it) + case RULESET: + if (et.length) + return combine$1(et.props, function (ot) { + switch (match(ot, /(::plac\w+|:read-\w+)/)) { + case ':read-only': + case ':read-write': + return serialize([copy$3(et, { props: [replace(ot, /:(read-\w+)/, ':' + MOZ + '$1')] })], it) + case '::placeholder': + return serialize( + [ + copy$3(et, { props: [replace(ot, /:(plac\w+)/, ':' + WEBKIT + 'input-$1')] }), + copy$3(et, { props: [replace(ot, /:(plac\w+)/, ':' + MOZ + '$1')] }), + copy$3(et, { props: [replace(ot, /:(plac\w+)/, MS + 'input-$1')] }), + ], + it, + ) + } + return '' + }) + } + }, + defaultStylisPlugins = [prefixer], + createCache = function (et) { + var nt = et.key + if (nt === 'css') { + var rt = document.querySelectorAll('style[data-emotion]:not([data-s])') + Array.prototype.forEach.call(rt, function (gt) { + var yt = gt.getAttribute('data-emotion') + yt.indexOf(' ') !== -1 && (document.head.appendChild(gt), gt.setAttribute('data-s', '')) + }) + } + var it = et.stylisPlugins || defaultStylisPlugins, + ot = {}, + at, + st = [] + ;(at = et.container || document.head), + Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="' + nt + ' "]'), function (gt) { + for (var yt = gt.getAttribute('data-emotion').split(' '), bt = 1; bt < yt.length; bt++) ot[yt[bt]] = !0 + st.push(gt) + }) + var lt, + ct = [compat$1, removeLabel] + { + var ut, + ht = [ + stringify$1, + rulesheet(function (gt) { + ut.insert(gt) + }), + ], + dt = middleware(ct.concat(it, ht)), + pt = function (yt) { + return serialize(compile$1(yt), dt) + } + lt = function (yt, bt, vt, xt) { + ;(ut = vt), pt(yt ? yt + '{' + bt.styles + '}' : bt.styles), xt && (mt.inserted[bt.name] = !0) + } + } + var mt = { + key: nt, + sheet: new StyleSheet({ + key: nt, + container: at, + nonce: et.nonce, + speedy: et.speedy, + prepend: et.prepend, + insertionPoint: et.insertionPoint, + }), + nonce: et.nonce, + inserted: ot, + registered: {}, + insert: lt, + } + return mt.sheet.hydrate(st), mt + }, + isBrowser$1 = !0 + function getRegisteredStyles(tt, et, nt) { + var rt = '' + return ( + nt.split(' ').forEach(function (it) { + tt[it] !== void 0 ? et.push(tt[it] + ';') : (rt += it + ' ') + }), + rt + ) + } + var registerStyles = function (et, nt, rt) { + var it = et.key + '-' + nt.name + ;(rt === !1 || isBrowser$1 === !1) && et.registered[it] === void 0 && (et.registered[it] = nt.styles) + }, + insertStyles = function (et, nt, rt) { + registerStyles(et, nt, rt) + var it = et.key + '-' + nt.name + if (et.inserted[nt.name] === void 0) { + var ot = nt + do et.insert(nt === ot ? '.' + it : '', ot, et.sheet, !0), (ot = ot.next) + while (ot !== void 0) + } + } + function murmur2(tt) { + for (var et = 0, nt, rt = 0, it = tt.length; it >= 4; ++rt, it -= 4) + (nt = + (tt.charCodeAt(rt) & 255) | + ((tt.charCodeAt(++rt) & 255) << 8) | + ((tt.charCodeAt(++rt) & 255) << 16) | + ((tt.charCodeAt(++rt) & 255) << 24)), + (nt = (nt & 65535) * 1540483477 + (((nt >>> 16) * 59797) << 16)), + (nt ^= nt >>> 24), + (et = + ((nt & 65535) * 1540483477 + (((nt >>> 16) * 59797) << 16)) ^ + ((et & 65535) * 1540483477 + (((et >>> 16) * 59797) << 16))) + switch (it) { + case 3: + et ^= (tt.charCodeAt(rt + 2) & 255) << 16 + case 2: + et ^= (tt.charCodeAt(rt + 1) & 255) << 8 + case 1: + ;(et ^= tt.charCodeAt(rt) & 255), (et = (et & 65535) * 1540483477 + (((et >>> 16) * 59797) << 16)) + } + return ( + (et ^= et >>> 13), + (et = (et & 65535) * 1540483477 + (((et >>> 16) * 59797) << 16)), + ((et ^ (et >>> 15)) >>> 0).toString(36) + ) + } + var unitlessKeys = { + animationIterationCount: 1, + aspectRatio: 1, + borderImageOutset: 1, + borderImageSlice: 1, + borderImageWidth: 1, + boxFlex: 1, + boxFlexGroup: 1, + boxOrdinalGroup: 1, + columnCount: 1, + columns: 1, + flex: 1, + flexGrow: 1, + flexPositive: 1, + flexShrink: 1, + flexNegative: 1, + flexOrder: 1, + gridRow: 1, + gridRowEnd: 1, + gridRowSpan: 1, + gridRowStart: 1, + gridColumn: 1, + gridColumnEnd: 1, + gridColumnSpan: 1, + gridColumnStart: 1, + msGridRow: 1, + msGridRowSpan: 1, + msGridColumn: 1, + msGridColumnSpan: 1, + fontWeight: 1, + lineHeight: 1, + opacity: 1, + order: 1, + orphans: 1, + tabSize: 1, + widows: 1, + zIndex: 1, + zoom: 1, + WebkitLineClamp: 1, + fillOpacity: 1, + floodOpacity: 1, + stopOpacity: 1, + strokeDasharray: 1, + strokeDashoffset: 1, + strokeMiterlimit: 1, + strokeOpacity: 1, + strokeWidth: 1, + }, + hyphenateRegex = /[A-Z]|^ms/g, + animationRegex = /_EMO_([^_]+?)_([^]*?)_EMO_/g, + isCustomProperty = function (et) { + return et.charCodeAt(1) === 45 + }, + isProcessableValue = function (et) { + return et != null && typeof et != 'boolean' + }, + processStyleName = memoize$4(function (tt) { + return isCustomProperty(tt) ? tt : tt.replace(hyphenateRegex, '-$&').toLowerCase() + }), + processStyleValue = function (et, nt) { + switch (et) { + case 'animation': + case 'animationName': + if (typeof nt == 'string') + return nt.replace(animationRegex, function (rt, it, ot) { + return (cursor = { name: it, styles: ot, next: cursor }), it + }) + } + return unitlessKeys[et] !== 1 && !isCustomProperty(et) && typeof nt == 'number' && nt !== 0 ? nt + 'px' : nt + }, + noComponentSelectorMessage = + 'Component selectors can only be used in conjunction with @emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware compiler transform.' + function handleInterpolation(tt, et, nt) { + if (nt == null) return '' + if (nt.__emotion_styles !== void 0) return nt + switch (typeof nt) { + case 'boolean': + return '' + case 'object': { + if (nt.anim === 1) return (cursor = { name: nt.name, styles: nt.styles, next: cursor }), nt.name + if (nt.styles !== void 0) { + var rt = nt.next + if (rt !== void 0) + for (; rt !== void 0; ) (cursor = { name: rt.name, styles: rt.styles, next: cursor }), (rt = rt.next) + var it = nt.styles + ';' + return it + } + return createStringFromObject(tt, et, nt) + } + case 'function': { + if (tt !== void 0) { + var ot = cursor, + at = nt(tt) + return (cursor = ot), handleInterpolation(tt, et, at) + } + break + } + } + if (et == null) return nt + var st = et[nt] + return st !== void 0 ? st : nt + } + function createStringFromObject(tt, et, nt) { + var rt = '' + if (Array.isArray(nt)) for (var it = 0; it < nt.length; it++) rt += handleInterpolation(tt, et, nt[it]) + ';' + else + for (var ot in nt) { + var at = nt[ot] + if (typeof at != 'object') + et != null && et[at] !== void 0 + ? (rt += ot + '{' + et[at] + '}') + : isProcessableValue(at) && (rt += processStyleName(ot) + ':' + processStyleValue(ot, at) + ';') + else if (Array.isArray(at) && typeof at[0] == 'string' && (et == null || et[at[0]] === void 0)) + for (var st = 0; st < at.length; st++) + isProcessableValue(at[st]) && (rt += processStyleName(ot) + ':' + processStyleValue(ot, at[st]) + ';') + else { + var lt = handleInterpolation(tt, et, at) + switch (ot) { + case 'animation': + case 'animationName': { + rt += processStyleName(ot) + ':' + lt + ';' + break + } + default: + rt += ot + '{' + lt + '}' + } + } + } + return rt + } + var labelPattern = /label:\s*([^\s;\n{]+)\s*(;|$)/g, + cursor, + serializeStyles = function (et, nt, rt) { + if (et.length === 1 && typeof et[0] == 'object' && et[0] !== null && et[0].styles !== void 0) return et[0] + var it = !0, + ot = '' + cursor = void 0 + var at = et[0] + at == null || at.raw === void 0 ? ((it = !1), (ot += handleInterpolation(rt, nt, at))) : (ot += at[0]) + for (var st = 1; st < et.length; st++) (ot += handleInterpolation(rt, nt, et[st])), it && (ot += at[st]) + labelPattern.lastIndex = 0 + for (var lt = '', ct; (ct = labelPattern.exec(ot)) !== null; ) lt += '-' + ct[1] + var ut = murmur2(ot) + lt + return { name: ut, styles: ot, next: cursor } + }, + syncFallback = function (et) { + return et() + }, + useInsertionEffect = React$2['useInsertionEffect'] ? React$2['useInsertionEffect'] : !1, + useInsertionEffectAlwaysWithSyncFallback = useInsertionEffect || syncFallback, + useInsertionEffectWithLayoutFallback = useInsertionEffect || reactExports.useLayoutEffect, + EmotionCacheContext = reactExports.createContext(typeof HTMLElement < 'u' ? createCache({ key: 'css' }) : null), + CacheProvider = EmotionCacheContext.Provider, + withEmotionCache = function (et) { + return reactExports.forwardRef(function (nt, rt) { + var it = reactExports.useContext(EmotionCacheContext) + return et(nt, it, rt) + }) + }, + ThemeContext$2 = reactExports.createContext({}), + Global$1 = withEmotionCache(function (tt, et) { + var nt = tt.styles, + rt = serializeStyles([nt], void 0, reactExports.useContext(ThemeContext$2)), + it = reactExports.useRef() + return ( + useInsertionEffectWithLayoutFallback( + function () { + var ot = et.key + '-global', + at = new et.sheet.constructor({ + key: ot, + nonce: et.sheet.nonce, + container: et.sheet.container, + speedy: et.sheet.isSpeedy, + }), + st = !1, + lt = document.querySelector('style[data-emotion="' + ot + ' ' + rt.name + '"]') + return ( + et.sheet.tags.length && (at.before = et.sheet.tags[0]), + lt !== null && ((st = !0), lt.setAttribute('data-emotion', ot), at.hydrate([lt])), + (it.current = [at, st]), + function () { + at.flush() + } + ) + }, + [et], + ), + useInsertionEffectWithLayoutFallback( + function () { + var ot = it.current, + at = ot[0], + st = ot[1] + if (st) { + ot[1] = !1 + return + } + if ((rt.next !== void 0 && insertStyles(et, rt.next, !0), at.tags.length)) { + var lt = at.tags[at.tags.length - 1].nextElementSibling + ;(at.before = lt), at.flush() + } + et.insert('', rt, at, !1) + }, + [et, rt.name], + ), + null + ) + }) + function css() { + for (var tt = arguments.length, et = new Array(tt), nt = 0; nt < tt; nt++) et[nt] = arguments[nt] + return serializeStyles(et) + } + var keyframes = function () { + var et = css.apply(void 0, arguments), + nt = 'animation-' + et.name + return { + name: nt, + styles: '@keyframes ' + nt + '{' + et.styles + '}', + anim: 1, + toString: function () { + return '_EMO_' + this.name + '_' + this.styles + '_EMO_' + }, + } + }, + testOmitPropsOnStringTag = isPropValid, + testOmitPropsOnComponent = function (et) { + return et !== 'theme' + }, + getDefaultShouldForwardProp = function (et) { + return typeof et == 'string' && et.charCodeAt(0) > 96 ? testOmitPropsOnStringTag : testOmitPropsOnComponent + }, + composeShouldForwardProps = function (et, nt, rt) { + var it + if (nt) { + var ot = nt.shouldForwardProp + it = + et.__emotion_forwardProp && ot + ? function (at) { + return et.__emotion_forwardProp(at) && ot(at) + } + : ot + } + return typeof it != 'function' && rt && (it = et.__emotion_forwardProp), it + }, + Insertion = function (et) { + var nt = et.cache, + rt = et.serialized, + it = et.isStringTag + return ( + registerStyles(nt, rt, it), + useInsertionEffectAlwaysWithSyncFallback(function () { + return insertStyles(nt, rt, it) + }), + null + ) + }, + createStyled$1 = function tt(et, nt) { + var rt = et.__emotion_real === et, + it = (rt && et.__emotion_base) || et, + ot, + at + nt !== void 0 && ((ot = nt.label), (at = nt.target)) + var st = composeShouldForwardProps(et, nt, rt), + lt = st || getDefaultShouldForwardProp(it), + ct = !lt('as') + return function () { + var ut = arguments, + ht = rt && et.__emotion_styles !== void 0 ? et.__emotion_styles.slice(0) : [] + if ((ot !== void 0 && ht.push('label:' + ot + ';'), ut[0] == null || ut[0].raw === void 0)) + ht.push.apply(ht, ut) + else { + ht.push(ut[0][0]) + for (var dt = ut.length, pt = 1; pt < dt; pt++) ht.push(ut[pt], ut[0][pt]) + } + var mt = withEmotionCache(function (gt, yt, bt) { + var vt = (ct && gt.as) || it, + xt = '', + kt = [], + St = gt + if (gt.theme == null) { + St = {} + for (var Tt in gt) St[Tt] = gt[Tt] + St.theme = reactExports.useContext(ThemeContext$2) + } + typeof gt.className == 'string' + ? (xt = getRegisteredStyles(yt.registered, kt, gt.className)) + : gt.className != null && (xt = gt.className + ' ') + var At = serializeStyles(ht.concat(kt), yt.registered, St) + ;(xt += yt.key + '-' + At.name), at !== void 0 && (xt += ' ' + at) + var Et = ct && st === void 0 ? getDefaultShouldForwardProp(vt) : lt, + $t = {} + for (var Dt in gt) (ct && Dt === 'as') || (Et(Dt) && ($t[Dt] = gt[Dt])) + return ( + ($t.className = xt), + ($t.ref = bt), + reactExports.createElement( + reactExports.Fragment, + null, + reactExports.createElement(Insertion, { cache: yt, serialized: At, isStringTag: typeof vt == 'string' }), + reactExports.createElement(vt, $t), + ) + ) + }) + return ( + (mt.displayName = + ot !== void 0 + ? ot + : 'Styled(' + (typeof it == 'string' ? it : it.displayName || it.name || 'Component') + ')'), + (mt.defaultProps = et.defaultProps), + (mt.__emotion_real = mt), + (mt.__emotion_base = it), + (mt.__emotion_styles = ht), + (mt.__emotion_forwardProp = st), + Object.defineProperty(mt, 'toString', { + value: function () { + return '.' + at + }, + }), + (mt.withComponent = function (gt, yt) { + return tt(gt, _extends$u({}, nt, yt, { shouldForwardProp: composeShouldForwardProps(mt, yt, !0) })).apply( + void 0, + ht, + ) + }), + mt + ) + } + } + const emotionStyledBase_browser_esm = Object.freeze( + Object.defineProperty({ __proto__: null, default: createStyled$1 }, Symbol.toStringTag, { value: 'Module' }), + ) + var tags$1 = [ + 'a', + 'abbr', + 'address', + 'area', + 'article', + 'aside', + 'audio', + 'b', + 'base', + 'bdi', + 'bdo', + 'big', + 'blockquote', + 'body', + 'br', + 'button', + 'canvas', + 'caption', + 'cite', + 'code', + 'col', + 'colgroup', + 'data', + 'datalist', + 'dd', + 'del', + 'details', + 'dfn', + 'dialog', + 'div', + 'dl', + 'dt', + 'em', + 'embed', + 'fieldset', + 'figcaption', + 'figure', + 'footer', + 'form', + 'h1', + 'h2', + 'h3', + 'h4', + 'h5', + 'h6', + 'head', + 'header', + 'hgroup', + 'hr', + 'html', + 'i', + 'iframe', + 'img', + 'input', + 'ins', + 'kbd', + 'keygen', + 'label', + 'legend', + 'li', + 'link', + 'main', + 'map', + 'mark', + 'marquee', + 'menu', + 'menuitem', + 'meta', + 'meter', + 'nav', + 'noscript', + 'object', + 'ol', + 'optgroup', + 'option', + 'output', + 'p', + 'param', + 'picture', + 'pre', + 'progress', + 'q', + 'rp', + 'rt', + 'ruby', + 's', + 'samp', + 'script', + 'section', + 'select', + 'small', + 'source', + 'span', + 'strong', + 'style', + 'sub', + 'summary', + 'sup', + 'table', + 'tbody', + 'td', + 'textarea', + 'tfoot', + 'th', + 'thead', + 'time', + 'title', + 'tr', + 'track', + 'u', + 'ul', + 'var', + 'video', + 'wbr', + 'circle', + 'clipPath', + 'defs', + 'ellipse', + 'foreignObject', + 'g', + 'image', + 'line', + 'linearGradient', + 'mask', + 'path', + 'pattern', + 'polygon', + 'polyline', + 'radialGradient', + 'rect', + 'stop', + 'svg', + 'text', + 'tspan', + ], + newStyled = createStyled$1.bind() + tags$1.forEach(function (tt) { + newStyled[tt] = newStyled(tt) + }) + let cache$2 + typeof document == 'object' && (cache$2 = createCache({ key: 'css', prepend: !0 })) + function StyledEngineProvider(tt) { + const { injectFirst: et, children: nt } = tt + return et && cache$2 ? jsxRuntimeExports.jsx(CacheProvider, { value: cache$2, children: nt }) : nt + } + function isEmpty$4(tt) { + return tt == null || Object.keys(tt).length === 0 + } + function GlobalStyles$2(tt) { + const { styles: et, defaultTheme: nt = {} } = tt, + rt = typeof et == 'function' ? (it) => et(isEmpty$4(it) ? nt : it) : et + return jsxRuntimeExports.jsx(Global$1, { styles: rt }) + } + /** + * @mui/styled-engine v5.14.13 + * + * @license MIT + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ function styled$3(tt, et) { + return newStyled(tt, et) + } + const internal_processStyles = (tt, et) => { + Array.isArray(tt.__emotion_styles) && (tt.__emotion_styles = et(tt.__emotion_styles)) + }, + _excluded$1K = ['values', 'unit', 'step'], + sortBreakpointsValues = (tt) => { + const et = Object.keys(tt).map((nt) => ({ key: nt, val: tt[nt] })) || [] + return et.sort((nt, rt) => nt.val - rt.val), et.reduce((nt, rt) => _extends$u({}, nt, { [rt.key]: rt.val }), {}) + } + function createBreakpoints(tt) { + const { values: et = { xs: 0, sm: 600, md: 900, lg: 1200, xl: 1536 }, unit: nt = 'px', step: rt = 5 } = tt, + it = _objectWithoutPropertiesLoose$m(tt, _excluded$1K), + ot = sortBreakpointsValues(et), + at = Object.keys(ot) + function st(dt) { + return `@media (min-width:${typeof et[dt] == 'number' ? et[dt] : dt}${nt})` + } + function lt(dt) { + return `@media (max-width:${(typeof et[dt] == 'number' ? et[dt] : dt) - rt / 100}${nt})` + } + function ct(dt, pt) { + const mt = at.indexOf(pt) + return `@media (min-width:${typeof et[dt] == 'number' ? et[dt] : dt}${nt}) and (max-width:${ + (mt !== -1 && typeof et[at[mt]] == 'number' ? et[at[mt]] : pt) - rt / 100 + }${nt})` + } + function ut(dt) { + return at.indexOf(dt) + 1 < at.length ? ct(dt, at[at.indexOf(dt) + 1]) : st(dt) + } + function ht(dt) { + const pt = at.indexOf(dt) + return pt === 0 + ? st(at[1]) + : pt === at.length - 1 + ? lt(at[pt]) + : ct(dt, at[at.indexOf(dt) + 1]).replace('@media', '@media not all and') + } + return _extends$u({ keys: at, values: ot, up: st, down: lt, between: ct, only: ut, not: ht, unit: nt }, it) + } + const shape$1 = { borderRadius: 4 }, + shape$2 = shape$1 + function merge(tt, et) { + return et ? deepmerge$1(tt, et, { clone: !1 }) : tt + } + const values$1 = { xs: 0, sm: 600, md: 900, lg: 1200, xl: 1536 }, + defaultBreakpoints = { keys: ['xs', 'sm', 'md', 'lg', 'xl'], up: (tt) => `@media (min-width:${values$1[tt]}px)` } + function handleBreakpoints(tt, et, nt) { + const rt = tt.theme || {} + if (Array.isArray(et)) { + const ot = rt.breakpoints || defaultBreakpoints + return et.reduce((at, st, lt) => ((at[ot.up(ot.keys[lt])] = nt(et[lt])), at), {}) + } + if (typeof et == 'object') { + const ot = rt.breakpoints || defaultBreakpoints + return Object.keys(et).reduce((at, st) => { + if (Object.keys(ot.values || values$1).indexOf(st) !== -1) { + const lt = ot.up(st) + at[lt] = nt(et[st], st) + } else { + const lt = st + at[lt] = et[lt] + } + return at + }, {}) + } + return nt(et) + } + function createEmptyBreakpointObject(tt = {}) { + var et + return ( + ((et = tt.keys) == null + ? void 0 + : et.reduce((rt, it) => { + const ot = tt.up(it) + return (rt[ot] = {}), rt + }, {})) || {} + ) + } + function removeUnusedBreakpoints(tt, et) { + return tt.reduce((nt, rt) => { + const it = nt[rt] + return (!it || Object.keys(it).length === 0) && delete nt[rt], nt + }, et) + } + function mergeBreakpointsInOrder(tt, ...et) { + const nt = createEmptyBreakpointObject(tt), + rt = [nt, ...et].reduce((it, ot) => deepmerge$1(it, ot), {}) + return removeUnusedBreakpoints(Object.keys(nt), rt) + } + function computeBreakpointsBase(tt, et) { + if (typeof tt != 'object') return {} + const nt = {}, + rt = Object.keys(et) + return ( + Array.isArray(tt) + ? rt.forEach((it, ot) => { + ot < tt.length && (nt[it] = !0) + }) + : rt.forEach((it) => { + tt[it] != null && (nt[it] = !0) + }), + nt + ) + } + function resolveBreakpointValues({ values: tt, breakpoints: et, base: nt }) { + const rt = nt || computeBreakpointsBase(tt, et), + it = Object.keys(rt) + if (it.length === 0) return tt + let ot + return it.reduce( + (at, st, lt) => ( + Array.isArray(tt) + ? ((at[st] = tt[lt] != null ? tt[lt] : tt[ot]), (ot = lt)) + : typeof tt == 'object' + ? ((at[st] = tt[st] != null ? tt[st] : tt[ot]), (ot = st)) + : (at[st] = tt), + at + ), + {}, + ) + } + function getPath$2(tt, et, nt = !0) { + if (!et || typeof et != 'string') return null + if (tt && tt.vars && nt) { + const rt = `vars.${et}`.split('.').reduce((it, ot) => (it && it[ot] ? it[ot] : null), tt) + if (rt != null) return rt + } + return et.split('.').reduce((rt, it) => (rt && rt[it] != null ? rt[it] : null), tt) + } + function getStyleValue$1(tt, et, nt, rt = nt) { + let it + return ( + typeof tt == 'function' + ? (it = tt(nt)) + : Array.isArray(tt) + ? (it = tt[nt] || rt) + : (it = getPath$2(tt, nt) || rt), + et && (it = et(it, rt, tt)), + it + ) + } + function style$5(tt) { + const { prop: et, cssProperty: nt = tt.prop, themeKey: rt, transform: it } = tt, + ot = (at) => { + if (at[et] == null) return null + const st = at[et], + lt = at.theme, + ct = getPath$2(lt, rt) || {} + return handleBreakpoints(at, st, (ht) => { + let dt = getStyleValue$1(ct, it, ht) + return ( + ht === dt && + typeof ht == 'string' && + (dt = getStyleValue$1(ct, it, `${et}${ht === 'default' ? '' : capitalize(ht)}`, ht)), + nt === !1 ? dt : { [nt]: dt } + ) + }) + } + return (ot.propTypes = {}), (ot.filterProps = [et]), ot + } + function memoize$3(tt) { + const et = {} + return (nt) => (et[nt] === void 0 && (et[nt] = tt(nt)), et[nt]) + } + const properties = { m: 'margin', p: 'padding' }, + directions = { t: 'Top', r: 'Right', b: 'Bottom', l: 'Left', x: ['Left', 'Right'], y: ['Top', 'Bottom'] }, + aliases$1 = { marginX: 'mx', marginY: 'my', paddingX: 'px', paddingY: 'py' }, + getCssProperties = memoize$3((tt) => { + if (tt.length > 2) + if (aliases$1[tt]) tt = aliases$1[tt] + else return [tt] + const [et, nt] = tt.split(''), + rt = properties[et], + it = directions[nt] || '' + return Array.isArray(it) ? it.map((ot) => rt + ot) : [rt + it] + }), + marginKeys = [ + 'm', + 'mt', + 'mr', + 'mb', + 'ml', + 'mx', + 'my', + 'margin', + 'marginTop', + 'marginRight', + 'marginBottom', + 'marginLeft', + 'marginX', + 'marginY', + 'marginInline', + 'marginInlineStart', + 'marginInlineEnd', + 'marginBlock', + 'marginBlockStart', + 'marginBlockEnd', + ], + paddingKeys = [ + 'p', + 'pt', + 'pr', + 'pb', + 'pl', + 'px', + 'py', + 'padding', + 'paddingTop', + 'paddingRight', + 'paddingBottom', + 'paddingLeft', + 'paddingX', + 'paddingY', + 'paddingInline', + 'paddingInlineStart', + 'paddingInlineEnd', + 'paddingBlock', + 'paddingBlockStart', + 'paddingBlockEnd', + ] + ;[...marginKeys, ...paddingKeys] + function createUnaryUnit(tt, et, nt, rt) { + var it + const ot = (it = getPath$2(tt, et, !1)) != null ? it : nt + return typeof ot == 'number' + ? (at) => (typeof at == 'string' ? at : ot * at) + : Array.isArray(ot) + ? (at) => (typeof at == 'string' ? at : ot[at]) + : typeof ot == 'function' + ? ot + : () => {} + } + function createUnarySpacing(tt) { + return createUnaryUnit(tt, 'spacing', 8) + } + function getValue$3(tt, et) { + if (typeof et == 'string' || et == null) return et + const nt = Math.abs(et), + rt = tt(nt) + return et >= 0 ? rt : typeof rt == 'number' ? -rt : `-${rt}` + } + function getStyleFromPropValue(tt, et) { + return (nt) => tt.reduce((rt, it) => ((rt[it] = getValue$3(et, nt)), rt), {}) + } + function resolveCssProperty(tt, et, nt, rt) { + if (et.indexOf(nt) === -1) return null + const it = getCssProperties(nt), + ot = getStyleFromPropValue(it, rt), + at = tt[nt] + return handleBreakpoints(tt, at, ot) + } + function style$4(tt, et) { + const nt = createUnarySpacing(tt.theme) + return Object.keys(tt) + .map((rt) => resolveCssProperty(tt, et, rt, nt)) + .reduce(merge, {}) + } + function margin(tt) { + return style$4(tt, marginKeys) + } + margin.propTypes = {} + margin.filterProps = marginKeys + function padding$2(tt) { + return style$4(tt, paddingKeys) + } + padding$2.propTypes = {} + padding$2.filterProps = paddingKeys + function createSpacing(tt = 8) { + if (tt.mui) return tt + const et = createUnarySpacing({ spacing: tt }), + nt = (...rt) => + (rt.length === 0 ? [1] : rt) + .map((ot) => { + const at = et(ot) + return typeof at == 'number' ? `${at}px` : at + }) + .join(' ') + return (nt.mui = !0), nt + } + function compose$1(...tt) { + const et = tt.reduce( + (rt, it) => ( + it.filterProps.forEach((ot) => { + rt[ot] = it + }), + rt + ), + {}, + ), + nt = (rt) => Object.keys(rt).reduce((it, ot) => (et[ot] ? merge(it, et[ot](rt)) : it), {}) + return (nt.propTypes = {}), (nt.filterProps = tt.reduce((rt, it) => rt.concat(it.filterProps), [])), nt + } + function borderTransform(tt) { + return typeof tt != 'number' ? tt : `${tt}px solid` + } + const border$1 = style$5({ prop: 'border', themeKey: 'borders', transform: borderTransform }), + borderTop = style$5({ prop: 'borderTop', themeKey: 'borders', transform: borderTransform }), + borderRight = style$5({ prop: 'borderRight', themeKey: 'borders', transform: borderTransform }), + borderBottom = style$5({ prop: 'borderBottom', themeKey: 'borders', transform: borderTransform }), + borderLeft = style$5({ prop: 'borderLeft', themeKey: 'borders', transform: borderTransform }), + borderColor = style$5({ prop: 'borderColor', themeKey: 'palette' }), + borderTopColor = style$5({ prop: 'borderTopColor', themeKey: 'palette' }), + borderRightColor = style$5({ prop: 'borderRightColor', themeKey: 'palette' }), + borderBottomColor = style$5({ prop: 'borderBottomColor', themeKey: 'palette' }), + borderLeftColor = style$5({ prop: 'borderLeftColor', themeKey: 'palette' }), + borderRadius = (tt) => { + if (tt.borderRadius !== void 0 && tt.borderRadius !== null) { + const et = createUnaryUnit(tt.theme, 'shape.borderRadius', 4), + nt = (rt) => ({ borderRadius: getValue$3(et, rt) }) + return handleBreakpoints(tt, tt.borderRadius, nt) + } + return null + } + borderRadius.propTypes = {} + borderRadius.filterProps = ['borderRadius'] + compose$1( + border$1, + borderTop, + borderRight, + borderBottom, + borderLeft, + borderColor, + borderTopColor, + borderRightColor, + borderBottomColor, + borderLeftColor, + borderRadius, + ) + const gap = (tt) => { + if (tt.gap !== void 0 && tt.gap !== null) { + const et = createUnaryUnit(tt.theme, 'spacing', 8), + nt = (rt) => ({ gap: getValue$3(et, rt) }) + return handleBreakpoints(tt, tt.gap, nt) + } + return null + } + gap.propTypes = {} + gap.filterProps = ['gap'] + const columnGap = (tt) => { + if (tt.columnGap !== void 0 && tt.columnGap !== null) { + const et = createUnaryUnit(tt.theme, 'spacing', 8), + nt = (rt) => ({ columnGap: getValue$3(et, rt) }) + return handleBreakpoints(tt, tt.columnGap, nt) + } + return null + } + columnGap.propTypes = {} + columnGap.filterProps = ['columnGap'] + const rowGap = (tt) => { + if (tt.rowGap !== void 0 && tt.rowGap !== null) { + const et = createUnaryUnit(tt.theme, 'spacing', 8), + nt = (rt) => ({ rowGap: getValue$3(et, rt) }) + return handleBreakpoints(tt, tt.rowGap, nt) + } + return null + } + rowGap.propTypes = {} + rowGap.filterProps = ['rowGap'] + const gridColumn = style$5({ prop: 'gridColumn' }), + gridRow = style$5({ prop: 'gridRow' }), + gridAutoFlow = style$5({ prop: 'gridAutoFlow' }), + gridAutoColumns = style$5({ prop: 'gridAutoColumns' }), + gridAutoRows = style$5({ prop: 'gridAutoRows' }), + gridTemplateColumns = style$5({ prop: 'gridTemplateColumns' }), + gridTemplateRows = style$5({ prop: 'gridTemplateRows' }), + gridTemplateAreas = style$5({ prop: 'gridTemplateAreas' }), + gridArea = style$5({ prop: 'gridArea' }) + compose$1( + gap, + columnGap, + rowGap, + gridColumn, + gridRow, + gridAutoFlow, + gridAutoColumns, + gridAutoRows, + gridTemplateColumns, + gridTemplateRows, + gridTemplateAreas, + gridArea, + ) + function paletteTransform(tt, et) { + return et === 'grey' ? et : tt + } + const color$2 = style$5({ prop: 'color', themeKey: 'palette', transform: paletteTransform }), + bgcolor = style$5({ + prop: 'bgcolor', + cssProperty: 'backgroundColor', + themeKey: 'palette', + transform: paletteTransform, + }), + backgroundColor$1 = style$5({ prop: 'backgroundColor', themeKey: 'palette', transform: paletteTransform }) + compose$1(color$2, bgcolor, backgroundColor$1) + function sizingTransform(tt) { + return tt <= 1 && tt !== 0 ? `${tt * 100}%` : tt + } + const width = style$5({ prop: 'width', transform: sizingTransform }), + maxWidth = (tt) => { + if (tt.maxWidth !== void 0 && tt.maxWidth !== null) { + const et = (nt) => { + var rt, it + const ot = + ((rt = tt.theme) == null || (rt = rt.breakpoints) == null || (rt = rt.values) == null ? void 0 : rt[nt]) || + values$1[nt] + return ot + ? ((it = tt.theme) == null || (it = it.breakpoints) == null ? void 0 : it.unit) !== 'px' + ? { maxWidth: `${ot}${tt.theme.breakpoints.unit}` } + : { maxWidth: ot } + : { maxWidth: sizingTransform(nt) } + } + return handleBreakpoints(tt, tt.maxWidth, et) + } + return null + } + maxWidth.filterProps = ['maxWidth'] + const minWidth = style$5({ prop: 'minWidth', transform: sizingTransform }), + height = style$5({ prop: 'height', transform: sizingTransform }), + maxHeight = style$5({ prop: 'maxHeight', transform: sizingTransform }), + minHeight = style$5({ prop: 'minHeight', transform: sizingTransform }) + style$5({ prop: 'size', cssProperty: 'width', transform: sizingTransform }) + style$5({ prop: 'size', cssProperty: 'height', transform: sizingTransform }) + const boxSizing = style$5({ prop: 'boxSizing' }) + compose$1(width, maxWidth, minWidth, height, maxHeight, minHeight, boxSizing) + const defaultSxConfig = { + border: { themeKey: 'borders', transform: borderTransform }, + borderTop: { themeKey: 'borders', transform: borderTransform }, + borderRight: { themeKey: 'borders', transform: borderTransform }, + borderBottom: { themeKey: 'borders', transform: borderTransform }, + borderLeft: { themeKey: 'borders', transform: borderTransform }, + borderColor: { themeKey: 'palette' }, + borderTopColor: { themeKey: 'palette' }, + borderRightColor: { themeKey: 'palette' }, + borderBottomColor: { themeKey: 'palette' }, + borderLeftColor: { themeKey: 'palette' }, + borderRadius: { themeKey: 'shape.borderRadius', style: borderRadius }, + color: { themeKey: 'palette', transform: paletteTransform }, + bgcolor: { themeKey: 'palette', cssProperty: 'backgroundColor', transform: paletteTransform }, + backgroundColor: { themeKey: 'palette', transform: paletteTransform }, + p: { style: padding$2 }, + pt: { style: padding$2 }, + pr: { style: padding$2 }, + pb: { style: padding$2 }, + pl: { style: padding$2 }, + px: { style: padding$2 }, + py: { style: padding$2 }, + padding: { style: padding$2 }, + paddingTop: { style: padding$2 }, + paddingRight: { style: padding$2 }, + paddingBottom: { style: padding$2 }, + paddingLeft: { style: padding$2 }, + paddingX: { style: padding$2 }, + paddingY: { style: padding$2 }, + paddingInline: { style: padding$2 }, + paddingInlineStart: { style: padding$2 }, + paddingInlineEnd: { style: padding$2 }, + paddingBlock: { style: padding$2 }, + paddingBlockStart: { style: padding$2 }, + paddingBlockEnd: { style: padding$2 }, + m: { style: margin }, + mt: { style: margin }, + mr: { style: margin }, + mb: { style: margin }, + ml: { style: margin }, + mx: { style: margin }, + my: { style: margin }, + margin: { style: margin }, + marginTop: { style: margin }, + marginRight: { style: margin }, + marginBottom: { style: margin }, + marginLeft: { style: margin }, + marginX: { style: margin }, + marginY: { style: margin }, + marginInline: { style: margin }, + marginInlineStart: { style: margin }, + marginInlineEnd: { style: margin }, + marginBlock: { style: margin }, + marginBlockStart: { style: margin }, + marginBlockEnd: { style: margin }, + displayPrint: { cssProperty: !1, transform: (tt) => ({ '@media print': { display: tt } }) }, + display: {}, + overflow: {}, + textOverflow: {}, + visibility: {}, + whiteSpace: {}, + flexBasis: {}, + flexDirection: {}, + flexWrap: {}, + justifyContent: {}, + alignItems: {}, + alignContent: {}, + order: {}, + flex: {}, + flexGrow: {}, + flexShrink: {}, + alignSelf: {}, + justifyItems: {}, + justifySelf: {}, + gap: { style: gap }, + rowGap: { style: rowGap }, + columnGap: { style: columnGap }, + gridColumn: {}, + gridRow: {}, + gridAutoFlow: {}, + gridAutoColumns: {}, + gridAutoRows: {}, + gridTemplateColumns: {}, + gridTemplateRows: {}, + gridTemplateAreas: {}, + gridArea: {}, + position: {}, + zIndex: { themeKey: 'zIndex' }, + top: {}, + right: {}, + bottom: {}, + left: {}, + boxShadow: { themeKey: 'shadows' }, + width: { transform: sizingTransform }, + maxWidth: { style: maxWidth }, + minWidth: { transform: sizingTransform }, + height: { transform: sizingTransform }, + maxHeight: { transform: sizingTransform }, + minHeight: { transform: sizingTransform }, + boxSizing: {}, + fontFamily: { themeKey: 'typography' }, + fontSize: { themeKey: 'typography' }, + fontStyle: { themeKey: 'typography' }, + fontWeight: { themeKey: 'typography' }, + letterSpacing: {}, + textTransform: {}, + lineHeight: {}, + textAlign: {}, + typography: { cssProperty: !1, themeKey: 'typography' }, + }, + defaultSxConfig$1 = defaultSxConfig + function objectsHaveSameKeys(...tt) { + const et = tt.reduce((rt, it) => rt.concat(Object.keys(it)), []), + nt = new Set(et) + return tt.every((rt) => nt.size === Object.keys(rt).length) + } + function callIfFn(tt, et) { + return typeof tt == 'function' ? tt(et) : tt + } + function unstable_createStyleFunctionSx() { + function tt(nt, rt, it, ot) { + const at = { [nt]: rt, theme: it }, + st = ot[nt] + if (!st) return { [nt]: rt } + const { cssProperty: lt = nt, themeKey: ct, transform: ut, style: ht } = st + if (rt == null) return null + if (ct === 'typography' && rt === 'inherit') return { [nt]: rt } + const dt = getPath$2(it, ct) || {} + return ht + ? ht(at) + : handleBreakpoints(at, rt, (mt) => { + let gt = getStyleValue$1(dt, ut, mt) + return ( + mt === gt && + typeof mt == 'string' && + (gt = getStyleValue$1(dt, ut, `${nt}${mt === 'default' ? '' : capitalize(mt)}`, mt)), + lt === !1 ? gt : { [lt]: gt } + ) + }) + } + function et(nt) { + var rt + const { sx: it, theme: ot = {} } = nt || {} + if (!it) return null + const at = (rt = ot.unstable_sxConfig) != null ? rt : defaultSxConfig$1 + function st(lt) { + let ct = lt + if (typeof lt == 'function') ct = lt(ot) + else if (typeof lt != 'object') return lt + if (!ct) return null + const ut = createEmptyBreakpointObject(ot.breakpoints), + ht = Object.keys(ut) + let dt = ut + return ( + Object.keys(ct).forEach((pt) => { + const mt = callIfFn(ct[pt], ot) + if (mt != null) + if (typeof mt == 'object') + if (at[pt]) dt = merge(dt, tt(pt, mt, ot, at)) + else { + const gt = handleBreakpoints({ theme: ot }, mt, (yt) => ({ [pt]: yt })) + objectsHaveSameKeys(gt, mt) ? (dt[pt] = et({ sx: mt, theme: ot })) : (dt = merge(dt, gt)) + } + else dt = merge(dt, tt(pt, mt, ot, at)) + }), + removeUnusedBreakpoints(ht, dt) + ) + } + return Array.isArray(it) ? it.map(st) : st(it) + } + return et + } + const styleFunctionSx = unstable_createStyleFunctionSx() + styleFunctionSx.filterProps = ['sx'] + const styleFunctionSx$1 = styleFunctionSx, + _excluded$1J = ['breakpoints', 'palette', 'spacing', 'shape'] + function createTheme$1(tt = {}, ...et) { + const { breakpoints: nt = {}, palette: rt = {}, spacing: it, shape: ot = {} } = tt, + at = _objectWithoutPropertiesLoose$m(tt, _excluded$1J), + st = createBreakpoints(nt), + lt = createSpacing(it) + let ct = deepmerge$1( + { + breakpoints: st, + direction: 'ltr', + components: {}, + palette: _extends$u({ mode: 'light' }, rt), + spacing: lt, + shape: _extends$u({}, shape$2, ot), + }, + at, + ) + return ( + (ct = et.reduce((ut, ht) => deepmerge$1(ut, ht), ct)), + (ct.unstable_sxConfig = _extends$u({}, defaultSxConfig$1, at == null ? void 0 : at.unstable_sxConfig)), + (ct.unstable_sx = function (ht) { + return styleFunctionSx$1({ sx: ht, theme: this }) + }), + ct + ) + } + function isObjectEmpty$1(tt) { + return Object.keys(tt).length === 0 + } + function useTheme$3(tt = null) { + const et = reactExports.useContext(ThemeContext$2) + return !et || isObjectEmpty$1(et) ? tt : et + } + const systemDefaultTheme$1 = createTheme$1() + function useTheme$2(tt = systemDefaultTheme$1) { + return useTheme$3(tt) + } + function GlobalStyles$1({ styles: tt, themeId: et, defaultTheme: nt = {} }) { + const rt = useTheme$2(nt), + it = typeof tt == 'function' ? tt((et && rt[et]) || rt) : tt + return jsxRuntimeExports.jsx(GlobalStyles$2, { styles: it }) + } + const _excluded$1I = ['sx'], + splitProps = (tt) => { + var et, nt + const rt = { systemProps: {}, otherProps: {} }, + it = + (et = tt == null || (nt = tt.theme) == null ? void 0 : nt.unstable_sxConfig) != null ? et : defaultSxConfig$1 + return ( + Object.keys(tt).forEach((ot) => { + it[ot] ? (rt.systemProps[ot] = tt[ot]) : (rt.otherProps[ot] = tt[ot]) + }), + rt + ) + } + function extendSxProp(tt) { + const { sx: et } = tt, + nt = _objectWithoutPropertiesLoose$m(tt, _excluded$1I), + { systemProps: rt, otherProps: it } = splitProps(nt) + let ot + return ( + Array.isArray(et) + ? (ot = [rt, ...et]) + : typeof et == 'function' + ? (ot = (...at) => { + const st = et(...at) + return isPlainObject$1(st) ? _extends$u({}, rt, st) : rt + }) + : (ot = _extends$u({}, rt, et)), + _extends$u({}, it, { sx: ot }) + ) + } + function r$9(tt) { + var et, + nt, + rt = '' + if (typeof tt == 'string' || typeof tt == 'number') rt += tt + else if (typeof tt == 'object') + if (Array.isArray(tt)) + for (et = 0; et < tt.length; et++) tt[et] && (nt = r$9(tt[et])) && (rt && (rt += ' '), (rt += nt)) + else for (et in tt) tt[et] && (rt && (rt += ' '), (rt += et)) + return rt + } + function clsx$4() { + for (var tt, et, nt = 0, rt = ''; nt < arguments.length; ) + (tt = arguments[nt++]) && (et = r$9(tt)) && (rt && (rt += ' '), (rt += et)) + return rt + } + const _excluded$1G = ['variant'] + function isEmpty$3(tt) { + return tt.length === 0 + } + function propsToClassKey(tt) { + const { variant: et } = tt, + nt = _objectWithoutPropertiesLoose$m(tt, _excluded$1G) + let rt = et || '' + return ( + Object.keys(nt) + .sort() + .forEach((it) => { + it === 'color' + ? (rt += isEmpty$3(rt) ? tt[it] : capitalize(tt[it])) + : (rt += `${isEmpty$3(rt) ? it : capitalize(it)}${capitalize(tt[it].toString())}`) + }), + rt + ) + } + const _excluded$1F = ['name', 'slot', 'skipVariantsResolver', 'skipSx', 'overridesResolver'] + function isEmpty$2(tt) { + return Object.keys(tt).length === 0 + } + function isStringTag(tt) { + return typeof tt == 'string' && tt.charCodeAt(0) > 96 + } + const getStyleOverrides = (tt, et) => + et.components && et.components[tt] && et.components[tt].styleOverrides ? et.components[tt].styleOverrides : null, + transformVariants = (tt) => { + const et = {} + return ( + tt && + tt.forEach((nt) => { + const rt = propsToClassKey(nt.props) + et[rt] = nt.style + }), + et + ) + }, + getVariantStyles = (tt, et) => { + let nt = [] + return ( + et && et.components && et.components[tt] && et.components[tt].variants && (nt = et.components[tt].variants), + transformVariants(nt) + ) + }, + variantsResolver = (tt, et, nt) => { + const { ownerState: rt = {} } = tt, + it = [] + return ( + nt && + nt.forEach((ot) => { + let at = !0 + Object.keys(ot.props).forEach((st) => { + rt[st] !== ot.props[st] && tt[st] !== ot.props[st] && (at = !1) + }), + at && it.push(et[propsToClassKey(ot.props)]) + }), + it + ) + }, + themeVariantsResolver = (tt, et, nt, rt) => { + var it + const ot = nt == null || (it = nt.components) == null || (it = it[rt]) == null ? void 0 : it.variants + return variantsResolver(tt, et, ot) + } + function shouldForwardProp(tt) { + return tt !== 'ownerState' && tt !== 'theme' && tt !== 'sx' && tt !== 'as' + } + const systemDefaultTheme = createTheme$1(), + lowercaseFirstLetter = (tt) => tt && tt.charAt(0).toLowerCase() + tt.slice(1) + function resolveTheme({ defaultTheme: tt, theme: et, themeId: nt }) { + return isEmpty$2(et) ? tt : et[nt] || et + } + function defaultOverridesResolver(tt) { + return tt ? (et, nt) => nt[tt] : null + } + const muiStyledFunctionResolver = ({ styledArg: tt, props: et, defaultTheme: nt, themeId: rt }) => { + const it = tt(_extends$u({}, et, { theme: resolveTheme(_extends$u({}, et, { defaultTheme: nt, themeId: rt })) })) + let ot + if ((it && it.variants && ((ot = it.variants), delete it.variants), ot)) { + const at = variantsResolver(et, transformVariants(ot), ot) + return [it, ...at] + } + return it + } + function createStyled(tt = {}) { + const { + themeId: et, + defaultTheme: nt = systemDefaultTheme, + rootShouldForwardProp: rt = shouldForwardProp, + slotShouldForwardProp: it = shouldForwardProp, + } = tt, + ot = (at) => + styleFunctionSx$1( + _extends$u({}, at, { theme: resolveTheme(_extends$u({}, at, { defaultTheme: nt, themeId: et })) }), + ) + return ( + (ot.__mui_systemSx = !0), + (at, st = {}) => { + internal_processStyles(at, (kt) => kt.filter((St) => !(St != null && St.__mui_systemSx))) + const { + name: lt, + slot: ct, + skipVariantsResolver: ut, + skipSx: ht, + overridesResolver: dt = defaultOverridesResolver(lowercaseFirstLetter(ct)), + } = st, + pt = _objectWithoutPropertiesLoose$m(st, _excluded$1F), + mt = ut !== void 0 ? ut : (ct && ct !== 'Root' && ct !== 'root') || !1, + gt = ht || !1 + let yt, + bt = shouldForwardProp + ct === 'Root' || ct === 'root' ? (bt = rt) : ct ? (bt = it) : isStringTag(at) && (bt = void 0) + const vt = styled$3(at, _extends$u({ shouldForwardProp: bt, label: yt }, pt)), + xt = (kt, ...St) => { + const Tt = St + ? St.map((Dt) => { + if (typeof Dt == 'function' && Dt.__emotion_real !== Dt) + return (jt) => + muiStyledFunctionResolver({ styledArg: Dt, props: jt, defaultTheme: nt, themeId: et }) + if (isPlainObject$1(Dt)) { + let jt = Dt, + Pt + return ( + Dt && + Dt.variants && + ((Pt = Dt.variants), + delete jt.variants, + (jt = (Ct) => { + let wt = Dt + return ( + variantsResolver(Ct, transformVariants(Pt), Pt).forEach((Ot) => { + wt = deepmerge$1(wt, Ot) + }), + wt + ) + })), + jt + ) + } + return Dt + }) + : [] + let At = kt + if (isPlainObject$1(kt)) { + let Dt + kt && + kt.variants && + ((Dt = kt.variants), + delete At.variants, + (At = (jt) => { + let Pt = kt + return ( + variantsResolver(jt, transformVariants(Dt), Dt).forEach((wt) => { + Pt = deepmerge$1(Pt, wt) + }), + Pt + ) + })) + } else + typeof kt == 'function' && + kt.__emotion_real !== kt && + (At = (Dt) => muiStyledFunctionResolver({ styledArg: kt, props: Dt, defaultTheme: nt, themeId: et })) + lt && + dt && + Tt.push((Dt) => { + const jt = resolveTheme(_extends$u({}, Dt, { defaultTheme: nt, themeId: et })), + Pt = getStyleOverrides(lt, jt) + if (Pt) { + const Ct = {} + return ( + Object.entries(Pt).forEach(([wt, It]) => { + Ct[wt] = typeof It == 'function' ? It(_extends$u({}, Dt, { theme: jt })) : It + }), + dt(Dt, Ct) + ) + } + return null + }), + lt && + !mt && + Tt.push((Dt) => { + const jt = resolveTheme(_extends$u({}, Dt, { defaultTheme: nt, themeId: et })) + return themeVariantsResolver(Dt, getVariantStyles(lt, jt), jt, lt) + }), + gt || Tt.push(ot) + const Et = Tt.length - St.length + if (Array.isArray(kt) && Et > 0) { + const Dt = new Array(Et).fill('') + ;(At = [...kt, ...Dt]), (At.raw = [...kt.raw, ...Dt]) + } + const $t = vt(At, ...Tt) + return at.muiName && ($t.muiName = at.muiName), $t + } + return vt.withConfig && (xt.withConfig = vt.withConfig), xt + } + ) + } + const styled$2 = createStyled(), + systemStyled = styled$2 + function getThemeProps(tt) { + const { theme: et, name: nt, props: rt } = tt + return !et || !et.components || !et.components[nt] || !et.components[nt].defaultProps + ? rt + : resolveProps(et.components[nt].defaultProps, rt) + } + function useThemeProps$1({ props: tt, name: et, defaultTheme: nt, themeId: rt }) { + let it = useTheme$2(nt) + return rt && (it = it[rt] || it), getThemeProps({ theme: it, name: et, props: tt }) + } + function clamp$7(tt, et = 0, nt = 1) { + return Math.min(Math.max(et, tt), nt) + } + function hexToRgb(tt) { + tt = tt.slice(1) + const et = new RegExp(`.{1,${tt.length >= 6 ? 2 : 1}}`, 'g') + let nt = tt.match(et) + return ( + nt && nt[0].length === 1 && (nt = nt.map((rt) => rt + rt)), + nt + ? `rgb${nt.length === 4 ? 'a' : ''}(${nt + .map((rt, it) => (it < 3 ? parseInt(rt, 16) : Math.round((parseInt(rt, 16) / 255) * 1e3) / 1e3)) + .join(', ')})` + : '' + ) + } + function decomposeColor(tt) { + if (tt.type) return tt + if (tt.charAt(0) === '#') return decomposeColor(hexToRgb(tt)) + const et = tt.indexOf('('), + nt = tt.substring(0, et) + if (['rgb', 'rgba', 'hsl', 'hsla', 'color'].indexOf(nt) === -1) throw new Error(formatMuiErrorMessage(9, tt)) + let rt = tt.substring(et + 1, tt.length - 1), + it + if (nt === 'color') { + if ( + ((rt = rt.split(' ')), + (it = rt.shift()), + rt.length === 4 && rt[3].charAt(0) === '/' && (rt[3] = rt[3].slice(1)), + ['srgb', 'display-p3', 'a98-rgb', 'prophoto-rgb', 'rec-2020'].indexOf(it) === -1) + ) + throw new Error(formatMuiErrorMessage(10, it)) + } else rt = rt.split(',') + return (rt = rt.map((ot) => parseFloat(ot))), { type: nt, values: rt, colorSpace: it } + } + function recomposeColor(tt) { + const { type: et, colorSpace: nt } = tt + let { values: rt } = tt + return ( + et.indexOf('rgb') !== -1 + ? (rt = rt.map((it, ot) => (ot < 3 ? parseInt(it, 10) : it))) + : et.indexOf('hsl') !== -1 && ((rt[1] = `${rt[1]}%`), (rt[2] = `${rt[2]}%`)), + et.indexOf('color') !== -1 ? (rt = `${nt} ${rt.join(' ')}`) : (rt = `${rt.join(', ')}`), + `${et}(${rt})` + ) + } + function hslToRgb(tt) { + tt = decomposeColor(tt) + const { values: et } = tt, + nt = et[0], + rt = et[1] / 100, + it = et[2] / 100, + ot = rt * Math.min(it, 1 - it), + at = (ct, ut = (ct + nt / 30) % 12) => it - ot * Math.max(Math.min(ut - 3, 9 - ut, 1), -1) + let st = 'rgb' + const lt = [Math.round(at(0) * 255), Math.round(at(8) * 255), Math.round(at(4) * 255)] + return tt.type === 'hsla' && ((st += 'a'), lt.push(et[3])), recomposeColor({ type: st, values: lt }) + } + function getLuminance(tt) { + tt = decomposeColor(tt) + let et = tt.type === 'hsl' || tt.type === 'hsla' ? decomposeColor(hslToRgb(tt)).values : tt.values + return ( + (et = et.map( + (nt) => (tt.type !== 'color' && (nt /= 255), nt <= 0.03928 ? nt / 12.92 : ((nt + 0.055) / 1.055) ** 2.4), + )), + Number((0.2126 * et[0] + 0.7152 * et[1] + 0.0722 * et[2]).toFixed(3)) + ) + } + function getContrastRatio(tt, et) { + const nt = getLuminance(tt), + rt = getLuminance(et) + return (Math.max(nt, rt) + 0.05) / (Math.min(nt, rt) + 0.05) + } + function alpha$1(tt, et) { + return ( + (tt = decomposeColor(tt)), + (et = clamp$7(et)), + (tt.type === 'rgb' || tt.type === 'hsl') && (tt.type += 'a'), + tt.type === 'color' ? (tt.values[3] = `/${et}`) : (tt.values[3] = et), + recomposeColor(tt) + ) + } + function darken(tt, et) { + if (((tt = decomposeColor(tt)), (et = clamp$7(et)), tt.type.indexOf('hsl') !== -1)) tt.values[2] *= 1 - et + else if (tt.type.indexOf('rgb') !== -1 || tt.type.indexOf('color') !== -1) + for (let nt = 0; nt < 3; nt += 1) tt.values[nt] *= 1 - et + return recomposeColor(tt) + } + function lighten(tt, et) { + if (((tt = decomposeColor(tt)), (et = clamp$7(et)), tt.type.indexOf('hsl') !== -1)) + tt.values[2] += (100 - tt.values[2]) * et + else if (tt.type.indexOf('rgb') !== -1) + for (let nt = 0; nt < 3; nt += 1) tt.values[nt] += (255 - tt.values[nt]) * et + else if (tt.type.indexOf('color') !== -1) + for (let nt = 0; nt < 3; nt += 1) tt.values[nt] += (1 - tt.values[nt]) * et + return recomposeColor(tt) + } + const ThemeContext = reactExports.createContext(null), + ThemeContext$1 = ThemeContext + function useTheme$1() { + return reactExports.useContext(ThemeContext$1) + } + const hasSymbol = typeof Symbol == 'function' && Symbol.for, + nested = hasSymbol ? Symbol.for('mui.nested') : '__THEME_NESTED__' + function mergeOuterLocalTheme(tt, et) { + return typeof et == 'function' ? et(tt) : _extends$u({}, tt, et) + } + function ThemeProvider$2(tt) { + const { children: et, theme: nt } = tt, + rt = useTheme$1(), + it = reactExports.useMemo(() => { + const ot = rt === null ? nt : mergeOuterLocalTheme(rt, nt) + return ot != null && (ot[nested] = rt !== null), ot + }, [nt, rt]) + return jsxRuntimeExports.jsx(ThemeContext$1.Provider, { value: it, children: et }) + } + const EMPTY_THEME = {} + function useThemeScoping(tt, et, nt, rt = !1) { + return reactExports.useMemo(() => { + const it = (tt && et[tt]) || et + if (typeof nt == 'function') { + const ot = nt(it), + at = tt ? _extends$u({}, et, { [tt]: ot }) : ot + return rt ? () => at : at + } + return tt ? _extends$u({}, et, { [tt]: nt }) : _extends$u({}, et, nt) + }, [tt, et, nt, rt]) + } + function ThemeProvider$1(tt) { + const { children: et, theme: nt, themeId: rt } = tt, + it = useTheme$3(EMPTY_THEME), + ot = useTheme$1() || EMPTY_THEME, + at = useThemeScoping(rt, it, nt), + st = useThemeScoping(rt, ot, nt, !0) + return jsxRuntimeExports.jsx(ThemeProvider$2, { + theme: st, + children: jsxRuntimeExports.jsx(ThemeContext$2.Provider, { value: at, children: et }), + }) + } + const _excluded$1E = ['component', 'direction', 'spacing', 'divider', 'children', 'className', 'useFlexGap'], + defaultTheme$2 = createTheme$1(), + defaultCreateStyledComponent = systemStyled('div', { + name: 'MuiStack', + slot: 'Root', + overridesResolver: (tt, et) => et.root, + }) + function useThemePropsDefault(tt) { + return useThemeProps$1({ props: tt, name: 'MuiStack', defaultTheme: defaultTheme$2 }) + } + function joinChildren(tt, et) { + const nt = reactExports.Children.toArray(tt).filter(Boolean) + return nt.reduce( + (rt, it, ot) => ( + rt.push(it), ot < nt.length - 1 && rt.push(reactExports.cloneElement(et, { key: `separator-${ot}` })), rt + ), + [], + ) + } + const getSideFromDirection = (tt) => + ({ row: 'Left', 'row-reverse': 'Right', column: 'Top', 'column-reverse': 'Bottom' }[tt]), + style$3 = ({ ownerState: tt, theme: et }) => { + let nt = _extends$u( + { display: 'flex', flexDirection: 'column' }, + handleBreakpoints( + { theme: et }, + resolveBreakpointValues({ values: tt.direction, breakpoints: et.breakpoints.values }), + (rt) => ({ flexDirection: rt }), + ), + ) + if (tt.spacing) { + const rt = createUnarySpacing(et), + it = Object.keys(et.breakpoints.values).reduce( + (lt, ct) => ( + ((typeof tt.spacing == 'object' && tt.spacing[ct] != null) || + (typeof tt.direction == 'object' && tt.direction[ct] != null)) && + (lt[ct] = !0), + lt + ), + {}, + ), + ot = resolveBreakpointValues({ values: tt.direction, base: it }), + at = resolveBreakpointValues({ values: tt.spacing, base: it }) + typeof ot == 'object' && + Object.keys(ot).forEach((lt, ct, ut) => { + if (!ot[lt]) { + const dt = ct > 0 ? ot[ut[ct - 1]] : 'column' + ot[lt] = dt + } + }), + (nt = deepmerge$1( + nt, + handleBreakpoints({ theme: et }, at, (lt, ct) => + tt.useFlexGap + ? { gap: getValue$3(rt, lt) } + : { + '& > :not(style):not(style)': { margin: 0 }, + '& > :not(style) ~ :not(style)': { + [`margin${getSideFromDirection(ct ? ot[ct] : tt.direction)}`]: getValue$3(rt, lt), + }, + }, + ), + )) + } + return (nt = mergeBreakpointsInOrder(et.breakpoints, nt)), nt + } + function createStack(tt = {}) { + const { + createStyledComponent: et = defaultCreateStyledComponent, + useThemeProps: nt = useThemePropsDefault, + componentName: rt = 'MuiStack', + } = tt, + it = () => composeClasses({ root: ['root'] }, (lt) => generateUtilityClass(rt, lt), {}), + ot = et(style$3) + return reactExports.forwardRef(function (lt, ct) { + const ut = nt(lt), + ht = extendSxProp(ut), + { + component: dt = 'div', + direction: pt = 'column', + spacing: mt = 0, + divider: gt, + children: yt, + className: bt, + useFlexGap: vt = !1, + } = ht, + xt = _objectWithoutPropertiesLoose$m(ht, _excluded$1E), + kt = { direction: pt, spacing: mt, useFlexGap: vt }, + St = it() + return jsxRuntimeExports.jsx( + ot, + _extends$u({ as: dt, ownerState: kt, ref: ct, className: clsx$4(St.root, bt) }, xt, { + children: gt ? joinChildren(yt, gt) : yt, + }), + ) + }) + } + function createMixins(tt, et) { + return _extends$u( + { + toolbar: { + minHeight: 56, + [tt.up('xs')]: { '@media (orientation: landscape)': { minHeight: 48 } }, + [tt.up('sm')]: { minHeight: 64 }, + }, + }, + et, + ) + } + const _excluded$1D = ['mode', 'contrastThreshold', 'tonalOffset'], + light = { + text: { primary: 'rgba(0, 0, 0, 0.87)', secondary: 'rgba(0, 0, 0, 0.6)', disabled: 'rgba(0, 0, 0, 0.38)' }, + divider: 'rgba(0, 0, 0, 0.12)', + background: { paper: common$8.white, default: common$8.white }, + action: { + active: 'rgba(0, 0, 0, 0.54)', + hover: 'rgba(0, 0, 0, 0.04)', + hoverOpacity: 0.04, + selected: 'rgba(0, 0, 0, 0.08)', + selectedOpacity: 0.08, + disabled: 'rgba(0, 0, 0, 0.26)', + disabledBackground: 'rgba(0, 0, 0, 0.12)', + disabledOpacity: 0.38, + focus: 'rgba(0, 0, 0, 0.12)', + focusOpacity: 0.12, + activatedOpacity: 0.12, + }, + }, + dark = { + text: { + primary: common$8.white, + secondary: 'rgba(255, 255, 255, 0.7)', + disabled: 'rgba(255, 255, 255, 0.5)', + icon: 'rgba(255, 255, 255, 0.5)', + }, + divider: 'rgba(255, 255, 255, 0.12)', + background: { paper: '#121212', default: '#121212' }, + action: { + active: common$8.white, + hover: 'rgba(255, 255, 255, 0.08)', + hoverOpacity: 0.08, + selected: 'rgba(255, 255, 255, 0.16)', + selectedOpacity: 0.16, + disabled: 'rgba(255, 255, 255, 0.3)', + disabledBackground: 'rgba(255, 255, 255, 0.12)', + disabledOpacity: 0.38, + focus: 'rgba(255, 255, 255, 0.12)', + focusOpacity: 0.12, + activatedOpacity: 0.24, + }, + } + function addLightOrDark(tt, et, nt, rt) { + const it = rt.light || rt, + ot = rt.dark || rt * 1.5 + tt[et] || + (tt.hasOwnProperty(nt) + ? (tt[et] = tt[nt]) + : et === 'light' + ? (tt.light = lighten(tt.main, it)) + : et === 'dark' && (tt.dark = darken(tt.main, ot))) + } + function getDefaultPrimary(tt = 'light') { + return tt === 'dark' + ? { main: blue$1[200], light: blue$1[50], dark: blue$1[400] } + : { main: blue$1[700], light: blue$1[400], dark: blue$1[800] } + } + function getDefaultSecondary(tt = 'light') { + return tt === 'dark' + ? { main: purple$1[200], light: purple$1[50], dark: purple$1[400] } + : { main: purple$1[500], light: purple$1[300], dark: purple$1[700] } + } + function getDefaultError(tt = 'light') { + return tt === 'dark' + ? { main: red$1[500], light: red$1[300], dark: red$1[700] } + : { main: red$1[700], light: red$1[400], dark: red$1[800] } + } + function getDefaultInfo(tt = 'light') { + return tt === 'dark' + ? { main: lightBlue$1[400], light: lightBlue$1[300], dark: lightBlue$1[700] } + : { main: lightBlue$1[700], light: lightBlue$1[500], dark: lightBlue$1[900] } + } + function getDefaultSuccess(tt = 'light') { + return tt === 'dark' + ? { main: green$1[400], light: green$1[300], dark: green$1[700] } + : { main: green$1[800], light: green$1[500], dark: green$1[900] } + } + function getDefaultWarning(tt = 'light') { + return tt === 'dark' + ? { main: orange$1[400], light: orange$1[300], dark: orange$1[700] } + : { main: '#ed6c02', light: orange$1[500], dark: orange$1[900] } + } + function createPalette(tt) { + const { mode: et = 'light', contrastThreshold: nt = 3, tonalOffset: rt = 0.2 } = tt, + it = _objectWithoutPropertiesLoose$m(tt, _excluded$1D), + ot = tt.primary || getDefaultPrimary(et), + at = tt.secondary || getDefaultSecondary(et), + st = tt.error || getDefaultError(et), + lt = tt.info || getDefaultInfo(et), + ct = tt.success || getDefaultSuccess(et), + ut = tt.warning || getDefaultWarning(et) + function ht(gt) { + return getContrastRatio(gt, dark.text.primary) >= nt ? dark.text.primary : light.text.primary + } + const dt = ({ color: gt, name: yt, mainShade: bt = 500, lightShade: vt = 300, darkShade: xt = 700 }) => { + if (((gt = _extends$u({}, gt)), !gt.main && gt[bt] && (gt.main = gt[bt]), !gt.hasOwnProperty('main'))) + throw new Error(formatMuiErrorMessage(11, yt ? ` (${yt})` : '', bt)) + if (typeof gt.main != 'string') + throw new Error(formatMuiErrorMessage(12, yt ? ` (${yt})` : '', JSON.stringify(gt.main))) + return ( + addLightOrDark(gt, 'light', vt, rt), + addLightOrDark(gt, 'dark', xt, rt), + gt.contrastText || (gt.contrastText = ht(gt.main)), + gt + ) + }, + pt = { dark, light } + return deepmerge$1( + _extends$u( + { + common: _extends$u({}, common$8), + mode: et, + primary: dt({ color: ot, name: 'primary' }), + secondary: dt({ color: at, name: 'secondary', mainShade: 'A400', lightShade: 'A200', darkShade: 'A700' }), + error: dt({ color: st, name: 'error' }), + warning: dt({ color: ut, name: 'warning' }), + info: dt({ color: lt, name: 'info' }), + success: dt({ color: ct, name: 'success' }), + grey: grey$1, + contrastThreshold: nt, + getContrastText: ht, + augmentColor: dt, + tonalOffset: rt, + }, + pt[et], + ), + it, + ) + } + const _excluded$1C = [ + 'fontFamily', + 'fontSize', + 'fontWeightLight', + 'fontWeightRegular', + 'fontWeightMedium', + 'fontWeightBold', + 'htmlFontSize', + 'allVariants', + 'pxToRem', + ] + function round$3(tt) { + return Math.round(tt * 1e5) / 1e5 + } + const caseAllCaps = { textTransform: 'uppercase' }, + defaultFontFamily = '"Roboto", "Helvetica", "Arial", sans-serif' + function createTypography(tt, et) { + const nt = typeof et == 'function' ? et(tt) : et, + { + fontFamily: rt = defaultFontFamily, + fontSize: it = 14, + fontWeightLight: ot = 300, + fontWeightRegular: at = 400, + fontWeightMedium: st = 500, + fontWeightBold: lt = 700, + htmlFontSize: ct = 16, + allVariants: ut, + pxToRem: ht, + } = nt, + dt = _objectWithoutPropertiesLoose$m(nt, _excluded$1C), + pt = it / 14, + mt = ht || ((bt) => `${(bt / ct) * pt}rem`), + gt = (bt, vt, xt, kt, St) => + _extends$u( + { fontFamily: rt, fontWeight: bt, fontSize: mt(vt), lineHeight: xt }, + rt === defaultFontFamily ? { letterSpacing: `${round$3(kt / vt)}em` } : {}, + St, + ut, + ), + yt = { + h1: gt(ot, 96, 1.167, -1.5), + h2: gt(ot, 60, 1.2, -0.5), + h3: gt(at, 48, 1.167, 0), + h4: gt(at, 34, 1.235, 0.25), + h5: gt(at, 24, 1.334, 0), + h6: gt(st, 20, 1.6, 0.15), + subtitle1: gt(at, 16, 1.75, 0.15), + subtitle2: gt(st, 14, 1.57, 0.1), + body1: gt(at, 16, 1.5, 0.15), + body2: gt(at, 14, 1.43, 0.15), + button: gt(st, 14, 1.75, 0.4, caseAllCaps), + caption: gt(at, 12, 1.66, 0.4), + overline: gt(at, 12, 2.66, 1, caseAllCaps), + inherit: { + fontFamily: 'inherit', + fontWeight: 'inherit', + fontSize: 'inherit', + lineHeight: 'inherit', + letterSpacing: 'inherit', + }, + } + return deepmerge$1( + _extends$u( + { + htmlFontSize: ct, + pxToRem: mt, + fontFamily: rt, + fontSize: it, + fontWeightLight: ot, + fontWeightRegular: at, + fontWeightMedium: st, + fontWeightBold: lt, + }, + yt, + ), + dt, + { clone: !1 }, + ) + } + const shadowKeyUmbraOpacity = 0.2, + shadowKeyPenumbraOpacity = 0.14, + shadowAmbientShadowOpacity = 0.12 + function createShadow(...tt) { + return [ + `${tt[0]}px ${tt[1]}px ${tt[2]}px ${tt[3]}px rgba(0,0,0,${shadowKeyUmbraOpacity})`, + `${tt[4]}px ${tt[5]}px ${tt[6]}px ${tt[7]}px rgba(0,0,0,${shadowKeyPenumbraOpacity})`, + `${tt[8]}px ${tt[9]}px ${tt[10]}px ${tt[11]}px rgba(0,0,0,${shadowAmbientShadowOpacity})`, + ].join(',') + } + const shadows = [ + 'none', + createShadow(0, 2, 1, -1, 0, 1, 1, 0, 0, 1, 3, 0), + createShadow(0, 3, 1, -2, 0, 2, 2, 0, 0, 1, 5, 0), + createShadow(0, 3, 3, -2, 0, 3, 4, 0, 0, 1, 8, 0), + createShadow(0, 2, 4, -1, 0, 4, 5, 0, 0, 1, 10, 0), + createShadow(0, 3, 5, -1, 0, 5, 8, 0, 0, 1, 14, 0), + createShadow(0, 3, 5, -1, 0, 6, 10, 0, 0, 1, 18, 0), + createShadow(0, 4, 5, -2, 0, 7, 10, 1, 0, 2, 16, 1), + createShadow(0, 5, 5, -3, 0, 8, 10, 1, 0, 3, 14, 2), + createShadow(0, 5, 6, -3, 0, 9, 12, 1, 0, 3, 16, 2), + createShadow(0, 6, 6, -3, 0, 10, 14, 1, 0, 4, 18, 3), + createShadow(0, 6, 7, -4, 0, 11, 15, 1, 0, 4, 20, 3), + createShadow(0, 7, 8, -4, 0, 12, 17, 2, 0, 5, 22, 4), + createShadow(0, 7, 8, -4, 0, 13, 19, 2, 0, 5, 24, 4), + createShadow(0, 7, 9, -4, 0, 14, 21, 2, 0, 5, 26, 4), + createShadow(0, 8, 9, -5, 0, 15, 22, 2, 0, 6, 28, 5), + createShadow(0, 8, 10, -5, 0, 16, 24, 2, 0, 6, 30, 5), + createShadow(0, 8, 11, -5, 0, 17, 26, 2, 0, 6, 32, 5), + createShadow(0, 9, 11, -5, 0, 18, 28, 2, 0, 7, 34, 6), + createShadow(0, 9, 12, -6, 0, 19, 29, 2, 0, 7, 36, 6), + createShadow(0, 10, 13, -6, 0, 20, 31, 3, 0, 8, 38, 7), + createShadow(0, 10, 13, -6, 0, 21, 33, 3, 0, 8, 40, 7), + createShadow(0, 10, 14, -6, 0, 22, 35, 3, 0, 8, 42, 7), + createShadow(0, 11, 14, -7, 0, 23, 36, 3, 0, 9, 44, 8), + createShadow(0, 11, 15, -7, 0, 24, 38, 3, 0, 9, 46, 8), + ], + shadows$1 = shadows, + _excluded$1B = ['duration', 'easing', 'delay'], + easing$1 = { + easeInOut: 'cubic-bezier(0.4, 0, 0.2, 1)', + easeOut: 'cubic-bezier(0.0, 0, 0.2, 1)', + easeIn: 'cubic-bezier(0.4, 0, 1, 1)', + sharp: 'cubic-bezier(0.4, 0, 0.6, 1)', + }, + duration = { + shortest: 150, + shorter: 200, + short: 250, + standard: 300, + complex: 375, + enteringScreen: 225, + leavingScreen: 195, + } + function formatMs(tt) { + return `${Math.round(tt)}ms` + } + function getAutoHeightDuration(tt) { + if (!tt) return 0 + const et = tt / 36 + return Math.round((4 + 15 * et ** 0.25 + et / 5) * 10) + } + function createTransitions(tt) { + const et = _extends$u({}, easing$1, tt.easing), + nt = _extends$u({}, duration, tt.duration) + return _extends$u( + { + getAutoHeightDuration, + create: (it = ['all'], ot = {}) => { + const { duration: at = nt.standard, easing: st = et.easeInOut, delay: lt = 0 } = ot + return ( + _objectWithoutPropertiesLoose$m(ot, _excluded$1B), + (Array.isArray(it) ? it : [it]) + .map( + (ct) => + `${ct} ${typeof at == 'string' ? at : formatMs(at)} ${st} ${ + typeof lt == 'string' ? lt : formatMs(lt) + }`, + ) + .join(',') + ) + }, + }, + tt, + { easing: et, duration: nt }, + ) + } + const zIndex = { + mobileStepper: 1e3, + fab: 1050, + speedDial: 1050, + appBar: 1100, + drawer: 1200, + modal: 1300, + snackbar: 1400, + tooltip: 1500, + }, + zIndex$1 = zIndex, + _excluded$1A = ['breakpoints', 'mixins', 'spacing', 'palette', 'transitions', 'typography', 'shape'] + function createTheme(tt = {}, ...et) { + const { mixins: nt = {}, palette: rt = {}, transitions: it = {}, typography: ot = {} } = tt, + at = _objectWithoutPropertiesLoose$m(tt, _excluded$1A) + if (tt.vars) throw new Error(formatMuiErrorMessage(18)) + const st = createPalette(rt), + lt = createTheme$1(tt) + let ct = deepmerge$1(lt, { + mixins: createMixins(lt.breakpoints, nt), + palette: st, + shadows: shadows$1.slice(), + typography: createTypography(st, ot), + transitions: createTransitions(it), + zIndex: _extends$u({}, zIndex$1), + }) + return ( + (ct = deepmerge$1(ct, at)), + (ct = et.reduce((ut, ht) => deepmerge$1(ut, ht), ct)), + (ct.unstable_sxConfig = _extends$u({}, defaultSxConfig$1, at == null ? void 0 : at.unstable_sxConfig)), + (ct.unstable_sx = function (ht) { + return styleFunctionSx$1({ sx: ht, theme: this }) + }), + ct + ) + } + function getUnit$1(tt) { + return String(tt).match(/[\d.\-+]*\s*(.*)/)[1] || '' + } + function toUnitless(tt) { + return parseFloat(tt) + } + const defaultTheme = createTheme(), + defaultTheme$1 = defaultTheme + function useTheme() { + const tt = useTheme$2(defaultTheme$1) + return tt[THEME_ID] || tt + } + function useThemeProps({ props: tt, name: et }) { + return useThemeProps$1({ props: tt, name: et, defaultTheme: defaultTheme$1, themeId: THEME_ID }) + } + const rootShouldForwardProp = (tt) => shouldForwardProp(tt) && tt !== 'classes', + slotShouldForwardProp = shouldForwardProp, + styled = createStyled({ themeId: THEME_ID, defaultTheme: defaultTheme$1, rootShouldForwardProp }), + styled$1 = styled, + _excluded$1z = ['theme'] + function ThemeProvider(tt) { + let { theme: et } = tt, + nt = _objectWithoutPropertiesLoose$m(tt, _excluded$1z) + const rt = et[THEME_ID] + return jsxRuntimeExports.jsx( + ThemeProvider$1, + _extends$u({}, nt, { themeId: rt ? THEME_ID : void 0, theme: rt || et }), + ) + } + const getOverlayAlpha = (tt) => { + let et + return tt < 1 ? (et = 5.11916 * tt ** 2) : (et = 4.5 * Math.log(tt + 1) + 2), (et / 100).toFixed(2) + }, + getOverlayAlpha$1 = getOverlayAlpha + function r$8(tt) { + var et, + nt, + rt = '' + if (typeof tt == 'string' || typeof tt == 'number') rt += tt + else if (typeof tt == 'object') + if (Array.isArray(tt)) + for (et = 0; et < tt.length; et++) tt[et] && (nt = r$8(tt[et])) && (rt && (rt += ' '), (rt += nt)) + else for (et in tt) tt[et] && (rt && (rt += ' '), (rt += et)) + return rt + } + function clsx$3() { + for (var tt, et, nt = 0, rt = ''; nt < arguments.length; ) + (tt = arguments[nt++]) && (et = r$8(tt)) && (rt && (rt += ' '), (rt += et)) + return rt + } + function getSvgIconUtilityClass(tt) { + return generateUtilityClass('MuiSvgIcon', tt) + } + generateUtilityClasses('MuiSvgIcon', [ + 'root', + 'colorPrimary', + 'colorSecondary', + 'colorAction', + 'colorError', + 'colorDisabled', + 'fontSizeInherit', + 'fontSizeSmall', + 'fontSizeMedium', + 'fontSizeLarge', + ]) + const _excluded$1y = [ + 'children', + 'className', + 'color', + 'component', + 'fontSize', + 'htmlColor', + 'inheritViewBox', + 'titleAccess', + 'viewBox', + ], + useUtilityClasses$W = (tt) => { + const { color: et, fontSize: nt, classes: rt } = tt, + it = { root: ['root', et !== 'inherit' && `color${capitalize(et)}`, `fontSize${capitalize(nt)}`] } + return composeClasses(it, getSvgIconUtilityClass, rt) + }, + SvgIconRoot = styled$1('svg', { + name: 'MuiSvgIcon', + slot: 'Root', + overridesResolver: (tt, et) => { + const { ownerState: nt } = tt + return [ + et.root, + nt.color !== 'inherit' && et[`color${capitalize(nt.color)}`], + et[`fontSize${capitalize(nt.fontSize)}`], + ] + }, + })(({ theme: tt, ownerState: et }) => { + var nt, rt, it, ot, at, st, lt, ct, ut, ht, dt, pt, mt + return { + userSelect: 'none', + width: '1em', + height: '1em', + display: 'inline-block', + fill: et.hasSvgAsChild ? void 0 : 'currentColor', + flexShrink: 0, + transition: + (nt = tt.transitions) == null || (rt = nt.create) == null + ? void 0 + : rt.call(nt, 'fill', { + duration: (it = tt.transitions) == null || (it = it.duration) == null ? void 0 : it.shorter, + }), + fontSize: { + inherit: 'inherit', + small: ((ot = tt.typography) == null || (at = ot.pxToRem) == null ? void 0 : at.call(ot, 20)) || '1.25rem', + medium: ((st = tt.typography) == null || (lt = st.pxToRem) == null ? void 0 : lt.call(st, 24)) || '1.5rem', + large: ((ct = tt.typography) == null || (ut = ct.pxToRem) == null ? void 0 : ut.call(ct, 35)) || '2.1875rem', + }[et.fontSize], + color: + (ht = (dt = (tt.vars || tt).palette) == null || (dt = dt[et.color]) == null ? void 0 : dt.main) != null + ? ht + : { + action: (pt = (tt.vars || tt).palette) == null || (pt = pt.action) == null ? void 0 : pt.active, + disabled: (mt = (tt.vars || tt).palette) == null || (mt = mt.action) == null ? void 0 : mt.disabled, + inherit: void 0, + }[et.color], + } + }), + SvgIcon = reactExports.forwardRef(function (et, nt) { + const rt = useThemeProps({ props: et, name: 'MuiSvgIcon' }), + { + children: it, + className: ot, + color: at = 'inherit', + component: st = 'svg', + fontSize: lt = 'medium', + htmlColor: ct, + inheritViewBox: ut = !1, + titleAccess: ht, + viewBox: dt = '0 0 24 24', + } = rt, + pt = _objectWithoutPropertiesLoose$m(rt, _excluded$1y), + mt = reactExports.isValidElement(it) && it.type === 'svg', + gt = _extends$u({}, rt, { + color: at, + component: st, + fontSize: lt, + instanceFontSize: et.fontSize, + inheritViewBox: ut, + viewBox: dt, + hasSvgAsChild: mt, + }), + yt = {} + ut || (yt.viewBox = dt) + const bt = useUtilityClasses$W(gt) + return jsxRuntimeExports.jsxs( + SvgIconRoot, + _extends$u( + { + as: st, + className: clsx$3(bt.root, ot), + focusable: 'false', + color: ct, + 'aria-hidden': ht ? void 0 : !0, + role: ht ? 'img' : void 0, + ref: nt, + }, + yt, + pt, + mt && it.props, + { + ownerState: gt, + children: [mt ? it.props.children : it, ht ? jsxRuntimeExports.jsx('title', { children: ht }) : null], + }, + ), + ) + }) + SvgIcon.muiName = 'SvgIcon' + const SvgIcon$1 = SvgIcon + function createSvgIcon(tt, et) { + function nt(rt, it) { + return jsxRuntimeExports.jsx(SvgIcon$1, _extends$u({ 'data-testid': `${et}Icon`, ref: it }, rt, { children: tt })) + } + return (nt.muiName = SvgIcon$1.muiName), reactExports.memo(reactExports.forwardRef(nt)) + } + function _setPrototypeOf$c(tt, et) { + return ( + (_setPrototypeOf$c = Object.setPrototypeOf + ? Object.setPrototypeOf.bind() + : function (rt, it) { + return (rt.__proto__ = it), rt + }), + _setPrototypeOf$c(tt, et) + ) + } + function _inheritsLoose$2(tt, et) { + ;(tt.prototype = Object.create(et.prototype)), (tt.prototype.constructor = tt), _setPrototypeOf$c(tt, et) + } + function hasClass(tt, et) { + return tt.classList + ? !!et && tt.classList.contains(et) + : (' ' + (tt.className.baseVal || tt.className) + ' ').indexOf(' ' + et + ' ') !== -1 + } + function addClass(tt, et) { + tt.classList + ? tt.classList.add(et) + : hasClass(tt, et) || + (typeof tt.className == 'string' + ? (tt.className = tt.className + ' ' + et) + : tt.setAttribute('class', ((tt.className && tt.className.baseVal) || '') + ' ' + et)) + } + function replaceClassName(tt, et) { + return tt + .replace(new RegExp('(^|\\s)' + et + '(?:\\s|$)', 'g'), '$1') + .replace(/\s+/g, ' ') + .replace(/^\s*|\s*$/g, '') + } + function removeClass$1(tt, et) { + tt.classList + ? tt.classList.remove(et) + : typeof tt.className == 'string' + ? (tt.className = replaceClassName(tt.className, et)) + : tt.setAttribute('class', replaceClassName((tt.className && tt.className.baseVal) || '', et)) + } + const config$2 = { disabled: !1 }, + TransitionGroupContext = React$1.createContext(null) + var forceReflow = function (et) { + return et.scrollTop + }, + UNMOUNTED = 'unmounted', + EXITED = 'exited', + ENTERING = 'entering', + ENTERED = 'entered', + EXITING = 'exiting', + Transition$1 = (function (tt) { + _inheritsLoose$2(et, tt) + function et(rt, it) { + var ot + ot = tt.call(this, rt, it) || this + var at = it, + st = at && !at.isMounting ? rt.enter : rt.appear, + lt + return ( + (ot.appearStatus = null), + rt.in + ? st + ? ((lt = EXITED), (ot.appearStatus = ENTERING)) + : (lt = ENTERED) + : rt.unmountOnExit || rt.mountOnEnter + ? (lt = UNMOUNTED) + : (lt = EXITED), + (ot.state = { status: lt }), + (ot.nextCallback = null), + ot + ) + } + et.getDerivedStateFromProps = function (it, ot) { + var at = it.in + return at && ot.status === UNMOUNTED ? { status: EXITED } : null + } + var nt = et.prototype + return ( + (nt.componentDidMount = function () { + this.updateStatus(!0, this.appearStatus) + }), + (nt.componentDidUpdate = function (it) { + var ot = null + if (it !== this.props) { + var at = this.state.status + this.props.in + ? at !== ENTERING && at !== ENTERED && (ot = ENTERING) + : (at === ENTERING || at === ENTERED) && (ot = EXITING) + } + this.updateStatus(!1, ot) + }), + (nt.componentWillUnmount = function () { + this.cancelNextCallback() + }), + (nt.getTimeouts = function () { + var it = this.props.timeout, + ot, + at, + st + return ( + (ot = at = st = it), + it != null && + typeof it != 'number' && + ((ot = it.exit), (at = it.enter), (st = it.appear !== void 0 ? it.appear : at)), + { exit: ot, enter: at, appear: st } + ) + }), + (nt.updateStatus = function (it, ot) { + if ((it === void 0 && (it = !1), ot !== null)) + if ((this.cancelNextCallback(), ot === ENTERING)) { + if (this.props.unmountOnExit || this.props.mountOnEnter) { + var at = this.props.nodeRef ? this.props.nodeRef.current : ReactDOM.findDOMNode(this) + at && forceReflow(at) + } + this.performEnter(it) + } else this.performExit() + else this.props.unmountOnExit && this.state.status === EXITED && this.setState({ status: UNMOUNTED }) + }), + (nt.performEnter = function (it) { + var ot = this, + at = this.props.enter, + st = this.context ? this.context.isMounting : it, + lt = this.props.nodeRef ? [st] : [ReactDOM.findDOMNode(this), st], + ct = lt[0], + ut = lt[1], + ht = this.getTimeouts(), + dt = st ? ht.appear : ht.enter + if ((!it && !at) || config$2.disabled) { + this.safeSetState({ status: ENTERED }, function () { + ot.props.onEntered(ct) + }) + return + } + this.props.onEnter(ct, ut), + this.safeSetState({ status: ENTERING }, function () { + ot.props.onEntering(ct, ut), + ot.onTransitionEnd(dt, function () { + ot.safeSetState({ status: ENTERED }, function () { + ot.props.onEntered(ct, ut) + }) + }) + }) + }), + (nt.performExit = function () { + var it = this, + ot = this.props.exit, + at = this.getTimeouts(), + st = this.props.nodeRef ? void 0 : ReactDOM.findDOMNode(this) + if (!ot || config$2.disabled) { + this.safeSetState({ status: EXITED }, function () { + it.props.onExited(st) + }) + return + } + this.props.onExit(st), + this.safeSetState({ status: EXITING }, function () { + it.props.onExiting(st), + it.onTransitionEnd(at.exit, function () { + it.safeSetState({ status: EXITED }, function () { + it.props.onExited(st) + }) + }) + }) + }), + (nt.cancelNextCallback = function () { + this.nextCallback !== null && (this.nextCallback.cancel(), (this.nextCallback = null)) + }), + (nt.safeSetState = function (it, ot) { + ;(ot = this.setNextCallback(ot)), this.setState(it, ot) + }), + (nt.setNextCallback = function (it) { + var ot = this, + at = !0 + return ( + (this.nextCallback = function (st) { + at && ((at = !1), (ot.nextCallback = null), it(st)) + }), + (this.nextCallback.cancel = function () { + at = !1 + }), + this.nextCallback + ) + }), + (nt.onTransitionEnd = function (it, ot) { + this.setNextCallback(ot) + var at = this.props.nodeRef ? this.props.nodeRef.current : ReactDOM.findDOMNode(this), + st = it == null && !this.props.addEndListener + if (!at || st) { + setTimeout(this.nextCallback, 0) + return + } + if (this.props.addEndListener) { + var lt = this.props.nodeRef ? [this.nextCallback] : [at, this.nextCallback], + ct = lt[0], + ut = lt[1] + this.props.addEndListener(ct, ut) + } + it != null && setTimeout(this.nextCallback, it) + }), + (nt.render = function () { + var it = this.state.status + if (it === UNMOUNTED) return null + var ot = this.props, + at = ot.children + ot.in, + ot.mountOnEnter, + ot.unmountOnExit, + ot.appear, + ot.enter, + ot.exit, + ot.timeout, + ot.addEndListener, + ot.onEnter, + ot.onEntering, + ot.onEntered, + ot.onExit, + ot.onExiting, + ot.onExited, + ot.nodeRef + var st = _objectWithoutPropertiesLoose$m(ot, [ + 'children', + 'in', + 'mountOnEnter', + 'unmountOnExit', + 'appear', + 'enter', + 'exit', + 'timeout', + 'addEndListener', + 'onEnter', + 'onEntering', + 'onEntered', + 'onExit', + 'onExiting', + 'onExited', + 'nodeRef', + ]) + return React$1.createElement( + TransitionGroupContext.Provider, + { value: null }, + typeof at == 'function' ? at(it, st) : React$1.cloneElement(React$1.Children.only(at), st), + ) + }), + et + ) + })(React$1.Component) + Transition$1.contextType = TransitionGroupContext + Transition$1.propTypes = {} + function noop$9() {} + Transition$1.defaultProps = { + in: !1, + mountOnEnter: !1, + unmountOnExit: !1, + appear: !1, + enter: !0, + exit: !0, + onEnter: noop$9, + onEntering: noop$9, + onEntered: noop$9, + onExit: noop$9, + onExiting: noop$9, + onExited: noop$9, + } + Transition$1.UNMOUNTED = UNMOUNTED + Transition$1.EXITED = EXITED + Transition$1.ENTERING = ENTERING + Transition$1.ENTERED = ENTERED + Transition$1.EXITING = EXITING + const Transition$2 = Transition$1 + var _addClass = function (et, nt) { + return ( + et && + nt && + nt.split(' ').forEach(function (rt) { + return addClass(et, rt) + }) + ) + }, + removeClass = function (et, nt) { + return ( + et && + nt && + nt.split(' ').forEach(function (rt) { + return removeClass$1(et, rt) + }) + ) + }, + CSSTransition = (function (tt) { + _inheritsLoose$2(et, tt) + function et() { + for (var rt, it = arguments.length, ot = new Array(it), at = 0; at < it; at++) ot[at] = arguments[at] + return ( + (rt = tt.call.apply(tt, [this].concat(ot)) || this), + (rt.appliedClasses = { appear: {}, enter: {}, exit: {} }), + (rt.onEnter = function (st, lt) { + var ct = rt.resolveArguments(st, lt), + ut = ct[0], + ht = ct[1] + rt.removeClasses(ut, 'exit'), + rt.addClass(ut, ht ? 'appear' : 'enter', 'base'), + rt.props.onEnter && rt.props.onEnter(st, lt) + }), + (rt.onEntering = function (st, lt) { + var ct = rt.resolveArguments(st, lt), + ut = ct[0], + ht = ct[1], + dt = ht ? 'appear' : 'enter' + rt.addClass(ut, dt, 'active'), rt.props.onEntering && rt.props.onEntering(st, lt) + }), + (rt.onEntered = function (st, lt) { + var ct = rt.resolveArguments(st, lt), + ut = ct[0], + ht = ct[1], + dt = ht ? 'appear' : 'enter' + rt.removeClasses(ut, dt), rt.addClass(ut, dt, 'done'), rt.props.onEntered && rt.props.onEntered(st, lt) + }), + (rt.onExit = function (st) { + var lt = rt.resolveArguments(st), + ct = lt[0] + rt.removeClasses(ct, 'appear'), + rt.removeClasses(ct, 'enter'), + rt.addClass(ct, 'exit', 'base'), + rt.props.onExit && rt.props.onExit(st) + }), + (rt.onExiting = function (st) { + var lt = rt.resolveArguments(st), + ct = lt[0] + rt.addClass(ct, 'exit', 'active'), rt.props.onExiting && rt.props.onExiting(st) + }), + (rt.onExited = function (st) { + var lt = rt.resolveArguments(st), + ct = lt[0] + rt.removeClasses(ct, 'exit'), rt.addClass(ct, 'exit', 'done'), rt.props.onExited && rt.props.onExited(st) + }), + (rt.resolveArguments = function (st, lt) { + return rt.props.nodeRef ? [rt.props.nodeRef.current, st] : [st, lt] + }), + (rt.getClassNames = function (st) { + var lt = rt.props.classNames, + ct = typeof lt == 'string', + ut = ct && lt ? lt + '-' : '', + ht = ct ? '' + ut + st : lt[st], + dt = ct ? ht + '-active' : lt[st + 'Active'], + pt = ct ? ht + '-done' : lt[st + 'Done'] + return { baseClassName: ht, activeClassName: dt, doneClassName: pt } + }), + rt + ) + } + var nt = et.prototype + return ( + (nt.addClass = function (it, ot, at) { + var st = this.getClassNames(ot)[at + 'ClassName'], + lt = this.getClassNames('enter'), + ct = lt.doneClassName + ot === 'appear' && at === 'done' && ct && (st += ' ' + ct), + at === 'active' && it && forceReflow(it), + st && ((this.appliedClasses[ot][at] = st), _addClass(it, st)) + }), + (nt.removeClasses = function (it, ot) { + var at = this.appliedClasses[ot], + st = at.base, + lt = at.active, + ct = at.done + ;(this.appliedClasses[ot] = {}), + st && removeClass(it, st), + lt && removeClass(it, lt), + ct && removeClass(it, ct) + }), + (nt.render = function () { + var it = this.props + it.classNames + var ot = _objectWithoutPropertiesLoose$m(it, ['classNames']) + return React$1.createElement( + Transition$2, + _extends$u({}, ot, { + onEnter: this.onEnter, + onEntered: this.onEntered, + onEntering: this.onEntering, + onExit: this.onExit, + onExiting: this.onExiting, + onExited: this.onExited, + }), + ) + }), + et + ) + })(React$1.Component) + CSSTransition.defaultProps = { classNames: '' } + CSSTransition.propTypes = {} + const CSSTransition$1 = CSSTransition + function _assertThisInitialized$d(tt) { + if (tt === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called") + return tt + } + function getChildMapping(tt, et) { + var nt = function (ot) { + return et && reactExports.isValidElement(ot) ? et(ot) : ot + }, + rt = Object.create(null) + return ( + tt && + reactExports.Children.map(tt, function (it) { + return it + }).forEach(function (it) { + rt[it.key] = nt(it) + }), + rt + ) + } + function mergeChildMappings(tt, et) { + ;(tt = tt || {}), (et = et || {}) + function nt(ut) { + return ut in et ? et[ut] : tt[ut] + } + var rt = Object.create(null), + it = [] + for (var ot in tt) ot in et ? it.length && ((rt[ot] = it), (it = [])) : it.push(ot) + var at, + st = {} + for (var lt in et) { + if (rt[lt]) + for (at = 0; at < rt[lt].length; at++) { + var ct = rt[lt][at] + st[rt[lt][at]] = nt(ct) + } + st[lt] = nt(lt) + } + for (at = 0; at < it.length; at++) st[it[at]] = nt(it[at]) + return st + } + function getProp(tt, et, nt) { + return nt[et] != null ? nt[et] : tt.props[et] + } + function getInitialChildMapping(tt, et) { + return getChildMapping(tt.children, function (nt) { + return reactExports.cloneElement(nt, { + onExited: et.bind(null, nt), + in: !0, + appear: getProp(nt, 'appear', tt), + enter: getProp(nt, 'enter', tt), + exit: getProp(nt, 'exit', tt), + }) + }) + } + function getNextChildMapping(tt, et, nt) { + var rt = getChildMapping(tt.children), + it = mergeChildMappings(et, rt) + return ( + Object.keys(it).forEach(function (ot) { + var at = it[ot] + if (reactExports.isValidElement(at)) { + var st = ot in et, + lt = ot in rt, + ct = et[ot], + ut = reactExports.isValidElement(ct) && !ct.props.in + lt && (!st || ut) + ? (it[ot] = reactExports.cloneElement(at, { + onExited: nt.bind(null, at), + in: !0, + exit: getProp(at, 'exit', tt), + enter: getProp(at, 'enter', tt), + })) + : !lt && st && !ut + ? (it[ot] = reactExports.cloneElement(at, { in: !1 })) + : lt && + st && + reactExports.isValidElement(ct) && + (it[ot] = reactExports.cloneElement(at, { + onExited: nt.bind(null, at), + in: ct.props.in, + exit: getProp(at, 'exit', tt), + enter: getProp(at, 'enter', tt), + })) + } + }), + it + ) + } + var values = + Object.values || + function (tt) { + return Object.keys(tt).map(function (et) { + return tt[et] + }) + }, + defaultProps$7 = { + component: 'div', + childFactory: function (et) { + return et + }, + }, + TransitionGroup = (function (tt) { + _inheritsLoose$2(et, tt) + function et(rt, it) { + var ot + ot = tt.call(this, rt, it) || this + var at = ot.handleExited.bind(_assertThisInitialized$d(ot)) + return (ot.state = { contextValue: { isMounting: !0 }, handleExited: at, firstRender: !0 }), ot + } + var nt = et.prototype + return ( + (nt.componentDidMount = function () { + ;(this.mounted = !0), this.setState({ contextValue: { isMounting: !1 } }) + }), + (nt.componentWillUnmount = function () { + this.mounted = !1 + }), + (et.getDerivedStateFromProps = function (it, ot) { + var at = ot.children, + st = ot.handleExited, + lt = ot.firstRender + return { children: lt ? getInitialChildMapping(it, st) : getNextChildMapping(it, at, st), firstRender: !1 } + }), + (nt.handleExited = function (it, ot) { + var at = getChildMapping(this.props.children) + it.key in at || + (it.props.onExited && it.props.onExited(ot), + this.mounted && + this.setState(function (st) { + var lt = _extends$u({}, st.children) + return delete lt[it.key], { children: lt } + })) + }), + (nt.render = function () { + var it = this.props, + ot = it.component, + at = it.childFactory, + st = _objectWithoutPropertiesLoose$m(it, ['component', 'childFactory']), + lt = this.state.contextValue, + ct = values(this.state.children).map(at) + return ( + delete st.appear, + delete st.enter, + delete st.exit, + ot === null + ? React$1.createElement(TransitionGroupContext.Provider, { value: lt }, ct) + : React$1.createElement(TransitionGroupContext.Provider, { value: lt }, React$1.createElement(ot, st, ct)) + ) + }), + et + ) + })(React$1.Component) + TransitionGroup.propTypes = {} + TransitionGroup.defaultProps = defaultProps$7 + const TransitionGroup$1 = TransitionGroup, + reflow = (tt) => tt.scrollTop + function getTransitionProps(tt, et) { + var nt, rt + const { timeout: it, easing: ot, style: at = {} } = tt + return { + duration: (nt = at.transitionDuration) != null ? nt : typeof it == 'number' ? it : it[et.mode] || 0, + easing: (rt = at.transitionTimingFunction) != null ? rt : typeof ot == 'object' ? ot[et.mode] : ot, + delay: at.transitionDelay, + } + } + function getPaperUtilityClass(tt) { + return generateUtilityClass('MuiPaper', tt) + } + generateUtilityClasses('MuiPaper', [ + 'root', + 'rounded', + 'outlined', + 'elevation', + 'elevation0', + 'elevation1', + 'elevation2', + 'elevation3', + 'elevation4', + 'elevation5', + 'elevation6', + 'elevation7', + 'elevation8', + 'elevation9', + 'elevation10', + 'elevation11', + 'elevation12', + 'elevation13', + 'elevation14', + 'elevation15', + 'elevation16', + 'elevation17', + 'elevation18', + 'elevation19', + 'elevation20', + 'elevation21', + 'elevation22', + 'elevation23', + 'elevation24', + ]) + const _excluded$1x = ['className', 'component', 'elevation', 'square', 'variant'], + useUtilityClasses$V = (tt) => { + const { square: et, elevation: nt, variant: rt, classes: it } = tt, + ot = { root: ['root', rt, !et && 'rounded', rt === 'elevation' && `elevation${nt}`] } + return composeClasses(ot, getPaperUtilityClass, it) + }, + PaperRoot = styled$1('div', { + name: 'MuiPaper', + slot: 'Root', + overridesResolver: (tt, et) => { + const { ownerState: nt } = tt + return [ + et.root, + et[nt.variant], + !nt.square && et.rounded, + nt.variant === 'elevation' && et[`elevation${nt.elevation}`], + ] + }, + })(({ theme: tt, ownerState: et }) => { + var nt + return _extends$u( + { + backgroundColor: (tt.vars || tt).palette.background.paper, + color: (tt.vars || tt).palette.text.primary, + transition: tt.transitions.create('box-shadow'), + }, + !et.square && { borderRadius: tt.shape.borderRadius }, + et.variant === 'outlined' && { border: `1px solid ${(tt.vars || tt).palette.divider}` }, + et.variant === 'elevation' && + _extends$u( + { boxShadow: (tt.vars || tt).shadows[et.elevation] }, + !tt.vars && + tt.palette.mode === 'dark' && { + backgroundImage: `linear-gradient(${alpha$1('#fff', getOverlayAlpha$1(et.elevation))}, ${alpha$1( + '#fff', + getOverlayAlpha$1(et.elevation), + )})`, + }, + tt.vars && { backgroundImage: (nt = tt.vars.overlays) == null ? void 0 : nt[et.elevation] }, + ), + ) + }), + Paper = reactExports.forwardRef(function (et, nt) { + const rt = useThemeProps({ props: et, name: 'MuiPaper' }), + { className: it, component: ot = 'div', elevation: at = 1, square: st = !1, variant: lt = 'elevation' } = rt, + ct = _objectWithoutPropertiesLoose$m(rt, _excluded$1x), + ut = _extends$u({}, rt, { component: ot, elevation: at, square: st, variant: lt }), + ht = useUtilityClasses$V(ut) + return jsxRuntimeExports.jsx( + PaperRoot, + _extends$u({ as: ot, ownerState: ut, className: clsx$3(ht.root, it), ref: nt }, ct), + ) + }), + Paper$1 = Paper + function Ripple(tt) { + const { + className: et, + classes: nt, + pulsate: rt = !1, + rippleX: it, + rippleY: ot, + rippleSize: at, + in: st, + onExited: lt, + timeout: ct, + } = tt, + [ut, ht] = reactExports.useState(!1), + dt = clsx$3(et, nt.ripple, nt.rippleVisible, rt && nt.ripplePulsate), + pt = { width: at, height: at, top: -(at / 2) + ot, left: -(at / 2) + it }, + mt = clsx$3(nt.child, ut && nt.childLeaving, rt && nt.childPulsate) + return ( + !st && !ut && ht(!0), + reactExports.useEffect(() => { + if (!st && lt != null) { + const gt = setTimeout(lt, ct) + return () => { + clearTimeout(gt) + } + } + }, [lt, st, ct]), + jsxRuntimeExports.jsx('span', { + className: dt, + style: pt, + children: jsxRuntimeExports.jsx('span', { className: mt }), + }) + ) + } + const touchRippleClasses = generateUtilityClasses('MuiTouchRipple', [ + 'root', + 'ripple', + 'rippleVisible', + 'ripplePulsate', + 'child', + 'childLeaving', + 'childPulsate', + ]), + touchRippleClasses$1 = touchRippleClasses, + _excluded$1v = ['center', 'classes', 'className'] + let _$1 = (tt) => tt, + _t$1, + _t2$1, + _t3$1, + _t4$1 + const DURATION = 550, + DELAY_RIPPLE = 80, + enterKeyframe = keyframes( + _t$1 || + (_t$1 = _$1` + 0% { + transform: scale(0); + opacity: 0.1; + } + + 100% { + transform: scale(1); + opacity: 0.3; + } +`), + ), + exitKeyframe = keyframes( + _t2$1 || + (_t2$1 = _$1` + 0% { + opacity: 1; + } + + 100% { + opacity: 0; + } +`), + ), + pulsateKeyframe = keyframes( + _t3$1 || + (_t3$1 = _$1` + 0% { + transform: scale(1); + } + + 50% { + transform: scale(0.92); + } + + 100% { + transform: scale(1); + } +`), + ), + TouchRippleRoot = styled$1('span', { name: 'MuiTouchRipple', slot: 'Root' })({ + overflow: 'hidden', + pointerEvents: 'none', + position: 'absolute', + zIndex: 0, + top: 0, + right: 0, + bottom: 0, + left: 0, + borderRadius: 'inherit', + }), + TouchRippleRipple = styled$1(Ripple, { name: 'MuiTouchRipple', slot: 'Ripple' })( + _t4$1 || + (_t4$1 = _$1` + opacity: 0; + position: absolute; + + &.${0} { + opacity: 0.3; + transform: scale(1); + animation-name: ${0}; + animation-duration: ${0}ms; + animation-timing-function: ${0}; + } + + &.${0} { + animation-duration: ${0}ms; + } + + & .${0} { + opacity: 1; + display: block; + width: 100%; + height: 100%; + border-radius: 50%; + background-color: currentColor; + } + + & .${0} { + opacity: 0; + animation-name: ${0}; + animation-duration: ${0}ms; + animation-timing-function: ${0}; + } + + & .${0} { + position: absolute; + /* @noflip */ + left: 0px; + top: 0; + animation-name: ${0}; + animation-duration: 2500ms; + animation-timing-function: ${0}; + animation-iteration-count: infinite; + animation-delay: 200ms; + } +`), + touchRippleClasses$1.rippleVisible, + enterKeyframe, + DURATION, + ({ theme: tt }) => tt.transitions.easing.easeInOut, + touchRippleClasses$1.ripplePulsate, + ({ theme: tt }) => tt.transitions.duration.shorter, + touchRippleClasses$1.child, + touchRippleClasses$1.childLeaving, + exitKeyframe, + DURATION, + ({ theme: tt }) => tt.transitions.easing.easeInOut, + touchRippleClasses$1.childPulsate, + pulsateKeyframe, + ({ theme: tt }) => tt.transitions.easing.easeInOut, + ), + TouchRipple = reactExports.forwardRef(function (et, nt) { + const rt = useThemeProps({ props: et, name: 'MuiTouchRipple' }), + { center: it = !1, classes: ot = {}, className: at } = rt, + st = _objectWithoutPropertiesLoose$m(rt, _excluded$1v), + [lt, ct] = reactExports.useState([]), + ut = reactExports.useRef(0), + ht = reactExports.useRef(null) + reactExports.useEffect(() => { + ht.current && (ht.current(), (ht.current = null)) + }, [lt]) + const dt = reactExports.useRef(!1), + pt = reactExports.useRef(0), + mt = reactExports.useRef(null), + gt = reactExports.useRef(null) + reactExports.useEffect( + () => () => { + pt.current && clearTimeout(pt.current) + }, + [], + ) + const yt = reactExports.useCallback( + (kt) => { + const { pulsate: St, rippleX: Tt, rippleY: At, rippleSize: Et, cb: $t } = kt + ct((Dt) => [ + ...Dt, + jsxRuntimeExports.jsx( + TouchRippleRipple, + { + classes: { + ripple: clsx$3(ot.ripple, touchRippleClasses$1.ripple), + rippleVisible: clsx$3(ot.rippleVisible, touchRippleClasses$1.rippleVisible), + ripplePulsate: clsx$3(ot.ripplePulsate, touchRippleClasses$1.ripplePulsate), + child: clsx$3(ot.child, touchRippleClasses$1.child), + childLeaving: clsx$3(ot.childLeaving, touchRippleClasses$1.childLeaving), + childPulsate: clsx$3(ot.childPulsate, touchRippleClasses$1.childPulsate), + }, + timeout: DURATION, + pulsate: St, + rippleX: Tt, + rippleY: At, + rippleSize: Et, + }, + ut.current, + ), + ]), + (ut.current += 1), + (ht.current = $t) + }, + [ot], + ), + bt = reactExports.useCallback( + (kt = {}, St = {}, Tt = () => {}) => { + const { pulsate: At = !1, center: Et = it || St.pulsate, fakeElement: $t = !1 } = St + if ((kt == null ? void 0 : kt.type) === 'mousedown' && dt.current) { + dt.current = !1 + return + } + ;(kt == null ? void 0 : kt.type) === 'touchstart' && (dt.current = !0) + const Dt = $t ? null : gt.current, + jt = Dt ? Dt.getBoundingClientRect() : { width: 0, height: 0, left: 0, top: 0 } + let Pt, Ct, wt + if (Et || kt === void 0 || (kt.clientX === 0 && kt.clientY === 0) || (!kt.clientX && !kt.touches)) + (Pt = Math.round(jt.width / 2)), (Ct = Math.round(jt.height / 2)) + else { + const { clientX: It, clientY: Ot } = kt.touches && kt.touches.length > 0 ? kt.touches[0] : kt + ;(Pt = Math.round(It - jt.left)), (Ct = Math.round(Ot - jt.top)) + } + if (Et) (wt = Math.sqrt((2 * jt.width ** 2 + jt.height ** 2) / 3)), wt % 2 === 0 && (wt += 1) + else { + const It = Math.max(Math.abs((Dt ? Dt.clientWidth : 0) - Pt), Pt) * 2 + 2, + Ot = Math.max(Math.abs((Dt ? Dt.clientHeight : 0) - Ct), Ct) * 2 + 2 + wt = Math.sqrt(It ** 2 + Ot ** 2) + } + kt != null && kt.touches + ? mt.current === null && + ((mt.current = () => { + yt({ pulsate: At, rippleX: Pt, rippleY: Ct, rippleSize: wt, cb: Tt }) + }), + (pt.current = setTimeout(() => { + mt.current && (mt.current(), (mt.current = null)) + }, DELAY_RIPPLE))) + : yt({ pulsate: At, rippleX: Pt, rippleY: Ct, rippleSize: wt, cb: Tt }) + }, + [it, yt], + ), + vt = reactExports.useCallback(() => { + bt({}, { pulsate: !0 }) + }, [bt]), + xt = reactExports.useCallback((kt, St) => { + if ((clearTimeout(pt.current), (kt == null ? void 0 : kt.type) === 'touchend' && mt.current)) { + mt.current(), + (mt.current = null), + (pt.current = setTimeout(() => { + xt(kt, St) + })) + return + } + ;(mt.current = null), ct((Tt) => (Tt.length > 0 ? Tt.slice(1) : Tt)), (ht.current = St) + }, []) + return ( + reactExports.useImperativeHandle(nt, () => ({ pulsate: vt, start: bt, stop: xt }), [vt, bt, xt]), + jsxRuntimeExports.jsx( + TouchRippleRoot, + _extends$u({ className: clsx$3(touchRippleClasses$1.root, ot.root, at), ref: gt }, st, { + children: jsxRuntimeExports.jsx(TransitionGroup$1, { component: null, exit: !0, children: lt }), + }), + ) + ) + }), + TouchRipple$1 = TouchRipple + function getButtonBaseUtilityClass(tt) { + return generateUtilityClass('MuiButtonBase', tt) + } + const buttonBaseClasses = generateUtilityClasses('MuiButtonBase', ['root', 'disabled', 'focusVisible']), + buttonBaseClasses$1 = buttonBaseClasses, + _excluded$1u = [ + 'action', + 'centerRipple', + 'children', + 'className', + 'component', + 'disabled', + 'disableRipple', + 'disableTouchRipple', + 'focusRipple', + 'focusVisibleClassName', + 'LinkComponent', + 'onBlur', + 'onClick', + 'onContextMenu', + 'onDragLeave', + 'onFocus', + 'onFocusVisible', + 'onKeyDown', + 'onKeyUp', + 'onMouseDown', + 'onMouseLeave', + 'onMouseUp', + 'onTouchEnd', + 'onTouchMove', + 'onTouchStart', + 'tabIndex', + 'TouchRippleProps', + 'touchRippleRef', + 'type', + ], + useUtilityClasses$U = (tt) => { + const { disabled: et, focusVisible: nt, focusVisibleClassName: rt, classes: it } = tt, + at = composeClasses({ root: ['root', et && 'disabled', nt && 'focusVisible'] }, getButtonBaseUtilityClass, it) + return nt && rt && (at.root += ` ${rt}`), at + }, + ButtonBaseRoot = styled$1('button', { + name: 'MuiButtonBase', + slot: 'Root', + overridesResolver: (tt, et) => et.root, + })({ + display: 'inline-flex', + alignItems: 'center', + justifyContent: 'center', + position: 'relative', + boxSizing: 'border-box', + WebkitTapHighlightColor: 'transparent', + backgroundColor: 'transparent', + outline: 0, + border: 0, + margin: 0, + borderRadius: 0, + padding: 0, + cursor: 'pointer', + userSelect: 'none', + verticalAlign: 'middle', + MozAppearance: 'none', + WebkitAppearance: 'none', + textDecoration: 'none', + color: 'inherit', + '&::-moz-focus-inner': { borderStyle: 'none' }, + [`&.${buttonBaseClasses$1.disabled}`]: { pointerEvents: 'none', cursor: 'default' }, + '@media print': { colorAdjust: 'exact' }, + }), + ButtonBase = reactExports.forwardRef(function (et, nt) { + const rt = useThemeProps({ props: et, name: 'MuiButtonBase' }), + { + action: it, + centerRipple: ot = !1, + children: at, + className: st, + component: lt = 'button', + disabled: ct = !1, + disableRipple: ut = !1, + disableTouchRipple: ht = !1, + focusRipple: dt = !1, + LinkComponent: pt = 'a', + onBlur: mt, + onClick: gt, + onContextMenu: yt, + onDragLeave: bt, + onFocus: vt, + onFocusVisible: xt, + onKeyDown: kt, + onKeyUp: St, + onMouseDown: Tt, + onMouseLeave: At, + onMouseUp: Et, + onTouchEnd: $t, + onTouchMove: Dt, + onTouchStart: jt, + tabIndex: Pt = 0, + TouchRippleProps: Ct, + touchRippleRef: wt, + type: It, + } = rt, + Ot = _objectWithoutPropertiesLoose$m(rt, _excluded$1u), + Wt = reactExports.useRef(null), + zt = reactExports.useRef(null), + Ft = useForkRef(zt, wt), + { isFocusVisibleRef: Nt, onFocus: Ut, onBlur: Mt, ref: Ht } = useIsFocusVisible(), + [en, sn] = reactExports.useState(!1) + ct && en && sn(!1), + reactExports.useImperativeHandle( + it, + () => ({ + focusVisible: () => { + sn(!0), Wt.current.focus() + }, + }), + [], + ) + const [Kt, rn] = reactExports.useState(!1) + reactExports.useEffect(() => { + rn(!0) + }, []) + const nn = Kt && !ut && !ct + reactExports.useEffect(() => { + en && dt && !ut && Kt && zt.current.pulsate() + }, [ut, dt, en, Kt]) + function hn(Xt, Sn, Rn = ht) { + return useEventCallback((jn) => (Sn && Sn(jn), !Rn && zt.current && zt.current[Xt](jn), !0)) + } + const vn = hn('start', Tt), + an = hn('stop', yt), + Qt = hn('stop', bt), + _n = hn('stop', Et), + Pn = hn('stop', (Xt) => { + en && Xt.preventDefault(), At && At(Xt) + }), + $n = hn('start', jt), + Nn = hn('stop', $t), + Tn = hn('stop', Dt), + cn = hn( + 'stop', + (Xt) => { + Mt(Xt), Nt.current === !1 && sn(!1), mt && mt(Xt) + }, + !1, + ), + mn = useEventCallback((Xt) => { + Wt.current || (Wt.current = Xt.currentTarget), + Ut(Xt), + Nt.current === !0 && (sn(!0), xt && xt(Xt)), + vt && vt(Xt) + }), + In = () => { + const Xt = Wt.current + return lt && lt !== 'button' && !(Xt.tagName === 'A' && Xt.href) + }, + An = reactExports.useRef(!1), + wn = useEventCallback((Xt) => { + dt && + !An.current && + en && + zt.current && + Xt.key === ' ' && + ((An.current = !0), + zt.current.stop(Xt, () => { + zt.current.start(Xt) + })), + Xt.target === Xt.currentTarget && In() && Xt.key === ' ' && Xt.preventDefault(), + kt && kt(Xt), + Xt.target === Xt.currentTarget && In() && Xt.key === 'Enter' && !ct && (Xt.preventDefault(), gt && gt(Xt)) + }), + fn = useEventCallback((Xt) => { + dt && + Xt.key === ' ' && + zt.current && + en && + !Xt.defaultPrevented && + ((An.current = !1), + zt.current.stop(Xt, () => { + zt.current.pulsate(Xt) + })), + St && St(Xt), + gt && Xt.target === Xt.currentTarget && In() && Xt.key === ' ' && !Xt.defaultPrevented && gt(Xt) + }) + let pn = lt + pn === 'button' && (Ot.href || Ot.to) && (pn = pt) + const kn = {} + pn === 'button' + ? ((kn.type = It === void 0 ? 'button' : It), (kn.disabled = ct)) + : (!Ot.href && !Ot.to && (kn.role = 'button'), ct && (kn['aria-disabled'] = ct)) + const Dn = useForkRef(nt, Ht, Wt), + un = _extends$u({}, rt, { + centerRipple: ot, + component: lt, + disabled: ct, + disableRipple: ut, + disableTouchRipple: ht, + focusRipple: dt, + tabIndex: Pt, + focusVisible: en, + }), + Zt = useUtilityClasses$U(un) + return jsxRuntimeExports.jsxs( + ButtonBaseRoot, + _extends$u( + { + as: pn, + className: clsx$3(Zt.root, st), + ownerState: un, + onBlur: cn, + onClick: gt, + onContextMenu: an, + onFocus: mn, + onKeyDown: wn, + onKeyUp: fn, + onMouseDown: vn, + onMouseLeave: Pn, + onMouseUp: _n, + onDragLeave: Qt, + onTouchEnd: Nn, + onTouchMove: Tn, + onTouchStart: $n, + ref: Dn, + tabIndex: ct ? -1 : Pt, + type: It, + }, + kn, + Ot, + { children: [at, nn ? jsxRuntimeExports.jsx(TouchRipple$1, _extends$u({ ref: Ft, center: ot }, Ct)) : null] }, + ), + ) + }), + ButtonBase$1 = ButtonBase + function getIconButtonUtilityClass(tt) { + return generateUtilityClass('MuiIconButton', tt) + } + const iconButtonClasses = generateUtilityClasses('MuiIconButton', [ + 'root', + 'disabled', + 'colorInherit', + 'colorPrimary', + 'colorSecondary', + 'colorError', + 'colorInfo', + 'colorSuccess', + 'colorWarning', + 'edgeStart', + 'edgeEnd', + 'sizeSmall', + 'sizeMedium', + 'sizeLarge', + ]), + iconButtonClasses$1 = iconButtonClasses, + _excluded$1t = ['edge', 'children', 'className', 'color', 'disabled', 'disableFocusRipple', 'size'], + useUtilityClasses$T = (tt) => { + const { classes: et, disabled: nt, color: rt, edge: it, size: ot } = tt, + at = { + root: [ + 'root', + nt && 'disabled', + rt !== 'default' && `color${capitalize(rt)}`, + it && `edge${capitalize(it)}`, + `size${capitalize(ot)}`, + ], + } + return composeClasses(at, getIconButtonUtilityClass, et) + }, + IconButtonRoot = styled$1(ButtonBase$1, { + name: 'MuiIconButton', + slot: 'Root', + overridesResolver: (tt, et) => { + const { ownerState: nt } = tt + return [ + et.root, + nt.color !== 'default' && et[`color${capitalize(nt.color)}`], + nt.edge && et[`edge${capitalize(nt.edge)}`], + et[`size${capitalize(nt.size)}`], + ] + }, + })( + ({ theme: tt, ownerState: et }) => + _extends$u( + { + textAlign: 'center', + flex: '0 0 auto', + fontSize: tt.typography.pxToRem(24), + padding: 8, + borderRadius: '50%', + overflow: 'visible', + color: (tt.vars || tt).palette.action.active, + transition: tt.transitions.create('background-color', { duration: tt.transitions.duration.shortest }), + }, + !et.disableRipple && { + '&:hover': { + backgroundColor: tt.vars + ? `rgba(${tt.vars.palette.action.activeChannel} / ${tt.vars.palette.action.hoverOpacity})` + : alpha$1(tt.palette.action.active, tt.palette.action.hoverOpacity), + '@media (hover: none)': { backgroundColor: 'transparent' }, + }, + }, + et.edge === 'start' && { marginLeft: et.size === 'small' ? -3 : -12 }, + et.edge === 'end' && { marginRight: et.size === 'small' ? -3 : -12 }, + ), + ({ theme: tt, ownerState: et }) => { + var nt + const rt = (nt = (tt.vars || tt).palette) == null ? void 0 : nt[et.color] + return _extends$u( + {}, + et.color === 'inherit' && { color: 'inherit' }, + et.color !== 'inherit' && + et.color !== 'default' && + _extends$u( + { color: rt == null ? void 0 : rt.main }, + !et.disableRipple && { + '&:hover': _extends$u( + {}, + rt && { + backgroundColor: tt.vars + ? `rgba(${rt.mainChannel} / ${tt.vars.palette.action.hoverOpacity})` + : alpha$1(rt.main, tt.palette.action.hoverOpacity), + }, + { '@media (hover: none)': { backgroundColor: 'transparent' } }, + ), + }, + ), + et.size === 'small' && { padding: 5, fontSize: tt.typography.pxToRem(18) }, + et.size === 'large' && { padding: 12, fontSize: tt.typography.pxToRem(28) }, + { + [`&.${iconButtonClasses$1.disabled}`]: { + backgroundColor: 'transparent', + color: (tt.vars || tt).palette.action.disabled, + }, + }, + ) + }, + ), + IconButton$1 = reactExports.forwardRef(function (et, nt) { + const rt = useThemeProps({ props: et, name: 'MuiIconButton' }), + { + edge: it = !1, + children: ot, + className: at, + color: st = 'default', + disabled: lt = !1, + disableFocusRipple: ct = !1, + size: ut = 'medium', + } = rt, + ht = _objectWithoutPropertiesLoose$m(rt, _excluded$1t), + dt = _extends$u({}, rt, { edge: it, color: st, disabled: lt, disableFocusRipple: ct, size: ut }), + pt = useUtilityClasses$T(dt) + return jsxRuntimeExports.jsx( + IconButtonRoot, + _extends$u( + { className: clsx$3(pt.root, at), centerRipple: !0, focusRipple: !ct, disabled: lt, ref: nt, ownerState: dt }, + ht, + { children: ot }, + ), + ) + }), + IconButton$2 = IconButton$1 + function getTypographyUtilityClass(tt) { + return generateUtilityClass('MuiTypography', tt) + } + generateUtilityClasses('MuiTypography', [ + 'root', + 'h1', + 'h2', + 'h3', + 'h4', + 'h5', + 'h6', + 'subtitle1', + 'subtitle2', + 'body1', + 'body2', + 'inherit', + 'button', + 'caption', + 'overline', + 'alignLeft', + 'alignRight', + 'alignCenter', + 'alignJustify', + 'noWrap', + 'gutterBottom', + 'paragraph', + ]) + const _excluded$1s = [ + 'align', + 'className', + 'component', + 'gutterBottom', + 'noWrap', + 'paragraph', + 'variant', + 'variantMapping', + ], + useUtilityClasses$S = (tt) => { + const { align: et, gutterBottom: nt, noWrap: rt, paragraph: it, variant: ot, classes: at } = tt, + st = { + root: [ + 'root', + ot, + tt.align !== 'inherit' && `align${capitalize(et)}`, + nt && 'gutterBottom', + rt && 'noWrap', + it && 'paragraph', + ], + } + return composeClasses(st, getTypographyUtilityClass, at) + }, + TypographyRoot = styled$1('span', { + name: 'MuiTypography', + slot: 'Root', + overridesResolver: (tt, et) => { + const { ownerState: nt } = tt + return [ + et.root, + nt.variant && et[nt.variant], + nt.align !== 'inherit' && et[`align${capitalize(nt.align)}`], + nt.noWrap && et.noWrap, + nt.gutterBottom && et.gutterBottom, + nt.paragraph && et.paragraph, + ] + }, + })(({ theme: tt, ownerState: et }) => + _extends$u( + { margin: 0 }, + et.variant === 'inherit' && { font: 'inherit' }, + et.variant !== 'inherit' && tt.typography[et.variant], + et.align !== 'inherit' && { textAlign: et.align }, + et.noWrap && { overflow: 'hidden', textOverflow: 'ellipsis', whiteSpace: 'nowrap' }, + et.gutterBottom && { marginBottom: '0.35em' }, + et.paragraph && { marginBottom: 16 }, + ), + ), + defaultVariantMapping = { + h1: 'h1', + h2: 'h2', + h3: 'h3', + h4: 'h4', + h5: 'h5', + h6: 'h6', + subtitle1: 'h6', + subtitle2: 'h6', + body1: 'p', + body2: 'p', + inherit: 'p', + }, + colorTransformations = { + primary: 'primary.main', + textPrimary: 'text.primary', + secondary: 'secondary.main', + textSecondary: 'text.secondary', + error: 'error.main', + }, + transformDeprecatedColors = (tt) => colorTransformations[tt] || tt, + Typography = reactExports.forwardRef(function (et, nt) { + const rt = useThemeProps({ props: et, name: 'MuiTypography' }), + it = transformDeprecatedColors(rt.color), + ot = extendSxProp(_extends$u({}, rt, { color: it })), + { + align: at = 'inherit', + className: st, + component: lt, + gutterBottom: ct = !1, + noWrap: ut = !1, + paragraph: ht = !1, + variant: dt = 'body1', + variantMapping: pt = defaultVariantMapping, + } = ot, + mt = _objectWithoutPropertiesLoose$m(ot, _excluded$1s), + gt = _extends$u({}, ot, { + align: at, + color: it, + className: st, + component: lt, + gutterBottom: ct, + noWrap: ut, + paragraph: ht, + variant: dt, + variantMapping: pt, + }), + yt = lt || (ht ? 'p' : pt[dt] || defaultVariantMapping[dt]) || 'span', + bt = useUtilityClasses$S(gt) + return jsxRuntimeExports.jsx( + TypographyRoot, + _extends$u({ as: yt, ref: nt, ownerState: gt, className: clsx$3(bt.root, st) }, mt), + ) + }), + Typography$1 = Typography + function isHostComponent(tt) { + return typeof tt == 'string' + } + function appendOwnerState(tt, et, nt) { + return tt === void 0 || isHostComponent(tt) + ? et + : _extends$u({}, et, { ownerState: _extends$u({}, et.ownerState, nt) }) + } + function areArraysEqual$1(tt, et, nt = (rt, it) => rt === it) { + return tt.length === et.length && tt.every((rt, it) => nt(rt, et[it])) + } + const defaultContextValue = { disableDefaultClasses: !1 }, + ClassNameConfiguratorContext = reactExports.createContext(defaultContextValue) + function useClassNamesOverride(tt) { + const { disableDefaultClasses: et } = reactExports.useContext(ClassNameConfiguratorContext) + return (nt) => (et ? '' : tt(nt)) + } + function extractEventHandlers(tt, et = []) { + if (tt === void 0) return {} + const nt = {} + return ( + Object.keys(tt) + .filter((rt) => rt.match(/^on[A-Z]/) && typeof tt[rt] == 'function' && !et.includes(rt)) + .forEach((rt) => { + nt[rt] = tt[rt] + }), + nt + ) + } + function resolveComponentProps(tt, et, nt) { + return typeof tt == 'function' ? tt(et, nt) : tt + } + function r$7(tt) { + var et, + nt, + rt = '' + if (typeof tt == 'string' || typeof tt == 'number') rt += tt + else if (typeof tt == 'object') + if (Array.isArray(tt)) + for (et = 0; et < tt.length; et++) tt[et] && (nt = r$7(tt[et])) && (rt && (rt += ' '), (rt += nt)) + else for (et in tt) tt[et] && (rt && (rt += ' '), (rt += et)) + return rt + } + function clsx$2() { + for (var tt, et, nt = 0, rt = ''; nt < arguments.length; ) + (tt = arguments[nt++]) && (et = r$7(tt)) && (rt && (rt += ' '), (rt += et)) + return rt + } + function omitEventHandlers(tt) { + if (tt === void 0) return {} + const et = {} + return ( + Object.keys(tt) + .filter((nt) => !(nt.match(/^on[A-Z]/) && typeof tt[nt] == 'function')) + .forEach((nt) => { + et[nt] = tt[nt] + }), + et + ) + } + function mergeSlotProps(tt) { + const { + getSlotProps: et, + additionalProps: nt, + externalSlotProps: rt, + externalForwardedProps: it, + className: ot, + } = tt + if (!et) { + const pt = clsx$2( + it == null ? void 0 : it.className, + rt == null ? void 0 : rt.className, + ot, + nt == null ? void 0 : nt.className, + ), + mt = _extends$u( + {}, + nt == null ? void 0 : nt.style, + it == null ? void 0 : it.style, + rt == null ? void 0 : rt.style, + ), + gt = _extends$u({}, nt, it, rt) + return ( + pt.length > 0 && (gt.className = pt), + Object.keys(mt).length > 0 && (gt.style = mt), + { props: gt, internalRef: void 0 } + ) + } + const at = extractEventHandlers(_extends$u({}, it, rt)), + st = omitEventHandlers(rt), + lt = omitEventHandlers(it), + ct = et(at), + ut = clsx$2( + ct == null ? void 0 : ct.className, + nt == null ? void 0 : nt.className, + ot, + it == null ? void 0 : it.className, + rt == null ? void 0 : rt.className, + ), + ht = _extends$u( + {}, + ct == null ? void 0 : ct.style, + nt == null ? void 0 : nt.style, + it == null ? void 0 : it.style, + rt == null ? void 0 : rt.style, + ), + dt = _extends$u({}, ct, nt, lt, st) + return ( + ut.length > 0 && (dt.className = ut), + Object.keys(ht).length > 0 && (dt.style = ht), + { props: dt, internalRef: ct.ref } + ) + } + const _excluded$1r = ['elementType', 'externalSlotProps', 'ownerState', 'skipResolvingSlotProps'] + function useSlotProps(tt) { + var et + const { elementType: nt, externalSlotProps: rt, ownerState: it, skipResolvingSlotProps: ot = !1 } = tt, + at = _objectWithoutPropertiesLoose$m(tt, _excluded$1r), + st = ot ? {} : resolveComponentProps(rt, it), + { props: lt, internalRef: ct } = mergeSlotProps(_extends$u({}, at, { externalSlotProps: st })), + ut = useForkRef(ct, st == null ? void 0 : st.ref, (et = tt.additionalProps) == null ? void 0 : et.ref) + return appendOwnerState(nt, _extends$u({}, lt, { ref: ut }), it) + } + const candidatesSelector = [ + 'input', + 'select', + 'textarea', + 'a[href]', + 'button', + '[tabindex]', + 'audio[controls]', + 'video[controls]', + '[contenteditable]:not([contenteditable="false"])', + ].join(',') + function getTabIndex(tt) { + const et = parseInt(tt.getAttribute('tabindex') || '', 10) + return Number.isNaN(et) + ? tt.contentEditable === 'true' || + ((tt.nodeName === 'AUDIO' || tt.nodeName === 'VIDEO' || tt.nodeName === 'DETAILS') && + tt.getAttribute('tabindex') === null) + ? 0 + : tt.tabIndex + : et + } + function isNonTabbableRadio(tt) { + if (tt.tagName !== 'INPUT' || tt.type !== 'radio' || !tt.name) return !1 + const et = (rt) => tt.ownerDocument.querySelector(`input[type="radio"]${rt}`) + let nt = et(`[name="${tt.name}"]:checked`) + return nt || (nt = et(`[name="${tt.name}"]`)), nt !== tt + } + function isNodeMatchingSelectorFocusable(tt) { + return !(tt.disabled || (tt.tagName === 'INPUT' && tt.type === 'hidden') || isNonTabbableRadio(tt)) + } + function defaultGetTabbable(tt) { + const et = [], + nt = [] + return ( + Array.from(tt.querySelectorAll(candidatesSelector)).forEach((rt, it) => { + const ot = getTabIndex(rt) + ot === -1 || + !isNodeMatchingSelectorFocusable(rt) || + (ot === 0 ? et.push(rt) : nt.push({ documentOrder: it, tabIndex: ot, node: rt })) + }), + nt + .sort((rt, it) => + rt.tabIndex === it.tabIndex ? rt.documentOrder - it.documentOrder : rt.tabIndex - it.tabIndex, + ) + .map((rt) => rt.node) + .concat(et) + ) + } + function defaultIsEnabled() { + return !0 + } + function FocusTrap(tt) { + const { + children: et, + disableAutoFocus: nt = !1, + disableEnforceFocus: rt = !1, + disableRestoreFocus: it = !1, + getTabbable: ot = defaultGetTabbable, + isEnabled: at = defaultIsEnabled, + open: st, + } = tt, + lt = reactExports.useRef(!1), + ct = reactExports.useRef(null), + ut = reactExports.useRef(null), + ht = reactExports.useRef(null), + dt = reactExports.useRef(null), + pt = reactExports.useRef(!1), + mt = reactExports.useRef(null), + gt = useForkRef(et.ref, mt), + yt = reactExports.useRef(null) + reactExports.useEffect(() => { + !st || !mt.current || (pt.current = !nt) + }, [nt, st]), + reactExports.useEffect(() => { + if (!st || !mt.current) return + const xt = ownerDocument(mt.current) + return ( + mt.current.contains(xt.activeElement) || + (mt.current.hasAttribute('tabIndex') || mt.current.setAttribute('tabIndex', '-1'), + pt.current && mt.current.focus()), + () => { + it || (ht.current && ht.current.focus && ((lt.current = !0), ht.current.focus()), (ht.current = null)) + } + ) + }, [st]), + reactExports.useEffect(() => { + if (!st || !mt.current) return + const xt = ownerDocument(mt.current), + kt = (At) => { + ;(yt.current = At), + !(rt || !at() || At.key !== 'Tab') && + xt.activeElement === mt.current && + At.shiftKey && + ((lt.current = !0), ut.current && ut.current.focus()) + }, + St = () => { + const At = mt.current + if (At === null) return + if (!xt.hasFocus() || !at() || lt.current) { + lt.current = !1 + return + } + if ( + At.contains(xt.activeElement) || + (rt && xt.activeElement !== ct.current && xt.activeElement !== ut.current) + ) + return + if (xt.activeElement !== dt.current) dt.current = null + else if (dt.current !== null) return + if (!pt.current) return + let Et = [] + if ( + ((xt.activeElement === ct.current || xt.activeElement === ut.current) && (Et = ot(mt.current)), + Et.length > 0) + ) { + var $t, Dt + const jt = !!( + ($t = yt.current) != null && + $t.shiftKey && + ((Dt = yt.current) == null ? void 0 : Dt.key) === 'Tab' + ), + Pt = Et[0], + Ct = Et[Et.length - 1] + typeof Pt != 'string' && typeof Ct != 'string' && (jt ? Ct.focus() : Pt.focus()) + } else At.focus() + } + xt.addEventListener('focusin', St), xt.addEventListener('keydown', kt, !0) + const Tt = setInterval(() => { + xt.activeElement && xt.activeElement.tagName === 'BODY' && St() + }, 50) + return () => { + clearInterval(Tt), xt.removeEventListener('focusin', St), xt.removeEventListener('keydown', kt, !0) + } + }, [nt, rt, it, at, st, ot]) + const bt = (xt) => { + ht.current === null && (ht.current = xt.relatedTarget), (pt.current = !0), (dt.current = xt.target) + const kt = et.props.onFocus + kt && kt(xt) + }, + vt = (xt) => { + ht.current === null && (ht.current = xt.relatedTarget), (pt.current = !0) + } + return jsxRuntimeExports.jsxs(reactExports.Fragment, { + children: [ + jsxRuntimeExports.jsx('div', { tabIndex: st ? 0 : -1, onFocus: vt, ref: ct, 'data-testid': 'sentinelStart' }), + reactExports.cloneElement(et, { ref: gt, onFocus: bt }), + jsxRuntimeExports.jsx('div', { tabIndex: st ? 0 : -1, onFocus: vt, ref: ut, 'data-testid': 'sentinelEnd' }), + ], + }) + } + var top = 'top', + bottom = 'bottom', + right = 'right', + left = 'left', + auto = 'auto', + basePlacements = [top, bottom, right, left], + start$2 = 'start', + end = 'end', + clippingParents = 'clippingParents', + viewport = 'viewport', + popper = 'popper', + reference = 'reference', + variationPlacements = basePlacements.reduce(function (tt, et) { + return tt.concat([et + '-' + start$2, et + '-' + end]) + }, []), + placements = [].concat(basePlacements, [auto]).reduce(function (tt, et) { + return tt.concat([et, et + '-' + start$2, et + '-' + end]) + }, []), + beforeRead = 'beforeRead', + read = 'read', + afterRead = 'afterRead', + beforeMain = 'beforeMain', + main$1 = 'main', + afterMain = 'afterMain', + beforeWrite = 'beforeWrite', + write = 'write', + afterWrite = 'afterWrite', + modifierPhases = [beforeRead, read, afterRead, beforeMain, main$1, afterMain, beforeWrite, write, afterWrite] + function getNodeName(tt) { + return tt ? (tt.nodeName || '').toLowerCase() : null + } + function getWindow(tt) { + if (tt == null) return window + if (tt.toString() !== '[object Window]') { + var et = tt.ownerDocument + return (et && et.defaultView) || window + } + return tt + } + function isElement(tt) { + var et = getWindow(tt).Element + return tt instanceof et || tt instanceof Element + } + function isHTMLElement$1(tt) { + var et = getWindow(tt).HTMLElement + return tt instanceof et || tt instanceof HTMLElement + } + function isShadowRoot(tt) { + if (typeof ShadowRoot > 'u') return !1 + var et = getWindow(tt).ShadowRoot + return tt instanceof et || tt instanceof ShadowRoot + } + function applyStyles(tt) { + var et = tt.state + Object.keys(et.elements).forEach(function (nt) { + var rt = et.styles[nt] || {}, + it = et.attributes[nt] || {}, + ot = et.elements[nt] + !isHTMLElement$1(ot) || + !getNodeName(ot) || + (Object.assign(ot.style, rt), + Object.keys(it).forEach(function (at) { + var st = it[at] + st === !1 ? ot.removeAttribute(at) : ot.setAttribute(at, st === !0 ? '' : st) + })) + }) + } + function effect$2(tt) { + var et = tt.state, + nt = { + popper: { position: et.options.strategy, left: '0', top: '0', margin: '0' }, + arrow: { position: 'absolute' }, + reference: {}, + } + return ( + Object.assign(et.elements.popper.style, nt.popper), + (et.styles = nt), + et.elements.arrow && Object.assign(et.elements.arrow.style, nt.arrow), + function () { + Object.keys(et.elements).forEach(function (rt) { + var it = et.elements[rt], + ot = et.attributes[rt] || {}, + at = Object.keys(et.styles.hasOwnProperty(rt) ? et.styles[rt] : nt[rt]), + st = at.reduce(function (lt, ct) { + return (lt[ct] = ''), lt + }, {}) + !isHTMLElement$1(it) || + !getNodeName(it) || + (Object.assign(it.style, st), + Object.keys(ot).forEach(function (lt) { + it.removeAttribute(lt) + })) + }) + } + ) + } + const applyStyles$1 = { + name: 'applyStyles', + enabled: !0, + phase: 'write', + fn: applyStyles, + effect: effect$2, + requires: ['computeStyles'], + } + function getBasePlacement(tt) { + return tt.split('-')[0] + } + var max$4 = Math.max, + min$3 = Math.min, + round$2 = Math.round + function getUAString() { + var tt = navigator.userAgentData + return tt != null && tt.brands && Array.isArray(tt.brands) + ? tt.brands + .map(function (et) { + return et.brand + '/' + et.version + }) + .join(' ') + : navigator.userAgent + } + function isLayoutViewport() { + return !/^((?!chrome|android).)*safari/i.test(getUAString()) + } + function getBoundingClientRect(tt, et, nt) { + et === void 0 && (et = !1), nt === void 0 && (nt = !1) + var rt = tt.getBoundingClientRect(), + it = 1, + ot = 1 + et && + isHTMLElement$1(tt) && + ((it = (tt.offsetWidth > 0 && round$2(rt.width) / tt.offsetWidth) || 1), + (ot = (tt.offsetHeight > 0 && round$2(rt.height) / tt.offsetHeight) || 1)) + var at = isElement(tt) ? getWindow(tt) : window, + st = at.visualViewport, + lt = !isLayoutViewport() && nt, + ct = (rt.left + (lt && st ? st.offsetLeft : 0)) / it, + ut = (rt.top + (lt && st ? st.offsetTop : 0)) / ot, + ht = rt.width / it, + dt = rt.height / ot + return { width: ht, height: dt, top: ut, right: ct + ht, bottom: ut + dt, left: ct, x: ct, y: ut } + } + function getLayoutRect(tt) { + var et = getBoundingClientRect(tt), + nt = tt.offsetWidth, + rt = tt.offsetHeight + return ( + Math.abs(et.width - nt) <= 1 && (nt = et.width), + Math.abs(et.height - rt) <= 1 && (rt = et.height), + { x: tt.offsetLeft, y: tt.offsetTop, width: nt, height: rt } + ) + } + function contains(tt, et) { + var nt = et.getRootNode && et.getRootNode() + if (tt.contains(et)) return !0 + if (nt && isShadowRoot(nt)) { + var rt = et + do { + if (rt && tt.isSameNode(rt)) return !0 + rt = rt.parentNode || rt.host + } while (rt) + } + return !1 + } + function getComputedStyle$1(tt) { + return getWindow(tt).getComputedStyle(tt) + } + function isTableElement(tt) { + return ['table', 'td', 'th'].indexOf(getNodeName(tt)) >= 0 + } + function getDocumentElement(tt) { + return ((isElement(tt) ? tt.ownerDocument : tt.document) || window.document).documentElement + } + function getParentNode(tt) { + return getNodeName(tt) === 'html' + ? tt + : tt.assignedSlot || tt.parentNode || (isShadowRoot(tt) ? tt.host : null) || getDocumentElement(tt) + } + function getTrueOffsetParent(tt) { + return !isHTMLElement$1(tt) || getComputedStyle$1(tt).position === 'fixed' ? null : tt.offsetParent + } + function getContainingBlock(tt) { + var et = /firefox/i.test(getUAString()), + nt = /Trident/i.test(getUAString()) + if (nt && isHTMLElement$1(tt)) { + var rt = getComputedStyle$1(tt) + if (rt.position === 'fixed') return null + } + var it = getParentNode(tt) + for (isShadowRoot(it) && (it = it.host); isHTMLElement$1(it) && ['html', 'body'].indexOf(getNodeName(it)) < 0; ) { + var ot = getComputedStyle$1(it) + if ( + ot.transform !== 'none' || + ot.perspective !== 'none' || + ot.contain === 'paint' || + ['transform', 'perspective'].indexOf(ot.willChange) !== -1 || + (et && ot.willChange === 'filter') || + (et && ot.filter && ot.filter !== 'none') + ) + return it + it = it.parentNode + } + return null + } + function getOffsetParent(tt) { + for ( + var et = getWindow(tt), nt = getTrueOffsetParent(tt); + nt && isTableElement(nt) && getComputedStyle$1(nt).position === 'static'; + + ) + nt = getTrueOffsetParent(nt) + return nt && + (getNodeName(nt) === 'html' || (getNodeName(nt) === 'body' && getComputedStyle$1(nt).position === 'static')) + ? et + : nt || getContainingBlock(tt) || et + } + function getMainAxisFromPlacement(tt) { + return ['top', 'bottom'].indexOf(tt) >= 0 ? 'x' : 'y' + } + function within(tt, et, nt) { + return max$4(tt, min$3(et, nt)) + } + function withinMaxClamp(tt, et, nt) { + var rt = within(tt, et, nt) + return rt > nt ? nt : rt + } + function getFreshSideObject() { + return { top: 0, right: 0, bottom: 0, left: 0 } + } + function mergePaddingObject(tt) { + return Object.assign({}, getFreshSideObject(), tt) + } + function expandToHashMap(tt, et) { + return et.reduce(function (nt, rt) { + return (nt[rt] = tt), nt + }, {}) + } + var toPaddingObject = function (et, nt) { + return ( + (et = typeof et == 'function' ? et(Object.assign({}, nt.rects, { placement: nt.placement })) : et), + mergePaddingObject(typeof et != 'number' ? et : expandToHashMap(et, basePlacements)) + ) + } + function arrow(tt) { + var et, + nt = tt.state, + rt = tt.name, + it = tt.options, + ot = nt.elements.arrow, + at = nt.modifiersData.popperOffsets, + st = getBasePlacement(nt.placement), + lt = getMainAxisFromPlacement(st), + ct = [left, right].indexOf(st) >= 0, + ut = ct ? 'height' : 'width' + if (!(!ot || !at)) { + var ht = toPaddingObject(it.padding, nt), + dt = getLayoutRect(ot), + pt = lt === 'y' ? top : left, + mt = lt === 'y' ? bottom : right, + gt = nt.rects.reference[ut] + nt.rects.reference[lt] - at[lt] - nt.rects.popper[ut], + yt = at[lt] - nt.rects.reference[lt], + bt = getOffsetParent(ot), + vt = bt ? (lt === 'y' ? bt.clientHeight || 0 : bt.clientWidth || 0) : 0, + xt = gt / 2 - yt / 2, + kt = ht[pt], + St = vt - dt[ut] - ht[mt], + Tt = vt / 2 - dt[ut] / 2 + xt, + At = within(kt, Tt, St), + Et = lt + nt.modifiersData[rt] = ((et = {}), (et[Et] = At), (et.centerOffset = At - Tt), et) + } + } + function effect$1(tt) { + var et = tt.state, + nt = tt.options, + rt = nt.element, + it = rt === void 0 ? '[data-popper-arrow]' : rt + it != null && + ((typeof it == 'string' && ((it = et.elements.popper.querySelector(it)), !it)) || + (contains(et.elements.popper, it) && (et.elements.arrow = it))) + } + const arrow$1 = { + name: 'arrow', + enabled: !0, + phase: 'main', + fn: arrow, + effect: effect$1, + requires: ['popperOffsets'], + requiresIfExists: ['preventOverflow'], + } + function getVariation(tt) { + return tt.split('-')[1] + } + var unsetSides = { top: 'auto', right: 'auto', bottom: 'auto', left: 'auto' } + function roundOffsetsByDPR(tt, et) { + var nt = tt.x, + rt = tt.y, + it = et.devicePixelRatio || 1 + return { x: round$2(nt * it) / it || 0, y: round$2(rt * it) / it || 0 } + } + function mapToStyles(tt) { + var et, + nt = tt.popper, + rt = tt.popperRect, + it = tt.placement, + ot = tt.variation, + at = tt.offsets, + st = tt.position, + lt = tt.gpuAcceleration, + ct = tt.adaptive, + ut = tt.roundOffsets, + ht = tt.isFixed, + dt = at.x, + pt = dt === void 0 ? 0 : dt, + mt = at.y, + gt = mt === void 0 ? 0 : mt, + yt = typeof ut == 'function' ? ut({ x: pt, y: gt }) : { x: pt, y: gt } + ;(pt = yt.x), (gt = yt.y) + var bt = at.hasOwnProperty('x'), + vt = at.hasOwnProperty('y'), + xt = left, + kt = top, + St = window + if (ct) { + var Tt = getOffsetParent(nt), + At = 'clientHeight', + Et = 'clientWidth' + if ( + (Tt === getWindow(nt) && + ((Tt = getDocumentElement(nt)), + getComputedStyle$1(Tt).position !== 'static' && + st === 'absolute' && + ((At = 'scrollHeight'), (Et = 'scrollWidth'))), + (Tt = Tt), + it === top || ((it === left || it === right) && ot === end)) + ) { + kt = bottom + var $t = ht && Tt === St && St.visualViewport ? St.visualViewport.height : Tt[At] + ;(gt -= $t - rt.height), (gt *= lt ? 1 : -1) + } + if (it === left || ((it === top || it === bottom) && ot === end)) { + xt = right + var Dt = ht && Tt === St && St.visualViewport ? St.visualViewport.width : Tt[Et] + ;(pt -= Dt - rt.width), (pt *= lt ? 1 : -1) + } + } + var jt = Object.assign({ position: st }, ct && unsetSides), + Pt = ut === !0 ? roundOffsetsByDPR({ x: pt, y: gt }, getWindow(nt)) : { x: pt, y: gt } + if (((pt = Pt.x), (gt = Pt.y), lt)) { + var Ct + return Object.assign( + {}, + jt, + ((Ct = {}), + (Ct[kt] = vt ? '0' : ''), + (Ct[xt] = bt ? '0' : ''), + (Ct.transform = + (St.devicePixelRatio || 1) <= 1 + ? 'translate(' + pt + 'px, ' + gt + 'px)' + : 'translate3d(' + pt + 'px, ' + gt + 'px, 0)'), + Ct), + ) + } + return Object.assign( + {}, + jt, + ((et = {}), (et[kt] = vt ? gt + 'px' : ''), (et[xt] = bt ? pt + 'px' : ''), (et.transform = ''), et), + ) + } + function computeStyles(tt) { + var et = tt.state, + nt = tt.options, + rt = nt.gpuAcceleration, + it = rt === void 0 ? !0 : rt, + ot = nt.adaptive, + at = ot === void 0 ? !0 : ot, + st = nt.roundOffsets, + lt = st === void 0 ? !0 : st, + ct = { + placement: getBasePlacement(et.placement), + variation: getVariation(et.placement), + popper: et.elements.popper, + popperRect: et.rects.popper, + gpuAcceleration: it, + isFixed: et.options.strategy === 'fixed', + } + et.modifiersData.popperOffsets != null && + (et.styles.popper = Object.assign( + {}, + et.styles.popper, + mapToStyles( + Object.assign({}, ct, { + offsets: et.modifiersData.popperOffsets, + position: et.options.strategy, + adaptive: at, + roundOffsets: lt, + }), + ), + )), + et.modifiersData.arrow != null && + (et.styles.arrow = Object.assign( + {}, + et.styles.arrow, + mapToStyles( + Object.assign({}, ct, { + offsets: et.modifiersData.arrow, + position: 'absolute', + adaptive: !1, + roundOffsets: lt, + }), + ), + )), + (et.attributes.popper = Object.assign({}, et.attributes.popper, { 'data-popper-placement': et.placement })) + } + const computeStyles$1 = { name: 'computeStyles', enabled: !0, phase: 'beforeWrite', fn: computeStyles, data: {} } + var passive = { passive: !0 } + function effect(tt) { + var et = tt.state, + nt = tt.instance, + rt = tt.options, + it = rt.scroll, + ot = it === void 0 ? !0 : it, + at = rt.resize, + st = at === void 0 ? !0 : at, + lt = getWindow(et.elements.popper), + ct = [].concat(et.scrollParents.reference, et.scrollParents.popper) + return ( + ot && + ct.forEach(function (ut) { + ut.addEventListener('scroll', nt.update, passive) + }), + st && lt.addEventListener('resize', nt.update, passive), + function () { + ot && + ct.forEach(function (ut) { + ut.removeEventListener('scroll', nt.update, passive) + }), + st && lt.removeEventListener('resize', nt.update, passive) + } + ) + } + const eventListeners = { name: 'eventListeners', enabled: !0, phase: 'write', fn: function () {}, effect, data: {} } + var hash$6 = { left: 'right', right: 'left', bottom: 'top', top: 'bottom' } + function getOppositePlacement(tt) { + return tt.replace(/left|right|bottom|top/g, function (et) { + return hash$6[et] + }) + } + var hash$5 = { start: 'end', end: 'start' } + function getOppositeVariationPlacement(tt) { + return tt.replace(/start|end/g, function (et) { + return hash$5[et] + }) + } + function getWindowScroll(tt) { + var et = getWindow(tt), + nt = et.pageXOffset, + rt = et.pageYOffset + return { scrollLeft: nt, scrollTop: rt } + } + function getWindowScrollBarX(tt) { + return getBoundingClientRect(getDocumentElement(tt)).left + getWindowScroll(tt).scrollLeft + } + function getViewportRect(tt, et) { + var nt = getWindow(tt), + rt = getDocumentElement(tt), + it = nt.visualViewport, + ot = rt.clientWidth, + at = rt.clientHeight, + st = 0, + lt = 0 + if (it) { + ;(ot = it.width), (at = it.height) + var ct = isLayoutViewport() + ;(ct || (!ct && et === 'fixed')) && ((st = it.offsetLeft), (lt = it.offsetTop)) + } + return { width: ot, height: at, x: st + getWindowScrollBarX(tt), y: lt } + } + function getDocumentRect(tt) { + var et, + nt = getDocumentElement(tt), + rt = getWindowScroll(tt), + it = (et = tt.ownerDocument) == null ? void 0 : et.body, + ot = max$4(nt.scrollWidth, nt.clientWidth, it ? it.scrollWidth : 0, it ? it.clientWidth : 0), + at = max$4(nt.scrollHeight, nt.clientHeight, it ? it.scrollHeight : 0, it ? it.clientHeight : 0), + st = -rt.scrollLeft + getWindowScrollBarX(tt), + lt = -rt.scrollTop + return ( + getComputedStyle$1(it || nt).direction === 'rtl' && (st += max$4(nt.clientWidth, it ? it.clientWidth : 0) - ot), + { width: ot, height: at, x: st, y: lt } + ) + } + function isScrollParent(tt) { + var et = getComputedStyle$1(tt), + nt = et.overflow, + rt = et.overflowX, + it = et.overflowY + return /auto|scroll|overlay|hidden/.test(nt + it + rt) + } + function getScrollParent(tt) { + return ['html', 'body', '#document'].indexOf(getNodeName(tt)) >= 0 + ? tt.ownerDocument.body + : isHTMLElement$1(tt) && isScrollParent(tt) + ? tt + : getScrollParent(getParentNode(tt)) + } + function listScrollParents(tt, et) { + var nt + et === void 0 && (et = []) + var rt = getScrollParent(tt), + it = rt === ((nt = tt.ownerDocument) == null ? void 0 : nt.body), + ot = getWindow(rt), + at = it ? [ot].concat(ot.visualViewport || [], isScrollParent(rt) ? rt : []) : rt, + st = et.concat(at) + return it ? st : st.concat(listScrollParents(getParentNode(at))) + } + function rectToClientRect(tt) { + return Object.assign({}, tt, { left: tt.x, top: tt.y, right: tt.x + tt.width, bottom: tt.y + tt.height }) + } + function getInnerBoundingClientRect(tt, et) { + var nt = getBoundingClientRect(tt, !1, et === 'fixed') + return ( + (nt.top = nt.top + tt.clientTop), + (nt.left = nt.left + tt.clientLeft), + (nt.bottom = nt.top + tt.clientHeight), + (nt.right = nt.left + tt.clientWidth), + (nt.width = tt.clientWidth), + (nt.height = tt.clientHeight), + (nt.x = nt.left), + (nt.y = nt.top), + nt + ) + } + function getClientRectFromMixedType(tt, et, nt) { + return et === viewport + ? rectToClientRect(getViewportRect(tt, nt)) + : isElement(et) + ? getInnerBoundingClientRect(et, nt) + : rectToClientRect(getDocumentRect(getDocumentElement(tt))) + } + function getClippingParents(tt) { + var et = listScrollParents(getParentNode(tt)), + nt = ['absolute', 'fixed'].indexOf(getComputedStyle$1(tt).position) >= 0, + rt = nt && isHTMLElement$1(tt) ? getOffsetParent(tt) : tt + return isElement(rt) + ? et.filter(function (it) { + return isElement(it) && contains(it, rt) && getNodeName(it) !== 'body' + }) + : [] + } + function getClippingRect(tt, et, nt, rt) { + var it = et === 'clippingParents' ? getClippingParents(tt) : [].concat(et), + ot = [].concat(it, [nt]), + at = ot[0], + st = ot.reduce(function (lt, ct) { + var ut = getClientRectFromMixedType(tt, ct, rt) + return ( + (lt.top = max$4(ut.top, lt.top)), + (lt.right = min$3(ut.right, lt.right)), + (lt.bottom = min$3(ut.bottom, lt.bottom)), + (lt.left = max$4(ut.left, lt.left)), + lt + ) + }, getClientRectFromMixedType(tt, at, rt)) + return (st.width = st.right - st.left), (st.height = st.bottom - st.top), (st.x = st.left), (st.y = st.top), st + } + function computeOffsets(tt) { + var et = tt.reference, + nt = tt.element, + rt = tt.placement, + it = rt ? getBasePlacement(rt) : null, + ot = rt ? getVariation(rt) : null, + at = et.x + et.width / 2 - nt.width / 2, + st = et.y + et.height / 2 - nt.height / 2, + lt + switch (it) { + case top: + lt = { x: at, y: et.y - nt.height } + break + case bottom: + lt = { x: at, y: et.y + et.height } + break + case right: + lt = { x: et.x + et.width, y: st } + break + case left: + lt = { x: et.x - nt.width, y: st } + break + default: + lt = { x: et.x, y: et.y } + } + var ct = it ? getMainAxisFromPlacement(it) : null + if (ct != null) { + var ut = ct === 'y' ? 'height' : 'width' + switch (ot) { + case start$2: + lt[ct] = lt[ct] - (et[ut] / 2 - nt[ut] / 2) + break + case end: + lt[ct] = lt[ct] + (et[ut] / 2 - nt[ut] / 2) + break + } + } + return lt + } + function detectOverflow(tt, et) { + et === void 0 && (et = {}) + var nt = et, + rt = nt.placement, + it = rt === void 0 ? tt.placement : rt, + ot = nt.strategy, + at = ot === void 0 ? tt.strategy : ot, + st = nt.boundary, + lt = st === void 0 ? clippingParents : st, + ct = nt.rootBoundary, + ut = ct === void 0 ? viewport : ct, + ht = nt.elementContext, + dt = ht === void 0 ? popper : ht, + pt = nt.altBoundary, + mt = pt === void 0 ? !1 : pt, + gt = nt.padding, + yt = gt === void 0 ? 0 : gt, + bt = mergePaddingObject(typeof yt != 'number' ? yt : expandToHashMap(yt, basePlacements)), + vt = dt === popper ? reference : popper, + xt = tt.rects.popper, + kt = tt.elements[mt ? vt : dt], + St = getClippingRect( + isElement(kt) ? kt : kt.contextElement || getDocumentElement(tt.elements.popper), + lt, + ut, + at, + ), + Tt = getBoundingClientRect(tt.elements.reference), + At = computeOffsets({ reference: Tt, element: xt, strategy: 'absolute', placement: it }), + Et = rectToClientRect(Object.assign({}, xt, At)), + $t = dt === popper ? Et : Tt, + Dt = { + top: St.top - $t.top + bt.top, + bottom: $t.bottom - St.bottom + bt.bottom, + left: St.left - $t.left + bt.left, + right: $t.right - St.right + bt.right, + }, + jt = tt.modifiersData.offset + if (dt === popper && jt) { + var Pt = jt[it] + Object.keys(Dt).forEach(function (Ct) { + var wt = [right, bottom].indexOf(Ct) >= 0 ? 1 : -1, + It = [top, bottom].indexOf(Ct) >= 0 ? 'y' : 'x' + Dt[Ct] += Pt[It] * wt + }) + } + return Dt + } + function computeAutoPlacement(tt, et) { + et === void 0 && (et = {}) + var nt = et, + rt = nt.placement, + it = nt.boundary, + ot = nt.rootBoundary, + at = nt.padding, + st = nt.flipVariations, + lt = nt.allowedAutoPlacements, + ct = lt === void 0 ? placements : lt, + ut = getVariation(rt), + ht = ut + ? st + ? variationPlacements + : variationPlacements.filter(function (mt) { + return getVariation(mt) === ut + }) + : basePlacements, + dt = ht.filter(function (mt) { + return ct.indexOf(mt) >= 0 + }) + dt.length === 0 && (dt = ht) + var pt = dt.reduce(function (mt, gt) { + return ( + (mt[gt] = detectOverflow(tt, { placement: gt, boundary: it, rootBoundary: ot, padding: at })[ + getBasePlacement(gt) + ]), + mt + ) + }, {}) + return Object.keys(pt).sort(function (mt, gt) { + return pt[mt] - pt[gt] + }) + } + function getExpandedFallbackPlacements(tt) { + if (getBasePlacement(tt) === auto) return [] + var et = getOppositePlacement(tt) + return [getOppositeVariationPlacement(tt), et, getOppositeVariationPlacement(et)] + } + function flip(tt) { + var et = tt.state, + nt = tt.options, + rt = tt.name + if (!et.modifiersData[rt]._skip) { + for ( + var it = nt.mainAxis, + ot = it === void 0 ? !0 : it, + at = nt.altAxis, + st = at === void 0 ? !0 : at, + lt = nt.fallbackPlacements, + ct = nt.padding, + ut = nt.boundary, + ht = nt.rootBoundary, + dt = nt.altBoundary, + pt = nt.flipVariations, + mt = pt === void 0 ? !0 : pt, + gt = nt.allowedAutoPlacements, + yt = et.options.placement, + bt = getBasePlacement(yt), + vt = bt === yt, + xt = lt || (vt || !mt ? [getOppositePlacement(yt)] : getExpandedFallbackPlacements(yt)), + kt = [yt].concat(xt).reduce(function (en, sn) { + return en.concat( + getBasePlacement(sn) === auto + ? computeAutoPlacement(et, { + placement: sn, + boundary: ut, + rootBoundary: ht, + padding: ct, + flipVariations: mt, + allowedAutoPlacements: gt, + }) + : sn, + ) + }, []), + St = et.rects.reference, + Tt = et.rects.popper, + At = new Map(), + Et = !0, + $t = kt[0], + Dt = 0; + Dt < kt.length; + Dt++ + ) { + var jt = kt[Dt], + Pt = getBasePlacement(jt), + Ct = getVariation(jt) === start$2, + wt = [top, bottom].indexOf(Pt) >= 0, + It = wt ? 'width' : 'height', + Ot = detectOverflow(et, { placement: jt, boundary: ut, rootBoundary: ht, altBoundary: dt, padding: ct }), + Wt = wt ? (Ct ? right : left) : Ct ? bottom : top + St[It] > Tt[It] && (Wt = getOppositePlacement(Wt)) + var zt = getOppositePlacement(Wt), + Ft = [] + if ( + (ot && Ft.push(Ot[Pt] <= 0), + st && Ft.push(Ot[Wt] <= 0, Ot[zt] <= 0), + Ft.every(function (en) { + return en + })) + ) { + ;($t = jt), (Et = !1) + break + } + At.set(jt, Ft) + } + if (Et) + for ( + var Nt = mt ? 3 : 1, + Ut = function (sn) { + var Kt = kt.find(function (rn) { + var nn = At.get(rn) + if (nn) + return nn.slice(0, sn).every(function (hn) { + return hn + }) + }) + if (Kt) return ($t = Kt), 'break' + }, + Mt = Nt; + Mt > 0; + Mt-- + ) { + var Ht = Ut(Mt) + if (Ht === 'break') break + } + et.placement !== $t && ((et.modifiersData[rt]._skip = !0), (et.placement = $t), (et.reset = !0)) + } + } + const flip$1 = { + name: 'flip', + enabled: !0, + phase: 'main', + fn: flip, + requiresIfExists: ['offset'], + data: { _skip: !1 }, + } + function getSideOffsets(tt, et, nt) { + return ( + nt === void 0 && (nt = { x: 0, y: 0 }), + { + top: tt.top - et.height - nt.y, + right: tt.right - et.width + nt.x, + bottom: tt.bottom - et.height + nt.y, + left: tt.left - et.width - nt.x, + } + ) + } + function isAnySideFullyClipped(tt) { + return [top, right, bottom, left].some(function (et) { + return tt[et] >= 0 + }) + } + function hide(tt) { + var et = tt.state, + nt = tt.name, + rt = et.rects.reference, + it = et.rects.popper, + ot = et.modifiersData.preventOverflow, + at = detectOverflow(et, { elementContext: 'reference' }), + st = detectOverflow(et, { altBoundary: !0 }), + lt = getSideOffsets(at, rt), + ct = getSideOffsets(st, it, ot), + ut = isAnySideFullyClipped(lt), + ht = isAnySideFullyClipped(ct) + ;(et.modifiersData[nt] = { + referenceClippingOffsets: lt, + popperEscapeOffsets: ct, + isReferenceHidden: ut, + hasPopperEscaped: ht, + }), + (et.attributes.popper = Object.assign({}, et.attributes.popper, { + 'data-popper-reference-hidden': ut, + 'data-popper-escaped': ht, + })) + } + const hide$1 = { name: 'hide', enabled: !0, phase: 'main', requiresIfExists: ['preventOverflow'], fn: hide } + function distanceAndSkiddingToXY(tt, et, nt) { + var rt = getBasePlacement(tt), + it = [left, top].indexOf(rt) >= 0 ? -1 : 1, + ot = typeof nt == 'function' ? nt(Object.assign({}, et, { placement: tt })) : nt, + at = ot[0], + st = ot[1] + return (at = at || 0), (st = (st || 0) * it), [left, right].indexOf(rt) >= 0 ? { x: st, y: at } : { x: at, y: st } + } + function offset$1(tt) { + var et = tt.state, + nt = tt.options, + rt = tt.name, + it = nt.offset, + ot = it === void 0 ? [0, 0] : it, + at = placements.reduce(function (ut, ht) { + return (ut[ht] = distanceAndSkiddingToXY(ht, et.rects, ot)), ut + }, {}), + st = at[et.placement], + lt = st.x, + ct = st.y + et.modifiersData.popperOffsets != null && + ((et.modifiersData.popperOffsets.x += lt), (et.modifiersData.popperOffsets.y += ct)), + (et.modifiersData[rt] = at) + } + const offset$2 = { name: 'offset', enabled: !0, phase: 'main', requires: ['popperOffsets'], fn: offset$1 } + function popperOffsets(tt) { + var et = tt.state, + nt = tt.name + et.modifiersData[nt] = computeOffsets({ + reference: et.rects.reference, + element: et.rects.popper, + strategy: 'absolute', + placement: et.placement, + }) + } + const popperOffsets$1 = { name: 'popperOffsets', enabled: !0, phase: 'read', fn: popperOffsets, data: {} } + function getAltAxis(tt) { + return tt === 'x' ? 'y' : 'x' + } + function preventOverflow(tt) { + var et = tt.state, + nt = tt.options, + rt = tt.name, + it = nt.mainAxis, + ot = it === void 0 ? !0 : it, + at = nt.altAxis, + st = at === void 0 ? !1 : at, + lt = nt.boundary, + ct = nt.rootBoundary, + ut = nt.altBoundary, + ht = nt.padding, + dt = nt.tether, + pt = dt === void 0 ? !0 : dt, + mt = nt.tetherOffset, + gt = mt === void 0 ? 0 : mt, + yt = detectOverflow(et, { boundary: lt, rootBoundary: ct, padding: ht, altBoundary: ut }), + bt = getBasePlacement(et.placement), + vt = getVariation(et.placement), + xt = !vt, + kt = getMainAxisFromPlacement(bt), + St = getAltAxis(kt), + Tt = et.modifiersData.popperOffsets, + At = et.rects.reference, + Et = et.rects.popper, + $t = typeof gt == 'function' ? gt(Object.assign({}, et.rects, { placement: et.placement })) : gt, + Dt = typeof $t == 'number' ? { mainAxis: $t, altAxis: $t } : Object.assign({ mainAxis: 0, altAxis: 0 }, $t), + jt = et.modifiersData.offset ? et.modifiersData.offset[et.placement] : null, + Pt = { x: 0, y: 0 } + if (Tt) { + if (ot) { + var Ct, + wt = kt === 'y' ? top : left, + It = kt === 'y' ? bottom : right, + Ot = kt === 'y' ? 'height' : 'width', + Wt = Tt[kt], + zt = Wt + yt[wt], + Ft = Wt - yt[It], + Nt = pt ? -Et[Ot] / 2 : 0, + Ut = vt === start$2 ? At[Ot] : Et[Ot], + Mt = vt === start$2 ? -Et[Ot] : -At[Ot], + Ht = et.elements.arrow, + en = pt && Ht ? getLayoutRect(Ht) : { width: 0, height: 0 }, + sn = et.modifiersData['arrow#persistent'] + ? et.modifiersData['arrow#persistent'].padding + : getFreshSideObject(), + Kt = sn[wt], + rn = sn[It], + nn = within(0, At[Ot], en[Ot]), + hn = xt ? At[Ot] / 2 - Nt - nn - Kt - Dt.mainAxis : Ut - nn - Kt - Dt.mainAxis, + vn = xt ? -At[Ot] / 2 + Nt + nn + rn + Dt.mainAxis : Mt + nn + rn + Dt.mainAxis, + an = et.elements.arrow && getOffsetParent(et.elements.arrow), + Qt = an ? (kt === 'y' ? an.clientTop || 0 : an.clientLeft || 0) : 0, + _n = (Ct = jt == null ? void 0 : jt[kt]) != null ? Ct : 0, + Pn = Wt + hn - _n - Qt, + $n = Wt + vn - _n, + Nn = within(pt ? min$3(zt, Pn) : zt, Wt, pt ? max$4(Ft, $n) : Ft) + ;(Tt[kt] = Nn), (Pt[kt] = Nn - Wt) + } + if (st) { + var Tn, + cn = kt === 'x' ? top : left, + mn = kt === 'x' ? bottom : right, + In = Tt[St], + An = St === 'y' ? 'height' : 'width', + wn = In + yt[cn], + fn = In - yt[mn], + pn = [top, left].indexOf(bt) !== -1, + kn = (Tn = jt == null ? void 0 : jt[St]) != null ? Tn : 0, + Dn = pn ? wn : In - At[An] - Et[An] - kn + Dt.altAxis, + un = pn ? In + At[An] + Et[An] - kn - Dt.altAxis : fn, + Zt = pt && pn ? withinMaxClamp(Dn, In, un) : within(pt ? Dn : wn, In, pt ? un : fn) + ;(Tt[St] = Zt), (Pt[St] = Zt - In) + } + et.modifiersData[rt] = Pt + } + } + const preventOverflow$1 = { + name: 'preventOverflow', + enabled: !0, + phase: 'main', + fn: preventOverflow, + requiresIfExists: ['offset'], + } + function getHTMLElementScroll(tt) { + return { scrollLeft: tt.scrollLeft, scrollTop: tt.scrollTop } + } + function getNodeScroll(tt) { + return tt === getWindow(tt) || !isHTMLElement$1(tt) ? getWindowScroll(tt) : getHTMLElementScroll(tt) + } + function isElementScaled(tt) { + var et = tt.getBoundingClientRect(), + nt = round$2(et.width) / tt.offsetWidth || 1, + rt = round$2(et.height) / tt.offsetHeight || 1 + return nt !== 1 || rt !== 1 + } + function getCompositeRect(tt, et, nt) { + nt === void 0 && (nt = !1) + var rt = isHTMLElement$1(et), + it = isHTMLElement$1(et) && isElementScaled(et), + ot = getDocumentElement(et), + at = getBoundingClientRect(tt, it, nt), + st = { scrollLeft: 0, scrollTop: 0 }, + lt = { x: 0, y: 0 } + return ( + (rt || (!rt && !nt)) && + ((getNodeName(et) !== 'body' || isScrollParent(ot)) && (st = getNodeScroll(et)), + isHTMLElement$1(et) + ? ((lt = getBoundingClientRect(et, !0)), (lt.x += et.clientLeft), (lt.y += et.clientTop)) + : ot && (lt.x = getWindowScrollBarX(ot))), + { x: at.left + st.scrollLeft - lt.x, y: at.top + st.scrollTop - lt.y, width: at.width, height: at.height } + ) + } + function order(tt) { + var et = new Map(), + nt = new Set(), + rt = [] + tt.forEach(function (ot) { + et.set(ot.name, ot) + }) + function it(ot) { + nt.add(ot.name) + var at = [].concat(ot.requires || [], ot.requiresIfExists || []) + at.forEach(function (st) { + if (!nt.has(st)) { + var lt = et.get(st) + lt && it(lt) + } + }), + rt.push(ot) + } + return ( + tt.forEach(function (ot) { + nt.has(ot.name) || it(ot) + }), + rt + ) + } + function orderModifiers(tt) { + var et = order(tt) + return modifierPhases.reduce(function (nt, rt) { + return nt.concat( + et.filter(function (it) { + return it.phase === rt + }), + ) + }, []) + } + function debounce$4(tt) { + var et + return function () { + return ( + et || + (et = new Promise(function (nt) { + Promise.resolve().then(function () { + ;(et = void 0), nt(tt()) + }) + })), + et + ) + } + } + function mergeByName(tt) { + var et = tt.reduce(function (nt, rt) { + var it = nt[rt.name] + return ( + (nt[rt.name] = it + ? Object.assign({}, it, rt, { + options: Object.assign({}, it.options, rt.options), + data: Object.assign({}, it.data, rt.data), + }) + : rt), + nt + ) + }, {}) + return Object.keys(et).map(function (nt) { + return et[nt] + }) + } + var DEFAULT_OPTIONS$k = { placement: 'bottom', modifiers: [], strategy: 'absolute' } + function areValidElements() { + for (var tt = arguments.length, et = new Array(tt), nt = 0; nt < tt; nt++) et[nt] = arguments[nt] + return !et.some(function (rt) { + return !(rt && typeof rt.getBoundingClientRect == 'function') + }) + } + function popperGenerator(tt) { + tt === void 0 && (tt = {}) + var et = tt, + nt = et.defaultModifiers, + rt = nt === void 0 ? [] : nt, + it = et.defaultOptions, + ot = it === void 0 ? DEFAULT_OPTIONS$k : it + return function (st, lt, ct) { + ct === void 0 && (ct = ot) + var ut = { + placement: 'bottom', + orderedModifiers: [], + options: Object.assign({}, DEFAULT_OPTIONS$k, ot), + modifiersData: {}, + elements: { reference: st, popper: lt }, + attributes: {}, + styles: {}, + }, + ht = [], + dt = !1, + pt = { + state: ut, + setOptions: function (bt) { + var vt = typeof bt == 'function' ? bt(ut.options) : bt + gt(), + (ut.options = Object.assign({}, ot, ut.options, vt)), + (ut.scrollParents = { + reference: isElement(st) + ? listScrollParents(st) + : st.contextElement + ? listScrollParents(st.contextElement) + : [], + popper: listScrollParents(lt), + }) + var xt = orderModifiers(mergeByName([].concat(rt, ut.options.modifiers))) + return ( + (ut.orderedModifiers = xt.filter(function (kt) { + return kt.enabled + })), + mt(), + pt.update() + ) + }, + forceUpdate: function () { + if (!dt) { + var bt = ut.elements, + vt = bt.reference, + xt = bt.popper + if (areValidElements(vt, xt)) { + ;(ut.rects = { + reference: getCompositeRect(vt, getOffsetParent(xt), ut.options.strategy === 'fixed'), + popper: getLayoutRect(xt), + }), + (ut.reset = !1), + (ut.placement = ut.options.placement), + ut.orderedModifiers.forEach(function (Dt) { + return (ut.modifiersData[Dt.name] = Object.assign({}, Dt.data)) + }) + for (var kt = 0; kt < ut.orderedModifiers.length; kt++) { + if (ut.reset === !0) { + ;(ut.reset = !1), (kt = -1) + continue + } + var St = ut.orderedModifiers[kt], + Tt = St.fn, + At = St.options, + Et = At === void 0 ? {} : At, + $t = St.name + typeof Tt == 'function' && (ut = Tt({ state: ut, options: Et, name: $t, instance: pt }) || ut) + } + } + } + }, + update: debounce$4(function () { + return new Promise(function (yt) { + pt.forceUpdate(), yt(ut) + }) + }), + destroy: function () { + gt(), (dt = !0) + }, + } + if (!areValidElements(st, lt)) return pt + pt.setOptions(ct).then(function (yt) { + !dt && ct.onFirstUpdate && ct.onFirstUpdate(yt) + }) + function mt() { + ut.orderedModifiers.forEach(function (yt) { + var bt = yt.name, + vt = yt.options, + xt = vt === void 0 ? {} : vt, + kt = yt.effect + if (typeof kt == 'function') { + var St = kt({ state: ut, name: bt, instance: pt, options: xt }), + Tt = function () {} + ht.push(St || Tt) + } + }) + } + function gt() { + ht.forEach(function (yt) { + return yt() + }), + (ht = []) + } + return pt + } + } + var defaultModifiers = [ + eventListeners, + popperOffsets$1, + computeStyles$1, + applyStyles$1, + offset$2, + flip$1, + preventOverflow$1, + arrow$1, + hide$1, + ], + createPopper = popperGenerator({ defaultModifiers }) + function getContainer$1(tt) { + return typeof tt == 'function' ? tt() : tt + } + const Portal$1 = reactExports.forwardRef(function (et, nt) { + const { children: rt, container: it, disablePortal: ot = !1 } = et, + [at, st] = reactExports.useState(null), + lt = useForkRef(reactExports.isValidElement(rt) ? rt.ref : null, nt) + if ( + (useEnhancedEffect$1(() => { + ot || st(getContainer$1(it) || document.body) + }, [it, ot]), + useEnhancedEffect$1(() => { + if (at && !ot) + return ( + setRef(nt, at), + () => { + setRef(nt, null) + } + ) + }, [nt, at, ot]), + ot) + ) { + if (reactExports.isValidElement(rt)) { + const ct = { ref: lt } + return reactExports.cloneElement(rt, ct) + } + return jsxRuntimeExports.jsx(reactExports.Fragment, { children: rt }) + } + return jsxRuntimeExports.jsx(reactExports.Fragment, { children: at && reactDomExports.createPortal(rt, at) }) + }) + function getPopperUtilityClass(tt) { + return generateUtilityClass('MuiPopper', tt) + } + generateUtilityClasses('MuiPopper', ['root']) + const _excluded$1q = [ + 'anchorEl', + 'children', + 'direction', + 'disablePortal', + 'modifiers', + 'open', + 'placement', + 'popperOptions', + 'popperRef', + 'slotProps', + 'slots', + 'TransitionProps', + 'ownerState', + ], + _excluded2$g = [ + 'anchorEl', + 'children', + 'container', + 'direction', + 'disablePortal', + 'keepMounted', + 'modifiers', + 'open', + 'placement', + 'popperOptions', + 'popperRef', + 'style', + 'transition', + 'slotProps', + 'slots', + ] + function flipPlacement(tt, et) { + if (et === 'ltr') return tt + switch (tt) { + case 'bottom-end': + return 'bottom-start' + case 'bottom-start': + return 'bottom-end' + case 'top-end': + return 'top-start' + case 'top-start': + return 'top-end' + default: + return tt + } + } + function resolveAnchorEl$1(tt) { + return typeof tt == 'function' ? tt() : tt + } + function isHTMLElement(tt) { + return tt.nodeType !== void 0 + } + const useUtilityClasses$R = () => composeClasses({ root: ['root'] }, useClassNamesOverride(getPopperUtilityClass)), + defaultPopperOptions = {}, + PopperTooltip = reactExports.forwardRef(function (et, nt) { + var rt + const { + anchorEl: it, + children: ot, + direction: at, + disablePortal: st, + modifiers: lt, + open: ct, + placement: ut, + popperOptions: ht, + popperRef: dt, + slotProps: pt = {}, + slots: mt = {}, + TransitionProps: gt, + } = et, + yt = _objectWithoutPropertiesLoose$m(et, _excluded$1q), + bt = reactExports.useRef(null), + vt = useForkRef(bt, nt), + xt = reactExports.useRef(null), + kt = useForkRef(xt, dt), + St = reactExports.useRef(kt) + useEnhancedEffect$1(() => { + St.current = kt + }, [kt]), + reactExports.useImperativeHandle(dt, () => xt.current, []) + const Tt = flipPlacement(ut, at), + [At, Et] = reactExports.useState(Tt), + [$t, Dt] = reactExports.useState(resolveAnchorEl$1(it)) + reactExports.useEffect(() => { + xt.current && xt.current.forceUpdate() + }), + reactExports.useEffect(() => { + it && Dt(resolveAnchorEl$1(it)) + }, [it]), + useEnhancedEffect$1(() => { + if (!$t || !ct) return + const It = (zt) => { + Et(zt.placement) + } + let Ot = [ + { name: 'preventOverflow', options: { altBoundary: st } }, + { name: 'flip', options: { altBoundary: st } }, + { + name: 'onUpdate', + enabled: !0, + phase: 'afterWrite', + fn: ({ state: zt }) => { + It(zt) + }, + }, + ] + lt != null && (Ot = Ot.concat(lt)), ht && ht.modifiers != null && (Ot = Ot.concat(ht.modifiers)) + const Wt = createPopper($t, bt.current, _extends$u({ placement: Tt }, ht, { modifiers: Ot })) + return ( + St.current(Wt), + () => { + Wt.destroy(), St.current(null) + } + ) + }, [$t, st, lt, ct, ht, Tt]) + const jt = { placement: At } + gt !== null && (jt.TransitionProps = gt) + const Pt = useUtilityClasses$R(), + Ct = (rt = mt.root) != null ? rt : 'div', + wt = useSlotProps({ + elementType: Ct, + externalSlotProps: pt.root, + externalForwardedProps: yt, + additionalProps: { role: 'tooltip', ref: vt }, + ownerState: et, + className: Pt.root, + }) + return jsxRuntimeExports.jsx(Ct, _extends$u({}, wt, { children: typeof ot == 'function' ? ot(jt) : ot })) + }), + Popper$1 = reactExports.forwardRef(function (et, nt) { + const { + anchorEl: rt, + children: it, + container: ot, + direction: at = 'ltr', + disablePortal: st = !1, + keepMounted: lt = !1, + modifiers: ct, + open: ut, + placement: ht = 'bottom', + popperOptions: dt = defaultPopperOptions, + popperRef: pt, + style: mt, + transition: gt = !1, + slotProps: yt = {}, + slots: bt = {}, + } = et, + vt = _objectWithoutPropertiesLoose$m(et, _excluded2$g), + [xt, kt] = reactExports.useState(!0), + St = () => { + kt(!1) + }, + Tt = () => { + kt(!0) + } + if (!lt && !ut && (!gt || xt)) return null + let At + if (ot) At = ot + else if (rt) { + const Dt = resolveAnchorEl$1(rt) + At = Dt && isHTMLElement(Dt) ? ownerDocument(Dt).body : ownerDocument(null).body + } + const Et = !ut && lt && (!gt || xt) ? 'none' : void 0, + $t = gt ? { in: ut, onEnter: St, onExited: Tt } : void 0 + return jsxRuntimeExports.jsx(Portal$1, { + disablePortal: st, + container: At, + children: jsxRuntimeExports.jsx( + PopperTooltip, + _extends$u( + { + anchorEl: rt, + direction: at, + disablePortal: st, + modifiers: ct, + ref: nt, + open: gt ? !xt : ut, + placement: ht, + popperOptions: dt, + popperRef: pt, + slotProps: yt, + slots: bt, + }, + vt, + { + style: _extends$u({ position: 'fixed', top: 0, left: 0, display: Et }, mt), + TransitionProps: $t, + children: it, + }, + ), + ), + }) + }) + function isOverflowing(tt) { + const et = ownerDocument(tt) + return et.body === tt + ? ownerWindow(tt).innerWidth > et.documentElement.clientWidth + : tt.scrollHeight > tt.clientHeight + } + function ariaHidden(tt, et) { + et ? tt.setAttribute('aria-hidden', 'true') : tt.removeAttribute('aria-hidden') + } + function getPaddingRight(tt) { + return parseInt(ownerWindow(tt).getComputedStyle(tt).paddingRight, 10) || 0 + } + function isAriaHiddenForbiddenOnElement(tt) { + const nt = + [ + 'TEMPLATE', + 'SCRIPT', + 'STYLE', + 'LINK', + 'MAP', + 'META', + 'NOSCRIPT', + 'PICTURE', + 'COL', + 'COLGROUP', + 'PARAM', + 'SLOT', + 'SOURCE', + 'TRACK', + ].indexOf(tt.tagName) !== -1, + rt = tt.tagName === 'INPUT' && tt.getAttribute('type') === 'hidden' + return nt || rt + } + function ariaHiddenSiblings(tt, et, nt, rt, it) { + const ot = [et, nt, ...rt] + ;[].forEach.call(tt.children, (at) => { + const st = ot.indexOf(at) === -1, + lt = !isAriaHiddenForbiddenOnElement(at) + st && lt && ariaHidden(at, it) + }) + } + function findIndexOf(tt, et) { + let nt = -1 + return tt.some((rt, it) => (et(rt) ? ((nt = it), !0) : !1)), nt + } + function handleContainer(tt, et) { + const nt = [], + rt = tt.container + if (!et.disableScrollLock) { + if (isOverflowing(rt)) { + const at = getScrollbarSize(ownerDocument(rt)) + nt.push({ value: rt.style.paddingRight, property: 'padding-right', el: rt }), + (rt.style.paddingRight = `${getPaddingRight(rt) + at}px`) + const st = ownerDocument(rt).querySelectorAll('.mui-fixed') + ;[].forEach.call(st, (lt) => { + nt.push({ value: lt.style.paddingRight, property: 'padding-right', el: lt }), + (lt.style.paddingRight = `${getPaddingRight(lt) + at}px`) + }) + } + let ot + if (rt.parentNode instanceof DocumentFragment) ot = ownerDocument(rt).body + else { + const at = rt.parentElement, + st = ownerWindow(rt) + ot = (at == null ? void 0 : at.nodeName) === 'HTML' && st.getComputedStyle(at).overflowY === 'scroll' ? at : rt + } + nt.push( + { value: ot.style.overflow, property: 'overflow', el: ot }, + { value: ot.style.overflowX, property: 'overflow-x', el: ot }, + { value: ot.style.overflowY, property: 'overflow-y', el: ot }, + ), + (ot.style.overflow = 'hidden') + } + return () => { + nt.forEach(({ value: ot, el: at, property: st }) => { + ot ? at.style.setProperty(st, ot) : at.style.removeProperty(st) + }) + } + } + function getHiddenSiblings(tt) { + const et = [] + return ( + [].forEach.call(tt.children, (nt) => { + nt.getAttribute('aria-hidden') === 'true' && et.push(nt) + }), + et + ) + } + class ModalManager { + constructor() { + ;(this.containers = void 0), (this.modals = void 0), (this.modals = []), (this.containers = []) + } + add(et, nt) { + let rt = this.modals.indexOf(et) + if (rt !== -1) return rt + ;(rt = this.modals.length), this.modals.push(et), et.modalRef && ariaHidden(et.modalRef, !1) + const it = getHiddenSiblings(nt) + ariaHiddenSiblings(nt, et.mount, et.modalRef, it, !0) + const ot = findIndexOf(this.containers, (at) => at.container === nt) + return ot !== -1 + ? (this.containers[ot].modals.push(et), rt) + : (this.containers.push({ modals: [et], container: nt, restore: null, hiddenSiblings: it }), rt) + } + mount(et, nt) { + const rt = findIndexOf(this.containers, (ot) => ot.modals.indexOf(et) !== -1), + it = this.containers[rt] + it.restore || (it.restore = handleContainer(it, nt)) + } + remove(et, nt = !0) { + const rt = this.modals.indexOf(et) + if (rt === -1) return rt + const it = findIndexOf(this.containers, (at) => at.modals.indexOf(et) !== -1), + ot = this.containers[it] + if ((ot.modals.splice(ot.modals.indexOf(et), 1), this.modals.splice(rt, 1), ot.modals.length === 0)) + ot.restore && ot.restore(), + et.modalRef && ariaHidden(et.modalRef, nt), + ariaHiddenSiblings(ot.container, et.mount, et.modalRef, ot.hiddenSiblings, !1), + this.containers.splice(it, 1) + else { + const at = ot.modals[ot.modals.length - 1] + at.modalRef && ariaHidden(at.modalRef, !1) + } + return rt + } + isTopModal(et) { + return this.modals.length > 0 && this.modals[this.modals.length - 1] === et + } + } + function getContainer(tt) { + return typeof tt == 'function' ? tt() : tt + } + function getHasTransition(tt) { + return tt ? tt.props.hasOwnProperty('in') : !1 + } + const defaultManager = new ModalManager() + function useModal$1(tt) { + const { + container: et, + disableEscapeKeyDown: nt = !1, + disableScrollLock: rt = !1, + manager: it = defaultManager, + closeAfterTransition: ot = !1, + onTransitionEnter: at, + onTransitionExited: st, + children: lt, + onClose: ct, + open: ut, + rootRef: ht, + } = tt, + dt = reactExports.useRef({}), + pt = reactExports.useRef(null), + mt = reactExports.useRef(null), + gt = useForkRef(mt, ht), + [yt, bt] = reactExports.useState(!ut), + vt = getHasTransition(lt) + let xt = !0 + ;(tt['aria-hidden'] === 'false' || tt['aria-hidden'] === !1) && (xt = !1) + const kt = () => ownerDocument(pt.current), + St = () => ((dt.current.modalRef = mt.current), (dt.current.mount = pt.current), dt.current), + Tt = () => { + it.mount(St(), { disableScrollLock: rt }), mt.current && (mt.current.scrollTop = 0) + }, + At = useEventCallback(() => { + const Ot = getContainer(et) || kt().body + it.add(St(), Ot), mt.current && Tt() + }), + Et = reactExports.useCallback(() => it.isTopModal(St()), [it]), + $t = useEventCallback((Ot) => { + ;(pt.current = Ot), Ot && (ut && Et() ? Tt() : mt.current && ariaHidden(mt.current, xt)) + }), + Dt = reactExports.useCallback(() => { + it.remove(St(), xt) + }, [xt, it]) + reactExports.useEffect( + () => () => { + Dt() + }, + [Dt], + ), + reactExports.useEffect(() => { + ut ? At() : (!vt || !ot) && Dt() + }, [ut, Dt, vt, ot, At]) + const jt = (Ot) => (Wt) => { + var zt + ;(zt = Ot.onKeyDown) == null || zt.call(Ot, Wt), + !(Wt.key !== 'Escape' || !Et()) && (nt || (Wt.stopPropagation(), ct && ct(Wt, 'escapeKeyDown'))) + }, + Pt = (Ot) => (Wt) => { + var zt + ;(zt = Ot.onClick) == null || zt.call(Ot, Wt), Wt.target === Wt.currentTarget && ct && ct(Wt, 'backdropClick') + } + return { + getRootProps: (Ot = {}) => { + const Wt = extractEventHandlers(tt) + delete Wt.onTransitionEnter, delete Wt.onTransitionExited + const zt = _extends$u({}, Wt, Ot) + return _extends$u({ role: 'presentation' }, zt, { onKeyDown: jt(zt), ref: gt }) + }, + getBackdropProps: (Ot = {}) => { + const Wt = Ot + return _extends$u({ 'aria-hidden': !0 }, Wt, { onClick: Pt(Wt), open: ut }) + }, + getTransitionProps: () => { + const Ot = () => { + bt(!1), at && at() + }, + Wt = () => { + bt(!0), st && st(), ot && Dt() + } + return { + onEnter: createChainedFunction(Ot, lt == null ? void 0 : lt.props.onEnter), + onExited: createChainedFunction(Wt, lt == null ? void 0 : lt.props.onExited), + } + }, + rootRef: gt, + portalRef: $t, + isTopModal: Et, + exited: yt, + hasTransition: vt, + } + } + const INTENTIONAL_DRAG_COUNT_THRESHOLD = 2 + function asc(tt, et) { + return tt - et + } + function clamp$6(tt, et, nt) { + return tt == null ? et : Math.min(Math.max(et, tt), nt) + } + function findClosest(tt, et) { + var nt + const { index: rt } = + (nt = tt.reduce((it, ot, at) => { + const st = Math.abs(et - ot) + return it === null || st < it.distance || st === it.distance ? { distance: st, index: at } : it + }, null)) != null + ? nt + : {} + return rt + } + function trackFinger(tt, et) { + if (et.current !== void 0 && tt.changedTouches) { + const nt = tt + for (let rt = 0; rt < nt.changedTouches.length; rt += 1) { + const it = nt.changedTouches[rt] + if (it.identifier === et.current) return { x: it.clientX, y: it.clientY } + } + return !1 + } + return { x: tt.clientX, y: tt.clientY } + } + function valueToPercent(tt, et, nt) { + return ((tt - et) * 100) / (nt - et) + } + function percentToValue(tt, et, nt) { + return (nt - et) * tt + et + } + function getDecimalPrecision(tt) { + if (Math.abs(tt) < 1) { + const nt = tt.toExponential().split('e-'), + rt = nt[0].split('.')[1] + return (rt ? rt.length : 0) + parseInt(nt[1], 10) + } + const et = tt.toString().split('.')[1] + return et ? et.length : 0 + } + function roundValueToStep(tt, et, nt) { + const rt = Math.round((tt - nt) / et) * et + nt + return Number(rt.toFixed(getDecimalPrecision(et))) + } + function setValueIndex({ values: tt, newValue: et, index: nt }) { + const rt = tt.slice() + return (rt[nt] = et), rt.sort(asc) + } + function focusThumb({ sliderRef: tt, activeIndex: et, setActive: nt }) { + var rt, it + const ot = ownerDocument(tt.current) + if ( + !((rt = tt.current) != null && rt.contains(ot.activeElement)) || + Number(ot == null || (it = ot.activeElement) == null ? void 0 : it.getAttribute('data-index')) !== et + ) { + var at + ;(at = tt.current) == null || at.querySelector(`[type="range"][data-index="${et}"]`).focus() + } + nt && nt(et) + } + function areValuesEqual(tt, et) { + return typeof tt == 'number' && typeof et == 'number' + ? tt === et + : typeof tt == 'object' && typeof et == 'object' + ? areArraysEqual$1(tt, et) + : !1 + } + const axisProps = { + horizontal: { offset: (tt) => ({ left: `${tt}%` }), leap: (tt) => ({ width: `${tt}%` }) }, + 'horizontal-reverse': { offset: (tt) => ({ right: `${tt}%` }), leap: (tt) => ({ width: `${tt}%` }) }, + vertical: { offset: (tt) => ({ bottom: `${tt}%` }), leap: (tt) => ({ height: `${tt}%` }) }, + }, + Identity$1 = (tt) => tt + let cachedSupportsTouchActionNone + function doesSupportTouchActionNone() { + return ( + cachedSupportsTouchActionNone === void 0 && + (typeof CSS < 'u' && typeof CSS.supports == 'function' + ? (cachedSupportsTouchActionNone = CSS.supports('touch-action', 'none')) + : (cachedSupportsTouchActionNone = !0)), + cachedSupportsTouchActionNone + ) + } + function useSlider(tt) { + const { + 'aria-labelledby': et, + defaultValue: nt, + disabled: rt = !1, + disableSwap: it = !1, + isRtl: ot = !1, + marks: at = !1, + max: st = 100, + min: lt = 0, + name: ct, + onChange: ut, + onChangeCommitted: ht, + orientation: dt = 'horizontal', + rootRef: pt, + scale: mt = Identity$1, + step: gt = 1, + tabIndex: yt, + value: bt, + } = tt, + vt = reactExports.useRef(), + [xt, kt] = reactExports.useState(-1), + [St, Tt] = reactExports.useState(-1), + [At, Et] = reactExports.useState(!1), + $t = reactExports.useRef(0), + [Dt, jt] = useControlled({ controlled: bt, default: nt ?? lt, name: 'Slider' }), + Pt = + ut && + ((kn, Dn, un) => { + const Zt = kn.nativeEvent || kn, + Xt = new Zt.constructor(Zt.type, Zt) + Object.defineProperty(Xt, 'target', { writable: !0, value: { value: Dn, name: ct } }), ut(Xt, Dn, un) + }), + Ct = Array.isArray(Dt) + let wt = Ct ? Dt.slice().sort(asc) : [Dt] + wt = wt.map((kn) => clamp$6(kn, lt, st)) + const It = + at === !0 && gt !== null + ? [...Array(Math.floor((st - lt) / gt) + 1)].map((kn, Dn) => ({ value: lt + gt * Dn })) + : at || [], + Ot = It.map((kn) => kn.value), + { isFocusVisibleRef: Wt, onBlur: zt, onFocus: Ft, ref: Nt } = useIsFocusVisible(), + [Ut, Mt] = reactExports.useState(-1), + Ht = reactExports.useRef(), + en = useForkRef(Nt, Ht), + sn = useForkRef(pt, en), + Kt = (kn) => (Dn) => { + var un + const Zt = Number(Dn.currentTarget.getAttribute('data-index')) + Ft(Dn), Wt.current === !0 && Mt(Zt), Tt(Zt), kn == null || (un = kn.onFocus) == null || un.call(kn, Dn) + }, + rn = (kn) => (Dn) => { + var un + zt(Dn), Wt.current === !1 && Mt(-1), Tt(-1), kn == null || (un = kn.onBlur) == null || un.call(kn, Dn) + } + useEnhancedEffect$1(() => { + if (rt && Ht.current.contains(document.activeElement)) { + var kn + ;(kn = document.activeElement) == null || kn.blur() + } + }, [rt]), + rt && xt !== -1 && kt(-1), + rt && Ut !== -1 && Mt(-1) + const nn = (kn) => (Dn) => { + var un + ;(un = kn.onChange) == null || un.call(kn, Dn) + const Zt = Number(Dn.currentTarget.getAttribute('data-index')), + Xt = wt[Zt], + Sn = Ot.indexOf(Xt) + let Rn = Dn.target.valueAsNumber + if (It && gt == null) { + const jn = Ot[Ot.length - 1] + Rn > jn ? (Rn = jn) : Rn < Ot[0] ? (Rn = Ot[0]) : (Rn = Rn < Xt ? Ot[Sn - 1] : Ot[Sn + 1]) + } + if (((Rn = clamp$6(Rn, lt, st)), Ct)) { + it && (Rn = clamp$6(Rn, wt[Zt - 1] || -1 / 0, wt[Zt + 1] || 1 / 0)) + const jn = Rn + Rn = setValueIndex({ values: wt, newValue: Rn, index: Zt }) + let On = Zt + it || (On = Rn.indexOf(jn)), focusThumb({ sliderRef: Ht, activeIndex: On }) + } + jt(Rn), Mt(Zt), Pt && !areValuesEqual(Rn, Dt) && Pt(Dn, Rn, Zt), ht && ht(Dn, Rn) + }, + hn = reactExports.useRef() + let vn = dt + ot && dt === 'horizontal' && (vn += '-reverse') + const an = ({ finger: kn, move: Dn = !1 }) => { + const { current: un } = Ht, + { width: Zt, height: Xt, bottom: Sn, left: Rn } = un.getBoundingClientRect() + let jn + vn.indexOf('vertical') === 0 ? (jn = (Sn - kn.y) / Xt) : (jn = (kn.x - Rn) / Zt), + vn.indexOf('-reverse') !== -1 && (jn = 1 - jn) + let On + if (((On = percentToValue(jn, lt, st)), gt)) On = roundValueToStep(On, gt, lt) + else { + const Vn = findClosest(Ot, On) + On = Ot[Vn] + } + On = clamp$6(On, lt, st) + let Zn = 0 + if (Ct) { + Dn ? (Zn = hn.current) : (Zn = findClosest(wt, On)), + it && (On = clamp$6(On, wt[Zn - 1] || -1 / 0, wt[Zn + 1] || 1 / 0)) + const Vn = On + ;(On = setValueIndex({ values: wt, newValue: On, index: Zn })), + (it && Dn) || ((Zn = On.indexOf(Vn)), (hn.current = Zn)) + } + return { newValue: On, activeIndex: Zn } + }, + Qt = useEventCallback((kn) => { + const Dn = trackFinger(kn, vt) + if (!Dn) return + if ((($t.current += 1), kn.type === 'mousemove' && kn.buttons === 0)) { + _n(kn) + return + } + const { newValue: un, activeIndex: Zt } = an({ finger: Dn, move: !0 }) + focusThumb({ sliderRef: Ht, activeIndex: Zt, setActive: kt }), + jt(un), + !At && $t.current > INTENTIONAL_DRAG_COUNT_THRESHOLD && Et(!0), + Pt && !areValuesEqual(un, Dt) && Pt(kn, un, Zt) + }), + _n = useEventCallback((kn) => { + const Dn = trackFinger(kn, vt) + if ((Et(!1), !Dn)) return + const { newValue: un } = an({ finger: Dn, move: !0 }) + kt(-1), kn.type === 'touchend' && Tt(-1), ht && ht(kn, un), (vt.current = void 0), $n() + }), + Pn = useEventCallback((kn) => { + if (rt) return + doesSupportTouchActionNone() || kn.preventDefault() + const Dn = kn.changedTouches[0] + Dn != null && (vt.current = Dn.identifier) + const un = trackFinger(kn, vt) + if (un !== !1) { + const { newValue: Xt, activeIndex: Sn } = an({ finger: un }) + focusThumb({ sliderRef: Ht, activeIndex: Sn, setActive: kt }), + jt(Xt), + Pt && !areValuesEqual(Xt, Dt) && Pt(kn, Xt, Sn) + } + $t.current = 0 + const Zt = ownerDocument(Ht.current) + Zt.addEventListener('touchmove', Qt), Zt.addEventListener('touchend', _n) + }), + $n = reactExports.useCallback(() => { + const kn = ownerDocument(Ht.current) + kn.removeEventListener('mousemove', Qt), + kn.removeEventListener('mouseup', _n), + kn.removeEventListener('touchmove', Qt), + kn.removeEventListener('touchend', _n) + }, [_n, Qt]) + reactExports.useEffect(() => { + const { current: kn } = Ht + return ( + kn.addEventListener('touchstart', Pn, { passive: doesSupportTouchActionNone() }), + () => { + kn.removeEventListener('touchstart', Pn, { passive: doesSupportTouchActionNone() }), $n() + } + ) + }, [$n, Pn]), + reactExports.useEffect(() => { + rt && $n() + }, [rt, $n]) + const Nn = (kn) => (Dn) => { + var un + if (((un = kn.onMouseDown) == null || un.call(kn, Dn), rt || Dn.defaultPrevented || Dn.button !== 0)) return + Dn.preventDefault() + const Zt = trackFinger(Dn, vt) + if (Zt !== !1) { + const { newValue: Sn, activeIndex: Rn } = an({ finger: Zt }) + focusThumb({ sliderRef: Ht, activeIndex: Rn, setActive: kt }), + jt(Sn), + Pt && !areValuesEqual(Sn, Dt) && Pt(Dn, Sn, Rn) + } + $t.current = 0 + const Xt = ownerDocument(Ht.current) + Xt.addEventListener('mousemove', Qt), Xt.addEventListener('mouseup', _n) + }, + Tn = valueToPercent(Ct ? wt[0] : lt, lt, st), + cn = valueToPercent(wt[wt.length - 1], lt, st) - Tn, + mn = (kn = {}) => { + const Dn = extractEventHandlers(kn), + un = { onMouseDown: Nn(Dn || {}) }, + Zt = _extends$u({}, Dn, un) + return _extends$u({}, kn, { ref: sn }, Zt) + }, + In = (kn) => (Dn) => { + var un + ;(un = kn.onMouseOver) == null || un.call(kn, Dn) + const Zt = Number(Dn.currentTarget.getAttribute('data-index')) + Tt(Zt) + }, + An = (kn) => (Dn) => { + var un + ;(un = kn.onMouseLeave) == null || un.call(kn, Dn), Tt(-1) + } + return { + active: xt, + axis: vn, + axisProps, + dragging: At, + focusedThumbIndex: Ut, + getHiddenInputProps: (kn = {}) => { + var Dn + const un = extractEventHandlers(kn), + Zt = { onChange: nn(un || {}), onFocus: Kt(un || {}), onBlur: rn(un || {}) }, + Xt = _extends$u({}, un, Zt) + return _extends$u( + { + tabIndex: yt, + 'aria-labelledby': et, + 'aria-orientation': dt, + 'aria-valuemax': mt(st), + 'aria-valuemin': mt(lt), + name: ct, + type: 'range', + min: tt.min, + max: tt.max, + step: tt.step === null && tt.marks ? 'any' : (Dn = tt.step) != null ? Dn : void 0, + disabled: rt, + }, + kn, + Xt, + { style: _extends$u({}, visuallyHidden$1, { direction: ot ? 'rtl' : 'ltr', width: '100%', height: '100%' }) }, + ) + }, + getRootProps: mn, + getThumbProps: (kn = {}) => { + const Dn = extractEventHandlers(kn), + un = { onMouseOver: In(Dn || {}), onMouseLeave: An(Dn || {}) } + return _extends$u({}, kn, Dn, un) + }, + marks: It, + open: St, + range: Ct, + rootRef: sn, + trackLeap: cn, + trackOffset: Tn, + values: wt, + getThumbStyle: (kn) => ({ pointerEvents: xt !== -1 && xt !== kn ? 'none' : void 0 }), + } + } + const _excluded$1p = ['onChange', 'maxRows', 'minRows', 'style', 'value'] + function getStyleValue(tt) { + return parseInt(tt, 10) || 0 + } + const styles$5 = { + shadow: { + visibility: 'hidden', + position: 'absolute', + overflow: 'hidden', + height: 0, + top: 0, + left: 0, + transform: 'translateZ(0)', + }, + } + function isEmpty$1(tt) { + return tt == null || Object.keys(tt).length === 0 || (tt.outerHeightStyle === 0 && !tt.overflow) + } + const TextareaAutosize = reactExports.forwardRef(function (et, nt) { + const { onChange: rt, maxRows: it, minRows: ot = 1, style: at, value: st } = et, + lt = _objectWithoutPropertiesLoose$m(et, _excluded$1p), + { current: ct } = reactExports.useRef(st != null), + ut = reactExports.useRef(null), + ht = useForkRef(nt, ut), + dt = reactExports.useRef(null), + pt = reactExports.useRef(0), + [mt, gt] = reactExports.useState({ outerHeightStyle: 0 }), + yt = reactExports.useCallback(() => { + const kt = ut.current, + Tt = ownerWindow(kt).getComputedStyle(kt) + if (Tt.width === '0px') return { outerHeightStyle: 0 } + const At = dt.current + ;(At.style.width = Tt.width), + (At.value = kt.value || et.placeholder || 'x'), + At.value.slice(-1) === + ` +` && (At.value += ' ') + const Et = Tt.boxSizing, + $t = getStyleValue(Tt.paddingBottom) + getStyleValue(Tt.paddingTop), + Dt = getStyleValue(Tt.borderBottomWidth) + getStyleValue(Tt.borderTopWidth), + jt = At.scrollHeight + At.value = 'x' + const Pt = At.scrollHeight + let Ct = jt + ot && (Ct = Math.max(Number(ot) * Pt, Ct)), + it && (Ct = Math.min(Number(it) * Pt, Ct)), + (Ct = Math.max(Ct, Pt)) + const wt = Ct + (Et === 'border-box' ? $t + Dt : 0), + It = Math.abs(Ct - jt) <= 1 + return { outerHeightStyle: wt, overflow: It } + }, [it, ot, et.placeholder]), + bt = (kt, St) => { + const { outerHeightStyle: Tt, overflow: At } = St + return pt.current < 20 && ((Tt > 0 && Math.abs((kt.outerHeightStyle || 0) - Tt) > 1) || kt.overflow !== At) + ? ((pt.current += 1), { overflow: At, outerHeightStyle: Tt }) + : kt + }, + vt = reactExports.useCallback(() => { + const kt = yt() + isEmpty$1(kt) || gt((St) => bt(St, kt)) + }, [yt]) + useEnhancedEffect$1(() => { + const kt = () => { + const jt = yt() + isEmpty$1(jt) || + reactDomExports.flushSync(() => { + gt((Pt) => bt(Pt, jt)) + }) + }, + St = () => { + ;(pt.current = 0), kt() + } + let Tt + const At = debounce$5(St), + Et = ut.current, + $t = ownerWindow(Et) + $t.addEventListener('resize', At) + let Dt + return ( + typeof ResizeObserver < 'u' && ((Dt = new ResizeObserver(St)), Dt.observe(Et)), + () => { + At.clear(), cancelAnimationFrame(Tt), $t.removeEventListener('resize', At), Dt && Dt.disconnect() + } + ) + }, [yt]), + useEnhancedEffect$1(() => { + vt() + }), + reactExports.useEffect(() => { + pt.current = 0 + }, [st]) + const xt = (kt) => { + ;(pt.current = 0), ct || vt(), rt && rt(kt) + } + return jsxRuntimeExports.jsxs(reactExports.Fragment, { + children: [ + jsxRuntimeExports.jsx( + 'textarea', + _extends$u( + { + value: st, + onChange: xt, + ref: ht, + rows: ot, + style: _extends$u({ height: mt.outerHeightStyle, overflow: mt.overflow ? 'hidden' : void 0 }, at), + }, + lt, + ), + ), + jsxRuntimeExports.jsx('textarea', { + 'aria-hidden': !0, + className: et.className, + readOnly: !0, + ref: dt, + tabIndex: -1, + style: _extends$u({}, styles$5.shadow, at, { paddingTop: 0, paddingBottom: 0 }), + }), + ], + }) + }), + _excluded$1o = [ + 'anchorEl', + 'component', + 'components', + 'componentsProps', + 'container', + 'disablePortal', + 'keepMounted', + 'modifiers', + 'open', + 'placement', + 'popperOptions', + 'popperRef', + 'transition', + 'slots', + 'slotProps', + ], + PopperRoot = styled$1(Popper$1, { name: 'MuiPopper', slot: 'Root', overridesResolver: (tt, et) => et.root })({}), + Popper = reactExports.forwardRef(function (et, nt) { + var rt + const it = useTheme$3(), + ot = useThemeProps({ props: et, name: 'MuiPopper' }), + { + anchorEl: at, + component: st, + components: lt, + componentsProps: ct, + container: ut, + disablePortal: ht, + keepMounted: dt, + modifiers: pt, + open: mt, + placement: gt, + popperOptions: yt, + popperRef: bt, + transition: vt, + slots: xt, + slotProps: kt, + } = ot, + St = _objectWithoutPropertiesLoose$m(ot, _excluded$1o), + Tt = (rt = xt == null ? void 0 : xt.root) != null ? rt : lt == null ? void 0 : lt.Root, + At = _extends$u( + { + anchorEl: at, + container: ut, + disablePortal: ht, + keepMounted: dt, + modifiers: pt, + open: mt, + placement: gt, + popperOptions: yt, + popperRef: bt, + transition: vt, + }, + St, + ) + return jsxRuntimeExports.jsx( + PopperRoot, + _extends$u( + { as: st, direction: it == null ? void 0 : it.direction, slots: { root: Tt }, slotProps: kt ?? ct }, + At, + { ref: nt }, + ), + ) + }), + MuiPopper = Popper, + CancelIcon = createSvgIcon( + jsxRuntimeExports.jsx('path', { + d: 'M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z', + }), + 'Cancel', + ) + function getChipUtilityClass(tt) { + return generateUtilityClass('MuiChip', tt) + } + const chipClasses = generateUtilityClasses('MuiChip', [ + 'root', + 'sizeSmall', + 'sizeMedium', + 'colorError', + 'colorInfo', + 'colorPrimary', + 'colorSecondary', + 'colorSuccess', + 'colorWarning', + 'disabled', + 'clickable', + 'clickableColorPrimary', + 'clickableColorSecondary', + 'deletable', + 'deletableColorPrimary', + 'deletableColorSecondary', + 'outlined', + 'filled', + 'outlinedPrimary', + 'outlinedSecondary', + 'filledPrimary', + 'filledSecondary', + 'avatar', + 'avatarSmall', + 'avatarMedium', + 'avatarColorPrimary', + 'avatarColorSecondary', + 'icon', + 'iconSmall', + 'iconMedium', + 'iconColorPrimary', + 'iconColorSecondary', + 'label', + 'labelSmall', + 'labelMedium', + 'deleteIcon', + 'deleteIconSmall', + 'deleteIconMedium', + 'deleteIconColorPrimary', + 'deleteIconColorSecondary', + 'deleteIconOutlinedColorPrimary', + 'deleteIconOutlinedColorSecondary', + 'deleteIconFilledColorPrimary', + 'deleteIconFilledColorSecondary', + 'focusVisible', + ]), + chipClasses$1 = chipClasses, + _excluded$1n = [ + 'avatar', + 'className', + 'clickable', + 'color', + 'component', + 'deleteIcon', + 'disabled', + 'icon', + 'label', + 'onClick', + 'onDelete', + 'onKeyDown', + 'onKeyUp', + 'size', + 'variant', + 'tabIndex', + 'skipFocusWhenDisabled', + ], + useUtilityClasses$Q = (tt) => { + const { + classes: et, + disabled: nt, + size: rt, + color: it, + iconColor: ot, + onDelete: at, + clickable: st, + variant: lt, + } = tt, + ct = { + root: [ + 'root', + lt, + nt && 'disabled', + `size${capitalize(rt)}`, + `color${capitalize(it)}`, + st && 'clickable', + st && `clickableColor${capitalize(it)}`, + at && 'deletable', + at && `deletableColor${capitalize(it)}`, + `${lt}${capitalize(it)}`, + ], + label: ['label', `label${capitalize(rt)}`], + avatar: ['avatar', `avatar${capitalize(rt)}`, `avatarColor${capitalize(it)}`], + icon: ['icon', `icon${capitalize(rt)}`, `iconColor${capitalize(ot)}`], + deleteIcon: [ + 'deleteIcon', + `deleteIcon${capitalize(rt)}`, + `deleteIconColor${capitalize(it)}`, + `deleteIcon${capitalize(lt)}Color${capitalize(it)}`, + ], + } + return composeClasses(ct, getChipUtilityClass, et) + }, + ChipRoot = styled$1('div', { + name: 'MuiChip', + slot: 'Root', + overridesResolver: (tt, et) => { + const { ownerState: nt } = tt, + { color: rt, iconColor: it, clickable: ot, onDelete: at, size: st, variant: lt } = nt + return [ + { [`& .${chipClasses$1.avatar}`]: et.avatar }, + { [`& .${chipClasses$1.avatar}`]: et[`avatar${capitalize(st)}`] }, + { [`& .${chipClasses$1.avatar}`]: et[`avatarColor${capitalize(rt)}`] }, + { [`& .${chipClasses$1.icon}`]: et.icon }, + { [`& .${chipClasses$1.icon}`]: et[`icon${capitalize(st)}`] }, + { [`& .${chipClasses$1.icon}`]: et[`iconColor${capitalize(it)}`] }, + { [`& .${chipClasses$1.deleteIcon}`]: et.deleteIcon }, + { [`& .${chipClasses$1.deleteIcon}`]: et[`deleteIcon${capitalize(st)}`] }, + { [`& .${chipClasses$1.deleteIcon}`]: et[`deleteIconColor${capitalize(rt)}`] }, + { [`& .${chipClasses$1.deleteIcon}`]: et[`deleteIcon${capitalize(lt)}Color${capitalize(rt)}`] }, + et.root, + et[`size${capitalize(st)}`], + et[`color${capitalize(rt)}`], + ot && et.clickable, + ot && rt !== 'default' && et[`clickableColor${capitalize(rt)})`], + at && et.deletable, + at && rt !== 'default' && et[`deletableColor${capitalize(rt)}`], + et[lt], + et[`${lt}${capitalize(rt)}`], + ] + }, + })( + ({ theme: tt, ownerState: et }) => { + const nt = tt.palette.mode === 'light' ? tt.palette.grey[700] : tt.palette.grey[300] + return _extends$u( + { + maxWidth: '100%', + fontFamily: tt.typography.fontFamily, + fontSize: tt.typography.pxToRem(13), + display: 'inline-flex', + alignItems: 'center', + justifyContent: 'center', + height: 32, + color: (tt.vars || tt).palette.text.primary, + backgroundColor: (tt.vars || tt).palette.action.selected, + borderRadius: 32 / 2, + whiteSpace: 'nowrap', + transition: tt.transitions.create(['background-color', 'box-shadow']), + cursor: 'unset', + outline: 0, + textDecoration: 'none', + border: 0, + padding: 0, + verticalAlign: 'middle', + boxSizing: 'border-box', + [`&.${chipClasses$1.disabled}`]: { + opacity: (tt.vars || tt).palette.action.disabledOpacity, + pointerEvents: 'none', + }, + [`& .${chipClasses$1.avatar}`]: { + marginLeft: 5, + marginRight: -6, + width: 24, + height: 24, + color: tt.vars ? tt.vars.palette.Chip.defaultAvatarColor : nt, + fontSize: tt.typography.pxToRem(12), + }, + [`& .${chipClasses$1.avatarColorPrimary}`]: { + color: (tt.vars || tt).palette.primary.contrastText, + backgroundColor: (tt.vars || tt).palette.primary.dark, + }, + [`& .${chipClasses$1.avatarColorSecondary}`]: { + color: (tt.vars || tt).palette.secondary.contrastText, + backgroundColor: (tt.vars || tt).palette.secondary.dark, + }, + [`& .${chipClasses$1.avatarSmall}`]: { + marginLeft: 4, + marginRight: -4, + width: 18, + height: 18, + fontSize: tt.typography.pxToRem(10), + }, + [`& .${chipClasses$1.icon}`]: _extends$u( + { marginLeft: 5, marginRight: -6 }, + et.size === 'small' && { fontSize: 18, marginLeft: 4, marginRight: -4 }, + et.iconColor === et.color && + _extends$u( + { color: tt.vars ? tt.vars.palette.Chip.defaultIconColor : nt }, + et.color !== 'default' && { color: 'inherit' }, + ), + ), + [`& .${chipClasses$1.deleteIcon}`]: _extends$u( + { + WebkitTapHighlightColor: 'transparent', + color: tt.vars + ? `rgba(${tt.vars.palette.text.primaryChannel} / 0.26)` + : alpha$1(tt.palette.text.primary, 0.26), + fontSize: 22, + cursor: 'pointer', + margin: '0 5px 0 -6px', + '&:hover': { + color: tt.vars + ? `rgba(${tt.vars.palette.text.primaryChannel} / 0.4)` + : alpha$1(tt.palette.text.primary, 0.4), + }, + }, + et.size === 'small' && { fontSize: 16, marginRight: 4, marginLeft: -4 }, + et.color !== 'default' && { + color: tt.vars + ? `rgba(${tt.vars.palette[et.color].contrastTextChannel} / 0.7)` + : alpha$1(tt.palette[et.color].contrastText, 0.7), + '&:hover, &:active': { color: (tt.vars || tt).palette[et.color].contrastText }, + }, + ), + }, + et.size === 'small' && { height: 24 }, + et.color !== 'default' && { + backgroundColor: (tt.vars || tt).palette[et.color].main, + color: (tt.vars || tt).palette[et.color].contrastText, + }, + et.onDelete && { + [`&.${chipClasses$1.focusVisible}`]: { + backgroundColor: tt.vars + ? `rgba(${tt.vars.palette.action.selectedChannel} / calc(${tt.vars.palette.action.selectedOpacity} + ${tt.vars.palette.action.focusOpacity}))` + : alpha$1( + tt.palette.action.selected, + tt.palette.action.selectedOpacity + tt.palette.action.focusOpacity, + ), + }, + }, + et.onDelete && + et.color !== 'default' && { + [`&.${chipClasses$1.focusVisible}`]: { backgroundColor: (tt.vars || tt).palette[et.color].dark }, + }, + ) + }, + ({ theme: tt, ownerState: et }) => + _extends$u( + {}, + et.clickable && { + userSelect: 'none', + WebkitTapHighlightColor: 'transparent', + cursor: 'pointer', + '&:hover': { + backgroundColor: tt.vars + ? `rgba(${tt.vars.palette.action.selectedChannel} / calc(${tt.vars.palette.action.selectedOpacity} + ${tt.vars.palette.action.hoverOpacity}))` + : alpha$1( + tt.palette.action.selected, + tt.palette.action.selectedOpacity + tt.palette.action.hoverOpacity, + ), + }, + [`&.${chipClasses$1.focusVisible}`]: { + backgroundColor: tt.vars + ? `rgba(${tt.vars.palette.action.selectedChannel} / calc(${tt.vars.palette.action.selectedOpacity} + ${tt.vars.palette.action.focusOpacity}))` + : alpha$1( + tt.palette.action.selected, + tt.palette.action.selectedOpacity + tt.palette.action.focusOpacity, + ), + }, + '&:active': { boxShadow: (tt.vars || tt).shadows[1] }, + }, + et.clickable && + et.color !== 'default' && { + [`&:hover, &.${chipClasses$1.focusVisible}`]: { backgroundColor: (tt.vars || tt).palette[et.color].dark }, + }, + ), + ({ theme: tt, ownerState: et }) => + _extends$u( + {}, + et.variant === 'outlined' && { + backgroundColor: 'transparent', + border: tt.vars + ? `1px solid ${tt.vars.palette.Chip.defaultBorder}` + : `1px solid ${tt.palette.mode === 'light' ? tt.palette.grey[400] : tt.palette.grey[700]}`, + [`&.${chipClasses$1.clickable}:hover`]: { backgroundColor: (tt.vars || tt).palette.action.hover }, + [`&.${chipClasses$1.focusVisible}`]: { backgroundColor: (tt.vars || tt).palette.action.focus }, + [`& .${chipClasses$1.avatar}`]: { marginLeft: 4 }, + [`& .${chipClasses$1.avatarSmall}`]: { marginLeft: 2 }, + [`& .${chipClasses$1.icon}`]: { marginLeft: 4 }, + [`& .${chipClasses$1.iconSmall}`]: { marginLeft: 2 }, + [`& .${chipClasses$1.deleteIcon}`]: { marginRight: 5 }, + [`& .${chipClasses$1.deleteIconSmall}`]: { marginRight: 3 }, + }, + et.variant === 'outlined' && + et.color !== 'default' && { + color: (tt.vars || tt).palette[et.color].main, + border: `1px solid ${ + tt.vars + ? `rgba(${tt.vars.palette[et.color].mainChannel} / 0.7)` + : alpha$1(tt.palette[et.color].main, 0.7) + }`, + [`&.${chipClasses$1.clickable}:hover`]: { + backgroundColor: tt.vars + ? `rgba(${tt.vars.palette[et.color].mainChannel} / ${tt.vars.palette.action.hoverOpacity})` + : alpha$1(tt.palette[et.color].main, tt.palette.action.hoverOpacity), + }, + [`&.${chipClasses$1.focusVisible}`]: { + backgroundColor: tt.vars + ? `rgba(${tt.vars.palette[et.color].mainChannel} / ${tt.vars.palette.action.focusOpacity})` + : alpha$1(tt.palette[et.color].main, tt.palette.action.focusOpacity), + }, + [`& .${chipClasses$1.deleteIcon}`]: { + color: tt.vars + ? `rgba(${tt.vars.palette[et.color].mainChannel} / 0.7)` + : alpha$1(tt.palette[et.color].main, 0.7), + '&:hover, &:active': { color: (tt.vars || tt).palette[et.color].main }, + }, + }, + ), + ), + ChipLabel = styled$1('span', { + name: 'MuiChip', + slot: 'Label', + overridesResolver: (tt, et) => { + const { ownerState: nt } = tt, + { size: rt } = nt + return [et.label, et[`label${capitalize(rt)}`]] + }, + })(({ ownerState: tt }) => + _extends$u( + { overflow: 'hidden', textOverflow: 'ellipsis', paddingLeft: 12, paddingRight: 12, whiteSpace: 'nowrap' }, + tt.variant === 'outlined' && { paddingLeft: 11, paddingRight: 11 }, + tt.size === 'small' && { paddingLeft: 8, paddingRight: 8 }, + tt.size === 'small' && tt.variant === 'outlined' && { paddingLeft: 7, paddingRight: 7 }, + ), + ) + function isDeleteKeyboardEvent(tt) { + return tt.key === 'Backspace' || tt.key === 'Delete' + } + const Chip = reactExports.forwardRef(function (et, nt) { + const rt = useThemeProps({ props: et, name: 'MuiChip' }), + { + avatar: it, + className: ot, + clickable: at, + color: st = 'default', + component: lt, + deleteIcon: ct, + disabled: ut = !1, + icon: ht, + label: dt, + onClick: pt, + onDelete: mt, + onKeyDown: gt, + onKeyUp: yt, + size: bt = 'medium', + variant: vt = 'filled', + tabIndex: xt, + skipFocusWhenDisabled: kt = !1, + } = rt, + St = _objectWithoutPropertiesLoose$m(rt, _excluded$1n), + Tt = reactExports.useRef(null), + At = useForkRef(Tt, nt), + Et = (Ft) => { + Ft.stopPropagation(), mt && mt(Ft) + }, + $t = (Ft) => { + Ft.currentTarget === Ft.target && isDeleteKeyboardEvent(Ft) && Ft.preventDefault(), gt && gt(Ft) + }, + Dt = (Ft) => { + Ft.currentTarget === Ft.target && + (mt && isDeleteKeyboardEvent(Ft) ? mt(Ft) : Ft.key === 'Escape' && Tt.current && Tt.current.blur()), + yt && yt(Ft) + }, + jt = at !== !1 && pt ? !0 : at, + Pt = jt || mt ? ButtonBase$1 : lt || 'div', + Ct = _extends$u({}, rt, { + component: Pt, + disabled: ut, + size: bt, + color: st, + iconColor: (reactExports.isValidElement(ht) && ht.props.color) || st, + onDelete: !!mt, + clickable: jt, + variant: vt, + }), + wt = useUtilityClasses$Q(Ct), + It = + Pt === ButtonBase$1 + ? _extends$u( + { component: lt || 'div', focusVisibleClassName: wt.focusVisible }, + mt && { disableRipple: !0 }, + ) + : {} + let Ot = null + mt && + (Ot = + ct && reactExports.isValidElement(ct) + ? reactExports.cloneElement(ct, { className: clsx$3(ct.props.className, wt.deleteIcon), onClick: Et }) + : jsxRuntimeExports.jsx(CancelIcon, { className: clsx$3(wt.deleteIcon), onClick: Et })) + let Wt = null + it && + reactExports.isValidElement(it) && + (Wt = reactExports.cloneElement(it, { className: clsx$3(wt.avatar, it.props.className) })) + let zt = null + return ( + ht && + reactExports.isValidElement(ht) && + (zt = reactExports.cloneElement(ht, { className: clsx$3(wt.icon, ht.props.className) })), + jsxRuntimeExports.jsxs( + ChipRoot, + _extends$u( + { + as: Pt, + className: clsx$3(wt.root, ot), + disabled: jt && ut ? !0 : void 0, + onClick: pt, + onKeyDown: $t, + onKeyUp: Dt, + ref: At, + tabIndex: kt && ut ? -1 : xt, + ownerState: Ct, + }, + It, + St, + { + children: [ + Wt || zt, + jsxRuntimeExports.jsx(ChipLabel, { className: clsx$3(wt.label), ownerState: Ct, children: dt }), + Ot, + ], + }, + ), + ) + ) + }), + Chip$1 = Chip + function formControlState({ props: tt, states: et, muiFormControl: nt }) { + return et.reduce((rt, it) => ((rt[it] = tt[it]), nt && typeof tt[it] > 'u' && (rt[it] = nt[it]), rt), {}) + } + const FormControlContext = reactExports.createContext(void 0), + FormControlContext$1 = FormControlContext + function useFormControl() { + return reactExports.useContext(FormControlContext$1) + } + function GlobalStyles(tt) { + return jsxRuntimeExports.jsx( + GlobalStyles$1, + _extends$u({}, tt, { defaultTheme: defaultTheme$1, themeId: THEME_ID }), + ) + } + function hasValue(tt) { + return tt != null && !(Array.isArray(tt) && tt.length === 0) + } + function isFilled(tt, et = !1) { + return ( + tt && ((hasValue(tt.value) && tt.value !== '') || (et && hasValue(tt.defaultValue) && tt.defaultValue !== '')) + ) + } + function isAdornedStart(tt) { + return tt.startAdornment + } + function getInputBaseUtilityClass(tt) { + return generateUtilityClass('MuiInputBase', tt) + } + const inputBaseClasses = generateUtilityClasses('MuiInputBase', [ + 'root', + 'formControl', + 'focused', + 'disabled', + 'adornedStart', + 'adornedEnd', + 'error', + 'sizeSmall', + 'multiline', + 'colorSecondary', + 'fullWidth', + 'hiddenLabel', + 'readOnly', + 'input', + 'inputSizeSmall', + 'inputMultiline', + 'inputTypeSearch', + 'inputAdornedStart', + 'inputAdornedEnd', + 'inputHiddenLabel', + ]), + inputBaseClasses$1 = inputBaseClasses, + _excluded$1m = [ + 'aria-describedby', + 'autoComplete', + 'autoFocus', + 'className', + 'color', + 'components', + 'componentsProps', + 'defaultValue', + 'disabled', + 'disableInjectingGlobalStyles', + 'endAdornment', + 'error', + 'fullWidth', + 'id', + 'inputComponent', + 'inputProps', + 'inputRef', + 'margin', + 'maxRows', + 'minRows', + 'multiline', + 'name', + 'onBlur', + 'onChange', + 'onClick', + 'onFocus', + 'onKeyDown', + 'onKeyUp', + 'placeholder', + 'readOnly', + 'renderSuffix', + 'rows', + 'size', + 'slotProps', + 'slots', + 'startAdornment', + 'type', + 'value', + ], + rootOverridesResolver = (tt, et) => { + const { ownerState: nt } = tt + return [ + et.root, + nt.formControl && et.formControl, + nt.startAdornment && et.adornedStart, + nt.endAdornment && et.adornedEnd, + nt.error && et.error, + nt.size === 'small' && et.sizeSmall, + nt.multiline && et.multiline, + nt.color && et[`color${capitalize(nt.color)}`], + nt.fullWidth && et.fullWidth, + nt.hiddenLabel && et.hiddenLabel, + ] + }, + inputOverridesResolver = (tt, et) => { + const { ownerState: nt } = tt + return [ + et.input, + nt.size === 'small' && et.inputSizeSmall, + nt.multiline && et.inputMultiline, + nt.type === 'search' && et.inputTypeSearch, + nt.startAdornment && et.inputAdornedStart, + nt.endAdornment && et.inputAdornedEnd, + nt.hiddenLabel && et.inputHiddenLabel, + ] + }, + useUtilityClasses$P = (tt) => { + const { + classes: et, + color: nt, + disabled: rt, + error: it, + endAdornment: ot, + focused: at, + formControl: st, + fullWidth: lt, + hiddenLabel: ct, + multiline: ut, + readOnly: ht, + size: dt, + startAdornment: pt, + type: mt, + } = tt, + gt = { + root: [ + 'root', + `color${capitalize(nt)}`, + rt && 'disabled', + it && 'error', + lt && 'fullWidth', + at && 'focused', + st && 'formControl', + dt && dt !== 'medium' && `size${capitalize(dt)}`, + ut && 'multiline', + pt && 'adornedStart', + ot && 'adornedEnd', + ct && 'hiddenLabel', + ht && 'readOnly', + ], + input: [ + 'input', + rt && 'disabled', + mt === 'search' && 'inputTypeSearch', + ut && 'inputMultiline', + dt === 'small' && 'inputSizeSmall', + ct && 'inputHiddenLabel', + pt && 'inputAdornedStart', + ot && 'inputAdornedEnd', + ht && 'readOnly', + ], + } + return composeClasses(gt, getInputBaseUtilityClass, et) + }, + InputBaseRoot = styled$1('div', { name: 'MuiInputBase', slot: 'Root', overridesResolver: rootOverridesResolver })( + ({ theme: tt, ownerState: et }) => + _extends$u( + {}, + tt.typography.body1, + { + color: (tt.vars || tt).palette.text.primary, + lineHeight: '1.4375em', + boxSizing: 'border-box', + position: 'relative', + cursor: 'text', + display: 'inline-flex', + alignItems: 'center', + [`&.${inputBaseClasses$1.disabled}`]: { color: (tt.vars || tt).palette.text.disabled, cursor: 'default' }, + }, + et.multiline && _extends$u({ padding: '4px 0 5px' }, et.size === 'small' && { paddingTop: 1 }), + et.fullWidth && { width: '100%' }, + ), + ), + InputBaseComponent = styled$1('input', { + name: 'MuiInputBase', + slot: 'Input', + overridesResolver: inputOverridesResolver, + })(({ theme: tt, ownerState: et }) => { + const nt = tt.palette.mode === 'light', + rt = _extends$u( + { color: 'currentColor' }, + tt.vars ? { opacity: tt.vars.opacity.inputPlaceholder } : { opacity: nt ? 0.42 : 0.5 }, + { transition: tt.transitions.create('opacity', { duration: tt.transitions.duration.shorter }) }, + ), + it = { opacity: '0 !important' }, + ot = tt.vars ? { opacity: tt.vars.opacity.inputPlaceholder } : { opacity: nt ? 0.42 : 0.5 } + return _extends$u( + { + font: 'inherit', + letterSpacing: 'inherit', + color: 'currentColor', + padding: '4px 0 5px', + border: 0, + boxSizing: 'content-box', + background: 'none', + height: '1.4375em', + margin: 0, + WebkitTapHighlightColor: 'transparent', + display: 'block', + minWidth: 0, + width: '100%', + animationName: 'mui-auto-fill-cancel', + animationDuration: '10ms', + '&::-webkit-input-placeholder': rt, + '&::-moz-placeholder': rt, + '&:-ms-input-placeholder': rt, + '&::-ms-input-placeholder': rt, + '&:focus': { outline: 0 }, + '&:invalid': { boxShadow: 'none' }, + '&::-webkit-search-decoration': { WebkitAppearance: 'none' }, + [`label[data-shrink=false] + .${inputBaseClasses$1.formControl} &`]: { + '&::-webkit-input-placeholder': it, + '&::-moz-placeholder': it, + '&:-ms-input-placeholder': it, + '&::-ms-input-placeholder': it, + '&:focus::-webkit-input-placeholder': ot, + '&:focus::-moz-placeholder': ot, + '&:focus:-ms-input-placeholder': ot, + '&:focus::-ms-input-placeholder': ot, + }, + [`&.${inputBaseClasses$1.disabled}`]: { + opacity: 1, + WebkitTextFillColor: (tt.vars || tt).palette.text.disabled, + }, + '&:-webkit-autofill': { animationDuration: '5000s', animationName: 'mui-auto-fill' }, + }, + et.size === 'small' && { paddingTop: 1 }, + et.multiline && { height: 'auto', resize: 'none', padding: 0, paddingTop: 0 }, + et.type === 'search' && { MozAppearance: 'textfield' }, + ) + }), + inputGlobalStyles = jsxRuntimeExports.jsx(GlobalStyles, { + styles: { + '@keyframes mui-auto-fill': { from: { display: 'block' } }, + '@keyframes mui-auto-fill-cancel': { from: { display: 'block' } }, + }, + }), + InputBase = reactExports.forwardRef(function (et, nt) { + var rt + const it = useThemeProps({ props: et, name: 'MuiInputBase' }), + { + 'aria-describedby': ot, + autoComplete: at, + autoFocus: st, + className: lt, + components: ct = {}, + componentsProps: ut = {}, + defaultValue: ht, + disabled: dt, + disableInjectingGlobalStyles: pt, + endAdornment: mt, + fullWidth: gt = !1, + id: yt, + inputComponent: bt = 'input', + inputProps: vt = {}, + inputRef: xt, + maxRows: kt, + minRows: St, + multiline: Tt = !1, + name: At, + onBlur: Et, + onChange: $t, + onClick: Dt, + onFocus: jt, + onKeyDown: Pt, + onKeyUp: Ct, + placeholder: wt, + readOnly: It, + renderSuffix: Ot, + rows: Wt, + slotProps: zt = {}, + slots: Ft = {}, + startAdornment: Nt, + type: Ut = 'text', + value: Mt, + } = it, + Ht = _objectWithoutPropertiesLoose$m(it, _excluded$1m), + en = vt.value != null ? vt.value : Mt, + { current: sn } = reactExports.useRef(en != null), + Kt = reactExports.useRef(), + rn = reactExports.useCallback((Zt) => {}, []), + nn = useForkRef(Kt, xt, vt.ref, rn), + [hn, vn] = reactExports.useState(!1), + an = useFormControl(), + Qt = formControlState({ + props: it, + muiFormControl: an, + states: ['color', 'disabled', 'error', 'hiddenLabel', 'size', 'required', 'filled'], + }) + ;(Qt.focused = an ? an.focused : hn), + reactExports.useEffect(() => { + !an && dt && hn && (vn(!1), Et && Et()) + }, [an, dt, hn, Et]) + const _n = an && an.onFilled, + Pn = an && an.onEmpty, + $n = reactExports.useCallback( + (Zt) => { + isFilled(Zt) ? _n && _n() : Pn && Pn() + }, + [_n, Pn], + ) + useEnhancedEffect$1(() => { + sn && $n({ value: en }) + }, [en, $n, sn]) + const Nn = (Zt) => { + if (Qt.disabled) { + Zt.stopPropagation() + return + } + jt && jt(Zt), vt.onFocus && vt.onFocus(Zt), an && an.onFocus ? an.onFocus(Zt) : vn(!0) + }, + Tn = (Zt) => { + Et && Et(Zt), vt.onBlur && vt.onBlur(Zt), an && an.onBlur ? an.onBlur(Zt) : vn(!1) + }, + cn = (Zt, ...Xt) => { + if (!sn) { + const Sn = Zt.target || Kt.current + if (Sn == null) throw new Error(formatMuiErrorMessage(1)) + $n({ value: Sn.value }) + } + vt.onChange && vt.onChange(Zt, ...Xt), $t && $t(Zt, ...Xt) + } + reactExports.useEffect(() => { + $n(Kt.current) + }, []) + const mn = (Zt) => { + Kt.current && Zt.currentTarget === Zt.target && Kt.current.focus(), Dt && Dt(Zt) + } + let In = bt, + An = vt + Tt && + In === 'input' && + (Wt + ? (An = _extends$u({ type: void 0, minRows: Wt, maxRows: Wt }, An)) + : (An = _extends$u({ type: void 0, maxRows: kt, minRows: St }, An)), + (In = TextareaAutosize)) + const wn = (Zt) => { + $n(Zt.animationName === 'mui-auto-fill-cancel' ? Kt.current : { value: 'x' }) + } + reactExports.useEffect(() => { + an && an.setAdornedStart(!!Nt) + }, [an, Nt]) + const fn = _extends$u({}, it, { + color: Qt.color || 'primary', + disabled: Qt.disabled, + endAdornment: mt, + error: Qt.error, + focused: Qt.focused, + formControl: an, + fullWidth: gt, + hiddenLabel: Qt.hiddenLabel, + multiline: Tt, + size: Qt.size, + startAdornment: Nt, + type: Ut, + }), + pn = useUtilityClasses$P(fn), + kn = Ft.root || ct.Root || InputBaseRoot, + Dn = zt.root || ut.root || {}, + un = Ft.input || ct.Input || InputBaseComponent + return ( + (An = _extends$u({}, An, (rt = zt.input) != null ? rt : ut.input)), + jsxRuntimeExports.jsxs(reactExports.Fragment, { + children: [ + !pt && inputGlobalStyles, + jsxRuntimeExports.jsxs( + kn, + _extends$u( + {}, + Dn, + !isHostComponent(kn) && { ownerState: _extends$u({}, fn, Dn.ownerState) }, + { ref: nt, onClick: mn }, + Ht, + { + className: clsx$3(pn.root, Dn.className, lt, It && 'MuiInputBase-readOnly'), + children: [ + Nt, + jsxRuntimeExports.jsx(FormControlContext$1.Provider, { + value: null, + children: jsxRuntimeExports.jsx( + un, + _extends$u( + { + ownerState: fn, + 'aria-invalid': Qt.error, + 'aria-describedby': ot, + autoComplete: at, + autoFocus: st, + defaultValue: ht, + disabled: Qt.disabled, + id: yt, + onAnimationStart: wn, + name: At, + placeholder: wt, + readOnly: It, + required: Qt.required, + rows: Wt, + value: en, + onKeyDown: Pt, + onKeyUp: Ct, + type: Ut, + }, + An, + !isHostComponent(un) && { as: In, ownerState: _extends$u({}, fn, An.ownerState) }, + { + ref: nn, + className: clsx$3(pn.input, An.className, It && 'MuiInputBase-readOnly'), + onBlur: Tn, + onChange: cn, + onFocus: Nn, + }, + ), + ), + }), + mt, + Ot ? Ot(_extends$u({}, Qt, { startAdornment: Nt })) : null, + ], + }, + ), + ), + ], + }) + ) + }), + InputBase$1 = InputBase + function getInputUtilityClass(tt) { + return generateUtilityClass('MuiInput', tt) + } + const inputClasses = _extends$u( + {}, + inputBaseClasses$1, + generateUtilityClasses('MuiInput', ['root', 'underline', 'input']), + ), + inputClasses$1 = inputClasses + function getOutlinedInputUtilityClass(tt) { + return generateUtilityClass('MuiOutlinedInput', tt) + } + const outlinedInputClasses = _extends$u( + {}, + inputBaseClasses$1, + generateUtilityClasses('MuiOutlinedInput', ['root', 'notchedOutline', 'input']), + ), + outlinedInputClasses$1 = outlinedInputClasses + function getFilledInputUtilityClass(tt) { + return generateUtilityClass('MuiFilledInput', tt) + } + const filledInputClasses = _extends$u( + {}, + inputBaseClasses$1, + generateUtilityClasses('MuiFilledInput', ['root', 'underline', 'input']), + ), + filledInputClasses$1 = filledInputClasses, + ArrowDropDownIcon$1 = createSvgIcon(jsxRuntimeExports.jsx('path', { d: 'M7 10l5 5 5-5z' }), 'ArrowDropDown'), + _excluded$1l = [ + 'addEndListener', + 'appear', + 'children', + 'easing', + 'in', + 'onEnter', + 'onEntered', + 'onEntering', + 'onExit', + 'onExited', + 'onExiting', + 'style', + 'timeout', + 'TransitionComponent', + ], + styles$4 = { entering: { opacity: 1 }, entered: { opacity: 1 } }, + Fade = reactExports.forwardRef(function (et, nt) { + const rt = useTheme(), + it = { enter: rt.transitions.duration.enteringScreen, exit: rt.transitions.duration.leavingScreen }, + { + addEndListener: ot, + appear: at = !0, + children: st, + easing: lt, + in: ct, + onEnter: ut, + onEntered: ht, + onEntering: dt, + onExit: pt, + onExited: mt, + onExiting: gt, + style: yt, + timeout: bt = it, + TransitionComponent: vt = Transition$2, + } = et, + xt = _objectWithoutPropertiesLoose$m(et, _excluded$1l), + kt = reactExports.useRef(null), + St = useForkRef(kt, st.ref, nt), + Tt = (wt) => (It) => { + if (wt) { + const Ot = kt.current + It === void 0 ? wt(Ot) : wt(Ot, It) + } + }, + At = Tt(dt), + Et = Tt((wt, It) => { + reflow(wt) + const Ot = getTransitionProps({ style: yt, timeout: bt, easing: lt }, { mode: 'enter' }) + ;(wt.style.webkitTransition = rt.transitions.create('opacity', Ot)), + (wt.style.transition = rt.transitions.create('opacity', Ot)), + ut && ut(wt, It) + }), + $t = Tt(ht), + Dt = Tt(gt), + jt = Tt((wt) => { + const It = getTransitionProps({ style: yt, timeout: bt, easing: lt }, { mode: 'exit' }) + ;(wt.style.webkitTransition = rt.transitions.create('opacity', It)), + (wt.style.transition = rt.transitions.create('opacity', It)), + pt && pt(wt) + }), + Pt = Tt(mt), + Ct = (wt) => { + ot && ot(kt.current, wt) + } + return jsxRuntimeExports.jsx( + vt, + _extends$u( + { + appear: at, + in: ct, + nodeRef: kt, + onEnter: Et, + onEntered: $t, + onEntering: At, + onExit: jt, + onExited: Pt, + onExiting: Dt, + addEndListener: Ct, + timeout: bt, + }, + xt, + { + children: (wt, It) => + reactExports.cloneElement( + st, + _extends$u( + { + style: _extends$u( + { opacity: 0, visibility: wt === 'exited' && !ct ? 'hidden' : void 0 }, + styles$4[wt], + yt, + st.props.style, + ), + ref: St, + }, + It, + ), + ), + }, + ), + ) + }), + Fade$1 = Fade + function getBackdropUtilityClass(tt) { + return generateUtilityClass('MuiBackdrop', tt) + } + generateUtilityClasses('MuiBackdrop', ['root', 'invisible']) + const _excluded$1k = [ + 'children', + 'className', + 'component', + 'components', + 'componentsProps', + 'invisible', + 'open', + 'slotProps', + 'slots', + 'TransitionComponent', + 'transitionDuration', + ], + useUtilityClasses$O = (tt) => { + const { classes: et, invisible: nt } = tt + return composeClasses({ root: ['root', nt && 'invisible'] }, getBackdropUtilityClass, et) + }, + BackdropRoot = styled$1('div', { + name: 'MuiBackdrop', + slot: 'Root', + overridesResolver: (tt, et) => { + const { ownerState: nt } = tt + return [et.root, nt.invisible && et.invisible] + }, + })(({ ownerState: tt }) => + _extends$u( + { + position: 'fixed', + display: 'flex', + alignItems: 'center', + justifyContent: 'center', + right: 0, + bottom: 0, + top: 0, + left: 0, + backgroundColor: 'rgba(0, 0, 0, 0.5)', + WebkitTapHighlightColor: 'transparent', + }, + tt.invisible && { backgroundColor: 'transparent' }, + ), + ), + Backdrop = reactExports.forwardRef(function (et, nt) { + var rt, it, ot + const at = useThemeProps({ props: et, name: 'MuiBackdrop' }), + { + children: st, + className: lt, + component: ct = 'div', + components: ut = {}, + componentsProps: ht = {}, + invisible: dt = !1, + open: pt, + slotProps: mt = {}, + slots: gt = {}, + TransitionComponent: yt = Fade$1, + transitionDuration: bt, + } = at, + vt = _objectWithoutPropertiesLoose$m(at, _excluded$1k), + xt = _extends$u({}, at, { component: ct, invisible: dt }), + kt = useUtilityClasses$O(xt), + St = (rt = mt.root) != null ? rt : ht.root + return jsxRuntimeExports.jsx( + yt, + _extends$u({ in: pt, timeout: bt }, vt, { + children: jsxRuntimeExports.jsx( + BackdropRoot, + _extends$u({ 'aria-hidden': !0 }, St, { + as: (it = (ot = gt.root) != null ? ot : ut.Root) != null ? it : ct, + className: clsx$3(kt.root, lt, St == null ? void 0 : St.className), + ownerState: _extends$u({}, xt, St == null ? void 0 : St.ownerState), + classes: kt, + ref: nt, + children: st, + }), + ), + }), + ) + }), + Backdrop$1 = Backdrop + function getButtonUtilityClass(tt) { + return generateUtilityClass('MuiButton', tt) + } + const buttonClasses = generateUtilityClasses('MuiButton', [ + 'root', + 'text', + 'textInherit', + 'textPrimary', + 'textSecondary', + 'textSuccess', + 'textError', + 'textInfo', + 'textWarning', + 'outlined', + 'outlinedInherit', + 'outlinedPrimary', + 'outlinedSecondary', + 'outlinedSuccess', + 'outlinedError', + 'outlinedInfo', + 'outlinedWarning', + 'contained', + 'containedInherit', + 'containedPrimary', + 'containedSecondary', + 'containedSuccess', + 'containedError', + 'containedInfo', + 'containedWarning', + 'disableElevation', + 'focusVisible', + 'disabled', + 'colorInherit', + 'textSizeSmall', + 'textSizeMedium', + 'textSizeLarge', + 'outlinedSizeSmall', + 'outlinedSizeMedium', + 'outlinedSizeLarge', + 'containedSizeSmall', + 'containedSizeMedium', + 'containedSizeLarge', + 'sizeMedium', + 'sizeSmall', + 'sizeLarge', + 'fullWidth', + 'startIcon', + 'endIcon', + 'iconSizeSmall', + 'iconSizeMedium', + 'iconSizeLarge', + ]), + buttonClasses$1 = buttonClasses, + ButtonGroupContext = reactExports.createContext({}), + ButtonGroupContext$1 = ButtonGroupContext, + ButtonGroupButtonContext = reactExports.createContext(void 0), + ButtonGroupButtonContext$1 = ButtonGroupButtonContext, + _excluded$1j = [ + 'children', + 'color', + 'component', + 'className', + 'disabled', + 'disableElevation', + 'disableFocusRipple', + 'endIcon', + 'focusVisibleClassName', + 'fullWidth', + 'size', + 'startIcon', + 'type', + 'variant', + ], + useUtilityClasses$N = (tt) => { + const { color: et, disableElevation: nt, fullWidth: rt, size: it, variant: ot, classes: at } = tt, + st = { + root: [ + 'root', + ot, + `${ot}${capitalize(et)}`, + `size${capitalize(it)}`, + `${ot}Size${capitalize(it)}`, + et === 'inherit' && 'colorInherit', + nt && 'disableElevation', + rt && 'fullWidth', + ], + label: ['label'], + startIcon: ['startIcon', `iconSize${capitalize(it)}`], + endIcon: ['endIcon', `iconSize${capitalize(it)}`], + }, + lt = composeClasses(st, getButtonUtilityClass, at) + return _extends$u({}, at, lt) + }, + commonIconStyles = (tt) => + _extends$u( + {}, + tt.size === 'small' && { '& > *:nth-of-type(1)': { fontSize: 18 } }, + tt.size === 'medium' && { '& > *:nth-of-type(1)': { fontSize: 20 } }, + tt.size === 'large' && { '& > *:nth-of-type(1)': { fontSize: 22 } }, + ), + ButtonRoot = styled$1(ButtonBase$1, { + shouldForwardProp: (tt) => rootShouldForwardProp(tt) || tt === 'classes', + name: 'MuiButton', + slot: 'Root', + overridesResolver: (tt, et) => { + const { ownerState: nt } = tt + return [ + et.root, + et[nt.variant], + et[`${nt.variant}${capitalize(nt.color)}`], + et[`size${capitalize(nt.size)}`], + et[`${nt.variant}Size${capitalize(nt.size)}`], + nt.color === 'inherit' && et.colorInherit, + nt.disableElevation && et.disableElevation, + nt.fullWidth && et.fullWidth, + ] + }, + })( + ({ theme: tt, ownerState: et }) => { + var nt, rt + const it = tt.palette.mode === 'light' ? tt.palette.grey[300] : tt.palette.grey[800], + ot = tt.palette.mode === 'light' ? tt.palette.grey.A100 : tt.palette.grey[700] + return _extends$u( + {}, + tt.typography.button, + { + minWidth: 64, + padding: '6px 16px', + borderRadius: (tt.vars || tt).shape.borderRadius, + transition: tt.transitions.create(['background-color', 'box-shadow', 'border-color', 'color'], { + duration: tt.transitions.duration.short, + }), + '&:hover': _extends$u( + { + textDecoration: 'none', + backgroundColor: tt.vars + ? `rgba(${tt.vars.palette.text.primaryChannel} / ${tt.vars.palette.action.hoverOpacity})` + : alpha$1(tt.palette.text.primary, tt.palette.action.hoverOpacity), + '@media (hover: none)': { backgroundColor: 'transparent' }, + }, + et.variant === 'text' && + et.color !== 'inherit' && { + backgroundColor: tt.vars + ? `rgba(${tt.vars.palette[et.color].mainChannel} / ${tt.vars.palette.action.hoverOpacity})` + : alpha$1(tt.palette[et.color].main, tt.palette.action.hoverOpacity), + '@media (hover: none)': { backgroundColor: 'transparent' }, + }, + et.variant === 'outlined' && + et.color !== 'inherit' && { + border: `1px solid ${(tt.vars || tt).palette[et.color].main}`, + backgroundColor: tt.vars + ? `rgba(${tt.vars.palette[et.color].mainChannel} / ${tt.vars.palette.action.hoverOpacity})` + : alpha$1(tt.palette[et.color].main, tt.palette.action.hoverOpacity), + '@media (hover: none)': { backgroundColor: 'transparent' }, + }, + et.variant === 'contained' && { + backgroundColor: tt.vars ? tt.vars.palette.Button.inheritContainedHoverBg : ot, + boxShadow: (tt.vars || tt).shadows[4], + '@media (hover: none)': { + boxShadow: (tt.vars || tt).shadows[2], + backgroundColor: (tt.vars || tt).palette.grey[300], + }, + }, + et.variant === 'contained' && + et.color !== 'inherit' && { + backgroundColor: (tt.vars || tt).palette[et.color].dark, + '@media (hover: none)': { backgroundColor: (tt.vars || tt).palette[et.color].main }, + }, + ), + '&:active': _extends$u({}, et.variant === 'contained' && { boxShadow: (tt.vars || tt).shadows[8] }), + [`&.${buttonClasses$1.focusVisible}`]: _extends$u( + {}, + et.variant === 'contained' && { boxShadow: (tt.vars || tt).shadows[6] }, + ), + [`&.${buttonClasses$1.disabled}`]: _extends$u( + { color: (tt.vars || tt).palette.action.disabled }, + et.variant === 'outlined' && { border: `1px solid ${(tt.vars || tt).palette.action.disabledBackground}` }, + et.variant === 'contained' && { + color: (tt.vars || tt).palette.action.disabled, + boxShadow: (tt.vars || tt).shadows[0], + backgroundColor: (tt.vars || tt).palette.action.disabledBackground, + }, + ), + }, + et.variant === 'text' && { padding: '6px 8px' }, + et.variant === 'text' && et.color !== 'inherit' && { color: (tt.vars || tt).palette[et.color].main }, + et.variant === 'outlined' && { padding: '5px 15px', border: '1px solid currentColor' }, + et.variant === 'outlined' && + et.color !== 'inherit' && { + color: (tt.vars || tt).palette[et.color].main, + border: tt.vars + ? `1px solid rgba(${tt.vars.palette[et.color].mainChannel} / 0.5)` + : `1px solid ${alpha$1(tt.palette[et.color].main, 0.5)}`, + }, + et.variant === 'contained' && { + color: tt.vars + ? tt.vars.palette.text.primary + : (nt = (rt = tt.palette).getContrastText) == null + ? void 0 + : nt.call(rt, tt.palette.grey[300]), + backgroundColor: tt.vars ? tt.vars.palette.Button.inheritContainedBg : it, + boxShadow: (tt.vars || tt).shadows[2], + }, + et.variant === 'contained' && + et.color !== 'inherit' && { + color: (tt.vars || tt).palette[et.color].contrastText, + backgroundColor: (tt.vars || tt).palette[et.color].main, + }, + et.color === 'inherit' && { color: 'inherit', borderColor: 'currentColor' }, + et.size === 'small' && et.variant === 'text' && { padding: '4px 5px', fontSize: tt.typography.pxToRem(13) }, + et.size === 'large' && et.variant === 'text' && { padding: '8px 11px', fontSize: tt.typography.pxToRem(15) }, + et.size === 'small' && + et.variant === 'outlined' && { padding: '3px 9px', fontSize: tt.typography.pxToRem(13) }, + et.size === 'large' && + et.variant === 'outlined' && { padding: '7px 21px', fontSize: tt.typography.pxToRem(15) }, + et.size === 'small' && + et.variant === 'contained' && { padding: '4px 10px', fontSize: tt.typography.pxToRem(13) }, + et.size === 'large' && + et.variant === 'contained' && { padding: '8px 22px', fontSize: tt.typography.pxToRem(15) }, + et.fullWidth && { width: '100%' }, + ) + }, + ({ ownerState: tt }) => + tt.disableElevation && { + boxShadow: 'none', + '&:hover': { boxShadow: 'none' }, + [`&.${buttonClasses$1.focusVisible}`]: { boxShadow: 'none' }, + '&:active': { boxShadow: 'none' }, + [`&.${buttonClasses$1.disabled}`]: { boxShadow: 'none' }, + }, + ), + ButtonStartIcon = styled$1('span', { + name: 'MuiButton', + slot: 'StartIcon', + overridesResolver: (tt, et) => { + const { ownerState: nt } = tt + return [et.startIcon, et[`iconSize${capitalize(nt.size)}`]] + }, + })(({ ownerState: tt }) => + _extends$u( + { display: 'inherit', marginRight: 8, marginLeft: -4 }, + tt.size === 'small' && { marginLeft: -2 }, + commonIconStyles(tt), + ), + ), + ButtonEndIcon = styled$1('span', { + name: 'MuiButton', + slot: 'EndIcon', + overridesResolver: (tt, et) => { + const { ownerState: nt } = tt + return [et.endIcon, et[`iconSize${capitalize(nt.size)}`]] + }, + })(({ ownerState: tt }) => + _extends$u( + { display: 'inherit', marginRight: -4, marginLeft: 8 }, + tt.size === 'small' && { marginRight: -2 }, + commonIconStyles(tt), + ), + ), + Button$1 = reactExports.forwardRef(function (et, nt) { + const rt = reactExports.useContext(ButtonGroupContext$1), + it = reactExports.useContext(ButtonGroupButtonContext$1), + ot = resolveProps(rt, et), + at = useThemeProps({ props: ot, name: 'MuiButton' }), + { + children: st, + color: lt = 'primary', + component: ct = 'button', + className: ut, + disabled: ht = !1, + disableElevation: dt = !1, + disableFocusRipple: pt = !1, + endIcon: mt, + focusVisibleClassName: gt, + fullWidth: yt = !1, + size: bt = 'medium', + startIcon: vt, + type: xt, + variant: kt = 'text', + } = at, + St = _objectWithoutPropertiesLoose$m(at, _excluded$1j), + Tt = _extends$u({}, at, { + color: lt, + component: ct, + disabled: ht, + disableElevation: dt, + disableFocusRipple: pt, + fullWidth: yt, + size: bt, + type: xt, + variant: kt, + }), + At = useUtilityClasses$N(Tt), + Et = vt && jsxRuntimeExports.jsx(ButtonStartIcon, { className: At.startIcon, ownerState: Tt, children: vt }), + $t = mt && jsxRuntimeExports.jsx(ButtonEndIcon, { className: At.endIcon, ownerState: Tt, children: mt }), + Dt = it || '' + return jsxRuntimeExports.jsxs( + ButtonRoot, + _extends$u( + { + ownerState: Tt, + className: clsx$3(rt.className, At.root, ut, Dt), + component: ct, + disabled: ht, + focusRipple: !pt, + focusVisibleClassName: clsx$3(At.focusVisible, gt), + ref: nt, + type: xt, + }, + St, + { classes: At, children: [Et, st, $t] }, + ), + ) + }), + Button$2 = Button$1 + function getModalUtilityClass(tt) { + return generateUtilityClass('MuiModal', tt) + } + generateUtilityClasses('MuiModal', ['root', 'hidden', 'backdrop']) + const _excluded$1i = [ + 'BackdropComponent', + 'BackdropProps', + 'classes', + 'className', + 'closeAfterTransition', + 'children', + 'container', + 'component', + 'components', + 'componentsProps', + 'disableAutoFocus', + 'disableEnforceFocus', + 'disableEscapeKeyDown', + 'disablePortal', + 'disableRestoreFocus', + 'disableScrollLock', + 'hideBackdrop', + 'keepMounted', + 'onBackdropClick', + 'onClose', + 'onTransitionEnter', + 'onTransitionExited', + 'open', + 'slotProps', + 'slots', + 'theme', + ], + useUtilityClasses$M = (tt) => { + const { open: et, exited: nt, classes: rt } = tt + return composeClasses({ root: ['root', !et && nt && 'hidden'], backdrop: ['backdrop'] }, getModalUtilityClass, rt) + }, + ModalRoot = styled$1('div', { + name: 'MuiModal', + slot: 'Root', + overridesResolver: (tt, et) => { + const { ownerState: nt } = tt + return [et.root, !nt.open && nt.exited && et.hidden] + }, + })(({ theme: tt, ownerState: et }) => + _extends$u( + { position: 'fixed', zIndex: (tt.vars || tt).zIndex.modal, right: 0, bottom: 0, top: 0, left: 0 }, + !et.open && et.exited && { visibility: 'hidden' }, + ), + ), + ModalBackdrop = styled$1(Backdrop$1, { + name: 'MuiModal', + slot: 'Backdrop', + overridesResolver: (tt, et) => et.backdrop, + })({ zIndex: -1 }), + Modal = reactExports.forwardRef(function (et, nt) { + var rt, it, ot, at, st, lt + const ct = useThemeProps({ name: 'MuiModal', props: et }), + { + BackdropComponent: ut = ModalBackdrop, + BackdropProps: ht, + className: dt, + closeAfterTransition: pt = !1, + children: mt, + container: gt, + component: yt, + components: bt = {}, + componentsProps: vt = {}, + disableAutoFocus: xt = !1, + disableEnforceFocus: kt = !1, + disableEscapeKeyDown: St = !1, + disablePortal: Tt = !1, + disableRestoreFocus: At = !1, + disableScrollLock: Et = !1, + hideBackdrop: $t = !1, + keepMounted: Dt = !1, + onBackdropClick: jt, + open: Pt, + slotProps: Ct, + slots: wt, + } = ct, + It = _objectWithoutPropertiesLoose$m(ct, _excluded$1i), + Ot = _extends$u({}, ct, { + closeAfterTransition: pt, + disableAutoFocus: xt, + disableEnforceFocus: kt, + disableEscapeKeyDown: St, + disablePortal: Tt, + disableRestoreFocus: At, + disableScrollLock: Et, + hideBackdrop: $t, + keepMounted: Dt, + }), + { + getRootProps: Wt, + getBackdropProps: zt, + getTransitionProps: Ft, + portalRef: Nt, + isTopModal: Ut, + exited: Mt, + hasTransition: Ht, + } = useModal$1(_extends$u({}, Ot, { rootRef: nt })), + en = _extends$u({}, Ot, { exited: Mt }), + sn = useUtilityClasses$M(en), + Kt = {} + if ((mt.props.tabIndex === void 0 && (Kt.tabIndex = '-1'), Ht)) { + const { onEnter: _n, onExited: Pn } = Ft() + ;(Kt.onEnter = _n), (Kt.onExited = Pn) + } + const rn = (rt = (it = wt == null ? void 0 : wt.root) != null ? it : bt.Root) != null ? rt : ModalRoot, + nn = (ot = (at = wt == null ? void 0 : wt.backdrop) != null ? at : bt.Backdrop) != null ? ot : ut, + hn = (st = Ct == null ? void 0 : Ct.root) != null ? st : vt.root, + vn = (lt = Ct == null ? void 0 : Ct.backdrop) != null ? lt : vt.backdrop, + an = useSlotProps({ + elementType: rn, + externalSlotProps: hn, + externalForwardedProps: It, + getSlotProps: Wt, + additionalProps: { ref: nt, as: yt }, + ownerState: en, + className: clsx$3( + dt, + hn == null ? void 0 : hn.className, + sn == null ? void 0 : sn.root, + !en.open && en.exited && (sn == null ? void 0 : sn.hidden), + ), + }), + Qt = useSlotProps({ + elementType: nn, + externalSlotProps: vn, + additionalProps: ht, + getSlotProps: (_n) => + zt( + _extends$u({}, _n, { + onClick: (Pn) => { + jt && jt(Pn), _n != null && _n.onClick && _n.onClick(Pn) + }, + }), + ), + className: clsx$3( + vn == null ? void 0 : vn.className, + ht == null ? void 0 : ht.className, + sn == null ? void 0 : sn.backdrop, + ), + ownerState: en, + }) + return !Dt && !Pt && (!Ht || Mt) + ? null + : jsxRuntimeExports.jsx(Portal$1, { + ref: Nt, + container: gt, + disablePortal: Tt, + children: jsxRuntimeExports.jsxs( + rn, + _extends$u({}, an, { + children: [ + !$t && ut ? jsxRuntimeExports.jsx(nn, _extends$u({}, Qt)) : null, + jsxRuntimeExports.jsx(FocusTrap, { + disableEnforceFocus: kt, + disableAutoFocus: xt, + disableRestoreFocus: At, + isEnabled: Ut, + open: Pt, + children: reactExports.cloneElement(mt, Kt), + }), + ], + }), + ), + }) + }), + Modal$1 = Modal + function getDialogUtilityClass(tt) { + return generateUtilityClass('MuiDialog', tt) + } + const dialogClasses = generateUtilityClasses('MuiDialog', [ + 'root', + 'scrollPaper', + 'scrollBody', + 'container', + 'paper', + 'paperScrollPaper', + 'paperScrollBody', + 'paperWidthFalse', + 'paperWidthXs', + 'paperWidthSm', + 'paperWidthMd', + 'paperWidthLg', + 'paperWidthXl', + 'paperFullWidth', + 'paperFullScreen', + ]), + dialogClasses$1 = dialogClasses, + DialogContext = reactExports.createContext({}), + DialogContext$1 = DialogContext, + _excluded$1h = [ + 'aria-describedby', + 'aria-labelledby', + 'BackdropComponent', + 'BackdropProps', + 'children', + 'className', + 'disableEscapeKeyDown', + 'fullScreen', + 'fullWidth', + 'maxWidth', + 'onBackdropClick', + 'onClose', + 'open', + 'PaperComponent', + 'PaperProps', + 'scroll', + 'TransitionComponent', + 'transitionDuration', + 'TransitionProps', + ], + DialogBackdrop = styled$1(Backdrop$1, { name: 'MuiDialog', slot: 'Backdrop', overrides: (tt, et) => et.backdrop })({ + zIndex: -1, + }), + useUtilityClasses$L = (tt) => { + const { classes: et, scroll: nt, maxWidth: rt, fullWidth: it, fullScreen: ot } = tt, + at = { + root: ['root'], + container: ['container', `scroll${capitalize(nt)}`], + paper: [ + 'paper', + `paperScroll${capitalize(nt)}`, + `paperWidth${capitalize(String(rt))}`, + it && 'paperFullWidth', + ot && 'paperFullScreen', + ], + } + return composeClasses(at, getDialogUtilityClass, et) + }, + DialogRoot = styled$1(Modal$1, { name: 'MuiDialog', slot: 'Root', overridesResolver: (tt, et) => et.root })({ + '@media print': { position: 'absolute !important' }, + }), + DialogContainer = styled$1('div', { + name: 'MuiDialog', + slot: 'Container', + overridesResolver: (tt, et) => { + const { ownerState: nt } = tt + return [et.container, et[`scroll${capitalize(nt.scroll)}`]] + }, + })(({ ownerState: tt }) => + _extends$u( + { height: '100%', '@media print': { height: 'auto' }, outline: 0 }, + tt.scroll === 'paper' && { display: 'flex', justifyContent: 'center', alignItems: 'center' }, + tt.scroll === 'body' && { + overflowY: 'auto', + overflowX: 'hidden', + textAlign: 'center', + '&:after': { content: '""', display: 'inline-block', verticalAlign: 'middle', height: '100%', width: '0' }, + }, + ), + ), + DialogPaper = styled$1(Paper$1, { + name: 'MuiDialog', + slot: 'Paper', + overridesResolver: (tt, et) => { + const { ownerState: nt } = tt + return [ + et.paper, + et[`scrollPaper${capitalize(nt.scroll)}`], + et[`paperWidth${capitalize(String(nt.maxWidth))}`], + nt.fullWidth && et.paperFullWidth, + nt.fullScreen && et.paperFullScreen, + ] + }, + })(({ theme: tt, ownerState: et }) => + _extends$u( + { + margin: 32, + position: 'relative', + overflowY: 'auto', + '@media print': { overflowY: 'visible', boxShadow: 'none' }, + }, + et.scroll === 'paper' && { display: 'flex', flexDirection: 'column', maxHeight: 'calc(100% - 64px)' }, + et.scroll === 'body' && { display: 'inline-block', verticalAlign: 'middle', textAlign: 'left' }, + !et.maxWidth && { maxWidth: 'calc(100% - 64px)' }, + et.maxWidth === 'xs' && { + maxWidth: + tt.breakpoints.unit === 'px' + ? Math.max(tt.breakpoints.values.xs, 444) + : `max(${tt.breakpoints.values.xs}${tt.breakpoints.unit}, 444px)`, + [`&.${dialogClasses$1.paperScrollBody}`]: { + [tt.breakpoints.down(Math.max(tt.breakpoints.values.xs, 444) + 32 * 2)]: { maxWidth: 'calc(100% - 64px)' }, + }, + }, + et.maxWidth && + et.maxWidth !== 'xs' && { + maxWidth: `${tt.breakpoints.values[et.maxWidth]}${tt.breakpoints.unit}`, + [`&.${dialogClasses$1.paperScrollBody}`]: { + [tt.breakpoints.down(tt.breakpoints.values[et.maxWidth] + 32 * 2)]: { maxWidth: 'calc(100% - 64px)' }, + }, + }, + et.fullWidth && { width: 'calc(100% - 64px)' }, + et.fullScreen && { + margin: 0, + width: '100%', + maxWidth: '100%', + height: '100%', + maxHeight: 'none', + borderRadius: 0, + [`&.${dialogClasses$1.paperScrollBody}`]: { margin: 0, maxWidth: '100%' }, + }, + ), + ), + Dialog = reactExports.forwardRef(function (et, nt) { + const rt = useThemeProps({ props: et, name: 'MuiDialog' }), + it = useTheme(), + ot = { enter: it.transitions.duration.enteringScreen, exit: it.transitions.duration.leavingScreen }, + { + 'aria-describedby': at, + 'aria-labelledby': st, + BackdropComponent: lt, + BackdropProps: ct, + children: ut, + className: ht, + disableEscapeKeyDown: dt = !1, + fullScreen: pt = !1, + fullWidth: mt = !1, + maxWidth: gt = 'sm', + onBackdropClick: yt, + onClose: bt, + open: vt, + PaperComponent: xt = Paper$1, + PaperProps: kt = {}, + scroll: St = 'paper', + TransitionComponent: Tt = Fade$1, + transitionDuration: At = ot, + TransitionProps: Et, + } = rt, + $t = _objectWithoutPropertiesLoose$m(rt, _excluded$1h), + Dt = _extends$u({}, rt, { disableEscapeKeyDown: dt, fullScreen: pt, fullWidth: mt, maxWidth: gt, scroll: St }), + jt = useUtilityClasses$L(Dt), + Pt = reactExports.useRef(), + Ct = (Wt) => { + Pt.current = Wt.target === Wt.currentTarget + }, + wt = (Wt) => { + Pt.current && ((Pt.current = null), yt && yt(Wt), bt && bt(Wt, 'backdropClick')) + }, + It = useId(st), + Ot = reactExports.useMemo(() => ({ titleId: It }), [It]) + return jsxRuntimeExports.jsx( + DialogRoot, + _extends$u( + { + className: clsx$3(jt.root, ht), + closeAfterTransition: !0, + components: { Backdrop: DialogBackdrop }, + componentsProps: { backdrop: _extends$u({ transitionDuration: At, as: lt }, ct) }, + disableEscapeKeyDown: dt, + onClose: bt, + open: vt, + ref: nt, + onClick: wt, + ownerState: Dt, + }, + $t, + { + children: jsxRuntimeExports.jsx( + Tt, + _extends$u({ appear: !0, in: vt, timeout: At, role: 'presentation' }, Et, { + children: jsxRuntimeExports.jsx(DialogContainer, { + className: clsx$3(jt.container), + onMouseDown: Ct, + ownerState: Dt, + children: jsxRuntimeExports.jsx( + DialogPaper, + _extends$u( + { as: xt, elevation: 24, role: 'dialog', 'aria-describedby': at, 'aria-labelledby': It }, + kt, + { + className: clsx$3(jt.paper, kt.className), + ownerState: Dt, + children: jsxRuntimeExports.jsx(DialogContext$1.Provider, { value: Ot, children: ut }), + }, + ), + ), + }), + }), + ), + }, + ), + ) + }), + MuiDialog = Dialog + function getDialogActionsUtilityClass(tt) { + return generateUtilityClass('MuiDialogActions', tt) + } + generateUtilityClasses('MuiDialogActions', ['root', 'spacing']) + const _excluded$1g = ['className', 'disableSpacing'], + useUtilityClasses$K = (tt) => { + const { classes: et, disableSpacing: nt } = tt + return composeClasses({ root: ['root', !nt && 'spacing'] }, getDialogActionsUtilityClass, et) + }, + DialogActionsRoot = styled$1('div', { + name: 'MuiDialogActions', + slot: 'Root', + overridesResolver: (tt, et) => { + const { ownerState: nt } = tt + return [et.root, !nt.disableSpacing && et.spacing] + }, + })(({ ownerState: tt }) => + _extends$u( + { display: 'flex', alignItems: 'center', padding: 8, justifyContent: 'flex-end', flex: '0 0 auto' }, + !tt.disableSpacing && { '& > :not(style) ~ :not(style)': { marginLeft: 8 } }, + ), + ), + DialogActions = reactExports.forwardRef(function (et, nt) { + const rt = useThemeProps({ props: et, name: 'MuiDialogActions' }), + { className: it, disableSpacing: ot = !1 } = rt, + at = _objectWithoutPropertiesLoose$m(rt, _excluded$1g), + st = _extends$u({}, rt, { disableSpacing: ot }), + lt = useUtilityClasses$K(st) + return jsxRuntimeExports.jsx( + DialogActionsRoot, + _extends$u({ className: clsx$3(lt.root, it), ownerState: st, ref: nt }, at), + ) + }), + DialogActions$1 = DialogActions + function getDialogContentUtilityClass(tt) { + return generateUtilityClass('MuiDialogContent', tt) + } + generateUtilityClasses('MuiDialogContent', ['root', 'dividers']) + const dialogTitleClasses = generateUtilityClasses('MuiDialogTitle', ['root']), + dialogTitleClasses$1 = dialogTitleClasses, + _excluded$1f = ['className', 'dividers'], + useUtilityClasses$J = (tt) => { + const { classes: et, dividers: nt } = tt + return composeClasses({ root: ['root', nt && 'dividers'] }, getDialogContentUtilityClass, et) + }, + DialogContentRoot = styled$1('div', { + name: 'MuiDialogContent', + slot: 'Root', + overridesResolver: (tt, et) => { + const { ownerState: nt } = tt + return [et.root, nt.dividers && et.dividers] + }, + })(({ theme: tt, ownerState: et }) => + _extends$u( + { flex: '1 1 auto', WebkitOverflowScrolling: 'touch', overflowY: 'auto', padding: '20px 24px' }, + et.dividers + ? { + padding: '16px 24px', + borderTop: `1px solid ${(tt.vars || tt).palette.divider}`, + borderBottom: `1px solid ${(tt.vars || tt).palette.divider}`, + } + : { [`.${dialogTitleClasses$1.root} + &`]: { paddingTop: 0 } }, + ), + ), + DialogContent = reactExports.forwardRef(function (et, nt) { + const rt = useThemeProps({ props: et, name: 'MuiDialogContent' }), + { className: it, dividers: ot = !1 } = rt, + at = _objectWithoutPropertiesLoose$m(rt, _excluded$1f), + st = _extends$u({}, rt, { dividers: ot }), + lt = useUtilityClasses$J(st) + return jsxRuntimeExports.jsx( + DialogContentRoot, + _extends$u({ className: clsx$3(lt.root, it), ownerState: st, ref: nt }, at), + ) + }), + DialogContent$1 = DialogContent + function getDividerUtilityClass(tt) { + return generateUtilityClass('MuiDivider', tt) + } + const dividerClasses = generateUtilityClasses('MuiDivider', [ + 'root', + 'absolute', + 'fullWidth', + 'inset', + 'middle', + 'flexItem', + 'light', + 'vertical', + 'withChildren', + 'withChildrenVertical', + 'textAlignRight', + 'textAlignLeft', + 'wrapper', + 'wrapperVertical', + ]), + _excluded$1e = [ + 'absolute', + 'children', + 'className', + 'component', + 'flexItem', + 'light', + 'orientation', + 'role', + 'textAlign', + 'variant', + ], + useUtilityClasses$I = (tt) => { + const { + absolute: et, + children: nt, + classes: rt, + flexItem: it, + light: ot, + orientation: at, + textAlign: st, + variant: lt, + } = tt + return composeClasses( + { + root: [ + 'root', + et && 'absolute', + lt, + ot && 'light', + at === 'vertical' && 'vertical', + it && 'flexItem', + nt && 'withChildren', + nt && at === 'vertical' && 'withChildrenVertical', + st === 'right' && at !== 'vertical' && 'textAlignRight', + st === 'left' && at !== 'vertical' && 'textAlignLeft', + ], + wrapper: ['wrapper', at === 'vertical' && 'wrapperVertical'], + }, + getDividerUtilityClass, + rt, + ) + }, + DividerRoot = styled$1('div', { + name: 'MuiDivider', + slot: 'Root', + overridesResolver: (tt, et) => { + const { ownerState: nt } = tt + return [ + et.root, + nt.absolute && et.absolute, + et[nt.variant], + nt.light && et.light, + nt.orientation === 'vertical' && et.vertical, + nt.flexItem && et.flexItem, + nt.children && et.withChildren, + nt.children && nt.orientation === 'vertical' && et.withChildrenVertical, + nt.textAlign === 'right' && nt.orientation !== 'vertical' && et.textAlignRight, + nt.textAlign === 'left' && nt.orientation !== 'vertical' && et.textAlignLeft, + ] + }, + })( + ({ theme: tt, ownerState: et }) => + _extends$u( + { + margin: 0, + flexShrink: 0, + borderWidth: 0, + borderStyle: 'solid', + borderColor: (tt.vars || tt).palette.divider, + borderBottomWidth: 'thin', + }, + et.absolute && { position: 'absolute', bottom: 0, left: 0, width: '100%' }, + et.light && { + borderColor: tt.vars ? `rgba(${tt.vars.palette.dividerChannel} / 0.08)` : alpha$1(tt.palette.divider, 0.08), + }, + et.variant === 'inset' && { marginLeft: 72 }, + et.variant === 'middle' && + et.orientation === 'horizontal' && { marginLeft: tt.spacing(2), marginRight: tt.spacing(2) }, + et.variant === 'middle' && + et.orientation === 'vertical' && { marginTop: tt.spacing(1), marginBottom: tt.spacing(1) }, + et.orientation === 'vertical' && { height: '100%', borderBottomWidth: 0, borderRightWidth: 'thin' }, + et.flexItem && { alignSelf: 'stretch', height: 'auto' }, + ), + ({ ownerState: tt }) => + _extends$u( + {}, + tt.children && { + display: 'flex', + whiteSpace: 'nowrap', + textAlign: 'center', + border: 0, + '&::before, &::after': { content: '""', alignSelf: 'center' }, + }, + ), + ({ theme: tt, ownerState: et }) => + _extends$u( + {}, + et.children && + et.orientation !== 'vertical' && { + '&::before, &::after': { width: '100%', borderTop: `thin solid ${(tt.vars || tt).palette.divider}` }, + }, + ), + ({ theme: tt, ownerState: et }) => + _extends$u( + {}, + et.children && + et.orientation === 'vertical' && { + flexDirection: 'column', + '&::before, &::after': { height: '100%', borderLeft: `thin solid ${(tt.vars || tt).palette.divider}` }, + }, + ), + ({ ownerState: tt }) => + _extends$u( + {}, + tt.textAlign === 'right' && + tt.orientation !== 'vertical' && { '&::before': { width: '90%' }, '&::after': { width: '10%' } }, + tt.textAlign === 'left' && + tt.orientation !== 'vertical' && { '&::before': { width: '10%' }, '&::after': { width: '90%' } }, + ), + ), + DividerWrapper = styled$1('span', { + name: 'MuiDivider', + slot: 'Wrapper', + overridesResolver: (tt, et) => { + const { ownerState: nt } = tt + return [et.wrapper, nt.orientation === 'vertical' && et.wrapperVertical] + }, + })(({ theme: tt, ownerState: et }) => + _extends$u( + { + display: 'inline-block', + paddingLeft: `calc(${tt.spacing(1)} * 1.2)`, + paddingRight: `calc(${tt.spacing(1)} * 1.2)`, + }, + et.orientation === 'vertical' && { + paddingTop: `calc(${tt.spacing(1)} * 1.2)`, + paddingBottom: `calc(${tt.spacing(1)} * 1.2)`, + }, + ), + ), + Divider$2 = reactExports.forwardRef(function (et, nt) { + const rt = useThemeProps({ props: et, name: 'MuiDivider' }), + { + absolute: it = !1, + children: ot, + className: at, + component: st = ot ? 'div' : 'hr', + flexItem: lt = !1, + light: ct = !1, + orientation: ut = 'horizontal', + role: ht = st !== 'hr' ? 'separator' : void 0, + textAlign: dt = 'center', + variant: pt = 'fullWidth', + } = rt, + mt = _objectWithoutPropertiesLoose$m(rt, _excluded$1e), + gt = _extends$u({}, rt, { + absolute: it, + component: st, + flexItem: lt, + light: ct, + orientation: ut, + role: ht, + textAlign: dt, + variant: pt, + }), + yt = useUtilityClasses$I(gt) + return jsxRuntimeExports.jsx( + DividerRoot, + _extends$u({ as: st, className: clsx$3(yt.root, at), role: ht, ref: nt, ownerState: gt }, mt, { + children: ot + ? jsxRuntimeExports.jsx(DividerWrapper, { className: yt.wrapper, ownerState: gt, children: ot }) + : null, + }), + ) + }) + Divider$2.muiSkipListHighlight = !0 + const Divider$3 = Divider$2, + _excluded$1d = [ + 'addEndListener', + 'appear', + 'children', + 'container', + 'direction', + 'easing', + 'in', + 'onEnter', + 'onEntered', + 'onEntering', + 'onExit', + 'onExited', + 'onExiting', + 'style', + 'timeout', + 'TransitionComponent', + ] + function getTranslateValue(tt, et, nt) { + const rt = et.getBoundingClientRect(), + it = nt && nt.getBoundingClientRect(), + ot = ownerWindow(et) + let at + if (et.fakeTransform) at = et.fakeTransform + else { + const ct = ot.getComputedStyle(et) + at = ct.getPropertyValue('-webkit-transform') || ct.getPropertyValue('transform') + } + let st = 0, + lt = 0 + if (at && at !== 'none' && typeof at == 'string') { + const ct = at.split('(')[1].split(')')[0].split(',') + ;(st = parseInt(ct[4], 10)), (lt = parseInt(ct[5], 10)) + } + return tt === 'left' + ? it + ? `translateX(${it.right + st - rt.left}px)` + : `translateX(${ot.innerWidth + st - rt.left}px)` + : tt === 'right' + ? it + ? `translateX(-${rt.right - it.left - st}px)` + : `translateX(-${rt.left + rt.width - st}px)` + : tt === 'up' + ? it + ? `translateY(${it.bottom + lt - rt.top}px)` + : `translateY(${ot.innerHeight + lt - rt.top}px)` + : it + ? `translateY(-${rt.top - it.top + rt.height - lt}px)` + : `translateY(-${rt.top + rt.height - lt}px)` + } + function resolveContainer(tt) { + return typeof tt == 'function' ? tt() : tt + } + function setTranslateValue(tt, et, nt) { + const rt = resolveContainer(nt), + it = getTranslateValue(tt, et, rt) + it && ((et.style.webkitTransform = it), (et.style.transform = it)) + } + const Slide = reactExports.forwardRef(function (et, nt) { + const rt = useTheme(), + it = { enter: rt.transitions.easing.easeOut, exit: rt.transitions.easing.sharp }, + ot = { enter: rt.transitions.duration.enteringScreen, exit: rt.transitions.duration.leavingScreen }, + { + addEndListener: at, + appear: st = !0, + children: lt, + container: ct, + direction: ut = 'down', + easing: ht = it, + in: dt, + onEnter: pt, + onEntered: mt, + onEntering: gt, + onExit: yt, + onExited: bt, + onExiting: vt, + style: xt, + timeout: kt = ot, + TransitionComponent: St = Transition$2, + } = et, + Tt = _objectWithoutPropertiesLoose$m(et, _excluded$1d), + At = reactExports.useRef(null), + Et = useForkRef(lt.ref, At, nt), + $t = (zt) => (Ft) => { + zt && (Ft === void 0 ? zt(At.current) : zt(At.current, Ft)) + }, + Dt = $t((zt, Ft) => { + setTranslateValue(ut, zt, ct), reflow(zt), pt && pt(zt, Ft) + }), + jt = $t((zt, Ft) => { + const Nt = getTransitionProps({ timeout: kt, style: xt, easing: ht }, { mode: 'enter' }) + ;(zt.style.webkitTransition = rt.transitions.create('-webkit-transform', _extends$u({}, Nt))), + (zt.style.transition = rt.transitions.create('transform', _extends$u({}, Nt))), + (zt.style.webkitTransform = 'none'), + (zt.style.transform = 'none'), + gt && gt(zt, Ft) + }), + Pt = $t(mt), + Ct = $t(vt), + wt = $t((zt) => { + const Ft = getTransitionProps({ timeout: kt, style: xt, easing: ht }, { mode: 'exit' }) + ;(zt.style.webkitTransition = rt.transitions.create('-webkit-transform', Ft)), + (zt.style.transition = rt.transitions.create('transform', Ft)), + setTranslateValue(ut, zt, ct), + yt && yt(zt) + }), + It = $t((zt) => { + ;(zt.style.webkitTransition = ''), (zt.style.transition = ''), bt && bt(zt) + }), + Ot = (zt) => { + at && at(At.current, zt) + }, + Wt = reactExports.useCallback(() => { + At.current && setTranslateValue(ut, At.current, ct) + }, [ut, ct]) + return ( + reactExports.useEffect(() => { + if (dt || ut === 'down' || ut === 'right') return + const zt = debounce$5(() => { + At.current && setTranslateValue(ut, At.current, ct) + }), + Ft = ownerWindow(At.current) + return ( + Ft.addEventListener('resize', zt), + () => { + zt.clear(), Ft.removeEventListener('resize', zt) + } + ) + }, [ut, dt, ct]), + reactExports.useEffect(() => { + dt || Wt() + }, [dt, Wt]), + jsxRuntimeExports.jsx( + St, + _extends$u( + { + nodeRef: At, + onEnter: Dt, + onEntered: Pt, + onEntering: jt, + onExit: wt, + onExited: It, + onExiting: Ct, + addEndListener: Ot, + appear: st, + in: dt, + timeout: kt, + }, + Tt, + { + children: (zt, Ft) => + reactExports.cloneElement( + lt, + _extends$u( + { + ref: Et, + style: _extends$u({ visibility: zt === 'exited' && !dt ? 'hidden' : void 0 }, xt, lt.props.style), + }, + Ft, + ), + ), + }, + ), + ) + ) + }), + Slide$1 = Slide, + _excluded$1c = [ + 'disableUnderline', + 'components', + 'componentsProps', + 'fullWidth', + 'hiddenLabel', + 'inputComponent', + 'multiline', + 'slotProps', + 'slots', + 'type', + ], + useUtilityClasses$H = (tt) => { + const { classes: et, disableUnderline: nt } = tt, + it = composeClasses({ root: ['root', !nt && 'underline'], input: ['input'] }, getFilledInputUtilityClass, et) + return _extends$u({}, et, it) + }, + FilledInputRoot = styled$1(InputBaseRoot, { + shouldForwardProp: (tt) => rootShouldForwardProp(tt) || tt === 'classes', + name: 'MuiFilledInput', + slot: 'Root', + overridesResolver: (tt, et) => { + const { ownerState: nt } = tt + return [...rootOverridesResolver(tt, et), !nt.disableUnderline && et.underline] + }, + })(({ theme: tt, ownerState: et }) => { + var nt + const rt = tt.palette.mode === 'light', + it = rt ? 'rgba(0, 0, 0, 0.42)' : 'rgba(255, 255, 255, 0.7)', + ot = rt ? 'rgba(0, 0, 0, 0.06)' : 'rgba(255, 255, 255, 0.09)', + at = rt ? 'rgba(0, 0, 0, 0.09)' : 'rgba(255, 255, 255, 0.13)', + st = rt ? 'rgba(0, 0, 0, 0.12)' : 'rgba(255, 255, 255, 0.12)' + return _extends$u( + { + position: 'relative', + backgroundColor: tt.vars ? tt.vars.palette.FilledInput.bg : ot, + borderTopLeftRadius: (tt.vars || tt).shape.borderRadius, + borderTopRightRadius: (tt.vars || tt).shape.borderRadius, + transition: tt.transitions.create('background-color', { + duration: tt.transitions.duration.shorter, + easing: tt.transitions.easing.easeOut, + }), + '&:hover': { + backgroundColor: tt.vars ? tt.vars.palette.FilledInput.hoverBg : at, + '@media (hover: none)': { backgroundColor: tt.vars ? tt.vars.palette.FilledInput.bg : ot }, + }, + [`&.${filledInputClasses$1.focused}`]: { backgroundColor: tt.vars ? tt.vars.palette.FilledInput.bg : ot }, + [`&.${filledInputClasses$1.disabled}`]: { + backgroundColor: tt.vars ? tt.vars.palette.FilledInput.disabledBg : st, + }, + }, + !et.disableUnderline && { + '&:after': { + borderBottom: `2px solid ${ + (nt = (tt.vars || tt).palette[et.color || 'primary']) == null ? void 0 : nt.main + }`, + left: 0, + bottom: 0, + content: '""', + position: 'absolute', + right: 0, + transform: 'scaleX(0)', + transition: tt.transitions.create('transform', { + duration: tt.transitions.duration.shorter, + easing: tt.transitions.easing.easeOut, + }), + pointerEvents: 'none', + }, + [`&.${filledInputClasses$1.focused}:after`]: { transform: 'scaleX(1) translateX(0)' }, + [`&.${filledInputClasses$1.error}`]: { + '&:before, &:after': { borderBottomColor: (tt.vars || tt).palette.error.main }, + }, + '&:before': { + borderBottom: `1px solid ${ + tt.vars ? `rgba(${tt.vars.palette.common.onBackgroundChannel} / ${tt.vars.opacity.inputUnderline})` : it + }`, + left: 0, + bottom: 0, + content: '"\\00a0"', + position: 'absolute', + right: 0, + transition: tt.transitions.create('border-bottom-color', { duration: tt.transitions.duration.shorter }), + pointerEvents: 'none', + }, + [`&:hover:not(.${filledInputClasses$1.disabled}, .${filledInputClasses$1.error}):before`]: { + borderBottom: `1px solid ${(tt.vars || tt).palette.text.primary}`, + }, + [`&.${filledInputClasses$1.disabled}:before`]: { borderBottomStyle: 'dotted' }, + }, + et.startAdornment && { paddingLeft: 12 }, + et.endAdornment && { paddingRight: 12 }, + et.multiline && + _extends$u( + { padding: '25px 12px 8px' }, + et.size === 'small' && { paddingTop: 21, paddingBottom: 4 }, + et.hiddenLabel && { paddingTop: 16, paddingBottom: 17 }, + ), + ) + }), + FilledInputInput = styled$1(InputBaseComponent, { + name: 'MuiFilledInput', + slot: 'Input', + overridesResolver: inputOverridesResolver, + })(({ theme: tt, ownerState: et }) => + _extends$u( + { paddingTop: 25, paddingRight: 12, paddingBottom: 8, paddingLeft: 12 }, + !tt.vars && { + '&:-webkit-autofill': { + WebkitBoxShadow: tt.palette.mode === 'light' ? null : '0 0 0 100px #266798 inset', + WebkitTextFillColor: tt.palette.mode === 'light' ? null : '#fff', + caretColor: tt.palette.mode === 'light' ? null : '#fff', + borderTopLeftRadius: 'inherit', + borderTopRightRadius: 'inherit', + }, + }, + tt.vars && { + '&:-webkit-autofill': { borderTopLeftRadius: 'inherit', borderTopRightRadius: 'inherit' }, + [tt.getColorSchemeSelector('dark')]: { + '&:-webkit-autofill': { + WebkitBoxShadow: '0 0 0 100px #266798 inset', + WebkitTextFillColor: '#fff', + caretColor: '#fff', + }, + }, + }, + et.size === 'small' && { paddingTop: 21, paddingBottom: 4 }, + et.hiddenLabel && { paddingTop: 16, paddingBottom: 17 }, + et.multiline && { paddingTop: 0, paddingBottom: 0, paddingLeft: 0, paddingRight: 0 }, + et.startAdornment && { paddingLeft: 0 }, + et.endAdornment && { paddingRight: 0 }, + et.hiddenLabel && et.size === 'small' && { paddingTop: 8, paddingBottom: 9 }, + ), + ), + FilledInput = reactExports.forwardRef(function (et, nt) { + var rt, it, ot, at + const st = useThemeProps({ props: et, name: 'MuiFilledInput' }), + { + components: lt = {}, + componentsProps: ct, + fullWidth: ut = !1, + inputComponent: ht = 'input', + multiline: dt = !1, + slotProps: pt, + slots: mt = {}, + type: gt = 'text', + } = st, + yt = _objectWithoutPropertiesLoose$m(st, _excluded$1c), + bt = _extends$u({}, st, { fullWidth: ut, inputComponent: ht, multiline: dt, type: gt }), + vt = useUtilityClasses$H(st), + xt = { root: { ownerState: bt }, input: { ownerState: bt } }, + kt = pt ?? ct ? deepmerge$1(pt ?? ct, xt) : xt, + St = (rt = (it = mt.root) != null ? it : lt.Root) != null ? rt : FilledInputRoot, + Tt = (ot = (at = mt.input) != null ? at : lt.Input) != null ? ot : FilledInputInput + return jsxRuntimeExports.jsx( + InputBase$1, + _extends$u( + { + slots: { root: St, input: Tt }, + componentsProps: kt, + fullWidth: ut, + inputComponent: ht, + multiline: dt, + ref: nt, + type: gt, + }, + yt, + { classes: vt }, + ), + ) + }) + FilledInput.muiName = 'Input' + const FilledInput$1 = FilledInput + function getFormControlUtilityClasses(tt) { + return generateUtilityClass('MuiFormControl', tt) + } + generateUtilityClasses('MuiFormControl', [ + 'root', + 'marginNone', + 'marginNormal', + 'marginDense', + 'fullWidth', + 'disabled', + ]) + const _excluded$1b = [ + 'children', + 'className', + 'color', + 'component', + 'disabled', + 'error', + 'focused', + 'fullWidth', + 'hiddenLabel', + 'margin', + 'required', + 'size', + 'variant', + ], + useUtilityClasses$G = (tt) => { + const { classes: et, margin: nt, fullWidth: rt } = tt, + it = { root: ['root', nt !== 'none' && `margin${capitalize(nt)}`, rt && 'fullWidth'] } + return composeClasses(it, getFormControlUtilityClasses, et) + }, + FormControlRoot = styled$1('div', { + name: 'MuiFormControl', + slot: 'Root', + overridesResolver: ({ ownerState: tt }, et) => + _extends$u({}, et.root, et[`margin${capitalize(tt.margin)}`], tt.fullWidth && et.fullWidth), + })(({ ownerState: tt }) => + _extends$u( + { + display: 'inline-flex', + flexDirection: 'column', + position: 'relative', + minWidth: 0, + padding: 0, + margin: 0, + border: 0, + verticalAlign: 'top', + }, + tt.margin === 'normal' && { marginTop: 16, marginBottom: 8 }, + tt.margin === 'dense' && { marginTop: 8, marginBottom: 4 }, + tt.fullWidth && { width: '100%' }, + ), + ), + FormControl = reactExports.forwardRef(function (et, nt) { + const rt = useThemeProps({ props: et, name: 'MuiFormControl' }), + { + children: it, + className: ot, + color: at = 'primary', + component: st = 'div', + disabled: lt = !1, + error: ct = !1, + focused: ut, + fullWidth: ht = !1, + hiddenLabel: dt = !1, + margin: pt = 'none', + required: mt = !1, + size: gt = 'medium', + variant: yt = 'outlined', + } = rt, + bt = _objectWithoutPropertiesLoose$m(rt, _excluded$1b), + vt = _extends$u({}, rt, { + color: at, + component: st, + disabled: lt, + error: ct, + fullWidth: ht, + hiddenLabel: dt, + margin: pt, + required: mt, + size: gt, + variant: yt, + }), + xt = useUtilityClasses$G(vt), + [kt, St] = reactExports.useState(() => { + let Ct = !1 + return ( + it && + reactExports.Children.forEach(it, (wt) => { + if (!isMuiElement(wt, ['Input', 'Select'])) return + const It = isMuiElement(wt, ['Select']) ? wt.props.input : wt + It && isAdornedStart(It.props) && (Ct = !0) + }), + Ct + ) + }), + [Tt, At] = reactExports.useState(() => { + let Ct = !1 + return ( + it && + reactExports.Children.forEach(it, (wt) => { + isMuiElement(wt, ['Input', 'Select']) && + (isFilled(wt.props, !0) || isFilled(wt.props.inputProps, !0)) && + (Ct = !0) + }), + Ct + ) + }), + [Et, $t] = reactExports.useState(!1) + lt && Et && $t(!1) + const Dt = ut !== void 0 && !lt ? ut : Et + let jt + const Pt = reactExports.useMemo( + () => ({ + adornedStart: kt, + setAdornedStart: St, + color: at, + disabled: lt, + error: ct, + filled: Tt, + focused: Dt, + fullWidth: ht, + hiddenLabel: dt, + size: gt, + onBlur: () => { + $t(!1) + }, + onEmpty: () => { + At(!1) + }, + onFilled: () => { + At(!0) + }, + onFocus: () => { + $t(!0) + }, + registerEffect: jt, + required: mt, + variant: yt, + }), + [kt, at, lt, ct, Tt, Dt, ht, dt, jt, mt, gt, yt], + ) + return jsxRuntimeExports.jsx(FormControlContext$1.Provider, { + value: Pt, + children: jsxRuntimeExports.jsx( + FormControlRoot, + _extends$u({ as: st, ownerState: vt, className: clsx$3(xt.root, ot), ref: nt }, bt, { children: it }), + ), + }) + }), + FormControl$1 = FormControl, + Stack$4 = createStack({ + createStyledComponent: styled$1('div', { + name: 'MuiStack', + slot: 'Root', + overridesResolver: (tt, et) => et.root, + }), + useThemeProps: (tt) => useThemeProps({ props: tt, name: 'MuiStack' }), + }), + Stack$5 = Stack$4 + function getFormHelperTextUtilityClasses(tt) { + return generateUtilityClass('MuiFormHelperText', tt) + } + const formHelperTextClasses = generateUtilityClasses('MuiFormHelperText', [ + 'root', + 'error', + 'disabled', + 'sizeSmall', + 'sizeMedium', + 'contained', + 'focused', + 'filled', + 'required', + ]), + formHelperTextClasses$1 = formHelperTextClasses + var _span$3 + const _excluded$1a = [ + 'children', + 'className', + 'component', + 'disabled', + 'error', + 'filled', + 'focused', + 'margin', + 'required', + 'variant', + ], + useUtilityClasses$F = (tt) => { + const { + classes: et, + contained: nt, + size: rt, + disabled: it, + error: ot, + filled: at, + focused: st, + required: lt, + } = tt, + ct = { + root: [ + 'root', + it && 'disabled', + ot && 'error', + rt && `size${capitalize(rt)}`, + nt && 'contained', + st && 'focused', + at && 'filled', + lt && 'required', + ], + } + return composeClasses(ct, getFormHelperTextUtilityClasses, et) + }, + FormHelperTextRoot = styled$1('p', { + name: 'MuiFormHelperText', + slot: 'Root', + overridesResolver: (tt, et) => { + const { ownerState: nt } = tt + return [ + et.root, + nt.size && et[`size${capitalize(nt.size)}`], + nt.contained && et.contained, + nt.filled && et.filled, + ] + }, + })(({ theme: tt, ownerState: et }) => + _extends$u( + { color: (tt.vars || tt).palette.text.secondary }, + tt.typography.caption, + { + textAlign: 'left', + marginTop: 3, + marginRight: 0, + marginBottom: 0, + marginLeft: 0, + [`&.${formHelperTextClasses$1.disabled}`]: { color: (tt.vars || tt).palette.text.disabled }, + [`&.${formHelperTextClasses$1.error}`]: { color: (tt.vars || tt).palette.error.main }, + }, + et.size === 'small' && { marginTop: 4 }, + et.contained && { marginLeft: 14, marginRight: 14 }, + ), + ), + FormHelperText = reactExports.forwardRef(function (et, nt) { + const rt = useThemeProps({ props: et, name: 'MuiFormHelperText' }), + { children: it, className: ot, component: at = 'p' } = rt, + st = _objectWithoutPropertiesLoose$m(rt, _excluded$1a), + lt = useFormControl(), + ct = formControlState({ + props: rt, + muiFormControl: lt, + states: ['variant', 'size', 'disabled', 'error', 'filled', 'focused', 'required'], + }), + ut = _extends$u({}, rt, { + component: at, + contained: ct.variant === 'filled' || ct.variant === 'outlined', + variant: ct.variant, + size: ct.size, + disabled: ct.disabled, + error: ct.error, + filled: ct.filled, + focused: ct.focused, + required: ct.required, + }), + ht = useUtilityClasses$F(ut) + return jsxRuntimeExports.jsx( + FormHelperTextRoot, + _extends$u({ as: at, ownerState: ut, className: clsx$3(ht.root, ot), ref: nt }, st, { + children: + it === ' ' + ? _span$3 || (_span$3 = jsxRuntimeExports.jsx('span', { className: 'notranslate', children: '​' })) + : it, + }), + ) + }), + FormHelperText$1 = FormHelperText + function getFormLabelUtilityClasses(tt) { + return generateUtilityClass('MuiFormLabel', tt) + } + const formLabelClasses = generateUtilityClasses('MuiFormLabel', [ + 'root', + 'colorSecondary', + 'focused', + 'disabled', + 'error', + 'filled', + 'required', + 'asterisk', + ]), + formLabelClasses$1 = formLabelClasses, + _excluded$19 = [ + 'children', + 'className', + 'color', + 'component', + 'disabled', + 'error', + 'filled', + 'focused', + 'required', + ], + useUtilityClasses$E = (tt) => { + const { classes: et, color: nt, focused: rt, disabled: it, error: ot, filled: at, required: st } = tt, + lt = { + root: [ + 'root', + `color${capitalize(nt)}`, + it && 'disabled', + ot && 'error', + at && 'filled', + rt && 'focused', + st && 'required', + ], + asterisk: ['asterisk', ot && 'error'], + } + return composeClasses(lt, getFormLabelUtilityClasses, et) + }, + FormLabelRoot = styled$1('label', { + name: 'MuiFormLabel', + slot: 'Root', + overridesResolver: ({ ownerState: tt }, et) => + _extends$u({}, et.root, tt.color === 'secondary' && et.colorSecondary, tt.filled && et.filled), + })(({ theme: tt, ownerState: et }) => + _extends$u({ color: (tt.vars || tt).palette.text.secondary }, tt.typography.body1, { + lineHeight: '1.4375em', + padding: 0, + position: 'relative', + [`&.${formLabelClasses$1.focused}`]: { color: (tt.vars || tt).palette[et.color].main }, + [`&.${formLabelClasses$1.disabled}`]: { color: (tt.vars || tt).palette.text.disabled }, + [`&.${formLabelClasses$1.error}`]: { color: (tt.vars || tt).palette.error.main }, + }), + ), + AsteriskComponent = styled$1('span', { + name: 'MuiFormLabel', + slot: 'Asterisk', + overridesResolver: (tt, et) => et.asterisk, + })(({ theme: tt }) => ({ [`&.${formLabelClasses$1.error}`]: { color: (tt.vars || tt).palette.error.main } })), + FormLabel = reactExports.forwardRef(function (et, nt) { + const rt = useThemeProps({ props: et, name: 'MuiFormLabel' }), + { children: it, className: ot, component: at = 'label' } = rt, + st = _objectWithoutPropertiesLoose$m(rt, _excluded$19), + lt = useFormControl(), + ct = formControlState({ + props: rt, + muiFormControl: lt, + states: ['color', 'required', 'focused', 'disabled', 'error', 'filled'], + }), + ut = _extends$u({}, rt, { + color: ct.color || 'primary', + component: at, + disabled: ct.disabled, + error: ct.error, + filled: ct.filled, + focused: ct.focused, + required: ct.required, + }), + ht = useUtilityClasses$E(ut) + return jsxRuntimeExports.jsxs( + FormLabelRoot, + _extends$u({ as: at, ownerState: ut, className: clsx$3(ht.root, ot), ref: nt }, st, { + children: [ + it, + ct.required && + jsxRuntimeExports.jsxs(AsteriskComponent, { + ownerState: ut, + 'aria-hidden': !0, + className: ht.asterisk, + children: [' ', '*'], + }), + ], + }), + ) + }), + FormLabel$1 = FormLabel, + _excluded$18 = [ + 'addEndListener', + 'appear', + 'children', + 'easing', + 'in', + 'onEnter', + 'onEntered', + 'onEntering', + 'onExit', + 'onExited', + 'onExiting', + 'style', + 'timeout', + 'TransitionComponent', + ] + function getScale(tt) { + return `scale(${tt}, ${tt ** 2})` + } + const styles$3 = { entering: { opacity: 1, transform: getScale(1) }, entered: { opacity: 1, transform: 'none' } }, + isWebKit154 = + typeof navigator < 'u' && + /^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent) && + /(os |version\/)15(.|_)4/i.test(navigator.userAgent), + Grow = reactExports.forwardRef(function (et, nt) { + const { + addEndListener: rt, + appear: it = !0, + children: ot, + easing: at, + in: st, + onEnter: lt, + onEntered: ct, + onEntering: ut, + onExit: ht, + onExited: dt, + onExiting: pt, + style: mt, + timeout: gt = 'auto', + TransitionComponent: yt = Transition$2, + } = et, + bt = _objectWithoutPropertiesLoose$m(et, _excluded$18), + vt = reactExports.useRef(), + xt = reactExports.useRef(), + kt = useTheme(), + St = reactExports.useRef(null), + Tt = useForkRef(St, ot.ref, nt), + At = (It) => (Ot) => { + if (It) { + const Wt = St.current + Ot === void 0 ? It(Wt) : It(Wt, Ot) + } + }, + Et = At(ut), + $t = At((It, Ot) => { + reflow(It) + const { + duration: Wt, + delay: zt, + easing: Ft, + } = getTransitionProps({ style: mt, timeout: gt, easing: at }, { mode: 'enter' }) + let Nt + gt === 'auto' ? ((Nt = kt.transitions.getAutoHeightDuration(It.clientHeight)), (xt.current = Nt)) : (Nt = Wt), + (It.style.transition = [ + kt.transitions.create('opacity', { duration: Nt, delay: zt }), + kt.transitions.create('transform', { duration: isWebKit154 ? Nt : Nt * 0.666, delay: zt, easing: Ft }), + ].join(',')), + lt && lt(It, Ot) + }), + Dt = At(ct), + jt = At(pt), + Pt = At((It) => { + const { + duration: Ot, + delay: Wt, + easing: zt, + } = getTransitionProps({ style: mt, timeout: gt, easing: at }, { mode: 'exit' }) + let Ft + gt === 'auto' ? ((Ft = kt.transitions.getAutoHeightDuration(It.clientHeight)), (xt.current = Ft)) : (Ft = Ot), + (It.style.transition = [ + kt.transitions.create('opacity', { duration: Ft, delay: Wt }), + kt.transitions.create('transform', { + duration: isWebKit154 ? Ft : Ft * 0.666, + delay: isWebKit154 ? Wt : Wt || Ft * 0.333, + easing: zt, + }), + ].join(',')), + (It.style.opacity = 0), + (It.style.transform = getScale(0.75)), + ht && ht(It) + }), + Ct = At(dt), + wt = (It) => { + gt === 'auto' && (vt.current = setTimeout(It, xt.current || 0)), rt && rt(St.current, It) + } + return ( + reactExports.useEffect( + () => () => { + clearTimeout(vt.current) + }, + [], + ), + jsxRuntimeExports.jsx( + yt, + _extends$u( + { + appear: it, + in: st, + nodeRef: St, + onEnter: $t, + onEntered: Dt, + onEntering: Et, + onExit: Pt, + onExited: Ct, + onExiting: jt, + addEndListener: wt, + timeout: gt === 'auto' ? null : gt, + }, + bt, + { + children: (It, Ot) => + reactExports.cloneElement( + ot, + _extends$u( + { + style: _extends$u( + { + opacity: 0, + transform: getScale(0.75), + visibility: It === 'exited' && !st ? 'hidden' : void 0, + }, + styles$3[It], + mt, + ot.props.style, + ), + ref: Tt, + }, + Ot, + ), + ), + }, + ), + ) + ) + }) + Grow.muiSupportAuto = !0 + const Grow$1 = Grow + function useMediaQueryOld(tt, et, nt, rt, it) { + const [ot, at] = reactExports.useState(() => (it && nt ? nt(tt).matches : rt ? rt(tt).matches : et)) + return ( + useEnhancedEffect$1(() => { + let st = !0 + if (!nt) return + const lt = nt(tt), + ct = () => { + st && at(lt.matches) + } + return ( + ct(), + lt.addListener(ct), + () => { + ;(st = !1), lt.removeListener(ct) + } + ) + }, [tt, nt]), + ot + ) + } + const maybeReactUseSyncExternalStore = React$2['useSyncExternalStore'] + function useMediaQueryNew(tt, et, nt, rt, it) { + const ot = reactExports.useCallback(() => et, [et]), + at = reactExports.useMemo(() => { + if (it && nt) return () => nt(tt).matches + if (rt !== null) { + const { matches: ut } = rt(tt) + return () => ut + } + return ot + }, [ot, tt, rt, it, nt]), + [st, lt] = reactExports.useMemo(() => { + if (nt === null) return [ot, () => () => {}] + const ut = nt(tt) + return [ + () => ut.matches, + (ht) => ( + ut.addListener(ht), + () => { + ut.removeListener(ht) + } + ), + ] + }, [ot, nt, tt]) + return maybeReactUseSyncExternalStore(lt, st, at) + } + function useMediaQuery(tt, et = {}) { + const nt = useTheme$3(), + rt = typeof window < 'u' && typeof window.matchMedia < 'u', + { + defaultMatches: it = !1, + matchMedia: ot = rt ? window.matchMedia : null, + ssrMatchMedia: at = null, + noSsr: st = !1, + } = getThemeProps({ name: 'MuiUseMediaQuery', props: et, theme: nt }) + let lt = typeof tt == 'function' ? tt(nt) : tt + return ( + (lt = lt.replace(/^@media( ?)/m, '')), + (maybeReactUseSyncExternalStore !== void 0 ? useMediaQueryNew : useMediaQueryOld)(lt, it, ot, at, st) + ) + } + const _excluded$17 = [ + 'disableUnderline', + 'components', + 'componentsProps', + 'fullWidth', + 'inputComponent', + 'multiline', + 'slotProps', + 'slots', + 'type', + ], + useUtilityClasses$D = (tt) => { + const { classes: et, disableUnderline: nt } = tt, + it = composeClasses({ root: ['root', !nt && 'underline'], input: ['input'] }, getInputUtilityClass, et) + return _extends$u({}, et, it) + }, + InputRoot = styled$1(InputBaseRoot, { + shouldForwardProp: (tt) => rootShouldForwardProp(tt) || tt === 'classes', + name: 'MuiInput', + slot: 'Root', + overridesResolver: (tt, et) => { + const { ownerState: nt } = tt + return [...rootOverridesResolver(tt, et), !nt.disableUnderline && et.underline] + }, + })(({ theme: tt, ownerState: et }) => { + let rt = tt.palette.mode === 'light' ? 'rgba(0, 0, 0, 0.42)' : 'rgba(255, 255, 255, 0.7)' + return ( + tt.vars && (rt = `rgba(${tt.vars.palette.common.onBackgroundChannel} / ${tt.vars.opacity.inputUnderline})`), + _extends$u( + { position: 'relative' }, + et.formControl && { 'label + &': { marginTop: 16 } }, + !et.disableUnderline && { + '&:after': { + borderBottom: `2px solid ${(tt.vars || tt).palette[et.color].main}`, + left: 0, + bottom: 0, + content: '""', + position: 'absolute', + right: 0, + transform: 'scaleX(0)', + transition: tt.transitions.create('transform', { + duration: tt.transitions.duration.shorter, + easing: tt.transitions.easing.easeOut, + }), + pointerEvents: 'none', + }, + [`&.${inputClasses$1.focused}:after`]: { transform: 'scaleX(1) translateX(0)' }, + [`&.${inputClasses$1.error}`]: { + '&:before, &:after': { borderBottomColor: (tt.vars || tt).palette.error.main }, + }, + '&:before': { + borderBottom: `1px solid ${rt}`, + left: 0, + bottom: 0, + content: '"\\00a0"', + position: 'absolute', + right: 0, + transition: tt.transitions.create('border-bottom-color', { duration: tt.transitions.duration.shorter }), + pointerEvents: 'none', + }, + [`&:hover:not(.${inputClasses$1.disabled}, .${inputClasses$1.error}):before`]: { + borderBottom: `2px solid ${(tt.vars || tt).palette.text.primary}`, + '@media (hover: none)': { borderBottom: `1px solid ${rt}` }, + }, + [`&.${inputClasses$1.disabled}:before`]: { borderBottomStyle: 'dotted' }, + }, + ) + ) + }), + InputInput = styled$1(InputBaseComponent, { + name: 'MuiInput', + slot: 'Input', + overridesResolver: inputOverridesResolver, + })({}), + Input$2 = reactExports.forwardRef(function (et, nt) { + var rt, it, ot, at + const st = useThemeProps({ props: et, name: 'MuiInput' }), + { + disableUnderline: lt, + components: ct = {}, + componentsProps: ut, + fullWidth: ht = !1, + inputComponent: dt = 'input', + multiline: pt = !1, + slotProps: mt, + slots: gt = {}, + type: yt = 'text', + } = st, + bt = _objectWithoutPropertiesLoose$m(st, _excluded$17), + vt = useUtilityClasses$D(st), + kt = { root: { ownerState: { disableUnderline: lt } } }, + St = mt ?? ut ? deepmerge$1(mt ?? ut, kt) : kt, + Tt = (rt = (it = gt.root) != null ? it : ct.Root) != null ? rt : InputRoot, + At = (ot = (at = gt.input) != null ? at : ct.Input) != null ? ot : InputInput + return jsxRuntimeExports.jsx( + InputBase$1, + _extends$u( + { + slots: { root: Tt, input: At }, + slotProps: St, + fullWidth: ht, + inputComponent: dt, + multiline: pt, + ref: nt, + type: yt, + }, + bt, + { classes: vt }, + ), + ) + }) + Input$2.muiName = 'Input' + const Input$3 = Input$2 + function getInputAdornmentUtilityClass(tt) { + return generateUtilityClass('MuiInputAdornment', tt) + } + const inputAdornmentClasses = generateUtilityClasses('MuiInputAdornment', [ + 'root', + 'filled', + 'standard', + 'outlined', + 'positionStart', + 'positionEnd', + 'disablePointerEvents', + 'hiddenLabel', + 'sizeSmall', + ]), + inputAdornmentClasses$1 = inputAdornmentClasses + var _span$2 + const _excluded$16 = [ + 'children', + 'className', + 'component', + 'disablePointerEvents', + 'disableTypography', + 'position', + 'variant', + ], + overridesResolver$3 = (tt, et) => { + const { ownerState: nt } = tt + return [ + et.root, + et[`position${capitalize(nt.position)}`], + nt.disablePointerEvents === !0 && et.disablePointerEvents, + et[nt.variant], + ] + }, + useUtilityClasses$C = (tt) => { + const { classes: et, disablePointerEvents: nt, hiddenLabel: rt, position: it, size: ot, variant: at } = tt, + st = { + root: [ + 'root', + nt && 'disablePointerEvents', + it && `position${capitalize(it)}`, + at, + rt && 'hiddenLabel', + ot && `size${capitalize(ot)}`, + ], + } + return composeClasses(st, getInputAdornmentUtilityClass, et) + }, + InputAdornmentRoot = styled$1('div', { + name: 'MuiInputAdornment', + slot: 'Root', + overridesResolver: overridesResolver$3, + })(({ theme: tt, ownerState: et }) => + _extends$u( + { + display: 'flex', + height: '0.01em', + maxHeight: '2em', + alignItems: 'center', + whiteSpace: 'nowrap', + color: (tt.vars || tt).palette.action.active, + }, + et.variant === 'filled' && { + [`&.${inputAdornmentClasses$1.positionStart}&:not(.${inputAdornmentClasses$1.hiddenLabel})`]: { + marginTop: 16, + }, + }, + et.position === 'start' && { marginRight: 8 }, + et.position === 'end' && { marginLeft: 8 }, + et.disablePointerEvents === !0 && { pointerEvents: 'none' }, + ), + ), + InputAdornment = reactExports.forwardRef(function (et, nt) { + const rt = useThemeProps({ props: et, name: 'MuiInputAdornment' }), + { + children: it, + className: ot, + component: at = 'div', + disablePointerEvents: st = !1, + disableTypography: lt = !1, + position: ct, + variant: ut, + } = rt, + ht = _objectWithoutPropertiesLoose$m(rt, _excluded$16), + dt = useFormControl() || {} + let pt = ut + ut && dt.variant, dt && !pt && (pt = dt.variant) + const mt = _extends$u({}, rt, { + hiddenLabel: dt.hiddenLabel, + size: dt.size, + disablePointerEvents: st, + position: ct, + variant: pt, + }), + gt = useUtilityClasses$C(mt) + return jsxRuntimeExports.jsx(FormControlContext$1.Provider, { + value: null, + children: jsxRuntimeExports.jsx( + InputAdornmentRoot, + _extends$u({ as: at, ownerState: mt, className: clsx$3(gt.root, ot), ref: nt }, ht, { + children: + typeof it == 'string' && !lt + ? jsxRuntimeExports.jsx(Typography$1, { color: 'text.secondary', children: it }) + : jsxRuntimeExports.jsxs(reactExports.Fragment, { + children: [ + ct === 'start' + ? _span$2 || + (_span$2 = jsxRuntimeExports.jsx('span', { className: 'notranslate', children: '​' })) + : null, + it, + ], + }), + }), + ), + }) + }), + MuiInputAdornment = InputAdornment + function getInputLabelUtilityClasses(tt) { + return generateUtilityClass('MuiInputLabel', tt) + } + generateUtilityClasses('MuiInputLabel', [ + 'root', + 'focused', + 'disabled', + 'error', + 'required', + 'asterisk', + 'formControl', + 'sizeSmall', + 'shrink', + 'animated', + 'standard', + 'filled', + 'outlined', + ]) + const _excluded$15 = ['disableAnimation', 'margin', 'shrink', 'variant', 'className'], + useUtilityClasses$B = (tt) => { + const { + classes: et, + formControl: nt, + size: rt, + shrink: it, + disableAnimation: ot, + variant: at, + required: st, + } = tt, + lt = { + root: [ + 'root', + nt && 'formControl', + !ot && 'animated', + it && 'shrink', + rt && rt !== 'normal' && `size${capitalize(rt)}`, + at, + ], + asterisk: [st && 'asterisk'], + }, + ct = composeClasses(lt, getInputLabelUtilityClasses, et) + return _extends$u({}, et, ct) + }, + InputLabelRoot = styled$1(FormLabel$1, { + shouldForwardProp: (tt) => rootShouldForwardProp(tt) || tt === 'classes', + name: 'MuiInputLabel', + slot: 'Root', + overridesResolver: (tt, et) => { + const { ownerState: nt } = tt + return [ + { [`& .${formLabelClasses$1.asterisk}`]: et.asterisk }, + et.root, + nt.formControl && et.formControl, + nt.size === 'small' && et.sizeSmall, + nt.shrink && et.shrink, + !nt.disableAnimation && et.animated, + et[nt.variant], + ] + }, + })(({ theme: tt, ownerState: et }) => + _extends$u( + { + display: 'block', + transformOrigin: 'top left', + whiteSpace: 'nowrap', + overflow: 'hidden', + textOverflow: 'ellipsis', + maxWidth: '100%', + }, + et.formControl && { position: 'absolute', left: 0, top: 0, transform: 'translate(0, 20px) scale(1)' }, + et.size === 'small' && { transform: 'translate(0, 17px) scale(1)' }, + et.shrink && { transform: 'translate(0, -1.5px) scale(0.75)', transformOrigin: 'top left', maxWidth: '133%' }, + !et.disableAnimation && { + transition: tt.transitions.create(['color', 'transform', 'max-width'], { + duration: tt.transitions.duration.shorter, + easing: tt.transitions.easing.easeOut, + }), + }, + et.variant === 'filled' && + _extends$u( + { + zIndex: 1, + pointerEvents: 'none', + transform: 'translate(12px, 16px) scale(1)', + maxWidth: 'calc(100% - 24px)', + }, + et.size === 'small' && { transform: 'translate(12px, 13px) scale(1)' }, + et.shrink && + _extends$u( + { + userSelect: 'none', + pointerEvents: 'auto', + transform: 'translate(12px, 7px) scale(0.75)', + maxWidth: 'calc(133% - 24px)', + }, + et.size === 'small' && { transform: 'translate(12px, 4px) scale(0.75)' }, + ), + ), + et.variant === 'outlined' && + _extends$u( + { + zIndex: 1, + pointerEvents: 'none', + transform: 'translate(14px, 16px) scale(1)', + maxWidth: 'calc(100% - 24px)', + }, + et.size === 'small' && { transform: 'translate(14px, 9px) scale(1)' }, + et.shrink && { + userSelect: 'none', + pointerEvents: 'auto', + maxWidth: 'calc(133% - 32px)', + transform: 'translate(14px, -9px) scale(0.75)', + }, + ), + ), + ), + InputLabel = reactExports.forwardRef(function (et, nt) { + const rt = useThemeProps({ name: 'MuiInputLabel', props: et }), + { disableAnimation: it = !1, shrink: ot, className: at } = rt, + st = _objectWithoutPropertiesLoose$m(rt, _excluded$15), + lt = useFormControl() + let ct = ot + typeof ct > 'u' && lt && (ct = lt.filled || lt.focused || lt.adornedStart) + const ut = formControlState({ props: rt, muiFormControl: lt, states: ['size', 'variant', 'required'] }), + ht = _extends$u({}, rt, { + disableAnimation: it, + formControl: lt, + shrink: ct, + size: ut.size, + variant: ut.variant, + required: ut.required, + }), + dt = useUtilityClasses$B(ht) + return jsxRuntimeExports.jsx( + InputLabelRoot, + _extends$u({ 'data-shrink': ct, ownerState: ht, ref: nt, className: clsx$3(dt.root, at) }, st, { classes: dt }), + ) + }), + InputLabel$1 = InputLabel, + ListContext = reactExports.createContext({}), + ListContext$1 = ListContext + function getListUtilityClass(tt) { + return generateUtilityClass('MuiList', tt) + } + generateUtilityClasses('MuiList', ['root', 'padding', 'dense', 'subheader']) + const _excluded$14 = ['children', 'className', 'component', 'dense', 'disablePadding', 'subheader'], + useUtilityClasses$A = (tt) => { + const { classes: et, disablePadding: nt, dense: rt, subheader: it } = tt + return composeClasses( + { root: ['root', !nt && 'padding', rt && 'dense', it && 'subheader'] }, + getListUtilityClass, + et, + ) + }, + ListRoot = styled$1('ul', { + name: 'MuiList', + slot: 'Root', + overridesResolver: (tt, et) => { + const { ownerState: nt } = tt + return [et.root, !nt.disablePadding && et.padding, nt.dense && et.dense, nt.subheader && et.subheader] + }, + })(({ ownerState: tt }) => + _extends$u( + { listStyle: 'none', margin: 0, padding: 0, position: 'relative' }, + !tt.disablePadding && { paddingTop: 8, paddingBottom: 8 }, + tt.subheader && { paddingTop: 0 }, + ), + ), + List = reactExports.forwardRef(function (et, nt) { + const rt = useThemeProps({ props: et, name: 'MuiList' }), + { + children: it, + className: ot, + component: at = 'ul', + dense: st = !1, + disablePadding: lt = !1, + subheader: ct, + } = rt, + ut = _objectWithoutPropertiesLoose$m(rt, _excluded$14), + ht = reactExports.useMemo(() => ({ dense: st }), [st]), + dt = _extends$u({}, rt, { component: at, dense: st, disablePadding: lt }), + pt = useUtilityClasses$A(dt) + return jsxRuntimeExports.jsx(ListContext$1.Provider, { + value: ht, + children: jsxRuntimeExports.jsxs( + ListRoot, + _extends$u({ as: at, className: clsx$3(pt.root, ot), ref: nt, ownerState: dt }, ut, { children: [ct, it] }), + ), + }) + }), + List$1 = List + function getListItemUtilityClass(tt) { + return generateUtilityClass('MuiListItem', tt) + } + const listItemClasses = generateUtilityClasses('MuiListItem', [ + 'root', + 'container', + 'focusVisible', + 'dense', + 'alignItemsFlexStart', + 'disabled', + 'divider', + 'gutters', + 'padding', + 'button', + 'secondaryAction', + 'selected', + ]), + listItemClasses$1 = listItemClasses, + listItemButtonClasses = generateUtilityClasses('MuiListItemButton', [ + 'root', + 'focusVisible', + 'dense', + 'alignItemsFlexStart', + 'disabled', + 'divider', + 'gutters', + 'selected', + ]), + listItemButtonClasses$1 = listItemButtonClasses + function getListItemSecondaryActionClassesUtilityClass(tt) { + return generateUtilityClass('MuiListItemSecondaryAction', tt) + } + generateUtilityClasses('MuiListItemSecondaryAction', ['root', 'disableGutters']) + const _excluded$13 = ['className'], + useUtilityClasses$z = (tt) => { + const { disableGutters: et, classes: nt } = tt + return composeClasses( + { root: ['root', et && 'disableGutters'] }, + getListItemSecondaryActionClassesUtilityClass, + nt, + ) + }, + ListItemSecondaryActionRoot = styled$1('div', { + name: 'MuiListItemSecondaryAction', + slot: 'Root', + overridesResolver: (tt, et) => { + const { ownerState: nt } = tt + return [et.root, nt.disableGutters && et.disableGutters] + }, + })(({ ownerState: tt }) => + _extends$u( + { position: 'absolute', right: 16, top: '50%', transform: 'translateY(-50%)' }, + tt.disableGutters && { right: 0 }, + ), + ), + ListItemSecondaryAction = reactExports.forwardRef(function (et, nt) { + const rt = useThemeProps({ props: et, name: 'MuiListItemSecondaryAction' }), + { className: it } = rt, + ot = _objectWithoutPropertiesLoose$m(rt, _excluded$13), + at = reactExports.useContext(ListContext$1), + st = _extends$u({}, rt, { disableGutters: at.disableGutters }), + lt = useUtilityClasses$z(st) + return jsxRuntimeExports.jsx( + ListItemSecondaryActionRoot, + _extends$u({ className: clsx$3(lt.root, it), ownerState: st, ref: nt }, ot), + ) + }) + ListItemSecondaryAction.muiName = 'ListItemSecondaryAction' + const ListItemSecondaryAction$1 = ListItemSecondaryAction, + _excluded$12 = ['className'], + _excluded2$f = [ + 'alignItems', + 'autoFocus', + 'button', + 'children', + 'className', + 'component', + 'components', + 'componentsProps', + 'ContainerComponent', + 'ContainerProps', + 'dense', + 'disabled', + 'disableGutters', + 'disablePadding', + 'divider', + 'focusVisibleClassName', + 'secondaryAction', + 'selected', + 'slotProps', + 'slots', + ], + overridesResolver$2 = (tt, et) => { + const { ownerState: nt } = tt + return [ + et.root, + nt.dense && et.dense, + nt.alignItems === 'flex-start' && et.alignItemsFlexStart, + nt.divider && et.divider, + !nt.disableGutters && et.gutters, + !nt.disablePadding && et.padding, + nt.button && et.button, + nt.hasSecondaryAction && et.secondaryAction, + ] + }, + useUtilityClasses$y = (tt) => { + const { + alignItems: et, + button: nt, + classes: rt, + dense: it, + disabled: ot, + disableGutters: at, + disablePadding: st, + divider: lt, + hasSecondaryAction: ct, + selected: ut, + } = tt + return composeClasses( + { + root: [ + 'root', + it && 'dense', + !at && 'gutters', + !st && 'padding', + lt && 'divider', + ot && 'disabled', + nt && 'button', + et === 'flex-start' && 'alignItemsFlexStart', + ct && 'secondaryAction', + ut && 'selected', + ], + container: ['container'], + }, + getListItemUtilityClass, + rt, + ) + }, + ListItemRoot = styled$1('div', { name: 'MuiListItem', slot: 'Root', overridesResolver: overridesResolver$2 })( + ({ theme: tt, ownerState: et }) => + _extends$u( + { + display: 'flex', + justifyContent: 'flex-start', + alignItems: 'center', + position: 'relative', + textDecoration: 'none', + width: '100%', + boxSizing: 'border-box', + textAlign: 'left', + }, + !et.disablePadding && + _extends$u( + { paddingTop: 8, paddingBottom: 8 }, + et.dense && { paddingTop: 4, paddingBottom: 4 }, + !et.disableGutters && { paddingLeft: 16, paddingRight: 16 }, + !!et.secondaryAction && { paddingRight: 48 }, + ), + !!et.secondaryAction && { [`& > .${listItemButtonClasses$1.root}`]: { paddingRight: 48 } }, + { + [`&.${listItemClasses$1.focusVisible}`]: { backgroundColor: (tt.vars || tt).palette.action.focus }, + [`&.${listItemClasses$1.selected}`]: { + backgroundColor: tt.vars + ? `rgba(${tt.vars.palette.primary.mainChannel} / ${tt.vars.palette.action.selectedOpacity})` + : alpha$1(tt.palette.primary.main, tt.palette.action.selectedOpacity), + [`&.${listItemClasses$1.focusVisible}`]: { + backgroundColor: tt.vars + ? `rgba(${tt.vars.palette.primary.mainChannel} / calc(${tt.vars.palette.action.selectedOpacity} + ${tt.vars.palette.action.focusOpacity}))` + : alpha$1( + tt.palette.primary.main, + tt.palette.action.selectedOpacity + tt.palette.action.focusOpacity, + ), + }, + }, + [`&.${listItemClasses$1.disabled}`]: { opacity: (tt.vars || tt).palette.action.disabledOpacity }, + }, + et.alignItems === 'flex-start' && { alignItems: 'flex-start' }, + et.divider && { borderBottom: `1px solid ${(tt.vars || tt).palette.divider}`, backgroundClip: 'padding-box' }, + et.button && { + transition: tt.transitions.create('background-color', { duration: tt.transitions.duration.shortest }), + '&:hover': { + textDecoration: 'none', + backgroundColor: (tt.vars || tt).palette.action.hover, + '@media (hover: none)': { backgroundColor: 'transparent' }, + }, + [`&.${listItemClasses$1.selected}:hover`]: { + backgroundColor: tt.vars + ? `rgba(${tt.vars.palette.primary.mainChannel} / calc(${tt.vars.palette.action.selectedOpacity} + ${tt.vars.palette.action.hoverOpacity}))` + : alpha$1(tt.palette.primary.main, tt.palette.action.selectedOpacity + tt.palette.action.hoverOpacity), + '@media (hover: none)': { + backgroundColor: tt.vars + ? `rgba(${tt.vars.palette.primary.mainChannel} / ${tt.vars.palette.action.selectedOpacity})` + : alpha$1(tt.palette.primary.main, tt.palette.action.selectedOpacity), + }, + }, + }, + et.hasSecondaryAction && { paddingRight: 48 }, + ), + ), + ListItemContainer = styled$1('li', { + name: 'MuiListItem', + slot: 'Container', + overridesResolver: (tt, et) => et.container, + })({ position: 'relative' }), + ListItem = reactExports.forwardRef(function (et, nt) { + const rt = useThemeProps({ props: et, name: 'MuiListItem' }), + { + alignItems: it = 'center', + autoFocus: ot = !1, + button: at = !1, + children: st, + className: lt, + component: ct, + components: ut = {}, + componentsProps: ht = {}, + ContainerComponent: dt = 'li', + ContainerProps: { className: pt } = {}, + dense: mt = !1, + disabled: gt = !1, + disableGutters: yt = !1, + disablePadding: bt = !1, + divider: vt = !1, + focusVisibleClassName: xt, + secondaryAction: kt, + selected: St = !1, + slotProps: Tt = {}, + slots: At = {}, + } = rt, + Et = _objectWithoutPropertiesLoose$m(rt.ContainerProps, _excluded$12), + $t = _objectWithoutPropertiesLoose$m(rt, _excluded2$f), + Dt = reactExports.useContext(ListContext$1), + jt = reactExports.useMemo( + () => ({ dense: mt || Dt.dense || !1, alignItems: it, disableGutters: yt }), + [it, Dt.dense, mt, yt], + ), + Pt = reactExports.useRef(null) + useEnhancedEffect$1(() => { + ot && Pt.current && Pt.current.focus() + }, [ot]) + const Ct = reactExports.Children.toArray(st), + wt = Ct.length && isMuiElement(Ct[Ct.length - 1], ['ListItemSecondaryAction']), + It = _extends$u({}, rt, { + alignItems: it, + autoFocus: ot, + button: at, + dense: jt.dense, + disabled: gt, + disableGutters: yt, + disablePadding: bt, + divider: vt, + hasSecondaryAction: wt, + selected: St, + }), + Ot = useUtilityClasses$y(It), + Wt = useForkRef(Pt, nt), + zt = At.root || ut.Root || ListItemRoot, + Ft = Tt.root || ht.root || {}, + Nt = _extends$u({ className: clsx$3(Ot.root, Ft.className, lt), disabled: gt }, $t) + let Ut = ct || 'li' + return ( + at && + ((Nt.component = ct || 'div'), + (Nt.focusVisibleClassName = clsx$3(listItemClasses$1.focusVisible, xt)), + (Ut = ButtonBase$1)), + wt + ? ((Ut = !Nt.component && !ct ? 'div' : Ut), + dt === 'li' && (Ut === 'li' ? (Ut = 'div') : Nt.component === 'li' && (Nt.component = 'div')), + jsxRuntimeExports.jsx(ListContext$1.Provider, { + value: jt, + children: jsxRuntimeExports.jsxs( + ListItemContainer, + _extends$u({ as: dt, className: clsx$3(Ot.container, pt), ref: Wt, ownerState: It }, Et, { + children: [ + jsxRuntimeExports.jsx( + zt, + _extends$u( + {}, + Ft, + !isHostComponent(zt) && { as: Ut, ownerState: _extends$u({}, It, Ft.ownerState) }, + Nt, + { children: Ct }, + ), + ), + Ct.pop(), + ], + }), + ), + })) + : jsxRuntimeExports.jsx(ListContext$1.Provider, { + value: jt, + children: jsxRuntimeExports.jsxs( + zt, + _extends$u( + {}, + Ft, + { as: Ut, ref: Wt }, + !isHostComponent(zt) && { ownerState: _extends$u({}, It, Ft.ownerState) }, + Nt, + { children: [Ct, kt && jsxRuntimeExports.jsx(ListItemSecondaryAction$1, { children: kt })] }, + ), + ), + }) + ) + }), + ListItem$1 = ListItem, + listItemIconClasses = generateUtilityClasses('MuiListItemIcon', ['root', 'alignItemsFlexStart']), + listItemIconClasses$1 = listItemIconClasses, + listItemTextClasses = generateUtilityClasses('MuiListItemText', [ + 'root', + 'multiline', + 'dense', + 'inset', + 'primary', + 'secondary', + ]), + listItemTextClasses$1 = listItemTextClasses, + _excluded$11 = [ + 'actions', + 'autoFocus', + 'autoFocusItem', + 'children', + 'className', + 'disabledItemsFocusable', + 'disableListWrap', + 'onKeyDown', + 'variant', + ] + function nextItem$1(tt, et, nt) { + return tt === et ? tt.firstChild : et && et.nextElementSibling ? et.nextElementSibling : nt ? null : tt.firstChild + } + function previousItem$1(tt, et, nt) { + return tt === et + ? nt + ? tt.firstChild + : tt.lastChild + : et && et.previousElementSibling + ? et.previousElementSibling + : nt + ? null + : tt.lastChild + } + function textCriteriaMatches(tt, et) { + if (et === void 0) return !0 + let nt = tt.innerText + return ( + nt === void 0 && (nt = tt.textContent), + (nt = nt.trim().toLowerCase()), + nt.length === 0 ? !1 : et.repeating ? nt[0] === et.keys[0] : nt.indexOf(et.keys.join('')) === 0 + ) + } + function moveFocus$1(tt, et, nt, rt, it, ot) { + let at = !1, + st = it(tt, et, et ? nt : !1) + for (; st; ) { + if (st === tt.firstChild) { + if (at) return !1 + at = !0 + } + const lt = rt ? !1 : st.disabled || st.getAttribute('aria-disabled') === 'true' + if (!st.hasAttribute('tabindex') || !textCriteriaMatches(st, ot) || lt) st = it(tt, st, nt) + else return st.focus(), !0 + } + return !1 + } + const MenuList = reactExports.forwardRef(function (et, nt) { + const { + actions: rt, + autoFocus: it = !1, + autoFocusItem: ot = !1, + children: at, + className: st, + disabledItemsFocusable: lt = !1, + disableListWrap: ct = !1, + onKeyDown: ut, + variant: ht = 'selectedMenu', + } = et, + dt = _objectWithoutPropertiesLoose$m(et, _excluded$11), + pt = reactExports.useRef(null), + mt = reactExports.useRef({ keys: [], repeating: !0, previousKeyMatched: !0, lastTime: null }) + useEnhancedEffect$1(() => { + it && pt.current.focus() + }, [it]), + reactExports.useImperativeHandle( + rt, + () => ({ + adjustStyleForScrollbar: (xt, kt) => { + const St = !pt.current.style.width + if (xt.clientHeight < pt.current.clientHeight && St) { + const Tt = `${getScrollbarSize(ownerDocument(xt))}px` + ;(pt.current.style[kt.direction === 'rtl' ? 'paddingLeft' : 'paddingRight'] = Tt), + (pt.current.style.width = `calc(100% + ${Tt})`) + } + return pt.current + }, + }), + [], + ) + const gt = (xt) => { + const kt = pt.current, + St = xt.key, + Tt = ownerDocument(kt).activeElement + if (St === 'ArrowDown') xt.preventDefault(), moveFocus$1(kt, Tt, ct, lt, nextItem$1) + else if (St === 'ArrowUp') xt.preventDefault(), moveFocus$1(kt, Tt, ct, lt, previousItem$1) + else if (St === 'Home') xt.preventDefault(), moveFocus$1(kt, null, ct, lt, nextItem$1) + else if (St === 'End') xt.preventDefault(), moveFocus$1(kt, null, ct, lt, previousItem$1) + else if (St.length === 1) { + const At = mt.current, + Et = St.toLowerCase(), + $t = performance.now() + At.keys.length > 0 && + ($t - At.lastTime > 500 + ? ((At.keys = []), (At.repeating = !0), (At.previousKeyMatched = !0)) + : At.repeating && Et !== At.keys[0] && (At.repeating = !1)), + (At.lastTime = $t), + At.keys.push(Et) + const Dt = Tt && !At.repeating && textCriteriaMatches(Tt, At) + At.previousKeyMatched && (Dt || moveFocus$1(kt, Tt, !1, lt, nextItem$1, At)) + ? xt.preventDefault() + : (At.previousKeyMatched = !1) + } + ut && ut(xt) + }, + yt = useForkRef(pt, nt) + let bt = -1 + reactExports.Children.forEach(at, (xt, kt) => { + if (!reactExports.isValidElement(xt)) { + bt === kt && ((bt += 1), bt >= at.length && (bt = -1)) + return + } + xt.props.disabled || (((ht === 'selectedMenu' && xt.props.selected) || bt === -1) && (bt = kt)), + bt === kt && + (xt.props.disabled || xt.props.muiSkipListHighlight || xt.type.muiSkipListHighlight) && + ((bt += 1), bt >= at.length && (bt = -1)) + }) + const vt = reactExports.Children.map(at, (xt, kt) => { + if (kt === bt) { + const St = {} + return ( + ot && (St.autoFocus = !0), + xt.props.tabIndex === void 0 && ht === 'selectedMenu' && (St.tabIndex = 0), + reactExports.cloneElement(xt, St) + ) + } + return xt + }) + return jsxRuntimeExports.jsx( + List$1, + _extends$u({ role: 'menu', ref: yt, className: st, onKeyDown: gt, tabIndex: it ? 0 : -1 }, dt, { + children: vt, + }), + ) + }), + MenuList$1 = MenuList + function getPopoverUtilityClass(tt) { + return generateUtilityClass('MuiPopover', tt) + } + generateUtilityClasses('MuiPopover', ['root', 'paper']) + const _excluded$10 = ['onEntering'], + _excluded2$e = [ + 'action', + 'anchorEl', + 'anchorOrigin', + 'anchorPosition', + 'anchorReference', + 'children', + 'className', + 'container', + 'elevation', + 'marginThreshold', + 'open', + 'PaperProps', + 'slots', + 'slotProps', + 'transformOrigin', + 'TransitionComponent', + 'transitionDuration', + 'TransitionProps', + 'disableScrollLock', + ], + _excluded3$4 = ['slotProps'] + function getOffsetTop(tt, et) { + let nt = 0 + return ( + typeof et == 'number' ? (nt = et) : et === 'center' ? (nt = tt.height / 2) : et === 'bottom' && (nt = tt.height), + nt + ) + } + function getOffsetLeft(tt, et) { + let nt = 0 + return ( + typeof et == 'number' ? (nt = et) : et === 'center' ? (nt = tt.width / 2) : et === 'right' && (nt = tt.width), nt + ) + } + function getTransformOriginValue(tt) { + return [tt.horizontal, tt.vertical].map((et) => (typeof et == 'number' ? `${et}px` : et)).join(' ') + } + function resolveAnchorEl(tt) { + return typeof tt == 'function' ? tt() : tt + } + const useUtilityClasses$x = (tt) => { + const { classes: et } = tt + return composeClasses({ root: ['root'], paper: ['paper'] }, getPopoverUtilityClass, et) + }, + PopoverRoot = styled$1(Modal$1, { name: 'MuiPopover', slot: 'Root', overridesResolver: (tt, et) => et.root })({}), + PopoverPaper = styled$1(Paper$1, { name: 'MuiPopover', slot: 'Paper', overridesResolver: (tt, et) => et.paper })({ + position: 'absolute', + overflowY: 'auto', + overflowX: 'hidden', + minWidth: 16, + minHeight: 16, + maxWidth: 'calc(100% - 32px)', + maxHeight: 'calc(100% - 32px)', + outline: 0, + }), + Popover = reactExports.forwardRef(function (et, nt) { + var rt, it, ot + const at = useThemeProps({ props: et, name: 'MuiPopover' }), + { + action: st, + anchorEl: lt, + anchorOrigin: ct = { vertical: 'top', horizontal: 'left' }, + anchorPosition: ut, + anchorReference: ht = 'anchorEl', + children: dt, + className: pt, + container: mt, + elevation: gt = 8, + marginThreshold: yt = 16, + open: bt, + PaperProps: vt = {}, + slots: xt, + slotProps: kt, + transformOrigin: St = { vertical: 'top', horizontal: 'left' }, + TransitionComponent: Tt = Grow$1, + transitionDuration: At = 'auto', + TransitionProps: { onEntering: Et } = {}, + disableScrollLock: $t = !1, + } = at, + Dt = _objectWithoutPropertiesLoose$m(at.TransitionProps, _excluded$10), + jt = _objectWithoutPropertiesLoose$m(at, _excluded2$e), + Pt = (rt = kt == null ? void 0 : kt.paper) != null ? rt : vt, + Ct = reactExports.useRef(), + wt = useForkRef(Ct, Pt.ref), + It = _extends$u({}, at, { + anchorOrigin: ct, + anchorReference: ht, + elevation: gt, + marginThreshold: yt, + externalPaperSlotProps: Pt, + transformOrigin: St, + TransitionComponent: Tt, + transitionDuration: At, + TransitionProps: Dt, + }), + Ot = useUtilityClasses$x(It), + Wt = reactExports.useCallback(() => { + if (ht === 'anchorPosition') return ut + const _n = resolveAnchorEl(lt), + $n = (_n && _n.nodeType === 1 ? _n : ownerDocument(Ct.current).body).getBoundingClientRect() + return { top: $n.top + getOffsetTop($n, ct.vertical), left: $n.left + getOffsetLeft($n, ct.horizontal) } + }, [lt, ct.horizontal, ct.vertical, ut, ht]), + zt = reactExports.useCallback( + (_n) => ({ vertical: getOffsetTop(_n, St.vertical), horizontal: getOffsetLeft(_n, St.horizontal) }), + [St.horizontal, St.vertical], + ), + Ft = reactExports.useCallback( + (_n) => { + const Pn = { width: _n.offsetWidth, height: _n.offsetHeight }, + $n = zt(Pn) + if (ht === 'none') return { top: null, left: null, transformOrigin: getTransformOriginValue($n) } + const Nn = Wt() + let Tn = Nn.top - $n.vertical, + cn = Nn.left - $n.horizontal + const mn = Tn + Pn.height, + In = cn + Pn.width, + An = ownerWindow(resolveAnchorEl(lt)), + wn = An.innerHeight - yt, + fn = An.innerWidth - yt + if (yt !== null && Tn < yt) { + const pn = Tn - yt + ;(Tn -= pn), ($n.vertical += pn) + } else if (yt !== null && mn > wn) { + const pn = mn - wn + ;(Tn -= pn), ($n.vertical += pn) + } + if (yt !== null && cn < yt) { + const pn = cn - yt + ;(cn -= pn), ($n.horizontal += pn) + } else if (In > fn) { + const pn = In - fn + ;(cn -= pn), ($n.horizontal += pn) + } + return { + top: `${Math.round(Tn)}px`, + left: `${Math.round(cn)}px`, + transformOrigin: getTransformOriginValue($n), + } + }, + [lt, ht, Wt, zt, yt], + ), + [Nt, Ut] = reactExports.useState(bt), + Mt = reactExports.useCallback(() => { + const _n = Ct.current + if (!_n) return + const Pn = Ft(_n) + Pn.top !== null && (_n.style.top = Pn.top), + Pn.left !== null && (_n.style.left = Pn.left), + (_n.style.transformOrigin = Pn.transformOrigin), + Ut(!0) + }, [Ft]) + reactExports.useEffect( + () => ($t && window.addEventListener('scroll', Mt), () => window.removeEventListener('scroll', Mt)), + [lt, $t, Mt], + ) + const Ht = (_n, Pn) => { + Et && Et(_n, Pn), Mt() + }, + en = () => { + Ut(!1) + } + reactExports.useEffect(() => { + bt && Mt() + }), + reactExports.useImperativeHandle( + st, + () => + bt + ? { + updatePosition: () => { + Mt() + }, + } + : null, + [bt, Mt], + ), + reactExports.useEffect(() => { + if (!bt) return + const _n = debounce$5(() => { + Mt() + }), + Pn = ownerWindow(lt) + return ( + Pn.addEventListener('resize', _n), + () => { + _n.clear(), Pn.removeEventListener('resize', _n) + } + ) + }, [lt, bt, Mt]) + let sn = At + At === 'auto' && !Tt.muiSupportAuto && (sn = void 0) + const Kt = mt || (lt ? ownerDocument(resolveAnchorEl(lt)).body : void 0), + rn = (it = xt == null ? void 0 : xt.root) != null ? it : PopoverRoot, + nn = (ot = xt == null ? void 0 : xt.paper) != null ? ot : PopoverPaper, + hn = useSlotProps({ + elementType: nn, + externalSlotProps: _extends$u({}, Pt, { style: Nt ? Pt.style : _extends$u({}, Pt.style, { opacity: 0 }) }), + additionalProps: { elevation: gt, ref: wt }, + ownerState: It, + className: clsx$3(Ot.paper, Pt == null ? void 0 : Pt.className), + }), + vn = useSlotProps({ + elementType: rn, + externalSlotProps: (kt == null ? void 0 : kt.root) || {}, + externalForwardedProps: jt, + additionalProps: { ref: nt, slotProps: { backdrop: { invisible: !0 } }, container: Kt, open: bt }, + ownerState: It, + className: clsx$3(Ot.root, pt), + }), + { slotProps: an } = vn, + Qt = _objectWithoutPropertiesLoose$m(vn, _excluded3$4) + return jsxRuntimeExports.jsx( + rn, + _extends$u({}, Qt, !isHostComponent(rn) && { slotProps: an, disableScrollLock: $t }, { + children: jsxRuntimeExports.jsx( + Tt, + _extends$u({ appear: !0, in: bt, onEntering: Ht, onExited: en, timeout: sn }, Dt, { + children: jsxRuntimeExports.jsx(nn, _extends$u({}, hn, { children: dt })), + }), + ), + }), + ) + }), + Popover$1 = Popover + function getMenuUtilityClass(tt) { + return generateUtilityClass('MuiMenu', tt) + } + generateUtilityClasses('MuiMenu', ['root', 'paper', 'list']) + const _excluded$$ = ['onEntering'], + _excluded2$d = [ + 'autoFocus', + 'children', + 'className', + 'disableAutoFocusItem', + 'MenuListProps', + 'onClose', + 'open', + 'PaperProps', + 'PopoverClasses', + 'transitionDuration', + 'TransitionProps', + 'variant', + 'slots', + 'slotProps', + ], + RTL_ORIGIN = { vertical: 'top', horizontal: 'right' }, + LTR_ORIGIN = { vertical: 'top', horizontal: 'left' }, + useUtilityClasses$w = (tt) => { + const { classes: et } = tt + return composeClasses({ root: ['root'], paper: ['paper'], list: ['list'] }, getMenuUtilityClass, et) + }, + MenuRoot = styled$1(Popover$1, { + shouldForwardProp: (tt) => rootShouldForwardProp(tt) || tt === 'classes', + name: 'MuiMenu', + slot: 'Root', + overridesResolver: (tt, et) => et.root, + })({}), + MenuPaper = styled$1(PopoverPaper, { name: 'MuiMenu', slot: 'Paper', overridesResolver: (tt, et) => et.paper })({ + maxHeight: 'calc(100% - 96px)', + WebkitOverflowScrolling: 'touch', + }), + MenuMenuList = styled$1(MenuList$1, { name: 'MuiMenu', slot: 'List', overridesResolver: (tt, et) => et.list })({ + outline: 0, + }), + Menu = reactExports.forwardRef(function (et, nt) { + var rt, it + const ot = useThemeProps({ props: et, name: 'MuiMenu' }), + { + autoFocus: at = !0, + children: st, + className: lt, + disableAutoFocusItem: ct = !1, + MenuListProps: ut = {}, + onClose: ht, + open: dt, + PaperProps: pt = {}, + PopoverClasses: mt, + transitionDuration: gt = 'auto', + TransitionProps: { onEntering: yt } = {}, + variant: bt = 'selectedMenu', + slots: vt = {}, + slotProps: xt = {}, + } = ot, + kt = _objectWithoutPropertiesLoose$m(ot.TransitionProps, _excluded$$), + St = _objectWithoutPropertiesLoose$m(ot, _excluded2$d), + Tt = useTheme(), + At = Tt.direction === 'rtl', + Et = _extends$u({}, ot, { + autoFocus: at, + disableAutoFocusItem: ct, + MenuListProps: ut, + onEntering: yt, + PaperProps: pt, + transitionDuration: gt, + TransitionProps: kt, + variant: bt, + }), + $t = useUtilityClasses$w(Et), + Dt = at && !ct && dt, + jt = reactExports.useRef(null), + Pt = (Ft, Nt) => { + jt.current && jt.current.adjustStyleForScrollbar(Ft, Tt), yt && yt(Ft, Nt) + }, + Ct = (Ft) => { + Ft.key === 'Tab' && (Ft.preventDefault(), ht && ht(Ft, 'tabKeyDown')) + } + let wt = -1 + reactExports.Children.map(st, (Ft, Nt) => { + reactExports.isValidElement(Ft) && + (Ft.props.disabled || (((bt === 'selectedMenu' && Ft.props.selected) || wt === -1) && (wt = Nt))) + }) + const It = (rt = vt.paper) != null ? rt : MenuPaper, + Ot = (it = xt.paper) != null ? it : pt, + Wt = useSlotProps({ + elementType: vt.root, + externalSlotProps: xt.root, + ownerState: Et, + className: [$t.root, lt], + }), + zt = useSlotProps({ elementType: It, externalSlotProps: Ot, ownerState: Et, className: $t.paper }) + return jsxRuntimeExports.jsx( + MenuRoot, + _extends$u( + { + onClose: ht, + anchorOrigin: { vertical: 'bottom', horizontal: At ? 'right' : 'left' }, + transformOrigin: At ? RTL_ORIGIN : LTR_ORIGIN, + slots: { paper: It, root: vt.root }, + slotProps: { root: Wt, paper: zt }, + open: dt, + ref: nt, + transitionDuration: gt, + TransitionProps: _extends$u({ onEntering: Pt }, kt), + ownerState: Et, + }, + St, + { + classes: mt, + children: jsxRuntimeExports.jsx( + MenuMenuList, + _extends$u( + { onKeyDown: Ct, actions: jt, autoFocus: at && (wt === -1 || ct), autoFocusItem: Dt, variant: bt }, + ut, + { className: clsx$3($t.list, ut.className), children: st }, + ), + ), + }, + ), + ) + }), + Menu$1 = Menu + function getMenuItemUtilityClass(tt) { + return generateUtilityClass('MuiMenuItem', tt) + } + const menuItemClasses = generateUtilityClasses('MuiMenuItem', [ + 'root', + 'focusVisible', + 'dense', + 'disabled', + 'divider', + 'gutters', + 'selected', + ]), + menuItemClasses$1 = menuItemClasses, + _excluded$_ = [ + 'autoFocus', + 'component', + 'dense', + 'divider', + 'disableGutters', + 'focusVisibleClassName', + 'role', + 'tabIndex', + 'className', + ], + overridesResolver$1 = (tt, et) => { + const { ownerState: nt } = tt + return [et.root, nt.dense && et.dense, nt.divider && et.divider, !nt.disableGutters && et.gutters] + }, + useUtilityClasses$v = (tt) => { + const { disabled: et, dense: nt, divider: rt, disableGutters: it, selected: ot, classes: at } = tt, + lt = composeClasses( + { root: ['root', nt && 'dense', et && 'disabled', !it && 'gutters', rt && 'divider', ot && 'selected'] }, + getMenuItemUtilityClass, + at, + ) + return _extends$u({}, at, lt) + }, + MenuItemRoot = styled$1(ButtonBase$1, { + shouldForwardProp: (tt) => rootShouldForwardProp(tt) || tt === 'classes', + name: 'MuiMenuItem', + slot: 'Root', + overridesResolver: overridesResolver$1, + })(({ theme: tt, ownerState: et }) => + _extends$u( + {}, + tt.typography.body1, + { + display: 'flex', + justifyContent: 'flex-start', + alignItems: 'center', + position: 'relative', + textDecoration: 'none', + minHeight: 48, + paddingTop: 6, + paddingBottom: 6, + boxSizing: 'border-box', + whiteSpace: 'nowrap', + }, + !et.disableGutters && { paddingLeft: 16, paddingRight: 16 }, + et.divider && { borderBottom: `1px solid ${(tt.vars || tt).palette.divider}`, backgroundClip: 'padding-box' }, + { + '&:hover': { + textDecoration: 'none', + backgroundColor: (tt.vars || tt).palette.action.hover, + '@media (hover: none)': { backgroundColor: 'transparent' }, + }, + [`&.${menuItemClasses$1.selected}`]: { + backgroundColor: tt.vars + ? `rgba(${tt.vars.palette.primary.mainChannel} / ${tt.vars.palette.action.selectedOpacity})` + : alpha$1(tt.palette.primary.main, tt.palette.action.selectedOpacity), + [`&.${menuItemClasses$1.focusVisible}`]: { + backgroundColor: tt.vars + ? `rgba(${tt.vars.palette.primary.mainChannel} / calc(${tt.vars.palette.action.selectedOpacity} + ${tt.vars.palette.action.focusOpacity}))` + : alpha$1(tt.palette.primary.main, tt.palette.action.selectedOpacity + tt.palette.action.focusOpacity), + }, + }, + [`&.${menuItemClasses$1.selected}:hover`]: { + backgroundColor: tt.vars + ? `rgba(${tt.vars.palette.primary.mainChannel} / calc(${tt.vars.palette.action.selectedOpacity} + ${tt.vars.palette.action.hoverOpacity}))` + : alpha$1(tt.palette.primary.main, tt.palette.action.selectedOpacity + tt.palette.action.hoverOpacity), + '@media (hover: none)': { + backgroundColor: tt.vars + ? `rgba(${tt.vars.palette.primary.mainChannel} / ${tt.vars.palette.action.selectedOpacity})` + : alpha$1(tt.palette.primary.main, tt.palette.action.selectedOpacity), + }, + }, + [`&.${menuItemClasses$1.focusVisible}`]: { backgroundColor: (tt.vars || tt).palette.action.focus }, + [`&.${menuItemClasses$1.disabled}`]: { opacity: (tt.vars || tt).palette.action.disabledOpacity }, + [`& + .${dividerClasses.root}`]: { marginTop: tt.spacing(1), marginBottom: tt.spacing(1) }, + [`& + .${dividerClasses.inset}`]: { marginLeft: 52 }, + [`& .${listItemTextClasses$1.root}`]: { marginTop: 0, marginBottom: 0 }, + [`& .${listItemTextClasses$1.inset}`]: { paddingLeft: 36 }, + [`& .${listItemIconClasses$1.root}`]: { minWidth: 36 }, + }, + !et.dense && { [tt.breakpoints.up('sm')]: { minHeight: 'auto' } }, + et.dense && + _extends$u({ minHeight: 32, paddingTop: 4, paddingBottom: 4 }, tt.typography.body2, { + [`& .${listItemIconClasses$1.root} svg`]: { fontSize: '1.25rem' }, + }), + ), + ), + MenuItem = reactExports.forwardRef(function (et, nt) { + const rt = useThemeProps({ props: et, name: 'MuiMenuItem' }), + { + autoFocus: it = !1, + component: ot = 'li', + dense: at = !1, + divider: st = !1, + disableGutters: lt = !1, + focusVisibleClassName: ct, + role: ut = 'menuitem', + tabIndex: ht, + className: dt, + } = rt, + pt = _objectWithoutPropertiesLoose$m(rt, _excluded$_), + mt = reactExports.useContext(ListContext$1), + gt = reactExports.useMemo(() => ({ dense: at || mt.dense || !1, disableGutters: lt }), [mt.dense, at, lt]), + yt = reactExports.useRef(null) + useEnhancedEffect$1(() => { + it && yt.current && yt.current.focus() + }, [it]) + const bt = _extends$u({}, rt, { dense: gt.dense, divider: st, disableGutters: lt }), + vt = useUtilityClasses$v(rt), + xt = useForkRef(yt, nt) + let kt + return ( + rt.disabled || (kt = ht !== void 0 ? ht : -1), + jsxRuntimeExports.jsx(ListContext$1.Provider, { + value: gt, + children: jsxRuntimeExports.jsx( + MenuItemRoot, + _extends$u( + { + ref: xt, + role: ut, + tabIndex: kt, + component: ot, + focusVisibleClassName: clsx$3(vt.focusVisible, ct), + className: clsx$3(vt.root, dt), + }, + pt, + { ownerState: bt, classes: vt }, + ), + ), + }) + ) + }), + MenuItem$1 = MenuItem + function getNativeSelectUtilityClasses(tt) { + return generateUtilityClass('MuiNativeSelect', tt) + } + const nativeSelectClasses = generateUtilityClasses('MuiNativeSelect', [ + 'root', + 'select', + 'multiple', + 'filled', + 'outlined', + 'standard', + 'disabled', + 'icon', + 'iconOpen', + 'iconFilled', + 'iconOutlined', + 'iconStandard', + 'nativeInput', + 'error', + ]), + nativeSelectClasses$1 = nativeSelectClasses, + _excluded$Z = ['className', 'disabled', 'error', 'IconComponent', 'inputRef', 'variant'], + useUtilityClasses$u = (tt) => { + const { classes: et, variant: nt, disabled: rt, multiple: it, open: ot, error: at } = tt, + st = { + select: ['select', nt, rt && 'disabled', it && 'multiple', at && 'error'], + icon: ['icon', `icon${capitalize(nt)}`, ot && 'iconOpen', rt && 'disabled'], + } + return composeClasses(st, getNativeSelectUtilityClasses, et) + }, + nativeSelectSelectStyles = ({ ownerState: tt, theme: et }) => + _extends$u( + { + MozAppearance: 'none', + WebkitAppearance: 'none', + userSelect: 'none', + borderRadius: 0, + cursor: 'pointer', + '&:focus': _extends$u( + {}, + et.vars + ? { backgroundColor: `rgba(${et.vars.palette.common.onBackgroundChannel} / 0.05)` } + : { backgroundColor: et.palette.mode === 'light' ? 'rgba(0, 0, 0, 0.05)' : 'rgba(255, 255, 255, 0.05)' }, + { borderRadius: 0 }, + ), + '&::-ms-expand': { display: 'none' }, + [`&.${nativeSelectClasses$1.disabled}`]: { cursor: 'default' }, + '&[multiple]': { height: 'auto' }, + '&:not([multiple]) option, &:not([multiple]) optgroup': { + backgroundColor: (et.vars || et).palette.background.paper, + }, + '&&&': { paddingRight: 24, minWidth: 16 }, + }, + tt.variant === 'filled' && { '&&&': { paddingRight: 32 } }, + tt.variant === 'outlined' && { + borderRadius: (et.vars || et).shape.borderRadius, + '&:focus': { borderRadius: (et.vars || et).shape.borderRadius }, + '&&&': { paddingRight: 32 }, + }, + ), + NativeSelectSelect = styled$1('select', { + name: 'MuiNativeSelect', + slot: 'Select', + shouldForwardProp: rootShouldForwardProp, + overridesResolver: (tt, et) => { + const { ownerState: nt } = tt + return [ + et.select, + et[nt.variant], + nt.error && et.error, + { [`&.${nativeSelectClasses$1.multiple}`]: et.multiple }, + ] + }, + })(nativeSelectSelectStyles), + nativeSelectIconStyles = ({ ownerState: tt, theme: et }) => + _extends$u( + { + position: 'absolute', + right: 0, + top: 'calc(50% - .5em)', + pointerEvents: 'none', + color: (et.vars || et).palette.action.active, + [`&.${nativeSelectClasses$1.disabled}`]: { color: (et.vars || et).palette.action.disabled }, + }, + tt.open && { transform: 'rotate(180deg)' }, + tt.variant === 'filled' && { right: 7 }, + tt.variant === 'outlined' && { right: 7 }, + ), + NativeSelectIcon = styled$1('svg', { + name: 'MuiNativeSelect', + slot: 'Icon', + overridesResolver: (tt, et) => { + const { ownerState: nt } = tt + return [et.icon, nt.variant && et[`icon${capitalize(nt.variant)}`], nt.open && et.iconOpen] + }, + })(nativeSelectIconStyles), + NativeSelectInput = reactExports.forwardRef(function (et, nt) { + const { className: rt, disabled: it, error: ot, IconComponent: at, inputRef: st, variant: lt = 'standard' } = et, + ct = _objectWithoutPropertiesLoose$m(et, _excluded$Z), + ut = _extends$u({}, et, { disabled: it, variant: lt, error: ot }), + ht = useUtilityClasses$u(ut) + return jsxRuntimeExports.jsxs(reactExports.Fragment, { + children: [ + jsxRuntimeExports.jsx( + NativeSelectSelect, + _extends$u({ ownerState: ut, className: clsx$3(ht.select, rt), disabled: it, ref: st || nt }, ct), + ), + et.multiple ? null : jsxRuntimeExports.jsx(NativeSelectIcon, { as: at, ownerState: ut, className: ht.icon }), + ], + }) + }), + NativeSelectInput$1 = NativeSelectInput + var _span$1 + const _excluded$Y = ['children', 'classes', 'className', 'label', 'notched'], + NotchedOutlineRoot$1 = styled$1('fieldset')({ + textAlign: 'left', + position: 'absolute', + bottom: 0, + right: 0, + top: -5, + left: 0, + margin: 0, + padding: '0 8px', + pointerEvents: 'none', + borderRadius: 'inherit', + borderStyle: 'solid', + borderWidth: 1, + overflow: 'hidden', + minWidth: '0%', + }), + NotchedOutlineLegend = styled$1('legend')(({ ownerState: tt, theme: et }) => + _extends$u( + { float: 'unset', width: 'auto', overflow: 'hidden' }, + !tt.withLabel && { + padding: 0, + lineHeight: '11px', + transition: et.transitions.create('width', { duration: 150, easing: et.transitions.easing.easeOut }), + }, + tt.withLabel && + _extends$u( + { + display: 'block', + padding: 0, + height: 11, + fontSize: '0.75em', + visibility: 'hidden', + maxWidth: 0.01, + transition: et.transitions.create('max-width', { duration: 50, easing: et.transitions.easing.easeOut }), + whiteSpace: 'nowrap', + '& > span': { + paddingLeft: 5, + paddingRight: 5, + display: 'inline-block', + opacity: 0, + visibility: 'visible', + }, + }, + tt.notched && { + maxWidth: '100%', + transition: et.transitions.create('max-width', { + duration: 100, + easing: et.transitions.easing.easeOut, + delay: 50, + }), + }, + ), + ), + ) + function NotchedOutline(tt) { + const { className: et, label: nt, notched: rt } = tt, + it = _objectWithoutPropertiesLoose$m(tt, _excluded$Y), + ot = nt != null && nt !== '', + at = _extends$u({}, tt, { notched: rt, withLabel: ot }) + return jsxRuntimeExports.jsx( + NotchedOutlineRoot$1, + _extends$u({ 'aria-hidden': !0, className: et, ownerState: at }, it, { + children: jsxRuntimeExports.jsx(NotchedOutlineLegend, { + ownerState: at, + children: ot + ? jsxRuntimeExports.jsx('span', { children: nt }) + : _span$1 || (_span$1 = jsxRuntimeExports.jsx('span', { className: 'notranslate', children: '​' })), + }), + }), + ) + } + const _excluded$X = ['components', 'fullWidth', 'inputComponent', 'label', 'multiline', 'notched', 'slots', 'type'], + useUtilityClasses$t = (tt) => { + const { classes: et } = tt, + rt = composeClasses( + { root: ['root'], notchedOutline: ['notchedOutline'], input: ['input'] }, + getOutlinedInputUtilityClass, + et, + ) + return _extends$u({}, et, rt) + }, + OutlinedInputRoot = styled$1(InputBaseRoot, { + shouldForwardProp: (tt) => rootShouldForwardProp(tt) || tt === 'classes', + name: 'MuiOutlinedInput', + slot: 'Root', + overridesResolver: rootOverridesResolver, + })(({ theme: tt, ownerState: et }) => { + const nt = tt.palette.mode === 'light' ? 'rgba(0, 0, 0, 0.23)' : 'rgba(255, 255, 255, 0.23)' + return _extends$u( + { + position: 'relative', + borderRadius: (tt.vars || tt).shape.borderRadius, + [`&:hover .${outlinedInputClasses$1.notchedOutline}`]: { borderColor: (tt.vars || tt).palette.text.primary }, + '@media (hover: none)': { + [`&:hover .${outlinedInputClasses$1.notchedOutline}`]: { + borderColor: tt.vars ? `rgba(${tt.vars.palette.common.onBackgroundChannel} / 0.23)` : nt, + }, + }, + [`&.${outlinedInputClasses$1.focused} .${outlinedInputClasses$1.notchedOutline}`]: { + borderColor: (tt.vars || tt).palette[et.color].main, + borderWidth: 2, + }, + [`&.${outlinedInputClasses$1.error} .${outlinedInputClasses$1.notchedOutline}`]: { + borderColor: (tt.vars || tt).palette.error.main, + }, + [`&.${outlinedInputClasses$1.disabled} .${outlinedInputClasses$1.notchedOutline}`]: { + borderColor: (tt.vars || tt).palette.action.disabled, + }, + }, + et.startAdornment && { paddingLeft: 14 }, + et.endAdornment && { paddingRight: 14 }, + et.multiline && _extends$u({ padding: '16.5px 14px' }, et.size === 'small' && { padding: '8.5px 14px' }), + ) + }), + NotchedOutlineRoot = styled$1(NotchedOutline, { + name: 'MuiOutlinedInput', + slot: 'NotchedOutline', + overridesResolver: (tt, et) => et.notchedOutline, + })(({ theme: tt }) => { + const et = tt.palette.mode === 'light' ? 'rgba(0, 0, 0, 0.23)' : 'rgba(255, 255, 255, 0.23)' + return { borderColor: tt.vars ? `rgba(${tt.vars.palette.common.onBackgroundChannel} / 0.23)` : et } + }), + OutlinedInputInput = styled$1(InputBaseComponent, { + name: 'MuiOutlinedInput', + slot: 'Input', + overridesResolver: inputOverridesResolver, + })(({ theme: tt, ownerState: et }) => + _extends$u( + { padding: '16.5px 14px' }, + !tt.vars && { + '&:-webkit-autofill': { + WebkitBoxShadow: tt.palette.mode === 'light' ? null : '0 0 0 100px #266798 inset', + WebkitTextFillColor: tt.palette.mode === 'light' ? null : '#fff', + caretColor: tt.palette.mode === 'light' ? null : '#fff', + borderRadius: 'inherit', + }, + }, + tt.vars && { + '&:-webkit-autofill': { borderRadius: 'inherit' }, + [tt.getColorSchemeSelector('dark')]: { + '&:-webkit-autofill': { + WebkitBoxShadow: '0 0 0 100px #266798 inset', + WebkitTextFillColor: '#fff', + caretColor: '#fff', + }, + }, + }, + et.size === 'small' && { padding: '8.5px 14px' }, + et.multiline && { padding: 0 }, + et.startAdornment && { paddingLeft: 0 }, + et.endAdornment && { paddingRight: 0 }, + ), + ), + OutlinedInput = reactExports.forwardRef(function (et, nt) { + var rt, it, ot, at, st + const lt = useThemeProps({ props: et, name: 'MuiOutlinedInput' }), + { + components: ct = {}, + fullWidth: ut = !1, + inputComponent: ht = 'input', + label: dt, + multiline: pt = !1, + notched: mt, + slots: gt = {}, + type: yt = 'text', + } = lt, + bt = _objectWithoutPropertiesLoose$m(lt, _excluded$X), + vt = useUtilityClasses$t(lt), + xt = useFormControl(), + kt = formControlState({ + props: lt, + muiFormControl: xt, + states: ['color', 'disabled', 'error', 'focused', 'hiddenLabel', 'size', 'required'], + }), + St = _extends$u({}, lt, { + color: kt.color || 'primary', + disabled: kt.disabled, + error: kt.error, + focused: kt.focused, + formControl: xt, + fullWidth: ut, + hiddenLabel: kt.hiddenLabel, + multiline: pt, + size: kt.size, + type: yt, + }), + Tt = (rt = (it = gt.root) != null ? it : ct.Root) != null ? rt : OutlinedInputRoot, + At = (ot = (at = gt.input) != null ? at : ct.Input) != null ? ot : OutlinedInputInput + return jsxRuntimeExports.jsx( + InputBase$1, + _extends$u( + { + slots: { root: Tt, input: At }, + renderSuffix: (Et) => + jsxRuntimeExports.jsx(NotchedOutlineRoot, { + ownerState: St, + className: vt.notchedOutline, + label: + dt != null && dt !== '' && kt.required + ? st || (st = jsxRuntimeExports.jsxs(reactExports.Fragment, { children: [dt, ' ', '*'] })) + : dt, + notched: typeof mt < 'u' ? mt : !!(Et.startAdornment || Et.filled || Et.focused), + }), + fullWidth: ut, + inputComponent: ht, + multiline: pt, + ref: nt, + type: yt, + }, + bt, + { classes: _extends$u({}, vt, { notchedOutline: null }) }, + ), + ) + }) + OutlinedInput.muiName = 'Input' + const OutlinedInput$1 = OutlinedInput + function getSelectUtilityClasses(tt) { + return generateUtilityClass('MuiSelect', tt) + } + const selectClasses = generateUtilityClasses('MuiSelect', [ + 'root', + 'select', + 'multiple', + 'filled', + 'outlined', + 'standard', + 'disabled', + 'focused', + 'icon', + 'iconOpen', + 'iconFilled', + 'iconOutlined', + 'iconStandard', + 'nativeInput', + 'error', + ]), + selectClasses$1 = selectClasses + var _span + const _excluded$W = [ + 'aria-describedby', + 'aria-label', + 'autoFocus', + 'autoWidth', + 'children', + 'className', + 'defaultOpen', + 'defaultValue', + 'disabled', + 'displayEmpty', + 'error', + 'IconComponent', + 'inputRef', + 'labelId', + 'MenuProps', + 'multiple', + 'name', + 'onBlur', + 'onChange', + 'onClose', + 'onFocus', + 'onOpen', + 'open', + 'readOnly', + 'renderValue', + 'SelectDisplayProps', + 'tabIndex', + 'type', + 'value', + 'variant', + ], + SelectSelect = styled$1('div', { + name: 'MuiSelect', + slot: 'Select', + overridesResolver: (tt, et) => { + const { ownerState: nt } = tt + return [ + { [`&.${selectClasses$1.select}`]: et.select }, + { [`&.${selectClasses$1.select}`]: et[nt.variant] }, + { [`&.${selectClasses$1.error}`]: et.error }, + { [`&.${selectClasses$1.multiple}`]: et.multiple }, + ] + }, + })(nativeSelectSelectStyles, { + [`&.${selectClasses$1.select}`]: { + height: 'auto', + minHeight: '1.4375em', + textOverflow: 'ellipsis', + whiteSpace: 'nowrap', + overflow: 'hidden', + }, + }), + SelectIcon = styled$1('svg', { + name: 'MuiSelect', + slot: 'Icon', + overridesResolver: (tt, et) => { + const { ownerState: nt } = tt + return [et.icon, nt.variant && et[`icon${capitalize(nt.variant)}`], nt.open && et.iconOpen] + }, + })(nativeSelectIconStyles), + SelectNativeInput = styled$1('input', { + shouldForwardProp: (tt) => slotShouldForwardProp(tt) && tt !== 'classes', + name: 'MuiSelect', + slot: 'NativeInput', + overridesResolver: (tt, et) => et.nativeInput, + })({ + bottom: 0, + left: 0, + position: 'absolute', + opacity: 0, + pointerEvents: 'none', + width: '100%', + boxSizing: 'border-box', + }) + function areEqualValues(tt, et) { + return typeof et == 'object' && et !== null ? tt === et : String(tt) === String(et) + } + function isEmpty(tt) { + return tt == null || (typeof tt == 'string' && !tt.trim()) + } + const useUtilityClasses$s = (tt) => { + const { classes: et, variant: nt, disabled: rt, multiple: it, open: ot, error: at } = tt, + st = { + select: ['select', nt, rt && 'disabled', it && 'multiple', at && 'error'], + icon: ['icon', `icon${capitalize(nt)}`, ot && 'iconOpen', rt && 'disabled'], + nativeInput: ['nativeInput'], + } + return composeClasses(st, getSelectUtilityClasses, et) + }, + SelectInput = reactExports.forwardRef(function (et, nt) { + var rt + const { + 'aria-describedby': it, + 'aria-label': ot, + autoFocus: at, + autoWidth: st, + children: lt, + className: ct, + defaultOpen: ut, + defaultValue: ht, + disabled: dt, + displayEmpty: pt, + error: mt = !1, + IconComponent: gt, + inputRef: yt, + labelId: bt, + MenuProps: vt = {}, + multiple: xt, + name: kt, + onBlur: St, + onChange: Tt, + onClose: At, + onFocus: Et, + onOpen: $t, + open: Dt, + readOnly: jt, + renderValue: Pt, + SelectDisplayProps: Ct = {}, + tabIndex: wt, + value: It, + variant: Ot = 'standard', + } = et, + Wt = _objectWithoutPropertiesLoose$m(et, _excluded$W), + [zt, Ft] = useControlled({ controlled: It, default: ht, name: 'Select' }), + [Nt, Ut] = useControlled({ controlled: Dt, default: ut, name: 'Select' }), + Mt = reactExports.useRef(null), + Ht = reactExports.useRef(null), + [en, sn] = reactExports.useState(null), + { current: Kt } = reactExports.useRef(Dt != null), + [rn, nn] = reactExports.useState(), + hn = useForkRef(nt, yt), + vn = reactExports.useCallback((On) => { + ;(Ht.current = On), On && sn(On) + }, []), + an = en == null ? void 0 : en.parentNode + reactExports.useImperativeHandle( + hn, + () => ({ + focus: () => { + Ht.current.focus() + }, + node: Mt.current, + value: zt, + }), + [zt], + ), + reactExports.useEffect(() => { + ut && Nt && en && !Kt && (nn(st ? null : an.clientWidth), Ht.current.focus()) + }, [en, st]), + reactExports.useEffect(() => { + at && Ht.current.focus() + }, [at]), + reactExports.useEffect(() => { + if (!bt) return + const On = ownerDocument(Ht.current).getElementById(bt) + if (On) { + const Zn = () => { + getSelection().isCollapsed && Ht.current.focus() + } + return ( + On.addEventListener('click', Zn), + () => { + On.removeEventListener('click', Zn) + } + ) + } + }, [bt]) + const Qt = (On, Zn) => { + On ? $t && $t(Zn) : At && At(Zn), Kt || (nn(st ? null : an.clientWidth), Ut(On)) + }, + _n = (On) => { + On.button === 0 && (On.preventDefault(), Ht.current.focus(), Qt(!0, On)) + }, + Pn = (On) => { + Qt(!1, On) + }, + $n = reactExports.Children.toArray(lt), + Nn = (On) => { + const Zn = $n.find((Vn) => Vn.props.value === On.target.value) + Zn !== void 0 && (Ft(Zn.props.value), Tt && Tt(On, Zn)) + }, + Tn = (On) => (Zn) => { + let Vn + if (Zn.currentTarget.hasAttribute('tabindex')) { + if (xt) { + Vn = Array.isArray(zt) ? zt.slice() : [] + const qn = zt.indexOf(On.props.value) + qn === -1 ? Vn.push(On.props.value) : Vn.splice(qn, 1) + } else Vn = On.props.value + if ((On.props.onClick && On.props.onClick(Zn), zt !== Vn && (Ft(Vn), Tt))) { + const qn = Zn.nativeEvent || Zn, + zn = new qn.constructor(qn.type, qn) + Object.defineProperty(zn, 'target', { writable: !0, value: { value: Vn, name: kt } }), Tt(zn, On) + } + xt || Qt(!1, Zn) + } + }, + cn = (On) => { + jt || ([' ', 'ArrowUp', 'ArrowDown', 'Enter'].indexOf(On.key) !== -1 && (On.preventDefault(), Qt(!0, On))) + }, + mn = en !== null && Nt, + In = (On) => { + !mn && St && (Object.defineProperty(On, 'target', { writable: !0, value: { value: zt, name: kt } }), St(On)) + } + delete Wt['aria-invalid'] + let An, wn + const fn = [] + let pn = !1 + ;(isFilled({ value: zt }) || pt) && (Pt ? (An = Pt(zt)) : (pn = !0)) + const kn = $n.map((On) => { + if (!reactExports.isValidElement(On)) return null + let Zn + if (xt) { + if (!Array.isArray(zt)) throw new Error(formatMuiErrorMessage(2)) + ;(Zn = zt.some((Vn) => areEqualValues(Vn, On.props.value))), Zn && pn && fn.push(On.props.children) + } else (Zn = areEqualValues(zt, On.props.value)), Zn && pn && (wn = On.props.children) + return reactExports.cloneElement(On, { + 'aria-selected': Zn ? 'true' : 'false', + onClick: Tn(On), + onKeyUp: (Vn) => { + Vn.key === ' ' && Vn.preventDefault(), On.props.onKeyUp && On.props.onKeyUp(Vn) + }, + role: 'option', + selected: Zn, + value: void 0, + 'data-value': On.props.value, + }) + }) + pn && + (xt + ? fn.length === 0 + ? (An = null) + : (An = fn.reduce((On, Zn, Vn) => (On.push(Zn), Vn < fn.length - 1 && On.push(', '), On), [])) + : (An = wn)) + let Dn = rn + !st && Kt && en && (Dn = an.clientWidth) + let un + typeof wt < 'u' ? (un = wt) : (un = dt ? null : 0) + const Zt = Ct.id || (kt ? `mui-component-select-${kt}` : void 0), + Xt = _extends$u({}, et, { variant: Ot, value: zt, open: mn, error: mt }), + Sn = useUtilityClasses$s(Xt), + Rn = _extends$u({}, vt.PaperProps, (rt = vt.slotProps) == null ? void 0 : rt.paper), + jn = useId() + return jsxRuntimeExports.jsxs(reactExports.Fragment, { + children: [ + jsxRuntimeExports.jsx( + SelectSelect, + _extends$u( + { + ref: vn, + tabIndex: un, + role: 'combobox', + 'aria-controls': jn, + 'aria-disabled': dt ? 'true' : void 0, + 'aria-expanded': mn ? 'true' : 'false', + 'aria-haspopup': 'listbox', + 'aria-label': ot, + 'aria-labelledby': [bt, Zt].filter(Boolean).join(' ') || void 0, + 'aria-describedby': it, + onKeyDown: cn, + onMouseDown: dt || jt ? null : _n, + onBlur: In, + onFocus: Et, + }, + Ct, + { + ownerState: Xt, + className: clsx$3(Ct.className, Sn.select, ct), + id: Zt, + children: isEmpty(An) + ? _span || (_span = jsxRuntimeExports.jsx('span', { className: 'notranslate', children: '​' })) + : An, + }, + ), + ), + jsxRuntimeExports.jsx( + SelectNativeInput, + _extends$u( + { + 'aria-invalid': mt, + value: Array.isArray(zt) ? zt.join(',') : zt, + name: kt, + ref: Mt, + 'aria-hidden': !0, + onChange: Nn, + tabIndex: -1, + disabled: dt, + className: Sn.nativeInput, + autoFocus: at, + ownerState: Xt, + }, + Wt, + ), + ), + jsxRuntimeExports.jsx(SelectIcon, { as: gt, className: Sn.icon, ownerState: Xt }), + jsxRuntimeExports.jsx( + Menu$1, + _extends$u( + { + id: `menu-${kt || ''}`, + anchorEl: an, + open: mn, + onClose: Pn, + anchorOrigin: { vertical: 'bottom', horizontal: 'center' }, + transformOrigin: { vertical: 'top', horizontal: 'center' }, + }, + vt, + { + MenuListProps: _extends$u( + { + 'aria-labelledby': bt, + role: 'listbox', + 'aria-multiselectable': xt ? 'true' : void 0, + disableListWrap: !0, + id: jn, + }, + vt.MenuListProps, + ), + slotProps: _extends$u({}, vt.slotProps, { + paper: _extends$u({}, Rn, { style: _extends$u({ minWidth: Dn }, Rn != null ? Rn.style : null) }), + }), + children: kn, + }, + ), + ), + ], + }) + }), + SelectInput$1 = SelectInput, + _excluded$V = [ + 'autoWidth', + 'children', + 'classes', + 'className', + 'defaultOpen', + 'displayEmpty', + 'IconComponent', + 'id', + 'input', + 'inputProps', + 'label', + 'labelId', + 'MenuProps', + 'multiple', + 'native', + 'onClose', + 'onOpen', + 'open', + 'renderValue', + 'SelectDisplayProps', + 'variant', + ], + _excluded2$c = ['root'], + useUtilityClasses$r = (tt) => { + const { classes: et } = tt + return et + }, + styledRootConfig = { + name: 'MuiSelect', + overridesResolver: (tt, et) => et.root, + shouldForwardProp: (tt) => rootShouldForwardProp(tt) && tt !== 'variant', + slot: 'Root', + }, + StyledInput$1 = styled$1(Input$3, styledRootConfig)(''), + StyledOutlinedInput = styled$1(OutlinedInput$1, styledRootConfig)(''), + StyledFilledInput = styled$1(FilledInput$1, styledRootConfig)(''), + Select$3 = reactExports.forwardRef(function (et, nt) { + const rt = useThemeProps({ name: 'MuiSelect', props: et }), + { + autoWidth: it = !1, + children: ot, + classes: at = {}, + className: st, + defaultOpen: lt = !1, + displayEmpty: ct = !1, + IconComponent: ut = ArrowDropDownIcon$1, + id: ht, + input: dt, + inputProps: pt, + label: mt, + labelId: gt, + MenuProps: yt, + multiple: bt = !1, + native: vt = !1, + onClose: xt, + onOpen: kt, + open: St, + renderValue: Tt, + SelectDisplayProps: At, + variant: Et = 'outlined', + } = rt, + $t = _objectWithoutPropertiesLoose$m(rt, _excluded$V), + Dt = vt ? NativeSelectInput$1 : SelectInput$1, + jt = useFormControl(), + Pt = formControlState({ props: rt, muiFormControl: jt, states: ['variant', 'error'] }), + Ct = Pt.variant || Et, + wt = _extends$u({}, rt, { variant: Ct, classes: at }), + It = useUtilityClasses$r(wt), + Ot = _objectWithoutPropertiesLoose$m(It, _excluded2$c), + Wt = + dt || + { + standard: jsxRuntimeExports.jsx(StyledInput$1, { ownerState: wt }), + outlined: jsxRuntimeExports.jsx(StyledOutlinedInput, { label: mt, ownerState: wt }), + filled: jsxRuntimeExports.jsx(StyledFilledInput, { ownerState: wt }), + }[Ct], + zt = useForkRef(nt, Wt.ref) + return jsxRuntimeExports.jsx(reactExports.Fragment, { + children: reactExports.cloneElement( + Wt, + _extends$u( + { + inputComponent: Dt, + inputProps: _extends$u( + { children: ot, error: Pt.error, IconComponent: ut, variant: Ct, type: void 0, multiple: bt }, + vt + ? { id: ht } + : { + autoWidth: it, + defaultOpen: lt, + displayEmpty: ct, + labelId: gt, + MenuProps: yt, + onClose: xt, + onOpen: kt, + open: St, + renderValue: Tt, + SelectDisplayProps: _extends$u({ id: ht }, At), + }, + pt, + { classes: pt ? deepmerge$1(Ot, pt.classes) : Ot }, + dt ? dt.props.inputProps : {}, + ), + }, + bt && vt && Ct === 'outlined' ? { notched: !0 } : {}, + { ref: zt, className: clsx$3(Wt.props.className, st, It.root) }, + !dt && { variant: Ct }, + $t, + ), + ), + }) + }) + Select$3.muiName = 'Select' + const Select$4 = Select$3 + function getSkeletonUtilityClass(tt) { + return generateUtilityClass('MuiSkeleton', tt) + } + generateUtilityClasses('MuiSkeleton', [ + 'root', + 'text', + 'rectangular', + 'rounded', + 'circular', + 'pulse', + 'wave', + 'withChildren', + 'fitContent', + 'heightAuto', + ]) + const _excluded$U = ['animation', 'className', 'component', 'height', 'style', 'variant', 'width'] + let _ = (tt) => tt, + _t, + _t2, + _t3, + _t4 + const useUtilityClasses$q = (tt) => { + const { classes: et, variant: nt, animation: rt, hasChildren: it, width: ot, height: at } = tt + return composeClasses( + { root: ['root', nt, rt, it && 'withChildren', it && !ot && 'fitContent', it && !at && 'heightAuto'] }, + getSkeletonUtilityClass, + et, + ) + }, + pulseKeyframe = keyframes( + _t || + (_t = _` + 0% { + opacity: 1; + } + + 50% { + opacity: 0.4; + } + + 100% { + opacity: 1; + } +`), + ), + waveKeyframe = keyframes( + _t2 || + (_t2 = _` + 0% { + transform: translateX(-100%); + } + + 50% { + /* +0.5s of delay between each loop */ + transform: translateX(100%); + } + + 100% { + transform: translateX(100%); + } +`), + ), + SkeletonRoot = styled$1('span', { + name: 'MuiSkeleton', + slot: 'Root', + overridesResolver: (tt, et) => { + const { ownerState: nt } = tt + return [ + et.root, + et[nt.variant], + nt.animation !== !1 && et[nt.animation], + nt.hasChildren && et.withChildren, + nt.hasChildren && !nt.width && et.fitContent, + nt.hasChildren && !nt.height && et.heightAuto, + ] + }, + })( + ({ theme: tt, ownerState: et }) => { + const nt = getUnit$1(tt.shape.borderRadius) || 'px', + rt = toUnitless(tt.shape.borderRadius) + return _extends$u( + { + display: 'block', + backgroundColor: tt.vars + ? tt.vars.palette.Skeleton.bg + : alpha$1(tt.palette.text.primary, tt.palette.mode === 'light' ? 0.11 : 0.13), + height: '1.2em', + }, + et.variant === 'text' && { + marginTop: 0, + marginBottom: 0, + height: 'auto', + transformOrigin: '0 55%', + transform: 'scale(1, 0.60)', + borderRadius: `${rt}${nt}/${Math.round((rt / 0.6) * 10) / 10}${nt}`, + '&:empty:before': { content: '"\\00a0"' }, + }, + et.variant === 'circular' && { borderRadius: '50%' }, + et.variant === 'rounded' && { borderRadius: (tt.vars || tt).shape.borderRadius }, + et.hasChildren && { '& > *': { visibility: 'hidden' } }, + et.hasChildren && !et.width && { maxWidth: 'fit-content' }, + et.hasChildren && !et.height && { height: 'auto' }, + ) + }, + ({ ownerState: tt }) => + tt.animation === 'pulse' && + css( + _t3 || + (_t3 = _` + animation: ${0} 2s ease-in-out 0.5s infinite; + `), + pulseKeyframe, + ), + ({ ownerState: tt, theme: et }) => + tt.animation === 'wave' && + css( + _t4 || + (_t4 = _` + position: relative; + overflow: hidden; + + /* Fix bug in Safari https://bugs.webkit.org/show_bug.cgi?id=68196 */ + -webkit-mask-image: -webkit-radial-gradient(white, black); + + &::after { + animation: ${0} 2s linear 0.5s infinite; + background: linear-gradient( + 90deg, + transparent, + ${0}, + transparent + ); + content: ''; + position: absolute; + transform: translateX(-100%); /* Avoid flash during server-side hydration */ + bottom: 0; + left: 0; + right: 0; + top: 0; + } + `), + waveKeyframe, + (et.vars || et).palette.action.hover, + ), + ), + Skeleton$1 = reactExports.forwardRef(function (et, nt) { + const rt = useThemeProps({ props: et, name: 'MuiSkeleton' }), + { + animation: it = 'pulse', + className: ot, + component: at = 'span', + height: st, + style: lt, + variant: ct = 'text', + width: ut, + } = rt, + ht = _objectWithoutPropertiesLoose$m(rt, _excluded$U), + dt = _extends$u({}, rt, { animation: it, component: at, variant: ct, hasChildren: !!ht.children }), + pt = useUtilityClasses$q(dt) + return jsxRuntimeExports.jsx( + SkeletonRoot, + _extends$u({ as: at, ref: nt, className: clsx$3(pt.root, ot), ownerState: dt }, ht, { + style: _extends$u({ width: ut, height: st }, lt), + }), + ) + }), + Skeleton$2 = Skeleton$1, + shouldSpreadAdditionalProps = (tt) => !tt || !isHostComponent(tt), + shouldSpreadAdditionalProps$1 = shouldSpreadAdditionalProps + function getSliderUtilityClass(tt) { + return generateUtilityClass('MuiSlider', tt) + } + const sliderClasses = generateUtilityClasses('MuiSlider', [ + 'root', + 'active', + 'colorPrimary', + 'colorSecondary', + 'colorError', + 'colorInfo', + 'colorSuccess', + 'colorWarning', + 'disabled', + 'dragging', + 'focusVisible', + 'mark', + 'markActive', + 'marked', + 'markLabel', + 'markLabelActive', + 'rail', + 'sizeSmall', + 'thumb', + 'thumbColorPrimary', + 'thumbColorSecondary', + 'thumbColorError', + 'thumbColorSuccess', + 'thumbColorInfo', + 'thumbColorWarning', + 'track', + 'trackInverted', + 'trackFalse', + 'thumbSizeSmall', + 'valueLabel', + 'valueLabelOpen', + 'valueLabelCircle', + 'valueLabelLabel', + 'vertical', + ]), + sliderClasses$1 = sliderClasses, + useValueLabelClasses = (tt) => { + const { open: et } = tt + return { + offset: clsx$3(et && sliderClasses$1.valueLabelOpen), + circle: sliderClasses$1.valueLabelCircle, + label: sliderClasses$1.valueLabelLabel, + } + } + function SliderValueLabel$1(tt) { + const { children: et, className: nt, value: rt } = tt, + it = useValueLabelClasses(tt) + return et + ? reactExports.cloneElement( + et, + { className: clsx$3(et.props.className) }, + jsxRuntimeExports.jsxs(reactExports.Fragment, { + children: [ + et.props.children, + jsxRuntimeExports.jsx('span', { + className: clsx$3(it.offset, nt), + 'aria-hidden': !0, + children: jsxRuntimeExports.jsx('span', { + className: it.circle, + children: jsxRuntimeExports.jsx('span', { className: it.label, children: rt }), + }), + }), + ], + }), + ) + : null + } + const _excluded$T = [ + 'aria-label', + 'aria-valuetext', + 'aria-labelledby', + 'component', + 'components', + 'componentsProps', + 'color', + 'classes', + 'className', + 'disableSwap', + 'disabled', + 'getAriaLabel', + 'getAriaValueText', + 'marks', + 'max', + 'min', + 'name', + 'onChange', + 'onChangeCommitted', + 'orientation', + 'size', + 'step', + 'scale', + 'slotProps', + 'slots', + 'tabIndex', + 'track', + 'value', + 'valueLabelDisplay', + 'valueLabelFormat', + ] + function Identity(tt) { + return tt + } + const SliderRoot = styled$1('span', { + name: 'MuiSlider', + slot: 'Root', + overridesResolver: (tt, et) => { + const { ownerState: nt } = tt + return [ + et.root, + et[`color${capitalize(nt.color)}`], + nt.size !== 'medium' && et[`size${capitalize(nt.size)}`], + nt.marked && et.marked, + nt.orientation === 'vertical' && et.vertical, + nt.track === 'inverted' && et.trackInverted, + nt.track === !1 && et.trackFalse, + ] + }, + })(({ theme: tt, ownerState: et }) => + _extends$u( + { + borderRadius: 12, + boxSizing: 'content-box', + display: 'inline-block', + position: 'relative', + cursor: 'pointer', + touchAction: 'none', + color: (tt.vars || tt).palette[et.color].main, + WebkitTapHighlightColor: 'transparent', + }, + et.orientation === 'horizontal' && + _extends$u( + { height: 4, width: '100%', padding: '13px 0', '@media (pointer: coarse)': { padding: '20px 0' } }, + et.size === 'small' && { height: 2 }, + et.marked && { marginBottom: 20 }, + ), + et.orientation === 'vertical' && + _extends$u( + { height: '100%', width: 4, padding: '0 13px', '@media (pointer: coarse)': { padding: '0 20px' } }, + et.size === 'small' && { width: 2 }, + et.marked && { marginRight: 44 }, + ), + { + '@media print': { colorAdjust: 'exact' }, + [`&.${sliderClasses$1.disabled}`]: { + pointerEvents: 'none', + cursor: 'default', + color: (tt.vars || tt).palette.grey[400], + }, + [`&.${sliderClasses$1.dragging}`]: { + [`& .${sliderClasses$1.thumb}, & .${sliderClasses$1.track}`]: { transition: 'none' }, + }, + }, + ), + ), + SliderRail = styled$1('span', { name: 'MuiSlider', slot: 'Rail', overridesResolver: (tt, et) => et.rail })( + ({ ownerState: tt }) => + _extends$u( + { + display: 'block', + position: 'absolute', + borderRadius: 'inherit', + backgroundColor: 'currentColor', + opacity: 0.38, + }, + tt.orientation === 'horizontal' && { + width: '100%', + height: 'inherit', + top: '50%', + transform: 'translateY(-50%)', + }, + tt.orientation === 'vertical' && { + height: '100%', + width: 'inherit', + left: '50%', + transform: 'translateX(-50%)', + }, + tt.track === 'inverted' && { opacity: 1 }, + ), + ), + SliderTrack = styled$1('span', { name: 'MuiSlider', slot: 'Track', overridesResolver: (tt, et) => et.track })( + ({ theme: tt, ownerState: et }) => { + const nt = + tt.palette.mode === 'light' + ? lighten(tt.palette[et.color].main, 0.62) + : darken(tt.palette[et.color].main, 0.5) + return _extends$u( + { + display: 'block', + position: 'absolute', + borderRadius: 'inherit', + border: '1px solid currentColor', + backgroundColor: 'currentColor', + transition: tt.transitions.create(['left', 'width', 'bottom', 'height'], { + duration: tt.transitions.duration.shortest, + }), + }, + et.size === 'small' && { border: 'none' }, + et.orientation === 'horizontal' && { height: 'inherit', top: '50%', transform: 'translateY(-50%)' }, + et.orientation === 'vertical' && { width: 'inherit', left: '50%', transform: 'translateX(-50%)' }, + et.track === !1 && { display: 'none' }, + et.track === 'inverted' && { + backgroundColor: tt.vars ? tt.vars.palette.Slider[`${et.color}Track`] : nt, + borderColor: tt.vars ? tt.vars.palette.Slider[`${et.color}Track`] : nt, + }, + ) + }, + ), + SliderThumb = styled$1('span', { + name: 'MuiSlider', + slot: 'Thumb', + overridesResolver: (tt, et) => { + const { ownerState: nt } = tt + return [ + et.thumb, + et[`thumbColor${capitalize(nt.color)}`], + nt.size !== 'medium' && et[`thumbSize${capitalize(nt.size)}`], + ] + }, + })(({ theme: tt, ownerState: et }) => + _extends$u( + { + position: 'absolute', + width: 20, + height: 20, + boxSizing: 'border-box', + borderRadius: '50%', + outline: 0, + backgroundColor: 'currentColor', + display: 'flex', + alignItems: 'center', + justifyContent: 'center', + transition: tt.transitions.create(['box-shadow', 'left', 'bottom'], { + duration: tt.transitions.duration.shortest, + }), + }, + et.size === 'small' && { width: 12, height: 12 }, + et.orientation === 'horizontal' && { top: '50%', transform: 'translate(-50%, -50%)' }, + et.orientation === 'vertical' && { left: '50%', transform: 'translate(-50%, 50%)' }, + { + '&:before': _extends$u( + { + position: 'absolute', + content: '""', + borderRadius: 'inherit', + width: '100%', + height: '100%', + boxShadow: (tt.vars || tt).shadows[2], + }, + et.size === 'small' && { boxShadow: 'none' }, + ), + '&::after': { + position: 'absolute', + content: '""', + borderRadius: '50%', + width: 42, + height: 42, + top: '50%', + left: '50%', + transform: 'translate(-50%, -50%)', + }, + [`&:hover, &.${sliderClasses$1.focusVisible}`]: { + boxShadow: `0px 0px 0px 8px ${ + tt.vars + ? `rgba(${tt.vars.palette[et.color].mainChannel} / 0.16)` + : alpha$1(tt.palette[et.color].main, 0.16) + }`, + '@media (hover: none)': { boxShadow: 'none' }, + }, + [`&.${sliderClasses$1.active}`]: { + boxShadow: `0px 0px 0px 14px ${ + tt.vars + ? `rgba(${tt.vars.palette[et.color].mainChannel} / 0.16)` + : alpha$1(tt.palette[et.color].main, 0.16) + }`, + }, + [`&.${sliderClasses$1.disabled}`]: { '&:hover': { boxShadow: 'none' } }, + }, + ), + ), + SliderValueLabel = styled$1(SliderValueLabel$1, { + name: 'MuiSlider', + slot: 'ValueLabel', + overridesResolver: (tt, et) => et.valueLabel, + })(({ theme: tt, ownerState: et }) => + _extends$u( + { + [`&.${sliderClasses$1.valueLabelOpen}`]: { + transform: `${et.orientation === 'vertical' ? 'translateY(-50%)' : 'translateY(-100%)'} scale(1)`, + }, + zIndex: 1, + whiteSpace: 'nowrap', + }, + tt.typography.body2, + { + fontWeight: 500, + transition: tt.transitions.create(['transform'], { duration: tt.transitions.duration.shortest }), + transform: `${et.orientation === 'vertical' ? 'translateY(-50%)' : 'translateY(-100%)'} scale(0)`, + position: 'absolute', + backgroundColor: (tt.vars || tt).palette.grey[600], + borderRadius: 2, + color: (tt.vars || tt).palette.common.white, + display: 'flex', + alignItems: 'center', + justifyContent: 'center', + padding: '0.25rem 0.75rem', + }, + et.orientation === 'horizontal' && { + top: '-10px', + transformOrigin: 'bottom center', + '&:before': { + position: 'absolute', + content: '""', + width: 8, + height: 8, + transform: 'translate(-50%, 50%) rotate(45deg)', + backgroundColor: 'inherit', + bottom: 0, + left: '50%', + }, + }, + et.orientation === 'vertical' && { + right: et.size === 'small' ? '20px' : '30px', + top: '50%', + transformOrigin: 'right center', + '&:before': { + position: 'absolute', + content: '""', + width: 8, + height: 8, + transform: 'translate(-50%, -50%) rotate(45deg)', + backgroundColor: 'inherit', + right: -8, + top: '50%', + }, + }, + et.size === 'small' && { fontSize: tt.typography.pxToRem(12), padding: '0.25rem 0.5rem' }, + ), + ), + SliderMark = styled$1('span', { + name: 'MuiSlider', + slot: 'Mark', + shouldForwardProp: (tt) => slotShouldForwardProp(tt) && tt !== 'markActive', + overridesResolver: (tt, et) => { + const { markActive: nt } = tt + return [et.mark, nt && et.markActive] + }, + })(({ theme: tt, ownerState: et, markActive: nt }) => + _extends$u( + { position: 'absolute', width: 2, height: 2, borderRadius: 1, backgroundColor: 'currentColor' }, + et.orientation === 'horizontal' && { top: '50%', transform: 'translate(-1px, -50%)' }, + et.orientation === 'vertical' && { left: '50%', transform: 'translate(-50%, 1px)' }, + nt && { backgroundColor: (tt.vars || tt).palette.background.paper, opacity: 0.8 }, + ), + ), + SliderMarkLabel = styled$1('span', { + name: 'MuiSlider', + slot: 'MarkLabel', + shouldForwardProp: (tt) => slotShouldForwardProp(tt) && tt !== 'markLabelActive', + overridesResolver: (tt, et) => et.markLabel, + })(({ theme: tt, ownerState: et, markLabelActive: nt }) => + _extends$u( + {}, + tt.typography.body2, + { color: (tt.vars || tt).palette.text.secondary, position: 'absolute', whiteSpace: 'nowrap' }, + et.orientation === 'horizontal' && { + top: 30, + transform: 'translateX(-50%)', + '@media (pointer: coarse)': { top: 40 }, + }, + et.orientation === 'vertical' && { + left: 36, + transform: 'translateY(50%)', + '@media (pointer: coarse)': { left: 44 }, + }, + nt && { color: (tt.vars || tt).palette.text.primary }, + ), + ), + useUtilityClasses$p = (tt) => { + const { + disabled: et, + dragging: nt, + marked: rt, + orientation: it, + track: ot, + classes: at, + color: st, + size: lt, + } = tt, + ct = { + root: [ + 'root', + et && 'disabled', + nt && 'dragging', + rt && 'marked', + it === 'vertical' && 'vertical', + ot === 'inverted' && 'trackInverted', + ot === !1 && 'trackFalse', + st && `color${capitalize(st)}`, + lt && `size${capitalize(lt)}`, + ], + rail: ['rail'], + track: ['track'], + mark: ['mark'], + markActive: ['markActive'], + markLabel: ['markLabel'], + markLabelActive: ['markLabelActive'], + valueLabel: ['valueLabel'], + thumb: ['thumb', et && 'disabled', lt && `thumbSize${capitalize(lt)}`, st && `thumbColor${capitalize(st)}`], + active: ['active'], + disabled: ['disabled'], + focusVisible: ['focusVisible'], + } + return composeClasses(ct, getSliderUtilityClass, at) + }, + Forward = ({ children: tt }) => tt, + Slider = reactExports.forwardRef(function (et, nt) { + var rt, it, ot, at, st, lt, ct, ut, ht, dt, pt, mt, gt, yt, bt, vt, xt, kt, St, Tt, At, Et, $t, Dt + const jt = useThemeProps({ props: et, name: 'MuiSlider' }), + Ct = useTheme().direction === 'rtl', + { + 'aria-label': wt, + 'aria-valuetext': It, + 'aria-labelledby': Ot, + component: Wt = 'span', + components: zt = {}, + componentsProps: Ft = {}, + color: Nt = 'primary', + classes: Ut, + className: Mt, + disableSwap: Ht = !1, + disabled: en = !1, + getAriaLabel: sn, + getAriaValueText: Kt, + marks: rn = !1, + max: nn = 100, + min: hn = 0, + orientation: vn = 'horizontal', + size: an = 'medium', + step: Qt = 1, + scale: _n = Identity, + slotProps: Pn, + slots: $n, + track: Nn = 'normal', + valueLabelDisplay: Tn = 'off', + valueLabelFormat: cn = Identity, + } = jt, + mn = _objectWithoutPropertiesLoose$m(jt, _excluded$T), + In = _extends$u({}, jt, { + isRtl: Ct, + max: nn, + min: hn, + classes: Ut, + disabled: en, + disableSwap: Ht, + orientation: vn, + marks: rn, + color: Nt, + size: an, + step: Qt, + scale: _n, + track: Nn, + valueLabelDisplay: Tn, + valueLabelFormat: cn, + }), + { + axisProps: An, + getRootProps: wn, + getHiddenInputProps: fn, + getThumbProps: pn, + open: kn, + active: Dn, + axis: un, + focusedThumbIndex: Zt, + range: Xt, + dragging: Sn, + marks: Rn, + values: jn, + trackOffset: On, + trackLeap: Zn, + getThumbStyle: Vn, + } = useSlider(_extends$u({}, In, { rootRef: nt })) + ;(In.marked = Rn.length > 0 && Rn.some((nr) => nr.label)), (In.dragging = Sn), (In.focusedThumbIndex = Zt) + const qn = useUtilityClasses$p(In), + zn = (rt = (it = $n == null ? void 0 : $n.root) != null ? it : zt.Root) != null ? rt : SliderRoot, + Jn = (ot = (at = $n == null ? void 0 : $n.rail) != null ? at : zt.Rail) != null ? ot : SliderRail, + Hn = (st = (lt = $n == null ? void 0 : $n.track) != null ? lt : zt.Track) != null ? st : SliderTrack, + pr = (ct = (ut = $n == null ? void 0 : $n.thumb) != null ? ut : zt.Thumb) != null ? ct : SliderThumb, + fr = + (ht = (dt = $n == null ? void 0 : $n.valueLabel) != null ? dt : zt.ValueLabel) != null + ? ht + : SliderValueLabel, + xr = (pt = (mt = $n == null ? void 0 : $n.mark) != null ? mt : zt.Mark) != null ? pt : SliderMark, + io = + (gt = (yt = $n == null ? void 0 : $n.markLabel) != null ? yt : zt.MarkLabel) != null ? gt : SliderMarkLabel, + Tr = (bt = (vt = $n == null ? void 0 : $n.input) != null ? vt : zt.Input) != null ? bt : 'input', + Ar = (xt = Pn == null ? void 0 : Pn.root) != null ? xt : Ft.root, + qr = (kt = Pn == null ? void 0 : Pn.rail) != null ? kt : Ft.rail, + jr = (St = Pn == null ? void 0 : Pn.track) != null ? St : Ft.track, + Fr = (Tt = Pn == null ? void 0 : Pn.thumb) != null ? Tt : Ft.thumb, + ao = (At = Pn == null ? void 0 : Pn.valueLabel) != null ? At : Ft.valueLabel, + Yr = (Et = Pn == null ? void 0 : Pn.mark) != null ? Et : Ft.mark, + Dr = ($t = Pn == null ? void 0 : Pn.markLabel) != null ? $t : Ft.markLabel, + go = (Dt = Pn == null ? void 0 : Pn.input) != null ? Dt : Ft.input, + xn = useSlotProps({ + elementType: zn, + getSlotProps: wn, + externalSlotProps: Ar, + externalForwardedProps: mn, + additionalProps: _extends$u({}, shouldSpreadAdditionalProps$1(zn) && { as: Wt }), + ownerState: _extends$u({}, In, Ar == null ? void 0 : Ar.ownerState), + className: [qn.root, Mt], + }), + Mn = useSlotProps({ elementType: Jn, externalSlotProps: qr, ownerState: In, className: qn.rail }), + dn = useSlotProps({ + elementType: Hn, + externalSlotProps: jr, + additionalProps: { style: _extends$u({}, An[un].offset(On), An[un].leap(Zn)) }, + ownerState: _extends$u({}, In, jr == null ? void 0 : jr.ownerState), + className: qn.track, + }), + Jt = useSlotProps({ + elementType: pr, + getSlotProps: pn, + externalSlotProps: Fr, + ownerState: _extends$u({}, In, Fr == null ? void 0 : Fr.ownerState), + className: qn.thumb, + }), + En = useSlotProps({ + elementType: fr, + externalSlotProps: ao, + ownerState: _extends$u({}, In, ao == null ? void 0 : ao.ownerState), + className: qn.valueLabel, + }), + Ln = useSlotProps({ elementType: xr, externalSlotProps: Yr, ownerState: In, className: qn.mark }), + Un = useSlotProps({ elementType: io, externalSlotProps: Dr, ownerState: In, className: qn.markLabel }), + Kn = useSlotProps({ elementType: Tr, getSlotProps: fn, externalSlotProps: go, ownerState: In }) + return jsxRuntimeExports.jsxs( + zn, + _extends$u({}, xn, { + children: [ + jsxRuntimeExports.jsx(Jn, _extends$u({}, Mn)), + jsxRuntimeExports.jsx(Hn, _extends$u({}, dn)), + Rn.filter((nr) => nr.value >= hn && nr.value <= nn).map((nr, lr) => { + const cr = valueToPercent(nr.value, hn, nn), + Hr = An[un].offset(cr) + let vr + return ( + Nn === !1 + ? (vr = jn.indexOf(nr.value) !== -1) + : (vr = + (Nn === 'normal' && + (Xt ? nr.value >= jn[0] && nr.value <= jn[jn.length - 1] : nr.value <= jn[0])) || + (Nn === 'inverted' && + (Xt ? nr.value <= jn[0] || nr.value >= jn[jn.length - 1] : nr.value >= jn[0]))), + jsxRuntimeExports.jsxs( + reactExports.Fragment, + { + children: [ + jsxRuntimeExports.jsx( + xr, + _extends$u({ 'data-index': lr }, Ln, !isHostComponent(xr) && { markActive: vr }, { + style: _extends$u({}, Hr, Ln.style), + className: clsx$3(Ln.className, vr && qn.markActive), + }), + ), + nr.label != null + ? jsxRuntimeExports.jsx( + io, + _extends$u( + { 'aria-hidden': !0, 'data-index': lr }, + Un, + !isHostComponent(io) && { markLabelActive: vr }, + { + style: _extends$u({}, Hr, Un.style), + className: clsx$3(qn.markLabel, Un.className, vr && qn.markLabelActive), + children: nr.label, + }, + ), + ) + : null, + ], + }, + lr, + ) + ) + }), + jn.map((nr, lr) => { + const cr = valueToPercent(nr, hn, nn), + Hr = An[un].offset(cr), + vr = Tn === 'off' ? Forward : fr + return jsxRuntimeExports.jsx( + vr, + _extends$u( + {}, + !isHostComponent(vr) && { + valueLabelFormat: cn, + valueLabelDisplay: Tn, + value: typeof cn == 'function' ? cn(_n(nr), lr) : cn, + index: lr, + open: kn === lr || Dn === lr || Tn === 'on', + disabled: en, + }, + En, + { + children: jsxRuntimeExports.jsx( + pr, + _extends$u({ 'data-index': lr }, Jt, { + className: clsx$3(qn.thumb, Jt.className, Dn === lr && qn.active, Zt === lr && qn.focusVisible), + style: _extends$u({}, Hr, Vn(lr), Jt.style), + children: jsxRuntimeExports.jsx( + Tr, + _extends$u( + { + 'data-index': lr, + 'aria-label': sn ? sn(lr) : wt, + 'aria-valuenow': _n(nr), + 'aria-labelledby': Ot, + 'aria-valuetext': Kt ? Kt(_n(nr), lr) : It, + value: jn[lr], + }, + Kn, + ), + ), + }), + ), + }, + ), + lr, + ) + }), + ], + }), + ) + }), + Slider$1 = Slider + function getTabUtilityClass(tt) { + return generateUtilityClass('MuiTab', tt) + } + const tabClasses = generateUtilityClasses('MuiTab', [ + 'root', + 'labelIcon', + 'textColorInherit', + 'textColorPrimary', + 'textColorSecondary', + 'selected', + 'disabled', + 'fullWidth', + 'wrapped', + 'iconWrapper', + ]), + tabClasses$1 = tabClasses, + _excluded$S = [ + 'className', + 'disabled', + 'disableFocusRipple', + 'fullWidth', + 'icon', + 'iconPosition', + 'indicator', + 'label', + 'onChange', + 'onClick', + 'onFocus', + 'selected', + 'selectionFollowsFocus', + 'textColor', + 'value', + 'wrapped', + ], + useUtilityClasses$o = (tt) => { + const { + classes: et, + textColor: nt, + fullWidth: rt, + wrapped: it, + icon: ot, + label: at, + selected: st, + disabled: lt, + } = tt, + ct = { + root: [ + 'root', + ot && at && 'labelIcon', + `textColor${capitalize(nt)}`, + rt && 'fullWidth', + it && 'wrapped', + st && 'selected', + lt && 'disabled', + ], + iconWrapper: ['iconWrapper'], + } + return composeClasses(ct, getTabUtilityClass, et) + }, + TabRoot = styled$1(ButtonBase$1, { + name: 'MuiTab', + slot: 'Root', + overridesResolver: (tt, et) => { + const { ownerState: nt } = tt + return [ + et.root, + nt.label && nt.icon && et.labelIcon, + et[`textColor${capitalize(nt.textColor)}`], + nt.fullWidth && et.fullWidth, + nt.wrapped && et.wrapped, + ] + }, + })(({ theme: tt, ownerState: et }) => + _extends$u( + {}, + tt.typography.button, + { + maxWidth: 360, + minWidth: 90, + position: 'relative', + minHeight: 48, + flexShrink: 0, + padding: '12px 16px', + overflow: 'hidden', + whiteSpace: 'normal', + textAlign: 'center', + }, + et.label && { flexDirection: et.iconPosition === 'top' || et.iconPosition === 'bottom' ? 'column' : 'row' }, + { lineHeight: 1.25 }, + et.icon && + et.label && { + minHeight: 72, + paddingTop: 9, + paddingBottom: 9, + [`& > .${tabClasses$1.iconWrapper}`]: _extends$u( + {}, + et.iconPosition === 'top' && { marginBottom: 6 }, + et.iconPosition === 'bottom' && { marginTop: 6 }, + et.iconPosition === 'start' && { marginRight: tt.spacing(1) }, + et.iconPosition === 'end' && { marginLeft: tt.spacing(1) }, + ), + }, + et.textColor === 'inherit' && { + color: 'inherit', + opacity: 0.6, + [`&.${tabClasses$1.selected}`]: { opacity: 1 }, + [`&.${tabClasses$1.disabled}`]: { opacity: (tt.vars || tt).palette.action.disabledOpacity }, + }, + et.textColor === 'primary' && { + color: (tt.vars || tt).palette.text.secondary, + [`&.${tabClasses$1.selected}`]: { color: (tt.vars || tt).palette.primary.main }, + [`&.${tabClasses$1.disabled}`]: { color: (tt.vars || tt).palette.text.disabled }, + }, + et.textColor === 'secondary' && { + color: (tt.vars || tt).palette.text.secondary, + [`&.${tabClasses$1.selected}`]: { color: (tt.vars || tt).palette.secondary.main }, + [`&.${tabClasses$1.disabled}`]: { color: (tt.vars || tt).palette.text.disabled }, + }, + et.fullWidth && { flexShrink: 1, flexGrow: 1, flexBasis: 0, maxWidth: 'none' }, + et.wrapped && { fontSize: tt.typography.pxToRem(12) }, + ), + ), + Tab$1 = reactExports.forwardRef(function (et, nt) { + const rt = useThemeProps({ props: et, name: 'MuiTab' }), + { + className: it, + disabled: ot = !1, + disableFocusRipple: at = !1, + fullWidth: st, + icon: lt, + iconPosition: ct = 'top', + indicator: ut, + label: ht, + onChange: dt, + onClick: pt, + onFocus: mt, + selected: gt, + selectionFollowsFocus: yt, + textColor: bt = 'inherit', + value: vt, + wrapped: xt = !1, + } = rt, + kt = _objectWithoutPropertiesLoose$m(rt, _excluded$S), + St = _extends$u({}, rt, { + disabled: ot, + disableFocusRipple: at, + selected: gt, + icon: !!lt, + iconPosition: ct, + label: !!ht, + fullWidth: st, + textColor: bt, + wrapped: xt, + }), + Tt = useUtilityClasses$o(St), + At = + lt && ht && reactExports.isValidElement(lt) + ? reactExports.cloneElement(lt, { className: clsx$3(Tt.iconWrapper, lt.props.className) }) + : lt, + Et = (Dt) => { + !gt && dt && dt(Dt, vt), pt && pt(Dt) + }, + $t = (Dt) => { + yt && !gt && dt && dt(Dt, vt), mt && mt(Dt) + } + return jsxRuntimeExports.jsxs( + TabRoot, + _extends$u( + { + focusRipple: !at, + className: clsx$3(Tt.root, it), + ref: nt, + role: 'tab', + 'aria-selected': gt, + disabled: ot, + onClick: Et, + onFocus: $t, + ownerState: St, + tabIndex: gt ? 0 : -1, + }, + kt, + { + children: [ + ct === 'top' || ct === 'start' + ? jsxRuntimeExports.jsxs(reactExports.Fragment, { children: [At, ht] }) + : jsxRuntimeExports.jsxs(reactExports.Fragment, { children: [ht, At] }), + ut, + ], + }, + ), + ) + }), + Tab$2 = Tab$1, + TableContext = reactExports.createContext(), + TableContext$1 = TableContext + function getTableUtilityClass(tt) { + return generateUtilityClass('MuiTable', tt) + } + generateUtilityClasses('MuiTable', ['root', 'stickyHeader']) + const _excluded$R = ['className', 'component', 'padding', 'size', 'stickyHeader'], + useUtilityClasses$n = (tt) => { + const { classes: et, stickyHeader: nt } = tt + return composeClasses({ root: ['root', nt && 'stickyHeader'] }, getTableUtilityClass, et) + }, + TableRoot = styled$1('table', { + name: 'MuiTable', + slot: 'Root', + overridesResolver: (tt, et) => { + const { ownerState: nt } = tt + return [et.root, nt.stickyHeader && et.stickyHeader] + }, + })(({ theme: tt, ownerState: et }) => + _extends$u( + { + display: 'table', + width: '100%', + borderCollapse: 'collapse', + borderSpacing: 0, + '& caption': _extends$u({}, tt.typography.body2, { + padding: tt.spacing(2), + color: (tt.vars || tt).palette.text.secondary, + textAlign: 'left', + captionSide: 'bottom', + }), + }, + et.stickyHeader && { borderCollapse: 'separate' }, + ), + ), + defaultComponent$3 = 'table', + Table$3 = reactExports.forwardRef(function (et, nt) { + const rt = useThemeProps({ props: et, name: 'MuiTable' }), + { + className: it, + component: ot = defaultComponent$3, + padding: at = 'normal', + size: st = 'medium', + stickyHeader: lt = !1, + } = rt, + ct = _objectWithoutPropertiesLoose$m(rt, _excluded$R), + ut = _extends$u({}, rt, { component: ot, padding: at, size: st, stickyHeader: lt }), + ht = useUtilityClasses$n(ut), + dt = reactExports.useMemo(() => ({ padding: at, size: st, stickyHeader: lt }), [at, st, lt]) + return jsxRuntimeExports.jsx(TableContext$1.Provider, { + value: dt, + children: jsxRuntimeExports.jsx( + TableRoot, + _extends$u( + { + as: ot, + role: ot === defaultComponent$3 ? null : 'table', + ref: nt, + className: clsx$3(ht.root, it), + ownerState: ut, + }, + ct, + ), + ), + }) + }), + MaterialTable = Table$3, + Tablelvl2Context = reactExports.createContext(), + Tablelvl2Context$1 = Tablelvl2Context + function getTableBodyUtilityClass(tt) { + return generateUtilityClass('MuiTableBody', tt) + } + generateUtilityClasses('MuiTableBody', ['root']) + const _excluded$Q = ['className', 'component'], + useUtilityClasses$m = (tt) => { + const { classes: et } = tt + return composeClasses({ root: ['root'] }, getTableBodyUtilityClass, et) + }, + TableBodyRoot = styled$1('tbody', { name: 'MuiTableBody', slot: 'Root', overridesResolver: (tt, et) => et.root })({ + display: 'table-row-group', + }), + tablelvl2$1 = { variant: 'body' }, + defaultComponent$2 = 'tbody', + TableBody = reactExports.forwardRef(function (et, nt) { + const rt = useThemeProps({ props: et, name: 'MuiTableBody' }), + { className: it, component: ot = defaultComponent$2 } = rt, + at = _objectWithoutPropertiesLoose$m(rt, _excluded$Q), + st = _extends$u({}, rt, { component: ot }), + lt = useUtilityClasses$m(st) + return jsxRuntimeExports.jsx(Tablelvl2Context$1.Provider, { + value: tablelvl2$1, + children: jsxRuntimeExports.jsx( + TableBodyRoot, + _extends$u( + { + className: clsx$3(lt.root, it), + as: ot, + ref: nt, + role: ot === defaultComponent$2 ? null : 'rowgroup', + ownerState: st, + }, + at, + ), + ), + }) + }), + TableBody$1 = TableBody + function getTableCellUtilityClass(tt) { + return generateUtilityClass('MuiTableCell', tt) + } + const tableCellClasses = generateUtilityClasses('MuiTableCell', [ + 'root', + 'head', + 'body', + 'footer', + 'sizeSmall', + 'sizeMedium', + 'paddingCheckbox', + 'paddingNone', + 'alignLeft', + 'alignCenter', + 'alignRight', + 'alignJustify', + 'stickyHeader', + ]), + tableCellClasses$1 = tableCellClasses, + _excluded$P = ['align', 'className', 'component', 'padding', 'scope', 'size', 'sortDirection', 'variant'], + useUtilityClasses$l = (tt) => { + const { classes: et, variant: nt, align: rt, padding: it, size: ot, stickyHeader: at } = tt, + st = { + root: [ + 'root', + nt, + at && 'stickyHeader', + rt !== 'inherit' && `align${capitalize(rt)}`, + it !== 'normal' && `padding${capitalize(it)}`, + `size${capitalize(ot)}`, + ], + } + return composeClasses(st, getTableCellUtilityClass, et) + }, + TableCellRoot = styled$1('td', { + name: 'MuiTableCell', + slot: 'Root', + overridesResolver: (tt, et) => { + const { ownerState: nt } = tt + return [ + et.root, + et[nt.variant], + et[`size${capitalize(nt.size)}`], + nt.padding !== 'normal' && et[`padding${capitalize(nt.padding)}`], + nt.align !== 'inherit' && et[`align${capitalize(nt.align)}`], + nt.stickyHeader && et.stickyHeader, + ] + }, + })(({ theme: tt, ownerState: et }) => + _extends$u( + {}, + tt.typography.body2, + { + display: 'table-cell', + verticalAlign: 'inherit', + borderBottom: tt.vars + ? `1px solid ${tt.vars.palette.TableCell.border}` + : `1px solid + ${ + tt.palette.mode === 'light' + ? lighten(alpha$1(tt.palette.divider, 1), 0.88) + : darken(alpha$1(tt.palette.divider, 1), 0.68) + }`, + textAlign: 'left', + padding: 16, + }, + et.variant === 'head' && { + color: (tt.vars || tt).palette.text.primary, + lineHeight: tt.typography.pxToRem(24), + fontWeight: tt.typography.fontWeightMedium, + }, + et.variant === 'body' && { color: (tt.vars || tt).palette.text.primary }, + et.variant === 'footer' && { + color: (tt.vars || tt).palette.text.secondary, + lineHeight: tt.typography.pxToRem(21), + fontSize: tt.typography.pxToRem(12), + }, + et.size === 'small' && { + padding: '6px 16px', + [`&.${tableCellClasses$1.paddingCheckbox}`]: { width: 24, padding: '0 12px 0 16px', '& > *': { padding: 0 } }, + }, + et.padding === 'checkbox' && { width: 48, padding: '0 0 0 4px' }, + et.padding === 'none' && { padding: 0 }, + et.align === 'left' && { textAlign: 'left' }, + et.align === 'center' && { textAlign: 'center' }, + et.align === 'right' && { textAlign: 'right', flexDirection: 'row-reverse' }, + et.align === 'justify' && { textAlign: 'justify' }, + et.stickyHeader && { + position: 'sticky', + top: 0, + zIndex: 2, + backgroundColor: (tt.vars || tt).palette.background.default, + }, + ), + ), + TableCell = reactExports.forwardRef(function (et, nt) { + const rt = useThemeProps({ props: et, name: 'MuiTableCell' }), + { + align: it = 'inherit', + className: ot, + component: at, + padding: st, + scope: lt, + size: ct, + sortDirection: ut, + variant: ht, + } = rt, + dt = _objectWithoutPropertiesLoose$m(rt, _excluded$P), + pt = reactExports.useContext(TableContext$1), + mt = reactExports.useContext(Tablelvl2Context$1), + gt = mt && mt.variant === 'head' + let yt + at ? (yt = at) : (yt = gt ? 'th' : 'td') + let bt = lt + yt === 'td' ? (bt = void 0) : !bt && gt && (bt = 'col') + const vt = ht || (mt && mt.variant), + xt = _extends$u({}, rt, { + align: it, + component: yt, + padding: st || (pt && pt.padding ? pt.padding : 'normal'), + size: ct || (pt && pt.size ? pt.size : 'medium'), + sortDirection: ut, + stickyHeader: vt === 'head' && pt && pt.stickyHeader, + variant: vt, + }), + kt = useUtilityClasses$l(xt) + let St = null + return ( + ut && (St = ut === 'asc' ? 'ascending' : 'descending'), + jsxRuntimeExports.jsx( + TableCellRoot, + _extends$u( + { as: yt, ref: nt, className: clsx$3(kt.root, ot), 'aria-sort': St, scope: bt, ownerState: xt }, + dt, + ), + ) + ) + }), + TableCell$1 = TableCell + function getTableHeadUtilityClass(tt) { + return generateUtilityClass('MuiTableHead', tt) + } + generateUtilityClasses('MuiTableHead', ['root']) + const _excluded$O = ['className', 'component'], + useUtilityClasses$k = (tt) => { + const { classes: et } = tt + return composeClasses({ root: ['root'] }, getTableHeadUtilityClass, et) + }, + TableHeadRoot = styled$1('thead', { name: 'MuiTableHead', slot: 'Root', overridesResolver: (tt, et) => et.root })({ + display: 'table-header-group', + }), + tablelvl2 = { variant: 'head' }, + defaultComponent$1 = 'thead', + TableHead = reactExports.forwardRef(function (et, nt) { + const rt = useThemeProps({ props: et, name: 'MuiTableHead' }), + { className: it, component: ot = defaultComponent$1 } = rt, + at = _objectWithoutPropertiesLoose$m(rt, _excluded$O), + st = _extends$u({}, rt, { component: ot }), + lt = useUtilityClasses$k(st) + return jsxRuntimeExports.jsx(Tablelvl2Context$1.Provider, { + value: tablelvl2, + children: jsxRuntimeExports.jsx( + TableHeadRoot, + _extends$u( + { + as: ot, + className: clsx$3(lt.root, it), + ref: nt, + role: ot === defaultComponent$1 ? null : 'rowgroup', + ownerState: st, + }, + at, + ), + ), + }) + }), + TableHead$1 = TableHead, + KeyboardArrowLeft = createSvgIcon( + jsxRuntimeExports.jsx('path', { d: 'M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z' }), + 'KeyboardArrowLeft', + ), + KeyboardArrowRight = createSvgIcon( + jsxRuntimeExports.jsx('path', { d: 'M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z' }), + 'KeyboardArrowRight', + ) + function getTableRowUtilityClass(tt) { + return generateUtilityClass('MuiTableRow', tt) + } + const tableRowClasses = generateUtilityClasses('MuiTableRow', ['root', 'selected', 'hover', 'head', 'footer']), + tableRowClasses$1 = tableRowClasses, + _excluded$N = ['className', 'component', 'hover', 'selected'], + useUtilityClasses$j = (tt) => { + const { classes: et, selected: nt, hover: rt, head: it, footer: ot } = tt + return composeClasses( + { root: ['root', nt && 'selected', rt && 'hover', it && 'head', ot && 'footer'] }, + getTableRowUtilityClass, + et, + ) + }, + TableRowRoot = styled$1('tr', { + name: 'MuiTableRow', + slot: 'Root', + overridesResolver: (tt, et) => { + const { ownerState: nt } = tt + return [et.root, nt.head && et.head, nt.footer && et.footer] + }, + })(({ theme: tt }) => ({ + color: 'inherit', + display: 'table-row', + verticalAlign: 'middle', + outline: 0, + [`&.${tableRowClasses$1.hover}:hover`]: { backgroundColor: (tt.vars || tt).palette.action.hover }, + [`&.${tableRowClasses$1.selected}`]: { + backgroundColor: tt.vars + ? `rgba(${tt.vars.palette.primary.mainChannel} / ${tt.vars.palette.action.selectedOpacity})` + : alpha$1(tt.palette.primary.main, tt.palette.action.selectedOpacity), + '&:hover': { + backgroundColor: tt.vars + ? `rgba(${tt.vars.palette.primary.mainChannel} / calc(${tt.vars.palette.action.selectedOpacity} + ${tt.vars.palette.action.hoverOpacity}))` + : alpha$1(tt.palette.primary.main, tt.palette.action.selectedOpacity + tt.palette.action.hoverOpacity), + }, + }, + })), + defaultComponent = 'tr', + TableRow = reactExports.forwardRef(function (et, nt) { + const rt = useThemeProps({ props: et, name: 'MuiTableRow' }), + { className: it, component: ot = defaultComponent, hover: at = !1, selected: st = !1 } = rt, + lt = _objectWithoutPropertiesLoose$m(rt, _excluded$N), + ct = reactExports.useContext(Tablelvl2Context$1), + ut = _extends$u({}, rt, { + component: ot, + hover: at, + selected: st, + head: ct && ct.variant === 'head', + footer: ct && ct.variant === 'footer', + }), + ht = useUtilityClasses$j(ut) + return jsxRuntimeExports.jsx( + TableRowRoot, + _extends$u( + { + as: ot, + ref: nt, + className: clsx$3(ht.root, it), + role: ot === defaultComponent ? null : 'row', + ownerState: ut, + }, + lt, + ), + ) + }), + TableRow$1 = TableRow + function easeInOutSin(tt) { + return (1 + Math.sin(Math.PI * tt - Math.PI / 2)) / 2 + } + function animate(tt, et, nt, rt = {}, it = () => {}) { + const { ease: ot = easeInOutSin, duration: at = 300 } = rt + let st = null + const lt = et[tt] + let ct = !1 + const ut = () => { + ct = !0 + }, + ht = (dt) => { + if (ct) { + it(new Error('Animation cancelled')) + return + } + st === null && (st = dt) + const pt = Math.min(1, (dt - st) / at) + if (((et[tt] = ot(pt) * (nt - lt) + lt), pt >= 1)) { + requestAnimationFrame(() => { + it(null) + }) + return + } + requestAnimationFrame(ht) + } + return lt === nt ? (it(new Error('Element already at target position')), ut) : (requestAnimationFrame(ht), ut) + } + const _excluded$M = ['onChange'], + styles$2 = { width: 99, height: 99, position: 'absolute', top: -9999, overflow: 'scroll' } + function ScrollbarSize(tt) { + const { onChange: et } = tt, + nt = _objectWithoutPropertiesLoose$m(tt, _excluded$M), + rt = reactExports.useRef(), + it = reactExports.useRef(null), + ot = () => { + rt.current = it.current.offsetHeight - it.current.clientHeight + } + return ( + useEnhancedEffect$1(() => { + const at = debounce$5(() => { + const lt = rt.current + ot(), lt !== rt.current && et(rt.current) + }), + st = ownerWindow(it.current) + return ( + st.addEventListener('resize', at), + () => { + at.clear(), st.removeEventListener('resize', at) + } + ) + }, [et]), + reactExports.useEffect(() => { + ot(), et(rt.current) + }, [et]), + jsxRuntimeExports.jsx('div', _extends$u({ style: styles$2, ref: it }, nt)) + ) + } + function getTabScrollButtonUtilityClass(tt) { + return generateUtilityClass('MuiTabScrollButton', tt) + } + const tabScrollButtonClasses = generateUtilityClasses('MuiTabScrollButton', [ + 'root', + 'vertical', + 'horizontal', + 'disabled', + ]), + tabScrollButtonClasses$1 = tabScrollButtonClasses, + _excluded$L = ['className', 'slots', 'slotProps', 'direction', 'orientation', 'disabled'], + useUtilityClasses$i = (tt) => { + const { classes: et, orientation: nt, disabled: rt } = tt + return composeClasses({ root: ['root', nt, rt && 'disabled'] }, getTabScrollButtonUtilityClass, et) + }, + TabScrollButtonRoot = styled$1(ButtonBase$1, { + name: 'MuiTabScrollButton', + slot: 'Root', + overridesResolver: (tt, et) => { + const { ownerState: nt } = tt + return [et.root, nt.orientation && et[nt.orientation]] + }, + })(({ ownerState: tt }) => + _extends$u( + { width: 40, flexShrink: 0, opacity: 0.8, [`&.${tabScrollButtonClasses$1.disabled}`]: { opacity: 0 } }, + tt.orientation === 'vertical' && { + width: '100%', + height: 40, + '& svg': { transform: `rotate(${tt.isRtl ? -90 : 90}deg)` }, + }, + ), + ), + TabScrollButton = reactExports.forwardRef(function (et, nt) { + var rt, it + const ot = useThemeProps({ props: et, name: 'MuiTabScrollButton' }), + { className: at, slots: st = {}, slotProps: lt = {}, direction: ct } = ot, + ut = _objectWithoutPropertiesLoose$m(ot, _excluded$L), + dt = useTheme().direction === 'rtl', + pt = _extends$u({ isRtl: dt }, ot), + mt = useUtilityClasses$i(pt), + gt = (rt = st.StartScrollButtonIcon) != null ? rt : KeyboardArrowLeft, + yt = (it = st.EndScrollButtonIcon) != null ? it : KeyboardArrowRight, + bt = useSlotProps({ + elementType: gt, + externalSlotProps: lt.startScrollButtonIcon, + additionalProps: { fontSize: 'small' }, + ownerState: pt, + }), + vt = useSlotProps({ + elementType: yt, + externalSlotProps: lt.endScrollButtonIcon, + additionalProps: { fontSize: 'small' }, + ownerState: pt, + }) + return jsxRuntimeExports.jsx( + TabScrollButtonRoot, + _extends$u( + { component: 'div', className: clsx$3(mt.root, at), ref: nt, role: null, ownerState: pt, tabIndex: null }, + ut, + { + children: + ct === 'left' + ? jsxRuntimeExports.jsx(gt, _extends$u({}, bt)) + : jsxRuntimeExports.jsx(yt, _extends$u({}, vt)), + }, + ), + ) + }), + TabScrollButton$1 = TabScrollButton + function getTabsUtilityClass(tt) { + return generateUtilityClass('MuiTabs', tt) + } + const tabsClasses = generateUtilityClasses('MuiTabs', [ + 'root', + 'vertical', + 'flexContainer', + 'flexContainerVertical', + 'centered', + 'scroller', + 'fixed', + 'scrollableX', + 'scrollableY', + 'hideScrollbar', + 'scrollButtons', + 'scrollButtonsHideMobile', + 'indicator', + ]), + tabsClasses$1 = tabsClasses, + _excluded$K = [ + 'aria-label', + 'aria-labelledby', + 'action', + 'centered', + 'children', + 'className', + 'component', + 'allowScrollButtonsMobile', + 'indicatorColor', + 'onChange', + 'orientation', + 'ScrollButtonComponent', + 'scrollButtons', + 'selectionFollowsFocus', + 'slots', + 'slotProps', + 'TabIndicatorProps', + 'TabScrollButtonProps', + 'textColor', + 'value', + 'variant', + 'visibleScrollbar', + ], + nextItem = (tt, et) => + tt === et ? tt.firstChild : et && et.nextElementSibling ? et.nextElementSibling : tt.firstChild, + previousItem = (tt, et) => + tt === et ? tt.lastChild : et && et.previousElementSibling ? et.previousElementSibling : tt.lastChild, + moveFocus = (tt, et, nt) => { + let rt = !1, + it = nt(tt, et) + for (; it; ) { + if (it === tt.firstChild) { + if (rt) return + rt = !0 + } + const ot = it.disabled || it.getAttribute('aria-disabled') === 'true' + if (!it.hasAttribute('tabindex') || ot) it = nt(tt, it) + else { + it.focus() + return + } + } + }, + useUtilityClasses$h = (tt) => { + const { + vertical: et, + fixed: nt, + hideScrollbar: rt, + scrollableX: it, + scrollableY: ot, + centered: at, + scrollButtonsHideMobile: st, + classes: lt, + } = tt + return composeClasses( + { + root: ['root', et && 'vertical'], + scroller: ['scroller', nt && 'fixed', rt && 'hideScrollbar', it && 'scrollableX', ot && 'scrollableY'], + flexContainer: ['flexContainer', et && 'flexContainerVertical', at && 'centered'], + indicator: ['indicator'], + scrollButtons: ['scrollButtons', st && 'scrollButtonsHideMobile'], + scrollableX: [it && 'scrollableX'], + hideScrollbar: [rt && 'hideScrollbar'], + }, + getTabsUtilityClass, + lt, + ) + }, + TabsRoot = styled$1('div', { + name: 'MuiTabs', + slot: 'Root', + overridesResolver: (tt, et) => { + const { ownerState: nt } = tt + return [ + { [`& .${tabsClasses$1.scrollButtons}`]: et.scrollButtons }, + { [`& .${tabsClasses$1.scrollButtons}`]: nt.scrollButtonsHideMobile && et.scrollButtonsHideMobile }, + et.root, + nt.vertical && et.vertical, + ] + }, + })(({ ownerState: tt, theme: et }) => + _extends$u( + { overflow: 'hidden', minHeight: 48, WebkitOverflowScrolling: 'touch', display: 'flex' }, + tt.vertical && { flexDirection: 'column' }, + tt.scrollButtonsHideMobile && { + [`& .${tabsClasses$1.scrollButtons}`]: { [et.breakpoints.down('sm')]: { display: 'none' } }, + }, + ), + ), + TabsScroller = styled$1('div', { + name: 'MuiTabs', + slot: 'Scroller', + overridesResolver: (tt, et) => { + const { ownerState: nt } = tt + return [ + et.scroller, + nt.fixed && et.fixed, + nt.hideScrollbar && et.hideScrollbar, + nt.scrollableX && et.scrollableX, + nt.scrollableY && et.scrollableY, + ] + }, + })(({ ownerState: tt }) => + _extends$u( + { position: 'relative', display: 'inline-block', flex: '1 1 auto', whiteSpace: 'nowrap' }, + tt.fixed && { overflowX: 'hidden', width: '100%' }, + tt.hideScrollbar && { scrollbarWidth: 'none', '&::-webkit-scrollbar': { display: 'none' } }, + tt.scrollableX && { overflowX: 'auto', overflowY: 'hidden' }, + tt.scrollableY && { overflowY: 'auto', overflowX: 'hidden' }, + ), + ), + FlexContainer = styled$1('div', { + name: 'MuiTabs', + slot: 'FlexContainer', + overridesResolver: (tt, et) => { + const { ownerState: nt } = tt + return [et.flexContainer, nt.vertical && et.flexContainerVertical, nt.centered && et.centered] + }, + })(({ ownerState: tt }) => + _extends$u( + { display: 'flex' }, + tt.vertical && { flexDirection: 'column' }, + tt.centered && { justifyContent: 'center' }, + ), + ), + TabsIndicator = styled$1('span', { + name: 'MuiTabs', + slot: 'Indicator', + overridesResolver: (tt, et) => et.indicator, + })(({ ownerState: tt, theme: et }) => + _extends$u( + { position: 'absolute', height: 2, bottom: 0, width: '100%', transition: et.transitions.create() }, + tt.indicatorColor === 'primary' && { backgroundColor: (et.vars || et).palette.primary.main }, + tt.indicatorColor === 'secondary' && { backgroundColor: (et.vars || et).palette.secondary.main }, + tt.vertical && { height: '100%', width: 2, right: 0 }, + ), + ), + TabsScrollbarSize = styled$1(ScrollbarSize)({ + overflowX: 'auto', + overflowY: 'hidden', + scrollbarWidth: 'none', + '&::-webkit-scrollbar': { display: 'none' }, + }), + defaultIndicatorStyle = {}, + Tabs = reactExports.forwardRef(function (et, nt) { + const rt = useThemeProps({ props: et, name: 'MuiTabs' }), + it = useTheme(), + ot = it.direction === 'rtl', + { + 'aria-label': at, + 'aria-labelledby': st, + action: lt, + centered: ct = !1, + children: ut, + className: ht, + component: dt = 'div', + allowScrollButtonsMobile: pt = !1, + indicatorColor: mt = 'primary', + onChange: gt, + orientation: yt = 'horizontal', + ScrollButtonComponent: bt = TabScrollButton$1, + scrollButtons: vt = 'auto', + selectionFollowsFocus: xt, + slots: kt = {}, + slotProps: St = {}, + TabIndicatorProps: Tt = {}, + TabScrollButtonProps: At = {}, + textColor: Et = 'primary', + value: $t, + variant: Dt = 'standard', + visibleScrollbar: jt = !1, + } = rt, + Pt = _objectWithoutPropertiesLoose$m(rt, _excluded$K), + Ct = Dt === 'scrollable', + wt = yt === 'vertical', + It = wt ? 'scrollTop' : 'scrollLeft', + Ot = wt ? 'top' : 'left', + Wt = wt ? 'bottom' : 'right', + zt = wt ? 'clientHeight' : 'clientWidth', + Ft = wt ? 'height' : 'width', + Nt = _extends$u({}, rt, { + component: dt, + allowScrollButtonsMobile: pt, + indicatorColor: mt, + orientation: yt, + vertical: wt, + scrollButtons: vt, + textColor: Et, + variant: Dt, + visibleScrollbar: jt, + fixed: !Ct, + hideScrollbar: Ct && !jt, + scrollableX: Ct && !wt, + scrollableY: Ct && wt, + centered: ct && !Ct, + scrollButtonsHideMobile: !pt, + }), + Ut = useUtilityClasses$h(Nt), + Mt = useSlotProps({ + elementType: kt.StartScrollButtonIcon, + externalSlotProps: St.startScrollButtonIcon, + ownerState: Nt, + }), + Ht = useSlotProps({ + elementType: kt.EndScrollButtonIcon, + externalSlotProps: St.endScrollButtonIcon, + ownerState: Nt, + }), + [en, sn] = reactExports.useState(!1), + [Kt, rn] = reactExports.useState(defaultIndicatorStyle), + [nn, hn] = reactExports.useState(!1), + [vn, an] = reactExports.useState(!1), + [Qt, _n] = reactExports.useState(!1), + [Pn, $n] = reactExports.useState({ overflow: 'hidden', scrollbarWidth: 0 }), + Nn = new Map(), + Tn = reactExports.useRef(null), + cn = reactExports.useRef(null), + mn = () => { + const Vn = Tn.current + let qn + if (Vn) { + const Jn = Vn.getBoundingClientRect() + qn = { + clientWidth: Vn.clientWidth, + scrollLeft: Vn.scrollLeft, + scrollTop: Vn.scrollTop, + scrollLeftNormalized: getNormalizedScrollLeft(Vn, it.direction), + scrollWidth: Vn.scrollWidth, + top: Jn.top, + bottom: Jn.bottom, + left: Jn.left, + right: Jn.right, + } + } + let zn + if (Vn && $t !== !1) { + const Jn = cn.current.children + if (Jn.length > 0) { + const Hn = Jn[Nn.get($t)] + zn = Hn ? Hn.getBoundingClientRect() : null + } + } + return { tabsMeta: qn, tabMeta: zn } + }, + In = useEventCallback(() => { + const { tabsMeta: Vn, tabMeta: qn } = mn() + let zn = 0, + Jn + if (wt) (Jn = 'top'), qn && Vn && (zn = qn.top - Vn.top + Vn.scrollTop) + else if (((Jn = ot ? 'right' : 'left'), qn && Vn)) { + const pr = ot ? Vn.scrollLeftNormalized + Vn.clientWidth - Vn.scrollWidth : Vn.scrollLeft + zn = (ot ? -1 : 1) * (qn[Jn] - Vn[Jn] + pr) + } + const Hn = { [Jn]: zn, [Ft]: qn ? qn[Ft] : 0 } + if (isNaN(Kt[Jn]) || isNaN(Kt[Ft])) rn(Hn) + else { + const pr = Math.abs(Kt[Jn] - Hn[Jn]), + fr = Math.abs(Kt[Ft] - Hn[Ft]) + ;(pr >= 1 || fr >= 1) && rn(Hn) + } + }), + An = (Vn, { animation: qn = !0 } = {}) => { + qn ? animate(It, Tn.current, Vn, { duration: it.transitions.duration.standard }) : (Tn.current[It] = Vn) + }, + wn = (Vn) => { + let qn = Tn.current[It] + wt ? (qn += Vn) : ((qn += Vn * (ot ? -1 : 1)), (qn *= ot && detectScrollType() === 'reverse' ? -1 : 1)), + An(qn) + }, + fn = () => { + const Vn = Tn.current[zt] + let qn = 0 + const zn = Array.from(cn.current.children) + for (let Jn = 0; Jn < zn.length; Jn += 1) { + const Hn = zn[Jn] + if (qn + Hn[zt] > Vn) { + Jn === 0 && (qn = Vn) + break + } + qn += Hn[zt] + } + return qn + }, + pn = () => { + wn(-1 * fn()) + }, + kn = () => { + wn(fn()) + }, + Dn = reactExports.useCallback((Vn) => { + $n({ overflow: null, scrollbarWidth: Vn }) + }, []), + un = () => { + const Vn = {} + Vn.scrollbarSizeListener = Ct + ? jsxRuntimeExports.jsx(TabsScrollbarSize, { + onChange: Dn, + className: clsx$3(Ut.scrollableX, Ut.hideScrollbar), + }) + : null + const zn = Ct && ((vt === 'auto' && (nn || vn)) || vt === !0) + return ( + (Vn.scrollButtonStart = zn + ? jsxRuntimeExports.jsx( + bt, + _extends$u( + { + slots: { StartScrollButtonIcon: kt.StartScrollButtonIcon }, + slotProps: { startScrollButtonIcon: Mt }, + orientation: yt, + direction: ot ? 'right' : 'left', + onClick: pn, + disabled: !nn, + }, + At, + { className: clsx$3(Ut.scrollButtons, At.className) }, + ), + ) + : null), + (Vn.scrollButtonEnd = zn + ? jsxRuntimeExports.jsx( + bt, + _extends$u( + { + slots: { EndScrollButtonIcon: kt.EndScrollButtonIcon }, + slotProps: { endScrollButtonIcon: Ht }, + orientation: yt, + direction: ot ? 'left' : 'right', + onClick: kn, + disabled: !vn, + }, + At, + { className: clsx$3(Ut.scrollButtons, At.className) }, + ), + ) + : null), + Vn + ) + }, + Zt = useEventCallback((Vn) => { + const { tabsMeta: qn, tabMeta: zn } = mn() + if (!(!zn || !qn)) { + if (zn[Ot] < qn[Ot]) { + const Jn = qn[It] + (zn[Ot] - qn[Ot]) + An(Jn, { animation: Vn }) + } else if (zn[Wt] > qn[Wt]) { + const Jn = qn[It] + (zn[Wt] - qn[Wt]) + An(Jn, { animation: Vn }) + } + } + }), + Xt = useEventCallback(() => { + Ct && vt !== !1 && _n(!Qt) + }) + reactExports.useEffect(() => { + const Vn = debounce$5(() => { + Tn.current && In() + }), + qn = ownerWindow(Tn.current) + qn.addEventListener('resize', Vn) + let zn + return ( + typeof ResizeObserver < 'u' && + ((zn = new ResizeObserver(Vn)), + Array.from(cn.current.children).forEach((Jn) => { + zn.observe(Jn) + })), + () => { + Vn.clear(), qn.removeEventListener('resize', Vn), zn && zn.disconnect() + } + ) + }, [In]), + reactExports.useEffect(() => { + const Vn = Array.from(cn.current.children), + qn = Vn.length + if (typeof IntersectionObserver < 'u' && qn > 0 && Ct && vt !== !1) { + const zn = Vn[0], + Jn = Vn[qn - 1], + Hn = { root: Tn.current, threshold: 0.99 }, + pr = (Tr) => { + hn(!Tr[0].isIntersecting) + }, + fr = new IntersectionObserver(pr, Hn) + fr.observe(zn) + const xr = (Tr) => { + an(!Tr[0].isIntersecting) + }, + io = new IntersectionObserver(xr, Hn) + return ( + io.observe(Jn), + () => { + fr.disconnect(), io.disconnect() + } + ) + } + }, [Ct, vt, Qt, ut == null ? void 0 : ut.length]), + reactExports.useEffect(() => { + sn(!0) + }, []), + reactExports.useEffect(() => { + In() + }), + reactExports.useEffect(() => { + Zt(defaultIndicatorStyle !== Kt) + }, [Zt, Kt]), + reactExports.useImperativeHandle(lt, () => ({ updateIndicator: In, updateScrollButtons: Xt }), [In, Xt]) + const Sn = jsxRuntimeExports.jsx( + TabsIndicator, + _extends$u({}, Tt, { + className: clsx$3(Ut.indicator, Tt.className), + ownerState: Nt, + style: _extends$u({}, Kt, Tt.style), + }), + ) + let Rn = 0 + const jn = reactExports.Children.map(ut, (Vn) => { + if (!reactExports.isValidElement(Vn)) return null + const qn = Vn.props.value === void 0 ? Rn : Vn.props.value + Nn.set(qn, Rn) + const zn = qn === $t + return ( + (Rn += 1), + reactExports.cloneElement( + Vn, + _extends$u( + { + fullWidth: Dt === 'fullWidth', + indicator: zn && !en && Sn, + selected: zn, + selectionFollowsFocus: xt, + onChange: gt, + textColor: Et, + value: qn, + }, + Rn === 1 && $t === !1 && !Vn.props.tabIndex ? { tabIndex: 0 } : {}, + ), + ) + ) + }), + On = (Vn) => { + const qn = cn.current, + zn = ownerDocument(qn).activeElement + if (zn.getAttribute('role') !== 'tab') return + let Hn = yt === 'horizontal' ? 'ArrowLeft' : 'ArrowUp', + pr = yt === 'horizontal' ? 'ArrowRight' : 'ArrowDown' + switch ((yt === 'horizontal' && ot && ((Hn = 'ArrowRight'), (pr = 'ArrowLeft')), Vn.key)) { + case Hn: + Vn.preventDefault(), moveFocus(qn, zn, previousItem) + break + case pr: + Vn.preventDefault(), moveFocus(qn, zn, nextItem) + break + case 'Home': + Vn.preventDefault(), moveFocus(qn, null, nextItem) + break + case 'End': + Vn.preventDefault(), moveFocus(qn, null, previousItem) + break + } + }, + Zn = un() + return jsxRuntimeExports.jsxs( + TabsRoot, + _extends$u({ className: clsx$3(Ut.root, ht), ownerState: Nt, ref: nt, as: dt }, Pt, { + children: [ + Zn.scrollButtonStart, + Zn.scrollbarSizeListener, + jsxRuntimeExports.jsxs(TabsScroller, { + className: Ut.scroller, + ownerState: Nt, + style: { + overflow: Pn.overflow, + [wt ? `margin${ot ? 'Left' : 'Right'}` : 'marginBottom']: jt ? void 0 : -Pn.scrollbarWidth, + }, + ref: Tn, + children: [ + jsxRuntimeExports.jsx(FlexContainer, { + 'aria-label': at, + 'aria-labelledby': st, + 'aria-orientation': yt === 'vertical' ? 'vertical' : null, + className: Ut.flexContainer, + ownerState: Nt, + onKeyDown: On, + ref: cn, + role: 'tablist', + children: jn, + }), + en && Sn, + ], + }), + Zn.scrollButtonEnd, + ], + }), + ) + }), + Tabs$1 = Tabs + function getTextFieldUtilityClass(tt) { + return generateUtilityClass('MuiTextField', tt) + } + generateUtilityClasses('MuiTextField', ['root']) + const _excluded$J = [ + 'autoComplete', + 'autoFocus', + 'children', + 'className', + 'color', + 'defaultValue', + 'disabled', + 'error', + 'FormHelperTextProps', + 'fullWidth', + 'helperText', + 'id', + 'InputLabelProps', + 'inputProps', + 'InputProps', + 'inputRef', + 'label', + 'maxRows', + 'minRows', + 'multiline', + 'name', + 'onBlur', + 'onChange', + 'onFocus', + 'placeholder', + 'required', + 'rows', + 'select', + 'SelectProps', + 'type', + 'value', + 'variant', + ], + variantComponent = { standard: Input$3, filled: FilledInput$1, outlined: OutlinedInput$1 }, + useUtilityClasses$g = (tt) => { + const { classes: et } = tt + return composeClasses({ root: ['root'] }, getTextFieldUtilityClass, et) + }, + TextFieldRoot = styled$1(FormControl$1, { + name: 'MuiTextField', + slot: 'Root', + overridesResolver: (tt, et) => et.root, + })({}), + TextField = reactExports.forwardRef(function (et, nt) { + const rt = useThemeProps({ props: et, name: 'MuiTextField' }), + { + autoComplete: it, + autoFocus: ot = !1, + children: at, + className: st, + color: lt = 'primary', + defaultValue: ct, + disabled: ut = !1, + error: ht = !1, + FormHelperTextProps: dt, + fullWidth: pt = !1, + helperText: mt, + id: gt, + InputLabelProps: yt, + inputProps: bt, + InputProps: vt, + inputRef: xt, + label: kt, + maxRows: St, + minRows: Tt, + multiline: At = !1, + name: Et, + onBlur: $t, + onChange: Dt, + onFocus: jt, + placeholder: Pt, + required: Ct = !1, + rows: wt, + select: It = !1, + SelectProps: Ot, + type: Wt, + value: zt, + variant: Ft = 'outlined', + } = rt, + Nt = _objectWithoutPropertiesLoose$m(rt, _excluded$J), + Ut = _extends$u({}, rt, { + autoFocus: ot, + color: lt, + disabled: ut, + error: ht, + fullWidth: pt, + multiline: At, + required: Ct, + select: It, + variant: Ft, + }), + Mt = useUtilityClasses$g(Ut), + Ht = {} + Ft === 'outlined' && (yt && typeof yt.shrink < 'u' && (Ht.notched = yt.shrink), (Ht.label = kt)), + It && ((!Ot || !Ot.native) && (Ht.id = void 0), (Ht['aria-describedby'] = void 0)) + const en = useId(gt), + sn = mt && en ? `${en}-helper-text` : void 0, + Kt = kt && en ? `${en}-label` : void 0, + rn = variantComponent[Ft], + nn = jsxRuntimeExports.jsx( + rn, + _extends$u( + { + 'aria-describedby': sn, + autoComplete: it, + autoFocus: ot, + defaultValue: ct, + fullWidth: pt, + multiline: At, + name: Et, + rows: wt, + maxRows: St, + minRows: Tt, + type: Wt, + value: zt, + id: en, + inputRef: xt, + onBlur: $t, + onChange: Dt, + onFocus: jt, + placeholder: Pt, + inputProps: bt, + }, + Ht, + vt, + ), + ) + return jsxRuntimeExports.jsxs( + TextFieldRoot, + _extends$u( + { + className: clsx$3(Mt.root, st), + disabled: ut, + error: ht, + fullWidth: pt, + ref: nt, + required: Ct, + color: lt, + variant: Ft, + ownerState: Ut, + }, + Nt, + { + children: [ + kt != null && + kt !== '' && + jsxRuntimeExports.jsx(InputLabel$1, _extends$u({ htmlFor: en, id: Kt }, yt, { children: kt })), + It + ? jsxRuntimeExports.jsx( + Select$4, + _extends$u({ 'aria-describedby': sn, id: en, labelId: Kt, value: zt, input: nn }, Ot, { + children: at, + }), + ) + : nn, + mt && jsxRuntimeExports.jsx(FormHelperText$1, _extends$u({ id: sn }, dt, { children: mt })), + ], + }, + ), + ) + }), + MuiTextField = TextField + function r$6(tt) { + var et, + nt, + rt = '' + if (typeof tt == 'string' || typeof tt == 'number') rt += tt + else if (typeof tt == 'object') + if (Array.isArray(tt)) + for (et = 0; et < tt.length; et++) tt[et] && (nt = r$6(tt[et])) && (rt && (rt += ' '), (rt += nt)) + else for (et in tt) tt[et] && (rt && (rt += ' '), (rt += et)) + return rt + } + function clsx$1() { + for (var tt, et, nt = 0, rt = ''; nt < arguments.length; ) + (tt = arguments[nt++]) && (et = r$6(tt)) && (rt && (rt += ' '), (rt += et)) + return rt + } + var dist$1 = {}, + identifier = {}, + assert$p = { exports: {} }, + errors$3 = {}, + util$1 = {}, + types$7 = {}, + shams$1 = function () { + if (typeof Symbol != 'function' || typeof Object.getOwnPropertySymbols != 'function') return !1 + if (typeof Symbol.iterator == 'symbol') return !0 + var et = {}, + nt = Symbol('test'), + rt = Object(nt) + if ( + typeof nt == 'string' || + Object.prototype.toString.call(nt) !== '[object Symbol]' || + Object.prototype.toString.call(rt) !== '[object Symbol]' + ) + return !1 + var it = 42 + et[nt] = it + for (nt in et) return !1 + if ( + (typeof Object.keys == 'function' && Object.keys(et).length !== 0) || + (typeof Object.getOwnPropertyNames == 'function' && Object.getOwnPropertyNames(et).length !== 0) + ) + return !1 + var ot = Object.getOwnPropertySymbols(et) + if (ot.length !== 1 || ot[0] !== nt || !Object.prototype.propertyIsEnumerable.call(et, nt)) return !1 + if (typeof Object.getOwnPropertyDescriptor == 'function') { + var at = Object.getOwnPropertyDescriptor(et, nt) + if (at.value !== it || at.enumerable !== !0) return !1 + } + return !0 + }, + hasSymbols$3 = shams$1, + shams = function () { + return hasSymbols$3() && !!Symbol.toStringTag + }, + origSymbol = typeof Symbol < 'u' && Symbol, + hasSymbolSham = shams$1, + hasSymbols$2 = function () { + return typeof origSymbol != 'function' || + typeof Symbol != 'function' || + typeof origSymbol('foo') != 'symbol' || + typeof Symbol('bar') != 'symbol' + ? !1 + : hasSymbolSham() + }, + test = { foo: {} }, + $Object = Object, + hasProto$1 = function () { + return { __proto__: test }.foo === test.foo && !({ __proto__: null } instanceof $Object) + }, + ERROR_MESSAGE = 'Function.prototype.bind called on incompatible ', + toStr$4 = Object.prototype.toString, + max$3 = Math.max, + funcType = '[object Function]', + concatty = function (et, nt) { + for (var rt = [], it = 0; it < et.length; it += 1) rt[it] = et[it] + for (var ot = 0; ot < nt.length; ot += 1) rt[ot + et.length] = nt[ot] + return rt + }, + slicy = function (et, nt) { + for (var rt = [], it = nt || 0, ot = 0; it < et.length; it += 1, ot += 1) rt[ot] = et[it] + return rt + }, + joiny = function (tt, et) { + for (var nt = '', rt = 0; rt < tt.length; rt += 1) (nt += tt[rt]), rt + 1 < tt.length && (nt += et) + return nt + }, + implementation$7 = function (et) { + var nt = this + if (typeof nt != 'function' || toStr$4.apply(nt) !== funcType) throw new TypeError(ERROR_MESSAGE + nt) + for ( + var rt = slicy(arguments, 1), + it, + ot = function () { + if (this instanceof it) { + var ut = nt.apply(this, concatty(rt, arguments)) + return Object(ut) === ut ? ut : this + } + return nt.apply(et, concatty(rt, arguments)) + }, + at = max$3(0, nt.length - rt.length), + st = [], + lt = 0; + lt < at; + lt++ + ) + st[lt] = '$' + lt + if ( + ((it = Function( + 'binder', + 'return function (' + joiny(st, ',') + '){ return binder.apply(this,arguments); }', + )(ot)), + nt.prototype) + ) { + var ct = function () {} + ;(ct.prototype = nt.prototype), (it.prototype = new ct()), (ct.prototype = null) + } + return it + }, + implementation$6 = implementation$7, + functionBind = Function.prototype.bind || implementation$6, + hasOwnProperty$f = {}.hasOwnProperty, + call$1 = Function.prototype.call, + src$2 = call$1.bind + ? call$1.bind(hasOwnProperty$f) + : function (tt, et) { + return call$1.call(hasOwnProperty$f, tt, et) + }, + undefined$1, + $SyntaxError = SyntaxError, + $Function = Function, + $TypeError = TypeError, + getEvalledConstructor = function (tt) { + try { + return $Function('"use strict"; return (' + tt + ').constructor;')() + } catch {} + }, + $gOPD$1 = Object.getOwnPropertyDescriptor + if ($gOPD$1) + try { + $gOPD$1({}, '') + } catch { + $gOPD$1 = null + } + var throwTypeError = function () { + throw new $TypeError() + }, + ThrowTypeError = $gOPD$1 + ? (function () { + try { + return arguments.callee, throwTypeError + } catch { + try { + return $gOPD$1(arguments, 'callee').get + } catch { + return throwTypeError + } + } + })() + : throwTypeError, + hasSymbols$1 = hasSymbols$2(), + hasProto = hasProto$1(), + getProto$1 = + Object.getPrototypeOf || + (hasProto + ? function (tt) { + return tt.__proto__ + } + : null), + needsEval = {}, + TypedArray = typeof Uint8Array > 'u' || !getProto$1 ? undefined$1 : getProto$1(Uint8Array), + INTRINSICS = { + '%AggregateError%': typeof AggregateError > 'u' ? undefined$1 : AggregateError, + '%Array%': Array, + '%ArrayBuffer%': typeof ArrayBuffer > 'u' ? undefined$1 : ArrayBuffer, + '%ArrayIteratorPrototype%': hasSymbols$1 && getProto$1 ? getProto$1([][Symbol.iterator]()) : undefined$1, + '%AsyncFromSyncIteratorPrototype%': undefined$1, + '%AsyncFunction%': needsEval, + '%AsyncGenerator%': needsEval, + '%AsyncGeneratorFunction%': needsEval, + '%AsyncIteratorPrototype%': needsEval, + '%Atomics%': typeof Atomics > 'u' ? undefined$1 : Atomics, + '%BigInt%': typeof BigInt > 'u' ? undefined$1 : BigInt, + '%BigInt64Array%': typeof BigInt64Array > 'u' ? undefined$1 : BigInt64Array, + '%BigUint64Array%': typeof BigUint64Array > 'u' ? undefined$1 : BigUint64Array, + '%Boolean%': Boolean, + '%DataView%': typeof DataView > 'u' ? undefined$1 : DataView, + '%Date%': Date, + '%decodeURI%': decodeURI, + '%decodeURIComponent%': decodeURIComponent, + '%encodeURI%': encodeURI, + '%encodeURIComponent%': encodeURIComponent, + '%Error%': Error, + '%eval%': eval, + '%EvalError%': EvalError, + '%Float32Array%': typeof Float32Array > 'u' ? undefined$1 : Float32Array, + '%Float64Array%': typeof Float64Array > 'u' ? undefined$1 : Float64Array, + '%FinalizationRegistry%': typeof FinalizationRegistry > 'u' ? undefined$1 : FinalizationRegistry, + '%Function%': $Function, + '%GeneratorFunction%': needsEval, + '%Int8Array%': typeof Int8Array > 'u' ? undefined$1 : Int8Array, + '%Int16Array%': typeof Int16Array > 'u' ? undefined$1 : Int16Array, + '%Int32Array%': typeof Int32Array > 'u' ? undefined$1 : Int32Array, + '%isFinite%': isFinite, + '%isNaN%': isNaN, + '%IteratorPrototype%': hasSymbols$1 && getProto$1 ? getProto$1(getProto$1([][Symbol.iterator]())) : undefined$1, + '%JSON%': typeof JSON == 'object' ? JSON : undefined$1, + '%Map%': typeof Map > 'u' ? undefined$1 : Map, + '%MapIteratorPrototype%': + typeof Map > 'u' || !hasSymbols$1 || !getProto$1 ? undefined$1 : getProto$1(new Map()[Symbol.iterator]()), + '%Math%': Math, + '%Number%': Number, + '%Object%': Object, + '%parseFloat%': parseFloat, + '%parseInt%': parseInt, + '%Promise%': typeof Promise > 'u' ? undefined$1 : Promise, + '%Proxy%': typeof Proxy > 'u' ? undefined$1 : Proxy, + '%RangeError%': RangeError, + '%ReferenceError%': ReferenceError, + '%Reflect%': typeof Reflect > 'u' ? undefined$1 : Reflect, + '%RegExp%': RegExp, + '%Set%': typeof Set > 'u' ? undefined$1 : Set, + '%SetIteratorPrototype%': + typeof Set > 'u' || !hasSymbols$1 || !getProto$1 ? undefined$1 : getProto$1(new Set()[Symbol.iterator]()), + '%SharedArrayBuffer%': typeof SharedArrayBuffer > 'u' ? undefined$1 : SharedArrayBuffer, + '%String%': String, + '%StringIteratorPrototype%': hasSymbols$1 && getProto$1 ? getProto$1(''[Symbol.iterator]()) : undefined$1, + '%Symbol%': hasSymbols$1 ? Symbol : undefined$1, + '%SyntaxError%': $SyntaxError, + '%ThrowTypeError%': ThrowTypeError, + '%TypedArray%': TypedArray, + '%TypeError%': $TypeError, + '%Uint8Array%': typeof Uint8Array > 'u' ? undefined$1 : Uint8Array, + '%Uint8ClampedArray%': typeof Uint8ClampedArray > 'u' ? undefined$1 : Uint8ClampedArray, + '%Uint16Array%': typeof Uint16Array > 'u' ? undefined$1 : Uint16Array, + '%Uint32Array%': typeof Uint32Array > 'u' ? undefined$1 : Uint32Array, + '%URIError%': URIError, + '%WeakMap%': typeof WeakMap > 'u' ? undefined$1 : WeakMap, + '%WeakRef%': typeof WeakRef > 'u' ? undefined$1 : WeakRef, + '%WeakSet%': typeof WeakSet > 'u' ? undefined$1 : WeakSet, + } + if (getProto$1) + try { + null.error + } catch (tt) { + var errorProto = getProto$1(getProto$1(tt)) + INTRINSICS['%Error.prototype%'] = errorProto + } + var doEval = function tt(et) { + var nt + if (et === '%AsyncFunction%') nt = getEvalledConstructor('async function () {}') + else if (et === '%GeneratorFunction%') nt = getEvalledConstructor('function* () {}') + else if (et === '%AsyncGeneratorFunction%') nt = getEvalledConstructor('async function* () {}') + else if (et === '%AsyncGenerator%') { + var rt = tt('%AsyncGeneratorFunction%') + rt && (nt = rt.prototype) + } else if (et === '%AsyncIteratorPrototype%') { + var it = tt('%AsyncGenerator%') + it && getProto$1 && (nt = getProto$1(it.prototype)) + } + return (INTRINSICS[et] = nt), nt + }, + LEGACY_ALIASES = { + '%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'], + '%ArrayPrototype%': ['Array', 'prototype'], + '%ArrayProto_entries%': ['Array', 'prototype', 'entries'], + '%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'], + '%ArrayProto_keys%': ['Array', 'prototype', 'keys'], + '%ArrayProto_values%': ['Array', 'prototype', 'values'], + '%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'], + '%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'], + '%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'], + '%BooleanPrototype%': ['Boolean', 'prototype'], + '%DataViewPrototype%': ['DataView', 'prototype'], + '%DatePrototype%': ['Date', 'prototype'], + '%ErrorPrototype%': ['Error', 'prototype'], + '%EvalErrorPrototype%': ['EvalError', 'prototype'], + '%Float32ArrayPrototype%': ['Float32Array', 'prototype'], + '%Float64ArrayPrototype%': ['Float64Array', 'prototype'], + '%FunctionPrototype%': ['Function', 'prototype'], + '%Generator%': ['GeneratorFunction', 'prototype'], + '%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'], + '%Int8ArrayPrototype%': ['Int8Array', 'prototype'], + '%Int16ArrayPrototype%': ['Int16Array', 'prototype'], + '%Int32ArrayPrototype%': ['Int32Array', 'prototype'], + '%JSONParse%': ['JSON', 'parse'], + '%JSONStringify%': ['JSON', 'stringify'], + '%MapPrototype%': ['Map', 'prototype'], + '%NumberPrototype%': ['Number', 'prototype'], + '%ObjectPrototype%': ['Object', 'prototype'], + '%ObjProto_toString%': ['Object', 'prototype', 'toString'], + '%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'], + '%PromisePrototype%': ['Promise', 'prototype'], + '%PromiseProto_then%': ['Promise', 'prototype', 'then'], + '%Promise_all%': ['Promise', 'all'], + '%Promise_reject%': ['Promise', 'reject'], + '%Promise_resolve%': ['Promise', 'resolve'], + '%RangeErrorPrototype%': ['RangeError', 'prototype'], + '%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'], + '%RegExpPrototype%': ['RegExp', 'prototype'], + '%SetPrototype%': ['Set', 'prototype'], + '%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'], + '%StringPrototype%': ['String', 'prototype'], + '%SymbolPrototype%': ['Symbol', 'prototype'], + '%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'], + '%TypedArrayPrototype%': ['TypedArray', 'prototype'], + '%TypeErrorPrototype%': ['TypeError', 'prototype'], + '%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'], + '%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'], + '%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'], + '%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'], + '%URIErrorPrototype%': ['URIError', 'prototype'], + '%WeakMapPrototype%': ['WeakMap', 'prototype'], + '%WeakSetPrototype%': ['WeakSet', 'prototype'], + }, + bind = functionBind, + hasOwn$1 = src$2, + $concat = bind.call(Function.call, Array.prototype.concat), + $spliceApply = bind.call(Function.apply, Array.prototype.splice), + $replace = bind.call(Function.call, String.prototype.replace), + $strSlice = bind.call(Function.call, String.prototype.slice), + $exec = bind.call(Function.call, RegExp.prototype.exec), + rePropName$1 = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g, + reEscapeChar$1 = /\\(\\)?/g, + stringToPath$2 = function (et) { + var nt = $strSlice(et, 0, 1), + rt = $strSlice(et, -1) + if (nt === '%' && rt !== '%') throw new $SyntaxError('invalid intrinsic syntax, expected closing `%`') + if (rt === '%' && nt !== '%') throw new $SyntaxError('invalid intrinsic syntax, expected opening `%`') + var it = [] + return ( + $replace(et, rePropName$1, function (ot, at, st, lt) { + it[it.length] = st ? $replace(lt, reEscapeChar$1, '$1') : at || ot + }), + it + ) + }, + getBaseIntrinsic = function (et, nt) { + var rt = et, + it + if ( + (hasOwn$1(LEGACY_ALIASES, rt) && ((it = LEGACY_ALIASES[rt]), (rt = '%' + it[0] + '%')), + hasOwn$1(INTRINSICS, rt)) + ) { + var ot = INTRINSICS[rt] + if ((ot === needsEval && (ot = doEval(rt)), typeof ot > 'u' && !nt)) + throw new $TypeError('intrinsic ' + et + ' exists, but is not available. Please file an issue!') + return { alias: it, name: rt, value: ot } + } + throw new $SyntaxError('intrinsic ' + et + ' does not exist!') + }, + getIntrinsic = function (et, nt) { + if (typeof et != 'string' || et.length === 0) throw new $TypeError('intrinsic name must be a non-empty string') + if (arguments.length > 1 && typeof nt != 'boolean') + throw new $TypeError('"allowMissing" argument must be a boolean') + if ($exec(/^%?[^%]*%?$/, et) === null) + throw new $SyntaxError('`%` may not be present anywhere but at the beginning and end of the intrinsic name') + var rt = stringToPath$2(et), + it = rt.length > 0 ? rt[0] : '', + ot = getBaseIntrinsic('%' + it + '%', nt), + at = ot.name, + st = ot.value, + lt = !1, + ct = ot.alias + ct && ((it = ct[0]), $spliceApply(rt, $concat([0, 1], ct))) + for (var ut = 1, ht = !0; ut < rt.length; ut += 1) { + var dt = rt[ut], + pt = $strSlice(dt, 0, 1), + mt = $strSlice(dt, -1) + if ((pt === '"' || pt === "'" || pt === '`' || mt === '"' || mt === "'" || mt === '`') && pt !== mt) + throw new $SyntaxError('property names with quotes must have matching quotes') + if ( + ((dt === 'constructor' || !ht) && (lt = !0), + (it += '.' + dt), + (at = '%' + it + '%'), + hasOwn$1(INTRINSICS, at)) + ) + st = INTRINSICS[at] + else if (st != null) { + if (!(dt in st)) { + if (!nt) throw new $TypeError('base intrinsic for ' + et + ' exists, but the property is not available.') + return + } + if ($gOPD$1 && ut + 1 >= rt.length) { + var gt = $gOPD$1(st, dt) + ;(ht = !!gt), ht && 'get' in gt && !('originalValue' in gt.get) ? (st = gt.get) : (st = st[dt]) + } else (ht = hasOwn$1(st, dt)), (st = st[dt]) + ht && !lt && (INTRINSICS[at] = st) + } + } + return st + }, + callBind$2 = { exports: {} } + ;(function (tt) { + var et = functionBind, + nt = getIntrinsic, + rt = nt('%Function.prototype.apply%'), + it = nt('%Function.prototype.call%'), + ot = nt('%Reflect.apply%', !0) || et.call(it, rt), + at = nt('%Object.getOwnPropertyDescriptor%', !0), + st = nt('%Object.defineProperty%', !0), + lt = nt('%Math.max%') + if (st) + try { + st({}, 'a', { value: 1 }) + } catch { + st = null + } + tt.exports = function (ht) { + var dt = ot(et, it, arguments) + if (at && st) { + var pt = at(dt, 'length') + pt.configurable && st(dt, 'length', { value: 1 + lt(0, ht.length - (arguments.length - 1)) }) + } + return dt + } + var ct = function () { + return ot(et, rt, arguments) + } + st ? st(tt.exports, 'apply', { value: ct }) : (tt.exports.apply = ct) + })(callBind$2) + var callBindExports = callBind$2.exports, + GetIntrinsic$1 = getIntrinsic, + callBind$1 = callBindExports, + $indexOf$1 = callBind$1(GetIntrinsic$1('String.prototype.indexOf')), + callBound$3 = function (et, nt) { + var rt = GetIntrinsic$1(et, !!nt) + return typeof rt == 'function' && $indexOf$1(et, '.prototype.') > -1 ? callBind$1(rt) : rt + }, + hasToStringTag$3 = shams(), + callBound$2 = callBound$3, + $toString$1 = callBound$2('Object.prototype.toString'), + isStandardArguments = function (et) { + return hasToStringTag$3 && et && typeof et == 'object' && Symbol.toStringTag in et + ? !1 + : $toString$1(et) === '[object Arguments]' + }, + isLegacyArguments = function (et) { + return isStandardArguments(et) + ? !0 + : et !== null && + typeof et == 'object' && + typeof et.length == 'number' && + et.length >= 0 && + $toString$1(et) !== '[object Array]' && + $toString$1(et.callee) === '[object Function]' + }, + supportsStandardArguments = (function () { + return isStandardArguments(arguments) + })() + isStandardArguments.isLegacyArguments = isLegacyArguments + var isArguments$5 = supportsStandardArguments ? isStandardArguments : isLegacyArguments, + toStr$3 = Object.prototype.toString, + fnToStr$1 = Function.prototype.toString, + isFnRegex = /^\s*(?:function)?\*/, + hasToStringTag$2 = shams(), + getProto = Object.getPrototypeOf, + getGeneratorFunc = function () { + if (!hasToStringTag$2) return !1 + try { + return Function('return function*() {}')() + } catch {} + }, + GeneratorFunction, + isGeneratorFunction = function (et) { + if (typeof et != 'function') return !1 + if (isFnRegex.test(fnToStr$1.call(et))) return !0 + if (!hasToStringTag$2) { + var nt = toStr$3.call(et) + return nt === '[object GeneratorFunction]' + } + if (!getProto) return !1 + if (typeof GeneratorFunction > 'u') { + var rt = getGeneratorFunc() + GeneratorFunction = rt ? getProto(rt) : !1 + } + return getProto(et) === GeneratorFunction + }, + fnToStr = Function.prototype.toString, + reflectApply = typeof Reflect == 'object' && Reflect !== null && Reflect.apply, + badArrayLike, + isCallableMarker + if (typeof reflectApply == 'function' && typeof Object.defineProperty == 'function') + try { + ;(badArrayLike = Object.defineProperty({}, 'length', { + get: function () { + throw isCallableMarker + }, + })), + (isCallableMarker = {}), + reflectApply( + function () { + throw 42 + }, + null, + badArrayLike, + ) + } catch (tt) { + tt !== isCallableMarker && (reflectApply = null) + } + else reflectApply = null + var constructorRegex = /^\s*class\b/, + isES6ClassFn = function (et) { + try { + var nt = fnToStr.call(et) + return constructorRegex.test(nt) + } catch { + return !1 + } + }, + tryFunctionObject = function (et) { + try { + return isES6ClassFn(et) ? !1 : (fnToStr.call(et), !0) + } catch { + return !1 + } + }, + toStr$2 = Object.prototype.toString, + objectClass = '[object Object]', + fnClass = '[object Function]', + genClass = '[object GeneratorFunction]', + ddaClass = '[object HTMLAllCollection]', + ddaClass2 = '[object HTML document.all class]', + ddaClass3 = '[object HTMLCollection]', + hasToStringTag$1 = typeof Symbol == 'function' && !!Symbol.toStringTag, + isIE68 = !(0 in [,]), + isDDA = function () { + return !1 + } + if (typeof document == 'object') { + var all = document.all + toStr$2.call(all) === toStr$2.call(document.all) && + (isDDA = function (et) { + if ((isIE68 || !et) && (typeof et > 'u' || typeof et == 'object')) + try { + var nt = toStr$2.call(et) + return (nt === ddaClass || nt === ddaClass2 || nt === ddaClass3 || nt === objectClass) && et('') == null + } catch {} + return !1 + }) + } + var isCallable$1 = reflectApply + ? function (et) { + if (isDDA(et)) return !0 + if (!et || (typeof et != 'function' && typeof et != 'object')) return !1 + try { + reflectApply(et, null, badArrayLike) + } catch (nt) { + if (nt !== isCallableMarker) return !1 + } + return !isES6ClassFn(et) && tryFunctionObject(et) + } + : function (et) { + if (isDDA(et)) return !0 + if (!et || (typeof et != 'function' && typeof et != 'object')) return !1 + if (hasToStringTag$1) return tryFunctionObject(et) + if (isES6ClassFn(et)) return !1 + var nt = toStr$2.call(et) + return nt !== fnClass && nt !== genClass && !/^\[object HTML/.test(nt) ? !1 : tryFunctionObject(et) + }, + isCallable = isCallable$1, + toStr$1 = Object.prototype.toString, + hasOwnProperty$e = Object.prototype.hasOwnProperty, + forEachArray = function (et, nt, rt) { + for (var it = 0, ot = et.length; it < ot; it++) + hasOwnProperty$e.call(et, it) && (rt == null ? nt(et[it], it, et) : nt.call(rt, et[it], it, et)) + }, + forEachString = function (et, nt, rt) { + for (var it = 0, ot = et.length; it < ot; it++) + rt == null ? nt(et.charAt(it), it, et) : nt.call(rt, et.charAt(it), it, et) + }, + forEachObject = function (et, nt, rt) { + for (var it in et) + hasOwnProperty$e.call(et, it) && (rt == null ? nt(et[it], it, et) : nt.call(rt, et[it], it, et)) + }, + forEach$1 = function (et, nt, rt) { + if (!isCallable(nt)) throw new TypeError('iterator must be a function') + var it + arguments.length >= 3 && (it = rt), + toStr$1.call(et) === '[object Array]' + ? forEachArray(et, nt, it) + : typeof et == 'string' + ? forEachString(et, nt, it) + : forEachObject(et, nt, it) + }, + forEach_1 = forEach$1, + possibleNames = [ + 'BigInt64Array', + 'BigUint64Array', + 'Float32Array', + 'Float64Array', + 'Int16Array', + 'Int32Array', + 'Int8Array', + 'Uint16Array', + 'Uint32Array', + 'Uint8Array', + 'Uint8ClampedArray', + ], + g$3 = typeof globalThis > 'u' ? commonjsGlobal : globalThis, + availableTypedArrays$1 = function () { + for (var et = [], nt = 0; nt < possibleNames.length; nt++) + typeof g$3[possibleNames[nt]] == 'function' && (et[et.length] = possibleNames[nt]) + return et + }, + GetIntrinsic = getIntrinsic, + $gOPD = GetIntrinsic('%Object.getOwnPropertyDescriptor%', !0) + if ($gOPD) + try { + $gOPD([], 'length') + } catch { + $gOPD = null + } + var gopd = $gOPD, + forEach = forEach_1, + availableTypedArrays = availableTypedArrays$1, + callBind = callBindExports, + callBound$1 = callBound$3, + gOPD = gopd, + $toString = callBound$1('Object.prototype.toString'), + hasToStringTag = shams(), + g$2 = typeof globalThis > 'u' ? commonjsGlobal : globalThis, + typedArrays = availableTypedArrays(), + $slice = callBound$1('String.prototype.slice'), + getPrototypeOf = Object.getPrototypeOf, + $indexOf = + callBound$1('Array.prototype.indexOf', !0) || + function (et, nt) { + for (var rt = 0; rt < et.length; rt += 1) if (et[rt] === nt) return rt + return -1 + }, + cache$1 = { __proto__: null } + hasToStringTag && gOPD && getPrototypeOf + ? forEach(typedArrays, function (tt) { + var et = new g$2[tt]() + if (Symbol.toStringTag in et) { + var nt = getPrototypeOf(et), + rt = gOPD(nt, Symbol.toStringTag) + if (!rt) { + var it = getPrototypeOf(nt) + rt = gOPD(it, Symbol.toStringTag) + } + cache$1['$' + tt] = callBind(rt.get) + } + }) + : forEach(typedArrays, function (tt) { + var et = new g$2[tt]() + cache$1['$' + tt] = callBind(et.slice) + }) + var tryTypedArrays = function (et) { + var nt = !1 + return ( + forEach(cache$1, function (rt, it) { + if (!nt) + try { + '$' + rt(et) === it && (nt = $slice(it, 1)) + } catch {} + }), + nt + ) + }, + trySlices = function (et) { + var nt = !1 + return ( + forEach(cache$1, function (rt, it) { + if (!nt) + try { + rt(et), (nt = $slice(it, 1)) + } catch {} + }), + nt + ) + }, + whichTypedArray$1 = function (et) { + if (!et || typeof et != 'object') return !1 + if (!hasToStringTag) { + var nt = $slice($toString(et), 8, -1) + return $indexOf(typedArrays, nt) > -1 ? nt : nt !== 'Object' ? !1 : trySlices(et) + } + return gOPD ? tryTypedArrays(et) : null + }, + whichTypedArray = whichTypedArray$1, + isTypedArray$5 = function (et) { + return !!whichTypedArray(et) + } + ;(function (tt) { + var et = isArguments$5, + nt = isGeneratorFunction, + rt = whichTypedArray$1, + it = isTypedArray$5 + function ot(mn) { + return mn.call.bind(mn) + } + var at = typeof BigInt < 'u', + st = typeof Symbol < 'u', + lt = ot(Object.prototype.toString), + ct = ot(Number.prototype.valueOf), + ut = ot(String.prototype.valueOf), + ht = ot(Boolean.prototype.valueOf) + if (at) var dt = ot(BigInt.prototype.valueOf) + if (st) var pt = ot(Symbol.prototype.valueOf) + function mt(mn, In) { + if (typeof mn != 'object') return !1 + try { + return In(mn), !0 + } catch { + return !1 + } + } + ;(tt.isArgumentsObject = et), (tt.isGeneratorFunction = nt), (tt.isTypedArray = it) + function gt(mn) { + return ( + (typeof Promise < 'u' && mn instanceof Promise) || + (mn !== null && typeof mn == 'object' && typeof mn.then == 'function' && typeof mn.catch == 'function') + ) + } + tt.isPromise = gt + function yt(mn) { + return typeof ArrayBuffer < 'u' && ArrayBuffer.isView ? ArrayBuffer.isView(mn) : it(mn) || Ht(mn) + } + tt.isArrayBufferView = yt + function bt(mn) { + return rt(mn) === 'Uint8Array' + } + tt.isUint8Array = bt + function vt(mn) { + return rt(mn) === 'Uint8ClampedArray' + } + tt.isUint8ClampedArray = vt + function xt(mn) { + return rt(mn) === 'Uint16Array' + } + tt.isUint16Array = xt + function kt(mn) { + return rt(mn) === 'Uint32Array' + } + tt.isUint32Array = kt + function St(mn) { + return rt(mn) === 'Int8Array' + } + tt.isInt8Array = St + function Tt(mn) { + return rt(mn) === 'Int16Array' + } + tt.isInt16Array = Tt + function At(mn) { + return rt(mn) === 'Int32Array' + } + tt.isInt32Array = At + function Et(mn) { + return rt(mn) === 'Float32Array' + } + tt.isFloat32Array = Et + function $t(mn) { + return rt(mn) === 'Float64Array' + } + tt.isFloat64Array = $t + function Dt(mn) { + return rt(mn) === 'BigInt64Array' + } + tt.isBigInt64Array = Dt + function jt(mn) { + return rt(mn) === 'BigUint64Array' + } + tt.isBigUint64Array = jt + function Pt(mn) { + return lt(mn) === '[object Map]' + } + Pt.working = typeof Map < 'u' && Pt(new Map()) + function Ct(mn) { + return typeof Map > 'u' ? !1 : Pt.working ? Pt(mn) : mn instanceof Map + } + tt.isMap = Ct + function wt(mn) { + return lt(mn) === '[object Set]' + } + wt.working = typeof Set < 'u' && wt(new Set()) + function It(mn) { + return typeof Set > 'u' ? !1 : wt.working ? wt(mn) : mn instanceof Set + } + tt.isSet = It + function Ot(mn) { + return lt(mn) === '[object WeakMap]' + } + Ot.working = typeof WeakMap < 'u' && Ot(new WeakMap()) + function Wt(mn) { + return typeof WeakMap > 'u' ? !1 : Ot.working ? Ot(mn) : mn instanceof WeakMap + } + tt.isWeakMap = Wt + function zt(mn) { + return lt(mn) === '[object WeakSet]' + } + zt.working = typeof WeakSet < 'u' && zt(new WeakSet()) + function Ft(mn) { + return zt(mn) + } + tt.isWeakSet = Ft + function Nt(mn) { + return lt(mn) === '[object ArrayBuffer]' + } + Nt.working = typeof ArrayBuffer < 'u' && Nt(new ArrayBuffer()) + function Ut(mn) { + return typeof ArrayBuffer > 'u' ? !1 : Nt.working ? Nt(mn) : mn instanceof ArrayBuffer + } + tt.isArrayBuffer = Ut + function Mt(mn) { + return lt(mn) === '[object DataView]' + } + Mt.working = typeof ArrayBuffer < 'u' && typeof DataView < 'u' && Mt(new DataView(new ArrayBuffer(1), 0, 1)) + function Ht(mn) { + return typeof DataView > 'u' ? !1 : Mt.working ? Mt(mn) : mn instanceof DataView + } + tt.isDataView = Ht + var en = typeof SharedArrayBuffer < 'u' ? SharedArrayBuffer : void 0 + function sn(mn) { + return lt(mn) === '[object SharedArrayBuffer]' + } + function Kt(mn) { + return typeof en > 'u' + ? !1 + : (typeof sn.working > 'u' && (sn.working = sn(new en())), sn.working ? sn(mn) : mn instanceof en) + } + tt.isSharedArrayBuffer = Kt + function rn(mn) { + return lt(mn) === '[object AsyncFunction]' + } + tt.isAsyncFunction = rn + function nn(mn) { + return lt(mn) === '[object Map Iterator]' + } + tt.isMapIterator = nn + function hn(mn) { + return lt(mn) === '[object Set Iterator]' + } + tt.isSetIterator = hn + function vn(mn) { + return lt(mn) === '[object Generator]' + } + tt.isGeneratorObject = vn + function an(mn) { + return lt(mn) === '[object WebAssembly.Module]' + } + tt.isWebAssemblyCompiledModule = an + function Qt(mn) { + return mt(mn, ct) + } + tt.isNumberObject = Qt + function _n(mn) { + return mt(mn, ut) + } + tt.isStringObject = _n + function Pn(mn) { + return mt(mn, ht) + } + tt.isBooleanObject = Pn + function $n(mn) { + return at && mt(mn, dt) + } + tt.isBigIntObject = $n + function Nn(mn) { + return st && mt(mn, pt) + } + tt.isSymbolObject = Nn + function Tn(mn) { + return Qt(mn) || _n(mn) || Pn(mn) || $n(mn) || Nn(mn) + } + tt.isBoxedPrimitive = Tn + function cn(mn) { + return typeof Uint8Array < 'u' && (Ut(mn) || Kt(mn)) + } + ;(tt.isAnyArrayBuffer = cn), + ['isProxy', 'isExternal', 'isModuleNamespaceObject'].forEach(function (mn) { + Object.defineProperty(tt, mn, { + enumerable: !1, + value: function () { + throw new Error(mn + ' is not supported in userland') + }, + }) + }) + })(types$7) + var isBufferBrowser = function (et) { + return ( + et && + typeof et == 'object' && + typeof et.copy == 'function' && + typeof et.fill == 'function' && + typeof et.readUInt8 == 'function' + ) + }, + inherits_browser = { exports: {} } + typeof Object.create == 'function' + ? (inherits_browser.exports = function (et, nt) { + nt && + ((et.super_ = nt), + (et.prototype = Object.create(nt.prototype, { + constructor: { value: et, enumerable: !1, writable: !0, configurable: !0 }, + }))) + }) + : (inherits_browser.exports = function (et, nt) { + if (nt) { + et.super_ = nt + var rt = function () {} + ;(rt.prototype = nt.prototype), (et.prototype = new rt()), (et.prototype.constructor = et) + } + }) + var inherits_browserExports = inherits_browser.exports + ;(function (tt) { + var et = + Object.getOwnPropertyDescriptors || + function (Ht) { + for (var en = Object.keys(Ht), sn = {}, Kt = 0; Kt < en.length; Kt++) + sn[en[Kt]] = Object.getOwnPropertyDescriptor(Ht, en[Kt]) + return sn + }, + nt = /%[sdj%]/g + ;(tt.format = function (Mt) { + if (!St(Mt)) { + for (var Ht = [], en = 0; en < arguments.length; en++) Ht.push(at(arguments[en])) + return Ht.join(' ') + } + for ( + var en = 1, + sn = arguments, + Kt = sn.length, + rn = String(Mt).replace(nt, function (hn) { + if (hn === '%%') return '%' + if (en >= Kt) return hn + switch (hn) { + case '%s': + return String(sn[en++]) + case '%d': + return Number(sn[en++]) + case '%j': + try { + return JSON.stringify(sn[en++]) + } catch { + return '[Circular]' + } + default: + return hn + } + }), + nn = sn[en]; + en < Kt; + nn = sn[++en] + ) + vt(nn) || !$t(nn) ? (rn += ' ' + nn) : (rn += ' ' + at(nn)) + return rn + }), + (tt.deprecate = function (Mt, Ht) { + if (typeof process < 'u' && process.noDeprecation === !0) return Mt + if (typeof process > 'u') + return function () { + return tt.deprecate(Mt, Ht).apply(this, arguments) + } + var en = !1 + function sn() { + if (!en) { + if (process.throwDeprecation) throw new Error(Ht) + process.traceDeprecation ? console.trace(Ht) : console.error(Ht), (en = !0) + } + return Mt.apply(this, arguments) + } + return sn + }) + var rt = {}, + it = /^$/ + if ({}.NODE_DEBUG) { + var ot = {}.NODE_DEBUG + ;(ot = ot + .replace(/[|\\{}()[\]^$+?.]/g, '\\$&') + .replace(/\*/g, '.*') + .replace(/,/g, '$|^') + .toUpperCase()), + (it = new RegExp('^' + ot + '$', 'i')) + } + tt.debuglog = function (Mt) { + if (((Mt = Mt.toUpperCase()), !rt[Mt])) + if (it.test(Mt)) { + var Ht = process.pid + rt[Mt] = function () { + var en = tt.format.apply(tt, arguments) + console.error('%s %d: %s', Mt, Ht, en) + } + } else rt[Mt] = function () {} + return rt[Mt] + } + function at(Mt, Ht) { + var en = { seen: [], stylize: lt } + return ( + arguments.length >= 3 && (en.depth = arguments[2]), + arguments.length >= 4 && (en.colors = arguments[3]), + bt(Ht) ? (en.showHidden = Ht) : Ht && tt._extend(en, Ht), + At(en.showHidden) && (en.showHidden = !1), + At(en.depth) && (en.depth = 2), + At(en.colors) && (en.colors = !1), + At(en.customInspect) && (en.customInspect = !0), + en.colors && (en.stylize = st), + ut(en, Mt, en.depth) + ) + } + ;(tt.inspect = at), + (at.colors = { + bold: [1, 22], + italic: [3, 23], + underline: [4, 24], + inverse: [7, 27], + white: [37, 39], + grey: [90, 39], + black: [30, 39], + blue: [34, 39], + cyan: [36, 39], + green: [32, 39], + magenta: [35, 39], + red: [31, 39], + yellow: [33, 39], + }), + (at.styles = { + special: 'cyan', + number: 'yellow', + boolean: 'yellow', + undefined: 'grey', + null: 'bold', + string: 'green', + date: 'magenta', + regexp: 'red', + }) + function st(Mt, Ht) { + var en = at.styles[Ht] + return en ? '\x1B[' + at.colors[en][0] + 'm' + Mt + '\x1B[' + at.colors[en][1] + 'm' : Mt + } + function lt(Mt, Ht) { + return Mt + } + function ct(Mt) { + var Ht = {} + return ( + Mt.forEach(function (en, sn) { + Ht[en] = !0 + }), + Ht + ) + } + function ut(Mt, Ht, en) { + if ( + Mt.customInspect && + Ht && + Pt(Ht.inspect) && + Ht.inspect !== tt.inspect && + !(Ht.constructor && Ht.constructor.prototype === Ht) + ) { + var sn = Ht.inspect(en, Mt) + return St(sn) || (sn = ut(Mt, sn, en)), sn + } + var Kt = ht(Mt, Ht) + if (Kt) return Kt + var rn = Object.keys(Ht), + nn = ct(rn) + if ( + (Mt.showHidden && (rn = Object.getOwnPropertyNames(Ht)), + jt(Ht) && (rn.indexOf('message') >= 0 || rn.indexOf('description') >= 0)) + ) + return dt(Ht) + if (rn.length === 0) { + if (Pt(Ht)) { + var hn = Ht.name ? ': ' + Ht.name : '' + return Mt.stylize('[Function' + hn + ']', 'special') + } + if (Et(Ht)) return Mt.stylize(RegExp.prototype.toString.call(Ht), 'regexp') + if (Dt(Ht)) return Mt.stylize(Date.prototype.toString.call(Ht), 'date') + if (jt(Ht)) return dt(Ht) + } + var vn = '', + an = !1, + Qt = ['{', '}'] + if ((yt(Ht) && ((an = !0), (Qt = ['[', ']'])), Pt(Ht))) { + var _n = Ht.name ? ': ' + Ht.name : '' + vn = ' [Function' + _n + ']' + } + if ( + (Et(Ht) && (vn = ' ' + RegExp.prototype.toString.call(Ht)), + Dt(Ht) && (vn = ' ' + Date.prototype.toUTCString.call(Ht)), + jt(Ht) && (vn = ' ' + dt(Ht)), + rn.length === 0 && (!an || Ht.length == 0)) + ) + return Qt[0] + vn + Qt[1] + if (en < 0) + return Et(Ht) ? Mt.stylize(RegExp.prototype.toString.call(Ht), 'regexp') : Mt.stylize('[Object]', 'special') + Mt.seen.push(Ht) + var Pn + return ( + an + ? (Pn = pt(Mt, Ht, en, nn, rn)) + : (Pn = rn.map(function ($n) { + return mt(Mt, Ht, en, nn, $n, an) + })), + Mt.seen.pop(), + gt(Pn, vn, Qt) + ) + } + function ht(Mt, Ht) { + if (At(Ht)) return Mt.stylize('undefined', 'undefined') + if (St(Ht)) { + var en = "'" + JSON.stringify(Ht).replace(/^"|"$/g, '').replace(/'/g, "\\'").replace(/\\"/g, '"') + "'" + return Mt.stylize(en, 'string') + } + if (kt(Ht)) return Mt.stylize('' + Ht, 'number') + if (bt(Ht)) return Mt.stylize('' + Ht, 'boolean') + if (vt(Ht)) return Mt.stylize('null', 'null') + } + function dt(Mt) { + return '[' + Error.prototype.toString.call(Mt) + ']' + } + function pt(Mt, Ht, en, sn, Kt) { + for (var rn = [], nn = 0, hn = Ht.length; nn < hn; ++nn) + zt(Ht, String(nn)) ? rn.push(mt(Mt, Ht, en, sn, String(nn), !0)) : rn.push('') + return ( + Kt.forEach(function (vn) { + vn.match(/^\d+$/) || rn.push(mt(Mt, Ht, en, sn, vn, !0)) + }), + rn + ) + } + function mt(Mt, Ht, en, sn, Kt, rn) { + var nn, hn, vn + if ( + ((vn = Object.getOwnPropertyDescriptor(Ht, Kt) || { value: Ht[Kt] }), + vn.get + ? vn.set + ? (hn = Mt.stylize('[Getter/Setter]', 'special')) + : (hn = Mt.stylize('[Getter]', 'special')) + : vn.set && (hn = Mt.stylize('[Setter]', 'special')), + zt(sn, Kt) || (nn = '[' + Kt + ']'), + hn || + (Mt.seen.indexOf(vn.value) < 0 + ? (vt(en) ? (hn = ut(Mt, vn.value, null)) : (hn = ut(Mt, vn.value, en - 1)), + hn.indexOf(` +`) > -1 && + (rn + ? (hn = hn + .split( + ` +`, + ) + .map(function (an) { + return ' ' + an + }) + .join( + ` +`, + ) + .slice(2)) + : (hn = + ` +` + + hn + .split( + ` +`, + ) + .map(function (an) { + return ' ' + an + }).join(` +`)))) + : (hn = Mt.stylize('[Circular]', 'special'))), + At(nn)) + ) { + if (rn && Kt.match(/^\d+$/)) return hn + ;(nn = JSON.stringify('' + Kt)), + nn.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/) + ? ((nn = nn.slice(1, -1)), (nn = Mt.stylize(nn, 'name'))) + : ((nn = nn + .replace(/'/g, "\\'") + .replace(/\\"/g, '"') + .replace(/(^"|"$)/g, "'")), + (nn = Mt.stylize(nn, 'string'))) + } + return nn + ': ' + hn + } + function gt(Mt, Ht, en) { + var sn = Mt.reduce(function (Kt, rn) { + return ( + rn.indexOf(` +`) >= 0, + Kt + rn.replace(/\u001b\[\d\d?m/g, '').length + 1 + ) + }, 0) + return sn > 60 + ? en[0] + + (Ht === '' + ? '' + : Ht + + ` + `) + + ' ' + + Mt.join(`, + `) + + ' ' + + en[1] + : en[0] + Ht + ' ' + Mt.join(', ') + ' ' + en[1] + } + tt.types = types$7 + function yt(Mt) { + return Array.isArray(Mt) + } + tt.isArray = yt + function bt(Mt) { + return typeof Mt == 'boolean' + } + tt.isBoolean = bt + function vt(Mt) { + return Mt === null + } + tt.isNull = vt + function xt(Mt) { + return Mt == null + } + tt.isNullOrUndefined = xt + function kt(Mt) { + return typeof Mt == 'number' + } + tt.isNumber = kt + function St(Mt) { + return typeof Mt == 'string' + } + tt.isString = St + function Tt(Mt) { + return typeof Mt == 'symbol' + } + tt.isSymbol = Tt + function At(Mt) { + return Mt === void 0 + } + tt.isUndefined = At + function Et(Mt) { + return $t(Mt) && wt(Mt) === '[object RegExp]' + } + ;(tt.isRegExp = Et), (tt.types.isRegExp = Et) + function $t(Mt) { + return typeof Mt == 'object' && Mt !== null + } + tt.isObject = $t + function Dt(Mt) { + return $t(Mt) && wt(Mt) === '[object Date]' + } + ;(tt.isDate = Dt), (tt.types.isDate = Dt) + function jt(Mt) { + return $t(Mt) && (wt(Mt) === '[object Error]' || Mt instanceof Error) + } + ;(tt.isError = jt), (tt.types.isNativeError = jt) + function Pt(Mt) { + return typeof Mt == 'function' + } + tt.isFunction = Pt + function Ct(Mt) { + return ( + Mt === null || + typeof Mt == 'boolean' || + typeof Mt == 'number' || + typeof Mt == 'string' || + typeof Mt == 'symbol' || + typeof Mt > 'u' + ) + } + ;(tt.isPrimitive = Ct), (tt.isBuffer = isBufferBrowser) + function wt(Mt) { + return Object.prototype.toString.call(Mt) + } + function It(Mt) { + return Mt < 10 ? '0' + Mt.toString(10) : Mt.toString(10) + } + var Ot = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'] + function Wt() { + var Mt = new Date(), + Ht = [It(Mt.getHours()), It(Mt.getMinutes()), It(Mt.getSeconds())].join(':') + return [Mt.getDate(), Ot[Mt.getMonth()], Ht].join(' ') + } + ;(tt.log = function () { + console.log('%s - %s', Wt(), tt.format.apply(tt, arguments)) + }), + (tt.inherits = inherits_browserExports), + (tt._extend = function (Mt, Ht) { + if (!Ht || !$t(Ht)) return Mt + for (var en = Object.keys(Ht), sn = en.length; sn--; ) Mt[en[sn]] = Ht[en[sn]] + return Mt + }) + function zt(Mt, Ht) { + return Object.prototype.hasOwnProperty.call(Mt, Ht) + } + var Ft = typeof Symbol < 'u' ? Symbol('util.promisify.custom') : void 0 + ;(tt.promisify = function (Ht) { + if (typeof Ht != 'function') throw new TypeError('The "original" argument must be of type Function') + if (Ft && Ht[Ft]) { + var en = Ht[Ft] + if (typeof en != 'function') + throw new TypeError('The "util.promisify.custom" argument must be of type Function') + return Object.defineProperty(en, Ft, { value: en, enumerable: !1, writable: !1, configurable: !0 }), en + } + function en() { + for ( + var sn, + Kt, + rn = new Promise(function (vn, an) { + ;(sn = vn), (Kt = an) + }), + nn = [], + hn = 0; + hn < arguments.length; + hn++ + ) + nn.push(arguments[hn]) + nn.push(function (vn, an) { + vn ? Kt(vn) : sn(an) + }) + try { + Ht.apply(this, nn) + } catch (vn) { + Kt(vn) + } + return rn + } + return ( + Object.setPrototypeOf(en, Object.getPrototypeOf(Ht)), + Ft && Object.defineProperty(en, Ft, { value: en, enumerable: !1, writable: !1, configurable: !0 }), + Object.defineProperties(en, et(Ht)) + ) + }), + (tt.promisify.custom = Ft) + function Nt(Mt, Ht) { + if (!Mt) { + var en = new Error('Promise was rejected with a falsy value') + ;(en.reason = Mt), (Mt = en) + } + return Ht(Mt) + } + function Ut(Mt) { + if (typeof Mt != 'function') throw new TypeError('The "original" argument must be of type Function') + function Ht() { + for (var en = [], sn = 0; sn < arguments.length; sn++) en.push(arguments[sn]) + var Kt = en.pop() + if (typeof Kt != 'function') throw new TypeError('The last argument must be of type Function') + var rn = this, + nn = function () { + return Kt.apply(rn, arguments) + } + Mt.apply(this, en).then( + function (hn) { + process.nextTick(nn.bind(null, null, hn)) + }, + function (hn) { + process.nextTick(Nt.bind(null, hn, nn)) + }, + ) + } + return Object.setPrototypeOf(Ht, Object.getPrototypeOf(Mt)), Object.defineProperties(Ht, et(Mt)), Ht + } + tt.callbackify = Ut + })(util$1) + var hasRequiredErrors + function requireErrors() { + if (hasRequiredErrors) return errors$3 + hasRequiredErrors = 1 + function tt(St) { + '@babel/helpers - typeof' + return ( + (tt = + typeof Symbol == 'function' && typeof Symbol.iterator == 'symbol' + ? function (Tt) { + return typeof Tt + } + : function (Tt) { + return Tt && typeof Symbol == 'function' && Tt.constructor === Symbol && Tt !== Symbol.prototype + ? 'symbol' + : typeof Tt + }), + tt(St) + ) + } + function et(St, Tt) { + for (var At = 0; At < Tt.length; At++) { + var Et = Tt[At] + ;(Et.enumerable = Et.enumerable || !1), + (Et.configurable = !0), + 'value' in Et && (Et.writable = !0), + Object.defineProperty(St, rt(Et.key), Et) + } + } + function nt(St, Tt, At) { + return Tt && et(St.prototype, Tt), At && et(St, At), Object.defineProperty(St, 'prototype', { writable: !1 }), St + } + function rt(St) { + var Tt = it(St, 'string') + return tt(Tt) === 'symbol' ? Tt : String(Tt) + } + function it(St, Tt) { + if (tt(St) !== 'object' || St === null) return St + var At = St[Symbol.toPrimitive] + if (At !== void 0) { + var Et = At.call(St, Tt || 'default') + if (tt(Et) !== 'object') return Et + throw new TypeError('@@toPrimitive must return a primitive value.') + } + return (Tt === 'string' ? String : Number)(St) + } + function ot(St, Tt) { + if (!(St instanceof Tt)) throw new TypeError('Cannot call a class as a function') + } + function at(St, Tt) { + if (typeof Tt != 'function' && Tt !== null) + throw new TypeError('Super expression must either be null or a function') + ;(St.prototype = Object.create(Tt && Tt.prototype, { + constructor: { value: St, writable: !0, configurable: !0 }, + })), + Object.defineProperty(St, 'prototype', { writable: !1 }), + Tt && st(St, Tt) + } + function st(St, Tt) { + return ( + (st = Object.setPrototypeOf + ? Object.setPrototypeOf.bind() + : function (Et, $t) { + return (Et.__proto__ = $t), Et + }), + st(St, Tt) + ) + } + function lt(St) { + var Tt = ht() + return function () { + var Et = dt(St), + $t + if (Tt) { + var Dt = dt(this).constructor + $t = Reflect.construct(Et, arguments, Dt) + } else $t = Et.apply(this, arguments) + return ct(this, $t) + } + } + function ct(St, Tt) { + if (Tt && (tt(Tt) === 'object' || typeof Tt == 'function')) return Tt + if (Tt !== void 0) throw new TypeError('Derived constructors may only return object or undefined') + return ut(St) + } + function ut(St) { + if (St === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called") + return St + } + function ht() { + if (typeof Reflect > 'u' || !Reflect.construct || Reflect.construct.sham) return !1 + if (typeof Proxy == 'function') return !0 + try { + return Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})), !0 + } catch { + return !1 + } + } + function dt(St) { + return ( + (dt = Object.setPrototypeOf + ? Object.getPrototypeOf.bind() + : function (At) { + return At.__proto__ || Object.getPrototypeOf(At) + }), + dt(St) + ) + } + var pt = {}, + mt, + gt + function yt(St, Tt, At) { + At || (At = Error) + function Et(Dt, jt, Pt) { + return typeof Tt == 'string' ? Tt : Tt(Dt, jt, Pt) + } + var $t = (function (Dt) { + at(Pt, Dt) + var jt = lt(Pt) + function Pt(Ct, wt, It) { + var Ot + return ot(this, Pt), (Ot = jt.call(this, Et(Ct, wt, It))), (Ot.code = St), Ot + } + return nt(Pt) + })(At) + pt[St] = $t + } + function bt(St, Tt) { + if (Array.isArray(St)) { + var At = St.length + return ( + (St = St.map(function (Et) { + return String(Et) + })), + At > 2 + ? 'one of '.concat(Tt, ' ').concat(St.slice(0, At - 1).join(', '), ', or ') + St[At - 1] + : At === 2 + ? 'one of '.concat(Tt, ' ').concat(St[0], ' or ').concat(St[1]) + : 'of '.concat(Tt, ' ').concat(St[0]) + ) + } else return 'of '.concat(Tt, ' ').concat(String(St)) + } + function vt(St, Tt, At) { + return St.substr(!At || At < 0 ? 0 : +At, Tt.length) === Tt + } + function xt(St, Tt, At) { + return (At === void 0 || At > St.length) && (At = St.length), St.substring(At - Tt.length, At) === Tt + } + function kt(St, Tt, At) { + return typeof At != 'number' && (At = 0), At + Tt.length > St.length ? !1 : St.indexOf(Tt, At) !== -1 + } + return ( + yt('ERR_AMBIGUOUS_ARGUMENT', 'The "%s" argument is ambiguous. %s', TypeError), + yt( + 'ERR_INVALID_ARG_TYPE', + function (St, Tt, At) { + mt === void 0 && (mt = requireAssert()), mt(typeof St == 'string', "'name' must be a string") + var Et + typeof Tt == 'string' && vt(Tt, 'not ') + ? ((Et = 'must not be'), (Tt = Tt.replace(/^not /, ''))) + : (Et = 'must be') + var $t + if (xt(St, ' argument')) $t = 'The '.concat(St, ' ').concat(Et, ' ').concat(bt(Tt, 'type')) + else { + var Dt = kt(St, '.') ? 'property' : 'argument' + $t = 'The "'.concat(St, '" ').concat(Dt, ' ').concat(Et, ' ').concat(bt(Tt, 'type')) + } + return ($t += '. Received type '.concat(tt(At))), $t + }, + TypeError, + ), + yt( + 'ERR_INVALID_ARG_VALUE', + function (St, Tt) { + var At = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 'is invalid' + gt === void 0 && (gt = util$1) + var Et = gt.inspect(Tt) + return ( + Et.length > 128 && (Et = ''.concat(Et.slice(0, 128), '...')), + "The argument '".concat(St, "' ").concat(At, '. Received ').concat(Et) + ) + }, + TypeError, + ), + yt( + 'ERR_INVALID_RETURN_VALUE', + function (St, Tt, At) { + var Et + return ( + At && At.constructor && At.constructor.name + ? (Et = 'instance of '.concat(At.constructor.name)) + : (Et = 'type '.concat(tt(At))), + 'Expected '.concat(St, ' to be returned from the "').concat(Tt, '"') + ' function but got '.concat(Et, '.') + ) + }, + TypeError, + ), + yt( + 'ERR_MISSING_ARGS', + function () { + for (var St = arguments.length, Tt = new Array(St), At = 0; At < St; At++) Tt[At] = arguments[At] + mt === void 0 && (mt = requireAssert()), mt(Tt.length > 0, 'At least one arg needs to be specified') + var Et = 'The ', + $t = Tt.length + switch ( + ((Tt = Tt.map(function (Dt) { + return '"'.concat(Dt, '"') + })), + $t) + ) { + case 1: + Et += ''.concat(Tt[0], ' argument') + break + case 2: + Et += ''.concat(Tt[0], ' and ').concat(Tt[1], ' arguments') + break + default: + ;(Et += Tt.slice(0, $t - 1).join(', ')), (Et += ', and '.concat(Tt[$t - 1], ' arguments')) + break + } + return ''.concat(Et, ' must be specified') + }, + TypeError, + ), + (errors$3.codes = pt), + errors$3 + ) + } + var assertion_error, hasRequiredAssertion_error + function requireAssertion_error() { + if (hasRequiredAssertion_error) return assertion_error + hasRequiredAssertion_error = 1 + function tt(Ft, Nt) { + var Ut = Object.keys(Ft) + if (Object.getOwnPropertySymbols) { + var Mt = Object.getOwnPropertySymbols(Ft) + Nt && + (Mt = Mt.filter(function (Ht) { + return Object.getOwnPropertyDescriptor(Ft, Ht).enumerable + })), + Ut.push.apply(Ut, Mt) + } + return Ut + } + function et(Ft) { + for (var Nt = 1; Nt < arguments.length; Nt++) { + var Ut = arguments[Nt] != null ? arguments[Nt] : {} + Nt % 2 + ? tt(Object(Ut), !0).forEach(function (Mt) { + nt(Ft, Mt, Ut[Mt]) + }) + : Object.getOwnPropertyDescriptors + ? Object.defineProperties(Ft, Object.getOwnPropertyDescriptors(Ut)) + : tt(Object(Ut)).forEach(function (Mt) { + Object.defineProperty(Ft, Mt, Object.getOwnPropertyDescriptor(Ut, Mt)) + }) + } + return Ft + } + function nt(Ft, Nt, Ut) { + return ( + (Nt = at(Nt)), + Nt in Ft + ? Object.defineProperty(Ft, Nt, { value: Ut, enumerable: !0, configurable: !0, writable: !0 }) + : (Ft[Nt] = Ut), + Ft + ) + } + function rt(Ft, Nt) { + if (!(Ft instanceof Nt)) throw new TypeError('Cannot call a class as a function') + } + function it(Ft, Nt) { + for (var Ut = 0; Ut < Nt.length; Ut++) { + var Mt = Nt[Ut] + ;(Mt.enumerable = Mt.enumerable || !1), + (Mt.configurable = !0), + 'value' in Mt && (Mt.writable = !0), + Object.defineProperty(Ft, at(Mt.key), Mt) + } + } + function ot(Ft, Nt, Ut) { + return Nt && it(Ft.prototype, Nt), Ut && it(Ft, Ut), Object.defineProperty(Ft, 'prototype', { writable: !1 }), Ft + } + function at(Ft) { + var Nt = st(Ft, 'string') + return vt(Nt) === 'symbol' ? Nt : String(Nt) + } + function st(Ft, Nt) { + if (vt(Ft) !== 'object' || Ft === null) return Ft + var Ut = Ft[Symbol.toPrimitive] + if (Ut !== void 0) { + var Mt = Ut.call(Ft, Nt || 'default') + if (vt(Mt) !== 'object') return Mt + throw new TypeError('@@toPrimitive must return a primitive value.') + } + return (Nt === 'string' ? String : Number)(Ft) + } + function lt(Ft, Nt) { + if (typeof Nt != 'function' && Nt !== null) + throw new TypeError('Super expression must either be null or a function') + ;(Ft.prototype = Object.create(Nt && Nt.prototype, { + constructor: { value: Ft, writable: !0, configurable: !0 }, + })), + Object.defineProperty(Ft, 'prototype', { writable: !1 }), + Nt && yt(Ft, Nt) + } + function ct(Ft) { + var Nt = mt() + return function () { + var Mt = bt(Ft), + Ht + if (Nt) { + var en = bt(this).constructor + Ht = Reflect.construct(Mt, arguments, en) + } else Ht = Mt.apply(this, arguments) + return ut(this, Ht) + } + } + function ut(Ft, Nt) { + if (Nt && (vt(Nt) === 'object' || typeof Nt == 'function')) return Nt + if (Nt !== void 0) throw new TypeError('Derived constructors may only return object or undefined') + return ht(Ft) + } + function ht(Ft) { + if (Ft === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called") + return Ft + } + function dt(Ft) { + var Nt = typeof Map == 'function' ? new Map() : void 0 + return ( + (dt = function (Mt) { + if (Mt === null || !gt(Mt)) return Mt + if (typeof Mt != 'function') throw new TypeError('Super expression must either be null or a function') + if (typeof Nt < 'u') { + if (Nt.has(Mt)) return Nt.get(Mt) + Nt.set(Mt, Ht) + } + function Ht() { + return pt(Mt, arguments, bt(this).constructor) + } + return ( + (Ht.prototype = Object.create(Mt.prototype, { + constructor: { value: Ht, enumerable: !1, writable: !0, configurable: !0 }, + })), + yt(Ht, Mt) + ) + }), + dt(Ft) + ) + } + function pt(Ft, Nt, Ut) { + return ( + mt() + ? (pt = Reflect.construct.bind()) + : (pt = function (Ht, en, sn) { + var Kt = [null] + Kt.push.apply(Kt, en) + var rn = Function.bind.apply(Ht, Kt), + nn = new rn() + return sn && yt(nn, sn.prototype), nn + }), + pt.apply(null, arguments) + ) + } + function mt() { + if (typeof Reflect > 'u' || !Reflect.construct || Reflect.construct.sham) return !1 + if (typeof Proxy == 'function') return !0 + try { + return Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})), !0 + } catch { + return !1 + } + } + function gt(Ft) { + return Function.toString.call(Ft).indexOf('[native code]') !== -1 + } + function yt(Ft, Nt) { + return ( + (yt = Object.setPrototypeOf + ? Object.setPrototypeOf.bind() + : function (Mt, Ht) { + return (Mt.__proto__ = Ht), Mt + }), + yt(Ft, Nt) + ) + } + function bt(Ft) { + return ( + (bt = Object.setPrototypeOf + ? Object.getPrototypeOf.bind() + : function (Ut) { + return Ut.__proto__ || Object.getPrototypeOf(Ut) + }), + bt(Ft) + ) + } + function vt(Ft) { + '@babel/helpers - typeof' + return ( + (vt = + typeof Symbol == 'function' && typeof Symbol.iterator == 'symbol' + ? function (Nt) { + return typeof Nt + } + : function (Nt) { + return Nt && typeof Symbol == 'function' && Nt.constructor === Symbol && Nt !== Symbol.prototype + ? 'symbol' + : typeof Nt + }), + vt(Ft) + ) + } + var xt = util$1, + kt = xt.inspect, + St = requireErrors(), + Tt = St.codes.ERR_INVALID_ARG_TYPE + function At(Ft, Nt, Ut) { + return (Ut === void 0 || Ut > Ft.length) && (Ut = Ft.length), Ft.substring(Ut - Nt.length, Ut) === Nt + } + function Et(Ft, Nt) { + if (((Nt = Math.floor(Nt)), Ft.length == 0 || Nt == 0)) return '' + var Ut = Ft.length * Nt + for (Nt = Math.floor(Math.log(Nt) / Math.log(2)); Nt; ) (Ft += Ft), Nt-- + return (Ft += Ft.substring(0, Ut - Ft.length)), Ft + } + var $t = '', + Dt = '', + jt = '', + Pt = '', + Ct = { + deepStrictEqual: 'Expected values to be strictly deep-equal:', + strictEqual: 'Expected values to be strictly equal:', + strictEqualObject: 'Expected "actual" to be reference-equal to "expected":', + deepEqual: 'Expected values to be loosely deep-equal:', + equal: 'Expected values to be loosely equal:', + notDeepStrictEqual: 'Expected "actual" not to be strictly deep-equal to:', + notStrictEqual: 'Expected "actual" to be strictly unequal to:', + notStrictEqualObject: 'Expected "actual" not to be reference-equal to "expected":', + notDeepEqual: 'Expected "actual" not to be loosely deep-equal to:', + notEqual: 'Expected "actual" to be loosely unequal to:', + notIdentical: 'Values identical but not reference-equal:', + }, + wt = 10 + function It(Ft) { + var Nt = Object.keys(Ft), + Ut = Object.create(Object.getPrototypeOf(Ft)) + return ( + Nt.forEach(function (Mt) { + Ut[Mt] = Ft[Mt] + }), + Object.defineProperty(Ut, 'message', { value: Ft.message }), + Ut + ) + } + function Ot(Ft) { + return kt(Ft, { + compact: !1, + customInspect: !1, + depth: 1e3, + maxArrayLength: 1 / 0, + showHidden: !1, + breakLength: 1 / 0, + showProxy: !1, + sorted: !0, + getters: !0, + }) + } + function Wt(Ft, Nt, Ut) { + var Mt = '', + Ht = '', + en = 0, + sn = '', + Kt = !1, + rn = Ot(Ft), + nn = rn.split(` +`), + hn = Ot(Nt).split(` +`), + vn = 0, + an = '' + if ( + (Ut === 'strictEqual' && + vt(Ft) === 'object' && + vt(Nt) === 'object' && + Ft !== null && + Nt !== null && + (Ut = 'strictEqualObject'), + nn.length === 1 && hn.length === 1 && nn[0] !== hn[0]) + ) { + var Qt = nn[0].length + hn[0].length + if (Qt <= wt) { + if ((vt(Ft) !== 'object' || Ft === null) && (vt(Nt) !== 'object' || Nt === null) && (Ft !== 0 || Nt !== 0)) + return ( + ''.concat( + Ct[Ut], + ` + +`, + ) + + ''.concat(nn[0], ' !== ').concat( + hn[0], + ` +`, + ) + ) + } else if (Ut !== 'strictEqualObject') { + var _n = process.stderr && process.stderr.isTTY ? process.stderr.columns : 80 + if (Qt < _n) { + for (; nn[0][vn] === hn[0][vn]; ) vn++ + vn > 2 && + ((an = ` + `.concat(Et(' ', vn), '^')), + (vn = 0)) + } + } + } + for ( + var Pn = nn[nn.length - 1], $n = hn[hn.length - 1]; + Pn === $n && + (vn++ < 2 + ? (sn = ` + ` + .concat(Pn) + .concat(sn)) + : (Mt = Pn), + nn.pop(), + hn.pop(), + !(nn.length === 0 || hn.length === 0)); + + ) + (Pn = nn[nn.length - 1]), ($n = hn[hn.length - 1]) + var Nn = Math.max(nn.length, hn.length) + if (Nn === 0) { + var Tn = rn.split(` +`) + if (Tn.length > 30) for (Tn[26] = ''.concat($t, '...').concat(Pt); Tn.length > 27; ) Tn.pop() + return '' + .concat( + Ct.notIdentical, + ` + +`, + ) + .concat( + Tn.join(` +`), + ` +`, + ) + } + vn > 3 && + ((sn = ` +` + .concat($t, '...') + .concat(Pt) + .concat(sn)), + (Kt = !0)), + Mt !== '' && + ((sn = ` + ` + .concat(Mt) + .concat(sn)), + (Mt = '')) + var cn = 0, + mn = + Ct[Ut] + + ` +` + .concat(Dt, '+ actual') + .concat(Pt, ' ') + .concat(jt, '- expected') + .concat(Pt), + In = ' '.concat($t, '...').concat(Pt, ' Lines skipped') + for (vn = 0; vn < Nn; vn++) { + var An = vn - en + if (nn.length < vn + 1) + An > 1 && + vn > 2 && + (An > 4 + ? ((Ht += ` +` + .concat($t, '...') + .concat(Pt)), + (Kt = !0)) + : An > 3 && + ((Ht += ` + `.concat(hn[vn - 2])), + cn++), + (Ht += ` + `.concat(hn[vn - 1])), + cn++), + (en = vn), + (Mt += ` +` + .concat(jt, '-') + .concat(Pt, ' ') + .concat(hn[vn])), + cn++ + else if (hn.length < vn + 1) + An > 1 && + vn > 2 && + (An > 4 + ? ((Ht += ` +` + .concat($t, '...') + .concat(Pt)), + (Kt = !0)) + : An > 3 && + ((Ht += ` + `.concat(nn[vn - 2])), + cn++), + (Ht += ` + `.concat(nn[vn - 1])), + cn++), + (en = vn), + (Ht += ` +` + .concat(Dt, '+') + .concat(Pt, ' ') + .concat(nn[vn])), + cn++ + else { + var wn = hn[vn], + fn = nn[vn], + pn = fn !== wn && (!At(fn, ',') || fn.slice(0, -1) !== wn) + pn && At(wn, ',') && wn.slice(0, -1) === fn && ((pn = !1), (fn += ',')), + pn + ? (An > 1 && + vn > 2 && + (An > 4 + ? ((Ht += ` +` + .concat($t, '...') + .concat(Pt)), + (Kt = !0)) + : An > 3 && + ((Ht += ` + `.concat(nn[vn - 2])), + cn++), + (Ht += ` + `.concat(nn[vn - 1])), + cn++), + (en = vn), + (Ht += ` +` + .concat(Dt, '+') + .concat(Pt, ' ') + .concat(fn)), + (Mt += ` +` + .concat(jt, '-') + .concat(Pt, ' ') + .concat(wn)), + (cn += 2)) + : ((Ht += Mt), + (Mt = ''), + (An === 1 || vn === 0) && + ((Ht += ` + `.concat(fn)), + cn++)) + } + if (cn > 20 && vn < Nn - 2) + return ( + '' + .concat(mn) + .concat( + In, + ` +`, + ) + .concat( + Ht, + ` +`, + ) + .concat($t, '...') + .concat(Pt) + .concat( + Mt, + ` +`, + ) + ''.concat($t, '...').concat(Pt) + ) + } + return '' + .concat(mn) + .concat( + Kt ? In : '', + ` +`, + ) + .concat(Ht) + .concat(Mt) + .concat(sn) + .concat(an) + } + var zt = (function (Ft, Nt) { + lt(Mt, Ft) + var Ut = ct(Mt) + function Mt(Ht) { + var en + if ((rt(this, Mt), vt(Ht) !== 'object' || Ht === null)) throw new Tt('options', 'Object', Ht) + var sn = Ht.message, + Kt = Ht.operator, + rn = Ht.stackStartFn, + nn = Ht.actual, + hn = Ht.expected, + vn = Error.stackTraceLimit + if (((Error.stackTraceLimit = 0), sn != null)) en = Ut.call(this, String(sn)) + else if ( + (process.stderr && + process.stderr.isTTY && + (process.stderr && process.stderr.getColorDepth && process.stderr.getColorDepth() !== 1 + ? (($t = '\x1B[34m'), (Dt = '\x1B[32m'), (Pt = '\x1B[39m'), (jt = '\x1B[31m')) + : (($t = ''), (Dt = ''), (Pt = ''), (jt = ''))), + vt(nn) === 'object' && + nn !== null && + vt(hn) === 'object' && + hn !== null && + 'stack' in nn && + nn instanceof Error && + 'stack' in hn && + hn instanceof Error && + ((nn = It(nn)), (hn = It(hn))), + Kt === 'deepStrictEqual' || Kt === 'strictEqual') + ) + en = Ut.call(this, Wt(nn, hn, Kt)) + else if (Kt === 'notDeepStrictEqual' || Kt === 'notStrictEqual') { + var an = Ct[Kt], + Qt = Ot(nn).split(` +`) + if ( + (Kt === 'notStrictEqual' && vt(nn) === 'object' && nn !== null && (an = Ct.notStrictEqualObject), + Qt.length > 30) + ) + for (Qt[26] = ''.concat($t, '...').concat(Pt); Qt.length > 27; ) Qt.pop() + Qt.length === 1 + ? (en = Ut.call(this, ''.concat(an, ' ').concat(Qt[0]))) + : (en = Ut.call( + this, + '' + .concat( + an, + ` + +`, + ) + .concat( + Qt.join(` +`), + ` +`, + ), + )) + } else { + var _n = Ot(nn), + Pn = '', + $n = Ct[Kt] + Kt === 'notDeepEqual' || Kt === 'notEqual' + ? ((_n = '' + .concat( + Ct[Kt], + ` + +`, + ) + .concat(_n)), + _n.length > 1024 && (_n = ''.concat(_n.slice(0, 1021), '...'))) + : ((Pn = ''.concat(Ot(hn))), + _n.length > 512 && (_n = ''.concat(_n.slice(0, 509), '...')), + Pn.length > 512 && (Pn = ''.concat(Pn.slice(0, 509), '...')), + Kt === 'deepEqual' || Kt === 'equal' + ? (_n = '' + .concat( + $n, + ` + +`, + ) + .concat( + _n, + ` + +should equal + +`, + )) + : (Pn = ' '.concat(Kt, ' ').concat(Pn))), + (en = Ut.call(this, ''.concat(_n).concat(Pn))) + } + return ( + (Error.stackTraceLimit = vn), + (en.generatedMessage = !sn), + Object.defineProperty(ht(en), 'name', { + value: 'AssertionError [ERR_ASSERTION]', + enumerable: !1, + writable: !0, + configurable: !0, + }), + (en.code = 'ERR_ASSERTION'), + (en.actual = nn), + (en.expected = hn), + (en.operator = Kt), + Error.captureStackTrace && Error.captureStackTrace(ht(en), rn), + en.stack, + (en.name = 'AssertionError'), + ut(en) + ) + } + return ( + ot(Mt, [ + { + key: 'toString', + value: function () { + return ''.concat(this.name, ' [').concat(this.code, ']: ').concat(this.message) + }, + }, + { + key: Nt, + value: function (en, sn) { + return kt(this, et(et({}, sn), {}, { customInspect: !1, depth: 0 })) + }, + }, + ]), + Mt + ) + })(dt(Error), kt.custom) + return (assertion_error = zt), assertion_error + } + var toStr = Object.prototype.toString, + isArguments$4 = function (et) { + var nt = toStr.call(et), + rt = nt === '[object Arguments]' + return ( + rt || + (rt = + nt !== '[object Array]' && + et !== null && + typeof et == 'object' && + typeof et.length == 'number' && + et.length >= 0 && + toStr.call(et.callee) === '[object Function]'), + rt + ) + }, + implementation$5, + hasRequiredImplementation$1 + function requireImplementation$1() { + if (hasRequiredImplementation$1) return implementation$5 + hasRequiredImplementation$1 = 1 + var tt + if (!Object.keys) { + var et = Object.prototype.hasOwnProperty, + nt = Object.prototype.toString, + rt = isArguments$4, + it = Object.prototype.propertyIsEnumerable, + ot = !it.call({ toString: null }, 'toString'), + at = it.call(function () {}, 'prototype'), + st = [ + 'toString', + 'toLocaleString', + 'valueOf', + 'hasOwnProperty', + 'isPrototypeOf', + 'propertyIsEnumerable', + 'constructor', + ], + lt = function (dt) { + var pt = dt.constructor + return pt && pt.prototype === dt + }, + ct = { + $applicationCache: !0, + $console: !0, + $external: !0, + $frame: !0, + $frameElement: !0, + $frames: !0, + $innerHeight: !0, + $innerWidth: !0, + $onmozfullscreenchange: !0, + $onmozfullscreenerror: !0, + $outerHeight: !0, + $outerWidth: !0, + $pageXOffset: !0, + $pageYOffset: !0, + $parent: !0, + $scrollLeft: !0, + $scrollTop: !0, + $scrollX: !0, + $scrollY: !0, + $self: !0, + $webkitIndexedDB: !0, + $webkitStorageInfo: !0, + $window: !0, + }, + ut = (function () { + if (typeof window > 'u') return !1 + for (var dt in window) + try { + if (!ct['$' + dt] && et.call(window, dt) && window[dt] !== null && typeof window[dt] == 'object') + try { + lt(window[dt]) + } catch { + return !0 + } + } catch { + return !0 + } + return !1 + })(), + ht = function (dt) { + if (typeof window > 'u' || !ut) return lt(dt) + try { + return lt(dt) + } catch { + return !1 + } + } + tt = function (pt) { + var mt = pt !== null && typeof pt == 'object', + gt = nt.call(pt) === '[object Function]', + yt = rt(pt), + bt = mt && nt.call(pt) === '[object String]', + vt = [] + if (!mt && !gt && !yt) throw new TypeError('Object.keys called on a non-object') + var xt = at && gt + if (bt && pt.length > 0 && !et.call(pt, 0)) for (var kt = 0; kt < pt.length; ++kt) vt.push(String(kt)) + if (yt && pt.length > 0) for (var St = 0; St < pt.length; ++St) vt.push(String(St)) + else for (var Tt in pt) !(xt && Tt === 'prototype') && et.call(pt, Tt) && vt.push(String(Tt)) + if (ot) + for (var At = ht(pt), Et = 0; Et < st.length; ++Et) + !(At && st[Et] === 'constructor') && et.call(pt, st[Et]) && vt.push(st[Et]) + return vt + } + } + return (implementation$5 = tt), implementation$5 + } + var slice = Array.prototype.slice, + isArgs = isArguments$4, + origKeys = Object.keys, + keysShim = origKeys + ? function (et) { + return origKeys(et) + } + : requireImplementation$1(), + originalKeys = Object.keys + keysShim.shim = function () { + if (Object.keys) { + var et = (function () { + var nt = Object.keys(arguments) + return nt && nt.length === arguments.length + })(1, 2) + et || + (Object.keys = function (rt) { + return isArgs(rt) ? originalKeys(slice.call(rt)) : originalKeys(rt) + }) + } else Object.keys = keysShim + return Object.keys || keysShim + } + var objectKeys$1 = keysShim, + objectKeys = objectKeys$1, + hasSymbols = shams$1(), + callBound = callBound$3, + toObject$1 = Object, + $push = callBound('Array.prototype.push'), + $propIsEnumerable = callBound('Object.prototype.propertyIsEnumerable'), + originalGetSymbols = hasSymbols ? Object.getOwnPropertySymbols : null, + implementation$4 = function (et, nt) { + if (et == null) throw new TypeError('target must be an object') + var rt = toObject$1(et) + if (arguments.length === 1) return rt + for (var it = 1; it < arguments.length; ++it) { + var ot = toObject$1(arguments[it]), + at = objectKeys(ot), + st = hasSymbols && (Object.getOwnPropertySymbols || originalGetSymbols) + if (st) + for (var lt = st(ot), ct = 0; ct < lt.length; ++ct) { + var ut = lt[ct] + $propIsEnumerable(ot, ut) && $push(at, ut) + } + for (var ht = 0; ht < at.length; ++ht) { + var dt = at[ht] + if ($propIsEnumerable(ot, dt)) { + var pt = ot[dt] + rt[dt] = pt + } + } + } + return rt + }, + implementation$3 = implementation$4, + lacksProperEnumerationOrder = function () { + if (!Object.assign) return !1 + for (var tt = 'abcdefghijklmnopqrst', et = tt.split(''), nt = {}, rt = 0; rt < et.length; ++rt) + nt[et[rt]] = et[rt] + var it = Object.assign({}, nt), + ot = '' + for (var at in it) ot += at + return tt !== ot + }, + assignHasPendingExceptions = function () { + if (!Object.assign || !Object.preventExtensions) return !1 + var tt = Object.preventExtensions({ 1: 2 }) + try { + Object.assign(tt, 'xy') + } catch { + return tt[1] === 'y' + } + return !1 + }, + polyfill$2 = function () { + return !Object.assign || lacksProperEnumerationOrder() || assignHasPendingExceptions() + ? implementation$3 + : Object.assign + }, + numberIsNaN = function (tt) { + return tt !== tt + }, + implementation$2 = function (et, nt) { + return et === 0 && nt === 0 ? 1 / et === 1 / nt : !!(et === nt || (numberIsNaN(et) && numberIsNaN(nt))) + }, + implementation$1 = implementation$2, + polyfill$1 = function () { + return typeof Object.is == 'function' ? Object.is : implementation$1 + }, + hasPropertyDescriptors_1, + hasRequiredHasPropertyDescriptors + function requireHasPropertyDescriptors() { + if (hasRequiredHasPropertyDescriptors) return hasPropertyDescriptors_1 + hasRequiredHasPropertyDescriptors = 1 + var tt = getIntrinsic, + et = tt('%Object.defineProperty%', !0), + nt = function () { + if (et) + try { + return et({}, 'a', { value: 1 }), !0 + } catch { + return !1 + } + return !1 + } + return ( + (nt.hasArrayLengthDefineBug = function () { + if (!nt()) return null + try { + return et([], 'length', { value: 1 }).length !== 1 + } catch { + return !0 + } + }), + (hasPropertyDescriptors_1 = nt), + hasPropertyDescriptors_1 + ) + } + var defineDataProperty, hasRequiredDefineDataProperty + function requireDefineDataProperty() { + if (hasRequiredDefineDataProperty) return defineDataProperty + hasRequiredDefineDataProperty = 1 + var tt = requireHasPropertyDescriptors()(), + et = getIntrinsic, + nt = tt && et('%Object.defineProperty%', !0) + if (nt) + try { + nt({}, 'a', { value: 1 }) + } catch { + nt = !1 + } + var rt = et('%SyntaxError%'), + it = et('%TypeError%'), + ot = gopd + return ( + (defineDataProperty = function (st, lt, ct) { + if (!st || (typeof st != 'object' && typeof st != 'function')) + throw new it('`obj` must be an object or a function`') + if (typeof lt != 'string' && typeof lt != 'symbol') throw new it('`property` must be a string or a symbol`') + if (arguments.length > 3 && typeof arguments[3] != 'boolean' && arguments[3] !== null) + throw new it('`nonEnumerable`, if provided, must be a boolean or null') + if (arguments.length > 4 && typeof arguments[4] != 'boolean' && arguments[4] !== null) + throw new it('`nonWritable`, if provided, must be a boolean or null') + if (arguments.length > 5 && typeof arguments[5] != 'boolean' && arguments[5] !== null) + throw new it('`nonConfigurable`, if provided, must be a boolean or null') + if (arguments.length > 6 && typeof arguments[6] != 'boolean') + throw new it('`loose`, if provided, must be a boolean') + var ut = arguments.length > 3 ? arguments[3] : null, + ht = arguments.length > 4 ? arguments[4] : null, + dt = arguments.length > 5 ? arguments[5] : null, + pt = arguments.length > 6 ? arguments[6] : !1, + mt = !!ot && ot(st, lt) + if (nt) + nt(st, lt, { + configurable: dt === null && mt ? mt.configurable : !dt, + enumerable: ut === null && mt ? mt.enumerable : !ut, + value: ct, + writable: ht === null && mt ? mt.writable : !ht, + }) + else if (pt || (!ut && !ht && !dt)) st[lt] = ct + else + throw new rt( + 'This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.', + ) + }), + defineDataProperty + ) + } + var defineProperties_1, hasRequiredDefineProperties + function requireDefineProperties() { + if (hasRequiredDefineProperties) return defineProperties_1 + hasRequiredDefineProperties = 1 + var tt = objectKeys$1, + et = typeof Symbol == 'function' && typeof Symbol('foo') == 'symbol', + nt = Object.prototype.toString, + rt = Array.prototype.concat, + it = requireDefineDataProperty(), + ot = function (ct) { + return typeof ct == 'function' && nt.call(ct) === '[object Function]' + }, + at = requireHasPropertyDescriptors()(), + st = function (ct, ut, ht, dt) { + if (ut in ct) { + if (dt === !0) { + if (ct[ut] === ht) return + } else if (!ot(dt) || !dt()) return + } + at ? it(ct, ut, ht, !0) : it(ct, ut, ht) + }, + lt = function (ct, ut) { + var ht = arguments.length > 2 ? arguments[2] : {}, + dt = tt(ut) + et && (dt = rt.call(dt, Object.getOwnPropertySymbols(ut))) + for (var pt = 0; pt < dt.length; pt += 1) st(ct, dt[pt], ut[dt[pt]], ht[dt[pt]]) + } + return (lt.supportsDescriptors = !!at), (defineProperties_1 = lt), defineProperties_1 + } + var shim$2, hasRequiredShim$1 + function requireShim$1() { + if (hasRequiredShim$1) return shim$2 + hasRequiredShim$1 = 1 + var tt = polyfill$1, + et = requireDefineProperties() + return ( + (shim$2 = function () { + var rt = tt() + return ( + et( + Object, + { is: rt }, + { + is: function () { + return Object.is !== rt + }, + }, + ), + rt + ) + }), + shim$2 + ) + } + var objectIs, hasRequiredObjectIs + function requireObjectIs() { + if (hasRequiredObjectIs) return objectIs + hasRequiredObjectIs = 1 + var tt = requireDefineProperties(), + et = callBindExports, + nt = implementation$2, + rt = polyfill$1, + it = requireShim$1(), + ot = et(rt(), Object) + return tt(ot, { getPolyfill: rt, implementation: nt, shim: it }), (objectIs = ot), objectIs + } + var implementation, hasRequiredImplementation + function requireImplementation() { + return ( + hasRequiredImplementation || + ((hasRequiredImplementation = 1), + (implementation = function (et) { + return et !== et + })), + implementation + ) + } + var polyfill, hasRequiredPolyfill + function requirePolyfill() { + if (hasRequiredPolyfill) return polyfill + hasRequiredPolyfill = 1 + var tt = requireImplementation() + return ( + (polyfill = function () { + return Number.isNaN && Number.isNaN(NaN) && !Number.isNaN('a') ? Number.isNaN : tt + }), + polyfill + ) + } + var shim$1, hasRequiredShim + function requireShim() { + if (hasRequiredShim) return shim$1 + hasRequiredShim = 1 + var tt = requireDefineProperties(), + et = requirePolyfill() + return ( + (shim$1 = function () { + var rt = et() + return ( + tt( + Number, + { isNaN: rt }, + { + isNaN: function () { + return Number.isNaN !== rt + }, + }, + ), + rt + ) + }), + shim$1 + ) + } + var isNan, hasRequiredIsNan + function requireIsNan() { + if (hasRequiredIsNan) return isNan + hasRequiredIsNan = 1 + var tt = callBindExports, + et = requireDefineProperties(), + nt = requireImplementation(), + rt = requirePolyfill(), + it = requireShim(), + ot = tt(rt(), Number) + return et(ot, { getPolyfill: rt, implementation: nt, shim: it }), (isNan = ot), isNan + } + var comparisons, hasRequiredComparisons + function requireComparisons() { + if (hasRequiredComparisons) return comparisons + hasRequiredComparisons = 1 + function tt(pn, kn) { + return ot(pn) || it(pn, kn) || nt(pn, kn) || et() + } + function et() { + throw new TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`) + } + function nt(pn, kn) { + if (pn) { + if (typeof pn == 'string') return rt(pn, kn) + var Dn = Object.prototype.toString.call(pn).slice(8, -1) + if ((Dn === 'Object' && pn.constructor && (Dn = pn.constructor.name), Dn === 'Map' || Dn === 'Set')) + return Array.from(pn) + if (Dn === 'Arguments' || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Dn)) return rt(pn, kn) + } + } + function rt(pn, kn) { + ;(kn == null || kn > pn.length) && (kn = pn.length) + for (var Dn = 0, un = new Array(kn); Dn < kn; Dn++) un[Dn] = pn[Dn] + return un + } + function it(pn, kn) { + var Dn = pn == null ? null : (typeof Symbol < 'u' && pn[Symbol.iterator]) || pn['@@iterator'] + if (Dn != null) { + var un, + Zt, + Xt, + Sn, + Rn = [], + jn = !0, + On = !1 + try { + if (((Xt = (Dn = Dn.call(pn)).next), kn === 0)) { + if (Object(Dn) !== Dn) return + jn = !1 + } else for (; !(jn = (un = Xt.call(Dn)).done) && (Rn.push(un.value), Rn.length !== kn); jn = !0); + } catch (Zn) { + ;(On = !0), (Zt = Zn) + } finally { + try { + if (!jn && Dn.return != null && ((Sn = Dn.return()), Object(Sn) !== Sn)) return + } finally { + if (On) throw Zt + } + } + return Rn + } + } + function ot(pn) { + if (Array.isArray(pn)) return pn + } + function at(pn) { + '@babel/helpers - typeof' + return ( + (at = + typeof Symbol == 'function' && typeof Symbol.iterator == 'symbol' + ? function (kn) { + return typeof kn + } + : function (kn) { + return kn && typeof Symbol == 'function' && kn.constructor === Symbol && kn !== Symbol.prototype + ? 'symbol' + : typeof kn + }), + at(pn) + ) + } + var st = /a/g.flags !== void 0, + lt = function (kn) { + var Dn = [] + return ( + kn.forEach(function (un) { + return Dn.push(un) + }), + Dn + ) + }, + ct = function (kn) { + var Dn = [] + return ( + kn.forEach(function (un, Zt) { + return Dn.push([Zt, un]) + }), + Dn + ) + }, + ut = Object.is ? Object.is : requireObjectIs(), + ht = Object.getOwnPropertySymbols + ? Object.getOwnPropertySymbols + : function () { + return [] + }, + dt = Number.isNaN ? Number.isNaN : requireIsNan() + function pt(pn) { + return pn.call.bind(pn) + } + var mt = pt(Object.prototype.hasOwnProperty), + gt = pt(Object.prototype.propertyIsEnumerable), + yt = pt(Object.prototype.toString), + bt = util$1.types, + vt = bt.isAnyArrayBuffer, + xt = bt.isArrayBufferView, + kt = bt.isDate, + St = bt.isMap, + Tt = bt.isRegExp, + At = bt.isSet, + Et = bt.isNativeError, + $t = bt.isBoxedPrimitive, + Dt = bt.isNumberObject, + jt = bt.isStringObject, + Pt = bt.isBooleanObject, + Ct = bt.isBigIntObject, + wt = bt.isSymbolObject, + It = bt.isFloat32Array, + Ot = bt.isFloat64Array + function Wt(pn) { + if (pn.length === 0 || pn.length > 10) return !0 + for (var kn = 0; kn < pn.length; kn++) { + var Dn = pn.charCodeAt(kn) + if (Dn < 48 || Dn > 57) return !0 + } + return pn.length === 10 && pn >= Math.pow(2, 32) + } + function zt(pn) { + return Object.keys(pn) + .filter(Wt) + .concat(ht(pn).filter(Object.prototype.propertyIsEnumerable.bind(pn))) + } + /*! + * The buffer module from node.js, for the browser. + * + * @author Feross Aboukhadijeh + * @license MIT + */ function Ft(pn, kn) { + if (pn === kn) return 0 + for (var Dn = pn.length, un = kn.length, Zt = 0, Xt = Math.min(Dn, un); Zt < Xt; ++Zt) + if (pn[Zt] !== kn[Zt]) { + ;(Dn = pn[Zt]), (un = kn[Zt]) + break + } + return Dn < un ? -1 : un < Dn ? 1 : 0 + } + var Nt = !0, + Ut = !1, + Mt = 0, + Ht = 1, + en = 2, + sn = 3 + function Kt(pn, kn) { + return st + ? pn.source === kn.source && pn.flags === kn.flags + : RegExp.prototype.toString.call(pn) === RegExp.prototype.toString.call(kn) + } + function rn(pn, kn) { + if (pn.byteLength !== kn.byteLength) return !1 + for (var Dn = 0; Dn < pn.byteLength; Dn++) if (pn[Dn] !== kn[Dn]) return !1 + return !0 + } + function nn(pn, kn) { + return pn.byteLength !== kn.byteLength + ? !1 + : Ft( + new Uint8Array(pn.buffer, pn.byteOffset, pn.byteLength), + new Uint8Array(kn.buffer, kn.byteOffset, kn.byteLength), + ) === 0 + } + function hn(pn, kn) { + return pn.byteLength === kn.byteLength && Ft(new Uint8Array(pn), new Uint8Array(kn)) === 0 + } + function vn(pn, kn) { + return Dt(pn) + ? Dt(kn) && ut(Number.prototype.valueOf.call(pn), Number.prototype.valueOf.call(kn)) + : jt(pn) + ? jt(kn) && String.prototype.valueOf.call(pn) === String.prototype.valueOf.call(kn) + : Pt(pn) + ? Pt(kn) && Boolean.prototype.valueOf.call(pn) === Boolean.prototype.valueOf.call(kn) + : Ct(pn) + ? Ct(kn) && BigInt.prototype.valueOf.call(pn) === BigInt.prototype.valueOf.call(kn) + : wt(kn) && Symbol.prototype.valueOf.call(pn) === Symbol.prototype.valueOf.call(kn) + } + function an(pn, kn, Dn, un) { + if (pn === kn) return pn !== 0 ? !0 : Dn ? ut(pn, kn) : !0 + if (Dn) { + if (at(pn) !== 'object') return typeof pn == 'number' && dt(pn) && dt(kn) + if ( + at(kn) !== 'object' || + pn === null || + kn === null || + Object.getPrototypeOf(pn) !== Object.getPrototypeOf(kn) + ) + return !1 + } else { + if (pn === null || at(pn) !== 'object') return kn === null || at(kn) !== 'object' ? pn == kn : !1 + if (kn === null || at(kn) !== 'object') return !1 + } + var Zt = yt(pn), + Xt = yt(kn) + if (Zt !== Xt) return !1 + if (Array.isArray(pn)) { + if (pn.length !== kn.length) return !1 + var Sn = zt(pn), + Rn = zt(kn) + return Sn.length !== Rn.length ? !1 : _n(pn, kn, Dn, un, Ht, Sn) + } + if (Zt === '[object Object]' && ((!St(pn) && St(kn)) || (!At(pn) && At(kn)))) return !1 + if (kt(pn)) { + if (!kt(kn) || Date.prototype.getTime.call(pn) !== Date.prototype.getTime.call(kn)) return !1 + } else if (Tt(pn)) { + if (!Tt(kn) || !Kt(pn, kn)) return !1 + } else if (Et(pn) || pn instanceof Error) { + if (pn.message !== kn.message || pn.name !== kn.name) return !1 + } else if (xt(pn)) { + if (!Dn && (It(pn) || Ot(pn))) { + if (!rn(pn, kn)) return !1 + } else if (!nn(pn, kn)) return !1 + var jn = zt(pn), + On = zt(kn) + return jn.length !== On.length ? !1 : _n(pn, kn, Dn, un, Mt, jn) + } else { + if (At(pn)) return !At(kn) || pn.size !== kn.size ? !1 : _n(pn, kn, Dn, un, en) + if (St(pn)) return !St(kn) || pn.size !== kn.size ? !1 : _n(pn, kn, Dn, un, sn) + if (vt(pn)) { + if (!hn(pn, kn)) return !1 + } else if ($t(pn) && !vn(pn, kn)) return !1 + } + return _n(pn, kn, Dn, un, Mt) + } + function Qt(pn, kn) { + return kn.filter(function (Dn) { + return gt(pn, Dn) + }) + } + function _n(pn, kn, Dn, un, Zt, Xt) { + if (arguments.length === 5) { + Xt = Object.keys(pn) + var Sn = Object.keys(kn) + if (Xt.length !== Sn.length) return !1 + } + for (var Rn = 0; Rn < Xt.length; Rn++) if (!mt(kn, Xt[Rn])) return !1 + if (Dn && arguments.length === 5) { + var jn = ht(pn) + if (jn.length !== 0) { + var On = 0 + for (Rn = 0; Rn < jn.length; Rn++) { + var Zn = jn[Rn] + if (gt(pn, Zn)) { + if (!gt(kn, Zn)) return !1 + Xt.push(Zn), On++ + } else if (gt(kn, Zn)) return !1 + } + var Vn = ht(kn) + if (jn.length !== Vn.length && Qt(kn, Vn).length !== On) return !1 + } else { + var qn = ht(kn) + if (qn.length !== 0 && Qt(kn, qn).length !== 0) return !1 + } + } + if (Xt.length === 0 && (Zt === Mt || (Zt === Ht && pn.length === 0) || pn.size === 0)) return !0 + if (un === void 0) un = { val1: new Map(), val2: new Map(), position: 0 } + else { + var zn = un.val1.get(pn) + if (zn !== void 0) { + var Jn = un.val2.get(kn) + if (Jn !== void 0) return zn === Jn + } + un.position++ + } + un.val1.set(pn, un.position), un.val2.set(kn, un.position) + var Hn = An(pn, kn, Dn, Xt, un, Zt) + return un.val1.delete(pn), un.val2.delete(kn), Hn + } + function Pn(pn, kn, Dn, un) { + for (var Zt = lt(pn), Xt = 0; Xt < Zt.length; Xt++) { + var Sn = Zt[Xt] + if (an(kn, Sn, Dn, un)) return pn.delete(Sn), !0 + } + return !1 + } + function $n(pn) { + switch (at(pn)) { + case 'undefined': + return null + case 'object': + return + case 'symbol': + return !1 + case 'string': + pn = +pn + case 'number': + if (dt(pn)) return !1 + } + return !0 + } + function Nn(pn, kn, Dn) { + var un = $n(Dn) + return un ?? (kn.has(un) && !pn.has(un)) + } + function Tn(pn, kn, Dn, un, Zt) { + var Xt = $n(Dn) + if (Xt != null) return Xt + var Sn = kn.get(Xt) + return (Sn === void 0 && !kn.has(Xt)) || !an(un, Sn, !1, Zt) ? !1 : !pn.has(Xt) && an(un, Sn, !1, Zt) + } + function cn(pn, kn, Dn, un) { + for (var Zt = null, Xt = lt(pn), Sn = 0; Sn < Xt.length; Sn++) { + var Rn = Xt[Sn] + if (at(Rn) === 'object' && Rn !== null) Zt === null && (Zt = new Set()), Zt.add(Rn) + else if (!kn.has(Rn)) { + if (Dn || !Nn(pn, kn, Rn)) return !1 + Zt === null && (Zt = new Set()), Zt.add(Rn) + } + } + if (Zt !== null) { + for (var jn = lt(kn), On = 0; On < jn.length; On++) { + var Zn = jn[On] + if (at(Zn) === 'object' && Zn !== null) { + if (!Pn(Zt, Zn, Dn, un)) return !1 + } else if (!Dn && !pn.has(Zn) && !Pn(Zt, Zn, Dn, un)) return !1 + } + return Zt.size === 0 + } + return !0 + } + function mn(pn, kn, Dn, un, Zt, Xt) { + for (var Sn = lt(pn), Rn = 0; Rn < Sn.length; Rn++) { + var jn = Sn[Rn] + if (an(Dn, jn, Zt, Xt) && an(un, kn.get(jn), Zt, Xt)) return pn.delete(jn), !0 + } + return !1 + } + function In(pn, kn, Dn, un) { + for (var Zt = null, Xt = ct(pn), Sn = 0; Sn < Xt.length; Sn++) { + var Rn = tt(Xt[Sn], 2), + jn = Rn[0], + On = Rn[1] + if (at(jn) === 'object' && jn !== null) Zt === null && (Zt = new Set()), Zt.add(jn) + else { + var Zn = kn.get(jn) + if ((Zn === void 0 && !kn.has(jn)) || !an(On, Zn, Dn, un)) { + if (Dn || !Tn(pn, kn, jn, On, un)) return !1 + Zt === null && (Zt = new Set()), Zt.add(jn) + } + } + } + if (Zt !== null) { + for (var Vn = ct(kn), qn = 0; qn < Vn.length; qn++) { + var zn = tt(Vn[qn], 2), + Jn = zn[0], + Hn = zn[1] + if (at(Jn) === 'object' && Jn !== null) { + if (!mn(Zt, pn, Jn, Hn, Dn, un)) return !1 + } else if (!Dn && (!pn.has(Jn) || !an(pn.get(Jn), Hn, !1, un)) && !mn(Zt, pn, Jn, Hn, !1, un)) return !1 + } + return Zt.size === 0 + } + return !0 + } + function An(pn, kn, Dn, un, Zt, Xt) { + var Sn = 0 + if (Xt === en) { + if (!cn(pn, kn, Dn, Zt)) return !1 + } else if (Xt === sn) { + if (!In(pn, kn, Dn, Zt)) return !1 + } else if (Xt === Ht) + for (; Sn < pn.length; Sn++) + if (mt(pn, Sn)) { + if (!mt(kn, Sn) || !an(pn[Sn], kn[Sn], Dn, Zt)) return !1 + } else { + if (mt(kn, Sn)) return !1 + for (var Rn = Object.keys(pn); Sn < Rn.length; Sn++) { + var jn = Rn[Sn] + if (!mt(kn, jn) || !an(pn[jn], kn[jn], Dn, Zt)) return !1 + } + return Rn.length === Object.keys(kn).length + } + for (Sn = 0; Sn < un.length; Sn++) { + var On = un[Sn] + if (!an(pn[On], kn[On], Dn, Zt)) return !1 + } + return !0 + } + function wn(pn, kn) { + return an(pn, kn, Ut) + } + function fn(pn, kn) { + return an(pn, kn, Nt) + } + return (comparisons = { isDeepEqual: wn, isDeepStrictEqual: fn }), comparisons + } + var hasRequiredAssert + function requireAssert() { + if (hasRequiredAssert) return assert$p.exports + hasRequiredAssert = 1 + function tt(rn) { + '@babel/helpers - typeof' + return ( + (tt = + typeof Symbol == 'function' && typeof Symbol.iterator == 'symbol' + ? function (nn) { + return typeof nn + } + : function (nn) { + return nn && typeof Symbol == 'function' && nn.constructor === Symbol && nn !== Symbol.prototype + ? 'symbol' + : typeof nn + }), + tt(rn) + ) + } + function et(rn, nn) { + for (var hn = 0; hn < nn.length; hn++) { + var vn = nn[hn] + ;(vn.enumerable = vn.enumerable || !1), + (vn.configurable = !0), + 'value' in vn && (vn.writable = !0), + Object.defineProperty(rn, rt(vn.key), vn) + } + } + function nt(rn, nn, hn) { + return nn && et(rn.prototype, nn), hn && et(rn, hn), Object.defineProperty(rn, 'prototype', { writable: !1 }), rn + } + function rt(rn) { + var nn = it(rn, 'string') + return tt(nn) === 'symbol' ? nn : String(nn) + } + function it(rn, nn) { + if (tt(rn) !== 'object' || rn === null) return rn + var hn = rn[Symbol.toPrimitive] + if (hn !== void 0) { + var vn = hn.call(rn, nn || 'default') + if (tt(vn) !== 'object') return vn + throw new TypeError('@@toPrimitive must return a primitive value.') + } + return (nn === 'string' ? String : Number)(rn) + } + function ot(rn, nn) { + if (!(rn instanceof nn)) throw new TypeError('Cannot call a class as a function') + } + var at = requireErrors(), + st = at.codes, + lt = st.ERR_AMBIGUOUS_ARGUMENT, + ct = st.ERR_INVALID_ARG_TYPE, + ut = st.ERR_INVALID_ARG_VALUE, + ht = st.ERR_INVALID_RETURN_VALUE, + dt = st.ERR_MISSING_ARGS, + pt = requireAssertion_error(), + mt = util$1, + gt = mt.inspect, + yt = util$1.types, + bt = yt.isPromise, + vt = yt.isRegExp, + xt = polyfill$2(), + kt = polyfill$1(), + St = callBound$3('RegExp.prototype.test'), + Tt, + At + function Et() { + var rn = requireComparisons() + ;(Tt = rn.isDeepEqual), (At = rn.isDeepStrictEqual) + } + var $t = !1, + Dt = (assert$p.exports = It), + jt = {} + function Pt(rn) { + throw rn.message instanceof Error ? rn.message : new pt(rn) + } + function Ct(rn, nn, hn, vn, an) { + var Qt = arguments.length, + _n + if (Qt === 0) _n = 'Failed' + else if (Qt === 1) (hn = rn), (rn = void 0) + else { + if ($t === !1) { + $t = !0 + var Pn = process.emitWarning ? process.emitWarning : console.warn.bind(console) + Pn( + 'assert.fail() with more than one argument is deprecated. Please use assert.strictEqual() instead or only pass a message.', + 'DeprecationWarning', + 'DEP0094', + ) + } + Qt === 2 && (vn = '!=') + } + if (hn instanceof Error) throw hn + var $n = { actual: rn, expected: nn, operator: vn === void 0 ? 'fail' : vn, stackStartFn: an || Ct } + hn !== void 0 && ($n.message = hn) + var Nn = new pt($n) + throw (_n && ((Nn.message = _n), (Nn.generatedMessage = !0)), Nn) + } + ;(Dt.fail = Ct), (Dt.AssertionError = pt) + function wt(rn, nn, hn, vn) { + if (!hn) { + var an = !1 + if (nn === 0) (an = !0), (vn = 'No value argument passed to `assert.ok()`') + else if (vn instanceof Error) throw vn + var Qt = new pt({ actual: hn, expected: !0, message: vn, operator: '==', stackStartFn: rn }) + throw ((Qt.generatedMessage = an), Qt) + } + } + function It() { + for (var rn = arguments.length, nn = new Array(rn), hn = 0; hn < rn; hn++) nn[hn] = arguments[hn] + wt.apply(void 0, [It, nn.length].concat(nn)) + } + ;(Dt.ok = It), + (Dt.equal = function rn(nn, hn, vn) { + if (arguments.length < 2) throw new dt('actual', 'expected') + nn != hn && Pt({ actual: nn, expected: hn, message: vn, operator: '==', stackStartFn: rn }) + }), + (Dt.notEqual = function rn(nn, hn, vn) { + if (arguments.length < 2) throw new dt('actual', 'expected') + nn == hn && Pt({ actual: nn, expected: hn, message: vn, operator: '!=', stackStartFn: rn }) + }), + (Dt.deepEqual = function rn(nn, hn, vn) { + if (arguments.length < 2) throw new dt('actual', 'expected') + Tt === void 0 && Et(), + Tt(nn, hn) || Pt({ actual: nn, expected: hn, message: vn, operator: 'deepEqual', stackStartFn: rn }) + }), + (Dt.notDeepEqual = function rn(nn, hn, vn) { + if (arguments.length < 2) throw new dt('actual', 'expected') + Tt === void 0 && Et(), + Tt(nn, hn) && Pt({ actual: nn, expected: hn, message: vn, operator: 'notDeepEqual', stackStartFn: rn }) + }), + (Dt.deepStrictEqual = function rn(nn, hn, vn) { + if (arguments.length < 2) throw new dt('actual', 'expected') + Tt === void 0 && Et(), + At(nn, hn) || Pt({ actual: nn, expected: hn, message: vn, operator: 'deepStrictEqual', stackStartFn: rn }) + }), + (Dt.notDeepStrictEqual = Ot) + function Ot(rn, nn, hn) { + if (arguments.length < 2) throw new dt('actual', 'expected') + Tt === void 0 && Et(), + At(rn, nn) && Pt({ actual: rn, expected: nn, message: hn, operator: 'notDeepStrictEqual', stackStartFn: Ot }) + } + ;(Dt.strictEqual = function rn(nn, hn, vn) { + if (arguments.length < 2) throw new dt('actual', 'expected') + kt(nn, hn) || Pt({ actual: nn, expected: hn, message: vn, operator: 'strictEqual', stackStartFn: rn }) + }), + (Dt.notStrictEqual = function rn(nn, hn, vn) { + if (arguments.length < 2) throw new dt('actual', 'expected') + kt(nn, hn) && Pt({ actual: nn, expected: hn, message: vn, operator: 'notStrictEqual', stackStartFn: rn }) + }) + var Wt = nt(function rn(nn, hn, vn) { + var an = this + ot(this, rn), + hn.forEach(function (Qt) { + Qt in nn && + (vn !== void 0 && typeof vn[Qt] == 'string' && vt(nn[Qt]) && St(nn[Qt], vn[Qt]) + ? (an[Qt] = vn[Qt]) + : (an[Qt] = nn[Qt])) + }) + }) + function zt(rn, nn, hn, vn, an, Qt) { + if (!(hn in rn) || !At(rn[hn], nn[hn])) { + if (!vn) { + var _n = new Wt(rn, an), + Pn = new Wt(nn, an, rn), + $n = new pt({ actual: _n, expected: Pn, operator: 'deepStrictEqual', stackStartFn: Qt }) + throw (($n.actual = rn), ($n.expected = nn), ($n.operator = Qt.name), $n) + } + Pt({ actual: rn, expected: nn, message: vn, operator: Qt.name, stackStartFn: Qt }) + } + } + function Ft(rn, nn, hn, vn) { + if (typeof nn != 'function') { + if (vt(nn)) return St(nn, rn) + if (arguments.length === 2) throw new ct('expected', ['Function', 'RegExp'], nn) + if (tt(rn) !== 'object' || rn === null) { + var an = new pt({ actual: rn, expected: nn, message: hn, operator: 'deepStrictEqual', stackStartFn: vn }) + throw ((an.operator = vn.name), an) + } + var Qt = Object.keys(nn) + if (nn instanceof Error) Qt.push('name', 'message') + else if (Qt.length === 0) throw new ut('error', nn, 'may not be an empty object') + return ( + Tt === void 0 && Et(), + Qt.forEach(function (_n) { + ;(typeof rn[_n] == 'string' && vt(nn[_n]) && St(nn[_n], rn[_n])) || zt(rn, nn, _n, hn, Qt, vn) + }), + !0 + ) + } + return nn.prototype !== void 0 && rn instanceof nn ? !0 : Error.isPrototypeOf(nn) ? !1 : nn.call({}, rn) === !0 + } + function Nt(rn) { + if (typeof rn != 'function') throw new ct('fn', 'Function', rn) + try { + rn() + } catch (nn) { + return nn + } + return jt + } + function Ut(rn) { + return ( + bt(rn) || (rn !== null && tt(rn) === 'object' && typeof rn.then == 'function' && typeof rn.catch == 'function') + ) + } + function Mt(rn) { + return Promise.resolve().then(function () { + var nn + if (typeof rn == 'function') { + if (((nn = rn()), !Ut(nn))) throw new ht('instance of Promise', 'promiseFn', nn) + } else if (Ut(rn)) nn = rn + else throw new ct('promiseFn', ['Function', 'Promise'], rn) + return Promise.resolve() + .then(function () { + return nn + }) + .then(function () { + return jt + }) + .catch(function (hn) { + return hn + }) + }) + } + function Ht(rn, nn, hn, vn) { + if (typeof hn == 'string') { + if (arguments.length === 4) throw new ct('error', ['Object', 'Error', 'Function', 'RegExp'], hn) + if (tt(nn) === 'object' && nn !== null) { + if (nn.message === hn) + throw new lt('error/message', 'The error message "'.concat(nn.message, '" is identical to the message.')) + } else if (nn === hn) throw new lt('error/message', 'The error "'.concat(nn, '" is identical to the message.')) + ;(vn = hn), (hn = void 0) + } else if (hn != null && tt(hn) !== 'object' && typeof hn != 'function') + throw new ct('error', ['Object', 'Error', 'Function', 'RegExp'], hn) + if (nn === jt) { + var an = '' + hn && hn.name && (an += ' ('.concat(hn.name, ')')), (an += vn ? ': '.concat(vn) : '.') + var Qt = rn.name === 'rejects' ? 'rejection' : 'exception' + Pt({ + actual: void 0, + expected: hn, + operator: rn.name, + message: 'Missing expected '.concat(Qt).concat(an), + stackStartFn: rn, + }) + } + if (hn && !Ft(nn, hn, vn, rn)) throw nn + } + function en(rn, nn, hn, vn) { + if (nn !== jt) { + if ((typeof hn == 'string' && ((vn = hn), (hn = void 0)), !hn || Ft(nn, hn))) { + var an = vn ? ': '.concat(vn) : '.', + Qt = rn.name === 'doesNotReject' ? 'rejection' : 'exception' + Pt({ + actual: nn, + expected: hn, + operator: rn.name, + message: + 'Got unwanted '.concat(Qt).concat( + an, + ` +`, + ) + 'Actual message: "'.concat(nn && nn.message, '"'), + stackStartFn: rn, + }) + } + throw nn + } + } + ;(Dt.throws = function rn(nn) { + for (var hn = arguments.length, vn = new Array(hn > 1 ? hn - 1 : 0), an = 1; an < hn; an++) + vn[an - 1] = arguments[an] + Ht.apply(void 0, [rn, Nt(nn)].concat(vn)) + }), + (Dt.rejects = function rn(nn) { + for (var hn = arguments.length, vn = new Array(hn > 1 ? hn - 1 : 0), an = 1; an < hn; an++) + vn[an - 1] = arguments[an] + return Mt(nn).then(function (Qt) { + return Ht.apply(void 0, [rn, Qt].concat(vn)) + }) + }), + (Dt.doesNotThrow = function rn(nn) { + for (var hn = arguments.length, vn = new Array(hn > 1 ? hn - 1 : 0), an = 1; an < hn; an++) + vn[an - 1] = arguments[an] + en.apply(void 0, [rn, Nt(nn)].concat(vn)) + }), + (Dt.doesNotReject = function rn(nn) { + for (var hn = arguments.length, vn = new Array(hn > 1 ? hn - 1 : 0), an = 1; an < hn; an++) + vn[an - 1] = arguments[an] + return Mt(nn).then(function (Qt) { + return en.apply(void 0, [rn, Qt].concat(vn)) + }) + }), + (Dt.ifError = function rn(nn) { + if (nn != null) { + var hn = 'ifError got unwanted exception: ' + tt(nn) === 'object' && typeof nn.message == 'string' + ? nn.message.length === 0 && nn.constructor + ? (hn += nn.constructor.name) + : (hn += nn.message) + : (hn += gt(nn)) + var vn = new pt({ actual: nn, expected: null, operator: 'ifError', message: hn, stackStartFn: rn }), + an = nn.stack + if (typeof an == 'string') { + var Qt = an.split(` +`) + Qt.shift() + for ( + var _n = vn.stack.split(` +`), + Pn = 0; + Pn < Qt.length; + Pn++ + ) { + var $n = _n.indexOf(Qt[Pn]) + if ($n !== -1) { + _n = _n.slice(0, $n) + break + } + } + vn.stack = '' + .concat( + _n.join(` +`), + ` +`, + ) + .concat( + Qt.join(` +`), + ) + } + throw vn + } + }) + function sn(rn, nn, hn, vn, an) { + if (!vt(nn)) throw new ct('regexp', 'RegExp', nn) + var Qt = an === 'match' + if (typeof rn != 'string' || St(nn, rn) !== Qt) { + if (hn instanceof Error) throw hn + var _n = !hn + hn = + hn || + (typeof rn != 'string' + ? 'The "string" argument must be of type string. Received type ' + + ''.concat(tt(rn), ' (').concat(gt(rn), ')') + : (Qt + ? 'The input did not match the regular expression ' + : 'The input was expected to not match the regular expression ') + + '' + .concat( + gt(nn), + `. Input: + +`, + ) + .concat( + gt(rn), + ` +`, + )) + var Pn = new pt({ actual: rn, expected: nn, message: hn, operator: an, stackStartFn: vn }) + throw ((Pn.generatedMessage = _n), Pn) + } + } + ;(Dt.match = function rn(nn, hn, vn) { + sn(nn, hn, vn, rn, 'match') + }), + (Dt.doesNotMatch = function rn(nn, hn, vn) { + sn(nn, hn, vn, rn, 'doesNotMatch') + }) + function Kt() { + for (var rn = arguments.length, nn = new Array(rn), hn = 0; hn < rn; hn++) nn[hn] = arguments[hn] + wt.apply(void 0, [Kt, nn.length].concat(nn)) + } + return ( + (Dt.strict = xt(Kt, Dt, { + equal: Dt.strictEqual, + deepEqual: Dt.deepStrictEqual, + notEqual: Dt.notStrictEqual, + notDeepEqual: Dt.notDeepStrictEqual, + })), + (Dt.strict.strict = Dt.strict), + assert$p.exports + ) + } + var bufio = {}, + customBrowser = {} + customBrowser.custom = 'inspect' + var encoding$4 = {} + /*! + * enforce.js - type enforcement for bcoin + * Copyright (c) 2014-2017, Christopher Jeffrey (MIT License). + * https://github.com/bcoin-org/bcoin + */ function enforce$7(tt, et, nt) { + if (!tt) { + const rt = new TypeError(`'${et}' must be a(n) ${nt}.`) + throw (Error.captureStackTrace && Error.captureStackTrace(rt, enforce$7), rt) + } + } + var enforce_1 = enforce$7 + /*! + * error.js - encoding error for bcoin + * Copyright (c) 2014-2015, Fedor Indutny (MIT License) + * Copyright (c) 2014-2017, Christopher Jeffrey (MIT License). + * https://github.com/bcoin-org/bcoin + */ let EncodingError$5 = class gw extends Error { + constructor(et, nt, rt) { + super(), + (this.type = 'EncodingError'), + (this.name = 'EncodingError'), + (this.code = 'ERR_ENCODING'), + (this.message = `${nt} (offset=${et}).`), + Error.captureStackTrace && Error.captureStackTrace(this, rt || gw) + } + } + var error = EncodingError$5 + /*! + * encoding.js - encoding utils for bcoin + * Copyright (c) 2014-2015, Fedor Indutny (MIT License) + * Copyright (c) 2014-2017, Christopher Jeffrey (MIT License). + * https://github.com/bcoin-org/bcoin + */ const enforce$6 = enforce_1, + EncodingError$4 = error, + HI = 1 / 4294967296, + { MAX_SAFE_INTEGER: MAX_SAFE_INTEGER$5 } = Number, + F32_ARRAY = new Float32Array(1), + F328_ARRAY = new Uint8Array(F32_ARRAY.buffer), + F64_ARRAY = new Float64Array(1), + F648_ARRAY = new Uint8Array(F64_ARRAY.buffer) + F32_ARRAY[0] = -1 + const BIG_ENDIAN = F328_ARRAY[3] === 0, + BI = + typeof BigInt == 'function' + ? BigInt + : function (tt) { + return 0 + }, + BIG_U56_MAX = (BI(1) << BI(56)) - BI(1), + BIG_U64_MAX = (BI(1) << BI(64)) - BI(1), + BIG_U128_MAX = (BI(1) << BI(128)) - BI(1), + BIG_U256_MAX = (BI(1) << BI(256)) - BI(1) + function readU(tt, et, nt) { + switch (nt) { + case 8: + return readU64(tt, et) + case 7: + return readU56(tt, et) + case 6: + return readU48(tt, et) + case 5: + return readU40(tt, et) + case 4: + return readU32(tt, et) + case 3: + return readU24(tt, et) + case 2: + return readU16(tt, et) + case 1: + return readU8(tt, et) + default: + throw new EncodingError$4(et, 'Invalid read length') + } + } + function readBigU256(tt, et) { + const nt = readBigU128(tt, et + 16), + rt = readBigU128(tt, et) + return (nt << BigInt(128)) | rt + } + function readBigU128(tt, et) { + const nt = readBigU64(tt, et + 8), + rt = readBigU64(tt, et) + return (nt << BigInt(64)) | rt + } + function readBigU64(tt, et) { + const nt = readU32(tt, et + 4), + rt = readU32(tt, et) + return (BigInt(nt) << BigInt(32)) | BigInt(rt) + } + function readBigU56(tt, et) { + const nt = readU24(tt, et + 4), + rt = readU32(tt, et) + return (BigInt(nt) << BigInt(32)) | BigInt(rt) + } + function readU64(tt, et) { + const nt = readU32(tt, et + 4), + rt = readU32(tt, et) + return check$e((nt & 4292870144) === 0, et, 'Number exceeds 2^53-1'), nt * 4294967296 + rt + } + function readU56(tt, et) { + const nt = readU24(tt, et + 4), + rt = readU32(tt, et) + return check$e((nt & 4292870144) === 0, et, 'Number exceeds 2^53-1'), nt * 4294967296 + rt + } + function readU48(tt, et) { + return ( + tt[et++] + + tt[et++] * 256 + + tt[et++] * 65536 + + tt[et++] * 16777216 + + tt[et++] * 4294967296 + + tt[et] * 1099511627776 + ) + } + function readU40(tt, et) { + return tt[et++] + tt[et++] * 256 + tt[et++] * 65536 + tt[et++] * 16777216 + tt[et] * 4294967296 + } + function readU32(tt, et) { + return tt[et++] + tt[et++] * 256 + tt[et++] * 65536 + tt[et] * 16777216 + } + function readU24(tt, et) { + return tt[et++] + tt[et++] * 256 + tt[et] * 65536 + } + function readU16(tt, et) { + return tt[et++] + tt[et] * 256 + } + function readU8(tt, et) { + return tt[et] + } + function readUBE(tt, et, nt) { + switch (nt) { + case 8: + return readU64BE(tt, et) + case 7: + return readU56BE(tt, et) + case 6: + return readU48BE(tt, et) + case 5: + return readU40BE(tt, et) + case 4: + return readU32BE(tt, et) + case 3: + return readU24BE(tt, et) + case 2: + return readU16BE(tt, et) + case 1: + return readU8(tt, et) + default: + throw new EncodingError$4(et, 'Invalid read length') + } + } + function readBigU256BE(tt, et) { + const nt = readBigU128BE(tt, et), + rt = readBigU128BE(tt, et + 16) + return (nt << BigInt(128)) | rt + } + function readBigU128BE(tt, et) { + const nt = readBigU64BE(tt, et), + rt = readBigU64BE(tt, et + 8) + return (nt << BigInt(64)) | rt + } + function readBigU64BE(tt, et) { + const nt = readU32BE(tt, et), + rt = readU32BE(tt, et + 4) + return (BigInt(nt) << BigInt(32)) | BigInt(rt) + } + function readBigU56BE(tt, et) { + const nt = readU24BE(tt, et), + rt = readU32BE(tt, et + 3) + return (BigInt(nt) << BigInt(32)) | BigInt(rt) + } + function readU64BE(tt, et) { + const nt = readU32BE(tt, et), + rt = readU32BE(tt, et + 4) + return check$e((nt & 4292870144) === 0, et, 'Number exceeds 2^53-1'), nt * 4294967296 + rt + } + function readU56BE(tt, et) { + const nt = readU24BE(tt, et), + rt = readU32BE(tt, et + 3) + return check$e((nt & 4292870144) === 0, et, 'Number exceeds 2^53-1'), nt * 4294967296 + rt + } + function readU48BE(tt, et) { + return ( + tt[et++] * 1099511627776 + + tt[et++] * 4294967296 + + tt[et++] * 16777216 + + tt[et++] * 65536 + + tt[et++] * 256 + + tt[et] + ) + } + function readU40BE(tt, et) { + return tt[et++] * 4294967296 + tt[et++] * 16777216 + tt[et++] * 65536 + tt[et++] * 256 + tt[et] + } + function readU32BE(tt, et) { + return tt[et++] * 16777216 + tt[et++] * 65536 + tt[et++] * 256 + tt[et] + } + function readU24BE(tt, et) { + return tt[et++] * 65536 + tt[et++] * 256 + tt[et] + } + function readU16BE(tt, et) { + return tt[et++] * 256 + tt[et] + } + function readI(tt, et, nt) { + switch (nt) { + case 8: + return readI64(tt, et) + case 7: + return readI56(tt, et) + case 6: + return readI48(tt, et) + case 5: + return readI40(tt, et) + case 4: + return readI32(tt, et) + case 3: + return readI24(tt, et) + case 2: + return readI16(tt, et) + case 1: + return readI8(tt, et) + default: + throw new EncodingError$4(et, 'Invalid read length') + } + } + function readBigI64(tt, et) { + const nt = readI32(tt, et + 4), + rt = readU32(tt, et) + return (BigInt(nt) << BigInt(32)) | BigInt(rt) + } + function readBigI56(tt, et) { + const nt = readI24(tt, et + 4), + rt = readU32(tt, et) + return (BigInt(nt) << BigInt(32)) | BigInt(rt) + } + function readI64(tt, et) { + const nt = readI32(tt, et + 4), + rt = readU32(tt, et) + return check$e(isSafe(nt, rt), 'Number exceeds 2^53-1'), nt * 4294967296 + rt + } + function readI56(tt, et) { + const nt = readI24(tt, et + 4), + rt = readU32(tt, et) + return check$e(isSafe(nt, rt), 'Number exceeds 2^53-1'), nt * 4294967296 + rt + } + function readI48(tt, et) { + const nt = tt[et + 4] + tt[et + 5] * 256 + return ( + tt[et++] + tt[et++] * 256 + tt[et++] * 65536 + tt[et] * 16777216 + (nt | ((nt & 32768) * 131070)) * 4294967296 + ) + } + function readI40(tt, et) { + return ( + tt[et++] + + tt[et++] * 256 + + tt[et++] * 65536 + + tt[et++] * 16777216 + + (tt[et] | ((tt[et] & 128) * 33554430)) * 4294967296 + ) + } + function readI32(tt, et) { + return tt[et++] + tt[et++] * 256 + tt[et++] * 65536 + (tt[et] << 24) + } + function readI24(tt, et) { + const nt = tt[et++] + tt[et++] * 256 + tt[et] * 65536 + return nt | ((nt & 8388608) * 510) + } + function readI16(tt, et) { + const nt = tt[et++] + tt[et] * 256 + return nt | ((nt & 32768) * 131070) + } + function readI8(tt, et) { + const nt = tt[et] + return nt | ((nt & 128) * 33554430) + } + function readIBE(tt, et, nt) { + switch (nt) { + case 8: + return readI64BE(tt, et) + case 7: + return readI56BE(tt, et) + case 6: + return readI48BE(tt, et) + case 5: + return readI40BE(tt, et) + case 4: + return readI32BE(tt, et) + case 3: + return readI24BE(tt, et) + case 2: + return readI16BE(tt, et) + case 1: + return readI8(tt, et) + default: + throw new EncodingError$4(et, 'Invalid read length') + } + } + function readBigI64BE(tt, et) { + const nt = readI32BE(tt, et), + rt = readU32BE(tt, et + 4) + return (BigInt(nt) << BigInt(32)) | BigInt(rt) + } + function readBigI56BE(tt, et) { + const nt = readI24BE(tt, et), + rt = readU32BE(tt, et + 3) + return (BigInt(nt) << BigInt(32)) | BigInt(rt) + } + function readI64BE(tt, et) { + const nt = readI32BE(tt, et), + rt = readU32BE(tt, et + 4) + return check$e(isSafe(nt, rt), 'Number exceeds 2^53-1'), nt * 4294967296 + rt + } + function readI56BE(tt, et) { + const nt = readI24BE(tt, et), + rt = readU32BE(tt, et + 3) + return check$e(isSafe(nt, rt), 'Number exceeds 2^53-1'), nt * 4294967296 + rt + } + function readI48BE(tt, et) { + const nt = tt[et++] * 256 + tt[et++] + return ( + (nt | ((nt & 32768) * 131070)) * 4294967296 + tt[et++] * 16777216 + tt[et++] * 65536 + tt[et++] * 256 + tt[et] + ) + } + function readI40BE(tt, et) { + const nt = tt[et++] + return ( + (nt | ((nt & 128) * 33554430)) * 4294967296 + tt[et++] * 16777216 + tt[et++] * 65536 + tt[et++] * 256 + tt[et] + ) + } + function readI32BE(tt, et) { + return (tt[et++] << 24) + tt[et++] * 65536 + tt[et++] * 256 + tt[et] + } + function readI24BE(tt, et) { + const nt = tt[et++] * 65536 + tt[et++] * 256 + tt[et] + return nt | ((nt & 8388608) * 510) + } + function readI16BE(tt, et) { + const nt = tt[et++] * 256 + tt[et] + return nt | ((nt & 32768) * 131070) + } + function _readFloatBackwards(tt, et) { + return ( + (F328_ARRAY[3] = tt[et++]), + (F328_ARRAY[2] = tt[et++]), + (F328_ARRAY[1] = tt[et++]), + (F328_ARRAY[0] = tt[et]), + F32_ARRAY[0] + ) + } + function _readFloatForwards(tt, et) { + return ( + (F328_ARRAY[0] = tt[et++]), + (F328_ARRAY[1] = tt[et++]), + (F328_ARRAY[2] = tt[et++]), + (F328_ARRAY[3] = tt[et]), + F32_ARRAY[0] + ) + } + function _readDoubleBackwards(tt, et) { + return ( + (F648_ARRAY[7] = tt[et++]), + (F648_ARRAY[6] = tt[et++]), + (F648_ARRAY[5] = tt[et++]), + (F648_ARRAY[4] = tt[et++]), + (F648_ARRAY[3] = tt[et++]), + (F648_ARRAY[2] = tt[et++]), + (F648_ARRAY[1] = tt[et++]), + (F648_ARRAY[0] = tt[et]), + F64_ARRAY[0] + ) + } + function _readDoubleForwards(tt, et) { + return ( + (F648_ARRAY[0] = tt[et++]), + (F648_ARRAY[1] = tt[et++]), + (F648_ARRAY[2] = tt[et++]), + (F648_ARRAY[3] = tt[et++]), + (F648_ARRAY[4] = tt[et++]), + (F648_ARRAY[5] = tt[et++]), + (F648_ARRAY[6] = tt[et++]), + (F648_ARRAY[7] = tt[et]), + F64_ARRAY[0] + ) + } + const readFloat = BIG_ENDIAN ? _readFloatBackwards : _readFloatForwards, + readFloatBE = BIG_ENDIAN ? _readFloatForwards : _readFloatBackwards, + readDouble = BIG_ENDIAN ? _readDoubleBackwards : _readDoubleForwards, + readDoubleBE = BIG_ENDIAN ? _readDoubleForwards : _readDoubleBackwards + function writeU(tt, et, nt, rt) { + switch (rt) { + case 8: + return writeU64(tt, et, nt) + case 7: + return writeU56(tt, et, nt) + case 6: + return writeU48(tt, et, nt) + case 5: + return writeU40(tt, et, nt) + case 4: + return writeU32(tt, et, nt) + case 3: + return writeU24(tt, et, nt) + case 2: + return writeU16(tt, et, nt) + case 1: + return writeU8(tt, et, nt) + default: + throw new EncodingError$4(nt, 'Invalid write length') + } + } + function writeBigU256(tt, et, nt) { + enforce$6(typeof et == 'bigint', 'num', 'bigint'), (et &= BIG_U256_MAX) + const rt = et >> BigInt(128), + it = et & BIG_U128_MAX + return (nt = writeBigU128(tt, it, nt)), (nt = writeBigU128(tt, rt, nt)), nt + } + function writeBigU128(tt, et, nt) { + enforce$6(typeof et == 'bigint', 'num', 'bigint'), (et &= BIG_U128_MAX) + const rt = et >> BigInt(64), + it = et & BIG_U64_MAX + return (nt = writeBigU64(tt, it, nt)), (nt = writeBigU64(tt, rt, nt)), nt + } + function writeBigU64(tt, et, nt) { + enforce$6(typeof et == 'bigint', 'num', 'bigint'), (et &= BIG_U64_MAX) + const rt = Number(et >> BigInt(32)), + it = Number(et & BigInt(4294967295)) + return (nt = writeU32(tt, it, nt)), (nt = writeU32(tt, rt, nt)), nt + } + function writeBigU56(tt, et, nt) { + enforce$6(typeof et == 'bigint', 'num', 'bigint'), (et &= BIG_U56_MAX) + const rt = Number(et >> BigInt(32)), + it = Number(et & BigInt(4294967295)) + return (nt = writeU32(tt, it, nt)), (nt = writeU24(tt, rt, nt)), nt + } + function writeU64(tt, et, nt) { + return enforce$6(Number.isSafeInteger(et), 'num', 'integer'), write64(tt, et, nt, !1) + } + function writeU56(tt, et, nt) { + return enforce$6(Number.isSafeInteger(et), 'num', 'integer'), write56(tt, et, nt, !1) + } + function writeU48(tt, et, nt) { + enforce$6(Number.isSafeInteger(et), 'num', 'integer') + const rt = (et * HI) | 0 + return ( + (tt[nt++] = et), + (et >>>= 8), + (tt[nt++] = et), + (et >>>= 8), + (tt[nt++] = et), + (et >>>= 8), + (tt[nt++] = et), + (tt[nt++] = rt), + (tt[nt++] = rt >>> 8), + nt + ) + } + function writeU40(tt, et, nt) { + enforce$6(Number.isSafeInteger(et), 'num', 'integer') + const rt = (et * HI) | 0 + return ( + (tt[nt++] = et), + (et >>>= 8), + (tt[nt++] = et), + (et >>>= 8), + (tt[nt++] = et), + (et >>>= 8), + (tt[nt++] = et), + (tt[nt++] = rt), + nt + ) + } + function writeU32(tt, et, nt) { + return ( + enforce$6(Number.isSafeInteger(et), 'num', 'integer'), + (tt[nt++] = et), + (et >>>= 8), + (tt[nt++] = et), + (et >>>= 8), + (tt[nt++] = et), + (et >>>= 8), + (tt[nt++] = et), + nt + ) + } + function writeU24(tt, et, nt) { + return ( + enforce$6(Number.isSafeInteger(et), 'num', 'integer'), + (tt[nt++] = et), + (et >>>= 8), + (tt[nt++] = et), + (et >>>= 8), + (tt[nt++] = et), + nt + ) + } + function writeU16(tt, et, nt) { + return enforce$6(Number.isSafeInteger(et), 'num', 'integer'), (tt[nt++] = et), (tt[nt++] = et >>> 8), nt + } + function writeU8(tt, et, nt) { + return enforce$6(Number.isSafeInteger(et), 'num', 'integer'), (tt[nt] = et), nt + 1 + } + function writeUBE(tt, et, nt, rt) { + switch (rt) { + case 8: + return writeU64BE(tt, et, nt) + case 7: + return writeU56BE(tt, et, nt) + case 6: + return writeU48BE(tt, et, nt) + case 5: + return writeU40BE(tt, et, nt) + case 4: + return writeU32BE(tt, et, nt) + case 3: + return writeU24BE(tt, et, nt) + case 2: + return writeU16BE(tt, et, nt) + case 1: + return writeU8(tt, et, nt) + default: + throw new EncodingError$4(nt, 'Invalid write length') + } + } + function writeBigU256BE(tt, et, nt) { + enforce$6(typeof et == 'bigint', 'num', 'bigint'), (et &= BIG_U256_MAX) + const rt = et >> BigInt(128), + it = et & BIG_U128_MAX + return (nt = writeBigU128BE(tt, rt, nt)), (nt = writeBigU128BE(tt, it, nt)), nt + } + function writeBigU128BE(tt, et, nt) { + enforce$6(typeof et == 'bigint', 'num', 'bigint'), (et &= BIG_U128_MAX) + const rt = et >> BigInt(64), + it = et & BIG_U64_MAX + return (nt = writeBigU64BE(tt, rt, nt)), (nt = writeBigU64BE(tt, it, nt)), nt + } + function writeBigU64BE(tt, et, nt) { + enforce$6(typeof et == 'bigint', 'num', 'bigint'), (et &= BIG_U64_MAX) + const rt = Number(et >> BigInt(32)), + it = Number(et & BigInt(4294967295)) + return (nt = writeU32BE(tt, rt, nt)), (nt = writeU32BE(tt, it, nt)), nt + } + function writeBigU56BE(tt, et, nt) { + enforce$6(typeof et == 'bigint', 'num', 'bigint'), (et &= BIG_U56_MAX) + const rt = Number(et >> BigInt(32)), + it = Number(et & BigInt(4294967295)) + return (nt = writeU24BE(tt, rt, nt)), (nt = writeU32BE(tt, it, nt)), nt + } + function writeU64BE(tt, et, nt) { + return enforce$6(Number.isSafeInteger(et), 'num', 'integer'), write64(tt, et, nt, !0) + } + function writeU56BE(tt, et, nt) { + return enforce$6(Number.isSafeInteger(et), 'num', 'integer'), write56(tt, et, nt, !0) + } + function writeU48BE(tt, et, nt) { + enforce$6(Number.isSafeInteger(et), 'num', 'integer') + const rt = (et * HI) | 0 + return ( + (tt[nt++] = rt >>> 8), + (tt[nt++] = rt), + (tt[nt + 3] = et), + (et >>>= 8), + (tt[nt + 2] = et), + (et >>>= 8), + (tt[nt + 1] = et), + (et >>>= 8), + (tt[nt] = et), + nt + 4 + ) + } + function writeU40BE(tt, et, nt) { + enforce$6(Number.isSafeInteger(et), 'num', 'integer') + const rt = (et * HI) | 0 + return ( + (tt[nt++] = rt), + (tt[nt + 3] = et), + (et >>>= 8), + (tt[nt + 2] = et), + (et >>>= 8), + (tt[nt + 1] = et), + (et >>>= 8), + (tt[nt] = et), + nt + 4 + ) + } + function writeU32BE(tt, et, nt) { + return ( + enforce$6(Number.isSafeInteger(et), 'num', 'integer'), + (tt[nt + 3] = et), + (et >>>= 8), + (tt[nt + 2] = et), + (et >>>= 8), + (tt[nt + 1] = et), + (et >>>= 8), + (tt[nt] = et), + nt + 4 + ) + } + function writeU24BE(tt, et, nt) { + return ( + enforce$6(Number.isSafeInteger(et), 'num', 'integer'), + (tt[nt + 2] = et), + (et >>>= 8), + (tt[nt + 1] = et), + (et >>>= 8), + (tt[nt] = et), + nt + 3 + ) + } + function writeU16BE(tt, et, nt) { + return enforce$6(Number.isSafeInteger(et), 'num', 'integer'), (tt[nt++] = et >>> 8), (tt[nt++] = et), nt + } + function writeI(tt, et, nt, rt) { + switch (rt) { + case 8: + return writeU64(tt, et, nt) + case 7: + return writeU56(tt, et, nt) + case 6: + return writeU48(tt, et, nt) + case 5: + return writeU40(tt, et, nt) + case 4: + return writeU24(tt, et, nt) + case 3: + return writeU32(tt, et, nt) + case 2: + return writeU16(tt, et, nt) + case 1: + return writeU8(tt, et, nt) + default: + throw new EncodingError$4(nt, 'Invalid write length') + } + } + function writeBigI64(tt, et, nt) { + return writeBigU64(tt, et, nt) + } + function writeBigI56(tt, et, nt) { + return writeBigU56(tt, et, nt) + } + function writeI64(tt, et, nt) { + return writeU64(tt, et, nt) + } + function writeI56(tt, et, nt) { + return writeU56(tt, et, nt) + } + function writeI48(tt, et, nt) { + return writeU48(tt, et, nt) + } + function writeI40(tt, et, nt) { + return writeU40(tt, et, nt) + } + function writeI32(tt, et, nt) { + return writeU32(tt, et, nt) + } + function writeI24(tt, et, nt) { + return writeU24(tt, et, nt) + } + function writeI16(tt, et, nt) { + return writeU16(tt, et, nt) + } + function writeI8(tt, et, nt) { + return writeU8(tt, et, nt) + } + function writeIBE(tt, et, nt, rt) { + switch (rt) { + case 8: + return writeU64BE(tt, et, nt) + case 7: + return writeU56BE(tt, et, nt) + case 6: + return writeU48BE(tt, et, nt) + case 5: + return writeU40BE(tt, et, nt) + case 4: + return writeU32BE(tt, et, nt) + case 3: + return writeU24BE(tt, et, nt) + case 2: + return writeU16BE(tt, et, nt) + case 1: + return writeU8(tt, et, nt) + default: + throw new EncodingError$4(nt, 'Invalid write length') + } + } + function writeBigI64BE(tt, et, nt) { + return writeBigU64BE(tt, et, nt) + } + function writeBigI56BE(tt, et, nt) { + return writeBigU56BE(tt, et, nt) + } + function writeI64BE(tt, et, nt) { + return writeU64BE(tt, et, nt) + } + function writeI56BE(tt, et, nt) { + return writeU56BE(tt, et, nt) + } + function writeI48BE(tt, et, nt) { + return writeU48BE(tt, et, nt) + } + function writeI40BE(tt, et, nt) { + return writeU40BE(tt, et, nt) + } + function writeI32BE(tt, et, nt) { + return writeU32BE(tt, et, nt) + } + function writeI24BE(tt, et, nt) { + return writeU24BE(tt, et, nt) + } + function writeI16BE(tt, et, nt) { + return writeU16BE(tt, et, nt) + } + function _writeDoubleForwards(tt, et, nt) { + return ( + enforce$6(isNumber$5(et), 'num', 'number'), + (F64_ARRAY[0] = et), + (tt[nt++] = F648_ARRAY[0]), + (tt[nt++] = F648_ARRAY[1]), + (tt[nt++] = F648_ARRAY[2]), + (tt[nt++] = F648_ARRAY[3]), + (tt[nt++] = F648_ARRAY[4]), + (tt[nt++] = F648_ARRAY[5]), + (tt[nt++] = F648_ARRAY[6]), + (tt[nt++] = F648_ARRAY[7]), + nt + ) + } + function _writeDoubleBackwards(tt, et, nt) { + return ( + enforce$6(isNumber$5(et), 'num', 'number'), + (F64_ARRAY[0] = et), + (tt[nt++] = F648_ARRAY[7]), + (tt[nt++] = F648_ARRAY[6]), + (tt[nt++] = F648_ARRAY[5]), + (tt[nt++] = F648_ARRAY[4]), + (tt[nt++] = F648_ARRAY[3]), + (tt[nt++] = F648_ARRAY[2]), + (tt[nt++] = F648_ARRAY[1]), + (tt[nt++] = F648_ARRAY[0]), + nt + ) + } + function _writeFloatForwards(tt, et, nt) { + return ( + enforce$6(isNumber$5(et), 'num', 'number'), + (F32_ARRAY[0] = et), + (tt[nt++] = F328_ARRAY[0]), + (tt[nt++] = F328_ARRAY[1]), + (tt[nt++] = F328_ARRAY[2]), + (tt[nt++] = F328_ARRAY[3]), + nt + ) + } + function _writeFloatBackwards(tt, et, nt) { + return ( + enforce$6(isNumber$5(et), 'num', 'number'), + (F32_ARRAY[0] = et), + (tt[nt++] = F328_ARRAY[3]), + (tt[nt++] = F328_ARRAY[2]), + (tt[nt++] = F328_ARRAY[1]), + (tt[nt++] = F328_ARRAY[0]), + nt + ) + } + const writeFloat = BIG_ENDIAN ? _writeFloatBackwards : _writeFloatForwards, + writeFloatBE = BIG_ENDIAN ? _writeFloatForwards : _writeFloatBackwards, + writeDouble = BIG_ENDIAN ? _writeDoubleBackwards : _writeDoubleForwards, + writeDoubleBE = BIG_ENDIAN ? _writeDoubleForwards : _writeDoubleBackwards + function readVarint(tt, et) { + let nt, rt + switch ((checkRead(et < tt.length, et), tt[et])) { + case 255: + ;(rt = 9), + checkRead(et + rt <= tt.length, et), + (nt = readU64(tt, et + 1)), + check$e(nt > 4294967295, et, 'Non-canonical varint') + break + case 254: + ;(rt = 5), + checkRead(et + rt <= tt.length, et), + (nt = readU32(tt, et + 1)), + check$e(nt > 65535, et, 'Non-canonical varint') + break + case 253: + ;(rt = 3), + checkRead(et + rt <= tt.length, et), + (nt = readU16(tt, et + 1)), + check$e(nt >= 253, et, 'Non-canonical varint') + break + default: + ;(rt = 1), (nt = tt[et]) + break + } + return new Varint(rt, nt) + } + function writeVarint(tt, et, nt) { + return ( + enforce$6(Number.isSafeInteger(et), 'num', 'integer'), + et < 253 + ? ((tt[nt++] = et), nt) + : et <= 65535 + ? ((tt[nt++] = 253), writeU16(tt, et, nt)) + : et <= 4294967295 + ? ((tt[nt++] = 254), writeU32(tt, et, nt)) + : ((tt[nt++] = 255), writeU64(tt, et, nt)) + ) + } + function sizeVarint(tt) { + return ( + enforce$6(Number.isSafeInteger(tt), 'num', 'integer'), tt < 253 ? 1 : tt <= 65535 ? 3 : tt <= 4294967295 ? 5 : 9 + ) + } + function readVarint2(tt, et) { + let nt = 0, + rt = 0 + for (;;) { + checkRead(et < tt.length, et) + const it = tt[et++] + if ( + ((rt += 1), + check$e(nt <= 70368744177663 - (it & 127), et, 'Number exceeds 2^53-1'), + (nt = nt * 128 + (it & 127)), + !(it & 128)) + ) + break + check$e(nt !== MAX_SAFE_INTEGER$5, et, 'Number exceeds 2^53-1'), (nt += 1) + } + return new Varint(rt, nt) + } + function writeVarint2(tt, et, nt) { + enforce$6(Number.isSafeInteger(et), 'num', 'integer') + const rt = [] + let it = 0 + for (; (rt[it] = (et & 127) | (it ? 128 : 0)), !(et <= 127); ) (et = (et - (et % 128)) / 128 - 1), (it += 1) + checkRead(nt + it + 1 <= tt.length, nt) + do tt[nt++] = rt[it] + while (it--) + return nt + } + function sizeVarint2(tt) { + enforce$6(Number.isSafeInteger(tt), 'num', 'integer') + let et = 0 + for (; (et += 1), !(tt <= 127); ) tt = (tt - (tt % 128)) / 128 - 1 + return et + } + function sliceBytes(tt, et, nt) { + if ( + (enforce$6(Buffer.isBuffer(tt), 'data', 'buffer'), + enforce$6(et >>> 0 === et, 'off', 'integer'), + enforce$6(nt >>> 0 === nt, 'size', 'integer'), + et + nt > tt.length) + ) + throw new EncodingError$4(et, 'Out of bounds read') + return tt.slice(et, et + nt) + } + function readBytes(tt, et, nt) { + if ( + (enforce$6(Buffer.isBuffer(tt), 'data', 'buffer'), + enforce$6(et >>> 0 === et, 'off', 'integer'), + enforce$6(nt >>> 0 === nt, 'size', 'integer'), + et + nt > tt.length) + ) + throw new EncodingError$4(et, 'Out of bounds read') + const rt = Buffer.allocUnsafeSlow(nt) + return tt.copy(rt, 0, et, et + nt), rt + } + function writeBytes(tt, et, nt) { + if ( + (enforce$6(Buffer.isBuffer(tt), 'data', 'buffer'), + enforce$6(Buffer.isBuffer(et), 'value', 'buffer'), + enforce$6(nt >>> 0 === nt, 'off', 'integer'), + nt + et.length > tt.length) + ) + throw new EncodingError$4(nt, 'Out of bounds write') + return et.copy(tt, nt, 0, et.length) + } + function readString(tt, et, nt, rt) { + if ( + (rt == null && (rt = 'binary'), + enforce$6(Buffer.isBuffer(tt), 'data', 'buffer'), + enforce$6(et >>> 0 === et, 'off', 'integer'), + enforce$6(nt >>> 0 === nt, 'size', 'integer'), + enforce$6(typeof rt == 'string', 'enc', 'string'), + et + nt > tt.length) + ) + throw new EncodingError$4(et, 'Out of bounds read') + return tt.toString(rt, et, et + nt) + } + function writeString(tt, et, nt, rt) { + if ( + (rt == null && (rt = 'binary'), + enforce$6(Buffer.isBuffer(tt), 'data', 'buffer'), + enforce$6(typeof et == 'string', 'str', 'string'), + enforce$6(nt >>> 0 === nt, 'off', 'integer'), + enforce$6(typeof rt == 'string', 'enc', 'string'), + et.length === 0) + ) + return 0 + const it = Buffer.byteLength(et, rt) + if (nt + it > tt.length) throw new EncodingError$4(nt, 'Out of bounds write') + return tt.write(et, nt, rt) + } + function realloc(tt, et) { + enforce$6(Buffer.isBuffer(tt), 'data', 'buffer') + const nt = Buffer.allocUnsafeSlow(et) + return tt.copy(nt, 0), nt + } + function copy$2(tt) { + return enforce$6(Buffer.isBuffer(tt), 'data', 'buffer'), realloc(tt, tt.length) + } + function concat(tt, et) { + enforce$6(Buffer.isBuffer(tt), 'a', 'buffer'), enforce$6(Buffer.isBuffer(et), 'b', 'buffer') + const nt = tt.length + et.length, + rt = Buffer.allocUnsafeSlow(nt) + return tt.copy(rt, 0), et.copy(rt, tt.length), rt + } + function sizeVarBytes(tt) { + return enforce$6(Buffer.isBuffer(tt), 'data', 'buffer'), sizeVarint(tt.length) + tt.length + } + function sizeVarlen(tt) { + return sizeVarint(tt) + tt + } + function sizeVarString(tt, et) { + if ( + (et == null && (et = 'binary'), + enforce$6(typeof tt == 'string', 'str', 'string'), + enforce$6(typeof et == 'string', 'enc', 'string'), + tt.length === 0) + ) + return 1 + const nt = Buffer.byteLength(tt, et) + return sizeVarint(nt) + nt + } + function isSafe(tt, et) { + return tt < 0 && ((tt = ~tt), et === 0 && (tt += 1)), (tt & 4292870144) === 0 + } + function write64(tt, et, nt, rt) { + let it = !1 + et < 0 && ((et = -et), (it = !0)) + let ot = (et * HI) | 0, + at = et | 0 + return ( + it && (at === 0 ? (ot = (~ot + 1) | 0) : ((ot = ~ot), (at = ~at + 1))), + rt + ? ((nt = writeI32BE(tt, ot, nt)), (nt = writeI32BE(tt, at, nt))) + : ((nt = writeI32(tt, at, nt)), (nt = writeI32(tt, ot, nt))), + nt + ) + } + function write56(tt, et, nt, rt) { + let it = !1 + et < 0 && ((et = -et), (it = !0)) + let ot = (et * HI) | 0, + at = et | 0 + return ( + it && (at === 0 ? (ot = (~ot + 1) | 0) : ((ot = ~ot), (at = ~at + 1))), + rt + ? ((nt = writeI24BE(tt, ot, nt)), (nt = writeI32BE(tt, at, nt))) + : ((nt = writeI32(tt, at, nt)), (nt = writeI24(tt, ot, nt))), + nt + ) + } + class Varint { + constructor(et, nt) { + ;(this.size = et), (this.value = nt) + } + } + function isNumber$5(tt) { + return typeof tt == 'number' && isFinite(tt) + } + function checkRead(tt, et) { + if (!tt) throw new EncodingError$4(et, 'Out of bounds read', checkRead) + } + function check$e(tt, et, nt) { + if (!tt) throw new EncodingError$4(et, nt, check$e) + } + function throwNoBigInt() { + throw new Error('BigInt not supported.') + } + function ensureBigInt(tt) { + return typeof BigInt == 'function' ? tt : throwNoBigInt + } + encoding$4.readU = readU + encoding$4.readBigU256 = ensureBigInt(readBigU256) + encoding$4.readBigU128 = ensureBigInt(readBigU128) + encoding$4.readBigU64 = ensureBigInt(readBigU64) + encoding$4.readBigU56 = ensureBigInt(readBigU56) + encoding$4.readU64 = readU64 + encoding$4.readU56 = readU56 + encoding$4.readU48 = readU48 + encoding$4.readU40 = readU40 + encoding$4.readU32 = readU32 + encoding$4.readU24 = readU24 + encoding$4.readU16 = readU16 + encoding$4.readU8 = readU8 + encoding$4.readUBE = readUBE + encoding$4.readBigU256BE = ensureBigInt(readBigU256BE) + encoding$4.readBigU128BE = ensureBigInt(readBigU128BE) + encoding$4.readBigU64BE = ensureBigInt(readBigU64BE) + encoding$4.readBigU56BE = ensureBigInt(readBigU56BE) + encoding$4.readU64BE = readU64BE + encoding$4.readU56BE = readU56BE + encoding$4.readU48BE = readU48BE + encoding$4.readU40BE = readU40BE + encoding$4.readU32BE = readU32BE + encoding$4.readU24BE = readU24BE + encoding$4.readU16BE = readU16BE + encoding$4.readI = readI + encoding$4.readBigI64 = ensureBigInt(readBigI64) + encoding$4.readBigI56 = ensureBigInt(readBigI56) + encoding$4.readI64 = readI64 + encoding$4.readI56 = readI56 + encoding$4.readI48 = readI48 + encoding$4.readI40 = readI40 + encoding$4.readI32 = readI32 + encoding$4.readI24 = readI24 + encoding$4.readI16 = readI16 + encoding$4.readI8 = readI8 + encoding$4.readIBE = readIBE + encoding$4.readBigI64BE = ensureBigInt(readBigI64BE) + encoding$4.readBigI56BE = ensureBigInt(readBigI56BE) + encoding$4.readI64BE = readI64BE + encoding$4.readI56BE = readI56BE + encoding$4.readI48BE = readI48BE + encoding$4.readI40BE = readI40BE + encoding$4.readI32BE = readI32BE + encoding$4.readI24BE = readI24BE + encoding$4.readI16BE = readI16BE + encoding$4.readFloat = readFloat + encoding$4.readFloatBE = readFloatBE + encoding$4.readDouble = readDouble + encoding$4.readDoubleBE = readDoubleBE + encoding$4.writeU = writeU + encoding$4.writeBigU256 = ensureBigInt(writeBigU256) + encoding$4.writeBigU128 = ensureBigInt(writeBigU128) + encoding$4.writeBigU64 = ensureBigInt(writeBigU64) + encoding$4.writeBigU56 = ensureBigInt(writeBigU56) + encoding$4.writeU64 = writeU64 + encoding$4.writeU56 = writeU56 + encoding$4.writeU48 = writeU48 + encoding$4.writeU40 = writeU40 + encoding$4.writeU32 = writeU32 + encoding$4.writeU24 = writeU24 + encoding$4.writeU16 = writeU16 + encoding$4.writeU8 = writeU8 + encoding$4.writeUBE = writeUBE + encoding$4.writeBigU256BE = ensureBigInt(writeBigU256BE) + encoding$4.writeBigU128BE = ensureBigInt(writeBigU128BE) + encoding$4.writeBigU64BE = ensureBigInt(writeBigU64BE) + encoding$4.writeBigU56BE = ensureBigInt(writeBigU56BE) + encoding$4.writeU64BE = writeU64BE + encoding$4.writeU56BE = writeU56BE + encoding$4.writeU48BE = writeU48BE + encoding$4.writeU40BE = writeU40BE + encoding$4.writeU32BE = writeU32BE + encoding$4.writeU24BE = writeU24BE + encoding$4.writeU16BE = writeU16BE + encoding$4.writeI = writeI + encoding$4.writeBigI64 = ensureBigInt(writeBigI64) + encoding$4.writeBigI56 = ensureBigInt(writeBigI56) + encoding$4.writeI64 = writeI64 + encoding$4.writeI56 = writeI56 + encoding$4.writeI48 = writeI48 + encoding$4.writeI40 = writeI40 + encoding$4.writeI32 = writeI32 + encoding$4.writeI24 = writeI24 + encoding$4.writeI16 = writeI16 + encoding$4.writeI8 = writeI8 + encoding$4.writeIBE = writeIBE + encoding$4.writeBigI64BE = ensureBigInt(writeBigI64BE) + encoding$4.writeBigI56BE = ensureBigInt(writeBigI56BE) + encoding$4.writeI64BE = writeI64BE + encoding$4.writeI56BE = writeI56BE + encoding$4.writeI48BE = writeI48BE + encoding$4.writeI40BE = writeI40BE + encoding$4.writeI32BE = writeI32BE + encoding$4.writeI24BE = writeI24BE + encoding$4.writeI16BE = writeI16BE + encoding$4.writeFloat = writeFloat + encoding$4.writeFloatBE = writeFloatBE + encoding$4.writeDouble = writeDouble + encoding$4.writeDoubleBE = writeDoubleBE + encoding$4.readVarint = readVarint + encoding$4.writeVarint = writeVarint + encoding$4.sizeVarint = sizeVarint + encoding$4.readVarint2 = readVarint2 + encoding$4.writeVarint2 = writeVarint2 + encoding$4.sizeVarint2 = sizeVarint2 + encoding$4.sliceBytes = sliceBytes + encoding$4.readBytes = readBytes + encoding$4.writeBytes = writeBytes + encoding$4.readString = readString + encoding$4.writeString = writeString + encoding$4.realloc = realloc + encoding$4.copy = copy$2 + encoding$4.concat = concat + encoding$4.sizeVarBytes = sizeVarBytes + encoding$4.sizeVarlen = sizeVarlen + encoding$4.sizeVarString = sizeVarString + /*! + * reader.js - buffer reader for bcoin + * Copyright (c) 2014-2015, Fedor Indutny (MIT License) + * Copyright (c) 2014-2017, Christopher Jeffrey (MIT License). + * https://github.com/bcoin-org/bcoin + */ const enforce$5 = enforce_1, + encoding$3 = encoding$4, + EncodingError$3 = error, + EMPTY$1 = Buffer.alloc(0) + let BufferReader$3 = class { + constructor(et, nt = !1) { + mw(this, 'data') + enforce$5(Buffer.isBuffer(et), 'data', 'buffer'), + enforce$5(typeof nt == 'boolean', 'zeroCopy', 'boolean'), + (this.data = et), + (this.offset = 0), + (this.zeroCopy = nt), + (this.stack = []) + } + check(et) { + if (this.offset + et > this.data.length) throw new EncodingError$3(this.offset, 'Out of bounds read', this.check) + } + getSize() { + return this.data.length + } + left() { + return this.check(0), this.data.length - this.offset + } + seek(et) { + if ((enforce$5(Number.isSafeInteger(et), 'off', 'integer'), this.offset + et < 0)) + throw new EncodingError$3(this.offset, 'Out of bounds read') + return this.check(et), (this.offset += et), this + } + start() { + return this.stack.push(this.offset), this.offset + } + end() { + if (this.stack.length === 0) throw new Error('Cannot end without a stack item.') + const et = this.stack.pop() + return this.offset - et + } + endData(et = !1) { + if ((enforce$5(typeof et == 'boolean', 'zeroCopy', 'boolean'), this.stack.length === 0)) + throw new Error('Cannot end without a stack item.') + const nt = this.stack.pop(), + rt = this.offset, + it = rt - nt, + ot = this.data + if (it === ot.length) return ot + if (this.zeroCopy || et) return ot.slice(nt, rt) + const at = Buffer.allocUnsafeSlow(it) + return ot.copy(at, 0, nt, rt), at + } + destroy() { + return (this.data = EMPTY$1), (this.offset = 0), (this.stack.length = 0), this + } + readU8() { + this.check(1) + const et = this.data[this.offset] + return (this.offset += 1), et + } + readU16() { + this.check(2) + const et = encoding$3.readU16(this.data, this.offset) + return (this.offset += 2), et + } + readU16BE() { + this.check(2) + const et = encoding$3.readU16BE(this.data, this.offset) + return (this.offset += 2), et + } + readU24() { + this.check(3) + const et = encoding$3.readU24(this.data, this.offset) + return (this.offset += 3), et + } + readU24BE() { + this.check(3) + const et = encoding$3.readU24BE(this.data, this.offset) + return (this.offset += 3), et + } + readU32() { + this.check(4) + const et = encoding$3.readU32(this.data, this.offset) + return (this.offset += 4), et + } + readU32BE() { + this.check(4) + const et = encoding$3.readU32BE(this.data, this.offset) + return (this.offset += 4), et + } + readU40() { + this.check(5) + const et = encoding$3.readU40(this.data, this.offset) + return (this.offset += 5), et + } + readU40BE() { + this.check(5) + const et = encoding$3.readU40BE(this.data, this.offset) + return (this.offset += 5), et + } + readU48() { + this.check(6) + const et = encoding$3.readU48(this.data, this.offset) + return (this.offset += 6), et + } + readU48BE() { + this.check(6) + const et = encoding$3.readU48BE(this.data, this.offset) + return (this.offset += 6), et + } + readU56() { + this.check(7) + const et = encoding$3.readU56(this.data, this.offset) + return (this.offset += 7), et + } + readU56BE() { + this.check(7) + const et = encoding$3.readU56BE(this.data, this.offset) + return (this.offset += 7), et + } + readBigU56() { + this.check(7) + const et = encoding$3.readBigU56(this.data, this.offset) + return (this.offset += 7), et + } + readBigU56BE() { + this.check(7) + const et = encoding$3.readBigU56BE(this.data, this.offset) + return (this.offset += 7), et + } + readU64() { + this.check(8) + const et = encoding$3.readU64(this.data, this.offset) + return (this.offset += 8), et + } + readU64BE() { + this.check(8) + const et = encoding$3.readU64BE(this.data, this.offset) + return (this.offset += 8), et + } + readBigU64() { + this.check(8) + const et = encoding$3.readBigU64(this.data, this.offset) + return (this.offset += 8), et + } + readBigU64BE() { + this.check(8) + const et = encoding$3.readBigU64BE(this.data, this.offset) + return (this.offset += 8), et + } + readBigU128() { + this.check(16) + const et = encoding$3.readBigU128(this.data, this.offset) + return (this.offset += 16), et + } + readBigU128BE() { + this.check(16) + const et = encoding$3.readBigU128BE(this.data, this.offset) + return (this.offset += 16), et + } + readBigU256() { + this.check(32) + const et = encoding$3.readBigU256(this.data, this.offset) + return (this.offset += 32), et + } + readBigU256BE() { + this.check(32) + const et = encoding$3.readBigU256BE(this.data, this.offset) + return (this.offset += 32), et + } + readI8() { + this.check(1) + const et = encoding$3.readI8(this.data, this.offset) + return (this.offset += 1), et + } + readI16() { + this.check(2) + const et = encoding$3.readI16(this.data, this.offset) + return (this.offset += 2), et + } + readI16BE() { + this.check(2) + const et = encoding$3.readI16BE(this.data, this.offset) + return (this.offset += 2), et + } + readI24() { + this.check(3) + const et = encoding$3.readI24(this.data, this.offset) + return (this.offset += 3), et + } + readI24BE() { + this.check(3) + const et = encoding$3.readI24BE(this.data, this.offset) + return (this.offset += 3), et + } + readI32() { + this.check(4) + const et = encoding$3.readI32(this.data, this.offset) + return (this.offset += 4), et + } + readI32BE() { + this.check(4) + const et = encoding$3.readI32BE(this.data, this.offset) + return (this.offset += 4), et + } + readI40() { + this.check(5) + const et = encoding$3.readI40(this.data, this.offset) + return (this.offset += 5), et + } + readI40BE() { + this.check(5) + const et = encoding$3.readI40BE(this.data, this.offset) + return (this.offset += 5), et + } + readI48() { + this.check(6) + const et = encoding$3.readI48(this.data, this.offset) + return (this.offset += 6), et + } + readI48BE() { + this.check(6) + const et = encoding$3.readI48BE(this.data, this.offset) + return (this.offset += 6), et + } + readI56() { + this.check(7) + const et = encoding$3.readI56(this.data, this.offset) + return (this.offset += 7), et + } + readI56BE() { + this.check(7) + const et = encoding$3.readI56BE(this.data, this.offset) + return (this.offset += 7), et + } + readBigI56() { + this.check(7) + const et = encoding$3.readBigI56(this.data, this.offset) + return (this.offset += 7), et + } + readBigI56BE() { + this.check(7) + const et = encoding$3.readBigI56BE(this.data, this.offset) + return (this.offset += 7), et + } + readI64() { + this.check(8) + const et = encoding$3.readI64(this.data, this.offset) + return (this.offset += 8), et + } + readI64BE() { + this.check(8) + const et = encoding$3.readI64BE(this.data, this.offset) + return (this.offset += 8), et + } + readBigI64() { + this.check(8) + const et = encoding$3.readBigI64(this.data, this.offset) + return (this.offset += 8), et + } + readBigI64BE() { + this.check(8) + const et = encoding$3.readBigI64BE(this.data, this.offset) + return (this.offset += 8), et + } + readFloat() { + this.check(4) + const et = encoding$3.readFloat(this.data, this.offset) + return (this.offset += 4), et + } + readFloatBE() { + this.check(4) + const et = encoding$3.readFloatBE(this.data, this.offset) + return (this.offset += 4), et + } + readDouble() { + this.check(8) + const et = encoding$3.readDouble(this.data, this.offset) + return (this.offset += 8), et + } + readDoubleBE() { + this.check(8) + const et = encoding$3.readDoubleBE(this.data, this.offset) + return (this.offset += 8), et + } + readVarint() { + const { size: et, value: nt } = encoding$3.readVarint(this.data, this.offset) + return (this.offset += et), nt + } + readVarint2() { + const { size: et, value: nt } = encoding$3.readVarint2(this.data, this.offset) + return (this.offset += et), nt + } + readBytes(et, nt = !1) { + enforce$5(et >>> 0 === et, 'size', 'integer'), + enforce$5(typeof nt == 'boolean', 'zeroCopy', 'boolean'), + this.check(et) + let rt + return ( + this.zeroCopy || nt + ? (rt = this.data.slice(this.offset, this.offset + et)) + : ((rt = Buffer.allocUnsafeSlow(et)), this.data.copy(rt, 0, this.offset, this.offset + et)), + (this.offset += et), + rt + ) + } + readVarBytes(et = !1) { + return this.readBytes(this.readVarint(), et) + } + readChild(et) { + enforce$5(et >>> 0 === et, 'size', 'integer'), this.check(et) + const nt = this.data.slice(0, this.offset + et), + rt = new this.constructor(nt) + return (rt.offset = this.offset), (this.offset += et), rt + } + readString(et, nt) { + nt == null && (nt = 'binary'), + enforce$5(et >>> 0 === et, 'size', 'integer'), + enforce$5(typeof nt == 'string', 'enc', 'string'), + this.check(et) + const rt = this.data.toString(nt, this.offset, this.offset + et) + return (this.offset += et), rt + } + readHash(et) { + return et ? this.readString(32, et) : this.readBytes(32) + } + readVarString(et, nt = 0) { + et == null && (et = 'binary'), + enforce$5(typeof et == 'string', 'enc', 'string'), + enforce$5(nt >>> 0 === nt, 'limit', 'integer') + const rt = this.readVarint() + if (nt !== 0 && rt > nt) throw new EncodingError$3(this.offset, 'String exceeds limit') + return this.readString(rt, et) + } + readNullString(et) { + et == null && (et = 'binary'), enforce$5(typeof et == 'string', 'enc', 'string') + let nt = this.offset + for (; nt < this.data.length && this.data[nt] !== 0; nt++); + if (nt === this.data.length) throw new EncodingError$3(this.offset, 'No NUL terminator') + const rt = this.readString(nt - this.offset, et) + return (this.offset = nt + 1), rt + } + createChecksum(et) { + ;(!et || typeof et.digest != 'function') && enforce$5(typeof et == 'function', 'hash', 'function') + let nt = 0 + this.stack.length > 0 && (nt = this.stack[this.stack.length - 1]) + const rt = this.data.slice(nt, this.offset), + it = et.digest ? et.digest(rt) : et(rt) + return encoding$3.readU32(it, 0) + } + verifyChecksum(et) { + const nt = this.createChecksum(et), + rt = this.readU32() + if (nt !== rt) throw new EncodingError$3(this.offset, 'Checksum mismatch') + return nt + } + } + var reader = BufferReader$3 + /*! + * writer.js - buffer writer for bcoin + * Copyright (c) 2014-2015, Fedor Indutny (MIT License) + * Copyright (c) 2014-2017, Christopher Jeffrey (MIT License). + * https://github.com/bcoin-org/bcoin + */ const enforce$4 = enforce_1, + encoding$2 = encoding$4, + EncodingError$2 = error, + SEEK = 0, + U8 = 1, + U16 = 2, + U16BE = 3, + U24 = 4, + U24BE = 5, + U32 = 6, + U32BE = 7, + U40 = 8, + U40BE = 9, + U48 = 10, + U48BE = 11, + U56 = 12, + U56BE = 13, + U64 = 14, + U64BE = 15, + I8 = 16, + I16 = 17, + I16BE = 18, + I24 = 19, + I24BE = 20, + I32 = 21, + I32BE = 22, + I40 = 23, + I40BE = 24, + I48 = 25, + I48BE = 26, + I56 = 27, + I56BE = 28, + I64 = 29, + I64BE = 30, + FL = 31, + FLBE = 32, + DBL = 33, + DBLBE = 34, + VARINT = 35, + VARINT2 = 36, + BYTES = 37, + STR = 38, + CHECKSUM = 39, + FILL = 40, + BIG_U56 = 41, + BIG_U56BE = 42, + BIG_U64 = 43, + BIG_U64BE = 44, + BIG_I56 = 45, + BIG_I56BE = 46, + BIG_I64 = 47, + BIG_I64BE = 48, + BIG_U128 = 49, + BIG_U128BE = 50, + BIG_U256 = 51, + BIG_U256BE = 52 + let BufferWriter$3 = class { + constructor() { + ;(this.ops = []), (this.offset = 0) + } + render() { + const et = Buffer.allocUnsafeSlow(this.offset) + let nt = 0 + for (const rt of this.ops) + switch (rt.type) { + case SEEK: + nt += rt.value + break + case U8: + nt = encoding$2.writeU8(et, rt.value, nt) + break + case U16: + nt = encoding$2.writeU16(et, rt.value, nt) + break + case U16BE: + nt = encoding$2.writeU16BE(et, rt.value, nt) + break + case U24: + nt = encoding$2.writeU24(et, rt.value, nt) + break + case U24BE: + nt = encoding$2.writeU24BE(et, rt.value, nt) + break + case U32: + nt = encoding$2.writeU32(et, rt.value, nt) + break + case U32BE: + nt = encoding$2.writeU32BE(et, rt.value, nt) + break + case U40: + nt = encoding$2.writeU40(et, rt.value, nt) + break + case U40BE: + nt = encoding$2.writeU40BE(et, rt.value, nt) + break + case U48: + nt = encoding$2.writeU48(et, rt.value, nt) + break + case U48BE: + nt = encoding$2.writeU48BE(et, rt.value, nt) + break + case U56: + nt = encoding$2.writeU56(et, rt.value, nt) + break + case U56BE: + nt = encoding$2.writeU56BE(et, rt.value, nt) + break + case U64: + nt = encoding$2.writeU64(et, rt.value, nt) + break + case U64BE: + nt = encoding$2.writeU64BE(et, rt.value, nt) + break + case I8: + nt = encoding$2.writeI8(et, rt.value, nt) + break + case I16: + nt = encoding$2.writeI16(et, rt.value, nt) + break + case I16BE: + nt = encoding$2.writeI16BE(et, rt.value, nt) + break + case I24: + nt = encoding$2.writeI24(et, rt.value, nt) + break + case I24BE: + nt = encoding$2.writeI24BE(et, rt.value, nt) + break + case I32: + nt = encoding$2.writeI32(et, rt.value, nt) + break + case I32BE: + nt = encoding$2.writeI32BE(et, rt.value, nt) + break + case I40: + nt = encoding$2.writeI40(et, rt.value, nt) + break + case I40BE: + nt = encoding$2.writeI40BE(et, rt.value, nt) + break + case I48: + nt = encoding$2.writeI48(et, rt.value, nt) + break + case I48BE: + nt = encoding$2.writeI48BE(et, rt.value, nt) + break + case I56: + nt = encoding$2.writeI56(et, rt.value, nt) + break + case I56BE: + nt = encoding$2.writeI56BE(et, rt.value, nt) + break + case I64: + nt = encoding$2.writeI64(et, rt.value, nt) + break + case I64BE: + nt = encoding$2.writeI64BE(et, rt.value, nt) + break + case FL: + nt = encoding$2.writeFloat(et, rt.value, nt) + break + case FLBE: + nt = encoding$2.writeFloatBE(et, rt.value, nt) + break + case DBL: + nt = encoding$2.writeDouble(et, rt.value, nt) + break + case DBLBE: + nt = encoding$2.writeDoubleBE(et, rt.value, nt) + break + case VARINT: + nt = encoding$2.writeVarint(et, rt.value, nt) + break + case VARINT2: + nt = encoding$2.writeVarint2(et, rt.value, nt) + break + case BYTES: + nt += rt.data.copy(et, nt) + break + case STR: + nt += et.write(rt.value, nt, rt.enc) + break + case CHECKSUM: + nt += rt.func(et.slice(0, nt)).copy(et, nt, 0, 4) + break + case FILL: + et.fill(rt.value, nt, nt + rt.size), (nt += rt.size) + break + case BIG_U56: + nt = encoding$2.writeBigU56(et, rt.value, nt) + break + case BIG_U56BE: + nt = encoding$2.writeBigU56BE(et, rt.value, nt) + break + case BIG_U64: + nt = encoding$2.writeBigU64(et, rt.value, nt) + break + case BIG_U64BE: + nt = encoding$2.writeBigU64BE(et, rt.value, nt) + break + case BIG_I56: + nt = encoding$2.writeBigI56(et, rt.value, nt) + break + case BIG_I56BE: + nt = encoding$2.writeBigI56BE(et, rt.value, nt) + break + case BIG_I64: + nt = encoding$2.writeBigI64(et, rt.value, nt) + break + case BIG_I64BE: + nt = encoding$2.writeBigI64BE(et, rt.value, nt) + break + case BIG_U128: + nt = encoding$2.writeBigU128(et, rt.value, nt) + break + case BIG_U128BE: + nt = encoding$2.writeBigU128BE(et, rt.value, nt) + break + case BIG_U256: + nt = encoding$2.writeBigU256(et, rt.value, nt) + break + case BIG_U256BE: + nt = encoding$2.writeBigU256BE(et, rt.value, nt) + break + default: + throw new Error('Invalid type.') + } + if (nt !== et.length) throw new EncodingError$2(nt, 'Out of bounds write') + return this.destroy(), et + } + encode() { + return this.render() + } + finish(et) { + if ((enforce$4(et >>> 0 === et, 'size', 'integer'), this.offset > et)) + throw new EncodingError$2(this.offset, 'Out of bounds write') + return this.fill(0, et - this.offset), this.render() + } + getSize() { + return this.offset + } + seek(et) { + if ((enforce$4(Number.isSafeInteger(et), 'off', 'integer'), this.offset + et < 0)) + throw new EncodingError$2(this.offset, 'Out of bounds write') + return (this.offset += et), this.ops.push(new NumberOp(SEEK, et)), this + } + destroy() { + return (this.ops.length = 0), (this.offset = 0), this + } + writeU8(et) { + return (this.offset += 1), this.ops.push(new NumberOp(U8, et)), this + } + writeU16(et) { + return (this.offset += 2), this.ops.push(new NumberOp(U16, et)), this + } + writeU16BE(et) { + return (this.offset += 2), this.ops.push(new NumberOp(U16BE, et)), this + } + writeU24(et) { + return (this.offset += 3), this.ops.push(new NumberOp(U24, et)), this + } + writeU24BE(et) { + return (this.offset += 3), this.ops.push(new NumberOp(U24BE, et)), this + } + writeU32(et) { + return (this.offset += 4), this.ops.push(new NumberOp(U32, et)), this + } + writeU32BE(et) { + return (this.offset += 4), this.ops.push(new NumberOp(U32BE, et)), this + } + writeU40(et) { + return (this.offset += 5), this.ops.push(new NumberOp(U40, et)), this + } + writeU40BE(et) { + return (this.offset += 5), this.ops.push(new NumberOp(U40BE, et)), this + } + writeU48(et) { + return (this.offset += 6), this.ops.push(new NumberOp(U48, et)), this + } + writeU48BE(et) { + return (this.offset += 6), this.ops.push(new NumberOp(U48BE, et)), this + } + writeU56(et) { + return (this.offset += 7), this.ops.push(new NumberOp(U56, et)), this + } + writeU56BE(et) { + return (this.offset += 7), this.ops.push(new NumberOp(U56BE, et)), this + } + writeBigU56(et) { + return (this.offset += 7), this.ops.push(new BigOp(BIG_U56, et)), this + } + writeBigU56BE(et) { + return (this.offset += 7), this.ops.push(new BigOp(BIG_U56BE, et)), this + } + writeU64(et) { + return (this.offset += 8), this.ops.push(new NumberOp(U64, et)), this + } + writeU64BE(et) { + return (this.offset += 8), this.ops.push(new NumberOp(U64BE, et)), this + } + writeBigU64(et) { + return (this.offset += 8), this.ops.push(new BigOp(BIG_U64, et)), this + } + writeBigU64BE(et) { + return (this.offset += 8), this.ops.push(new BigOp(BIG_U64BE, et)), this + } + writeBigU128(et) { + return (this.offset += 16), this.ops.push(new BigOp(BIG_U128, et)), this + } + writeBigU128BE(et) { + return (this.offset += 16), this.ops.push(new BigOp(BIG_U128BE, et)), this + } + writeBigU256(et) { + return (this.offset += 32), this.ops.push(new BigOp(BIG_U256, et)), this + } + writeBigU256BE(et) { + return (this.offset += 32), this.ops.push(new BigOp(BIG_U256BE, et)), this + } + writeI8(et) { + return (this.offset += 1), this.ops.push(new NumberOp(I8, et)), this + } + writeI16(et) { + return (this.offset += 2), this.ops.push(new NumberOp(I16, et)), this + } + writeI16BE(et) { + return (this.offset += 2), this.ops.push(new NumberOp(I16BE, et)), this + } + writeI24(et) { + return (this.offset += 3), this.ops.push(new NumberOp(I24, et)), this + } + writeI24BE(et) { + return (this.offset += 3), this.ops.push(new NumberOp(I24BE, et)), this + } + writeI32(et) { + return (this.offset += 4), this.ops.push(new NumberOp(I32, et)), this + } + writeI32BE(et) { + return (this.offset += 4), this.ops.push(new NumberOp(I32BE, et)), this + } + writeI40(et) { + return (this.offset += 5), this.ops.push(new NumberOp(I40, et)), this + } + writeI40BE(et) { + return (this.offset += 5), this.ops.push(new NumberOp(I40BE, et)), this + } + writeI48(et) { + return (this.offset += 6), this.ops.push(new NumberOp(I48, et)), this + } + writeI48BE(et) { + return (this.offset += 6), this.ops.push(new NumberOp(I48BE, et)), this + } + writeI56(et) { + return (this.offset += 7), this.ops.push(new NumberOp(I56, et)), this + } + writeI56BE(et) { + return (this.offset += 7), this.ops.push(new NumberOp(I56BE, et)), this + } + writeBigI56(et) { + return (this.offset += 7), this.ops.push(new BigOp(BIG_I56, et)), this + } + writeBigI56BE(et) { + return (this.offset += 7), this.ops.push(new BigOp(BIG_I56BE, et)), this + } + writeI64(et) { + return (this.offset += 8), this.ops.push(new NumberOp(I64, et)), this + } + writeI64BE(et) { + return (this.offset += 8), this.ops.push(new NumberOp(I64BE, et)), this + } + writeBigI64(et) { + return (this.offset += 8), this.ops.push(new BigOp(BIG_I64, et)), this + } + writeBigI64BE(et) { + return (this.offset += 8), this.ops.push(new BigOp(BIG_I64BE, et)), this + } + writeFloat(et) { + return (this.offset += 4), this.ops.push(new NumberOp(FL, et)), this + } + writeFloatBE(et) { + return (this.offset += 4), this.ops.push(new NumberOp(FLBE, et)), this + } + writeDouble(et) { + return (this.offset += 8), this.ops.push(new NumberOp(DBL, et)), this + } + writeDoubleBE(et) { + return (this.offset += 8), this.ops.push(new NumberOp(DBLBE, et)), this + } + writeVarint(et) { + return (this.offset += encoding$2.sizeVarint(et)), this.ops.push(new NumberOp(VARINT, et)), this + } + writeVarint2(et) { + return (this.offset += encoding$2.sizeVarint2(et)), this.ops.push(new NumberOp(VARINT2, et)), this + } + writeBytes(et) { + return ( + enforce$4(Buffer.isBuffer(et), 'value', 'buffer'), + et.length === 0 ? this : ((this.offset += et.length), this.ops.push(new BufferOp(BYTES, et)), this) + ) + } + writeVarBytes(et) { + return ( + enforce$4(Buffer.isBuffer(et), 'value', 'buffer'), + (this.offset += encoding$2.sizeVarint(et.length)), + this.ops.push(new NumberOp(VARINT, et.length)), + et.length === 0 ? this : ((this.offset += et.length), this.ops.push(new BufferOp(BYTES, et)), this) + ) + } + copy(et, nt, rt) { + enforce$4(Buffer.isBuffer(et), 'value', 'buffer'), + enforce$4(nt >>> 0 === nt, 'start', 'integer'), + enforce$4(rt >>> 0 === rt, 'end', 'integer'), + enforce$4(rt >= nt, 'start', 'integer') + const it = et.slice(nt, rt) + return this.writeBytes(it), this + } + writeString(et, nt) { + return ( + nt == null && (nt = 'binary'), + enforce$4(typeof et == 'string', 'value', 'string'), + enforce$4(typeof nt == 'string', 'enc', 'string'), + et.length === 0 + ? this + : ((this.offset += Buffer.byteLength(et, nt)), this.ops.push(new StringOp(STR, et, nt)), this) + ) + } + writeHash(et) { + return typeof et != 'string' + ? (enforce$4(Buffer.isBuffer(et), 'value', 'buffer'), + enforce$4(et.length === 32, 'value', '32-byte hash'), + this.writeBytes(et), + this) + : (enforce$4(et.length === 64, 'value', '32-byte hash'), this.writeString(et, 'hex'), this) + } + writeVarString(et, nt) { + if ( + (nt == null && (nt = 'binary'), + enforce$4(typeof et == 'string', 'value', 'string'), + enforce$4(typeof nt == 'string', 'enc', 'string'), + et.length === 0) + ) + return this.ops.push(new NumberOp(VARINT, 0)), this + const rt = Buffer.byteLength(et, nt) + return ( + (this.offset += encoding$2.sizeVarint(rt)), + (this.offset += rt), + this.ops.push(new NumberOp(VARINT, rt)), + this.ops.push(new StringOp(STR, et, nt)), + this + ) + } + writeNullString(et, nt) { + return this.writeString(et, nt), this.writeU8(0), this + } + writeChecksum(et) { + return ( + et && typeof et.digest == 'function' && (et = et.digest.bind(et)), + enforce$4(typeof et == 'function', 'hash', 'function'), + (this.offset += 4), + this.ops.push(new FunctionOp(CHECKSUM, et)), + this + ) + } + fill(et, nt) { + return ( + enforce$4((et & 255) === et, 'value', 'byte'), + enforce$4(nt >>> 0 === nt, 'size', 'integer'), + nt === 0 ? this : ((this.offset += nt), this.ops.push(new FillOp(FILL, et, nt)), this) + ) + } + pad(et, nt = 0) { + return this.fill(nt, et) + } + } + class WriteOp { + constructor(et) { + this.type = et + } + } + class NumberOp extends WriteOp { + constructor(et, nt) { + super(et), (this.value = nt) + } + } + class BigOp extends WriteOp { + constructor(et, nt) { + super(et), (this.value = nt) + } + } + class BufferOp extends WriteOp { + constructor(et, nt) { + super(et), (this.data = nt) + } + } + class StringOp extends WriteOp { + constructor(et, nt, rt) { + super(et), (this.value = nt), (this.enc = rt) + } + } + class FunctionOp extends WriteOp { + constructor(et, nt) { + super(et), (this.func = nt) + } + } + class FillOp extends WriteOp { + constructor(et, nt, rt) { + super(et), (this.value = nt), (this.size = rt) + } + } + var writer = BufferWriter$3 + /*! + * staticwriter.js - buffer writer for bcoin + * Copyright (c) 2014-2017, Christopher Jeffrey (MIT License). + * https://github.com/bcoin-org/bcoin + */ const enforce$3 = enforce_1, + encoding$1 = encoding$4, + EncodingError$1 = error, + EMPTY = Buffer.alloc(0), + POOL_SIZE = 102400 + let POOL = null, + StaticWriter$2 = class g1 { + constructor(et) { + ;(this.data = EMPTY), (this.offset = 0), et != null && this.init(et) + } + check(et) { + if (this.offset + et > this.data.length) + throw new EncodingError$1(this.offset, 'Out of bounds write', this.check) + } + init(et) { + return Buffer.isBuffer(et) + ? ((this.data = et), (this.offset = 0), this) + : (enforce$3(et >>> 0 === et, 'size', 'integer'), + (this.data = Buffer.allocUnsafeSlow(et)), + (this.offset = 0), + this) + } + static pool(et) { + if ((enforce$3(et >>> 0 === et, 'size', 'integer'), et <= POOL_SIZE)) { + POOL || (POOL = Buffer.allocUnsafeSlow(POOL_SIZE)) + const nt = new g1() + return (nt.data = POOL.slice(0, et)), nt + } + return new g1(et) + } + render() { + const { data: et, offset: nt } = this + if (nt !== et.length) throw new EncodingError$1(nt, 'Out of bounds write') + return this.destroy(), et + } + encode() { + return this.render() + } + slice() { + const { data: et, offset: nt } = this + if (nt > et.length) throw new EncodingError$1(nt, 'Out of bounds write') + return this.destroy(), et.slice(0, nt) + } + finish() { + const { data: et, offset: nt } = this + if (nt > et.length) throw new EncodingError$1(nt, 'Out of bounds write') + return et.fill(0, nt, et.length), this.destroy(), et + } + getSize() { + return this.offset + } + seek(et) { + if ((enforce$3(Number.isSafeInteger(et), 'off', 'integer'), this.offset + et < 0)) + throw new EncodingError$1(this.offset, 'Out of bounds write') + return this.check(et), (this.offset += et), this + } + destroy() { + return (this.data = EMPTY), (this.offset = 0), this + } + writeU8(et) { + return this.check(1), (this.offset = encoding$1.writeU8(this.data, et, this.offset)), this + } + writeU16(et) { + return this.check(2), (this.offset = encoding$1.writeU16(this.data, et, this.offset)), this + } + writeU16BE(et) { + return this.check(2), (this.offset = encoding$1.writeU16BE(this.data, et, this.offset)), this + } + writeU24(et) { + return this.check(3), (this.offset = encoding$1.writeU24(this.data, et, this.offset)), this + } + writeU24BE(et) { + return this.check(3), (this.offset = encoding$1.writeU24BE(this.data, et, this.offset)), this + } + writeU32(et) { + return this.check(4), (this.offset = encoding$1.writeU32(this.data, et, this.offset)), this + } + writeU32BE(et) { + return this.check(4), (this.offset = encoding$1.writeU32BE(this.data, et, this.offset)), this + } + writeU40(et) { + return this.check(5), (this.offset = encoding$1.writeU40(this.data, et, this.offset)), this + } + writeU40BE(et) { + return this.check(5), (this.offset = encoding$1.writeU40BE(this.data, et, this.offset)), this + } + writeU48(et) { + return this.check(6), (this.offset = encoding$1.writeU48(this.data, et, this.offset)), this + } + writeU48BE(et) { + return this.check(6), (this.offset = encoding$1.writeU48BE(this.data, et, this.offset)), this + } + writeU56(et) { + return this.check(7), (this.offset = encoding$1.writeU56(this.data, et, this.offset)), this + } + writeU56BE(et) { + return this.check(7), (this.offset = encoding$1.writeU56BE(this.data, et, this.offset)), this + } + writeBigU56(et) { + return this.check(7), (this.offset = encoding$1.writeBigU56(this.data, et, this.offset)), this + } + writeBigU56BE(et) { + return this.check(7), (this.offset = encoding$1.writeBigU56BE(this.data, et, this.offset)), this + } + writeU64(et) { + return this.check(8), (this.offset = encoding$1.writeU64(this.data, et, this.offset)), this + } + writeU64BE(et) { + return this.check(8), (this.offset = encoding$1.writeU64BE(this.data, et, this.offset)), this + } + writeBigU64(et) { + return this.check(8), (this.offset = encoding$1.writeBigU64(this.data, et, this.offset)), this + } + writeBigU64BE(et) { + return this.check(8), (this.offset = encoding$1.writeBigU64BE(this.data, et, this.offset)), this + } + writeBigU128(et) { + return this.check(16), (this.offset = encoding$1.writeBigU128(this.data, et, this.offset)), this + } + writeBigU128BE(et) { + return this.check(16), (this.offset = encoding$1.writeBigU128BE(this.data, et, this.offset)), this + } + writeBigU256(et) { + return this.check(32), (this.offset = encoding$1.writeBigU256(this.data, et, this.offset)), this + } + writeBigU256BE(et) { + return this.check(32), (this.offset = encoding$1.writeBigU256BE(this.data, et, this.offset)), this + } + writeI8(et) { + return this.check(1), (this.offset = encoding$1.writeI8(this.data, et, this.offset)), this + } + writeI16(et) { + return this.check(2), (this.offset = encoding$1.writeI16(this.data, et, this.offset)), this + } + writeI16BE(et) { + return this.check(2), (this.offset = encoding$1.writeI16BE(this.data, et, this.offset)), this + } + writeI24(et) { + return this.check(3), (this.offset = encoding$1.writeI24(this.data, et, this.offset)), this + } + writeI24BE(et) { + return this.check(3), (this.offset = encoding$1.writeI24BE(this.data, et, this.offset)), this + } + writeI32(et) { + return this.check(4), (this.offset = encoding$1.writeI32(this.data, et, this.offset)), this + } + writeI32BE(et) { + return this.check(4), (this.offset = encoding$1.writeI32BE(this.data, et, this.offset)), this + } + writeI40(et) { + return this.check(5), (this.offset = encoding$1.writeI40(this.data, et, this.offset)), this + } + writeI40BE(et) { + return this.check(5), (this.offset = encoding$1.writeI40BE(this.data, et, this.offset)), this + } + writeI48(et) { + return this.check(6), (this.offset = encoding$1.writeI48(this.data, et, this.offset)), this + } + writeI48BE(et) { + return this.check(6), (this.offset = encoding$1.writeI48BE(this.data, et, this.offset)), this + } + writeI56(et) { + return this.check(7), (this.offset = encoding$1.writeI56(this.data, et, this.offset)), this + } + writeI56BE(et) { + return this.check(7), (this.offset = encoding$1.writeI56BE(this.data, et, this.offset)), this + } + writeBigI56(et) { + return this.check(7), (this.offset = encoding$1.writeBigI56(this.data, et, this.offset)), this + } + writeBigI56BE(et) { + return this.check(7), (this.offset = encoding$1.writeBigI56BE(this.data, et, this.offset)), this + } + writeI64(et) { + return this.check(8), (this.offset = encoding$1.writeI64(this.data, et, this.offset)), this + } + writeI64BE(et) { + return this.check(8), (this.offset = encoding$1.writeI64BE(this.data, et, this.offset)), this + } + writeBigI64(et) { + return this.check(8), (this.offset = encoding$1.writeBigI64(this.data, et, this.offset)), this + } + writeBigI64BE(et) { + return this.check(8), (this.offset = encoding$1.writeBigI64BE(this.data, et, this.offset)), this + } + writeFloat(et) { + return this.check(4), (this.offset = encoding$1.writeFloat(this.data, et, this.offset)), this + } + writeFloatBE(et) { + return this.check(4), (this.offset = encoding$1.writeFloatBE(this.data, et, this.offset)), this + } + writeDouble(et) { + return this.check(8), (this.offset = encoding$1.writeDouble(this.data, et, this.offset)), this + } + writeDoubleBE(et) { + return this.check(8), (this.offset = encoding$1.writeDoubleBE(this.data, et, this.offset)), this + } + writeVarint(et) { + return (this.offset = encoding$1.writeVarint(this.data, et, this.offset)), this + } + writeVarint2(et) { + return (this.offset = encoding$1.writeVarint2(this.data, et, this.offset)), this + } + writeBytes(et) { + return ( + enforce$3(Buffer.isBuffer(et), 'value', 'buffer'), + this.check(et.length), + (this.offset += et.copy(this.data, this.offset)), + this + ) + } + writeVarBytes(et) { + return enforce$3(Buffer.isBuffer(et), 'value', 'buffer'), this.writeVarint(et.length), this.writeBytes(et), this + } + copy(et, nt, rt) { + return ( + enforce$3(Buffer.isBuffer(et), 'value', 'buffer'), + enforce$3(nt >>> 0 === nt, 'start', 'integer'), + enforce$3(rt >>> 0 === rt, 'end', 'integer'), + enforce$3(rt >= nt, 'start', 'integer'), + this.check(rt - nt), + (this.offset += et.copy(this.data, this.offset, nt, rt)), + this + ) + } + writeString(et, nt) { + if ( + (nt == null && (nt = 'binary'), + enforce$3(typeof et == 'string', 'value', 'string'), + enforce$3(typeof nt == 'string', 'enc', 'string'), + et.length === 0) + ) + return this + const rt = Buffer.byteLength(et, nt) + return this.check(rt), (this.offset += this.data.write(et, this.offset, nt)), this + } + writeHash(et) { + return typeof et != 'string' + ? (enforce$3(Buffer.isBuffer(et), 'value', 'buffer'), + enforce$3(et.length === 32, 'value', '32-byte hash'), + this.writeBytes(et), + this) + : (enforce$3(et.length === 64, 'value', '32-byte hash'), + this.check(32), + (this.offset += this.data.write(et, this.offset, 'hex')), + this) + } + writeVarString(et, nt) { + if ( + (nt == null && (nt = 'binary'), + enforce$3(typeof et == 'string', 'value', 'string'), + enforce$3(typeof nt == 'string', 'enc', 'string'), + et.length === 0) + ) + return this.writeVarint(0), this + const rt = Buffer.byteLength(et, nt) + return this.writeVarint(rt), this.check(rt), (this.offset += this.data.write(et, this.offset, nt)), this + } + writeNullString(et, nt) { + return this.writeString(et, nt), this.writeU8(0), this + } + writeChecksum(et) { + ;(!et || typeof et.digest != 'function') && enforce$3(typeof et == 'function', 'hash', 'function'), + this.check(4) + const nt = this.data.slice(0, this.offset) + return (et.digest ? et.digest(nt) : et(nt)).copy(this.data, this.offset, 0, 4), (this.offset += 4), this + } + fill(et, nt) { + return ( + enforce$3((et & 255) === et, 'value', 'byte'), + enforce$3(nt >>> 0 === nt, 'size', 'integer'), + nt === 0 + ? this + : (this.check(nt), this.data.fill(et, this.offset, this.offset + nt), (this.offset += nt), this) + ) + } + pad(et, nt = 0) { + return this.fill(nt, et) + } + } + var staticwriter = StaticWriter$2 + /*! + * struct.js - struct object for bcoin + * Copyright (c) 2018, Christopher Jeffrey (MIT License). + * https://github.com/bcoin-org/bcoin + */ const enforce$2 = enforce_1, + BufferReader$2 = reader, + BufferWriter$2 = writer, + StaticWriter$1 = staticwriter, + { custom: custom$1 } = customBrowser + let Struct$1 = class { + constructor() {} + inject(et) { + return enforce$2(et instanceof this.constructor, 'obj', 'struct'), this.decode(et.encode()) + } + clone() { + return new this.constructor().inject(this) + } + getSize(et) { + return -1 + } + write(et, nt) { + return et + } + read(et, nt) { + return this + } + toString() { + return Object.prototype.toString.call(this) + } + fromString(et, nt) { + return this + } + getJSON() { + return this + } + fromJSON(et, nt) { + return this + } + fromOptions(et, nt) { + return this + } + from(et, nt) { + return this.fromOptions(et, nt) + } + format() { + return this.getJSON() + } + encode(et) { + const nt = this.getSize(et), + rt = nt === -1 ? new BufferWriter$2() : new StaticWriter$1(nt) + return this.write(rt, et), rt.render() + } + decode(et, nt) { + const rt = new BufferReader$2(et) + return this.read(rt, nt), this + } + toHex(et) { + return this.encode(et).toString('hex') + } + fromHex(et, nt) { + enforce$2(typeof et == 'string', 'str', 'string') + const rt = et.length >>> 1, + it = Buffer.from(et, 'hex') + if (it.length !== rt) throw new Error('Invalid hex string.') + return this.decode(it, nt) + } + toBase64(et) { + return this.encode(et).toString('base64') + } + fromBase64(et, nt) { + enforce$2(typeof et == 'string', 'str', 'string') + const rt = Buffer.from(et, 'base64') + if (et.length > size64(rt.length)) throw new Error('Invalid base64 string.') + return this.decode(rt, nt) + } + toJSON() { + return this.getJSON() + } + [custom$1]() { + return this.format() + } + static read(et, nt) { + return new this().read(et, nt) + } + static decode(et, nt) { + return new this().decode(et, nt) + } + static fromHex(et, nt) { + return new this().fromHex(et, nt) + } + static fromBase64(et, nt) { + return new this().fromBase64(et, nt) + } + static fromString(et, nt) { + return new this().fromString(et, nt) + } + static fromJSON(et, nt) { + return new this().fromJSON(et, nt) + } + static fromOptions(et, nt) { + return new this().fromOptions(et, nt) + } + static from(et, nt) { + return new this().from(et, nt) + } + toWriter(et, nt) { + return this.write(et, nt) + } + fromReader(et, nt) { + return this.read(et, nt) + } + toRaw(et) { + return this.encode(et) + } + fromRaw(et, nt) { + return this.decode(et, nt) + } + static fromReader(et, nt) { + return this.read(et, nt) + } + static fromRaw(et, nt) { + return this.decode(et, nt) + } + } + function size64(tt) { + return (((4 * tt) / 3 + 3) & -4) >>> 0 + } + var struct = Struct$1 + /*! + * bufio.js - buffer utilities for javascript + * Copyright (c) 2014-2017, Christopher Jeffrey (MIT License). + * https://github.com/bcoin-org/bcoin + */ const custom = customBrowser, + encoding = encoding$4, + enforce$1 = enforce_1, + EncodingError = error, + BufferReader$1 = reader, + BufferWriter$1 = writer, + StaticWriter = staticwriter, + Struct = struct + bufio.custom = custom + bufio.encoding = encoding + bufio.EncodingError = EncodingError + bufio.BufferReader = BufferReader$1 + bufio.BufferWriter = BufferWriter$1 + bufio.StaticWriter = StaticWriter + bufio.Struct = Struct + bufio.read = function (et, nt) { + return new BufferReader$1(et, nt) + } + bufio.write = function (et) { + return et != null ? new StaticWriter(et) : new BufferWriter$1() + } + bufio.pool = function (et) { + return StaticWriter.pool(et) + } + function _read(tt, et) { + return function (nt, rt) { + if ( + (enforce$1(Buffer.isBuffer(nt), 'data', 'buffer'), + enforce$1(rt >>> 0 === rt, 'off', 'integer'), + rt + et > nt.length) + ) + throw new EncodingError(rt, 'Out of bounds read') + return tt(nt, rt) + } + } + function _readn(tt) { + return function (et, nt, rt) { + if ( + (enforce$1(Buffer.isBuffer(et), 'data', 'buffer'), + enforce$1(nt >>> 0 === nt, 'off', 'integer'), + enforce$1(rt >>> 0 === rt, 'len', 'integer'), + nt + rt > et.length) + ) + throw new EncodingError(nt, 'Out of bounds read') + return tt(et, nt, rt) + } + } + function _readvar(tt) { + return function (et, nt) { + return enforce$1(Buffer.isBuffer(et), 'data', 'buffer'), enforce$1(nt >>> 0 === nt, 'off', 'integer'), tt(et, nt) + } + } + function _write(tt, et) { + return function (nt, rt, it) { + if ( + (enforce$1(Buffer.isBuffer(nt), 'data', 'buffer'), + enforce$1(it >>> 0 === it, 'off', 'integer'), + it + et > nt.length) + ) + throw new EncodingError(it, 'Out of bounds write') + return tt(nt, rt, it) + } + } + function _writen(tt) { + return function (et, nt, rt, it) { + if ( + (enforce$1(Buffer.isBuffer(et), 'data', 'buffer'), + enforce$1(rt >>> 0 === rt, 'off', 'integer'), + enforce$1(it >>> 0 === it, 'len', 'integer'), + rt + it > et.length) + ) + throw new EncodingError(rt, 'Out of bounds write') + return tt(et, nt, rt, it) + } + } + function _writecb(tt, et) { + return function (nt, rt, it) { + if ( + (enforce$1(Buffer.isBuffer(nt), 'data', 'buffer'), + enforce$1(it >>> 0 === it, 'off', 'integer'), + it + et(rt) > nt.length) + ) + throw new EncodingError(it, 'Out of bounds write') + return tt(nt, rt, it) + } + } + bufio.readU = _readn(encoding.readU) + bufio.readBigU256 = _read(encoding.readBigU256, 32) + bufio.readBigU128 = _read(encoding.readBigU128, 16) + bufio.readBigU64 = _read(encoding.readBigU64, 8) + bufio.readBigU56 = _read(encoding.readBigU56, 7) + bufio.readU64 = _read(encoding.readU64, 8) + bufio.readU56 = _read(encoding.readU56, 7) + bufio.readU48 = _read(encoding.readU48, 6) + bufio.readU40 = _read(encoding.readU40, 5) + bufio.readU32 = _read(encoding.readU32, 4) + bufio.readU24 = _read(encoding.readU24, 3) + bufio.readU16 = _read(encoding.readU16, 2) + bufio.readU8 = _read(encoding.readU8, 1) + bufio.readUBE = _readn(encoding.readUBE) + bufio.readBigU256BE = _read(encoding.readBigU256BE, 32) + bufio.readBigU128BE = _read(encoding.readBigU128BE, 16) + bufio.readBigU64BE = _read(encoding.readBigU64BE, 8) + bufio.readBigU56BE = _read(encoding.readBigU56BE, 7) + bufio.readU64BE = _read(encoding.readU64BE, 8) + bufio.readU56BE = _read(encoding.readU56BE, 7) + bufio.readU48BE = _read(encoding.readU48BE, 6) + bufio.readU40BE = _read(encoding.readU40BE, 5) + bufio.readU32BE = _read(encoding.readU32BE, 4) + bufio.readU24BE = _read(encoding.readU24BE, 3) + bufio.readU16BE = _read(encoding.readU16BE, 2) + bufio.readI = _readn(encoding.readI) + bufio.readBigI64 = _read(encoding.readBigI64, 8) + bufio.readBigI56 = _read(encoding.readBigI56, 7) + bufio.readI64 = _read(encoding.readI64, 8) + bufio.readI56 = _read(encoding.readI56, 7) + bufio.readI48 = _read(encoding.readI48, 6) + bufio.readI40 = _read(encoding.readI40, 5) + bufio.readI32 = _read(encoding.readI32, 4) + bufio.readI24 = _read(encoding.readI24, 3) + bufio.readI16 = _read(encoding.readI16, 2) + bufio.readI8 = _read(encoding.readI8, 1) + bufio.readIBE = _readn(encoding.readIBE) + bufio.readBigI64BE = _read(encoding.readBigI64BE, 8) + bufio.readBigI56BE = _read(encoding.readBigI56BE, 7) + bufio.readI64BE = _read(encoding.readI64BE, 8) + bufio.readI56BE = _read(encoding.readI56BE, 7) + bufio.readI48BE = _read(encoding.readI48BE, 6) + bufio.readI40BE = _read(encoding.readI40BE, 5) + bufio.readI32BE = _read(encoding.readI32BE, 4) + bufio.readI24BE = _read(encoding.readI24BE, 3) + bufio.readI16BE = _read(encoding.readI16BE, 2) + bufio.readFloat = _read(encoding.readFloat, 4) + bufio.readFloatBE = _read(encoding.readFloatBE, 4) + bufio.readDouble = _read(encoding.readDouble, 8) + bufio.readDoubleBE = _read(encoding.readDoubleBE, 8) + bufio.writeU = _writen(encoding.writeU) + bufio.writeBigU256 = _write(encoding.writeBigU256, 32) + bufio.writeBigU128 = _write(encoding.writeBigU128, 16) + bufio.writeBigU64 = _write(encoding.writeBigU64, 8) + bufio.writeBigU56 = _write(encoding.writeBigU56, 7) + bufio.writeU64 = _write(encoding.writeU64, 8) + bufio.writeU56 = _write(encoding.writeU56, 7) + bufio.writeU48 = _write(encoding.writeU48, 6) + bufio.writeU40 = _write(encoding.writeU40, 5) + bufio.writeU32 = _write(encoding.writeU32, 4) + bufio.writeU24 = _write(encoding.writeU24, 3) + bufio.writeU16 = _write(encoding.writeU16, 2) + bufio.writeU8 = _write(encoding.writeU8, 1) + bufio.writeUBE = _writen(encoding.writeUBE) + bufio.writeBigU256BE = _write(encoding.writeBigU256BE, 32) + bufio.writeBigU128BE = _write(encoding.writeBigU128BE, 16) + bufio.writeBigU64BE = _write(encoding.writeBigU64BE, 8) + bufio.writeBigU56BE = _write(encoding.writeBigU56BE, 7) + bufio.writeU64BE = _write(encoding.writeU64BE, 8) + bufio.writeU56BE = _write(encoding.writeU56BE, 7) + bufio.writeU48BE = _write(encoding.writeU48BE, 6) + bufio.writeU40BE = _write(encoding.writeU40BE, 5) + bufio.writeU32BE = _write(encoding.writeU32BE, 4) + bufio.writeU24BE = _write(encoding.writeU24BE, 3) + bufio.writeU16BE = _write(encoding.writeU16BE, 2) + bufio.writeI = _writen(encoding.writeI) + bufio.writeBigI64 = _write(encoding.writeBigI64, 8) + bufio.writeBigI56 = _write(encoding.writeBigI56, 7) + bufio.writeI64 = _write(encoding.writeI64, 8) + bufio.writeI56 = _write(encoding.writeI56, 7) + bufio.writeI48 = _write(encoding.writeI48, 6) + bufio.writeI40 = _write(encoding.writeI40, 5) + bufio.writeI32 = _write(encoding.writeI32, 4) + bufio.writeI24 = _write(encoding.writeI24, 3) + bufio.writeI16 = _write(encoding.writeI16, 2) + bufio.writeI8 = _write(encoding.writeI8, 1) + bufio.writeIBE = _writen(encoding.writeIBE) + bufio.writeBigI64BE = _write(encoding.writeBigI64BE, 8) + bufio.writeBigI56BE = _write(encoding.writeBigI56BE, 7) + bufio.writeI64BE = _write(encoding.writeI64BE, 8) + bufio.writeI56BE = _write(encoding.writeI56BE, 7) + bufio.writeI48BE = _write(encoding.writeI48BE, 6) + bufio.writeI40BE = _write(encoding.writeI40BE, 5) + bufio.writeI32BE = _write(encoding.writeI32BE, 4) + bufio.writeI24BE = _write(encoding.writeI24BE, 3) + bufio.writeI16BE = _write(encoding.writeI16BE, 2) + bufio.writeFloat = _write(encoding.writeFloat, 4) + bufio.writeFloatBE = _write(encoding.writeFloatBE, 4) + bufio.writeDouble = _write(encoding.writeDouble, 8) + bufio.writeDoubleBE = _write(encoding.writeDoubleBE, 8) + bufio.readVarint = _readvar(encoding.readVarint) + bufio.writeVarint = _writecb(encoding.writeVarint, encoding.sizeVarint) + bufio.sizeVarint = encoding.sizeVarint + bufio.readVarint2 = _readvar(encoding.readVarint2) + bufio.writeVarint2 = _writecb(encoding.writeVarint2, encoding.sizeVarint2) + bufio.sizeVarint2 = encoding.sizeVarint2 + bufio.sliceBytes = encoding.sliceBytes + bufio.readBytes = encoding.readBytes + bufio.writeBytes = encoding.writeBytes + bufio.readString = encoding.readString + bufio.writeString = encoding.writeString + bufio.realloc = encoding.realloc + bufio.copy = encoding.copy + bufio.concat = encoding.concat + bufio.sizeVarBytes = encoding.sizeVarBytes + bufio.sizeVarlen = encoding.sizeVarlen + bufio.sizeVarString = encoding.sizeVarString + var cryptoBrowserify = {}, + browser$c = { exports: {} }, + safeBuffer$1 = { exports: {} } + /*! safe-buffer. MIT License. Feross Aboukhadijeh */ ;(function (tt, et) { + var nt = buffer$2, + rt = nt.Buffer + function it(at, st) { + for (var lt in at) st[lt] = at[lt] + } + rt.from && rt.alloc && rt.allocUnsafe && rt.allocUnsafeSlow ? (tt.exports = nt) : (it(nt, et), (et.Buffer = ot)) + function ot(at, st, lt) { + return rt(at, st, lt) + } + ;(ot.prototype = Object.create(rt.prototype)), + it(rt, ot), + (ot.from = function (at, st, lt) { + if (typeof at == 'number') throw new TypeError('Argument must not be a number') + return rt(at, st, lt) + }), + (ot.alloc = function (at, st, lt) { + if (typeof at != 'number') throw new TypeError('Argument must be a number') + var ct = rt(at) + return st !== void 0 ? (typeof lt == 'string' ? ct.fill(st, lt) : ct.fill(st)) : ct.fill(0), ct + }), + (ot.allocUnsafe = function (at) { + if (typeof at != 'number') throw new TypeError('Argument must be a number') + return rt(at) + }), + (ot.allocUnsafeSlow = function (at) { + if (typeof at != 'number') throw new TypeError('Argument must be a number') + return nt.SlowBuffer(at) + }) + })(safeBuffer$1, safeBuffer$1.exports) + var safeBufferExports = safeBuffer$1.exports, + MAX_BYTES = 65536, + MAX_UINT32 = 4294967295 + function oldBrowser$1() { + throw new Error(`Secure random number generation is not supported by this browser. +Use Chrome, Firefox or Internet Explorer 11`) + } + var Buffer$H = safeBufferExports.Buffer, + crypto$4 = commonjsGlobal.crypto || commonjsGlobal.msCrypto + crypto$4 && crypto$4.getRandomValues ? (browser$c.exports = randomBytes$2) : (browser$c.exports = oldBrowser$1) + function randomBytes$2(tt, et) { + if (tt > MAX_UINT32) throw new RangeError('requested too many random bytes') + var nt = Buffer$H.allocUnsafe(tt) + if (tt > 0) + if (tt > MAX_BYTES) + for (var rt = 0; rt < tt; rt += MAX_BYTES) crypto$4.getRandomValues(nt.slice(rt, rt + MAX_BYTES)) + else crypto$4.getRandomValues(nt) + return typeof et == 'function' + ? process.nextTick(function () { + et(null, nt) + }) + : nt + } + var browserExports = browser$c.exports, + readableBrowser = { exports: {} }, + events = { exports: {} }, + R = typeof Reflect == 'object' ? Reflect : null, + ReflectApply = + R && typeof R.apply == 'function' + ? R.apply + : function (et, nt, rt) { + return Function.prototype.apply.call(et, nt, rt) + }, + ReflectOwnKeys + R && typeof R.ownKeys == 'function' + ? (ReflectOwnKeys = R.ownKeys) + : Object.getOwnPropertySymbols + ? (ReflectOwnKeys = function (et) { + return Object.getOwnPropertyNames(et).concat(Object.getOwnPropertySymbols(et)) + }) + : (ReflectOwnKeys = function (et) { + return Object.getOwnPropertyNames(et) + }) + function ProcessEmitWarning(tt) { + console && console.warn && console.warn(tt) + } + var NumberIsNaN = + Number.isNaN || + function (et) { + return et !== et + } + function EventEmitter$1() { + EventEmitter$1.init.call(this) + } + events.exports = EventEmitter$1 + events.exports.once = once$2 + EventEmitter$1.EventEmitter = EventEmitter$1 + EventEmitter$1.prototype._events = void 0 + EventEmitter$1.prototype._eventsCount = 0 + EventEmitter$1.prototype._maxListeners = void 0 + var defaultMaxListeners = 10 + function checkListener(tt) { + if (typeof tt != 'function') + throw new TypeError('The "listener" argument must be of type Function. Received type ' + typeof tt) + } + Object.defineProperty(EventEmitter$1, 'defaultMaxListeners', { + enumerable: !0, + get: function () { + return defaultMaxListeners + }, + set: function (tt) { + if (typeof tt != 'number' || tt < 0 || NumberIsNaN(tt)) + throw new RangeError( + 'The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received ' + tt + '.', + ) + defaultMaxListeners = tt + }, + }) + EventEmitter$1.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) + } + EventEmitter$1.prototype.setMaxListeners = function (et) { + if (typeof et != 'number' || et < 0 || NumberIsNaN(et)) + throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received ' + et + '.') + return (this._maxListeners = et), this + } + function _getMaxListeners(tt) { + return tt._maxListeners === void 0 ? EventEmitter$1.defaultMaxListeners : tt._maxListeners + } + EventEmitter$1.prototype.getMaxListeners = function () { + return _getMaxListeners(this) + } + EventEmitter$1.prototype.emit = function (et) { + for (var nt = [], rt = 1; rt < arguments.length; rt++) nt.push(arguments[rt]) + var it = et === 'error', + ot = this._events + if (ot !== void 0) it = it && ot.error === void 0 + else if (!it) return !1 + if (it) { + var at + if ((nt.length > 0 && (at = nt[0]), at instanceof Error)) throw at + var st = new Error('Unhandled error.' + (at ? ' (' + at.message + ')' : '')) + throw ((st.context = at), st) + } + var lt = ot[et] + if (lt === void 0) return !1 + if (typeof lt == 'function') ReflectApply(lt, this, nt) + else for (var ct = lt.length, ut = arrayClone(lt, ct), rt = 0; rt < ct; ++rt) ReflectApply(ut[rt], this, nt) + return !0 + } + function _addListener(tt, et, nt, rt) { + var it, ot, at + if ( + (checkListener(nt), + (ot = tt._events), + ot === void 0 + ? ((ot = tt._events = Object.create(null)), (tt._eventsCount = 0)) + : (ot.newListener !== void 0 && (tt.emit('newListener', et, nt.listener ? nt.listener : nt), (ot = tt._events)), + (at = ot[et])), + at === void 0) + ) + (at = ot[et] = nt), ++tt._eventsCount + else if ( + (typeof at == 'function' ? (at = ot[et] = rt ? [nt, at] : [at, nt]) : rt ? at.unshift(nt) : at.push(nt), + (it = _getMaxListeners(tt)), + it > 0 && at.length > it && !at.warned) + ) { + at.warned = !0 + var st = new Error( + 'Possible EventEmitter memory leak detected. ' + + at.length + + ' ' + + String(et) + + ' listeners added. Use emitter.setMaxListeners() to increase limit', + ) + ;(st.name = 'MaxListenersExceededWarning'), + (st.emitter = tt), + (st.type = et), + (st.count = at.length), + ProcessEmitWarning(st) + } + return tt + } + EventEmitter$1.prototype.addListener = function (et, nt) { + return _addListener(this, et, nt, !1) + } + EventEmitter$1.prototype.on = EventEmitter$1.prototype.addListener + EventEmitter$1.prototype.prependListener = function (et, nt) { + return _addListener(this, et, nt, !0) + } + function onceWrapper() { + 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 _onceWrap(tt, et, nt) { + var rt = { fired: !1, wrapFn: void 0, target: tt, type: et, listener: nt }, + it = onceWrapper.bind(rt) + return (it.listener = nt), (rt.wrapFn = it), it + } + EventEmitter$1.prototype.once = function (et, nt) { + return checkListener(nt), this.on(et, _onceWrap(this, et, nt)), this + } + EventEmitter$1.prototype.prependOnceListener = function (et, nt) { + return checkListener(nt), this.prependListener(et, _onceWrap(this, et, nt)), this + } + EventEmitter$1.prototype.removeListener = function (et, nt) { + var rt, it, ot, at, st + if ((checkListener(nt), (it = this._events), it === void 0)) return this + if (((rt = it[et]), rt === void 0)) return this + if (rt === nt || rt.listener === nt) + --this._eventsCount === 0 + ? (this._events = Object.create(null)) + : (delete it[et], it.removeListener && this.emit('removeListener', et, rt.listener || nt)) + else if (typeof rt != 'function') { + for (ot = -1, at = rt.length - 1; at >= 0; at--) + if (rt[at] === nt || rt[at].listener === nt) { + ;(st = rt[at].listener), (ot = at) + break + } + if (ot < 0) return this + ot === 0 ? rt.shift() : spliceOne(rt, ot), + rt.length === 1 && (it[et] = rt[0]), + it.removeListener !== void 0 && this.emit('removeListener', et, st || nt) + } + return this + } + EventEmitter$1.prototype.off = EventEmitter$1.prototype.removeListener + EventEmitter$1.prototype.removeAllListeners = function (et) { + var nt, rt, it + if (((rt = this._events), rt === void 0)) return this + if (rt.removeListener === void 0) + return ( + arguments.length === 0 + ? ((this._events = Object.create(null)), (this._eventsCount = 0)) + : rt[et] !== void 0 && (--this._eventsCount === 0 ? (this._events = Object.create(null)) : delete rt[et]), + this + ) + if (arguments.length === 0) { + var ot = Object.keys(rt), + at + for (it = 0; it < ot.length; ++it) (at = ot[it]), at !== 'removeListener' && this.removeAllListeners(at) + return ( + this.removeAllListeners('removeListener'), (this._events = Object.create(null)), (this._eventsCount = 0), this + ) + } + if (((nt = rt[et]), typeof nt == 'function')) this.removeListener(et, nt) + else if (nt !== void 0) for (it = nt.length - 1; it >= 0; it--) this.removeListener(et, nt[it]) + return this + } + function _listeners$1(tt, et, nt) { + var rt = tt._events + if (rt === void 0) return [] + var it = rt[et] + return it === void 0 + ? [] + : typeof it == 'function' + ? nt + ? [it.listener || it] + : [it] + : nt + ? unwrapListeners(it) + : arrayClone(it, it.length) + } + EventEmitter$1.prototype.listeners = function (et) { + return _listeners$1(this, et, !0) + } + EventEmitter$1.prototype.rawListeners = function (et) { + return _listeners$1(this, et, !1) + } + EventEmitter$1.listenerCount = function (tt, et) { + return typeof tt.listenerCount == 'function' ? tt.listenerCount(et) : listenerCount.call(tt, et) + } + EventEmitter$1.prototype.listenerCount = listenerCount + function listenerCount(tt) { + var et = this._events + if (et !== void 0) { + var nt = et[tt] + if (typeof nt == 'function') return 1 + if (nt !== void 0) return nt.length + } + return 0 + } + EventEmitter$1.prototype.eventNames = function () { + return this._eventsCount > 0 ? ReflectOwnKeys(this._events) : [] + } + function arrayClone(tt, et) { + for (var nt = new Array(et), rt = 0; rt < et; ++rt) nt[rt] = tt[rt] + return nt + } + function spliceOne(tt, et) { + for (; et + 1 < tt.length; et++) tt[et] = tt[et + 1] + tt.pop() + } + function unwrapListeners(tt) { + for (var et = new Array(tt.length), nt = 0; nt < et.length; ++nt) et[nt] = tt[nt].listener || tt[nt] + return et + } + function once$2(tt, et) { + return new Promise(function (nt, rt) { + function it(at) { + tt.removeListener(et, ot), rt(at) + } + function ot() { + typeof tt.removeListener == 'function' && tt.removeListener('error', it), nt([].slice.call(arguments)) + } + eventTargetAgnosticAddListener(tt, et, ot, { once: !0 }), + et !== 'error' && addErrorHandlerIfEventEmitter(tt, it, { once: !0 }) + }) + } + function addErrorHandlerIfEventEmitter(tt, et, nt) { + typeof tt.on == 'function' && eventTargetAgnosticAddListener(tt, 'error', et, nt) + } + function eventTargetAgnosticAddListener(tt, et, nt, rt) { + if (typeof tt.on == 'function') rt.once ? tt.once(et, nt) : tt.on(et, nt) + else if (typeof tt.addEventListener == 'function') + tt.addEventListener(et, function it(ot) { + rt.once && tt.removeEventListener(et, it), nt(ot) + }) + else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type ' + typeof tt) + } + var eventsExports = events.exports, + streamBrowser = eventsExports.EventEmitter + const __viteBrowserExternal = {}, + __viteBrowserExternal$1 = Object.freeze( + Object.defineProperty({ __proto__: null, default: __viteBrowserExternal }, Symbol.toStringTag, { + value: 'Module', + }), + ), + require$$0$2 = getAugmentedNamespace(__viteBrowserExternal$1) + var buffer_list, hasRequiredBuffer_list + function requireBuffer_list() { + if (hasRequiredBuffer_list) return buffer_list + hasRequiredBuffer_list = 1 + function tt(mt, gt) { + var yt = Object.keys(mt) + if (Object.getOwnPropertySymbols) { + var bt = Object.getOwnPropertySymbols(mt) + gt && + (bt = bt.filter(function (vt) { + return Object.getOwnPropertyDescriptor(mt, vt).enumerable + })), + yt.push.apply(yt, bt) + } + return yt + } + function et(mt) { + for (var gt = 1; gt < arguments.length; gt++) { + var yt = arguments[gt] != null ? arguments[gt] : {} + gt % 2 + ? tt(Object(yt), !0).forEach(function (bt) { + nt(mt, bt, yt[bt]) + }) + : Object.getOwnPropertyDescriptors + ? Object.defineProperties(mt, Object.getOwnPropertyDescriptors(yt)) + : tt(Object(yt)).forEach(function (bt) { + Object.defineProperty(mt, bt, Object.getOwnPropertyDescriptor(yt, bt)) + }) + } + return mt + } + function nt(mt, gt, yt) { + return ( + (gt = at(gt)), + gt in mt + ? Object.defineProperty(mt, gt, { value: yt, enumerable: !0, configurable: !0, writable: !0 }) + : (mt[gt] = yt), + mt + ) + } + function rt(mt, gt) { + if (!(mt instanceof gt)) throw new TypeError('Cannot call a class as a function') + } + function it(mt, gt) { + for (var yt = 0; yt < gt.length; yt++) { + var bt = gt[yt] + ;(bt.enumerable = bt.enumerable || !1), + (bt.configurable = !0), + 'value' in bt && (bt.writable = !0), + Object.defineProperty(mt, at(bt.key), bt) + } + } + function ot(mt, gt, yt) { + return gt && it(mt.prototype, gt), yt && it(mt, yt), Object.defineProperty(mt, 'prototype', { writable: !1 }), mt + } + function at(mt) { + var gt = st(mt, 'string') + return typeof gt == 'symbol' ? gt : String(gt) + } + function st(mt, gt) { + if (typeof mt != 'object' || mt === null) return mt + var yt = mt[Symbol.toPrimitive] + if (yt !== void 0) { + var bt = yt.call(mt, gt || 'default') + if (typeof bt != 'object') return bt + throw new TypeError('@@toPrimitive must return a primitive value.') + } + return (gt === 'string' ? String : Number)(mt) + } + var lt = buffer$2, + ct = lt.Buffer, + ut = require$$0$2, + ht = ut.inspect, + dt = (ht && ht.custom) || 'inspect' + function pt(mt, gt, yt) { + ct.prototype.copy.call(mt, gt, yt) + } + return ( + (buffer_list = (function () { + function mt() { + rt(this, mt), (this.head = null), (this.tail = null), (this.length = 0) + } + return ( + ot(mt, [ + { + key: 'push', + value: function (yt) { + var bt = { data: yt, next: null } + this.length > 0 ? (this.tail.next = bt) : (this.head = bt), (this.tail = bt), ++this.length + }, + }, + { + key: 'unshift', + value: function (yt) { + var bt = { data: yt, next: this.head } + this.length === 0 && (this.tail = bt), (this.head = bt), ++this.length + }, + }, + { + key: 'shift', + value: function () { + if (this.length !== 0) { + var yt = this.head.data + return ( + this.length === 1 ? (this.head = this.tail = null) : (this.head = this.head.next), --this.length, yt + ) + } + }, + }, + { + key: 'clear', + value: function () { + ;(this.head = this.tail = null), (this.length = 0) + }, + }, + { + key: 'join', + value: function (yt) { + if (this.length === 0) return '' + for (var bt = this.head, vt = '' + bt.data; (bt = bt.next); ) vt += yt + bt.data + return vt + }, + }, + { + key: 'concat', + value: function (yt) { + if (this.length === 0) return ct.alloc(0) + for (var bt = ct.allocUnsafe(yt >>> 0), vt = this.head, xt = 0; vt; ) + pt(vt.data, bt, xt), (xt += vt.data.length), (vt = vt.next) + return bt + }, + }, + { + key: 'consume', + value: function (yt, bt) { + var vt + return ( + yt < this.head.data.length + ? ((vt = this.head.data.slice(0, yt)), (this.head.data = this.head.data.slice(yt))) + : yt === this.head.data.length + ? (vt = this.shift()) + : (vt = bt ? this._getString(yt) : this._getBuffer(yt)), + vt + ) + }, + }, + { + key: 'first', + value: function () { + return this.head.data + }, + }, + { + key: '_getString', + value: function (yt) { + var bt = this.head, + vt = 1, + xt = bt.data + for (yt -= xt.length; (bt = bt.next); ) { + var kt = bt.data, + St = yt > kt.length ? kt.length : yt + if ((St === kt.length ? (xt += kt) : (xt += kt.slice(0, yt)), (yt -= St), yt === 0)) { + St === kt.length + ? (++vt, bt.next ? (this.head = bt.next) : (this.head = this.tail = null)) + : ((this.head = bt), (bt.data = kt.slice(St))) + break + } + ++vt + } + return (this.length -= vt), xt + }, + }, + { + key: '_getBuffer', + value: function (yt) { + var bt = ct.allocUnsafe(yt), + vt = this.head, + xt = 1 + for (vt.data.copy(bt), yt -= vt.data.length; (vt = vt.next); ) { + var kt = vt.data, + St = yt > kt.length ? kt.length : yt + if ((kt.copy(bt, bt.length - yt, 0, St), (yt -= St), yt === 0)) { + St === kt.length + ? (++xt, vt.next ? (this.head = vt.next) : (this.head = this.tail = null)) + : ((this.head = vt), (vt.data = kt.slice(St))) + break + } + ++xt + } + return (this.length -= xt), bt + }, + }, + { + key: dt, + value: function (yt, bt) { + return ht(this, et(et({}, bt), {}, { depth: 0, customInspect: !1 })) + }, + }, + ]), + mt + ) + })()), + buffer_list + ) + } + function destroy(tt, et) { + var nt = this, + rt = this._readableState && this._readableState.destroyed, + it = this._writableState && this._writableState.destroyed + return rt || it + ? (et + ? et(tt) + : tt && + (this._writableState + ? this._writableState.errorEmitted || + ((this._writableState.errorEmitted = !0), process.nextTick(emitErrorNT, this, tt)) + : process.nextTick(emitErrorNT, this, tt)), + this) + : (this._readableState && (this._readableState.destroyed = !0), + this._writableState && (this._writableState.destroyed = !0), + this._destroy(tt || null, function (ot) { + !et && ot + ? nt._writableState + ? nt._writableState.errorEmitted + ? process.nextTick(emitCloseNT, nt) + : ((nt._writableState.errorEmitted = !0), process.nextTick(emitErrorAndCloseNT, nt, ot)) + : process.nextTick(emitErrorAndCloseNT, nt, ot) + : et + ? (process.nextTick(emitCloseNT, nt), et(ot)) + : process.nextTick(emitCloseNT, nt) + }), + this) + } + function emitErrorAndCloseNT(tt, et) { + emitErrorNT(tt, et), emitCloseNT(tt) + } + function emitCloseNT(tt) { + ;(tt._writableState && !tt._writableState.emitClose) || + (tt._readableState && !tt._readableState.emitClose) || + tt.emit('close') + } + function undestroy() { + this._readableState && + ((this._readableState.destroyed = !1), + (this._readableState.reading = !1), + (this._readableState.ended = !1), + (this._readableState.endEmitted = !1)), + this._writableState && + ((this._writableState.destroyed = !1), + (this._writableState.ended = !1), + (this._writableState.ending = !1), + (this._writableState.finalCalled = !1), + (this._writableState.prefinished = !1), + (this._writableState.finished = !1), + (this._writableState.errorEmitted = !1)) + } + function emitErrorNT(tt, et) { + tt.emit('error', et) + } + function errorOrDestroy(tt, et) { + var nt = tt._readableState, + rt = tt._writableState + ;(nt && nt.autoDestroy) || (rt && rt.autoDestroy) ? tt.destroy(et) : tt.emit('error', et) + } + var destroy_1 = { destroy, undestroy, errorOrDestroy }, + errorsBrowser = {} + function _inheritsLoose$1(tt, et) { + ;(tt.prototype = Object.create(et.prototype)), (tt.prototype.constructor = tt), (tt.__proto__ = et) + } + var codes = {} + function createErrorType(tt, et, nt) { + nt || (nt = Error) + function rt(ot, at, st) { + return typeof et == 'string' ? et : et(ot, at, st) + } + var it = (function (ot) { + _inheritsLoose$1(at, ot) + function at(st, lt, ct) { + return ot.call(this, rt(st, lt, ct)) || this + } + return at + })(nt) + ;(it.prototype.name = nt.name), (it.prototype.code = tt), (codes[tt] = it) + } + function oneOf(tt, et) { + if (Array.isArray(tt)) { + var nt = tt.length + return ( + (tt = tt.map(function (rt) { + return String(rt) + })), + nt > 2 + ? 'one of '.concat(et, ' ').concat(tt.slice(0, nt - 1).join(', '), ', or ') + tt[nt - 1] + : nt === 2 + ? 'one of '.concat(et, ' ').concat(tt[0], ' or ').concat(tt[1]) + : 'of '.concat(et, ' ').concat(tt[0]) + ) + } else return 'of '.concat(et, ' ').concat(String(tt)) + } + function startsWith(tt, et, nt) { + return tt.substr(!nt || nt < 0 ? 0 : +nt, et.length) === et + } + function endsWith(tt, et, nt) { + return (nt === void 0 || nt > tt.length) && (nt = tt.length), tt.substring(nt - et.length, nt) === et + } + function includes(tt, et, nt) { + return typeof nt != 'number' && (nt = 0), nt + et.length > tt.length ? !1 : tt.indexOf(et, nt) !== -1 + } + createErrorType( + 'ERR_INVALID_OPT_VALUE', + function (tt, et) { + return 'The value "' + et + '" is invalid for option "' + tt + '"' + }, + TypeError, + ) + createErrorType( + 'ERR_INVALID_ARG_TYPE', + function (tt, et, nt) { + var rt + typeof et == 'string' && startsWith(et, 'not ') + ? ((rt = 'must not be'), (et = et.replace(/^not /, ''))) + : (rt = 'must be') + var it + if (endsWith(tt, ' argument')) it = 'The '.concat(tt, ' ').concat(rt, ' ').concat(oneOf(et, 'type')) + else { + var ot = includes(tt, '.') ? 'property' : 'argument' + it = 'The "'.concat(tt, '" ').concat(ot, ' ').concat(rt, ' ').concat(oneOf(et, 'type')) + } + return (it += '. Received type '.concat(typeof nt)), it + }, + TypeError, + ) + createErrorType('ERR_STREAM_PUSH_AFTER_EOF', 'stream.push() after EOF') + createErrorType('ERR_METHOD_NOT_IMPLEMENTED', function (tt) { + return 'The ' + tt + ' method is not implemented' + }) + createErrorType('ERR_STREAM_PREMATURE_CLOSE', 'Premature close') + createErrorType('ERR_STREAM_DESTROYED', function (tt) { + return 'Cannot call ' + tt + ' after a stream was destroyed' + }) + createErrorType('ERR_MULTIPLE_CALLBACK', 'Callback called multiple times') + createErrorType('ERR_STREAM_CANNOT_PIPE', 'Cannot pipe, not readable') + createErrorType('ERR_STREAM_WRITE_AFTER_END', 'write after end') + createErrorType('ERR_STREAM_NULL_VALUES', 'May not write null values to stream', TypeError) + createErrorType( + 'ERR_UNKNOWN_ENCODING', + function (tt) { + return 'Unknown encoding: ' + tt + }, + TypeError, + ) + createErrorType('ERR_STREAM_UNSHIFT_AFTER_END_EVENT', 'stream.unshift() after end event') + errorsBrowser.codes = codes + var ERR_INVALID_OPT_VALUE = errorsBrowser.codes.ERR_INVALID_OPT_VALUE + function highWaterMarkFrom(tt, et, nt) { + return tt.highWaterMark != null ? tt.highWaterMark : et ? tt[nt] : null + } + function getHighWaterMark(tt, et, nt, rt) { + var it = highWaterMarkFrom(et, rt, nt) + if (it != null) { + if (!(isFinite(it) && Math.floor(it) === it) || it < 0) { + var ot = rt ? nt : 'highWaterMark' + throw new ERR_INVALID_OPT_VALUE(ot, it) + } + return Math.floor(it) + } + return tt.objectMode ? 16 : 16 * 1024 + } + var state = { getHighWaterMark }, + browser$b = deprecate$1 + function deprecate$1(tt, et) { + if (config$1('noDeprecation')) return tt + var nt = !1 + function rt() { + if (!nt) { + if (config$1('throwDeprecation')) throw new Error(et) + config$1('traceDeprecation') ? console.trace(et) : console.warn(et), (nt = !0) + } + return tt.apply(this, arguments) + } + return rt + } + function config$1(tt) { + try { + if (!commonjsGlobal.localStorage) return !1 + } catch { + return !1 + } + var et = commonjsGlobal.localStorage[tt] + return et == null ? !1 : String(et).toLowerCase() === 'true' + } + var _stream_writable, hasRequired_stream_writable + function require_stream_writable() { + if (hasRequired_stream_writable) return _stream_writable + ;(hasRequired_stream_writable = 1), (_stream_writable = Et) + function tt(Kt) { + var rn = this + ;(this.next = null), + (this.entry = null), + (this.finish = function () { + sn(rn, Kt) + }) + } + var et + Et.WritableState = Tt + var nt = { deprecate: browser$b }, + rt = streamBrowser, + it = buffer$2.Buffer, + ot = + (typeof commonjsGlobal < 'u' ? commonjsGlobal : typeof window < 'u' ? window : typeof self < 'u' ? self : {}) + .Uint8Array || function () {} + function at(Kt) { + return it.from(Kt) + } + function st(Kt) { + return it.isBuffer(Kt) || Kt instanceof ot + } + var lt = destroy_1, + ct = state, + ut = ct.getHighWaterMark, + ht = errorsBrowser.codes, + dt = ht.ERR_INVALID_ARG_TYPE, + pt = ht.ERR_METHOD_NOT_IMPLEMENTED, + mt = ht.ERR_MULTIPLE_CALLBACK, + gt = ht.ERR_STREAM_CANNOT_PIPE, + yt = ht.ERR_STREAM_DESTROYED, + bt = ht.ERR_STREAM_NULL_VALUES, + vt = ht.ERR_STREAM_WRITE_AFTER_END, + xt = ht.ERR_UNKNOWN_ENCODING, + kt = lt.errorOrDestroy + inherits_browserExports(Et, rt) + function St() {} + function Tt(Kt, rn, nn) { + ;(et = et || require_stream_duplex()), + (Kt = Kt || {}), + typeof nn != 'boolean' && (nn = rn instanceof et), + (this.objectMode = !!Kt.objectMode), + nn && (this.objectMode = this.objectMode || !!Kt.writableObjectMode), + (this.highWaterMark = ut(this, Kt, 'writableHighWaterMark', nn)), + (this.finalCalled = !1), + (this.needDrain = !1), + (this.ending = !1), + (this.ended = !1), + (this.finished = !1), + (this.destroyed = !1) + var hn = Kt.decodeStrings === !1 + ;(this.decodeStrings = !hn), + (this.defaultEncoding = Kt.defaultEncoding || 'utf8'), + (this.length = 0), + (this.writing = !1), + (this.corked = 0), + (this.sync = !0), + (this.bufferProcessing = !1), + (this.onwrite = function (vn) { + Ot(rn, vn) + }), + (this.writecb = null), + (this.writelen = 0), + (this.bufferedRequest = null), + (this.lastBufferedRequest = null), + (this.pendingcb = 0), + (this.prefinished = !1), + (this.errorEmitted = !1), + (this.emitClose = Kt.emitClose !== !1), + (this.autoDestroy = !!Kt.autoDestroy), + (this.bufferedRequestCount = 0), + (this.corkedRequestsFree = new tt(this)) + } + ;(Tt.prototype.getBuffer = function () { + for (var rn = this.bufferedRequest, nn = []; rn; ) nn.push(rn), (rn = rn.next) + return nn + }), + (function () { + try { + Object.defineProperty(Tt.prototype, 'buffer', { + get: nt.deprecate( + function () { + return this.getBuffer() + }, + '_writableState.buffer is deprecated. Use _writableState.getBuffer instead.', + 'DEP0003', + ), + }) + } catch {} + })() + var At + typeof Symbol == 'function' && Symbol.hasInstance && typeof Function.prototype[Symbol.hasInstance] == 'function' + ? ((At = Function.prototype[Symbol.hasInstance]), + Object.defineProperty(Et, Symbol.hasInstance, { + value: function (rn) { + return At.call(this, rn) ? !0 : this !== Et ? !1 : rn && rn._writableState instanceof Tt + }, + })) + : (At = function (rn) { + return rn instanceof this + }) + function Et(Kt) { + et = et || require_stream_duplex() + var rn = this instanceof et + if (!rn && !At.call(Et, this)) return new Et(Kt) + ;(this._writableState = new Tt(Kt, this, rn)), + (this.writable = !0), + Kt && + (typeof Kt.write == 'function' && (this._write = Kt.write), + typeof Kt.writev == 'function' && (this._writev = Kt.writev), + typeof Kt.destroy == 'function' && (this._destroy = Kt.destroy), + typeof Kt.final == 'function' && (this._final = Kt.final)), + rt.call(this) + } + Et.prototype.pipe = function () { + kt(this, new gt()) + } + function $t(Kt, rn) { + var nn = new vt() + kt(Kt, nn), process.nextTick(rn, nn) + } + function Dt(Kt, rn, nn, hn) { + var vn + return ( + nn === null + ? (vn = new bt()) + : typeof nn != 'string' && !rn.objectMode && (vn = new dt('chunk', ['string', 'Buffer'], nn)), + vn ? (kt(Kt, vn), process.nextTick(hn, vn), !1) : !0 + ) + } + ;(Et.prototype.write = function (Kt, rn, nn) { + var hn = this._writableState, + vn = !1, + an = !hn.objectMode && st(Kt) + return ( + an && !it.isBuffer(Kt) && (Kt = at(Kt)), + typeof rn == 'function' && ((nn = rn), (rn = null)), + an ? (rn = 'buffer') : rn || (rn = hn.defaultEncoding), + typeof nn != 'function' && (nn = St), + hn.ending + ? $t(this, nn) + : (an || Dt(this, hn, Kt, nn)) && (hn.pendingcb++, (vn = Pt(this, hn, an, Kt, rn, nn))), + vn + ) + }), + (Et.prototype.cork = function () { + this._writableState.corked++ + }), + (Et.prototype.uncork = function () { + var Kt = this._writableState + Kt.corked && + (Kt.corked--, !Kt.writing && !Kt.corked && !Kt.bufferProcessing && Kt.bufferedRequest && Ft(this, Kt)) + }), + (Et.prototype.setDefaultEncoding = function (rn) { + if ( + (typeof rn == 'string' && (rn = rn.toLowerCase()), + !( + [ + 'hex', + 'utf8', + 'utf-8', + 'ascii', + 'binary', + 'base64', + 'ucs2', + 'ucs-2', + 'utf16le', + 'utf-16le', + 'raw', + ].indexOf((rn + '').toLowerCase()) > -1 + )) + ) + throw new xt(rn) + return (this._writableState.defaultEncoding = rn), this + }), + Object.defineProperty(Et.prototype, 'writableBuffer', { + enumerable: !1, + get: function () { + return this._writableState && this._writableState.getBuffer() + }, + }) + function jt(Kt, rn, nn) { + return !Kt.objectMode && Kt.decodeStrings !== !1 && typeof rn == 'string' && (rn = it.from(rn, nn)), rn + } + Object.defineProperty(Et.prototype, 'writableHighWaterMark', { + enumerable: !1, + get: function () { + return this._writableState.highWaterMark + }, + }) + function Pt(Kt, rn, nn, hn, vn, an) { + if (!nn) { + var Qt = jt(rn, hn, vn) + hn !== Qt && ((nn = !0), (vn = 'buffer'), (hn = Qt)) + } + var _n = rn.objectMode ? 1 : hn.length + rn.length += _n + var Pn = rn.length < rn.highWaterMark + if ((Pn || (rn.needDrain = !0), rn.writing || rn.corked)) { + var $n = rn.lastBufferedRequest + ;(rn.lastBufferedRequest = { chunk: hn, encoding: vn, isBuf: nn, callback: an, next: null }), + $n ? ($n.next = rn.lastBufferedRequest) : (rn.bufferedRequest = rn.lastBufferedRequest), + (rn.bufferedRequestCount += 1) + } else Ct(Kt, rn, !1, _n, hn, vn, an) + return Pn + } + function Ct(Kt, rn, nn, hn, vn, an, Qt) { + ;(rn.writelen = hn), + (rn.writecb = Qt), + (rn.writing = !0), + (rn.sync = !0), + rn.destroyed ? rn.onwrite(new yt('write')) : nn ? Kt._writev(vn, rn.onwrite) : Kt._write(vn, an, rn.onwrite), + (rn.sync = !1) + } + function wt(Kt, rn, nn, hn, vn) { + --rn.pendingcb, + nn + ? (process.nextTick(vn, hn), process.nextTick(Ht, Kt, rn), (Kt._writableState.errorEmitted = !0), kt(Kt, hn)) + : (vn(hn), (Kt._writableState.errorEmitted = !0), kt(Kt, hn), Ht(Kt, rn)) + } + function It(Kt) { + ;(Kt.writing = !1), (Kt.writecb = null), (Kt.length -= Kt.writelen), (Kt.writelen = 0) + } + function Ot(Kt, rn) { + var nn = Kt._writableState, + hn = nn.sync, + vn = nn.writecb + if (typeof vn != 'function') throw new mt() + if ((It(nn), rn)) wt(Kt, nn, hn, rn, vn) + else { + var an = Nt(nn) || Kt.destroyed + !an && !nn.corked && !nn.bufferProcessing && nn.bufferedRequest && Ft(Kt, nn), + hn ? process.nextTick(Wt, Kt, nn, an, vn) : Wt(Kt, nn, an, vn) + } + } + function Wt(Kt, rn, nn, hn) { + nn || zt(Kt, rn), rn.pendingcb--, hn(), Ht(Kt, rn) + } + function zt(Kt, rn) { + rn.length === 0 && rn.needDrain && ((rn.needDrain = !1), Kt.emit('drain')) + } + function Ft(Kt, rn) { + rn.bufferProcessing = !0 + var nn = rn.bufferedRequest + if (Kt._writev && nn && nn.next) { + var hn = rn.bufferedRequestCount, + vn = new Array(hn), + an = rn.corkedRequestsFree + an.entry = nn + for (var Qt = 0, _n = !0; nn; ) (vn[Qt] = nn), nn.isBuf || (_n = !1), (nn = nn.next), (Qt += 1) + ;(vn.allBuffers = _n), + Ct(Kt, rn, !0, rn.length, vn, '', an.finish), + rn.pendingcb++, + (rn.lastBufferedRequest = null), + an.next ? ((rn.corkedRequestsFree = an.next), (an.next = null)) : (rn.corkedRequestsFree = new tt(rn)), + (rn.bufferedRequestCount = 0) + } else { + for (; nn; ) { + var Pn = nn.chunk, + $n = nn.encoding, + Nn = nn.callback, + Tn = rn.objectMode ? 1 : Pn.length + if ((Ct(Kt, rn, !1, Tn, Pn, $n, Nn), (nn = nn.next), rn.bufferedRequestCount--, rn.writing)) break + } + nn === null && (rn.lastBufferedRequest = null) + } + ;(rn.bufferedRequest = nn), (rn.bufferProcessing = !1) + } + ;(Et.prototype._write = function (Kt, rn, nn) { + nn(new pt('_write()')) + }), + (Et.prototype._writev = null), + (Et.prototype.end = function (Kt, rn, nn) { + var hn = this._writableState + return ( + typeof Kt == 'function' + ? ((nn = Kt), (Kt = null), (rn = null)) + : typeof rn == 'function' && ((nn = rn), (rn = null)), + Kt != null && this.write(Kt, rn), + hn.corked && ((hn.corked = 1), this.uncork()), + hn.ending || en(this, hn, nn), + this + ) + }), + Object.defineProperty(Et.prototype, 'writableLength', { + enumerable: !1, + get: function () { + return this._writableState.length + }, + }) + function Nt(Kt) { + return Kt.ending && Kt.length === 0 && Kt.bufferedRequest === null && !Kt.finished && !Kt.writing + } + function Ut(Kt, rn) { + Kt._final(function (nn) { + rn.pendingcb--, nn && kt(Kt, nn), (rn.prefinished = !0), Kt.emit('prefinish'), Ht(Kt, rn) + }) + } + function Mt(Kt, rn) { + !rn.prefinished && + !rn.finalCalled && + (typeof Kt._final == 'function' && !rn.destroyed + ? (rn.pendingcb++, (rn.finalCalled = !0), process.nextTick(Ut, Kt, rn)) + : ((rn.prefinished = !0), Kt.emit('prefinish'))) + } + function Ht(Kt, rn) { + var nn = Nt(rn) + if (nn && (Mt(Kt, rn), rn.pendingcb === 0 && ((rn.finished = !0), Kt.emit('finish'), rn.autoDestroy))) { + var hn = Kt._readableState + ;(!hn || (hn.autoDestroy && hn.endEmitted)) && Kt.destroy() + } + return nn + } + function en(Kt, rn, nn) { + ;(rn.ending = !0), + Ht(Kt, rn), + nn && (rn.finished ? process.nextTick(nn) : Kt.once('finish', nn)), + (rn.ended = !0), + (Kt.writable = !1) + } + function sn(Kt, rn, nn) { + var hn = Kt.entry + for (Kt.entry = null; hn; ) { + var vn = hn.callback + rn.pendingcb--, vn(nn), (hn = hn.next) + } + rn.corkedRequestsFree.next = Kt + } + return ( + Object.defineProperty(Et.prototype, 'destroyed', { + enumerable: !1, + get: function () { + return this._writableState === void 0 ? !1 : this._writableState.destroyed + }, + set: function (rn) { + this._writableState && (this._writableState.destroyed = rn) + }, + }), + (Et.prototype.destroy = lt.destroy), + (Et.prototype._undestroy = lt.undestroy), + (Et.prototype._destroy = function (Kt, rn) { + rn(Kt) + }), + _stream_writable + ) + } + var _stream_duplex, hasRequired_stream_duplex + function require_stream_duplex() { + if (hasRequired_stream_duplex) return _stream_duplex + hasRequired_stream_duplex = 1 + var tt = + Object.keys || + function (ct) { + var ut = [] + for (var ht in ct) ut.push(ht) + return ut + } + _stream_duplex = at + var et = require_stream_readable(), + nt = require_stream_writable() + inherits_browserExports(at, et) + for (var rt = tt(nt.prototype), it = 0; it < rt.length; it++) { + var ot = rt[it] + at.prototype[ot] || (at.prototype[ot] = nt.prototype[ot]) + } + function at(ct) { + if (!(this instanceof at)) return new at(ct) + et.call(this, ct), + nt.call(this, ct), + (this.allowHalfOpen = !0), + ct && + (ct.readable === !1 && (this.readable = !1), + ct.writable === !1 && (this.writable = !1), + ct.allowHalfOpen === !1 && ((this.allowHalfOpen = !1), this.once('end', st))) + } + Object.defineProperty(at.prototype, 'writableHighWaterMark', { + enumerable: !1, + get: function () { + return this._writableState.highWaterMark + }, + }), + Object.defineProperty(at.prototype, 'writableBuffer', { + enumerable: !1, + get: function () { + return this._writableState && this._writableState.getBuffer() + }, + }), + Object.defineProperty(at.prototype, 'writableLength', { + enumerable: !1, + get: function () { + return this._writableState.length + }, + }) + function st() { + this._writableState.ended || process.nextTick(lt, this) + } + function lt(ct) { + ct.end() + } + return ( + Object.defineProperty(at.prototype, 'destroyed', { + enumerable: !1, + get: function () { + return this._readableState === void 0 || this._writableState === void 0 + ? !1 + : this._readableState.destroyed && this._writableState.destroyed + }, + set: function (ut) { + this._readableState === void 0 || + this._writableState === void 0 || + ((this._readableState.destroyed = ut), (this._writableState.destroyed = ut)) + }, + }), + _stream_duplex + ) + } + var string_decoder = {}, + Buffer$G = safeBufferExports.Buffer, + isEncoding$1 = + Buffer$G.isEncoding || + function (tt) { + switch (((tt = '' + tt), tt && tt.toLowerCase())) { + case 'hex': + case 'utf8': + case 'utf-8': + case 'ascii': + case 'binary': + case 'base64': + case 'ucs2': + case 'ucs-2': + case 'utf16le': + case 'utf-16le': + case 'raw': + return !0 + default: + return !1 + } + } + function _normalizeEncoding(tt) { + if (!tt) return 'utf8' + for (var et; ; ) + switch (tt) { + case 'utf8': + case 'utf-8': + return 'utf8' + case 'ucs2': + case 'ucs-2': + case 'utf16le': + case 'utf-16le': + return 'utf16le' + case 'latin1': + case 'binary': + return 'latin1' + case 'base64': + case 'ascii': + case 'hex': + return tt + default: + if (et) return + ;(tt = ('' + tt).toLowerCase()), (et = !0) + } + } + function normalizeEncoding(tt) { + var et = _normalizeEncoding(tt) + if (typeof et != 'string' && (Buffer$G.isEncoding === isEncoding$1 || !isEncoding$1(tt))) + throw new Error('Unknown encoding: ' + tt) + return et || tt + } + string_decoder.StringDecoder = StringDecoder$1 + function StringDecoder$1(tt) { + this.encoding = normalizeEncoding(tt) + var et + switch (this.encoding) { + case 'utf16le': + ;(this.text = utf16Text), (this.end = utf16End), (et = 4) + break + case 'utf8': + ;(this.fillLast = utf8FillLast), (et = 4) + break + case 'base64': + ;(this.text = base64Text), (this.end = base64End), (et = 3) + break + default: + ;(this.write = simpleWrite), (this.end = simpleEnd) + return + } + ;(this.lastNeed = 0), (this.lastTotal = 0), (this.lastChar = Buffer$G.allocUnsafe(et)) + } + StringDecoder$1.prototype.write = function (tt) { + if (tt.length === 0) return '' + var et, nt + if (this.lastNeed) { + if (((et = this.fillLast(tt)), et === void 0)) return '' + ;(nt = this.lastNeed), (this.lastNeed = 0) + } else nt = 0 + return nt < tt.length ? (et ? et + this.text(tt, nt) : this.text(tt, nt)) : et || '' + } + StringDecoder$1.prototype.end = utf8End + StringDecoder$1.prototype.text = utf8Text + StringDecoder$1.prototype.fillLast = function (tt) { + if (this.lastNeed <= tt.length) + return ( + tt.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, this.lastNeed), + this.lastChar.toString(this.encoding, 0, this.lastTotal) + ) + tt.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, tt.length), (this.lastNeed -= tt.length) + } + function utf8CheckByte(tt) { + return tt <= 127 ? 0 : tt >> 5 === 6 ? 2 : tt >> 4 === 14 ? 3 : tt >> 3 === 30 ? 4 : tt >> 6 === 2 ? -1 : -2 + } + function utf8CheckIncomplete(tt, et, nt) { + var rt = et.length - 1 + if (rt < nt) return 0 + var it = utf8CheckByte(et[rt]) + return it >= 0 + ? (it > 0 && (tt.lastNeed = it - 1), it) + : --rt < nt || it === -2 + ? 0 + : ((it = utf8CheckByte(et[rt])), + it >= 0 + ? (it > 0 && (tt.lastNeed = it - 2), it) + : --rt < nt || it === -2 + ? 0 + : ((it = utf8CheckByte(et[rt])), + it >= 0 ? (it > 0 && (it === 2 ? (it = 0) : (tt.lastNeed = it - 3)), it) : 0)) + } + function utf8CheckExtraBytes(tt, et, nt) { + if ((et[0] & 192) !== 128) return (tt.lastNeed = 0), '�' + if (tt.lastNeed > 1 && et.length > 1) { + if ((et[1] & 192) !== 128) return (tt.lastNeed = 1), '�' + if (tt.lastNeed > 2 && et.length > 2 && (et[2] & 192) !== 128) return (tt.lastNeed = 2), '�' + } + } + function utf8FillLast(tt) { + var et = this.lastTotal - this.lastNeed, + nt = utf8CheckExtraBytes(this, tt) + if (nt !== void 0) return nt + if (this.lastNeed <= tt.length) + return tt.copy(this.lastChar, et, 0, this.lastNeed), this.lastChar.toString(this.encoding, 0, this.lastTotal) + tt.copy(this.lastChar, et, 0, tt.length), (this.lastNeed -= tt.length) + } + function utf8Text(tt, et) { + var nt = utf8CheckIncomplete(this, tt, et) + if (!this.lastNeed) return tt.toString('utf8', et) + this.lastTotal = nt + var rt = tt.length - (nt - this.lastNeed) + return tt.copy(this.lastChar, 0, rt), tt.toString('utf8', et, rt) + } + function utf8End(tt) { + var et = tt && tt.length ? this.write(tt) : '' + return this.lastNeed ? et + '�' : et + } + function utf16Text(tt, et) { + if ((tt.length - et) % 2 === 0) { + var nt = tt.toString('utf16le', et) + if (nt) { + var rt = nt.charCodeAt(nt.length - 1) + if (rt >= 55296 && rt <= 56319) + return ( + (this.lastNeed = 2), + (this.lastTotal = 4), + (this.lastChar[0] = tt[tt.length - 2]), + (this.lastChar[1] = tt[tt.length - 1]), + nt.slice(0, -1) + ) + } + return nt + } + return ( + (this.lastNeed = 1), + (this.lastTotal = 2), + (this.lastChar[0] = tt[tt.length - 1]), + tt.toString('utf16le', et, tt.length - 1) + ) + } + function utf16End(tt) { + var et = tt && tt.length ? this.write(tt) : '' + if (this.lastNeed) { + var nt = this.lastTotal - this.lastNeed + return et + this.lastChar.toString('utf16le', 0, nt) + } + return et + } + function base64Text(tt, et) { + var nt = (tt.length - et) % 3 + return nt === 0 + ? tt.toString('base64', et) + : ((this.lastNeed = 3 - nt), + (this.lastTotal = 3), + nt === 1 + ? (this.lastChar[0] = tt[tt.length - 1]) + : ((this.lastChar[0] = tt[tt.length - 2]), (this.lastChar[1] = tt[tt.length - 1])), + tt.toString('base64', et, tt.length - nt)) + } + function base64End(tt) { + var et = tt && tt.length ? this.write(tt) : '' + return this.lastNeed ? et + this.lastChar.toString('base64', 0, 3 - this.lastNeed) : et + } + function simpleWrite(tt) { + return tt.toString(this.encoding) + } + function simpleEnd(tt) { + return tt && tt.length ? this.write(tt) : '' + } + var ERR_STREAM_PREMATURE_CLOSE = errorsBrowser.codes.ERR_STREAM_PREMATURE_CLOSE + function once$1(tt) { + var et = !1 + return function () { + if (!et) { + et = !0 + for (var nt = arguments.length, rt = new Array(nt), it = 0; it < nt; it++) rt[it] = arguments[it] + tt.apply(this, rt) + } + } + } + function noop$8() {} + function isRequest$1(tt) { + return tt.setHeader && typeof tt.abort == 'function' + } + function eos$1(tt, et, nt) { + if (typeof et == 'function') return eos$1(tt, null, et) + et || (et = {}), (nt = once$1(nt || noop$8)) + var rt = et.readable || (et.readable !== !1 && tt.readable), + it = et.writable || (et.writable !== !1 && tt.writable), + ot = function () { + tt.writable || st() + }, + at = tt._writableState && tt._writableState.finished, + st = function () { + ;(it = !1), (at = !0), rt || nt.call(tt) + }, + lt = tt._readableState && tt._readableState.endEmitted, + ct = function () { + ;(rt = !1), (lt = !0), it || nt.call(tt) + }, + ut = function (mt) { + nt.call(tt, mt) + }, + ht = function () { + var mt + if (rt && !lt) + return ( + (!tt._readableState || !tt._readableState.ended) && (mt = new ERR_STREAM_PREMATURE_CLOSE()), nt.call(tt, mt) + ) + if (it && !at) + return ( + (!tt._writableState || !tt._writableState.ended) && (mt = new ERR_STREAM_PREMATURE_CLOSE()), nt.call(tt, mt) + ) + }, + dt = function () { + tt.req.on('finish', st) + } + return ( + isRequest$1(tt) + ? (tt.on('complete', st), tt.on('abort', ht), tt.req ? dt() : tt.on('request', dt)) + : it && !tt._writableState && (tt.on('end', ot), tt.on('close', ot)), + tt.on('end', ct), + tt.on('finish', st), + et.error !== !1 && tt.on('error', ut), + tt.on('close', ht), + function () { + tt.removeListener('complete', st), + tt.removeListener('abort', ht), + tt.removeListener('request', dt), + tt.req && tt.req.removeListener('finish', st), + tt.removeListener('end', ot), + tt.removeListener('close', ot), + tt.removeListener('finish', st), + tt.removeListener('end', ct), + tt.removeListener('error', ut), + tt.removeListener('close', ht) + } + ) + } + var endOfStream = eos$1, + async_iterator, + hasRequiredAsync_iterator + function requireAsync_iterator() { + if (hasRequiredAsync_iterator) return async_iterator + hasRequiredAsync_iterator = 1 + var tt + function et(xt, kt, St) { + return ( + (kt = nt(kt)), + kt in xt + ? Object.defineProperty(xt, kt, { value: St, enumerable: !0, configurable: !0, writable: !0 }) + : (xt[kt] = St), + xt + ) + } + function nt(xt) { + var kt = rt(xt, 'string') + return typeof kt == 'symbol' ? kt : String(kt) + } + function rt(xt, kt) { + if (typeof xt != 'object' || xt === null) return xt + var St = xt[Symbol.toPrimitive] + if (St !== void 0) { + var Tt = St.call(xt, kt || 'default') + if (typeof Tt != 'object') return Tt + throw new TypeError('@@toPrimitive must return a primitive value.') + } + return (kt === 'string' ? String : Number)(xt) + } + var it = endOfStream, + ot = Symbol('lastResolve'), + at = Symbol('lastReject'), + st = Symbol('error'), + lt = Symbol('ended'), + ct = Symbol('lastPromise'), + ut = Symbol('handlePromise'), + ht = Symbol('stream') + function dt(xt, kt) { + return { value: xt, done: kt } + } + function pt(xt) { + var kt = xt[ot] + if (kt !== null) { + var St = xt[ht].read() + St !== null && ((xt[ct] = null), (xt[ot] = null), (xt[at] = null), kt(dt(St, !1))) + } + } + function mt(xt) { + process.nextTick(pt, xt) + } + function gt(xt, kt) { + return function (St, Tt) { + xt.then(function () { + if (kt[lt]) { + St(dt(void 0, !0)) + return + } + kt[ut](St, Tt) + }, Tt) + } + } + var yt = Object.getPrototypeOf(function () {}), + bt = Object.setPrototypeOf( + ((tt = { + get stream() { + return this[ht] + }, + next: function () { + var kt = this, + St = this[st] + if (St !== null) return Promise.reject(St) + if (this[lt]) return Promise.resolve(dt(void 0, !0)) + if (this[ht].destroyed) + return new Promise(function ($t, Dt) { + process.nextTick(function () { + kt[st] ? Dt(kt[st]) : $t(dt(void 0, !0)) + }) + }) + var Tt = this[ct], + At + if (Tt) At = new Promise(gt(Tt, this)) + else { + var Et = this[ht].read() + if (Et !== null) return Promise.resolve(dt(Et, !1)) + At = new Promise(this[ut]) + } + return (this[ct] = At), At + }, + }), + et(tt, Symbol.asyncIterator, function () { + return this + }), + et(tt, 'return', function () { + var kt = this + return new Promise(function (St, Tt) { + kt[ht].destroy(null, function (At) { + if (At) { + Tt(At) + return + } + St(dt(void 0, !0)) + }) + }) + }), + tt), + yt, + ), + vt = function (kt) { + var St, + Tt = Object.create( + bt, + ((St = {}), + et(St, ht, { value: kt, writable: !0 }), + et(St, ot, { value: null, writable: !0 }), + et(St, at, { value: null, writable: !0 }), + et(St, st, { value: null, writable: !0 }), + et(St, lt, { value: kt._readableState.endEmitted, writable: !0 }), + et(St, ut, { + value: function (Et, $t) { + var Dt = Tt[ht].read() + Dt + ? ((Tt[ct] = null), (Tt[ot] = null), (Tt[at] = null), Et(dt(Dt, !1))) + : ((Tt[ot] = Et), (Tt[at] = $t)) + }, + writable: !0, + }), + St), + ) + return ( + (Tt[ct] = null), + it(kt, function (At) { + if (At && At.code !== 'ERR_STREAM_PREMATURE_CLOSE') { + var Et = Tt[at] + Et !== null && ((Tt[ct] = null), (Tt[ot] = null), (Tt[at] = null), Et(At)), (Tt[st] = At) + return + } + var $t = Tt[ot] + $t !== null && ((Tt[ct] = null), (Tt[ot] = null), (Tt[at] = null), $t(dt(void 0, !0))), (Tt[lt] = !0) + }), + kt.on('readable', mt.bind(null, Tt)), + Tt + ) + } + return (async_iterator = vt), async_iterator + } + var fromBrowser, hasRequiredFromBrowser + function requireFromBrowser() { + return ( + hasRequiredFromBrowser || + ((hasRequiredFromBrowser = 1), + (fromBrowser = function () { + throw new Error('Readable.from is not available in the browser') + })), + fromBrowser + ) + } + var _stream_readable, hasRequired_stream_readable + function require_stream_readable() { + if (hasRequired_stream_readable) return _stream_readable + ;(hasRequired_stream_readable = 1), (_stream_readable = $t) + var tt + ;($t.ReadableState = Et), eventsExports.EventEmitter + var et = function (Qt, _n) { + return Qt.listeners(_n).length + }, + nt = streamBrowser, + rt = buffer$2.Buffer, + it = + (typeof commonjsGlobal < 'u' ? commonjsGlobal : typeof window < 'u' ? window : typeof self < 'u' ? self : {}) + .Uint8Array || function () {} + function ot(an) { + return rt.from(an) + } + function at(an) { + return rt.isBuffer(an) || an instanceof it + } + var st = require$$0$2, + lt + st && st.debuglog ? (lt = st.debuglog('stream')) : (lt = function () {}) + var ct = requireBuffer_list(), + ut = destroy_1, + ht = state, + dt = ht.getHighWaterMark, + pt = errorsBrowser.codes, + mt = pt.ERR_INVALID_ARG_TYPE, + gt = pt.ERR_STREAM_PUSH_AFTER_EOF, + yt = pt.ERR_METHOD_NOT_IMPLEMENTED, + bt = pt.ERR_STREAM_UNSHIFT_AFTER_END_EVENT, + vt, + xt, + kt + inherits_browserExports($t, nt) + var St = ut.errorOrDestroy, + Tt = ['error', 'close', 'destroy', 'pause', 'resume'] + function At(an, Qt, _n) { + if (typeof an.prependListener == 'function') return an.prependListener(Qt, _n) + !an._events || !an._events[Qt] + ? an.on(Qt, _n) + : Array.isArray(an._events[Qt]) + ? an._events[Qt].unshift(_n) + : (an._events[Qt] = [_n, an._events[Qt]]) + } + function Et(an, Qt, _n) { + ;(tt = tt || require_stream_duplex()), + (an = an || {}), + typeof _n != 'boolean' && (_n = Qt instanceof tt), + (this.objectMode = !!an.objectMode), + _n && (this.objectMode = this.objectMode || !!an.readableObjectMode), + (this.highWaterMark = dt(this, an, 'readableHighWaterMark', _n)), + (this.buffer = new ct()), + (this.length = 0), + (this.pipes = null), + (this.pipesCount = 0), + (this.flowing = null), + (this.ended = !1), + (this.endEmitted = !1), + (this.reading = !1), + (this.sync = !0), + (this.needReadable = !1), + (this.emittedReadable = !1), + (this.readableListening = !1), + (this.resumeScheduled = !1), + (this.paused = !0), + (this.emitClose = an.emitClose !== !1), + (this.autoDestroy = !!an.autoDestroy), + (this.destroyed = !1), + (this.defaultEncoding = an.defaultEncoding || 'utf8'), + (this.awaitDrain = 0), + (this.readingMore = !1), + (this.decoder = null), + (this.encoding = null), + an.encoding && + (vt || (vt = string_decoder.StringDecoder), + (this.decoder = new vt(an.encoding)), + (this.encoding = an.encoding)) + } + function $t(an) { + if (((tt = tt || require_stream_duplex()), !(this instanceof $t))) return new $t(an) + var Qt = this instanceof tt + ;(this._readableState = new Et(an, this, Qt)), + (this.readable = !0), + an && + (typeof an.read == 'function' && (this._read = an.read), + typeof an.destroy == 'function' && (this._destroy = an.destroy)), + nt.call(this) + } + Object.defineProperty($t.prototype, 'destroyed', { + enumerable: !1, + get: function () { + return this._readableState === void 0 ? !1 : this._readableState.destroyed + }, + set: function (Qt) { + this._readableState && (this._readableState.destroyed = Qt) + }, + }), + ($t.prototype.destroy = ut.destroy), + ($t.prototype._undestroy = ut.undestroy), + ($t.prototype._destroy = function (an, Qt) { + Qt(an) + }), + ($t.prototype.push = function (an, Qt) { + var _n = this._readableState, + Pn + return ( + _n.objectMode + ? (Pn = !0) + : typeof an == 'string' && + ((Qt = Qt || _n.defaultEncoding), Qt !== _n.encoding && ((an = rt.from(an, Qt)), (Qt = '')), (Pn = !0)), + Dt(this, an, Qt, !1, Pn) + ) + }), + ($t.prototype.unshift = function (an) { + return Dt(this, an, null, !0, !1) + }) + function Dt(an, Qt, _n, Pn, $n) { + lt('readableAddChunk', Qt) + var Nn = an._readableState + if (Qt === null) (Nn.reading = !1), Ot(an, Nn) + else { + var Tn + if (($n || (Tn = Pt(Nn, Qt)), Tn)) St(an, Tn) + else if (Nn.objectMode || (Qt && Qt.length > 0)) + if ( + (typeof Qt != 'string' && !Nn.objectMode && Object.getPrototypeOf(Qt) !== rt.prototype && (Qt = ot(Qt)), Pn) + ) + Nn.endEmitted ? St(an, new bt()) : jt(an, Nn, Qt, !0) + else if (Nn.ended) St(an, new gt()) + else { + if (Nn.destroyed) return !1 + ;(Nn.reading = !1), + Nn.decoder && !_n + ? ((Qt = Nn.decoder.write(Qt)), Nn.objectMode || Qt.length !== 0 ? jt(an, Nn, Qt, !1) : Ft(an, Nn)) + : jt(an, Nn, Qt, !1) + } + else Pn || ((Nn.reading = !1), Ft(an, Nn)) + } + return !Nn.ended && (Nn.length < Nn.highWaterMark || Nn.length === 0) + } + function jt(an, Qt, _n, Pn) { + Qt.flowing && Qt.length === 0 && !Qt.sync + ? ((Qt.awaitDrain = 0), an.emit('data', _n)) + : ((Qt.length += Qt.objectMode ? 1 : _n.length), + Pn ? Qt.buffer.unshift(_n) : Qt.buffer.push(_n), + Qt.needReadable && Wt(an)), + Ft(an, Qt) + } + function Pt(an, Qt) { + var _n + return ( + !at(Qt) && + typeof Qt != 'string' && + Qt !== void 0 && + !an.objectMode && + (_n = new mt('chunk', ['string', 'Buffer', 'Uint8Array'], Qt)), + _n + ) + } + ;($t.prototype.isPaused = function () { + return this._readableState.flowing === !1 + }), + ($t.prototype.setEncoding = function (an) { + vt || (vt = string_decoder.StringDecoder) + var Qt = new vt(an) + ;(this._readableState.decoder = Qt), (this._readableState.encoding = this._readableState.decoder.encoding) + for (var _n = this._readableState.buffer.head, Pn = ''; _n !== null; ) (Pn += Qt.write(_n.data)), (_n = _n.next) + return ( + this._readableState.buffer.clear(), + Pn !== '' && this._readableState.buffer.push(Pn), + (this._readableState.length = Pn.length), + this + ) + }) + var Ct = 1073741824 + function wt(an) { + return ( + an >= Ct + ? (an = Ct) + : (an--, (an |= an >>> 1), (an |= an >>> 2), (an |= an >>> 4), (an |= an >>> 8), (an |= an >>> 16), an++), + an + ) + } + function It(an, Qt) { + return an <= 0 || (Qt.length === 0 && Qt.ended) + ? 0 + : Qt.objectMode + ? 1 + : an !== an + ? Qt.flowing && Qt.length + ? Qt.buffer.head.data.length + : Qt.length + : (an > Qt.highWaterMark && (Qt.highWaterMark = wt(an)), + an <= Qt.length ? an : Qt.ended ? Qt.length : ((Qt.needReadable = !0), 0)) + } + $t.prototype.read = function (an) { + lt('read', an), (an = parseInt(an, 10)) + var Qt = this._readableState, + _n = an + if ( + (an !== 0 && (Qt.emittedReadable = !1), + an === 0 && + Qt.needReadable && + ((Qt.highWaterMark !== 0 ? Qt.length >= Qt.highWaterMark : Qt.length > 0) || Qt.ended)) + ) + return lt('read: emitReadable', Qt.length, Qt.ended), Qt.length === 0 && Qt.ended ? nn(this) : Wt(this), null + if (((an = It(an, Qt)), an === 0 && Qt.ended)) return Qt.length === 0 && nn(this), null + var Pn = Qt.needReadable + lt('need readable', Pn), + (Qt.length === 0 || Qt.length - an < Qt.highWaterMark) && ((Pn = !0), lt('length less than watermark', Pn)), + Qt.ended || Qt.reading + ? ((Pn = !1), lt('reading or ended', Pn)) + : Pn && + (lt('do read'), + (Qt.reading = !0), + (Qt.sync = !0), + Qt.length === 0 && (Qt.needReadable = !0), + this._read(Qt.highWaterMark), + (Qt.sync = !1), + Qt.reading || (an = It(_n, Qt))) + var $n + return ( + an > 0 ? ($n = rn(an, Qt)) : ($n = null), + $n === null + ? ((Qt.needReadable = Qt.length <= Qt.highWaterMark), (an = 0)) + : ((Qt.length -= an), (Qt.awaitDrain = 0)), + Qt.length === 0 && (Qt.ended || (Qt.needReadable = !0), _n !== an && Qt.ended && nn(this)), + $n !== null && this.emit('data', $n), + $n + ) + } + function Ot(an, Qt) { + if ((lt('onEofChunk'), !Qt.ended)) { + if (Qt.decoder) { + var _n = Qt.decoder.end() + _n && _n.length && (Qt.buffer.push(_n), (Qt.length += Qt.objectMode ? 1 : _n.length)) + } + ;(Qt.ended = !0), + Qt.sync ? Wt(an) : ((Qt.needReadable = !1), Qt.emittedReadable || ((Qt.emittedReadable = !0), zt(an))) + } + } + function Wt(an) { + var Qt = an._readableState + lt('emitReadable', Qt.needReadable, Qt.emittedReadable), + (Qt.needReadable = !1), + Qt.emittedReadable || (lt('emitReadable', Qt.flowing), (Qt.emittedReadable = !0), process.nextTick(zt, an)) + } + function zt(an) { + var Qt = an._readableState + lt('emitReadable_', Qt.destroyed, Qt.length, Qt.ended), + !Qt.destroyed && (Qt.length || Qt.ended) && (an.emit('readable'), (Qt.emittedReadable = !1)), + (Qt.needReadable = !Qt.flowing && !Qt.ended && Qt.length <= Qt.highWaterMark), + Kt(an) + } + function Ft(an, Qt) { + Qt.readingMore || ((Qt.readingMore = !0), process.nextTick(Nt, an, Qt)) + } + function Nt(an, Qt) { + for (; !Qt.reading && !Qt.ended && (Qt.length < Qt.highWaterMark || (Qt.flowing && Qt.length === 0)); ) { + var _n = Qt.length + if ((lt('maybeReadMore read 0'), an.read(0), _n === Qt.length)) break + } + Qt.readingMore = !1 + } + ;($t.prototype._read = function (an) { + St(this, new yt('_read()')) + }), + ($t.prototype.pipe = function (an, Qt) { + var _n = this, + Pn = this._readableState + switch (Pn.pipesCount) { + case 0: + Pn.pipes = an + break + case 1: + Pn.pipes = [Pn.pipes, an] + break + default: + Pn.pipes.push(an) + break + } + ;(Pn.pipesCount += 1), lt('pipe count=%d opts=%j', Pn.pipesCount, Qt) + var $n = (!Qt || Qt.end !== !1) && an !== process.stdout && an !== process.stderr, + Nn = $n ? cn : Dn + Pn.endEmitted ? process.nextTick(Nn) : _n.once('end', Nn), an.on('unpipe', Tn) + function Tn(un, Zt) { + lt('onunpipe'), un === _n && Zt && Zt.hasUnpiped === !1 && ((Zt.hasUnpiped = !0), An()) + } + function cn() { + lt('onend'), an.end() + } + var mn = Ut(_n) + an.on('drain', mn) + var In = !1 + function An() { + lt('cleanup'), + an.removeListener('close', pn), + an.removeListener('finish', kn), + an.removeListener('drain', mn), + an.removeListener('error', fn), + an.removeListener('unpipe', Tn), + _n.removeListener('end', cn), + _n.removeListener('end', Dn), + _n.removeListener('data', wn), + (In = !0), + Pn.awaitDrain && (!an._writableState || an._writableState.needDrain) && mn() + } + _n.on('data', wn) + function wn(un) { + lt('ondata') + var Zt = an.write(un) + lt('dest.write', Zt), + Zt === !1 && + (((Pn.pipesCount === 1 && Pn.pipes === an) || (Pn.pipesCount > 1 && vn(Pn.pipes, an) !== -1)) && + !In && + (lt('false write response, pause', Pn.awaitDrain), Pn.awaitDrain++), + _n.pause()) + } + function fn(un) { + lt('onerror', un), Dn(), an.removeListener('error', fn), et(an, 'error') === 0 && St(an, un) + } + At(an, 'error', fn) + function pn() { + an.removeListener('finish', kn), Dn() + } + an.once('close', pn) + function kn() { + lt('onfinish'), an.removeListener('close', pn), Dn() + } + an.once('finish', kn) + function Dn() { + lt('unpipe'), _n.unpipe(an) + } + return an.emit('pipe', _n), Pn.flowing || (lt('pipe resume'), _n.resume()), an + }) + function Ut(an) { + return function () { + var _n = an._readableState + lt('pipeOnDrain', _n.awaitDrain), + _n.awaitDrain && _n.awaitDrain--, + _n.awaitDrain === 0 && et(an, 'data') && ((_n.flowing = !0), Kt(an)) + } + } + ;($t.prototype.unpipe = function (an) { + var Qt = this._readableState, + _n = { hasUnpiped: !1 } + if (Qt.pipesCount === 0) return this + if (Qt.pipesCount === 1) + return an && an !== Qt.pipes + ? this + : (an || (an = Qt.pipes), + (Qt.pipes = null), + (Qt.pipesCount = 0), + (Qt.flowing = !1), + an && an.emit('unpipe', this, _n), + this) + if (!an) { + var Pn = Qt.pipes, + $n = Qt.pipesCount + ;(Qt.pipes = null), (Qt.pipesCount = 0), (Qt.flowing = !1) + for (var Nn = 0; Nn < $n; Nn++) Pn[Nn].emit('unpipe', this, { hasUnpiped: !1 }) + return this + } + var Tn = vn(Qt.pipes, an) + return Tn === -1 + ? this + : (Qt.pipes.splice(Tn, 1), + (Qt.pipesCount -= 1), + Qt.pipesCount === 1 && (Qt.pipes = Qt.pipes[0]), + an.emit('unpipe', this, _n), + this) + }), + ($t.prototype.on = function (an, Qt) { + var _n = nt.prototype.on.call(this, an, Qt), + Pn = this._readableState + return ( + an === 'data' + ? ((Pn.readableListening = this.listenerCount('readable') > 0), Pn.flowing !== !1 && this.resume()) + : an === 'readable' && + !Pn.endEmitted && + !Pn.readableListening && + ((Pn.readableListening = Pn.needReadable = !0), + (Pn.flowing = !1), + (Pn.emittedReadable = !1), + lt('on readable', Pn.length, Pn.reading), + Pn.length ? Wt(this) : Pn.reading || process.nextTick(Ht, this)), + _n + ) + }), + ($t.prototype.addListener = $t.prototype.on), + ($t.prototype.removeListener = function (an, Qt) { + var _n = nt.prototype.removeListener.call(this, an, Qt) + return an === 'readable' && process.nextTick(Mt, this), _n + }), + ($t.prototype.removeAllListeners = function (an) { + var Qt = nt.prototype.removeAllListeners.apply(this, arguments) + return (an === 'readable' || an === void 0) && process.nextTick(Mt, this), Qt + }) + function Mt(an) { + var Qt = an._readableState + ;(Qt.readableListening = an.listenerCount('readable') > 0), + Qt.resumeScheduled && !Qt.paused ? (Qt.flowing = !0) : an.listenerCount('data') > 0 && an.resume() + } + function Ht(an) { + lt('readable nexttick read 0'), an.read(0) + } + $t.prototype.resume = function () { + var an = this._readableState + return an.flowing || (lt('resume'), (an.flowing = !an.readableListening), en(this, an)), (an.paused = !1), this + } + function en(an, Qt) { + Qt.resumeScheduled || ((Qt.resumeScheduled = !0), process.nextTick(sn, an, Qt)) + } + function sn(an, Qt) { + lt('resume', Qt.reading), + Qt.reading || an.read(0), + (Qt.resumeScheduled = !1), + an.emit('resume'), + Kt(an), + Qt.flowing && !Qt.reading && an.read(0) + } + $t.prototype.pause = function () { + return ( + lt('call pause flowing=%j', this._readableState.flowing), + this._readableState.flowing !== !1 && (lt('pause'), (this._readableState.flowing = !1), this.emit('pause')), + (this._readableState.paused = !0), + this + ) + } + function Kt(an) { + var Qt = an._readableState + for (lt('flow', Qt.flowing); Qt.flowing && an.read() !== null; ); + } + ;($t.prototype.wrap = function (an) { + var Qt = this, + _n = this._readableState, + Pn = !1 + an.on('end', function () { + if ((lt('wrapped end'), _n.decoder && !_n.ended)) { + var Tn = _n.decoder.end() + Tn && Tn.length && Qt.push(Tn) + } + Qt.push(null) + }), + an.on('data', function (Tn) { + if ( + (lt('wrapped data'), + _n.decoder && (Tn = _n.decoder.write(Tn)), + !(_n.objectMode && Tn == null) && !(!_n.objectMode && (!Tn || !Tn.length))) + ) { + var cn = Qt.push(Tn) + cn || ((Pn = !0), an.pause()) + } + }) + for (var $n in an) + this[$n] === void 0 && + typeof an[$n] == 'function' && + (this[$n] = (function (cn) { + return function () { + return an[cn].apply(an, arguments) + } + })($n)) + for (var Nn = 0; Nn < Tt.length; Nn++) an.on(Tt[Nn], this.emit.bind(this, Tt[Nn])) + return ( + (this._read = function (Tn) { + lt('wrapped _read', Tn), Pn && ((Pn = !1), an.resume()) + }), + this + ) + }), + typeof Symbol == 'function' && + ($t.prototype[Symbol.asyncIterator] = function () { + return xt === void 0 && (xt = requireAsync_iterator()), xt(this) + }), + Object.defineProperty($t.prototype, 'readableHighWaterMark', { + enumerable: !1, + get: function () { + return this._readableState.highWaterMark + }, + }), + Object.defineProperty($t.prototype, 'readableBuffer', { + enumerable: !1, + get: function () { + return this._readableState && this._readableState.buffer + }, + }), + Object.defineProperty($t.prototype, 'readableFlowing', { + enumerable: !1, + get: function () { + return this._readableState.flowing + }, + set: function (Qt) { + this._readableState && (this._readableState.flowing = Qt) + }, + }), + ($t._fromList = rn), + Object.defineProperty($t.prototype, 'readableLength', { + enumerable: !1, + get: function () { + return this._readableState.length + }, + }) + function rn(an, Qt) { + if (Qt.length === 0) return null + var _n + return ( + Qt.objectMode + ? (_n = Qt.buffer.shift()) + : !an || an >= Qt.length + ? (Qt.decoder + ? (_n = Qt.buffer.join('')) + : Qt.buffer.length === 1 + ? (_n = Qt.buffer.first()) + : (_n = Qt.buffer.concat(Qt.length)), + Qt.buffer.clear()) + : (_n = Qt.buffer.consume(an, Qt.decoder)), + _n + ) + } + function nn(an) { + var Qt = an._readableState + lt('endReadable', Qt.endEmitted), Qt.endEmitted || ((Qt.ended = !0), process.nextTick(hn, Qt, an)) + } + function hn(an, Qt) { + if ( + (lt('endReadableNT', an.endEmitted, an.length), + !an.endEmitted && an.length === 0 && ((an.endEmitted = !0), (Qt.readable = !1), Qt.emit('end'), an.autoDestroy)) + ) { + var _n = Qt._writableState + ;(!_n || (_n.autoDestroy && _n.finished)) && Qt.destroy() + } + } + typeof Symbol == 'function' && + ($t.from = function (an, Qt) { + return kt === void 0 && (kt = requireFromBrowser()), kt($t, an, Qt) + }) + function vn(an, Qt) { + for (var _n = 0, Pn = an.length; _n < Pn; _n++) if (an[_n] === Qt) return _n + return -1 + } + return _stream_readable + } + var _stream_transform = Transform$8, + _require$codes$1 = errorsBrowser.codes, + ERR_METHOD_NOT_IMPLEMENTED = _require$codes$1.ERR_METHOD_NOT_IMPLEMENTED, + ERR_MULTIPLE_CALLBACK = _require$codes$1.ERR_MULTIPLE_CALLBACK, + ERR_TRANSFORM_ALREADY_TRANSFORMING = _require$codes$1.ERR_TRANSFORM_ALREADY_TRANSFORMING, + ERR_TRANSFORM_WITH_LENGTH_0 = _require$codes$1.ERR_TRANSFORM_WITH_LENGTH_0, + Duplex = require_stream_duplex() + inherits_browserExports(Transform$8, Duplex) + function afterTransform(tt, et) { + var nt = this._transformState + nt.transforming = !1 + var rt = nt.writecb + if (rt === null) return this.emit('error', new ERR_MULTIPLE_CALLBACK()) + ;(nt.writechunk = null), (nt.writecb = null), et != null && this.push(et), rt(tt) + var it = this._readableState + ;(it.reading = !1), (it.needReadable || it.length < it.highWaterMark) && this._read(it.highWaterMark) + } + function Transform$8(tt) { + if (!(this instanceof Transform$8)) return new Transform$8(tt) + Duplex.call(this, tt), + (this._transformState = { + afterTransform: afterTransform.bind(this), + needTransform: !1, + transforming: !1, + writecb: null, + writechunk: null, + writeencoding: null, + }), + (this._readableState.needReadable = !0), + (this._readableState.sync = !1), + tt && + (typeof tt.transform == 'function' && (this._transform = tt.transform), + typeof tt.flush == 'function' && (this._flush = tt.flush)), + this.on('prefinish', prefinish) + } + function prefinish() { + var tt = this + typeof this._flush == 'function' && !this._readableState.destroyed + ? this._flush(function (et, nt) { + done(tt, et, nt) + }) + : done(this, null, null) + } + Transform$8.prototype.push = function (tt, et) { + return (this._transformState.needTransform = !1), Duplex.prototype.push.call(this, tt, et) + } + Transform$8.prototype._transform = function (tt, et, nt) { + nt(new ERR_METHOD_NOT_IMPLEMENTED('_transform()')) + } + Transform$8.prototype._write = function (tt, et, nt) { + var rt = this._transformState + if (((rt.writecb = nt), (rt.writechunk = tt), (rt.writeencoding = et), !rt.transforming)) { + var it = this._readableState + ;(rt.needTransform || it.needReadable || it.length < it.highWaterMark) && this._read(it.highWaterMark) + } + } + Transform$8.prototype._read = function (tt) { + var et = this._transformState + et.writechunk !== null && !et.transforming + ? ((et.transforming = !0), this._transform(et.writechunk, et.writeencoding, et.afterTransform)) + : (et.needTransform = !0) + } + Transform$8.prototype._destroy = function (tt, et) { + Duplex.prototype._destroy.call(this, tt, function (nt) { + et(nt) + }) + } + function done(tt, et, nt) { + if (et) return tt.emit('error', et) + if ((nt != null && tt.push(nt), tt._writableState.length)) throw new ERR_TRANSFORM_WITH_LENGTH_0() + if (tt._transformState.transforming) throw new ERR_TRANSFORM_ALREADY_TRANSFORMING() + return tt.push(null) + } + var _stream_passthrough = PassThrough, + Transform$7 = _stream_transform + inherits_browserExports(PassThrough, Transform$7) + function PassThrough(tt) { + if (!(this instanceof PassThrough)) return new PassThrough(tt) + Transform$7.call(this, tt) + } + PassThrough.prototype._transform = function (tt, et, nt) { + nt(null, tt) + } + var eos + function once(tt) { + var et = !1 + return function () { + et || ((et = !0), tt.apply(void 0, arguments)) + } + } + var _require$codes = errorsBrowser.codes, + ERR_MISSING_ARGS = _require$codes.ERR_MISSING_ARGS, + ERR_STREAM_DESTROYED = _require$codes.ERR_STREAM_DESTROYED + function noop$7(tt) { + if (tt) throw tt + } + function isRequest(tt) { + return tt.setHeader && typeof tt.abort == 'function' + } + function destroyer(tt, et, nt, rt) { + rt = once(rt) + var it = !1 + tt.on('close', function () { + it = !0 + }), + eos === void 0 && (eos = endOfStream), + eos(tt, { readable: et, writable: nt }, function (at) { + if (at) return rt(at) + ;(it = !0), rt() + }) + var ot = !1 + return function (at) { + if (!it && !ot) { + if (((ot = !0), isRequest(tt))) return tt.abort() + if (typeof tt.destroy == 'function') return tt.destroy() + rt(at || new ERR_STREAM_DESTROYED('pipe')) + } + } + } + function call(tt) { + tt() + } + function pipe$1(tt, et) { + return tt.pipe(et) + } + function popCallback(tt) { + return !tt.length || typeof tt[tt.length - 1] != 'function' ? noop$7 : tt.pop() + } + function pipeline() { + for (var tt = arguments.length, et = new Array(tt), nt = 0; nt < tt; nt++) et[nt] = arguments[nt] + var rt = popCallback(et) + if ((Array.isArray(et[0]) && (et = et[0]), et.length < 2)) throw new ERR_MISSING_ARGS('streams') + var it, + ot = et.map(function (at, st) { + var lt = st < et.length - 1, + ct = st > 0 + return destroyer(at, lt, ct, function (ut) { + it || (it = ut), ut && ot.forEach(call), !lt && (ot.forEach(call), rt(it)) + }) + }) + return et.reduce(pipe$1) + } + var pipeline_1 = pipeline + ;(function (tt, et) { + ;(et = tt.exports = require_stream_readable()), + (et.Stream = et), + (et.Readable = et), + (et.Writable = require_stream_writable()), + (et.Duplex = require_stream_duplex()), + (et.Transform = _stream_transform), + (et.PassThrough = _stream_passthrough), + (et.finished = endOfStream), + (et.pipeline = pipeline_1) + })(readableBrowser, readableBrowser.exports) + var readableBrowserExports = readableBrowser.exports, + Buffer$F = safeBufferExports.Buffer, + Transform$6 = readableBrowserExports.Transform, + inherits$v = inherits_browserExports + function throwIfNotStringOrBuffer(tt, et) { + if (!Buffer$F.isBuffer(tt) && typeof tt != 'string') throw new TypeError(et + ' must be a string or a buffer') + } + function HashBase$2(tt) { + Transform$6.call(this), + (this._block = Buffer$F.allocUnsafe(tt)), + (this._blockSize = tt), + (this._blockOffset = 0), + (this._length = [0, 0, 0, 0]), + (this._finalized = !1) + } + inherits$v(HashBase$2, Transform$6) + HashBase$2.prototype._transform = function (tt, et, nt) { + var rt = null + try { + this.update(tt, et) + } catch (it) { + rt = it + } + nt(rt) + } + HashBase$2.prototype._flush = function (tt) { + var et = null + try { + this.push(this.digest()) + } catch (nt) { + et = nt + } + tt(et) + } + HashBase$2.prototype.update = function (tt, et) { + if ((throwIfNotStringOrBuffer(tt, 'Data'), this._finalized)) throw new Error('Digest already called') + Buffer$F.isBuffer(tt) || (tt = Buffer$F.from(tt, et)) + for (var nt = this._block, rt = 0; this._blockOffset + tt.length - rt >= this._blockSize; ) { + for (var it = this._blockOffset; it < this._blockSize; ) nt[it++] = tt[rt++] + this._update(), (this._blockOffset = 0) + } + for (; rt < tt.length; ) nt[this._blockOffset++] = tt[rt++] + for (var ot = 0, at = tt.length * 8; at > 0; ++ot) + (this._length[ot] += at), + (at = (this._length[ot] / 4294967296) | 0), + at > 0 && (this._length[ot] -= 4294967296 * at) + return this + } + HashBase$2.prototype._update = function () { + throw new Error('_update is not implemented') + } + HashBase$2.prototype.digest = function (tt) { + if (this._finalized) throw new Error('Digest already called') + this._finalized = !0 + var et = this._digest() + tt !== void 0 && (et = et.toString(tt)), this._block.fill(0), (this._blockOffset = 0) + for (var nt = 0; nt < 4; ++nt) this._length[nt] = 0 + return et + } + HashBase$2.prototype._digest = function () { + throw new Error('_digest is not implemented') + } + var hashBase = HashBase$2, + inherits$u = inherits_browserExports, + HashBase$1 = hashBase, + Buffer$E = safeBufferExports.Buffer, + ARRAY16$1 = new Array(16) + function MD5$3() { + HashBase$1.call(this, 64), + (this._a = 1732584193), + (this._b = 4023233417), + (this._c = 2562383102), + (this._d = 271733878) + } + inherits$u(MD5$3, HashBase$1) + MD5$3.prototype._update = function () { + for (var tt = ARRAY16$1, et = 0; et < 16; ++et) tt[et] = this._block.readInt32LE(et * 4) + var nt = this._a, + rt = this._b, + it = this._c, + ot = this._d + ;(nt = fnF(nt, rt, it, ot, tt[0], 3614090360, 7)), + (ot = fnF(ot, nt, rt, it, tt[1], 3905402710, 12)), + (it = fnF(it, ot, nt, rt, tt[2], 606105819, 17)), + (rt = fnF(rt, it, ot, nt, tt[3], 3250441966, 22)), + (nt = fnF(nt, rt, it, ot, tt[4], 4118548399, 7)), + (ot = fnF(ot, nt, rt, it, tt[5], 1200080426, 12)), + (it = fnF(it, ot, nt, rt, tt[6], 2821735955, 17)), + (rt = fnF(rt, it, ot, nt, tt[7], 4249261313, 22)), + (nt = fnF(nt, rt, it, ot, tt[8], 1770035416, 7)), + (ot = fnF(ot, nt, rt, it, tt[9], 2336552879, 12)), + (it = fnF(it, ot, nt, rt, tt[10], 4294925233, 17)), + (rt = fnF(rt, it, ot, nt, tt[11], 2304563134, 22)), + (nt = fnF(nt, rt, it, ot, tt[12], 1804603682, 7)), + (ot = fnF(ot, nt, rt, it, tt[13], 4254626195, 12)), + (it = fnF(it, ot, nt, rt, tt[14], 2792965006, 17)), + (rt = fnF(rt, it, ot, nt, tt[15], 1236535329, 22)), + (nt = fnG(nt, rt, it, ot, tt[1], 4129170786, 5)), + (ot = fnG(ot, nt, rt, it, tt[6], 3225465664, 9)), + (it = fnG(it, ot, nt, rt, tt[11], 643717713, 14)), + (rt = fnG(rt, it, ot, nt, tt[0], 3921069994, 20)), + (nt = fnG(nt, rt, it, ot, tt[5], 3593408605, 5)), + (ot = fnG(ot, nt, rt, it, tt[10], 38016083, 9)), + (it = fnG(it, ot, nt, rt, tt[15], 3634488961, 14)), + (rt = fnG(rt, it, ot, nt, tt[4], 3889429448, 20)), + (nt = fnG(nt, rt, it, ot, tt[9], 568446438, 5)), + (ot = fnG(ot, nt, rt, it, tt[14], 3275163606, 9)), + (it = fnG(it, ot, nt, rt, tt[3], 4107603335, 14)), + (rt = fnG(rt, it, ot, nt, tt[8], 1163531501, 20)), + (nt = fnG(nt, rt, it, ot, tt[13], 2850285829, 5)), + (ot = fnG(ot, nt, rt, it, tt[2], 4243563512, 9)), + (it = fnG(it, ot, nt, rt, tt[7], 1735328473, 14)), + (rt = fnG(rt, it, ot, nt, tt[12], 2368359562, 20)), + (nt = fnH(nt, rt, it, ot, tt[5], 4294588738, 4)), + (ot = fnH(ot, nt, rt, it, tt[8], 2272392833, 11)), + (it = fnH(it, ot, nt, rt, tt[11], 1839030562, 16)), + (rt = fnH(rt, it, ot, nt, tt[14], 4259657740, 23)), + (nt = fnH(nt, rt, it, ot, tt[1], 2763975236, 4)), + (ot = fnH(ot, nt, rt, it, tt[4], 1272893353, 11)), + (it = fnH(it, ot, nt, rt, tt[7], 4139469664, 16)), + (rt = fnH(rt, it, ot, nt, tt[10], 3200236656, 23)), + (nt = fnH(nt, rt, it, ot, tt[13], 681279174, 4)), + (ot = fnH(ot, nt, rt, it, tt[0], 3936430074, 11)), + (it = fnH(it, ot, nt, rt, tt[3], 3572445317, 16)), + (rt = fnH(rt, it, ot, nt, tt[6], 76029189, 23)), + (nt = fnH(nt, rt, it, ot, tt[9], 3654602809, 4)), + (ot = fnH(ot, nt, rt, it, tt[12], 3873151461, 11)), + (it = fnH(it, ot, nt, rt, tt[15], 530742520, 16)), + (rt = fnH(rt, it, ot, nt, tt[2], 3299628645, 23)), + (nt = fnI(nt, rt, it, ot, tt[0], 4096336452, 6)), + (ot = fnI(ot, nt, rt, it, tt[7], 1126891415, 10)), + (it = fnI(it, ot, nt, rt, tt[14], 2878612391, 15)), + (rt = fnI(rt, it, ot, nt, tt[5], 4237533241, 21)), + (nt = fnI(nt, rt, it, ot, tt[12], 1700485571, 6)), + (ot = fnI(ot, nt, rt, it, tt[3], 2399980690, 10)), + (it = fnI(it, ot, nt, rt, tt[10], 4293915773, 15)), + (rt = fnI(rt, it, ot, nt, tt[1], 2240044497, 21)), + (nt = fnI(nt, rt, it, ot, tt[8], 1873313359, 6)), + (ot = fnI(ot, nt, rt, it, tt[15], 4264355552, 10)), + (it = fnI(it, ot, nt, rt, tt[6], 2734768916, 15)), + (rt = fnI(rt, it, ot, nt, tt[13], 1309151649, 21)), + (nt = fnI(nt, rt, it, ot, tt[4], 4149444226, 6)), + (ot = fnI(ot, nt, rt, it, tt[11], 3174756917, 10)), + (it = fnI(it, ot, nt, rt, tt[2], 718787259, 15)), + (rt = fnI(rt, it, ot, nt, tt[9], 3951481745, 21)), + (this._a = (this._a + nt) | 0), + (this._b = (this._b + rt) | 0), + (this._c = (this._c + it) | 0), + (this._d = (this._d + ot) | 0) + } + MD5$3.prototype._digest = function () { + ;(this._block[this._blockOffset++] = 128), + this._blockOffset > 56 && (this._block.fill(0, this._blockOffset, 64), this._update(), (this._blockOffset = 0)), + this._block.fill(0, this._blockOffset, 56), + this._block.writeUInt32LE(this._length[0], 56), + this._block.writeUInt32LE(this._length[1], 60), + this._update() + var tt = Buffer$E.allocUnsafe(16) + return ( + tt.writeInt32LE(this._a, 0), + tt.writeInt32LE(this._b, 4), + tt.writeInt32LE(this._c, 8), + tt.writeInt32LE(this._d, 12), + tt + ) + } + function rotl$3(tt, et) { + return (tt << et) | (tt >>> (32 - et)) + } + function fnF(tt, et, nt, rt, it, ot, at) { + return (rotl$3((tt + ((et & nt) | (~et & rt)) + it + ot) | 0, at) + et) | 0 + } + function fnG(tt, et, nt, rt, it, ot, at) { + return (rotl$3((tt + ((et & rt) | (nt & ~rt)) + it + ot) | 0, at) + et) | 0 + } + function fnH(tt, et, nt, rt, it, ot, at) { + return (rotl$3((tt + (et ^ nt ^ rt) + it + ot) | 0, at) + et) | 0 + } + function fnI(tt, et, nt, rt, it, ot, at) { + return (rotl$3((tt + (nt ^ (et | ~rt)) + it + ot) | 0, at) + et) | 0 + } + var md5_js = MD5$3, + Buffer$D = buffer$2.Buffer, + inherits$t = inherits_browserExports, + HashBase = hashBase, + ARRAY16 = new Array(16), + zl = [ + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 7, 4, 13, 1, 10, 6, 15, 3, 12, 0, 9, 5, 2, 14, 11, 8, 3, 10, + 14, 4, 9, 15, 8, 1, 2, 7, 0, 6, 13, 11, 5, 12, 1, 9, 11, 10, 0, 8, 12, 4, 13, 3, 7, 15, 14, 5, 6, 2, 4, 0, 5, 9, + 7, 12, 2, 10, 14, 1, 3, 8, 11, 6, 15, 13, + ], + zr = [ + 5, 14, 7, 0, 9, 2, 11, 4, 13, 6, 15, 8, 1, 10, 3, 12, 6, 11, 3, 7, 0, 13, 5, 10, 14, 15, 8, 12, 4, 9, 1, 2, 15, 5, + 1, 3, 7, 14, 6, 9, 11, 8, 12, 2, 10, 0, 4, 13, 8, 6, 4, 1, 3, 11, 15, 0, 5, 12, 2, 13, 9, 7, 10, 14, 12, 15, 10, + 4, 1, 5, 8, 7, 6, 2, 13, 14, 0, 3, 9, 11, + ], + sl = [ + 11, 14, 15, 12, 5, 8, 7, 9, 11, 13, 14, 15, 6, 7, 9, 8, 7, 6, 8, 13, 11, 9, 7, 15, 7, 12, 15, 9, 11, 7, 13, 12, + 11, 13, 6, 7, 14, 9, 13, 15, 14, 8, 13, 6, 5, 12, 7, 5, 11, 12, 14, 15, 14, 15, 9, 8, 9, 14, 5, 6, 8, 6, 5, 12, 9, + 15, 5, 11, 6, 8, 13, 12, 5, 12, 13, 14, 11, 8, 5, 6, + ], + sr = [ + 8, 9, 9, 11, 13, 15, 15, 5, 7, 7, 8, 11, 14, 14, 12, 6, 9, 13, 15, 7, 12, 8, 9, 11, 7, 7, 12, 7, 6, 15, 13, 11, 9, + 7, 15, 11, 8, 6, 6, 14, 12, 13, 5, 14, 13, 13, 7, 5, 15, 5, 8, 11, 14, 14, 6, 14, 6, 9, 12, 9, 12, 5, 15, 8, 8, 5, + 12, 9, 12, 5, 14, 6, 8, 13, 6, 5, 15, 13, 11, 11, + ], + hl = [0, 1518500249, 1859775393, 2400959708, 2840853838], + hr = [1352829926, 1548603684, 1836072691, 2053994217, 0] + function RIPEMD160$5() { + HashBase.call(this, 64), + (this._a = 1732584193), + (this._b = 4023233417), + (this._c = 2562383102), + (this._d = 271733878), + (this._e = 3285377520) + } + inherits$t(RIPEMD160$5, HashBase) + RIPEMD160$5.prototype._update = function () { + for (var tt = ARRAY16, et = 0; et < 16; ++et) tt[et] = this._block.readInt32LE(et * 4) + for ( + var nt = this._a | 0, + rt = this._b | 0, + it = this._c | 0, + ot = this._d | 0, + at = this._e | 0, + st = this._a | 0, + lt = this._b | 0, + ct = this._c | 0, + ut = this._d | 0, + ht = this._e | 0, + dt = 0; + dt < 80; + dt += 1 + ) { + var pt, mt + dt < 16 + ? ((pt = fn1(nt, rt, it, ot, at, tt[zl[dt]], hl[0], sl[dt])), + (mt = fn5(st, lt, ct, ut, ht, tt[zr[dt]], hr[0], sr[dt]))) + : dt < 32 + ? ((pt = fn2(nt, rt, it, ot, at, tt[zl[dt]], hl[1], sl[dt])), + (mt = fn4(st, lt, ct, ut, ht, tt[zr[dt]], hr[1], sr[dt]))) + : dt < 48 + ? ((pt = fn3(nt, rt, it, ot, at, tt[zl[dt]], hl[2], sl[dt])), + (mt = fn3(st, lt, ct, ut, ht, tt[zr[dt]], hr[2], sr[dt]))) + : dt < 64 + ? ((pt = fn4(nt, rt, it, ot, at, tt[zl[dt]], hl[3], sl[dt])), + (mt = fn2(st, lt, ct, ut, ht, tt[zr[dt]], hr[3], sr[dt]))) + : ((pt = fn5(nt, rt, it, ot, at, tt[zl[dt]], hl[4], sl[dt])), + (mt = fn1(st, lt, ct, ut, ht, tt[zr[dt]], hr[4], sr[dt]))), + (nt = at), + (at = ot), + (ot = rotl$2(it, 10)), + (it = rt), + (rt = pt), + (st = ht), + (ht = ut), + (ut = rotl$2(ct, 10)), + (ct = lt), + (lt = mt) + } + var gt = (this._b + it + ut) | 0 + ;(this._b = (this._c + ot + ht) | 0), + (this._c = (this._d + at + st) | 0), + (this._d = (this._e + nt + lt) | 0), + (this._e = (this._a + rt + ct) | 0), + (this._a = gt) + } + RIPEMD160$5.prototype._digest = function () { + ;(this._block[this._blockOffset++] = 128), + this._blockOffset > 56 && (this._block.fill(0, this._blockOffset, 64), this._update(), (this._blockOffset = 0)), + this._block.fill(0, this._blockOffset, 56), + this._block.writeUInt32LE(this._length[0], 56), + this._block.writeUInt32LE(this._length[1], 60), + this._update() + var tt = Buffer$D.alloc ? Buffer$D.alloc(20) : new Buffer$D(20) + return ( + tt.writeInt32LE(this._a, 0), + tt.writeInt32LE(this._b, 4), + tt.writeInt32LE(this._c, 8), + tt.writeInt32LE(this._d, 12), + tt.writeInt32LE(this._e, 16), + tt + ) + } + function rotl$2(tt, et) { + return (tt << et) | (tt >>> (32 - et)) + } + function fn1(tt, et, nt, rt, it, ot, at, st) { + return (rotl$2((tt + (et ^ nt ^ rt) + ot + at) | 0, st) + it) | 0 + } + function fn2(tt, et, nt, rt, it, ot, at, st) { + return (rotl$2((tt + ((et & nt) | (~et & rt)) + ot + at) | 0, st) + it) | 0 + } + function fn3(tt, et, nt, rt, it, ot, at, st) { + return (rotl$2((tt + ((et | ~nt) ^ rt) + ot + at) | 0, st) + it) | 0 + } + function fn4(tt, et, nt, rt, it, ot, at, st) { + return (rotl$2((tt + ((et & rt) | (nt & ~rt)) + ot + at) | 0, st) + it) | 0 + } + function fn5(tt, et, nt, rt, it, ot, at, st) { + return (rotl$2((tt + (et ^ (nt | ~rt)) + ot + at) | 0, st) + it) | 0 + } + var ripemd160$1 = RIPEMD160$5, + sha_js = { exports: {} }, + Buffer$C = safeBufferExports.Buffer + function Hash$9(tt, et) { + ;(this._block = Buffer$C.alloc(tt)), (this._finalSize = et), (this._blockSize = tt), (this._len = 0) + } + Hash$9.prototype.update = function (tt, et) { + typeof tt == 'string' && ((et = et || 'utf8'), (tt = Buffer$C.from(tt, et))) + for (var nt = this._block, rt = this._blockSize, it = tt.length, ot = this._len, at = 0; at < it; ) { + for (var st = ot % rt, lt = Math.min(it - at, rt - st), ct = 0; ct < lt; ct++) nt[st + ct] = tt[at + ct] + ;(ot += lt), (at += lt), ot % rt === 0 && this._update(nt) + } + return (this._len += it), this + } + Hash$9.prototype.digest = function (tt) { + var et = this._len % this._blockSize + ;(this._block[et] = 128), + this._block.fill(0, et + 1), + et >= this._finalSize && (this._update(this._block), this._block.fill(0)) + var nt = this._len * 8 + if (nt <= 4294967295) this._block.writeUInt32BE(nt, this._blockSize - 4) + else { + var rt = (nt & 4294967295) >>> 0, + it = (nt - rt) / 4294967296 + this._block.writeUInt32BE(it, this._blockSize - 8), this._block.writeUInt32BE(rt, this._blockSize - 4) + } + this._update(this._block) + var ot = this._hash() + return tt ? ot.toString(tt) : ot + } + Hash$9.prototype._update = function () { + throw new Error('_update must be implemented by subclass') + } + var hash$4 = Hash$9, + inherits$s = inherits_browserExports, + Hash$8 = hash$4, + Buffer$B = safeBufferExports.Buffer, + K$4 = [1518500249, 1859775393, -1894007588, -899497514], + W$5 = new Array(80) + function Sha() { + this.init(), (this._w = W$5), Hash$8.call(this, 64, 56) + } + inherits$s(Sha, Hash$8) + Sha.prototype.init = function () { + return ( + (this._a = 1732584193), + (this._b = 4023233417), + (this._c = 2562383102), + (this._d = 271733878), + (this._e = 3285377520), + this + ) + } + function rotl5$1(tt) { + return (tt << 5) | (tt >>> 27) + } + function rotl30$1(tt) { + return (tt << 30) | (tt >>> 2) + } + function ft$1(tt, et, nt, rt) { + return tt === 0 ? (et & nt) | (~et & rt) : tt === 2 ? (et & nt) | (et & rt) | (nt & rt) : et ^ nt ^ rt + } + Sha.prototype._update = function (tt) { + for ( + var et = this._w, + nt = this._a | 0, + rt = this._b | 0, + it = this._c | 0, + ot = this._d | 0, + at = this._e | 0, + st = 0; + st < 16; + ++st + ) + et[st] = tt.readInt32BE(st * 4) + for (; st < 80; ++st) et[st] = et[st - 3] ^ et[st - 8] ^ et[st - 14] ^ et[st - 16] + for (var lt = 0; lt < 80; ++lt) { + var ct = ~~(lt / 20), + ut = (rotl5$1(nt) + ft$1(ct, rt, it, ot) + at + et[lt] + K$4[ct]) | 0 + ;(at = ot), (ot = it), (it = rotl30$1(rt)), (rt = nt), (nt = ut) + } + ;(this._a = (nt + this._a) | 0), + (this._b = (rt + this._b) | 0), + (this._c = (it + this._c) | 0), + (this._d = (ot + this._d) | 0), + (this._e = (at + this._e) | 0) + } + Sha.prototype._hash = function () { + var tt = Buffer$B.allocUnsafe(20) + return ( + tt.writeInt32BE(this._a | 0, 0), + tt.writeInt32BE(this._b | 0, 4), + tt.writeInt32BE(this._c | 0, 8), + tt.writeInt32BE(this._d | 0, 12), + tt.writeInt32BE(this._e | 0, 16), + tt + ) + } + var sha$4 = Sha, + inherits$r = inherits_browserExports, + Hash$7 = hash$4, + Buffer$A = safeBufferExports.Buffer, + K$3 = [1518500249, 1859775393, -1894007588, -899497514], + W$4 = new Array(80) + function Sha1() { + this.init(), (this._w = W$4), Hash$7.call(this, 64, 56) + } + inherits$r(Sha1, Hash$7) + Sha1.prototype.init = function () { + return ( + (this._a = 1732584193), + (this._b = 4023233417), + (this._c = 2562383102), + (this._d = 271733878), + (this._e = 3285377520), + this + ) + } + function rotl1(tt) { + return (tt << 1) | (tt >>> 31) + } + function rotl5(tt) { + return (tt << 5) | (tt >>> 27) + } + function rotl30(tt) { + return (tt << 30) | (tt >>> 2) + } + function ft(tt, et, nt, rt) { + return tt === 0 ? (et & nt) | (~et & rt) : tt === 2 ? (et & nt) | (et & rt) | (nt & rt) : et ^ nt ^ rt + } + Sha1.prototype._update = function (tt) { + for ( + var et = this._w, + nt = this._a | 0, + rt = this._b | 0, + it = this._c | 0, + ot = this._d | 0, + at = this._e | 0, + st = 0; + st < 16; + ++st + ) + et[st] = tt.readInt32BE(st * 4) + for (; st < 80; ++st) et[st] = rotl1(et[st - 3] ^ et[st - 8] ^ et[st - 14] ^ et[st - 16]) + for (var lt = 0; lt < 80; ++lt) { + var ct = ~~(lt / 20), + ut = (rotl5(nt) + ft(ct, rt, it, ot) + at + et[lt] + K$3[ct]) | 0 + ;(at = ot), (ot = it), (it = rotl30(rt)), (rt = nt), (nt = ut) + } + ;(this._a = (nt + this._a) | 0), + (this._b = (rt + this._b) | 0), + (this._c = (it + this._c) | 0), + (this._d = (ot + this._d) | 0), + (this._e = (at + this._e) | 0) + } + Sha1.prototype._hash = function () { + var tt = Buffer$A.allocUnsafe(20) + return ( + tt.writeInt32BE(this._a | 0, 0), + tt.writeInt32BE(this._b | 0, 4), + tt.writeInt32BE(this._c | 0, 8), + tt.writeInt32BE(this._d | 0, 12), + tt.writeInt32BE(this._e | 0, 16), + tt + ) + } + var sha1$1 = Sha1, + inherits$q = inherits_browserExports, + Hash$6 = hash$4, + Buffer$z = safeBufferExports.Buffer, + K$2 = [ + 1116352408, 1899447441, 3049323471, 3921009573, 961987163, 1508970993, 2453635748, 2870763221, 3624381080, + 310598401, 607225278, 1426881987, 1925078388, 2162078206, 2614888103, 3248222580, 3835390401, 4022224774, + 264347078, 604807628, 770255983, 1249150122, 1555081692, 1996064986, 2554220882, 2821834349, 2952996808, + 3210313671, 3336571891, 3584528711, 113926993, 338241895, 666307205, 773529912, 1294757372, 1396182291, + 1695183700, 1986661051, 2177026350, 2456956037, 2730485921, 2820302411, 3259730800, 3345764771, 3516065817, + 3600352804, 4094571909, 275423344, 430227734, 506948616, 659060556, 883997877, 958139571, 1322822218, 1537002063, + 1747873779, 1955562222, 2024104815, 2227730452, 2361852424, 2428436474, 2756734187, 3204031479, 3329325298, + ], + W$3 = new Array(64) + function Sha256$1() { + this.init(), (this._w = W$3), Hash$6.call(this, 64, 56) + } + inherits$q(Sha256$1, Hash$6) + Sha256$1.prototype.init = function () { + return ( + (this._a = 1779033703), + (this._b = 3144134277), + (this._c = 1013904242), + (this._d = 2773480762), + (this._e = 1359893119), + (this._f = 2600822924), + (this._g = 528734635), + (this._h = 1541459225), + this + ) + } + function ch(tt, et, nt) { + return nt ^ (tt & (et ^ nt)) + } + function maj$1(tt, et, nt) { + return (tt & et) | (nt & (tt | et)) + } + function sigma0$1(tt) { + return ((tt >>> 2) | (tt << 30)) ^ ((tt >>> 13) | (tt << 19)) ^ ((tt >>> 22) | (tt << 10)) + } + function sigma1$1(tt) { + return ((tt >>> 6) | (tt << 26)) ^ ((tt >>> 11) | (tt << 21)) ^ ((tt >>> 25) | (tt << 7)) + } + function gamma0(tt) { + return ((tt >>> 7) | (tt << 25)) ^ ((tt >>> 18) | (tt << 14)) ^ (tt >>> 3) + } + function gamma1(tt) { + return ((tt >>> 17) | (tt << 15)) ^ ((tt >>> 19) | (tt << 13)) ^ (tt >>> 10) + } + Sha256$1.prototype._update = function (tt) { + for ( + var et = this._w, + nt = this._a | 0, + rt = this._b | 0, + it = this._c | 0, + ot = this._d | 0, + at = this._e | 0, + st = this._f | 0, + lt = this._g | 0, + ct = this._h | 0, + ut = 0; + ut < 16; + ++ut + ) + et[ut] = tt.readInt32BE(ut * 4) + for (; ut < 64; ++ut) et[ut] = (gamma1(et[ut - 2]) + et[ut - 7] + gamma0(et[ut - 15]) + et[ut - 16]) | 0 + for (var ht = 0; ht < 64; ++ht) { + var dt = (ct + sigma1$1(at) + ch(at, st, lt) + K$2[ht] + et[ht]) | 0, + pt = (sigma0$1(nt) + maj$1(nt, rt, it)) | 0 + ;(ct = lt), (lt = st), (st = at), (at = (ot + dt) | 0), (ot = it), (it = rt), (rt = nt), (nt = (dt + pt) | 0) + } + ;(this._a = (nt + this._a) | 0), + (this._b = (rt + this._b) | 0), + (this._c = (it + this._c) | 0), + (this._d = (ot + this._d) | 0), + (this._e = (at + this._e) | 0), + (this._f = (st + this._f) | 0), + (this._g = (lt + this._g) | 0), + (this._h = (ct + this._h) | 0) + } + Sha256$1.prototype._hash = function () { + var tt = Buffer$z.allocUnsafe(32) + return ( + tt.writeInt32BE(this._a, 0), + tt.writeInt32BE(this._b, 4), + tt.writeInt32BE(this._c, 8), + tt.writeInt32BE(this._d, 12), + tt.writeInt32BE(this._e, 16), + tt.writeInt32BE(this._f, 20), + tt.writeInt32BE(this._g, 24), + tt.writeInt32BE(this._h, 28), + tt + ) + } + var sha256$4 = Sha256$1, + inherits$p = inherits_browserExports, + Sha256 = sha256$4, + Hash$5 = hash$4, + Buffer$y = safeBufferExports.Buffer, + W$2 = new Array(64) + function Sha224() { + this.init(), (this._w = W$2), Hash$5.call(this, 64, 56) + } + inherits$p(Sha224, Sha256) + Sha224.prototype.init = function () { + return ( + (this._a = 3238371032), + (this._b = 914150663), + (this._c = 812702999), + (this._d = 4144912697), + (this._e = 4290775857), + (this._f = 1750603025), + (this._g = 1694076839), + (this._h = 3204075428), + this + ) + } + Sha224.prototype._hash = function () { + var tt = Buffer$y.allocUnsafe(28) + return ( + tt.writeInt32BE(this._a, 0), + tt.writeInt32BE(this._b, 4), + tt.writeInt32BE(this._c, 8), + tt.writeInt32BE(this._d, 12), + tt.writeInt32BE(this._e, 16), + tt.writeInt32BE(this._f, 20), + tt.writeInt32BE(this._g, 24), + tt + ) + } + var sha224$1 = Sha224, + inherits$o = inherits_browserExports, + Hash$4 = hash$4, + Buffer$x = safeBufferExports.Buffer, + K$1 = [ + 1116352408, 3609767458, 1899447441, 602891725, 3049323471, 3964484399, 3921009573, 2173295548, 961987163, + 4081628472, 1508970993, 3053834265, 2453635748, 2937671579, 2870763221, 3664609560, 3624381080, 2734883394, + 310598401, 1164996542, 607225278, 1323610764, 1426881987, 3590304994, 1925078388, 4068182383, 2162078206, + 991336113, 2614888103, 633803317, 3248222580, 3479774868, 3835390401, 2666613458, 4022224774, 944711139, + 264347078, 2341262773, 604807628, 2007800933, 770255983, 1495990901, 1249150122, 1856431235, 1555081692, + 3175218132, 1996064986, 2198950837, 2554220882, 3999719339, 2821834349, 766784016, 2952996808, 2566594879, + 3210313671, 3203337956, 3336571891, 1034457026, 3584528711, 2466948901, 113926993, 3758326383, 338241895, + 168717936, 666307205, 1188179964, 773529912, 1546045734, 1294757372, 1522805485, 1396182291, 2643833823, + 1695183700, 2343527390, 1986661051, 1014477480, 2177026350, 1206759142, 2456956037, 344077627, 2730485921, + 1290863460, 2820302411, 3158454273, 3259730800, 3505952657, 3345764771, 106217008, 3516065817, 3606008344, + 3600352804, 1432725776, 4094571909, 1467031594, 275423344, 851169720, 430227734, 3100823752, 506948616, + 1363258195, 659060556, 3750685593, 883997877, 3785050280, 958139571, 3318307427, 1322822218, 3812723403, + 1537002063, 2003034995, 1747873779, 3602036899, 1955562222, 1575990012, 2024104815, 1125592928, 2227730452, + 2716904306, 2361852424, 442776044, 2428436474, 593698344, 2756734187, 3733110249, 3204031479, 2999351573, + 3329325298, 3815920427, 3391569614, 3928383900, 3515267271, 566280711, 3940187606, 3454069534, 4118630271, + 4000239992, 116418474, 1914138554, 174292421, 2731055270, 289380356, 3203993006, 460393269, 320620315, 685471733, + 587496836, 852142971, 1086792851, 1017036298, 365543100, 1126000580, 2618297676, 1288033470, 3409855158, + 1501505948, 4234509866, 1607167915, 987167468, 1816402316, 1246189591, + ], + W$1 = new Array(160) + function Sha512() { + this.init(), (this._w = W$1), Hash$4.call(this, 128, 112) + } + inherits$o(Sha512, Hash$4) + Sha512.prototype.init = function () { + return ( + (this._ah = 1779033703), + (this._bh = 3144134277), + (this._ch = 1013904242), + (this._dh = 2773480762), + (this._eh = 1359893119), + (this._fh = 2600822924), + (this._gh = 528734635), + (this._hh = 1541459225), + (this._al = 4089235720), + (this._bl = 2227873595), + (this._cl = 4271175723), + (this._dl = 1595750129), + (this._el = 2917565137), + (this._fl = 725511199), + (this._gl = 4215389547), + (this._hl = 327033209), + this + ) + } + function Ch(tt, et, nt) { + return nt ^ (tt & (et ^ nt)) + } + function maj(tt, et, nt) { + return (tt & et) | (nt & (tt | et)) + } + function sigma0(tt, et) { + return ((tt >>> 28) | (et << 4)) ^ ((et >>> 2) | (tt << 30)) ^ ((et >>> 7) | (tt << 25)) + } + function sigma1(tt, et) { + return ((tt >>> 14) | (et << 18)) ^ ((tt >>> 18) | (et << 14)) ^ ((et >>> 9) | (tt << 23)) + } + function Gamma0(tt, et) { + return ((tt >>> 1) | (et << 31)) ^ ((tt >>> 8) | (et << 24)) ^ (tt >>> 7) + } + function Gamma0l(tt, et) { + return ((tt >>> 1) | (et << 31)) ^ ((tt >>> 8) | (et << 24)) ^ ((tt >>> 7) | (et << 25)) + } + function Gamma1(tt, et) { + return ((tt >>> 19) | (et << 13)) ^ ((et >>> 29) | (tt << 3)) ^ (tt >>> 6) + } + function Gamma1l(tt, et) { + return ((tt >>> 19) | (et << 13)) ^ ((et >>> 29) | (tt << 3)) ^ ((tt >>> 6) | (et << 26)) + } + function getCarry(tt, et) { + return tt >>> 0 < et >>> 0 ? 1 : 0 + } + Sha512.prototype._update = function (tt) { + for ( + var et = this._w, + nt = this._ah | 0, + rt = this._bh | 0, + it = this._ch | 0, + ot = this._dh | 0, + at = this._eh | 0, + st = this._fh | 0, + lt = this._gh | 0, + ct = this._hh | 0, + ut = this._al | 0, + ht = this._bl | 0, + dt = this._cl | 0, + pt = this._dl | 0, + mt = this._el | 0, + gt = this._fl | 0, + yt = this._gl | 0, + bt = this._hl | 0, + vt = 0; + vt < 32; + vt += 2 + ) + (et[vt] = tt.readInt32BE(vt * 4)), (et[vt + 1] = tt.readInt32BE(vt * 4 + 4)) + for (; vt < 160; vt += 2) { + var xt = et[vt - 30], + kt = et[vt - 15 * 2 + 1], + St = Gamma0(xt, kt), + Tt = Gamma0l(kt, xt) + ;(xt = et[vt - 2 * 2]), (kt = et[vt - 2 * 2 + 1]) + var At = Gamma1(xt, kt), + Et = Gamma1l(kt, xt), + $t = et[vt - 7 * 2], + Dt = et[vt - 7 * 2 + 1], + jt = et[vt - 16 * 2], + Pt = et[vt - 16 * 2 + 1], + Ct = (Tt + Dt) | 0, + wt = (St + $t + getCarry(Ct, Tt)) | 0 + ;(Ct = (Ct + Et) | 0), + (wt = (wt + At + getCarry(Ct, Et)) | 0), + (Ct = (Ct + Pt) | 0), + (wt = (wt + jt + getCarry(Ct, Pt)) | 0), + (et[vt] = wt), + (et[vt + 1] = Ct) + } + for (var It = 0; It < 160; It += 2) { + ;(wt = et[It]), (Ct = et[It + 1]) + var Ot = maj(nt, rt, it), + Wt = maj(ut, ht, dt), + zt = sigma0(nt, ut), + Ft = sigma0(ut, nt), + Nt = sigma1(at, mt), + Ut = sigma1(mt, at), + Mt = K$1[It], + Ht = K$1[It + 1], + en = Ch(at, st, lt), + sn = Ch(mt, gt, yt), + Kt = (bt + Ut) | 0, + rn = (ct + Nt + getCarry(Kt, bt)) | 0 + ;(Kt = (Kt + sn) | 0), + (rn = (rn + en + getCarry(Kt, sn)) | 0), + (Kt = (Kt + Ht) | 0), + (rn = (rn + Mt + getCarry(Kt, Ht)) | 0), + (Kt = (Kt + Ct) | 0), + (rn = (rn + wt + getCarry(Kt, Ct)) | 0) + var nn = (Ft + Wt) | 0, + hn = (zt + Ot + getCarry(nn, Ft)) | 0 + ;(ct = lt), + (bt = yt), + (lt = st), + (yt = gt), + (st = at), + (gt = mt), + (mt = (pt + Kt) | 0), + (at = (ot + rn + getCarry(mt, pt)) | 0), + (ot = it), + (pt = dt), + (it = rt), + (dt = ht), + (rt = nt), + (ht = ut), + (ut = (Kt + nn) | 0), + (nt = (rn + hn + getCarry(ut, Kt)) | 0) + } + ;(this._al = (this._al + ut) | 0), + (this._bl = (this._bl + ht) | 0), + (this._cl = (this._cl + dt) | 0), + (this._dl = (this._dl + pt) | 0), + (this._el = (this._el + mt) | 0), + (this._fl = (this._fl + gt) | 0), + (this._gl = (this._gl + yt) | 0), + (this._hl = (this._hl + bt) | 0), + (this._ah = (this._ah + nt + getCarry(this._al, ut)) | 0), + (this._bh = (this._bh + rt + getCarry(this._bl, ht)) | 0), + (this._ch = (this._ch + it + getCarry(this._cl, dt)) | 0), + (this._dh = (this._dh + ot + getCarry(this._dl, pt)) | 0), + (this._eh = (this._eh + at + getCarry(this._el, mt)) | 0), + (this._fh = (this._fh + st + getCarry(this._fl, gt)) | 0), + (this._gh = (this._gh + lt + getCarry(this._gl, yt)) | 0), + (this._hh = (this._hh + ct + getCarry(this._hl, bt)) | 0) + } + Sha512.prototype._hash = function () { + var tt = Buffer$x.allocUnsafe(64) + function et(nt, rt, it) { + tt.writeInt32BE(nt, it), tt.writeInt32BE(rt, it + 4) + } + return ( + et(this._ah, this._al, 0), + et(this._bh, this._bl, 8), + et(this._ch, this._cl, 16), + et(this._dh, this._dl, 24), + et(this._eh, this._el, 32), + et(this._fh, this._fl, 40), + et(this._gh, this._gl, 48), + et(this._hh, this._hl, 56), + tt + ) + } + var sha512$1 = Sha512, + inherits$n = inherits_browserExports, + SHA512$2 = sha512$1, + Hash$3 = hash$4, + Buffer$w = safeBufferExports.Buffer, + W = new Array(160) + function Sha384() { + this.init(), (this._w = W), Hash$3.call(this, 128, 112) + } + inherits$n(Sha384, SHA512$2) + Sha384.prototype.init = function () { + return ( + (this._ah = 3418070365), + (this._bh = 1654270250), + (this._ch = 2438529370), + (this._dh = 355462360), + (this._eh = 1731405415), + (this._fh = 2394180231), + (this._gh = 3675008525), + (this._hh = 1203062813), + (this._al = 3238371032), + (this._bl = 914150663), + (this._cl = 812702999), + (this._dl = 4144912697), + (this._el = 4290775857), + (this._fl = 1750603025), + (this._gl = 1694076839), + (this._hl = 3204075428), + this + ) + } + Sha384.prototype._hash = function () { + var tt = Buffer$w.allocUnsafe(48) + function et(nt, rt, it) { + tt.writeInt32BE(nt, it), tt.writeInt32BE(rt, it + 4) + } + return ( + et(this._ah, this._al, 0), + et(this._bh, this._bl, 8), + et(this._ch, this._cl, 16), + et(this._dh, this._dl, 24), + et(this._eh, this._el, 32), + et(this._fh, this._fl, 40), + tt + ) + } + var sha384$1 = Sha384, + exports = (sha_js.exports = function (et) { + et = et.toLowerCase() + var nt = exports[et] + if (!nt) throw new Error(et + ' is not supported (we accept pull requests)') + return new nt() + }) + exports.sha = sha$4 + exports.sha1 = sha1$1 + exports.sha224 = sha224$1 + exports.sha256 = sha256$4 + exports.sha384 = sha384$1 + exports.sha512 = sha512$1 + var sha_jsExports = sha_js.exports, + streamBrowserify = Stream, + EE = eventsExports.EventEmitter, + inherits$m = inherits_browserExports + inherits$m(Stream, EE) + Stream.Readable = require_stream_readable() + Stream.Writable = require_stream_writable() + Stream.Duplex = require_stream_duplex() + Stream.Transform = _stream_transform + Stream.PassThrough = _stream_passthrough + Stream.finished = endOfStream + Stream.pipeline = pipeline_1 + Stream.Stream = Stream + function Stream() { + EE.call(this) + } + Stream.prototype.pipe = function (tt, et) { + var nt = this + function rt(ut) { + tt.writable && tt.write(ut) === !1 && nt.pause && nt.pause() + } + nt.on('data', rt) + function it() { + nt.readable && nt.resume && nt.resume() + } + tt.on('drain', it), !tt._isStdio && (!et || et.end !== !1) && (nt.on('end', at), nt.on('close', st)) + var ot = !1 + function at() { + ot || ((ot = !0), tt.end()) + } + function st() { + ot || ((ot = !0), typeof tt.destroy == 'function' && tt.destroy()) + } + function lt(ut) { + if ((ct(), EE.listenerCount(this, 'error') === 0)) throw ut + } + nt.on('error', lt), tt.on('error', lt) + function ct() { + nt.removeListener('data', rt), + tt.removeListener('drain', it), + nt.removeListener('end', at), + nt.removeListener('close', st), + nt.removeListener('error', lt), + tt.removeListener('error', lt), + nt.removeListener('end', ct), + nt.removeListener('close', ct), + tt.removeListener('close', ct) + } + return nt.on('end', ct), nt.on('close', ct), tt.on('close', ct), tt.emit('pipe', nt), tt + } + var Buffer$v = safeBufferExports.Buffer, + Transform$5 = streamBrowserify.Transform, + StringDecoder = string_decoder.StringDecoder, + inherits$l = inherits_browserExports + function CipherBase$1(tt) { + Transform$5.call(this), + (this.hashMode = typeof tt == 'string'), + this.hashMode ? (this[tt] = this._finalOrDigest) : (this.final = this._finalOrDigest), + this._final && ((this.__final = this._final), (this._final = null)), + (this._decoder = null), + (this._encoding = null) + } + inherits$l(CipherBase$1, Transform$5) + CipherBase$1.prototype.update = function (tt, et, nt) { + typeof tt == 'string' && (tt = Buffer$v.from(tt, et)) + var rt = this._update(tt) + return this.hashMode ? this : (nt && (rt = this._toString(rt, nt)), rt) + } + CipherBase$1.prototype.setAutoPadding = function () {} + CipherBase$1.prototype.getAuthTag = function () { + throw new Error('trying to get auth tag in unsupported state') + } + CipherBase$1.prototype.setAuthTag = function () { + throw new Error('trying to set auth tag in unsupported state') + } + CipherBase$1.prototype.setAAD = function () { + throw new Error('trying to set aad in unsupported state') + } + CipherBase$1.prototype._transform = function (tt, et, nt) { + var rt + try { + this.hashMode ? this._update(tt) : this.push(this._update(tt)) + } catch (it) { + rt = it + } finally { + nt(rt) + } + } + CipherBase$1.prototype._flush = function (tt) { + var et + try { + this.push(this.__final()) + } catch (nt) { + et = nt + } + tt(et) + } + CipherBase$1.prototype._finalOrDigest = function (tt) { + var et = this.__final() || Buffer$v.alloc(0) + return tt && (et = this._toString(et, tt, !0)), et + } + CipherBase$1.prototype._toString = function (tt, et, nt) { + if ((this._decoder || ((this._decoder = new StringDecoder(et)), (this._encoding = et)), this._encoding !== et)) + throw new Error("can't switch encodings") + var rt = this._decoder.write(tt) + return nt && (rt += this._decoder.end()), rt + } + var cipherBase = CipherBase$1, + inherits$k = inherits_browserExports, + MD5$2 = md5_js, + RIPEMD160$4 = ripemd160$1, + sha$3 = sha_jsExports, + Base$5 = cipherBase + function Hash$2(tt) { + Base$5.call(this, 'digest'), (this._hash = tt) + } + inherits$k(Hash$2, Base$5) + Hash$2.prototype._update = function (tt) { + this._hash.update(tt) + } + Hash$2.prototype._final = function () { + return this._hash.digest() + } + var browser$a = function (et) { + return ( + (et = et.toLowerCase()), + et === 'md5' ? new MD5$2() : et === 'rmd160' || et === 'ripemd160' ? new RIPEMD160$4() : new Hash$2(sha$3(et)) + ) + }, + inherits$j = inherits_browserExports, + Buffer$u = safeBufferExports.Buffer, + Base$4 = cipherBase, + ZEROS$2 = Buffer$u.alloc(128), + blocksize = 64 + function Hmac$3(tt, et) { + Base$4.call(this, 'digest'), + typeof et == 'string' && (et = Buffer$u.from(et)), + (this._alg = tt), + (this._key = et), + et.length > blocksize ? (et = tt(et)) : et.length < blocksize && (et = Buffer$u.concat([et, ZEROS$2], blocksize)) + for ( + var nt = (this._ipad = Buffer$u.allocUnsafe(blocksize)), + rt = (this._opad = Buffer$u.allocUnsafe(blocksize)), + it = 0; + it < blocksize; + it++ + ) + (nt[it] = et[it] ^ 54), (rt[it] = et[it] ^ 92) + this._hash = [nt] + } + inherits$j(Hmac$3, Base$4) + Hmac$3.prototype._update = function (tt) { + this._hash.push(tt) + } + Hmac$3.prototype._final = function () { + var tt = this._alg(Buffer$u.concat(this._hash)) + return this._alg(Buffer$u.concat([this._opad, tt])) + } + var legacy = Hmac$3, + MD5$1 = md5_js, + md5$2 = function (tt) { + return new MD5$1().update(tt).digest() + }, + inherits$i = inherits_browserExports, + Legacy = legacy, + Base$3 = cipherBase, + Buffer$t = safeBufferExports.Buffer, + md5$1 = md5$2, + RIPEMD160$3 = ripemd160$1, + sha$2 = sha_jsExports, + ZEROS$1 = Buffer$t.alloc(128) + function Hmac$2(tt, et) { + Base$3.call(this, 'digest'), typeof et == 'string' && (et = Buffer$t.from(et)) + var nt = tt === 'sha512' || tt === 'sha384' ? 128 : 64 + if (((this._alg = tt), (this._key = et), et.length > nt)) { + var rt = tt === 'rmd160' ? new RIPEMD160$3() : sha$2(tt) + et = rt.update(et).digest() + } else et.length < nt && (et = Buffer$t.concat([et, ZEROS$1], nt)) + for ( + var it = (this._ipad = Buffer$t.allocUnsafe(nt)), ot = (this._opad = Buffer$t.allocUnsafe(nt)), at = 0; + at < nt; + at++ + ) + (it[at] = et[at] ^ 54), (ot[at] = et[at] ^ 92) + ;(this._hash = tt === 'rmd160' ? new RIPEMD160$3() : sha$2(tt)), this._hash.update(it) + } + inherits$i(Hmac$2, Base$3) + Hmac$2.prototype._update = function (tt) { + this._hash.update(tt) + } + Hmac$2.prototype._final = function () { + var tt = this._hash.digest(), + et = this._alg === 'rmd160' ? new RIPEMD160$3() : sha$2(this._alg) + return et.update(this._opad).update(tt).digest() + } + var browser$9 = function (et, nt) { + return ( + (et = et.toLowerCase()), + et === 'rmd160' || et === 'ripemd160' + ? new Hmac$2('rmd160', nt) + : et === 'md5' + ? new Legacy(md5$1, nt) + : new Hmac$2(et, nt) + ) + } + const sha224WithRSAEncryption = { sign: 'rsa', hash: 'sha224', id: '302d300d06096086480165030402040500041c' }, + sha256WithRSAEncryption = { sign: 'rsa', hash: 'sha256', id: '3031300d060960864801650304020105000420' }, + sha384WithRSAEncryption = { sign: 'rsa', hash: 'sha384', id: '3041300d060960864801650304020205000430' }, + sha512WithRSAEncryption = { sign: 'rsa', hash: 'sha512', id: '3051300d060960864801650304020305000440' }, + sha256$3 = { sign: 'ecdsa', hash: 'sha256', id: '' }, + sha224 = { sign: 'ecdsa', hash: 'sha224', id: '' }, + sha384 = { sign: 'ecdsa', hash: 'sha384', id: '' }, + sha512 = { sign: 'ecdsa', hash: 'sha512', id: '' }, + DSA = { sign: 'dsa', hash: 'sha1', id: '' }, + ripemd160WithRSA = { sign: 'rsa', hash: 'rmd160', id: '3021300906052b2403020105000414' }, + md5WithRSAEncryption = { sign: 'rsa', hash: 'md5', id: '3020300c06082a864886f70d020505000410' }, + require$$6 = { + sha224WithRSAEncryption, + 'RSA-SHA224': { sign: 'ecdsa/rsa', hash: 'sha224', id: '302d300d06096086480165030402040500041c' }, + sha256WithRSAEncryption, + 'RSA-SHA256': { sign: 'ecdsa/rsa', hash: 'sha256', id: '3031300d060960864801650304020105000420' }, + sha384WithRSAEncryption, + 'RSA-SHA384': { sign: 'ecdsa/rsa', hash: 'sha384', id: '3041300d060960864801650304020205000430' }, + sha512WithRSAEncryption, + 'RSA-SHA512': { sign: 'ecdsa/rsa', hash: 'sha512', id: '3051300d060960864801650304020305000440' }, + 'RSA-SHA1': { sign: 'rsa', hash: 'sha1', id: '3021300906052b0e03021a05000414' }, + 'ecdsa-with-SHA1': { sign: 'ecdsa', hash: 'sha1', id: '' }, + sha256: sha256$3, + sha224, + sha384, + sha512, + 'DSA-SHA': { sign: 'dsa', hash: 'sha1', id: '' }, + 'DSA-SHA1': { sign: 'dsa', hash: 'sha1', id: '' }, + DSA, + 'DSA-WITH-SHA224': { sign: 'dsa', hash: 'sha224', id: '' }, + 'DSA-SHA224': { sign: 'dsa', hash: 'sha224', id: '' }, + 'DSA-WITH-SHA256': { sign: 'dsa', hash: 'sha256', id: '' }, + 'DSA-SHA256': { sign: 'dsa', hash: 'sha256', id: '' }, + 'DSA-WITH-SHA384': { sign: 'dsa', hash: 'sha384', id: '' }, + 'DSA-SHA384': { sign: 'dsa', hash: 'sha384', id: '' }, + 'DSA-WITH-SHA512': { sign: 'dsa', hash: 'sha512', id: '' }, + 'DSA-SHA512': { sign: 'dsa', hash: 'sha512', id: '' }, + 'DSA-RIPEMD160': { sign: 'dsa', hash: 'rmd160', id: '' }, + ripemd160WithRSA, + 'RSA-RIPEMD160': { sign: 'rsa', hash: 'rmd160', id: '3021300906052b2403020105000414' }, + md5WithRSAEncryption, + 'RSA-MD5': { sign: 'rsa', hash: 'md5', id: '3020300c06082a864886f70d020505000410' }, + } + var algos = require$$6, + browser$8 = {}, + MAX_ALLOC = Math.pow(2, 30) - 1, + precondition = function (tt, et) { + if (typeof tt != 'number') throw new TypeError('Iterations not a number') + if (tt < 0) throw new TypeError('Bad iterations') + if (typeof et != 'number') throw new TypeError('Key length not a number') + if (et < 0 || et > MAX_ALLOC || et !== et) throw new TypeError('Bad key length') + }, + defaultEncoding$2 + if (commonjsGlobal.process && commonjsGlobal.process.browser) defaultEncoding$2 = 'utf-8' + else if (commonjsGlobal.process && commonjsGlobal.process.version) { + var pVersionMajor = parseInt(process.version.split('.')[0].slice(1), 10) + defaultEncoding$2 = pVersionMajor >= 6 ? 'utf-8' : 'binary' + } else defaultEncoding$2 = 'utf-8' + var defaultEncoding_1 = defaultEncoding$2, + Buffer$s = safeBufferExports.Buffer, + toBuffer$3 = function (tt, et, nt) { + if (Buffer$s.isBuffer(tt)) return tt + if (typeof tt == 'string') return Buffer$s.from(tt, et) + if (ArrayBuffer.isView(tt)) return Buffer$s.from(tt.buffer) + throw new TypeError(nt + ' must be a string, a Buffer, a typed array or a DataView') + }, + md5 = md5$2, + RIPEMD160$2 = ripemd160$1, + sha$1 = sha_jsExports, + Buffer$r = safeBufferExports.Buffer, + checkParameters$1 = precondition, + defaultEncoding$1 = defaultEncoding_1, + toBuffer$2 = toBuffer$3, + ZEROS = Buffer$r.alloc(128), + sizes = { md5: 16, sha1: 20, sha224: 28, sha256: 32, sha384: 48, sha512: 64, rmd160: 20, ripemd160: 20 } + function Hmac$1(tt, et, nt) { + var rt = getDigest(tt), + it = tt === 'sha512' || tt === 'sha384' ? 128 : 64 + et.length > it ? (et = rt(et)) : et.length < it && (et = Buffer$r.concat([et, ZEROS], it)) + for ( + var ot = Buffer$r.allocUnsafe(it + sizes[tt]), at = Buffer$r.allocUnsafe(it + sizes[tt]), st = 0; + st < it; + st++ + ) + (ot[st] = et[st] ^ 54), (at[st] = et[st] ^ 92) + var lt = Buffer$r.allocUnsafe(it + nt + 4) + ot.copy(lt, 0, 0, it), + (this.ipad1 = lt), + (this.ipad2 = ot), + (this.opad = at), + (this.alg = tt), + (this.blocksize = it), + (this.hash = rt), + (this.size = sizes[tt]) + } + Hmac$1.prototype.run = function (tt, et) { + tt.copy(et, this.blocksize) + var nt = this.hash(et) + return nt.copy(this.opad, this.blocksize), this.hash(this.opad) + } + function getDigest(tt) { + function et(rt) { + return sha$1(tt).update(rt).digest() + } + function nt(rt) { + return new RIPEMD160$2().update(rt).digest() + } + return tt === 'rmd160' || tt === 'ripemd160' ? nt : tt === 'md5' ? md5 : et + } + function pbkdf2(tt, et, nt, rt, it) { + checkParameters$1(nt, rt), + (tt = toBuffer$2(tt, defaultEncoding$1, 'Password')), + (et = toBuffer$2(et, defaultEncoding$1, 'Salt')), + (it = it || 'sha1') + var ot = new Hmac$1(it, tt, et.length), + at = Buffer$r.allocUnsafe(rt), + st = Buffer$r.allocUnsafe(et.length + 4) + et.copy(st, 0, 0, et.length) + for (var lt = 0, ct = sizes[it], ut = Math.ceil(rt / ct), ht = 1; ht <= ut; ht++) { + st.writeUInt32BE(ht, et.length) + for (var dt = ot.run(st, ot.ipad1), pt = dt, mt = 1; mt < nt; mt++) { + pt = ot.run(pt, ot.ipad2) + for (var gt = 0; gt < ct; gt++) dt[gt] ^= pt[gt] + } + dt.copy(at, lt), (lt += ct) + } + return at + } + var syncBrowser = pbkdf2, + Buffer$q = safeBufferExports.Buffer, + checkParameters = precondition, + defaultEncoding = defaultEncoding_1, + sync = syncBrowser, + toBuffer$1 = toBuffer$3, + ZERO_BUF, + subtle = commonjsGlobal.crypto && commonjsGlobal.crypto.subtle, + toBrowser = { + sha: 'SHA-1', + 'sha-1': 'SHA-1', + sha1: 'SHA-1', + sha256: 'SHA-256', + 'sha-256': 'SHA-256', + sha384: 'SHA-384', + 'sha-384': 'SHA-384', + 'sha-512': 'SHA-512', + sha512: 'SHA-512', + }, + checks = [] + function checkNative(tt) { + if ( + (commonjsGlobal.process && !commonjsGlobal.process.browser) || + !subtle || + !subtle.importKey || + !subtle.deriveBits + ) + return Promise.resolve(!1) + if (checks[tt] !== void 0) return checks[tt] + ZERO_BUF = ZERO_BUF || Buffer$q.alloc(8) + var et = browserPbkdf2(ZERO_BUF, ZERO_BUF, 10, 128, tt) + .then(function () { + return !0 + }) + .catch(function () { + return !1 + }) + return (checks[tt] = et), et + } + var nextTick$1 + function getNextTick() { + return ( + nextTick$1 || + (commonjsGlobal.process && commonjsGlobal.process.nextTick + ? (nextTick$1 = commonjsGlobal.process.nextTick) + : commonjsGlobal.queueMicrotask + ? (nextTick$1 = commonjsGlobal.queueMicrotask) + : commonjsGlobal.setImmediate + ? (nextTick$1 = commonjsGlobal.setImmediate) + : (nextTick$1 = commonjsGlobal.setTimeout), + nextTick$1) + ) + } + function browserPbkdf2(tt, et, nt, rt, it) { + return subtle + .importKey('raw', tt, { name: 'PBKDF2' }, !1, ['deriveBits']) + .then(function (ot) { + return subtle.deriveBits({ name: 'PBKDF2', salt: et, iterations: nt, hash: { name: it } }, ot, rt << 3) + }) + .then(function (ot) { + return Buffer$q.from(ot) + }) + } + function resolvePromise(tt, et) { + tt.then( + function (nt) { + getNextTick()(function () { + et(null, nt) + }) + }, + function (nt) { + getNextTick()(function () { + et(nt) + }) + }, + ) + } + var async = function (tt, et, nt, rt, it, ot) { + typeof it == 'function' && ((ot = it), (it = void 0)), (it = it || 'sha1') + var at = toBrowser[it.toLowerCase()] + if (!at || typeof commonjsGlobal.Promise != 'function') { + getNextTick()(function () { + var st + try { + st = sync(tt, et, nt, rt, it) + } catch (lt) { + return ot(lt) + } + ot(null, st) + }) + return + } + if ( + (checkParameters(nt, rt), + (tt = toBuffer$1(tt, defaultEncoding, 'Password')), + (et = toBuffer$1(et, defaultEncoding, 'Salt')), + typeof ot != 'function') + ) + throw new Error('No callback provided to pbkdf2') + resolvePromise( + checkNative(at).then(function (st) { + return st ? browserPbkdf2(tt, et, nt, rt, at) : sync(tt, et, nt, rt, it) + }), + ot, + ) + } + browser$8.pbkdf2 = async + browser$8.pbkdf2Sync = syncBrowser + var browser$7 = {}, + des$2 = {}, + utils$q = {} + utils$q.readUInt32BE = function (et, nt) { + var rt = (et[0 + nt] << 24) | (et[1 + nt] << 16) | (et[2 + nt] << 8) | et[3 + nt] + return rt >>> 0 + } + utils$q.writeUInt32BE = function (et, nt, rt) { + ;(et[0 + rt] = nt >>> 24), + (et[1 + rt] = (nt >>> 16) & 255), + (et[2 + rt] = (nt >>> 8) & 255), + (et[3 + rt] = nt & 255) + } + utils$q.ip = function (et, nt, rt, it) { + for (var ot = 0, at = 0, st = 6; st >= 0; st -= 2) { + for (var lt = 0; lt <= 24; lt += 8) (ot <<= 1), (ot |= (nt >>> (lt + st)) & 1) + for (var lt = 0; lt <= 24; lt += 8) (ot <<= 1), (ot |= (et >>> (lt + st)) & 1) + } + for (var st = 6; st >= 0; st -= 2) { + for (var lt = 1; lt <= 25; lt += 8) (at <<= 1), (at |= (nt >>> (lt + st)) & 1) + for (var lt = 1; lt <= 25; lt += 8) (at <<= 1), (at |= (et >>> (lt + st)) & 1) + } + ;(rt[it + 0] = ot >>> 0), (rt[it + 1] = at >>> 0) + } + utils$q.rip = function (et, nt, rt, it) { + for (var ot = 0, at = 0, st = 0; st < 4; st++) + for (var lt = 24; lt >= 0; lt -= 8) + (ot <<= 1), (ot |= (nt >>> (lt + st)) & 1), (ot <<= 1), (ot |= (et >>> (lt + st)) & 1) + for (var st = 4; st < 8; st++) + for (var lt = 24; lt >= 0; lt -= 8) + (at <<= 1), (at |= (nt >>> (lt + st)) & 1), (at <<= 1), (at |= (et >>> (lt + st)) & 1) + ;(rt[it + 0] = ot >>> 0), (rt[it + 1] = at >>> 0) + } + utils$q.pc1 = function (et, nt, rt, it) { + for (var ot = 0, at = 0, st = 7; st >= 5; st--) { + for (var lt = 0; lt <= 24; lt += 8) (ot <<= 1), (ot |= (nt >> (lt + st)) & 1) + for (var lt = 0; lt <= 24; lt += 8) (ot <<= 1), (ot |= (et >> (lt + st)) & 1) + } + for (var lt = 0; lt <= 24; lt += 8) (ot <<= 1), (ot |= (nt >> (lt + st)) & 1) + for (var st = 1; st <= 3; st++) { + for (var lt = 0; lt <= 24; lt += 8) (at <<= 1), (at |= (nt >> (lt + st)) & 1) + for (var lt = 0; lt <= 24; lt += 8) (at <<= 1), (at |= (et >> (lt + st)) & 1) + } + for (var lt = 0; lt <= 24; lt += 8) (at <<= 1), (at |= (et >> (lt + st)) & 1) + ;(rt[it + 0] = ot >>> 0), (rt[it + 1] = at >>> 0) + } + utils$q.r28shl = function (et, nt) { + return ((et << nt) & 268435455) | (et >>> (28 - nt)) + } + var pc2table = [ + 14, 11, 17, 4, 27, 23, 25, 0, 13, 22, 7, 18, 5, 9, 16, 24, 2, 20, 12, 21, 1, 8, 15, 26, 15, 4, 25, 19, 9, 1, 26, 16, + 5, 11, 23, 8, 12, 7, 17, 0, 22, 3, 10, 14, 6, 20, 27, 24, + ] + utils$q.pc2 = function (et, nt, rt, it) { + for (var ot = 0, at = 0, st = pc2table.length >>> 1, lt = 0; lt < st; lt++) + (ot <<= 1), (ot |= (et >>> pc2table[lt]) & 1) + for (var lt = st; lt < pc2table.length; lt++) (at <<= 1), (at |= (nt >>> pc2table[lt]) & 1) + ;(rt[it + 0] = ot >>> 0), (rt[it + 1] = at >>> 0) + } + utils$q.expand = function (et, nt, rt) { + var it = 0, + ot = 0 + it = ((et & 1) << 5) | (et >>> 27) + for (var at = 23; at >= 15; at -= 4) (it <<= 6), (it |= (et >>> at) & 63) + for (var at = 11; at >= 3; at -= 4) (ot |= (et >>> at) & 63), (ot <<= 6) + ;(ot |= ((et & 31) << 1) | (et >>> 31)), (nt[rt + 0] = it >>> 0), (nt[rt + 1] = ot >>> 0) + } + var sTable = [ + 14, 0, 4, 15, 13, 7, 1, 4, 2, 14, 15, 2, 11, 13, 8, 1, 3, 10, 10, 6, 6, 12, 12, 11, 5, 9, 9, 5, 0, 3, 7, 8, 4, 15, + 1, 12, 14, 8, 8, 2, 13, 4, 6, 9, 2, 1, 11, 7, 15, 5, 12, 11, 9, 3, 7, 14, 3, 10, 10, 0, 5, 6, 0, 13, 15, 3, 1, 13, + 8, 4, 14, 7, 6, 15, 11, 2, 3, 8, 4, 14, 9, 12, 7, 0, 2, 1, 13, 10, 12, 6, 0, 9, 5, 11, 10, 5, 0, 13, 14, 8, 7, 10, + 11, 1, 10, 3, 4, 15, 13, 4, 1, 2, 5, 11, 8, 6, 12, 7, 6, 12, 9, 0, 3, 5, 2, 14, 15, 9, 10, 13, 0, 7, 9, 0, 14, 9, 6, + 3, 3, 4, 15, 6, 5, 10, 1, 2, 13, 8, 12, 5, 7, 14, 11, 12, 4, 11, 2, 15, 8, 1, 13, 1, 6, 10, 4, 13, 9, 0, 8, 6, 15, + 9, 3, 8, 0, 7, 11, 4, 1, 15, 2, 14, 12, 3, 5, 11, 10, 5, 14, 2, 7, 12, 7, 13, 13, 8, 14, 11, 3, 5, 0, 6, 6, 15, 9, + 0, 10, 3, 1, 4, 2, 7, 8, 2, 5, 12, 11, 1, 12, 10, 4, 14, 15, 9, 10, 3, 6, 15, 9, 0, 0, 6, 12, 10, 11, 1, 7, 13, 13, + 8, 15, 9, 1, 4, 3, 5, 14, 11, 5, 12, 2, 7, 8, 2, 4, 14, 2, 14, 12, 11, 4, 2, 1, 12, 7, 4, 10, 7, 11, 13, 6, 1, 8, 5, + 5, 0, 3, 15, 15, 10, 13, 3, 0, 9, 14, 8, 9, 6, 4, 11, 2, 8, 1, 12, 11, 7, 10, 1, 13, 14, 7, 2, 8, 13, 15, 6, 9, 15, + 12, 0, 5, 9, 6, 10, 3, 4, 0, 5, 14, 3, 12, 10, 1, 15, 10, 4, 15, 2, 9, 7, 2, 12, 6, 9, 8, 5, 0, 6, 13, 1, 3, 13, 4, + 14, 14, 0, 7, 11, 5, 3, 11, 8, 9, 4, 14, 3, 15, 2, 5, 12, 2, 9, 8, 5, 12, 15, 3, 10, 7, 11, 0, 14, 4, 1, 10, 7, 1, + 6, 13, 0, 11, 8, 6, 13, 4, 13, 11, 0, 2, 11, 14, 7, 15, 4, 0, 9, 8, 1, 13, 10, 3, 14, 12, 3, 9, 5, 7, 12, 5, 2, 10, + 15, 6, 8, 1, 6, 1, 6, 4, 11, 11, 13, 13, 8, 12, 1, 3, 4, 7, 10, 14, 7, 10, 9, 15, 5, 6, 0, 8, 15, 0, 14, 5, 2, 9, 3, + 2, 12, 13, 1, 2, 15, 8, 13, 4, 8, 6, 10, 15, 3, 11, 7, 1, 4, 10, 12, 9, 5, 3, 6, 14, 11, 5, 0, 0, 14, 12, 9, 7, 2, + 7, 2, 11, 1, 4, 14, 1, 7, 9, 4, 12, 10, 14, 8, 2, 13, 0, 15, 6, 12, 10, 9, 13, 0, 15, 3, 3, 5, 5, 6, 8, 11, + ] + utils$q.substitute = function (et, nt) { + for (var rt = 0, it = 0; it < 4; it++) { + var ot = (et >>> (18 - it * 6)) & 63, + at = sTable[it * 64 + ot] + ;(rt <<= 4), (rt |= at) + } + for (var it = 0; it < 4; it++) { + var ot = (nt >>> (18 - it * 6)) & 63, + at = sTable[4 * 64 + it * 64 + ot] + ;(rt <<= 4), (rt |= at) + } + return rt >>> 0 + } + var permuteTable = [ + 16, 25, 12, 11, 3, 20, 4, 15, 31, 17, 9, 6, 27, 14, 1, 22, 30, 24, 8, 18, 0, 5, 29, 23, 13, 19, 2, 26, 10, 21, 28, + 7, + ] + utils$q.permute = function (et) { + for (var nt = 0, rt = 0; rt < permuteTable.length; rt++) (nt <<= 1), (nt |= (et >>> permuteTable[rt]) & 1) + return nt >>> 0 + } + utils$q.padSplit = function (et, nt, rt) { + for (var it = et.toString(2); it.length < nt; ) it = '0' + it + for (var ot = [], at = 0; at < nt; at += rt) ot.push(it.slice(at, at + rt)) + return ot.join(' ') + } + var minimalisticAssert = assert$o + function assert$o(tt, et) { + if (!tt) throw new Error(et || 'Assertion failed') + } + assert$o.equal = function (et, nt, rt) { + if (et != nt) throw new Error(rt || 'Assertion failed: ' + et + ' != ' + nt) + } + var assert$n = minimalisticAssert + function Cipher$3(tt) { + ;(this.options = tt), + (this.type = this.options.type), + (this.blockSize = 8), + this._init(), + (this.buffer = new Array(this.blockSize)), + (this.bufferOff = 0), + (this.padding = tt.padding !== !1) + } + var cipher = Cipher$3 + Cipher$3.prototype._init = function () {} + Cipher$3.prototype.update = function (et) { + return et.length === 0 ? [] : this.type === 'decrypt' ? this._updateDecrypt(et) : this._updateEncrypt(et) + } + Cipher$3.prototype._buffer = function (et, nt) { + for (var rt = Math.min(this.buffer.length - this.bufferOff, et.length - nt), it = 0; it < rt; it++) + this.buffer[this.bufferOff + it] = et[nt + it] + return (this.bufferOff += rt), rt + } + Cipher$3.prototype._flushBuffer = function (et, nt) { + return this._update(this.buffer, 0, et, nt), (this.bufferOff = 0), this.blockSize + } + Cipher$3.prototype._updateEncrypt = function (et) { + var nt = 0, + rt = 0, + it = ((this.bufferOff + et.length) / this.blockSize) | 0, + ot = new Array(it * this.blockSize) + this.bufferOff !== 0 && + ((nt += this._buffer(et, nt)), this.bufferOff === this.buffer.length && (rt += this._flushBuffer(ot, rt))) + for (var at = et.length - ((et.length - nt) % this.blockSize); nt < at; nt += this.blockSize) + this._update(et, nt, ot, rt), (rt += this.blockSize) + for (; nt < et.length; nt++, this.bufferOff++) this.buffer[this.bufferOff] = et[nt] + return ot + } + Cipher$3.prototype._updateDecrypt = function (et) { + for ( + var nt = 0, + rt = 0, + it = Math.ceil((this.bufferOff + et.length) / this.blockSize) - 1, + ot = new Array(it * this.blockSize); + it > 0; + it-- + ) + (nt += this._buffer(et, nt)), (rt += this._flushBuffer(ot, rt)) + return (nt += this._buffer(et, nt)), ot + } + Cipher$3.prototype.final = function (et) { + var nt + et && (nt = this.update(et)) + var rt + return this.type === 'encrypt' ? (rt = this._finalEncrypt()) : (rt = this._finalDecrypt()), nt ? nt.concat(rt) : rt + } + Cipher$3.prototype._pad = function (et, nt) { + if (nt === 0) return !1 + for (; nt < et.length; ) et[nt++] = 0 + return !0 + } + Cipher$3.prototype._finalEncrypt = function () { + if (!this._pad(this.buffer, this.bufferOff)) return [] + var et = new Array(this.blockSize) + return this._update(this.buffer, 0, et, 0), et + } + Cipher$3.prototype._unpad = function (et) { + return et + } + Cipher$3.prototype._finalDecrypt = function () { + assert$n.equal(this.bufferOff, this.blockSize, 'Not enough data to decrypt') + var et = new Array(this.blockSize) + return this._flushBuffer(et, 0), this._unpad(et) + } + var assert$m = minimalisticAssert, + inherits$h = inherits_browserExports, + utils$p = utils$q, + Cipher$2 = cipher + function DESState() { + ;(this.tmp = new Array(2)), (this.keys = null) + } + function DES$3(tt) { + Cipher$2.call(this, tt) + var et = new DESState() + ;(this._desState = et), this.deriveKeys(et, tt.key) + } + inherits$h(DES$3, Cipher$2) + var des$1 = DES$3 + DES$3.create = function (et) { + return new DES$3(et) + } + var shiftTable = [1, 1, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 1] + DES$3.prototype.deriveKeys = function (et, nt) { + ;(et.keys = new Array(16 * 2)), assert$m.equal(nt.length, this.blockSize, 'Invalid key length') + var rt = utils$p.readUInt32BE(nt, 0), + it = utils$p.readUInt32BE(nt, 4) + utils$p.pc1(rt, it, et.tmp, 0), (rt = et.tmp[0]), (it = et.tmp[1]) + for (var ot = 0; ot < et.keys.length; ot += 2) { + var at = shiftTable[ot >>> 1] + ;(rt = utils$p.r28shl(rt, at)), (it = utils$p.r28shl(it, at)), utils$p.pc2(rt, it, et.keys, ot) + } + } + DES$3.prototype._update = function (et, nt, rt, it) { + var ot = this._desState, + at = utils$p.readUInt32BE(et, nt), + st = utils$p.readUInt32BE(et, nt + 4) + utils$p.ip(at, st, ot.tmp, 0), + (at = ot.tmp[0]), + (st = ot.tmp[1]), + this.type === 'encrypt' ? this._encrypt(ot, at, st, ot.tmp, 0) : this._decrypt(ot, at, st, ot.tmp, 0), + (at = ot.tmp[0]), + (st = ot.tmp[1]), + utils$p.writeUInt32BE(rt, at, it), + utils$p.writeUInt32BE(rt, st, it + 4) + } + DES$3.prototype._pad = function (et, nt) { + if (this.padding === !1) return !1 + for (var rt = et.length - nt, it = nt; it < et.length; it++) et[it] = rt + return !0 + } + DES$3.prototype._unpad = function (et) { + if (this.padding === !1) return et + for (var nt = et[et.length - 1], rt = et.length - nt; rt < et.length; rt++) assert$m.equal(et[rt], nt) + return et.slice(0, et.length - nt) + } + DES$3.prototype._encrypt = function (et, nt, rt, it, ot) { + for (var at = nt, st = rt, lt = 0; lt < et.keys.length; lt += 2) { + var ct = et.keys[lt], + ut = et.keys[lt + 1] + utils$p.expand(st, et.tmp, 0), (ct ^= et.tmp[0]), (ut ^= et.tmp[1]) + var ht = utils$p.substitute(ct, ut), + dt = utils$p.permute(ht), + pt = st + ;(st = (at ^ dt) >>> 0), (at = pt) + } + utils$p.rip(st, at, it, ot) + } + DES$3.prototype._decrypt = function (et, nt, rt, it, ot) { + for (var at = rt, st = nt, lt = et.keys.length - 2; lt >= 0; lt -= 2) { + var ct = et.keys[lt], + ut = et.keys[lt + 1] + utils$p.expand(at, et.tmp, 0), (ct ^= et.tmp[0]), (ut ^= et.tmp[1]) + var ht = utils$p.substitute(ct, ut), + dt = utils$p.permute(ht), + pt = at + ;(at = (st ^ dt) >>> 0), (st = pt) + } + utils$p.rip(at, st, it, ot) + } + var cbc$1 = {}, + assert$l = minimalisticAssert, + inherits$g = inherits_browserExports, + proto$3 = {} + function CBCState(tt) { + assert$l.equal(tt.length, 8, 'Invalid IV length'), (this.iv = new Array(8)) + for (var et = 0; et < this.iv.length; et++) this.iv[et] = tt[et] + } + function instantiate(tt) { + function et(ot) { + tt.call(this, ot), this._cbcInit() + } + inherits$g(et, tt) + for (var nt = Object.keys(proto$3), rt = 0; rt < nt.length; rt++) { + var it = nt[rt] + et.prototype[it] = proto$3[it] + } + return ( + (et.create = function (at) { + return new et(at) + }), + et + ) + } + cbc$1.instantiate = instantiate + proto$3._cbcInit = function () { + var et = new CBCState(this.options.iv) + this._cbcState = et + } + proto$3._update = function (et, nt, rt, it) { + var ot = this._cbcState, + at = this.constructor.super_.prototype, + st = ot.iv + if (this.type === 'encrypt') { + for (var lt = 0; lt < this.blockSize; lt++) st[lt] ^= et[nt + lt] + at._update.call(this, st, 0, rt, it) + for (var lt = 0; lt < this.blockSize; lt++) st[lt] = rt[it + lt] + } else { + at._update.call(this, et, nt, rt, it) + for (var lt = 0; lt < this.blockSize; lt++) rt[it + lt] ^= st[lt] + for (var lt = 0; lt < this.blockSize; lt++) st[lt] = et[nt + lt] + } + } + var assert$k = minimalisticAssert, + inherits$f = inherits_browserExports, + Cipher$1 = cipher, + DES$2 = des$1 + function EDEState(tt, et) { + assert$k.equal(et.length, 24, 'Invalid key length') + var nt = et.slice(0, 8), + rt = et.slice(8, 16), + it = et.slice(16, 24) + tt === 'encrypt' + ? (this.ciphers = [ + DES$2.create({ type: 'encrypt', key: nt }), + DES$2.create({ type: 'decrypt', key: rt }), + DES$2.create({ type: 'encrypt', key: it }), + ]) + : (this.ciphers = [ + DES$2.create({ type: 'decrypt', key: it }), + DES$2.create({ type: 'encrypt', key: rt }), + DES$2.create({ type: 'decrypt', key: nt }), + ]) + } + function EDE(tt) { + Cipher$1.call(this, tt) + var et = new EDEState(this.type, this.options.key) + this._edeState = et + } + inherits$f(EDE, Cipher$1) + var ede = EDE + EDE.create = function (et) { + return new EDE(et) + } + EDE.prototype._update = function (et, nt, rt, it) { + var ot = this._edeState + ot.ciphers[0]._update(et, nt, rt, it), ot.ciphers[1]._update(rt, it, rt, it), ot.ciphers[2]._update(rt, it, rt, it) + } + EDE.prototype._pad = DES$2.prototype._pad + EDE.prototype._unpad = DES$2.prototype._unpad + des$2.utils = utils$q + des$2.Cipher = cipher + des$2.DES = des$1 + des$2.CBC = cbc$1 + des$2.EDE = ede + var CipherBase = cipherBase, + des = des$2, + inherits$e = inherits_browserExports, + Buffer$p = safeBufferExports.Buffer, + modes$3 = { + 'des-ede3-cbc': des.CBC.instantiate(des.EDE), + 'des-ede3': des.EDE, + 'des-ede-cbc': des.CBC.instantiate(des.EDE), + 'des-ede': des.EDE, + 'des-cbc': des.CBC.instantiate(des.DES), + 'des-ecb': des.DES, + } + modes$3.des = modes$3['des-cbc'] + modes$3.des3 = modes$3['des-ede3-cbc'] + var browserifyDes = DES$1 + inherits$e(DES$1, CipherBase) + function DES$1(tt) { + CipherBase.call(this) + var et = tt.mode.toLowerCase(), + nt = modes$3[et], + rt + tt.decrypt ? (rt = 'decrypt') : (rt = 'encrypt') + var it = tt.key + Buffer$p.isBuffer(it) || (it = Buffer$p.from(it)), + (et === 'des-ede' || et === 'des-ede-cbc') && (it = Buffer$p.concat([it, it.slice(0, 8)])) + var ot = tt.iv + Buffer$p.isBuffer(ot) || (ot = Buffer$p.from(ot)), (this._des = nt.create({ key: it, iv: ot, type: rt })) + } + DES$1.prototype._update = function (tt) { + return Buffer$p.from(this._des.update(tt)) + } + DES$1.prototype._final = function () { + return Buffer$p.from(this._des.final()) + } + var browser$6 = {}, + encrypter = {}, + ecb = {} + ecb.encrypt = function (tt, et) { + return tt._cipher.encryptBlock(et) + } + ecb.decrypt = function (tt, et) { + return tt._cipher.decryptBlock(et) + } + var cbc = {}, + bufferXor = function (et, nt) { + for (var rt = Math.min(et.length, nt.length), it = new Buffer(rt), ot = 0; ot < rt; ++ot) it[ot] = et[ot] ^ nt[ot] + return it + }, + xor$7 = bufferXor + cbc.encrypt = function (tt, et) { + var nt = xor$7(et, tt._prev) + return (tt._prev = tt._cipher.encryptBlock(nt)), tt._prev + } + cbc.decrypt = function (tt, et) { + var nt = tt._prev + tt._prev = et + var rt = tt._cipher.decryptBlock(et) + return xor$7(rt, nt) + } + var cfb = {}, + Buffer$o = safeBufferExports.Buffer, + xor$6 = bufferXor + function encryptStart(tt, et, nt) { + var rt = et.length, + it = xor$6(et, tt._cache) + return (tt._cache = tt._cache.slice(rt)), (tt._prev = Buffer$o.concat([tt._prev, nt ? et : it])), it + } + cfb.encrypt = function (tt, et, nt) { + for (var rt = Buffer$o.allocUnsafe(0), it; et.length; ) + if ( + (tt._cache.length === 0 && + ((tt._cache = tt._cipher.encryptBlock(tt._prev)), (tt._prev = Buffer$o.allocUnsafe(0))), + tt._cache.length <= et.length) + ) + (it = tt._cache.length), + (rt = Buffer$o.concat([rt, encryptStart(tt, et.slice(0, it), nt)])), + (et = et.slice(it)) + else { + rt = Buffer$o.concat([rt, encryptStart(tt, et, nt)]) + break + } + return rt + } + var cfb8 = {}, + Buffer$n = safeBufferExports.Buffer + function encryptByte$1(tt, et, nt) { + var rt = tt._cipher.encryptBlock(tt._prev), + it = rt[0] ^ et + return (tt._prev = Buffer$n.concat([tt._prev.slice(1), Buffer$n.from([nt ? et : it])])), it + } + cfb8.encrypt = function (tt, et, nt) { + for (var rt = et.length, it = Buffer$n.allocUnsafe(rt), ot = -1; ++ot < rt; ) it[ot] = encryptByte$1(tt, et[ot], nt) + return it + } + var cfb1 = {}, + Buffer$m = safeBufferExports.Buffer + function encryptByte(tt, et, nt) { + for (var rt, it = -1, ot = 8, at = 0, st, lt; ++it < ot; ) + (rt = tt._cipher.encryptBlock(tt._prev)), + (st = et & (1 << (7 - it)) ? 128 : 0), + (lt = rt[0] ^ st), + (at += (lt & 128) >> it % 8), + (tt._prev = shiftIn(tt._prev, nt ? st : lt)) + return at + } + function shiftIn(tt, et) { + var nt = tt.length, + rt = -1, + it = Buffer$m.allocUnsafe(tt.length) + for (tt = Buffer$m.concat([tt, Buffer$m.from([et])]); ++rt < nt; ) it[rt] = (tt[rt] << 1) | (tt[rt + 1] >> 7) + return it + } + cfb1.encrypt = function (tt, et, nt) { + for (var rt = et.length, it = Buffer$m.allocUnsafe(rt), ot = -1; ++ot < rt; ) it[ot] = encryptByte(tt, et[ot], nt) + return it + } + var ofb = {}, + xor$5 = bufferXor + function getBlock$1(tt) { + return (tt._prev = tt._cipher.encryptBlock(tt._prev)), tt._prev + } + ofb.encrypt = function (tt, et) { + for (; tt._cache.length < et.length; ) tt._cache = Buffer.concat([tt._cache, getBlock$1(tt)]) + var nt = tt._cache.slice(0, et.length) + return (tt._cache = tt._cache.slice(et.length)), xor$5(et, nt) + } + var ctr = {} + function incr32$2(tt) { + for (var et = tt.length, nt; et--; ) + if (((nt = tt.readUInt8(et)), nt === 255)) tt.writeUInt8(0, et) + else { + nt++, tt.writeUInt8(nt, et) + break + } + } + var incr32_1 = incr32$2, + xor$4 = bufferXor, + Buffer$l = safeBufferExports.Buffer, + incr32$1 = incr32_1 + function getBlock(tt) { + var et = tt._cipher.encryptBlockRaw(tt._prev) + return incr32$1(tt._prev), et + } + var blockSize = 16 + ctr.encrypt = function (tt, et) { + var nt = Math.ceil(et.length / blockSize), + rt = tt._cache.length + tt._cache = Buffer$l.concat([tt._cache, Buffer$l.allocUnsafe(nt * blockSize)]) + for (var it = 0; it < nt; it++) { + var ot = getBlock(tt), + at = rt + it * blockSize + tt._cache.writeUInt32BE(ot[0], at + 0), + tt._cache.writeUInt32BE(ot[1], at + 4), + tt._cache.writeUInt32BE(ot[2], at + 8), + tt._cache.writeUInt32BE(ot[3], at + 12) + } + var st = tt._cache.slice(0, et.length) + return (tt._cache = tt._cache.slice(et.length)), xor$4(et, st) + } + const aes128 = { cipher: 'AES', key: 128, iv: 16, mode: 'CBC', type: 'block' }, + aes192 = { cipher: 'AES', key: 192, iv: 16, mode: 'CBC', type: 'block' }, + aes256 = { cipher: 'AES', key: 256, iv: 16, mode: 'CBC', type: 'block' }, + require$$2$1 = { + 'aes-128-ecb': { cipher: 'AES', key: 128, iv: 0, mode: 'ECB', type: 'block' }, + 'aes-192-ecb': { cipher: 'AES', key: 192, iv: 0, mode: 'ECB', type: 'block' }, + 'aes-256-ecb': { cipher: 'AES', key: 256, iv: 0, mode: 'ECB', type: 'block' }, + 'aes-128-cbc': { cipher: 'AES', key: 128, iv: 16, mode: 'CBC', type: 'block' }, + 'aes-192-cbc': { cipher: 'AES', key: 192, iv: 16, mode: 'CBC', type: 'block' }, + 'aes-256-cbc': { cipher: 'AES', key: 256, iv: 16, mode: 'CBC', type: 'block' }, + aes128, + aes192, + aes256, + 'aes-128-cfb': { cipher: 'AES', key: 128, iv: 16, mode: 'CFB', type: 'stream' }, + 'aes-192-cfb': { cipher: 'AES', key: 192, iv: 16, mode: 'CFB', type: 'stream' }, + 'aes-256-cfb': { cipher: 'AES', key: 256, iv: 16, mode: 'CFB', type: 'stream' }, + 'aes-128-cfb8': { cipher: 'AES', key: 128, iv: 16, mode: 'CFB8', type: 'stream' }, + 'aes-192-cfb8': { cipher: 'AES', key: 192, iv: 16, mode: 'CFB8', type: 'stream' }, + 'aes-256-cfb8': { cipher: 'AES', key: 256, iv: 16, mode: 'CFB8', type: 'stream' }, + 'aes-128-cfb1': { cipher: 'AES', key: 128, iv: 16, mode: 'CFB1', type: 'stream' }, + 'aes-192-cfb1': { cipher: 'AES', key: 192, iv: 16, mode: 'CFB1', type: 'stream' }, + 'aes-256-cfb1': { cipher: 'AES', key: 256, iv: 16, mode: 'CFB1', type: 'stream' }, + 'aes-128-ofb': { cipher: 'AES', key: 128, iv: 16, mode: 'OFB', type: 'stream' }, + 'aes-192-ofb': { cipher: 'AES', key: 192, iv: 16, mode: 'OFB', type: 'stream' }, + 'aes-256-ofb': { cipher: 'AES', key: 256, iv: 16, mode: 'OFB', type: 'stream' }, + 'aes-128-ctr': { cipher: 'AES', key: 128, iv: 16, mode: 'CTR', type: 'stream' }, + 'aes-192-ctr': { cipher: 'AES', key: 192, iv: 16, mode: 'CTR', type: 'stream' }, + 'aes-256-ctr': { cipher: 'AES', key: 256, iv: 16, mode: 'CTR', type: 'stream' }, + 'aes-128-gcm': { cipher: 'AES', key: 128, iv: 12, mode: 'GCM', type: 'auth' }, + 'aes-192-gcm': { cipher: 'AES', key: 192, iv: 12, mode: 'GCM', type: 'auth' }, + 'aes-256-gcm': { cipher: 'AES', key: 256, iv: 12, mode: 'GCM', type: 'auth' }, + } + var modeModules = { ECB: ecb, CBC: cbc, CFB: cfb, CFB8: cfb8, CFB1: cfb1, OFB: ofb, CTR: ctr, GCM: ctr }, + modes$2 = require$$2$1 + for (var key$3 in modes$2) modes$2[key$3].module = modeModules[modes$2[key$3].mode] + var modes_1 = modes$2, + aes$5 = {}, + Buffer$k = safeBufferExports.Buffer + function asUInt32Array(tt) { + Buffer$k.isBuffer(tt) || (tt = Buffer$k.from(tt)) + for (var et = (tt.length / 4) | 0, nt = new Array(et), rt = 0; rt < et; rt++) nt[rt] = tt.readUInt32BE(rt * 4) + return nt + } + function scrubVec(tt) { + for (var et = 0; et < tt.length; tt++) tt[et] = 0 + } + function cryptBlock(tt, et, nt, rt, it) { + for ( + var ot = nt[0], + at = nt[1], + st = nt[2], + lt = nt[3], + ct = tt[0] ^ et[0], + ut = tt[1] ^ et[1], + ht = tt[2] ^ et[2], + dt = tt[3] ^ et[3], + pt, + mt, + gt, + yt, + bt = 4, + vt = 1; + vt < it; + vt++ + ) + (pt = ot[ct >>> 24] ^ at[(ut >>> 16) & 255] ^ st[(ht >>> 8) & 255] ^ lt[dt & 255] ^ et[bt++]), + (mt = ot[ut >>> 24] ^ at[(ht >>> 16) & 255] ^ st[(dt >>> 8) & 255] ^ lt[ct & 255] ^ et[bt++]), + (gt = ot[ht >>> 24] ^ at[(dt >>> 16) & 255] ^ st[(ct >>> 8) & 255] ^ lt[ut & 255] ^ et[bt++]), + (yt = ot[dt >>> 24] ^ at[(ct >>> 16) & 255] ^ st[(ut >>> 8) & 255] ^ lt[ht & 255] ^ et[bt++]), + (ct = pt), + (ut = mt), + (ht = gt), + (dt = yt) + return ( + (pt = + ((rt[ct >>> 24] << 24) | (rt[(ut >>> 16) & 255] << 16) | (rt[(ht >>> 8) & 255] << 8) | rt[dt & 255]) ^ + et[bt++]), + (mt = + ((rt[ut >>> 24] << 24) | (rt[(ht >>> 16) & 255] << 16) | (rt[(dt >>> 8) & 255] << 8) | rt[ct & 255]) ^ + et[bt++]), + (gt = + ((rt[ht >>> 24] << 24) | (rt[(dt >>> 16) & 255] << 16) | (rt[(ct >>> 8) & 255] << 8) | rt[ut & 255]) ^ + et[bt++]), + (yt = + ((rt[dt >>> 24] << 24) | (rt[(ct >>> 16) & 255] << 16) | (rt[(ut >>> 8) & 255] << 8) | rt[ht & 255]) ^ + et[bt++]), + (pt = pt >>> 0), + (mt = mt >>> 0), + (gt = gt >>> 0), + (yt = yt >>> 0), + [pt, mt, gt, yt] + ) + } + var RCON = [0, 1, 2, 4, 8, 16, 32, 64, 128, 27, 54], + G = (function () { + for (var tt = new Array(256), et = 0; et < 256; et++) et < 128 ? (tt[et] = et << 1) : (tt[et] = (et << 1) ^ 283) + for (var nt = [], rt = [], it = [[], [], [], []], ot = [[], [], [], []], at = 0, st = 0, lt = 0; lt < 256; ++lt) { + var ct = st ^ (st << 1) ^ (st << 2) ^ (st << 3) ^ (st << 4) + ;(ct = (ct >>> 8) ^ (ct & 255) ^ 99), (nt[at] = ct), (rt[ct] = at) + var ut = tt[at], + ht = tt[ut], + dt = tt[ht], + pt = (tt[ct] * 257) ^ (ct * 16843008) + ;(it[0][at] = (pt << 24) | (pt >>> 8)), + (it[1][at] = (pt << 16) | (pt >>> 16)), + (it[2][at] = (pt << 8) | (pt >>> 24)), + (it[3][at] = pt), + (pt = (dt * 16843009) ^ (ht * 65537) ^ (ut * 257) ^ (at * 16843008)), + (ot[0][ct] = (pt << 24) | (pt >>> 8)), + (ot[1][ct] = (pt << 16) | (pt >>> 16)), + (ot[2][ct] = (pt << 8) | (pt >>> 24)), + (ot[3][ct] = pt), + at === 0 ? (at = st = 1) : ((at = ut ^ tt[tt[tt[dt ^ ut]]]), (st ^= tt[tt[st]])) + } + return { SBOX: nt, INV_SBOX: rt, SUB_MIX: it, INV_SUB_MIX: ot } + })() + function AES(tt) { + ;(this._key = asUInt32Array(tt)), this._reset() + } + AES.blockSize = 4 * 4 + AES.keySize = 256 / 8 + AES.prototype.blockSize = AES.blockSize + AES.prototype.keySize = AES.keySize + AES.prototype._reset = function () { + for (var tt = this._key, et = tt.length, nt = et + 6, rt = (nt + 1) * 4, it = [], ot = 0; ot < et; ot++) + it[ot] = tt[ot] + for (ot = et; ot < rt; ot++) { + var at = it[ot - 1] + ot % et === 0 + ? ((at = (at << 8) | (at >>> 24)), + (at = + (G.SBOX[at >>> 24] << 24) | + (G.SBOX[(at >>> 16) & 255] << 16) | + (G.SBOX[(at >>> 8) & 255] << 8) | + G.SBOX[at & 255]), + (at ^= RCON[(ot / et) | 0] << 24)) + : et > 6 && + ot % et === 4 && + (at = + (G.SBOX[at >>> 24] << 24) | + (G.SBOX[(at >>> 16) & 255] << 16) | + (G.SBOX[(at >>> 8) & 255] << 8) | + G.SBOX[at & 255]), + (it[ot] = it[ot - et] ^ at) + } + for (var st = [], lt = 0; lt < rt; lt++) { + var ct = rt - lt, + ut = it[ct - (lt % 4 ? 0 : 4)] + lt < 4 || ct <= 4 + ? (st[lt] = ut) + : (st[lt] = + G.INV_SUB_MIX[0][G.SBOX[ut >>> 24]] ^ + G.INV_SUB_MIX[1][G.SBOX[(ut >>> 16) & 255]] ^ + G.INV_SUB_MIX[2][G.SBOX[(ut >>> 8) & 255]] ^ + G.INV_SUB_MIX[3][G.SBOX[ut & 255]]) + } + ;(this._nRounds = nt), (this._keySchedule = it), (this._invKeySchedule = st) + } + AES.prototype.encryptBlockRaw = function (tt) { + return (tt = asUInt32Array(tt)), cryptBlock(tt, this._keySchedule, G.SUB_MIX, G.SBOX, this._nRounds) + } + AES.prototype.encryptBlock = function (tt) { + var et = this.encryptBlockRaw(tt), + nt = Buffer$k.allocUnsafe(16) + return ( + nt.writeUInt32BE(et[0], 0), + nt.writeUInt32BE(et[1], 4), + nt.writeUInt32BE(et[2], 8), + nt.writeUInt32BE(et[3], 12), + nt + ) + } + AES.prototype.decryptBlock = function (tt) { + tt = asUInt32Array(tt) + var et = tt[1] + ;(tt[1] = tt[3]), (tt[3] = et) + var nt = cryptBlock(tt, this._invKeySchedule, G.INV_SUB_MIX, G.INV_SBOX, this._nRounds), + rt = Buffer$k.allocUnsafe(16) + return ( + rt.writeUInt32BE(nt[0], 0), + rt.writeUInt32BE(nt[3], 4), + rt.writeUInt32BE(nt[2], 8), + rt.writeUInt32BE(nt[1], 12), + rt + ) + } + AES.prototype.scrub = function () { + scrubVec(this._keySchedule), scrubVec(this._invKeySchedule), scrubVec(this._key) + } + aes$5.AES = AES + var Buffer$j = safeBufferExports.Buffer, + ZEROES = Buffer$j.alloc(16, 0) + function toArray$5(tt) { + return [tt.readUInt32BE(0), tt.readUInt32BE(4), tt.readUInt32BE(8), tt.readUInt32BE(12)] + } + function fromArray(tt) { + var et = Buffer$j.allocUnsafe(16) + return ( + et.writeUInt32BE(tt[0] >>> 0, 0), + et.writeUInt32BE(tt[1] >>> 0, 4), + et.writeUInt32BE(tt[2] >>> 0, 8), + et.writeUInt32BE(tt[3] >>> 0, 12), + et + ) + } + function GHASH$1(tt) { + ;(this.h = tt), (this.state = Buffer$j.alloc(16, 0)), (this.cache = Buffer$j.allocUnsafe(0)) + } + GHASH$1.prototype.ghash = function (tt) { + for (var et = -1; ++et < tt.length; ) this.state[et] ^= tt[et] + this._multiply() + } + GHASH$1.prototype._multiply = function () { + for (var tt = toArray$5(this.h), et = [0, 0, 0, 0], nt, rt, it, ot = -1; ++ot < 128; ) { + for ( + rt = (this.state[~~(ot / 8)] & (1 << (7 - (ot % 8)))) !== 0, + rt && ((et[0] ^= tt[0]), (et[1] ^= tt[1]), (et[2] ^= tt[2]), (et[3] ^= tt[3])), + it = (tt[3] & 1) !== 0, + nt = 3; + nt > 0; + nt-- + ) + tt[nt] = (tt[nt] >>> 1) | ((tt[nt - 1] & 1) << 31) + ;(tt[0] = tt[0] >>> 1), it && (tt[0] = tt[0] ^ (225 << 24)) + } + this.state = fromArray(et) + } + GHASH$1.prototype.update = function (tt) { + this.cache = Buffer$j.concat([this.cache, tt]) + for (var et; this.cache.length >= 16; ) + (et = this.cache.slice(0, 16)), (this.cache = this.cache.slice(16)), this.ghash(et) + } + GHASH$1.prototype.final = function (tt, et) { + return ( + this.cache.length && this.ghash(Buffer$j.concat([this.cache, ZEROES], 16)), + this.ghash(fromArray([0, tt, 0, et])), + this.state + ) + } + var ghash = GHASH$1, + aes$4 = aes$5, + Buffer$i = safeBufferExports.Buffer, + Transform$4 = cipherBase, + inherits$d = inherits_browserExports, + GHASH = ghash, + xor$3 = bufferXor, + incr32 = incr32_1 + function xorTest(tt, et) { + var nt = 0 + tt.length !== et.length && nt++ + for (var rt = Math.min(tt.length, et.length), it = 0; it < rt; ++it) nt += tt[it] ^ et[it] + return nt + } + function calcIv(tt, et, nt) { + if (et.length === 12) + return ( + (tt._finID = Buffer$i.concat([et, Buffer$i.from([0, 0, 0, 1])])), + Buffer$i.concat([et, Buffer$i.from([0, 0, 0, 2])]) + ) + var rt = new GHASH(nt), + it = et.length, + ot = it % 16 + rt.update(et), ot && ((ot = 16 - ot), rt.update(Buffer$i.alloc(ot, 0))), rt.update(Buffer$i.alloc(8, 0)) + var at = it * 8, + st = Buffer$i.alloc(8) + st.writeUIntBE(at, 0, 8), rt.update(st), (tt._finID = rt.state) + var lt = Buffer$i.from(tt._finID) + return incr32(lt), lt + } + function StreamCipher$3(tt, et, nt, rt) { + Transform$4.call(this) + var it = Buffer$i.alloc(4, 0) + this._cipher = new aes$4.AES(et) + var ot = this._cipher.encryptBlock(it) + ;(this._ghash = new GHASH(ot)), + (nt = calcIv(this, nt, ot)), + (this._prev = Buffer$i.from(nt)), + (this._cache = Buffer$i.allocUnsafe(0)), + (this._secCache = Buffer$i.allocUnsafe(0)), + (this._decrypt = rt), + (this._alen = 0), + (this._len = 0), + (this._mode = tt), + (this._authTag = null), + (this._called = !1) + } + inherits$d(StreamCipher$3, Transform$4) + StreamCipher$3.prototype._update = function (tt) { + if (!this._called && this._alen) { + var et = 16 - (this._alen % 16) + et < 16 && ((et = Buffer$i.alloc(et, 0)), this._ghash.update(et)) + } + this._called = !0 + var nt = this._mode.encrypt(this, tt) + return this._decrypt ? this._ghash.update(tt) : this._ghash.update(nt), (this._len += tt.length), nt + } + StreamCipher$3.prototype._final = function () { + if (this._decrypt && !this._authTag) throw new Error('Unsupported state or unable to authenticate data') + var tt = xor$3(this._ghash.final(this._alen * 8, this._len * 8), this._cipher.encryptBlock(this._finID)) + if (this._decrypt && xorTest(tt, this._authTag)) throw new Error('Unsupported state or unable to authenticate data') + ;(this._authTag = tt), this._cipher.scrub() + } + StreamCipher$3.prototype.getAuthTag = function () { + if (this._decrypt || !Buffer$i.isBuffer(this._authTag)) + throw new Error('Attempting to get auth tag in unsupported state') + return this._authTag + } + StreamCipher$3.prototype.setAuthTag = function (et) { + if (!this._decrypt) throw new Error('Attempting to set auth tag in unsupported state') + this._authTag = et + } + StreamCipher$3.prototype.setAAD = function (et) { + if (this._called) throw new Error('Attempting to set AAD in unsupported state') + this._ghash.update(et), (this._alen += et.length) + } + var authCipher = StreamCipher$3, + aes$3 = aes$5, + Buffer$h = safeBufferExports.Buffer, + Transform$3 = cipherBase, + inherits$c = inherits_browserExports + function StreamCipher$2(tt, et, nt, rt) { + Transform$3.call(this), + (this._cipher = new aes$3.AES(et)), + (this._prev = Buffer$h.from(nt)), + (this._cache = Buffer$h.allocUnsafe(0)), + (this._secCache = Buffer$h.allocUnsafe(0)), + (this._decrypt = rt), + (this._mode = tt) + } + inherits$c(StreamCipher$2, Transform$3) + StreamCipher$2.prototype._update = function (tt) { + return this._mode.encrypt(this, tt, this._decrypt) + } + StreamCipher$2.prototype._final = function () { + this._cipher.scrub() + } + var streamCipher = StreamCipher$2, + Buffer$g = safeBufferExports.Buffer, + MD5 = md5_js + function EVP_BytesToKey(tt, et, nt, rt) { + if ( + (Buffer$g.isBuffer(tt) || (tt = Buffer$g.from(tt, 'binary')), + et && (Buffer$g.isBuffer(et) || (et = Buffer$g.from(et, 'binary')), et.length !== 8)) + ) + throw new RangeError('salt should be Buffer with 8 byte length') + for ( + var it = nt / 8, ot = Buffer$g.alloc(it), at = Buffer$g.alloc(rt || 0), st = Buffer$g.alloc(0); + it > 0 || rt > 0; + + ) { + var lt = new MD5() + lt.update(st), lt.update(tt), et && lt.update(et), (st = lt.digest()) + var ct = 0 + if (it > 0) { + var ut = ot.length - it + ;(ct = Math.min(it, st.length)), st.copy(ot, ut, 0, ct), (it -= ct) + } + if (ct < st.length && rt > 0) { + var ht = at.length - rt, + dt = Math.min(rt, st.length - ct) + st.copy(at, ht, ct, ct + dt), (rt -= dt) + } + } + return st.fill(0), { key: ot, iv: at } + } + var evp_bytestokey = EVP_BytesToKey, + MODES$1 = modes_1, + AuthCipher$1 = authCipher, + Buffer$f = safeBufferExports.Buffer, + StreamCipher$1 = streamCipher, + Transform$2 = cipherBase, + aes$2 = aes$5, + ebtk$2 = evp_bytestokey, + inherits$b = inherits_browserExports + function Cipher(tt, et, nt) { + Transform$2.call(this), + (this._cache = new Splitter$1()), + (this._cipher = new aes$2.AES(et)), + (this._prev = Buffer$f.from(nt)), + (this._mode = tt), + (this._autopadding = !0) + } + inherits$b(Cipher, Transform$2) + Cipher.prototype._update = function (tt) { + this._cache.add(tt) + for (var et, nt, rt = []; (et = this._cache.get()); ) (nt = this._mode.encrypt(this, et)), rt.push(nt) + return Buffer$f.concat(rt) + } + var PADDING = Buffer$f.alloc(16, 16) + Cipher.prototype._final = function () { + var tt = this._cache.flush() + if (this._autopadding) return (tt = this._mode.encrypt(this, tt)), this._cipher.scrub(), tt + if (!tt.equals(PADDING)) throw (this._cipher.scrub(), new Error('data not multiple of block length')) + } + Cipher.prototype.setAutoPadding = function (tt) { + return (this._autopadding = !!tt), this + } + function Splitter$1() { + this.cache = Buffer$f.allocUnsafe(0) + } + Splitter$1.prototype.add = function (tt) { + this.cache = Buffer$f.concat([this.cache, tt]) + } + Splitter$1.prototype.get = function () { + if (this.cache.length > 15) { + var tt = this.cache.slice(0, 16) + return (this.cache = this.cache.slice(16)), tt + } + return null + } + Splitter$1.prototype.flush = function () { + for (var tt = 16 - this.cache.length, et = Buffer$f.allocUnsafe(tt), nt = -1; ++nt < tt; ) et.writeUInt8(tt, nt) + return Buffer$f.concat([this.cache, et]) + } + function createCipheriv$1(tt, et, nt) { + var rt = MODES$1[tt.toLowerCase()] + if (!rt) throw new TypeError('invalid suite type') + if ((typeof et == 'string' && (et = Buffer$f.from(et)), et.length !== rt.key / 8)) + throw new TypeError('invalid key length ' + et.length) + if ((typeof nt == 'string' && (nt = Buffer$f.from(nt)), rt.mode !== 'GCM' && nt.length !== rt.iv)) + throw new TypeError('invalid iv length ' + nt.length) + return rt.type === 'stream' + ? new StreamCipher$1(rt.module, et, nt) + : rt.type === 'auth' + ? new AuthCipher$1(rt.module, et, nt) + : new Cipher(rt.module, et, nt) + } + function createCipher$1(tt, et) { + var nt = MODES$1[tt.toLowerCase()] + if (!nt) throw new TypeError('invalid suite type') + var rt = ebtk$2(et, !1, nt.key, nt.iv) + return createCipheriv$1(tt, rt.key, rt.iv) + } + encrypter.createCipheriv = createCipheriv$1 + encrypter.createCipher = createCipher$1 + var decrypter = {}, + AuthCipher = authCipher, + Buffer$e = safeBufferExports.Buffer, + MODES = modes_1, + StreamCipher = streamCipher, + Transform$1 = cipherBase, + aes$1 = aes$5, + ebtk$1 = evp_bytestokey, + inherits$a = inherits_browserExports + function Decipher(tt, et, nt) { + Transform$1.call(this), + (this._cache = new Splitter()), + (this._last = void 0), + (this._cipher = new aes$1.AES(et)), + (this._prev = Buffer$e.from(nt)), + (this._mode = tt), + (this._autopadding = !0) + } + inherits$a(Decipher, Transform$1) + Decipher.prototype._update = function (tt) { + this._cache.add(tt) + for (var et, nt, rt = []; (et = this._cache.get(this._autopadding)); ) + (nt = this._mode.decrypt(this, et)), rt.push(nt) + return Buffer$e.concat(rt) + } + Decipher.prototype._final = function () { + var tt = this._cache.flush() + if (this._autopadding) return unpad(this._mode.decrypt(this, tt)) + if (tt) throw new Error('data not multiple of block length') + } + Decipher.prototype.setAutoPadding = function (tt) { + return (this._autopadding = !!tt), this + } + function Splitter() { + this.cache = Buffer$e.allocUnsafe(0) + } + Splitter.prototype.add = function (tt) { + this.cache = Buffer$e.concat([this.cache, tt]) + } + Splitter.prototype.get = function (tt) { + var et + if (tt) { + if (this.cache.length > 16) return (et = this.cache.slice(0, 16)), (this.cache = this.cache.slice(16)), et + } else if (this.cache.length >= 16) return (et = this.cache.slice(0, 16)), (this.cache = this.cache.slice(16)), et + return null + } + Splitter.prototype.flush = function () { + if (this.cache.length) return this.cache + } + function unpad(tt) { + var et = tt[15] + if (et < 1 || et > 16) throw new Error('unable to decrypt data') + for (var nt = -1; ++nt < et; ) if (tt[nt + (16 - et)] !== et) throw new Error('unable to decrypt data') + if (et !== 16) return tt.slice(0, 16 - et) + } + function createDecipheriv$1(tt, et, nt) { + var rt = MODES[tt.toLowerCase()] + if (!rt) throw new TypeError('invalid suite type') + if ((typeof nt == 'string' && (nt = Buffer$e.from(nt)), rt.mode !== 'GCM' && nt.length !== rt.iv)) + throw new TypeError('invalid iv length ' + nt.length) + if ((typeof et == 'string' && (et = Buffer$e.from(et)), et.length !== rt.key / 8)) + throw new TypeError('invalid key length ' + et.length) + return rt.type === 'stream' + ? new StreamCipher(rt.module, et, nt, !0) + : rt.type === 'auth' + ? new AuthCipher(rt.module, et, nt, !0) + : new Decipher(rt.module, et, nt) + } + function createDecipher$1(tt, et) { + var nt = MODES[tt.toLowerCase()] + if (!nt) throw new TypeError('invalid suite type') + var rt = ebtk$1(et, !1, nt.key, nt.iv) + return createDecipheriv$1(tt, rt.key, rt.iv) + } + decrypter.createDecipher = createDecipher$1 + decrypter.createDecipheriv = createDecipheriv$1 + var ciphers$2 = encrypter, + deciphers = decrypter, + modes$1 = require$$2$1 + function getCiphers$1() { + return Object.keys(modes$1) + } + browser$6.createCipher = browser$6.Cipher = ciphers$2.createCipher + browser$6.createCipheriv = browser$6.Cipheriv = ciphers$2.createCipheriv + browser$6.createDecipher = browser$6.Decipher = deciphers.createDecipher + browser$6.createDecipheriv = browser$6.Decipheriv = deciphers.createDecipheriv + browser$6.listCiphers = browser$6.getCiphers = getCiphers$1 + var modes = {} + ;(function (tt) { + ;(tt['des-ecb'] = { key: 8, iv: 0 }), + (tt['des-cbc'] = tt.des = { key: 8, iv: 8 }), + (tt['des-ede3-cbc'] = tt.des3 = { key: 24, iv: 8 }), + (tt['des-ede3'] = { key: 24, iv: 0 }), + (tt['des-ede-cbc'] = { key: 16, iv: 8 }), + (tt['des-ede'] = { key: 16, iv: 0 }) + })(modes) + var DES = browserifyDes, + aes = browser$6, + aesModes = modes_1, + desModes = modes, + ebtk = evp_bytestokey + function createCipher(tt, et) { + tt = tt.toLowerCase() + var nt, rt + if (aesModes[tt]) (nt = aesModes[tt].key), (rt = aesModes[tt].iv) + else if (desModes[tt]) (nt = desModes[tt].key * 8), (rt = desModes[tt].iv) + else throw new TypeError('invalid suite type') + var it = ebtk(et, !1, nt, rt) + return createCipheriv(tt, it.key, it.iv) + } + function createDecipher(tt, et) { + tt = tt.toLowerCase() + var nt, rt + if (aesModes[tt]) (nt = aesModes[tt].key), (rt = aesModes[tt].iv) + else if (desModes[tt]) (nt = desModes[tt].key * 8), (rt = desModes[tt].iv) + else throw new TypeError('invalid suite type') + var it = ebtk(et, !1, nt, rt) + return createDecipheriv(tt, it.key, it.iv) + } + function createCipheriv(tt, et, nt) { + if (((tt = tt.toLowerCase()), aesModes[tt])) return aes.createCipheriv(tt, et, nt) + if (desModes[tt]) return new DES({ key: et, iv: nt, mode: tt }) + throw new TypeError('invalid suite type') + } + function createDecipheriv(tt, et, nt) { + if (((tt = tt.toLowerCase()), aesModes[tt])) return aes.createDecipheriv(tt, et, nt) + if (desModes[tt]) return new DES({ key: et, iv: nt, mode: tt, decrypt: !0 }) + throw new TypeError('invalid suite type') + } + function getCiphers() { + return Object.keys(desModes).concat(aes.getCiphers()) + } + browser$7.createCipher = browser$7.Cipher = createCipher + browser$7.createCipheriv = browser$7.Cipheriv = createCipheriv + browser$7.createDecipher = browser$7.Decipher = createDecipher + browser$7.createDecipheriv = browser$7.Decipheriv = createDecipheriv + browser$7.listCiphers = browser$7.getCiphers = getCiphers + var browser$5 = {}, + bn$2 = { exports: {} } + bn$2.exports + ;(function (tt) { + ;(function (et, nt) { + function rt(jt, Pt) { + if (!jt) throw new Error(Pt || 'Assertion failed') + } + function it(jt, Pt) { + jt.super_ = Pt + var Ct = function () {} + ;(Ct.prototype = Pt.prototype), (jt.prototype = new Ct()), (jt.prototype.constructor = jt) + } + function ot(jt, Pt, Ct) { + if (ot.isBN(jt)) return jt + ;(this.negative = 0), + (this.words = null), + (this.length = 0), + (this.red = null), + jt !== null && + ((Pt === 'le' || Pt === 'be') && ((Ct = Pt), (Pt = 10)), this._init(jt || 0, Pt || 10, Ct || 'be')) + } + typeof et == 'object' ? (et.exports = ot) : (nt.BN = ot), (ot.BN = ot), (ot.wordSize = 26) + var at + try { + typeof window < 'u' && typeof window.Buffer < 'u' ? (at = window.Buffer) : (at = require$$0$2.Buffer) + } catch {} + ;(ot.isBN = function (Pt) { + return Pt instanceof ot + ? !0 + : Pt !== null && typeof Pt == 'object' && Pt.constructor.wordSize === ot.wordSize && Array.isArray(Pt.words) + }), + (ot.max = function (Pt, Ct) { + return Pt.cmp(Ct) > 0 ? Pt : Ct + }), + (ot.min = function (Pt, Ct) { + return Pt.cmp(Ct) < 0 ? Pt : Ct + }), + (ot.prototype._init = function (Pt, Ct, wt) { + if (typeof Pt == 'number') return this._initNumber(Pt, Ct, wt) + if (typeof Pt == 'object') return this._initArray(Pt, Ct, wt) + Ct === 'hex' && (Ct = 16), + rt(Ct === (Ct | 0) && Ct >= 2 && Ct <= 36), + (Pt = Pt.toString().replace(/\s+/g, '')) + var It = 0 + Pt[0] === '-' && (It++, (this.negative = 1)), + It < Pt.length && + (Ct === 16 + ? this._parseHex(Pt, It, wt) + : (this._parseBase(Pt, Ct, It), wt === 'le' && this._initArray(this.toArray(), Ct, wt))) + }), + (ot.prototype._initNumber = function (Pt, Ct, wt) { + Pt < 0 && ((this.negative = 1), (Pt = -Pt)), + Pt < 67108864 + ? ((this.words = [Pt & 67108863]), (this.length = 1)) + : Pt < 4503599627370496 + ? ((this.words = [Pt & 67108863, (Pt / 67108864) & 67108863]), (this.length = 2)) + : (rt(Pt < 9007199254740992), + (this.words = [Pt & 67108863, (Pt / 67108864) & 67108863, 1]), + (this.length = 3)), + wt === 'le' && this._initArray(this.toArray(), Ct, wt) + }), + (ot.prototype._initArray = function (Pt, Ct, wt) { + if ((rt(typeof Pt.length == 'number'), Pt.length <= 0)) return (this.words = [0]), (this.length = 1), this + ;(this.length = Math.ceil(Pt.length / 3)), (this.words = new Array(this.length)) + for (var It = 0; It < this.length; It++) this.words[It] = 0 + var Ot, + Wt, + zt = 0 + if (wt === 'be') + for (It = Pt.length - 1, Ot = 0; It >= 0; It -= 3) + (Wt = Pt[It] | (Pt[It - 1] << 8) | (Pt[It - 2] << 16)), + (this.words[Ot] |= (Wt << zt) & 67108863), + (this.words[Ot + 1] = (Wt >>> (26 - zt)) & 67108863), + (zt += 24), + zt >= 26 && ((zt -= 26), Ot++) + else if (wt === 'le') + for (It = 0, Ot = 0; It < Pt.length; It += 3) + (Wt = Pt[It] | (Pt[It + 1] << 8) | (Pt[It + 2] << 16)), + (this.words[Ot] |= (Wt << zt) & 67108863), + (this.words[Ot + 1] = (Wt >>> (26 - zt)) & 67108863), + (zt += 24), + zt >= 26 && ((zt -= 26), Ot++) + return this.strip() + }) + function st(jt, Pt) { + var Ct = jt.charCodeAt(Pt) + return Ct >= 65 && Ct <= 70 ? Ct - 55 : Ct >= 97 && Ct <= 102 ? Ct - 87 : (Ct - 48) & 15 + } + function lt(jt, Pt, Ct) { + var wt = st(jt, Ct) + return Ct - 1 >= Pt && (wt |= st(jt, Ct - 1) << 4), wt + } + ot.prototype._parseHex = function (Pt, Ct, wt) { + ;(this.length = Math.ceil((Pt.length - Ct) / 6)), (this.words = new Array(this.length)) + for (var It = 0; It < this.length; It++) this.words[It] = 0 + var Ot = 0, + Wt = 0, + zt + if (wt === 'be') + for (It = Pt.length - 1; It >= Ct; It -= 2) + (zt = lt(Pt, Ct, It) << Ot), + (this.words[Wt] |= zt & 67108863), + Ot >= 18 ? ((Ot -= 18), (Wt += 1), (this.words[Wt] |= zt >>> 26)) : (Ot += 8) + else { + var Ft = Pt.length - Ct + for (It = Ft % 2 === 0 ? Ct + 1 : Ct; It < Pt.length; It += 2) + (zt = lt(Pt, Ct, It) << Ot), + (this.words[Wt] |= zt & 67108863), + Ot >= 18 ? ((Ot -= 18), (Wt += 1), (this.words[Wt] |= zt >>> 26)) : (Ot += 8) + } + this.strip() + } + function ct(jt, Pt, Ct, wt) { + for (var It = 0, Ot = Math.min(jt.length, Ct), Wt = Pt; Wt < Ot; Wt++) { + var zt = jt.charCodeAt(Wt) - 48 + ;(It *= wt), zt >= 49 ? (It += zt - 49 + 10) : zt >= 17 ? (It += zt - 17 + 10) : (It += zt) + } + return It + } + ;(ot.prototype._parseBase = function (Pt, Ct, wt) { + ;(this.words = [0]), (this.length = 1) + for (var It = 0, Ot = 1; Ot <= 67108863; Ot *= Ct) It++ + It--, (Ot = (Ot / Ct) | 0) + for (var Wt = Pt.length - wt, zt = Wt % It, Ft = Math.min(Wt, Wt - zt) + wt, Nt = 0, Ut = wt; Ut < Ft; Ut += It) + (Nt = ct(Pt, Ut, Ut + It, Ct)), + this.imuln(Ot), + this.words[0] + Nt < 67108864 ? (this.words[0] += Nt) : this._iaddn(Nt) + if (zt !== 0) { + var Mt = 1 + for (Nt = ct(Pt, Ut, Pt.length, Ct), Ut = 0; Ut < zt; Ut++) Mt *= Ct + this.imuln(Mt), this.words[0] + Nt < 67108864 ? (this.words[0] += Nt) : this._iaddn(Nt) + } + this.strip() + }), + (ot.prototype.copy = function (Pt) { + Pt.words = new Array(this.length) + for (var Ct = 0; Ct < this.length; Ct++) Pt.words[Ct] = this.words[Ct] + ;(Pt.length = this.length), (Pt.negative = this.negative), (Pt.red = this.red) + }), + (ot.prototype.clone = function () { + var Pt = new ot(null) + return this.copy(Pt), Pt + }), + (ot.prototype._expand = function (Pt) { + for (; this.length < Pt; ) this.words[this.length++] = 0 + return this + }), + (ot.prototype.strip = function () { + for (; this.length > 1 && this.words[this.length - 1] === 0; ) this.length-- + return this._normSign() + }), + (ot.prototype._normSign = function () { + return this.length === 1 && this.words[0] === 0 && (this.negative = 0), this + }), + (ot.prototype.inspect = function () { + return (this.red ? '' + }) + var ut = [ + '', + '0', + '00', + '000', + '0000', + '00000', + '000000', + '0000000', + '00000000', + '000000000', + '0000000000', + '00000000000', + '000000000000', + '0000000000000', + '00000000000000', + '000000000000000', + '0000000000000000', + '00000000000000000', + '000000000000000000', + '0000000000000000000', + '00000000000000000000', + '000000000000000000000', + '0000000000000000000000', + '00000000000000000000000', + '000000000000000000000000', + '0000000000000000000000000', + ], + ht = [ + 0, 0, 25, 16, 12, 11, 10, 9, 8, 8, 7, 7, 7, 7, 6, 6, 6, 6, 6, 6, 6, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, + ], + dt = [ + 0, 0, 33554432, 43046721, 16777216, 48828125, 60466176, 40353607, 16777216, 43046721, 1e7, 19487171, 35831808, + 62748517, 7529536, 11390625, 16777216, 24137569, 34012224, 47045881, 64e6, 4084101, 5153632, 6436343, 7962624, + 9765625, 11881376, 14348907, 17210368, 20511149, 243e5, 28629151, 33554432, 39135393, 45435424, 52521875, + 60466176, + ] + ;(ot.prototype.toString = function (Pt, Ct) { + ;(Pt = Pt || 10), (Ct = Ct | 0 || 1) + var wt + if (Pt === 16 || Pt === 'hex') { + wt = '' + for (var It = 0, Ot = 0, Wt = 0; Wt < this.length; Wt++) { + var zt = this.words[Wt], + Ft = (((zt << It) | Ot) & 16777215).toString(16) + ;(Ot = (zt >>> (24 - It)) & 16777215), + Ot !== 0 || Wt !== this.length - 1 ? (wt = ut[6 - Ft.length] + Ft + wt) : (wt = Ft + wt), + (It += 2), + It >= 26 && ((It -= 26), Wt--) + } + for (Ot !== 0 && (wt = Ot.toString(16) + wt); wt.length % Ct !== 0; ) wt = '0' + wt + return this.negative !== 0 && (wt = '-' + wt), wt + } + if (Pt === (Pt | 0) && Pt >= 2 && Pt <= 36) { + var Nt = ht[Pt], + Ut = dt[Pt] + wt = '' + var Mt = this.clone() + for (Mt.negative = 0; !Mt.isZero(); ) { + var Ht = Mt.modn(Ut).toString(Pt) + ;(Mt = Mt.idivn(Ut)), Mt.isZero() ? (wt = Ht + wt) : (wt = ut[Nt - Ht.length] + Ht + wt) + } + for (this.isZero() && (wt = '0' + wt); wt.length % Ct !== 0; ) wt = '0' + wt + return this.negative !== 0 && (wt = '-' + wt), wt + } + rt(!1, 'Base should be between 2 and 36') + }), + (ot.prototype.toNumber = function () { + var Pt = this.words[0] + return ( + this.length === 2 + ? (Pt += this.words[1] * 67108864) + : this.length === 3 && this.words[2] === 1 + ? (Pt += 4503599627370496 + this.words[1] * 67108864) + : this.length > 2 && rt(!1, 'Number can only safely store up to 53 bits'), + this.negative !== 0 ? -Pt : Pt + ) + }), + (ot.prototype.toJSON = function () { + return this.toString(16) + }), + (ot.prototype.toBuffer = function (Pt, Ct) { + return rt(typeof at < 'u'), this.toArrayLike(at, Pt, Ct) + }), + (ot.prototype.toArray = function (Pt, Ct) { + return this.toArrayLike(Array, Pt, Ct) + }), + (ot.prototype.toArrayLike = function (Pt, Ct, wt) { + var It = this.byteLength(), + Ot = wt || Math.max(1, It) + rt(It <= Ot, 'byte array longer than desired length'), rt(Ot > 0, 'Requested array length <= 0'), this.strip() + var Wt = Ct === 'le', + zt = new Pt(Ot), + Ft, + Nt, + Ut = this.clone() + if (Wt) { + for (Nt = 0; !Ut.isZero(); Nt++) (Ft = Ut.andln(255)), Ut.iushrn(8), (zt[Nt] = Ft) + for (; Nt < Ot; Nt++) zt[Nt] = 0 + } else { + for (Nt = 0; Nt < Ot - It; Nt++) zt[Nt] = 0 + for (Nt = 0; !Ut.isZero(); Nt++) (Ft = Ut.andln(255)), Ut.iushrn(8), (zt[Ot - Nt - 1] = Ft) + } + return zt + }), + Math.clz32 + ? (ot.prototype._countBits = function (Pt) { + return 32 - Math.clz32(Pt) + }) + : (ot.prototype._countBits = function (Pt) { + var Ct = Pt, + wt = 0 + return ( + Ct >= 4096 && ((wt += 13), (Ct >>>= 13)), + Ct >= 64 && ((wt += 7), (Ct >>>= 7)), + Ct >= 8 && ((wt += 4), (Ct >>>= 4)), + Ct >= 2 && ((wt += 2), (Ct >>>= 2)), + wt + Ct + ) + }), + (ot.prototype._zeroBits = function (Pt) { + if (Pt === 0) return 26 + var Ct = Pt, + wt = 0 + return ( + Ct & 8191 || ((wt += 13), (Ct >>>= 13)), + Ct & 127 || ((wt += 7), (Ct >>>= 7)), + Ct & 15 || ((wt += 4), (Ct >>>= 4)), + Ct & 3 || ((wt += 2), (Ct >>>= 2)), + Ct & 1 || wt++, + wt + ) + }), + (ot.prototype.bitLength = function () { + var Pt = this.words[this.length - 1], + Ct = this._countBits(Pt) + return (this.length - 1) * 26 + Ct + }) + function pt(jt) { + for (var Pt = new Array(jt.bitLength()), Ct = 0; Ct < Pt.length; Ct++) { + var wt = (Ct / 26) | 0, + It = Ct % 26 + Pt[Ct] = (jt.words[wt] & (1 << It)) >>> It + } + return Pt + } + ;(ot.prototype.zeroBits = function () { + if (this.isZero()) return 0 + for (var Pt = 0, Ct = 0; Ct < this.length; Ct++) { + var wt = this._zeroBits(this.words[Ct]) + if (((Pt += wt), wt !== 26)) break + } + return Pt + }), + (ot.prototype.byteLength = function () { + return Math.ceil(this.bitLength() / 8) + }), + (ot.prototype.toTwos = function (Pt) { + return this.negative !== 0 ? this.abs().inotn(Pt).iaddn(1) : this.clone() + }), + (ot.prototype.fromTwos = function (Pt) { + return this.testn(Pt - 1) ? this.notn(Pt).iaddn(1).ineg() : this.clone() + }), + (ot.prototype.isNeg = function () { + return this.negative !== 0 + }), + (ot.prototype.neg = function () { + return this.clone().ineg() + }), + (ot.prototype.ineg = function () { + return this.isZero() || (this.negative ^= 1), this + }), + (ot.prototype.iuor = function (Pt) { + for (; this.length < Pt.length; ) this.words[this.length++] = 0 + for (var Ct = 0; Ct < Pt.length; Ct++) this.words[Ct] = this.words[Ct] | Pt.words[Ct] + return this.strip() + }), + (ot.prototype.ior = function (Pt) { + return rt((this.negative | Pt.negative) === 0), this.iuor(Pt) + }), + (ot.prototype.or = function (Pt) { + return this.length > Pt.length ? this.clone().ior(Pt) : Pt.clone().ior(this) + }), + (ot.prototype.uor = function (Pt) { + return this.length > Pt.length ? this.clone().iuor(Pt) : Pt.clone().iuor(this) + }), + (ot.prototype.iuand = function (Pt) { + var Ct + this.length > Pt.length ? (Ct = Pt) : (Ct = this) + for (var wt = 0; wt < Ct.length; wt++) this.words[wt] = this.words[wt] & Pt.words[wt] + return (this.length = Ct.length), this.strip() + }), + (ot.prototype.iand = function (Pt) { + return rt((this.negative | Pt.negative) === 0), this.iuand(Pt) + }), + (ot.prototype.and = function (Pt) { + return this.length > Pt.length ? this.clone().iand(Pt) : Pt.clone().iand(this) + }), + (ot.prototype.uand = function (Pt) { + return this.length > Pt.length ? this.clone().iuand(Pt) : Pt.clone().iuand(this) + }), + (ot.prototype.iuxor = function (Pt) { + var Ct, wt + this.length > Pt.length ? ((Ct = this), (wt = Pt)) : ((Ct = Pt), (wt = this)) + for (var It = 0; It < wt.length; It++) this.words[It] = Ct.words[It] ^ wt.words[It] + if (this !== Ct) for (; It < Ct.length; It++) this.words[It] = Ct.words[It] + return (this.length = Ct.length), this.strip() + }), + (ot.prototype.ixor = function (Pt) { + return rt((this.negative | Pt.negative) === 0), this.iuxor(Pt) + }), + (ot.prototype.xor = function (Pt) { + return this.length > Pt.length ? this.clone().ixor(Pt) : Pt.clone().ixor(this) + }), + (ot.prototype.uxor = function (Pt) { + return this.length > Pt.length ? this.clone().iuxor(Pt) : Pt.clone().iuxor(this) + }), + (ot.prototype.inotn = function (Pt) { + rt(typeof Pt == 'number' && Pt >= 0) + var Ct = Math.ceil(Pt / 26) | 0, + wt = Pt % 26 + this._expand(Ct), wt > 0 && Ct-- + for (var It = 0; It < Ct; It++) this.words[It] = ~this.words[It] & 67108863 + return wt > 0 && (this.words[It] = ~this.words[It] & (67108863 >> (26 - wt))), this.strip() + }), + (ot.prototype.notn = function (Pt) { + return this.clone().inotn(Pt) + }), + (ot.prototype.setn = function (Pt, Ct) { + rt(typeof Pt == 'number' && Pt >= 0) + var wt = (Pt / 26) | 0, + It = Pt % 26 + return ( + this._expand(wt + 1), + Ct ? (this.words[wt] = this.words[wt] | (1 << It)) : (this.words[wt] = this.words[wt] & ~(1 << It)), + this.strip() + ) + }), + (ot.prototype.iadd = function (Pt) { + var Ct + if (this.negative !== 0 && Pt.negative === 0) + return (this.negative = 0), (Ct = this.isub(Pt)), (this.negative ^= 1), this._normSign() + if (this.negative === 0 && Pt.negative !== 0) + return (Pt.negative = 0), (Ct = this.isub(Pt)), (Pt.negative = 1), Ct._normSign() + var wt, It + this.length > Pt.length ? ((wt = this), (It = Pt)) : ((wt = Pt), (It = this)) + for (var Ot = 0, Wt = 0; Wt < It.length; Wt++) + (Ct = (wt.words[Wt] | 0) + (It.words[Wt] | 0) + Ot), (this.words[Wt] = Ct & 67108863), (Ot = Ct >>> 26) + for (; Ot !== 0 && Wt < wt.length; Wt++) + (Ct = (wt.words[Wt] | 0) + Ot), (this.words[Wt] = Ct & 67108863), (Ot = Ct >>> 26) + if (((this.length = wt.length), Ot !== 0)) (this.words[this.length] = Ot), this.length++ + else if (wt !== this) for (; Wt < wt.length; Wt++) this.words[Wt] = wt.words[Wt] + return this + }), + (ot.prototype.add = function (Pt) { + var Ct + return Pt.negative !== 0 && this.negative === 0 + ? ((Pt.negative = 0), (Ct = this.sub(Pt)), (Pt.negative ^= 1), Ct) + : Pt.negative === 0 && this.negative !== 0 + ? ((this.negative = 0), (Ct = Pt.sub(this)), (this.negative = 1), Ct) + : this.length > Pt.length + ? this.clone().iadd(Pt) + : Pt.clone().iadd(this) + }), + (ot.prototype.isub = function (Pt) { + if (Pt.negative !== 0) { + Pt.negative = 0 + var Ct = this.iadd(Pt) + return (Pt.negative = 1), Ct._normSign() + } else if (this.negative !== 0) + return (this.negative = 0), this.iadd(Pt), (this.negative = 1), this._normSign() + var wt = this.cmp(Pt) + if (wt === 0) return (this.negative = 0), (this.length = 1), (this.words[0] = 0), this + var It, Ot + wt > 0 ? ((It = this), (Ot = Pt)) : ((It = Pt), (Ot = this)) + for (var Wt = 0, zt = 0; zt < Ot.length; zt++) + (Ct = (It.words[zt] | 0) - (Ot.words[zt] | 0) + Wt), (Wt = Ct >> 26), (this.words[zt] = Ct & 67108863) + for (; Wt !== 0 && zt < It.length; zt++) + (Ct = (It.words[zt] | 0) + Wt), (Wt = Ct >> 26), (this.words[zt] = Ct & 67108863) + if (Wt === 0 && zt < It.length && It !== this) for (; zt < It.length; zt++) this.words[zt] = It.words[zt] + return (this.length = Math.max(this.length, zt)), It !== this && (this.negative = 1), this.strip() + }), + (ot.prototype.sub = function (Pt) { + return this.clone().isub(Pt) + }) + function mt(jt, Pt, Ct) { + Ct.negative = Pt.negative ^ jt.negative + var wt = (jt.length + Pt.length) | 0 + ;(Ct.length = wt), (wt = (wt - 1) | 0) + var It = jt.words[0] | 0, + Ot = Pt.words[0] | 0, + Wt = It * Ot, + zt = Wt & 67108863, + Ft = (Wt / 67108864) | 0 + Ct.words[0] = zt + for (var Nt = 1; Nt < wt; Nt++) { + for ( + var Ut = Ft >>> 26, + Mt = Ft & 67108863, + Ht = Math.min(Nt, Pt.length - 1), + en = Math.max(0, Nt - jt.length + 1); + en <= Ht; + en++ + ) { + var sn = (Nt - en) | 0 + ;(It = jt.words[sn] | 0), + (Ot = Pt.words[en] | 0), + (Wt = It * Ot + Mt), + (Ut += (Wt / 67108864) | 0), + (Mt = Wt & 67108863) + } + ;(Ct.words[Nt] = Mt | 0), (Ft = Ut | 0) + } + return Ft !== 0 ? (Ct.words[Nt] = Ft | 0) : Ct.length--, Ct.strip() + } + var gt = function (Pt, Ct, wt) { + var It = Pt.words, + Ot = Ct.words, + Wt = wt.words, + zt = 0, + Ft, + Nt, + Ut, + Mt = It[0] | 0, + Ht = Mt & 8191, + en = Mt >>> 13, + sn = It[1] | 0, + Kt = sn & 8191, + rn = sn >>> 13, + nn = It[2] | 0, + hn = nn & 8191, + vn = nn >>> 13, + an = It[3] | 0, + Qt = an & 8191, + _n = an >>> 13, + Pn = It[4] | 0, + $n = Pn & 8191, + Nn = Pn >>> 13, + Tn = It[5] | 0, + cn = Tn & 8191, + mn = Tn >>> 13, + In = It[6] | 0, + An = In & 8191, + wn = In >>> 13, + fn = It[7] | 0, + pn = fn & 8191, + kn = fn >>> 13, + Dn = It[8] | 0, + un = Dn & 8191, + Zt = Dn >>> 13, + Xt = It[9] | 0, + Sn = Xt & 8191, + Rn = Xt >>> 13, + jn = Ot[0] | 0, + On = jn & 8191, + Zn = jn >>> 13, + Vn = Ot[1] | 0, + qn = Vn & 8191, + zn = Vn >>> 13, + Jn = Ot[2] | 0, + Hn = Jn & 8191, + pr = Jn >>> 13, + fr = Ot[3] | 0, + xr = fr & 8191, + io = fr >>> 13, + Tr = Ot[4] | 0, + Ar = Tr & 8191, + qr = Tr >>> 13, + jr = Ot[5] | 0, + Fr = jr & 8191, + ao = jr >>> 13, + Yr = Ot[6] | 0, + Dr = Yr & 8191, + go = Yr >>> 13, + xn = Ot[7] | 0, + Mn = xn & 8191, + dn = xn >>> 13, + Jt = Ot[8] | 0, + En = Jt & 8191, + Ln = Jt >>> 13, + Un = Ot[9] | 0, + Kn = Un & 8191, + nr = Un >>> 13 + ;(wt.negative = Pt.negative ^ Ct.negative), + (wt.length = 19), + (Ft = Math.imul(Ht, On)), + (Nt = Math.imul(Ht, Zn)), + (Nt = (Nt + Math.imul(en, On)) | 0), + (Ut = Math.imul(en, Zn)) + var lr = (((zt + Ft) | 0) + ((Nt & 8191) << 13)) | 0 + ;(zt = (((Ut + (Nt >>> 13)) | 0) + (lr >>> 26)) | 0), + (lr &= 67108863), + (Ft = Math.imul(Kt, On)), + (Nt = Math.imul(Kt, Zn)), + (Nt = (Nt + Math.imul(rn, On)) | 0), + (Ut = Math.imul(rn, Zn)), + (Ft = (Ft + Math.imul(Ht, qn)) | 0), + (Nt = (Nt + Math.imul(Ht, zn)) | 0), + (Nt = (Nt + Math.imul(en, qn)) | 0), + (Ut = (Ut + Math.imul(en, zn)) | 0) + var cr = (((zt + Ft) | 0) + ((Nt & 8191) << 13)) | 0 + ;(zt = (((Ut + (Nt >>> 13)) | 0) + (cr >>> 26)) | 0), + (cr &= 67108863), + (Ft = Math.imul(hn, On)), + (Nt = Math.imul(hn, Zn)), + (Nt = (Nt + Math.imul(vn, On)) | 0), + (Ut = Math.imul(vn, Zn)), + (Ft = (Ft + Math.imul(Kt, qn)) | 0), + (Nt = (Nt + Math.imul(Kt, zn)) | 0), + (Nt = (Nt + Math.imul(rn, qn)) | 0), + (Ut = (Ut + Math.imul(rn, zn)) | 0), + (Ft = (Ft + Math.imul(Ht, Hn)) | 0), + (Nt = (Nt + Math.imul(Ht, pr)) | 0), + (Nt = (Nt + Math.imul(en, Hn)) | 0), + (Ut = (Ut + Math.imul(en, pr)) | 0) + var Hr = (((zt + Ft) | 0) + ((Nt & 8191) << 13)) | 0 + ;(zt = (((Ut + (Nt >>> 13)) | 0) + (Hr >>> 26)) | 0), + (Hr &= 67108863), + (Ft = Math.imul(Qt, On)), + (Nt = Math.imul(Qt, Zn)), + (Nt = (Nt + Math.imul(_n, On)) | 0), + (Ut = Math.imul(_n, Zn)), + (Ft = (Ft + Math.imul(hn, qn)) | 0), + (Nt = (Nt + Math.imul(hn, zn)) | 0), + (Nt = (Nt + Math.imul(vn, qn)) | 0), + (Ut = (Ut + Math.imul(vn, zn)) | 0), + (Ft = (Ft + Math.imul(Kt, Hn)) | 0), + (Nt = (Nt + Math.imul(Kt, pr)) | 0), + (Nt = (Nt + Math.imul(rn, Hn)) | 0), + (Ut = (Ut + Math.imul(rn, pr)) | 0), + (Ft = (Ft + Math.imul(Ht, xr)) | 0), + (Nt = (Nt + Math.imul(Ht, io)) | 0), + (Nt = (Nt + Math.imul(en, xr)) | 0), + (Ut = (Ut + Math.imul(en, io)) | 0) + var vr = (((zt + Ft) | 0) + ((Nt & 8191) << 13)) | 0 + ;(zt = (((Ut + (Nt >>> 13)) | 0) + (vr >>> 26)) | 0), + (vr &= 67108863), + (Ft = Math.imul($n, On)), + (Nt = Math.imul($n, Zn)), + (Nt = (Nt + Math.imul(Nn, On)) | 0), + (Ut = Math.imul(Nn, Zn)), + (Ft = (Ft + Math.imul(Qt, qn)) | 0), + (Nt = (Nt + Math.imul(Qt, zn)) | 0), + (Nt = (Nt + Math.imul(_n, qn)) | 0), + (Ut = (Ut + Math.imul(_n, zn)) | 0), + (Ft = (Ft + Math.imul(hn, Hn)) | 0), + (Nt = (Nt + Math.imul(hn, pr)) | 0), + (Nt = (Nt + Math.imul(vn, Hn)) | 0), + (Ut = (Ut + Math.imul(vn, pr)) | 0), + (Ft = (Ft + Math.imul(Kt, xr)) | 0), + (Nt = (Nt + Math.imul(Kt, io)) | 0), + (Nt = (Nt + Math.imul(rn, xr)) | 0), + (Ut = (Ut + Math.imul(rn, io)) | 0), + (Ft = (Ft + Math.imul(Ht, Ar)) | 0), + (Nt = (Nt + Math.imul(Ht, qr)) | 0), + (Nt = (Nt + Math.imul(en, Ar)) | 0), + (Ut = (Ut + Math.imul(en, qr)) | 0) + var Nr = (((zt + Ft) | 0) + ((Nt & 8191) << 13)) | 0 + ;(zt = (((Ut + (Nt >>> 13)) | 0) + (Nr >>> 26)) | 0), + (Nr &= 67108863), + (Ft = Math.imul(cn, On)), + (Nt = Math.imul(cn, Zn)), + (Nt = (Nt + Math.imul(mn, On)) | 0), + (Ut = Math.imul(mn, Zn)), + (Ft = (Ft + Math.imul($n, qn)) | 0), + (Nt = (Nt + Math.imul($n, zn)) | 0), + (Nt = (Nt + Math.imul(Nn, qn)) | 0), + (Ut = (Ut + Math.imul(Nn, zn)) | 0), + (Ft = (Ft + Math.imul(Qt, Hn)) | 0), + (Nt = (Nt + Math.imul(Qt, pr)) | 0), + (Nt = (Nt + Math.imul(_n, Hn)) | 0), + (Ut = (Ut + Math.imul(_n, pr)) | 0), + (Ft = (Ft + Math.imul(hn, xr)) | 0), + (Nt = (Nt + Math.imul(hn, io)) | 0), + (Nt = (Nt + Math.imul(vn, xr)) | 0), + (Ut = (Ut + Math.imul(vn, io)) | 0), + (Ft = (Ft + Math.imul(Kt, Ar)) | 0), + (Nt = (Nt + Math.imul(Kt, qr)) | 0), + (Nt = (Nt + Math.imul(rn, Ar)) | 0), + (Ut = (Ut + Math.imul(rn, qr)) | 0), + (Ft = (Ft + Math.imul(Ht, Fr)) | 0), + (Nt = (Nt + Math.imul(Ht, ao)) | 0), + (Nt = (Nt + Math.imul(en, Fr)) | 0), + (Ut = (Ut + Math.imul(en, ao)) | 0) + var Gr = (((zt + Ft) | 0) + ((Nt & 8191) << 13)) | 0 + ;(zt = (((Ut + (Nt >>> 13)) | 0) + (Gr >>> 26)) | 0), + (Gr &= 67108863), + (Ft = Math.imul(An, On)), + (Nt = Math.imul(An, Zn)), + (Nt = (Nt + Math.imul(wn, On)) | 0), + (Ut = Math.imul(wn, Zn)), + (Ft = (Ft + Math.imul(cn, qn)) | 0), + (Nt = (Nt + Math.imul(cn, zn)) | 0), + (Nt = (Nt + Math.imul(mn, qn)) | 0), + (Ut = (Ut + Math.imul(mn, zn)) | 0), + (Ft = (Ft + Math.imul($n, Hn)) | 0), + (Nt = (Nt + Math.imul($n, pr)) | 0), + (Nt = (Nt + Math.imul(Nn, Hn)) | 0), + (Ut = (Ut + Math.imul(Nn, pr)) | 0), + (Ft = (Ft + Math.imul(Qt, xr)) | 0), + (Nt = (Nt + Math.imul(Qt, io)) | 0), + (Nt = (Nt + Math.imul(_n, xr)) | 0), + (Ut = (Ut + Math.imul(_n, io)) | 0), + (Ft = (Ft + Math.imul(hn, Ar)) | 0), + (Nt = (Nt + Math.imul(hn, qr)) | 0), + (Nt = (Nt + Math.imul(vn, Ar)) | 0), + (Ut = (Ut + Math.imul(vn, qr)) | 0), + (Ft = (Ft + Math.imul(Kt, Fr)) | 0), + (Nt = (Nt + Math.imul(Kt, ao)) | 0), + (Nt = (Nt + Math.imul(rn, Fr)) | 0), + (Ut = (Ut + Math.imul(rn, ao)) | 0), + (Ft = (Ft + Math.imul(Ht, Dr)) | 0), + (Nt = (Nt + Math.imul(Ht, go)) | 0), + (Nt = (Nt + Math.imul(en, Dr)) | 0), + (Ut = (Ut + Math.imul(en, go)) | 0) + var eo = (((zt + Ft) | 0) + ((Nt & 8191) << 13)) | 0 + ;(zt = (((Ut + (Nt >>> 13)) | 0) + (eo >>> 26)) | 0), + (eo &= 67108863), + (Ft = Math.imul(pn, On)), + (Nt = Math.imul(pn, Zn)), + (Nt = (Nt + Math.imul(kn, On)) | 0), + (Ut = Math.imul(kn, Zn)), + (Ft = (Ft + Math.imul(An, qn)) | 0), + (Nt = (Nt + Math.imul(An, zn)) | 0), + (Nt = (Nt + Math.imul(wn, qn)) | 0), + (Ut = (Ut + Math.imul(wn, zn)) | 0), + (Ft = (Ft + Math.imul(cn, Hn)) | 0), + (Nt = (Nt + Math.imul(cn, pr)) | 0), + (Nt = (Nt + Math.imul(mn, Hn)) | 0), + (Ut = (Ut + Math.imul(mn, pr)) | 0), + (Ft = (Ft + Math.imul($n, xr)) | 0), + (Nt = (Nt + Math.imul($n, io)) | 0), + (Nt = (Nt + Math.imul(Nn, xr)) | 0), + (Ut = (Ut + Math.imul(Nn, io)) | 0), + (Ft = (Ft + Math.imul(Qt, Ar)) | 0), + (Nt = (Nt + Math.imul(Qt, qr)) | 0), + (Nt = (Nt + Math.imul(_n, Ar)) | 0), + (Ut = (Ut + Math.imul(_n, qr)) | 0), + (Ft = (Ft + Math.imul(hn, Fr)) | 0), + (Nt = (Nt + Math.imul(hn, ao)) | 0), + (Nt = (Nt + Math.imul(vn, Fr)) | 0), + (Ut = (Ut + Math.imul(vn, ao)) | 0), + (Ft = (Ft + Math.imul(Kt, Dr)) | 0), + (Nt = (Nt + Math.imul(Kt, go)) | 0), + (Nt = (Nt + Math.imul(rn, Dr)) | 0), + (Ut = (Ut + Math.imul(rn, go)) | 0), + (Ft = (Ft + Math.imul(Ht, Mn)) | 0), + (Nt = (Nt + Math.imul(Ht, dn)) | 0), + (Nt = (Nt + Math.imul(en, Mn)) | 0), + (Ut = (Ut + Math.imul(en, dn)) | 0) + var Zr = (((zt + Ft) | 0) + ((Nt & 8191) << 13)) | 0 + ;(zt = (((Ut + (Nt >>> 13)) | 0) + (Zr >>> 26)) | 0), + (Zr &= 67108863), + (Ft = Math.imul(un, On)), + (Nt = Math.imul(un, Zn)), + (Nt = (Nt + Math.imul(Zt, On)) | 0), + (Ut = Math.imul(Zt, Zn)), + (Ft = (Ft + Math.imul(pn, qn)) | 0), + (Nt = (Nt + Math.imul(pn, zn)) | 0), + (Nt = (Nt + Math.imul(kn, qn)) | 0), + (Ut = (Ut + Math.imul(kn, zn)) | 0), + (Ft = (Ft + Math.imul(An, Hn)) | 0), + (Nt = (Nt + Math.imul(An, pr)) | 0), + (Nt = (Nt + Math.imul(wn, Hn)) | 0), + (Ut = (Ut + Math.imul(wn, pr)) | 0), + (Ft = (Ft + Math.imul(cn, xr)) | 0), + (Nt = (Nt + Math.imul(cn, io)) | 0), + (Nt = (Nt + Math.imul(mn, xr)) | 0), + (Ut = (Ut + Math.imul(mn, io)) | 0), + (Ft = (Ft + Math.imul($n, Ar)) | 0), + (Nt = (Nt + Math.imul($n, qr)) | 0), + (Nt = (Nt + Math.imul(Nn, Ar)) | 0), + (Ut = (Ut + Math.imul(Nn, qr)) | 0), + (Ft = (Ft + Math.imul(Qt, Fr)) | 0), + (Nt = (Nt + Math.imul(Qt, ao)) | 0), + (Nt = (Nt + Math.imul(_n, Fr)) | 0), + (Ut = (Ut + Math.imul(_n, ao)) | 0), + (Ft = (Ft + Math.imul(hn, Dr)) | 0), + (Nt = (Nt + Math.imul(hn, go)) | 0), + (Nt = (Nt + Math.imul(vn, Dr)) | 0), + (Ut = (Ut + Math.imul(vn, go)) | 0), + (Ft = (Ft + Math.imul(Kt, Mn)) | 0), + (Nt = (Nt + Math.imul(Kt, dn)) | 0), + (Nt = (Nt + Math.imul(rn, Mn)) | 0), + (Ut = (Ut + Math.imul(rn, dn)) | 0), + (Ft = (Ft + Math.imul(Ht, En)) | 0), + (Nt = (Nt + Math.imul(Ht, Ln)) | 0), + (Nt = (Nt + Math.imul(en, En)) | 0), + (Ut = (Ut + Math.imul(en, Ln)) | 0) + var Jr = (((zt + Ft) | 0) + ((Nt & 8191) << 13)) | 0 + ;(zt = (((Ut + (Nt >>> 13)) | 0) + (Jr >>> 26)) | 0), + (Jr &= 67108863), + (Ft = Math.imul(Sn, On)), + (Nt = Math.imul(Sn, Zn)), + (Nt = (Nt + Math.imul(Rn, On)) | 0), + (Ut = Math.imul(Rn, Zn)), + (Ft = (Ft + Math.imul(un, qn)) | 0), + (Nt = (Nt + Math.imul(un, zn)) | 0), + (Nt = (Nt + Math.imul(Zt, qn)) | 0), + (Ut = (Ut + Math.imul(Zt, zn)) | 0), + (Ft = (Ft + Math.imul(pn, Hn)) | 0), + (Nt = (Nt + Math.imul(pn, pr)) | 0), + (Nt = (Nt + Math.imul(kn, Hn)) | 0), + (Ut = (Ut + Math.imul(kn, pr)) | 0), + (Ft = (Ft + Math.imul(An, xr)) | 0), + (Nt = (Nt + Math.imul(An, io)) | 0), + (Nt = (Nt + Math.imul(wn, xr)) | 0), + (Ut = (Ut + Math.imul(wn, io)) | 0), + (Ft = (Ft + Math.imul(cn, Ar)) | 0), + (Nt = (Nt + Math.imul(cn, qr)) | 0), + (Nt = (Nt + Math.imul(mn, Ar)) | 0), + (Ut = (Ut + Math.imul(mn, qr)) | 0), + (Ft = (Ft + Math.imul($n, Fr)) | 0), + (Nt = (Nt + Math.imul($n, ao)) | 0), + (Nt = (Nt + Math.imul(Nn, Fr)) | 0), + (Ut = (Ut + Math.imul(Nn, ao)) | 0), + (Ft = (Ft + Math.imul(Qt, Dr)) | 0), + (Nt = (Nt + Math.imul(Qt, go)) | 0), + (Nt = (Nt + Math.imul(_n, Dr)) | 0), + (Ut = (Ut + Math.imul(_n, go)) | 0), + (Ft = (Ft + Math.imul(hn, Mn)) | 0), + (Nt = (Nt + Math.imul(hn, dn)) | 0), + (Nt = (Nt + Math.imul(vn, Mn)) | 0), + (Ut = (Ut + Math.imul(vn, dn)) | 0), + (Ft = (Ft + Math.imul(Kt, En)) | 0), + (Nt = (Nt + Math.imul(Kt, Ln)) | 0), + (Nt = (Nt + Math.imul(rn, En)) | 0), + (Ut = (Ut + Math.imul(rn, Ln)) | 0), + (Ft = (Ft + Math.imul(Ht, Kn)) | 0), + (Nt = (Nt + Math.imul(Ht, nr)) | 0), + (Nt = (Nt + Math.imul(en, Kn)) | 0), + (Ut = (Ut + Math.imul(en, nr)) | 0) + var wr = (((zt + Ft) | 0) + ((Nt & 8191) << 13)) | 0 + ;(zt = (((Ut + (Nt >>> 13)) | 0) + (wr >>> 26)) | 0), + (wr &= 67108863), + (Ft = Math.imul(Sn, qn)), + (Nt = Math.imul(Sn, zn)), + (Nt = (Nt + Math.imul(Rn, qn)) | 0), + (Ut = Math.imul(Rn, zn)), + (Ft = (Ft + Math.imul(un, Hn)) | 0), + (Nt = (Nt + Math.imul(un, pr)) | 0), + (Nt = (Nt + Math.imul(Zt, Hn)) | 0), + (Ut = (Ut + Math.imul(Zt, pr)) | 0), + (Ft = (Ft + Math.imul(pn, xr)) | 0), + (Nt = (Nt + Math.imul(pn, io)) | 0), + (Nt = (Nt + Math.imul(kn, xr)) | 0), + (Ut = (Ut + Math.imul(kn, io)) | 0), + (Ft = (Ft + Math.imul(An, Ar)) | 0), + (Nt = (Nt + Math.imul(An, qr)) | 0), + (Nt = (Nt + Math.imul(wn, Ar)) | 0), + (Ut = (Ut + Math.imul(wn, qr)) | 0), + (Ft = (Ft + Math.imul(cn, Fr)) | 0), + (Nt = (Nt + Math.imul(cn, ao)) | 0), + (Nt = (Nt + Math.imul(mn, Fr)) | 0), + (Ut = (Ut + Math.imul(mn, ao)) | 0), + (Ft = (Ft + Math.imul($n, Dr)) | 0), + (Nt = (Nt + Math.imul($n, go)) | 0), + (Nt = (Nt + Math.imul(Nn, Dr)) | 0), + (Ut = (Ut + Math.imul(Nn, go)) | 0), + (Ft = (Ft + Math.imul(Qt, Mn)) | 0), + (Nt = (Nt + Math.imul(Qt, dn)) | 0), + (Nt = (Nt + Math.imul(_n, Mn)) | 0), + (Ut = (Ut + Math.imul(_n, dn)) | 0), + (Ft = (Ft + Math.imul(hn, En)) | 0), + (Nt = (Nt + Math.imul(hn, Ln)) | 0), + (Nt = (Nt + Math.imul(vn, En)) | 0), + (Ut = (Ut + Math.imul(vn, Ln)) | 0), + (Ft = (Ft + Math.imul(Kt, Kn)) | 0), + (Nt = (Nt + Math.imul(Kt, nr)) | 0), + (Nt = (Nt + Math.imul(rn, Kn)) | 0), + (Ut = (Ut + Math.imul(rn, nr)) | 0) + var Mr = (((zt + Ft) | 0) + ((Nt & 8191) << 13)) | 0 + ;(zt = (((Ut + (Nt >>> 13)) | 0) + (Mr >>> 26)) | 0), + (Mr &= 67108863), + (Ft = Math.imul(Sn, Hn)), + (Nt = Math.imul(Sn, pr)), + (Nt = (Nt + Math.imul(Rn, Hn)) | 0), + (Ut = Math.imul(Rn, pr)), + (Ft = (Ft + Math.imul(un, xr)) | 0), + (Nt = (Nt + Math.imul(un, io)) | 0), + (Nt = (Nt + Math.imul(Zt, xr)) | 0), + (Ut = (Ut + Math.imul(Zt, io)) | 0), + (Ft = (Ft + Math.imul(pn, Ar)) | 0), + (Nt = (Nt + Math.imul(pn, qr)) | 0), + (Nt = (Nt + Math.imul(kn, Ar)) | 0), + (Ut = (Ut + Math.imul(kn, qr)) | 0), + (Ft = (Ft + Math.imul(An, Fr)) | 0), + (Nt = (Nt + Math.imul(An, ao)) | 0), + (Nt = (Nt + Math.imul(wn, Fr)) | 0), + (Ut = (Ut + Math.imul(wn, ao)) | 0), + (Ft = (Ft + Math.imul(cn, Dr)) | 0), + (Nt = (Nt + Math.imul(cn, go)) | 0), + (Nt = (Nt + Math.imul(mn, Dr)) | 0), + (Ut = (Ut + Math.imul(mn, go)) | 0), + (Ft = (Ft + Math.imul($n, Mn)) | 0), + (Nt = (Nt + Math.imul($n, dn)) | 0), + (Nt = (Nt + Math.imul(Nn, Mn)) | 0), + (Ut = (Ut + Math.imul(Nn, dn)) | 0), + (Ft = (Ft + Math.imul(Qt, En)) | 0), + (Nt = (Nt + Math.imul(Qt, Ln)) | 0), + (Nt = (Nt + Math.imul(_n, En)) | 0), + (Ut = (Ut + Math.imul(_n, Ln)) | 0), + (Ft = (Ft + Math.imul(hn, Kn)) | 0), + (Nt = (Nt + Math.imul(hn, nr)) | 0), + (Nt = (Nt + Math.imul(vn, Kn)) | 0), + (Ut = (Ut + Math.imul(vn, nr)) | 0) + var Ur = (((zt + Ft) | 0) + ((Nt & 8191) << 13)) | 0 + ;(zt = (((Ut + (Nt >>> 13)) | 0) + (Ur >>> 26)) | 0), + (Ur &= 67108863), + (Ft = Math.imul(Sn, xr)), + (Nt = Math.imul(Sn, io)), + (Nt = (Nt + Math.imul(Rn, xr)) | 0), + (Ut = Math.imul(Rn, io)), + (Ft = (Ft + Math.imul(un, Ar)) | 0), + (Nt = (Nt + Math.imul(un, qr)) | 0), + (Nt = (Nt + Math.imul(Zt, Ar)) | 0), + (Ut = (Ut + Math.imul(Zt, qr)) | 0), + (Ft = (Ft + Math.imul(pn, Fr)) | 0), + (Nt = (Nt + Math.imul(pn, ao)) | 0), + (Nt = (Nt + Math.imul(kn, Fr)) | 0), + (Ut = (Ut + Math.imul(kn, ao)) | 0), + (Ft = (Ft + Math.imul(An, Dr)) | 0), + (Nt = (Nt + Math.imul(An, go)) | 0), + (Nt = (Nt + Math.imul(wn, Dr)) | 0), + (Ut = (Ut + Math.imul(wn, go)) | 0), + (Ft = (Ft + Math.imul(cn, Mn)) | 0), + (Nt = (Nt + Math.imul(cn, dn)) | 0), + (Nt = (Nt + Math.imul(mn, Mn)) | 0), + (Ut = (Ut + Math.imul(mn, dn)) | 0), + (Ft = (Ft + Math.imul($n, En)) | 0), + (Nt = (Nt + Math.imul($n, Ln)) | 0), + (Nt = (Nt + Math.imul(Nn, En)) | 0), + (Ut = (Ut + Math.imul(Nn, Ln)) | 0), + (Ft = (Ft + Math.imul(Qt, Kn)) | 0), + (Nt = (Nt + Math.imul(Qt, nr)) | 0), + (Nt = (Nt + Math.imul(_n, Kn)) | 0), + (Ut = (Ut + Math.imul(_n, nr)) | 0) + var Rr = (((zt + Ft) | 0) + ((Nt & 8191) << 13)) | 0 + ;(zt = (((Ut + (Nt >>> 13)) | 0) + (Rr >>> 26)) | 0), + (Rr &= 67108863), + (Ft = Math.imul(Sn, Ar)), + (Nt = Math.imul(Sn, qr)), + (Nt = (Nt + Math.imul(Rn, Ar)) | 0), + (Ut = Math.imul(Rn, qr)), + (Ft = (Ft + Math.imul(un, Fr)) | 0), + (Nt = (Nt + Math.imul(un, ao)) | 0), + (Nt = (Nt + Math.imul(Zt, Fr)) | 0), + (Ut = (Ut + Math.imul(Zt, ao)) | 0), + (Ft = (Ft + Math.imul(pn, Dr)) | 0), + (Nt = (Nt + Math.imul(pn, go)) | 0), + (Nt = (Nt + Math.imul(kn, Dr)) | 0), + (Ut = (Ut + Math.imul(kn, go)) | 0), + (Ft = (Ft + Math.imul(An, Mn)) | 0), + (Nt = (Nt + Math.imul(An, dn)) | 0), + (Nt = (Nt + Math.imul(wn, Mn)) | 0), + (Ut = (Ut + Math.imul(wn, dn)) | 0), + (Ft = (Ft + Math.imul(cn, En)) | 0), + (Nt = (Nt + Math.imul(cn, Ln)) | 0), + (Nt = (Nt + Math.imul(mn, En)) | 0), + (Ut = (Ut + Math.imul(mn, Ln)) | 0), + (Ft = (Ft + Math.imul($n, Kn)) | 0), + (Nt = (Nt + Math.imul($n, nr)) | 0), + (Nt = (Nt + Math.imul(Nn, Kn)) | 0), + (Ut = (Ut + Math.imul(Nn, nr)) | 0) + var Pr = (((zt + Ft) | 0) + ((Nt & 8191) << 13)) | 0 + ;(zt = (((Ut + (Nt >>> 13)) | 0) + (Pr >>> 26)) | 0), + (Pr &= 67108863), + (Ft = Math.imul(Sn, Fr)), + (Nt = Math.imul(Sn, ao)), + (Nt = (Nt + Math.imul(Rn, Fr)) | 0), + (Ut = Math.imul(Rn, ao)), + (Ft = (Ft + Math.imul(un, Dr)) | 0), + (Nt = (Nt + Math.imul(un, go)) | 0), + (Nt = (Nt + Math.imul(Zt, Dr)) | 0), + (Ut = (Ut + Math.imul(Zt, go)) | 0), + (Ft = (Ft + Math.imul(pn, Mn)) | 0), + (Nt = (Nt + Math.imul(pn, dn)) | 0), + (Nt = (Nt + Math.imul(kn, Mn)) | 0), + (Ut = (Ut + Math.imul(kn, dn)) | 0), + (Ft = (Ft + Math.imul(An, En)) | 0), + (Nt = (Nt + Math.imul(An, Ln)) | 0), + (Nt = (Nt + Math.imul(wn, En)) | 0), + (Ut = (Ut + Math.imul(wn, Ln)) | 0), + (Ft = (Ft + Math.imul(cn, Kn)) | 0), + (Nt = (Nt + Math.imul(cn, nr)) | 0), + (Nt = (Nt + Math.imul(mn, Kn)) | 0), + (Ut = (Ut + Math.imul(mn, nr)) | 0) + var Lr = (((zt + Ft) | 0) + ((Nt & 8191) << 13)) | 0 + ;(zt = (((Ut + (Nt >>> 13)) | 0) + (Lr >>> 26)) | 0), + (Lr &= 67108863), + (Ft = Math.imul(Sn, Dr)), + (Nt = Math.imul(Sn, go)), + (Nt = (Nt + Math.imul(Rn, Dr)) | 0), + (Ut = Math.imul(Rn, go)), + (Ft = (Ft + Math.imul(un, Mn)) | 0), + (Nt = (Nt + Math.imul(un, dn)) | 0), + (Nt = (Nt + Math.imul(Zt, Mn)) | 0), + (Ut = (Ut + Math.imul(Zt, dn)) | 0), + (Ft = (Ft + Math.imul(pn, En)) | 0), + (Nt = (Nt + Math.imul(pn, Ln)) | 0), + (Nt = (Nt + Math.imul(kn, En)) | 0), + (Ut = (Ut + Math.imul(kn, Ln)) | 0), + (Ft = (Ft + Math.imul(An, Kn)) | 0), + (Nt = (Nt + Math.imul(An, nr)) | 0), + (Nt = (Nt + Math.imul(wn, Kn)) | 0), + (Ut = (Ut + Math.imul(wn, nr)) | 0) + var Wr = (((zt + Ft) | 0) + ((Nt & 8191) << 13)) | 0 + ;(zt = (((Ut + (Nt >>> 13)) | 0) + (Wr >>> 26)) | 0), + (Wr &= 67108863), + (Ft = Math.imul(Sn, Mn)), + (Nt = Math.imul(Sn, dn)), + (Nt = (Nt + Math.imul(Rn, Mn)) | 0), + (Ut = Math.imul(Rn, dn)), + (Ft = (Ft + Math.imul(un, En)) | 0), + (Nt = (Nt + Math.imul(un, Ln)) | 0), + (Nt = (Nt + Math.imul(Zt, En)) | 0), + (Ut = (Ut + Math.imul(Zt, Ln)) | 0), + (Ft = (Ft + Math.imul(pn, Kn)) | 0), + (Nt = (Nt + Math.imul(pn, nr)) | 0), + (Nt = (Nt + Math.imul(kn, Kn)) | 0), + (Ut = (Ut + Math.imul(kn, nr)) | 0) + var Br = (((zt + Ft) | 0) + ((Nt & 8191) << 13)) | 0 + ;(zt = (((Ut + (Nt >>> 13)) | 0) + (Br >>> 26)) | 0), + (Br &= 67108863), + (Ft = Math.imul(Sn, En)), + (Nt = Math.imul(Sn, Ln)), + (Nt = (Nt + Math.imul(Rn, En)) | 0), + (Ut = Math.imul(Rn, Ln)), + (Ft = (Ft + Math.imul(un, Kn)) | 0), + (Nt = (Nt + Math.imul(un, nr)) | 0), + (Nt = (Nt + Math.imul(Zt, Kn)) | 0), + (Ut = (Ut + Math.imul(Zt, nr)) | 0) + var tr = (((zt + Ft) | 0) + ((Nt & 8191) << 13)) | 0 + ;(zt = (((Ut + (Nt >>> 13)) | 0) + (tr >>> 26)) | 0), + (tr &= 67108863), + (Ft = Math.imul(Sn, Kn)), + (Nt = Math.imul(Sn, nr)), + (Nt = (Nt + Math.imul(Rn, Kn)) | 0), + (Ut = Math.imul(Rn, nr)) + var ir = (((zt + Ft) | 0) + ((Nt & 8191) << 13)) | 0 + return ( + (zt = (((Ut + (Nt >>> 13)) | 0) + (ir >>> 26)) | 0), + (ir &= 67108863), + (Wt[0] = lr), + (Wt[1] = cr), + (Wt[2] = Hr), + (Wt[3] = vr), + (Wt[4] = Nr), + (Wt[5] = Gr), + (Wt[6] = eo), + (Wt[7] = Zr), + (Wt[8] = Jr), + (Wt[9] = wr), + (Wt[10] = Mr), + (Wt[11] = Ur), + (Wt[12] = Rr), + (Wt[13] = Pr), + (Wt[14] = Lr), + (Wt[15] = Wr), + (Wt[16] = Br), + (Wt[17] = tr), + (Wt[18] = ir), + zt !== 0 && ((Wt[19] = zt), wt.length++), + wt + ) + } + Math.imul || (gt = mt) + function yt(jt, Pt, Ct) { + ;(Ct.negative = Pt.negative ^ jt.negative), (Ct.length = jt.length + Pt.length) + for (var wt = 0, It = 0, Ot = 0; Ot < Ct.length - 1; Ot++) { + var Wt = It + It = 0 + for ( + var zt = wt & 67108863, Ft = Math.min(Ot, Pt.length - 1), Nt = Math.max(0, Ot - jt.length + 1); + Nt <= Ft; + Nt++ + ) { + var Ut = Ot - Nt, + Mt = jt.words[Ut] | 0, + Ht = Pt.words[Nt] | 0, + en = Mt * Ht, + sn = en & 67108863 + ;(Wt = (Wt + ((en / 67108864) | 0)) | 0), + (sn = (sn + zt) | 0), + (zt = sn & 67108863), + (Wt = (Wt + (sn >>> 26)) | 0), + (It += Wt >>> 26), + (Wt &= 67108863) + } + ;(Ct.words[Ot] = zt), (wt = Wt), (Wt = It) + } + return wt !== 0 ? (Ct.words[Ot] = wt) : Ct.length--, Ct.strip() + } + function bt(jt, Pt, Ct) { + var wt = new vt() + return wt.mulp(jt, Pt, Ct) + } + ot.prototype.mulTo = function (Pt, Ct) { + var wt, + It = this.length + Pt.length + return ( + this.length === 10 && Pt.length === 10 + ? (wt = gt(this, Pt, Ct)) + : It < 63 + ? (wt = mt(this, Pt, Ct)) + : It < 1024 + ? (wt = yt(this, Pt, Ct)) + : (wt = bt(this, Pt, Ct)), + wt + ) + } + function vt(jt, Pt) { + ;(this.x = jt), (this.y = Pt) + } + ;(vt.prototype.makeRBT = function (Pt) { + for (var Ct = new Array(Pt), wt = ot.prototype._countBits(Pt) - 1, It = 0; It < Pt; It++) + Ct[It] = this.revBin(It, wt, Pt) + return Ct + }), + (vt.prototype.revBin = function (Pt, Ct, wt) { + if (Pt === 0 || Pt === wt - 1) return Pt + for (var It = 0, Ot = 0; Ot < Ct; Ot++) (It |= (Pt & 1) << (Ct - Ot - 1)), (Pt >>= 1) + return It + }), + (vt.prototype.permute = function (Pt, Ct, wt, It, Ot, Wt) { + for (var zt = 0; zt < Wt; zt++) (It[zt] = Ct[Pt[zt]]), (Ot[zt] = wt[Pt[zt]]) + }), + (vt.prototype.transform = function (Pt, Ct, wt, It, Ot, Wt) { + this.permute(Wt, Pt, Ct, wt, It, Ot) + for (var zt = 1; zt < Ot; zt <<= 1) + for ( + var Ft = zt << 1, Nt = Math.cos((2 * Math.PI) / Ft), Ut = Math.sin((2 * Math.PI) / Ft), Mt = 0; + Mt < Ot; + Mt += Ft + ) + for (var Ht = Nt, en = Ut, sn = 0; sn < zt; sn++) { + var Kt = wt[Mt + sn], + rn = It[Mt + sn], + nn = wt[Mt + sn + zt], + hn = It[Mt + sn + zt], + vn = Ht * nn - en * hn + ;(hn = Ht * hn + en * nn), + (nn = vn), + (wt[Mt + sn] = Kt + nn), + (It[Mt + sn] = rn + hn), + (wt[Mt + sn + zt] = Kt - nn), + (It[Mt + sn + zt] = rn - hn), + sn !== Ft && ((vn = Nt * Ht - Ut * en), (en = Nt * en + Ut * Ht), (Ht = vn)) + } + }), + (vt.prototype.guessLen13b = function (Pt, Ct) { + var wt = Math.max(Ct, Pt) | 1, + It = wt & 1, + Ot = 0 + for (wt = (wt / 2) | 0; wt; wt = wt >>> 1) Ot++ + return 1 << (Ot + 1 + It) + }), + (vt.prototype.conjugate = function (Pt, Ct, wt) { + if (!(wt <= 1)) + for (var It = 0; It < wt / 2; It++) { + var Ot = Pt[It] + ;(Pt[It] = Pt[wt - It - 1]), + (Pt[wt - It - 1] = Ot), + (Ot = Ct[It]), + (Ct[It] = -Ct[wt - It - 1]), + (Ct[wt - It - 1] = -Ot) + } + }), + (vt.prototype.normalize13b = function (Pt, Ct) { + for (var wt = 0, It = 0; It < Ct / 2; It++) { + var Ot = Math.round(Pt[2 * It + 1] / Ct) * 8192 + Math.round(Pt[2 * It] / Ct) + wt + ;(Pt[It] = Ot & 67108863), Ot < 67108864 ? (wt = 0) : (wt = (Ot / 67108864) | 0) + } + return Pt + }), + (vt.prototype.convert13b = function (Pt, Ct, wt, It) { + for (var Ot = 0, Wt = 0; Wt < Ct; Wt++) + (Ot = Ot + (Pt[Wt] | 0)), + (wt[2 * Wt] = Ot & 8191), + (Ot = Ot >>> 13), + (wt[2 * Wt + 1] = Ot & 8191), + (Ot = Ot >>> 13) + for (Wt = 2 * Ct; Wt < It; ++Wt) wt[Wt] = 0 + rt(Ot === 0), rt((Ot & -8192) === 0) + }), + (vt.prototype.stub = function (Pt) { + for (var Ct = new Array(Pt), wt = 0; wt < Pt; wt++) Ct[wt] = 0 + return Ct + }), + (vt.prototype.mulp = function (Pt, Ct, wt) { + var It = 2 * this.guessLen13b(Pt.length, Ct.length), + Ot = this.makeRBT(It), + Wt = this.stub(It), + zt = new Array(It), + Ft = new Array(It), + Nt = new Array(It), + Ut = new Array(It), + Mt = new Array(It), + Ht = new Array(It), + en = wt.words + ;(en.length = It), + this.convert13b(Pt.words, Pt.length, zt, It), + this.convert13b(Ct.words, Ct.length, Ut, It), + this.transform(zt, Wt, Ft, Nt, It, Ot), + this.transform(Ut, Wt, Mt, Ht, It, Ot) + for (var sn = 0; sn < It; sn++) { + var Kt = Ft[sn] * Mt[sn] - Nt[sn] * Ht[sn] + ;(Nt[sn] = Ft[sn] * Ht[sn] + Nt[sn] * Mt[sn]), (Ft[sn] = Kt) + } + return ( + this.conjugate(Ft, Nt, It), + this.transform(Ft, Nt, en, Wt, It, Ot), + this.conjugate(en, Wt, It), + this.normalize13b(en, It), + (wt.negative = Pt.negative ^ Ct.negative), + (wt.length = Pt.length + Ct.length), + wt.strip() + ) + }), + (ot.prototype.mul = function (Pt) { + var Ct = new ot(null) + return (Ct.words = new Array(this.length + Pt.length)), this.mulTo(Pt, Ct) + }), + (ot.prototype.mulf = function (Pt) { + var Ct = new ot(null) + return (Ct.words = new Array(this.length + Pt.length)), bt(this, Pt, Ct) + }), + (ot.prototype.imul = function (Pt) { + return this.clone().mulTo(Pt, this) + }), + (ot.prototype.imuln = function (Pt) { + rt(typeof Pt == 'number'), rt(Pt < 67108864) + for (var Ct = 0, wt = 0; wt < this.length; wt++) { + var It = (this.words[wt] | 0) * Pt, + Ot = (It & 67108863) + (Ct & 67108863) + ;(Ct >>= 26), (Ct += (It / 67108864) | 0), (Ct += Ot >>> 26), (this.words[wt] = Ot & 67108863) + } + return Ct !== 0 && ((this.words[wt] = Ct), this.length++), this + }), + (ot.prototype.muln = function (Pt) { + return this.clone().imuln(Pt) + }), + (ot.prototype.sqr = function () { + return this.mul(this) + }), + (ot.prototype.isqr = function () { + return this.imul(this.clone()) + }), + (ot.prototype.pow = function (Pt) { + var Ct = pt(Pt) + if (Ct.length === 0) return new ot(1) + for (var wt = this, It = 0; It < Ct.length && Ct[It] === 0; It++, wt = wt.sqr()); + if (++It < Ct.length) + for (var Ot = wt.sqr(); It < Ct.length; It++, Ot = Ot.sqr()) Ct[It] !== 0 && (wt = wt.mul(Ot)) + return wt + }), + (ot.prototype.iushln = function (Pt) { + rt(typeof Pt == 'number' && Pt >= 0) + var Ct = Pt % 26, + wt = (Pt - Ct) / 26, + It = (67108863 >>> (26 - Ct)) << (26 - Ct), + Ot + if (Ct !== 0) { + var Wt = 0 + for (Ot = 0; Ot < this.length; Ot++) { + var zt = this.words[Ot] & It, + Ft = ((this.words[Ot] | 0) - zt) << Ct + ;(this.words[Ot] = Ft | Wt), (Wt = zt >>> (26 - Ct)) + } + Wt && ((this.words[Ot] = Wt), this.length++) + } + if (wt !== 0) { + for (Ot = this.length - 1; Ot >= 0; Ot--) this.words[Ot + wt] = this.words[Ot] + for (Ot = 0; Ot < wt; Ot++) this.words[Ot] = 0 + this.length += wt + } + return this.strip() + }), + (ot.prototype.ishln = function (Pt) { + return rt(this.negative === 0), this.iushln(Pt) + }), + (ot.prototype.iushrn = function (Pt, Ct, wt) { + rt(typeof Pt == 'number' && Pt >= 0) + var It + Ct ? (It = (Ct - (Ct % 26)) / 26) : (It = 0) + var Ot = Pt % 26, + Wt = Math.min((Pt - Ot) / 26, this.length), + zt = 67108863 ^ ((67108863 >>> Ot) << Ot), + Ft = wt + if (((It -= Wt), (It = Math.max(0, It)), Ft)) { + for (var Nt = 0; Nt < Wt; Nt++) Ft.words[Nt] = this.words[Nt] + Ft.length = Wt + } + if (Wt !== 0) + if (this.length > Wt) + for (this.length -= Wt, Nt = 0; Nt < this.length; Nt++) this.words[Nt] = this.words[Nt + Wt] + else (this.words[0] = 0), (this.length = 1) + var Ut = 0 + for (Nt = this.length - 1; Nt >= 0 && (Ut !== 0 || Nt >= It); Nt--) { + var Mt = this.words[Nt] | 0 + ;(this.words[Nt] = (Ut << (26 - Ot)) | (Mt >>> Ot)), (Ut = Mt & zt) + } + return ( + Ft && Ut !== 0 && (Ft.words[Ft.length++] = Ut), + this.length === 0 && ((this.words[0] = 0), (this.length = 1)), + this.strip() + ) + }), + (ot.prototype.ishrn = function (Pt, Ct, wt) { + return rt(this.negative === 0), this.iushrn(Pt, Ct, wt) + }), + (ot.prototype.shln = function (Pt) { + return this.clone().ishln(Pt) + }), + (ot.prototype.ushln = function (Pt) { + return this.clone().iushln(Pt) + }), + (ot.prototype.shrn = function (Pt) { + return this.clone().ishrn(Pt) + }), + (ot.prototype.ushrn = function (Pt) { + return this.clone().iushrn(Pt) + }), + (ot.prototype.testn = function (Pt) { + rt(typeof Pt == 'number' && Pt >= 0) + var Ct = Pt % 26, + wt = (Pt - Ct) / 26, + It = 1 << Ct + if (this.length <= wt) return !1 + var Ot = this.words[wt] + return !!(Ot & It) + }), + (ot.prototype.imaskn = function (Pt) { + rt(typeof Pt == 'number' && Pt >= 0) + var Ct = Pt % 26, + wt = (Pt - Ct) / 26 + if ((rt(this.negative === 0, 'imaskn works only with positive numbers'), this.length <= wt)) return this + if ((Ct !== 0 && wt++, (this.length = Math.min(wt, this.length)), Ct !== 0)) { + var It = 67108863 ^ ((67108863 >>> Ct) << Ct) + this.words[this.length - 1] &= It + } + return this.strip() + }), + (ot.prototype.maskn = function (Pt) { + return this.clone().imaskn(Pt) + }), + (ot.prototype.iaddn = function (Pt) { + return ( + rt(typeof Pt == 'number'), + rt(Pt < 67108864), + Pt < 0 + ? this.isubn(-Pt) + : this.negative !== 0 + ? this.length === 1 && (this.words[0] | 0) < Pt + ? ((this.words[0] = Pt - (this.words[0] | 0)), (this.negative = 0), this) + : ((this.negative = 0), this.isubn(Pt), (this.negative = 1), this) + : this._iaddn(Pt) + ) + }), + (ot.prototype._iaddn = function (Pt) { + this.words[0] += Pt + for (var Ct = 0; Ct < this.length && this.words[Ct] >= 67108864; Ct++) + (this.words[Ct] -= 67108864), Ct === this.length - 1 ? (this.words[Ct + 1] = 1) : this.words[Ct + 1]++ + return (this.length = Math.max(this.length, Ct + 1)), this + }), + (ot.prototype.isubn = function (Pt) { + if ((rt(typeof Pt == 'number'), rt(Pt < 67108864), Pt < 0)) return this.iaddn(-Pt) + if (this.negative !== 0) return (this.negative = 0), this.iaddn(Pt), (this.negative = 1), this + if (((this.words[0] -= Pt), this.length === 1 && this.words[0] < 0)) + (this.words[0] = -this.words[0]), (this.negative = 1) + else + for (var Ct = 0; Ct < this.length && this.words[Ct] < 0; Ct++) + (this.words[Ct] += 67108864), (this.words[Ct + 1] -= 1) + return this.strip() + }), + (ot.prototype.addn = function (Pt) { + return this.clone().iaddn(Pt) + }), + (ot.prototype.subn = function (Pt) { + return this.clone().isubn(Pt) + }), + (ot.prototype.iabs = function () { + return (this.negative = 0), this + }), + (ot.prototype.abs = function () { + return this.clone().iabs() + }), + (ot.prototype._ishlnsubmul = function (Pt, Ct, wt) { + var It = Pt.length + wt, + Ot + this._expand(It) + var Wt, + zt = 0 + for (Ot = 0; Ot < Pt.length; Ot++) { + Wt = (this.words[Ot + wt] | 0) + zt + var Ft = (Pt.words[Ot] | 0) * Ct + ;(Wt -= Ft & 67108863), (zt = (Wt >> 26) - ((Ft / 67108864) | 0)), (this.words[Ot + wt] = Wt & 67108863) + } + for (; Ot < this.length - wt; Ot++) + (Wt = (this.words[Ot + wt] | 0) + zt), (zt = Wt >> 26), (this.words[Ot + wt] = Wt & 67108863) + if (zt === 0) return this.strip() + for (rt(zt === -1), zt = 0, Ot = 0; Ot < this.length; Ot++) + (Wt = -(this.words[Ot] | 0) + zt), (zt = Wt >> 26), (this.words[Ot] = Wt & 67108863) + return (this.negative = 1), this.strip() + }), + (ot.prototype._wordDiv = function (Pt, Ct) { + var wt = this.length - Pt.length, + It = this.clone(), + Ot = Pt, + Wt = Ot.words[Ot.length - 1] | 0, + zt = this._countBits(Wt) + ;(wt = 26 - zt), wt !== 0 && ((Ot = Ot.ushln(wt)), It.iushln(wt), (Wt = Ot.words[Ot.length - 1] | 0)) + var Ft = It.length - Ot.length, + Nt + if (Ct !== 'mod') { + ;(Nt = new ot(null)), (Nt.length = Ft + 1), (Nt.words = new Array(Nt.length)) + for (var Ut = 0; Ut < Nt.length; Ut++) Nt.words[Ut] = 0 + } + var Mt = It.clone()._ishlnsubmul(Ot, 1, Ft) + Mt.negative === 0 && ((It = Mt), Nt && (Nt.words[Ft] = 1)) + for (var Ht = Ft - 1; Ht >= 0; Ht--) { + var en = (It.words[Ot.length + Ht] | 0) * 67108864 + (It.words[Ot.length + Ht - 1] | 0) + for (en = Math.min((en / Wt) | 0, 67108863), It._ishlnsubmul(Ot, en, Ht); It.negative !== 0; ) + en--, (It.negative = 0), It._ishlnsubmul(Ot, 1, Ht), It.isZero() || (It.negative ^= 1) + Nt && (Nt.words[Ht] = en) + } + return Nt && Nt.strip(), It.strip(), Ct !== 'div' && wt !== 0 && It.iushrn(wt), { div: Nt || null, mod: It } + }), + (ot.prototype.divmod = function (Pt, Ct, wt) { + if ((rt(!Pt.isZero()), this.isZero())) return { div: new ot(0), mod: new ot(0) } + var It, Ot, Wt + return this.negative !== 0 && Pt.negative === 0 + ? ((Wt = this.neg().divmod(Pt, Ct)), + Ct !== 'mod' && (It = Wt.div.neg()), + Ct !== 'div' && ((Ot = Wt.mod.neg()), wt && Ot.negative !== 0 && Ot.iadd(Pt)), + { div: It, mod: Ot }) + : this.negative === 0 && Pt.negative !== 0 + ? ((Wt = this.divmod(Pt.neg(), Ct)), Ct !== 'mod' && (It = Wt.div.neg()), { div: It, mod: Wt.mod }) + : this.negative & Pt.negative + ? ((Wt = this.neg().divmod(Pt.neg(), Ct)), + Ct !== 'div' && ((Ot = Wt.mod.neg()), wt && Ot.negative !== 0 && Ot.isub(Pt)), + { div: Wt.div, mod: Ot }) + : Pt.length > this.length || this.cmp(Pt) < 0 + ? { div: new ot(0), mod: this } + : Pt.length === 1 + ? Ct === 'div' + ? { div: this.divn(Pt.words[0]), mod: null } + : Ct === 'mod' + ? { div: null, mod: new ot(this.modn(Pt.words[0])) } + : { div: this.divn(Pt.words[0]), mod: new ot(this.modn(Pt.words[0])) } + : this._wordDiv(Pt, Ct) + }), + (ot.prototype.div = function (Pt) { + return this.divmod(Pt, 'div', !1).div + }), + (ot.prototype.mod = function (Pt) { + return this.divmod(Pt, 'mod', !1).mod + }), + (ot.prototype.umod = function (Pt) { + return this.divmod(Pt, 'mod', !0).mod + }), + (ot.prototype.divRound = function (Pt) { + var Ct = this.divmod(Pt) + if (Ct.mod.isZero()) return Ct.div + var wt = Ct.div.negative !== 0 ? Ct.mod.isub(Pt) : Ct.mod, + It = Pt.ushrn(1), + Ot = Pt.andln(1), + Wt = wt.cmp(It) + return Wt < 0 || (Ot === 1 && Wt === 0) ? Ct.div : Ct.div.negative !== 0 ? Ct.div.isubn(1) : Ct.div.iaddn(1) + }), + (ot.prototype.modn = function (Pt) { + rt(Pt <= 67108863) + for (var Ct = (1 << 26) % Pt, wt = 0, It = this.length - 1; It >= 0; It--) + wt = (Ct * wt + (this.words[It] | 0)) % Pt + return wt + }), + (ot.prototype.idivn = function (Pt) { + rt(Pt <= 67108863) + for (var Ct = 0, wt = this.length - 1; wt >= 0; wt--) { + var It = (this.words[wt] | 0) + Ct * 67108864 + ;(this.words[wt] = (It / Pt) | 0), (Ct = It % Pt) + } + return this.strip() + }), + (ot.prototype.divn = function (Pt) { + return this.clone().idivn(Pt) + }), + (ot.prototype.egcd = function (Pt) { + rt(Pt.negative === 0), rt(!Pt.isZero()) + var Ct = this, + wt = Pt.clone() + Ct.negative !== 0 ? (Ct = Ct.umod(Pt)) : (Ct = Ct.clone()) + for (var It = new ot(1), Ot = new ot(0), Wt = new ot(0), zt = new ot(1), Ft = 0; Ct.isEven() && wt.isEven(); ) + Ct.iushrn(1), wt.iushrn(1), ++Ft + for (var Nt = wt.clone(), Ut = Ct.clone(); !Ct.isZero(); ) { + for (var Mt = 0, Ht = 1; !(Ct.words[0] & Ht) && Mt < 26; ++Mt, Ht <<= 1); + if (Mt > 0) + for (Ct.iushrn(Mt); Mt-- > 0; ) + (It.isOdd() || Ot.isOdd()) && (It.iadd(Nt), Ot.isub(Ut)), It.iushrn(1), Ot.iushrn(1) + for (var en = 0, sn = 1; !(wt.words[0] & sn) && en < 26; ++en, sn <<= 1); + if (en > 0) + for (wt.iushrn(en); en-- > 0; ) + (Wt.isOdd() || zt.isOdd()) && (Wt.iadd(Nt), zt.isub(Ut)), Wt.iushrn(1), zt.iushrn(1) + Ct.cmp(wt) >= 0 ? (Ct.isub(wt), It.isub(Wt), Ot.isub(zt)) : (wt.isub(Ct), Wt.isub(It), zt.isub(Ot)) + } + return { a: Wt, b: zt, gcd: wt.iushln(Ft) } + }), + (ot.prototype._invmp = function (Pt) { + rt(Pt.negative === 0), rt(!Pt.isZero()) + var Ct = this, + wt = Pt.clone() + Ct.negative !== 0 ? (Ct = Ct.umod(Pt)) : (Ct = Ct.clone()) + for (var It = new ot(1), Ot = new ot(0), Wt = wt.clone(); Ct.cmpn(1) > 0 && wt.cmpn(1) > 0; ) { + for (var zt = 0, Ft = 1; !(Ct.words[0] & Ft) && zt < 26; ++zt, Ft <<= 1); + if (zt > 0) for (Ct.iushrn(zt); zt-- > 0; ) It.isOdd() && It.iadd(Wt), It.iushrn(1) + for (var Nt = 0, Ut = 1; !(wt.words[0] & Ut) && Nt < 26; ++Nt, Ut <<= 1); + if (Nt > 0) for (wt.iushrn(Nt); Nt-- > 0; ) Ot.isOdd() && Ot.iadd(Wt), Ot.iushrn(1) + Ct.cmp(wt) >= 0 ? (Ct.isub(wt), It.isub(Ot)) : (wt.isub(Ct), Ot.isub(It)) + } + var Mt + return Ct.cmpn(1) === 0 ? (Mt = It) : (Mt = Ot), Mt.cmpn(0) < 0 && Mt.iadd(Pt), Mt + }), + (ot.prototype.gcd = function (Pt) { + if (this.isZero()) return Pt.abs() + if (Pt.isZero()) return this.abs() + var Ct = this.clone(), + wt = Pt.clone() + ;(Ct.negative = 0), (wt.negative = 0) + for (var It = 0; Ct.isEven() && wt.isEven(); It++) Ct.iushrn(1), wt.iushrn(1) + do { + for (; Ct.isEven(); ) Ct.iushrn(1) + for (; wt.isEven(); ) wt.iushrn(1) + var Ot = Ct.cmp(wt) + if (Ot < 0) { + var Wt = Ct + ;(Ct = wt), (wt = Wt) + } else if (Ot === 0 || wt.cmpn(1) === 0) break + Ct.isub(wt) + } while (!0) + return wt.iushln(It) + }), + (ot.prototype.invm = function (Pt) { + return this.egcd(Pt).a.umod(Pt) + }), + (ot.prototype.isEven = function () { + return (this.words[0] & 1) === 0 + }), + (ot.prototype.isOdd = function () { + return (this.words[0] & 1) === 1 + }), + (ot.prototype.andln = function (Pt) { + return this.words[0] & Pt + }), + (ot.prototype.bincn = function (Pt) { + rt(typeof Pt == 'number') + var Ct = Pt % 26, + wt = (Pt - Ct) / 26, + It = 1 << Ct + if (this.length <= wt) return this._expand(wt + 1), (this.words[wt] |= It), this + for (var Ot = It, Wt = wt; Ot !== 0 && Wt < this.length; Wt++) { + var zt = this.words[Wt] | 0 + ;(zt += Ot), (Ot = zt >>> 26), (zt &= 67108863), (this.words[Wt] = zt) + } + return Ot !== 0 && ((this.words[Wt] = Ot), this.length++), this + }), + (ot.prototype.isZero = function () { + return this.length === 1 && this.words[0] === 0 + }), + (ot.prototype.cmpn = function (Pt) { + var Ct = Pt < 0 + if (this.negative !== 0 && !Ct) return -1 + if (this.negative === 0 && Ct) return 1 + this.strip() + var wt + if (this.length > 1) wt = 1 + else { + Ct && (Pt = -Pt), rt(Pt <= 67108863, 'Number is too big') + var It = this.words[0] | 0 + wt = It === Pt ? 0 : It < Pt ? -1 : 1 + } + return this.negative !== 0 ? -wt | 0 : wt + }), + (ot.prototype.cmp = function (Pt) { + if (this.negative !== 0 && Pt.negative === 0) return -1 + if (this.negative === 0 && Pt.negative !== 0) return 1 + var Ct = this.ucmp(Pt) + return this.negative !== 0 ? -Ct | 0 : Ct + }), + (ot.prototype.ucmp = function (Pt) { + if (this.length > Pt.length) return 1 + if (this.length < Pt.length) return -1 + for (var Ct = 0, wt = this.length - 1; wt >= 0; wt--) { + var It = this.words[wt] | 0, + Ot = Pt.words[wt] | 0 + if (It !== Ot) { + It < Ot ? (Ct = -1) : It > Ot && (Ct = 1) + break + } + } + return Ct + }), + (ot.prototype.gtn = function (Pt) { + return this.cmpn(Pt) === 1 + }), + (ot.prototype.gt = function (Pt) { + return this.cmp(Pt) === 1 + }), + (ot.prototype.gten = function (Pt) { + return this.cmpn(Pt) >= 0 + }), + (ot.prototype.gte = function (Pt) { + return this.cmp(Pt) >= 0 + }), + (ot.prototype.ltn = function (Pt) { + return this.cmpn(Pt) === -1 + }), + (ot.prototype.lt = function (Pt) { + return this.cmp(Pt) === -1 + }), + (ot.prototype.lten = function (Pt) { + return this.cmpn(Pt) <= 0 + }), + (ot.prototype.lte = function (Pt) { + return this.cmp(Pt) <= 0 + }), + (ot.prototype.eqn = function (Pt) { + return this.cmpn(Pt) === 0 + }), + (ot.prototype.eq = function (Pt) { + return this.cmp(Pt) === 0 + }), + (ot.red = function (Pt) { + return new $t(Pt) + }), + (ot.prototype.toRed = function (Pt) { + return ( + rt(!this.red, 'Already a number in reduction context'), + rt(this.negative === 0, 'red works only with positives'), + Pt.convertTo(this)._forceRed(Pt) + ) + }), + (ot.prototype.fromRed = function () { + return rt(this.red, 'fromRed works only with numbers in reduction context'), this.red.convertFrom(this) + }), + (ot.prototype._forceRed = function (Pt) { + return (this.red = Pt), this + }), + (ot.prototype.forceRed = function (Pt) { + return rt(!this.red, 'Already a number in reduction context'), this._forceRed(Pt) + }), + (ot.prototype.redAdd = function (Pt) { + return rt(this.red, 'redAdd works only with red numbers'), this.red.add(this, Pt) + }), + (ot.prototype.redIAdd = function (Pt) { + return rt(this.red, 'redIAdd works only with red numbers'), this.red.iadd(this, Pt) + }), + (ot.prototype.redSub = function (Pt) { + return rt(this.red, 'redSub works only with red numbers'), this.red.sub(this, Pt) + }), + (ot.prototype.redISub = function (Pt) { + return rt(this.red, 'redISub works only with red numbers'), this.red.isub(this, Pt) + }), + (ot.prototype.redShl = function (Pt) { + return rt(this.red, 'redShl works only with red numbers'), this.red.shl(this, Pt) + }), + (ot.prototype.redMul = function (Pt) { + return rt(this.red, 'redMul works only with red numbers'), this.red._verify2(this, Pt), this.red.mul(this, Pt) + }), + (ot.prototype.redIMul = function (Pt) { + return ( + rt(this.red, 'redMul works only with red numbers'), this.red._verify2(this, Pt), this.red.imul(this, Pt) + ) + }), + (ot.prototype.redSqr = function () { + return rt(this.red, 'redSqr works only with red numbers'), this.red._verify1(this), this.red.sqr(this) + }), + (ot.prototype.redISqr = function () { + return rt(this.red, 'redISqr works only with red numbers'), this.red._verify1(this), this.red.isqr(this) + }), + (ot.prototype.redSqrt = function () { + return rt(this.red, 'redSqrt works only with red numbers'), this.red._verify1(this), this.red.sqrt(this) + }), + (ot.prototype.redInvm = function () { + return rt(this.red, 'redInvm works only with red numbers'), this.red._verify1(this), this.red.invm(this) + }), + (ot.prototype.redNeg = function () { + return rt(this.red, 'redNeg works only with red numbers'), this.red._verify1(this), this.red.neg(this) + }), + (ot.prototype.redPow = function (Pt) { + return rt(this.red && !Pt.red, 'redPow(normalNum)'), this.red._verify1(this), this.red.pow(this, Pt) + }) + var xt = { k256: null, p224: null, p192: null, p25519: null } + function kt(jt, Pt) { + ;(this.name = jt), + (this.p = new ot(Pt, 16)), + (this.n = this.p.bitLength()), + (this.k = new ot(1).iushln(this.n).isub(this.p)), + (this.tmp = this._tmp()) + } + ;(kt.prototype._tmp = function () { + var Pt = new ot(null) + return (Pt.words = new Array(Math.ceil(this.n / 13))), Pt + }), + (kt.prototype.ireduce = function (Pt) { + var Ct = Pt, + wt + do this.split(Ct, this.tmp), (Ct = this.imulK(Ct)), (Ct = Ct.iadd(this.tmp)), (wt = Ct.bitLength()) + while (wt > this.n) + var It = wt < this.n ? -1 : Ct.ucmp(this.p) + return ( + It === 0 + ? ((Ct.words[0] = 0), (Ct.length = 1)) + : It > 0 + ? Ct.isub(this.p) + : Ct.strip !== void 0 + ? Ct.strip() + : Ct._strip(), + Ct + ) + }), + (kt.prototype.split = function (Pt, Ct) { + Pt.iushrn(this.n, 0, Ct) + }), + (kt.prototype.imulK = function (Pt) { + return Pt.imul(this.k) + }) + function St() { + kt.call(this, 'k256', 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f') + } + it(St, kt), + (St.prototype.split = function (Pt, Ct) { + for (var wt = 4194303, It = Math.min(Pt.length, 9), Ot = 0; Ot < It; Ot++) Ct.words[Ot] = Pt.words[Ot] + if (((Ct.length = It), Pt.length <= 9)) { + ;(Pt.words[0] = 0), (Pt.length = 1) + return + } + var Wt = Pt.words[9] + for (Ct.words[Ct.length++] = Wt & wt, Ot = 10; Ot < Pt.length; Ot++) { + var zt = Pt.words[Ot] | 0 + ;(Pt.words[Ot - 10] = ((zt & wt) << 4) | (Wt >>> 22)), (Wt = zt) + } + ;(Wt >>>= 22), (Pt.words[Ot - 10] = Wt), Wt === 0 && Pt.length > 10 ? (Pt.length -= 10) : (Pt.length -= 9) + }), + (St.prototype.imulK = function (Pt) { + ;(Pt.words[Pt.length] = 0), (Pt.words[Pt.length + 1] = 0), (Pt.length += 2) + for (var Ct = 0, wt = 0; wt < Pt.length; wt++) { + var It = Pt.words[wt] | 0 + ;(Ct += It * 977), (Pt.words[wt] = Ct & 67108863), (Ct = It * 64 + ((Ct / 67108864) | 0)) + } + return Pt.words[Pt.length - 1] === 0 && (Pt.length--, Pt.words[Pt.length - 1] === 0 && Pt.length--), Pt + }) + function Tt() { + kt.call(this, 'p224', 'ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001') + } + it(Tt, kt) + function At() { + kt.call(this, 'p192', 'ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff') + } + it(At, kt) + function Et() { + kt.call(this, '25519', '7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed') + } + it(Et, kt), + (Et.prototype.imulK = function (Pt) { + for (var Ct = 0, wt = 0; wt < Pt.length; wt++) { + var It = (Pt.words[wt] | 0) * 19 + Ct, + Ot = It & 67108863 + ;(It >>>= 26), (Pt.words[wt] = Ot), (Ct = It) + } + return Ct !== 0 && (Pt.words[Pt.length++] = Ct), Pt + }), + (ot._prime = function (Pt) { + if (xt[Pt]) return xt[Pt] + var Ct + if (Pt === 'k256') Ct = new St() + else if (Pt === 'p224') Ct = new Tt() + else if (Pt === 'p192') Ct = new At() + else if (Pt === 'p25519') Ct = new Et() + else throw new Error('Unknown prime ' + Pt) + return (xt[Pt] = Ct), Ct + }) + function $t(jt) { + if (typeof jt == 'string') { + var Pt = ot._prime(jt) + ;(this.m = Pt.p), (this.prime = Pt) + } else rt(jt.gtn(1), 'modulus must be greater than 1'), (this.m = jt), (this.prime = null) + } + ;($t.prototype._verify1 = function (Pt) { + rt(Pt.negative === 0, 'red works only with positives'), rt(Pt.red, 'red works only with red numbers') + }), + ($t.prototype._verify2 = function (Pt, Ct) { + rt((Pt.negative | Ct.negative) === 0, 'red works only with positives'), + rt(Pt.red && Pt.red === Ct.red, 'red works only with red numbers') + }), + ($t.prototype.imod = function (Pt) { + return this.prime ? this.prime.ireduce(Pt)._forceRed(this) : Pt.umod(this.m)._forceRed(this) + }), + ($t.prototype.neg = function (Pt) { + return Pt.isZero() ? Pt.clone() : this.m.sub(Pt)._forceRed(this) + }), + ($t.prototype.add = function (Pt, Ct) { + this._verify2(Pt, Ct) + var wt = Pt.add(Ct) + return wt.cmp(this.m) >= 0 && wt.isub(this.m), wt._forceRed(this) + }), + ($t.prototype.iadd = function (Pt, Ct) { + this._verify2(Pt, Ct) + var wt = Pt.iadd(Ct) + return wt.cmp(this.m) >= 0 && wt.isub(this.m), wt + }), + ($t.prototype.sub = function (Pt, Ct) { + this._verify2(Pt, Ct) + var wt = Pt.sub(Ct) + return wt.cmpn(0) < 0 && wt.iadd(this.m), wt._forceRed(this) + }), + ($t.prototype.isub = function (Pt, Ct) { + this._verify2(Pt, Ct) + var wt = Pt.isub(Ct) + return wt.cmpn(0) < 0 && wt.iadd(this.m), wt + }), + ($t.prototype.shl = function (Pt, Ct) { + return this._verify1(Pt), this.imod(Pt.ushln(Ct)) + }), + ($t.prototype.imul = function (Pt, Ct) { + return this._verify2(Pt, Ct), this.imod(Pt.imul(Ct)) + }), + ($t.prototype.mul = function (Pt, Ct) { + return this._verify2(Pt, Ct), this.imod(Pt.mul(Ct)) + }), + ($t.prototype.isqr = function (Pt) { + return this.imul(Pt, Pt.clone()) + }), + ($t.prototype.sqr = function (Pt) { + return this.mul(Pt, Pt) + }), + ($t.prototype.sqrt = function (Pt) { + if (Pt.isZero()) return Pt.clone() + var Ct = this.m.andln(3) + if ((rt(Ct % 2 === 1), Ct === 3)) { + var wt = this.m.add(new ot(1)).iushrn(2) + return this.pow(Pt, wt) + } + for (var It = this.m.subn(1), Ot = 0; !It.isZero() && It.andln(1) === 0; ) Ot++, It.iushrn(1) + rt(!It.isZero()) + var Wt = new ot(1).toRed(this), + zt = Wt.redNeg(), + Ft = this.m.subn(1).iushrn(1), + Nt = this.m.bitLength() + for (Nt = new ot(2 * Nt * Nt).toRed(this); this.pow(Nt, Ft).cmp(zt) !== 0; ) Nt.redIAdd(zt) + for ( + var Ut = this.pow(Nt, It), Mt = this.pow(Pt, It.addn(1).iushrn(1)), Ht = this.pow(Pt, It), en = Ot; + Ht.cmp(Wt) !== 0; + + ) { + for (var sn = Ht, Kt = 0; sn.cmp(Wt) !== 0; Kt++) sn = sn.redSqr() + rt(Kt < en) + var rn = this.pow(Ut, new ot(1).iushln(en - Kt - 1)) + ;(Mt = Mt.redMul(rn)), (Ut = rn.redSqr()), (Ht = Ht.redMul(Ut)), (en = Kt) + } + return Mt + }), + ($t.prototype.invm = function (Pt) { + var Ct = Pt._invmp(this.m) + return Ct.negative !== 0 ? ((Ct.negative = 0), this.imod(Ct).redNeg()) : this.imod(Ct) + }), + ($t.prototype.pow = function (Pt, Ct) { + if (Ct.isZero()) return new ot(1).toRed(this) + if (Ct.cmpn(1) === 0) return Pt.clone() + var wt = 4, + It = new Array(1 << wt) + ;(It[0] = new ot(1).toRed(this)), (It[1] = Pt) + for (var Ot = 2; Ot < It.length; Ot++) It[Ot] = this.mul(It[Ot - 1], Pt) + var Wt = It[0], + zt = 0, + Ft = 0, + Nt = Ct.bitLength() % 26 + for (Nt === 0 && (Nt = 26), Ot = Ct.length - 1; Ot >= 0; Ot--) { + for (var Ut = Ct.words[Ot], Mt = Nt - 1; Mt >= 0; Mt--) { + var Ht = (Ut >> Mt) & 1 + if ((Wt !== It[0] && (Wt = this.sqr(Wt)), Ht === 0 && zt === 0)) { + Ft = 0 + continue + } + ;(zt <<= 1), + (zt |= Ht), + Ft++, + !(Ft !== wt && (Ot !== 0 || Mt !== 0)) && ((Wt = this.mul(Wt, It[zt])), (Ft = 0), (zt = 0)) + } + Nt = 26 + } + return Wt + }), + ($t.prototype.convertTo = function (Pt) { + var Ct = Pt.umod(this.m) + return Ct === Pt ? Ct.clone() : Ct + }), + ($t.prototype.convertFrom = function (Pt) { + var Ct = Pt.clone() + return (Ct.red = null), Ct + }), + (ot.mont = function (Pt) { + return new Dt(Pt) + }) + function Dt(jt) { + $t.call(this, jt), + (this.shift = this.m.bitLength()), + this.shift % 26 !== 0 && (this.shift += 26 - (this.shift % 26)), + (this.r = new ot(1).iushln(this.shift)), + (this.r2 = this.imod(this.r.sqr())), + (this.rinv = this.r._invmp(this.m)), + (this.minv = this.rinv.mul(this.r).isubn(1).div(this.m)), + (this.minv = this.minv.umod(this.r)), + (this.minv = this.r.sub(this.minv)) + } + it(Dt, $t), + (Dt.prototype.convertTo = function (Pt) { + return this.imod(Pt.ushln(this.shift)) + }), + (Dt.prototype.convertFrom = function (Pt) { + var Ct = this.imod(Pt.mul(this.rinv)) + return (Ct.red = null), Ct + }), + (Dt.prototype.imul = function (Pt, Ct) { + if (Pt.isZero() || Ct.isZero()) return (Pt.words[0] = 0), (Pt.length = 1), Pt + var wt = Pt.imul(Ct), + It = wt.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m), + Ot = wt.isub(It).iushrn(this.shift), + Wt = Ot + return ( + Ot.cmp(this.m) >= 0 ? (Wt = Ot.isub(this.m)) : Ot.cmpn(0) < 0 && (Wt = Ot.iadd(this.m)), Wt._forceRed(this) + ) + }), + (Dt.prototype.mul = function (Pt, Ct) { + if (Pt.isZero() || Ct.isZero()) return new ot(0)._forceRed(this) + var wt = Pt.mul(Ct), + It = wt.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m), + Ot = wt.isub(It).iushrn(this.shift), + Wt = Ot + return ( + Ot.cmp(this.m) >= 0 ? (Wt = Ot.isub(this.m)) : Ot.cmpn(0) < 0 && (Wt = Ot.iadd(this.m)), Wt._forceRed(this) + ) + }), + (Dt.prototype.invm = function (Pt) { + var Ct = this.imod(Pt._invmp(this.m).mul(this.r2)) + return Ct._forceRed(this) + }) + })(tt, commonjsGlobal) + })(bn$2) + var bnExports$2 = bn$2.exports, + brorand = { exports: {} }, + hasRequiredBrorand + function requireBrorand() { + if (hasRequiredBrorand) return brorand.exports + hasRequiredBrorand = 1 + var tt + brorand.exports = function (it) { + return tt || (tt = new et(null)), tt.generate(it) + } + function et(rt) { + this.rand = rt + } + if ( + ((brorand.exports.Rand = et), + (et.prototype.generate = function (it) { + return this._rand(it) + }), + (et.prototype._rand = function (it) { + if (this.rand.getBytes) return this.rand.getBytes(it) + for (var ot = new Uint8Array(it), at = 0; at < ot.length; at++) ot[at] = this.rand.getByte() + return ot + }), + typeof self == 'object') + ) + self.crypto && self.crypto.getRandomValues + ? (et.prototype._rand = function (it) { + var ot = new Uint8Array(it) + return self.crypto.getRandomValues(ot), ot + }) + : self.msCrypto && self.msCrypto.getRandomValues + ? (et.prototype._rand = function (it) { + var ot = new Uint8Array(it) + return self.msCrypto.getRandomValues(ot), ot + }) + : typeof window == 'object' && + (et.prototype._rand = function () { + throw new Error('Not implemented yet') + }) + else + try { + var nt = requireCryptoBrowserify() + if (typeof nt.randomBytes != 'function') throw new Error('Not supported') + et.prototype._rand = function (it) { + return nt.randomBytes(it) + } + } catch {} + return brorand.exports + } + var mr, hasRequiredMr + function requireMr() { + if (hasRequiredMr) return mr + hasRequiredMr = 1 + var tt = bnExports$2, + et = requireBrorand() + function nt(rt) { + this.rand = rt || new et.Rand() + } + return ( + (mr = nt), + (nt.create = function (it) { + return new nt(it) + }), + (nt.prototype._randbelow = function (it) { + var ot = it.bitLength(), + at = Math.ceil(ot / 8) + do var st = new tt(this.rand.generate(at)) + while (st.cmp(it) >= 0) + return st + }), + (nt.prototype._randrange = function (it, ot) { + var at = ot.sub(it) + return it.add(this._randbelow(at)) + }), + (nt.prototype.test = function (it, ot, at) { + var st = it.bitLength(), + lt = tt.mont(it), + ct = new tt(1).toRed(lt) + ot || (ot = Math.max(1, (st / 48) | 0)) + for (var ut = it.subn(1), ht = 0; !ut.testn(ht); ht++); + for (var dt = it.shrn(ht), pt = ut.toRed(lt), mt = !0; ot > 0; ot--) { + var gt = this._randrange(new tt(2), ut) + at && at(gt) + var yt = gt.toRed(lt).redPow(dt) + if (!(yt.cmp(ct) === 0 || yt.cmp(pt) === 0)) { + for (var bt = 1; bt < ht; bt++) { + if (((yt = yt.redSqr()), yt.cmp(ct) === 0)) return !1 + if (yt.cmp(pt) === 0) break + } + if (bt === ht) return !1 + } + } + return mt + }), + (nt.prototype.getDivisor = function (it, ot) { + var at = it.bitLength(), + st = tt.mont(it), + lt = new tt(1).toRed(st) + ot || (ot = Math.max(1, (at / 48) | 0)) + for (var ct = it.subn(1), ut = 0; !ct.testn(ut); ut++); + for (var ht = it.shrn(ut), dt = ct.toRed(st); ot > 0; ot--) { + var pt = this._randrange(new tt(2), ct), + mt = it.gcd(pt) + if (mt.cmpn(1) !== 0) return mt + var gt = pt.toRed(st).redPow(ht) + if (!(gt.cmp(lt) === 0 || gt.cmp(dt) === 0)) { + for (var yt = 1; yt < ut; yt++) { + if (((gt = gt.redSqr()), gt.cmp(lt) === 0)) return gt.fromRed().subn(1).gcd(it) + if (gt.cmp(dt) === 0) break + } + if (yt === ut) return (gt = gt.redSqr()), gt.fromRed().subn(1).gcd(it) + } + } + return !1 + }), + mr + ) + } + var generatePrime, hasRequiredGeneratePrime + function requireGeneratePrime() { + if (hasRequiredGeneratePrime) return generatePrime + hasRequiredGeneratePrime = 1 + var tt = browserExports + ;(generatePrime = yt), (yt.simpleSieve = mt), (yt.fermatTest = gt) + var et = bnExports$2, + nt = new et(24), + rt = requireMr(), + it = new rt(), + ot = new et(1), + at = new et(2), + st = new et(5) + new et(16), new et(8) + var lt = new et(10), + ct = new et(3) + new et(7) + var ut = new et(11), + ht = new et(4) + new et(12) + var dt = null + function pt() { + if (dt !== null) return dt + var bt = 1048576, + vt = [] + vt[0] = 2 + for (var xt = 1, kt = 3; kt < bt; kt += 2) { + for (var St = Math.ceil(Math.sqrt(kt)), Tt = 0; Tt < xt && vt[Tt] <= St && kt % vt[Tt] !== 0; Tt++); + ;(xt !== Tt && vt[Tt] <= St) || (vt[xt++] = kt) + } + return (dt = vt), vt + } + function mt(bt) { + for (var vt = pt(), xt = 0; xt < vt.length; xt++) if (bt.modn(vt[xt]) === 0) return bt.cmpn(vt[xt]) === 0 + return !0 + } + function gt(bt) { + var vt = et.mont(bt) + return at.toRed(vt).redPow(bt.subn(1)).fromRed().cmpn(1) === 0 + } + function yt(bt, vt) { + if (bt < 16) return vt === 2 || vt === 5 ? new et([140, 123]) : new et([140, 39]) + vt = new et(vt) + for (var xt, kt; ; ) { + for (xt = new et(tt(Math.ceil(bt / 8))); xt.bitLength() > bt; ) xt.ishrn(1) + if ((xt.isEven() && xt.iadd(ot), xt.testn(1) || xt.iadd(at), vt.cmp(at))) { + if (!vt.cmp(st)) for (; xt.mod(lt).cmp(ct); ) xt.iadd(ht) + } else for (; xt.mod(nt).cmp(ut); ) xt.iadd(ht) + if (((kt = xt.shrn(1)), mt(kt) && mt(xt) && gt(kt) && gt(xt) && it.test(kt) && it.test(xt))) return xt + } + } + return generatePrime + } + const modp1 = { + gen: '02', + prime: + 'ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a63a3620ffffffffffffffff', + }, + modp2 = { + gen: '02', + prime: + 'ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece65381ffffffffffffffff', + }, + modp5 = { + gen: '02', + prime: + 'ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca237327ffffffffffffffff', + }, + modp14 = { + gen: '02', + prime: + 'ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aacaa68ffffffffffffffff', + }, + modp15 = { + gen: '02', + prime: + 'ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a93ad2caffffffffffffffff', + }, + modp16 = { + gen: '02', + prime: + 'ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c934063199ffffffffffffffff', + }, + modp17 = { + gen: '02', + prime: + 'ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dcc4024ffffffffffffffff', + }, + modp18 = { + gen: '02', + prime: + 'ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dbe115974a3926f12fee5e438777cb6a932df8cd8bec4d073b931ba3bc832b68d9dd300741fa7bf8afc47ed2576f6936ba424663aab639c5ae4f5683423b4742bf1c978238f16cbe39d652de3fdb8befc848ad922222e04a4037c0713eb57a81a23f0c73473fc646cea306b4bcbc8862f8385ddfa9d4b7fa2c087e879683303ed5bdd3a062b3cf5b3a278a66d2a13f83f44f82ddf310ee074ab6a364597e899a0255dc164f31cc50846851df9ab48195ded7ea1b1d510bd7ee74d73faf36bc31ecfa268359046f4eb879f924009438b481c6cd7889a002ed5ee382bc9190da6fc026e479558e4475677e9aa9e3050e2765694dfc81f56e880b96e7160c980dd98edd3dfffffffffffffffff', + }, + require$$1$1 = { modp1, modp2, modp5, modp14, modp15, modp16, modp17, modp18 } + var dh, hasRequiredDh + function requireDh() { + if (hasRequiredDh) return dh + hasRequiredDh = 1 + var tt = bnExports$2, + et = requireMr(), + nt = new et(), + rt = new tt(24), + it = new tt(11), + ot = new tt(10), + at = new tt(3), + st = new tt(7), + lt = requireGeneratePrime(), + ct = browserExports + dh = mt + function ut(yt, bt) { + return (bt = bt || 'utf8'), Buffer.isBuffer(yt) || (yt = new Buffer(yt, bt)), (this._pub = new tt(yt)), this + } + function ht(yt, bt) { + return (bt = bt || 'utf8'), Buffer.isBuffer(yt) || (yt = new Buffer(yt, bt)), (this._priv = new tt(yt)), this + } + var dt = {} + function pt(yt, bt) { + var vt = bt.toString('hex'), + xt = [vt, yt.toString(16)].join('_') + if (xt in dt) return dt[xt] + var kt = 0 + if (yt.isEven() || !lt.simpleSieve || !lt.fermatTest(yt) || !nt.test(yt)) + return (kt += 1), vt === '02' || vt === '05' ? (kt += 8) : (kt += 4), (dt[xt] = kt), kt + nt.test(yt.shrn(1)) || (kt += 2) + var St + switch (vt) { + case '02': + yt.mod(rt).cmp(it) && (kt += 8) + break + case '05': + ;(St = yt.mod(ot)), St.cmp(at) && St.cmp(st) && (kt += 8) + break + default: + kt += 4 + } + return (dt[xt] = kt), kt + } + function mt(yt, bt, vt) { + this.setGenerator(bt), + (this.__prime = new tt(yt)), + (this._prime = tt.mont(this.__prime)), + (this._primeLen = yt.length), + (this._pub = void 0), + (this._priv = void 0), + (this._primeCode = void 0), + vt ? ((this.setPublicKey = ut), (this.setPrivateKey = ht)) : (this._primeCode = 8) + } + Object.defineProperty(mt.prototype, 'verifyError', { + enumerable: !0, + get: function () { + return typeof this._primeCode != 'number' && (this._primeCode = pt(this.__prime, this.__gen)), this._primeCode + }, + }), + (mt.prototype.generateKeys = function () { + return ( + this._priv || (this._priv = new tt(ct(this._primeLen))), + (this._pub = this._gen.toRed(this._prime).redPow(this._priv).fromRed()), + this.getPublicKey() + ) + }), + (mt.prototype.computeSecret = function (yt) { + ;(yt = new tt(yt)), (yt = yt.toRed(this._prime)) + var bt = yt.redPow(this._priv).fromRed(), + vt = new Buffer(bt.toArray()), + xt = this.getPrime() + if (vt.length < xt.length) { + var kt = new Buffer(xt.length - vt.length) + kt.fill(0), (vt = Buffer.concat([kt, vt])) + } + return vt + }), + (mt.prototype.getPublicKey = function (bt) { + return gt(this._pub, bt) + }), + (mt.prototype.getPrivateKey = function (bt) { + return gt(this._priv, bt) + }), + (mt.prototype.getPrime = function (yt) { + return gt(this.__prime, yt) + }), + (mt.prototype.getGenerator = function (yt) { + return gt(this._gen, yt) + }), + (mt.prototype.setGenerator = function (yt, bt) { + return ( + (bt = bt || 'utf8'), + Buffer.isBuffer(yt) || (yt = new Buffer(yt, bt)), + (this.__gen = yt), + (this._gen = new tt(yt)), + this + ) + }) + function gt(yt, bt) { + var vt = new Buffer(yt.toArray()) + return bt ? vt.toString(bt) : vt + } + return dh + } + var hasRequiredBrowser$2 + function requireBrowser$2() { + if (hasRequiredBrowser$2) return browser$5 + hasRequiredBrowser$2 = 1 + var tt = requireGeneratePrime(), + et = require$$1$1, + nt = requireDh() + function rt(at) { + var st = new Buffer(et[at].prime, 'hex'), + lt = new Buffer(et[at].gen, 'hex') + return new nt(st, lt) + } + var it = { binary: !0, hex: !0, base64: !0 } + function ot(at, st, lt, ct) { + return Buffer.isBuffer(st) || it[st] === void 0 + ? ot(at, 'binary', st, lt) + : ((st = st || 'binary'), + (ct = ct || 'binary'), + (lt = lt || new Buffer([2])), + Buffer.isBuffer(lt) || (lt = new Buffer(lt, ct)), + typeof at == 'number' + ? new nt(tt(at, lt), lt, !0) + : (Buffer.isBuffer(at) || (at = new Buffer(at, st)), new nt(at, lt, !0))) + } + return ( + (browser$5.DiffieHellmanGroup = browser$5.createDiffieHellmanGroup = browser$5.getDiffieHellman = rt), + (browser$5.createDiffieHellman = browser$5.DiffieHellman = ot), + browser$5 + ) + } + var sign$4 = { exports: {} }, + bn$1 = { exports: {} } + bn$1.exports + ;(function (tt) { + ;(function (et, nt) { + function rt(Ct, wt) { + if (!Ct) throw new Error(wt || 'Assertion failed') + } + function it(Ct, wt) { + Ct.super_ = wt + var It = function () {} + ;(It.prototype = wt.prototype), (Ct.prototype = new It()), (Ct.prototype.constructor = Ct) + } + function ot(Ct, wt, It) { + if (ot.isBN(Ct)) return Ct + ;(this.negative = 0), + (this.words = null), + (this.length = 0), + (this.red = null), + Ct !== null && + ((wt === 'le' || wt === 'be') && ((It = wt), (wt = 10)), this._init(Ct || 0, wt || 10, It || 'be')) + } + typeof et == 'object' ? (et.exports = ot) : (nt.BN = ot), (ot.BN = ot), (ot.wordSize = 26) + var at + try { + typeof window < 'u' && typeof window.Buffer < 'u' ? (at = window.Buffer) : (at = require$$0$2.Buffer) + } catch {} + ;(ot.isBN = function (wt) { + return wt instanceof ot + ? !0 + : wt !== null && typeof wt == 'object' && wt.constructor.wordSize === ot.wordSize && Array.isArray(wt.words) + }), + (ot.max = function (wt, It) { + return wt.cmp(It) > 0 ? wt : It + }), + (ot.min = function (wt, It) { + return wt.cmp(It) < 0 ? wt : It + }), + (ot.prototype._init = function (wt, It, Ot) { + if (typeof wt == 'number') return this._initNumber(wt, It, Ot) + if (typeof wt == 'object') return this._initArray(wt, It, Ot) + It === 'hex' && (It = 16), + rt(It === (It | 0) && It >= 2 && It <= 36), + (wt = wt.toString().replace(/\s+/g, '')) + var Wt = 0 + wt[0] === '-' && (Wt++, (this.negative = 1)), + Wt < wt.length && + (It === 16 + ? this._parseHex(wt, Wt, Ot) + : (this._parseBase(wt, It, Wt), Ot === 'le' && this._initArray(this.toArray(), It, Ot))) + }), + (ot.prototype._initNumber = function (wt, It, Ot) { + wt < 0 && ((this.negative = 1), (wt = -wt)), + wt < 67108864 + ? ((this.words = [wt & 67108863]), (this.length = 1)) + : wt < 4503599627370496 + ? ((this.words = [wt & 67108863, (wt / 67108864) & 67108863]), (this.length = 2)) + : (rt(wt < 9007199254740992), + (this.words = [wt & 67108863, (wt / 67108864) & 67108863, 1]), + (this.length = 3)), + Ot === 'le' && this._initArray(this.toArray(), It, Ot) + }), + (ot.prototype._initArray = function (wt, It, Ot) { + if ((rt(typeof wt.length == 'number'), wt.length <= 0)) return (this.words = [0]), (this.length = 1), this + ;(this.length = Math.ceil(wt.length / 3)), (this.words = new Array(this.length)) + for (var Wt = 0; Wt < this.length; Wt++) this.words[Wt] = 0 + var zt, + Ft, + Nt = 0 + if (Ot === 'be') + for (Wt = wt.length - 1, zt = 0; Wt >= 0; Wt -= 3) + (Ft = wt[Wt] | (wt[Wt - 1] << 8) | (wt[Wt - 2] << 16)), + (this.words[zt] |= (Ft << Nt) & 67108863), + (this.words[zt + 1] = (Ft >>> (26 - Nt)) & 67108863), + (Nt += 24), + Nt >= 26 && ((Nt -= 26), zt++) + else if (Ot === 'le') + for (Wt = 0, zt = 0; Wt < wt.length; Wt += 3) + (Ft = wt[Wt] | (wt[Wt + 1] << 8) | (wt[Wt + 2] << 16)), + (this.words[zt] |= (Ft << Nt) & 67108863), + (this.words[zt + 1] = (Ft >>> (26 - Nt)) & 67108863), + (Nt += 24), + Nt >= 26 && ((Nt -= 26), zt++) + return this._strip() + }) + function st(Ct, wt) { + var It = Ct.charCodeAt(wt) + if (It >= 48 && It <= 57) return It - 48 + if (It >= 65 && It <= 70) return It - 55 + if (It >= 97 && It <= 102) return It - 87 + rt(!1, 'Invalid character in ' + Ct) + } + function lt(Ct, wt, It) { + var Ot = st(Ct, It) + return It - 1 >= wt && (Ot |= st(Ct, It - 1) << 4), Ot + } + ot.prototype._parseHex = function (wt, It, Ot) { + ;(this.length = Math.ceil((wt.length - It) / 6)), (this.words = new Array(this.length)) + for (var Wt = 0; Wt < this.length; Wt++) this.words[Wt] = 0 + var zt = 0, + Ft = 0, + Nt + if (Ot === 'be') + for (Wt = wt.length - 1; Wt >= It; Wt -= 2) + (Nt = lt(wt, It, Wt) << zt), + (this.words[Ft] |= Nt & 67108863), + zt >= 18 ? ((zt -= 18), (Ft += 1), (this.words[Ft] |= Nt >>> 26)) : (zt += 8) + else { + var Ut = wt.length - It + for (Wt = Ut % 2 === 0 ? It + 1 : It; Wt < wt.length; Wt += 2) + (Nt = lt(wt, It, Wt) << zt), + (this.words[Ft] |= Nt & 67108863), + zt >= 18 ? ((zt -= 18), (Ft += 1), (this.words[Ft] |= Nt >>> 26)) : (zt += 8) + } + this._strip() + } + function ct(Ct, wt, It, Ot) { + for (var Wt = 0, zt = 0, Ft = Math.min(Ct.length, It), Nt = wt; Nt < Ft; Nt++) { + var Ut = Ct.charCodeAt(Nt) - 48 + ;(Wt *= Ot), + Ut >= 49 ? (zt = Ut - 49 + 10) : Ut >= 17 ? (zt = Ut - 17 + 10) : (zt = Ut), + rt(Ut >= 0 && zt < Ot, 'Invalid character'), + (Wt += zt) + } + return Wt + } + ;(ot.prototype._parseBase = function (wt, It, Ot) { + ;(this.words = [0]), (this.length = 1) + for (var Wt = 0, zt = 1; zt <= 67108863; zt *= It) Wt++ + Wt--, (zt = (zt / It) | 0) + for (var Ft = wt.length - Ot, Nt = Ft % Wt, Ut = Math.min(Ft, Ft - Nt) + Ot, Mt = 0, Ht = Ot; Ht < Ut; Ht += Wt) + (Mt = ct(wt, Ht, Ht + Wt, It)), + this.imuln(zt), + this.words[0] + Mt < 67108864 ? (this.words[0] += Mt) : this._iaddn(Mt) + if (Nt !== 0) { + var en = 1 + for (Mt = ct(wt, Ht, wt.length, It), Ht = 0; Ht < Nt; Ht++) en *= It + this.imuln(en), this.words[0] + Mt < 67108864 ? (this.words[0] += Mt) : this._iaddn(Mt) + } + this._strip() + }), + (ot.prototype.copy = function (wt) { + wt.words = new Array(this.length) + for (var It = 0; It < this.length; It++) wt.words[It] = this.words[It] + ;(wt.length = this.length), (wt.negative = this.negative), (wt.red = this.red) + }) + function ut(Ct, wt) { + ;(Ct.words = wt.words), (Ct.length = wt.length), (Ct.negative = wt.negative), (Ct.red = wt.red) + } + if ( + ((ot.prototype._move = function (wt) { + ut(wt, this) + }), + (ot.prototype.clone = function () { + var wt = new ot(null) + return this.copy(wt), wt + }), + (ot.prototype._expand = function (wt) { + for (; this.length < wt; ) this.words[this.length++] = 0 + return this + }), + (ot.prototype._strip = function () { + for (; this.length > 1 && this.words[this.length - 1] === 0; ) this.length-- + return this._normSign() + }), + (ot.prototype._normSign = function () { + return this.length === 1 && this.words[0] === 0 && (this.negative = 0), this + }), + typeof Symbol < 'u' && typeof Symbol.for == 'function') + ) + try { + ot.prototype[Symbol.for('nodejs.util.inspect.custom')] = ht + } catch { + ot.prototype.inspect = ht + } + else ot.prototype.inspect = ht + function ht() { + return (this.red ? '' + } + var dt = [ + '', + '0', + '00', + '000', + '0000', + '00000', + '000000', + '0000000', + '00000000', + '000000000', + '0000000000', + '00000000000', + '000000000000', + '0000000000000', + '00000000000000', + '000000000000000', + '0000000000000000', + '00000000000000000', + '000000000000000000', + '0000000000000000000', + '00000000000000000000', + '000000000000000000000', + '0000000000000000000000', + '00000000000000000000000', + '000000000000000000000000', + '0000000000000000000000000', + ], + pt = [ + 0, 0, 25, 16, 12, 11, 10, 9, 8, 8, 7, 7, 7, 7, 6, 6, 6, 6, 6, 6, 6, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, + ], + mt = [ + 0, 0, 33554432, 43046721, 16777216, 48828125, 60466176, 40353607, 16777216, 43046721, 1e7, 19487171, 35831808, + 62748517, 7529536, 11390625, 16777216, 24137569, 34012224, 47045881, 64e6, 4084101, 5153632, 6436343, 7962624, + 9765625, 11881376, 14348907, 17210368, 20511149, 243e5, 28629151, 33554432, 39135393, 45435424, 52521875, + 60466176, + ] + ;(ot.prototype.toString = function (wt, It) { + ;(wt = wt || 10), (It = It | 0 || 1) + var Ot + if (wt === 16 || wt === 'hex') { + Ot = '' + for (var Wt = 0, zt = 0, Ft = 0; Ft < this.length; Ft++) { + var Nt = this.words[Ft], + Ut = (((Nt << Wt) | zt) & 16777215).toString(16) + ;(zt = (Nt >>> (24 - Wt)) & 16777215), + (Wt += 2), + Wt >= 26 && ((Wt -= 26), Ft--), + zt !== 0 || Ft !== this.length - 1 ? (Ot = dt[6 - Ut.length] + Ut + Ot) : (Ot = Ut + Ot) + } + for (zt !== 0 && (Ot = zt.toString(16) + Ot); Ot.length % It !== 0; ) Ot = '0' + Ot + return this.negative !== 0 && (Ot = '-' + Ot), Ot + } + if (wt === (wt | 0) && wt >= 2 && wt <= 36) { + var Mt = pt[wt], + Ht = mt[wt] + Ot = '' + var en = this.clone() + for (en.negative = 0; !en.isZero(); ) { + var sn = en.modrn(Ht).toString(wt) + ;(en = en.idivn(Ht)), en.isZero() ? (Ot = sn + Ot) : (Ot = dt[Mt - sn.length] + sn + Ot) + } + for (this.isZero() && (Ot = '0' + Ot); Ot.length % It !== 0; ) Ot = '0' + Ot + return this.negative !== 0 && (Ot = '-' + Ot), Ot + } + rt(!1, 'Base should be between 2 and 36') + }), + (ot.prototype.toNumber = function () { + var wt = this.words[0] + return ( + this.length === 2 + ? (wt += this.words[1] * 67108864) + : this.length === 3 && this.words[2] === 1 + ? (wt += 4503599627370496 + this.words[1] * 67108864) + : this.length > 2 && rt(!1, 'Number can only safely store up to 53 bits'), + this.negative !== 0 ? -wt : wt + ) + }), + (ot.prototype.toJSON = function () { + return this.toString(16, 2) + }), + at && + (ot.prototype.toBuffer = function (wt, It) { + return this.toArrayLike(at, wt, It) + }), + (ot.prototype.toArray = function (wt, It) { + return this.toArrayLike(Array, wt, It) + }) + var gt = function (wt, It) { + return wt.allocUnsafe ? wt.allocUnsafe(It) : new wt(It) + } + ;(ot.prototype.toArrayLike = function (wt, It, Ot) { + this._strip() + var Wt = this.byteLength(), + zt = Ot || Math.max(1, Wt) + rt(Wt <= zt, 'byte array longer than desired length'), rt(zt > 0, 'Requested array length <= 0') + var Ft = gt(wt, zt), + Nt = It === 'le' ? 'LE' : 'BE' + return this['_toArrayLike' + Nt](Ft, Wt), Ft + }), + (ot.prototype._toArrayLikeLE = function (wt, It) { + for (var Ot = 0, Wt = 0, zt = 0, Ft = 0; zt < this.length; zt++) { + var Nt = (this.words[zt] << Ft) | Wt + ;(wt[Ot++] = Nt & 255), + Ot < wt.length && (wt[Ot++] = (Nt >> 8) & 255), + Ot < wt.length && (wt[Ot++] = (Nt >> 16) & 255), + Ft === 6 + ? (Ot < wt.length && (wt[Ot++] = (Nt >> 24) & 255), (Wt = 0), (Ft = 0)) + : ((Wt = Nt >>> 24), (Ft += 2)) + } + if (Ot < wt.length) for (wt[Ot++] = Wt; Ot < wt.length; ) wt[Ot++] = 0 + }), + (ot.prototype._toArrayLikeBE = function (wt, It) { + for (var Ot = wt.length - 1, Wt = 0, zt = 0, Ft = 0; zt < this.length; zt++) { + var Nt = (this.words[zt] << Ft) | Wt + ;(wt[Ot--] = Nt & 255), + Ot >= 0 && (wt[Ot--] = (Nt >> 8) & 255), + Ot >= 0 && (wt[Ot--] = (Nt >> 16) & 255), + Ft === 6 ? (Ot >= 0 && (wt[Ot--] = (Nt >> 24) & 255), (Wt = 0), (Ft = 0)) : ((Wt = Nt >>> 24), (Ft += 2)) + } + if (Ot >= 0) for (wt[Ot--] = Wt; Ot >= 0; ) wt[Ot--] = 0 + }), + Math.clz32 + ? (ot.prototype._countBits = function (wt) { + return 32 - Math.clz32(wt) + }) + : (ot.prototype._countBits = function (wt) { + var It = wt, + Ot = 0 + return ( + It >= 4096 && ((Ot += 13), (It >>>= 13)), + It >= 64 && ((Ot += 7), (It >>>= 7)), + It >= 8 && ((Ot += 4), (It >>>= 4)), + It >= 2 && ((Ot += 2), (It >>>= 2)), + Ot + It + ) + }), + (ot.prototype._zeroBits = function (wt) { + if (wt === 0) return 26 + var It = wt, + Ot = 0 + return ( + It & 8191 || ((Ot += 13), (It >>>= 13)), + It & 127 || ((Ot += 7), (It >>>= 7)), + It & 15 || ((Ot += 4), (It >>>= 4)), + It & 3 || ((Ot += 2), (It >>>= 2)), + It & 1 || Ot++, + Ot + ) + }), + (ot.prototype.bitLength = function () { + var wt = this.words[this.length - 1], + It = this._countBits(wt) + return (this.length - 1) * 26 + It + }) + function yt(Ct) { + for (var wt = new Array(Ct.bitLength()), It = 0; It < wt.length; It++) { + var Ot = (It / 26) | 0, + Wt = It % 26 + wt[It] = (Ct.words[Ot] >>> Wt) & 1 + } + return wt + } + ;(ot.prototype.zeroBits = function () { + if (this.isZero()) return 0 + for (var wt = 0, It = 0; It < this.length; It++) { + var Ot = this._zeroBits(this.words[It]) + if (((wt += Ot), Ot !== 26)) break + } + return wt + }), + (ot.prototype.byteLength = function () { + return Math.ceil(this.bitLength() / 8) + }), + (ot.prototype.toTwos = function (wt) { + return this.negative !== 0 ? this.abs().inotn(wt).iaddn(1) : this.clone() + }), + (ot.prototype.fromTwos = function (wt) { + return this.testn(wt - 1) ? this.notn(wt).iaddn(1).ineg() : this.clone() + }), + (ot.prototype.isNeg = function () { + return this.negative !== 0 + }), + (ot.prototype.neg = function () { + return this.clone().ineg() + }), + (ot.prototype.ineg = function () { + return this.isZero() || (this.negative ^= 1), this + }), + (ot.prototype.iuor = function (wt) { + for (; this.length < wt.length; ) this.words[this.length++] = 0 + for (var It = 0; It < wt.length; It++) this.words[It] = this.words[It] | wt.words[It] + return this._strip() + }), + (ot.prototype.ior = function (wt) { + return rt((this.negative | wt.negative) === 0), this.iuor(wt) + }), + (ot.prototype.or = function (wt) { + return this.length > wt.length ? this.clone().ior(wt) : wt.clone().ior(this) + }), + (ot.prototype.uor = function (wt) { + return this.length > wt.length ? this.clone().iuor(wt) : wt.clone().iuor(this) + }), + (ot.prototype.iuand = function (wt) { + var It + this.length > wt.length ? (It = wt) : (It = this) + for (var Ot = 0; Ot < It.length; Ot++) this.words[Ot] = this.words[Ot] & wt.words[Ot] + return (this.length = It.length), this._strip() + }), + (ot.prototype.iand = function (wt) { + return rt((this.negative | wt.negative) === 0), this.iuand(wt) + }), + (ot.prototype.and = function (wt) { + return this.length > wt.length ? this.clone().iand(wt) : wt.clone().iand(this) + }), + (ot.prototype.uand = function (wt) { + return this.length > wt.length ? this.clone().iuand(wt) : wt.clone().iuand(this) + }), + (ot.prototype.iuxor = function (wt) { + var It, Ot + this.length > wt.length ? ((It = this), (Ot = wt)) : ((It = wt), (Ot = this)) + for (var Wt = 0; Wt < Ot.length; Wt++) this.words[Wt] = It.words[Wt] ^ Ot.words[Wt] + if (this !== It) for (; Wt < It.length; Wt++) this.words[Wt] = It.words[Wt] + return (this.length = It.length), this._strip() + }), + (ot.prototype.ixor = function (wt) { + return rt((this.negative | wt.negative) === 0), this.iuxor(wt) + }), + (ot.prototype.xor = function (wt) { + return this.length > wt.length ? this.clone().ixor(wt) : wt.clone().ixor(this) + }), + (ot.prototype.uxor = function (wt) { + return this.length > wt.length ? this.clone().iuxor(wt) : wt.clone().iuxor(this) + }), + (ot.prototype.inotn = function (wt) { + rt(typeof wt == 'number' && wt >= 0) + var It = Math.ceil(wt / 26) | 0, + Ot = wt % 26 + this._expand(It), Ot > 0 && It-- + for (var Wt = 0; Wt < It; Wt++) this.words[Wt] = ~this.words[Wt] & 67108863 + return Ot > 0 && (this.words[Wt] = ~this.words[Wt] & (67108863 >> (26 - Ot))), this._strip() + }), + (ot.prototype.notn = function (wt) { + return this.clone().inotn(wt) + }), + (ot.prototype.setn = function (wt, It) { + rt(typeof wt == 'number' && wt >= 0) + var Ot = (wt / 26) | 0, + Wt = wt % 26 + return ( + this._expand(Ot + 1), + It ? (this.words[Ot] = this.words[Ot] | (1 << Wt)) : (this.words[Ot] = this.words[Ot] & ~(1 << Wt)), + this._strip() + ) + }), + (ot.prototype.iadd = function (wt) { + var It + if (this.negative !== 0 && wt.negative === 0) + return (this.negative = 0), (It = this.isub(wt)), (this.negative ^= 1), this._normSign() + if (this.negative === 0 && wt.negative !== 0) + return (wt.negative = 0), (It = this.isub(wt)), (wt.negative = 1), It._normSign() + var Ot, Wt + this.length > wt.length ? ((Ot = this), (Wt = wt)) : ((Ot = wt), (Wt = this)) + for (var zt = 0, Ft = 0; Ft < Wt.length; Ft++) + (It = (Ot.words[Ft] | 0) + (Wt.words[Ft] | 0) + zt), (this.words[Ft] = It & 67108863), (zt = It >>> 26) + for (; zt !== 0 && Ft < Ot.length; Ft++) + (It = (Ot.words[Ft] | 0) + zt), (this.words[Ft] = It & 67108863), (zt = It >>> 26) + if (((this.length = Ot.length), zt !== 0)) (this.words[this.length] = zt), this.length++ + else if (Ot !== this) for (; Ft < Ot.length; Ft++) this.words[Ft] = Ot.words[Ft] + return this + }), + (ot.prototype.add = function (wt) { + var It + return wt.negative !== 0 && this.negative === 0 + ? ((wt.negative = 0), (It = this.sub(wt)), (wt.negative ^= 1), It) + : wt.negative === 0 && this.negative !== 0 + ? ((this.negative = 0), (It = wt.sub(this)), (this.negative = 1), It) + : this.length > wt.length + ? this.clone().iadd(wt) + : wt.clone().iadd(this) + }), + (ot.prototype.isub = function (wt) { + if (wt.negative !== 0) { + wt.negative = 0 + var It = this.iadd(wt) + return (wt.negative = 1), It._normSign() + } else if (this.negative !== 0) + return (this.negative = 0), this.iadd(wt), (this.negative = 1), this._normSign() + var Ot = this.cmp(wt) + if (Ot === 0) return (this.negative = 0), (this.length = 1), (this.words[0] = 0), this + var Wt, zt + Ot > 0 ? ((Wt = this), (zt = wt)) : ((Wt = wt), (zt = this)) + for (var Ft = 0, Nt = 0; Nt < zt.length; Nt++) + (It = (Wt.words[Nt] | 0) - (zt.words[Nt] | 0) + Ft), (Ft = It >> 26), (this.words[Nt] = It & 67108863) + for (; Ft !== 0 && Nt < Wt.length; Nt++) + (It = (Wt.words[Nt] | 0) + Ft), (Ft = It >> 26), (this.words[Nt] = It & 67108863) + if (Ft === 0 && Nt < Wt.length && Wt !== this) for (; Nt < Wt.length; Nt++) this.words[Nt] = Wt.words[Nt] + return (this.length = Math.max(this.length, Nt)), Wt !== this && (this.negative = 1), this._strip() + }), + (ot.prototype.sub = function (wt) { + return this.clone().isub(wt) + }) + function bt(Ct, wt, It) { + It.negative = wt.negative ^ Ct.negative + var Ot = (Ct.length + wt.length) | 0 + ;(It.length = Ot), (Ot = (Ot - 1) | 0) + var Wt = Ct.words[0] | 0, + zt = wt.words[0] | 0, + Ft = Wt * zt, + Nt = Ft & 67108863, + Ut = (Ft / 67108864) | 0 + It.words[0] = Nt + for (var Mt = 1; Mt < Ot; Mt++) { + for ( + var Ht = Ut >>> 26, + en = Ut & 67108863, + sn = Math.min(Mt, wt.length - 1), + Kt = Math.max(0, Mt - Ct.length + 1); + Kt <= sn; + Kt++ + ) { + var rn = (Mt - Kt) | 0 + ;(Wt = Ct.words[rn] | 0), + (zt = wt.words[Kt] | 0), + (Ft = Wt * zt + en), + (Ht += (Ft / 67108864) | 0), + (en = Ft & 67108863) + } + ;(It.words[Mt] = en | 0), (Ut = Ht | 0) + } + return Ut !== 0 ? (It.words[Mt] = Ut | 0) : It.length--, It._strip() + } + var vt = function (wt, It, Ot) { + var Wt = wt.words, + zt = It.words, + Ft = Ot.words, + Nt = 0, + Ut, + Mt, + Ht, + en = Wt[0] | 0, + sn = en & 8191, + Kt = en >>> 13, + rn = Wt[1] | 0, + nn = rn & 8191, + hn = rn >>> 13, + vn = Wt[2] | 0, + an = vn & 8191, + Qt = vn >>> 13, + _n = Wt[3] | 0, + Pn = _n & 8191, + $n = _n >>> 13, + Nn = Wt[4] | 0, + Tn = Nn & 8191, + cn = Nn >>> 13, + mn = Wt[5] | 0, + In = mn & 8191, + An = mn >>> 13, + wn = Wt[6] | 0, + fn = wn & 8191, + pn = wn >>> 13, + kn = Wt[7] | 0, + Dn = kn & 8191, + un = kn >>> 13, + Zt = Wt[8] | 0, + Xt = Zt & 8191, + Sn = Zt >>> 13, + Rn = Wt[9] | 0, + jn = Rn & 8191, + On = Rn >>> 13, + Zn = zt[0] | 0, + Vn = Zn & 8191, + qn = Zn >>> 13, + zn = zt[1] | 0, + Jn = zn & 8191, + Hn = zn >>> 13, + pr = zt[2] | 0, + fr = pr & 8191, + xr = pr >>> 13, + io = zt[3] | 0, + Tr = io & 8191, + Ar = io >>> 13, + qr = zt[4] | 0, + jr = qr & 8191, + Fr = qr >>> 13, + ao = zt[5] | 0, + Yr = ao & 8191, + Dr = ao >>> 13, + go = zt[6] | 0, + xn = go & 8191, + Mn = go >>> 13, + dn = zt[7] | 0, + Jt = dn & 8191, + En = dn >>> 13, + Ln = zt[8] | 0, + Un = Ln & 8191, + Kn = Ln >>> 13, + nr = zt[9] | 0, + lr = nr & 8191, + cr = nr >>> 13 + ;(Ot.negative = wt.negative ^ It.negative), + (Ot.length = 19), + (Ut = Math.imul(sn, Vn)), + (Mt = Math.imul(sn, qn)), + (Mt = (Mt + Math.imul(Kt, Vn)) | 0), + (Ht = Math.imul(Kt, qn)) + var Hr = (((Nt + Ut) | 0) + ((Mt & 8191) << 13)) | 0 + ;(Nt = (((Ht + (Mt >>> 13)) | 0) + (Hr >>> 26)) | 0), + (Hr &= 67108863), + (Ut = Math.imul(nn, Vn)), + (Mt = Math.imul(nn, qn)), + (Mt = (Mt + Math.imul(hn, Vn)) | 0), + (Ht = Math.imul(hn, qn)), + (Ut = (Ut + Math.imul(sn, Jn)) | 0), + (Mt = (Mt + Math.imul(sn, Hn)) | 0), + (Mt = (Mt + Math.imul(Kt, Jn)) | 0), + (Ht = (Ht + Math.imul(Kt, Hn)) | 0) + var vr = (((Nt + Ut) | 0) + ((Mt & 8191) << 13)) | 0 + ;(Nt = (((Ht + (Mt >>> 13)) | 0) + (vr >>> 26)) | 0), + (vr &= 67108863), + (Ut = Math.imul(an, Vn)), + (Mt = Math.imul(an, qn)), + (Mt = (Mt + Math.imul(Qt, Vn)) | 0), + (Ht = Math.imul(Qt, qn)), + (Ut = (Ut + Math.imul(nn, Jn)) | 0), + (Mt = (Mt + Math.imul(nn, Hn)) | 0), + (Mt = (Mt + Math.imul(hn, Jn)) | 0), + (Ht = (Ht + Math.imul(hn, Hn)) | 0), + (Ut = (Ut + Math.imul(sn, fr)) | 0), + (Mt = (Mt + Math.imul(sn, xr)) | 0), + (Mt = (Mt + Math.imul(Kt, fr)) | 0), + (Ht = (Ht + Math.imul(Kt, xr)) | 0) + var Nr = (((Nt + Ut) | 0) + ((Mt & 8191) << 13)) | 0 + ;(Nt = (((Ht + (Mt >>> 13)) | 0) + (Nr >>> 26)) | 0), + (Nr &= 67108863), + (Ut = Math.imul(Pn, Vn)), + (Mt = Math.imul(Pn, qn)), + (Mt = (Mt + Math.imul($n, Vn)) | 0), + (Ht = Math.imul($n, qn)), + (Ut = (Ut + Math.imul(an, Jn)) | 0), + (Mt = (Mt + Math.imul(an, Hn)) | 0), + (Mt = (Mt + Math.imul(Qt, Jn)) | 0), + (Ht = (Ht + Math.imul(Qt, Hn)) | 0), + (Ut = (Ut + Math.imul(nn, fr)) | 0), + (Mt = (Mt + Math.imul(nn, xr)) | 0), + (Mt = (Mt + Math.imul(hn, fr)) | 0), + (Ht = (Ht + Math.imul(hn, xr)) | 0), + (Ut = (Ut + Math.imul(sn, Tr)) | 0), + (Mt = (Mt + Math.imul(sn, Ar)) | 0), + (Mt = (Mt + Math.imul(Kt, Tr)) | 0), + (Ht = (Ht + Math.imul(Kt, Ar)) | 0) + var Gr = (((Nt + Ut) | 0) + ((Mt & 8191) << 13)) | 0 + ;(Nt = (((Ht + (Mt >>> 13)) | 0) + (Gr >>> 26)) | 0), + (Gr &= 67108863), + (Ut = Math.imul(Tn, Vn)), + (Mt = Math.imul(Tn, qn)), + (Mt = (Mt + Math.imul(cn, Vn)) | 0), + (Ht = Math.imul(cn, qn)), + (Ut = (Ut + Math.imul(Pn, Jn)) | 0), + (Mt = (Mt + Math.imul(Pn, Hn)) | 0), + (Mt = (Mt + Math.imul($n, Jn)) | 0), + (Ht = (Ht + Math.imul($n, Hn)) | 0), + (Ut = (Ut + Math.imul(an, fr)) | 0), + (Mt = (Mt + Math.imul(an, xr)) | 0), + (Mt = (Mt + Math.imul(Qt, fr)) | 0), + (Ht = (Ht + Math.imul(Qt, xr)) | 0), + (Ut = (Ut + Math.imul(nn, Tr)) | 0), + (Mt = (Mt + Math.imul(nn, Ar)) | 0), + (Mt = (Mt + Math.imul(hn, Tr)) | 0), + (Ht = (Ht + Math.imul(hn, Ar)) | 0), + (Ut = (Ut + Math.imul(sn, jr)) | 0), + (Mt = (Mt + Math.imul(sn, Fr)) | 0), + (Mt = (Mt + Math.imul(Kt, jr)) | 0), + (Ht = (Ht + Math.imul(Kt, Fr)) | 0) + var eo = (((Nt + Ut) | 0) + ((Mt & 8191) << 13)) | 0 + ;(Nt = (((Ht + (Mt >>> 13)) | 0) + (eo >>> 26)) | 0), + (eo &= 67108863), + (Ut = Math.imul(In, Vn)), + (Mt = Math.imul(In, qn)), + (Mt = (Mt + Math.imul(An, Vn)) | 0), + (Ht = Math.imul(An, qn)), + (Ut = (Ut + Math.imul(Tn, Jn)) | 0), + (Mt = (Mt + Math.imul(Tn, Hn)) | 0), + (Mt = (Mt + Math.imul(cn, Jn)) | 0), + (Ht = (Ht + Math.imul(cn, Hn)) | 0), + (Ut = (Ut + Math.imul(Pn, fr)) | 0), + (Mt = (Mt + Math.imul(Pn, xr)) | 0), + (Mt = (Mt + Math.imul($n, fr)) | 0), + (Ht = (Ht + Math.imul($n, xr)) | 0), + (Ut = (Ut + Math.imul(an, Tr)) | 0), + (Mt = (Mt + Math.imul(an, Ar)) | 0), + (Mt = (Mt + Math.imul(Qt, Tr)) | 0), + (Ht = (Ht + Math.imul(Qt, Ar)) | 0), + (Ut = (Ut + Math.imul(nn, jr)) | 0), + (Mt = (Mt + Math.imul(nn, Fr)) | 0), + (Mt = (Mt + Math.imul(hn, jr)) | 0), + (Ht = (Ht + Math.imul(hn, Fr)) | 0), + (Ut = (Ut + Math.imul(sn, Yr)) | 0), + (Mt = (Mt + Math.imul(sn, Dr)) | 0), + (Mt = (Mt + Math.imul(Kt, Yr)) | 0), + (Ht = (Ht + Math.imul(Kt, Dr)) | 0) + var Zr = (((Nt + Ut) | 0) + ((Mt & 8191) << 13)) | 0 + ;(Nt = (((Ht + (Mt >>> 13)) | 0) + (Zr >>> 26)) | 0), + (Zr &= 67108863), + (Ut = Math.imul(fn, Vn)), + (Mt = Math.imul(fn, qn)), + (Mt = (Mt + Math.imul(pn, Vn)) | 0), + (Ht = Math.imul(pn, qn)), + (Ut = (Ut + Math.imul(In, Jn)) | 0), + (Mt = (Mt + Math.imul(In, Hn)) | 0), + (Mt = (Mt + Math.imul(An, Jn)) | 0), + (Ht = (Ht + Math.imul(An, Hn)) | 0), + (Ut = (Ut + Math.imul(Tn, fr)) | 0), + (Mt = (Mt + Math.imul(Tn, xr)) | 0), + (Mt = (Mt + Math.imul(cn, fr)) | 0), + (Ht = (Ht + Math.imul(cn, xr)) | 0), + (Ut = (Ut + Math.imul(Pn, Tr)) | 0), + (Mt = (Mt + Math.imul(Pn, Ar)) | 0), + (Mt = (Mt + Math.imul($n, Tr)) | 0), + (Ht = (Ht + Math.imul($n, Ar)) | 0), + (Ut = (Ut + Math.imul(an, jr)) | 0), + (Mt = (Mt + Math.imul(an, Fr)) | 0), + (Mt = (Mt + Math.imul(Qt, jr)) | 0), + (Ht = (Ht + Math.imul(Qt, Fr)) | 0), + (Ut = (Ut + Math.imul(nn, Yr)) | 0), + (Mt = (Mt + Math.imul(nn, Dr)) | 0), + (Mt = (Mt + Math.imul(hn, Yr)) | 0), + (Ht = (Ht + Math.imul(hn, Dr)) | 0), + (Ut = (Ut + Math.imul(sn, xn)) | 0), + (Mt = (Mt + Math.imul(sn, Mn)) | 0), + (Mt = (Mt + Math.imul(Kt, xn)) | 0), + (Ht = (Ht + Math.imul(Kt, Mn)) | 0) + var Jr = (((Nt + Ut) | 0) + ((Mt & 8191) << 13)) | 0 + ;(Nt = (((Ht + (Mt >>> 13)) | 0) + (Jr >>> 26)) | 0), + (Jr &= 67108863), + (Ut = Math.imul(Dn, Vn)), + (Mt = Math.imul(Dn, qn)), + (Mt = (Mt + Math.imul(un, Vn)) | 0), + (Ht = Math.imul(un, qn)), + (Ut = (Ut + Math.imul(fn, Jn)) | 0), + (Mt = (Mt + Math.imul(fn, Hn)) | 0), + (Mt = (Mt + Math.imul(pn, Jn)) | 0), + (Ht = (Ht + Math.imul(pn, Hn)) | 0), + (Ut = (Ut + Math.imul(In, fr)) | 0), + (Mt = (Mt + Math.imul(In, xr)) | 0), + (Mt = (Mt + Math.imul(An, fr)) | 0), + (Ht = (Ht + Math.imul(An, xr)) | 0), + (Ut = (Ut + Math.imul(Tn, Tr)) | 0), + (Mt = (Mt + Math.imul(Tn, Ar)) | 0), + (Mt = (Mt + Math.imul(cn, Tr)) | 0), + (Ht = (Ht + Math.imul(cn, Ar)) | 0), + (Ut = (Ut + Math.imul(Pn, jr)) | 0), + (Mt = (Mt + Math.imul(Pn, Fr)) | 0), + (Mt = (Mt + Math.imul($n, jr)) | 0), + (Ht = (Ht + Math.imul($n, Fr)) | 0), + (Ut = (Ut + Math.imul(an, Yr)) | 0), + (Mt = (Mt + Math.imul(an, Dr)) | 0), + (Mt = (Mt + Math.imul(Qt, Yr)) | 0), + (Ht = (Ht + Math.imul(Qt, Dr)) | 0), + (Ut = (Ut + Math.imul(nn, xn)) | 0), + (Mt = (Mt + Math.imul(nn, Mn)) | 0), + (Mt = (Mt + Math.imul(hn, xn)) | 0), + (Ht = (Ht + Math.imul(hn, Mn)) | 0), + (Ut = (Ut + Math.imul(sn, Jt)) | 0), + (Mt = (Mt + Math.imul(sn, En)) | 0), + (Mt = (Mt + Math.imul(Kt, Jt)) | 0), + (Ht = (Ht + Math.imul(Kt, En)) | 0) + var wr = (((Nt + Ut) | 0) + ((Mt & 8191) << 13)) | 0 + ;(Nt = (((Ht + (Mt >>> 13)) | 0) + (wr >>> 26)) | 0), + (wr &= 67108863), + (Ut = Math.imul(Xt, Vn)), + (Mt = Math.imul(Xt, qn)), + (Mt = (Mt + Math.imul(Sn, Vn)) | 0), + (Ht = Math.imul(Sn, qn)), + (Ut = (Ut + Math.imul(Dn, Jn)) | 0), + (Mt = (Mt + Math.imul(Dn, Hn)) | 0), + (Mt = (Mt + Math.imul(un, Jn)) | 0), + (Ht = (Ht + Math.imul(un, Hn)) | 0), + (Ut = (Ut + Math.imul(fn, fr)) | 0), + (Mt = (Mt + Math.imul(fn, xr)) | 0), + (Mt = (Mt + Math.imul(pn, fr)) | 0), + (Ht = (Ht + Math.imul(pn, xr)) | 0), + (Ut = (Ut + Math.imul(In, Tr)) | 0), + (Mt = (Mt + Math.imul(In, Ar)) | 0), + (Mt = (Mt + Math.imul(An, Tr)) | 0), + (Ht = (Ht + Math.imul(An, Ar)) | 0), + (Ut = (Ut + Math.imul(Tn, jr)) | 0), + (Mt = (Mt + Math.imul(Tn, Fr)) | 0), + (Mt = (Mt + Math.imul(cn, jr)) | 0), + (Ht = (Ht + Math.imul(cn, Fr)) | 0), + (Ut = (Ut + Math.imul(Pn, Yr)) | 0), + (Mt = (Mt + Math.imul(Pn, Dr)) | 0), + (Mt = (Mt + Math.imul($n, Yr)) | 0), + (Ht = (Ht + Math.imul($n, Dr)) | 0), + (Ut = (Ut + Math.imul(an, xn)) | 0), + (Mt = (Mt + Math.imul(an, Mn)) | 0), + (Mt = (Mt + Math.imul(Qt, xn)) | 0), + (Ht = (Ht + Math.imul(Qt, Mn)) | 0), + (Ut = (Ut + Math.imul(nn, Jt)) | 0), + (Mt = (Mt + Math.imul(nn, En)) | 0), + (Mt = (Mt + Math.imul(hn, Jt)) | 0), + (Ht = (Ht + Math.imul(hn, En)) | 0), + (Ut = (Ut + Math.imul(sn, Un)) | 0), + (Mt = (Mt + Math.imul(sn, Kn)) | 0), + (Mt = (Mt + Math.imul(Kt, Un)) | 0), + (Ht = (Ht + Math.imul(Kt, Kn)) | 0) + var Mr = (((Nt + Ut) | 0) + ((Mt & 8191) << 13)) | 0 + ;(Nt = (((Ht + (Mt >>> 13)) | 0) + (Mr >>> 26)) | 0), + (Mr &= 67108863), + (Ut = Math.imul(jn, Vn)), + (Mt = Math.imul(jn, qn)), + (Mt = (Mt + Math.imul(On, Vn)) | 0), + (Ht = Math.imul(On, qn)), + (Ut = (Ut + Math.imul(Xt, Jn)) | 0), + (Mt = (Mt + Math.imul(Xt, Hn)) | 0), + (Mt = (Mt + Math.imul(Sn, Jn)) | 0), + (Ht = (Ht + Math.imul(Sn, Hn)) | 0), + (Ut = (Ut + Math.imul(Dn, fr)) | 0), + (Mt = (Mt + Math.imul(Dn, xr)) | 0), + (Mt = (Mt + Math.imul(un, fr)) | 0), + (Ht = (Ht + Math.imul(un, xr)) | 0), + (Ut = (Ut + Math.imul(fn, Tr)) | 0), + (Mt = (Mt + Math.imul(fn, Ar)) | 0), + (Mt = (Mt + Math.imul(pn, Tr)) | 0), + (Ht = (Ht + Math.imul(pn, Ar)) | 0), + (Ut = (Ut + Math.imul(In, jr)) | 0), + (Mt = (Mt + Math.imul(In, Fr)) | 0), + (Mt = (Mt + Math.imul(An, jr)) | 0), + (Ht = (Ht + Math.imul(An, Fr)) | 0), + (Ut = (Ut + Math.imul(Tn, Yr)) | 0), + (Mt = (Mt + Math.imul(Tn, Dr)) | 0), + (Mt = (Mt + Math.imul(cn, Yr)) | 0), + (Ht = (Ht + Math.imul(cn, Dr)) | 0), + (Ut = (Ut + Math.imul(Pn, xn)) | 0), + (Mt = (Mt + Math.imul(Pn, Mn)) | 0), + (Mt = (Mt + Math.imul($n, xn)) | 0), + (Ht = (Ht + Math.imul($n, Mn)) | 0), + (Ut = (Ut + Math.imul(an, Jt)) | 0), + (Mt = (Mt + Math.imul(an, En)) | 0), + (Mt = (Mt + Math.imul(Qt, Jt)) | 0), + (Ht = (Ht + Math.imul(Qt, En)) | 0), + (Ut = (Ut + Math.imul(nn, Un)) | 0), + (Mt = (Mt + Math.imul(nn, Kn)) | 0), + (Mt = (Mt + Math.imul(hn, Un)) | 0), + (Ht = (Ht + Math.imul(hn, Kn)) | 0), + (Ut = (Ut + Math.imul(sn, lr)) | 0), + (Mt = (Mt + Math.imul(sn, cr)) | 0), + (Mt = (Mt + Math.imul(Kt, lr)) | 0), + (Ht = (Ht + Math.imul(Kt, cr)) | 0) + var Ur = (((Nt + Ut) | 0) + ((Mt & 8191) << 13)) | 0 + ;(Nt = (((Ht + (Mt >>> 13)) | 0) + (Ur >>> 26)) | 0), + (Ur &= 67108863), + (Ut = Math.imul(jn, Jn)), + (Mt = Math.imul(jn, Hn)), + (Mt = (Mt + Math.imul(On, Jn)) | 0), + (Ht = Math.imul(On, Hn)), + (Ut = (Ut + Math.imul(Xt, fr)) | 0), + (Mt = (Mt + Math.imul(Xt, xr)) | 0), + (Mt = (Mt + Math.imul(Sn, fr)) | 0), + (Ht = (Ht + Math.imul(Sn, xr)) | 0), + (Ut = (Ut + Math.imul(Dn, Tr)) | 0), + (Mt = (Mt + Math.imul(Dn, Ar)) | 0), + (Mt = (Mt + Math.imul(un, Tr)) | 0), + (Ht = (Ht + Math.imul(un, Ar)) | 0), + (Ut = (Ut + Math.imul(fn, jr)) | 0), + (Mt = (Mt + Math.imul(fn, Fr)) | 0), + (Mt = (Mt + Math.imul(pn, jr)) | 0), + (Ht = (Ht + Math.imul(pn, Fr)) | 0), + (Ut = (Ut + Math.imul(In, Yr)) | 0), + (Mt = (Mt + Math.imul(In, Dr)) | 0), + (Mt = (Mt + Math.imul(An, Yr)) | 0), + (Ht = (Ht + Math.imul(An, Dr)) | 0), + (Ut = (Ut + Math.imul(Tn, xn)) | 0), + (Mt = (Mt + Math.imul(Tn, Mn)) | 0), + (Mt = (Mt + Math.imul(cn, xn)) | 0), + (Ht = (Ht + Math.imul(cn, Mn)) | 0), + (Ut = (Ut + Math.imul(Pn, Jt)) | 0), + (Mt = (Mt + Math.imul(Pn, En)) | 0), + (Mt = (Mt + Math.imul($n, Jt)) | 0), + (Ht = (Ht + Math.imul($n, En)) | 0), + (Ut = (Ut + Math.imul(an, Un)) | 0), + (Mt = (Mt + Math.imul(an, Kn)) | 0), + (Mt = (Mt + Math.imul(Qt, Un)) | 0), + (Ht = (Ht + Math.imul(Qt, Kn)) | 0), + (Ut = (Ut + Math.imul(nn, lr)) | 0), + (Mt = (Mt + Math.imul(nn, cr)) | 0), + (Mt = (Mt + Math.imul(hn, lr)) | 0), + (Ht = (Ht + Math.imul(hn, cr)) | 0) + var Rr = (((Nt + Ut) | 0) + ((Mt & 8191) << 13)) | 0 + ;(Nt = (((Ht + (Mt >>> 13)) | 0) + (Rr >>> 26)) | 0), + (Rr &= 67108863), + (Ut = Math.imul(jn, fr)), + (Mt = Math.imul(jn, xr)), + (Mt = (Mt + Math.imul(On, fr)) | 0), + (Ht = Math.imul(On, xr)), + (Ut = (Ut + Math.imul(Xt, Tr)) | 0), + (Mt = (Mt + Math.imul(Xt, Ar)) | 0), + (Mt = (Mt + Math.imul(Sn, Tr)) | 0), + (Ht = (Ht + Math.imul(Sn, Ar)) | 0), + (Ut = (Ut + Math.imul(Dn, jr)) | 0), + (Mt = (Mt + Math.imul(Dn, Fr)) | 0), + (Mt = (Mt + Math.imul(un, jr)) | 0), + (Ht = (Ht + Math.imul(un, Fr)) | 0), + (Ut = (Ut + Math.imul(fn, Yr)) | 0), + (Mt = (Mt + Math.imul(fn, Dr)) | 0), + (Mt = (Mt + Math.imul(pn, Yr)) | 0), + (Ht = (Ht + Math.imul(pn, Dr)) | 0), + (Ut = (Ut + Math.imul(In, xn)) | 0), + (Mt = (Mt + Math.imul(In, Mn)) | 0), + (Mt = (Mt + Math.imul(An, xn)) | 0), + (Ht = (Ht + Math.imul(An, Mn)) | 0), + (Ut = (Ut + Math.imul(Tn, Jt)) | 0), + (Mt = (Mt + Math.imul(Tn, En)) | 0), + (Mt = (Mt + Math.imul(cn, Jt)) | 0), + (Ht = (Ht + Math.imul(cn, En)) | 0), + (Ut = (Ut + Math.imul(Pn, Un)) | 0), + (Mt = (Mt + Math.imul(Pn, Kn)) | 0), + (Mt = (Mt + Math.imul($n, Un)) | 0), + (Ht = (Ht + Math.imul($n, Kn)) | 0), + (Ut = (Ut + Math.imul(an, lr)) | 0), + (Mt = (Mt + Math.imul(an, cr)) | 0), + (Mt = (Mt + Math.imul(Qt, lr)) | 0), + (Ht = (Ht + Math.imul(Qt, cr)) | 0) + var Pr = (((Nt + Ut) | 0) + ((Mt & 8191) << 13)) | 0 + ;(Nt = (((Ht + (Mt >>> 13)) | 0) + (Pr >>> 26)) | 0), + (Pr &= 67108863), + (Ut = Math.imul(jn, Tr)), + (Mt = Math.imul(jn, Ar)), + (Mt = (Mt + Math.imul(On, Tr)) | 0), + (Ht = Math.imul(On, Ar)), + (Ut = (Ut + Math.imul(Xt, jr)) | 0), + (Mt = (Mt + Math.imul(Xt, Fr)) | 0), + (Mt = (Mt + Math.imul(Sn, jr)) | 0), + (Ht = (Ht + Math.imul(Sn, Fr)) | 0), + (Ut = (Ut + Math.imul(Dn, Yr)) | 0), + (Mt = (Mt + Math.imul(Dn, Dr)) | 0), + (Mt = (Mt + Math.imul(un, Yr)) | 0), + (Ht = (Ht + Math.imul(un, Dr)) | 0), + (Ut = (Ut + Math.imul(fn, xn)) | 0), + (Mt = (Mt + Math.imul(fn, Mn)) | 0), + (Mt = (Mt + Math.imul(pn, xn)) | 0), + (Ht = (Ht + Math.imul(pn, Mn)) | 0), + (Ut = (Ut + Math.imul(In, Jt)) | 0), + (Mt = (Mt + Math.imul(In, En)) | 0), + (Mt = (Mt + Math.imul(An, Jt)) | 0), + (Ht = (Ht + Math.imul(An, En)) | 0), + (Ut = (Ut + Math.imul(Tn, Un)) | 0), + (Mt = (Mt + Math.imul(Tn, Kn)) | 0), + (Mt = (Mt + Math.imul(cn, Un)) | 0), + (Ht = (Ht + Math.imul(cn, Kn)) | 0), + (Ut = (Ut + Math.imul(Pn, lr)) | 0), + (Mt = (Mt + Math.imul(Pn, cr)) | 0), + (Mt = (Mt + Math.imul($n, lr)) | 0), + (Ht = (Ht + Math.imul($n, cr)) | 0) + var Lr = (((Nt + Ut) | 0) + ((Mt & 8191) << 13)) | 0 + ;(Nt = (((Ht + (Mt >>> 13)) | 0) + (Lr >>> 26)) | 0), + (Lr &= 67108863), + (Ut = Math.imul(jn, jr)), + (Mt = Math.imul(jn, Fr)), + (Mt = (Mt + Math.imul(On, jr)) | 0), + (Ht = Math.imul(On, Fr)), + (Ut = (Ut + Math.imul(Xt, Yr)) | 0), + (Mt = (Mt + Math.imul(Xt, Dr)) | 0), + (Mt = (Mt + Math.imul(Sn, Yr)) | 0), + (Ht = (Ht + Math.imul(Sn, Dr)) | 0), + (Ut = (Ut + Math.imul(Dn, xn)) | 0), + (Mt = (Mt + Math.imul(Dn, Mn)) | 0), + (Mt = (Mt + Math.imul(un, xn)) | 0), + (Ht = (Ht + Math.imul(un, Mn)) | 0), + (Ut = (Ut + Math.imul(fn, Jt)) | 0), + (Mt = (Mt + Math.imul(fn, En)) | 0), + (Mt = (Mt + Math.imul(pn, Jt)) | 0), + (Ht = (Ht + Math.imul(pn, En)) | 0), + (Ut = (Ut + Math.imul(In, Un)) | 0), + (Mt = (Mt + Math.imul(In, Kn)) | 0), + (Mt = (Mt + Math.imul(An, Un)) | 0), + (Ht = (Ht + Math.imul(An, Kn)) | 0), + (Ut = (Ut + Math.imul(Tn, lr)) | 0), + (Mt = (Mt + Math.imul(Tn, cr)) | 0), + (Mt = (Mt + Math.imul(cn, lr)) | 0), + (Ht = (Ht + Math.imul(cn, cr)) | 0) + var Wr = (((Nt + Ut) | 0) + ((Mt & 8191) << 13)) | 0 + ;(Nt = (((Ht + (Mt >>> 13)) | 0) + (Wr >>> 26)) | 0), + (Wr &= 67108863), + (Ut = Math.imul(jn, Yr)), + (Mt = Math.imul(jn, Dr)), + (Mt = (Mt + Math.imul(On, Yr)) | 0), + (Ht = Math.imul(On, Dr)), + (Ut = (Ut + Math.imul(Xt, xn)) | 0), + (Mt = (Mt + Math.imul(Xt, Mn)) | 0), + (Mt = (Mt + Math.imul(Sn, xn)) | 0), + (Ht = (Ht + Math.imul(Sn, Mn)) | 0), + (Ut = (Ut + Math.imul(Dn, Jt)) | 0), + (Mt = (Mt + Math.imul(Dn, En)) | 0), + (Mt = (Mt + Math.imul(un, Jt)) | 0), + (Ht = (Ht + Math.imul(un, En)) | 0), + (Ut = (Ut + Math.imul(fn, Un)) | 0), + (Mt = (Mt + Math.imul(fn, Kn)) | 0), + (Mt = (Mt + Math.imul(pn, Un)) | 0), + (Ht = (Ht + Math.imul(pn, Kn)) | 0), + (Ut = (Ut + Math.imul(In, lr)) | 0), + (Mt = (Mt + Math.imul(In, cr)) | 0), + (Mt = (Mt + Math.imul(An, lr)) | 0), + (Ht = (Ht + Math.imul(An, cr)) | 0) + var Br = (((Nt + Ut) | 0) + ((Mt & 8191) << 13)) | 0 + ;(Nt = (((Ht + (Mt >>> 13)) | 0) + (Br >>> 26)) | 0), + (Br &= 67108863), + (Ut = Math.imul(jn, xn)), + (Mt = Math.imul(jn, Mn)), + (Mt = (Mt + Math.imul(On, xn)) | 0), + (Ht = Math.imul(On, Mn)), + (Ut = (Ut + Math.imul(Xt, Jt)) | 0), + (Mt = (Mt + Math.imul(Xt, En)) | 0), + (Mt = (Mt + Math.imul(Sn, Jt)) | 0), + (Ht = (Ht + Math.imul(Sn, En)) | 0), + (Ut = (Ut + Math.imul(Dn, Un)) | 0), + (Mt = (Mt + Math.imul(Dn, Kn)) | 0), + (Mt = (Mt + Math.imul(un, Un)) | 0), + (Ht = (Ht + Math.imul(un, Kn)) | 0), + (Ut = (Ut + Math.imul(fn, lr)) | 0), + (Mt = (Mt + Math.imul(fn, cr)) | 0), + (Mt = (Mt + Math.imul(pn, lr)) | 0), + (Ht = (Ht + Math.imul(pn, cr)) | 0) + var tr = (((Nt + Ut) | 0) + ((Mt & 8191) << 13)) | 0 + ;(Nt = (((Ht + (Mt >>> 13)) | 0) + (tr >>> 26)) | 0), + (tr &= 67108863), + (Ut = Math.imul(jn, Jt)), + (Mt = Math.imul(jn, En)), + (Mt = (Mt + Math.imul(On, Jt)) | 0), + (Ht = Math.imul(On, En)), + (Ut = (Ut + Math.imul(Xt, Un)) | 0), + (Mt = (Mt + Math.imul(Xt, Kn)) | 0), + (Mt = (Mt + Math.imul(Sn, Un)) | 0), + (Ht = (Ht + Math.imul(Sn, Kn)) | 0), + (Ut = (Ut + Math.imul(Dn, lr)) | 0), + (Mt = (Mt + Math.imul(Dn, cr)) | 0), + (Mt = (Mt + Math.imul(un, lr)) | 0), + (Ht = (Ht + Math.imul(un, cr)) | 0) + var ir = (((Nt + Ut) | 0) + ((Mt & 8191) << 13)) | 0 + ;(Nt = (((Ht + (Mt >>> 13)) | 0) + (ir >>> 26)) | 0), + (ir &= 67108863), + (Ut = Math.imul(jn, Un)), + (Mt = Math.imul(jn, Kn)), + (Mt = (Mt + Math.imul(On, Un)) | 0), + (Ht = Math.imul(On, Kn)), + (Ut = (Ut + Math.imul(Xt, lr)) | 0), + (Mt = (Mt + Math.imul(Xt, cr)) | 0), + (Mt = (Mt + Math.imul(Sn, lr)) | 0), + (Ht = (Ht + Math.imul(Sn, cr)) | 0) + var Sr = (((Nt + Ut) | 0) + ((Mt & 8191) << 13)) | 0 + ;(Nt = (((Ht + (Mt >>> 13)) | 0) + (Sr >>> 26)) | 0), + (Sr &= 67108863), + (Ut = Math.imul(jn, lr)), + (Mt = Math.imul(jn, cr)), + (Mt = (Mt + Math.imul(On, lr)) | 0), + (Ht = Math.imul(On, cr)) + var dr = (((Nt + Ut) | 0) + ((Mt & 8191) << 13)) | 0 + return ( + (Nt = (((Ht + (Mt >>> 13)) | 0) + (dr >>> 26)) | 0), + (dr &= 67108863), + (Ft[0] = Hr), + (Ft[1] = vr), + (Ft[2] = Nr), + (Ft[3] = Gr), + (Ft[4] = eo), + (Ft[5] = Zr), + (Ft[6] = Jr), + (Ft[7] = wr), + (Ft[8] = Mr), + (Ft[9] = Ur), + (Ft[10] = Rr), + (Ft[11] = Pr), + (Ft[12] = Lr), + (Ft[13] = Wr), + (Ft[14] = Br), + (Ft[15] = tr), + (Ft[16] = ir), + (Ft[17] = Sr), + (Ft[18] = dr), + Nt !== 0 && ((Ft[19] = Nt), Ot.length++), + Ot + ) + } + Math.imul || (vt = bt) + function xt(Ct, wt, It) { + ;(It.negative = wt.negative ^ Ct.negative), (It.length = Ct.length + wt.length) + for (var Ot = 0, Wt = 0, zt = 0; zt < It.length - 1; zt++) { + var Ft = Wt + Wt = 0 + for ( + var Nt = Ot & 67108863, Ut = Math.min(zt, wt.length - 1), Mt = Math.max(0, zt - Ct.length + 1); + Mt <= Ut; + Mt++ + ) { + var Ht = zt - Mt, + en = Ct.words[Ht] | 0, + sn = wt.words[Mt] | 0, + Kt = en * sn, + rn = Kt & 67108863 + ;(Ft = (Ft + ((Kt / 67108864) | 0)) | 0), + (rn = (rn + Nt) | 0), + (Nt = rn & 67108863), + (Ft = (Ft + (rn >>> 26)) | 0), + (Wt += Ft >>> 26), + (Ft &= 67108863) + } + ;(It.words[zt] = Nt), (Ot = Ft), (Ft = Wt) + } + return Ot !== 0 ? (It.words[zt] = Ot) : It.length--, It._strip() + } + function kt(Ct, wt, It) { + return xt(Ct, wt, It) + } + ;(ot.prototype.mulTo = function (wt, It) { + var Ot, + Wt = this.length + wt.length + return ( + this.length === 10 && wt.length === 10 + ? (Ot = vt(this, wt, It)) + : Wt < 63 + ? (Ot = bt(this, wt, It)) + : Wt < 1024 + ? (Ot = xt(this, wt, It)) + : (Ot = kt(this, wt, It)), + Ot + ) + }), + (ot.prototype.mul = function (wt) { + var It = new ot(null) + return (It.words = new Array(this.length + wt.length)), this.mulTo(wt, It) + }), + (ot.prototype.mulf = function (wt) { + var It = new ot(null) + return (It.words = new Array(this.length + wt.length)), kt(this, wt, It) + }), + (ot.prototype.imul = function (wt) { + return this.clone().mulTo(wt, this) + }), + (ot.prototype.imuln = function (wt) { + var It = wt < 0 + It && (wt = -wt), rt(typeof wt == 'number'), rt(wt < 67108864) + for (var Ot = 0, Wt = 0; Wt < this.length; Wt++) { + var zt = (this.words[Wt] | 0) * wt, + Ft = (zt & 67108863) + (Ot & 67108863) + ;(Ot >>= 26), (Ot += (zt / 67108864) | 0), (Ot += Ft >>> 26), (this.words[Wt] = Ft & 67108863) + } + return Ot !== 0 && ((this.words[Wt] = Ot), this.length++), It ? this.ineg() : this + }), + (ot.prototype.muln = function (wt) { + return this.clone().imuln(wt) + }), + (ot.prototype.sqr = function () { + return this.mul(this) + }), + (ot.prototype.isqr = function () { + return this.imul(this.clone()) + }), + (ot.prototype.pow = function (wt) { + var It = yt(wt) + if (It.length === 0) return new ot(1) + for (var Ot = this, Wt = 0; Wt < It.length && It[Wt] === 0; Wt++, Ot = Ot.sqr()); + if (++Wt < It.length) + for (var zt = Ot.sqr(); Wt < It.length; Wt++, zt = zt.sqr()) It[Wt] !== 0 && (Ot = Ot.mul(zt)) + return Ot + }), + (ot.prototype.iushln = function (wt) { + rt(typeof wt == 'number' && wt >= 0) + var It = wt % 26, + Ot = (wt - It) / 26, + Wt = (67108863 >>> (26 - It)) << (26 - It), + zt + if (It !== 0) { + var Ft = 0 + for (zt = 0; zt < this.length; zt++) { + var Nt = this.words[zt] & Wt, + Ut = ((this.words[zt] | 0) - Nt) << It + ;(this.words[zt] = Ut | Ft), (Ft = Nt >>> (26 - It)) + } + Ft && ((this.words[zt] = Ft), this.length++) + } + if (Ot !== 0) { + for (zt = this.length - 1; zt >= 0; zt--) this.words[zt + Ot] = this.words[zt] + for (zt = 0; zt < Ot; zt++) this.words[zt] = 0 + this.length += Ot + } + return this._strip() + }), + (ot.prototype.ishln = function (wt) { + return rt(this.negative === 0), this.iushln(wt) + }), + (ot.prototype.iushrn = function (wt, It, Ot) { + rt(typeof wt == 'number' && wt >= 0) + var Wt + It ? (Wt = (It - (It % 26)) / 26) : (Wt = 0) + var zt = wt % 26, + Ft = Math.min((wt - zt) / 26, this.length), + Nt = 67108863 ^ ((67108863 >>> zt) << zt), + Ut = Ot + if (((Wt -= Ft), (Wt = Math.max(0, Wt)), Ut)) { + for (var Mt = 0; Mt < Ft; Mt++) Ut.words[Mt] = this.words[Mt] + Ut.length = Ft + } + if (Ft !== 0) + if (this.length > Ft) + for (this.length -= Ft, Mt = 0; Mt < this.length; Mt++) this.words[Mt] = this.words[Mt + Ft] + else (this.words[0] = 0), (this.length = 1) + var Ht = 0 + for (Mt = this.length - 1; Mt >= 0 && (Ht !== 0 || Mt >= Wt); Mt--) { + var en = this.words[Mt] | 0 + ;(this.words[Mt] = (Ht << (26 - zt)) | (en >>> zt)), (Ht = en & Nt) + } + return ( + Ut && Ht !== 0 && (Ut.words[Ut.length++] = Ht), + this.length === 0 && ((this.words[0] = 0), (this.length = 1)), + this._strip() + ) + }), + (ot.prototype.ishrn = function (wt, It, Ot) { + return rt(this.negative === 0), this.iushrn(wt, It, Ot) + }), + (ot.prototype.shln = function (wt) { + return this.clone().ishln(wt) + }), + (ot.prototype.ushln = function (wt) { + return this.clone().iushln(wt) + }), + (ot.prototype.shrn = function (wt) { + return this.clone().ishrn(wt) + }), + (ot.prototype.ushrn = function (wt) { + return this.clone().iushrn(wt) + }), + (ot.prototype.testn = function (wt) { + rt(typeof wt == 'number' && wt >= 0) + var It = wt % 26, + Ot = (wt - It) / 26, + Wt = 1 << It + if (this.length <= Ot) return !1 + var zt = this.words[Ot] + return !!(zt & Wt) + }), + (ot.prototype.imaskn = function (wt) { + rt(typeof wt == 'number' && wt >= 0) + var It = wt % 26, + Ot = (wt - It) / 26 + if ((rt(this.negative === 0, 'imaskn works only with positive numbers'), this.length <= Ot)) return this + if ((It !== 0 && Ot++, (this.length = Math.min(Ot, this.length)), It !== 0)) { + var Wt = 67108863 ^ ((67108863 >>> It) << It) + this.words[this.length - 1] &= Wt + } + return this._strip() + }), + (ot.prototype.maskn = function (wt) { + return this.clone().imaskn(wt) + }), + (ot.prototype.iaddn = function (wt) { + return ( + rt(typeof wt == 'number'), + rt(wt < 67108864), + wt < 0 + ? this.isubn(-wt) + : this.negative !== 0 + ? this.length === 1 && (this.words[0] | 0) <= wt + ? ((this.words[0] = wt - (this.words[0] | 0)), (this.negative = 0), this) + : ((this.negative = 0), this.isubn(wt), (this.negative = 1), this) + : this._iaddn(wt) + ) + }), + (ot.prototype._iaddn = function (wt) { + this.words[0] += wt + for (var It = 0; It < this.length && this.words[It] >= 67108864; It++) + (this.words[It] -= 67108864), It === this.length - 1 ? (this.words[It + 1] = 1) : this.words[It + 1]++ + return (this.length = Math.max(this.length, It + 1)), this + }), + (ot.prototype.isubn = function (wt) { + if ((rt(typeof wt == 'number'), rt(wt < 67108864), wt < 0)) return this.iaddn(-wt) + if (this.negative !== 0) return (this.negative = 0), this.iaddn(wt), (this.negative = 1), this + if (((this.words[0] -= wt), this.length === 1 && this.words[0] < 0)) + (this.words[0] = -this.words[0]), (this.negative = 1) + else + for (var It = 0; It < this.length && this.words[It] < 0; It++) + (this.words[It] += 67108864), (this.words[It + 1] -= 1) + return this._strip() + }), + (ot.prototype.addn = function (wt) { + return this.clone().iaddn(wt) + }), + (ot.prototype.subn = function (wt) { + return this.clone().isubn(wt) + }), + (ot.prototype.iabs = function () { + return (this.negative = 0), this + }), + (ot.prototype.abs = function () { + return this.clone().iabs() + }), + (ot.prototype._ishlnsubmul = function (wt, It, Ot) { + var Wt = wt.length + Ot, + zt + this._expand(Wt) + var Ft, + Nt = 0 + for (zt = 0; zt < wt.length; zt++) { + Ft = (this.words[zt + Ot] | 0) + Nt + var Ut = (wt.words[zt] | 0) * It + ;(Ft -= Ut & 67108863), (Nt = (Ft >> 26) - ((Ut / 67108864) | 0)), (this.words[zt + Ot] = Ft & 67108863) + } + for (; zt < this.length - Ot; zt++) + (Ft = (this.words[zt + Ot] | 0) + Nt), (Nt = Ft >> 26), (this.words[zt + Ot] = Ft & 67108863) + if (Nt === 0) return this._strip() + for (rt(Nt === -1), Nt = 0, zt = 0; zt < this.length; zt++) + (Ft = -(this.words[zt] | 0) + Nt), (Nt = Ft >> 26), (this.words[zt] = Ft & 67108863) + return (this.negative = 1), this._strip() + }), + (ot.prototype._wordDiv = function (wt, It) { + var Ot = this.length - wt.length, + Wt = this.clone(), + zt = wt, + Ft = zt.words[zt.length - 1] | 0, + Nt = this._countBits(Ft) + ;(Ot = 26 - Nt), Ot !== 0 && ((zt = zt.ushln(Ot)), Wt.iushln(Ot), (Ft = zt.words[zt.length - 1] | 0)) + var Ut = Wt.length - zt.length, + Mt + if (It !== 'mod') { + ;(Mt = new ot(null)), (Mt.length = Ut + 1), (Mt.words = new Array(Mt.length)) + for (var Ht = 0; Ht < Mt.length; Ht++) Mt.words[Ht] = 0 + } + var en = Wt.clone()._ishlnsubmul(zt, 1, Ut) + en.negative === 0 && ((Wt = en), Mt && (Mt.words[Ut] = 1)) + for (var sn = Ut - 1; sn >= 0; sn--) { + var Kt = (Wt.words[zt.length + sn] | 0) * 67108864 + (Wt.words[zt.length + sn - 1] | 0) + for (Kt = Math.min((Kt / Ft) | 0, 67108863), Wt._ishlnsubmul(zt, Kt, sn); Wt.negative !== 0; ) + Kt--, (Wt.negative = 0), Wt._ishlnsubmul(zt, 1, sn), Wt.isZero() || (Wt.negative ^= 1) + Mt && (Mt.words[sn] = Kt) + } + return Mt && Mt._strip(), Wt._strip(), It !== 'div' && Ot !== 0 && Wt.iushrn(Ot), { div: Mt || null, mod: Wt } + }), + (ot.prototype.divmod = function (wt, It, Ot) { + if ((rt(!wt.isZero()), this.isZero())) return { div: new ot(0), mod: new ot(0) } + var Wt, zt, Ft + return this.negative !== 0 && wt.negative === 0 + ? ((Ft = this.neg().divmod(wt, It)), + It !== 'mod' && (Wt = Ft.div.neg()), + It !== 'div' && ((zt = Ft.mod.neg()), Ot && zt.negative !== 0 && zt.iadd(wt)), + { div: Wt, mod: zt }) + : this.negative === 0 && wt.negative !== 0 + ? ((Ft = this.divmod(wt.neg(), It)), It !== 'mod' && (Wt = Ft.div.neg()), { div: Wt, mod: Ft.mod }) + : this.negative & wt.negative + ? ((Ft = this.neg().divmod(wt.neg(), It)), + It !== 'div' && ((zt = Ft.mod.neg()), Ot && zt.negative !== 0 && zt.isub(wt)), + { div: Ft.div, mod: zt }) + : wt.length > this.length || this.cmp(wt) < 0 + ? { div: new ot(0), mod: this } + : wt.length === 1 + ? It === 'div' + ? { div: this.divn(wt.words[0]), mod: null } + : It === 'mod' + ? { div: null, mod: new ot(this.modrn(wt.words[0])) } + : { div: this.divn(wt.words[0]), mod: new ot(this.modrn(wt.words[0])) } + : this._wordDiv(wt, It) + }), + (ot.prototype.div = function (wt) { + return this.divmod(wt, 'div', !1).div + }), + (ot.prototype.mod = function (wt) { + return this.divmod(wt, 'mod', !1).mod + }), + (ot.prototype.umod = function (wt) { + return this.divmod(wt, 'mod', !0).mod + }), + (ot.prototype.divRound = function (wt) { + var It = this.divmod(wt) + if (It.mod.isZero()) return It.div + var Ot = It.div.negative !== 0 ? It.mod.isub(wt) : It.mod, + Wt = wt.ushrn(1), + zt = wt.andln(1), + Ft = Ot.cmp(Wt) + return Ft < 0 || (zt === 1 && Ft === 0) ? It.div : It.div.negative !== 0 ? It.div.isubn(1) : It.div.iaddn(1) + }), + (ot.prototype.modrn = function (wt) { + var It = wt < 0 + It && (wt = -wt), rt(wt <= 67108863) + for (var Ot = (1 << 26) % wt, Wt = 0, zt = this.length - 1; zt >= 0; zt--) + Wt = (Ot * Wt + (this.words[zt] | 0)) % wt + return It ? -Wt : Wt + }), + (ot.prototype.modn = function (wt) { + return this.modrn(wt) + }), + (ot.prototype.idivn = function (wt) { + var It = wt < 0 + It && (wt = -wt), rt(wt <= 67108863) + for (var Ot = 0, Wt = this.length - 1; Wt >= 0; Wt--) { + var zt = (this.words[Wt] | 0) + Ot * 67108864 + ;(this.words[Wt] = (zt / wt) | 0), (Ot = zt % wt) + } + return this._strip(), It ? this.ineg() : this + }), + (ot.prototype.divn = function (wt) { + return this.clone().idivn(wt) + }), + (ot.prototype.egcd = function (wt) { + rt(wt.negative === 0), rt(!wt.isZero()) + var It = this, + Ot = wt.clone() + It.negative !== 0 ? (It = It.umod(wt)) : (It = It.clone()) + for (var Wt = new ot(1), zt = new ot(0), Ft = new ot(0), Nt = new ot(1), Ut = 0; It.isEven() && Ot.isEven(); ) + It.iushrn(1), Ot.iushrn(1), ++Ut + for (var Mt = Ot.clone(), Ht = It.clone(); !It.isZero(); ) { + for (var en = 0, sn = 1; !(It.words[0] & sn) && en < 26; ++en, sn <<= 1); + if (en > 0) + for (It.iushrn(en); en-- > 0; ) + (Wt.isOdd() || zt.isOdd()) && (Wt.iadd(Mt), zt.isub(Ht)), Wt.iushrn(1), zt.iushrn(1) + for (var Kt = 0, rn = 1; !(Ot.words[0] & rn) && Kt < 26; ++Kt, rn <<= 1); + if (Kt > 0) + for (Ot.iushrn(Kt); Kt-- > 0; ) + (Ft.isOdd() || Nt.isOdd()) && (Ft.iadd(Mt), Nt.isub(Ht)), Ft.iushrn(1), Nt.iushrn(1) + It.cmp(Ot) >= 0 ? (It.isub(Ot), Wt.isub(Ft), zt.isub(Nt)) : (Ot.isub(It), Ft.isub(Wt), Nt.isub(zt)) + } + return { a: Ft, b: Nt, gcd: Ot.iushln(Ut) } + }), + (ot.prototype._invmp = function (wt) { + rt(wt.negative === 0), rt(!wt.isZero()) + var It = this, + Ot = wt.clone() + It.negative !== 0 ? (It = It.umod(wt)) : (It = It.clone()) + for (var Wt = new ot(1), zt = new ot(0), Ft = Ot.clone(); It.cmpn(1) > 0 && Ot.cmpn(1) > 0; ) { + for (var Nt = 0, Ut = 1; !(It.words[0] & Ut) && Nt < 26; ++Nt, Ut <<= 1); + if (Nt > 0) for (It.iushrn(Nt); Nt-- > 0; ) Wt.isOdd() && Wt.iadd(Ft), Wt.iushrn(1) + for (var Mt = 0, Ht = 1; !(Ot.words[0] & Ht) && Mt < 26; ++Mt, Ht <<= 1); + if (Mt > 0) for (Ot.iushrn(Mt); Mt-- > 0; ) zt.isOdd() && zt.iadd(Ft), zt.iushrn(1) + It.cmp(Ot) >= 0 ? (It.isub(Ot), Wt.isub(zt)) : (Ot.isub(It), zt.isub(Wt)) + } + var en + return It.cmpn(1) === 0 ? (en = Wt) : (en = zt), en.cmpn(0) < 0 && en.iadd(wt), en + }), + (ot.prototype.gcd = function (wt) { + if (this.isZero()) return wt.abs() + if (wt.isZero()) return this.abs() + var It = this.clone(), + Ot = wt.clone() + ;(It.negative = 0), (Ot.negative = 0) + for (var Wt = 0; It.isEven() && Ot.isEven(); Wt++) It.iushrn(1), Ot.iushrn(1) + do { + for (; It.isEven(); ) It.iushrn(1) + for (; Ot.isEven(); ) Ot.iushrn(1) + var zt = It.cmp(Ot) + if (zt < 0) { + var Ft = It + ;(It = Ot), (Ot = Ft) + } else if (zt === 0 || Ot.cmpn(1) === 0) break + It.isub(Ot) + } while (!0) + return Ot.iushln(Wt) + }), + (ot.prototype.invm = function (wt) { + return this.egcd(wt).a.umod(wt) + }), + (ot.prototype.isEven = function () { + return (this.words[0] & 1) === 0 + }), + (ot.prototype.isOdd = function () { + return (this.words[0] & 1) === 1 + }), + (ot.prototype.andln = function (wt) { + return this.words[0] & wt + }), + (ot.prototype.bincn = function (wt) { + rt(typeof wt == 'number') + var It = wt % 26, + Ot = (wt - It) / 26, + Wt = 1 << It + if (this.length <= Ot) return this._expand(Ot + 1), (this.words[Ot] |= Wt), this + for (var zt = Wt, Ft = Ot; zt !== 0 && Ft < this.length; Ft++) { + var Nt = this.words[Ft] | 0 + ;(Nt += zt), (zt = Nt >>> 26), (Nt &= 67108863), (this.words[Ft] = Nt) + } + return zt !== 0 && ((this.words[Ft] = zt), this.length++), this + }), + (ot.prototype.isZero = function () { + return this.length === 1 && this.words[0] === 0 + }), + (ot.prototype.cmpn = function (wt) { + var It = wt < 0 + if (this.negative !== 0 && !It) return -1 + if (this.negative === 0 && It) return 1 + this._strip() + var Ot + if (this.length > 1) Ot = 1 + else { + It && (wt = -wt), rt(wt <= 67108863, 'Number is too big') + var Wt = this.words[0] | 0 + Ot = Wt === wt ? 0 : Wt < wt ? -1 : 1 + } + return this.negative !== 0 ? -Ot | 0 : Ot + }), + (ot.prototype.cmp = function (wt) { + if (this.negative !== 0 && wt.negative === 0) return -1 + if (this.negative === 0 && wt.negative !== 0) return 1 + var It = this.ucmp(wt) + return this.negative !== 0 ? -It | 0 : It + }), + (ot.prototype.ucmp = function (wt) { + if (this.length > wt.length) return 1 + if (this.length < wt.length) return -1 + for (var It = 0, Ot = this.length - 1; Ot >= 0; Ot--) { + var Wt = this.words[Ot] | 0, + zt = wt.words[Ot] | 0 + if (Wt !== zt) { + Wt < zt ? (It = -1) : Wt > zt && (It = 1) + break + } + } + return It + }), + (ot.prototype.gtn = function (wt) { + return this.cmpn(wt) === 1 + }), + (ot.prototype.gt = function (wt) { + return this.cmp(wt) === 1 + }), + (ot.prototype.gten = function (wt) { + return this.cmpn(wt) >= 0 + }), + (ot.prototype.gte = function (wt) { + return this.cmp(wt) >= 0 + }), + (ot.prototype.ltn = function (wt) { + return this.cmpn(wt) === -1 + }), + (ot.prototype.lt = function (wt) { + return this.cmp(wt) === -1 + }), + (ot.prototype.lten = function (wt) { + return this.cmpn(wt) <= 0 + }), + (ot.prototype.lte = function (wt) { + return this.cmp(wt) <= 0 + }), + (ot.prototype.eqn = function (wt) { + return this.cmpn(wt) === 0 + }), + (ot.prototype.eq = function (wt) { + return this.cmp(wt) === 0 + }), + (ot.red = function (wt) { + return new jt(wt) + }), + (ot.prototype.toRed = function (wt) { + return ( + rt(!this.red, 'Already a number in reduction context'), + rt(this.negative === 0, 'red works only with positives'), + wt.convertTo(this)._forceRed(wt) + ) + }), + (ot.prototype.fromRed = function () { + return rt(this.red, 'fromRed works only with numbers in reduction context'), this.red.convertFrom(this) + }), + (ot.prototype._forceRed = function (wt) { + return (this.red = wt), this + }), + (ot.prototype.forceRed = function (wt) { + return rt(!this.red, 'Already a number in reduction context'), this._forceRed(wt) + }), + (ot.prototype.redAdd = function (wt) { + return rt(this.red, 'redAdd works only with red numbers'), this.red.add(this, wt) + }), + (ot.prototype.redIAdd = function (wt) { + return rt(this.red, 'redIAdd works only with red numbers'), this.red.iadd(this, wt) + }), + (ot.prototype.redSub = function (wt) { + return rt(this.red, 'redSub works only with red numbers'), this.red.sub(this, wt) + }), + (ot.prototype.redISub = function (wt) { + return rt(this.red, 'redISub works only with red numbers'), this.red.isub(this, wt) + }), + (ot.prototype.redShl = function (wt) { + return rt(this.red, 'redShl works only with red numbers'), this.red.shl(this, wt) + }), + (ot.prototype.redMul = function (wt) { + return rt(this.red, 'redMul works only with red numbers'), this.red._verify2(this, wt), this.red.mul(this, wt) + }), + (ot.prototype.redIMul = function (wt) { + return ( + rt(this.red, 'redMul works only with red numbers'), this.red._verify2(this, wt), this.red.imul(this, wt) + ) + }), + (ot.prototype.redSqr = function () { + return rt(this.red, 'redSqr works only with red numbers'), this.red._verify1(this), this.red.sqr(this) + }), + (ot.prototype.redISqr = function () { + return rt(this.red, 'redISqr works only with red numbers'), this.red._verify1(this), this.red.isqr(this) + }), + (ot.prototype.redSqrt = function () { + return rt(this.red, 'redSqrt works only with red numbers'), this.red._verify1(this), this.red.sqrt(this) + }), + (ot.prototype.redInvm = function () { + return rt(this.red, 'redInvm works only with red numbers'), this.red._verify1(this), this.red.invm(this) + }), + (ot.prototype.redNeg = function () { + return rt(this.red, 'redNeg works only with red numbers'), this.red._verify1(this), this.red.neg(this) + }), + (ot.prototype.redPow = function (wt) { + return rt(this.red && !wt.red, 'redPow(normalNum)'), this.red._verify1(this), this.red.pow(this, wt) + }) + var St = { k256: null, p224: null, p192: null, p25519: null } + function Tt(Ct, wt) { + ;(this.name = Ct), + (this.p = new ot(wt, 16)), + (this.n = this.p.bitLength()), + (this.k = new ot(1).iushln(this.n).isub(this.p)), + (this.tmp = this._tmp()) + } + ;(Tt.prototype._tmp = function () { + var wt = new ot(null) + return (wt.words = new Array(Math.ceil(this.n / 13))), wt + }), + (Tt.prototype.ireduce = function (wt) { + var It = wt, + Ot + do this.split(It, this.tmp), (It = this.imulK(It)), (It = It.iadd(this.tmp)), (Ot = It.bitLength()) + while (Ot > this.n) + var Wt = Ot < this.n ? -1 : It.ucmp(this.p) + return ( + Wt === 0 + ? ((It.words[0] = 0), (It.length = 1)) + : Wt > 0 + ? It.isub(this.p) + : It.strip !== void 0 + ? It.strip() + : It._strip(), + It + ) + }), + (Tt.prototype.split = function (wt, It) { + wt.iushrn(this.n, 0, It) + }), + (Tt.prototype.imulK = function (wt) { + return wt.imul(this.k) + }) + function At() { + Tt.call(this, 'k256', 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f') + } + it(At, Tt), + (At.prototype.split = function (wt, It) { + for (var Ot = 4194303, Wt = Math.min(wt.length, 9), zt = 0; zt < Wt; zt++) It.words[zt] = wt.words[zt] + if (((It.length = Wt), wt.length <= 9)) { + ;(wt.words[0] = 0), (wt.length = 1) + return + } + var Ft = wt.words[9] + for (It.words[It.length++] = Ft & Ot, zt = 10; zt < wt.length; zt++) { + var Nt = wt.words[zt] | 0 + ;(wt.words[zt - 10] = ((Nt & Ot) << 4) | (Ft >>> 22)), (Ft = Nt) + } + ;(Ft >>>= 22), (wt.words[zt - 10] = Ft), Ft === 0 && wt.length > 10 ? (wt.length -= 10) : (wt.length -= 9) + }), + (At.prototype.imulK = function (wt) { + ;(wt.words[wt.length] = 0), (wt.words[wt.length + 1] = 0), (wt.length += 2) + for (var It = 0, Ot = 0; Ot < wt.length; Ot++) { + var Wt = wt.words[Ot] | 0 + ;(It += Wt * 977), (wt.words[Ot] = It & 67108863), (It = Wt * 64 + ((It / 67108864) | 0)) + } + return wt.words[wt.length - 1] === 0 && (wt.length--, wt.words[wt.length - 1] === 0 && wt.length--), wt + }) + function Et() { + Tt.call(this, 'p224', 'ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001') + } + it(Et, Tt) + function $t() { + Tt.call(this, 'p192', 'ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff') + } + it($t, Tt) + function Dt() { + Tt.call(this, '25519', '7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed') + } + it(Dt, Tt), + (Dt.prototype.imulK = function (wt) { + for (var It = 0, Ot = 0; Ot < wt.length; Ot++) { + var Wt = (wt.words[Ot] | 0) * 19 + It, + zt = Wt & 67108863 + ;(Wt >>>= 26), (wt.words[Ot] = zt), (It = Wt) + } + return It !== 0 && (wt.words[wt.length++] = It), wt + }), + (ot._prime = function (wt) { + if (St[wt]) return St[wt] + var It + if (wt === 'k256') It = new At() + else if (wt === 'p224') It = new Et() + else if (wt === 'p192') It = new $t() + else if (wt === 'p25519') It = new Dt() + else throw new Error('Unknown prime ' + wt) + return (St[wt] = It), It + }) + function jt(Ct) { + if (typeof Ct == 'string') { + var wt = ot._prime(Ct) + ;(this.m = wt.p), (this.prime = wt) + } else rt(Ct.gtn(1), 'modulus must be greater than 1'), (this.m = Ct), (this.prime = null) + } + ;(jt.prototype._verify1 = function (wt) { + rt(wt.negative === 0, 'red works only with positives'), rt(wt.red, 'red works only with red numbers') + }), + (jt.prototype._verify2 = function (wt, It) { + rt((wt.negative | It.negative) === 0, 'red works only with positives'), + rt(wt.red && wt.red === It.red, 'red works only with red numbers') + }), + (jt.prototype.imod = function (wt) { + return this.prime ? this.prime.ireduce(wt)._forceRed(this) : (ut(wt, wt.umod(this.m)._forceRed(this)), wt) + }), + (jt.prototype.neg = function (wt) { + return wt.isZero() ? wt.clone() : this.m.sub(wt)._forceRed(this) + }), + (jt.prototype.add = function (wt, It) { + this._verify2(wt, It) + var Ot = wt.add(It) + return Ot.cmp(this.m) >= 0 && Ot.isub(this.m), Ot._forceRed(this) + }), + (jt.prototype.iadd = function (wt, It) { + this._verify2(wt, It) + var Ot = wt.iadd(It) + return Ot.cmp(this.m) >= 0 && Ot.isub(this.m), Ot + }), + (jt.prototype.sub = function (wt, It) { + this._verify2(wt, It) + var Ot = wt.sub(It) + return Ot.cmpn(0) < 0 && Ot.iadd(this.m), Ot._forceRed(this) + }), + (jt.prototype.isub = function (wt, It) { + this._verify2(wt, It) + var Ot = wt.isub(It) + return Ot.cmpn(0) < 0 && Ot.iadd(this.m), Ot + }), + (jt.prototype.shl = function (wt, It) { + return this._verify1(wt), this.imod(wt.ushln(It)) + }), + (jt.prototype.imul = function (wt, It) { + return this._verify2(wt, It), this.imod(wt.imul(It)) + }), + (jt.prototype.mul = function (wt, It) { + return this._verify2(wt, It), this.imod(wt.mul(It)) + }), + (jt.prototype.isqr = function (wt) { + return this.imul(wt, wt.clone()) + }), + (jt.prototype.sqr = function (wt) { + return this.mul(wt, wt) + }), + (jt.prototype.sqrt = function (wt) { + if (wt.isZero()) return wt.clone() + var It = this.m.andln(3) + if ((rt(It % 2 === 1), It === 3)) { + var Ot = this.m.add(new ot(1)).iushrn(2) + return this.pow(wt, Ot) + } + for (var Wt = this.m.subn(1), zt = 0; !Wt.isZero() && Wt.andln(1) === 0; ) zt++, Wt.iushrn(1) + rt(!Wt.isZero()) + var Ft = new ot(1).toRed(this), + Nt = Ft.redNeg(), + Ut = this.m.subn(1).iushrn(1), + Mt = this.m.bitLength() + for (Mt = new ot(2 * Mt * Mt).toRed(this); this.pow(Mt, Ut).cmp(Nt) !== 0; ) Mt.redIAdd(Nt) + for ( + var Ht = this.pow(Mt, Wt), en = this.pow(wt, Wt.addn(1).iushrn(1)), sn = this.pow(wt, Wt), Kt = zt; + sn.cmp(Ft) !== 0; + + ) { + for (var rn = sn, nn = 0; rn.cmp(Ft) !== 0; nn++) rn = rn.redSqr() + rt(nn < Kt) + var hn = this.pow(Ht, new ot(1).iushln(Kt - nn - 1)) + ;(en = en.redMul(hn)), (Ht = hn.redSqr()), (sn = sn.redMul(Ht)), (Kt = nn) + } + return en + }), + (jt.prototype.invm = function (wt) { + var It = wt._invmp(this.m) + return It.negative !== 0 ? ((It.negative = 0), this.imod(It).redNeg()) : this.imod(It) + }), + (jt.prototype.pow = function (wt, It) { + if (It.isZero()) return new ot(1).toRed(this) + if (It.cmpn(1) === 0) return wt.clone() + var Ot = 4, + Wt = new Array(1 << Ot) + ;(Wt[0] = new ot(1).toRed(this)), (Wt[1] = wt) + for (var zt = 2; zt < Wt.length; zt++) Wt[zt] = this.mul(Wt[zt - 1], wt) + var Ft = Wt[0], + Nt = 0, + Ut = 0, + Mt = It.bitLength() % 26 + for (Mt === 0 && (Mt = 26), zt = It.length - 1; zt >= 0; zt--) { + for (var Ht = It.words[zt], en = Mt - 1; en >= 0; en--) { + var sn = (Ht >> en) & 1 + if ((Ft !== Wt[0] && (Ft = this.sqr(Ft)), sn === 0 && Nt === 0)) { + Ut = 0 + continue + } + ;(Nt <<= 1), + (Nt |= sn), + Ut++, + !(Ut !== Ot && (zt !== 0 || en !== 0)) && ((Ft = this.mul(Ft, Wt[Nt])), (Ut = 0), (Nt = 0)) + } + Mt = 26 + } + return Ft + }), + (jt.prototype.convertTo = function (wt) { + var It = wt.umod(this.m) + return It === wt ? It.clone() : It + }), + (jt.prototype.convertFrom = function (wt) { + var It = wt.clone() + return (It.red = null), It + }), + (ot.mont = function (wt) { + return new Pt(wt) + }) + function Pt(Ct) { + jt.call(this, Ct), + (this.shift = this.m.bitLength()), + this.shift % 26 !== 0 && (this.shift += 26 - (this.shift % 26)), + (this.r = new ot(1).iushln(this.shift)), + (this.r2 = this.imod(this.r.sqr())), + (this.rinv = this.r._invmp(this.m)), + (this.minv = this.rinv.mul(this.r).isubn(1).div(this.m)), + (this.minv = this.minv.umod(this.r)), + (this.minv = this.r.sub(this.minv)) + } + it(Pt, jt), + (Pt.prototype.convertTo = function (wt) { + return this.imod(wt.ushln(this.shift)) + }), + (Pt.prototype.convertFrom = function (wt) { + var It = this.imod(wt.mul(this.rinv)) + return (It.red = null), It + }), + (Pt.prototype.imul = function (wt, It) { + if (wt.isZero() || It.isZero()) return (wt.words[0] = 0), (wt.length = 1), wt + var Ot = wt.imul(It), + Wt = Ot.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m), + zt = Ot.isub(Wt).iushrn(this.shift), + Ft = zt + return ( + zt.cmp(this.m) >= 0 ? (Ft = zt.isub(this.m)) : zt.cmpn(0) < 0 && (Ft = zt.iadd(this.m)), Ft._forceRed(this) + ) + }), + (Pt.prototype.mul = function (wt, It) { + if (wt.isZero() || It.isZero()) return new ot(0)._forceRed(this) + var Ot = wt.mul(It), + Wt = Ot.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m), + zt = Ot.isub(Wt).iushrn(this.shift), + Ft = zt + return ( + zt.cmp(this.m) >= 0 ? (Ft = zt.isub(this.m)) : zt.cmpn(0) < 0 && (Ft = zt.iadd(this.m)), Ft._forceRed(this) + ) + }), + (Pt.prototype.invm = function (wt) { + var It = this.imod(wt._invmp(this.m).mul(this.r2)) + return It._forceRed(this) + }) + })(tt, commonjsGlobal) + })(bn$1) + var bnExports$1 = bn$1.exports, + BN$c = bnExports$1, + randomBytes$1 = browserExports + function blind(tt) { + var et = getr(tt), + nt = et.toRed(BN$c.mont(tt.modulus)).redPow(new BN$c(tt.publicExponent)).fromRed() + return { blinder: nt, unblinder: et.invm(tt.modulus) } + } + function getr(tt) { + var et = tt.modulus.byteLength(), + nt + do nt = new BN$c(randomBytes$1(et)) + while (nt.cmp(tt.modulus) >= 0 || !nt.umod(tt.prime1) || !nt.umod(tt.prime2)) + return nt + } + function crt$2(tt, et) { + var nt = blind(et), + rt = et.modulus.byteLength(), + it = new BN$c(tt).mul(nt.blinder).umod(et.modulus), + ot = it.toRed(BN$c.mont(et.prime1)), + at = it.toRed(BN$c.mont(et.prime2)), + st = et.coefficient, + lt = et.prime1, + ct = et.prime2, + ut = ot.redPow(et.exponent1).fromRed(), + ht = at.redPow(et.exponent2).fromRed(), + dt = ut.isub(ht).imul(st).umod(lt).imul(ct) + return ht.iadd(dt).imul(nt.unblinder).umod(et.modulus).toArrayLike(Buffer, 'be', rt) + } + crt$2.getr = getr + var browserifyRsa = crt$2, + elliptic$2 = {} + const name$1 = 'elliptic', + version$2 = '6.5.4', + description = 'EC cryptography', + main = 'lib/elliptic.js', + files = ['lib'], + scripts = { + lint: 'eslint lib test', + 'lint:fix': 'npm run lint -- --fix', + unit: 'istanbul test _mocha --reporter=spec test/index.js', + test: 'npm run lint && npm run unit', + version: 'grunt dist && git add dist/', + }, + repository = { type: 'git', url: 'git@github.com:indutny/elliptic' }, + keywords = ['EC', 'Elliptic', 'curve', 'Cryptography'], + author = 'Fedor Indutny ', + license = 'MIT', + bugs = { url: 'https://github.com/indutny/elliptic/issues' }, + homepage = 'https://github.com/indutny/elliptic', + devDependencies = { + brfs: '^2.0.2', + coveralls: '^3.1.0', + eslint: '^7.6.0', + grunt: '^1.2.1', + 'grunt-browserify': '^5.3.0', + 'grunt-cli': '^1.3.2', + 'grunt-contrib-connect': '^3.0.0', + 'grunt-contrib-copy': '^1.0.0', + 'grunt-contrib-uglify': '^5.0.0', + 'grunt-mocha-istanbul': '^5.0.2', + 'grunt-saucelabs': '^9.0.1', + istanbul: '^0.4.5', + mocha: '^8.0.1', + }, + dependencies = { + 'bn.js': '^4.11.9', + brorand: '^1.1.0', + 'hash.js': '^1.0.0', + 'hmac-drbg': '^1.0.1', + inherits: '^2.0.4', + 'minimalistic-assert': '^1.0.1', + 'minimalistic-crypto-utils': '^1.0.1', + }, + require$$0$1 = { + name: name$1, + version: version$2, + description, + main, + files, + scripts, + repository, + keywords, + author, + license, + bugs, + homepage, + devDependencies, + dependencies, + } + var utils$o = {}, + utils$n = {} + ;(function (tt) { + var et = tt + function nt(ot, at) { + if (Array.isArray(ot)) return ot.slice() + if (!ot) return [] + var st = [] + if (typeof ot != 'string') { + for (var lt = 0; lt < ot.length; lt++) st[lt] = ot[lt] | 0 + return st + } + if (at === 'hex') { + ;(ot = ot.replace(/[^a-z0-9]+/gi, '')), ot.length % 2 !== 0 && (ot = '0' + ot) + for (var lt = 0; lt < ot.length; lt += 2) st.push(parseInt(ot[lt] + ot[lt + 1], 16)) + } else + for (var lt = 0; lt < ot.length; lt++) { + var ct = ot.charCodeAt(lt), + ut = ct >> 8, + ht = ct & 255 + ut ? st.push(ut, ht) : st.push(ht) + } + return st + } + et.toArray = nt + function rt(ot) { + return ot.length === 1 ? '0' + ot : ot + } + et.zero2 = rt + function it(ot) { + for (var at = '', st = 0; st < ot.length; st++) at += rt(ot[st].toString(16)) + return at + } + ;(et.toHex = it), + (et.encode = function (at, st) { + return st === 'hex' ? it(at) : at + }) + })(utils$n) + ;(function (tt) { + var et = tt, + nt = bnExports$2, + rt = minimalisticAssert, + it = utils$n + ;(et.assert = rt), (et.toArray = it.toArray), (et.zero2 = it.zero2), (et.toHex = it.toHex), (et.encode = it.encode) + function ot(ut, ht, dt) { + var pt = new Array(Math.max(ut.bitLength(), dt) + 1) + pt.fill(0) + for (var mt = 1 << (ht + 1), gt = ut.clone(), yt = 0; yt < pt.length; yt++) { + var bt, + vt = gt.andln(mt - 1) + gt.isOdd() ? (vt > (mt >> 1) - 1 ? (bt = (mt >> 1) - vt) : (bt = vt), gt.isubn(bt)) : (bt = 0), + (pt[yt] = bt), + gt.iushrn(1) + } + return pt + } + et.getNAF = ot + function at(ut, ht) { + var dt = [[], []] + ;(ut = ut.clone()), (ht = ht.clone()) + for (var pt = 0, mt = 0, gt; ut.cmpn(-pt) > 0 || ht.cmpn(-mt) > 0; ) { + var yt = (ut.andln(3) + pt) & 3, + bt = (ht.andln(3) + mt) & 3 + yt === 3 && (yt = -1), bt === 3 && (bt = -1) + var vt + yt & 1 + ? ((gt = (ut.andln(7) + pt) & 7), (gt === 3 || gt === 5) && bt === 2 ? (vt = -yt) : (vt = yt)) + : (vt = 0), + dt[0].push(vt) + var xt + bt & 1 + ? ((gt = (ht.andln(7) + mt) & 7), (gt === 3 || gt === 5) && yt === 2 ? (xt = -bt) : (xt = bt)) + : (xt = 0), + dt[1].push(xt), + 2 * pt === vt + 1 && (pt = 1 - pt), + 2 * mt === xt + 1 && (mt = 1 - mt), + ut.iushrn(1), + ht.iushrn(1) + } + return dt + } + et.getJSF = at + function st(ut, ht, dt) { + var pt = '_' + ht + ut.prototype[ht] = function () { + return this[pt] !== void 0 ? this[pt] : (this[pt] = dt.call(this)) + } + } + et.cachedProperty = st + function lt(ut) { + return typeof ut == 'string' ? et.toArray(ut, 'hex') : ut + } + et.parseBytes = lt + function ct(ut) { + return new nt(ut, 'hex', 'le') + } + et.intFromLE = ct + })(utils$o) + var curve = {}, + BN$b = bnExports$2, + utils$m = utils$o, + getNAF = utils$m.getNAF, + getJSF = utils$m.getJSF, + assert$j = utils$m.assert + function BaseCurve(tt, et) { + ;(this.type = tt), + (this.p = new BN$b(et.p, 16)), + (this.red = et.prime ? BN$b.red(et.prime) : BN$b.mont(this.p)), + (this.zero = new BN$b(0).toRed(this.red)), + (this.one = new BN$b(1).toRed(this.red)), + (this.two = new BN$b(2).toRed(this.red)), + (this.n = et.n && new BN$b(et.n, 16)), + (this.g = et.g && this.pointFromJSON(et.g, et.gRed)), + (this._wnafT1 = new Array(4)), + (this._wnafT2 = new Array(4)), + (this._wnafT3 = new Array(4)), + (this._wnafT4 = new Array(4)), + (this._bitLength = this.n ? this.n.bitLength() : 0) + var nt = this.n && this.p.div(this.n) + !nt || nt.cmpn(100) > 0 ? (this.redN = null) : ((this._maxwellTrick = !0), (this.redN = this.n.toRed(this.red))) + } + var base$3 = BaseCurve + BaseCurve.prototype.point = function () { + throw new Error('Not implemented') + } + BaseCurve.prototype.validate = function () { + throw new Error('Not implemented') + } + BaseCurve.prototype._fixedNafMul = function (et, nt) { + assert$j(et.precomputed) + var rt = et._getDoubles(), + it = getNAF(nt, 1, this._bitLength), + ot = (1 << (rt.step + 1)) - (rt.step % 2 === 0 ? 2 : 1) + ot /= 3 + var at = [], + st, + lt + for (st = 0; st < it.length; st += rt.step) { + lt = 0 + for (var ct = st + rt.step - 1; ct >= st; ct--) lt = (lt << 1) + it[ct] + at.push(lt) + } + for (var ut = this.jpoint(null, null, null), ht = this.jpoint(null, null, null), dt = ot; dt > 0; dt--) { + for (st = 0; st < at.length; st++) + (lt = at[st]), + lt === dt ? (ht = ht.mixedAdd(rt.points[st])) : lt === -dt && (ht = ht.mixedAdd(rt.points[st].neg())) + ut = ut.add(ht) + } + return ut.toP() + } + BaseCurve.prototype._wnafMul = function (et, nt) { + var rt = 4, + it = et._getNAFPoints(rt) + rt = it.wnd + for ( + var ot = it.points, at = getNAF(nt, rt, this._bitLength), st = this.jpoint(null, null, null), lt = at.length - 1; + lt >= 0; + lt-- + ) { + for (var ct = 0; lt >= 0 && at[lt] === 0; lt--) ct++ + if ((lt >= 0 && ct++, (st = st.dblp(ct)), lt < 0)) break + var ut = at[lt] + assert$j(ut !== 0), + et.type === 'affine' + ? ut > 0 + ? (st = st.mixedAdd(ot[(ut - 1) >> 1])) + : (st = st.mixedAdd(ot[(-ut - 1) >> 1].neg())) + : ut > 0 + ? (st = st.add(ot[(ut - 1) >> 1])) + : (st = st.add(ot[(-ut - 1) >> 1].neg())) + } + return et.type === 'affine' ? st.toP() : st + } + BaseCurve.prototype._wnafMulAdd = function (et, nt, rt, it, ot) { + var at = this._wnafT1, + st = this._wnafT2, + lt = this._wnafT3, + ct = 0, + ut, + ht, + dt + for (ut = 0; ut < it; ut++) { + dt = nt[ut] + var pt = dt._getNAFPoints(et) + ;(at[ut] = pt.wnd), (st[ut] = pt.points) + } + for (ut = it - 1; ut >= 1; ut -= 2) { + var mt = ut - 1, + gt = ut + if (at[mt] !== 1 || at[gt] !== 1) { + ;(lt[mt] = getNAF(rt[mt], at[mt], this._bitLength)), + (lt[gt] = getNAF(rt[gt], at[gt], this._bitLength)), + (ct = Math.max(lt[mt].length, ct)), + (ct = Math.max(lt[gt].length, ct)) + continue + } + var yt = [nt[mt], null, null, nt[gt]] + nt[mt].y.cmp(nt[gt].y) === 0 + ? ((yt[1] = nt[mt].add(nt[gt])), (yt[2] = nt[mt].toJ().mixedAdd(nt[gt].neg()))) + : nt[mt].y.cmp(nt[gt].y.redNeg()) === 0 + ? ((yt[1] = nt[mt].toJ().mixedAdd(nt[gt])), (yt[2] = nt[mt].add(nt[gt].neg()))) + : ((yt[1] = nt[mt].toJ().mixedAdd(nt[gt])), (yt[2] = nt[mt].toJ().mixedAdd(nt[gt].neg()))) + var bt = [-3, -1, -5, -7, 0, 7, 5, 1, 3], + vt = getJSF(rt[mt], rt[gt]) + for (ct = Math.max(vt[0].length, ct), lt[mt] = new Array(ct), lt[gt] = new Array(ct), ht = 0; ht < ct; ht++) { + var xt = vt[0][ht] | 0, + kt = vt[1][ht] | 0 + ;(lt[mt][ht] = bt[(xt + 1) * 3 + (kt + 1)]), (lt[gt][ht] = 0), (st[mt] = yt) + } + } + var St = this.jpoint(null, null, null), + Tt = this._wnafT4 + for (ut = ct; ut >= 0; ut--) { + for (var At = 0; ut >= 0; ) { + var Et = !0 + for (ht = 0; ht < it; ht++) (Tt[ht] = lt[ht][ut] | 0), Tt[ht] !== 0 && (Et = !1) + if (!Et) break + At++, ut-- + } + if ((ut >= 0 && At++, (St = St.dblp(At)), ut < 0)) break + for (ht = 0; ht < it; ht++) { + var $t = Tt[ht] + $t !== 0 && + ($t > 0 ? (dt = st[ht][($t - 1) >> 1]) : $t < 0 && (dt = st[ht][(-$t - 1) >> 1].neg()), + dt.type === 'affine' ? (St = St.mixedAdd(dt)) : (St = St.add(dt))) + } + } + for (ut = 0; ut < it; ut++) st[ut] = null + return ot ? St : St.toP() + } + function BasePoint(tt, et) { + ;(this.curve = tt), (this.type = et), (this.precomputed = null) + } + BaseCurve.BasePoint = BasePoint + BasePoint.prototype.eq = function () { + throw new Error('Not implemented') + } + BasePoint.prototype.validate = function () { + return this.curve.validate(this) + } + BaseCurve.prototype.decodePoint = function (et, nt) { + et = utils$m.toArray(et, nt) + var rt = this.p.byteLength() + if ((et[0] === 4 || et[0] === 6 || et[0] === 7) && et.length - 1 === 2 * rt) { + et[0] === 6 ? assert$j(et[et.length - 1] % 2 === 0) : et[0] === 7 && assert$j(et[et.length - 1] % 2 === 1) + var it = this.point(et.slice(1, 1 + rt), et.slice(1 + rt, 1 + 2 * rt)) + return it + } else if ((et[0] === 2 || et[0] === 3) && et.length - 1 === rt) + return this.pointFromX(et.slice(1, 1 + rt), et[0] === 3) + throw new Error('Unknown point format') + } + BasePoint.prototype.encodeCompressed = function (et) { + return this.encode(et, !0) + } + BasePoint.prototype._encode = function (et) { + var nt = this.curve.p.byteLength(), + rt = this.getX().toArray('be', nt) + return et ? [this.getY().isEven() ? 2 : 3].concat(rt) : [4].concat(rt, this.getY().toArray('be', nt)) + } + BasePoint.prototype.encode = function (et, nt) { + return utils$m.encode(this._encode(nt), et) + } + BasePoint.prototype.precompute = function (et) { + if (this.precomputed) return this + var nt = { doubles: null, naf: null, beta: null } + return ( + (nt.naf = this._getNAFPoints(8)), + (nt.doubles = this._getDoubles(4, et)), + (nt.beta = this._getBeta()), + (this.precomputed = nt), + this + ) + } + BasePoint.prototype._hasDoubles = function (et) { + if (!this.precomputed) return !1 + var nt = this.precomputed.doubles + return nt ? nt.points.length >= Math.ceil((et.bitLength() + 1) / nt.step) : !1 + } + BasePoint.prototype._getDoubles = function (et, nt) { + if (this.precomputed && this.precomputed.doubles) return this.precomputed.doubles + for (var rt = [this], it = this, ot = 0; ot < nt; ot += et) { + for (var at = 0; at < et; at++) it = it.dbl() + rt.push(it) + } + return { step: et, points: rt } + } + BasePoint.prototype._getNAFPoints = function (et) { + if (this.precomputed && this.precomputed.naf) return this.precomputed.naf + for (var nt = [this], rt = (1 << et) - 1, it = rt === 1 ? null : this.dbl(), ot = 1; ot < rt; ot++) + nt[ot] = nt[ot - 1].add(it) + return { wnd: et, points: nt } + } + BasePoint.prototype._getBeta = function () { + return null + } + BasePoint.prototype.dblp = function (et) { + for (var nt = this, rt = 0; rt < et; rt++) nt = nt.dbl() + return nt + } + var utils$l = utils$o, + BN$a = bnExports$2, + inherits$9 = inherits_browserExports, + Base$2 = base$3, + assert$i = utils$l.assert + function ShortCurve(tt) { + Base$2.call(this, 'short', tt), + (this.a = new BN$a(tt.a, 16).toRed(this.red)), + (this.b = new BN$a(tt.b, 16).toRed(this.red)), + (this.tinv = this.two.redInvm()), + (this.zeroA = this.a.fromRed().cmpn(0) === 0), + (this.threeA = this.a.fromRed().sub(this.p).cmpn(-3) === 0), + (this.endo = this._getEndomorphism(tt)), + (this._endoWnafT1 = new Array(4)), + (this._endoWnafT2 = new Array(4)) + } + inherits$9(ShortCurve, Base$2) + var short = ShortCurve + ShortCurve.prototype._getEndomorphism = function (et) { + if (!(!this.zeroA || !this.g || !this.n || this.p.modn(3) !== 1)) { + var nt, rt + if (et.beta) nt = new BN$a(et.beta, 16).toRed(this.red) + else { + var it = this._getEndoRoots(this.p) + ;(nt = it[0].cmp(it[1]) < 0 ? it[0] : it[1]), (nt = nt.toRed(this.red)) + } + if (et.lambda) rt = new BN$a(et.lambda, 16) + else { + var ot = this._getEndoRoots(this.n) + this.g.mul(ot[0]).x.cmp(this.g.x.redMul(nt)) === 0 + ? (rt = ot[0]) + : ((rt = ot[1]), assert$i(this.g.mul(rt).x.cmp(this.g.x.redMul(nt)) === 0)) + } + var at + return ( + et.basis + ? (at = et.basis.map(function (st) { + return { a: new BN$a(st.a, 16), b: new BN$a(st.b, 16) } + })) + : (at = this._getEndoBasis(rt)), + { beta: nt, lambda: rt, basis: at } + ) + } + } + ShortCurve.prototype._getEndoRoots = function (et) { + var nt = et === this.p ? this.red : BN$a.mont(et), + rt = new BN$a(2).toRed(nt).redInvm(), + it = rt.redNeg(), + ot = new BN$a(3).toRed(nt).redNeg().redSqrt().redMul(rt), + at = it.redAdd(ot).fromRed(), + st = it.redSub(ot).fromRed() + return [at, st] + } + ShortCurve.prototype._getEndoBasis = function (et) { + for ( + var nt = this.n.ushrn(Math.floor(this.n.bitLength() / 2)), + rt = et, + it = this.n.clone(), + ot = new BN$a(1), + at = new BN$a(0), + st = new BN$a(0), + lt = new BN$a(1), + ct, + ut, + ht, + dt, + pt, + mt, + gt, + yt = 0, + bt, + vt; + rt.cmpn(0) !== 0; + + ) { + var xt = it.div(rt) + ;(bt = it.sub(xt.mul(rt))), (vt = st.sub(xt.mul(ot))) + var kt = lt.sub(xt.mul(at)) + if (!ht && bt.cmp(nt) < 0) (ct = gt.neg()), (ut = ot), (ht = bt.neg()), (dt = vt) + else if (ht && ++yt === 2) break + ;(gt = bt), (it = rt), (rt = bt), (st = ot), (ot = vt), (lt = at), (at = kt) + } + ;(pt = bt.neg()), (mt = vt) + var St = ht.sqr().add(dt.sqr()), + Tt = pt.sqr().add(mt.sqr()) + return ( + Tt.cmp(St) >= 0 && ((pt = ct), (mt = ut)), + ht.negative && ((ht = ht.neg()), (dt = dt.neg())), + pt.negative && ((pt = pt.neg()), (mt = mt.neg())), + [ + { a: ht, b: dt }, + { a: pt, b: mt }, + ] + ) + } + ShortCurve.prototype._endoSplit = function (et) { + var nt = this.endo.basis, + rt = nt[0], + it = nt[1], + ot = it.b.mul(et).divRound(this.n), + at = rt.b.neg().mul(et).divRound(this.n), + st = ot.mul(rt.a), + lt = at.mul(it.a), + ct = ot.mul(rt.b), + ut = at.mul(it.b), + ht = et.sub(st).sub(lt), + dt = ct.add(ut).neg() + return { k1: ht, k2: dt } + } + ShortCurve.prototype.pointFromX = function (et, nt) { + ;(et = new BN$a(et, 16)), et.red || (et = et.toRed(this.red)) + var rt = et.redSqr().redMul(et).redIAdd(et.redMul(this.a)).redIAdd(this.b), + it = rt.redSqrt() + if (it.redSqr().redSub(rt).cmp(this.zero) !== 0) throw new Error('invalid point') + var ot = it.fromRed().isOdd() + return ((nt && !ot) || (!nt && ot)) && (it = it.redNeg()), this.point(et, it) + } + ShortCurve.prototype.validate = function (et) { + if (et.inf) return !0 + var nt = et.x, + rt = et.y, + it = this.a.redMul(nt), + ot = nt.redSqr().redMul(nt).redIAdd(it).redIAdd(this.b) + return rt.redSqr().redISub(ot).cmpn(0) === 0 + } + ShortCurve.prototype._endoWnafMulAdd = function (et, nt, rt) { + for (var it = this._endoWnafT1, ot = this._endoWnafT2, at = 0; at < et.length; at++) { + var st = this._endoSplit(nt[at]), + lt = et[at], + ct = lt._getBeta() + st.k1.negative && (st.k1.ineg(), (lt = lt.neg(!0))), + st.k2.negative && (st.k2.ineg(), (ct = ct.neg(!0))), + (it[at * 2] = lt), + (it[at * 2 + 1] = ct), + (ot[at * 2] = st.k1), + (ot[at * 2 + 1] = st.k2) + } + for (var ut = this._wnafMulAdd(1, it, ot, at * 2, rt), ht = 0; ht < at * 2; ht++) (it[ht] = null), (ot[ht] = null) + return ut + } + function Point$2(tt, et, nt, rt) { + Base$2.BasePoint.call(this, tt, 'affine'), + et === null && nt === null + ? ((this.x = null), (this.y = null), (this.inf = !0)) + : ((this.x = new BN$a(et, 16)), + (this.y = new BN$a(nt, 16)), + rt && (this.x.forceRed(this.curve.red), this.y.forceRed(this.curve.red)), + this.x.red || (this.x = this.x.toRed(this.curve.red)), + this.y.red || (this.y = this.y.toRed(this.curve.red)), + (this.inf = !1)) + } + inherits$9(Point$2, Base$2.BasePoint) + ShortCurve.prototype.point = function (et, nt, rt) { + return new Point$2(this, et, nt, rt) + } + ShortCurve.prototype.pointFromJSON = function (et, nt) { + return Point$2.fromJSON(this, et, nt) + } + Point$2.prototype._getBeta = function () { + if (this.curve.endo) { + var et = this.precomputed + if (et && et.beta) return et.beta + var nt = this.curve.point(this.x.redMul(this.curve.endo.beta), this.y) + if (et) { + var rt = this.curve, + it = function (ot) { + return rt.point(ot.x.redMul(rt.endo.beta), ot.y) + } + ;(et.beta = nt), + (nt.precomputed = { + beta: null, + naf: et.naf && { wnd: et.naf.wnd, points: et.naf.points.map(it) }, + doubles: et.doubles && { step: et.doubles.step, points: et.doubles.points.map(it) }, + }) + } + return nt + } + } + Point$2.prototype.toJSON = function () { + return this.precomputed + ? [ + this.x, + this.y, + this.precomputed && { + doubles: this.precomputed.doubles && { + step: this.precomputed.doubles.step, + points: this.precomputed.doubles.points.slice(1), + }, + naf: this.precomputed.naf && { + wnd: this.precomputed.naf.wnd, + points: this.precomputed.naf.points.slice(1), + }, + }, + ] + : [this.x, this.y] + } + Point$2.fromJSON = function (et, nt, rt) { + typeof nt == 'string' && (nt = JSON.parse(nt)) + var it = et.point(nt[0], nt[1], rt) + if (!nt[2]) return it + function ot(st) { + return et.point(st[0], st[1], rt) + } + var at = nt[2] + return ( + (it.precomputed = { + beta: null, + doubles: at.doubles && { step: at.doubles.step, points: [it].concat(at.doubles.points.map(ot)) }, + naf: at.naf && { wnd: at.naf.wnd, points: [it].concat(at.naf.points.map(ot)) }, + }), + it + ) + } + Point$2.prototype.inspect = function () { + return this.isInfinity() + ? '' + : '' + } + Point$2.prototype.isInfinity = function () { + return this.inf + } + Point$2.prototype.add = function (et) { + if (this.inf) return et + if (et.inf) return this + if (this.eq(et)) return this.dbl() + if (this.neg().eq(et)) return this.curve.point(null, null) + if (this.x.cmp(et.x) === 0) return this.curve.point(null, null) + var nt = this.y.redSub(et.y) + nt.cmpn(0) !== 0 && (nt = nt.redMul(this.x.redSub(et.x).redInvm())) + var rt = nt.redSqr().redISub(this.x).redISub(et.x), + it = nt.redMul(this.x.redSub(rt)).redISub(this.y) + return this.curve.point(rt, it) + } + Point$2.prototype.dbl = function () { + if (this.inf) return this + var et = this.y.redAdd(this.y) + if (et.cmpn(0) === 0) return this.curve.point(null, null) + var nt = this.curve.a, + rt = this.x.redSqr(), + it = et.redInvm(), + ot = rt.redAdd(rt).redIAdd(rt).redIAdd(nt).redMul(it), + at = ot.redSqr().redISub(this.x.redAdd(this.x)), + st = ot.redMul(this.x.redSub(at)).redISub(this.y) + return this.curve.point(at, st) + } + Point$2.prototype.getX = function () { + return this.x.fromRed() + } + Point$2.prototype.getY = function () { + return this.y.fromRed() + } + Point$2.prototype.mul = function (et) { + return ( + (et = new BN$a(et, 16)), + this.isInfinity() + ? this + : this._hasDoubles(et) + ? this.curve._fixedNafMul(this, et) + : this.curve.endo + ? this.curve._endoWnafMulAdd([this], [et]) + : this.curve._wnafMul(this, et) + ) + } + Point$2.prototype.mulAdd = function (et, nt, rt) { + var it = [this, nt], + ot = [et, rt] + return this.curve.endo ? this.curve._endoWnafMulAdd(it, ot) : this.curve._wnafMulAdd(1, it, ot, 2) + } + Point$2.prototype.jmulAdd = function (et, nt, rt) { + var it = [this, nt], + ot = [et, rt] + return this.curve.endo ? this.curve._endoWnafMulAdd(it, ot, !0) : this.curve._wnafMulAdd(1, it, ot, 2, !0) + } + Point$2.prototype.eq = function (et) { + return this === et || (this.inf === et.inf && (this.inf || (this.x.cmp(et.x) === 0 && this.y.cmp(et.y) === 0))) + } + Point$2.prototype.neg = function (et) { + if (this.inf) return this + var nt = this.curve.point(this.x, this.y.redNeg()) + if (et && this.precomputed) { + var rt = this.precomputed, + it = function (ot) { + return ot.neg() + } + nt.precomputed = { + naf: rt.naf && { wnd: rt.naf.wnd, points: rt.naf.points.map(it) }, + doubles: rt.doubles && { step: rt.doubles.step, points: rt.doubles.points.map(it) }, + } + } + return nt + } + Point$2.prototype.toJ = function () { + if (this.inf) return this.curve.jpoint(null, null, null) + var et = this.curve.jpoint(this.x, this.y, this.curve.one) + return et + } + function JPoint(tt, et, nt, rt) { + Base$2.BasePoint.call(this, tt, 'jacobian'), + et === null && nt === null && rt === null + ? ((this.x = this.curve.one), (this.y = this.curve.one), (this.z = new BN$a(0))) + : ((this.x = new BN$a(et, 16)), (this.y = new BN$a(nt, 16)), (this.z = new BN$a(rt, 16))), + this.x.red || (this.x = this.x.toRed(this.curve.red)), + this.y.red || (this.y = this.y.toRed(this.curve.red)), + this.z.red || (this.z = this.z.toRed(this.curve.red)), + (this.zOne = this.z === this.curve.one) + } + inherits$9(JPoint, Base$2.BasePoint) + ShortCurve.prototype.jpoint = function (et, nt, rt) { + return new JPoint(this, et, nt, rt) + } + JPoint.prototype.toP = function () { + if (this.isInfinity()) return this.curve.point(null, null) + var et = this.z.redInvm(), + nt = et.redSqr(), + rt = this.x.redMul(nt), + it = this.y.redMul(nt).redMul(et) + return this.curve.point(rt, it) + } + JPoint.prototype.neg = function () { + return this.curve.jpoint(this.x, this.y.redNeg(), this.z) + } + JPoint.prototype.add = function (et) { + if (this.isInfinity()) return et + if (et.isInfinity()) return this + var nt = et.z.redSqr(), + rt = this.z.redSqr(), + it = this.x.redMul(nt), + ot = et.x.redMul(rt), + at = this.y.redMul(nt.redMul(et.z)), + st = et.y.redMul(rt.redMul(this.z)), + lt = it.redSub(ot), + ct = at.redSub(st) + if (lt.cmpn(0) === 0) return ct.cmpn(0) !== 0 ? this.curve.jpoint(null, null, null) : this.dbl() + var ut = lt.redSqr(), + ht = ut.redMul(lt), + dt = it.redMul(ut), + pt = ct.redSqr().redIAdd(ht).redISub(dt).redISub(dt), + mt = ct.redMul(dt.redISub(pt)).redISub(at.redMul(ht)), + gt = this.z.redMul(et.z).redMul(lt) + return this.curve.jpoint(pt, mt, gt) + } + JPoint.prototype.mixedAdd = function (et) { + if (this.isInfinity()) return et.toJ() + if (et.isInfinity()) return this + var nt = this.z.redSqr(), + rt = this.x, + it = et.x.redMul(nt), + ot = this.y, + at = et.y.redMul(nt).redMul(this.z), + st = rt.redSub(it), + lt = ot.redSub(at) + if (st.cmpn(0) === 0) return lt.cmpn(0) !== 0 ? this.curve.jpoint(null, null, null) : this.dbl() + var ct = st.redSqr(), + ut = ct.redMul(st), + ht = rt.redMul(ct), + dt = lt.redSqr().redIAdd(ut).redISub(ht).redISub(ht), + pt = lt.redMul(ht.redISub(dt)).redISub(ot.redMul(ut)), + mt = this.z.redMul(st) + return this.curve.jpoint(dt, pt, mt) + } + JPoint.prototype.dblp = function (et) { + if (et === 0) return this + if (this.isInfinity()) return this + if (!et) return this.dbl() + var nt + if (this.curve.zeroA || this.curve.threeA) { + var rt = this + for (nt = 0; nt < et; nt++) rt = rt.dbl() + return rt + } + var it = this.curve.a, + ot = this.curve.tinv, + at = this.x, + st = this.y, + lt = this.z, + ct = lt.redSqr().redSqr(), + ut = st.redAdd(st) + for (nt = 0; nt < et; nt++) { + var ht = at.redSqr(), + dt = ut.redSqr(), + pt = dt.redSqr(), + mt = ht.redAdd(ht).redIAdd(ht).redIAdd(it.redMul(ct)), + gt = at.redMul(dt), + yt = mt.redSqr().redISub(gt.redAdd(gt)), + bt = gt.redISub(yt), + vt = mt.redMul(bt) + vt = vt.redIAdd(vt).redISub(pt) + var xt = ut.redMul(lt) + nt + 1 < et && (ct = ct.redMul(pt)), (at = yt), (lt = xt), (ut = vt) + } + return this.curve.jpoint(at, ut.redMul(ot), lt) + } + JPoint.prototype.dbl = function () { + return this.isInfinity() + ? this + : this.curve.zeroA + ? this._zeroDbl() + : this.curve.threeA + ? this._threeDbl() + : this._dbl() + } + JPoint.prototype._zeroDbl = function () { + var et, nt, rt + if (this.zOne) { + var it = this.x.redSqr(), + ot = this.y.redSqr(), + at = ot.redSqr(), + st = this.x.redAdd(ot).redSqr().redISub(it).redISub(at) + st = st.redIAdd(st) + var lt = it.redAdd(it).redIAdd(it), + ct = lt.redSqr().redISub(st).redISub(st), + ut = at.redIAdd(at) + ;(ut = ut.redIAdd(ut)), + (ut = ut.redIAdd(ut)), + (et = ct), + (nt = lt.redMul(st.redISub(ct)).redISub(ut)), + (rt = this.y.redAdd(this.y)) + } else { + var ht = this.x.redSqr(), + dt = this.y.redSqr(), + pt = dt.redSqr(), + mt = this.x.redAdd(dt).redSqr().redISub(ht).redISub(pt) + mt = mt.redIAdd(mt) + var gt = ht.redAdd(ht).redIAdd(ht), + yt = gt.redSqr(), + bt = pt.redIAdd(pt) + ;(bt = bt.redIAdd(bt)), + (bt = bt.redIAdd(bt)), + (et = yt.redISub(mt).redISub(mt)), + (nt = gt.redMul(mt.redISub(et)).redISub(bt)), + (rt = this.y.redMul(this.z)), + (rt = rt.redIAdd(rt)) + } + return this.curve.jpoint(et, nt, rt) + } + JPoint.prototype._threeDbl = function () { + var et, nt, rt + if (this.zOne) { + var it = this.x.redSqr(), + ot = this.y.redSqr(), + at = ot.redSqr(), + st = this.x.redAdd(ot).redSqr().redISub(it).redISub(at) + st = st.redIAdd(st) + var lt = it.redAdd(it).redIAdd(it).redIAdd(this.curve.a), + ct = lt.redSqr().redISub(st).redISub(st) + et = ct + var ut = at.redIAdd(at) + ;(ut = ut.redIAdd(ut)), + (ut = ut.redIAdd(ut)), + (nt = lt.redMul(st.redISub(ct)).redISub(ut)), + (rt = this.y.redAdd(this.y)) + } else { + var ht = this.z.redSqr(), + dt = this.y.redSqr(), + pt = this.x.redMul(dt), + mt = this.x.redSub(ht).redMul(this.x.redAdd(ht)) + mt = mt.redAdd(mt).redIAdd(mt) + var gt = pt.redIAdd(pt) + gt = gt.redIAdd(gt) + var yt = gt.redAdd(gt) + ;(et = mt.redSqr().redISub(yt)), (rt = this.y.redAdd(this.z).redSqr().redISub(dt).redISub(ht)) + var bt = dt.redSqr() + ;(bt = bt.redIAdd(bt)), (bt = bt.redIAdd(bt)), (bt = bt.redIAdd(bt)), (nt = mt.redMul(gt.redISub(et)).redISub(bt)) + } + return this.curve.jpoint(et, nt, rt) + } + JPoint.prototype._dbl = function () { + var et = this.curve.a, + nt = this.x, + rt = this.y, + it = this.z, + ot = it.redSqr().redSqr(), + at = nt.redSqr(), + st = rt.redSqr(), + lt = at.redAdd(at).redIAdd(at).redIAdd(et.redMul(ot)), + ct = nt.redAdd(nt) + ct = ct.redIAdd(ct) + var ut = ct.redMul(st), + ht = lt.redSqr().redISub(ut.redAdd(ut)), + dt = ut.redISub(ht), + pt = st.redSqr() + ;(pt = pt.redIAdd(pt)), (pt = pt.redIAdd(pt)), (pt = pt.redIAdd(pt)) + var mt = lt.redMul(dt).redISub(pt), + gt = rt.redAdd(rt).redMul(it) + return this.curve.jpoint(ht, mt, gt) + } + JPoint.prototype.trpl = function () { + if (!this.curve.zeroA) return this.dbl().add(this) + var et = this.x.redSqr(), + nt = this.y.redSqr(), + rt = this.z.redSqr(), + it = nt.redSqr(), + ot = et.redAdd(et).redIAdd(et), + at = ot.redSqr(), + st = this.x.redAdd(nt).redSqr().redISub(et).redISub(it) + ;(st = st.redIAdd(st)), (st = st.redAdd(st).redIAdd(st)), (st = st.redISub(at)) + var lt = st.redSqr(), + ct = it.redIAdd(it) + ;(ct = ct.redIAdd(ct)), (ct = ct.redIAdd(ct)), (ct = ct.redIAdd(ct)) + var ut = ot.redIAdd(st).redSqr().redISub(at).redISub(lt).redISub(ct), + ht = nt.redMul(ut) + ;(ht = ht.redIAdd(ht)), (ht = ht.redIAdd(ht)) + var dt = this.x.redMul(lt).redISub(ht) + ;(dt = dt.redIAdd(dt)), (dt = dt.redIAdd(dt)) + var pt = this.y.redMul(ut.redMul(ct.redISub(ut)).redISub(st.redMul(lt))) + ;(pt = pt.redIAdd(pt)), (pt = pt.redIAdd(pt)), (pt = pt.redIAdd(pt)) + var mt = this.z.redAdd(st).redSqr().redISub(rt).redISub(lt) + return this.curve.jpoint(dt, pt, mt) + } + JPoint.prototype.mul = function (et, nt) { + return (et = new BN$a(et, nt)), this.curve._wnafMul(this, et) + } + JPoint.prototype.eq = function (et) { + if (et.type === 'affine') return this.eq(et.toJ()) + if (this === et) return !0 + var nt = this.z.redSqr(), + rt = et.z.redSqr() + if (this.x.redMul(rt).redISub(et.x.redMul(nt)).cmpn(0) !== 0) return !1 + var it = nt.redMul(this.z), + ot = rt.redMul(et.z) + return this.y.redMul(ot).redISub(et.y.redMul(it)).cmpn(0) === 0 + } + JPoint.prototype.eqXToP = function (et) { + var nt = this.z.redSqr(), + rt = et.toRed(this.curve.red).redMul(nt) + if (this.x.cmp(rt) === 0) return !0 + for (var it = et.clone(), ot = this.curve.redN.redMul(nt); ; ) { + if ((it.iadd(this.curve.n), it.cmp(this.curve.p) >= 0)) return !1 + if ((rt.redIAdd(ot), this.x.cmp(rt) === 0)) return !0 + } + } + JPoint.prototype.inspect = function () { + return this.isInfinity() + ? '' + : '' + } + JPoint.prototype.isInfinity = function () { + return this.z.cmpn(0) === 0 + } + var BN$9 = bnExports$2, + inherits$8 = inherits_browserExports, + Base$1 = base$3, + utils$k = utils$o + function MontCurve(tt) { + Base$1.call(this, 'mont', tt), + (this.a = new BN$9(tt.a, 16).toRed(this.red)), + (this.b = new BN$9(tt.b, 16).toRed(this.red)), + (this.i4 = new BN$9(4).toRed(this.red).redInvm()), + (this.two = new BN$9(2).toRed(this.red)), + (this.a24 = this.i4.redMul(this.a.redAdd(this.two))) + } + inherits$8(MontCurve, Base$1) + var mont = MontCurve + MontCurve.prototype.validate = function (et) { + var nt = et.normalize().x, + rt = nt.redSqr(), + it = rt.redMul(nt).redAdd(rt.redMul(this.a)).redAdd(nt), + ot = it.redSqrt() + return ot.redSqr().cmp(it) === 0 + } + function Point$1(tt, et, nt) { + Base$1.BasePoint.call(this, tt, 'projective'), + et === null && nt === null + ? ((this.x = this.curve.one), (this.z = this.curve.zero)) + : ((this.x = new BN$9(et, 16)), + (this.z = new BN$9(nt, 16)), + this.x.red || (this.x = this.x.toRed(this.curve.red)), + this.z.red || (this.z = this.z.toRed(this.curve.red))) + } + inherits$8(Point$1, Base$1.BasePoint) + MontCurve.prototype.decodePoint = function (et, nt) { + return this.point(utils$k.toArray(et, nt), 1) + } + MontCurve.prototype.point = function (et, nt) { + return new Point$1(this, et, nt) + } + MontCurve.prototype.pointFromJSON = function (et) { + return Point$1.fromJSON(this, et) + } + Point$1.prototype.precompute = function () {} + Point$1.prototype._encode = function () { + return this.getX().toArray('be', this.curve.p.byteLength()) + } + Point$1.fromJSON = function (et, nt) { + return new Point$1(et, nt[0], nt[1] || et.one) + } + Point$1.prototype.inspect = function () { + return this.isInfinity() + ? '' + : '' + } + Point$1.prototype.isInfinity = function () { + return this.z.cmpn(0) === 0 + } + Point$1.prototype.dbl = function () { + var et = this.x.redAdd(this.z), + nt = et.redSqr(), + rt = this.x.redSub(this.z), + it = rt.redSqr(), + ot = nt.redSub(it), + at = nt.redMul(it), + st = ot.redMul(it.redAdd(this.curve.a24.redMul(ot))) + return this.curve.point(at, st) + } + Point$1.prototype.add = function () { + throw new Error('Not supported on Montgomery curve') + } + Point$1.prototype.diffAdd = function (et, nt) { + var rt = this.x.redAdd(this.z), + it = this.x.redSub(this.z), + ot = et.x.redAdd(et.z), + at = et.x.redSub(et.z), + st = at.redMul(rt), + lt = ot.redMul(it), + ct = nt.z.redMul(st.redAdd(lt).redSqr()), + ut = nt.x.redMul(st.redISub(lt).redSqr()) + return this.curve.point(ct, ut) + } + Point$1.prototype.mul = function (et) { + for ( + var nt = et.clone(), rt = this, it = this.curve.point(null, null), ot = this, at = []; + nt.cmpn(0) !== 0; + nt.iushrn(1) + ) + at.push(nt.andln(1)) + for (var st = at.length - 1; st >= 0; st--) + at[st] === 0 ? ((rt = rt.diffAdd(it, ot)), (it = it.dbl())) : ((it = rt.diffAdd(it, ot)), (rt = rt.dbl())) + return it + } + Point$1.prototype.mulAdd = function () { + throw new Error('Not supported on Montgomery curve') + } + Point$1.prototype.jumlAdd = function () { + throw new Error('Not supported on Montgomery curve') + } + Point$1.prototype.eq = function (et) { + return this.getX().cmp(et.getX()) === 0 + } + Point$1.prototype.normalize = function () { + return (this.x = this.x.redMul(this.z.redInvm())), (this.z = this.curve.one), this + } + Point$1.prototype.getX = function () { + return this.normalize(), this.x.fromRed() + } + var utils$j = utils$o, + BN$8 = bnExports$2, + inherits$7 = inherits_browserExports, + Base = base$3, + assert$h = utils$j.assert + function EdwardsCurve(tt) { + ;(this.twisted = (tt.a | 0) !== 1), + (this.mOneA = this.twisted && (tt.a | 0) === -1), + (this.extended = this.mOneA), + Base.call(this, 'edwards', tt), + (this.a = new BN$8(tt.a, 16).umod(this.red.m)), + (this.a = this.a.toRed(this.red)), + (this.c = new BN$8(tt.c, 16).toRed(this.red)), + (this.c2 = this.c.redSqr()), + (this.d = new BN$8(tt.d, 16).toRed(this.red)), + (this.dd = this.d.redAdd(this.d)), + assert$h(!this.twisted || this.c.fromRed().cmpn(1) === 0), + (this.oneC = (tt.c | 0) === 1) + } + inherits$7(EdwardsCurve, Base) + var edwards = EdwardsCurve + EdwardsCurve.prototype._mulA = function (et) { + return this.mOneA ? et.redNeg() : this.a.redMul(et) + } + EdwardsCurve.prototype._mulC = function (et) { + return this.oneC ? et : this.c.redMul(et) + } + EdwardsCurve.prototype.jpoint = function (et, nt, rt, it) { + return this.point(et, nt, rt, it) + } + EdwardsCurve.prototype.pointFromX = function (et, nt) { + ;(et = new BN$8(et, 16)), et.red || (et = et.toRed(this.red)) + var rt = et.redSqr(), + it = this.c2.redSub(this.a.redMul(rt)), + ot = this.one.redSub(this.c2.redMul(this.d).redMul(rt)), + at = it.redMul(ot.redInvm()), + st = at.redSqrt() + if (st.redSqr().redSub(at).cmp(this.zero) !== 0) throw new Error('invalid point') + var lt = st.fromRed().isOdd() + return ((nt && !lt) || (!nt && lt)) && (st = st.redNeg()), this.point(et, st) + } + EdwardsCurve.prototype.pointFromY = function (et, nt) { + ;(et = new BN$8(et, 16)), et.red || (et = et.toRed(this.red)) + var rt = et.redSqr(), + it = rt.redSub(this.c2), + ot = rt.redMul(this.d).redMul(this.c2).redSub(this.a), + at = it.redMul(ot.redInvm()) + if (at.cmp(this.zero) === 0) { + if (nt) throw new Error('invalid point') + return this.point(this.zero, et) + } + var st = at.redSqrt() + if (st.redSqr().redSub(at).cmp(this.zero) !== 0) throw new Error('invalid point') + return st.fromRed().isOdd() !== nt && (st = st.redNeg()), this.point(st, et) + } + EdwardsCurve.prototype.validate = function (et) { + if (et.isInfinity()) return !0 + et.normalize() + var nt = et.x.redSqr(), + rt = et.y.redSqr(), + it = nt.redMul(this.a).redAdd(rt), + ot = this.c2.redMul(this.one.redAdd(this.d.redMul(nt).redMul(rt))) + return it.cmp(ot) === 0 + } + function Point(tt, et, nt, rt, it) { + Base.BasePoint.call(this, tt, 'projective'), + et === null && nt === null && rt === null + ? ((this.x = this.curve.zero), + (this.y = this.curve.one), + (this.z = this.curve.one), + (this.t = this.curve.zero), + (this.zOne = !0)) + : ((this.x = new BN$8(et, 16)), + (this.y = new BN$8(nt, 16)), + (this.z = rt ? new BN$8(rt, 16) : this.curve.one), + (this.t = it && new BN$8(it, 16)), + this.x.red || (this.x = this.x.toRed(this.curve.red)), + this.y.red || (this.y = this.y.toRed(this.curve.red)), + this.z.red || (this.z = this.z.toRed(this.curve.red)), + this.t && !this.t.red && (this.t = this.t.toRed(this.curve.red)), + (this.zOne = this.z === this.curve.one), + this.curve.extended && + !this.t && + ((this.t = this.x.redMul(this.y)), this.zOne || (this.t = this.t.redMul(this.z.redInvm())))) + } + inherits$7(Point, Base.BasePoint) + EdwardsCurve.prototype.pointFromJSON = function (et) { + return Point.fromJSON(this, et) + } + EdwardsCurve.prototype.point = function (et, nt, rt, it) { + return new Point(this, et, nt, rt, it) + } + Point.fromJSON = function (et, nt) { + return new Point(et, nt[0], nt[1], nt[2]) + } + Point.prototype.inspect = function () { + return this.isInfinity() + ? '' + : '' + } + Point.prototype.isInfinity = function () { + return this.x.cmpn(0) === 0 && (this.y.cmp(this.z) === 0 || (this.zOne && this.y.cmp(this.curve.c) === 0)) + } + Point.prototype._extDbl = function () { + var et = this.x.redSqr(), + nt = this.y.redSqr(), + rt = this.z.redSqr() + rt = rt.redIAdd(rt) + var it = this.curve._mulA(et), + ot = this.x.redAdd(this.y).redSqr().redISub(et).redISub(nt), + at = it.redAdd(nt), + st = at.redSub(rt), + lt = it.redSub(nt), + ct = ot.redMul(st), + ut = at.redMul(lt), + ht = ot.redMul(lt), + dt = st.redMul(at) + return this.curve.point(ct, ut, dt, ht) + } + Point.prototype._projDbl = function () { + var et = this.x.redAdd(this.y).redSqr(), + nt = this.x.redSqr(), + rt = this.y.redSqr(), + it, + ot, + at, + st, + lt, + ct + if (this.curve.twisted) { + st = this.curve._mulA(nt) + var ut = st.redAdd(rt) + this.zOne + ? ((it = et.redSub(nt).redSub(rt).redMul(ut.redSub(this.curve.two))), + (ot = ut.redMul(st.redSub(rt))), + (at = ut.redSqr().redSub(ut).redSub(ut))) + : ((lt = this.z.redSqr()), + (ct = ut.redSub(lt).redISub(lt)), + (it = et.redSub(nt).redISub(rt).redMul(ct)), + (ot = ut.redMul(st.redSub(rt))), + (at = ut.redMul(ct))) + } else + (st = nt.redAdd(rt)), + (lt = this.curve._mulC(this.z).redSqr()), + (ct = st.redSub(lt).redSub(lt)), + (it = this.curve._mulC(et.redISub(st)).redMul(ct)), + (ot = this.curve._mulC(st).redMul(nt.redISub(rt))), + (at = st.redMul(ct)) + return this.curve.point(it, ot, at) + } + Point.prototype.dbl = function () { + return this.isInfinity() ? this : this.curve.extended ? this._extDbl() : this._projDbl() + } + Point.prototype._extAdd = function (et) { + var nt = this.y.redSub(this.x).redMul(et.y.redSub(et.x)), + rt = this.y.redAdd(this.x).redMul(et.y.redAdd(et.x)), + it = this.t.redMul(this.curve.dd).redMul(et.t), + ot = this.z.redMul(et.z.redAdd(et.z)), + at = rt.redSub(nt), + st = ot.redSub(it), + lt = ot.redAdd(it), + ct = rt.redAdd(nt), + ut = at.redMul(st), + ht = lt.redMul(ct), + dt = at.redMul(ct), + pt = st.redMul(lt) + return this.curve.point(ut, ht, pt, dt) + } + Point.prototype._projAdd = function (et) { + var nt = this.z.redMul(et.z), + rt = nt.redSqr(), + it = this.x.redMul(et.x), + ot = this.y.redMul(et.y), + at = this.curve.d.redMul(it).redMul(ot), + st = rt.redSub(at), + lt = rt.redAdd(at), + ct = this.x.redAdd(this.y).redMul(et.x.redAdd(et.y)).redISub(it).redISub(ot), + ut = nt.redMul(st).redMul(ct), + ht, + dt + return ( + this.curve.twisted + ? ((ht = nt.redMul(lt).redMul(ot.redSub(this.curve._mulA(it)))), (dt = st.redMul(lt))) + : ((ht = nt.redMul(lt).redMul(ot.redSub(it))), (dt = this.curve._mulC(st).redMul(lt))), + this.curve.point(ut, ht, dt) + ) + } + Point.prototype.add = function (et) { + return this.isInfinity() ? et : et.isInfinity() ? this : this.curve.extended ? this._extAdd(et) : this._projAdd(et) + } + Point.prototype.mul = function (et) { + return this._hasDoubles(et) ? this.curve._fixedNafMul(this, et) : this.curve._wnafMul(this, et) + } + Point.prototype.mulAdd = function (et, nt, rt) { + return this.curve._wnafMulAdd(1, [this, nt], [et, rt], 2, !1) + } + Point.prototype.jmulAdd = function (et, nt, rt) { + return this.curve._wnafMulAdd(1, [this, nt], [et, rt], 2, !0) + } + Point.prototype.normalize = function () { + if (this.zOne) return this + var et = this.z.redInvm() + return ( + (this.x = this.x.redMul(et)), + (this.y = this.y.redMul(et)), + this.t && (this.t = this.t.redMul(et)), + (this.z = this.curve.one), + (this.zOne = !0), + this + ) + } + Point.prototype.neg = function () { + return this.curve.point(this.x.redNeg(), this.y, this.z, this.t && this.t.redNeg()) + } + Point.prototype.getX = function () { + return this.normalize(), this.x.fromRed() + } + Point.prototype.getY = function () { + return this.normalize(), this.y.fromRed() + } + Point.prototype.eq = function (et) { + return this === et || (this.getX().cmp(et.getX()) === 0 && this.getY().cmp(et.getY()) === 0) + } + Point.prototype.eqXToP = function (et) { + var nt = et.toRed(this.curve.red).redMul(this.z) + if (this.x.cmp(nt) === 0) return !0 + for (var rt = et.clone(), it = this.curve.redN.redMul(this.z); ; ) { + if ((rt.iadd(this.curve.n), rt.cmp(this.curve.p) >= 0)) return !1 + if ((nt.redIAdd(it), this.x.cmp(nt) === 0)) return !0 + } + } + Point.prototype.toP = Point.prototype.normalize + Point.prototype.mixedAdd = Point.prototype.add + ;(function (tt) { + var et = tt + ;(et.base = base$3), (et.short = short), (et.mont = mont), (et.edwards = edwards) + })(curve) + var curves$1 = {}, + hash$3 = {}, + utils$i = {}, + assert$g = minimalisticAssert, + inherits$6 = inherits_browserExports + utils$i.inherits = inherits$6 + function isSurrogatePair(tt, et) { + return (tt.charCodeAt(et) & 64512) !== 55296 || et < 0 || et + 1 >= tt.length + ? !1 + : (tt.charCodeAt(et + 1) & 64512) === 56320 + } + function toArray$4(tt, et) { + if (Array.isArray(tt)) return tt.slice() + if (!tt) return [] + var nt = [] + if (typeof tt == 'string') + if (et) { + if (et === 'hex') + for ( + tt = tt.replace(/[^a-z0-9]+/gi, ''), tt.length % 2 !== 0 && (tt = '0' + tt), it = 0; + it < tt.length; + it += 2 + ) + nt.push(parseInt(tt[it] + tt[it + 1], 16)) + } else + for (var rt = 0, it = 0; it < tt.length; it++) { + var ot = tt.charCodeAt(it) + ot < 128 + ? (nt[rt++] = ot) + : ot < 2048 + ? ((nt[rt++] = (ot >> 6) | 192), (nt[rt++] = (ot & 63) | 128)) + : isSurrogatePair(tt, it) + ? ((ot = 65536 + ((ot & 1023) << 10) + (tt.charCodeAt(++it) & 1023)), + (nt[rt++] = (ot >> 18) | 240), + (nt[rt++] = ((ot >> 12) & 63) | 128), + (nt[rt++] = ((ot >> 6) & 63) | 128), + (nt[rt++] = (ot & 63) | 128)) + : ((nt[rt++] = (ot >> 12) | 224), (nt[rt++] = ((ot >> 6) & 63) | 128), (nt[rt++] = (ot & 63) | 128)) + } + else for (it = 0; it < tt.length; it++) nt[it] = tt[it] | 0 + return nt + } + utils$i.toArray = toArray$4 + function toHex(tt) { + for (var et = '', nt = 0; nt < tt.length; nt++) et += zero2(tt[nt].toString(16)) + return et + } + utils$i.toHex = toHex + function htonl(tt) { + var et = (tt >>> 24) | ((tt >>> 8) & 65280) | ((tt << 8) & 16711680) | ((tt & 255) << 24) + return et >>> 0 + } + utils$i.htonl = htonl + function toHex32(tt, et) { + for (var nt = '', rt = 0; rt < tt.length; rt++) { + var it = tt[rt] + et === 'little' && (it = htonl(it)), (nt += zero8(it.toString(16))) + } + return nt + } + utils$i.toHex32 = toHex32 + function zero2(tt) { + return tt.length === 1 ? '0' + tt : tt + } + utils$i.zero2 = zero2 + function zero8(tt) { + return tt.length === 7 + ? '0' + tt + : tt.length === 6 + ? '00' + tt + : tt.length === 5 + ? '000' + tt + : tt.length === 4 + ? '0000' + tt + : tt.length === 3 + ? '00000' + tt + : tt.length === 2 + ? '000000' + tt + : tt.length === 1 + ? '0000000' + tt + : tt + } + utils$i.zero8 = zero8 + function join32(tt, et, nt, rt) { + var it = nt - et + assert$g(it % 4 === 0) + for (var ot = new Array(it / 4), at = 0, st = et; at < ot.length; at++, st += 4) { + var lt + rt === 'big' + ? (lt = (tt[st] << 24) | (tt[st + 1] << 16) | (tt[st + 2] << 8) | tt[st + 3]) + : (lt = (tt[st + 3] << 24) | (tt[st + 2] << 16) | (tt[st + 1] << 8) | tt[st]), + (ot[at] = lt >>> 0) + } + return ot + } + utils$i.join32 = join32 + function split32(tt, et) { + for (var nt = new Array(tt.length * 4), rt = 0, it = 0; rt < tt.length; rt++, it += 4) { + var ot = tt[rt] + et === 'big' + ? ((nt[it] = ot >>> 24), + (nt[it + 1] = (ot >>> 16) & 255), + (nt[it + 2] = (ot >>> 8) & 255), + (nt[it + 3] = ot & 255)) + : ((nt[it + 3] = ot >>> 24), + (nt[it + 2] = (ot >>> 16) & 255), + (nt[it + 1] = (ot >>> 8) & 255), + (nt[it] = ot & 255)) + } + return nt + } + utils$i.split32 = split32 + function rotr32$1(tt, et) { + return (tt >>> et) | (tt << (32 - et)) + } + utils$i.rotr32 = rotr32$1 + function rotl32$2(tt, et) { + return (tt << et) | (tt >>> (32 - et)) + } + utils$i.rotl32 = rotl32$2 + function sum32$3(tt, et) { + return (tt + et) >>> 0 + } + utils$i.sum32 = sum32$3 + function sum32_3$1(tt, et, nt) { + return (tt + et + nt) >>> 0 + } + utils$i.sum32_3 = sum32_3$1 + function sum32_4$2(tt, et, nt, rt) { + return (tt + et + nt + rt) >>> 0 + } + utils$i.sum32_4 = sum32_4$2 + function sum32_5$2(tt, et, nt, rt, it) { + return (tt + et + nt + rt + it) >>> 0 + } + utils$i.sum32_5 = sum32_5$2 + function sum64$1(tt, et, nt, rt) { + var it = tt[et], + ot = tt[et + 1], + at = (rt + ot) >>> 0, + st = (at < rt ? 1 : 0) + nt + it + ;(tt[et] = st >>> 0), (tt[et + 1] = at) + } + utils$i.sum64 = sum64$1 + function sum64_hi$1(tt, et, nt, rt) { + var it = (et + rt) >>> 0, + ot = (it < et ? 1 : 0) + tt + nt + return ot >>> 0 + } + utils$i.sum64_hi = sum64_hi$1 + function sum64_lo$1(tt, et, nt, rt) { + var it = et + rt + return it >>> 0 + } + utils$i.sum64_lo = sum64_lo$1 + function sum64_4_hi$1(tt, et, nt, rt, it, ot, at, st) { + var lt = 0, + ct = et + ;(ct = (ct + rt) >>> 0), + (lt += ct < et ? 1 : 0), + (ct = (ct + ot) >>> 0), + (lt += ct < ot ? 1 : 0), + (ct = (ct + st) >>> 0), + (lt += ct < st ? 1 : 0) + var ut = tt + nt + it + at + lt + return ut >>> 0 + } + utils$i.sum64_4_hi = sum64_4_hi$1 + function sum64_4_lo$1(tt, et, nt, rt, it, ot, at, st) { + var lt = et + rt + ot + st + return lt >>> 0 + } + utils$i.sum64_4_lo = sum64_4_lo$1 + function sum64_5_hi$1(tt, et, nt, rt, it, ot, at, st, lt, ct) { + var ut = 0, + ht = et + ;(ht = (ht + rt) >>> 0), + (ut += ht < et ? 1 : 0), + (ht = (ht + ot) >>> 0), + (ut += ht < ot ? 1 : 0), + (ht = (ht + st) >>> 0), + (ut += ht < st ? 1 : 0), + (ht = (ht + ct) >>> 0), + (ut += ht < ct ? 1 : 0) + var dt = tt + nt + it + at + lt + ut + return dt >>> 0 + } + utils$i.sum64_5_hi = sum64_5_hi$1 + function sum64_5_lo$1(tt, et, nt, rt, it, ot, at, st, lt, ct) { + var ut = et + rt + ot + st + ct + return ut >>> 0 + } + utils$i.sum64_5_lo = sum64_5_lo$1 + function rotr64_hi$1(tt, et, nt) { + var rt = (et << (32 - nt)) | (tt >>> nt) + return rt >>> 0 + } + utils$i.rotr64_hi = rotr64_hi$1 + function rotr64_lo$1(tt, et, nt) { + var rt = (tt << (32 - nt)) | (et >>> nt) + return rt >>> 0 + } + utils$i.rotr64_lo = rotr64_lo$1 + function shr64_hi$1(tt, et, nt) { + return tt >>> nt + } + utils$i.shr64_hi = shr64_hi$1 + function shr64_lo$1(tt, et, nt) { + var rt = (tt << (32 - nt)) | (et >>> nt) + return rt >>> 0 + } + utils$i.shr64_lo = shr64_lo$1 + var common$6 = {}, + utils$h = utils$i, + assert$f = minimalisticAssert + function BlockHash$4() { + ;(this.pending = null), + (this.pendingTotal = 0), + (this.blockSize = this.constructor.blockSize), + (this.outSize = this.constructor.outSize), + (this.hmacStrength = this.constructor.hmacStrength), + (this.padLength = this.constructor.padLength / 8), + (this.endian = 'big'), + (this._delta8 = this.blockSize / 8), + (this._delta32 = this.blockSize / 32) + } + common$6.BlockHash = BlockHash$4 + BlockHash$4.prototype.update = function (et, nt) { + if ( + ((et = utils$h.toArray(et, nt)), + this.pending ? (this.pending = this.pending.concat(et)) : (this.pending = et), + (this.pendingTotal += et.length), + this.pending.length >= this._delta8) + ) { + et = this.pending + var rt = et.length % this._delta8 + ;(this.pending = et.slice(et.length - rt, et.length)), + this.pending.length === 0 && (this.pending = null), + (et = utils$h.join32(et, 0, et.length - rt, this.endian)) + for (var it = 0; it < et.length; it += this._delta32) this._update(et, it, it + this._delta32) + } + return this + } + BlockHash$4.prototype.digest = function (et) { + return this.update(this._pad()), assert$f(this.pending === null), this._digest(et) + } + BlockHash$4.prototype._pad = function () { + var et = this.pendingTotal, + nt = this._delta8, + rt = nt - ((et + this.padLength) % nt), + it = new Array(rt + this.padLength) + it[0] = 128 + for (var ot = 1; ot < rt; ot++) it[ot] = 0 + if (((et <<= 3), this.endian === 'big')) { + for (var at = 8; at < this.padLength; at++) it[ot++] = 0 + ;(it[ot++] = 0), + (it[ot++] = 0), + (it[ot++] = 0), + (it[ot++] = 0), + (it[ot++] = (et >>> 24) & 255), + (it[ot++] = (et >>> 16) & 255), + (it[ot++] = (et >>> 8) & 255), + (it[ot++] = et & 255) + } else + for ( + it[ot++] = et & 255, + it[ot++] = (et >>> 8) & 255, + it[ot++] = (et >>> 16) & 255, + it[ot++] = (et >>> 24) & 255, + it[ot++] = 0, + it[ot++] = 0, + it[ot++] = 0, + it[ot++] = 0, + at = 8; + at < this.padLength; + at++ + ) + it[ot++] = 0 + return it + } + var sha = {}, + common$5 = {}, + utils$g = utils$i, + rotr32 = utils$g.rotr32 + function ft_1$1(tt, et, nt, rt) { + if (tt === 0) return ch32$1(et, nt, rt) + if (tt === 1 || tt === 3) return p32(et, nt, rt) + if (tt === 2) return maj32$1(et, nt, rt) + } + common$5.ft_1 = ft_1$1 + function ch32$1(tt, et, nt) { + return (tt & et) ^ (~tt & nt) + } + common$5.ch32 = ch32$1 + function maj32$1(tt, et, nt) { + return (tt & et) ^ (tt & nt) ^ (et & nt) + } + common$5.maj32 = maj32$1 + function p32(tt, et, nt) { + return tt ^ et ^ nt + } + common$5.p32 = p32 + function s0_256$1(tt) { + return rotr32(tt, 2) ^ rotr32(tt, 13) ^ rotr32(tt, 22) + } + common$5.s0_256 = s0_256$1 + function s1_256$1(tt) { + return rotr32(tt, 6) ^ rotr32(tt, 11) ^ rotr32(tt, 25) + } + common$5.s1_256 = s1_256$1 + function g0_256$1(tt) { + return rotr32(tt, 7) ^ rotr32(tt, 18) ^ (tt >>> 3) + } + common$5.g0_256 = g0_256$1 + function g1_256$1(tt) { + return rotr32(tt, 17) ^ rotr32(tt, 19) ^ (tt >>> 10) + } + common$5.g1_256 = g1_256$1 + var utils$f = utils$i, + common$4 = common$6, + shaCommon$1 = common$5, + rotl32$1 = utils$f.rotl32, + sum32$2 = utils$f.sum32, + sum32_5$1 = utils$f.sum32_5, + ft_1 = shaCommon$1.ft_1, + BlockHash$3 = common$4.BlockHash, + sha1_K = [1518500249, 1859775393, 2400959708, 3395469782] + function SHA1$1() { + if (!(this instanceof SHA1$1)) return new SHA1$1() + BlockHash$3.call(this), + (this.h = [1732584193, 4023233417, 2562383102, 271733878, 3285377520]), + (this.W = new Array(80)) + } + utils$f.inherits(SHA1$1, BlockHash$3) + var _1 = SHA1$1 + SHA1$1.blockSize = 512 + SHA1$1.outSize = 160 + SHA1$1.hmacStrength = 80 + SHA1$1.padLength = 64 + SHA1$1.prototype._update = function (et, nt) { + for (var rt = this.W, it = 0; it < 16; it++) rt[it] = et[nt + it] + for (; it < rt.length; it++) rt[it] = rotl32$1(rt[it - 3] ^ rt[it - 8] ^ rt[it - 14] ^ rt[it - 16], 1) + var ot = this.h[0], + at = this.h[1], + st = this.h[2], + lt = this.h[3], + ct = this.h[4] + for (it = 0; it < rt.length; it++) { + var ut = ~~(it / 20), + ht = sum32_5$1(rotl32$1(ot, 5), ft_1(ut, at, st, lt), ct, rt[it], sha1_K[ut]) + ;(ct = lt), (lt = st), (st = rotl32$1(at, 30)), (at = ot), (ot = ht) + } + ;(this.h[0] = sum32$2(this.h[0], ot)), + (this.h[1] = sum32$2(this.h[1], at)), + (this.h[2] = sum32$2(this.h[2], st)), + (this.h[3] = sum32$2(this.h[3], lt)), + (this.h[4] = sum32$2(this.h[4], ct)) + } + SHA1$1.prototype._digest = function (et) { + return et === 'hex' ? utils$f.toHex32(this.h, 'big') : utils$f.split32(this.h, 'big') + } + var utils$e = utils$i, + common$3 = common$6, + shaCommon = common$5, + assert$e = minimalisticAssert, + sum32$1 = utils$e.sum32, + sum32_4$1 = utils$e.sum32_4, + sum32_5 = utils$e.sum32_5, + ch32 = shaCommon.ch32, + maj32 = shaCommon.maj32, + s0_256 = shaCommon.s0_256, + s1_256 = shaCommon.s1_256, + g0_256 = shaCommon.g0_256, + g1_256 = shaCommon.g1_256, + BlockHash$2 = common$3.BlockHash, + sha256_K = [ + 1116352408, 1899447441, 3049323471, 3921009573, 961987163, 1508970993, 2453635748, 2870763221, 3624381080, + 310598401, 607225278, 1426881987, 1925078388, 2162078206, 2614888103, 3248222580, 3835390401, 4022224774, + 264347078, 604807628, 770255983, 1249150122, 1555081692, 1996064986, 2554220882, 2821834349, 2952996808, + 3210313671, 3336571891, 3584528711, 113926993, 338241895, 666307205, 773529912, 1294757372, 1396182291, + 1695183700, 1986661051, 2177026350, 2456956037, 2730485921, 2820302411, 3259730800, 3345764771, 3516065817, + 3600352804, 4094571909, 275423344, 430227734, 506948616, 659060556, 883997877, 958139571, 1322822218, 1537002063, + 1747873779, 1955562222, 2024104815, 2227730452, 2361852424, 2428436474, 2756734187, 3204031479, 3329325298, + ] + function SHA256$2() { + if (!(this instanceof SHA256$2)) return new SHA256$2() + BlockHash$2.call(this), + (this.h = [1779033703, 3144134277, 1013904242, 2773480762, 1359893119, 2600822924, 528734635, 1541459225]), + (this.k = sha256_K), + (this.W = new Array(64)) + } + utils$e.inherits(SHA256$2, BlockHash$2) + var _256 = SHA256$2 + SHA256$2.blockSize = 512 + SHA256$2.outSize = 256 + SHA256$2.hmacStrength = 192 + SHA256$2.padLength = 64 + SHA256$2.prototype._update = function (et, nt) { + for (var rt = this.W, it = 0; it < 16; it++) rt[it] = et[nt + it] + for (; it < rt.length; it++) rt[it] = sum32_4$1(g1_256(rt[it - 2]), rt[it - 7], g0_256(rt[it - 15]), rt[it - 16]) + var ot = this.h[0], + at = this.h[1], + st = this.h[2], + lt = this.h[3], + ct = this.h[4], + ut = this.h[5], + ht = this.h[6], + dt = this.h[7] + for (assert$e(this.k.length === rt.length), it = 0; it < rt.length; it++) { + var pt = sum32_5(dt, s1_256(ct), ch32(ct, ut, ht), this.k[it], rt[it]), + mt = sum32$1(s0_256(ot), maj32(ot, at, st)) + ;(dt = ht), (ht = ut), (ut = ct), (ct = sum32$1(lt, pt)), (lt = st), (st = at), (at = ot), (ot = sum32$1(pt, mt)) + } + ;(this.h[0] = sum32$1(this.h[0], ot)), + (this.h[1] = sum32$1(this.h[1], at)), + (this.h[2] = sum32$1(this.h[2], st)), + (this.h[3] = sum32$1(this.h[3], lt)), + (this.h[4] = sum32$1(this.h[4], ct)), + (this.h[5] = sum32$1(this.h[5], ut)), + (this.h[6] = sum32$1(this.h[6], ht)), + (this.h[7] = sum32$1(this.h[7], dt)) + } + SHA256$2.prototype._digest = function (et) { + return et === 'hex' ? utils$e.toHex32(this.h, 'big') : utils$e.split32(this.h, 'big') + } + var utils$d = utils$i, + SHA256$1 = _256 + function SHA224$1() { + if (!(this instanceof SHA224$1)) return new SHA224$1() + SHA256$1.call(this), + (this.h = [3238371032, 914150663, 812702999, 4144912697, 4290775857, 1750603025, 1694076839, 3204075428]) + } + utils$d.inherits(SHA224$1, SHA256$1) + var _224 = SHA224$1 + SHA224$1.blockSize = 512 + SHA224$1.outSize = 224 + SHA224$1.hmacStrength = 192 + SHA224$1.padLength = 64 + SHA224$1.prototype._digest = function (et) { + return et === 'hex' ? utils$d.toHex32(this.h.slice(0, 7), 'big') : utils$d.split32(this.h.slice(0, 7), 'big') + } + var utils$c = utils$i, + common$2 = common$6, + assert$d = minimalisticAssert, + rotr64_hi = utils$c.rotr64_hi, + rotr64_lo = utils$c.rotr64_lo, + shr64_hi = utils$c.shr64_hi, + shr64_lo = utils$c.shr64_lo, + sum64 = utils$c.sum64, + sum64_hi = utils$c.sum64_hi, + sum64_lo = utils$c.sum64_lo, + sum64_4_hi = utils$c.sum64_4_hi, + sum64_4_lo = utils$c.sum64_4_lo, + sum64_5_hi = utils$c.sum64_5_hi, + sum64_5_lo = utils$c.sum64_5_lo, + BlockHash$1 = common$2.BlockHash, + sha512_K = [ + 1116352408, 3609767458, 1899447441, 602891725, 3049323471, 3964484399, 3921009573, 2173295548, 961987163, + 4081628472, 1508970993, 3053834265, 2453635748, 2937671579, 2870763221, 3664609560, 3624381080, 2734883394, + 310598401, 1164996542, 607225278, 1323610764, 1426881987, 3590304994, 1925078388, 4068182383, 2162078206, + 991336113, 2614888103, 633803317, 3248222580, 3479774868, 3835390401, 2666613458, 4022224774, 944711139, + 264347078, 2341262773, 604807628, 2007800933, 770255983, 1495990901, 1249150122, 1856431235, 1555081692, + 3175218132, 1996064986, 2198950837, 2554220882, 3999719339, 2821834349, 766784016, 2952996808, 2566594879, + 3210313671, 3203337956, 3336571891, 1034457026, 3584528711, 2466948901, 113926993, 3758326383, 338241895, + 168717936, 666307205, 1188179964, 773529912, 1546045734, 1294757372, 1522805485, 1396182291, 2643833823, + 1695183700, 2343527390, 1986661051, 1014477480, 2177026350, 1206759142, 2456956037, 344077627, 2730485921, + 1290863460, 2820302411, 3158454273, 3259730800, 3505952657, 3345764771, 106217008, 3516065817, 3606008344, + 3600352804, 1432725776, 4094571909, 1467031594, 275423344, 851169720, 430227734, 3100823752, 506948616, + 1363258195, 659060556, 3750685593, 883997877, 3785050280, 958139571, 3318307427, 1322822218, 3812723403, + 1537002063, 2003034995, 1747873779, 3602036899, 1955562222, 1575990012, 2024104815, 1125592928, 2227730452, + 2716904306, 2361852424, 442776044, 2428436474, 593698344, 2756734187, 3733110249, 3204031479, 2999351573, + 3329325298, 3815920427, 3391569614, 3928383900, 3515267271, 566280711, 3940187606, 3454069534, 4118630271, + 4000239992, 116418474, 1914138554, 174292421, 2731055270, 289380356, 3203993006, 460393269, 320620315, 685471733, + 587496836, 852142971, 1086792851, 1017036298, 365543100, 1126000580, 2618297676, 1288033470, 3409855158, + 1501505948, 4234509866, 1607167915, 987167468, 1816402316, 1246189591, + ] + function SHA512$1() { + if (!(this instanceof SHA512$1)) return new SHA512$1() + BlockHash$1.call(this), + (this.h = [ + 1779033703, 4089235720, 3144134277, 2227873595, 1013904242, 4271175723, 2773480762, 1595750129, 1359893119, + 2917565137, 2600822924, 725511199, 528734635, 4215389547, 1541459225, 327033209, + ]), + (this.k = sha512_K), + (this.W = new Array(160)) + } + utils$c.inherits(SHA512$1, BlockHash$1) + var _512 = SHA512$1 + SHA512$1.blockSize = 1024 + SHA512$1.outSize = 512 + SHA512$1.hmacStrength = 192 + SHA512$1.padLength = 128 + SHA512$1.prototype._prepareBlock = function (et, nt) { + for (var rt = this.W, it = 0; it < 32; it++) rt[it] = et[nt + it] + for (; it < rt.length; it += 2) { + var ot = g1_512_hi(rt[it - 4], rt[it - 3]), + at = g1_512_lo(rt[it - 4], rt[it - 3]), + st = rt[it - 14], + lt = rt[it - 13], + ct = g0_512_hi(rt[it - 30], rt[it - 29]), + ut = g0_512_lo(rt[it - 30], rt[it - 29]), + ht = rt[it - 32], + dt = rt[it - 31] + ;(rt[it] = sum64_4_hi(ot, at, st, lt, ct, ut, ht, dt)), (rt[it + 1] = sum64_4_lo(ot, at, st, lt, ct, ut, ht, dt)) + } + } + SHA512$1.prototype._update = function (et, nt) { + this._prepareBlock(et, nt) + var rt = this.W, + it = this.h[0], + ot = this.h[1], + at = this.h[2], + st = this.h[3], + lt = this.h[4], + ct = this.h[5], + ut = this.h[6], + ht = this.h[7], + dt = this.h[8], + pt = this.h[9], + mt = this.h[10], + gt = this.h[11], + yt = this.h[12], + bt = this.h[13], + vt = this.h[14], + xt = this.h[15] + assert$d(this.k.length === rt.length) + for (var kt = 0; kt < rt.length; kt += 2) { + var St = vt, + Tt = xt, + At = s1_512_hi(dt, pt), + Et = s1_512_lo(dt, pt), + $t = ch64_hi(dt, pt, mt, gt, yt), + Dt = ch64_lo(dt, pt, mt, gt, yt, bt), + jt = this.k[kt], + Pt = this.k[kt + 1], + Ct = rt[kt], + wt = rt[kt + 1], + It = sum64_5_hi(St, Tt, At, Et, $t, Dt, jt, Pt, Ct, wt), + Ot = sum64_5_lo(St, Tt, At, Et, $t, Dt, jt, Pt, Ct, wt) + ;(St = s0_512_hi(it, ot)), + (Tt = s0_512_lo(it, ot)), + (At = maj64_hi(it, ot, at, st, lt)), + (Et = maj64_lo(it, ot, at, st, lt, ct)) + var Wt = sum64_hi(St, Tt, At, Et), + zt = sum64_lo(St, Tt, At, Et) + ;(vt = yt), + (xt = bt), + (yt = mt), + (bt = gt), + (mt = dt), + (gt = pt), + (dt = sum64_hi(ut, ht, It, Ot)), + (pt = sum64_lo(ht, ht, It, Ot)), + (ut = lt), + (ht = ct), + (lt = at), + (ct = st), + (at = it), + (st = ot), + (it = sum64_hi(It, Ot, Wt, zt)), + (ot = sum64_lo(It, Ot, Wt, zt)) + } + sum64(this.h, 0, it, ot), + sum64(this.h, 2, at, st), + sum64(this.h, 4, lt, ct), + sum64(this.h, 6, ut, ht), + sum64(this.h, 8, dt, pt), + sum64(this.h, 10, mt, gt), + sum64(this.h, 12, yt, bt), + sum64(this.h, 14, vt, xt) + } + SHA512$1.prototype._digest = function (et) { + return et === 'hex' ? utils$c.toHex32(this.h, 'big') : utils$c.split32(this.h, 'big') + } + function ch64_hi(tt, et, nt, rt, it) { + var ot = (tt & nt) ^ (~tt & it) + return ot < 0 && (ot += 4294967296), ot + } + function ch64_lo(tt, et, nt, rt, it, ot) { + var at = (et & rt) ^ (~et & ot) + return at < 0 && (at += 4294967296), at + } + function maj64_hi(tt, et, nt, rt, it) { + var ot = (tt & nt) ^ (tt & it) ^ (nt & it) + return ot < 0 && (ot += 4294967296), ot + } + function maj64_lo(tt, et, nt, rt, it, ot) { + var at = (et & rt) ^ (et & ot) ^ (rt & ot) + return at < 0 && (at += 4294967296), at + } + function s0_512_hi(tt, et) { + var nt = rotr64_hi(tt, et, 28), + rt = rotr64_hi(et, tt, 2), + it = rotr64_hi(et, tt, 7), + ot = nt ^ rt ^ it + return ot < 0 && (ot += 4294967296), ot + } + function s0_512_lo(tt, et) { + var nt = rotr64_lo(tt, et, 28), + rt = rotr64_lo(et, tt, 2), + it = rotr64_lo(et, tt, 7), + ot = nt ^ rt ^ it + return ot < 0 && (ot += 4294967296), ot + } + function s1_512_hi(tt, et) { + var nt = rotr64_hi(tt, et, 14), + rt = rotr64_hi(tt, et, 18), + it = rotr64_hi(et, tt, 9), + ot = nt ^ rt ^ it + return ot < 0 && (ot += 4294967296), ot + } + function s1_512_lo(tt, et) { + var nt = rotr64_lo(tt, et, 14), + rt = rotr64_lo(tt, et, 18), + it = rotr64_lo(et, tt, 9), + ot = nt ^ rt ^ it + return ot < 0 && (ot += 4294967296), ot + } + function g0_512_hi(tt, et) { + var nt = rotr64_hi(tt, et, 1), + rt = rotr64_hi(tt, et, 8), + it = shr64_hi(tt, et, 7), + ot = nt ^ rt ^ it + return ot < 0 && (ot += 4294967296), ot + } + function g0_512_lo(tt, et) { + var nt = rotr64_lo(tt, et, 1), + rt = rotr64_lo(tt, et, 8), + it = shr64_lo(tt, et, 7), + ot = nt ^ rt ^ it + return ot < 0 && (ot += 4294967296), ot + } + function g1_512_hi(tt, et) { + var nt = rotr64_hi(tt, et, 19), + rt = rotr64_hi(et, tt, 29), + it = shr64_hi(tt, et, 6), + ot = nt ^ rt ^ it + return ot < 0 && (ot += 4294967296), ot + } + function g1_512_lo(tt, et) { + var nt = rotr64_lo(tt, et, 19), + rt = rotr64_lo(et, tt, 29), + it = shr64_lo(tt, et, 6), + ot = nt ^ rt ^ it + return ot < 0 && (ot += 4294967296), ot + } + var utils$b = utils$i, + SHA512 = _512 + function SHA384() { + if (!(this instanceof SHA384)) return new SHA384() + SHA512.call(this), + (this.h = [ + 3418070365, 3238371032, 1654270250, 914150663, 2438529370, 812702999, 355462360, 4144912697, 1731405415, + 4290775857, 2394180231, 1750603025, 3675008525, 1694076839, 1203062813, 3204075428, + ]) + } + utils$b.inherits(SHA384, SHA512) + var _384 = SHA384 + SHA384.blockSize = 1024 + SHA384.outSize = 384 + SHA384.hmacStrength = 192 + SHA384.padLength = 128 + SHA384.prototype._digest = function (et) { + return et === 'hex' ? utils$b.toHex32(this.h.slice(0, 12), 'big') : utils$b.split32(this.h.slice(0, 12), 'big') + } + sha.sha1 = _1 + sha.sha224 = _224 + sha.sha256 = _256 + sha.sha384 = _384 + sha.sha512 = _512 + var ripemd = {}, + utils$a = utils$i, + common$1 = common$6, + rotl32 = utils$a.rotl32, + sum32 = utils$a.sum32, + sum32_3 = utils$a.sum32_3, + sum32_4 = utils$a.sum32_4, + BlockHash = common$1.BlockHash + function RIPEMD160$1() { + if (!(this instanceof RIPEMD160$1)) return new RIPEMD160$1() + BlockHash.call(this), + (this.h = [1732584193, 4023233417, 2562383102, 271733878, 3285377520]), + (this.endian = 'little') + } + utils$a.inherits(RIPEMD160$1, BlockHash) + ripemd.ripemd160 = RIPEMD160$1 + RIPEMD160$1.blockSize = 512 + RIPEMD160$1.outSize = 160 + RIPEMD160$1.hmacStrength = 192 + RIPEMD160$1.padLength = 64 + RIPEMD160$1.prototype._update = function (et, nt) { + for ( + var rt = this.h[0], + it = this.h[1], + ot = this.h[2], + at = this.h[3], + st = this.h[4], + lt = rt, + ct = it, + ut = ot, + ht = at, + dt = st, + pt = 0; + pt < 80; + pt++ + ) { + var mt = sum32(rotl32(sum32_4(rt, f$3(pt, it, ot, at), et[r$5[pt] + nt], K(pt)), s$2[pt]), st) + ;(rt = st), + (st = at), + (at = rotl32(ot, 10)), + (ot = it), + (it = mt), + (mt = sum32(rotl32(sum32_4(lt, f$3(79 - pt, ct, ut, ht), et[rh[pt] + nt], Kh(pt)), sh[pt]), dt)), + (lt = dt), + (dt = ht), + (ht = rotl32(ut, 10)), + (ut = ct), + (ct = mt) + } + ;(mt = sum32_3(this.h[1], ot, ht)), + (this.h[1] = sum32_3(this.h[2], at, dt)), + (this.h[2] = sum32_3(this.h[3], st, lt)), + (this.h[3] = sum32_3(this.h[4], rt, ct)), + (this.h[4] = sum32_3(this.h[0], it, ut)), + (this.h[0] = mt) + } + RIPEMD160$1.prototype._digest = function (et) { + return et === 'hex' ? utils$a.toHex32(this.h, 'little') : utils$a.split32(this.h, 'little') + } + function f$3(tt, et, nt, rt) { + return tt <= 15 + ? et ^ nt ^ rt + : tt <= 31 + ? (et & nt) | (~et & rt) + : tt <= 47 + ? (et | ~nt) ^ rt + : tt <= 63 + ? (et & rt) | (nt & ~rt) + : et ^ (nt | ~rt) + } + function K(tt) { + return tt <= 15 ? 0 : tt <= 31 ? 1518500249 : tt <= 47 ? 1859775393 : tt <= 63 ? 2400959708 : 2840853838 + } + function Kh(tt) { + return tt <= 15 ? 1352829926 : tt <= 31 ? 1548603684 : tt <= 47 ? 1836072691 : tt <= 63 ? 2053994217 : 0 + } + var r$5 = [ + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 7, 4, 13, 1, 10, 6, 15, 3, 12, 0, 9, 5, 2, 14, 11, 8, 3, 10, + 14, 4, 9, 15, 8, 1, 2, 7, 0, 6, 13, 11, 5, 12, 1, 9, 11, 10, 0, 8, 12, 4, 13, 3, 7, 15, 14, 5, 6, 2, 4, 0, 5, 9, + 7, 12, 2, 10, 14, 1, 3, 8, 11, 6, 15, 13, + ], + rh = [ + 5, 14, 7, 0, 9, 2, 11, 4, 13, 6, 15, 8, 1, 10, 3, 12, 6, 11, 3, 7, 0, 13, 5, 10, 14, 15, 8, 12, 4, 9, 1, 2, 15, 5, + 1, 3, 7, 14, 6, 9, 11, 8, 12, 2, 10, 0, 4, 13, 8, 6, 4, 1, 3, 11, 15, 0, 5, 12, 2, 13, 9, 7, 10, 14, 12, 15, 10, + 4, 1, 5, 8, 7, 6, 2, 13, 14, 0, 3, 9, 11, + ], + s$2 = [ + 11, 14, 15, 12, 5, 8, 7, 9, 11, 13, 14, 15, 6, 7, 9, 8, 7, 6, 8, 13, 11, 9, 7, 15, 7, 12, 15, 9, 11, 7, 13, 12, + 11, 13, 6, 7, 14, 9, 13, 15, 14, 8, 13, 6, 5, 12, 7, 5, 11, 12, 14, 15, 14, 15, 9, 8, 9, 14, 5, 6, 8, 6, 5, 12, 9, + 15, 5, 11, 6, 8, 13, 12, 5, 12, 13, 14, 11, 8, 5, 6, + ], + sh = [ + 8, 9, 9, 11, 13, 15, 15, 5, 7, 7, 8, 11, 14, 14, 12, 6, 9, 13, 15, 7, 12, 8, 9, 11, 7, 7, 12, 7, 6, 15, 13, 11, 9, + 7, 15, 11, 8, 6, 6, 14, 12, 13, 5, 14, 13, 13, 7, 5, 15, 5, 8, 11, 14, 14, 6, 14, 6, 9, 12, 9, 12, 5, 15, 8, 8, 5, + 12, 9, 12, 5, 14, 6, 8, 13, 6, 5, 15, 13, 11, 11, + ], + utils$9 = utils$i, + assert$c = minimalisticAssert + function Hmac(tt, et, nt) { + if (!(this instanceof Hmac)) return new Hmac(tt, et, nt) + ;(this.Hash = tt), + (this.blockSize = tt.blockSize / 8), + (this.outSize = tt.outSize / 8), + (this.inner = null), + (this.outer = null), + this._init(utils$9.toArray(et, nt)) + } + var hmac = Hmac + Hmac.prototype._init = function (et) { + et.length > this.blockSize && (et = new this.Hash().update(et).digest()), assert$c(et.length <= this.blockSize) + for (var nt = et.length; nt < this.blockSize; nt++) et.push(0) + for (nt = 0; nt < et.length; nt++) et[nt] ^= 54 + for (this.inner = new this.Hash().update(et), nt = 0; nt < et.length; nt++) et[nt] ^= 106 + this.outer = new this.Hash().update(et) + } + Hmac.prototype.update = function (et, nt) { + return this.inner.update(et, nt), this + } + Hmac.prototype.digest = function (et) { + return this.outer.update(this.inner.digest()), this.outer.digest(et) + } + ;(function (tt) { + var et = tt + ;(et.utils = utils$i), + (et.common = common$6), + (et.sha = sha), + (et.ripemd = ripemd), + (et.hmac = hmac), + (et.sha1 = et.sha.sha1), + (et.sha256 = et.sha.sha256), + (et.sha224 = et.sha.sha224), + (et.sha384 = et.sha.sha384), + (et.sha512 = et.sha.sha512), + (et.ripemd160 = et.ripemd.ripemd160) + })(hash$3) + var secp256k1$1, hasRequiredSecp256k1 + function requireSecp256k1() { + return ( + hasRequiredSecp256k1 || + ((hasRequiredSecp256k1 = 1), + (secp256k1$1 = { + doubles: { + step: 4, + points: [ + [ + 'e60fce93b59e9ec53011aabc21c23e97b2a31369b87a5ae9c44ee89e2a6dec0a', + 'f7e3507399e595929db99f34f57937101296891e44d23f0be1f32cce69616821', + ], + [ + '8282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508', + '11f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf', + ], + [ + '175e159f728b865a72f99cc6c6fc846de0b93833fd2222ed73fce5b551e5b739', + 'd3506e0d9e3c79eba4ef97a51ff71f5eacb5955add24345c6efa6ffee9fed695', + ], + [ + '363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640', + '4e273adfc732221953b445397f3363145b9a89008199ecb62003c7f3bee9de9', + ], + [ + '8b4b5f165df3c2be8c6244b5b745638843e4a781a15bcd1b69f79a55dffdf80c', + '4aad0a6f68d308b4b3fbd7813ab0da04f9e336546162ee56b3eff0c65fd4fd36', + ], + [ + '723cbaa6e5db996d6bf771c00bd548c7b700dbffa6c0e77bcb6115925232fcda', + '96e867b5595cc498a921137488824d6e2660a0653779494801dc069d9eb39f5f', + ], + [ + 'eebfa4d493bebf98ba5feec812c2d3b50947961237a919839a533eca0e7dd7fa', + '5d9a8ca3970ef0f269ee7edaf178089d9ae4cdc3a711f712ddfd4fdae1de8999', + ], + [ + '100f44da696e71672791d0a09b7bde459f1215a29b3c03bfefd7835b39a48db0', + 'cdd9e13192a00b772ec8f3300c090666b7ff4a18ff5195ac0fbd5cd62bc65a09', + ], + [ + 'e1031be262c7ed1b1dc9227a4a04c017a77f8d4464f3b3852c8acde6e534fd2d', + '9d7061928940405e6bb6a4176597535af292dd419e1ced79a44f18f29456a00d', + ], + [ + 'feea6cae46d55b530ac2839f143bd7ec5cf8b266a41d6af52d5e688d9094696d', + 'e57c6b6c97dce1bab06e4e12bf3ecd5c981c8957cc41442d3155debf18090088', + ], + [ + 'da67a91d91049cdcb367be4be6ffca3cfeed657d808583de33fa978bc1ec6cb1', + '9bacaa35481642bc41f463f7ec9780e5dec7adc508f740a17e9ea8e27a68be1d', + ], + [ + '53904faa0b334cdda6e000935ef22151ec08d0f7bb11069f57545ccc1a37b7c0', + '5bc087d0bc80106d88c9eccac20d3c1c13999981e14434699dcb096b022771c8', + ], + [ + '8e7bcd0bd35983a7719cca7764ca906779b53a043a9b8bcaeff959f43ad86047', + '10b7770b2a3da4b3940310420ca9514579e88e2e47fd68b3ea10047e8460372a', + ], + [ + '385eed34c1cdff21e6d0818689b81bde71a7f4f18397e6690a841e1599c43862', + '283bebc3e8ea23f56701de19e9ebf4576b304eec2086dc8cc0458fe5542e5453', + ], + [ + '6f9d9b803ecf191637c73a4413dfa180fddf84a5947fbc9c606ed86c3fac3a7', + '7c80c68e603059ba69b8e2a30e45c4d47ea4dd2f5c281002d86890603a842160', + ], + [ + '3322d401243c4e2582a2147c104d6ecbf774d163db0f5e5313b7e0e742d0e6bd', + '56e70797e9664ef5bfb019bc4ddaf9b72805f63ea2873af624f3a2e96c28b2a0', + ], + [ + '85672c7d2de0b7da2bd1770d89665868741b3f9af7643397721d74d28134ab83', + '7c481b9b5b43b2eb6374049bfa62c2e5e77f17fcc5298f44c8e3094f790313a6', + ], + [ + '948bf809b1988a46b06c9f1919413b10f9226c60f668832ffd959af60c82a0a', + '53a562856dcb6646dc6b74c5d1c3418c6d4dff08c97cd2bed4cb7f88d8c8e589', + ], + [ + '6260ce7f461801c34f067ce0f02873a8f1b0e44dfc69752accecd819f38fd8e8', + 'bc2da82b6fa5b571a7f09049776a1ef7ecd292238051c198c1a84e95b2b4ae17', + ], + [ + 'e5037de0afc1d8d43d8348414bbf4103043ec8f575bfdc432953cc8d2037fa2d', + '4571534baa94d3b5f9f98d09fb990bddbd5f5b03ec481f10e0e5dc841d755bda', + ], + [ + 'e06372b0f4a207adf5ea905e8f1771b4e7e8dbd1c6a6c5b725866a0ae4fce725', + '7a908974bce18cfe12a27bb2ad5a488cd7484a7787104870b27034f94eee31dd', + ], + [ + '213c7a715cd5d45358d0bbf9dc0ce02204b10bdde2a3f58540ad6908d0559754', + '4b6dad0b5ae462507013ad06245ba190bb4850f5f36a7eeddff2c27534b458f2', + ], + [ + '4e7c272a7af4b34e8dbb9352a5419a87e2838c70adc62cddf0cc3a3b08fbd53c', + '17749c766c9d0b18e16fd09f6def681b530b9614bff7dd33e0b3941817dcaae6', + ], + [ + 'fea74e3dbe778b1b10f238ad61686aa5c76e3db2be43057632427e2840fb27b6', + '6e0568db9b0b13297cf674deccb6af93126b596b973f7b77701d3db7f23cb96f', + ], + [ + '76e64113f677cf0e10a2570d599968d31544e179b760432952c02a4417bdde39', + 'c90ddf8dee4e95cf577066d70681f0d35e2a33d2b56d2032b4b1752d1901ac01', + ], + [ + 'c738c56b03b2abe1e8281baa743f8f9a8f7cc643df26cbee3ab150242bcbb891', + '893fb578951ad2537f718f2eacbfbbbb82314eef7880cfe917e735d9699a84c3', + ], + [ + 'd895626548b65b81e264c7637c972877d1d72e5f3a925014372e9f6588f6c14b', + 'febfaa38f2bc7eae728ec60818c340eb03428d632bb067e179363ed75d7d991f', + ], + [ + 'b8da94032a957518eb0f6433571e8761ceffc73693e84edd49150a564f676e03', + '2804dfa44805a1e4d7c99cc9762808b092cc584d95ff3b511488e4e74efdf6e7', + ], + [ + 'e80fea14441fb33a7d8adab9475d7fab2019effb5156a792f1a11778e3c0df5d', + 'eed1de7f638e00771e89768ca3ca94472d155e80af322ea9fcb4291b6ac9ec78', + ], + [ + 'a301697bdfcd704313ba48e51d567543f2a182031efd6915ddc07bbcc4e16070', + '7370f91cfb67e4f5081809fa25d40f9b1735dbf7c0a11a130c0d1a041e177ea1', + ], + [ + '90ad85b389d6b936463f9d0512678de208cc330b11307fffab7ac63e3fb04ed4', + 'e507a3620a38261affdcbd9427222b839aefabe1582894d991d4d48cb6ef150', + ], + [ + '8f68b9d2f63b5f339239c1ad981f162ee88c5678723ea3351b7b444c9ec4c0da', + '662a9f2dba063986de1d90c2b6be215dbbea2cfe95510bfdf23cbf79501fff82', + ], + [ + 'e4f3fb0176af85d65ff99ff9198c36091f48e86503681e3e6686fd5053231e11', + '1e63633ad0ef4f1c1661a6d0ea02b7286cc7e74ec951d1c9822c38576feb73bc', + ], + [ + '8c00fa9b18ebf331eb961537a45a4266c7034f2f0d4e1d0716fb6eae20eae29e', + 'efa47267fea521a1a9dc343a3736c974c2fadafa81e36c54e7d2a4c66702414b', + ], + [ + 'e7a26ce69dd4829f3e10cec0a9e98ed3143d084f308b92c0997fddfc60cb3e41', + '2a758e300fa7984b471b006a1aafbb18d0a6b2c0420e83e20e8a9421cf2cfd51', + ], + [ + 'b6459e0ee3662ec8d23540c223bcbdc571cbcb967d79424f3cf29eb3de6b80ef', + '67c876d06f3e06de1dadf16e5661db3c4b3ae6d48e35b2ff30bf0b61a71ba45', + ], + [ + 'd68a80c8280bb840793234aa118f06231d6f1fc67e73c5a5deda0f5b496943e8', + 'db8ba9fff4b586d00c4b1f9177b0e28b5b0e7b8f7845295a294c84266b133120', + ], + [ + '324aed7df65c804252dc0270907a30b09612aeb973449cea4095980fc28d3d5d', + '648a365774b61f2ff130c0c35aec1f4f19213b0c7e332843967224af96ab7c84', + ], + [ + '4df9c14919cde61f6d51dfdbe5fee5dceec4143ba8d1ca888e8bd373fd054c96', + '35ec51092d8728050974c23a1d85d4b5d506cdc288490192ebac06cad10d5d', + ], + [ + '9c3919a84a474870faed8a9c1cc66021523489054d7f0308cbfc99c8ac1f98cd', + 'ddb84f0f4a4ddd57584f044bf260e641905326f76c64c8e6be7e5e03d4fc599d', + ], + [ + '6057170b1dd12fdf8de05f281d8e06bb91e1493a8b91d4cc5a21382120a959e5', + '9a1af0b26a6a4807add9a2daf71df262465152bc3ee24c65e899be932385a2a8', + ], + [ + 'a576df8e23a08411421439a4518da31880cef0fba7d4df12b1a6973eecb94266', + '40a6bf20e76640b2c92b97afe58cd82c432e10a7f514d9f3ee8be11ae1b28ec8', + ], + [ + '7778a78c28dec3e30a05fe9629de8c38bb30d1f5cf9a3a208f763889be58ad71', + '34626d9ab5a5b22ff7098e12f2ff580087b38411ff24ac563b513fc1fd9f43ac', + ], + [ + '928955ee637a84463729fd30e7afd2ed5f96274e5ad7e5cb09eda9c06d903ac', + 'c25621003d3f42a827b78a13093a95eeac3d26efa8a8d83fc5180e935bcd091f', + ], + [ + '85d0fef3ec6db109399064f3a0e3b2855645b4a907ad354527aae75163d82751', + '1f03648413a38c0be29d496e582cf5663e8751e96877331582c237a24eb1f962', + ], + [ + 'ff2b0dce97eece97c1c9b6041798b85dfdfb6d8882da20308f5404824526087e', + '493d13fef524ba188af4c4dc54d07936c7b7ed6fb90e2ceb2c951e01f0c29907', + ], + [ + '827fbbe4b1e880ea9ed2b2e6301b212b57f1ee148cd6dd28780e5e2cf856e241', + 'c60f9c923c727b0b71bef2c67d1d12687ff7a63186903166d605b68baec293ec', + ], + [ + 'eaa649f21f51bdbae7be4ae34ce6e5217a58fdce7f47f9aa7f3b58fa2120e2b3', + 'be3279ed5bbbb03ac69a80f89879aa5a01a6b965f13f7e59d47a5305ba5ad93d', + ], + [ + 'e4a42d43c5cf169d9391df6decf42ee541b6d8f0c9a137401e23632dda34d24f', + '4d9f92e716d1c73526fc99ccfb8ad34ce886eedfa8d8e4f13a7f7131deba9414', + ], + [ + '1ec80fef360cbdd954160fadab352b6b92b53576a88fea4947173b9d4300bf19', + 'aeefe93756b5340d2f3a4958a7abbf5e0146e77f6295a07b671cdc1cc107cefd', + ], + [ + '146a778c04670c2f91b00af4680dfa8bce3490717d58ba889ddb5928366642be', + 'b318e0ec3354028add669827f9d4b2870aaa971d2f7e5ed1d0b297483d83efd0', + ], + [ + 'fa50c0f61d22e5f07e3acebb1aa07b128d0012209a28b9776d76a8793180eef9', + '6b84c6922397eba9b72cd2872281a68a5e683293a57a213b38cd8d7d3f4f2811', + ], + [ + 'da1d61d0ca721a11b1a5bf6b7d88e8421a288ab5d5bba5220e53d32b5f067ec2', + '8157f55a7c99306c79c0766161c91e2966a73899d279b48a655fba0f1ad836f1', + ], + [ + 'a8e282ff0c9706907215ff98e8fd416615311de0446f1e062a73b0610d064e13', + '7f97355b8db81c09abfb7f3c5b2515888b679a3e50dd6bd6cef7c73111f4cc0c', + ], + [ + '174a53b9c9a285872d39e56e6913cab15d59b1fa512508c022f382de8319497c', + 'ccc9dc37abfc9c1657b4155f2c47f9e6646b3a1d8cb9854383da13ac079afa73', + ], + [ + '959396981943785c3d3e57edf5018cdbe039e730e4918b3d884fdff09475b7ba', + '2e7e552888c331dd8ba0386a4b9cd6849c653f64c8709385e9b8abf87524f2fd', + ], + [ + 'd2a63a50ae401e56d645a1153b109a8fcca0a43d561fba2dbb51340c9d82b151', + 'e82d86fb6443fcb7565aee58b2948220a70f750af484ca52d4142174dcf89405', + ], + [ + '64587e2335471eb890ee7896d7cfdc866bacbdbd3839317b3436f9b45617e073', + 'd99fcdd5bf6902e2ae96dd6447c299a185b90a39133aeab358299e5e9faf6589', + ], + [ + '8481bde0e4e4d885b3a546d3e549de042f0aa6cea250e7fd358d6c86dd45e458', + '38ee7b8cba5404dd84a25bf39cecb2ca900a79c42b262e556d64b1b59779057e', + ], + [ + '13464a57a78102aa62b6979ae817f4637ffcfed3c4b1ce30bcd6303f6caf666b', + '69be159004614580ef7e433453ccb0ca48f300a81d0942e13f495a907f6ecc27', + ], + [ + 'bc4a9df5b713fe2e9aef430bcc1dc97a0cd9ccede2f28588cada3a0d2d83f366', + 'd3a81ca6e785c06383937adf4b798caa6e8a9fbfa547b16d758d666581f33c1', + ], + [ + '8c28a97bf8298bc0d23d8c749452a32e694b65e30a9472a3954ab30fe5324caa', + '40a30463a3305193378fedf31f7cc0eb7ae784f0451cb9459e71dc73cbef9482', + ], + [ + '8ea9666139527a8c1dd94ce4f071fd23c8b350c5a4bb33748c4ba111faccae0', + '620efabbc8ee2782e24e7c0cfb95c5d735b783be9cf0f8e955af34a30e62b945', + ], + [ + 'dd3625faef5ba06074669716bbd3788d89bdde815959968092f76cc4eb9a9787', + '7a188fa3520e30d461da2501045731ca941461982883395937f68d00c644a573', + ], + [ + 'f710d79d9eb962297e4f6232b40e8f7feb2bc63814614d692c12de752408221e', + 'ea98e67232d3b3295d3b535532115ccac8612c721851617526ae47a9c77bfc82', + ], + ], + }, + naf: { + wnd: 7, + points: [ + [ + 'f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9', + '388f7b0f632de8140fe337e62a37f3566500a99934c2231b6cb9fd7584b8e672', + ], + [ + '2f8bde4d1a07209355b4a7250a5c5128e88b84bddc619ab7cba8d569b240efe4', + 'd8ac222636e5e3d6d4dba9dda6c9c426f788271bab0d6840dca87d3aa6ac62d6', + ], + [ + '5cbdf0646e5db4eaa398f365f2ea7a0e3d419b7e0330e39ce92bddedcac4f9bc', + '6aebca40ba255960a3178d6d861a54dba813d0b813fde7b5a5082628087264da', + ], + [ + 'acd484e2f0c7f65309ad178a9f559abde09796974c57e714c35f110dfc27ccbe', + 'cc338921b0a7d9fd64380971763b61e9add888a4375f8e0f05cc262ac64f9c37', + ], + [ + '774ae7f858a9411e5ef4246b70c65aac5649980be5c17891bbec17895da008cb', + 'd984a032eb6b5e190243dd56d7b7b365372db1e2dff9d6a8301d74c9c953c61b', + ], + [ + 'f28773c2d975288bc7d1d205c3748651b075fbc6610e58cddeeddf8f19405aa8', + 'ab0902e8d880a89758212eb65cdaf473a1a06da521fa91f29b5cb52db03ed81', + ], + [ + 'd7924d4f7d43ea965a465ae3095ff41131e5946f3c85f79e44adbcf8e27e080e', + '581e2872a86c72a683842ec228cc6defea40af2bd896d3a5c504dc9ff6a26b58', + ], + [ + 'defdea4cdb677750a420fee807eacf21eb9898ae79b9768766e4faa04a2d4a34', + '4211ab0694635168e997b0ead2a93daeced1f4a04a95c0f6cfb199f69e56eb77', + ], + [ + '2b4ea0a797a443d293ef5cff444f4979f06acfebd7e86d277475656138385b6c', + '85e89bc037945d93b343083b5a1c86131a01f60c50269763b570c854e5c09b7a', + ], + [ + '352bbf4a4cdd12564f93fa332ce333301d9ad40271f8107181340aef25be59d5', + '321eb4075348f534d59c18259dda3e1f4a1b3b2e71b1039c67bd3d8bcf81998c', + ], + [ + '2fa2104d6b38d11b0230010559879124e42ab8dfeff5ff29dc9cdadd4ecacc3f', + '2de1068295dd865b64569335bd5dd80181d70ecfc882648423ba76b532b7d67', + ], + [ + '9248279b09b4d68dab21a9b066edda83263c3d84e09572e269ca0cd7f5453714', + '73016f7bf234aade5d1aa71bdea2b1ff3fc0de2a887912ffe54a32ce97cb3402', + ], + [ + 'daed4f2be3a8bf278e70132fb0beb7522f570e144bf615c07e996d443dee8729', + 'a69dce4a7d6c98e8d4a1aca87ef8d7003f83c230f3afa726ab40e52290be1c55', + ], + [ + 'c44d12c7065d812e8acf28d7cbb19f9011ecd9e9fdf281b0e6a3b5e87d22e7db', + '2119a460ce326cdc76c45926c982fdac0e106e861edf61c5a039063f0e0e6482', + ], + [ + '6a245bf6dc698504c89a20cfded60853152b695336c28063b61c65cbd269e6b4', + 'e022cf42c2bd4a708b3f5126f16a24ad8b33ba48d0423b6efd5e6348100d8a82', + ], + [ + '1697ffa6fd9de627c077e3d2fe541084ce13300b0bec1146f95ae57f0d0bd6a5', + 'b9c398f186806f5d27561506e4557433a2cf15009e498ae7adee9d63d01b2396', + ], + [ + '605bdb019981718b986d0f07e834cb0d9deb8360ffb7f61df982345ef27a7479', + '2972d2de4f8d20681a78d93ec96fe23c26bfae84fb14db43b01e1e9056b8c49', + ], + [ + '62d14dab4150bf497402fdc45a215e10dcb01c354959b10cfe31c7e9d87ff33d', + '80fc06bd8cc5b01098088a1950eed0db01aa132967ab472235f5642483b25eaf', + ], + [ + '80c60ad0040f27dade5b4b06c408e56b2c50e9f56b9b8b425e555c2f86308b6f', + '1c38303f1cc5c30f26e66bad7fe72f70a65eed4cbe7024eb1aa01f56430bd57a', + ], + [ + '7a9375ad6167ad54aa74c6348cc54d344cc5dc9487d847049d5eabb0fa03c8fb', + 'd0e3fa9eca8726909559e0d79269046bdc59ea10c70ce2b02d499ec224dc7f7', + ], + [ + 'd528ecd9b696b54c907a9ed045447a79bb408ec39b68df504bb51f459bc3ffc9', + 'eecf41253136e5f99966f21881fd656ebc4345405c520dbc063465b521409933', + ], + [ + '49370a4b5f43412ea25f514e8ecdad05266115e4a7ecb1387231808f8b45963', + '758f3f41afd6ed428b3081b0512fd62a54c3f3afbb5b6764b653052a12949c9a', + ], + [ + '77f230936ee88cbbd73df930d64702ef881d811e0e1498e2f1c13eb1fc345d74', + '958ef42a7886b6400a08266e9ba1b37896c95330d97077cbbe8eb3c7671c60d6', + ], + [ + 'f2dac991cc4ce4b9ea44887e5c7c0bce58c80074ab9d4dbaeb28531b7739f530', + 'e0dedc9b3b2f8dad4da1f32dec2531df9eb5fbeb0598e4fd1a117dba703a3c37', + ], + [ + '463b3d9f662621fb1b4be8fbbe2520125a216cdfc9dae3debcba4850c690d45b', + '5ed430d78c296c3543114306dd8622d7c622e27c970a1de31cb377b01af7307e', + ], + [ + 'f16f804244e46e2a09232d4aff3b59976b98fac14328a2d1a32496b49998f247', + 'cedabd9b82203f7e13d206fcdf4e33d92a6c53c26e5cce26d6579962c4e31df6', + ], + [ + 'caf754272dc84563b0352b7a14311af55d245315ace27c65369e15f7151d41d1', + 'cb474660ef35f5f2a41b643fa5e460575f4fa9b7962232a5c32f908318a04476', + ], + [ + '2600ca4b282cb986f85d0f1709979d8b44a09c07cb86d7c124497bc86f082120', + '4119b88753c15bd6a693b03fcddbb45d5ac6be74ab5f0ef44b0be9475a7e4b40', + ], + [ + '7635ca72d7e8432c338ec53cd12220bc01c48685e24f7dc8c602a7746998e435', + '91b649609489d613d1d5e590f78e6d74ecfc061d57048bad9e76f302c5b9c61', + ], + [ + '754e3239f325570cdbbf4a87deee8a66b7f2b33479d468fbc1a50743bf56cc18', + '673fb86e5bda30fb3cd0ed304ea49a023ee33d0197a695d0c5d98093c536683', + ], + [ + 'e3e6bd1071a1e96aff57859c82d570f0330800661d1c952f9fe2694691d9b9e8', + '59c9e0bba394e76f40c0aa58379a3cb6a5a2283993e90c4167002af4920e37f5', + ], + [ + '186b483d056a033826ae73d88f732985c4ccb1f32ba35f4b4cc47fdcf04aa6eb', + '3b952d32c67cf77e2e17446e204180ab21fb8090895138b4a4a797f86e80888b', + ], + [ + 'df9d70a6b9876ce544c98561f4be4f725442e6d2b737d9c91a8321724ce0963f', + '55eb2dafd84d6ccd5f862b785dc39d4ab157222720ef9da217b8c45cf2ba2417', + ], + [ + '5edd5cc23c51e87a497ca815d5dce0f8ab52554f849ed8995de64c5f34ce7143', + 'efae9c8dbc14130661e8cec030c89ad0c13c66c0d17a2905cdc706ab7399a868', + ], + [ + '290798c2b6476830da12fe02287e9e777aa3fba1c355b17a722d362f84614fba', + 'e38da76dcd440621988d00bcf79af25d5b29c094db2a23146d003afd41943e7a', + ], + [ + 'af3c423a95d9f5b3054754efa150ac39cd29552fe360257362dfdecef4053b45', + 'f98a3fd831eb2b749a93b0e6f35cfb40c8cd5aa667a15581bc2feded498fd9c6', + ], + [ + '766dbb24d134e745cccaa28c99bf274906bb66b26dcf98df8d2fed50d884249a', + '744b1152eacbe5e38dcc887980da38b897584a65fa06cedd2c924f97cbac5996', + ], + [ + '59dbf46f8c94759ba21277c33784f41645f7b44f6c596a58ce92e666191abe3e', + 'c534ad44175fbc300f4ea6ce648309a042ce739a7919798cd85e216c4a307f6e', + ], + [ + 'f13ada95103c4537305e691e74e9a4a8dd647e711a95e73cb62dc6018cfd87b8', + 'e13817b44ee14de663bf4bc808341f326949e21a6a75c2570778419bdaf5733d', + ], + [ + '7754b4fa0e8aced06d4167a2c59cca4cda1869c06ebadfb6488550015a88522c', + '30e93e864e669d82224b967c3020b8fa8d1e4e350b6cbcc537a48b57841163a2', + ], + [ + '948dcadf5990e048aa3874d46abef9d701858f95de8041d2a6828c99e2262519', + 'e491a42537f6e597d5d28a3224b1bc25df9154efbd2ef1d2cbba2cae5347d57e', + ], + [ + '7962414450c76c1689c7b48f8202ec37fb224cf5ac0bfa1570328a8a3d7c77ab', + '100b610ec4ffb4760d5c1fc133ef6f6b12507a051f04ac5760afa5b29db83437', + ], + [ + '3514087834964b54b15b160644d915485a16977225b8847bb0dd085137ec47ca', + 'ef0afbb2056205448e1652c48e8127fc6039e77c15c2378b7e7d15a0de293311', + ], + [ + 'd3cc30ad6b483e4bc79ce2c9dd8bc54993e947eb8df787b442943d3f7b527eaf', + '8b378a22d827278d89c5e9be8f9508ae3c2ad46290358630afb34db04eede0a4', + ], + [ + '1624d84780732860ce1c78fcbfefe08b2b29823db913f6493975ba0ff4847610', + '68651cf9b6da903e0914448c6cd9d4ca896878f5282be4c8cc06e2a404078575', + ], + [ + '733ce80da955a8a26902c95633e62a985192474b5af207da6df7b4fd5fc61cd4', + 'f5435a2bd2badf7d485a4d8b8db9fcce3e1ef8e0201e4578c54673bc1dc5ea1d', + ], + [ + '15d9441254945064cf1a1c33bbd3b49f8966c5092171e699ef258dfab81c045c', + 'd56eb30b69463e7234f5137b73b84177434800bacebfc685fc37bbe9efe4070d', + ], + [ + 'a1d0fcf2ec9de675b612136e5ce70d271c21417c9d2b8aaaac138599d0717940', + 'edd77f50bcb5a3cab2e90737309667f2641462a54070f3d519212d39c197a629', + ], + [ + 'e22fbe15c0af8ccc5780c0735f84dbe9a790badee8245c06c7ca37331cb36980', + 'a855babad5cd60c88b430a69f53a1a7a38289154964799be43d06d77d31da06', + ], + [ + '311091dd9860e8e20ee13473c1155f5f69635e394704eaa74009452246cfa9b3', + '66db656f87d1f04fffd1f04788c06830871ec5a64feee685bd80f0b1286d8374', + ], + [ + '34c1fd04d301be89b31c0442d3e6ac24883928b45a9340781867d4232ec2dbdf', + '9414685e97b1b5954bd46f730174136d57f1ceeb487443dc5321857ba73abee', + ], + [ + 'f219ea5d6b54701c1c14de5b557eb42a8d13f3abbcd08affcc2a5e6b049b8d63', + '4cb95957e83d40b0f73af4544cccf6b1f4b08d3c07b27fb8d8c2962a400766d1', + ], + [ + 'd7b8740f74a8fbaab1f683db8f45de26543a5490bca627087236912469a0b448', + 'fa77968128d9c92ee1010f337ad4717eff15db5ed3c049b3411e0315eaa4593b', + ], + [ + '32d31c222f8f6f0ef86f7c98d3a3335ead5bcd32abdd94289fe4d3091aa824bf', + '5f3032f5892156e39ccd3d7915b9e1da2e6dac9e6f26e961118d14b8462e1661', + ], + [ + '7461f371914ab32671045a155d9831ea8793d77cd59592c4340f86cbc18347b5', + '8ec0ba238b96bec0cbdddcae0aa442542eee1ff50c986ea6b39847b3cc092ff6', + ], + [ + 'ee079adb1df1860074356a25aa38206a6d716b2c3e67453d287698bad7b2b2d6', + '8dc2412aafe3be5c4c5f37e0ecc5f9f6a446989af04c4e25ebaac479ec1c8c1e', + ], + [ + '16ec93e447ec83f0467b18302ee620f7e65de331874c9dc72bfd8616ba9da6b5', + '5e4631150e62fb40d0e8c2a7ca5804a39d58186a50e497139626778e25b0674d', + ], + [ + 'eaa5f980c245f6f038978290afa70b6bd8855897f98b6aa485b96065d537bd99', + 'f65f5d3e292c2e0819a528391c994624d784869d7e6ea67fb18041024edc07dc', + ], + [ + '78c9407544ac132692ee1910a02439958ae04877151342ea96c4b6b35a49f51', + 'f3e0319169eb9b85d5404795539a5e68fa1fbd583c064d2462b675f194a3ddb4', + ], + [ + '494f4be219a1a77016dcd838431aea0001cdc8ae7a6fc688726578d9702857a5', + '42242a969283a5f339ba7f075e36ba2af925ce30d767ed6e55f4b031880d562c', + ], + [ + 'a598a8030da6d86c6bc7f2f5144ea549d28211ea58faa70ebf4c1e665c1fe9b5', + '204b5d6f84822c307e4b4a7140737aec23fc63b65b35f86a10026dbd2d864e6b', + ], + [ + 'c41916365abb2b5d09192f5f2dbeafec208f020f12570a184dbadc3e58595997', + '4f14351d0087efa49d245b328984989d5caf9450f34bfc0ed16e96b58fa9913', + ], + [ + '841d6063a586fa475a724604da03bc5b92a2e0d2e0a36acfe4c73a5514742881', + '73867f59c0659e81904f9a1c7543698e62562d6744c169ce7a36de01a8d6154', + ], + [ + '5e95bb399a6971d376026947f89bde2f282b33810928be4ded112ac4d70e20d5', + '39f23f366809085beebfc71181313775a99c9aed7d8ba38b161384c746012865', + ], + [ + '36e4641a53948fd476c39f8a99fd974e5ec07564b5315d8bf99471bca0ef2f66', + 'd2424b1b1abe4eb8164227b085c9aa9456ea13493fd563e06fd51cf5694c78fc', + ], + [ + '336581ea7bfbbb290c191a2f507a41cf5643842170e914faeab27c2c579f726', + 'ead12168595fe1be99252129b6e56b3391f7ab1410cd1e0ef3dcdcabd2fda224', + ], + [ + '8ab89816dadfd6b6a1f2634fcf00ec8403781025ed6890c4849742706bd43ede', + '6fdcef09f2f6d0a044e654aef624136f503d459c3e89845858a47a9129cdd24e', + ], + [ + '1e33f1a746c9c5778133344d9299fcaa20b0938e8acff2544bb40284b8c5fb94', + '60660257dd11b3aa9c8ed618d24edff2306d320f1d03010e33a7d2057f3b3b6', + ], + [ + '85b7c1dcb3cec1b7ee7f30ded79dd20a0ed1f4cc18cbcfcfa410361fd8f08f31', + '3d98a9cdd026dd43f39048f25a8847f4fcafad1895d7a633c6fed3c35e999511', + ], + [ + '29df9fbd8d9e46509275f4b125d6d45d7fbe9a3b878a7af872a2800661ac5f51', + 'b4c4fe99c775a606e2d8862179139ffda61dc861c019e55cd2876eb2a27d84b', + ], + [ + 'a0b1cae06b0a847a3fea6e671aaf8adfdfe58ca2f768105c8082b2e449fce252', + 'ae434102edde0958ec4b19d917a6a28e6b72da1834aff0e650f049503a296cf2', + ], + [ + '4e8ceafb9b3e9a136dc7ff67e840295b499dfb3b2133e4ba113f2e4c0e121e5', + 'cf2174118c8b6d7a4b48f6d534ce5c79422c086a63460502b827ce62a326683c', + ], + [ + 'd24a44e047e19b6f5afb81c7ca2f69080a5076689a010919f42725c2b789a33b', + '6fb8d5591b466f8fc63db50f1c0f1c69013f996887b8244d2cdec417afea8fa3', + ], + [ + 'ea01606a7a6c9cdd249fdfcfacb99584001edd28abbab77b5104e98e8e3b35d4', + '322af4908c7312b0cfbfe369f7a7b3cdb7d4494bc2823700cfd652188a3ea98d', + ], + [ + 'af8addbf2b661c8a6c6328655eb96651252007d8c5ea31be4ad196de8ce2131f', + '6749e67c029b85f52a034eafd096836b2520818680e26ac8f3dfbcdb71749700', + ], + [ + 'e3ae1974566ca06cc516d47e0fb165a674a3dabcfca15e722f0e3450f45889', + '2aeabe7e4531510116217f07bf4d07300de97e4874f81f533420a72eeb0bd6a4', + ], + [ + '591ee355313d99721cf6993ffed1e3e301993ff3ed258802075ea8ced397e246', + 'b0ea558a113c30bea60fc4775460c7901ff0b053d25ca2bdeee98f1a4be5d196', + ], + [ + '11396d55fda54c49f19aa97318d8da61fa8584e47b084945077cf03255b52984', + '998c74a8cd45ac01289d5833a7beb4744ff536b01b257be4c5767bea93ea57a4', + ], + [ + '3c5d2a1ba39c5a1790000738c9e0c40b8dcdfd5468754b6405540157e017aa7a', + 'b2284279995a34e2f9d4de7396fc18b80f9b8b9fdd270f6661f79ca4c81bd257', + ], + [ + 'cc8704b8a60a0defa3a99a7299f2e9c3fbc395afb04ac078425ef8a1793cc030', + 'bdd46039feed17881d1e0862db347f8cf395b74fc4bcdc4e940b74e3ac1f1b13', + ], + [ + 'c533e4f7ea8555aacd9777ac5cad29b97dd4defccc53ee7ea204119b2889b197', + '6f0a256bc5efdf429a2fb6242f1a43a2d9b925bb4a4b3a26bb8e0f45eb596096', + ], + [ + 'c14f8f2ccb27d6f109f6d08d03cc96a69ba8c34eec07bbcf566d48e33da6593', + 'c359d6923bb398f7fd4473e16fe1c28475b740dd098075e6c0e8649113dc3a38', + ], + [ + 'a6cbc3046bc6a450bac24789fa17115a4c9739ed75f8f21ce441f72e0b90e6ef', + '21ae7f4680e889bb130619e2c0f95a360ceb573c70603139862afd617fa9b9f', + ], + [ + '347d6d9a02c48927ebfb86c1359b1caf130a3c0267d11ce6344b39f99d43cc38', + '60ea7f61a353524d1c987f6ecec92f086d565ab687870cb12689ff1e31c74448', + ], + [ + 'da6545d2181db8d983f7dcb375ef5866d47c67b1bf31c8cf855ef7437b72656a', + '49b96715ab6878a79e78f07ce5680c5d6673051b4935bd897fea824b77dc208a', + ], + [ + 'c40747cc9d012cb1a13b8148309c6de7ec25d6945d657146b9d5994b8feb1111', + '5ca560753be2a12fc6de6caf2cb489565db936156b9514e1bb5e83037e0fa2d4', + ], + [ + '4e42c8ec82c99798ccf3a610be870e78338c7f713348bd34c8203ef4037f3502', + '7571d74ee5e0fb92a7a8b33a07783341a5492144cc54bcc40a94473693606437', + ], + [ + '3775ab7089bc6af823aba2e1af70b236d251cadb0c86743287522a1b3b0dedea', + 'be52d107bcfa09d8bcb9736a828cfa7fac8db17bf7a76a2c42ad961409018cf7', + ], + [ + 'cee31cbf7e34ec379d94fb814d3d775ad954595d1314ba8846959e3e82f74e26', + '8fd64a14c06b589c26b947ae2bcf6bfa0149ef0be14ed4d80f448a01c43b1c6d', + ], + [ + 'b4f9eaea09b6917619f6ea6a4eb5464efddb58fd45b1ebefcdc1a01d08b47986', + '39e5c9925b5a54b07433a4f18c61726f8bb131c012ca542eb24a8ac07200682a', + ], + [ + 'd4263dfc3d2df923a0179a48966d30ce84e2515afc3dccc1b77907792ebcc60e', + '62dfaf07a0f78feb30e30d6295853ce189e127760ad6cf7fae164e122a208d54', + ], + [ + '48457524820fa65a4f8d35eb6930857c0032acc0a4a2de422233eeda897612c4', + '25a748ab367979d98733c38a1fa1c2e7dc6cc07db2d60a9ae7a76aaa49bd0f77', + ], + [ + 'dfeeef1881101f2cb11644f3a2afdfc2045e19919152923f367a1767c11cceda', + 'ecfb7056cf1de042f9420bab396793c0c390bde74b4bbdff16a83ae09a9a7517', + ], + [ + '6d7ef6b17543f8373c573f44e1f389835d89bcbc6062ced36c82df83b8fae859', + 'cd450ec335438986dfefa10c57fea9bcc521a0959b2d80bbf74b190dca712d10', + ], + [ + 'e75605d59102a5a2684500d3b991f2e3f3c88b93225547035af25af66e04541f', + 'f5c54754a8f71ee540b9b48728473e314f729ac5308b06938360990e2bfad125', + ], + [ + 'eb98660f4c4dfaa06a2be453d5020bc99a0c2e60abe388457dd43fefb1ed620c', + '6cb9a8876d9cb8520609af3add26cd20a0a7cd8a9411131ce85f44100099223e', + ], + [ + '13e87b027d8514d35939f2e6892b19922154596941888336dc3563e3b8dba942', + 'fef5a3c68059a6dec5d624114bf1e91aac2b9da568d6abeb2570d55646b8adf1', + ], + [ + 'ee163026e9fd6fe017c38f06a5be6fc125424b371ce2708e7bf4491691e5764a', + '1acb250f255dd61c43d94ccc670d0f58f49ae3fa15b96623e5430da0ad6c62b2', + ], + [ + 'b268f5ef9ad51e4d78de3a750c2dc89b1e626d43505867999932e5db33af3d80', + '5f310d4b3c99b9ebb19f77d41c1dee018cf0d34fd4191614003e945a1216e423', + ], + [ + 'ff07f3118a9df035e9fad85eb6c7bfe42b02f01ca99ceea3bf7ffdba93c4750d', + '438136d603e858a3a5c440c38eccbaddc1d2942114e2eddd4740d098ced1f0d8', + ], + [ + '8d8b9855c7c052a34146fd20ffb658bea4b9f69e0d825ebec16e8c3ce2b526a1', + 'cdb559eedc2d79f926baf44fb84ea4d44bcf50fee51d7ceb30e2e7f463036758', + ], + [ + '52db0b5384dfbf05bfa9d472d7ae26dfe4b851ceca91b1eba54263180da32b63', + 'c3b997d050ee5d423ebaf66a6db9f57b3180c902875679de924b69d84a7b375', + ], + [ + 'e62f9490d3d51da6395efd24e80919cc7d0f29c3f3fa48c6fff543becbd43352', + '6d89ad7ba4876b0b22c2ca280c682862f342c8591f1daf5170e07bfd9ccafa7d', + ], + [ + '7f30ea2476b399b4957509c88f77d0191afa2ff5cb7b14fd6d8e7d65aaab1193', + 'ca5ef7d4b231c94c3b15389a5f6311e9daff7bb67b103e9880ef4bff637acaec', + ], + [ + '5098ff1e1d9f14fb46a210fada6c903fef0fb7b4a1dd1d9ac60a0361800b7a00', + '9731141d81fc8f8084d37c6e7542006b3ee1b40d60dfe5362a5b132fd17ddc0', + ], + [ + '32b78c7de9ee512a72895be6b9cbefa6e2f3c4ccce445c96b9f2c81e2778ad58', + 'ee1849f513df71e32efc3896ee28260c73bb80547ae2275ba497237794c8753c', + ], + [ + 'e2cb74fddc8e9fbcd076eef2a7c72b0ce37d50f08269dfc074b581550547a4f7', + 'd3aa2ed71c9dd2247a62df062736eb0baddea9e36122d2be8641abcb005cc4a4', + ], + [ + '8438447566d4d7bedadc299496ab357426009a35f235cb141be0d99cd10ae3a8', + 'c4e1020916980a4da5d01ac5e6ad330734ef0d7906631c4f2390426b2edd791f', + ], + [ + '4162d488b89402039b584c6fc6c308870587d9c46f660b878ab65c82c711d67e', + '67163e903236289f776f22c25fb8a3afc1732f2b84b4e95dbda47ae5a0852649', + ], + [ + '3fad3fa84caf0f34f0f89bfd2dcf54fc175d767aec3e50684f3ba4a4bf5f683d', + 'cd1bc7cb6cc407bb2f0ca647c718a730cf71872e7d0d2a53fa20efcdfe61826', + ], + [ + '674f2600a3007a00568c1a7ce05d0816c1fb84bf1370798f1c69532faeb1a86b', + '299d21f9413f33b3edf43b257004580b70db57da0b182259e09eecc69e0d38a5', + ], + [ + 'd32f4da54ade74abb81b815ad1fb3b263d82d6c692714bcff87d29bd5ee9f08f', + 'f9429e738b8e53b968e99016c059707782e14f4535359d582fc416910b3eea87', + ], + [ + '30e4e670435385556e593657135845d36fbb6931f72b08cb1ed954f1e3ce3ff6', + '462f9bce619898638499350113bbc9b10a878d35da70740dc695a559eb88db7b', + ], + [ + 'be2062003c51cc3004682904330e4dee7f3dcd10b01e580bf1971b04d4cad297', + '62188bc49d61e5428573d48a74e1c655b1c61090905682a0d5558ed72dccb9bc', + ], + [ + '93144423ace3451ed29e0fb9ac2af211cb6e84a601df5993c419859fff5df04a', + '7c10dfb164c3425f5c71a3f9d7992038f1065224f72bb9d1d902a6d13037b47c', + ], + [ + 'b015f8044f5fcbdcf21ca26d6c34fb8197829205c7b7d2a7cb66418c157b112c', + 'ab8c1e086d04e813744a655b2df8d5f83b3cdc6faa3088c1d3aea1454e3a1d5f', + ], + [ + 'd5e9e1da649d97d89e4868117a465a3a4f8a18de57a140d36b3f2af341a21b52', + '4cb04437f391ed73111a13cc1d4dd0db1693465c2240480d8955e8592f27447a', + ], + [ + 'd3ae41047dd7ca065dbf8ed77b992439983005cd72e16d6f996a5316d36966bb', + 'bd1aeb21ad22ebb22a10f0303417c6d964f8cdd7df0aca614b10dc14d125ac46', + ], + [ + '463e2763d885f958fc66cdd22800f0a487197d0a82e377b49f80af87c897b065', + 'bfefacdb0e5d0fd7df3a311a94de062b26b80c61fbc97508b79992671ef7ca7f', + ], + [ + '7985fdfd127c0567c6f53ec1bb63ec3158e597c40bfe747c83cddfc910641917', + '603c12daf3d9862ef2b25fe1de289aed24ed291e0ec6708703a5bd567f32ed03', + ], + [ + '74a1ad6b5f76e39db2dd249410eac7f99e74c59cb83d2d0ed5ff1543da7703e9', + 'cc6157ef18c9c63cd6193d83631bbea0093e0968942e8c33d5737fd790e0db08', + ], + [ + '30682a50703375f602d416664ba19b7fc9bab42c72747463a71d0896b22f6da3', + '553e04f6b018b4fa6c8f39e7f311d3176290d0e0f19ca73f17714d9977a22ff8', + ], + [ + '9e2158f0d7c0d5f26c3791efefa79597654e7a2b2464f52b1ee6c1347769ef57', + '712fcdd1b9053f09003a3481fa7762e9ffd7c8ef35a38509e2fbf2629008373', + ], + [ + '176e26989a43c9cfeba4029c202538c28172e566e3c4fce7322857f3be327d66', + 'ed8cc9d04b29eb877d270b4878dc43c19aefd31f4eee09ee7b47834c1fa4b1c3', + ], + [ + '75d46efea3771e6e68abb89a13ad747ecf1892393dfc4f1b7004788c50374da8', + '9852390a99507679fd0b86fd2b39a868d7efc22151346e1a3ca4726586a6bed8', + ], + [ + '809a20c67d64900ffb698c4c825f6d5f2310fb0451c869345b7319f645605721', + '9e994980d9917e22b76b061927fa04143d096ccc54963e6a5ebfa5f3f8e286c1', + ], + [ + '1b38903a43f7f114ed4500b4eac7083fdefece1cf29c63528d563446f972c180', + '4036edc931a60ae889353f77fd53de4a2708b26b6f5da72ad3394119daf408f9', + ], + ], + }, + })), + secp256k1$1 + ) + } + ;(function (tt) { + var et = tt, + nt = hash$3, + rt = curve, + it = utils$o, + ot = it.assert + function at(ct) { + ct.type === 'short' + ? (this.curve = new rt.short(ct)) + : ct.type === 'edwards' + ? (this.curve = new rt.edwards(ct)) + : (this.curve = new rt.mont(ct)), + (this.g = this.curve.g), + (this.n = this.curve.n), + (this.hash = ct.hash), + ot(this.g.validate(), 'Invalid curve'), + ot(this.g.mul(this.n).isInfinity(), 'Invalid curve, G*N != O') + } + et.PresetCurve = at + function st(ct, ut) { + Object.defineProperty(et, ct, { + configurable: !0, + enumerable: !0, + get: function () { + var ht = new at(ut) + return Object.defineProperty(et, ct, { configurable: !0, enumerable: !0, value: ht }), ht + }, + }) + } + st('p192', { + type: 'short', + prime: 'p192', + p: 'ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff', + a: 'ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc', + b: '64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1', + n: 'ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831', + hash: nt.sha256, + gRed: !1, + g: [ + '188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012', + '07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811', + ], + }), + st('p224', { + type: 'short', + prime: 'p224', + p: 'ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001', + a: 'ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe', + b: 'b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4', + n: 'ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d', + hash: nt.sha256, + gRed: !1, + g: [ + 'b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21', + 'bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34', + ], + }), + st('p256', { + type: 'short', + prime: null, + p: 'ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff', + a: 'ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc', + b: '5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b', + n: 'ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551', + hash: nt.sha256, + gRed: !1, + g: [ + '6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296', + '4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5', + ], + }), + st('p384', { + type: 'short', + prime: null, + p: 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff', + a: 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc', + b: 'b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef', + n: 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973', + hash: nt.sha384, + gRed: !1, + g: [ + 'aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7', + '3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f', + ], + }), + st('p521', { + type: 'short', + prime: null, + p: '000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff', + a: '000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc', + b: '00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00', + n: '000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409', + hash: nt.sha512, + gRed: !1, + g: [ + '000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66', + '00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650', + ], + }), + st('curve25519', { + type: 'mont', + prime: 'p25519', + p: '7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed', + a: '76d06', + b: '1', + n: '1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed', + hash: nt.sha256, + gRed: !1, + g: ['9'], + }), + st('ed25519', { + type: 'edwards', + prime: 'p25519', + p: '7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed', + a: '-1', + c: '1', + d: '52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3', + n: '1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed', + hash: nt.sha256, + gRed: !1, + g: [ + '216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a', + '6666666666666666666666666666666666666666666666666666666666666658', + ], + }) + var lt + try { + lt = requireSecp256k1() + } catch { + lt = void 0 + } + st('secp256k1', { + type: 'short', + prime: 'k256', + p: 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f', + a: '0', + b: '7', + n: 'ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141', + h: '1', + hash: nt.sha256, + beta: '7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee', + lambda: '5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72', + basis: [ + { a: '3086d221a7d46bcde86c90e49284eb15', b: '-e4437ed6010e88286f547fa90abfe4c3' }, + { a: '114ca50f7a8e2f3f657c1108d9d44cfd8', b: '3086d221a7d46bcde86c90e49284eb15' }, + ], + gRed: !1, + g: [ + '79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798', + '483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8', + lt, + ], + }) + })(curves$1) + var hash$2 = hash$3, + utils$8 = utils$n, + assert$b = minimalisticAssert + function HmacDRBG(tt) { + if (!(this instanceof HmacDRBG)) return new HmacDRBG(tt) + ;(this.hash = tt.hash), + (this.predResist = !!tt.predResist), + (this.outLen = this.hash.outSize), + (this.minEntropy = tt.minEntropy || this.hash.hmacStrength), + (this._reseed = null), + (this.reseedInterval = null), + (this.K = null), + (this.V = null) + var et = utils$8.toArray(tt.entropy, tt.entropyEnc || 'hex'), + nt = utils$8.toArray(tt.nonce, tt.nonceEnc || 'hex'), + rt = utils$8.toArray(tt.pers, tt.persEnc || 'hex') + assert$b(et.length >= this.minEntropy / 8, 'Not enough entropy. Minimum is: ' + this.minEntropy + ' bits'), + this._init(et, nt, rt) + } + var hmacDrbg = HmacDRBG + HmacDRBG.prototype._init = function (et, nt, rt) { + var it = et.concat(nt).concat(rt) + ;(this.K = new Array(this.outLen / 8)), (this.V = new Array(this.outLen / 8)) + for (var ot = 0; ot < this.V.length; ot++) (this.K[ot] = 0), (this.V[ot] = 1) + this._update(it), (this._reseed = 1), (this.reseedInterval = 281474976710656) + } + HmacDRBG.prototype._hmac = function () { + return new hash$2.hmac(this.hash, this.K) + } + HmacDRBG.prototype._update = function (et) { + var nt = this._hmac().update(this.V).update([0]) + et && (nt = nt.update(et)), + (this.K = nt.digest()), + (this.V = this._hmac().update(this.V).digest()), + et && + ((this.K = this._hmac().update(this.V).update([1]).update(et).digest()), + (this.V = this._hmac().update(this.V).digest())) + } + HmacDRBG.prototype.reseed = function (et, nt, rt, it) { + typeof nt != 'string' && ((it = rt), (rt = nt), (nt = null)), + (et = utils$8.toArray(et, nt)), + (rt = utils$8.toArray(rt, it)), + assert$b(et.length >= this.minEntropy / 8, 'Not enough entropy. Minimum is: ' + this.minEntropy + ' bits'), + this._update(et.concat(rt || [])), + (this._reseed = 1) + } + HmacDRBG.prototype.generate = function (et, nt, rt, it) { + if (this._reseed > this.reseedInterval) throw new Error('Reseed is required') + typeof nt != 'string' && ((it = rt), (rt = nt), (nt = null)), + rt && ((rt = utils$8.toArray(rt, it || 'hex')), this._update(rt)) + for (var ot = []; ot.length < et; ) (this.V = this._hmac().update(this.V).digest()), (ot = ot.concat(this.V)) + var at = ot.slice(0, et) + return this._update(rt), this._reseed++, utils$8.encode(at, nt) + } + var BN$7 = bnExports$2, + utils$7 = utils$o, + assert$a = utils$7.assert + function KeyPair$2(tt, et) { + ;(this.ec = tt), + (this.priv = null), + (this.pub = null), + et.priv && this._importPrivate(et.priv, et.privEnc), + et.pub && this._importPublic(et.pub, et.pubEnc) + } + var key$2 = KeyPair$2 + KeyPair$2.fromPublic = function (et, nt, rt) { + return nt instanceof KeyPair$2 ? nt : new KeyPair$2(et, { pub: nt, pubEnc: rt }) + } + KeyPair$2.fromPrivate = function (et, nt, rt) { + return nt instanceof KeyPair$2 ? nt : new KeyPair$2(et, { priv: nt, privEnc: rt }) + } + KeyPair$2.prototype.validate = function () { + var et = this.getPublic() + return et.isInfinity() + ? { result: !1, reason: 'Invalid public key' } + : et.validate() + ? et.mul(this.ec.curve.n).isInfinity() + ? { result: !0, reason: null } + : { result: !1, reason: 'Public key * N != O' } + : { result: !1, reason: 'Public key is not a point' } + } + KeyPair$2.prototype.getPublic = function (et, nt) { + return ( + typeof et == 'string' && ((nt = et), (et = null)), + this.pub || (this.pub = this.ec.g.mul(this.priv)), + nt ? this.pub.encode(nt, et) : this.pub + ) + } + KeyPair$2.prototype.getPrivate = function (et) { + return et === 'hex' ? this.priv.toString(16, 2) : this.priv + } + KeyPair$2.prototype._importPrivate = function (et, nt) { + ;(this.priv = new BN$7(et, nt || 16)), (this.priv = this.priv.umod(this.ec.curve.n)) + } + KeyPair$2.prototype._importPublic = function (et, nt) { + if (et.x || et.y) { + this.ec.curve.type === 'mont' + ? assert$a(et.x, 'Need x coordinate') + : (this.ec.curve.type === 'short' || this.ec.curve.type === 'edwards') && + assert$a(et.x && et.y, 'Need both x and y coordinate'), + (this.pub = this.ec.curve.point(et.x, et.y)) + return + } + this.pub = this.ec.curve.decodePoint(et, nt) + } + KeyPair$2.prototype.derive = function (et) { + return et.validate() || assert$a(et.validate(), 'public point not validated'), et.mul(this.priv).getX() + } + KeyPair$2.prototype.sign = function (et, nt, rt) { + return this.ec.sign(et, this, nt, rt) + } + KeyPair$2.prototype.verify = function (et, nt) { + return this.ec.verify(et, nt, this) + } + KeyPair$2.prototype.inspect = function () { + return '' + } + var BN$6 = bnExports$2, + utils$6 = utils$o, + assert$9 = utils$6.assert + function Signature$2(tt, et) { + if (tt instanceof Signature$2) return tt + this._importDER(tt, et) || + (assert$9(tt.r && tt.s, 'Signature without r or s'), + (this.r = new BN$6(tt.r, 16)), + (this.s = new BN$6(tt.s, 16)), + tt.recoveryParam === void 0 ? (this.recoveryParam = null) : (this.recoveryParam = tt.recoveryParam)) + } + var signature$1 = Signature$2 + function Position$1() { + this.place = 0 + } + function getLength(tt, et) { + var nt = tt[et.place++] + if (!(nt & 128)) return nt + var rt = nt & 15 + if (rt === 0 || rt > 4) return !1 + for (var it = 0, ot = 0, at = et.place; ot < rt; ot++, at++) (it <<= 8), (it |= tt[at]), (it >>>= 0) + return it <= 127 ? !1 : ((et.place = at), it) + } + function rmPadding(tt) { + for (var et = 0, nt = tt.length - 1; !tt[et] && !(tt[et + 1] & 128) && et < nt; ) et++ + return et === 0 ? tt : tt.slice(et) + } + Signature$2.prototype._importDER = function (et, nt) { + et = utils$6.toArray(et, nt) + var rt = new Position$1() + if (et[rt.place++] !== 48) return !1 + var it = getLength(et, rt) + if (it === !1 || it + rt.place !== et.length || et[rt.place++] !== 2) return !1 + var ot = getLength(et, rt) + if (ot === !1) return !1 + var at = et.slice(rt.place, ot + rt.place) + if (((rt.place += ot), et[rt.place++] !== 2)) return !1 + var st = getLength(et, rt) + if (st === !1 || et.length !== st + rt.place) return !1 + var lt = et.slice(rt.place, st + rt.place) + if (at[0] === 0) + if (at[1] & 128) at = at.slice(1) + else return !1 + if (lt[0] === 0) + if (lt[1] & 128) lt = lt.slice(1) + else return !1 + return (this.r = new BN$6(at)), (this.s = new BN$6(lt)), (this.recoveryParam = null), !0 + } + function constructLength(tt, et) { + if (et < 128) { + tt.push(et) + return + } + var nt = 1 + ((Math.log(et) / Math.LN2) >>> 3) + for (tt.push(nt | 128); --nt; ) tt.push((et >>> (nt << 3)) & 255) + tt.push(et) + } + Signature$2.prototype.toDER = function (et) { + var nt = this.r.toArray(), + rt = this.s.toArray() + for ( + nt[0] & 128 && (nt = [0].concat(nt)), + rt[0] & 128 && (rt = [0].concat(rt)), + nt = rmPadding(nt), + rt = rmPadding(rt); + !rt[0] && !(rt[1] & 128); + + ) + rt = rt.slice(1) + var it = [2] + constructLength(it, nt.length), (it = it.concat(nt)), it.push(2), constructLength(it, rt.length) + var ot = it.concat(rt), + at = [48] + return constructLength(at, ot.length), (at = at.concat(ot)), utils$6.encode(at, et) + } + var ec$1, hasRequiredEc + function requireEc() { + if (hasRequiredEc) return ec$1 + hasRequiredEc = 1 + var tt = bnExports$2, + et = hmacDrbg, + nt = utils$o, + rt = curves$1, + it = requireBrorand(), + ot = nt.assert, + at = key$2, + st = signature$1 + function lt(ct) { + if (!(this instanceof lt)) return new lt(ct) + typeof ct == 'string' && (ot(Object.prototype.hasOwnProperty.call(rt, ct), 'Unknown curve ' + ct), (ct = rt[ct])), + ct instanceof rt.PresetCurve && (ct = { curve: ct }), + (this.curve = ct.curve.curve), + (this.n = this.curve.n), + (this.nh = this.n.ushrn(1)), + (this.g = this.curve.g), + (this.g = ct.curve.g), + this.g.precompute(ct.curve.n.bitLength() + 1), + (this.hash = ct.hash || ct.curve.hash) + } + return ( + (ec$1 = lt), + (lt.prototype.keyPair = function (ut) { + return new at(this, ut) + }), + (lt.prototype.keyFromPrivate = function (ut, ht) { + return at.fromPrivate(this, ut, ht) + }), + (lt.prototype.keyFromPublic = function (ut, ht) { + return at.fromPublic(this, ut, ht) + }), + (lt.prototype.genKeyPair = function (ut) { + ut || (ut = {}) + for ( + var ht = new et({ + hash: this.hash, + pers: ut.pers, + persEnc: ut.persEnc || 'utf8', + entropy: ut.entropy || it(this.hash.hmacStrength), + entropyEnc: (ut.entropy && ut.entropyEnc) || 'utf8', + nonce: this.n.toArray(), + }), + dt = this.n.byteLength(), + pt = this.n.sub(new tt(2)); + ; + + ) { + var mt = new tt(ht.generate(dt)) + if (!(mt.cmp(pt) > 0)) return mt.iaddn(1), this.keyFromPrivate(mt) + } + }), + (lt.prototype._truncateToN = function (ut, ht) { + var dt = ut.byteLength() * 8 - this.n.bitLength() + return dt > 0 && (ut = ut.ushrn(dt)), !ht && ut.cmp(this.n) >= 0 ? ut.sub(this.n) : ut + }), + (lt.prototype.sign = function (ut, ht, dt, pt) { + typeof dt == 'object' && ((pt = dt), (dt = null)), + pt || (pt = {}), + (ht = this.keyFromPrivate(ht, dt)), + (ut = this._truncateToN(new tt(ut, 16))) + for ( + var mt = this.n.byteLength(), + gt = ht.getPrivate().toArray('be', mt), + yt = ut.toArray('be', mt), + bt = new et({ hash: this.hash, entropy: gt, nonce: yt, pers: pt.pers, persEnc: pt.persEnc || 'utf8' }), + vt = this.n.sub(new tt(1)), + xt = 0; + ; + xt++ + ) { + var kt = pt.k ? pt.k(xt) : new tt(bt.generate(this.n.byteLength())) + if (((kt = this._truncateToN(kt, !0)), !(kt.cmpn(1) <= 0 || kt.cmp(vt) >= 0))) { + var St = this.g.mul(kt) + if (!St.isInfinity()) { + var Tt = St.getX(), + At = Tt.umod(this.n) + if (At.cmpn(0) !== 0) { + var Et = kt.invm(this.n).mul(At.mul(ht.getPrivate()).iadd(ut)) + if (((Et = Et.umod(this.n)), Et.cmpn(0) !== 0)) { + var $t = (St.getY().isOdd() ? 1 : 0) | (Tt.cmp(At) !== 0 ? 2 : 0) + return ( + pt.canonical && Et.cmp(this.nh) > 0 && ((Et = this.n.sub(Et)), ($t ^= 1)), + new st({ r: At, s: Et, recoveryParam: $t }) + ) + } + } + } + } + } + }), + (lt.prototype.verify = function (ut, ht, dt, pt) { + ;(ut = this._truncateToN(new tt(ut, 16))), (dt = this.keyFromPublic(dt, pt)), (ht = new st(ht, 'hex')) + var mt = ht.r, + gt = ht.s + if (mt.cmpn(1) < 0 || mt.cmp(this.n) >= 0 || gt.cmpn(1) < 0 || gt.cmp(this.n) >= 0) return !1 + var yt = gt.invm(this.n), + bt = yt.mul(ut).umod(this.n), + vt = yt.mul(mt).umod(this.n), + xt + return this.curve._maxwellTrick + ? ((xt = this.g.jmulAdd(bt, dt.getPublic(), vt)), xt.isInfinity() ? !1 : xt.eqXToP(mt)) + : ((xt = this.g.mulAdd(bt, dt.getPublic(), vt)), xt.isInfinity() ? !1 : xt.getX().umod(this.n).cmp(mt) === 0) + }), + (lt.prototype.recoverPubKey = function (ct, ut, ht, dt) { + ot((3 & ht) === ht, 'The recovery param is more than two bits'), (ut = new st(ut, dt)) + var pt = this.n, + mt = new tt(ct), + gt = ut.r, + yt = ut.s, + bt = ht & 1, + vt = ht >> 1 + if (gt.cmp(this.curve.p.umod(this.curve.n)) >= 0 && vt) throw new Error('Unable to find sencond key candinate') + vt ? (gt = this.curve.pointFromX(gt.add(this.curve.n), bt)) : (gt = this.curve.pointFromX(gt, bt)) + var xt = ut.r.invm(pt), + kt = pt.sub(mt).mul(xt).umod(pt), + St = yt.mul(xt).umod(pt) + return this.g.mulAdd(kt, gt, St) + }), + (lt.prototype.getKeyRecoveryParam = function (ct, ut, ht, dt) { + if (((ut = new st(ut, dt)), ut.recoveryParam !== null)) return ut.recoveryParam + for (var pt = 0; pt < 4; pt++) { + var mt + try { + mt = this.recoverPubKey(ct, ut, pt) + } catch { + continue + } + if (mt.eq(ht)) return pt + } + throw new Error('Unable to find valid recovery factor') + }), + ec$1 + ) + } + var utils$5 = utils$o, + assert$8 = utils$5.assert, + parseBytes$2 = utils$5.parseBytes, + cachedProperty$1 = utils$5.cachedProperty + function KeyPair$1(tt, et) { + ;(this.eddsa = tt), + (this._secret = parseBytes$2(et.secret)), + tt.isPoint(et.pub) ? (this._pub = et.pub) : (this._pubBytes = parseBytes$2(et.pub)) + } + KeyPair$1.fromPublic = function (et, nt) { + return nt instanceof KeyPair$1 ? nt : new KeyPair$1(et, { pub: nt }) + } + KeyPair$1.fromSecret = function (et, nt) { + return nt instanceof KeyPair$1 ? nt : new KeyPair$1(et, { secret: nt }) + } + KeyPair$1.prototype.secret = function () { + return this._secret + } + cachedProperty$1(KeyPair$1, 'pubBytes', function () { + return this.eddsa.encodePoint(this.pub()) + }) + cachedProperty$1(KeyPair$1, 'pub', function () { + return this._pubBytes ? this.eddsa.decodePoint(this._pubBytes) : this.eddsa.g.mul(this.priv()) + }) + cachedProperty$1(KeyPair$1, 'privBytes', function () { + var et = this.eddsa, + nt = this.hash(), + rt = et.encodingLength - 1, + it = nt.slice(0, et.encodingLength) + return (it[0] &= 248), (it[rt] &= 127), (it[rt] |= 64), it + }) + cachedProperty$1(KeyPair$1, 'priv', function () { + return this.eddsa.decodeInt(this.privBytes()) + }) + cachedProperty$1(KeyPair$1, 'hash', function () { + return this.eddsa.hash().update(this.secret()).digest() + }) + cachedProperty$1(KeyPair$1, 'messagePrefix', function () { + return this.hash().slice(this.eddsa.encodingLength) + }) + KeyPair$1.prototype.sign = function (et) { + return assert$8(this._secret, 'KeyPair can only verify'), this.eddsa.sign(et, this) + } + KeyPair$1.prototype.verify = function (et, nt) { + return this.eddsa.verify(et, nt, this) + } + KeyPair$1.prototype.getSecret = function (et) { + return assert$8(this._secret, 'KeyPair is public only'), utils$5.encode(this.secret(), et) + } + KeyPair$1.prototype.getPublic = function (et) { + return utils$5.encode(this.pubBytes(), et) + } + var key$1 = KeyPair$1, + BN$5 = bnExports$2, + utils$4 = utils$o, + assert$7 = utils$4.assert, + cachedProperty = utils$4.cachedProperty, + parseBytes$1 = utils$4.parseBytes + function Signature$1(tt, et) { + ;(this.eddsa = tt), + typeof et != 'object' && (et = parseBytes$1(et)), + Array.isArray(et) && (et = { R: et.slice(0, tt.encodingLength), S: et.slice(tt.encodingLength) }), + assert$7(et.R && et.S, 'Signature without R or S'), + tt.isPoint(et.R) && (this._R = et.R), + et.S instanceof BN$5 && (this._S = et.S), + (this._Rencoded = Array.isArray(et.R) ? et.R : et.Rencoded), + (this._Sencoded = Array.isArray(et.S) ? et.S : et.Sencoded) + } + cachedProperty(Signature$1, 'S', function () { + return this.eddsa.decodeInt(this.Sencoded()) + }) + cachedProperty(Signature$1, 'R', function () { + return this.eddsa.decodePoint(this.Rencoded()) + }) + cachedProperty(Signature$1, 'Rencoded', function () { + return this.eddsa.encodePoint(this.R()) + }) + cachedProperty(Signature$1, 'Sencoded', function () { + return this.eddsa.encodeInt(this.S()) + }) + Signature$1.prototype.toBytes = function () { + return this.Rencoded().concat(this.Sencoded()) + } + Signature$1.prototype.toHex = function () { + return utils$4.encode(this.toBytes(), 'hex').toUpperCase() + } + var signature = Signature$1, + hash$1 = hash$3, + curves = curves$1, + utils$3 = utils$o, + assert$6 = utils$3.assert, + parseBytes = utils$3.parseBytes, + KeyPair = key$1, + Signature = signature + function EDDSA(tt) { + if ((assert$6(tt === 'ed25519', 'only tested with ed25519 so far'), !(this instanceof EDDSA))) return new EDDSA(tt) + ;(tt = curves[tt].curve), + (this.curve = tt), + (this.g = tt.g), + this.g.precompute(tt.n.bitLength() + 1), + (this.pointClass = tt.point().constructor), + (this.encodingLength = Math.ceil(tt.n.bitLength() / 8)), + (this.hash = hash$1.sha512) + } + var eddsa = EDDSA + EDDSA.prototype.sign = function (et, nt) { + et = parseBytes(et) + var rt = this.keyFromSecret(nt), + it = this.hashInt(rt.messagePrefix(), et), + ot = this.g.mul(it), + at = this.encodePoint(ot), + st = this.hashInt(at, rt.pubBytes(), et).mul(rt.priv()), + lt = it.add(st).umod(this.curve.n) + return this.makeSignature({ R: ot, S: lt, Rencoded: at }) + } + EDDSA.prototype.verify = function (et, nt, rt) { + ;(et = parseBytes(et)), (nt = this.makeSignature(nt)) + var it = this.keyFromPublic(rt), + ot = this.hashInt(nt.Rencoded(), it.pubBytes(), et), + at = this.g.mul(nt.S()), + st = nt.R().add(it.pub().mul(ot)) + return st.eq(at) + } + EDDSA.prototype.hashInt = function () { + for (var et = this.hash(), nt = 0; nt < arguments.length; nt++) et.update(arguments[nt]) + return utils$3.intFromLE(et.digest()).umod(this.curve.n) + } + EDDSA.prototype.keyFromPublic = function (et) { + return KeyPair.fromPublic(this, et) + } + EDDSA.prototype.keyFromSecret = function (et) { + return KeyPair.fromSecret(this, et) + } + EDDSA.prototype.makeSignature = function (et) { + return et instanceof Signature ? et : new Signature(this, et) + } + EDDSA.prototype.encodePoint = function (et) { + var nt = et.getY().toArray('le', this.encodingLength) + return (nt[this.encodingLength - 1] |= et.getX().isOdd() ? 128 : 0), nt + } + EDDSA.prototype.decodePoint = function (et) { + et = utils$3.parseBytes(et) + var nt = et.length - 1, + rt = et.slice(0, nt).concat(et[nt] & -129), + it = (et[nt] & 128) !== 0, + ot = utils$3.intFromLE(rt) + return this.curve.pointFromY(ot, it) + } + EDDSA.prototype.encodeInt = function (et) { + return et.toArray('le', this.encodingLength) + } + EDDSA.prototype.decodeInt = function (et) { + return utils$3.intFromLE(et) + } + EDDSA.prototype.isPoint = function (et) { + return et instanceof this.pointClass + } + var hasRequiredElliptic + function requireElliptic() { + return ( + hasRequiredElliptic || + ((hasRequiredElliptic = 1), + (function (tt) { + var et = tt + ;(et.version = require$$0$1.version), + (et.utils = utils$o), + (et.rand = requireBrorand()), + (et.curve = curve), + (et.curves = curves$1), + (et.ec = requireEc()), + (et.eddsa = eddsa) + })(elliptic$2)), + elliptic$2 + ) + } + var bn = { exports: {} } + bn.exports + ;(function (tt) { + ;(function (et, nt) { + function rt(Ct, wt) { + if (!Ct) throw new Error(wt || 'Assertion failed') + } + function it(Ct, wt) { + Ct.super_ = wt + var It = function () {} + ;(It.prototype = wt.prototype), (Ct.prototype = new It()), (Ct.prototype.constructor = Ct) + } + function ot(Ct, wt, It) { + if (ot.isBN(Ct)) return Ct + ;(this.negative = 0), + (this.words = null), + (this.length = 0), + (this.red = null), + Ct !== null && + ((wt === 'le' || wt === 'be') && ((It = wt), (wt = 10)), this._init(Ct || 0, wt || 10, It || 'be')) + } + typeof et == 'object' ? (et.exports = ot) : (nt.BN = ot), (ot.BN = ot), (ot.wordSize = 26) + var at + try { + typeof window < 'u' && typeof window.Buffer < 'u' ? (at = window.Buffer) : (at = require$$0$2.Buffer) + } catch {} + ;(ot.isBN = function (wt) { + return wt instanceof ot + ? !0 + : wt !== null && typeof wt == 'object' && wt.constructor.wordSize === ot.wordSize && Array.isArray(wt.words) + }), + (ot.max = function (wt, It) { + return wt.cmp(It) > 0 ? wt : It + }), + (ot.min = function (wt, It) { + return wt.cmp(It) < 0 ? wt : It + }), + (ot.prototype._init = function (wt, It, Ot) { + if (typeof wt == 'number') return this._initNumber(wt, It, Ot) + if (typeof wt == 'object') return this._initArray(wt, It, Ot) + It === 'hex' && (It = 16), + rt(It === (It | 0) && It >= 2 && It <= 36), + (wt = wt.toString().replace(/\s+/g, '')) + var Wt = 0 + wt[0] === '-' && (Wt++, (this.negative = 1)), + Wt < wt.length && + (It === 16 + ? this._parseHex(wt, Wt, Ot) + : (this._parseBase(wt, It, Wt), Ot === 'le' && this._initArray(this.toArray(), It, Ot))) + }), + (ot.prototype._initNumber = function (wt, It, Ot) { + wt < 0 && ((this.negative = 1), (wt = -wt)), + wt < 67108864 + ? ((this.words = [wt & 67108863]), (this.length = 1)) + : wt < 4503599627370496 + ? ((this.words = [wt & 67108863, (wt / 67108864) & 67108863]), (this.length = 2)) + : (rt(wt < 9007199254740992), + (this.words = [wt & 67108863, (wt / 67108864) & 67108863, 1]), + (this.length = 3)), + Ot === 'le' && this._initArray(this.toArray(), It, Ot) + }), + (ot.prototype._initArray = function (wt, It, Ot) { + if ((rt(typeof wt.length == 'number'), wt.length <= 0)) return (this.words = [0]), (this.length = 1), this + ;(this.length = Math.ceil(wt.length / 3)), (this.words = new Array(this.length)) + for (var Wt = 0; Wt < this.length; Wt++) this.words[Wt] = 0 + var zt, + Ft, + Nt = 0 + if (Ot === 'be') + for (Wt = wt.length - 1, zt = 0; Wt >= 0; Wt -= 3) + (Ft = wt[Wt] | (wt[Wt - 1] << 8) | (wt[Wt - 2] << 16)), + (this.words[zt] |= (Ft << Nt) & 67108863), + (this.words[zt + 1] = (Ft >>> (26 - Nt)) & 67108863), + (Nt += 24), + Nt >= 26 && ((Nt -= 26), zt++) + else if (Ot === 'le') + for (Wt = 0, zt = 0; Wt < wt.length; Wt += 3) + (Ft = wt[Wt] | (wt[Wt + 1] << 8) | (wt[Wt + 2] << 16)), + (this.words[zt] |= (Ft << Nt) & 67108863), + (this.words[zt + 1] = (Ft >>> (26 - Nt)) & 67108863), + (Nt += 24), + Nt >= 26 && ((Nt -= 26), zt++) + return this._strip() + }) + function st(Ct, wt) { + var It = Ct.charCodeAt(wt) + if (It >= 48 && It <= 57) return It - 48 + if (It >= 65 && It <= 70) return It - 55 + if (It >= 97 && It <= 102) return It - 87 + rt(!1, 'Invalid character in ' + Ct) + } + function lt(Ct, wt, It) { + var Ot = st(Ct, It) + return It - 1 >= wt && (Ot |= st(Ct, It - 1) << 4), Ot + } + ot.prototype._parseHex = function (wt, It, Ot) { + ;(this.length = Math.ceil((wt.length - It) / 6)), (this.words = new Array(this.length)) + for (var Wt = 0; Wt < this.length; Wt++) this.words[Wt] = 0 + var zt = 0, + Ft = 0, + Nt + if (Ot === 'be') + for (Wt = wt.length - 1; Wt >= It; Wt -= 2) + (Nt = lt(wt, It, Wt) << zt), + (this.words[Ft] |= Nt & 67108863), + zt >= 18 ? ((zt -= 18), (Ft += 1), (this.words[Ft] |= Nt >>> 26)) : (zt += 8) + else { + var Ut = wt.length - It + for (Wt = Ut % 2 === 0 ? It + 1 : It; Wt < wt.length; Wt += 2) + (Nt = lt(wt, It, Wt) << zt), + (this.words[Ft] |= Nt & 67108863), + zt >= 18 ? ((zt -= 18), (Ft += 1), (this.words[Ft] |= Nt >>> 26)) : (zt += 8) + } + this._strip() + } + function ct(Ct, wt, It, Ot) { + for (var Wt = 0, zt = 0, Ft = Math.min(Ct.length, It), Nt = wt; Nt < Ft; Nt++) { + var Ut = Ct.charCodeAt(Nt) - 48 + ;(Wt *= Ot), + Ut >= 49 ? (zt = Ut - 49 + 10) : Ut >= 17 ? (zt = Ut - 17 + 10) : (zt = Ut), + rt(Ut >= 0 && zt < Ot, 'Invalid character'), + (Wt += zt) + } + return Wt + } + ;(ot.prototype._parseBase = function (wt, It, Ot) { + ;(this.words = [0]), (this.length = 1) + for (var Wt = 0, zt = 1; zt <= 67108863; zt *= It) Wt++ + Wt--, (zt = (zt / It) | 0) + for (var Ft = wt.length - Ot, Nt = Ft % Wt, Ut = Math.min(Ft, Ft - Nt) + Ot, Mt = 0, Ht = Ot; Ht < Ut; Ht += Wt) + (Mt = ct(wt, Ht, Ht + Wt, It)), + this.imuln(zt), + this.words[0] + Mt < 67108864 ? (this.words[0] += Mt) : this._iaddn(Mt) + if (Nt !== 0) { + var en = 1 + for (Mt = ct(wt, Ht, wt.length, It), Ht = 0; Ht < Nt; Ht++) en *= It + this.imuln(en), this.words[0] + Mt < 67108864 ? (this.words[0] += Mt) : this._iaddn(Mt) + } + this._strip() + }), + (ot.prototype.copy = function (wt) { + wt.words = new Array(this.length) + for (var It = 0; It < this.length; It++) wt.words[It] = this.words[It] + ;(wt.length = this.length), (wt.negative = this.negative), (wt.red = this.red) + }) + function ut(Ct, wt) { + ;(Ct.words = wt.words), (Ct.length = wt.length), (Ct.negative = wt.negative), (Ct.red = wt.red) + } + if ( + ((ot.prototype._move = function (wt) { + ut(wt, this) + }), + (ot.prototype.clone = function () { + var wt = new ot(null) + return this.copy(wt), wt + }), + (ot.prototype._expand = function (wt) { + for (; this.length < wt; ) this.words[this.length++] = 0 + return this + }), + (ot.prototype._strip = function () { + for (; this.length > 1 && this.words[this.length - 1] === 0; ) this.length-- + return this._normSign() + }), + (ot.prototype._normSign = function () { + return this.length === 1 && this.words[0] === 0 && (this.negative = 0), this + }), + typeof Symbol < 'u' && typeof Symbol.for == 'function') + ) + try { + ot.prototype[Symbol.for('nodejs.util.inspect.custom')] = ht + } catch { + ot.prototype.inspect = ht + } + else ot.prototype.inspect = ht + function ht() { + return (this.red ? '' + } + var dt = [ + '', + '0', + '00', + '000', + '0000', + '00000', + '000000', + '0000000', + '00000000', + '000000000', + '0000000000', + '00000000000', + '000000000000', + '0000000000000', + '00000000000000', + '000000000000000', + '0000000000000000', + '00000000000000000', + '000000000000000000', + '0000000000000000000', + '00000000000000000000', + '000000000000000000000', + '0000000000000000000000', + '00000000000000000000000', + '000000000000000000000000', + '0000000000000000000000000', + ], + pt = [ + 0, 0, 25, 16, 12, 11, 10, 9, 8, 8, 7, 7, 7, 7, 6, 6, 6, 6, 6, 6, 6, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, + ], + mt = [ + 0, 0, 33554432, 43046721, 16777216, 48828125, 60466176, 40353607, 16777216, 43046721, 1e7, 19487171, 35831808, + 62748517, 7529536, 11390625, 16777216, 24137569, 34012224, 47045881, 64e6, 4084101, 5153632, 6436343, 7962624, + 9765625, 11881376, 14348907, 17210368, 20511149, 243e5, 28629151, 33554432, 39135393, 45435424, 52521875, + 60466176, + ] + ;(ot.prototype.toString = function (wt, It) { + ;(wt = wt || 10), (It = It | 0 || 1) + var Ot + if (wt === 16 || wt === 'hex') { + Ot = '' + for (var Wt = 0, zt = 0, Ft = 0; Ft < this.length; Ft++) { + var Nt = this.words[Ft], + Ut = (((Nt << Wt) | zt) & 16777215).toString(16) + ;(zt = (Nt >>> (24 - Wt)) & 16777215), + (Wt += 2), + Wt >= 26 && ((Wt -= 26), Ft--), + zt !== 0 || Ft !== this.length - 1 ? (Ot = dt[6 - Ut.length] + Ut + Ot) : (Ot = Ut + Ot) + } + for (zt !== 0 && (Ot = zt.toString(16) + Ot); Ot.length % It !== 0; ) Ot = '0' + Ot + return this.negative !== 0 && (Ot = '-' + Ot), Ot + } + if (wt === (wt | 0) && wt >= 2 && wt <= 36) { + var Mt = pt[wt], + Ht = mt[wt] + Ot = '' + var en = this.clone() + for (en.negative = 0; !en.isZero(); ) { + var sn = en.modrn(Ht).toString(wt) + ;(en = en.idivn(Ht)), en.isZero() ? (Ot = sn + Ot) : (Ot = dt[Mt - sn.length] + sn + Ot) + } + for (this.isZero() && (Ot = '0' + Ot); Ot.length % It !== 0; ) Ot = '0' + Ot + return this.negative !== 0 && (Ot = '-' + Ot), Ot + } + rt(!1, 'Base should be between 2 and 36') + }), + (ot.prototype.toNumber = function () { + var wt = this.words[0] + return ( + this.length === 2 + ? (wt += this.words[1] * 67108864) + : this.length === 3 && this.words[2] === 1 + ? (wt += 4503599627370496 + this.words[1] * 67108864) + : this.length > 2 && rt(!1, 'Number can only safely store up to 53 bits'), + this.negative !== 0 ? -wt : wt + ) + }), + (ot.prototype.toJSON = function () { + return this.toString(16, 2) + }), + at && + (ot.prototype.toBuffer = function (wt, It) { + return this.toArrayLike(at, wt, It) + }), + (ot.prototype.toArray = function (wt, It) { + return this.toArrayLike(Array, wt, It) + }) + var gt = function (wt, It) { + return wt.allocUnsafe ? wt.allocUnsafe(It) : new wt(It) + } + ;(ot.prototype.toArrayLike = function (wt, It, Ot) { + this._strip() + var Wt = this.byteLength(), + zt = Ot || Math.max(1, Wt) + rt(Wt <= zt, 'byte array longer than desired length'), rt(zt > 0, 'Requested array length <= 0') + var Ft = gt(wt, zt), + Nt = It === 'le' ? 'LE' : 'BE' + return this['_toArrayLike' + Nt](Ft, Wt), Ft + }), + (ot.prototype._toArrayLikeLE = function (wt, It) { + for (var Ot = 0, Wt = 0, zt = 0, Ft = 0; zt < this.length; zt++) { + var Nt = (this.words[zt] << Ft) | Wt + ;(wt[Ot++] = Nt & 255), + Ot < wt.length && (wt[Ot++] = (Nt >> 8) & 255), + Ot < wt.length && (wt[Ot++] = (Nt >> 16) & 255), + Ft === 6 + ? (Ot < wt.length && (wt[Ot++] = (Nt >> 24) & 255), (Wt = 0), (Ft = 0)) + : ((Wt = Nt >>> 24), (Ft += 2)) + } + if (Ot < wt.length) for (wt[Ot++] = Wt; Ot < wt.length; ) wt[Ot++] = 0 + }), + (ot.prototype._toArrayLikeBE = function (wt, It) { + for (var Ot = wt.length - 1, Wt = 0, zt = 0, Ft = 0; zt < this.length; zt++) { + var Nt = (this.words[zt] << Ft) | Wt + ;(wt[Ot--] = Nt & 255), + Ot >= 0 && (wt[Ot--] = (Nt >> 8) & 255), + Ot >= 0 && (wt[Ot--] = (Nt >> 16) & 255), + Ft === 6 ? (Ot >= 0 && (wt[Ot--] = (Nt >> 24) & 255), (Wt = 0), (Ft = 0)) : ((Wt = Nt >>> 24), (Ft += 2)) + } + if (Ot >= 0) for (wt[Ot--] = Wt; Ot >= 0; ) wt[Ot--] = 0 + }), + Math.clz32 + ? (ot.prototype._countBits = function (wt) { + return 32 - Math.clz32(wt) + }) + : (ot.prototype._countBits = function (wt) { + var It = wt, + Ot = 0 + return ( + It >= 4096 && ((Ot += 13), (It >>>= 13)), + It >= 64 && ((Ot += 7), (It >>>= 7)), + It >= 8 && ((Ot += 4), (It >>>= 4)), + It >= 2 && ((Ot += 2), (It >>>= 2)), + Ot + It + ) + }), + (ot.prototype._zeroBits = function (wt) { + if (wt === 0) return 26 + var It = wt, + Ot = 0 + return ( + It & 8191 || ((Ot += 13), (It >>>= 13)), + It & 127 || ((Ot += 7), (It >>>= 7)), + It & 15 || ((Ot += 4), (It >>>= 4)), + It & 3 || ((Ot += 2), (It >>>= 2)), + It & 1 || Ot++, + Ot + ) + }), + (ot.prototype.bitLength = function () { + var wt = this.words[this.length - 1], + It = this._countBits(wt) + return (this.length - 1) * 26 + It + }) + function yt(Ct) { + for (var wt = new Array(Ct.bitLength()), It = 0; It < wt.length; It++) { + var Ot = (It / 26) | 0, + Wt = It % 26 + wt[It] = (Ct.words[Ot] >>> Wt) & 1 + } + return wt + } + ;(ot.prototype.zeroBits = function () { + if (this.isZero()) return 0 + for (var wt = 0, It = 0; It < this.length; It++) { + var Ot = this._zeroBits(this.words[It]) + if (((wt += Ot), Ot !== 26)) break + } + return wt + }), + (ot.prototype.byteLength = function () { + return Math.ceil(this.bitLength() / 8) + }), + (ot.prototype.toTwos = function (wt) { + return this.negative !== 0 ? this.abs().inotn(wt).iaddn(1) : this.clone() + }), + (ot.prototype.fromTwos = function (wt) { + return this.testn(wt - 1) ? this.notn(wt).iaddn(1).ineg() : this.clone() + }), + (ot.prototype.isNeg = function () { + return this.negative !== 0 + }), + (ot.prototype.neg = function () { + return this.clone().ineg() + }), + (ot.prototype.ineg = function () { + return this.isZero() || (this.negative ^= 1), this + }), + (ot.prototype.iuor = function (wt) { + for (; this.length < wt.length; ) this.words[this.length++] = 0 + for (var It = 0; It < wt.length; It++) this.words[It] = this.words[It] | wt.words[It] + return this._strip() + }), + (ot.prototype.ior = function (wt) { + return rt((this.negative | wt.negative) === 0), this.iuor(wt) + }), + (ot.prototype.or = function (wt) { + return this.length > wt.length ? this.clone().ior(wt) : wt.clone().ior(this) + }), + (ot.prototype.uor = function (wt) { + return this.length > wt.length ? this.clone().iuor(wt) : wt.clone().iuor(this) + }), + (ot.prototype.iuand = function (wt) { + var It + this.length > wt.length ? (It = wt) : (It = this) + for (var Ot = 0; Ot < It.length; Ot++) this.words[Ot] = this.words[Ot] & wt.words[Ot] + return (this.length = It.length), this._strip() + }), + (ot.prototype.iand = function (wt) { + return rt((this.negative | wt.negative) === 0), this.iuand(wt) + }), + (ot.prototype.and = function (wt) { + return this.length > wt.length ? this.clone().iand(wt) : wt.clone().iand(this) + }), + (ot.prototype.uand = function (wt) { + return this.length > wt.length ? this.clone().iuand(wt) : wt.clone().iuand(this) + }), + (ot.prototype.iuxor = function (wt) { + var It, Ot + this.length > wt.length ? ((It = this), (Ot = wt)) : ((It = wt), (Ot = this)) + for (var Wt = 0; Wt < Ot.length; Wt++) this.words[Wt] = It.words[Wt] ^ Ot.words[Wt] + if (this !== It) for (; Wt < It.length; Wt++) this.words[Wt] = It.words[Wt] + return (this.length = It.length), this._strip() + }), + (ot.prototype.ixor = function (wt) { + return rt((this.negative | wt.negative) === 0), this.iuxor(wt) + }), + (ot.prototype.xor = function (wt) { + return this.length > wt.length ? this.clone().ixor(wt) : wt.clone().ixor(this) + }), + (ot.prototype.uxor = function (wt) { + return this.length > wt.length ? this.clone().iuxor(wt) : wt.clone().iuxor(this) + }), + (ot.prototype.inotn = function (wt) { + rt(typeof wt == 'number' && wt >= 0) + var It = Math.ceil(wt / 26) | 0, + Ot = wt % 26 + this._expand(It), Ot > 0 && It-- + for (var Wt = 0; Wt < It; Wt++) this.words[Wt] = ~this.words[Wt] & 67108863 + return Ot > 0 && (this.words[Wt] = ~this.words[Wt] & (67108863 >> (26 - Ot))), this._strip() + }), + (ot.prototype.notn = function (wt) { + return this.clone().inotn(wt) + }), + (ot.prototype.setn = function (wt, It) { + rt(typeof wt == 'number' && wt >= 0) + var Ot = (wt / 26) | 0, + Wt = wt % 26 + return ( + this._expand(Ot + 1), + It ? (this.words[Ot] = this.words[Ot] | (1 << Wt)) : (this.words[Ot] = this.words[Ot] & ~(1 << Wt)), + this._strip() + ) + }), + (ot.prototype.iadd = function (wt) { + var It + if (this.negative !== 0 && wt.negative === 0) + return (this.negative = 0), (It = this.isub(wt)), (this.negative ^= 1), this._normSign() + if (this.negative === 0 && wt.negative !== 0) + return (wt.negative = 0), (It = this.isub(wt)), (wt.negative = 1), It._normSign() + var Ot, Wt + this.length > wt.length ? ((Ot = this), (Wt = wt)) : ((Ot = wt), (Wt = this)) + for (var zt = 0, Ft = 0; Ft < Wt.length; Ft++) + (It = (Ot.words[Ft] | 0) + (Wt.words[Ft] | 0) + zt), (this.words[Ft] = It & 67108863), (zt = It >>> 26) + for (; zt !== 0 && Ft < Ot.length; Ft++) + (It = (Ot.words[Ft] | 0) + zt), (this.words[Ft] = It & 67108863), (zt = It >>> 26) + if (((this.length = Ot.length), zt !== 0)) (this.words[this.length] = zt), this.length++ + else if (Ot !== this) for (; Ft < Ot.length; Ft++) this.words[Ft] = Ot.words[Ft] + return this + }), + (ot.prototype.add = function (wt) { + var It + return wt.negative !== 0 && this.negative === 0 + ? ((wt.negative = 0), (It = this.sub(wt)), (wt.negative ^= 1), It) + : wt.negative === 0 && this.negative !== 0 + ? ((this.negative = 0), (It = wt.sub(this)), (this.negative = 1), It) + : this.length > wt.length + ? this.clone().iadd(wt) + : wt.clone().iadd(this) + }), + (ot.prototype.isub = function (wt) { + if (wt.negative !== 0) { + wt.negative = 0 + var It = this.iadd(wt) + return (wt.negative = 1), It._normSign() + } else if (this.negative !== 0) + return (this.negative = 0), this.iadd(wt), (this.negative = 1), this._normSign() + var Ot = this.cmp(wt) + if (Ot === 0) return (this.negative = 0), (this.length = 1), (this.words[0] = 0), this + var Wt, zt + Ot > 0 ? ((Wt = this), (zt = wt)) : ((Wt = wt), (zt = this)) + for (var Ft = 0, Nt = 0; Nt < zt.length; Nt++) + (It = (Wt.words[Nt] | 0) - (zt.words[Nt] | 0) + Ft), (Ft = It >> 26), (this.words[Nt] = It & 67108863) + for (; Ft !== 0 && Nt < Wt.length; Nt++) + (It = (Wt.words[Nt] | 0) + Ft), (Ft = It >> 26), (this.words[Nt] = It & 67108863) + if (Ft === 0 && Nt < Wt.length && Wt !== this) for (; Nt < Wt.length; Nt++) this.words[Nt] = Wt.words[Nt] + return (this.length = Math.max(this.length, Nt)), Wt !== this && (this.negative = 1), this._strip() + }), + (ot.prototype.sub = function (wt) { + return this.clone().isub(wt) + }) + function bt(Ct, wt, It) { + It.negative = wt.negative ^ Ct.negative + var Ot = (Ct.length + wt.length) | 0 + ;(It.length = Ot), (Ot = (Ot - 1) | 0) + var Wt = Ct.words[0] | 0, + zt = wt.words[0] | 0, + Ft = Wt * zt, + Nt = Ft & 67108863, + Ut = (Ft / 67108864) | 0 + It.words[0] = Nt + for (var Mt = 1; Mt < Ot; Mt++) { + for ( + var Ht = Ut >>> 26, + en = Ut & 67108863, + sn = Math.min(Mt, wt.length - 1), + Kt = Math.max(0, Mt - Ct.length + 1); + Kt <= sn; + Kt++ + ) { + var rn = (Mt - Kt) | 0 + ;(Wt = Ct.words[rn] | 0), + (zt = wt.words[Kt] | 0), + (Ft = Wt * zt + en), + (Ht += (Ft / 67108864) | 0), + (en = Ft & 67108863) + } + ;(It.words[Mt] = en | 0), (Ut = Ht | 0) + } + return Ut !== 0 ? (It.words[Mt] = Ut | 0) : It.length--, It._strip() + } + var vt = function (wt, It, Ot) { + var Wt = wt.words, + zt = It.words, + Ft = Ot.words, + Nt = 0, + Ut, + Mt, + Ht, + en = Wt[0] | 0, + sn = en & 8191, + Kt = en >>> 13, + rn = Wt[1] | 0, + nn = rn & 8191, + hn = rn >>> 13, + vn = Wt[2] | 0, + an = vn & 8191, + Qt = vn >>> 13, + _n = Wt[3] | 0, + Pn = _n & 8191, + $n = _n >>> 13, + Nn = Wt[4] | 0, + Tn = Nn & 8191, + cn = Nn >>> 13, + mn = Wt[5] | 0, + In = mn & 8191, + An = mn >>> 13, + wn = Wt[6] | 0, + fn = wn & 8191, + pn = wn >>> 13, + kn = Wt[7] | 0, + Dn = kn & 8191, + un = kn >>> 13, + Zt = Wt[8] | 0, + Xt = Zt & 8191, + Sn = Zt >>> 13, + Rn = Wt[9] | 0, + jn = Rn & 8191, + On = Rn >>> 13, + Zn = zt[0] | 0, + Vn = Zn & 8191, + qn = Zn >>> 13, + zn = zt[1] | 0, + Jn = zn & 8191, + Hn = zn >>> 13, + pr = zt[2] | 0, + fr = pr & 8191, + xr = pr >>> 13, + io = zt[3] | 0, + Tr = io & 8191, + Ar = io >>> 13, + qr = zt[4] | 0, + jr = qr & 8191, + Fr = qr >>> 13, + ao = zt[5] | 0, + Yr = ao & 8191, + Dr = ao >>> 13, + go = zt[6] | 0, + xn = go & 8191, + Mn = go >>> 13, + dn = zt[7] | 0, + Jt = dn & 8191, + En = dn >>> 13, + Ln = zt[8] | 0, + Un = Ln & 8191, + Kn = Ln >>> 13, + nr = zt[9] | 0, + lr = nr & 8191, + cr = nr >>> 13 + ;(Ot.negative = wt.negative ^ It.negative), + (Ot.length = 19), + (Ut = Math.imul(sn, Vn)), + (Mt = Math.imul(sn, qn)), + (Mt = (Mt + Math.imul(Kt, Vn)) | 0), + (Ht = Math.imul(Kt, qn)) + var Hr = (((Nt + Ut) | 0) + ((Mt & 8191) << 13)) | 0 + ;(Nt = (((Ht + (Mt >>> 13)) | 0) + (Hr >>> 26)) | 0), + (Hr &= 67108863), + (Ut = Math.imul(nn, Vn)), + (Mt = Math.imul(nn, qn)), + (Mt = (Mt + Math.imul(hn, Vn)) | 0), + (Ht = Math.imul(hn, qn)), + (Ut = (Ut + Math.imul(sn, Jn)) | 0), + (Mt = (Mt + Math.imul(sn, Hn)) | 0), + (Mt = (Mt + Math.imul(Kt, Jn)) | 0), + (Ht = (Ht + Math.imul(Kt, Hn)) | 0) + var vr = (((Nt + Ut) | 0) + ((Mt & 8191) << 13)) | 0 + ;(Nt = (((Ht + (Mt >>> 13)) | 0) + (vr >>> 26)) | 0), + (vr &= 67108863), + (Ut = Math.imul(an, Vn)), + (Mt = Math.imul(an, qn)), + (Mt = (Mt + Math.imul(Qt, Vn)) | 0), + (Ht = Math.imul(Qt, qn)), + (Ut = (Ut + Math.imul(nn, Jn)) | 0), + (Mt = (Mt + Math.imul(nn, Hn)) | 0), + (Mt = (Mt + Math.imul(hn, Jn)) | 0), + (Ht = (Ht + Math.imul(hn, Hn)) | 0), + (Ut = (Ut + Math.imul(sn, fr)) | 0), + (Mt = (Mt + Math.imul(sn, xr)) | 0), + (Mt = (Mt + Math.imul(Kt, fr)) | 0), + (Ht = (Ht + Math.imul(Kt, xr)) | 0) + var Nr = (((Nt + Ut) | 0) + ((Mt & 8191) << 13)) | 0 + ;(Nt = (((Ht + (Mt >>> 13)) | 0) + (Nr >>> 26)) | 0), + (Nr &= 67108863), + (Ut = Math.imul(Pn, Vn)), + (Mt = Math.imul(Pn, qn)), + (Mt = (Mt + Math.imul($n, Vn)) | 0), + (Ht = Math.imul($n, qn)), + (Ut = (Ut + Math.imul(an, Jn)) | 0), + (Mt = (Mt + Math.imul(an, Hn)) | 0), + (Mt = (Mt + Math.imul(Qt, Jn)) | 0), + (Ht = (Ht + Math.imul(Qt, Hn)) | 0), + (Ut = (Ut + Math.imul(nn, fr)) | 0), + (Mt = (Mt + Math.imul(nn, xr)) | 0), + (Mt = (Mt + Math.imul(hn, fr)) | 0), + (Ht = (Ht + Math.imul(hn, xr)) | 0), + (Ut = (Ut + Math.imul(sn, Tr)) | 0), + (Mt = (Mt + Math.imul(sn, Ar)) | 0), + (Mt = (Mt + Math.imul(Kt, Tr)) | 0), + (Ht = (Ht + Math.imul(Kt, Ar)) | 0) + var Gr = (((Nt + Ut) | 0) + ((Mt & 8191) << 13)) | 0 + ;(Nt = (((Ht + (Mt >>> 13)) | 0) + (Gr >>> 26)) | 0), + (Gr &= 67108863), + (Ut = Math.imul(Tn, Vn)), + (Mt = Math.imul(Tn, qn)), + (Mt = (Mt + Math.imul(cn, Vn)) | 0), + (Ht = Math.imul(cn, qn)), + (Ut = (Ut + Math.imul(Pn, Jn)) | 0), + (Mt = (Mt + Math.imul(Pn, Hn)) | 0), + (Mt = (Mt + Math.imul($n, Jn)) | 0), + (Ht = (Ht + Math.imul($n, Hn)) | 0), + (Ut = (Ut + Math.imul(an, fr)) | 0), + (Mt = (Mt + Math.imul(an, xr)) | 0), + (Mt = (Mt + Math.imul(Qt, fr)) | 0), + (Ht = (Ht + Math.imul(Qt, xr)) | 0), + (Ut = (Ut + Math.imul(nn, Tr)) | 0), + (Mt = (Mt + Math.imul(nn, Ar)) | 0), + (Mt = (Mt + Math.imul(hn, Tr)) | 0), + (Ht = (Ht + Math.imul(hn, Ar)) | 0), + (Ut = (Ut + Math.imul(sn, jr)) | 0), + (Mt = (Mt + Math.imul(sn, Fr)) | 0), + (Mt = (Mt + Math.imul(Kt, jr)) | 0), + (Ht = (Ht + Math.imul(Kt, Fr)) | 0) + var eo = (((Nt + Ut) | 0) + ((Mt & 8191) << 13)) | 0 + ;(Nt = (((Ht + (Mt >>> 13)) | 0) + (eo >>> 26)) | 0), + (eo &= 67108863), + (Ut = Math.imul(In, Vn)), + (Mt = Math.imul(In, qn)), + (Mt = (Mt + Math.imul(An, Vn)) | 0), + (Ht = Math.imul(An, qn)), + (Ut = (Ut + Math.imul(Tn, Jn)) | 0), + (Mt = (Mt + Math.imul(Tn, Hn)) | 0), + (Mt = (Mt + Math.imul(cn, Jn)) | 0), + (Ht = (Ht + Math.imul(cn, Hn)) | 0), + (Ut = (Ut + Math.imul(Pn, fr)) | 0), + (Mt = (Mt + Math.imul(Pn, xr)) | 0), + (Mt = (Mt + Math.imul($n, fr)) | 0), + (Ht = (Ht + Math.imul($n, xr)) | 0), + (Ut = (Ut + Math.imul(an, Tr)) | 0), + (Mt = (Mt + Math.imul(an, Ar)) | 0), + (Mt = (Mt + Math.imul(Qt, Tr)) | 0), + (Ht = (Ht + Math.imul(Qt, Ar)) | 0), + (Ut = (Ut + Math.imul(nn, jr)) | 0), + (Mt = (Mt + Math.imul(nn, Fr)) | 0), + (Mt = (Mt + Math.imul(hn, jr)) | 0), + (Ht = (Ht + Math.imul(hn, Fr)) | 0), + (Ut = (Ut + Math.imul(sn, Yr)) | 0), + (Mt = (Mt + Math.imul(sn, Dr)) | 0), + (Mt = (Mt + Math.imul(Kt, Yr)) | 0), + (Ht = (Ht + Math.imul(Kt, Dr)) | 0) + var Zr = (((Nt + Ut) | 0) + ((Mt & 8191) << 13)) | 0 + ;(Nt = (((Ht + (Mt >>> 13)) | 0) + (Zr >>> 26)) | 0), + (Zr &= 67108863), + (Ut = Math.imul(fn, Vn)), + (Mt = Math.imul(fn, qn)), + (Mt = (Mt + Math.imul(pn, Vn)) | 0), + (Ht = Math.imul(pn, qn)), + (Ut = (Ut + Math.imul(In, Jn)) | 0), + (Mt = (Mt + Math.imul(In, Hn)) | 0), + (Mt = (Mt + Math.imul(An, Jn)) | 0), + (Ht = (Ht + Math.imul(An, Hn)) | 0), + (Ut = (Ut + Math.imul(Tn, fr)) | 0), + (Mt = (Mt + Math.imul(Tn, xr)) | 0), + (Mt = (Mt + Math.imul(cn, fr)) | 0), + (Ht = (Ht + Math.imul(cn, xr)) | 0), + (Ut = (Ut + Math.imul(Pn, Tr)) | 0), + (Mt = (Mt + Math.imul(Pn, Ar)) | 0), + (Mt = (Mt + Math.imul($n, Tr)) | 0), + (Ht = (Ht + Math.imul($n, Ar)) | 0), + (Ut = (Ut + Math.imul(an, jr)) | 0), + (Mt = (Mt + Math.imul(an, Fr)) | 0), + (Mt = (Mt + Math.imul(Qt, jr)) | 0), + (Ht = (Ht + Math.imul(Qt, Fr)) | 0), + (Ut = (Ut + Math.imul(nn, Yr)) | 0), + (Mt = (Mt + Math.imul(nn, Dr)) | 0), + (Mt = (Mt + Math.imul(hn, Yr)) | 0), + (Ht = (Ht + Math.imul(hn, Dr)) | 0), + (Ut = (Ut + Math.imul(sn, xn)) | 0), + (Mt = (Mt + Math.imul(sn, Mn)) | 0), + (Mt = (Mt + Math.imul(Kt, xn)) | 0), + (Ht = (Ht + Math.imul(Kt, Mn)) | 0) + var Jr = (((Nt + Ut) | 0) + ((Mt & 8191) << 13)) | 0 + ;(Nt = (((Ht + (Mt >>> 13)) | 0) + (Jr >>> 26)) | 0), + (Jr &= 67108863), + (Ut = Math.imul(Dn, Vn)), + (Mt = Math.imul(Dn, qn)), + (Mt = (Mt + Math.imul(un, Vn)) | 0), + (Ht = Math.imul(un, qn)), + (Ut = (Ut + Math.imul(fn, Jn)) | 0), + (Mt = (Mt + Math.imul(fn, Hn)) | 0), + (Mt = (Mt + Math.imul(pn, Jn)) | 0), + (Ht = (Ht + Math.imul(pn, Hn)) | 0), + (Ut = (Ut + Math.imul(In, fr)) | 0), + (Mt = (Mt + Math.imul(In, xr)) | 0), + (Mt = (Mt + Math.imul(An, fr)) | 0), + (Ht = (Ht + Math.imul(An, xr)) | 0), + (Ut = (Ut + Math.imul(Tn, Tr)) | 0), + (Mt = (Mt + Math.imul(Tn, Ar)) | 0), + (Mt = (Mt + Math.imul(cn, Tr)) | 0), + (Ht = (Ht + Math.imul(cn, Ar)) | 0), + (Ut = (Ut + Math.imul(Pn, jr)) | 0), + (Mt = (Mt + Math.imul(Pn, Fr)) | 0), + (Mt = (Mt + Math.imul($n, jr)) | 0), + (Ht = (Ht + Math.imul($n, Fr)) | 0), + (Ut = (Ut + Math.imul(an, Yr)) | 0), + (Mt = (Mt + Math.imul(an, Dr)) | 0), + (Mt = (Mt + Math.imul(Qt, Yr)) | 0), + (Ht = (Ht + Math.imul(Qt, Dr)) | 0), + (Ut = (Ut + Math.imul(nn, xn)) | 0), + (Mt = (Mt + Math.imul(nn, Mn)) | 0), + (Mt = (Mt + Math.imul(hn, xn)) | 0), + (Ht = (Ht + Math.imul(hn, Mn)) | 0), + (Ut = (Ut + Math.imul(sn, Jt)) | 0), + (Mt = (Mt + Math.imul(sn, En)) | 0), + (Mt = (Mt + Math.imul(Kt, Jt)) | 0), + (Ht = (Ht + Math.imul(Kt, En)) | 0) + var wr = (((Nt + Ut) | 0) + ((Mt & 8191) << 13)) | 0 + ;(Nt = (((Ht + (Mt >>> 13)) | 0) + (wr >>> 26)) | 0), + (wr &= 67108863), + (Ut = Math.imul(Xt, Vn)), + (Mt = Math.imul(Xt, qn)), + (Mt = (Mt + Math.imul(Sn, Vn)) | 0), + (Ht = Math.imul(Sn, qn)), + (Ut = (Ut + Math.imul(Dn, Jn)) | 0), + (Mt = (Mt + Math.imul(Dn, Hn)) | 0), + (Mt = (Mt + Math.imul(un, Jn)) | 0), + (Ht = (Ht + Math.imul(un, Hn)) | 0), + (Ut = (Ut + Math.imul(fn, fr)) | 0), + (Mt = (Mt + Math.imul(fn, xr)) | 0), + (Mt = (Mt + Math.imul(pn, fr)) | 0), + (Ht = (Ht + Math.imul(pn, xr)) | 0), + (Ut = (Ut + Math.imul(In, Tr)) | 0), + (Mt = (Mt + Math.imul(In, Ar)) | 0), + (Mt = (Mt + Math.imul(An, Tr)) | 0), + (Ht = (Ht + Math.imul(An, Ar)) | 0), + (Ut = (Ut + Math.imul(Tn, jr)) | 0), + (Mt = (Mt + Math.imul(Tn, Fr)) | 0), + (Mt = (Mt + Math.imul(cn, jr)) | 0), + (Ht = (Ht + Math.imul(cn, Fr)) | 0), + (Ut = (Ut + Math.imul(Pn, Yr)) | 0), + (Mt = (Mt + Math.imul(Pn, Dr)) | 0), + (Mt = (Mt + Math.imul($n, Yr)) | 0), + (Ht = (Ht + Math.imul($n, Dr)) | 0), + (Ut = (Ut + Math.imul(an, xn)) | 0), + (Mt = (Mt + Math.imul(an, Mn)) | 0), + (Mt = (Mt + Math.imul(Qt, xn)) | 0), + (Ht = (Ht + Math.imul(Qt, Mn)) | 0), + (Ut = (Ut + Math.imul(nn, Jt)) | 0), + (Mt = (Mt + Math.imul(nn, En)) | 0), + (Mt = (Mt + Math.imul(hn, Jt)) | 0), + (Ht = (Ht + Math.imul(hn, En)) | 0), + (Ut = (Ut + Math.imul(sn, Un)) | 0), + (Mt = (Mt + Math.imul(sn, Kn)) | 0), + (Mt = (Mt + Math.imul(Kt, Un)) | 0), + (Ht = (Ht + Math.imul(Kt, Kn)) | 0) + var Mr = (((Nt + Ut) | 0) + ((Mt & 8191) << 13)) | 0 + ;(Nt = (((Ht + (Mt >>> 13)) | 0) + (Mr >>> 26)) | 0), + (Mr &= 67108863), + (Ut = Math.imul(jn, Vn)), + (Mt = Math.imul(jn, qn)), + (Mt = (Mt + Math.imul(On, Vn)) | 0), + (Ht = Math.imul(On, qn)), + (Ut = (Ut + Math.imul(Xt, Jn)) | 0), + (Mt = (Mt + Math.imul(Xt, Hn)) | 0), + (Mt = (Mt + Math.imul(Sn, Jn)) | 0), + (Ht = (Ht + Math.imul(Sn, Hn)) | 0), + (Ut = (Ut + Math.imul(Dn, fr)) | 0), + (Mt = (Mt + Math.imul(Dn, xr)) | 0), + (Mt = (Mt + Math.imul(un, fr)) | 0), + (Ht = (Ht + Math.imul(un, xr)) | 0), + (Ut = (Ut + Math.imul(fn, Tr)) | 0), + (Mt = (Mt + Math.imul(fn, Ar)) | 0), + (Mt = (Mt + Math.imul(pn, Tr)) | 0), + (Ht = (Ht + Math.imul(pn, Ar)) | 0), + (Ut = (Ut + Math.imul(In, jr)) | 0), + (Mt = (Mt + Math.imul(In, Fr)) | 0), + (Mt = (Mt + Math.imul(An, jr)) | 0), + (Ht = (Ht + Math.imul(An, Fr)) | 0), + (Ut = (Ut + Math.imul(Tn, Yr)) | 0), + (Mt = (Mt + Math.imul(Tn, Dr)) | 0), + (Mt = (Mt + Math.imul(cn, Yr)) | 0), + (Ht = (Ht + Math.imul(cn, Dr)) | 0), + (Ut = (Ut + Math.imul(Pn, xn)) | 0), + (Mt = (Mt + Math.imul(Pn, Mn)) | 0), + (Mt = (Mt + Math.imul($n, xn)) | 0), + (Ht = (Ht + Math.imul($n, Mn)) | 0), + (Ut = (Ut + Math.imul(an, Jt)) | 0), + (Mt = (Mt + Math.imul(an, En)) | 0), + (Mt = (Mt + Math.imul(Qt, Jt)) | 0), + (Ht = (Ht + Math.imul(Qt, En)) | 0), + (Ut = (Ut + Math.imul(nn, Un)) | 0), + (Mt = (Mt + Math.imul(nn, Kn)) | 0), + (Mt = (Mt + Math.imul(hn, Un)) | 0), + (Ht = (Ht + Math.imul(hn, Kn)) | 0), + (Ut = (Ut + Math.imul(sn, lr)) | 0), + (Mt = (Mt + Math.imul(sn, cr)) | 0), + (Mt = (Mt + Math.imul(Kt, lr)) | 0), + (Ht = (Ht + Math.imul(Kt, cr)) | 0) + var Ur = (((Nt + Ut) | 0) + ((Mt & 8191) << 13)) | 0 + ;(Nt = (((Ht + (Mt >>> 13)) | 0) + (Ur >>> 26)) | 0), + (Ur &= 67108863), + (Ut = Math.imul(jn, Jn)), + (Mt = Math.imul(jn, Hn)), + (Mt = (Mt + Math.imul(On, Jn)) | 0), + (Ht = Math.imul(On, Hn)), + (Ut = (Ut + Math.imul(Xt, fr)) | 0), + (Mt = (Mt + Math.imul(Xt, xr)) | 0), + (Mt = (Mt + Math.imul(Sn, fr)) | 0), + (Ht = (Ht + Math.imul(Sn, xr)) | 0), + (Ut = (Ut + Math.imul(Dn, Tr)) | 0), + (Mt = (Mt + Math.imul(Dn, Ar)) | 0), + (Mt = (Mt + Math.imul(un, Tr)) | 0), + (Ht = (Ht + Math.imul(un, Ar)) | 0), + (Ut = (Ut + Math.imul(fn, jr)) | 0), + (Mt = (Mt + Math.imul(fn, Fr)) | 0), + (Mt = (Mt + Math.imul(pn, jr)) | 0), + (Ht = (Ht + Math.imul(pn, Fr)) | 0), + (Ut = (Ut + Math.imul(In, Yr)) | 0), + (Mt = (Mt + Math.imul(In, Dr)) | 0), + (Mt = (Mt + Math.imul(An, Yr)) | 0), + (Ht = (Ht + Math.imul(An, Dr)) | 0), + (Ut = (Ut + Math.imul(Tn, xn)) | 0), + (Mt = (Mt + Math.imul(Tn, Mn)) | 0), + (Mt = (Mt + Math.imul(cn, xn)) | 0), + (Ht = (Ht + Math.imul(cn, Mn)) | 0), + (Ut = (Ut + Math.imul(Pn, Jt)) | 0), + (Mt = (Mt + Math.imul(Pn, En)) | 0), + (Mt = (Mt + Math.imul($n, Jt)) | 0), + (Ht = (Ht + Math.imul($n, En)) | 0), + (Ut = (Ut + Math.imul(an, Un)) | 0), + (Mt = (Mt + Math.imul(an, Kn)) | 0), + (Mt = (Mt + Math.imul(Qt, Un)) | 0), + (Ht = (Ht + Math.imul(Qt, Kn)) | 0), + (Ut = (Ut + Math.imul(nn, lr)) | 0), + (Mt = (Mt + Math.imul(nn, cr)) | 0), + (Mt = (Mt + Math.imul(hn, lr)) | 0), + (Ht = (Ht + Math.imul(hn, cr)) | 0) + var Rr = (((Nt + Ut) | 0) + ((Mt & 8191) << 13)) | 0 + ;(Nt = (((Ht + (Mt >>> 13)) | 0) + (Rr >>> 26)) | 0), + (Rr &= 67108863), + (Ut = Math.imul(jn, fr)), + (Mt = Math.imul(jn, xr)), + (Mt = (Mt + Math.imul(On, fr)) | 0), + (Ht = Math.imul(On, xr)), + (Ut = (Ut + Math.imul(Xt, Tr)) | 0), + (Mt = (Mt + Math.imul(Xt, Ar)) | 0), + (Mt = (Mt + Math.imul(Sn, Tr)) | 0), + (Ht = (Ht + Math.imul(Sn, Ar)) | 0), + (Ut = (Ut + Math.imul(Dn, jr)) | 0), + (Mt = (Mt + Math.imul(Dn, Fr)) | 0), + (Mt = (Mt + Math.imul(un, jr)) | 0), + (Ht = (Ht + Math.imul(un, Fr)) | 0), + (Ut = (Ut + Math.imul(fn, Yr)) | 0), + (Mt = (Mt + Math.imul(fn, Dr)) | 0), + (Mt = (Mt + Math.imul(pn, Yr)) | 0), + (Ht = (Ht + Math.imul(pn, Dr)) | 0), + (Ut = (Ut + Math.imul(In, xn)) | 0), + (Mt = (Mt + Math.imul(In, Mn)) | 0), + (Mt = (Mt + Math.imul(An, xn)) | 0), + (Ht = (Ht + Math.imul(An, Mn)) | 0), + (Ut = (Ut + Math.imul(Tn, Jt)) | 0), + (Mt = (Mt + Math.imul(Tn, En)) | 0), + (Mt = (Mt + Math.imul(cn, Jt)) | 0), + (Ht = (Ht + Math.imul(cn, En)) | 0), + (Ut = (Ut + Math.imul(Pn, Un)) | 0), + (Mt = (Mt + Math.imul(Pn, Kn)) | 0), + (Mt = (Mt + Math.imul($n, Un)) | 0), + (Ht = (Ht + Math.imul($n, Kn)) | 0), + (Ut = (Ut + Math.imul(an, lr)) | 0), + (Mt = (Mt + Math.imul(an, cr)) | 0), + (Mt = (Mt + Math.imul(Qt, lr)) | 0), + (Ht = (Ht + Math.imul(Qt, cr)) | 0) + var Pr = (((Nt + Ut) | 0) + ((Mt & 8191) << 13)) | 0 + ;(Nt = (((Ht + (Mt >>> 13)) | 0) + (Pr >>> 26)) | 0), + (Pr &= 67108863), + (Ut = Math.imul(jn, Tr)), + (Mt = Math.imul(jn, Ar)), + (Mt = (Mt + Math.imul(On, Tr)) | 0), + (Ht = Math.imul(On, Ar)), + (Ut = (Ut + Math.imul(Xt, jr)) | 0), + (Mt = (Mt + Math.imul(Xt, Fr)) | 0), + (Mt = (Mt + Math.imul(Sn, jr)) | 0), + (Ht = (Ht + Math.imul(Sn, Fr)) | 0), + (Ut = (Ut + Math.imul(Dn, Yr)) | 0), + (Mt = (Mt + Math.imul(Dn, Dr)) | 0), + (Mt = (Mt + Math.imul(un, Yr)) | 0), + (Ht = (Ht + Math.imul(un, Dr)) | 0), + (Ut = (Ut + Math.imul(fn, xn)) | 0), + (Mt = (Mt + Math.imul(fn, Mn)) | 0), + (Mt = (Mt + Math.imul(pn, xn)) | 0), + (Ht = (Ht + Math.imul(pn, Mn)) | 0), + (Ut = (Ut + Math.imul(In, Jt)) | 0), + (Mt = (Mt + Math.imul(In, En)) | 0), + (Mt = (Mt + Math.imul(An, Jt)) | 0), + (Ht = (Ht + Math.imul(An, En)) | 0), + (Ut = (Ut + Math.imul(Tn, Un)) | 0), + (Mt = (Mt + Math.imul(Tn, Kn)) | 0), + (Mt = (Mt + Math.imul(cn, Un)) | 0), + (Ht = (Ht + Math.imul(cn, Kn)) | 0), + (Ut = (Ut + Math.imul(Pn, lr)) | 0), + (Mt = (Mt + Math.imul(Pn, cr)) | 0), + (Mt = (Mt + Math.imul($n, lr)) | 0), + (Ht = (Ht + Math.imul($n, cr)) | 0) + var Lr = (((Nt + Ut) | 0) + ((Mt & 8191) << 13)) | 0 + ;(Nt = (((Ht + (Mt >>> 13)) | 0) + (Lr >>> 26)) | 0), + (Lr &= 67108863), + (Ut = Math.imul(jn, jr)), + (Mt = Math.imul(jn, Fr)), + (Mt = (Mt + Math.imul(On, jr)) | 0), + (Ht = Math.imul(On, Fr)), + (Ut = (Ut + Math.imul(Xt, Yr)) | 0), + (Mt = (Mt + Math.imul(Xt, Dr)) | 0), + (Mt = (Mt + Math.imul(Sn, Yr)) | 0), + (Ht = (Ht + Math.imul(Sn, Dr)) | 0), + (Ut = (Ut + Math.imul(Dn, xn)) | 0), + (Mt = (Mt + Math.imul(Dn, Mn)) | 0), + (Mt = (Mt + Math.imul(un, xn)) | 0), + (Ht = (Ht + Math.imul(un, Mn)) | 0), + (Ut = (Ut + Math.imul(fn, Jt)) | 0), + (Mt = (Mt + Math.imul(fn, En)) | 0), + (Mt = (Mt + Math.imul(pn, Jt)) | 0), + (Ht = (Ht + Math.imul(pn, En)) | 0), + (Ut = (Ut + Math.imul(In, Un)) | 0), + (Mt = (Mt + Math.imul(In, Kn)) | 0), + (Mt = (Mt + Math.imul(An, Un)) | 0), + (Ht = (Ht + Math.imul(An, Kn)) | 0), + (Ut = (Ut + Math.imul(Tn, lr)) | 0), + (Mt = (Mt + Math.imul(Tn, cr)) | 0), + (Mt = (Mt + Math.imul(cn, lr)) | 0), + (Ht = (Ht + Math.imul(cn, cr)) | 0) + var Wr = (((Nt + Ut) | 0) + ((Mt & 8191) << 13)) | 0 + ;(Nt = (((Ht + (Mt >>> 13)) | 0) + (Wr >>> 26)) | 0), + (Wr &= 67108863), + (Ut = Math.imul(jn, Yr)), + (Mt = Math.imul(jn, Dr)), + (Mt = (Mt + Math.imul(On, Yr)) | 0), + (Ht = Math.imul(On, Dr)), + (Ut = (Ut + Math.imul(Xt, xn)) | 0), + (Mt = (Mt + Math.imul(Xt, Mn)) | 0), + (Mt = (Mt + Math.imul(Sn, xn)) | 0), + (Ht = (Ht + Math.imul(Sn, Mn)) | 0), + (Ut = (Ut + Math.imul(Dn, Jt)) | 0), + (Mt = (Mt + Math.imul(Dn, En)) | 0), + (Mt = (Mt + Math.imul(un, Jt)) | 0), + (Ht = (Ht + Math.imul(un, En)) | 0), + (Ut = (Ut + Math.imul(fn, Un)) | 0), + (Mt = (Mt + Math.imul(fn, Kn)) | 0), + (Mt = (Mt + Math.imul(pn, Un)) | 0), + (Ht = (Ht + Math.imul(pn, Kn)) | 0), + (Ut = (Ut + Math.imul(In, lr)) | 0), + (Mt = (Mt + Math.imul(In, cr)) | 0), + (Mt = (Mt + Math.imul(An, lr)) | 0), + (Ht = (Ht + Math.imul(An, cr)) | 0) + var Br = (((Nt + Ut) | 0) + ((Mt & 8191) << 13)) | 0 + ;(Nt = (((Ht + (Mt >>> 13)) | 0) + (Br >>> 26)) | 0), + (Br &= 67108863), + (Ut = Math.imul(jn, xn)), + (Mt = Math.imul(jn, Mn)), + (Mt = (Mt + Math.imul(On, xn)) | 0), + (Ht = Math.imul(On, Mn)), + (Ut = (Ut + Math.imul(Xt, Jt)) | 0), + (Mt = (Mt + Math.imul(Xt, En)) | 0), + (Mt = (Mt + Math.imul(Sn, Jt)) | 0), + (Ht = (Ht + Math.imul(Sn, En)) | 0), + (Ut = (Ut + Math.imul(Dn, Un)) | 0), + (Mt = (Mt + Math.imul(Dn, Kn)) | 0), + (Mt = (Mt + Math.imul(un, Un)) | 0), + (Ht = (Ht + Math.imul(un, Kn)) | 0), + (Ut = (Ut + Math.imul(fn, lr)) | 0), + (Mt = (Mt + Math.imul(fn, cr)) | 0), + (Mt = (Mt + Math.imul(pn, lr)) | 0), + (Ht = (Ht + Math.imul(pn, cr)) | 0) + var tr = (((Nt + Ut) | 0) + ((Mt & 8191) << 13)) | 0 + ;(Nt = (((Ht + (Mt >>> 13)) | 0) + (tr >>> 26)) | 0), + (tr &= 67108863), + (Ut = Math.imul(jn, Jt)), + (Mt = Math.imul(jn, En)), + (Mt = (Mt + Math.imul(On, Jt)) | 0), + (Ht = Math.imul(On, En)), + (Ut = (Ut + Math.imul(Xt, Un)) | 0), + (Mt = (Mt + Math.imul(Xt, Kn)) | 0), + (Mt = (Mt + Math.imul(Sn, Un)) | 0), + (Ht = (Ht + Math.imul(Sn, Kn)) | 0), + (Ut = (Ut + Math.imul(Dn, lr)) | 0), + (Mt = (Mt + Math.imul(Dn, cr)) | 0), + (Mt = (Mt + Math.imul(un, lr)) | 0), + (Ht = (Ht + Math.imul(un, cr)) | 0) + var ir = (((Nt + Ut) | 0) + ((Mt & 8191) << 13)) | 0 + ;(Nt = (((Ht + (Mt >>> 13)) | 0) + (ir >>> 26)) | 0), + (ir &= 67108863), + (Ut = Math.imul(jn, Un)), + (Mt = Math.imul(jn, Kn)), + (Mt = (Mt + Math.imul(On, Un)) | 0), + (Ht = Math.imul(On, Kn)), + (Ut = (Ut + Math.imul(Xt, lr)) | 0), + (Mt = (Mt + Math.imul(Xt, cr)) | 0), + (Mt = (Mt + Math.imul(Sn, lr)) | 0), + (Ht = (Ht + Math.imul(Sn, cr)) | 0) + var Sr = (((Nt + Ut) | 0) + ((Mt & 8191) << 13)) | 0 + ;(Nt = (((Ht + (Mt >>> 13)) | 0) + (Sr >>> 26)) | 0), + (Sr &= 67108863), + (Ut = Math.imul(jn, lr)), + (Mt = Math.imul(jn, cr)), + (Mt = (Mt + Math.imul(On, lr)) | 0), + (Ht = Math.imul(On, cr)) + var dr = (((Nt + Ut) | 0) + ((Mt & 8191) << 13)) | 0 + return ( + (Nt = (((Ht + (Mt >>> 13)) | 0) + (dr >>> 26)) | 0), + (dr &= 67108863), + (Ft[0] = Hr), + (Ft[1] = vr), + (Ft[2] = Nr), + (Ft[3] = Gr), + (Ft[4] = eo), + (Ft[5] = Zr), + (Ft[6] = Jr), + (Ft[7] = wr), + (Ft[8] = Mr), + (Ft[9] = Ur), + (Ft[10] = Rr), + (Ft[11] = Pr), + (Ft[12] = Lr), + (Ft[13] = Wr), + (Ft[14] = Br), + (Ft[15] = tr), + (Ft[16] = ir), + (Ft[17] = Sr), + (Ft[18] = dr), + Nt !== 0 && ((Ft[19] = Nt), Ot.length++), + Ot + ) + } + Math.imul || (vt = bt) + function xt(Ct, wt, It) { + ;(It.negative = wt.negative ^ Ct.negative), (It.length = Ct.length + wt.length) + for (var Ot = 0, Wt = 0, zt = 0; zt < It.length - 1; zt++) { + var Ft = Wt + Wt = 0 + for ( + var Nt = Ot & 67108863, Ut = Math.min(zt, wt.length - 1), Mt = Math.max(0, zt - Ct.length + 1); + Mt <= Ut; + Mt++ + ) { + var Ht = zt - Mt, + en = Ct.words[Ht] | 0, + sn = wt.words[Mt] | 0, + Kt = en * sn, + rn = Kt & 67108863 + ;(Ft = (Ft + ((Kt / 67108864) | 0)) | 0), + (rn = (rn + Nt) | 0), + (Nt = rn & 67108863), + (Ft = (Ft + (rn >>> 26)) | 0), + (Wt += Ft >>> 26), + (Ft &= 67108863) + } + ;(It.words[zt] = Nt), (Ot = Ft), (Ft = Wt) + } + return Ot !== 0 ? (It.words[zt] = Ot) : It.length--, It._strip() + } + function kt(Ct, wt, It) { + return xt(Ct, wt, It) + } + ;(ot.prototype.mulTo = function (wt, It) { + var Ot, + Wt = this.length + wt.length + return ( + this.length === 10 && wt.length === 10 + ? (Ot = vt(this, wt, It)) + : Wt < 63 + ? (Ot = bt(this, wt, It)) + : Wt < 1024 + ? (Ot = xt(this, wt, It)) + : (Ot = kt(this, wt, It)), + Ot + ) + }), + (ot.prototype.mul = function (wt) { + var It = new ot(null) + return (It.words = new Array(this.length + wt.length)), this.mulTo(wt, It) + }), + (ot.prototype.mulf = function (wt) { + var It = new ot(null) + return (It.words = new Array(this.length + wt.length)), kt(this, wt, It) + }), + (ot.prototype.imul = function (wt) { + return this.clone().mulTo(wt, this) + }), + (ot.prototype.imuln = function (wt) { + var It = wt < 0 + It && (wt = -wt), rt(typeof wt == 'number'), rt(wt < 67108864) + for (var Ot = 0, Wt = 0; Wt < this.length; Wt++) { + var zt = (this.words[Wt] | 0) * wt, + Ft = (zt & 67108863) + (Ot & 67108863) + ;(Ot >>= 26), (Ot += (zt / 67108864) | 0), (Ot += Ft >>> 26), (this.words[Wt] = Ft & 67108863) + } + return Ot !== 0 && ((this.words[Wt] = Ot), this.length++), It ? this.ineg() : this + }), + (ot.prototype.muln = function (wt) { + return this.clone().imuln(wt) + }), + (ot.prototype.sqr = function () { + return this.mul(this) + }), + (ot.prototype.isqr = function () { + return this.imul(this.clone()) + }), + (ot.prototype.pow = function (wt) { + var It = yt(wt) + if (It.length === 0) return new ot(1) + for (var Ot = this, Wt = 0; Wt < It.length && It[Wt] === 0; Wt++, Ot = Ot.sqr()); + if (++Wt < It.length) + for (var zt = Ot.sqr(); Wt < It.length; Wt++, zt = zt.sqr()) It[Wt] !== 0 && (Ot = Ot.mul(zt)) + return Ot + }), + (ot.prototype.iushln = function (wt) { + rt(typeof wt == 'number' && wt >= 0) + var It = wt % 26, + Ot = (wt - It) / 26, + Wt = (67108863 >>> (26 - It)) << (26 - It), + zt + if (It !== 0) { + var Ft = 0 + for (zt = 0; zt < this.length; zt++) { + var Nt = this.words[zt] & Wt, + Ut = ((this.words[zt] | 0) - Nt) << It + ;(this.words[zt] = Ut | Ft), (Ft = Nt >>> (26 - It)) + } + Ft && ((this.words[zt] = Ft), this.length++) + } + if (Ot !== 0) { + for (zt = this.length - 1; zt >= 0; zt--) this.words[zt + Ot] = this.words[zt] + for (zt = 0; zt < Ot; zt++) this.words[zt] = 0 + this.length += Ot + } + return this._strip() + }), + (ot.prototype.ishln = function (wt) { + return rt(this.negative === 0), this.iushln(wt) + }), + (ot.prototype.iushrn = function (wt, It, Ot) { + rt(typeof wt == 'number' && wt >= 0) + var Wt + It ? (Wt = (It - (It % 26)) / 26) : (Wt = 0) + var zt = wt % 26, + Ft = Math.min((wt - zt) / 26, this.length), + Nt = 67108863 ^ ((67108863 >>> zt) << zt), + Ut = Ot + if (((Wt -= Ft), (Wt = Math.max(0, Wt)), Ut)) { + for (var Mt = 0; Mt < Ft; Mt++) Ut.words[Mt] = this.words[Mt] + Ut.length = Ft + } + if (Ft !== 0) + if (this.length > Ft) + for (this.length -= Ft, Mt = 0; Mt < this.length; Mt++) this.words[Mt] = this.words[Mt + Ft] + else (this.words[0] = 0), (this.length = 1) + var Ht = 0 + for (Mt = this.length - 1; Mt >= 0 && (Ht !== 0 || Mt >= Wt); Mt--) { + var en = this.words[Mt] | 0 + ;(this.words[Mt] = (Ht << (26 - zt)) | (en >>> zt)), (Ht = en & Nt) + } + return ( + Ut && Ht !== 0 && (Ut.words[Ut.length++] = Ht), + this.length === 0 && ((this.words[0] = 0), (this.length = 1)), + this._strip() + ) + }), + (ot.prototype.ishrn = function (wt, It, Ot) { + return rt(this.negative === 0), this.iushrn(wt, It, Ot) + }), + (ot.prototype.shln = function (wt) { + return this.clone().ishln(wt) + }), + (ot.prototype.ushln = function (wt) { + return this.clone().iushln(wt) + }), + (ot.prototype.shrn = function (wt) { + return this.clone().ishrn(wt) + }), + (ot.prototype.ushrn = function (wt) { + return this.clone().iushrn(wt) + }), + (ot.prototype.testn = function (wt) { + rt(typeof wt == 'number' && wt >= 0) + var It = wt % 26, + Ot = (wt - It) / 26, + Wt = 1 << It + if (this.length <= Ot) return !1 + var zt = this.words[Ot] + return !!(zt & Wt) + }), + (ot.prototype.imaskn = function (wt) { + rt(typeof wt == 'number' && wt >= 0) + var It = wt % 26, + Ot = (wt - It) / 26 + if ((rt(this.negative === 0, 'imaskn works only with positive numbers'), this.length <= Ot)) return this + if ((It !== 0 && Ot++, (this.length = Math.min(Ot, this.length)), It !== 0)) { + var Wt = 67108863 ^ ((67108863 >>> It) << It) + this.words[this.length - 1] &= Wt + } + return this._strip() + }), + (ot.prototype.maskn = function (wt) { + return this.clone().imaskn(wt) + }), + (ot.prototype.iaddn = function (wt) { + return ( + rt(typeof wt == 'number'), + rt(wt < 67108864), + wt < 0 + ? this.isubn(-wt) + : this.negative !== 0 + ? this.length === 1 && (this.words[0] | 0) <= wt + ? ((this.words[0] = wt - (this.words[0] | 0)), (this.negative = 0), this) + : ((this.negative = 0), this.isubn(wt), (this.negative = 1), this) + : this._iaddn(wt) + ) + }), + (ot.prototype._iaddn = function (wt) { + this.words[0] += wt + for (var It = 0; It < this.length && this.words[It] >= 67108864; It++) + (this.words[It] -= 67108864), It === this.length - 1 ? (this.words[It + 1] = 1) : this.words[It + 1]++ + return (this.length = Math.max(this.length, It + 1)), this + }), + (ot.prototype.isubn = function (wt) { + if ((rt(typeof wt == 'number'), rt(wt < 67108864), wt < 0)) return this.iaddn(-wt) + if (this.negative !== 0) return (this.negative = 0), this.iaddn(wt), (this.negative = 1), this + if (((this.words[0] -= wt), this.length === 1 && this.words[0] < 0)) + (this.words[0] = -this.words[0]), (this.negative = 1) + else + for (var It = 0; It < this.length && this.words[It] < 0; It++) + (this.words[It] += 67108864), (this.words[It + 1] -= 1) + return this._strip() + }), + (ot.prototype.addn = function (wt) { + return this.clone().iaddn(wt) + }), + (ot.prototype.subn = function (wt) { + return this.clone().isubn(wt) + }), + (ot.prototype.iabs = function () { + return (this.negative = 0), this + }), + (ot.prototype.abs = function () { + return this.clone().iabs() + }), + (ot.prototype._ishlnsubmul = function (wt, It, Ot) { + var Wt = wt.length + Ot, + zt + this._expand(Wt) + var Ft, + Nt = 0 + for (zt = 0; zt < wt.length; zt++) { + Ft = (this.words[zt + Ot] | 0) + Nt + var Ut = (wt.words[zt] | 0) * It + ;(Ft -= Ut & 67108863), (Nt = (Ft >> 26) - ((Ut / 67108864) | 0)), (this.words[zt + Ot] = Ft & 67108863) + } + for (; zt < this.length - Ot; zt++) + (Ft = (this.words[zt + Ot] | 0) + Nt), (Nt = Ft >> 26), (this.words[zt + Ot] = Ft & 67108863) + if (Nt === 0) return this._strip() + for (rt(Nt === -1), Nt = 0, zt = 0; zt < this.length; zt++) + (Ft = -(this.words[zt] | 0) + Nt), (Nt = Ft >> 26), (this.words[zt] = Ft & 67108863) + return (this.negative = 1), this._strip() + }), + (ot.prototype._wordDiv = function (wt, It) { + var Ot = this.length - wt.length, + Wt = this.clone(), + zt = wt, + Ft = zt.words[zt.length - 1] | 0, + Nt = this._countBits(Ft) + ;(Ot = 26 - Nt), Ot !== 0 && ((zt = zt.ushln(Ot)), Wt.iushln(Ot), (Ft = zt.words[zt.length - 1] | 0)) + var Ut = Wt.length - zt.length, + Mt + if (It !== 'mod') { + ;(Mt = new ot(null)), (Mt.length = Ut + 1), (Mt.words = new Array(Mt.length)) + for (var Ht = 0; Ht < Mt.length; Ht++) Mt.words[Ht] = 0 + } + var en = Wt.clone()._ishlnsubmul(zt, 1, Ut) + en.negative === 0 && ((Wt = en), Mt && (Mt.words[Ut] = 1)) + for (var sn = Ut - 1; sn >= 0; sn--) { + var Kt = (Wt.words[zt.length + sn] | 0) * 67108864 + (Wt.words[zt.length + sn - 1] | 0) + for (Kt = Math.min((Kt / Ft) | 0, 67108863), Wt._ishlnsubmul(zt, Kt, sn); Wt.negative !== 0; ) + Kt--, (Wt.negative = 0), Wt._ishlnsubmul(zt, 1, sn), Wt.isZero() || (Wt.negative ^= 1) + Mt && (Mt.words[sn] = Kt) + } + return Mt && Mt._strip(), Wt._strip(), It !== 'div' && Ot !== 0 && Wt.iushrn(Ot), { div: Mt || null, mod: Wt } + }), + (ot.prototype.divmod = function (wt, It, Ot) { + if ((rt(!wt.isZero()), this.isZero())) return { div: new ot(0), mod: new ot(0) } + var Wt, zt, Ft + return this.negative !== 0 && wt.negative === 0 + ? ((Ft = this.neg().divmod(wt, It)), + It !== 'mod' && (Wt = Ft.div.neg()), + It !== 'div' && ((zt = Ft.mod.neg()), Ot && zt.negative !== 0 && zt.iadd(wt)), + { div: Wt, mod: zt }) + : this.negative === 0 && wt.negative !== 0 + ? ((Ft = this.divmod(wt.neg(), It)), It !== 'mod' && (Wt = Ft.div.neg()), { div: Wt, mod: Ft.mod }) + : this.negative & wt.negative + ? ((Ft = this.neg().divmod(wt.neg(), It)), + It !== 'div' && ((zt = Ft.mod.neg()), Ot && zt.negative !== 0 && zt.isub(wt)), + { div: Ft.div, mod: zt }) + : wt.length > this.length || this.cmp(wt) < 0 + ? { div: new ot(0), mod: this } + : wt.length === 1 + ? It === 'div' + ? { div: this.divn(wt.words[0]), mod: null } + : It === 'mod' + ? { div: null, mod: new ot(this.modrn(wt.words[0])) } + : { div: this.divn(wt.words[0]), mod: new ot(this.modrn(wt.words[0])) } + : this._wordDiv(wt, It) + }), + (ot.prototype.div = function (wt) { + return this.divmod(wt, 'div', !1).div + }), + (ot.prototype.mod = function (wt) { + return this.divmod(wt, 'mod', !1).mod + }), + (ot.prototype.umod = function (wt) { + return this.divmod(wt, 'mod', !0).mod + }), + (ot.prototype.divRound = function (wt) { + var It = this.divmod(wt) + if (It.mod.isZero()) return It.div + var Ot = It.div.negative !== 0 ? It.mod.isub(wt) : It.mod, + Wt = wt.ushrn(1), + zt = wt.andln(1), + Ft = Ot.cmp(Wt) + return Ft < 0 || (zt === 1 && Ft === 0) ? It.div : It.div.negative !== 0 ? It.div.isubn(1) : It.div.iaddn(1) + }), + (ot.prototype.modrn = function (wt) { + var It = wt < 0 + It && (wt = -wt), rt(wt <= 67108863) + for (var Ot = (1 << 26) % wt, Wt = 0, zt = this.length - 1; zt >= 0; zt--) + Wt = (Ot * Wt + (this.words[zt] | 0)) % wt + return It ? -Wt : Wt + }), + (ot.prototype.modn = function (wt) { + return this.modrn(wt) + }), + (ot.prototype.idivn = function (wt) { + var It = wt < 0 + It && (wt = -wt), rt(wt <= 67108863) + for (var Ot = 0, Wt = this.length - 1; Wt >= 0; Wt--) { + var zt = (this.words[Wt] | 0) + Ot * 67108864 + ;(this.words[Wt] = (zt / wt) | 0), (Ot = zt % wt) + } + return this._strip(), It ? this.ineg() : this + }), + (ot.prototype.divn = function (wt) { + return this.clone().idivn(wt) + }), + (ot.prototype.egcd = function (wt) { + rt(wt.negative === 0), rt(!wt.isZero()) + var It = this, + Ot = wt.clone() + It.negative !== 0 ? (It = It.umod(wt)) : (It = It.clone()) + for (var Wt = new ot(1), zt = new ot(0), Ft = new ot(0), Nt = new ot(1), Ut = 0; It.isEven() && Ot.isEven(); ) + It.iushrn(1), Ot.iushrn(1), ++Ut + for (var Mt = Ot.clone(), Ht = It.clone(); !It.isZero(); ) { + for (var en = 0, sn = 1; !(It.words[0] & sn) && en < 26; ++en, sn <<= 1); + if (en > 0) + for (It.iushrn(en); en-- > 0; ) + (Wt.isOdd() || zt.isOdd()) && (Wt.iadd(Mt), zt.isub(Ht)), Wt.iushrn(1), zt.iushrn(1) + for (var Kt = 0, rn = 1; !(Ot.words[0] & rn) && Kt < 26; ++Kt, rn <<= 1); + if (Kt > 0) + for (Ot.iushrn(Kt); Kt-- > 0; ) + (Ft.isOdd() || Nt.isOdd()) && (Ft.iadd(Mt), Nt.isub(Ht)), Ft.iushrn(1), Nt.iushrn(1) + It.cmp(Ot) >= 0 ? (It.isub(Ot), Wt.isub(Ft), zt.isub(Nt)) : (Ot.isub(It), Ft.isub(Wt), Nt.isub(zt)) + } + return { a: Ft, b: Nt, gcd: Ot.iushln(Ut) } + }), + (ot.prototype._invmp = function (wt) { + rt(wt.negative === 0), rt(!wt.isZero()) + var It = this, + Ot = wt.clone() + It.negative !== 0 ? (It = It.umod(wt)) : (It = It.clone()) + for (var Wt = new ot(1), zt = new ot(0), Ft = Ot.clone(); It.cmpn(1) > 0 && Ot.cmpn(1) > 0; ) { + for (var Nt = 0, Ut = 1; !(It.words[0] & Ut) && Nt < 26; ++Nt, Ut <<= 1); + if (Nt > 0) for (It.iushrn(Nt); Nt-- > 0; ) Wt.isOdd() && Wt.iadd(Ft), Wt.iushrn(1) + for (var Mt = 0, Ht = 1; !(Ot.words[0] & Ht) && Mt < 26; ++Mt, Ht <<= 1); + if (Mt > 0) for (Ot.iushrn(Mt); Mt-- > 0; ) zt.isOdd() && zt.iadd(Ft), zt.iushrn(1) + It.cmp(Ot) >= 0 ? (It.isub(Ot), Wt.isub(zt)) : (Ot.isub(It), zt.isub(Wt)) + } + var en + return It.cmpn(1) === 0 ? (en = Wt) : (en = zt), en.cmpn(0) < 0 && en.iadd(wt), en + }), + (ot.prototype.gcd = function (wt) { + if (this.isZero()) return wt.abs() + if (wt.isZero()) return this.abs() + var It = this.clone(), + Ot = wt.clone() + ;(It.negative = 0), (Ot.negative = 0) + for (var Wt = 0; It.isEven() && Ot.isEven(); Wt++) It.iushrn(1), Ot.iushrn(1) + do { + for (; It.isEven(); ) It.iushrn(1) + for (; Ot.isEven(); ) Ot.iushrn(1) + var zt = It.cmp(Ot) + if (zt < 0) { + var Ft = It + ;(It = Ot), (Ot = Ft) + } else if (zt === 0 || Ot.cmpn(1) === 0) break + It.isub(Ot) + } while (!0) + return Ot.iushln(Wt) + }), + (ot.prototype.invm = function (wt) { + return this.egcd(wt).a.umod(wt) + }), + (ot.prototype.isEven = function () { + return (this.words[0] & 1) === 0 + }), + (ot.prototype.isOdd = function () { + return (this.words[0] & 1) === 1 + }), + (ot.prototype.andln = function (wt) { + return this.words[0] & wt + }), + (ot.prototype.bincn = function (wt) { + rt(typeof wt == 'number') + var It = wt % 26, + Ot = (wt - It) / 26, + Wt = 1 << It + if (this.length <= Ot) return this._expand(Ot + 1), (this.words[Ot] |= Wt), this + for (var zt = Wt, Ft = Ot; zt !== 0 && Ft < this.length; Ft++) { + var Nt = this.words[Ft] | 0 + ;(Nt += zt), (zt = Nt >>> 26), (Nt &= 67108863), (this.words[Ft] = Nt) + } + return zt !== 0 && ((this.words[Ft] = zt), this.length++), this + }), + (ot.prototype.isZero = function () { + return this.length === 1 && this.words[0] === 0 + }), + (ot.prototype.cmpn = function (wt) { + var It = wt < 0 + if (this.negative !== 0 && !It) return -1 + if (this.negative === 0 && It) return 1 + this._strip() + var Ot + if (this.length > 1) Ot = 1 + else { + It && (wt = -wt), rt(wt <= 67108863, 'Number is too big') + var Wt = this.words[0] | 0 + Ot = Wt === wt ? 0 : Wt < wt ? -1 : 1 + } + return this.negative !== 0 ? -Ot | 0 : Ot + }), + (ot.prototype.cmp = function (wt) { + if (this.negative !== 0 && wt.negative === 0) return -1 + if (this.negative === 0 && wt.negative !== 0) return 1 + var It = this.ucmp(wt) + return this.negative !== 0 ? -It | 0 : It + }), + (ot.prototype.ucmp = function (wt) { + if (this.length > wt.length) return 1 + if (this.length < wt.length) return -1 + for (var It = 0, Ot = this.length - 1; Ot >= 0; Ot--) { + var Wt = this.words[Ot] | 0, + zt = wt.words[Ot] | 0 + if (Wt !== zt) { + Wt < zt ? (It = -1) : Wt > zt && (It = 1) + break + } + } + return It + }), + (ot.prototype.gtn = function (wt) { + return this.cmpn(wt) === 1 + }), + (ot.prototype.gt = function (wt) { + return this.cmp(wt) === 1 + }), + (ot.prototype.gten = function (wt) { + return this.cmpn(wt) >= 0 + }), + (ot.prototype.gte = function (wt) { + return this.cmp(wt) >= 0 + }), + (ot.prototype.ltn = function (wt) { + return this.cmpn(wt) === -1 + }), + (ot.prototype.lt = function (wt) { + return this.cmp(wt) === -1 + }), + (ot.prototype.lten = function (wt) { + return this.cmpn(wt) <= 0 + }), + (ot.prototype.lte = function (wt) { + return this.cmp(wt) <= 0 + }), + (ot.prototype.eqn = function (wt) { + return this.cmpn(wt) === 0 + }), + (ot.prototype.eq = function (wt) { + return this.cmp(wt) === 0 + }), + (ot.red = function (wt) { + return new jt(wt) + }), + (ot.prototype.toRed = function (wt) { + return ( + rt(!this.red, 'Already a number in reduction context'), + rt(this.negative === 0, 'red works only with positives'), + wt.convertTo(this)._forceRed(wt) + ) + }), + (ot.prototype.fromRed = function () { + return rt(this.red, 'fromRed works only with numbers in reduction context'), this.red.convertFrom(this) + }), + (ot.prototype._forceRed = function (wt) { + return (this.red = wt), this + }), + (ot.prototype.forceRed = function (wt) { + return rt(!this.red, 'Already a number in reduction context'), this._forceRed(wt) + }), + (ot.prototype.redAdd = function (wt) { + return rt(this.red, 'redAdd works only with red numbers'), this.red.add(this, wt) + }), + (ot.prototype.redIAdd = function (wt) { + return rt(this.red, 'redIAdd works only with red numbers'), this.red.iadd(this, wt) + }), + (ot.prototype.redSub = function (wt) { + return rt(this.red, 'redSub works only with red numbers'), this.red.sub(this, wt) + }), + (ot.prototype.redISub = function (wt) { + return rt(this.red, 'redISub works only with red numbers'), this.red.isub(this, wt) + }), + (ot.prototype.redShl = function (wt) { + return rt(this.red, 'redShl works only with red numbers'), this.red.shl(this, wt) + }), + (ot.prototype.redMul = function (wt) { + return rt(this.red, 'redMul works only with red numbers'), this.red._verify2(this, wt), this.red.mul(this, wt) + }), + (ot.prototype.redIMul = function (wt) { + return ( + rt(this.red, 'redMul works only with red numbers'), this.red._verify2(this, wt), this.red.imul(this, wt) + ) + }), + (ot.prototype.redSqr = function () { + return rt(this.red, 'redSqr works only with red numbers'), this.red._verify1(this), this.red.sqr(this) + }), + (ot.prototype.redISqr = function () { + return rt(this.red, 'redISqr works only with red numbers'), this.red._verify1(this), this.red.isqr(this) + }), + (ot.prototype.redSqrt = function () { + return rt(this.red, 'redSqrt works only with red numbers'), this.red._verify1(this), this.red.sqrt(this) + }), + (ot.prototype.redInvm = function () { + return rt(this.red, 'redInvm works only with red numbers'), this.red._verify1(this), this.red.invm(this) + }), + (ot.prototype.redNeg = function () { + return rt(this.red, 'redNeg works only with red numbers'), this.red._verify1(this), this.red.neg(this) + }), + (ot.prototype.redPow = function (wt) { + return rt(this.red && !wt.red, 'redPow(normalNum)'), this.red._verify1(this), this.red.pow(this, wt) + }) + var St = { k256: null, p224: null, p192: null, p25519: null } + function Tt(Ct, wt) { + ;(this.name = Ct), + (this.p = new ot(wt, 16)), + (this.n = this.p.bitLength()), + (this.k = new ot(1).iushln(this.n).isub(this.p)), + (this.tmp = this._tmp()) + } + ;(Tt.prototype._tmp = function () { + var wt = new ot(null) + return (wt.words = new Array(Math.ceil(this.n / 13))), wt + }), + (Tt.prototype.ireduce = function (wt) { + var It = wt, + Ot + do this.split(It, this.tmp), (It = this.imulK(It)), (It = It.iadd(this.tmp)), (Ot = It.bitLength()) + while (Ot > this.n) + var Wt = Ot < this.n ? -1 : It.ucmp(this.p) + return ( + Wt === 0 + ? ((It.words[0] = 0), (It.length = 1)) + : Wt > 0 + ? It.isub(this.p) + : It.strip !== void 0 + ? It.strip() + : It._strip(), + It + ) + }), + (Tt.prototype.split = function (wt, It) { + wt.iushrn(this.n, 0, It) + }), + (Tt.prototype.imulK = function (wt) { + return wt.imul(this.k) + }) + function At() { + Tt.call(this, 'k256', 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f') + } + it(At, Tt), + (At.prototype.split = function (wt, It) { + for (var Ot = 4194303, Wt = Math.min(wt.length, 9), zt = 0; zt < Wt; zt++) It.words[zt] = wt.words[zt] + if (((It.length = Wt), wt.length <= 9)) { + ;(wt.words[0] = 0), (wt.length = 1) + return + } + var Ft = wt.words[9] + for (It.words[It.length++] = Ft & Ot, zt = 10; zt < wt.length; zt++) { + var Nt = wt.words[zt] | 0 + ;(wt.words[zt - 10] = ((Nt & Ot) << 4) | (Ft >>> 22)), (Ft = Nt) + } + ;(Ft >>>= 22), (wt.words[zt - 10] = Ft), Ft === 0 && wt.length > 10 ? (wt.length -= 10) : (wt.length -= 9) + }), + (At.prototype.imulK = function (wt) { + ;(wt.words[wt.length] = 0), (wt.words[wt.length + 1] = 0), (wt.length += 2) + for (var It = 0, Ot = 0; Ot < wt.length; Ot++) { + var Wt = wt.words[Ot] | 0 + ;(It += Wt * 977), (wt.words[Ot] = It & 67108863), (It = Wt * 64 + ((It / 67108864) | 0)) + } + return wt.words[wt.length - 1] === 0 && (wt.length--, wt.words[wt.length - 1] === 0 && wt.length--), wt + }) + function Et() { + Tt.call(this, 'p224', 'ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001') + } + it(Et, Tt) + function $t() { + Tt.call(this, 'p192', 'ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff') + } + it($t, Tt) + function Dt() { + Tt.call(this, '25519', '7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed') + } + it(Dt, Tt), + (Dt.prototype.imulK = function (wt) { + for (var It = 0, Ot = 0; Ot < wt.length; Ot++) { + var Wt = (wt.words[Ot] | 0) * 19 + It, + zt = Wt & 67108863 + ;(Wt >>>= 26), (wt.words[Ot] = zt), (It = Wt) + } + return It !== 0 && (wt.words[wt.length++] = It), wt + }), + (ot._prime = function (wt) { + if (St[wt]) return St[wt] + var It + if (wt === 'k256') It = new At() + else if (wt === 'p224') It = new Et() + else if (wt === 'p192') It = new $t() + else if (wt === 'p25519') It = new Dt() + else throw new Error('Unknown prime ' + wt) + return (St[wt] = It), It + }) + function jt(Ct) { + if (typeof Ct == 'string') { + var wt = ot._prime(Ct) + ;(this.m = wt.p), (this.prime = wt) + } else rt(Ct.gtn(1), 'modulus must be greater than 1'), (this.m = Ct), (this.prime = null) + } + ;(jt.prototype._verify1 = function (wt) { + rt(wt.negative === 0, 'red works only with positives'), rt(wt.red, 'red works only with red numbers') + }), + (jt.prototype._verify2 = function (wt, It) { + rt((wt.negative | It.negative) === 0, 'red works only with positives'), + rt(wt.red && wt.red === It.red, 'red works only with red numbers') + }), + (jt.prototype.imod = function (wt) { + return this.prime ? this.prime.ireduce(wt)._forceRed(this) : (ut(wt, wt.umod(this.m)._forceRed(this)), wt) + }), + (jt.prototype.neg = function (wt) { + return wt.isZero() ? wt.clone() : this.m.sub(wt)._forceRed(this) + }), + (jt.prototype.add = function (wt, It) { + this._verify2(wt, It) + var Ot = wt.add(It) + return Ot.cmp(this.m) >= 0 && Ot.isub(this.m), Ot._forceRed(this) + }), + (jt.prototype.iadd = function (wt, It) { + this._verify2(wt, It) + var Ot = wt.iadd(It) + return Ot.cmp(this.m) >= 0 && Ot.isub(this.m), Ot + }), + (jt.prototype.sub = function (wt, It) { + this._verify2(wt, It) + var Ot = wt.sub(It) + return Ot.cmpn(0) < 0 && Ot.iadd(this.m), Ot._forceRed(this) + }), + (jt.prototype.isub = function (wt, It) { + this._verify2(wt, It) + var Ot = wt.isub(It) + return Ot.cmpn(0) < 0 && Ot.iadd(this.m), Ot + }), + (jt.prototype.shl = function (wt, It) { + return this._verify1(wt), this.imod(wt.ushln(It)) + }), + (jt.prototype.imul = function (wt, It) { + return this._verify2(wt, It), this.imod(wt.imul(It)) + }), + (jt.prototype.mul = function (wt, It) { + return this._verify2(wt, It), this.imod(wt.mul(It)) + }), + (jt.prototype.isqr = function (wt) { + return this.imul(wt, wt.clone()) + }), + (jt.prototype.sqr = function (wt) { + return this.mul(wt, wt) + }), + (jt.prototype.sqrt = function (wt) { + if (wt.isZero()) return wt.clone() + var It = this.m.andln(3) + if ((rt(It % 2 === 1), It === 3)) { + var Ot = this.m.add(new ot(1)).iushrn(2) + return this.pow(wt, Ot) + } + for (var Wt = this.m.subn(1), zt = 0; !Wt.isZero() && Wt.andln(1) === 0; ) zt++, Wt.iushrn(1) + rt(!Wt.isZero()) + var Ft = new ot(1).toRed(this), + Nt = Ft.redNeg(), + Ut = this.m.subn(1).iushrn(1), + Mt = this.m.bitLength() + for (Mt = new ot(2 * Mt * Mt).toRed(this); this.pow(Mt, Ut).cmp(Nt) !== 0; ) Mt.redIAdd(Nt) + for ( + var Ht = this.pow(Mt, Wt), en = this.pow(wt, Wt.addn(1).iushrn(1)), sn = this.pow(wt, Wt), Kt = zt; + sn.cmp(Ft) !== 0; + + ) { + for (var rn = sn, nn = 0; rn.cmp(Ft) !== 0; nn++) rn = rn.redSqr() + rt(nn < Kt) + var hn = this.pow(Ht, new ot(1).iushln(Kt - nn - 1)) + ;(en = en.redMul(hn)), (Ht = hn.redSqr()), (sn = sn.redMul(Ht)), (Kt = nn) + } + return en + }), + (jt.prototype.invm = function (wt) { + var It = wt._invmp(this.m) + return It.negative !== 0 ? ((It.negative = 0), this.imod(It).redNeg()) : this.imod(It) + }), + (jt.prototype.pow = function (wt, It) { + if (It.isZero()) return new ot(1).toRed(this) + if (It.cmpn(1) === 0) return wt.clone() + var Ot = 4, + Wt = new Array(1 << Ot) + ;(Wt[0] = new ot(1).toRed(this)), (Wt[1] = wt) + for (var zt = 2; zt < Wt.length; zt++) Wt[zt] = this.mul(Wt[zt - 1], wt) + var Ft = Wt[0], + Nt = 0, + Ut = 0, + Mt = It.bitLength() % 26 + for (Mt === 0 && (Mt = 26), zt = It.length - 1; zt >= 0; zt--) { + for (var Ht = It.words[zt], en = Mt - 1; en >= 0; en--) { + var sn = (Ht >> en) & 1 + if ((Ft !== Wt[0] && (Ft = this.sqr(Ft)), sn === 0 && Nt === 0)) { + Ut = 0 + continue + } + ;(Nt <<= 1), + (Nt |= sn), + Ut++, + !(Ut !== Ot && (zt !== 0 || en !== 0)) && ((Ft = this.mul(Ft, Wt[Nt])), (Ut = 0), (Nt = 0)) + } + Mt = 26 + } + return Ft + }), + (jt.prototype.convertTo = function (wt) { + var It = wt.umod(this.m) + return It === wt ? It.clone() : It + }), + (jt.prototype.convertFrom = function (wt) { + var It = wt.clone() + return (It.red = null), It + }), + (ot.mont = function (wt) { + return new Pt(wt) + }) + function Pt(Ct) { + jt.call(this, Ct), + (this.shift = this.m.bitLength()), + this.shift % 26 !== 0 && (this.shift += 26 - (this.shift % 26)), + (this.r = new ot(1).iushln(this.shift)), + (this.r2 = this.imod(this.r.sqr())), + (this.rinv = this.r._invmp(this.m)), + (this.minv = this.rinv.mul(this.r).isubn(1).div(this.m)), + (this.minv = this.minv.umod(this.r)), + (this.minv = this.r.sub(this.minv)) + } + it(Pt, jt), + (Pt.prototype.convertTo = function (wt) { + return this.imod(wt.ushln(this.shift)) + }), + (Pt.prototype.convertFrom = function (wt) { + var It = this.imod(wt.mul(this.rinv)) + return (It.red = null), It + }), + (Pt.prototype.imul = function (wt, It) { + if (wt.isZero() || It.isZero()) return (wt.words[0] = 0), (wt.length = 1), wt + var Ot = wt.imul(It), + Wt = Ot.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m), + zt = Ot.isub(Wt).iushrn(this.shift), + Ft = zt + return ( + zt.cmp(this.m) >= 0 ? (Ft = zt.isub(this.m)) : zt.cmpn(0) < 0 && (Ft = zt.iadd(this.m)), Ft._forceRed(this) + ) + }), + (Pt.prototype.mul = function (wt, It) { + if (wt.isZero() || It.isZero()) return new ot(0)._forceRed(this) + var Ot = wt.mul(It), + Wt = Ot.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m), + zt = Ot.isub(Wt).iushrn(this.shift), + Ft = zt + return ( + zt.cmp(this.m) >= 0 ? (Ft = zt.isub(this.m)) : zt.cmpn(0) < 0 && (Ft = zt.iadd(this.m)), Ft._forceRed(this) + ) + }), + (Pt.prototype.invm = function (wt) { + var It = this.imod(wt._invmp(this.m).mul(this.r2)) + return It._forceRed(this) + }) + })(tt, commonjsGlobal) + })(bn) + var bnExports = bn.exports, + asn1$3 = {}, + asn1$2 = {}, + api$1 = {}, + encoders = {}, + buffer$1 = buffer$2, + Buffer$d = buffer$1.Buffer, + safer = {}, + key + for (key in buffer$1) + buffer$1.hasOwnProperty(key) && (key === 'SlowBuffer' || key === 'Buffer' || (safer[key] = buffer$1[key])) + var Safer = (safer.Buffer = {}) + for (key in Buffer$d) + Buffer$d.hasOwnProperty(key) && (key === 'allocUnsafe' || key === 'allocUnsafeSlow' || (Safer[key] = Buffer$d[key])) + safer.Buffer.prototype = Buffer$d.prototype + ;(!Safer.from || Safer.from === Uint8Array.from) && + (Safer.from = function (tt, et, nt) { + if (typeof tt == 'number') + throw new TypeError('The "value" argument must not be of type number. Received type ' + typeof tt) + if (tt && typeof tt.length > 'u') + throw new TypeError( + 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type ' + + typeof tt, + ) + return Buffer$d(tt, et, nt) + }) + Safer.alloc || + (Safer.alloc = function (tt, et, nt) { + if (typeof tt != 'number') + throw new TypeError('The "size" argument must be of type number. Received type ' + typeof tt) + if (tt < 0 || tt >= 2 * (1 << 30)) throw new RangeError('The value "' + tt + '" is invalid for option "size"') + var rt = Buffer$d(tt) + return !et || et.length === 0 ? rt.fill(0) : typeof nt == 'string' ? rt.fill(et, nt) : rt.fill(et), rt + }) + if (!safer.kStringMaxLength) + try { + safer.kStringMaxLength = process.binding('buffer').kStringMaxLength + } catch {} + safer.constants || + ((safer.constants = { MAX_LENGTH: safer.kMaxLength }), + safer.kStringMaxLength && (safer.constants.MAX_STRING_LENGTH = safer.kStringMaxLength)) + var safer_1 = safer, + reporter = {} + const inherits$5 = inherits_browserExports + function Reporter$2(tt) { + this._reporterState = { obj: null, path: [], options: tt || {}, errors: [] } + } + reporter.Reporter = Reporter$2 + Reporter$2.prototype.isError = function (et) { + return et instanceof ReporterError + } + Reporter$2.prototype.save = function () { + const et = this._reporterState + return { obj: et.obj, pathLen: et.path.length } + } + Reporter$2.prototype.restore = function (et) { + const nt = this._reporterState + ;(nt.obj = et.obj), (nt.path = nt.path.slice(0, et.pathLen)) + } + Reporter$2.prototype.enterKey = function (et) { + return this._reporterState.path.push(et) + } + Reporter$2.prototype.exitKey = function (et) { + const nt = this._reporterState + nt.path = nt.path.slice(0, et - 1) + } + Reporter$2.prototype.leaveKey = function (et, nt, rt) { + const it = this._reporterState + this.exitKey(et), it.obj !== null && (it.obj[nt] = rt) + } + Reporter$2.prototype.path = function () { + return this._reporterState.path.join('/') + } + Reporter$2.prototype.enterObject = function () { + const et = this._reporterState, + nt = et.obj + return (et.obj = {}), nt + } + Reporter$2.prototype.leaveObject = function (et) { + const nt = this._reporterState, + rt = nt.obj + return (nt.obj = et), rt + } + Reporter$2.prototype.error = function (et) { + let nt + const rt = this._reporterState, + it = et instanceof ReporterError + if ( + (it + ? (nt = et) + : (nt = new ReporterError( + rt.path + .map(function (ot) { + return '[' + JSON.stringify(ot) + ']' + }) + .join(''), + et.message || et, + et.stack, + )), + !rt.options.partial) + ) + throw nt + return it || rt.errors.push(nt), nt + } + Reporter$2.prototype.wrapResult = function (et) { + const nt = this._reporterState + return nt.options.partial ? { result: this.isError(et) ? null : et, errors: nt.errors } : et + } + function ReporterError(tt, et) { + ;(this.path = tt), this.rethrow(et) + } + inherits$5(ReporterError, Error) + ReporterError.prototype.rethrow = function (et) { + if ( + ((this.message = et + ' at: ' + (this.path || '(shallow)')), + Error.captureStackTrace && Error.captureStackTrace(this, ReporterError), + !this.stack) + ) + try { + throw new Error(this.message) + } catch (nt) { + this.stack = nt.stack + } + return this + } + var buffer = {} + const inherits$4 = inherits_browserExports, + Reporter$1 = reporter.Reporter, + Buffer$c = safer_1.Buffer + function DecoderBuffer$2(tt, et) { + if ((Reporter$1.call(this, et), !Buffer$c.isBuffer(tt))) { + this.error('Input not Buffer') + return + } + ;(this.base = tt), (this.offset = 0), (this.length = tt.length) + } + inherits$4(DecoderBuffer$2, Reporter$1) + buffer.DecoderBuffer = DecoderBuffer$2 + DecoderBuffer$2.isDecoderBuffer = function (et) { + return et instanceof DecoderBuffer$2 + ? !0 + : typeof et == 'object' && + Buffer$c.isBuffer(et.base) && + et.constructor.name === 'DecoderBuffer' && + typeof et.offset == 'number' && + typeof et.length == 'number' && + typeof et.save == 'function' && + typeof et.restore == 'function' && + typeof et.isEmpty == 'function' && + typeof et.readUInt8 == 'function' && + typeof et.skip == 'function' && + typeof et.raw == 'function' + } + DecoderBuffer$2.prototype.save = function () { + return { offset: this.offset, reporter: Reporter$1.prototype.save.call(this) } + } + DecoderBuffer$2.prototype.restore = function (et) { + const nt = new DecoderBuffer$2(this.base) + return ( + (nt.offset = et.offset), + (nt.length = this.offset), + (this.offset = et.offset), + Reporter$1.prototype.restore.call(this, et.reporter), + nt + ) + } + DecoderBuffer$2.prototype.isEmpty = function () { + return this.offset === this.length + } + DecoderBuffer$2.prototype.readUInt8 = function (et) { + return this.offset + 1 <= this.length + ? this.base.readUInt8(this.offset++, !0) + : this.error(et || 'DecoderBuffer overrun') + } + DecoderBuffer$2.prototype.skip = function (et, nt) { + if (!(this.offset + et <= this.length)) return this.error(nt || 'DecoderBuffer overrun') + const rt = new DecoderBuffer$2(this.base) + return ( + (rt._reporterState = this._reporterState), + (rt.offset = this.offset), + (rt.length = this.offset + et), + (this.offset += et), + rt + ) + } + DecoderBuffer$2.prototype.raw = function (et) { + return this.base.slice(et ? et.offset : this.offset, this.length) + } + function EncoderBuffer$1(tt, et) { + if (Array.isArray(tt)) + (this.length = 0), + (this.value = tt.map(function (nt) { + return ( + EncoderBuffer$1.isEncoderBuffer(nt) || (nt = new EncoderBuffer$1(nt, et)), (this.length += nt.length), nt + ) + }, this)) + else if (typeof tt == 'number') { + if (!(0 <= tt && tt <= 255)) return et.error('non-byte EncoderBuffer value') + ;(this.value = tt), (this.length = 1) + } else if (typeof tt == 'string') (this.value = tt), (this.length = Buffer$c.byteLength(tt)) + else if (Buffer$c.isBuffer(tt)) (this.value = tt), (this.length = tt.length) + else return et.error('Unsupported type: ' + typeof tt) + } + buffer.EncoderBuffer = EncoderBuffer$1 + EncoderBuffer$1.isEncoderBuffer = function (et) { + return et instanceof EncoderBuffer$1 + ? !0 + : typeof et == 'object' && + et.constructor.name === 'EncoderBuffer' && + typeof et.length == 'number' && + typeof et.join == 'function' + } + EncoderBuffer$1.prototype.join = function (et, nt) { + return ( + et || (et = Buffer$c.alloc(this.length)), + nt || (nt = 0), + this.length === 0 || + (Array.isArray(this.value) + ? this.value.forEach(function (rt) { + rt.join(et, nt), (nt += rt.length) + }) + : (typeof this.value == 'number' + ? (et[nt] = this.value) + : typeof this.value == 'string' + ? et.write(this.value, nt) + : Buffer$c.isBuffer(this.value) && this.value.copy(et, nt), + (nt += this.length))), + et + ) + } + const Reporter = reporter.Reporter, + EncoderBuffer = buffer.EncoderBuffer, + DecoderBuffer$1 = buffer.DecoderBuffer, + assert$5 = minimalisticAssert, + tags = [ + 'seq', + 'seqof', + 'set', + 'setof', + 'objid', + 'bool', + 'gentime', + 'utctime', + 'null_', + 'enum', + 'int', + 'objDesc', + 'bitstr', + 'bmpstr', + 'charstr', + 'genstr', + 'graphstr', + 'ia5str', + 'iso646str', + 'numstr', + 'octstr', + 'printstr', + 't61str', + 'unistr', + 'utf8str', + 'videostr', + ], + methods = ['key', 'obj', 'use', 'optional', 'explicit', 'implicit', 'def', 'choice', 'any', 'contains'].concat( + tags, + ), + overrided = [ + '_peekTag', + '_decodeTag', + '_use', + '_decodeStr', + '_decodeObjid', + '_decodeTime', + '_decodeNull', + '_decodeInt', + '_decodeBool', + '_decodeList', + '_encodeComposite', + '_encodeStr', + '_encodeObjid', + '_encodeTime', + '_encodeNull', + '_encodeInt', + '_encodeBool', + ] + function Node$4(tt, et, nt) { + const rt = {} + ;(this._baseState = rt), + (rt.name = nt), + (rt.enc = tt), + (rt.parent = et || null), + (rt.children = null), + (rt.tag = null), + (rt.args = null), + (rt.reverseArgs = null), + (rt.choice = null), + (rt.optional = !1), + (rt.any = !1), + (rt.obj = !1), + (rt.use = null), + (rt.useDecoder = null), + (rt.key = null), + (rt.default = null), + (rt.explicit = null), + (rt.implicit = null), + (rt.contains = null), + rt.parent || ((rt.children = []), this._wrap()) + } + var node$1 = Node$4 + const stateProps = [ + 'enc', + 'parent', + 'children', + 'tag', + 'args', + 'reverseArgs', + 'choice', + 'optional', + 'any', + 'obj', + 'use', + 'alteredUse', + 'key', + 'default', + 'explicit', + 'implicit', + 'contains', + ] + Node$4.prototype.clone = function () { + const et = this._baseState, + nt = {} + stateProps.forEach(function (it) { + nt[it] = et[it] + }) + const rt = new this.constructor(nt.parent) + return (rt._baseState = nt), rt + } + Node$4.prototype._wrap = function () { + const et = this._baseState + methods.forEach(function (nt) { + this[nt] = function () { + const it = new this.constructor(this) + return et.children.push(it), it[nt].apply(it, arguments) + } + }, this) + } + Node$4.prototype._init = function (et) { + const nt = this._baseState + assert$5(nt.parent === null), + et.call(this), + (nt.children = nt.children.filter(function (rt) { + return rt._baseState.parent === this + }, this)), + assert$5.equal(nt.children.length, 1, 'Root node can have only one child') + } + Node$4.prototype._useArgs = function (et) { + const nt = this._baseState, + rt = et.filter(function (it) { + return it instanceof this.constructor + }, this) + ;(et = et.filter(function (it) { + return !(it instanceof this.constructor) + }, this)), + rt.length !== 0 && + (assert$5(nt.children === null), + (nt.children = rt), + rt.forEach(function (it) { + it._baseState.parent = this + }, this)), + et.length !== 0 && + (assert$5(nt.args === null), + (nt.args = et), + (nt.reverseArgs = et.map(function (it) { + if (typeof it != 'object' || it.constructor !== Object) return it + const ot = {} + return ( + Object.keys(it).forEach(function (at) { + at == (at | 0) && (at |= 0) + const st = it[at] + ot[st] = at + }), + ot + ) + }))) + } + overrided.forEach(function (tt) { + Node$4.prototype[tt] = function () { + const nt = this._baseState + throw new Error(tt + ' not implemented for encoding: ' + nt.enc) + } + }) + tags.forEach(function (tt) { + Node$4.prototype[tt] = function () { + const nt = this._baseState, + rt = Array.prototype.slice.call(arguments) + return assert$5(nt.tag === null), (nt.tag = tt), this._useArgs(rt), this + } + }) + Node$4.prototype.use = function (et) { + assert$5(et) + const nt = this._baseState + return assert$5(nt.use === null), (nt.use = et), this + } + Node$4.prototype.optional = function () { + const et = this._baseState + return (et.optional = !0), this + } + Node$4.prototype.def = function (et) { + const nt = this._baseState + return assert$5(nt.default === null), (nt.default = et), (nt.optional = !0), this + } + Node$4.prototype.explicit = function (et) { + const nt = this._baseState + return assert$5(nt.explicit === null && nt.implicit === null), (nt.explicit = et), this + } + Node$4.prototype.implicit = function (et) { + const nt = this._baseState + return assert$5(nt.explicit === null && nt.implicit === null), (nt.implicit = et), this + } + Node$4.prototype.obj = function () { + const et = this._baseState, + nt = Array.prototype.slice.call(arguments) + return (et.obj = !0), nt.length !== 0 && this._useArgs(nt), this + } + Node$4.prototype.key = function (et) { + const nt = this._baseState + return assert$5(nt.key === null), (nt.key = et), this + } + Node$4.prototype.any = function () { + const et = this._baseState + return (et.any = !0), this + } + Node$4.prototype.choice = function (et) { + const nt = this._baseState + return ( + assert$5(nt.choice === null), + (nt.choice = et), + this._useArgs( + Object.keys(et).map(function (rt) { + return et[rt] + }), + ), + this + ) + } + Node$4.prototype.contains = function (et) { + const nt = this._baseState + return assert$5(nt.use === null), (nt.contains = et), this + } + Node$4.prototype._decode = function (et, nt) { + const rt = this._baseState + if (rt.parent === null) return et.wrapResult(rt.children[0]._decode(et, nt)) + let it = rt.default, + ot = !0, + at = null + if ((rt.key !== null && (at = et.enterKey(rt.key)), rt.optional)) { + let lt = null + if ( + (rt.explicit !== null + ? (lt = rt.explicit) + : rt.implicit !== null + ? (lt = rt.implicit) + : rt.tag !== null && (lt = rt.tag), + lt === null && !rt.any) + ) { + const ct = et.save() + try { + rt.choice === null ? this._decodeGeneric(rt.tag, et, nt) : this._decodeChoice(et, nt), (ot = !0) + } catch { + ot = !1 + } + et.restore(ct) + } else if (((ot = this._peekTag(et, lt, rt.any)), et.isError(ot))) return ot + } + let st + if ((rt.obj && ot && (st = et.enterObject()), ot)) { + if (rt.explicit !== null) { + const ct = this._decodeTag(et, rt.explicit) + if (et.isError(ct)) return ct + et = ct + } + const lt = et.offset + if (rt.use === null && rt.choice === null) { + let ct + rt.any && (ct = et.save()) + const ut = this._decodeTag(et, rt.implicit !== null ? rt.implicit : rt.tag, rt.any) + if (et.isError(ut)) return ut + rt.any ? (it = et.raw(ct)) : (et = ut) + } + if ( + (nt && nt.track && rt.tag !== null && nt.track(et.path(), lt, et.length, 'tagged'), + nt && nt.track && rt.tag !== null && nt.track(et.path(), et.offset, et.length, 'content'), + rt.any || (rt.choice === null ? (it = this._decodeGeneric(rt.tag, et, nt)) : (it = this._decodeChoice(et, nt))), + et.isError(it)) + ) + return it + if ( + (!rt.any && + rt.choice === null && + rt.children !== null && + rt.children.forEach(function (ut) { + ut._decode(et, nt) + }), + rt.contains && (rt.tag === 'octstr' || rt.tag === 'bitstr')) + ) { + const ct = new DecoderBuffer$1(it) + it = this._getUse(rt.contains, et._reporterState.obj)._decode(ct, nt) + } + } + return ( + rt.obj && ot && (it = et.leaveObject(st)), + rt.key !== null && (it !== null || ot === !0) ? et.leaveKey(at, rt.key, it) : at !== null && et.exitKey(at), + it + ) + } + Node$4.prototype._decodeGeneric = function (et, nt, rt) { + const it = this._baseState + return et === 'seq' || et === 'set' + ? null + : et === 'seqof' || et === 'setof' + ? this._decodeList(nt, et, it.args[0], rt) + : /str$/.test(et) + ? this._decodeStr(nt, et, rt) + : et === 'objid' && it.args + ? this._decodeObjid(nt, it.args[0], it.args[1], rt) + : et === 'objid' + ? this._decodeObjid(nt, null, null, rt) + : et === 'gentime' || et === 'utctime' + ? this._decodeTime(nt, et, rt) + : et === 'null_' + ? this._decodeNull(nt, rt) + : et === 'bool' + ? this._decodeBool(nt, rt) + : et === 'objDesc' + ? this._decodeStr(nt, et, rt) + : et === 'int' || et === 'enum' + ? this._decodeInt(nt, it.args && it.args[0], rt) + : it.use !== null + ? this._getUse(it.use, nt._reporterState.obj)._decode(nt, rt) + : nt.error('unknown tag: ' + et) + } + Node$4.prototype._getUse = function (et, nt) { + const rt = this._baseState + return ( + (rt.useDecoder = this._use(et, nt)), + assert$5(rt.useDecoder._baseState.parent === null), + (rt.useDecoder = rt.useDecoder._baseState.children[0]), + rt.implicit !== rt.useDecoder._baseState.implicit && + ((rt.useDecoder = rt.useDecoder.clone()), (rt.useDecoder._baseState.implicit = rt.implicit)), + rt.useDecoder + ) + } + Node$4.prototype._decodeChoice = function (et, nt) { + const rt = this._baseState + let it = null, + ot = !1 + return ( + Object.keys(rt.choice).some(function (at) { + const st = et.save(), + lt = rt.choice[at] + try { + const ct = lt._decode(et, nt) + if (et.isError(ct)) return !1 + ;(it = { type: at, value: ct }), (ot = !0) + } catch { + return et.restore(st), !1 + } + return !0 + }, this), + ot ? it : et.error('Choice not matched') + ) + } + Node$4.prototype._createEncoderBuffer = function (et) { + return new EncoderBuffer(et, this.reporter) + } + Node$4.prototype._encode = function (et, nt, rt) { + const it = this._baseState + if (it.default !== null && it.default === et) return + const ot = this._encodeValue(et, nt, rt) + if (ot !== void 0 && !this._skipDefault(ot, nt, rt)) return ot + } + Node$4.prototype._encodeValue = function (et, nt, rt) { + const it = this._baseState + if (it.parent === null) return it.children[0]._encode(et, nt || new Reporter()) + let ot = null + if (((this.reporter = nt), it.optional && et === void 0)) + if (it.default !== null) et = it.default + else return + let at = null, + st = !1 + if (it.any) ot = this._createEncoderBuffer(et) + else if (it.choice) ot = this._encodeChoice(et, nt) + else if (it.contains) (at = this._getUse(it.contains, rt)._encode(et, nt)), (st = !0) + else if (it.children) + (at = it.children + .map(function (lt) { + if (lt._baseState.tag === 'null_') return lt._encode(null, nt, et) + if (lt._baseState.key === null) return nt.error('Child should have a key') + const ct = nt.enterKey(lt._baseState.key) + if (typeof et != 'object') return nt.error('Child expected, but input is not object') + const ut = lt._encode(et[lt._baseState.key], nt, et) + return nt.leaveKey(ct), ut + }, this) + .filter(function (lt) { + return lt + })), + (at = this._createEncoderBuffer(at)) + else if (it.tag === 'seqof' || it.tag === 'setof') { + if (!(it.args && it.args.length === 1)) return nt.error('Too many args for : ' + it.tag) + if (!Array.isArray(et)) return nt.error('seqof/setof, but data is not Array') + const lt = this.clone() + ;(lt._baseState.implicit = null), + (at = this._createEncoderBuffer( + et.map(function (ct) { + const ut = this._baseState + return this._getUse(ut.args[0], et)._encode(ct, nt) + }, lt), + )) + } else + it.use !== null + ? (ot = this._getUse(it.use, rt)._encode(et, nt)) + : ((at = this._encodePrimitive(it.tag, et)), (st = !0)) + if (!it.any && it.choice === null) { + const lt = it.implicit !== null ? it.implicit : it.tag, + ct = it.implicit === null ? 'universal' : 'context' + lt === null + ? it.use === null && nt.error('Tag could be omitted only for .use()') + : it.use === null && (ot = this._encodeComposite(lt, st, ct, at)) + } + return it.explicit !== null && (ot = this._encodeComposite(it.explicit, !1, 'context', ot)), ot + } + Node$4.prototype._encodeChoice = function (et, nt) { + const rt = this._baseState, + it = rt.choice[et.type] + return ( + it || assert$5(!1, et.type + ' not found in ' + JSON.stringify(Object.keys(rt.choice))), it._encode(et.value, nt) + ) + } + Node$4.prototype._encodePrimitive = function (et, nt) { + const rt = this._baseState + if (/str$/.test(et)) return this._encodeStr(nt, et) + if (et === 'objid' && rt.args) return this._encodeObjid(nt, rt.reverseArgs[0], rt.args[1]) + if (et === 'objid') return this._encodeObjid(nt, null, null) + if (et === 'gentime' || et === 'utctime') return this._encodeTime(nt, et) + if (et === 'null_') return this._encodeNull() + if (et === 'int' || et === 'enum') return this._encodeInt(nt, rt.args && rt.reverseArgs[0]) + if (et === 'bool') return this._encodeBool(nt) + if (et === 'objDesc') return this._encodeStr(nt, et) + throw new Error('Unsupported tag: ' + et) + } + Node$4.prototype._isNumstr = function (et) { + return /^[0-9 ]*$/.test(et) + } + Node$4.prototype._isPrintstr = function (et) { + return /^[A-Za-z0-9 '()+,-./:=?]*$/.test(et) + } + var der$2 = {} + ;(function (tt) { + function et(nt) { + const rt = {} + return ( + Object.keys(nt).forEach(function (it) { + ;(it | 0) == it && (it = it | 0) + const ot = nt[it] + rt[ot] = it + }), + rt + ) + } + ;(tt.tagClass = { 0: 'universal', 1: 'application', 2: 'context', 3: 'private' }), + (tt.tagClassByName = et(tt.tagClass)), + (tt.tag = { + 0: 'end', + 1: 'bool', + 2: 'int', + 3: 'bitstr', + 4: 'octstr', + 5: 'null_', + 6: 'objid', + 7: 'objDesc', + 8: 'external', + 9: 'real', + 10: 'enum', + 11: 'embed', + 12: 'utf8str', + 13: 'relativeOid', + 16: 'seq', + 17: 'set', + 18: 'numstr', + 19: 'printstr', + 20: 't61str', + 21: 'videostr', + 22: 'ia5str', + 23: 'utctime', + 24: 'gentime', + 25: 'graphstr', + 26: 'iso646str', + 27: 'genstr', + 28: 'unistr', + 29: 'charstr', + 30: 'bmpstr', + }), + (tt.tagByName = et(tt.tag)) + })(der$2) + const inherits$3 = inherits_browserExports, + Buffer$b = safer_1.Buffer, + Node$3 = node$1, + der$1 = der$2 + function DEREncoder$1(tt) { + ;(this.enc = 'der'), + (this.name = tt.name), + (this.entity = tt), + (this.tree = new DERNode$1()), + this.tree._init(tt.body) + } + var der_1$1 = DEREncoder$1 + DEREncoder$1.prototype.encode = function (et, nt) { + return this.tree._encode(et, nt).join() + } + function DERNode$1(tt) { + Node$3.call(this, 'der', tt) + } + inherits$3(DERNode$1, Node$3) + DERNode$1.prototype._encodeComposite = function (et, nt, rt, it) { + const ot = encodeTag(et, nt, rt, this.reporter) + if (it.length < 128) { + const lt = Buffer$b.alloc(2) + return (lt[0] = ot), (lt[1] = it.length), this._createEncoderBuffer([lt, it]) + } + let at = 1 + for (let lt = it.length; lt >= 256; lt >>= 8) at++ + const st = Buffer$b.alloc(1 + 1 + at) + ;(st[0] = ot), (st[1] = 128 | at) + for (let lt = 1 + at, ct = it.length; ct > 0; lt--, ct >>= 8) st[lt] = ct & 255 + return this._createEncoderBuffer([st, it]) + } + DERNode$1.prototype._encodeStr = function (et, nt) { + if (nt === 'bitstr') return this._createEncoderBuffer([et.unused | 0, et.data]) + if (nt === 'bmpstr') { + const rt = Buffer$b.alloc(et.length * 2) + for (let it = 0; it < et.length; it++) rt.writeUInt16BE(et.charCodeAt(it), it * 2) + return this._createEncoderBuffer(rt) + } else + return nt === 'numstr' + ? this._isNumstr(et) + ? this._createEncoderBuffer(et) + : this.reporter.error('Encoding of string type: numstr supports only digits and space') + : nt === 'printstr' + ? this._isPrintstr(et) + ? this._createEncoderBuffer(et) + : this.reporter.error( + 'Encoding of string type: printstr supports only latin upper and lower case letters, digits, space, apostrophe, left and rigth parenthesis, plus sign, comma, hyphen, dot, slash, colon, equal sign, question mark', + ) + : /str$/.test(nt) + ? this._createEncoderBuffer(et) + : nt === 'objDesc' + ? this._createEncoderBuffer(et) + : this.reporter.error('Encoding of string type: ' + nt + ' unsupported') + } + DERNode$1.prototype._encodeObjid = function (et, nt, rt) { + if (typeof et == 'string') { + if (!nt) return this.reporter.error('string objid given, but no values map found') + if (!nt.hasOwnProperty(et)) return this.reporter.error('objid not found in values map') + et = nt[et].split(/[\s.]+/g) + for (let st = 0; st < et.length; st++) et[st] |= 0 + } else if (Array.isArray(et)) { + et = et.slice() + for (let st = 0; st < et.length; st++) et[st] |= 0 + } + if (!Array.isArray(et)) + return this.reporter.error('objid() should be either array or string, got: ' + JSON.stringify(et)) + if (!rt) { + if (et[1] >= 40) return this.reporter.error('Second objid identifier OOB') + et.splice(0, 2, et[0] * 40 + et[1]) + } + let it = 0 + for (let st = 0; st < et.length; st++) { + let lt = et[st] + for (it++; lt >= 128; lt >>= 7) it++ + } + const ot = Buffer$b.alloc(it) + let at = ot.length - 1 + for (let st = et.length - 1; st >= 0; st--) { + let lt = et[st] + for (ot[at--] = lt & 127; (lt >>= 7) > 0; ) ot[at--] = 128 | (lt & 127) + } + return this._createEncoderBuffer(ot) + } + function two(tt) { + return tt < 10 ? '0' + tt : tt + } + DERNode$1.prototype._encodeTime = function (et, nt) { + let rt + const it = new Date(et) + return ( + nt === 'gentime' + ? (rt = [ + two(it.getUTCFullYear()), + two(it.getUTCMonth() + 1), + two(it.getUTCDate()), + two(it.getUTCHours()), + two(it.getUTCMinutes()), + two(it.getUTCSeconds()), + 'Z', + ].join('')) + : nt === 'utctime' + ? (rt = [ + two(it.getUTCFullYear() % 100), + two(it.getUTCMonth() + 1), + two(it.getUTCDate()), + two(it.getUTCHours()), + two(it.getUTCMinutes()), + two(it.getUTCSeconds()), + 'Z', + ].join('')) + : this.reporter.error('Encoding ' + nt + ' time is not supported yet'), + this._encodeStr(rt, 'octstr') + ) + } + DERNode$1.prototype._encodeNull = function () { + return this._createEncoderBuffer('') + } + DERNode$1.prototype._encodeInt = function (et, nt) { + if (typeof et == 'string') { + if (!nt) return this.reporter.error('String int or enum given, but no values map') + if (!nt.hasOwnProperty(et)) return this.reporter.error("Values map doesn't contain: " + JSON.stringify(et)) + et = nt[et] + } + if (typeof et != 'number' && !Buffer$b.isBuffer(et)) { + const ot = et.toArray() + !et.sign && ot[0] & 128 && ot.unshift(0), (et = Buffer$b.from(ot)) + } + if (Buffer$b.isBuffer(et)) { + let ot = et.length + et.length === 0 && ot++ + const at = Buffer$b.alloc(ot) + return et.copy(at), et.length === 0 && (at[0] = 0), this._createEncoderBuffer(at) + } + if (et < 128) return this._createEncoderBuffer(et) + if (et < 256) return this._createEncoderBuffer([0, et]) + let rt = 1 + for (let ot = et; ot >= 256; ot >>= 8) rt++ + const it = new Array(rt) + for (let ot = it.length - 1; ot >= 0; ot--) (it[ot] = et & 255), (et >>= 8) + return it[0] & 128 && it.unshift(0), this._createEncoderBuffer(Buffer$b.from(it)) + } + DERNode$1.prototype._encodeBool = function (et) { + return this._createEncoderBuffer(et ? 255 : 0) + } + DERNode$1.prototype._use = function (et, nt) { + return typeof et == 'function' && (et = et(nt)), et._getEncoder('der').tree + } + DERNode$1.prototype._skipDefault = function (et, nt, rt) { + const it = this._baseState + let ot + if (it.default === null) return !1 + const at = et.join() + if ( + (it.defaultBuffer === void 0 && (it.defaultBuffer = this._encodeValue(it.default, nt, rt).join()), + at.length !== it.defaultBuffer.length) + ) + return !1 + for (ot = 0; ot < at.length; ot++) if (at[ot] !== it.defaultBuffer[ot]) return !1 + return !0 + } + function encodeTag(tt, et, nt, rt) { + let it + if ((tt === 'seqof' ? (tt = 'seq') : tt === 'setof' && (tt = 'set'), der$1.tagByName.hasOwnProperty(tt))) + it = der$1.tagByName[tt] + else if (typeof tt == 'number' && (tt | 0) === tt) it = tt + else return rt.error('Unknown tag: ' + tt) + return it >= 31 + ? rt.error('Multi-octet tag encoding unsupported') + : (et || (it |= 32), (it |= der$1.tagClassByName[nt || 'universal'] << 6), it) + } + const inherits$2 = inherits_browserExports, + DEREncoder = der_1$1 + function PEMEncoder(tt) { + DEREncoder.call(this, tt), (this.enc = 'pem') + } + inherits$2(PEMEncoder, DEREncoder) + var pem$1 = PEMEncoder + PEMEncoder.prototype.encode = function (et, nt) { + const it = DEREncoder.prototype.encode.call(this, et).toString('base64'), + ot = ['-----BEGIN ' + nt.label + '-----'] + for (let at = 0; at < it.length; at += 64) ot.push(it.slice(at, at + 64)) + return ( + ot.push('-----END ' + nt.label + '-----'), + ot.join(` +`) + ) + } + ;(function (tt) { + const et = tt + ;(et.der = der_1$1), (et.pem = pem$1) + })(encoders) + var decoders = {} + const inherits$1 = inherits_browserExports, + bignum = bnExports$2, + DecoderBuffer = buffer.DecoderBuffer, + Node$2 = node$1, + der = der$2 + function DERDecoder$1(tt) { + ;(this.enc = 'der'), + (this.name = tt.name), + (this.entity = tt), + (this.tree = new DERNode()), + this.tree._init(tt.body) + } + var der_1 = DERDecoder$1 + DERDecoder$1.prototype.decode = function (et, nt) { + return DecoderBuffer.isDecoderBuffer(et) || (et = new DecoderBuffer(et, nt)), this.tree._decode(et, nt) + } + function DERNode(tt) { + Node$2.call(this, 'der', tt) + } + inherits$1(DERNode, Node$2) + DERNode.prototype._peekTag = function (et, nt, rt) { + if (et.isEmpty()) return !1 + const it = et.save(), + ot = derDecodeTag(et, 'Failed to peek tag: "' + nt + '"') + return et.isError(ot) ? ot : (et.restore(it), ot.tag === nt || ot.tagStr === nt || ot.tagStr + 'of' === nt || rt) + } + DERNode.prototype._decodeTag = function (et, nt, rt) { + const it = derDecodeTag(et, 'Failed to decode tag of "' + nt + '"') + if (et.isError(it)) return it + let ot = derDecodeLen(et, it.primitive, 'Failed to get length of "' + nt + '"') + if (et.isError(ot)) return ot + if (!rt && it.tag !== nt && it.tagStr !== nt && it.tagStr + 'of' !== nt) + return et.error('Failed to match tag: "' + nt + '"') + if (it.primitive || ot !== null) return et.skip(ot, 'Failed to match body of: "' + nt + '"') + const at = et.save(), + st = this._skipUntilEnd(et, 'Failed to skip indefinite length body: "' + this.tag + '"') + return et.isError(st) + ? st + : ((ot = et.offset - at.offset), et.restore(at), et.skip(ot, 'Failed to match body of: "' + nt + '"')) + } + DERNode.prototype._skipUntilEnd = function (et, nt) { + for (;;) { + const rt = derDecodeTag(et, nt) + if (et.isError(rt)) return rt + const it = derDecodeLen(et, rt.primitive, nt) + if (et.isError(it)) return it + let ot + if ((rt.primitive || it !== null ? (ot = et.skip(it)) : (ot = this._skipUntilEnd(et, nt)), et.isError(ot))) + return ot + if (rt.tagStr === 'end') break + } + } + DERNode.prototype._decodeList = function (et, nt, rt, it) { + const ot = [] + for (; !et.isEmpty(); ) { + const at = this._peekTag(et, 'end') + if (et.isError(at)) return at + const st = rt.decode(et, 'der', it) + if (et.isError(st) && at) break + ot.push(st) + } + return ot + } + DERNode.prototype._decodeStr = function (et, nt) { + if (nt === 'bitstr') { + const rt = et.readUInt8() + return et.isError(rt) ? rt : { unused: rt, data: et.raw() } + } else if (nt === 'bmpstr') { + const rt = et.raw() + if (rt.length % 2 === 1) return et.error('Decoding of string type: bmpstr length mismatch') + let it = '' + for (let ot = 0; ot < rt.length / 2; ot++) it += String.fromCharCode(rt.readUInt16BE(ot * 2)) + return it + } else if (nt === 'numstr') { + const rt = et.raw().toString('ascii') + return this._isNumstr(rt) ? rt : et.error('Decoding of string type: numstr unsupported characters') + } else { + if (nt === 'octstr') return et.raw() + if (nt === 'objDesc') return et.raw() + if (nt === 'printstr') { + const rt = et.raw().toString('ascii') + return this._isPrintstr(rt) ? rt : et.error('Decoding of string type: printstr unsupported characters') + } else return /str$/.test(nt) ? et.raw().toString() : et.error('Decoding of string type: ' + nt + ' unsupported') + } + } + DERNode.prototype._decodeObjid = function (et, nt, rt) { + let it + const ot = [] + let at = 0, + st = 0 + for (; !et.isEmpty(); ) (st = et.readUInt8()), (at <<= 7), (at |= st & 127), st & 128 || (ot.push(at), (at = 0)) + st & 128 && ot.push(at) + const lt = (ot[0] / 40) | 0, + ct = ot[0] % 40 + if ((rt ? (it = ot) : (it = [lt, ct].concat(ot.slice(1))), nt)) { + let ut = nt[it.join(' ')] + ut === void 0 && (ut = nt[it.join('.')]), ut !== void 0 && (it = ut) + } + return it + } + DERNode.prototype._decodeTime = function (et, nt) { + const rt = et.raw().toString() + let it, ot, at, st, lt, ct + if (nt === 'gentime') + (it = rt.slice(0, 4) | 0), + (ot = rt.slice(4, 6) | 0), + (at = rt.slice(6, 8) | 0), + (st = rt.slice(8, 10) | 0), + (lt = rt.slice(10, 12) | 0), + (ct = rt.slice(12, 14) | 0) + else if (nt === 'utctime') + (it = rt.slice(0, 2) | 0), + (ot = rt.slice(2, 4) | 0), + (at = rt.slice(4, 6) | 0), + (st = rt.slice(6, 8) | 0), + (lt = rt.slice(8, 10) | 0), + (ct = rt.slice(10, 12) | 0), + it < 70 ? (it = 2e3 + it) : (it = 1900 + it) + else return et.error('Decoding ' + nt + ' time is not supported yet') + return Date.UTC(it, ot - 1, at, st, lt, ct, 0) + } + DERNode.prototype._decodeNull = function () { + return null + } + DERNode.prototype._decodeBool = function (et) { + const nt = et.readUInt8() + return et.isError(nt) ? nt : nt !== 0 + } + DERNode.prototype._decodeInt = function (et, nt) { + const rt = et.raw() + let it = new bignum(rt) + return nt && (it = nt[it.toString(10)] || it), it + } + DERNode.prototype._use = function (et, nt) { + return typeof et == 'function' && (et = et(nt)), et._getDecoder('der').tree + } + function derDecodeTag(tt, et) { + let nt = tt.readUInt8(et) + if (tt.isError(nt)) return nt + const rt = der.tagClass[nt >> 6], + it = (nt & 32) === 0 + if ((nt & 31) === 31) { + let at = nt + for (nt = 0; (at & 128) === 128; ) { + if (((at = tt.readUInt8(et)), tt.isError(at))) return at + ;(nt <<= 7), (nt |= at & 127) + } + } else nt &= 31 + const ot = der.tag[nt] + return { cls: rt, primitive: it, tag: nt, tagStr: ot } + } + function derDecodeLen(tt, et, nt) { + let rt = tt.readUInt8(nt) + if (tt.isError(rt)) return rt + if (!et && rt === 128) return null + if (!(rt & 128)) return rt + const it = rt & 127 + if (it > 4) return tt.error('length octect is too long') + rt = 0 + for (let ot = 0; ot < it; ot++) { + rt <<= 8 + const at = tt.readUInt8(nt) + if (tt.isError(at)) return at + rt |= at + } + return rt + } + const inherits = inherits_browserExports, + Buffer$a = safer_1.Buffer, + DERDecoder = der_1 + function PEMDecoder(tt) { + DERDecoder.call(this, tt), (this.enc = 'pem') + } + inherits(PEMDecoder, DERDecoder) + var pem = PEMDecoder + PEMDecoder.prototype.decode = function (et, nt) { + const rt = et.toString().split(/[\r\n]+/g), + it = nt.label.toUpperCase(), + ot = /^-----(BEGIN|END) ([^-]+)-----$/ + let at = -1, + st = -1 + for (let ut = 0; ut < rt.length; ut++) { + const ht = rt[ut].match(ot) + if (ht !== null && ht[2] === it) + if (at === -1) { + if (ht[1] !== 'BEGIN') break + at = ut + } else { + if (ht[1] !== 'END') break + st = ut + break + } + } + if (at === -1 || st === -1) throw new Error('PEM section not found for: ' + it) + const lt = rt.slice(at + 1, st).join('') + lt.replace(/[^a-z0-9+/=]+/gi, '') + const ct = Buffer$a.from(lt, 'base64') + return DERDecoder.prototype.decode.call(this, ct, nt) + } + ;(function (tt) { + const et = tt + ;(et.der = der_1), (et.pem = pem) + })(decoders) + ;(function (tt) { + const et = encoders, + nt = decoders, + rt = inherits_browserExports, + it = tt + it.define = function (st, lt) { + return new ot(st, lt) + } + function ot(at, st) { + ;(this.name = at), (this.body = st), (this.decoders = {}), (this.encoders = {}) + } + ;(ot.prototype._createNamed = function (st) { + const lt = this.name + function ct(ut) { + this._initNamed(ut, lt) + } + return ( + rt(ct, st), + (ct.prototype._initNamed = function (ht, dt) { + st.call(this, ht, dt) + }), + new ct(this) + ) + }), + (ot.prototype._getDecoder = function (st) { + return ( + (st = st || 'der'), + this.decoders.hasOwnProperty(st) || (this.decoders[st] = this._createNamed(nt[st])), + this.decoders[st] + ) + }), + (ot.prototype.decode = function (st, lt, ct) { + return this._getDecoder(lt).decode(st, ct) + }), + (ot.prototype._getEncoder = function (st) { + return ( + (st = st || 'der'), + this.encoders.hasOwnProperty(st) || (this.encoders[st] = this._createNamed(et[st])), + this.encoders[st] + ) + }), + (ot.prototype.encode = function (st, lt, ct) { + return this._getEncoder(lt).encode(st, ct) + }) + })(api$1) + var base$2 = {} + ;(function (tt) { + const et = tt + ;(et.Reporter = reporter.Reporter), + (et.DecoderBuffer = buffer.DecoderBuffer), + (et.EncoderBuffer = buffer.EncoderBuffer), + (et.Node = node$1) + })(base$2) + var constants$3 = {} + ;(function (tt) { + const et = tt + ;(et._reverse = function (rt) { + const it = {} + return ( + Object.keys(rt).forEach(function (ot) { + ;(ot | 0) == ot && (ot = ot | 0) + const at = rt[ot] + it[at] = ot + }), + it + ) + }), + (et.der = der$2) + })(constants$3) + ;(function (tt) { + const et = tt + ;(et.bignum = bnExports$2), + (et.define = api$1.define), + (et.base = base$2), + (et.constants = constants$3), + (et.decoders = decoders), + (et.encoders = encoders) + })(asn1$2) + var asn = asn1$2, + Time = asn.define('Time', function () { + this.choice({ utcTime: this.utctime(), generalTime: this.gentime() }) + }), + AttributeTypeValue = asn.define('AttributeTypeValue', function () { + this.seq().obj(this.key('type').objid(), this.key('value').any()) + }), + AlgorithmIdentifier$1 = asn.define('AlgorithmIdentifier', function () { + this.seq().obj( + this.key('algorithm').objid(), + this.key('parameters').optional(), + this.key('curve').objid().optional(), + ) + }), + SubjectPublicKeyInfo = asn.define('SubjectPublicKeyInfo', function () { + this.seq().obj(this.key('algorithm').use(AlgorithmIdentifier$1), this.key('subjectPublicKey').bitstr()) + }), + RelativeDistinguishedName = asn.define('RelativeDistinguishedName', function () { + this.setof(AttributeTypeValue) + }), + RDNSequence = asn.define('RDNSequence', function () { + this.seqof(RelativeDistinguishedName) + }), + Name$2 = asn.define('Name', function () { + this.choice({ rdnSequence: this.use(RDNSequence) }) + }), + Validity = asn.define('Validity', function () { + this.seq().obj(this.key('notBefore').use(Time), this.key('notAfter').use(Time)) + }), + Extension = asn.define('Extension', function () { + this.seq().obj(this.key('extnID').objid(), this.key('critical').bool().def(!1), this.key('extnValue').octstr()) + }), + TBSCertificate = asn.define('TBSCertificate', function () { + this.seq().obj( + this.key('version').explicit(0).int().optional(), + this.key('serialNumber').int(), + this.key('signature').use(AlgorithmIdentifier$1), + this.key('issuer').use(Name$2), + this.key('validity').use(Validity), + this.key('subject').use(Name$2), + this.key('subjectPublicKeyInfo').use(SubjectPublicKeyInfo), + this.key('issuerUniqueID').implicit(1).bitstr().optional(), + this.key('subjectUniqueID').implicit(2).bitstr().optional(), + this.key('extensions').explicit(3).seqof(Extension).optional(), + ) + }), + X509Certificate = asn.define('X509Certificate', function () { + this.seq().obj( + this.key('tbsCertificate').use(TBSCertificate), + this.key('signatureAlgorithm').use(AlgorithmIdentifier$1), + this.key('signatureValue').bitstr(), + ) + }), + certificate = X509Certificate, + asn1$1 = asn1$2 + asn1$3.certificate = certificate + var RSAPrivateKey = asn1$1.define('RSAPrivateKey', function () { + this.seq().obj( + this.key('version').int(), + this.key('modulus').int(), + this.key('publicExponent').int(), + this.key('privateExponent').int(), + this.key('prime1').int(), + this.key('prime2').int(), + this.key('exponent1').int(), + this.key('exponent2').int(), + this.key('coefficient').int(), + ) + }) + asn1$3.RSAPrivateKey = RSAPrivateKey + var RSAPublicKey = asn1$1.define('RSAPublicKey', function () { + this.seq().obj(this.key('modulus').int(), this.key('publicExponent').int()) + }) + asn1$3.RSAPublicKey = RSAPublicKey + var PublicKey = asn1$1.define('SubjectPublicKeyInfo', function () { + this.seq().obj(this.key('algorithm').use(AlgorithmIdentifier), this.key('subjectPublicKey').bitstr()) + }) + asn1$3.PublicKey = PublicKey + var AlgorithmIdentifier = asn1$1.define('AlgorithmIdentifier', function () { + this.seq().obj( + this.key('algorithm').objid(), + this.key('none').null_().optional(), + this.key('curve').objid().optional(), + this.key('params').seq().obj(this.key('p').int(), this.key('q').int(), this.key('g').int()).optional(), + ) + }), + PrivateKeyInfo = asn1$1.define('PrivateKeyInfo', function () { + this.seq().obj( + this.key('version').int(), + this.key('algorithm').use(AlgorithmIdentifier), + this.key('subjectPrivateKey').octstr(), + ) + }) + asn1$3.PrivateKey = PrivateKeyInfo + var EncryptedPrivateKeyInfo = asn1$1.define('EncryptedPrivateKeyInfo', function () { + this.seq().obj( + this.key('algorithm') + .seq() + .obj( + this.key('id').objid(), + this.key('decrypt') + .seq() + .obj( + this.key('kde') + .seq() + .obj( + this.key('id').objid(), + this.key('kdeparams').seq().obj(this.key('salt').octstr(), this.key('iters').int()), + ), + this.key('cipher').seq().obj(this.key('algo').objid(), this.key('iv').octstr()), + ), + ), + this.key('subjectPrivateKey').octstr(), + ) + }) + asn1$3.EncryptedPrivateKey = EncryptedPrivateKeyInfo + var DSAPrivateKey = asn1$1.define('DSAPrivateKey', function () { + this.seq().obj( + this.key('version').int(), + this.key('p').int(), + this.key('q').int(), + this.key('g').int(), + this.key('pub_key').int(), + this.key('priv_key').int(), + ) + }) + asn1$3.DSAPrivateKey = DSAPrivateKey + asn1$3.DSAparam = asn1$1.define('DSAparam', function () { + this.int() + }) + var ECPrivateKey = asn1$1.define('ECPrivateKey', function () { + this.seq().obj( + this.key('version').int(), + this.key('privateKey').octstr(), + this.key('parameters').optional().explicit(0).use(ECParameters), + this.key('publicKey').optional().explicit(1).bitstr(), + ) + }) + asn1$3.ECPrivateKey = ECPrivateKey + var ECParameters = asn1$1.define('ECParameters', function () { + this.choice({ namedCurve: this.objid() }) + }) + asn1$3.signature = asn1$1.define('signature', function () { + this.seq().obj(this.key('r').int(), this.key('s').int()) + }) + const require$$1 = { + '2.16.840.1.101.3.4.1.1': 'aes-128-ecb', + '2.16.840.1.101.3.4.1.2': 'aes-128-cbc', + '2.16.840.1.101.3.4.1.3': 'aes-128-ofb', + '2.16.840.1.101.3.4.1.4': 'aes-128-cfb', + '2.16.840.1.101.3.4.1.21': 'aes-192-ecb', + '2.16.840.1.101.3.4.1.22': 'aes-192-cbc', + '2.16.840.1.101.3.4.1.23': 'aes-192-ofb', + '2.16.840.1.101.3.4.1.24': 'aes-192-cfb', + '2.16.840.1.101.3.4.1.41': 'aes-256-ecb', + '2.16.840.1.101.3.4.1.42': 'aes-256-cbc', + '2.16.840.1.101.3.4.1.43': 'aes-256-ofb', + '2.16.840.1.101.3.4.1.44': 'aes-256-cfb', + } + var findProc = + /Proc-Type: 4,ENCRYPTED[\n\r]+DEK-Info: AES-((?:128)|(?:192)|(?:256))-CBC,([0-9A-H]+)[\n\r]+([0-9A-z\n\r+/=]+)[\n\r]+/m, + startRegex = /^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----/m, + fullRegex = /^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----([0-9A-z\n\r+/=]+)-----END \1-----$/m, + evp = evp_bytestokey, + ciphers$1 = browser$6, + Buffer$9 = safeBufferExports.Buffer, + fixProc$1 = function (tt, et) { + var nt = tt.toString(), + rt = nt.match(findProc), + it + if (rt) { + var at = 'aes' + rt[1], + st = Buffer$9.from(rt[2], 'hex'), + lt = Buffer$9.from(rt[3].replace(/[\r\n]/g, ''), 'base64'), + ct = evp(et, st.slice(0, 8), parseInt(rt[1], 10)).key, + ut = [], + ht = ciphers$1.createDecipheriv(at, ct, st) + ut.push(ht.update(lt)), ut.push(ht.final()), (it = Buffer$9.concat(ut)) + } else { + var ot = nt.match(fullRegex) + it = Buffer$9.from(ot[2].replace(/[\r\n]/g, ''), 'base64') + } + var dt = nt.match(startRegex)[1] + return { tag: dt, data: it } + }, + asn1 = asn1$3, + aesid = require$$1, + fixProc = fixProc$1, + ciphers = browser$6, + compat = browser$8, + Buffer$8 = safeBufferExports.Buffer, + parseAsn1 = parseKeys$2 + function parseKeys$2(tt) { + var et + typeof tt == 'object' && !Buffer$8.isBuffer(tt) && ((et = tt.passphrase), (tt = tt.key)), + typeof tt == 'string' && (tt = Buffer$8.from(tt)) + var nt = fixProc(tt, et), + rt = nt.tag, + it = nt.data, + ot, + at + switch (rt) { + case 'CERTIFICATE': + at = asn1.certificate.decode(it, 'der').tbsCertificate.subjectPublicKeyInfo + case 'PUBLIC KEY': + switch ((at || (at = asn1.PublicKey.decode(it, 'der')), (ot = at.algorithm.algorithm.join('.')), ot)) { + case '1.2.840.113549.1.1.1': + return asn1.RSAPublicKey.decode(at.subjectPublicKey.data, 'der') + case '1.2.840.10045.2.1': + return (at.subjectPrivateKey = at.subjectPublicKey), { type: 'ec', data: at } + case '1.2.840.10040.4.1': + return ( + (at.algorithm.params.pub_key = asn1.DSAparam.decode(at.subjectPublicKey.data, 'der')), + { type: 'dsa', data: at.algorithm.params } + ) + default: + throw new Error('unknown key id ' + ot) + } + case 'ENCRYPTED PRIVATE KEY': + ;(it = asn1.EncryptedPrivateKey.decode(it, 'der')), (it = decrypt(it, et)) + case 'PRIVATE KEY': + switch (((at = asn1.PrivateKey.decode(it, 'der')), (ot = at.algorithm.algorithm.join('.')), ot)) { + case '1.2.840.113549.1.1.1': + return asn1.RSAPrivateKey.decode(at.subjectPrivateKey, 'der') + case '1.2.840.10045.2.1': + return { + curve: at.algorithm.curve, + privateKey: asn1.ECPrivateKey.decode(at.subjectPrivateKey, 'der').privateKey, + } + case '1.2.840.10040.4.1': + return ( + (at.algorithm.params.priv_key = asn1.DSAparam.decode(at.subjectPrivateKey, 'der')), + { type: 'dsa', params: at.algorithm.params } + ) + default: + throw new Error('unknown key id ' + ot) + } + case 'RSA PUBLIC KEY': + return asn1.RSAPublicKey.decode(it, 'der') + case 'RSA PRIVATE KEY': + return asn1.RSAPrivateKey.decode(it, 'der') + case 'DSA PRIVATE KEY': + return { type: 'dsa', params: asn1.DSAPrivateKey.decode(it, 'der') } + case 'EC PRIVATE KEY': + return (it = asn1.ECPrivateKey.decode(it, 'der')), { curve: it.parameters.value, privateKey: it.privateKey } + default: + throw new Error('unknown key type ' + rt) + } + } + parseKeys$2.signature = asn1.signature + function decrypt(tt, et) { + var nt = tt.algorithm.decrypt.kde.kdeparams.salt, + rt = parseInt(tt.algorithm.decrypt.kde.kdeparams.iters.toString(), 10), + it = aesid[tt.algorithm.decrypt.cipher.algo.join('.')], + ot = tt.algorithm.decrypt.cipher.iv, + at = tt.subjectPrivateKey, + st = parseInt(it.split('-')[1], 10) / 8, + lt = compat.pbkdf2Sync(et, nt, rt, st, 'sha1'), + ct = ciphers.createDecipheriv(it, lt, ot), + ut = [] + return ut.push(ct.update(at)), ut.push(ct.final()), Buffer$8.concat(ut) + } + const require$$4 = { + '1.3.132.0.10': 'secp256k1', + '1.3.132.0.33': 'p224', + '1.2.840.10045.3.1.1': 'p192', + '1.2.840.10045.3.1.7': 'p256', + '1.3.132.0.34': 'p384', + '1.3.132.0.35': 'p521', + } + var hasRequiredSign + function requireSign() { + if (hasRequiredSign) return sign$4.exports + hasRequiredSign = 1 + var tt = safeBufferExports.Buffer, + et = browser$9, + nt = browserifyRsa, + rt = requireElliptic().ec, + it = bnExports, + ot = parseAsn1, + at = require$$4 + function st(yt, bt, vt, xt, kt) { + var St = ot(bt) + if (St.curve) { + if (xt !== 'ecdsa' && xt !== 'ecdsa/rsa') throw new Error('wrong private key type') + return lt(yt, St) + } else if (St.type === 'dsa') { + if (xt !== 'dsa') throw new Error('wrong private key type') + return ct(yt, St, vt) + } else if (xt !== 'rsa' && xt !== 'ecdsa/rsa') throw new Error('wrong private key type') + yt = tt.concat([kt, yt]) + for (var Tt = St.modulus.byteLength(), At = [0, 1]; yt.length + At.length + 1 < Tt; ) At.push(255) + At.push(0) + for (var Et = -1; ++Et < yt.length; ) At.push(yt[Et]) + var $t = nt(At, St) + return $t + } + function lt(yt, bt) { + var vt = at[bt.curve.join('.')] + if (!vt) throw new Error('unknown curve ' + bt.curve.join('.')) + var xt = new rt(vt), + kt = xt.keyFromPrivate(bt.privateKey), + St = kt.sign(yt) + return tt.from(St.toDER()) + } + function ct(yt, bt, vt) { + for ( + var xt = bt.params.priv_key, + kt = bt.params.p, + St = bt.params.q, + Tt = bt.params.g, + At = new it(0), + Et, + $t = dt(yt, St).mod(St), + Dt = !1, + jt = ht(xt, St, yt, vt); + Dt === !1; + + ) + (Et = mt(St, jt, vt)), + (At = gt(Tt, Et, kt, St)), + (Dt = Et.invm(St) + .imul($t.add(xt.mul(At))) + .mod(St)), + Dt.cmpn(0) === 0 && ((Dt = !1), (At = new it(0))) + return ut(At, Dt) + } + function ut(yt, bt) { + ;(yt = yt.toArray()), + (bt = bt.toArray()), + yt[0] & 128 && (yt = [0].concat(yt)), + bt[0] & 128 && (bt = [0].concat(bt)) + var vt = yt.length + bt.length + 4, + xt = [48, vt, 2, yt.length] + return (xt = xt.concat(yt, [2, bt.length], bt)), tt.from(xt) + } + function ht(yt, bt, vt, xt) { + if (((yt = tt.from(yt.toArray())), yt.length < bt.byteLength())) { + var kt = tt.alloc(bt.byteLength() - yt.length) + yt = tt.concat([kt, yt]) + } + var St = vt.length, + Tt = pt(vt, bt), + At = tt.alloc(St) + At.fill(1) + var Et = tt.alloc(St) + return ( + (Et = et(xt, Et) + .update(At) + .update(tt.from([0])) + .update(yt) + .update(Tt) + .digest()), + (At = et(xt, Et).update(At).digest()), + (Et = et(xt, Et) + .update(At) + .update(tt.from([1])) + .update(yt) + .update(Tt) + .digest()), + (At = et(xt, Et).update(At).digest()), + { k: Et, v: At } + ) + } + function dt(yt, bt) { + var vt = new it(yt), + xt = (yt.length << 3) - bt.bitLength() + return xt > 0 && vt.ishrn(xt), vt + } + function pt(yt, bt) { + ;(yt = dt(yt, bt)), (yt = yt.mod(bt)) + var vt = tt.from(yt.toArray()) + if (vt.length < bt.byteLength()) { + var xt = tt.alloc(bt.byteLength() - vt.length) + vt = tt.concat([xt, vt]) + } + return vt + } + function mt(yt, bt, vt) { + var xt, kt + do { + for (xt = tt.alloc(0); xt.length * 8 < yt.bitLength(); ) + (bt.v = et(vt, bt.k).update(bt.v).digest()), (xt = tt.concat([xt, bt.v])) + ;(kt = dt(xt, yt)), + (bt.k = et(vt, bt.k) + .update(bt.v) + .update(tt.from([0])) + .digest()), + (bt.v = et(vt, bt.k).update(bt.v).digest()) + } while (kt.cmp(yt) !== -1) + return kt + } + function gt(yt, bt, vt, xt) { + return yt.toRed(it.mont(vt)).redPow(bt).fromRed().mod(xt) + } + return (sign$4.exports = st), (sign$4.exports.getKey = ht), (sign$4.exports.makeKey = mt), sign$4.exports + } + var verify_1, hasRequiredVerify + function requireVerify() { + if (hasRequiredVerify) return verify_1 + hasRequiredVerify = 1 + var tt = safeBufferExports.Buffer, + et = bnExports, + nt = requireElliptic().ec, + rt = parseAsn1, + it = require$$4 + function ot(ct, ut, ht, dt, pt) { + var mt = rt(ht) + if (mt.type === 'ec') { + if (dt !== 'ecdsa' && dt !== 'ecdsa/rsa') throw new Error('wrong public key type') + return at(ct, ut, mt) + } else if (mt.type === 'dsa') { + if (dt !== 'dsa') throw new Error('wrong public key type') + return st(ct, ut, mt) + } else if (dt !== 'rsa' && dt !== 'ecdsa/rsa') throw new Error('wrong public key type') + ut = tt.concat([pt, ut]) + for (var gt = mt.modulus.byteLength(), yt = [1], bt = 0; ut.length + yt.length + 2 < gt; ) yt.push(255), bt++ + yt.push(0) + for (var vt = -1; ++vt < ut.length; ) yt.push(ut[vt]) + yt = tt.from(yt) + var xt = et.mont(mt.modulus) + ;(ct = new et(ct).toRed(xt)), (ct = ct.redPow(new et(mt.publicExponent))), (ct = tt.from(ct.fromRed().toArray())) + var kt = bt < 8 ? 1 : 0 + for (gt = Math.min(ct.length, yt.length), ct.length !== yt.length && (kt = 1), vt = -1; ++vt < gt; ) + kt |= ct[vt] ^ yt[vt] + return kt === 0 + } + function at(ct, ut, ht) { + var dt = it[ht.data.algorithm.curve.join('.')] + if (!dt) throw new Error('unknown curve ' + ht.data.algorithm.curve.join('.')) + var pt = new nt(dt), + mt = ht.data.subjectPrivateKey.data + return pt.verify(ut, ct, mt) + } + function st(ct, ut, ht) { + var dt = ht.data.p, + pt = ht.data.q, + mt = ht.data.g, + gt = ht.data.pub_key, + yt = rt.signature.decode(ct, 'der'), + bt = yt.s, + vt = yt.r + lt(bt, pt), lt(vt, pt) + var xt = et.mont(dt), + kt = bt.invm(pt), + St = mt + .toRed(xt) + .redPow(new et(ut).mul(kt).mod(pt)) + .fromRed() + .mul(gt.toRed(xt).redPow(vt.mul(kt).mod(pt)).fromRed()) + .mod(dt) + .mod(pt) + return St.cmp(vt) === 0 + } + function lt(ct, ut) { + if (ct.cmpn(0) <= 0) throw new Error('invalid sig') + if (ct.cmp(ut) >= ut) throw new Error('invalid sig') + } + return (verify_1 = ot), verify_1 + } + var browser$4, hasRequiredBrowser$1 + function requireBrowser$1() { + if (hasRequiredBrowser$1) return browser$4 + hasRequiredBrowser$1 = 1 + var tt = safeBufferExports.Buffer, + et = browser$a, + nt = readableBrowserExports, + rt = inherits_browserExports, + it = requireSign(), + ot = requireVerify(), + at = require$$6 + Object.keys(at).forEach(function (ht) { + ;(at[ht].id = tt.from(at[ht].id, 'hex')), (at[ht.toLowerCase()] = at[ht]) + }) + function st(ht) { + nt.Writable.call(this) + var dt = at[ht] + if (!dt) throw new Error('Unknown message digest') + ;(this._hashType = dt.hash), (this._hash = et(dt.hash)), (this._tag = dt.id), (this._signType = dt.sign) + } + rt(st, nt.Writable), + (st.prototype._write = function (dt, pt, mt) { + this._hash.update(dt), mt() + }), + (st.prototype.update = function (dt, pt) { + return typeof dt == 'string' && (dt = tt.from(dt, pt)), this._hash.update(dt), this + }), + (st.prototype.sign = function (dt, pt) { + this.end() + var mt = this._hash.digest(), + gt = it(mt, dt, this._hashType, this._signType, this._tag) + return pt ? gt.toString(pt) : gt + }) + function lt(ht) { + nt.Writable.call(this) + var dt = at[ht] + if (!dt) throw new Error('Unknown message digest') + ;(this._hash = et(dt.hash)), (this._tag = dt.id), (this._signType = dt.sign) + } + rt(lt, nt.Writable), + (lt.prototype._write = function (dt, pt, mt) { + this._hash.update(dt), mt() + }), + (lt.prototype.update = function (dt, pt) { + return typeof dt == 'string' && (dt = tt.from(dt, pt)), this._hash.update(dt), this + }), + (lt.prototype.verify = function (dt, pt, mt) { + typeof pt == 'string' && (pt = tt.from(pt, mt)), this.end() + var gt = this._hash.digest() + return ot(pt, gt, dt, this._signType, this._tag) + }) + function ct(ht) { + return new st(ht) + } + function ut(ht) { + return new lt(ht) + } + return (browser$4 = { Sign: ct, Verify: ut, createSign: ct, createVerify: ut }), browser$4 + } + var browser$3, hasRequiredBrowser + function requireBrowser() { + if (hasRequiredBrowser) return browser$3 + hasRequiredBrowser = 1 + var tt = requireElliptic(), + et = bnExports$2 + browser$3 = function (at) { + return new rt(at) + } + var nt = { + secp256k1: { name: 'secp256k1', byteLength: 32 }, + secp224r1: { name: 'p224', byteLength: 28 }, + prime256v1: { name: 'p256', byteLength: 32 }, + prime192v1: { name: 'p192', byteLength: 24 }, + ed25519: { name: 'ed25519', byteLength: 32 }, + secp384r1: { name: 'p384', byteLength: 48 }, + secp521r1: { name: 'p521', byteLength: 66 }, + } + ;(nt.p224 = nt.secp224r1), + (nt.p256 = nt.secp256r1 = nt.prime256v1), + (nt.p192 = nt.secp192r1 = nt.prime192v1), + (nt.p384 = nt.secp384r1), + (nt.p521 = nt.secp521r1) + function rt(ot) { + ;(this.curveType = nt[ot]), + this.curveType || (this.curveType = { name: ot }), + (this.curve = new tt.ec(this.curveType.name)), + (this.keys = void 0) + } + ;(rt.prototype.generateKeys = function (ot, at) { + return (this.keys = this.curve.genKeyPair()), this.getPublicKey(ot, at) + }), + (rt.prototype.computeSecret = function (ot, at, st) { + ;(at = at || 'utf8'), Buffer.isBuffer(ot) || (ot = new Buffer(ot, at)) + var lt = this.curve.keyFromPublic(ot).getPublic(), + ct = lt.mul(this.keys.getPrivate()).getX() + return it(ct, st, this.curveType.byteLength) + }), + (rt.prototype.getPublicKey = function (ot, at) { + var st = this.keys.getPublic(at === 'compressed', !0) + return at === 'hybrid' && (st[st.length - 1] % 2 ? (st[0] = 7) : (st[0] = 6)), it(st, ot) + }), + (rt.prototype.getPrivateKey = function (ot) { + return it(this.keys.getPrivate(), ot) + }), + (rt.prototype.setPublicKey = function (ot, at) { + return (at = at || 'utf8'), Buffer.isBuffer(ot) || (ot = new Buffer(ot, at)), this.keys._importPublic(ot), this + }), + (rt.prototype.setPrivateKey = function (ot, at) { + ;(at = at || 'utf8'), Buffer.isBuffer(ot) || (ot = new Buffer(ot, at)) + var st = new et(ot) + return (st = st.toString(16)), (this.keys = this.curve.genKeyPair()), this.keys._importPrivate(st), this + }) + function it(ot, at, st) { + Array.isArray(ot) || (ot = ot.toArray()) + var lt = new Buffer(ot) + if (st && lt.length < st) { + var ct = new Buffer(st - lt.length) + ct.fill(0), (lt = Buffer.concat([ct, lt])) + } + return at ? lt.toString(at) : lt + } + return browser$3 + } + var browser$2 = {}, + createHash$3 = browser$a, + Buffer$7 = safeBufferExports.Buffer, + mgf$2 = function (tt, et) { + for (var nt = Buffer$7.alloc(0), rt = 0, it; nt.length < et; ) + (it = i2ops(rt++)), (nt = Buffer$7.concat([nt, createHash$3('sha1').update(tt).update(it).digest()])) + return nt.slice(0, et) + } + function i2ops(tt) { + var et = Buffer$7.allocUnsafe(4) + return et.writeUInt32BE(tt, 0), et + } + var xor$2 = function (et, nt) { + for (var rt = et.length, it = -1; ++it < rt; ) et[it] ^= nt[it] + return et + }, + BN$4 = bnExports$2, + Buffer$6 = safeBufferExports.Buffer + function withPublic$2(tt, et) { + return Buffer$6.from(tt.toRed(BN$4.mont(et.modulus)).redPow(new BN$4(et.publicExponent)).fromRed().toArray()) + } + var withPublic_1 = withPublic$2, + parseKeys$1 = parseAsn1, + randomBytes = browserExports, + createHash$2 = browser$a, + mgf$1 = mgf$2, + xor$1 = xor$2, + BN$3 = bnExports$2, + withPublic$1 = withPublic_1, + crt$1 = browserifyRsa, + Buffer$5 = safeBufferExports.Buffer, + publicEncrypt = function (et, nt, rt) { + var it + et.padding ? (it = et.padding) : rt ? (it = 1) : (it = 4) + var ot = parseKeys$1(et), + at + if (it === 4) at = oaep$1(ot, nt) + else if (it === 1) at = pkcs1$1(ot, nt, rt) + else if (it === 3) { + if (((at = new BN$3(nt)), at.cmp(ot.modulus) >= 0)) throw new Error('data too long for modulus') + } else throw new Error('unknown padding') + return rt ? crt$1(at, ot) : withPublic$1(at, ot) + } + function oaep$1(tt, et) { + var nt = tt.modulus.byteLength(), + rt = et.length, + it = createHash$2('sha1').update(Buffer$5.alloc(0)).digest(), + ot = it.length, + at = 2 * ot + if (rt > nt - at - 2) throw new Error('message too long') + var st = Buffer$5.alloc(nt - rt - at - 2), + lt = nt - ot - 1, + ct = randomBytes(ot), + ut = xor$1(Buffer$5.concat([it, st, Buffer$5.alloc(1, 1), et], lt), mgf$1(ct, lt)), + ht = xor$1(ct, mgf$1(ut, ot)) + return new BN$3(Buffer$5.concat([Buffer$5.alloc(1), ht, ut], nt)) + } + function pkcs1$1(tt, et, nt) { + var rt = et.length, + it = tt.modulus.byteLength() + if (rt > it - 11) throw new Error('message too long') + var ot + return ( + nt ? (ot = Buffer$5.alloc(it - rt - 3, 255)) : (ot = nonZero(it - rt - 3)), + new BN$3(Buffer$5.concat([Buffer$5.from([0, nt ? 1 : 2]), ot, Buffer$5.alloc(1), et], it)) + ) + } + function nonZero(tt) { + for (var et = Buffer$5.allocUnsafe(tt), nt = 0, rt = randomBytes(tt * 2), it = 0, ot; nt < tt; ) + it === rt.length && ((rt = randomBytes(tt * 2)), (it = 0)), (ot = rt[it++]), ot && (et[nt++] = ot) + return et + } + var parseKeys = parseAsn1, + mgf = mgf$2, + xor = xor$2, + BN$2 = bnExports$2, + crt = browserifyRsa, + createHash$1 = browser$a, + withPublic = withPublic_1, + Buffer$4 = safeBufferExports.Buffer, + privateDecrypt = function (et, nt, rt) { + var it + et.padding ? (it = et.padding) : rt ? (it = 1) : (it = 4) + var ot = parseKeys(et), + at = ot.modulus.byteLength() + if (nt.length > at || new BN$2(nt).cmp(ot.modulus) >= 0) throw new Error('decryption error') + var st + rt ? (st = withPublic(new BN$2(nt), ot)) : (st = crt(nt, ot)) + var lt = Buffer$4.alloc(at - st.length) + if (((st = Buffer$4.concat([lt, st], at)), it === 4)) return oaep(ot, st) + if (it === 1) return pkcs1(ot, st, rt) + if (it === 3) return st + throw new Error('unknown padding') + } + function oaep(tt, et) { + var nt = tt.modulus.byteLength(), + rt = createHash$1('sha1').update(Buffer$4.alloc(0)).digest(), + it = rt.length + if (et[0] !== 0) throw new Error('decryption error') + var ot = et.slice(1, it + 1), + at = et.slice(it + 1), + st = xor(ot, mgf(at, it)), + lt = xor(at, mgf(st, nt - it - 1)) + if (compare$1(rt, lt.slice(0, it))) throw new Error('decryption error') + for (var ct = it; lt[ct] === 0; ) ct++ + if (lt[ct++] !== 1) throw new Error('decryption error') + return lt.slice(ct) + } + function pkcs1(tt, et, nt) { + for (var rt = et.slice(0, 2), it = 2, ot = 0; et[it++] !== 0; ) + if (it >= et.length) { + ot++ + break + } + var at = et.slice(2, it - 1) + if ( + (((rt.toString('hex') !== '0002' && !nt) || (rt.toString('hex') !== '0001' && nt)) && ot++, + at.length < 8 && ot++, + ot) + ) + throw new Error('decryption error') + return et.slice(it) + } + function compare$1(tt, et) { + ;(tt = Buffer$4.from(tt)), (et = Buffer$4.from(et)) + var nt = 0, + rt = tt.length + tt.length !== et.length && (nt++, (rt = Math.min(tt.length, et.length))) + for (var it = -1; ++it < rt; ) nt += tt[it] ^ et[it] + return nt + } + ;(function (tt) { + ;(tt.publicEncrypt = publicEncrypt), + (tt.privateDecrypt = privateDecrypt), + (tt.privateEncrypt = function (nt, rt) { + return tt.publicEncrypt(nt, rt, !0) + }), + (tt.publicDecrypt = function (nt, rt) { + return tt.privateDecrypt(nt, rt, !0) + }) + })(browser$2) + var browser$1 = {} + function oldBrowser() { + throw new Error(`secure random number generation not supported by this browser +use chrome, FireFox or Internet Explorer 11`) + } + var safeBuffer = safeBufferExports, + randombytes = browserExports, + Buffer$3 = safeBuffer.Buffer, + kBufferMaxLength = safeBuffer.kMaxLength, + crypto$3 = commonjsGlobal.crypto || commonjsGlobal.msCrypto, + kMaxUint32 = Math.pow(2, 32) - 1 + function assertOffset(tt, et) { + if (typeof tt != 'number' || tt !== tt) throw new TypeError('offset must be a number') + if (tt > kMaxUint32 || tt < 0) throw new TypeError('offset must be a uint32') + if (tt > kBufferMaxLength || tt > et) throw new RangeError('offset out of range') + } + function assertSize(tt, et, nt) { + if (typeof tt != 'number' || tt !== tt) throw new TypeError('size must be a number') + if (tt > kMaxUint32 || tt < 0) throw new TypeError('size must be a uint32') + if (tt + et > nt || tt > kBufferMaxLength) throw new RangeError('buffer too small') + } + ;(crypto$3 && crypto$3.getRandomValues) || !process.browser + ? ((browser$1.randomFill = randomFill), (browser$1.randomFillSync = randomFillSync)) + : ((browser$1.randomFill = oldBrowser), (browser$1.randomFillSync = oldBrowser)) + function randomFill(tt, et, nt, rt) { + if (!Buffer$3.isBuffer(tt) && !(tt instanceof commonjsGlobal.Uint8Array)) + throw new TypeError('"buf" argument must be a Buffer or Uint8Array') + if (typeof et == 'function') (rt = et), (et = 0), (nt = tt.length) + else if (typeof nt == 'function') (rt = nt), (nt = tt.length - et) + else if (typeof rt != 'function') throw new TypeError('"cb" argument must be a function') + return assertOffset(et, tt.length), assertSize(nt, et, tt.length), actualFill(tt, et, nt, rt) + } + function actualFill(tt, et, nt, rt) { + if (process.browser) { + var it = tt.buffer, + ot = new Uint8Array(it, et, nt) + if ((crypto$3.getRandomValues(ot), rt)) { + process.nextTick(function () { + rt(null, tt) + }) + return + } + return tt + } + if (rt) { + randombytes(nt, function (st, lt) { + if (st) return rt(st) + lt.copy(tt, et), rt(null, tt) + }) + return + } + var at = randombytes(nt) + return at.copy(tt, et), tt + } + function randomFillSync(tt, et, nt) { + if ((typeof et > 'u' && (et = 0), !Buffer$3.isBuffer(tt) && !(tt instanceof commonjsGlobal.Uint8Array))) + throw new TypeError('"buf" argument must be a Buffer or Uint8Array') + return ( + assertOffset(et, tt.length), + nt === void 0 && (nt = tt.length - et), + assertSize(nt, et, tt.length), + actualFill(tt, et, nt) + ) + } + var hasRequiredCryptoBrowserify + function requireCryptoBrowserify() { + if (hasRequiredCryptoBrowserify) return cryptoBrowserify + ;(hasRequiredCryptoBrowserify = 1), + (cryptoBrowserify.randomBytes = + cryptoBrowserify.rng = + cryptoBrowserify.pseudoRandomBytes = + cryptoBrowserify.prng = + browserExports), + (cryptoBrowserify.createHash = cryptoBrowserify.Hash = browser$a), + (cryptoBrowserify.createHmac = cryptoBrowserify.Hmac = browser$9) + var tt = algos, + et = Object.keys(tt), + nt = ['sha1', 'sha224', 'sha256', 'sha384', 'sha512', 'md5', 'rmd160'].concat(et) + cryptoBrowserify.getHashes = function () { + return nt + } + var rt = browser$8 + ;(cryptoBrowserify.pbkdf2 = rt.pbkdf2), (cryptoBrowserify.pbkdf2Sync = rt.pbkdf2Sync) + var it = browser$7 + ;(cryptoBrowserify.Cipher = it.Cipher), + (cryptoBrowserify.createCipher = it.createCipher), + (cryptoBrowserify.Cipheriv = it.Cipheriv), + (cryptoBrowserify.createCipheriv = it.createCipheriv), + (cryptoBrowserify.Decipher = it.Decipher), + (cryptoBrowserify.createDecipher = it.createDecipher), + (cryptoBrowserify.Decipheriv = it.Decipheriv), + (cryptoBrowserify.createDecipheriv = it.createDecipheriv), + (cryptoBrowserify.getCiphers = it.getCiphers), + (cryptoBrowserify.listCiphers = it.listCiphers) + var ot = requireBrowser$2() + ;(cryptoBrowserify.DiffieHellmanGroup = ot.DiffieHellmanGroup), + (cryptoBrowserify.createDiffieHellmanGroup = ot.createDiffieHellmanGroup), + (cryptoBrowserify.getDiffieHellman = ot.getDiffieHellman), + (cryptoBrowserify.createDiffieHellman = ot.createDiffieHellman), + (cryptoBrowserify.DiffieHellman = ot.DiffieHellman) + var at = requireBrowser$1() + ;(cryptoBrowserify.createSign = at.createSign), + (cryptoBrowserify.Sign = at.Sign), + (cryptoBrowserify.createVerify = at.createVerify), + (cryptoBrowserify.Verify = at.Verify), + (cryptoBrowserify.createECDH = requireBrowser()) + var st = browser$2 + ;(cryptoBrowserify.publicEncrypt = st.publicEncrypt), + (cryptoBrowserify.privateEncrypt = st.privateEncrypt), + (cryptoBrowserify.publicDecrypt = st.publicDecrypt), + (cryptoBrowserify.privateDecrypt = st.privateDecrypt) + var lt = browser$1 + return ( + (cryptoBrowserify.randomFill = lt.randomFill), + (cryptoBrowserify.randomFillSync = lt.randomFillSync), + (cryptoBrowserify.createCredentials = function () { + throw new Error( + [ + 'sorry, createCredentials is not implemented yet', + 'we accept pull requests', + 'https://github.com/crypto-browserify/crypto-browserify', + ].join(` +`), + ) + }), + (cryptoBrowserify.constants = { + DH_CHECK_P_NOT_SAFE_PRIME: 2, + DH_CHECK_P_NOT_PRIME: 1, + DH_UNABLE_TO_CHECK_GENERATOR: 4, + DH_NOT_SUITABLE_GENERATOR: 8, + NPN_ENABLED: 1, + ALPN_ENABLED: 1, + RSA_PKCS1_PADDING: 1, + RSA_SSLV23_PADDING: 2, + RSA_NO_PADDING: 3, + RSA_PKCS1_OAEP_PADDING: 4, + RSA_X931_PADDING: 5, + RSA_PKCS1_PSS_PADDING: 6, + POINT_CONVERSION_COMPRESSED: 2, + POINT_CONVERSION_UNCOMPRESSED: 4, + POINT_CONVERSION_HYBRID: 6, + }), + cryptoBrowserify + ) + } + var rngBrowser = { exports: {} }, + getRandomValues = + (typeof crypto < 'u' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto)) || + (typeof msCrypto < 'u' && + typeof window.msCrypto.getRandomValues == 'function' && + msCrypto.getRandomValues.bind(msCrypto)) + if (getRandomValues) { + var rnds8 = new Uint8Array(16) + rngBrowser.exports = function () { + return getRandomValues(rnds8), rnds8 + } + } else { + var rnds = new Array(16) + rngBrowser.exports = function () { + for (var et = 0, nt; et < 16; et++) + et & 3 || (nt = Math.random() * 4294967296), (rnds[et] = (nt >>> ((et & 3) << 3)) & 255) + return rnds + } + } + var rngBrowserExports = rngBrowser.exports, + byteToHex = [] + for (var i$4 = 0; i$4 < 256; ++i$4) byteToHex[i$4] = (i$4 + 256).toString(16).substr(1) + function bytesToUuid$1(tt, et) { + var nt = et || 0, + rt = byteToHex + return [ + rt[tt[nt++]], + rt[tt[nt++]], + rt[tt[nt++]], + rt[tt[nt++]], + '-', + rt[tt[nt++]], + rt[tt[nt++]], + '-', + rt[tt[nt++]], + rt[tt[nt++]], + '-', + rt[tt[nt++]], + rt[tt[nt++]], + '-', + rt[tt[nt++]], + rt[tt[nt++]], + rt[tt[nt++]], + rt[tt[nt++]], + rt[tt[nt++]], + rt[tt[nt++]], + ].join('') + } + var bytesToUuid_1 = bytesToUuid$1, + rng = rngBrowserExports, + bytesToUuid = bytesToUuid_1 + function v4(tt, et, nt) { + var rt = (et && nt) || 0 + typeof tt == 'string' && ((et = tt === 'binary' ? new Array(16) : null), (tt = null)), (tt = tt || {}) + var it = tt.random || (tt.rng || rng)() + if (((it[6] = (it[6] & 15) | 64), (it[8] = (it[8] & 63) | 128), et)) + for (var ot = 0; ot < 16; ++ot) et[rt + ot] = it[ot] + return et || bytesToUuid(it) + } + var v4_1 = v4, + macaroon$1 = {}, + sjcl = { exports: {} } + ;(function (tt) { + var et = { + cipher: {}, + hash: {}, + keyexchange: {}, + mode: {}, + misc: {}, + codec: {}, + exception: { + corrupt: function (mt) { + ;(this.toString = function () { + return 'CORRUPT: ' + this.message + }), + (this.message = mt) + }, + invalid: function (mt) { + ;(this.toString = function () { + return 'INVALID: ' + this.message + }), + (this.message = mt) + }, + bug: function (mt) { + ;(this.toString = function () { + return 'BUG: ' + this.message + }), + (this.message = mt) + }, + notReady: function (mt) { + ;(this.toString = function () { + return 'NOT READY: ' + this.message + }), + (this.message = mt) + }, + }, + } + ;(et.cipher.aes = function (mt) { + this.s[0][0][0] || this.O() + var gt, + yt, + bt, + vt, + xt = this.s[0][4], + kt = this.s[1] + gt = mt.length + var St = 1 + if (gt !== 4 && gt !== 6 && gt !== 8) throw new et.exception.invalid('invalid aes key size') + for (this.b = [(bt = mt.slice(0)), (vt = [])], mt = gt; mt < 4 * gt + 28; mt++) + (yt = bt[mt - 1]), + (mt % gt === 0 || (gt === 8 && mt % gt === 4)) && + ((yt = (xt[yt >>> 24] << 24) ^ (xt[(yt >> 16) & 255] << 16) ^ (xt[(yt >> 8) & 255] << 8) ^ xt[yt & 255]), + mt % gt === 0 && ((yt = (yt << 8) ^ (yt >>> 24) ^ (St << 24)), (St = (St << 1) ^ (283 * (St >> 7))))), + (bt[mt] = bt[mt - gt] ^ yt) + for (gt = 0; mt; gt++, mt--) + (yt = bt[gt & 3 ? mt : mt - 4]), + (vt[gt] = + 4 >= mt || 4 > gt + ? yt + : kt[0][xt[yt >>> 24]] ^ kt[1][xt[(yt >> 16) & 255]] ^ kt[2][xt[(yt >> 8) & 255]] ^ kt[3][xt[yt & 255]]) + }), + (et.cipher.aes.prototype = { + encrypt: function (mt) { + return nt(this, mt, 0) + }, + decrypt: function (mt) { + return nt(this, mt, 1) + }, + s: [ + [[], [], [], [], []], + [[], [], [], [], []], + ], + O: function () { + var mt = this.s[0], + gt = this.s[1], + yt = mt[4], + bt = gt[4], + vt, + xt, + kt, + St = [], + Tt = [], + At, + Et, + $t, + Dt + for (vt = 0; 256 > vt; vt++) Tt[(St[vt] = (vt << 1) ^ (283 * (vt >> 7))) ^ vt] = vt + for (xt = kt = 0; !yt[xt]; xt ^= At || 1, kt = Tt[kt] || 1) + for ( + $t = kt ^ (kt << 1) ^ (kt << 2) ^ (kt << 3) ^ (kt << 4), + $t = ($t >> 8) ^ ($t & 255) ^ 99, + yt[xt] = $t, + bt[$t] = xt, + Et = St[(vt = St[(At = St[xt])])], + Dt = (16843009 * Et) ^ (65537 * vt) ^ (257 * At) ^ (16843008 * xt), + Et = (257 * St[$t]) ^ (16843008 * $t), + vt = 0; + 4 > vt; + vt++ + ) + (mt[vt][xt] = Et = (Et << 24) ^ (Et >>> 8)), (gt[vt][$t] = Dt = (Dt << 24) ^ (Dt >>> 8)) + for (vt = 0; 5 > vt; vt++) (mt[vt] = mt[vt].slice(0)), (gt[vt] = gt[vt].slice(0)) + }, + }) + function nt(mt, gt, yt) { + if (gt.length !== 4) throw new et.exception.invalid('invalid aes block size') + var bt = mt.b[yt], + vt = gt[0] ^ bt[0], + xt = gt[yt ? 3 : 1] ^ bt[1], + kt = gt[2] ^ bt[2] + gt = gt[yt ? 1 : 3] ^ bt[3] + var St, + Tt, + At, + Et = bt.length / 4 - 2, + $t, + Dt = 4, + jt = [0, 0, 0, 0] + ;(St = mt.s[yt]), (mt = St[0]) + var Pt = St[1], + Ct = St[2], + wt = St[3], + It = St[4] + for ($t = 0; $t < Et; $t++) + (St = mt[vt >>> 24] ^ Pt[(xt >> 16) & 255] ^ Ct[(kt >> 8) & 255] ^ wt[gt & 255] ^ bt[Dt]), + (Tt = mt[xt >>> 24] ^ Pt[(kt >> 16) & 255] ^ Ct[(gt >> 8) & 255] ^ wt[vt & 255] ^ bt[Dt + 1]), + (At = mt[kt >>> 24] ^ Pt[(gt >> 16) & 255] ^ Ct[(vt >> 8) & 255] ^ wt[xt & 255] ^ bt[Dt + 2]), + (gt = mt[gt >>> 24] ^ Pt[(vt >> 16) & 255] ^ Ct[(xt >> 8) & 255] ^ wt[kt & 255] ^ bt[Dt + 3]), + (Dt += 4), + (vt = St), + (xt = Tt), + (kt = At) + for ($t = 0; 4 > $t; $t++) + (jt[yt ? 3 & -$t : $t] = + (It[vt >>> 24] << 24) ^ (It[(xt >> 16) & 255] << 16) ^ (It[(kt >> 8) & 255] << 8) ^ It[gt & 255] ^ bt[Dt++]), + (St = vt), + (vt = xt), + (xt = kt), + (kt = gt), + (gt = St) + return jt + } + ;(et.bitArray = { + bitSlice: function (mt, gt, yt) { + return ( + (mt = et.bitArray.$(mt.slice(gt / 32), 32 - (gt & 31)).slice(1)), + yt === void 0 ? mt : et.bitArray.clamp(mt, yt - gt) + ) + }, + extract: function (mt, gt, yt) { + var bt = Math.floor((-gt - yt) & 31) + return ( + (((gt + yt - 1) ^ gt) & -32 + ? (mt[(gt / 32) | 0] << (32 - bt)) ^ (mt[(gt / 32 + 1) | 0] >>> bt) + : mt[(gt / 32) | 0] >>> bt) & + ((1 << yt) - 1) + ) + }, + concat: function (mt, gt) { + if (mt.length === 0 || gt.length === 0) return mt.concat(gt) + var yt = mt[mt.length - 1], + bt = et.bitArray.getPartial(yt) + return bt === 32 ? mt.concat(gt) : et.bitArray.$(gt, bt, yt | 0, mt.slice(0, mt.length - 1)) + }, + bitLength: function (mt) { + var gt = mt.length + return gt === 0 ? 0 : 32 * (gt - 1) + et.bitArray.getPartial(mt[gt - 1]) + }, + clamp: function (mt, gt) { + if (32 * mt.length < gt) return mt + mt = mt.slice(0, Math.ceil(gt / 32)) + var yt = mt.length + return ( + (gt = gt & 31), + 0 < yt && gt && (mt[yt - 1] = et.bitArray.partial(gt, mt[yt - 1] & (2147483648 >> (gt - 1)), 1)), + mt + ) + }, + partial: function (mt, gt, yt) { + return mt === 32 ? gt : (yt ? gt | 0 : gt << (32 - mt)) + 1099511627776 * mt + }, + getPartial: function (mt) { + return Math.round(mt / 1099511627776) || 32 + }, + equal: function (mt, gt) { + if (et.bitArray.bitLength(mt) !== et.bitArray.bitLength(gt)) return !1 + var yt = 0, + bt + for (bt = 0; bt < mt.length; bt++) yt |= mt[bt] ^ gt[bt] + return yt === 0 + }, + $: function (mt, gt, yt, bt) { + var vt + for (vt = 0, bt === void 0 && (bt = []); 32 <= gt; gt -= 32) bt.push(yt), (yt = 0) + if (gt === 0) return bt.concat(mt) + for (vt = 0; vt < mt.length; vt++) bt.push(yt | (mt[vt] >>> gt)), (yt = mt[vt] << (32 - gt)) + return ( + (vt = mt.length ? mt[mt.length - 1] : 0), + (mt = et.bitArray.getPartial(vt)), + bt.push(et.bitArray.partial((gt + mt) & 31, 32 < gt + mt ? yt : bt.pop(), 1)), + bt + ) + }, + i: function (mt, gt) { + return [mt[0] ^ gt[0], mt[1] ^ gt[1], mt[2] ^ gt[2], mt[3] ^ gt[3]] + }, + byteswapM: function (mt) { + var gt, yt + for (gt = 0; gt < mt.length; ++gt) + (yt = mt[gt]), (mt[gt] = (yt >>> 24) | ((yt >>> 8) & 65280) | ((yt & 65280) << 8) | (yt << 24)) + return mt + }, + }), + (et.codec.utf8String = { + fromBits: function (mt) { + var gt = '', + yt = et.bitArray.bitLength(mt), + bt, + vt + for (bt = 0; bt < yt / 8; bt++) + !(bt & 3) && (vt = mt[bt / 4]), (gt += String.fromCharCode(((vt >>> 8) >>> 8) >>> 8)), (vt <<= 8) + return decodeURIComponent(escape(gt)) + }, + toBits: function (mt) { + mt = unescape(encodeURIComponent(mt)) + var gt = [], + yt, + bt = 0 + for (yt = 0; yt < mt.length; yt++) + (bt = (bt << 8) | mt.charCodeAt(yt)), (yt & 3) === 3 && (gt.push(bt), (bt = 0)) + return yt & 3 && gt.push(et.bitArray.partial(8 * (yt & 3), bt)), gt + }, + }), + (et.codec.hex = { + fromBits: function (mt) { + var gt = '', + yt + for (yt = 0; yt < mt.length; yt++) gt += ((mt[yt] | 0) + 0xf00000000000).toString(16).substr(4) + return gt.substr(0, et.bitArray.bitLength(mt) / 4) + }, + toBits: function (mt) { + var gt, + yt = [], + bt + for (mt = mt.replace(/\s|0x/g, ''), bt = mt.length, mt = mt + '00000000', gt = 0; gt < mt.length; gt += 8) + yt.push(parseInt(mt.substr(gt, 8), 16) ^ 0) + return et.bitArray.clamp(yt, 4 * bt) + }, + }), + (et.codec.base32 = { + B: 'ABCDEFGHIJKLMNOPQRSTUVWXYZ234567', + X: '0123456789ABCDEFGHIJKLMNOPQRSTUV', + BITS: 32, + BASE: 5, + REMAINING: 27, + fromBits: function (mt, gt, yt) { + var bt = et.codec.base32.BASE, + vt = et.codec.base32.REMAINING, + xt = '', + kt = 0, + St = et.codec.base32.B, + Tt = 0, + At = et.bitArray.bitLength(mt) + for (yt && (St = et.codec.base32.X), yt = 0; xt.length * bt < At; ) + (xt += St.charAt((Tt ^ (mt[yt] >>> kt)) >>> vt)), + kt < bt ? ((Tt = mt[yt] << (bt - kt)), (kt += vt), yt++) : ((Tt <<= bt), (kt -= bt)) + for (; xt.length & 7 && !gt; ) xt += '=' + return xt + }, + toBits: function (mt, gt) { + mt = mt.replace(/\s|=/g, '').toUpperCase() + var yt = et.codec.base32.BITS, + bt = et.codec.base32.BASE, + vt = et.codec.base32.REMAINING, + xt = [], + kt, + St = 0, + Tt = et.codec.base32.B, + At = 0, + Et, + $t = 'base32' + for (gt && ((Tt = et.codec.base32.X), ($t = 'base32hex')), kt = 0; kt < mt.length; kt++) { + if (((Et = Tt.indexOf(mt.charAt(kt))), 0 > Et)) { + if (!gt) + try { + return et.codec.base32hex.toBits(mt) + } catch {} + throw new et.exception.invalid("this isn't " + $t + '!') + } + St > vt + ? ((St -= vt), xt.push(At ^ (Et >>> St)), (At = Et << (yt - St))) + : ((St += bt), (At ^= Et << (yt - St))) + } + return St & 56 && xt.push(et.bitArray.partial(St & 56, At, 1)), xt + }, + }), + (et.codec.base32hex = { + fromBits: function (mt, gt) { + return et.codec.base32.fromBits(mt, gt, 1) + }, + toBits: function (mt) { + return et.codec.base32.toBits(mt, 1) + }, + }), + (et.codec.base64 = { + B: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/', + fromBits: function (mt, gt, yt) { + var bt = '', + vt = 0, + xt = et.codec.base64.B, + kt = 0, + St = et.bitArray.bitLength(mt) + for (yt && (xt = xt.substr(0, 62) + '-_'), yt = 0; 6 * bt.length < St; ) + (bt += xt.charAt((kt ^ (mt[yt] >>> vt)) >>> 26)), + 6 > vt ? ((kt = mt[yt] << (6 - vt)), (vt += 26), yt++) : ((kt <<= 6), (vt -= 6)) + for (; bt.length & 3 && !gt; ) bt += '=' + return bt + }, + toBits: function (mt, gt) { + mt = mt.replace(/\s|=/g, '') + var yt = [], + bt, + vt = 0, + xt = et.codec.base64.B, + kt = 0, + St + for (gt && (xt = xt.substr(0, 62) + '-_'), bt = 0; bt < mt.length; bt++) { + if (((St = xt.indexOf(mt.charAt(bt))), 0 > St)) throw new et.exception.invalid("this isn't base64!") + 26 < vt + ? ((vt -= 26), yt.push(kt ^ (St >>> vt)), (kt = St << (32 - vt))) + : ((vt += 6), (kt ^= St << (32 - vt))) + } + return vt & 56 && yt.push(et.bitArray.partial(vt & 56, kt, 1)), yt + }, + }), + (et.codec.base64url = { + fromBits: function (mt) { + return et.codec.base64.fromBits(mt, 1, 1) + }, + toBits: function (mt) { + return et.codec.base64.toBits(mt, 1) + }, + }), + (et.hash.sha256 = function (mt) { + this.b[0] || this.O(), mt ? ((this.F = mt.F.slice(0)), (this.A = mt.A.slice(0)), (this.l = mt.l)) : this.reset() + }), + (et.hash.sha256.hash = function (mt) { + return new et.hash.sha256().update(mt).finalize() + }), + (et.hash.sha256.prototype = { + blockSize: 512, + reset: function () { + return (this.F = this.Y.slice(0)), (this.A = []), (this.l = 0), this + }, + update: function (mt) { + typeof mt == 'string' && (mt = et.codec.utf8String.toBits(mt)) + var gt, + yt = (this.A = et.bitArray.concat(this.A, mt)) + if (((gt = this.l), (mt = this.l = gt + et.bitArray.bitLength(mt)), 9007199254740991 < mt)) + throw new et.exception.invalid('Cannot hash more than 2^53 - 1 bits') + if (typeof Uint32Array < 'u') { + var bt = new Uint32Array(yt), + vt = 0 + for (gt = 512 + gt - ((512 + gt) & 511); gt <= mt; gt += 512) + rt(this, bt.subarray(16 * vt, 16 * (vt + 1))), (vt += 1) + yt.splice(0, 16 * vt) + } else for (gt = 512 + gt - ((512 + gt) & 511); gt <= mt; gt += 512) rt(this, yt.splice(0, 16)) + return this + }, + finalize: function () { + var mt, + yt = this.A, + gt = this.F, + yt = et.bitArray.concat(yt, [et.bitArray.partial(1, 1)]) + for (mt = yt.length + 2; mt & 15; mt++) yt.push(0) + for (yt.push(Math.floor(this.l / 4294967296)), yt.push(this.l | 0); yt.length; ) rt(this, yt.splice(0, 16)) + return this.reset(), gt + }, + Y: [], + b: [], + O: function () { + function mt(xt) { + return (4294967296 * (xt - Math.floor(xt))) | 0 + } + for (var gt = 0, yt = 2, bt, vt; 64 > gt; yt++) { + for (vt = !0, bt = 2; bt * bt <= yt; bt++) + if (yt % bt === 0) { + vt = !1 + break + } + vt && (8 > gt && (this.Y[gt] = mt(Math.pow(yt, 0.5))), (this.b[gt] = mt(Math.pow(yt, 1 / 3))), gt++) + } + }, + }) + function rt(mt, gt) { + var yt, + bt, + vt, + xt = mt.F, + kt = mt.b, + St = xt[0], + Tt = xt[1], + At = xt[2], + Et = xt[3], + $t = xt[4], + Dt = xt[5], + jt = xt[6], + Pt = xt[7] + for (yt = 0; 64 > yt; yt++) + 16 > yt + ? (bt = gt[yt]) + : ((bt = gt[(yt + 1) & 15]), + (vt = gt[(yt + 14) & 15]), + (bt = gt[yt & 15] = + (((bt >>> 7) ^ (bt >>> 18) ^ (bt >>> 3) ^ (bt << 25) ^ (bt << 14)) + + ((vt >>> 17) ^ (vt >>> 19) ^ (vt >>> 10) ^ (vt << 15) ^ (vt << 13)) + + gt[yt & 15] + + gt[(yt + 9) & 15]) | + 0)), + (bt = + bt + + Pt + + (($t >>> 6) ^ ($t >>> 11) ^ ($t >>> 25) ^ ($t << 26) ^ ($t << 21) ^ ($t << 7)) + + (jt ^ ($t & (Dt ^ jt))) + + kt[yt]), + (Pt = jt), + (jt = Dt), + (Dt = $t), + ($t = (Et + bt) | 0), + (Et = At), + (At = Tt), + (Tt = St), + (St = + (bt + + ((Tt & At) ^ (Et & (Tt ^ At))) + + ((Tt >>> 2) ^ (Tt >>> 13) ^ (Tt >>> 22) ^ (Tt << 30) ^ (Tt << 19) ^ (Tt << 10))) | + 0) + ;(xt[0] = (xt[0] + St) | 0), + (xt[1] = (xt[1] + Tt) | 0), + (xt[2] = (xt[2] + At) | 0), + (xt[3] = (xt[3] + Et) | 0), + (xt[4] = (xt[4] + $t) | 0), + (xt[5] = (xt[5] + Dt) | 0), + (xt[6] = (xt[6] + jt) | 0), + (xt[7] = (xt[7] + Pt) | 0) + } + ;(et.mode.ccm = { + name: 'ccm', + G: [], + listenProgress: function (mt) { + et.mode.ccm.G.push(mt) + }, + unListenProgress: function (mt) { + ;(mt = et.mode.ccm.G.indexOf(mt)), -1 < mt && et.mode.ccm.G.splice(mt, 1) + }, + fa: function (mt) { + var gt = et.mode.ccm.G.slice(), + yt + for (yt = 0; yt < gt.length; yt += 1) gt[yt](mt) + }, + encrypt: function (mt, gt, yt, bt, vt) { + var xt, + kt = gt.slice(0), + St = et.bitArray, + Tt = St.bitLength(yt) / 8, + At = St.bitLength(kt) / 8 + if (((vt = vt || 64), (bt = bt || []), 7 > Tt)) + throw new et.exception.invalid('ccm: iv must be at least 7 bytes') + for (xt = 2; 4 > xt && At >>> (8 * xt); xt++); + return ( + xt < 15 - Tt && (xt = 15 - Tt), + (yt = St.clamp(yt, 8 * (15 - xt))), + (gt = et.mode.ccm.V(mt, gt, yt, bt, vt, xt)), + (kt = et.mode.ccm.C(mt, kt, yt, gt, vt, xt)), + St.concat(kt.data, kt.tag) + ) + }, + decrypt: function (mt, gt, yt, bt, vt) { + ;(vt = vt || 64), (bt = bt || []) + var xt = et.bitArray, + kt = xt.bitLength(yt) / 8, + At = xt.bitLength(gt), + St = xt.clamp(gt, At - vt), + Tt = xt.bitSlice(gt, At - vt), + At = (At - vt) / 8 + if (7 > kt) throw new et.exception.invalid('ccm: iv must be at least 7 bytes') + for (gt = 2; 4 > gt && At >>> (8 * gt); gt++); + if ( + (gt < 15 - kt && (gt = 15 - kt), + (yt = xt.clamp(yt, 8 * (15 - gt))), + (St = et.mode.ccm.C(mt, St, yt, Tt, vt, gt)), + (mt = et.mode.ccm.V(mt, St.data, yt, bt, vt, gt)), + !xt.equal(St.tag, mt)) + ) + throw new et.exception.corrupt("ccm: tag doesn't match") + return St.data + }, + na: function (mt, gt, yt, bt, vt, xt) { + var kt = [], + St = et.bitArray, + Tt = St.i + if ( + ((bt = [St.partial(8, (gt.length ? 64 : 0) | ((bt - 2) << 2) | (xt - 1))]), + (bt = St.concat(bt, yt)), + (bt[3] |= vt), + (bt = mt.encrypt(bt)), + gt.length) + ) + for ( + yt = St.bitLength(gt) / 8, + 65279 >= yt + ? (kt = [St.partial(16, yt)]) + : 4294967295 >= yt && (kt = St.concat([St.partial(16, 65534)], [yt])), + kt = St.concat(kt, gt), + gt = 0; + gt < kt.length; + gt += 4 + ) + bt = mt.encrypt(Tt(bt, kt.slice(gt, gt + 4).concat([0, 0, 0]))) + return bt + }, + V: function (mt, gt, yt, bt, vt, xt) { + var kt = et.bitArray, + St = kt.i + if (((vt /= 8), vt % 2 || 4 > vt || 16 < vt)) throw new et.exception.invalid('ccm: invalid tag length') + if (4294967295 < bt.length || 4294967295 < gt.length) + throw new et.exception.bug("ccm: can't deal with 4GiB or more data") + for (yt = et.mode.ccm.na(mt, bt, yt, vt, kt.bitLength(gt) / 8, xt), bt = 0; bt < gt.length; bt += 4) + yt = mt.encrypt(St(yt, gt.slice(bt, bt + 4).concat([0, 0, 0]))) + return kt.clamp(yt, 8 * vt) + }, + C: function (mt, gt, yt, bt, vt, xt) { + var kt, + St = et.bitArray + kt = St.i + var Tt = gt.length, + At = St.bitLength(gt), + Et = Tt / 50, + $t = Et + if ( + ((yt = St.concat([St.partial(8, xt - 1)], yt) + .concat([0, 0, 0]) + .slice(0, 4)), + (bt = St.bitSlice(kt(bt, mt.encrypt(yt)), 0, vt)), + !Tt) + ) + return { tag: bt, data: [] } + for (kt = 0; kt < Tt; kt += 4) + kt > Et && (et.mode.ccm.fa(kt / Tt), (Et += $t)), + yt[3]++, + (vt = mt.encrypt(yt)), + (gt[kt] ^= vt[0]), + (gt[kt + 1] ^= vt[1]), + (gt[kt + 2] ^= vt[2]), + (gt[kt + 3] ^= vt[3]) + return { tag: bt, data: St.clamp(gt, At) } + }, + }), + (et.mode.ocb2 = { + name: 'ocb2', + encrypt: function (mt, gt, yt, bt, vt, xt) { + if (et.bitArray.bitLength(yt) !== 128) throw new et.exception.invalid('ocb iv must be 128 bits') + var kt, + St = et.mode.ocb2.S, + Tt = et.bitArray, + At = Tt.i, + Et = [0, 0, 0, 0] + yt = St(mt.encrypt(yt)) + var $t, + Dt = [] + for (bt = bt || [], vt = vt || 64, kt = 0; kt + 4 < gt.length; kt += 4) + ($t = gt.slice(kt, kt + 4)), + (Et = At(Et, $t)), + (Dt = Dt.concat(At(yt, mt.encrypt(At(yt, $t))))), + (yt = St(yt)) + return ( + ($t = gt.slice(kt)), + (gt = Tt.bitLength($t)), + (kt = mt.encrypt(At(yt, [0, 0, 0, gt]))), + ($t = Tt.clamp(At($t.concat([0, 0, 0]), kt), gt)), + (Et = At(Et, At($t.concat([0, 0, 0]), kt))), + (Et = mt.encrypt(At(Et, At(yt, St(yt))))), + bt.length && (Et = At(Et, xt ? bt : et.mode.ocb2.pmac(mt, bt))), + Dt.concat(Tt.concat($t, Tt.clamp(Et, vt))) + ) + }, + decrypt: function (mt, gt, yt, bt, vt, xt) { + if (et.bitArray.bitLength(yt) !== 128) throw new et.exception.invalid('ocb iv must be 128 bits') + vt = vt || 64 + var kt = et.mode.ocb2.S, + St = et.bitArray, + Tt = St.i, + At = [0, 0, 0, 0], + Et = kt(mt.encrypt(yt)), + $t, + Dt, + jt = et.bitArray.bitLength(gt) - vt, + Pt = [] + for (bt = bt || [], yt = 0; yt + 4 < jt / 32; yt += 4) + ($t = Tt(Et, mt.decrypt(Tt(Et, gt.slice(yt, yt + 4))))), + (At = Tt(At, $t)), + (Pt = Pt.concat($t)), + (Et = kt(Et)) + if ( + ((Dt = jt - 32 * yt), + ($t = mt.encrypt(Tt(Et, [0, 0, 0, Dt]))), + ($t = Tt($t, St.clamp(gt.slice(yt), Dt).concat([0, 0, 0]))), + (At = Tt(At, $t)), + (At = mt.encrypt(Tt(At, Tt(Et, kt(Et))))), + bt.length && (At = Tt(At, xt ? bt : et.mode.ocb2.pmac(mt, bt))), + !St.equal(St.clamp(At, vt), St.bitSlice(gt, jt))) + ) + throw new et.exception.corrupt("ocb: tag doesn't match") + return Pt.concat(St.clamp($t, Dt)) + }, + pmac: function (mt, gt) { + var yt, + bt = et.mode.ocb2.S, + vt = et.bitArray, + xt = vt.i, + kt = [0, 0, 0, 0], + St = mt.encrypt([0, 0, 0, 0]), + St = xt(St, bt(bt(St))) + for (yt = 0; yt + 4 < gt.length; yt += 4) + (St = bt(St)), (kt = xt(kt, mt.encrypt(xt(St, gt.slice(yt, yt + 4))))) + return ( + (yt = gt.slice(yt)), + 128 > vt.bitLength(yt) && ((St = xt(St, bt(St))), (yt = vt.concat(yt, [-2147483648, 0, 0, 0]))), + (kt = xt(kt, yt)), + mt.encrypt(xt(bt(xt(St, bt(St))), kt)) + ) + }, + S: function (mt) { + return [ + (mt[0] << 1) ^ (mt[1] >>> 31), + (mt[1] << 1) ^ (mt[2] >>> 31), + (mt[2] << 1) ^ (mt[3] >>> 31), + (mt[3] << 1) ^ (135 * (mt[0] >>> 31)), + ] + }, + }), + (et.mode.gcm = { + name: 'gcm', + encrypt: function (mt, gt, yt, bt, vt) { + var xt = gt.slice(0) + return ( + (gt = et.bitArray), + (bt = bt || []), + (mt = et.mode.gcm.C(!0, mt, xt, bt, yt, vt || 128)), + gt.concat(mt.data, mt.tag) + ) + }, + decrypt: function (mt, gt, yt, bt, vt) { + var xt = gt.slice(0), + kt = et.bitArray, + St = kt.bitLength(xt) + if ( + ((vt = vt || 128), + (bt = bt || []), + vt <= St ? ((gt = kt.bitSlice(xt, St - vt)), (xt = kt.bitSlice(xt, 0, St - vt))) : ((gt = xt), (xt = [])), + (mt = et.mode.gcm.C(!1, mt, xt, bt, yt, vt)), + !kt.equal(mt.tag, gt)) + ) + throw new et.exception.corrupt("gcm: tag doesn't match") + return mt.data + }, + ka: function (mt, gt) { + var yt, + bt, + vt, + xt, + kt, + St = et.bitArray.i + for (vt = [0, 0, 0, 0], xt = gt.slice(0), yt = 0; 128 > yt; yt++) { + for ( + (bt = (mt[Math.floor(yt / 32)] & (1 << (31 - (yt % 32)))) !== 0) && (vt = St(vt, xt)), + kt = (xt[3] & 1) !== 0, + bt = 3; + 0 < bt; + bt-- + ) + xt[bt] = (xt[bt] >>> 1) | ((xt[bt - 1] & 1) << 31) + ;(xt[0] >>>= 1), kt && (xt[0] ^= -520093696) + } + return vt + }, + j: function (mt, gt, yt) { + var bt, + vt = yt.length + for (gt = gt.slice(0), bt = 0; bt < vt; bt += 4) + (gt[0] ^= 4294967295 & yt[bt]), + (gt[1] ^= 4294967295 & yt[bt + 1]), + (gt[2] ^= 4294967295 & yt[bt + 2]), + (gt[3] ^= 4294967295 & yt[bt + 3]), + (gt = et.mode.gcm.ka(gt, mt)) + return gt + }, + C: function (mt, gt, yt, bt, vt, xt) { + var kt, + St, + Tt, + At, + Et, + $t, + Dt, + jt, + Pt = et.bitArray + for ( + $t = yt.length, + Dt = Pt.bitLength(yt), + jt = Pt.bitLength(bt), + St = Pt.bitLength(vt), + kt = gt.encrypt([0, 0, 0, 0]), + St === 96 + ? ((vt = vt.slice(0)), (vt = Pt.concat(vt, [1]))) + : ((vt = et.mode.gcm.j(kt, [0, 0, 0, 0], vt)), + (vt = et.mode.gcm.j(kt, vt, [0, 0, Math.floor(St / 4294967296), St & 4294967295]))), + St = et.mode.gcm.j(kt, [0, 0, 0, 0], bt), + Et = vt.slice(0), + bt = St.slice(0), + mt || (bt = et.mode.gcm.j(kt, St, yt)), + At = 0; + At < $t; + At += 4 + ) + Et[3]++, + (Tt = gt.encrypt(Et)), + (yt[At] ^= Tt[0]), + (yt[At + 1] ^= Tt[1]), + (yt[At + 2] ^= Tt[2]), + (yt[At + 3] ^= Tt[3]) + return ( + (yt = Pt.clamp(yt, Dt)), + mt && (bt = et.mode.gcm.j(kt, St, yt)), + (mt = [Math.floor(jt / 4294967296), jt & 4294967295, Math.floor(Dt / 4294967296), Dt & 4294967295]), + (bt = et.mode.gcm.j(kt, bt, mt)), + (Tt = gt.encrypt(vt)), + (bt[0] ^= Tt[0]), + (bt[1] ^= Tt[1]), + (bt[2] ^= Tt[2]), + (bt[3] ^= Tt[3]), + { tag: Pt.bitSlice(bt, 0, xt), data: yt } + ) + }, + }), + (et.misc.hmac = function (mt, gt) { + this.W = gt = gt || et.hash.sha256 + var yt = [[], []], + bt, + vt = gt.prototype.blockSize / 32 + for (this.w = [new gt(), new gt()], mt.length > vt && (mt = gt.hash(mt)), bt = 0; bt < vt; bt++) + (yt[0][bt] = mt[bt] ^ 909522486), (yt[1][bt] = mt[bt] ^ 1549556828) + this.w[0].update(yt[0]), this.w[1].update(yt[1]), (this.R = new gt(this.w[0])) + }), + (et.misc.hmac.prototype.encrypt = et.misc.hmac.prototype.mac = + function (mt) { + if (this.aa) throw new et.exception.invalid('encrypt on already updated hmac called!') + return this.update(mt), this.digest(mt) + }), + (et.misc.hmac.prototype.reset = function () { + ;(this.R = new this.W(this.w[0])), (this.aa = !1) + }), + (et.misc.hmac.prototype.update = function (mt) { + ;(this.aa = !0), this.R.update(mt) + }), + (et.misc.hmac.prototype.digest = function () { + var mt = this.R.finalize(), + mt = new this.W(this.w[1]).update(mt).finalize() + return this.reset(), mt + }), + (et.misc.pbkdf2 = function (mt, gt, yt, bt, vt) { + if (((yt = yt || 1e4), 0 > bt || 0 > yt)) throw new et.exception.invalid('invalid params to pbkdf2') + typeof mt == 'string' && (mt = et.codec.utf8String.toBits(mt)), + typeof gt == 'string' && (gt = et.codec.utf8String.toBits(gt)), + (vt = vt || et.misc.hmac), + (mt = new vt(mt)) + var xt, + kt, + St, + Tt, + At = [], + Et = et.bitArray + for (Tt = 1; 32 * At.length < (bt || 1); Tt++) { + for (vt = xt = mt.encrypt(Et.concat(gt, [Tt])), kt = 1; kt < yt; kt++) + for (xt = mt.encrypt(xt), St = 0; St < xt.length; St++) vt[St] ^= xt[St] + At = At.concat(vt) + } + return bt && (At = Et.clamp(At, bt)), At + }), + (et.prng = function (mt) { + ;(this.c = [new et.hash.sha256()]), + (this.m = [0]), + (this.P = 0), + (this.H = {}), + (this.N = 0), + (this.U = {}), + (this.Z = this.f = this.o = this.ha = 0), + (this.b = [0, 0, 0, 0, 0, 0, 0, 0]), + (this.h = [0, 0, 0, 0]), + (this.L = void 0), + (this.M = mt), + (this.D = !1), + (this.K = { progress: {}, seeded: {} }), + (this.u = this.ga = 0), + (this.I = 1), + (this.J = 2), + (this.ca = 65536), + (this.T = [0, 48, 64, 96, 128, 192, 256, 384, 512, 768, 1024]), + (this.da = 3e4), + (this.ba = 80) + }), + (et.prng.prototype = { + randomWords: function (mt, gt) { + var yt = [], + bt + bt = this.isReady(gt) + var vt + if (bt === this.u) throw new et.exception.notReady("generator isn't seeded") + if (bt & this.J) { + ;(bt = !(bt & this.I)), (vt = []) + var xt = 0, + kt + for (this.Z = vt[0] = new Date().valueOf() + this.da, kt = 0; 16 > kt; kt++) + vt.push((4294967296 * Math.random()) | 0) + for ( + kt = 0; + kt < this.c.length && + ((vt = vt.concat(this.c[kt].finalize())), + (xt += this.m[kt]), + (this.m[kt] = 0), + bt || !(this.P & (1 << kt))); + kt++ + ); + for ( + this.P >= 1 << this.c.length && (this.c.push(new et.hash.sha256()), this.m.push(0)), + this.f -= xt, + xt > this.o && (this.o = xt), + this.P++, + this.b = et.hash.sha256.hash(this.b.concat(vt)), + this.L = new et.cipher.aes(this.b), + bt = 0; + 4 > bt && ((this.h[bt] = (this.h[bt] + 1) | 0), !this.h[bt]); + bt++ + ); + } + for (bt = 0; bt < mt; bt += 4) + (bt + 1) % this.ca === 0 && at(this), (vt = st(this)), yt.push(vt[0], vt[1], vt[2], vt[3]) + return at(this), yt.slice(0, mt) + }, + setDefaultParanoia: function (mt, gt) { + if (mt === 0 && gt !== 'Setting paranoia=0 will ruin your security; use it only for testing') + throw new et.exception.invalid('Setting paranoia=0 will ruin your security; use it only for testing') + this.M = mt + }, + addEntropy: function (mt, gt, yt) { + yt = yt || 'user' + var bt, + vt, + xt = new Date().valueOf(), + kt = this.H[yt], + St = this.isReady(), + Tt = 0 + switch ( + ((bt = this.U[yt]), + bt === void 0 && (bt = this.U[yt] = this.ha++), + kt === void 0 && (kt = this.H[yt] = 0), + (this.H[yt] = (this.H[yt] + 1) % this.c.length), + typeof mt) + ) { + case 'number': + gt === void 0 && (gt = 1), this.c[kt].update([bt, this.N++, 1, gt, xt, 1, mt | 0]) + break + case 'object': + if (((yt = Object.prototype.toString.call(mt)), yt === '[object Uint32Array]')) { + for (vt = [], yt = 0; yt < mt.length; yt++) vt.push(mt[yt]) + mt = vt + } else + for (yt !== '[object Array]' && (Tt = 1), yt = 0; yt < mt.length && !Tt; yt++) + typeof mt[yt] != 'number' && (Tt = 1) + if (!Tt) { + if (gt === void 0) + for (yt = gt = 0; yt < mt.length; yt++) for (vt = mt[yt]; 0 < vt; ) gt++, (vt = vt >>> 1) + this.c[kt].update([bt, this.N++, 2, gt, xt, mt.length].concat(mt)) + } + break + case 'string': + gt === void 0 && (gt = mt.length), + this.c[kt].update([bt, this.N++, 3, gt, xt, mt.length]), + this.c[kt].update(mt) + break + default: + Tt = 1 + } + if (Tt) throw new et.exception.bug('random: addEntropy only supports number, array of numbers or string') + ;(this.m[kt] += gt), + (this.f += gt), + St === this.u && + (this.isReady() !== this.u && it('seeded', Math.max(this.o, this.f)), it('progress', this.getProgress())) + }, + isReady: function (mt) { + return ( + (mt = this.T[mt !== void 0 ? mt : this.M]), + this.o && this.o >= mt + ? this.m[0] > this.ba && new Date().valueOf() > this.Z + ? this.J | this.I + : this.I + : this.f >= mt + ? this.J | this.u + : this.u + ) + }, + getProgress: function (mt) { + return (mt = this.T[mt || this.M]), this.o >= mt || this.f > mt ? 1 : this.f / mt + }, + startCollectors: function () { + if (!this.D) { + if ( + ((this.a = { + loadTimeCollector: lt(this, this.ma), + mouseCollector: lt(this, this.oa), + keyboardCollector: lt(this, this.la), + accelerometerCollector: lt(this, this.ea), + touchCollector: lt(this, this.qa), + }), + window.addEventListener) + ) + window.addEventListener('load', this.a.loadTimeCollector, !1), + window.addEventListener('mousemove', this.a.mouseCollector, !1), + window.addEventListener('keypress', this.a.keyboardCollector, !1), + window.addEventListener('devicemotion', this.a.accelerometerCollector, !1), + window.addEventListener('touchmove', this.a.touchCollector, !1) + else if (document.attachEvent) + document.attachEvent('onload', this.a.loadTimeCollector), + document.attachEvent('onmousemove', this.a.mouseCollector), + document.attachEvent('keypress', this.a.keyboardCollector) + else throw new et.exception.bug("can't attach event") + this.D = !0 + } + }, + stopCollectors: function () { + this.D && + (window.removeEventListener + ? (window.removeEventListener('load', this.a.loadTimeCollector, !1), + window.removeEventListener('mousemove', this.a.mouseCollector, !1), + window.removeEventListener('keypress', this.a.keyboardCollector, !1), + window.removeEventListener('devicemotion', this.a.accelerometerCollector, !1), + window.removeEventListener('touchmove', this.a.touchCollector, !1)) + : document.detachEvent && + (document.detachEvent('onload', this.a.loadTimeCollector), + document.detachEvent('onmousemove', this.a.mouseCollector), + document.detachEvent('keypress', this.a.keyboardCollector)), + (this.D = !1)) + }, + addEventListener: function (mt, gt) { + this.K[mt][this.ga++] = gt + }, + removeEventListener: function (mt, gt) { + var yt, + bt, + vt = this.K[mt], + xt = [] + for (bt in vt) vt.hasOwnProperty(bt) && vt[bt] === gt && xt.push(bt) + for (yt = 0; yt < xt.length; yt++) (bt = xt[yt]), delete vt[bt] + }, + la: function () { + ot(this, 1) + }, + oa: function (mt) { + var gt, yt + try { + ;(gt = mt.x || mt.clientX || mt.offsetX || 0), (yt = mt.y || mt.clientY || mt.offsetY || 0) + } catch { + yt = gt = 0 + } + gt != 0 && yt != 0 && this.addEntropy([gt, yt], 2, 'mouse'), ot(this, 0) + }, + qa: function (mt) { + ;(mt = mt.touches[0] || mt.changedTouches[0]), + this.addEntropy([mt.pageX || mt.clientX, mt.pageY || mt.clientY], 1, 'touch'), + ot(this, 0) + }, + ma: function () { + ot(this, 2) + }, + ea: function (mt) { + if ( + ((mt = + mt.accelerationIncludingGravity.x || + mt.accelerationIncludingGravity.y || + mt.accelerationIncludingGravity.z), + window.orientation) + ) { + var gt = window.orientation + typeof gt == 'number' && this.addEntropy(gt, 1, 'accelerometer') + } + mt && this.addEntropy(mt, 2, 'accelerometer'), ot(this, 0) + }, + }) + function it(mt, gt) { + var yt, + bt = et.random.K[mt], + vt = [] + for (yt in bt) bt.hasOwnProperty(yt) && vt.push(bt[yt]) + for (yt = 0; yt < vt.length; yt++) vt[yt](gt) + } + function ot(mt, gt) { + typeof window < 'u' && window.performance && typeof window.performance.now == 'function' + ? mt.addEntropy(window.performance.now(), gt, 'loadtime') + : mt.addEntropy(new Date().valueOf(), gt, 'loadtime') + } + function at(mt) { + ;(mt.b = st(mt).concat(st(mt))), (mt.L = new et.cipher.aes(mt.b)) + } + function st(mt) { + for (var gt = 0; 4 > gt && ((mt.h[gt] = (mt.h[gt] + 1) | 0), !mt.h[gt]); gt++); + return mt.L.encrypt(mt.h) + } + function lt(mt, gt) { + return function () { + gt.apply(mt, arguments) + } + } + et.random = new et.prng(6) + e: try { + var ct, ut, ht, dt + if ((dt = tt.exports)) { + var pt + try { + pt = requireCryptoBrowserify() + } catch { + pt = null + } + dt = ut = pt + } + if (dt && ut.randomBytes) + (ct = ut.randomBytes(128)), + (ct = new Uint32Array(new Uint8Array(ct).buffer)), + et.random.addEntropy(ct, 1024, "crypto['randomBytes']") + else if (typeof window < 'u' && typeof Uint32Array < 'u') { + if (((ht = new Uint32Array(32)), window.crypto && window.crypto.getRandomValues)) + window.crypto.getRandomValues(ht) + else if (window.msCrypto && window.msCrypto.getRandomValues) window.msCrypto.getRandomValues(ht) + else break e + et.random.addEntropy(ht, 1024, "crypto['getRandomValues']") + } + } catch (mt) { + typeof window < 'u' && + window.console && + (console.log('There was an error collecting entropy from the browser:'), console.log(mt)) + } + ;(et.json = { + defaults: { v: 1, iter: 1e4, ks: 128, ts: 64, mode: 'ccm', adata: '', cipher: 'aes' }, + ja: function (mt, gt, yt, bt) { + ;(yt = yt || {}), (bt = bt || {}) + var vt = et.json, + xt = vt.g({ iv: et.random.randomWords(4, 0) }, vt.defaults), + kt + if ( + (vt.g(xt, yt), + (yt = xt.adata), + typeof xt.salt == 'string' && (xt.salt = et.codec.base64.toBits(xt.salt)), + typeof xt.iv == 'string' && (xt.iv = et.codec.base64.toBits(xt.iv)), + !et.mode[xt.mode] || + !et.cipher[xt.cipher] || + (typeof mt == 'string' && 100 >= xt.iter) || + (xt.ts !== 64 && xt.ts !== 96 && xt.ts !== 128) || + (xt.ks !== 128 && xt.ks !== 192 && xt.ks !== 256) || + 2 > xt.iv.length || + 4 < xt.iv.length) + ) + throw new et.exception.invalid('json encrypt: invalid parameters') + return ( + typeof mt == 'string' + ? ((kt = et.misc.cachedPbkdf2(mt, xt)), (mt = kt.key.slice(0, xt.ks / 32)), (xt.salt = kt.salt)) + : et.ecc && + mt instanceof et.ecc.elGamal.publicKey && + ((kt = mt.kem()), (xt.kemtag = kt.tag), (mt = kt.key.slice(0, xt.ks / 32))), + typeof gt == 'string' && (gt = et.codec.utf8String.toBits(gt)), + typeof yt == 'string' && (xt.adata = yt = et.codec.utf8String.toBits(yt)), + (kt = new et.cipher[xt.cipher](mt)), + vt.g(bt, xt), + (bt.key = mt), + (xt.ct = + xt.mode === 'ccm' && et.arrayBuffer && et.arrayBuffer.ccm && gt instanceof ArrayBuffer + ? et.arrayBuffer.ccm.encrypt(kt, gt, xt.iv, yt, xt.ts) + : et.mode[xt.mode].encrypt(kt, gt, xt.iv, yt, xt.ts)), + xt + ) + }, + encrypt: function (mt, gt, yt, bt) { + var vt = et.json, + xt = vt.ja.apply(vt, arguments) + return vt.encode(xt) + }, + ia: function (mt, gt, yt, bt) { + ;(yt = yt || {}), (bt = bt || {}) + var vt = et.json + gt = vt.g(vt.g(vt.g({}, vt.defaults), gt), yt, !0) + var xt, kt + if ( + ((xt = gt.adata), + typeof gt.salt == 'string' && (gt.salt = et.codec.base64.toBits(gt.salt)), + typeof gt.iv == 'string' && (gt.iv = et.codec.base64.toBits(gt.iv)), + !et.mode[gt.mode] || + !et.cipher[gt.cipher] || + (typeof mt == 'string' && 100 >= gt.iter) || + (gt.ts !== 64 && gt.ts !== 96 && gt.ts !== 128) || + (gt.ks !== 128 && gt.ks !== 192 && gt.ks !== 256) || + !gt.iv || + 2 > gt.iv.length || + 4 < gt.iv.length) + ) + throw new et.exception.invalid('json decrypt: invalid parameters') + return ( + typeof mt == 'string' + ? ((kt = et.misc.cachedPbkdf2(mt, gt)), (mt = kt.key.slice(0, gt.ks / 32)), (gt.salt = kt.salt)) + : et.ecc && + mt instanceof et.ecc.elGamal.secretKey && + (mt = mt.unkem(et.codec.base64.toBits(gt.kemtag)).slice(0, gt.ks / 32)), + typeof xt == 'string' && (xt = et.codec.utf8String.toBits(xt)), + (kt = new et.cipher[gt.cipher](mt)), + (xt = + gt.mode === 'ccm' && et.arrayBuffer && et.arrayBuffer.ccm && gt.ct instanceof ArrayBuffer + ? et.arrayBuffer.ccm.decrypt(kt, gt.ct, gt.iv, gt.tag, xt, gt.ts) + : et.mode[gt.mode].decrypt(kt, gt.ct, gt.iv, xt, gt.ts)), + vt.g(bt, gt), + (bt.key = mt), + yt.raw === 1 ? xt : et.codec.utf8String.fromBits(xt) + ) + }, + decrypt: function (mt, gt, yt, bt) { + var vt = et.json + return vt.ia(mt, vt.decode(gt), yt, bt) + }, + encode: function (mt) { + var gt, + yt = '{', + bt = '' + for (gt in mt) + if (mt.hasOwnProperty(gt)) { + if (!gt.match(/^[a-z0-9]+$/i)) throw new et.exception.invalid('json encode: invalid property name') + switch (((yt += bt + '"' + gt + '":'), (bt = ','), typeof mt[gt])) { + case 'number': + case 'boolean': + yt += mt[gt] + break + case 'string': + yt += '"' + escape(mt[gt]) + '"' + break + case 'object': + yt += '"' + et.codec.base64.fromBits(mt[gt], 0) + '"' + break + default: + throw new et.exception.bug('json encode: unsupported type') + } + } + return yt + '}' + }, + decode: function (mt) { + if (((mt = mt.replace(/\s/g, '')), !mt.match(/^\{.*\}$/))) + throw new et.exception.invalid("json decode: this isn't json!") + mt = mt.replace(/^\{|\}$/g, '').split(/,/) + var gt = {}, + yt, + bt + for (yt = 0; yt < mt.length; yt++) { + if ( + !(bt = mt[yt].match( + /^\s*(?:(["']?)([a-z][a-z0-9]*)\1)\s*:\s*(?:(-?\d+)|"([a-z0-9+\/%*_.@=\-]*)"|(true|false))$/i, + )) + ) + throw new et.exception.invalid("json decode: this isn't json!") + bt[3] != null + ? (gt[bt[2]] = parseInt(bt[3], 10)) + : bt[4] != null + ? (gt[bt[2]] = bt[2].match(/^(ct|adata|salt|iv)$/) ? et.codec.base64.toBits(bt[4]) : unescape(bt[4])) + : bt[5] != null && (gt[bt[2]] = bt[5] === 'true') + } + return gt + }, + g: function (mt, gt, yt) { + if ((mt === void 0 && (mt = {}), gt === void 0)) return mt + for (var bt in gt) + if (gt.hasOwnProperty(bt)) { + if (yt && mt[bt] !== void 0 && mt[bt] !== gt[bt]) + throw new et.exception.invalid('required parameter overridden') + mt[bt] = gt[bt] + } + return mt + }, + sa: function (mt, gt) { + var yt = {}, + bt + for (bt in mt) mt.hasOwnProperty(bt) && mt[bt] !== gt[bt] && (yt[bt] = mt[bt]) + return yt + }, + ra: function (mt, gt) { + var yt = {}, + bt + for (bt = 0; bt < gt.length; bt++) mt[gt[bt]] !== void 0 && (yt[gt[bt]] = mt[gt[bt]]) + return yt + }, + }), + (et.encrypt = et.json.encrypt), + (et.decrypt = et.json.decrypt), + (et.misc.pa = {}), + (et.misc.cachedPbkdf2 = function (mt, gt) { + var yt = et.misc.pa, + bt + return ( + (gt = gt || {}), + (bt = gt.iter || 1e3), + (yt = yt[mt] = yt[mt] || {}), + (bt = yt[bt] = + yt[bt] || { firstSalt: gt.salt && gt.salt.length ? gt.salt.slice(0) : et.random.randomWords(2, 0) }), + (yt = gt.salt === void 0 ? bt.firstSalt : gt.salt), + (bt[yt] = bt[yt] || et.misc.pbkdf2(mt, yt, gt.iter)), + { key: bt[yt].slice(0), salt: yt.slice(0) } + ) + }), + tt.exports && (tt.exports = et) + })(sjcl) + var sjclExports = sjcl.exports + function commonjsRequire(tt) { + throw new Error( + 'Could not dynamically require "' + + tt + + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.', + ) + } + var naclFast = { exports: {} } + ;(function (tt) { + ;(function (et) { + var nt = function (xn) { + var Mn, + dn = new Float64Array(16) + if (xn) for (Mn = 0; Mn < xn.length; Mn++) dn[Mn] = xn[Mn] + return dn + }, + rt = function () { + throw new Error('no PRNG') + }, + it = new Uint8Array(16), + ot = new Uint8Array(32) + ot[0] = 9 + var at = nt(), + st = nt([1]), + lt = nt([56129, 1]), + ct = nt([ + 30883, 4953, 19914, 30187, 55467, 16705, 2637, 112, 59544, 30585, 16505, 36039, 65139, 11119, 27886, 20995, + ]), + ut = nt([ + 61785, 9906, 39828, 60374, 45398, 33411, 5274, 224, 53552, 61171, 33010, 6542, 64743, 22239, 55772, 9222, + ]), + ht = nt([ + 54554, 36645, 11616, 51542, 42930, 38181, 51040, 26924, 56412, 64982, 57905, 49316, 21502, 52590, 14035, 8553, + ]), + dt = nt([ + 26200, 26214, 26214, 26214, 26214, 26214, 26214, 26214, 26214, 26214, 26214, 26214, 26214, 26214, 26214, + 26214, + ]), + pt = nt([ + 41136, 18958, 6951, 50414, 58488, 44335, 6150, 12099, 55207, 15867, 153, 11085, 57099, 20417, 9344, 11139, + ]) + function mt(xn, Mn, dn, Jt) { + ;(xn[Mn] = (dn >> 24) & 255), + (xn[Mn + 1] = (dn >> 16) & 255), + (xn[Mn + 2] = (dn >> 8) & 255), + (xn[Mn + 3] = dn & 255), + (xn[Mn + 4] = (Jt >> 24) & 255), + (xn[Mn + 5] = (Jt >> 16) & 255), + (xn[Mn + 6] = (Jt >> 8) & 255), + (xn[Mn + 7] = Jt & 255) + } + function gt(xn, Mn, dn, Jt, En) { + var Ln, + Un = 0 + for (Ln = 0; Ln < En; Ln++) Un |= xn[Mn + Ln] ^ dn[Jt + Ln] + return (1 & ((Un - 1) >>> 8)) - 1 + } + function yt(xn, Mn, dn, Jt) { + return gt(xn, Mn, dn, Jt, 16) + } + function bt(xn, Mn, dn, Jt) { + return gt(xn, Mn, dn, Jt, 32) + } + function vt(xn, Mn, dn, Jt) { + for ( + var En = (Jt[0] & 255) | ((Jt[1] & 255) << 8) | ((Jt[2] & 255) << 16) | ((Jt[3] & 255) << 24), + Ln = (dn[0] & 255) | ((dn[1] & 255) << 8) | ((dn[2] & 255) << 16) | ((dn[3] & 255) << 24), + Un = (dn[4] & 255) | ((dn[5] & 255) << 8) | ((dn[6] & 255) << 16) | ((dn[7] & 255) << 24), + Kn = (dn[8] & 255) | ((dn[9] & 255) << 8) | ((dn[10] & 255) << 16) | ((dn[11] & 255) << 24), + nr = (dn[12] & 255) | ((dn[13] & 255) << 8) | ((dn[14] & 255) << 16) | ((dn[15] & 255) << 24), + lr = (Jt[4] & 255) | ((Jt[5] & 255) << 8) | ((Jt[6] & 255) << 16) | ((Jt[7] & 255) << 24), + cr = (Mn[0] & 255) | ((Mn[1] & 255) << 8) | ((Mn[2] & 255) << 16) | ((Mn[3] & 255) << 24), + Hr = (Mn[4] & 255) | ((Mn[5] & 255) << 8) | ((Mn[6] & 255) << 16) | ((Mn[7] & 255) << 24), + vr = (Mn[8] & 255) | ((Mn[9] & 255) << 8) | ((Mn[10] & 255) << 16) | ((Mn[11] & 255) << 24), + Nr = (Mn[12] & 255) | ((Mn[13] & 255) << 8) | ((Mn[14] & 255) << 16) | ((Mn[15] & 255) << 24), + Gr = (Jt[8] & 255) | ((Jt[9] & 255) << 8) | ((Jt[10] & 255) << 16) | ((Jt[11] & 255) << 24), + eo = (dn[16] & 255) | ((dn[17] & 255) << 8) | ((dn[18] & 255) << 16) | ((dn[19] & 255) << 24), + Zr = (dn[20] & 255) | ((dn[21] & 255) << 8) | ((dn[22] & 255) << 16) | ((dn[23] & 255) << 24), + Jr = (dn[24] & 255) | ((dn[25] & 255) << 8) | ((dn[26] & 255) << 16) | ((dn[27] & 255) << 24), + wr = (dn[28] & 255) | ((dn[29] & 255) << 8) | ((dn[30] & 255) << 16) | ((dn[31] & 255) << 24), + Mr = (Jt[12] & 255) | ((Jt[13] & 255) << 8) | ((Jt[14] & 255) << 16) | ((Jt[15] & 255) << 24), + Ur = En, + Rr = Ln, + Pr = Un, + Lr = Kn, + Wr = nr, + Br = lr, + tr = cr, + ir = Hr, + Sr = vr, + dr = Nr, + br = Gr, + $r = eo, + no = Zr, + so = Jr, + fo = wr, + po = Mr, + Yn, + vo = 0; + vo < 20; + vo += 2 + ) + (Yn = (Ur + no) | 0), + (Wr ^= (Yn << 7) | (Yn >>> (32 - 7))), + (Yn = (Wr + Ur) | 0), + (Sr ^= (Yn << 9) | (Yn >>> (32 - 9))), + (Yn = (Sr + Wr) | 0), + (no ^= (Yn << 13) | (Yn >>> (32 - 13))), + (Yn = (no + Sr) | 0), + (Ur ^= (Yn << 18) | (Yn >>> (32 - 18))), + (Yn = (Br + Rr) | 0), + (dr ^= (Yn << 7) | (Yn >>> (32 - 7))), + (Yn = (dr + Br) | 0), + (so ^= (Yn << 9) | (Yn >>> (32 - 9))), + (Yn = (so + dr) | 0), + (Rr ^= (Yn << 13) | (Yn >>> (32 - 13))), + (Yn = (Rr + so) | 0), + (Br ^= (Yn << 18) | (Yn >>> (32 - 18))), + (Yn = (br + tr) | 0), + (fo ^= (Yn << 7) | (Yn >>> (32 - 7))), + (Yn = (fo + br) | 0), + (Pr ^= (Yn << 9) | (Yn >>> (32 - 9))), + (Yn = (Pr + fo) | 0), + (tr ^= (Yn << 13) | (Yn >>> (32 - 13))), + (Yn = (tr + Pr) | 0), + (br ^= (Yn << 18) | (Yn >>> (32 - 18))), + (Yn = (po + $r) | 0), + (Lr ^= (Yn << 7) | (Yn >>> (32 - 7))), + (Yn = (Lr + po) | 0), + (ir ^= (Yn << 9) | (Yn >>> (32 - 9))), + (Yn = (ir + Lr) | 0), + ($r ^= (Yn << 13) | (Yn >>> (32 - 13))), + (Yn = ($r + ir) | 0), + (po ^= (Yn << 18) | (Yn >>> (32 - 18))), + (Yn = (Ur + Lr) | 0), + (Rr ^= (Yn << 7) | (Yn >>> (32 - 7))), + (Yn = (Rr + Ur) | 0), + (Pr ^= (Yn << 9) | (Yn >>> (32 - 9))), + (Yn = (Pr + Rr) | 0), + (Lr ^= (Yn << 13) | (Yn >>> (32 - 13))), + (Yn = (Lr + Pr) | 0), + (Ur ^= (Yn << 18) | (Yn >>> (32 - 18))), + (Yn = (Br + Wr) | 0), + (tr ^= (Yn << 7) | (Yn >>> (32 - 7))), + (Yn = (tr + Br) | 0), + (ir ^= (Yn << 9) | (Yn >>> (32 - 9))), + (Yn = (ir + tr) | 0), + (Wr ^= (Yn << 13) | (Yn >>> (32 - 13))), + (Yn = (Wr + ir) | 0), + (Br ^= (Yn << 18) | (Yn >>> (32 - 18))), + (Yn = (br + dr) | 0), + ($r ^= (Yn << 7) | (Yn >>> (32 - 7))), + (Yn = ($r + br) | 0), + (Sr ^= (Yn << 9) | (Yn >>> (32 - 9))), + (Yn = (Sr + $r) | 0), + (dr ^= (Yn << 13) | (Yn >>> (32 - 13))), + (Yn = (dr + Sr) | 0), + (br ^= (Yn << 18) | (Yn >>> (32 - 18))), + (Yn = (po + fo) | 0), + (no ^= (Yn << 7) | (Yn >>> (32 - 7))), + (Yn = (no + po) | 0), + (so ^= (Yn << 9) | (Yn >>> (32 - 9))), + (Yn = (so + no) | 0), + (fo ^= (Yn << 13) | (Yn >>> (32 - 13))), + (Yn = (fo + so) | 0), + (po ^= (Yn << 18) | (Yn >>> (32 - 18))) + ;(Ur = (Ur + En) | 0), + (Rr = (Rr + Ln) | 0), + (Pr = (Pr + Un) | 0), + (Lr = (Lr + Kn) | 0), + (Wr = (Wr + nr) | 0), + (Br = (Br + lr) | 0), + (tr = (tr + cr) | 0), + (ir = (ir + Hr) | 0), + (Sr = (Sr + vr) | 0), + (dr = (dr + Nr) | 0), + (br = (br + Gr) | 0), + ($r = ($r + eo) | 0), + (no = (no + Zr) | 0), + (so = (so + Jr) | 0), + (fo = (fo + wr) | 0), + (po = (po + Mr) | 0), + (xn[0] = (Ur >>> 0) & 255), + (xn[1] = (Ur >>> 8) & 255), + (xn[2] = (Ur >>> 16) & 255), + (xn[3] = (Ur >>> 24) & 255), + (xn[4] = (Rr >>> 0) & 255), + (xn[5] = (Rr >>> 8) & 255), + (xn[6] = (Rr >>> 16) & 255), + (xn[7] = (Rr >>> 24) & 255), + (xn[8] = (Pr >>> 0) & 255), + (xn[9] = (Pr >>> 8) & 255), + (xn[10] = (Pr >>> 16) & 255), + (xn[11] = (Pr >>> 24) & 255), + (xn[12] = (Lr >>> 0) & 255), + (xn[13] = (Lr >>> 8) & 255), + (xn[14] = (Lr >>> 16) & 255), + (xn[15] = (Lr >>> 24) & 255), + (xn[16] = (Wr >>> 0) & 255), + (xn[17] = (Wr >>> 8) & 255), + (xn[18] = (Wr >>> 16) & 255), + (xn[19] = (Wr >>> 24) & 255), + (xn[20] = (Br >>> 0) & 255), + (xn[21] = (Br >>> 8) & 255), + (xn[22] = (Br >>> 16) & 255), + (xn[23] = (Br >>> 24) & 255), + (xn[24] = (tr >>> 0) & 255), + (xn[25] = (tr >>> 8) & 255), + (xn[26] = (tr >>> 16) & 255), + (xn[27] = (tr >>> 24) & 255), + (xn[28] = (ir >>> 0) & 255), + (xn[29] = (ir >>> 8) & 255), + (xn[30] = (ir >>> 16) & 255), + (xn[31] = (ir >>> 24) & 255), + (xn[32] = (Sr >>> 0) & 255), + (xn[33] = (Sr >>> 8) & 255), + (xn[34] = (Sr >>> 16) & 255), + (xn[35] = (Sr >>> 24) & 255), + (xn[36] = (dr >>> 0) & 255), + (xn[37] = (dr >>> 8) & 255), + (xn[38] = (dr >>> 16) & 255), + (xn[39] = (dr >>> 24) & 255), + (xn[40] = (br >>> 0) & 255), + (xn[41] = (br >>> 8) & 255), + (xn[42] = (br >>> 16) & 255), + (xn[43] = (br >>> 24) & 255), + (xn[44] = ($r >>> 0) & 255), + (xn[45] = ($r >>> 8) & 255), + (xn[46] = ($r >>> 16) & 255), + (xn[47] = ($r >>> 24) & 255), + (xn[48] = (no >>> 0) & 255), + (xn[49] = (no >>> 8) & 255), + (xn[50] = (no >>> 16) & 255), + (xn[51] = (no >>> 24) & 255), + (xn[52] = (so >>> 0) & 255), + (xn[53] = (so >>> 8) & 255), + (xn[54] = (so >>> 16) & 255), + (xn[55] = (so >>> 24) & 255), + (xn[56] = (fo >>> 0) & 255), + (xn[57] = (fo >>> 8) & 255), + (xn[58] = (fo >>> 16) & 255), + (xn[59] = (fo >>> 24) & 255), + (xn[60] = (po >>> 0) & 255), + (xn[61] = (po >>> 8) & 255), + (xn[62] = (po >>> 16) & 255), + (xn[63] = (po >>> 24) & 255) + } + function xt(xn, Mn, dn, Jt) { + for ( + var En = (Jt[0] & 255) | ((Jt[1] & 255) << 8) | ((Jt[2] & 255) << 16) | ((Jt[3] & 255) << 24), + Ln = (dn[0] & 255) | ((dn[1] & 255) << 8) | ((dn[2] & 255) << 16) | ((dn[3] & 255) << 24), + Un = (dn[4] & 255) | ((dn[5] & 255) << 8) | ((dn[6] & 255) << 16) | ((dn[7] & 255) << 24), + Kn = (dn[8] & 255) | ((dn[9] & 255) << 8) | ((dn[10] & 255) << 16) | ((dn[11] & 255) << 24), + nr = (dn[12] & 255) | ((dn[13] & 255) << 8) | ((dn[14] & 255) << 16) | ((dn[15] & 255) << 24), + lr = (Jt[4] & 255) | ((Jt[5] & 255) << 8) | ((Jt[6] & 255) << 16) | ((Jt[7] & 255) << 24), + cr = (Mn[0] & 255) | ((Mn[1] & 255) << 8) | ((Mn[2] & 255) << 16) | ((Mn[3] & 255) << 24), + Hr = (Mn[4] & 255) | ((Mn[5] & 255) << 8) | ((Mn[6] & 255) << 16) | ((Mn[7] & 255) << 24), + vr = (Mn[8] & 255) | ((Mn[9] & 255) << 8) | ((Mn[10] & 255) << 16) | ((Mn[11] & 255) << 24), + Nr = (Mn[12] & 255) | ((Mn[13] & 255) << 8) | ((Mn[14] & 255) << 16) | ((Mn[15] & 255) << 24), + Gr = (Jt[8] & 255) | ((Jt[9] & 255) << 8) | ((Jt[10] & 255) << 16) | ((Jt[11] & 255) << 24), + eo = (dn[16] & 255) | ((dn[17] & 255) << 8) | ((dn[18] & 255) << 16) | ((dn[19] & 255) << 24), + Zr = (dn[20] & 255) | ((dn[21] & 255) << 8) | ((dn[22] & 255) << 16) | ((dn[23] & 255) << 24), + Jr = (dn[24] & 255) | ((dn[25] & 255) << 8) | ((dn[26] & 255) << 16) | ((dn[27] & 255) << 24), + wr = (dn[28] & 255) | ((dn[29] & 255) << 8) | ((dn[30] & 255) << 16) | ((dn[31] & 255) << 24), + Mr = (Jt[12] & 255) | ((Jt[13] & 255) << 8) | ((Jt[14] & 255) << 16) | ((Jt[15] & 255) << 24), + Ur = En, + Rr = Ln, + Pr = Un, + Lr = Kn, + Wr = nr, + Br = lr, + tr = cr, + ir = Hr, + Sr = vr, + dr = Nr, + br = Gr, + $r = eo, + no = Zr, + so = Jr, + fo = wr, + po = Mr, + Yn, + vo = 0; + vo < 20; + vo += 2 + ) + (Yn = (Ur + no) | 0), + (Wr ^= (Yn << 7) | (Yn >>> (32 - 7))), + (Yn = (Wr + Ur) | 0), + (Sr ^= (Yn << 9) | (Yn >>> (32 - 9))), + (Yn = (Sr + Wr) | 0), + (no ^= (Yn << 13) | (Yn >>> (32 - 13))), + (Yn = (no + Sr) | 0), + (Ur ^= (Yn << 18) | (Yn >>> (32 - 18))), + (Yn = (Br + Rr) | 0), + (dr ^= (Yn << 7) | (Yn >>> (32 - 7))), + (Yn = (dr + Br) | 0), + (so ^= (Yn << 9) | (Yn >>> (32 - 9))), + (Yn = (so + dr) | 0), + (Rr ^= (Yn << 13) | (Yn >>> (32 - 13))), + (Yn = (Rr + so) | 0), + (Br ^= (Yn << 18) | (Yn >>> (32 - 18))), + (Yn = (br + tr) | 0), + (fo ^= (Yn << 7) | (Yn >>> (32 - 7))), + (Yn = (fo + br) | 0), + (Pr ^= (Yn << 9) | (Yn >>> (32 - 9))), + (Yn = (Pr + fo) | 0), + (tr ^= (Yn << 13) | (Yn >>> (32 - 13))), + (Yn = (tr + Pr) | 0), + (br ^= (Yn << 18) | (Yn >>> (32 - 18))), + (Yn = (po + $r) | 0), + (Lr ^= (Yn << 7) | (Yn >>> (32 - 7))), + (Yn = (Lr + po) | 0), + (ir ^= (Yn << 9) | (Yn >>> (32 - 9))), + (Yn = (ir + Lr) | 0), + ($r ^= (Yn << 13) | (Yn >>> (32 - 13))), + (Yn = ($r + ir) | 0), + (po ^= (Yn << 18) | (Yn >>> (32 - 18))), + (Yn = (Ur + Lr) | 0), + (Rr ^= (Yn << 7) | (Yn >>> (32 - 7))), + (Yn = (Rr + Ur) | 0), + (Pr ^= (Yn << 9) | (Yn >>> (32 - 9))), + (Yn = (Pr + Rr) | 0), + (Lr ^= (Yn << 13) | (Yn >>> (32 - 13))), + (Yn = (Lr + Pr) | 0), + (Ur ^= (Yn << 18) | (Yn >>> (32 - 18))), + (Yn = (Br + Wr) | 0), + (tr ^= (Yn << 7) | (Yn >>> (32 - 7))), + (Yn = (tr + Br) | 0), + (ir ^= (Yn << 9) | (Yn >>> (32 - 9))), + (Yn = (ir + tr) | 0), + (Wr ^= (Yn << 13) | (Yn >>> (32 - 13))), + (Yn = (Wr + ir) | 0), + (Br ^= (Yn << 18) | (Yn >>> (32 - 18))), + (Yn = (br + dr) | 0), + ($r ^= (Yn << 7) | (Yn >>> (32 - 7))), + (Yn = ($r + br) | 0), + (Sr ^= (Yn << 9) | (Yn >>> (32 - 9))), + (Yn = (Sr + $r) | 0), + (dr ^= (Yn << 13) | (Yn >>> (32 - 13))), + (Yn = (dr + Sr) | 0), + (br ^= (Yn << 18) | (Yn >>> (32 - 18))), + (Yn = (po + fo) | 0), + (no ^= (Yn << 7) | (Yn >>> (32 - 7))), + (Yn = (no + po) | 0), + (so ^= (Yn << 9) | (Yn >>> (32 - 9))), + (Yn = (so + no) | 0), + (fo ^= (Yn << 13) | (Yn >>> (32 - 13))), + (Yn = (fo + so) | 0), + (po ^= (Yn << 18) | (Yn >>> (32 - 18))) + ;(xn[0] = (Ur >>> 0) & 255), + (xn[1] = (Ur >>> 8) & 255), + (xn[2] = (Ur >>> 16) & 255), + (xn[3] = (Ur >>> 24) & 255), + (xn[4] = (Br >>> 0) & 255), + (xn[5] = (Br >>> 8) & 255), + (xn[6] = (Br >>> 16) & 255), + (xn[7] = (Br >>> 24) & 255), + (xn[8] = (br >>> 0) & 255), + (xn[9] = (br >>> 8) & 255), + (xn[10] = (br >>> 16) & 255), + (xn[11] = (br >>> 24) & 255), + (xn[12] = (po >>> 0) & 255), + (xn[13] = (po >>> 8) & 255), + (xn[14] = (po >>> 16) & 255), + (xn[15] = (po >>> 24) & 255), + (xn[16] = (tr >>> 0) & 255), + (xn[17] = (tr >>> 8) & 255), + (xn[18] = (tr >>> 16) & 255), + (xn[19] = (tr >>> 24) & 255), + (xn[20] = (ir >>> 0) & 255), + (xn[21] = (ir >>> 8) & 255), + (xn[22] = (ir >>> 16) & 255), + (xn[23] = (ir >>> 24) & 255), + (xn[24] = (Sr >>> 0) & 255), + (xn[25] = (Sr >>> 8) & 255), + (xn[26] = (Sr >>> 16) & 255), + (xn[27] = (Sr >>> 24) & 255), + (xn[28] = (dr >>> 0) & 255), + (xn[29] = (dr >>> 8) & 255), + (xn[30] = (dr >>> 16) & 255), + (xn[31] = (dr >>> 24) & 255) + } + function kt(xn, Mn, dn, Jt) { + vt(xn, Mn, dn, Jt) + } + function St(xn, Mn, dn, Jt) { + xt(xn, Mn, dn, Jt) + } + var Tt = new Uint8Array([101, 120, 112, 97, 110, 100, 32, 51, 50, 45, 98, 121, 116, 101, 32, 107]) + function At(xn, Mn, dn, Jt, En, Ln, Un) { + var Kn = new Uint8Array(16), + nr = new Uint8Array(64), + lr, + cr + for (cr = 0; cr < 16; cr++) Kn[cr] = 0 + for (cr = 0; cr < 8; cr++) Kn[cr] = Ln[cr] + for (; En >= 64; ) { + for (kt(nr, Kn, Un, Tt), cr = 0; cr < 64; cr++) xn[Mn + cr] = dn[Jt + cr] ^ nr[cr] + for (lr = 1, cr = 8; cr < 16; cr++) (lr = (lr + (Kn[cr] & 255)) | 0), (Kn[cr] = lr & 255), (lr >>>= 8) + ;(En -= 64), (Mn += 64), (Jt += 64) + } + if (En > 0) for (kt(nr, Kn, Un, Tt), cr = 0; cr < En; cr++) xn[Mn + cr] = dn[Jt + cr] ^ nr[cr] + return 0 + } + function Et(xn, Mn, dn, Jt, En) { + var Ln = new Uint8Array(16), + Un = new Uint8Array(64), + Kn, + nr + for (nr = 0; nr < 16; nr++) Ln[nr] = 0 + for (nr = 0; nr < 8; nr++) Ln[nr] = Jt[nr] + for (; dn >= 64; ) { + for (kt(Un, Ln, En, Tt), nr = 0; nr < 64; nr++) xn[Mn + nr] = Un[nr] + for (Kn = 1, nr = 8; nr < 16; nr++) (Kn = (Kn + (Ln[nr] & 255)) | 0), (Ln[nr] = Kn & 255), (Kn >>>= 8) + ;(dn -= 64), (Mn += 64) + } + if (dn > 0) for (kt(Un, Ln, En, Tt), nr = 0; nr < dn; nr++) xn[Mn + nr] = Un[nr] + return 0 + } + function $t(xn, Mn, dn, Jt, En) { + var Ln = new Uint8Array(32) + St(Ln, Jt, En, Tt) + for (var Un = new Uint8Array(8), Kn = 0; Kn < 8; Kn++) Un[Kn] = Jt[Kn + 16] + return Et(xn, Mn, dn, Un, Ln) + } + function Dt(xn, Mn, dn, Jt, En, Ln, Un) { + var Kn = new Uint8Array(32) + St(Kn, Ln, Un, Tt) + for (var nr = new Uint8Array(8), lr = 0; lr < 8; lr++) nr[lr] = Ln[lr + 16] + return At(xn, Mn, dn, Jt, En, nr, Kn) + } + var jt = function (xn) { + ;(this.buffer = new Uint8Array(16)), + (this.r = new Uint16Array(10)), + (this.h = new Uint16Array(10)), + (this.pad = new Uint16Array(8)), + (this.leftover = 0), + (this.fin = 0) + var Mn, dn, Jt, En, Ln, Un, Kn, nr + ;(Mn = (xn[0] & 255) | ((xn[1] & 255) << 8)), + (this.r[0] = Mn & 8191), + (dn = (xn[2] & 255) | ((xn[3] & 255) << 8)), + (this.r[1] = ((Mn >>> 13) | (dn << 3)) & 8191), + (Jt = (xn[4] & 255) | ((xn[5] & 255) << 8)), + (this.r[2] = ((dn >>> 10) | (Jt << 6)) & 7939), + (En = (xn[6] & 255) | ((xn[7] & 255) << 8)), + (this.r[3] = ((Jt >>> 7) | (En << 9)) & 8191), + (Ln = (xn[8] & 255) | ((xn[9] & 255) << 8)), + (this.r[4] = ((En >>> 4) | (Ln << 12)) & 255), + (this.r[5] = (Ln >>> 1) & 8190), + (Un = (xn[10] & 255) | ((xn[11] & 255) << 8)), + (this.r[6] = ((Ln >>> 14) | (Un << 2)) & 8191), + (Kn = (xn[12] & 255) | ((xn[13] & 255) << 8)), + (this.r[7] = ((Un >>> 11) | (Kn << 5)) & 8065), + (nr = (xn[14] & 255) | ((xn[15] & 255) << 8)), + (this.r[8] = ((Kn >>> 8) | (nr << 8)) & 8191), + (this.r[9] = (nr >>> 5) & 127), + (this.pad[0] = (xn[16] & 255) | ((xn[17] & 255) << 8)), + (this.pad[1] = (xn[18] & 255) | ((xn[19] & 255) << 8)), + (this.pad[2] = (xn[20] & 255) | ((xn[21] & 255) << 8)), + (this.pad[3] = (xn[22] & 255) | ((xn[23] & 255) << 8)), + (this.pad[4] = (xn[24] & 255) | ((xn[25] & 255) << 8)), + (this.pad[5] = (xn[26] & 255) | ((xn[27] & 255) << 8)), + (this.pad[6] = (xn[28] & 255) | ((xn[29] & 255) << 8)), + (this.pad[7] = (xn[30] & 255) | ((xn[31] & 255) << 8)) + } + ;(jt.prototype.blocks = function (xn, Mn, dn) { + for ( + var Jt = this.fin ? 0 : 2048, + En, + Ln, + Un, + Kn, + nr, + lr, + cr, + Hr, + vr, + Nr, + Gr, + eo, + Zr, + Jr, + wr, + Mr, + Ur, + Rr, + Pr, + Lr = this.h[0], + Wr = this.h[1], + Br = this.h[2], + tr = this.h[3], + ir = this.h[4], + Sr = this.h[5], + dr = this.h[6], + br = this.h[7], + $r = this.h[8], + no = this.h[9], + so = this.r[0], + fo = this.r[1], + po = this.r[2], + Yn = this.r[3], + vo = this.r[4], + _o = this.r[5], + xo = this.r[6], + bo = this.r[7], + Co = this.r[8], + Ro = this.r[9]; + dn >= 16; + + ) + (En = (xn[Mn + 0] & 255) | ((xn[Mn + 1] & 255) << 8)), + (Lr += En & 8191), + (Ln = (xn[Mn + 2] & 255) | ((xn[Mn + 3] & 255) << 8)), + (Wr += ((En >>> 13) | (Ln << 3)) & 8191), + (Un = (xn[Mn + 4] & 255) | ((xn[Mn + 5] & 255) << 8)), + (Br += ((Ln >>> 10) | (Un << 6)) & 8191), + (Kn = (xn[Mn + 6] & 255) | ((xn[Mn + 7] & 255) << 8)), + (tr += ((Un >>> 7) | (Kn << 9)) & 8191), + (nr = (xn[Mn + 8] & 255) | ((xn[Mn + 9] & 255) << 8)), + (ir += ((Kn >>> 4) | (nr << 12)) & 8191), + (Sr += (nr >>> 1) & 8191), + (lr = (xn[Mn + 10] & 255) | ((xn[Mn + 11] & 255) << 8)), + (dr += ((nr >>> 14) | (lr << 2)) & 8191), + (cr = (xn[Mn + 12] & 255) | ((xn[Mn + 13] & 255) << 8)), + (br += ((lr >>> 11) | (cr << 5)) & 8191), + (Hr = (xn[Mn + 14] & 255) | ((xn[Mn + 15] & 255) << 8)), + ($r += ((cr >>> 8) | (Hr << 8)) & 8191), + (no += (Hr >>> 5) | Jt), + (vr = 0), + (Nr = vr), + (Nr += Lr * so), + (Nr += Wr * (5 * Ro)), + (Nr += Br * (5 * Co)), + (Nr += tr * (5 * bo)), + (Nr += ir * (5 * xo)), + (vr = Nr >>> 13), + (Nr &= 8191), + (Nr += Sr * (5 * _o)), + (Nr += dr * (5 * vo)), + (Nr += br * (5 * Yn)), + (Nr += $r * (5 * po)), + (Nr += no * (5 * fo)), + (vr += Nr >>> 13), + (Nr &= 8191), + (Gr = vr), + (Gr += Lr * fo), + (Gr += Wr * so), + (Gr += Br * (5 * Ro)), + (Gr += tr * (5 * Co)), + (Gr += ir * (5 * bo)), + (vr = Gr >>> 13), + (Gr &= 8191), + (Gr += Sr * (5 * xo)), + (Gr += dr * (5 * _o)), + (Gr += br * (5 * vo)), + (Gr += $r * (5 * Yn)), + (Gr += no * (5 * po)), + (vr += Gr >>> 13), + (Gr &= 8191), + (eo = vr), + (eo += Lr * po), + (eo += Wr * fo), + (eo += Br * so), + (eo += tr * (5 * Ro)), + (eo += ir * (5 * Co)), + (vr = eo >>> 13), + (eo &= 8191), + (eo += Sr * (5 * bo)), + (eo += dr * (5 * xo)), + (eo += br * (5 * _o)), + (eo += $r * (5 * vo)), + (eo += no * (5 * Yn)), + (vr += eo >>> 13), + (eo &= 8191), + (Zr = vr), + (Zr += Lr * Yn), + (Zr += Wr * po), + (Zr += Br * fo), + (Zr += tr * so), + (Zr += ir * (5 * Ro)), + (vr = Zr >>> 13), + (Zr &= 8191), + (Zr += Sr * (5 * Co)), + (Zr += dr * (5 * bo)), + (Zr += br * (5 * xo)), + (Zr += $r * (5 * _o)), + (Zr += no * (5 * vo)), + (vr += Zr >>> 13), + (Zr &= 8191), + (Jr = vr), + (Jr += Lr * vo), + (Jr += Wr * Yn), + (Jr += Br * po), + (Jr += tr * fo), + (Jr += ir * so), + (vr = Jr >>> 13), + (Jr &= 8191), + (Jr += Sr * (5 * Ro)), + (Jr += dr * (5 * Co)), + (Jr += br * (5 * bo)), + (Jr += $r * (5 * xo)), + (Jr += no * (5 * _o)), + (vr += Jr >>> 13), + (Jr &= 8191), + (wr = vr), + (wr += Lr * _o), + (wr += Wr * vo), + (wr += Br * Yn), + (wr += tr * po), + (wr += ir * fo), + (vr = wr >>> 13), + (wr &= 8191), + (wr += Sr * so), + (wr += dr * (5 * Ro)), + (wr += br * (5 * Co)), + (wr += $r * (5 * bo)), + (wr += no * (5 * xo)), + (vr += wr >>> 13), + (wr &= 8191), + (Mr = vr), + (Mr += Lr * xo), + (Mr += Wr * _o), + (Mr += Br * vo), + (Mr += tr * Yn), + (Mr += ir * po), + (vr = Mr >>> 13), + (Mr &= 8191), + (Mr += Sr * fo), + (Mr += dr * so), + (Mr += br * (5 * Ro)), + (Mr += $r * (5 * Co)), + (Mr += no * (5 * bo)), + (vr += Mr >>> 13), + (Mr &= 8191), + (Ur = vr), + (Ur += Lr * bo), + (Ur += Wr * xo), + (Ur += Br * _o), + (Ur += tr * vo), + (Ur += ir * Yn), + (vr = Ur >>> 13), + (Ur &= 8191), + (Ur += Sr * po), + (Ur += dr * fo), + (Ur += br * so), + (Ur += $r * (5 * Ro)), + (Ur += no * (5 * Co)), + (vr += Ur >>> 13), + (Ur &= 8191), + (Rr = vr), + (Rr += Lr * Co), + (Rr += Wr * bo), + (Rr += Br * xo), + (Rr += tr * _o), + (Rr += ir * vo), + (vr = Rr >>> 13), + (Rr &= 8191), + (Rr += Sr * Yn), + (Rr += dr * po), + (Rr += br * fo), + (Rr += $r * so), + (Rr += no * (5 * Ro)), + (vr += Rr >>> 13), + (Rr &= 8191), + (Pr = vr), + (Pr += Lr * Ro), + (Pr += Wr * Co), + (Pr += Br * bo), + (Pr += tr * xo), + (Pr += ir * _o), + (vr = Pr >>> 13), + (Pr &= 8191), + (Pr += Sr * vo), + (Pr += dr * Yn), + (Pr += br * po), + (Pr += $r * fo), + (Pr += no * so), + (vr += Pr >>> 13), + (Pr &= 8191), + (vr = ((vr << 2) + vr) | 0), + (vr = (vr + Nr) | 0), + (Nr = vr & 8191), + (vr = vr >>> 13), + (Gr += vr), + (Lr = Nr), + (Wr = Gr), + (Br = eo), + (tr = Zr), + (ir = Jr), + (Sr = wr), + (dr = Mr), + (br = Ur), + ($r = Rr), + (no = Pr), + (Mn += 16), + (dn -= 16) + ;(this.h[0] = Lr), + (this.h[1] = Wr), + (this.h[2] = Br), + (this.h[3] = tr), + (this.h[4] = ir), + (this.h[5] = Sr), + (this.h[6] = dr), + (this.h[7] = br), + (this.h[8] = $r), + (this.h[9] = no) + }), + (jt.prototype.finish = function (xn, Mn) { + var dn = new Uint16Array(10), + Jt, + En, + Ln, + Un + if (this.leftover) { + for (Un = this.leftover, this.buffer[Un++] = 1; Un < 16; Un++) this.buffer[Un] = 0 + ;(this.fin = 1), this.blocks(this.buffer, 0, 16) + } + for (Jt = this.h[1] >>> 13, this.h[1] &= 8191, Un = 2; Un < 10; Un++) + (this.h[Un] += Jt), (Jt = this.h[Un] >>> 13), (this.h[Un] &= 8191) + for ( + this.h[0] += Jt * 5, + Jt = this.h[0] >>> 13, + this.h[0] &= 8191, + this.h[1] += Jt, + Jt = this.h[1] >>> 13, + this.h[1] &= 8191, + this.h[2] += Jt, + dn[0] = this.h[0] + 5, + Jt = dn[0] >>> 13, + dn[0] &= 8191, + Un = 1; + Un < 10; + Un++ + ) + (dn[Un] = this.h[Un] + Jt), (Jt = dn[Un] >>> 13), (dn[Un] &= 8191) + for (dn[9] -= 8192, En = (Jt ^ 1) - 1, Un = 0; Un < 10; Un++) dn[Un] &= En + for (En = ~En, Un = 0; Un < 10; Un++) this.h[Un] = (this.h[Un] & En) | dn[Un] + for ( + this.h[0] = (this.h[0] | (this.h[1] << 13)) & 65535, + this.h[1] = ((this.h[1] >>> 3) | (this.h[2] << 10)) & 65535, + this.h[2] = ((this.h[2] >>> 6) | (this.h[3] << 7)) & 65535, + this.h[3] = ((this.h[3] >>> 9) | (this.h[4] << 4)) & 65535, + this.h[4] = ((this.h[4] >>> 12) | (this.h[5] << 1) | (this.h[6] << 14)) & 65535, + this.h[5] = ((this.h[6] >>> 2) | (this.h[7] << 11)) & 65535, + this.h[6] = ((this.h[7] >>> 5) | (this.h[8] << 8)) & 65535, + this.h[7] = ((this.h[8] >>> 8) | (this.h[9] << 5)) & 65535, + Ln = this.h[0] + this.pad[0], + this.h[0] = Ln & 65535, + Un = 1; + Un < 8; + Un++ + ) + (Ln = (((this.h[Un] + this.pad[Un]) | 0) + (Ln >>> 16)) | 0), (this.h[Un] = Ln & 65535) + ;(xn[Mn + 0] = (this.h[0] >>> 0) & 255), + (xn[Mn + 1] = (this.h[0] >>> 8) & 255), + (xn[Mn + 2] = (this.h[1] >>> 0) & 255), + (xn[Mn + 3] = (this.h[1] >>> 8) & 255), + (xn[Mn + 4] = (this.h[2] >>> 0) & 255), + (xn[Mn + 5] = (this.h[2] >>> 8) & 255), + (xn[Mn + 6] = (this.h[3] >>> 0) & 255), + (xn[Mn + 7] = (this.h[3] >>> 8) & 255), + (xn[Mn + 8] = (this.h[4] >>> 0) & 255), + (xn[Mn + 9] = (this.h[4] >>> 8) & 255), + (xn[Mn + 10] = (this.h[5] >>> 0) & 255), + (xn[Mn + 11] = (this.h[5] >>> 8) & 255), + (xn[Mn + 12] = (this.h[6] >>> 0) & 255), + (xn[Mn + 13] = (this.h[6] >>> 8) & 255), + (xn[Mn + 14] = (this.h[7] >>> 0) & 255), + (xn[Mn + 15] = (this.h[7] >>> 8) & 255) + }), + (jt.prototype.update = function (xn, Mn, dn) { + var Jt, En + if (this.leftover) { + for (En = 16 - this.leftover, En > dn && (En = dn), Jt = 0; Jt < En; Jt++) + this.buffer[this.leftover + Jt] = xn[Mn + Jt] + if (((dn -= En), (Mn += En), (this.leftover += En), this.leftover < 16)) return + this.blocks(this.buffer, 0, 16), (this.leftover = 0) + } + if ((dn >= 16 && ((En = dn - (dn % 16)), this.blocks(xn, Mn, En), (Mn += En), (dn -= En)), dn)) { + for (Jt = 0; Jt < dn; Jt++) this.buffer[this.leftover + Jt] = xn[Mn + Jt] + this.leftover += dn + } + }) + function Pt(xn, Mn, dn, Jt, En, Ln) { + var Un = new jt(Ln) + return Un.update(dn, Jt, En), Un.finish(xn, Mn), 0 + } + function Ct(xn, Mn, dn, Jt, En, Ln) { + var Un = new Uint8Array(16) + return Pt(Un, 0, dn, Jt, En, Ln), yt(xn, Mn, Un, 0) + } + function wt(xn, Mn, dn, Jt, En) { + var Ln + if (dn < 32) return -1 + for (Dt(xn, 0, Mn, 0, dn, Jt, En), Pt(xn, 16, xn, 32, dn - 32, xn), Ln = 0; Ln < 16; Ln++) xn[Ln] = 0 + return 0 + } + function It(xn, Mn, dn, Jt, En) { + var Ln, + Un = new Uint8Array(32) + if (dn < 32 || ($t(Un, 0, 32, Jt, En), Ct(Mn, 16, Mn, 32, dn - 32, Un) !== 0)) return -1 + for (Dt(xn, 0, Mn, 0, dn, Jt, En), Ln = 0; Ln < 32; Ln++) xn[Ln] = 0 + return 0 + } + function Ot(xn, Mn) { + var dn + for (dn = 0; dn < 16; dn++) xn[dn] = Mn[dn] | 0 + } + function Wt(xn) { + var Mn, + dn, + Jt = 1 + for (Mn = 0; Mn < 16; Mn++) + (dn = xn[Mn] + Jt + 65535), (Jt = Math.floor(dn / 65536)), (xn[Mn] = dn - Jt * 65536) + xn[0] += Jt - 1 + 37 * (Jt - 1) + } + function zt(xn, Mn, dn) { + for (var Jt, En = ~(dn - 1), Ln = 0; Ln < 16; Ln++) + (Jt = En & (xn[Ln] ^ Mn[Ln])), (xn[Ln] ^= Jt), (Mn[Ln] ^= Jt) + } + function Ft(xn, Mn) { + var dn, + Jt, + En, + Ln = nt(), + Un = nt() + for (dn = 0; dn < 16; dn++) Un[dn] = Mn[dn] + for (Wt(Un), Wt(Un), Wt(Un), Jt = 0; Jt < 2; Jt++) { + for (Ln[0] = Un[0] - 65517, dn = 1; dn < 15; dn++) + (Ln[dn] = Un[dn] - 65535 - ((Ln[dn - 1] >> 16) & 1)), (Ln[dn - 1] &= 65535) + ;(Ln[15] = Un[15] - 32767 - ((Ln[14] >> 16) & 1)), + (En = (Ln[15] >> 16) & 1), + (Ln[14] &= 65535), + zt(Un, Ln, 1 - En) + } + for (dn = 0; dn < 16; dn++) (xn[2 * dn] = Un[dn] & 255), (xn[2 * dn + 1] = Un[dn] >> 8) + } + function Nt(xn, Mn) { + var dn = new Uint8Array(32), + Jt = new Uint8Array(32) + return Ft(dn, xn), Ft(Jt, Mn), bt(dn, 0, Jt, 0) + } + function Ut(xn) { + var Mn = new Uint8Array(32) + return Ft(Mn, xn), Mn[0] & 1 + } + function Mt(xn, Mn) { + var dn + for (dn = 0; dn < 16; dn++) xn[dn] = Mn[2 * dn] + (Mn[2 * dn + 1] << 8) + xn[15] &= 32767 + } + function Ht(xn, Mn, dn) { + for (var Jt = 0; Jt < 16; Jt++) xn[Jt] = Mn[Jt] + dn[Jt] + } + function en(xn, Mn, dn) { + for (var Jt = 0; Jt < 16; Jt++) xn[Jt] = Mn[Jt] - dn[Jt] + } + function sn(xn, Mn, dn) { + var Jt, + En, + Ln = 0, + Un = 0, + Kn = 0, + nr = 0, + lr = 0, + cr = 0, + Hr = 0, + vr = 0, + Nr = 0, + Gr = 0, + eo = 0, + Zr = 0, + Jr = 0, + wr = 0, + Mr = 0, + Ur = 0, + Rr = 0, + Pr = 0, + Lr = 0, + Wr = 0, + Br = 0, + tr = 0, + ir = 0, + Sr = 0, + dr = 0, + br = 0, + $r = 0, + no = 0, + so = 0, + fo = 0, + po = 0, + Yn = dn[0], + vo = dn[1], + _o = dn[2], + xo = dn[3], + bo = dn[4], + Co = dn[5], + Ro = dn[6], + Wo = dn[7], + Po = dn[8], + Fo = dn[9], + Go = dn[10], + Xo = dn[11], + ga = dn[12], + na = dn[13], + $a = dn[14], + Zo = dn[15] + ;(Jt = Mn[0]), + (Ln += Jt * Yn), + (Un += Jt * vo), + (Kn += Jt * _o), + (nr += Jt * xo), + (lr += Jt * bo), + (cr += Jt * Co), + (Hr += Jt * Ro), + (vr += Jt * Wo), + (Nr += Jt * Po), + (Gr += Jt * Fo), + (eo += Jt * Go), + (Zr += Jt * Xo), + (Jr += Jt * ga), + (wr += Jt * na), + (Mr += Jt * $a), + (Ur += Jt * Zo), + (Jt = Mn[1]), + (Un += Jt * Yn), + (Kn += Jt * vo), + (nr += Jt * _o), + (lr += Jt * xo), + (cr += Jt * bo), + (Hr += Jt * Co), + (vr += Jt * Ro), + (Nr += Jt * Wo), + (Gr += Jt * Po), + (eo += Jt * Fo), + (Zr += Jt * Go), + (Jr += Jt * Xo), + (wr += Jt * ga), + (Mr += Jt * na), + (Ur += Jt * $a), + (Rr += Jt * Zo), + (Jt = Mn[2]), + (Kn += Jt * Yn), + (nr += Jt * vo), + (lr += Jt * _o), + (cr += Jt * xo), + (Hr += Jt * bo), + (vr += Jt * Co), + (Nr += Jt * Ro), + (Gr += Jt * Wo), + (eo += Jt * Po), + (Zr += Jt * Fo), + (Jr += Jt * Go), + (wr += Jt * Xo), + (Mr += Jt * ga), + (Ur += Jt * na), + (Rr += Jt * $a), + (Pr += Jt * Zo), + (Jt = Mn[3]), + (nr += Jt * Yn), + (lr += Jt * vo), + (cr += Jt * _o), + (Hr += Jt * xo), + (vr += Jt * bo), + (Nr += Jt * Co), + (Gr += Jt * Ro), + (eo += Jt * Wo), + (Zr += Jt * Po), + (Jr += Jt * Fo), + (wr += Jt * Go), + (Mr += Jt * Xo), + (Ur += Jt * ga), + (Rr += Jt * na), + (Pr += Jt * $a), + (Lr += Jt * Zo), + (Jt = Mn[4]), + (lr += Jt * Yn), + (cr += Jt * vo), + (Hr += Jt * _o), + (vr += Jt * xo), + (Nr += Jt * bo), + (Gr += Jt * Co), + (eo += Jt * Ro), + (Zr += Jt * Wo), + (Jr += Jt * Po), + (wr += Jt * Fo), + (Mr += Jt * Go), + (Ur += Jt * Xo), + (Rr += Jt * ga), + (Pr += Jt * na), + (Lr += Jt * $a), + (Wr += Jt * Zo), + (Jt = Mn[5]), + (cr += Jt * Yn), + (Hr += Jt * vo), + (vr += Jt * _o), + (Nr += Jt * xo), + (Gr += Jt * bo), + (eo += Jt * Co), + (Zr += Jt * Ro), + (Jr += Jt * Wo), + (wr += Jt * Po), + (Mr += Jt * Fo), + (Ur += Jt * Go), + (Rr += Jt * Xo), + (Pr += Jt * ga), + (Lr += Jt * na), + (Wr += Jt * $a), + (Br += Jt * Zo), + (Jt = Mn[6]), + (Hr += Jt * Yn), + (vr += Jt * vo), + (Nr += Jt * _o), + (Gr += Jt * xo), + (eo += Jt * bo), + (Zr += Jt * Co), + (Jr += Jt * Ro), + (wr += Jt * Wo), + (Mr += Jt * Po), + (Ur += Jt * Fo), + (Rr += Jt * Go), + (Pr += Jt * Xo), + (Lr += Jt * ga), + (Wr += Jt * na), + (Br += Jt * $a), + (tr += Jt * Zo), + (Jt = Mn[7]), + (vr += Jt * Yn), + (Nr += Jt * vo), + (Gr += Jt * _o), + (eo += Jt * xo), + (Zr += Jt * bo), + (Jr += Jt * Co), + (wr += Jt * Ro), + (Mr += Jt * Wo), + (Ur += Jt * Po), + (Rr += Jt * Fo), + (Pr += Jt * Go), + (Lr += Jt * Xo), + (Wr += Jt * ga), + (Br += Jt * na), + (tr += Jt * $a), + (ir += Jt * Zo), + (Jt = Mn[8]), + (Nr += Jt * Yn), + (Gr += Jt * vo), + (eo += Jt * _o), + (Zr += Jt * xo), + (Jr += Jt * bo), + (wr += Jt * Co), + (Mr += Jt * Ro), + (Ur += Jt * Wo), + (Rr += Jt * Po), + (Pr += Jt * Fo), + (Lr += Jt * Go), + (Wr += Jt * Xo), + (Br += Jt * ga), + (tr += Jt * na), + (ir += Jt * $a), + (Sr += Jt * Zo), + (Jt = Mn[9]), + (Gr += Jt * Yn), + (eo += Jt * vo), + (Zr += Jt * _o), + (Jr += Jt * xo), + (wr += Jt * bo), + (Mr += Jt * Co), + (Ur += Jt * Ro), + (Rr += Jt * Wo), + (Pr += Jt * Po), + (Lr += Jt * Fo), + (Wr += Jt * Go), + (Br += Jt * Xo), + (tr += Jt * ga), + (ir += Jt * na), + (Sr += Jt * $a), + (dr += Jt * Zo), + (Jt = Mn[10]), + (eo += Jt * Yn), + (Zr += Jt * vo), + (Jr += Jt * _o), + (wr += Jt * xo), + (Mr += Jt * bo), + (Ur += Jt * Co), + (Rr += Jt * Ro), + (Pr += Jt * Wo), + (Lr += Jt * Po), + (Wr += Jt * Fo), + (Br += Jt * Go), + (tr += Jt * Xo), + (ir += Jt * ga), + (Sr += Jt * na), + (dr += Jt * $a), + (br += Jt * Zo), + (Jt = Mn[11]), + (Zr += Jt * Yn), + (Jr += Jt * vo), + (wr += Jt * _o), + (Mr += Jt * xo), + (Ur += Jt * bo), + (Rr += Jt * Co), + (Pr += Jt * Ro), + (Lr += Jt * Wo), + (Wr += Jt * Po), + (Br += Jt * Fo), + (tr += Jt * Go), + (ir += Jt * Xo), + (Sr += Jt * ga), + (dr += Jt * na), + (br += Jt * $a), + ($r += Jt * Zo), + (Jt = Mn[12]), + (Jr += Jt * Yn), + (wr += Jt * vo), + (Mr += Jt * _o), + (Ur += Jt * xo), + (Rr += Jt * bo), + (Pr += Jt * Co), + (Lr += Jt * Ro), + (Wr += Jt * Wo), + (Br += Jt * Po), + (tr += Jt * Fo), + (ir += Jt * Go), + (Sr += Jt * Xo), + (dr += Jt * ga), + (br += Jt * na), + ($r += Jt * $a), + (no += Jt * Zo), + (Jt = Mn[13]), + (wr += Jt * Yn), + (Mr += Jt * vo), + (Ur += Jt * _o), + (Rr += Jt * xo), + (Pr += Jt * bo), + (Lr += Jt * Co), + (Wr += Jt * Ro), + (Br += Jt * Wo), + (tr += Jt * Po), + (ir += Jt * Fo), + (Sr += Jt * Go), + (dr += Jt * Xo), + (br += Jt * ga), + ($r += Jt * na), + (no += Jt * $a), + (so += Jt * Zo), + (Jt = Mn[14]), + (Mr += Jt * Yn), + (Ur += Jt * vo), + (Rr += Jt * _o), + (Pr += Jt * xo), + (Lr += Jt * bo), + (Wr += Jt * Co), + (Br += Jt * Ro), + (tr += Jt * Wo), + (ir += Jt * Po), + (Sr += Jt * Fo), + (dr += Jt * Go), + (br += Jt * Xo), + ($r += Jt * ga), + (no += Jt * na), + (so += Jt * $a), + (fo += Jt * Zo), + (Jt = Mn[15]), + (Ur += Jt * Yn), + (Rr += Jt * vo), + (Pr += Jt * _o), + (Lr += Jt * xo), + (Wr += Jt * bo), + (Br += Jt * Co), + (tr += Jt * Ro), + (ir += Jt * Wo), + (Sr += Jt * Po), + (dr += Jt * Fo), + (br += Jt * Go), + ($r += Jt * Xo), + (no += Jt * ga), + (so += Jt * na), + (fo += Jt * $a), + (po += Jt * Zo), + (Ln += 38 * Rr), + (Un += 38 * Pr), + (Kn += 38 * Lr), + (nr += 38 * Wr), + (lr += 38 * Br), + (cr += 38 * tr), + (Hr += 38 * ir), + (vr += 38 * Sr), + (Nr += 38 * dr), + (Gr += 38 * br), + (eo += 38 * $r), + (Zr += 38 * no), + (Jr += 38 * so), + (wr += 38 * fo), + (Mr += 38 * po), + (En = 1), + (Jt = Ln + En + 65535), + (En = Math.floor(Jt / 65536)), + (Ln = Jt - En * 65536), + (Jt = Un + En + 65535), + (En = Math.floor(Jt / 65536)), + (Un = Jt - En * 65536), + (Jt = Kn + En + 65535), + (En = Math.floor(Jt / 65536)), + (Kn = Jt - En * 65536), + (Jt = nr + En + 65535), + (En = Math.floor(Jt / 65536)), + (nr = Jt - En * 65536), + (Jt = lr + En + 65535), + (En = Math.floor(Jt / 65536)), + (lr = Jt - En * 65536), + (Jt = cr + En + 65535), + (En = Math.floor(Jt / 65536)), + (cr = Jt - En * 65536), + (Jt = Hr + En + 65535), + (En = Math.floor(Jt / 65536)), + (Hr = Jt - En * 65536), + (Jt = vr + En + 65535), + (En = Math.floor(Jt / 65536)), + (vr = Jt - En * 65536), + (Jt = Nr + En + 65535), + (En = Math.floor(Jt / 65536)), + (Nr = Jt - En * 65536), + (Jt = Gr + En + 65535), + (En = Math.floor(Jt / 65536)), + (Gr = Jt - En * 65536), + (Jt = eo + En + 65535), + (En = Math.floor(Jt / 65536)), + (eo = Jt - En * 65536), + (Jt = Zr + En + 65535), + (En = Math.floor(Jt / 65536)), + (Zr = Jt - En * 65536), + (Jt = Jr + En + 65535), + (En = Math.floor(Jt / 65536)), + (Jr = Jt - En * 65536), + (Jt = wr + En + 65535), + (En = Math.floor(Jt / 65536)), + (wr = Jt - En * 65536), + (Jt = Mr + En + 65535), + (En = Math.floor(Jt / 65536)), + (Mr = Jt - En * 65536), + (Jt = Ur + En + 65535), + (En = Math.floor(Jt / 65536)), + (Ur = Jt - En * 65536), + (Ln += En - 1 + 37 * (En - 1)), + (En = 1), + (Jt = Ln + En + 65535), + (En = Math.floor(Jt / 65536)), + (Ln = Jt - En * 65536), + (Jt = Un + En + 65535), + (En = Math.floor(Jt / 65536)), + (Un = Jt - En * 65536), + (Jt = Kn + En + 65535), + (En = Math.floor(Jt / 65536)), + (Kn = Jt - En * 65536), + (Jt = nr + En + 65535), + (En = Math.floor(Jt / 65536)), + (nr = Jt - En * 65536), + (Jt = lr + En + 65535), + (En = Math.floor(Jt / 65536)), + (lr = Jt - En * 65536), + (Jt = cr + En + 65535), + (En = Math.floor(Jt / 65536)), + (cr = Jt - En * 65536), + (Jt = Hr + En + 65535), + (En = Math.floor(Jt / 65536)), + (Hr = Jt - En * 65536), + (Jt = vr + En + 65535), + (En = Math.floor(Jt / 65536)), + (vr = Jt - En * 65536), + (Jt = Nr + En + 65535), + (En = Math.floor(Jt / 65536)), + (Nr = Jt - En * 65536), + (Jt = Gr + En + 65535), + (En = Math.floor(Jt / 65536)), + (Gr = Jt - En * 65536), + (Jt = eo + En + 65535), + (En = Math.floor(Jt / 65536)), + (eo = Jt - En * 65536), + (Jt = Zr + En + 65535), + (En = Math.floor(Jt / 65536)), + (Zr = Jt - En * 65536), + (Jt = Jr + En + 65535), + (En = Math.floor(Jt / 65536)), + (Jr = Jt - En * 65536), + (Jt = wr + En + 65535), + (En = Math.floor(Jt / 65536)), + (wr = Jt - En * 65536), + (Jt = Mr + En + 65535), + (En = Math.floor(Jt / 65536)), + (Mr = Jt - En * 65536), + (Jt = Ur + En + 65535), + (En = Math.floor(Jt / 65536)), + (Ur = Jt - En * 65536), + (Ln += En - 1 + 37 * (En - 1)), + (xn[0] = Ln), + (xn[1] = Un), + (xn[2] = Kn), + (xn[3] = nr), + (xn[4] = lr), + (xn[5] = cr), + (xn[6] = Hr), + (xn[7] = vr), + (xn[8] = Nr), + (xn[9] = Gr), + (xn[10] = eo), + (xn[11] = Zr), + (xn[12] = Jr), + (xn[13] = wr), + (xn[14] = Mr), + (xn[15] = Ur) + } + function Kt(xn, Mn) { + sn(xn, Mn, Mn) + } + function rn(xn, Mn) { + var dn = nt(), + Jt + for (Jt = 0; Jt < 16; Jt++) dn[Jt] = Mn[Jt] + for (Jt = 253; Jt >= 0; Jt--) Kt(dn, dn), Jt !== 2 && Jt !== 4 && sn(dn, dn, Mn) + for (Jt = 0; Jt < 16; Jt++) xn[Jt] = dn[Jt] + } + function nn(xn, Mn) { + var dn = nt(), + Jt + for (Jt = 0; Jt < 16; Jt++) dn[Jt] = Mn[Jt] + for (Jt = 250; Jt >= 0; Jt--) Kt(dn, dn), Jt !== 1 && sn(dn, dn, Mn) + for (Jt = 0; Jt < 16; Jt++) xn[Jt] = dn[Jt] + } + function hn(xn, Mn, dn) { + var Jt = new Uint8Array(32), + En = new Float64Array(80), + Ln, + Un, + Kn = nt(), + nr = nt(), + lr = nt(), + cr = nt(), + Hr = nt(), + vr = nt() + for (Un = 0; Un < 31; Un++) Jt[Un] = Mn[Un] + for (Jt[31] = (Mn[31] & 127) | 64, Jt[0] &= 248, Mt(En, dn), Un = 0; Un < 16; Un++) + (nr[Un] = En[Un]), (cr[Un] = Kn[Un] = lr[Un] = 0) + for (Kn[0] = cr[0] = 1, Un = 254; Un >= 0; --Un) + (Ln = (Jt[Un >>> 3] >>> (Un & 7)) & 1), + zt(Kn, nr, Ln), + zt(lr, cr, Ln), + Ht(Hr, Kn, lr), + en(Kn, Kn, lr), + Ht(lr, nr, cr), + en(nr, nr, cr), + Kt(cr, Hr), + Kt(vr, Kn), + sn(Kn, lr, Kn), + sn(lr, nr, Hr), + Ht(Hr, Kn, lr), + en(Kn, Kn, lr), + Kt(nr, Kn), + en(lr, cr, vr), + sn(Kn, lr, lt), + Ht(Kn, Kn, cr), + sn(lr, lr, Kn), + sn(Kn, cr, vr), + sn(cr, nr, En), + Kt(nr, Hr), + zt(Kn, nr, Ln), + zt(lr, cr, Ln) + for (Un = 0; Un < 16; Un++) + (En[Un + 16] = Kn[Un]), (En[Un + 32] = lr[Un]), (En[Un + 48] = nr[Un]), (En[Un + 64] = cr[Un]) + var Nr = En.subarray(32), + Gr = En.subarray(16) + return rn(Nr, Nr), sn(Gr, Gr, Nr), Ft(xn, Gr), 0 + } + function vn(xn, Mn) { + return hn(xn, Mn, ot) + } + function an(xn, Mn) { + return rt(Mn, 32), vn(xn, Mn) + } + function Qt(xn, Mn, dn) { + var Jt = new Uint8Array(32) + return hn(Jt, dn, Mn), St(xn, it, Jt, Tt) + } + var _n = wt, + Pn = It + function $n(xn, Mn, dn, Jt, En, Ln) { + var Un = new Uint8Array(32) + return Qt(Un, En, Ln), _n(xn, Mn, dn, Jt, Un) + } + function Nn(xn, Mn, dn, Jt, En, Ln) { + var Un = new Uint8Array(32) + return Qt(Un, En, Ln), Pn(xn, Mn, dn, Jt, Un) + } + var Tn = [ + 1116352408, 3609767458, 1899447441, 602891725, 3049323471, 3964484399, 3921009573, 2173295548, 961987163, + 4081628472, 1508970993, 3053834265, 2453635748, 2937671579, 2870763221, 3664609560, 3624381080, 2734883394, + 310598401, 1164996542, 607225278, 1323610764, 1426881987, 3590304994, 1925078388, 4068182383, 2162078206, + 991336113, 2614888103, 633803317, 3248222580, 3479774868, 3835390401, 2666613458, 4022224774, 944711139, + 264347078, 2341262773, 604807628, 2007800933, 770255983, 1495990901, 1249150122, 1856431235, 1555081692, + 3175218132, 1996064986, 2198950837, 2554220882, 3999719339, 2821834349, 766784016, 2952996808, 2566594879, + 3210313671, 3203337956, 3336571891, 1034457026, 3584528711, 2466948901, 113926993, 3758326383, 338241895, + 168717936, 666307205, 1188179964, 773529912, 1546045734, 1294757372, 1522805485, 1396182291, 2643833823, + 1695183700, 2343527390, 1986661051, 1014477480, 2177026350, 1206759142, 2456956037, 344077627, 2730485921, + 1290863460, 2820302411, 3158454273, 3259730800, 3505952657, 3345764771, 106217008, 3516065817, 3606008344, + 3600352804, 1432725776, 4094571909, 1467031594, 275423344, 851169720, 430227734, 3100823752, 506948616, + 1363258195, 659060556, 3750685593, 883997877, 3785050280, 958139571, 3318307427, 1322822218, 3812723403, + 1537002063, 2003034995, 1747873779, 3602036899, 1955562222, 1575990012, 2024104815, 1125592928, 2227730452, + 2716904306, 2361852424, 442776044, 2428436474, 593698344, 2756734187, 3733110249, 3204031479, 2999351573, + 3329325298, 3815920427, 3391569614, 3928383900, 3515267271, 566280711, 3940187606, 3454069534, 4118630271, + 4000239992, 116418474, 1914138554, 174292421, 2731055270, 289380356, 3203993006, 460393269, 320620315, + 685471733, 587496836, 852142971, 1086792851, 1017036298, 365543100, 1126000580, 2618297676, 1288033470, + 3409855158, 1501505948, 4234509866, 1607167915, 987167468, 1816402316, 1246189591, + ] + function cn(xn, Mn, dn, Jt) { + for ( + var En = new Int32Array(16), + Ln = new Int32Array(16), + Un, + Kn, + nr, + lr, + cr, + Hr, + vr, + Nr, + Gr, + eo, + Zr, + Jr, + wr, + Mr, + Ur, + Rr, + Pr, + Lr, + Wr, + Br, + tr, + ir, + Sr, + dr, + br, + $r, + no = xn[0], + so = xn[1], + fo = xn[2], + po = xn[3], + Yn = xn[4], + vo = xn[5], + _o = xn[6], + xo = xn[7], + bo = Mn[0], + Co = Mn[1], + Ro = Mn[2], + Wo = Mn[3], + Po = Mn[4], + Fo = Mn[5], + Go = Mn[6], + Xo = Mn[7], + ga = 0; + Jt >= 128; + + ) { + for (Wr = 0; Wr < 16; Wr++) + (Br = 8 * Wr + ga), + (En[Wr] = (dn[Br + 0] << 24) | (dn[Br + 1] << 16) | (dn[Br + 2] << 8) | dn[Br + 3]), + (Ln[Wr] = (dn[Br + 4] << 24) | (dn[Br + 5] << 16) | (dn[Br + 6] << 8) | dn[Br + 7]) + for (Wr = 0; Wr < 80; Wr++) + if ( + ((Un = no), + (Kn = so), + (nr = fo), + (lr = po), + (cr = Yn), + (Hr = vo), + (vr = _o), + (Nr = xo), + (Gr = bo), + (eo = Co), + (Zr = Ro), + (Jr = Wo), + (wr = Po), + (Mr = Fo), + (Ur = Go), + (Rr = Xo), + (tr = xo), + (ir = Xo), + (Sr = ir & 65535), + (dr = ir >>> 16), + (br = tr & 65535), + ($r = tr >>> 16), + (tr = + ((Yn >>> 14) | (Po << (32 - 14))) ^ + ((Yn >>> 18) | (Po << (32 - 18))) ^ + ((Po >>> (41 - 32)) | (Yn << (32 - (41 - 32))))), + (ir = + ((Po >>> 14) | (Yn << (32 - 14))) ^ + ((Po >>> 18) | (Yn << (32 - 18))) ^ + ((Yn >>> (41 - 32)) | (Po << (32 - (41 - 32))))), + (Sr += ir & 65535), + (dr += ir >>> 16), + (br += tr & 65535), + ($r += tr >>> 16), + (tr = (Yn & vo) ^ (~Yn & _o)), + (ir = (Po & Fo) ^ (~Po & Go)), + (Sr += ir & 65535), + (dr += ir >>> 16), + (br += tr & 65535), + ($r += tr >>> 16), + (tr = Tn[Wr * 2]), + (ir = Tn[Wr * 2 + 1]), + (Sr += ir & 65535), + (dr += ir >>> 16), + (br += tr & 65535), + ($r += tr >>> 16), + (tr = En[Wr % 16]), + (ir = Ln[Wr % 16]), + (Sr += ir & 65535), + (dr += ir >>> 16), + (br += tr & 65535), + ($r += tr >>> 16), + (dr += Sr >>> 16), + (br += dr >>> 16), + ($r += br >>> 16), + (Pr = (br & 65535) | ($r << 16)), + (Lr = (Sr & 65535) | (dr << 16)), + (tr = Pr), + (ir = Lr), + (Sr = ir & 65535), + (dr = ir >>> 16), + (br = tr & 65535), + ($r = tr >>> 16), + (tr = + ((no >>> 28) | (bo << (32 - 28))) ^ + ((bo >>> (34 - 32)) | (no << (32 - (34 - 32)))) ^ + ((bo >>> (39 - 32)) | (no << (32 - (39 - 32))))), + (ir = + ((bo >>> 28) | (no << (32 - 28))) ^ + ((no >>> (34 - 32)) | (bo << (32 - (34 - 32)))) ^ + ((no >>> (39 - 32)) | (bo << (32 - (39 - 32))))), + (Sr += ir & 65535), + (dr += ir >>> 16), + (br += tr & 65535), + ($r += tr >>> 16), + (tr = (no & so) ^ (no & fo) ^ (so & fo)), + (ir = (bo & Co) ^ (bo & Ro) ^ (Co & Ro)), + (Sr += ir & 65535), + (dr += ir >>> 16), + (br += tr & 65535), + ($r += tr >>> 16), + (dr += Sr >>> 16), + (br += dr >>> 16), + ($r += br >>> 16), + (Nr = (br & 65535) | ($r << 16)), + (Rr = (Sr & 65535) | (dr << 16)), + (tr = lr), + (ir = Jr), + (Sr = ir & 65535), + (dr = ir >>> 16), + (br = tr & 65535), + ($r = tr >>> 16), + (tr = Pr), + (ir = Lr), + (Sr += ir & 65535), + (dr += ir >>> 16), + (br += tr & 65535), + ($r += tr >>> 16), + (dr += Sr >>> 16), + (br += dr >>> 16), + ($r += br >>> 16), + (lr = (br & 65535) | ($r << 16)), + (Jr = (Sr & 65535) | (dr << 16)), + (so = Un), + (fo = Kn), + (po = nr), + (Yn = lr), + (vo = cr), + (_o = Hr), + (xo = vr), + (no = Nr), + (Co = Gr), + (Ro = eo), + (Wo = Zr), + (Po = Jr), + (Fo = wr), + (Go = Mr), + (Xo = Ur), + (bo = Rr), + Wr % 16 === 15) + ) + for (Br = 0; Br < 16; Br++) + (tr = En[Br]), + (ir = Ln[Br]), + (Sr = ir & 65535), + (dr = ir >>> 16), + (br = tr & 65535), + ($r = tr >>> 16), + (tr = En[(Br + 9) % 16]), + (ir = Ln[(Br + 9) % 16]), + (Sr += ir & 65535), + (dr += ir >>> 16), + (br += tr & 65535), + ($r += tr >>> 16), + (Pr = En[(Br + 1) % 16]), + (Lr = Ln[(Br + 1) % 16]), + (tr = ((Pr >>> 1) | (Lr << (32 - 1))) ^ ((Pr >>> 8) | (Lr << (32 - 8))) ^ (Pr >>> 7)), + (ir = + ((Lr >>> 1) | (Pr << (32 - 1))) ^ + ((Lr >>> 8) | (Pr << (32 - 8))) ^ + ((Lr >>> 7) | (Pr << (32 - 7)))), + (Sr += ir & 65535), + (dr += ir >>> 16), + (br += tr & 65535), + ($r += tr >>> 16), + (Pr = En[(Br + 14) % 16]), + (Lr = Ln[(Br + 14) % 16]), + (tr = + ((Pr >>> 19) | (Lr << (32 - 19))) ^ ((Lr >>> (61 - 32)) | (Pr << (32 - (61 - 32)))) ^ (Pr >>> 6)), + (ir = + ((Lr >>> 19) | (Pr << (32 - 19))) ^ + ((Pr >>> (61 - 32)) | (Lr << (32 - (61 - 32)))) ^ + ((Lr >>> 6) | (Pr << (32 - 6)))), + (Sr += ir & 65535), + (dr += ir >>> 16), + (br += tr & 65535), + ($r += tr >>> 16), + (dr += Sr >>> 16), + (br += dr >>> 16), + ($r += br >>> 16), + (En[Br] = (br & 65535) | ($r << 16)), + (Ln[Br] = (Sr & 65535) | (dr << 16)) + ;(tr = no), + (ir = bo), + (Sr = ir & 65535), + (dr = ir >>> 16), + (br = tr & 65535), + ($r = tr >>> 16), + (tr = xn[0]), + (ir = Mn[0]), + (Sr += ir & 65535), + (dr += ir >>> 16), + (br += tr & 65535), + ($r += tr >>> 16), + (dr += Sr >>> 16), + (br += dr >>> 16), + ($r += br >>> 16), + (xn[0] = no = (br & 65535) | ($r << 16)), + (Mn[0] = bo = (Sr & 65535) | (dr << 16)), + (tr = so), + (ir = Co), + (Sr = ir & 65535), + (dr = ir >>> 16), + (br = tr & 65535), + ($r = tr >>> 16), + (tr = xn[1]), + (ir = Mn[1]), + (Sr += ir & 65535), + (dr += ir >>> 16), + (br += tr & 65535), + ($r += tr >>> 16), + (dr += Sr >>> 16), + (br += dr >>> 16), + ($r += br >>> 16), + (xn[1] = so = (br & 65535) | ($r << 16)), + (Mn[1] = Co = (Sr & 65535) | (dr << 16)), + (tr = fo), + (ir = Ro), + (Sr = ir & 65535), + (dr = ir >>> 16), + (br = tr & 65535), + ($r = tr >>> 16), + (tr = xn[2]), + (ir = Mn[2]), + (Sr += ir & 65535), + (dr += ir >>> 16), + (br += tr & 65535), + ($r += tr >>> 16), + (dr += Sr >>> 16), + (br += dr >>> 16), + ($r += br >>> 16), + (xn[2] = fo = (br & 65535) | ($r << 16)), + (Mn[2] = Ro = (Sr & 65535) | (dr << 16)), + (tr = po), + (ir = Wo), + (Sr = ir & 65535), + (dr = ir >>> 16), + (br = tr & 65535), + ($r = tr >>> 16), + (tr = xn[3]), + (ir = Mn[3]), + (Sr += ir & 65535), + (dr += ir >>> 16), + (br += tr & 65535), + ($r += tr >>> 16), + (dr += Sr >>> 16), + (br += dr >>> 16), + ($r += br >>> 16), + (xn[3] = po = (br & 65535) | ($r << 16)), + (Mn[3] = Wo = (Sr & 65535) | (dr << 16)), + (tr = Yn), + (ir = Po), + (Sr = ir & 65535), + (dr = ir >>> 16), + (br = tr & 65535), + ($r = tr >>> 16), + (tr = xn[4]), + (ir = Mn[4]), + (Sr += ir & 65535), + (dr += ir >>> 16), + (br += tr & 65535), + ($r += tr >>> 16), + (dr += Sr >>> 16), + (br += dr >>> 16), + ($r += br >>> 16), + (xn[4] = Yn = (br & 65535) | ($r << 16)), + (Mn[4] = Po = (Sr & 65535) | (dr << 16)), + (tr = vo), + (ir = Fo), + (Sr = ir & 65535), + (dr = ir >>> 16), + (br = tr & 65535), + ($r = tr >>> 16), + (tr = xn[5]), + (ir = Mn[5]), + (Sr += ir & 65535), + (dr += ir >>> 16), + (br += tr & 65535), + ($r += tr >>> 16), + (dr += Sr >>> 16), + (br += dr >>> 16), + ($r += br >>> 16), + (xn[5] = vo = (br & 65535) | ($r << 16)), + (Mn[5] = Fo = (Sr & 65535) | (dr << 16)), + (tr = _o), + (ir = Go), + (Sr = ir & 65535), + (dr = ir >>> 16), + (br = tr & 65535), + ($r = tr >>> 16), + (tr = xn[6]), + (ir = Mn[6]), + (Sr += ir & 65535), + (dr += ir >>> 16), + (br += tr & 65535), + ($r += tr >>> 16), + (dr += Sr >>> 16), + (br += dr >>> 16), + ($r += br >>> 16), + (xn[6] = _o = (br & 65535) | ($r << 16)), + (Mn[6] = Go = (Sr & 65535) | (dr << 16)), + (tr = xo), + (ir = Xo), + (Sr = ir & 65535), + (dr = ir >>> 16), + (br = tr & 65535), + ($r = tr >>> 16), + (tr = xn[7]), + (ir = Mn[7]), + (Sr += ir & 65535), + (dr += ir >>> 16), + (br += tr & 65535), + ($r += tr >>> 16), + (dr += Sr >>> 16), + (br += dr >>> 16), + ($r += br >>> 16), + (xn[7] = xo = (br & 65535) | ($r << 16)), + (Mn[7] = Xo = (Sr & 65535) | (dr << 16)), + (ga += 128), + (Jt -= 128) + } + return Jt + } + function mn(xn, Mn, dn) { + var Jt = new Int32Array(8), + En = new Int32Array(8), + Ln = new Uint8Array(256), + Un, + Kn = dn + for ( + Jt[0] = 1779033703, + Jt[1] = 3144134277, + Jt[2] = 1013904242, + Jt[3] = 2773480762, + Jt[4] = 1359893119, + Jt[5] = 2600822924, + Jt[6] = 528734635, + Jt[7] = 1541459225, + En[0] = 4089235720, + En[1] = 2227873595, + En[2] = 4271175723, + En[3] = 1595750129, + En[4] = 2917565137, + En[5] = 725511199, + En[6] = 4215389547, + En[7] = 327033209, + cn(Jt, En, Mn, dn), + dn %= 128, + Un = 0; + Un < dn; + Un++ + ) + Ln[Un] = Mn[Kn - dn + Un] + for ( + Ln[dn] = 128, + dn = 256 - 128 * (dn < 112 ? 1 : 0), + Ln[dn - 9] = 0, + mt(Ln, dn - 8, (Kn / 536870912) | 0, Kn << 3), + cn(Jt, En, Ln, dn), + Un = 0; + Un < 8; + Un++ + ) + mt(xn, 8 * Un, Jt[Un], En[Un]) + return 0 + } + function In(xn, Mn) { + var dn = nt(), + Jt = nt(), + En = nt(), + Ln = nt(), + Un = nt(), + Kn = nt(), + nr = nt(), + lr = nt(), + cr = nt() + en(dn, xn[1], xn[0]), + en(cr, Mn[1], Mn[0]), + sn(dn, dn, cr), + Ht(Jt, xn[0], xn[1]), + Ht(cr, Mn[0], Mn[1]), + sn(Jt, Jt, cr), + sn(En, xn[3], Mn[3]), + sn(En, En, ut), + sn(Ln, xn[2], Mn[2]), + Ht(Ln, Ln, Ln), + en(Un, Jt, dn), + en(Kn, Ln, En), + Ht(nr, Ln, En), + Ht(lr, Jt, dn), + sn(xn[0], Un, Kn), + sn(xn[1], lr, nr), + sn(xn[2], nr, Kn), + sn(xn[3], Un, lr) + } + function An(xn, Mn, dn) { + var Jt + for (Jt = 0; Jt < 4; Jt++) zt(xn[Jt], Mn[Jt], dn) + } + function wn(xn, Mn) { + var dn = nt(), + Jt = nt(), + En = nt() + rn(En, Mn[2]), sn(dn, Mn[0], En), sn(Jt, Mn[1], En), Ft(xn, Jt), (xn[31] ^= Ut(dn) << 7) + } + function fn(xn, Mn, dn) { + var Jt, En + for (Ot(xn[0], at), Ot(xn[1], st), Ot(xn[2], st), Ot(xn[3], at), En = 255; En >= 0; --En) + (Jt = (dn[(En / 8) | 0] >> (En & 7)) & 1), An(xn, Mn, Jt), In(Mn, xn), In(xn, xn), An(xn, Mn, Jt) + } + function pn(xn, Mn) { + var dn = [nt(), nt(), nt(), nt()] + Ot(dn[0], ht), Ot(dn[1], dt), Ot(dn[2], st), sn(dn[3], ht, dt), fn(xn, dn, Mn) + } + function kn(xn, Mn, dn) { + var Jt = new Uint8Array(64), + En = [nt(), nt(), nt(), nt()], + Ln + for ( + dn || rt(Mn, 32), mn(Jt, Mn, 32), Jt[0] &= 248, Jt[31] &= 127, Jt[31] |= 64, pn(En, Jt), wn(xn, En), Ln = 0; + Ln < 32; + Ln++ + ) + Mn[Ln + 32] = xn[Ln] + return 0 + } + var Dn = new Float64Array([ + 237, 211, 245, 92, 26, 99, 18, 88, 214, 156, 247, 162, 222, 249, 222, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 16, + ]) + function un(xn, Mn) { + var dn, Jt, En, Ln + for (Jt = 63; Jt >= 32; --Jt) { + for (dn = 0, En = Jt - 32, Ln = Jt - 12; En < Ln; ++En) + (Mn[En] += dn - 16 * Mn[Jt] * Dn[En - (Jt - 32)]), + (dn = Math.floor((Mn[En] + 128) / 256)), + (Mn[En] -= dn * 256) + ;(Mn[En] += dn), (Mn[Jt] = 0) + } + for (dn = 0, En = 0; En < 32; En++) (Mn[En] += dn - (Mn[31] >> 4) * Dn[En]), (dn = Mn[En] >> 8), (Mn[En] &= 255) + for (En = 0; En < 32; En++) Mn[En] -= dn * Dn[En] + for (Jt = 0; Jt < 32; Jt++) (Mn[Jt + 1] += Mn[Jt] >> 8), (xn[Jt] = Mn[Jt] & 255) + } + function Zt(xn) { + var Mn = new Float64Array(64), + dn + for (dn = 0; dn < 64; dn++) Mn[dn] = xn[dn] + for (dn = 0; dn < 64; dn++) xn[dn] = 0 + un(xn, Mn) + } + function Xt(xn, Mn, dn, Jt) { + var En = new Uint8Array(64), + Ln = new Uint8Array(64), + Un = new Uint8Array(64), + Kn, + nr, + lr = new Float64Array(64), + cr = [nt(), nt(), nt(), nt()] + mn(En, Jt, 32), (En[0] &= 248), (En[31] &= 127), (En[31] |= 64) + var Hr = dn + 64 + for (Kn = 0; Kn < dn; Kn++) xn[64 + Kn] = Mn[Kn] + for (Kn = 0; Kn < 32; Kn++) xn[32 + Kn] = En[32 + Kn] + for (mn(Un, xn.subarray(32), dn + 32), Zt(Un), pn(cr, Un), wn(xn, cr), Kn = 32; Kn < 64; Kn++) xn[Kn] = Jt[Kn] + for (mn(Ln, xn, dn + 64), Zt(Ln), Kn = 0; Kn < 64; Kn++) lr[Kn] = 0 + for (Kn = 0; Kn < 32; Kn++) lr[Kn] = Un[Kn] + for (Kn = 0; Kn < 32; Kn++) for (nr = 0; nr < 32; nr++) lr[Kn + nr] += Ln[Kn] * En[nr] + return un(xn.subarray(32), lr), Hr + } + function Sn(xn, Mn) { + var dn = nt(), + Jt = nt(), + En = nt(), + Ln = nt(), + Un = nt(), + Kn = nt(), + nr = nt() + return ( + Ot(xn[2], st), + Mt(xn[1], Mn), + Kt(En, xn[1]), + sn(Ln, En, ct), + en(En, En, xn[2]), + Ht(Ln, xn[2], Ln), + Kt(Un, Ln), + Kt(Kn, Un), + sn(nr, Kn, Un), + sn(dn, nr, En), + sn(dn, dn, Ln), + nn(dn, dn), + sn(dn, dn, En), + sn(dn, dn, Ln), + sn(dn, dn, Ln), + sn(xn[0], dn, Ln), + Kt(Jt, xn[0]), + sn(Jt, Jt, Ln), + Nt(Jt, En) && sn(xn[0], xn[0], pt), + Kt(Jt, xn[0]), + sn(Jt, Jt, Ln), + Nt(Jt, En) ? -1 : (Ut(xn[0]) === Mn[31] >> 7 && en(xn[0], at, xn[0]), sn(xn[3], xn[0], xn[1]), 0) + ) + } + function Rn(xn, Mn, dn, Jt) { + var En, + Ln = new Uint8Array(32), + Un = new Uint8Array(64), + Kn = [nt(), nt(), nt(), nt()], + nr = [nt(), nt(), nt(), nt()] + if (dn < 64 || Sn(nr, Jt)) return -1 + for (En = 0; En < dn; En++) xn[En] = Mn[En] + for (En = 0; En < 32; En++) xn[En + 32] = Jt[En] + if ( + (mn(Un, xn, dn), + Zt(Un), + fn(Kn, nr, Un), + pn(nr, Mn.subarray(32)), + In(Kn, nr), + wn(Ln, Kn), + (dn -= 64), + bt(Mn, 0, Ln, 0)) + ) { + for (En = 0; En < dn; En++) xn[En] = 0 + return -1 + } + for (En = 0; En < dn; En++) xn[En] = Mn[En + 64] + return dn + } + var jn = 32, + On = 24, + Zn = 32, + Vn = 16, + qn = 32, + zn = 32, + Jn = 32, + Hn = 32, + pr = 32, + fr = On, + xr = Zn, + io = Vn, + Tr = 64, + Ar = 32, + qr = 64, + jr = 32, + Fr = 64 + et.lowlevel = { + crypto_core_hsalsa20: St, + crypto_stream_xor: Dt, + crypto_stream: $t, + crypto_stream_salsa20_xor: At, + crypto_stream_salsa20: Et, + crypto_onetimeauth: Pt, + crypto_onetimeauth_verify: Ct, + crypto_verify_16: yt, + crypto_verify_32: bt, + crypto_secretbox: wt, + crypto_secretbox_open: It, + crypto_scalarmult: hn, + crypto_scalarmult_base: vn, + crypto_box_beforenm: Qt, + crypto_box_afternm: _n, + crypto_box: $n, + crypto_box_open: Nn, + crypto_box_keypair: an, + crypto_hash: mn, + crypto_sign: Xt, + crypto_sign_keypair: kn, + crypto_sign_open: Rn, + crypto_secretbox_KEYBYTES: jn, + crypto_secretbox_NONCEBYTES: On, + crypto_secretbox_ZEROBYTES: Zn, + crypto_secretbox_BOXZEROBYTES: Vn, + crypto_scalarmult_BYTES: qn, + crypto_scalarmult_SCALARBYTES: zn, + crypto_box_PUBLICKEYBYTES: Jn, + crypto_box_SECRETKEYBYTES: Hn, + crypto_box_BEFORENMBYTES: pr, + crypto_box_NONCEBYTES: fr, + crypto_box_ZEROBYTES: xr, + crypto_box_BOXZEROBYTES: io, + crypto_sign_BYTES: Tr, + crypto_sign_PUBLICKEYBYTES: Ar, + crypto_sign_SECRETKEYBYTES: qr, + crypto_sign_SEEDBYTES: jr, + crypto_hash_BYTES: Fr, + gf: nt, + D: ct, + L: Dn, + pack25519: Ft, + unpack25519: Mt, + M: sn, + A: Ht, + S: Kt, + Z: en, + pow2523: nn, + add: In, + set25519: Ot, + modL: un, + scalarmult: fn, + scalarbase: pn, + } + function ao(xn, Mn) { + if (xn.length !== jn) throw new Error('bad key size') + if (Mn.length !== On) throw new Error('bad nonce size') + } + function Yr(xn, Mn) { + if (xn.length !== Jn) throw new Error('bad public key size') + if (Mn.length !== Hn) throw new Error('bad secret key size') + } + function Dr() { + for (var xn = 0; xn < arguments.length; xn++) + if (!(arguments[xn] instanceof Uint8Array)) throw new TypeError('unexpected type, use Uint8Array') + } + function go(xn) { + for (var Mn = 0; Mn < xn.length; Mn++) xn[Mn] = 0 + } + ;(et.randomBytes = function (xn) { + var Mn = new Uint8Array(xn) + return rt(Mn, xn), Mn + }), + (et.secretbox = function (xn, Mn, dn) { + Dr(xn, Mn, dn), ao(dn, Mn) + for (var Jt = new Uint8Array(Zn + xn.length), En = new Uint8Array(Jt.length), Ln = 0; Ln < xn.length; Ln++) + Jt[Ln + Zn] = xn[Ln] + return wt(En, Jt, Jt.length, Mn, dn), En.subarray(Vn) + }), + (et.secretbox.open = function (xn, Mn, dn) { + Dr(xn, Mn, dn), ao(dn, Mn) + for (var Jt = new Uint8Array(Vn + xn.length), En = new Uint8Array(Jt.length), Ln = 0; Ln < xn.length; Ln++) + Jt[Ln + Vn] = xn[Ln] + return Jt.length < 32 || It(En, Jt, Jt.length, Mn, dn) !== 0 ? null : En.subarray(Zn) + }), + (et.secretbox.keyLength = jn), + (et.secretbox.nonceLength = On), + (et.secretbox.overheadLength = Vn), + (et.scalarMult = function (xn, Mn) { + if ((Dr(xn, Mn), xn.length !== zn)) throw new Error('bad n size') + if (Mn.length !== qn) throw new Error('bad p size') + var dn = new Uint8Array(qn) + return hn(dn, xn, Mn), dn + }), + (et.scalarMult.base = function (xn) { + if ((Dr(xn), xn.length !== zn)) throw new Error('bad n size') + var Mn = new Uint8Array(qn) + return vn(Mn, xn), Mn + }), + (et.scalarMult.scalarLength = zn), + (et.scalarMult.groupElementLength = qn), + (et.box = function (xn, Mn, dn, Jt) { + var En = et.box.before(dn, Jt) + return et.secretbox(xn, Mn, En) + }), + (et.box.before = function (xn, Mn) { + Dr(xn, Mn), Yr(xn, Mn) + var dn = new Uint8Array(pr) + return Qt(dn, xn, Mn), dn + }), + (et.box.after = et.secretbox), + (et.box.open = function (xn, Mn, dn, Jt) { + var En = et.box.before(dn, Jt) + return et.secretbox.open(xn, Mn, En) + }), + (et.box.open.after = et.secretbox.open), + (et.box.keyPair = function () { + var xn = new Uint8Array(Jn), + Mn = new Uint8Array(Hn) + return an(xn, Mn), { publicKey: xn, secretKey: Mn } + }), + (et.box.keyPair.fromSecretKey = function (xn) { + if ((Dr(xn), xn.length !== Hn)) throw new Error('bad secret key size') + var Mn = new Uint8Array(Jn) + return vn(Mn, xn), { publicKey: Mn, secretKey: new Uint8Array(xn) } + }), + (et.box.publicKeyLength = Jn), + (et.box.secretKeyLength = Hn), + (et.box.sharedKeyLength = pr), + (et.box.nonceLength = fr), + (et.box.overheadLength = et.secretbox.overheadLength), + (et.sign = function (xn, Mn) { + if ((Dr(xn, Mn), Mn.length !== qr)) throw new Error('bad secret key size') + var dn = new Uint8Array(Tr + xn.length) + return Xt(dn, xn, xn.length, Mn), dn + }), + (et.sign.open = function (xn, Mn) { + if ((Dr(xn, Mn), Mn.length !== Ar)) throw new Error('bad public key size') + var dn = new Uint8Array(xn.length), + Jt = Rn(dn, xn, xn.length, Mn) + if (Jt < 0) return null + for (var En = new Uint8Array(Jt), Ln = 0; Ln < En.length; Ln++) En[Ln] = dn[Ln] + return En + }), + (et.sign.detached = function (xn, Mn) { + for (var dn = et.sign(xn, Mn), Jt = new Uint8Array(Tr), En = 0; En < Jt.length; En++) Jt[En] = dn[En] + return Jt + }), + (et.sign.detached.verify = function (xn, Mn, dn) { + if ((Dr(xn, Mn, dn), Mn.length !== Tr)) throw new Error('bad signature size') + if (dn.length !== Ar) throw new Error('bad public key size') + var Jt = new Uint8Array(Tr + xn.length), + En = new Uint8Array(Tr + xn.length), + Ln + for (Ln = 0; Ln < Tr; Ln++) Jt[Ln] = Mn[Ln] + for (Ln = 0; Ln < xn.length; Ln++) Jt[Ln + Tr] = xn[Ln] + return Rn(En, Jt, Jt.length, dn) >= 0 + }), + (et.sign.keyPair = function () { + var xn = new Uint8Array(Ar), + Mn = new Uint8Array(qr) + return kn(xn, Mn), { publicKey: xn, secretKey: Mn } + }), + (et.sign.keyPair.fromSecretKey = function (xn) { + if ((Dr(xn), xn.length !== qr)) throw new Error('bad secret key size') + for (var Mn = new Uint8Array(Ar), dn = 0; dn < Mn.length; dn++) Mn[dn] = xn[32 + dn] + return { publicKey: Mn, secretKey: new Uint8Array(xn) } + }), + (et.sign.keyPair.fromSeed = function (xn) { + if ((Dr(xn), xn.length !== jr)) throw new Error('bad seed size') + for (var Mn = new Uint8Array(Ar), dn = new Uint8Array(qr), Jt = 0; Jt < 32; Jt++) dn[Jt] = xn[Jt] + return kn(Mn, dn, !0), { publicKey: Mn, secretKey: dn } + }), + (et.sign.publicKeyLength = Ar), + (et.sign.secretKeyLength = qr), + (et.sign.seedLength = jr), + (et.sign.signatureLength = Tr), + (et.hash = function (xn) { + Dr(xn) + var Mn = new Uint8Array(Fr) + return mn(Mn, xn, xn.length), Mn + }), + (et.hash.hashLength = Fr), + (et.verify = function (xn, Mn) { + return ( + Dr(xn, Mn), + xn.length === 0 || Mn.length === 0 || xn.length !== Mn.length ? !1 : gt(xn, 0, Mn, 0, xn.length) === 0 + ) + }), + (et.setPRNG = function (xn) { + rt = xn + }), + (function () { + var xn = typeof self < 'u' ? self.crypto || self.msCrypto : null + if (xn && xn.getRandomValues) { + var Mn = 65536 + et.setPRNG(function (dn, Jt) { + var En, + Ln = new Uint8Array(Jt) + for (En = 0; En < Jt; En += Mn) xn.getRandomValues(Ln.subarray(En, En + Math.min(Jt - En, Mn))) + for (En = 0; En < Jt; En++) dn[En] = Ln[En] + go(Ln) + }) + } else + typeof commonjsRequire < 'u' && + ((xn = requireCryptoBrowserify()), + xn && + xn.randomBytes && + et.setPRNG(function (dn, Jt) { + var En, + Ln = xn.randomBytes(Jt) + for (En = 0; En < Jt; En++) dn[En] = Ln[En] + go(Ln) + })) + })() + })(tt.exports ? tt.exports : (self.nacl = self.nacl || {})) + })(naclFast) + var naclFastExports = naclFast.exports, + naclUtil = { exports: {} } + ;(function (tt) { + ;(function (et, nt) { + tt.exports ? (tt.exports = nt()) : (et.nacl || (et.nacl = {}), (et.nacl.util = nt())) + })(commonjsGlobal, function () { + var et = {} + function nt(rt) { + if (!/^(?:[A-Za-z0-9+\/]{2}[A-Za-z0-9+\/]{2})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/.test(rt)) + throw new TypeError('invalid encoding') + } + return ( + (et.decodeUTF8 = function (rt) { + if (typeof rt != 'string') throw new TypeError('expected string') + var it, + ot = unescape(encodeURIComponent(rt)), + at = new Uint8Array(ot.length) + for (it = 0; it < ot.length; it++) at[it] = ot.charCodeAt(it) + return at + }), + (et.encodeUTF8 = function (rt) { + var it, + ot = [] + for (it = 0; it < rt.length; it++) ot.push(String.fromCharCode(rt[it])) + return decodeURIComponent(escape(ot.join(''))) + }), + typeof atob > 'u' + ? typeof Buffer.from < 'u' + ? ((et.encodeBase64 = function (rt) { + return Buffer.from(rt).toString('base64') + }), + (et.decodeBase64 = function (rt) { + return nt(rt), new Uint8Array(Array.prototype.slice.call(Buffer.from(rt, 'base64'), 0)) + })) + : ((et.encodeBase64 = function (rt) { + return new Buffer(rt).toString('base64') + }), + (et.decodeBase64 = function (rt) { + return nt(rt), new Uint8Array(Array.prototype.slice.call(new Buffer(rt, 'base64'), 0)) + })) + : ((et.encodeBase64 = function (rt) { + var it, + ot = [], + at = rt.length + for (it = 0; it < at; it++) ot.push(String.fromCharCode(rt[it])) + return btoa(ot.join('')) + }), + (et.decodeBase64 = function (rt) { + nt(rt) + var it, + ot = atob(rt), + at = new Uint8Array(ot.length) + for (it = 0; it < ot.length; it++) at[it] = ot.charCodeAt(it) + return at + })), + et + ) + }) + })(naclUtil) + var naclUtilExports = naclUtil.exports + ;(function (tt) { + var et = + (commonjsGlobal && commonjsGlobal.__importDefault) || + function (cn) { + return cn && cn.__esModule ? cn : { default: cn } + } + Object.defineProperty(tt, '__esModule', { value: !0 }) + const nt = et(sjclExports), + rt = et(naclFastExports), + it = et(naclUtilExports) + let ot, at + if (typeof window < 'u' && window && window.TextEncoder) (ot = window.TextEncoder), (at = window.TextDecoder) + else { + const cn = util$1 + ;(ot = cn.TextEncoder), (at = cn.TextDecoder) + } + const st = new ot(), + lt = new at('utf-8', { fatal: !0 }), + ct = 24, + ut = 0, + ht = 1, + dt = 2, + pt = 4, + mt = 6, + gt = Math.pow(2, 32) - 1, + yt = function (cn) { + if (cn instanceof Array) + try { + cn = $t(cn) + } catch {} + if (cn instanceof Uint8Array) + if (jt(cn)) cn = Tt(cn) + else return `b64"${tt.bytesToBase64(cn)}"` + return typeof cn == 'string' ? `"${cn}"` : `type ${typeof cn} (${JSON.stringify(cn)})` + } + class bt { + constructor(mn) { + ;(this._buf = new Uint8Array(mn)), (this._length = 0) + } + appendBytes(mn) { + this._grow(this._length + mn.length), this._buf.set(mn, this._length), (this._length += mn.length) + } + appendByte(mn) { + this._grow(this._length + 1), (this._buf[this._length] = mn), this._length++ + } + appendUvarint(mn) { + if (mn > gt || mn < 0) throw new RangeError(`varint ${mn} out of range`) + this._grow(this._length + vt) + let In = this._length + for (; mn >= 128; ) (this._buf[In++] = (mn & 255) | 128), (mn >>>= 7) + ;(this._buf[In++] = mn | 0), (this._length = In) + } + get bytes() { + return this._buf.subarray(0, this._length) + } + _grow(mn) { + const In = this._buf.length + if (mn <= In) return + const An = In * 2, + wn = mn > An ? mn : An, + fn = new Uint8Array(wn) + fn.set(this._buf.subarray(0, this._length)), (this._buf = fn) + } + } + const vt = 5 + class xt { + constructor(mn) { + ;(this._buf = mn), (this._index = 0) + } + readByte() { + if (this.length <= 0) throw new RangeError('Read past end of buffer') + return this._buf[this._index++] + } + peekByte() { + if (this.length <= 0) throw new RangeError('Read past end of buffer') + return this._buf[this._index] + } + readN(mn) { + if (this.length < mn) throw new RangeError('Read past end of buffer') + const In = this._buf.subarray(this._index, this._index + mn) + return (this._index += mn), In + } + get length() { + return this._buf.length - this._index + } + readUvarint() { + const mn = this._buf.length + let In = 0, + An = 0 + for (let wn = this._index; wn < mn; wn++) { + const fn = this._buf[wn] + if (fn < 128) { + const pn = wn - this._index + if (((this._index = wn + 1), pn > vt || (pn === vt && fn > 1))) + throw new RangeError('Overflow error decoding varint') + return (In | (fn << An)) >>> 0 + } + ;(In |= (fn & 127) << An), (An += 7) + } + throw ((this._index = mn), new RangeError('Buffer too small decoding varint')) + } + } + const kt = (cn) => cn != null, + St = (cn) => (kt(cn) ? st.encode(cn) : cn), + Tt = (cn) => (kt(cn) ? lt.decode(cn) : cn), + At = (cn) => nt.default.codec.utf8String.fromBits(cn) + ;(tt.base64ToBytes = function (cn) { + return ( + (cn = cn.replace(/-/g, '+').replace(/_/g, '/')), + cn.length % 4 !== 0 && !cn.match(/=$/) && (cn += '='.repeat(4 - (cn.length % 4))), + it.default.decodeBase64(cn) + ) + }), + (tt.bytesToBase64 = function (cn) { + return it.default.encodeBase64(cn).replace(/=+$/, '').replace(/\+/g, '-').replace(/\//g, '_') + }) + const Et = function (cn) { + return nt.default.codec.base64.toBits(it.default.encodeBase64(cn)) + }, + $t = function (cn) { + return it.default.decodeBase64(nt.default.codec.base64.fromBits(cn)) + }, + Dt = function (cn) { + const mn = new Uint8Array(Math.ceil(cn.length / 2)) + for (let In = 0; In < mn.length; In++) mn[In] = parseInt(cn.substr(In * 2, 2), 16) + return mn + }, + jt = function (cn) { + try { + Tt(cn) + } catch { + return !1 + } + return !0 + }, + Pt = function (cn, mn) { + if (typeof cn != 'string') throw new TypeError(`${mn} has the wrong type; want string, got ${typeof cn}.`) + return cn + }, + Ct = (cn, mn) => (kt(cn) ? Pt(cn, mn) : ''), + wt = function (cn, mn) { + if (cn instanceof Uint8Array) return cn + if (typeof cn == 'string') return St(cn) + throw new TypeError(`${mn} has the wrong type; want string or Uint8Array, got ${typeof cn}.`) + }, + It = new Uint8Array(), + Ot = function (cn, mn) { + const In = cn.readByte() + if (In !== mn) throw new Error(`Unexpected field type, got ${In} want ${mn}`) + return In === ut ? It : cn.readN(cn.readUvarint()) + }, + Wt = function (cn, mn, In) { + cn.appendByte(mn), mn !== ut && (cn.appendUvarint(In.length), cn.appendBytes(In)) + }, + zt = function (cn, mn) { + return cn.peekByte() !== mn ? null : Ot(cn, mn) + }, + Ft = function (cn, mn, In) { + jt(In) ? (cn[mn] = Tt(In)) : (cn[mn + '64'] = tt.bytesToBase64(In)) + }, + Nt = function (cn, mn) { + const In = new nt.default.misc.hmac(cn, nt.default.hash.sha256) + return In.update(mn), In.digest() + }, + Ut = function (cn, mn, In) { + const An = Nt(cn, mn), + wn = Nt(cn, In) + return Nt(cn, nt.default.bitArray.concat(An, wn)) + }, + Mt = Et(St('macaroons-key-generator')), + Ht = function (cn) { + return Nt(Mt, cn) + }, + en = function () { + return rt.default.randomBytes(ct) + }, + sn = function (cn, mn) { + const In = $t(cn), + An = $t(mn), + wn = en(), + fn = rt.default.secretbox(An, wn, In), + pn = new Uint8Array(wn.length + fn.length) + return pn.set(wn, 0), pn.set(fn, wn.length), Et(pn) + }, + Kt = function (cn, mn) { + const In = $t(cn), + An = $t(mn), + wn = An.slice(0, ct), + fn = An.slice(ct) + let pn = rt.default.secretbox.open(fn, wn, In) + if (!pn) throw new Error('decryption failed') + return Et(pn) + }, + rn = Et(St('\0'.repeat(32))), + nn = function (cn, mn) { + return nt.default.bitArray.equal(cn, mn) ? cn : Ut(rn, cn, mn) + } + class hn { + constructor(mn) { + if (!mn) return + let { version: In, identifierBytes: An, locationStr: wn, caveats: fn, signatureBytes: pn } = mn + if (In !== 1 && In !== 2) throw new Error(`Unexpected version ${In}`) + if (((this._version = In), (this._locationStr = wn), (An = wt(An, 'Identifier')), In === 1 && !jt(An))) + throw new Error('Version 1 macaroon identifier must be well-formed UTF-8') + ;(this._identifierBits = An && Et(An)), + (this._signatureBits = pn && Et(wt(pn, 'Signature'))), + (this._caveats = fn + ? fn.map((kn) => { + const Dn = wt(kn.identifierBytes, 'Caveat identifier') + if (In === 1 && !jt(Dn)) throw new Error('Version 1 caveat identifier must be well-formed UTF-8') + return { + _locationStr: Ct(kn.locationStr), + _identifierBits: Et(Dn), + _vidBits: kn.vidBytes && Et(wt(kn.vidBytes, 'Verification ID')), + } + }) + : []) + } + get caveats() { + return this._caveats.map((mn) => + kt(mn._vidBits) + ? { identifier: $t(mn._identifierBits), location: mn._locationStr, vid: $t(mn._vidBits) } + : { identifier: $t(mn._identifierBits) }, + ) + } + get location() { + return this._locationStr + } + get identifier() { + return $t(this._identifierBits) + } + get signature() { + return $t(this._signatureBits) + } + addThirdPartyCaveat(mn, In, An) { + const wn = { + _identifierBits: Et(wt(In, 'Caveat id')), + _vidBits: sn(this._signatureBits, Ht(Et(wt(mn, 'Caveat root key')))), + _locationStr: Ct(An), + } + ;(this._signatureBits = Ut(this._signatureBits, wn._vidBits, wn._identifierBits)), this._caveats.push(wn) + } + addFirstPartyCaveat(mn) { + const In = Et(wt(mn, 'Condition')) + this._caveats.push({ _identifierBits: In }), (this._signatureBits = Nt(this._signatureBits, In)) + } + bindToRoot(mn) { + const In = Et(wt(mn, 'Primary macaroon signature')) + this._signatureBits = nn(In, this._signatureBits) + } + clone() { + const mn = new hn() + return ( + (mn._version = this._version), + (mn._signatureBits = this._signatureBits), + (mn._identifierBits = this._identifierBits), + (mn._locationStr = this._locationStr), + (mn._caveats = this._caveats.slice()), + mn + ) + } + verify(mn, In, An = []) { + const wn = Ht(Et(wt(mn, 'Root key'))), + fn = An.map((pn) => 0) + this._verify(this._signatureBits, wn, In, An, fn), + An.forEach((pn, kn) => { + if (fn[kn] === 0) throw new Error(`discharge macaroon ${yt(pn.identifier)} was not used`) + if (fn[kn] !== 1) throw new Error(`discharge macaroon ${yt(pn.identifier)} was used more than once`) + }) + } + _verify(mn, In, An, wn, fn) { + let pn = Nt(In, this._identifierBits) + this._caveats.forEach((Dn) => { + if (Dn._vidBits) { + const un = Kt(pn, Dn._vidBits) + let Zt = !1, + Xt, + Sn + for (Xt = 0; Xt < wn.length; Xt++) + if (((Sn = wn[Xt]), !!nt.default.bitArray.equal(Sn._identifierBits, Dn._identifierBits))) { + if (((Zt = !0), fn[Xt]++, fn[Xt] > 1)) + throw new Error(`discharge macaroon ${yt(Sn.identifier)} was used more than once`) + Sn._verify(mn, un, An, wn, fn) + break + } + if (!Zt) throw new Error(`cannot find discharge macaroon for caveat ${yt(Dn._identifierBits)}`) + pn = Ut(pn, Dn._vidBits, Dn._identifierBits) + } else { + const un = At(Dn._identifierBits), + Zt = An(un) + if (Zt) throw new Error(`caveat check failed (${un}): ${Zt}`) + pn = Nt(pn, Dn._identifierBits) + } + }) + const kn = nn(mn, pn) + if (!nt.default.bitArray.equal(kn, this._signatureBits)) + throw new Error('signature mismatch after caveat verification') + } + exportJSON() { + switch (this._version) { + case 1: + return this._exportAsJSONObjectV1() + case 2: + return this._exportAsJSONObjectV2() + default: + throw new Error(`unexpected macaroon version ${this._version}`) + } + } + _exportAsJSONObjectV1() { + const mn = { + identifier: At(this._identifierBits), + signature: nt.default.codec.hex.fromBits(this._signatureBits), + } + return ( + this._locationStr && (mn.location = this._locationStr), + this._caveats.length > 0 && + (mn.caveats = this._caveats.map((In) => { + const An = { cid: At(In._identifierBits) } + return ( + In._vidBits && + ((An.vid = nt.default.codec.base64.fromBits(In._vidBits, !0, !0)), (An.cl = In._locationStr)), + An + ) + })), + mn + ) + } + _exportAsJSONObjectV2() { + const mn = { v: 2 } + return ( + Ft(mn, 's', $t(this._signatureBits)), + Ft(mn, 'i', $t(this._identifierBits)), + this._locationStr && (mn.l = this._locationStr), + this._caveats && + this._caveats.length > 0 && + (mn.c = this._caveats.map((In) => { + const An = {} + return ( + Ft(An, 'i', $t(In._identifierBits)), + In._vidBits && (Ft(An, 'v', $t(In._vidBits)), (An.l = In._locationStr)), + An + ) + })), + mn + ) + } + _exportBinaryV1() { + throw new Error('V1 binary export not supported') + } + _exportBinaryV2() { + const mn = new bt(200) + return ( + mn.appendByte(2), + this._locationStr && Wt(mn, ht, St(this._locationStr)), + Wt(mn, dt, $t(this._identifierBits)), + Wt(mn, ut), + this._caveats.forEach(function (In) { + In._locationStr && Wt(mn, ht, St(In._locationStr)), + Wt(mn, dt, $t(In._identifierBits)), + In._vidBits && Wt(mn, pt, $t(In._vidBits)), + Wt(mn, ut) + }), + Wt(mn, ut), + Wt(mn, mt, $t(this._signatureBits)), + mn.bytes + ) + } + exportBinary() { + switch (this._version) { + case 1: + return this._exportBinaryV1() + case 2: + return this._exportBinaryV2() + default: + throw new Error(`unexpected macaroon version ${this._version}`) + } + } + } + ;(tt.importMacaroon = function (cn) { + if ((typeof cn == 'string' && (cn = tt.base64ToBytes(cn)), cn instanceof Uint8Array)) { + const mn = new xt(cn), + In = Tn(mn) + if (mn.length !== 0) throw new TypeError('extra data found at end of serialized macaroon') + return In + } + if (Array.isArray(cn)) throw new TypeError('cannot import an array of macaroons as a single macaroon') + return vn(cn) + }), + (tt.importMacaroons = function (cn) { + if ((typeof cn == 'string' && (cn = tt.base64ToBytes(cn)), cn instanceof Uint8Array)) { + if (cn.length === 0) throw new TypeError('empty macaroon data') + const mn = new xt(cn), + In = [] + do In.push(Tn(mn)) + while (mn.length > 0) + return In + } + return Array.isArray(cn) ? cn.map((mn) => vn(mn)) : [vn(cn)] + }) + const vn = function (cn) { + return an(cn) ? Qt(cn) : _n(cn) + } + function an(cn) { + return kt(cn.signature) + } + const Qt = function (cn) { + const mn = + cn.caveats && + cn.caveats.map((In) => { + const An = { identifierBytes: St(Pt(In.cid, 'Caveat id')), locationStr: Ct(In.cl, 'Caveat location') } + return In.vid && (An.vidBytes = tt.base64ToBytes(Pt(In.vid, 'Caveat verification id'))), An + }) + return new hn({ + version: 1, + locationStr: Ct(cn.location, 'Macaroon location'), + identifierBytes: St(Pt(cn.identifier, 'Macaroon identifier')), + caveats: mn, + signatureBytes: Dt(cn.signature), + }) + }, + _n = function (cn) { + if (cn.v !== 2 && cn.v !== void 0) throw new Error(`Unsupported macaroon version ${cn.v}`) + const mn = { + version: 2, + signatureBytes: Pn(cn, 's', !0), + locationStr: Tt(Pn(cn, 'l', !1)), + identifierBytes: Pn(cn, 'i', !0), + } + if (cn.c) { + if (!Array.isArray(cn.c)) throw new Error('caveats field does not hold an array') + mn.caveats = cn.c.map((In) => ({ + identifierBytes: Pn(In, 'i', !0), + locationStr: Tt(Pn(In, 'l')), + vidBytes: Pn(In, 'v', !1), + })) + } + return new hn(mn) + } + function Pn(cn, mn, In) { + if (cn.hasOwnProperty(mn)) return St(cn[mn]) + const An = mn + '64' + if (cn.hasOwnProperty(An)) return tt.base64ToBytes(cn[An]) + if (In) throw new Error('Expected key: ' + mn) + return null + } + const $n = function (cn) { + const mn = cn.readByte() + if (mn !== 2) throw new Error(`Only version 2 is supported, found version ${mn}`) + const In = Tt(zt(cn, ht)), + An = Ot(cn, dt), + wn = [] + for (Ot(cn, ut); !zt(cn, ut); ) { + const pn = { locationStr: Tt(zt(cn, ht)), identifierBytes: Ot(cn, dt), vidBytes: zt(cn, pt) } + Ot(cn, ut), wn.push(pn) + } + const fn = Ot(cn, mt) + if (cn.length !== 0) throw new Error('unexpected extra data at end of macaroon') + return new hn({ version: mn, locationStr: In, identifierBytes: An, signatureBytes: fn, caveats: wn }) + }, + Nn = function (cn) { + return (48 <= cn && cn <= 58) || (97 <= cn && cn <= 102) + }, + Tn = function (cn) { + if (cn.length === 0) throw new Error('Empty macaroon data') + const mn = cn.peekByte() + if (mn === 2) return $n(cn) + throw Nn(mn) + ? new Error('Version 1 binary format not supported') + : new Error('Cannot determine data format of binary-encoded macaroon') + } + ;(tt.newMacaroon = function ({ identifier: cn, location: mn, rootKey: In, version: An }) { + const wn = wt(cn, 'Macaroon identifier'), + fn = wt(In, 'Macaroon root key') + return new hn({ + version: An === void 0 ? 2 : An, + identifierBytes: wn, + locationStr: Ct(mn, 'Macaroon location'), + signatureBytes: $t(Nt(Ht(Et(fn)), Et(wn))), + }) + }), + (tt.dischargeMacaroon = function (cn, mn, In, An) { + const wn = cn.signature, + fn = [cn] + let pn = 0, + kn = !1 + const Dn = cn.location, + un = (Sn) => { + kn || (Sn.bindToRoot(wn), fn.push(Sn), pn--, Xt(Sn)) + }, + Zt = (Sn) => { + kn || (An(Sn), (kn = !0)) + }, + Xt = (Sn) => { + let Rn, jn + for (jn = 0; jn < Sn._caveats.length; jn++) + (Rn = Sn._caveats[jn]), Rn._vidBits && (mn(Dn, Rn._locationStr, $t(Rn._identifierBits), un, Zt), pn++) + if (pn === 0) { + In(fn) + return + } + } + Xt(cn) + }) + })(macaroon$1) + ;(function (tt) { + var et = + (commonjsGlobal && commonjsGlobal.__createBinding) || + (Object.create + ? function (pt, mt, gt, yt) { + yt === void 0 && (yt = gt) + var bt = Object.getOwnPropertyDescriptor(mt, gt) + ;(!bt || ('get' in bt ? !mt.__esModule : bt.writable || bt.configurable)) && + (bt = { + enumerable: !0, + get: function () { + return mt[gt] + }, + }), + Object.defineProperty(pt, yt, bt) + } + : function (pt, mt, gt, yt) { + yt === void 0 && (yt = gt), (pt[yt] = mt[gt]) + }), + nt = + (commonjsGlobal && commonjsGlobal.__setModuleDefault) || + (Object.create + ? function (pt, mt) { + Object.defineProperty(pt, 'default', { enumerable: !0, value: mt }) + } + : function (pt, mt) { + pt.default = mt + }), + rt = + (commonjsGlobal && commonjsGlobal.__importStar) || + function (pt) { + if (pt && pt.__esModule) return pt + var mt = {} + if (pt != null) + for (var gt in pt) gt !== 'default' && Object.prototype.hasOwnProperty.call(pt, gt) && et(mt, pt, gt) + return nt(mt, pt), mt + }, + it = + (commonjsGlobal && commonjsGlobal.__importDefault) || + function (pt) { + return pt && pt.__esModule ? pt : { default: pt } + } + Object.defineProperty(tt, '__esModule', { value: !0 }), + (tt.decodeIdentifierFromMacaroon = + tt.Identifier = + tt.ErrUnknownVersion = + tt.TOKEN_ID_SIZE = + tt.LATEST_VERSION = + void 0) + const ot = requireAssert(), + at = bufio, + st = it(requireCryptoBrowserify()), + lt = it(v4_1), + ct = rt(macaroon$1) + ;(tt.LATEST_VERSION = 0), (tt.TOKEN_ID_SIZE = 32) + class ut extends Error { + constructor(mt, ...gt) { + super(...gt), + Error.captureStackTrace && Error.captureStackTrace(this, ut), + (this.name = 'ErrUnknownVersion'), + (this.message = `${this.name}:${mt}`) + } + } + tt.ErrUnknownVersion = ut + class ht extends at.Struct { + constructor(mt) { + super(mt), + (this.version = tt.LATEST_VERSION), + (this.paymentHash = null), + (this.tokenId = null), + mt && this.fromOptions(mt) + } + fromOptions(mt) { + if (mt.version && mt.version > tt.LATEST_VERSION) throw new ut(mt.version) + if ( + (mt.version && (this.version = mt.version), + ot(typeof this.version == 'number', 'Identifier version must be a number'), + ot(mt.paymentHash.length === 32, `Expected 32-byte hash, instead got ${mt.paymentHash.length}`), + (this.paymentHash = mt.paymentHash), + mt.tokenId) + ) + this.tokenId = mt.tokenId + else { + const gt = (0, lt.default)() + this.tokenId = st.default.createHash('sha256').update(Buffer.from(gt)).digest() + } + return ot(this.tokenId.length === tt.TOKEN_ID_SIZE, 'Token Id of unexpected size'), this + } + toString() { + return this.toHex() + } + static fromString(mt) { + try { + return new this().fromHex(mt) + } catch { + return new this().fromBase64(mt) + } + } + write(mt) { + switch ((mt.writeU16BE(this.version), this.version)) { + case 0: + return ( + mt.writeHash(this.paymentHash), + ot( + Buffer.isBuffer(this.tokenId) && this.tokenId.length === tt.TOKEN_ID_SIZE, + `Token ID must be ${tt.TOKEN_ID_SIZE}-byte hash`, + ), + mt.writeBytes(this.tokenId), + this + ) + default: + throw new ut(this.version) + } + } + read(mt) { + switch (((this.version = mt.readU16BE()), this.version)) { + case 0: + return (this.paymentHash = mt.readHash()), (this.tokenId = mt.readBytes(tt.TOKEN_ID_SIZE)), this + default: + throw new ut(this.version) + } + } + } + tt.Identifier = ht + const dt = (pt) => { + const mt = ct.importMacaroon(pt) + let gt = mt._exportAsJSONObjectV2().i + if (gt == null && ((gt = mt._exportAsJSONObjectV2().i64), gt == null)) + throw new Error('Problem parsing macaroon identifier') + return gt + } + tt.decodeIdentifierFromMacaroon = dt + })(identifier) + var caveat = {} + /*! + * assert.js - assertions for javascript + * Copyright (c) 2018, Christopher Jeffrey (MIT License). + * https://github.com/chjj/bsert + */ class AssertionError extends Error { + constructor(et) { + typeof et == 'string' && (et = { message: et }), (et === null || typeof et != 'object') && (et = {}) + let nt = null, + rt = 'fail', + it = !!et.generatedMessage + if ( + (et.message != null && (nt = toString$6(et.message)), + typeof et.operator == 'string' && (rt = et.operator), + nt == null) + ) { + if (rt === 'fail') nt = 'Assertion failed.' + else { + const at = stringify(et.actual), + st = stringify(et.expected) + nt = `${at} ${rt} ${st}` + } + it = !0 + } + super(nt) + let ot = this.constructor + typeof et.stackStartFunction == 'function' + ? (ot = et.stackStartFunction) + : typeof et.stackStartFn == 'function' && (ot = et.stackStartFn), + (this.type = 'AssertionError'), + (this.name = 'AssertionError [ERR_ASSERTION]'), + (this.code = 'ERR_ASSERTION'), + (this.generatedMessage = it), + (this.actual = et.actual), + (this.expected = et.expected), + (this.operator = rt), + Error.captureStackTrace && Error.captureStackTrace(this, ot) + } + } + function assert$4(tt, et) { + if (!tt) { + let nt = !1 + if (arguments.length === 0) (et = 'No value argument passed to `assert()`.'), (nt = !0) + else if (et == null) (et = 'Assertion failed.'), (nt = !0) + else if (isError(et)) throw et + throw new AssertionError({ + message: et, + actual: tt, + expected: !0, + operator: '==', + generatedMessage: nt, + stackStartFn: assert$4, + }) + } + } + function equal$1(tt, et, nt) { + if (!Object.is(tt, et)) + throw isError(nt) + ? nt + : new AssertionError({ message: nt, actual: tt, expected: et, operator: 'strictEqual', stackStartFn: equal$1 }) + } + function notEqual(tt, et, nt) { + if (Object.is(tt, et)) + throw isError(nt) + ? nt + : new AssertionError({ + message: nt, + actual: tt, + expected: et, + operator: 'notStrictEqual', + stackStartFn: notEqual, + }) + } + function fail(tt) { + let et = !1 + throw isError(tt) + ? tt + : (tt == null && ((tt = 'Assertion failed.'), (et = !0)), + new AssertionError({ + message: tt, + actual: !1, + expected: !0, + operator: 'fail', + generatedMessage: et, + stackStartFn: fail, + })) + } + function throws(tt, et, nt) { + typeof et == 'string' && ((nt = et), (et = void 0)) + let rt = !1, + it = null + enforce(typeof tt == 'function', 'func', 'function') + try { + tt() + } catch (ot) { + ;(rt = !0), (it = ot) + } + if (!rt) { + let ot = !1 + throw ( + (nt == null && ((nt = 'Missing expected exception.'), (ot = !0)), + new AssertionError({ + message: nt, + actual: void 0, + expected: et, + operator: 'throws', + generatedMessage: ot, + stackStartFn: throws, + })) + ) + } + if (!testError(it, et, nt, throws)) throw it + } + function doesNotThrow(tt, et, nt) { + typeof et == 'string' && ((nt = et), (et = void 0)) + let rt = !1, + it = null + enforce(typeof tt == 'function', 'func', 'function') + try { + tt() + } catch (ot) { + ;(rt = !0), (it = ot) + } + if (rt) { + if (testError(it, et, nt, doesNotThrow)) { + let ot = !1 + throw ( + (nt == null && ((nt = 'Got unwanted exception.'), (ot = !0)), + new AssertionError({ + message: nt, + actual: it, + expected: et, + operator: 'doesNotThrow', + generatedMessage: ot, + stackStartFn: doesNotThrow, + })) + ) + } + throw it + } + } + async function rejects(tt, et, nt) { + typeof et == 'string' && ((nt = et), (et = void 0)) + let rt = !1, + it = null + typeof tt != 'function' && enforce(isPromise$1(tt), 'func', 'promise') + try { + isPromise$1(tt) ? await tt : await tt() + } catch (ot) { + ;(rt = !0), (it = ot) + } + if (!rt) { + let ot = !1 + throw ( + (nt == null && ((nt = 'Missing expected rejection.'), (ot = !0)), + new AssertionError({ + message: nt, + actual: void 0, + expected: et, + operator: 'rejects', + generatedMessage: ot, + stackStartFn: rejects, + })) + ) + } + if (!testError(it, et, nt, rejects)) throw it + } + async function doesNotReject(tt, et, nt) { + typeof et == 'string' && ((nt = et), (et = void 0)) + let rt = !1, + it = null + typeof tt != 'function' && enforce(isPromise$1(tt), 'func', 'promise') + try { + isPromise$1(tt) ? await tt : await tt() + } catch (ot) { + ;(rt = !0), (it = ot) + } + if (rt) { + if (testError(it, et, nt, doesNotReject)) { + let ot = !1 + throw ( + (nt == null && ((nt = 'Got unwanted rejection.'), (ot = !0)), + new AssertionError({ + message: nt, + actual: void 0, + expected: et, + operator: 'doesNotReject', + generatedMessage: ot, + stackStartFn: doesNotReject, + })) + ) + } + throw it + } + } + function ifError(tt) { + if (tt != null) { + let et = 'ifError got unwanted exception: ' + throw ( + (typeof tt == 'object' && typeof tt.message == 'string' + ? tt.message.length === 0 && tt.constructor + ? (et += tt.constructor.name) + : (et += tt.message) + : (et += stringify(tt)), + new AssertionError({ + message: et, + actual: tt, + expected: null, + operator: 'ifError', + generatedMessage: !0, + stackStartFn: ifError, + })) + ) + } + } + function deepEqual$1(tt, et, nt) { + if (!isDeepEqual(tt, et, !1)) + throw isError(nt) + ? nt + : new AssertionError({ + message: nt, + actual: tt, + expected: et, + operator: 'deepStrictEqual', + stackStartFn: deepEqual$1, + }) + } + function notDeepEqual(tt, et, nt) { + if (isDeepEqual(tt, et, !0)) + throw isError(nt) + ? nt + : new AssertionError({ + message: nt, + actual: tt, + expected: et, + operator: 'notDeepStrictEqual', + stackStartFn: notDeepEqual, + }) + } + function bufferEqual(tt, et, nt, rt) { + if ( + (isEncoding(nt) || ((rt = nt), (nt = null)), + nt == null && (nt = 'hex'), + (et = bufferize(tt, et, nt)), + enforce(isBuffer$4(tt), 'actual', 'buffer'), + enforce(isBuffer$4(et), 'expected', 'buffer'), + tt !== et && !tt.equals(et)) + ) + throw isError(rt) + ? rt + : new AssertionError({ + message: rt, + actual: tt.toString(nt), + expected: et.toString(nt), + operator: 'bufferEqual', + stackStartFn: bufferEqual, + }) + } + function notBufferEqual(tt, et, nt, rt) { + if ( + (isEncoding(nt) || ((rt = nt), (nt = null)), + nt == null && (nt = 'hex'), + (et = bufferize(tt, et, nt)), + enforce(isBuffer$4(tt), 'actual', 'buffer'), + enforce(isBuffer$4(et), 'expected', 'buffer'), + tt === et || tt.equals(et)) + ) + throw isError(rt) + ? rt + : new AssertionError({ + message: rt, + actual: tt.toString(nt), + expected: et.toString(nt), + operator: 'notBufferEqual', + stackStartFn: notBufferEqual, + }) + } + function enforce(tt, et, nt) { + if (!tt) { + let rt + et == null + ? (rt = 'Invalid type for parameter.') + : nt == null + ? (rt = `Invalid type for "${et}".`) + : (rt = `"${et}" must be a(n) ${nt}.`) + const it = new TypeError(rt) + throw (Error.captureStackTrace && Error.captureStackTrace(it, enforce), it) + } + } + function range$7(tt, et) { + if (!tt) { + const nt = et != null ? `"${et}" is out of range.` : 'Parameter is out of range.', + rt = new RangeError(nt) + throw (Error.captureStackTrace && Error.captureStackTrace(rt, range$7), rt) + } + } + function stringify(tt) { + switch (typeof tt) { + case 'undefined': + return 'undefined' + case 'object': + return tt === null ? 'null' : `[${objectName(tt)}]` + case 'boolean': + return `${tt}` + case 'number': + return `${tt}` + case 'string': + return tt.length > 80 && (tt = `${tt.substring(0, 77)}...`), JSON.stringify(tt) + case 'symbol': + return tryString(tt) + case 'function': + return `[${funcName(tt)}]` + case 'bigint': + return `${tt}n` + default: + return `[${typeof tt}]` + } + } + function toString$6(tt) { + return typeof tt == 'string' ? tt : isError(tt) ? tryString(tt) : stringify(tt) + } + function tryString(tt) { + try { + return String(tt) + } catch { + return 'Object' + } + } + function testError(tt, et, nt, rt) { + if (et == null) return !0 + if (isRegExp(et)) return et.test(tt) + if (typeof et != 'function') { + if (rt === doesNotThrow || rt === doesNotReject) throw new TypeError('"expected" must not be an object.') + if (typeof et != 'object') throw new TypeError('"expected" must be an object.') + let it = !1 + if ( + (nt == null && ((nt = `Missing expected ${rt === rejects ? 'rejection' : 'exception'}.`), (it = !0)), + tt == null || typeof tt != 'object') + ) + throw new AssertionError({ + actual: tt, + expected: et, + message: nt, + operator: rt.name, + generatedMessage: it, + stackStartFn: rt, + }) + const ot = Object.keys(et) + if ((isError(et) && ot.push('name', 'message'), ot.length === 0)) + throw new TypeError('"expected" may not be an empty object.') + for (const at of ot) { + const st = et[at], + lt = tt[at] + if (!(typeof lt == 'string' && isRegExp(st) && st.test(lt)) && !(at in tt && isDeepEqual(lt, st, !1))) + throw new AssertionError({ + actual: tt, + expected: et, + message: nt, + operator: rt.name, + generatedMessage: it, + stackStartFn: rt, + }) + } + return !0 + } + return et.prototype !== void 0 && tt instanceof et ? !0 : Error.isPrototypeOf(et) ? !1 : et.call({}, tt) === !0 + } + function isDeepEqual(tt, et, nt) { + try { + return compare(tt, et, null) + } catch { + return nt + } + } + function compare(tt, et, nt) { + if (Object.is(tt, et)) return !0 + if ( + !isObject$e(tt) || + !isObject$e(et) || + objectString(tt) !== objectString(et) || + Object.getPrototypeOf(tt) !== Object.getPrototypeOf(et) + ) + return !1 + if (isBuffer$4(tt) && isBuffer$4(et)) return tt.equals(et) + if (isDate$1(tt)) return Object.is(tt.getTime(), et.getTime()) + if (isRegExp(tt)) + return ( + tt.source === et.source && + tt.global === et.global && + tt.multiline === et.multiline && + tt.lastIndex === et.lastIndex && + tt.ignoreCase === et.ignoreCase + ) + if (isError(tt) && tt.message !== et.message) return !1 + if ( + (isArrayBuffer(tt) && ((tt = new Uint8Array(tt)), (et = new Uint8Array(et))), isView$2(tt) && !isBuffer$4(tt)) + ) { + if (isBuffer$4(et)) return !1 + const it = new Uint8Array(tt.buffer), + ot = new Uint8Array(et.buffer) + if (it.length !== ot.length) return !1 + for (let at = 0; at < it.length; at++) if (it[at] !== ot[at]) return !1 + return !0 + } + if (isSet$2(tt)) return tt.size !== et.size ? !1 : new Set([...tt, ...et]).size === tt.size + if (!nt) nt = { a: new Map(), b: new Map(), p: 0 } + else { + const it = nt.a.get(tt) + if (it != null) { + const ot = nt.b.get(et) + if (ot != null) return it === ot + } + nt.p += 1 + } + nt.a.set(tt, nt.p), nt.b.set(et, nt.p) + const rt = recurse(tt, et, nt) + return nt.a.delete(tt), nt.b.delete(et), rt + } + function recurse(tt, et, nt) { + if (isMap$2(tt)) { + if (tt.size !== et.size) return !1 + const at = new Set([...tt.keys(), ...et.keys()]) + if (at.size !== tt.size) return !1 + for (const st of at) if (!compare(tt.get(st), et.get(st), nt)) return !1 + return !0 + } + if (isArray$j(tt)) { + if (tt.length !== et.length) return !1 + for (let at = 0; at < tt.length; at++) if (!compare(tt[at], et[at], nt)) return !1 + return !0 + } + const rt = ownKeys$B(tt), + it = ownKeys$B(et) + if (rt.length !== it.length) return !1 + const ot = new Set([...rt, ...it]) + if (ot.size !== rt.length) return !1 + for (const at of ot) if (!compare(tt[at], et[at], nt)) return !1 + return !0 + } + function ownKeys$B(tt) { + const et = Object.keys(tt) + if (!Object.getOwnPropertySymbols || !Object.getOwnPropertyDescriptor) return et + const nt = Object.getOwnPropertySymbols(tt) + for (const rt of nt) { + const it = Object.getOwnPropertyDescriptor(tt, rt) + it && it.enumerable && et.push(rt) + } + return et + } + function objectString(tt) { + if (tt === void 0) return '[object Undefined]' + if (tt === null) return '[object Null]' + try { + return Object.prototype.toString.call(tt) + } catch { + return '[object Object]' + } + } + function objectType(tt) { + return objectString(tt).slice(8, -1) + } + function objectName(tt) { + const et = objectType(tt) + if (tt == null || (et !== 'Object' && et !== 'Error')) return et + let nt, rt + try { + nt = tt.constructor + } catch {} + if (nt == null) return et + try { + rt = nt.name + } catch { + return et + } + return typeof rt != 'string' || rt.length === 0 ? et : rt + } + function funcName(tt) { + let et + try { + et = tt.name + } catch {} + return typeof et != 'string' || et.length === 0 ? 'Function' : `Function: ${et}` + } + function isArray$j(tt) { + return Array.isArray(tt) + } + function isArrayBuffer(tt) { + return tt instanceof ArrayBuffer + } + function isBuffer$4(tt) { + return isObject$e(tt) && typeof tt.writeUInt32LE == 'function' && typeof tt.equals == 'function' + } + function isDate$1(tt) { + return tt instanceof Date + } + function isError(tt) { + return tt instanceof Error + } + function isMap$2(tt) { + return tt instanceof Map + } + function isObject$e(tt) { + return tt && typeof tt == 'object' + } + function isPromise$1(tt) { + return tt instanceof Promise + } + function isRegExp(tt) { + return tt instanceof RegExp + } + function isSet$2(tt) { + return tt instanceof Set + } + function isView$2(tt) { + return ArrayBuffer.isView(tt) + } + function isEncoding(tt) { + if (typeof tt != 'string') return !1 + switch (tt) { + case 'ascii': + case 'binary': + case 'base64': + case 'hex': + case 'latin1': + case 'ucs2': + case 'utf8': + case 'utf16le': + return !0 + } + return !1 + } + function bufferize(tt, et, nt) { + if (typeof et == 'string') { + if (!isBuffer$4(tt)) return null + const { constructor: rt } = tt + if (!rt || typeof rt.from != 'function' || !isEncoding(nt) || (nt === 'hex' && et.length & 1)) return null + const it = rt.from(et, nt) + return nt === 'hex' && it.length !== et.length >>> 1 ? null : it + } + return et + } + assert$4.AssertionError = AssertionError + assert$4.assert = assert$4 + assert$4.strict = assert$4 + assert$4.ok = assert$4 + assert$4.equal = equal$1 + assert$4.notEqual = notEqual + assert$4.strictEqual = equal$1 + assert$4.notStrictEqual = notEqual + assert$4.fail = fail + assert$4.throws = throws + assert$4.doesNotThrow = doesNotThrow + assert$4.rejects = rejects + assert$4.doesNotReject = doesNotReject + assert$4.ifError = ifError + assert$4.deepEqual = deepEqual$1 + assert$4.notDeepEqual = notDeepEqual + assert$4.deepStrictEqual = deepEqual$1 + assert$4.notDeepStrictEqual = notDeepEqual + assert$4.bufferEqual = bufferEqual + assert$4.notBufferEqual = notBufferEqual + assert$4.enforce = enforce + assert$4.range = range$7 + var assert_1 = assert$4, + __createBinding$2 = + (commonjsGlobal && commonjsGlobal.__createBinding) || + (Object.create + ? function (tt, et, nt, rt) { + rt === void 0 && (rt = nt) + var it = Object.getOwnPropertyDescriptor(et, nt) + ;(!it || ('get' in it ? !et.__esModule : it.writable || it.configurable)) && + (it = { + enumerable: !0, + get: function () { + return et[nt] + }, + }), + Object.defineProperty(tt, rt, it) + } + : function (tt, et, nt, rt) { + rt === void 0 && (rt = nt), (tt[rt] = et[nt]) + }), + __setModuleDefault$2 = + (commonjsGlobal && commonjsGlobal.__setModuleDefault) || + (Object.create + ? function (tt, et) { + Object.defineProperty(tt, 'default', { enumerable: !0, value: et }) + } + : function (tt, et) { + tt.default = et + }), + __importStar$2 = + (commonjsGlobal && commonjsGlobal.__importStar) || + function (tt) { + if (tt && tt.__esModule) return tt + var et = {} + if (tt != null) + for (var nt in tt) + nt !== 'default' && Object.prototype.hasOwnProperty.call(tt, nt) && __createBinding$2(et, tt, nt) + return __setModuleDefault$2(et, tt), et + }, + __importDefault = + (commonjsGlobal && commonjsGlobal.__importDefault) || + function (tt) { + return tt && tt.__esModule ? tt : { default: tt } + } + Object.defineProperty(caveat, '__esModule', { value: !0 }) + caveat.verifyCaveats = caveat.hasCaveat = caveat.Caveat = caveat.ErrInvalidCaveat = void 0 + const bsert_1 = __importDefault(assert_1), + Macaroon$1 = __importStar$2(macaroon$1) + class ErrInvalidCaveat extends Error { + constructor(...et) { + super(...et), + Error.captureStackTrace && Error.captureStackTrace(this, ErrInvalidCaveat), + (this.name = 'ErrInvalidCaveat'), + (this.message = 'Caveat must be of the form "condition[<,=,>]value"') + } + } + caveat.ErrInvalidCaveat = ErrInvalidCaveat + const validComp = new Set(['<', '>', '=']) + class Caveat { + constructor(et) { + ;(this.condition = ''), (this.value = ''), (this.comp = '='), et && this.fromOptions(et) + } + fromOptions(et) { + if ( + ((0, bsert_1.default)(et, 'Data required to create new caveat'), + (0, bsert_1.default)(typeof et.condition == 'string' && et.condition.length, 'Require a condition'), + (this.condition = et.condition), + et.value.toString(), + (this.value = et.value), + et.comp) + ) { + if (!validComp.has(et.comp)) throw new ErrInvalidCaveat() + this.comp = et.comp + } + return this + } + encode() { + return `${this.condition}${this.comp}${this.value}` + } + static decode(et) { + let nt + for (let at = 0; at < et.length; at++) + if (validComp.has(et[at])) { + nt = at + break + } + if (!nt) throw new ErrInvalidCaveat() + const rt = et.slice(0, nt).trim(), + it = et[nt].trim(), + ot = et.slice(nt + 1).trim() + return new this({ condition: rt, comp: it, value: ot }) + } + } + caveat.Caveat = Caveat + function hasCaveat(tt, et) { + const nt = Macaroon$1.importMacaroon(tt)._exportAsJSONObjectV2() + let rt + typeof et == 'string' ? (rt = Caveat.decode(et)) : (rt = et) + const it = rt.condition + if (nt.c == null) return !1 + let ot + return ( + nt.c.forEach((at) => { + try { + if (at.i != null) { + const st = Caveat.decode(at.i) + it === st.condition && (ot = st.value) + } + } catch {} + }), + ot || !1 + ) + } + caveat.hasCaveat = hasCaveat + function verifyCaveats(tt, et, nt = {}) { + if (et) Array.isArray(et) || (et = [et]) + else return !0 + const rt = new Map() + for (const ot of et) rt.set(ot.condition, ot) + const it = new Map() + for (const ot of tt) { + const at = ot.condition + if (!rt.has(at)) continue + it.has(at) || it.set(at, []) + const st = it.get(at) + st.push(ot), it.set(at, st) + } + for (const [ot, at] of it) { + const st = rt.get(ot) + for (let lt = 0; lt < at.length - 1; lt++) { + const ct = at[lt], + ut = at[lt + 1] + if (!st.satisfyPrevious(ct, ut, nt)) return !1 + } + if (!st.satisfyFinal(at[at.length - 1], nt)) return !1 + } + return !0 + } + caveat.verifyCaveats = verifyCaveats + var lsat$1 = {}, + helpers = {}, + ALPHABET$2 = 'qpzry9x8gf2tvdw0s3jn54khce6mua7l', + ALPHABET_MAP$1 = {} + for (var z$3 = 0; z$3 < ALPHABET$2.length; z$3++) { + var x$4 = ALPHABET$2.charAt(z$3) + if (ALPHABET_MAP$1[x$4] !== void 0) throw new TypeError(x$4 + ' is ambiguous') + ALPHABET_MAP$1[x$4] = z$3 + } + function polymodStep$1(tt) { + var et = tt >> 25 + return ( + ((tt & 33554431) << 5) ^ + (-((et >> 0) & 1) & 996825010) ^ + (-((et >> 1) & 1) & 642813549) ^ + (-((et >> 2) & 1) & 513874426) ^ + (-((et >> 3) & 1) & 1027748829) ^ + (-((et >> 4) & 1) & 705979059) + ) + } + function prefixChk$1(tt) { + for (var et = 1, nt = 0; nt < tt.length; ++nt) { + var rt = tt.charCodeAt(nt) + if (rt < 33 || rt > 126) return 'Invalid prefix (' + tt + ')' + et = polymodStep$1(et) ^ (rt >> 5) + } + for (et = polymodStep$1(et), nt = 0; nt < tt.length; ++nt) { + var it = tt.charCodeAt(nt) + et = polymodStep$1(et) ^ (it & 31) + } + return et + } + function encode$o(tt, et, nt) { + if (((nt = nt || 90), tt.length + 7 + et.length > nt)) throw new TypeError('Exceeds length limit') + tt = tt.toLowerCase() + var rt = prefixChk$1(tt) + if (typeof rt == 'string') throw new Error(rt) + for (var it = tt + '1', ot = 0; ot < et.length; ++ot) { + var at = et[ot] + if (at >> 5) throw new Error('Non 5-bit word') + ;(rt = polymodStep$1(rt) ^ at), (it += ALPHABET$2.charAt(at)) + } + for (ot = 0; ot < 6; ++ot) rt = polymodStep$1(rt) + for (rt ^= 1, ot = 0; ot < 6; ++ot) { + var st = (rt >> ((5 - ot) * 5)) & 31 + it += ALPHABET$2.charAt(st) + } + return it + } + function __decode(tt, et) { + if (((et = et || 90), tt.length < 8)) return tt + ' too short' + if (tt.length > et) return 'Exceeds length limit' + var nt = tt.toLowerCase(), + rt = tt.toUpperCase() + if (tt !== nt && tt !== rt) return 'Mixed-case string ' + tt + tt = nt + var it = tt.lastIndexOf('1') + if (it === -1) return 'No separator character for ' + tt + if (it === 0) return 'Missing prefix for ' + tt + var ot = tt.slice(0, it), + at = tt.slice(it + 1) + if (at.length < 6) return 'Data too short' + var st = prefixChk$1(ot) + if (typeof st == 'string') return st + for (var lt = [], ct = 0; ct < at.length; ++ct) { + var ut = at.charAt(ct), + ht = ALPHABET_MAP$1[ut] + if (ht === void 0) return 'Unknown character ' + ut + ;(st = polymodStep$1(st) ^ ht), !(ct + 6 >= at.length) && lt.push(ht) + } + return st !== 1 ? 'Invalid checksum for ' + tt : { prefix: ot, words: lt } + } + function decodeUnsafe() { + var tt = __decode.apply(null, arguments) + if (typeof tt == 'object') return tt + } + function decode$n(tt) { + var et = __decode.apply(null, arguments) + if (typeof et == 'object') return et + throw new Error(et) + } + function convert$4(tt, et, nt, rt) { + for (var it = 0, ot = 0, at = (1 << nt) - 1, st = [], lt = 0; lt < tt.length; ++lt) + for (it = (it << et) | tt[lt], ot += et; ot >= nt; ) (ot -= nt), st.push((it >> ot) & at) + if (rt) ot > 0 && st.push((it << (nt - ot)) & at) + else { + if (ot >= et) return 'Excess padding' + if ((it << (nt - ot)) & at) return 'Non-zero padding' + } + return st + } + function toWordsUnsafe(tt) { + var et = convert$4(tt, 8, 5, !0) + if (Array.isArray(et)) return et + } + function toWords$1(tt) { + var et = convert$4(tt, 8, 5, !0) + if (Array.isArray(et)) return et + throw new Error(et) + } + function fromWordsUnsafe$1(tt) { + var et = convert$4(tt, 5, 8, !1) + if (Array.isArray(et)) return et + } + function fromWords$1(tt) { + var et = convert$4(tt, 5, 8, !1) + if (Array.isArray(et)) return et + throw new Error(et) + } + var bech32$1 = { + decodeUnsafe, + decode: decode$n, + encode: encode$o, + toWordsUnsafe, + toWords: toWords$1, + fromWordsUnsafe: fromWordsUnsafe$1, + fromWords: fromWords$1, + } + const errors$2 = { + IMPOSSIBLE_CASE: 'Impossible case. Please create issue.', + TWEAK_ADD: 'The tweak was out of range or the resulted private key is invalid', + TWEAK_MUL: 'The tweak was out of range or equal to zero', + CONTEXT_RANDOMIZE_UNKNOW: 'Unknow error on context randomization', + SECKEY_INVALID: 'Private Key is invalid', + PUBKEY_PARSE: 'Public Key could not be parsed', + PUBKEY_SERIALIZE: 'Public Key serialization error', + PUBKEY_COMBINE: 'The sum of the public keys is not valid', + SIG_PARSE: 'Signature could not be parsed', + SIGN: 'The nonce generation function failed, or the private key was invalid', + RECOVER: 'Public key could not be recover', + ECDH: 'Scalar was invalid (zero or overflow)', + } + function assert$3(tt, et) { + if (!tt) throw new Error(et) + } + function isUint8Array(tt, et, nt) { + if ((assert$3(et instanceof Uint8Array, `Expected ${tt} to be an Uint8Array`), nt !== void 0)) + if (Array.isArray(nt)) { + const rt = nt.join(', '), + it = `Expected ${tt} to be an Uint8Array with length [${rt}]` + assert$3(nt.includes(et.length), it) + } else { + const rt = `Expected ${tt} to be an Uint8Array with length ${nt}` + assert$3(et.length === nt, rt) + } + } + function isCompressed(tt) { + assert$3(toTypeString(tt) === 'Boolean', 'Expected compressed to be a Boolean') + } + function getAssertedOutput(tt = (nt) => new Uint8Array(nt), et) { + return typeof tt == 'function' && (tt = tt(et)), isUint8Array('output', tt, et), tt + } + function toTypeString(tt) { + return Object.prototype.toString.call(tt).slice(8, -1) + } + var lib$3 = (tt) => ({ + contextRandomize(et) { + switch ( + (assert$3(et === null || et instanceof Uint8Array, 'Expected seed to be an Uint8Array or null'), + et !== null && isUint8Array('seed', et, 32), + tt.contextRandomize(et)) + ) { + case 1: + throw new Error(errors$2.CONTEXT_RANDOMIZE_UNKNOW) + } + }, + privateKeyVerify(et) { + return isUint8Array('private key', et, 32), tt.privateKeyVerify(et) === 0 + }, + privateKeyNegate(et) { + switch ((isUint8Array('private key', et, 32), tt.privateKeyNegate(et))) { + case 0: + return et + case 1: + throw new Error(errors$2.IMPOSSIBLE_CASE) + } + }, + privateKeyTweakAdd(et, nt) { + switch ((isUint8Array('private key', et, 32), isUint8Array('tweak', nt, 32), tt.privateKeyTweakAdd(et, nt))) { + case 0: + return et + case 1: + throw new Error(errors$2.TWEAK_ADD) + } + }, + privateKeyTweakMul(et, nt) { + switch ((isUint8Array('private key', et, 32), isUint8Array('tweak', nt, 32), tt.privateKeyTweakMul(et, nt))) { + case 0: + return et + case 1: + throw new Error(errors$2.TWEAK_MUL) + } + }, + publicKeyVerify(et) { + return isUint8Array('public key', et, [33, 65]), tt.publicKeyVerify(et) === 0 + }, + publicKeyCreate(et, nt = !0, rt) { + switch ( + (isUint8Array('private key', et, 32), + isCompressed(nt), + (rt = getAssertedOutput(rt, nt ? 33 : 65)), + tt.publicKeyCreate(rt, et)) + ) { + case 0: + return rt + case 1: + throw new Error(errors$2.SECKEY_INVALID) + case 2: + throw new Error(errors$2.PUBKEY_SERIALIZE) + } + }, + publicKeyConvert(et, nt = !0, rt) { + switch ( + (isUint8Array('public key', et, [33, 65]), + isCompressed(nt), + (rt = getAssertedOutput(rt, nt ? 33 : 65)), + tt.publicKeyConvert(rt, et)) + ) { + case 0: + return rt + case 1: + throw new Error(errors$2.PUBKEY_PARSE) + case 2: + throw new Error(errors$2.PUBKEY_SERIALIZE) + } + }, + publicKeyNegate(et, nt = !0, rt) { + switch ( + (isUint8Array('public key', et, [33, 65]), + isCompressed(nt), + (rt = getAssertedOutput(rt, nt ? 33 : 65)), + tt.publicKeyNegate(rt, et)) + ) { + case 0: + return rt + case 1: + throw new Error(errors$2.PUBKEY_PARSE) + case 2: + throw new Error(errors$2.IMPOSSIBLE_CASE) + case 3: + throw new Error(errors$2.PUBKEY_SERIALIZE) + } + }, + publicKeyCombine(et, nt = !0, rt) { + assert$3(Array.isArray(et), 'Expected public keys to be an Array'), + assert$3(et.length > 0, 'Expected public keys array will have more than zero items') + for (const it of et) isUint8Array('public key', it, [33, 65]) + switch ((isCompressed(nt), (rt = getAssertedOutput(rt, nt ? 33 : 65)), tt.publicKeyCombine(rt, et))) { + case 0: + return rt + case 1: + throw new Error(errors$2.PUBKEY_PARSE) + case 2: + throw new Error(errors$2.PUBKEY_COMBINE) + case 3: + throw new Error(errors$2.PUBKEY_SERIALIZE) + } + }, + publicKeyTweakAdd(et, nt, rt = !0, it) { + switch ( + (isUint8Array('public key', et, [33, 65]), + isUint8Array('tweak', nt, 32), + isCompressed(rt), + (it = getAssertedOutput(it, rt ? 33 : 65)), + tt.publicKeyTweakAdd(it, et, nt)) + ) { + case 0: + return it + case 1: + throw new Error(errors$2.PUBKEY_PARSE) + case 2: + throw new Error(errors$2.TWEAK_ADD) + } + }, + publicKeyTweakMul(et, nt, rt = !0, it) { + switch ( + (isUint8Array('public key', et, [33, 65]), + isUint8Array('tweak', nt, 32), + isCompressed(rt), + (it = getAssertedOutput(it, rt ? 33 : 65)), + tt.publicKeyTweakMul(it, et, nt)) + ) { + case 0: + return it + case 1: + throw new Error(errors$2.PUBKEY_PARSE) + case 2: + throw new Error(errors$2.TWEAK_MUL) + } + }, + signatureNormalize(et) { + switch ((isUint8Array('signature', et, 64), tt.signatureNormalize(et))) { + case 0: + return et + case 1: + throw new Error(errors$2.SIG_PARSE) + } + }, + signatureExport(et, nt) { + isUint8Array('signature', et, 64), (nt = getAssertedOutput(nt, 72)) + const rt = { output: nt, outputlen: 72 } + switch (tt.signatureExport(rt, et)) { + case 0: + return nt.slice(0, rt.outputlen) + case 1: + throw new Error(errors$2.SIG_PARSE) + case 2: + throw new Error(errors$2.IMPOSSIBLE_CASE) + } + }, + signatureImport(et, nt) { + switch ((isUint8Array('signature', et), (nt = getAssertedOutput(nt, 64)), tt.signatureImport(nt, et))) { + case 0: + return nt + case 1: + throw new Error(errors$2.SIG_PARSE) + case 2: + throw new Error(errors$2.IMPOSSIBLE_CASE) + } + }, + ecdsaSign(et, nt, rt = {}, it) { + isUint8Array('message', et, 32), + isUint8Array('private key', nt, 32), + assert$3(toTypeString(rt) === 'Object', 'Expected options to be an Object'), + rt.data !== void 0 && isUint8Array('options.data', rt.data), + rt.noncefn !== void 0 && + assert$3(toTypeString(rt.noncefn) === 'Function', 'Expected options.noncefn to be a Function'), + (it = getAssertedOutput(it, 64)) + const ot = { signature: it, recid: null } + switch (tt.ecdsaSign(ot, et, nt, rt.data, rt.noncefn)) { + case 0: + return ot + case 1: + throw new Error(errors$2.SIGN) + case 2: + throw new Error(errors$2.IMPOSSIBLE_CASE) + } + }, + ecdsaVerify(et, nt, rt) { + switch ( + (isUint8Array('signature', et, 64), + isUint8Array('message', nt, 32), + isUint8Array('public key', rt, [33, 65]), + tt.ecdsaVerify(et, nt, rt)) + ) { + case 0: + return !0 + case 3: + return !1 + case 1: + throw new Error(errors$2.SIG_PARSE) + case 2: + throw new Error(errors$2.PUBKEY_PARSE) + } + }, + ecdsaRecover(et, nt, rt, it = !0, ot) { + switch ( + (isUint8Array('signature', et, 64), + assert$3( + toTypeString(nt) === 'Number' && nt >= 0 && nt <= 3, + 'Expected recovery id to be a Number within interval [0, 3]', + ), + isUint8Array('message', rt, 32), + isCompressed(it), + (ot = getAssertedOutput(ot, it ? 33 : 65)), + tt.ecdsaRecover(ot, et, nt, rt)) + ) { + case 0: + return ot + case 1: + throw new Error(errors$2.SIG_PARSE) + case 2: + throw new Error(errors$2.RECOVER) + case 3: + throw new Error(errors$2.IMPOSSIBLE_CASE) + } + }, + ecdh(et, nt, rt = {}, it) { + switch ( + (isUint8Array('public key', et, [33, 65]), + isUint8Array('private key', nt, 32), + assert$3(toTypeString(rt) === 'Object', 'Expected options to be an Object'), + rt.data !== void 0 && isUint8Array('options.data', rt.data), + rt.hashfn !== void 0 + ? (assert$3(toTypeString(rt.hashfn) === 'Function', 'Expected options.hashfn to be a Function'), + rt.xbuf !== void 0 && isUint8Array('options.xbuf', rt.xbuf, 32), + rt.ybuf !== void 0 && isUint8Array('options.ybuf', rt.ybuf, 32), + isUint8Array('output', it)) + : (it = getAssertedOutput(it, 32)), + tt.ecdh(it, et, nt, rt.data, rt.hashfn, rt.xbuf, rt.ybuf)) + ) { + case 0: + return it + case 1: + throw new Error(errors$2.PUBKEY_PARSE) + case 2: + throw new Error(errors$2.ECDH) + } + }, + }) + const EC = requireElliptic().ec, + ec = new EC('secp256k1'), + ecparams = ec.curve, + BN$1 = ecparams.n.constructor + function loadCompressedPublicKey(tt, et) { + let nt = new BN$1(et) + if (nt.cmp(ecparams.p) >= 0) return null + nt = nt.toRed(ecparams.red) + let rt = nt.redSqr().redIMul(nt).redIAdd(ecparams.b).redSqrt() + return (tt === 3) !== rt.isOdd() && (rt = rt.redNeg()), ec.keyPair({ pub: { x: nt, y: rt } }) + } + function loadUncompressedPublicKey(tt, et, nt) { + let rt = new BN$1(et), + it = new BN$1(nt) + if ( + rt.cmp(ecparams.p) >= 0 || + it.cmp(ecparams.p) >= 0 || + ((rt = rt.toRed(ecparams.red)), + (it = it.toRed(ecparams.red)), + (tt === 6 || tt === 7) && it.isOdd() !== (tt === 7)) + ) + return null + const ot = rt.redSqr().redIMul(rt) + return it.redSqr().redISub(ot.redIAdd(ecparams.b)).isZero() ? ec.keyPair({ pub: { x: rt, y: it } }) : null + } + function loadPublicKey(tt) { + const et = tt[0] + switch (et) { + case 2: + case 3: + return tt.length !== 33 ? null : loadCompressedPublicKey(et, tt.subarray(1, 33)) + case 4: + case 6: + case 7: + return tt.length !== 65 ? null : loadUncompressedPublicKey(et, tt.subarray(1, 33), tt.subarray(33, 65)) + default: + return null + } + } + function savePublicKey(tt, et) { + const nt = et.encode(null, tt.length === 33) + for (let rt = 0; rt < tt.length; ++rt) tt[rt] = nt[rt] + } + var elliptic$1 = { + contextRandomize() { + return 0 + }, + privateKeyVerify(tt) { + const et = new BN$1(tt) + return et.cmp(ecparams.n) < 0 && !et.isZero() ? 0 : 1 + }, + privateKeyNegate(tt) { + const et = new BN$1(tt), + nt = ecparams.n.sub(et).umod(ecparams.n).toArrayLike(Uint8Array, 'be', 32) + return tt.set(nt), 0 + }, + privateKeyTweakAdd(tt, et) { + const nt = new BN$1(et) + if ( + nt.cmp(ecparams.n) >= 0 || + (nt.iadd(new BN$1(tt)), nt.cmp(ecparams.n) >= 0 && nt.isub(ecparams.n), nt.isZero()) + ) + return 1 + const rt = nt.toArrayLike(Uint8Array, 'be', 32) + return tt.set(rt), 0 + }, + privateKeyTweakMul(tt, et) { + let nt = new BN$1(et) + if (nt.cmp(ecparams.n) >= 0 || nt.isZero()) return 1 + nt.imul(new BN$1(tt)), nt.cmp(ecparams.n) >= 0 && (nt = nt.umod(ecparams.n)) + const rt = nt.toArrayLike(Uint8Array, 'be', 32) + return tt.set(rt), 0 + }, + publicKeyVerify(tt) { + return loadPublicKey(tt) === null ? 1 : 0 + }, + publicKeyCreate(tt, et) { + const nt = new BN$1(et) + if (nt.cmp(ecparams.n) >= 0 || nt.isZero()) return 1 + const rt = ec.keyFromPrivate(et).getPublic() + return savePublicKey(tt, rt), 0 + }, + publicKeyConvert(tt, et) { + const nt = loadPublicKey(et) + if (nt === null) return 1 + const rt = nt.getPublic() + return savePublicKey(tt, rt), 0 + }, + publicKeyNegate(tt, et) { + const nt = loadPublicKey(et) + if (nt === null) return 1 + const rt = nt.getPublic() + return (rt.y = rt.y.redNeg()), savePublicKey(tt, rt), 0 + }, + publicKeyCombine(tt, et) { + const nt = new Array(et.length) + for (let it = 0; it < et.length; ++it) if (((nt[it] = loadPublicKey(et[it])), nt[it] === null)) return 1 + let rt = nt[0].getPublic() + for (let it = 1; it < nt.length; ++it) rt = rt.add(nt[it].pub) + return rt.isInfinity() ? 2 : (savePublicKey(tt, rt), 0) + }, + publicKeyTweakAdd(tt, et, nt) { + const rt = loadPublicKey(et) + if (rt === null) return 1 + if (((nt = new BN$1(nt)), nt.cmp(ecparams.n) >= 0)) return 2 + const it = rt.getPublic().add(ecparams.g.mul(nt)) + return it.isInfinity() ? 2 : (savePublicKey(tt, it), 0) + }, + publicKeyTweakMul(tt, et, nt) { + const rt = loadPublicKey(et) + if (rt === null) return 1 + if (((nt = new BN$1(nt)), nt.cmp(ecparams.n) >= 0 || nt.isZero())) return 2 + const it = rt.getPublic().mul(nt) + return savePublicKey(tt, it), 0 + }, + signatureNormalize(tt) { + const et = new BN$1(tt.subarray(0, 32)), + nt = new BN$1(tt.subarray(32, 64)) + return et.cmp(ecparams.n) >= 0 || nt.cmp(ecparams.n) >= 0 + ? 1 + : (nt.cmp(ec.nh) === 1 && tt.set(ecparams.n.sub(nt).toArrayLike(Uint8Array, 'be', 32), 32), 0) + }, + signatureExport(tt, et) { + const nt = et.subarray(0, 32), + rt = et.subarray(32, 64) + if (new BN$1(nt).cmp(ecparams.n) >= 0 || new BN$1(rt).cmp(ecparams.n) >= 0) return 1 + const { output: it } = tt + let ot = it.subarray(4, 4 + 33) + ;(ot[0] = 0), ot.set(nt, 1) + let at = 33, + st = 0 + for (; at > 1 && ot[st] === 0 && !(ot[st + 1] & 128); --at, ++st); + if (((ot = ot.subarray(st)), ot[0] & 128 || (at > 1 && ot[0] === 0 && !(ot[1] & 128)))) return 1 + let lt = it.subarray(6 + 33, 6 + 33 + 33) + ;(lt[0] = 0), lt.set(rt, 1) + let ct = 33, + ut = 0 + for (; ct > 1 && lt[ut] === 0 && !(lt[ut + 1] & 128); --ct, ++ut); + return ( + (lt = lt.subarray(ut)), + lt[0] & 128 || (ct > 1 && lt[0] === 0 && !(lt[1] & 128)) + ? 1 + : ((tt.outputlen = 6 + at + ct), + (it[0] = 48), + (it[1] = tt.outputlen - 2), + (it[2] = 2), + (it[3] = ot.length), + it.set(ot, 4), + (it[4 + at] = 2), + (it[5 + at] = lt.length), + it.set(lt, 6 + at), + 0) + ) + }, + signatureImport(tt, et) { + if (et.length < 8 || et.length > 72 || et[0] !== 48 || et[1] !== et.length - 2 || et[2] !== 2) return 1 + const nt = et[3] + if (nt === 0 || 5 + nt >= et.length || et[4 + nt] !== 2) return 1 + const rt = et[5 + nt] + if ( + rt === 0 || + 6 + nt + rt !== et.length || + et[4] & 128 || + (nt > 1 && et[4] === 0 && !(et[5] & 128)) || + et[nt + 6] & 128 || + (rt > 1 && et[nt + 6] === 0 && !(et[nt + 7] & 128)) + ) + return 1 + let it = et.subarray(4, 4 + nt) + if ((it.length === 33 && it[0] === 0 && (it = it.subarray(1)), it.length > 32)) return 1 + let ot = et.subarray(6 + nt) + if ((ot.length === 33 && ot[0] === 0 && (ot = ot.slice(1)), ot.length > 32)) + throw new Error('S length is too long') + let at = new BN$1(it) + at.cmp(ecparams.n) >= 0 && (at = new BN$1(0)) + let st = new BN$1(et.subarray(6 + nt)) + return ( + st.cmp(ecparams.n) >= 0 && (st = new BN$1(0)), + tt.set(at.toArrayLike(Uint8Array, 'be', 32), 0), + tt.set(st.toArrayLike(Uint8Array, 'be', 32), 32), + 0 + ) + }, + ecdsaSign(tt, et, nt, rt, it) { + if (it) { + const st = it + it = (lt) => { + const ct = st(et, nt, null, rt, lt) + if (!(ct instanceof Uint8Array && ct.length === 32)) throw new Error('This is the way') + return new BN$1(ct) + } + } + const ot = new BN$1(nt) + if (ot.cmp(ecparams.n) >= 0 || ot.isZero()) return 1 + let at + try { + at = ec.sign(et, nt, { canonical: !0, k: it, pers: rt }) + } catch { + return 1 + } + return ( + tt.signature.set(at.r.toArrayLike(Uint8Array, 'be', 32), 0), + tt.signature.set(at.s.toArrayLike(Uint8Array, 'be', 32), 32), + (tt.recid = at.recoveryParam), + 0 + ) + }, + ecdsaVerify(tt, et, nt) { + const rt = { r: tt.subarray(0, 32), s: tt.subarray(32, 64) }, + it = new BN$1(rt.r), + ot = new BN$1(rt.s) + if (it.cmp(ecparams.n) >= 0 || ot.cmp(ecparams.n) >= 0) return 1 + if (ot.cmp(ec.nh) === 1 || it.isZero() || ot.isZero()) return 3 + const at = loadPublicKey(nt) + if (at === null) return 2 + const st = at.getPublic() + return ec.verify(et, rt, st) ? 0 : 3 + }, + ecdsaRecover(tt, et, nt, rt) { + const it = { r: et.slice(0, 32), s: et.slice(32, 64) }, + ot = new BN$1(it.r), + at = new BN$1(it.s) + if (ot.cmp(ecparams.n) >= 0 || at.cmp(ecparams.n) >= 0) return 1 + if (ot.isZero() || at.isZero()) return 2 + let st + try { + st = ec.recoverPubKey(rt, it, nt) + } catch { + return 2 + } + return savePublicKey(tt, st), 0 + }, + ecdh(tt, et, nt, rt, it, ot, at) { + const st = loadPublicKey(et) + if (st === null) return 1 + const lt = new BN$1(nt) + if (lt.cmp(ecparams.n) >= 0 || lt.isZero()) return 2 + const ct = st.getPublic().mul(lt) + if (it === void 0) { + const ut = ct.encode(null, !0), + ht = ec.hash().update(ut).digest() + for (let dt = 0; dt < 32; ++dt) tt[dt] = ht[dt] + } else { + ot || (ot = new Uint8Array(32)) + const ut = ct.getX().toArray('be', 32) + for (let mt = 0; mt < 32; ++mt) ot[mt] = ut[mt] + at || (at = new Uint8Array(32)) + const ht = ct.getY().toArray('be', 32) + for (let mt = 0; mt < 32; ++mt) at[mt] = ht[mt] + const dt = it(ot, at, rt) + if (!(dt instanceof Uint8Array && dt.length === tt.length)) return 2 + tt.set(dt) + } + return 0 + }, + }, + elliptic = lib$3(elliptic$1), + src$1 = {}, + address = {}, + networks$1 = {} + Object.defineProperty(networks$1, '__esModule', { value: !0 }) + networks$1.testnet = networks$1.regtest = networks$1.bitcoin = void 0 + networks$1.bitcoin = { + messagePrefix: `Bitcoin Signed Message: +`, + bech32: 'bc', + bip32: { public: 76067358, private: 76066276 }, + pubKeyHash: 0, + scriptHash: 5, + wif: 128, + } + networks$1.regtest = { + messagePrefix: `Bitcoin Signed Message: +`, + bech32: 'bcrt', + bip32: { public: 70617039, private: 70615956 }, + pubKeyHash: 111, + scriptHash: 196, + wif: 239, + } + networks$1.testnet = { + messagePrefix: `Bitcoin Signed Message: +`, + bech32: 'tb', + bip32: { public: 70617039, private: 70615956 }, + pubKeyHash: 111, + scriptHash: 196, + wif: 239, + } + var payments$3 = {}, + embed = {}, + script = {}, + bip66$1 = {} + Object.defineProperty(bip66$1, '__esModule', { value: !0 }) + bip66$1.encode = bip66$1.decode = bip66$1.check = void 0 + function check$d(tt) { + if (tt.length < 8 || tt.length > 72 || tt[0] !== 48 || tt[1] !== tt.length - 2 || tt[2] !== 2) return !1 + const et = tt[3] + if (et === 0 || 5 + et >= tt.length || tt[4 + et] !== 2) return !1 + const nt = tt[5 + et] + return !( + nt === 0 || + 6 + et + nt !== tt.length || + tt[4] & 128 || + (et > 1 && tt[4] === 0 && !(tt[5] & 128)) || + tt[et + 6] & 128 || + (nt > 1 && tt[et + 6] === 0 && !(tt[et + 7] & 128)) + ) + } + bip66$1.check = check$d + function decode$m(tt) { + if (tt.length < 8) throw new Error('DER sequence length is too short') + if (tt.length > 72) throw new Error('DER sequence length is too long') + if (tt[0] !== 48) throw new Error('Expected DER sequence') + if (tt[1] !== tt.length - 2) throw new Error('DER sequence length is invalid') + if (tt[2] !== 2) throw new Error('Expected DER integer') + const et = tt[3] + if (et === 0) throw new Error('R length is zero') + if (5 + et >= tt.length) throw new Error('R length is too long') + if (tt[4 + et] !== 2) throw new Error('Expected DER integer (2)') + const nt = tt[5 + et] + if (nt === 0) throw new Error('S length is zero') + if (6 + et + nt !== tt.length) throw new Error('S length is invalid') + if (tt[4] & 128) throw new Error('R value is negative') + if (et > 1 && tt[4] === 0 && !(tt[5] & 128)) throw new Error('R value excessively padded') + if (tt[et + 6] & 128) throw new Error('S value is negative') + if (nt > 1 && tt[et + 6] === 0 && !(tt[et + 7] & 128)) throw new Error('S value excessively padded') + return { r: tt.slice(4, 4 + et), s: tt.slice(6 + et) } + } + bip66$1.decode = decode$m + function encode$n(tt, et) { + const nt = tt.length, + rt = et.length + if (nt === 0) throw new Error('R length is zero') + if (rt === 0) throw new Error('S length is zero') + if (nt > 33) throw new Error('R length is too long') + if (rt > 33) throw new Error('S length is too long') + if (tt[0] & 128) throw new Error('R value is negative') + if (et[0] & 128) throw new Error('S value is negative') + if (nt > 1 && tt[0] === 0 && !(tt[1] & 128)) throw new Error('R value excessively padded') + if (rt > 1 && et[0] === 0 && !(et[1] & 128)) throw new Error('S value excessively padded') + const it = Buffer.allocUnsafe(6 + nt + rt) + return ( + (it[0] = 48), + (it[1] = it.length - 2), + (it[2] = 2), + (it[3] = tt.length), + tt.copy(it, 4), + (it[4 + nt] = 2), + (it[5 + nt] = et.length), + et.copy(it, 6 + nt), + it + ) + } + bip66$1.encode = encode$n + var ops = {} + Object.defineProperty(ops, '__esModule', { value: !0 }) + ops.REVERSE_OPS = ops.OPS = void 0 + const OPS$8 = { + OP_FALSE: 0, + OP_0: 0, + OP_PUSHDATA1: 76, + OP_PUSHDATA2: 77, + OP_PUSHDATA4: 78, + OP_1NEGATE: 79, + OP_RESERVED: 80, + OP_TRUE: 81, + OP_1: 81, + OP_2: 82, + OP_3: 83, + OP_4: 84, + OP_5: 85, + OP_6: 86, + OP_7: 87, + OP_8: 88, + OP_9: 89, + OP_10: 90, + OP_11: 91, + OP_12: 92, + OP_13: 93, + OP_14: 94, + OP_15: 95, + OP_16: 96, + OP_NOP: 97, + OP_VER: 98, + OP_IF: 99, + OP_NOTIF: 100, + OP_VERIF: 101, + OP_VERNOTIF: 102, + OP_ELSE: 103, + OP_ENDIF: 104, + OP_VERIFY: 105, + OP_RETURN: 106, + OP_TOALTSTACK: 107, + OP_FROMALTSTACK: 108, + OP_2DROP: 109, + OP_2DUP: 110, + OP_3DUP: 111, + OP_2OVER: 112, + OP_2ROT: 113, + OP_2SWAP: 114, + OP_IFDUP: 115, + OP_DEPTH: 116, + OP_DROP: 117, + OP_DUP: 118, + OP_NIP: 119, + OP_OVER: 120, + OP_PICK: 121, + OP_ROLL: 122, + OP_ROT: 123, + OP_SWAP: 124, + OP_TUCK: 125, + OP_CAT: 126, + OP_SUBSTR: 127, + OP_LEFT: 128, + OP_RIGHT: 129, + OP_SIZE: 130, + OP_INVERT: 131, + OP_AND: 132, + OP_OR: 133, + OP_XOR: 134, + OP_EQUAL: 135, + OP_EQUALVERIFY: 136, + OP_RESERVED1: 137, + OP_RESERVED2: 138, + OP_1ADD: 139, + OP_1SUB: 140, + OP_2MUL: 141, + OP_2DIV: 142, + OP_NEGATE: 143, + OP_ABS: 144, + OP_NOT: 145, + OP_0NOTEQUAL: 146, + OP_ADD: 147, + OP_SUB: 148, + OP_MUL: 149, + OP_DIV: 150, + OP_MOD: 151, + OP_LSHIFT: 152, + OP_RSHIFT: 153, + OP_BOOLAND: 154, + OP_BOOLOR: 155, + OP_NUMEQUAL: 156, + OP_NUMEQUALVERIFY: 157, + OP_NUMNOTEQUAL: 158, + OP_LESSTHAN: 159, + OP_GREATERTHAN: 160, + OP_LESSTHANOREQUAL: 161, + OP_GREATERTHANOREQUAL: 162, + OP_MIN: 163, + OP_MAX: 164, + OP_WITHIN: 165, + OP_RIPEMD160: 166, + OP_SHA1: 167, + OP_SHA256: 168, + OP_HASH160: 169, + OP_HASH256: 170, + OP_CODESEPARATOR: 171, + OP_CHECKSIG: 172, + OP_CHECKSIGVERIFY: 173, + OP_CHECKMULTISIG: 174, + OP_CHECKMULTISIGVERIFY: 175, + OP_NOP1: 176, + OP_NOP2: 177, + OP_CHECKLOCKTIMEVERIFY: 177, + OP_NOP3: 178, + OP_CHECKSEQUENCEVERIFY: 178, + OP_NOP4: 179, + OP_NOP5: 180, + OP_NOP6: 181, + OP_NOP7: 182, + OP_NOP8: 183, + OP_NOP9: 184, + OP_NOP10: 185, + OP_CHECKSIGADD: 186, + OP_PUBKEYHASH: 253, + OP_PUBKEY: 254, + OP_INVALIDOPCODE: 255, + } + ops.OPS = OPS$8 + const REVERSE_OPS = {} + ops.REVERSE_OPS = REVERSE_OPS + for (const tt of Object.keys(OPS$8)) { + const et = OPS$8[tt] + REVERSE_OPS[et] = tt + } + var push_data = {} + Object.defineProperty(push_data, '__esModule', { value: !0 }) + push_data.decode = push_data.encode = push_data.encodingLength = void 0 + const ops_1 = ops + function encodingLength$2(tt) { + return tt < ops_1.OPS.OP_PUSHDATA1 ? 1 : tt <= 255 ? 2 : tt <= 65535 ? 3 : 5 + } + push_data.encodingLength = encodingLength$2 + function encode$m(tt, et, nt) { + const rt = encodingLength$2(et) + return ( + rt === 1 + ? tt.writeUInt8(et, nt) + : rt === 2 + ? (tt.writeUInt8(ops_1.OPS.OP_PUSHDATA1, nt), tt.writeUInt8(et, nt + 1)) + : rt === 3 + ? (tt.writeUInt8(ops_1.OPS.OP_PUSHDATA2, nt), tt.writeUInt16LE(et, nt + 1)) + : (tt.writeUInt8(ops_1.OPS.OP_PUSHDATA4, nt), tt.writeUInt32LE(et, nt + 1)), + rt + ) + } + push_data.encode = encode$m + function decode$l(tt, et) { + const nt = tt.readUInt8(et) + let rt, it + if (nt < ops_1.OPS.OP_PUSHDATA1) (rt = nt), (it = 1) + else if (nt === ops_1.OPS.OP_PUSHDATA1) { + if (et + 2 > tt.length) return null + ;(rt = tt.readUInt8(et + 1)), (it = 2) + } else if (nt === ops_1.OPS.OP_PUSHDATA2) { + if (et + 3 > tt.length) return null + ;(rt = tt.readUInt16LE(et + 1)), (it = 3) + } else { + if (et + 5 > tt.length) return null + if (nt !== ops_1.OPS.OP_PUSHDATA4) throw new Error('Unexpected opcode') + ;(rt = tt.readUInt32LE(et + 1)), (it = 5) + } + return { opcode: nt, number: rt, size: it } + } + push_data.decode = decode$l + var script_number = {} + Object.defineProperty(script_number, '__esModule', { value: !0 }) + script_number.encode = script_number.decode = void 0 + function decode$k(tt, et, nt) { + ;(et = et || 4), (nt = nt === void 0 ? !0 : nt) + const rt = tt.length + if (rt === 0) return 0 + if (rt > et) throw new TypeError('Script number overflow') + if (nt && !(tt[rt - 1] & 127) && (rt <= 1 || !(tt[rt - 2] & 128))) + throw new Error('Non-minimally encoded script number') + if (rt === 5) { + const ot = tt.readUInt32LE(0), + at = tt.readUInt8(4) + return at & 128 ? -((at & -129) * 4294967296 + ot) : at * 4294967296 + ot + } + let it = 0 + for (let ot = 0; ot < rt; ++ot) it |= tt[ot] << (8 * ot) + return tt[rt - 1] & 128 ? -(it & ~(128 << (8 * (rt - 1)))) : it + } + script_number.decode = decode$k + function scriptNumSize(tt) { + return tt > 2147483647 ? 5 : tt > 8388607 ? 4 : tt > 32767 ? 3 : tt > 127 ? 2 : tt > 0 ? 1 : 0 + } + function encode$l(tt) { + let et = Math.abs(tt) + const nt = scriptNumSize(et), + rt = Buffer.allocUnsafe(nt), + it = tt < 0 + for (let ot = 0; ot < nt; ++ot) rt.writeUInt8(et & 255, ot), (et >>= 8) + return rt[nt - 1] & 128 ? rt.writeUInt8(it ? 128 : 0, nt - 1) : it && (rt[nt - 1] |= 128), rt + } + script_number.encode = encode$l + var script_signature = {}, + types$6 = {}, + types$5 = { + Array: function (tt) { + return tt != null && tt.constructor === Array + }, + Boolean: function (tt) { + return typeof tt == 'boolean' + }, + Function: function (tt) { + return typeof tt == 'function' + }, + Nil: function (tt) { + return tt == null + }, + Number: function (tt) { + return typeof tt == 'number' + }, + Object: function (tt) { + return typeof tt == 'object' + }, + String: function (tt) { + return typeof tt == 'string' + }, + '': function () { + return !0 + }, + } + types$5.Null = types$5.Nil + for (var typeName$1 in types$5) + types$5[typeName$1].toJSON = function (tt) { + return tt + }.bind(null, typeName$1) + var native$1 = types$5, + native = native$1 + function getTypeName(tt) { + return tt.name || tt.toString().match(/function (.*?)\s*\(/)[1] + } + function getValueTypeName$1(tt) { + return native.Nil(tt) ? '' : getTypeName(tt.constructor) + } + function getValue$2(tt) { + return native.Function(tt) ? '' : native.String(tt) ? JSON.stringify(tt) : tt && native.Object(tt) ? '' : tt + } + function captureStackTrace(tt, et) { + Error.captureStackTrace && Error.captureStackTrace(tt, et) + } + function tfJSON$1(tt) { + return native.Function(tt) + ? tt.toJSON + ? tt.toJSON() + : getTypeName(tt) + : native.Array(tt) + ? 'Array' + : tt && native.Object(tt) + ? 'Object' + : tt !== void 0 + ? tt + : '' + } + function tfErrorString(tt, et, nt) { + var rt = getValue$2(et) + return 'Expected ' + tfJSON$1(tt) + ', got' + (nt !== '' ? ' ' + nt : '') + (rt !== '' ? ' ' + rt : '') + } + function TfTypeError$1(tt, et, nt) { + ;(nt = nt || getValueTypeName$1(et)), + (this.message = tfErrorString(tt, et, nt)), + captureStackTrace(this, TfTypeError$1), + (this.__type = tt), + (this.__value = et), + (this.__valueTypeName = nt) + } + TfTypeError$1.prototype = Object.create(Error.prototype) + TfTypeError$1.prototype.constructor = TfTypeError$1 + function tfPropertyErrorString(tt, et, nt, rt, it) { + var ot = '" of type ' + return ( + et === 'key' && (ot = '" with key type '), tfErrorString('property "' + tfJSON$1(nt) + ot + tfJSON$1(tt), rt, it) + ) + } + function TfPropertyTypeError$1(tt, et, nt, rt, it) { + tt + ? ((it = it || getValueTypeName$1(rt)), (this.message = tfPropertyErrorString(tt, nt, et, rt, it))) + : (this.message = 'Unexpected property "' + et + '"'), + captureStackTrace(this, TfTypeError$1), + (this.__label = nt), + (this.__property = et), + (this.__type = tt), + (this.__value = rt), + (this.__valueTypeName = it) + } + TfPropertyTypeError$1.prototype = Object.create(Error.prototype) + TfPropertyTypeError$1.prototype.constructor = TfTypeError$1 + function tfCustomError(tt, et) { + return new TfTypeError$1(tt, {}, et) + } + function tfSubError$1(tt, et, nt) { + return ( + tt instanceof TfPropertyTypeError$1 + ? ((et = et + '.' + tt.__property), + (tt = new TfPropertyTypeError$1(tt.__type, et, tt.__label, tt.__value, tt.__valueTypeName))) + : tt instanceof TfTypeError$1 && + (tt = new TfPropertyTypeError$1(tt.__type, et, nt, tt.__value, tt.__valueTypeName)), + captureStackTrace(tt), + tt + ) + } + var errors$1 = { + TfTypeError: TfTypeError$1, + TfPropertyTypeError: TfPropertyTypeError$1, + tfCustomError, + tfSubError: tfSubError$1, + tfJSON: tfJSON$1, + getValueTypeName: getValueTypeName$1, + }, + extra, + hasRequiredExtra + function requireExtra() { + if (hasRequiredExtra) return extra + hasRequiredExtra = 1 + var tt = native$1, + et = errors$1 + function nt(Tt) { + return Buffer.isBuffer(Tt) + } + function rt(Tt) { + return typeof Tt == 'string' && /^([0-9a-f]{2})+$/i.test(Tt) + } + function it(Tt, At) { + var Et = Tt.toJSON() + function $t(Dt) { + if (!Tt(Dt)) return !1 + if (Dt.length === At) return !0 + throw et.tfCustomError(Et + '(Length: ' + At + ')', Et + '(Length: ' + Dt.length + ')') + } + return ( + ($t.toJSON = function () { + return Et + }), + $t + ) + } + var ot = it.bind(null, tt.Array), + at = it.bind(null, nt), + st = it.bind(null, rt), + lt = it.bind(null, tt.String) + function ct(Tt, At, Et) { + Et = Et || tt.Number + function $t(Dt, jt) { + return Et(Dt, jt) && Dt > Tt && Dt < At + } + return ( + ($t.toJSON = function () { + return `${Et.toJSON()} between [${Tt}, ${At}]` + }), + $t + ) + } + var ut = Math.pow(2, 53) - 1 + function ht(Tt) { + return typeof Tt == 'number' && isFinite(Tt) + } + function dt(Tt) { + return (Tt << 24) >> 24 === Tt + } + function pt(Tt) { + return (Tt << 16) >> 16 === Tt + } + function mt(Tt) { + return (Tt | 0) === Tt + } + function gt(Tt) { + return typeof Tt == 'number' && Tt >= -ut && Tt <= ut && Math.floor(Tt) === Tt + } + function yt(Tt) { + return (Tt & 255) === Tt + } + function bt(Tt) { + return (Tt & 65535) === Tt + } + function vt(Tt) { + return Tt >>> 0 === Tt + } + function xt(Tt) { + return typeof Tt == 'number' && Tt >= 0 && Tt <= ut && Math.floor(Tt) === Tt + } + var kt = { + ArrayN: ot, + Buffer: nt, + BufferN: at, + Finite: ht, + Hex: rt, + HexN: st, + Int8: dt, + Int16: pt, + Int32: mt, + Int53: gt, + Range: ct, + StringN: lt, + UInt8: yt, + UInt16: bt, + UInt32: vt, + UInt53: xt, + } + for (var St in kt) + kt[St].toJSON = function (Tt) { + return Tt + }.bind(null, St) + return (extra = kt), extra + } + var ERRORS = errors$1, + NATIVE = native$1, + tfJSON = ERRORS.tfJSON, + TfTypeError = ERRORS.TfTypeError, + TfPropertyTypeError = ERRORS.TfPropertyTypeError, + tfSubError = ERRORS.tfSubError, + getValueTypeName = ERRORS.getValueTypeName, + TYPES = { + arrayOf: function (et, nt) { + ;(et = compile(et)), (nt = nt || {}) + function rt(it, ot) { + return !NATIVE.Array(it) || + NATIVE.Nil(it) || + (nt.minLength !== void 0 && it.length < nt.minLength) || + (nt.maxLength !== void 0 && it.length > nt.maxLength) || + (nt.length !== void 0 && it.length !== nt.length) + ? !1 + : it.every(function (at, st) { + try { + return typeforce$4(et, at, ot) + } catch (lt) { + throw tfSubError(lt, st) + } + }) + } + return ( + (rt.toJSON = function () { + var it = '[' + tfJSON(et) + ']' + return ( + nt.length !== void 0 + ? (it += '{' + nt.length + '}') + : (nt.minLength !== void 0 || nt.maxLength !== void 0) && + (it += + '{' + + (nt.minLength === void 0 ? 0 : nt.minLength) + + ',' + + (nt.maxLength === void 0 ? 1 / 0 : nt.maxLength) + + '}'), + it + ) + }), + rt + ) + }, + maybe: function tt(et) { + et = compile(et) + function nt(rt, it) { + return NATIVE.Nil(rt) || et(rt, it, tt) + } + return ( + (nt.toJSON = function () { + return '?' + tfJSON(et) + }), + nt + ) + }, + map: function (et, nt) { + ;(et = compile(et)), nt && (nt = compile(nt)) + function rt(it, ot) { + if (!NATIVE.Object(it) || NATIVE.Nil(it)) return !1 + for (var at in it) { + try { + nt && typeforce$4(nt, at, ot) + } catch (lt) { + throw tfSubError(lt, at, 'key') + } + try { + var st = it[at] + typeforce$4(et, st, ot) + } catch (lt) { + throw tfSubError(lt, at) + } + } + return !0 + } + return ( + nt + ? (rt.toJSON = function () { + return '{' + tfJSON(nt) + ': ' + tfJSON(et) + '}' + }) + : (rt.toJSON = function () { + return '{' + tfJSON(et) + '}' + }), + rt + ) + }, + object: function (et) { + var nt = {} + for (var rt in et) nt[rt] = compile(et[rt]) + function it(ot, at) { + if (!NATIVE.Object(ot) || NATIVE.Nil(ot)) return !1 + var st + try { + for (st in nt) { + var lt = nt[st], + ct = ot[st] + typeforce$4(lt, ct, at) + } + } catch (ut) { + throw tfSubError(ut, st) + } + if (at) { + for (st in ot) if (!nt[st]) throw new TfPropertyTypeError(void 0, st) + } + return !0 + } + return ( + (it.toJSON = function () { + return tfJSON(nt) + }), + it + ) + }, + anyOf: function () { + var et = [].slice.call(arguments).map(compile) + function nt(rt, it) { + return et.some(function (ot) { + try { + return typeforce$4(ot, rt, it) + } catch { + return !1 + } + }) + } + return ( + (nt.toJSON = function () { + return et.map(tfJSON).join('|') + }), + nt + ) + }, + allOf: function () { + var et = [].slice.call(arguments).map(compile) + function nt(rt, it) { + return et.every(function (ot) { + try { + return typeforce$4(ot, rt, it) + } catch { + return !1 + } + }) + } + return ( + (nt.toJSON = function () { + return et.map(tfJSON).join(' & ') + }), + nt + ) + }, + quacksLike: function (et) { + function nt(rt) { + return et === getValueTypeName(rt) + } + return ( + (nt.toJSON = function () { + return et + }), + nt + ) + }, + tuple: function () { + var et = [].slice.call(arguments).map(compile) + function nt(rt, it) { + return NATIVE.Nil(rt) || NATIVE.Nil(rt.length) || (it && rt.length !== et.length) + ? !1 + : et.every(function (ot, at) { + try { + return typeforce$4(ot, rt[at], it) + } catch (st) { + throw tfSubError(st, at) + } + }) + } + return ( + (nt.toJSON = function () { + return '(' + et.map(tfJSON).join(', ') + ')' + }), + nt + ) + }, + value: function (et) { + function nt(rt) { + return rt === et + } + return ( + (nt.toJSON = function () { + return et + }), + nt + ) + }, + } + TYPES.oneOf = TYPES.anyOf + function compile(tt) { + if (NATIVE.String(tt)) return tt[0] === '?' ? TYPES.maybe(tt.slice(1)) : NATIVE[tt] || TYPES.quacksLike(tt) + if (tt && NATIVE.Object(tt)) { + if (NATIVE.Array(tt)) { + if (tt.length !== 1) throw new TypeError('Expected compile() parameter of type Array of length 1') + return TYPES.arrayOf(tt[0]) + } + return TYPES.object(tt) + } else if (NATIVE.Function(tt)) return tt + return TYPES.value(tt) + } + function typeforce$4(tt, et, nt, rt) { + if (NATIVE.Function(tt)) { + if (tt(et, nt)) return !0 + throw new TfTypeError(rt || tt, et) + } + return typeforce$4(compile(tt), et, nt) + } + for (var typeName in NATIVE) typeforce$4[typeName] = NATIVE[typeName] + for (typeName in TYPES) typeforce$4[typeName] = TYPES[typeName] + var EXTRA = requireExtra() + for (typeName in EXTRA) typeforce$4[typeName] = EXTRA[typeName] + typeforce$4.compile = compile + typeforce$4.TfTypeError = TfTypeError + typeforce$4.TfPropertyTypeError = TfPropertyTypeError + var typeforce_1 = typeforce$4 + ;(function (tt) { + Object.defineProperty(tt, '__esModule', { value: !0 }), + (tt.oneOf = + tt.Null = + tt.BufferN = + tt.Function = + tt.UInt32 = + tt.UInt8 = + tt.tuple = + tt.maybe = + tt.Hex = + tt.Buffer = + tt.String = + tt.Boolean = + tt.Array = + tt.Number = + tt.Hash256bit = + tt.Hash160bit = + tt.Buffer256bit = + tt.isTaptree = + tt.isTapleaf = + tt.TAPLEAF_VERSION_MASK = + tt.Network = + tt.ECPoint = + tt.Satoshi = + tt.Signer = + tt.BIP32Path = + tt.UInt31 = + tt.isPoint = + tt.typeforce = + void 0) + const et = buffer$2 + tt.typeforce = typeforce_1 + const nt = et.Buffer.alloc(32, 0), + rt = et.Buffer.from('fffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f', 'hex') + function it(pt) { + if (!et.Buffer.isBuffer(pt) || pt.length < 33) return !1 + const mt = pt[0], + gt = pt.slice(1, 33) + if (gt.compare(nt) === 0 || gt.compare(rt) >= 0) return !1 + if ((mt === 2 || mt === 3) && pt.length === 33) return !0 + const yt = pt.slice(33) + return yt.compare(nt) === 0 || yt.compare(rt) >= 0 ? !1 : mt === 4 && pt.length === 65 + } + tt.isPoint = it + const ot = Math.pow(2, 31) - 1 + function at(pt) { + return tt.typeforce.UInt32(pt) && pt <= ot + } + tt.UInt31 = at + function st(pt) { + return tt.typeforce.String(pt) && !!pt.match(/^(m\/)?(\d+'?\/)*\d+'?$/) + } + ;(tt.BIP32Path = st), (st.toJSON = () => 'BIP32 derivation path') + function lt(pt) { + return (tt.typeforce.Buffer(pt.publicKey) || typeof pt.getPublicKey == 'function') && typeof pt.sign == 'function' + } + tt.Signer = lt + const ct = 21 * 1e14 + function ut(pt) { + return tt.typeforce.UInt53(pt) && pt <= ct + } + ;(tt.Satoshi = ut), + (tt.ECPoint = tt.typeforce.quacksLike('Point')), + (tt.Network = tt.typeforce.compile({ + messagePrefix: tt.typeforce.oneOf(tt.typeforce.Buffer, tt.typeforce.String), + bip32: { public: tt.typeforce.UInt32, private: tt.typeforce.UInt32 }, + pubKeyHash: tt.typeforce.UInt8, + scriptHash: tt.typeforce.UInt8, + wif: tt.typeforce.UInt8, + })), + (tt.TAPLEAF_VERSION_MASK = 254) + function ht(pt) { + return !pt || !('output' in pt) || !et.Buffer.isBuffer(pt.output) + ? !1 + : pt.version !== void 0 + ? (pt.version & tt.TAPLEAF_VERSION_MASK) === pt.version + : !0 + } + tt.isTapleaf = ht + function dt(pt) { + return (0, tt.Array)(pt) ? (pt.length !== 2 ? !1 : pt.every((mt) => dt(mt))) : ht(pt) + } + ;(tt.isTaptree = dt), + (tt.Buffer256bit = tt.typeforce.BufferN(32)), + (tt.Hash160bit = tt.typeforce.BufferN(20)), + (tt.Hash256bit = tt.typeforce.BufferN(32)), + (tt.Number = tt.typeforce.Number), + (tt.Array = tt.typeforce.Array), + (tt.Boolean = tt.typeforce.Boolean), + (tt.String = tt.typeforce.String), + (tt.Buffer = tt.typeforce.Buffer), + (tt.Hex = tt.typeforce.Hex), + (tt.maybe = tt.typeforce.maybe), + (tt.tuple = tt.typeforce.tuple), + (tt.UInt8 = tt.typeforce.UInt8), + (tt.UInt32 = tt.typeforce.UInt32), + (tt.Function = tt.typeforce.Function), + (tt.BufferN = tt.typeforce.BufferN), + (tt.Null = tt.typeforce.Null), + (tt.oneOf = tt.typeforce.oneOf) + })(types$6) + Object.defineProperty(script_signature, '__esModule', { value: !0 }) + script_signature.encode = script_signature.decode = void 0 + const bip66 = bip66$1, + types$4 = types$6, + { typeforce: typeforce$3 } = types$4, + ZERO$1 = Buffer.alloc(1, 0) + function toDER(tt) { + let et = 0 + for (; tt[et] === 0; ) ++et + return et === tt.length + ? ZERO$1 + : ((tt = tt.slice(et)), tt[0] & 128 ? Buffer.concat([ZERO$1, tt], 1 + tt.length) : tt) + } + function fromDER(tt) { + tt[0] === 0 && (tt = tt.slice(1)) + const et = Buffer.alloc(32, 0), + nt = Math.max(0, 32 - tt.length) + return tt.copy(et, nt), et + } + function decode$j(tt) { + const et = tt.readUInt8(tt.length - 1), + nt = et & -129 + if (nt <= 0 || nt >= 4) throw new Error('Invalid hashType ' + et) + const rt = bip66.decode(tt.slice(0, -1)), + it = fromDER(rt.r), + ot = fromDER(rt.s) + return { signature: Buffer.concat([it, ot], 64), hashType: et } + } + script_signature.decode = decode$j + function encode$k(tt, et) { + typeforce$3({ signature: types$4.BufferN(64), hashType: types$4.UInt8 }, { signature: tt, hashType: et }) + const nt = et & -129 + if (nt <= 0 || nt >= 4) throw new Error('Invalid hashType ' + et) + const rt = Buffer.allocUnsafe(1) + rt.writeUInt8(et, 0) + const it = toDER(tt.slice(0, 32)), + ot = toDER(tt.slice(32, 64)) + return Buffer.concat([bip66.encode(it, ot), rt]) + } + script_signature.encode = encode$k + ;(function (tt) { + Object.defineProperty(tt, '__esModule', { value: !0 }), + (tt.signature = + tt.number = + tt.isCanonicalScriptSignature = + tt.isDefinedHashType = + tt.isCanonicalPubKey = + tt.toStack = + tt.fromASM = + tt.toASM = + tt.decompile = + tt.compile = + tt.countNonPushOnlyOPs = + tt.isPushOnly = + tt.OPS = + void 0) + const et = bip66$1, + nt = ops + Object.defineProperty(tt, 'OPS', { + enumerable: !0, + get: function () { + return nt.OPS + }, + }) + const rt = push_data, + it = script_number, + ot = script_signature, + at = types$6, + { typeforce: st } = at, + lt = nt.OPS.OP_RESERVED + function ct($t) { + return ( + at.Number($t) && ($t === nt.OPS.OP_0 || ($t >= nt.OPS.OP_1 && $t <= nt.OPS.OP_16) || $t === nt.OPS.OP_1NEGATE) + ) + } + function ut($t) { + return at.Buffer($t) || ct($t) + } + function ht($t) { + return at.Array($t) && $t.every(ut) + } + tt.isPushOnly = ht + function dt($t) { + return $t.length - $t.filter(ut).length + } + tt.countNonPushOnlyOPs = dt + function pt($t) { + if ($t.length === 0) return nt.OPS.OP_0 + if ($t.length === 1) { + if ($t[0] >= 1 && $t[0] <= 16) return lt + $t[0] + if ($t[0] === 129) return nt.OPS.OP_1NEGATE + } + } + function mt($t) { + return Buffer.isBuffer($t) + } + function gt($t) { + return at.Array($t) + } + function yt($t) { + return Buffer.isBuffer($t) + } + function bt($t) { + if (mt($t)) return $t + st(at.Array, $t) + const Dt = $t.reduce( + (Ct, wt) => + yt(wt) + ? wt.length === 1 && pt(wt) !== void 0 + ? Ct + 1 + : Ct + rt.encodingLength(wt.length) + wt.length + : Ct + 1, + 0, + ), + jt = Buffer.allocUnsafe(Dt) + let Pt = 0 + if ( + ($t.forEach((Ct) => { + if (yt(Ct)) { + const wt = pt(Ct) + if (wt !== void 0) { + jt.writeUInt8(wt, Pt), (Pt += 1) + return + } + ;(Pt += rt.encode(jt, Ct.length, Pt)), Ct.copy(jt, Pt), (Pt += Ct.length) + } else jt.writeUInt8(Ct, Pt), (Pt += 1) + }), + Pt !== jt.length) + ) + throw new Error('Could not decode chunks') + return jt + } + tt.compile = bt + function vt($t) { + if (gt($t)) return $t + st(at.Buffer, $t) + const Dt = [] + let jt = 0 + for (; jt < $t.length; ) { + const Pt = $t[jt] + if (Pt > nt.OPS.OP_0 && Pt <= nt.OPS.OP_PUSHDATA4) { + const Ct = rt.decode($t, jt) + if (Ct === null || ((jt += Ct.size), jt + Ct.number > $t.length)) return null + const wt = $t.slice(jt, jt + Ct.number) + jt += Ct.number + const It = pt(wt) + It !== void 0 ? Dt.push(It) : Dt.push(wt) + } else Dt.push(Pt), (jt += 1) + } + return Dt + } + tt.decompile = vt + function xt($t) { + return ( + mt($t) && ($t = vt($t)), + $t + .map((Dt) => { + if (yt(Dt)) { + const jt = pt(Dt) + if (jt === void 0) return Dt.toString('hex') + Dt = jt + } + return nt.REVERSE_OPS[Dt] + }) + .join(' ') + ) + } + tt.toASM = xt + function kt($t) { + return ( + st(at.String, $t), + bt($t.split(' ').map((Dt) => (nt.OPS[Dt] !== void 0 ? nt.OPS[Dt] : (st(at.Hex, Dt), Buffer.from(Dt, 'hex'))))) + ) + } + tt.fromASM = kt + function St($t) { + return ( + ($t = vt($t)), + st(ht, $t), + $t.map((Dt) => (yt(Dt) ? Dt : Dt === nt.OPS.OP_0 ? Buffer.allocUnsafe(0) : it.encode(Dt - lt))) + ) + } + tt.toStack = St + function Tt($t) { + return at.isPoint($t) + } + tt.isCanonicalPubKey = Tt + function At($t) { + const Dt = $t & -129 + return Dt > 0 && Dt < 4 + } + tt.isDefinedHashType = At + function Et($t) { + return !Buffer.isBuffer($t) || !At($t[$t.length - 1]) ? !1 : et.check($t.slice(0, -1)) + } + ;(tt.isCanonicalScriptSignature = Et), (tt.number = it), (tt.signature = ot) + })(script) + var lazy$9 = {} + Object.defineProperty(lazy$9, '__esModule', { value: !0 }) + lazy$9.value = lazy$9.prop = void 0 + function prop(tt, et, nt) { + Object.defineProperty(tt, et, { + configurable: !0, + enumerable: !0, + get() { + const rt = nt.call(this) + return (this[et] = rt), rt + }, + set(rt) { + Object.defineProperty(this, et, { configurable: !0, enumerable: !0, value: rt, writable: !0 }) + }, + }) + } + lazy$9.prop = prop + function value$1(tt) { + let et + return () => (et !== void 0 || (et = tt()), et) + } + lazy$9.value = value$1 + Object.defineProperty(embed, '__esModule', { value: !0 }) + embed.p2data = void 0 + const networks_1$8 = networks$1, + bscript$b = script, + types_1$9 = types$6, + lazy$8 = lazy$9, + OPS$7 = bscript$b.OPS + function stacksEqual$4(tt, et) { + return tt.length !== et.length ? !1 : tt.every((nt, rt) => nt.equals(et[rt])) + } + function p2data(tt, et) { + if (!tt.data && !tt.output) throw new TypeError('Not enough data') + ;(et = Object.assign({ validate: !0 }, et || {})), + (0, types_1$9.typeforce)( + { + network: types_1$9.typeforce.maybe(types_1$9.typeforce.Object), + output: types_1$9.typeforce.maybe(types_1$9.typeforce.Buffer), + data: types_1$9.typeforce.maybe(types_1$9.typeforce.arrayOf(types_1$9.typeforce.Buffer)), + }, + tt, + ) + const rt = { name: 'embed', network: tt.network || networks_1$8.bitcoin } + if ( + (lazy$8.prop(rt, 'output', () => { + if (tt.data) return bscript$b.compile([OPS$7.OP_RETURN].concat(tt.data)) + }), + lazy$8.prop(rt, 'data', () => { + if (tt.output) return bscript$b.decompile(tt.output).slice(1) + }), + et.validate && tt.output) + ) { + const it = bscript$b.decompile(tt.output) + if (it[0] !== OPS$7.OP_RETURN) throw new TypeError('Output is invalid') + if (!it.slice(1).every(types_1$9.typeforce.Buffer)) throw new TypeError('Output is invalid') + if (tt.data && !stacksEqual$4(tt.data, rt.data)) throw new TypeError('Data mismatch') + } + return Object.assign(rt, tt) + } + embed.p2data = p2data + var p2ms$1 = {} + Object.defineProperty(p2ms$1, '__esModule', { value: !0 }) + p2ms$1.p2ms = void 0 + const networks_1$7 = networks$1, + bscript$a = script, + types_1$8 = types$6, + lazy$7 = lazy$9, + OPS$6 = bscript$a.OPS, + OP_INT_BASE = OPS$6.OP_RESERVED + function stacksEqual$3(tt, et) { + return tt.length !== et.length ? !1 : tt.every((nt, rt) => nt.equals(et[rt])) + } + function p2ms(tt, et) { + if (!tt.input && !tt.output && !(tt.pubkeys && tt.m !== void 0) && !tt.signatures) + throw new TypeError('Not enough data') + et = Object.assign({ validate: !0 }, et || {}) + function nt(lt) { + return bscript$a.isCanonicalScriptSignature(lt) || (et.allowIncomplete && lt === OPS$6.OP_0) !== void 0 + } + ;(0, types_1$8.typeforce)( + { + network: types_1$8.typeforce.maybe(types_1$8.typeforce.Object), + m: types_1$8.typeforce.maybe(types_1$8.typeforce.Number), + n: types_1$8.typeforce.maybe(types_1$8.typeforce.Number), + output: types_1$8.typeforce.maybe(types_1$8.typeforce.Buffer), + pubkeys: types_1$8.typeforce.maybe(types_1$8.typeforce.arrayOf(types_1$8.isPoint)), + signatures: types_1$8.typeforce.maybe(types_1$8.typeforce.arrayOf(nt)), + input: types_1$8.typeforce.maybe(types_1$8.typeforce.Buffer), + }, + tt, + ) + const it = { network: tt.network || networks_1$7.bitcoin } + let ot = [], + at = !1 + function st(lt) { + at || + ((at = !0), + (ot = bscript$a.decompile(lt)), + (it.m = ot[0] - OP_INT_BASE), + (it.n = ot[ot.length - 2] - OP_INT_BASE), + (it.pubkeys = ot.slice(1, -2))) + } + if ( + (lazy$7.prop(it, 'output', () => { + if (tt.m && it.n && tt.pubkeys) + return bscript$a.compile( + [].concat(OP_INT_BASE + tt.m, tt.pubkeys, OP_INT_BASE + it.n, OPS$6.OP_CHECKMULTISIG), + ) + }), + lazy$7.prop(it, 'm', () => { + if (it.output) return st(it.output), it.m + }), + lazy$7.prop(it, 'n', () => { + if (it.pubkeys) return it.pubkeys.length + }), + lazy$7.prop(it, 'pubkeys', () => { + if (tt.output) return st(tt.output), it.pubkeys + }), + lazy$7.prop(it, 'signatures', () => { + if (tt.input) return bscript$a.decompile(tt.input).slice(1) + }), + lazy$7.prop(it, 'input', () => { + if (tt.signatures) return bscript$a.compile([OPS$6.OP_0].concat(tt.signatures)) + }), + lazy$7.prop(it, 'witness', () => { + if (it.input) return [] + }), + lazy$7.prop(it, 'name', () => { + if (!(!it.m || !it.n)) return `p2ms(${it.m} of ${it.n})` + }), + et.validate) + ) { + if (tt.output) { + if ((st(tt.output), !types_1$8.typeforce.Number(ot[0]))) throw new TypeError('Output is invalid') + if (!types_1$8.typeforce.Number(ot[ot.length - 2])) throw new TypeError('Output is invalid') + if (ot[ot.length - 1] !== OPS$6.OP_CHECKMULTISIG) throw new TypeError('Output is invalid') + if (it.m <= 0 || it.n > 16 || it.m > it.n || it.n !== ot.length - 3) throw new TypeError('Output is invalid') + if (!it.pubkeys.every((lt) => (0, types_1$8.isPoint)(lt))) throw new TypeError('Output is invalid') + if (tt.m !== void 0 && tt.m !== it.m) throw new TypeError('m mismatch') + if (tt.n !== void 0 && tt.n !== it.n) throw new TypeError('n mismatch') + if (tt.pubkeys && !stacksEqual$3(tt.pubkeys, it.pubkeys)) throw new TypeError('Pubkeys mismatch') + } + if (tt.pubkeys) { + if (tt.n !== void 0 && tt.n !== tt.pubkeys.length) throw new TypeError('Pubkey count mismatch') + if (((it.n = tt.pubkeys.length), it.n < it.m)) throw new TypeError('Pubkey count cannot be less than m') + } + if (tt.signatures) { + if (tt.signatures.length < it.m) throw new TypeError('Not enough signatures provided') + if (tt.signatures.length > it.m) throw new TypeError('Too many signatures provided') + } + if (tt.input) { + if (tt.input[0] !== OPS$6.OP_0) throw new TypeError('Input is invalid') + if (it.signatures.length === 0 || !it.signatures.every(nt)) + throw new TypeError('Input has invalid signature(s)') + if (tt.signatures && !stacksEqual$3(tt.signatures, it.signatures)) throw new TypeError('Signature mismatch') + if (tt.m !== void 0 && tt.m !== tt.signatures.length) throw new TypeError('Signature count mismatch') + } + } + return Object.assign(it, tt) + } + p2ms$1.p2ms = p2ms + var p2pk$1 = {} + Object.defineProperty(p2pk$1, '__esModule', { value: !0 }) + p2pk$1.p2pk = void 0 + const networks_1$6 = networks$1, + bscript$9 = script, + types_1$7 = types$6, + lazy$6 = lazy$9, + OPS$5 = bscript$9.OPS + function p2pk(tt, et) { + if (!tt.input && !tt.output && !tt.pubkey && !tt.input && !tt.signature) throw new TypeError('Not enough data') + ;(et = Object.assign({ validate: !0 }, et || {})), + (0, types_1$7.typeforce)( + { + network: types_1$7.typeforce.maybe(types_1$7.typeforce.Object), + output: types_1$7.typeforce.maybe(types_1$7.typeforce.Buffer), + pubkey: types_1$7.typeforce.maybe(types_1$7.isPoint), + signature: types_1$7.typeforce.maybe(bscript$9.isCanonicalScriptSignature), + input: types_1$7.typeforce.maybe(types_1$7.typeforce.Buffer), + }, + tt, + ) + const nt = lazy$6.value(() => bscript$9.decompile(tt.input)), + it = { name: 'p2pk', network: tt.network || networks_1$6.bitcoin } + if ( + (lazy$6.prop(it, 'output', () => { + if (tt.pubkey) return bscript$9.compile([tt.pubkey, OPS$5.OP_CHECKSIG]) + }), + lazy$6.prop(it, 'pubkey', () => { + if (tt.output) return tt.output.slice(1, -1) + }), + lazy$6.prop(it, 'signature', () => { + if (tt.input) return nt()[0] + }), + lazy$6.prop(it, 'input', () => { + if (tt.signature) return bscript$9.compile([tt.signature]) + }), + lazy$6.prop(it, 'witness', () => { + if (it.input) return [] + }), + et.validate) + ) { + if (tt.output) { + if (tt.output[tt.output.length - 1] !== OPS$5.OP_CHECKSIG) throw new TypeError('Output is invalid') + if (!(0, types_1$7.isPoint)(it.pubkey)) throw new TypeError('Output pubkey is invalid') + if (tt.pubkey && !tt.pubkey.equals(it.pubkey)) throw new TypeError('Pubkey mismatch') + } + if (tt.signature && tt.input && !tt.input.equals(it.input)) throw new TypeError('Signature mismatch') + if (tt.input) { + if (nt().length !== 1) throw new TypeError('Input is invalid') + if (!bscript$9.isCanonicalScriptSignature(it.signature)) throw new TypeError('Input has invalid signature') + } + } + return Object.assign(it, tt) + } + p2pk$1.p2pk = p2pk + var p2pkh$1 = {}, + crypto$2 = {}, + ripemd160 = {}, + _sha2 = {}, + _assert = {} + Object.defineProperty(_assert, '__esModule', { value: !0 }) + _assert.output = _assert.exists = _assert.hash = _assert.bytes = _assert.bool = _assert.number = void 0 + function number$4(tt) { + if (!Number.isSafeInteger(tt) || tt < 0) throw new Error(`Wrong positive integer: ${tt}`) + } + _assert.number = number$4 + function bool$1(tt) { + if (typeof tt != 'boolean') throw new Error(`Expected boolean, not ${tt}`) + } + _assert.bool = bool$1 + function bytes(tt, ...et) { + if (!(tt instanceof Uint8Array)) throw new Error('Expected Uint8Array') + if (et.length > 0 && !et.includes(tt.length)) + throw new Error(`Expected Uint8Array of length ${et}, not of length=${tt.length}`) + } + _assert.bytes = bytes + function hash(tt) { + if (typeof tt != 'function' || typeof tt.create != 'function') + throw new Error('Hash should be wrapped by utils.wrapConstructor') + number$4(tt.outputLen), number$4(tt.blockLen) + } + _assert.hash = hash + function exists(tt, et = !0) { + if (tt.destroyed) throw new Error('Hash instance has been destroyed') + if (et && tt.finished) throw new Error('Hash#digest() has already been called') + } + _assert.exists = exists + function output(tt, et) { + bytes(tt) + const nt = et.outputLen + if (tt.length < nt) throw new Error(`digestInto() expects output buffer of length at least ${nt}`) + } + _assert.output = output + const assert$2 = { number: number$4, bool: bool$1, bytes, hash, exists, output } + _assert.default = assert$2 + var utils$2 = {}, + crypto$1 = {} + Object.defineProperty(crypto$1, '__esModule', { value: !0 }) + crypto$1.crypto = void 0 + crypto$1.crypto = typeof globalThis == 'object' && 'crypto' in globalThis ? globalThis.crypto : void 0 + ;(function (tt) { + /*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */ Object.defineProperty(tt, '__esModule', { + value: !0, + }), + (tt.randomBytes = + tt.wrapXOFConstructorWithOpts = + tt.wrapConstructorWithOpts = + tt.wrapConstructor = + tt.checkOpts = + tt.Hash = + tt.concatBytes = + tt.toBytes = + tt.utf8ToBytes = + tt.asyncLoop = + tt.nextTick = + tt.hexToBytes = + tt.bytesToHex = + tt.isLE = + tt.rotr = + tt.createView = + tt.u32 = + tt.u8 = + void 0) + const et = crypto$1, + nt = (Tt) => Tt instanceof Uint8Array, + rt = (Tt) => new Uint8Array(Tt.buffer, Tt.byteOffset, Tt.byteLength) + tt.u8 = rt + const it = (Tt) => new Uint32Array(Tt.buffer, Tt.byteOffset, Math.floor(Tt.byteLength / 4)) + tt.u32 = it + const ot = (Tt) => new DataView(Tt.buffer, Tt.byteOffset, Tt.byteLength) + tt.createView = ot + const at = (Tt, At) => (Tt << (32 - At)) | (Tt >>> At) + if (((tt.rotr = at), (tt.isLE = new Uint8Array(new Uint32Array([287454020]).buffer)[0] === 68), !tt.isLE)) + throw new Error('Non little-endian hardware is not supported') + const st = Array.from({ length: 256 }, (Tt, At) => At.toString(16).padStart(2, '0')) + function lt(Tt) { + if (!nt(Tt)) throw new Error('Uint8Array expected') + let At = '' + for (let Et = 0; Et < Tt.length; Et++) At += st[Tt[Et]] + return At + } + tt.bytesToHex = lt + function ct(Tt) { + if (typeof Tt != 'string') throw new Error('hex string expected, got ' + typeof Tt) + const At = Tt.length + if (At % 2) throw new Error('padded hex string expected, got unpadded hex of length ' + At) + const Et = new Uint8Array(At / 2) + for (let $t = 0; $t < Et.length; $t++) { + const Dt = $t * 2, + jt = Tt.slice(Dt, Dt + 2), + Pt = Number.parseInt(jt, 16) + if (Number.isNaN(Pt) || Pt < 0) throw new Error('Invalid byte sequence') + Et[$t] = Pt + } + return Et + } + tt.hexToBytes = ct + const ut = async () => {} + tt.nextTick = ut + async function ht(Tt, At, Et) { + let $t = Date.now() + for (let Dt = 0; Dt < Tt; Dt++) { + Et(Dt) + const jt = Date.now() - $t + ;(jt >= 0 && jt < At) || (await (0, tt.nextTick)(), ($t += jt)) + } + } + tt.asyncLoop = ht + function dt(Tt) { + if (typeof Tt != 'string') throw new Error(`utf8ToBytes expected string, got ${typeof Tt}`) + return new Uint8Array(new TextEncoder().encode(Tt)) + } + tt.utf8ToBytes = dt + function pt(Tt) { + if ((typeof Tt == 'string' && (Tt = dt(Tt)), !nt(Tt))) throw new Error(`expected Uint8Array, got ${typeof Tt}`) + return Tt + } + tt.toBytes = pt + function mt(...Tt) { + const At = new Uint8Array(Tt.reduce(($t, Dt) => $t + Dt.length, 0)) + let Et = 0 + return ( + Tt.forEach(($t) => { + if (!nt($t)) throw new Error('Uint8Array expected') + At.set($t, Et), (Et += $t.length) + }), + At + ) + } + tt.concatBytes = mt + class gt { + clone() { + return this._cloneInto() + } + } + tt.Hash = gt + const yt = {}.toString + function bt(Tt, At) { + if (At !== void 0 && yt.call(At) !== '[object Object]') throw new Error('Options should be object or undefined') + return Object.assign(Tt, At) + } + tt.checkOpts = bt + function vt(Tt) { + const At = ($t) => Tt().update(pt($t)).digest(), + Et = Tt() + return (At.outputLen = Et.outputLen), (At.blockLen = Et.blockLen), (At.create = () => Tt()), At + } + tt.wrapConstructor = vt + function xt(Tt) { + const At = ($t, Dt) => Tt(Dt).update(pt($t)).digest(), + Et = Tt({}) + return (At.outputLen = Et.outputLen), (At.blockLen = Et.blockLen), (At.create = ($t) => Tt($t)), At + } + tt.wrapConstructorWithOpts = xt + function kt(Tt) { + const At = ($t, Dt) => Tt(Dt).update(pt($t)).digest(), + Et = Tt({}) + return (At.outputLen = Et.outputLen), (At.blockLen = Et.blockLen), (At.create = ($t) => Tt($t)), At + } + tt.wrapXOFConstructorWithOpts = kt + function St(Tt = 32) { + if (et.crypto && typeof et.crypto.getRandomValues == 'function') + return et.crypto.getRandomValues(new Uint8Array(Tt)) + throw new Error('crypto.getRandomValues must be defined') + } + tt.randomBytes = St + })(utils$2) + Object.defineProperty(_sha2, '__esModule', { value: !0 }) + _sha2.SHA2 = void 0 + const _assert_js_1 = _assert, + utils_js_1$3 = utils$2 + function setBigUint64(tt, et, nt, rt) { + if (typeof tt.setBigUint64 == 'function') return tt.setBigUint64(et, nt, rt) + const it = BigInt(32), + ot = BigInt(4294967295), + at = Number((nt >> it) & ot), + st = Number(nt & ot), + lt = rt ? 4 : 0, + ct = rt ? 0 : 4 + tt.setUint32(et + lt, at, rt), tt.setUint32(et + ct, st, rt) + } + class SHA2 extends utils_js_1$3.Hash { + constructor(et, nt, rt, it) { + super(), + (this.blockLen = et), + (this.outputLen = nt), + (this.padOffset = rt), + (this.isLE = it), + (this.finished = !1), + (this.length = 0), + (this.pos = 0), + (this.destroyed = !1), + (this.buffer = new Uint8Array(et)), + (this.view = (0, utils_js_1$3.createView)(this.buffer)) + } + update(et) { + ;(0, _assert_js_1.exists)(this) + const { view: nt, buffer: rt, blockLen: it } = this + et = (0, utils_js_1$3.toBytes)(et) + const ot = et.length + for (let at = 0; at < ot; ) { + const st = Math.min(it - this.pos, ot - at) + if (st === it) { + const lt = (0, utils_js_1$3.createView)(et) + for (; it <= ot - at; at += it) this.process(lt, at) + continue + } + rt.set(et.subarray(at, at + st), this.pos), + (this.pos += st), + (at += st), + this.pos === it && (this.process(nt, 0), (this.pos = 0)) + } + return (this.length += et.length), this.roundClean(), this + } + digestInto(et) { + ;(0, _assert_js_1.exists)(this), (0, _assert_js_1.output)(et, this), (this.finished = !0) + const { buffer: nt, view: rt, blockLen: it, isLE: ot } = this + let { pos: at } = this + ;(nt[at++] = 128), this.buffer.subarray(at).fill(0), this.padOffset > it - at && (this.process(rt, 0), (at = 0)) + for (let ht = at; ht < it; ht++) nt[ht] = 0 + setBigUint64(rt, it - 8, BigInt(this.length * 8), ot), this.process(rt, 0) + const st = (0, utils_js_1$3.createView)(et), + lt = this.outputLen + if (lt % 4) throw new Error('_sha2: outputLen should be aligned to 32bit') + const ct = lt / 4, + ut = this.get() + if (ct > ut.length) throw new Error('_sha2: outputLen bigger than state') + for (let ht = 0; ht < ct; ht++) st.setUint32(4 * ht, ut[ht], ot) + } + digest() { + const { buffer: et, outputLen: nt } = this + this.digestInto(et) + const rt = et.slice(0, nt) + return this.destroy(), rt + } + _cloneInto(et) { + et || (et = new this.constructor()), et.set(...this.get()) + const { blockLen: nt, buffer: rt, length: it, finished: ot, destroyed: at, pos: st } = this + return (et.length = it), (et.pos = st), (et.finished = ot), (et.destroyed = at), it % nt && et.buffer.set(rt), et + } + } + _sha2.SHA2 = SHA2 + Object.defineProperty(ripemd160, '__esModule', { value: !0 }) + ripemd160.ripemd160 = ripemd160.RIPEMD160 = void 0 + const _sha2_js_1$2 = _sha2, + utils_js_1$2 = utils$2, + Rho = new Uint8Array([7, 4, 13, 1, 10, 6, 15, 3, 12, 0, 9, 5, 2, 14, 11, 8]), + Id = Uint8Array.from({ length: 16 }, (tt, et) => et), + Pi = Id.map((tt) => (9 * tt + 5) % 16) + let idxL = [Id], + idxR = [Pi] + for (let tt = 0; tt < 4; tt++) for (let et of [idxL, idxR]) et.push(et[tt].map((nt) => Rho[nt])) + const shifts = [ + [11, 14, 15, 12, 5, 8, 7, 9, 11, 13, 14, 15, 6, 7, 9, 8], + [12, 13, 11, 15, 6, 9, 9, 7, 12, 15, 11, 13, 7, 8, 7, 7], + [13, 15, 14, 11, 7, 7, 6, 8, 13, 14, 13, 12, 5, 5, 6, 9], + [14, 11, 12, 14, 8, 6, 5, 5, 15, 12, 15, 14, 9, 9, 8, 6], + [15, 12, 13, 13, 9, 5, 8, 6, 14, 11, 12, 11, 8, 6, 5, 5], + ].map((tt) => new Uint8Array(tt)), + shiftsL = idxL.map((tt, et) => tt.map((nt) => shifts[et][nt])), + shiftsR = idxR.map((tt, et) => tt.map((nt) => shifts[et][nt])), + Kl = new Uint32Array([0, 1518500249, 1859775393, 2400959708, 2840853838]), + Kr = new Uint32Array([1352829926, 1548603684, 1836072691, 2053994217, 0]), + rotl$1 = (tt, et) => (tt << et) | (tt >>> (32 - et)) + function f$2(tt, et, nt, rt) { + return tt === 0 + ? et ^ nt ^ rt + : tt === 1 + ? (et & nt) | (~et & rt) + : tt === 2 + ? (et | ~nt) ^ rt + : tt === 3 + ? (et & rt) | (nt & ~rt) + : et ^ (nt | ~rt) + } + const BUF = new Uint32Array(16) + class RIPEMD160 extends _sha2_js_1$2.SHA2 { + constructor() { + super(64, 20, 8, !0), + (this.h0 = 1732584193), + (this.h1 = -271733879), + (this.h2 = -1732584194), + (this.h3 = 271733878), + (this.h4 = -1009589776) + } + get() { + const { h0: et, h1: nt, h2: rt, h3: it, h4: ot } = this + return [et, nt, rt, it, ot] + } + set(et, nt, rt, it, ot) { + ;(this.h0 = et | 0), (this.h1 = nt | 0), (this.h2 = rt | 0), (this.h3 = it | 0), (this.h4 = ot | 0) + } + process(et, nt) { + for (let pt = 0; pt < 16; pt++, nt += 4) BUF[pt] = et.getUint32(nt, !0) + let rt = this.h0 | 0, + it = rt, + ot = this.h1 | 0, + at = ot, + st = this.h2 | 0, + lt = st, + ct = this.h3 | 0, + ut = ct, + ht = this.h4 | 0, + dt = ht + for (let pt = 0; pt < 5; pt++) { + const mt = 4 - pt, + gt = Kl[pt], + yt = Kr[pt], + bt = idxL[pt], + vt = idxR[pt], + xt = shiftsL[pt], + kt = shiftsR[pt] + for (let St = 0; St < 16; St++) { + const Tt = (rotl$1(rt + f$2(pt, ot, st, ct) + BUF[bt[St]] + gt, xt[St]) + ht) | 0 + ;(rt = ht), (ht = ct), (ct = rotl$1(st, 10) | 0), (st = ot), (ot = Tt) + } + for (let St = 0; St < 16; St++) { + const Tt = (rotl$1(it + f$2(mt, at, lt, ut) + BUF[vt[St]] + yt, kt[St]) + dt) | 0 + ;(it = dt), (dt = ut), (ut = rotl$1(lt, 10) | 0), (lt = at), (at = Tt) + } + } + this.set( + (this.h1 + st + ut) | 0, + (this.h2 + ct + dt) | 0, + (this.h3 + ht + it) | 0, + (this.h4 + rt + at) | 0, + (this.h0 + ot + lt) | 0, + ) + } + roundClean() { + BUF.fill(0) + } + destroy() { + ;(this.destroyed = !0), this.buffer.fill(0), this.set(0, 0, 0, 0, 0) + } + } + ripemd160.RIPEMD160 = RIPEMD160 + ripemd160.ripemd160 = (0, utils_js_1$2.wrapConstructor)(() => new RIPEMD160()) + var sha1 = {} + Object.defineProperty(sha1, '__esModule', { value: !0 }) + sha1.sha1 = void 0 + const _sha2_js_1$1 = _sha2, + utils_js_1$1 = utils$2, + rotl = (tt, et) => (tt << et) | ((tt >>> (32 - et)) >>> 0), + Chi$1 = (tt, et, nt) => (tt & et) ^ (~tt & nt), + Maj$1 = (tt, et, nt) => (tt & et) ^ (tt & nt) ^ (et & nt), + IV$1 = new Uint32Array([1732584193, 4023233417, 2562383102, 271733878, 3285377520]), + SHA1_W = new Uint32Array(80) + class SHA1 extends _sha2_js_1$1.SHA2 { + constructor() { + super(64, 20, 8, !1), + (this.A = IV$1[0] | 0), + (this.B = IV$1[1] | 0), + (this.C = IV$1[2] | 0), + (this.D = IV$1[3] | 0), + (this.E = IV$1[4] | 0) + } + get() { + const { A: et, B: nt, C: rt, D: it, E: ot } = this + return [et, nt, rt, it, ot] + } + set(et, nt, rt, it, ot) { + ;(this.A = et | 0), (this.B = nt | 0), (this.C = rt | 0), (this.D = it | 0), (this.E = ot | 0) + } + process(et, nt) { + for (let lt = 0; lt < 16; lt++, nt += 4) SHA1_W[lt] = et.getUint32(nt, !1) + for (let lt = 16; lt < 80; lt++) + SHA1_W[lt] = rotl(SHA1_W[lt - 3] ^ SHA1_W[lt - 8] ^ SHA1_W[lt - 14] ^ SHA1_W[lt - 16], 1) + let { A: rt, B: it, C: ot, D: at, E: st } = this + for (let lt = 0; lt < 80; lt++) { + let ct, ut + lt < 20 + ? ((ct = Chi$1(it, ot, at)), (ut = 1518500249)) + : lt < 40 + ? ((ct = it ^ ot ^ at), (ut = 1859775393)) + : lt < 60 + ? ((ct = Maj$1(it, ot, at)), (ut = 2400959708)) + : ((ct = it ^ ot ^ at), (ut = 3395469782)) + const ht = (rotl(rt, 5) + ct + st + ut + SHA1_W[lt]) | 0 + ;(st = at), (at = ot), (ot = rotl(it, 30)), (it = rt), (rt = ht) + } + ;(rt = (rt + this.A) | 0), + (it = (it + this.B) | 0), + (ot = (ot + this.C) | 0), + (at = (at + this.D) | 0), + (st = (st + this.E) | 0), + this.set(rt, it, ot, at, st) + } + roundClean() { + SHA1_W.fill(0) + } + destroy() { + this.set(0, 0, 0, 0, 0), this.buffer.fill(0) + } + } + sha1.sha1 = (0, utils_js_1$1.wrapConstructor)(() => new SHA1()) + var sha256$2 = {} + Object.defineProperty(sha256$2, '__esModule', { value: !0 }) + sha256$2.sha224 = sha256$2.sha256 = void 0 + const _sha2_js_1 = _sha2, + utils_js_1 = utils$2, + Chi = (tt, et, nt) => (tt & et) ^ (~tt & nt), + Maj = (tt, et, nt) => (tt & et) ^ (tt & nt) ^ (et & nt), + SHA256_K = new Uint32Array([ + 1116352408, 1899447441, 3049323471, 3921009573, 961987163, 1508970993, 2453635748, 2870763221, 3624381080, + 310598401, 607225278, 1426881987, 1925078388, 2162078206, 2614888103, 3248222580, 3835390401, 4022224774, + 264347078, 604807628, 770255983, 1249150122, 1555081692, 1996064986, 2554220882, 2821834349, 2952996808, + 3210313671, 3336571891, 3584528711, 113926993, 338241895, 666307205, 773529912, 1294757372, 1396182291, + 1695183700, 1986661051, 2177026350, 2456956037, 2730485921, 2820302411, 3259730800, 3345764771, 3516065817, + 3600352804, 4094571909, 275423344, 430227734, 506948616, 659060556, 883997877, 958139571, 1322822218, 1537002063, + 1747873779, 1955562222, 2024104815, 2227730452, 2361852424, 2428436474, 2756734187, 3204031479, 3329325298, + ]), + IV = new Uint32Array([ + 1779033703, 3144134277, 1013904242, 2773480762, 1359893119, 2600822924, 528734635, 1541459225, + ]), + SHA256_W = new Uint32Array(64) + class SHA256 extends _sha2_js_1.SHA2 { + constructor() { + super(64, 32, 8, !1), + (this.A = IV[0] | 0), + (this.B = IV[1] | 0), + (this.C = IV[2] | 0), + (this.D = IV[3] | 0), + (this.E = IV[4] | 0), + (this.F = IV[5] | 0), + (this.G = IV[6] | 0), + (this.H = IV[7] | 0) + } + get() { + const { A: et, B: nt, C: rt, D: it, E: ot, F: at, G: st, H: lt } = this + return [et, nt, rt, it, ot, at, st, lt] + } + set(et, nt, rt, it, ot, at, st, lt) { + ;(this.A = et | 0), + (this.B = nt | 0), + (this.C = rt | 0), + (this.D = it | 0), + (this.E = ot | 0), + (this.F = at | 0), + (this.G = st | 0), + (this.H = lt | 0) + } + process(et, nt) { + for (let ht = 0; ht < 16; ht++, nt += 4) SHA256_W[ht] = et.getUint32(nt, !1) + for (let ht = 16; ht < 64; ht++) { + const dt = SHA256_W[ht - 15], + pt = SHA256_W[ht - 2], + mt = (0, utils_js_1.rotr)(dt, 7) ^ (0, utils_js_1.rotr)(dt, 18) ^ (dt >>> 3), + gt = (0, utils_js_1.rotr)(pt, 17) ^ (0, utils_js_1.rotr)(pt, 19) ^ (pt >>> 10) + SHA256_W[ht] = (gt + SHA256_W[ht - 7] + mt + SHA256_W[ht - 16]) | 0 + } + let { A: rt, B: it, C: ot, D: at, E: st, F: lt, G: ct, H: ut } = this + for (let ht = 0; ht < 64; ht++) { + const dt = (0, utils_js_1.rotr)(st, 6) ^ (0, utils_js_1.rotr)(st, 11) ^ (0, utils_js_1.rotr)(st, 25), + pt = (ut + dt + Chi(st, lt, ct) + SHA256_K[ht] + SHA256_W[ht]) | 0, + gt = + (((0, utils_js_1.rotr)(rt, 2) ^ (0, utils_js_1.rotr)(rt, 13) ^ (0, utils_js_1.rotr)(rt, 22)) + + Maj(rt, it, ot)) | + 0 + ;(ut = ct), (ct = lt), (lt = st), (st = (at + pt) | 0), (at = ot), (ot = it), (it = rt), (rt = (pt + gt) | 0) + } + ;(rt = (rt + this.A) | 0), + (it = (it + this.B) | 0), + (ot = (ot + this.C) | 0), + (at = (at + this.D) | 0), + (st = (st + this.E) | 0), + (lt = (lt + this.F) | 0), + (ct = (ct + this.G) | 0), + (ut = (ut + this.H) | 0), + this.set(rt, it, ot, at, st, lt, ct, ut) + } + roundClean() { + SHA256_W.fill(0) + } + destroy() { + this.set(0, 0, 0, 0, 0, 0, 0, 0), this.buffer.fill(0) + } + } + class SHA224 extends SHA256 { + constructor() { + super(), + (this.A = -1056596264), + (this.B = 914150663), + (this.C = 812702999), + (this.D = -150054599), + (this.E = -4191439), + (this.F = 1750603025), + (this.G = 1694076839), + (this.H = -1090891868), + (this.outputLen = 28) + } + } + sha256$2.sha256 = (0, utils_js_1.wrapConstructor)(() => new SHA256()) + sha256$2.sha224 = (0, utils_js_1.wrapConstructor)(() => new SHA224()) + ;(function (tt) { + Object.defineProperty(tt, '__esModule', { value: !0 }), + (tt.taggedHash = + tt.TAGGED_HASH_PREFIXES = + tt.TAGS = + tt.hash256 = + tt.hash160 = + tt.sha256 = + tt.sha1 = + tt.ripemd160 = + void 0) + const et = ripemd160, + nt = sha1, + rt = sha256$2 + function it(ut) { + return Buffer.from((0, et.ripemd160)(Uint8Array.from(ut))) + } + tt.ripemd160 = it + function ot(ut) { + return Buffer.from((0, nt.sha1)(Uint8Array.from(ut))) + } + tt.sha1 = ot + function at(ut) { + return Buffer.from((0, rt.sha256)(Uint8Array.from(ut))) + } + tt.sha256 = at + function st(ut) { + return Buffer.from((0, et.ripemd160)((0, rt.sha256)(Uint8Array.from(ut)))) + } + tt.hash160 = st + function lt(ut) { + return Buffer.from((0, rt.sha256)((0, rt.sha256)(Uint8Array.from(ut)))) + } + ;(tt.hash256 = lt), + (tt.TAGS = [ + 'BIP0340/challenge', + 'BIP0340/aux', + 'BIP0340/nonce', + 'TapLeaf', + 'TapBranch', + 'TapSighash', + 'TapTweak', + 'KeyAgg list', + 'KeyAgg coefficient', + ]), + (tt.TAGGED_HASH_PREFIXES = { + 'BIP0340/challenge': Buffer.from([ + 123, 181, 45, 122, 159, 239, 88, 50, 62, 177, 191, 122, 64, 125, 179, 130, 210, 243, 242, 216, 27, 177, 34, + 79, 73, 254, 81, 143, 109, 72, 211, 124, 123, 181, 45, 122, 159, 239, 88, 50, 62, 177, 191, 122, 64, 125, 179, + 130, 210, 243, 242, 216, 27, 177, 34, 79, 73, 254, 81, 143, 109, 72, 211, 124, + ]), + 'BIP0340/aux': Buffer.from([ + 241, 239, 78, 94, 192, 99, 202, 218, 109, 148, 202, 250, 157, 152, 126, 160, 105, 38, 88, 57, 236, 193, 31, + 151, 45, 119, 165, 46, 216, 193, 204, 144, 241, 239, 78, 94, 192, 99, 202, 218, 109, 148, 202, 250, 157, 152, + 126, 160, 105, 38, 88, 57, 236, 193, 31, 151, 45, 119, 165, 46, 216, 193, 204, 144, + ]), + 'BIP0340/nonce': Buffer.from([ + 7, 73, 119, 52, 167, 155, 203, 53, 91, 155, 140, 125, 3, 79, 18, 28, 244, 52, 215, 62, 247, 45, 218, 25, 135, + 0, 97, 251, 82, 191, 235, 47, 7, 73, 119, 52, 167, 155, 203, 53, 91, 155, 140, 125, 3, 79, 18, 28, 244, 52, + 215, 62, 247, 45, 218, 25, 135, 0, 97, 251, 82, 191, 235, 47, + ]), + TapLeaf: Buffer.from([ + 174, 234, 143, 220, 66, 8, 152, 49, 5, 115, 75, 88, 8, 29, 30, 38, 56, 211, 95, 28, 181, 64, 8, 212, 211, 87, + 202, 3, 190, 120, 233, 238, 174, 234, 143, 220, 66, 8, 152, 49, 5, 115, 75, 88, 8, 29, 30, 38, 56, 211, 95, + 28, 181, 64, 8, 212, 211, 87, 202, 3, 190, 120, 233, 238, + ]), + TapBranch: Buffer.from([ + 25, 65, 161, 242, 229, 110, 185, 95, 162, 169, 241, 148, 190, 92, 1, 247, 33, 111, 51, 237, 130, 176, 145, 70, + 52, 144, 208, 91, 245, 22, 160, 21, 25, 65, 161, 242, 229, 110, 185, 95, 162, 169, 241, 148, 190, 92, 1, 247, + 33, 111, 51, 237, 130, 176, 145, 70, 52, 144, 208, 91, 245, 22, 160, 21, + ]), + TapSighash: Buffer.from([ + 244, 10, 72, 223, 75, 42, 112, 200, 180, 146, 75, 242, 101, 70, 97, 237, 61, 149, 253, 102, 163, 19, 235, 135, + 35, 117, 151, 198, 40, 228, 160, 49, 244, 10, 72, 223, 75, 42, 112, 200, 180, 146, 75, 242, 101, 70, 97, 237, + 61, 149, 253, 102, 163, 19, 235, 135, 35, 117, 151, 198, 40, 228, 160, 49, + ]), + TapTweak: Buffer.from([ + 232, 15, 225, 99, 156, 156, 160, 80, 227, 175, 27, 57, 193, 67, 198, 62, 66, 156, 188, 235, 21, 217, 64, 251, + 181, 197, 161, 244, 175, 87, 197, 233, 232, 15, 225, 99, 156, 156, 160, 80, 227, 175, 27, 57, 193, 67, 198, + 62, 66, 156, 188, 235, 21, 217, 64, 251, 181, 197, 161, 244, 175, 87, 197, 233, + ]), + 'KeyAgg list': Buffer.from([ + 72, 28, 151, 28, 60, 11, 70, 215, 240, 178, 117, 174, 89, 141, 78, 44, 126, 215, 49, 156, 89, 74, 92, 110, + 199, 158, 160, 212, 153, 2, 148, 240, 72, 28, 151, 28, 60, 11, 70, 215, 240, 178, 117, 174, 89, 141, 78, 44, + 126, 215, 49, 156, 89, 74, 92, 110, 199, 158, 160, 212, 153, 2, 148, 240, + ]), + 'KeyAgg coefficient': Buffer.from([ + 191, 201, 4, 3, 77, 28, 136, 232, 200, 14, 34, 229, 61, 36, 86, 109, 100, 130, 78, 214, 66, 114, 129, 192, + 145, 0, 249, 77, 205, 82, 201, 129, 191, 201, 4, 3, 77, 28, 136, 232, 200, 14, 34, 229, 61, 36, 86, 109, 100, + 130, 78, 214, 66, 114, 129, 192, 145, 0, 249, 77, 205, 82, 201, 129, + ]), + }) + function ct(ut, ht) { + return at(Buffer.concat([tt.TAGGED_HASH_PREFIXES[ut], ht])) + } + tt.taggedHash = ct + })(crypto$2) + function base$1(tt) { + if (tt.length >= 255) throw new TypeError('Alphabet too long') + for (var et = new Uint8Array(256), nt = 0; nt < et.length; nt++) et[nt] = 255 + for (var rt = 0; rt < tt.length; rt++) { + var it = tt.charAt(rt), + ot = it.charCodeAt(0) + if (et[ot] !== 255) throw new TypeError(it + ' is ambiguous') + et[ot] = rt + } + var at = tt.length, + st = tt.charAt(0), + lt = Math.log(at) / Math.log(256), + ct = Math.log(256) / Math.log(at) + function ut(pt) { + if ( + (pt instanceof Uint8Array || + (ArrayBuffer.isView(pt) + ? (pt = new Uint8Array(pt.buffer, pt.byteOffset, pt.byteLength)) + : Array.isArray(pt) && (pt = Uint8Array.from(pt))), + !(pt instanceof Uint8Array)) + ) + throw new TypeError('Expected Uint8Array') + if (pt.length === 0) return '' + for (var mt = 0, gt = 0, yt = 0, bt = pt.length; yt !== bt && pt[yt] === 0; ) yt++, mt++ + for (var vt = ((bt - yt) * ct + 1) >>> 0, xt = new Uint8Array(vt); yt !== bt; ) { + for (var kt = pt[yt], St = 0, Tt = vt - 1; (kt !== 0 || St < gt) && Tt !== -1; Tt--, St++) + (kt += (256 * xt[Tt]) >>> 0), (xt[Tt] = kt % at >>> 0), (kt = (kt / at) >>> 0) + if (kt !== 0) throw new Error('Non-zero carry') + ;(gt = St), yt++ + } + for (var At = vt - gt; At !== vt && xt[At] === 0; ) At++ + for (var Et = st.repeat(mt); At < vt; ++At) Et += tt.charAt(xt[At]) + return Et + } + function ht(pt) { + if (typeof pt != 'string') throw new TypeError('Expected String') + if (pt.length === 0) return new Uint8Array() + for (var mt = 0, gt = 0, yt = 0; pt[mt] === st; ) gt++, mt++ + for (var bt = ((pt.length - mt) * lt + 1) >>> 0, vt = new Uint8Array(bt); pt[mt]; ) { + var xt = et[pt.charCodeAt(mt)] + if (xt === 255) return + for (var kt = 0, St = bt - 1; (xt !== 0 || kt < yt) && St !== -1; St--, kt++) + (xt += (at * vt[St]) >>> 0), (vt[St] = xt % 256 >>> 0), (xt = (xt / 256) >>> 0) + if (xt !== 0) throw new Error('Non-zero carry') + ;(yt = kt), mt++ + } + for (var Tt = bt - yt; Tt !== bt && vt[Tt] === 0; ) Tt++ + for (var At = new Uint8Array(gt + (bt - Tt)), Et = gt; Tt !== bt; ) At[Et++] = vt[Tt++] + return At + } + function dt(pt) { + var mt = ht(pt) + if (mt) return mt + throw new Error('Non-base' + at + ' character') + } + return { encode: ut, decodeUnsafe: ht, decode: dt } + } + var src = base$1 + const basex = src, + ALPHABET$1 = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz' + var bs58 = basex(ALPHABET$1), + base58 = bs58, + base = function (tt) { + function et(ot) { + var at = Uint8Array.from(ot), + st = tt(at), + lt = at.length + 4, + ct = new Uint8Array(lt) + return ct.set(at, 0), ct.set(st.subarray(0, 4), at.length), base58.encode(ct, lt) + } + function nt(ot) { + var at = ot.slice(0, -4), + st = ot.slice(-4), + lt = tt(at) + if (!((st[0] ^ lt[0]) | (st[1] ^ lt[1]) | (st[2] ^ lt[2]) | (st[3] ^ lt[3]))) return at + } + function rt(ot) { + var at = base58.decodeUnsafe(ot) + if (at) return nt(at) + } + function it(ot) { + var at = base58.decode(ot), + st = nt(at) + if (!st) throw new Error('Invalid checksum') + return st + } + return { encode: et, decode: it, decodeUnsafe: rt } + }, + { sha256: sha256$1 } = sha256$2, + bs58checkBase = base + function sha256x2(tt) { + return sha256$1(sha256$1(tt)) + } + var bs58check$3 = bs58checkBase(sha256x2) + Object.defineProperty(p2pkh$1, '__esModule', { value: !0 }) + p2pkh$1.p2pkh = void 0 + const bcrypto$5 = crypto$2, + networks_1$5 = networks$1, + bscript$8 = script, + types_1$6 = types$6, + lazy$5 = lazy$9, + bs58check$2 = bs58check$3, + OPS$4 = bscript$8.OPS + function p2pkh(tt, et) { + if (!tt.address && !tt.hash && !tt.output && !tt.pubkey && !tt.input) throw new TypeError('Not enough data') + ;(et = Object.assign({ validate: !0 }, et || {})), + (0, types_1$6.typeforce)( + { + network: types_1$6.typeforce.maybe(types_1$6.typeforce.Object), + address: types_1$6.typeforce.maybe(types_1$6.typeforce.String), + hash: types_1$6.typeforce.maybe(types_1$6.typeforce.BufferN(20)), + output: types_1$6.typeforce.maybe(types_1$6.typeforce.BufferN(25)), + pubkey: types_1$6.typeforce.maybe(types_1$6.isPoint), + signature: types_1$6.typeforce.maybe(bscript$8.isCanonicalScriptSignature), + input: types_1$6.typeforce.maybe(types_1$6.typeforce.Buffer), + }, + tt, + ) + const nt = lazy$5.value(() => { + const at = Buffer.from(bs58check$2.decode(tt.address)), + st = at.readUInt8(0), + lt = at.slice(1) + return { version: st, hash: lt } + }), + rt = lazy$5.value(() => bscript$8.decompile(tt.input)), + it = tt.network || networks_1$5.bitcoin, + ot = { name: 'p2pkh', network: it } + if ( + (lazy$5.prop(ot, 'address', () => { + if (!ot.hash) return + const at = Buffer.allocUnsafe(21) + return at.writeUInt8(it.pubKeyHash, 0), ot.hash.copy(at, 1), bs58check$2.encode(at) + }), + lazy$5.prop(ot, 'hash', () => { + if (tt.output) return tt.output.slice(3, 23) + if (tt.address) return nt().hash + if (tt.pubkey || ot.pubkey) return bcrypto$5.hash160(tt.pubkey || ot.pubkey) + }), + lazy$5.prop(ot, 'output', () => { + if (ot.hash) + return bscript$8.compile([OPS$4.OP_DUP, OPS$4.OP_HASH160, ot.hash, OPS$4.OP_EQUALVERIFY, OPS$4.OP_CHECKSIG]) + }), + lazy$5.prop(ot, 'pubkey', () => { + if (tt.input) return rt()[1] + }), + lazy$5.prop(ot, 'signature', () => { + if (tt.input) return rt()[0] + }), + lazy$5.prop(ot, 'input', () => { + if (tt.pubkey && tt.signature) return bscript$8.compile([tt.signature, tt.pubkey]) + }), + lazy$5.prop(ot, 'witness', () => { + if (ot.input) return [] + }), + et.validate) + ) { + let at = Buffer.from([]) + if (tt.address) { + if (nt().version !== it.pubKeyHash) throw new TypeError('Invalid version or Network mismatch') + if (nt().hash.length !== 20) throw new TypeError('Invalid address') + at = nt().hash + } + if (tt.hash) { + if (at.length > 0 && !at.equals(tt.hash)) throw new TypeError('Hash mismatch') + at = tt.hash + } + if (tt.output) { + if ( + tt.output.length !== 25 || + tt.output[0] !== OPS$4.OP_DUP || + tt.output[1] !== OPS$4.OP_HASH160 || + tt.output[2] !== 20 || + tt.output[23] !== OPS$4.OP_EQUALVERIFY || + tt.output[24] !== OPS$4.OP_CHECKSIG + ) + throw new TypeError('Output is invalid') + const st = tt.output.slice(3, 23) + if (at.length > 0 && !at.equals(st)) throw new TypeError('Hash mismatch') + at = st + } + if (tt.pubkey) { + const st = bcrypto$5.hash160(tt.pubkey) + if (at.length > 0 && !at.equals(st)) throw new TypeError('Hash mismatch') + at = st + } + if (tt.input) { + const st = rt() + if (st.length !== 2) throw new TypeError('Input is invalid') + if (!bscript$8.isCanonicalScriptSignature(st[0])) throw new TypeError('Input has invalid signature') + if (!(0, types_1$6.isPoint)(st[1])) throw new TypeError('Input has invalid pubkey') + if (tt.signature && !tt.signature.equals(st[0])) throw new TypeError('Signature mismatch') + if (tt.pubkey && !tt.pubkey.equals(st[1])) throw new TypeError('Pubkey mismatch') + const lt = bcrypto$5.hash160(st[1]) + if (at.length > 0 && !at.equals(lt)) throw new TypeError('Hash mismatch') + } + } + return Object.assign(ot, tt) + } + p2pkh$1.p2pkh = p2pkh + var p2sh$1 = {} + Object.defineProperty(p2sh$1, '__esModule', { value: !0 }) + p2sh$1.p2sh = void 0 + const bcrypto$4 = crypto$2, + networks_1$4 = networks$1, + bscript$7 = script, + types_1$5 = types$6, + lazy$4 = lazy$9, + bs58check$1 = bs58check$3, + OPS$3 = bscript$7.OPS + function stacksEqual$2(tt, et) { + return tt.length !== et.length ? !1 : tt.every((nt, rt) => nt.equals(et[rt])) + } + function p2sh(tt, et) { + if (!tt.address && !tt.hash && !tt.output && !tt.redeem && !tt.input) throw new TypeError('Not enough data') + ;(et = Object.assign({ validate: !0 }, et || {})), + (0, types_1$5.typeforce)( + { + network: types_1$5.typeforce.maybe(types_1$5.typeforce.Object), + address: types_1$5.typeforce.maybe(types_1$5.typeforce.String), + hash: types_1$5.typeforce.maybe(types_1$5.typeforce.BufferN(20)), + output: types_1$5.typeforce.maybe(types_1$5.typeforce.BufferN(23)), + redeem: types_1$5.typeforce.maybe({ + network: types_1$5.typeforce.maybe(types_1$5.typeforce.Object), + output: types_1$5.typeforce.maybe(types_1$5.typeforce.Buffer), + input: types_1$5.typeforce.maybe(types_1$5.typeforce.Buffer), + witness: types_1$5.typeforce.maybe(types_1$5.typeforce.arrayOf(types_1$5.typeforce.Buffer)), + }), + input: types_1$5.typeforce.maybe(types_1$5.typeforce.Buffer), + witness: types_1$5.typeforce.maybe(types_1$5.typeforce.arrayOf(types_1$5.typeforce.Buffer)), + }, + tt, + ) + let nt = tt.network + nt || (nt = (tt.redeem && tt.redeem.network) || networks_1$4.bitcoin) + const rt = { network: nt }, + it = lazy$4.value(() => { + const st = Buffer.from(bs58check$1.decode(tt.address)), + lt = st.readUInt8(0), + ct = st.slice(1) + return { version: lt, hash: ct } + }), + ot = lazy$4.value(() => bscript$7.decompile(tt.input)), + at = lazy$4.value(() => { + const st = ot(), + lt = st[st.length - 1] + return { + network: nt, + output: lt === OPS$3.OP_FALSE ? Buffer.from([]) : lt, + input: bscript$7.compile(st.slice(0, -1)), + witness: tt.witness || [], + } + }) + if ( + (lazy$4.prop(rt, 'address', () => { + if (!rt.hash) return + const st = Buffer.allocUnsafe(21) + return st.writeUInt8(rt.network.scriptHash, 0), rt.hash.copy(st, 1), bs58check$1.encode(st) + }), + lazy$4.prop(rt, 'hash', () => { + if (tt.output) return tt.output.slice(2, 22) + if (tt.address) return it().hash + if (rt.redeem && rt.redeem.output) return bcrypto$4.hash160(rt.redeem.output) + }), + lazy$4.prop(rt, 'output', () => { + if (rt.hash) return bscript$7.compile([OPS$3.OP_HASH160, rt.hash, OPS$3.OP_EQUAL]) + }), + lazy$4.prop(rt, 'redeem', () => { + if (tt.input) return at() + }), + lazy$4.prop(rt, 'input', () => { + if (!(!tt.redeem || !tt.redeem.input || !tt.redeem.output)) + return bscript$7.compile([].concat(bscript$7.decompile(tt.redeem.input), tt.redeem.output)) + }), + lazy$4.prop(rt, 'witness', () => { + if (rt.redeem && rt.redeem.witness) return rt.redeem.witness + if (rt.input) return [] + }), + lazy$4.prop(rt, 'name', () => { + const st = ['p2sh'] + return rt.redeem !== void 0 && rt.redeem.name !== void 0 && st.push(rt.redeem.name), st.join('-') + }), + et.validate) + ) { + let st = Buffer.from([]) + if (tt.address) { + if (it().version !== nt.scriptHash) throw new TypeError('Invalid version or Network mismatch') + if (it().hash.length !== 20) throw new TypeError('Invalid address') + st = it().hash + } + if (tt.hash) { + if (st.length > 0 && !st.equals(tt.hash)) throw new TypeError('Hash mismatch') + st = tt.hash + } + if (tt.output) { + if ( + tt.output.length !== 23 || + tt.output[0] !== OPS$3.OP_HASH160 || + tt.output[1] !== 20 || + tt.output[22] !== OPS$3.OP_EQUAL + ) + throw new TypeError('Output is invalid') + const ct = tt.output.slice(2, 22) + if (st.length > 0 && !st.equals(ct)) throw new TypeError('Hash mismatch') + st = ct + } + const lt = (ct) => { + if (ct.output) { + const ut = bscript$7.decompile(ct.output) + if (!ut || ut.length < 1) throw new TypeError('Redeem.output too short') + if (ct.output.byteLength > 520) throw new TypeError('Redeem.output unspendable if larger than 520 bytes') + if (bscript$7.countNonPushOnlyOPs(ut) > 201) + throw new TypeError('Redeem.output unspendable with more than 201 non-push ops') + const ht = bcrypto$4.hash160(ct.output) + if (st.length > 0 && !st.equals(ht)) throw new TypeError('Hash mismatch') + st = ht + } + if (ct.input) { + const ut = ct.input.length > 0, + ht = ct.witness && ct.witness.length > 0 + if (!ut && !ht) throw new TypeError('Empty input') + if (ut && ht) throw new TypeError('Input and witness provided') + if (ut) { + const dt = bscript$7.decompile(ct.input) + if (!bscript$7.isPushOnly(dt)) throw new TypeError('Non push-only scriptSig') + } + } + } + if (tt.input) { + const ct = ot() + if (!ct || ct.length < 1) throw new TypeError('Input too short') + if (!Buffer.isBuffer(at().output)) throw new TypeError('Input is invalid') + lt(at()) + } + if (tt.redeem) { + if (tt.redeem.network && tt.redeem.network !== nt) throw new TypeError('Network mismatch') + if (tt.input) { + const ct = at() + if (tt.redeem.output && !tt.redeem.output.equals(ct.output)) throw new TypeError('Redeem.output mismatch') + if (tt.redeem.input && !tt.redeem.input.equals(ct.input)) throw new TypeError('Redeem.input mismatch') + } + lt(tt.redeem) + } + if (tt.witness && tt.redeem && tt.redeem.witness && !stacksEqual$2(tt.redeem.witness, tt.witness)) + throw new TypeError('Witness and redeem.witness mismatch') + } + return Object.assign(rt, tt) + } + p2sh$1.p2sh = p2sh + var p2wpkh$1 = {}, + dist = {} + Object.defineProperty(dist, '__esModule', { value: !0 }) + dist.bech32m = dist.bech32 = void 0 + const ALPHABET = 'qpzry9x8gf2tvdw0s3jn54khce6mua7l', + ALPHABET_MAP = {} + for (let tt = 0; tt < ALPHABET.length; tt++) { + const et = ALPHABET.charAt(tt) + ALPHABET_MAP[et] = tt + } + function polymodStep(tt) { + const et = tt >> 25 + return ( + ((tt & 33554431) << 5) ^ + (-((et >> 0) & 1) & 996825010) ^ + (-((et >> 1) & 1) & 642813549) ^ + (-((et >> 2) & 1) & 513874426) ^ + (-((et >> 3) & 1) & 1027748829) ^ + (-((et >> 4) & 1) & 705979059) + ) + } + function prefixChk(tt) { + let et = 1 + for (let nt = 0; nt < tt.length; ++nt) { + const rt = tt.charCodeAt(nt) + if (rt < 33 || rt > 126) return 'Invalid prefix (' + tt + ')' + et = polymodStep(et) ^ (rt >> 5) + } + et = polymodStep(et) + for (let nt = 0; nt < tt.length; ++nt) { + const rt = tt.charCodeAt(nt) + et = polymodStep(et) ^ (rt & 31) + } + return et + } + function convert$3(tt, et, nt, rt) { + let it = 0, + ot = 0 + const at = (1 << nt) - 1, + st = [] + for (let lt = 0; lt < tt.length; ++lt) + for (it = (it << et) | tt[lt], ot += et; ot >= nt; ) (ot -= nt), st.push((it >> ot) & at) + if (rt) ot > 0 && st.push((it << (nt - ot)) & at) + else { + if (ot >= et) return 'Excess padding' + if ((it << (nt - ot)) & at) return 'Non-zero padding' + } + return st + } + function toWords(tt) { + return convert$3(tt, 8, 5, !0) + } + function fromWordsUnsafe(tt) { + const et = convert$3(tt, 5, 8, !1) + if (Array.isArray(et)) return et + } + function fromWords(tt) { + const et = convert$3(tt, 5, 8, !1) + if (Array.isArray(et)) return et + throw new Error(et) + } + function getLibraryFromEncoding(tt) { + let et + tt === 'bech32' ? (et = 1) : (et = 734539939) + function nt(at, st, lt) { + if (((lt = lt || 90), at.length + 7 + st.length > lt)) throw new TypeError('Exceeds length limit') + at = at.toLowerCase() + let ct = prefixChk(at) + if (typeof ct == 'string') throw new Error(ct) + let ut = at + '1' + for (let ht = 0; ht < st.length; ++ht) { + const dt = st[ht] + if (dt >> 5) throw new Error('Non 5-bit word') + ;(ct = polymodStep(ct) ^ dt), (ut += ALPHABET.charAt(dt)) + } + for (let ht = 0; ht < 6; ++ht) ct = polymodStep(ct) + ct ^= et + for (let ht = 0; ht < 6; ++ht) { + const dt = (ct >> ((5 - ht) * 5)) & 31 + ut += ALPHABET.charAt(dt) + } + return ut + } + function rt(at, st) { + if (((st = st || 90), at.length < 8)) return at + ' too short' + if (at.length > st) return 'Exceeds length limit' + const lt = at.toLowerCase(), + ct = at.toUpperCase() + if (at !== lt && at !== ct) return 'Mixed-case string ' + at + at = lt + const ut = at.lastIndexOf('1') + if (ut === -1) return 'No separator character for ' + at + if (ut === 0) return 'Missing prefix for ' + at + const ht = at.slice(0, ut), + dt = at.slice(ut + 1) + if (dt.length < 6) return 'Data too short' + let pt = prefixChk(ht) + if (typeof pt == 'string') return pt + const mt = [] + for (let gt = 0; gt < dt.length; ++gt) { + const yt = dt.charAt(gt), + bt = ALPHABET_MAP[yt] + if (bt === void 0) return 'Unknown character ' + yt + ;(pt = polymodStep(pt) ^ bt), !(gt + 6 >= dt.length) && mt.push(bt) + } + return pt !== et ? 'Invalid checksum for ' + at : { prefix: ht, words: mt } + } + function it(at, st) { + const lt = rt(at, st) + if (typeof lt == 'object') return lt + } + function ot(at, st) { + const lt = rt(at, st) + if (typeof lt == 'object') return lt + throw new Error(lt) + } + return { decodeUnsafe: it, decode: ot, encode: nt, toWords, fromWordsUnsafe, fromWords } + } + dist.bech32 = getLibraryFromEncoding('bech32') + dist.bech32m = getLibraryFromEncoding('bech32m') + Object.defineProperty(p2wpkh$1, '__esModule', { value: !0 }) + p2wpkh$1.p2wpkh = void 0 + const bcrypto$3 = crypto$2, + networks_1$3 = networks$1, + bscript$6 = script, + types_1$4 = types$6, + lazy$3 = lazy$9, + bech32_1$3 = dist, + OPS$2 = bscript$6.OPS, + EMPTY_BUFFER$2 = Buffer.alloc(0) + function p2wpkh(tt, et) { + if (!tt.address && !tt.hash && !tt.output && !tt.pubkey && !tt.witness) throw new TypeError('Not enough data') + ;(et = Object.assign({ validate: !0 }, et || {})), + (0, types_1$4.typeforce)( + { + address: types_1$4.typeforce.maybe(types_1$4.typeforce.String), + hash: types_1$4.typeforce.maybe(types_1$4.typeforce.BufferN(20)), + input: types_1$4.typeforce.maybe(types_1$4.typeforce.BufferN(0)), + network: types_1$4.typeforce.maybe(types_1$4.typeforce.Object), + output: types_1$4.typeforce.maybe(types_1$4.typeforce.BufferN(22)), + pubkey: types_1$4.typeforce.maybe(types_1$4.isPoint), + signature: types_1$4.typeforce.maybe(bscript$6.isCanonicalScriptSignature), + witness: types_1$4.typeforce.maybe(types_1$4.typeforce.arrayOf(types_1$4.typeforce.Buffer)), + }, + tt, + ) + const nt = lazy$3.value(() => { + const ot = bech32_1$3.bech32.decode(tt.address), + at = ot.words.shift(), + st = bech32_1$3.bech32.fromWords(ot.words) + return { version: at, prefix: ot.prefix, data: Buffer.from(st) } + }), + rt = tt.network || networks_1$3.bitcoin, + it = { name: 'p2wpkh', network: rt } + if ( + (lazy$3.prop(it, 'address', () => { + if (!it.hash) return + const ot = bech32_1$3.bech32.toWords(it.hash) + return ot.unshift(0), bech32_1$3.bech32.encode(rt.bech32, ot) + }), + lazy$3.prop(it, 'hash', () => { + if (tt.output) return tt.output.slice(2, 22) + if (tt.address) return nt().data + if (tt.pubkey || it.pubkey) return bcrypto$3.hash160(tt.pubkey || it.pubkey) + }), + lazy$3.prop(it, 'output', () => { + if (it.hash) return bscript$6.compile([OPS$2.OP_0, it.hash]) + }), + lazy$3.prop(it, 'pubkey', () => { + if (tt.pubkey) return tt.pubkey + if (tt.witness) return tt.witness[1] + }), + lazy$3.prop(it, 'signature', () => { + if (tt.witness) return tt.witness[0] + }), + lazy$3.prop(it, 'input', () => { + if (it.witness) return EMPTY_BUFFER$2 + }), + lazy$3.prop(it, 'witness', () => { + if (tt.pubkey && tt.signature) return [tt.signature, tt.pubkey] + }), + et.validate) + ) { + let ot = Buffer.from([]) + if (tt.address) { + if (rt && rt.bech32 !== nt().prefix) throw new TypeError('Invalid prefix or Network mismatch') + if (nt().version !== 0) throw new TypeError('Invalid address version') + if (nt().data.length !== 20) throw new TypeError('Invalid address data') + ot = nt().data + } + if (tt.hash) { + if (ot.length > 0 && !ot.equals(tt.hash)) throw new TypeError('Hash mismatch') + ot = tt.hash + } + if (tt.output) { + if (tt.output.length !== 22 || tt.output[0] !== OPS$2.OP_0 || tt.output[1] !== 20) + throw new TypeError('Output is invalid') + if (ot.length > 0 && !ot.equals(tt.output.slice(2))) throw new TypeError('Hash mismatch') + ot = tt.output.slice(2) + } + if (tt.pubkey) { + const at = bcrypto$3.hash160(tt.pubkey) + if (ot.length > 0 && !ot.equals(at)) throw new TypeError('Hash mismatch') + if (((ot = at), !(0, types_1$4.isPoint)(tt.pubkey) || tt.pubkey.length !== 33)) + throw new TypeError('Invalid pubkey for p2wpkh') + } + if (tt.witness) { + if (tt.witness.length !== 2) throw new TypeError('Witness is invalid') + if (!bscript$6.isCanonicalScriptSignature(tt.witness[0])) throw new TypeError('Witness has invalid signature') + if (!(0, types_1$4.isPoint)(tt.witness[1]) || tt.witness[1].length !== 33) + throw new TypeError('Witness has invalid pubkey') + if (tt.signature && !tt.signature.equals(tt.witness[0])) throw new TypeError('Signature mismatch') + if (tt.pubkey && !tt.pubkey.equals(tt.witness[1])) throw new TypeError('Pubkey mismatch') + const at = bcrypto$3.hash160(tt.witness[1]) + if (ot.length > 0 && !ot.equals(at)) throw new TypeError('Hash mismatch') + } + } + return Object.assign(it, tt) + } + p2wpkh$1.p2wpkh = p2wpkh + var p2wsh$1 = {} + Object.defineProperty(p2wsh$1, '__esModule', { value: !0 }) + p2wsh$1.p2wsh = void 0 + const bcrypto$2 = crypto$2, + networks_1$2 = networks$1, + bscript$5 = script, + types_1$3 = types$6, + lazy$2 = lazy$9, + bech32_1$2 = dist, + OPS$1 = bscript$5.OPS, + EMPTY_BUFFER$1 = Buffer.alloc(0) + function stacksEqual$1(tt, et) { + return tt.length !== et.length ? !1 : tt.every((nt, rt) => nt.equals(et[rt])) + } + function chunkHasUncompressedPubkey(tt) { + return !!(Buffer.isBuffer(tt) && tt.length === 65 && tt[0] === 4 && (0, types_1$3.isPoint)(tt)) + } + function p2wsh(tt, et) { + if (!tt.address && !tt.hash && !tt.output && !tt.redeem && !tt.witness) throw new TypeError('Not enough data') + ;(et = Object.assign({ validate: !0 }, et || {})), + (0, types_1$3.typeforce)( + { + network: types_1$3.typeforce.maybe(types_1$3.typeforce.Object), + address: types_1$3.typeforce.maybe(types_1$3.typeforce.String), + hash: types_1$3.typeforce.maybe(types_1$3.typeforce.BufferN(32)), + output: types_1$3.typeforce.maybe(types_1$3.typeforce.BufferN(34)), + redeem: types_1$3.typeforce.maybe({ + input: types_1$3.typeforce.maybe(types_1$3.typeforce.Buffer), + network: types_1$3.typeforce.maybe(types_1$3.typeforce.Object), + output: types_1$3.typeforce.maybe(types_1$3.typeforce.Buffer), + witness: types_1$3.typeforce.maybe(types_1$3.typeforce.arrayOf(types_1$3.typeforce.Buffer)), + }), + input: types_1$3.typeforce.maybe(types_1$3.typeforce.BufferN(0)), + witness: types_1$3.typeforce.maybe(types_1$3.typeforce.arrayOf(types_1$3.typeforce.Buffer)), + }, + tt, + ) + const nt = lazy$2.value(() => { + const at = bech32_1$2.bech32.decode(tt.address), + st = at.words.shift(), + lt = bech32_1$2.bech32.fromWords(at.words) + return { version: st, prefix: at.prefix, data: Buffer.from(lt) } + }), + rt = lazy$2.value(() => bscript$5.decompile(tt.redeem.input)) + let it = tt.network + it || (it = (tt.redeem && tt.redeem.network) || networks_1$2.bitcoin) + const ot = { network: it } + if ( + (lazy$2.prop(ot, 'address', () => { + if (!ot.hash) return + const at = bech32_1$2.bech32.toWords(ot.hash) + return at.unshift(0), bech32_1$2.bech32.encode(it.bech32, at) + }), + lazy$2.prop(ot, 'hash', () => { + if (tt.output) return tt.output.slice(2) + if (tt.address) return nt().data + if (ot.redeem && ot.redeem.output) return bcrypto$2.sha256(ot.redeem.output) + }), + lazy$2.prop(ot, 'output', () => { + if (ot.hash) return bscript$5.compile([OPS$1.OP_0, ot.hash]) + }), + lazy$2.prop(ot, 'redeem', () => { + if (tt.witness) + return { output: tt.witness[tt.witness.length - 1], input: EMPTY_BUFFER$1, witness: tt.witness.slice(0, -1) } + }), + lazy$2.prop(ot, 'input', () => { + if (ot.witness) return EMPTY_BUFFER$1 + }), + lazy$2.prop(ot, 'witness', () => { + if ( + tt.redeem && + tt.redeem.input && + tt.redeem.input.length > 0 && + tt.redeem.output && + tt.redeem.output.length > 0 + ) { + const at = bscript$5.toStack(rt()) + return ( + (ot.redeem = Object.assign({ witness: at }, tt.redeem)), + (ot.redeem.input = EMPTY_BUFFER$1), + [].concat(at, tt.redeem.output) + ) + } + if (tt.redeem && tt.redeem.output && tt.redeem.witness) return [].concat(tt.redeem.witness, tt.redeem.output) + }), + lazy$2.prop(ot, 'name', () => { + const at = ['p2wsh'] + return ot.redeem !== void 0 && ot.redeem.name !== void 0 && at.push(ot.redeem.name), at.join('-') + }), + et.validate) + ) { + let at = Buffer.from([]) + if (tt.address) { + if (nt().prefix !== it.bech32) throw new TypeError('Invalid prefix or Network mismatch') + if (nt().version !== 0) throw new TypeError('Invalid address version') + if (nt().data.length !== 32) throw new TypeError('Invalid address data') + at = nt().data + } + if (tt.hash) { + if (at.length > 0 && !at.equals(tt.hash)) throw new TypeError('Hash mismatch') + at = tt.hash + } + if (tt.output) { + if (tt.output.length !== 34 || tt.output[0] !== OPS$1.OP_0 || tt.output[1] !== 32) + throw new TypeError('Output is invalid') + const st = tt.output.slice(2) + if (at.length > 0 && !at.equals(st)) throw new TypeError('Hash mismatch') + at = st + } + if (tt.redeem) { + if (tt.redeem.network && tt.redeem.network !== it) throw new TypeError('Network mismatch') + if (tt.redeem.input && tt.redeem.input.length > 0 && tt.redeem.witness && tt.redeem.witness.length > 0) + throw new TypeError('Ambiguous witness source') + if (tt.redeem.output) { + const st = bscript$5.decompile(tt.redeem.output) + if (!st || st.length < 1) throw new TypeError('Redeem.output is invalid') + if (tt.redeem.output.byteLength > 3600) + throw new TypeError('Redeem.output unspendable if larger than 3600 bytes') + if (bscript$5.countNonPushOnlyOPs(st) > 201) + throw new TypeError('Redeem.output unspendable with more than 201 non-push ops') + const lt = bcrypto$2.sha256(tt.redeem.output) + if (at.length > 0 && !at.equals(lt)) throw new TypeError('Hash mismatch') + at = lt + } + if (tt.redeem.input && !bscript$5.isPushOnly(rt())) throw new TypeError('Non push-only scriptSig') + if (tt.witness && tt.redeem.witness && !stacksEqual$1(tt.witness, tt.redeem.witness)) + throw new TypeError('Witness and redeem.witness mismatch') + if ( + (tt.redeem.input && rt().some(chunkHasUncompressedPubkey)) || + (tt.redeem.output && (bscript$5.decompile(tt.redeem.output) || []).some(chunkHasUncompressedPubkey)) + ) + throw new TypeError('redeem.input or redeem.output contains uncompressed pubkey') + } + if (tt.witness && tt.witness.length > 0) { + const st = tt.witness[tt.witness.length - 1] + if (tt.redeem && tt.redeem.output && !tt.redeem.output.equals(st)) + throw new TypeError('Witness and redeem.output mismatch') + if ( + tt.witness.some(chunkHasUncompressedPubkey) || + (bscript$5.decompile(st) || []).some(chunkHasUncompressedPubkey) + ) + throw new TypeError('Witness contains uncompressed pubkey') + } + } + return Object.assign(ot, tt) + } + p2wsh$1.p2wsh = p2wsh + var p2tr$1 = {}, + ecc_lib = {} + Object.defineProperty(ecc_lib, '__esModule', { value: !0 }) + ecc_lib.getEccLib = ecc_lib.initEccLib = void 0 + const _ECCLIB_CACHE = {} + function initEccLib(tt) { + tt ? tt !== _ECCLIB_CACHE.eccLib && (verifyEcc(tt), (_ECCLIB_CACHE.eccLib = tt)) : (_ECCLIB_CACHE.eccLib = tt) + } + ecc_lib.initEccLib = initEccLib + function getEccLib() { + if (!_ECCLIB_CACHE.eccLib) + throw new Error( + 'No ECC Library provided. You must call initEccLib() with a valid TinySecp256k1Interface instance', + ) + return _ECCLIB_CACHE.eccLib + } + ecc_lib.getEccLib = getEccLib + const h$5 = (tt) => Buffer.from(tt, 'hex') + function verifyEcc(tt) { + assert$1(typeof tt.isXOnlyPoint == 'function'), + assert$1(tt.isXOnlyPoint(h$5('79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798'))), + assert$1(tt.isXOnlyPoint(h$5('fffffffffffffffffffffffffffffffffffffffffffffffffffffffeeffffc2e'))), + assert$1(tt.isXOnlyPoint(h$5('f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9'))), + assert$1(tt.isXOnlyPoint(h$5('0000000000000000000000000000000000000000000000000000000000000001'))), + assert$1(!tt.isXOnlyPoint(h$5('0000000000000000000000000000000000000000000000000000000000000000'))), + assert$1(!tt.isXOnlyPoint(h$5('fffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f'))), + assert$1(typeof tt.xOnlyPointAddTweak == 'function'), + tweakAddVectors.forEach((et) => { + const nt = tt.xOnlyPointAddTweak(h$5(et.pubkey), h$5(et.tweak)) + et.result === null + ? assert$1(nt === null) + : (assert$1(nt !== null), + assert$1(nt.parity === et.parity), + assert$1(Buffer.from(nt.xOnlyPubkey).equals(h$5(et.result)))) + }) + } + function assert$1(tt) { + if (!tt) throw new Error('ecc library invalid') + } + const tweakAddVectors = [ + { + pubkey: '79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798', + tweak: 'fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364140', + parity: -1, + result: null, + }, + { + pubkey: '1617d38ed8d8657da4d4761e8057bc396ea9e4b9d29776d4be096016dbd2509b', + tweak: 'a8397a935f0dfceba6ba9618f6451ef4d80637abf4e6af2669fbc9de6a8fd2ac', + parity: 1, + result: 'e478f99dab91052ab39a33ea35fd5e6e4933f4d28023cd597c9a1f6760346adf', + }, + { + pubkey: '2c0b7cf95324a07d05398b240174dc0c2be444d96b159aa6c7f7b1e668680991', + tweak: '823c3cd2142744b075a87eade7e1b8678ba308d566226a0056ca2b7a76f86b47', + parity: 0, + result: '9534f8dc8c6deda2dc007655981c78b49c5d96c778fbf363462a11ec9dfd948c', + }, + ] + var bip341 = {}, + bufferutils = {}, + Buffer$2 = safeBufferExports.Buffer, + MAX_SAFE_INTEGER$4 = 9007199254740991 + function checkUInt53$1(tt) { + if (tt < 0 || tt > MAX_SAFE_INTEGER$4 || tt % 1 !== 0) throw new RangeError('value out of range') + } + function encode$j(tt, et, nt) { + if ((checkUInt53$1(tt), et || (et = Buffer$2.allocUnsafe(encodingLength$1(tt))), !Buffer$2.isBuffer(et))) + throw new TypeError('buffer must be a Buffer instance') + return ( + nt || (nt = 0), + tt < 253 + ? (et.writeUInt8(tt, nt), (encode$j.bytes = 1)) + : tt <= 65535 + ? (et.writeUInt8(253, nt), et.writeUInt16LE(tt, nt + 1), (encode$j.bytes = 3)) + : tt <= 4294967295 + ? (et.writeUInt8(254, nt), et.writeUInt32LE(tt, nt + 1), (encode$j.bytes = 5)) + : (et.writeUInt8(255, nt), + et.writeUInt32LE(tt >>> 0, nt + 1), + et.writeUInt32LE((tt / 4294967296) | 0, nt + 5), + (encode$j.bytes = 9)), + et + ) + } + function decode$i(tt, et) { + if (!Buffer$2.isBuffer(tt)) throw new TypeError('buffer must be a Buffer instance') + et || (et = 0) + var nt = tt.readUInt8(et) + if (nt < 253) return (decode$i.bytes = 1), nt + if (nt === 253) return (decode$i.bytes = 3), tt.readUInt16LE(et + 1) + if (nt === 254) return (decode$i.bytes = 5), tt.readUInt32LE(et + 1) + decode$i.bytes = 9 + var rt = tt.readUInt32LE(et + 1), + it = tt.readUInt32LE(et + 5), + ot = it * 4294967296 + rt + return checkUInt53$1(ot), ot + } + function encodingLength$1(tt) { + return checkUInt53$1(tt), tt < 253 ? 1 : tt <= 65535 ? 3 : tt <= 4294967295 ? 5 : 9 + } + var varuintBitcoin = { encode: encode$j, decode: decode$i, encodingLength: encodingLength$1 } + Object.defineProperty(bufferutils, '__esModule', { value: !0 }) + bufferutils.BufferReader = + bufferutils.BufferWriter = + bufferutils.cloneBuffer = + bufferutils.reverseBuffer = + bufferutils.writeUInt64LE = + bufferutils.readUInt64LE = + bufferutils.varuint = + void 0 + const types$3 = types$6, + { typeforce: typeforce$2 } = types$3, + varuint$7 = varuintBitcoin + bufferutils.varuint = varuint$7 + function verifuint$1(tt, et) { + if (typeof tt != 'number') throw new Error('cannot write a non-number as a number') + if (tt < 0) throw new Error('specified a negative value for writing an unsigned value') + if (tt > et) throw new Error('RangeError: value out of range') + if (Math.floor(tt) !== tt) throw new Error('value has a fractional component') + } + function readUInt64LE$1(tt, et) { + const nt = tt.readUInt32LE(et) + let rt = tt.readUInt32LE(et + 4) + return (rt *= 4294967296), verifuint$1(rt + nt, 9007199254740991), rt + nt + } + bufferutils.readUInt64LE = readUInt64LE$1 + function writeUInt64LE$1(tt, et, nt) { + return ( + verifuint$1(et, 9007199254740991), + tt.writeInt32LE(et & -1, nt), + tt.writeUInt32LE(Math.floor(et / 4294967296), nt + 4), + nt + 8 + ) + } + bufferutils.writeUInt64LE = writeUInt64LE$1 + function reverseBuffer$1(tt) { + if (tt.length < 1) return tt + let et = tt.length - 1, + nt = 0 + for (let rt = 0; rt < tt.length / 2; rt++) (nt = tt[rt]), (tt[rt] = tt[et]), (tt[et] = nt), et-- + return tt + } + bufferutils.reverseBuffer = reverseBuffer$1 + function cloneBuffer$1(tt) { + const et = Buffer.allocUnsafe(tt.length) + return tt.copy(et), et + } + bufferutils.cloneBuffer = cloneBuffer$1 + class BufferWriter { + static withCapacity(et) { + return new BufferWriter(Buffer.alloc(et)) + } + constructor(et, nt = 0) { + ;(this.buffer = et), (this.offset = nt), typeforce$2(types$3.tuple(types$3.Buffer, types$3.UInt32), [et, nt]) + } + writeUInt8(et) { + this.offset = this.buffer.writeUInt8(et, this.offset) + } + writeInt32(et) { + this.offset = this.buffer.writeInt32LE(et, this.offset) + } + writeUInt32(et) { + this.offset = this.buffer.writeUInt32LE(et, this.offset) + } + writeUInt64(et) { + this.offset = writeUInt64LE$1(this.buffer, et, this.offset) + } + writeVarInt(et) { + varuint$7.encode(et, this.buffer, this.offset), (this.offset += varuint$7.encode.bytes) + } + writeSlice(et) { + if (this.buffer.length < this.offset + et.length) throw new Error('Cannot write slice out of bounds') + this.offset += et.copy(this.buffer, this.offset) + } + writeVarSlice(et) { + this.writeVarInt(et.length), this.writeSlice(et) + } + writeVector(et) { + this.writeVarInt(et.length), et.forEach((nt) => this.writeVarSlice(nt)) + } + end() { + if (this.buffer.length === this.offset) return this.buffer + throw new Error(`buffer size ${this.buffer.length}, offset ${this.offset}`) + } + } + bufferutils.BufferWriter = BufferWriter + class BufferReader { + constructor(et, nt = 0) { + ;(this.buffer = et), (this.offset = nt), typeforce$2(types$3.tuple(types$3.Buffer, types$3.UInt32), [et, nt]) + } + readUInt8() { + const et = this.buffer.readUInt8(this.offset) + return this.offset++, et + } + readInt32() { + const et = this.buffer.readInt32LE(this.offset) + return (this.offset += 4), et + } + readUInt32() { + const et = this.buffer.readUInt32LE(this.offset) + return (this.offset += 4), et + } + readUInt64() { + const et = readUInt64LE$1(this.buffer, this.offset) + return (this.offset += 8), et + } + readVarInt() { + const et = varuint$7.decode(this.buffer, this.offset) + return (this.offset += varuint$7.decode.bytes), et + } + readSlice(et) { + if (this.buffer.length < this.offset + et) throw new Error('Cannot read slice out of bounds') + const nt = this.buffer.slice(this.offset, this.offset + et) + return (this.offset += et), nt + } + readVarSlice() { + return this.readSlice(this.readVarInt()) + } + readVector() { + const et = this.readVarInt(), + nt = [] + for (let rt = 0; rt < et; rt++) nt.push(this.readVarSlice()) + return nt + } + } + bufferutils.BufferReader = BufferReader + ;(function (tt) { + Object.defineProperty(tt, '__esModule', { value: !0 }), + (tt.tweakKey = + tt.tapTweakHash = + tt.tapleafHash = + tt.findScriptPath = + tt.toHashTree = + tt.rootHashFromPath = + tt.MAX_TAPTREE_DEPTH = + tt.LEAF_VERSION_TAPSCRIPT = + void 0) + const et = buffer$2, + nt = ecc_lib, + rt = crypto$2, + it = bufferutils, + ot = types$6 + ;(tt.LEAF_VERSION_TAPSCRIPT = 192), (tt.MAX_TAPTREE_DEPTH = 128) + const at = (gt) => 'left' in gt && 'right' in gt + function st(gt, yt) { + if (gt.length < 33) + throw new TypeError(`The control-block length is too small. Got ${gt.length}, expected min 33.`) + const bt = (gt.length - 33) / 32 + let vt = yt + for (let xt = 0; xt < bt; xt++) { + const kt = gt.slice(33 + 32 * xt, 65 + 32 * xt) + vt.compare(kt) < 0 ? (vt = pt(vt, kt)) : (vt = pt(kt, vt)) + } + return vt + } + tt.rootHashFromPath = st + function lt(gt) { + if ((0, ot.isTapleaf)(gt)) return { hash: ut(gt) } + const yt = [lt(gt[0]), lt(gt[1])] + yt.sort((xt, kt) => xt.hash.compare(kt.hash)) + const [bt, vt] = yt + return { hash: pt(bt.hash, vt.hash), left: bt, right: vt } + } + tt.toHashTree = lt + function ct(gt, yt) { + if (at(gt)) { + const bt = ct(gt.left, yt) + if (bt !== void 0) return [...bt, gt.right.hash] + const vt = ct(gt.right, yt) + if (vt !== void 0) return [...vt, gt.left.hash] + } else if (gt.hash.equals(yt)) return [] + } + tt.findScriptPath = ct + function ut(gt) { + const yt = gt.version || tt.LEAF_VERSION_TAPSCRIPT + return rt.taggedHash('TapLeaf', et.Buffer.concat([et.Buffer.from([yt]), mt(gt.output)])) + } + tt.tapleafHash = ut + function ht(gt, yt) { + return rt.taggedHash('TapTweak', et.Buffer.concat(yt ? [gt, yt] : [gt])) + } + tt.tapTweakHash = ht + function dt(gt, yt) { + if (!et.Buffer.isBuffer(gt) || gt.length !== 32 || (yt && yt.length !== 32)) return null + const bt = ht(gt, yt), + vt = (0, nt.getEccLib)().xOnlyPointAddTweak(gt, bt) + return !vt || vt.xOnlyPubkey === null ? null : { parity: vt.parity, x: et.Buffer.from(vt.xOnlyPubkey) } + } + tt.tweakKey = dt + function pt(gt, yt) { + return rt.taggedHash('TapBranch', et.Buffer.concat([gt, yt])) + } + function mt(gt) { + const yt = it.varuint.encodingLength(gt.length), + bt = et.Buffer.allocUnsafe(yt) + return it.varuint.encode(gt.length, bt), et.Buffer.concat([bt, gt]) + } + })(bip341) + Object.defineProperty(p2tr$1, '__esModule', { value: !0 }) + p2tr$1.p2tr = void 0 + const buffer_1 = buffer$2, + networks_1$1 = networks$1, + bscript$4 = script, + types_1$2 = types$6, + ecc_lib_1 = ecc_lib, + bip341_1$2 = bip341, + lazy$1 = lazy$9, + bech32_1$1 = dist, + OPS = bscript$4.OPS, + TAPROOT_WITNESS_VERSION = 1, + ANNEX_PREFIX = 80 + function p2tr(tt, et) { + if (!tt.address && !tt.output && !tt.pubkey && !tt.internalPubkey && !(tt.witness && tt.witness.length > 1)) + throw new TypeError('Not enough data') + ;(et = Object.assign({ validate: !0 }, et || {})), + (0, types_1$2.typeforce)( + { + address: types_1$2.typeforce.maybe(types_1$2.typeforce.String), + input: types_1$2.typeforce.maybe(types_1$2.typeforce.BufferN(0)), + network: types_1$2.typeforce.maybe(types_1$2.typeforce.Object), + output: types_1$2.typeforce.maybe(types_1$2.typeforce.BufferN(34)), + internalPubkey: types_1$2.typeforce.maybe(types_1$2.typeforce.BufferN(32)), + hash: types_1$2.typeforce.maybe(types_1$2.typeforce.BufferN(32)), + pubkey: types_1$2.typeforce.maybe(types_1$2.typeforce.BufferN(32)), + signature: types_1$2.typeforce.maybe( + types_1$2.typeforce.anyOf(types_1$2.typeforce.BufferN(64), types_1$2.typeforce.BufferN(65)), + ), + witness: types_1$2.typeforce.maybe(types_1$2.typeforce.arrayOf(types_1$2.typeforce.Buffer)), + scriptTree: types_1$2.typeforce.maybe(types_1$2.isTaptree), + redeem: types_1$2.typeforce.maybe({ + output: types_1$2.typeforce.maybe(types_1$2.typeforce.Buffer), + redeemVersion: types_1$2.typeforce.maybe(types_1$2.typeforce.Number), + witness: types_1$2.typeforce.maybe(types_1$2.typeforce.arrayOf(types_1$2.typeforce.Buffer)), + }), + redeemVersion: types_1$2.typeforce.maybe(types_1$2.typeforce.Number), + }, + tt, + ) + const nt = lazy$1.value(() => { + const st = bech32_1$1.bech32m.decode(tt.address), + lt = st.words.shift(), + ct = bech32_1$1.bech32m.fromWords(st.words) + return { version: lt, prefix: st.prefix, data: buffer_1.Buffer.from(ct) } + }), + rt = lazy$1.value(() => { + if (!(!tt.witness || !tt.witness.length)) + return tt.witness.length >= 2 && tt.witness[tt.witness.length - 1][0] === ANNEX_PREFIX + ? tt.witness.slice(0, -1) + : tt.witness.slice() + }), + it = lazy$1.value(() => { + if (tt.scriptTree) return (0, bip341_1$2.toHashTree)(tt.scriptTree) + if (tt.hash) return { hash: tt.hash } + }), + ot = tt.network || networks_1$1.bitcoin, + at = { name: 'p2tr', network: ot } + if ( + (lazy$1.prop(at, 'address', () => { + if (!at.pubkey) return + const st = bech32_1$1.bech32m.toWords(at.pubkey) + return st.unshift(TAPROOT_WITNESS_VERSION), bech32_1$1.bech32m.encode(ot.bech32, st) + }), + lazy$1.prop(at, 'hash', () => { + const st = it() + if (st) return st.hash + const lt = rt() + if (lt && lt.length > 1) { + const ct = lt[lt.length - 1], + ut = ct[0] & types_1$2.TAPLEAF_VERSION_MASK, + ht = lt[lt.length - 2], + dt = (0, bip341_1$2.tapleafHash)({ output: ht, version: ut }) + return (0, bip341_1$2.rootHashFromPath)(ct, dt) + } + return null + }), + lazy$1.prop(at, 'output', () => { + if (at.pubkey) return bscript$4.compile([OPS.OP_1, at.pubkey]) + }), + lazy$1.prop(at, 'redeemVersion', () => + tt.redeemVersion + ? tt.redeemVersion + : tt.redeem && tt.redeem.redeemVersion !== void 0 && tt.redeem.redeemVersion !== null + ? tt.redeem.redeemVersion + : bip341_1$2.LEAF_VERSION_TAPSCRIPT, + ), + lazy$1.prop(at, 'redeem', () => { + const st = rt() + if (!(!st || st.length < 2)) + return { + output: st[st.length - 2], + witness: st.slice(0, -2), + redeemVersion: st[st.length - 1][0] & types_1$2.TAPLEAF_VERSION_MASK, + } + }), + lazy$1.prop(at, 'pubkey', () => { + if (tt.pubkey) return tt.pubkey + if (tt.output) return tt.output.slice(2) + if (tt.address) return nt().data + if (at.internalPubkey) { + const st = (0, bip341_1$2.tweakKey)(at.internalPubkey, at.hash) + if (st) return st.x + } + }), + lazy$1.prop(at, 'internalPubkey', () => { + if (tt.internalPubkey) return tt.internalPubkey + const st = rt() + if (st && st.length > 1) return st[st.length - 1].slice(1, 33) + }), + lazy$1.prop(at, 'signature', () => { + if (tt.signature) return tt.signature + const st = rt() + if (!(!st || st.length !== 1)) return st[0] + }), + lazy$1.prop(at, 'witness', () => { + if (tt.witness) return tt.witness + const st = it() + if (st && tt.redeem && tt.redeem.output && tt.internalPubkey) { + const lt = (0, bip341_1$2.tapleafHash)({ output: tt.redeem.output, version: at.redeemVersion }), + ct = (0, bip341_1$2.findScriptPath)(st, lt) + if (!ct) return + const ut = (0, bip341_1$2.tweakKey)(tt.internalPubkey, st.hash) + if (!ut) return + const ht = buffer_1.Buffer.concat( + [buffer_1.Buffer.from([at.redeemVersion | ut.parity]), tt.internalPubkey].concat(ct), + ) + return [tt.redeem.output, ht] + } + if (tt.signature) return [tt.signature] + }), + et.validate) + ) { + let st = buffer_1.Buffer.from([]) + if (tt.address) { + if (ot && ot.bech32 !== nt().prefix) throw new TypeError('Invalid prefix or Network mismatch') + if (nt().version !== TAPROOT_WITNESS_VERSION) throw new TypeError('Invalid address version') + if (nt().data.length !== 32) throw new TypeError('Invalid address data') + st = nt().data + } + if (tt.pubkey) { + if (st.length > 0 && !st.equals(tt.pubkey)) throw new TypeError('Pubkey mismatch') + st = tt.pubkey + } + if (tt.output) { + if (tt.output.length !== 34 || tt.output[0] !== OPS.OP_1 || tt.output[1] !== 32) + throw new TypeError('Output is invalid') + if (st.length > 0 && !st.equals(tt.output.slice(2))) throw new TypeError('Pubkey mismatch') + st = tt.output.slice(2) + } + if (tt.internalPubkey) { + const ut = (0, bip341_1$2.tweakKey)(tt.internalPubkey, at.hash) + if (st.length > 0 && !st.equals(ut.x)) throw new TypeError('Pubkey mismatch') + st = ut.x + } + if (st && st.length && !(0, ecc_lib_1.getEccLib)().isXOnlyPoint(st)) + throw new TypeError('Invalid pubkey for p2tr') + const lt = it() + if (tt.hash && lt && !tt.hash.equals(lt.hash)) throw new TypeError('Hash mismatch') + if (tt.redeem && tt.redeem.output && lt) { + const ut = (0, bip341_1$2.tapleafHash)({ output: tt.redeem.output, version: at.redeemVersion }) + if (!(0, bip341_1$2.findScriptPath)(lt, ut)) throw new TypeError('Redeem script not in tree') + } + const ct = rt() + if (tt.redeem && at.redeem) { + if (tt.redeem.redeemVersion && tt.redeem.redeemVersion !== at.redeem.redeemVersion) + throw new TypeError('Redeem.redeemVersion and witness mismatch') + if (tt.redeem.output) { + if (bscript$4.decompile(tt.redeem.output).length === 0) throw new TypeError('Redeem.output is invalid') + if (at.redeem.output && !tt.redeem.output.equals(at.redeem.output)) + throw new TypeError('Redeem.output and witness mismatch') + } + if (tt.redeem.witness && at.redeem.witness && !stacksEqual(tt.redeem.witness, at.redeem.witness)) + throw new TypeError('Redeem.witness and witness mismatch') + } + if (ct && ct.length) + if (ct.length === 1) { + if (tt.signature && !tt.signature.equals(ct[0])) throw new TypeError('Signature mismatch') + } else { + const ut = ct[ct.length - 1] + if (ut.length < 33) + throw new TypeError(`The control-block length is too small. Got ${ut.length}, expected min 33.`) + if ((ut.length - 33) % 32 !== 0) throw new TypeError(`The control-block length of ${ut.length} is incorrect!`) + const ht = (ut.length - 33) / 32 + if (ht > 128) throw new TypeError(`The script path is too long. Got ${ht}, expected max 128.`) + const dt = ut.slice(1, 33) + if (tt.internalPubkey && !tt.internalPubkey.equals(dt)) throw new TypeError('Internal pubkey mismatch') + if (!(0, ecc_lib_1.getEccLib)().isXOnlyPoint(dt)) + throw new TypeError('Invalid internalPubkey for p2tr witness') + const pt = ut[0] & types_1$2.TAPLEAF_VERSION_MASK, + mt = ct[ct.length - 2], + gt = (0, bip341_1$2.tapleafHash)({ output: mt, version: pt }), + yt = (0, bip341_1$2.rootHashFromPath)(ut, gt), + bt = (0, bip341_1$2.tweakKey)(dt, yt) + if (!bt) throw new TypeError('Invalid outputKey for p2tr witness') + if (st.length && !st.equals(bt.x)) throw new TypeError('Pubkey mismatch for p2tr witness') + if (bt.parity !== (ut[0] & 1)) throw new Error('Incorrect parity') + } + } + return Object.assign(at, tt) + } + p2tr$1.p2tr = p2tr + function stacksEqual(tt, et) { + return tt.length !== et.length ? !1 : tt.every((nt, rt) => nt.equals(et[rt])) + } + ;(function (tt) { + Object.defineProperty(tt, '__esModule', { value: !0 }), + (tt.p2tr = tt.p2wsh = tt.p2wpkh = tt.p2sh = tt.p2pkh = tt.p2pk = tt.p2ms = tt.embed = void 0) + const et = embed + Object.defineProperty(tt, 'embed', { + enumerable: !0, + get: function () { + return et.p2data + }, + }) + const nt = p2ms$1 + Object.defineProperty(tt, 'p2ms', { + enumerable: !0, + get: function () { + return nt.p2ms + }, + }) + const rt = p2pk$1 + Object.defineProperty(tt, 'p2pk', { + enumerable: !0, + get: function () { + return rt.p2pk + }, + }) + const it = p2pkh$1 + Object.defineProperty(tt, 'p2pkh', { + enumerable: !0, + get: function () { + return it.p2pkh + }, + }) + const ot = p2sh$1 + Object.defineProperty(tt, 'p2sh', { + enumerable: !0, + get: function () { + return ot.p2sh + }, + }) + const at = p2wpkh$1 + Object.defineProperty(tt, 'p2wpkh', { + enumerable: !0, + get: function () { + return at.p2wpkh + }, + }) + const st = p2wsh$1 + Object.defineProperty(tt, 'p2wsh', { + enumerable: !0, + get: function () { + return st.p2wsh + }, + }) + const lt = p2tr$1 + Object.defineProperty(tt, 'p2tr', { + enumerable: !0, + get: function () { + return lt.p2tr + }, + }) + })(payments$3) + Object.defineProperty(address, '__esModule', { value: !0 }) + address.toOutputScript = + address.fromOutputScript = + address.toBech32 = + address.toBase58Check = + address.fromBech32 = + address.fromBase58Check = + void 0 + const networks = networks$1, + payments$2 = payments$3, + bscript$3 = script, + types_1$1 = types$6, + bech32_1 = dist, + bs58check = bs58check$3, + FUTURE_SEGWIT_MAX_SIZE = 40, + FUTURE_SEGWIT_MIN_SIZE = 2, + FUTURE_SEGWIT_MAX_VERSION = 16, + FUTURE_SEGWIT_MIN_VERSION = 2, + FUTURE_SEGWIT_VERSION_DIFF = 80, + FUTURE_SEGWIT_VERSION_WARNING = + 'WARNING: Sending to a future segwit version address can lead to loss of funds. End users MUST be warned carefully in the GUI and asked if they wish to proceed with caution. Wallets should verify the segwit version from the output of fromBech32, then decide when it is safe to use which version of segwit.' + function _toFutureSegwitAddress(tt, et) { + const nt = tt.slice(2) + if (nt.length < FUTURE_SEGWIT_MIN_SIZE || nt.length > FUTURE_SEGWIT_MAX_SIZE) + throw new TypeError('Invalid program length for segwit address') + const rt = tt[0] - FUTURE_SEGWIT_VERSION_DIFF + if (rt < FUTURE_SEGWIT_MIN_VERSION || rt > FUTURE_SEGWIT_MAX_VERSION) + throw new TypeError('Invalid version for segwit address') + if (tt[1] !== nt.length) throw new TypeError('Invalid script for segwit address') + return console.warn(FUTURE_SEGWIT_VERSION_WARNING), toBech32(nt, rt, et.bech32) + } + function fromBase58Check(tt) { + const et = Buffer.from(bs58check.decode(tt)) + if (et.length < 21) throw new TypeError(tt + ' is too short') + if (et.length > 21) throw new TypeError(tt + ' is too long') + const nt = et.readUInt8(0), + rt = et.slice(1) + return { version: nt, hash: rt } + } + address.fromBase58Check = fromBase58Check + function fromBech32(tt) { + let et, nt + try { + et = bech32_1.bech32.decode(tt) + } catch {} + if (et) { + if (((nt = et.words[0]), nt !== 0)) throw new TypeError(tt + ' uses wrong encoding') + } else if (((et = bech32_1.bech32m.decode(tt)), (nt = et.words[0]), nt === 0)) + throw new TypeError(tt + ' uses wrong encoding') + const rt = bech32_1.bech32.fromWords(et.words.slice(1)) + return { version: nt, prefix: et.prefix, data: Buffer.from(rt) } + } + address.fromBech32 = fromBech32 + function toBase58Check(tt, et) { + ;(0, types_1$1.typeforce)((0, types_1$1.tuple)(types_1$1.Hash160bit, types_1$1.UInt8), arguments) + const nt = Buffer.allocUnsafe(21) + return nt.writeUInt8(et, 0), tt.copy(nt, 1), bs58check.encode(nt) + } + address.toBase58Check = toBase58Check + function toBech32(tt, et, nt) { + const rt = bech32_1.bech32.toWords(tt) + return rt.unshift(et), et === 0 ? bech32_1.bech32.encode(nt, rt) : bech32_1.bech32m.encode(nt, rt) + } + address.toBech32 = toBech32 + function fromOutputScript(tt, et) { + et = et || networks.bitcoin + try { + return payments$2.p2pkh({ output: tt, network: et }).address + } catch {} + try { + return payments$2.p2sh({ output: tt, network: et }).address + } catch {} + try { + return payments$2.p2wpkh({ output: tt, network: et }).address + } catch {} + try { + return payments$2.p2wsh({ output: tt, network: et }).address + } catch {} + try { + return payments$2.p2tr({ output: tt, network: et }).address + } catch {} + try { + return _toFutureSegwitAddress(tt, et) + } catch {} + throw new Error(bscript$3.toASM(tt) + ' has no matching Address') + } + address.fromOutputScript = fromOutputScript + function toOutputScript(tt, et) { + et = et || networks.bitcoin + let nt, rt + try { + nt = fromBase58Check(tt) + } catch {} + if (nt) { + if (nt.version === et.pubKeyHash) return payments$2.p2pkh({ hash: nt.hash }).output + if (nt.version === et.scriptHash) return payments$2.p2sh({ hash: nt.hash }).output + } else { + try { + rt = fromBech32(tt) + } catch {} + if (rt) { + if (rt.prefix !== et.bech32) throw new Error(tt + ' has an invalid prefix') + if (rt.version === 0) { + if (rt.data.length === 20) return payments$2.p2wpkh({ hash: rt.data }).output + if (rt.data.length === 32) return payments$2.p2wsh({ hash: rt.data }).output + } else if (rt.version === 1) { + if (rt.data.length === 32) return payments$2.p2tr({ pubkey: rt.data }).output + } else if ( + rt.version >= FUTURE_SEGWIT_MIN_VERSION && + rt.version <= FUTURE_SEGWIT_MAX_VERSION && + rt.data.length >= FUTURE_SEGWIT_MIN_SIZE && + rt.data.length <= FUTURE_SEGWIT_MAX_SIZE + ) + return ( + console.warn(FUTURE_SEGWIT_VERSION_WARNING), + bscript$3.compile([rt.version + FUTURE_SEGWIT_VERSION_DIFF, rt.data]) + ) + } + } + throw new Error(tt + ' has no matching Script') + } + address.toOutputScript = toOutputScript + var block = {}, + merkle = {} + Object.defineProperty(merkle, '__esModule', { value: !0 }) + merkle.fastMerkleRoot = void 0 + function fastMerkleRoot(tt, et) { + if (!Array.isArray(tt)) throw TypeError('Expected values Array') + if (typeof et != 'function') throw TypeError('Expected digest Function') + let nt = tt.length + const rt = tt.concat() + for (; nt > 1; ) { + let it = 0 + for (let ot = 0; ot < nt; ot += 2, ++it) { + const at = rt[ot], + st = ot + 1 === nt ? at : rt[ot + 1], + lt = Buffer.concat([at, st]) + rt[it] = et(lt) + } + nt = it + } + return rt[0] + } + merkle.fastMerkleRoot = fastMerkleRoot + var transaction = {} + Object.defineProperty(transaction, '__esModule', { value: !0 }) + transaction.Transaction = void 0 + const bufferutils_1$2 = bufferutils, + bcrypto$1 = crypto$2, + bscript$2 = script, + script_1 = script, + types$2 = types$6, + { typeforce: typeforce$1 } = types$2 + function varSliceSize(tt) { + const et = tt.length + return bufferutils_1$2.varuint.encodingLength(et) + et + } + function vectorSize(tt) { + const et = tt.length + return bufferutils_1$2.varuint.encodingLength(et) + tt.reduce((nt, rt) => nt + varSliceSize(rt), 0) + } + const EMPTY_BUFFER = Buffer.allocUnsafe(0), + EMPTY_WITNESS = [], + ZERO = Buffer.from('0000000000000000000000000000000000000000000000000000000000000000', 'hex'), + ONE$1 = Buffer.from('0000000000000000000000000000000000000000000000000000000000000001', 'hex'), + VALUE_UINT64_MAX = Buffer.from('ffffffffffffffff', 'hex'), + BLANK_OUTPUT = { script: EMPTY_BUFFER, valueBuffer: VALUE_UINT64_MAX } + function isOutput(tt) { + return tt.value !== void 0 + } + class Transaction { + constructor() { + ;(this.version = 1), (this.locktime = 0), (this.ins = []), (this.outs = []) + } + static fromBuffer(et, nt) { + const rt = new bufferutils_1$2.BufferReader(et), + it = new Transaction() + it.version = rt.readInt32() + const ot = rt.readUInt8(), + at = rt.readUInt8() + let st = !1 + ot === Transaction.ADVANCED_TRANSACTION_MARKER && at === Transaction.ADVANCED_TRANSACTION_FLAG + ? (st = !0) + : (rt.offset -= 2) + const lt = rt.readVarInt() + for (let ut = 0; ut < lt; ++ut) + it.ins.push({ + hash: rt.readSlice(32), + index: rt.readUInt32(), + script: rt.readVarSlice(), + sequence: rt.readUInt32(), + witness: EMPTY_WITNESS, + }) + const ct = rt.readVarInt() + for (let ut = 0; ut < ct; ++ut) it.outs.push({ value: rt.readUInt64(), script: rt.readVarSlice() }) + if (st) { + for (let ut = 0; ut < lt; ++ut) it.ins[ut].witness = rt.readVector() + if (!it.hasWitnesses()) throw new Error('Transaction has superfluous witness data') + } + if (((it.locktime = rt.readUInt32()), nt)) return it + if (rt.offset !== et.length) throw new Error('Transaction has unexpected data') + return it + } + static fromHex(et) { + return Transaction.fromBuffer(Buffer.from(et, 'hex'), !1) + } + static isCoinbaseHash(et) { + typeforce$1(types$2.Hash256bit, et) + for (let nt = 0; nt < 32; ++nt) if (et[nt] !== 0) return !1 + return !0 + } + isCoinbase() { + return this.ins.length === 1 && Transaction.isCoinbaseHash(this.ins[0].hash) + } + addInput(et, nt, rt, it) { + return ( + typeforce$1( + types$2.tuple( + types$2.Hash256bit, + types$2.UInt32, + types$2.maybe(types$2.UInt32), + types$2.maybe(types$2.Buffer), + ), + arguments, + ), + types$2.Null(rt) && (rt = Transaction.DEFAULT_SEQUENCE), + this.ins.push({ hash: et, index: nt, script: it || EMPTY_BUFFER, sequence: rt, witness: EMPTY_WITNESS }) - 1 + ) + } + addOutput(et, nt) { + return ( + typeforce$1(types$2.tuple(types$2.Buffer, types$2.Satoshi), arguments), + this.outs.push({ script: et, value: nt }) - 1 + ) + } + hasWitnesses() { + return this.ins.some((et) => et.witness.length !== 0) + } + weight() { + const et = this.byteLength(!1), + nt = this.byteLength(!0) + return et * 3 + nt + } + virtualSize() { + return Math.ceil(this.weight() / 4) + } + byteLength(et = !0) { + const nt = et && this.hasWitnesses() + return ( + (nt ? 10 : 8) + + bufferutils_1$2.varuint.encodingLength(this.ins.length) + + bufferutils_1$2.varuint.encodingLength(this.outs.length) + + this.ins.reduce((rt, it) => rt + 40 + varSliceSize(it.script), 0) + + this.outs.reduce((rt, it) => rt + 8 + varSliceSize(it.script), 0) + + (nt ? this.ins.reduce((rt, it) => rt + vectorSize(it.witness), 0) : 0) + ) + } + clone() { + const et = new Transaction() + return ( + (et.version = this.version), + (et.locktime = this.locktime), + (et.ins = this.ins.map((nt) => ({ + hash: nt.hash, + index: nt.index, + script: nt.script, + sequence: nt.sequence, + witness: nt.witness, + }))), + (et.outs = this.outs.map((nt) => ({ script: nt.script, value: nt.value }))), + et + ) + } + hashForSignature(et, nt, rt) { + if ( + (typeforce$1(types$2.tuple(types$2.UInt32, types$2.Buffer, types$2.Number), arguments), et >= this.ins.length) + ) + return ONE$1 + const it = bscript$2.compile(bscript$2.decompile(nt).filter((st) => st !== script_1.OPS.OP_CODESEPARATOR)), + ot = this.clone() + if ((rt & 31) === Transaction.SIGHASH_NONE) + (ot.outs = []), + ot.ins.forEach((st, lt) => { + lt !== et && (st.sequence = 0) + }) + else if ((rt & 31) === Transaction.SIGHASH_SINGLE) { + if (et >= this.outs.length) return ONE$1 + ot.outs.length = et + 1 + for (let st = 0; st < et; st++) ot.outs[st] = BLANK_OUTPUT + ot.ins.forEach((st, lt) => { + lt !== et && (st.sequence = 0) + }) + } + rt & Transaction.SIGHASH_ANYONECANPAY + ? ((ot.ins = [ot.ins[et]]), (ot.ins[0].script = it)) + : (ot.ins.forEach((st) => { + st.script = EMPTY_BUFFER + }), + (ot.ins[et].script = it)) + const at = Buffer.allocUnsafe(ot.byteLength(!1) + 4) + return at.writeInt32LE(rt, at.length - 4), ot.__toBuffer(at, 0, !1), bcrypto$1.hash256(at) + } + hashForWitnessV1(et, nt, rt, it, ot, at) { + if ( + (typeforce$1( + types$2.tuple( + types$2.UInt32, + typeforce$1.arrayOf(types$2.Buffer), + typeforce$1.arrayOf(types$2.Satoshi), + types$2.UInt32, + ), + arguments, + ), + rt.length !== this.ins.length || nt.length !== this.ins.length) + ) + throw new Error('Must supply prevout script and value for all inputs') + const st = it === Transaction.SIGHASH_DEFAULT ? Transaction.SIGHASH_ALL : it & Transaction.SIGHASH_OUTPUT_MASK, + ct = (it & Transaction.SIGHASH_INPUT_MASK) === Transaction.SIGHASH_ANYONECANPAY, + ut = st === Transaction.SIGHASH_NONE, + ht = st === Transaction.SIGHASH_SINGLE + let dt = EMPTY_BUFFER, + pt = EMPTY_BUFFER, + mt = EMPTY_BUFFER, + gt = EMPTY_BUFFER, + yt = EMPTY_BUFFER + if (!ct) { + let kt = bufferutils_1$2.BufferWriter.withCapacity(36 * this.ins.length) + this.ins.forEach((St) => { + kt.writeSlice(St.hash), kt.writeUInt32(St.index) + }), + (dt = bcrypto$1.sha256(kt.end())), + (kt = bufferutils_1$2.BufferWriter.withCapacity(8 * this.ins.length)), + rt.forEach((St) => kt.writeUInt64(St)), + (pt = bcrypto$1.sha256(kt.end())), + (kt = bufferutils_1$2.BufferWriter.withCapacity(nt.map(varSliceSize).reduce((St, Tt) => St + Tt))), + nt.forEach((St) => kt.writeVarSlice(St)), + (mt = bcrypto$1.sha256(kt.end())), + (kt = bufferutils_1$2.BufferWriter.withCapacity(4 * this.ins.length)), + this.ins.forEach((St) => kt.writeUInt32(St.sequence)), + (gt = bcrypto$1.sha256(kt.end())) + } + if (ut || ht) { + if (ht && et < this.outs.length) { + const kt = this.outs[et], + St = bufferutils_1$2.BufferWriter.withCapacity(8 + varSliceSize(kt.script)) + St.writeUInt64(kt.value), St.writeVarSlice(kt.script), (yt = bcrypto$1.sha256(St.end())) + } + } else { + const kt = this.outs.map((Tt) => 8 + varSliceSize(Tt.script)).reduce((Tt, At) => Tt + At), + St = bufferutils_1$2.BufferWriter.withCapacity(kt) + this.outs.forEach((Tt) => { + St.writeUInt64(Tt.value), St.writeVarSlice(Tt.script) + }), + (yt = bcrypto$1.sha256(St.end())) + } + const bt = (ot ? 2 : 0) + (at ? 1 : 0), + vt = 174 - (ct ? 49 : 0) - (ut ? 32 : 0) + (at ? 32 : 0) + (ot ? 37 : 0), + xt = bufferutils_1$2.BufferWriter.withCapacity(vt) + if ( + (xt.writeUInt8(it), + xt.writeInt32(this.version), + xt.writeUInt32(this.locktime), + xt.writeSlice(dt), + xt.writeSlice(pt), + xt.writeSlice(mt), + xt.writeSlice(gt), + ut || ht || xt.writeSlice(yt), + xt.writeUInt8(bt), + ct) + ) { + const kt = this.ins[et] + xt.writeSlice(kt.hash), + xt.writeUInt32(kt.index), + xt.writeUInt64(rt[et]), + xt.writeVarSlice(nt[et]), + xt.writeUInt32(kt.sequence) + } else xt.writeUInt32(et) + if (at) { + const kt = bufferutils_1$2.BufferWriter.withCapacity(varSliceSize(at)) + kt.writeVarSlice(at), xt.writeSlice(bcrypto$1.sha256(kt.end())) + } + return ( + ht && xt.writeSlice(yt), + ot && (xt.writeSlice(ot), xt.writeUInt8(0), xt.writeUInt32(4294967295)), + bcrypto$1.taggedHash('TapSighash', Buffer.concat([Buffer.from([0]), xt.end()])) + ) + } + hashForWitnessV0(et, nt, rt, it) { + typeforce$1(types$2.tuple(types$2.UInt32, types$2.Buffer, types$2.Satoshi, types$2.UInt32), arguments) + let ot = Buffer.from([]), + at, + st = ZERO, + lt = ZERO, + ct = ZERO + if ( + (it & Transaction.SIGHASH_ANYONECANPAY || + ((ot = Buffer.allocUnsafe(36 * this.ins.length)), + (at = new bufferutils_1$2.BufferWriter(ot, 0)), + this.ins.forEach((ht) => { + at.writeSlice(ht.hash), at.writeUInt32(ht.index) + }), + (lt = bcrypto$1.hash256(ot))), + !(it & Transaction.SIGHASH_ANYONECANPAY) && + (it & 31) !== Transaction.SIGHASH_SINGLE && + (it & 31) !== Transaction.SIGHASH_NONE && + ((ot = Buffer.allocUnsafe(4 * this.ins.length)), + (at = new bufferutils_1$2.BufferWriter(ot, 0)), + this.ins.forEach((ht) => { + at.writeUInt32(ht.sequence) + }), + (ct = bcrypto$1.hash256(ot))), + (it & 31) !== Transaction.SIGHASH_SINGLE && (it & 31) !== Transaction.SIGHASH_NONE) + ) { + const ht = this.outs.reduce((dt, pt) => dt + 8 + varSliceSize(pt.script), 0) + ;(ot = Buffer.allocUnsafe(ht)), + (at = new bufferutils_1$2.BufferWriter(ot, 0)), + this.outs.forEach((dt) => { + at.writeUInt64(dt.value), at.writeVarSlice(dt.script) + }), + (st = bcrypto$1.hash256(ot)) + } else if ((it & 31) === Transaction.SIGHASH_SINGLE && et < this.outs.length) { + const ht = this.outs[et] + ;(ot = Buffer.allocUnsafe(8 + varSliceSize(ht.script))), + (at = new bufferutils_1$2.BufferWriter(ot, 0)), + at.writeUInt64(ht.value), + at.writeVarSlice(ht.script), + (st = bcrypto$1.hash256(ot)) + } + ;(ot = Buffer.allocUnsafe(156 + varSliceSize(nt))), (at = new bufferutils_1$2.BufferWriter(ot, 0)) + const ut = this.ins[et] + return ( + at.writeInt32(this.version), + at.writeSlice(lt), + at.writeSlice(ct), + at.writeSlice(ut.hash), + at.writeUInt32(ut.index), + at.writeVarSlice(nt), + at.writeUInt64(rt), + at.writeUInt32(ut.sequence), + at.writeSlice(st), + at.writeUInt32(this.locktime), + at.writeUInt32(it), + bcrypto$1.hash256(ot) + ) + } + getHash(et) { + return et && this.isCoinbase() ? Buffer.alloc(32, 0) : bcrypto$1.hash256(this.__toBuffer(void 0, void 0, et)) + } + getId() { + return (0, bufferutils_1$2.reverseBuffer)(this.getHash(!1)).toString('hex') + } + toBuffer(et, nt) { + return this.__toBuffer(et, nt, !0) + } + toHex() { + return this.toBuffer(void 0, void 0).toString('hex') + } + setInputScript(et, nt) { + typeforce$1(types$2.tuple(types$2.Number, types$2.Buffer), arguments), (this.ins[et].script = nt) + } + setWitness(et, nt) { + typeforce$1(types$2.tuple(types$2.Number, [types$2.Buffer]), arguments), (this.ins[et].witness = nt) + } + __toBuffer(et, nt, rt = !1) { + et || (et = Buffer.allocUnsafe(this.byteLength(rt))) + const it = new bufferutils_1$2.BufferWriter(et, nt || 0) + it.writeInt32(this.version) + const ot = rt && this.hasWitnesses() + return ( + ot && + (it.writeUInt8(Transaction.ADVANCED_TRANSACTION_MARKER), + it.writeUInt8(Transaction.ADVANCED_TRANSACTION_FLAG)), + it.writeVarInt(this.ins.length), + this.ins.forEach((at) => { + it.writeSlice(at.hash), it.writeUInt32(at.index), it.writeVarSlice(at.script), it.writeUInt32(at.sequence) + }), + it.writeVarInt(this.outs.length), + this.outs.forEach((at) => { + isOutput(at) ? it.writeUInt64(at.value) : it.writeSlice(at.valueBuffer), it.writeVarSlice(at.script) + }), + ot && + this.ins.forEach((at) => { + it.writeVector(at.witness) + }), + it.writeUInt32(this.locktime), + nt !== void 0 ? et.slice(nt, it.offset) : et + ) + } + } + transaction.Transaction = Transaction + Transaction.DEFAULT_SEQUENCE = 4294967295 + Transaction.SIGHASH_DEFAULT = 0 + Transaction.SIGHASH_ALL = 1 + Transaction.SIGHASH_NONE = 2 + Transaction.SIGHASH_SINGLE = 3 + Transaction.SIGHASH_ANYONECANPAY = 128 + Transaction.SIGHASH_OUTPUT_MASK = 3 + Transaction.SIGHASH_INPUT_MASK = 128 + Transaction.ADVANCED_TRANSACTION_MARKER = 0 + Transaction.ADVANCED_TRANSACTION_FLAG = 1 + Object.defineProperty(block, '__esModule', { value: !0 }) + block.Block = void 0 + const bufferutils_1$1 = bufferutils, + bcrypto = crypto$2, + merkle_1 = merkle, + transaction_1$3 = transaction, + types$1 = types$6, + { typeforce } = types$1, + errorMerkleNoTxes = new TypeError('Cannot compute merkle root for zero transactions'), + errorWitnessNotSegwit = new TypeError('Cannot compute witness commit for non-segwit block') + let Block$1 = class Hm { + constructor() { + ;(this.version = 1), + (this.prevHash = void 0), + (this.merkleRoot = void 0), + (this.timestamp = 0), + (this.witnessCommit = void 0), + (this.bits = 0), + (this.nonce = 0), + (this.transactions = void 0) + } + static fromBuffer(et) { + if (et.length < 80) throw new Error('Buffer too small (< 80 bytes)') + const nt = new bufferutils_1$1.BufferReader(et), + rt = new Hm() + if ( + ((rt.version = nt.readInt32()), + (rt.prevHash = nt.readSlice(32)), + (rt.merkleRoot = nt.readSlice(32)), + (rt.timestamp = nt.readUInt32()), + (rt.bits = nt.readUInt32()), + (rt.nonce = nt.readUInt32()), + et.length === 80) + ) + return rt + const it = () => { + const st = transaction_1$3.Transaction.fromBuffer(nt.buffer.slice(nt.offset), !0) + return (nt.offset += st.byteLength()), st + }, + ot = nt.readVarInt() + rt.transactions = [] + for (let st = 0; st < ot; ++st) { + const lt = it() + rt.transactions.push(lt) + } + const at = rt.getWitnessCommit() + return at && (rt.witnessCommit = at), rt + } + static fromHex(et) { + return Hm.fromBuffer(Buffer.from(et, 'hex')) + } + static calculateTarget(et) { + const nt = ((et & 4278190080) >> 24) - 3, + rt = et & 8388607, + it = Buffer.alloc(32, 0) + return it.writeUIntBE(rt, 29 - nt, 3), it + } + static calculateMerkleRoot(et, nt) { + if ((typeforce([{ getHash: types$1.Function }], et), et.length === 0)) throw errorMerkleNoTxes + if (nt && !txesHaveWitnessCommit(et)) throw errorWitnessNotSegwit + const rt = et.map((ot) => ot.getHash(nt)), + it = (0, merkle_1.fastMerkleRoot)(rt, bcrypto.hash256) + return nt ? bcrypto.hash256(Buffer.concat([it, et[0].ins[0].witness[0]])) : it + } + getWitnessCommit() { + if (!txesHaveWitnessCommit(this.transactions)) return null + const et = this.transactions[0].outs + .filter((rt) => rt.script.slice(0, 6).equals(Buffer.from('6a24aa21a9ed', 'hex'))) + .map((rt) => rt.script.slice(6, 38)) + if (et.length === 0) return null + const nt = et[et.length - 1] + return nt instanceof Buffer && nt.length === 32 ? nt : null + } + hasWitnessCommit() { + return ( + (this.witnessCommit instanceof Buffer && this.witnessCommit.length === 32) || this.getWitnessCommit() !== null + ) + } + hasWitness() { + return anyTxHasWitness(this.transactions) + } + weight() { + const et = this.byteLength(!1, !1), + nt = this.byteLength(!1, !0) + return et * 3 + nt + } + byteLength(et, nt = !0) { + return et || !this.transactions + ? 80 + : 80 + + bufferutils_1$1.varuint.encodingLength(this.transactions.length) + + this.transactions.reduce((rt, it) => rt + it.byteLength(nt), 0) + } + getHash() { + return bcrypto.hash256(this.toBuffer(!0)) + } + getId() { + return (0, bufferutils_1$1.reverseBuffer)(this.getHash()).toString('hex') + } + getUTCDate() { + const et = new Date(0) + return et.setUTCSeconds(this.timestamp), et + } + toBuffer(et) { + const nt = Buffer.allocUnsafe(this.byteLength(et)), + rt = new bufferutils_1$1.BufferWriter(nt) + return ( + rt.writeInt32(this.version), + rt.writeSlice(this.prevHash), + rt.writeSlice(this.merkleRoot), + rt.writeUInt32(this.timestamp), + rt.writeUInt32(this.bits), + rt.writeUInt32(this.nonce), + et || + !this.transactions || + (bufferutils_1$1.varuint.encode(this.transactions.length, nt, rt.offset), + (rt.offset += bufferutils_1$1.varuint.encode.bytes), + this.transactions.forEach((it) => { + const ot = it.byteLength() + it.toBuffer(nt, rt.offset), (rt.offset += ot) + })), + nt + ) + } + toHex(et) { + return this.toBuffer(et).toString('hex') + } + checkTxRoots() { + const et = this.hasWitnessCommit() + return !et && this.hasWitness() ? !1 : this.__checkMerkleRoot() && (et ? this.__checkWitnessCommit() : !0) + } + checkProofOfWork() { + const et = (0, bufferutils_1$1.reverseBuffer)(this.getHash()), + nt = Hm.calculateTarget(this.bits) + return et.compare(nt) <= 0 + } + __checkMerkleRoot() { + if (!this.transactions) throw errorMerkleNoTxes + const et = Hm.calculateMerkleRoot(this.transactions) + return this.merkleRoot.compare(et) === 0 + } + __checkWitnessCommit() { + if (!this.transactions) throw errorMerkleNoTxes + if (!this.hasWitnessCommit()) throw errorWitnessNotSegwit + const et = Hm.calculateMerkleRoot(this.transactions, !0) + return this.witnessCommit.compare(et) === 0 + } + } + block.Block = Block$1 + function txesHaveWitnessCommit(tt) { + return ( + tt instanceof Array && + tt[0] && + tt[0].ins && + tt[0].ins instanceof Array && + tt[0].ins[0] && + tt[0].ins[0].witness && + tt[0].ins[0].witness instanceof Array && + tt[0].ins[0].witness.length > 0 + ) + } + function anyTxHasWitness(tt) { + return ( + tt instanceof Array && + tt.some( + (et) => + typeof et == 'object' && + et.ins instanceof Array && + et.ins.some((nt) => typeof nt == 'object' && nt.witness instanceof Array && nt.witness.length > 0), + ) + ) + } + var psbt$1 = {}, + psbt = {}, + combiner = {}, + parser$1 = {}, + fromBuffer = {}, + converter = {}, + typeFields = {} + ;(function (tt) { + Object.defineProperty(tt, '__esModule', { value: !0 }), + (function (et) { + ;(et[(et.UNSIGNED_TX = 0)] = 'UNSIGNED_TX'), (et[(et.GLOBAL_XPUB = 1)] = 'GLOBAL_XPUB') + })(tt.GlobalTypes || (tt.GlobalTypes = {})), + (tt.GLOBAL_TYPE_NAMES = ['unsignedTx', 'globalXpub']), + (function (et) { + ;(et[(et.NON_WITNESS_UTXO = 0)] = 'NON_WITNESS_UTXO'), + (et[(et.WITNESS_UTXO = 1)] = 'WITNESS_UTXO'), + (et[(et.PARTIAL_SIG = 2)] = 'PARTIAL_SIG'), + (et[(et.SIGHASH_TYPE = 3)] = 'SIGHASH_TYPE'), + (et[(et.REDEEM_SCRIPT = 4)] = 'REDEEM_SCRIPT'), + (et[(et.WITNESS_SCRIPT = 5)] = 'WITNESS_SCRIPT'), + (et[(et.BIP32_DERIVATION = 6)] = 'BIP32_DERIVATION'), + (et[(et.FINAL_SCRIPTSIG = 7)] = 'FINAL_SCRIPTSIG'), + (et[(et.FINAL_SCRIPTWITNESS = 8)] = 'FINAL_SCRIPTWITNESS'), + (et[(et.POR_COMMITMENT = 9)] = 'POR_COMMITMENT'), + (et[(et.TAP_KEY_SIG = 19)] = 'TAP_KEY_SIG'), + (et[(et.TAP_SCRIPT_SIG = 20)] = 'TAP_SCRIPT_SIG'), + (et[(et.TAP_LEAF_SCRIPT = 21)] = 'TAP_LEAF_SCRIPT'), + (et[(et.TAP_BIP32_DERIVATION = 22)] = 'TAP_BIP32_DERIVATION'), + (et[(et.TAP_INTERNAL_KEY = 23)] = 'TAP_INTERNAL_KEY'), + (et[(et.TAP_MERKLE_ROOT = 24)] = 'TAP_MERKLE_ROOT') + })(tt.InputTypes || (tt.InputTypes = {})), + (tt.INPUT_TYPE_NAMES = [ + 'nonWitnessUtxo', + 'witnessUtxo', + 'partialSig', + 'sighashType', + 'redeemScript', + 'witnessScript', + 'bip32Derivation', + 'finalScriptSig', + 'finalScriptWitness', + 'porCommitment', + 'tapKeySig', + 'tapScriptSig', + 'tapLeafScript', + 'tapBip32Derivation', + 'tapInternalKey', + 'tapMerkleRoot', + ]), + (function (et) { + ;(et[(et.REDEEM_SCRIPT = 0)] = 'REDEEM_SCRIPT'), + (et[(et.WITNESS_SCRIPT = 1)] = 'WITNESS_SCRIPT'), + (et[(et.BIP32_DERIVATION = 2)] = 'BIP32_DERIVATION'), + (et[(et.TAP_INTERNAL_KEY = 5)] = 'TAP_INTERNAL_KEY'), + (et[(et.TAP_TREE = 6)] = 'TAP_TREE'), + (et[(et.TAP_BIP32_DERIVATION = 7)] = 'TAP_BIP32_DERIVATION') + })(tt.OutputTypes || (tt.OutputTypes = {})), + (tt.OUTPUT_TYPE_NAMES = [ + 'redeemScript', + 'witnessScript', + 'bip32Derivation', + 'tapInternalKey', + 'tapTree', + 'tapBip32Derivation', + ]) + })(typeFields) + var globalXpub$1 = {} + Object.defineProperty(globalXpub$1, '__esModule', { value: !0 }) + const typeFields_1$g = typeFields, + range$6 = (tt) => [...Array(tt).keys()] + function decode$h(tt) { + if (tt.key[0] !== typeFields_1$g.GlobalTypes.GLOBAL_XPUB) + throw new Error('Decode Error: could not decode globalXpub with key 0x' + tt.key.toString('hex')) + if (tt.key.length !== 79 || ![2, 3].includes(tt.key[46])) + throw new Error('Decode Error: globalXpub has invalid extended pubkey in key 0x' + tt.key.toString('hex')) + if ((tt.value.length / 4) % 1 !== 0) + throw new Error('Decode Error: Global GLOBAL_XPUB value length should be multiple of 4') + const et = tt.key.slice(1), + nt = { masterFingerprint: tt.value.slice(0, 4), extendedPubkey: et, path: 'm' } + for (const rt of range$6(tt.value.length / 4 - 1)) { + const it = tt.value.readUInt32LE(rt * 4 + 4), + ot = !!(it & 2147483648), + at = it & 2147483647 + nt.path += '/' + at.toString(10) + (ot ? "'" : '') + } + return nt + } + globalXpub$1.decode = decode$h + function encode$i(tt) { + const et = Buffer.from([typeFields_1$g.GlobalTypes.GLOBAL_XPUB]), + nt = Buffer.concat([et, tt.extendedPubkey]), + rt = tt.path.split('/'), + it = Buffer.allocUnsafe(rt.length * 4) + tt.masterFingerprint.copy(it, 0) + let ot = 4 + return ( + rt.slice(1).forEach((at) => { + const st = at.slice(-1) === "'" + let lt = 2147483647 & parseInt(st ? at.slice(0, -1) : at, 10) + st && (lt += 2147483648), it.writeUInt32LE(lt, ot), (ot += 4) + }), + { key: nt, value: it } + ) + } + globalXpub$1.encode = encode$i + globalXpub$1.expected = '{ masterFingerprint: Buffer; extendedPubkey: Buffer; path: string; }' + function check$c(tt) { + const et = tt.extendedPubkey, + nt = tt.masterFingerprint, + rt = tt.path + return ( + Buffer.isBuffer(et) && + et.length === 78 && + [2, 3].indexOf(et[45]) > -1 && + Buffer.isBuffer(nt) && + nt.length === 4 && + typeof rt == 'string' && + !!rt.match(/^m(\/\d+'?)*$/) + ) + } + globalXpub$1.check = check$c + function canAddToArray$3(tt, et, nt) { + const rt = et.extendedPubkey.toString('hex') + return nt.has(rt) ? !1 : (nt.add(rt), tt.filter((it) => it.extendedPubkey.equals(et.extendedPubkey)).length === 0) + } + globalXpub$1.canAddToArray = canAddToArray$3 + var unsignedTx$1 = {} + Object.defineProperty(unsignedTx$1, '__esModule', { value: !0 }) + const typeFields_1$f = typeFields + function encode$h(tt) { + return { key: Buffer.from([typeFields_1$f.GlobalTypes.UNSIGNED_TX]), value: tt.toBuffer() } + } + unsignedTx$1.encode = encode$h + var finalScriptSig$1 = {} + Object.defineProperty(finalScriptSig$1, '__esModule', { value: !0 }) + const typeFields_1$e = typeFields + function decode$g(tt) { + if (tt.key[0] !== typeFields_1$e.InputTypes.FINAL_SCRIPTSIG) + throw new Error('Decode Error: could not decode finalScriptSig with key 0x' + tt.key.toString('hex')) + return tt.value + } + finalScriptSig$1.decode = decode$g + function encode$g(tt) { + return { key: Buffer.from([typeFields_1$e.InputTypes.FINAL_SCRIPTSIG]), value: tt } + } + finalScriptSig$1.encode = encode$g + finalScriptSig$1.expected = 'Buffer' + function check$b(tt) { + return Buffer.isBuffer(tt) + } + finalScriptSig$1.check = check$b + function canAdd$8(tt, et) { + return !!tt && !!et && tt.finalScriptSig === void 0 + } + finalScriptSig$1.canAdd = canAdd$8 + var finalScriptWitness$1 = {} + Object.defineProperty(finalScriptWitness$1, '__esModule', { value: !0 }) + const typeFields_1$d = typeFields + function decode$f(tt) { + if (tt.key[0] !== typeFields_1$d.InputTypes.FINAL_SCRIPTWITNESS) + throw new Error('Decode Error: could not decode finalScriptWitness with key 0x' + tt.key.toString('hex')) + return tt.value + } + finalScriptWitness$1.decode = decode$f + function encode$f(tt) { + return { key: Buffer.from([typeFields_1$d.InputTypes.FINAL_SCRIPTWITNESS]), value: tt } + } + finalScriptWitness$1.encode = encode$f + finalScriptWitness$1.expected = 'Buffer' + function check$a(tt) { + return Buffer.isBuffer(tt) + } + finalScriptWitness$1.check = check$a + function canAdd$7(tt, et) { + return !!tt && !!et && tt.finalScriptWitness === void 0 + } + finalScriptWitness$1.canAdd = canAdd$7 + var nonWitnessUtxo$1 = {} + Object.defineProperty(nonWitnessUtxo$1, '__esModule', { value: !0 }) + const typeFields_1$c = typeFields + function decode$e(tt) { + if (tt.key[0] !== typeFields_1$c.InputTypes.NON_WITNESS_UTXO) + throw new Error('Decode Error: could not decode nonWitnessUtxo with key 0x' + tt.key.toString('hex')) + return tt.value + } + nonWitnessUtxo$1.decode = decode$e + function encode$e(tt) { + return { key: Buffer.from([typeFields_1$c.InputTypes.NON_WITNESS_UTXO]), value: tt } + } + nonWitnessUtxo$1.encode = encode$e + nonWitnessUtxo$1.expected = 'Buffer' + function check$9(tt) { + return Buffer.isBuffer(tt) + } + nonWitnessUtxo$1.check = check$9 + function canAdd$6(tt, et) { + return !!tt && !!et && tt.nonWitnessUtxo === void 0 + } + nonWitnessUtxo$1.canAdd = canAdd$6 + var partialSig$1 = {} + Object.defineProperty(partialSig$1, '__esModule', { value: !0 }) + const typeFields_1$b = typeFields + function decode$d(tt) { + if (tt.key[0] !== typeFields_1$b.InputTypes.PARTIAL_SIG) + throw new Error('Decode Error: could not decode partialSig with key 0x' + tt.key.toString('hex')) + if (!(tt.key.length === 34 || tt.key.length === 66) || ![2, 3, 4].includes(tt.key[1])) + throw new Error('Decode Error: partialSig has invalid pubkey in key 0x' + tt.key.toString('hex')) + return { pubkey: tt.key.slice(1), signature: tt.value } + } + partialSig$1.decode = decode$d + function encode$d(tt) { + const et = Buffer.from([typeFields_1$b.InputTypes.PARTIAL_SIG]) + return { key: Buffer.concat([et, tt.pubkey]), value: tt.signature } + } + partialSig$1.encode = encode$d + partialSig$1.expected = '{ pubkey: Buffer; signature: Buffer; }' + function check$8(tt) { + return ( + Buffer.isBuffer(tt.pubkey) && + Buffer.isBuffer(tt.signature) && + [33, 65].includes(tt.pubkey.length) && + [2, 3, 4].includes(tt.pubkey[0]) && + isDerSigWithSighash(tt.signature) + ) + } + partialSig$1.check = check$8 + function isDerSigWithSighash(tt) { + if (!Buffer.isBuffer(tt) || tt.length < 9 || tt[0] !== 48 || tt.length !== tt[1] + 3 || tt[2] !== 2) return !1 + const et = tt[3] + if (et > 33 || et < 1 || tt[3 + et + 1] !== 2) return !1 + const nt = tt[3 + et + 2] + return !(nt > 33 || nt < 1 || tt.length !== 3 + et + 2 + nt + 2) + } + function canAddToArray$2(tt, et, nt) { + const rt = et.pubkey.toString('hex') + return nt.has(rt) ? !1 : (nt.add(rt), tt.filter((it) => it.pubkey.equals(et.pubkey)).length === 0) + } + partialSig$1.canAddToArray = canAddToArray$2 + var porCommitment$1 = {} + Object.defineProperty(porCommitment$1, '__esModule', { value: !0 }) + const typeFields_1$a = typeFields + function decode$c(tt) { + if (tt.key[0] !== typeFields_1$a.InputTypes.POR_COMMITMENT) + throw new Error('Decode Error: could not decode porCommitment with key 0x' + tt.key.toString('hex')) + return tt.value.toString('utf8') + } + porCommitment$1.decode = decode$c + function encode$c(tt) { + return { key: Buffer.from([typeFields_1$a.InputTypes.POR_COMMITMENT]), value: Buffer.from(tt, 'utf8') } + } + porCommitment$1.encode = encode$c + porCommitment$1.expected = 'string' + function check$7(tt) { + return typeof tt == 'string' + } + porCommitment$1.check = check$7 + function canAdd$5(tt, et) { + return !!tt && !!et && tt.porCommitment === void 0 + } + porCommitment$1.canAdd = canAdd$5 + var sighashType$1 = {} + Object.defineProperty(sighashType$1, '__esModule', { value: !0 }) + const typeFields_1$9 = typeFields + function decode$b(tt) { + if (tt.key[0] !== typeFields_1$9.InputTypes.SIGHASH_TYPE) + throw new Error('Decode Error: could not decode sighashType with key 0x' + tt.key.toString('hex')) + return tt.value.readUInt32LE(0) + } + sighashType$1.decode = decode$b + function encode$b(tt) { + const et = Buffer.from([typeFields_1$9.InputTypes.SIGHASH_TYPE]), + nt = Buffer.allocUnsafe(4) + return nt.writeUInt32LE(tt, 0), { key: et, value: nt } + } + sighashType$1.encode = encode$b + sighashType$1.expected = 'number' + function check$6(tt) { + return typeof tt == 'number' + } + sighashType$1.check = check$6 + function canAdd$4(tt, et) { + return !!tt && !!et && tt.sighashType === void 0 + } + sighashType$1.canAdd = canAdd$4 + var tapKeySig$1 = {} + Object.defineProperty(tapKeySig$1, '__esModule', { value: !0 }) + const typeFields_1$8 = typeFields + function decode$a(tt) { + if (tt.key[0] !== typeFields_1$8.InputTypes.TAP_KEY_SIG || tt.key.length !== 1) + throw new Error('Decode Error: could not decode tapKeySig with key 0x' + tt.key.toString('hex')) + if (!check$5(tt.value)) throw new Error('Decode Error: tapKeySig not a valid 64-65-byte BIP340 signature') + return tt.value + } + tapKeySig$1.decode = decode$a + function encode$a(tt) { + return { key: Buffer.from([typeFields_1$8.InputTypes.TAP_KEY_SIG]), value: tt } + } + tapKeySig$1.encode = encode$a + tapKeySig$1.expected = 'Buffer' + function check$5(tt) { + return Buffer.isBuffer(tt) && (tt.length === 64 || tt.length === 65) + } + tapKeySig$1.check = check$5 + function canAdd$3(tt, et) { + return !!tt && !!et && tt.tapKeySig === void 0 + } + tapKeySig$1.canAdd = canAdd$3 + var tapLeafScript$1 = {} + Object.defineProperty(tapLeafScript$1, '__esModule', { value: !0 }) + const typeFields_1$7 = typeFields + function decode$9(tt) { + if (tt.key[0] !== typeFields_1$7.InputTypes.TAP_LEAF_SCRIPT) + throw new Error('Decode Error: could not decode tapLeafScript with key 0x' + tt.key.toString('hex')) + if ((tt.key.length - 2) % 32 !== 0) + throw new Error('Decode Error: tapLeafScript has invalid control block in key 0x' + tt.key.toString('hex')) + const et = tt.value[tt.value.length - 1] + if ((tt.key[1] & 254) !== et) + throw new Error('Decode Error: tapLeafScript bad leaf version in key 0x' + tt.key.toString('hex')) + const nt = tt.value.slice(0, -1) + return { controlBlock: tt.key.slice(1), script: nt, leafVersion: et } + } + tapLeafScript$1.decode = decode$9 + function encode$9(tt) { + const et = Buffer.from([typeFields_1$7.InputTypes.TAP_LEAF_SCRIPT]), + nt = Buffer.from([tt.leafVersion]) + return { key: Buffer.concat([et, tt.controlBlock]), value: Buffer.concat([tt.script, nt]) } + } + tapLeafScript$1.encode = encode$9 + tapLeafScript$1.expected = '{ controlBlock: Buffer; leafVersion: number, script: Buffer; }' + function check$4(tt) { + return ( + Buffer.isBuffer(tt.controlBlock) && + (tt.controlBlock.length - 1) % 32 === 0 && + (tt.controlBlock[0] & 254) === tt.leafVersion && + Buffer.isBuffer(tt.script) + ) + } + tapLeafScript$1.check = check$4 + function canAddToArray$1(tt, et, nt) { + const rt = et.controlBlock.toString('hex') + return nt.has(rt) ? !1 : (nt.add(rt), tt.filter((it) => it.controlBlock.equals(et.controlBlock)).length === 0) + } + tapLeafScript$1.canAddToArray = canAddToArray$1 + var tapMerkleRoot$1 = {} + Object.defineProperty(tapMerkleRoot$1, '__esModule', { value: !0 }) + const typeFields_1$6 = typeFields + function decode$8(tt) { + if (tt.key[0] !== typeFields_1$6.InputTypes.TAP_MERKLE_ROOT || tt.key.length !== 1) + throw new Error('Decode Error: could not decode tapMerkleRoot with key 0x' + tt.key.toString('hex')) + if (!check$3(tt.value)) throw new Error('Decode Error: tapMerkleRoot not a 32-byte hash') + return tt.value + } + tapMerkleRoot$1.decode = decode$8 + function encode$8(tt) { + return { key: Buffer.from([typeFields_1$6.InputTypes.TAP_MERKLE_ROOT]), value: tt } + } + tapMerkleRoot$1.encode = encode$8 + tapMerkleRoot$1.expected = 'Buffer' + function check$3(tt) { + return Buffer.isBuffer(tt) && tt.length === 32 + } + tapMerkleRoot$1.check = check$3 + function canAdd$2(tt, et) { + return !!tt && !!et && tt.tapMerkleRoot === void 0 + } + tapMerkleRoot$1.canAdd = canAdd$2 + var tapScriptSig$1 = {} + Object.defineProperty(tapScriptSig$1, '__esModule', { value: !0 }) + const typeFields_1$5 = typeFields + function decode$7(tt) { + if (tt.key[0] !== typeFields_1$5.InputTypes.TAP_SCRIPT_SIG) + throw new Error('Decode Error: could not decode tapScriptSig with key 0x' + tt.key.toString('hex')) + if (tt.key.length !== 65) throw new Error('Decode Error: tapScriptSig has invalid key 0x' + tt.key.toString('hex')) + if (tt.value.length !== 64 && tt.value.length !== 65) + throw new Error('Decode Error: tapScriptSig has invalid signature in key 0x' + tt.key.toString('hex')) + const et = tt.key.slice(1, 33), + nt = tt.key.slice(33) + return { pubkey: et, leafHash: nt, signature: tt.value } + } + tapScriptSig$1.decode = decode$7 + function encode$7(tt) { + const et = Buffer.from([typeFields_1$5.InputTypes.TAP_SCRIPT_SIG]) + return { key: Buffer.concat([et, tt.pubkey, tt.leafHash]), value: tt.signature } + } + tapScriptSig$1.encode = encode$7 + tapScriptSig$1.expected = '{ pubkey: Buffer; leafHash: Buffer; signature: Buffer; }' + function check$2(tt) { + return ( + Buffer.isBuffer(tt.pubkey) && + Buffer.isBuffer(tt.leafHash) && + Buffer.isBuffer(tt.signature) && + tt.pubkey.length === 32 && + tt.leafHash.length === 32 && + (tt.signature.length === 64 || tt.signature.length === 65) + ) + } + tapScriptSig$1.check = check$2 + function canAddToArray(tt, et, nt) { + const rt = et.pubkey.toString('hex') + et.leafHash.toString('hex') + return nt.has(rt) + ? !1 + : (nt.add(rt), tt.filter((it) => it.pubkey.equals(et.pubkey) && it.leafHash.equals(et.leafHash)).length === 0) + } + tapScriptSig$1.canAddToArray = canAddToArray + var witnessUtxo$1 = {}, + tools = {}, + varint = {} + Object.defineProperty(varint, '__esModule', { value: !0 }) + const MAX_SAFE_INTEGER$3 = 9007199254740991 + function checkUInt53(tt) { + if (tt < 0 || tt > MAX_SAFE_INTEGER$3 || tt % 1 !== 0) throw new RangeError('value out of range') + } + function encode$6(tt, et, nt) { + if ((checkUInt53(tt), et || (et = Buffer.allocUnsafe(encodingLength(tt))), !Buffer.isBuffer(et))) + throw new TypeError('buffer must be a Buffer instance') + return ( + nt || (nt = 0), + tt < 253 + ? (et.writeUInt8(tt, nt), Object.assign(encode$6, { bytes: 1 })) + : tt <= 65535 + ? (et.writeUInt8(253, nt), et.writeUInt16LE(tt, nt + 1), Object.assign(encode$6, { bytes: 3 })) + : tt <= 4294967295 + ? (et.writeUInt8(254, nt), et.writeUInt32LE(tt, nt + 1), Object.assign(encode$6, { bytes: 5 })) + : (et.writeUInt8(255, nt), + et.writeUInt32LE(tt >>> 0, nt + 1), + et.writeUInt32LE((tt / 4294967296) | 0, nt + 5), + Object.assign(encode$6, { bytes: 9 })), + et + ) + } + varint.encode = encode$6 + function decode$6(tt, et) { + if (!Buffer.isBuffer(tt)) throw new TypeError('buffer must be a Buffer instance') + et || (et = 0) + const nt = tt.readUInt8(et) + if (nt < 253) return Object.assign(decode$6, { bytes: 1 }), nt + if (nt === 253) return Object.assign(decode$6, { bytes: 3 }), tt.readUInt16LE(et + 1) + if (nt === 254) return Object.assign(decode$6, { bytes: 5 }), tt.readUInt32LE(et + 1) + { + Object.assign(decode$6, { bytes: 9 }) + const rt = tt.readUInt32LE(et + 1), + ot = tt.readUInt32LE(et + 5) * 4294967296 + rt + return checkUInt53(ot), ot + } + } + varint.decode = decode$6 + function encodingLength(tt) { + return checkUInt53(tt), tt < 253 ? 1 : tt <= 65535 ? 3 : tt <= 4294967295 ? 5 : 9 + } + varint.encodingLength = encodingLength + Object.defineProperty(tools, '__esModule', { value: !0 }) + const varuint$6 = varint + tools.range = (tt) => [...Array(tt).keys()] + function reverseBuffer(tt) { + if (tt.length < 1) return tt + let et = tt.length - 1, + nt = 0 + for (let rt = 0; rt < tt.length / 2; rt++) (nt = tt[rt]), (tt[rt] = tt[et]), (tt[et] = nt), et-- + return tt + } + tools.reverseBuffer = reverseBuffer + function keyValsToBuffer(tt) { + const et = tt.map(keyValToBuffer) + return et.push(Buffer.from([0])), Buffer.concat(et) + } + tools.keyValsToBuffer = keyValsToBuffer + function keyValToBuffer(tt) { + const et = tt.key.length, + nt = tt.value.length, + rt = varuint$6.encodingLength(et), + it = varuint$6.encodingLength(nt), + ot = Buffer.allocUnsafe(rt + et + it + nt) + return ( + varuint$6.encode(et, ot, 0), + tt.key.copy(ot, rt), + varuint$6.encode(nt, ot, rt + et), + tt.value.copy(ot, rt + et + it), + ot + ) + } + tools.keyValToBuffer = keyValToBuffer + function verifuint(tt, et) { + if (typeof tt != 'number') throw new Error('cannot write a non-number as a number') + if (tt < 0) throw new Error('specified a negative value for writing an unsigned value') + if (tt > et) throw new Error('RangeError: value out of range') + if (Math.floor(tt) !== tt) throw new Error('value has a fractional component') + } + function readUInt64LE(tt, et) { + const nt = tt.readUInt32LE(et) + let rt = tt.readUInt32LE(et + 4) + return (rt *= 4294967296), verifuint(rt + nt, 9007199254740991), rt + nt + } + tools.readUInt64LE = readUInt64LE + function writeUInt64LE(tt, et, nt) { + return ( + verifuint(et, 9007199254740991), + tt.writeInt32LE(et & -1, nt), + tt.writeUInt32LE(Math.floor(et / 4294967296), nt + 4), + nt + 8 + ) + } + tools.writeUInt64LE = writeUInt64LE + Object.defineProperty(witnessUtxo$1, '__esModule', { value: !0 }) + const typeFields_1$4 = typeFields, + tools_1$2 = tools, + varuint$5 = varint + function decode$5(tt) { + if (tt.key[0] !== typeFields_1$4.InputTypes.WITNESS_UTXO) + throw new Error('Decode Error: could not decode witnessUtxo with key 0x' + tt.key.toString('hex')) + const et = tools_1$2.readUInt64LE(tt.value, 0) + let nt = 8 + const rt = varuint$5.decode(tt.value, nt) + nt += varuint$5.encodingLength(rt) + const it = tt.value.slice(nt) + if (it.length !== rt) throw new Error('Decode Error: WITNESS_UTXO script is not proper length') + return { script: it, value: et } + } + witnessUtxo$1.decode = decode$5 + function encode$5(tt) { + const { script: et, value: nt } = tt, + rt = varuint$5.encodingLength(et.length), + it = Buffer.allocUnsafe(8 + rt + et.length) + return ( + tools_1$2.writeUInt64LE(it, nt, 0), + varuint$5.encode(et.length, it, 8), + et.copy(it, 8 + rt), + { key: Buffer.from([typeFields_1$4.InputTypes.WITNESS_UTXO]), value: it } + ) + } + witnessUtxo$1.encode = encode$5 + witnessUtxo$1.expected = '{ script: Buffer; value: number; }' + function check$1(tt) { + return Buffer.isBuffer(tt.script) && typeof tt.value == 'number' + } + witnessUtxo$1.check = check$1 + function canAdd$1(tt, et) { + return !!tt && !!et && tt.witnessUtxo === void 0 + } + witnessUtxo$1.canAdd = canAdd$1 + var tapTree$1 = {} + Object.defineProperty(tapTree$1, '__esModule', { value: !0 }) + const typeFields_1$3 = typeFields, + varuint$4 = varint + function decode$4(tt) { + if (tt.key[0] !== typeFields_1$3.OutputTypes.TAP_TREE || tt.key.length !== 1) + throw new Error('Decode Error: could not decode tapTree with key 0x' + tt.key.toString('hex')) + let et = 0 + const nt = [] + for (; et < tt.value.length; ) { + const rt = tt.value[et++], + it = tt.value[et++], + ot = varuint$4.decode(tt.value, et) + ;(et += varuint$4.encodingLength(ot)), + nt.push({ depth: rt, leafVersion: it, script: tt.value.slice(et, et + ot) }), + (et += ot) + } + return { leaves: nt } + } + tapTree$1.decode = decode$4 + function encode$4(tt) { + const et = Buffer.from([typeFields_1$3.OutputTypes.TAP_TREE]), + nt = [].concat( + ...tt.leaves.map((rt) => [Buffer.of(rt.depth, rt.leafVersion), varuint$4.encode(rt.script.length), rt.script]), + ) + return { key: et, value: Buffer.concat(nt) } + } + tapTree$1.encode = encode$4 + tapTree$1.expected = '{ leaves: [{ depth: number; leafVersion: number, script: Buffer; }] }' + function check(tt) { + return ( + Array.isArray(tt.leaves) && + tt.leaves.every( + (et) => + et.depth >= 0 && et.depth <= 128 && (et.leafVersion & 254) === et.leafVersion && Buffer.isBuffer(et.script), + ) + ) + } + tapTree$1.check = check + function canAdd(tt, et) { + return !!tt && !!et && tt.tapTree === void 0 + } + tapTree$1.canAdd = canAdd + var bip32Derivation$2 = {} + Object.defineProperty(bip32Derivation$2, '__esModule', { value: !0 }) + const range$5 = (tt) => [...Array(tt).keys()], + isValidDERKey = (tt) => (tt.length === 33 && [2, 3].includes(tt[0])) || (tt.length === 65 && tt[0] === 4) + function makeConverter$4(tt, et = isValidDERKey) { + function nt(st) { + if (st.key[0] !== tt) + throw new Error('Decode Error: could not decode bip32Derivation with key 0x' + st.key.toString('hex')) + const lt = st.key.slice(1) + if (!et(lt)) + throw new Error('Decode Error: bip32Derivation has invalid pubkey in key 0x' + st.key.toString('hex')) + if ((st.value.length / 4) % 1 !== 0) + throw new Error('Decode Error: Input BIP32_DERIVATION value length should be multiple of 4') + const ct = { masterFingerprint: st.value.slice(0, 4), pubkey: lt, path: 'm' } + for (const ut of range$5(st.value.length / 4 - 1)) { + const ht = st.value.readUInt32LE(ut * 4 + 4), + dt = !!(ht & 2147483648), + pt = ht & 2147483647 + ct.path += '/' + pt.toString(10) + (dt ? "'" : '') + } + return ct + } + function rt(st) { + const lt = Buffer.from([tt]), + ct = Buffer.concat([lt, st.pubkey]), + ut = st.path.split('/'), + ht = Buffer.allocUnsafe(ut.length * 4) + st.masterFingerprint.copy(ht, 0) + let dt = 4 + return ( + ut.slice(1).forEach((pt) => { + const mt = pt.slice(-1) === "'" + let gt = 2147483647 & parseInt(mt ? pt.slice(0, -1) : pt, 10) + mt && (gt += 2147483648), ht.writeUInt32LE(gt, dt), (dt += 4) + }), + { key: ct, value: ht } + ) + } + const it = '{ masterFingerprint: Buffer; pubkey: Buffer; path: string; }' + function ot(st) { + return ( + Buffer.isBuffer(st.pubkey) && + Buffer.isBuffer(st.masterFingerprint) && + typeof st.path == 'string' && + et(st.pubkey) && + st.masterFingerprint.length === 4 + ) + } + function at(st, lt, ct) { + const ut = lt.pubkey.toString('hex') + return ct.has(ut) ? !1 : (ct.add(ut), st.filter((ht) => ht.pubkey.equals(lt.pubkey)).length === 0) + } + return { decode: nt, encode: rt, check: ot, expected: it, canAddToArray: at } + } + bip32Derivation$2.makeConverter = makeConverter$4 + var checkPubkey$1 = {} + Object.defineProperty(checkPubkey$1, '__esModule', { value: !0 }) + function makeChecker(tt) { + return et + function et(nt) { + let rt + if ( + tt.includes(nt.key[0]) && + ((rt = nt.key.slice(1)), !(rt.length === 33 || rt.length === 65) || ![2, 3, 4].includes(rt[0])) + ) + throw new Error('Format Error: invalid pubkey in key 0x' + nt.key.toString('hex')) + return rt + } + } + checkPubkey$1.makeChecker = makeChecker + var redeemScript$1 = {} + Object.defineProperty(redeemScript$1, '__esModule', { value: !0 }) + function makeConverter$3(tt) { + function et(at) { + if (at.key[0] !== tt) + throw new Error('Decode Error: could not decode redeemScript with key 0x' + at.key.toString('hex')) + return at.value + } + function nt(at) { + return { key: Buffer.from([tt]), value: at } + } + const rt = 'Buffer' + function it(at) { + return Buffer.isBuffer(at) + } + function ot(at, st) { + return !!at && !!st && at.redeemScript === void 0 + } + return { decode: et, encode: nt, check: it, expected: rt, canAdd: ot } + } + redeemScript$1.makeConverter = makeConverter$3 + var tapBip32Derivation$1 = {} + Object.defineProperty(tapBip32Derivation$1, '__esModule', { value: !0 }) + const varuint$3 = varint, + bip32Derivation$1 = bip32Derivation$2, + isValidBIP340Key = (tt) => tt.length === 32 + function makeConverter$2(tt) { + const et = bip32Derivation$1.makeConverter(tt, isValidBIP340Key) + function nt(at) { + const st = varuint$3.decode(at.value), + lt = varuint$3.encodingLength(st), + ct = et.decode({ key: at.key, value: at.value.slice(lt + st * 32) }), + ut = new Array(st) + for (let ht = 0, dt = lt; ht < st; ht++, dt += 32) ut[ht] = at.value.slice(dt, dt + 32) + return Object.assign({}, ct, { leafHashes: ut }) + } + function rt(at) { + const st = et.encode(at), + lt = varuint$3.encodingLength(at.leafHashes.length), + ct = Buffer.allocUnsafe(lt) + varuint$3.encode(at.leafHashes.length, ct) + const ut = Buffer.concat([ct, ...at.leafHashes, st.value]) + return Object.assign({}, st, { value: ut }) + } + const it = '{ masterFingerprint: Buffer; pubkey: Buffer; path: string; leafHashes: Buffer[]; }' + function ot(at) { + return ( + Array.isArray(at.leafHashes) && + at.leafHashes.every((st) => Buffer.isBuffer(st) && st.length === 32) && + et.check(at) + ) + } + return { decode: nt, encode: rt, check: ot, expected: it, canAddToArray: et.canAddToArray } + } + tapBip32Derivation$1.makeConverter = makeConverter$2 + var tapInternalKey$1 = {} + Object.defineProperty(tapInternalKey$1, '__esModule', { value: !0 }) + function makeConverter$1(tt) { + function et(at) { + if (at.key[0] !== tt || at.key.length !== 1) + throw new Error('Decode Error: could not decode tapInternalKey with key 0x' + at.key.toString('hex')) + if (at.value.length !== 32) throw new Error('Decode Error: tapInternalKey not a 32-byte x-only pubkey') + return at.value + } + function nt(at) { + return { key: Buffer.from([tt]), value: at } + } + const rt = 'Buffer' + function it(at) { + return Buffer.isBuffer(at) && at.length === 32 + } + function ot(at, st) { + return !!at && !!st && at.tapInternalKey === void 0 + } + return { decode: et, encode: nt, check: it, expected: rt, canAdd: ot } + } + tapInternalKey$1.makeConverter = makeConverter$1 + var witnessScript$1 = {} + Object.defineProperty(witnessScript$1, '__esModule', { value: !0 }) + function makeConverter(tt) { + function et(at) { + if (at.key[0] !== tt) + throw new Error('Decode Error: could not decode witnessScript with key 0x' + at.key.toString('hex')) + return at.value + } + function nt(at) { + return { key: Buffer.from([tt]), value: at } + } + const rt = 'Buffer' + function it(at) { + return Buffer.isBuffer(at) + } + function ot(at, st) { + return !!at && !!st && at.witnessScript === void 0 + } + return { decode: et, encode: nt, check: it, expected: rt, canAdd: ot } + } + witnessScript$1.makeConverter = makeConverter + Object.defineProperty(converter, '__esModule', { value: !0 }) + const typeFields_1$2 = typeFields, + globalXpub = globalXpub$1, + unsignedTx = unsignedTx$1, + finalScriptSig = finalScriptSig$1, + finalScriptWitness = finalScriptWitness$1, + nonWitnessUtxo = nonWitnessUtxo$1, + partialSig = partialSig$1, + porCommitment = porCommitment$1, + sighashType = sighashType$1, + tapKeySig = tapKeySig$1, + tapLeafScript = tapLeafScript$1, + tapMerkleRoot = tapMerkleRoot$1, + tapScriptSig = tapScriptSig$1, + witnessUtxo = witnessUtxo$1, + tapTree = tapTree$1, + bip32Derivation = bip32Derivation$2, + checkPubkey = checkPubkey$1, + redeemScript = redeemScript$1, + tapBip32Derivation = tapBip32Derivation$1, + tapInternalKey = tapInternalKey$1, + witnessScript = witnessScript$1, + globals = { unsignedTx, globalXpub, checkPubkey: checkPubkey.makeChecker([]) } + converter.globals = globals + const inputs = { + nonWitnessUtxo, + partialSig, + sighashType, + finalScriptSig, + finalScriptWitness, + porCommitment, + witnessUtxo, + bip32Derivation: bip32Derivation.makeConverter(typeFields_1$2.InputTypes.BIP32_DERIVATION), + redeemScript: redeemScript.makeConverter(typeFields_1$2.InputTypes.REDEEM_SCRIPT), + witnessScript: witnessScript.makeConverter(typeFields_1$2.InputTypes.WITNESS_SCRIPT), + checkPubkey: checkPubkey.makeChecker([ + typeFields_1$2.InputTypes.PARTIAL_SIG, + typeFields_1$2.InputTypes.BIP32_DERIVATION, + ]), + tapKeySig, + tapScriptSig, + tapLeafScript, + tapBip32Derivation: tapBip32Derivation.makeConverter(typeFields_1$2.InputTypes.TAP_BIP32_DERIVATION), + tapInternalKey: tapInternalKey.makeConverter(typeFields_1$2.InputTypes.TAP_INTERNAL_KEY), + tapMerkleRoot, + } + converter.inputs = inputs + const outputs = { + bip32Derivation: bip32Derivation.makeConverter(typeFields_1$2.OutputTypes.BIP32_DERIVATION), + redeemScript: redeemScript.makeConverter(typeFields_1$2.OutputTypes.REDEEM_SCRIPT), + witnessScript: witnessScript.makeConverter(typeFields_1$2.OutputTypes.WITNESS_SCRIPT), + checkPubkey: checkPubkey.makeChecker([typeFields_1$2.OutputTypes.BIP32_DERIVATION]), + tapBip32Derivation: tapBip32Derivation.makeConverter(typeFields_1$2.OutputTypes.TAP_BIP32_DERIVATION), + tapTree, + tapInternalKey: tapInternalKey.makeConverter(typeFields_1$2.OutputTypes.TAP_INTERNAL_KEY), + } + converter.outputs = outputs + Object.defineProperty(fromBuffer, '__esModule', { value: !0 }) + const convert$2 = converter, + tools_1$1 = tools, + varuint$2 = varint, + typeFields_1$1 = typeFields + function psbtFromBuffer(tt, et) { + let nt = 0 + function rt() { + const yt = varuint$2.decode(tt, nt) + nt += varuint$2.encodingLength(yt) + const bt = tt.slice(nt, nt + yt) + return (nt += yt), bt + } + function it() { + const yt = tt.readUInt32BE(nt) + return (nt += 4), yt + } + function ot() { + const yt = tt.readUInt8(nt) + return (nt += 1), yt + } + function at() { + const yt = rt(), + bt = rt() + return { key: yt, value: bt } + } + function st() { + if (nt >= tt.length) throw new Error('Format Error: Unexpected End of PSBT') + const yt = tt.readUInt8(nt) === 0 + return yt && nt++, yt + } + if (it() !== 1886610036) throw new Error('Format Error: Invalid Magic Number') + if (ot() !== 255) throw new Error('Format Error: Magic Number must be followed by 0xff separator') + const lt = [], + ct = {} + for (; !st(); ) { + const yt = at(), + bt = yt.key.toString('hex') + if (ct[bt]) throw new Error('Format Error: Keys must be unique for global keymap: key ' + bt) + ;(ct[bt] = 1), lt.push(yt) + } + const ut = lt.filter((yt) => yt.key[0] === typeFields_1$1.GlobalTypes.UNSIGNED_TX) + if (ut.length !== 1) throw new Error('Format Error: Only one UNSIGNED_TX allowed') + const ht = et(ut[0].value), + { inputCount: dt, outputCount: pt } = ht.getInputOutputCounts(), + mt = [], + gt = [] + for (const yt of tools_1$1.range(dt)) { + const bt = {}, + vt = [] + for (; !st(); ) { + const xt = at(), + kt = xt.key.toString('hex') + if (bt[kt]) + throw new Error('Format Error: Keys must be unique for each input: input index ' + yt + ' key ' + kt) + ;(bt[kt] = 1), vt.push(xt) + } + mt.push(vt) + } + for (const yt of tools_1$1.range(pt)) { + const bt = {}, + vt = [] + for (; !st(); ) { + const xt = at(), + kt = xt.key.toString('hex') + if (bt[kt]) + throw new Error('Format Error: Keys must be unique for each output: output index ' + yt + ' key ' + kt) + ;(bt[kt] = 1), vt.push(xt) + } + gt.push(vt) + } + return psbtFromKeyVals(ht, { globalMapKeyVals: lt, inputKeyVals: mt, outputKeyVals: gt }) + } + fromBuffer.psbtFromBuffer = psbtFromBuffer + function checkKeyBuffer(tt, et, nt) { + if (!et.equals(Buffer.from([nt]))) throw new Error(`Format Error: Invalid ${tt} key: ${et.toString('hex')}`) + } + fromBuffer.checkKeyBuffer = checkKeyBuffer + function psbtFromKeyVals(tt, { globalMapKeyVals: et, inputKeyVals: nt, outputKeyVals: rt }) { + const it = { unsignedTx: tt } + let ot = 0 + for (const ut of et) + switch (ut.key[0]) { + case typeFields_1$1.GlobalTypes.UNSIGNED_TX: + if ((checkKeyBuffer('global', ut.key, typeFields_1$1.GlobalTypes.UNSIGNED_TX), ot > 0)) + throw new Error('Format Error: GlobalMap has multiple UNSIGNED_TX') + ot++ + break + case typeFields_1$1.GlobalTypes.GLOBAL_XPUB: + it.globalXpub === void 0 && (it.globalXpub = []), it.globalXpub.push(convert$2.globals.globalXpub.decode(ut)) + break + default: + it.unknownKeyVals || (it.unknownKeyVals = []), it.unknownKeyVals.push(ut) + } + const at = nt.length, + st = rt.length, + lt = [], + ct = [] + for (const ut of tools_1$1.range(at)) { + const ht = {} + for (const dt of nt[ut]) + switch ((convert$2.inputs.checkPubkey(dt), dt.key[0])) { + case typeFields_1$1.InputTypes.NON_WITNESS_UTXO: + if ( + (checkKeyBuffer('input', dt.key, typeFields_1$1.InputTypes.NON_WITNESS_UTXO), + ht.nonWitnessUtxo !== void 0) + ) + throw new Error('Format Error: Input has multiple NON_WITNESS_UTXO') + ht.nonWitnessUtxo = convert$2.inputs.nonWitnessUtxo.decode(dt) + break + case typeFields_1$1.InputTypes.WITNESS_UTXO: + if ((checkKeyBuffer('input', dt.key, typeFields_1$1.InputTypes.WITNESS_UTXO), ht.witnessUtxo !== void 0)) + throw new Error('Format Error: Input has multiple WITNESS_UTXO') + ht.witnessUtxo = convert$2.inputs.witnessUtxo.decode(dt) + break + case typeFields_1$1.InputTypes.PARTIAL_SIG: + ht.partialSig === void 0 && (ht.partialSig = []), ht.partialSig.push(convert$2.inputs.partialSig.decode(dt)) + break + case typeFields_1$1.InputTypes.SIGHASH_TYPE: + if ((checkKeyBuffer('input', dt.key, typeFields_1$1.InputTypes.SIGHASH_TYPE), ht.sighashType !== void 0)) + throw new Error('Format Error: Input has multiple SIGHASH_TYPE') + ht.sighashType = convert$2.inputs.sighashType.decode(dt) + break + case typeFields_1$1.InputTypes.REDEEM_SCRIPT: + if ((checkKeyBuffer('input', dt.key, typeFields_1$1.InputTypes.REDEEM_SCRIPT), ht.redeemScript !== void 0)) + throw new Error('Format Error: Input has multiple REDEEM_SCRIPT') + ht.redeemScript = convert$2.inputs.redeemScript.decode(dt) + break + case typeFields_1$1.InputTypes.WITNESS_SCRIPT: + if ( + (checkKeyBuffer('input', dt.key, typeFields_1$1.InputTypes.WITNESS_SCRIPT), ht.witnessScript !== void 0) + ) + throw new Error('Format Error: Input has multiple WITNESS_SCRIPT') + ht.witnessScript = convert$2.inputs.witnessScript.decode(dt) + break + case typeFields_1$1.InputTypes.BIP32_DERIVATION: + ht.bip32Derivation === void 0 && (ht.bip32Derivation = []), + ht.bip32Derivation.push(convert$2.inputs.bip32Derivation.decode(dt)) + break + case typeFields_1$1.InputTypes.FINAL_SCRIPTSIG: + checkKeyBuffer('input', dt.key, typeFields_1$1.InputTypes.FINAL_SCRIPTSIG), + (ht.finalScriptSig = convert$2.inputs.finalScriptSig.decode(dt)) + break + case typeFields_1$1.InputTypes.FINAL_SCRIPTWITNESS: + checkKeyBuffer('input', dt.key, typeFields_1$1.InputTypes.FINAL_SCRIPTWITNESS), + (ht.finalScriptWitness = convert$2.inputs.finalScriptWitness.decode(dt)) + break + case typeFields_1$1.InputTypes.POR_COMMITMENT: + checkKeyBuffer('input', dt.key, typeFields_1$1.InputTypes.POR_COMMITMENT), + (ht.porCommitment = convert$2.inputs.porCommitment.decode(dt)) + break + case typeFields_1$1.InputTypes.TAP_KEY_SIG: + checkKeyBuffer('input', dt.key, typeFields_1$1.InputTypes.TAP_KEY_SIG), + (ht.tapKeySig = convert$2.inputs.tapKeySig.decode(dt)) + break + case typeFields_1$1.InputTypes.TAP_SCRIPT_SIG: + ht.tapScriptSig === void 0 && (ht.tapScriptSig = []), + ht.tapScriptSig.push(convert$2.inputs.tapScriptSig.decode(dt)) + break + case typeFields_1$1.InputTypes.TAP_LEAF_SCRIPT: + ht.tapLeafScript === void 0 && (ht.tapLeafScript = []), + ht.tapLeafScript.push(convert$2.inputs.tapLeafScript.decode(dt)) + break + case typeFields_1$1.InputTypes.TAP_BIP32_DERIVATION: + ht.tapBip32Derivation === void 0 && (ht.tapBip32Derivation = []), + ht.tapBip32Derivation.push(convert$2.inputs.tapBip32Derivation.decode(dt)) + break + case typeFields_1$1.InputTypes.TAP_INTERNAL_KEY: + checkKeyBuffer('input', dt.key, typeFields_1$1.InputTypes.TAP_INTERNAL_KEY), + (ht.tapInternalKey = convert$2.inputs.tapInternalKey.decode(dt)) + break + case typeFields_1$1.InputTypes.TAP_MERKLE_ROOT: + checkKeyBuffer('input', dt.key, typeFields_1$1.InputTypes.TAP_MERKLE_ROOT), + (ht.tapMerkleRoot = convert$2.inputs.tapMerkleRoot.decode(dt)) + break + default: + ht.unknownKeyVals || (ht.unknownKeyVals = []), ht.unknownKeyVals.push(dt) + } + lt.push(ht) + } + for (const ut of tools_1$1.range(st)) { + const ht = {} + for (const dt of rt[ut]) + switch ((convert$2.outputs.checkPubkey(dt), dt.key[0])) { + case typeFields_1$1.OutputTypes.REDEEM_SCRIPT: + if ( + (checkKeyBuffer('output', dt.key, typeFields_1$1.OutputTypes.REDEEM_SCRIPT), ht.redeemScript !== void 0) + ) + throw new Error('Format Error: Output has multiple REDEEM_SCRIPT') + ht.redeemScript = convert$2.outputs.redeemScript.decode(dt) + break + case typeFields_1$1.OutputTypes.WITNESS_SCRIPT: + if ( + (checkKeyBuffer('output', dt.key, typeFields_1$1.OutputTypes.WITNESS_SCRIPT), ht.witnessScript !== void 0) + ) + throw new Error('Format Error: Output has multiple WITNESS_SCRIPT') + ht.witnessScript = convert$2.outputs.witnessScript.decode(dt) + break + case typeFields_1$1.OutputTypes.BIP32_DERIVATION: + ht.bip32Derivation === void 0 && (ht.bip32Derivation = []), + ht.bip32Derivation.push(convert$2.outputs.bip32Derivation.decode(dt)) + break + case typeFields_1$1.OutputTypes.TAP_INTERNAL_KEY: + checkKeyBuffer('output', dt.key, typeFields_1$1.OutputTypes.TAP_INTERNAL_KEY), + (ht.tapInternalKey = convert$2.outputs.tapInternalKey.decode(dt)) + break + case typeFields_1$1.OutputTypes.TAP_TREE: + checkKeyBuffer('output', dt.key, typeFields_1$1.OutputTypes.TAP_TREE), + (ht.tapTree = convert$2.outputs.tapTree.decode(dt)) + break + case typeFields_1$1.OutputTypes.TAP_BIP32_DERIVATION: + ht.tapBip32Derivation === void 0 && (ht.tapBip32Derivation = []), + ht.tapBip32Derivation.push(convert$2.outputs.tapBip32Derivation.decode(dt)) + break + default: + ht.unknownKeyVals || (ht.unknownKeyVals = []), ht.unknownKeyVals.push(dt) + } + ct.push(ht) + } + return { globalMap: it, inputs: lt, outputs: ct } + } + fromBuffer.psbtFromKeyVals = psbtFromKeyVals + var toBuffer = {} + Object.defineProperty(toBuffer, '__esModule', { value: !0 }) + const convert$1 = converter, + tools_1 = tools + function psbtToBuffer({ globalMap: tt, inputs: et, outputs: nt }) { + const { + globalKeyVals: rt, + inputKeyVals: it, + outputKeyVals: ot, + } = psbtToKeyVals({ globalMap: tt, inputs: et, outputs: nt }), + at = tools_1.keyValsToBuffer(rt), + st = (ht) => (ht.length === 0 ? [Buffer.from([0])] : ht.map(tools_1.keyValsToBuffer)), + lt = st(it), + ct = st(ot), + ut = Buffer.allocUnsafe(5) + return ut.writeUIntBE(482972169471, 0, 5), Buffer.concat([ut, at].concat(lt, ct)) + } + toBuffer.psbtToBuffer = psbtToBuffer + const sortKeyVals = (tt, et) => tt.key.compare(et.key) + function keyValsFromMap(tt, et) { + const nt = new Set(), + rt = Object.entries(tt).reduce((ot, [at, st]) => { + if (at === 'unknownKeyVals') return ot + const lt = et[at] + if (lt === void 0) return ot + const ct = (Array.isArray(st) ? st : [st]).map(lt.encode) + return ( + ct + .map((ht) => ht.key.toString('hex')) + .forEach((ht) => { + if (nt.has(ht)) throw new Error('Serialize Error: Duplicate key: ' + ht) + nt.add(ht) + }), + ot.concat(ct) + ) + }, []), + it = tt.unknownKeyVals ? tt.unknownKeyVals.filter((ot) => !nt.has(ot.key.toString('hex'))) : [] + return rt.concat(it).sort(sortKeyVals) + } + function psbtToKeyVals({ globalMap: tt, inputs: et, outputs: nt }) { + return { + globalKeyVals: keyValsFromMap(tt, convert$1.globals), + inputKeyVals: et.map((rt) => keyValsFromMap(rt, convert$1.inputs)), + outputKeyVals: nt.map((rt) => keyValsFromMap(rt, convert$1.outputs)), + } + } + toBuffer.psbtToKeyVals = psbtToKeyVals + ;(function (tt) { + function et(nt) { + for (var rt in nt) tt.hasOwnProperty(rt) || (tt[rt] = nt[rt]) + } + Object.defineProperty(tt, '__esModule', { value: !0 }), et(fromBuffer), et(toBuffer) + })(parser$1) + Object.defineProperty(combiner, '__esModule', { value: !0 }) + const parser_1$1 = parser$1 + function combine(tt) { + const et = tt[0], + nt = parser_1$1.psbtToKeyVals(et), + rt = tt.slice(1) + if (rt.length === 0) throw new Error('Combine: Nothing to combine') + const it = getTx(et) + if (it === void 0) throw new Error('Combine: Self missing transaction') + const ot = getKeySet(nt.globalKeyVals), + at = nt.inputKeyVals.map(getKeySet), + st = nt.outputKeyVals.map(getKeySet) + for (const lt of rt) { + const ct = getTx(lt) + if (ct === void 0 || !ct.toBuffer().equals(it.toBuffer())) + throw new Error('Combine: One of the Psbts does not have the same transaction.') + const ut = parser_1$1.psbtToKeyVals(lt) + getKeySet(ut.globalKeyVals).forEach(keyPusher(ot, nt.globalKeyVals, ut.globalKeyVals)), + ut.inputKeyVals + .map(getKeySet) + .forEach((mt, gt) => mt.forEach(keyPusher(at[gt], nt.inputKeyVals[gt], ut.inputKeyVals[gt]))), + ut.outputKeyVals + .map(getKeySet) + .forEach((mt, gt) => mt.forEach(keyPusher(st[gt], nt.outputKeyVals[gt], ut.outputKeyVals[gt]))) + } + return parser_1$1.psbtFromKeyVals(it, { + globalMapKeyVals: nt.globalKeyVals, + inputKeyVals: nt.inputKeyVals, + outputKeyVals: nt.outputKeyVals, + }) + } + combiner.combine = combine + function keyPusher(tt, et, nt) { + return (rt) => { + if (tt.has(rt)) return + const it = nt.filter((ot) => ot.key.toString('hex') === rt)[0] + et.push(it), tt.add(rt) + } + } + function getTx(tt) { + return tt.globalMap.unsignedTx + } + function getKeySet(tt) { + const et = new Set() + return ( + tt.forEach((nt) => { + const rt = nt.key.toString('hex') + if (et.has(rt)) throw new Error('Combine: KeyValue Map keys should be unique') + et.add(rt) + }), + et + ) + } + var utils$1 = {} + ;(function (tt) { + Object.defineProperty(tt, '__esModule', { value: !0 }) + const et = converter + function nt(pt, mt) { + const gt = pt[mt] + if (gt === void 0) throw new Error(`No input #${mt}`) + return gt + } + tt.checkForInput = nt + function rt(pt, mt) { + const gt = pt[mt] + if (gt === void 0) throw new Error(`No output #${mt}`) + return gt + } + tt.checkForOutput = rt + function it(pt, mt, gt) { + if (pt.key[0] < gt) throw new Error('Use the method for your specific key instead of addUnknownKeyVal*') + if (mt && mt.filter((yt) => yt.key.equals(pt.key)).length !== 0) + throw new Error(`Duplicate Key: ${pt.key.toString('hex')}`) + } + tt.checkHasKey = it + function ot(pt) { + let mt = 0 + return ( + Object.keys(pt).forEach((gt) => { + Number(isNaN(Number(gt))) && mt++ + }), + mt + ) + } + tt.getEnumLength = ot + function at(pt, mt) { + let gt = !1 + if (mt.nonWitnessUtxo || mt.witnessUtxo) { + const yt = !!mt.redeemScript, + bt = !!mt.witnessScript, + vt = !yt || !!mt.finalScriptSig, + xt = !bt || !!mt.finalScriptWitness, + kt = !!mt.finalScriptSig || !!mt.finalScriptWitness + gt = vt && xt && kt + } + if (gt === !1) throw new Error(`Input #${pt} has too much or too little data to clean`) + } + tt.inputCheckUncleanFinalized = at + function st(pt, mt, gt, yt) { + throw new Error(`Data for ${pt} key ${mt} is incorrect: Expected ${gt} and got ${JSON.stringify(yt)}`) + } + function lt(pt) { + return (mt, gt) => { + for (const yt of Object.keys(mt)) { + const bt = mt[yt], + { canAdd: vt, canAddToArray: xt, check: kt, expected: St } = et[pt + 's'][yt] || {}, + Tt = !!xt + if (kt) + if (Tt) { + if (!Array.isArray(bt) || (gt[yt] && !Array.isArray(gt[yt]))) + throw new Error(`Key type ${yt} must be an array`) + bt.every(kt) || st(pt, yt, St, bt) + const At = gt[yt] || [], + Et = new Set() + if (!bt.every(($t) => xt(At, $t, Et))) throw new Error('Can not add duplicate data to array') + gt[yt] = At.concat(bt) + } else { + if ((kt(bt) || st(pt, yt, St, bt), !vt(gt, bt))) throw new Error(`Can not add duplicate data to ${pt}`) + gt[yt] = bt + } + } + } + } + ;(tt.updateGlobal = lt('global')), (tt.updateInput = lt('input')), (tt.updateOutput = lt('output')) + function ct(pt, mt) { + const gt = pt.length - 1, + yt = nt(pt, gt) + tt.updateInput(mt, yt) + } + tt.addInputAttributes = ct + function ut(pt, mt) { + const gt = pt.length - 1, + yt = rt(pt, gt) + tt.updateOutput(mt, yt) + } + tt.addOutputAttributes = ut + function ht(pt, mt) { + if (!Buffer.isBuffer(mt) || mt.length < 4) throw new Error('Set Version: Invalid Transaction') + return mt.writeUInt32LE(pt, 0), mt + } + tt.defaultVersionSetter = ht + function dt(pt, mt) { + if (!Buffer.isBuffer(mt) || mt.length < 4) throw new Error('Set Locktime: Invalid Transaction') + return mt.writeUInt32LE(pt, mt.length - 4), mt + } + tt.defaultLocktimeSetter = dt + })(utils$1) + Object.defineProperty(psbt, '__esModule', { value: !0 }) + const combiner_1 = combiner, + parser_1 = parser$1, + typeFields_1 = typeFields, + utils_1$1 = utils$1 + let Psbt$1 = class { + constructor(et) { + ;(this.inputs = []), (this.outputs = []), (this.globalMap = { unsignedTx: et }) + } + static fromBase64(et, nt) { + const rt = Buffer.from(et, 'base64') + return this.fromBuffer(rt, nt) + } + static fromHex(et, nt) { + const rt = Buffer.from(et, 'hex') + return this.fromBuffer(rt, nt) + } + static fromBuffer(et, nt) { + const rt = parser_1.psbtFromBuffer(et, nt), + it = new this(rt.globalMap.unsignedTx) + return Object.assign(it, rt), it + } + toBase64() { + return this.toBuffer().toString('base64') + } + toHex() { + return this.toBuffer().toString('hex') + } + toBuffer() { + return parser_1.psbtToBuffer(this) + } + updateGlobal(et) { + return utils_1$1.updateGlobal(et, this.globalMap), this + } + updateInput(et, nt) { + const rt = utils_1$1.checkForInput(this.inputs, et) + return utils_1$1.updateInput(nt, rt), this + } + updateOutput(et, nt) { + const rt = utils_1$1.checkForOutput(this.outputs, et) + return utils_1$1.updateOutput(nt, rt), this + } + addUnknownKeyValToGlobal(et) { + return ( + utils_1$1.checkHasKey(et, this.globalMap.unknownKeyVals, utils_1$1.getEnumLength(typeFields_1.GlobalTypes)), + this.globalMap.unknownKeyVals || (this.globalMap.unknownKeyVals = []), + this.globalMap.unknownKeyVals.push(et), + this + ) + } + addUnknownKeyValToInput(et, nt) { + const rt = utils_1$1.checkForInput(this.inputs, et) + return ( + utils_1$1.checkHasKey(nt, rt.unknownKeyVals, utils_1$1.getEnumLength(typeFields_1.InputTypes)), + rt.unknownKeyVals || (rt.unknownKeyVals = []), + rt.unknownKeyVals.push(nt), + this + ) + } + addUnknownKeyValToOutput(et, nt) { + const rt = utils_1$1.checkForOutput(this.outputs, et) + return ( + utils_1$1.checkHasKey(nt, rt.unknownKeyVals, utils_1$1.getEnumLength(typeFields_1.OutputTypes)), + rt.unknownKeyVals || (rt.unknownKeyVals = []), + rt.unknownKeyVals.push(nt), + this + ) + } + addInput(et) { + this.globalMap.unsignedTx.addInput(et), this.inputs.push({ unknownKeyVals: [] }) + const nt = et.unknownKeyVals || [], + rt = this.inputs.length - 1 + if (!Array.isArray(nt)) throw new Error('unknownKeyVals must be an Array') + return ( + nt.forEach((it) => this.addUnknownKeyValToInput(rt, it)), utils_1$1.addInputAttributes(this.inputs, et), this + ) + } + addOutput(et) { + this.globalMap.unsignedTx.addOutput(et), this.outputs.push({ unknownKeyVals: [] }) + const nt = et.unknownKeyVals || [], + rt = this.outputs.length - 1 + if (!Array.isArray(nt)) throw new Error('unknownKeyVals must be an Array') + return ( + nt.forEach((it) => this.addUnknownKeyValToOutput(rt, it)), utils_1$1.addOutputAttributes(this.outputs, et), this + ) + } + clearFinalizedInput(et) { + const nt = utils_1$1.checkForInput(this.inputs, et) + utils_1$1.inputCheckUncleanFinalized(et, nt) + for (const rt of Object.keys(nt)) + ['witnessUtxo', 'nonWitnessUtxo', 'finalScriptSig', 'finalScriptWitness', 'unknownKeyVals'].includes(rt) || + delete nt[rt] + return this + } + combine(...et) { + const nt = combiner_1.combine([this].concat(et)) + return Object.assign(this, nt), this + } + getTransaction() { + return this.globalMap.unsignedTx.toBuffer() + } + } + psbt.Psbt = Psbt$1 + var bip371 = {}, + psbtutils = {} + Object.defineProperty(psbtutils, '__esModule', { value: !0 }) + psbtutils.signatureBlocksAction = + psbtutils.checkInputForSig = + psbtutils.pubkeyInScript = + psbtutils.pubkeyPositionInScript = + psbtutils.witnessStackToScriptWitness = + psbtutils.isP2TR = + psbtutils.isP2SHScript = + psbtutils.isP2WSHScript = + psbtutils.isP2WPKH = + psbtutils.isP2PKH = + psbtutils.isP2PK = + psbtutils.isP2MS = + void 0 + const varuint$1 = varint, + bscript$1 = script, + transaction_1$2 = transaction, + crypto_1 = crypto$2, + payments$1 = payments$3 + function isPaymentFactory(tt) { + return (et) => { + try { + return tt({ output: et }), !0 + } catch { + return !1 + } + } + } + psbtutils.isP2MS = isPaymentFactory(payments$1.p2ms) + psbtutils.isP2PK = isPaymentFactory(payments$1.p2pk) + psbtutils.isP2PKH = isPaymentFactory(payments$1.p2pkh) + psbtutils.isP2WPKH = isPaymentFactory(payments$1.p2wpkh) + psbtutils.isP2WSHScript = isPaymentFactory(payments$1.p2wsh) + psbtutils.isP2SHScript = isPaymentFactory(payments$1.p2sh) + psbtutils.isP2TR = isPaymentFactory(payments$1.p2tr) + function witnessStackToScriptWitness(tt) { + let et = Buffer.allocUnsafe(0) + function nt(at) { + et = Buffer.concat([et, Buffer.from(at)]) + } + function rt(at) { + const st = et.length, + lt = varuint$1.encodingLength(at) + ;(et = Buffer.concat([et, Buffer.allocUnsafe(lt)])), varuint$1.encode(at, et, st) + } + function it(at) { + rt(at.length), nt(at) + } + function ot(at) { + rt(at.length), at.forEach(it) + } + return ot(tt), et + } + psbtutils.witnessStackToScriptWitness = witnessStackToScriptWitness + function pubkeyPositionInScript(tt, et) { + const nt = (0, crypto_1.hash160)(tt), + rt = tt.slice(1, 33), + it = bscript$1.decompile(et) + if (it === null) throw new Error('Unknown script error') + return it.findIndex((ot) => (typeof ot == 'number' ? !1 : ot.equals(tt) || ot.equals(nt) || ot.equals(rt))) + } + psbtutils.pubkeyPositionInScript = pubkeyPositionInScript + function pubkeyInScript(tt, et) { + return pubkeyPositionInScript(tt, et) !== -1 + } + psbtutils.pubkeyInScript = pubkeyInScript + function checkInputForSig(tt, et) { + return extractPartialSigs(tt).some((rt) => signatureBlocksAction(rt, bscript$1.signature.decode, et)) + } + psbtutils.checkInputForSig = checkInputForSig + function signatureBlocksAction(tt, et, nt) { + const { hashType: rt } = et(tt), + it = [] + switch ((rt & transaction_1$2.Transaction.SIGHASH_ANYONECANPAY && it.push('addInput'), rt & 31)) { + case transaction_1$2.Transaction.SIGHASH_ALL: + break + case transaction_1$2.Transaction.SIGHASH_SINGLE: + case transaction_1$2.Transaction.SIGHASH_NONE: + it.push('addOutput'), it.push('setInputSequence') + break + } + return it.indexOf(nt) === -1 + } + psbtutils.signatureBlocksAction = signatureBlocksAction + function extractPartialSigs(tt) { + let et = [] + if ((tt.partialSig || []).length === 0) { + if (!tt.finalScriptSig && !tt.finalScriptWitness) return [] + et = getPsigsFromInputFinalScripts(tt) + } else et = tt.partialSig + return et.map((nt) => nt.signature) + } + function getPsigsFromInputFinalScripts(tt) { + const et = tt.finalScriptSig ? bscript$1.decompile(tt.finalScriptSig) || [] : [], + nt = tt.finalScriptWitness ? bscript$1.decompile(tt.finalScriptWitness) || [] : [] + return et + .concat(nt) + .filter((rt) => Buffer.isBuffer(rt) && bscript$1.isCanonicalScriptSignature(rt)) + .map((rt) => ({ signature: rt })) + } + Object.defineProperty(bip371, '__esModule', { value: !0 }) + bip371.checkTaprootInputForSigs = + bip371.tapTreeFromList = + bip371.tapTreeToList = + bip371.tweakInternalPubKey = + bip371.checkTaprootOutputFields = + bip371.checkTaprootInputFields = + bip371.isTaprootOutput = + bip371.isTaprootInput = + bip371.serializeTaprootSignature = + bip371.tapScriptFinalizer = + bip371.toXOnly = + void 0 + const types_1 = types$6, + transaction_1$1 = transaction, + psbtutils_1$1 = psbtutils, + bip341_1$1 = bip341, + payments_1 = payments$3, + psbtutils_2 = psbtutils, + toXOnly = (tt) => (tt.length === 32 ? tt : tt.slice(1, 33)) + bip371.toXOnly = toXOnly + function tapScriptFinalizer(tt, et, nt) { + const rt = findTapLeafToFinalize(et, tt, nt) + try { + const ot = sortSignatures(et, rt).concat(rt.script).concat(rt.controlBlock) + return { finalScriptWitness: (0, psbtutils_1$1.witnessStackToScriptWitness)(ot) } + } catch (it) { + throw new Error(`Can not finalize taproot input #${tt}: ${it}`) + } + } + bip371.tapScriptFinalizer = tapScriptFinalizer + function serializeTaprootSignature(tt, et) { + const nt = et ? Buffer.from([et]) : Buffer.from([]) + return Buffer.concat([tt, nt]) + } + bip371.serializeTaprootSignature = serializeTaprootSignature + function isTaprootInput(tt) { + return ( + tt && + !!( + tt.tapInternalKey || + tt.tapMerkleRoot || + (tt.tapLeafScript && tt.tapLeafScript.length) || + (tt.tapBip32Derivation && tt.tapBip32Derivation.length) || + (tt.witnessUtxo && (0, psbtutils_1$1.isP2TR)(tt.witnessUtxo.script)) + ) + ) + } + bip371.isTaprootInput = isTaprootInput + function isTaprootOutput(tt, et) { + return ( + tt && + !!( + tt.tapInternalKey || + tt.tapTree || + (tt.tapBip32Derivation && tt.tapBip32Derivation.length) || + (et && (0, psbtutils_1$1.isP2TR)(et)) + ) + ) + } + bip371.isTaprootOutput = isTaprootOutput + function checkTaprootInputFields(tt, et, nt) { + checkMixedTaprootAndNonTaprootInputFields(tt, et, nt), checkIfTapLeafInTree(tt, et, nt) + } + bip371.checkTaprootInputFields = checkTaprootInputFields + function checkTaprootOutputFields(tt, et, nt) { + checkMixedTaprootAndNonTaprootOutputFields(tt, et, nt), checkTaprootScriptPubkey(tt, et) + } + bip371.checkTaprootOutputFields = checkTaprootOutputFields + function checkTaprootScriptPubkey(tt, et) { + if (!et.tapTree && !et.tapInternalKey) return + const nt = et.tapInternalKey || tt.tapInternalKey, + rt = et.tapTree || tt.tapTree + if (nt) { + const { script: it } = tt, + ot = getTaprootScripPubkey(nt, rt) + if (it && !it.equals(ot)) throw new Error('Error adding output. Script or address missmatch.') + } + } + function getTaprootScripPubkey(tt, et) { + const nt = et && tapTreeFromList(et.leaves), + { output: rt } = (0, payments_1.p2tr)({ internalPubkey: tt, scriptTree: nt }) + return rt + } + function tweakInternalPubKey(tt, et) { + const nt = et.tapInternalKey, + rt = nt && (0, bip341_1$1.tweakKey)(nt, et.tapMerkleRoot) + if (!rt) throw new Error(`Cannot tweak tap internal key for input #${tt}. Public key: ${nt && nt.toString('hex')}`) + return rt.x + } + bip371.tweakInternalPubKey = tweakInternalPubKey + function tapTreeToList(tt) { + if (!(0, types_1.isTaptree)(tt)) + throw new Error('Cannot convert taptree to tapleaf list. Expecting a tapree structure.') + return _tapTreeToList(tt) + } + bip371.tapTreeToList = tapTreeToList + function tapTreeFromList(tt = []) { + return tt.length === 1 && tt[0].depth === 0 + ? { output: tt[0].script, version: tt[0].leafVersion } + : instertLeavesInTree(tt) + } + bip371.tapTreeFromList = tapTreeFromList + function checkTaprootInputForSigs(tt, et) { + return extractTaprootSigs(tt).some((rt) => (0, psbtutils_2.signatureBlocksAction)(rt, decodeSchnorrSignature, et)) + } + bip371.checkTaprootInputForSigs = checkTaprootInputForSigs + function decodeSchnorrSignature(tt) { + return { signature: tt.slice(0, 64), hashType: tt.slice(64)[0] || transaction_1$1.Transaction.SIGHASH_DEFAULT } + } + function extractTaprootSigs(tt) { + const et = [] + if ( + (tt.tapKeySig && et.push(tt.tapKeySig), + tt.tapScriptSig && et.push(...tt.tapScriptSig.map((nt) => nt.signature)), + !et.length) + ) { + const nt = getTapKeySigFromWithness(tt.finalScriptWitness) + nt && et.push(nt) + } + return et + } + function getTapKeySigFromWithness(tt) { + if (!tt) return + const et = tt.slice(2) + if (et.length === 64 || et.length === 65) return et + } + function _tapTreeToList(tt, et = [], nt = 0) { + if (nt > bip341_1$1.MAX_TAPTREE_DEPTH) throw new Error('Max taptree depth exceeded.') + return tt + ? (0, types_1.isTapleaf)(tt) + ? (et.push({ depth: nt, leafVersion: tt.version || bip341_1$1.LEAF_VERSION_TAPSCRIPT, script: tt.output }), et) + : (tt[0] && _tapTreeToList(tt[0], et, nt + 1), tt[1] && _tapTreeToList(tt[1], et, nt + 1), et) + : [] + } + function instertLeavesInTree(tt) { + let et + for (const nt of tt) + if (((et = instertLeafInTree(nt, et)), !et)) throw new Error('No room left to insert tapleaf in tree') + return et + } + function instertLeafInTree(tt, et, nt = 0) { + if (nt > bip341_1$1.MAX_TAPTREE_DEPTH) throw new Error('Max taptree depth exceeded.') + if (tt.depth === nt) return et ? void 0 : { output: tt.script, version: tt.leafVersion } + if ((0, types_1.isTapleaf)(et)) return + const rt = instertLeafInTree(tt, et && et[0], nt + 1) + if (rt) return [rt, et && et[1]] + const it = instertLeafInTree(tt, et && et[1], nt + 1) + if (it) return [et && et[0], it] + } + function checkMixedTaprootAndNonTaprootInputFields(tt, et, nt) { + const rt = isTaprootInput(tt) && hasNonTaprootFields(et), + it = hasNonTaprootFields(tt) && isTaprootInput(et), + ot = tt === et && isTaprootInput(et) && hasNonTaprootFields(et) + if (rt || it || ot) + throw new Error(`Invalid arguments for Psbt.${nt}. Cannot use both taproot and non-taproot fields.`) + } + function checkMixedTaprootAndNonTaprootOutputFields(tt, et, nt) { + const rt = isTaprootOutput(tt) && hasNonTaprootFields(et), + it = hasNonTaprootFields(tt) && isTaprootOutput(et), + ot = tt === et && isTaprootOutput(et) && hasNonTaprootFields(et) + if (rt || it || ot) + throw new Error(`Invalid arguments for Psbt.${nt}. Cannot use both taproot and non-taproot fields.`) + } + function checkIfTapLeafInTree(tt, et, nt) { + if (et.tapMerkleRoot) { + const rt = (et.tapLeafScript || []).every((ot) => isTapLeafInTree(ot, et.tapMerkleRoot)), + it = (tt.tapLeafScript || []).every((ot) => isTapLeafInTree(ot, et.tapMerkleRoot)) + if (!rt || !it) throw new Error(`Invalid arguments for Psbt.${nt}. Tapleaf not part of taptree.`) + } else if (tt.tapMerkleRoot && !(et.tapLeafScript || []).every((it) => isTapLeafInTree(it, tt.tapMerkleRoot))) + throw new Error(`Invalid arguments for Psbt.${nt}. Tapleaf not part of taptree.`) + } + function isTapLeafInTree(tt, et) { + if (!et) return !0 + const nt = (0, bip341_1$1.tapleafHash)({ output: tt.script, version: tt.leafVersion }) + return (0, bip341_1$1.rootHashFromPath)(tt.controlBlock, nt).equals(et) + } + function sortSignatures(tt, et) { + const nt = (0, bip341_1$1.tapleafHash)({ output: et.script, version: et.leafVersion }) + return (tt.tapScriptSig || []) + .filter((rt) => rt.leafHash.equals(nt)) + .map((rt) => addPubkeyPositionInScript(et.script, rt)) + .sort((rt, it) => it.positionInScript - rt.positionInScript) + .map((rt) => rt.signature) + } + function addPubkeyPositionInScript(tt, et) { + return Object.assign({ positionInScript: (0, psbtutils_1$1.pubkeyPositionInScript)(et.pubkey, tt) }, et) + } + function findTapLeafToFinalize(tt, et, nt) { + if (!tt.tapScriptSig || !tt.tapScriptSig.length) + throw new Error(`Can not finalize taproot input #${et}. No tapleaf script signature provided.`) + const rt = (tt.tapLeafScript || []) + .sort((it, ot) => it.controlBlock.length - ot.controlBlock.length) + .find((it) => canFinalizeLeaf(it, tt.tapScriptSig, nt)) + if (!rt) throw new Error(`Can not finalize taproot input #${et}. Signature for tapleaf script not found.`) + return rt + } + function canFinalizeLeaf(tt, et, nt) { + const rt = (0, bip341_1$1.tapleafHash)({ output: tt.script, version: tt.leafVersion }) + return (!nt || nt.equals(rt)) && et.find((ot) => ot.leafHash.equals(rt)) !== void 0 + } + function hasNonTaprootFields(tt) { + return tt && !!(tt.redeemScript || tt.witnessScript || (tt.bip32Derivation && tt.bip32Derivation.length)) + } + Object.defineProperty(psbt$1, '__esModule', { value: !0 }) + psbt$1.Psbt = void 0 + const bip174_1 = psbt, + varuint = varint, + utils_1 = utils$1, + address_1 = address, + bufferutils_1 = bufferutils, + networks_1 = networks$1, + payments = payments$3, + bip341_1 = bip341, + bscript = script, + transaction_1 = transaction, + bip371_1 = bip371, + psbtutils_1 = psbtutils, + DEFAULT_OPTS = { network: networks_1.bitcoin, maximumFeeRate: 5e3 } + class Psbt { + static fromBase64(et, nt = {}) { + const rt = Buffer.from(et, 'base64') + return this.fromBuffer(rt, nt) + } + static fromHex(et, nt = {}) { + const rt = Buffer.from(et, 'hex') + return this.fromBuffer(rt, nt) + } + static fromBuffer(et, nt = {}) { + const rt = bip174_1.Psbt.fromBuffer(et, transactionFromBuffer), + it = new Psbt(nt, rt) + return checkTxForDupeIns(it.__CACHE.__TX, it.__CACHE), it + } + constructor(et = {}, nt = new bip174_1.Psbt(new PsbtTransaction())) { + ;(this.data = nt), + (this.opts = Object.assign({}, DEFAULT_OPTS, et)), + (this.__CACHE = { + __NON_WITNESS_UTXO_TX_CACHE: [], + __NON_WITNESS_UTXO_BUF_CACHE: [], + __TX_IN_CACHE: {}, + __TX: this.data.globalMap.unsignedTx.tx, + __UNSAFE_SIGN_NONSEGWIT: !1, + }), + this.data.inputs.length === 0 && this.setVersion(2) + const rt = (it, ot, at, st) => Object.defineProperty(it, ot, { enumerable: at, writable: st }) + rt(this, '__CACHE', !1, !0), rt(this, 'opts', !1, !0) + } + get inputCount() { + return this.data.inputs.length + } + get version() { + return this.__CACHE.__TX.version + } + set version(et) { + this.setVersion(et) + } + get locktime() { + return this.__CACHE.__TX.locktime + } + set locktime(et) { + this.setLocktime(et) + } + get txInputs() { + return this.__CACHE.__TX.ins.map((et) => ({ + hash: (0, bufferutils_1.cloneBuffer)(et.hash), + index: et.index, + sequence: et.sequence, + })) + } + get txOutputs() { + return this.__CACHE.__TX.outs.map((et) => { + let nt + try { + nt = (0, address_1.fromOutputScript)(et.script, this.opts.network) + } catch {} + return { script: (0, bufferutils_1.cloneBuffer)(et.script), value: et.value, address: nt } + }) + } + combine(...et) { + return this.data.combine(...et.map((nt) => nt.data)), this + } + clone() { + const et = Psbt.fromBuffer(this.data.toBuffer()) + return (et.opts = JSON.parse(JSON.stringify(this.opts))), et + } + setMaximumFeeRate(et) { + check32Bit(et), (this.opts.maximumFeeRate = et) + } + setVersion(et) { + check32Bit(et), checkInputsForPartialSig(this.data.inputs, 'setVersion') + const nt = this.__CACHE + return (nt.__TX.version = et), (nt.__EXTRACTED_TX = void 0), this + } + setLocktime(et) { + check32Bit(et), checkInputsForPartialSig(this.data.inputs, 'setLocktime') + const nt = this.__CACHE + return (nt.__TX.locktime = et), (nt.__EXTRACTED_TX = void 0), this + } + setInputSequence(et, nt) { + check32Bit(nt), checkInputsForPartialSig(this.data.inputs, 'setInputSequence') + const rt = this.__CACHE + if (rt.__TX.ins.length <= et) throw new Error('Input index too high') + return (rt.__TX.ins[et].sequence = nt), (rt.__EXTRACTED_TX = void 0), this + } + addInputs(et) { + return et.forEach((nt) => this.addInput(nt)), this + } + addInput(et) { + if (arguments.length > 1 || !et || et.hash === void 0 || et.index === void 0) + throw new Error('Invalid arguments for Psbt.addInput. Requires single object with at least [hash] and [index]') + ;(0, bip371_1.checkTaprootInputFields)(et, et, 'addInput'), + checkInputsForPartialSig(this.data.inputs, 'addInput'), + et.witnessScript && checkInvalidP2WSH(et.witnessScript) + const nt = this.__CACHE + this.data.addInput(et) + const rt = nt.__TX.ins[nt.__TX.ins.length - 1] + checkTxInputCache(nt, rt) + const it = this.data.inputs.length - 1, + ot = this.data.inputs[it] + return ( + ot.nonWitnessUtxo && addNonWitnessTxCache(this.__CACHE, ot, it), + (nt.__FEE = void 0), + (nt.__FEE_RATE = void 0), + (nt.__EXTRACTED_TX = void 0), + this + ) + } + addOutputs(et) { + return et.forEach((nt) => this.addOutput(nt)), this + } + addOutput(et) { + if (arguments.length > 1 || !et || et.value === void 0 || (et.address === void 0 && et.script === void 0)) + throw new Error( + 'Invalid arguments for Psbt.addOutput. Requires single object with at least [script or address] and [value]', + ) + checkInputsForPartialSig(this.data.inputs, 'addOutput') + const { address: nt } = et + if (typeof nt == 'string') { + const { network: it } = this.opts, + ot = (0, address_1.toOutputScript)(nt, it) + et = Object.assign(et, { script: ot }) + } + ;(0, bip371_1.checkTaprootOutputFields)(et, et, 'addOutput') + const rt = this.__CACHE + return this.data.addOutput(et), (rt.__FEE = void 0), (rt.__FEE_RATE = void 0), (rt.__EXTRACTED_TX = void 0), this + } + extractTransaction(et) { + if (!this.data.inputs.every(isFinalized)) throw new Error('Not finalized') + const nt = this.__CACHE + if ((et || checkFees(this, nt, this.opts), nt.__EXTRACTED_TX)) return nt.__EXTRACTED_TX + const rt = nt.__TX.clone() + return inputFinalizeGetAmts(this.data.inputs, rt, nt, !0), rt + } + getFeeRate() { + return getTxCacheValue('__FEE_RATE', 'fee rate', this.data.inputs, this.__CACHE) + } + getFee() { + return getTxCacheValue('__FEE', 'fee', this.data.inputs, this.__CACHE) + } + finalizeAllInputs() { + return ( + (0, utils_1.checkForInput)(this.data.inputs, 0), + range$4(this.data.inputs.length).forEach((et) => this.finalizeInput(et)), + this + ) + } + finalizeInput(et, nt) { + const rt = (0, utils_1.checkForInput)(this.data.inputs, et) + return (0, bip371_1.isTaprootInput)(rt) + ? this._finalizeTaprootInput(et, rt, void 0, nt) + : this._finalizeInput(et, rt, nt) + } + finalizeTaprootInput(et, nt, rt = bip371_1.tapScriptFinalizer) { + const it = (0, utils_1.checkForInput)(this.data.inputs, et) + if ((0, bip371_1.isTaprootInput)(it)) return this._finalizeTaprootInput(et, it, nt, rt) + throw new Error(`Cannot finalize input #${et}. Not Taproot.`) + } + _finalizeInput(et, nt, rt = getFinalScripts) { + const { script: it, isP2SH: ot, isP2WSH: at, isSegwit: st } = getScriptFromInput(et, nt, this.__CACHE) + if (!it) throw new Error(`No script found for input #${et}`) + checkPartialSigSighashes(nt) + const { finalScriptSig: lt, finalScriptWitness: ct } = rt(et, nt, it, st, ot, at) + if ( + (lt && this.data.updateInput(et, { finalScriptSig: lt }), + ct && this.data.updateInput(et, { finalScriptWitness: ct }), + !lt && !ct) + ) + throw new Error(`Unknown error finalizing input #${et}`) + return this.data.clearFinalizedInput(et), this + } + _finalizeTaprootInput(et, nt, rt, it = bip371_1.tapScriptFinalizer) { + if (!nt.witnessUtxo) throw new Error(`Cannot finalize input #${et}. Missing withness utxo.`) + if (nt.tapKeySig) { + const ot = payments.p2tr({ output: nt.witnessUtxo.script, signature: nt.tapKeySig }), + at = (0, psbtutils_1.witnessStackToScriptWitness)(ot.witness) + this.data.updateInput(et, { finalScriptWitness: at }) + } else { + const { finalScriptWitness: ot } = it(et, nt, rt) + this.data.updateInput(et, { finalScriptWitness: ot }) + } + return this.data.clearFinalizedInput(et), this + } + getInputType(et) { + const nt = (0, utils_1.checkForInput)(this.data.inputs, et), + rt = getScriptFromUtxo(et, nt, this.__CACHE), + it = getMeaningfulScript( + rt, + et, + 'input', + nt.redeemScript || redeemFromFinalScriptSig(nt.finalScriptSig), + nt.witnessScript || redeemFromFinalWitnessScript(nt.finalScriptWitness), + ), + ot = it.type === 'raw' ? '' : it.type + '-', + at = classifyScript(it.meaningfulScript) + return ot + at + } + inputHasPubkey(et, nt) { + const rt = (0, utils_1.checkForInput)(this.data.inputs, et) + return pubkeyInInput(nt, rt, et, this.__CACHE) + } + inputHasHDKey(et, nt) { + const rt = (0, utils_1.checkForInput)(this.data.inputs, et), + it = bip32DerivationIsMine(nt) + return !!rt.bip32Derivation && rt.bip32Derivation.some(it) + } + outputHasPubkey(et, nt) { + const rt = (0, utils_1.checkForOutput)(this.data.outputs, et) + return pubkeyInOutput(nt, rt, et, this.__CACHE) + } + outputHasHDKey(et, nt) { + const rt = (0, utils_1.checkForOutput)(this.data.outputs, et), + it = bip32DerivationIsMine(nt) + return !!rt.bip32Derivation && rt.bip32Derivation.some(it) + } + validateSignaturesOfAllInputs(et) { + return ( + (0, utils_1.checkForInput)(this.data.inputs, 0), + range$4(this.data.inputs.length) + .map((rt) => this.validateSignaturesOfInput(rt, et)) + .reduce((rt, it) => it === !0 && rt, !0) + ) + } + validateSignaturesOfInput(et, nt, rt) { + const it = this.data.inputs[et] + return (0, bip371_1.isTaprootInput)(it) + ? this.validateSignaturesOfTaprootInput(et, nt, rt) + : this._validateSignaturesOfInput(et, nt, rt) + } + _validateSignaturesOfInput(et, nt, rt) { + const it = this.data.inputs[et], + ot = (it || {}).partialSig + if (!it || !ot || ot.length < 1) throw new Error('No signatures to validate') + if (typeof nt != 'function') throw new Error('Need validator function to validate signatures') + const at = rt ? ot.filter((ht) => ht.pubkey.equals(rt)) : ot + if (at.length < 1) throw new Error('No signatures for this pubkey') + const st = [] + let lt, ct, ut + for (const ht of at) { + const dt = bscript.signature.decode(ht.signature), + { hash: pt, script: mt } = + ut !== dt.hashType + ? getHashForSig(et, Object.assign({}, it, { sighashType: dt.hashType }), this.__CACHE, !0) + : { hash: lt, script: ct } + ;(ut = dt.hashType), + (lt = pt), + (ct = mt), + checkScriptForPubkey(ht.pubkey, mt, 'verify'), + st.push(nt(ht.pubkey, pt, dt.signature)) + } + return st.every((ht) => ht === !0) + } + validateSignaturesOfTaprootInput(et, nt, rt) { + const it = this.data.inputs[et], + ot = (it || {}).tapKeySig, + at = (it || {}).tapScriptSig + if (!it && !ot && !(at && !at.length)) throw new Error('No signatures to validate') + if (typeof nt != 'function') throw new Error('Need validator function to validate signatures') + rt = rt && (0, bip371_1.toXOnly)(rt) + const st = rt + ? getTaprootHashesForSig(et, it, this.data.inputs, rt, this.__CACHE) + : getAllTaprootHashesForSig(et, it, this.data.inputs, this.__CACHE) + if (!st.length) throw new Error('No signatures for this pubkey') + const lt = st.find((ut) => !ut.leafHash) + let ct = 0 + if (ot && lt) { + if (!nt(lt.pubkey, lt.hash, trimTaprootSig(ot))) return !1 + ct++ + } + if (at) + for (const ut of at) { + const ht = st.find((dt) => ut.pubkey.equals(dt.pubkey)) + if (ht) { + if (!nt(ut.pubkey, ht.hash, trimTaprootSig(ut.signature))) return !1 + ct++ + } + } + return ct > 0 + } + signAllInputsHD(et, nt = [transaction_1.Transaction.SIGHASH_ALL]) { + if (!et || !et.publicKey || !et.fingerprint) throw new Error('Need HDSigner to sign input') + const rt = [] + for (const it of range$4(this.data.inputs.length)) + try { + this.signInputHD(it, et, nt), rt.push(!0) + } catch { + rt.push(!1) + } + if (rt.every((it) => it === !1)) throw new Error('No inputs were signed') + return this + } + signAllInputsHDAsync(et, nt = [transaction_1.Transaction.SIGHASH_ALL]) { + return new Promise((rt, it) => { + if (!et || !et.publicKey || !et.fingerprint) return it(new Error('Need HDSigner to sign input')) + const ot = [], + at = [] + for (const st of range$4(this.data.inputs.length)) + at.push( + this.signInputHDAsync(st, et, nt).then( + () => { + ot.push(!0) + }, + () => { + ot.push(!1) + }, + ), + ) + return Promise.all(at).then(() => { + if (ot.every((st) => st === !1)) return it(new Error('No inputs were signed')) + rt() + }) + }) + } + signInputHD(et, nt, rt = [transaction_1.Transaction.SIGHASH_ALL]) { + if (!nt || !nt.publicKey || !nt.fingerprint) throw new Error('Need HDSigner to sign input') + return getSignersFromHD(et, this.data.inputs, nt).forEach((ot) => this.signInput(et, ot, rt)), this + } + signInputHDAsync(et, nt, rt = [transaction_1.Transaction.SIGHASH_ALL]) { + return new Promise((it, ot) => { + if (!nt || !nt.publicKey || !nt.fingerprint) return ot(new Error('Need HDSigner to sign input')) + const st = getSignersFromHD(et, this.data.inputs, nt).map((lt) => this.signInputAsync(et, lt, rt)) + return Promise.all(st) + .then(() => { + it() + }) + .catch(ot) + }) + } + signAllInputs(et, nt) { + if (!et || !et.publicKey) throw new Error('Need Signer to sign input') + const rt = [] + for (const it of range$4(this.data.inputs.length)) + try { + this.signInput(it, et, nt), rt.push(!0) + } catch { + rt.push(!1) + } + if (rt.every((it) => it === !1)) throw new Error('No inputs were signed') + return this + } + signAllInputsAsync(et, nt) { + return new Promise((rt, it) => { + if (!et || !et.publicKey) return it(new Error('Need Signer to sign input')) + const ot = [], + at = [] + for (const [st] of this.data.inputs.entries()) + at.push( + this.signInputAsync(st, et, nt).then( + () => { + ot.push(!0) + }, + () => { + ot.push(!1) + }, + ), + ) + return Promise.all(at).then(() => { + if (ot.every((st) => st === !1)) return it(new Error('No inputs were signed')) + rt() + }) + }) + } + signInput(et, nt, rt) { + if (!nt || !nt.publicKey) throw new Error('Need Signer to sign input') + const it = (0, utils_1.checkForInput)(this.data.inputs, et) + return (0, bip371_1.isTaprootInput)(it) + ? this._signTaprootInput(et, it, nt, void 0, rt) + : this._signInput(et, nt, rt) + } + signTaprootInput(et, nt, rt, it) { + if (!nt || !nt.publicKey) throw new Error('Need Signer to sign input') + const ot = (0, utils_1.checkForInput)(this.data.inputs, et) + if ((0, bip371_1.isTaprootInput)(ot)) return this._signTaprootInput(et, ot, nt, rt, it) + throw new Error(`Input #${et} is not of type Taproot.`) + } + _signInput(et, nt, rt = [transaction_1.Transaction.SIGHASH_ALL]) { + const { hash: it, sighashType: ot } = getHashAndSighashType(this.data.inputs, et, nt.publicKey, this.__CACHE, rt), + at = [{ pubkey: nt.publicKey, signature: bscript.signature.encode(nt.sign(it), ot) }] + return this.data.updateInput(et, { partialSig: at }), this + } + _signTaprootInput(et, nt, rt, it, ot = [transaction_1.Transaction.SIGHASH_DEFAULT]) { + const at = this.checkTaprootHashesForSig(et, nt, rt, it, ot), + st = at + .filter((ct) => !ct.leafHash) + .map((ct) => (0, bip371_1.serializeTaprootSignature)(rt.signSchnorr(ct.hash), nt.sighashType))[0], + lt = at + .filter((ct) => !!ct.leafHash) + .map((ct) => ({ + pubkey: (0, bip371_1.toXOnly)(rt.publicKey), + signature: (0, bip371_1.serializeTaprootSignature)(rt.signSchnorr(ct.hash), nt.sighashType), + leafHash: ct.leafHash, + })) + return ( + st && this.data.updateInput(et, { tapKeySig: st }), + lt.length && this.data.updateInput(et, { tapScriptSig: lt }), + this + ) + } + signInputAsync(et, nt, rt) { + return Promise.resolve().then(() => { + if (!nt || !nt.publicKey) throw new Error('Need Signer to sign input') + const it = (0, utils_1.checkForInput)(this.data.inputs, et) + return (0, bip371_1.isTaprootInput)(it) + ? this._signTaprootInputAsync(et, it, nt, void 0, rt) + : this._signInputAsync(et, nt, rt) + }) + } + signTaprootInputAsync(et, nt, rt, it) { + return Promise.resolve().then(() => { + if (!nt || !nt.publicKey) throw new Error('Need Signer to sign input') + const ot = (0, utils_1.checkForInput)(this.data.inputs, et) + if ((0, bip371_1.isTaprootInput)(ot)) return this._signTaprootInputAsync(et, ot, nt, rt, it) + throw new Error(`Input #${et} is not of type Taproot.`) + }) + } + _signInputAsync(et, nt, rt = [transaction_1.Transaction.SIGHASH_ALL]) { + const { hash: it, sighashType: ot } = getHashAndSighashType(this.data.inputs, et, nt.publicKey, this.__CACHE, rt) + return Promise.resolve(nt.sign(it)).then((at) => { + const st = [{ pubkey: nt.publicKey, signature: bscript.signature.encode(at, ot) }] + this.data.updateInput(et, { partialSig: st }) + }) + } + async _signTaprootInputAsync(et, nt, rt, it, ot = [transaction_1.Transaction.SIGHASH_DEFAULT]) { + const at = this.checkTaprootHashesForSig(et, nt, rt, it, ot), + st = [], + lt = at.filter((ut) => !ut.leafHash)[0] + if (lt) { + const ut = Promise.resolve(rt.signSchnorr(lt.hash)).then((ht) => ({ + tapKeySig: (0, bip371_1.serializeTaprootSignature)(ht, nt.sighashType), + })) + st.push(ut) + } + const ct = at.filter((ut) => !!ut.leafHash) + if (ct.length) { + const ut = ct.map((ht) => + Promise.resolve(rt.signSchnorr(ht.hash)).then((dt) => ({ + tapScriptSig: [ + { + pubkey: (0, bip371_1.toXOnly)(rt.publicKey), + signature: (0, bip371_1.serializeTaprootSignature)(dt, nt.sighashType), + leafHash: ht.leafHash, + }, + ], + })), + ) + st.push(...ut) + } + return Promise.all(st).then((ut) => { + ut.forEach((ht) => this.data.updateInput(et, ht)) + }) + } + checkTaprootHashesForSig(et, nt, rt, it, ot) { + if (typeof rt.signSchnorr != 'function') throw new Error(`Need Schnorr Signer to sign taproot input #${et}.`) + const at = getTaprootHashesForSig(et, nt, this.data.inputs, rt.publicKey, this.__CACHE, it, ot) + if (!at || !at.length) + throw new Error(`Can not sign for input #${et} with the key ${rt.publicKey.toString('hex')}`) + return at + } + toBuffer() { + return checkCache(this.__CACHE), this.data.toBuffer() + } + toHex() { + return checkCache(this.__CACHE), this.data.toHex() + } + toBase64() { + return checkCache(this.__CACHE), this.data.toBase64() + } + updateGlobal(et) { + return this.data.updateGlobal(et), this + } + updateInput(et, nt) { + return ( + nt.witnessScript && checkInvalidP2WSH(nt.witnessScript), + (0, bip371_1.checkTaprootInputFields)(this.data.inputs[et], nt, 'updateInput'), + this.data.updateInput(et, nt), + nt.nonWitnessUtxo && addNonWitnessTxCache(this.__CACHE, this.data.inputs[et], et), + this + ) + } + updateOutput(et, nt) { + const rt = this.data.outputs[et] + return (0, bip371_1.checkTaprootOutputFields)(rt, nt, 'updateOutput'), this.data.updateOutput(et, nt), this + } + addUnknownKeyValToGlobal(et) { + return this.data.addUnknownKeyValToGlobal(et), this + } + addUnknownKeyValToInput(et, nt) { + return this.data.addUnknownKeyValToInput(et, nt), this + } + addUnknownKeyValToOutput(et, nt) { + return this.data.addUnknownKeyValToOutput(et, nt), this + } + clearFinalizedInput(et) { + return this.data.clearFinalizedInput(et), this + } + } + psbt$1.Psbt = Psbt + const transactionFromBuffer = (tt) => new PsbtTransaction(tt) + class PsbtTransaction { + constructor(et = Buffer.from([2, 0, 0, 0, 0, 0, 0, 0, 0, 0])) { + ;(this.tx = transaction_1.Transaction.fromBuffer(et)), + checkTxEmpty(this.tx), + Object.defineProperty(this, 'tx', { enumerable: !1, writable: !0 }) + } + getInputOutputCounts() { + return { inputCount: this.tx.ins.length, outputCount: this.tx.outs.length } + } + addInput(et) { + if ( + et.hash === void 0 || + et.index === void 0 || + (!Buffer.isBuffer(et.hash) && typeof et.hash != 'string') || + typeof et.index != 'number' + ) + throw new Error('Error adding input.') + const nt = typeof et.hash == 'string' ? (0, bufferutils_1.reverseBuffer)(Buffer.from(et.hash, 'hex')) : et.hash + this.tx.addInput(nt, et.index, et.sequence) + } + addOutput(et) { + if (et.script === void 0 || et.value === void 0 || !Buffer.isBuffer(et.script) || typeof et.value != 'number') + throw new Error('Error adding output.') + this.tx.addOutput(et.script, et.value) + } + toBuffer() { + return this.tx.toBuffer() + } + } + function canFinalize(tt, et, nt) { + switch (nt) { + case 'pubkey': + case 'pubkeyhash': + case 'witnesspubkeyhash': + return hasSigs(1, tt.partialSig) + case 'multisig': + const rt = payments.p2ms({ output: et }) + return hasSigs(rt.m, tt.partialSig, rt.pubkeys) + default: + return !1 + } + } + function checkCache(tt) { + if (tt.__UNSAFE_SIGN_NONSEGWIT !== !1) throw new Error('Not BIP174 compliant, can not export') + } + function hasSigs(tt, et, nt) { + if (!et) return !1 + let rt + if ( + (nt + ? (rt = nt + .map((it) => { + const ot = compressPubkey(it) + return et.find((at) => at.pubkey.equals(ot)) + }) + .filter((it) => !!it)) + : (rt = et), + rt.length > tt) + ) + throw new Error('Too many signatures') + return rt.length === tt + } + function isFinalized(tt) { + return !!tt.finalScriptSig || !!tt.finalScriptWitness + } + function bip32DerivationIsMine(tt) { + return (et) => + !(!et.masterFingerprint.equals(tt.fingerprint) || !tt.derivePath(et.path).publicKey.equals(et.pubkey)) + } + function check32Bit(tt) { + if (typeof tt != 'number' || tt !== Math.floor(tt) || tt > 4294967295 || tt < 0) + throw new Error('Invalid 32 bit integer') + } + function checkFees(tt, et, nt) { + const rt = et.__FEE_RATE || tt.getFeeRate(), + it = et.__EXTRACTED_TX.virtualSize(), + ot = rt * it + if (rt >= nt.maximumFeeRate) + throw new Error( + `Warning: You are paying around ${(ot / 1e8).toFixed( + 8, + )} in fees, which is ${rt} satoshi per byte for a transaction with a VSize of ${it} bytes (segwit counted as 0.25 byte per byte). Use setMaximumFeeRate method to raise your threshold, or pass true to the first arg of extractTransaction.`, + ) + } + function checkInputsForPartialSig(tt, et) { + tt.forEach((nt) => { + if ( + (0, bip371_1.isTaprootInput)(nt) + ? (0, bip371_1.checkTaprootInputForSigs)(nt, et) + : (0, psbtutils_1.checkInputForSig)(nt, et) + ) + throw new Error('Can not modify transaction, signatures exist.') + }) + } + function checkPartialSigSighashes(tt) { + if (!tt.sighashType || !tt.partialSig) return + const { partialSig: et, sighashType: nt } = tt + et.forEach((rt) => { + const { hashType: it } = bscript.signature.decode(rt.signature) + if (nt !== it) throw new Error('Signature sighash does not match input sighash type') + }) + } + function checkScriptForPubkey(tt, et, nt) { + if (!(0, psbtutils_1.pubkeyInScript)(tt, et)) + throw new Error(`Can not ${nt} for this input with the key ${tt.toString('hex')}`) + } + function checkTxEmpty(tt) { + if (!tt.ins.every((nt) => nt.script && nt.script.length === 0 && nt.witness && nt.witness.length === 0)) + throw new Error('Format Error: Transaction ScriptSigs are not empty') + } + function checkTxForDupeIns(tt, et) { + tt.ins.forEach((nt) => { + checkTxInputCache(et, nt) + }) + } + function checkTxInputCache(tt, et) { + const nt = (0, bufferutils_1.reverseBuffer)(Buffer.from(et.hash)).toString('hex') + ':' + et.index + if (tt.__TX_IN_CACHE[nt]) throw new Error('Duplicate input detected.') + tt.__TX_IN_CACHE[nt] = 1 + } + function scriptCheckerFactory(tt, et) { + return (nt, rt, it, ot) => { + const at = tt({ redeem: { output: it } }).output + if (!rt.equals(at)) throw new Error(`${et} for ${ot} #${nt} doesn't match the scriptPubKey in the prevout`) + } + } + const checkRedeemScript = scriptCheckerFactory(payments.p2sh, 'Redeem script'), + checkWitnessScript = scriptCheckerFactory(payments.p2wsh, 'Witness script') + function getTxCacheValue(tt, et, nt, rt) { + if (!nt.every(isFinalized)) throw new Error(`PSBT must be finalized to calculate ${et}`) + if (tt === '__FEE_RATE' && rt.__FEE_RATE) return rt.__FEE_RATE + if (tt === '__FEE' && rt.__FEE) return rt.__FEE + let it, + ot = !0 + if ( + (rt.__EXTRACTED_TX ? ((it = rt.__EXTRACTED_TX), (ot = !1)) : (it = rt.__TX.clone()), + inputFinalizeGetAmts(nt, it, rt, ot), + tt === '__FEE_RATE') + ) + return rt.__FEE_RATE + if (tt === '__FEE') return rt.__FEE + } + function getFinalScripts(tt, et, nt, rt, it, ot) { + const at = classifyScript(nt) + if (!canFinalize(et, nt, at)) throw new Error(`Can not finalize input #${tt}`) + return prepareFinalScripts(nt, at, et.partialSig, rt, it, ot) + } + function prepareFinalScripts(tt, et, nt, rt, it, ot) { + let at, st + const lt = getPayment(tt, et, nt), + ct = ot ? payments.p2wsh({ redeem: lt }) : null, + ut = it ? payments.p2sh({ redeem: ct || lt }) : null + return ( + rt + ? (ct + ? (st = (0, psbtutils_1.witnessStackToScriptWitness)(ct.witness)) + : (st = (0, psbtutils_1.witnessStackToScriptWitness)(lt.witness)), + ut && (at = ut.input)) + : ut + ? (at = ut.input) + : (at = lt.input), + { finalScriptSig: at, finalScriptWitness: st } + ) + } + function getHashAndSighashType(tt, et, nt, rt, it) { + const ot = (0, utils_1.checkForInput)(tt, et), + { hash: at, sighashType: st, script: lt } = getHashForSig(et, ot, rt, !1, it) + return checkScriptForPubkey(nt, lt, 'sign'), { hash: at, sighashType: st } + } + function getHashForSig(tt, et, nt, rt, it) { + const ot = nt.__TX, + at = et.sighashType || transaction_1.Transaction.SIGHASH_ALL + checkSighashTypeAllowed(at, it) + let st, lt + if (et.nonWitnessUtxo) { + const ht = nonWitnessUtxoTxFromCache(nt, et, tt), + dt = ot.ins[tt].hash, + pt = ht.getHash() + if (!dt.equals(pt)) + throw new Error(`Non-witness UTXO hash for input #${tt} doesn't match the hash specified in the prevout`) + const mt = ot.ins[tt].index + lt = ht.outs[mt] + } else if (et.witnessUtxo) lt = et.witnessUtxo + else throw new Error('Need a Utxo input item for signing') + const { meaningfulScript: ct, type: ut } = getMeaningfulScript( + lt.script, + tt, + 'input', + et.redeemScript, + et.witnessScript, + ) + if (['p2sh-p2wsh', 'p2wsh'].indexOf(ut) >= 0) st = ot.hashForWitnessV0(tt, ct, lt.value, at) + else if ((0, psbtutils_1.isP2WPKH)(ct)) { + const ht = payments.p2pkh({ hash: ct.slice(2) }).output + st = ot.hashForWitnessV0(tt, ht, lt.value, at) + } else { + if (et.nonWitnessUtxo === void 0 && nt.__UNSAFE_SIGN_NONSEGWIT === !1) + throw new Error(`Input #${tt} has witnessUtxo but non-segwit script: ${ct.toString('hex')}`) + !rt && + nt.__UNSAFE_SIGN_NONSEGWIT !== !1 && + console.warn(`Warning: Signing non-segwit inputs without the full parent transaction means there is a chance that a miner could feed you incorrect information to trick you into paying large fees. This behavior is the same as Psbt's predecesor (TransactionBuilder - now removed) when signing non-segwit scripts. You are not able to export this Psbt with toBuffer|toBase64|toHex since it is not BIP174 compliant. +********************* +PROCEED WITH CAUTION! +*********************`), + (st = ot.hashForSignature(tt, ct, at)) + } + return { script: ct, sighashType: at, hash: st } + } + function getAllTaprootHashesForSig(tt, et, nt, rt) { + const it = [] + if (et.tapInternalKey) { + const at = getPrevoutTaprootKey(tt, et, rt) + at && it.push(at) + } + if (et.tapScriptSig) { + const at = et.tapScriptSig.map((st) => st.pubkey) + it.push(...at) + } + return it.map((at) => getTaprootHashesForSig(tt, et, nt, at, rt)).flat() + } + function getPrevoutTaprootKey(tt, et, nt) { + const { script: rt } = getScriptAndAmountFromUtxo(tt, et, nt) + return (0, psbtutils_1.isP2TR)(rt) ? rt.subarray(2, 34) : null + } + function trimTaprootSig(tt) { + return tt.length === 64 ? tt : tt.subarray(0, 64) + } + function getTaprootHashesForSig(tt, et, nt, rt, it, ot, at) { + const st = it.__TX, + lt = et.sighashType || transaction_1.Transaction.SIGHASH_DEFAULT + checkSighashTypeAllowed(lt, at) + const ct = nt.map((mt, gt) => getScriptAndAmountFromUtxo(gt, mt, it)), + ut = ct.map((mt) => mt.script), + ht = ct.map((mt) => mt.value), + dt = [] + if (et.tapInternalKey && !ot) { + const mt = getPrevoutTaprootKey(tt, et, it) || Buffer.from([]) + if ((0, bip371_1.toXOnly)(rt).equals(mt)) { + const gt = st.hashForWitnessV1(tt, ut, ht, lt) + dt.push({ pubkey: rt, hash: gt }) + } + } + const pt = (et.tapLeafScript || []) + .filter((mt) => (0, psbtutils_1.pubkeyInScript)(rt, mt.script)) + .map((mt) => { + const gt = (0, bip341_1.tapleafHash)({ output: mt.script, version: mt.leafVersion }) + return Object.assign({ hash: gt }, mt) + }) + .filter((mt) => !ot || ot.equals(mt.hash)) + .map((mt) => { + const gt = st.hashForWitnessV1(tt, ut, ht, transaction_1.Transaction.SIGHASH_DEFAULT, mt.hash) + return { pubkey: rt, hash: gt, leafHash: mt.hash } + }) + return dt.concat(pt) + } + function checkSighashTypeAllowed(tt, et) { + if (et && et.indexOf(tt) < 0) { + const nt = sighashTypeToString(tt) + throw new Error( + `Sighash type is not allowed. Retry the sign method passing the sighashTypes array of whitelisted types. Sighash type: ${nt}`, + ) + } + } + function getPayment(tt, et, nt) { + let rt + switch (et) { + case 'multisig': + const it = getSortedSigs(tt, nt) + rt = payments.p2ms({ output: tt, signatures: it }) + break + case 'pubkey': + rt = payments.p2pk({ output: tt, signature: nt[0].signature }) + break + case 'pubkeyhash': + rt = payments.p2pkh({ output: tt, pubkey: nt[0].pubkey, signature: nt[0].signature }) + break + case 'witnesspubkeyhash': + rt = payments.p2wpkh({ output: tt, pubkey: nt[0].pubkey, signature: nt[0].signature }) + break + } + return rt + } + function getScriptFromInput(tt, et, nt) { + const rt = nt.__TX, + it = { script: null, isSegwit: !1, isP2SH: !1, isP2WSH: !1 } + if (((it.isP2SH = !!et.redeemScript), (it.isP2WSH = !!et.witnessScript), et.witnessScript)) + it.script = et.witnessScript + else if (et.redeemScript) it.script = et.redeemScript + else if (et.nonWitnessUtxo) { + const ot = nonWitnessUtxoTxFromCache(nt, et, tt), + at = rt.ins[tt].index + it.script = ot.outs[at].script + } else et.witnessUtxo && (it.script = et.witnessUtxo.script) + return (et.witnessScript || (0, psbtutils_1.isP2WPKH)(it.script)) && (it.isSegwit = !0), it + } + function getSignersFromHD(tt, et, nt) { + const rt = (0, utils_1.checkForInput)(et, tt) + if (!rt.bip32Derivation || rt.bip32Derivation.length === 0) throw new Error('Need bip32Derivation to sign with HD') + const it = rt.bip32Derivation + .map((at) => { + if (at.masterFingerprint.equals(nt.fingerprint)) return at + }) + .filter((at) => !!at) + if (it.length === 0) throw new Error('Need one bip32Derivation masterFingerprint to match the HDSigner fingerprint') + return it.map((at) => { + const st = nt.derivePath(at.path) + if (!at.pubkey.equals(st.publicKey)) throw new Error('pubkey did not match bip32Derivation') + return st + }) + } + function getSortedSigs(tt, et) { + return payments + .p2ms({ output: tt }) + .pubkeys.map((rt) => (et.filter((it) => it.pubkey.equals(rt))[0] || {}).signature) + .filter((rt) => !!rt) + } + function scriptWitnessToWitnessStack(tt) { + let et = 0 + function nt(at) { + return (et += at), tt.slice(et - at, et) + } + function rt() { + const at = varuint.decode(tt, et) + return (et += varuint.decode.bytes), at + } + function it() { + return nt(rt()) + } + function ot() { + const at = rt(), + st = [] + for (let lt = 0; lt < at; lt++) st.push(it()) + return st + } + return ot() + } + function sighashTypeToString(tt) { + let et = tt & transaction_1.Transaction.SIGHASH_ANYONECANPAY ? 'SIGHASH_ANYONECANPAY | ' : '' + switch (tt & 31) { + case transaction_1.Transaction.SIGHASH_ALL: + et += 'SIGHASH_ALL' + break + case transaction_1.Transaction.SIGHASH_SINGLE: + et += 'SIGHASH_SINGLE' + break + case transaction_1.Transaction.SIGHASH_NONE: + et += 'SIGHASH_NONE' + break + } + return et + } + function addNonWitnessTxCache(tt, et, nt) { + tt.__NON_WITNESS_UTXO_BUF_CACHE[nt] = et.nonWitnessUtxo + const rt = transaction_1.Transaction.fromBuffer(et.nonWitnessUtxo) + tt.__NON_WITNESS_UTXO_TX_CACHE[nt] = rt + const it = tt, + ot = nt + delete et.nonWitnessUtxo, + Object.defineProperty(et, 'nonWitnessUtxo', { + enumerable: !0, + get() { + const at = it.__NON_WITNESS_UTXO_BUF_CACHE[ot], + st = it.__NON_WITNESS_UTXO_TX_CACHE[ot] + if (at !== void 0) return at + { + const lt = st.toBuffer() + return (it.__NON_WITNESS_UTXO_BUF_CACHE[ot] = lt), lt + } + }, + set(at) { + it.__NON_WITNESS_UTXO_BUF_CACHE[ot] = at + }, + }) + } + function inputFinalizeGetAmts(tt, et, nt, rt) { + let it = 0 + tt.forEach((lt, ct) => { + if ( + (rt && lt.finalScriptSig && (et.ins[ct].script = lt.finalScriptSig), + rt && lt.finalScriptWitness && (et.ins[ct].witness = scriptWitnessToWitnessStack(lt.finalScriptWitness)), + lt.witnessUtxo) + ) + it += lt.witnessUtxo.value + else if (lt.nonWitnessUtxo) { + const ut = nonWitnessUtxoTxFromCache(nt, lt, ct), + ht = et.ins[ct].index, + dt = ut.outs[ht] + it += dt.value + } + }) + const ot = et.outs.reduce((lt, ct) => lt + ct.value, 0), + at = it - ot + if (at < 0) throw new Error('Outputs are spending more than Inputs') + const st = et.virtualSize() + ;(nt.__FEE = at), (nt.__EXTRACTED_TX = et), (nt.__FEE_RATE = Math.floor(at / st)) + } + function nonWitnessUtxoTxFromCache(tt, et, nt) { + const rt = tt.__NON_WITNESS_UTXO_TX_CACHE + return rt[nt] || addNonWitnessTxCache(tt, et, nt), rt[nt] + } + function getScriptFromUtxo(tt, et, nt) { + const { script: rt } = getScriptAndAmountFromUtxo(tt, et, nt) + return rt + } + function getScriptAndAmountFromUtxo(tt, et, nt) { + if (et.witnessUtxo !== void 0) return { script: et.witnessUtxo.script, value: et.witnessUtxo.value } + if (et.nonWitnessUtxo !== void 0) { + const it = nonWitnessUtxoTxFromCache(nt, et, tt).outs[nt.__TX.ins[tt].index] + return { script: it.script, value: it.value } + } else throw new Error("Can't find pubkey in input without Utxo data") + } + function pubkeyInInput(tt, et, nt, rt) { + const it = getScriptFromUtxo(nt, et, rt), + { meaningfulScript: ot } = getMeaningfulScript(it, nt, 'input', et.redeemScript, et.witnessScript) + return (0, psbtutils_1.pubkeyInScript)(tt, ot) + } + function pubkeyInOutput(tt, et, nt, rt) { + const it = rt.__TX.outs[nt].script, + { meaningfulScript: ot } = getMeaningfulScript(it, nt, 'output', et.redeemScript, et.witnessScript) + return (0, psbtutils_1.pubkeyInScript)(tt, ot) + } + function redeemFromFinalScriptSig(tt) { + if (!tt) return + const et = bscript.decompile(tt) + if (!et) return + const nt = et[et.length - 1] + if (!(!Buffer.isBuffer(nt) || isPubkeyLike(nt) || isSigLike(nt) || !bscript.decompile(nt))) return nt + } + function redeemFromFinalWitnessScript(tt) { + if (!tt) return + const et = scriptWitnessToWitnessStack(tt), + nt = et[et.length - 1] + if (!(isPubkeyLike(nt) || !bscript.decompile(nt))) return nt + } + function compressPubkey(tt) { + if (tt.length === 65) { + const et = tt[64] & 1, + nt = tt.slice(0, 33) + return (nt[0] = 2 | et), nt + } + return tt.slice() + } + function isPubkeyLike(tt) { + return tt.length === 33 && bscript.isCanonicalPubKey(tt) + } + function isSigLike(tt) { + return bscript.isCanonicalScriptSignature(tt) + } + function getMeaningfulScript(tt, et, nt, rt, it) { + const ot = (0, psbtutils_1.isP2SHScript)(tt), + at = ot && rt && (0, psbtutils_1.isP2WSHScript)(rt), + st = (0, psbtutils_1.isP2WSHScript)(tt) + if (ot && rt === void 0) throw new Error('scriptPubkey is P2SH but redeemScript missing') + if ((st || at) && it === void 0) throw new Error('scriptPubkey or redeemScript is P2WSH but witnessScript missing') + let lt + return ( + at + ? ((lt = it), checkRedeemScript(et, tt, rt, nt), checkWitnessScript(et, rt, it, nt), checkInvalidP2WSH(lt)) + : st + ? ((lt = it), checkWitnessScript(et, tt, it, nt), checkInvalidP2WSH(lt)) + : ot + ? ((lt = rt), checkRedeemScript(et, tt, rt, nt)) + : (lt = tt), + { meaningfulScript: lt, type: at ? 'p2sh-p2wsh' : ot ? 'p2sh' : st ? 'p2wsh' : 'raw' } + ) + } + function checkInvalidP2WSH(tt) { + if ((0, psbtutils_1.isP2WPKH)(tt) || (0, psbtutils_1.isP2SHScript)(tt)) + throw new Error('P2WPKH or P2SH can not be contained within P2WSH') + } + function classifyScript(tt) { + return (0, psbtutils_1.isP2WPKH)(tt) + ? 'witnesspubkeyhash' + : (0, psbtutils_1.isP2PKH)(tt) + ? 'pubkeyhash' + : (0, psbtutils_1.isP2MS)(tt) + ? 'multisig' + : (0, psbtutils_1.isP2PK)(tt) + ? 'pubkey' + : 'nonstandard' + } + function range$4(tt) { + return [...Array(tt).keys()] + } + ;(function (tt) { + Object.defineProperty(tt, '__esModule', { value: !0 }), + (tt.initEccLib = + tt.Transaction = + tt.opcodes = + tt.Psbt = + tt.Block = + tt.script = + tt.payments = + tt.networks = + tt.crypto = + tt.address = + void 0) + const et = address + tt.address = et + const nt = crypto$2 + tt.crypto = nt + const rt = networks$1 + tt.networks = rt + const it = payments$3 + tt.payments = it + const ot = script + tt.script = ot + var at = block + Object.defineProperty(tt, 'Block', { + enumerable: !0, + get: function () { + return at.Block + }, + }) + var st = psbt$1 + Object.defineProperty(tt, 'Psbt', { + enumerable: !0, + get: function () { + return st.Psbt + }, + }) + var lt = ops + Object.defineProperty(tt, 'opcodes', { + enumerable: !0, + get: function () { + return lt.OPS + }, + }) + var ct = transaction + Object.defineProperty(tt, 'Transaction', { + enumerable: !0, + get: function () { + return ct.Transaction + }, + }) + var ut = ecc_lib + Object.defineProperty(tt, 'initEccLib', { + enumerable: !0, + get: function () { + return ut.initEccLib + }, + }) + })(src$1) + function listCacheClear$1() { + ;(this.__data__ = []), (this.size = 0) + } + var _listCacheClear = listCacheClear$1 + function eq$4(tt, et) { + return tt === et || (tt !== tt && et !== et) + } + var eq_1 = eq$4, + eq$3 = eq_1 + function assocIndexOf$4(tt, et) { + for (var nt = tt.length; nt--; ) if (eq$3(tt[nt][0], et)) return nt + return -1 + } + var _assocIndexOf = assocIndexOf$4, + assocIndexOf$3 = _assocIndexOf, + arrayProto = Array.prototype, + splice = arrayProto.splice + function listCacheDelete$1(tt) { + var et = this.__data__, + nt = assocIndexOf$3(et, tt) + if (nt < 0) return !1 + var rt = et.length - 1 + return nt == rt ? et.pop() : splice.call(et, nt, 1), --this.size, !0 + } + var _listCacheDelete = listCacheDelete$1, + assocIndexOf$2 = _assocIndexOf + function listCacheGet$1(tt) { + var et = this.__data__, + nt = assocIndexOf$2(et, tt) + return nt < 0 ? void 0 : et[nt][1] + } + var _listCacheGet = listCacheGet$1, + assocIndexOf$1 = _assocIndexOf + function listCacheHas$1(tt) { + return assocIndexOf$1(this.__data__, tt) > -1 + } + var _listCacheHas = listCacheHas$1, + assocIndexOf = _assocIndexOf + function listCacheSet$1(tt, et) { + var nt = this.__data__, + rt = assocIndexOf(nt, tt) + return rt < 0 ? (++this.size, nt.push([tt, et])) : (nt[rt][1] = et), this + } + var _listCacheSet = listCacheSet$1, + listCacheClear = _listCacheClear, + listCacheDelete = _listCacheDelete, + listCacheGet = _listCacheGet, + listCacheHas = _listCacheHas, + listCacheSet = _listCacheSet + function ListCache$4(tt) { + var et = -1, + nt = tt == null ? 0 : tt.length + for (this.clear(); ++et < nt; ) { + var rt = tt[et] + this.set(rt[0], rt[1]) + } + } + ListCache$4.prototype.clear = listCacheClear + ListCache$4.prototype.delete = listCacheDelete + ListCache$4.prototype.get = listCacheGet + ListCache$4.prototype.has = listCacheHas + ListCache$4.prototype.set = listCacheSet + var _ListCache = ListCache$4, + ListCache$3 = _ListCache + function stackClear$1() { + ;(this.__data__ = new ListCache$3()), (this.size = 0) + } + var _stackClear = stackClear$1 + function stackDelete$1(tt) { + var et = this.__data__, + nt = et.delete(tt) + return (this.size = et.size), nt + } + var _stackDelete = stackDelete$1 + function stackGet$1(tt) { + return this.__data__.get(tt) + } + var _stackGet = stackGet$1 + function stackHas$1(tt) { + return this.__data__.has(tt) + } + var _stackHas = stackHas$1, + freeGlobal$1 = + typeof commonjsGlobal == 'object' && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal, + _freeGlobal = freeGlobal$1, + freeGlobal = _freeGlobal, + freeSelf = typeof self == 'object' && self && self.Object === Object && self, + root$b = freeGlobal || freeSelf || Function('return this')(), + _root = root$b, + root$a = _root, + Symbol$8 = root$a.Symbol, + _Symbol = Symbol$8, + Symbol$7 = _Symbol, + objectProto$f = Object.prototype, + hasOwnProperty$d = objectProto$f.hasOwnProperty, + nativeObjectToString$1 = objectProto$f.toString, + symToStringTag$1 = Symbol$7 ? Symbol$7.toStringTag : void 0 + function getRawTag$1(tt) { + var et = hasOwnProperty$d.call(tt, symToStringTag$1), + nt = tt[symToStringTag$1] + try { + tt[symToStringTag$1] = void 0 + var rt = !0 + } catch {} + var it = nativeObjectToString$1.call(tt) + return rt && (et ? (tt[symToStringTag$1] = nt) : delete tt[symToStringTag$1]), it + } + var _getRawTag = getRawTag$1, + objectProto$e = Object.prototype, + nativeObjectToString = objectProto$e.toString + function objectToString$1(tt) { + return nativeObjectToString.call(tt) + } + var _objectToString = objectToString$1, + Symbol$6 = _Symbol, + getRawTag = _getRawTag, + objectToString = _objectToString, + nullTag = '[object Null]', + undefinedTag = '[object Undefined]', + symToStringTag = Symbol$6 ? Symbol$6.toStringTag : void 0 + function baseGetTag$9(tt) { + return tt == null + ? tt === void 0 + ? undefinedTag + : nullTag + : symToStringTag && symToStringTag in Object(tt) + ? getRawTag(tt) + : objectToString(tt) + } + var _baseGetTag = baseGetTag$9 + function isObject$d(tt) { + var et = typeof tt + return tt != null && (et == 'object' || et == 'function') + } + var isObject_1 = isObject$d + const _isObject$1 = getDefaultExportFromCjs(isObject_1) + var baseGetTag$8 = _baseGetTag, + isObject$c = isObject_1, + asyncTag = '[object AsyncFunction]', + funcTag$2 = '[object Function]', + genTag$1 = '[object GeneratorFunction]', + proxyTag = '[object Proxy]' + function isFunction$5(tt) { + if (!isObject$c(tt)) return !1 + var et = baseGetTag$8(tt) + return et == funcTag$2 || et == genTag$1 || et == asyncTag || et == proxyTag + } + var isFunction_1 = isFunction$5 + const _isFunction$1 = getDefaultExportFromCjs(isFunction_1) + var root$9 = _root, + coreJsData$1 = root$9['__core-js_shared__'], + _coreJsData = coreJsData$1, + coreJsData = _coreJsData, + maskSrcKey = (function () { + var tt = /[^.]+$/.exec((coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO) || '') + return tt ? 'Symbol(src)_1.' + tt : '' + })() + function isMasked$1(tt) { + return !!maskSrcKey && maskSrcKey in tt + } + var _isMasked = isMasked$1, + funcProto$2 = Function.prototype, + funcToString$2 = funcProto$2.toString + function toSource$2(tt) { + if (tt != null) { + try { + return funcToString$2.call(tt) + } catch {} + try { + return tt + '' + } catch {} + } + return '' + } + var _toSource = toSource$2, + isFunction$4 = isFunction_1, + isMasked = _isMasked, + isObject$b = isObject_1, + toSource$1 = _toSource, + reRegExpChar = /[\\^$.*+?()[\]{}|]/g, + reIsHostCtor = /^\[object .+?Constructor\]$/, + funcProto$1 = Function.prototype, + objectProto$d = Object.prototype, + funcToString$1 = funcProto$1.toString, + hasOwnProperty$c = objectProto$d.hasOwnProperty, + reIsNative = RegExp( + '^' + + funcToString$1 + .call(hasOwnProperty$c) + .replace(reRegExpChar, '\\$&') + .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + + '$', + ) + function baseIsNative$1(tt) { + if (!isObject$b(tt) || isMasked(tt)) return !1 + var et = isFunction$4(tt) ? reIsNative : reIsHostCtor + return et.test(toSource$1(tt)) + } + var _baseIsNative = baseIsNative$1 + function getValue$1(tt, et) { + return tt == null ? void 0 : tt[et] + } + var _getValue = getValue$1, + baseIsNative = _baseIsNative, + getValue = _getValue + function getNative$7(tt, et) { + var nt = getValue(tt, et) + return baseIsNative(nt) ? nt : void 0 + } + var _getNative = getNative$7, + getNative$6 = _getNative, + root$8 = _root, + Map$4 = getNative$6(root$8, 'Map'), + _Map = Map$4, + getNative$5 = _getNative, + nativeCreate$4 = getNative$5(Object, 'create'), + _nativeCreate = nativeCreate$4, + nativeCreate$3 = _nativeCreate + function hashClear$1() { + ;(this.__data__ = nativeCreate$3 ? nativeCreate$3(null) : {}), (this.size = 0) + } + var _hashClear = hashClear$1 + function hashDelete$1(tt) { + var et = this.has(tt) && delete this.__data__[tt] + return (this.size -= et ? 1 : 0), et + } + var _hashDelete = hashDelete$1, + nativeCreate$2 = _nativeCreate, + HASH_UNDEFINED$2 = '__lodash_hash_undefined__', + objectProto$c = Object.prototype, + hasOwnProperty$b = objectProto$c.hasOwnProperty + function hashGet$1(tt) { + var et = this.__data__ + if (nativeCreate$2) { + var nt = et[tt] + return nt === HASH_UNDEFINED$2 ? void 0 : nt + } + return hasOwnProperty$b.call(et, tt) ? et[tt] : void 0 + } + var _hashGet = hashGet$1, + nativeCreate$1 = _nativeCreate, + objectProto$b = Object.prototype, + hasOwnProperty$a = objectProto$b.hasOwnProperty + function hashHas$1(tt) { + var et = this.__data__ + return nativeCreate$1 ? et[tt] !== void 0 : hasOwnProperty$a.call(et, tt) + } + var _hashHas = hashHas$1, + nativeCreate = _nativeCreate, + HASH_UNDEFINED$1 = '__lodash_hash_undefined__' + function hashSet$1(tt, et) { + var nt = this.__data__ + return (this.size += this.has(tt) ? 0 : 1), (nt[tt] = nativeCreate && et === void 0 ? HASH_UNDEFINED$1 : et), this + } + var _hashSet = hashSet$1, + hashClear = _hashClear, + hashDelete = _hashDelete, + hashGet = _hashGet, + hashHas = _hashHas, + hashSet = _hashSet + function Hash$1(tt) { + var et = -1, + nt = tt == null ? 0 : tt.length + for (this.clear(); ++et < nt; ) { + var rt = tt[et] + this.set(rt[0], rt[1]) + } + } + Hash$1.prototype.clear = hashClear + Hash$1.prototype.delete = hashDelete + Hash$1.prototype.get = hashGet + Hash$1.prototype.has = hashHas + Hash$1.prototype.set = hashSet + var _Hash = Hash$1, + Hash = _Hash, + ListCache$2 = _ListCache, + Map$3 = _Map + function mapCacheClear$1() { + ;(this.size = 0), (this.__data__ = { hash: new Hash(), map: new (Map$3 || ListCache$2)(), string: new Hash() }) + } + var _mapCacheClear = mapCacheClear$1 + function isKeyable$1(tt) { + var et = typeof tt + return et == 'string' || et == 'number' || et == 'symbol' || et == 'boolean' ? tt !== '__proto__' : tt === null + } + var _isKeyable = isKeyable$1, + isKeyable = _isKeyable + function getMapData$4(tt, et) { + var nt = tt.__data__ + return isKeyable(et) ? nt[typeof et == 'string' ? 'string' : 'hash'] : nt.map + } + var _getMapData = getMapData$4, + getMapData$3 = _getMapData + function mapCacheDelete$1(tt) { + var et = getMapData$3(this, tt).delete(tt) + return (this.size -= et ? 1 : 0), et + } + var _mapCacheDelete = mapCacheDelete$1, + getMapData$2 = _getMapData + function mapCacheGet$1(tt) { + return getMapData$2(this, tt).get(tt) + } + var _mapCacheGet = mapCacheGet$1, + getMapData$1 = _getMapData + function mapCacheHas$1(tt) { + return getMapData$1(this, tt).has(tt) + } + var _mapCacheHas = mapCacheHas$1, + getMapData = _getMapData + function mapCacheSet$1(tt, et) { + var nt = getMapData(this, tt), + rt = nt.size + return nt.set(tt, et), (this.size += nt.size == rt ? 0 : 1), this + } + var _mapCacheSet = mapCacheSet$1, + mapCacheClear = _mapCacheClear, + mapCacheDelete = _mapCacheDelete, + mapCacheGet = _mapCacheGet, + mapCacheHas = _mapCacheHas, + mapCacheSet = _mapCacheSet + function MapCache$3(tt) { + var et = -1, + nt = tt == null ? 0 : tt.length + for (this.clear(); ++et < nt; ) { + var rt = tt[et] + this.set(rt[0], rt[1]) + } + } + MapCache$3.prototype.clear = mapCacheClear + MapCache$3.prototype.delete = mapCacheDelete + MapCache$3.prototype.get = mapCacheGet + MapCache$3.prototype.has = mapCacheHas + MapCache$3.prototype.set = mapCacheSet + var _MapCache = MapCache$3, + ListCache$1 = _ListCache, + Map$2 = _Map, + MapCache$2 = _MapCache, + LARGE_ARRAY_SIZE$1 = 200 + function stackSet$1(tt, et) { + var nt = this.__data__ + if (nt instanceof ListCache$1) { + var rt = nt.__data__ + if (!Map$2 || rt.length < LARGE_ARRAY_SIZE$1 - 1) return rt.push([tt, et]), (this.size = ++nt.size), this + nt = this.__data__ = new MapCache$2(rt) + } + return nt.set(tt, et), (this.size = nt.size), this + } + var _stackSet = stackSet$1, + ListCache = _ListCache, + stackClear = _stackClear, + stackDelete = _stackDelete, + stackGet = _stackGet, + stackHas = _stackHas, + stackSet = _stackSet + function Stack$3(tt) { + var et = (this.__data__ = new ListCache(tt)) + this.size = et.size + } + Stack$3.prototype.clear = stackClear + Stack$3.prototype.delete = stackDelete + Stack$3.prototype.get = stackGet + Stack$3.prototype.has = stackHas + Stack$3.prototype.set = stackSet + var _Stack = Stack$3 + function arrayEach$1(tt, et) { + for (var nt = -1, rt = tt == null ? 0 : tt.length; ++nt < rt && et(tt[nt], nt, tt) !== !1; ); + return tt + } + var _arrayEach = arrayEach$1, + getNative$4 = _getNative, + defineProperty$2 = (function () { + try { + var tt = getNative$4(Object, 'defineProperty') + return tt({}, '', {}), tt + } catch {} + })(), + _defineProperty$D = defineProperty$2, + defineProperty$1 = _defineProperty$D + function baseAssignValue$3(tt, et, nt) { + et == '__proto__' && defineProperty$1 + ? defineProperty$1(tt, et, { configurable: !0, enumerable: !0, value: nt, writable: !0 }) + : (tt[et] = nt) + } + var _baseAssignValue = baseAssignValue$3, + baseAssignValue$2 = _baseAssignValue, + eq$2 = eq_1, + objectProto$a = Object.prototype, + hasOwnProperty$9 = objectProto$a.hasOwnProperty + function assignValue$2(tt, et, nt) { + var rt = tt[et] + ;(!(hasOwnProperty$9.call(tt, et) && eq$2(rt, nt)) || (nt === void 0 && !(et in tt))) && + baseAssignValue$2(tt, et, nt) + } + var _assignValue = assignValue$2, + assignValue$1 = _assignValue, + baseAssignValue$1 = _baseAssignValue + function copyObject$4(tt, et, nt, rt) { + var it = !nt + nt || (nt = {}) + for (var ot = -1, at = et.length; ++ot < at; ) { + var st = et[ot], + lt = rt ? rt(nt[st], tt[st], st, nt, tt) : void 0 + lt === void 0 && (lt = tt[st]), it ? baseAssignValue$1(nt, st, lt) : assignValue$1(nt, st, lt) + } + return nt + } + var _copyObject = copyObject$4 + function baseTimes$1(tt, et) { + for (var nt = -1, rt = Array(tt); ++nt < tt; ) rt[nt] = et(nt) + return rt + } + var _baseTimes = baseTimes$1 + function isObjectLike$b(tt) { + return tt != null && typeof tt == 'object' + } + var isObjectLike_1 = isObjectLike$b, + baseGetTag$7 = _baseGetTag, + isObjectLike$a = isObjectLike_1, + argsTag$3 = '[object Arguments]' + function baseIsArguments$1(tt) { + return isObjectLike$a(tt) && baseGetTag$7(tt) == argsTag$3 + } + var _baseIsArguments = baseIsArguments$1, + baseIsArguments = _baseIsArguments, + isObjectLike$9 = isObjectLike_1, + objectProto$9 = Object.prototype, + hasOwnProperty$8 = objectProto$9.hasOwnProperty, + propertyIsEnumerable$1 = objectProto$9.propertyIsEnumerable, + isArguments$3 = baseIsArguments( + (function () { + return arguments + })(), + ) + ? baseIsArguments + : function (tt) { + return isObjectLike$9(tt) && hasOwnProperty$8.call(tt, 'callee') && !propertyIsEnumerable$1.call(tt, 'callee') + }, + isArguments_1 = isArguments$3, + isArray$i = Array.isArray, + isArray_1 = isArray$i + const _isArray$1 = getDefaultExportFromCjs(isArray_1) + var isBuffer$3 = { exports: {} } + function stubFalse() { + return !1 + } + var stubFalse_1 = stubFalse + isBuffer$3.exports + ;(function (tt, et) { + var nt = _root, + rt = stubFalse_1, + it = et && !et.nodeType && et, + ot = it && !0 && tt && !tt.nodeType && tt, + at = ot && ot.exports === it, + st = at ? nt.Buffer : void 0, + lt = st ? st.isBuffer : void 0, + ct = lt || rt + tt.exports = ct + })(isBuffer$3, isBuffer$3.exports) + var isBufferExports = isBuffer$3.exports, + MAX_SAFE_INTEGER$2 = 9007199254740991, + reIsUint = /^(?:0|[1-9]\d*)$/ + function isIndex$3(tt, et) { + var nt = typeof tt + return ( + (et = et ?? MAX_SAFE_INTEGER$2), + !!et && (nt == 'number' || (nt != 'symbol' && reIsUint.test(tt))) && tt > -1 && tt % 1 == 0 && tt < et + ) + } + var _isIndex = isIndex$3, + MAX_SAFE_INTEGER$1 = 9007199254740991 + function isLength$3(tt) { + return typeof tt == 'number' && tt > -1 && tt % 1 == 0 && tt <= MAX_SAFE_INTEGER$1 + } + var isLength_1 = isLength$3, + baseGetTag$6 = _baseGetTag, + isLength$2 = isLength_1, + isObjectLike$8 = isObjectLike_1, + argsTag$2 = '[object Arguments]', + arrayTag$2 = '[object Array]', + boolTag$4 = '[object Boolean]', + dateTag$3 = '[object Date]', + errorTag$2 = '[object Error]', + funcTag$1 = '[object Function]', + mapTag$5 = '[object Map]', + numberTag$4 = '[object Number]', + objectTag$4 = '[object Object]', + regexpTag$3 = '[object RegExp]', + setTag$5 = '[object Set]', + stringTag$4 = '[object String]', + weakMapTag$2 = '[object WeakMap]', + arrayBufferTag$3 = '[object ArrayBuffer]', + dataViewTag$4 = '[object DataView]', + float32Tag$2 = '[object Float32Array]', + float64Tag$2 = '[object Float64Array]', + int8Tag$2 = '[object Int8Array]', + int16Tag$2 = '[object Int16Array]', + int32Tag$2 = '[object Int32Array]', + uint8Tag$2 = '[object Uint8Array]', + uint8ClampedTag$2 = '[object Uint8ClampedArray]', + uint16Tag$2 = '[object Uint16Array]', + uint32Tag$2 = '[object Uint32Array]', + typedArrayTags = {} + typedArrayTags[float32Tag$2] = + typedArrayTags[float64Tag$2] = + typedArrayTags[int8Tag$2] = + typedArrayTags[int16Tag$2] = + typedArrayTags[int32Tag$2] = + typedArrayTags[uint8Tag$2] = + typedArrayTags[uint8ClampedTag$2] = + typedArrayTags[uint16Tag$2] = + typedArrayTags[uint32Tag$2] = + !0 + typedArrayTags[argsTag$2] = + typedArrayTags[arrayTag$2] = + typedArrayTags[arrayBufferTag$3] = + typedArrayTags[boolTag$4] = + typedArrayTags[dataViewTag$4] = + typedArrayTags[dateTag$3] = + typedArrayTags[errorTag$2] = + typedArrayTags[funcTag$1] = + typedArrayTags[mapTag$5] = + typedArrayTags[numberTag$4] = + typedArrayTags[objectTag$4] = + typedArrayTags[regexpTag$3] = + typedArrayTags[setTag$5] = + typedArrayTags[stringTag$4] = + typedArrayTags[weakMapTag$2] = + !1 + function baseIsTypedArray$1(tt) { + return isObjectLike$8(tt) && isLength$2(tt.length) && !!typedArrayTags[baseGetTag$6(tt)] + } + var _baseIsTypedArray = baseIsTypedArray$1 + function baseUnary$4(tt) { + return function (et) { + return tt(et) + } + } + var _baseUnary = baseUnary$4, + _nodeUtil = { exports: {} } + _nodeUtil.exports + ;(function (tt, et) { + var nt = _freeGlobal, + rt = et && !et.nodeType && et, + it = rt && !0 && tt && !tt.nodeType && tt, + ot = it && it.exports === rt, + at = ot && nt.process, + st = (function () { + try { + var lt = it && it.require && it.require('util').types + return lt || (at && at.binding && at.binding('util')) + } catch {} + })() + tt.exports = st + })(_nodeUtil, _nodeUtil.exports) + var _nodeUtilExports = _nodeUtil.exports, + baseIsTypedArray = _baseIsTypedArray, + baseUnary$3 = _baseUnary, + nodeUtil$2 = _nodeUtilExports, + nodeIsTypedArray = nodeUtil$2 && nodeUtil$2.isTypedArray, + isTypedArray$4 = nodeIsTypedArray ? baseUnary$3(nodeIsTypedArray) : baseIsTypedArray, + isTypedArray_1 = isTypedArray$4, + baseTimes = _baseTimes, + isArguments$2 = isArguments_1, + isArray$h = isArray_1, + isBuffer$2 = isBufferExports, + isIndex$2 = _isIndex, + isTypedArray$3 = isTypedArray_1, + objectProto$8 = Object.prototype, + hasOwnProperty$7 = objectProto$8.hasOwnProperty + function arrayLikeKeys$2(tt, et) { + var nt = isArray$h(tt), + rt = !nt && isArguments$2(tt), + it = !nt && !rt && isBuffer$2(tt), + ot = !nt && !rt && !it && isTypedArray$3(tt), + at = nt || rt || it || ot, + st = at ? baseTimes(tt.length, String) : [], + lt = st.length + for (var ct in tt) + (et || hasOwnProperty$7.call(tt, ct)) && + !( + at && + (ct == 'length' || + (it && (ct == 'offset' || ct == 'parent')) || + (ot && (ct == 'buffer' || ct == 'byteLength' || ct == 'byteOffset')) || + isIndex$2(ct, lt)) + ) && + st.push(ct) + return st + } + var _arrayLikeKeys = arrayLikeKeys$2, + objectProto$7 = Object.prototype + function isPrototype$3(tt) { + var et = tt && tt.constructor, + nt = (typeof et == 'function' && et.prototype) || objectProto$7 + return tt === nt + } + var _isPrototype = isPrototype$3 + function overArg$2(tt, et) { + return function (nt) { + return tt(et(nt)) + } + } + var _overArg = overArg$2, + overArg$1 = _overArg, + nativeKeys$1 = overArg$1(Object.keys, Object), + _nativeKeys = nativeKeys$1, + isPrototype$2 = _isPrototype, + nativeKeys = _nativeKeys, + objectProto$6 = Object.prototype, + hasOwnProperty$6 = objectProto$6.hasOwnProperty + function baseKeys$1(tt) { + if (!isPrototype$2(tt)) return nativeKeys(tt) + var et = [] + for (var nt in Object(tt)) hasOwnProperty$6.call(tt, nt) && nt != 'constructor' && et.push(nt) + return et + } + var _baseKeys = baseKeys$1, + isFunction$3 = isFunction_1, + isLength$1 = isLength_1 + function isArrayLike$6(tt) { + return tt != null && isLength$1(tt.length) && !isFunction$3(tt) + } + var isArrayLike_1 = isArrayLike$6, + arrayLikeKeys$1 = _arrayLikeKeys, + baseKeys = _baseKeys, + isArrayLike$5 = isArrayLike_1 + function keys$9(tt) { + return isArrayLike$5(tt) ? arrayLikeKeys$1(tt) : baseKeys(tt) + } + var keys_1 = keys$9, + copyObject$3 = _copyObject, + keys$8 = keys_1 + function baseAssign$1(tt, et) { + return tt && copyObject$3(et, keys$8(et), tt) + } + var _baseAssign = baseAssign$1 + function nativeKeysIn$1(tt) { + var et = [] + if (tt != null) for (var nt in Object(tt)) et.push(nt) + return et + } + var _nativeKeysIn = nativeKeysIn$1, + isObject$a = isObject_1, + isPrototype$1 = _isPrototype, + nativeKeysIn = _nativeKeysIn, + objectProto$5 = Object.prototype, + hasOwnProperty$5 = objectProto$5.hasOwnProperty + function baseKeysIn$1(tt) { + if (!isObject$a(tt)) return nativeKeysIn(tt) + var et = isPrototype$1(tt), + nt = [] + for (var rt in tt) (rt == 'constructor' && (et || !hasOwnProperty$5.call(tt, rt))) || nt.push(rt) + return nt + } + var _baseKeysIn = baseKeysIn$1, + arrayLikeKeys = _arrayLikeKeys, + baseKeysIn = _baseKeysIn, + isArrayLike$4 = isArrayLike_1 + function keysIn$3(tt) { + return isArrayLike$4(tt) ? arrayLikeKeys(tt, !0) : baseKeysIn(tt) + } + var keysIn_1 = keysIn$3, + copyObject$2 = _copyObject, + keysIn$2 = keysIn_1 + function baseAssignIn$1(tt, et) { + return tt && copyObject$2(et, keysIn$2(et), tt) + } + var _baseAssignIn = baseAssignIn$1, + _cloneBuffer = { exports: {} } + _cloneBuffer.exports + ;(function (tt, et) { + var nt = _root, + rt = et && !et.nodeType && et, + it = rt && !0 && tt && !tt.nodeType && tt, + ot = it && it.exports === rt, + at = ot ? nt.Buffer : void 0, + st = at ? at.allocUnsafe : void 0 + function lt(ct, ut) { + if (ut) return ct.slice() + var ht = ct.length, + dt = st ? st(ht) : new ct.constructor(ht) + return ct.copy(dt), dt + } + tt.exports = lt + })(_cloneBuffer, _cloneBuffer.exports) + var _cloneBufferExports = _cloneBuffer.exports + function copyArray$2(tt, et) { + var nt = -1, + rt = tt.length + for (et || (et = Array(rt)); ++nt < rt; ) et[nt] = tt[nt] + return et + } + var _copyArray = copyArray$2 + function arrayFilter$1(tt, et) { + for (var nt = -1, rt = tt == null ? 0 : tt.length, it = 0, ot = []; ++nt < rt; ) { + var at = tt[nt] + et(at, nt, tt) && (ot[it++] = at) + } + return ot + } + var _arrayFilter = arrayFilter$1 + function stubArray$2() { + return [] + } + var stubArray_1 = stubArray$2, + arrayFilter = _arrayFilter, + stubArray$1 = stubArray_1, + objectProto$4 = Object.prototype, + propertyIsEnumerable = objectProto$4.propertyIsEnumerable, + nativeGetSymbols$1 = Object.getOwnPropertySymbols, + getSymbols$3 = nativeGetSymbols$1 + ? function (tt) { + return tt == null + ? [] + : ((tt = Object(tt)), + arrayFilter(nativeGetSymbols$1(tt), function (et) { + return propertyIsEnumerable.call(tt, et) + })) + } + : stubArray$1, + _getSymbols = getSymbols$3, + copyObject$1 = _copyObject, + getSymbols$2 = _getSymbols + function copySymbols$1(tt, et) { + return copyObject$1(tt, getSymbols$2(tt), et) + } + var _copySymbols = copySymbols$1 + function arrayPush$3(tt, et) { + for (var nt = -1, rt = et.length, it = tt.length; ++nt < rt; ) tt[it + nt] = et[nt] + return tt + } + var _arrayPush = arrayPush$3, + overArg = _overArg, + getPrototype$3 = overArg(Object.getPrototypeOf, Object), + _getPrototype = getPrototype$3, + arrayPush$2 = _arrayPush, + getPrototype$2 = _getPrototype, + getSymbols$1 = _getSymbols, + stubArray = stubArray_1, + nativeGetSymbols = Object.getOwnPropertySymbols, + getSymbolsIn$2 = nativeGetSymbols + ? function (tt) { + for (var et = []; tt; ) arrayPush$2(et, getSymbols$1(tt)), (tt = getPrototype$2(tt)) + return et + } + : stubArray, + _getSymbolsIn = getSymbolsIn$2, + copyObject = _copyObject, + getSymbolsIn$1 = _getSymbolsIn + function copySymbolsIn$1(tt, et) { + return copyObject(tt, getSymbolsIn$1(tt), et) + } + var _copySymbolsIn = copySymbolsIn$1, + arrayPush$1 = _arrayPush, + isArray$g = isArray_1 + function baseGetAllKeys$2(tt, et, nt) { + var rt = et(tt) + return isArray$g(tt) ? rt : arrayPush$1(rt, nt(tt)) + } + var _baseGetAllKeys = baseGetAllKeys$2, + baseGetAllKeys$1 = _baseGetAllKeys, + getSymbols = _getSymbols, + keys$7 = keys_1 + function getAllKeys$2(tt) { + return baseGetAllKeys$1(tt, keys$7, getSymbols) + } + var _getAllKeys = getAllKeys$2, + baseGetAllKeys = _baseGetAllKeys, + getSymbolsIn = _getSymbolsIn, + keysIn$1 = keysIn_1 + function getAllKeysIn$1(tt) { + return baseGetAllKeys(tt, keysIn$1, getSymbolsIn) + } + var _getAllKeysIn = getAllKeysIn$1, + getNative$3 = _getNative, + root$7 = _root, + DataView$2 = getNative$3(root$7, 'DataView'), + _DataView = DataView$2, + getNative$2 = _getNative, + root$6 = _root, + Promise$2 = getNative$2(root$6, 'Promise'), + _Promise = Promise$2, + getNative$1 = _getNative, + root$5 = _root, + Set$3 = getNative$1(root$5, 'Set'), + _Set = Set$3, + getNative = _getNative, + root$4 = _root, + WeakMap$2 = getNative(root$4, 'WeakMap'), + _WeakMap = WeakMap$2, + DataView$1 = _DataView, + Map$1 = _Map, + Promise$1 = _Promise, + Set$2 = _Set, + WeakMap$1 = _WeakMap, + baseGetTag$5 = _baseGetTag, + toSource = _toSource, + mapTag$4 = '[object Map]', + objectTag$3 = '[object Object]', + promiseTag = '[object Promise]', + setTag$4 = '[object Set]', + weakMapTag$1 = '[object WeakMap]', + dataViewTag$3 = '[object DataView]', + dataViewCtorString = toSource(DataView$1), + mapCtorString = toSource(Map$1), + promiseCtorString = toSource(Promise$1), + setCtorString = toSource(Set$2), + weakMapCtorString = toSource(WeakMap$1), + getTag$5 = baseGetTag$5 + ;((DataView$1 && getTag$5(new DataView$1(new ArrayBuffer(1))) != dataViewTag$3) || + (Map$1 && getTag$5(new Map$1()) != mapTag$4) || + (Promise$1 && getTag$5(Promise$1.resolve()) != promiseTag) || + (Set$2 && getTag$5(new Set$2()) != setTag$4) || + (WeakMap$1 && getTag$5(new WeakMap$1()) != weakMapTag$1)) && + (getTag$5 = function (tt) { + var et = baseGetTag$5(tt), + nt = et == objectTag$3 ? tt.constructor : void 0, + rt = nt ? toSource(nt) : '' + if (rt) + switch (rt) { + case dataViewCtorString: + return dataViewTag$3 + case mapCtorString: + return mapTag$4 + case promiseCtorString: + return promiseTag + case setCtorString: + return setTag$4 + case weakMapCtorString: + return weakMapTag$1 + } + return et + }) + var _getTag = getTag$5, + objectProto$3 = Object.prototype, + hasOwnProperty$4 = objectProto$3.hasOwnProperty + function initCloneArray$1(tt) { + var et = tt.length, + nt = new tt.constructor(et) + return ( + et && + typeof tt[0] == 'string' && + hasOwnProperty$4.call(tt, 'index') && + ((nt.index = tt.index), (nt.input = tt.input)), + nt + ) + } + var _initCloneArray = initCloneArray$1, + root$3 = _root, + Uint8Array$3 = root$3.Uint8Array, + _Uint8Array = Uint8Array$3, + Uint8Array$2 = _Uint8Array + function cloneArrayBuffer$3(tt) { + var et = new tt.constructor(tt.byteLength) + return new Uint8Array$2(et).set(new Uint8Array$2(tt)), et + } + var _cloneArrayBuffer = cloneArrayBuffer$3, + cloneArrayBuffer$2 = _cloneArrayBuffer + function cloneDataView$1(tt, et) { + var nt = et ? cloneArrayBuffer$2(tt.buffer) : tt.buffer + return new tt.constructor(nt, tt.byteOffset, tt.byteLength) + } + var _cloneDataView = cloneDataView$1, + reFlags = /\w*$/ + function cloneRegExp$1(tt) { + var et = new tt.constructor(tt.source, reFlags.exec(tt)) + return (et.lastIndex = tt.lastIndex), et + } + var _cloneRegExp = cloneRegExp$1, + Symbol$5 = _Symbol, + symbolProto$2 = Symbol$5 ? Symbol$5.prototype : void 0, + symbolValueOf$1 = symbolProto$2 ? symbolProto$2.valueOf : void 0 + function cloneSymbol$1(tt) { + return symbolValueOf$1 ? Object(symbolValueOf$1.call(tt)) : {} + } + var _cloneSymbol = cloneSymbol$1, + cloneArrayBuffer$1 = _cloneArrayBuffer + function cloneTypedArray$1(tt, et) { + var nt = et ? cloneArrayBuffer$1(tt.buffer) : tt.buffer + return new tt.constructor(nt, tt.byteOffset, tt.length) + } + var _cloneTypedArray = cloneTypedArray$1, + cloneArrayBuffer = _cloneArrayBuffer, + cloneDataView = _cloneDataView, + cloneRegExp = _cloneRegExp, + cloneSymbol = _cloneSymbol, + cloneTypedArray = _cloneTypedArray, + boolTag$3 = '[object Boolean]', + dateTag$2 = '[object Date]', + mapTag$3 = '[object Map]', + numberTag$3 = '[object Number]', + regexpTag$2 = '[object RegExp]', + setTag$3 = '[object Set]', + stringTag$3 = '[object String]', + symbolTag$3 = '[object Symbol]', + arrayBufferTag$2 = '[object ArrayBuffer]', + dataViewTag$2 = '[object DataView]', + float32Tag$1 = '[object Float32Array]', + float64Tag$1 = '[object Float64Array]', + int8Tag$1 = '[object Int8Array]', + int16Tag$1 = '[object Int16Array]', + int32Tag$1 = '[object Int32Array]', + uint8Tag$1 = '[object Uint8Array]', + uint8ClampedTag$1 = '[object Uint8ClampedArray]', + uint16Tag$1 = '[object Uint16Array]', + uint32Tag$1 = '[object Uint32Array]' + function initCloneByTag$1(tt, et, nt) { + var rt = tt.constructor + switch (et) { + case arrayBufferTag$2: + return cloneArrayBuffer(tt) + case boolTag$3: + case dateTag$2: + return new rt(+tt) + case dataViewTag$2: + return cloneDataView(tt, nt) + case float32Tag$1: + case float64Tag$1: + case int8Tag$1: + case int16Tag$1: + case int32Tag$1: + case uint8Tag$1: + case uint8ClampedTag$1: + case uint16Tag$1: + case uint32Tag$1: + return cloneTypedArray(tt, nt) + case mapTag$3: + return new rt() + case numberTag$3: + case stringTag$3: + return new rt(tt) + case regexpTag$2: + return cloneRegExp(tt) + case setTag$3: + return new rt() + case symbolTag$3: + return cloneSymbol(tt) + } + } + var _initCloneByTag = initCloneByTag$1, + isObject$9 = isObject_1, + objectCreate = Object.create, + baseCreate$1 = (function () { + function tt() {} + return function (et) { + if (!isObject$9(et)) return {} + if (objectCreate) return objectCreate(et) + tt.prototype = et + var nt = new tt() + return (tt.prototype = void 0), nt + } + })(), + _baseCreate = baseCreate$1, + baseCreate = _baseCreate, + getPrototype$1 = _getPrototype, + isPrototype = _isPrototype + function initCloneObject$1(tt) { + return typeof tt.constructor == 'function' && !isPrototype(tt) ? baseCreate(getPrototype$1(tt)) : {} + } + var _initCloneObject = initCloneObject$1, + getTag$4 = _getTag, + isObjectLike$7 = isObjectLike_1, + mapTag$2 = '[object Map]' + function baseIsMap$1(tt) { + return isObjectLike$7(tt) && getTag$4(tt) == mapTag$2 + } + var _baseIsMap = baseIsMap$1, + baseIsMap = _baseIsMap, + baseUnary$2 = _baseUnary, + nodeUtil$1 = _nodeUtilExports, + nodeIsMap = nodeUtil$1 && nodeUtil$1.isMap, + isMap$1 = nodeIsMap ? baseUnary$2(nodeIsMap) : baseIsMap, + isMap_1 = isMap$1, + getTag$3 = _getTag, + isObjectLike$6 = isObjectLike_1, + setTag$2 = '[object Set]' + function baseIsSet$1(tt) { + return isObjectLike$6(tt) && getTag$3(tt) == setTag$2 + } + var _baseIsSet = baseIsSet$1, + baseIsSet = _baseIsSet, + baseUnary$1 = _baseUnary, + nodeUtil = _nodeUtilExports, + nodeIsSet = nodeUtil && nodeUtil.isSet, + isSet$1 = nodeIsSet ? baseUnary$1(nodeIsSet) : baseIsSet, + isSet_1 = isSet$1, + Stack$2 = _Stack, + arrayEach = _arrayEach, + assignValue = _assignValue, + baseAssign = _baseAssign, + baseAssignIn = _baseAssignIn, + cloneBuffer = _cloneBufferExports, + copyArray$1 = _copyArray, + copySymbols = _copySymbols, + copySymbolsIn = _copySymbolsIn, + getAllKeys$1 = _getAllKeys, + getAllKeysIn = _getAllKeysIn, + getTag$2 = _getTag, + initCloneArray = _initCloneArray, + initCloneByTag = _initCloneByTag, + initCloneObject = _initCloneObject, + isArray$f = isArray_1, + isBuffer$1 = isBufferExports, + isMap = isMap_1, + isObject$8 = isObject_1, + isSet = isSet_1, + keys$6 = keys_1, + keysIn = keysIn_1, + CLONE_DEEP_FLAG$1 = 1, + CLONE_FLAT_FLAG = 2, + CLONE_SYMBOLS_FLAG$1 = 4, + argsTag$1 = '[object Arguments]', + arrayTag$1 = '[object Array]', + boolTag$2 = '[object Boolean]', + dateTag$1 = '[object Date]', + errorTag$1 = '[object Error]', + funcTag = '[object Function]', + genTag = '[object GeneratorFunction]', + mapTag$1 = '[object Map]', + numberTag$2 = '[object Number]', + objectTag$2 = '[object Object]', + regexpTag$1 = '[object RegExp]', + setTag$1 = '[object Set]', + stringTag$2 = '[object String]', + symbolTag$2 = '[object Symbol]', + weakMapTag = '[object WeakMap]', + arrayBufferTag$1 = '[object ArrayBuffer]', + dataViewTag$1 = '[object DataView]', + float32Tag = '[object Float32Array]', + float64Tag = '[object Float64Array]', + int8Tag = '[object Int8Array]', + int16Tag = '[object Int16Array]', + int32Tag = '[object Int32Array]', + uint8Tag = '[object Uint8Array]', + uint8ClampedTag = '[object Uint8ClampedArray]', + uint16Tag = '[object Uint16Array]', + uint32Tag = '[object Uint32Array]', + cloneableTags = {} + cloneableTags[argsTag$1] = + cloneableTags[arrayTag$1] = + cloneableTags[arrayBufferTag$1] = + cloneableTags[dataViewTag$1] = + cloneableTags[boolTag$2] = + cloneableTags[dateTag$1] = + cloneableTags[float32Tag] = + cloneableTags[float64Tag] = + cloneableTags[int8Tag] = + cloneableTags[int16Tag] = + cloneableTags[int32Tag] = + cloneableTags[mapTag$1] = + cloneableTags[numberTag$2] = + cloneableTags[objectTag$2] = + cloneableTags[regexpTag$1] = + cloneableTags[setTag$1] = + cloneableTags[stringTag$2] = + cloneableTags[symbolTag$2] = + cloneableTags[uint8Tag] = + cloneableTags[uint8ClampedTag] = + cloneableTags[uint16Tag] = + cloneableTags[uint32Tag] = + !0 + cloneableTags[errorTag$1] = cloneableTags[funcTag] = cloneableTags[weakMapTag] = !1 + function baseClone$1(tt, et, nt, rt, it, ot) { + var at, + st = et & CLONE_DEEP_FLAG$1, + lt = et & CLONE_FLAT_FLAG, + ct = et & CLONE_SYMBOLS_FLAG$1 + if ((nt && (at = it ? nt(tt, rt, it, ot) : nt(tt)), at !== void 0)) return at + if (!isObject$8(tt)) return tt + var ut = isArray$f(tt) + if (ut) { + if (((at = initCloneArray(tt)), !st)) return copyArray$1(tt, at) + } else { + var ht = getTag$2(tt), + dt = ht == funcTag || ht == genTag + if (isBuffer$1(tt)) return cloneBuffer(tt, st) + if (ht == objectTag$2 || ht == argsTag$1 || (dt && !it)) { + if (((at = lt || dt ? {} : initCloneObject(tt)), !st)) + return lt ? copySymbolsIn(tt, baseAssignIn(at, tt)) : copySymbols(tt, baseAssign(at, tt)) + } else { + if (!cloneableTags[ht]) return it ? tt : {} + at = initCloneByTag(tt, ht, st) + } + } + ot || (ot = new Stack$2()) + var pt = ot.get(tt) + if (pt) return pt + ot.set(tt, at), + isSet(tt) + ? tt.forEach(function (yt) { + at.add(baseClone$1(yt, et, nt, yt, tt, ot)) + }) + : isMap(tt) && + tt.forEach(function (yt, bt) { + at.set(bt, baseClone$1(yt, et, nt, bt, tt, ot)) + }) + var mt = ct ? (lt ? getAllKeysIn : getAllKeys$1) : lt ? keysIn : keys$6, + gt = ut ? void 0 : mt(tt) + return ( + arrayEach(gt || tt, function (yt, bt) { + gt && ((bt = yt), (yt = tt[bt])), assignValue(at, bt, baseClone$1(yt, et, nt, bt, tt, ot)) + }), + at + ) + } + var _baseClone = baseClone$1, + baseClone = _baseClone, + CLONE_DEEP_FLAG = 1, + CLONE_SYMBOLS_FLAG = 4 + function cloneDeep$1(tt) { + return baseClone(tt, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG) + } + var cloneDeep_1 = cloneDeep$1 + const createHash = browser$a, + bech32 = bech32$1, + secp256k1 = elliptic, + Buffer$1 = safeBufferExports.Buffer, + BN = bnExports$2, + bitcoinjsAddress = src$1.address, + cloneDeep = cloneDeep_1, + DEFAULTNETWORK = { bech32: 'bc', pubKeyHash: 0, scriptHash: 5, validWitnessVersions: [0, 1] }, + TESTNETWORK = { bech32: 'tb', pubKeyHash: 111, scriptHash: 196, validWitnessVersions: [0, 1] }, + REGTESTNETWORK = { bech32: 'bcrt', pubKeyHash: 111, scriptHash: 196, validWitnessVersions: [0, 1] }, + SIMNETWORK = { bech32: 'sb', pubKeyHash: 63, scriptHash: 123, validWitnessVersions: [0, 1] }, + DEFAULTEXPIRETIME = 3600, + DEFAULTCLTVEXPIRY = 9, + DEFAULTDESCRIPTION = '', + DEFAULTFEATUREBITS = { + word_length: 4, + var_onion_optin: { required: !1, supported: !0 }, + payment_secret: { required: !1, supported: !0 }, + }, + FEATUREBIT_ORDER = [ + 'option_data_loss_protect', + 'initial_routing_sync', + 'option_upfront_shutdown_script', + 'gossip_queries', + 'var_onion_optin', + 'gossip_queries_ex', + 'option_static_remotekey', + 'payment_secret', + 'basic_mpp', + 'option_support_large_channel', + ], + DIVISORS = { m: new BN(1e3, 10), u: new BN(1e6, 10), n: new BN(1e9, 10), p: new BN(1e12, 10) }, + MAX_MILLISATS = new BN('2100000000000000000', 10), + MILLISATS_PER_BTC = new BN(1e11, 10), + MILLISATS_PER_MILLIBTC = new BN(1e8, 10), + MILLISATS_PER_MICROBTC = new BN(1e5, 10), + MILLISATS_PER_NANOBTC = new BN(100, 10), + PICOBTC_PER_MILLISATS = new BN(10, 10), + TAGCODES = { + payment_hash: 1, + payment_secret: 16, + description: 13, + payee_node_key: 19, + purpose_commit_hash: 23, + expire_time: 6, + min_final_cltv_expiry: 24, + fallback_address: 9, + routing_info: 3, + feature_bits: 5, + }, + TAGNAMES = {} + for (let tt = 0, et = Object.keys(TAGCODES); tt < et.length; tt++) { + const nt = et[tt], + rt = TAGCODES[et[tt]].toString() + TAGNAMES[rt] = nt + } + const TAGENCODERS = { + payment_hash: hexToWord, + payment_secret: hexToWord, + description: textToWord, + payee_node_key: hexToWord, + purpose_commit_hash: purposeCommitEncoder, + expire_time: intBEToWords, + min_final_cltv_expiry: intBEToWords, + fallback_address: fallbackAddressEncoder, + routing_info: routingInfoEncoder, + feature_bits: featureBitsEncoder, + }, + TAGPARSERS = { + 1: (tt) => wordsToBuffer(tt, !0).toString('hex'), + 16: (tt) => wordsToBuffer(tt, !0).toString('hex'), + 13: (tt) => wordsToBuffer(tt, !0).toString('utf8'), + 19: (tt) => wordsToBuffer(tt, !0).toString('hex'), + 23: (tt) => wordsToBuffer(tt, !0).toString('hex'), + 6: wordsToIntBE, + 24: wordsToIntBE, + 9: fallbackAddressParser, + 3: routingInfoParser, + 5: featureBitsParser, + }, + unknownTagName = 'unknownTag' + function unknownEncoder(tt) { + return (tt.words = bech32.decode(tt.words, Number.MAX_SAFE_INTEGER).words), tt + } + function getUnknownParser(tt) { + return (et) => ({ tagCode: parseInt(tt), words: bech32.encode('unknown', et, Number.MAX_SAFE_INTEGER) }) + } + function wordsToIntBE(tt) { + return tt.reverse().reduce((et, nt, rt) => et + nt * Math.pow(32, rt), 0) + } + function intBEToWords(tt, et) { + const nt = [] + if ((et === void 0 && (et = 5), (tt = Math.floor(tt)), tt === 0)) return [0] + for (; tt > 0; ) nt.push(tt & (Math.pow(2, et) - 1)), (tt = Math.floor(tt / Math.pow(2, et))) + return nt.reverse() + } + function sha256(tt) { + return createHash('sha256').update(tt).digest() + } + function convert(tt, et, nt) { + let rt = 0, + it = 0 + const ot = (1 << nt) - 1, + at = [] + for (let st = 0; st < tt.length; ++st) + for (rt = (rt << et) | tt[st], it += et; it >= nt; ) (it -= nt), at.push((rt >> it) & ot) + return it > 0 && at.push((rt << (nt - it)) & ot), at + } + function wordsToBuffer(tt, et) { + let nt = Buffer$1.from(convert(tt, 5, 8)) + return et && (tt.length * 5) % 8 !== 0 && (nt = nt.slice(0, -1)), nt + } + function hexToBuffer(tt) { + return tt !== void 0 && (typeof tt == 'string' || tt instanceof String) && tt.match(/^([a-zA-Z0-9]{2})*$/) + ? Buffer$1.from(tt, 'hex') + : tt + } + function textToBuffer(tt) { + return Buffer$1.from(tt, 'utf8') + } + function hexToWord(tt) { + const et = hexToBuffer(tt) + return bech32.toWords(et) + } + function textToWord(tt) { + const et = textToBuffer(tt) + return bech32.toWords(et) + } + function fallbackAddressParser(tt, et) { + const nt = tt[0] + tt = tt.slice(1) + const rt = wordsToBuffer(tt, !0) + let it = null + switch (nt) { + case 17: + it = bitcoinjsAddress.toBase58Check(rt, et.pubKeyHash) + break + case 18: + it = bitcoinjsAddress.toBase58Check(rt, et.scriptHash) + break + case 0: + case 1: + it = bitcoinjsAddress.toBech32(rt, nt, et.bech32) + break + } + return { code: nt, address: it, addressHash: rt.toString('hex') } + } + function fallbackAddressEncoder(tt, et) { + return [tt.code].concat(hexToWord(tt.addressHash)) + } + function routingInfoParser(tt) { + const et = [] + let nt, + rt, + it, + ot, + at, + st = wordsToBuffer(tt, !0) + for (; st.length > 0; ) + (nt = st.slice(0, 33).toString('hex')), + (rt = st.slice(33, 41).toString('hex')), + (it = parseInt(st.slice(41, 45).toString('hex'), 16)), + (ot = parseInt(st.slice(45, 49).toString('hex'), 16)), + (at = parseInt(st.slice(49, 51).toString('hex'), 16)), + (st = st.slice(51)), + et.push({ + pubkey: nt, + short_channel_id: rt, + fee_base_msat: it, + fee_proportional_millionths: ot, + cltv_expiry_delta: at, + }) + return et + } + function featureBitsParser(tt) { + const et = tt + .slice() + .reverse() + .map((rt) => [!!(rt & 1), !!(rt & 2), !!(rt & 4), !!(rt & 8), !!(rt & 16)]) + .reduce((rt, it) => rt.concat(it), []) + for (; et.length < FEATUREBIT_ORDER.length * 2; ) et.push(!1) + const nt = { word_length: tt.length } + if ( + (FEATUREBIT_ORDER.forEach((rt, it) => { + nt[rt] = { required: et[it * 2], supported: et[it * 2 + 1] } + }), + et.length > FEATUREBIT_ORDER.length * 2) + ) { + const rt = et.slice(FEATUREBIT_ORDER.length * 2) + nt.extra_bits = { + start_bit: FEATUREBIT_ORDER.length * 2, + bits: rt, + has_required: rt.reduce((it, ot, at) => (at % 2 !== 0 ? it || !1 : it || ot), !1), + } + } else nt.extra_bits = { start_bit: FEATUREBIT_ORDER.length * 2, bits: [], has_required: !1 } + return nt + } + function featureBitsEncoder(tt) { + let et = tt.word_length, + nt = [] + for ( + FEATUREBIT_ORDER.forEach((rt) => { + nt.push(!!(tt[rt] || {}).required), nt.push(!!(tt[rt] || {}).supported) + }); + nt[nt.length - 1] === !1; + + ) + nt.pop() + for (; nt.length % 5 !== 0; ) nt.push(!1) + if (tt.extra_bits && Array.isArray(tt.extra_bits.bits) && tt.extra_bits.bits.length > 0) { + for (; nt.length < tt.extra_bits.start_bit; ) nt.push(!1) + nt = nt.concat(tt.extra_bits.bits) + } + if (et !== void 0 && nt.length / 5 > et) throw new Error('word_length is too small to contain all featureBits') + return ( + et === void 0 && (et = Math.ceil(nt.length / 5)), + new Array(et) + .fill(0) + .map( + (rt, it) => + (nt[it * 5 + 4] << 4) | + (nt[it * 5 + 3] << 3) | + (nt[it * 5 + 2] << 2) | + (nt[it * 5 + 1] << 1) | + (nt[it * 5] << 0), + ) + .reverse() + ) + } + function routingInfoEncoder(tt) { + let et = Buffer$1.from([]) + return ( + tt.forEach((nt) => { + ;(et = Buffer$1.concat([et, hexToBuffer(nt.pubkey)])), + (et = Buffer$1.concat([et, hexToBuffer(nt.short_channel_id)])), + (et = Buffer$1.concat([et, Buffer$1.from([0, 0, 0].concat(intBEToWords(nt.fee_base_msat, 8)).slice(-4))])), + (et = Buffer$1.concat([ + et, + Buffer$1.from([0, 0, 0].concat(intBEToWords(nt.fee_proportional_millionths, 8)).slice(-4)), + ])), + (et = Buffer$1.concat([et, Buffer$1.from([0].concat(intBEToWords(nt.cltv_expiry_delta, 8)).slice(-2))])) + }), + hexToWord(et) + ) + } + function purposeCommitEncoder(tt) { + let et + if (tt !== void 0 && (typeof tt == 'string' || tt instanceof String)) + tt.match(/^([a-zA-Z0-9]{2})*$/) ? (et = Buffer$1.from(tt, 'hex')) : (et = sha256(Buffer$1.from(tt, 'utf8'))) + else throw new Error('purpose or purpose commit must be a string or hex string') + return bech32.toWords(et) + } + function tagsItems(tt, et) { + const nt = tt.filter((it) => it.tagName === et) + return nt.length > 0 ? nt[0].data : null + } + function tagsContainItem(tt, et) { + return tagsItems(tt, et) !== null + } + function orderKeys(tt, et) { + const nt = {} + if ( + (Object.keys(tt) + .sort() + .forEach((rt) => { + nt[rt] = tt[rt] + }), + et === !0) + ) { + const rt = '__tagsObject_cache' + Object.defineProperty(nt, 'tagsObject', { + get() { + return this[rt] || Object.defineProperty(this, rt, { value: getTagsObject(this.tags) }), this[rt] + }, + }) + } + return nt + } + function satToHrp(tt) { + if (!tt.toString().match(/^\d+$/)) throw new Error('satoshis must be an integer') + const et = new BN(tt, 10) + return millisatToHrp(et.mul(new BN(1e3, 10))) + } + function millisatToHrp(tt) { + if (!tt.toString().match(/^\d+$/)) throw new Error('millisatoshis must be an integer') + const et = new BN(tt, 10), + nt = et.toString(10), + rt = nt.length + let it, ot + return ( + rt > 11 && /0{11}$/.test(nt) + ? ((it = ''), (ot = et.div(MILLISATS_PER_BTC).toString(10))) + : rt > 8 && /0{8}$/.test(nt) + ? ((it = 'm'), (ot = et.div(MILLISATS_PER_MILLIBTC).toString(10))) + : rt > 5 && /0{5}$/.test(nt) + ? ((it = 'u'), (ot = et.div(MILLISATS_PER_MICROBTC).toString(10))) + : rt > 2 && /0{2}$/.test(nt) + ? ((it = 'n'), (ot = et.div(MILLISATS_PER_NANOBTC).toString(10))) + : ((it = 'p'), (ot = et.mul(PICOBTC_PER_MILLISATS).toString(10))), + ot + it + ) + } + function hrpToSat(tt, et) { + const nt = hrpToMillisat(tt, !1) + if (!nt.mod(new BN(1e3, 10)).eq(new BN(0, 10))) throw new Error('Amount is outside of valid range') + const rt = nt.div(new BN(1e3, 10)) + return et ? rt.toString() : rt + } + function hrpToMillisat(tt, et) { + let nt, rt + if (tt.slice(-1).match(/^[munp]$/)) (nt = tt.slice(-1)), (rt = tt.slice(0, -1)) + else { + if (tt.slice(-1).match(/^[^munp0-9]$/)) throw new Error('Not a valid multiplier for the amount') + rt = tt + } + if (!rt.match(/^\d+$/)) throw new Error('Not a valid human readable amount') + const it = new BN(rt, 10), + ot = nt ? it.mul(MILLISATS_PER_BTC).div(DIVISORS[nt]) : it.mul(MILLISATS_PER_BTC) + if ((nt === 'p' && !it.mod(new BN(10, 10)).eq(new BN(0, 10))) || ot.gt(MAX_MILLISATS)) + throw new Error('Amount is outside of valid range') + return et ? ot.toString() : ot + } + function sign$3(tt, et) { + const nt = cloneDeep(tt), + rt = hexToBuffer(et) + if (nt.complete && nt.paymentRequest) return nt + if (rt === void 0 || rt.length !== 32 || !secp256k1.privateKeyVerify(rt)) + throw new Error('privateKey must be a 32 byte Buffer and valid private key') + let it, ot + if ( + (tagsContainItem(nt.tags, TAGNAMES[19]) && (ot = hexToBuffer(tagsItems(nt.tags, TAGNAMES[19]))), + nt.payeeNodeKey && (it = hexToBuffer(nt.payeeNodeKey)), + it && ot && !ot.equals(it)) + ) + throw new Error('payee node key tag and payeeNodeKey attribute must match') + it = ot || it + const at = Buffer$1.from(secp256k1.publicKeyCreate(rt)) + if (it && !at.equals(it)) + throw new Error('The private key given is not the private key of the node public key given') + const st = bech32.decode(nt.wordsTemp, Number.MAX_SAFE_INTEGER).words, + lt = Buffer$1.concat([Buffer$1.from(nt.prefix, 'utf8'), wordsToBuffer(st)]), + ct = sha256(lt), + ut = secp256k1.ecdsaSign(ct, rt) + ut.signature = Buffer$1.from(ut.signature) + const ht = hexToWord(ut.signature.toString('hex') + '0' + ut.recid) + return ( + (nt.payeeNodeKey = at.toString('hex')), + (nt.signature = ut.signature.toString('hex')), + (nt.recoveryFlag = ut.recid), + (nt.wordsTemp = bech32.encode('temp', st.concat(ht), Number.MAX_SAFE_INTEGER)), + (nt.complete = !0), + (nt.paymentRequest = bech32.encode(nt.prefix, st.concat(ht), Number.MAX_SAFE_INTEGER)), + orderKeys(nt) + ) + } + function encode$3(tt, et) { + const nt = cloneDeep(tt) + et === void 0 && (et = !0) + const rt = !(nt.signature === void 0 || nt.recoveryFlag === void 0) + let it + if (nt.network === void 0 && !rt) (nt.network = DEFAULTNETWORK), (it = DEFAULTNETWORK) + else { + if (nt.network === void 0 && rt) throw new Error('Need network for proper payment request reconstruction') + if ( + !nt.network.bech32 || + nt.network.pubKeyHash === void 0 || + nt.network.scriptHash === void 0 || + !Array.isArray(nt.network.validWitnessVersions) + ) + throw new Error('Invalid network') + it = nt.network + } + if (nt.timestamp === void 0 && !rt) nt.timestamp = Math.floor(new Date().getTime() / 1e3) + else if (nt.timestamp === void 0 && rt) throw new Error('Need timestamp for proper payment request reconstruction') + if (nt.tags === void 0) throw new Error('Payment Requests need tags array') + if (!tagsContainItem(nt.tags, TAGNAMES[1])) throw new Error('Lightning Payment Request needs a payment hash') + if (tagsContainItem(nt.tags, TAGNAMES[16])) + if (tagsContainItem(nt.tags, TAGNAMES[5])) { + const xt = tagsItems(nt.tags, TAGNAMES[5]) + if (!xt.payment_secret || (!xt.payment_secret.supported && !xt.payment_secret.required)) + throw new Error( + 'Payment request requires feature bits with at least payment secret support flagged if payment secret is included', + ) + } else if (et) nt.tags.push({ tagName: TAGNAMES[5], data: DEFAULTFEATUREBITS }) + else + throw new Error( + 'Payment request requires feature bits with at least payment secret support flagged if payment secret is included', + ) + if (!tagsContainItem(nt.tags, TAGNAMES[13]) && !tagsContainItem(nt.tags, TAGNAMES[23])) + if (et) nt.tags.push({ tagName: TAGNAMES[13], data: DEFAULTDESCRIPTION }) + else throw new Error('Payment request requires description or purpose commit hash') + if (tagsContainItem(nt.tags, TAGNAMES[13]) && Buffer$1.from(tagsItems(nt.tags, TAGNAMES[13]), 'utf8').length > 639) + throw new Error('Description is too long: Max length 639 bytes') + !tagsContainItem(nt.tags, TAGNAMES[6]) && + !rt && + et && + nt.tags.push({ tagName: TAGNAMES[6], data: DEFAULTEXPIRETIME }), + !tagsContainItem(nt.tags, TAGNAMES[24]) && + !rt && + et && + nt.tags.push({ tagName: TAGNAMES[24], data: DEFAULTCLTVEXPIRY }) + let ot, at + if ( + (tagsContainItem(nt.tags, TAGNAMES[19]) && (at = hexToBuffer(tagsItems(nt.tags, TAGNAMES[19]))), + nt.payeeNodeKey && (ot = hexToBuffer(nt.payeeNodeKey)), + ot && at && !at.equals(ot)) + ) + throw new Error('payeeNodeKey and tag payee node key do not match') + ;(ot = ot || at), ot && (nt.payeeNodeKey = ot.toString('hex')) + let st, lt, ct + if (tagsContainItem(nt.tags, TAGNAMES[9])) { + const xt = tagsItems(nt.tags, TAGNAMES[9]) + if (((ct = xt.address), (lt = xt.addressHash), (st = xt.code), lt === void 0 || st === void 0)) { + let kt, St + try { + ;(kt = bitcoinjsAddress.fromBech32(ct)), (lt = kt.data), (st = kt.version) + } catch { + try { + ;(St = bitcoinjsAddress.fromBase58Check(ct)), + St.version === it.pubKeyHash ? (st = 17) : St.version === it.scriptHash && (st = 18), + (lt = St.hash) + } catch { + throw new Error('Fallback address type is unknown') + } + } + if (kt && !(kt.version in it.validWitnessVersions)) + throw new Error('Fallback address witness version is unknown') + if (kt && kt.prefix !== it.bech32) + throw new Error('Fallback address network type does not match payment request network type') + if (St && St.version !== it.pubKeyHash && St.version !== it.scriptHash) + throw new Error('Fallback address version (base58) is unknown or the network type is incorrect') + ;(xt.addressHash = lt.toString('hex')), (xt.code = st) + } + } + tagsContainItem(nt.tags, TAGNAMES[3]) && + tagsItems(nt.tags, TAGNAMES[3]).forEach((kt) => { + if ( + kt.pubkey === void 0 || + kt.short_channel_id === void 0 || + kt.fee_base_msat === void 0 || + kt.fee_proportional_millionths === void 0 || + kt.cltv_expiry_delta === void 0 + ) + throw new Error('Routing info is incomplete') + if (!secp256k1.publicKeyVerify(hexToBuffer(kt.pubkey))) + throw new Error('Routing info pubkey is not a valid pubkey') + const St = hexToBuffer(kt.short_channel_id) + if (!(St instanceof Buffer$1) || St.length !== 8) + throw new Error('Routing info short channel id must be 8 bytes') + if (typeof kt.fee_base_msat != 'number' || Math.floor(kt.fee_base_msat) !== kt.fee_base_msat) + throw new Error('Routing info fee base msat is not an integer') + if ( + typeof kt.fee_proportional_millionths != 'number' || + Math.floor(kt.fee_proportional_millionths) !== kt.fee_proportional_millionths + ) + throw new Error('Routing info fee proportional millionths is not an integer') + if (typeof kt.cltv_expiry_delta != 'number' || Math.floor(kt.cltv_expiry_delta) !== kt.cltv_expiry_delta) + throw new Error('Routing info cltv expiry delta is not an integer') + }) + let ut = 'ln' + ut += it.bech32 + let ht + if (nt.millisatoshis && nt.satoshis) { + if (((ht = millisatToHrp(new BN(nt.millisatoshis, 10))), satToHrp(new BN(nt.satoshis, 10)) !== ht)) + throw new Error('satoshis and millisatoshis do not match') + } else + nt.millisatoshis + ? (ht = millisatToHrp(new BN(nt.millisatoshis, 10))) + : nt.satoshis + ? (ht = satToHrp(new BN(nt.satoshis, 10))) + : (ht = '') + ut += ht + const dt = intBEToWords(nt.timestamp) + for (; dt.length < 7; ) dt.unshift(0) + const pt = nt.tags + let mt = [] + pt.forEach((xt) => { + const kt = Object.keys(TAGENCODERS) + if ((rt && kt.push(unknownTagName), kt.indexOf(xt.tagName) === -1)) + throw new Error('Unknown tag key: ' + xt.tagName) + let St + if (xt.tagName !== unknownTagName) { + mt.push(TAGCODES[xt.tagName]) + const Tt = TAGENCODERS[xt.tagName] + St = Tt(xt.data) + } else { + const Tt = unknownEncoder(xt.data) + mt.push(Tt.tagCode), (St = Tt.words) + } + ;(mt = mt.concat([0].concat(intBEToWords(St.length)).slice(-2))), (mt = mt.concat(St)) + }) + let gt = dt.concat(mt) + const yt = Buffer$1.concat([Buffer$1.from(ut, 'utf8'), Buffer$1.from(convert(gt, 5, 8))]), + bt = sha256(yt) + let vt + if (rt) + if (ot) { + const xt = Buffer$1.from(secp256k1.ecdsaRecover(Buffer$1.from(nt.signature, 'hex'), nt.recoveryFlag, bt, !0)) + if (ot && !ot.equals(xt)) + throw new Error('Signature, message, and recoveryID did not produce the same pubkey as payeeNodeKey') + vt = hexToWord(nt.signature + '0' + nt.recoveryFlag) + } else + throw new Error( + 'Reconstruction with signature and recoveryID requires payeeNodeKey to verify correctness of input data.', + ) + return ( + vt && (gt = gt.concat(vt)), + tagsContainItem(nt.tags, TAGNAMES[6]) && + ((nt.timeExpireDate = nt.timestamp + tagsItems(nt.tags, TAGNAMES[6])), + (nt.timeExpireDateString = new Date(nt.timeExpireDate * 1e3).toISOString())), + (nt.timestampString = new Date(nt.timestamp * 1e3).toISOString()), + (nt.complete = !!vt), + (nt.paymentRequest = nt.complete ? bech32.encode(ut, gt, Number.MAX_SAFE_INTEGER) : ''), + (nt.prefix = ut), + (nt.wordsTemp = bech32.encode('temp', gt, Number.MAX_SAFE_INTEGER)), + orderKeys(nt) + ) + } + function decode$3(tt, et) { + if (typeof tt != 'string') throw new Error('Lightning Payment Request must be string') + if (tt.slice(0, 2).toLowerCase() !== 'ln') throw new Error('Not a proper lightning payment request') + const nt = bech32.decode(tt, Number.MAX_SAFE_INTEGER) + tt = tt.toLowerCase() + const rt = nt.prefix + let it = nt.words + const ot = it.slice(-104), + at = it.slice(0, -104) + it = it.slice(0, -104) + let st = wordsToBuffer(ot, !0) + const lt = st.slice(-1)[0] + if (((st = st.slice(0, -1)), !(lt in [0, 1, 2, 3]) || st.length !== 64)) + throw new Error('Signature is missing or incorrect') + let ct = rt.match(/^ln(\S+?)(\d*)([a-zA-Z]?)$/) + if ((ct && !ct[2] && (ct = rt.match(/^ln(\S+)$/)), !ct)) throw new Error('Not a proper lightning payment request') + const ut = ct[1] + let ht + if (et) { + if ( + et.bech32 === void 0 || + et.pubKeyHash === void 0 || + et.scriptHash === void 0 || + !Array.isArray(et.validWitnessVersions) + ) + throw new Error('Invalid network') + ht = et + } else + switch (ut) { + case DEFAULTNETWORK.bech32: + ht = DEFAULTNETWORK + break + case TESTNETWORK.bech32: + ht = TESTNETWORK + break + case REGTESTNETWORK.bech32: + ht = REGTESTNETWORK + break + case SIMNETWORK.bech32: + ht = SIMNETWORK + break + } + if (!ht || ht.bech32 !== ut) throw new Error('Unknown coin bech32 prefix') + const dt = ct[2] + let pt, mt, gt + if (dt) { + const Ct = ct[3] + try { + pt = parseInt(hrpToSat(dt + Ct, !0)) + } catch { + ;(pt = null), (gt = !0) + } + mt = hrpToMillisat(dt + Ct, !0) + } else (pt = null), (mt = null) + const yt = wordsToIntBE(it.slice(0, 7)), + bt = new Date(yt * 1e3).toISOString() + it = it.slice(7) + const vt = [] + let xt, kt, St, Tt + for (; it.length > 0; ) { + const Ct = it[0].toString() + ;(xt = TAGNAMES[Ct] || unknownTagName), + (kt = TAGPARSERS[Ct] || getUnknownParser(Ct)), + (it = it.slice(1)), + (St = wordsToIntBE(it.slice(0, 2))), + (it = it.slice(2)), + (Tt = it.slice(0, St)), + (it = it.slice(St)), + vt.push({ tagName: xt, data: kt(Tt, ht) }) + } + let At, Et + tagsContainItem(vt, TAGNAMES[6]) && + ((At = yt + tagsItems(vt, TAGNAMES[6])), (Et = new Date(At * 1e3).toISOString())) + const $t = Buffer$1.concat([Buffer$1.from(rt, 'utf8'), Buffer$1.from(convert(at, 5, 8))]), + Dt = sha256($t), + jt = Buffer$1.from(secp256k1.ecdsaRecover(st, lt, Dt, !0)) + if (tagsContainItem(vt, TAGNAMES[19]) && tagsItems(vt, TAGNAMES[19]) !== jt.toString('hex')) + throw new Error('Lightning Payment Request signature pubkey does not match payee pubkey') + let Pt = { + paymentRequest: tt, + complete: !0, + prefix: rt, + wordsTemp: bech32.encode('temp', at.concat(ot), Number.MAX_SAFE_INTEGER), + network: ht, + satoshis: pt, + millisatoshis: mt, + timestamp: yt, + timestampString: bt, + payeeNodeKey: jt.toString('hex'), + signature: st.toString('hex'), + recoveryFlag: lt, + tags: vt, + } + return ( + gt && delete Pt.satoshis, + At && (Pt = Object.assign(Pt, { timeExpireDate: At, timeExpireDateString: Et })), + orderKeys(Pt, !0) + ) + } + function getTagsObject(tt) { + const et = {} + return ( + tt.forEach((nt) => { + nt.tagName === unknownTagName + ? (et.unknownTags || (et.unknownTags = []), et.unknownTags.push(nt.data)) + : (et[nt.tagName] = nt.data) + }), + et + ) + } + var payreq = { encode: encode$3, decode: decode$3, sign: sign$3, satToHrp, millisatToHrp, hrpToSat, hrpToMillisat } + ;(function (tt) { + var et = + (commonjsGlobal && commonjsGlobal.__importDefault) || + function (ut) { + return ut && ut.__esModule ? ut : { default: ut } + } + Object.defineProperty(tt, '__esModule', { value: !0 }), + (tt.getIdFromRequest = tt.decode = tt.isHex = tt.stringToBytes = tt.isValue = tt.utf8Encoder = void 0) + const nt = et(payreq), + rt = et(assert_1) + let it + typeof window < 'u' && window && window.TextEncoder ? (it = window.TextEncoder) : (it = util$1.TextEncoder), + (tt.utf8Encoder = new it()) + const ot = (ut) => ut != null + tt.isValue = ot + const at = (ut) => ((0, tt.isValue)(ut) ? tt.utf8Encoder.encode(ut) : ut) + tt.stringToBytes = at + function st(ut) { + return Buffer.from(ut, 'hex').toString('hex') === ut + } + tt.isHex = st + function lt(ut) { + let ht + return ut.indexOf('lnsb') === 0 && (ht = { bech32: 'sb' }), nt.default.decode(ut, ht) + } + tt.decode = lt + function ct(ut) { + const dt = lt(ut).tags.find((mt) => mt.tagName === 'payment_hash') + ;(0, rt.default)(dt && dt.data, 'Could not find payment hash on invoice request') + const pt = dt == null ? void 0 : dt.data.toString() + if (!pt || !pt.length) throw new Error('Could not get payment hash from payment request') + return pt + } + tt.getIdFromRequest = ct + })(helpers) + var hasRequiredLsat + function requireLsat() { + if (hasRequiredLsat) return lsat$1 + hasRequiredLsat = 1 + var tt = + (commonjsGlobal && commonjsGlobal.__createBinding) || + (Object.create + ? function (dt, pt, mt, gt) { + gt === void 0 && (gt = mt) + var yt = Object.getOwnPropertyDescriptor(pt, mt) + ;(!yt || ('get' in yt ? !pt.__esModule : yt.writable || yt.configurable)) && + (yt = { + enumerable: !0, + get: function () { + return pt[mt] + }, + }), + Object.defineProperty(dt, gt, yt) + } + : function (dt, pt, mt, gt) { + gt === void 0 && (gt = mt), (dt[gt] = pt[mt]) + }), + et = + (commonjsGlobal && commonjsGlobal.__setModuleDefault) || + (Object.create + ? function (dt, pt) { + Object.defineProperty(dt, 'default', { enumerable: !0, value: pt }) + } + : function (dt, pt) { + dt.default = pt + }), + nt = + (commonjsGlobal && commonjsGlobal.__importStar) || + function (dt) { + if (dt && dt.__esModule) return dt + var pt = {} + if (dt != null) + for (var mt in dt) mt !== 'default' && Object.prototype.hasOwnProperty.call(dt, mt) && tt(pt, dt, mt) + return et(pt, dt), pt + }, + rt = + (commonjsGlobal && commonjsGlobal.__importDefault) || + function (dt) { + return dt && dt.__esModule ? dt : { default: dt } + } + Object.defineProperty(lsat$1, '__esModule', { value: !0 }), (lsat$1.Lsat = lsat$1.parseChallengePart = void 0) + const it = assert_1, + ot = bufio, + at = rt(requireCryptoBrowserify()), + st = nt(macaroon$1), + lt = requireDist(), + ct = helpers + function ut(dt) { + let pt + const mt = dt.indexOf('=') + it(mt > -1, 'Incorrectly encoded challenge. Missing "=" separator.') + const gt = dt.length - 1 - mt + return ( + (pt = dt.slice(-gt)), + it(pt.length, 'Incorrectly encoded macaroon challenge'), + it( + pt[0] === '"' && pt[pt.length - 1] === '"', + 'Incorectly encoded challenge, challenges must be enclosed in double quotes.', + ), + (pt = pt.slice(1, pt.length - 1)), + pt + ) + } + lsat$1.parseChallengePart = ut + class ht extends ot.Struct { + constructor(pt) { + super(pt), + (this.id = ''), + (this.validUntil = 0), + (this.invoice = ''), + (this.baseMacaroon = ''), + (this.paymentHash = Buffer.alloc(32).toString('hex')), + (this.timeCreated = Date.now()), + (this.paymentPreimage = null), + (this.amountPaid = 0), + (this.routingFeePaid = 0), + (this.invoiceAmount = 0), + pt && this.fromOptions(pt) + } + fromOptions(pt) { + it(typeof pt.baseMacaroon == 'string', 'Require serialized macaroon'), + (this.baseMacaroon = pt.baseMacaroon), + it(typeof pt.id == 'string', 'Require string id'), + (this.id = pt.id), + it(typeof pt.paymentHash == 'string', 'Require paymentHash'), + (this.paymentHash = pt.paymentHash) + const mt = this.getExpirationFromMacaroon(pt.baseMacaroon) + return ( + mt && (this.validUntil = mt), + pt.invoice && this.addInvoice(pt.invoice), + pt.timeCreated && (this.timeCreated = pt.timeCreated), + pt.paymentPreimage && (this.paymentPreimage = pt.paymentPreimage), + pt.amountPaid && (this.amountPaid = pt.amountPaid), + pt.routingFeePaid && (this.routingFeePaid = pt.routingFeePaid), + this + ) + } + isExpired() { + return this.validUntil === 0 ? !1 : this.validUntil < Date.now() + } + isPending() { + return !this.paymentPreimage + } + isSatisfied() { + return !( + !this.paymentHash || + !this.paymentPreimage || + at.default.createHash('sha256').update(Buffer.from(this.paymentPreimage, 'hex')).digest('hex') !== + this.paymentHash + ) + } + getMacaroon() { + return st.importMacaroon(this.baseMacaroon)._exportAsJSONObjectV2() + } + getExpirationFromMacaroon(pt) { + pt || (pt = this.baseMacaroon), it(pt, 'Missing macaroon') + const mt = st.importMacaroon(pt)._exportAsJSONObjectV2().c, + gt = [] + if (mt == null) return 0 + for (const yt of mt) { + if (yt.i == null) continue + const bt = lt.Caveat.decode(yt.i) + bt.condition === 'expiration' && gt.push(bt) + } + return gt.length ? Number(gt[gt.length - 1].value) : 0 + } + setPreimage(pt) { + it((0, ct.isHex)(pt) && pt.length === 64, 'Must pass valid 32-byte hash for lsat secret') + const mt = at.default.createHash('sha256').update(Buffer.from(pt, 'hex')).digest('hex') + it(mt === this.paymentHash, "Hash of preimage did not match LSAT's paymentHash"), (this.paymentPreimage = pt) + } + addFirstPartyCaveat(pt) { + it(pt instanceof lt.Caveat, 'Require a Caveat object to add to macaroon') + const mt = st.importMacaroon(this.baseMacaroon) + mt.addFirstPartyCaveat(pt.encode()), (this.baseMacaroon = (0, lt.getRawMacaroon)(mt)) + } + getCaveats() { + const pt = [], + mt = this.getMacaroon().c + if (mt == null) return pt + for (const gt of mt) gt.i != null && pt.push(lt.Caveat.decode(gt.i)) + return pt + } + toToken() { + return `LSAT ${this.baseMacaroon}:${this.paymentPreimage || ''}` + } + toChallenge() { + return ( + it(this.invoice, "Can't create a challenge without a payment request/invoice"), + `LSAT ${`macaroon="${this.baseMacaroon}", invoice="${this.invoice}"`}` + ) + } + toJSON() { + return { + id: this.id, + validUntil: this.validUntil, + invoice: this.invoice, + baseMacaroon: this.baseMacaroon, + paymentHash: this.paymentHash, + timeCreated: this.timeCreated, + paymentPreimage: this.paymentPreimage || void 0, + amountPaid: this.amountPaid || void 0, + invoiceAmount: this.invoiceAmount, + routingFeePaid: this.routingFeePaid || void 0, + isPending: this.isPending(), + isSatisfied: this.isSatisfied(), + } + } + addInvoice(pt) { + it(this.paymentHash, 'Cannot add invoice data to an LSAT without paymentHash') + try { + const mt = (0, ct.decode)(pt), + { satoshis: gt } = mt, + yt = mt.tags.find((vt) => vt.tagName === 'payment_hash') + it(yt, 'Could not find payment hash on invoice request') + const bt = yt == null ? void 0 : yt.data + it(bt === this.paymentHash, 'paymentHash from invoice did not match LSAT'), + (this.invoiceAmount = gt || 0), + (this.invoice = pt) + } catch (mt) { + throw new Error(`Problem adding invoice data to LSAT: ${mt.message}`) + } + } + static fromMacaroon(pt, mt) { + it(typeof pt == 'string', 'Requires a raw macaroon string for macaroon to generate LSAT') + let gt, yt + try { + ;(yt = (0, lt.decodeIdentifierFromMacaroon)(pt)), (gt = lt.Identifier.fromString(yt)) + } catch (xt) { + throw new Error(`Unexpected encoding for macaroon identifier: ${xt.message}`) + } + const bt = { id: yt, baseMacaroon: pt, paymentHash: gt.paymentHash.toString('hex') }, + vt = new this(bt) + return mt && vt.addInvoice(mt), vt + } + static fromToken(pt, mt) { + it(pt.includes(this.type), 'Token must include LSAT prefix'), (pt = pt.slice(this.type.length).trim()) + const [gt, yt] = pt.split(':'), + bt = ht.fromMacaroon(gt, mt) + return yt && bt.setPreimage(yt), bt + } + static fromChallenge(pt) { + const mt = 'macaroon=', + gt = 'invoice=' + let yt + ;(yt = pt.split(',')), + yt.length < 2 && (yt = pt.split(' ')), + it(yt.length >= 2, 'Expected at least two challenges in the LSAT: invoice and macaroon') + let bt = '', + vt = '' + for (const St of yt) { + if (!bt.length && St.indexOf(mt) > -1) + try { + bt = ut(St) + } catch (Tt) { + throw new Error(`Problem parsing macaroon challenge: ${Tt.message}`) + } + if (!vt.length && St.indexOf(gt) > -1) + try { + vt = ut(St) + } catch (Tt) { + throw new Error(`Problem parsing macaroon challenge: ${Tt.message}`) + } + if (vt.length && bt.length) break + } + it(vt.length && bt.length, 'Expected WWW-Authenticate challenge with macaroon and invoice data') + const xt = (0, ct.getIdFromRequest)(vt), + kt = (0, lt.decodeIdentifierFromMacaroon)(bt) + return new this({ id: kt, baseMacaroon: bt, paymentHash: xt, invoice: vt }) + } + static fromHeader(pt) { + const mt = pt.slice(this.type.length).trim() + return it(pt.length !== mt.length, 'header missing token type prefix "LSAT"'), ht.fromChallenge(mt) + } + } + return (lsat$1.Lsat = ht), (ht.type = 'LSAT'), lsat$1 + } + var types = {}, + lsat = {} + Object.defineProperty(lsat, '__esModule', { value: !0 }) + var satisfier = {} + Object.defineProperty(satisfier, '__esModule', { value: !0 }) + ;(function (tt) { + var et = + (commonjsGlobal && commonjsGlobal.__createBinding) || + (Object.create + ? function (rt, it, ot, at) { + at === void 0 && (at = ot) + var st = Object.getOwnPropertyDescriptor(it, ot) + ;(!st || ('get' in st ? !it.__esModule : st.writable || st.configurable)) && + (st = { + enumerable: !0, + get: function () { + return it[ot] + }, + }), + Object.defineProperty(rt, at, st) + } + : function (rt, it, ot, at) { + at === void 0 && (at = ot), (rt[at] = it[ot]) + }), + nt = + (commonjsGlobal && commonjsGlobal.__exportStar) || + function (rt, it) { + for (var ot in rt) ot !== 'default' && !Object.prototype.hasOwnProperty.call(it, ot) && et(it, rt, ot) + } + Object.defineProperty(tt, '__esModule', { value: !0 }), nt(lsat, tt), nt(satisfier, tt) + })(types) + var satisfiers = {}, + hasRequiredSatisfiers + function requireSatisfiers() { + if (hasRequiredSatisfiers) return satisfiers + ;(hasRequiredSatisfiers = 1), + Object.defineProperty(satisfiers, '__esModule', { value: !0 }), + (satisfiers.createCapabilitiesSatisfier = + satisfiers.createServicesSatisfier = + satisfiers.expirationSatisfier = + void 0) + const tt = requireDist() + satisfiers.expirationSatisfier = { + condition: 'expiration', + satisfyPrevious: (rt, it) => + rt.condition !== 'expiration' || it.condition !== 'expiration' ? !1 : !(rt.value < it.value), + satisfyFinal: (rt) => !(rt.condition !== 'expiration' || rt.value < Date.now()), + } + const et = (rt) => { + if (typeof rt != 'string') throw new tt.InvalidServicesError() + return { + condition: tt.SERVICES_CAVEAT_CONDITION, + satisfyPrevious: (it, ot) => { + const at = (0, tt.decodeServicesCaveat)(it.value.toString()), + st = (0, tt.decodeServicesCaveat)(ot.value.toString()) + if (!Array.isArray(at) || !Array.isArray(st)) throw new tt.InvalidServicesError() + let lt = new Map() + lt = at.reduce((ct, ut) => ct.set(ut.name, ut.tier), lt) + for (const ct of st) if (!lt.has(ct.name) || lt.get(ct.name) > ct.tier) return !1 + return !0 + }, + satisfyFinal: (it) => { + const ot = (0, tt.decodeServicesCaveat)(it.value.toString()) + if (!Array.isArray(ot)) throw new tt.InvalidServicesError() + for (const at of ot) if (at.name === rt) return !0 + return !1 + }, + } + } + satisfiers.createServicesSatisfier = et + const nt = (rt, it) => { + if (typeof it != 'string') throw new tt.InvalidCapabilitiesError() + if (typeof rt != 'string') throw new tt.InvalidCapabilitiesError() + return { + condition: rt + tt.SERVICE_CAPABILITIES_SUFFIX, + satisfyPrevious: (ot, at) => { + const st = (0, tt.decodeCapabilitiesValue)(ot.value.toString()), + lt = (0, tt.decodeCapabilitiesValue)(at.value.toString()) + if (!Array.isArray(st) || !Array.isArray(lt)) throw new tt.InvalidServicesError() + let ct = new Set() + ct = st.reduce((ut, ht) => ut.add(ht), ct) + for (const ut of lt) if (!ct.has(ut)) return !1 + return !0 + }, + satisfyFinal: (ot) => { + const at = (0, tt.decodeCapabilitiesValue)(ot.value.toString()) + if (!Array.isArray(at)) throw new tt.InvalidServicesError() + for (const st of at) if (st === it) return !0 + return !1 + }, + } + } + return (satisfiers.createCapabilitiesSatisfier = nt), satisfiers + } + var macaroon = {}, + base64 = {}, + __extends$2 = + (commonjsGlobal && commonjsGlobal.__extends) || + (function () { + var tt = function (et, nt) { + return ( + (tt = + Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && + function (rt, it) { + rt.__proto__ = it + }) || + function (rt, it) { + for (var ot in it) it.hasOwnProperty(ot) && (rt[ot] = it[ot]) + }), + tt(et, nt) + ) + } + return function (et, nt) { + tt(et, nt) + function rt() { + this.constructor = et + } + et.prototype = nt === null ? Object.create(nt) : ((rt.prototype = nt.prototype), new rt()) + } + })() + Object.defineProperty(base64, '__esModule', { value: !0 }) + var INVALID_BYTE = 256, + Coder = (function () { + function tt(et) { + et === void 0 && (et = '='), (this._paddingCharacter = et) + } + return ( + (tt.prototype.encodedLength = function (et) { + return this._paddingCharacter ? (((et + 2) / 3) * 4) | 0 : ((et * 8 + 5) / 6) | 0 + }), + (tt.prototype.encode = function (et) { + for (var nt = '', rt = 0; rt < et.length - 2; rt += 3) { + var it = (et[rt] << 16) | (et[rt + 1] << 8) | et[rt + 2] + ;(nt += this._encodeByte((it >>> (3 * 6)) & 63)), + (nt += this._encodeByte((it >>> (2 * 6)) & 63)), + (nt += this._encodeByte((it >>> (1 * 6)) & 63)), + (nt += this._encodeByte((it >>> (0 * 6)) & 63)) + } + var ot = et.length - rt + if (ot > 0) { + var it = (et[rt] << 16) | (ot === 2 ? et[rt + 1] << 8 : 0) + ;(nt += this._encodeByte((it >>> (3 * 6)) & 63)), + (nt += this._encodeByte((it >>> (2 * 6)) & 63)), + ot === 2 ? (nt += this._encodeByte((it >>> (1 * 6)) & 63)) : (nt += this._paddingCharacter || ''), + (nt += this._paddingCharacter || '') + } + return nt + }), + (tt.prototype.maxDecodedLength = function (et) { + return this._paddingCharacter ? ((et / 4) * 3) | 0 : ((et * 6 + 7) / 8) | 0 + }), + (tt.prototype.decodedLength = function (et) { + return this.maxDecodedLength(et.length - this._getPaddingLength(et)) + }), + (tt.prototype.decode = function (et) { + if (et.length === 0) return new Uint8Array(0) + for ( + var nt = this._getPaddingLength(et), + rt = et.length - nt, + it = new Uint8Array(this.maxDecodedLength(rt)), + ot = 0, + at = 0, + st = 0, + lt = 0, + ct = 0, + ut = 0, + ht = 0; + at < rt - 4; + at += 4 + ) + (lt = this._decodeChar(et.charCodeAt(at + 0))), + (ct = this._decodeChar(et.charCodeAt(at + 1))), + (ut = this._decodeChar(et.charCodeAt(at + 2))), + (ht = this._decodeChar(et.charCodeAt(at + 3))), + (it[ot++] = (lt << 2) | (ct >>> 4)), + (it[ot++] = (ct << 4) | (ut >>> 2)), + (it[ot++] = (ut << 6) | ht), + (st |= lt & INVALID_BYTE), + (st |= ct & INVALID_BYTE), + (st |= ut & INVALID_BYTE), + (st |= ht & INVALID_BYTE) + if ( + (at < rt - 1 && + ((lt = this._decodeChar(et.charCodeAt(at))), + (ct = this._decodeChar(et.charCodeAt(at + 1))), + (it[ot++] = (lt << 2) | (ct >>> 4)), + (st |= lt & INVALID_BYTE), + (st |= ct & INVALID_BYTE)), + at < rt - 2 && + ((ut = this._decodeChar(et.charCodeAt(at + 2))), + (it[ot++] = (ct << 4) | (ut >>> 2)), + (st |= ut & INVALID_BYTE)), + at < rt - 3 && + ((ht = this._decodeChar(et.charCodeAt(at + 3))), (it[ot++] = (ut << 6) | ht), (st |= ht & INVALID_BYTE)), + st !== 0) + ) + throw new Error('Base64Coder: incorrect characters for decoding') + return it + }), + (tt.prototype._encodeByte = function (et) { + var nt = et + return ( + (nt += 65), + (nt += ((25 - et) >>> 8) & (0 - 65 - 26 + 97)), + (nt += ((51 - et) >>> 8) & (26 - 97 - 52 + 48)), + (nt += ((61 - et) >>> 8) & (52 - 48 - 62 + 43)), + (nt += ((62 - et) >>> 8) & (62 - 43 - 63 + 47)), + String.fromCharCode(nt) + ) + }), + (tt.prototype._decodeChar = function (et) { + var nt = INVALID_BYTE + return ( + (nt += (((42 - et) & (et - 44)) >>> 8) & (-INVALID_BYTE + et - 43 + 62)), + (nt += (((46 - et) & (et - 48)) >>> 8) & (-INVALID_BYTE + et - 47 + 63)), + (nt += (((47 - et) & (et - 58)) >>> 8) & (-INVALID_BYTE + et - 48 + 52)), + (nt += (((64 - et) & (et - 91)) >>> 8) & (-INVALID_BYTE + et - 65 + 0)), + (nt += (((96 - et) & (et - 123)) >>> 8) & (-INVALID_BYTE + et - 97 + 26)), + nt + ) + }), + (tt.prototype._getPaddingLength = function (et) { + var nt = 0 + if (this._paddingCharacter) { + for (var rt = et.length - 1; rt >= 0 && et[rt] === this._paddingCharacter; rt--) nt++ + if (et.length < 4 || nt > 2) throw new Error('Base64Coder: incorrect padding') + } + return nt + }), + tt + ) + })() + base64.Coder = Coder + var stdCoder = new Coder() + function encode$2(tt) { + return stdCoder.encode(tt) + } + base64.encode = encode$2 + function decode$2(tt) { + return stdCoder.decode(tt) + } + base64.decode = decode$2 + var URLSafeCoder = (function (tt) { + __extends$2(et, tt) + function et() { + return (tt !== null && tt.apply(this, arguments)) || this + } + return ( + (et.prototype._encodeByte = function (nt) { + var rt = nt + return ( + (rt += 65), + (rt += ((25 - nt) >>> 8) & (0 - 65 - 26 + 97)), + (rt += ((51 - nt) >>> 8) & (26 - 97 - 52 + 48)), + (rt += ((61 - nt) >>> 8) & (52 - 48 - 62 + 45)), + (rt += ((62 - nt) >>> 8) & (62 - 45 - 63 + 95)), + String.fromCharCode(rt) + ) + }), + (et.prototype._decodeChar = function (nt) { + var rt = INVALID_BYTE + return ( + (rt += (((44 - nt) & (nt - 46)) >>> 8) & (-INVALID_BYTE + nt - 45 + 62)), + (rt += (((94 - nt) & (nt - 96)) >>> 8) & (-INVALID_BYTE + nt - 95 + 63)), + (rt += (((47 - nt) & (nt - 58)) >>> 8) & (-INVALID_BYTE + nt - 48 + 52)), + (rt += (((64 - nt) & (nt - 91)) >>> 8) & (-INVALID_BYTE + nt - 65 + 0)), + (rt += (((96 - nt) & (nt - 123)) >>> 8) & (-INVALID_BYTE + nt - 97 + 26)), + rt + ) + }), + et + ) + })(Coder) + base64.URLSafeCoder = URLSafeCoder + var urlSafeCoder = new URLSafeCoder() + function encodeURLSafe(tt) { + return urlSafeCoder.encode(tt) + } + base64.encodeURLSafe = encodeURLSafe + function decodeURLSafe(tt) { + return urlSafeCoder.decode(tt) + } + base64.decodeURLSafe = decodeURLSafe + base64.encodedLength = function (tt) { + return stdCoder.encodedLength(tt) + } + base64.maxDecodedLength = function (tt) { + return stdCoder.maxDecodedLength(tt) + } + base64.decodedLength = function (tt) { + return stdCoder.decodedLength(tt) + } + var __createBinding$1 = + (commonjsGlobal && commonjsGlobal.__createBinding) || + (Object.create + ? function (tt, et, nt, rt) { + rt === void 0 && (rt = nt) + var it = Object.getOwnPropertyDescriptor(et, nt) + ;(!it || ('get' in it ? !et.__esModule : it.writable || it.configurable)) && + (it = { + enumerable: !0, + get: function () { + return et[nt] + }, + }), + Object.defineProperty(tt, rt, it) + } + : function (tt, et, nt, rt) { + rt === void 0 && (rt = nt), (tt[rt] = et[nt]) + }), + __setModuleDefault$1 = + (commonjsGlobal && commonjsGlobal.__setModuleDefault) || + (Object.create + ? function (tt, et) { + Object.defineProperty(tt, 'default', { enumerable: !0, value: et }) + } + : function (tt, et) { + tt.default = et + }), + __importStar$1 = + (commonjsGlobal && commonjsGlobal.__importStar) || + function (tt) { + if (tt && tt.__esModule) return tt + var et = {} + if (tt != null) + for (var nt in tt) + nt !== 'default' && Object.prototype.hasOwnProperty.call(tt, nt) && __createBinding$1(et, tt, nt) + return __setModuleDefault$1(et, tt), et + } + Object.defineProperty(macaroon, '__esModule', { value: !0 }) + macaroon.getRawMacaroon = macaroon.verifyMacaroonCaveats = macaroon.getCaveatsFromMacaroon = void 0 + const caveat_1 = caveat, + helpers_1 = helpers, + Macaroon = __importStar$1(macaroon$1), + base64_1 = base64 + function getCaveatsFromMacaroon(tt) { + var et + const nt = Macaroon.importMacaroon(tt), + rt = [], + it = (et = nt._exportAsJSONObjectV2()) === null || et === void 0 ? void 0 : et.c + if (it) + for (const ot of it) { + if (!ot.i) continue + const at = caveat_1.Caveat.decode(ot.i) + rt.push(at) + } + return rt + } + macaroon.getCaveatsFromMacaroon = getCaveatsFromMacaroon + function verifyMacaroonCaveats(tt, et, nt, rt = {}) { + try { + const it = Macaroon.importMacaroon(tt), + ot = (0, helpers_1.stringToBytes)(et) + it.verify(ot, () => null) + const at = getCaveatsFromMacaroon(tt) + return ( + nt && !Array.isArray(nt) && (nt = [nt]), + !at.length && (!nt || !nt.length) ? !0 : (0, caveat_1.verifyCaveats)(at, nt, rt) + ) + } catch { + return !1 + } + } + macaroon.verifyMacaroonCaveats = verifyMacaroonCaveats + function getRawMacaroon(tt, et = !1) { + const nt = tt._exportBinaryV2() + return et ? (0, base64_1.encodeURLSafe)(nt) : (0, base64_1.encode)(nt) + } + macaroon.getRawMacaroon = getRawMacaroon + var service = {} + ;(function (tt) { + var et = + (commonjsGlobal && commonjsGlobal.__importDefault) || + function (dt) { + return dt && dt.__esModule ? dt : { default: dt } + } + Object.defineProperty(tt, '__esModule', { value: !0 }), + (tt.decodeCapabilitiesValue = + tt.createNewCapabilitiesCaveat = + tt.SERVICE_CAPABILITIES_SUFFIX = + tt.encodeServicesCaveatValue = + tt.decodeServicesCaveat = + tt.SERVICES_CAVEAT_CONDITION = + tt.Service = + tt.InvalidCapabilitiesError = + tt.InvalidServicesError = + tt.NoServicesError = + void 0) + const nt = et(bufio), + rt = caveat + class it extends Error { + constructor(...pt) { + super(...pt), + (this.name = 'NoServicesError'), + (this.message = 'no services found'), + Error.captureStackTrace && Error.captureStackTrace(this, it) + } + } + tt.NoServicesError = it + class ot extends Error { + constructor(pt) { + super(pt), + (this.name = 'InvalidServicesError'), + pt || (this.message = 'service must be of the form "name:tier"'), + Error.captureStackTrace && Error.captureStackTrace(this, ot) + } + } + tt.InvalidServicesError = ot + class at extends Error { + constructor(pt) { + super(pt), + (this.name = 'InvalidCapabilitiesError'), + pt || (this.message = 'capabilities must be a string or array of strings'), + Error.captureStackTrace && Error.captureStackTrace(this, ot) + } + } + tt.InvalidCapabilitiesError = at + class st extends nt.default.Struct { + constructor(pt) { + super(pt), (this.name = pt.name), (this.tier = pt.tier) + } + } + ;(tt.Service = st), (tt.SERVICES_CAVEAT_CONDITION = 'services') + const lt = (dt) => { + if (!dt.length) throw new it() + const pt = [], + mt = dt.split(',') + for (const gt of mt) { + const [yt, bt] = gt.split(':') + if (!yt || !bt) throw new ot() + if (isNaN(+bt)) throw new ot('tier must be a number') + if (!isNaN(+yt)) throw new ot('service name must be a string') + pt.push(new st({ name: yt, tier: +bt })) + } + return pt + } + tt.decodeServicesCaveat = lt + const ct = (dt) => { + if (!dt.length) throw new it() + let pt = '' + for (let mt = 0; mt < dt.length; mt++) { + const gt = dt[mt] + if (!(gt instanceof st)) throw new ot('not a valid service') + if (!gt.name) throw new ot('service must nave a name') + if (gt.tier !== 0 && !gt.tier) throw new ot('service must have a tier') + ;(pt = pt.concat(`${gt.name}:${gt.tier}`)), mt !== dt.length - 1 && (pt = `${pt},`) + } + return pt + } + ;(tt.encodeServicesCaveatValue = ct), (tt.SERVICE_CAPABILITIES_SUFFIX = '_capabilities') + const ut = (dt, pt) => { + let mt + if (!pt) mt = '' + else if (Array.isArray(pt)) mt = pt.join(',') + else { + if (typeof pt != 'string') throw new at() + mt = pt + } + return new rt.Caveat({ condition: dt + tt.SERVICE_CAPABILITIES_SUFFIX, value: mt, comp: '=' }) + } + tt.createNewCapabilitiesCaveat = ut + const ht = (dt) => { + if (typeof dt != 'string') throw new at() + return dt + .toString() + .split(',') + .map((pt) => pt.trim()) + } + tt.decodeCapabilitiesValue = ht + })(service) + var hasRequiredDist + function requireDist() { + return ( + hasRequiredDist || + ((hasRequiredDist = 1), + (function (tt) { + var et = + (commonjsGlobal && commonjsGlobal.__createBinding) || + (Object.create + ? function (rt, it, ot, at) { + at === void 0 && (at = ot) + var st = Object.getOwnPropertyDescriptor(it, ot) + ;(!st || ('get' in st ? !it.__esModule : st.writable || st.configurable)) && + (st = { + enumerable: !0, + get: function () { + return it[ot] + }, + }), + Object.defineProperty(rt, at, st) + } + : function (rt, it, ot, at) { + at === void 0 && (at = ot), (rt[at] = it[ot]) + }), + nt = + (commonjsGlobal && commonjsGlobal.__exportStar) || + function (rt, it) { + for (var ot in rt) ot !== 'default' && !Object.prototype.hasOwnProperty.call(it, ot) && et(it, rt, ot) + } + Object.defineProperty(tt, '__esModule', { value: !0 }), + nt(identifier, tt), + nt(caveat, tt), + nt(requireLsat(), tt), + nt(types, tt), + nt(requireSatisfiers(), tt), + nt(macaroon, tt), + nt(service, tt) + })(dist$1)), + dist$1 + ) + } + var distExports = requireDist(), + DefaultContext = { color: void 0, size: void 0, className: void 0, style: void 0, attr: void 0 }, + IconContext = React$1.createContext && React$1.createContext(DefaultContext), + __assign$4 = + (globalThis && globalThis.__assign) || + function () { + return ( + (__assign$4 = + Object.assign || + function (tt) { + for (var et, nt = 1, rt = arguments.length; nt < rt; nt++) { + et = arguments[nt] + for (var it in et) Object.prototype.hasOwnProperty.call(et, it) && (tt[it] = et[it]) + } + return tt + }), + __assign$4.apply(this, arguments) + ) + }, + __rest$5 = + (globalThis && globalThis.__rest) || + function (tt, et) { + var nt = {} + for (var rt in tt) Object.prototype.hasOwnProperty.call(tt, rt) && et.indexOf(rt) < 0 && (nt[rt] = tt[rt]) + if (tt != null && typeof Object.getOwnPropertySymbols == 'function') + for (var it = 0, rt = Object.getOwnPropertySymbols(tt); it < rt.length; it++) + et.indexOf(rt[it]) < 0 && + Object.prototype.propertyIsEnumerable.call(tt, rt[it]) && + (nt[rt[it]] = tt[rt[it]]) + return nt + } + function Tree2Element(tt) { + return ( + tt && + tt.map(function (et, nt) { + return React$1.createElement(et.tag, __assign$4({ key: nt }, et.attr), Tree2Element(et.child)) + }) + ) + } + function GenIcon(tt) { + return function (et) { + return React$1.createElement(IconBase, __assign$4({ attr: __assign$4({}, tt.attr) }, et), Tree2Element(tt.child)) + } + } + function IconBase(tt) { + var et = function (nt) { + var rt = tt.attr, + it = tt.size, + ot = tt.title, + at = __rest$5(tt, ['attr', 'size', 'title']), + st = it || nt.size || '1em', + lt + return ( + nt.className && (lt = nt.className), + tt.className && (lt = (lt ? lt + ' ' : '') + tt.className), + React$1.createElement( + 'svg', + __assign$4({ stroke: 'currentColor', fill: 'currentColor', strokeWidth: '0' }, nt.attr, rt, at, { + className: lt, + style: __assign$4(__assign$4({ color: tt.color || nt.color }, nt.style), tt.style), + height: st, + width: st, + xmlns: 'http://www.w3.org/2000/svg', + }), + ot && React$1.createElement('title', null, ot), + tt.children, + ) + ) + } + return IconContext !== void 0 + ? React$1.createElement(IconContext.Consumer, null, function (nt) { + return et(nt) + }) + : et(DefaultContext) + } + function MdCheckCircle(tt) { + return GenIcon({ + tag: 'svg', + attr: { viewBox: '0 0 24 24' }, + child: [ + { tag: 'path', attr: { fill: 'none', d: 'M0 0h24v24H0z' } }, + { + tag: 'path', + attr: { + d: 'M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z', + }, + }, + ], + })(tt) + } + function MdDeleteForever(tt) { + return GenIcon({ + tag: 'svg', + attr: { viewBox: '0 0 24 24' }, + child: [ + { tag: 'path', attr: { fill: 'none', d: 'M0 0h24v24H0z' } }, + { tag: 'path', attr: { fill: 'none', d: 'M0 0h24v24H0V0z' } }, + { + tag: 'path', + attr: { + d: 'M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zm2.46-7.12l1.41-1.41L12 12.59l2.12-2.12 1.41 1.41L13.41 14l2.12 2.12-1.41 1.41L12 15.41l-2.12 2.12-1.41-1.41L10.59 14l-2.13-2.12zM15.5 4l-1-1h-5l-1 1H5v2h14V4z', + }, + }, + ], + })(tt) + } + function MdInfo(tt) { + return GenIcon({ + tag: 'svg', + attr: { viewBox: '0 0 24 24' }, + child: [ + { tag: 'path', attr: { fill: 'none', d: 'M0 0h24v24H0z' } }, + { + tag: 'path', + attr: { + d: 'M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z', + }, + }, + ], + })(tt) + } + function MdVerifiedUser(tt) { + return GenIcon({ + tag: 'svg', + attr: { viewBox: '0 0 24 24' }, + child: [ + { tag: 'path', attr: { fill: 'none', d: 'M0 0h24v24H0z' } }, + { + tag: 'path', + attr: { + d: 'M12 1L3 5v6c0 5.55 3.84 10.74 9 12 5.16-1.26 9-6.45 9-12V5l-9-4zm-2 16l-4-4 1.41-1.41L10 14.17l6.59-6.59L18 9l-8 8z', + }, + }, + ], + })(tt) + } + function MdViewInAr(tt) { + return GenIcon({ + tag: 'svg', + attr: { viewBox: '0 0 24 24' }, + child: [ + { tag: 'path', attr: { fill: 'none', d: 'M0 0h24v24H0z' } }, + { + tag: 'path', + attr: { + d: 'M18.25 7.6l-5.5-3.18a1.49 1.49 0 00-1.5 0L5.75 7.6c-.46.27-.75.76-.75 1.3v6.35c0 .54.29 1.03.75 1.3l5.5 3.18c.46.27 1.04.27 1.5 0l5.5-3.18c.46-.27.75-.76.75-1.3V8.9c0-.54-.29-1.03-.75-1.3zM7 14.96v-4.62l4 2.32v4.61l-4-2.31zm5-4.03L8 8.61l4-2.31 4 2.31-4 2.32zm1 6.34v-4.61l4-2.32v4.62l-4 2.31zM7 2H3.5C2.67 2 2 2.67 2 3.5V7h2V4h3V2zm10 0h3.5c.83 0 1.5.67 1.5 1.5V7h-2V4h-3V2zM7 22H3.5c-.83 0-1.5-.67-1.5-1.5V17h2v3h3v2zm10 0h3.5c.83 0 1.5-.67 1.5-1.5V17h-2v3h-3v2z', + }, + }, + ], + })(tt) + } + function MdError(tt) { + return GenIcon({ + tag: 'svg', + attr: { viewBox: '0 0 24 24' }, + child: [ + { tag: 'path', attr: { fill: 'none', d: 'M0 0h24v24H0z' } }, + { + tag: 'path', + attr: { + d: 'M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z', + }, + }, + ], + })(tt) + } + function MdWarning(tt) { + return GenIcon({ + tag: 'svg', + attr: { viewBox: '0 0 24 24' }, + child: [ + { tag: 'path', attr: { fill: 'none', d: 'M0 0h24v24H0z' } }, + { tag: 'path', attr: { d: 'M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z' } }, + ], + })(tt) + } + function MdPlayArrow(tt) { + return GenIcon({ + tag: 'svg', + attr: { viewBox: '0 0 24 24' }, + child: [ + { tag: 'path', attr: { fill: 'none', d: 'M0 0h24v24H0z' } }, + { tag: 'path', attr: { d: 'M8 5v14l11-7z' } }, + ], + })(tt) + } + function MdAdd(tt) { + return GenIcon({ + tag: 'svg', + attr: { viewBox: '0 0 24 24' }, + child: [ + { tag: 'path', attr: { fill: 'none', d: 'M0 0h24v24H0z' } }, + { tag: 'path', attr: { d: 'M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z' } }, + ], + })(tt) + } + function MdBolt(tt) { + return GenIcon({ + tag: 'svg', + attr: { viewBox: '0 0 24 24' }, + child: [ + { + tag: 'path', + attr: { + d: 'M11 21h-1l1-7H7.5c-.58 0-.57-.32-.38-.66.19-.34.05-.08.07-.12C8.48 10.94 10.42 7.54 13 3h1l-1 7h3.5c.49 0 .56.33.47.51l-.07.15C12.96 17.55 11 21 11 21z', + }, + }, + ], + })(tt) + } + function MdOutlinedFlag(tt) { + return GenIcon({ + tag: 'svg', + attr: { viewBox: '0 0 24 24' }, + child: [ + { tag: 'path', attr: { fill: 'none', d: 'M0 0h24v24H0z' } }, + { tag: 'path', attr: { d: 'M14 6l-1-2H5v17h2v-7h5l1 2h7V6h-6zm4 8h-4l-1-2H7V6h5l1 2h5v6z' } }, + ], + })(tt) + } + function MdRemove(tt) { + return GenIcon({ + tag: 'svg', + attr: { viewBox: '0 0 24 24' }, + child: [ + { tag: 'path', attr: { fill: 'none', d: 'M0 0h24v24H0z' } }, + { tag: 'path', attr: { d: 'M19 13H5v-2h14v2z' } }, + ], + })(tt) + } + function MdSend(tt) { + return GenIcon({ + tag: 'svg', + attr: { viewBox: '0 0 24 24' }, + child: [ + { tag: 'path', attr: { fill: 'none', d: 'M0 0h24v24H0z' } }, + { tag: 'path', attr: { d: 'M2.01 21L23 12 2.01 3 2 10l15 2-15 2z' } }, + ], + })(tt) + } + function MdAccessTime(tt) { + return GenIcon({ + tag: 'svg', + attr: { viewBox: '0 0 24 24' }, + child: [ + { tag: 'path', attr: { fill: 'none', d: 'M0 0h24v24H0z' } }, + { + tag: 'path', + attr: { + d: 'M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z', + }, + }, + { tag: 'path', attr: { d: 'M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z' } }, + ], + })(tt) + } + function MdRestartAlt(tt) { + return GenIcon({ + tag: 'svg', + attr: { viewBox: '0 0 24 24' }, + child: [ + { tag: 'path', attr: { fill: 'none', d: 'M0 0h24v24H0V0z' } }, + { + tag: 'path', + attr: { + d: 'M12 5V2L8 6l4 4V7c3.31 0 6 2.69 6 6 0 2.97-2.17 5.43-5 5.91v2.02c3.95-.49 7-3.85 7-7.93 0-4.42-3.58-8-8-8zM6 13c0-1.65.67-3.15 1.76-4.24L6.34 7.34A8.014 8.014 0 004 13c0 4.08 3.05 7.44 7 7.93v-2.02c-2.83-.48-5-2.94-5-5.91z', + }, + }, + ], + })(tt) + } + function MdKeyboardBackspace(tt) { + return GenIcon({ + tag: 'svg', + attr: { viewBox: '0 0 24 24' }, + child: [ + { tag: 'path', attr: { fill: 'none', d: 'M0 0h24v24H0z' } }, + { tag: 'path', attr: { d: 'M21 11H6.83l3.58-3.59L9 6l-6 6 6 6 1.41-1.41L6.83 13H21z' } }, + ], + })(tt) + } + function MdCancel(tt) { + return GenIcon({ + tag: 'svg', + attr: { viewBox: '0 0 24 24' }, + child: [ + { tag: 'path', attr: { fill: 'none', d: 'M0 0h24v24H0z' } }, + { + tag: 'path', + attr: { + d: 'M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z', + }, + }, + ], + })(tt) + } + function MdCheck(tt) { + return GenIcon({ + tag: 'svg', + attr: { viewBox: '0 0 24 24' }, + child: [ + { tag: 'path', attr: { fill: 'none', d: 'M0 0h24v24H0z' } }, + { tag: 'path', attr: { d: 'M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z' } }, + ], + })(tt) + } + function MdClose(tt) { + return GenIcon({ + tag: 'svg', + attr: { viewBox: '0 0 24 24' }, + child: [ + { tag: 'path', attr: { fill: 'none', d: 'M0 0h24v24H0z' } }, + { + tag: 'path', + attr: { + d: 'M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z', + }, + }, + ], + })(tt) + } + function MdOutlineModeEdit(tt) { + return GenIcon({ + tag: 'svg', + attr: { viewBox: '0 0 24 24' }, + child: [ + { tag: 'path', attr: { fill: 'none', d: 'M0 0h24v24H0z' } }, + { + tag: 'path', + attr: { + d: 'M3 21h3.75L17.81 9.94l-3.75-3.75L3 17.25V21zm2-2.92l9.06-9.06.92.92L5.92 19H5v-.92zM18.37 3.29a.996.996 0 00-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83a.996.996 0 000-1.41l-2.34-2.34z', + }, + }, + ], + })(tt) + } + var cssUnit$1 = { + cm: !0, + mm: !0, + in: !0, + px: !0, + pt: !0, + pc: !0, + em: !0, + ex: !0, + ch: !0, + rem: !0, + vw: !0, + vh: !0, + vmin: !0, + vmax: !0, + '%': !0, + } + function parseLengthAndUnit$1(tt) { + if (typeof tt == 'number') return { value: tt, unit: 'px' } + var et, + nt = (tt.match(/^[0-9.]*/) || '').toString() + nt.includes('.') ? (et = parseFloat(nt)) : (et = parseInt(nt, 10)) + var rt = (tt.match(/[^0-9]*$/) || '').toString() + return cssUnit$1[rt] + ? { value: et, unit: rt } + : (console.warn('React Spinners: '.concat(tt, ' is not a valid css value. Defaulting to ').concat(et, 'px.')), + { value: et, unit: 'px' }) + } + function cssValue$1(tt) { + var et = parseLengthAndUnit$1(tt) + return ''.concat(et.value).concat(et.unit) + } + var createAnimation$1 = function (tt, et, nt) { + var rt = 'react-spinners-'.concat(tt, '-').concat(nt) + if (typeof window > 'u' || !window.document) return rt + var it = document.createElement('style') + document.head.appendChild(it) + var ot = it.sheet, + at = ` + @keyframes ` + .concat( + rt, + ` { + `, + ) + .concat( + et, + ` + } + `, + ) + return ot && ot.insertRule(at, 0), rt + }, + __assign$3 = + (globalThis && globalThis.__assign) || + function () { + return ( + (__assign$3 = + Object.assign || + function (tt) { + for (var et, nt = 1, rt = arguments.length; nt < rt; nt++) { + et = arguments[nt] + for (var it in et) Object.prototype.hasOwnProperty.call(et, it) && (tt[it] = et[it]) + } + return tt + }), + __assign$3.apply(this, arguments) + ) + }, + __rest$4 = + (globalThis && globalThis.__rest) || + function (tt, et) { + var nt = {} + for (var rt in tt) Object.prototype.hasOwnProperty.call(tt, rt) && et.indexOf(rt) < 0 && (nt[rt] = tt[rt]) + if (tt != null && typeof Object.getOwnPropertySymbols == 'function') + for (var it = 0, rt = Object.getOwnPropertySymbols(tt); it < rt.length; it++) + et.indexOf(rt[it]) < 0 && + Object.prototype.propertyIsEnumerable.call(tt, rt[it]) && + (nt[rt[it]] = tt[rt[it]]) + return nt + }, + beat = createAnimation$1( + 'BeatLoader', + '50% {transform: scale(0.75);opacity: 0.2} 100% {transform: scale(1);opacity: 1}', + 'beat', + ) + function BeatLoader(tt) { + var et = tt.loading, + nt = et === void 0 ? !0 : et, + rt = tt.color, + it = rt === void 0 ? '#000000' : rt, + ot = tt.speedMultiplier, + at = ot === void 0 ? 1 : ot, + st = tt.cssOverride, + lt = st === void 0 ? {} : st, + ct = tt.size, + ut = ct === void 0 ? 15 : ct, + ht = tt.margin, + dt = ht === void 0 ? 2 : ht, + pt = __rest$4(tt, ['loading', 'color', 'speedMultiplier', 'cssOverride', 'size', 'margin']), + mt = __assign$3({ display: 'inherit' }, lt), + gt = function (yt) { + return { + display: 'inline-block', + backgroundColor: it, + width: cssValue$1(ut), + height: cssValue$1(ut), + margin: cssValue$1(dt), + borderRadius: '100%', + animation: '' + .concat(beat, ' ') + .concat(0.7 / at, 's ') + .concat(yt % 2 ? '0s' : ''.concat(0.35 / at, 's'), ' infinite linear'), + animationFillMode: 'both', + } + } + return nt + ? reactExports.createElement( + 'span', + __assign$3({ style: mt }, pt), + reactExports.createElement('span', { style: gt(1) }), + reactExports.createElement('span', { style: gt(2) }), + reactExports.createElement('span', { style: gt(3) }), + ) + : null + } + var __assign$2 = + (globalThis && globalThis.__assign) || + function () { + return ( + (__assign$2 = + Object.assign || + function (tt) { + for (var et, nt = 1, rt = arguments.length; nt < rt; nt++) { + et = arguments[nt] + for (var it in et) Object.prototype.hasOwnProperty.call(et, it) && (tt[it] = et[it]) + } + return tt + }), + __assign$2.apply(this, arguments) + ) + }, + __rest$3 = + (globalThis && globalThis.__rest) || + function (tt, et) { + var nt = {} + for (var rt in tt) Object.prototype.hasOwnProperty.call(tt, rt) && et.indexOf(rt) < 0 && (nt[rt] = tt[rt]) + if (tt != null && typeof Object.getOwnPropertySymbols == 'function') + for (var it = 0, rt = Object.getOwnPropertySymbols(tt); it < rt.length; it++) + et.indexOf(rt[it]) < 0 && + Object.prototype.propertyIsEnumerable.call(tt, rt[it]) && + (nt[rt[it]] = tt[rt[it]]) + return nt + }, + clip$1 = createAnimation$1( + 'ClipLoader', + '0% {transform: rotate(0deg) scale(1)} 50% {transform: rotate(180deg) scale(0.8)} 100% {transform: rotate(360deg) scale(1)}', + 'clip', + ) + function ClipLoader$2(tt) { + var et = tt.loading, + nt = et === void 0 ? !0 : et, + rt = tt.color, + it = rt === void 0 ? '#000000' : rt, + ot = tt.speedMultiplier, + at = ot === void 0 ? 1 : ot, + st = tt.cssOverride, + lt = st === void 0 ? {} : st, + ct = tt.size, + ut = ct === void 0 ? 35 : ct, + ht = __rest$3(tt, ['loading', 'color', 'speedMultiplier', 'cssOverride', 'size']), + dt = __assign$2( + { + background: 'transparent !important', + width: cssValue$1(ut), + height: cssValue$1(ut), + borderRadius: '100%', + border: '2px solid', + borderTopColor: it, + borderBottomColor: 'transparent', + borderLeftColor: it, + borderRightColor: it, + display: 'inline-block', + animation: ''.concat(clip$1, ' ').concat(0.75 / at, 's 0s infinite linear'), + animationFillMode: 'both', + }, + lt, + ) + return nt ? reactExports.createElement('span', __assign$2({ style: dt }, ht)) : null + } + var __assign$1 = + (globalThis && globalThis.__assign) || + function () { + return ( + (__assign$1 = + Object.assign || + function (tt) { + for (var et, nt = 1, rt = arguments.length; nt < rt; nt++) { + et = arguments[nt] + for (var it in et) Object.prototype.hasOwnProperty.call(et, it) && (tt[it] = et[it]) + } + return tt + }), + __assign$1.apply(this, arguments) + ) + }, + __rest$2 = + (globalThis && globalThis.__rest) || + function (tt, et) { + var nt = {} + for (var rt in tt) Object.prototype.hasOwnProperty.call(tt, rt) && et.indexOf(rt) < 0 && (nt[rt] = tt[rt]) + if (tt != null && typeof Object.getOwnPropertySymbols == 'function') + for (var it = 0, rt = Object.getOwnPropertySymbols(tt); it < rt.length; it++) + et.indexOf(rt[it]) < 0 && + Object.prototype.propertyIsEnumerable.call(tt, rt[it]) && + (nt[rt[it]] = tt[rt[it]]) + return nt + }, + distance$1 = [1, 3, 5], + propagate = [ + createAnimation$1( + 'PropagateLoader', + '25% {transform: translateX(-' + .concat( + distance$1[0], + `rem) scale(0.75)} + 50% {transform: translateX(-`, + ) + .concat( + distance$1[1], + `rem) scale(0.6)} + 75% {transform: translateX(-`, + ) + .concat( + distance$1[2], + `rem) scale(0.5)} + 95% {transform: translateX(0rem) scale(1)}`, + ), + 'propogate-0', + ), + createAnimation$1( + 'PropagateLoader', + '25% {transform: translateX(-' + .concat( + distance$1[0], + `rem) scale(0.75)} + 50% {transform: translateX(-`, + ) + .concat( + distance$1[1], + `rem) scale(0.6)} + 75% {transform: translateX(-`, + ) + .concat( + distance$1[1], + `rem) scale(0.6)} + 95% {transform: translateX(0rem) scale(1)}`, + ), + 'propogate-1', + ), + createAnimation$1( + 'PropagateLoader', + '25% {transform: translateX(-' + .concat( + distance$1[0], + `rem) scale(0.75)} + 75% {transform: translateX(-`, + ) + .concat( + distance$1[0], + `rem) scale(0.75)} + 95% {transform: translateX(0rem) scale(1)}`, + ), + 'propogate-2', + ), + createAnimation$1( + 'PropagateLoader', + '25% {transform: translateX(' + .concat( + distance$1[0], + `rem) scale(0.75)} + 75% {transform: translateX(`, + ) + .concat( + distance$1[0], + `rem) scale(0.75)} + 95% {transform: translateX(0rem) scale(1)}`, + ), + 'propogate-3', + ), + createAnimation$1( + 'PropagateLoader', + '25% {transform: translateX(' + .concat( + distance$1[0], + `rem) scale(0.75)} + 50% {transform: translateX(`, + ) + .concat( + distance$1[1], + `rem) scale(0.6)} + 75% {transform: translateX(`, + ) + .concat( + distance$1[1], + `rem) scale(0.6)} + 95% {transform: translateX(0rem) scale(1)}`, + ), + 'propogate-4', + ), + createAnimation$1( + 'PropagateLoader', + '25% {transform: translateX(' + .concat( + distance$1[0], + `rem) scale(0.75)} + 50% {transform: translateX(`, + ) + .concat( + distance$1[1], + `rem) scale(0.6)} + 75% {transform: translateX(`, + ) + .concat( + distance$1[2], + `rem) scale(0.5)} + 95% {transform: translateX(0rem) scale(1)}`, + ), + 'propogate-5', + ), + ] + function PropagateLoader(tt) { + var et = tt.loading, + nt = et === void 0 ? !0 : et, + rt = tt.color, + it = rt === void 0 ? '#000000' : rt, + ot = tt.speedMultiplier, + at = ot === void 0 ? 1 : ot, + st = tt.cssOverride, + lt = st === void 0 ? {} : st, + ct = tt.size, + ut = ct === void 0 ? 15 : ct, + ht = __rest$2(tt, ['loading', 'color', 'speedMultiplier', 'cssOverride', 'size']), + dt = parseLengthAndUnit$1(ut), + pt = dt.value, + mt = dt.unit, + gt = __assign$1({ display: 'inherit', position: 'relative' }, lt), + yt = function (bt) { + return { + position: 'absolute', + fontSize: ''.concat(pt / 3).concat(mt), + width: ''.concat(pt).concat(mt), + height: ''.concat(pt).concat(mt), + background: it, + borderRadius: '50%', + animation: ''.concat(propagate[bt], ' ').concat(1.5 / at, 's infinite'), + animationFillMode: 'forwards', + } + } + return nt + ? reactExports.createElement( + 'span', + __assign$1({ style: gt }, ht), + reactExports.createElement('span', { style: yt(0) }), + reactExports.createElement('span', { style: yt(1) }), + reactExports.createElement('span', { style: yt(2) }), + reactExports.createElement('span', { style: yt(3) }), + reactExports.createElement('span', { style: yt(4) }), + reactExports.createElement('span', { style: yt(5) }), + ) + : null + } + function _extends$s() { + return ( + (_extends$s = + Object.assign || + function (tt) { + for (var et = 1; et < arguments.length; et++) { + var nt = arguments[et] + for (var rt in nt) Object.prototype.hasOwnProperty.call(nt, rt) && (tt[rt] = nt[rt]) + } + return tt + }), + _extends$s.apply(this, arguments) + ) + } + function _objectWithoutPropertiesLoose$l(tt, et) { + if (tt == null) return {} + var nt = {}, + rt = Object.keys(tt), + it, + ot + for (ot = 0; ot < rt.length; ot++) (it = rt[ot]), !(et.indexOf(it) >= 0) && (nt[it] = tt[it]) + return nt + } + function isNum(tt) { + return typeof tt == 'number' && !isNaN(tt) + } + function isBool(tt) { + return typeof tt == 'boolean' + } + function isStr(tt) { + return typeof tt == 'string' + } + function isFn(tt) { + return typeof tt == 'function' + } + function parseClassName(tt) { + return isStr(tt) || isFn(tt) ? tt : null + } + function isToastIdValid(tt) { + return tt === 0 || tt + } + function getAutoCloseDelay(tt, et) { + return tt === !1 || (isNum(tt) && tt > 0) ? tt : et + } + var canUseDom = !!(typeof window < 'u' && window.document && window.document.createElement) + function canBeRendered(tt) { + return reactExports.isValidElement(tt) || isStr(tt) || isFn(tt) || isNum(tt) + } + var POSITION = { + TOP_LEFT: 'top-left', + TOP_RIGHT: 'top-right', + TOP_CENTER: 'top-center', + BOTTOM_LEFT: 'bottom-left', + BOTTOM_RIGHT: 'bottom-right', + BOTTOM_CENTER: 'bottom-center', + }, + TYPE = { INFO: 'info', SUCCESS: 'success', WARNING: 'warning', ERROR: 'error', DEFAULT: 'default' } + function collapseToast(tt, et, nt) { + nt === void 0 && (nt = 300) + var rt = tt.scrollHeight, + it = tt.style + requestAnimationFrame(function () { + ;(it.minHeight = 'initial'), + (it.height = rt + 'px'), + (it.transition = 'all ' + nt + 'ms'), + requestAnimationFrame(function () { + ;(it.height = '0'), (it.padding = '0'), (it.margin = '0'), setTimeout(et, nt) + }) + }) + } + function cssTransition(tt) { + var et = tt.enter, + nt = tt.exit, + rt = tt.appendPosition, + it = rt === void 0 ? !1 : rt, + ot = tt.collapse, + at = ot === void 0 ? !0 : ot, + st = tt.collapseDuration, + lt = st === void 0 ? 300 : st + return function (ut) { + var ht = ut.children, + dt = ut.position, + pt = ut.preventExitTransition, + mt = ut.done, + gt = ut.nodeRef, + yt = ut.isIn, + bt = it ? et + '--' + dt : et, + vt = it ? nt + '--' + dt : nt, + xt = reactExports.useRef(), + kt = reactExports.useRef(0) + reactExports.useLayoutEffect(function () { + St() + }, []), + reactExports.useEffect( + function () { + yt || (pt ? Et() : At()) + }, + [yt], + ) + function St() { + var $t = gt.current + ;(xt.current = $t.className), + ($t.className += ' ' + bt), + $t.addEventListener('animationend', Tt), + $t.addEventListener('animationcancel', Tt) + } + function Tt($t) { + if ($t.target === gt.current) { + var Dt = gt.current + Dt.dispatchEvent(new Event('d')), + Dt.removeEventListener('animationend', Tt), + Dt.removeEventListener('animationcancel', Tt), + kt.current === 0 && (Dt.className = xt.current) + } + } + function At() { + kt.current = 1 + var $t = gt.current + ;($t.className += ' ' + vt), $t.addEventListener('animationend', Et) + } + function Et() { + var $t = gt.current + $t.removeEventListener('animationend', Et), at ? collapseToast($t, mt, lt) : mt() + } + return React$1.createElement(React$1.Fragment, null, ht) + } + } + var eventManager = { + list: new Map(), + emitQueue: new Map(), + on: function (et, nt) { + return this.list.has(et) || this.list.set(et, []), this.list.get(et).push(nt), this + }, + off: function (et, nt) { + if (nt) { + var rt = this.list.get(et).filter(function (it) { + return it !== nt + }) + return this.list.set(et, rt), this + } + return this.list.delete(et), this + }, + cancelEmit: function (et) { + var nt = this.emitQueue.get(et) + return nt && (nt.forEach(clearTimeout), this.emitQueue.delete(et)), this + }, + emit: function (et) { + for (var nt = this, rt = arguments.length, it = new Array(rt > 1 ? rt - 1 : 0), ot = 1; ot < rt; ot++) + it[ot - 1] = arguments[ot] + this.list.has(et) && + this.list.get(et).forEach(function (at) { + var st = setTimeout(function () { + at.apply(void 0, it) + }, 0) + nt.emitQueue.has(et) || nt.emitQueue.set(et, []), nt.emitQueue.get(et).push(st) + }) + }, + }, + _excluded$I = ['delay', 'staleId'] + function useToastContainer(tt) { + var et = reactExports.useReducer(function (bt) { + return bt + 1 + }, 0), + nt = et[1], + rt = reactExports.useState([]), + it = rt[0], + ot = rt[1], + at = reactExports.useRef(null), + st = reactExports.useRef(new Map()).current, + lt = function (vt) { + return it.indexOf(vt) !== -1 + }, + ct = reactExports.useRef({ + toastKey: 1, + displayedToast: 0, + count: 0, + queue: [], + props: tt, + containerId: null, + isToastActive: lt, + getToast: function (vt) { + return st.get(vt) + }, + }).current + reactExports.useEffect(function () { + return ( + (ct.containerId = tt.containerId), + eventManager + .cancelEmit(3) + .on(0, mt) + .on(1, function (bt) { + return at.current && ht(bt) + }) + .on(5, ut) + .emit(2, ct), + function () { + return eventManager.emit(3, ct) + } + ) + }, []), + reactExports.useEffect( + function () { + ;(ct.isToastActive = lt), (ct.displayedToast = it.length), eventManager.emit(4, it.length, tt.containerId) + }, + [it], + ), + reactExports.useEffect(function () { + ct.props = tt + }) + function ut(bt) { + var vt = bt.containerId, + xt = ct.props.limit + xt && (!vt || ct.containerId === vt) && ((ct.count -= ct.queue.length), (ct.queue = [])) + } + function ht(bt) { + ot(function (vt) { + return isToastIdValid(bt) + ? vt.filter(function (xt) { + return xt !== bt + }) + : [] + }) + } + function dt() { + var bt = ct.queue.shift(), + vt = bt.toastContent, + xt = bt.toastProps, + kt = bt.staleId + gt(vt, xt, kt) + } + function pt(bt) { + return ( + !at.current || + (ct.props.enableMultiContainer && bt.containerId !== ct.props.containerId) || + (st.has(bt.toastId) && bt.updateId == null) + ) + } + function mt(bt, vt) { + var xt = vt.delay, + kt = vt.staleId, + St = _objectWithoutPropertiesLoose$l(vt, _excluded$I) + if (!(!canBeRendered(bt) || pt(St))) { + var Tt = St.toastId, + At = St.updateId, + Et = St.data, + $t = ct.props, + Dt = function () { + return ht(Tt) + }, + jt = At == null + jt && ct.count++ + var Pt = { + toastId: Tt, + updateId: At, + isLoading: St.isLoading, + theme: St.theme || $t.theme, + icon: St.icon != null ? St.icon : $t.icon, + isIn: !1, + key: St.key || ct.toastKey++, + type: St.type, + closeToast: Dt, + closeButton: St.closeButton, + rtl: $t.rtl, + position: St.position || $t.position, + transition: St.transition || $t.transition, + className: parseClassName(St.className || $t.toastClassName), + bodyClassName: parseClassName(St.bodyClassName || $t.bodyClassName), + style: St.style || $t.toastStyle, + bodyStyle: St.bodyStyle || $t.bodyStyle, + onClick: St.onClick || $t.onClick, + pauseOnHover: isBool(St.pauseOnHover) ? St.pauseOnHover : $t.pauseOnHover, + pauseOnFocusLoss: isBool(St.pauseOnFocusLoss) ? St.pauseOnFocusLoss : $t.pauseOnFocusLoss, + draggable: isBool(St.draggable) ? St.draggable : $t.draggable, + draggablePercent: St.draggablePercent || $t.draggablePercent, + draggableDirection: St.draggableDirection || $t.draggableDirection, + closeOnClick: isBool(St.closeOnClick) ? St.closeOnClick : $t.closeOnClick, + progressClassName: parseClassName(St.progressClassName || $t.progressClassName), + progressStyle: St.progressStyle || $t.progressStyle, + autoClose: St.isLoading ? !1 : getAutoCloseDelay(St.autoClose, $t.autoClose), + hideProgressBar: isBool(St.hideProgressBar) ? St.hideProgressBar : $t.hideProgressBar, + progress: St.progress, + role: St.role || $t.role, + deleteToast: function () { + st.delete(Tt) + var It = ct.queue.length + if ( + ((ct.count = isToastIdValid(Tt) ? ct.count - 1 : ct.count - ct.displayedToast), + ct.count < 0 && (ct.count = 0), + It > 0) + ) { + var Ot = isToastIdValid(Tt) ? 1 : ct.props.limit + if (It === 1 || Ot === 1) ct.displayedToast++, dt() + else { + var Wt = Ot > It ? It : Ot + ct.displayedToast = Wt + for (var zt = 0; zt < Wt; zt++) dt() + } + } else nt() + }, + } + isFn(St.onOpen) && (Pt.onOpen = St.onOpen), + isFn(St.onClose) && (Pt.onClose = St.onClose), + (Pt.closeButton = $t.closeButton), + St.closeButton === !1 || canBeRendered(St.closeButton) + ? (Pt.closeButton = St.closeButton) + : St.closeButton === !0 && (Pt.closeButton = canBeRendered($t.closeButton) ? $t.closeButton : !0) + var Ct = bt + reactExports.isValidElement(bt) && !isStr(bt.type) + ? (Ct = reactExports.cloneElement(bt, { closeToast: Dt, toastProps: Pt, data: Et })) + : isFn(bt) && (Ct = bt({ closeToast: Dt, toastProps: Pt, data: Et })), + $t.limit && $t.limit > 0 && ct.count > $t.limit && jt + ? ct.queue.push({ toastContent: Ct, toastProps: Pt, staleId: kt }) + : isNum(xt) && xt > 0 + ? setTimeout(function () { + gt(Ct, Pt, kt) + }, xt) + : gt(Ct, Pt, kt) + } + } + function gt(bt, vt, xt) { + var kt = vt.toastId + xt && st.delete(xt), + st.set(kt, { content: bt, props: vt }), + ot(function (St) { + return [].concat(St, [kt]).filter(function (Tt) { + return Tt !== xt + }) + }) + } + function yt(bt) { + var vt = new Map(), + xt = Array.from(st.values()) + return ( + tt.newestOnTop && xt.reverse(), + xt.forEach(function (kt) { + var St = kt.props.position + vt.has(St) || vt.set(St, []), vt.get(St).push(kt) + }), + Array.from(vt, function (kt) { + return bt(kt[0], kt[1]) + }) + ) + } + return { getToastToRender: yt, containerRef: at, isToastActive: lt } + } + function getX$1(tt) { + return tt.targetTouches && tt.targetTouches.length >= 1 ? tt.targetTouches[0].clientX : tt.clientX + } + function getY$1(tt) { + return tt.targetTouches && tt.targetTouches.length >= 1 ? tt.targetTouches[0].clientY : tt.clientY + } + function useToast(tt) { + var et = reactExports.useState(!1), + nt = et[0], + rt = et[1], + it = reactExports.useState(!1), + ot = it[0], + at = it[1], + st = reactExports.useRef(null), + lt = reactExports.useRef({ + start: 0, + x: 0, + y: 0, + delta: 0, + removalDistance: 0, + canCloseOnClick: !0, + canDrag: !1, + boundingRect: null, + didMove: !1, + }).current, + ct = reactExports.useRef(tt), + ut = tt.autoClose, + ht = tt.pauseOnHover, + dt = tt.closeToast, + pt = tt.onClick, + mt = tt.closeOnClick + reactExports.useEffect(function () { + ct.current = tt + }), + reactExports.useEffect(function () { + return ( + st.current && st.current.addEventListener('d', bt, { once: !0 }), + isFn(tt.onOpen) && tt.onOpen(reactExports.isValidElement(tt.children) && tt.children.props), + function () { + var Dt = ct.current + isFn(Dt.onClose) && Dt.onClose(reactExports.isValidElement(Dt.children) && Dt.children.props) + } + ) + }, []), + reactExports.useEffect( + function () { + return ( + tt.pauseOnFocusLoss && xt(), + function () { + tt.pauseOnFocusLoss && kt() + } + ) + }, + [tt.pauseOnFocusLoss], + ) + function gt(Dt) { + if (tt.draggable) { + St() + var jt = st.current + ;(lt.canCloseOnClick = !0), + (lt.canDrag = !0), + (lt.boundingRect = jt.getBoundingClientRect()), + (jt.style.transition = ''), + (lt.x = getX$1(Dt.nativeEvent)), + (lt.y = getY$1(Dt.nativeEvent)), + tt.draggableDirection === 'x' + ? ((lt.start = lt.x), (lt.removalDistance = jt.offsetWidth * (tt.draggablePercent / 100))) + : ((lt.start = lt.y), + (lt.removalDistance = + jt.offsetHeight * (tt.draggablePercent === 80 ? tt.draggablePercent * 1.5 : tt.draggablePercent / 100))) + } + } + function yt() { + if (lt.boundingRect) { + var Dt = lt.boundingRect, + jt = Dt.top, + Pt = Dt.bottom, + Ct = Dt.left, + wt = Dt.right + tt.pauseOnHover && lt.x >= Ct && lt.x <= wt && lt.y >= jt && lt.y <= Pt ? vt() : bt() + } + } + function bt() { + rt(!0) + } + function vt() { + rt(!1) + } + function xt() { + document.hasFocus() || vt(), window.addEventListener('focus', bt), window.addEventListener('blur', vt) + } + function kt() { + window.removeEventListener('focus', bt), window.removeEventListener('blur', vt) + } + function St() { + ;(lt.didMove = !1), + document.addEventListener('mousemove', At), + document.addEventListener('mouseup', Et), + document.addEventListener('touchmove', At), + document.addEventListener('touchend', Et) + } + function Tt() { + document.removeEventListener('mousemove', At), + document.removeEventListener('mouseup', Et), + document.removeEventListener('touchmove', At), + document.removeEventListener('touchend', Et) + } + function At(Dt) { + var jt = st.current + lt.canDrag && + jt && + ((lt.didMove = !0), + nt && vt(), + (lt.x = getX$1(Dt)), + (lt.y = getY$1(Dt)), + tt.draggableDirection === 'x' ? (lt.delta = lt.x - lt.start) : (lt.delta = lt.y - lt.start), + lt.start !== lt.x && (lt.canCloseOnClick = !1), + (jt.style.transform = 'translate' + tt.draggableDirection + '(' + lt.delta + 'px)'), + (jt.style.opacity = '' + (1 - Math.abs(lt.delta / lt.removalDistance)))) + } + function Et() { + Tt() + var Dt = st.current + if (lt.canDrag && lt.didMove && Dt) { + if (((lt.canDrag = !1), Math.abs(lt.delta) > lt.removalDistance)) { + at(!0), tt.closeToast() + return + } + ;(Dt.style.transition = 'transform 0.2s, opacity 0.2s'), + (Dt.style.transform = 'translate' + tt.draggableDirection + '(0)'), + (Dt.style.opacity = '1') + } + } + var $t = { onMouseDown: gt, onTouchStart: gt, onMouseUp: yt, onTouchEnd: yt } + return ( + ut && ht && (($t.onMouseEnter = vt), ($t.onMouseLeave = bt)), + mt && + ($t.onClick = function (Dt) { + pt && pt(Dt), lt.canCloseOnClick && dt() + }), + { playToast: bt, pauseToast: vt, isRunning: nt, preventExitTransition: ot, toastRef: st, eventHandlers: $t } + ) + } + function CloseButton$8(tt) { + var et = tt.closeToast, + nt = tt.theme, + rt = tt.ariaLabel, + it = rt === void 0 ? 'close' : rt + return reactExports.createElement( + 'button', + { + className: 'Toastify__close-button Toastify__close-button--' + nt, + type: 'button', + onClick: function (at) { + at.stopPropagation(), et(at) + }, + 'aria-label': it, + }, + reactExports.createElement( + 'svg', + { 'aria-hidden': 'true', viewBox: '0 0 14 16' }, + reactExports.createElement('path', { + fillRule: 'evenodd', + d: 'M7.71 8.23l3.75 3.75-1.48 1.48-3.75-3.75-3.75 3.75L1 11.98l3.75-3.75L1 4.48 2.48 3l3.75 3.75L9.98 3l1.48 1.48-3.75 3.75z', + }), + ), + ) + } + function ProgressBar(tt) { + var et, + nt, + rt = tt.delay, + it = tt.isRunning, + ot = tt.closeToast, + at = tt.type, + st = tt.hide, + lt = tt.className, + ct = tt.style, + ut = tt.controlledProgress, + ht = tt.progress, + dt = tt.rtl, + pt = tt.isIn, + mt = tt.theme, + gt = _extends$s({}, ct, { + animationDuration: rt + 'ms', + animationPlayState: it ? 'running' : 'paused', + opacity: st ? 0 : 1, + }) + ut && (gt.transform = 'scaleX(' + ht + ')') + var yt = clsx$1( + 'Toastify__progress-bar', + ut ? 'Toastify__progress-bar--controlled' : 'Toastify__progress-bar--animated', + 'Toastify__progress-bar-theme--' + mt, + 'Toastify__progress-bar--' + at, + ((et = {}), (et['Toastify__progress-bar--rtl'] = dt), et), + ), + bt = isFn(lt) ? lt({ rtl: dt, type: at, defaultClassName: yt }) : clsx$1(yt, lt), + vt = + ((nt = {}), + (nt[ut && ht >= 1 ? 'onTransitionEnd' : 'onAnimationEnd'] = + ut && ht < 1 + ? null + : function () { + pt && ot() + }), + nt) + return reactExports.createElement( + 'div', + Object.assign( + { + role: 'progressbar', + 'aria-hidden': st ? 'true' : 'false', + 'aria-label': 'notification timer', + className: bt, + style: gt, + }, + vt, + ), + ) + } + ProgressBar.defaultProps = { type: TYPE.DEFAULT, hide: !1 } + var _excluded$1$2 = ['theme', 'type'], + Svg = function (et) { + var nt = et.theme, + rt = et.type, + it = _objectWithoutPropertiesLoose$l(et, _excluded$1$2) + return reactExports.createElement( + 'svg', + Object.assign( + { + viewBox: '0 0 24 24', + width: '100%', + height: '100%', + fill: nt === 'colored' ? 'currentColor' : 'var(--toastify-icon-color-' + rt + ')', + }, + it, + ), + ) + } + function Warning(tt) { + return reactExports.createElement( + Svg, + Object.assign({}, tt), + reactExports.createElement('path', { + d: 'M23.32 17.191L15.438 2.184C14.728.833 13.416 0 11.996 0c-1.42 0-2.733.833-3.443 2.184L.533 17.448a4.744 4.744 0 000 4.368C1.243 23.167 2.555 24 3.975 24h16.05C22.22 24 24 22.044 24 19.632c0-.904-.251-1.746-.68-2.44zm-9.622 1.46c0 1.033-.724 1.823-1.698 1.823s-1.698-.79-1.698-1.822v-.043c0-1.028.724-1.822 1.698-1.822s1.698.79 1.698 1.822v.043zm.039-12.285l-.84 8.06c-.057.581-.408.943-.897.943-.49 0-.84-.367-.896-.942l-.84-8.065c-.057-.624.25-1.095.779-1.095h1.91c.528.005.84.476.784 1.1z', + }), + ) + } + function Info(tt) { + return reactExports.createElement( + Svg, + Object.assign({}, tt), + reactExports.createElement('path', { + d: 'M12 0a12 12 0 1012 12A12.013 12.013 0 0012 0zm.25 5a1.5 1.5 0 11-1.5 1.5 1.5 1.5 0 011.5-1.5zm2.25 13.5h-4a1 1 0 010-2h.75a.25.25 0 00.25-.25v-4.5a.25.25 0 00-.25-.25h-.75a1 1 0 010-2h1a2 2 0 012 2v4.75a.25.25 0 00.25.25h.75a1 1 0 110 2z', + }), + ) + } + function Success(tt) { + return reactExports.createElement( + Svg, + Object.assign({}, tt), + reactExports.createElement('path', { + d: 'M12 0a12 12 0 1012 12A12.014 12.014 0 0012 0zm6.927 8.2l-6.845 9.289a1.011 1.011 0 01-1.43.188l-4.888-3.908a1 1 0 111.25-1.562l4.076 3.261 6.227-8.451a1 1 0 111.61 1.183z', + }), + ) + } + function Error$2(tt) { + return reactExports.createElement( + Svg, + Object.assign({}, tt), + reactExports.createElement('path', { + d: 'M11.983 0a12.206 12.206 0 00-8.51 3.653A11.8 11.8 0 000 12.207 11.779 11.779 0 0011.8 24h.214A12.111 12.111 0 0024 11.791 11.766 11.766 0 0011.983 0zM10.5 16.542a1.476 1.476 0 011.449-1.53h.027a1.527 1.527 0 011.523 1.47 1.475 1.475 0 01-1.449 1.53h-.027a1.529 1.529 0 01-1.523-1.47zM11 12.5v-6a1 1 0 012 0v6a1 1 0 11-2 0z', + }), + ) + } + function Spinner() { + return reactExports.createElement('div', { className: 'Toastify__spinner' }) + } + var Icons = { info: Info, warning: Warning, success: Success, error: Error$2, spinner: Spinner }, + Toast = function (et) { + var nt, + rt, + it = useToast(et), + ot = it.isRunning, + at = it.preventExitTransition, + st = it.toastRef, + lt = it.eventHandlers, + ct = et.closeButton, + ut = et.children, + ht = et.autoClose, + dt = et.onClick, + pt = et.type, + mt = et.hideProgressBar, + gt = et.closeToast, + yt = et.transition, + bt = et.position, + vt = et.className, + xt = et.style, + kt = et.bodyClassName, + St = et.bodyStyle, + Tt = et.progressClassName, + At = et.progressStyle, + Et = et.updateId, + $t = et.role, + Dt = et.progress, + jt = et.rtl, + Pt = et.toastId, + Ct = et.deleteToast, + wt = et.isIn, + It = et.isLoading, + Ot = et.icon, + Wt = et.theme, + zt = clsx$1( + 'Toastify__toast', + 'Toastify__toast-theme--' + Wt, + 'Toastify__toast--' + pt, + ((nt = {}), (nt['Toastify__toast--rtl'] = jt), nt), + ), + Ft = isFn(vt) ? vt({ rtl: jt, position: bt, type: pt, defaultClassName: zt }) : clsx$1(zt, vt), + Nt = !!Dt, + Ut = Icons[pt], + Mt = { theme: Wt, type: pt }, + Ht = Ut && Ut(Mt) + Ot === !1 + ? (Ht = void 0) + : isFn(Ot) + ? (Ht = Ot(Mt)) + : reactExports.isValidElement(Ot) + ? (Ht = reactExports.cloneElement(Ot, Mt)) + : isStr(Ot) + ? (Ht = Ot) + : It && (Ht = Icons.spinner()) + function en(sn) { + if (sn) { + var Kt = { closeToast: gt, type: pt, theme: Wt } + if (isFn(sn)) return sn(Kt) + if (reactExports.isValidElement(sn)) return reactExports.cloneElement(sn, Kt) + } + } + return reactExports.createElement( + yt, + { isIn: wt, done: Ct, position: bt, preventExitTransition: at, nodeRef: st }, + reactExports.createElement( + 'div', + Object.assign({ id: Pt, onClick: dt, className: Ft }, lt, { style: xt, ref: st }), + reactExports.createElement( + 'div', + Object.assign({}, wt && { role: $t }, { + className: isFn(kt) ? kt({ type: pt }) : clsx$1('Toastify__toast-body', kt), + style: St, + }), + Ht && + reactExports.createElement( + 'div', + { + className: clsx$1( + 'Toastify__toast-icon', + ((rt = {}), (rt['Toastify--animate-icon Toastify__zoom-enter'] = !It), rt), + ), + }, + Ht, + ), + reactExports.createElement('div', null, ut), + ), + en(ct), + (ht || Nt) && + reactExports.createElement( + ProgressBar, + Object.assign({}, Et && !Nt ? { key: 'pb-' + Et } : {}, { + rtl: jt, + theme: Wt, + delay: ht, + isRunning: ot, + isIn: wt, + closeToast: gt, + hide: mt, + type: pt, + style: At, + className: Tt, + controlledProgress: Nt, + progress: Dt, + }), + ), + ), + ) + }, + Bounce = cssTransition({ + enter: 'Toastify--animate Toastify__bounce-enter', + exit: 'Toastify--animate Toastify__bounce-exit', + appendPosition: !0, + }), + ToastContainer = function (et) { + var nt = useToastContainer(et), + rt = nt.getToastToRender, + it = nt.containerRef, + ot = nt.isToastActive, + at = et.className, + st = et.style, + lt = et.rtl, + ct = et.containerId + function ut(ht) { + var dt, + pt = clsx$1( + 'Toastify__toast-container', + 'Toastify__toast-container--' + ht, + ((dt = {}), (dt['Toastify__toast-container--rtl'] = lt), dt), + ) + return isFn(at) ? at({ position: ht, rtl: lt, defaultClassName: pt }) : clsx$1(pt, parseClassName(at)) + } + return reactExports.createElement( + 'div', + { ref: it, className: 'Toastify', id: ct }, + rt(function (ht, dt) { + var pt = dt.length ? _extends$s({}, st) : _extends$s({}, st, { pointerEvents: 'none' }) + return reactExports.createElement( + 'div', + { className: ut(ht), style: pt, key: 'container-' + ht }, + dt.map(function (mt) { + var gt = mt.content, + yt = mt.props + return reactExports.createElement( + Toast, + Object.assign({}, yt, { + isIn: ot(yt.toastId), + key: 'toast-' + yt.key, + closeButton: yt.closeButton === !0 ? CloseButton$8 : yt.closeButton, + }), + gt, + ) + }), + ) + }), + ) + } + ToastContainer.defaultProps = { + position: POSITION.TOP_RIGHT, + transition: Bounce, + rtl: !1, + autoClose: 5e3, + hideProgressBar: !1, + closeButton: CloseButton$8, + pauseOnHover: !0, + pauseOnFocusLoss: !0, + closeOnClick: !0, + newestOnTop: !1, + draggable: !0, + draggablePercent: 80, + draggableDirection: 'x', + role: 'alert', + theme: 'light', + } + var containers = new Map(), + latestInstance, + containerDomNode, + containerConfig, + queue$1 = [], + lazy = !1 + function getToast(tt, et) { + var nt = et.containerId, + rt = containers.get(nt || latestInstance) + return rt ? rt.getToast(tt) : null + } + function generateToastId() { + return Math.random().toString(36).substring(2, 9) + } + function getToastId(tt) { + return tt && (isStr(tt.toastId) || isNum(tt.toastId)) ? tt.toastId : generateToastId() + } + function dispatchToast(tt, et) { + return ( + containers.size > 0 + ? eventManager.emit(0, tt, et) + : (queue$1.push({ content: tt, options: et }), + lazy && + canUseDom && + ((lazy = !1), + (containerDomNode = document.createElement('div')), + document.body.appendChild(containerDomNode), + reactDomExports.render( + reactExports.createElement(ToastContainer, Object.assign({}, containerConfig)), + containerDomNode, + ))), + et.toastId + ) + } + function mergeOptions(tt, et) { + return _extends$s({}, et, { type: (et && et.type) || tt, toastId: getToastId(et) }) + } + function createToastByType(tt) { + return function (et, nt) { + return dispatchToast(et, mergeOptions(tt, nt)) + } + } + function toast(tt, et) { + return dispatchToast(tt, mergeOptions(TYPE.DEFAULT, et)) + } + toast.loading = function (tt, et) { + return dispatchToast( + tt, + mergeOptions( + TYPE.DEFAULT, + _extends$s({ isLoading: !0, autoClose: !1, closeOnClick: !1, closeButton: !1, draggable: !1 }, et), + ), + ) + } + function handlePromise(tt, et, nt) { + var rt = et.pending, + it = et.error, + ot = et.success, + at + rt && (at = isStr(rt) ? toast.loading(rt, nt) : toast.loading(rt.render, _extends$s({}, nt, rt))) + var st = { isLoading: null, autoClose: null, closeOnClick: null, closeButton: null, draggable: null }, + lt = function (ht, dt, pt) { + if (dt == null) { + toast.dismiss(at) + return + } + var mt = _extends$s({ type: ht }, st, nt, { data: pt }), + gt = isStr(dt) ? { render: dt } : dt + return at ? toast.update(at, _extends$s({}, mt, gt)) : toast(gt.render, _extends$s({}, mt, gt)), pt + }, + ct = isFn(tt) ? tt() : tt + return ( + ct + .then(function (ut) { + return lt('success', ot, ut) + }) + .catch(function (ut) { + return lt('error', it, ut) + }), + ct + ) + } + toast.promise = handlePromise + toast.success = createToastByType(TYPE.SUCCESS) + toast.info = createToastByType(TYPE.INFO) + toast.error = createToastByType(TYPE.ERROR) + toast.warning = createToastByType(TYPE.WARNING) + toast.warn = toast.warning + toast.dark = function (tt, et) { + return dispatchToast(tt, mergeOptions(TYPE.DEFAULT, _extends$s({ theme: 'dark' }, et))) + } + toast.dismiss = function (tt) { + return eventManager.emit(1, tt) + } + toast.clearWaitingQueue = function (tt) { + return tt === void 0 && (tt = {}), eventManager.emit(5, tt) + } + toast.isActive = function (tt) { + var et = !1 + return ( + containers.forEach(function (nt) { + nt.isToastActive && nt.isToastActive(tt) && (et = !0) + }), + et + ) + } + toast.update = function (tt, et) { + et === void 0 && (et = {}), + setTimeout(function () { + var nt = getToast(tt, et) + if (nt) { + var rt = nt.props, + it = nt.content, + ot = _extends$s({}, rt, et, { toastId: et.toastId || tt, updateId: generateToastId() }) + ot.toastId !== tt && (ot.staleId = tt) + var at = ot.render || it + delete ot.render, dispatchToast(at, ot) + } + }, 0) + } + toast.done = function (tt) { + toast.update(tt, { progress: 1 }) + } + toast.onChange = function (tt) { + return ( + isFn(tt) && eventManager.on(4, tt), + function () { + isFn(tt) && eventManager.off(4, tt) + } + ) + } + toast.configure = function (tt) { + tt === void 0 && (tt = {}), (lazy = !0), (containerConfig = tt) + } + toast.POSITION = POSITION + toast.TYPE = TYPE + eventManager + .on(2, function (tt) { + ;(latestInstance = tt.containerId || tt), + containers.set(latestInstance, tt), + queue$1.forEach(function (et) { + eventManager.emit(0, et.content, et.options) + }), + (queue$1 = []) + }) + .on(3, function (tt) { + containers.delete(tt.containerId || tt), + containers.size === 0 && eventManager.off(0).off(1).off(5), + canUseDom && containerDomNode && document.body.removeChild(containerDomNode) + }) + const colors = { + black: 'rgb(0, 0, 0)', + bluePressState: 'rgb(57, 97, 220)', + blueTextAccent: 'rgb(130, 180, 255)', + body: 'rgb(21, 30, 39)', + boostBg1: 'rgb(32, 63, 62)', + budgetExplanationModalBg: 'rgb(21, 28, 35)', + dashboardHeader: 'rgba(26, 36, 46, 0.3)', + dashboardSearch: 'rgb(21, 30, 39)', + dashboardWashedoutText: 'rgb(107, 122, 141)', + divider1: 'rgb(21, 30, 39)', + divider2: 'rgb(16, 19, 23)', + divider3: 'rgb(71, 81, 94)', + gray100: 'rgba(51, 51, 51, 0.2)', + gray200: 'rgba(51, 51, 51, 0.4)', + gray300: 'rgba(51, 51, 51, 0.6)', + gray400: 'rgba(51, 51, 51, 0.8)', + gray500: 'rgb(51, 51, 51)', + green100: 'rgba(73, 201, 152, 0.2)', + green200: 'rgba(73, 201, 152, 0.4)', + green300: 'rgba(73, 201, 152, 0.6)', + green400: 'rgba(73, 201, 152, 0.8)', + greenBorder: 'rgb(47, 179, 121)', + headerBackground: 'rgb(26, 36, 46)', + inputBg1: 'rgb(32, 39, 47)', + inputBg2: 'rgb(20, 22, 26)', + inputOutline1: 'rgb(71, 81, 94)', + inputPlaceholder: 'rgb(76, 86, 101)', + lightBlue100: 'rgba(93, 143, 221, 0.2)', + lightBlue200: 'rgba(93, 143, 221, 0.4)', + lightBlue300: 'rgba(93, 143, 221, 0.6)', + lightBlue400: 'rgba(93, 143, 221, 0.8)', + lightBlue500: 'rgb(93, 143, 221)', + lightGray: 'rgb(187, 187, 187)', + listBg: 'rgb(21, 30, 39)', + mainBottomIcons: 'rgb(144, 155, 170)', + modalAuth: '#909baa', + modalBg: 'rgb(25, 33, 40)', + modalShield: '#618aff', + modalWhiteOverlayBg: 'rgba(255, 255, 255, 0.2)', + placeholderText: 'rgb(85, 97, 113)', + primaryBlueBorder: 'rgb(80, 120, 242)', + primaryBlue: 'rgba(97, 138, 255, 1)', + primaryButton: 'rgb(130, 180, 255)', + primaryGreen: 'rgb(73, 201, 152)', + primaryRed: 'rgb(237, 116, 116)', + primaryText1: 'rgb(255, 255, 255)', + receivedIcon: 'rgb(130, 180, 255)', + receivedMsgBg: 'rgb(34, 46, 58)', + secondaryRed: 'rgb(255, 143, 128)', + secondaryText4: 'rgb(107, 122, 141)', + sentMsgBg: 'rgb(62, 97, 137)', + sentMsgBgPress: 'rgb(44, 66, 91)', + text2: 'rgb(255, 255, 255)', + textMessages: 'rgb(255, 255, 255)', + transactionBg: 'rgb(30, 41, 52)', + transactionBgBorder: 'rgb(21, 30, 39)', + transactionBlueText: 'rgb(130, 180, 255)', + unreadMsgText: 'rgb(186, 193, 198)', + washedOutGreen: 'rgb(47, 116, 96)', + washedOutReceivedText: 'rgb(85, 97, 113)', + washedOutSentText: 'rgb(130, 156, 185)', + white: 'rgb(255, 255, 255)', + transparentWhite: '#ffffff88', + transparentBlack: '#000000bb', + BG1: 'rgba(35, 37, 47, 1)', + BG1_NORMAL: 'rgba(28, 30, 38, 1)', + BG1_HOVER: 'rgba(21, 22, 28, 1)', + BG1_PRESS: '#0E0F13', + BG2: 'rgba(22, 23, 29, 1)', + BG3: 'rgba(28, 30, 38, 1)', + GRAY3: 'rgba(186, 193, 198, 1)', + GRAY6: '#909BAA', + GRAY7: 'rgba(107, 122, 141, 1)', + SECONDARY_BLUE: 'rgba(130, 180, 255, 1)', + PRIMARY_BLUE: 'rgba(97, 138, 255, 1)', + BUTTON1: 'rgba(48, 51, 66, 1)', + BUTTON1_HOVER: 'rgba(44, 47, 60, 1)', + BUTTON1_PRESS: 'rgba(41, 44, 56, 1)', + PRIMARY_BLUE_BORDER: 'rgba(80, 120, 242, 1)', + BLUE_PRESS_STATE: 'rgba(57, 97, 220, 1)', + }, + background = Ae` + ${({ background: tt }) => tt && `background-color: ${colors[tt]};`} +`, + switchProp$2 = (tt, et) => { + switch (tt) { + case 'borderColor': + return `border-color: ${et};` + case 'borderRadius': + return `border-radius: ${et}px;` + case 'borderRadiusBottomLeft': + return `border-bottom-left-radius: ${et}px;` + case 'borderRadiusBottomRight': + return `border-bottom-right-radius: ${et}px;` + case 'borderRadiusTopLeft': + return `border-top-left-radius: ${et}px;` + case 'borderRadiusTopRight': + return `border-top-right-radius: ${et}px;` + case 'borderSize': + return ` + border-style: solid; + border-width: ${et}px; + ` + default: + return '' + } + }, + getPropStyle$2 = (tt, et) => (et === void 0 ? '' : switchProp$2(tt, et)), + getOverflowHidden = ({ + borderRadius: tt, + borderRadiusBottomLeft: et, + borderRadiusBottomRight: nt, + borderRadiusTopLeft: rt, + borderRadiusTopRight: it, + }) => ([tt, et, nt, rt, it].every((ot) => ot === void 0) ? '' : 'overflow: hidden;'), + border = Ae` + ${({ + borderColor: tt, + borderRadius: et, + borderRadiusBottomLeft: nt, + borderRadiusBottomRight: rt, + borderRadiusTopLeft: it, + borderRadiusTopRight: ot, + borderSize: at, + }) => ` + ${getOverflowHidden({ + borderRadius: et, + borderRadiusBottomLeft: nt, + borderRadiusBottomRight: rt, + borderRadiusTopLeft: it, + borderRadiusTopRight: ot, + })} + ${getPropStyle$2('borderColor', tt)} + ${getPropStyle$2('borderRadius', et)} + ${getPropStyle$2('borderRadiusBottomLeft', nt)} + ${getPropStyle$2('borderRadiusBottomRight', rt)} + ${getPropStyle$2('borderRadiusTopLeft', it)} + ${getPropStyle$2('borderRadiusTopRight', ot)} + ${getPropStyle$2('borderSize', at)} + `} +`, + assertNever = (tt) => { + throw new Error(`Unexpected object: ${tt}`) + }, + switchProp$1 = (tt, et) => { + switch (tt) { + case 'align': + return `align-items: ${et};` + case 'justify': + return `justify-content: ${et};` + case 'basis': + case 'direction': + case 'grow': + case 'shrink': + case 'wrap': + return `flex-${tt}: ${et};` + case 'opacity': + return `opacity: ${et}` + default: + return assertNever(tt) + } + }, + getPropStyle$1 = (tt, et) => (et === void 0 ? '' : switchProp$1(tt, et)), + flexbox = Ae` + display: flex; + min-height: 0; + min-width: 0; + + ${({ align: tt, basis: et, direction: nt, grow: rt, justify: it, shrink: ot, wrap: at }) => ` + ${getPropStyle$1('align', tt)} + ${getPropStyle$1('basis', et)} + ${getPropStyle$1('direction', nt)} + ${getPropStyle$1('grow', rt)} + ${getPropStyle$1('justify', it)} + ${getPropStyle$1('shrink', ot)} + ${getPropStyle$1('wrap', at)} + `} +`, + switchProp = (tt, et) => { + switch (tt) { + case 'p': + return `padding: ${et}px;` + case 'pb': + return `padding-bottom: ${et}px;` + case 'pl': + return `padding-left: ${et}px;` + case 'pr': + return `padding-right: ${et}px;` + case 'pt': + return `padding-top: ${et}px;` + case 'px': + return ` + padding-left: ${et}px; + padding-right: ${et}px; + ` + case 'py': + return ` + padding-bottom: ${et}px; + padding-top: ${et}px; + ` + default: + return assertNever(tt) + } + }, + getPropStyle = (tt, et) => (et === void 0 ? '' : switchProp(tt, et)), + padding$1 = Ae` + ${({ p: tt, pb: et, pl: nt, pr: rt, pt: it, px: ot, py: at }) => ` + ${getPropStyle('p', tt)} + ${getPropStyle('px', ot)} + ${getPropStyle('py', at)} + ${getPropStyle('pb', et)} + ${getPropStyle('pl', nt)} + ${getPropStyle('pr', rt)} + ${getPropStyle('pt', it)} + `} +`, + defaultProps$6 = { + align: 'stretch', + basis: 'auto', + direction: 'column', + grow: 0, + justify: 'flex-start', + opacity: 1, + shrink: 0, + wrap: 'nowrap', + }, + Flex = styled$4.div + .withConfig({ shouldForwardProp: (tt, et) => !['direction', 'wrap'].includes(tt) && et(tt) }) + .attrs((tt) => ({ ...defaultProps$6, ...tt }))` + ${background} + ${border} + ${flexbox} + ${padding$1} +`, + cssWithMediaQuery = + (tt) => + (et, ...nt) => { + const rt = Ae(et, ...nt) + return rt.join('').trim() + ? Ae` + @media ${tt} { + ${rt} + } + ` + : [''] + }, + breakpoints = { large: 1024, medium: 640, small: 0 }, + media = { + large: cssWithMediaQuery(`(min-width: ${breakpoints.large}px)`), + medium: cssWithMediaQuery(`(min-width: ${breakpoints.medium}px)`), + mediumOnly: cssWithMediaQuery(`(min-width: ${breakpoints.medium}px) and (max-width: ${breakpoints.large - 1}px)`), + small: cssWithMediaQuery(`(min-width: ${breakpoints.small}px)`), + smallOnly: cssWithMediaQuery(`(min-width: ${breakpoints.small}px) and (max-width: ${breakpoints.medium - 1}px)`), + }, + fontSizes = { + bigHeading: 30, + bigHeadingBold: 30, + heading: 24, + headingBold: 24, + hugeHeading: 40, + hugeHeadingBold: 40, + medium: 16, + mediumBold: 16, + regular: 14, + regularBold: 14, + tiny: 12, + tinyBold: 12, + }, + fontSizesMobile = { + bigHeading: 24, + bigHeadingBold: 24, + heading: 18, + headingBold: 18, + hugeHeading: 32, + hugeHeadingBold: 32, + medium: 16, + mediumBold: 16, + regular: 14, + regularBold: 14, + tiny: 12, + tinyBold: 12, + }, + fontWeights = { + bigHeading: 400, + bigHeadingBold: 700, + heading: 400, + headingBold: 700, + hugeHeading: 400, + hugeHeadingBold: 700, + medium: 500, + mediumBold: 600, + regular: 500, + regularBold: 600, + tiny: 300, + tinyBold: 500, + }, + style$2 = Ae` + ${({ kind: tt = 'regular' }) => Ae` + font-size: ${fontSizes[tt]}px; + font-weight: ${fontWeights[tt]}; + ${media.smallOnly` + font-size: ${fontSizesMobile[tt]}px; + `} + `} +`, + Text$3 = styled$4.span.withConfig({ shouldForwardProp: (tt, et) => !['kind'].includes(tt) && et(tt) })` + ${style$2} + + ${({ color: tt = 'primaryText1' }) => `color: ${colors[tt]};`} +`, + getButtonKindDimensions = ({ kind: tt, shape: et }) => { + switch (tt) { + case 'small': + return Ae` + padding: 4px 8px; + border-radius: ${et === 'rounded' ? '16px' : '8px'}; + height: 32px; + ` + case 'big': + return Ae` + padding: 16px 24px; + border-radius: ${et === 'rounded' ? '24px' : '8px'}; + height: 48px; + ` + default: + return Ae` + padding: 8px 16px; + border-radius: ${et === 'rounded' ? '32px' : '8px'}; + height: 64px; + ` + } + }, + getTextKind = ({ kind: tt }) => { + switch (tt) { + case 'small': + return 'regularBold' + case 'big': + return 'mediumBold' + default: + return 'regularBold' + } + }, + Wrapper$s = styled$4(Flex).attrs({ align: 'center', direction: 'row', justify: 'center' })` + border: none; + cursor: pointer; + pointer-events: auto; + + ${getButtonKindDimensions} + + &:hover { + opacity: ${({ disabled: tt }) => (tt ? 0.5 : 0.9)}; + } + + ${({ disabled: tt }) => + tt && + Ae` + opacity: 0.5; + pointer-events: none; + `} +`, + Button = ({ + background: tt = 'primaryButton', + children: et, + className: nt = 'button', + startIcon: rt, + endIcon: it, + disabled: ot, + id: at, + kind: st = 'regular', + onClick: lt, + onPointerDown: ct, + shape: ut = 'squared', + textColor: ht = 'white', + type: dt, + }) => + jsxRuntimeExports.jsxs(Wrapper$s, { + as: 'button', + background: tt, + className: nt, + disabled: ot, + id: at, + kind: st, + onClick: lt, + onPointerDown: ct, + shape: ut, + type: dt, + children: [ + rt && rt, + jsxRuntimeExports.jsx(Text$3, { color: ht, kind: getTextKind({ kind: st }), children: et }), + it && it, + ], + }), + createStoreImpl = (tt) => { + let et + const nt = new Set(), + rt = (lt, ct) => { + const ut = typeof lt == 'function' ? lt(et) : lt + if (!Object.is(ut, et)) { + const ht = et + ;(et = ct ?? typeof ut != 'object' ? ut : Object.assign({}, et, ut)), nt.forEach((dt) => dt(et, ht)) + } + }, + it = () => et, + st = { + setState: rt, + getState: it, + subscribe: (lt) => (nt.add(lt), () => nt.delete(lt)), + destroy: () => { + nt.clear() + }, + } + return (et = tt(rt, it, st)), st + }, + createStore$3 = (tt) => (tt ? createStoreImpl(tt) : createStoreImpl) + var withSelector = { exports: {} }, + withSelector_production_min = {}, + shim = { exports: {} }, + useSyncExternalStoreShim_production_min = {} + /** + * @license React + * use-sync-external-store-shim.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ var e$2 = reactExports + function h$4(tt, et) { + return (tt === et && (tt !== 0 || 1 / tt === 1 / et)) || (tt !== tt && et !== et) + } + var k$3 = typeof Object.is == 'function' ? Object.is : h$4, + l$2 = e$2.useState, + m$4 = e$2.useEffect, + n$3 = e$2.useLayoutEffect, + p$4 = e$2.useDebugValue + function q$2(tt, et) { + var nt = et(), + rt = l$2({ inst: { value: nt, getSnapshot: et } }), + it = rt[0].inst, + ot = rt[1] + return ( + n$3( + function () { + ;(it.value = nt), (it.getSnapshot = et), r$4(it) && ot({ inst: it }) + }, + [tt, nt, et], + ), + m$4( + function () { + return ( + r$4(it) && ot({ inst: it }), + tt(function () { + r$4(it) && ot({ inst: it }) + }) + ) + }, + [tt], + ), + p$4(nt), + nt + ) + } + function r$4(tt) { + var et = tt.getSnapshot + tt = tt.value + try { + var nt = et() + return !k$3(tt, nt) + } catch { + return !0 + } + } + function t$3(tt, et) { + return et() + } + var u$2 = + typeof window > 'u' || typeof window.document > 'u' || typeof window.document.createElement > 'u' ? t$3 : q$2 + useSyncExternalStoreShim_production_min.useSyncExternalStore = + e$2.useSyncExternalStore !== void 0 ? e$2.useSyncExternalStore : u$2 + shim.exports = useSyncExternalStoreShim_production_min + var shimExports = shim.exports + /** + * @license React + * use-sync-external-store-shim/with-selector.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ var h$3 = reactExports, + n$2 = shimExports + function p$3(tt, et) { + return (tt === et && (tt !== 0 || 1 / tt === 1 / et)) || (tt !== tt && et !== et) + } + var q$1 = typeof Object.is == 'function' ? Object.is : p$3, + r$3 = n$2.useSyncExternalStore, + t$2 = h$3.useRef, + u$1 = h$3.useEffect, + v$3 = h$3.useMemo, + w$2 = h$3.useDebugValue + withSelector_production_min.useSyncExternalStoreWithSelector = function (tt, et, nt, rt, it) { + var ot = t$2(null) + if (ot.current === null) { + var at = { hasValue: !1, value: null } + ot.current = at + } else at = ot.current + ot = v$3( + function () { + function lt(pt) { + if (!ct) { + if (((ct = !0), (ut = pt), (pt = rt(pt)), it !== void 0 && at.hasValue)) { + var mt = at.value + if (it(mt, pt)) return (ht = mt) + } + return (ht = pt) + } + if (((mt = ht), q$1(ut, pt))) return mt + var gt = rt(pt) + return it !== void 0 && it(mt, gt) ? mt : ((ut = pt), (ht = gt)) + } + var ct = !1, + ut, + ht, + dt = nt === void 0 ? null : nt + return [ + function () { + return lt(et()) + }, + dt === null + ? void 0 + : function () { + return lt(dt()) + }, + ] + }, + [et, nt, rt, it], + ) + var st = r$3(tt, ot[0], ot[1]) + return ( + u$1( + function () { + ;(at.hasValue = !0), (at.value = st) + }, + [st], + ), + w$2(st), + st + ) + } + withSelector.exports = withSelector_production_min + var withSelectorExports = withSelector.exports + const useSyncExternalStoreExports = getDefaultExportFromCjs(withSelectorExports), + { useSyncExternalStoreWithSelector: useSyncExternalStoreWithSelector$1 } = useSyncExternalStoreExports + let didWarnAboutEqualityFn = !1 + function useStore$2(tt, et = tt.getState, nt) { + const rt = useSyncExternalStoreWithSelector$1(tt.subscribe, tt.getState, tt.getServerState || tt.getState, et, nt) + return reactExports.useDebugValue(rt), rt + } + const createImpl = (tt) => { + const et = typeof tt == 'function' ? createStore$3(tt) : tt, + nt = (rt, it) => useStore$2(et, rt, it) + return Object.assign(nt, et), nt + }, + create$3 = (tt) => (tt ? createImpl(tt) : createImpl) + var react = (tt) => create$3(tt) + const defaultData$a = { + addNodeModalData: null, + currentModals: { addNode: !1, budgetExplanation: !1, sourcesTable: !1 }, + }, + useModalStore = create$3((tt) => ({ + ...defaultData$a, + close: (et) => { + tt((nt) => ({ addNodeModalData: null, currentModals: { ...nt.currentModals, [et]: !1 } })) + }, + open: (et) => { + tt((nt) => ({ currentModals: { ...nt.currentModals, [et]: !0 } })) + }, + setAddNodeModalData: (et) => { + tt(() => ({ addNodeModalData: et })) + }, + })), + useModal = (tt) => { + const { open: et, close: nt, setAddNodeModalData: rt, currentModals: it, addNodeModalData: ot } = useModalStore() + return { + addNodeModalData: ot, + close: () => nt(tt), + open: () => et(tt), + setAddNodeModalData: (at) => rt(at), + visible: it[tt], + } + }, + ClearIcon$1 = (tt) => + jsxRuntimeExports.jsx('svg', { + width: '1em', + height: '1em', + viewBox: '0 0 32 32', + fill: 'currentColor', + xmlns: 'http://www.w3.org/2000/svg', + children: jsxRuntimeExports.jsx('g', { + id: 'Property 1=press', + children: jsxRuntimeExports.jsx('path', { + id: 'close', + d: 'M16 17.2833L11.5083 21.775C11.3403 21.943 11.1264 22.0271 10.8667 22.0271C10.6069 22.0271 10.393 21.943 10.225 21.775C10.0569 21.6069 9.9729 21.393 9.9729 21.1333C9.9729 20.8736 10.0569 20.6597 10.225 20.4917L14.7167 16L10.225 11.5083C10.0569 11.3403 9.9729 11.1264 9.9729 10.8667C9.9729 10.6069 10.0569 10.393 10.225 10.225C10.393 10.0569 10.6069 9.9729 10.8667 9.9729C11.1264 9.9729 11.3403 10.0569 11.5083 10.225L16 14.7167L20.4917 10.225C20.6597 10.0569 20.8736 9.9729 21.1333 9.9729C21.393 9.9729 21.6069 10.0569 21.775 10.225C21.943 10.393 22.0271 10.6069 22.0271 10.8667C22.0271 11.1264 21.943 11.3403 21.775 11.5083L17.2833 16L21.775 20.4917C21.943 20.6597 22.0271 20.8736 22.0271 21.1333C22.0271 21.393 21.943 21.6069 21.775 21.775C21.6069 21.943 21.393 22.0271 21.1333 22.0271C20.8736 22.0271 20.6597 21.943 20.4917 21.775L16 17.2833Z', + fill: 'currentColor', + }), + }), + }), + scaleAnimation = We` + 0% { + transform: scale(0.8); + } + + 100% { + transform: scale(1); + } +`, + getModalKindStyles = ({ kind: tt = 'regular' }) => { + switch (tt) { + case 'small': + return Ae` + width: 300px; + height: 502px; + ` + case 'large': + return Ae` + width: 709px; + ` + default: + return Ae` + width: 520px; + ` + } + }, + ModalContainer = styled$4(Flex)` + z-index: 2000; + margin: 0 auto; + overflow: visible; + animation: ${scaleAnimation} 0.2s ease-in-out; + position: relative; + max-width: 100%; + overflow: hidden; + ${getModalKindStyles} +`, + fadeAnimation = We` + 0% { + opacity: 0; + } + + 100% { + opacity: 1; + } +`, + Bg = styled$4(Flex)` + position: fixed; + width: 100%; + height: 100vh; + transition: all; + z-index: 1500; + animation: ${fadeAnimation} 0.2s ease-in-out; + padding: 1rem; + + ${({ hideBg: tt }) => + !tt && + Ae` + background-color: ${colors.modalWhiteOverlayBg}; + `} +`, + CloseButton$7 = styled$4(Flex)` + position: absolute; + top: 16px; + right: 16px; + font-size: 20px; + color: ${colors.GRAY6}; + cursor: pointer; + z-index: 1; +`, + BaseModal = ({ + background: tt = 'modalBg', + children: et, + id: nt, + hideBg: rt, + kind: it, + preventOutsideClose: ot, + noWrap: at = !1, + onClose: st, + }) => { + const { visible: lt, close: ct } = useModal(nt) + return lt + ? jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { + children: jsxRuntimeExports.jsx(Bg, { + align: 'center', + hideBg: rt, + justify: 'center', + onClick: (ut) => { + ot || (ut.stopPropagation(), ct()) + }, + children: jsxRuntimeExports.jsxs(ModalContainer, { + background: tt, + borderRadius: 9, + id: nt, + kind: it, + onClick: (ut) => { + ut.stopPropagation() + }, + px: at ? 0 : 20, + py: at ? 0 : 20, + children: [ + st && + jsxRuntimeExports.jsx(CloseButton$7, { + onClick: st, + children: jsxRuntimeExports.jsx(ClearIcon$1, {}), + }), + et, + ], + }), + }), + }) + : null + }, + { origin: origin$1, host } = window.location, + isDevelopment = + origin$1 === 'http://localhost:3000' || + origin$1 === 'http://localhost:3001' || + origin$1 === 'https://sphinx-jarvis-david.sphinx1.repl.co', + getUrlFormEnv = () => ({}.VITE_APP_API_URL), + API_URL = getUrlFormEnv() || apiUrlFromSwarmHost() || 'https://knowledge-graph.sphinx.chat' + console.log('🚀 ~ file: index.ts:12 ~ API_URL:', API_URL) + console.log('🚀 ~ file: index.ts:12 ~ getUrlFormEnv:', getUrlFormEnv()) + const isChileGraph = API_URL.includes('boltwall') + function apiUrlFromSwarmHost() { + if (host.includes('swarm') && host.startsWith('nav')) { + const tt = host.split('.') + tt[0] = 'boltwall' + const nt = `https://${tt.join('.')}` + return console.log('API URL:', nt), nt + } + } + const AWS_IMAGE_BUCKET_URL = 'https://stakwork-uploads.s3.amazonaws.com/', + CLOUDFRONT_IMAGE_BUCKET_URL = 'https://d1gd7b7slyku8k.cloudfront.net/', + GRAPH_FOG_COLOR = 'blue', + GRAPH_GROUND_COLOR = 13421772, + GRAPH_LIGHT_INTENSITY = 0.8, + BOOST_SUCCESS = 'Boosted successfully', + BOOST_ERROR_BUDGET = 'Boost failed, insufficient budget', + NODE_ADD_SUCCESS = 'Submitted!', + NODE_ADD_ERROR = 'Submission failed, please try again.', + NODE_RELATIVE_HIGHLIGHT_COLORS = { + children: { nodeColor: 'green', segmentColor: 4063109 }, + guests: { nodeColor: 'purple', segmentColor: 14504191 }, + topics: { nodeColor: 'purple', segmentColor: 5273842 }, + pathway: { nodeColor: '#ffffff', segmentColor: 16777215 }, + }, + LINK = 'link', + TWITTER_HANDLE = 'twitter_handle', + GITHUB_REPOSITORY = 'github_repository', + YOUTUBE_CHANNEL = 'youtube_channel', + WEB_PAGE = 'web_page', + RSS = 'rss', + TWITTER_SOURCE = 'tweet', + TOPIC = 'topic', + DOCUMENT = 'document', + isE2E = !!{}.VITE_APP_IS_E2E, + request = async (tt, et) => { + const nt = await fetch(tt, et) + if (!nt.ok) throw nt + return nt.json() + }, + api = { + delete: (tt, et) => + request(`${API_URL}${tt}`, { headers: { ...et, 'Content-Type': 'application/json' }, method: 'DELETE' }), + get: (tt, et) => request(`${API_URL}${tt}`, et ? { headers: et } : void 0), + post: (tt, et, nt) => + request(`${API_URL}${tt}`, { + body: et, + headers: { ...nt, 'Content-Type': 'application/json' }, + method: 'POST', + }), + put: (tt, et, nt) => + request(`${API_URL}${tt}`, { body: et, headers: { ...nt, 'Content-Type': 'application/json' }, method: 'PUT' }), + }, + defaultParams = { skip: '0', limit: '500' }, + getRadarData = async (tt = defaultParams) => + await api.get(`/radar?${new URLSearchParams({ ...defaultParams, ...tt }).toString()}`), + getTopicsData = async (tt = defaultParams) => + await api.get(`/topics?${new URLSearchParams({ ...defaultParams, ...tt }).toString()}`), + getAboutData = async () => await api.get('/about'), + postAboutData = async (tt) => await api.post('/about', JSON.stringify(tt)), + triggerRadarJob = async () => api.get('/radar/trigger-job'), + putRadarData = async (tt, et) => await api.put(`/radar/${tt}`, JSON.stringify(et)), + putNodeData = async (tt) => await api.put('/node', JSON.stringify(tt)), + approveRadarData = async (tt, et) => + await api.put(`/radar/${tt}/approve`, JSON.stringify({ approve: 'True', pubkey: et })), + deleteRadarData = async (tt) => await api.delete(`/radar/${tt}`), + defaultData$9 = { isAdmin: !1, pubKey: '', budget: 0 }, + useUserStore = react((tt) => ({ + ...defaultData$9, + setIsAdmin: (et) => tt({ isAdmin: et }), + setPubKey: (et) => tt({ pubKey: et }), + setBudget: (et) => tt({ budget: et }), + })), + getLSat = async () => { + try { + const tt = localStorage.getItem('lsat') + if (tt) { + const nt = JSON.parse(tt) + return lsatToken(nt.macaroon, nt.preimage) + } + if (await distExports$1.enable()) { + const nt = await distExports$1.getLsat() + return nt.macaroon + ? (localStorage.setItem( + 'lsat', + JSON.stringify({ macaroon: nt.macaroon, identifier: nt.identifier, preimage: nt.preimage }), + ), + lsatToken(nt.macaroon, nt.preimage)) + : '' + } + return '' + } catch (tt) { + return console.warn(tt), '' + } + } + function lsatToken(tt, et) { + return `LSAT ${tt}:${et}` + } + var lib$2 = {}, + client = {}, + errors = {}, + __extends$1 = + (commonjsGlobal && commonjsGlobal.__extends) || + (function () { + var tt = function (et, nt) { + return ( + (tt = + Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && + function (rt, it) { + rt.__proto__ = it + }) || + function (rt, it) { + for (var ot in it) Object.prototype.hasOwnProperty.call(it, ot) && (rt[ot] = it[ot]) + }), + tt(et, nt) + ) + } + return function (et, nt) { + if (typeof nt != 'function' && nt !== null) + throw new TypeError('Class extends value ' + String(nt) + ' is not a constructor or null') + tt(et, nt) + function rt() { + this.constructor = et + } + et.prototype = nt === null ? Object.create(nt) : ((rt.prototype = nt.prototype), new rt()) + } + })() + Object.defineProperty(errors, '__esModule', { value: !0 }) + errors.InternalError = + errors.InvalidDataError = + errors.RoutingError = + errors.UnsupportedMethodError = + errors.ConnectionError = + errors.RejectionError = + errors.MissingProviderError = + void 0 + function fixError(tt, et, nt) { + if ((Object.setPrototypeOf(tt, nt.prototype), et === nt)) + if (((tt.name = et.name), Error.captureStackTrace)) Error.captureStackTrace(tt, nt) + else { + var rt = new Error(tt.message).stack + rt && (tt.stack = fixStack(rt, 'new '.concat(et.name))) + } + } + function fixStack(tt, et) { + if (!tt || !et) return tt + var nt = new RegExp('\\s+at\\s'.concat(et, '\\s')), + rt = tt.split(` +`), + it = rt.filter(function (ot) { + return !ot.match(nt) + }) + return it.join(` +`) + } + var MissingProviderError = (function (tt) { + __extends$1(et, tt) + function et(nt) { + var rt = this.constructor, + it = tt.call(this, nt) || this + return fixError(it, rt, et), it + } + return et + })(Error) + errors.MissingProviderError = MissingProviderError + var RejectionError = (function (tt) { + __extends$1(et, tt) + function et(nt) { + var rt = this.constructor, + it = tt.call(this, nt) || this + return fixError(it, rt, et), it + } + return et + })(Error) + errors.RejectionError = RejectionError + var ConnectionError = (function (tt) { + __extends$1(et, tt) + function et(nt) { + var rt = this.constructor, + it = tt.call(this, nt) || this + return fixError(it, rt, et), it + } + return et + })(Error) + errors.ConnectionError = ConnectionError + var UnsupportedMethodError = (function (tt) { + __extends$1(et, tt) + function et(nt) { + var rt = this.constructor, + it = tt.call(this, nt) || this + return fixError(it, rt, et), it + } + return et + })(Error) + errors.UnsupportedMethodError = UnsupportedMethodError + var RoutingError = (function (tt) { + __extends$1(et, tt) + function et(nt) { + var rt = this.constructor, + it = tt.call(this, nt) || this + return fixError(it, rt, et), it + } + return et + })(Error) + errors.RoutingError = RoutingError + var InvalidDataError = (function (tt) { + __extends$1(et, tt) + function et(nt) { + var rt = this.constructor, + it = tt.call(this, nt) || this + return fixError(it, rt, et), it + } + return et + })(Error) + errors.InvalidDataError = InvalidDataError + var InternalError = (function (tt) { + __extends$1(et, tt) + function et(nt) { + var rt = this.constructor, + it = tt.call(this, nt) || this + return fixError(it, rt, et), it + } + return et + })(Error) + errors.InternalError = InternalError + Object.defineProperty(client, '__esModule', { value: !0 }) + client.requestProvider = void 0 + var errors_1 = errors + function requestProvider(tt) { + return new Promise(function (et, nt) { + if (typeof window > 'u') return nt(new Error('Must be called in a browser context')) + var rt = window.webln + if (!rt) return nt(new errors_1.MissingProviderError('Your browser has no WebLN provider')) + rt.enable() + .then(function () { + return et(rt) + }) + .catch(function (it) { + return nt(it) + }) + }) + } + client.requestProvider = requestProvider + var provider = {} + Object.defineProperty(provider, '__esModule', { value: !0 }) + ;(function (tt) { + var et = + (commonjsGlobal && commonjsGlobal.__createBinding) || + (Object.create + ? function (rt, it, ot, at) { + at === void 0 && (at = ot) + var st = Object.getOwnPropertyDescriptor(it, ot) + ;(!st || ('get' in st ? !it.__esModule : st.writable || st.configurable)) && + (st = { + enumerable: !0, + get: function () { + return it[ot] + }, + }), + Object.defineProperty(rt, at, st) + } + : function (rt, it, ot, at) { + at === void 0 && (at = ot), (rt[at] = it[ot]) + }), + nt = + (commonjsGlobal && commonjsGlobal.__exportStar) || + function (rt, it) { + for (var ot in rt) ot !== 'default' && !Object.prototype.hasOwnProperty.call(it, ot) && et(it, rt, ot) + } + Object.defineProperty(tt, '__esModule', { value: !0 }), nt(client, tt), nt(provider, tt), nt(errors, tt) + })(lib$2) + async function payLsat(tt) { + if (await distExports$1.enable()) { + const it = localStorage.getItem('lsat') + if (it) { + localStorage.removeItem('lsat') + const at = JSON.parse(it) + await distExports$1.updateLsat(at.identifier, 'expired') + } + const ot = await distExports$1.saveLsat(tt.invoice, tt.baseMacaroon, window.location.host) + ot.success === !1 && (await distExports$1.topup()), + localStorage.setItem( + 'lsat', + JSON.stringify({ macaroon: tt.baseMacaroon, identifier: tt.id, preimage: ot.lsat.split(':')[1] }), + ) + return + } + localStorage.removeItem('lsat') + const rt = await (await lib$2.requestProvider()).sendPayment(tt.invoice) + localStorage.setItem( + 'lsat', + JSON.stringify({ macaroon: tt.baseMacaroon, identifier: tt.id, preimage: rt.preimage }), + ) + } + async function updateBudget(tt) { + await distExports$1.enable() + const et = await distExports$1.getBudget() + ;(et == null ? void 0 : et.msg) === 'Invalid Action' ? tt(null) : et != null && et.budget && tt(et.budget) + } + const executeIfTetsRunning = (tt) => { + isE2E && tt() + } + function executeIfProd(tt) { + return isDevelopment || isE2E ? null : tt() + } + function addToGlobalForE2e(tt, et) { + executeIfTetsRunning(() => { + window.e2e || (window.e2e = {}), (window.e2e[et] = tt) + }) + } + const E2E = () => { + const tt = useUserStore() + return ( + reactExports.useEffect(() => { + isE2E && (console.log({ isE2E }), addToGlobalForE2e(tt, 'userStore')) + }, [tt]), + jsxRuntimeExports.jsx('div', { id: 'e2e-check' }) + ) + }, + E2ETests = reactExports.memo(() => (isE2E ? jsxRuntimeExports.jsx(E2E, {}) : null)) + function timeToMilliseconds(tt) { + const [et, nt, rt] = tt.split(':').map(Number) + return Number((et * 60 * 60 * 1e3 + nt * 60 * 1e3 + rt * 1e3).toFixed(6)) + } + /** + * @license + * Copyright 2010-2022 Three.js Authors + * SPDX-License-Identifier: MIT + */ const REVISION = '143', + MOUSE = { LEFT: 0, MIDDLE: 1, RIGHT: 2, ROTATE: 0, DOLLY: 1, PAN: 2 }, + TOUCH = { ROTATE: 0, PAN: 1, DOLLY_PAN: 2, DOLLY_ROTATE: 3 }, + CullFaceNone = 0, + CullFaceBack = 1, + CullFaceFront = 2, + CullFaceFrontBack = 3, + BasicShadowMap = 0, + PCFShadowMap = 1, + PCFSoftShadowMap = 2, + VSMShadowMap = 3, + FrontSide = 0, + BackSide = 1, + DoubleSide = 2, + FlatShading = 1, + SmoothShading = 2, + NoBlending = 0, + NormalBlending = 1, + AdditiveBlending = 2, + SubtractiveBlending = 3, + MultiplyBlending = 4, + CustomBlending = 5, + AddEquation = 100, + SubtractEquation = 101, + ReverseSubtractEquation = 102, + MinEquation = 103, + MaxEquation = 104, + ZeroFactor = 200, + OneFactor = 201, + SrcColorFactor = 202, + OneMinusSrcColorFactor = 203, + SrcAlphaFactor = 204, + OneMinusSrcAlphaFactor = 205, + DstAlphaFactor = 206, + OneMinusDstAlphaFactor = 207, + DstColorFactor = 208, + OneMinusDstColorFactor = 209, + SrcAlphaSaturateFactor = 210, + NeverDepth = 0, + AlwaysDepth = 1, + LessDepth = 2, + LessEqualDepth = 3, + EqualDepth = 4, + GreaterEqualDepth = 5, + GreaterDepth = 6, + NotEqualDepth = 7, + MultiplyOperation = 0, + MixOperation = 1, + AddOperation = 2, + NoToneMapping = 0, + LinearToneMapping = 1, + ReinhardToneMapping = 2, + CineonToneMapping = 3, + ACESFilmicToneMapping = 4, + CustomToneMapping = 5, + UVMapping = 300, + CubeReflectionMapping = 301, + CubeRefractionMapping = 302, + EquirectangularReflectionMapping = 303, + EquirectangularRefractionMapping = 304, + CubeUVReflectionMapping = 306, + RepeatWrapping = 1e3, + ClampToEdgeWrapping = 1001, + MirroredRepeatWrapping = 1002, + NearestFilter = 1003, + NearestMipmapNearestFilter = 1004, + NearestMipMapNearestFilter = 1004, + NearestMipmapLinearFilter = 1005, + NearestMipMapLinearFilter = 1005, + LinearFilter = 1006, + LinearMipmapNearestFilter = 1007, + LinearMipMapNearestFilter = 1007, + LinearMipmapLinearFilter = 1008, + LinearMipMapLinearFilter = 1008, + UnsignedByteType = 1009, + ByteType = 1010, + ShortType = 1011, + UnsignedShortType = 1012, + IntType = 1013, + UnsignedIntType = 1014, + FloatType = 1015, + HalfFloatType = 1016, + UnsignedShort4444Type = 1017, + UnsignedShort5551Type = 1018, + UnsignedInt248Type = 1020, + AlphaFormat = 1021, + RGBFormat = 1022, + RGBAFormat = 1023, + LuminanceFormat = 1024, + LuminanceAlphaFormat = 1025, + DepthFormat = 1026, + DepthStencilFormat = 1027, + RedFormat = 1028, + RedIntegerFormat = 1029, + RGFormat = 1030, + RGIntegerFormat = 1031, + RGBAIntegerFormat = 1033, + RGB_S3TC_DXT1_Format = 33776, + RGBA_S3TC_DXT1_Format = 33777, + RGBA_S3TC_DXT3_Format = 33778, + RGBA_S3TC_DXT5_Format = 33779, + RGB_PVRTC_4BPPV1_Format = 35840, + RGB_PVRTC_2BPPV1_Format = 35841, + RGBA_PVRTC_4BPPV1_Format = 35842, + RGBA_PVRTC_2BPPV1_Format = 35843, + RGB_ETC1_Format = 36196, + RGB_ETC2_Format = 37492, + RGBA_ETC2_EAC_Format = 37496, + RGBA_ASTC_4x4_Format = 37808, + RGBA_ASTC_5x4_Format = 37809, + RGBA_ASTC_5x5_Format = 37810, + RGBA_ASTC_6x5_Format = 37811, + RGBA_ASTC_6x6_Format = 37812, + RGBA_ASTC_8x5_Format = 37813, + RGBA_ASTC_8x6_Format = 37814, + RGBA_ASTC_8x8_Format = 37815, + RGBA_ASTC_10x5_Format = 37816, + RGBA_ASTC_10x6_Format = 37817, + RGBA_ASTC_10x8_Format = 37818, + RGBA_ASTC_10x10_Format = 37819, + RGBA_ASTC_12x10_Format = 37820, + RGBA_ASTC_12x12_Format = 37821, + RGBA_BPTC_Format = 36492, + LoopOnce = 2200, + LoopRepeat = 2201, + LoopPingPong = 2202, + InterpolateDiscrete = 2300, + InterpolateLinear = 2301, + InterpolateSmooth = 2302, + ZeroCurvatureEnding = 2400, + ZeroSlopeEnding = 2401, + WrapAroundEnding = 2402, + NormalAnimationBlendMode = 2500, + AdditiveAnimationBlendMode = 2501, + TrianglesDrawMode = 0, + TriangleStripDrawMode = 1, + TriangleFanDrawMode = 2, + LinearEncoding = 3e3, + sRGBEncoding = 3001, + BasicDepthPacking = 3200, + RGBADepthPacking = 3201, + TangentSpaceNormalMap = 0, + ObjectSpaceNormalMap = 1, + NoColorSpace$1 = '', + SRGBColorSpace$1 = 'srgb', + LinearSRGBColorSpace$1 = 'srgb-linear', + ZeroStencilOp = 0, + KeepStencilOp = 7680, + ReplaceStencilOp = 7681, + IncrementStencilOp = 7682, + DecrementStencilOp = 7683, + IncrementWrapStencilOp = 34055, + DecrementWrapStencilOp = 34056, + InvertStencilOp = 5386, + NeverStencilFunc = 512, + LessStencilFunc = 513, + EqualStencilFunc = 514, + LessEqualStencilFunc = 515, + GreaterStencilFunc = 516, + NotEqualStencilFunc = 517, + GreaterEqualStencilFunc = 518, + AlwaysStencilFunc = 519, + StaticDrawUsage = 35044, + DynamicDrawUsage = 35048, + StreamDrawUsage = 35040, + StaticReadUsage = 35045, + DynamicReadUsage = 35049, + StreamReadUsage = 35041, + StaticCopyUsage = 35046, + DynamicCopyUsage = 35050, + StreamCopyUsage = 35042, + GLSL1 = '100', + GLSL3 = '300 es', + _SRGBAFormat = 1035 + let EventDispatcher$1 = class { + addEventListener(et, nt) { + this._listeners === void 0 && (this._listeners = {}) + const rt = this._listeners + rt[et] === void 0 && (rt[et] = []), rt[et].indexOf(nt) === -1 && rt[et].push(nt) + } + hasEventListener(et, nt) { + if (this._listeners === void 0) return !1 + const rt = this._listeners + return rt[et] !== void 0 && rt[et].indexOf(nt) !== -1 + } + removeEventListener(et, nt) { + if (this._listeners === void 0) return + const it = this._listeners[et] + if (it !== void 0) { + const ot = it.indexOf(nt) + ot !== -1 && it.splice(ot, 1) + } + } + dispatchEvent(et) { + if (this._listeners === void 0) return + const rt = this._listeners[et.type] + if (rt !== void 0) { + et.target = this + const it = rt.slice(0) + for (let ot = 0, at = it.length; ot < at; ot++) it[ot].call(this, et) + et.target = null + } + } + } + const _lut$1 = [ + '00', + '01', + '02', + '03', + '04', + '05', + '06', + '07', + '08', + '09', + '0a', + '0b', + '0c', + '0d', + '0e', + '0f', + '10', + '11', + '12', + '13', + '14', + '15', + '16', + '17', + '18', + '19', + '1a', + '1b', + '1c', + '1d', + '1e', + '1f', + '20', + '21', + '22', + '23', + '24', + '25', + '26', + '27', + '28', + '29', + '2a', + '2b', + '2c', + '2d', + '2e', + '2f', + '30', + '31', + '32', + '33', + '34', + '35', + '36', + '37', + '38', + '39', + '3a', + '3b', + '3c', + '3d', + '3e', + '3f', + '40', + '41', + '42', + '43', + '44', + '45', + '46', + '47', + '48', + '49', + '4a', + '4b', + '4c', + '4d', + '4e', + '4f', + '50', + '51', + '52', + '53', + '54', + '55', + '56', + '57', + '58', + '59', + '5a', + '5b', + '5c', + '5d', + '5e', + '5f', + '60', + '61', + '62', + '63', + '64', + '65', + '66', + '67', + '68', + '69', + '6a', + '6b', + '6c', + '6d', + '6e', + '6f', + '70', + '71', + '72', + '73', + '74', + '75', + '76', + '77', + '78', + '79', + '7a', + '7b', + '7c', + '7d', + '7e', + '7f', + '80', + '81', + '82', + '83', + '84', + '85', + '86', + '87', + '88', + '89', + '8a', + '8b', + '8c', + '8d', + '8e', + '8f', + '90', + '91', + '92', + '93', + '94', + '95', + '96', + '97', + '98', + '99', + '9a', + '9b', + '9c', + '9d', + '9e', + '9f', + 'a0', + 'a1', + 'a2', + 'a3', + 'a4', + 'a5', + 'a6', + 'a7', + 'a8', + 'a9', + 'aa', + 'ab', + 'ac', + 'ad', + 'ae', + 'af', + 'b0', + 'b1', + 'b2', + 'b3', + 'b4', + 'b5', + 'b6', + 'b7', + 'b8', + 'b9', + 'ba', + 'bb', + 'bc', + 'bd', + 'be', + 'bf', + 'c0', + 'c1', + 'c2', + 'c3', + 'c4', + 'c5', + 'c6', + 'c7', + 'c8', + 'c9', + 'ca', + 'cb', + 'cc', + 'cd', + 'ce', + 'cf', + 'd0', + 'd1', + 'd2', + 'd3', + 'd4', + 'd5', + 'd6', + 'd7', + 'd8', + 'd9', + 'da', + 'db', + 'dc', + 'dd', + 'de', + 'df', + 'e0', + 'e1', + 'e2', + 'e3', + 'e4', + 'e5', + 'e6', + 'e7', + 'e8', + 'e9', + 'ea', + 'eb', + 'ec', + 'ed', + 'ee', + 'ef', + 'f0', + 'f1', + 'f2', + 'f3', + 'f4', + 'f5', + 'f6', + 'f7', + 'f8', + 'f9', + 'fa', + 'fb', + 'fc', + 'fd', + 'fe', + 'ff', + ] + let _seed = 1234567 + const DEG2RAD$1 = Math.PI / 180, + RAD2DEG = 180 / Math.PI + function generateUUID$1() { + const tt = (Math.random() * 4294967295) | 0, + et = (Math.random() * 4294967295) | 0, + nt = (Math.random() * 4294967295) | 0, + rt = (Math.random() * 4294967295) | 0 + return ( + _lut$1[tt & 255] + + _lut$1[(tt >> 8) & 255] + + _lut$1[(tt >> 16) & 255] + + _lut$1[(tt >> 24) & 255] + + '-' + + _lut$1[et & 255] + + _lut$1[(et >> 8) & 255] + + '-' + + _lut$1[((et >> 16) & 15) | 64] + + _lut$1[(et >> 24) & 255] + + '-' + + _lut$1[(nt & 63) | 128] + + _lut$1[(nt >> 8) & 255] + + '-' + + _lut$1[(nt >> 16) & 255] + + _lut$1[(nt >> 24) & 255] + + _lut$1[rt & 255] + + _lut$1[(rt >> 8) & 255] + + _lut$1[(rt >> 16) & 255] + + _lut$1[(rt >> 24) & 255] + ).toLowerCase() + } + function clamp$5(tt, et, nt) { + return Math.max(et, Math.min(nt, tt)) + } + function euclideanModulo(tt, et) { + return ((tt % et) + et) % et + } + function mapLinear(tt, et, nt, rt, it) { + return rt + ((tt - et) * (it - rt)) / (nt - et) + } + function inverseLerp(tt, et, nt) { + return tt !== et ? (nt - tt) / (et - tt) : 0 + } + function lerp(tt, et, nt) { + return (1 - nt) * tt + nt * et + } + function damp$1(tt, et, nt, rt) { + return lerp(tt, et, 1 - Math.exp(-nt * rt)) + } + function pingpong(tt, et = 1) { + return et - Math.abs(euclideanModulo(tt, et * 2) - et) + } + function smoothstep(tt, et, nt) { + return tt <= et ? 0 : tt >= nt ? 1 : ((tt = (tt - et) / (nt - et)), tt * tt * (3 - 2 * tt)) + } + function smootherstep(tt, et, nt) { + return tt <= et ? 0 : tt >= nt ? 1 : ((tt = (tt - et) / (nt - et)), tt * tt * tt * (tt * (tt * 6 - 15) + 10)) + } + function randInt(tt, et) { + return tt + Math.floor(Math.random() * (et - tt + 1)) + } + function randFloat(tt, et) { + return tt + Math.random() * (et - tt) + } + function randFloatSpread(tt) { + return tt * (0.5 - Math.random()) + } + function seededRandom(tt) { + tt !== void 0 && (_seed = tt) + let et = (_seed += 1831565813) + return ( + (et = Math.imul(et ^ (et >>> 15), et | 1)), + (et ^= et + Math.imul(et ^ (et >>> 7), et | 61)), + ((et ^ (et >>> 14)) >>> 0) / 4294967296 + ) + } + function degToRad(tt) { + return tt * DEG2RAD$1 + } + function radToDeg(tt) { + return tt * RAD2DEG + } + function isPowerOfTwo(tt) { + return (tt & (tt - 1)) === 0 && tt !== 0 + } + function ceilPowerOfTwo(tt) { + return Math.pow(2, Math.ceil(Math.log(tt) / Math.LN2)) + } + function floorPowerOfTwo(tt) { + return Math.pow(2, Math.floor(Math.log(tt) / Math.LN2)) + } + function setQuaternionFromProperEuler(tt, et, nt, rt, it) { + const ot = Math.cos, + at = Math.sin, + st = ot(nt / 2), + lt = at(nt / 2), + ct = ot((et + rt) / 2), + ut = at((et + rt) / 2), + ht = ot((et - rt) / 2), + dt = at((et - rt) / 2), + pt = ot((rt - et) / 2), + mt = at((rt - et) / 2) + switch (it) { + case 'XYX': + tt.set(st * ut, lt * ht, lt * dt, st * ct) + break + case 'YZY': + tt.set(lt * dt, st * ut, lt * ht, st * ct) + break + case 'ZXZ': + tt.set(lt * ht, lt * dt, st * ut, st * ct) + break + case 'XZX': + tt.set(st * ut, lt * mt, lt * pt, st * ct) + break + case 'YXY': + tt.set(lt * pt, st * ut, lt * mt, st * ct) + break + case 'ZYZ': + tt.set(lt * mt, lt * pt, st * ut, st * ct) + break + default: + console.warn('THREE.MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: ' + it) + } + } + function denormalize$1(tt, et) { + switch (et.constructor) { + case Float32Array: + return tt + case Uint16Array: + return tt / 65535 + case Uint8Array: + return tt / 255 + case Int16Array: + return Math.max(tt / 32767, -1) + case Int8Array: + return Math.max(tt / 127, -1) + default: + throw new Error('Invalid component type.') + } + } + function normalize$2(tt, et) { + switch (et.constructor) { + case Float32Array: + return tt + case Uint16Array: + return Math.round(tt * 65535) + case Uint8Array: + return Math.round(tt * 255) + case Int16Array: + return Math.round(tt * 32767) + case Int8Array: + return Math.round(tt * 127) + default: + throw new Error('Invalid component type.') + } + } + var MathUtils = Object.freeze({ + __proto__: null, + DEG2RAD: DEG2RAD$1, + RAD2DEG, + generateUUID: generateUUID$1, + clamp: clamp$5, + euclideanModulo, + mapLinear, + inverseLerp, + lerp, + damp: damp$1, + pingpong, + smoothstep, + smootherstep, + randInt, + randFloat, + randFloatSpread, + seededRandom, + degToRad, + radToDeg, + isPowerOfTwo, + ceilPowerOfTwo, + floorPowerOfTwo, + setQuaternionFromProperEuler, + normalize: normalize$2, + denormalize: denormalize$1, + }) + class Vector2 { + constructor(et = 0, nt = 0) { + ;(Vector2.prototype.isVector2 = !0), (this.x = et), (this.y = nt) + } + get width() { + return this.x + } + set width(et) { + this.x = et + } + get height() { + return this.y + } + set height(et) { + this.y = et + } + set(et, nt) { + return (this.x = et), (this.y = nt), this + } + setScalar(et) { + return (this.x = et), (this.y = et), this + } + setX(et) { + return (this.x = et), this + } + setY(et) { + return (this.y = et), this + } + setComponent(et, nt) { + switch (et) { + case 0: + this.x = nt + break + case 1: + this.y = nt + break + default: + throw new Error('index is out of range: ' + et) + } + return this + } + getComponent(et) { + switch (et) { + case 0: + return this.x + case 1: + return this.y + default: + throw new Error('index is out of range: ' + et) + } + } + clone() { + return new this.constructor(this.x, this.y) + } + copy(et) { + return (this.x = et.x), (this.y = et.y), this + } + add(et) { + return (this.x += et.x), (this.y += et.y), this + } + addScalar(et) { + return (this.x += et), (this.y += et), this + } + addVectors(et, nt) { + return (this.x = et.x + nt.x), (this.y = et.y + nt.y), this + } + addScaledVector(et, nt) { + return (this.x += et.x * nt), (this.y += et.y * nt), this + } + sub(et) { + return (this.x -= et.x), (this.y -= et.y), this + } + subScalar(et) { + return (this.x -= et), (this.y -= et), this + } + subVectors(et, nt) { + return (this.x = et.x - nt.x), (this.y = et.y - nt.y), this + } + multiply(et) { + return (this.x *= et.x), (this.y *= et.y), this + } + multiplyScalar(et) { + return (this.x *= et), (this.y *= et), this + } + divide(et) { + return (this.x /= et.x), (this.y /= et.y), this + } + divideScalar(et) { + return this.multiplyScalar(1 / et) + } + applyMatrix3(et) { + const nt = this.x, + rt = this.y, + it = et.elements + return (this.x = it[0] * nt + it[3] * rt + it[6]), (this.y = it[1] * nt + it[4] * rt + it[7]), this + } + min(et) { + return (this.x = Math.min(this.x, et.x)), (this.y = Math.min(this.y, et.y)), this + } + max(et) { + return (this.x = Math.max(this.x, et.x)), (this.y = Math.max(this.y, et.y)), this + } + clamp(et, nt) { + return (this.x = Math.max(et.x, Math.min(nt.x, this.x))), (this.y = Math.max(et.y, Math.min(nt.y, this.y))), this + } + clampScalar(et, nt) { + return (this.x = Math.max(et, Math.min(nt, this.x))), (this.y = Math.max(et, Math.min(nt, this.y))), this + } + clampLength(et, nt) { + const rt = this.length() + return this.divideScalar(rt || 1).multiplyScalar(Math.max(et, Math.min(nt, rt))) + } + floor() { + return (this.x = Math.floor(this.x)), (this.y = Math.floor(this.y)), this + } + ceil() { + return (this.x = Math.ceil(this.x)), (this.y = Math.ceil(this.y)), this + } + round() { + return (this.x = Math.round(this.x)), (this.y = Math.round(this.y)), this + } + roundToZero() { + return ( + (this.x = this.x < 0 ? Math.ceil(this.x) : Math.floor(this.x)), + (this.y = this.y < 0 ? Math.ceil(this.y) : Math.floor(this.y)), + this + ) + } + negate() { + return (this.x = -this.x), (this.y = -this.y), this + } + dot(et) { + return this.x * et.x + this.y * et.y + } + cross(et) { + return this.x * et.y - this.y * et.x + } + lengthSq() { + return this.x * this.x + this.y * this.y + } + length() { + return Math.sqrt(this.x * this.x + this.y * this.y) + } + manhattanLength() { + return Math.abs(this.x) + Math.abs(this.y) + } + normalize() { + return this.divideScalar(this.length() || 1) + } + angle() { + return Math.atan2(-this.y, -this.x) + Math.PI + } + distanceTo(et) { + return Math.sqrt(this.distanceToSquared(et)) + } + distanceToSquared(et) { + const nt = this.x - et.x, + rt = this.y - et.y + return nt * nt + rt * rt + } + manhattanDistanceTo(et) { + return Math.abs(this.x - et.x) + Math.abs(this.y - et.y) + } + setLength(et) { + return this.normalize().multiplyScalar(et) + } + lerp(et, nt) { + return (this.x += (et.x - this.x) * nt), (this.y += (et.y - this.y) * nt), this + } + lerpVectors(et, nt, rt) { + return (this.x = et.x + (nt.x - et.x) * rt), (this.y = et.y + (nt.y - et.y) * rt), this + } + equals(et) { + return et.x === this.x && et.y === this.y + } + fromArray(et, nt = 0) { + return (this.x = et[nt]), (this.y = et[nt + 1]), this + } + toArray(et = [], nt = 0) { + return (et[nt] = this.x), (et[nt + 1] = this.y), et + } + fromBufferAttribute(et, nt) { + return (this.x = et.getX(nt)), (this.y = et.getY(nt)), this + } + rotateAround(et, nt) { + const rt = Math.cos(nt), + it = Math.sin(nt), + ot = this.x - et.x, + at = this.y - et.y + return (this.x = ot * rt - at * it + et.x), (this.y = ot * it + at * rt + et.y), this + } + random() { + return (this.x = Math.random()), (this.y = Math.random()), this + } + *[Symbol.iterator]() { + yield this.x, yield this.y + } + } + class Matrix3 { + constructor() { + ;(Matrix3.prototype.isMatrix3 = !0), (this.elements = [1, 0, 0, 0, 1, 0, 0, 0, 1]) + } + set(et, nt, rt, it, ot, at, st, lt, ct) { + const ut = this.elements + return ( + (ut[0] = et), + (ut[1] = it), + (ut[2] = st), + (ut[3] = nt), + (ut[4] = ot), + (ut[5] = lt), + (ut[6] = rt), + (ut[7] = at), + (ut[8] = ct), + this + ) + } + identity() { + return this.set(1, 0, 0, 0, 1, 0, 0, 0, 1), this + } + copy(et) { + const nt = this.elements, + rt = et.elements + return ( + (nt[0] = rt[0]), + (nt[1] = rt[1]), + (nt[2] = rt[2]), + (nt[3] = rt[3]), + (nt[4] = rt[4]), + (nt[5] = rt[5]), + (nt[6] = rt[6]), + (nt[7] = rt[7]), + (nt[8] = rt[8]), + this + ) + } + extractBasis(et, nt, rt) { + return et.setFromMatrix3Column(this, 0), nt.setFromMatrix3Column(this, 1), rt.setFromMatrix3Column(this, 2), this + } + setFromMatrix4(et) { + const nt = et.elements + return this.set(nt[0], nt[4], nt[8], nt[1], nt[5], nt[9], nt[2], nt[6], nt[10]), this + } + multiply(et) { + return this.multiplyMatrices(this, et) + } + premultiply(et) { + return this.multiplyMatrices(et, this) + } + multiplyMatrices(et, nt) { + const rt = et.elements, + it = nt.elements, + ot = this.elements, + at = rt[0], + st = rt[3], + lt = rt[6], + ct = rt[1], + ut = rt[4], + ht = rt[7], + dt = rt[2], + pt = rt[5], + mt = rt[8], + gt = it[0], + yt = it[3], + bt = it[6], + vt = it[1], + xt = it[4], + kt = it[7], + St = it[2], + Tt = it[5], + At = it[8] + return ( + (ot[0] = at * gt + st * vt + lt * St), + (ot[3] = at * yt + st * xt + lt * Tt), + (ot[6] = at * bt + st * kt + lt * At), + (ot[1] = ct * gt + ut * vt + ht * St), + (ot[4] = ct * yt + ut * xt + ht * Tt), + (ot[7] = ct * bt + ut * kt + ht * At), + (ot[2] = dt * gt + pt * vt + mt * St), + (ot[5] = dt * yt + pt * xt + mt * Tt), + (ot[8] = dt * bt + pt * kt + mt * At), + this + ) + } + multiplyScalar(et) { + const nt = this.elements + return ( + (nt[0] *= et), + (nt[3] *= et), + (nt[6] *= et), + (nt[1] *= et), + (nt[4] *= et), + (nt[7] *= et), + (nt[2] *= et), + (nt[5] *= et), + (nt[8] *= et), + this + ) + } + determinant() { + const et = this.elements, + nt = et[0], + rt = et[1], + it = et[2], + ot = et[3], + at = et[4], + st = et[5], + lt = et[6], + ct = et[7], + ut = et[8] + return nt * at * ut - nt * st * ct - rt * ot * ut + rt * st * lt + it * ot * ct - it * at * lt + } + invert() { + const et = this.elements, + nt = et[0], + rt = et[1], + it = et[2], + ot = et[3], + at = et[4], + st = et[5], + lt = et[6], + ct = et[7], + ut = et[8], + ht = ut * at - st * ct, + dt = st * lt - ut * ot, + pt = ct * ot - at * lt, + mt = nt * ht + rt * dt + it * pt + if (mt === 0) return this.set(0, 0, 0, 0, 0, 0, 0, 0, 0) + const gt = 1 / mt + return ( + (et[0] = ht * gt), + (et[1] = (it * ct - ut * rt) * gt), + (et[2] = (st * rt - it * at) * gt), + (et[3] = dt * gt), + (et[4] = (ut * nt - it * lt) * gt), + (et[5] = (it * ot - st * nt) * gt), + (et[6] = pt * gt), + (et[7] = (rt * lt - ct * nt) * gt), + (et[8] = (at * nt - rt * ot) * gt), + this + ) + } + transpose() { + let et + const nt = this.elements + return ( + (et = nt[1]), + (nt[1] = nt[3]), + (nt[3] = et), + (et = nt[2]), + (nt[2] = nt[6]), + (nt[6] = et), + (et = nt[5]), + (nt[5] = nt[7]), + (nt[7] = et), + this + ) + } + getNormalMatrix(et) { + return this.setFromMatrix4(et).invert().transpose() + } + transposeIntoArray(et) { + const nt = this.elements + return ( + (et[0] = nt[0]), + (et[1] = nt[3]), + (et[2] = nt[6]), + (et[3] = nt[1]), + (et[4] = nt[4]), + (et[5] = nt[7]), + (et[6] = nt[2]), + (et[7] = nt[5]), + (et[8] = nt[8]), + this + ) + } + setUvTransform(et, nt, rt, it, ot, at, st) { + const lt = Math.cos(ot), + ct = Math.sin(ot) + return ( + this.set( + rt * lt, + rt * ct, + -rt * (lt * at + ct * st) + at + et, + -it * ct, + it * lt, + -it * (-ct * at + lt * st) + st + nt, + 0, + 0, + 1, + ), + this + ) + } + scale(et, nt) { + const rt = this.elements + return (rt[0] *= et), (rt[3] *= et), (rt[6] *= et), (rt[1] *= nt), (rt[4] *= nt), (rt[7] *= nt), this + } + rotate(et) { + const nt = Math.cos(et), + rt = Math.sin(et), + it = this.elements, + ot = it[0], + at = it[3], + st = it[6], + lt = it[1], + ct = it[4], + ut = it[7] + return ( + (it[0] = nt * ot + rt * lt), + (it[3] = nt * at + rt * ct), + (it[6] = nt * st + rt * ut), + (it[1] = -rt * ot + nt * lt), + (it[4] = -rt * at + nt * ct), + (it[7] = -rt * st + nt * ut), + this + ) + } + translate(et, nt) { + const rt = this.elements + return ( + (rt[0] += et * rt[2]), + (rt[3] += et * rt[5]), + (rt[6] += et * rt[8]), + (rt[1] += nt * rt[2]), + (rt[4] += nt * rt[5]), + (rt[7] += nt * rt[8]), + this + ) + } + equals(et) { + const nt = this.elements, + rt = et.elements + for (let it = 0; it < 9; it++) if (nt[it] !== rt[it]) return !1 + return !0 + } + fromArray(et, nt = 0) { + for (let rt = 0; rt < 9; rt++) this.elements[rt] = et[rt + nt] + return this + } + toArray(et = [], nt = 0) { + const rt = this.elements + return ( + (et[nt] = rt[0]), + (et[nt + 1] = rt[1]), + (et[nt + 2] = rt[2]), + (et[nt + 3] = rt[3]), + (et[nt + 4] = rt[4]), + (et[nt + 5] = rt[5]), + (et[nt + 6] = rt[6]), + (et[nt + 7] = rt[7]), + (et[nt + 8] = rt[8]), + et + ) + } + clone() { + return new this.constructor().fromArray(this.elements) + } + } + function arrayNeedsUint32(tt) { + for (let et = tt.length - 1; et >= 0; --et) if (tt[et] > 65535) return !0 + return !1 + } + const TYPED_ARRAYS = { + Int8Array, + Uint8Array, + Uint8ClampedArray, + Int16Array, + Uint16Array, + Int32Array, + Uint32Array, + Float32Array, + Float64Array, + } + function getTypedArray(tt, et) { + return new TYPED_ARRAYS[tt](et) + } + function createElementNS(tt) { + return document.createElementNS('http://www.w3.org/1999/xhtml', tt) + } + function SRGBToLinear(tt) { + return tt < 0.04045 ? tt * 0.0773993808 : Math.pow(tt * 0.9478672986 + 0.0521327014, 2.4) + } + function LinearToSRGB(tt) { + return tt < 0.0031308 ? tt * 12.92 : 1.055 * Math.pow(tt, 0.41666) - 0.055 + } + const FN = { + [SRGBColorSpace$1]: { [LinearSRGBColorSpace$1]: SRGBToLinear }, + [LinearSRGBColorSpace$1]: { [SRGBColorSpace$1]: LinearToSRGB }, + }, + ColorManagement = { + legacyMode: !0, + get workingColorSpace() { + return LinearSRGBColorSpace$1 + }, + set workingColorSpace(tt) { + console.warn('THREE.ColorManagement: .workingColorSpace is readonly.') + }, + convert: function (tt, et, nt) { + if (this.legacyMode || et === nt || !et || !nt) return tt + if (FN[et] && FN[et][nt] !== void 0) { + const rt = FN[et][nt] + return (tt.r = rt(tt.r)), (tt.g = rt(tt.g)), (tt.b = rt(tt.b)), tt + } + throw new Error('Unsupported color space conversion.') + }, + fromWorkingColorSpace: function (tt, et) { + return this.convert(tt, this.workingColorSpace, et) + }, + toWorkingColorSpace: function (tt, et) { + return this.convert(tt, et, this.workingColorSpace) + }, + }, + _colorKeywords = { + aliceblue: 15792383, + antiquewhite: 16444375, + aqua: 65535, + aquamarine: 8388564, + azure: 15794175, + beige: 16119260, + bisque: 16770244, + black: 0, + blanchedalmond: 16772045, + blue: 255, + blueviolet: 9055202, + brown: 10824234, + burlywood: 14596231, + cadetblue: 6266528, + chartreuse: 8388352, + chocolate: 13789470, + coral: 16744272, + cornflowerblue: 6591981, + cornsilk: 16775388, + crimson: 14423100, + cyan: 65535, + darkblue: 139, + darkcyan: 35723, + darkgoldenrod: 12092939, + darkgray: 11119017, + darkgreen: 25600, + darkgrey: 11119017, + darkkhaki: 12433259, + darkmagenta: 9109643, + darkolivegreen: 5597999, + darkorange: 16747520, + darkorchid: 10040012, + darkred: 9109504, + darksalmon: 15308410, + darkseagreen: 9419919, + darkslateblue: 4734347, + darkslategray: 3100495, + darkslategrey: 3100495, + darkturquoise: 52945, + darkviolet: 9699539, + deeppink: 16716947, + deepskyblue: 49151, + dimgray: 6908265, + dimgrey: 6908265, + dodgerblue: 2003199, + firebrick: 11674146, + floralwhite: 16775920, + forestgreen: 2263842, + fuchsia: 16711935, + gainsboro: 14474460, + ghostwhite: 16316671, + gold: 16766720, + goldenrod: 14329120, + gray: 8421504, + green: 32768, + greenyellow: 11403055, + grey: 8421504, + honeydew: 15794160, + hotpink: 16738740, + indianred: 13458524, + indigo: 4915330, + ivory: 16777200, + khaki: 15787660, + lavender: 15132410, + lavenderblush: 16773365, + lawngreen: 8190976, + lemonchiffon: 16775885, + lightblue: 11393254, + lightcoral: 15761536, + lightcyan: 14745599, + lightgoldenrodyellow: 16448210, + lightgray: 13882323, + lightgreen: 9498256, + lightgrey: 13882323, + lightpink: 16758465, + lightsalmon: 16752762, + lightseagreen: 2142890, + lightskyblue: 8900346, + lightslategray: 7833753, + lightslategrey: 7833753, + lightsteelblue: 11584734, + lightyellow: 16777184, + lime: 65280, + limegreen: 3329330, + linen: 16445670, + magenta: 16711935, + maroon: 8388608, + mediumaquamarine: 6737322, + mediumblue: 205, + mediumorchid: 12211667, + mediumpurple: 9662683, + mediumseagreen: 3978097, + mediumslateblue: 8087790, + mediumspringgreen: 64154, + mediumturquoise: 4772300, + mediumvioletred: 13047173, + midnightblue: 1644912, + mintcream: 16121850, + mistyrose: 16770273, + moccasin: 16770229, + navajowhite: 16768685, + navy: 128, + oldlace: 16643558, + olive: 8421376, + olivedrab: 7048739, + orange: 16753920, + orangered: 16729344, + orchid: 14315734, + palegoldenrod: 15657130, + palegreen: 10025880, + paleturquoise: 11529966, + palevioletred: 14381203, + papayawhip: 16773077, + peachpuff: 16767673, + peru: 13468991, + pink: 16761035, + plum: 14524637, + powderblue: 11591910, + purple: 8388736, + rebeccapurple: 6697881, + red: 16711680, + rosybrown: 12357519, + royalblue: 4286945, + saddlebrown: 9127187, + salmon: 16416882, + sandybrown: 16032864, + seagreen: 3050327, + seashell: 16774638, + sienna: 10506797, + silver: 12632256, + skyblue: 8900331, + slateblue: 6970061, + slategray: 7372944, + slategrey: 7372944, + snow: 16775930, + springgreen: 65407, + steelblue: 4620980, + tan: 13808780, + teal: 32896, + thistle: 14204888, + tomato: 16737095, + turquoise: 4251856, + violet: 15631086, + wheat: 16113331, + white: 16777215, + whitesmoke: 16119285, + yellow: 16776960, + yellowgreen: 10145074, + }, + _rgb = { r: 0, g: 0, b: 0 }, + _hslA = { h: 0, s: 0, l: 0 }, + _hslB = { h: 0, s: 0, l: 0 } + function hue2rgb(tt, et, nt) { + return ( + nt < 0 && (nt += 1), + nt > 1 && (nt -= 1), + nt < 1 / 6 ? tt + (et - tt) * 6 * nt : nt < 1 / 2 ? et : nt < 2 / 3 ? tt + (et - tt) * 6 * (2 / 3 - nt) : tt + ) + } + function toComponents(tt, et) { + return (et.r = tt.r), (et.g = tt.g), (et.b = tt.b), et + } + let Color$1 = class { + constructor(et, nt, rt) { + return ( + (this.isColor = !0), + (this.r = 1), + (this.g = 1), + (this.b = 1), + nt === void 0 && rt === void 0 ? this.set(et) : this.setRGB(et, nt, rt) + ) + } + set(et) { + return ( + et && et.isColor + ? this.copy(et) + : typeof et == 'number' + ? this.setHex(et) + : typeof et == 'string' && this.setStyle(et), + this + ) + } + setScalar(et) { + return (this.r = et), (this.g = et), (this.b = et), this + } + setHex(et, nt = SRGBColorSpace$1) { + return ( + (et = Math.floor(et)), + (this.r = ((et >> 16) & 255) / 255), + (this.g = ((et >> 8) & 255) / 255), + (this.b = (et & 255) / 255), + ColorManagement.toWorkingColorSpace(this, nt), + this + ) + } + setRGB(et, nt, rt, it = LinearSRGBColorSpace$1) { + return (this.r = et), (this.g = nt), (this.b = rt), ColorManagement.toWorkingColorSpace(this, it), this + } + setHSL(et, nt, rt, it = LinearSRGBColorSpace$1) { + if (((et = euclideanModulo(et, 1)), (nt = clamp$5(nt, 0, 1)), (rt = clamp$5(rt, 0, 1)), nt === 0)) + this.r = this.g = this.b = rt + else { + const ot = rt <= 0.5 ? rt * (1 + nt) : rt + nt - rt * nt, + at = 2 * rt - ot + ;(this.r = hue2rgb(at, ot, et + 1 / 3)), (this.g = hue2rgb(at, ot, et)), (this.b = hue2rgb(at, ot, et - 1 / 3)) + } + return ColorManagement.toWorkingColorSpace(this, it), this + } + setStyle(et, nt = SRGBColorSpace$1) { + function rt(ot) { + ot !== void 0 && + parseFloat(ot) < 1 && + console.warn('THREE.Color: Alpha component of ' + et + ' will be ignored.') + } + let it + if ((it = /^((?:rgb|hsl)a?)\(([^\)]*)\)/.exec(et))) { + let ot + const at = it[1], + st = it[2] + switch (at) { + case 'rgb': + case 'rgba': + if ((ot = /^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(st))) + return ( + (this.r = Math.min(255, parseInt(ot[1], 10)) / 255), + (this.g = Math.min(255, parseInt(ot[2], 10)) / 255), + (this.b = Math.min(255, parseInt(ot[3], 10)) / 255), + ColorManagement.toWorkingColorSpace(this, nt), + rt(ot[4]), + this + ) + if ((ot = /^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(st))) + return ( + (this.r = Math.min(100, parseInt(ot[1], 10)) / 100), + (this.g = Math.min(100, parseInt(ot[2], 10)) / 100), + (this.b = Math.min(100, parseInt(ot[3], 10)) / 100), + ColorManagement.toWorkingColorSpace(this, nt), + rt(ot[4]), + this + ) + break + case 'hsl': + case 'hsla': + if ((ot = /^\s*(\d*\.?\d+)\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(st))) { + const lt = parseFloat(ot[1]) / 360, + ct = parseInt(ot[2], 10) / 100, + ut = parseInt(ot[3], 10) / 100 + return rt(ot[4]), this.setHSL(lt, ct, ut, nt) + } + break + } + } else if ((it = /^\#([A-Fa-f\d]+)$/.exec(et))) { + const ot = it[1], + at = ot.length + if (at === 3) + return ( + (this.r = parseInt(ot.charAt(0) + ot.charAt(0), 16) / 255), + (this.g = parseInt(ot.charAt(1) + ot.charAt(1), 16) / 255), + (this.b = parseInt(ot.charAt(2) + ot.charAt(2), 16) / 255), + ColorManagement.toWorkingColorSpace(this, nt), + this + ) + if (at === 6) + return ( + (this.r = parseInt(ot.charAt(0) + ot.charAt(1), 16) / 255), + (this.g = parseInt(ot.charAt(2) + ot.charAt(3), 16) / 255), + (this.b = parseInt(ot.charAt(4) + ot.charAt(5), 16) / 255), + ColorManagement.toWorkingColorSpace(this, nt), + this + ) + } + return et && et.length > 0 ? this.setColorName(et, nt) : this + } + setColorName(et, nt = SRGBColorSpace$1) { + const rt = _colorKeywords[et.toLowerCase()] + return rt !== void 0 ? this.setHex(rt, nt) : console.warn('THREE.Color: Unknown color ' + et), this + } + clone() { + return new this.constructor(this.r, this.g, this.b) + } + copy(et) { + return (this.r = et.r), (this.g = et.g), (this.b = et.b), this + } + copySRGBToLinear(et) { + return (this.r = SRGBToLinear(et.r)), (this.g = SRGBToLinear(et.g)), (this.b = SRGBToLinear(et.b)), this + } + copyLinearToSRGB(et) { + return (this.r = LinearToSRGB(et.r)), (this.g = LinearToSRGB(et.g)), (this.b = LinearToSRGB(et.b)), this + } + convertSRGBToLinear() { + return this.copySRGBToLinear(this), this + } + convertLinearToSRGB() { + return this.copyLinearToSRGB(this), this + } + getHex(et = SRGBColorSpace$1) { + return ( + ColorManagement.fromWorkingColorSpace(toComponents(this, _rgb), et), + (clamp$5(_rgb.r * 255, 0, 255) << 16) ^ + (clamp$5(_rgb.g * 255, 0, 255) << 8) ^ + (clamp$5(_rgb.b * 255, 0, 255) << 0) + ) + } + getHexString(et = SRGBColorSpace$1) { + return ('000000' + this.getHex(et).toString(16)).slice(-6) + } + getHSL(et, nt = LinearSRGBColorSpace$1) { + ColorManagement.fromWorkingColorSpace(toComponents(this, _rgb), nt) + const rt = _rgb.r, + it = _rgb.g, + ot = _rgb.b, + at = Math.max(rt, it, ot), + st = Math.min(rt, it, ot) + let lt, ct + const ut = (st + at) / 2 + if (st === at) (lt = 0), (ct = 0) + else { + const ht = at - st + switch (((ct = ut <= 0.5 ? ht / (at + st) : ht / (2 - at - st)), at)) { + case rt: + lt = (it - ot) / ht + (it < ot ? 6 : 0) + break + case it: + lt = (ot - rt) / ht + 2 + break + case ot: + lt = (rt - it) / ht + 4 + break + } + lt /= 6 + } + return (et.h = lt), (et.s = ct), (et.l = ut), et + } + getRGB(et, nt = LinearSRGBColorSpace$1) { + return ( + ColorManagement.fromWorkingColorSpace(toComponents(this, _rgb), nt), + (et.r = _rgb.r), + (et.g = _rgb.g), + (et.b = _rgb.b), + et + ) + } + getStyle(et = SRGBColorSpace$1) { + return ( + ColorManagement.fromWorkingColorSpace(toComponents(this, _rgb), et), + et !== SRGBColorSpace$1 + ? `color(${et} ${_rgb.r} ${_rgb.g} ${_rgb.b})` + : `rgb(${(_rgb.r * 255) | 0},${(_rgb.g * 255) | 0},${(_rgb.b * 255) | 0})` + ) + } + offsetHSL(et, nt, rt) { + return ( + this.getHSL(_hslA), + (_hslA.h += et), + (_hslA.s += nt), + (_hslA.l += rt), + this.setHSL(_hslA.h, _hslA.s, _hslA.l), + this + ) + } + add(et) { + return (this.r += et.r), (this.g += et.g), (this.b += et.b), this + } + addColors(et, nt) { + return (this.r = et.r + nt.r), (this.g = et.g + nt.g), (this.b = et.b + nt.b), this + } + addScalar(et) { + return (this.r += et), (this.g += et), (this.b += et), this + } + sub(et) { + return ( + (this.r = Math.max(0, this.r - et.r)), + (this.g = Math.max(0, this.g - et.g)), + (this.b = Math.max(0, this.b - et.b)), + this + ) + } + multiply(et) { + return (this.r *= et.r), (this.g *= et.g), (this.b *= et.b), this + } + multiplyScalar(et) { + return (this.r *= et), (this.g *= et), (this.b *= et), this + } + lerp(et, nt) { + return (this.r += (et.r - this.r) * nt), (this.g += (et.g - this.g) * nt), (this.b += (et.b - this.b) * nt), this + } + lerpColors(et, nt, rt) { + return ( + (this.r = et.r + (nt.r - et.r) * rt), + (this.g = et.g + (nt.g - et.g) * rt), + (this.b = et.b + (nt.b - et.b) * rt), + this + ) + } + lerpHSL(et, nt) { + this.getHSL(_hslA), et.getHSL(_hslB) + const rt = lerp(_hslA.h, _hslB.h, nt), + it = lerp(_hslA.s, _hslB.s, nt), + ot = lerp(_hslA.l, _hslB.l, nt) + return this.setHSL(rt, it, ot), this + } + equals(et) { + return et.r === this.r && et.g === this.g && et.b === this.b + } + fromArray(et, nt = 0) { + return (this.r = et[nt]), (this.g = et[nt + 1]), (this.b = et[nt + 2]), this + } + toArray(et = [], nt = 0) { + return (et[nt] = this.r), (et[nt + 1] = this.g), (et[nt + 2] = this.b), et + } + fromBufferAttribute(et, nt) { + return ( + (this.r = et.getX(nt)), + (this.g = et.getY(nt)), + (this.b = et.getZ(nt)), + et.normalized === !0 && ((this.r /= 255), (this.g /= 255), (this.b /= 255)), + this + ) + } + toJSON() { + return this.getHex() + } + *[Symbol.iterator]() { + yield this.r, yield this.g, yield this.b + } + } + Color$1.NAMES = _colorKeywords + let _canvas + class ImageUtils { + static getDataURL(et) { + if (/^data:/i.test(et.src) || typeof HTMLCanvasElement > 'u') return et.src + let nt + if (et instanceof HTMLCanvasElement) nt = et + else { + _canvas === void 0 && (_canvas = createElementNS('canvas')), + (_canvas.width = et.width), + (_canvas.height = et.height) + const rt = _canvas.getContext('2d') + et instanceof ImageData ? rt.putImageData(et, 0, 0) : rt.drawImage(et, 0, 0, et.width, et.height), + (nt = _canvas) + } + return nt.width > 2048 || nt.height > 2048 + ? (console.warn('THREE.ImageUtils.getDataURL: Image converted to jpg for performance reasons', et), + nt.toDataURL('image/jpeg', 0.6)) + : nt.toDataURL('image/png') + } + static sRGBToLinear(et) { + if ( + (typeof HTMLImageElement < 'u' && et instanceof HTMLImageElement) || + (typeof HTMLCanvasElement < 'u' && et instanceof HTMLCanvasElement) || + (typeof ImageBitmap < 'u' && et instanceof ImageBitmap) + ) { + const nt = createElementNS('canvas') + ;(nt.width = et.width), (nt.height = et.height) + const rt = nt.getContext('2d') + rt.drawImage(et, 0, 0, et.width, et.height) + const it = rt.getImageData(0, 0, et.width, et.height), + ot = it.data + for (let at = 0; at < ot.length; at++) ot[at] = SRGBToLinear(ot[at] / 255) * 255 + return rt.putImageData(it, 0, 0), nt + } else if (et.data) { + const nt = et.data.slice(0) + for (let rt = 0; rt < nt.length; rt++) + nt instanceof Uint8Array || nt instanceof Uint8ClampedArray + ? (nt[rt] = Math.floor(SRGBToLinear(nt[rt] / 255) * 255)) + : (nt[rt] = SRGBToLinear(nt[rt])) + return { data: nt, width: et.width, height: et.height } + } else + return ( + console.warn('THREE.ImageUtils.sRGBToLinear(): Unsupported image type. No color space conversion applied.'), + et + ) + } + } + let Source$1 = class { + constructor(et = null) { + ;(this.isSource = !0), (this.uuid = generateUUID$1()), (this.data = et), (this.version = 0) + } + set needsUpdate(et) { + et === !0 && this.version++ + } + toJSON(et) { + const nt = et === void 0 || typeof et == 'string' + if (!nt && et.images[this.uuid] !== void 0) return et.images[this.uuid] + const rt = { uuid: this.uuid, url: '' }, + it = this.data + if (it !== null) { + let ot + if (Array.isArray(it)) { + ot = [] + for (let at = 0, st = it.length; at < st; at++) + it[at].isDataTexture ? ot.push(serializeImage(it[at].image)) : ot.push(serializeImage(it[at])) + } else ot = serializeImage(it) + rt.url = ot + } + return nt || (et.images[this.uuid] = rt), rt + } + } + function serializeImage(tt) { + return (typeof HTMLImageElement < 'u' && tt instanceof HTMLImageElement) || + (typeof HTMLCanvasElement < 'u' && tt instanceof HTMLCanvasElement) || + (typeof ImageBitmap < 'u' && tt instanceof ImageBitmap) + ? ImageUtils.getDataURL(tt) + : tt.data + ? { data: Array.from(tt.data), width: tt.width, height: tt.height, type: tt.data.constructor.name } + : (console.warn('THREE.Texture: Unable to serialize Texture.'), {}) + } + let textureId = 0 + class Texture extends EventDispatcher$1 { + constructor( + et = Texture.DEFAULT_IMAGE, + nt = Texture.DEFAULT_MAPPING, + rt = ClampToEdgeWrapping, + it = ClampToEdgeWrapping, + ot = LinearFilter, + at = LinearMipmapLinearFilter, + st = RGBAFormat, + lt = UnsignedByteType, + ct = 1, + ut = LinearEncoding, + ) { + super(), + (this.isTexture = !0), + Object.defineProperty(this, 'id', { value: textureId++ }), + (this.uuid = generateUUID$1()), + (this.name = ''), + (this.source = new Source$1(et)), + (this.mipmaps = []), + (this.mapping = nt), + (this.wrapS = rt), + (this.wrapT = it), + (this.magFilter = ot), + (this.minFilter = at), + (this.anisotropy = ct), + (this.format = st), + (this.internalFormat = null), + (this.type = lt), + (this.offset = new Vector2(0, 0)), + (this.repeat = new Vector2(1, 1)), + (this.center = new Vector2(0, 0)), + (this.rotation = 0), + (this.matrixAutoUpdate = !0), + (this.matrix = new Matrix3()), + (this.generateMipmaps = !0), + (this.premultiplyAlpha = !1), + (this.flipY = !0), + (this.unpackAlignment = 4), + (this.encoding = ut), + (this.userData = {}), + (this.version = 0), + (this.onUpdate = null), + (this.isRenderTargetTexture = !1), + (this.needsPMREMUpdate = !1) + } + get image() { + return this.source.data + } + set image(et) { + this.source.data = et + } + updateMatrix() { + this.matrix.setUvTransform( + this.offset.x, + this.offset.y, + this.repeat.x, + this.repeat.y, + this.rotation, + this.center.x, + this.center.y, + ) + } + clone() { + return new this.constructor().copy(this) + } + copy(et) { + return ( + (this.name = et.name), + (this.source = et.source), + (this.mipmaps = et.mipmaps.slice(0)), + (this.mapping = et.mapping), + (this.wrapS = et.wrapS), + (this.wrapT = et.wrapT), + (this.magFilter = et.magFilter), + (this.minFilter = et.minFilter), + (this.anisotropy = et.anisotropy), + (this.format = et.format), + (this.internalFormat = et.internalFormat), + (this.type = et.type), + this.offset.copy(et.offset), + this.repeat.copy(et.repeat), + this.center.copy(et.center), + (this.rotation = et.rotation), + (this.matrixAutoUpdate = et.matrixAutoUpdate), + this.matrix.copy(et.matrix), + (this.generateMipmaps = et.generateMipmaps), + (this.premultiplyAlpha = et.premultiplyAlpha), + (this.flipY = et.flipY), + (this.unpackAlignment = et.unpackAlignment), + (this.encoding = et.encoding), + (this.userData = JSON.parse(JSON.stringify(et.userData))), + (this.needsUpdate = !0), + this + ) + } + toJSON(et) { + const nt = et === void 0 || typeof et == 'string' + if (!nt && et.textures[this.uuid] !== void 0) return et.textures[this.uuid] + const rt = { + metadata: { version: 4.5, type: 'Texture', generator: 'Texture.toJSON' }, + uuid: this.uuid, + name: this.name, + image: this.source.toJSON(et).uuid, + mapping: this.mapping, + repeat: [this.repeat.x, this.repeat.y], + offset: [this.offset.x, this.offset.y], + center: [this.center.x, this.center.y], + rotation: this.rotation, + wrap: [this.wrapS, this.wrapT], + format: this.format, + type: this.type, + encoding: this.encoding, + minFilter: this.minFilter, + magFilter: this.magFilter, + anisotropy: this.anisotropy, + flipY: this.flipY, + premultiplyAlpha: this.premultiplyAlpha, + unpackAlignment: this.unpackAlignment, + } + return ( + JSON.stringify(this.userData) !== '{}' && (rt.userData = this.userData), nt || (et.textures[this.uuid] = rt), rt + ) + } + dispose() { + this.dispatchEvent({ type: 'dispose' }) + } + transformUv(et) { + if (this.mapping !== UVMapping) return et + if ((et.applyMatrix3(this.matrix), et.x < 0 || et.x > 1)) + switch (this.wrapS) { + case RepeatWrapping: + et.x = et.x - Math.floor(et.x) + break + case ClampToEdgeWrapping: + et.x = et.x < 0 ? 0 : 1 + break + case MirroredRepeatWrapping: + Math.abs(Math.floor(et.x) % 2) === 1 ? (et.x = Math.ceil(et.x) - et.x) : (et.x = et.x - Math.floor(et.x)) + break + } + if (et.y < 0 || et.y > 1) + switch (this.wrapT) { + case RepeatWrapping: + et.y = et.y - Math.floor(et.y) + break + case ClampToEdgeWrapping: + et.y = et.y < 0 ? 0 : 1 + break + case MirroredRepeatWrapping: + Math.abs(Math.floor(et.y) % 2) === 1 ? (et.y = Math.ceil(et.y) - et.y) : (et.y = et.y - Math.floor(et.y)) + break + } + return this.flipY && (et.y = 1 - et.y), et + } + set needsUpdate(et) { + et === !0 && (this.version++, (this.source.needsUpdate = !0)) + } + } + Texture.DEFAULT_IMAGE = null + Texture.DEFAULT_MAPPING = UVMapping + class Vector4 { + constructor(et = 0, nt = 0, rt = 0, it = 1) { + ;(Vector4.prototype.isVector4 = !0), (this.x = et), (this.y = nt), (this.z = rt), (this.w = it) + } + get width() { + return this.z + } + set width(et) { + this.z = et + } + get height() { + return this.w + } + set height(et) { + this.w = et + } + set(et, nt, rt, it) { + return (this.x = et), (this.y = nt), (this.z = rt), (this.w = it), this + } + setScalar(et) { + return (this.x = et), (this.y = et), (this.z = et), (this.w = et), this + } + setX(et) { + return (this.x = et), this + } + setY(et) { + return (this.y = et), this + } + setZ(et) { + return (this.z = et), this + } + setW(et) { + return (this.w = et), this + } + setComponent(et, nt) { + switch (et) { + case 0: + this.x = nt + break + case 1: + this.y = nt + break + case 2: + this.z = nt + break + case 3: + this.w = nt + break + default: + throw new Error('index is out of range: ' + et) + } + return this + } + getComponent(et) { + switch (et) { + case 0: + return this.x + case 1: + return this.y + case 2: + return this.z + case 3: + return this.w + default: + throw new Error('index is out of range: ' + et) + } + } + clone() { + return new this.constructor(this.x, this.y, this.z, this.w) + } + copy(et) { + return (this.x = et.x), (this.y = et.y), (this.z = et.z), (this.w = et.w !== void 0 ? et.w : 1), this + } + add(et) { + return (this.x += et.x), (this.y += et.y), (this.z += et.z), (this.w += et.w), this + } + addScalar(et) { + return (this.x += et), (this.y += et), (this.z += et), (this.w += et), this + } + addVectors(et, nt) { + return (this.x = et.x + nt.x), (this.y = et.y + nt.y), (this.z = et.z + nt.z), (this.w = et.w + nt.w), this + } + addScaledVector(et, nt) { + return (this.x += et.x * nt), (this.y += et.y * nt), (this.z += et.z * nt), (this.w += et.w * nt), this + } + sub(et) { + return (this.x -= et.x), (this.y -= et.y), (this.z -= et.z), (this.w -= et.w), this + } + subScalar(et) { + return (this.x -= et), (this.y -= et), (this.z -= et), (this.w -= et), this + } + subVectors(et, nt) { + return (this.x = et.x - nt.x), (this.y = et.y - nt.y), (this.z = et.z - nt.z), (this.w = et.w - nt.w), this + } + multiply(et) { + return (this.x *= et.x), (this.y *= et.y), (this.z *= et.z), (this.w *= et.w), this + } + multiplyScalar(et) { + return (this.x *= et), (this.y *= et), (this.z *= et), (this.w *= et), this + } + applyMatrix4(et) { + const nt = this.x, + rt = this.y, + it = this.z, + ot = this.w, + at = et.elements + return ( + (this.x = at[0] * nt + at[4] * rt + at[8] * it + at[12] * ot), + (this.y = at[1] * nt + at[5] * rt + at[9] * it + at[13] * ot), + (this.z = at[2] * nt + at[6] * rt + at[10] * it + at[14] * ot), + (this.w = at[3] * nt + at[7] * rt + at[11] * it + at[15] * ot), + this + ) + } + divideScalar(et) { + return this.multiplyScalar(1 / et) + } + setAxisAngleFromQuaternion(et) { + this.w = 2 * Math.acos(et.w) + const nt = Math.sqrt(1 - et.w * et.w) + return ( + nt < 1e-4 + ? ((this.x = 1), (this.y = 0), (this.z = 0)) + : ((this.x = et.x / nt), (this.y = et.y / nt), (this.z = et.z / nt)), + this + ) + } + setAxisAngleFromRotationMatrix(et) { + let nt, rt, it, ot + const lt = et.elements, + ct = lt[0], + ut = lt[4], + ht = lt[8], + dt = lt[1], + pt = lt[5], + mt = lt[9], + gt = lt[2], + yt = lt[6], + bt = lt[10] + if (Math.abs(ut - dt) < 0.01 && Math.abs(ht - gt) < 0.01 && Math.abs(mt - yt) < 0.01) { + if ( + Math.abs(ut + dt) < 0.1 && + Math.abs(ht + gt) < 0.1 && + Math.abs(mt + yt) < 0.1 && + Math.abs(ct + pt + bt - 3) < 0.1 + ) + return this.set(1, 0, 0, 0), this + nt = Math.PI + const xt = (ct + 1) / 2, + kt = (pt + 1) / 2, + St = (bt + 1) / 2, + Tt = (ut + dt) / 4, + At = (ht + gt) / 4, + Et = (mt + yt) / 4 + return ( + xt > kt && xt > St + ? xt < 0.01 + ? ((rt = 0), (it = 0.707106781), (ot = 0.707106781)) + : ((rt = Math.sqrt(xt)), (it = Tt / rt), (ot = At / rt)) + : kt > St + ? kt < 0.01 + ? ((rt = 0.707106781), (it = 0), (ot = 0.707106781)) + : ((it = Math.sqrt(kt)), (rt = Tt / it), (ot = Et / it)) + : St < 0.01 + ? ((rt = 0.707106781), (it = 0.707106781), (ot = 0)) + : ((ot = Math.sqrt(St)), (rt = At / ot), (it = Et / ot)), + this.set(rt, it, ot, nt), + this + ) + } + let vt = Math.sqrt((yt - mt) * (yt - mt) + (ht - gt) * (ht - gt) + (dt - ut) * (dt - ut)) + return ( + Math.abs(vt) < 0.001 && (vt = 1), + (this.x = (yt - mt) / vt), + (this.y = (ht - gt) / vt), + (this.z = (dt - ut) / vt), + (this.w = Math.acos((ct + pt + bt - 1) / 2)), + this + ) + } + min(et) { + return ( + (this.x = Math.min(this.x, et.x)), + (this.y = Math.min(this.y, et.y)), + (this.z = Math.min(this.z, et.z)), + (this.w = Math.min(this.w, et.w)), + this + ) + } + max(et) { + return ( + (this.x = Math.max(this.x, et.x)), + (this.y = Math.max(this.y, et.y)), + (this.z = Math.max(this.z, et.z)), + (this.w = Math.max(this.w, et.w)), + this + ) + } + clamp(et, nt) { + return ( + (this.x = Math.max(et.x, Math.min(nt.x, this.x))), + (this.y = Math.max(et.y, Math.min(nt.y, this.y))), + (this.z = Math.max(et.z, Math.min(nt.z, this.z))), + (this.w = Math.max(et.w, Math.min(nt.w, this.w))), + this + ) + } + clampScalar(et, nt) { + return ( + (this.x = Math.max(et, Math.min(nt, this.x))), + (this.y = Math.max(et, Math.min(nt, this.y))), + (this.z = Math.max(et, Math.min(nt, this.z))), + (this.w = Math.max(et, Math.min(nt, this.w))), + this + ) + } + clampLength(et, nt) { + const rt = this.length() + return this.divideScalar(rt || 1).multiplyScalar(Math.max(et, Math.min(nt, rt))) + } + floor() { + return ( + (this.x = Math.floor(this.x)), + (this.y = Math.floor(this.y)), + (this.z = Math.floor(this.z)), + (this.w = Math.floor(this.w)), + this + ) + } + ceil() { + return ( + (this.x = Math.ceil(this.x)), + (this.y = Math.ceil(this.y)), + (this.z = Math.ceil(this.z)), + (this.w = Math.ceil(this.w)), + this + ) + } + round() { + return ( + (this.x = Math.round(this.x)), + (this.y = Math.round(this.y)), + (this.z = Math.round(this.z)), + (this.w = Math.round(this.w)), + this + ) + } + roundToZero() { + return ( + (this.x = this.x < 0 ? Math.ceil(this.x) : Math.floor(this.x)), + (this.y = this.y < 0 ? Math.ceil(this.y) : Math.floor(this.y)), + (this.z = this.z < 0 ? Math.ceil(this.z) : Math.floor(this.z)), + (this.w = this.w < 0 ? Math.ceil(this.w) : Math.floor(this.w)), + this + ) + } + negate() { + return (this.x = -this.x), (this.y = -this.y), (this.z = -this.z), (this.w = -this.w), this + } + dot(et) { + return this.x * et.x + this.y * et.y + this.z * et.z + this.w * et.w + } + lengthSq() { + return this.x * this.x + this.y * this.y + this.z * this.z + this.w * this.w + } + length() { + return Math.sqrt(this.x * this.x + this.y * this.y + this.z * this.z + this.w * this.w) + } + manhattanLength() { + return Math.abs(this.x) + Math.abs(this.y) + Math.abs(this.z) + Math.abs(this.w) + } + normalize() { + return this.divideScalar(this.length() || 1) + } + setLength(et) { + return this.normalize().multiplyScalar(et) + } + lerp(et, nt) { + return ( + (this.x += (et.x - this.x) * nt), + (this.y += (et.y - this.y) * nt), + (this.z += (et.z - this.z) * nt), + (this.w += (et.w - this.w) * nt), + this + ) + } + lerpVectors(et, nt, rt) { + return ( + (this.x = et.x + (nt.x - et.x) * rt), + (this.y = et.y + (nt.y - et.y) * rt), + (this.z = et.z + (nt.z - et.z) * rt), + (this.w = et.w + (nt.w - et.w) * rt), + this + ) + } + equals(et) { + return et.x === this.x && et.y === this.y && et.z === this.z && et.w === this.w + } + fromArray(et, nt = 0) { + return (this.x = et[nt]), (this.y = et[nt + 1]), (this.z = et[nt + 2]), (this.w = et[nt + 3]), this + } + toArray(et = [], nt = 0) { + return (et[nt] = this.x), (et[nt + 1] = this.y), (et[nt + 2] = this.z), (et[nt + 3] = this.w), et + } + fromBufferAttribute(et, nt) { + return (this.x = et.getX(nt)), (this.y = et.getY(nt)), (this.z = et.getZ(nt)), (this.w = et.getW(nt)), this + } + random() { + return ( + (this.x = Math.random()), (this.y = Math.random()), (this.z = Math.random()), (this.w = Math.random()), this + ) + } + *[Symbol.iterator]() { + yield this.x, yield this.y, yield this.z, yield this.w + } + } + class WebGLRenderTarget extends EventDispatcher$1 { + constructor(et, nt, rt = {}) { + super(), + (this.isWebGLRenderTarget = !0), + (this.width = et), + (this.height = nt), + (this.depth = 1), + (this.scissor = new Vector4(0, 0, et, nt)), + (this.scissorTest = !1), + (this.viewport = new Vector4(0, 0, et, nt)) + const it = { width: et, height: nt, depth: 1 } + ;(this.texture = new Texture( + it, + rt.mapping, + rt.wrapS, + rt.wrapT, + rt.magFilter, + rt.minFilter, + rt.format, + rt.type, + rt.anisotropy, + rt.encoding, + )), + (this.texture.isRenderTargetTexture = !0), + (this.texture.flipY = !1), + (this.texture.generateMipmaps = rt.generateMipmaps !== void 0 ? rt.generateMipmaps : !1), + (this.texture.internalFormat = rt.internalFormat !== void 0 ? rt.internalFormat : null), + (this.texture.minFilter = rt.minFilter !== void 0 ? rt.minFilter : LinearFilter), + (this.depthBuffer = rt.depthBuffer !== void 0 ? rt.depthBuffer : !0), + (this.stencilBuffer = rt.stencilBuffer !== void 0 ? rt.stencilBuffer : !1), + (this.depthTexture = rt.depthTexture !== void 0 ? rt.depthTexture : null), + (this.samples = rt.samples !== void 0 ? rt.samples : 0) + } + setSize(et, nt, rt = 1) { + ;(this.width !== et || this.height !== nt || this.depth !== rt) && + ((this.width = et), + (this.height = nt), + (this.depth = rt), + (this.texture.image.width = et), + (this.texture.image.height = nt), + (this.texture.image.depth = rt), + this.dispose()), + this.viewport.set(0, 0, et, nt), + this.scissor.set(0, 0, et, nt) + } + clone() { + return new this.constructor().copy(this) + } + copy(et) { + ;(this.width = et.width), + (this.height = et.height), + (this.depth = et.depth), + this.viewport.copy(et.viewport), + (this.texture = et.texture.clone()), + (this.texture.isRenderTargetTexture = !0) + const nt = Object.assign({}, et.texture.image) + return ( + (this.texture.source = new Source$1(nt)), + (this.depthBuffer = et.depthBuffer), + (this.stencilBuffer = et.stencilBuffer), + et.depthTexture !== null && (this.depthTexture = et.depthTexture.clone()), + (this.samples = et.samples), + this + ) + } + dispose() { + this.dispatchEvent({ type: 'dispose' }) + } + } + class DataArrayTexture extends Texture { + constructor(et = null, nt = 1, rt = 1, it = 1) { + super(null), + (this.isDataArrayTexture = !0), + (this.image = { data: et, width: nt, height: rt, depth: it }), + (this.magFilter = NearestFilter), + (this.minFilter = NearestFilter), + (this.wrapR = ClampToEdgeWrapping), + (this.generateMipmaps = !1), + (this.flipY = !1), + (this.unpackAlignment = 1) + } + } + class WebGLArrayRenderTarget extends WebGLRenderTarget { + constructor(et, nt, rt) { + super(et, nt), + (this.isWebGLArrayRenderTarget = !0), + (this.depth = rt), + (this.texture = new DataArrayTexture(null, et, nt, rt)), + (this.texture.isRenderTargetTexture = !0) + } + } + class Data3DTexture extends Texture { + constructor(et = null, nt = 1, rt = 1, it = 1) { + super(null), + (this.isData3DTexture = !0), + (this.image = { data: et, width: nt, height: rt, depth: it }), + (this.magFilter = NearestFilter), + (this.minFilter = NearestFilter), + (this.wrapR = ClampToEdgeWrapping), + (this.generateMipmaps = !1), + (this.flipY = !1), + (this.unpackAlignment = 1) + } + } + class WebGL3DRenderTarget extends WebGLRenderTarget { + constructor(et, nt, rt) { + super(et, nt), + (this.isWebGL3DRenderTarget = !0), + (this.depth = rt), + (this.texture = new Data3DTexture(null, et, nt, rt)), + (this.texture.isRenderTargetTexture = !0) + } + } + class WebGLMultipleRenderTargets extends WebGLRenderTarget { + constructor(et, nt, rt, it = {}) { + super(et, nt, it), (this.isWebGLMultipleRenderTargets = !0) + const ot = this.texture + this.texture = [] + for (let at = 0; at < rt; at++) (this.texture[at] = ot.clone()), (this.texture[at].isRenderTargetTexture = !0) + } + setSize(et, nt, rt = 1) { + if (this.width !== et || this.height !== nt || this.depth !== rt) { + ;(this.width = et), (this.height = nt), (this.depth = rt) + for (let it = 0, ot = this.texture.length; it < ot; it++) + (this.texture[it].image.width = et), (this.texture[it].image.height = nt), (this.texture[it].image.depth = rt) + this.dispose() + } + return this.viewport.set(0, 0, et, nt), this.scissor.set(0, 0, et, nt), this + } + copy(et) { + this.dispose(), + (this.width = et.width), + (this.height = et.height), + (this.depth = et.depth), + this.viewport.set(0, 0, this.width, this.height), + this.scissor.set(0, 0, this.width, this.height), + (this.depthBuffer = et.depthBuffer), + (this.stencilBuffer = et.stencilBuffer), + et.depthTexture !== null && (this.depthTexture = et.depthTexture.clone()), + (this.texture.length = 0) + for (let nt = 0, rt = et.texture.length; nt < rt; nt++) + (this.texture[nt] = et.texture[nt].clone()), (this.texture[nt].isRenderTargetTexture = !0) + return this + } + } + class Quaternion { + constructor(et = 0, nt = 0, rt = 0, it = 1) { + ;(this.isQuaternion = !0), (this._x = et), (this._y = nt), (this._z = rt), (this._w = it) + } + static slerpFlat(et, nt, rt, it, ot, at, st) { + let lt = rt[it + 0], + ct = rt[it + 1], + ut = rt[it + 2], + ht = rt[it + 3] + const dt = ot[at + 0], + pt = ot[at + 1], + mt = ot[at + 2], + gt = ot[at + 3] + if (st === 0) { + ;(et[nt + 0] = lt), (et[nt + 1] = ct), (et[nt + 2] = ut), (et[nt + 3] = ht) + return + } + if (st === 1) { + ;(et[nt + 0] = dt), (et[nt + 1] = pt), (et[nt + 2] = mt), (et[nt + 3] = gt) + return + } + if (ht !== gt || lt !== dt || ct !== pt || ut !== mt) { + let yt = 1 - st + const bt = lt * dt + ct * pt + ut * mt + ht * gt, + vt = bt >= 0 ? 1 : -1, + xt = 1 - bt * bt + if (xt > Number.EPSILON) { + const St = Math.sqrt(xt), + Tt = Math.atan2(St, bt * vt) + ;(yt = Math.sin(yt * Tt) / St), (st = Math.sin(st * Tt) / St) + } + const kt = st * vt + if ( + ((lt = lt * yt + dt * kt), + (ct = ct * yt + pt * kt), + (ut = ut * yt + mt * kt), + (ht = ht * yt + gt * kt), + yt === 1 - st) + ) { + const St = 1 / Math.sqrt(lt * lt + ct * ct + ut * ut + ht * ht) + ;(lt *= St), (ct *= St), (ut *= St), (ht *= St) + } + } + ;(et[nt] = lt), (et[nt + 1] = ct), (et[nt + 2] = ut), (et[nt + 3] = ht) + } + static multiplyQuaternionsFlat(et, nt, rt, it, ot, at) { + const st = rt[it], + lt = rt[it + 1], + ct = rt[it + 2], + ut = rt[it + 3], + ht = ot[at], + dt = ot[at + 1], + pt = ot[at + 2], + mt = ot[at + 3] + return ( + (et[nt] = st * mt + ut * ht + lt * pt - ct * dt), + (et[nt + 1] = lt * mt + ut * dt + ct * ht - st * pt), + (et[nt + 2] = ct * mt + ut * pt + st * dt - lt * ht), + (et[nt + 3] = ut * mt - st * ht - lt * dt - ct * pt), + et + ) + } + get x() { + return this._x + } + set x(et) { + ;(this._x = et), this._onChangeCallback() + } + get y() { + return this._y + } + set y(et) { + ;(this._y = et), this._onChangeCallback() + } + get z() { + return this._z + } + set z(et) { + ;(this._z = et), this._onChangeCallback() + } + get w() { + return this._w + } + set w(et) { + ;(this._w = et), this._onChangeCallback() + } + set(et, nt, rt, it) { + return (this._x = et), (this._y = nt), (this._z = rt), (this._w = it), this._onChangeCallback(), this + } + clone() { + return new this.constructor(this._x, this._y, this._z, this._w) + } + copy(et) { + return (this._x = et.x), (this._y = et.y), (this._z = et.z), (this._w = et.w), this._onChangeCallback(), this + } + setFromEuler(et, nt) { + if (!(et && et.isEuler)) + throw new Error( + 'THREE.Quaternion: .setFromEuler() now expects an Euler rotation rather than a Vector3 and order.', + ) + const rt = et._x, + it = et._y, + ot = et._z, + at = et._order, + st = Math.cos, + lt = Math.sin, + ct = st(rt / 2), + ut = st(it / 2), + ht = st(ot / 2), + dt = lt(rt / 2), + pt = lt(it / 2), + mt = lt(ot / 2) + switch (at) { + case 'XYZ': + ;(this._x = dt * ut * ht + ct * pt * mt), + (this._y = ct * pt * ht - dt * ut * mt), + (this._z = ct * ut * mt + dt * pt * ht), + (this._w = ct * ut * ht - dt * pt * mt) + break + case 'YXZ': + ;(this._x = dt * ut * ht + ct * pt * mt), + (this._y = ct * pt * ht - dt * ut * mt), + (this._z = ct * ut * mt - dt * pt * ht), + (this._w = ct * ut * ht + dt * pt * mt) + break + case 'ZXY': + ;(this._x = dt * ut * ht - ct * pt * mt), + (this._y = ct * pt * ht + dt * ut * mt), + (this._z = ct * ut * mt + dt * pt * ht), + (this._w = ct * ut * ht - dt * pt * mt) + break + case 'ZYX': + ;(this._x = dt * ut * ht - ct * pt * mt), + (this._y = ct * pt * ht + dt * ut * mt), + (this._z = ct * ut * mt - dt * pt * ht), + (this._w = ct * ut * ht + dt * pt * mt) + break + case 'YZX': + ;(this._x = dt * ut * ht + ct * pt * mt), + (this._y = ct * pt * ht + dt * ut * mt), + (this._z = ct * ut * mt - dt * pt * ht), + (this._w = ct * ut * ht - dt * pt * mt) + break + case 'XZY': + ;(this._x = dt * ut * ht - ct * pt * mt), + (this._y = ct * pt * ht - dt * ut * mt), + (this._z = ct * ut * mt + dt * pt * ht), + (this._w = ct * ut * ht + dt * pt * mt) + break + default: + console.warn('THREE.Quaternion: .setFromEuler() encountered an unknown order: ' + at) + } + return nt !== !1 && this._onChangeCallback(), this + } + setFromAxisAngle(et, nt) { + const rt = nt / 2, + it = Math.sin(rt) + return ( + (this._x = et.x * it), + (this._y = et.y * it), + (this._z = et.z * it), + (this._w = Math.cos(rt)), + this._onChangeCallback(), + this + ) + } + setFromRotationMatrix(et) { + const nt = et.elements, + rt = nt[0], + it = nt[4], + ot = nt[8], + at = nt[1], + st = nt[5], + lt = nt[9], + ct = nt[2], + ut = nt[6], + ht = nt[10], + dt = rt + st + ht + if (dt > 0) { + const pt = 0.5 / Math.sqrt(dt + 1) + ;(this._w = 0.25 / pt), (this._x = (ut - lt) * pt), (this._y = (ot - ct) * pt), (this._z = (at - it) * pt) + } else if (rt > st && rt > ht) { + const pt = 2 * Math.sqrt(1 + rt - st - ht) + ;(this._w = (ut - lt) / pt), (this._x = 0.25 * pt), (this._y = (it + at) / pt), (this._z = (ot + ct) / pt) + } else if (st > ht) { + const pt = 2 * Math.sqrt(1 + st - rt - ht) + ;(this._w = (ot - ct) / pt), (this._x = (it + at) / pt), (this._y = 0.25 * pt), (this._z = (lt + ut) / pt) + } else { + const pt = 2 * Math.sqrt(1 + ht - rt - st) + ;(this._w = (at - it) / pt), (this._x = (ot + ct) / pt), (this._y = (lt + ut) / pt), (this._z = 0.25 * pt) + } + return this._onChangeCallback(), this + } + setFromUnitVectors(et, nt) { + let rt = et.dot(nt) + 1 + return ( + rt < Number.EPSILON + ? ((rt = 0), + Math.abs(et.x) > Math.abs(et.z) + ? ((this._x = -et.y), (this._y = et.x), (this._z = 0), (this._w = rt)) + : ((this._x = 0), (this._y = -et.z), (this._z = et.y), (this._w = rt))) + : ((this._x = et.y * nt.z - et.z * nt.y), + (this._y = et.z * nt.x - et.x * nt.z), + (this._z = et.x * nt.y - et.y * nt.x), + (this._w = rt)), + this.normalize() + ) + } + angleTo(et) { + return 2 * Math.acos(Math.abs(clamp$5(this.dot(et), -1, 1))) + } + rotateTowards(et, nt) { + const rt = this.angleTo(et) + if (rt === 0) return this + const it = Math.min(1, nt / rt) + return this.slerp(et, it), this + } + identity() { + return this.set(0, 0, 0, 1) + } + invert() { + return this.conjugate() + } + conjugate() { + return (this._x *= -1), (this._y *= -1), (this._z *= -1), this._onChangeCallback(), this + } + dot(et) { + return this._x * et._x + this._y * et._y + this._z * et._z + this._w * et._w + } + lengthSq() { + return this._x * this._x + this._y * this._y + this._z * this._z + this._w * this._w + } + length() { + return Math.sqrt(this._x * this._x + this._y * this._y + this._z * this._z + this._w * this._w) + } + normalize() { + let et = this.length() + return ( + et === 0 + ? ((this._x = 0), (this._y = 0), (this._z = 0), (this._w = 1)) + : ((et = 1 / et), + (this._x = this._x * et), + (this._y = this._y * et), + (this._z = this._z * et), + (this._w = this._w * et)), + this._onChangeCallback(), + this + ) + } + multiply(et) { + return this.multiplyQuaternions(this, et) + } + premultiply(et) { + return this.multiplyQuaternions(et, this) + } + multiplyQuaternions(et, nt) { + const rt = et._x, + it = et._y, + ot = et._z, + at = et._w, + st = nt._x, + lt = nt._y, + ct = nt._z, + ut = nt._w + return ( + (this._x = rt * ut + at * st + it * ct - ot * lt), + (this._y = it * ut + at * lt + ot * st - rt * ct), + (this._z = ot * ut + at * ct + rt * lt - it * st), + (this._w = at * ut - rt * st - it * lt - ot * ct), + this._onChangeCallback(), + this + ) + } + slerp(et, nt) { + if (nt === 0) return this + if (nt === 1) return this.copy(et) + const rt = this._x, + it = this._y, + ot = this._z, + at = this._w + let st = at * et._w + rt * et._x + it * et._y + ot * et._z + if ( + (st < 0 + ? ((this._w = -et._w), (this._x = -et._x), (this._y = -et._y), (this._z = -et._z), (st = -st)) + : this.copy(et), + st >= 1) + ) + return (this._w = at), (this._x = rt), (this._y = it), (this._z = ot), this + const lt = 1 - st * st + if (lt <= Number.EPSILON) { + const pt = 1 - nt + return ( + (this._w = pt * at + nt * this._w), + (this._x = pt * rt + nt * this._x), + (this._y = pt * it + nt * this._y), + (this._z = pt * ot + nt * this._z), + this.normalize(), + this._onChangeCallback(), + this + ) + } + const ct = Math.sqrt(lt), + ut = Math.atan2(ct, st), + ht = Math.sin((1 - nt) * ut) / ct, + dt = Math.sin(nt * ut) / ct + return ( + (this._w = at * ht + this._w * dt), + (this._x = rt * ht + this._x * dt), + (this._y = it * ht + this._y * dt), + (this._z = ot * ht + this._z * dt), + this._onChangeCallback(), + this + ) + } + slerpQuaternions(et, nt, rt) { + return this.copy(et).slerp(nt, rt) + } + random() { + const et = Math.random(), + nt = Math.sqrt(1 - et), + rt = Math.sqrt(et), + it = 2 * Math.PI * Math.random(), + ot = 2 * Math.PI * Math.random() + return this.set(nt * Math.cos(it), rt * Math.sin(ot), rt * Math.cos(ot), nt * Math.sin(it)) + } + equals(et) { + return et._x === this._x && et._y === this._y && et._z === this._z && et._w === this._w + } + fromArray(et, nt = 0) { + return ( + (this._x = et[nt]), + (this._y = et[nt + 1]), + (this._z = et[nt + 2]), + (this._w = et[nt + 3]), + this._onChangeCallback(), + this + ) + } + toArray(et = [], nt = 0) { + return (et[nt] = this._x), (et[nt + 1] = this._y), (et[nt + 2] = this._z), (et[nt + 3] = this._w), et + } + fromBufferAttribute(et, nt) { + return (this._x = et.getX(nt)), (this._y = et.getY(nt)), (this._z = et.getZ(nt)), (this._w = et.getW(nt)), this + } + _onChange(et) { + return (this._onChangeCallback = et), this + } + _onChangeCallback() {} + *[Symbol.iterator]() { + yield this._x, yield this._y, yield this._z, yield this._w + } + } + class Vector3 { + constructor(et = 0, nt = 0, rt = 0) { + ;(Vector3.prototype.isVector3 = !0), (this.x = et), (this.y = nt), (this.z = rt) + } + set(et, nt, rt) { + return rt === void 0 && (rt = this.z), (this.x = et), (this.y = nt), (this.z = rt), this + } + setScalar(et) { + return (this.x = et), (this.y = et), (this.z = et), this + } + setX(et) { + return (this.x = et), this + } + setY(et) { + return (this.y = et), this + } + setZ(et) { + return (this.z = et), this + } + setComponent(et, nt) { + switch (et) { + case 0: + this.x = nt + break + case 1: + this.y = nt + break + case 2: + this.z = nt + break + default: + throw new Error('index is out of range: ' + et) + } + return this + } + getComponent(et) { + switch (et) { + case 0: + return this.x + case 1: + return this.y + case 2: + return this.z + default: + throw new Error('index is out of range: ' + et) + } + } + clone() { + return new this.constructor(this.x, this.y, this.z) + } + copy(et) { + return (this.x = et.x), (this.y = et.y), (this.z = et.z), this + } + add(et) { + return (this.x += et.x), (this.y += et.y), (this.z += et.z), this + } + addScalar(et) { + return (this.x += et), (this.y += et), (this.z += et), this + } + addVectors(et, nt) { + return (this.x = et.x + nt.x), (this.y = et.y + nt.y), (this.z = et.z + nt.z), this + } + addScaledVector(et, nt) { + return (this.x += et.x * nt), (this.y += et.y * nt), (this.z += et.z * nt), this + } + sub(et) { + return (this.x -= et.x), (this.y -= et.y), (this.z -= et.z), this + } + subScalar(et) { + return (this.x -= et), (this.y -= et), (this.z -= et), this + } + subVectors(et, nt) { + return (this.x = et.x - nt.x), (this.y = et.y - nt.y), (this.z = et.z - nt.z), this + } + multiply(et) { + return (this.x *= et.x), (this.y *= et.y), (this.z *= et.z), this + } + multiplyScalar(et) { + return (this.x *= et), (this.y *= et), (this.z *= et), this + } + multiplyVectors(et, nt) { + return (this.x = et.x * nt.x), (this.y = et.y * nt.y), (this.z = et.z * nt.z), this + } + applyEuler(et) { + return this.applyQuaternion(_quaternion$4.setFromEuler(et)) + } + applyAxisAngle(et, nt) { + return this.applyQuaternion(_quaternion$4.setFromAxisAngle(et, nt)) + } + applyMatrix3(et) { + const nt = this.x, + rt = this.y, + it = this.z, + ot = et.elements + return ( + (this.x = ot[0] * nt + ot[3] * rt + ot[6] * it), + (this.y = ot[1] * nt + ot[4] * rt + ot[7] * it), + (this.z = ot[2] * nt + ot[5] * rt + ot[8] * it), + this + ) + } + applyNormalMatrix(et) { + return this.applyMatrix3(et).normalize() + } + applyMatrix4(et) { + const nt = this.x, + rt = this.y, + it = this.z, + ot = et.elements, + at = 1 / (ot[3] * nt + ot[7] * rt + ot[11] * it + ot[15]) + return ( + (this.x = (ot[0] * nt + ot[4] * rt + ot[8] * it + ot[12]) * at), + (this.y = (ot[1] * nt + ot[5] * rt + ot[9] * it + ot[13]) * at), + (this.z = (ot[2] * nt + ot[6] * rt + ot[10] * it + ot[14]) * at), + this + ) + } + applyQuaternion(et) { + const nt = this.x, + rt = this.y, + it = this.z, + ot = et.x, + at = et.y, + st = et.z, + lt = et.w, + ct = lt * nt + at * it - st * rt, + ut = lt * rt + st * nt - ot * it, + ht = lt * it + ot * rt - at * nt, + dt = -ot * nt - at * rt - st * it + return ( + (this.x = ct * lt + dt * -ot + ut * -st - ht * -at), + (this.y = ut * lt + dt * -at + ht * -ot - ct * -st), + (this.z = ht * lt + dt * -st + ct * -at - ut * -ot), + this + ) + } + project(et) { + return this.applyMatrix4(et.matrixWorldInverse).applyMatrix4(et.projectionMatrix) + } + unproject(et) { + return this.applyMatrix4(et.projectionMatrixInverse).applyMatrix4(et.matrixWorld) + } + transformDirection(et) { + const nt = this.x, + rt = this.y, + it = this.z, + ot = et.elements + return ( + (this.x = ot[0] * nt + ot[4] * rt + ot[8] * it), + (this.y = ot[1] * nt + ot[5] * rt + ot[9] * it), + (this.z = ot[2] * nt + ot[6] * rt + ot[10] * it), + this.normalize() + ) + } + divide(et) { + return (this.x /= et.x), (this.y /= et.y), (this.z /= et.z), this + } + divideScalar(et) { + return this.multiplyScalar(1 / et) + } + min(et) { + return ( + (this.x = Math.min(this.x, et.x)), (this.y = Math.min(this.y, et.y)), (this.z = Math.min(this.z, et.z)), this + ) + } + max(et) { + return ( + (this.x = Math.max(this.x, et.x)), (this.y = Math.max(this.y, et.y)), (this.z = Math.max(this.z, et.z)), this + ) + } + clamp(et, nt) { + return ( + (this.x = Math.max(et.x, Math.min(nt.x, this.x))), + (this.y = Math.max(et.y, Math.min(nt.y, this.y))), + (this.z = Math.max(et.z, Math.min(nt.z, this.z))), + this + ) + } + clampScalar(et, nt) { + return ( + (this.x = Math.max(et, Math.min(nt, this.x))), + (this.y = Math.max(et, Math.min(nt, this.y))), + (this.z = Math.max(et, Math.min(nt, this.z))), + this + ) + } + clampLength(et, nt) { + const rt = this.length() + return this.divideScalar(rt || 1).multiplyScalar(Math.max(et, Math.min(nt, rt))) + } + floor() { + return (this.x = Math.floor(this.x)), (this.y = Math.floor(this.y)), (this.z = Math.floor(this.z)), this + } + ceil() { + return (this.x = Math.ceil(this.x)), (this.y = Math.ceil(this.y)), (this.z = Math.ceil(this.z)), this + } + round() { + return (this.x = Math.round(this.x)), (this.y = Math.round(this.y)), (this.z = Math.round(this.z)), this + } + roundToZero() { + return ( + (this.x = this.x < 0 ? Math.ceil(this.x) : Math.floor(this.x)), + (this.y = this.y < 0 ? Math.ceil(this.y) : Math.floor(this.y)), + (this.z = this.z < 0 ? Math.ceil(this.z) : Math.floor(this.z)), + this + ) + } + negate() { + return (this.x = -this.x), (this.y = -this.y), (this.z = -this.z), this + } + dot(et) { + return this.x * et.x + this.y * et.y + this.z * et.z + } + lengthSq() { + return this.x * this.x + this.y * this.y + this.z * this.z + } + length() { + return Math.sqrt(this.x * this.x + this.y * this.y + this.z * this.z) + } + manhattanLength() { + return Math.abs(this.x) + Math.abs(this.y) + Math.abs(this.z) + } + normalize() { + return this.divideScalar(this.length() || 1) + } + setLength(et) { + return this.normalize().multiplyScalar(et) + } + lerp(et, nt) { + return (this.x += (et.x - this.x) * nt), (this.y += (et.y - this.y) * nt), (this.z += (et.z - this.z) * nt), this + } + lerpVectors(et, nt, rt) { + return ( + (this.x = et.x + (nt.x - et.x) * rt), + (this.y = et.y + (nt.y - et.y) * rt), + (this.z = et.z + (nt.z - et.z) * rt), + this + ) + } + cross(et) { + return this.crossVectors(this, et) + } + crossVectors(et, nt) { + const rt = et.x, + it = et.y, + ot = et.z, + at = nt.x, + st = nt.y, + lt = nt.z + return (this.x = it * lt - ot * st), (this.y = ot * at - rt * lt), (this.z = rt * st - it * at), this + } + projectOnVector(et) { + const nt = et.lengthSq() + if (nt === 0) return this.set(0, 0, 0) + const rt = et.dot(this) / nt + return this.copy(et).multiplyScalar(rt) + } + projectOnPlane(et) { + return _vector$c.copy(this).projectOnVector(et), this.sub(_vector$c) + } + reflect(et) { + return this.sub(_vector$c.copy(et).multiplyScalar(2 * this.dot(et))) + } + angleTo(et) { + const nt = Math.sqrt(this.lengthSq() * et.lengthSq()) + if (nt === 0) return Math.PI / 2 + const rt = this.dot(et) / nt + return Math.acos(clamp$5(rt, -1, 1)) + } + distanceTo(et) { + return Math.sqrt(this.distanceToSquared(et)) + } + distanceToSquared(et) { + const nt = this.x - et.x, + rt = this.y - et.y, + it = this.z - et.z + return nt * nt + rt * rt + it * it + } + manhattanDistanceTo(et) { + return Math.abs(this.x - et.x) + Math.abs(this.y - et.y) + Math.abs(this.z - et.z) + } + setFromSpherical(et) { + return this.setFromSphericalCoords(et.radius, et.phi, et.theta) + } + setFromSphericalCoords(et, nt, rt) { + const it = Math.sin(nt) * et + return (this.x = it * Math.sin(rt)), (this.y = Math.cos(nt) * et), (this.z = it * Math.cos(rt)), this + } + setFromCylindrical(et) { + return this.setFromCylindricalCoords(et.radius, et.theta, et.y) + } + setFromCylindricalCoords(et, nt, rt) { + return (this.x = et * Math.sin(nt)), (this.y = rt), (this.z = et * Math.cos(nt)), this + } + setFromMatrixPosition(et) { + const nt = et.elements + return (this.x = nt[12]), (this.y = nt[13]), (this.z = nt[14]), this + } + setFromMatrixScale(et) { + const nt = this.setFromMatrixColumn(et, 0).length(), + rt = this.setFromMatrixColumn(et, 1).length(), + it = this.setFromMatrixColumn(et, 2).length() + return (this.x = nt), (this.y = rt), (this.z = it), this + } + setFromMatrixColumn(et, nt) { + return this.fromArray(et.elements, nt * 4) + } + setFromMatrix3Column(et, nt) { + return this.fromArray(et.elements, nt * 3) + } + setFromEuler(et) { + return (this.x = et._x), (this.y = et._y), (this.z = et._z), this + } + equals(et) { + return et.x === this.x && et.y === this.y && et.z === this.z + } + fromArray(et, nt = 0) { + return (this.x = et[nt]), (this.y = et[nt + 1]), (this.z = et[nt + 2]), this + } + toArray(et = [], nt = 0) { + return (et[nt] = this.x), (et[nt + 1] = this.y), (et[nt + 2] = this.z), et + } + fromBufferAttribute(et, nt) { + return (this.x = et.getX(nt)), (this.y = et.getY(nt)), (this.z = et.getZ(nt)), this + } + random() { + return (this.x = Math.random()), (this.y = Math.random()), (this.z = Math.random()), this + } + randomDirection() { + const et = (Math.random() - 0.5) * 2, + nt = Math.random() * Math.PI * 2, + rt = Math.sqrt(1 - et ** 2) + return (this.x = rt * Math.cos(nt)), (this.y = rt * Math.sin(nt)), (this.z = et), this + } + *[Symbol.iterator]() { + yield this.x, yield this.y, yield this.z + } + } + const _vector$c = new Vector3(), + _quaternion$4 = new Quaternion() + class Box3 { + constructor(et = new Vector3(1 / 0, 1 / 0, 1 / 0), nt = new Vector3(-1 / 0, -1 / 0, -1 / 0)) { + ;(this.isBox3 = !0), (this.min = et), (this.max = nt) + } + set(et, nt) { + return this.min.copy(et), this.max.copy(nt), this + } + setFromArray(et) { + let nt = 1 / 0, + rt = 1 / 0, + it = 1 / 0, + ot = -1 / 0, + at = -1 / 0, + st = -1 / 0 + for (let lt = 0, ct = et.length; lt < ct; lt += 3) { + const ut = et[lt], + ht = et[lt + 1], + dt = et[lt + 2] + ut < nt && (nt = ut), + ht < rt && (rt = ht), + dt < it && (it = dt), + ut > ot && (ot = ut), + ht > at && (at = ht), + dt > st && (st = dt) + } + return this.min.set(nt, rt, it), this.max.set(ot, at, st), this + } + setFromBufferAttribute(et) { + let nt = 1 / 0, + rt = 1 / 0, + it = 1 / 0, + ot = -1 / 0, + at = -1 / 0, + st = -1 / 0 + for (let lt = 0, ct = et.count; lt < ct; lt++) { + const ut = et.getX(lt), + ht = et.getY(lt), + dt = et.getZ(lt) + ut < nt && (nt = ut), + ht < rt && (rt = ht), + dt < it && (it = dt), + ut > ot && (ot = ut), + ht > at && (at = ht), + dt > st && (st = dt) + } + return this.min.set(nt, rt, it), this.max.set(ot, at, st), this + } + setFromPoints(et) { + this.makeEmpty() + for (let nt = 0, rt = et.length; nt < rt; nt++) this.expandByPoint(et[nt]) + return this + } + setFromCenterAndSize(et, nt) { + const rt = _vector$b.copy(nt).multiplyScalar(0.5) + return this.min.copy(et).sub(rt), this.max.copy(et).add(rt), this + } + setFromObject(et, nt = !1) { + return this.makeEmpty(), this.expandByObject(et, nt) + } + clone() { + return new this.constructor().copy(this) + } + copy(et) { + return this.min.copy(et.min), this.max.copy(et.max), this + } + makeEmpty() { + return (this.min.x = this.min.y = this.min.z = 1 / 0), (this.max.x = this.max.y = this.max.z = -1 / 0), this + } + isEmpty() { + return this.max.x < this.min.x || this.max.y < this.min.y || this.max.z < this.min.z + } + getCenter(et) { + return this.isEmpty() ? et.set(0, 0, 0) : et.addVectors(this.min, this.max).multiplyScalar(0.5) + } + getSize(et) { + return this.isEmpty() ? et.set(0, 0, 0) : et.subVectors(this.max, this.min) + } + expandByPoint(et) { + return this.min.min(et), this.max.max(et), this + } + expandByVector(et) { + return this.min.sub(et), this.max.add(et), this + } + expandByScalar(et) { + return this.min.addScalar(-et), this.max.addScalar(et), this + } + expandByObject(et, nt = !1) { + et.updateWorldMatrix(!1, !1) + const rt = et.geometry + if (rt !== void 0) + if (nt && rt.attributes != null && rt.attributes.position !== void 0) { + const ot = rt.attributes.position + for (let at = 0, st = ot.count; at < st; at++) + _vector$b.fromBufferAttribute(ot, at).applyMatrix4(et.matrixWorld), this.expandByPoint(_vector$b) + } else + rt.boundingBox === null && rt.computeBoundingBox(), + _box$3.copy(rt.boundingBox), + _box$3.applyMatrix4(et.matrixWorld), + this.union(_box$3) + const it = et.children + for (let ot = 0, at = it.length; ot < at; ot++) this.expandByObject(it[ot], nt) + return this + } + containsPoint(et) { + return !( + et.x < this.min.x || + et.x > this.max.x || + et.y < this.min.y || + et.y > this.max.y || + et.z < this.min.z || + et.z > this.max.z + ) + } + containsBox(et) { + return ( + this.min.x <= et.min.x && + et.max.x <= this.max.x && + this.min.y <= et.min.y && + et.max.y <= this.max.y && + this.min.z <= et.min.z && + et.max.z <= this.max.z + ) + } + getParameter(et, nt) { + return nt.set( + (et.x - this.min.x) / (this.max.x - this.min.x), + (et.y - this.min.y) / (this.max.y - this.min.y), + (et.z - this.min.z) / (this.max.z - this.min.z), + ) + } + intersectsBox(et) { + return !( + et.max.x < this.min.x || + et.min.x > this.max.x || + et.max.y < this.min.y || + et.min.y > this.max.y || + et.max.z < this.min.z || + et.min.z > this.max.z + ) + } + intersectsSphere(et) { + return this.clampPoint(et.center, _vector$b), _vector$b.distanceToSquared(et.center) <= et.radius * et.radius + } + intersectsPlane(et) { + let nt, rt + return ( + et.normal.x > 0 + ? ((nt = et.normal.x * this.min.x), (rt = et.normal.x * this.max.x)) + : ((nt = et.normal.x * this.max.x), (rt = et.normal.x * this.min.x)), + et.normal.y > 0 + ? ((nt += et.normal.y * this.min.y), (rt += et.normal.y * this.max.y)) + : ((nt += et.normal.y * this.max.y), (rt += et.normal.y * this.min.y)), + et.normal.z > 0 + ? ((nt += et.normal.z * this.min.z), (rt += et.normal.z * this.max.z)) + : ((nt += et.normal.z * this.max.z), (rt += et.normal.z * this.min.z)), + nt <= -et.constant && rt >= -et.constant + ) + } + intersectsTriangle(et) { + if (this.isEmpty()) return !1 + this.getCenter(_center), + _extents.subVectors(this.max, _center), + _v0$2.subVectors(et.a, _center), + _v1$7.subVectors(et.b, _center), + _v2$3.subVectors(et.c, _center), + _f0.subVectors(_v1$7, _v0$2), + _f1.subVectors(_v2$3, _v1$7), + _f2.subVectors(_v0$2, _v2$3) + let nt = [ + 0, + -_f0.z, + _f0.y, + 0, + -_f1.z, + _f1.y, + 0, + -_f2.z, + _f2.y, + _f0.z, + 0, + -_f0.x, + _f1.z, + 0, + -_f1.x, + _f2.z, + 0, + -_f2.x, + -_f0.y, + _f0.x, + 0, + -_f1.y, + _f1.x, + 0, + -_f2.y, + _f2.x, + 0, + ] + return !satForAxes(nt, _v0$2, _v1$7, _v2$3, _extents) || + ((nt = [1, 0, 0, 0, 1, 0, 0, 0, 1]), !satForAxes(nt, _v0$2, _v1$7, _v2$3, _extents)) + ? !1 + : (_triangleNormal.crossVectors(_f0, _f1), + (nt = [_triangleNormal.x, _triangleNormal.y, _triangleNormal.z]), + satForAxes(nt, _v0$2, _v1$7, _v2$3, _extents)) + } + clampPoint(et, nt) { + return nt.copy(et).clamp(this.min, this.max) + } + distanceToPoint(et) { + return _vector$b.copy(et).clamp(this.min, this.max).sub(et).length() + } + getBoundingSphere(et) { + return this.getCenter(et.center), (et.radius = this.getSize(_vector$b).length() * 0.5), et + } + intersect(et) { + return this.min.max(et.min), this.max.min(et.max), this.isEmpty() && this.makeEmpty(), this + } + union(et) { + return this.min.min(et.min), this.max.max(et.max), this + } + applyMatrix4(et) { + return this.isEmpty() + ? this + : (_points[0].set(this.min.x, this.min.y, this.min.z).applyMatrix4(et), + _points[1].set(this.min.x, this.min.y, this.max.z).applyMatrix4(et), + _points[2].set(this.min.x, this.max.y, this.min.z).applyMatrix4(et), + _points[3].set(this.min.x, this.max.y, this.max.z).applyMatrix4(et), + _points[4].set(this.max.x, this.min.y, this.min.z).applyMatrix4(et), + _points[5].set(this.max.x, this.min.y, this.max.z).applyMatrix4(et), + _points[6].set(this.max.x, this.max.y, this.min.z).applyMatrix4(et), + _points[7].set(this.max.x, this.max.y, this.max.z).applyMatrix4(et), + this.setFromPoints(_points), + this) + } + translate(et) { + return this.min.add(et), this.max.add(et), this + } + equals(et) { + return et.min.equals(this.min) && et.max.equals(this.max) + } + } + const _points = [ + new Vector3(), + new Vector3(), + new Vector3(), + new Vector3(), + new Vector3(), + new Vector3(), + new Vector3(), + new Vector3(), + ], + _vector$b = new Vector3(), + _box$3 = new Box3(), + _v0$2 = new Vector3(), + _v1$7 = new Vector3(), + _v2$3 = new Vector3(), + _f0 = new Vector3(), + _f1 = new Vector3(), + _f2 = new Vector3(), + _center = new Vector3(), + _extents = new Vector3(), + _triangleNormal = new Vector3(), + _testAxis = new Vector3() + function satForAxes(tt, et, nt, rt, it) { + for (let ot = 0, at = tt.length - 3; ot <= at; ot += 3) { + _testAxis.fromArray(tt, ot) + const st = it.x * Math.abs(_testAxis.x) + it.y * Math.abs(_testAxis.y) + it.z * Math.abs(_testAxis.z), + lt = et.dot(_testAxis), + ct = nt.dot(_testAxis), + ut = rt.dot(_testAxis) + if (Math.max(-Math.max(lt, ct, ut), Math.min(lt, ct, ut)) > st) return !1 + } + return !0 + } + const _box$2 = new Box3(), + _v1$6 = new Vector3(), + _toFarthestPoint = new Vector3(), + _toPoint = new Vector3() + class Sphere { + constructor(et = new Vector3(), nt = -1) { + ;(this.center = et), (this.radius = nt) + } + set(et, nt) { + return this.center.copy(et), (this.radius = nt), this + } + setFromPoints(et, nt) { + const rt = this.center + nt !== void 0 ? rt.copy(nt) : _box$2.setFromPoints(et).getCenter(rt) + let it = 0 + for (let ot = 0, at = et.length; ot < at; ot++) it = Math.max(it, rt.distanceToSquared(et[ot])) + return (this.radius = Math.sqrt(it)), this + } + copy(et) { + return this.center.copy(et.center), (this.radius = et.radius), this + } + isEmpty() { + return this.radius < 0 + } + makeEmpty() { + return this.center.set(0, 0, 0), (this.radius = -1), this + } + containsPoint(et) { + return et.distanceToSquared(this.center) <= this.radius * this.radius + } + distanceToPoint(et) { + return et.distanceTo(this.center) - this.radius + } + intersectsSphere(et) { + const nt = this.radius + et.radius + return et.center.distanceToSquared(this.center) <= nt * nt + } + intersectsBox(et) { + return et.intersectsSphere(this) + } + intersectsPlane(et) { + return Math.abs(et.distanceToPoint(this.center)) <= this.radius + } + clampPoint(et, nt) { + const rt = this.center.distanceToSquared(et) + return ( + nt.copy(et), + rt > this.radius * this.radius && + (nt.sub(this.center).normalize(), nt.multiplyScalar(this.radius).add(this.center)), + nt + ) + } + getBoundingBox(et) { + return this.isEmpty() + ? (et.makeEmpty(), et) + : (et.set(this.center, this.center), et.expandByScalar(this.radius), et) + } + applyMatrix4(et) { + return this.center.applyMatrix4(et), (this.radius = this.radius * et.getMaxScaleOnAxis()), this + } + translate(et) { + return this.center.add(et), this + } + expandByPoint(et) { + _toPoint.subVectors(et, this.center) + const nt = _toPoint.lengthSq() + if (nt > this.radius * this.radius) { + const rt = Math.sqrt(nt), + it = (rt - this.radius) * 0.5 + this.center.add(_toPoint.multiplyScalar(it / rt)), (this.radius += it) + } + return this + } + union(et) { + return ( + this.center.equals(et.center) === !0 + ? _toFarthestPoint.set(0, 0, 1).multiplyScalar(et.radius) + : _toFarthestPoint.subVectors(et.center, this.center).normalize().multiplyScalar(et.radius), + this.expandByPoint(_v1$6.copy(et.center).add(_toFarthestPoint)), + this.expandByPoint(_v1$6.copy(et.center).sub(_toFarthestPoint)), + this + ) + } + equals(et) { + return et.center.equals(this.center) && et.radius === this.radius + } + clone() { + return new this.constructor().copy(this) + } + } + const _vector$a = new Vector3(), + _segCenter = new Vector3(), + _segDir = new Vector3(), + _diff = new Vector3(), + _edge1 = new Vector3(), + _edge2 = new Vector3(), + _normal$1 = new Vector3() + class Ray { + constructor(et = new Vector3(), nt = new Vector3(0, 0, -1)) { + ;(this.origin = et), (this.direction = nt) + } + set(et, nt) { + return this.origin.copy(et), this.direction.copy(nt), this + } + copy(et) { + return this.origin.copy(et.origin), this.direction.copy(et.direction), this + } + at(et, nt) { + return nt.copy(this.direction).multiplyScalar(et).add(this.origin) + } + lookAt(et) { + return this.direction.copy(et).sub(this.origin).normalize(), this + } + recast(et) { + return this.origin.copy(this.at(et, _vector$a)), this + } + closestPointToPoint(et, nt) { + nt.subVectors(et, this.origin) + const rt = nt.dot(this.direction) + return rt < 0 ? nt.copy(this.origin) : nt.copy(this.direction).multiplyScalar(rt).add(this.origin) + } + distanceToPoint(et) { + return Math.sqrt(this.distanceSqToPoint(et)) + } + distanceSqToPoint(et) { + const nt = _vector$a.subVectors(et, this.origin).dot(this.direction) + return nt < 0 + ? this.origin.distanceToSquared(et) + : (_vector$a.copy(this.direction).multiplyScalar(nt).add(this.origin), _vector$a.distanceToSquared(et)) + } + distanceSqToSegment(et, nt, rt, it) { + _segCenter.copy(et).add(nt).multiplyScalar(0.5), + _segDir.copy(nt).sub(et).normalize(), + _diff.copy(this.origin).sub(_segCenter) + const ot = et.distanceTo(nt) * 0.5, + at = -this.direction.dot(_segDir), + st = _diff.dot(this.direction), + lt = -_diff.dot(_segDir), + ct = _diff.lengthSq(), + ut = Math.abs(1 - at * at) + let ht, dt, pt, mt + if (ut > 0) + if (((ht = at * lt - st), (dt = at * st - lt), (mt = ot * ut), ht >= 0)) + if (dt >= -mt) + if (dt <= mt) { + const gt = 1 / ut + ;(ht *= gt), (dt *= gt), (pt = ht * (ht + at * dt + 2 * st) + dt * (at * ht + dt + 2 * lt) + ct) + } else (dt = ot), (ht = Math.max(0, -(at * dt + st))), (pt = -ht * ht + dt * (dt + 2 * lt) + ct) + else (dt = -ot), (ht = Math.max(0, -(at * dt + st))), (pt = -ht * ht + dt * (dt + 2 * lt) + ct) + else + dt <= -mt + ? ((ht = Math.max(0, -(-at * ot + st))), + (dt = ht > 0 ? -ot : Math.min(Math.max(-ot, -lt), ot)), + (pt = -ht * ht + dt * (dt + 2 * lt) + ct)) + : dt <= mt + ? ((ht = 0), (dt = Math.min(Math.max(-ot, -lt), ot)), (pt = dt * (dt + 2 * lt) + ct)) + : ((ht = Math.max(0, -(at * ot + st))), + (dt = ht > 0 ? ot : Math.min(Math.max(-ot, -lt), ot)), + (pt = -ht * ht + dt * (dt + 2 * lt) + ct)) + else (dt = at > 0 ? -ot : ot), (ht = Math.max(0, -(at * dt + st))), (pt = -ht * ht + dt * (dt + 2 * lt) + ct) + return ( + rt && rt.copy(this.direction).multiplyScalar(ht).add(this.origin), + it && it.copy(_segDir).multiplyScalar(dt).add(_segCenter), + pt + ) + } + intersectSphere(et, nt) { + _vector$a.subVectors(et.center, this.origin) + const rt = _vector$a.dot(this.direction), + it = _vector$a.dot(_vector$a) - rt * rt, + ot = et.radius * et.radius + if (it > ot) return null + const at = Math.sqrt(ot - it), + st = rt - at, + lt = rt + at + return st < 0 && lt < 0 ? null : st < 0 ? this.at(lt, nt) : this.at(st, nt) + } + intersectsSphere(et) { + return this.distanceSqToPoint(et.center) <= et.radius * et.radius + } + distanceToPlane(et) { + const nt = et.normal.dot(this.direction) + if (nt === 0) return et.distanceToPoint(this.origin) === 0 ? 0 : null + const rt = -(this.origin.dot(et.normal) + et.constant) / nt + return rt >= 0 ? rt : null + } + intersectPlane(et, nt) { + const rt = this.distanceToPlane(et) + return rt === null ? null : this.at(rt, nt) + } + intersectsPlane(et) { + const nt = et.distanceToPoint(this.origin) + return nt === 0 || et.normal.dot(this.direction) * nt < 0 + } + intersectBox(et, nt) { + let rt, it, ot, at, st, lt + const ct = 1 / this.direction.x, + ut = 1 / this.direction.y, + ht = 1 / this.direction.z, + dt = this.origin + return ( + ct >= 0 + ? ((rt = (et.min.x - dt.x) * ct), (it = (et.max.x - dt.x) * ct)) + : ((rt = (et.max.x - dt.x) * ct), (it = (et.min.x - dt.x) * ct)), + ut >= 0 + ? ((ot = (et.min.y - dt.y) * ut), (at = (et.max.y - dt.y) * ut)) + : ((ot = (et.max.y - dt.y) * ut), (at = (et.min.y - dt.y) * ut)), + rt > at || + ot > it || + ((ot > rt || rt !== rt) && (rt = ot), + (at < it || it !== it) && (it = at), + ht >= 0 + ? ((st = (et.min.z - dt.z) * ht), (lt = (et.max.z - dt.z) * ht)) + : ((st = (et.max.z - dt.z) * ht), (lt = (et.min.z - dt.z) * ht)), + rt > lt || st > it) || + ((st > rt || rt !== rt) && (rt = st), (lt < it || it !== it) && (it = lt), it < 0) + ? null + : this.at(rt >= 0 ? rt : it, nt) + ) + } + intersectsBox(et) { + return this.intersectBox(et, _vector$a) !== null + } + intersectTriangle(et, nt, rt, it, ot) { + _edge1.subVectors(nt, et), _edge2.subVectors(rt, et), _normal$1.crossVectors(_edge1, _edge2) + let at = this.direction.dot(_normal$1), + st + if (at > 0) { + if (it) return null + st = 1 + } else if (at < 0) (st = -1), (at = -at) + else return null + _diff.subVectors(this.origin, et) + const lt = st * this.direction.dot(_edge2.crossVectors(_diff, _edge2)) + if (lt < 0) return null + const ct = st * this.direction.dot(_edge1.cross(_diff)) + if (ct < 0 || lt + ct > at) return null + const ut = -st * _diff.dot(_normal$1) + return ut < 0 ? null : this.at(ut / at, ot) + } + applyMatrix4(et) { + return this.origin.applyMatrix4(et), this.direction.transformDirection(et), this + } + equals(et) { + return et.origin.equals(this.origin) && et.direction.equals(this.direction) + } + clone() { + return new this.constructor().copy(this) + } + } + class Matrix4 { + constructor() { + ;(Matrix4.prototype.isMatrix4 = !0), (this.elements = [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1]) + } + set(et, nt, rt, it, ot, at, st, lt, ct, ut, ht, dt, pt, mt, gt, yt) { + const bt = this.elements + return ( + (bt[0] = et), + (bt[4] = nt), + (bt[8] = rt), + (bt[12] = it), + (bt[1] = ot), + (bt[5] = at), + (bt[9] = st), + (bt[13] = lt), + (bt[2] = ct), + (bt[6] = ut), + (bt[10] = ht), + (bt[14] = dt), + (bt[3] = pt), + (bt[7] = mt), + (bt[11] = gt), + (bt[15] = yt), + this + ) + } + identity() { + return this.set(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1), this + } + clone() { + return new Matrix4().fromArray(this.elements) + } + copy(et) { + const nt = this.elements, + rt = et.elements + return ( + (nt[0] = rt[0]), + (nt[1] = rt[1]), + (nt[2] = rt[2]), + (nt[3] = rt[3]), + (nt[4] = rt[4]), + (nt[5] = rt[5]), + (nt[6] = rt[6]), + (nt[7] = rt[7]), + (nt[8] = rt[8]), + (nt[9] = rt[9]), + (nt[10] = rt[10]), + (nt[11] = rt[11]), + (nt[12] = rt[12]), + (nt[13] = rt[13]), + (nt[14] = rt[14]), + (nt[15] = rt[15]), + this + ) + } + copyPosition(et) { + const nt = this.elements, + rt = et.elements + return (nt[12] = rt[12]), (nt[13] = rt[13]), (nt[14] = rt[14]), this + } + setFromMatrix3(et) { + const nt = et.elements + return this.set(nt[0], nt[3], nt[6], 0, nt[1], nt[4], nt[7], 0, nt[2], nt[5], nt[8], 0, 0, 0, 0, 1), this + } + extractBasis(et, nt, rt) { + return et.setFromMatrixColumn(this, 0), nt.setFromMatrixColumn(this, 1), rt.setFromMatrixColumn(this, 2), this + } + makeBasis(et, nt, rt) { + return this.set(et.x, nt.x, rt.x, 0, et.y, nt.y, rt.y, 0, et.z, nt.z, rt.z, 0, 0, 0, 0, 1), this + } + extractRotation(et) { + const nt = this.elements, + rt = et.elements, + it = 1 / _v1$5.setFromMatrixColumn(et, 0).length(), + ot = 1 / _v1$5.setFromMatrixColumn(et, 1).length(), + at = 1 / _v1$5.setFromMatrixColumn(et, 2).length() + return ( + (nt[0] = rt[0] * it), + (nt[1] = rt[1] * it), + (nt[2] = rt[2] * it), + (nt[3] = 0), + (nt[4] = rt[4] * ot), + (nt[5] = rt[5] * ot), + (nt[6] = rt[6] * ot), + (nt[7] = 0), + (nt[8] = rt[8] * at), + (nt[9] = rt[9] * at), + (nt[10] = rt[10] * at), + (nt[11] = 0), + (nt[12] = 0), + (nt[13] = 0), + (nt[14] = 0), + (nt[15] = 1), + this + ) + } + makeRotationFromEuler(et) { + const nt = this.elements, + rt = et.x, + it = et.y, + ot = et.z, + at = Math.cos(rt), + st = Math.sin(rt), + lt = Math.cos(it), + ct = Math.sin(it), + ut = Math.cos(ot), + ht = Math.sin(ot) + if (et.order === 'XYZ') { + const dt = at * ut, + pt = at * ht, + mt = st * ut, + gt = st * ht + ;(nt[0] = lt * ut), + (nt[4] = -lt * ht), + (nt[8] = ct), + (nt[1] = pt + mt * ct), + (nt[5] = dt - gt * ct), + (nt[9] = -st * lt), + (nt[2] = gt - dt * ct), + (nt[6] = mt + pt * ct), + (nt[10] = at * lt) + } else if (et.order === 'YXZ') { + const dt = lt * ut, + pt = lt * ht, + mt = ct * ut, + gt = ct * ht + ;(nt[0] = dt + gt * st), + (nt[4] = mt * st - pt), + (nt[8] = at * ct), + (nt[1] = at * ht), + (nt[5] = at * ut), + (nt[9] = -st), + (nt[2] = pt * st - mt), + (nt[6] = gt + dt * st), + (nt[10] = at * lt) + } else if (et.order === 'ZXY') { + const dt = lt * ut, + pt = lt * ht, + mt = ct * ut, + gt = ct * ht + ;(nt[0] = dt - gt * st), + (nt[4] = -at * ht), + (nt[8] = mt + pt * st), + (nt[1] = pt + mt * st), + (nt[5] = at * ut), + (nt[9] = gt - dt * st), + (nt[2] = -at * ct), + (nt[6] = st), + (nt[10] = at * lt) + } else if (et.order === 'ZYX') { + const dt = at * ut, + pt = at * ht, + mt = st * ut, + gt = st * ht + ;(nt[0] = lt * ut), + (nt[4] = mt * ct - pt), + (nt[8] = dt * ct + gt), + (nt[1] = lt * ht), + (nt[5] = gt * ct + dt), + (nt[9] = pt * ct - mt), + (nt[2] = -ct), + (nt[6] = st * lt), + (nt[10] = at * lt) + } else if (et.order === 'YZX') { + const dt = at * lt, + pt = at * ct, + mt = st * lt, + gt = st * ct + ;(nt[0] = lt * ut), + (nt[4] = gt - dt * ht), + (nt[8] = mt * ht + pt), + (nt[1] = ht), + (nt[5] = at * ut), + (nt[9] = -st * ut), + (nt[2] = -ct * ut), + (nt[6] = pt * ht + mt), + (nt[10] = dt - gt * ht) + } else if (et.order === 'XZY') { + const dt = at * lt, + pt = at * ct, + mt = st * lt, + gt = st * ct + ;(nt[0] = lt * ut), + (nt[4] = -ht), + (nt[8] = ct * ut), + (nt[1] = dt * ht + gt), + (nt[5] = at * ut), + (nt[9] = pt * ht - mt), + (nt[2] = mt * ht - pt), + (nt[6] = st * ut), + (nt[10] = gt * ht + dt) + } + return (nt[3] = 0), (nt[7] = 0), (nt[11] = 0), (nt[12] = 0), (nt[13] = 0), (nt[14] = 0), (nt[15] = 1), this + } + makeRotationFromQuaternion(et) { + return this.compose(_zero, et, _one) + } + lookAt(et, nt, rt) { + const it = this.elements + return ( + _z.subVectors(et, nt), + _z.lengthSq() === 0 && (_z.z = 1), + _z.normalize(), + _x.crossVectors(rt, _z), + _x.lengthSq() === 0 && + (Math.abs(rt.z) === 1 ? (_z.x += 1e-4) : (_z.z += 1e-4), _z.normalize(), _x.crossVectors(rt, _z)), + _x.normalize(), + _y.crossVectors(_z, _x), + (it[0] = _x.x), + (it[4] = _y.x), + (it[8] = _z.x), + (it[1] = _x.y), + (it[5] = _y.y), + (it[9] = _z.y), + (it[2] = _x.z), + (it[6] = _y.z), + (it[10] = _z.z), + this + ) + } + multiply(et) { + return this.multiplyMatrices(this, et) + } + premultiply(et) { + return this.multiplyMatrices(et, this) + } + multiplyMatrices(et, nt) { + const rt = et.elements, + it = nt.elements, + ot = this.elements, + at = rt[0], + st = rt[4], + lt = rt[8], + ct = rt[12], + ut = rt[1], + ht = rt[5], + dt = rt[9], + pt = rt[13], + mt = rt[2], + gt = rt[6], + yt = rt[10], + bt = rt[14], + vt = rt[3], + xt = rt[7], + kt = rt[11], + St = rt[15], + Tt = it[0], + At = it[4], + Et = it[8], + $t = it[12], + Dt = it[1], + jt = it[5], + Pt = it[9], + Ct = it[13], + wt = it[2], + It = it[6], + Ot = it[10], + Wt = it[14], + zt = it[3], + Ft = it[7], + Nt = it[11], + Ut = it[15] + return ( + (ot[0] = at * Tt + st * Dt + lt * wt + ct * zt), + (ot[4] = at * At + st * jt + lt * It + ct * Ft), + (ot[8] = at * Et + st * Pt + lt * Ot + ct * Nt), + (ot[12] = at * $t + st * Ct + lt * Wt + ct * Ut), + (ot[1] = ut * Tt + ht * Dt + dt * wt + pt * zt), + (ot[5] = ut * At + ht * jt + dt * It + pt * Ft), + (ot[9] = ut * Et + ht * Pt + dt * Ot + pt * Nt), + (ot[13] = ut * $t + ht * Ct + dt * Wt + pt * Ut), + (ot[2] = mt * Tt + gt * Dt + yt * wt + bt * zt), + (ot[6] = mt * At + gt * jt + yt * It + bt * Ft), + (ot[10] = mt * Et + gt * Pt + yt * Ot + bt * Nt), + (ot[14] = mt * $t + gt * Ct + yt * Wt + bt * Ut), + (ot[3] = vt * Tt + xt * Dt + kt * wt + St * zt), + (ot[7] = vt * At + xt * jt + kt * It + St * Ft), + (ot[11] = vt * Et + xt * Pt + kt * Ot + St * Nt), + (ot[15] = vt * $t + xt * Ct + kt * Wt + St * Ut), + this + ) + } + multiplyScalar(et) { + const nt = this.elements + return ( + (nt[0] *= et), + (nt[4] *= et), + (nt[8] *= et), + (nt[12] *= et), + (nt[1] *= et), + (nt[5] *= et), + (nt[9] *= et), + (nt[13] *= et), + (nt[2] *= et), + (nt[6] *= et), + (nt[10] *= et), + (nt[14] *= et), + (nt[3] *= et), + (nt[7] *= et), + (nt[11] *= et), + (nt[15] *= et), + this + ) + } + determinant() { + const et = this.elements, + nt = et[0], + rt = et[4], + it = et[8], + ot = et[12], + at = et[1], + st = et[5], + lt = et[9], + ct = et[13], + ut = et[2], + ht = et[6], + dt = et[10], + pt = et[14], + mt = et[3], + gt = et[7], + yt = et[11], + bt = et[15] + return ( + mt * (+ot * lt * ht - it * ct * ht - ot * st * dt + rt * ct * dt + it * st * pt - rt * lt * pt) + + gt * (+nt * lt * pt - nt * ct * dt + ot * at * dt - it * at * pt + it * ct * ut - ot * lt * ut) + + yt * (+nt * ct * ht - nt * st * pt - ot * at * ht + rt * at * pt + ot * st * ut - rt * ct * ut) + + bt * (-it * st * ut - nt * lt * ht + nt * st * dt + it * at * ht - rt * at * dt + rt * lt * ut) + ) + } + transpose() { + const et = this.elements + let nt + return ( + (nt = et[1]), + (et[1] = et[4]), + (et[4] = nt), + (nt = et[2]), + (et[2] = et[8]), + (et[8] = nt), + (nt = et[6]), + (et[6] = et[9]), + (et[9] = nt), + (nt = et[3]), + (et[3] = et[12]), + (et[12] = nt), + (nt = et[7]), + (et[7] = et[13]), + (et[13] = nt), + (nt = et[11]), + (et[11] = et[14]), + (et[14] = nt), + this + ) + } + setPosition(et, nt, rt) { + const it = this.elements + return ( + et.isVector3 + ? ((it[12] = et.x), (it[13] = et.y), (it[14] = et.z)) + : ((it[12] = et), (it[13] = nt), (it[14] = rt)), + this + ) + } + invert() { + const et = this.elements, + nt = et[0], + rt = et[1], + it = et[2], + ot = et[3], + at = et[4], + st = et[5], + lt = et[6], + ct = et[7], + ut = et[8], + ht = et[9], + dt = et[10], + pt = et[11], + mt = et[12], + gt = et[13], + yt = et[14], + bt = et[15], + vt = ht * yt * ct - gt * dt * ct + gt * lt * pt - st * yt * pt - ht * lt * bt + st * dt * bt, + xt = mt * dt * ct - ut * yt * ct - mt * lt * pt + at * yt * pt + ut * lt * bt - at * dt * bt, + kt = ut * gt * ct - mt * ht * ct + mt * st * pt - at * gt * pt - ut * st * bt + at * ht * bt, + St = mt * ht * lt - ut * gt * lt - mt * st * dt + at * gt * dt + ut * st * yt - at * ht * yt, + Tt = nt * vt + rt * xt + it * kt + ot * St + if (Tt === 0) return this.set(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0) + const At = 1 / Tt + return ( + (et[0] = vt * At), + (et[1] = (gt * dt * ot - ht * yt * ot - gt * it * pt + rt * yt * pt + ht * it * bt - rt * dt * bt) * At), + (et[2] = (st * yt * ot - gt * lt * ot + gt * it * ct - rt * yt * ct - st * it * bt + rt * lt * bt) * At), + (et[3] = (ht * lt * ot - st * dt * ot - ht * it * ct + rt * dt * ct + st * it * pt - rt * lt * pt) * At), + (et[4] = xt * At), + (et[5] = (ut * yt * ot - mt * dt * ot + mt * it * pt - nt * yt * pt - ut * it * bt + nt * dt * bt) * At), + (et[6] = (mt * lt * ot - at * yt * ot - mt * it * ct + nt * yt * ct + at * it * bt - nt * lt * bt) * At), + (et[7] = (at * dt * ot - ut * lt * ot + ut * it * ct - nt * dt * ct - at * it * pt + nt * lt * pt) * At), + (et[8] = kt * At), + (et[9] = (mt * ht * ot - ut * gt * ot - mt * rt * pt + nt * gt * pt + ut * rt * bt - nt * ht * bt) * At), + (et[10] = (at * gt * ot - mt * st * ot + mt * rt * ct - nt * gt * ct - at * rt * bt + nt * st * bt) * At), + (et[11] = (ut * st * ot - at * ht * ot - ut * rt * ct + nt * ht * ct + at * rt * pt - nt * st * pt) * At), + (et[12] = St * At), + (et[13] = (ut * gt * it - mt * ht * it + mt * rt * dt - nt * gt * dt - ut * rt * yt + nt * ht * yt) * At), + (et[14] = (mt * st * it - at * gt * it - mt * rt * lt + nt * gt * lt + at * rt * yt - nt * st * yt) * At), + (et[15] = (at * ht * it - ut * st * it + ut * rt * lt - nt * ht * lt - at * rt * dt + nt * st * dt) * At), + this + ) + } + scale(et) { + const nt = this.elements, + rt = et.x, + it = et.y, + ot = et.z + return ( + (nt[0] *= rt), + (nt[4] *= it), + (nt[8] *= ot), + (nt[1] *= rt), + (nt[5] *= it), + (nt[9] *= ot), + (nt[2] *= rt), + (nt[6] *= it), + (nt[10] *= ot), + (nt[3] *= rt), + (nt[7] *= it), + (nt[11] *= ot), + this + ) + } + getMaxScaleOnAxis() { + const et = this.elements, + nt = et[0] * et[0] + et[1] * et[1] + et[2] * et[2], + rt = et[4] * et[4] + et[5] * et[5] + et[6] * et[6], + it = et[8] * et[8] + et[9] * et[9] + et[10] * et[10] + return Math.sqrt(Math.max(nt, rt, it)) + } + makeTranslation(et, nt, rt) { + return this.set(1, 0, 0, et, 0, 1, 0, nt, 0, 0, 1, rt, 0, 0, 0, 1), this + } + makeRotationX(et) { + const nt = Math.cos(et), + rt = Math.sin(et) + return this.set(1, 0, 0, 0, 0, nt, -rt, 0, 0, rt, nt, 0, 0, 0, 0, 1), this + } + makeRotationY(et) { + const nt = Math.cos(et), + rt = Math.sin(et) + return this.set(nt, 0, rt, 0, 0, 1, 0, 0, -rt, 0, nt, 0, 0, 0, 0, 1), this + } + makeRotationZ(et) { + const nt = Math.cos(et), + rt = Math.sin(et) + return this.set(nt, -rt, 0, 0, rt, nt, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1), this + } + makeRotationAxis(et, nt) { + const rt = Math.cos(nt), + it = Math.sin(nt), + ot = 1 - rt, + at = et.x, + st = et.y, + lt = et.z, + ct = ot * at, + ut = ot * st + return ( + this.set( + ct * at + rt, + ct * st - it * lt, + ct * lt + it * st, + 0, + ct * st + it * lt, + ut * st + rt, + ut * lt - it * at, + 0, + ct * lt - it * st, + ut * lt + it * at, + ot * lt * lt + rt, + 0, + 0, + 0, + 0, + 1, + ), + this + ) + } + makeScale(et, nt, rt) { + return this.set(et, 0, 0, 0, 0, nt, 0, 0, 0, 0, rt, 0, 0, 0, 0, 1), this + } + makeShear(et, nt, rt, it, ot, at) { + return this.set(1, rt, ot, 0, et, 1, at, 0, nt, it, 1, 0, 0, 0, 0, 1), this + } + compose(et, nt, rt) { + const it = this.elements, + ot = nt._x, + at = nt._y, + st = nt._z, + lt = nt._w, + ct = ot + ot, + ut = at + at, + ht = st + st, + dt = ot * ct, + pt = ot * ut, + mt = ot * ht, + gt = at * ut, + yt = at * ht, + bt = st * ht, + vt = lt * ct, + xt = lt * ut, + kt = lt * ht, + St = rt.x, + Tt = rt.y, + At = rt.z + return ( + (it[0] = (1 - (gt + bt)) * St), + (it[1] = (pt + kt) * St), + (it[2] = (mt - xt) * St), + (it[3] = 0), + (it[4] = (pt - kt) * Tt), + (it[5] = (1 - (dt + bt)) * Tt), + (it[6] = (yt + vt) * Tt), + (it[7] = 0), + (it[8] = (mt + xt) * At), + (it[9] = (yt - vt) * At), + (it[10] = (1 - (dt + gt)) * At), + (it[11] = 0), + (it[12] = et.x), + (it[13] = et.y), + (it[14] = et.z), + (it[15] = 1), + this + ) + } + decompose(et, nt, rt) { + const it = this.elements + let ot = _v1$5.set(it[0], it[1], it[2]).length() + const at = _v1$5.set(it[4], it[5], it[6]).length(), + st = _v1$5.set(it[8], it[9], it[10]).length() + this.determinant() < 0 && (ot = -ot), (et.x = it[12]), (et.y = it[13]), (et.z = it[14]), _m1$2.copy(this) + const ct = 1 / ot, + ut = 1 / at, + ht = 1 / st + return ( + (_m1$2.elements[0] *= ct), + (_m1$2.elements[1] *= ct), + (_m1$2.elements[2] *= ct), + (_m1$2.elements[4] *= ut), + (_m1$2.elements[5] *= ut), + (_m1$2.elements[6] *= ut), + (_m1$2.elements[8] *= ht), + (_m1$2.elements[9] *= ht), + (_m1$2.elements[10] *= ht), + nt.setFromRotationMatrix(_m1$2), + (rt.x = ot), + (rt.y = at), + (rt.z = st), + this + ) + } + makePerspective(et, nt, rt, it, ot, at) { + const st = this.elements, + lt = (2 * ot) / (nt - et), + ct = (2 * ot) / (rt - it), + ut = (nt + et) / (nt - et), + ht = (rt + it) / (rt - it), + dt = -(at + ot) / (at - ot), + pt = (-2 * at * ot) / (at - ot) + return ( + (st[0] = lt), + (st[4] = 0), + (st[8] = ut), + (st[12] = 0), + (st[1] = 0), + (st[5] = ct), + (st[9] = ht), + (st[13] = 0), + (st[2] = 0), + (st[6] = 0), + (st[10] = dt), + (st[14] = pt), + (st[3] = 0), + (st[7] = 0), + (st[11] = -1), + (st[15] = 0), + this + ) + } + makeOrthographic(et, nt, rt, it, ot, at) { + const st = this.elements, + lt = 1 / (nt - et), + ct = 1 / (rt - it), + ut = 1 / (at - ot), + ht = (nt + et) * lt, + dt = (rt + it) * ct, + pt = (at + ot) * ut + return ( + (st[0] = 2 * lt), + (st[4] = 0), + (st[8] = 0), + (st[12] = -ht), + (st[1] = 0), + (st[5] = 2 * ct), + (st[9] = 0), + (st[13] = -dt), + (st[2] = 0), + (st[6] = 0), + (st[10] = -2 * ut), + (st[14] = -pt), + (st[3] = 0), + (st[7] = 0), + (st[11] = 0), + (st[15] = 1), + this + ) + } + equals(et) { + const nt = this.elements, + rt = et.elements + for (let it = 0; it < 16; it++) if (nt[it] !== rt[it]) return !1 + return !0 + } + fromArray(et, nt = 0) { + for (let rt = 0; rt < 16; rt++) this.elements[rt] = et[rt + nt] + return this + } + toArray(et = [], nt = 0) { + const rt = this.elements + return ( + (et[nt] = rt[0]), + (et[nt + 1] = rt[1]), + (et[nt + 2] = rt[2]), + (et[nt + 3] = rt[3]), + (et[nt + 4] = rt[4]), + (et[nt + 5] = rt[5]), + (et[nt + 6] = rt[6]), + (et[nt + 7] = rt[7]), + (et[nt + 8] = rt[8]), + (et[nt + 9] = rt[9]), + (et[nt + 10] = rt[10]), + (et[nt + 11] = rt[11]), + (et[nt + 12] = rt[12]), + (et[nt + 13] = rt[13]), + (et[nt + 14] = rt[14]), + (et[nt + 15] = rt[15]), + et + ) + } + } + const _v1$5 = new Vector3(), + _m1$2 = new Matrix4(), + _zero = new Vector3(0, 0, 0), + _one = new Vector3(1, 1, 1), + _x = new Vector3(), + _y = new Vector3(), + _z = new Vector3(), + _matrix$1 = new Matrix4(), + _quaternion$3 = new Quaternion() + class Euler { + constructor(et = 0, nt = 0, rt = 0, it = Euler.DefaultOrder) { + ;(this.isEuler = !0), (this._x = et), (this._y = nt), (this._z = rt), (this._order = it) + } + get x() { + return this._x + } + set x(et) { + ;(this._x = et), this._onChangeCallback() + } + get y() { + return this._y + } + set y(et) { + ;(this._y = et), this._onChangeCallback() + } + get z() { + return this._z + } + set z(et) { + ;(this._z = et), this._onChangeCallback() + } + get order() { + return this._order + } + set order(et) { + ;(this._order = et), this._onChangeCallback() + } + set(et, nt, rt, it = this._order) { + return (this._x = et), (this._y = nt), (this._z = rt), (this._order = it), this._onChangeCallback(), this + } + clone() { + return new this.constructor(this._x, this._y, this._z, this._order) + } + copy(et) { + return ( + (this._x = et._x), + (this._y = et._y), + (this._z = et._z), + (this._order = et._order), + this._onChangeCallback(), + this + ) + } + setFromRotationMatrix(et, nt = this._order, rt = !0) { + const it = et.elements, + ot = it[0], + at = it[4], + st = it[8], + lt = it[1], + ct = it[5], + ut = it[9], + ht = it[2], + dt = it[6], + pt = it[10] + switch (nt) { + case 'XYZ': + ;(this._y = Math.asin(clamp$5(st, -1, 1))), + Math.abs(st) < 0.9999999 + ? ((this._x = Math.atan2(-ut, pt)), (this._z = Math.atan2(-at, ot))) + : ((this._x = Math.atan2(dt, ct)), (this._z = 0)) + break + case 'YXZ': + ;(this._x = Math.asin(-clamp$5(ut, -1, 1))), + Math.abs(ut) < 0.9999999 + ? ((this._y = Math.atan2(st, pt)), (this._z = Math.atan2(lt, ct))) + : ((this._y = Math.atan2(-ht, ot)), (this._z = 0)) + break + case 'ZXY': + ;(this._x = Math.asin(clamp$5(dt, -1, 1))), + Math.abs(dt) < 0.9999999 + ? ((this._y = Math.atan2(-ht, pt)), (this._z = Math.atan2(-at, ct))) + : ((this._y = 0), (this._z = Math.atan2(lt, ot))) + break + case 'ZYX': + ;(this._y = Math.asin(-clamp$5(ht, -1, 1))), + Math.abs(ht) < 0.9999999 + ? ((this._x = Math.atan2(dt, pt)), (this._z = Math.atan2(lt, ot))) + : ((this._x = 0), (this._z = Math.atan2(-at, ct))) + break + case 'YZX': + ;(this._z = Math.asin(clamp$5(lt, -1, 1))), + Math.abs(lt) < 0.9999999 + ? ((this._x = Math.atan2(-ut, ct)), (this._y = Math.atan2(-ht, ot))) + : ((this._x = 0), (this._y = Math.atan2(st, pt))) + break + case 'XZY': + ;(this._z = Math.asin(-clamp$5(at, -1, 1))), + Math.abs(at) < 0.9999999 + ? ((this._x = Math.atan2(dt, ct)), (this._y = Math.atan2(st, ot))) + : ((this._x = Math.atan2(-ut, pt)), (this._y = 0)) + break + default: + console.warn('THREE.Euler: .setFromRotationMatrix() encountered an unknown order: ' + nt) + } + return (this._order = nt), rt === !0 && this._onChangeCallback(), this + } + setFromQuaternion(et, nt, rt) { + return _matrix$1.makeRotationFromQuaternion(et), this.setFromRotationMatrix(_matrix$1, nt, rt) + } + setFromVector3(et, nt = this._order) { + return this.set(et.x, et.y, et.z, nt) + } + reorder(et) { + return _quaternion$3.setFromEuler(this), this.setFromQuaternion(_quaternion$3, et) + } + equals(et) { + return et._x === this._x && et._y === this._y && et._z === this._z && et._order === this._order + } + fromArray(et) { + return ( + (this._x = et[0]), + (this._y = et[1]), + (this._z = et[2]), + et[3] !== void 0 && (this._order = et[3]), + this._onChangeCallback(), + this + ) + } + toArray(et = [], nt = 0) { + return (et[nt] = this._x), (et[nt + 1] = this._y), (et[nt + 2] = this._z), (et[nt + 3] = this._order), et + } + _onChange(et) { + return (this._onChangeCallback = et), this + } + _onChangeCallback() {} + *[Symbol.iterator]() { + yield this._x, yield this._y, yield this._z, yield this._order + } + toVector3() { + console.error('THREE.Euler: .toVector3() has been removed. Use Vector3.setFromEuler() instead') + } + } + Euler.DefaultOrder = 'XYZ' + Euler.RotationOrders = ['XYZ', 'YZX', 'ZXY', 'XZY', 'YXZ', 'ZYX'] + class Layers { + constructor() { + this.mask = 1 + } + set(et) { + this.mask = ((1 << et) | 0) >>> 0 + } + enable(et) { + this.mask |= (1 << et) | 0 + } + enableAll() { + this.mask = -1 + } + toggle(et) { + this.mask ^= (1 << et) | 0 + } + disable(et) { + this.mask &= ~((1 << et) | 0) + } + disableAll() { + this.mask = 0 + } + test(et) { + return (this.mask & et.mask) !== 0 + } + isEnabled(et) { + return (this.mask & ((1 << et) | 0)) !== 0 + } + } + let _object3DId = 0 + const _v1$4 = new Vector3(), + _q1 = new Quaternion(), + _m1$1 = new Matrix4(), + _target = new Vector3(), + _position$3 = new Vector3(), + _scale$2 = new Vector3(), + _quaternion$2 = new Quaternion(), + _xAxis = new Vector3(1, 0, 0), + _yAxis = new Vector3(0, 1, 0), + _zAxis = new Vector3(0, 0, 1), + _addedEvent = { type: 'added' }, + _removedEvent = { type: 'removed' } + class Object3D extends EventDispatcher$1 { + constructor() { + super(), + (this.isObject3D = !0), + Object.defineProperty(this, 'id', { value: _object3DId++ }), + (this.uuid = generateUUID$1()), + (this.name = ''), + (this.type = 'Object3D'), + (this.parent = null), + (this.children = []), + (this.up = Object3D.DefaultUp.clone()) + const et = new Vector3(), + nt = new Euler(), + rt = new Quaternion(), + it = new Vector3(1, 1, 1) + function ot() { + rt.setFromEuler(nt, !1) + } + function at() { + nt.setFromQuaternion(rt, void 0, !1) + } + nt._onChange(ot), + rt._onChange(at), + Object.defineProperties(this, { + position: { configurable: !0, enumerable: !0, value: et }, + rotation: { configurable: !0, enumerable: !0, value: nt }, + quaternion: { configurable: !0, enumerable: !0, value: rt }, + scale: { configurable: !0, enumerable: !0, value: it }, + modelViewMatrix: { value: new Matrix4() }, + normalMatrix: { value: new Matrix3() }, + }), + (this.matrix = new Matrix4()), + (this.matrixWorld = new Matrix4()), + (this.matrixAutoUpdate = Object3D.DefaultMatrixAutoUpdate), + (this.matrixWorldNeedsUpdate = !1), + (this.layers = new Layers()), + (this.visible = !0), + (this.castShadow = !1), + (this.receiveShadow = !1), + (this.frustumCulled = !0), + (this.renderOrder = 0), + (this.animations = []), + (this.userData = {}) + } + onBeforeRender() {} + onAfterRender() {} + applyMatrix4(et) { + this.matrixAutoUpdate && this.updateMatrix(), + this.matrix.premultiply(et), + this.matrix.decompose(this.position, this.quaternion, this.scale) + } + applyQuaternion(et) { + return this.quaternion.premultiply(et), this + } + setRotationFromAxisAngle(et, nt) { + this.quaternion.setFromAxisAngle(et, nt) + } + setRotationFromEuler(et) { + this.quaternion.setFromEuler(et, !0) + } + setRotationFromMatrix(et) { + this.quaternion.setFromRotationMatrix(et) + } + setRotationFromQuaternion(et) { + this.quaternion.copy(et) + } + rotateOnAxis(et, nt) { + return _q1.setFromAxisAngle(et, nt), this.quaternion.multiply(_q1), this + } + rotateOnWorldAxis(et, nt) { + return _q1.setFromAxisAngle(et, nt), this.quaternion.premultiply(_q1), this + } + rotateX(et) { + return this.rotateOnAxis(_xAxis, et) + } + rotateY(et) { + return this.rotateOnAxis(_yAxis, et) + } + rotateZ(et) { + return this.rotateOnAxis(_zAxis, et) + } + translateOnAxis(et, nt) { + return _v1$4.copy(et).applyQuaternion(this.quaternion), this.position.add(_v1$4.multiplyScalar(nt)), this + } + translateX(et) { + return this.translateOnAxis(_xAxis, et) + } + translateY(et) { + return this.translateOnAxis(_yAxis, et) + } + translateZ(et) { + return this.translateOnAxis(_zAxis, et) + } + localToWorld(et) { + return et.applyMatrix4(this.matrixWorld) + } + worldToLocal(et) { + return et.applyMatrix4(_m1$1.copy(this.matrixWorld).invert()) + } + lookAt(et, nt, rt) { + et.isVector3 ? _target.copy(et) : _target.set(et, nt, rt) + const it = this.parent + this.updateWorldMatrix(!0, !1), + _position$3.setFromMatrixPosition(this.matrixWorld), + this.isCamera || this.isLight + ? _m1$1.lookAt(_position$3, _target, this.up) + : _m1$1.lookAt(_target, _position$3, this.up), + this.quaternion.setFromRotationMatrix(_m1$1), + it && + (_m1$1.extractRotation(it.matrixWorld), + _q1.setFromRotationMatrix(_m1$1), + this.quaternion.premultiply(_q1.invert())) + } + add(et) { + if (arguments.length > 1) { + for (let nt = 0; nt < arguments.length; nt++) this.add(arguments[nt]) + return this + } + return et === this + ? (console.error("THREE.Object3D.add: object can't be added as a child of itself.", et), this) + : (et && et.isObject3D + ? (et.parent !== null && et.parent.remove(et), + (et.parent = this), + this.children.push(et), + et.dispatchEvent(_addedEvent)) + : console.error('THREE.Object3D.add: object not an instance of THREE.Object3D.', et), + this) + } + remove(et) { + if (arguments.length > 1) { + for (let rt = 0; rt < arguments.length; rt++) this.remove(arguments[rt]) + return this + } + const nt = this.children.indexOf(et) + return nt !== -1 && ((et.parent = null), this.children.splice(nt, 1), et.dispatchEvent(_removedEvent)), this + } + removeFromParent() { + const et = this.parent + return et !== null && et.remove(this), this + } + clear() { + for (let et = 0; et < this.children.length; et++) { + const nt = this.children[et] + ;(nt.parent = null), nt.dispatchEvent(_removedEvent) + } + return (this.children.length = 0), this + } + attach(et) { + return ( + this.updateWorldMatrix(!0, !1), + _m1$1.copy(this.matrixWorld).invert(), + et.parent !== null && (et.parent.updateWorldMatrix(!0, !1), _m1$1.multiply(et.parent.matrixWorld)), + et.applyMatrix4(_m1$1), + this.add(et), + et.updateWorldMatrix(!1, !0), + this + ) + } + getObjectById(et) { + return this.getObjectByProperty('id', et) + } + getObjectByName(et) { + return this.getObjectByProperty('name', et) + } + getObjectByProperty(et, nt) { + if (this[et] === nt) return this + for (let rt = 0, it = this.children.length; rt < it; rt++) { + const at = this.children[rt].getObjectByProperty(et, nt) + if (at !== void 0) return at + } + } + getWorldPosition(et) { + return this.updateWorldMatrix(!0, !1), et.setFromMatrixPosition(this.matrixWorld) + } + getWorldQuaternion(et) { + return this.updateWorldMatrix(!0, !1), this.matrixWorld.decompose(_position$3, et, _scale$2), et + } + getWorldScale(et) { + return this.updateWorldMatrix(!0, !1), this.matrixWorld.decompose(_position$3, _quaternion$2, et), et + } + getWorldDirection(et) { + this.updateWorldMatrix(!0, !1) + const nt = this.matrixWorld.elements + return et.set(nt[8], nt[9], nt[10]).normalize() + } + raycast() {} + traverse(et) { + et(this) + const nt = this.children + for (let rt = 0, it = nt.length; rt < it; rt++) nt[rt].traverse(et) + } + traverseVisible(et) { + if (this.visible === !1) return + et(this) + const nt = this.children + for (let rt = 0, it = nt.length; rt < it; rt++) nt[rt].traverseVisible(et) + } + traverseAncestors(et) { + const nt = this.parent + nt !== null && (et(nt), nt.traverseAncestors(et)) + } + updateMatrix() { + this.matrix.compose(this.position, this.quaternion, this.scale), (this.matrixWorldNeedsUpdate = !0) + } + updateMatrixWorld(et) { + this.matrixAutoUpdate && this.updateMatrix(), + (this.matrixWorldNeedsUpdate || et) && + (this.parent === null + ? this.matrixWorld.copy(this.matrix) + : this.matrixWorld.multiplyMatrices(this.parent.matrixWorld, this.matrix), + (this.matrixWorldNeedsUpdate = !1), + (et = !0)) + const nt = this.children + for (let rt = 0, it = nt.length; rt < it; rt++) nt[rt].updateMatrixWorld(et) + } + updateWorldMatrix(et, nt) { + const rt = this.parent + if ( + (et === !0 && rt !== null && rt.updateWorldMatrix(!0, !1), + this.matrixAutoUpdate && this.updateMatrix(), + this.parent === null + ? this.matrixWorld.copy(this.matrix) + : this.matrixWorld.multiplyMatrices(this.parent.matrixWorld, this.matrix), + nt === !0) + ) { + const it = this.children + for (let ot = 0, at = it.length; ot < at; ot++) it[ot].updateWorldMatrix(!1, !0) + } + } + toJSON(et) { + const nt = et === void 0 || typeof et == 'string', + rt = {} + nt && + ((et = { + geometries: {}, + materials: {}, + textures: {}, + images: {}, + shapes: {}, + skeletons: {}, + animations: {}, + nodes: {}, + }), + (rt.metadata = { version: 4.5, type: 'Object', generator: 'Object3D.toJSON' })) + const it = {} + ;(it.uuid = this.uuid), + (it.type = this.type), + this.name !== '' && (it.name = this.name), + this.castShadow === !0 && (it.castShadow = !0), + this.receiveShadow === !0 && (it.receiveShadow = !0), + this.visible === !1 && (it.visible = !1), + this.frustumCulled === !1 && (it.frustumCulled = !1), + this.renderOrder !== 0 && (it.renderOrder = this.renderOrder), + JSON.stringify(this.userData) !== '{}' && (it.userData = this.userData), + (it.layers = this.layers.mask), + (it.matrix = this.matrix.toArray()), + this.matrixAutoUpdate === !1 && (it.matrixAutoUpdate = !1), + this.isInstancedMesh && + ((it.type = 'InstancedMesh'), + (it.count = this.count), + (it.instanceMatrix = this.instanceMatrix.toJSON()), + this.instanceColor !== null && (it.instanceColor = this.instanceColor.toJSON())) + function ot(st, lt) { + return st[lt.uuid] === void 0 && (st[lt.uuid] = lt.toJSON(et)), lt.uuid + } + if (this.isScene) + this.background && + (this.background.isColor + ? (it.background = this.background.toJSON()) + : this.background.isTexture && (it.background = this.background.toJSON(et).uuid)), + this.environment && + this.environment.isTexture && + this.environment.isRenderTargetTexture !== !0 && + (it.environment = this.environment.toJSON(et).uuid) + else if (this.isMesh || this.isLine || this.isPoints) { + it.geometry = ot(et.geometries, this.geometry) + const st = this.geometry.parameters + if (st !== void 0 && st.shapes !== void 0) { + const lt = st.shapes + if (Array.isArray(lt)) + for (let ct = 0, ut = lt.length; ct < ut; ct++) { + const ht = lt[ct] + ot(et.shapes, ht) + } + else ot(et.shapes, lt) + } + } + if ( + (this.isSkinnedMesh && + ((it.bindMode = this.bindMode), + (it.bindMatrix = this.bindMatrix.toArray()), + this.skeleton !== void 0 && (ot(et.skeletons, this.skeleton), (it.skeleton = this.skeleton.uuid))), + this.material !== void 0) + ) + if (Array.isArray(this.material)) { + const st = [] + for (let lt = 0, ct = this.material.length; lt < ct; lt++) st.push(ot(et.materials, this.material[lt])) + it.material = st + } else it.material = ot(et.materials, this.material) + if (this.children.length > 0) { + it.children = [] + for (let st = 0; st < this.children.length; st++) it.children.push(this.children[st].toJSON(et).object) + } + if (this.animations.length > 0) { + it.animations = [] + for (let st = 0; st < this.animations.length; st++) { + const lt = this.animations[st] + it.animations.push(ot(et.animations, lt)) + } + } + if (nt) { + const st = at(et.geometries), + lt = at(et.materials), + ct = at(et.textures), + ut = at(et.images), + ht = at(et.shapes), + dt = at(et.skeletons), + pt = at(et.animations), + mt = at(et.nodes) + st.length > 0 && (rt.geometries = st), + lt.length > 0 && (rt.materials = lt), + ct.length > 0 && (rt.textures = ct), + ut.length > 0 && (rt.images = ut), + ht.length > 0 && (rt.shapes = ht), + dt.length > 0 && (rt.skeletons = dt), + pt.length > 0 && (rt.animations = pt), + mt.length > 0 && (rt.nodes = mt) + } + return (rt.object = it), rt + function at(st) { + const lt = [] + for (const ct in st) { + const ut = st[ct] + delete ut.metadata, lt.push(ut) + } + return lt + } + } + clone(et) { + return new this.constructor().copy(this, et) + } + copy(et, nt = !0) { + if ( + ((this.name = et.name), + this.up.copy(et.up), + this.position.copy(et.position), + (this.rotation.order = et.rotation.order), + this.quaternion.copy(et.quaternion), + this.scale.copy(et.scale), + this.matrix.copy(et.matrix), + this.matrixWorld.copy(et.matrixWorld), + (this.matrixAutoUpdate = et.matrixAutoUpdate), + (this.matrixWorldNeedsUpdate = et.matrixWorldNeedsUpdate), + (this.layers.mask = et.layers.mask), + (this.visible = et.visible), + (this.castShadow = et.castShadow), + (this.receiveShadow = et.receiveShadow), + (this.frustumCulled = et.frustumCulled), + (this.renderOrder = et.renderOrder), + (this.userData = JSON.parse(JSON.stringify(et.userData))), + nt === !0) + ) + for (let rt = 0; rt < et.children.length; rt++) { + const it = et.children[rt] + this.add(it.clone()) + } + return this + } + } + Object3D.DefaultUp = new Vector3(0, 1, 0) + Object3D.DefaultMatrixAutoUpdate = !0 + const _v0$1 = new Vector3(), + _v1$3 = new Vector3(), + _v2$2 = new Vector3(), + _v3$1 = new Vector3(), + _vab = new Vector3(), + _vac = new Vector3(), + _vbc = new Vector3(), + _vap = new Vector3(), + _vbp = new Vector3(), + _vcp = new Vector3() + class Triangle { + constructor(et = new Vector3(), nt = new Vector3(), rt = new Vector3()) { + ;(this.a = et), (this.b = nt), (this.c = rt) + } + static getNormal(et, nt, rt, it) { + it.subVectors(rt, nt), _v0$1.subVectors(et, nt), it.cross(_v0$1) + const ot = it.lengthSq() + return ot > 0 ? it.multiplyScalar(1 / Math.sqrt(ot)) : it.set(0, 0, 0) + } + static getBarycoord(et, nt, rt, it, ot) { + _v0$1.subVectors(it, nt), _v1$3.subVectors(rt, nt), _v2$2.subVectors(et, nt) + const at = _v0$1.dot(_v0$1), + st = _v0$1.dot(_v1$3), + lt = _v0$1.dot(_v2$2), + ct = _v1$3.dot(_v1$3), + ut = _v1$3.dot(_v2$2), + ht = at * ct - st * st + if (ht === 0) return ot.set(-2, -1, -1) + const dt = 1 / ht, + pt = (ct * lt - st * ut) * dt, + mt = (at * ut - st * lt) * dt + return ot.set(1 - pt - mt, mt, pt) + } + static containsPoint(et, nt, rt, it) { + return this.getBarycoord(et, nt, rt, it, _v3$1), _v3$1.x >= 0 && _v3$1.y >= 0 && _v3$1.x + _v3$1.y <= 1 + } + static getUV(et, nt, rt, it, ot, at, st, lt) { + return ( + this.getBarycoord(et, nt, rt, it, _v3$1), + lt.set(0, 0), + lt.addScaledVector(ot, _v3$1.x), + lt.addScaledVector(at, _v3$1.y), + lt.addScaledVector(st, _v3$1.z), + lt + ) + } + static isFrontFacing(et, nt, rt, it) { + return _v0$1.subVectors(rt, nt), _v1$3.subVectors(et, nt), _v0$1.cross(_v1$3).dot(it) < 0 + } + set(et, nt, rt) { + return this.a.copy(et), this.b.copy(nt), this.c.copy(rt), this + } + setFromPointsAndIndices(et, nt, rt, it) { + return this.a.copy(et[nt]), this.b.copy(et[rt]), this.c.copy(et[it]), this + } + setFromAttributeAndIndices(et, nt, rt, it) { + return ( + this.a.fromBufferAttribute(et, nt), this.b.fromBufferAttribute(et, rt), this.c.fromBufferAttribute(et, it), this + ) + } + clone() { + return new this.constructor().copy(this) + } + copy(et) { + return this.a.copy(et.a), this.b.copy(et.b), this.c.copy(et.c), this + } + getArea() { + return _v0$1.subVectors(this.c, this.b), _v1$3.subVectors(this.a, this.b), _v0$1.cross(_v1$3).length() * 0.5 + } + getMidpoint(et) { + return et + .addVectors(this.a, this.b) + .add(this.c) + .multiplyScalar(1 / 3) + } + getNormal(et) { + return Triangle.getNormal(this.a, this.b, this.c, et) + } + getPlane(et) { + return et.setFromCoplanarPoints(this.a, this.b, this.c) + } + getBarycoord(et, nt) { + return Triangle.getBarycoord(et, this.a, this.b, this.c, nt) + } + getUV(et, nt, rt, it, ot) { + return Triangle.getUV(et, this.a, this.b, this.c, nt, rt, it, ot) + } + containsPoint(et) { + return Triangle.containsPoint(et, this.a, this.b, this.c) + } + isFrontFacing(et) { + return Triangle.isFrontFacing(this.a, this.b, this.c, et) + } + intersectsBox(et) { + return et.intersectsTriangle(this) + } + closestPointToPoint(et, nt) { + const rt = this.a, + it = this.b, + ot = this.c + let at, st + _vab.subVectors(it, rt), _vac.subVectors(ot, rt), _vap.subVectors(et, rt) + const lt = _vab.dot(_vap), + ct = _vac.dot(_vap) + if (lt <= 0 && ct <= 0) return nt.copy(rt) + _vbp.subVectors(et, it) + const ut = _vab.dot(_vbp), + ht = _vac.dot(_vbp) + if (ut >= 0 && ht <= ut) return nt.copy(it) + const dt = lt * ht - ut * ct + if (dt <= 0 && lt >= 0 && ut <= 0) return (at = lt / (lt - ut)), nt.copy(rt).addScaledVector(_vab, at) + _vcp.subVectors(et, ot) + const pt = _vab.dot(_vcp), + mt = _vac.dot(_vcp) + if (mt >= 0 && pt <= mt) return nt.copy(ot) + const gt = pt * ct - lt * mt + if (gt <= 0 && ct >= 0 && mt <= 0) return (st = ct / (ct - mt)), nt.copy(rt).addScaledVector(_vac, st) + const yt = ut * mt - pt * ht + if (yt <= 0 && ht - ut >= 0 && pt - mt >= 0) + return _vbc.subVectors(ot, it), (st = (ht - ut) / (ht - ut + (pt - mt))), nt.copy(it).addScaledVector(_vbc, st) + const bt = 1 / (yt + gt + dt) + return (at = gt * bt), (st = dt * bt), nt.copy(rt).addScaledVector(_vab, at).addScaledVector(_vac, st) + } + equals(et) { + return et.a.equals(this.a) && et.b.equals(this.b) && et.c.equals(this.c) + } + } + let materialId = 0 + class Material extends EventDispatcher$1 { + constructor() { + super(), + (this.isMaterial = !0), + Object.defineProperty(this, 'id', { value: materialId++ }), + (this.uuid = generateUUID$1()), + (this.name = ''), + (this.type = 'Material'), + (this.blending = NormalBlending), + (this.side = FrontSide), + (this.vertexColors = !1), + (this.opacity = 1), + (this.transparent = !1), + (this.blendSrc = SrcAlphaFactor), + (this.blendDst = OneMinusSrcAlphaFactor), + (this.blendEquation = AddEquation), + (this.blendSrcAlpha = null), + (this.blendDstAlpha = null), + (this.blendEquationAlpha = null), + (this.depthFunc = LessEqualDepth), + (this.depthTest = !0), + (this.depthWrite = !0), + (this.stencilWriteMask = 255), + (this.stencilFunc = AlwaysStencilFunc), + (this.stencilRef = 0), + (this.stencilFuncMask = 255), + (this.stencilFail = KeepStencilOp), + (this.stencilZFail = KeepStencilOp), + (this.stencilZPass = KeepStencilOp), + (this.stencilWrite = !1), + (this.clippingPlanes = null), + (this.clipIntersection = !1), + (this.clipShadows = !1), + (this.shadowSide = null), + (this.colorWrite = !0), + (this.precision = null), + (this.polygonOffset = !1), + (this.polygonOffsetFactor = 0), + (this.polygonOffsetUnits = 0), + (this.dithering = !1), + (this.alphaToCoverage = !1), + (this.premultipliedAlpha = !1), + (this.visible = !0), + (this.toneMapped = !0), + (this.userData = {}), + (this.version = 0), + (this._alphaTest = 0) + } + get alphaTest() { + return this._alphaTest + } + set alphaTest(et) { + this._alphaTest > 0 != et > 0 && this.version++, (this._alphaTest = et) + } + onBuild() {} + onBeforeRender() {} + onBeforeCompile() {} + customProgramCacheKey() { + return this.onBeforeCompile.toString() + } + setValues(et) { + if (et !== void 0) + for (const nt in et) { + const rt = et[nt] + if (rt === void 0) { + console.warn("THREE.Material: '" + nt + "' parameter is undefined.") + continue + } + if (nt === 'shading') { + console.warn('THREE.' + this.type + ': .shading has been removed. Use the boolean .flatShading instead.'), + (this.flatShading = rt === FlatShading) + continue + } + const it = this[nt] + if (it === void 0) { + console.warn('THREE.' + this.type + ": '" + nt + "' is not a property of this material.") + continue + } + it && it.isColor ? it.set(rt) : it && it.isVector3 && rt && rt.isVector3 ? it.copy(rt) : (this[nt] = rt) + } + } + toJSON(et) { + const nt = et === void 0 || typeof et == 'string' + nt && (et = { textures: {}, images: {} }) + const rt = { metadata: { version: 4.5, type: 'Material', generator: 'Material.toJSON' } } + ;(rt.uuid = this.uuid), + (rt.type = this.type), + this.name !== '' && (rt.name = this.name), + this.color && this.color.isColor && (rt.color = this.color.getHex()), + this.roughness !== void 0 && (rt.roughness = this.roughness), + this.metalness !== void 0 && (rt.metalness = this.metalness), + this.sheen !== void 0 && (rt.sheen = this.sheen), + this.sheenColor && this.sheenColor.isColor && (rt.sheenColor = this.sheenColor.getHex()), + this.sheenRoughness !== void 0 && (rt.sheenRoughness = this.sheenRoughness), + this.emissive && this.emissive.isColor && (rt.emissive = this.emissive.getHex()), + this.emissiveIntensity && this.emissiveIntensity !== 1 && (rt.emissiveIntensity = this.emissiveIntensity), + this.specular && this.specular.isColor && (rt.specular = this.specular.getHex()), + this.specularIntensity !== void 0 && (rt.specularIntensity = this.specularIntensity), + this.specularColor && this.specularColor.isColor && (rt.specularColor = this.specularColor.getHex()), + this.shininess !== void 0 && (rt.shininess = this.shininess), + this.clearcoat !== void 0 && (rt.clearcoat = this.clearcoat), + this.clearcoatRoughness !== void 0 && (rt.clearcoatRoughness = this.clearcoatRoughness), + this.clearcoatMap && this.clearcoatMap.isTexture && (rt.clearcoatMap = this.clearcoatMap.toJSON(et).uuid), + this.clearcoatRoughnessMap && + this.clearcoatRoughnessMap.isTexture && + (rt.clearcoatRoughnessMap = this.clearcoatRoughnessMap.toJSON(et).uuid), + this.clearcoatNormalMap && + this.clearcoatNormalMap.isTexture && + ((rt.clearcoatNormalMap = this.clearcoatNormalMap.toJSON(et).uuid), + (rt.clearcoatNormalScale = this.clearcoatNormalScale.toArray())), + this.iridescence !== void 0 && (rt.iridescence = this.iridescence), + this.iridescenceIOR !== void 0 && (rt.iridescenceIOR = this.iridescenceIOR), + this.iridescenceThicknessRange !== void 0 && (rt.iridescenceThicknessRange = this.iridescenceThicknessRange), + this.iridescenceMap && + this.iridescenceMap.isTexture && + (rt.iridescenceMap = this.iridescenceMap.toJSON(et).uuid), + this.iridescenceThicknessMap && + this.iridescenceThicknessMap.isTexture && + (rt.iridescenceThicknessMap = this.iridescenceThicknessMap.toJSON(et).uuid), + this.map && this.map.isTexture && (rt.map = this.map.toJSON(et).uuid), + this.matcap && this.matcap.isTexture && (rt.matcap = this.matcap.toJSON(et).uuid), + this.alphaMap && this.alphaMap.isTexture && (rt.alphaMap = this.alphaMap.toJSON(et).uuid), + this.lightMap && + this.lightMap.isTexture && + ((rt.lightMap = this.lightMap.toJSON(et).uuid), (rt.lightMapIntensity = this.lightMapIntensity)), + this.aoMap && + this.aoMap.isTexture && + ((rt.aoMap = this.aoMap.toJSON(et).uuid), (rt.aoMapIntensity = this.aoMapIntensity)), + this.bumpMap && + this.bumpMap.isTexture && + ((rt.bumpMap = this.bumpMap.toJSON(et).uuid), (rt.bumpScale = this.bumpScale)), + this.normalMap && + this.normalMap.isTexture && + ((rt.normalMap = this.normalMap.toJSON(et).uuid), + (rt.normalMapType = this.normalMapType), + (rt.normalScale = this.normalScale.toArray())), + this.displacementMap && + this.displacementMap.isTexture && + ((rt.displacementMap = this.displacementMap.toJSON(et).uuid), + (rt.displacementScale = this.displacementScale), + (rt.displacementBias = this.displacementBias)), + this.roughnessMap && this.roughnessMap.isTexture && (rt.roughnessMap = this.roughnessMap.toJSON(et).uuid), + this.metalnessMap && this.metalnessMap.isTexture && (rt.metalnessMap = this.metalnessMap.toJSON(et).uuid), + this.emissiveMap && this.emissiveMap.isTexture && (rt.emissiveMap = this.emissiveMap.toJSON(et).uuid), + this.specularMap && this.specularMap.isTexture && (rt.specularMap = this.specularMap.toJSON(et).uuid), + this.specularIntensityMap && + this.specularIntensityMap.isTexture && + (rt.specularIntensityMap = this.specularIntensityMap.toJSON(et).uuid), + this.specularColorMap && + this.specularColorMap.isTexture && + (rt.specularColorMap = this.specularColorMap.toJSON(et).uuid), + this.envMap && + this.envMap.isTexture && + ((rt.envMap = this.envMap.toJSON(et).uuid), this.combine !== void 0 && (rt.combine = this.combine)), + this.envMapIntensity !== void 0 && (rt.envMapIntensity = this.envMapIntensity), + this.reflectivity !== void 0 && (rt.reflectivity = this.reflectivity), + this.refractionRatio !== void 0 && (rt.refractionRatio = this.refractionRatio), + this.gradientMap && this.gradientMap.isTexture && (rt.gradientMap = this.gradientMap.toJSON(et).uuid), + this.transmission !== void 0 && (rt.transmission = this.transmission), + this.transmissionMap && + this.transmissionMap.isTexture && + (rt.transmissionMap = this.transmissionMap.toJSON(et).uuid), + this.thickness !== void 0 && (rt.thickness = this.thickness), + this.thicknessMap && this.thicknessMap.isTexture && (rt.thicknessMap = this.thicknessMap.toJSON(et).uuid), + this.attenuationDistance !== void 0 && (rt.attenuationDistance = this.attenuationDistance), + this.attenuationColor !== void 0 && (rt.attenuationColor = this.attenuationColor.getHex()), + this.size !== void 0 && (rt.size = this.size), + this.shadowSide !== null && (rt.shadowSide = this.shadowSide), + this.sizeAttenuation !== void 0 && (rt.sizeAttenuation = this.sizeAttenuation), + this.blending !== NormalBlending && (rt.blending = this.blending), + this.side !== FrontSide && (rt.side = this.side), + this.vertexColors && (rt.vertexColors = !0), + this.opacity < 1 && (rt.opacity = this.opacity), + this.transparent === !0 && (rt.transparent = this.transparent), + (rt.depthFunc = this.depthFunc), + (rt.depthTest = this.depthTest), + (rt.depthWrite = this.depthWrite), + (rt.colorWrite = this.colorWrite), + (rt.stencilWrite = this.stencilWrite), + (rt.stencilWriteMask = this.stencilWriteMask), + (rt.stencilFunc = this.stencilFunc), + (rt.stencilRef = this.stencilRef), + (rt.stencilFuncMask = this.stencilFuncMask), + (rt.stencilFail = this.stencilFail), + (rt.stencilZFail = this.stencilZFail), + (rt.stencilZPass = this.stencilZPass), + this.rotation !== void 0 && this.rotation !== 0 && (rt.rotation = this.rotation), + this.polygonOffset === !0 && (rt.polygonOffset = !0), + this.polygonOffsetFactor !== 0 && (rt.polygonOffsetFactor = this.polygonOffsetFactor), + this.polygonOffsetUnits !== 0 && (rt.polygonOffsetUnits = this.polygonOffsetUnits), + this.linewidth !== void 0 && this.linewidth !== 1 && (rt.linewidth = this.linewidth), + this.dashSize !== void 0 && (rt.dashSize = this.dashSize), + this.gapSize !== void 0 && (rt.gapSize = this.gapSize), + this.scale !== void 0 && (rt.scale = this.scale), + this.dithering === !0 && (rt.dithering = !0), + this.alphaTest > 0 && (rt.alphaTest = this.alphaTest), + this.alphaToCoverage === !0 && (rt.alphaToCoverage = this.alphaToCoverage), + this.premultipliedAlpha === !0 && (rt.premultipliedAlpha = this.premultipliedAlpha), + this.wireframe === !0 && (rt.wireframe = this.wireframe), + this.wireframeLinewidth > 1 && (rt.wireframeLinewidth = this.wireframeLinewidth), + this.wireframeLinecap !== 'round' && (rt.wireframeLinecap = this.wireframeLinecap), + this.wireframeLinejoin !== 'round' && (rt.wireframeLinejoin = this.wireframeLinejoin), + this.flatShading === !0 && (rt.flatShading = this.flatShading), + this.visible === !1 && (rt.visible = !1), + this.toneMapped === !1 && (rt.toneMapped = !1), + this.fog === !1 && (rt.fog = !1), + JSON.stringify(this.userData) !== '{}' && (rt.userData = this.userData) + function it(ot) { + const at = [] + for (const st in ot) { + const lt = ot[st] + delete lt.metadata, at.push(lt) + } + return at + } + if (nt) { + const ot = it(et.textures), + at = it(et.images) + ot.length > 0 && (rt.textures = ot), at.length > 0 && (rt.images = at) + } + return rt + } + clone() { + return new this.constructor().copy(this) + } + copy(et) { + ;(this.name = et.name), + (this.blending = et.blending), + (this.side = et.side), + (this.vertexColors = et.vertexColors), + (this.opacity = et.opacity), + (this.transparent = et.transparent), + (this.blendSrc = et.blendSrc), + (this.blendDst = et.blendDst), + (this.blendEquation = et.blendEquation), + (this.blendSrcAlpha = et.blendSrcAlpha), + (this.blendDstAlpha = et.blendDstAlpha), + (this.blendEquationAlpha = et.blendEquationAlpha), + (this.depthFunc = et.depthFunc), + (this.depthTest = et.depthTest), + (this.depthWrite = et.depthWrite), + (this.stencilWriteMask = et.stencilWriteMask), + (this.stencilFunc = et.stencilFunc), + (this.stencilRef = et.stencilRef), + (this.stencilFuncMask = et.stencilFuncMask), + (this.stencilFail = et.stencilFail), + (this.stencilZFail = et.stencilZFail), + (this.stencilZPass = et.stencilZPass), + (this.stencilWrite = et.stencilWrite) + const nt = et.clippingPlanes + let rt = null + if (nt !== null) { + const it = nt.length + rt = new Array(it) + for (let ot = 0; ot !== it; ++ot) rt[ot] = nt[ot].clone() + } + return ( + (this.clippingPlanes = rt), + (this.clipIntersection = et.clipIntersection), + (this.clipShadows = et.clipShadows), + (this.shadowSide = et.shadowSide), + (this.colorWrite = et.colorWrite), + (this.precision = et.precision), + (this.polygonOffset = et.polygonOffset), + (this.polygonOffsetFactor = et.polygonOffsetFactor), + (this.polygonOffsetUnits = et.polygonOffsetUnits), + (this.dithering = et.dithering), + (this.alphaTest = et.alphaTest), + (this.alphaToCoverage = et.alphaToCoverage), + (this.premultipliedAlpha = et.premultipliedAlpha), + (this.visible = et.visible), + (this.toneMapped = et.toneMapped), + (this.userData = JSON.parse(JSON.stringify(et.userData))), + this + ) + } + dispose() { + this.dispatchEvent({ type: 'dispose' }) + } + set needsUpdate(et) { + et === !0 && this.version++ + } + } + class MeshBasicMaterial extends Material { + constructor(et) { + super(), + (this.isMeshBasicMaterial = !0), + (this.type = 'MeshBasicMaterial'), + (this.color = new Color$1(16777215)), + (this.map = null), + (this.lightMap = null), + (this.lightMapIntensity = 1), + (this.aoMap = null), + (this.aoMapIntensity = 1), + (this.specularMap = null), + (this.alphaMap = null), + (this.envMap = null), + (this.combine = MultiplyOperation), + (this.reflectivity = 1), + (this.refractionRatio = 0.98), + (this.wireframe = !1), + (this.wireframeLinewidth = 1), + (this.wireframeLinecap = 'round'), + (this.wireframeLinejoin = 'round'), + (this.fog = !0), + this.setValues(et) + } + copy(et) { + return ( + super.copy(et), + this.color.copy(et.color), + (this.map = et.map), + (this.lightMap = et.lightMap), + (this.lightMapIntensity = et.lightMapIntensity), + (this.aoMap = et.aoMap), + (this.aoMapIntensity = et.aoMapIntensity), + (this.specularMap = et.specularMap), + (this.alphaMap = et.alphaMap), + (this.envMap = et.envMap), + (this.combine = et.combine), + (this.reflectivity = et.reflectivity), + (this.refractionRatio = et.refractionRatio), + (this.wireframe = et.wireframe), + (this.wireframeLinewidth = et.wireframeLinewidth), + (this.wireframeLinecap = et.wireframeLinecap), + (this.wireframeLinejoin = et.wireframeLinejoin), + (this.fog = et.fog), + this + ) + } + } + const _vector$9 = new Vector3(), + _vector2$1 = new Vector2() + class BufferAttribute { + constructor(et, nt, rt) { + if (Array.isArray(et)) throw new TypeError('THREE.BufferAttribute: array should be a Typed Array.') + ;(this.isBufferAttribute = !0), + (this.name = ''), + (this.array = et), + (this.itemSize = nt), + (this.count = et !== void 0 ? et.length / nt : 0), + (this.normalized = rt === !0), + (this.usage = StaticDrawUsage), + (this.updateRange = { offset: 0, count: -1 }), + (this.version = 0) + } + onUploadCallback() {} + set needsUpdate(et) { + et === !0 && this.version++ + } + setUsage(et) { + return (this.usage = et), this + } + copy(et) { + return ( + (this.name = et.name), + (this.array = new et.array.constructor(et.array)), + (this.itemSize = et.itemSize), + (this.count = et.count), + (this.normalized = et.normalized), + (this.usage = et.usage), + this + ) + } + copyAt(et, nt, rt) { + ;(et *= this.itemSize), (rt *= nt.itemSize) + for (let it = 0, ot = this.itemSize; it < ot; it++) this.array[et + it] = nt.array[rt + it] + return this + } + copyArray(et) { + return this.array.set(et), this + } + copyColorsArray(et) { + const nt = this.array + let rt = 0 + for (let it = 0, ot = et.length; it < ot; it++) { + let at = et[it] + at === void 0 && + (console.warn('THREE.BufferAttribute.copyColorsArray(): color is undefined', it), (at = new Color$1())), + (nt[rt++] = at.r), + (nt[rt++] = at.g), + (nt[rt++] = at.b) + } + return this + } + copyVector2sArray(et) { + const nt = this.array + let rt = 0 + for (let it = 0, ot = et.length; it < ot; it++) { + let at = et[it] + at === void 0 && + (console.warn('THREE.BufferAttribute.copyVector2sArray(): vector is undefined', it), (at = new Vector2())), + (nt[rt++] = at.x), + (nt[rt++] = at.y) + } + return this + } + copyVector3sArray(et) { + const nt = this.array + let rt = 0 + for (let it = 0, ot = et.length; it < ot; it++) { + let at = et[it] + at === void 0 && + (console.warn('THREE.BufferAttribute.copyVector3sArray(): vector is undefined', it), (at = new Vector3())), + (nt[rt++] = at.x), + (nt[rt++] = at.y), + (nt[rt++] = at.z) + } + return this + } + copyVector4sArray(et) { + const nt = this.array + let rt = 0 + for (let it = 0, ot = et.length; it < ot; it++) { + let at = et[it] + at === void 0 && + (console.warn('THREE.BufferAttribute.copyVector4sArray(): vector is undefined', it), (at = new Vector4())), + (nt[rt++] = at.x), + (nt[rt++] = at.y), + (nt[rt++] = at.z), + (nt[rt++] = at.w) + } + return this + } + applyMatrix3(et) { + if (this.itemSize === 2) + for (let nt = 0, rt = this.count; nt < rt; nt++) + _vector2$1.fromBufferAttribute(this, nt), + _vector2$1.applyMatrix3(et), + this.setXY(nt, _vector2$1.x, _vector2$1.y) + else if (this.itemSize === 3) + for (let nt = 0, rt = this.count; nt < rt; nt++) + _vector$9.fromBufferAttribute(this, nt), + _vector$9.applyMatrix3(et), + this.setXYZ(nt, _vector$9.x, _vector$9.y, _vector$9.z) + return this + } + applyMatrix4(et) { + for (let nt = 0, rt = this.count; nt < rt; nt++) + _vector$9.fromBufferAttribute(this, nt), + _vector$9.applyMatrix4(et), + this.setXYZ(nt, _vector$9.x, _vector$9.y, _vector$9.z) + return this + } + applyNormalMatrix(et) { + for (let nt = 0, rt = this.count; nt < rt; nt++) + _vector$9.fromBufferAttribute(this, nt), + _vector$9.applyNormalMatrix(et), + this.setXYZ(nt, _vector$9.x, _vector$9.y, _vector$9.z) + return this + } + transformDirection(et) { + for (let nt = 0, rt = this.count; nt < rt; nt++) + _vector$9.fromBufferAttribute(this, nt), + _vector$9.transformDirection(et), + this.setXYZ(nt, _vector$9.x, _vector$9.y, _vector$9.z) + return this + } + set(et, nt = 0) { + return this.array.set(et, nt), this + } + getX(et) { + return this.array[et * this.itemSize] + } + setX(et, nt) { + return (this.array[et * this.itemSize] = nt), this + } + getY(et) { + return this.array[et * this.itemSize + 1] + } + setY(et, nt) { + return (this.array[et * this.itemSize + 1] = nt), this + } + getZ(et) { + return this.array[et * this.itemSize + 2] + } + setZ(et, nt) { + return (this.array[et * this.itemSize + 2] = nt), this + } + getW(et) { + return this.array[et * this.itemSize + 3] + } + setW(et, nt) { + return (this.array[et * this.itemSize + 3] = nt), this + } + setXY(et, nt, rt) { + return (et *= this.itemSize), (this.array[et + 0] = nt), (this.array[et + 1] = rt), this + } + setXYZ(et, nt, rt, it) { + return ( + (et *= this.itemSize), (this.array[et + 0] = nt), (this.array[et + 1] = rt), (this.array[et + 2] = it), this + ) + } + setXYZW(et, nt, rt, it, ot) { + return ( + (et *= this.itemSize), + (this.array[et + 0] = nt), + (this.array[et + 1] = rt), + (this.array[et + 2] = it), + (this.array[et + 3] = ot), + this + ) + } + onUpload(et) { + return (this.onUploadCallback = et), this + } + clone() { + return new this.constructor(this.array, this.itemSize).copy(this) + } + toJSON() { + const et = { + itemSize: this.itemSize, + type: this.array.constructor.name, + array: Array.from(this.array), + normalized: this.normalized, + } + return ( + this.name !== '' && (et.name = this.name), + this.usage !== StaticDrawUsage && (et.usage = this.usage), + (this.updateRange.offset !== 0 || this.updateRange.count !== -1) && (et.updateRange = this.updateRange), + et + ) + } + } + class Int8BufferAttribute extends BufferAttribute { + constructor(et, nt, rt) { + super(new Int8Array(et), nt, rt) + } + } + class Uint8BufferAttribute extends BufferAttribute { + constructor(et, nt, rt) { + super(new Uint8Array(et), nt, rt) + } + } + class Uint8ClampedBufferAttribute extends BufferAttribute { + constructor(et, nt, rt) { + super(new Uint8ClampedArray(et), nt, rt) + } + } + class Int16BufferAttribute extends BufferAttribute { + constructor(et, nt, rt) { + super(new Int16Array(et), nt, rt) + } + } + class Uint16BufferAttribute extends BufferAttribute { + constructor(et, nt, rt) { + super(new Uint16Array(et), nt, rt) + } + } + class Int32BufferAttribute extends BufferAttribute { + constructor(et, nt, rt) { + super(new Int32Array(et), nt, rt) + } + } + class Uint32BufferAttribute extends BufferAttribute { + constructor(et, nt, rt) { + super(new Uint32Array(et), nt, rt) + } + } + class Float16BufferAttribute extends BufferAttribute { + constructor(et, nt, rt) { + super(new Uint16Array(et), nt, rt), (this.isFloat16BufferAttribute = !0) + } + } + class Float32BufferAttribute extends BufferAttribute { + constructor(et, nt, rt) { + super(new Float32Array(et), nt, rt) + } + } + class Float64BufferAttribute extends BufferAttribute { + constructor(et, nt, rt) { + super(new Float64Array(et), nt, rt) + } + } + let _id$1 = 0 + const _m1 = new Matrix4(), + _obj = new Object3D(), + _offset = new Vector3(), + _box$1$1 = new Box3(), + _boxMorphTargets = new Box3(), + _vector$8 = new Vector3() + class BufferGeometry extends EventDispatcher$1 { + constructor() { + super(), + (this.isBufferGeometry = !0), + Object.defineProperty(this, 'id', { value: _id$1++ }), + (this.uuid = generateUUID$1()), + (this.name = ''), + (this.type = 'BufferGeometry'), + (this.index = null), + (this.attributes = {}), + (this.morphAttributes = {}), + (this.morphTargetsRelative = !1), + (this.groups = []), + (this.boundingBox = null), + (this.boundingSphere = null), + (this.drawRange = { start: 0, count: 1 / 0 }), + (this.userData = {}) + } + getIndex() { + return this.index + } + setIndex(et) { + return ( + Array.isArray(et) + ? (this.index = new (arrayNeedsUint32(et) ? Uint32BufferAttribute : Uint16BufferAttribute)(et, 1)) + : (this.index = et), + this + ) + } + getAttribute(et) { + return this.attributes[et] + } + setAttribute(et, nt) { + return (this.attributes[et] = nt), this + } + deleteAttribute(et) { + return delete this.attributes[et], this + } + hasAttribute(et) { + return this.attributes[et] !== void 0 + } + addGroup(et, nt, rt = 0) { + this.groups.push({ start: et, count: nt, materialIndex: rt }) + } + clearGroups() { + this.groups = [] + } + setDrawRange(et, nt) { + ;(this.drawRange.start = et), (this.drawRange.count = nt) + } + applyMatrix4(et) { + const nt = this.attributes.position + nt !== void 0 && (nt.applyMatrix4(et), (nt.needsUpdate = !0)) + const rt = this.attributes.normal + if (rt !== void 0) { + const ot = new Matrix3().getNormalMatrix(et) + rt.applyNormalMatrix(ot), (rt.needsUpdate = !0) + } + const it = this.attributes.tangent + return ( + it !== void 0 && (it.transformDirection(et), (it.needsUpdate = !0)), + this.boundingBox !== null && this.computeBoundingBox(), + this.boundingSphere !== null && this.computeBoundingSphere(), + this + ) + } + applyQuaternion(et) { + return _m1.makeRotationFromQuaternion(et), this.applyMatrix4(_m1), this + } + rotateX(et) { + return _m1.makeRotationX(et), this.applyMatrix4(_m1), this + } + rotateY(et) { + return _m1.makeRotationY(et), this.applyMatrix4(_m1), this + } + rotateZ(et) { + return _m1.makeRotationZ(et), this.applyMatrix4(_m1), this + } + translate(et, nt, rt) { + return _m1.makeTranslation(et, nt, rt), this.applyMatrix4(_m1), this + } + scale(et, nt, rt) { + return _m1.makeScale(et, nt, rt), this.applyMatrix4(_m1), this + } + lookAt(et) { + return _obj.lookAt(et), _obj.updateMatrix(), this.applyMatrix4(_obj.matrix), this + } + center() { + return ( + this.computeBoundingBox(), + this.boundingBox.getCenter(_offset).negate(), + this.translate(_offset.x, _offset.y, _offset.z), + this + ) + } + setFromPoints(et) { + const nt = [] + for (let rt = 0, it = et.length; rt < it; rt++) { + const ot = et[rt] + nt.push(ot.x, ot.y, ot.z || 0) + } + return this.setAttribute('position', new Float32BufferAttribute(nt, 3)), this + } + computeBoundingBox() { + this.boundingBox === null && (this.boundingBox = new Box3()) + const et = this.attributes.position, + nt = this.morphAttributes.position + if (et && et.isGLBufferAttribute) { + console.error( + 'THREE.BufferGeometry.computeBoundingBox(): GLBufferAttribute requires a manual bounding box. Alternatively set "mesh.frustumCulled" to "false".', + this, + ), + this.boundingBox.set(new Vector3(-1 / 0, -1 / 0, -1 / 0), new Vector3(1 / 0, 1 / 0, 1 / 0)) + return + } + if (et !== void 0) { + if ((this.boundingBox.setFromBufferAttribute(et), nt)) + for (let rt = 0, it = nt.length; rt < it; rt++) { + const ot = nt[rt] + _box$1$1.setFromBufferAttribute(ot), + this.morphTargetsRelative + ? (_vector$8.addVectors(this.boundingBox.min, _box$1$1.min), + this.boundingBox.expandByPoint(_vector$8), + _vector$8.addVectors(this.boundingBox.max, _box$1$1.max), + this.boundingBox.expandByPoint(_vector$8)) + : (this.boundingBox.expandByPoint(_box$1$1.min), this.boundingBox.expandByPoint(_box$1$1.max)) + } + } else this.boundingBox.makeEmpty() + ;(isNaN(this.boundingBox.min.x) || isNaN(this.boundingBox.min.y) || isNaN(this.boundingBox.min.z)) && + console.error( + 'THREE.BufferGeometry.computeBoundingBox(): Computed min/max have NaN values. The "position" attribute is likely to have NaN values.', + this, + ) + } + computeBoundingSphere() { + this.boundingSphere === null && (this.boundingSphere = new Sphere()) + const et = this.attributes.position, + nt = this.morphAttributes.position + if (et && et.isGLBufferAttribute) { + console.error( + 'THREE.BufferGeometry.computeBoundingSphere(): GLBufferAttribute requires a manual bounding sphere. Alternatively set "mesh.frustumCulled" to "false".', + this, + ), + this.boundingSphere.set(new Vector3(), 1 / 0) + return + } + if (et) { + const rt = this.boundingSphere.center + if ((_box$1$1.setFromBufferAttribute(et), nt)) + for (let ot = 0, at = nt.length; ot < at; ot++) { + const st = nt[ot] + _boxMorphTargets.setFromBufferAttribute(st), + this.morphTargetsRelative + ? (_vector$8.addVectors(_box$1$1.min, _boxMorphTargets.min), + _box$1$1.expandByPoint(_vector$8), + _vector$8.addVectors(_box$1$1.max, _boxMorphTargets.max), + _box$1$1.expandByPoint(_vector$8)) + : (_box$1$1.expandByPoint(_boxMorphTargets.min), _box$1$1.expandByPoint(_boxMorphTargets.max)) + } + _box$1$1.getCenter(rt) + let it = 0 + for (let ot = 0, at = et.count; ot < at; ot++) + _vector$8.fromBufferAttribute(et, ot), (it = Math.max(it, rt.distanceToSquared(_vector$8))) + if (nt) + for (let ot = 0, at = nt.length; ot < at; ot++) { + const st = nt[ot], + lt = this.morphTargetsRelative + for (let ct = 0, ut = st.count; ct < ut; ct++) + _vector$8.fromBufferAttribute(st, ct), + lt && (_offset.fromBufferAttribute(et, ct), _vector$8.add(_offset)), + (it = Math.max(it, rt.distanceToSquared(_vector$8))) + } + ;(this.boundingSphere.radius = Math.sqrt(it)), + isNaN(this.boundingSphere.radius) && + console.error( + 'THREE.BufferGeometry.computeBoundingSphere(): Computed radius is NaN. The "position" attribute is likely to have NaN values.', + this, + ) + } + } + computeTangents() { + const et = this.index, + nt = this.attributes + if (et === null || nt.position === void 0 || nt.normal === void 0 || nt.uv === void 0) { + console.error( + 'THREE.BufferGeometry: .computeTangents() failed. Missing required attributes (index, position, normal or uv)', + ) + return + } + const rt = et.array, + it = nt.position.array, + ot = nt.normal.array, + at = nt.uv.array, + st = it.length / 3 + this.hasAttribute('tangent') === !1 && + this.setAttribute('tangent', new BufferAttribute(new Float32Array(4 * st), 4)) + const lt = this.getAttribute('tangent').array, + ct = [], + ut = [] + for (let Dt = 0; Dt < st; Dt++) (ct[Dt] = new Vector3()), (ut[Dt] = new Vector3()) + const ht = new Vector3(), + dt = new Vector3(), + pt = new Vector3(), + mt = new Vector2(), + gt = new Vector2(), + yt = new Vector2(), + bt = new Vector3(), + vt = new Vector3() + function xt(Dt, jt, Pt) { + ht.fromArray(it, Dt * 3), + dt.fromArray(it, jt * 3), + pt.fromArray(it, Pt * 3), + mt.fromArray(at, Dt * 2), + gt.fromArray(at, jt * 2), + yt.fromArray(at, Pt * 2), + dt.sub(ht), + pt.sub(ht), + gt.sub(mt), + yt.sub(mt) + const Ct = 1 / (gt.x * yt.y - yt.x * gt.y) + isFinite(Ct) && + (bt.copy(dt).multiplyScalar(yt.y).addScaledVector(pt, -gt.y).multiplyScalar(Ct), + vt.copy(pt).multiplyScalar(gt.x).addScaledVector(dt, -yt.x).multiplyScalar(Ct), + ct[Dt].add(bt), + ct[jt].add(bt), + ct[Pt].add(bt), + ut[Dt].add(vt), + ut[jt].add(vt), + ut[Pt].add(vt)) + } + let kt = this.groups + kt.length === 0 && (kt = [{ start: 0, count: rt.length }]) + for (let Dt = 0, jt = kt.length; Dt < jt; ++Dt) { + const Pt = kt[Dt], + Ct = Pt.start, + wt = Pt.count + for (let It = Ct, Ot = Ct + wt; It < Ot; It += 3) xt(rt[It + 0], rt[It + 1], rt[It + 2]) + } + const St = new Vector3(), + Tt = new Vector3(), + At = new Vector3(), + Et = new Vector3() + function $t(Dt) { + At.fromArray(ot, Dt * 3), Et.copy(At) + const jt = ct[Dt] + St.copy(jt), St.sub(At.multiplyScalar(At.dot(jt))).normalize(), Tt.crossVectors(Et, jt) + const Ct = Tt.dot(ut[Dt]) < 0 ? -1 : 1 + ;(lt[Dt * 4] = St.x), (lt[Dt * 4 + 1] = St.y), (lt[Dt * 4 + 2] = St.z), (lt[Dt * 4 + 3] = Ct) + } + for (let Dt = 0, jt = kt.length; Dt < jt; ++Dt) { + const Pt = kt[Dt], + Ct = Pt.start, + wt = Pt.count + for (let It = Ct, Ot = Ct + wt; It < Ot; It += 3) $t(rt[It + 0]), $t(rt[It + 1]), $t(rt[It + 2]) + } + } + computeVertexNormals() { + const et = this.index, + nt = this.getAttribute('position') + if (nt !== void 0) { + let rt = this.getAttribute('normal') + if (rt === void 0) + (rt = new BufferAttribute(new Float32Array(nt.count * 3), 3)), this.setAttribute('normal', rt) + else for (let dt = 0, pt = rt.count; dt < pt; dt++) rt.setXYZ(dt, 0, 0, 0) + const it = new Vector3(), + ot = new Vector3(), + at = new Vector3(), + st = new Vector3(), + lt = new Vector3(), + ct = new Vector3(), + ut = new Vector3(), + ht = new Vector3() + if (et) + for (let dt = 0, pt = et.count; dt < pt; dt += 3) { + const mt = et.getX(dt + 0), + gt = et.getX(dt + 1), + yt = et.getX(dt + 2) + it.fromBufferAttribute(nt, mt), + ot.fromBufferAttribute(nt, gt), + at.fromBufferAttribute(nt, yt), + ut.subVectors(at, ot), + ht.subVectors(it, ot), + ut.cross(ht), + st.fromBufferAttribute(rt, mt), + lt.fromBufferAttribute(rt, gt), + ct.fromBufferAttribute(rt, yt), + st.add(ut), + lt.add(ut), + ct.add(ut), + rt.setXYZ(mt, st.x, st.y, st.z), + rt.setXYZ(gt, lt.x, lt.y, lt.z), + rt.setXYZ(yt, ct.x, ct.y, ct.z) + } + else + for (let dt = 0, pt = nt.count; dt < pt; dt += 3) + it.fromBufferAttribute(nt, dt + 0), + ot.fromBufferAttribute(nt, dt + 1), + at.fromBufferAttribute(nt, dt + 2), + ut.subVectors(at, ot), + ht.subVectors(it, ot), + ut.cross(ht), + rt.setXYZ(dt + 0, ut.x, ut.y, ut.z), + rt.setXYZ(dt + 1, ut.x, ut.y, ut.z), + rt.setXYZ(dt + 2, ut.x, ut.y, ut.z) + this.normalizeNormals(), (rt.needsUpdate = !0) + } + } + merge(et, nt) { + if (!(et && et.isBufferGeometry)) { + console.error('THREE.BufferGeometry.merge(): geometry not an instance of THREE.BufferGeometry.', et) + return + } + nt === void 0 && + ((nt = 0), + console.warn( + 'THREE.BufferGeometry.merge(): Overwriting original geometry, starting at offset=0. Use BufferGeometryUtils.mergeBufferGeometries() for lossless merge.', + )) + const rt = this.attributes + for (const it in rt) { + if (et.attributes[it] === void 0) continue + const at = rt[it].array, + st = et.attributes[it], + lt = st.array, + ct = st.itemSize * nt, + ut = Math.min(lt.length, at.length - ct) + for (let ht = 0, dt = ct; ht < ut; ht++, dt++) at[dt] = lt[ht] + } + return this + } + normalizeNormals() { + const et = this.attributes.normal + for (let nt = 0, rt = et.count; nt < rt; nt++) + _vector$8.fromBufferAttribute(et, nt), + _vector$8.normalize(), + et.setXYZ(nt, _vector$8.x, _vector$8.y, _vector$8.z) + } + toNonIndexed() { + function et(st, lt) { + const ct = st.array, + ut = st.itemSize, + ht = st.normalized, + dt = new ct.constructor(lt.length * ut) + let pt = 0, + mt = 0 + for (let gt = 0, yt = lt.length; gt < yt; gt++) { + st.isInterleavedBufferAttribute ? (pt = lt[gt] * st.data.stride + st.offset) : (pt = lt[gt] * ut) + for (let bt = 0; bt < ut; bt++) dt[mt++] = ct[pt++] + } + return new BufferAttribute(dt, ut, ht) + } + if (this.index === null) + return console.warn('THREE.BufferGeometry.toNonIndexed(): BufferGeometry is already non-indexed.'), this + const nt = new BufferGeometry(), + rt = this.index.array, + it = this.attributes + for (const st in it) { + const lt = it[st], + ct = et(lt, rt) + nt.setAttribute(st, ct) + } + const ot = this.morphAttributes + for (const st in ot) { + const lt = [], + ct = ot[st] + for (let ut = 0, ht = ct.length; ut < ht; ut++) { + const dt = ct[ut], + pt = et(dt, rt) + lt.push(pt) + } + nt.morphAttributes[st] = lt + } + nt.morphTargetsRelative = this.morphTargetsRelative + const at = this.groups + for (let st = 0, lt = at.length; st < lt; st++) { + const ct = at[st] + nt.addGroup(ct.start, ct.count, ct.materialIndex) + } + return nt + } + toJSON() { + const et = { metadata: { version: 4.5, type: 'BufferGeometry', generator: 'BufferGeometry.toJSON' } } + if ( + ((et.uuid = this.uuid), + (et.type = this.type), + this.name !== '' && (et.name = this.name), + Object.keys(this.userData).length > 0 && (et.userData = this.userData), + this.parameters !== void 0) + ) { + const lt = this.parameters + for (const ct in lt) lt[ct] !== void 0 && (et[ct] = lt[ct]) + return et + } + et.data = { attributes: {} } + const nt = this.index + nt !== null && (et.data.index = { type: nt.array.constructor.name, array: Array.prototype.slice.call(nt.array) }) + const rt = this.attributes + for (const lt in rt) { + const ct = rt[lt] + et.data.attributes[lt] = ct.toJSON(et.data) + } + const it = {} + let ot = !1 + for (const lt in this.morphAttributes) { + const ct = this.morphAttributes[lt], + ut = [] + for (let ht = 0, dt = ct.length; ht < dt; ht++) { + const pt = ct[ht] + ut.push(pt.toJSON(et.data)) + } + ut.length > 0 && ((it[lt] = ut), (ot = !0)) + } + ot && ((et.data.morphAttributes = it), (et.data.morphTargetsRelative = this.morphTargetsRelative)) + const at = this.groups + at.length > 0 && (et.data.groups = JSON.parse(JSON.stringify(at))) + const st = this.boundingSphere + return st !== null && (et.data.boundingSphere = { center: st.center.toArray(), radius: st.radius }), et + } + clone() { + return new this.constructor().copy(this) + } + copy(et) { + ;(this.index = null), + (this.attributes = {}), + (this.morphAttributes = {}), + (this.groups = []), + (this.boundingBox = null), + (this.boundingSphere = null) + const nt = {} + this.name = et.name + const rt = et.index + rt !== null && this.setIndex(rt.clone(nt)) + const it = et.attributes + for (const ct in it) { + const ut = it[ct] + this.setAttribute(ct, ut.clone(nt)) + } + const ot = et.morphAttributes + for (const ct in ot) { + const ut = [], + ht = ot[ct] + for (let dt = 0, pt = ht.length; dt < pt; dt++) ut.push(ht[dt].clone(nt)) + this.morphAttributes[ct] = ut + } + this.morphTargetsRelative = et.morphTargetsRelative + const at = et.groups + for (let ct = 0, ut = at.length; ct < ut; ct++) { + const ht = at[ct] + this.addGroup(ht.start, ht.count, ht.materialIndex) + } + const st = et.boundingBox + st !== null && (this.boundingBox = st.clone()) + const lt = et.boundingSphere + return ( + lt !== null && (this.boundingSphere = lt.clone()), + (this.drawRange.start = et.drawRange.start), + (this.drawRange.count = et.drawRange.count), + (this.userData = et.userData), + et.parameters !== void 0 && (this.parameters = Object.assign({}, et.parameters)), + this + ) + } + dispose() { + this.dispatchEvent({ type: 'dispose' }) + } + } + const _inverseMatrix$2 = new Matrix4(), + _ray$2 = new Ray(), + _sphere$3 = new Sphere(), + _vA$1 = new Vector3(), + _vB$1 = new Vector3(), + _vC$1 = new Vector3(), + _tempA = new Vector3(), + _tempB = new Vector3(), + _tempC = new Vector3(), + _morphA = new Vector3(), + _morphB = new Vector3(), + _morphC = new Vector3(), + _uvA$1 = new Vector2(), + _uvB$1 = new Vector2(), + _uvC$1 = new Vector2(), + _intersectionPoint = new Vector3(), + _intersectionPointWorld = new Vector3() + class Mesh extends Object3D { + constructor(et = new BufferGeometry(), nt = new MeshBasicMaterial()) { + super(), + (this.isMesh = !0), + (this.type = 'Mesh'), + (this.geometry = et), + (this.material = nt), + this.updateMorphTargets() + } + copy(et, nt) { + return ( + super.copy(et, nt), + et.morphTargetInfluences !== void 0 && (this.morphTargetInfluences = et.morphTargetInfluences.slice()), + et.morphTargetDictionary !== void 0 && + (this.morphTargetDictionary = Object.assign({}, et.morphTargetDictionary)), + (this.material = et.material), + (this.geometry = et.geometry), + this + ) + } + updateMorphTargets() { + const nt = this.geometry.morphAttributes, + rt = Object.keys(nt) + if (rt.length > 0) { + const it = nt[rt[0]] + if (it !== void 0) { + ;(this.morphTargetInfluences = []), (this.morphTargetDictionary = {}) + for (let ot = 0, at = it.length; ot < at; ot++) { + const st = it[ot].name || String(ot) + this.morphTargetInfluences.push(0), (this.morphTargetDictionary[st] = ot) + } + } + } + } + raycast(et, nt) { + const rt = this.geometry, + it = this.material, + ot = this.matrixWorld + if ( + it === void 0 || + (rt.boundingSphere === null && rt.computeBoundingSphere(), + _sphere$3.copy(rt.boundingSphere), + _sphere$3.applyMatrix4(ot), + et.ray.intersectsSphere(_sphere$3) === !1) || + (_inverseMatrix$2.copy(ot).invert(), + _ray$2.copy(et.ray).applyMatrix4(_inverseMatrix$2), + rt.boundingBox !== null && _ray$2.intersectsBox(rt.boundingBox) === !1) + ) + return + let at + const st = rt.index, + lt = rt.attributes.position, + ct = rt.morphAttributes.position, + ut = rt.morphTargetsRelative, + ht = rt.attributes.uv, + dt = rt.attributes.uv2, + pt = rt.groups, + mt = rt.drawRange + if (st !== null) + if (Array.isArray(it)) + for (let gt = 0, yt = pt.length; gt < yt; gt++) { + const bt = pt[gt], + vt = it[bt.materialIndex], + xt = Math.max(bt.start, mt.start), + kt = Math.min(st.count, Math.min(bt.start + bt.count, mt.start + mt.count)) + for (let St = xt, Tt = kt; St < Tt; St += 3) { + const At = st.getX(St), + Et = st.getX(St + 1), + $t = st.getX(St + 2) + ;(at = checkBufferGeometryIntersection(this, vt, et, _ray$2, lt, ct, ut, ht, dt, At, Et, $t)), + at && ((at.faceIndex = Math.floor(St / 3)), (at.face.materialIndex = bt.materialIndex), nt.push(at)) + } + } + else { + const gt = Math.max(0, mt.start), + yt = Math.min(st.count, mt.start + mt.count) + for (let bt = gt, vt = yt; bt < vt; bt += 3) { + const xt = st.getX(bt), + kt = st.getX(bt + 1), + St = st.getX(bt + 2) + ;(at = checkBufferGeometryIntersection(this, it, et, _ray$2, lt, ct, ut, ht, dt, xt, kt, St)), + at && ((at.faceIndex = Math.floor(bt / 3)), nt.push(at)) + } + } + else if (lt !== void 0) + if (Array.isArray(it)) + for (let gt = 0, yt = pt.length; gt < yt; gt++) { + const bt = pt[gt], + vt = it[bt.materialIndex], + xt = Math.max(bt.start, mt.start), + kt = Math.min(lt.count, Math.min(bt.start + bt.count, mt.start + mt.count)) + for (let St = xt, Tt = kt; St < Tt; St += 3) { + const At = St, + Et = St + 1, + $t = St + 2 + ;(at = checkBufferGeometryIntersection(this, vt, et, _ray$2, lt, ct, ut, ht, dt, At, Et, $t)), + at && ((at.faceIndex = Math.floor(St / 3)), (at.face.materialIndex = bt.materialIndex), nt.push(at)) + } + } + else { + const gt = Math.max(0, mt.start), + yt = Math.min(lt.count, mt.start + mt.count) + for (let bt = gt, vt = yt; bt < vt; bt += 3) { + const xt = bt, + kt = bt + 1, + St = bt + 2 + ;(at = checkBufferGeometryIntersection(this, it, et, _ray$2, lt, ct, ut, ht, dt, xt, kt, St)), + at && ((at.faceIndex = Math.floor(bt / 3)), nt.push(at)) + } + } + } + } + function checkIntersection(tt, et, nt, rt, it, ot, at, st) { + let lt + if ( + (et.side === BackSide + ? (lt = rt.intersectTriangle(at, ot, it, !0, st)) + : (lt = rt.intersectTriangle(it, ot, at, et.side !== DoubleSide, st)), + lt === null) + ) + return null + _intersectionPointWorld.copy(st), _intersectionPointWorld.applyMatrix4(tt.matrixWorld) + const ct = nt.ray.origin.distanceTo(_intersectionPointWorld) + return ct < nt.near || ct > nt.far ? null : { distance: ct, point: _intersectionPointWorld.clone(), object: tt } + } + function checkBufferGeometryIntersection(tt, et, nt, rt, it, ot, at, st, lt, ct, ut, ht) { + _vA$1.fromBufferAttribute(it, ct), _vB$1.fromBufferAttribute(it, ut), _vC$1.fromBufferAttribute(it, ht) + const dt = tt.morphTargetInfluences + if (ot && dt) { + _morphA.set(0, 0, 0), _morphB.set(0, 0, 0), _morphC.set(0, 0, 0) + for (let mt = 0, gt = ot.length; mt < gt; mt++) { + const yt = dt[mt], + bt = ot[mt] + yt !== 0 && + (_tempA.fromBufferAttribute(bt, ct), + _tempB.fromBufferAttribute(bt, ut), + _tempC.fromBufferAttribute(bt, ht), + at + ? (_morphA.addScaledVector(_tempA, yt), + _morphB.addScaledVector(_tempB, yt), + _morphC.addScaledVector(_tempC, yt)) + : (_morphA.addScaledVector(_tempA.sub(_vA$1), yt), + _morphB.addScaledVector(_tempB.sub(_vB$1), yt), + _morphC.addScaledVector(_tempC.sub(_vC$1), yt))) + } + _vA$1.add(_morphA), _vB$1.add(_morphB), _vC$1.add(_morphC) + } + tt.isSkinnedMesh && (tt.boneTransform(ct, _vA$1), tt.boneTransform(ut, _vB$1), tt.boneTransform(ht, _vC$1)) + const pt = checkIntersection(tt, et, nt, rt, _vA$1, _vB$1, _vC$1, _intersectionPoint) + if (pt) { + st && + (_uvA$1.fromBufferAttribute(st, ct), + _uvB$1.fromBufferAttribute(st, ut), + _uvC$1.fromBufferAttribute(st, ht), + (pt.uv = Triangle.getUV(_intersectionPoint, _vA$1, _vB$1, _vC$1, _uvA$1, _uvB$1, _uvC$1, new Vector2()))), + lt && + (_uvA$1.fromBufferAttribute(lt, ct), + _uvB$1.fromBufferAttribute(lt, ut), + _uvC$1.fromBufferAttribute(lt, ht), + (pt.uv2 = Triangle.getUV(_intersectionPoint, _vA$1, _vB$1, _vC$1, _uvA$1, _uvB$1, _uvC$1, new Vector2()))) + const mt = { a: ct, b: ut, c: ht, normal: new Vector3(), materialIndex: 0 } + Triangle.getNormal(_vA$1, _vB$1, _vC$1, mt.normal), (pt.face = mt) + } + return pt + } + class BoxGeometry extends BufferGeometry { + constructor(et = 1, nt = 1, rt = 1, it = 1, ot = 1, at = 1) { + super(), + (this.type = 'BoxGeometry'), + (this.parameters = { + width: et, + height: nt, + depth: rt, + widthSegments: it, + heightSegments: ot, + depthSegments: at, + }) + const st = this + ;(it = Math.floor(it)), (ot = Math.floor(ot)), (at = Math.floor(at)) + const lt = [], + ct = [], + ut = [], + ht = [] + let dt = 0, + pt = 0 + mt('z', 'y', 'x', -1, -1, rt, nt, et, at, ot, 0), + mt('z', 'y', 'x', 1, -1, rt, nt, -et, at, ot, 1), + mt('x', 'z', 'y', 1, 1, et, rt, nt, it, at, 2), + mt('x', 'z', 'y', 1, -1, et, rt, -nt, it, at, 3), + mt('x', 'y', 'z', 1, -1, et, nt, rt, it, ot, 4), + mt('x', 'y', 'z', -1, -1, et, nt, -rt, it, ot, 5), + this.setIndex(lt), + this.setAttribute('position', new Float32BufferAttribute(ct, 3)), + this.setAttribute('normal', new Float32BufferAttribute(ut, 3)), + this.setAttribute('uv', new Float32BufferAttribute(ht, 2)) + function mt(gt, yt, bt, vt, xt, kt, St, Tt, At, Et, $t) { + const Dt = kt / At, + jt = St / Et, + Pt = kt / 2, + Ct = St / 2, + wt = Tt / 2, + It = At + 1, + Ot = Et + 1 + let Wt = 0, + zt = 0 + const Ft = new Vector3() + for (let Nt = 0; Nt < Ot; Nt++) { + const Ut = Nt * jt - Ct + for (let Mt = 0; Mt < It; Mt++) { + const Ht = Mt * Dt - Pt + ;(Ft[gt] = Ht * vt), + (Ft[yt] = Ut * xt), + (Ft[bt] = wt), + ct.push(Ft.x, Ft.y, Ft.z), + (Ft[gt] = 0), + (Ft[yt] = 0), + (Ft[bt] = Tt > 0 ? 1 : -1), + ut.push(Ft.x, Ft.y, Ft.z), + ht.push(Mt / At), + ht.push(1 - Nt / Et), + (Wt += 1) + } + } + for (let Nt = 0; Nt < Et; Nt++) + for (let Ut = 0; Ut < At; Ut++) { + const Mt = dt + Ut + It * Nt, + Ht = dt + Ut + It * (Nt + 1), + en = dt + (Ut + 1) + It * (Nt + 1), + sn = dt + (Ut + 1) + It * Nt + lt.push(Mt, Ht, sn), lt.push(Ht, en, sn), (zt += 6) + } + st.addGroup(pt, zt, $t), (pt += zt), (dt += Wt) + } + } + static fromJSON(et) { + return new BoxGeometry(et.width, et.height, et.depth, et.widthSegments, et.heightSegments, et.depthSegments) + } + } + function cloneUniforms(tt) { + const et = {} + for (const nt in tt) { + et[nt] = {} + for (const rt in tt[nt]) { + const it = tt[nt][rt] + it && + (it.isColor || + it.isMatrix3 || + it.isMatrix4 || + it.isVector2 || + it.isVector3 || + it.isVector4 || + it.isTexture || + it.isQuaternion) + ? (et[nt][rt] = it.clone()) + : Array.isArray(it) + ? (et[nt][rt] = it.slice()) + : (et[nt][rt] = it) + } + } + return et + } + function mergeUniforms(tt) { + const et = {} + for (let nt = 0; nt < tt.length; nt++) { + const rt = cloneUniforms(tt[nt]) + for (const it in rt) et[it] = rt[it] + } + return et + } + function cloneUniformsGroups(tt) { + const et = [] + for (let nt = 0; nt < tt.length; nt++) et.push(tt[nt].clone()) + return et + } + const UniformsUtils = { clone: cloneUniforms, merge: mergeUniforms } + var default_vertex = `void main() { + gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 ); +}`, + default_fragment = `void main() { + gl_FragColor = vec4( 1.0, 0.0, 0.0, 1.0 ); +}` + class ShaderMaterial extends Material { + constructor(et) { + super(), + (this.isShaderMaterial = !0), + (this.type = 'ShaderMaterial'), + (this.defines = {}), + (this.uniforms = {}), + (this.uniformsGroups = []), + (this.vertexShader = default_vertex), + (this.fragmentShader = default_fragment), + (this.linewidth = 1), + (this.wireframe = !1), + (this.wireframeLinewidth = 1), + (this.fog = !1), + (this.lights = !1), + (this.clipping = !1), + (this.extensions = { derivatives: !1, fragDepth: !1, drawBuffers: !1, shaderTextureLOD: !1 }), + (this.defaultAttributeValues = { color: [1, 1, 1], uv: [0, 0], uv2: [0, 0] }), + (this.index0AttributeName = void 0), + (this.uniformsNeedUpdate = !1), + (this.glslVersion = null), + et !== void 0 && + (et.attributes !== void 0 && + console.error('THREE.ShaderMaterial: attributes should now be defined in THREE.BufferGeometry instead.'), + this.setValues(et)) + } + copy(et) { + return ( + super.copy(et), + (this.fragmentShader = et.fragmentShader), + (this.vertexShader = et.vertexShader), + (this.uniforms = cloneUniforms(et.uniforms)), + (this.uniformsGroups = cloneUniformsGroups(et.uniformsGroups)), + (this.defines = Object.assign({}, et.defines)), + (this.wireframe = et.wireframe), + (this.wireframeLinewidth = et.wireframeLinewidth), + (this.fog = et.fog), + (this.lights = et.lights), + (this.clipping = et.clipping), + (this.extensions = Object.assign({}, et.extensions)), + (this.glslVersion = et.glslVersion), + this + ) + } + toJSON(et) { + const nt = super.toJSON(et) + ;(nt.glslVersion = this.glslVersion), (nt.uniforms = {}) + for (const it in this.uniforms) { + const at = this.uniforms[it].value + at && at.isTexture + ? (nt.uniforms[it] = { type: 't', value: at.toJSON(et).uuid }) + : at && at.isColor + ? (nt.uniforms[it] = { type: 'c', value: at.getHex() }) + : at && at.isVector2 + ? (nt.uniforms[it] = { type: 'v2', value: at.toArray() }) + : at && at.isVector3 + ? (nt.uniforms[it] = { type: 'v3', value: at.toArray() }) + : at && at.isVector4 + ? (nt.uniforms[it] = { type: 'v4', value: at.toArray() }) + : at && at.isMatrix3 + ? (nt.uniforms[it] = { type: 'm3', value: at.toArray() }) + : at && at.isMatrix4 + ? (nt.uniforms[it] = { type: 'm4', value: at.toArray() }) + : (nt.uniforms[it] = { value: at }) + } + Object.keys(this.defines).length > 0 && (nt.defines = this.defines), + (nt.vertexShader = this.vertexShader), + (nt.fragmentShader = this.fragmentShader) + const rt = {} + for (const it in this.extensions) this.extensions[it] === !0 && (rt[it] = !0) + return Object.keys(rt).length > 0 && (nt.extensions = rt), nt + } + } + class Camera extends Object3D { + constructor() { + super(), + (this.isCamera = !0), + (this.type = 'Camera'), + (this.matrixWorldInverse = new Matrix4()), + (this.projectionMatrix = new Matrix4()), + (this.projectionMatrixInverse = new Matrix4()) + } + copy(et, nt) { + return ( + super.copy(et, nt), + this.matrixWorldInverse.copy(et.matrixWorldInverse), + this.projectionMatrix.copy(et.projectionMatrix), + this.projectionMatrixInverse.copy(et.projectionMatrixInverse), + this + ) + } + getWorldDirection(et) { + this.updateWorldMatrix(!0, !1) + const nt = this.matrixWorld.elements + return et.set(-nt[8], -nt[9], -nt[10]).normalize() + } + updateMatrixWorld(et) { + super.updateMatrixWorld(et), this.matrixWorldInverse.copy(this.matrixWorld).invert() + } + updateWorldMatrix(et, nt) { + super.updateWorldMatrix(et, nt), this.matrixWorldInverse.copy(this.matrixWorld).invert() + } + clone() { + return new this.constructor().copy(this) + } + } + class PerspectiveCamera extends Camera { + constructor(et = 50, nt = 1, rt = 0.1, it = 2e3) { + super(), + (this.isPerspectiveCamera = !0), + (this.type = 'PerspectiveCamera'), + (this.fov = et), + (this.zoom = 1), + (this.near = rt), + (this.far = it), + (this.focus = 10), + (this.aspect = nt), + (this.view = null), + (this.filmGauge = 35), + (this.filmOffset = 0), + this.updateProjectionMatrix() + } + copy(et, nt) { + return ( + super.copy(et, nt), + (this.fov = et.fov), + (this.zoom = et.zoom), + (this.near = et.near), + (this.far = et.far), + (this.focus = et.focus), + (this.aspect = et.aspect), + (this.view = et.view === null ? null : Object.assign({}, et.view)), + (this.filmGauge = et.filmGauge), + (this.filmOffset = et.filmOffset), + this + ) + } + setFocalLength(et) { + const nt = (0.5 * this.getFilmHeight()) / et + ;(this.fov = RAD2DEG * 2 * Math.atan(nt)), this.updateProjectionMatrix() + } + getFocalLength() { + const et = Math.tan(DEG2RAD$1 * 0.5 * this.fov) + return (0.5 * this.getFilmHeight()) / et + } + getEffectiveFOV() { + return RAD2DEG * 2 * Math.atan(Math.tan(DEG2RAD$1 * 0.5 * this.fov) / this.zoom) + } + getFilmWidth() { + return this.filmGauge * Math.min(this.aspect, 1) + } + getFilmHeight() { + return this.filmGauge / Math.max(this.aspect, 1) + } + setViewOffset(et, nt, rt, it, ot, at) { + ;(this.aspect = et / nt), + this.view === null && + (this.view = { enabled: !0, fullWidth: 1, fullHeight: 1, offsetX: 0, offsetY: 0, width: 1, height: 1 }), + (this.view.enabled = !0), + (this.view.fullWidth = et), + (this.view.fullHeight = nt), + (this.view.offsetX = rt), + (this.view.offsetY = it), + (this.view.width = ot), + (this.view.height = at), + this.updateProjectionMatrix() + } + clearViewOffset() { + this.view !== null && (this.view.enabled = !1), this.updateProjectionMatrix() + } + updateProjectionMatrix() { + const et = this.near + let nt = (et * Math.tan(DEG2RAD$1 * 0.5 * this.fov)) / this.zoom, + rt = 2 * nt, + it = this.aspect * rt, + ot = -0.5 * it + const at = this.view + if (this.view !== null && this.view.enabled) { + const lt = at.fullWidth, + ct = at.fullHeight + ;(ot += (at.offsetX * it) / lt), (nt -= (at.offsetY * rt) / ct), (it *= at.width / lt), (rt *= at.height / ct) + } + const st = this.filmOffset + st !== 0 && (ot += (et * st) / this.getFilmWidth()), + this.projectionMatrix.makePerspective(ot, ot + it, nt, nt - rt, et, this.far), + this.projectionMatrixInverse.copy(this.projectionMatrix).invert() + } + toJSON(et) { + const nt = super.toJSON(et) + return ( + (nt.object.fov = this.fov), + (nt.object.zoom = this.zoom), + (nt.object.near = this.near), + (nt.object.far = this.far), + (nt.object.focus = this.focus), + (nt.object.aspect = this.aspect), + this.view !== null && (nt.object.view = Object.assign({}, this.view)), + (nt.object.filmGauge = this.filmGauge), + (nt.object.filmOffset = this.filmOffset), + nt + ) + } + } + const fov = 90, + aspect = 1 + class CubeCamera extends Object3D { + constructor(et, nt, rt) { + if ((super(), (this.type = 'CubeCamera'), rt.isWebGLCubeRenderTarget !== !0)) { + console.error( + 'THREE.CubeCamera: The constructor now expects an instance of WebGLCubeRenderTarget as third parameter.', + ) + return + } + this.renderTarget = rt + const it = new PerspectiveCamera(fov, aspect, et, nt) + ;(it.layers = this.layers), it.up.set(0, -1, 0), it.lookAt(new Vector3(1, 0, 0)), this.add(it) + const ot = new PerspectiveCamera(fov, aspect, et, nt) + ;(ot.layers = this.layers), ot.up.set(0, -1, 0), ot.lookAt(new Vector3(-1, 0, 0)), this.add(ot) + const at = new PerspectiveCamera(fov, aspect, et, nt) + ;(at.layers = this.layers), at.up.set(0, 0, 1), at.lookAt(new Vector3(0, 1, 0)), this.add(at) + const st = new PerspectiveCamera(fov, aspect, et, nt) + ;(st.layers = this.layers), st.up.set(0, 0, -1), st.lookAt(new Vector3(0, -1, 0)), this.add(st) + const lt = new PerspectiveCamera(fov, aspect, et, nt) + ;(lt.layers = this.layers), lt.up.set(0, -1, 0), lt.lookAt(new Vector3(0, 0, 1)), this.add(lt) + const ct = new PerspectiveCamera(fov, aspect, et, nt) + ;(ct.layers = this.layers), ct.up.set(0, -1, 0), ct.lookAt(new Vector3(0, 0, -1)), this.add(ct) + } + update(et, nt) { + this.parent === null && this.updateMatrixWorld() + const rt = this.renderTarget, + [it, ot, at, st, lt, ct] = this.children, + ut = et.getRenderTarget(), + ht = et.toneMapping, + dt = et.xr.enabled + ;(et.toneMapping = NoToneMapping), (et.xr.enabled = !1) + const pt = rt.texture.generateMipmaps + ;(rt.texture.generateMipmaps = !1), + et.setRenderTarget(rt, 0), + et.render(nt, it), + et.setRenderTarget(rt, 1), + et.render(nt, ot), + et.setRenderTarget(rt, 2), + et.render(nt, at), + et.setRenderTarget(rt, 3), + et.render(nt, st), + et.setRenderTarget(rt, 4), + et.render(nt, lt), + (rt.texture.generateMipmaps = pt), + et.setRenderTarget(rt, 5), + et.render(nt, ct), + et.setRenderTarget(ut), + (et.toneMapping = ht), + (et.xr.enabled = dt), + (rt.texture.needsPMREMUpdate = !0) + } + } + class CubeTexture extends Texture { + constructor(et, nt, rt, it, ot, at, st, lt, ct, ut) { + ;(et = et !== void 0 ? et : []), + (nt = nt !== void 0 ? nt : CubeReflectionMapping), + super(et, nt, rt, it, ot, at, st, lt, ct, ut), + (this.isCubeTexture = !0), + (this.flipY = !1) + } + get images() { + return this.image + } + set images(et) { + this.image = et + } + } + class WebGLCubeRenderTarget extends WebGLRenderTarget { + constructor(et, nt = {}) { + super(et, et, nt), (this.isWebGLCubeRenderTarget = !0) + const rt = { width: et, height: et, depth: 1 }, + it = [rt, rt, rt, rt, rt, rt] + ;(this.texture = new CubeTexture( + it, + nt.mapping, + nt.wrapS, + nt.wrapT, + nt.magFilter, + nt.minFilter, + nt.format, + nt.type, + nt.anisotropy, + nt.encoding, + )), + (this.texture.isRenderTargetTexture = !0), + (this.texture.generateMipmaps = nt.generateMipmaps !== void 0 ? nt.generateMipmaps : !1), + (this.texture.minFilter = nt.minFilter !== void 0 ? nt.minFilter : LinearFilter) + } + fromEquirectangularTexture(et, nt) { + ;(this.texture.type = nt.type), + (this.texture.encoding = nt.encoding), + (this.texture.generateMipmaps = nt.generateMipmaps), + (this.texture.minFilter = nt.minFilter), + (this.texture.magFilter = nt.magFilter) + const rt = { + uniforms: { tEquirect: { value: null } }, + vertexShader: ` + + varying vec3 vWorldDirection; + + vec3 transformDirection( in vec3 dir, in mat4 matrix ) { + + return normalize( ( matrix * vec4( dir, 0.0 ) ).xyz ); + + } + + void main() { + + vWorldDirection = transformDirection( position, modelMatrix ); + + #include + #include + + } + `, + fragmentShader: ` + + uniform sampler2D tEquirect; + + varying vec3 vWorldDirection; + + #include + + void main() { + + vec3 direction = normalize( vWorldDirection ); + + vec2 sampleUV = equirectUv( direction ); + + gl_FragColor = texture2D( tEquirect, sampleUV ); + + } + `, + }, + it = new BoxGeometry(5, 5, 5), + ot = new ShaderMaterial({ + name: 'CubemapFromEquirect', + uniforms: cloneUniforms(rt.uniforms), + vertexShader: rt.vertexShader, + fragmentShader: rt.fragmentShader, + side: BackSide, + blending: NoBlending, + }) + ot.uniforms.tEquirect.value = nt + const at = new Mesh(it, ot), + st = nt.minFilter + return ( + nt.minFilter === LinearMipmapLinearFilter && (nt.minFilter = LinearFilter), + new CubeCamera(1, 10, this).update(et, at), + (nt.minFilter = st), + at.geometry.dispose(), + at.material.dispose(), + this + ) + } + clear(et, nt, rt, it) { + const ot = et.getRenderTarget() + for (let at = 0; at < 6; at++) et.setRenderTarget(this, at), et.clear(nt, rt, it) + et.setRenderTarget(ot) + } + } + const _vector1 = new Vector3(), + _vector2 = new Vector3(), + _normalMatrix = new Matrix3() + class Plane { + constructor(et = new Vector3(1, 0, 0), nt = 0) { + ;(this.isPlane = !0), (this.normal = et), (this.constant = nt) + } + set(et, nt) { + return this.normal.copy(et), (this.constant = nt), this + } + setComponents(et, nt, rt, it) { + return this.normal.set(et, nt, rt), (this.constant = it), this + } + setFromNormalAndCoplanarPoint(et, nt) { + return this.normal.copy(et), (this.constant = -nt.dot(this.normal)), this + } + setFromCoplanarPoints(et, nt, rt) { + const it = _vector1.subVectors(rt, nt).cross(_vector2.subVectors(et, nt)).normalize() + return this.setFromNormalAndCoplanarPoint(it, et), this + } + copy(et) { + return this.normal.copy(et.normal), (this.constant = et.constant), this + } + normalize() { + const et = 1 / this.normal.length() + return this.normal.multiplyScalar(et), (this.constant *= et), this + } + negate() { + return (this.constant *= -1), this.normal.negate(), this + } + distanceToPoint(et) { + return this.normal.dot(et) + this.constant + } + distanceToSphere(et) { + return this.distanceToPoint(et.center) - et.radius + } + projectPoint(et, nt) { + return nt.copy(this.normal).multiplyScalar(-this.distanceToPoint(et)).add(et) + } + intersectLine(et, nt) { + const rt = et.delta(_vector1), + it = this.normal.dot(rt) + if (it === 0) return this.distanceToPoint(et.start) === 0 ? nt.copy(et.start) : null + const ot = -(et.start.dot(this.normal) + this.constant) / it + return ot < 0 || ot > 1 ? null : nt.copy(rt).multiplyScalar(ot).add(et.start) + } + intersectsLine(et) { + const nt = this.distanceToPoint(et.start), + rt = this.distanceToPoint(et.end) + return (nt < 0 && rt > 0) || (rt < 0 && nt > 0) + } + intersectsBox(et) { + return et.intersectsPlane(this) + } + intersectsSphere(et) { + return et.intersectsPlane(this) + } + coplanarPoint(et) { + return et.copy(this.normal).multiplyScalar(-this.constant) + } + applyMatrix4(et, nt) { + const rt = nt || _normalMatrix.getNormalMatrix(et), + it = this.coplanarPoint(_vector1).applyMatrix4(et), + ot = this.normal.applyMatrix3(rt).normalize() + return (this.constant = -it.dot(ot)), this + } + translate(et) { + return (this.constant -= et.dot(this.normal)), this + } + equals(et) { + return et.normal.equals(this.normal) && et.constant === this.constant + } + clone() { + return new this.constructor().copy(this) + } + } + const _sphere$2 = new Sphere(), + _vector$7 = new Vector3() + class Frustum { + constructor( + et = new Plane(), + nt = new Plane(), + rt = new Plane(), + it = new Plane(), + ot = new Plane(), + at = new Plane(), + ) { + this.planes = [et, nt, rt, it, ot, at] + } + set(et, nt, rt, it, ot, at) { + const st = this.planes + return st[0].copy(et), st[1].copy(nt), st[2].copy(rt), st[3].copy(it), st[4].copy(ot), st[5].copy(at), this + } + copy(et) { + const nt = this.planes + for (let rt = 0; rt < 6; rt++) nt[rt].copy(et.planes[rt]) + return this + } + setFromProjectionMatrix(et) { + const nt = this.planes, + rt = et.elements, + it = rt[0], + ot = rt[1], + at = rt[2], + st = rt[3], + lt = rt[4], + ct = rt[5], + ut = rt[6], + ht = rt[7], + dt = rt[8], + pt = rt[9], + mt = rt[10], + gt = rt[11], + yt = rt[12], + bt = rt[13], + vt = rt[14], + xt = rt[15] + return ( + nt[0].setComponents(st - it, ht - lt, gt - dt, xt - yt).normalize(), + nt[1].setComponents(st + it, ht + lt, gt + dt, xt + yt).normalize(), + nt[2].setComponents(st + ot, ht + ct, gt + pt, xt + bt).normalize(), + nt[3].setComponents(st - ot, ht - ct, gt - pt, xt - bt).normalize(), + nt[4].setComponents(st - at, ht - ut, gt - mt, xt - vt).normalize(), + nt[5].setComponents(st + at, ht + ut, gt + mt, xt + vt).normalize(), + this + ) + } + intersectsObject(et) { + const nt = et.geometry + return ( + nt.boundingSphere === null && nt.computeBoundingSphere(), + _sphere$2.copy(nt.boundingSphere).applyMatrix4(et.matrixWorld), + this.intersectsSphere(_sphere$2) + ) + } + intersectsSprite(et) { + return ( + _sphere$2.center.set(0, 0, 0), + (_sphere$2.radius = 0.7071067811865476), + _sphere$2.applyMatrix4(et.matrixWorld), + this.intersectsSphere(_sphere$2) + ) + } + intersectsSphere(et) { + const nt = this.planes, + rt = et.center, + it = -et.radius + for (let ot = 0; ot < 6; ot++) if (nt[ot].distanceToPoint(rt) < it) return !1 + return !0 + } + intersectsBox(et) { + const nt = this.planes + for (let rt = 0; rt < 6; rt++) { + const it = nt[rt] + if ( + ((_vector$7.x = it.normal.x > 0 ? et.max.x : et.min.x), + (_vector$7.y = it.normal.y > 0 ? et.max.y : et.min.y), + (_vector$7.z = it.normal.z > 0 ? et.max.z : et.min.z), + it.distanceToPoint(_vector$7) < 0) + ) + return !1 + } + return !0 + } + containsPoint(et) { + const nt = this.planes + for (let rt = 0; rt < 6; rt++) if (nt[rt].distanceToPoint(et) < 0) return !1 + return !0 + } + clone() { + return new this.constructor().copy(this) + } + } + function WebGLAnimation() { + let tt = null, + et = !1, + nt = null, + rt = null + function it(ot, at) { + nt(ot, at), (rt = tt.requestAnimationFrame(it)) + } + return { + start: function () { + et !== !0 && nt !== null && ((rt = tt.requestAnimationFrame(it)), (et = !0)) + }, + stop: function () { + tt.cancelAnimationFrame(rt), (et = !1) + }, + setAnimationLoop: function (ot) { + nt = ot + }, + setContext: function (ot) { + tt = ot + }, + } + } + function WebGLAttributes(tt, et) { + const nt = et.isWebGL2, + rt = new WeakMap() + function it(ct, ut) { + const ht = ct.array, + dt = ct.usage, + pt = tt.createBuffer() + tt.bindBuffer(ut, pt), tt.bufferData(ut, ht, dt), ct.onUploadCallback() + let mt + if (ht instanceof Float32Array) mt = 5126 + else if (ht instanceof Uint16Array) + if (ct.isFloat16BufferAttribute) + if (nt) mt = 5131 + else throw new Error('THREE.WebGLAttributes: Usage of Float16BufferAttribute requires WebGL2.') + else mt = 5123 + else if (ht instanceof Int16Array) mt = 5122 + else if (ht instanceof Uint32Array) mt = 5125 + else if (ht instanceof Int32Array) mt = 5124 + else if (ht instanceof Int8Array) mt = 5120 + else if (ht instanceof Uint8Array) mt = 5121 + else if (ht instanceof Uint8ClampedArray) mt = 5121 + else throw new Error('THREE.WebGLAttributes: Unsupported buffer data format: ' + ht) + return { buffer: pt, type: mt, bytesPerElement: ht.BYTES_PER_ELEMENT, version: ct.version } + } + function ot(ct, ut, ht) { + const dt = ut.array, + pt = ut.updateRange + tt.bindBuffer(ht, ct), + pt.count === -1 + ? tt.bufferSubData(ht, 0, dt) + : (nt + ? tt.bufferSubData(ht, pt.offset * dt.BYTES_PER_ELEMENT, dt, pt.offset, pt.count) + : tt.bufferSubData(ht, pt.offset * dt.BYTES_PER_ELEMENT, dt.subarray(pt.offset, pt.offset + pt.count)), + (pt.count = -1)) + } + function at(ct) { + return ct.isInterleavedBufferAttribute && (ct = ct.data), rt.get(ct) + } + function st(ct) { + ct.isInterleavedBufferAttribute && (ct = ct.data) + const ut = rt.get(ct) + ut && (tt.deleteBuffer(ut.buffer), rt.delete(ct)) + } + function lt(ct, ut) { + if (ct.isGLBufferAttribute) { + const dt = rt.get(ct) + ;(!dt || dt.version < ct.version) && + rt.set(ct, { buffer: ct.buffer, type: ct.type, bytesPerElement: ct.elementSize, version: ct.version }) + return + } + ct.isInterleavedBufferAttribute && (ct = ct.data) + const ht = rt.get(ct) + ht === void 0 + ? rt.set(ct, it(ct, ut)) + : ht.version < ct.version && (ot(ht.buffer, ct, ut), (ht.version = ct.version)) + } + return { get: at, remove: st, update: lt } + } + class PlaneGeometry extends BufferGeometry { + constructor(et = 1, nt = 1, rt = 1, it = 1) { + super(), + (this.type = 'PlaneGeometry'), + (this.parameters = { width: et, height: nt, widthSegments: rt, heightSegments: it }) + const ot = et / 2, + at = nt / 2, + st = Math.floor(rt), + lt = Math.floor(it), + ct = st + 1, + ut = lt + 1, + ht = et / st, + dt = nt / lt, + pt = [], + mt = [], + gt = [], + yt = [] + for (let bt = 0; bt < ut; bt++) { + const vt = bt * dt - at + for (let xt = 0; xt < ct; xt++) { + const kt = xt * ht - ot + mt.push(kt, -vt, 0), gt.push(0, 0, 1), yt.push(xt / st), yt.push(1 - bt / lt) + } + } + for (let bt = 0; bt < lt; bt++) + for (let vt = 0; vt < st; vt++) { + const xt = vt + ct * bt, + kt = vt + ct * (bt + 1), + St = vt + 1 + ct * (bt + 1), + Tt = vt + 1 + ct * bt + pt.push(xt, kt, Tt), pt.push(kt, St, Tt) + } + this.setIndex(pt), + this.setAttribute('position', new Float32BufferAttribute(mt, 3)), + this.setAttribute('normal', new Float32BufferAttribute(gt, 3)), + this.setAttribute('uv', new Float32BufferAttribute(yt, 2)) + } + static fromJSON(et) { + return new PlaneGeometry(et.width, et.height, et.widthSegments, et.heightSegments) + } + } + var alphamap_fragment = `#ifdef USE_ALPHAMAP + diffuseColor.a *= texture2D( alphaMap, vUv ).g; +#endif`, + alphamap_pars_fragment = `#ifdef USE_ALPHAMAP + uniform sampler2D alphaMap; +#endif`, + alphatest_fragment = `#ifdef USE_ALPHATEST + if ( diffuseColor.a < alphaTest ) discard; +#endif`, + alphatest_pars_fragment = `#ifdef USE_ALPHATEST + uniform float alphaTest; +#endif`, + aomap_fragment = `#ifdef USE_AOMAP + float ambientOcclusion = ( texture2D( aoMap, vUv2 ).r - 1.0 ) * aoMapIntensity + 1.0; + reflectedLight.indirectDiffuse *= ambientOcclusion; + #if defined( USE_ENVMAP ) && defined( STANDARD ) + float dotNV = saturate( dot( geometry.normal, geometry.viewDir ) ); + reflectedLight.indirectSpecular *= computeSpecularOcclusion( dotNV, ambientOcclusion, material.roughness ); + #endif +#endif`, + aomap_pars_fragment = `#ifdef USE_AOMAP + uniform sampler2D aoMap; + uniform float aoMapIntensity; +#endif`, + begin_vertex = 'vec3 transformed = vec3( position );', + beginnormal_vertex = `vec3 objectNormal = vec3( normal ); +#ifdef USE_TANGENT + vec3 objectTangent = vec3( tangent.xyz ); +#endif`, + bsdfs = `vec3 BRDF_Lambert( const in vec3 diffuseColor ) { + return RECIPROCAL_PI * diffuseColor; +} +vec3 F_Schlick( const in vec3 f0, const in float f90, const in float dotVH ) { + float fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH ); + return f0 * ( 1.0 - fresnel ) + ( f90 * fresnel ); +} +float F_Schlick( const in float f0, const in float f90, const in float dotVH ) { + float fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH ); + return f0 * ( 1.0 - fresnel ) + ( f90 * fresnel ); +} +vec3 Schlick_to_F0( const in vec3 f, const in float f90, const in float dotVH ) { + float x = clamp( 1.0 - dotVH, 0.0, 1.0 ); + float x2 = x * x; + float x5 = clamp( x * x2 * x2, 0.0, 0.9999 ); + return ( f - vec3( f90 ) * x5 ) / ( 1.0 - x5 ); +} +float V_GGX_SmithCorrelated( const in float alpha, const in float dotNL, const in float dotNV ) { + float a2 = pow2( alpha ); + float gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) ); + float gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) ); + return 0.5 / max( gv + gl, EPSILON ); +} +float D_GGX( const in float alpha, const in float dotNH ) { + float a2 = pow2( alpha ); + float denom = pow2( dotNH ) * ( a2 - 1.0 ) + 1.0; return RECIPROCAL_PI * a2 / pow2( denom ); } vec3 BRDF_GGX( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in vec3 f0, const in float f90, const in float roughness ) { @@ -749,7 +84717,8 @@ vec3 BRDF_Sheen( const in vec3 lightDir, const in vec3 viewDir, const in vec3 no float V = V_Neubelt( dotNV, dotNL ); return sheenColor * ( D * V ); } -#endif`,iridescence_fragment=`#ifdef USE_IRIDESCENCE +#endif`, + iridescence_fragment = `#ifdef USE_IRIDESCENCE const mat3 XYZ_TO_REC709 = mat3( 3.2404542, -0.9692660, 0.0556434, -1.5371385, 1.8760108, -0.2040259, @@ -813,7 +84782,8 @@ vec3 BRDF_Sheen( const in vec3 lightDir, const in vec3 viewDir, const in vec3 no } return max( I, vec3( 0.0 ) ); } -#endif`,bumpmap_pars_fragment=`#ifdef USE_BUMPMAP +#endif`, + bumpmap_pars_fragment = `#ifdef USE_BUMPMAP uniform sampler2D bumpMap; uniform float bumpScale; vec2 dHdxy_fwd() { @@ -834,7 +84804,8 @@ vec3 BRDF_Sheen( const in vec3 lightDir, const in vec3 viewDir, const in vec3 no vec3 vGrad = sign( fDet ) * ( dHdxy.x * R1 + dHdxy.y * R2 ); return normalize( abs( fDet ) * surf_norm - vGrad ); } -#endif`,clipping_planes_fragment=`#if NUM_CLIPPING_PLANES > 0 +#endif`, + clipping_planes_fragment = `#if NUM_CLIPPING_PLANES > 0 vec4 plane; #pragma unroll_loop_start for ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) { @@ -852,26 +84823,33 @@ vec3 BRDF_Sheen( const in vec3 lightDir, const in vec3 viewDir, const in vec3 no #pragma unroll_loop_end if ( clipped ) discard; #endif -#endif`,clipping_planes_pars_fragment=`#if NUM_CLIPPING_PLANES > 0 +#endif`, + clipping_planes_pars_fragment = `#if NUM_CLIPPING_PLANES > 0 varying vec3 vClipPosition; uniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ]; -#endif`,clipping_planes_pars_vertex=`#if NUM_CLIPPING_PLANES > 0 +#endif`, + clipping_planes_pars_vertex = `#if NUM_CLIPPING_PLANES > 0 varying vec3 vClipPosition; -#endif`,clipping_planes_vertex=`#if NUM_CLIPPING_PLANES > 0 +#endif`, + clipping_planes_vertex = `#if NUM_CLIPPING_PLANES > 0 vClipPosition = - mvPosition.xyz; -#endif`,color_fragment=`#if defined( USE_COLOR_ALPHA ) +#endif`, + color_fragment = `#if defined( USE_COLOR_ALPHA ) diffuseColor *= vColor; #elif defined( USE_COLOR ) diffuseColor.rgb *= vColor; -#endif`,color_pars_fragment=`#if defined( USE_COLOR_ALPHA ) +#endif`, + color_pars_fragment = `#if defined( USE_COLOR_ALPHA ) varying vec4 vColor; #elif defined( USE_COLOR ) varying vec3 vColor; -#endif`,color_pars_vertex=`#if defined( USE_COLOR_ALPHA ) +#endif`, + color_pars_vertex = `#if defined( USE_COLOR_ALPHA ) varying vec4 vColor; #elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR ) varying vec3 vColor; -#endif`,color_vertex=`#if defined( USE_COLOR_ALPHA ) +#endif`, + color_vertex = `#if defined( USE_COLOR_ALPHA ) vColor = vec4( 1.0 ); #elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR ) vColor = vec3( 1.0 ); @@ -881,7 +84859,8 @@ vec3 BRDF_Sheen( const in vec3 lightDir, const in vec3 viewDir, const in vec3 no #endif #ifdef USE_INSTANCING_COLOR vColor.xyz *= instanceColor.xyz; -#endif`,common=`#define PI 3.141592653589793 +#endif`, + common = `#define PI 3.141592653589793 #define PI2 6.283185307179586 #define PI_HALF 1.5707963267948966 #define RECIPROCAL_PI 0.3183098861837907 @@ -953,7 +84932,8 @@ vec2 equirectUv( in vec3 dir ) { float u = atan( dir.z, dir.x ) * RECIPROCAL_PI2 + 0.5; float v = asin( clamp( dir.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5; return vec2( u, v ); -}`,cube_uv_reflection_fragment=`#ifdef ENVMAP_TYPE_CUBE_UV +}`, + cube_uv_reflection_fragment = `#ifdef ENVMAP_TYPE_CUBE_UV #define cubeUV_minMipLevel 4.0 #define cubeUV_minTileSize 16.0 float getFace( vec3 direction ) { @@ -1051,7 +85031,8 @@ vec2 equirectUv( in vec3 dir ) { return vec4( mix( color0, color1, mipF ), 1.0 ); } } -#endif`,defaultnormal_vertex=`vec3 transformedNormal = objectNormal; +#endif`, + defaultnormal_vertex = `vec3 transformedNormal = objectNormal; #ifdef USE_INSTANCING mat3 m = mat3( instanceMatrix ); transformedNormal /= vec3( dot( m[ 0 ], m[ 0 ] ), dot( m[ 1 ], m[ 1 ] ), dot( m[ 2 ], m[ 2 ] ) ); @@ -1066,23 +85047,30 @@ transformedNormal = normalMatrix * transformedNormal; #ifdef FLIP_SIDED transformedTangent = - transformedTangent; #endif -#endif`,displacementmap_pars_vertex=`#ifdef USE_DISPLACEMENTMAP +#endif`, + displacementmap_pars_vertex = `#ifdef USE_DISPLACEMENTMAP uniform sampler2D displacementMap; uniform float displacementScale; uniform float displacementBias; -#endif`,displacementmap_vertex=`#ifdef USE_DISPLACEMENTMAP +#endif`, + displacementmap_vertex = `#ifdef USE_DISPLACEMENTMAP transformed += normalize( objectNormal ) * ( texture2D( displacementMap, vUv ).x * displacementScale + displacementBias ); -#endif`,emissivemap_fragment=`#ifdef USE_EMISSIVEMAP +#endif`, + emissivemap_fragment = `#ifdef USE_EMISSIVEMAP vec4 emissiveColor = texture2D( emissiveMap, vUv ); totalEmissiveRadiance *= emissiveColor.rgb; -#endif`,emissivemap_pars_fragment=`#ifdef USE_EMISSIVEMAP +#endif`, + emissivemap_pars_fragment = `#ifdef USE_EMISSIVEMAP uniform sampler2D emissiveMap; -#endif`,encodings_fragment="gl_FragColor = linearToOutputTexel( gl_FragColor );",encodings_pars_fragment=`vec4 LinearToLinear( in vec4 value ) { +#endif`, + encodings_fragment = 'gl_FragColor = linearToOutputTexel( gl_FragColor );', + encodings_pars_fragment = `vec4 LinearToLinear( in vec4 value ) { return value; } vec4 LinearTosRGB( in vec4 value ) { return vec4( mix( pow( value.rgb, vec3( 0.41666 ) ) * 1.055 - vec3( 0.055 ), value.rgb * 12.92, vec3( lessThanEqual( value.rgb, vec3( 0.0031308 ) ) ) ), value.a ); -}`,envmap_fragment=`#ifdef USE_ENVMAP +}`, + envmap_fragment = `#ifdef USE_ENVMAP #ifdef ENV_WORLDPOS vec3 cameraToFrag; if ( isOrthographic ) { @@ -1113,7 +85101,8 @@ vec4 LinearTosRGB( in vec4 value ) { #elif defined( ENVMAP_BLENDING_ADD ) outgoingLight += envColor.xyz * specularStrength * reflectivity; #endif -#endif`,envmap_common_pars_fragment=`#ifdef USE_ENVMAP +#endif`, + envmap_common_pars_fragment = `#ifdef USE_ENVMAP uniform float envMapIntensity; uniform float flipEnvMap; #ifdef ENVMAP_TYPE_CUBE @@ -1122,7 +85111,8 @@ vec4 LinearTosRGB( in vec4 value ) { uniform sampler2D envMap; #endif -#endif`,envmap_pars_fragment=`#ifdef USE_ENVMAP +#endif`, + envmap_pars_fragment = `#ifdef USE_ENVMAP uniform float reflectivity; #if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) #define ENV_WORLDPOS @@ -1133,7 +85123,8 @@ vec4 LinearTosRGB( in vec4 value ) { #else varying vec3 vReflect; #endif -#endif`,envmap_pars_vertex=`#ifdef USE_ENVMAP +#endif`, + envmap_pars_vertex = `#ifdef USE_ENVMAP #if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) ||defined( PHONG ) #define ENV_WORLDPOS #endif @@ -1144,7 +85135,8 @@ vec4 LinearTosRGB( in vec4 value ) { varying vec3 vReflect; uniform float refractionRatio; #endif -#endif`,envmap_vertex=`#ifdef USE_ENVMAP +#endif`, + envmap_vertex = `#ifdef USE_ENVMAP #ifdef ENV_WORLDPOS vWorldPosition = worldPosition.xyz; #else @@ -1161,18 +85153,22 @@ vec4 LinearTosRGB( in vec4 value ) { vReflect = refract( cameraToVertex, worldNormal, refractionRatio ); #endif #endif -#endif`,fog_vertex=`#ifdef USE_FOG +#endif`, + fog_vertex = `#ifdef USE_FOG vFogDepth = - mvPosition.z; -#endif`,fog_pars_vertex=`#ifdef USE_FOG +#endif`, + fog_pars_vertex = `#ifdef USE_FOG varying float vFogDepth; -#endif`,fog_fragment=`#ifdef USE_FOG +#endif`, + fog_fragment = `#ifdef USE_FOG #ifdef FOG_EXP2 float fogFactor = 1.0 - exp( - fogDensity * fogDensity * vFogDepth * vFogDepth ); #else float fogFactor = smoothstep( fogNear, fogFar, vFogDepth ); #endif gl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor ); -#endif`,fog_pars_fragment=`#ifdef USE_FOG +#endif`, + fog_pars_fragment = `#ifdef USE_FOG uniform vec3 fogColor; varying float vFogDepth; #ifdef FOG_EXP2 @@ -1181,7 +85177,8 @@ vec4 LinearTosRGB( in vec4 value ) { uniform float fogNear; uniform float fogFar; #endif -#endif`,gradientmap_pars_fragment=`#ifdef USE_GRADIENTMAP +#endif`, + gradientmap_pars_fragment = `#ifdef USE_GRADIENTMAP uniform sampler2D gradientMap; #endif vec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) { @@ -1192,14 +85189,17 @@ vec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) { #else return ( coord.x < 0.7 ) ? vec3( 0.7 ) : vec3( 1.0 ); #endif -}`,lightmap_fragment=`#ifdef USE_LIGHTMAP +}`, + lightmap_fragment = `#ifdef USE_LIGHTMAP vec4 lightMapTexel = texture2D( lightMap, vUv2 ); vec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity; reflectedLight.indirectDiffuse += lightMapIrradiance; -#endif`,lightmap_pars_fragment=`#ifdef USE_LIGHTMAP +#endif`, + lightmap_pars_fragment = `#ifdef USE_LIGHTMAP uniform sampler2D lightMap; uniform float lightMapIntensity; -#endif`,lights_lambert_vertex=`vec3 diffuse = vec3( 1.0 ); +#endif`, + lights_lambert_vertex = `vec3 diffuse = vec3( 1.0 ); GeometricContext geometry; geometry.position = mvPosition.xyz; geometry.normal = normalize( transformedNormal ); @@ -1271,7 +85271,8 @@ vIndirectFront += getLightProbeIrradiance( lightProbe, geometry.normal ); #endif } #pragma unroll_loop_end -#endif`,lights_pars_begin=`uniform bool receiveShadow; +#endif`, + lights_pars_begin = `uniform bool receiveShadow; uniform vec3 ambientLightColor; uniform vec3 lightProbe[ 9 ]; vec3 shGetIrradianceAt( in vec3 normal, in vec3 shCoefficients[ 9 ] ) { @@ -1392,7 +85393,8 @@ float getSpotAttenuation( const in float coneCosine, const in float penumbraCosi vec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight ); return irradiance; } -#endif`,envmap_physical_pars_fragment=`#if defined( USE_ENVMAP ) +#endif`, + envmap_physical_pars_fragment = `#if defined( USE_ENVMAP ) vec3 getIBLIrradiance( const in vec3 normal ) { #if defined( ENVMAP_TYPE_CUBE_UV ) vec3 worldNormal = inverseTransformDirection( normal, viewMatrix ); @@ -1413,8 +85415,10 @@ float getSpotAttenuation( const in float coneCosine, const in float penumbraCosi return vec3( 0.0 ); #endif } -#endif`,lights_toon_fragment=`ToonMaterial material; -material.diffuseColor = diffuseColor.rgb;`,lights_toon_pars_fragment=`varying vec3 vViewPosition; +#endif`, + lights_toon_fragment = `ToonMaterial material; +material.diffuseColor = diffuseColor.rgb;`, + lights_toon_pars_fragment = `varying vec3 vViewPosition; struct ToonMaterial { vec3 diffuseColor; }; @@ -1427,11 +85431,13 @@ void RE_IndirectDiffuse_Toon( const in vec3 irradiance, const in GeometricContex } #define RE_Direct RE_Direct_Toon #define RE_IndirectDiffuse RE_IndirectDiffuse_Toon -#define Material_LightProbeLOD( material ) (0)`,lights_phong_fragment=`BlinnPhongMaterial material; +#define Material_LightProbeLOD( material ) (0)`, + lights_phong_fragment = `BlinnPhongMaterial material; material.diffuseColor = diffuseColor.rgb; material.specularColor = specular; material.specularShininess = shininess; -material.specularStrength = specularStrength;`,lights_phong_pars_fragment=`varying vec3 vViewPosition; +material.specularStrength = specularStrength;`, + lights_phong_pars_fragment = `varying vec3 vViewPosition; struct BlinnPhongMaterial { vec3 diffuseColor; vec3 specularColor; @@ -1449,7 +85455,8 @@ void RE_IndirectDiffuse_BlinnPhong( const in vec3 irradiance, const in Geometric } #define RE_Direct RE_Direct_BlinnPhong #define RE_IndirectDiffuse RE_IndirectDiffuse_BlinnPhong -#define Material_LightProbeLOD( material ) (0)`,lights_physical_fragment=`PhysicalMaterial material; +#define Material_LightProbeLOD( material ) (0)`, + lights_physical_fragment = `PhysicalMaterial material; material.diffuseColor = diffuseColor.rgb * ( 1.0 - metalnessFactor ); vec3 dxy = max( abs( dFdx( geometryNormal ) ), abs( dFdy( geometryNormal ) ) ); float geometryRoughness = max( max( dxy.x, dxy.y ), dxy.z ); @@ -1512,7 +85519,8 @@ material.roughness = min( material.roughness, 1.0 ); #ifdef USE_SHEENROUGHNESSMAP material.sheenRoughness *= texture2D( sheenRoughnessMap, vUv ).a; #endif -#endif`,lights_physical_pars_fragment=`struct PhysicalMaterial { +#endif`, + lights_physical_pars_fragment = `struct PhysicalMaterial { vec3 diffuseColor; float roughness; vec3 specularColor; @@ -1651,7 +85659,8 @@ void RE_IndirectSpecular_Physical( const in vec3 radiance, const in vec3 irradia #define RE_IndirectSpecular RE_IndirectSpecular_Physical float computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) { return saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion ); -}`,lights_fragment_begin=` +}`, + lights_fragment_begin = ` GeometricContext geometry; geometry.position = - vViewPosition; geometry.normal = normal; @@ -1747,7 +85756,8 @@ IncidentLight directLight; #if defined( RE_IndirectSpecular ) vec3 radiance = vec3( 0.0 ); vec3 clearcoatRadiance = vec3( 0.0 ); -#endif`,lights_fragment_maps=`#if defined( RE_IndirectDiffuse ) +#endif`, + lights_fragment_maps = `#if defined( RE_IndirectDiffuse ) #ifdef USE_LIGHTMAP vec4 lightMapTexel = texture2D( lightMap, vUv2 ); vec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity; @@ -1762,25 +85772,30 @@ IncidentLight directLight; #ifdef USE_CLEARCOAT clearcoatRadiance += getIBLRadiance( geometry.viewDir, geometry.clearcoatNormal, material.clearcoatRoughness ); #endif -#endif`,lights_fragment_end=`#if defined( RE_IndirectDiffuse ) +#endif`, + lights_fragment_end = `#if defined( RE_IndirectDiffuse ) RE_IndirectDiffuse( irradiance, geometry, material, reflectedLight ); #endif #if defined( RE_IndirectSpecular ) RE_IndirectSpecular( radiance, iblIrradiance, clearcoatRadiance, geometry, material, reflectedLight ); -#endif`,logdepthbuf_fragment=`#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT ) +#endif`, + logdepthbuf_fragment = `#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT ) gl_FragDepthEXT = vIsPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5; -#endif`,logdepthbuf_pars_fragment=`#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT ) +#endif`, + logdepthbuf_pars_fragment = `#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT ) uniform float logDepthBufFC; varying float vFragDepth; varying float vIsPerspective; -#endif`,logdepthbuf_pars_vertex=`#ifdef USE_LOGDEPTHBUF +#endif`, + logdepthbuf_pars_vertex = `#ifdef USE_LOGDEPTHBUF #ifdef USE_LOGDEPTHBUF_EXT varying float vFragDepth; varying float vIsPerspective; #else uniform float logDepthBufFC; #endif -#endif`,logdepthbuf_vertex=`#ifdef USE_LOGDEPTHBUF +#endif`, + logdepthbuf_vertex = `#ifdef USE_LOGDEPTHBUF #ifdef USE_LOGDEPTHBUF_EXT vFragDepth = 1.0 + gl_Position.w; vIsPerspective = float( isPerspectiveMatrix( projectionMatrix ) ); @@ -1790,15 +85805,18 @@ IncidentLight directLight; gl_Position.z *= gl_Position.w; } #endif -#endif`,map_fragment=`#ifdef USE_MAP +#endif`, + map_fragment = `#ifdef USE_MAP vec4 sampledDiffuseColor = texture2D( map, vUv ); #ifdef DECODE_VIDEO_TEXTURE sampledDiffuseColor = vec4( mix( pow( sampledDiffuseColor.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), sampledDiffuseColor.rgb * 0.0773993808, vec3( lessThanEqual( sampledDiffuseColor.rgb, vec3( 0.04045 ) ) ) ), sampledDiffuseColor.w ); #endif diffuseColor *= sampledDiffuseColor; -#endif`,map_pars_fragment=`#ifdef USE_MAP +#endif`, + map_pars_fragment = `#ifdef USE_MAP uniform sampler2D map; -#endif`,map_particle_fragment=`#if defined( USE_MAP ) || defined( USE_ALPHAMAP ) +#endif`, + map_particle_fragment = `#if defined( USE_MAP ) || defined( USE_ALPHAMAP ) vec2 uv = ( uvTransform * vec3( gl_PointCoord.x, 1.0 - gl_PointCoord.y, 1 ) ).xy; #endif #ifdef USE_MAP @@ -1806,7 +85824,8 @@ IncidentLight directLight; #endif #ifdef USE_ALPHAMAP diffuseColor.a *= texture2D( alphaMap, uv ).g; -#endif`,map_particle_pars_fragment=`#if defined( USE_MAP ) || defined( USE_ALPHAMAP ) +#endif`, + map_particle_pars_fragment = `#if defined( USE_MAP ) || defined( USE_ALPHAMAP ) uniform mat3 uvTransform; #endif #ifdef USE_MAP @@ -1814,13 +85833,16 @@ IncidentLight directLight; #endif #ifdef USE_ALPHAMAP uniform sampler2D alphaMap; -#endif`,metalnessmap_fragment=`float metalnessFactor = metalness; +#endif`, + metalnessmap_fragment = `float metalnessFactor = metalness; #ifdef USE_METALNESSMAP vec4 texelMetalness = texture2D( metalnessMap, vUv ); metalnessFactor *= texelMetalness.b; -#endif`,metalnessmap_pars_fragment=`#ifdef USE_METALNESSMAP +#endif`, + metalnessmap_pars_fragment = `#ifdef USE_METALNESSMAP uniform sampler2D metalnessMap; -#endif`,morphcolor_vertex=`#if defined( USE_MORPHCOLORS ) && defined( MORPHTARGETS_TEXTURE ) +#endif`, + morphcolor_vertex = `#if defined( USE_MORPHCOLORS ) && defined( MORPHTARGETS_TEXTURE ) vColor *= morphTargetBaseInfluence; for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) { #if defined( USE_COLOR_ALPHA ) @@ -1829,7 +85851,8 @@ IncidentLight directLight; if ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ).rgb * morphTargetInfluences[ i ]; #endif } -#endif`,morphnormal_vertex=`#ifdef USE_MORPHNORMALS +#endif`, + morphnormal_vertex = `#ifdef USE_MORPHNORMALS objectNormal *= morphTargetBaseInfluence; #ifdef MORPHTARGETS_TEXTURE for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) { @@ -1841,7 +85864,8 @@ IncidentLight directLight; objectNormal += morphNormal2 * morphTargetInfluences[ 2 ]; objectNormal += morphNormal3 * morphTargetInfluences[ 3 ]; #endif -#endif`,morphtarget_pars_vertex=`#ifdef USE_MORPHTARGETS +#endif`, + morphtarget_pars_vertex = `#ifdef USE_MORPHTARGETS uniform float morphTargetBaseInfluence; #ifdef MORPHTARGETS_TEXTURE uniform float morphTargetInfluences[ MORPHTARGETS_COUNT ]; @@ -1861,7 +85885,8 @@ IncidentLight directLight; uniform float morphTargetInfluences[ 4 ]; #endif #endif -#endif`,morphtarget_vertex=`#ifdef USE_MORPHTARGETS +#endif`, + morphtarget_vertex = `#ifdef USE_MORPHTARGETS transformed *= morphTargetBaseInfluence; #ifdef MORPHTARGETS_TEXTURE for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) { @@ -1879,7 +85904,8 @@ IncidentLight directLight; transformed += morphTarget7 * morphTargetInfluences[ 7 ]; #endif #endif -#endif`,normal_fragment_begin=`float faceDirection = gl_FrontFacing ? 1.0 : - 1.0; +#endif`, + normal_fragment_begin = `float faceDirection = gl_FrontFacing ? 1.0 : - 1.0; #ifdef FLAT_SHADED vec3 fdx = vec3( dFdx( vViewPosition.x ), dFdx( vViewPosition.y ), dFdx( vViewPosition.z ) ); vec3 fdy = vec3( dFdy( vViewPosition.x ), dFdy( vViewPosition.y ), dFdy( vViewPosition.z ) ); @@ -1901,7 +85927,8 @@ IncidentLight directLight; #endif #endif #endif -vec3 geometryNormal = normal;`,normal_fragment_maps=`#ifdef OBJECTSPACE_NORMALMAP +vec3 geometryNormal = normal;`, + normal_fragment_maps = `#ifdef OBJECTSPACE_NORMALMAP normal = texture2D( normalMap, vUv ).xyz * 2.0 - 1.0; #ifdef FLIP_SIDED normal = - normal; @@ -1920,25 +85947,29 @@ vec3 geometryNormal = normal;`,normal_fragment_maps=`#ifdef OBJECTSPACE_NORMALMA #endif #elif defined( USE_BUMPMAP ) normal = perturbNormalArb( - vViewPosition, normal, dHdxy_fwd(), faceDirection ); -#endif`,normal_pars_fragment=`#ifndef FLAT_SHADED +#endif`, + normal_pars_fragment = `#ifndef FLAT_SHADED varying vec3 vNormal; #ifdef USE_TANGENT varying vec3 vTangent; varying vec3 vBitangent; #endif -#endif`,normal_pars_vertex=`#ifndef FLAT_SHADED +#endif`, + normal_pars_vertex = `#ifndef FLAT_SHADED varying vec3 vNormal; #ifdef USE_TANGENT varying vec3 vTangent; varying vec3 vBitangent; #endif -#endif`,normal_vertex=`#ifndef FLAT_SHADED +#endif`, + normal_vertex = `#ifndef FLAT_SHADED vNormal = normalize( transformedNormal ); #ifdef USE_TANGENT vTangent = normalize( transformedTangent ); vBitangent = normalize( cross( vNormal, vTangent ) * tangent.w ); #endif -#endif`,normalmap_pars_fragment=`#ifdef USE_NORMALMAP +#endif`, + normalmap_pars_fragment = `#ifdef USE_NORMALMAP uniform sampler2D normalMap; uniform vec2 normalScale; #endif @@ -1960,9 +85991,11 @@ vec3 geometryNormal = normal;`,normal_fragment_maps=`#ifdef OBJECTSPACE_NORMALMA float scale = ( det == 0.0 ) ? 0.0 : faceDirection * inversesqrt( det ); return normalize( T * ( mapN.x * scale ) + B * ( mapN.y * scale ) + N * mapN.z ); } -#endif`,clearcoat_normal_fragment_begin=`#ifdef USE_CLEARCOAT +#endif`, + clearcoat_normal_fragment_begin = `#ifdef USE_CLEARCOAT vec3 clearcoatNormal = geometryNormal; -#endif`,clearcoat_normal_fragment_maps=`#ifdef USE_CLEARCOAT_NORMALMAP +#endif`, + clearcoat_normal_fragment_maps = `#ifdef USE_CLEARCOAT_NORMALMAP vec3 clearcoatMapN = texture2D( clearcoatNormalMap, vUv ).xyz * 2.0 - 1.0; clearcoatMapN.xy *= clearcoatNormalScale; #ifdef USE_TANGENT @@ -1970,7 +86003,8 @@ vec3 geometryNormal = normal;`,normal_fragment_maps=`#ifdef OBJECTSPACE_NORMALMA #else clearcoatNormal = perturbNormal2Arb( - vViewPosition, clearcoatNormal, clearcoatMapN, faceDirection ); #endif -#endif`,clearcoat_pars_fragment=`#ifdef USE_CLEARCOATMAP +#endif`, + clearcoat_pars_fragment = `#ifdef USE_CLEARCOATMAP uniform sampler2D clearcoatMap; #endif #ifdef USE_CLEARCOAT_ROUGHNESSMAP @@ -1979,18 +86013,21 @@ vec3 geometryNormal = normal;`,normal_fragment_maps=`#ifdef OBJECTSPACE_NORMALMA #ifdef USE_CLEARCOAT_NORMALMAP uniform sampler2D clearcoatNormalMap; uniform vec2 clearcoatNormalScale; -#endif`,iridescence_pars_fragment=`#ifdef USE_IRIDESCENCEMAP +#endif`, + iridescence_pars_fragment = `#ifdef USE_IRIDESCENCEMAP uniform sampler2D iridescenceMap; #endif #ifdef USE_IRIDESCENCE_THICKNESSMAP uniform sampler2D iridescenceThicknessMap; -#endif`,output_fragment=`#ifdef OPAQUE +#endif`, + output_fragment = `#ifdef OPAQUE diffuseColor.a = 1.0; #endif #ifdef USE_TRANSMISSION diffuseColor.a *= transmissionAlpha + 0.1; #endif -gl_FragColor = vec4( outgoingLight, diffuseColor.a );`,packing=`vec3 packNormalToRGB( const in vec3 normal ) { +gl_FragColor = vec4( outgoingLight, diffuseColor.a );`, + packing = `vec3 packNormalToRGB( const in vec3 normal ) { return normalize( normal ) * 0.5 + 0.5; } vec3 unpackRGBToNormal( const in vec3 rgb ) { @@ -2025,29 +86062,36 @@ float viewZToPerspectiveDepth( const in float viewZ, const in float near, const } float perspectiveDepthToViewZ( const in float invClipZ, const in float near, const in float far ) { return ( near * far ) / ( ( far - near ) * invClipZ - far ); -}`,premultiplied_alpha_fragment=`#ifdef PREMULTIPLIED_ALPHA +}`, + premultiplied_alpha_fragment = `#ifdef PREMULTIPLIED_ALPHA gl_FragColor.rgb *= gl_FragColor.a; -#endif`,project_vertex=`vec4 mvPosition = vec4( transformed, 1.0 ); +#endif`, + project_vertex = `vec4 mvPosition = vec4( transformed, 1.0 ); #ifdef USE_INSTANCING mvPosition = instanceMatrix * mvPosition; #endif mvPosition = modelViewMatrix * mvPosition; -gl_Position = projectionMatrix * mvPosition;`,dithering_fragment=`#ifdef DITHERING +gl_Position = projectionMatrix * mvPosition;`, + dithering_fragment = `#ifdef DITHERING gl_FragColor.rgb = dithering( gl_FragColor.rgb ); -#endif`,dithering_pars_fragment=`#ifdef DITHERING +#endif`, + dithering_pars_fragment = `#ifdef DITHERING vec3 dithering( vec3 color ) { float grid_position = rand( gl_FragCoord.xy ); vec3 dither_shift_RGB = vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 ); dither_shift_RGB = mix( 2.0 * dither_shift_RGB, -2.0 * dither_shift_RGB, grid_position ); return color + dither_shift_RGB; } -#endif`,roughnessmap_fragment=`float roughnessFactor = roughness; +#endif`, + roughnessmap_fragment = `float roughnessFactor = roughness; #ifdef USE_ROUGHNESSMAP vec4 texelRoughness = texture2D( roughnessMap, vUv ); roughnessFactor *= texelRoughness.g; -#endif`,roughnessmap_pars_fragment=`#ifdef USE_ROUGHNESSMAP +#endif`, + roughnessmap_pars_fragment = `#ifdef USE_ROUGHNESSMAP uniform sampler2D roughnessMap; -#endif`,shadowmap_pars_fragment=`#ifdef USE_SHADOWMAP +#endif`, + shadowmap_pars_fragment = `#ifdef USE_SHADOWMAP #if NUM_DIR_LIGHT_SHADOWS > 0 uniform sampler2D directionalShadowMap[ NUM_DIR_LIGHT_SHADOWS ]; varying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ]; @@ -2221,7 +86265,8 @@ gl_Position = projectionMatrix * mvPosition;`,dithering_fragment=`#ifdef DITHERI return texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ); #endif } -#endif`,shadowmap_pars_vertex=`#ifdef USE_SHADOWMAP +#endif`, + shadowmap_pars_vertex = `#ifdef USE_SHADOWMAP #if NUM_DIR_LIGHT_SHADOWS > 0 uniform mat4 directionalShadowMatrix[ NUM_DIR_LIGHT_SHADOWS ]; varying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ]; @@ -2257,7 +86302,8 @@ gl_Position = projectionMatrix * mvPosition;`,dithering_fragment=`#ifdef DITHERI }; uniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ]; #endif -#endif`,shadowmap_vertex=`#ifdef USE_SHADOWMAP +#endif`, + shadowmap_vertex = `#ifdef USE_SHADOWMAP #if NUM_DIR_LIGHT_SHADOWS > 0 || NUM_SPOT_LIGHT_SHADOWS > 0 || NUM_POINT_LIGHT_SHADOWS > 0 vec3 shadowWorldNormal = inverseTransformDirection( transformedNormal, viewMatrix ); vec4 shadowWorldPosition; @@ -2286,7 +86332,8 @@ gl_Position = projectionMatrix * mvPosition;`,dithering_fragment=`#ifdef DITHERI } #pragma unroll_loop_end #endif -#endif`,shadowmask_pars_fragment=`float getShadowMask() { +#endif`, + shadowmask_pars_fragment = `float getShadowMask() { float shadow = 1.0; #ifdef USE_SHADOWMAP #if NUM_DIR_LIGHT_SHADOWS > 0 @@ -2318,12 +86365,14 @@ gl_Position = projectionMatrix * mvPosition;`,dithering_fragment=`#ifdef DITHERI #endif #endif return shadow; -}`,skinbase_vertex=`#ifdef USE_SKINNING +}`, + skinbase_vertex = `#ifdef USE_SKINNING mat4 boneMatX = getBoneMatrix( skinIndex.x ); mat4 boneMatY = getBoneMatrix( skinIndex.y ); mat4 boneMatZ = getBoneMatrix( skinIndex.z ); mat4 boneMatW = getBoneMatrix( skinIndex.w ); -#endif`,skinning_pars_vertex=`#ifdef USE_SKINNING +#endif`, + skinning_pars_vertex = `#ifdef USE_SKINNING uniform mat4 bindMatrix; uniform mat4 bindMatrixInverse; uniform highp sampler2D boneTexture; @@ -2342,7 +86391,8 @@ gl_Position = projectionMatrix * mvPosition;`,dithering_fragment=`#ifdef DITHERI mat4 bone = mat4( v1, v2, v3, v4 ); return bone; } -#endif`,skinning_vertex=`#ifdef USE_SKINNING +#endif`, + skinning_vertex = `#ifdef USE_SKINNING vec4 skinVertex = bindMatrix * vec4( transformed, 1.0 ); vec4 skinned = vec4( 0.0 ); skinned += boneMatX * skinVertex * skinWeight.x; @@ -2350,7 +86400,8 @@ gl_Position = projectionMatrix * mvPosition;`,dithering_fragment=`#ifdef DITHERI skinned += boneMatZ * skinVertex * skinWeight.z; skinned += boneMatW * skinVertex * skinWeight.w; transformed = ( bindMatrixInverse * skinned ).xyz; -#endif`,skinnormal_vertex=`#ifdef USE_SKINNING +#endif`, + skinnormal_vertex = `#ifdef USE_SKINNING mat4 skinMatrix = mat4( 0.0 ); skinMatrix += skinWeight.x * boneMatX; skinMatrix += skinWeight.y * boneMatY; @@ -2361,17 +86412,21 @@ gl_Position = projectionMatrix * mvPosition;`,dithering_fragment=`#ifdef DITHERI #ifdef USE_TANGENT objectTangent = vec4( skinMatrix * vec4( objectTangent, 0.0 ) ).xyz; #endif -#endif`,specularmap_fragment=`float specularStrength; +#endif`, + specularmap_fragment = `float specularStrength; #ifdef USE_SPECULARMAP vec4 texelSpecular = texture2D( specularMap, vUv ); specularStrength = texelSpecular.r; #else specularStrength = 1.0; -#endif`,specularmap_pars_fragment=`#ifdef USE_SPECULARMAP +#endif`, + specularmap_pars_fragment = `#ifdef USE_SPECULARMAP uniform sampler2D specularMap; -#endif`,tonemapping_fragment=`#if defined( TONE_MAPPING ) +#endif`, + tonemapping_fragment = `#if defined( TONE_MAPPING ) gl_FragColor.rgb = toneMapping( gl_FragColor.rgb ); -#endif`,tonemapping_pars_fragment=`#ifndef saturate +#endif`, + tonemapping_pars_fragment = `#ifndef saturate #define saturate( a ) clamp( a, 0.0, 1.0 ) #endif uniform float toneMappingExposure; @@ -2407,7 +86462,8 @@ vec3 ACESFilmicToneMapping( vec3 color ) { color = ACESOutputMat * color; return saturate( color ); } -vec3 CustomToneMapping( vec3 color ) { return color; }`,transmission_fragment=`#ifdef USE_TRANSMISSION +vec3 CustomToneMapping( vec3 color ) { return color; }`, + transmission_fragment = `#ifdef USE_TRANSMISSION float transmissionAlpha = 1.0; float transmissionFactor = transmission; float thicknessFactor = thickness; @@ -2426,7 +86482,8 @@ vec3 CustomToneMapping( vec3 color ) { return color; }`,transmission_fragment=`# attenuationColor, attenuationDistance ); totalDiffuse = mix( totalDiffuse, transmission.rgb, transmissionFactor ); transmissionAlpha = mix( transmissionAlpha, transmission.a, transmissionFactor ); -#endif`,transmission_pars_fragment=`#ifdef USE_TRANSMISSION +#endif`, + transmission_pars_fragment = `#ifdef USE_TRANSMISSION uniform float transmission; uniform float thickness; uniform float attenuationDistance; @@ -2484,37 +86541,46 @@ vec3 CustomToneMapping( vec3 color ) { return color; }`,transmission_fragment=`# vec3 F = EnvironmentBRDF( n, v, specularColor, specularF90, roughness ); return vec4( ( 1.0 - F ) * attenuatedColor * diffuseColor, transmittedLight.a ); } -#endif`,uv_pars_fragment=`#if ( defined( USE_UV ) && ! defined( UVS_VERTEX_ONLY ) ) +#endif`, + uv_pars_fragment = `#if ( defined( USE_UV ) && ! defined( UVS_VERTEX_ONLY ) ) varying vec2 vUv; -#endif`,uv_pars_vertex=`#ifdef USE_UV +#endif`, + uv_pars_vertex = `#ifdef USE_UV #ifdef UVS_VERTEX_ONLY vec2 vUv; #else varying vec2 vUv; #endif uniform mat3 uvTransform; -#endif`,uv_vertex=`#ifdef USE_UV +#endif`, + uv_vertex = `#ifdef USE_UV vUv = ( uvTransform * vec3( uv, 1 ) ).xy; -#endif`,uv2_pars_fragment=`#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP ) +#endif`, + uv2_pars_fragment = `#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP ) varying vec2 vUv2; -#endif`,uv2_pars_vertex=`#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP ) +#endif`, + uv2_pars_vertex = `#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP ) attribute vec2 uv2; varying vec2 vUv2; uniform mat3 uv2Transform; -#endif`,uv2_vertex=`#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP ) +#endif`, + uv2_vertex = `#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP ) vUv2 = ( uv2Transform * vec3( uv2, 1 ) ).xy; -#endif`,worldpos_vertex=`#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP ) || defined ( USE_TRANSMISSION ) +#endif`, + worldpos_vertex = `#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP ) || defined ( USE_TRANSMISSION ) vec4 worldPosition = vec4( transformed, 1.0 ); #ifdef USE_INSTANCING worldPosition = instanceMatrix * worldPosition; #endif worldPosition = modelMatrix * worldPosition; -#endif`;const vertex$g=`varying vec2 vUv; +#endif` + const vertex$g = `varying vec2 vUv; uniform mat3 uvTransform; void main() { vUv = ( uvTransform * vec3( uv, 1 ) ).xy; gl_Position = vec4( position.xy, 1.0, 1.0 ); -}`,fragment$g=`uniform sampler2D t2D; +}`, + fragment$g = `uniform sampler2D t2D; varying vec2 vUv; void main() { gl_FragColor = texture2D( t2D, vUv ); @@ -2523,14 +86589,16 @@ void main() { #endif #include #include -}`,vertex$f=`varying vec3 vWorldDirection; +}`, + vertex$f = `varying vec3 vWorldDirection; #include void main() { vWorldDirection = transformDirection( position, modelMatrix ); #include #include gl_Position.z = gl_Position.w; -}`,fragment$f=`#include +}`, + fragment$f = `#include uniform float opacity; varying vec3 vWorldDirection; #include @@ -2541,7 +86609,8 @@ void main() { gl_FragColor.a *= opacity; #include #include -}`,vertex$e=`#include +}`, + vertex$e = `#include #include #include #include @@ -2565,7 +86634,8 @@ void main() { #include #include vHighPrecisionZW = gl_Position.zw; -}`,fragment$e=`#if DEPTH_PACKING == 3200 +}`, + fragment$e = `#if DEPTH_PACKING == 3200 uniform float opacity; #endif #include @@ -2593,7 +86663,8 @@ void main() { #elif DEPTH_PACKING == 3201 gl_FragColor = packDepthToRGBA( fragCoordZ ); #endif -}`,vertex$d=`#define DISTANCE +}`, + vertex$d = `#define DISTANCE varying vec3 vWorldPosition; #include #include @@ -2617,7 +86688,8 @@ void main() { #include #include vWorldPosition = worldPosition.xyz; -}`,fragment$d=`#define DISTANCE +}`, + fragment$d = `#define DISTANCE uniform vec3 referencePosition; uniform float nearDistance; uniform float farDistance; @@ -2639,13 +86711,15 @@ void main () { dist = ( dist - nearDistance ) / ( farDistance - nearDistance ); dist = saturate( dist ); gl_FragColor = packDepthToRGBA( dist ); -}`,vertex$c=`varying vec3 vWorldDirection; +}`, + vertex$c = `varying vec3 vWorldDirection; #include void main() { vWorldDirection = transformDirection( position, modelMatrix ); #include #include -}`,fragment$c=`uniform sampler2D tEquirect; +}`, + fragment$c = `uniform sampler2D tEquirect; varying vec3 vWorldDirection; #include void main() { @@ -2654,7 +86728,8 @@ void main() { gl_FragColor = texture2D( tEquirect, sampleUV ); #include #include -}`,vertex$b=`uniform float scale; +}`, + vertex$b = `uniform float scale; attribute float lineDistance; varying float vLineDistance; #include @@ -2673,7 +86748,8 @@ void main() { #include #include #include -}`,fragment$b=`uniform vec3 diffuse; +}`, + fragment$b = `uniform vec3 diffuse; uniform float opacity; uniform float dashSize; uniform float totalSize; @@ -2698,7 +86774,8 @@ void main() { #include #include #include -}`,vertex$a=`#include +}`, + vertex$a = `#include #include #include #include @@ -2729,7 +86806,8 @@ void main() { #include #include #include -}`,fragment$a=`uniform vec3 diffuse; +}`, + fragment$a = `uniform vec3 diffuse; uniform float opacity; #ifndef FLAT_SHADED varying vec3 vNormal; @@ -2777,7 +86855,8 @@ void main() { #include #include #include -}`,vertex$9=`#define LAMBERT +}`, + vertex$9 = `#define LAMBERT varying vec3 vLightFront; varying vec3 vIndirectFront; #ifdef DOUBLE_SIDED @@ -2818,7 +86897,8 @@ void main() { #include #include #include -}`,fragment$9=`uniform vec3 diffuse; +}`, + fragment$9 = `uniform vec3 diffuse; uniform vec3 emissive; uniform float opacity; varying vec3 vLightFront; @@ -2884,7 +86964,8 @@ void main() { #include #include #include -}`,vertex$8=`#define MATCAP +}`, + vertex$8 = `#define MATCAP varying vec3 vViewPosition; #include #include @@ -2915,7 +86996,8 @@ void main() { #include #include vViewPosition = - mvPosition.xyz; -}`,fragment$8=`#define MATCAP +}`, + fragment$8 = `#define MATCAP uniform vec3 diffuse; uniform float opacity; uniform sampler2D matcap; @@ -2959,7 +87041,8 @@ void main() { #include #include #include -}`,vertex$7=`#define NORMAL +}`, + vertex$7 = `#define NORMAL #if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( TANGENTSPACE_NORMALMAP ) varying vec3 vViewPosition; #endif @@ -2989,7 +87072,8 @@ void main() { #if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( TANGENTSPACE_NORMALMAP ) vViewPosition = - mvPosition.xyz; #endif -}`,fragment$7=`#define NORMAL +}`, + fragment$7 = `#define NORMAL uniform float opacity; #if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( TANGENTSPACE_NORMALMAP ) varying vec3 vViewPosition; @@ -3010,7 +87094,8 @@ void main() { #ifdef OPAQUE gl_FragColor.a = 1.0; #endif -}`,vertex$6=`#define PHONG +}`, + vertex$6 = `#define PHONG varying vec3 vViewPosition; #include #include @@ -3048,7 +87133,8 @@ void main() { #include #include #include -}`,fragment$6=`#define PHONG +}`, + fragment$6 = `#define PHONG uniform vec3 diffuse; uniform vec3 emissive; uniform vec3 specular; @@ -3107,7 +87193,8 @@ void main() { #include #include #include -}`,vertex$5=`#define STANDARD +}`, + vertex$5 = `#define STANDARD varying vec3 vViewPosition; #ifdef USE_TRANSMISSION varying vec3 vWorldPosition; @@ -3149,7 +87236,8 @@ void main() { #ifdef USE_TRANSMISSION vWorldPosition = worldPosition.xyz; #endif -}`,fragment$5=`#define STANDARD +}`, + fragment$5 = `#define STANDARD #ifdef PHYSICAL #define IOR #define SPECULAR @@ -3265,7 +87353,8 @@ void main() { #include #include #include -}`,vertex$4=`#define TOON +}`, + vertex$4 = `#define TOON varying vec3 vViewPosition; #include #include @@ -3301,7 +87390,8 @@ void main() { #include #include #include -}`,fragment$4=`#define TOON +}`, + fragment$4 = `#define TOON uniform vec3 diffuse; uniform vec3 emissive; uniform float opacity; @@ -3353,7 +87443,8 @@ void main() { #include #include #include -}`,vertex$3=`uniform float size; +}`, + vertex$3 = `uniform float size; uniform float scale; #include #include @@ -3376,7 +87467,8 @@ void main() { #include #include #include -}`,fragment$3=`uniform vec3 diffuse; +}`, + fragment$3 = `uniform vec3 diffuse; uniform float opacity; #include #include @@ -3399,7 +87491,8 @@ void main() { #include #include #include -}`,vertex$2=`#include +}`, + vertex$2 = `#include #include #include #include @@ -3417,7 +87510,8 @@ void main() { #include #include #include -}`,fragment$2=`uniform vec3 color; +}`, + fragment$2 = `uniform vec3 color; uniform float opacity; #include #include @@ -3431,7 +87525,8 @@ void main() { #include #include #include -}`,vertex$1=`uniform float rotation; +}`, + vertex$1 = `uniform float rotation; uniform vec2 center; #include #include @@ -3457,7 +87552,8 @@ void main() { #include #include #include -}`,fragment$1=`uniform vec3 diffuse; +}`, + fragment$1 = `uniform vec3 diffuse; uniform float opacity; #include #include @@ -3480,7 +87576,1330 @@ void main() { #include #include #include -}`,ShaderChunk={alphamap_fragment,alphamap_pars_fragment,alphatest_fragment,alphatest_pars_fragment,aomap_fragment,aomap_pars_fragment,begin_vertex,beginnormal_vertex,bsdfs,iridescence_fragment,bumpmap_pars_fragment,clipping_planes_fragment,clipping_planes_pars_fragment,clipping_planes_pars_vertex,clipping_planes_vertex,color_fragment,color_pars_fragment,color_pars_vertex,color_vertex,common,cube_uv_reflection_fragment,defaultnormal_vertex,displacementmap_pars_vertex,displacementmap_vertex,emissivemap_fragment,emissivemap_pars_fragment,encodings_fragment,encodings_pars_fragment,envmap_fragment,envmap_common_pars_fragment,envmap_pars_fragment,envmap_pars_vertex,envmap_physical_pars_fragment,envmap_vertex,fog_vertex,fog_pars_vertex,fog_fragment,fog_pars_fragment,gradientmap_pars_fragment,lightmap_fragment,lightmap_pars_fragment,lights_lambert_vertex,lights_pars_begin,lights_toon_fragment,lights_toon_pars_fragment,lights_phong_fragment,lights_phong_pars_fragment,lights_physical_fragment,lights_physical_pars_fragment,lights_fragment_begin,lights_fragment_maps,lights_fragment_end,logdepthbuf_fragment,logdepthbuf_pars_fragment,logdepthbuf_pars_vertex,logdepthbuf_vertex,map_fragment,map_pars_fragment,map_particle_fragment,map_particle_pars_fragment,metalnessmap_fragment,metalnessmap_pars_fragment,morphcolor_vertex,morphnormal_vertex,morphtarget_pars_vertex,morphtarget_vertex,normal_fragment_begin,normal_fragment_maps,normal_pars_fragment,normal_pars_vertex,normal_vertex,normalmap_pars_fragment,clearcoat_normal_fragment_begin,clearcoat_normal_fragment_maps,clearcoat_pars_fragment,iridescence_pars_fragment,output_fragment,packing,premultiplied_alpha_fragment,project_vertex,dithering_fragment,dithering_pars_fragment,roughnessmap_fragment,roughnessmap_pars_fragment,shadowmap_pars_fragment,shadowmap_pars_vertex,shadowmap_vertex,shadowmask_pars_fragment,skinbase_vertex,skinning_pars_vertex,skinning_vertex,skinnormal_vertex,specularmap_fragment,specularmap_pars_fragment,tonemapping_fragment,tonemapping_pars_fragment,transmission_fragment,transmission_pars_fragment,uv_pars_fragment,uv_pars_vertex,uv_vertex,uv2_pars_fragment,uv2_pars_vertex,uv2_vertex,worldpos_vertex,background_vert:vertex$g,background_frag:fragment$g,cube_vert:vertex$f,cube_frag:fragment$f,depth_vert:vertex$e,depth_frag:fragment$e,distanceRGBA_vert:vertex$d,distanceRGBA_frag:fragment$d,equirect_vert:vertex$c,equirect_frag:fragment$c,linedashed_vert:vertex$b,linedashed_frag:fragment$b,meshbasic_vert:vertex$a,meshbasic_frag:fragment$a,meshlambert_vert:vertex$9,meshlambert_frag:fragment$9,meshmatcap_vert:vertex$8,meshmatcap_frag:fragment$8,meshnormal_vert:vertex$7,meshnormal_frag:fragment$7,meshphong_vert:vertex$6,meshphong_frag:fragment$6,meshphysical_vert:vertex$5,meshphysical_frag:fragment$5,meshtoon_vert:vertex$4,meshtoon_frag:fragment$4,points_vert:vertex$3,points_frag:fragment$3,shadow_vert:vertex$2,shadow_frag:fragment$2,sprite_vert:vertex$1,sprite_frag:fragment$1},UniformsLib={common:{diffuse:{value:new Color$1(16777215)},opacity:{value:1},map:{value:null},uvTransform:{value:new Matrix3},uv2Transform:{value:new Matrix3},alphaMap:{value:null},alphaTest:{value:0}},specularmap:{specularMap:{value:null}},envmap:{envMap:{value:null},flipEnvMap:{value:-1},reflectivity:{value:1},ior:{value:1.5},refractionRatio:{value:.98}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1}},emissivemap:{emissiveMap:{value:null}},bumpmap:{bumpMap:{value:null},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalScale:{value:new Vector2(1,1)}},displacementmap:{displacementMap:{value:null},displacementScale:{value:1},displacementBias:{value:0}},roughnessmap:{roughnessMap:{value:null}},metalnessmap:{metalnessMap:{value:null}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new Color$1(16777215)}},lights:{ambientLightColor:{value:[]},lightProbe:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{}}},directionalLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{}}},spotLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},spotShadowMap:{value:[]},spotShadowMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{}}},pointLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{},shadowCameraNear:{},shadowCameraFar:{}}},pointShadowMap:{value:[]},pointShadowMatrix:{value:[]},hemisphereLights:{value:[],properties:{direction:{},skyColor:{},groundColor:{}}},rectAreaLights:{value:[],properties:{color:{},position:{},width:{},height:{}}},ltc_1:{value:null},ltc_2:{value:null}},points:{diffuse:{value:new Color$1(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaTest:{value:0},uvTransform:{value:new Matrix3}},sprite:{diffuse:{value:new Color$1(16777215)},opacity:{value:1},center:{value:new Vector2(.5,.5)},rotation:{value:0},map:{value:null},alphaMap:{value:null},alphaTest:{value:0},uvTransform:{value:new Matrix3}}},ShaderLib={basic:{uniforms:mergeUniforms([UniformsLib.common,UniformsLib.specularmap,UniformsLib.envmap,UniformsLib.aomap,UniformsLib.lightmap,UniformsLib.fog]),vertexShader:ShaderChunk.meshbasic_vert,fragmentShader:ShaderChunk.meshbasic_frag},lambert:{uniforms:mergeUniforms([UniformsLib.common,UniformsLib.specularmap,UniformsLib.envmap,UniformsLib.aomap,UniformsLib.lightmap,UniformsLib.emissivemap,UniformsLib.fog,UniformsLib.lights,{emissive:{value:new Color$1(0)}}]),vertexShader:ShaderChunk.meshlambert_vert,fragmentShader:ShaderChunk.meshlambert_frag},phong:{uniforms:mergeUniforms([UniformsLib.common,UniformsLib.specularmap,UniformsLib.envmap,UniformsLib.aomap,UniformsLib.lightmap,UniformsLib.emissivemap,UniformsLib.bumpmap,UniformsLib.normalmap,UniformsLib.displacementmap,UniformsLib.fog,UniformsLib.lights,{emissive:{value:new Color$1(0)},specular:{value:new Color$1(1118481)},shininess:{value:30}}]),vertexShader:ShaderChunk.meshphong_vert,fragmentShader:ShaderChunk.meshphong_frag},standard:{uniforms:mergeUniforms([UniformsLib.common,UniformsLib.envmap,UniformsLib.aomap,UniformsLib.lightmap,UniformsLib.emissivemap,UniformsLib.bumpmap,UniformsLib.normalmap,UniformsLib.displacementmap,UniformsLib.roughnessmap,UniformsLib.metalnessmap,UniformsLib.fog,UniformsLib.lights,{emissive:{value:new Color$1(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:ShaderChunk.meshphysical_vert,fragmentShader:ShaderChunk.meshphysical_frag},toon:{uniforms:mergeUniforms([UniformsLib.common,UniformsLib.aomap,UniformsLib.lightmap,UniformsLib.emissivemap,UniformsLib.bumpmap,UniformsLib.normalmap,UniformsLib.displacementmap,UniformsLib.gradientmap,UniformsLib.fog,UniformsLib.lights,{emissive:{value:new Color$1(0)}}]),vertexShader:ShaderChunk.meshtoon_vert,fragmentShader:ShaderChunk.meshtoon_frag},matcap:{uniforms:mergeUniforms([UniformsLib.common,UniformsLib.bumpmap,UniformsLib.normalmap,UniformsLib.displacementmap,UniformsLib.fog,{matcap:{value:null}}]),vertexShader:ShaderChunk.meshmatcap_vert,fragmentShader:ShaderChunk.meshmatcap_frag},points:{uniforms:mergeUniforms([UniformsLib.points,UniformsLib.fog]),vertexShader:ShaderChunk.points_vert,fragmentShader:ShaderChunk.points_frag},dashed:{uniforms:mergeUniforms([UniformsLib.common,UniformsLib.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:ShaderChunk.linedashed_vert,fragmentShader:ShaderChunk.linedashed_frag},depth:{uniforms:mergeUniforms([UniformsLib.common,UniformsLib.displacementmap]),vertexShader:ShaderChunk.depth_vert,fragmentShader:ShaderChunk.depth_frag},normal:{uniforms:mergeUniforms([UniformsLib.common,UniformsLib.bumpmap,UniformsLib.normalmap,UniformsLib.displacementmap,{opacity:{value:1}}]),vertexShader:ShaderChunk.meshnormal_vert,fragmentShader:ShaderChunk.meshnormal_frag},sprite:{uniforms:mergeUniforms([UniformsLib.sprite,UniformsLib.fog]),vertexShader:ShaderChunk.sprite_vert,fragmentShader:ShaderChunk.sprite_frag},background:{uniforms:{uvTransform:{value:new Matrix3},t2D:{value:null}},vertexShader:ShaderChunk.background_vert,fragmentShader:ShaderChunk.background_frag},cube:{uniforms:mergeUniforms([UniformsLib.envmap,{opacity:{value:1}}]),vertexShader:ShaderChunk.cube_vert,fragmentShader:ShaderChunk.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:ShaderChunk.equirect_vert,fragmentShader:ShaderChunk.equirect_frag},distanceRGBA:{uniforms:mergeUniforms([UniformsLib.common,UniformsLib.displacementmap,{referencePosition:{value:new Vector3},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:ShaderChunk.distanceRGBA_vert,fragmentShader:ShaderChunk.distanceRGBA_frag},shadow:{uniforms:mergeUniforms([UniformsLib.lights,UniformsLib.fog,{color:{value:new Color$1(0)},opacity:{value:1}}]),vertexShader:ShaderChunk.shadow_vert,fragmentShader:ShaderChunk.shadow_frag}};ShaderLib.physical={uniforms:mergeUniforms([ShaderLib.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatNormalScale:{value:new Vector2(1,1)},clearcoatNormalMap:{value:null},iridescence:{value:0},iridescenceMap:{value:null},iridescenceIOR:{value:1.3},iridescenceThicknessMinimum:{value:100},iridescenceThicknessMaximum:{value:400},iridescenceThicknessMap:{value:null},sheen:{value:0},sheenColor:{value:new Color$1(0)},sheenColorMap:{value:null},sheenRoughness:{value:1},sheenRoughnessMap:{value:null},transmission:{value:0},transmissionMap:{value:null},transmissionSamplerSize:{value:new Vector2},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},attenuationDistance:{value:0},attenuationColor:{value:new Color$1(0)},specularIntensity:{value:1},specularIntensityMap:{value:null},specularColor:{value:new Color$1(1,1,1)},specularColorMap:{value:null}}]),vertexShader:ShaderChunk.meshphysical_vert,fragmentShader:ShaderChunk.meshphysical_frag};function WebGLBackground(tt,et,nt,rt,it,ot){const at=new Color$1(0);let st=it===!0?0:1,lt,ct,ut=null,ht=0,dt=null;function pt(gt,yt){let bt=!1,vt=yt.isScene===!0?yt.background:null;vt&&vt.isTexture&&(vt=et.get(vt));const xt=tt.xr,kt=xt.getSession&&xt.getSession();kt&&kt.environmentBlendMode==="additive"&&(vt=null),vt===null?mt(at,st):vt&&vt.isColor&&(mt(vt,1),bt=!0),(tt.autoClear||bt)&&tt.clear(tt.autoClearColor,tt.autoClearDepth,tt.autoClearStencil),vt&&(vt.isCubeTexture||vt.mapping===CubeUVReflectionMapping)?(ct===void 0&&(ct=new Mesh(new BoxGeometry(1,1,1),new ShaderMaterial({name:"BackgroundCubeMaterial",uniforms:cloneUniforms(ShaderLib.cube.uniforms),vertexShader:ShaderLib.cube.vertexShader,fragmentShader:ShaderLib.cube.fragmentShader,side:BackSide,depthTest:!1,depthWrite:!1,fog:!1})),ct.geometry.deleteAttribute("normal"),ct.geometry.deleteAttribute("uv"),ct.onBeforeRender=function(St,Tt,At){this.matrixWorld.copyPosition(At.matrixWorld)},Object.defineProperty(ct.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),rt.update(ct)),ct.material.uniforms.envMap.value=vt,ct.material.uniforms.flipEnvMap.value=vt.isCubeTexture&&vt.isRenderTargetTexture===!1?-1:1,(ut!==vt||ht!==vt.version||dt!==tt.toneMapping)&&(ct.material.needsUpdate=!0,ut=vt,ht=vt.version,dt=tt.toneMapping),ct.layers.enableAll(),gt.unshift(ct,ct.geometry,ct.material,0,0,null)):vt&&vt.isTexture&&(lt===void 0&&(lt=new Mesh(new PlaneGeometry(2,2),new ShaderMaterial({name:"BackgroundMaterial",uniforms:cloneUniforms(ShaderLib.background.uniforms),vertexShader:ShaderLib.background.vertexShader,fragmentShader:ShaderLib.background.fragmentShader,side:FrontSide,depthTest:!1,depthWrite:!1,fog:!1})),lt.geometry.deleteAttribute("normal"),Object.defineProperty(lt.material,"map",{get:function(){return this.uniforms.t2D.value}}),rt.update(lt)),lt.material.uniforms.t2D.value=vt,vt.matrixAutoUpdate===!0&&vt.updateMatrix(),lt.material.uniforms.uvTransform.value.copy(vt.matrix),(ut!==vt||ht!==vt.version||dt!==tt.toneMapping)&&(lt.material.needsUpdate=!0,ut=vt,ht=vt.version,dt=tt.toneMapping),lt.layers.enableAll(),gt.unshift(lt,lt.geometry,lt.material,0,0,null))}function mt(gt,yt){nt.buffers.color.setClear(gt.r,gt.g,gt.b,yt,ot)}return{getClearColor:function(){return at},setClearColor:function(gt,yt=1){at.set(gt),st=yt,mt(at,st)},getClearAlpha:function(){return st},setClearAlpha:function(gt){st=gt,mt(at,st)},render:pt}}function WebGLBindingStates(tt,et,nt,rt){const it=tt.getParameter(34921),ot=rt.isWebGL2?null:et.get("OES_vertex_array_object"),at=rt.isWebGL2||ot!==null,st={},lt=yt(null);let ct=lt,ut=!1;function ht(wt,It,Ot,Wt,zt){let Ft=!1;if(at){const Nt=gt(Wt,Ot,It);ct!==Nt&&(ct=Nt,pt(ct.object)),Ft=bt(wt,Wt,Ot,zt),Ft&&vt(wt,Wt,Ot,zt)}else{const Nt=It.wireframe===!0;(ct.geometry!==Wt.id||ct.program!==Ot.id||ct.wireframe!==Nt)&&(ct.geometry=Wt.id,ct.program=Ot.id,ct.wireframe=Nt,Ft=!0)}zt!==null&&nt.update(zt,34963),(Ft||ut)&&(ut=!1,Et(wt,It,Ot,Wt),zt!==null&&tt.bindBuffer(34963,nt.get(zt).buffer))}function dt(){return rt.isWebGL2?tt.createVertexArray():ot.createVertexArrayOES()}function pt(wt){return rt.isWebGL2?tt.bindVertexArray(wt):ot.bindVertexArrayOES(wt)}function mt(wt){return rt.isWebGL2?tt.deleteVertexArray(wt):ot.deleteVertexArrayOES(wt)}function gt(wt,It,Ot){const Wt=Ot.wireframe===!0;let zt=st[wt.id];zt===void 0&&(zt={},st[wt.id]=zt);let Ft=zt[It.id];Ft===void 0&&(Ft={},zt[It.id]=Ft);let Nt=Ft[Wt];return Nt===void 0&&(Nt=yt(dt()),Ft[Wt]=Nt),Nt}function yt(wt){const It=[],Ot=[],Wt=[];for(let zt=0;zt=0){const en=zt[Mt];let sn=Ft[Mt];if(sn===void 0&&(Mt==="instanceMatrix"&&wt.instanceMatrix&&(sn=wt.instanceMatrix),Mt==="instanceColor"&&wt.instanceColor&&(sn=wt.instanceColor)),en===void 0||en.attribute!==sn||sn&&en.data!==sn.data)return!0;Nt++}return ct.attributesNum!==Nt||ct.index!==Wt}function vt(wt,It,Ot,Wt){const zt={},Ft=It.attributes;let Nt=0;const Ut=Ot.getAttributes();for(const Mt in Ut)if(Ut[Mt].location>=0){let en=Ft[Mt];en===void 0&&(Mt==="instanceMatrix"&&wt.instanceMatrix&&(en=wt.instanceMatrix),Mt==="instanceColor"&&wt.instanceColor&&(en=wt.instanceColor));const sn={};sn.attribute=en,en&&en.data&&(sn.data=en.data),zt[Mt]=sn,Nt++}ct.attributes=zt,ct.attributesNum=Nt,ct.index=Wt}function xt(){const wt=ct.newAttributes;for(let It=0,Ot=wt.length;It=0){let Ht=zt[Ut];if(Ht===void 0&&(Ut==="instanceMatrix"&&wt.instanceMatrix&&(Ht=wt.instanceMatrix),Ut==="instanceColor"&&wt.instanceColor&&(Ht=wt.instanceColor)),Ht!==void 0){const en=Ht.normalized,sn=Ht.itemSize,Kt=nt.get(Ht);if(Kt===void 0)continue;const rn=Kt.buffer,nn=Kt.type,hn=Kt.bytesPerElement;if(Ht.isInterleavedBufferAttribute){const vn=Ht.data,an=vn.stride,Qt=Ht.offset;if(vn.isInstancedInterleavedBuffer){for(let _n=0;_n0&&tt.getShaderPrecisionFormat(35632,36338).precision>0)return"highp";At="mediump"}return At==="mediump"&&tt.getShaderPrecisionFormat(35633,36337).precision>0&&tt.getShaderPrecisionFormat(35632,36337).precision>0?"mediump":"lowp"}const at=typeof WebGL2RenderingContext<"u"&&tt instanceof WebGL2RenderingContext||typeof WebGL2ComputeRenderingContext<"u"&&tt instanceof WebGL2ComputeRenderingContext;let st=nt.precision!==void 0?nt.precision:"highp";const lt=ot(st);lt!==st&&(console.warn("THREE.WebGLRenderer:",st,"not supported, using",lt,"instead."),st=lt);const ct=at||et.has("WEBGL_draw_buffers"),ut=nt.logarithmicDepthBuffer===!0,ht=tt.getParameter(34930),dt=tt.getParameter(35660),pt=tt.getParameter(3379),mt=tt.getParameter(34076),gt=tt.getParameter(34921),yt=tt.getParameter(36347),bt=tt.getParameter(36348),vt=tt.getParameter(36349),xt=dt>0,kt=at||et.has("OES_texture_float"),St=xt&&kt,Tt=at?tt.getParameter(36183):0;return{isWebGL2:at,drawBuffers:ct,getMaxAnisotropy:it,getMaxPrecision:ot,precision:st,logarithmicDepthBuffer:ut,maxTextures:ht,maxVertexTextures:dt,maxTextureSize:pt,maxCubemapSize:mt,maxAttributes:gt,maxVertexUniforms:yt,maxVaryings:bt,maxFragmentUniforms:vt,vertexTextures:xt,floatFragmentTextures:kt,floatVertexTextures:St,maxSamples:Tt}}function WebGLClipping(tt){const et=this;let nt=null,rt=0,it=!1,ot=!1;const at=new Plane,st=new Matrix3,lt={value:null,needsUpdate:!1};this.uniform=lt,this.numPlanes=0,this.numIntersection=0,this.init=function(ht,dt,pt){const mt=ht.length!==0||dt||rt!==0||it;return it=dt,nt=ut(ht,pt,0),rt=ht.length,mt},this.beginShadows=function(){ot=!0,ut(null)},this.endShadows=function(){ot=!1,ct()},this.setState=function(ht,dt,pt){const mt=ht.clippingPlanes,gt=ht.clipIntersection,yt=ht.clipShadows,bt=tt.get(ht);if(!it||mt===null||mt.length===0||ot&&!yt)ot?ut(null):ct();else{const vt=ot?0:rt,xt=vt*4;let kt=bt.clippingState||null;lt.value=kt,kt=ut(mt,dt,xt,pt);for(let St=0;St!==xt;++St)kt[St]=nt[St];bt.clippingState=kt,this.numIntersection=gt?this.numPlanes:0,this.numPlanes+=vt}};function ct(){lt.value!==nt&&(lt.value=nt,lt.needsUpdate=rt>0),et.numPlanes=rt,et.numIntersection=0}function ut(ht,dt,pt,mt){const gt=ht!==null?ht.length:0;let yt=null;if(gt!==0){if(yt=lt.value,mt!==!0||yt===null){const bt=pt+gt*4,vt=dt.matrixWorldInverse;st.getNormalMatrix(vt),(yt===null||yt.length0){const ct=new WebGLCubeRenderTarget(lt.height/2);return ct.fromEquirectangularTexture(tt,at),et.set(at,ct),at.addEventListener("dispose",it),nt(ct.texture,at.mapping)}else return null}}return at}function it(at){const st=at.target;st.removeEventListener("dispose",it);const lt=et.get(st);lt!==void 0&&(et.delete(st),lt.dispose())}function ot(){et=new WeakMap}return{get:rt,dispose:ot}}class OrthographicCamera extends Camera{constructor(et=-1,nt=1,rt=1,it=-1,ot=.1,at=2e3){super(),this.isOrthographicCamera=!0,this.type="OrthographicCamera",this.zoom=1,this.view=null,this.left=et,this.right=nt,this.top=rt,this.bottom=it,this.near=ot,this.far=at,this.updateProjectionMatrix()}copy(et,nt){return super.copy(et,nt),this.left=et.left,this.right=et.right,this.top=et.top,this.bottom=et.bottom,this.near=et.near,this.far=et.far,this.zoom=et.zoom,this.view=et.view===null?null:Object.assign({},et.view),this}setViewOffset(et,nt,rt,it,ot,at){this.view===null&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=et,this.view.fullHeight=nt,this.view.offsetX=rt,this.view.offsetY=it,this.view.width=ot,this.view.height=at,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const et=(this.right-this.left)/(2*this.zoom),nt=(this.top-this.bottom)/(2*this.zoom),rt=(this.right+this.left)/2,it=(this.top+this.bottom)/2;let ot=rt-et,at=rt+et,st=it+nt,lt=it-nt;if(this.view!==null&&this.view.enabled){const ct=(this.right-this.left)/this.view.fullWidth/this.zoom,ut=(this.top-this.bottom)/this.view.fullHeight/this.zoom;ot+=ct*this.view.offsetX,at=ot+ct*this.view.width,st-=ut*this.view.offsetY,lt=st-ut*this.view.height}this.projectionMatrix.makeOrthographic(ot,at,st,lt,this.near,this.far),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(et){const nt=super.toJSON(et);return nt.object.zoom=this.zoom,nt.object.left=this.left,nt.object.right=this.right,nt.object.top=this.top,nt.object.bottom=this.bottom,nt.object.near=this.near,nt.object.far=this.far,this.view!==null&&(nt.object.view=Object.assign({},this.view)),nt}}const LOD_MIN=4,EXTRA_LOD_SIGMA=[.125,.215,.35,.446,.526,.582],MAX_SAMPLES=20,_flatCamera=new OrthographicCamera,_clearColor=new Color$1;let _oldTarget=null;const PHI=(1+Math.sqrt(5))/2,INV_PHI=1/PHI,_axisDirections=[new Vector3(1,1,1),new Vector3(-1,1,1),new Vector3(1,1,-1),new Vector3(-1,1,-1),new Vector3(0,PHI,INV_PHI),new Vector3(0,PHI,-INV_PHI),new Vector3(INV_PHI,0,PHI),new Vector3(-INV_PHI,0,PHI),new Vector3(PHI,INV_PHI,0),new Vector3(-PHI,INV_PHI,0)];class PMREMGenerator{constructor(et){this._renderer=et,this._pingPongRenderTarget=null,this._lodMax=0,this._cubeSize=0,this._lodPlanes=[],this._sizeLods=[],this._sigmas=[],this._blurMaterial=null,this._cubemapMaterial=null,this._equirectMaterial=null,this._compileMaterial(this._blurMaterial)}fromScene(et,nt=0,rt=.1,it=100){_oldTarget=this._renderer.getRenderTarget(),this._setSize(256);const ot=this._allocateTargets();return ot.depthBuffer=!0,this._sceneToCubeUV(et,rt,it,ot),nt>0&&this._blur(ot,0,0,nt),this._applyPMREM(ot),this._cleanup(ot),ot}fromEquirectangular(et,nt=null){return this._fromTexture(et,nt)}fromCubemap(et,nt=null){return this._fromTexture(et,nt)}compileCubemapShader(){this._cubemapMaterial===null&&(this._cubemapMaterial=_getCubemapMaterial(),this._compileMaterial(this._cubemapMaterial))}compileEquirectangularShader(){this._equirectMaterial===null&&(this._equirectMaterial=_getEquirectMaterial(),this._compileMaterial(this._equirectMaterial))}dispose(){this._dispose(),this._cubemapMaterial!==null&&this._cubemapMaterial.dispose(),this._equirectMaterial!==null&&this._equirectMaterial.dispose()}_setSize(et){this._lodMax=Math.floor(Math.log2(et)),this._cubeSize=Math.pow(2,this._lodMax)}_dispose(){this._blurMaterial!==null&&this._blurMaterial.dispose(),this._pingPongRenderTarget!==null&&this._pingPongRenderTarget.dispose();for(let et=0;et2?xt:0,xt,xt),ut.setRenderTarget(it),gt&&ut.render(mt,st),ut.render(et,st)}mt.geometry.dispose(),mt.material.dispose(),ut.toneMapping=dt,ut.autoClear=ht,et.background=yt}_textureToCubeUV(et,nt){const rt=this._renderer,it=et.mapping===CubeReflectionMapping||et.mapping===CubeRefractionMapping;it?(this._cubemapMaterial===null&&(this._cubemapMaterial=_getCubemapMaterial()),this._cubemapMaterial.uniforms.flipEnvMap.value=et.isRenderTargetTexture===!1?-1:1):this._equirectMaterial===null&&(this._equirectMaterial=_getEquirectMaterial());const ot=it?this._cubemapMaterial:this._equirectMaterial,at=new Mesh(this._lodPlanes[0],ot),st=ot.uniforms;st.envMap.value=et;const lt=this._cubeSize;_setViewport(nt,0,0,3*lt,2*lt),rt.setRenderTarget(nt),rt.render(at,_flatCamera)}_applyPMREM(et){const nt=this._renderer,rt=nt.autoClear;nt.autoClear=!1;for(let it=1;itMAX_SAMPLES&&console.warn(`sigmaRadians, ${ot}, is too large and will clip, as it requested ${yt} samples when the maximum is set to ${MAX_SAMPLES}`);const bt=[];let vt=0;for(let At=0;Atxt-LOD_MIN?it-xt+LOD_MIN:0),Tt=4*(this._cubeSize-kt);_setViewport(nt,St,Tt,3*kt,2*kt),lt.setRenderTarget(nt),lt.render(ht,_flatCamera)}}function _createPlanes(tt){const et=[],nt=[],rt=[];let it=tt;const ot=tt-LOD_MIN+1+EXTRA_LOD_SIGMA.length;for(let at=0;attt-LOD_MIN?lt=EXTRA_LOD_SIGMA[at-tt+LOD_MIN-1]:at===0&&(lt=0),rt.push(lt);const ct=1/(st-2),ut=-ct,ht=1+ct,dt=[ut,ut,ht,ut,ht,ht,ut,ut,ht,ht,ut,ht],pt=6,mt=6,gt=3,yt=2,bt=1,vt=new Float32Array(gt*mt*pt),xt=new Float32Array(yt*mt*pt),kt=new Float32Array(bt*mt*pt);for(let Tt=0;Tt2?0:-1,$t=[At,Et,0,At+2/3,Et,0,At+2/3,Et+1,0,At,Et,0,At+2/3,Et+1,0,At,Et+1,0];vt.set($t,gt*mt*Tt),xt.set(dt,yt*mt*Tt);const Dt=[Tt,Tt,Tt,Tt,Tt,Tt];kt.set(Dt,bt*mt*Tt)}const St=new BufferGeometry;St.setAttribute("position",new BufferAttribute(vt,gt)),St.setAttribute("uv",new BufferAttribute(xt,yt)),St.setAttribute("faceIndex",new BufferAttribute(kt,bt)),et.push(St),it>LOD_MIN&&it--}return{lodPlanes:et,sizeLods:nt,sigmas:rt}}function _createRenderTarget(tt,et,nt){const rt=new WebGLRenderTarget(tt,et,nt);return rt.texture.mapping=CubeUVReflectionMapping,rt.texture.name="PMREM.cubeUv",rt.scissorTest=!0,rt}function _setViewport(tt,et,nt,rt,it){tt.viewport.set(et,nt,rt,it),tt.scissor.set(et,nt,rt,it)}function _getBlurShader(tt,et,nt){const rt=new Float32Array(MAX_SAMPLES),it=new Vector3(0,1,0);return new ShaderMaterial({name:"SphericalGaussianBlur",defines:{n:MAX_SAMPLES,CUBEUV_TEXEL_WIDTH:1/et,CUBEUV_TEXEL_HEIGHT:1/nt,CUBEUV_MAX_MIP:`${tt}.0`},uniforms:{envMap:{value:null},samples:{value:1},weights:{value:rt},latitudinal:{value:!1},dTheta:{value:0},mipInt:{value:0},poleAxis:{value:it}},vertexShader:_getCommonVertexShader(),fragmentShader:` +}`, + ShaderChunk = { + alphamap_fragment, + alphamap_pars_fragment, + alphatest_fragment, + alphatest_pars_fragment, + aomap_fragment, + aomap_pars_fragment, + begin_vertex, + beginnormal_vertex, + bsdfs, + iridescence_fragment, + bumpmap_pars_fragment, + clipping_planes_fragment, + clipping_planes_pars_fragment, + clipping_planes_pars_vertex, + clipping_planes_vertex, + color_fragment, + color_pars_fragment, + color_pars_vertex, + color_vertex, + common, + cube_uv_reflection_fragment, + defaultnormal_vertex, + displacementmap_pars_vertex, + displacementmap_vertex, + emissivemap_fragment, + emissivemap_pars_fragment, + encodings_fragment, + encodings_pars_fragment, + envmap_fragment, + envmap_common_pars_fragment, + envmap_pars_fragment, + envmap_pars_vertex, + envmap_physical_pars_fragment, + envmap_vertex, + fog_vertex, + fog_pars_vertex, + fog_fragment, + fog_pars_fragment, + gradientmap_pars_fragment, + lightmap_fragment, + lightmap_pars_fragment, + lights_lambert_vertex, + lights_pars_begin, + lights_toon_fragment, + lights_toon_pars_fragment, + lights_phong_fragment, + lights_phong_pars_fragment, + lights_physical_fragment, + lights_physical_pars_fragment, + lights_fragment_begin, + lights_fragment_maps, + lights_fragment_end, + logdepthbuf_fragment, + logdepthbuf_pars_fragment, + logdepthbuf_pars_vertex, + logdepthbuf_vertex, + map_fragment, + map_pars_fragment, + map_particle_fragment, + map_particle_pars_fragment, + metalnessmap_fragment, + metalnessmap_pars_fragment, + morphcolor_vertex, + morphnormal_vertex, + morphtarget_pars_vertex, + morphtarget_vertex, + normal_fragment_begin, + normal_fragment_maps, + normal_pars_fragment, + normal_pars_vertex, + normal_vertex, + normalmap_pars_fragment, + clearcoat_normal_fragment_begin, + clearcoat_normal_fragment_maps, + clearcoat_pars_fragment, + iridescence_pars_fragment, + output_fragment, + packing, + premultiplied_alpha_fragment, + project_vertex, + dithering_fragment, + dithering_pars_fragment, + roughnessmap_fragment, + roughnessmap_pars_fragment, + shadowmap_pars_fragment, + shadowmap_pars_vertex, + shadowmap_vertex, + shadowmask_pars_fragment, + skinbase_vertex, + skinning_pars_vertex, + skinning_vertex, + skinnormal_vertex, + specularmap_fragment, + specularmap_pars_fragment, + tonemapping_fragment, + tonemapping_pars_fragment, + transmission_fragment, + transmission_pars_fragment, + uv_pars_fragment, + uv_pars_vertex, + uv_vertex, + uv2_pars_fragment, + uv2_pars_vertex, + uv2_vertex, + worldpos_vertex, + background_vert: vertex$g, + background_frag: fragment$g, + cube_vert: vertex$f, + cube_frag: fragment$f, + depth_vert: vertex$e, + depth_frag: fragment$e, + distanceRGBA_vert: vertex$d, + distanceRGBA_frag: fragment$d, + equirect_vert: vertex$c, + equirect_frag: fragment$c, + linedashed_vert: vertex$b, + linedashed_frag: fragment$b, + meshbasic_vert: vertex$a, + meshbasic_frag: fragment$a, + meshlambert_vert: vertex$9, + meshlambert_frag: fragment$9, + meshmatcap_vert: vertex$8, + meshmatcap_frag: fragment$8, + meshnormal_vert: vertex$7, + meshnormal_frag: fragment$7, + meshphong_vert: vertex$6, + meshphong_frag: fragment$6, + meshphysical_vert: vertex$5, + meshphysical_frag: fragment$5, + meshtoon_vert: vertex$4, + meshtoon_frag: fragment$4, + points_vert: vertex$3, + points_frag: fragment$3, + shadow_vert: vertex$2, + shadow_frag: fragment$2, + sprite_vert: vertex$1, + sprite_frag: fragment$1, + }, + UniformsLib = { + common: { + diffuse: { value: new Color$1(16777215) }, + opacity: { value: 1 }, + map: { value: null }, + uvTransform: { value: new Matrix3() }, + uv2Transform: { value: new Matrix3() }, + alphaMap: { value: null }, + alphaTest: { value: 0 }, + }, + specularmap: { specularMap: { value: null } }, + envmap: { + envMap: { value: null }, + flipEnvMap: { value: -1 }, + reflectivity: { value: 1 }, + ior: { value: 1.5 }, + refractionRatio: { value: 0.98 }, + }, + aomap: { aoMap: { value: null }, aoMapIntensity: { value: 1 } }, + lightmap: { lightMap: { value: null }, lightMapIntensity: { value: 1 } }, + emissivemap: { emissiveMap: { value: null } }, + bumpmap: { bumpMap: { value: null }, bumpScale: { value: 1 } }, + normalmap: { normalMap: { value: null }, normalScale: { value: new Vector2(1, 1) } }, + displacementmap: { + displacementMap: { value: null }, + displacementScale: { value: 1 }, + displacementBias: { value: 0 }, + }, + roughnessmap: { roughnessMap: { value: null } }, + metalnessmap: { metalnessMap: { value: null } }, + gradientmap: { gradientMap: { value: null } }, + fog: { + fogDensity: { value: 25e-5 }, + fogNear: { value: 1 }, + fogFar: { value: 2e3 }, + fogColor: { value: new Color$1(16777215) }, + }, + lights: { + ambientLightColor: { value: [] }, + lightProbe: { value: [] }, + directionalLights: { value: [], properties: { direction: {}, color: {} } }, + directionalLightShadows: { + value: [], + properties: { shadowBias: {}, shadowNormalBias: {}, shadowRadius: {}, shadowMapSize: {} }, + }, + directionalShadowMap: { value: [] }, + directionalShadowMatrix: { value: [] }, + spotLights: { + value: [], + properties: { color: {}, position: {}, direction: {}, distance: {}, coneCos: {}, penumbraCos: {}, decay: {} }, + }, + spotLightShadows: { + value: [], + properties: { shadowBias: {}, shadowNormalBias: {}, shadowRadius: {}, shadowMapSize: {} }, + }, + spotShadowMap: { value: [] }, + spotShadowMatrix: { value: [] }, + pointLights: { value: [], properties: { color: {}, position: {}, decay: {}, distance: {} } }, + pointLightShadows: { + value: [], + properties: { + shadowBias: {}, + shadowNormalBias: {}, + shadowRadius: {}, + shadowMapSize: {}, + shadowCameraNear: {}, + shadowCameraFar: {}, + }, + }, + pointShadowMap: { value: [] }, + pointShadowMatrix: { value: [] }, + hemisphereLights: { value: [], properties: { direction: {}, skyColor: {}, groundColor: {} } }, + rectAreaLights: { value: [], properties: { color: {}, position: {}, width: {}, height: {} } }, + ltc_1: { value: null }, + ltc_2: { value: null }, + }, + points: { + diffuse: { value: new Color$1(16777215) }, + opacity: { value: 1 }, + size: { value: 1 }, + scale: { value: 1 }, + map: { value: null }, + alphaMap: { value: null }, + alphaTest: { value: 0 }, + uvTransform: { value: new Matrix3() }, + }, + sprite: { + diffuse: { value: new Color$1(16777215) }, + opacity: { value: 1 }, + center: { value: new Vector2(0.5, 0.5) }, + rotation: { value: 0 }, + map: { value: null }, + alphaMap: { value: null }, + alphaTest: { value: 0 }, + uvTransform: { value: new Matrix3() }, + }, + }, + ShaderLib = { + basic: { + uniforms: mergeUniforms([ + UniformsLib.common, + UniformsLib.specularmap, + UniformsLib.envmap, + UniformsLib.aomap, + UniformsLib.lightmap, + UniformsLib.fog, + ]), + vertexShader: ShaderChunk.meshbasic_vert, + fragmentShader: ShaderChunk.meshbasic_frag, + }, + lambert: { + uniforms: mergeUniforms([ + UniformsLib.common, + UniformsLib.specularmap, + UniformsLib.envmap, + UniformsLib.aomap, + UniformsLib.lightmap, + UniformsLib.emissivemap, + UniformsLib.fog, + UniformsLib.lights, + { emissive: { value: new Color$1(0) } }, + ]), + vertexShader: ShaderChunk.meshlambert_vert, + fragmentShader: ShaderChunk.meshlambert_frag, + }, + phong: { + uniforms: mergeUniforms([ + UniformsLib.common, + UniformsLib.specularmap, + UniformsLib.envmap, + UniformsLib.aomap, + UniformsLib.lightmap, + UniformsLib.emissivemap, + UniformsLib.bumpmap, + UniformsLib.normalmap, + UniformsLib.displacementmap, + UniformsLib.fog, + UniformsLib.lights, + { emissive: { value: new Color$1(0) }, specular: { value: new Color$1(1118481) }, shininess: { value: 30 } }, + ]), + vertexShader: ShaderChunk.meshphong_vert, + fragmentShader: ShaderChunk.meshphong_frag, + }, + standard: { + uniforms: mergeUniforms([ + UniformsLib.common, + UniformsLib.envmap, + UniformsLib.aomap, + UniformsLib.lightmap, + UniformsLib.emissivemap, + UniformsLib.bumpmap, + UniformsLib.normalmap, + UniformsLib.displacementmap, + UniformsLib.roughnessmap, + UniformsLib.metalnessmap, + UniformsLib.fog, + UniformsLib.lights, + { + emissive: { value: new Color$1(0) }, + roughness: { value: 1 }, + metalness: { value: 0 }, + envMapIntensity: { value: 1 }, + }, + ]), + vertexShader: ShaderChunk.meshphysical_vert, + fragmentShader: ShaderChunk.meshphysical_frag, + }, + toon: { + uniforms: mergeUniforms([ + UniformsLib.common, + UniformsLib.aomap, + UniformsLib.lightmap, + UniformsLib.emissivemap, + UniformsLib.bumpmap, + UniformsLib.normalmap, + UniformsLib.displacementmap, + UniformsLib.gradientmap, + UniformsLib.fog, + UniformsLib.lights, + { emissive: { value: new Color$1(0) } }, + ]), + vertexShader: ShaderChunk.meshtoon_vert, + fragmentShader: ShaderChunk.meshtoon_frag, + }, + matcap: { + uniforms: mergeUniforms([ + UniformsLib.common, + UniformsLib.bumpmap, + UniformsLib.normalmap, + UniformsLib.displacementmap, + UniformsLib.fog, + { matcap: { value: null } }, + ]), + vertexShader: ShaderChunk.meshmatcap_vert, + fragmentShader: ShaderChunk.meshmatcap_frag, + }, + points: { + uniforms: mergeUniforms([UniformsLib.points, UniformsLib.fog]), + vertexShader: ShaderChunk.points_vert, + fragmentShader: ShaderChunk.points_frag, + }, + dashed: { + uniforms: mergeUniforms([ + UniformsLib.common, + UniformsLib.fog, + { scale: { value: 1 }, dashSize: { value: 1 }, totalSize: { value: 2 } }, + ]), + vertexShader: ShaderChunk.linedashed_vert, + fragmentShader: ShaderChunk.linedashed_frag, + }, + depth: { + uniforms: mergeUniforms([UniformsLib.common, UniformsLib.displacementmap]), + vertexShader: ShaderChunk.depth_vert, + fragmentShader: ShaderChunk.depth_frag, + }, + normal: { + uniforms: mergeUniforms([ + UniformsLib.common, + UniformsLib.bumpmap, + UniformsLib.normalmap, + UniformsLib.displacementmap, + { opacity: { value: 1 } }, + ]), + vertexShader: ShaderChunk.meshnormal_vert, + fragmentShader: ShaderChunk.meshnormal_frag, + }, + sprite: { + uniforms: mergeUniforms([UniformsLib.sprite, UniformsLib.fog]), + vertexShader: ShaderChunk.sprite_vert, + fragmentShader: ShaderChunk.sprite_frag, + }, + background: { + uniforms: { uvTransform: { value: new Matrix3() }, t2D: { value: null } }, + vertexShader: ShaderChunk.background_vert, + fragmentShader: ShaderChunk.background_frag, + }, + cube: { + uniforms: mergeUniforms([UniformsLib.envmap, { opacity: { value: 1 } }]), + vertexShader: ShaderChunk.cube_vert, + fragmentShader: ShaderChunk.cube_frag, + }, + equirect: { + uniforms: { tEquirect: { value: null } }, + vertexShader: ShaderChunk.equirect_vert, + fragmentShader: ShaderChunk.equirect_frag, + }, + distanceRGBA: { + uniforms: mergeUniforms([ + UniformsLib.common, + UniformsLib.displacementmap, + { referencePosition: { value: new Vector3() }, nearDistance: { value: 1 }, farDistance: { value: 1e3 } }, + ]), + vertexShader: ShaderChunk.distanceRGBA_vert, + fragmentShader: ShaderChunk.distanceRGBA_frag, + }, + shadow: { + uniforms: mergeUniforms([ + UniformsLib.lights, + UniformsLib.fog, + { color: { value: new Color$1(0) }, opacity: { value: 1 } }, + ]), + vertexShader: ShaderChunk.shadow_vert, + fragmentShader: ShaderChunk.shadow_frag, + }, + } + ShaderLib.physical = { + uniforms: mergeUniforms([ + ShaderLib.standard.uniforms, + { + clearcoat: { value: 0 }, + clearcoatMap: { value: null }, + clearcoatRoughness: { value: 0 }, + clearcoatRoughnessMap: { value: null }, + clearcoatNormalScale: { value: new Vector2(1, 1) }, + clearcoatNormalMap: { value: null }, + iridescence: { value: 0 }, + iridescenceMap: { value: null }, + iridescenceIOR: { value: 1.3 }, + iridescenceThicknessMinimum: { value: 100 }, + iridescenceThicknessMaximum: { value: 400 }, + iridescenceThicknessMap: { value: null }, + sheen: { value: 0 }, + sheenColor: { value: new Color$1(0) }, + sheenColorMap: { value: null }, + sheenRoughness: { value: 1 }, + sheenRoughnessMap: { value: null }, + transmission: { value: 0 }, + transmissionMap: { value: null }, + transmissionSamplerSize: { value: new Vector2() }, + transmissionSamplerMap: { value: null }, + thickness: { value: 0 }, + thicknessMap: { value: null }, + attenuationDistance: { value: 0 }, + attenuationColor: { value: new Color$1(0) }, + specularIntensity: { value: 1 }, + specularIntensityMap: { value: null }, + specularColor: { value: new Color$1(1, 1, 1) }, + specularColorMap: { value: null }, + }, + ]), + vertexShader: ShaderChunk.meshphysical_vert, + fragmentShader: ShaderChunk.meshphysical_frag, + } + function WebGLBackground(tt, et, nt, rt, it, ot) { + const at = new Color$1(0) + let st = it === !0 ? 0 : 1, + lt, + ct, + ut = null, + ht = 0, + dt = null + function pt(gt, yt) { + let bt = !1, + vt = yt.isScene === !0 ? yt.background : null + vt && vt.isTexture && (vt = et.get(vt)) + const xt = tt.xr, + kt = xt.getSession && xt.getSession() + kt && kt.environmentBlendMode === 'additive' && (vt = null), + vt === null ? mt(at, st) : vt && vt.isColor && (mt(vt, 1), (bt = !0)), + (tt.autoClear || bt) && tt.clear(tt.autoClearColor, tt.autoClearDepth, tt.autoClearStencil), + vt && (vt.isCubeTexture || vt.mapping === CubeUVReflectionMapping) + ? (ct === void 0 && + ((ct = new Mesh( + new BoxGeometry(1, 1, 1), + new ShaderMaterial({ + name: 'BackgroundCubeMaterial', + uniforms: cloneUniforms(ShaderLib.cube.uniforms), + vertexShader: ShaderLib.cube.vertexShader, + fragmentShader: ShaderLib.cube.fragmentShader, + side: BackSide, + depthTest: !1, + depthWrite: !1, + fog: !1, + }), + )), + ct.geometry.deleteAttribute('normal'), + ct.geometry.deleteAttribute('uv'), + (ct.onBeforeRender = function (St, Tt, At) { + this.matrixWorld.copyPosition(At.matrixWorld) + }), + Object.defineProperty(ct.material, 'envMap', { + get: function () { + return this.uniforms.envMap.value + }, + }), + rt.update(ct)), + (ct.material.uniforms.envMap.value = vt), + (ct.material.uniforms.flipEnvMap.value = vt.isCubeTexture && vt.isRenderTargetTexture === !1 ? -1 : 1), + (ut !== vt || ht !== vt.version || dt !== tt.toneMapping) && + ((ct.material.needsUpdate = !0), (ut = vt), (ht = vt.version), (dt = tt.toneMapping)), + ct.layers.enableAll(), + gt.unshift(ct, ct.geometry, ct.material, 0, 0, null)) + : vt && + vt.isTexture && + (lt === void 0 && + ((lt = new Mesh( + new PlaneGeometry(2, 2), + new ShaderMaterial({ + name: 'BackgroundMaterial', + uniforms: cloneUniforms(ShaderLib.background.uniforms), + vertexShader: ShaderLib.background.vertexShader, + fragmentShader: ShaderLib.background.fragmentShader, + side: FrontSide, + depthTest: !1, + depthWrite: !1, + fog: !1, + }), + )), + lt.geometry.deleteAttribute('normal'), + Object.defineProperty(lt.material, 'map', { + get: function () { + return this.uniforms.t2D.value + }, + }), + rt.update(lt)), + (lt.material.uniforms.t2D.value = vt), + vt.matrixAutoUpdate === !0 && vt.updateMatrix(), + lt.material.uniforms.uvTransform.value.copy(vt.matrix), + (ut !== vt || ht !== vt.version || dt !== tt.toneMapping) && + ((lt.material.needsUpdate = !0), (ut = vt), (ht = vt.version), (dt = tt.toneMapping)), + lt.layers.enableAll(), + gt.unshift(lt, lt.geometry, lt.material, 0, 0, null)) + } + function mt(gt, yt) { + nt.buffers.color.setClear(gt.r, gt.g, gt.b, yt, ot) + } + return { + getClearColor: function () { + return at + }, + setClearColor: function (gt, yt = 1) { + at.set(gt), (st = yt), mt(at, st) + }, + getClearAlpha: function () { + return st + }, + setClearAlpha: function (gt) { + ;(st = gt), mt(at, st) + }, + render: pt, + } + } + function WebGLBindingStates(tt, et, nt, rt) { + const it = tt.getParameter(34921), + ot = rt.isWebGL2 ? null : et.get('OES_vertex_array_object'), + at = rt.isWebGL2 || ot !== null, + st = {}, + lt = yt(null) + let ct = lt, + ut = !1 + function ht(wt, It, Ot, Wt, zt) { + let Ft = !1 + if (at) { + const Nt = gt(Wt, Ot, It) + ct !== Nt && ((ct = Nt), pt(ct.object)), (Ft = bt(wt, Wt, Ot, zt)), Ft && vt(wt, Wt, Ot, zt) + } else { + const Nt = It.wireframe === !0 + ;(ct.geometry !== Wt.id || ct.program !== Ot.id || ct.wireframe !== Nt) && + ((ct.geometry = Wt.id), (ct.program = Ot.id), (ct.wireframe = Nt), (Ft = !0)) + } + zt !== null && nt.update(zt, 34963), + (Ft || ut) && ((ut = !1), Et(wt, It, Ot, Wt), zt !== null && tt.bindBuffer(34963, nt.get(zt).buffer)) + } + function dt() { + return rt.isWebGL2 ? tt.createVertexArray() : ot.createVertexArrayOES() + } + function pt(wt) { + return rt.isWebGL2 ? tt.bindVertexArray(wt) : ot.bindVertexArrayOES(wt) + } + function mt(wt) { + return rt.isWebGL2 ? tt.deleteVertexArray(wt) : ot.deleteVertexArrayOES(wt) + } + function gt(wt, It, Ot) { + const Wt = Ot.wireframe === !0 + let zt = st[wt.id] + zt === void 0 && ((zt = {}), (st[wt.id] = zt)) + let Ft = zt[It.id] + Ft === void 0 && ((Ft = {}), (zt[It.id] = Ft)) + let Nt = Ft[Wt] + return Nt === void 0 && ((Nt = yt(dt())), (Ft[Wt] = Nt)), Nt + } + function yt(wt) { + const It = [], + Ot = [], + Wt = [] + for (let zt = 0; zt < it; zt++) (It[zt] = 0), (Ot[zt] = 0), (Wt[zt] = 0) + return { + geometry: null, + program: null, + wireframe: !1, + newAttributes: It, + enabledAttributes: Ot, + attributeDivisors: Wt, + object: wt, + attributes: {}, + index: null, + } + } + function bt(wt, It, Ot, Wt) { + const zt = ct.attributes, + Ft = It.attributes + let Nt = 0 + const Ut = Ot.getAttributes() + for (const Mt in Ut) + if (Ut[Mt].location >= 0) { + const en = zt[Mt] + let sn = Ft[Mt] + if ( + (sn === void 0 && + (Mt === 'instanceMatrix' && wt.instanceMatrix && (sn = wt.instanceMatrix), + Mt === 'instanceColor' && wt.instanceColor && (sn = wt.instanceColor)), + en === void 0 || en.attribute !== sn || (sn && en.data !== sn.data)) + ) + return !0 + Nt++ + } + return ct.attributesNum !== Nt || ct.index !== Wt + } + function vt(wt, It, Ot, Wt) { + const zt = {}, + Ft = It.attributes + let Nt = 0 + const Ut = Ot.getAttributes() + for (const Mt in Ut) + if (Ut[Mt].location >= 0) { + let en = Ft[Mt] + en === void 0 && + (Mt === 'instanceMatrix' && wt.instanceMatrix && (en = wt.instanceMatrix), + Mt === 'instanceColor' && wt.instanceColor && (en = wt.instanceColor)) + const sn = {} + ;(sn.attribute = en), en && en.data && (sn.data = en.data), (zt[Mt] = sn), Nt++ + } + ;(ct.attributes = zt), (ct.attributesNum = Nt), (ct.index = Wt) + } + function xt() { + const wt = ct.newAttributes + for (let It = 0, Ot = wt.length; It < Ot; It++) wt[It] = 0 + } + function kt(wt) { + St(wt, 0) + } + function St(wt, It) { + const Ot = ct.newAttributes, + Wt = ct.enabledAttributes, + zt = ct.attributeDivisors + ;(Ot[wt] = 1), + Wt[wt] === 0 && (tt.enableVertexAttribArray(wt), (Wt[wt] = 1)), + zt[wt] !== It && + ((rt.isWebGL2 ? tt : et.get('ANGLE_instanced_arrays'))[ + rt.isWebGL2 ? 'vertexAttribDivisor' : 'vertexAttribDivisorANGLE' + ](wt, It), + (zt[wt] = It)) + } + function Tt() { + const wt = ct.newAttributes, + It = ct.enabledAttributes + for (let Ot = 0, Wt = It.length; Ot < Wt; Ot++) + It[Ot] !== wt[Ot] && (tt.disableVertexAttribArray(Ot), (It[Ot] = 0)) + } + function At(wt, It, Ot, Wt, zt, Ft) { + rt.isWebGL2 === !0 && (Ot === 5124 || Ot === 5125) + ? tt.vertexAttribIPointer(wt, It, Ot, zt, Ft) + : tt.vertexAttribPointer(wt, It, Ot, Wt, zt, Ft) + } + function Et(wt, It, Ot, Wt) { + if ( + rt.isWebGL2 === !1 && + (wt.isInstancedMesh || Wt.isInstancedBufferGeometry) && + et.get('ANGLE_instanced_arrays') === null + ) + return + xt() + const zt = Wt.attributes, + Ft = Ot.getAttributes(), + Nt = It.defaultAttributeValues + for (const Ut in Ft) { + const Mt = Ft[Ut] + if (Mt.location >= 0) { + let Ht = zt[Ut] + if ( + (Ht === void 0 && + (Ut === 'instanceMatrix' && wt.instanceMatrix && (Ht = wt.instanceMatrix), + Ut === 'instanceColor' && wt.instanceColor && (Ht = wt.instanceColor)), + Ht !== void 0) + ) { + const en = Ht.normalized, + sn = Ht.itemSize, + Kt = nt.get(Ht) + if (Kt === void 0) continue + const rn = Kt.buffer, + nn = Kt.type, + hn = Kt.bytesPerElement + if (Ht.isInterleavedBufferAttribute) { + const vn = Ht.data, + an = vn.stride, + Qt = Ht.offset + if (vn.isInstancedInterleavedBuffer) { + for (let _n = 0; _n < Mt.locationSize; _n++) St(Mt.location + _n, vn.meshPerAttribute) + wt.isInstancedMesh !== !0 && + Wt._maxInstanceCount === void 0 && + (Wt._maxInstanceCount = vn.meshPerAttribute * vn.count) + } else for (let _n = 0; _n < Mt.locationSize; _n++) kt(Mt.location + _n) + tt.bindBuffer(34962, rn) + for (let _n = 0; _n < Mt.locationSize; _n++) + At(Mt.location + _n, sn / Mt.locationSize, nn, en, an * hn, (Qt + (sn / Mt.locationSize) * _n) * hn) + } else { + if (Ht.isInstancedBufferAttribute) { + for (let vn = 0; vn < Mt.locationSize; vn++) St(Mt.location + vn, Ht.meshPerAttribute) + wt.isInstancedMesh !== !0 && + Wt._maxInstanceCount === void 0 && + (Wt._maxInstanceCount = Ht.meshPerAttribute * Ht.count) + } else for (let vn = 0; vn < Mt.locationSize; vn++) kt(Mt.location + vn) + tt.bindBuffer(34962, rn) + for (let vn = 0; vn < Mt.locationSize; vn++) + At(Mt.location + vn, sn / Mt.locationSize, nn, en, sn * hn, (sn / Mt.locationSize) * vn * hn) + } + } else if (Nt !== void 0) { + const en = Nt[Ut] + if (en !== void 0) + switch (en.length) { + case 2: + tt.vertexAttrib2fv(Mt.location, en) + break + case 3: + tt.vertexAttrib3fv(Mt.location, en) + break + case 4: + tt.vertexAttrib4fv(Mt.location, en) + break + default: + tt.vertexAttrib1fv(Mt.location, en) + } + } + } + } + Tt() + } + function $t() { + Pt() + for (const wt in st) { + const It = st[wt] + for (const Ot in It) { + const Wt = It[Ot] + for (const zt in Wt) mt(Wt[zt].object), delete Wt[zt] + delete It[Ot] + } + delete st[wt] + } + } + function Dt(wt) { + if (st[wt.id] === void 0) return + const It = st[wt.id] + for (const Ot in It) { + const Wt = It[Ot] + for (const zt in Wt) mt(Wt[zt].object), delete Wt[zt] + delete It[Ot] + } + delete st[wt.id] + } + function jt(wt) { + for (const It in st) { + const Ot = st[It] + if (Ot[wt.id] === void 0) continue + const Wt = Ot[wt.id] + for (const zt in Wt) mt(Wt[zt].object), delete Wt[zt] + delete Ot[wt.id] + } + } + function Pt() { + Ct(), (ut = !0), ct !== lt && ((ct = lt), pt(ct.object)) + } + function Ct() { + ;(lt.geometry = null), (lt.program = null), (lt.wireframe = !1) + } + return { + setup: ht, + reset: Pt, + resetDefaultState: Ct, + dispose: $t, + releaseStatesOfGeometry: Dt, + releaseStatesOfProgram: jt, + initAttributes: xt, + enableAttribute: kt, + disableUnusedAttributes: Tt, + } + } + function WebGLBufferRenderer(tt, et, nt, rt) { + const it = rt.isWebGL2 + let ot + function at(ct) { + ot = ct + } + function st(ct, ut) { + tt.drawArrays(ot, ct, ut), nt.update(ut, ot, 1) + } + function lt(ct, ut, ht) { + if (ht === 0) return + let dt, pt + if (it) (dt = tt), (pt = 'drawArraysInstanced') + else if (((dt = et.get('ANGLE_instanced_arrays')), (pt = 'drawArraysInstancedANGLE'), dt === null)) { + console.error( + 'THREE.WebGLBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.', + ) + return + } + dt[pt](ot, ct, ut, ht), nt.update(ut, ot, ht) + } + ;(this.setMode = at), (this.render = st), (this.renderInstances = lt) + } + function WebGLCapabilities(tt, et, nt) { + let rt + function it() { + if (rt !== void 0) return rt + if (et.has('EXT_texture_filter_anisotropic') === !0) { + const At = et.get('EXT_texture_filter_anisotropic') + rt = tt.getParameter(At.MAX_TEXTURE_MAX_ANISOTROPY_EXT) + } else rt = 0 + return rt + } + function ot(At) { + if (At === 'highp') { + if ( + tt.getShaderPrecisionFormat(35633, 36338).precision > 0 && + tt.getShaderPrecisionFormat(35632, 36338).precision > 0 + ) + return 'highp' + At = 'mediump' + } + return At === 'mediump' && + tt.getShaderPrecisionFormat(35633, 36337).precision > 0 && + tt.getShaderPrecisionFormat(35632, 36337).precision > 0 + ? 'mediump' + : 'lowp' + } + const at = + (typeof WebGL2RenderingContext < 'u' && tt instanceof WebGL2RenderingContext) || + (typeof WebGL2ComputeRenderingContext < 'u' && tt instanceof WebGL2ComputeRenderingContext) + let st = nt.precision !== void 0 ? nt.precision : 'highp' + const lt = ot(st) + lt !== st && (console.warn('THREE.WebGLRenderer:', st, 'not supported, using', lt, 'instead.'), (st = lt)) + const ct = at || et.has('WEBGL_draw_buffers'), + ut = nt.logarithmicDepthBuffer === !0, + ht = tt.getParameter(34930), + dt = tt.getParameter(35660), + pt = tt.getParameter(3379), + mt = tt.getParameter(34076), + gt = tt.getParameter(34921), + yt = tt.getParameter(36347), + bt = tt.getParameter(36348), + vt = tt.getParameter(36349), + xt = dt > 0, + kt = at || et.has('OES_texture_float'), + St = xt && kt, + Tt = at ? tt.getParameter(36183) : 0 + return { + isWebGL2: at, + drawBuffers: ct, + getMaxAnisotropy: it, + getMaxPrecision: ot, + precision: st, + logarithmicDepthBuffer: ut, + maxTextures: ht, + maxVertexTextures: dt, + maxTextureSize: pt, + maxCubemapSize: mt, + maxAttributes: gt, + maxVertexUniforms: yt, + maxVaryings: bt, + maxFragmentUniforms: vt, + vertexTextures: xt, + floatFragmentTextures: kt, + floatVertexTextures: St, + maxSamples: Tt, + } + } + function WebGLClipping(tt) { + const et = this + let nt = null, + rt = 0, + it = !1, + ot = !1 + const at = new Plane(), + st = new Matrix3(), + lt = { value: null, needsUpdate: !1 } + ;(this.uniform = lt), + (this.numPlanes = 0), + (this.numIntersection = 0), + (this.init = function (ht, dt, pt) { + const mt = ht.length !== 0 || dt || rt !== 0 || it + return (it = dt), (nt = ut(ht, pt, 0)), (rt = ht.length), mt + }), + (this.beginShadows = function () { + ;(ot = !0), ut(null) + }), + (this.endShadows = function () { + ;(ot = !1), ct() + }), + (this.setState = function (ht, dt, pt) { + const mt = ht.clippingPlanes, + gt = ht.clipIntersection, + yt = ht.clipShadows, + bt = tt.get(ht) + if (!it || mt === null || mt.length === 0 || (ot && !yt)) ot ? ut(null) : ct() + else { + const vt = ot ? 0 : rt, + xt = vt * 4 + let kt = bt.clippingState || null + ;(lt.value = kt), (kt = ut(mt, dt, xt, pt)) + for (let St = 0; St !== xt; ++St) kt[St] = nt[St] + ;(bt.clippingState = kt), (this.numIntersection = gt ? this.numPlanes : 0), (this.numPlanes += vt) + } + }) + function ct() { + lt.value !== nt && ((lt.value = nt), (lt.needsUpdate = rt > 0)), (et.numPlanes = rt), (et.numIntersection = 0) + } + function ut(ht, dt, pt, mt) { + const gt = ht !== null ? ht.length : 0 + let yt = null + if (gt !== 0) { + if (((yt = lt.value), mt !== !0 || yt === null)) { + const bt = pt + gt * 4, + vt = dt.matrixWorldInverse + st.getNormalMatrix(vt), (yt === null || yt.length < bt) && (yt = new Float32Array(bt)) + for (let xt = 0, kt = pt; xt !== gt; ++xt, kt += 4) + at.copy(ht[xt]).applyMatrix4(vt, st), at.normal.toArray(yt, kt), (yt[kt + 3] = at.constant) + } + ;(lt.value = yt), (lt.needsUpdate = !0) + } + return (et.numPlanes = gt), (et.numIntersection = 0), yt + } + } + function WebGLCubeMaps(tt) { + let et = new WeakMap() + function nt(at, st) { + return ( + st === EquirectangularReflectionMapping + ? (at.mapping = CubeReflectionMapping) + : st === EquirectangularRefractionMapping && (at.mapping = CubeRefractionMapping), + at + ) + } + function rt(at) { + if (at && at.isTexture && at.isRenderTargetTexture === !1) { + const st = at.mapping + if (st === EquirectangularReflectionMapping || st === EquirectangularRefractionMapping) + if (et.has(at)) { + const lt = et.get(at).texture + return nt(lt, at.mapping) + } else { + const lt = at.image + if (lt && lt.height > 0) { + const ct = new WebGLCubeRenderTarget(lt.height / 2) + return ( + ct.fromEquirectangularTexture(tt, at), + et.set(at, ct), + at.addEventListener('dispose', it), + nt(ct.texture, at.mapping) + ) + } else return null + } + } + return at + } + function it(at) { + const st = at.target + st.removeEventListener('dispose', it) + const lt = et.get(st) + lt !== void 0 && (et.delete(st), lt.dispose()) + } + function ot() { + et = new WeakMap() + } + return { get: rt, dispose: ot } + } + class OrthographicCamera extends Camera { + constructor(et = -1, nt = 1, rt = 1, it = -1, ot = 0.1, at = 2e3) { + super(), + (this.isOrthographicCamera = !0), + (this.type = 'OrthographicCamera'), + (this.zoom = 1), + (this.view = null), + (this.left = et), + (this.right = nt), + (this.top = rt), + (this.bottom = it), + (this.near = ot), + (this.far = at), + this.updateProjectionMatrix() + } + copy(et, nt) { + return ( + super.copy(et, nt), + (this.left = et.left), + (this.right = et.right), + (this.top = et.top), + (this.bottom = et.bottom), + (this.near = et.near), + (this.far = et.far), + (this.zoom = et.zoom), + (this.view = et.view === null ? null : Object.assign({}, et.view)), + this + ) + } + setViewOffset(et, nt, rt, it, ot, at) { + this.view === null && + (this.view = { enabled: !0, fullWidth: 1, fullHeight: 1, offsetX: 0, offsetY: 0, width: 1, height: 1 }), + (this.view.enabled = !0), + (this.view.fullWidth = et), + (this.view.fullHeight = nt), + (this.view.offsetX = rt), + (this.view.offsetY = it), + (this.view.width = ot), + (this.view.height = at), + this.updateProjectionMatrix() + } + clearViewOffset() { + this.view !== null && (this.view.enabled = !1), this.updateProjectionMatrix() + } + updateProjectionMatrix() { + const et = (this.right - this.left) / (2 * this.zoom), + nt = (this.top - this.bottom) / (2 * this.zoom), + rt = (this.right + this.left) / 2, + it = (this.top + this.bottom) / 2 + let ot = rt - et, + at = rt + et, + st = it + nt, + lt = it - nt + if (this.view !== null && this.view.enabled) { + const ct = (this.right - this.left) / this.view.fullWidth / this.zoom, + ut = (this.top - this.bottom) / this.view.fullHeight / this.zoom + ;(ot += ct * this.view.offsetX), + (at = ot + ct * this.view.width), + (st -= ut * this.view.offsetY), + (lt = st - ut * this.view.height) + } + this.projectionMatrix.makeOrthographic(ot, at, st, lt, this.near, this.far), + this.projectionMatrixInverse.copy(this.projectionMatrix).invert() + } + toJSON(et) { + const nt = super.toJSON(et) + return ( + (nt.object.zoom = this.zoom), + (nt.object.left = this.left), + (nt.object.right = this.right), + (nt.object.top = this.top), + (nt.object.bottom = this.bottom), + (nt.object.near = this.near), + (nt.object.far = this.far), + this.view !== null && (nt.object.view = Object.assign({}, this.view)), + nt + ) + } + } + const LOD_MIN = 4, + EXTRA_LOD_SIGMA = [0.125, 0.215, 0.35, 0.446, 0.526, 0.582], + MAX_SAMPLES = 20, + _flatCamera = new OrthographicCamera(), + _clearColor = new Color$1() + let _oldTarget = null + const PHI = (1 + Math.sqrt(5)) / 2, + INV_PHI = 1 / PHI, + _axisDirections = [ + new Vector3(1, 1, 1), + new Vector3(-1, 1, 1), + new Vector3(1, 1, -1), + new Vector3(-1, 1, -1), + new Vector3(0, PHI, INV_PHI), + new Vector3(0, PHI, -INV_PHI), + new Vector3(INV_PHI, 0, PHI), + new Vector3(-INV_PHI, 0, PHI), + new Vector3(PHI, INV_PHI, 0), + new Vector3(-PHI, INV_PHI, 0), + ] + class PMREMGenerator { + constructor(et) { + ;(this._renderer = et), + (this._pingPongRenderTarget = null), + (this._lodMax = 0), + (this._cubeSize = 0), + (this._lodPlanes = []), + (this._sizeLods = []), + (this._sigmas = []), + (this._blurMaterial = null), + (this._cubemapMaterial = null), + (this._equirectMaterial = null), + this._compileMaterial(this._blurMaterial) + } + fromScene(et, nt = 0, rt = 0.1, it = 100) { + ;(_oldTarget = this._renderer.getRenderTarget()), this._setSize(256) + const ot = this._allocateTargets() + return ( + (ot.depthBuffer = !0), + this._sceneToCubeUV(et, rt, it, ot), + nt > 0 && this._blur(ot, 0, 0, nt), + this._applyPMREM(ot), + this._cleanup(ot), + ot + ) + } + fromEquirectangular(et, nt = null) { + return this._fromTexture(et, nt) + } + fromCubemap(et, nt = null) { + return this._fromTexture(et, nt) + } + compileCubemapShader() { + this._cubemapMaterial === null && + ((this._cubemapMaterial = _getCubemapMaterial()), this._compileMaterial(this._cubemapMaterial)) + } + compileEquirectangularShader() { + this._equirectMaterial === null && + ((this._equirectMaterial = _getEquirectMaterial()), this._compileMaterial(this._equirectMaterial)) + } + dispose() { + this._dispose(), + this._cubemapMaterial !== null && this._cubemapMaterial.dispose(), + this._equirectMaterial !== null && this._equirectMaterial.dispose() + } + _setSize(et) { + ;(this._lodMax = Math.floor(Math.log2(et))), (this._cubeSize = Math.pow(2, this._lodMax)) + } + _dispose() { + this._blurMaterial !== null && this._blurMaterial.dispose(), + this._pingPongRenderTarget !== null && this._pingPongRenderTarget.dispose() + for (let et = 0; et < this._lodPlanes.length; et++) this._lodPlanes[et].dispose() + } + _cleanup(et) { + this._renderer.setRenderTarget(_oldTarget), (et.scissorTest = !1), _setViewport(et, 0, 0, et.width, et.height) + } + _fromTexture(et, nt) { + et.mapping === CubeReflectionMapping || et.mapping === CubeRefractionMapping + ? this._setSize(et.image.length === 0 ? 16 : et.image[0].width || et.image[0].image.width) + : this._setSize(et.image.width / 4), + (_oldTarget = this._renderer.getRenderTarget()) + const rt = nt || this._allocateTargets() + return this._textureToCubeUV(et, rt), this._applyPMREM(rt), this._cleanup(rt), rt + } + _allocateTargets() { + const et = 3 * Math.max(this._cubeSize, 112), + nt = 4 * this._cubeSize, + rt = { + magFilter: LinearFilter, + minFilter: LinearFilter, + generateMipmaps: !1, + type: HalfFloatType, + format: RGBAFormat, + encoding: LinearEncoding, + depthBuffer: !1, + }, + it = _createRenderTarget(et, nt, rt) + if (this._pingPongRenderTarget === null || this._pingPongRenderTarget.width !== et) { + this._pingPongRenderTarget !== null && this._dispose(), + (this._pingPongRenderTarget = _createRenderTarget(et, nt, rt)) + const { _lodMax: ot } = this + ;({ sizeLods: this._sizeLods, lodPlanes: this._lodPlanes, sigmas: this._sigmas } = _createPlanes(ot)), + (this._blurMaterial = _getBlurShader(ot, et, nt)) + } + return it + } + _compileMaterial(et) { + const nt = new Mesh(this._lodPlanes[0], et) + this._renderer.compile(nt, _flatCamera) + } + _sceneToCubeUV(et, nt, rt, it) { + const st = new PerspectiveCamera(90, 1, nt, rt), + lt = [1, -1, 1, 1, 1, 1], + ct = [1, 1, 1, -1, -1, -1], + ut = this._renderer, + ht = ut.autoClear, + dt = ut.toneMapping + ut.getClearColor(_clearColor), (ut.toneMapping = NoToneMapping), (ut.autoClear = !1) + const pt = new MeshBasicMaterial({ name: 'PMREM.Background', side: BackSide, depthWrite: !1, depthTest: !1 }), + mt = new Mesh(new BoxGeometry(), pt) + let gt = !1 + const yt = et.background + yt + ? yt.isColor && (pt.color.copy(yt), (et.background = null), (gt = !0)) + : (pt.color.copy(_clearColor), (gt = !0)) + for (let bt = 0; bt < 6; bt++) { + const vt = bt % 3 + vt === 0 + ? (st.up.set(0, lt[bt], 0), st.lookAt(ct[bt], 0, 0)) + : vt === 1 + ? (st.up.set(0, 0, lt[bt]), st.lookAt(0, ct[bt], 0)) + : (st.up.set(0, lt[bt], 0), st.lookAt(0, 0, ct[bt])) + const xt = this._cubeSize + _setViewport(it, vt * xt, bt > 2 ? xt : 0, xt, xt), + ut.setRenderTarget(it), + gt && ut.render(mt, st), + ut.render(et, st) + } + mt.geometry.dispose(), mt.material.dispose(), (ut.toneMapping = dt), (ut.autoClear = ht), (et.background = yt) + } + _textureToCubeUV(et, nt) { + const rt = this._renderer, + it = et.mapping === CubeReflectionMapping || et.mapping === CubeRefractionMapping + it + ? (this._cubemapMaterial === null && (this._cubemapMaterial = _getCubemapMaterial()), + (this._cubemapMaterial.uniforms.flipEnvMap.value = et.isRenderTargetTexture === !1 ? -1 : 1)) + : this._equirectMaterial === null && (this._equirectMaterial = _getEquirectMaterial()) + const ot = it ? this._cubemapMaterial : this._equirectMaterial, + at = new Mesh(this._lodPlanes[0], ot), + st = ot.uniforms + st.envMap.value = et + const lt = this._cubeSize + _setViewport(nt, 0, 0, 3 * lt, 2 * lt), rt.setRenderTarget(nt), rt.render(at, _flatCamera) + } + _applyPMREM(et) { + const nt = this._renderer, + rt = nt.autoClear + nt.autoClear = !1 + for (let it = 1; it < this._lodPlanes.length; it++) { + const ot = Math.sqrt(this._sigmas[it] * this._sigmas[it] - this._sigmas[it - 1] * this._sigmas[it - 1]), + at = _axisDirections[(it - 1) % _axisDirections.length] + this._blur(et, it - 1, it, ot, at) + } + nt.autoClear = rt + } + _blur(et, nt, rt, it, ot) { + const at = this._pingPongRenderTarget + this._halfBlur(et, at, nt, rt, it, 'latitudinal', ot), this._halfBlur(at, et, rt, rt, it, 'longitudinal', ot) + } + _halfBlur(et, nt, rt, it, ot, at, st) { + const lt = this._renderer, + ct = this._blurMaterial + at !== 'latitudinal' && + at !== 'longitudinal' && + console.error('blur direction must be either latitudinal or longitudinal!') + const ut = 3, + ht = new Mesh(this._lodPlanes[it], ct), + dt = ct.uniforms, + pt = this._sizeLods[rt] - 1, + mt = isFinite(ot) ? Math.PI / (2 * pt) : (2 * Math.PI) / (2 * MAX_SAMPLES - 1), + gt = ot / mt, + yt = isFinite(ot) ? 1 + Math.floor(ut * gt) : MAX_SAMPLES + yt > MAX_SAMPLES && + console.warn( + `sigmaRadians, ${ot}, is too large and will clip, as it requested ${yt} samples when the maximum is set to ${MAX_SAMPLES}`, + ) + const bt = [] + let vt = 0 + for (let At = 0; At < MAX_SAMPLES; ++At) { + const Et = At / gt, + $t = Math.exp((-Et * Et) / 2) + bt.push($t), At === 0 ? (vt += $t) : At < yt && (vt += 2 * $t) + } + for (let At = 0; At < bt.length; At++) bt[At] = bt[At] / vt + ;(dt.envMap.value = et.texture), + (dt.samples.value = yt), + (dt.weights.value = bt), + (dt.latitudinal.value = at === 'latitudinal'), + st && (dt.poleAxis.value = st) + const { _lodMax: xt } = this + ;(dt.dTheta.value = mt), (dt.mipInt.value = xt - rt) + const kt = this._sizeLods[it], + St = 3 * kt * (it > xt - LOD_MIN ? it - xt + LOD_MIN : 0), + Tt = 4 * (this._cubeSize - kt) + _setViewport(nt, St, Tt, 3 * kt, 2 * kt), lt.setRenderTarget(nt), lt.render(ht, _flatCamera) + } + } + function _createPlanes(tt) { + const et = [], + nt = [], + rt = [] + let it = tt + const ot = tt - LOD_MIN + 1 + EXTRA_LOD_SIGMA.length + for (let at = 0; at < ot; at++) { + const st = Math.pow(2, it) + nt.push(st) + let lt = 1 / st + at > tt - LOD_MIN ? (lt = EXTRA_LOD_SIGMA[at - tt + LOD_MIN - 1]) : at === 0 && (lt = 0), rt.push(lt) + const ct = 1 / (st - 2), + ut = -ct, + ht = 1 + ct, + dt = [ut, ut, ht, ut, ht, ht, ut, ut, ht, ht, ut, ht], + pt = 6, + mt = 6, + gt = 3, + yt = 2, + bt = 1, + vt = new Float32Array(gt * mt * pt), + xt = new Float32Array(yt * mt * pt), + kt = new Float32Array(bt * mt * pt) + for (let Tt = 0; Tt < pt; Tt++) { + const At = ((Tt % 3) * 2) / 3 - 1, + Et = Tt > 2 ? 0 : -1, + $t = [At, Et, 0, At + 2 / 3, Et, 0, At + 2 / 3, Et + 1, 0, At, Et, 0, At + 2 / 3, Et + 1, 0, At, Et + 1, 0] + vt.set($t, gt * mt * Tt), xt.set(dt, yt * mt * Tt) + const Dt = [Tt, Tt, Tt, Tt, Tt, Tt] + kt.set(Dt, bt * mt * Tt) + } + const St = new BufferGeometry() + St.setAttribute('position', new BufferAttribute(vt, gt)), + St.setAttribute('uv', new BufferAttribute(xt, yt)), + St.setAttribute('faceIndex', new BufferAttribute(kt, bt)), + et.push(St), + it > LOD_MIN && it-- + } + return { lodPlanes: et, sizeLods: nt, sigmas: rt } + } + function _createRenderTarget(tt, et, nt) { + const rt = new WebGLRenderTarget(tt, et, nt) + return (rt.texture.mapping = CubeUVReflectionMapping), (rt.texture.name = 'PMREM.cubeUv'), (rt.scissorTest = !0), rt + } + function _setViewport(tt, et, nt, rt, it) { + tt.viewport.set(et, nt, rt, it), tt.scissor.set(et, nt, rt, it) + } + function _getBlurShader(tt, et, nt) { + const rt = new Float32Array(MAX_SAMPLES), + it = new Vector3(0, 1, 0) + return new ShaderMaterial({ + name: 'SphericalGaussianBlur', + defines: { n: MAX_SAMPLES, CUBEUV_TEXEL_WIDTH: 1 / et, CUBEUV_TEXEL_HEIGHT: 1 / nt, CUBEUV_MAX_MIP: `${tt}.0` }, + uniforms: { + envMap: { value: null }, + samples: { value: 1 }, + weights: { value: rt }, + latitudinal: { value: !1 }, + dTheta: { value: 0 }, + mipInt: { value: 0 }, + poleAxis: { value: it }, + }, + vertexShader: _getCommonVertexShader(), + fragmentShader: ` precision mediump float; precision mediump int; @@ -3516,656 +88935,51189 @@ void main() { if ( all( equal( axis, vec3( 0.0 ) ) ) ) { - axis = vec3( vOutputDirection.z, 0.0, - vOutputDirection.x ); + axis = vec3( vOutputDirection.z, 0.0, - vOutputDirection.x ); + + } + + axis = normalize( axis ); + + gl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0 ); + gl_FragColor.rgb += weights[ 0 ] * getSample( 0.0, axis ); + + for ( int i = 1; i < n; i++ ) { + + if ( i >= samples ) { + + break; + + } + + float theta = dTheta * float( i ); + gl_FragColor.rgb += weights[ i ] * getSample( -1.0 * theta, axis ); + gl_FragColor.rgb += weights[ i ] * getSample( theta, axis ); + + } + + } + `, + blending: NoBlending, + depthTest: !1, + depthWrite: !1, + }) + } + function _getEquirectMaterial() { + return new ShaderMaterial({ + name: 'EquirectangularToCubeUV', + uniforms: { envMap: { value: null } }, + vertexShader: _getCommonVertexShader(), + fragmentShader: ` + + precision mediump float; + precision mediump int; + + varying vec3 vOutputDirection; + + uniform sampler2D envMap; + + #include + + void main() { + + vec3 outputDirection = normalize( vOutputDirection ); + vec2 uv = equirectUv( outputDirection ); + + gl_FragColor = vec4( texture2D ( envMap, uv ).rgb, 1.0 ); + + } + `, + blending: NoBlending, + depthTest: !1, + depthWrite: !1, + }) + } + function _getCubemapMaterial() { + return new ShaderMaterial({ + name: 'CubemapToCubeUV', + uniforms: { envMap: { value: null }, flipEnvMap: { value: -1 } }, + vertexShader: _getCommonVertexShader(), + fragmentShader: ` + + precision mediump float; + precision mediump int; + + uniform float flipEnvMap; + + varying vec3 vOutputDirection; + + uniform samplerCube envMap; + + void main() { + + gl_FragColor = textureCube( envMap, vec3( flipEnvMap * vOutputDirection.x, vOutputDirection.yz ) ); + + } + `, + blending: NoBlending, + depthTest: !1, + depthWrite: !1, + }) + } + function _getCommonVertexShader() { + return ` + + precision mediump float; + precision mediump int; + + attribute float faceIndex; + + varying vec3 vOutputDirection; + + // RH coordinate system; PMREM face-indexing convention + vec3 getDirection( vec2 uv, float face ) { + + uv = 2.0 * uv - 1.0; + + vec3 direction = vec3( uv, 1.0 ); + + if ( face == 0.0 ) { + + direction = direction.zyx; // ( 1, v, u ) pos x + + } else if ( face == 1.0 ) { + + direction = direction.xzy; + direction.xz *= -1.0; // ( -u, 1, -v ) pos y + + } else if ( face == 2.0 ) { + + direction.x *= -1.0; // ( -u, v, 1 ) pos z + + } else if ( face == 3.0 ) { + + direction = direction.zyx; + direction.xz *= -1.0; // ( -1, v, -u ) neg x + + } else if ( face == 4.0 ) { + + direction = direction.xzy; + direction.xy *= -1.0; // ( -u, -1, v ) neg y + + } else if ( face == 5.0 ) { + + direction.z *= -1.0; // ( u, v, -1 ) neg z + + } + + return direction; + + } + + void main() { + + vOutputDirection = getDirection( uv, faceIndex ); + gl_Position = vec4( position, 1.0 ); + + } + ` + } + function WebGLCubeUVMaps(tt) { + let et = new WeakMap(), + nt = null + function rt(st) { + if (st && st.isTexture) { + const lt = st.mapping, + ct = lt === EquirectangularReflectionMapping || lt === EquirectangularRefractionMapping, + ut = lt === CubeReflectionMapping || lt === CubeRefractionMapping + if (ct || ut) + if (st.isRenderTargetTexture && st.needsPMREMUpdate === !0) { + st.needsPMREMUpdate = !1 + let ht = et.get(st) + return ( + nt === null && (nt = new PMREMGenerator(tt)), + (ht = ct ? nt.fromEquirectangular(st, ht) : nt.fromCubemap(st, ht)), + et.set(st, ht), + ht.texture + ) + } else { + if (et.has(st)) return et.get(st).texture + { + const ht = st.image + if ((ct && ht && ht.height > 0) || (ut && ht && it(ht))) { + nt === null && (nt = new PMREMGenerator(tt)) + const dt = ct ? nt.fromEquirectangular(st) : nt.fromCubemap(st) + return et.set(st, dt), st.addEventListener('dispose', ot), dt.texture + } else return null + } + } + } + return st + } + function it(st) { + let lt = 0 + const ct = 6 + for (let ut = 0; ut < ct; ut++) st[ut] !== void 0 && lt++ + return lt === ct + } + function ot(st) { + const lt = st.target + lt.removeEventListener('dispose', ot) + const ct = et.get(lt) + ct !== void 0 && (et.delete(lt), ct.dispose()) + } + function at() { + ;(et = new WeakMap()), nt !== null && (nt.dispose(), (nt = null)) + } + return { get: rt, dispose: at } + } + function WebGLExtensions(tt) { + const et = {} + function nt(rt) { + if (et[rt] !== void 0) return et[rt] + let it + switch (rt) { + case 'WEBGL_depth_texture': + it = + tt.getExtension('WEBGL_depth_texture') || + tt.getExtension('MOZ_WEBGL_depth_texture') || + tt.getExtension('WEBKIT_WEBGL_depth_texture') + break + case 'EXT_texture_filter_anisotropic': + it = + tt.getExtension('EXT_texture_filter_anisotropic') || + tt.getExtension('MOZ_EXT_texture_filter_anisotropic') || + tt.getExtension('WEBKIT_EXT_texture_filter_anisotropic') + break + case 'WEBGL_compressed_texture_s3tc': + it = + tt.getExtension('WEBGL_compressed_texture_s3tc') || + tt.getExtension('MOZ_WEBGL_compressed_texture_s3tc') || + tt.getExtension('WEBKIT_WEBGL_compressed_texture_s3tc') + break + case 'WEBGL_compressed_texture_pvrtc': + it = + tt.getExtension('WEBGL_compressed_texture_pvrtc') || + tt.getExtension('WEBKIT_WEBGL_compressed_texture_pvrtc') + break + default: + it = tt.getExtension(rt) + } + return (et[rt] = it), it + } + return { + has: function (rt) { + return nt(rt) !== null + }, + init: function (rt) { + rt.isWebGL2 + ? nt('EXT_color_buffer_float') + : (nt('WEBGL_depth_texture'), + nt('OES_texture_float'), + nt('OES_texture_half_float'), + nt('OES_texture_half_float_linear'), + nt('OES_standard_derivatives'), + nt('OES_element_index_uint'), + nt('OES_vertex_array_object'), + nt('ANGLE_instanced_arrays')), + nt('OES_texture_float_linear'), + nt('EXT_color_buffer_half_float'), + nt('WEBGL_multisampled_render_to_texture') + }, + get: function (rt) { + const it = nt(rt) + return it === null && console.warn('THREE.WebGLRenderer: ' + rt + ' extension not supported.'), it + }, + } + } + function WebGLGeometries(tt, et, nt, rt) { + const it = {}, + ot = new WeakMap() + function at(ht) { + const dt = ht.target + dt.index !== null && et.remove(dt.index) + for (const mt in dt.attributes) et.remove(dt.attributes[mt]) + dt.removeEventListener('dispose', at), delete it[dt.id] + const pt = ot.get(dt) + pt && (et.remove(pt), ot.delete(dt)), + rt.releaseStatesOfGeometry(dt), + dt.isInstancedBufferGeometry === !0 && delete dt._maxInstanceCount, + nt.memory.geometries-- + } + function st(ht, dt) { + return it[dt.id] === !0 || (dt.addEventListener('dispose', at), (it[dt.id] = !0), nt.memory.geometries++), dt + } + function lt(ht) { + const dt = ht.attributes + for (const mt in dt) et.update(dt[mt], 34962) + const pt = ht.morphAttributes + for (const mt in pt) { + const gt = pt[mt] + for (let yt = 0, bt = gt.length; yt < bt; yt++) et.update(gt[yt], 34962) + } + } + function ct(ht) { + const dt = [], + pt = ht.index, + mt = ht.attributes.position + let gt = 0 + if (pt !== null) { + const vt = pt.array + gt = pt.version + for (let xt = 0, kt = vt.length; xt < kt; xt += 3) { + const St = vt[xt + 0], + Tt = vt[xt + 1], + At = vt[xt + 2] + dt.push(St, Tt, Tt, At, At, St) + } + } else { + const vt = mt.array + gt = mt.version + for (let xt = 0, kt = vt.length / 3 - 1; xt < kt; xt += 3) { + const St = xt + 0, + Tt = xt + 1, + At = xt + 2 + dt.push(St, Tt, Tt, At, At, St) + } + } + const yt = new (arrayNeedsUint32(dt) ? Uint32BufferAttribute : Uint16BufferAttribute)(dt, 1) + yt.version = gt + const bt = ot.get(ht) + bt && et.remove(bt), ot.set(ht, yt) + } + function ut(ht) { + const dt = ot.get(ht) + if (dt) { + const pt = ht.index + pt !== null && dt.version < pt.version && ct(ht) + } else ct(ht) + return ot.get(ht) + } + return { get: st, update: lt, getWireframeAttribute: ut } + } + function WebGLIndexedBufferRenderer(tt, et, nt, rt) { + const it = rt.isWebGL2 + let ot + function at(dt) { + ot = dt + } + let st, lt + function ct(dt) { + ;(st = dt.type), (lt = dt.bytesPerElement) + } + function ut(dt, pt) { + tt.drawElements(ot, pt, st, dt * lt), nt.update(pt, ot, 1) + } + function ht(dt, pt, mt) { + if (mt === 0) return + let gt, yt + if (it) (gt = tt), (yt = 'drawElementsInstanced') + else if (((gt = et.get('ANGLE_instanced_arrays')), (yt = 'drawElementsInstancedANGLE'), gt === null)) { + console.error( + 'THREE.WebGLIndexedBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.', + ) + return + } + gt[yt](ot, pt, st, dt * lt, mt), nt.update(pt, ot, mt) + } + ;(this.setMode = at), (this.setIndex = ct), (this.render = ut), (this.renderInstances = ht) + } + function WebGLInfo(tt) { + const et = { geometries: 0, textures: 0 }, + nt = { frame: 0, calls: 0, triangles: 0, points: 0, lines: 0 } + function rt(ot, at, st) { + switch ((nt.calls++, at)) { + case 4: + nt.triangles += st * (ot / 3) + break + case 1: + nt.lines += st * (ot / 2) + break + case 3: + nt.lines += st * (ot - 1) + break + case 2: + nt.lines += st * ot + break + case 0: + nt.points += st * ot + break + default: + console.error('THREE.WebGLInfo: Unknown draw mode:', at) + break + } + } + function it() { + nt.frame++, (nt.calls = 0), (nt.triangles = 0), (nt.points = 0), (nt.lines = 0) + } + return { memory: et, render: nt, programs: null, autoReset: !0, reset: it, update: rt } + } + function numericalSort(tt, et) { + return tt[0] - et[0] + } + function absNumericalSort(tt, et) { + return Math.abs(et[1]) - Math.abs(tt[1]) + } + function denormalize(tt, et) { + let nt = 1 + const rt = et.isInterleavedBufferAttribute ? et.data.array : et.array + rt instanceof Int8Array + ? (nt = 127) + : rt instanceof Uint8Array + ? (nt = 255) + : rt instanceof Uint16Array + ? (nt = 65535) + : rt instanceof Int16Array + ? (nt = 32767) + : rt instanceof Int32Array + ? (nt = 2147483647) + : console.error('THREE.WebGLMorphtargets: Unsupported morph attribute data type: ', rt), + tt.divideScalar(nt) + } + function WebGLMorphtargets(tt, et, nt) { + const rt = {}, + it = new Float32Array(8), + ot = new WeakMap(), + at = new Vector4(), + st = [] + for (let ct = 0; ct < 8; ct++) st[ct] = [ct, 0] + function lt(ct, ut, ht, dt) { + const pt = ct.morphTargetInfluences + if (et.isWebGL2 === !0) { + const gt = ut.morphAttributes.position || ut.morphAttributes.normal || ut.morphAttributes.color, + yt = gt !== void 0 ? gt.length : 0 + let bt = ot.get(ut) + if (bt === void 0 || bt.count !== yt) { + let Ot = function () { + wt.dispose(), ot.delete(ut), ut.removeEventListener('dispose', Ot) + } + var mt = Ot + bt !== void 0 && bt.texture.dispose() + const kt = ut.morphAttributes.position !== void 0, + St = ut.morphAttributes.normal !== void 0, + Tt = ut.morphAttributes.color !== void 0, + At = ut.morphAttributes.position || [], + Et = ut.morphAttributes.normal || [], + $t = ut.morphAttributes.color || [] + let Dt = 0 + kt === !0 && (Dt = 1), St === !0 && (Dt = 2), Tt === !0 && (Dt = 3) + let jt = ut.attributes.position.count * Dt, + Pt = 1 + jt > et.maxTextureSize && ((Pt = Math.ceil(jt / et.maxTextureSize)), (jt = et.maxTextureSize)) + const Ct = new Float32Array(jt * Pt * 4 * yt), + wt = new DataArrayTexture(Ct, jt, Pt, yt) + ;(wt.type = FloatType), (wt.needsUpdate = !0) + const It = Dt * 4 + for (let Wt = 0; Wt < yt; Wt++) { + const zt = At[Wt], + Ft = Et[Wt], + Nt = $t[Wt], + Ut = jt * Pt * 4 * Wt + for (let Mt = 0; Mt < zt.count; Mt++) { + const Ht = Mt * It + kt === !0 && + (at.fromBufferAttribute(zt, Mt), + zt.normalized === !0 && denormalize(at, zt), + (Ct[Ut + Ht + 0] = at.x), + (Ct[Ut + Ht + 1] = at.y), + (Ct[Ut + Ht + 2] = at.z), + (Ct[Ut + Ht + 3] = 0)), + St === !0 && + (at.fromBufferAttribute(Ft, Mt), + Ft.normalized === !0 && denormalize(at, Ft), + (Ct[Ut + Ht + 4] = at.x), + (Ct[Ut + Ht + 5] = at.y), + (Ct[Ut + Ht + 6] = at.z), + (Ct[Ut + Ht + 7] = 0)), + Tt === !0 && + (at.fromBufferAttribute(Nt, Mt), + Nt.normalized === !0 && denormalize(at, Nt), + (Ct[Ut + Ht + 8] = at.x), + (Ct[Ut + Ht + 9] = at.y), + (Ct[Ut + Ht + 10] = at.z), + (Ct[Ut + Ht + 11] = Nt.itemSize === 4 ? at.w : 1)) + } + } + ;(bt = { count: yt, texture: wt, size: new Vector2(jt, Pt) }), + ot.set(ut, bt), + ut.addEventListener('dispose', Ot) + } + let vt = 0 + for (let kt = 0; kt < pt.length; kt++) vt += pt[kt] + const xt = ut.morphTargetsRelative ? 1 : 1 - vt + dt.getUniforms().setValue(tt, 'morphTargetBaseInfluence', xt), + dt.getUniforms().setValue(tt, 'morphTargetInfluences', pt), + dt.getUniforms().setValue(tt, 'morphTargetsTexture', bt.texture, nt), + dt.getUniforms().setValue(tt, 'morphTargetsTextureSize', bt.size) + } else { + const gt = pt === void 0 ? 0 : pt.length + let yt = rt[ut.id] + if (yt === void 0 || yt.length !== gt) { + yt = [] + for (let St = 0; St < gt; St++) yt[St] = [St, 0] + rt[ut.id] = yt + } + for (let St = 0; St < gt; St++) { + const Tt = yt[St] + ;(Tt[0] = St), (Tt[1] = pt[St]) + } + yt.sort(absNumericalSort) + for (let St = 0; St < 8; St++) + St < gt && yt[St][1] + ? ((st[St][0] = yt[St][0]), (st[St][1] = yt[St][1])) + : ((st[St][0] = Number.MAX_SAFE_INTEGER), (st[St][1] = 0)) + st.sort(numericalSort) + const bt = ut.morphAttributes.position, + vt = ut.morphAttributes.normal + let xt = 0 + for (let St = 0; St < 8; St++) { + const Tt = st[St], + At = Tt[0], + Et = Tt[1] + At !== Number.MAX_SAFE_INTEGER && Et + ? (bt && ut.getAttribute('morphTarget' + St) !== bt[At] && ut.setAttribute('morphTarget' + St, bt[At]), + vt && ut.getAttribute('morphNormal' + St) !== vt[At] && ut.setAttribute('morphNormal' + St, vt[At]), + (it[St] = Et), + (xt += Et)) + : (bt && ut.hasAttribute('morphTarget' + St) === !0 && ut.deleteAttribute('morphTarget' + St), + vt && ut.hasAttribute('morphNormal' + St) === !0 && ut.deleteAttribute('morphNormal' + St), + (it[St] = 0)) + } + const kt = ut.morphTargetsRelative ? 1 : 1 - xt + dt.getUniforms().setValue(tt, 'morphTargetBaseInfluence', kt), + dt.getUniforms().setValue(tt, 'morphTargetInfluences', it) + } + } + return { update: lt } + } + function WebGLObjects(tt, et, nt, rt) { + let it = new WeakMap() + function ot(lt) { + const ct = rt.render.frame, + ut = lt.geometry, + ht = et.get(lt, ut) + return ( + it.get(ht) !== ct && (et.update(ht), it.set(ht, ct)), + lt.isInstancedMesh && + (lt.hasEventListener('dispose', st) === !1 && lt.addEventListener('dispose', st), + nt.update(lt.instanceMatrix, 34962), + lt.instanceColor !== null && nt.update(lt.instanceColor, 34962)), + ht + ) + } + function at() { + it = new WeakMap() + } + function st(lt) { + const ct = lt.target + ct.removeEventListener('dispose', st), + nt.remove(ct.instanceMatrix), + ct.instanceColor !== null && nt.remove(ct.instanceColor) + } + return { update: ot, dispose: at } + } + const emptyTexture = new Texture(), + emptyArrayTexture = new DataArrayTexture(), + empty3dTexture = new Data3DTexture(), + emptyCubeTexture = new CubeTexture(), + arrayCacheF32 = [], + arrayCacheI32 = [], + mat4array = new Float32Array(16), + mat3array = new Float32Array(9), + mat2array = new Float32Array(4) + function flatten(tt, et, nt) { + const rt = tt[0] + if (rt <= 0 || rt > 0) return tt + const it = et * nt + let ot = arrayCacheF32[it] + if ((ot === void 0 && ((ot = new Float32Array(it)), (arrayCacheF32[it] = ot)), et !== 0)) { + rt.toArray(ot, 0) + for (let at = 1, st = 0; at !== et; ++at) (st += nt), tt[at].toArray(ot, st) + } + return ot + } + function arraysEqual(tt, et) { + if (tt.length !== et.length) return !1 + for (let nt = 0, rt = tt.length; nt < rt; nt++) if (tt[nt] !== et[nt]) return !1 + return !0 + } + function copyArray(tt, et) { + for (let nt = 0, rt = et.length; nt < rt; nt++) tt[nt] = et[nt] + } + function allocTexUnits(tt, et) { + let nt = arrayCacheI32[et] + nt === void 0 && ((nt = new Int32Array(et)), (arrayCacheI32[et] = nt)) + for (let rt = 0; rt !== et; ++rt) nt[rt] = tt.allocateTextureUnit() + return nt + } + function setValueV1f(tt, et) { + const nt = this.cache + nt[0] !== et && (tt.uniform1f(this.addr, et), (nt[0] = et)) + } + function setValueV2f(tt, et) { + const nt = this.cache + if (et.x !== void 0) + (nt[0] !== et.x || nt[1] !== et.y) && (tt.uniform2f(this.addr, et.x, et.y), (nt[0] = et.x), (nt[1] = et.y)) + else { + if (arraysEqual(nt, et)) return + tt.uniform2fv(this.addr, et), copyArray(nt, et) + } + } + function setValueV3f(tt, et) { + const nt = this.cache + if (et.x !== void 0) + (nt[0] !== et.x || nt[1] !== et.y || nt[2] !== et.z) && + (tt.uniform3f(this.addr, et.x, et.y, et.z), (nt[0] = et.x), (nt[1] = et.y), (nt[2] = et.z)) + else if (et.r !== void 0) + (nt[0] !== et.r || nt[1] !== et.g || nt[2] !== et.b) && + (tt.uniform3f(this.addr, et.r, et.g, et.b), (nt[0] = et.r), (nt[1] = et.g), (nt[2] = et.b)) + else { + if (arraysEqual(nt, et)) return + tt.uniform3fv(this.addr, et), copyArray(nt, et) + } + } + function setValueV4f(tt, et) { + const nt = this.cache + if (et.x !== void 0) + (nt[0] !== et.x || nt[1] !== et.y || nt[2] !== et.z || nt[3] !== et.w) && + (tt.uniform4f(this.addr, et.x, et.y, et.z, et.w), + (nt[0] = et.x), + (nt[1] = et.y), + (nt[2] = et.z), + (nt[3] = et.w)) + else { + if (arraysEqual(nt, et)) return + tt.uniform4fv(this.addr, et), copyArray(nt, et) + } + } + function setValueM2(tt, et) { + const nt = this.cache, + rt = et.elements + if (rt === void 0) { + if (arraysEqual(nt, et)) return + tt.uniformMatrix2fv(this.addr, !1, et), copyArray(nt, et) + } else { + if (arraysEqual(nt, rt)) return + mat2array.set(rt), tt.uniformMatrix2fv(this.addr, !1, mat2array), copyArray(nt, rt) + } + } + function setValueM3(tt, et) { + const nt = this.cache, + rt = et.elements + if (rt === void 0) { + if (arraysEqual(nt, et)) return + tt.uniformMatrix3fv(this.addr, !1, et), copyArray(nt, et) + } else { + if (arraysEqual(nt, rt)) return + mat3array.set(rt), tt.uniformMatrix3fv(this.addr, !1, mat3array), copyArray(nt, rt) + } + } + function setValueM4(tt, et) { + const nt = this.cache, + rt = et.elements + if (rt === void 0) { + if (arraysEqual(nt, et)) return + tt.uniformMatrix4fv(this.addr, !1, et), copyArray(nt, et) + } else { + if (arraysEqual(nt, rt)) return + mat4array.set(rt), tt.uniformMatrix4fv(this.addr, !1, mat4array), copyArray(nt, rt) + } + } + function setValueV1i(tt, et) { + const nt = this.cache + nt[0] !== et && (tt.uniform1i(this.addr, et), (nt[0] = et)) + } + function setValueV2i(tt, et) { + const nt = this.cache + arraysEqual(nt, et) || (tt.uniform2iv(this.addr, et), copyArray(nt, et)) + } + function setValueV3i(tt, et) { + const nt = this.cache + arraysEqual(nt, et) || (tt.uniform3iv(this.addr, et), copyArray(nt, et)) + } + function setValueV4i(tt, et) { + const nt = this.cache + arraysEqual(nt, et) || (tt.uniform4iv(this.addr, et), copyArray(nt, et)) + } + function setValueV1ui(tt, et) { + const nt = this.cache + nt[0] !== et && (tt.uniform1ui(this.addr, et), (nt[0] = et)) + } + function setValueV2ui(tt, et) { + const nt = this.cache + arraysEqual(nt, et) || (tt.uniform2uiv(this.addr, et), copyArray(nt, et)) + } + function setValueV3ui(tt, et) { + const nt = this.cache + arraysEqual(nt, et) || (tt.uniform3uiv(this.addr, et), copyArray(nt, et)) + } + function setValueV4ui(tt, et) { + const nt = this.cache + arraysEqual(nt, et) || (tt.uniform4uiv(this.addr, et), copyArray(nt, et)) + } + function setValueT1(tt, et, nt) { + const rt = this.cache, + it = nt.allocateTextureUnit() + rt[0] !== it && (tt.uniform1i(this.addr, it), (rt[0] = it)), nt.setTexture2D(et || emptyTexture, it) + } + function setValueT3D1(tt, et, nt) { + const rt = this.cache, + it = nt.allocateTextureUnit() + rt[0] !== it && (tt.uniform1i(this.addr, it), (rt[0] = it)), nt.setTexture3D(et || empty3dTexture, it) + } + function setValueT6(tt, et, nt) { + const rt = this.cache, + it = nt.allocateTextureUnit() + rt[0] !== it && (tt.uniform1i(this.addr, it), (rt[0] = it)), nt.setTextureCube(et || emptyCubeTexture, it) + } + function setValueT2DArray1(tt, et, nt) { + const rt = this.cache, + it = nt.allocateTextureUnit() + rt[0] !== it && (tt.uniform1i(this.addr, it), (rt[0] = it)), nt.setTexture2DArray(et || emptyArrayTexture, it) + } + function getSingularSetter(tt) { + switch (tt) { + case 5126: + return setValueV1f + case 35664: + return setValueV2f + case 35665: + return setValueV3f + case 35666: + return setValueV4f + case 35674: + return setValueM2 + case 35675: + return setValueM3 + case 35676: + return setValueM4 + case 5124: + case 35670: + return setValueV1i + case 35667: + case 35671: + return setValueV2i + case 35668: + case 35672: + return setValueV3i + case 35669: + case 35673: + return setValueV4i + case 5125: + return setValueV1ui + case 36294: + return setValueV2ui + case 36295: + return setValueV3ui + case 36296: + return setValueV4ui + case 35678: + case 36198: + case 36298: + case 36306: + case 35682: + return setValueT1 + case 35679: + case 36299: + case 36307: + return setValueT3D1 + case 35680: + case 36300: + case 36308: + case 36293: + return setValueT6 + case 36289: + case 36303: + case 36311: + case 36292: + return setValueT2DArray1 + } + } + function setValueV1fArray(tt, et) { + tt.uniform1fv(this.addr, et) + } + function setValueV2fArray(tt, et) { + const nt = flatten(et, this.size, 2) + tt.uniform2fv(this.addr, nt) + } + function setValueV3fArray(tt, et) { + const nt = flatten(et, this.size, 3) + tt.uniform3fv(this.addr, nt) + } + function setValueV4fArray(tt, et) { + const nt = flatten(et, this.size, 4) + tt.uniform4fv(this.addr, nt) + } + function setValueM2Array(tt, et) { + const nt = flatten(et, this.size, 4) + tt.uniformMatrix2fv(this.addr, !1, nt) + } + function setValueM3Array(tt, et) { + const nt = flatten(et, this.size, 9) + tt.uniformMatrix3fv(this.addr, !1, nt) + } + function setValueM4Array(tt, et) { + const nt = flatten(et, this.size, 16) + tt.uniformMatrix4fv(this.addr, !1, nt) + } + function setValueV1iArray(tt, et) { + tt.uniform1iv(this.addr, et) + } + function setValueV2iArray(tt, et) { + tt.uniform2iv(this.addr, et) + } + function setValueV3iArray(tt, et) { + tt.uniform3iv(this.addr, et) + } + function setValueV4iArray(tt, et) { + tt.uniform4iv(this.addr, et) + } + function setValueV1uiArray(tt, et) { + tt.uniform1uiv(this.addr, et) + } + function setValueV2uiArray(tt, et) { + tt.uniform2uiv(this.addr, et) + } + function setValueV3uiArray(tt, et) { + tt.uniform3uiv(this.addr, et) + } + function setValueV4uiArray(tt, et) { + tt.uniform4uiv(this.addr, et) + } + function setValueT1Array(tt, et, nt) { + const rt = et.length, + it = allocTexUnits(nt, rt) + tt.uniform1iv(this.addr, it) + for (let ot = 0; ot !== rt; ++ot) nt.setTexture2D(et[ot] || emptyTexture, it[ot]) + } + function setValueT3DArray(tt, et, nt) { + const rt = et.length, + it = allocTexUnits(nt, rt) + tt.uniform1iv(this.addr, it) + for (let ot = 0; ot !== rt; ++ot) nt.setTexture3D(et[ot] || empty3dTexture, it[ot]) + } + function setValueT6Array(tt, et, nt) { + const rt = et.length, + it = allocTexUnits(nt, rt) + tt.uniform1iv(this.addr, it) + for (let ot = 0; ot !== rt; ++ot) nt.setTextureCube(et[ot] || emptyCubeTexture, it[ot]) + } + function setValueT2DArrayArray(tt, et, nt) { + const rt = et.length, + it = allocTexUnits(nt, rt) + tt.uniform1iv(this.addr, it) + for (let ot = 0; ot !== rt; ++ot) nt.setTexture2DArray(et[ot] || emptyArrayTexture, it[ot]) + } + function getPureArraySetter(tt) { + switch (tt) { + case 5126: + return setValueV1fArray + case 35664: + return setValueV2fArray + case 35665: + return setValueV3fArray + case 35666: + return setValueV4fArray + case 35674: + return setValueM2Array + case 35675: + return setValueM3Array + case 35676: + return setValueM4Array + case 5124: + case 35670: + return setValueV1iArray + case 35667: + case 35671: + return setValueV2iArray + case 35668: + case 35672: + return setValueV3iArray + case 35669: + case 35673: + return setValueV4iArray + case 5125: + return setValueV1uiArray + case 36294: + return setValueV2uiArray + case 36295: + return setValueV3uiArray + case 36296: + return setValueV4uiArray + case 35678: + case 36198: + case 36298: + case 36306: + case 35682: + return setValueT1Array + case 35679: + case 36299: + case 36307: + return setValueT3DArray + case 35680: + case 36300: + case 36308: + case 36293: + return setValueT6Array + case 36289: + case 36303: + case 36311: + case 36292: + return setValueT2DArrayArray + } + } + class SingleUniform { + constructor(et, nt, rt) { + ;(this.id = et), (this.addr = rt), (this.cache = []), (this.setValue = getSingularSetter(nt.type)) + } + } + class PureArrayUniform { + constructor(et, nt, rt) { + ;(this.id = et), + (this.addr = rt), + (this.cache = []), + (this.size = nt.size), + (this.setValue = getPureArraySetter(nt.type)) + } + } + class StructuredUniform { + constructor(et) { + ;(this.id = et), (this.seq = []), (this.map = {}) + } + setValue(et, nt, rt) { + const it = this.seq + for (let ot = 0, at = it.length; ot !== at; ++ot) { + const st = it[ot] + st.setValue(et, nt[st.id], rt) + } + } + } + const RePathPart = /(\w+)(\])?(\[|\.)?/g + function addUniform(tt, et) { + tt.seq.push(et), (tt.map[et.id] = et) + } + function parseUniform(tt, et, nt) { + const rt = tt.name, + it = rt.length + for (RePathPart.lastIndex = 0; ; ) { + const ot = RePathPart.exec(rt), + at = RePathPart.lastIndex + let st = ot[1] + const lt = ot[2] === ']', + ct = ot[3] + if ((lt && (st = st | 0), ct === void 0 || (ct === '[' && at + 2 === it))) { + addUniform(nt, ct === void 0 ? new SingleUniform(st, tt, et) : new PureArrayUniform(st, tt, et)) + break + } else { + let ht = nt.map[st] + ht === void 0 && ((ht = new StructuredUniform(st)), addUniform(nt, ht)), (nt = ht) + } + } + } + class WebGLUniforms { + constructor(et, nt) { + ;(this.seq = []), (this.map = {}) + const rt = et.getProgramParameter(nt, 35718) + for (let it = 0; it < rt; ++it) { + const ot = et.getActiveUniform(nt, it), + at = et.getUniformLocation(nt, ot.name) + parseUniform(ot, at, this) + } + } + setValue(et, nt, rt, it) { + const ot = this.map[nt] + ot !== void 0 && ot.setValue(et, rt, it) + } + setOptional(et, nt, rt) { + const it = nt[rt] + it !== void 0 && this.setValue(et, rt, it) + } + static upload(et, nt, rt, it) { + for (let ot = 0, at = nt.length; ot !== at; ++ot) { + const st = nt[ot], + lt = rt[st.id] + lt.needsUpdate !== !1 && st.setValue(et, lt.value, it) + } + } + static seqWithValue(et, nt) { + const rt = [] + for (let it = 0, ot = et.length; it !== ot; ++it) { + const at = et[it] + at.id in nt && rt.push(at) + } + return rt + } + } + function WebGLShader(tt, et, nt) { + const rt = tt.createShader(et) + return tt.shaderSource(rt, nt), tt.compileShader(rt), rt + } + let programIdCount = 0 + function handleSource(tt, et) { + const nt = tt.split(` +`), + rt = [], + it = Math.max(et - 6, 0), + ot = Math.min(et + 6, nt.length) + for (let at = it; at < ot; at++) { + const st = at + 1 + rt.push(`${st === et ? '>' : ' '} ${st}: ${nt[at]}`) + } + return rt.join(` +`) + } + function getEncodingComponents(tt) { + switch (tt) { + case LinearEncoding: + return ['Linear', '( value )'] + case sRGBEncoding: + return ['sRGB', '( value )'] + default: + return console.warn('THREE.WebGLProgram: Unsupported encoding:', tt), ['Linear', '( value )'] + } + } + function getShaderErrors(tt, et, nt) { + const rt = tt.getShaderParameter(et, 35713), + it = tt.getShaderInfoLog(et).trim() + if (rt && it === '') return '' + const ot = /ERROR: 0:(\d+)/.exec(it) + if (ot) { + const at = parseInt(ot[1]) + return ( + nt.toUpperCase() + + ` + +` + + it + + ` - } +` + + handleSource(tt.getShaderSource(et), at) + ) + } else return it + } + function getTexelEncodingFunction(tt, et) { + const nt = getEncodingComponents(et) + return 'vec4 ' + tt + '( vec4 value ) { return LinearTo' + nt[0] + nt[1] + '; }' + } + function getToneMappingFunction(tt, et) { + let nt + switch (et) { + case LinearToneMapping: + nt = 'Linear' + break + case ReinhardToneMapping: + nt = 'Reinhard' + break + case CineonToneMapping: + nt = 'OptimizedCineon' + break + case ACESFilmicToneMapping: + nt = 'ACESFilmic' + break + case CustomToneMapping: + nt = 'Custom' + break + default: + console.warn('THREE.WebGLProgram: Unsupported toneMapping:', et), (nt = 'Linear') + } + return 'vec3 ' + tt + '( vec3 color ) { return ' + nt + 'ToneMapping( color ); }' + } + function generateExtensions(tt) { + return [ + tt.extensionDerivatives || + tt.envMapCubeUVHeight || + tt.bumpMap || + tt.tangentSpaceNormalMap || + tt.clearcoatNormalMap || + tt.flatShading || + tt.shaderID === 'physical' + ? '#extension GL_OES_standard_derivatives : enable' + : '', + (tt.extensionFragDepth || tt.logarithmicDepthBuffer) && tt.rendererExtensionFragDepth + ? '#extension GL_EXT_frag_depth : enable' + : '', + tt.extensionDrawBuffers && tt.rendererExtensionDrawBuffers ? '#extension GL_EXT_draw_buffers : require' : '', + (tt.extensionShaderTextureLOD || tt.envMap || tt.transmission) && tt.rendererExtensionShaderTextureLod + ? '#extension GL_EXT_shader_texture_lod : enable' + : '', + ].filter(filterEmptyLine).join(` +`) + } + function generateDefines(tt) { + const et = [] + for (const nt in tt) { + const rt = tt[nt] + rt !== !1 && et.push('#define ' + nt + ' ' + rt) + } + return et.join(` +`) + } + function fetchAttributeLocations(tt, et) { + const nt = {}, + rt = tt.getProgramParameter(et, 35721) + for (let it = 0; it < rt; it++) { + const ot = tt.getActiveAttrib(et, it), + at = ot.name + let st = 1 + ot.type === 35674 && (st = 2), + ot.type === 35675 && (st = 3), + ot.type === 35676 && (st = 4), + (nt[at] = { type: ot.type, location: tt.getAttribLocation(et, at), locationSize: st }) + } + return nt + } + function filterEmptyLine(tt) { + return tt !== '' + } + function replaceLightNums(tt, et) { + return tt + .replace(/NUM_DIR_LIGHTS/g, et.numDirLights) + .replace(/NUM_SPOT_LIGHTS/g, et.numSpotLights) + .replace(/NUM_RECT_AREA_LIGHTS/g, et.numRectAreaLights) + .replace(/NUM_POINT_LIGHTS/g, et.numPointLights) + .replace(/NUM_HEMI_LIGHTS/g, et.numHemiLights) + .replace(/NUM_DIR_LIGHT_SHADOWS/g, et.numDirLightShadows) + .replace(/NUM_SPOT_LIGHT_SHADOWS/g, et.numSpotLightShadows) + .replace(/NUM_POINT_LIGHT_SHADOWS/g, et.numPointLightShadows) + } + function replaceClippingPlaneNums(tt, et) { + return tt + .replace(/NUM_CLIPPING_PLANES/g, et.numClippingPlanes) + .replace(/UNION_CLIPPING_PLANES/g, et.numClippingPlanes - et.numClipIntersection) + } + const includePattern = /^[ \t]*#include +<([\w\d./]+)>/gm + function resolveIncludes(tt) { + return tt.replace(includePattern, includeReplacer) + } + function includeReplacer(tt, et) { + const nt = ShaderChunk[et] + if (nt === void 0) throw new Error('Can not resolve #include <' + et + '>') + return resolveIncludes(nt) + } + const deprecatedUnrollLoopPattern = + /#pragma unroll_loop[\s]+?for \( int i \= (\d+)\; i < (\d+)\; i \+\+ \) \{([\s\S]+?)(?=\})\}/g, + unrollLoopPattern = + /#pragma unroll_loop_start\s+for\s*\(\s*int\s+i\s*=\s*(\d+)\s*;\s*i\s*<\s*(\d+)\s*;\s*i\s*\+\+\s*\)\s*{([\s\S]+?)}\s+#pragma unroll_loop_end/g + function unrollLoops(tt) { + return tt.replace(unrollLoopPattern, loopReplacer).replace(deprecatedUnrollLoopPattern, deprecatedLoopReplacer) + } + function deprecatedLoopReplacer(tt, et, nt, rt) { + return ( + console.warn( + 'WebGLProgram: #pragma unroll_loop shader syntax is deprecated. Please use #pragma unroll_loop_start syntax instead.', + ), + loopReplacer(tt, et, nt, rt) + ) + } + function loopReplacer(tt, et, nt, rt) { + let it = '' + for (let ot = parseInt(et); ot < parseInt(nt); ot++) + it += rt.replace(/\[\s*i\s*\]/g, '[ ' + ot + ' ]').replace(/UNROLLED_LOOP_INDEX/g, ot) + return it + } + function generatePrecision(tt) { + let et = + 'precision ' + + tt.precision + + ` float; +precision ` + + tt.precision + + ' int;' + return ( + tt.precision === 'highp' + ? (et += ` +#define HIGH_PRECISION`) + : tt.precision === 'mediump' + ? (et += ` +#define MEDIUM_PRECISION`) + : tt.precision === 'lowp' && + (et += ` +#define LOW_PRECISION`), + et + ) + } + function generateShadowMapTypeDefine(tt) { + let et = 'SHADOWMAP_TYPE_BASIC' + return ( + tt.shadowMapType === PCFShadowMap + ? (et = 'SHADOWMAP_TYPE_PCF') + : tt.shadowMapType === PCFSoftShadowMap + ? (et = 'SHADOWMAP_TYPE_PCF_SOFT') + : tt.shadowMapType === VSMShadowMap && (et = 'SHADOWMAP_TYPE_VSM'), + et + ) + } + function generateEnvMapTypeDefine(tt) { + let et = 'ENVMAP_TYPE_CUBE' + if (tt.envMap) + switch (tt.envMapMode) { + case CubeReflectionMapping: + case CubeRefractionMapping: + et = 'ENVMAP_TYPE_CUBE' + break + case CubeUVReflectionMapping: + et = 'ENVMAP_TYPE_CUBE_UV' + break + } + return et + } + function generateEnvMapModeDefine(tt) { + let et = 'ENVMAP_MODE_REFLECTION' + if (tt.envMap) + switch (tt.envMapMode) { + case CubeRefractionMapping: + et = 'ENVMAP_MODE_REFRACTION' + break + } + return et + } + function generateEnvMapBlendingDefine(tt) { + let et = 'ENVMAP_BLENDING_NONE' + if (tt.envMap) + switch (tt.combine) { + case MultiplyOperation: + et = 'ENVMAP_BLENDING_MULTIPLY' + break + case MixOperation: + et = 'ENVMAP_BLENDING_MIX' + break + case AddOperation: + et = 'ENVMAP_BLENDING_ADD' + break + } + return et + } + function generateCubeUVSize$1(tt) { + const et = tt.envMapCubeUVHeight + if (et === null) return null + const nt = Math.log2(et) - 2, + rt = 1 / et + return { texelWidth: 1 / (3 * Math.max(Math.pow(2, nt), 7 * 16)), texelHeight: rt, maxMip: nt } + } + function WebGLProgram(tt, et, nt, rt) { + const it = tt.getContext(), + ot = nt.defines + let at = nt.vertexShader, + st = nt.fragmentShader + const lt = generateShadowMapTypeDefine(nt), + ct = generateEnvMapTypeDefine(nt), + ut = generateEnvMapModeDefine(nt), + ht = generateEnvMapBlendingDefine(nt), + dt = generateCubeUVSize$1(nt), + pt = nt.isWebGL2 ? '' : generateExtensions(nt), + mt = generateDefines(ot), + gt = it.createProgram() + let yt, + bt, + vt = nt.glslVersion + ? '#version ' + + nt.glslVersion + + ` +` + : '' + nt.isRawShaderMaterial + ? ((yt = [mt].filter(filterEmptyLine).join(` +`)), + yt.length > 0 && + (yt += ` +`), + (bt = [pt, mt].filter(filterEmptyLine).join(` +`)), + bt.length > 0 && + (bt += ` +`)) + : ((yt = [ + generatePrecision(nt), + '#define SHADER_NAME ' + nt.shaderName, + mt, + nt.instancing ? '#define USE_INSTANCING' : '', + nt.instancingColor ? '#define USE_INSTANCING_COLOR' : '', + nt.supportsVertexTextures ? '#define VERTEX_TEXTURES' : '', + nt.useFog && nt.fog ? '#define USE_FOG' : '', + nt.useFog && nt.fogExp2 ? '#define FOG_EXP2' : '', + nt.map ? '#define USE_MAP' : '', + nt.envMap ? '#define USE_ENVMAP' : '', + nt.envMap ? '#define ' + ut : '', + nt.lightMap ? '#define USE_LIGHTMAP' : '', + nt.aoMap ? '#define USE_AOMAP' : '', + nt.emissiveMap ? '#define USE_EMISSIVEMAP' : '', + nt.bumpMap ? '#define USE_BUMPMAP' : '', + nt.normalMap ? '#define USE_NORMALMAP' : '', + nt.normalMap && nt.objectSpaceNormalMap ? '#define OBJECTSPACE_NORMALMAP' : '', + nt.normalMap && nt.tangentSpaceNormalMap ? '#define TANGENTSPACE_NORMALMAP' : '', + nt.clearcoatMap ? '#define USE_CLEARCOATMAP' : '', + nt.clearcoatRoughnessMap ? '#define USE_CLEARCOAT_ROUGHNESSMAP' : '', + nt.clearcoatNormalMap ? '#define USE_CLEARCOAT_NORMALMAP' : '', + nt.iridescenceMap ? '#define USE_IRIDESCENCEMAP' : '', + nt.iridescenceThicknessMap ? '#define USE_IRIDESCENCE_THICKNESSMAP' : '', + nt.displacementMap && nt.supportsVertexTextures ? '#define USE_DISPLACEMENTMAP' : '', + nt.specularMap ? '#define USE_SPECULARMAP' : '', + nt.specularIntensityMap ? '#define USE_SPECULARINTENSITYMAP' : '', + nt.specularColorMap ? '#define USE_SPECULARCOLORMAP' : '', + nt.roughnessMap ? '#define USE_ROUGHNESSMAP' : '', + nt.metalnessMap ? '#define USE_METALNESSMAP' : '', + nt.alphaMap ? '#define USE_ALPHAMAP' : '', + nt.transmission ? '#define USE_TRANSMISSION' : '', + nt.transmissionMap ? '#define USE_TRANSMISSIONMAP' : '', + nt.thicknessMap ? '#define USE_THICKNESSMAP' : '', + nt.sheenColorMap ? '#define USE_SHEENCOLORMAP' : '', + nt.sheenRoughnessMap ? '#define USE_SHEENROUGHNESSMAP' : '', + nt.vertexTangents ? '#define USE_TANGENT' : '', + nt.vertexColors ? '#define USE_COLOR' : '', + nt.vertexAlphas ? '#define USE_COLOR_ALPHA' : '', + nt.vertexUvs ? '#define USE_UV' : '', + nt.uvsVertexOnly ? '#define UVS_VERTEX_ONLY' : '', + nt.flatShading ? '#define FLAT_SHADED' : '', + nt.skinning ? '#define USE_SKINNING' : '', + nt.morphTargets ? '#define USE_MORPHTARGETS' : '', + nt.morphNormals && nt.flatShading === !1 ? '#define USE_MORPHNORMALS' : '', + nt.morphColors && nt.isWebGL2 ? '#define USE_MORPHCOLORS' : '', + nt.morphTargetsCount > 0 && nt.isWebGL2 ? '#define MORPHTARGETS_TEXTURE' : '', + nt.morphTargetsCount > 0 && nt.isWebGL2 ? '#define MORPHTARGETS_TEXTURE_STRIDE ' + nt.morphTextureStride : '', + nt.morphTargetsCount > 0 && nt.isWebGL2 ? '#define MORPHTARGETS_COUNT ' + nt.morphTargetsCount : '', + nt.doubleSided ? '#define DOUBLE_SIDED' : '', + nt.flipSided ? '#define FLIP_SIDED' : '', + nt.shadowMapEnabled ? '#define USE_SHADOWMAP' : '', + nt.shadowMapEnabled ? '#define ' + lt : '', + nt.sizeAttenuation ? '#define USE_SIZEATTENUATION' : '', + nt.logarithmicDepthBuffer ? '#define USE_LOGDEPTHBUF' : '', + nt.logarithmicDepthBuffer && nt.rendererExtensionFragDepth ? '#define USE_LOGDEPTHBUF_EXT' : '', + 'uniform mat4 modelMatrix;', + 'uniform mat4 modelViewMatrix;', + 'uniform mat4 projectionMatrix;', + 'uniform mat4 viewMatrix;', + 'uniform mat3 normalMatrix;', + 'uniform vec3 cameraPosition;', + 'uniform bool isOrthographic;', + '#ifdef USE_INSTANCING', + ' attribute mat4 instanceMatrix;', + '#endif', + '#ifdef USE_INSTANCING_COLOR', + ' attribute vec3 instanceColor;', + '#endif', + 'attribute vec3 position;', + 'attribute vec3 normal;', + 'attribute vec2 uv;', + '#ifdef USE_TANGENT', + ' attribute vec4 tangent;', + '#endif', + '#if defined( USE_COLOR_ALPHA )', + ' attribute vec4 color;', + '#elif defined( USE_COLOR )', + ' attribute vec3 color;', + '#endif', + '#if ( defined( USE_MORPHTARGETS ) && ! defined( MORPHTARGETS_TEXTURE ) )', + ' attribute vec3 morphTarget0;', + ' attribute vec3 morphTarget1;', + ' attribute vec3 morphTarget2;', + ' attribute vec3 morphTarget3;', + ' #ifdef USE_MORPHNORMALS', + ' attribute vec3 morphNormal0;', + ' attribute vec3 morphNormal1;', + ' attribute vec3 morphNormal2;', + ' attribute vec3 morphNormal3;', + ' #else', + ' attribute vec3 morphTarget4;', + ' attribute vec3 morphTarget5;', + ' attribute vec3 morphTarget6;', + ' attribute vec3 morphTarget7;', + ' #endif', + '#endif', + '#ifdef USE_SKINNING', + ' attribute vec4 skinIndex;', + ' attribute vec4 skinWeight;', + '#endif', + ` +`, + ].filter(filterEmptyLine).join(` +`)), + (bt = [ + pt, + generatePrecision(nt), + '#define SHADER_NAME ' + nt.shaderName, + mt, + nt.useFog && nt.fog ? '#define USE_FOG' : '', + nt.useFog && nt.fogExp2 ? '#define FOG_EXP2' : '', + nt.map ? '#define USE_MAP' : '', + nt.matcap ? '#define USE_MATCAP' : '', + nt.envMap ? '#define USE_ENVMAP' : '', + nt.envMap ? '#define ' + ct : '', + nt.envMap ? '#define ' + ut : '', + nt.envMap ? '#define ' + ht : '', + dt ? '#define CUBEUV_TEXEL_WIDTH ' + dt.texelWidth : '', + dt ? '#define CUBEUV_TEXEL_HEIGHT ' + dt.texelHeight : '', + dt ? '#define CUBEUV_MAX_MIP ' + dt.maxMip + '.0' : '', + nt.lightMap ? '#define USE_LIGHTMAP' : '', + nt.aoMap ? '#define USE_AOMAP' : '', + nt.emissiveMap ? '#define USE_EMISSIVEMAP' : '', + nt.bumpMap ? '#define USE_BUMPMAP' : '', + nt.normalMap ? '#define USE_NORMALMAP' : '', + nt.normalMap && nt.objectSpaceNormalMap ? '#define OBJECTSPACE_NORMALMAP' : '', + nt.normalMap && nt.tangentSpaceNormalMap ? '#define TANGENTSPACE_NORMALMAP' : '', + nt.clearcoat ? '#define USE_CLEARCOAT' : '', + nt.clearcoatMap ? '#define USE_CLEARCOATMAP' : '', + nt.clearcoatRoughnessMap ? '#define USE_CLEARCOAT_ROUGHNESSMAP' : '', + nt.clearcoatNormalMap ? '#define USE_CLEARCOAT_NORMALMAP' : '', + nt.iridescence ? '#define USE_IRIDESCENCE' : '', + nt.iridescenceMap ? '#define USE_IRIDESCENCEMAP' : '', + nt.iridescenceThicknessMap ? '#define USE_IRIDESCENCE_THICKNESSMAP' : '', + nt.specularMap ? '#define USE_SPECULARMAP' : '', + nt.specularIntensityMap ? '#define USE_SPECULARINTENSITYMAP' : '', + nt.specularColorMap ? '#define USE_SPECULARCOLORMAP' : '', + nt.roughnessMap ? '#define USE_ROUGHNESSMAP' : '', + nt.metalnessMap ? '#define USE_METALNESSMAP' : '', + nt.alphaMap ? '#define USE_ALPHAMAP' : '', + nt.alphaTest ? '#define USE_ALPHATEST' : '', + nt.sheen ? '#define USE_SHEEN' : '', + nt.sheenColorMap ? '#define USE_SHEENCOLORMAP' : '', + nt.sheenRoughnessMap ? '#define USE_SHEENROUGHNESSMAP' : '', + nt.transmission ? '#define USE_TRANSMISSION' : '', + nt.transmissionMap ? '#define USE_TRANSMISSIONMAP' : '', + nt.thicknessMap ? '#define USE_THICKNESSMAP' : '', + nt.decodeVideoTexture ? '#define DECODE_VIDEO_TEXTURE' : '', + nt.vertexTangents ? '#define USE_TANGENT' : '', + nt.vertexColors || nt.instancingColor ? '#define USE_COLOR' : '', + nt.vertexAlphas ? '#define USE_COLOR_ALPHA' : '', + nt.vertexUvs ? '#define USE_UV' : '', + nt.uvsVertexOnly ? '#define UVS_VERTEX_ONLY' : '', + nt.gradientMap ? '#define USE_GRADIENTMAP' : '', + nt.flatShading ? '#define FLAT_SHADED' : '', + nt.doubleSided ? '#define DOUBLE_SIDED' : '', + nt.flipSided ? '#define FLIP_SIDED' : '', + nt.shadowMapEnabled ? '#define USE_SHADOWMAP' : '', + nt.shadowMapEnabled ? '#define ' + lt : '', + nt.premultipliedAlpha ? '#define PREMULTIPLIED_ALPHA' : '', + nt.physicallyCorrectLights ? '#define PHYSICALLY_CORRECT_LIGHTS' : '', + nt.logarithmicDepthBuffer ? '#define USE_LOGDEPTHBUF' : '', + nt.logarithmicDepthBuffer && nt.rendererExtensionFragDepth ? '#define USE_LOGDEPTHBUF_EXT' : '', + 'uniform mat4 viewMatrix;', + 'uniform vec3 cameraPosition;', + 'uniform bool isOrthographic;', + nt.toneMapping !== NoToneMapping ? '#define TONE_MAPPING' : '', + nt.toneMapping !== NoToneMapping ? ShaderChunk.tonemapping_pars_fragment : '', + nt.toneMapping !== NoToneMapping ? getToneMappingFunction('toneMapping', nt.toneMapping) : '', + nt.dithering ? '#define DITHERING' : '', + nt.opaque ? '#define OPAQUE' : '', + ShaderChunk.encodings_pars_fragment, + getTexelEncodingFunction('linearToOutputTexel', nt.outputEncoding), + nt.useDepthPacking ? '#define DEPTH_PACKING ' + nt.depthPacking : '', + ` +`, + ].filter(filterEmptyLine).join(` +`))), + (at = resolveIncludes(at)), + (at = replaceLightNums(at, nt)), + (at = replaceClippingPlaneNums(at, nt)), + (st = resolveIncludes(st)), + (st = replaceLightNums(st, nt)), + (st = replaceClippingPlaneNums(st, nt)), + (at = unrollLoops(at)), + (st = unrollLoops(st)), + nt.isWebGL2 && + nt.isRawShaderMaterial !== !0 && + ((vt = `#version 300 es +`), + (yt = + [ + 'precision mediump sampler2DArray;', + '#define attribute in', + '#define varying out', + '#define texture2D texture', + ].join(` +`) + + ` +` + + yt), + (bt = + [ + '#define varying in', + nt.glslVersion === GLSL3 ? '' : 'layout(location = 0) out highp vec4 pc_fragColor;', + nt.glslVersion === GLSL3 ? '' : '#define gl_FragColor pc_fragColor', + '#define gl_FragDepthEXT gl_FragDepth', + '#define texture2D texture', + '#define textureCube texture', + '#define texture2DProj textureProj', + '#define texture2DLodEXT textureLod', + '#define texture2DProjLodEXT textureProjLod', + '#define textureCubeLodEXT textureLod', + '#define texture2DGradEXT textureGrad', + '#define texture2DProjGradEXT textureProjGrad', + '#define textureCubeGradEXT textureGrad', + ].join(` +`) + + ` +` + + bt)) + const xt = vt + yt + at, + kt = vt + bt + st, + St = WebGLShader(it, 35633, xt), + Tt = WebGLShader(it, 35632, kt) + if ( + (it.attachShader(gt, St), + it.attachShader(gt, Tt), + nt.index0AttributeName !== void 0 + ? it.bindAttribLocation(gt, 0, nt.index0AttributeName) + : nt.morphTargets === !0 && it.bindAttribLocation(gt, 0, 'position'), + it.linkProgram(gt), + tt.debug.checkShaderErrors) + ) { + const $t = it.getProgramInfoLog(gt).trim(), + Dt = it.getShaderInfoLog(St).trim(), + jt = it.getShaderInfoLog(Tt).trim() + let Pt = !0, + Ct = !0 + if (it.getProgramParameter(gt, 35714) === !1) { + Pt = !1 + const wt = getShaderErrors(it, St, 'vertex'), + It = getShaderErrors(it, Tt, 'fragment') + console.error( + 'THREE.WebGLProgram: Shader Error ' + + it.getError() + + ' - VALIDATE_STATUS ' + + it.getProgramParameter(gt, 35715) + + ` - axis = normalize( axis ); +Program Info Log: ` + + $t + + ` +` + + wt + + ` +` + + It, + ) + } else + $t !== '' ? console.warn('THREE.WebGLProgram: Program Info Log:', $t) : (Dt === '' || jt === '') && (Ct = !1) + Ct && + (this.diagnostics = { + runnable: Pt, + programLog: $t, + vertexShader: { log: Dt, prefix: yt }, + fragmentShader: { log: jt, prefix: bt }, + }) + } + it.deleteShader(St), it.deleteShader(Tt) + let At + this.getUniforms = function () { + return At === void 0 && (At = new WebGLUniforms(it, gt)), At + } + let Et + return ( + (this.getAttributes = function () { + return Et === void 0 && (Et = fetchAttributeLocations(it, gt)), Et + }), + (this.destroy = function () { + rt.releaseStatesOfProgram(this), it.deleteProgram(gt), (this.program = void 0) + }), + (this.name = nt.shaderName), + (this.id = programIdCount++), + (this.cacheKey = et), + (this.usedTimes = 1), + (this.program = gt), + (this.vertexShader = St), + (this.fragmentShader = Tt), + this + ) + } + let _id = 0 + class WebGLShaderCache { + constructor() { + ;(this.shaderCache = new Map()), (this.materialCache = new Map()) + } + update(et) { + const nt = et.vertexShader, + rt = et.fragmentShader, + it = this._getShaderStage(nt), + ot = this._getShaderStage(rt), + at = this._getShaderCacheForMaterial(et) + return at.has(it) === !1 && (at.add(it), it.usedTimes++), at.has(ot) === !1 && (at.add(ot), ot.usedTimes++), this + } + remove(et) { + const nt = this.materialCache.get(et) + for (const rt of nt) rt.usedTimes--, rt.usedTimes === 0 && this.shaderCache.delete(rt.code) + return this.materialCache.delete(et), this + } + getVertexShaderID(et) { + return this._getShaderStage(et.vertexShader).id + } + getFragmentShaderID(et) { + return this._getShaderStage(et.fragmentShader).id + } + dispose() { + this.shaderCache.clear(), this.materialCache.clear() + } + _getShaderCacheForMaterial(et) { + const nt = this.materialCache + return nt.has(et) === !1 && nt.set(et, new Set()), nt.get(et) + } + _getShaderStage(et) { + const nt = this.shaderCache + if (nt.has(et) === !1) { + const rt = new WebGLShaderStage(et) + nt.set(et, rt) + } + return nt.get(et) + } + } + class WebGLShaderStage { + constructor(et) { + ;(this.id = _id++), (this.code = et), (this.usedTimes = 0) + } + } + function WebGLPrograms(tt, et, nt, rt, it, ot, at) { + const st = new Layers(), + lt = new WebGLShaderCache(), + ct = [], + ut = it.isWebGL2, + ht = it.logarithmicDepthBuffer, + dt = it.vertexTextures + let pt = it.precision + const mt = { + MeshDepthMaterial: 'depth', + MeshDistanceMaterial: 'distanceRGBA', + MeshNormalMaterial: 'normal', + MeshBasicMaterial: 'basic', + MeshLambertMaterial: 'lambert', + MeshPhongMaterial: 'phong', + MeshToonMaterial: 'toon', + MeshStandardMaterial: 'physical', + MeshPhysicalMaterial: 'physical', + MeshMatcapMaterial: 'matcap', + LineBasicMaterial: 'basic', + LineDashedMaterial: 'dashed', + PointsMaterial: 'points', + ShadowMaterial: 'shadow', + SpriteMaterial: 'sprite', + } + function gt(Et, $t, Dt, jt, Pt) { + const Ct = jt.fog, + wt = Pt.geometry, + It = Et.isMeshStandardMaterial ? jt.environment : null, + Ot = (Et.isMeshStandardMaterial ? nt : et).get(Et.envMap || It), + Wt = Ot && Ot.mapping === CubeUVReflectionMapping ? Ot.image.height : null, + zt = mt[Et.type] + Et.precision !== null && + ((pt = it.getMaxPrecision(Et.precision)), + pt !== Et.precision && + console.warn('THREE.WebGLProgram.getParameters:', Et.precision, 'not supported, using', pt, 'instead.')) + const Ft = wt.morphAttributes.position || wt.morphAttributes.normal || wt.morphAttributes.color, + Nt = Ft !== void 0 ? Ft.length : 0 + let Ut = 0 + wt.morphAttributes.position !== void 0 && (Ut = 1), + wt.morphAttributes.normal !== void 0 && (Ut = 2), + wt.morphAttributes.color !== void 0 && (Ut = 3) + let Mt, Ht, en, sn + if (zt) { + const an = ShaderLib[zt] + ;(Mt = an.vertexShader), (Ht = an.fragmentShader) + } else + (Mt = Et.vertexShader), + (Ht = Et.fragmentShader), + lt.update(Et), + (en = lt.getVertexShaderID(Et)), + (sn = lt.getFragmentShaderID(Et)) + const Kt = tt.getRenderTarget(), + rn = Et.alphaTest > 0, + nn = Et.clearcoat > 0, + hn = Et.iridescence > 0 + return { + isWebGL2: ut, + shaderID: zt, + shaderName: Et.type, + vertexShader: Mt, + fragmentShader: Ht, + defines: Et.defines, + customVertexShaderID: en, + customFragmentShaderID: sn, + isRawShaderMaterial: Et.isRawShaderMaterial === !0, + glslVersion: Et.glslVersion, + precision: pt, + instancing: Pt.isInstancedMesh === !0, + instancingColor: Pt.isInstancedMesh === !0 && Pt.instanceColor !== null, + supportsVertexTextures: dt, + outputEncoding: + Kt === null ? tt.outputEncoding : Kt.isXRRenderTarget === !0 ? Kt.texture.encoding : LinearEncoding, + map: !!Et.map, + matcap: !!Et.matcap, + envMap: !!Ot, + envMapMode: Ot && Ot.mapping, + envMapCubeUVHeight: Wt, + lightMap: !!Et.lightMap, + aoMap: !!Et.aoMap, + emissiveMap: !!Et.emissiveMap, + bumpMap: !!Et.bumpMap, + normalMap: !!Et.normalMap, + objectSpaceNormalMap: Et.normalMapType === ObjectSpaceNormalMap, + tangentSpaceNormalMap: Et.normalMapType === TangentSpaceNormalMap, + decodeVideoTexture: !!Et.map && Et.map.isVideoTexture === !0 && Et.map.encoding === sRGBEncoding, + clearcoat: nn, + clearcoatMap: nn && !!Et.clearcoatMap, + clearcoatRoughnessMap: nn && !!Et.clearcoatRoughnessMap, + clearcoatNormalMap: nn && !!Et.clearcoatNormalMap, + iridescence: hn, + iridescenceMap: hn && !!Et.iridescenceMap, + iridescenceThicknessMap: hn && !!Et.iridescenceThicknessMap, + displacementMap: !!Et.displacementMap, + roughnessMap: !!Et.roughnessMap, + metalnessMap: !!Et.metalnessMap, + specularMap: !!Et.specularMap, + specularIntensityMap: !!Et.specularIntensityMap, + specularColorMap: !!Et.specularColorMap, + opaque: Et.transparent === !1 && Et.blending === NormalBlending, + alphaMap: !!Et.alphaMap, + alphaTest: rn, + gradientMap: !!Et.gradientMap, + sheen: Et.sheen > 0, + sheenColorMap: !!Et.sheenColorMap, + sheenRoughnessMap: !!Et.sheenRoughnessMap, + transmission: Et.transmission > 0, + transmissionMap: !!Et.transmissionMap, + thicknessMap: !!Et.thicknessMap, + combine: Et.combine, + vertexTangents: !!Et.normalMap && !!wt.attributes.tangent, + vertexColors: Et.vertexColors, + vertexAlphas: Et.vertexColors === !0 && !!wt.attributes.color && wt.attributes.color.itemSize === 4, + vertexUvs: + !!Et.map || + !!Et.bumpMap || + !!Et.normalMap || + !!Et.specularMap || + !!Et.alphaMap || + !!Et.emissiveMap || + !!Et.roughnessMap || + !!Et.metalnessMap || + !!Et.clearcoatMap || + !!Et.clearcoatRoughnessMap || + !!Et.clearcoatNormalMap || + !!Et.iridescenceMap || + !!Et.iridescenceThicknessMap || + !!Et.displacementMap || + !!Et.transmissionMap || + !!Et.thicknessMap || + !!Et.specularIntensityMap || + !!Et.specularColorMap || + !!Et.sheenColorMap || + !!Et.sheenRoughnessMap, + uvsVertexOnly: + !( + Et.map || + Et.bumpMap || + Et.normalMap || + Et.specularMap || + Et.alphaMap || + Et.emissiveMap || + Et.roughnessMap || + Et.metalnessMap || + Et.clearcoatNormalMap || + Et.iridescenceMap || + Et.iridescenceThicknessMap || + Et.transmission > 0 || + Et.transmissionMap || + Et.thicknessMap || + Et.specularIntensityMap || + Et.specularColorMap || + Et.sheen > 0 || + Et.sheenColorMap || + Et.sheenRoughnessMap + ) && !!Et.displacementMap, + fog: !!Ct, + useFog: Et.fog === !0, + fogExp2: Ct && Ct.isFogExp2, + flatShading: !!Et.flatShading, + sizeAttenuation: Et.sizeAttenuation, + logarithmicDepthBuffer: ht, + skinning: Pt.isSkinnedMesh === !0, + morphTargets: wt.morphAttributes.position !== void 0, + morphNormals: wt.morphAttributes.normal !== void 0, + morphColors: wt.morphAttributes.color !== void 0, + morphTargetsCount: Nt, + morphTextureStride: Ut, + numDirLights: $t.directional.length, + numPointLights: $t.point.length, + numSpotLights: $t.spot.length, + numRectAreaLights: $t.rectArea.length, + numHemiLights: $t.hemi.length, + numDirLightShadows: $t.directionalShadowMap.length, + numPointLightShadows: $t.pointShadowMap.length, + numSpotLightShadows: $t.spotShadowMap.length, + numClippingPlanes: at.numPlanes, + numClipIntersection: at.numIntersection, + dithering: Et.dithering, + shadowMapEnabled: tt.shadowMap.enabled && Dt.length > 0, + shadowMapType: tt.shadowMap.type, + toneMapping: Et.toneMapped ? tt.toneMapping : NoToneMapping, + physicallyCorrectLights: tt.physicallyCorrectLights, + premultipliedAlpha: Et.premultipliedAlpha, + doubleSided: Et.side === DoubleSide, + flipSided: Et.side === BackSide, + useDepthPacking: !!Et.depthPacking, + depthPacking: Et.depthPacking || 0, + index0AttributeName: Et.index0AttributeName, + extensionDerivatives: Et.extensions && Et.extensions.derivatives, + extensionFragDepth: Et.extensions && Et.extensions.fragDepth, + extensionDrawBuffers: Et.extensions && Et.extensions.drawBuffers, + extensionShaderTextureLOD: Et.extensions && Et.extensions.shaderTextureLOD, + rendererExtensionFragDepth: ut || rt.has('EXT_frag_depth'), + rendererExtensionDrawBuffers: ut || rt.has('WEBGL_draw_buffers'), + rendererExtensionShaderTextureLod: ut || rt.has('EXT_shader_texture_lod'), + customProgramCacheKey: Et.customProgramCacheKey(), + } + } + function yt(Et) { + const $t = [] + if ( + (Et.shaderID ? $t.push(Et.shaderID) : ($t.push(Et.customVertexShaderID), $t.push(Et.customFragmentShaderID)), + Et.defines !== void 0) + ) + for (const Dt in Et.defines) $t.push(Dt), $t.push(Et.defines[Dt]) + return ( + Et.isRawShaderMaterial === !1 && (bt($t, Et), vt($t, Et), $t.push(tt.outputEncoding)), + $t.push(Et.customProgramCacheKey), + $t.join() + ) + } + function bt(Et, $t) { + Et.push($t.precision), + Et.push($t.outputEncoding), + Et.push($t.envMapMode), + Et.push($t.envMapCubeUVHeight), + Et.push($t.combine), + Et.push($t.vertexUvs), + Et.push($t.fogExp2), + Et.push($t.sizeAttenuation), + Et.push($t.morphTargetsCount), + Et.push($t.morphAttributeCount), + Et.push($t.numDirLights), + Et.push($t.numPointLights), + Et.push($t.numSpotLights), + Et.push($t.numHemiLights), + Et.push($t.numRectAreaLights), + Et.push($t.numDirLightShadows), + Et.push($t.numPointLightShadows), + Et.push($t.numSpotLightShadows), + Et.push($t.shadowMapType), + Et.push($t.toneMapping), + Et.push($t.numClippingPlanes), + Et.push($t.numClipIntersection), + Et.push($t.depthPacking) + } + function vt(Et, $t) { + st.disableAll(), + $t.isWebGL2 && st.enable(0), + $t.supportsVertexTextures && st.enable(1), + $t.instancing && st.enable(2), + $t.instancingColor && st.enable(3), + $t.map && st.enable(4), + $t.matcap && st.enable(5), + $t.envMap && st.enable(6), + $t.lightMap && st.enable(7), + $t.aoMap && st.enable(8), + $t.emissiveMap && st.enable(9), + $t.bumpMap && st.enable(10), + $t.normalMap && st.enable(11), + $t.objectSpaceNormalMap && st.enable(12), + $t.tangentSpaceNormalMap && st.enable(13), + $t.clearcoat && st.enable(14), + $t.clearcoatMap && st.enable(15), + $t.clearcoatRoughnessMap && st.enable(16), + $t.clearcoatNormalMap && st.enable(17), + $t.iridescence && st.enable(18), + $t.iridescenceMap && st.enable(19), + $t.iridescenceThicknessMap && st.enable(20), + $t.displacementMap && st.enable(21), + $t.specularMap && st.enable(22), + $t.roughnessMap && st.enable(23), + $t.metalnessMap && st.enable(24), + $t.gradientMap && st.enable(25), + $t.alphaMap && st.enable(26), + $t.alphaTest && st.enable(27), + $t.vertexColors && st.enable(28), + $t.vertexAlphas && st.enable(29), + $t.vertexUvs && st.enable(30), + $t.vertexTangents && st.enable(31), + $t.uvsVertexOnly && st.enable(32), + $t.fog && st.enable(33), + Et.push(st.mask), + st.disableAll(), + $t.useFog && st.enable(0), + $t.flatShading && st.enable(1), + $t.logarithmicDepthBuffer && st.enable(2), + $t.skinning && st.enable(3), + $t.morphTargets && st.enable(4), + $t.morphNormals && st.enable(5), + $t.morphColors && st.enable(6), + $t.premultipliedAlpha && st.enable(7), + $t.shadowMapEnabled && st.enable(8), + $t.physicallyCorrectLights && st.enable(9), + $t.doubleSided && st.enable(10), + $t.flipSided && st.enable(11), + $t.useDepthPacking && st.enable(12), + $t.dithering && st.enable(13), + $t.specularIntensityMap && st.enable(14), + $t.specularColorMap && st.enable(15), + $t.transmission && st.enable(16), + $t.transmissionMap && st.enable(17), + $t.thicknessMap && st.enable(18), + $t.sheen && st.enable(19), + $t.sheenColorMap && st.enable(20), + $t.sheenRoughnessMap && st.enable(21), + $t.decodeVideoTexture && st.enable(22), + $t.opaque && st.enable(23), + Et.push(st.mask) + } + function xt(Et) { + const $t = mt[Et.type] + let Dt + if ($t) { + const jt = ShaderLib[$t] + Dt = UniformsUtils.clone(jt.uniforms) + } else Dt = Et.uniforms + return Dt + } + function kt(Et, $t) { + let Dt + for (let jt = 0, Pt = ct.length; jt < Pt; jt++) { + const Ct = ct[jt] + if (Ct.cacheKey === $t) { + ;(Dt = Ct), ++Dt.usedTimes + break + } + } + return Dt === void 0 && ((Dt = new WebGLProgram(tt, $t, Et, ot)), ct.push(Dt)), Dt + } + function St(Et) { + if (--Et.usedTimes === 0) { + const $t = ct.indexOf(Et) + ;(ct[$t] = ct[ct.length - 1]), ct.pop(), Et.destroy() + } + } + function Tt(Et) { + lt.remove(Et) + } + function At() { + lt.dispose() + } + return { + getParameters: gt, + getProgramCacheKey: yt, + getUniforms: xt, + acquireProgram: kt, + releaseProgram: St, + releaseShaderCache: Tt, + programs: ct, + dispose: At, + } + } + function WebGLProperties() { + let tt = new WeakMap() + function et(ot) { + let at = tt.get(ot) + return at === void 0 && ((at = {}), tt.set(ot, at)), at + } + function nt(ot) { + tt.delete(ot) + } + function rt(ot, at, st) { + tt.get(ot)[at] = st + } + function it() { + tt = new WeakMap() + } + return { get: et, remove: nt, update: rt, dispose: it } + } + function painterSortStable(tt, et) { + return tt.groupOrder !== et.groupOrder + ? tt.groupOrder - et.groupOrder + : tt.renderOrder !== et.renderOrder + ? tt.renderOrder - et.renderOrder + : tt.material.id !== et.material.id + ? tt.material.id - et.material.id + : tt.z !== et.z + ? tt.z - et.z + : tt.id - et.id + } + function reversePainterSortStable(tt, et) { + return tt.groupOrder !== et.groupOrder + ? tt.groupOrder - et.groupOrder + : tt.renderOrder !== et.renderOrder + ? tt.renderOrder - et.renderOrder + : tt.z !== et.z + ? et.z - tt.z + : tt.id - et.id + } + function WebGLRenderList() { + const tt = [] + let et = 0 + const nt = [], + rt = [], + it = [] + function ot() { + ;(et = 0), (nt.length = 0), (rt.length = 0), (it.length = 0) + } + function at(ht, dt, pt, mt, gt, yt) { + let bt = tt[et] + return ( + bt === void 0 + ? ((bt = { + id: ht.id, + object: ht, + geometry: dt, + material: pt, + groupOrder: mt, + renderOrder: ht.renderOrder, + z: gt, + group: yt, + }), + (tt[et] = bt)) + : ((bt.id = ht.id), + (bt.object = ht), + (bt.geometry = dt), + (bt.material = pt), + (bt.groupOrder = mt), + (bt.renderOrder = ht.renderOrder), + (bt.z = gt), + (bt.group = yt)), + et++, + bt + ) + } + function st(ht, dt, pt, mt, gt, yt) { + const bt = at(ht, dt, pt, mt, gt, yt) + pt.transmission > 0 ? rt.push(bt) : pt.transparent === !0 ? it.push(bt) : nt.push(bt) + } + function lt(ht, dt, pt, mt, gt, yt) { + const bt = at(ht, dt, pt, mt, gt, yt) + pt.transmission > 0 ? rt.unshift(bt) : pt.transparent === !0 ? it.unshift(bt) : nt.unshift(bt) + } + function ct(ht, dt) { + nt.length > 1 && nt.sort(ht || painterSortStable), + rt.length > 1 && rt.sort(dt || reversePainterSortStable), + it.length > 1 && it.sort(dt || reversePainterSortStable) + } + function ut() { + for (let ht = et, dt = tt.length; ht < dt; ht++) { + const pt = tt[ht] + if (pt.id === null) break + ;(pt.id = null), (pt.object = null), (pt.geometry = null), (pt.material = null), (pt.group = null) + } + } + return { opaque: nt, transmissive: rt, transparent: it, init: ot, push: st, unshift: lt, finish: ut, sort: ct } + } + function WebGLRenderLists() { + let tt = new WeakMap() + function et(rt, it) { + let ot + return ( + tt.has(rt) === !1 + ? ((ot = new WebGLRenderList()), tt.set(rt, [ot])) + : it >= tt.get(rt).length + ? ((ot = new WebGLRenderList()), tt.get(rt).push(ot)) + : (ot = tt.get(rt)[it]), + ot + ) + } + function nt() { + tt = new WeakMap() + } + return { get: et, dispose: nt } + } + function UniformsCache() { + const tt = {} + return { + get: function (et) { + if (tt[et.id] !== void 0) return tt[et.id] + let nt + switch (et.type) { + case 'DirectionalLight': + nt = { direction: new Vector3(), color: new Color$1() } + break + case 'SpotLight': + nt = { + position: new Vector3(), + direction: new Vector3(), + color: new Color$1(), + distance: 0, + coneCos: 0, + penumbraCos: 0, + decay: 0, + } + break + case 'PointLight': + nt = { position: new Vector3(), color: new Color$1(), distance: 0, decay: 0 } + break + case 'HemisphereLight': + nt = { direction: new Vector3(), skyColor: new Color$1(), groundColor: new Color$1() } + break + case 'RectAreaLight': + nt = { color: new Color$1(), position: new Vector3(), halfWidth: new Vector3(), halfHeight: new Vector3() } + break + } + return (tt[et.id] = nt), nt + }, + } + } + function ShadowUniformsCache() { + const tt = {} + return { + get: function (et) { + if (tt[et.id] !== void 0) return tt[et.id] + let nt + switch (et.type) { + case 'DirectionalLight': + nt = { shadowBias: 0, shadowNormalBias: 0, shadowRadius: 1, shadowMapSize: new Vector2() } + break + case 'SpotLight': + nt = { shadowBias: 0, shadowNormalBias: 0, shadowRadius: 1, shadowMapSize: new Vector2() } + break + case 'PointLight': + nt = { + shadowBias: 0, + shadowNormalBias: 0, + shadowRadius: 1, + shadowMapSize: new Vector2(), + shadowCameraNear: 1, + shadowCameraFar: 1e3, + } + break + } + return (tt[et.id] = nt), nt + }, + } + } + let nextVersion = 0 + function shadowCastingLightsFirst(tt, et) { + return (et.castShadow ? 1 : 0) - (tt.castShadow ? 1 : 0) + } + function WebGLLights(tt, et) { + const nt = new UniformsCache(), + rt = ShadowUniformsCache(), + it = { + version: 0, + hash: { + directionalLength: -1, + pointLength: -1, + spotLength: -1, + rectAreaLength: -1, + hemiLength: -1, + numDirectionalShadows: -1, + numPointShadows: -1, + numSpotShadows: -1, + }, + ambient: [0, 0, 0], + probe: [], + directional: [], + directionalShadow: [], + directionalShadowMap: [], + directionalShadowMatrix: [], + spot: [], + spotShadow: [], + spotShadowMap: [], + spotShadowMatrix: [], + rectArea: [], + rectAreaLTC1: null, + rectAreaLTC2: null, + point: [], + pointShadow: [], + pointShadowMap: [], + pointShadowMatrix: [], + hemi: [], + } + for (let ut = 0; ut < 9; ut++) it.probe.push(new Vector3()) + const ot = new Vector3(), + at = new Matrix4(), + st = new Matrix4() + function lt(ut, ht) { + let dt = 0, + pt = 0, + mt = 0 + for (let $t = 0; $t < 9; $t++) it.probe[$t].set(0, 0, 0) + let gt = 0, + yt = 0, + bt = 0, + vt = 0, + xt = 0, + kt = 0, + St = 0, + Tt = 0 + ut.sort(shadowCastingLightsFirst) + const At = ht !== !0 ? Math.PI : 1 + for (let $t = 0, Dt = ut.length; $t < Dt; $t++) { + const jt = ut[$t], + Pt = jt.color, + Ct = jt.intensity, + wt = jt.distance, + It = jt.shadow && jt.shadow.map ? jt.shadow.map.texture : null + if (jt.isAmbientLight) (dt += Pt.r * Ct * At), (pt += Pt.g * Ct * At), (mt += Pt.b * Ct * At) + else if (jt.isLightProbe) + for (let Ot = 0; Ot < 9; Ot++) it.probe[Ot].addScaledVector(jt.sh.coefficients[Ot], Ct) + else if (jt.isDirectionalLight) { + const Ot = nt.get(jt) + if ((Ot.color.copy(jt.color).multiplyScalar(jt.intensity * At), jt.castShadow)) { + const Wt = jt.shadow, + zt = rt.get(jt) + ;(zt.shadowBias = Wt.bias), + (zt.shadowNormalBias = Wt.normalBias), + (zt.shadowRadius = Wt.radius), + (zt.shadowMapSize = Wt.mapSize), + (it.directionalShadow[gt] = zt), + (it.directionalShadowMap[gt] = It), + (it.directionalShadowMatrix[gt] = jt.shadow.matrix), + kt++ + } + ;(it.directional[gt] = Ot), gt++ + } else if (jt.isSpotLight) { + const Ot = nt.get(jt) + if ( + (Ot.position.setFromMatrixPosition(jt.matrixWorld), + Ot.color.copy(Pt).multiplyScalar(Ct * At), + (Ot.distance = wt), + (Ot.coneCos = Math.cos(jt.angle)), + (Ot.penumbraCos = Math.cos(jt.angle * (1 - jt.penumbra))), + (Ot.decay = jt.decay), + jt.castShadow) + ) { + const Wt = jt.shadow, + zt = rt.get(jt) + ;(zt.shadowBias = Wt.bias), + (zt.shadowNormalBias = Wt.normalBias), + (zt.shadowRadius = Wt.radius), + (zt.shadowMapSize = Wt.mapSize), + (it.spotShadow[bt] = zt), + (it.spotShadowMap[bt] = It), + (it.spotShadowMatrix[bt] = jt.shadow.matrix), + Tt++ + } + ;(it.spot[bt] = Ot), bt++ + } else if (jt.isRectAreaLight) { + const Ot = nt.get(jt) + Ot.color.copy(Pt).multiplyScalar(Ct), + Ot.halfWidth.set(jt.width * 0.5, 0, 0), + Ot.halfHeight.set(0, jt.height * 0.5, 0), + (it.rectArea[vt] = Ot), + vt++ + } else if (jt.isPointLight) { + const Ot = nt.get(jt) + if ( + (Ot.color.copy(jt.color).multiplyScalar(jt.intensity * At), + (Ot.distance = jt.distance), + (Ot.decay = jt.decay), + jt.castShadow) + ) { + const Wt = jt.shadow, + zt = rt.get(jt) + ;(zt.shadowBias = Wt.bias), + (zt.shadowNormalBias = Wt.normalBias), + (zt.shadowRadius = Wt.radius), + (zt.shadowMapSize = Wt.mapSize), + (zt.shadowCameraNear = Wt.camera.near), + (zt.shadowCameraFar = Wt.camera.far), + (it.pointShadow[yt] = zt), + (it.pointShadowMap[yt] = It), + (it.pointShadowMatrix[yt] = jt.shadow.matrix), + St++ + } + ;(it.point[yt] = Ot), yt++ + } else if (jt.isHemisphereLight) { + const Ot = nt.get(jt) + Ot.skyColor.copy(jt.color).multiplyScalar(Ct * At), + Ot.groundColor.copy(jt.groundColor).multiplyScalar(Ct * At), + (it.hemi[xt] = Ot), + xt++ + } + } + vt > 0 && + (et.isWebGL2 || tt.has('OES_texture_float_linear') === !0 + ? ((it.rectAreaLTC1 = UniformsLib.LTC_FLOAT_1), (it.rectAreaLTC2 = UniformsLib.LTC_FLOAT_2)) + : tt.has('OES_texture_half_float_linear') === !0 + ? ((it.rectAreaLTC1 = UniformsLib.LTC_HALF_1), (it.rectAreaLTC2 = UniformsLib.LTC_HALF_2)) + : console.error('THREE.WebGLRenderer: Unable to use RectAreaLight. Missing WebGL extensions.')), + (it.ambient[0] = dt), + (it.ambient[1] = pt), + (it.ambient[2] = mt) + const Et = it.hash + ;(Et.directionalLength !== gt || + Et.pointLength !== yt || + Et.spotLength !== bt || + Et.rectAreaLength !== vt || + Et.hemiLength !== xt || + Et.numDirectionalShadows !== kt || + Et.numPointShadows !== St || + Et.numSpotShadows !== Tt) && + ((it.directional.length = gt), + (it.spot.length = bt), + (it.rectArea.length = vt), + (it.point.length = yt), + (it.hemi.length = xt), + (it.directionalShadow.length = kt), + (it.directionalShadowMap.length = kt), + (it.pointShadow.length = St), + (it.pointShadowMap.length = St), + (it.spotShadow.length = Tt), + (it.spotShadowMap.length = Tt), + (it.directionalShadowMatrix.length = kt), + (it.pointShadowMatrix.length = St), + (it.spotShadowMatrix.length = Tt), + (Et.directionalLength = gt), + (Et.pointLength = yt), + (Et.spotLength = bt), + (Et.rectAreaLength = vt), + (Et.hemiLength = xt), + (Et.numDirectionalShadows = kt), + (Et.numPointShadows = St), + (Et.numSpotShadows = Tt), + (it.version = nextVersion++)) + } + function ct(ut, ht) { + let dt = 0, + pt = 0, + mt = 0, + gt = 0, + yt = 0 + const bt = ht.matrixWorldInverse + for (let vt = 0, xt = ut.length; vt < xt; vt++) { + const kt = ut[vt] + if (kt.isDirectionalLight) { + const St = it.directional[dt] + St.direction.setFromMatrixPosition(kt.matrixWorld), + ot.setFromMatrixPosition(kt.target.matrixWorld), + St.direction.sub(ot), + St.direction.transformDirection(bt), + dt++ + } else if (kt.isSpotLight) { + const St = it.spot[mt] + St.position.setFromMatrixPosition(kt.matrixWorld), + St.position.applyMatrix4(bt), + St.direction.setFromMatrixPosition(kt.matrixWorld), + ot.setFromMatrixPosition(kt.target.matrixWorld), + St.direction.sub(ot), + St.direction.transformDirection(bt), + mt++ + } else if (kt.isRectAreaLight) { + const St = it.rectArea[gt] + St.position.setFromMatrixPosition(kt.matrixWorld), + St.position.applyMatrix4(bt), + st.identity(), + at.copy(kt.matrixWorld), + at.premultiply(bt), + st.extractRotation(at), + St.halfWidth.set(kt.width * 0.5, 0, 0), + St.halfHeight.set(0, kt.height * 0.5, 0), + St.halfWidth.applyMatrix4(st), + St.halfHeight.applyMatrix4(st), + gt++ + } else if (kt.isPointLight) { + const St = it.point[pt] + St.position.setFromMatrixPosition(kt.matrixWorld), St.position.applyMatrix4(bt), pt++ + } else if (kt.isHemisphereLight) { + const St = it.hemi[yt] + St.direction.setFromMatrixPosition(kt.matrixWorld), St.direction.transformDirection(bt), yt++ + } + } + } + return { setup: lt, setupView: ct, state: it } + } + function WebGLRenderState(tt, et) { + const nt = new WebGLLights(tt, et), + rt = [], + it = [] + function ot() { + ;(rt.length = 0), (it.length = 0) + } + function at(ht) { + rt.push(ht) + } + function st(ht) { + it.push(ht) + } + function lt(ht) { + nt.setup(rt, ht) + } + function ct(ht) { + nt.setupView(rt, ht) + } + return { + init: ot, + state: { lightsArray: rt, shadowsArray: it, lights: nt }, + setupLights: lt, + setupLightsView: ct, + pushLight: at, + pushShadow: st, + } + } + function WebGLRenderStates(tt, et) { + let nt = new WeakMap() + function rt(ot, at = 0) { + let st + return ( + nt.has(ot) === !1 + ? ((st = new WebGLRenderState(tt, et)), nt.set(ot, [st])) + : at >= nt.get(ot).length + ? ((st = new WebGLRenderState(tt, et)), nt.get(ot).push(st)) + : (st = nt.get(ot)[at]), + st + ) + } + function it() { + nt = new WeakMap() + } + return { get: rt, dispose: it } + } + class MeshDepthMaterial extends Material { + constructor(et) { + super(), + (this.isMeshDepthMaterial = !0), + (this.type = 'MeshDepthMaterial'), + (this.depthPacking = BasicDepthPacking), + (this.map = null), + (this.alphaMap = null), + (this.displacementMap = null), + (this.displacementScale = 1), + (this.displacementBias = 0), + (this.wireframe = !1), + (this.wireframeLinewidth = 1), + this.setValues(et) + } + copy(et) { + return ( + super.copy(et), + (this.depthPacking = et.depthPacking), + (this.map = et.map), + (this.alphaMap = et.alphaMap), + (this.displacementMap = et.displacementMap), + (this.displacementScale = et.displacementScale), + (this.displacementBias = et.displacementBias), + (this.wireframe = et.wireframe), + (this.wireframeLinewidth = et.wireframeLinewidth), + this + ) + } + } + class MeshDistanceMaterial extends Material { + constructor(et) { + super(), + (this.isMeshDistanceMaterial = !0), + (this.type = 'MeshDistanceMaterial'), + (this.referencePosition = new Vector3()), + (this.nearDistance = 1), + (this.farDistance = 1e3), + (this.map = null), + (this.alphaMap = null), + (this.displacementMap = null), + (this.displacementScale = 1), + (this.displacementBias = 0), + this.setValues(et) + } + copy(et) { + return ( + super.copy(et), + this.referencePosition.copy(et.referencePosition), + (this.nearDistance = et.nearDistance), + (this.farDistance = et.farDistance), + (this.map = et.map), + (this.alphaMap = et.alphaMap), + (this.displacementMap = et.displacementMap), + (this.displacementScale = et.displacementScale), + (this.displacementBias = et.displacementBias), + this + ) + } + } + const vertex = `void main() { + gl_Position = vec4( position, 1.0 ); +}`, + fragment$h = `uniform sampler2D shadow_pass; +uniform vec2 resolution; +uniform float radius; +#include +void main() { + const float samples = float( VSM_SAMPLES ); + float mean = 0.0; + float squared_mean = 0.0; + float uvStride = samples <= 1.0 ? 0.0 : 2.0 / ( samples - 1.0 ); + float uvStart = samples <= 1.0 ? 0.0 : - 1.0; + for ( float i = 0.0; i < samples; i ++ ) { + float uvOffset = uvStart + i * uvStride; + #ifdef HORIZONTAL_PASS + vec2 distribution = unpackRGBATo2Half( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( uvOffset, 0.0 ) * radius ) / resolution ) ); + mean += distribution.x; + squared_mean += distribution.y * distribution.y + distribution.x * distribution.x; + #else + float depth = unpackRGBAToDepth( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( 0.0, uvOffset ) * radius ) / resolution ) ); + mean += depth; + squared_mean += depth * depth; + #endif + } + mean = mean / samples; + squared_mean = squared_mean / samples; + float std_dev = sqrt( squared_mean - mean * mean ); + gl_FragColor = pack2HalfToRGBA( vec2( mean, std_dev ) ); +}` + function WebGLShadowMap(tt, et, nt) { + let rt = new Frustum() + const it = new Vector2(), + ot = new Vector2(), + at = new Vector4(), + st = new MeshDepthMaterial({ depthPacking: RGBADepthPacking }), + lt = new MeshDistanceMaterial(), + ct = {}, + ut = nt.maxTextureSize, + ht = { 0: BackSide, 1: FrontSide, 2: DoubleSide }, + dt = new ShaderMaterial({ + defines: { VSM_SAMPLES: 8 }, + uniforms: { shadow_pass: { value: null }, resolution: { value: new Vector2() }, radius: { value: 4 } }, + vertexShader: vertex, + fragmentShader: fragment$h, + }), + pt = dt.clone() + pt.defines.HORIZONTAL_PASS = 1 + const mt = new BufferGeometry() + mt.setAttribute('position', new BufferAttribute(new Float32Array([-1, -1, 0.5, 3, -1, 0.5, -1, 3, 0.5]), 3)) + const gt = new Mesh(mt, dt), + yt = this + ;(this.enabled = !1), + (this.autoUpdate = !0), + (this.needsUpdate = !1), + (this.type = PCFShadowMap), + (this.render = function (kt, St, Tt) { + if (yt.enabled === !1 || (yt.autoUpdate === !1 && yt.needsUpdate === !1) || kt.length === 0) return + const At = tt.getRenderTarget(), + Et = tt.getActiveCubeFace(), + $t = tt.getActiveMipmapLevel(), + Dt = tt.state + Dt.setBlending(NoBlending), + Dt.buffers.color.setClear(1, 1, 1, 1), + Dt.buffers.depth.setTest(!0), + Dt.setScissorTest(!1) + for (let jt = 0, Pt = kt.length; jt < Pt; jt++) { + const Ct = kt[jt], + wt = Ct.shadow + if (wt === void 0) { + console.warn('THREE.WebGLShadowMap:', Ct, 'has no shadow.') + continue + } + if (wt.autoUpdate === !1 && wt.needsUpdate === !1) continue + it.copy(wt.mapSize) + const It = wt.getFrameExtents() + if ( + (it.multiply(It), + ot.copy(wt.mapSize), + (it.x > ut || it.y > ut) && + (it.x > ut && ((ot.x = Math.floor(ut / It.x)), (it.x = ot.x * It.x), (wt.mapSize.x = ot.x)), + it.y > ut && ((ot.y = Math.floor(ut / It.y)), (it.y = ot.y * It.y), (wt.mapSize.y = ot.y))), + wt.map === null) + ) { + const Wt = this.type !== VSMShadowMap ? { minFilter: NearestFilter, magFilter: NearestFilter } : {} + ;(wt.map = new WebGLRenderTarget(it.x, it.y, Wt)), + (wt.map.texture.name = Ct.name + '.shadowMap'), + wt.camera.updateProjectionMatrix() + } + tt.setRenderTarget(wt.map), tt.clear() + const Ot = wt.getViewportCount() + for (let Wt = 0; Wt < Ot; Wt++) { + const zt = wt.getViewport(Wt) + at.set(ot.x * zt.x, ot.y * zt.y, ot.x * zt.z, ot.y * zt.w), + Dt.viewport(at), + wt.updateMatrices(Ct, Wt), + (rt = wt.getFrustum()), + xt(St, Tt, wt.camera, Ct, this.type) + } + wt.isPointLightShadow !== !0 && this.type === VSMShadowMap && bt(wt, Tt), (wt.needsUpdate = !1) + } + ;(yt.needsUpdate = !1), tt.setRenderTarget(At, Et, $t) + }) + function bt(kt, St) { + const Tt = et.update(gt) + dt.defines.VSM_SAMPLES !== kt.blurSamples && + ((dt.defines.VSM_SAMPLES = kt.blurSamples), + (pt.defines.VSM_SAMPLES = kt.blurSamples), + (dt.needsUpdate = !0), + (pt.needsUpdate = !0)), + kt.mapPass === null && (kt.mapPass = new WebGLRenderTarget(it.x, it.y)), + (dt.uniforms.shadow_pass.value = kt.map.texture), + (dt.uniforms.resolution.value = kt.mapSize), + (dt.uniforms.radius.value = kt.radius), + tt.setRenderTarget(kt.mapPass), + tt.clear(), + tt.renderBufferDirect(St, null, Tt, dt, gt, null), + (pt.uniforms.shadow_pass.value = kt.mapPass.texture), + (pt.uniforms.resolution.value = kt.mapSize), + (pt.uniforms.radius.value = kt.radius), + tt.setRenderTarget(kt.map), + tt.clear(), + tt.renderBufferDirect(St, null, Tt, pt, gt, null) + } + function vt(kt, St, Tt, At, Et, $t) { + let Dt = null + const jt = Tt.isPointLight === !0 ? kt.customDistanceMaterial : kt.customDepthMaterial + if ( + (jt !== void 0 ? (Dt = jt) : (Dt = Tt.isPointLight === !0 ? lt : st), + (tt.localClippingEnabled && + St.clipShadows === !0 && + Array.isArray(St.clippingPlanes) && + St.clippingPlanes.length !== 0) || + (St.displacementMap && St.displacementScale !== 0) || + (St.alphaMap && St.alphaTest > 0)) + ) { + const Pt = Dt.uuid, + Ct = St.uuid + let wt = ct[Pt] + wt === void 0 && ((wt = {}), (ct[Pt] = wt)) + let It = wt[Ct] + It === void 0 && ((It = Dt.clone()), (wt[Ct] = It)), (Dt = It) + } + return ( + (Dt.visible = St.visible), + (Dt.wireframe = St.wireframe), + $t === VSMShadowMap + ? (Dt.side = St.shadowSide !== null ? St.shadowSide : St.side) + : (Dt.side = St.shadowSide !== null ? St.shadowSide : ht[St.side]), + (Dt.alphaMap = St.alphaMap), + (Dt.alphaTest = St.alphaTest), + (Dt.clipShadows = St.clipShadows), + (Dt.clippingPlanes = St.clippingPlanes), + (Dt.clipIntersection = St.clipIntersection), + (Dt.displacementMap = St.displacementMap), + (Dt.displacementScale = St.displacementScale), + (Dt.displacementBias = St.displacementBias), + (Dt.wireframeLinewidth = St.wireframeLinewidth), + (Dt.linewidth = St.linewidth), + Tt.isPointLight === !0 && + Dt.isMeshDistanceMaterial === !0 && + (Dt.referencePosition.setFromMatrixPosition(Tt.matrixWorld), (Dt.nearDistance = At), (Dt.farDistance = Et)), + Dt + ) + } + function xt(kt, St, Tt, At, Et) { + if (kt.visible === !1) return + if ( + kt.layers.test(St.layers) && + (kt.isMesh || kt.isLine || kt.isPoints) && + (kt.castShadow || (kt.receiveShadow && Et === VSMShadowMap)) && + (!kt.frustumCulled || rt.intersectsObject(kt)) + ) { + kt.modelViewMatrix.multiplyMatrices(Tt.matrixWorldInverse, kt.matrixWorld) + const jt = et.update(kt), + Pt = kt.material + if (Array.isArray(Pt)) { + const Ct = jt.groups + for (let wt = 0, It = Ct.length; wt < It; wt++) { + const Ot = Ct[wt], + Wt = Pt[Ot.materialIndex] + if (Wt && Wt.visible) { + const zt = vt(kt, Wt, At, Tt.near, Tt.far, Et) + tt.renderBufferDirect(Tt, null, jt, zt, kt, Ot) + } + } + } else if (Pt.visible) { + const Ct = vt(kt, Pt, At, Tt.near, Tt.far, Et) + tt.renderBufferDirect(Tt, null, jt, Ct, kt, null) + } + } + const Dt = kt.children + for (let jt = 0, Pt = Dt.length; jt < Pt; jt++) xt(Dt[jt], St, Tt, At, Et) + } + } + function WebGLState(tt, et, nt) { + const rt = nt.isWebGL2 + function it() { + let zn = !1 + const Jn = new Vector4() + let Hn = null + const pr = new Vector4(0, 0, 0, 0) + return { + setMask: function (fr) { + Hn !== fr && !zn && (tt.colorMask(fr, fr, fr, fr), (Hn = fr)) + }, + setLocked: function (fr) { + zn = fr + }, + setClear: function (fr, xr, io, Tr, Ar) { + Ar === !0 && ((fr *= Tr), (xr *= Tr), (io *= Tr)), + Jn.set(fr, xr, io, Tr), + pr.equals(Jn) === !1 && (tt.clearColor(fr, xr, io, Tr), pr.copy(Jn)) + }, + reset: function () { + ;(zn = !1), (Hn = null), pr.set(-1, 0, 0, 0) + }, + } + } + function ot() { + let zn = !1, + Jn = null, + Hn = null, + pr = null + return { + setTest: function (fr) { + fr ? rn(2929) : nn(2929) + }, + setMask: function (fr) { + Jn !== fr && !zn && (tt.depthMask(fr), (Jn = fr)) + }, + setFunc: function (fr) { + if (Hn !== fr) { + if (fr) + switch (fr) { + case NeverDepth: + tt.depthFunc(512) + break + case AlwaysDepth: + tt.depthFunc(519) + break + case LessDepth: + tt.depthFunc(513) + break + case LessEqualDepth: + tt.depthFunc(515) + break + case EqualDepth: + tt.depthFunc(514) + break + case GreaterEqualDepth: + tt.depthFunc(518) + break + case GreaterDepth: + tt.depthFunc(516) + break + case NotEqualDepth: + tt.depthFunc(517) + break + default: + tt.depthFunc(515) + } + else tt.depthFunc(515) + Hn = fr + } + }, + setLocked: function (fr) { + zn = fr + }, + setClear: function (fr) { + pr !== fr && (tt.clearDepth(fr), (pr = fr)) + }, + reset: function () { + ;(zn = !1), (Jn = null), (Hn = null), (pr = null) + }, + } + } + function at() { + let zn = !1, + Jn = null, + Hn = null, + pr = null, + fr = null, + xr = null, + io = null, + Tr = null, + Ar = null + return { + setTest: function (qr) { + zn || (qr ? rn(2960) : nn(2960)) + }, + setMask: function (qr) { + Jn !== qr && !zn && (tt.stencilMask(qr), (Jn = qr)) + }, + setFunc: function (qr, jr, Fr) { + ;(Hn !== qr || pr !== jr || fr !== Fr) && (tt.stencilFunc(qr, jr, Fr), (Hn = qr), (pr = jr), (fr = Fr)) + }, + setOp: function (qr, jr, Fr) { + ;(xr !== qr || io !== jr || Tr !== Fr) && (tt.stencilOp(qr, jr, Fr), (xr = qr), (io = jr), (Tr = Fr)) + }, + setLocked: function (qr) { + zn = qr + }, + setClear: function (qr) { + Ar !== qr && (tt.clearStencil(qr), (Ar = qr)) + }, + reset: function () { + ;(zn = !1), + (Jn = null), + (Hn = null), + (pr = null), + (fr = null), + (xr = null), + (io = null), + (Tr = null), + (Ar = null) + }, + } + } + const st = new it(), + lt = new ot(), + ct = new at(), + ut = new WeakMap(), + ht = new WeakMap() + let dt = {}, + pt = {}, + mt = new WeakMap(), + gt = [], + yt = null, + bt = !1, + vt = null, + xt = null, + kt = null, + St = null, + Tt = null, + At = null, + Et = null, + $t = !1, + Dt = null, + jt = null, + Pt = null, + Ct = null, + wt = null + const It = tt.getParameter(35661) + let Ot = !1, + Wt = 0 + const zt = tt.getParameter(7938) + zt.indexOf('WebGL') !== -1 + ? ((Wt = parseFloat(/^WebGL (\d)/.exec(zt)[1])), (Ot = Wt >= 1)) + : zt.indexOf('OpenGL ES') !== -1 && ((Wt = parseFloat(/^OpenGL ES (\d)/.exec(zt)[1])), (Ot = Wt >= 2)) + let Ft = null, + Nt = {} + const Ut = tt.getParameter(3088), + Mt = tt.getParameter(2978), + Ht = new Vector4().fromArray(Ut), + en = new Vector4().fromArray(Mt) + function sn(zn, Jn, Hn) { + const pr = new Uint8Array(4), + fr = tt.createTexture() + tt.bindTexture(zn, fr), tt.texParameteri(zn, 10241, 9728), tt.texParameteri(zn, 10240, 9728) + for (let xr = 0; xr < Hn; xr++) tt.texImage2D(Jn + xr, 0, 6408, 1, 1, 0, 6408, 5121, pr) + return fr + } + const Kt = {} + ;(Kt[3553] = sn(3553, 3553, 1)), + (Kt[34067] = sn(34067, 34069, 6)), + st.setClear(0, 0, 0, 1), + lt.setClear(1), + ct.setClear(0), + rn(2929), + lt.setFunc(LessEqualDepth), + Nn(!1), + Tn(CullFaceBack), + rn(2884), + Pn(NoBlending) + function rn(zn) { + dt[zn] !== !0 && (tt.enable(zn), (dt[zn] = !0)) + } + function nn(zn) { + dt[zn] !== !1 && (tt.disable(zn), (dt[zn] = !1)) + } + function hn(zn, Jn) { + return pt[zn] !== Jn + ? (tt.bindFramebuffer(zn, Jn), + (pt[zn] = Jn), + rt && (zn === 36009 && (pt[36160] = Jn), zn === 36160 && (pt[36009] = Jn)), + !0) + : !1 + } + function vn(zn, Jn) { + let Hn = gt, + pr = !1 + if (zn) + if (((Hn = mt.get(Jn)), Hn === void 0 && ((Hn = []), mt.set(Jn, Hn)), zn.isWebGLMultipleRenderTargets)) { + const fr = zn.texture + if (Hn.length !== fr.length || Hn[0] !== 36064) { + for (let xr = 0, io = fr.length; xr < io; xr++) Hn[xr] = 36064 + xr + ;(Hn.length = fr.length), (pr = !0) + } + } else Hn[0] !== 36064 && ((Hn[0] = 36064), (pr = !0)) + else Hn[0] !== 1029 && ((Hn[0] = 1029), (pr = !0)) + pr && (nt.isWebGL2 ? tt.drawBuffers(Hn) : et.get('WEBGL_draw_buffers').drawBuffersWEBGL(Hn)) + } + function an(zn) { + return yt !== zn ? (tt.useProgram(zn), (yt = zn), !0) : !1 + } + const Qt = { [AddEquation]: 32774, [SubtractEquation]: 32778, [ReverseSubtractEquation]: 32779 } + if (rt) (Qt[MinEquation] = 32775), (Qt[MaxEquation] = 32776) + else { + const zn = et.get('EXT_blend_minmax') + zn !== null && ((Qt[MinEquation] = zn.MIN_EXT), (Qt[MaxEquation] = zn.MAX_EXT)) + } + const _n = { + [ZeroFactor]: 0, + [OneFactor]: 1, + [SrcColorFactor]: 768, + [SrcAlphaFactor]: 770, + [SrcAlphaSaturateFactor]: 776, + [DstColorFactor]: 774, + [DstAlphaFactor]: 772, + [OneMinusSrcColorFactor]: 769, + [OneMinusSrcAlphaFactor]: 771, + [OneMinusDstColorFactor]: 775, + [OneMinusDstAlphaFactor]: 773, + } + function Pn(zn, Jn, Hn, pr, fr, xr, io, Tr) { + if (zn === NoBlending) { + bt === !0 && (nn(3042), (bt = !1)) + return + } + if ((bt === !1 && (rn(3042), (bt = !0)), zn !== CustomBlending)) { + if (zn !== vt || Tr !== $t) { + if ( + ((xt !== AddEquation || Tt !== AddEquation) && + (tt.blendEquation(32774), (xt = AddEquation), (Tt = AddEquation)), + Tr) + ) + switch (zn) { + case NormalBlending: + tt.blendFuncSeparate(1, 771, 1, 771) + break + case AdditiveBlending: + tt.blendFunc(1, 1) + break + case SubtractiveBlending: + tt.blendFuncSeparate(0, 769, 0, 1) + break + case MultiplyBlending: + tt.blendFuncSeparate(0, 768, 0, 770) + break + default: + console.error('THREE.WebGLState: Invalid blending: ', zn) + break + } + else + switch (zn) { + case NormalBlending: + tt.blendFuncSeparate(770, 771, 1, 771) + break + case AdditiveBlending: + tt.blendFunc(770, 1) + break + case SubtractiveBlending: + tt.blendFuncSeparate(0, 769, 0, 1) + break + case MultiplyBlending: + tt.blendFunc(0, 768) + break + default: + console.error('THREE.WebGLState: Invalid blending: ', zn) + break + } + ;(kt = null), (St = null), (At = null), (Et = null), (vt = zn), ($t = Tr) + } + return + } + ;(fr = fr || Jn), + (xr = xr || Hn), + (io = io || pr), + (Jn !== xt || fr !== Tt) && (tt.blendEquationSeparate(Qt[Jn], Qt[fr]), (xt = Jn), (Tt = fr)), + (Hn !== kt || pr !== St || xr !== At || io !== Et) && + (tt.blendFuncSeparate(_n[Hn], _n[pr], _n[xr], _n[io]), (kt = Hn), (St = pr), (At = xr), (Et = io)), + (vt = zn), + ($t = null) + } + function $n(zn, Jn) { + zn.side === DoubleSide ? nn(2884) : rn(2884) + let Hn = zn.side === BackSide + Jn && (Hn = !Hn), + Nn(Hn), + zn.blending === NormalBlending && zn.transparent === !1 + ? Pn(NoBlending) + : Pn( + zn.blending, + zn.blendEquation, + zn.blendSrc, + zn.blendDst, + zn.blendEquationAlpha, + zn.blendSrcAlpha, + zn.blendDstAlpha, + zn.premultipliedAlpha, + ), + lt.setFunc(zn.depthFunc), + lt.setTest(zn.depthTest), + lt.setMask(zn.depthWrite), + st.setMask(zn.colorWrite) + const pr = zn.stencilWrite + ct.setTest(pr), + pr && + (ct.setMask(zn.stencilWriteMask), + ct.setFunc(zn.stencilFunc, zn.stencilRef, zn.stencilFuncMask), + ct.setOp(zn.stencilFail, zn.stencilZFail, zn.stencilZPass)), + mn(zn.polygonOffset, zn.polygonOffsetFactor, zn.polygonOffsetUnits), + zn.alphaToCoverage === !0 ? rn(32926) : nn(32926) + } + function Nn(zn) { + Dt !== zn && (zn ? tt.frontFace(2304) : tt.frontFace(2305), (Dt = zn)) + } + function Tn(zn) { + zn !== CullFaceNone + ? (rn(2884), + zn !== jt && + (zn === CullFaceBack ? tt.cullFace(1029) : zn === CullFaceFront ? tt.cullFace(1028) : tt.cullFace(1032))) + : nn(2884), + (jt = zn) + } + function cn(zn) { + zn !== Pt && (Ot && tt.lineWidth(zn), (Pt = zn)) + } + function mn(zn, Jn, Hn) { + zn ? (rn(32823), (Ct !== Jn || wt !== Hn) && (tt.polygonOffset(Jn, Hn), (Ct = Jn), (wt = Hn))) : nn(32823) + } + function In(zn) { + zn ? rn(3089) : nn(3089) + } + function An(zn) { + zn === void 0 && (zn = 33984 + It - 1), Ft !== zn && (tt.activeTexture(zn), (Ft = zn)) + } + function wn(zn, Jn) { + Ft === null && An() + let Hn = Nt[Ft] + Hn === void 0 && ((Hn = { type: void 0, texture: void 0 }), (Nt[Ft] = Hn)), + (Hn.type !== zn || Hn.texture !== Jn) && (tt.bindTexture(zn, Jn || Kt[zn]), (Hn.type = zn), (Hn.texture = Jn)) + } + function fn() { + const zn = Nt[Ft] + zn !== void 0 && zn.type !== void 0 && (tt.bindTexture(zn.type, null), (zn.type = void 0), (zn.texture = void 0)) + } + function pn() { + try { + tt.compressedTexImage2D.apply(tt, arguments) + } catch (zn) { + console.error('THREE.WebGLState:', zn) + } + } + function kn() { + try { + tt.texSubImage2D.apply(tt, arguments) + } catch (zn) { + console.error('THREE.WebGLState:', zn) + } + } + function Dn() { + try { + tt.texSubImage3D.apply(tt, arguments) + } catch (zn) { + console.error('THREE.WebGLState:', zn) + } + } + function un() { + try { + tt.compressedTexSubImage2D.apply(tt, arguments) + } catch (zn) { + console.error('THREE.WebGLState:', zn) + } + } + function Zt() { + try { + tt.texStorage2D.apply(tt, arguments) + } catch (zn) { + console.error('THREE.WebGLState:', zn) + } + } + function Xt() { + try { + tt.texStorage3D.apply(tt, arguments) + } catch (zn) { + console.error('THREE.WebGLState:', zn) + } + } + function Sn() { + try { + tt.texImage2D.apply(tt, arguments) + } catch (zn) { + console.error('THREE.WebGLState:', zn) + } + } + function Rn() { + try { + tt.texImage3D.apply(tt, arguments) + } catch (zn) { + console.error('THREE.WebGLState:', zn) + } + } + function jn(zn) { + Ht.equals(zn) === !1 && (tt.scissor(zn.x, zn.y, zn.z, zn.w), Ht.copy(zn)) + } + function On(zn) { + en.equals(zn) === !1 && (tt.viewport(zn.x, zn.y, zn.z, zn.w), en.copy(zn)) + } + function Zn(zn, Jn) { + let Hn = ht.get(Jn) + Hn === void 0 && ((Hn = new WeakMap()), ht.set(Jn, Hn)) + let pr = Hn.get(zn) + pr === void 0 && ((pr = tt.getUniformBlockIndex(Jn, zn.name)), Hn.set(zn, pr)) + } + function Vn(zn, Jn) { + const pr = ht.get(Jn).get(zn) + ut.get(zn) !== pr && (tt.uniformBlockBinding(Jn, pr, zn.__bindingPointIndex), ut.set(zn, pr)) + } + function qn() { + tt.disable(3042), + tt.disable(2884), + tt.disable(2929), + tt.disable(32823), + tt.disable(3089), + tt.disable(2960), + tt.disable(32926), + tt.blendEquation(32774), + tt.blendFunc(1, 0), + tt.blendFuncSeparate(1, 0, 1, 0), + tt.colorMask(!0, !0, !0, !0), + tt.clearColor(0, 0, 0, 0), + tt.depthMask(!0), + tt.depthFunc(513), + tt.clearDepth(1), + tt.stencilMask(4294967295), + tt.stencilFunc(519, 0, 4294967295), + tt.stencilOp(7680, 7680, 7680), + tt.clearStencil(0), + tt.cullFace(1029), + tt.frontFace(2305), + tt.polygonOffset(0, 0), + tt.activeTexture(33984), + tt.bindFramebuffer(36160, null), + rt === !0 && (tt.bindFramebuffer(36009, null), tt.bindFramebuffer(36008, null)), + tt.useProgram(null), + tt.lineWidth(1), + tt.scissor(0, 0, tt.canvas.width, tt.canvas.height), + tt.viewport(0, 0, tt.canvas.width, tt.canvas.height), + (dt = {}), + (Ft = null), + (Nt = {}), + (pt = {}), + (mt = new WeakMap()), + (gt = []), + (yt = null), + (bt = !1), + (vt = null), + (xt = null), + (kt = null), + (St = null), + (Tt = null), + (At = null), + (Et = null), + ($t = !1), + (Dt = null), + (jt = null), + (Pt = null), + (Ct = null), + (wt = null), + Ht.set(0, 0, tt.canvas.width, tt.canvas.height), + en.set(0, 0, tt.canvas.width, tt.canvas.height), + st.reset(), + lt.reset(), + ct.reset() + } + return { + buffers: { color: st, depth: lt, stencil: ct }, + enable: rn, + disable: nn, + bindFramebuffer: hn, + drawBuffers: vn, + useProgram: an, + setBlending: Pn, + setMaterial: $n, + setFlipSided: Nn, + setCullFace: Tn, + setLineWidth: cn, + setPolygonOffset: mn, + setScissorTest: In, + activeTexture: An, + bindTexture: wn, + unbindTexture: fn, + compressedTexImage2D: pn, + texImage2D: Sn, + texImage3D: Rn, + updateUBOMapping: Zn, + uniformBlockBinding: Vn, + texStorage2D: Zt, + texStorage3D: Xt, + texSubImage2D: kn, + texSubImage3D: Dn, + compressedTexSubImage2D: un, + scissor: jn, + viewport: On, + reset: qn, + } + } + function WebGLTextures(tt, et, nt, rt, it, ot, at) { + const st = it.isWebGL2, + lt = it.maxTextures, + ct = it.maxCubemapSize, + ut = it.maxTextureSize, + ht = it.maxSamples, + dt = et.has('WEBGL_multisampled_render_to_texture') ? et.get('WEBGL_multisampled_render_to_texture') : null, + pt = /OculusBrowser/g.test(navigator.userAgent), + mt = new WeakMap() + let gt + const yt = new WeakMap() + let bt = !1 + try { + bt = typeof OffscreenCanvas < 'u' && new OffscreenCanvas(1, 1).getContext('2d') !== null + } catch {} + function vt(wn, fn) { + return bt ? new OffscreenCanvas(wn, fn) : createElementNS('canvas') + } + function xt(wn, fn, pn, kn) { + let Dn = 1 + if (((wn.width > kn || wn.height > kn) && (Dn = kn / Math.max(wn.width, wn.height)), Dn < 1 || fn === !0)) + if ( + (typeof HTMLImageElement < 'u' && wn instanceof HTMLImageElement) || + (typeof HTMLCanvasElement < 'u' && wn instanceof HTMLCanvasElement) || + (typeof ImageBitmap < 'u' && wn instanceof ImageBitmap) + ) { + const un = fn ? floorPowerOfTwo : Math.floor, + Zt = un(Dn * wn.width), + Xt = un(Dn * wn.height) + gt === void 0 && (gt = vt(Zt, Xt)) + const Sn = pn ? vt(Zt, Xt) : gt + return ( + (Sn.width = Zt), + (Sn.height = Xt), + Sn.getContext('2d').drawImage(wn, 0, 0, Zt, Xt), + console.warn( + 'THREE.WebGLRenderer: Texture has been resized from (' + + wn.width + + 'x' + + wn.height + + ') to (' + + Zt + + 'x' + + Xt + + ').', + ), + Sn + ) + } else + return ( + 'data' in wn && + console.warn( + 'THREE.WebGLRenderer: Image in DataTexture is too big (' + wn.width + 'x' + wn.height + ').', + ), + wn + ) + return wn + } + function kt(wn) { + return isPowerOfTwo(wn.width) && isPowerOfTwo(wn.height) + } + function St(wn) { + return st + ? !1 + : wn.wrapS !== ClampToEdgeWrapping || + wn.wrapT !== ClampToEdgeWrapping || + (wn.minFilter !== NearestFilter && wn.minFilter !== LinearFilter) + } + function Tt(wn, fn) { + return wn.generateMipmaps && fn && wn.minFilter !== NearestFilter && wn.minFilter !== LinearFilter + } + function At(wn) { + tt.generateMipmap(wn) + } + function Et(wn, fn, pn, kn, Dn = !1) { + if (st === !1) return fn + if (wn !== null) { + if (tt[wn] !== void 0) return tt[wn] + console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '" + wn + "'") + } + let un = fn + return ( + fn === 6403 && (pn === 5126 && (un = 33326), pn === 5131 && (un = 33325), pn === 5121 && (un = 33321)), + fn === 33319 && (pn === 5126 && (un = 33328), pn === 5131 && (un = 33327), pn === 5121 && (un = 33323)), + fn === 6408 && + (pn === 5126 && (un = 34836), + pn === 5131 && (un = 34842), + pn === 5121 && (un = kn === sRGBEncoding && Dn === !1 ? 35907 : 32856), + pn === 32819 && (un = 32854), + pn === 32820 && (un = 32855)), + (un === 33325 || un === 33326 || un === 33327 || un === 33328 || un === 34842 || un === 34836) && + et.get('EXT_color_buffer_float'), + un + ) + } + function $t(wn, fn, pn) { + return Tt(wn, pn) === !0 || + (wn.isFramebufferTexture && wn.minFilter !== NearestFilter && wn.minFilter !== LinearFilter) + ? Math.log2(Math.max(fn.width, fn.height)) + 1 + : wn.mipmaps !== void 0 && wn.mipmaps.length > 0 + ? wn.mipmaps.length + : wn.isCompressedTexture && Array.isArray(wn.image) + ? fn.mipmaps.length + : 1 + } + function Dt(wn) { + return wn === NearestFilter || wn === NearestMipmapNearestFilter || wn === NearestMipmapLinearFilter ? 9728 : 9729 + } + function jt(wn) { + const fn = wn.target + fn.removeEventListener('dispose', jt), Ct(fn), fn.isVideoTexture && mt.delete(fn) + } + function Pt(wn) { + const fn = wn.target + fn.removeEventListener('dispose', Pt), It(fn) + } + function Ct(wn) { + const fn = rt.get(wn) + if (fn.__webglInit === void 0) return + const pn = wn.source, + kn = yt.get(pn) + if (kn) { + const Dn = kn[fn.__cacheKey] + Dn.usedTimes--, Dn.usedTimes === 0 && wt(wn), Object.keys(kn).length === 0 && yt.delete(pn) + } + rt.remove(wn) + } + function wt(wn) { + const fn = rt.get(wn) + tt.deleteTexture(fn.__webglTexture) + const pn = wn.source, + kn = yt.get(pn) + delete kn[fn.__cacheKey], at.memory.textures-- + } + function It(wn) { + const fn = wn.texture, + pn = rt.get(wn), + kn = rt.get(fn) + if ( + (kn.__webglTexture !== void 0 && (tt.deleteTexture(kn.__webglTexture), at.memory.textures--), + wn.depthTexture && wn.depthTexture.dispose(), + wn.isWebGLCubeRenderTarget) + ) + for (let Dn = 0; Dn < 6; Dn++) + tt.deleteFramebuffer(pn.__webglFramebuffer[Dn]), + pn.__webglDepthbuffer && tt.deleteRenderbuffer(pn.__webglDepthbuffer[Dn]) + else { + if ( + (tt.deleteFramebuffer(pn.__webglFramebuffer), + pn.__webglDepthbuffer && tt.deleteRenderbuffer(pn.__webglDepthbuffer), + pn.__webglMultisampledFramebuffer && tt.deleteFramebuffer(pn.__webglMultisampledFramebuffer), + pn.__webglColorRenderbuffer) + ) + for (let Dn = 0; Dn < pn.__webglColorRenderbuffer.length; Dn++) + pn.__webglColorRenderbuffer[Dn] && tt.deleteRenderbuffer(pn.__webglColorRenderbuffer[Dn]) + pn.__webglDepthRenderbuffer && tt.deleteRenderbuffer(pn.__webglDepthRenderbuffer) + } + if (wn.isWebGLMultipleRenderTargets) + for (let Dn = 0, un = fn.length; Dn < un; Dn++) { + const Zt = rt.get(fn[Dn]) + Zt.__webglTexture && (tt.deleteTexture(Zt.__webglTexture), at.memory.textures--), rt.remove(fn[Dn]) + } + rt.remove(fn), rt.remove(wn) + } + let Ot = 0 + function Wt() { + Ot = 0 + } + function zt() { + const wn = Ot + return ( + wn >= lt && + console.warn( + 'THREE.WebGLTextures: Trying to use ' + wn + ' texture units while this GPU supports only ' + lt, + ), + (Ot += 1), + wn + ) + } + function Ft(wn) { + const fn = [] + return ( + fn.push(wn.wrapS), + fn.push(wn.wrapT), + fn.push(wn.magFilter), + fn.push(wn.minFilter), + fn.push(wn.anisotropy), + fn.push(wn.internalFormat), + fn.push(wn.format), + fn.push(wn.type), + fn.push(wn.generateMipmaps), + fn.push(wn.premultiplyAlpha), + fn.push(wn.flipY), + fn.push(wn.unpackAlignment), + fn.push(wn.encoding), + fn.join() + ) + } + function Nt(wn, fn) { + const pn = rt.get(wn) + if ( + (wn.isVideoTexture && In(wn), wn.isRenderTargetTexture === !1 && wn.version > 0 && pn.__version !== wn.version) + ) { + const kn = wn.image + if (kn === null) console.warn('THREE.WebGLRenderer: Texture marked for update but no image data found.') + else if (kn.complete === !1) + console.warn('THREE.WebGLRenderer: Texture marked for update but image is incomplete') + else { + nn(pn, wn, fn) + return + } + } + nt.activeTexture(33984 + fn), nt.bindTexture(3553, pn.__webglTexture) + } + function Ut(wn, fn) { + const pn = rt.get(wn) + if (wn.version > 0 && pn.__version !== wn.version) { + nn(pn, wn, fn) + return + } + nt.activeTexture(33984 + fn), nt.bindTexture(35866, pn.__webglTexture) + } + function Mt(wn, fn) { + const pn = rt.get(wn) + if (wn.version > 0 && pn.__version !== wn.version) { + nn(pn, wn, fn) + return + } + nt.activeTexture(33984 + fn), nt.bindTexture(32879, pn.__webglTexture) + } + function Ht(wn, fn) { + const pn = rt.get(wn) + if (wn.version > 0 && pn.__version !== wn.version) { + hn(pn, wn, fn) + return + } + nt.activeTexture(33984 + fn), nt.bindTexture(34067, pn.__webglTexture) + } + const en = { [RepeatWrapping]: 10497, [ClampToEdgeWrapping]: 33071, [MirroredRepeatWrapping]: 33648 }, + sn = { + [NearestFilter]: 9728, + [NearestMipmapNearestFilter]: 9984, + [NearestMipmapLinearFilter]: 9986, + [LinearFilter]: 9729, + [LinearMipmapNearestFilter]: 9985, + [LinearMipmapLinearFilter]: 9987, + } + function Kt(wn, fn, pn) { + if ( + (pn + ? (tt.texParameteri(wn, 10242, en[fn.wrapS]), + tt.texParameteri(wn, 10243, en[fn.wrapT]), + (wn === 32879 || wn === 35866) && tt.texParameteri(wn, 32882, en[fn.wrapR]), + tt.texParameteri(wn, 10240, sn[fn.magFilter]), + tt.texParameteri(wn, 10241, sn[fn.minFilter])) + : (tt.texParameteri(wn, 10242, 33071), + tt.texParameteri(wn, 10243, 33071), + (wn === 32879 || wn === 35866) && tt.texParameteri(wn, 32882, 33071), + (fn.wrapS !== ClampToEdgeWrapping || fn.wrapT !== ClampToEdgeWrapping) && + console.warn( + 'THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping.', + ), + tt.texParameteri(wn, 10240, Dt(fn.magFilter)), + tt.texParameteri(wn, 10241, Dt(fn.minFilter)), + fn.minFilter !== NearestFilter && + fn.minFilter !== LinearFilter && + console.warn( + 'THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter.', + )), + et.has('EXT_texture_filter_anisotropic') === !0) + ) { + const kn = et.get('EXT_texture_filter_anisotropic') + if ( + (fn.type === FloatType && et.has('OES_texture_float_linear') === !1) || + (st === !1 && fn.type === HalfFloatType && et.has('OES_texture_half_float_linear') === !1) + ) + return + ;(fn.anisotropy > 1 || rt.get(fn).__currentAnisotropy) && + (tt.texParameterf(wn, kn.TEXTURE_MAX_ANISOTROPY_EXT, Math.min(fn.anisotropy, it.getMaxAnisotropy())), + (rt.get(fn).__currentAnisotropy = fn.anisotropy)) + } + } + function rn(wn, fn) { + let pn = !1 + wn.__webglInit === void 0 && ((wn.__webglInit = !0), fn.addEventListener('dispose', jt)) + const kn = fn.source + let Dn = yt.get(kn) + Dn === void 0 && ((Dn = {}), yt.set(kn, Dn)) + const un = Ft(fn) + if (un !== wn.__cacheKey) { + Dn[un] === void 0 && + ((Dn[un] = { texture: tt.createTexture(), usedTimes: 0 }), at.memory.textures++, (pn = !0)), + Dn[un].usedTimes++ + const Zt = Dn[wn.__cacheKey] + Zt !== void 0 && (Dn[wn.__cacheKey].usedTimes--, Zt.usedTimes === 0 && wt(fn)), + (wn.__cacheKey = un), + (wn.__webglTexture = Dn[un].texture) + } + return pn + } + function nn(wn, fn, pn) { + let kn = 3553 + fn.isDataArrayTexture && (kn = 35866), fn.isData3DTexture && (kn = 32879) + const Dn = rn(wn, fn), + un = fn.source + if ( + (nt.activeTexture(33984 + pn), + nt.bindTexture(kn, wn.__webglTexture), + un.version !== un.__currentVersion || Dn === !0) + ) { + tt.pixelStorei(37440, fn.flipY), + tt.pixelStorei(37441, fn.premultiplyAlpha), + tt.pixelStorei(3317, fn.unpackAlignment), + tt.pixelStorei(37443, 0) + const Zt = St(fn) && kt(fn.image) === !1 + let Xt = xt(fn.image, Zt, !1, ut) + Xt = An(fn, Xt) + const Sn = kt(Xt) || st, + Rn = ot.convert(fn.format, fn.encoding) + let jn = ot.convert(fn.type), + On = Et(fn.internalFormat, Rn, jn, fn.encoding, fn.isVideoTexture) + Kt(kn, fn, Sn) + let Zn + const Vn = fn.mipmaps, + qn = st && fn.isVideoTexture !== !0, + zn = un.__currentVersion === void 0 || Dn === !0, + Jn = $t(fn, Xt, Sn) + if (fn.isDepthTexture) + (On = 6402), + st + ? fn.type === FloatType + ? (On = 36012) + : fn.type === UnsignedIntType + ? (On = 33190) + : fn.type === UnsignedInt248Type + ? (On = 35056) + : (On = 33189) + : fn.type === FloatType && console.error('WebGLRenderer: Floating point depth texture requires WebGL2.'), + fn.format === DepthFormat && + On === 6402 && + fn.type !== UnsignedShortType && + fn.type !== UnsignedIntType && + (console.warn( + 'THREE.WebGLRenderer: Use UnsignedShortType or UnsignedIntType for DepthFormat DepthTexture.', + ), + (fn.type = UnsignedIntType), + (jn = ot.convert(fn.type))), + fn.format === DepthStencilFormat && + On === 6402 && + ((On = 34041), + fn.type !== UnsignedInt248Type && + (console.warn('THREE.WebGLRenderer: Use UnsignedInt248Type for DepthStencilFormat DepthTexture.'), + (fn.type = UnsignedInt248Type), + (jn = ot.convert(fn.type)))), + zn && + (qn + ? nt.texStorage2D(3553, 1, On, Xt.width, Xt.height) + : nt.texImage2D(3553, 0, On, Xt.width, Xt.height, 0, Rn, jn, null)) + else if (fn.isDataTexture) + if (Vn.length > 0 && Sn) { + qn && zn && nt.texStorage2D(3553, Jn, On, Vn[0].width, Vn[0].height) + for (let Hn = 0, pr = Vn.length; Hn < pr; Hn++) + (Zn = Vn[Hn]), + qn + ? nt.texSubImage2D(3553, Hn, 0, 0, Zn.width, Zn.height, Rn, jn, Zn.data) + : nt.texImage2D(3553, Hn, On, Zn.width, Zn.height, 0, Rn, jn, Zn.data) + fn.generateMipmaps = !1 + } else + qn + ? (zn && nt.texStorage2D(3553, Jn, On, Xt.width, Xt.height), + nt.texSubImage2D(3553, 0, 0, 0, Xt.width, Xt.height, Rn, jn, Xt.data)) + : nt.texImage2D(3553, 0, On, Xt.width, Xt.height, 0, Rn, jn, Xt.data) + else if (fn.isCompressedTexture) { + qn && zn && nt.texStorage2D(3553, Jn, On, Vn[0].width, Vn[0].height) + for (let Hn = 0, pr = Vn.length; Hn < pr; Hn++) + (Zn = Vn[Hn]), + fn.format !== RGBAFormat + ? Rn !== null + ? qn + ? nt.compressedTexSubImage2D(3553, Hn, 0, 0, Zn.width, Zn.height, Rn, Zn.data) + : nt.compressedTexImage2D(3553, Hn, On, Zn.width, Zn.height, 0, Zn.data) + : console.warn( + 'THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()', + ) + : qn + ? nt.texSubImage2D(3553, Hn, 0, 0, Zn.width, Zn.height, Rn, jn, Zn.data) + : nt.texImage2D(3553, Hn, On, Zn.width, Zn.height, 0, Rn, jn, Zn.data) + } else if (fn.isDataArrayTexture) + qn + ? (zn && nt.texStorage3D(35866, Jn, On, Xt.width, Xt.height, Xt.depth), + nt.texSubImage3D(35866, 0, 0, 0, 0, Xt.width, Xt.height, Xt.depth, Rn, jn, Xt.data)) + : nt.texImage3D(35866, 0, On, Xt.width, Xt.height, Xt.depth, 0, Rn, jn, Xt.data) + else if (fn.isData3DTexture) + qn + ? (zn && nt.texStorage3D(32879, Jn, On, Xt.width, Xt.height, Xt.depth), + nt.texSubImage3D(32879, 0, 0, 0, 0, Xt.width, Xt.height, Xt.depth, Rn, jn, Xt.data)) + : nt.texImage3D(32879, 0, On, Xt.width, Xt.height, Xt.depth, 0, Rn, jn, Xt.data) + else if (fn.isFramebufferTexture) { + if (zn) + if (qn) nt.texStorage2D(3553, Jn, On, Xt.width, Xt.height) + else { + let Hn = Xt.width, + pr = Xt.height + for (let fr = 0; fr < Jn; fr++) + nt.texImage2D(3553, fr, On, Hn, pr, 0, Rn, jn, null), (Hn >>= 1), (pr >>= 1) + } + } else if (Vn.length > 0 && Sn) { + qn && zn && nt.texStorage2D(3553, Jn, On, Vn[0].width, Vn[0].height) + for (let Hn = 0, pr = Vn.length; Hn < pr; Hn++) + (Zn = Vn[Hn]), qn ? nt.texSubImage2D(3553, Hn, 0, 0, Rn, jn, Zn) : nt.texImage2D(3553, Hn, On, Rn, jn, Zn) + fn.generateMipmaps = !1 + } else + qn + ? (zn && nt.texStorage2D(3553, Jn, On, Xt.width, Xt.height), nt.texSubImage2D(3553, 0, 0, 0, Rn, jn, Xt)) + : nt.texImage2D(3553, 0, On, Rn, jn, Xt) + Tt(fn, Sn) && At(kn), (un.__currentVersion = un.version), fn.onUpdate && fn.onUpdate(fn) + } + wn.__version = fn.version + } + function hn(wn, fn, pn) { + if (fn.image.length !== 6) return + const kn = rn(wn, fn), + Dn = fn.source + if ( + (nt.activeTexture(33984 + pn), + nt.bindTexture(34067, wn.__webglTexture), + Dn.version !== Dn.__currentVersion || kn === !0) + ) { + tt.pixelStorei(37440, fn.flipY), + tt.pixelStorei(37441, fn.premultiplyAlpha), + tt.pixelStorei(3317, fn.unpackAlignment), + tt.pixelStorei(37443, 0) + const un = fn.isCompressedTexture || fn.image[0].isCompressedTexture, + Zt = fn.image[0] && fn.image[0].isDataTexture, + Xt = [] + for (let Hn = 0; Hn < 6; Hn++) + !un && !Zt ? (Xt[Hn] = xt(fn.image[Hn], !1, !0, ct)) : (Xt[Hn] = Zt ? fn.image[Hn].image : fn.image[Hn]), + (Xt[Hn] = An(fn, Xt[Hn])) + const Sn = Xt[0], + Rn = kt(Sn) || st, + jn = ot.convert(fn.format, fn.encoding), + On = ot.convert(fn.type), + Zn = Et(fn.internalFormat, jn, On, fn.encoding), + Vn = st && fn.isVideoTexture !== !0, + qn = Dn.__currentVersion === void 0 || kn === !0 + let zn = $t(fn, Sn, Rn) + Kt(34067, fn, Rn) + let Jn + if (un) { + Vn && qn && nt.texStorage2D(34067, zn, Zn, Sn.width, Sn.height) + for (let Hn = 0; Hn < 6; Hn++) { + Jn = Xt[Hn].mipmaps + for (let pr = 0; pr < Jn.length; pr++) { + const fr = Jn[pr] + fn.format !== RGBAFormat + ? jn !== null + ? Vn + ? nt.compressedTexSubImage2D(34069 + Hn, pr, 0, 0, fr.width, fr.height, jn, fr.data) + : nt.compressedTexImage2D(34069 + Hn, pr, Zn, fr.width, fr.height, 0, fr.data) + : console.warn( + 'THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .setTextureCube()', + ) + : Vn + ? nt.texSubImage2D(34069 + Hn, pr, 0, 0, fr.width, fr.height, jn, On, fr.data) + : nt.texImage2D(34069 + Hn, pr, Zn, fr.width, fr.height, 0, jn, On, fr.data) + } + } + } else { + ;(Jn = fn.mipmaps), + Vn && qn && (Jn.length > 0 && zn++, nt.texStorage2D(34067, zn, Zn, Xt[0].width, Xt[0].height)) + for (let Hn = 0; Hn < 6; Hn++) + if (Zt) { + Vn + ? nt.texSubImage2D(34069 + Hn, 0, 0, 0, Xt[Hn].width, Xt[Hn].height, jn, On, Xt[Hn].data) + : nt.texImage2D(34069 + Hn, 0, Zn, Xt[Hn].width, Xt[Hn].height, 0, jn, On, Xt[Hn].data) + for (let pr = 0; pr < Jn.length; pr++) { + const xr = Jn[pr].image[Hn].image + Vn + ? nt.texSubImage2D(34069 + Hn, pr + 1, 0, 0, xr.width, xr.height, jn, On, xr.data) + : nt.texImage2D(34069 + Hn, pr + 1, Zn, xr.width, xr.height, 0, jn, On, xr.data) + } + } else { + Vn + ? nt.texSubImage2D(34069 + Hn, 0, 0, 0, jn, On, Xt[Hn]) + : nt.texImage2D(34069 + Hn, 0, Zn, jn, On, Xt[Hn]) + for (let pr = 0; pr < Jn.length; pr++) { + const fr = Jn[pr] + Vn + ? nt.texSubImage2D(34069 + Hn, pr + 1, 0, 0, jn, On, fr.image[Hn]) + : nt.texImage2D(34069 + Hn, pr + 1, Zn, jn, On, fr.image[Hn]) + } + } + } + Tt(fn, Rn) && At(34067), (Dn.__currentVersion = Dn.version), fn.onUpdate && fn.onUpdate(fn) + } + wn.__version = fn.version + } + function vn(wn, fn, pn, kn, Dn) { + const un = ot.convert(pn.format, pn.encoding), + Zt = ot.convert(pn.type), + Xt = Et(pn.internalFormat, un, Zt, pn.encoding) + rt.get(fn).__hasExternalTextures || + (Dn === 32879 || Dn === 35866 + ? nt.texImage3D(Dn, 0, Xt, fn.width, fn.height, fn.depth, 0, un, Zt, null) + : nt.texImage2D(Dn, 0, Xt, fn.width, fn.height, 0, un, Zt, null)), + nt.bindFramebuffer(36160, wn), + mn(fn) + ? dt.framebufferTexture2DMultisampleEXT(36160, kn, Dn, rt.get(pn).__webglTexture, 0, cn(fn)) + : tt.framebufferTexture2D(36160, kn, Dn, rt.get(pn).__webglTexture, 0), + nt.bindFramebuffer(36160, null) + } + function an(wn, fn, pn) { + if ((tt.bindRenderbuffer(36161, wn), fn.depthBuffer && !fn.stencilBuffer)) { + let kn = 33189 + if (pn || mn(fn)) { + const Dn = fn.depthTexture + Dn && + Dn.isDepthTexture && + (Dn.type === FloatType ? (kn = 36012) : Dn.type === UnsignedIntType && (kn = 33190)) + const un = cn(fn) + mn(fn) + ? dt.renderbufferStorageMultisampleEXT(36161, un, kn, fn.width, fn.height) + : tt.renderbufferStorageMultisample(36161, un, kn, fn.width, fn.height) + } else tt.renderbufferStorage(36161, kn, fn.width, fn.height) + tt.framebufferRenderbuffer(36160, 36096, 36161, wn) + } else if (fn.depthBuffer && fn.stencilBuffer) { + const kn = cn(fn) + pn && mn(fn) === !1 + ? tt.renderbufferStorageMultisample(36161, kn, 35056, fn.width, fn.height) + : mn(fn) + ? dt.renderbufferStorageMultisampleEXT(36161, kn, 35056, fn.width, fn.height) + : tt.renderbufferStorage(36161, 34041, fn.width, fn.height), + tt.framebufferRenderbuffer(36160, 33306, 36161, wn) + } else { + const kn = fn.isWebGLMultipleRenderTargets === !0 ? fn.texture : [fn.texture] + for (let Dn = 0; Dn < kn.length; Dn++) { + const un = kn[Dn], + Zt = ot.convert(un.format, un.encoding), + Xt = ot.convert(un.type), + Sn = Et(un.internalFormat, Zt, Xt, un.encoding), + Rn = cn(fn) + pn && mn(fn) === !1 + ? tt.renderbufferStorageMultisample(36161, Rn, Sn, fn.width, fn.height) + : mn(fn) + ? dt.renderbufferStorageMultisampleEXT(36161, Rn, Sn, fn.width, fn.height) + : tt.renderbufferStorage(36161, Sn, fn.width, fn.height) + } + } + tt.bindRenderbuffer(36161, null) + } + function Qt(wn, fn) { + if (fn && fn.isWebGLCubeRenderTarget) throw new Error('Depth Texture with cube render targets is not supported') + if ((nt.bindFramebuffer(36160, wn), !(fn.depthTexture && fn.depthTexture.isDepthTexture))) + throw new Error('renderTarget.depthTexture must be an instance of THREE.DepthTexture') + ;(!rt.get(fn.depthTexture).__webglTexture || + fn.depthTexture.image.width !== fn.width || + fn.depthTexture.image.height !== fn.height) && + ((fn.depthTexture.image.width = fn.width), + (fn.depthTexture.image.height = fn.height), + (fn.depthTexture.needsUpdate = !0)), + Nt(fn.depthTexture, 0) + const kn = rt.get(fn.depthTexture).__webglTexture, + Dn = cn(fn) + if (fn.depthTexture.format === DepthFormat) + mn(fn) + ? dt.framebufferTexture2DMultisampleEXT(36160, 36096, 3553, kn, 0, Dn) + : tt.framebufferTexture2D(36160, 36096, 3553, kn, 0) + else if (fn.depthTexture.format === DepthStencilFormat) + mn(fn) + ? dt.framebufferTexture2DMultisampleEXT(36160, 33306, 3553, kn, 0, Dn) + : tt.framebufferTexture2D(36160, 33306, 3553, kn, 0) + else throw new Error('Unknown depthTexture format') + } + function _n(wn) { + const fn = rt.get(wn), + pn = wn.isWebGLCubeRenderTarget === !0 + if (wn.depthTexture && !fn.__autoAllocateDepthBuffer) { + if (pn) throw new Error('target.depthTexture not supported in Cube render targets') + Qt(fn.__webglFramebuffer, wn) + } else if (pn) { + fn.__webglDepthbuffer = [] + for (let kn = 0; kn < 6; kn++) + nt.bindFramebuffer(36160, fn.__webglFramebuffer[kn]), + (fn.__webglDepthbuffer[kn] = tt.createRenderbuffer()), + an(fn.__webglDepthbuffer[kn], wn, !1) + } else + nt.bindFramebuffer(36160, fn.__webglFramebuffer), + (fn.__webglDepthbuffer = tt.createRenderbuffer()), + an(fn.__webglDepthbuffer, wn, !1) + nt.bindFramebuffer(36160, null) + } + function Pn(wn, fn, pn) { + const kn = rt.get(wn) + fn !== void 0 && vn(kn.__webglFramebuffer, wn, wn.texture, 36064, 3553), pn !== void 0 && _n(wn) + } + function $n(wn) { + const fn = wn.texture, + pn = rt.get(wn), + kn = rt.get(fn) + wn.addEventListener('dispose', Pt), + wn.isWebGLMultipleRenderTargets !== !0 && + (kn.__webglTexture === void 0 && (kn.__webglTexture = tt.createTexture()), + (kn.__version = fn.version), + at.memory.textures++) + const Dn = wn.isWebGLCubeRenderTarget === !0, + un = wn.isWebGLMultipleRenderTargets === !0, + Zt = kt(wn) || st + if (Dn) { + pn.__webglFramebuffer = [] + for (let Xt = 0; Xt < 6; Xt++) pn.__webglFramebuffer[Xt] = tt.createFramebuffer() + } else { + if (((pn.__webglFramebuffer = tt.createFramebuffer()), un)) + if (it.drawBuffers) { + const Xt = wn.texture + for (let Sn = 0, Rn = Xt.length; Sn < Rn; Sn++) { + const jn = rt.get(Xt[Sn]) + jn.__webglTexture === void 0 && ((jn.__webglTexture = tt.createTexture()), at.memory.textures++) + } + } else + console.warn( + 'THREE.WebGLRenderer: WebGLMultipleRenderTargets can only be used with WebGL2 or WEBGL_draw_buffers extension.', + ) + if (st && wn.samples > 0 && mn(wn) === !1) { + const Xt = un ? fn : [fn] + ;(pn.__webglMultisampledFramebuffer = tt.createFramebuffer()), + (pn.__webglColorRenderbuffer = []), + nt.bindFramebuffer(36160, pn.__webglMultisampledFramebuffer) + for (let Sn = 0; Sn < Xt.length; Sn++) { + const Rn = Xt[Sn] + ;(pn.__webglColorRenderbuffer[Sn] = tt.createRenderbuffer()), + tt.bindRenderbuffer(36161, pn.__webglColorRenderbuffer[Sn]) + const jn = ot.convert(Rn.format, Rn.encoding), + On = ot.convert(Rn.type), + Zn = Et(Rn.internalFormat, jn, On, Rn.encoding), + Vn = cn(wn) + tt.renderbufferStorageMultisample(36161, Vn, Zn, wn.width, wn.height), + tt.framebufferRenderbuffer(36160, 36064 + Sn, 36161, pn.__webglColorRenderbuffer[Sn]) + } + tt.bindRenderbuffer(36161, null), + wn.depthBuffer && + ((pn.__webglDepthRenderbuffer = tt.createRenderbuffer()), an(pn.__webglDepthRenderbuffer, wn, !0)), + nt.bindFramebuffer(36160, null) + } + } + if (Dn) { + nt.bindTexture(34067, kn.__webglTexture), Kt(34067, fn, Zt) + for (let Xt = 0; Xt < 6; Xt++) vn(pn.__webglFramebuffer[Xt], wn, fn, 36064, 34069 + Xt) + Tt(fn, Zt) && At(34067), nt.unbindTexture() + } else if (un) { + const Xt = wn.texture + for (let Sn = 0, Rn = Xt.length; Sn < Rn; Sn++) { + const jn = Xt[Sn], + On = rt.get(jn) + nt.bindTexture(3553, On.__webglTexture), + Kt(3553, jn, Zt), + vn(pn.__webglFramebuffer, wn, jn, 36064 + Sn, 3553), + Tt(jn, Zt) && At(3553) + } + nt.unbindTexture() + } else { + let Xt = 3553 + ;(wn.isWebGL3DRenderTarget || wn.isWebGLArrayRenderTarget) && + (st + ? (Xt = wn.isWebGL3DRenderTarget ? 32879 : 35866) + : console.error( + 'THREE.WebGLTextures: THREE.Data3DTexture and THREE.DataArrayTexture only supported with WebGL2.', + )), + nt.bindTexture(Xt, kn.__webglTexture), + Kt(Xt, fn, Zt), + vn(pn.__webglFramebuffer, wn, fn, 36064, Xt), + Tt(fn, Zt) && At(Xt), + nt.unbindTexture() + } + wn.depthBuffer && _n(wn) + } + function Nn(wn) { + const fn = kt(wn) || st, + pn = wn.isWebGLMultipleRenderTargets === !0 ? wn.texture : [wn.texture] + for (let kn = 0, Dn = pn.length; kn < Dn; kn++) { + const un = pn[kn] + if (Tt(un, fn)) { + const Zt = wn.isWebGLCubeRenderTarget ? 34067 : 3553, + Xt = rt.get(un).__webglTexture + nt.bindTexture(Zt, Xt), At(Zt), nt.unbindTexture() + } + } + } + function Tn(wn) { + if (st && wn.samples > 0 && mn(wn) === !1) { + const fn = wn.isWebGLMultipleRenderTargets ? wn.texture : [wn.texture], + pn = wn.width, + kn = wn.height + let Dn = 16384 + const un = [], + Zt = wn.stencilBuffer ? 33306 : 36096, + Xt = rt.get(wn), + Sn = wn.isWebGLMultipleRenderTargets === !0 + if (Sn) + for (let Rn = 0; Rn < fn.length; Rn++) + nt.bindFramebuffer(36160, Xt.__webglMultisampledFramebuffer), + tt.framebufferRenderbuffer(36160, 36064 + Rn, 36161, null), + nt.bindFramebuffer(36160, Xt.__webglFramebuffer), + tt.framebufferTexture2D(36009, 36064 + Rn, 3553, null, 0) + nt.bindFramebuffer(36008, Xt.__webglMultisampledFramebuffer), nt.bindFramebuffer(36009, Xt.__webglFramebuffer) + for (let Rn = 0; Rn < fn.length; Rn++) { + un.push(36064 + Rn), wn.depthBuffer && un.push(Zt) + const jn = Xt.__ignoreDepthValues !== void 0 ? Xt.__ignoreDepthValues : !1 + if ( + (jn === !1 && (wn.depthBuffer && (Dn |= 256), wn.stencilBuffer && (Dn |= 1024)), + Sn && tt.framebufferRenderbuffer(36008, 36064, 36161, Xt.__webglColorRenderbuffer[Rn]), + jn === !0 && (tt.invalidateFramebuffer(36008, [Zt]), tt.invalidateFramebuffer(36009, [Zt])), + Sn) + ) { + const On = rt.get(fn[Rn]).__webglTexture + tt.framebufferTexture2D(36009, 36064, 3553, On, 0) + } + tt.blitFramebuffer(0, 0, pn, kn, 0, 0, pn, kn, Dn, 9728), pt && tt.invalidateFramebuffer(36008, un) + } + if ((nt.bindFramebuffer(36008, null), nt.bindFramebuffer(36009, null), Sn)) + for (let Rn = 0; Rn < fn.length; Rn++) { + nt.bindFramebuffer(36160, Xt.__webglMultisampledFramebuffer), + tt.framebufferRenderbuffer(36160, 36064 + Rn, 36161, Xt.__webglColorRenderbuffer[Rn]) + const jn = rt.get(fn[Rn]).__webglTexture + nt.bindFramebuffer(36160, Xt.__webglFramebuffer), tt.framebufferTexture2D(36009, 36064 + Rn, 3553, jn, 0) + } + nt.bindFramebuffer(36009, Xt.__webglMultisampledFramebuffer) + } + } + function cn(wn) { + return Math.min(ht, wn.samples) + } + function mn(wn) { + const fn = rt.get(wn) + return ( + st && wn.samples > 0 && et.has('WEBGL_multisampled_render_to_texture') === !0 && fn.__useRenderToTexture !== !1 + ) + } + function In(wn) { + const fn = at.render.frame + mt.get(wn) !== fn && (mt.set(wn, fn), wn.update()) + } + function An(wn, fn) { + const pn = wn.encoding, + kn = wn.format, + Dn = wn.type + return ( + wn.isCompressedTexture === !0 || + wn.isVideoTexture === !0 || + wn.format === _SRGBAFormat || + (pn !== LinearEncoding && + (pn === sRGBEncoding + ? st === !1 + ? et.has('EXT_sRGB') === !0 && kn === RGBAFormat + ? ((wn.format = _SRGBAFormat), (wn.minFilter = LinearFilter), (wn.generateMipmaps = !1)) + : (fn = ImageUtils.sRGBToLinear(fn)) + : (kn !== RGBAFormat || Dn !== UnsignedByteType) && + console.warn( + 'THREE.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType.', + ) + : console.error('THREE.WebGLTextures: Unsupported texture encoding:', pn))), + fn + ) + } + ;(this.allocateTextureUnit = zt), + (this.resetTextureUnits = Wt), + (this.setTexture2D = Nt), + (this.setTexture2DArray = Ut), + (this.setTexture3D = Mt), + (this.setTextureCube = Ht), + (this.rebindTextures = Pn), + (this.setupRenderTarget = $n), + (this.updateRenderTargetMipmap = Nn), + (this.updateMultisampleRenderTarget = Tn), + (this.setupDepthRenderbuffer = _n), + (this.setupFrameBufferTexture = vn), + (this.useMultisampledRTT = mn) + } + function WebGLUtils(tt, et, nt) { + const rt = nt.isWebGL2 + function it(ot, at = null) { + let st + if (ot === UnsignedByteType) return 5121 + if (ot === UnsignedShort4444Type) return 32819 + if (ot === UnsignedShort5551Type) return 32820 + if (ot === ByteType) return 5120 + if (ot === ShortType) return 5122 + if (ot === UnsignedShortType) return 5123 + if (ot === IntType) return 5124 + if (ot === UnsignedIntType) return 5125 + if (ot === FloatType) return 5126 + if (ot === HalfFloatType) + return rt ? 5131 : ((st = et.get('OES_texture_half_float')), st !== null ? st.HALF_FLOAT_OES : null) + if (ot === AlphaFormat) return 6406 + if (ot === RGBAFormat) return 6408 + if (ot === LuminanceFormat) return 6409 + if (ot === LuminanceAlphaFormat) return 6410 + if (ot === DepthFormat) return 6402 + if (ot === DepthStencilFormat) return 34041 + if (ot === RedFormat) return 6403 + if (ot === RGBFormat) + return ( + console.warn( + 'THREE.WebGLRenderer: THREE.RGBFormat has been removed. Use THREE.RGBAFormat instead. https://github.com/mrdoob/three.js/pull/23228', + ), + 6408 + ) + if (ot === _SRGBAFormat) return (st = et.get('EXT_sRGB')), st !== null ? st.SRGB_ALPHA_EXT : null + if (ot === RedIntegerFormat) return 36244 + if (ot === RGFormat) return 33319 + if (ot === RGIntegerFormat) return 33320 + if (ot === RGBAIntegerFormat) return 36249 + if ( + ot === RGB_S3TC_DXT1_Format || + ot === RGBA_S3TC_DXT1_Format || + ot === RGBA_S3TC_DXT3_Format || + ot === RGBA_S3TC_DXT5_Format + ) + if (at === sRGBEncoding) + if (((st = et.get('WEBGL_compressed_texture_s3tc_srgb')), st !== null)) { + if (ot === RGB_S3TC_DXT1_Format) return st.COMPRESSED_SRGB_S3TC_DXT1_EXT + if (ot === RGBA_S3TC_DXT1_Format) return st.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT + if (ot === RGBA_S3TC_DXT3_Format) return st.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT + if (ot === RGBA_S3TC_DXT5_Format) return st.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT + } else return null + else if (((st = et.get('WEBGL_compressed_texture_s3tc')), st !== null)) { + if (ot === RGB_S3TC_DXT1_Format) return st.COMPRESSED_RGB_S3TC_DXT1_EXT + if (ot === RGBA_S3TC_DXT1_Format) return st.COMPRESSED_RGBA_S3TC_DXT1_EXT + if (ot === RGBA_S3TC_DXT3_Format) return st.COMPRESSED_RGBA_S3TC_DXT3_EXT + if (ot === RGBA_S3TC_DXT5_Format) return st.COMPRESSED_RGBA_S3TC_DXT5_EXT + } else return null + if ( + ot === RGB_PVRTC_4BPPV1_Format || + ot === RGB_PVRTC_2BPPV1_Format || + ot === RGBA_PVRTC_4BPPV1_Format || + ot === RGBA_PVRTC_2BPPV1_Format + ) + if (((st = et.get('WEBGL_compressed_texture_pvrtc')), st !== null)) { + if (ot === RGB_PVRTC_4BPPV1_Format) return st.COMPRESSED_RGB_PVRTC_4BPPV1_IMG + if (ot === RGB_PVRTC_2BPPV1_Format) return st.COMPRESSED_RGB_PVRTC_2BPPV1_IMG + if (ot === RGBA_PVRTC_4BPPV1_Format) return st.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG + if (ot === RGBA_PVRTC_2BPPV1_Format) return st.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG + } else return null + if (ot === RGB_ETC1_Format) + return (st = et.get('WEBGL_compressed_texture_etc1')), st !== null ? st.COMPRESSED_RGB_ETC1_WEBGL : null + if (ot === RGB_ETC2_Format || ot === RGBA_ETC2_EAC_Format) + if (((st = et.get('WEBGL_compressed_texture_etc')), st !== null)) { + if (ot === RGB_ETC2_Format) return at === sRGBEncoding ? st.COMPRESSED_SRGB8_ETC2 : st.COMPRESSED_RGB8_ETC2 + if (ot === RGBA_ETC2_EAC_Format) + return at === sRGBEncoding ? st.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC : st.COMPRESSED_RGBA8_ETC2_EAC + } else return null + if ( + ot === RGBA_ASTC_4x4_Format || + ot === RGBA_ASTC_5x4_Format || + ot === RGBA_ASTC_5x5_Format || + ot === RGBA_ASTC_6x5_Format || + ot === RGBA_ASTC_6x6_Format || + ot === RGBA_ASTC_8x5_Format || + ot === RGBA_ASTC_8x6_Format || + ot === RGBA_ASTC_8x8_Format || + ot === RGBA_ASTC_10x5_Format || + ot === RGBA_ASTC_10x6_Format || + ot === RGBA_ASTC_10x8_Format || + ot === RGBA_ASTC_10x10_Format || + ot === RGBA_ASTC_12x10_Format || + ot === RGBA_ASTC_12x12_Format + ) + if (((st = et.get('WEBGL_compressed_texture_astc')), st !== null)) { + if (ot === RGBA_ASTC_4x4_Format) + return at === sRGBEncoding ? st.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR : st.COMPRESSED_RGBA_ASTC_4x4_KHR + if (ot === RGBA_ASTC_5x4_Format) + return at === sRGBEncoding ? st.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR : st.COMPRESSED_RGBA_ASTC_5x4_KHR + if (ot === RGBA_ASTC_5x5_Format) + return at === sRGBEncoding ? st.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR : st.COMPRESSED_RGBA_ASTC_5x5_KHR + if (ot === RGBA_ASTC_6x5_Format) + return at === sRGBEncoding ? st.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR : st.COMPRESSED_RGBA_ASTC_6x5_KHR + if (ot === RGBA_ASTC_6x6_Format) + return at === sRGBEncoding ? st.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR : st.COMPRESSED_RGBA_ASTC_6x6_KHR + if (ot === RGBA_ASTC_8x5_Format) + return at === sRGBEncoding ? st.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR : st.COMPRESSED_RGBA_ASTC_8x5_KHR + if (ot === RGBA_ASTC_8x6_Format) + return at === sRGBEncoding ? st.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR : st.COMPRESSED_RGBA_ASTC_8x6_KHR + if (ot === RGBA_ASTC_8x8_Format) + return at === sRGBEncoding ? st.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR : st.COMPRESSED_RGBA_ASTC_8x8_KHR + if (ot === RGBA_ASTC_10x5_Format) + return at === sRGBEncoding ? st.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR : st.COMPRESSED_RGBA_ASTC_10x5_KHR + if (ot === RGBA_ASTC_10x6_Format) + return at === sRGBEncoding ? st.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR : st.COMPRESSED_RGBA_ASTC_10x6_KHR + if (ot === RGBA_ASTC_10x8_Format) + return at === sRGBEncoding ? st.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR : st.COMPRESSED_RGBA_ASTC_10x8_KHR + if (ot === RGBA_ASTC_10x10_Format) + return at === sRGBEncoding ? st.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR : st.COMPRESSED_RGBA_ASTC_10x10_KHR + if (ot === RGBA_ASTC_12x10_Format) + return at === sRGBEncoding ? st.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR : st.COMPRESSED_RGBA_ASTC_12x10_KHR + if (ot === RGBA_ASTC_12x12_Format) + return at === sRGBEncoding ? st.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR : st.COMPRESSED_RGBA_ASTC_12x12_KHR + } else return null + if (ot === RGBA_BPTC_Format) + if (((st = et.get('EXT_texture_compression_bptc')), st !== null)) { + if (ot === RGBA_BPTC_Format) + return at === sRGBEncoding ? st.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT : st.COMPRESSED_RGBA_BPTC_UNORM_EXT + } else return null + return ot === UnsignedInt248Type + ? rt + ? 34042 + : ((st = et.get('WEBGL_depth_texture')), st !== null ? st.UNSIGNED_INT_24_8_WEBGL : null) + : tt[ot] !== void 0 + ? tt[ot] + : null + } + return { convert: it } + } + class ArrayCamera extends PerspectiveCamera { + constructor(et = []) { + super(), (this.isArrayCamera = !0), (this.cameras = et) + } + } + class Group extends Object3D { + constructor() { + super(), (this.isGroup = !0), (this.type = 'Group') + } + } + const _moveEvent = { type: 'move' } + class WebXRController { + constructor() { + ;(this._targetRay = null), (this._grip = null), (this._hand = null) + } + getHandSpace() { + return ( + this._hand === null && + ((this._hand = new Group()), + (this._hand.matrixAutoUpdate = !1), + (this._hand.visible = !1), + (this._hand.joints = {}), + (this._hand.inputState = { pinching: !1 })), + this._hand + ) + } + getTargetRaySpace() { + return ( + this._targetRay === null && + ((this._targetRay = new Group()), + (this._targetRay.matrixAutoUpdate = !1), + (this._targetRay.visible = !1), + (this._targetRay.hasLinearVelocity = !1), + (this._targetRay.linearVelocity = new Vector3()), + (this._targetRay.hasAngularVelocity = !1), + (this._targetRay.angularVelocity = new Vector3())), + this._targetRay + ) + } + getGripSpace() { + return ( + this._grip === null && + ((this._grip = new Group()), + (this._grip.matrixAutoUpdate = !1), + (this._grip.visible = !1), + (this._grip.hasLinearVelocity = !1), + (this._grip.linearVelocity = new Vector3()), + (this._grip.hasAngularVelocity = !1), + (this._grip.angularVelocity = new Vector3())), + this._grip + ) + } + dispatchEvent(et) { + return ( + this._targetRay !== null && this._targetRay.dispatchEvent(et), + this._grip !== null && this._grip.dispatchEvent(et), + this._hand !== null && this._hand.dispatchEvent(et), + this + ) + } + disconnect(et) { + return ( + this.dispatchEvent({ type: 'disconnected', data: et }), + this._targetRay !== null && (this._targetRay.visible = !1), + this._grip !== null && (this._grip.visible = !1), + this._hand !== null && (this._hand.visible = !1), + this + ) + } + update(et, nt, rt) { + let it = null, + ot = null, + at = null + const st = this._targetRay, + lt = this._grip, + ct = this._hand + if (et && nt.session.visibilityState !== 'visible-blurred') { + if (ct && et.hand) { + at = !0 + for (const gt of et.hand.values()) { + const yt = nt.getJointPose(gt, rt) + if (ct.joints[gt.jointName] === void 0) { + const vt = new Group() + ;(vt.matrixAutoUpdate = !1), (vt.visible = !1), (ct.joints[gt.jointName] = vt), ct.add(vt) + } + const bt = ct.joints[gt.jointName] + yt !== null && + (bt.matrix.fromArray(yt.transform.matrix), + bt.matrix.decompose(bt.position, bt.rotation, bt.scale), + (bt.jointRadius = yt.radius)), + (bt.visible = yt !== null) + } + const ut = ct.joints['index-finger-tip'], + ht = ct.joints['thumb-tip'], + dt = ut.position.distanceTo(ht.position), + pt = 0.02, + mt = 0.005 + ct.inputState.pinching && dt > pt + mt + ? ((ct.inputState.pinching = !1), + this.dispatchEvent({ type: 'pinchend', handedness: et.handedness, target: this })) + : !ct.inputState.pinching && + dt <= pt - mt && + ((ct.inputState.pinching = !0), + this.dispatchEvent({ type: 'pinchstart', handedness: et.handedness, target: this })) + } else + lt !== null && + et.gripSpace && + ((ot = nt.getPose(et.gripSpace, rt)), + ot !== null && + (lt.matrix.fromArray(ot.transform.matrix), + lt.matrix.decompose(lt.position, lt.rotation, lt.scale), + ot.linearVelocity + ? ((lt.hasLinearVelocity = !0), lt.linearVelocity.copy(ot.linearVelocity)) + : (lt.hasLinearVelocity = !1), + ot.angularVelocity + ? ((lt.hasAngularVelocity = !0), lt.angularVelocity.copy(ot.angularVelocity)) + : (lt.hasAngularVelocity = !1))) + st !== null && + ((it = nt.getPose(et.targetRaySpace, rt)), + it === null && ot !== null && (it = ot), + it !== null && + (st.matrix.fromArray(it.transform.matrix), + st.matrix.decompose(st.position, st.rotation, st.scale), + it.linearVelocity + ? ((st.hasLinearVelocity = !0), st.linearVelocity.copy(it.linearVelocity)) + : (st.hasLinearVelocity = !1), + it.angularVelocity + ? ((st.hasAngularVelocity = !0), st.angularVelocity.copy(it.angularVelocity)) + : (st.hasAngularVelocity = !1), + this.dispatchEvent(_moveEvent))) + } + return ( + st !== null && (st.visible = it !== null), + lt !== null && (lt.visible = ot !== null), + ct !== null && (ct.visible = at !== null), + this + ) + } + } + class DepthTexture extends Texture { + constructor(et, nt, rt, it, ot, at, st, lt, ct, ut) { + if (((ut = ut !== void 0 ? ut : DepthFormat), ut !== DepthFormat && ut !== DepthStencilFormat)) + throw new Error('DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat') + rt === void 0 && ut === DepthFormat && (rt = UnsignedIntType), + rt === void 0 && ut === DepthStencilFormat && (rt = UnsignedInt248Type), + super(null, it, ot, at, st, lt, ut, rt, ct), + (this.isDepthTexture = !0), + (this.image = { width: et, height: nt }), + (this.magFilter = st !== void 0 ? st : NearestFilter), + (this.minFilter = lt !== void 0 ? lt : NearestFilter), + (this.flipY = !1), + (this.generateMipmaps = !1) + } + } + class WebXRManager extends EventDispatcher$1 { + constructor(et, nt) { + super() + const rt = this + let it = null, + ot = 1, + at = null, + st = 'local-floor', + lt = null, + ct = null, + ut = null, + ht = null, + dt = null, + pt = null + const mt = nt.getContextAttributes() + let gt = null, + yt = null + const bt = [], + vt = [], + xt = new PerspectiveCamera() + xt.layers.enable(1), (xt.viewport = new Vector4()) + const kt = new PerspectiveCamera() + kt.layers.enable(2), (kt.viewport = new Vector4()) + const St = [xt, kt], + Tt = new ArrayCamera() + Tt.layers.enable(1), Tt.layers.enable(2) + let At = null, + Et = null + ;(this.cameraAutoUpdate = !0), + (this.enabled = !1), + (this.isPresenting = !1), + (this.getController = function (Ft) { + let Nt = bt[Ft] + return Nt === void 0 && ((Nt = new WebXRController()), (bt[Ft] = Nt)), Nt.getTargetRaySpace() + }), + (this.getControllerGrip = function (Ft) { + let Nt = bt[Ft] + return Nt === void 0 && ((Nt = new WebXRController()), (bt[Ft] = Nt)), Nt.getGripSpace() + }), + (this.getHand = function (Ft) { + let Nt = bt[Ft] + return Nt === void 0 && ((Nt = new WebXRController()), (bt[Ft] = Nt)), Nt.getHandSpace() + }) + function $t(Ft) { + const Nt = vt.indexOf(Ft.inputSource) + if (Nt === -1) return + const Ut = bt[Nt] + Ut !== void 0 && Ut.dispatchEvent({ type: Ft.type, data: Ft.inputSource }) + } + function Dt() { + it.removeEventListener('select', $t), + it.removeEventListener('selectstart', $t), + it.removeEventListener('selectend', $t), + it.removeEventListener('squeeze', $t), + it.removeEventListener('squeezestart', $t), + it.removeEventListener('squeezeend', $t), + it.removeEventListener('end', Dt), + it.removeEventListener('inputsourceschange', jt) + for (let Ft = 0; Ft < bt.length; Ft++) { + const Nt = vt[Ft] + Nt !== null && ((vt[Ft] = null), bt[Ft].disconnect(Nt)) + } + ;(At = null), + (Et = null), + et.setRenderTarget(gt), + (dt = null), + (ht = null), + (ut = null), + (it = null), + (yt = null), + zt.stop(), + (rt.isPresenting = !1), + rt.dispatchEvent({ type: 'sessionend' }) + } + ;(this.setFramebufferScaleFactor = function (Ft) { + ;(ot = Ft), + rt.isPresenting === !0 && + console.warn('THREE.WebXRManager: Cannot change framebuffer scale while presenting.') + }), + (this.setReferenceSpaceType = function (Ft) { + ;(st = Ft), + rt.isPresenting === !0 && + console.warn('THREE.WebXRManager: Cannot change reference space type while presenting.') + }), + (this.getReferenceSpace = function () { + return lt || at + }), + (this.setReferenceSpace = function (Ft) { + lt = Ft + }), + (this.getBaseLayer = function () { + return ht !== null ? ht : dt + }), + (this.getBinding = function () { + return ut + }), + (this.getFrame = function () { + return pt + }), + (this.getSession = function () { + return it + }), + (this.setSession = async function (Ft) { + if (((it = Ft), it !== null)) { + if ( + ((gt = et.getRenderTarget()), + it.addEventListener('select', $t), + it.addEventListener('selectstart', $t), + it.addEventListener('selectend', $t), + it.addEventListener('squeeze', $t), + it.addEventListener('squeezestart', $t), + it.addEventListener('squeezeend', $t), + it.addEventListener('end', Dt), + it.addEventListener('inputsourceschange', jt), + mt.xrCompatible !== !0 && (await nt.makeXRCompatible()), + it.renderState.layers === void 0 || et.capabilities.isWebGL2 === !1) + ) { + const Nt = { + antialias: it.renderState.layers === void 0 ? mt.antialias : !0, + alpha: mt.alpha, + depth: mt.depth, + stencil: mt.stencil, + framebufferScaleFactor: ot, + } + ;(dt = new XRWebGLLayer(it, nt, Nt)), + it.updateRenderState({ baseLayer: dt }), + (yt = new WebGLRenderTarget(dt.framebufferWidth, dt.framebufferHeight, { + format: RGBAFormat, + type: UnsignedByteType, + encoding: et.outputEncoding, + })) + } else { + let Nt = null, + Ut = null, + Mt = null + mt.depth && + ((Mt = mt.stencil ? 35056 : 33190), + (Nt = mt.stencil ? DepthStencilFormat : DepthFormat), + (Ut = mt.stencil ? UnsignedInt248Type : UnsignedIntType)) + const Ht = { colorFormat: 32856, depthFormat: Mt, scaleFactor: ot } + ;(ut = new XRWebGLBinding(it, nt)), + (ht = ut.createProjectionLayer(Ht)), + it.updateRenderState({ layers: [ht] }), + (yt = new WebGLRenderTarget(ht.textureWidth, ht.textureHeight, { + format: RGBAFormat, + type: UnsignedByteType, + depthTexture: new DepthTexture( + ht.textureWidth, + ht.textureHeight, + Ut, + void 0, + void 0, + void 0, + void 0, + void 0, + void 0, + Nt, + ), + stencilBuffer: mt.stencil, + encoding: et.outputEncoding, + samples: mt.antialias ? 4 : 0, + })) + const en = et.properties.get(yt) + en.__ignoreDepthValues = ht.ignoreDepthValues + } + ;(yt.isXRRenderTarget = !0), + this.setFoveation(1), + (lt = null), + (at = await it.requestReferenceSpace(st)), + zt.setContext(it), + zt.start(), + (rt.isPresenting = !0), + rt.dispatchEvent({ type: 'sessionstart' }) + } + }) + function jt(Ft) { + for (let Nt = 0; Nt < Ft.removed.length; Nt++) { + const Ut = Ft.removed[Nt], + Mt = vt.indexOf(Ut) + Mt >= 0 && ((vt[Mt] = null), bt[Mt].dispatchEvent({ type: 'disconnected', data: Ut })) + } + for (let Nt = 0; Nt < Ft.added.length; Nt++) { + const Ut = Ft.added[Nt] + let Mt = vt.indexOf(Ut) + if (Mt === -1) { + for (let en = 0; en < bt.length; en++) + if (en >= vt.length) { + vt.push(Ut), (Mt = en) + break + } else if (vt[en] === null) { + ;(vt[en] = Ut), (Mt = en) + break + } + if (Mt === -1) break + } + const Ht = bt[Mt] + Ht && Ht.dispatchEvent({ type: 'connected', data: Ut }) + } + } + const Pt = new Vector3(), + Ct = new Vector3() + function wt(Ft, Nt, Ut) { + Pt.setFromMatrixPosition(Nt.matrixWorld), Ct.setFromMatrixPosition(Ut.matrixWorld) + const Mt = Pt.distanceTo(Ct), + Ht = Nt.projectionMatrix.elements, + en = Ut.projectionMatrix.elements, + sn = Ht[14] / (Ht[10] - 1), + Kt = Ht[14] / (Ht[10] + 1), + rn = (Ht[9] + 1) / Ht[5], + nn = (Ht[9] - 1) / Ht[5], + hn = (Ht[8] - 1) / Ht[0], + vn = (en[8] + 1) / en[0], + an = sn * hn, + Qt = sn * vn, + _n = Mt / (-hn + vn), + Pn = _n * -hn + Nt.matrixWorld.decompose(Ft.position, Ft.quaternion, Ft.scale), + Ft.translateX(Pn), + Ft.translateZ(_n), + Ft.matrixWorld.compose(Ft.position, Ft.quaternion, Ft.scale), + Ft.matrixWorldInverse.copy(Ft.matrixWorld).invert() + const $n = sn + _n, + Nn = Kt + _n, + Tn = an - Pn, + cn = Qt + (Mt - Pn), + mn = ((rn * Kt) / Nn) * $n, + In = ((nn * Kt) / Nn) * $n + Ft.projectionMatrix.makePerspective(Tn, cn, mn, In, $n, Nn) + } + function It(Ft, Nt) { + Nt === null ? Ft.matrixWorld.copy(Ft.matrix) : Ft.matrixWorld.multiplyMatrices(Nt.matrixWorld, Ft.matrix), + Ft.matrixWorldInverse.copy(Ft.matrixWorld).invert() + } + ;(this.updateCamera = function (Ft) { + if (it === null) return + ;(Tt.near = kt.near = xt.near = Ft.near), + (Tt.far = kt.far = xt.far = Ft.far), + (At !== Tt.near || Et !== Tt.far) && + (it.updateRenderState({ depthNear: Tt.near, depthFar: Tt.far }), (At = Tt.near), (Et = Tt.far)) + const Nt = Ft.parent, + Ut = Tt.cameras + It(Tt, Nt) + for (let Ht = 0; Ht < Ut.length; Ht++) It(Ut[Ht], Nt) + Tt.matrixWorld.decompose(Tt.position, Tt.quaternion, Tt.scale), + Ft.position.copy(Tt.position), + Ft.quaternion.copy(Tt.quaternion), + Ft.scale.copy(Tt.scale), + Ft.matrix.copy(Tt.matrix), + Ft.matrixWorld.copy(Tt.matrixWorld) + const Mt = Ft.children + for (let Ht = 0, en = Mt.length; Ht < en; Ht++) Mt[Ht].updateMatrixWorld(!0) + Ut.length === 2 ? wt(Tt, xt, kt) : Tt.projectionMatrix.copy(xt.projectionMatrix) + }), + (this.getCamera = function () { + return Tt + }), + (this.getFoveation = function () { + if (ht !== null) return ht.fixedFoveation + if (dt !== null) return dt.fixedFoveation + }), + (this.setFoveation = function (Ft) { + ht !== null && (ht.fixedFoveation = Ft), + dt !== null && dt.fixedFoveation !== void 0 && (dt.fixedFoveation = Ft) + }) + let Ot = null + function Wt(Ft, Nt) { + if (((ct = Nt.getViewerPose(lt || at)), (pt = Nt), ct !== null)) { + const Ut = ct.views + dt !== null && (et.setRenderTargetFramebuffer(yt, dt.framebuffer), et.setRenderTarget(yt)) + let Mt = !1 + Ut.length !== Tt.cameras.length && ((Tt.cameras.length = 0), (Mt = !0)) + for (let Ht = 0; Ht < Ut.length; Ht++) { + const en = Ut[Ht] + let sn = null + if (dt !== null) sn = dt.getViewport(en) + else { + const rn = ut.getViewSubImage(ht, en) + ;(sn = rn.viewport), + Ht === 0 && + (et.setRenderTargetTextures( + yt, + rn.colorTexture, + ht.ignoreDepthValues ? void 0 : rn.depthStencilTexture, + ), + et.setRenderTarget(yt)) + } + let Kt = St[Ht] + Kt === void 0 && + ((Kt = new PerspectiveCamera()), Kt.layers.enable(Ht), (Kt.viewport = new Vector4()), (St[Ht] = Kt)), + Kt.matrix.fromArray(en.transform.matrix), + Kt.projectionMatrix.fromArray(en.projectionMatrix), + Kt.viewport.set(sn.x, sn.y, sn.width, sn.height), + Ht === 0 && Tt.matrix.copy(Kt.matrix), + Mt === !0 && Tt.cameras.push(Kt) + } + } + for (let Ut = 0; Ut < bt.length; Ut++) { + const Mt = vt[Ut], + Ht = bt[Ut] + Mt !== null && Ht !== void 0 && Ht.update(Mt, Nt, lt || at) + } + Ot && Ot(Ft, Nt), (pt = null) + } + const zt = new WebGLAnimation() + zt.setAnimationLoop(Wt), + (this.setAnimationLoop = function (Ft) { + Ot = Ft + }), + (this.dispose = function () {}) + } + } + function WebGLMaterials(tt, et) { + function nt(gt, yt) { + gt.fogColor.value.copy(yt.color), + yt.isFog + ? ((gt.fogNear.value = yt.near), (gt.fogFar.value = yt.far)) + : yt.isFogExp2 && (gt.fogDensity.value = yt.density) + } + function rt(gt, yt, bt, vt, xt) { + yt.isMeshBasicMaterial || yt.isMeshLambertMaterial + ? it(gt, yt) + : yt.isMeshToonMaterial + ? (it(gt, yt), ut(gt, yt)) + : yt.isMeshPhongMaterial + ? (it(gt, yt), ct(gt, yt)) + : yt.isMeshStandardMaterial + ? (it(gt, yt), ht(gt, yt), yt.isMeshPhysicalMaterial && dt(gt, yt, xt)) + : yt.isMeshMatcapMaterial + ? (it(gt, yt), pt(gt, yt)) + : yt.isMeshDepthMaterial + ? it(gt, yt) + : yt.isMeshDistanceMaterial + ? (it(gt, yt), mt(gt, yt)) + : yt.isMeshNormalMaterial + ? it(gt, yt) + : yt.isLineBasicMaterial + ? (ot(gt, yt), yt.isLineDashedMaterial && at(gt, yt)) + : yt.isPointsMaterial + ? st(gt, yt, bt, vt) + : yt.isSpriteMaterial + ? lt(gt, yt) + : yt.isShadowMaterial + ? (gt.color.value.copy(yt.color), (gt.opacity.value = yt.opacity)) + : yt.isShaderMaterial && (yt.uniformsNeedUpdate = !1) + } + function it(gt, yt) { + ;(gt.opacity.value = yt.opacity), + yt.color && gt.diffuse.value.copy(yt.color), + yt.emissive && gt.emissive.value.copy(yt.emissive).multiplyScalar(yt.emissiveIntensity), + yt.map && (gt.map.value = yt.map), + yt.alphaMap && (gt.alphaMap.value = yt.alphaMap), + yt.bumpMap && + ((gt.bumpMap.value = yt.bumpMap), + (gt.bumpScale.value = yt.bumpScale), + yt.side === BackSide && (gt.bumpScale.value *= -1)), + yt.displacementMap && + ((gt.displacementMap.value = yt.displacementMap), + (gt.displacementScale.value = yt.displacementScale), + (gt.displacementBias.value = yt.displacementBias)), + yt.emissiveMap && (gt.emissiveMap.value = yt.emissiveMap), + yt.normalMap && + ((gt.normalMap.value = yt.normalMap), + gt.normalScale.value.copy(yt.normalScale), + yt.side === BackSide && gt.normalScale.value.negate()), + yt.specularMap && (gt.specularMap.value = yt.specularMap), + yt.alphaTest > 0 && (gt.alphaTest.value = yt.alphaTest) + const bt = et.get(yt).envMap + if ( + (bt && + ((gt.envMap.value = bt), + (gt.flipEnvMap.value = bt.isCubeTexture && bt.isRenderTargetTexture === !1 ? -1 : 1), + (gt.reflectivity.value = yt.reflectivity), + (gt.ior.value = yt.ior), + (gt.refractionRatio.value = yt.refractionRatio)), + yt.lightMap) + ) { + gt.lightMap.value = yt.lightMap + const kt = tt.physicallyCorrectLights !== !0 ? Math.PI : 1 + gt.lightMapIntensity.value = yt.lightMapIntensity * kt + } + yt.aoMap && ((gt.aoMap.value = yt.aoMap), (gt.aoMapIntensity.value = yt.aoMapIntensity)) + let vt + yt.map + ? (vt = yt.map) + : yt.specularMap + ? (vt = yt.specularMap) + : yt.displacementMap + ? (vt = yt.displacementMap) + : yt.normalMap + ? (vt = yt.normalMap) + : yt.bumpMap + ? (vt = yt.bumpMap) + : yt.roughnessMap + ? (vt = yt.roughnessMap) + : yt.metalnessMap + ? (vt = yt.metalnessMap) + : yt.alphaMap + ? (vt = yt.alphaMap) + : yt.emissiveMap + ? (vt = yt.emissiveMap) + : yt.clearcoatMap + ? (vt = yt.clearcoatMap) + : yt.clearcoatNormalMap + ? (vt = yt.clearcoatNormalMap) + : yt.clearcoatRoughnessMap + ? (vt = yt.clearcoatRoughnessMap) + : yt.iridescenceMap + ? (vt = yt.iridescenceMap) + : yt.iridescenceThicknessMap + ? (vt = yt.iridescenceThicknessMap) + : yt.specularIntensityMap + ? (vt = yt.specularIntensityMap) + : yt.specularColorMap + ? (vt = yt.specularColorMap) + : yt.transmissionMap + ? (vt = yt.transmissionMap) + : yt.thicknessMap + ? (vt = yt.thicknessMap) + : yt.sheenColorMap + ? (vt = yt.sheenColorMap) + : yt.sheenRoughnessMap && (vt = yt.sheenRoughnessMap), + vt !== void 0 && + (vt.isWebGLRenderTarget && (vt = vt.texture), + vt.matrixAutoUpdate === !0 && vt.updateMatrix(), + gt.uvTransform.value.copy(vt.matrix)) + let xt + yt.aoMap ? (xt = yt.aoMap) : yt.lightMap && (xt = yt.lightMap), + xt !== void 0 && + (xt.isWebGLRenderTarget && (xt = xt.texture), + xt.matrixAutoUpdate === !0 && xt.updateMatrix(), + gt.uv2Transform.value.copy(xt.matrix)) + } + function ot(gt, yt) { + gt.diffuse.value.copy(yt.color), (gt.opacity.value = yt.opacity) + } + function at(gt, yt) { + ;(gt.dashSize.value = yt.dashSize), (gt.totalSize.value = yt.dashSize + yt.gapSize), (gt.scale.value = yt.scale) + } + function st(gt, yt, bt, vt) { + gt.diffuse.value.copy(yt.color), + (gt.opacity.value = yt.opacity), + (gt.size.value = yt.size * bt), + (gt.scale.value = vt * 0.5), + yt.map && (gt.map.value = yt.map), + yt.alphaMap && (gt.alphaMap.value = yt.alphaMap), + yt.alphaTest > 0 && (gt.alphaTest.value = yt.alphaTest) + let xt + yt.map ? (xt = yt.map) : yt.alphaMap && (xt = yt.alphaMap), + xt !== void 0 && (xt.matrixAutoUpdate === !0 && xt.updateMatrix(), gt.uvTransform.value.copy(xt.matrix)) + } + function lt(gt, yt) { + gt.diffuse.value.copy(yt.color), + (gt.opacity.value = yt.opacity), + (gt.rotation.value = yt.rotation), + yt.map && (gt.map.value = yt.map), + yt.alphaMap && (gt.alphaMap.value = yt.alphaMap), + yt.alphaTest > 0 && (gt.alphaTest.value = yt.alphaTest) + let bt + yt.map ? (bt = yt.map) : yt.alphaMap && (bt = yt.alphaMap), + bt !== void 0 && (bt.matrixAutoUpdate === !0 && bt.updateMatrix(), gt.uvTransform.value.copy(bt.matrix)) + } + function ct(gt, yt) { + gt.specular.value.copy(yt.specular), (gt.shininess.value = Math.max(yt.shininess, 1e-4)) + } + function ut(gt, yt) { + yt.gradientMap && (gt.gradientMap.value = yt.gradientMap) + } + function ht(gt, yt) { + ;(gt.roughness.value = yt.roughness), + (gt.metalness.value = yt.metalness), + yt.roughnessMap && (gt.roughnessMap.value = yt.roughnessMap), + yt.metalnessMap && (gt.metalnessMap.value = yt.metalnessMap), + et.get(yt).envMap && (gt.envMapIntensity.value = yt.envMapIntensity) + } + function dt(gt, yt, bt) { + ;(gt.ior.value = yt.ior), + yt.sheen > 0 && + (gt.sheenColor.value.copy(yt.sheenColor).multiplyScalar(yt.sheen), + (gt.sheenRoughness.value = yt.sheenRoughness), + yt.sheenColorMap && (gt.sheenColorMap.value = yt.sheenColorMap), + yt.sheenRoughnessMap && (gt.sheenRoughnessMap.value = yt.sheenRoughnessMap)), + yt.clearcoat > 0 && + ((gt.clearcoat.value = yt.clearcoat), + (gt.clearcoatRoughness.value = yt.clearcoatRoughness), + yt.clearcoatMap && (gt.clearcoatMap.value = yt.clearcoatMap), + yt.clearcoatRoughnessMap && (gt.clearcoatRoughnessMap.value = yt.clearcoatRoughnessMap), + yt.clearcoatNormalMap && + (gt.clearcoatNormalScale.value.copy(yt.clearcoatNormalScale), + (gt.clearcoatNormalMap.value = yt.clearcoatNormalMap), + yt.side === BackSide && gt.clearcoatNormalScale.value.negate())), + yt.iridescence > 0 && + ((gt.iridescence.value = yt.iridescence), + (gt.iridescenceIOR.value = yt.iridescenceIOR), + (gt.iridescenceThicknessMinimum.value = yt.iridescenceThicknessRange[0]), + (gt.iridescenceThicknessMaximum.value = yt.iridescenceThicknessRange[1]), + yt.iridescenceMap && (gt.iridescenceMap.value = yt.iridescenceMap), + yt.iridescenceThicknessMap && (gt.iridescenceThicknessMap.value = yt.iridescenceThicknessMap)), + yt.transmission > 0 && + ((gt.transmission.value = yt.transmission), + (gt.transmissionSamplerMap.value = bt.texture), + gt.transmissionSamplerSize.value.set(bt.width, bt.height), + yt.transmissionMap && (gt.transmissionMap.value = yt.transmissionMap), + (gt.thickness.value = yt.thickness), + yt.thicknessMap && (gt.thicknessMap.value = yt.thicknessMap), + (gt.attenuationDistance.value = yt.attenuationDistance), + gt.attenuationColor.value.copy(yt.attenuationColor)), + (gt.specularIntensity.value = yt.specularIntensity), + gt.specularColor.value.copy(yt.specularColor), + yt.specularIntensityMap && (gt.specularIntensityMap.value = yt.specularIntensityMap), + yt.specularColorMap && (gt.specularColorMap.value = yt.specularColorMap) + } + function pt(gt, yt) { + yt.matcap && (gt.matcap.value = yt.matcap) + } + function mt(gt, yt) { + gt.referencePosition.value.copy(yt.referencePosition), + (gt.nearDistance.value = yt.nearDistance), + (gt.farDistance.value = yt.farDistance) + } + return { refreshFogUniforms: nt, refreshMaterialUniforms: rt } + } + function WebGLUniformsGroups(tt, et, nt, rt) { + let it = {}, + ot = {}, + at = [] + const st = nt.isWebGL2 ? tt.getParameter(35375) : 0 + function lt(vt, xt) { + const kt = xt.program + rt.uniformBlockBinding(vt, kt) + } + function ct(vt, xt) { + let kt = it[vt.id] + kt === void 0 && (mt(vt), (kt = ut(vt)), (it[vt.id] = kt), vt.addEventListener('dispose', yt)) + const St = xt.program + rt.updateUBOMapping(vt, St) + const Tt = et.render.frame + ot[vt.id] !== Tt && (dt(vt), (ot[vt.id] = Tt)) + } + function ut(vt) { + const xt = ht() + vt.__bindingPointIndex = xt + const kt = tt.createBuffer(), + St = vt.__size, + Tt = vt.usage + return ( + tt.bindBuffer(35345, kt), + tt.bufferData(35345, St, Tt), + tt.bindBuffer(35345, null), + tt.bindBufferBase(35345, xt, kt), + kt + ) + } + function ht() { + for (let vt = 0; vt < st; vt++) if (at.indexOf(vt) === -1) return at.push(vt), vt + return console.error('THREE.WebGLRenderer: Maximum number of simultaneously usable uniforms groups reached.'), 0 + } + function dt(vt) { + const xt = it[vt.id], + kt = vt.uniforms, + St = vt.__cache + tt.bindBuffer(35345, xt) + for (let Tt = 0, At = kt.length; Tt < At; Tt++) { + const Et = kt[Tt] + if (pt(Et, Tt, St) === !0) { + const $t = Et.value, + Dt = Et.__offset + typeof $t == 'number' + ? ((Et.__data[0] = $t), tt.bufferSubData(35345, Dt, Et.__data)) + : (Et.value.isMatrix3 + ? ((Et.__data[0] = Et.value.elements[0]), + (Et.__data[1] = Et.value.elements[1]), + (Et.__data[2] = Et.value.elements[2]), + (Et.__data[3] = Et.value.elements[0]), + (Et.__data[4] = Et.value.elements[3]), + (Et.__data[5] = Et.value.elements[4]), + (Et.__data[6] = Et.value.elements[5]), + (Et.__data[7] = Et.value.elements[0]), + (Et.__data[8] = Et.value.elements[6]), + (Et.__data[9] = Et.value.elements[7]), + (Et.__data[10] = Et.value.elements[8]), + (Et.__data[11] = Et.value.elements[0])) + : $t.toArray(Et.__data), + tt.bufferSubData(35345, Dt, Et.__data)) + } + } + tt.bindBuffer(35345, null) + } + function pt(vt, xt, kt) { + const St = vt.value + if (kt[xt] === void 0) return typeof St == 'number' ? (kt[xt] = St) : (kt[xt] = St.clone()), !0 + if (typeof St == 'number') { + if (kt[xt] !== St) return (kt[xt] = St), !0 + } else { + const Tt = kt[xt] + if (Tt.equals(St) === !1) return Tt.copy(St), !0 + } + return !1 + } + function mt(vt) { + const xt = vt.uniforms + let kt = 0 + const St = 16 + let Tt = 0 + for (let At = 0, Et = xt.length; At < Et; At++) { + const $t = xt[At], + Dt = gt($t) + if ((($t.__data = new Float32Array(Dt.storage / Float32Array.BYTES_PER_ELEMENT)), ($t.__offset = kt), At > 0)) { + Tt = kt % St + const jt = St - Tt + Tt !== 0 && jt - Dt.boundary < 0 && ((kt += St - Tt), ($t.__offset = kt)) + } + kt += Dt.storage + } + return (Tt = kt % St), Tt > 0 && (kt += St - Tt), (vt.__size = kt), (vt.__cache = {}), this + } + function gt(vt) { + const xt = vt.value, + kt = { boundary: 0, storage: 0 } + return ( + typeof xt == 'number' + ? ((kt.boundary = 4), (kt.storage = 4)) + : xt.isVector2 + ? ((kt.boundary = 8), (kt.storage = 8)) + : xt.isVector3 || xt.isColor + ? ((kt.boundary = 16), (kt.storage = 12)) + : xt.isVector4 + ? ((kt.boundary = 16), (kt.storage = 16)) + : xt.isMatrix3 + ? ((kt.boundary = 48), (kt.storage = 48)) + : xt.isMatrix4 + ? ((kt.boundary = 64), (kt.storage = 64)) + : xt.isTexture + ? console.warn('THREE.WebGLRenderer: Texture samplers can not be part of an uniforms group.') + : console.warn('THREE.WebGLRenderer: Unsupported uniform value type.', xt), + kt + ) + } + function yt(vt) { + const xt = vt.target + xt.removeEventListener('dispose', yt) + const kt = at.indexOf(xt.__bindingPointIndex) + at.splice(kt, 1), tt.deleteBuffer(it[xt.id]), delete it[xt.id], delete ot[xt.id] + } + function bt() { + for (const vt in it) tt.deleteBuffer(it[vt]) + ;(at = []), (it = {}), (ot = {}) + } + return { bind: lt, update: ct, dispose: bt } + } + function createCanvasElement() { + const tt = createElementNS('canvas') + return (tt.style.display = 'block'), tt + } + function WebGLRenderer(tt = {}) { + this.isWebGLRenderer = !0 + const et = tt.canvas !== void 0 ? tt.canvas : createCanvasElement(), + nt = tt.context !== void 0 ? tt.context : null, + rt = tt.depth !== void 0 ? tt.depth : !0, + it = tt.stencil !== void 0 ? tt.stencil : !0, + ot = tt.antialias !== void 0 ? tt.antialias : !1, + at = tt.premultipliedAlpha !== void 0 ? tt.premultipliedAlpha : !0, + st = tt.preserveDrawingBuffer !== void 0 ? tt.preserveDrawingBuffer : !1, + lt = tt.powerPreference !== void 0 ? tt.powerPreference : 'default', + ct = tt.failIfMajorPerformanceCaveat !== void 0 ? tt.failIfMajorPerformanceCaveat : !1 + let ut + nt !== null ? (ut = nt.getContextAttributes().alpha) : (ut = tt.alpha !== void 0 ? tt.alpha : !1) + let ht = null, + dt = null + const pt = [], + mt = [] + ;(this.domElement = et), + (this.debug = { checkShaderErrors: !0 }), + (this.autoClear = !0), + (this.autoClearColor = !0), + (this.autoClearDepth = !0), + (this.autoClearStencil = !0), + (this.sortObjects = !0), + (this.clippingPlanes = []), + (this.localClippingEnabled = !1), + (this.outputEncoding = LinearEncoding), + (this.physicallyCorrectLights = !1), + (this.toneMapping = NoToneMapping), + (this.toneMappingExposure = 1), + Object.defineProperties(this, { + gammaFactor: { + get: function () { + return console.warn('THREE.WebGLRenderer: .gammaFactor has been removed.'), 2 + }, + set: function () { + console.warn('THREE.WebGLRenderer: .gammaFactor has been removed.') + }, + }, + }) + const gt = this + let yt = !1, + bt = 0, + vt = 0, + xt = null, + kt = -1, + St = null + const Tt = new Vector4(), + At = new Vector4() + let Et = null, + $t = et.width, + Dt = et.height, + jt = 1, + Pt = null, + Ct = null + const wt = new Vector4(0, 0, $t, Dt), + It = new Vector4(0, 0, $t, Dt) + let Ot = !1 + const Wt = new Frustum() + let zt = !1, + Ft = !1, + Nt = null + const Ut = new Matrix4(), + Mt = new Vector2(), + Ht = new Vector3(), + en = { background: null, fog: null, environment: null, overrideMaterial: null, isScene: !0 } + function sn() { + return xt === null ? jt : 1 + } + let Kt = nt + function rn(dn, Jt) { + for (let En = 0; En < dn.length; En++) { + const Ln = dn[En], + Un = et.getContext(Ln, Jt) + if (Un !== null) return Un + } + return null + } + try { + const dn = { + alpha: !0, + depth: rt, + stencil: it, + antialias: ot, + premultipliedAlpha: at, + preserveDrawingBuffer: st, + powerPreference: lt, + failIfMajorPerformanceCaveat: ct, + } + if ( + ('setAttribute' in et && et.setAttribute('data-engine', `three.js r${REVISION}`), + et.addEventListener('webglcontextlost', Zn, !1), + et.addEventListener('webglcontextrestored', Vn, !1), + et.addEventListener('webglcontextcreationerror', qn, !1), + Kt === null) + ) { + const Jt = ['webgl2', 'webgl', 'experimental-webgl'] + if ((gt.isWebGL1Renderer === !0 && Jt.shift(), (Kt = rn(Jt, dn)), Kt === null)) + throw rn(Jt) + ? new Error('Error creating WebGL context with your selected attributes.') + : new Error('Error creating WebGL context.') + } + Kt.getShaderPrecisionFormat === void 0 && + (Kt.getShaderPrecisionFormat = function () { + return { rangeMin: 1, rangeMax: 1, precision: 1 } + }) + } catch (dn) { + throw (console.error('THREE.WebGLRenderer: ' + dn.message), dn) + } + let nn, hn, vn, an, Qt, _n, Pn, $n, Nn, Tn, cn, mn, In, An, wn, fn, pn, kn, Dn, un, Zt, Xt, Sn, Rn + function jn() { + ;(nn = new WebGLExtensions(Kt)), + (hn = new WebGLCapabilities(Kt, nn, tt)), + nn.init(hn), + (Xt = new WebGLUtils(Kt, nn, hn)), + (vn = new WebGLState(Kt, nn, hn)), + (an = new WebGLInfo()), + (Qt = new WebGLProperties()), + (_n = new WebGLTextures(Kt, nn, vn, Qt, hn, Xt, an)), + (Pn = new WebGLCubeMaps(gt)), + ($n = new WebGLCubeUVMaps(gt)), + (Nn = new WebGLAttributes(Kt, hn)), + (Sn = new WebGLBindingStates(Kt, nn, Nn, hn)), + (Tn = new WebGLGeometries(Kt, Nn, an, Sn)), + (cn = new WebGLObjects(Kt, Tn, Nn, an)), + (Dn = new WebGLMorphtargets(Kt, hn, _n)), + (fn = new WebGLClipping(Qt)), + (mn = new WebGLPrograms(gt, Pn, $n, nn, hn, Sn, fn)), + (In = new WebGLMaterials(gt, Qt)), + (An = new WebGLRenderLists()), + (wn = new WebGLRenderStates(nn, hn)), + (kn = new WebGLBackground(gt, Pn, vn, cn, ut, at)), + (pn = new WebGLShadowMap(gt, cn, hn)), + (Rn = new WebGLUniformsGroups(Kt, an, hn, vn)), + (un = new WebGLBufferRenderer(Kt, nn, an, hn)), + (Zt = new WebGLIndexedBufferRenderer(Kt, nn, an, hn)), + (an.programs = mn.programs), + (gt.capabilities = hn), + (gt.extensions = nn), + (gt.properties = Qt), + (gt.renderLists = An), + (gt.shadowMap = pn), + (gt.state = vn), + (gt.info = an) + } + jn() + const On = new WebXRManager(gt, Kt) + ;(this.xr = On), + (this.getContext = function () { + return Kt + }), + (this.getContextAttributes = function () { + return Kt.getContextAttributes() + }), + (this.forceContextLoss = function () { + const dn = nn.get('WEBGL_lose_context') + dn && dn.loseContext() + }), + (this.forceContextRestore = function () { + const dn = nn.get('WEBGL_lose_context') + dn && dn.restoreContext() + }), + (this.getPixelRatio = function () { + return jt + }), + (this.setPixelRatio = function (dn) { + dn !== void 0 && ((jt = dn), this.setSize($t, Dt, !1)) + }), + (this.getSize = function (dn) { + return dn.set($t, Dt) + }), + (this.setSize = function (dn, Jt, En) { + if (On.isPresenting) { + console.warn("THREE.WebGLRenderer: Can't change size while VR device is presenting.") + return + } + ;($t = dn), + (Dt = Jt), + (et.width = Math.floor(dn * jt)), + (et.height = Math.floor(Jt * jt)), + En !== !1 && ((et.style.width = dn + 'px'), (et.style.height = Jt + 'px')), + this.setViewport(0, 0, dn, Jt) + }), + (this.getDrawingBufferSize = function (dn) { + return dn.set($t * jt, Dt * jt).floor() + }), + (this.setDrawingBufferSize = function (dn, Jt, En) { + ;($t = dn), + (Dt = Jt), + (jt = En), + (et.width = Math.floor(dn * En)), + (et.height = Math.floor(Jt * En)), + this.setViewport(0, 0, dn, Jt) + }), + (this.getCurrentViewport = function (dn) { + return dn.copy(Tt) + }), + (this.getViewport = function (dn) { + return dn.copy(wt) + }), + (this.setViewport = function (dn, Jt, En, Ln) { + dn.isVector4 ? wt.set(dn.x, dn.y, dn.z, dn.w) : wt.set(dn, Jt, En, Ln), + vn.viewport(Tt.copy(wt).multiplyScalar(jt).floor()) + }), + (this.getScissor = function (dn) { + return dn.copy(It) + }), + (this.setScissor = function (dn, Jt, En, Ln) { + dn.isVector4 ? It.set(dn.x, dn.y, dn.z, dn.w) : It.set(dn, Jt, En, Ln), + vn.scissor(At.copy(It).multiplyScalar(jt).floor()) + }), + (this.getScissorTest = function () { + return Ot + }), + (this.setScissorTest = function (dn) { + vn.setScissorTest((Ot = dn)) + }), + (this.setOpaqueSort = function (dn) { + Pt = dn + }), + (this.setTransparentSort = function (dn) { + Ct = dn + }), + (this.getClearColor = function (dn) { + return dn.copy(kn.getClearColor()) + }), + (this.setClearColor = function () { + kn.setClearColor.apply(kn, arguments) + }), + (this.getClearAlpha = function () { + return kn.getClearAlpha() + }), + (this.setClearAlpha = function () { + kn.setClearAlpha.apply(kn, arguments) + }), + (this.clear = function (dn = !0, Jt = !0, En = !0) { + let Ln = 0 + dn && (Ln |= 16384), Jt && (Ln |= 256), En && (Ln |= 1024), Kt.clear(Ln) + }), + (this.clearColor = function () { + this.clear(!0, !1, !1) + }), + (this.clearDepth = function () { + this.clear(!1, !0, !1) + }), + (this.clearStencil = function () { + this.clear(!1, !1, !0) + }), + (this.dispose = function () { + et.removeEventListener('webglcontextlost', Zn, !1), + et.removeEventListener('webglcontextrestored', Vn, !1), + et.removeEventListener('webglcontextcreationerror', qn, !1), + An.dispose(), + wn.dispose(), + Qt.dispose(), + Pn.dispose(), + $n.dispose(), + cn.dispose(), + Sn.dispose(), + Rn.dispose(), + mn.dispose(), + On.dispose(), + On.removeEventListener('sessionstart', xr), + On.removeEventListener('sessionend', io), + Nt && (Nt.dispose(), (Nt = null)), + Tr.stop() + }) + function Zn(dn) { + dn.preventDefault(), console.log('THREE.WebGLRenderer: Context Lost.'), (yt = !0) + } + function Vn() { + console.log('THREE.WebGLRenderer: Context Restored.'), (yt = !1) + const dn = an.autoReset, + Jt = pn.enabled, + En = pn.autoUpdate, + Ln = pn.needsUpdate, + Un = pn.type + jn(), (an.autoReset = dn), (pn.enabled = Jt), (pn.autoUpdate = En), (pn.needsUpdate = Ln), (pn.type = Un) + } + function qn(dn) { + console.error('THREE.WebGLRenderer: A WebGL context could not be created. Reason: ', dn.statusMessage) + } + function zn(dn) { + const Jt = dn.target + Jt.removeEventListener('dispose', zn), Jn(Jt) + } + function Jn(dn) { + Hn(dn), Qt.remove(dn) + } + function Hn(dn) { + const Jt = Qt.get(dn).programs + Jt !== void 0 && + (Jt.forEach(function (En) { + mn.releaseProgram(En) + }), + dn.isShaderMaterial && mn.releaseShaderCache(dn)) + } + ;(this.renderBufferDirect = function (dn, Jt, En, Ln, Un, Kn) { + Jt === null && (Jt = en) + const nr = Un.isMesh && Un.matrixWorld.determinant() < 0, + lr = go(dn, Jt, En, Ln, Un) + vn.setMaterial(Ln, nr) + let cr = En.index + const Hr = En.attributes.position + if (cr === null) { + if (Hr === void 0 || Hr.count === 0) return + } else if (cr.count === 0) return + let vr = 1 + Ln.wireframe === !0 && ((cr = Tn.getWireframeAttribute(En)), (vr = 2)), Sn.setup(Un, Ln, lr, En, cr) + let Nr, + Gr = un + cr !== null && ((Nr = Nn.get(cr)), (Gr = Zt), Gr.setIndex(Nr)) + const eo = cr !== null ? cr.count : Hr.count, + Zr = En.drawRange.start * vr, + Jr = En.drawRange.count * vr, + wr = Kn !== null ? Kn.start * vr : 0, + Mr = Kn !== null ? Kn.count * vr : 1 / 0, + Ur = Math.max(Zr, wr), + Rr = Math.min(eo, Zr + Jr, wr + Mr) - 1, + Pr = Math.max(0, Rr - Ur + 1) + if (Pr !== 0) { + if (Un.isMesh) + Ln.wireframe === !0 ? (vn.setLineWidth(Ln.wireframeLinewidth * sn()), Gr.setMode(1)) : Gr.setMode(4) + else if (Un.isLine) { + let Lr = Ln.linewidth + Lr === void 0 && (Lr = 1), + vn.setLineWidth(Lr * sn()), + Un.isLineSegments ? Gr.setMode(1) : Un.isLineLoop ? Gr.setMode(2) : Gr.setMode(3) + } else Un.isPoints ? Gr.setMode(0) : Un.isSprite && Gr.setMode(4) + if (Un.isInstancedMesh) Gr.renderInstances(Ur, Pr, Un.count) + else if (En.isInstancedBufferGeometry) { + const Lr = Math.min(En.instanceCount, En._maxInstanceCount) + Gr.renderInstances(Ur, Pr, Lr) + } else Gr.render(Ur, Pr) + } + }), + (this.compile = function (dn, Jt) { + ;(dt = wn.get(dn)), + dt.init(), + mt.push(dt), + dn.traverseVisible(function (En) { + En.isLight && En.layers.test(Jt.layers) && (dt.pushLight(En), En.castShadow && dt.pushShadow(En)) + }), + dt.setupLights(gt.physicallyCorrectLights), + dn.traverse(function (En) { + const Ln = En.material + if (Ln) + if (Array.isArray(Ln)) + for (let Un = 0; Un < Ln.length; Un++) { + const Kn = Ln[Un] + Yr(Kn, dn, En) + } + else Yr(Ln, dn, En) + }), + mt.pop(), + (dt = null) + }) + let pr = null + function fr(dn) { + pr && pr(dn) + } + function xr() { + Tr.stop() + } + function io() { + Tr.start() + } + const Tr = new WebGLAnimation() + Tr.setAnimationLoop(fr), + typeof self < 'u' && Tr.setContext(self), + (this.setAnimationLoop = function (dn) { + ;(pr = dn), On.setAnimationLoop(dn), dn === null ? Tr.stop() : Tr.start() + }), + On.addEventListener('sessionstart', xr), + On.addEventListener('sessionend', io), + (this.render = function (dn, Jt) { + if (Jt !== void 0 && Jt.isCamera !== !0) { + console.error('THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.') + return + } + if (yt === !0) return + dn.autoUpdate === !0 && dn.updateMatrixWorld(), + Jt.parent === null && Jt.updateMatrixWorld(), + On.enabled === !0 && + On.isPresenting === !0 && + (On.cameraAutoUpdate === !0 && On.updateCamera(Jt), (Jt = On.getCamera())), + dn.isScene === !0 && dn.onBeforeRender(gt, dn, Jt, xt), + (dt = wn.get(dn, mt.length)), + dt.init(), + mt.push(dt), + Ut.multiplyMatrices(Jt.projectionMatrix, Jt.matrixWorldInverse), + Wt.setFromProjectionMatrix(Ut), + (Ft = this.localClippingEnabled), + (zt = fn.init(this.clippingPlanes, Ft, Jt)), + (ht = An.get(dn, pt.length)), + ht.init(), + pt.push(ht), + Ar(dn, Jt, 0, gt.sortObjects), + ht.finish(), + gt.sortObjects === !0 && ht.sort(Pt, Ct), + zt === !0 && fn.beginShadows() + const En = dt.state.shadowsArray + if ( + (pn.render(En, dn, Jt), + zt === !0 && fn.endShadows(), + this.info.autoReset === !0 && this.info.reset(), + kn.render(ht, dn), + dt.setupLights(gt.physicallyCorrectLights), + Jt.isArrayCamera) + ) { + const Ln = Jt.cameras + for (let Un = 0, Kn = Ln.length; Un < Kn; Un++) { + const nr = Ln[Un] + qr(ht, dn, nr, nr.viewport) + } + } else qr(ht, dn, Jt) + xt !== null && (_n.updateMultisampleRenderTarget(xt), _n.updateRenderTargetMipmap(xt)), + dn.isScene === !0 && dn.onAfterRender(gt, dn, Jt), + Sn.resetDefaultState(), + (kt = -1), + (St = null), + mt.pop(), + mt.length > 0 ? (dt = mt[mt.length - 1]) : (dt = null), + pt.pop(), + pt.length > 0 ? (ht = pt[pt.length - 1]) : (ht = null) + }) + function Ar(dn, Jt, En, Ln) { + if (dn.visible === !1) return + if (dn.layers.test(Jt.layers)) { + if (dn.isGroup) En = dn.renderOrder + else if (dn.isLOD) dn.autoUpdate === !0 && dn.update(Jt) + else if (dn.isLight) dt.pushLight(dn), dn.castShadow && dt.pushShadow(dn) + else if (dn.isSprite) { + if (!dn.frustumCulled || Wt.intersectsSprite(dn)) { + Ln && Ht.setFromMatrixPosition(dn.matrixWorld).applyMatrix4(Ut) + const nr = cn.update(dn), + lr = dn.material + lr.visible && ht.push(dn, nr, lr, En, Ht.z, null) + } + } else if ( + (dn.isMesh || dn.isLine || dn.isPoints) && + (dn.isSkinnedMesh && + dn.skeleton.frame !== an.render.frame && + (dn.skeleton.update(), (dn.skeleton.frame = an.render.frame)), + !dn.frustumCulled || Wt.intersectsObject(dn)) + ) { + Ln && Ht.setFromMatrixPosition(dn.matrixWorld).applyMatrix4(Ut) + const nr = cn.update(dn), + lr = dn.material + if (Array.isArray(lr)) { + const cr = nr.groups + for (let Hr = 0, vr = cr.length; Hr < vr; Hr++) { + const Nr = cr[Hr], + Gr = lr[Nr.materialIndex] + Gr && Gr.visible && ht.push(dn, nr, Gr, En, Ht.z, Nr) + } + } else lr.visible && ht.push(dn, nr, lr, En, Ht.z, null) + } + } + const Kn = dn.children + for (let nr = 0, lr = Kn.length; nr < lr; nr++) Ar(Kn[nr], Jt, En, Ln) + } + function qr(dn, Jt, En, Ln) { + const Un = dn.opaque, + Kn = dn.transmissive, + nr = dn.transparent + dt.setupLightsView(En), + Kn.length > 0 && jr(Un, Jt, En), + Ln && vn.viewport(Tt.copy(Ln)), + Un.length > 0 && Fr(Un, Jt, En), + Kn.length > 0 && Fr(Kn, Jt, En), + nr.length > 0 && Fr(nr, Jt, En), + vn.buffers.depth.setTest(!0), + vn.buffers.depth.setMask(!0), + vn.buffers.color.setMask(!0), + vn.setPolygonOffset(!1) + } + function jr(dn, Jt, En) { + const Ln = hn.isWebGL2 + Nt === null && + (Nt = new WebGLRenderTarget(1, 1, { + generateMipmaps: !0, + type: nn.has('EXT_color_buffer_half_float') ? HalfFloatType : UnsignedByteType, + minFilter: LinearMipmapLinearFilter, + samples: Ln && ot === !0 ? 4 : 0, + })), + gt.getDrawingBufferSize(Mt), + Ln ? Nt.setSize(Mt.x, Mt.y) : Nt.setSize(floorPowerOfTwo(Mt.x), floorPowerOfTwo(Mt.y)) + const Un = gt.getRenderTarget() + gt.setRenderTarget(Nt), gt.clear() + const Kn = gt.toneMapping + ;(gt.toneMapping = NoToneMapping), + Fr(dn, Jt, En), + (gt.toneMapping = Kn), + _n.updateMultisampleRenderTarget(Nt), + _n.updateRenderTargetMipmap(Nt), + gt.setRenderTarget(Un) + } + function Fr(dn, Jt, En) { + const Ln = Jt.isScene === !0 ? Jt.overrideMaterial : null + for (let Un = 0, Kn = dn.length; Un < Kn; Un++) { + const nr = dn[Un], + lr = nr.object, + cr = nr.geometry, + Hr = Ln === null ? nr.material : Ln, + vr = nr.group + lr.layers.test(En.layers) && ao(lr, Jt, En, cr, Hr, vr) + } + } + function ao(dn, Jt, En, Ln, Un, Kn) { + dn.onBeforeRender(gt, Jt, En, Ln, Un, Kn), + dn.modelViewMatrix.multiplyMatrices(En.matrixWorldInverse, dn.matrixWorld), + dn.normalMatrix.getNormalMatrix(dn.modelViewMatrix), + Un.onBeforeRender(gt, Jt, En, Ln, dn, Kn), + Un.transparent === !0 && Un.side === DoubleSide + ? ((Un.side = BackSide), + (Un.needsUpdate = !0), + gt.renderBufferDirect(En, Jt, Ln, Un, dn, Kn), + (Un.side = FrontSide), + (Un.needsUpdate = !0), + gt.renderBufferDirect(En, Jt, Ln, Un, dn, Kn), + (Un.side = DoubleSide)) + : gt.renderBufferDirect(En, Jt, Ln, Un, dn, Kn), + dn.onAfterRender(gt, Jt, En, Ln, Un, Kn) + } + function Yr(dn, Jt, En) { + Jt.isScene !== !0 && (Jt = en) + const Ln = Qt.get(dn), + Un = dt.state.lights, + Kn = dt.state.shadowsArray, + nr = Un.state.version, + lr = mn.getParameters(dn, Un.state, Kn, Jt, En), + cr = mn.getProgramCacheKey(lr) + let Hr = Ln.programs + ;(Ln.environment = dn.isMeshStandardMaterial ? Jt.environment : null), + (Ln.fog = Jt.fog), + (Ln.envMap = (dn.isMeshStandardMaterial ? $n : Pn).get(dn.envMap || Ln.environment)), + Hr === void 0 && (dn.addEventListener('dispose', zn), (Hr = new Map()), (Ln.programs = Hr)) + let vr = Hr.get(cr) + if (vr !== void 0) { + if (Ln.currentProgram === vr && Ln.lightsStateVersion === nr) return Dr(dn, lr), vr + } else + (lr.uniforms = mn.getUniforms(dn)), + dn.onBuild(En, lr, gt), + dn.onBeforeCompile(lr, gt), + (vr = mn.acquireProgram(lr, cr)), + Hr.set(cr, vr), + (Ln.uniforms = lr.uniforms) + const Nr = Ln.uniforms + ;((!dn.isShaderMaterial && !dn.isRawShaderMaterial) || dn.clipping === !0) && (Nr.clippingPlanes = fn.uniform), + Dr(dn, lr), + (Ln.needsLights = Mn(dn)), + (Ln.lightsStateVersion = nr), + Ln.needsLights && + ((Nr.ambientLightColor.value = Un.state.ambient), + (Nr.lightProbe.value = Un.state.probe), + (Nr.directionalLights.value = Un.state.directional), + (Nr.directionalLightShadows.value = Un.state.directionalShadow), + (Nr.spotLights.value = Un.state.spot), + (Nr.spotLightShadows.value = Un.state.spotShadow), + (Nr.rectAreaLights.value = Un.state.rectArea), + (Nr.ltc_1.value = Un.state.rectAreaLTC1), + (Nr.ltc_2.value = Un.state.rectAreaLTC2), + (Nr.pointLights.value = Un.state.point), + (Nr.pointLightShadows.value = Un.state.pointShadow), + (Nr.hemisphereLights.value = Un.state.hemi), + (Nr.directionalShadowMap.value = Un.state.directionalShadowMap), + (Nr.directionalShadowMatrix.value = Un.state.directionalShadowMatrix), + (Nr.spotShadowMap.value = Un.state.spotShadowMap), + (Nr.spotShadowMatrix.value = Un.state.spotShadowMatrix), + (Nr.pointShadowMap.value = Un.state.pointShadowMap), + (Nr.pointShadowMatrix.value = Un.state.pointShadowMatrix)) + const Gr = vr.getUniforms(), + eo = WebGLUniforms.seqWithValue(Gr.seq, Nr) + return (Ln.currentProgram = vr), (Ln.uniformsList = eo), vr + } + function Dr(dn, Jt) { + const En = Qt.get(dn) + ;(En.outputEncoding = Jt.outputEncoding), + (En.instancing = Jt.instancing), + (En.skinning = Jt.skinning), + (En.morphTargets = Jt.morphTargets), + (En.morphNormals = Jt.morphNormals), + (En.morphColors = Jt.morphColors), + (En.morphTargetsCount = Jt.morphTargetsCount), + (En.numClippingPlanes = Jt.numClippingPlanes), + (En.numIntersection = Jt.numClipIntersection), + (En.vertexAlphas = Jt.vertexAlphas), + (En.vertexTangents = Jt.vertexTangents), + (En.toneMapping = Jt.toneMapping) + } + function go(dn, Jt, En, Ln, Un) { + Jt.isScene !== !0 && (Jt = en), _n.resetTextureUnits() + const Kn = Jt.fog, + nr = Ln.isMeshStandardMaterial ? Jt.environment : null, + lr = xt === null ? gt.outputEncoding : xt.isXRRenderTarget === !0 ? xt.texture.encoding : LinearEncoding, + cr = (Ln.isMeshStandardMaterial ? $n : Pn).get(Ln.envMap || nr), + Hr = Ln.vertexColors === !0 && !!En.attributes.color && En.attributes.color.itemSize === 4, + vr = !!Ln.normalMap && !!En.attributes.tangent, + Nr = !!En.morphAttributes.position, + Gr = !!En.morphAttributes.normal, + eo = !!En.morphAttributes.color, + Zr = Ln.toneMapped ? gt.toneMapping : NoToneMapping, + Jr = En.morphAttributes.position || En.morphAttributes.normal || En.morphAttributes.color, + wr = Jr !== void 0 ? Jr.length : 0, + Mr = Qt.get(Ln), + Ur = dt.state.lights + if (zt === !0 && (Ft === !0 || dn !== St)) { + const dr = dn === St && Ln.id === kt + fn.setState(Ln, dn, dr) + } + let Rr = !1 + Ln.version === Mr.__version + ? ((Mr.needsLights && Mr.lightsStateVersion !== Ur.state.version) || + Mr.outputEncoding !== lr || + (Un.isInstancedMesh && Mr.instancing === !1) || + (!Un.isInstancedMesh && Mr.instancing === !0) || + (Un.isSkinnedMesh && Mr.skinning === !1) || + (!Un.isSkinnedMesh && Mr.skinning === !0) || + Mr.envMap !== cr || + (Ln.fog === !0 && Mr.fog !== Kn) || + (Mr.numClippingPlanes !== void 0 && + (Mr.numClippingPlanes !== fn.numPlanes || Mr.numIntersection !== fn.numIntersection)) || + Mr.vertexAlphas !== Hr || + Mr.vertexTangents !== vr || + Mr.morphTargets !== Nr || + Mr.morphNormals !== Gr || + Mr.morphColors !== eo || + Mr.toneMapping !== Zr || + (hn.isWebGL2 === !0 && Mr.morphTargetsCount !== wr)) && + (Rr = !0) + : ((Rr = !0), (Mr.__version = Ln.version)) + let Pr = Mr.currentProgram + Rr === !0 && (Pr = Yr(Ln, Jt, Un)) + let Lr = !1, + Wr = !1, + Br = !1 + const tr = Pr.getUniforms(), + ir = Mr.uniforms + if ( + (vn.useProgram(Pr.program) && ((Lr = !0), (Wr = !0), (Br = !0)), + Ln.id !== kt && ((kt = Ln.id), (Wr = !0)), + Lr || St !== dn) + ) { + if ( + (tr.setValue(Kt, 'projectionMatrix', dn.projectionMatrix), + hn.logarithmicDepthBuffer && tr.setValue(Kt, 'logDepthBufFC', 2 / (Math.log(dn.far + 1) / Math.LN2)), + St !== dn && ((St = dn), (Wr = !0), (Br = !0)), + Ln.isShaderMaterial || + Ln.isMeshPhongMaterial || + Ln.isMeshToonMaterial || + Ln.isMeshStandardMaterial || + Ln.envMap) + ) { + const dr = tr.map.cameraPosition + dr !== void 0 && dr.setValue(Kt, Ht.setFromMatrixPosition(dn.matrixWorld)) + } + ;(Ln.isMeshPhongMaterial || + Ln.isMeshToonMaterial || + Ln.isMeshLambertMaterial || + Ln.isMeshBasicMaterial || + Ln.isMeshStandardMaterial || + Ln.isShaderMaterial) && + tr.setValue(Kt, 'isOrthographic', dn.isOrthographicCamera === !0), + (Ln.isMeshPhongMaterial || + Ln.isMeshToonMaterial || + Ln.isMeshLambertMaterial || + Ln.isMeshBasicMaterial || + Ln.isMeshStandardMaterial || + Ln.isShaderMaterial || + Ln.isShadowMaterial || + Un.isSkinnedMesh) && + tr.setValue(Kt, 'viewMatrix', dn.matrixWorldInverse) + } + if (Un.isSkinnedMesh) { + tr.setOptional(Kt, Un, 'bindMatrix'), tr.setOptional(Kt, Un, 'bindMatrixInverse') + const dr = Un.skeleton + dr && + (hn.floatVertexTextures + ? (dr.boneTexture === null && dr.computeBoneTexture(), + tr.setValue(Kt, 'boneTexture', dr.boneTexture, _n), + tr.setValue(Kt, 'boneTextureSize', dr.boneTextureSize)) + : console.warn( + 'THREE.WebGLRenderer: SkinnedMesh can only be used with WebGL 2. With WebGL 1 OES_texture_float and vertex textures support is required.', + )) + } + const Sr = En.morphAttributes + if ( + ((Sr.position !== void 0 || Sr.normal !== void 0 || (Sr.color !== void 0 && hn.isWebGL2 === !0)) && + Dn.update(Un, En, Ln, Pr), + (Wr || Mr.receiveShadow !== Un.receiveShadow) && + ((Mr.receiveShadow = Un.receiveShadow), tr.setValue(Kt, 'receiveShadow', Un.receiveShadow)), + Wr && + (tr.setValue(Kt, 'toneMappingExposure', gt.toneMappingExposure), + Mr.needsLights && xn(ir, Br), + Kn && Ln.fog === !0 && In.refreshFogUniforms(ir, Kn), + In.refreshMaterialUniforms(ir, Ln, jt, Dt, Nt), + WebGLUniforms.upload(Kt, Mr.uniformsList, ir, _n)), + Ln.isShaderMaterial && + Ln.uniformsNeedUpdate === !0 && + (WebGLUniforms.upload(Kt, Mr.uniformsList, ir, _n), (Ln.uniformsNeedUpdate = !1)), + Ln.isSpriteMaterial && tr.setValue(Kt, 'center', Un.center), + tr.setValue(Kt, 'modelViewMatrix', Un.modelViewMatrix), + tr.setValue(Kt, 'normalMatrix', Un.normalMatrix), + tr.setValue(Kt, 'modelMatrix', Un.matrixWorld), + Ln.isShaderMaterial || Ln.isRawShaderMaterial) + ) { + const dr = Ln.uniformsGroups + for (let br = 0, $r = dr.length; br < $r; br++) + if (hn.isWebGL2) { + const no = dr[br] + Rn.update(no, Pr), Rn.bind(no, Pr) + } else console.warn('THREE.WebGLRenderer: Uniform Buffer Objects can only be used with WebGL 2.') + } + return Pr + } + function xn(dn, Jt) { + ;(dn.ambientLightColor.needsUpdate = Jt), + (dn.lightProbe.needsUpdate = Jt), + (dn.directionalLights.needsUpdate = Jt), + (dn.directionalLightShadows.needsUpdate = Jt), + (dn.pointLights.needsUpdate = Jt), + (dn.pointLightShadows.needsUpdate = Jt), + (dn.spotLights.needsUpdate = Jt), + (dn.spotLightShadows.needsUpdate = Jt), + (dn.rectAreaLights.needsUpdate = Jt), + (dn.hemisphereLights.needsUpdate = Jt) + } + function Mn(dn) { + return ( + dn.isMeshLambertMaterial || + dn.isMeshToonMaterial || + dn.isMeshPhongMaterial || + dn.isMeshStandardMaterial || + dn.isShadowMaterial || + (dn.isShaderMaterial && dn.lights === !0) + ) + } + ;(this.getActiveCubeFace = function () { + return bt + }), + (this.getActiveMipmapLevel = function () { + return vt + }), + (this.getRenderTarget = function () { + return xt + }), + (this.setRenderTargetTextures = function (dn, Jt, En) { + ;(Qt.get(dn.texture).__webglTexture = Jt), (Qt.get(dn.depthTexture).__webglTexture = En) + const Ln = Qt.get(dn) + ;(Ln.__hasExternalTextures = !0), + Ln.__hasExternalTextures && + ((Ln.__autoAllocateDepthBuffer = En === void 0), + Ln.__autoAllocateDepthBuffer || + (nn.has('WEBGL_multisampled_render_to_texture') === !0 && + (console.warn( + 'THREE.WebGLRenderer: Render-to-texture extension was disabled because an external texture was provided', + ), + (Ln.__useRenderToTexture = !1)))) + }), + (this.setRenderTargetFramebuffer = function (dn, Jt) { + const En = Qt.get(dn) + ;(En.__webglFramebuffer = Jt), (En.__useDefaultFramebuffer = Jt === void 0) + }), + (this.setRenderTarget = function (dn, Jt = 0, En = 0) { + ;(xt = dn), (bt = Jt), (vt = En) + let Ln = !0 + if (dn) { + const cr = Qt.get(dn) + cr.__useDefaultFramebuffer !== void 0 + ? (vn.bindFramebuffer(36160, null), (Ln = !1)) + : cr.__webglFramebuffer === void 0 + ? _n.setupRenderTarget(dn) + : cr.__hasExternalTextures && + _n.rebindTextures(dn, Qt.get(dn.texture).__webglTexture, Qt.get(dn.depthTexture).__webglTexture) + } + let Un = null, + Kn = !1, + nr = !1 + if (dn) { + const cr = dn.texture + ;(cr.isData3DTexture || cr.isDataArrayTexture) && (nr = !0) + const Hr = Qt.get(dn).__webglFramebuffer + dn.isWebGLCubeRenderTarget + ? ((Un = Hr[Jt]), (Kn = !0)) + : hn.isWebGL2 && dn.samples > 0 && _n.useMultisampledRTT(dn) === !1 + ? (Un = Qt.get(dn).__webglMultisampledFramebuffer) + : (Un = Hr), + Tt.copy(dn.viewport), + At.copy(dn.scissor), + (Et = dn.scissorTest) + } else Tt.copy(wt).multiplyScalar(jt).floor(), At.copy(It).multiplyScalar(jt).floor(), (Et = Ot) + if ( + (vn.bindFramebuffer(36160, Un) && hn.drawBuffers && Ln && vn.drawBuffers(dn, Un), + vn.viewport(Tt), + vn.scissor(At), + vn.setScissorTest(Et), + Kn) + ) { + const cr = Qt.get(dn.texture) + Kt.framebufferTexture2D(36160, 36064, 34069 + Jt, cr.__webglTexture, En) + } else if (nr) { + const cr = Qt.get(dn.texture), + Hr = Jt || 0 + Kt.framebufferTextureLayer(36160, 36064, cr.__webglTexture, En || 0, Hr) + } + kt = -1 + }), + (this.readRenderTargetPixels = function (dn, Jt, En, Ln, Un, Kn, nr) { + if (!(dn && dn.isWebGLRenderTarget)) { + console.error('THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.') + return + } + let lr = Qt.get(dn).__webglFramebuffer + if ((dn.isWebGLCubeRenderTarget && nr !== void 0 && (lr = lr[nr]), lr)) { + vn.bindFramebuffer(36160, lr) + try { + const cr = dn.texture, + Hr = cr.format, + vr = cr.type + if (Hr !== RGBAFormat && Xt.convert(Hr) !== Kt.getParameter(35739)) { + console.error( + 'THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.', + ) + return + } + const Nr = + vr === HalfFloatType && + (nn.has('EXT_color_buffer_half_float') || (hn.isWebGL2 && nn.has('EXT_color_buffer_float'))) + if ( + vr !== UnsignedByteType && + Xt.convert(vr) !== Kt.getParameter(35738) && + !( + vr === FloatType && + (hn.isWebGL2 || nn.has('OES_texture_float') || nn.has('WEBGL_color_buffer_float')) + ) && + !Nr + ) { + console.error( + 'THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.', + ) + return + } + Jt >= 0 && + Jt <= dn.width - Ln && + En >= 0 && + En <= dn.height - Un && + Kt.readPixels(Jt, En, Ln, Un, Xt.convert(Hr), Xt.convert(vr), Kn) + } finally { + const cr = xt !== null ? Qt.get(xt).__webglFramebuffer : null + vn.bindFramebuffer(36160, cr) + } + } + }), + (this.copyFramebufferToTexture = function (dn, Jt, En = 0) { + const Ln = Math.pow(2, -En), + Un = Math.floor(Jt.image.width * Ln), + Kn = Math.floor(Jt.image.height * Ln) + _n.setTexture2D(Jt, 0), Kt.copyTexSubImage2D(3553, En, 0, 0, dn.x, dn.y, Un, Kn), vn.unbindTexture() + }), + (this.copyTextureToTexture = function (dn, Jt, En, Ln = 0) { + const Un = Jt.image.width, + Kn = Jt.image.height, + nr = Xt.convert(En.format), + lr = Xt.convert(En.type) + _n.setTexture2D(En, 0), + Kt.pixelStorei(37440, En.flipY), + Kt.pixelStorei(37441, En.premultiplyAlpha), + Kt.pixelStorei(3317, En.unpackAlignment), + Jt.isDataTexture + ? Kt.texSubImage2D(3553, Ln, dn.x, dn.y, Un, Kn, nr, lr, Jt.image.data) + : Jt.isCompressedTexture + ? Kt.compressedTexSubImage2D( + 3553, + Ln, + dn.x, + dn.y, + Jt.mipmaps[0].width, + Jt.mipmaps[0].height, + nr, + Jt.mipmaps[0].data, + ) + : Kt.texSubImage2D(3553, Ln, dn.x, dn.y, nr, lr, Jt.image), + Ln === 0 && En.generateMipmaps && Kt.generateMipmap(3553), + vn.unbindTexture() + }), + (this.copyTextureToTexture3D = function (dn, Jt, En, Ln, Un = 0) { + if (gt.isWebGL1Renderer) { + console.warn('THREE.WebGLRenderer.copyTextureToTexture3D: can only be used with WebGL2.') + return + } + const Kn = dn.max.x - dn.min.x + 1, + nr = dn.max.y - dn.min.y + 1, + lr = dn.max.z - dn.min.z + 1, + cr = Xt.convert(Ln.format), + Hr = Xt.convert(Ln.type) + let vr + if (Ln.isData3DTexture) _n.setTexture3D(Ln, 0), (vr = 32879) + else if (Ln.isDataArrayTexture) _n.setTexture2DArray(Ln, 0), (vr = 35866) + else { + console.warn( + 'THREE.WebGLRenderer.copyTextureToTexture3D: only supports THREE.DataTexture3D and THREE.DataTexture2DArray.', + ) + return + } + Kt.pixelStorei(37440, Ln.flipY), + Kt.pixelStorei(37441, Ln.premultiplyAlpha), + Kt.pixelStorei(3317, Ln.unpackAlignment) + const Nr = Kt.getParameter(3314), + Gr = Kt.getParameter(32878), + eo = Kt.getParameter(3316), + Zr = Kt.getParameter(3315), + Jr = Kt.getParameter(32877), + wr = En.isCompressedTexture ? En.mipmaps[0] : En.image + Kt.pixelStorei(3314, wr.width), + Kt.pixelStorei(32878, wr.height), + Kt.pixelStorei(3316, dn.min.x), + Kt.pixelStorei(3315, dn.min.y), + Kt.pixelStorei(32877, dn.min.z), + En.isDataTexture || En.isData3DTexture + ? Kt.texSubImage3D(vr, Un, Jt.x, Jt.y, Jt.z, Kn, nr, lr, cr, Hr, wr.data) + : En.isCompressedTexture + ? (console.warn('THREE.WebGLRenderer.copyTextureToTexture3D: untested support for compressed srcTexture.'), + Kt.compressedTexSubImage3D(vr, Un, Jt.x, Jt.y, Jt.z, Kn, nr, lr, cr, wr.data)) + : Kt.texSubImage3D(vr, Un, Jt.x, Jt.y, Jt.z, Kn, nr, lr, cr, Hr, wr), + Kt.pixelStorei(3314, Nr), + Kt.pixelStorei(32878, Gr), + Kt.pixelStorei(3316, eo), + Kt.pixelStorei(3315, Zr), + Kt.pixelStorei(32877, Jr), + Un === 0 && Ln.generateMipmaps && Kt.generateMipmap(vr), + vn.unbindTexture() + }), + (this.initTexture = function (dn) { + dn.isCubeTexture + ? _n.setTextureCube(dn, 0) + : dn.isData3DTexture + ? _n.setTexture3D(dn, 0) + : dn.isDataArrayTexture + ? _n.setTexture2DArray(dn, 0) + : _n.setTexture2D(dn, 0), + vn.unbindTexture() + }), + (this.resetState = function () { + ;(bt = 0), (vt = 0), (xt = null), vn.reset(), Sn.reset() + }), + typeof __THREE_DEVTOOLS__ < 'u' && __THREE_DEVTOOLS__.dispatchEvent(new CustomEvent('observe', { detail: this })) + } + class WebGL1Renderer extends WebGLRenderer {} + WebGL1Renderer.prototype.isWebGL1Renderer = !0 + class FogExp2 { + constructor(et, nt = 25e-5) { + ;(this.isFogExp2 = !0), (this.name = ''), (this.color = new Color$1(et)), (this.density = nt) + } + clone() { + return new FogExp2(this.color, this.density) + } + toJSON() { + return { type: 'FogExp2', color: this.color.getHex(), density: this.density } + } + } + class Fog { + constructor(et, nt = 1, rt = 1e3) { + ;(this.isFog = !0), (this.name = ''), (this.color = new Color$1(et)), (this.near = nt), (this.far = rt) + } + clone() { + return new Fog(this.color, this.near, this.far) + } + toJSON() { + return { type: 'Fog', color: this.color.getHex(), near: this.near, far: this.far } + } + } + class Scene extends Object3D { + constructor() { + super(), + (this.isScene = !0), + (this.type = 'Scene'), + (this.background = null), + (this.environment = null), + (this.fog = null), + (this.overrideMaterial = null), + (this.autoUpdate = !0), + typeof __THREE_DEVTOOLS__ < 'u' && + __THREE_DEVTOOLS__.dispatchEvent(new CustomEvent('observe', { detail: this })) + } + copy(et, nt) { + return ( + super.copy(et, nt), + et.background !== null && (this.background = et.background.clone()), + et.environment !== null && (this.environment = et.environment.clone()), + et.fog !== null && (this.fog = et.fog.clone()), + et.overrideMaterial !== null && (this.overrideMaterial = et.overrideMaterial.clone()), + (this.autoUpdate = et.autoUpdate), + (this.matrixAutoUpdate = et.matrixAutoUpdate), + this + ) + } + toJSON(et) { + const nt = super.toJSON(et) + return this.fog !== null && (nt.object.fog = this.fog.toJSON()), nt + } + } + class InterleavedBuffer { + constructor(et, nt) { + ;(this.isInterleavedBuffer = !0), + (this.array = et), + (this.stride = nt), + (this.count = et !== void 0 ? et.length / nt : 0), + (this.usage = StaticDrawUsage), + (this.updateRange = { offset: 0, count: -1 }), + (this.version = 0), + (this.uuid = generateUUID$1()) + } + onUploadCallback() {} + set needsUpdate(et) { + et === !0 && this.version++ + } + setUsage(et) { + return (this.usage = et), this + } + copy(et) { + return ( + (this.array = new et.array.constructor(et.array)), + (this.count = et.count), + (this.stride = et.stride), + (this.usage = et.usage), + this + ) + } + copyAt(et, nt, rt) { + ;(et *= this.stride), (rt *= nt.stride) + for (let it = 0, ot = this.stride; it < ot; it++) this.array[et + it] = nt.array[rt + it] + return this + } + set(et, nt = 0) { + return this.array.set(et, nt), this + } + clone(et) { + et.arrayBuffers === void 0 && (et.arrayBuffers = {}), + this.array.buffer._uuid === void 0 && (this.array.buffer._uuid = generateUUID$1()), + et.arrayBuffers[this.array.buffer._uuid] === void 0 && + (et.arrayBuffers[this.array.buffer._uuid] = this.array.slice(0).buffer) + const nt = new this.array.constructor(et.arrayBuffers[this.array.buffer._uuid]), + rt = new this.constructor(nt, this.stride) + return rt.setUsage(this.usage), rt + } + onUpload(et) { + return (this.onUploadCallback = et), this + } + toJSON(et) { + return ( + et.arrayBuffers === void 0 && (et.arrayBuffers = {}), + this.array.buffer._uuid === void 0 && (this.array.buffer._uuid = generateUUID$1()), + et.arrayBuffers[this.array.buffer._uuid] === void 0 && + (et.arrayBuffers[this.array.buffer._uuid] = Array.from(new Uint32Array(this.array.buffer))), + { uuid: this.uuid, buffer: this.array.buffer._uuid, type: this.array.constructor.name, stride: this.stride } + ) + } + } + const _vector$6 = new Vector3() + class InterleavedBufferAttribute { + constructor(et, nt, rt, it = !1) { + ;(this.isInterleavedBufferAttribute = !0), + (this.name = ''), + (this.data = et), + (this.itemSize = nt), + (this.offset = rt), + (this.normalized = it === !0) + } + get count() { + return this.data.count + } + get array() { + return this.data.array + } + set needsUpdate(et) { + this.data.needsUpdate = et + } + applyMatrix4(et) { + for (let nt = 0, rt = this.data.count; nt < rt; nt++) + _vector$6.fromBufferAttribute(this, nt), + _vector$6.applyMatrix4(et), + this.setXYZ(nt, _vector$6.x, _vector$6.y, _vector$6.z) + return this + } + applyNormalMatrix(et) { + for (let nt = 0, rt = this.count; nt < rt; nt++) + _vector$6.fromBufferAttribute(this, nt), + _vector$6.applyNormalMatrix(et), + this.setXYZ(nt, _vector$6.x, _vector$6.y, _vector$6.z) + return this + } + transformDirection(et) { + for (let nt = 0, rt = this.count; nt < rt; nt++) + _vector$6.fromBufferAttribute(this, nt), + _vector$6.transformDirection(et), + this.setXYZ(nt, _vector$6.x, _vector$6.y, _vector$6.z) + return this + } + setX(et, nt) { + return (this.data.array[et * this.data.stride + this.offset] = nt), this + } + setY(et, nt) { + return (this.data.array[et * this.data.stride + this.offset + 1] = nt), this + } + setZ(et, nt) { + return (this.data.array[et * this.data.stride + this.offset + 2] = nt), this + } + setW(et, nt) { + return (this.data.array[et * this.data.stride + this.offset + 3] = nt), this + } + getX(et) { + return this.data.array[et * this.data.stride + this.offset] + } + getY(et) { + return this.data.array[et * this.data.stride + this.offset + 1] + } + getZ(et) { + return this.data.array[et * this.data.stride + this.offset + 2] + } + getW(et) { + return this.data.array[et * this.data.stride + this.offset + 3] + } + setXY(et, nt, rt) { + return ( + (et = et * this.data.stride + this.offset), (this.data.array[et + 0] = nt), (this.data.array[et + 1] = rt), this + ) + } + setXYZ(et, nt, rt, it) { + return ( + (et = et * this.data.stride + this.offset), + (this.data.array[et + 0] = nt), + (this.data.array[et + 1] = rt), + (this.data.array[et + 2] = it), + this + ) + } + setXYZW(et, nt, rt, it, ot) { + return ( + (et = et * this.data.stride + this.offset), + (this.data.array[et + 0] = nt), + (this.data.array[et + 1] = rt), + (this.data.array[et + 2] = it), + (this.data.array[et + 3] = ot), + this + ) + } + clone(et) { + if (et === void 0) { + console.log( + 'THREE.InterleavedBufferAttribute.clone(): Cloning an interleaved buffer attribute will deinterleave buffer data.', + ) + const nt = [] + for (let rt = 0; rt < this.count; rt++) { + const it = rt * this.data.stride + this.offset + for (let ot = 0; ot < this.itemSize; ot++) nt.push(this.data.array[it + ot]) + } + return new BufferAttribute(new this.array.constructor(nt), this.itemSize, this.normalized) + } else + return ( + et.interleavedBuffers === void 0 && (et.interleavedBuffers = {}), + et.interleavedBuffers[this.data.uuid] === void 0 && + (et.interleavedBuffers[this.data.uuid] = this.data.clone(et)), + new InterleavedBufferAttribute( + et.interleavedBuffers[this.data.uuid], + this.itemSize, + this.offset, + this.normalized, + ) + ) + } + toJSON(et) { + if (et === void 0) { + console.log( + 'THREE.InterleavedBufferAttribute.toJSON(): Serializing an interleaved buffer attribute will deinterleave buffer data.', + ) + const nt = [] + for (let rt = 0; rt < this.count; rt++) { + const it = rt * this.data.stride + this.offset + for (let ot = 0; ot < this.itemSize; ot++) nt.push(this.data.array[it + ot]) + } + return { itemSize: this.itemSize, type: this.array.constructor.name, array: nt, normalized: this.normalized } + } else + return ( + et.interleavedBuffers === void 0 && (et.interleavedBuffers = {}), + et.interleavedBuffers[this.data.uuid] === void 0 && + (et.interleavedBuffers[this.data.uuid] = this.data.toJSON(et)), + { + isInterleavedBufferAttribute: !0, + itemSize: this.itemSize, + data: this.data.uuid, + offset: this.offset, + normalized: this.normalized, + } + ) + } + } + class SpriteMaterial extends Material { + constructor(et) { + super(), + (this.isSpriteMaterial = !0), + (this.type = 'SpriteMaterial'), + (this.color = new Color$1(16777215)), + (this.map = null), + (this.alphaMap = null), + (this.rotation = 0), + (this.sizeAttenuation = !0), + (this.transparent = !0), + (this.fog = !0), + this.setValues(et) + } + copy(et) { + return ( + super.copy(et), + this.color.copy(et.color), + (this.map = et.map), + (this.alphaMap = et.alphaMap), + (this.rotation = et.rotation), + (this.sizeAttenuation = et.sizeAttenuation), + (this.fog = et.fog), + this + ) + } + } + let _geometry + const _intersectPoint = new Vector3(), + _worldScale = new Vector3(), + _mvPosition = new Vector3(), + _alignedPosition = new Vector2(), + _rotatedPosition = new Vector2(), + _viewWorldMatrix = new Matrix4(), + _vA = new Vector3(), + _vB = new Vector3(), + _vC = new Vector3(), + _uvA = new Vector2(), + _uvB = new Vector2(), + _uvC = new Vector2() + class Sprite extends Object3D { + constructor(et) { + if ((super(), (this.isSprite = !0), (this.type = 'Sprite'), _geometry === void 0)) { + _geometry = new BufferGeometry() + const nt = new Float32Array([-0.5, -0.5, 0, 0, 0, 0.5, -0.5, 0, 1, 0, 0.5, 0.5, 0, 1, 1, -0.5, 0.5, 0, 0, 1]), + rt = new InterleavedBuffer(nt, 5) + _geometry.setIndex([0, 1, 2, 0, 2, 3]), + _geometry.setAttribute('position', new InterleavedBufferAttribute(rt, 3, 0, !1)), + _geometry.setAttribute('uv', new InterleavedBufferAttribute(rt, 2, 3, !1)) + } + ;(this.geometry = _geometry), + (this.material = et !== void 0 ? et : new SpriteMaterial()), + (this.center = new Vector2(0.5, 0.5)) + } + raycast(et, nt) { + et.camera === null && + console.error('THREE.Sprite: "Raycaster.camera" needs to be set in order to raycast against sprites.'), + _worldScale.setFromMatrixScale(this.matrixWorld), + _viewWorldMatrix.copy(et.camera.matrixWorld), + this.modelViewMatrix.multiplyMatrices(et.camera.matrixWorldInverse, this.matrixWorld), + _mvPosition.setFromMatrixPosition(this.modelViewMatrix), + et.camera.isPerspectiveCamera && + this.material.sizeAttenuation === !1 && + _worldScale.multiplyScalar(-_mvPosition.z) + const rt = this.material.rotation + let it, ot + rt !== 0 && ((ot = Math.cos(rt)), (it = Math.sin(rt))) + const at = this.center + transformVertex(_vA.set(-0.5, -0.5, 0), _mvPosition, at, _worldScale, it, ot), + transformVertex(_vB.set(0.5, -0.5, 0), _mvPosition, at, _worldScale, it, ot), + transformVertex(_vC.set(0.5, 0.5, 0), _mvPosition, at, _worldScale, it, ot), + _uvA.set(0, 0), + _uvB.set(1, 0), + _uvC.set(1, 1) + let st = et.ray.intersectTriangle(_vA, _vB, _vC, !1, _intersectPoint) + if ( + st === null && + (transformVertex(_vB.set(-0.5, 0.5, 0), _mvPosition, at, _worldScale, it, ot), + _uvB.set(0, 1), + (st = et.ray.intersectTriangle(_vA, _vC, _vB, !1, _intersectPoint)), + st === null) + ) + return + const lt = et.ray.origin.distanceTo(_intersectPoint) + lt < et.near || + lt > et.far || + nt.push({ + distance: lt, + point: _intersectPoint.clone(), + uv: Triangle.getUV(_intersectPoint, _vA, _vB, _vC, _uvA, _uvB, _uvC, new Vector2()), + face: null, + object: this, + }) + } + copy(et, nt) { + return ( + super.copy(et, nt), et.center !== void 0 && this.center.copy(et.center), (this.material = et.material), this + ) + } + } + function transformVertex(tt, et, nt, rt, it, ot) { + _alignedPosition.subVectors(tt, nt).addScalar(0.5).multiply(rt), + it !== void 0 + ? ((_rotatedPosition.x = ot * _alignedPosition.x - it * _alignedPosition.y), + (_rotatedPosition.y = it * _alignedPosition.x + ot * _alignedPosition.y)) + : _rotatedPosition.copy(_alignedPosition), + tt.copy(et), + (tt.x += _rotatedPosition.x), + (tt.y += _rotatedPosition.y), + tt.applyMatrix4(_viewWorldMatrix) + } + const _v1$2 = new Vector3(), + _v2$1 = new Vector3() + class LOD extends Object3D { + constructor() { + super(), + (this._currentLevel = 0), + (this.type = 'LOD'), + Object.defineProperties(this, { levels: { enumerable: !0, value: [] }, isLOD: { value: !0 } }), + (this.autoUpdate = !0) + } + copy(et) { + super.copy(et, !1) + const nt = et.levels + for (let rt = 0, it = nt.length; rt < it; rt++) { + const ot = nt[rt] + this.addLevel(ot.object.clone(), ot.distance) + } + return (this.autoUpdate = et.autoUpdate), this + } + addLevel(et, nt = 0) { + nt = Math.abs(nt) + const rt = this.levels + let it + for (it = 0; it < rt.length && !(nt < rt[it].distance); it++); + return rt.splice(it, 0, { distance: nt, object: et }), this.add(et), this + } + getCurrentLevel() { + return this._currentLevel + } + getObjectForDistance(et) { + const nt = this.levels + if (nt.length > 0) { + let rt, it + for (rt = 1, it = nt.length; rt < it && !(et < nt[rt].distance); rt++); + return nt[rt - 1].object + } + return null + } + raycast(et, nt) { + if (this.levels.length > 0) { + _v1$2.setFromMatrixPosition(this.matrixWorld) + const it = et.ray.origin.distanceTo(_v1$2) + this.getObjectForDistance(it).raycast(et, nt) + } + } + update(et) { + const nt = this.levels + if (nt.length > 1) { + _v1$2.setFromMatrixPosition(et.matrixWorld), _v2$1.setFromMatrixPosition(this.matrixWorld) + const rt = _v1$2.distanceTo(_v2$1) / et.zoom + nt[0].object.visible = !0 + let it, ot + for (it = 1, ot = nt.length; it < ot && rt >= nt[it].distance; it++) + (nt[it - 1].object.visible = !1), (nt[it].object.visible = !0) + for (this._currentLevel = it - 1; it < ot; it++) nt[it].object.visible = !1 + } + } + toJSON(et) { + const nt = super.toJSON(et) + this.autoUpdate === !1 && (nt.object.autoUpdate = !1), (nt.object.levels = []) + const rt = this.levels + for (let it = 0, ot = rt.length; it < ot; it++) { + const at = rt[it] + nt.object.levels.push({ object: at.object.uuid, distance: at.distance }) + } + return nt + } + } + const _basePosition = new Vector3(), + _skinIndex = new Vector4(), + _skinWeight = new Vector4(), + _vector$5 = new Vector3(), + _matrix = new Matrix4() + class SkinnedMesh extends Mesh { + constructor(et, nt) { + super(et, nt), + (this.isSkinnedMesh = !0), + (this.type = 'SkinnedMesh'), + (this.bindMode = 'attached'), + (this.bindMatrix = new Matrix4()), + (this.bindMatrixInverse = new Matrix4()) + } + copy(et, nt) { + return ( + super.copy(et, nt), + (this.bindMode = et.bindMode), + this.bindMatrix.copy(et.bindMatrix), + this.bindMatrixInverse.copy(et.bindMatrixInverse), + (this.skeleton = et.skeleton), + this + ) + } + bind(et, nt) { + ;(this.skeleton = et), + nt === void 0 && (this.updateMatrixWorld(!0), this.skeleton.calculateInverses(), (nt = this.matrixWorld)), + this.bindMatrix.copy(nt), + this.bindMatrixInverse.copy(nt).invert() + } + pose() { + this.skeleton.pose() + } + normalizeSkinWeights() { + const et = new Vector4(), + nt = this.geometry.attributes.skinWeight + for (let rt = 0, it = nt.count; rt < it; rt++) { + et.fromBufferAttribute(nt, rt) + const ot = 1 / et.manhattanLength() + ot !== 1 / 0 ? et.multiplyScalar(ot) : et.set(1, 0, 0, 0), nt.setXYZW(rt, et.x, et.y, et.z, et.w) + } + } + updateMatrixWorld(et) { + super.updateMatrixWorld(et), + this.bindMode === 'attached' + ? this.bindMatrixInverse.copy(this.matrixWorld).invert() + : this.bindMode === 'detached' + ? this.bindMatrixInverse.copy(this.bindMatrix).invert() + : console.warn('THREE.SkinnedMesh: Unrecognized bindMode: ' + this.bindMode) + } + boneTransform(et, nt) { + const rt = this.skeleton, + it = this.geometry + _skinIndex.fromBufferAttribute(it.attributes.skinIndex, et), + _skinWeight.fromBufferAttribute(it.attributes.skinWeight, et), + _basePosition.copy(nt).applyMatrix4(this.bindMatrix), + nt.set(0, 0, 0) + for (let ot = 0; ot < 4; ot++) { + const at = _skinWeight.getComponent(ot) + if (at !== 0) { + const st = _skinIndex.getComponent(ot) + _matrix.multiplyMatrices(rt.bones[st].matrixWorld, rt.boneInverses[st]), + nt.addScaledVector(_vector$5.copy(_basePosition).applyMatrix4(_matrix), at) + } + } + return nt.applyMatrix4(this.bindMatrixInverse) + } + } + class Bone extends Object3D { + constructor() { + super(), (this.isBone = !0), (this.type = 'Bone') + } + } + class DataTexture extends Texture { + constructor(et = null, nt = 1, rt = 1, it, ot, at, st, lt, ct = NearestFilter, ut = NearestFilter, ht, dt) { + super(null, at, st, lt, ct, ut, it, ot, ht, dt), + (this.isDataTexture = !0), + (this.image = { data: et, width: nt, height: rt }), + (this.generateMipmaps = !1), + (this.flipY = !1), + (this.unpackAlignment = 1) + } + } + const _offsetMatrix = new Matrix4(), + _identityMatrix = new Matrix4() + class Skeleton { + constructor(et = [], nt = []) { + ;(this.uuid = generateUUID$1()), + (this.bones = et.slice(0)), + (this.boneInverses = nt), + (this.boneMatrices = null), + (this.boneTexture = null), + (this.boneTextureSize = 0), + (this.frame = -1), + this.init() + } + init() { + const et = this.bones, + nt = this.boneInverses + if (((this.boneMatrices = new Float32Array(et.length * 16)), nt.length === 0)) this.calculateInverses() + else if (et.length !== nt.length) { + console.warn('THREE.Skeleton: Number of inverse bone matrices does not match amount of bones.'), + (this.boneInverses = []) + for (let rt = 0, it = this.bones.length; rt < it; rt++) this.boneInverses.push(new Matrix4()) + } + } + calculateInverses() { + this.boneInverses.length = 0 + for (let et = 0, nt = this.bones.length; et < nt; et++) { + const rt = new Matrix4() + this.bones[et] && rt.copy(this.bones[et].matrixWorld).invert(), this.boneInverses.push(rt) + } + } + pose() { + for (let et = 0, nt = this.bones.length; et < nt; et++) { + const rt = this.bones[et] + rt && rt.matrixWorld.copy(this.boneInverses[et]).invert() + } + for (let et = 0, nt = this.bones.length; et < nt; et++) { + const rt = this.bones[et] + rt && + (rt.parent && rt.parent.isBone + ? (rt.matrix.copy(rt.parent.matrixWorld).invert(), rt.matrix.multiply(rt.matrixWorld)) + : rt.matrix.copy(rt.matrixWorld), + rt.matrix.decompose(rt.position, rt.quaternion, rt.scale)) + } + } + update() { + const et = this.bones, + nt = this.boneInverses, + rt = this.boneMatrices, + it = this.boneTexture + for (let ot = 0, at = et.length; ot < at; ot++) { + const st = et[ot] ? et[ot].matrixWorld : _identityMatrix + _offsetMatrix.multiplyMatrices(st, nt[ot]), _offsetMatrix.toArray(rt, ot * 16) + } + it !== null && (it.needsUpdate = !0) + } + clone() { + return new Skeleton(this.bones, this.boneInverses) + } + computeBoneTexture() { + let et = Math.sqrt(this.bones.length * 4) + ;(et = ceilPowerOfTwo(et)), (et = Math.max(et, 4)) + const nt = new Float32Array(et * et * 4) + nt.set(this.boneMatrices) + const rt = new DataTexture(nt, et, et, RGBAFormat, FloatType) + return (rt.needsUpdate = !0), (this.boneMatrices = nt), (this.boneTexture = rt), (this.boneTextureSize = et), this + } + getBoneByName(et) { + for (let nt = 0, rt = this.bones.length; nt < rt; nt++) { + const it = this.bones[nt] + if (it.name === et) return it + } + } + dispose() { + this.boneTexture !== null && (this.boneTexture.dispose(), (this.boneTexture = null)) + } + fromJSON(et, nt) { + this.uuid = et.uuid + for (let rt = 0, it = et.bones.length; rt < it; rt++) { + const ot = et.bones[rt] + let at = nt[ot] + at === void 0 && (console.warn('THREE.Skeleton: No bone found with UUID:', ot), (at = new Bone())), + this.bones.push(at), + this.boneInverses.push(new Matrix4().fromArray(et.boneInverses[rt])) + } + return this.init(), this + } + toJSON() { + const et = { + metadata: { version: 4.5, type: 'Skeleton', generator: 'Skeleton.toJSON' }, + bones: [], + boneInverses: [], + } + et.uuid = this.uuid + const nt = this.bones, + rt = this.boneInverses + for (let it = 0, ot = nt.length; it < ot; it++) { + const at = nt[it] + et.bones.push(at.uuid) + const st = rt[it] + et.boneInverses.push(st.toArray()) + } + return et + } + } + class InstancedBufferAttribute extends BufferAttribute { + constructor(et, nt, rt, it = 1) { + typeof rt == 'number' && + ((it = rt), + (rt = !1), + console.error('THREE.InstancedBufferAttribute: The constructor now expects normalized as the third argument.')), + super(et, nt, rt), + (this.isInstancedBufferAttribute = !0), + (this.meshPerAttribute = it) + } + copy(et) { + return super.copy(et), (this.meshPerAttribute = et.meshPerAttribute), this + } + toJSON() { + const et = super.toJSON() + return (et.meshPerAttribute = this.meshPerAttribute), (et.isInstancedBufferAttribute = !0), et + } + } + const _instanceLocalMatrix$1 = new Matrix4(), + _instanceWorldMatrix$1 = new Matrix4(), + _instanceIntersects$1 = [], + _mesh$1 = new Mesh() + class InstancedMesh extends Mesh { + constructor(et, nt, rt) { + super(et, nt), + (this.isInstancedMesh = !0), + (this.instanceMatrix = new InstancedBufferAttribute(new Float32Array(rt * 16), 16)), + (this.instanceColor = null), + (this.count = rt), + (this.frustumCulled = !1) + } + copy(et, nt) { + return ( + super.copy(et, nt), + this.instanceMatrix.copy(et.instanceMatrix), + et.instanceColor !== null && (this.instanceColor = et.instanceColor.clone()), + (this.count = et.count), + this + ) + } + getColorAt(et, nt) { + nt.fromArray(this.instanceColor.array, et * 3) + } + getMatrixAt(et, nt) { + nt.fromArray(this.instanceMatrix.array, et * 16) + } + raycast(et, nt) { + const rt = this.matrixWorld, + it = this.count + if (((_mesh$1.geometry = this.geometry), (_mesh$1.material = this.material), _mesh$1.material !== void 0)) + for (let ot = 0; ot < it; ot++) { + this.getMatrixAt(ot, _instanceLocalMatrix$1), + _instanceWorldMatrix$1.multiplyMatrices(rt, _instanceLocalMatrix$1), + (_mesh$1.matrixWorld = _instanceWorldMatrix$1), + _mesh$1.raycast(et, _instanceIntersects$1) + for (let at = 0, st = _instanceIntersects$1.length; at < st; at++) { + const lt = _instanceIntersects$1[at] + ;(lt.instanceId = ot), (lt.object = this), nt.push(lt) + } + _instanceIntersects$1.length = 0 + } + } + setColorAt(et, nt) { + this.instanceColor === null && + (this.instanceColor = new InstancedBufferAttribute(new Float32Array(this.instanceMatrix.count * 3), 3)), + nt.toArray(this.instanceColor.array, et * 3) + } + setMatrixAt(et, nt) { + nt.toArray(this.instanceMatrix.array, et * 16) + } + updateMorphTargets() {} + dispose() { + this.dispatchEvent({ type: 'dispose' }) + } + } + class LineBasicMaterial extends Material { + constructor(et) { + super(), + (this.isLineBasicMaterial = !0), + (this.type = 'LineBasicMaterial'), + (this.color = new Color$1(16777215)), + (this.linewidth = 1), + (this.linecap = 'round'), + (this.linejoin = 'round'), + (this.fog = !0), + this.setValues(et) + } + copy(et) { + return ( + super.copy(et), + this.color.copy(et.color), + (this.linewidth = et.linewidth), + (this.linecap = et.linecap), + (this.linejoin = et.linejoin), + (this.fog = et.fog), + this + ) + } + } + const _start$1 = new Vector3(), + _end$1 = new Vector3(), + _inverseMatrix$1 = new Matrix4(), + _ray$1 = new Ray(), + _sphere$1$1 = new Sphere() + let Line$2 = class extends Object3D { + constructor(et = new BufferGeometry(), nt = new LineBasicMaterial()) { + super(), + (this.isLine = !0), + (this.type = 'Line'), + (this.geometry = et), + (this.material = nt), + this.updateMorphTargets() + } + copy(et, nt) { + return super.copy(et, nt), (this.material = et.material), (this.geometry = et.geometry), this + } + computeLineDistances() { + const et = this.geometry + if (et.index === null) { + const nt = et.attributes.position, + rt = [0] + for (let it = 1, ot = nt.count; it < ot; it++) + _start$1.fromBufferAttribute(nt, it - 1), + _end$1.fromBufferAttribute(nt, it), + (rt[it] = rt[it - 1]), + (rt[it] += _start$1.distanceTo(_end$1)) + et.setAttribute('lineDistance', new Float32BufferAttribute(rt, 1)) + } else + console.warn('THREE.Line.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.') + return this + } + raycast(et, nt) { + const rt = this.geometry, + it = this.matrixWorld, + ot = et.params.Line.threshold, + at = rt.drawRange + if ( + (rt.boundingSphere === null && rt.computeBoundingSphere(), + _sphere$1$1.copy(rt.boundingSphere), + _sphere$1$1.applyMatrix4(it), + (_sphere$1$1.radius += ot), + et.ray.intersectsSphere(_sphere$1$1) === !1) + ) + return + _inverseMatrix$1.copy(it).invert(), _ray$1.copy(et.ray).applyMatrix4(_inverseMatrix$1) + const st = ot / ((this.scale.x + this.scale.y + this.scale.z) / 3), + lt = st * st, + ct = new Vector3(), + ut = new Vector3(), + ht = new Vector3(), + dt = new Vector3(), + pt = this.isLineSegments ? 2 : 1, + mt = rt.index, + yt = rt.attributes.position + if (mt !== null) { + const bt = Math.max(0, at.start), + vt = Math.min(mt.count, at.start + at.count) + for (let xt = bt, kt = vt - 1; xt < kt; xt += pt) { + const St = mt.getX(xt), + Tt = mt.getX(xt + 1) + if ( + (ct.fromBufferAttribute(yt, St), + ut.fromBufferAttribute(yt, Tt), + _ray$1.distanceSqToSegment(ct, ut, dt, ht) > lt) + ) + continue + dt.applyMatrix4(this.matrixWorld) + const Et = et.ray.origin.distanceTo(dt) + Et < et.near || + Et > et.far || + nt.push({ + distance: Et, + point: ht.clone().applyMatrix4(this.matrixWorld), + index: xt, + face: null, + faceIndex: null, + object: this, + }) + } + } else { + const bt = Math.max(0, at.start), + vt = Math.min(yt.count, at.start + at.count) + for (let xt = bt, kt = vt - 1; xt < kt; xt += pt) { + if ( + (ct.fromBufferAttribute(yt, xt), + ut.fromBufferAttribute(yt, xt + 1), + _ray$1.distanceSqToSegment(ct, ut, dt, ht) > lt) + ) + continue + dt.applyMatrix4(this.matrixWorld) + const Tt = et.ray.origin.distanceTo(dt) + Tt < et.near || + Tt > et.far || + nt.push({ + distance: Tt, + point: ht.clone().applyMatrix4(this.matrixWorld), + index: xt, + face: null, + faceIndex: null, + object: this, + }) + } + } + } + updateMorphTargets() { + const nt = this.geometry.morphAttributes, + rt = Object.keys(nt) + if (rt.length > 0) { + const it = nt[rt[0]] + if (it !== void 0) { + ;(this.morphTargetInfluences = []), (this.morphTargetDictionary = {}) + for (let ot = 0, at = it.length; ot < at; ot++) { + const st = it[ot].name || String(ot) + this.morphTargetInfluences.push(0), (this.morphTargetDictionary[st] = ot) + } + } + } + } + } + const _start$2 = new Vector3(), + _end$2 = new Vector3() + class LineSegments extends Line$2 { + constructor(et, nt) { + super(et, nt), (this.isLineSegments = !0), (this.type = 'LineSegments') + } + computeLineDistances() { + const et = this.geometry + if (et.index === null) { + const nt = et.attributes.position, + rt = [] + for (let it = 0, ot = nt.count; it < ot; it += 2) + _start$2.fromBufferAttribute(nt, it), + _end$2.fromBufferAttribute(nt, it + 1), + (rt[it] = it === 0 ? 0 : rt[it - 1]), + (rt[it + 1] = rt[it] + _start$2.distanceTo(_end$2)) + et.setAttribute('lineDistance', new Float32BufferAttribute(rt, 1)) + } else + console.warn( + 'THREE.LineSegments.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.', + ) + return this + } + } + class LineLoop extends Line$2 { + constructor(et, nt) { + super(et, nt), (this.isLineLoop = !0), (this.type = 'LineLoop') + } + } + class PointsMaterial extends Material { + constructor(et) { + super(), + (this.isPointsMaterial = !0), + (this.type = 'PointsMaterial'), + (this.color = new Color$1(16777215)), + (this.map = null), + (this.alphaMap = null), + (this.size = 1), + (this.sizeAttenuation = !0), + (this.fog = !0), + this.setValues(et) + } + copy(et) { + return ( + super.copy(et), + this.color.copy(et.color), + (this.map = et.map), + (this.alphaMap = et.alphaMap), + (this.size = et.size), + (this.sizeAttenuation = et.sizeAttenuation), + (this.fog = et.fog), + this + ) + } + } + const _inverseMatrix = new Matrix4(), + _ray$3 = new Ray(), + _sphere$4 = new Sphere(), + _position$2 = new Vector3() + class Points extends Object3D { + constructor(et = new BufferGeometry(), nt = new PointsMaterial()) { + super(), + (this.isPoints = !0), + (this.type = 'Points'), + (this.geometry = et), + (this.material = nt), + this.updateMorphTargets() + } + copy(et, nt) { + return super.copy(et, nt), (this.material = et.material), (this.geometry = et.geometry), this + } + raycast(et, nt) { + const rt = this.geometry, + it = this.matrixWorld, + ot = et.params.Points.threshold, + at = rt.drawRange + if ( + (rt.boundingSphere === null && rt.computeBoundingSphere(), + _sphere$4.copy(rt.boundingSphere), + _sphere$4.applyMatrix4(it), + (_sphere$4.radius += ot), + et.ray.intersectsSphere(_sphere$4) === !1) + ) + return + _inverseMatrix.copy(it).invert(), _ray$3.copy(et.ray).applyMatrix4(_inverseMatrix) + const st = ot / ((this.scale.x + this.scale.y + this.scale.z) / 3), + lt = st * st, + ct = rt.index, + ht = rt.attributes.position + if (ct !== null) { + const dt = Math.max(0, at.start), + pt = Math.min(ct.count, at.start + at.count) + for (let mt = dt, gt = pt; mt < gt; mt++) { + const yt = ct.getX(mt) + _position$2.fromBufferAttribute(ht, yt), testPoint(_position$2, yt, lt, it, et, nt, this) + } + } else { + const dt = Math.max(0, at.start), + pt = Math.min(ht.count, at.start + at.count) + for (let mt = dt, gt = pt; mt < gt; mt++) + _position$2.fromBufferAttribute(ht, mt), testPoint(_position$2, mt, lt, it, et, nt, this) + } + } + updateMorphTargets() { + const nt = this.geometry.morphAttributes, + rt = Object.keys(nt) + if (rt.length > 0) { + const it = nt[rt[0]] + if (it !== void 0) { + ;(this.morphTargetInfluences = []), (this.morphTargetDictionary = {}) + for (let ot = 0, at = it.length; ot < at; ot++) { + const st = it[ot].name || String(ot) + this.morphTargetInfluences.push(0), (this.morphTargetDictionary[st] = ot) + } + } + } + } + } + function testPoint(tt, et, nt, rt, it, ot, at) { + const st = _ray$3.distanceSqToPoint(tt) + if (st < nt) { + const lt = new Vector3() + _ray$3.closestPointToPoint(tt, lt), lt.applyMatrix4(rt) + const ct = it.ray.origin.distanceTo(lt) + if (ct < it.near || ct > it.far) return + ot.push({ distance: ct, distanceToRay: Math.sqrt(st), point: lt, index: et, face: null, object: at }) + } + } + class VideoTexture extends Texture { + constructor(et, nt, rt, it, ot, at, st, lt, ct) { + super(et, nt, rt, it, ot, at, st, lt, ct), + (this.isVideoTexture = !0), + (this.minFilter = at !== void 0 ? at : LinearFilter), + (this.magFilter = ot !== void 0 ? ot : LinearFilter), + (this.generateMipmaps = !1) + const ut = this + function ht() { + ;(ut.needsUpdate = !0), et.requestVideoFrameCallback(ht) + } + 'requestVideoFrameCallback' in et && et.requestVideoFrameCallback(ht) + } + clone() { + return new this.constructor(this.image).copy(this) + } + update() { + const et = this.image + 'requestVideoFrameCallback' in et === !1 && et.readyState >= et.HAVE_CURRENT_DATA && (this.needsUpdate = !0) + } + } + class FramebufferTexture extends Texture { + constructor(et, nt, rt) { + super({ width: et, height: nt }), + (this.isFramebufferTexture = !0), + (this.format = rt), + (this.magFilter = NearestFilter), + (this.minFilter = NearestFilter), + (this.generateMipmaps = !1), + (this.needsUpdate = !0) + } + } + class CompressedTexture extends Texture { + constructor(et, nt, rt, it, ot, at, st, lt, ct, ut, ht, dt) { + super(null, at, st, lt, ct, ut, it, ot, ht, dt), + (this.isCompressedTexture = !0), + (this.image = { width: nt, height: rt }), + (this.mipmaps = et), + (this.flipY = !1), + (this.generateMipmaps = !1) + } + } + class CanvasTexture extends Texture { + constructor(et, nt, rt, it, ot, at, st, lt, ct) { + super(et, nt, rt, it, ot, at, st, lt, ct), (this.isCanvasTexture = !0), (this.needsUpdate = !0) + } + } + let Curve$1 = class { + constructor() { + ;(this.type = 'Curve'), (this.arcLengthDivisions = 200) + } + getPoint() { + return console.warn('THREE.Curve: .getPoint() not implemented.'), null + } + getPointAt(et, nt) { + const rt = this.getUtoTmapping(et) + return this.getPoint(rt, nt) + } + getPoints(et = 5) { + const nt = [] + for (let rt = 0; rt <= et; rt++) nt.push(this.getPoint(rt / et)) + return nt + } + getSpacedPoints(et = 5) { + const nt = [] + for (let rt = 0; rt <= et; rt++) nt.push(this.getPointAt(rt / et)) + return nt + } + getLength() { + const et = this.getLengths() + return et[et.length - 1] + } + getLengths(et = this.arcLengthDivisions) { + if (this.cacheArcLengths && this.cacheArcLengths.length === et + 1 && !this.needsUpdate) + return this.cacheArcLengths + this.needsUpdate = !1 + const nt = [] + let rt, + it = this.getPoint(0), + ot = 0 + nt.push(0) + for (let at = 1; at <= et; at++) (rt = this.getPoint(at / et)), (ot += rt.distanceTo(it)), nt.push(ot), (it = rt) + return (this.cacheArcLengths = nt), nt + } + updateArcLengths() { + ;(this.needsUpdate = !0), this.getLengths() + } + getUtoTmapping(et, nt) { + const rt = this.getLengths() + let it = 0 + const ot = rt.length + let at + nt ? (at = nt) : (at = et * rt[ot - 1]) + let st = 0, + lt = ot - 1, + ct + for (; st <= lt; ) + if (((it = Math.floor(st + (lt - st) / 2)), (ct = rt[it] - at), ct < 0)) st = it + 1 + else if (ct > 0) lt = it - 1 + else { + lt = it + break + } + if (((it = lt), rt[it] === at)) return it / (ot - 1) + const ut = rt[it], + dt = rt[it + 1] - ut, + pt = (at - ut) / dt + return (it + pt) / (ot - 1) + } + getTangent(et, nt) { + let it = et - 1e-4, + ot = et + 1e-4 + it < 0 && (it = 0), ot > 1 && (ot = 1) + const at = this.getPoint(it), + st = this.getPoint(ot), + lt = nt || (at.isVector2 ? new Vector2() : new Vector3()) + return lt.copy(st).sub(at).normalize(), lt + } + getTangentAt(et, nt) { + const rt = this.getUtoTmapping(et) + return this.getTangent(rt, nt) + } + computeFrenetFrames(et, nt) { + const rt = new Vector3(), + it = [], + ot = [], + at = [], + st = new Vector3(), + lt = new Matrix4() + for (let pt = 0; pt <= et; pt++) { + const mt = pt / et + it[pt] = this.getTangentAt(mt, new Vector3()) + } + ;(ot[0] = new Vector3()), (at[0] = new Vector3()) + let ct = Number.MAX_VALUE + const ut = Math.abs(it[0].x), + ht = Math.abs(it[0].y), + dt = Math.abs(it[0].z) + ut <= ct && ((ct = ut), rt.set(1, 0, 0)), + ht <= ct && ((ct = ht), rt.set(0, 1, 0)), + dt <= ct && rt.set(0, 0, 1), + st.crossVectors(it[0], rt).normalize(), + ot[0].crossVectors(it[0], st), + at[0].crossVectors(it[0], ot[0]) + for (let pt = 1; pt <= et; pt++) { + if ( + ((ot[pt] = ot[pt - 1].clone()), + (at[pt] = at[pt - 1].clone()), + st.crossVectors(it[pt - 1], it[pt]), + st.length() > Number.EPSILON) + ) { + st.normalize() + const mt = Math.acos(clamp$5(it[pt - 1].dot(it[pt]), -1, 1)) + ot[pt].applyMatrix4(lt.makeRotationAxis(st, mt)) + } + at[pt].crossVectors(it[pt], ot[pt]) + } + if (nt === !0) { + let pt = Math.acos(clamp$5(ot[0].dot(ot[et]), -1, 1)) + ;(pt /= et), it[0].dot(st.crossVectors(ot[0], ot[et])) > 0 && (pt = -pt) + for (let mt = 1; mt <= et; mt++) + ot[mt].applyMatrix4(lt.makeRotationAxis(it[mt], pt * mt)), at[mt].crossVectors(it[mt], ot[mt]) + } + return { tangents: it, normals: ot, binormals: at } + } + clone() { + return new this.constructor().copy(this) + } + copy(et) { + return (this.arcLengthDivisions = et.arcLengthDivisions), this + } + toJSON() { + const et = { metadata: { version: 4.5, type: 'Curve', generator: 'Curve.toJSON' } } + return (et.arcLengthDivisions = this.arcLengthDivisions), (et.type = this.type), et + } + fromJSON(et) { + return (this.arcLengthDivisions = et.arcLengthDivisions), this + } + } + class EllipseCurve extends Curve$1 { + constructor(et = 0, nt = 0, rt = 1, it = 1, ot = 0, at = Math.PI * 2, st = !1, lt = 0) { + super(), + (this.isEllipseCurve = !0), + (this.type = 'EllipseCurve'), + (this.aX = et), + (this.aY = nt), + (this.xRadius = rt), + (this.yRadius = it), + (this.aStartAngle = ot), + (this.aEndAngle = at), + (this.aClockwise = st), + (this.aRotation = lt) + } + getPoint(et, nt) { + const rt = nt || new Vector2(), + it = Math.PI * 2 + let ot = this.aEndAngle - this.aStartAngle + const at = Math.abs(ot) < Number.EPSILON + for (; ot < 0; ) ot += it + for (; ot > it; ) ot -= it + ot < Number.EPSILON && (at ? (ot = 0) : (ot = it)), + this.aClockwise === !0 && !at && (ot === it ? (ot = -it) : (ot = ot - it)) + const st = this.aStartAngle + et * ot + let lt = this.aX + this.xRadius * Math.cos(st), + ct = this.aY + this.yRadius * Math.sin(st) + if (this.aRotation !== 0) { + const ut = Math.cos(this.aRotation), + ht = Math.sin(this.aRotation), + dt = lt - this.aX, + pt = ct - this.aY + ;(lt = dt * ut - pt * ht + this.aX), (ct = dt * ht + pt * ut + this.aY) + } + return rt.set(lt, ct) + } + copy(et) { + return ( + super.copy(et), + (this.aX = et.aX), + (this.aY = et.aY), + (this.xRadius = et.xRadius), + (this.yRadius = et.yRadius), + (this.aStartAngle = et.aStartAngle), + (this.aEndAngle = et.aEndAngle), + (this.aClockwise = et.aClockwise), + (this.aRotation = et.aRotation), + this + ) + } + toJSON() { + const et = super.toJSON() + return ( + (et.aX = this.aX), + (et.aY = this.aY), + (et.xRadius = this.xRadius), + (et.yRadius = this.yRadius), + (et.aStartAngle = this.aStartAngle), + (et.aEndAngle = this.aEndAngle), + (et.aClockwise = this.aClockwise), + (et.aRotation = this.aRotation), + et + ) + } + fromJSON(et) { + return ( + super.fromJSON(et), + (this.aX = et.aX), + (this.aY = et.aY), + (this.xRadius = et.xRadius), + (this.yRadius = et.yRadius), + (this.aStartAngle = et.aStartAngle), + (this.aEndAngle = et.aEndAngle), + (this.aClockwise = et.aClockwise), + (this.aRotation = et.aRotation), + this + ) + } + } + class ArcCurve extends EllipseCurve { + constructor(et, nt, rt, it, ot, at) { + super(et, nt, rt, rt, it, ot, at), (this.isArcCurve = !0), (this.type = 'ArcCurve') + } + } + function CubicPoly() { + let tt = 0, + et = 0, + nt = 0, + rt = 0 + function it(ot, at, st, lt) { + ;(tt = ot), (et = st), (nt = -3 * ot + 3 * at - 2 * st - lt), (rt = 2 * ot - 2 * at + st + lt) + } + return { + initCatmullRom: function (ot, at, st, lt, ct) { + it(at, st, ct * (st - ot), ct * (lt - at)) + }, + initNonuniformCatmullRom: function (ot, at, st, lt, ct, ut, ht) { + let dt = (at - ot) / ct - (st - ot) / (ct + ut) + (st - at) / ut, + pt = (st - at) / ut - (lt - at) / (ut + ht) + (lt - st) / ht + ;(dt *= ut), (pt *= ut), it(at, st, dt, pt) + }, + calc: function (ot) { + const at = ot * ot, + st = at * ot + return tt + et * ot + nt * at + rt * st + }, + } + } + const tmp = new Vector3(), + px = new CubicPoly(), + py = new CubicPoly(), + pz = new CubicPoly() + class CatmullRomCurve3 extends Curve$1 { + constructor(et = [], nt = !1, rt = 'centripetal', it = 0.5) { + super(), + (this.isCatmullRomCurve3 = !0), + (this.type = 'CatmullRomCurve3'), + (this.points = et), + (this.closed = nt), + (this.curveType = rt), + (this.tension = it) + } + getPoint(et, nt = new Vector3()) { + const rt = nt, + it = this.points, + ot = it.length, + at = (ot - (this.closed ? 0 : 1)) * et + let st = Math.floor(at), + lt = at - st + this.closed + ? (st += st > 0 ? 0 : (Math.floor(Math.abs(st) / ot) + 1) * ot) + : lt === 0 && st === ot - 1 && ((st = ot - 2), (lt = 1)) + let ct, ut + this.closed || st > 0 ? (ct = it[(st - 1) % ot]) : (tmp.subVectors(it[0], it[1]).add(it[0]), (ct = tmp)) + const ht = it[st % ot], + dt = it[(st + 1) % ot] + if ( + (this.closed || st + 2 < ot + ? (ut = it[(st + 2) % ot]) + : (tmp.subVectors(it[ot - 1], it[ot - 2]).add(it[ot - 1]), (ut = tmp)), + this.curveType === 'centripetal' || this.curveType === 'chordal') + ) { + const pt = this.curveType === 'chordal' ? 0.5 : 0.25 + let mt = Math.pow(ct.distanceToSquared(ht), pt), + gt = Math.pow(ht.distanceToSquared(dt), pt), + yt = Math.pow(dt.distanceToSquared(ut), pt) + gt < 1e-4 && (gt = 1), + mt < 1e-4 && (mt = gt), + yt < 1e-4 && (yt = gt), + px.initNonuniformCatmullRom(ct.x, ht.x, dt.x, ut.x, mt, gt, yt), + py.initNonuniformCatmullRom(ct.y, ht.y, dt.y, ut.y, mt, gt, yt), + pz.initNonuniformCatmullRom(ct.z, ht.z, dt.z, ut.z, mt, gt, yt) + } else + this.curveType === 'catmullrom' && + (px.initCatmullRom(ct.x, ht.x, dt.x, ut.x, this.tension), + py.initCatmullRom(ct.y, ht.y, dt.y, ut.y, this.tension), + pz.initCatmullRom(ct.z, ht.z, dt.z, ut.z, this.tension)) + return rt.set(px.calc(lt), py.calc(lt), pz.calc(lt)), rt + } + copy(et) { + super.copy(et), (this.points = []) + for (let nt = 0, rt = et.points.length; nt < rt; nt++) { + const it = et.points[nt] + this.points.push(it.clone()) + } + return (this.closed = et.closed), (this.curveType = et.curveType), (this.tension = et.tension), this + } + toJSON() { + const et = super.toJSON() + et.points = [] + for (let nt = 0, rt = this.points.length; nt < rt; nt++) { + const it = this.points[nt] + et.points.push(it.toArray()) + } + return (et.closed = this.closed), (et.curveType = this.curveType), (et.tension = this.tension), et + } + fromJSON(et) { + super.fromJSON(et), (this.points = []) + for (let nt = 0, rt = et.points.length; nt < rt; nt++) { + const it = et.points[nt] + this.points.push(new Vector3().fromArray(it)) + } + return (this.closed = et.closed), (this.curveType = et.curveType), (this.tension = et.tension), this + } + } + function CatmullRom(tt, et, nt, rt, it) { + const ot = (rt - et) * 0.5, + at = (it - nt) * 0.5, + st = tt * tt, + lt = tt * st + return (2 * nt - 2 * rt + ot + at) * lt + (-3 * nt + 3 * rt - 2 * ot - at) * st + ot * tt + nt + } + function QuadraticBezierP0(tt, et) { + const nt = 1 - tt + return nt * nt * et + } + function QuadraticBezierP1(tt, et) { + return 2 * (1 - tt) * tt * et + } + function QuadraticBezierP2(tt, et) { + return tt * tt * et + } + function QuadraticBezier(tt, et, nt, rt) { + return QuadraticBezierP0(tt, et) + QuadraticBezierP1(tt, nt) + QuadraticBezierP2(tt, rt) + } + function CubicBezierP0(tt, et) { + const nt = 1 - tt + return nt * nt * nt * et + } + function CubicBezierP1(tt, et) { + const nt = 1 - tt + return 3 * nt * nt * tt * et + } + function CubicBezierP2(tt, et) { + return 3 * (1 - tt) * tt * tt * et + } + function CubicBezierP3(tt, et) { + return tt * tt * tt * et + } + function CubicBezier(tt, et, nt, rt, it) { + return CubicBezierP0(tt, et) + CubicBezierP1(tt, nt) + CubicBezierP2(tt, rt) + CubicBezierP3(tt, it) + } + class CubicBezierCurve extends Curve$1 { + constructor(et = new Vector2(), nt = new Vector2(), rt = new Vector2(), it = new Vector2()) { + super(), + (this.isCubicBezierCurve = !0), + (this.type = 'CubicBezierCurve'), + (this.v0 = et), + (this.v1 = nt), + (this.v2 = rt), + (this.v3 = it) + } + getPoint(et, nt = new Vector2()) { + const rt = nt, + it = this.v0, + ot = this.v1, + at = this.v2, + st = this.v3 + return rt.set(CubicBezier(et, it.x, ot.x, at.x, st.x), CubicBezier(et, it.y, ot.y, at.y, st.y)), rt + } + copy(et) { + return super.copy(et), this.v0.copy(et.v0), this.v1.copy(et.v1), this.v2.copy(et.v2), this.v3.copy(et.v3), this + } + toJSON() { + const et = super.toJSON() + return ( + (et.v0 = this.v0.toArray()), + (et.v1 = this.v1.toArray()), + (et.v2 = this.v2.toArray()), + (et.v3 = this.v3.toArray()), + et + ) + } + fromJSON(et) { + return ( + super.fromJSON(et), + this.v0.fromArray(et.v0), + this.v1.fromArray(et.v1), + this.v2.fromArray(et.v2), + this.v3.fromArray(et.v3), + this + ) + } + } + class CubicBezierCurve3 extends Curve$1 { + constructor(et = new Vector3(), nt = new Vector3(), rt = new Vector3(), it = new Vector3()) { + super(), + (this.isCubicBezierCurve3 = !0), + (this.type = 'CubicBezierCurve3'), + (this.v0 = et), + (this.v1 = nt), + (this.v2 = rt), + (this.v3 = it) + } + getPoint(et, nt = new Vector3()) { + const rt = nt, + it = this.v0, + ot = this.v1, + at = this.v2, + st = this.v3 + return ( + rt.set( + CubicBezier(et, it.x, ot.x, at.x, st.x), + CubicBezier(et, it.y, ot.y, at.y, st.y), + CubicBezier(et, it.z, ot.z, at.z, st.z), + ), + rt + ) + } + copy(et) { + return super.copy(et), this.v0.copy(et.v0), this.v1.copy(et.v1), this.v2.copy(et.v2), this.v3.copy(et.v3), this + } + toJSON() { + const et = super.toJSON() + return ( + (et.v0 = this.v0.toArray()), + (et.v1 = this.v1.toArray()), + (et.v2 = this.v2.toArray()), + (et.v3 = this.v3.toArray()), + et + ) + } + fromJSON(et) { + return ( + super.fromJSON(et), + this.v0.fromArray(et.v0), + this.v1.fromArray(et.v1), + this.v2.fromArray(et.v2), + this.v3.fromArray(et.v3), + this + ) + } + } + class LineCurve extends Curve$1 { + constructor(et = new Vector2(), nt = new Vector2()) { + super(), (this.isLineCurve = !0), (this.type = 'LineCurve'), (this.v1 = et), (this.v2 = nt) + } + getPoint(et, nt = new Vector2()) { + const rt = nt + return et === 1 ? rt.copy(this.v2) : (rt.copy(this.v2).sub(this.v1), rt.multiplyScalar(et).add(this.v1)), rt + } + getPointAt(et, nt) { + return this.getPoint(et, nt) + } + getTangent(et, nt) { + const rt = nt || new Vector2() + return rt.copy(this.v2).sub(this.v1).normalize(), rt + } + copy(et) { + return super.copy(et), this.v1.copy(et.v1), this.v2.copy(et.v2), this + } + toJSON() { + const et = super.toJSON() + return (et.v1 = this.v1.toArray()), (et.v2 = this.v2.toArray()), et + } + fromJSON(et) { + return super.fromJSON(et), this.v1.fromArray(et.v1), this.v2.fromArray(et.v2), this + } + } + class LineCurve3 extends Curve$1 { + constructor(et = new Vector3(), nt = new Vector3()) { + super(), (this.isLineCurve3 = !0), (this.type = 'LineCurve3'), (this.v1 = et), (this.v2 = nt) + } + getPoint(et, nt = new Vector3()) { + const rt = nt + return et === 1 ? rt.copy(this.v2) : (rt.copy(this.v2).sub(this.v1), rt.multiplyScalar(et).add(this.v1)), rt + } + getPointAt(et, nt) { + return this.getPoint(et, nt) + } + copy(et) { + return super.copy(et), this.v1.copy(et.v1), this.v2.copy(et.v2), this + } + toJSON() { + const et = super.toJSON() + return (et.v1 = this.v1.toArray()), (et.v2 = this.v2.toArray()), et + } + fromJSON(et) { + return super.fromJSON(et), this.v1.fromArray(et.v1), this.v2.fromArray(et.v2), this + } + } + class QuadraticBezierCurve extends Curve$1 { + constructor(et = new Vector2(), nt = new Vector2(), rt = new Vector2()) { + super(), + (this.isQuadraticBezierCurve = !0), + (this.type = 'QuadraticBezierCurve'), + (this.v0 = et), + (this.v1 = nt), + (this.v2 = rt) + } + getPoint(et, nt = new Vector2()) { + const rt = nt, + it = this.v0, + ot = this.v1, + at = this.v2 + return rt.set(QuadraticBezier(et, it.x, ot.x, at.x), QuadraticBezier(et, it.y, ot.y, at.y)), rt + } + copy(et) { + return super.copy(et), this.v0.copy(et.v0), this.v1.copy(et.v1), this.v2.copy(et.v2), this + } + toJSON() { + const et = super.toJSON() + return (et.v0 = this.v0.toArray()), (et.v1 = this.v1.toArray()), (et.v2 = this.v2.toArray()), et + } + fromJSON(et) { + return super.fromJSON(et), this.v0.fromArray(et.v0), this.v1.fromArray(et.v1), this.v2.fromArray(et.v2), this + } + } + class QuadraticBezierCurve3 extends Curve$1 { + constructor(et = new Vector3(), nt = new Vector3(), rt = new Vector3()) { + super(), + (this.isQuadraticBezierCurve3 = !0), + (this.type = 'QuadraticBezierCurve3'), + (this.v0 = et), + (this.v1 = nt), + (this.v2 = rt) + } + getPoint(et, nt = new Vector3()) { + const rt = nt, + it = this.v0, + ot = this.v1, + at = this.v2 + return ( + rt.set( + QuadraticBezier(et, it.x, ot.x, at.x), + QuadraticBezier(et, it.y, ot.y, at.y), + QuadraticBezier(et, it.z, ot.z, at.z), + ), + rt + ) + } + copy(et) { + return super.copy(et), this.v0.copy(et.v0), this.v1.copy(et.v1), this.v2.copy(et.v2), this + } + toJSON() { + const et = super.toJSON() + return (et.v0 = this.v0.toArray()), (et.v1 = this.v1.toArray()), (et.v2 = this.v2.toArray()), et + } + fromJSON(et) { + return super.fromJSON(et), this.v0.fromArray(et.v0), this.v1.fromArray(et.v1), this.v2.fromArray(et.v2), this + } + } + class SplineCurve extends Curve$1 { + constructor(et = []) { + super(), (this.isSplineCurve = !0), (this.type = 'SplineCurve'), (this.points = et) + } + getPoint(et, nt = new Vector2()) { + const rt = nt, + it = this.points, + ot = (it.length - 1) * et, + at = Math.floor(ot), + st = ot - at, + lt = it[at === 0 ? at : at - 1], + ct = it[at], + ut = it[at > it.length - 2 ? it.length - 1 : at + 1], + ht = it[at > it.length - 3 ? it.length - 1 : at + 2] + return rt.set(CatmullRom(st, lt.x, ct.x, ut.x, ht.x), CatmullRom(st, lt.y, ct.y, ut.y, ht.y)), rt + } + copy(et) { + super.copy(et), (this.points = []) + for (let nt = 0, rt = et.points.length; nt < rt; nt++) { + const it = et.points[nt] + this.points.push(it.clone()) + } + return this + } + toJSON() { + const et = super.toJSON() + et.points = [] + for (let nt = 0, rt = this.points.length; nt < rt; nt++) { + const it = this.points[nt] + et.points.push(it.toArray()) + } + return et + } + fromJSON(et) { + super.fromJSON(et), (this.points = []) + for (let nt = 0, rt = et.points.length; nt < rt; nt++) { + const it = et.points[nt] + this.points.push(new Vector2().fromArray(it)) + } + return this + } + } + var Curves = Object.freeze({ + __proto__: null, + ArcCurve, + CatmullRomCurve3, + CubicBezierCurve, + CubicBezierCurve3, + EllipseCurve, + LineCurve, + LineCurve3, + QuadraticBezierCurve, + QuadraticBezierCurve3, + SplineCurve, + }) + class CurvePath extends Curve$1 { + constructor() { + super(), (this.type = 'CurvePath'), (this.curves = []), (this.autoClose = !1) + } + add(et) { + this.curves.push(et) + } + closePath() { + const et = this.curves[0].getPoint(0), + nt = this.curves[this.curves.length - 1].getPoint(1) + et.equals(nt) || this.curves.push(new LineCurve(nt, et)) + } + getPoint(et, nt) { + const rt = et * this.getLength(), + it = this.getCurveLengths() + let ot = 0 + for (; ot < it.length; ) { + if (it[ot] >= rt) { + const at = it[ot] - rt, + st = this.curves[ot], + lt = st.getLength(), + ct = lt === 0 ? 0 : 1 - at / lt + return st.getPointAt(ct, nt) + } + ot++ + } + return null + } + getLength() { + const et = this.getCurveLengths() + return et[et.length - 1] + } + updateArcLengths() { + ;(this.needsUpdate = !0), (this.cacheLengths = null), this.getCurveLengths() + } + getCurveLengths() { + if (this.cacheLengths && this.cacheLengths.length === this.curves.length) return this.cacheLengths + const et = [] + let nt = 0 + for (let rt = 0, it = this.curves.length; rt < it; rt++) (nt += this.curves[rt].getLength()), et.push(nt) + return (this.cacheLengths = et), et + } + getSpacedPoints(et = 40) { + const nt = [] + for (let rt = 0; rt <= et; rt++) nt.push(this.getPoint(rt / et)) + return this.autoClose && nt.push(nt[0]), nt + } + getPoints(et = 12) { + const nt = [] + let rt + for (let it = 0, ot = this.curves; it < ot.length; it++) { + const at = ot[it], + st = at.isEllipseCurve + ? et * 2 + : at.isLineCurve || at.isLineCurve3 + ? 1 + : at.isSplineCurve + ? et * at.points.length + : et, + lt = at.getPoints(st) + for (let ct = 0; ct < lt.length; ct++) { + const ut = lt[ct] + ;(rt && rt.equals(ut)) || (nt.push(ut), (rt = ut)) + } + } + return this.autoClose && nt.length > 1 && !nt[nt.length - 1].equals(nt[0]) && nt.push(nt[0]), nt + } + copy(et) { + super.copy(et), (this.curves = []) + for (let nt = 0, rt = et.curves.length; nt < rt; nt++) { + const it = et.curves[nt] + this.curves.push(it.clone()) + } + return (this.autoClose = et.autoClose), this + } + toJSON() { + const et = super.toJSON() + ;(et.autoClose = this.autoClose), (et.curves = []) + for (let nt = 0, rt = this.curves.length; nt < rt; nt++) { + const it = this.curves[nt] + et.curves.push(it.toJSON()) + } + return et + } + fromJSON(et) { + super.fromJSON(et), (this.autoClose = et.autoClose), (this.curves = []) + for (let nt = 0, rt = et.curves.length; nt < rt; nt++) { + const it = et.curves[nt] + this.curves.push(new Curves[it.type]().fromJSON(it)) + } + return this + } + } + let Path$1 = class extends CurvePath { + constructor(et) { + super(), (this.type = 'Path'), (this.currentPoint = new Vector2()), et && this.setFromPoints(et) + } + setFromPoints(et) { + this.moveTo(et[0].x, et[0].y) + for (let nt = 1, rt = et.length; nt < rt; nt++) this.lineTo(et[nt].x, et[nt].y) + return this + } + moveTo(et, nt) { + return this.currentPoint.set(et, nt), this + } + lineTo(et, nt) { + const rt = new LineCurve(this.currentPoint.clone(), new Vector2(et, nt)) + return this.curves.push(rt), this.currentPoint.set(et, nt), this + } + quadraticCurveTo(et, nt, rt, it) { + const ot = new QuadraticBezierCurve(this.currentPoint.clone(), new Vector2(et, nt), new Vector2(rt, it)) + return this.curves.push(ot), this.currentPoint.set(rt, it), this + } + bezierCurveTo(et, nt, rt, it, ot, at) { + const st = new CubicBezierCurve( + this.currentPoint.clone(), + new Vector2(et, nt), + new Vector2(rt, it), + new Vector2(ot, at), + ) + return this.curves.push(st), this.currentPoint.set(ot, at), this + } + splineThru(et) { + const nt = [this.currentPoint.clone()].concat(et), + rt = new SplineCurve(nt) + return this.curves.push(rt), this.currentPoint.copy(et[et.length - 1]), this + } + arc(et, nt, rt, it, ot, at) { + const st = this.currentPoint.x, + lt = this.currentPoint.y + return this.absarc(et + st, nt + lt, rt, it, ot, at), this + } + absarc(et, nt, rt, it, ot, at) { + return this.absellipse(et, nt, rt, rt, it, ot, at), this + } + ellipse(et, nt, rt, it, ot, at, st, lt) { + const ct = this.currentPoint.x, + ut = this.currentPoint.y + return this.absellipse(et + ct, nt + ut, rt, it, ot, at, st, lt), this + } + absellipse(et, nt, rt, it, ot, at, st, lt) { + const ct = new EllipseCurve(et, nt, rt, it, ot, at, st, lt) + if (this.curves.length > 0) { + const ht = ct.getPoint(0) + ht.equals(this.currentPoint) || this.lineTo(ht.x, ht.y) + } + this.curves.push(ct) + const ut = ct.getPoint(1) + return this.currentPoint.copy(ut), this + } + copy(et) { + return super.copy(et), this.currentPoint.copy(et.currentPoint), this + } + toJSON() { + const et = super.toJSON() + return (et.currentPoint = this.currentPoint.toArray()), et + } + fromJSON(et) { + return super.fromJSON(et), this.currentPoint.fromArray(et.currentPoint), this + } + } + class LatheGeometry extends BufferGeometry { + constructor( + et = [new Vector2(0, -0.5), new Vector2(0.5, 0), new Vector2(0, 0.5)], + nt = 12, + rt = 0, + it = Math.PI * 2, + ) { + super(), + (this.type = 'LatheGeometry'), + (this.parameters = { points: et, segments: nt, phiStart: rt, phiLength: it }), + (nt = Math.floor(nt)), + (it = clamp$5(it, 0, Math.PI * 2)) + const ot = [], + at = [], + st = [], + lt = [], + ct = [], + ut = 1 / nt, + ht = new Vector3(), + dt = new Vector2(), + pt = new Vector3(), + mt = new Vector3(), + gt = new Vector3() + let yt = 0, + bt = 0 + for (let vt = 0; vt <= et.length - 1; vt++) + switch (vt) { + case 0: + ;(yt = et[vt + 1].x - et[vt].x), + (bt = et[vt + 1].y - et[vt].y), + (pt.x = bt * 1), + (pt.y = -yt), + (pt.z = bt * 0), + gt.copy(pt), + pt.normalize(), + lt.push(pt.x, pt.y, pt.z) + break + case et.length - 1: + lt.push(gt.x, gt.y, gt.z) + break + default: + ;(yt = et[vt + 1].x - et[vt].x), + (bt = et[vt + 1].y - et[vt].y), + (pt.x = bt * 1), + (pt.y = -yt), + (pt.z = bt * 0), + mt.copy(pt), + (pt.x += gt.x), + (pt.y += gt.y), + (pt.z += gt.z), + pt.normalize(), + lt.push(pt.x, pt.y, pt.z), + gt.copy(mt) + } + for (let vt = 0; vt <= nt; vt++) { + const xt = rt + vt * ut * it, + kt = Math.sin(xt), + St = Math.cos(xt) + for (let Tt = 0; Tt <= et.length - 1; Tt++) { + ;(ht.x = et[Tt].x * kt), + (ht.y = et[Tt].y), + (ht.z = et[Tt].x * St), + at.push(ht.x, ht.y, ht.z), + (dt.x = vt / nt), + (dt.y = Tt / (et.length - 1)), + st.push(dt.x, dt.y) + const At = lt[3 * Tt + 0] * kt, + Et = lt[3 * Tt + 1], + $t = lt[3 * Tt + 0] * St + ct.push(At, Et, $t) + } + } + for (let vt = 0; vt < nt; vt++) + for (let xt = 0; xt < et.length - 1; xt++) { + const kt = xt + vt * et.length, + St = kt, + Tt = kt + et.length, + At = kt + et.length + 1, + Et = kt + 1 + ot.push(St, Tt, Et), ot.push(At, Et, Tt) + } + this.setIndex(ot), + this.setAttribute('position', new Float32BufferAttribute(at, 3)), + this.setAttribute('uv', new Float32BufferAttribute(st, 2)), + this.setAttribute('normal', new Float32BufferAttribute(ct, 3)) + } + static fromJSON(et) { + return new LatheGeometry(et.points, et.segments, et.phiStart, et.phiLength) + } + } + class CapsuleGeometry extends LatheGeometry { + constructor(et = 1, nt = 1, rt = 4, it = 8) { + const ot = new Path$1() + ot.absarc(0, -nt / 2, et, Math.PI * 1.5, 0), + ot.absarc(0, nt / 2, et, 0, Math.PI * 0.5), + super(ot.getPoints(rt), it), + (this.type = 'CapsuleGeometry'), + (this.parameters = { radius: et, height: nt, capSegments: rt, radialSegments: it }) + } + static fromJSON(et) { + return new CapsuleGeometry(et.radius, et.length, et.capSegments, et.radialSegments) + } + } + class CircleGeometry extends BufferGeometry { + constructor(et = 1, nt = 8, rt = 0, it = Math.PI * 2) { + super(), + (this.type = 'CircleGeometry'), + (this.parameters = { radius: et, segments: nt, thetaStart: rt, thetaLength: it }), + (nt = Math.max(3, nt)) + const ot = [], + at = [], + st = [], + lt = [], + ct = new Vector3(), + ut = new Vector2() + at.push(0, 0, 0), st.push(0, 0, 1), lt.push(0.5, 0.5) + for (let ht = 0, dt = 3; ht <= nt; ht++, dt += 3) { + const pt = rt + (ht / nt) * it + ;(ct.x = et * Math.cos(pt)), + (ct.y = et * Math.sin(pt)), + at.push(ct.x, ct.y, ct.z), + st.push(0, 0, 1), + (ut.x = (at[dt] / et + 1) / 2), + (ut.y = (at[dt + 1] / et + 1) / 2), + lt.push(ut.x, ut.y) + } + for (let ht = 1; ht <= nt; ht++) ot.push(ht, ht + 1, 0) + this.setIndex(ot), + this.setAttribute('position', new Float32BufferAttribute(at, 3)), + this.setAttribute('normal', new Float32BufferAttribute(st, 3)), + this.setAttribute('uv', new Float32BufferAttribute(lt, 2)) + } + static fromJSON(et) { + return new CircleGeometry(et.radius, et.segments, et.thetaStart, et.thetaLength) + } + } + class CylinderGeometry extends BufferGeometry { + constructor(et = 1, nt = 1, rt = 1, it = 8, ot = 1, at = !1, st = 0, lt = Math.PI * 2) { + super(), + (this.type = 'CylinderGeometry'), + (this.parameters = { + radiusTop: et, + radiusBottom: nt, + height: rt, + radialSegments: it, + heightSegments: ot, + openEnded: at, + thetaStart: st, + thetaLength: lt, + }) + const ct = this + ;(it = Math.floor(it)), (ot = Math.floor(ot)) + const ut = [], + ht = [], + dt = [], + pt = [] + let mt = 0 + const gt = [], + yt = rt / 2 + let bt = 0 + vt(), + at === !1 && (et > 0 && xt(!0), nt > 0 && xt(!1)), + this.setIndex(ut), + this.setAttribute('position', new Float32BufferAttribute(ht, 3)), + this.setAttribute('normal', new Float32BufferAttribute(dt, 3)), + this.setAttribute('uv', new Float32BufferAttribute(pt, 2)) + function vt() { + const kt = new Vector3(), + St = new Vector3() + let Tt = 0 + const At = (nt - et) / rt + for (let Et = 0; Et <= ot; Et++) { + const $t = [], + Dt = Et / ot, + jt = Dt * (nt - et) + et + for (let Pt = 0; Pt <= it; Pt++) { + const Ct = Pt / it, + wt = Ct * lt + st, + It = Math.sin(wt), + Ot = Math.cos(wt) + ;(St.x = jt * It), + (St.y = -Dt * rt + yt), + (St.z = jt * Ot), + ht.push(St.x, St.y, St.z), + kt.set(It, At, Ot).normalize(), + dt.push(kt.x, kt.y, kt.z), + pt.push(Ct, 1 - Dt), + $t.push(mt++) + } + gt.push($t) + } + for (let Et = 0; Et < it; Et++) + for (let $t = 0; $t < ot; $t++) { + const Dt = gt[$t][Et], + jt = gt[$t + 1][Et], + Pt = gt[$t + 1][Et + 1], + Ct = gt[$t][Et + 1] + ut.push(Dt, jt, Ct), ut.push(jt, Pt, Ct), (Tt += 6) + } + ct.addGroup(bt, Tt, 0), (bt += Tt) + } + function xt(kt) { + const St = mt, + Tt = new Vector2(), + At = new Vector3() + let Et = 0 + const $t = kt === !0 ? et : nt, + Dt = kt === !0 ? 1 : -1 + for (let Pt = 1; Pt <= it; Pt++) ht.push(0, yt * Dt, 0), dt.push(0, Dt, 0), pt.push(0.5, 0.5), mt++ + const jt = mt + for (let Pt = 0; Pt <= it; Pt++) { + const wt = (Pt / it) * lt + st, + It = Math.cos(wt), + Ot = Math.sin(wt) + ;(At.x = $t * Ot), + (At.y = yt * Dt), + (At.z = $t * It), + ht.push(At.x, At.y, At.z), + dt.push(0, Dt, 0), + (Tt.x = It * 0.5 + 0.5), + (Tt.y = Ot * 0.5 * Dt + 0.5), + pt.push(Tt.x, Tt.y), + mt++ + } + for (let Pt = 0; Pt < it; Pt++) { + const Ct = St + Pt, + wt = jt + Pt + kt === !0 ? ut.push(wt, wt + 1, Ct) : ut.push(wt + 1, wt, Ct), (Et += 3) + } + ct.addGroup(bt, Et, kt === !0 ? 1 : 2), (bt += Et) + } + } + static fromJSON(et) { + return new CylinderGeometry( + et.radiusTop, + et.radiusBottom, + et.height, + et.radialSegments, + et.heightSegments, + et.openEnded, + et.thetaStart, + et.thetaLength, + ) + } + } + class ConeGeometry extends CylinderGeometry { + constructor(et = 1, nt = 1, rt = 8, it = 1, ot = !1, at = 0, st = Math.PI * 2) { + super(0, et, nt, rt, it, ot, at, st), + (this.type = 'ConeGeometry'), + (this.parameters = { + radius: et, + height: nt, + radialSegments: rt, + heightSegments: it, + openEnded: ot, + thetaStart: at, + thetaLength: st, + }) + } + static fromJSON(et) { + return new ConeGeometry( + et.radius, + et.height, + et.radialSegments, + et.heightSegments, + et.openEnded, + et.thetaStart, + et.thetaLength, + ) + } + } + class PolyhedronGeometry extends BufferGeometry { + constructor(et = [], nt = [], rt = 1, it = 0) { + super(), + (this.type = 'PolyhedronGeometry'), + (this.parameters = { vertices: et, indices: nt, radius: rt, detail: it }) + const ot = [], + at = [] + st(it), + ct(rt), + ut(), + this.setAttribute('position', new Float32BufferAttribute(ot, 3)), + this.setAttribute('normal', new Float32BufferAttribute(ot.slice(), 3)), + this.setAttribute('uv', new Float32BufferAttribute(at, 2)), + it === 0 ? this.computeVertexNormals() : this.normalizeNormals() + function st(vt) { + const xt = new Vector3(), + kt = new Vector3(), + St = new Vector3() + for (let Tt = 0; Tt < nt.length; Tt += 3) + pt(nt[Tt + 0], xt), pt(nt[Tt + 1], kt), pt(nt[Tt + 2], St), lt(xt, kt, St, vt) + } + function lt(vt, xt, kt, St) { + const Tt = St + 1, + At = [] + for (let Et = 0; Et <= Tt; Et++) { + At[Et] = [] + const $t = vt.clone().lerp(kt, Et / Tt), + Dt = xt.clone().lerp(kt, Et / Tt), + jt = Tt - Et + for (let Pt = 0; Pt <= jt; Pt++) + Pt === 0 && Et === Tt ? (At[Et][Pt] = $t) : (At[Et][Pt] = $t.clone().lerp(Dt, Pt / jt)) + } + for (let Et = 0; Et < Tt; Et++) + for (let $t = 0; $t < 2 * (Tt - Et) - 1; $t++) { + const Dt = Math.floor($t / 2) + $t % 2 === 0 + ? (dt(At[Et][Dt + 1]), dt(At[Et + 1][Dt]), dt(At[Et][Dt])) + : (dt(At[Et][Dt + 1]), dt(At[Et + 1][Dt + 1]), dt(At[Et + 1][Dt])) + } + } + function ct(vt) { + const xt = new Vector3() + for (let kt = 0; kt < ot.length; kt += 3) + (xt.x = ot[kt + 0]), + (xt.y = ot[kt + 1]), + (xt.z = ot[kt + 2]), + xt.normalize().multiplyScalar(vt), + (ot[kt + 0] = xt.x), + (ot[kt + 1] = xt.y), + (ot[kt + 2] = xt.z) + } + function ut() { + const vt = new Vector3() + for (let xt = 0; xt < ot.length; xt += 3) { + ;(vt.x = ot[xt + 0]), (vt.y = ot[xt + 1]), (vt.z = ot[xt + 2]) + const kt = yt(vt) / 2 / Math.PI + 0.5, + St = bt(vt) / Math.PI + 0.5 + at.push(kt, 1 - St) + } + mt(), ht() + } + function ht() { + for (let vt = 0; vt < at.length; vt += 6) { + const xt = at[vt + 0], + kt = at[vt + 2], + St = at[vt + 4], + Tt = Math.max(xt, kt, St), + At = Math.min(xt, kt, St) + Tt > 0.9 && + At < 0.1 && + (xt < 0.2 && (at[vt + 0] += 1), kt < 0.2 && (at[vt + 2] += 1), St < 0.2 && (at[vt + 4] += 1)) + } + } + function dt(vt) { + ot.push(vt.x, vt.y, vt.z) + } + function pt(vt, xt) { + const kt = vt * 3 + ;(xt.x = et[kt + 0]), (xt.y = et[kt + 1]), (xt.z = et[kt + 2]) + } + function mt() { + const vt = new Vector3(), + xt = new Vector3(), + kt = new Vector3(), + St = new Vector3(), + Tt = new Vector2(), + At = new Vector2(), + Et = new Vector2() + for (let $t = 0, Dt = 0; $t < ot.length; $t += 9, Dt += 6) { + vt.set(ot[$t + 0], ot[$t + 1], ot[$t + 2]), + xt.set(ot[$t + 3], ot[$t + 4], ot[$t + 5]), + kt.set(ot[$t + 6], ot[$t + 7], ot[$t + 8]), + Tt.set(at[Dt + 0], at[Dt + 1]), + At.set(at[Dt + 2], at[Dt + 3]), + Et.set(at[Dt + 4], at[Dt + 5]), + St.copy(vt).add(xt).add(kt).divideScalar(3) + const jt = yt(St) + gt(Tt, Dt + 0, vt, jt), gt(At, Dt + 2, xt, jt), gt(Et, Dt + 4, kt, jt) + } + } + function gt(vt, xt, kt, St) { + St < 0 && vt.x === 1 && (at[xt] = vt.x - 1), kt.x === 0 && kt.z === 0 && (at[xt] = St / 2 / Math.PI + 0.5) + } + function yt(vt) { + return Math.atan2(vt.z, -vt.x) + } + function bt(vt) { + return Math.atan2(-vt.y, Math.sqrt(vt.x * vt.x + vt.z * vt.z)) + } + } + static fromJSON(et) { + return new PolyhedronGeometry(et.vertices, et.indices, et.radius, et.details) + } + } + class DodecahedronGeometry extends PolyhedronGeometry { + constructor(et = 1, nt = 0) { + const rt = (1 + Math.sqrt(5)) / 2, + it = 1 / rt, + ot = [ + -1, + -1, + -1, + -1, + -1, + 1, + -1, + 1, + -1, + -1, + 1, + 1, + 1, + -1, + -1, + 1, + -1, + 1, + 1, + 1, + -1, + 1, + 1, + 1, + 0, + -it, + -rt, + 0, + -it, + rt, + 0, + it, + -rt, + 0, + it, + rt, + -it, + -rt, + 0, + -it, + rt, + 0, + it, + -rt, + 0, + it, + rt, + 0, + -rt, + 0, + -it, + rt, + 0, + -it, + -rt, + 0, + it, + rt, + 0, + it, + ], + at = [ + 3, 11, 7, 3, 7, 15, 3, 15, 13, 7, 19, 17, 7, 17, 6, 7, 6, 15, 17, 4, 8, 17, 8, 10, 17, 10, 6, 8, 0, 16, 8, 16, + 2, 8, 2, 10, 0, 12, 1, 0, 1, 18, 0, 18, 16, 6, 10, 2, 6, 2, 13, 6, 13, 15, 2, 16, 18, 2, 18, 3, 2, 3, 13, 18, + 1, 9, 18, 9, 11, 18, 11, 3, 4, 14, 12, 4, 12, 0, 4, 0, 8, 11, 9, 5, 11, 5, 19, 11, 19, 7, 19, 5, 14, 19, 14, + 4, 19, 4, 17, 1, 12, 14, 1, 14, 5, 1, 5, 9, + ] + super(ot, at, et, nt), (this.type = 'DodecahedronGeometry'), (this.parameters = { radius: et, detail: nt }) + } + static fromJSON(et) { + return new DodecahedronGeometry(et.radius, et.detail) + } + } + const _v0 = new Vector3(), + _v1$1 = new Vector3(), + _normal = new Vector3(), + _triangle = new Triangle() + class EdgesGeometry extends BufferGeometry { + constructor(et = null, nt = 1) { + if ( + (super(), (this.type = 'EdgesGeometry'), (this.parameters = { geometry: et, thresholdAngle: nt }), et !== null) + ) { + const it = Math.pow(10, 4), + ot = Math.cos(DEG2RAD$1 * nt), + at = et.getIndex(), + st = et.getAttribute('position'), + lt = at ? at.count : st.count, + ct = [0, 0, 0], + ut = ['a', 'b', 'c'], + ht = new Array(3), + dt = {}, + pt = [] + for (let mt = 0; mt < lt; mt += 3) { + at + ? ((ct[0] = at.getX(mt)), (ct[1] = at.getX(mt + 1)), (ct[2] = at.getX(mt + 2))) + : ((ct[0] = mt), (ct[1] = mt + 1), (ct[2] = mt + 2)) + const { a: gt, b: yt, c: bt } = _triangle + if ( + (gt.fromBufferAttribute(st, ct[0]), + yt.fromBufferAttribute(st, ct[1]), + bt.fromBufferAttribute(st, ct[2]), + _triangle.getNormal(_normal), + (ht[0] = `${Math.round(gt.x * it)},${Math.round(gt.y * it)},${Math.round(gt.z * it)}`), + (ht[1] = `${Math.round(yt.x * it)},${Math.round(yt.y * it)},${Math.round(yt.z * it)}`), + (ht[2] = `${Math.round(bt.x * it)},${Math.round(bt.y * it)},${Math.round(bt.z * it)}`), + !(ht[0] === ht[1] || ht[1] === ht[2] || ht[2] === ht[0])) + ) + for (let vt = 0; vt < 3; vt++) { + const xt = (vt + 1) % 3, + kt = ht[vt], + St = ht[xt], + Tt = _triangle[ut[vt]], + At = _triangle[ut[xt]], + Et = `${kt}_${St}`, + $t = `${St}_${kt}` + $t in dt && dt[$t] + ? (_normal.dot(dt[$t].normal) <= ot && (pt.push(Tt.x, Tt.y, Tt.z), pt.push(At.x, At.y, At.z)), + (dt[$t] = null)) + : Et in dt || (dt[Et] = { index0: ct[vt], index1: ct[xt], normal: _normal.clone() }) + } + } + for (const mt in dt) + if (dt[mt]) { + const { index0: gt, index1: yt } = dt[mt] + _v0.fromBufferAttribute(st, gt), + _v1$1.fromBufferAttribute(st, yt), + pt.push(_v0.x, _v0.y, _v0.z), + pt.push(_v1$1.x, _v1$1.y, _v1$1.z) + } + this.setAttribute('position', new Float32BufferAttribute(pt, 3)) + } + } + } + let Shape$1 = class extends Path$1 { + constructor(et) { + super(et), (this.uuid = generateUUID$1()), (this.type = 'Shape'), (this.holes = []) + } + getPointsHoles(et) { + const nt = [] + for (let rt = 0, it = this.holes.length; rt < it; rt++) nt[rt] = this.holes[rt].getPoints(et) + return nt + } + extractPoints(et) { + return { shape: this.getPoints(et), holes: this.getPointsHoles(et) } + } + copy(et) { + super.copy(et), (this.holes = []) + for (let nt = 0, rt = et.holes.length; nt < rt; nt++) { + const it = et.holes[nt] + this.holes.push(it.clone()) + } + return this + } + toJSON() { + const et = super.toJSON() + ;(et.uuid = this.uuid), (et.holes = []) + for (let nt = 0, rt = this.holes.length; nt < rt; nt++) { + const it = this.holes[nt] + et.holes.push(it.toJSON()) + } + return et + } + fromJSON(et) { + super.fromJSON(et), (this.uuid = et.uuid), (this.holes = []) + for (let nt = 0, rt = et.holes.length; nt < rt; nt++) { + const it = et.holes[nt] + this.holes.push(new Path$1().fromJSON(it)) + } + return this + } + } + const Earcut = { + triangulate: function (tt, et, nt = 2) { + const rt = et && et.length, + it = rt ? et[0] * nt : tt.length + let ot = linkedList(tt, 0, it, nt, !0) + const at = [] + if (!ot || ot.next === ot.prev) return at + let st, lt, ct, ut, ht, dt, pt + if ((rt && (ot = eliminateHoles(tt, et, ot, nt)), tt.length > 80 * nt)) { + ;(st = ct = tt[0]), (lt = ut = tt[1]) + for (let mt = nt; mt < it; mt += nt) + (ht = tt[mt]), + (dt = tt[mt + 1]), + ht < st && (st = ht), + dt < lt && (lt = dt), + ht > ct && (ct = ht), + dt > ut && (ut = dt) + ;(pt = Math.max(ct - st, ut - lt)), (pt = pt !== 0 ? 1 / pt : 0) + } + return earcutLinked(ot, at, nt, st, lt, pt), at + }, + } + function linkedList(tt, et, nt, rt, it) { + let ot, at + if (it === signedArea(tt, et, nt, rt) > 0) + for (ot = et; ot < nt; ot += rt) at = insertNode(ot, tt[ot], tt[ot + 1], at) + else for (ot = nt - rt; ot >= et; ot -= rt) at = insertNode(ot, tt[ot], tt[ot + 1], at) + return at && equals(at, at.next) && (removeNode(at), (at = at.next)), at + } + function filterPoints(tt, et) { + if (!tt) return tt + et || (et = tt) + let nt = tt, + rt + do + if (((rt = !1), !nt.steiner && (equals(nt, nt.next) || area(nt.prev, nt, nt.next) === 0))) { + if ((removeNode(nt), (nt = et = nt.prev), nt === nt.next)) break + rt = !0 + } else nt = nt.next + while (rt || nt !== et) + return et + } + function earcutLinked(tt, et, nt, rt, it, ot, at) { + if (!tt) return + !at && ot && indexCurve(tt, rt, it, ot) + let st = tt, + lt, + ct + for (; tt.prev !== tt.next; ) { + if (((lt = tt.prev), (ct = tt.next), ot ? isEarHashed(tt, rt, it, ot) : isEar(tt))) { + et.push(lt.i / nt), et.push(tt.i / nt), et.push(ct.i / nt), removeNode(tt), (tt = ct.next), (st = ct.next) + continue + } + if (((tt = ct), tt === st)) { + at + ? at === 1 + ? ((tt = cureLocalIntersections(filterPoints(tt), et, nt)), earcutLinked(tt, et, nt, rt, it, ot, 2)) + : at === 2 && splitEarcut(tt, et, nt, rt, it, ot) + : earcutLinked(filterPoints(tt), et, nt, rt, it, ot, 1) + break + } + } + } + function isEar(tt) { + const et = tt.prev, + nt = tt, + rt = tt.next + if (area(et, nt, rt) >= 0) return !1 + let it = tt.next.next + for (; it !== tt.prev; ) { + if (pointInTriangle(et.x, et.y, nt.x, nt.y, rt.x, rt.y, it.x, it.y) && area(it.prev, it, it.next) >= 0) return !1 + it = it.next + } + return !0 + } + function isEarHashed(tt, et, nt, rt) { + const it = tt.prev, + ot = tt, + at = tt.next + if (area(it, ot, at) >= 0) return !1 + const st = it.x < ot.x ? (it.x < at.x ? it.x : at.x) : ot.x < at.x ? ot.x : at.x, + lt = it.y < ot.y ? (it.y < at.y ? it.y : at.y) : ot.y < at.y ? ot.y : at.y, + ct = it.x > ot.x ? (it.x > at.x ? it.x : at.x) : ot.x > at.x ? ot.x : at.x, + ut = it.y > ot.y ? (it.y > at.y ? it.y : at.y) : ot.y > at.y ? ot.y : at.y, + ht = zOrder(st, lt, et, nt, rt), + dt = zOrder(ct, ut, et, nt, rt) + let pt = tt.prevZ, + mt = tt.nextZ + for (; pt && pt.z >= ht && mt && mt.z <= dt; ) { + if ( + (pt !== tt.prev && + pt !== tt.next && + pointInTriangle(it.x, it.y, ot.x, ot.y, at.x, at.y, pt.x, pt.y) && + area(pt.prev, pt, pt.next) >= 0) || + ((pt = pt.prevZ), + mt !== tt.prev && + mt !== tt.next && + pointInTriangle(it.x, it.y, ot.x, ot.y, at.x, at.y, mt.x, mt.y) && + area(mt.prev, mt, mt.next) >= 0) + ) + return !1 + mt = mt.nextZ + } + for (; pt && pt.z >= ht; ) { + if ( + pt !== tt.prev && + pt !== tt.next && + pointInTriangle(it.x, it.y, ot.x, ot.y, at.x, at.y, pt.x, pt.y) && + area(pt.prev, pt, pt.next) >= 0 + ) + return !1 + pt = pt.prevZ + } + for (; mt && mt.z <= dt; ) { + if ( + mt !== tt.prev && + mt !== tt.next && + pointInTriangle(it.x, it.y, ot.x, ot.y, at.x, at.y, mt.x, mt.y) && + area(mt.prev, mt, mt.next) >= 0 + ) + return !1 + mt = mt.nextZ + } + return !0 + } + function cureLocalIntersections(tt, et, nt) { + let rt = tt + do { + const it = rt.prev, + ot = rt.next.next + !equals(it, ot) && + intersects(it, rt, rt.next, ot) && + locallyInside(it, ot) && + locallyInside(ot, it) && + (et.push(it.i / nt), + et.push(rt.i / nt), + et.push(ot.i / nt), + removeNode(rt), + removeNode(rt.next), + (rt = tt = ot)), + (rt = rt.next) + } while (rt !== tt) + return filterPoints(rt) + } + function splitEarcut(tt, et, nt, rt, it, ot) { + let at = tt + do { + let st = at.next.next + for (; st !== at.prev; ) { + if (at.i !== st.i && isValidDiagonal(at, st)) { + let lt = splitPolygon(at, st) + ;(at = filterPoints(at, at.next)), + (lt = filterPoints(lt, lt.next)), + earcutLinked(at, et, nt, rt, it, ot), + earcutLinked(lt, et, nt, rt, it, ot) + return + } + st = st.next + } + at = at.next + } while (at !== tt) + } + function eliminateHoles(tt, et, nt, rt) { + const it = [] + let ot, at, st, lt, ct + for (ot = 0, at = et.length; ot < at; ot++) + (st = et[ot] * rt), + (lt = ot < at - 1 ? et[ot + 1] * rt : tt.length), + (ct = linkedList(tt, st, lt, rt, !1)), + ct === ct.next && (ct.steiner = !0), + it.push(getLeftmost(ct)) + for (it.sort(compareX), ot = 0; ot < it.length; ot++) eliminateHole(it[ot], nt), (nt = filterPoints(nt, nt.next)) + return nt + } + function compareX(tt, et) { + return tt.x - et.x + } + function eliminateHole(tt, et) { + if (((et = findHoleBridge(tt, et)), et)) { + const nt = splitPolygon(et, tt) + filterPoints(et, et.next), filterPoints(nt, nt.next) + } + } + function findHoleBridge(tt, et) { + let nt = et + const rt = tt.x, + it = tt.y + let ot = -1 / 0, + at + do { + if (it <= nt.y && it >= nt.next.y && nt.next.y !== nt.y) { + const dt = nt.x + ((it - nt.y) * (nt.next.x - nt.x)) / (nt.next.y - nt.y) + if (dt <= rt && dt > ot) { + if (((ot = dt), dt === rt)) { + if (it === nt.y) return nt + if (it === nt.next.y) return nt.next + } + at = nt.x < nt.next.x ? nt : nt.next + } + } + nt = nt.next + } while (nt !== et) + if (!at) return null + if (rt === ot) return at + const st = at, + lt = at.x, + ct = at.y + let ut = 1 / 0, + ht + nt = at + do + rt >= nt.x && + nt.x >= lt && + rt !== nt.x && + pointInTriangle(it < ct ? rt : ot, it, lt, ct, it < ct ? ot : rt, it, nt.x, nt.y) && + ((ht = Math.abs(it - nt.y) / (rt - nt.x)), + locallyInside(nt, tt) && + (ht < ut || (ht === ut && (nt.x > at.x || (nt.x === at.x && sectorContainsSector(at, nt))))) && + ((at = nt), (ut = ht))), + (nt = nt.next) + while (nt !== st) + return at + } + function sectorContainsSector(tt, et) { + return area(tt.prev, tt, et.prev) < 0 && area(et.next, tt, tt.next) < 0 + } + function indexCurve(tt, et, nt, rt) { + let it = tt + do + it.z === null && (it.z = zOrder(it.x, it.y, et, nt, rt)), + (it.prevZ = it.prev), + (it.nextZ = it.next), + (it = it.next) + while (it !== tt) + ;(it.prevZ.nextZ = null), (it.prevZ = null), sortLinked(it) + } + function sortLinked(tt) { + let et, + nt, + rt, + it, + ot, + at, + st, + lt, + ct = 1 + do { + for (nt = tt, tt = null, ot = null, at = 0; nt; ) { + for (at++, rt = nt, st = 0, et = 0; et < ct && (st++, (rt = rt.nextZ), !!rt); et++); + for (lt = ct; st > 0 || (lt > 0 && rt); ) + st !== 0 && (lt === 0 || !rt || nt.z <= rt.z) + ? ((it = nt), (nt = nt.nextZ), st--) + : ((it = rt), (rt = rt.nextZ), lt--), + ot ? (ot.nextZ = it) : (tt = it), + (it.prevZ = ot), + (ot = it) + nt = rt + } + ;(ot.nextZ = null), (ct *= 2) + } while (at > 1) + return tt + } + function zOrder(tt, et, nt, rt, it) { + return ( + (tt = 32767 * (tt - nt) * it), + (et = 32767 * (et - rt) * it), + (tt = (tt | (tt << 8)) & 16711935), + (tt = (tt | (tt << 4)) & 252645135), + (tt = (tt | (tt << 2)) & 858993459), + (tt = (tt | (tt << 1)) & 1431655765), + (et = (et | (et << 8)) & 16711935), + (et = (et | (et << 4)) & 252645135), + (et = (et | (et << 2)) & 858993459), + (et = (et | (et << 1)) & 1431655765), + tt | (et << 1) + ) + } + function getLeftmost(tt) { + let et = tt, + nt = tt + do (et.x < nt.x || (et.x === nt.x && et.y < nt.y)) && (nt = et), (et = et.next) + while (et !== tt) + return nt + } + function pointInTriangle(tt, et, nt, rt, it, ot, at, st) { + return ( + (it - at) * (et - st) - (tt - at) * (ot - st) >= 0 && + (tt - at) * (rt - st) - (nt - at) * (et - st) >= 0 && + (nt - at) * (ot - st) - (it - at) * (rt - st) >= 0 + ) + } + function isValidDiagonal(tt, et) { + return ( + tt.next.i !== et.i && + tt.prev.i !== et.i && + !intersectsPolygon(tt, et) && + ((locallyInside(tt, et) && + locallyInside(et, tt) && + middleInside(tt, et) && + (area(tt.prev, tt, et.prev) || area(tt, et.prev, et))) || + (equals(tt, et) && area(tt.prev, tt, tt.next) > 0 && area(et.prev, et, et.next) > 0)) + ) + } + function area(tt, et, nt) { + return (et.y - tt.y) * (nt.x - et.x) - (et.x - tt.x) * (nt.y - et.y) + } + function equals(tt, et) { + return tt.x === et.x && tt.y === et.y + } + function intersects(tt, et, nt, rt) { + const it = sign$2(area(tt, et, nt)), + ot = sign$2(area(tt, et, rt)), + at = sign$2(area(nt, rt, tt)), + st = sign$2(area(nt, rt, et)) + return !!( + (it !== ot && at !== st) || + (it === 0 && onSegment(tt, nt, et)) || + (ot === 0 && onSegment(tt, rt, et)) || + (at === 0 && onSegment(nt, tt, rt)) || + (st === 0 && onSegment(nt, et, rt)) + ) + } + function onSegment(tt, et, nt) { + return ( + et.x <= Math.max(tt.x, nt.x) && + et.x >= Math.min(tt.x, nt.x) && + et.y <= Math.max(tt.y, nt.y) && + et.y >= Math.min(tt.y, nt.y) + ) + } + function sign$2(tt) { + return tt > 0 ? 1 : tt < 0 ? -1 : 0 + } + function intersectsPolygon(tt, et) { + let nt = tt + do { + if (nt.i !== tt.i && nt.next.i !== tt.i && nt.i !== et.i && nt.next.i !== et.i && intersects(nt, nt.next, tt, et)) + return !0 + nt = nt.next + } while (nt !== tt) + return !1 + } + function locallyInside(tt, et) { + return area(tt.prev, tt, tt.next) < 0 + ? area(tt, et, tt.next) >= 0 && area(tt, tt.prev, et) >= 0 + : area(tt, et, tt.prev) < 0 || area(tt, tt.next, et) < 0 + } + function middleInside(tt, et) { + let nt = tt, + rt = !1 + const it = (tt.x + et.x) / 2, + ot = (tt.y + et.y) / 2 + do + nt.y > ot != nt.next.y > ot && + nt.next.y !== nt.y && + it < ((nt.next.x - nt.x) * (ot - nt.y)) / (nt.next.y - nt.y) + nt.x && + (rt = !rt), + (nt = nt.next) + while (nt !== tt) + return rt + } + function splitPolygon(tt, et) { + const nt = new Node$1(tt.i, tt.x, tt.y), + rt = new Node$1(et.i, et.x, et.y), + it = tt.next, + ot = et.prev + return ( + (tt.next = et), + (et.prev = tt), + (nt.next = it), + (it.prev = nt), + (rt.next = nt), + (nt.prev = rt), + (ot.next = rt), + (rt.prev = ot), + rt + ) + } + function insertNode(tt, et, nt, rt) { + const it = new Node$1(tt, et, nt) + return ( + rt + ? ((it.next = rt.next), (it.prev = rt), (rt.next.prev = it), (rt.next = it)) + : ((it.prev = it), (it.next = it)), + it + ) + } + function removeNode(tt) { + ;(tt.next.prev = tt.prev), + (tt.prev.next = tt.next), + tt.prevZ && (tt.prevZ.nextZ = tt.nextZ), + tt.nextZ && (tt.nextZ.prevZ = tt.prevZ) + } + function Node$1(tt, et, nt) { + ;(this.i = tt), + (this.x = et), + (this.y = nt), + (this.prev = null), + (this.next = null), + (this.z = null), + (this.prevZ = null), + (this.nextZ = null), + (this.steiner = !1) + } + function signedArea(tt, et, nt, rt) { + let it = 0 + for (let ot = et, at = nt - rt; ot < nt; ot += rt) (it += (tt[at] - tt[ot]) * (tt[ot + 1] + tt[at + 1])), (at = ot) + return it + } + class ShapeUtils { + static area(et) { + const nt = et.length + let rt = 0 + for (let it = nt - 1, ot = 0; ot < nt; it = ot++) rt += et[it].x * et[ot].y - et[ot].x * et[it].y + return rt * 0.5 + } + static isClockWise(et) { + return ShapeUtils.area(et) < 0 + } + static triangulateShape(et, nt) { + const rt = [], + it = [], + ot = [] + removeDupEndPts(et), addContour(rt, et) + let at = et.length + nt.forEach(removeDupEndPts) + for (let lt = 0; lt < nt.length; lt++) it.push(at), (at += nt[lt].length), addContour(rt, nt[lt]) + const st = Earcut.triangulate(rt, it) + for (let lt = 0; lt < st.length; lt += 3) ot.push(st.slice(lt, lt + 3)) + return ot + } + } + function removeDupEndPts(tt) { + const et = tt.length + et > 2 && tt[et - 1].equals(tt[0]) && tt.pop() + } + function addContour(tt, et) { + for (let nt = 0; nt < et.length; nt++) tt.push(et[nt].x), tt.push(et[nt].y) + } + class ExtrudeGeometry extends BufferGeometry { + constructor( + et = new Shape$1([ + new Vector2(0.5, 0.5), + new Vector2(-0.5, 0.5), + new Vector2(-0.5, -0.5), + new Vector2(0.5, -0.5), + ]), + nt = {}, + ) { + super(), + (this.type = 'ExtrudeGeometry'), + (this.parameters = { shapes: et, options: nt }), + (et = Array.isArray(et) ? et : [et]) + const rt = this, + it = [], + ot = [] + for (let st = 0, lt = et.length; st < lt; st++) { + const ct = et[st] + at(ct) + } + this.setAttribute('position', new Float32BufferAttribute(it, 3)), + this.setAttribute('uv', new Float32BufferAttribute(ot, 2)), + this.computeVertexNormals() + function at(st) { + const lt = [], + ct = nt.curveSegments !== void 0 ? nt.curveSegments : 12, + ut = nt.steps !== void 0 ? nt.steps : 1, + ht = nt.depth !== void 0 ? nt.depth : 1 + let dt = nt.bevelEnabled !== void 0 ? nt.bevelEnabled : !0, + pt = nt.bevelThickness !== void 0 ? nt.bevelThickness : 0.2, + mt = nt.bevelSize !== void 0 ? nt.bevelSize : pt - 0.1, + gt = nt.bevelOffset !== void 0 ? nt.bevelOffset : 0, + yt = nt.bevelSegments !== void 0 ? nt.bevelSegments : 3 + const bt = nt.extrudePath, + vt = nt.UVGenerator !== void 0 ? nt.UVGenerator : WorldUVGenerator + let xt, + kt = !1, + St, + Tt, + At, + Et + bt && + ((xt = bt.getSpacedPoints(ut)), + (kt = !0), + (dt = !1), + (St = bt.computeFrenetFrames(ut, !1)), + (Tt = new Vector3()), + (At = new Vector3()), + (Et = new Vector3())), + dt || ((yt = 0), (pt = 0), (mt = 0), (gt = 0)) + const $t = st.extractPoints(ct) + let Dt = $t.shape + const jt = $t.holes + if (!ShapeUtils.isClockWise(Dt)) { + Dt = Dt.reverse() + for (let Qt = 0, _n = jt.length; Qt < _n; Qt++) { + const Pn = jt[Qt] + ShapeUtils.isClockWise(Pn) && (jt[Qt] = Pn.reverse()) + } + } + const Ct = ShapeUtils.triangulateShape(Dt, jt), + wt = Dt + for (let Qt = 0, _n = jt.length; Qt < _n; Qt++) { + const Pn = jt[Qt] + Dt = Dt.concat(Pn) + } + function It(Qt, _n, Pn) { + return _n || console.error('THREE.ExtrudeGeometry: vec does not exist'), _n.clone().multiplyScalar(Pn).add(Qt) + } + const Ot = Dt.length, + Wt = Ct.length + function zt(Qt, _n, Pn) { + let $n, Nn, Tn + const cn = Qt.x - _n.x, + mn = Qt.y - _n.y, + In = Pn.x - Qt.x, + An = Pn.y - Qt.y, + wn = cn * cn + mn * mn, + fn = cn * An - mn * In + if (Math.abs(fn) > Number.EPSILON) { + const pn = Math.sqrt(wn), + kn = Math.sqrt(In * In + An * An), + Dn = _n.x - mn / pn, + un = _n.y + cn / pn, + Zt = Pn.x - An / kn, + Xt = Pn.y + In / kn, + Sn = ((Zt - Dn) * An - (Xt - un) * In) / (cn * An - mn * In) + ;($n = Dn + cn * Sn - Qt.x), (Nn = un + mn * Sn - Qt.y) + const Rn = $n * $n + Nn * Nn + if (Rn <= 2) return new Vector2($n, Nn) + Tn = Math.sqrt(Rn / 2) + } else { + let pn = !1 + cn > Number.EPSILON + ? In > Number.EPSILON && (pn = !0) + : cn < -Number.EPSILON + ? In < -Number.EPSILON && (pn = !0) + : Math.sign(mn) === Math.sign(An) && (pn = !0), + pn ? (($n = -mn), (Nn = cn), (Tn = Math.sqrt(wn))) : (($n = cn), (Nn = mn), (Tn = Math.sqrt(wn / 2))) + } + return new Vector2($n / Tn, Nn / Tn) + } + const Ft = [] + for (let Qt = 0, _n = wt.length, Pn = _n - 1, $n = Qt + 1; Qt < _n; Qt++, Pn++, $n++) + Pn === _n && (Pn = 0), $n === _n && ($n = 0), (Ft[Qt] = zt(wt[Qt], wt[Pn], wt[$n])) + const Nt = [] + let Ut, + Mt = Ft.concat() + for (let Qt = 0, _n = jt.length; Qt < _n; Qt++) { + const Pn = jt[Qt] + Ut = [] + for (let $n = 0, Nn = Pn.length, Tn = Nn - 1, cn = $n + 1; $n < Nn; $n++, Tn++, cn++) + Tn === Nn && (Tn = 0), cn === Nn && (cn = 0), (Ut[$n] = zt(Pn[$n], Pn[Tn], Pn[cn])) + Nt.push(Ut), (Mt = Mt.concat(Ut)) + } + for (let Qt = 0; Qt < yt; Qt++) { + const _n = Qt / yt, + Pn = pt * Math.cos((_n * Math.PI) / 2), + $n = mt * Math.sin((_n * Math.PI) / 2) + gt + for (let Nn = 0, Tn = wt.length; Nn < Tn; Nn++) { + const cn = It(wt[Nn], Ft[Nn], $n) + rn(cn.x, cn.y, -Pn) + } + for (let Nn = 0, Tn = jt.length; Nn < Tn; Nn++) { + const cn = jt[Nn] + Ut = Nt[Nn] + for (let mn = 0, In = cn.length; mn < In; mn++) { + const An = It(cn[mn], Ut[mn], $n) + rn(An.x, An.y, -Pn) + } + } + } + const Ht = mt + gt + for (let Qt = 0; Qt < Ot; Qt++) { + const _n = dt ? It(Dt[Qt], Mt[Qt], Ht) : Dt[Qt] + kt + ? (At.copy(St.normals[0]).multiplyScalar(_n.x), + Tt.copy(St.binormals[0]).multiplyScalar(_n.y), + Et.copy(xt[0]).add(At).add(Tt), + rn(Et.x, Et.y, Et.z)) + : rn(_n.x, _n.y, 0) + } + for (let Qt = 1; Qt <= ut; Qt++) + for (let _n = 0; _n < Ot; _n++) { + const Pn = dt ? It(Dt[_n], Mt[_n], Ht) : Dt[_n] + kt + ? (At.copy(St.normals[Qt]).multiplyScalar(Pn.x), + Tt.copy(St.binormals[Qt]).multiplyScalar(Pn.y), + Et.copy(xt[Qt]).add(At).add(Tt), + rn(Et.x, Et.y, Et.z)) + : rn(Pn.x, Pn.y, (ht / ut) * Qt) + } + for (let Qt = yt - 1; Qt >= 0; Qt--) { + const _n = Qt / yt, + Pn = pt * Math.cos((_n * Math.PI) / 2), + $n = mt * Math.sin((_n * Math.PI) / 2) + gt + for (let Nn = 0, Tn = wt.length; Nn < Tn; Nn++) { + const cn = It(wt[Nn], Ft[Nn], $n) + rn(cn.x, cn.y, ht + Pn) + } + for (let Nn = 0, Tn = jt.length; Nn < Tn; Nn++) { + const cn = jt[Nn] + Ut = Nt[Nn] + for (let mn = 0, In = cn.length; mn < In; mn++) { + const An = It(cn[mn], Ut[mn], $n) + kt ? rn(An.x, An.y + xt[ut - 1].y, xt[ut - 1].x + Pn) : rn(An.x, An.y, ht + Pn) + } + } + } + en(), sn() + function en() { + const Qt = it.length / 3 + if (dt) { + let _n = 0, + Pn = Ot * _n + for (let $n = 0; $n < Wt; $n++) { + const Nn = Ct[$n] + nn(Nn[2] + Pn, Nn[1] + Pn, Nn[0] + Pn) + } + ;(_n = ut + yt * 2), (Pn = Ot * _n) + for (let $n = 0; $n < Wt; $n++) { + const Nn = Ct[$n] + nn(Nn[0] + Pn, Nn[1] + Pn, Nn[2] + Pn) + } + } else { + for (let _n = 0; _n < Wt; _n++) { + const Pn = Ct[_n] + nn(Pn[2], Pn[1], Pn[0]) + } + for (let _n = 0; _n < Wt; _n++) { + const Pn = Ct[_n] + nn(Pn[0] + Ot * ut, Pn[1] + Ot * ut, Pn[2] + Ot * ut) + } + } + rt.addGroup(Qt, it.length / 3 - Qt, 0) + } + function sn() { + const Qt = it.length / 3 + let _n = 0 + Kt(wt, _n), (_n += wt.length) + for (let Pn = 0, $n = jt.length; Pn < $n; Pn++) { + const Nn = jt[Pn] + Kt(Nn, _n), (_n += Nn.length) + } + rt.addGroup(Qt, it.length / 3 - Qt, 1) + } + function Kt(Qt, _n) { + let Pn = Qt.length + for (; --Pn >= 0; ) { + const $n = Pn + let Nn = Pn - 1 + Nn < 0 && (Nn = Qt.length - 1) + for (let Tn = 0, cn = ut + yt * 2; Tn < cn; Tn++) { + const mn = Ot * Tn, + In = Ot * (Tn + 1), + An = _n + $n + mn, + wn = _n + Nn + mn, + fn = _n + Nn + In, + pn = _n + $n + In + hn(An, wn, fn, pn) + } + } + } + function rn(Qt, _n, Pn) { + lt.push(Qt), lt.push(_n), lt.push(Pn) + } + function nn(Qt, _n, Pn) { + vn(Qt), vn(_n), vn(Pn) + const $n = it.length / 3, + Nn = vt.generateTopUV(rt, it, $n - 3, $n - 2, $n - 1) + an(Nn[0]), an(Nn[1]), an(Nn[2]) + } + function hn(Qt, _n, Pn, $n) { + vn(Qt), vn(_n), vn($n), vn(_n), vn(Pn), vn($n) + const Nn = it.length / 3, + Tn = vt.generateSideWallUV(rt, it, Nn - 6, Nn - 3, Nn - 2, Nn - 1) + an(Tn[0]), an(Tn[1]), an(Tn[3]), an(Tn[1]), an(Tn[2]), an(Tn[3]) + } + function vn(Qt) { + it.push(lt[Qt * 3 + 0]), it.push(lt[Qt * 3 + 1]), it.push(lt[Qt * 3 + 2]) + } + function an(Qt) { + ot.push(Qt.x), ot.push(Qt.y) + } + } + } + toJSON() { + const et = super.toJSON(), + nt = this.parameters.shapes, + rt = this.parameters.options + return toJSON$1(nt, rt, et) + } + static fromJSON(et, nt) { + const rt = [] + for (let ot = 0, at = et.shapes.length; ot < at; ot++) { + const st = nt[et.shapes[ot]] + rt.push(st) + } + const it = et.options.extrudePath + return ( + it !== void 0 && (et.options.extrudePath = new Curves[it.type]().fromJSON(it)), + new ExtrudeGeometry(rt, et.options) + ) + } + } + const WorldUVGenerator = { + generateTopUV: function (tt, et, nt, rt, it) { + const ot = et[nt * 3], + at = et[nt * 3 + 1], + st = et[rt * 3], + lt = et[rt * 3 + 1], + ct = et[it * 3], + ut = et[it * 3 + 1] + return [new Vector2(ot, at), new Vector2(st, lt), new Vector2(ct, ut)] + }, + generateSideWallUV: function (tt, et, nt, rt, it, ot) { + const at = et[nt * 3], + st = et[nt * 3 + 1], + lt = et[nt * 3 + 2], + ct = et[rt * 3], + ut = et[rt * 3 + 1], + ht = et[rt * 3 + 2], + dt = et[it * 3], + pt = et[it * 3 + 1], + mt = et[it * 3 + 2], + gt = et[ot * 3], + yt = et[ot * 3 + 1], + bt = et[ot * 3 + 2] + return Math.abs(st - ut) < Math.abs(at - ct) + ? [new Vector2(at, 1 - lt), new Vector2(ct, 1 - ht), new Vector2(dt, 1 - mt), new Vector2(gt, 1 - bt)] + : [new Vector2(st, 1 - lt), new Vector2(ut, 1 - ht), new Vector2(pt, 1 - mt), new Vector2(yt, 1 - bt)] + }, + } + function toJSON$1(tt, et, nt) { + if (((nt.shapes = []), Array.isArray(tt))) + for (let rt = 0, it = tt.length; rt < it; rt++) { + const ot = tt[rt] + nt.shapes.push(ot.uuid) + } + else nt.shapes.push(tt.uuid) + return ( + (nt.options = Object.assign({}, et)), + et.extrudePath !== void 0 && (nt.options.extrudePath = et.extrudePath.toJSON()), + nt + ) + } + class IcosahedronGeometry extends PolyhedronGeometry { + constructor(et = 1, nt = 0) { + const rt = (1 + Math.sqrt(5)) / 2, + it = [ + -1, + rt, + 0, + 1, + rt, + 0, + -1, + -rt, + 0, + 1, + -rt, + 0, + 0, + -1, + rt, + 0, + 1, + rt, + 0, + -1, + -rt, + 0, + 1, + -rt, + rt, + 0, + -1, + rt, + 0, + 1, + -rt, + 0, + -1, + -rt, + 0, + 1, + ], + ot = [ + 0, 11, 5, 0, 5, 1, 0, 1, 7, 0, 7, 10, 0, 10, 11, 1, 5, 9, 5, 11, 4, 11, 10, 2, 10, 7, 6, 7, 1, 8, 3, 9, 4, 3, + 4, 2, 3, 2, 6, 3, 6, 8, 3, 8, 9, 4, 9, 5, 2, 4, 11, 6, 2, 10, 8, 6, 7, 9, 8, 1, + ] + super(it, ot, et, nt), (this.type = 'IcosahedronGeometry'), (this.parameters = { radius: et, detail: nt }) + } + static fromJSON(et) { + return new IcosahedronGeometry(et.radius, et.detail) + } + } + class OctahedronGeometry extends PolyhedronGeometry { + constructor(et = 1, nt = 0) { + const rt = [1, 0, 0, -1, 0, 0, 0, 1, 0, 0, -1, 0, 0, 0, 1, 0, 0, -1], + it = [0, 2, 4, 0, 4, 3, 0, 3, 5, 0, 5, 2, 1, 2, 5, 1, 5, 3, 1, 3, 4, 1, 4, 2] + super(rt, it, et, nt), (this.type = 'OctahedronGeometry'), (this.parameters = { radius: et, detail: nt }) + } + static fromJSON(et) { + return new OctahedronGeometry(et.radius, et.detail) + } + } + class RingGeometry extends BufferGeometry { + constructor(et = 0.5, nt = 1, rt = 8, it = 1, ot = 0, at = Math.PI * 2) { + super(), + (this.type = 'RingGeometry'), + (this.parameters = { + innerRadius: et, + outerRadius: nt, + thetaSegments: rt, + phiSegments: it, + thetaStart: ot, + thetaLength: at, + }), + (rt = Math.max(3, rt)), + (it = Math.max(1, it)) + const st = [], + lt = [], + ct = [], + ut = [] + let ht = et + const dt = (nt - et) / it, + pt = new Vector3(), + mt = new Vector2() + for (let gt = 0; gt <= it; gt++) { + for (let yt = 0; yt <= rt; yt++) { + const bt = ot + (yt / rt) * at + ;(pt.x = ht * Math.cos(bt)), + (pt.y = ht * Math.sin(bt)), + lt.push(pt.x, pt.y, pt.z), + ct.push(0, 0, 1), + (mt.x = (pt.x / nt + 1) / 2), + (mt.y = (pt.y / nt + 1) / 2), + ut.push(mt.x, mt.y) + } + ht += dt + } + for (let gt = 0; gt < it; gt++) { + const yt = gt * (rt + 1) + for (let bt = 0; bt < rt; bt++) { + const vt = bt + yt, + xt = vt, + kt = vt + rt + 1, + St = vt + rt + 2, + Tt = vt + 1 + st.push(xt, kt, Tt), st.push(kt, St, Tt) + } + } + this.setIndex(st), + this.setAttribute('position', new Float32BufferAttribute(lt, 3)), + this.setAttribute('normal', new Float32BufferAttribute(ct, 3)), + this.setAttribute('uv', new Float32BufferAttribute(ut, 2)) + } + static fromJSON(et) { + return new RingGeometry( + et.innerRadius, + et.outerRadius, + et.thetaSegments, + et.phiSegments, + et.thetaStart, + et.thetaLength, + ) + } + } + class ShapeGeometry extends BufferGeometry { + constructor(et = new Shape$1([new Vector2(0, 0.5), new Vector2(-0.5, -0.5), new Vector2(0.5, -0.5)]), nt = 12) { + super(), (this.type = 'ShapeGeometry'), (this.parameters = { shapes: et, curveSegments: nt }) + const rt = [], + it = [], + ot = [], + at = [] + let st = 0, + lt = 0 + if (Array.isArray(et) === !1) ct(et) + else for (let ut = 0; ut < et.length; ut++) ct(et[ut]), this.addGroup(st, lt, ut), (st += lt), (lt = 0) + this.setIndex(rt), + this.setAttribute('position', new Float32BufferAttribute(it, 3)), + this.setAttribute('normal', new Float32BufferAttribute(ot, 3)), + this.setAttribute('uv', new Float32BufferAttribute(at, 2)) + function ct(ut) { + const ht = it.length / 3, + dt = ut.extractPoints(nt) + let pt = dt.shape + const mt = dt.holes + ShapeUtils.isClockWise(pt) === !1 && (pt = pt.reverse()) + for (let yt = 0, bt = mt.length; yt < bt; yt++) { + const vt = mt[yt] + ShapeUtils.isClockWise(vt) === !0 && (mt[yt] = vt.reverse()) + } + const gt = ShapeUtils.triangulateShape(pt, mt) + for (let yt = 0, bt = mt.length; yt < bt; yt++) { + const vt = mt[yt] + pt = pt.concat(vt) + } + for (let yt = 0, bt = pt.length; yt < bt; yt++) { + const vt = pt[yt] + it.push(vt.x, vt.y, 0), ot.push(0, 0, 1), at.push(vt.x, vt.y) + } + for (let yt = 0, bt = gt.length; yt < bt; yt++) { + const vt = gt[yt], + xt = vt[0] + ht, + kt = vt[1] + ht, + St = vt[2] + ht + rt.push(xt, kt, St), (lt += 3) + } + } + } + toJSON() { + const et = super.toJSON(), + nt = this.parameters.shapes + return toJSON$2(nt, et) + } + static fromJSON(et, nt) { + const rt = [] + for (let it = 0, ot = et.shapes.length; it < ot; it++) { + const at = nt[et.shapes[it]] + rt.push(at) + } + return new ShapeGeometry(rt, et.curveSegments) + } + } + function toJSON$2(tt, et) { + if (((et.shapes = []), Array.isArray(tt))) + for (let nt = 0, rt = tt.length; nt < rt; nt++) { + const it = tt[nt] + et.shapes.push(it.uuid) + } + else et.shapes.push(tt.uuid) + return et + } + class SphereGeometry extends BufferGeometry { + constructor(et = 1, nt = 32, rt = 16, it = 0, ot = Math.PI * 2, at = 0, st = Math.PI) { + super(), + (this.type = 'SphereGeometry'), + (this.parameters = { + radius: et, + widthSegments: nt, + heightSegments: rt, + phiStart: it, + phiLength: ot, + thetaStart: at, + thetaLength: st, + }), + (nt = Math.max(3, Math.floor(nt))), + (rt = Math.max(2, Math.floor(rt))) + const lt = Math.min(at + st, Math.PI) + let ct = 0 + const ut = [], + ht = new Vector3(), + dt = new Vector3(), + pt = [], + mt = [], + gt = [], + yt = [] + for (let bt = 0; bt <= rt; bt++) { + const vt = [], + xt = bt / rt + let kt = 0 + bt == 0 && at == 0 ? (kt = 0.5 / nt) : bt == rt && lt == Math.PI && (kt = -0.5 / nt) + for (let St = 0; St <= nt; St++) { + const Tt = St / nt + ;(ht.x = -et * Math.cos(it + Tt * ot) * Math.sin(at + xt * st)), + (ht.y = et * Math.cos(at + xt * st)), + (ht.z = et * Math.sin(it + Tt * ot) * Math.sin(at + xt * st)), + mt.push(ht.x, ht.y, ht.z), + dt.copy(ht).normalize(), + gt.push(dt.x, dt.y, dt.z), + yt.push(Tt + kt, 1 - xt), + vt.push(ct++) + } + ut.push(vt) + } + for (let bt = 0; bt < rt; bt++) + for (let vt = 0; vt < nt; vt++) { + const xt = ut[bt][vt + 1], + kt = ut[bt][vt], + St = ut[bt + 1][vt], + Tt = ut[bt + 1][vt + 1] + ;(bt !== 0 || at > 0) && pt.push(xt, kt, Tt), (bt !== rt - 1 || lt < Math.PI) && pt.push(kt, St, Tt) + } + this.setIndex(pt), + this.setAttribute('position', new Float32BufferAttribute(mt, 3)), + this.setAttribute('normal', new Float32BufferAttribute(gt, 3)), + this.setAttribute('uv', new Float32BufferAttribute(yt, 2)) + } + static fromJSON(et) { + return new SphereGeometry( + et.radius, + et.widthSegments, + et.heightSegments, + et.phiStart, + et.phiLength, + et.thetaStart, + et.thetaLength, + ) + } + } + class TetrahedronGeometry extends PolyhedronGeometry { + constructor(et = 1, nt = 0) { + const rt = [1, 1, 1, -1, -1, 1, -1, 1, -1, 1, -1, -1], + it = [2, 1, 0, 0, 3, 2, 1, 3, 0, 2, 3, 1] + super(rt, it, et, nt), (this.type = 'TetrahedronGeometry'), (this.parameters = { radius: et, detail: nt }) + } + static fromJSON(et) { + return new TetrahedronGeometry(et.radius, et.detail) + } + } + class TorusGeometry extends BufferGeometry { + constructor(et = 1, nt = 0.4, rt = 8, it = 6, ot = Math.PI * 2) { + super(), + (this.type = 'TorusGeometry'), + (this.parameters = { radius: et, tube: nt, radialSegments: rt, tubularSegments: it, arc: ot }), + (rt = Math.floor(rt)), + (it = Math.floor(it)) + const at = [], + st = [], + lt = [], + ct = [], + ut = new Vector3(), + ht = new Vector3(), + dt = new Vector3() + for (let pt = 0; pt <= rt; pt++) + for (let mt = 0; mt <= it; mt++) { + const gt = (mt / it) * ot, + yt = (pt / rt) * Math.PI * 2 + ;(ht.x = (et + nt * Math.cos(yt)) * Math.cos(gt)), + (ht.y = (et + nt * Math.cos(yt)) * Math.sin(gt)), + (ht.z = nt * Math.sin(yt)), + st.push(ht.x, ht.y, ht.z), + (ut.x = et * Math.cos(gt)), + (ut.y = et * Math.sin(gt)), + dt.subVectors(ht, ut).normalize(), + lt.push(dt.x, dt.y, dt.z), + ct.push(mt / it), + ct.push(pt / rt) + } + for (let pt = 1; pt <= rt; pt++) + for (let mt = 1; mt <= it; mt++) { + const gt = (it + 1) * pt + mt - 1, + yt = (it + 1) * (pt - 1) + mt - 1, + bt = (it + 1) * (pt - 1) + mt, + vt = (it + 1) * pt + mt + at.push(gt, yt, vt), at.push(yt, bt, vt) + } + this.setIndex(at), + this.setAttribute('position', new Float32BufferAttribute(st, 3)), + this.setAttribute('normal', new Float32BufferAttribute(lt, 3)), + this.setAttribute('uv', new Float32BufferAttribute(ct, 2)) + } + static fromJSON(et) { + return new TorusGeometry(et.radius, et.tube, et.radialSegments, et.tubularSegments, et.arc) + } + } + class TorusKnotGeometry extends BufferGeometry { + constructor(et = 1, nt = 0.4, rt = 64, it = 8, ot = 2, at = 3) { + super(), + (this.type = 'TorusKnotGeometry'), + (this.parameters = { radius: et, tube: nt, tubularSegments: rt, radialSegments: it, p: ot, q: at }), + (rt = Math.floor(rt)), + (it = Math.floor(it)) + const st = [], + lt = [], + ct = [], + ut = [], + ht = new Vector3(), + dt = new Vector3(), + pt = new Vector3(), + mt = new Vector3(), + gt = new Vector3(), + yt = new Vector3(), + bt = new Vector3() + for (let xt = 0; xt <= rt; ++xt) { + const kt = (xt / rt) * ot * Math.PI * 2 + vt(kt, ot, at, et, pt), + vt(kt + 0.01, ot, at, et, mt), + yt.subVectors(mt, pt), + bt.addVectors(mt, pt), + gt.crossVectors(yt, bt), + bt.crossVectors(gt, yt), + gt.normalize(), + bt.normalize() + for (let St = 0; St <= it; ++St) { + const Tt = (St / it) * Math.PI * 2, + At = -nt * Math.cos(Tt), + Et = nt * Math.sin(Tt) + ;(ht.x = pt.x + (At * bt.x + Et * gt.x)), + (ht.y = pt.y + (At * bt.y + Et * gt.y)), + (ht.z = pt.z + (At * bt.z + Et * gt.z)), + lt.push(ht.x, ht.y, ht.z), + dt.subVectors(ht, pt).normalize(), + ct.push(dt.x, dt.y, dt.z), + ut.push(xt / rt), + ut.push(St / it) + } + } + for (let xt = 1; xt <= rt; xt++) + for (let kt = 1; kt <= it; kt++) { + const St = (it + 1) * (xt - 1) + (kt - 1), + Tt = (it + 1) * xt + (kt - 1), + At = (it + 1) * xt + kt, + Et = (it + 1) * (xt - 1) + kt + st.push(St, Tt, Et), st.push(Tt, At, Et) + } + this.setIndex(st), + this.setAttribute('position', new Float32BufferAttribute(lt, 3)), + this.setAttribute('normal', new Float32BufferAttribute(ct, 3)), + this.setAttribute('uv', new Float32BufferAttribute(ut, 2)) + function vt(xt, kt, St, Tt, At) { + const Et = Math.cos(xt), + $t = Math.sin(xt), + Dt = (St / kt) * xt, + jt = Math.cos(Dt) + ;(At.x = Tt * (2 + jt) * 0.5 * Et), (At.y = Tt * (2 + jt) * $t * 0.5), (At.z = Tt * Math.sin(Dt) * 0.5) + } + } + static fromJSON(et) { + return new TorusKnotGeometry(et.radius, et.tube, et.tubularSegments, et.radialSegments, et.p, et.q) + } + } + class TubeGeometry extends BufferGeometry { + constructor( + et = new QuadraticBezierCurve3(new Vector3(-1, -1, 0), new Vector3(-1, 1, 0), new Vector3(1, 1, 0)), + nt = 64, + rt = 1, + it = 8, + ot = !1, + ) { + super(), + (this.type = 'TubeGeometry'), + (this.parameters = { path: et, tubularSegments: nt, radius: rt, radialSegments: it, closed: ot }) + const at = et.computeFrenetFrames(nt, ot) + ;(this.tangents = at.tangents), (this.normals = at.normals), (this.binormals = at.binormals) + const st = new Vector3(), + lt = new Vector3(), + ct = new Vector2() + let ut = new Vector3() + const ht = [], + dt = [], + pt = [], + mt = [] + gt(), + this.setIndex(mt), + this.setAttribute('position', new Float32BufferAttribute(ht, 3)), + this.setAttribute('normal', new Float32BufferAttribute(dt, 3)), + this.setAttribute('uv', new Float32BufferAttribute(pt, 2)) + function gt() { + for (let xt = 0; xt < nt; xt++) yt(xt) + yt(ot === !1 ? nt : 0), vt(), bt() + } + function yt(xt) { + ut = et.getPointAt(xt / nt, ut) + const kt = at.normals[xt], + St = at.binormals[xt] + for (let Tt = 0; Tt <= it; Tt++) { + const At = (Tt / it) * Math.PI * 2, + Et = Math.sin(At), + $t = -Math.cos(At) + ;(lt.x = $t * kt.x + Et * St.x), + (lt.y = $t * kt.y + Et * St.y), + (lt.z = $t * kt.z + Et * St.z), + lt.normalize(), + dt.push(lt.x, lt.y, lt.z), + (st.x = ut.x + rt * lt.x), + (st.y = ut.y + rt * lt.y), + (st.z = ut.z + rt * lt.z), + ht.push(st.x, st.y, st.z) + } + } + function bt() { + for (let xt = 1; xt <= nt; xt++) + for (let kt = 1; kt <= it; kt++) { + const St = (it + 1) * (xt - 1) + (kt - 1), + Tt = (it + 1) * xt + (kt - 1), + At = (it + 1) * xt + kt, + Et = (it + 1) * (xt - 1) + kt + mt.push(St, Tt, Et), mt.push(Tt, At, Et) + } + } + function vt() { + for (let xt = 0; xt <= nt; xt++) + for (let kt = 0; kt <= it; kt++) (ct.x = xt / nt), (ct.y = kt / it), pt.push(ct.x, ct.y) + } + } + toJSON() { + const et = super.toJSON() + return (et.path = this.parameters.path.toJSON()), et + } + static fromJSON(et) { + return new TubeGeometry( + new Curves[et.path.type]().fromJSON(et.path), + et.tubularSegments, + et.radius, + et.radialSegments, + et.closed, + ) + } + } + class WireframeGeometry extends BufferGeometry { + constructor(et = null) { + if ((super(), (this.type = 'WireframeGeometry'), (this.parameters = { geometry: et }), et !== null)) { + const nt = [], + rt = new Set(), + it = new Vector3(), + ot = new Vector3() + if (et.index !== null) { + const at = et.attributes.position, + st = et.index + let lt = et.groups + lt.length === 0 && (lt = [{ start: 0, count: st.count, materialIndex: 0 }]) + for (let ct = 0, ut = lt.length; ct < ut; ++ct) { + const ht = lt[ct], + dt = ht.start, + pt = ht.count + for (let mt = dt, gt = dt + pt; mt < gt; mt += 3) + for (let yt = 0; yt < 3; yt++) { + const bt = st.getX(mt + yt), + vt = st.getX(mt + ((yt + 1) % 3)) + it.fromBufferAttribute(at, bt), + ot.fromBufferAttribute(at, vt), + isUniqueEdge(it, ot, rt) === !0 && (nt.push(it.x, it.y, it.z), nt.push(ot.x, ot.y, ot.z)) + } + } + } else { + const at = et.attributes.position + for (let st = 0, lt = at.count / 3; st < lt; st++) + for (let ct = 0; ct < 3; ct++) { + const ut = 3 * st + ct, + ht = 3 * st + ((ct + 1) % 3) + it.fromBufferAttribute(at, ut), + ot.fromBufferAttribute(at, ht), + isUniqueEdge(it, ot, rt) === !0 && (nt.push(it.x, it.y, it.z), nt.push(ot.x, ot.y, ot.z)) + } + } + this.setAttribute('position', new Float32BufferAttribute(nt, 3)) + } + } + } + function isUniqueEdge(tt, et, nt) { + const rt = `${tt.x},${tt.y},${tt.z}-${et.x},${et.y},${et.z}`, + it = `${et.x},${et.y},${et.z}-${tt.x},${tt.y},${tt.z}` + return nt.has(rt) === !0 || nt.has(it) === !0 ? !1 : (nt.add(rt), nt.add(it), !0) + } + var Geometries = Object.freeze({ + __proto__: null, + BoxGeometry, + BoxBufferGeometry: BoxGeometry, + CapsuleGeometry, + CapsuleBufferGeometry: CapsuleGeometry, + CircleGeometry, + CircleBufferGeometry: CircleGeometry, + ConeGeometry, + ConeBufferGeometry: ConeGeometry, + CylinderGeometry, + CylinderBufferGeometry: CylinderGeometry, + DodecahedronGeometry, + DodecahedronBufferGeometry: DodecahedronGeometry, + EdgesGeometry, + ExtrudeGeometry, + ExtrudeBufferGeometry: ExtrudeGeometry, + IcosahedronGeometry, + IcosahedronBufferGeometry: IcosahedronGeometry, + LatheGeometry, + LatheBufferGeometry: LatheGeometry, + OctahedronGeometry, + OctahedronBufferGeometry: OctahedronGeometry, + PlaneGeometry, + PlaneBufferGeometry: PlaneGeometry, + PolyhedronGeometry, + PolyhedronBufferGeometry: PolyhedronGeometry, + RingGeometry, + RingBufferGeometry: RingGeometry, + ShapeGeometry, + ShapeBufferGeometry: ShapeGeometry, + SphereGeometry, + SphereBufferGeometry: SphereGeometry, + TetrahedronGeometry, + TetrahedronBufferGeometry: TetrahedronGeometry, + TorusGeometry, + TorusBufferGeometry: TorusGeometry, + TorusKnotGeometry, + TorusKnotBufferGeometry: TorusKnotGeometry, + TubeGeometry, + TubeBufferGeometry: TubeGeometry, + WireframeGeometry, + }) + class ShadowMaterial extends Material { + constructor(et) { + super(), + (this.isShadowMaterial = !0), + (this.type = 'ShadowMaterial'), + (this.color = new Color$1(0)), + (this.transparent = !0), + (this.fog = !0), + this.setValues(et) + } + copy(et) { + return super.copy(et), this.color.copy(et.color), (this.fog = et.fog), this + } + } + class RawShaderMaterial extends ShaderMaterial { + constructor(et) { + super(et), (this.isRawShaderMaterial = !0), (this.type = 'RawShaderMaterial') + } + } + class MeshStandardMaterial extends Material { + constructor(et) { + super(), + (this.isMeshStandardMaterial = !0), + (this.defines = { STANDARD: '' }), + (this.type = 'MeshStandardMaterial'), + (this.color = new Color$1(16777215)), + (this.roughness = 1), + (this.metalness = 0), + (this.map = null), + (this.lightMap = null), + (this.lightMapIntensity = 1), + (this.aoMap = null), + (this.aoMapIntensity = 1), + (this.emissive = new Color$1(0)), + (this.emissiveIntensity = 1), + (this.emissiveMap = null), + (this.bumpMap = null), + (this.bumpScale = 1), + (this.normalMap = null), + (this.normalMapType = TangentSpaceNormalMap), + (this.normalScale = new Vector2(1, 1)), + (this.displacementMap = null), + (this.displacementScale = 1), + (this.displacementBias = 0), + (this.roughnessMap = null), + (this.metalnessMap = null), + (this.alphaMap = null), + (this.envMap = null), + (this.envMapIntensity = 1), + (this.wireframe = !1), + (this.wireframeLinewidth = 1), + (this.wireframeLinecap = 'round'), + (this.wireframeLinejoin = 'round'), + (this.flatShading = !1), + (this.fog = !0), + this.setValues(et) + } + copy(et) { + return ( + super.copy(et), + (this.defines = { STANDARD: '' }), + this.color.copy(et.color), + (this.roughness = et.roughness), + (this.metalness = et.metalness), + (this.map = et.map), + (this.lightMap = et.lightMap), + (this.lightMapIntensity = et.lightMapIntensity), + (this.aoMap = et.aoMap), + (this.aoMapIntensity = et.aoMapIntensity), + this.emissive.copy(et.emissive), + (this.emissiveMap = et.emissiveMap), + (this.emissiveIntensity = et.emissiveIntensity), + (this.bumpMap = et.bumpMap), + (this.bumpScale = et.bumpScale), + (this.normalMap = et.normalMap), + (this.normalMapType = et.normalMapType), + this.normalScale.copy(et.normalScale), + (this.displacementMap = et.displacementMap), + (this.displacementScale = et.displacementScale), + (this.displacementBias = et.displacementBias), + (this.roughnessMap = et.roughnessMap), + (this.metalnessMap = et.metalnessMap), + (this.alphaMap = et.alphaMap), + (this.envMap = et.envMap), + (this.envMapIntensity = et.envMapIntensity), + (this.wireframe = et.wireframe), + (this.wireframeLinewidth = et.wireframeLinewidth), + (this.wireframeLinecap = et.wireframeLinecap), + (this.wireframeLinejoin = et.wireframeLinejoin), + (this.flatShading = et.flatShading), + (this.fog = et.fog), + this + ) + } + } + class MeshPhysicalMaterial extends MeshStandardMaterial { + constructor(et) { + super(), + (this.isMeshPhysicalMaterial = !0), + (this.defines = { STANDARD: '', PHYSICAL: '' }), + (this.type = 'MeshPhysicalMaterial'), + (this.clearcoatMap = null), + (this.clearcoatRoughness = 0), + (this.clearcoatRoughnessMap = null), + (this.clearcoatNormalScale = new Vector2(1, 1)), + (this.clearcoatNormalMap = null), + (this.ior = 1.5), + Object.defineProperty(this, 'reflectivity', { + get: function () { + return clamp$5((2.5 * (this.ior - 1)) / (this.ior + 1), 0, 1) + }, + set: function (nt) { + this.ior = (1 + 0.4 * nt) / (1 - 0.4 * nt) + }, + }), + (this.iridescenceMap = null), + (this.iridescenceIOR = 1.3), + (this.iridescenceThicknessRange = [100, 400]), + (this.iridescenceThicknessMap = null), + (this.sheenColor = new Color$1(0)), + (this.sheenColorMap = null), + (this.sheenRoughness = 1), + (this.sheenRoughnessMap = null), + (this.transmissionMap = null), + (this.thickness = 0), + (this.thicknessMap = null), + (this.attenuationDistance = 0), + (this.attenuationColor = new Color$1(1, 1, 1)), + (this.specularIntensity = 1), + (this.specularIntensityMap = null), + (this.specularColor = new Color$1(1, 1, 1)), + (this.specularColorMap = null), + (this._sheen = 0), + (this._clearcoat = 0), + (this._iridescence = 0), + (this._transmission = 0), + this.setValues(et) + } + get sheen() { + return this._sheen + } + set sheen(et) { + this._sheen > 0 != et > 0 && this.version++, (this._sheen = et) + } + get clearcoat() { + return this._clearcoat + } + set clearcoat(et) { + this._clearcoat > 0 != et > 0 && this.version++, (this._clearcoat = et) + } + get iridescence() { + return this._iridescence + } + set iridescence(et) { + this._iridescence > 0 != et > 0 && this.version++, (this._iridescence = et) + } + get transmission() { + return this._transmission + } + set transmission(et) { + this._transmission > 0 != et > 0 && this.version++, (this._transmission = et) + } + copy(et) { + return ( + super.copy(et), + (this.defines = { STANDARD: '', PHYSICAL: '' }), + (this.clearcoat = et.clearcoat), + (this.clearcoatMap = et.clearcoatMap), + (this.clearcoatRoughness = et.clearcoatRoughness), + (this.clearcoatRoughnessMap = et.clearcoatRoughnessMap), + (this.clearcoatNormalMap = et.clearcoatNormalMap), + this.clearcoatNormalScale.copy(et.clearcoatNormalScale), + (this.ior = et.ior), + (this.iridescence = et.iridescence), + (this.iridescenceMap = et.iridescenceMap), + (this.iridescenceIOR = et.iridescenceIOR), + (this.iridescenceThicknessRange = [...et.iridescenceThicknessRange]), + (this.iridescenceThicknessMap = et.iridescenceThicknessMap), + (this.sheen = et.sheen), + this.sheenColor.copy(et.sheenColor), + (this.sheenColorMap = et.sheenColorMap), + (this.sheenRoughness = et.sheenRoughness), + (this.sheenRoughnessMap = et.sheenRoughnessMap), + (this.transmission = et.transmission), + (this.transmissionMap = et.transmissionMap), + (this.thickness = et.thickness), + (this.thicknessMap = et.thicknessMap), + (this.attenuationDistance = et.attenuationDistance), + this.attenuationColor.copy(et.attenuationColor), + (this.specularIntensity = et.specularIntensity), + (this.specularIntensityMap = et.specularIntensityMap), + this.specularColor.copy(et.specularColor), + (this.specularColorMap = et.specularColorMap), + this + ) + } + } + class MeshPhongMaterial extends Material { + constructor(et) { + super(), + (this.isMeshPhongMaterial = !0), + (this.type = 'MeshPhongMaterial'), + (this.color = new Color$1(16777215)), + (this.specular = new Color$1(1118481)), + (this.shininess = 30), + (this.map = null), + (this.lightMap = null), + (this.lightMapIntensity = 1), + (this.aoMap = null), + (this.aoMapIntensity = 1), + (this.emissive = new Color$1(0)), + (this.emissiveIntensity = 1), + (this.emissiveMap = null), + (this.bumpMap = null), + (this.bumpScale = 1), + (this.normalMap = null), + (this.normalMapType = TangentSpaceNormalMap), + (this.normalScale = new Vector2(1, 1)), + (this.displacementMap = null), + (this.displacementScale = 1), + (this.displacementBias = 0), + (this.specularMap = null), + (this.alphaMap = null), + (this.envMap = null), + (this.combine = MultiplyOperation), + (this.reflectivity = 1), + (this.refractionRatio = 0.98), + (this.wireframe = !1), + (this.wireframeLinewidth = 1), + (this.wireframeLinecap = 'round'), + (this.wireframeLinejoin = 'round'), + (this.flatShading = !1), + (this.fog = !0), + this.setValues(et) + } + copy(et) { + return ( + super.copy(et), + this.color.copy(et.color), + this.specular.copy(et.specular), + (this.shininess = et.shininess), + (this.map = et.map), + (this.lightMap = et.lightMap), + (this.lightMapIntensity = et.lightMapIntensity), + (this.aoMap = et.aoMap), + (this.aoMapIntensity = et.aoMapIntensity), + this.emissive.copy(et.emissive), + (this.emissiveMap = et.emissiveMap), + (this.emissiveIntensity = et.emissiveIntensity), + (this.bumpMap = et.bumpMap), + (this.bumpScale = et.bumpScale), + (this.normalMap = et.normalMap), + (this.normalMapType = et.normalMapType), + this.normalScale.copy(et.normalScale), + (this.displacementMap = et.displacementMap), + (this.displacementScale = et.displacementScale), + (this.displacementBias = et.displacementBias), + (this.specularMap = et.specularMap), + (this.alphaMap = et.alphaMap), + (this.envMap = et.envMap), + (this.combine = et.combine), + (this.reflectivity = et.reflectivity), + (this.refractionRatio = et.refractionRatio), + (this.wireframe = et.wireframe), + (this.wireframeLinewidth = et.wireframeLinewidth), + (this.wireframeLinecap = et.wireframeLinecap), + (this.wireframeLinejoin = et.wireframeLinejoin), + (this.flatShading = et.flatShading), + (this.fog = et.fog), + this + ) + } + } + class MeshToonMaterial extends Material { + constructor(et) { + super(), + (this.isMeshToonMaterial = !0), + (this.defines = { TOON: '' }), + (this.type = 'MeshToonMaterial'), + (this.color = new Color$1(16777215)), + (this.map = null), + (this.gradientMap = null), + (this.lightMap = null), + (this.lightMapIntensity = 1), + (this.aoMap = null), + (this.aoMapIntensity = 1), + (this.emissive = new Color$1(0)), + (this.emissiveIntensity = 1), + (this.emissiveMap = null), + (this.bumpMap = null), + (this.bumpScale = 1), + (this.normalMap = null), + (this.normalMapType = TangentSpaceNormalMap), + (this.normalScale = new Vector2(1, 1)), + (this.displacementMap = null), + (this.displacementScale = 1), + (this.displacementBias = 0), + (this.alphaMap = null), + (this.wireframe = !1), + (this.wireframeLinewidth = 1), + (this.wireframeLinecap = 'round'), + (this.wireframeLinejoin = 'round'), + (this.fog = !0), + this.setValues(et) + } + copy(et) { + return ( + super.copy(et), + this.color.copy(et.color), + (this.map = et.map), + (this.gradientMap = et.gradientMap), + (this.lightMap = et.lightMap), + (this.lightMapIntensity = et.lightMapIntensity), + (this.aoMap = et.aoMap), + (this.aoMapIntensity = et.aoMapIntensity), + this.emissive.copy(et.emissive), + (this.emissiveMap = et.emissiveMap), + (this.emissiveIntensity = et.emissiveIntensity), + (this.bumpMap = et.bumpMap), + (this.bumpScale = et.bumpScale), + (this.normalMap = et.normalMap), + (this.normalMapType = et.normalMapType), + this.normalScale.copy(et.normalScale), + (this.displacementMap = et.displacementMap), + (this.displacementScale = et.displacementScale), + (this.displacementBias = et.displacementBias), + (this.alphaMap = et.alphaMap), + (this.wireframe = et.wireframe), + (this.wireframeLinewidth = et.wireframeLinewidth), + (this.wireframeLinecap = et.wireframeLinecap), + (this.wireframeLinejoin = et.wireframeLinejoin), + (this.fog = et.fog), + this + ) + } + } + class MeshNormalMaterial extends Material { + constructor(et) { + super(), + (this.isMeshNormalMaterial = !0), + (this.type = 'MeshNormalMaterial'), + (this.bumpMap = null), + (this.bumpScale = 1), + (this.normalMap = null), + (this.normalMapType = TangentSpaceNormalMap), + (this.normalScale = new Vector2(1, 1)), + (this.displacementMap = null), + (this.displacementScale = 1), + (this.displacementBias = 0), + (this.wireframe = !1), + (this.wireframeLinewidth = 1), + (this.flatShading = !1), + this.setValues(et) + } + copy(et) { + return ( + super.copy(et), + (this.bumpMap = et.bumpMap), + (this.bumpScale = et.bumpScale), + (this.normalMap = et.normalMap), + (this.normalMapType = et.normalMapType), + this.normalScale.copy(et.normalScale), + (this.displacementMap = et.displacementMap), + (this.displacementScale = et.displacementScale), + (this.displacementBias = et.displacementBias), + (this.wireframe = et.wireframe), + (this.wireframeLinewidth = et.wireframeLinewidth), + (this.flatShading = et.flatShading), + this + ) + } + } + class MeshLambertMaterial extends Material { + constructor(et) { + super(), + (this.isMeshLambertMaterial = !0), + (this.type = 'MeshLambertMaterial'), + (this.color = new Color$1(16777215)), + (this.map = null), + (this.lightMap = null), + (this.lightMapIntensity = 1), + (this.aoMap = null), + (this.aoMapIntensity = 1), + (this.emissive = new Color$1(0)), + (this.emissiveIntensity = 1), + (this.emissiveMap = null), + (this.specularMap = null), + (this.alphaMap = null), + (this.envMap = null), + (this.combine = MultiplyOperation), + (this.reflectivity = 1), + (this.refractionRatio = 0.98), + (this.wireframe = !1), + (this.wireframeLinewidth = 1), + (this.wireframeLinecap = 'round'), + (this.wireframeLinejoin = 'round'), + (this.fog = !0), + this.setValues(et) + } + copy(et) { + return ( + super.copy(et), + this.color.copy(et.color), + (this.map = et.map), + (this.lightMap = et.lightMap), + (this.lightMapIntensity = et.lightMapIntensity), + (this.aoMap = et.aoMap), + (this.aoMapIntensity = et.aoMapIntensity), + this.emissive.copy(et.emissive), + (this.emissiveMap = et.emissiveMap), + (this.emissiveIntensity = et.emissiveIntensity), + (this.specularMap = et.specularMap), + (this.alphaMap = et.alphaMap), + (this.envMap = et.envMap), + (this.combine = et.combine), + (this.reflectivity = et.reflectivity), + (this.refractionRatio = et.refractionRatio), + (this.wireframe = et.wireframe), + (this.wireframeLinewidth = et.wireframeLinewidth), + (this.wireframeLinecap = et.wireframeLinecap), + (this.wireframeLinejoin = et.wireframeLinejoin), + (this.fog = et.fog), + this + ) + } + } + class MeshMatcapMaterial extends Material { + constructor(et) { + super(), + (this.isMeshMatcapMaterial = !0), + (this.defines = { MATCAP: '' }), + (this.type = 'MeshMatcapMaterial'), + (this.color = new Color$1(16777215)), + (this.matcap = null), + (this.map = null), + (this.bumpMap = null), + (this.bumpScale = 1), + (this.normalMap = null), + (this.normalMapType = TangentSpaceNormalMap), + (this.normalScale = new Vector2(1, 1)), + (this.displacementMap = null), + (this.displacementScale = 1), + (this.displacementBias = 0), + (this.alphaMap = null), + (this.flatShading = !1), + (this.fog = !0), + this.setValues(et) + } + copy(et) { + return ( + super.copy(et), + (this.defines = { MATCAP: '' }), + this.color.copy(et.color), + (this.matcap = et.matcap), + (this.map = et.map), + (this.bumpMap = et.bumpMap), + (this.bumpScale = et.bumpScale), + (this.normalMap = et.normalMap), + (this.normalMapType = et.normalMapType), + this.normalScale.copy(et.normalScale), + (this.displacementMap = et.displacementMap), + (this.displacementScale = et.displacementScale), + (this.displacementBias = et.displacementBias), + (this.alphaMap = et.alphaMap), + (this.flatShading = et.flatShading), + (this.fog = et.fog), + this + ) + } + } + class LineDashedMaterial extends LineBasicMaterial { + constructor(et) { + super(), + (this.isLineDashedMaterial = !0), + (this.type = 'LineDashedMaterial'), + (this.scale = 1), + (this.dashSize = 3), + (this.gapSize = 1), + this.setValues(et) + } + copy(et) { + return super.copy(et), (this.scale = et.scale), (this.dashSize = et.dashSize), (this.gapSize = et.gapSize), this + } + } + function arraySlice(tt, et, nt) { + return isTypedArray$2(tt) ? new tt.constructor(tt.subarray(et, nt !== void 0 ? nt : tt.length)) : tt.slice(et, nt) + } + function convertArray(tt, et, nt) { + return !tt || (!nt && tt.constructor === et) + ? tt + : typeof et.BYTES_PER_ELEMENT == 'number' + ? new et(tt) + : Array.prototype.slice.call(tt) + } + function isTypedArray$2(tt) { + return ArrayBuffer.isView(tt) && !(tt instanceof DataView) + } + function getKeyframeOrder(tt) { + function et(it, ot) { + return tt[it] - tt[ot] + } + const nt = tt.length, + rt = new Array(nt) + for (let it = 0; it !== nt; ++it) rt[it] = it + return rt.sort(et), rt + } + function sortedArray(tt, et, nt) { + const rt = tt.length, + it = new tt.constructor(rt) + for (let ot = 0, at = 0; at !== rt; ++ot) { + const st = nt[ot] * et + for (let lt = 0; lt !== et; ++lt) it[at++] = tt[st + lt] + } + return it + } + function flattenJSON(tt, et, nt, rt) { + let it = 1, + ot = tt[0] + for (; ot !== void 0 && ot[rt] === void 0; ) ot = tt[it++] + if (ot === void 0) return + let at = ot[rt] + if (at !== void 0) + if (Array.isArray(at)) + do (at = ot[rt]), at !== void 0 && (et.push(ot.time), nt.push.apply(nt, at)), (ot = tt[it++]) + while (ot !== void 0) + else if (at.toArray !== void 0) + do (at = ot[rt]), at !== void 0 && (et.push(ot.time), at.toArray(nt, nt.length)), (ot = tt[it++]) + while (ot !== void 0) + else + do (at = ot[rt]), at !== void 0 && (et.push(ot.time), nt.push(at)), (ot = tt[it++]) + while (ot !== void 0) + } + function subclip(tt, et, nt, rt, it = 30) { + const ot = tt.clone() + ot.name = et + const at = [] + for (let lt = 0; lt < ot.tracks.length; ++lt) { + const ct = ot.tracks[lt], + ut = ct.getValueSize(), + ht = [], + dt = [] + for (let pt = 0; pt < ct.times.length; ++pt) { + const mt = ct.times[pt] * it + if (!(mt < nt || mt >= rt)) { + ht.push(ct.times[pt]) + for (let gt = 0; gt < ut; ++gt) dt.push(ct.values[pt * ut + gt]) + } + } + ht.length !== 0 && + ((ct.times = convertArray(ht, ct.times.constructor)), + (ct.values = convertArray(dt, ct.values.constructor)), + at.push(ct)) + } + ot.tracks = at + let st = 1 / 0 + for (let lt = 0; lt < ot.tracks.length; ++lt) st > ot.tracks[lt].times[0] && (st = ot.tracks[lt].times[0]) + for (let lt = 0; lt < ot.tracks.length; ++lt) ot.tracks[lt].shift(-1 * st) + return ot.resetDuration(), ot + } + function makeClipAdditive(tt, et = 0, nt = tt, rt = 30) { + rt <= 0 && (rt = 30) + const it = nt.tracks.length, + ot = et / rt + for (let at = 0; at < it; ++at) { + const st = nt.tracks[at], + lt = st.ValueTypeName + if (lt === 'bool' || lt === 'string') continue + const ct = tt.tracks.find(function (bt) { + return bt.name === st.name && bt.ValueTypeName === lt + }) + if (ct === void 0) continue + let ut = 0 + const ht = st.getValueSize() + st.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline && (ut = ht / 3) + let dt = 0 + const pt = ct.getValueSize() + ct.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline && (dt = pt / 3) + const mt = st.times.length - 1 + let gt + if (ot <= st.times[0]) { + const bt = ut, + vt = ht - ut + gt = arraySlice(st.values, bt, vt) + } else if (ot >= st.times[mt]) { + const bt = mt * ht + ut, + vt = bt + ht - ut + gt = arraySlice(st.values, bt, vt) + } else { + const bt = st.createInterpolant(), + vt = ut, + xt = ht - ut + bt.evaluate(ot), (gt = arraySlice(bt.resultBuffer, vt, xt)) + } + lt === 'quaternion' && new Quaternion().fromArray(gt).normalize().conjugate().toArray(gt) + const yt = ct.times.length + for (let bt = 0; bt < yt; ++bt) { + const vt = bt * pt + dt + if (lt === 'quaternion') Quaternion.multiplyQuaternionsFlat(ct.values, vt, gt, 0, ct.values, vt) + else { + const xt = pt - dt * 2 + for (let kt = 0; kt < xt; ++kt) ct.values[vt + kt] -= gt[kt] + } + } + } + return (tt.blendMode = AdditiveAnimationBlendMode), tt + } + var AnimationUtils = Object.freeze({ + __proto__: null, + arraySlice, + convertArray, + isTypedArray: isTypedArray$2, + getKeyframeOrder, + sortedArray, + flattenJSON, + subclip, + makeClipAdditive, + }) + class Interpolant { + constructor(et, nt, rt, it) { + ;(this.parameterPositions = et), + (this._cachedIndex = 0), + (this.resultBuffer = it !== void 0 ? it : new nt.constructor(rt)), + (this.sampleValues = nt), + (this.valueSize = rt), + (this.settings = null), + (this.DefaultSettings_ = {}) + } + evaluate(et) { + const nt = this.parameterPositions + let rt = this._cachedIndex, + it = nt[rt], + ot = nt[rt - 1] + e: { + t: { + let at + n: { + r: if (!(et < it)) { + for (let st = rt + 2; ; ) { + if (it === void 0) { + if (et < ot) break r + return (rt = nt.length), (this._cachedIndex = rt), this.copySampleValue_(rt - 1) + } + if (rt === st) break + if (((ot = it), (it = nt[++rt]), et < it)) break t + } + at = nt.length + break n + } + if (!(et >= ot)) { + const st = nt[1] + et < st && ((rt = 2), (ot = st)) + for (let lt = rt - 2; ; ) { + if (ot === void 0) return (this._cachedIndex = 0), this.copySampleValue_(0) + if (rt === lt) break + if (((it = ot), (ot = nt[--rt - 1]), et >= ot)) break t + } + ;(at = rt), (rt = 0) + break n + } + break e + } + for (; rt < at; ) { + const st = (rt + at) >>> 1 + et < nt[st] ? (at = st) : (rt = st + 1) + } + if (((it = nt[rt]), (ot = nt[rt - 1]), ot === void 0)) + return (this._cachedIndex = 0), this.copySampleValue_(0) + if (it === void 0) return (rt = nt.length), (this._cachedIndex = rt), this.copySampleValue_(rt - 1) + } + ;(this._cachedIndex = rt), this.intervalChanged_(rt, ot, it) + } + return this.interpolate_(rt, ot, et, it) + } + getSettings_() { + return this.settings || this.DefaultSettings_ + } + copySampleValue_(et) { + const nt = this.resultBuffer, + rt = this.sampleValues, + it = this.valueSize, + ot = et * it + for (let at = 0; at !== it; ++at) nt[at] = rt[ot + at] + return nt + } + interpolate_() { + throw new Error('call to abstract method') + } + intervalChanged_() {} + } + class CubicInterpolant extends Interpolant { + constructor(et, nt, rt, it) { + super(et, nt, rt, it), + (this._weightPrev = -0), + (this._offsetPrev = -0), + (this._weightNext = -0), + (this._offsetNext = -0), + (this.DefaultSettings_ = { endingStart: ZeroCurvatureEnding, endingEnd: ZeroCurvatureEnding }) + } + intervalChanged_(et, nt, rt) { + const it = this.parameterPositions + let ot = et - 2, + at = et + 1, + st = it[ot], + lt = it[at] + if (st === void 0) + switch (this.getSettings_().endingStart) { + case ZeroSlopeEnding: + ;(ot = et), (st = 2 * nt - rt) + break + case WrapAroundEnding: + ;(ot = it.length - 2), (st = nt + it[ot] - it[ot + 1]) + break + default: + ;(ot = et), (st = rt) + } + if (lt === void 0) + switch (this.getSettings_().endingEnd) { + case ZeroSlopeEnding: + ;(at = et), (lt = 2 * rt - nt) + break + case WrapAroundEnding: + ;(at = 1), (lt = rt + it[1] - it[0]) + break + default: + ;(at = et - 1), (lt = nt) + } + const ct = (rt - nt) * 0.5, + ut = this.valueSize + ;(this._weightPrev = ct / (nt - st)), + (this._weightNext = ct / (lt - rt)), + (this._offsetPrev = ot * ut), + (this._offsetNext = at * ut) + } + interpolate_(et, nt, rt, it) { + const ot = this.resultBuffer, + at = this.sampleValues, + st = this.valueSize, + lt = et * st, + ct = lt - st, + ut = this._offsetPrev, + ht = this._offsetNext, + dt = this._weightPrev, + pt = this._weightNext, + mt = (rt - nt) / (it - nt), + gt = mt * mt, + yt = gt * mt, + bt = -dt * yt + 2 * dt * gt - dt * mt, + vt = (1 + dt) * yt + (-1.5 - 2 * dt) * gt + (-0.5 + dt) * mt + 1, + xt = (-1 - pt) * yt + (1.5 + pt) * gt + 0.5 * mt, + kt = pt * yt - pt * gt + for (let St = 0; St !== st; ++St) + ot[St] = bt * at[ut + St] + vt * at[ct + St] + xt * at[lt + St] + kt * at[ht + St] + return ot + } + } + class LinearInterpolant extends Interpolant { + constructor(et, nt, rt, it) { + super(et, nt, rt, it) + } + interpolate_(et, nt, rt, it) { + const ot = this.resultBuffer, + at = this.sampleValues, + st = this.valueSize, + lt = et * st, + ct = lt - st, + ut = (rt - nt) / (it - nt), + ht = 1 - ut + for (let dt = 0; dt !== st; ++dt) ot[dt] = at[ct + dt] * ht + at[lt + dt] * ut + return ot + } + } + class DiscreteInterpolant extends Interpolant { + constructor(et, nt, rt, it) { + super(et, nt, rt, it) + } + interpolate_(et) { + return this.copySampleValue_(et - 1) + } + } + class KeyframeTrack { + constructor(et, nt, rt, it) { + if (et === void 0) throw new Error('THREE.KeyframeTrack: track name is undefined') + if (nt === void 0 || nt.length === 0) throw new Error('THREE.KeyframeTrack: no keyframes in track named ' + et) + ;(this.name = et), + (this.times = convertArray(nt, this.TimeBufferType)), + (this.values = convertArray(rt, this.ValueBufferType)), + this.setInterpolation(it || this.DefaultInterpolation) + } + static toJSON(et) { + const nt = et.constructor + let rt + if (nt.toJSON !== this.toJSON) rt = nt.toJSON(et) + else { + rt = { name: et.name, times: convertArray(et.times, Array), values: convertArray(et.values, Array) } + const it = et.getInterpolation() + it !== et.DefaultInterpolation && (rt.interpolation = it) + } + return (rt.type = et.ValueTypeName), rt + } + InterpolantFactoryMethodDiscrete(et) { + return new DiscreteInterpolant(this.times, this.values, this.getValueSize(), et) + } + InterpolantFactoryMethodLinear(et) { + return new LinearInterpolant(this.times, this.values, this.getValueSize(), et) + } + InterpolantFactoryMethodSmooth(et) { + return new CubicInterpolant(this.times, this.values, this.getValueSize(), et) + } + setInterpolation(et) { + let nt + switch (et) { + case InterpolateDiscrete: + nt = this.InterpolantFactoryMethodDiscrete + break + case InterpolateLinear: + nt = this.InterpolantFactoryMethodLinear + break + case InterpolateSmooth: + nt = this.InterpolantFactoryMethodSmooth + break + } + if (nt === void 0) { + const rt = 'unsupported interpolation for ' + this.ValueTypeName + ' keyframe track named ' + this.name + if (this.createInterpolant === void 0) + if (et !== this.DefaultInterpolation) this.setInterpolation(this.DefaultInterpolation) + else throw new Error(rt) + return console.warn('THREE.KeyframeTrack:', rt), this + } + return (this.createInterpolant = nt), this + } + getInterpolation() { + switch (this.createInterpolant) { + case this.InterpolantFactoryMethodDiscrete: + return InterpolateDiscrete + case this.InterpolantFactoryMethodLinear: + return InterpolateLinear + case this.InterpolantFactoryMethodSmooth: + return InterpolateSmooth + } + } + getValueSize() { + return this.values.length / this.times.length + } + shift(et) { + if (et !== 0) { + const nt = this.times + for (let rt = 0, it = nt.length; rt !== it; ++rt) nt[rt] += et + } + return this + } + scale(et) { + if (et !== 1) { + const nt = this.times + for (let rt = 0, it = nt.length; rt !== it; ++rt) nt[rt] *= et + } + return this + } + trim(et, nt) { + const rt = this.times, + it = rt.length + let ot = 0, + at = it - 1 + for (; ot !== it && rt[ot] < et; ) ++ot + for (; at !== -1 && rt[at] > nt; ) --at + if ((++at, ot !== 0 || at !== it)) { + ot >= at && ((at = Math.max(at, 1)), (ot = at - 1)) + const st = this.getValueSize() + ;(this.times = arraySlice(rt, ot, at)), (this.values = arraySlice(this.values, ot * st, at * st)) + } + return this + } + validate() { + let et = !0 + const nt = this.getValueSize() + nt - Math.floor(nt) !== 0 && (console.error('THREE.KeyframeTrack: Invalid value size in track.', this), (et = !1)) + const rt = this.times, + it = this.values, + ot = rt.length + ot === 0 && (console.error('THREE.KeyframeTrack: Track is empty.', this), (et = !1)) + let at = null + for (let st = 0; st !== ot; st++) { + const lt = rt[st] + if (typeof lt == 'number' && isNaN(lt)) { + console.error('THREE.KeyframeTrack: Time is not a valid number.', this, st, lt), (et = !1) + break + } + if (at !== null && at > lt) { + console.error('THREE.KeyframeTrack: Out of order keys.', this, st, lt, at), (et = !1) + break + } + at = lt + } + if (it !== void 0 && isTypedArray$2(it)) + for (let st = 0, lt = it.length; st !== lt; ++st) { + const ct = it[st] + if (isNaN(ct)) { + console.error('THREE.KeyframeTrack: Value is not a valid number.', this, st, ct), (et = !1) + break + } + } + return et + } + optimize() { + const et = arraySlice(this.times), + nt = arraySlice(this.values), + rt = this.getValueSize(), + it = this.getInterpolation() === InterpolateSmooth, + ot = et.length - 1 + let at = 1 + for (let st = 1; st < ot; ++st) { + let lt = !1 + const ct = et[st], + ut = et[st + 1] + if (ct !== ut && (st !== 1 || ct !== et[0])) + if (it) lt = !0 + else { + const ht = st * rt, + dt = ht - rt, + pt = ht + rt + for (let mt = 0; mt !== rt; ++mt) { + const gt = nt[ht + mt] + if (gt !== nt[dt + mt] || gt !== nt[pt + mt]) { + lt = !0 + break + } + } + } + if (lt) { + if (st !== at) { + et[at] = et[st] + const ht = st * rt, + dt = at * rt + for (let pt = 0; pt !== rt; ++pt) nt[dt + pt] = nt[ht + pt] + } + ++at + } + } + if (ot > 0) { + et[at] = et[ot] + for (let st = ot * rt, lt = at * rt, ct = 0; ct !== rt; ++ct) nt[lt + ct] = nt[st + ct] + ++at + } + return ( + at !== et.length + ? ((this.times = arraySlice(et, 0, at)), (this.values = arraySlice(nt, 0, at * rt))) + : ((this.times = et), (this.values = nt)), + this + ) + } + clone() { + const et = arraySlice(this.times, 0), + nt = arraySlice(this.values, 0), + rt = this.constructor, + it = new rt(this.name, et, nt) + return (it.createInterpolant = this.createInterpolant), it + } + } + KeyframeTrack.prototype.TimeBufferType = Float32Array + KeyframeTrack.prototype.ValueBufferType = Float32Array + KeyframeTrack.prototype.DefaultInterpolation = InterpolateLinear + class BooleanKeyframeTrack extends KeyframeTrack {} + BooleanKeyframeTrack.prototype.ValueTypeName = 'bool' + BooleanKeyframeTrack.prototype.ValueBufferType = Array + BooleanKeyframeTrack.prototype.DefaultInterpolation = InterpolateDiscrete + BooleanKeyframeTrack.prototype.InterpolantFactoryMethodLinear = void 0 + BooleanKeyframeTrack.prototype.InterpolantFactoryMethodSmooth = void 0 + class ColorKeyframeTrack extends KeyframeTrack {} + ColorKeyframeTrack.prototype.ValueTypeName = 'color' + class NumberKeyframeTrack extends KeyframeTrack {} + NumberKeyframeTrack.prototype.ValueTypeName = 'number' + class QuaternionLinearInterpolant extends Interpolant { + constructor(et, nt, rt, it) { + super(et, nt, rt, it) + } + interpolate_(et, nt, rt, it) { + const ot = this.resultBuffer, + at = this.sampleValues, + st = this.valueSize, + lt = (rt - nt) / (it - nt) + let ct = et * st + for (let ut = ct + st; ct !== ut; ct += 4) Quaternion.slerpFlat(ot, 0, at, ct - st, at, ct, lt) + return ot + } + } + class QuaternionKeyframeTrack extends KeyframeTrack { + InterpolantFactoryMethodLinear(et) { + return new QuaternionLinearInterpolant(this.times, this.values, this.getValueSize(), et) + } + } + QuaternionKeyframeTrack.prototype.ValueTypeName = 'quaternion' + QuaternionKeyframeTrack.prototype.DefaultInterpolation = InterpolateLinear + QuaternionKeyframeTrack.prototype.InterpolantFactoryMethodSmooth = void 0 + class StringKeyframeTrack extends KeyframeTrack {} + StringKeyframeTrack.prototype.ValueTypeName = 'string' + StringKeyframeTrack.prototype.ValueBufferType = Array + StringKeyframeTrack.prototype.DefaultInterpolation = InterpolateDiscrete + StringKeyframeTrack.prototype.InterpolantFactoryMethodLinear = void 0 + StringKeyframeTrack.prototype.InterpolantFactoryMethodSmooth = void 0 + class VectorKeyframeTrack extends KeyframeTrack {} + VectorKeyframeTrack.prototype.ValueTypeName = 'vector' + class AnimationClip { + constructor(et, nt = -1, rt, it = NormalAnimationBlendMode) { + ;(this.name = et), + (this.tracks = rt), + (this.duration = nt), + (this.blendMode = it), + (this.uuid = generateUUID$1()), + this.duration < 0 && this.resetDuration() + } + static parse(et) { + const nt = [], + rt = et.tracks, + it = 1 / (et.fps || 1) + for (let at = 0, st = rt.length; at !== st; ++at) nt.push(parseKeyframeTrack(rt[at]).scale(it)) + const ot = new this(et.name, et.duration, nt, et.blendMode) + return (ot.uuid = et.uuid), ot + } + static toJSON(et) { + const nt = [], + rt = et.tracks, + it = { name: et.name, duration: et.duration, tracks: nt, uuid: et.uuid, blendMode: et.blendMode } + for (let ot = 0, at = rt.length; ot !== at; ++ot) nt.push(KeyframeTrack.toJSON(rt[ot])) + return it + } + static CreateFromMorphTargetSequence(et, nt, rt, it) { + const ot = nt.length, + at = [] + for (let st = 0; st < ot; st++) { + let lt = [], + ct = [] + lt.push((st + ot - 1) % ot, st, (st + 1) % ot), ct.push(0, 1, 0) + const ut = getKeyframeOrder(lt) + ;(lt = sortedArray(lt, 1, ut)), + (ct = sortedArray(ct, 1, ut)), + !it && lt[0] === 0 && (lt.push(ot), ct.push(ct[0])), + at.push(new NumberKeyframeTrack('.morphTargetInfluences[' + nt[st].name + ']', lt, ct).scale(1 / rt)) + } + return new this(et, -1, at) + } + static findByName(et, nt) { + let rt = et + if (!Array.isArray(et)) { + const it = et + rt = (it.geometry && it.geometry.animations) || it.animations + } + for (let it = 0; it < rt.length; it++) if (rt[it].name === nt) return rt[it] + return null + } + static CreateClipsFromMorphTargetSequences(et, nt, rt) { + const it = {}, + ot = /^([\w-]*?)([\d]+)$/ + for (let st = 0, lt = et.length; st < lt; st++) { + const ct = et[st], + ut = ct.name.match(ot) + if (ut && ut.length > 1) { + const ht = ut[1] + let dt = it[ht] + dt || (it[ht] = dt = []), dt.push(ct) + } + } + const at = [] + for (const st in it) at.push(this.CreateFromMorphTargetSequence(st, it[st], nt, rt)) + return at + } + static parseAnimation(et, nt) { + if (!et) return console.error('THREE.AnimationClip: No animation in JSONLoader data.'), null + const rt = function (ht, dt, pt, mt, gt) { + if (pt.length !== 0) { + const yt = [], + bt = [] + flattenJSON(pt, yt, bt, mt), yt.length !== 0 && gt.push(new ht(dt, yt, bt)) + } + }, + it = [], + ot = et.name || 'default', + at = et.fps || 30, + st = et.blendMode + let lt = et.length || -1 + const ct = et.hierarchy || [] + for (let ht = 0; ht < ct.length; ht++) { + const dt = ct[ht].keys + if (!(!dt || dt.length === 0)) + if (dt[0].morphTargets) { + const pt = {} + let mt + for (mt = 0; mt < dt.length; mt++) + if (dt[mt].morphTargets) + for (let gt = 0; gt < dt[mt].morphTargets.length; gt++) pt[dt[mt].morphTargets[gt]] = -1 + for (const gt in pt) { + const yt = [], + bt = [] + for (let vt = 0; vt !== dt[mt].morphTargets.length; ++vt) { + const xt = dt[mt] + yt.push(xt.time), bt.push(xt.morphTarget === gt ? 1 : 0) + } + it.push(new NumberKeyframeTrack('.morphTargetInfluence[' + gt + ']', yt, bt)) + } + lt = pt.length * at + } else { + const pt = '.bones[' + nt[ht].name + ']' + rt(VectorKeyframeTrack, pt + '.position', dt, 'pos', it), + rt(QuaternionKeyframeTrack, pt + '.quaternion', dt, 'rot', it), + rt(VectorKeyframeTrack, pt + '.scale', dt, 'scl', it) + } + } + return it.length === 0 ? null : new this(ot, lt, it, st) + } + resetDuration() { + const et = this.tracks + let nt = 0 + for (let rt = 0, it = et.length; rt !== it; ++rt) { + const ot = this.tracks[rt] + nt = Math.max(nt, ot.times[ot.times.length - 1]) + } + return (this.duration = nt), this + } + trim() { + for (let et = 0; et < this.tracks.length; et++) this.tracks[et].trim(0, this.duration) + return this + } + validate() { + let et = !0 + for (let nt = 0; nt < this.tracks.length; nt++) et = et && this.tracks[nt].validate() + return et + } + optimize() { + for (let et = 0; et < this.tracks.length; et++) this.tracks[et].optimize() + return this + } + clone() { + const et = [] + for (let nt = 0; nt < this.tracks.length; nt++) et.push(this.tracks[nt].clone()) + return new this.constructor(this.name, this.duration, et, this.blendMode) + } + toJSON() { + return this.constructor.toJSON(this) + } + } + function getTrackTypeForValueTypeName(tt) { + switch (tt.toLowerCase()) { + case 'scalar': + case 'double': + case 'float': + case 'number': + case 'integer': + return NumberKeyframeTrack + case 'vector': + case 'vector2': + case 'vector3': + case 'vector4': + return VectorKeyframeTrack + case 'color': + return ColorKeyframeTrack + case 'quaternion': + return QuaternionKeyframeTrack + case 'bool': + case 'boolean': + return BooleanKeyframeTrack + case 'string': + return StringKeyframeTrack + } + throw new Error('THREE.KeyframeTrack: Unsupported typeName: ' + tt) + } + function parseKeyframeTrack(tt) { + if (tt.type === void 0) throw new Error('THREE.KeyframeTrack: track type undefined, can not parse') + const et = getTrackTypeForValueTypeName(tt.type) + if (tt.times === void 0) { + const nt = [], + rt = [] + flattenJSON(tt.keys, nt, rt, 'value'), (tt.times = nt), (tt.values = rt) + } + return et.parse !== void 0 ? et.parse(tt) : new et(tt.name, tt.times, tt.values, tt.interpolation) + } + const Cache = { + enabled: !1, + files: {}, + add: function (tt, et) { + this.enabled !== !1 && (this.files[tt] = et) + }, + get: function (tt) { + if (this.enabled !== !1) return this.files[tt] + }, + remove: function (tt) { + delete this.files[tt] + }, + clear: function () { + this.files = {} + }, + } + class LoadingManager { + constructor(et, nt, rt) { + const it = this + let ot = !1, + at = 0, + st = 0, + lt + const ct = [] + ;(this.onStart = void 0), + (this.onLoad = et), + (this.onProgress = nt), + (this.onError = rt), + (this.itemStart = function (ut) { + st++, ot === !1 && it.onStart !== void 0 && it.onStart(ut, at, st), (ot = !0) + }), + (this.itemEnd = function (ut) { + at++, + it.onProgress !== void 0 && it.onProgress(ut, at, st), + at === st && ((ot = !1), it.onLoad !== void 0 && it.onLoad()) + }), + (this.itemError = function (ut) { + it.onError !== void 0 && it.onError(ut) + }), + (this.resolveURL = function (ut) { + return lt ? lt(ut) : ut + }), + (this.setURLModifier = function (ut) { + return (lt = ut), this + }), + (this.addHandler = function (ut, ht) { + return ct.push(ut, ht), this + }), + (this.removeHandler = function (ut) { + const ht = ct.indexOf(ut) + return ht !== -1 && ct.splice(ht, 2), this + }), + (this.getHandler = function (ut) { + for (let ht = 0, dt = ct.length; ht < dt; ht += 2) { + const pt = ct[ht], + mt = ct[ht + 1] + if ((pt.global && (pt.lastIndex = 0), pt.test(ut))) return mt + } + return null + }) + } + } + const DefaultLoadingManager = new LoadingManager() + let Loader$2 = class { + constructor(et) { + ;(this.manager = et !== void 0 ? et : DefaultLoadingManager), + (this.crossOrigin = 'anonymous'), + (this.withCredentials = !1), + (this.path = ''), + (this.resourcePath = ''), + (this.requestHeader = {}) + } + load() {} + loadAsync(et, nt) { + const rt = this + return new Promise(function (it, ot) { + rt.load(et, it, nt, ot) + }) + } + parse() {} + setCrossOrigin(et) { + return (this.crossOrigin = et), this + } + setWithCredentials(et) { + return (this.withCredentials = et), this + } + setPath(et) { + return (this.path = et), this + } + setResourcePath(et) { + return (this.resourcePath = et), this + } + setRequestHeader(et) { + return (this.requestHeader = et), this + } + } + const loading = {} + class HttpError extends Error { + constructor(et, nt) { + super(et), (this.response = nt) + } + } + class FileLoader extends Loader$2 { + constructor(et) { + super(et) + } + load(et, nt, rt, it) { + et === void 0 && (et = ''), this.path !== void 0 && (et = this.path + et), (et = this.manager.resolveURL(et)) + const ot = Cache.get(et) + if (ot !== void 0) + return ( + this.manager.itemStart(et), + setTimeout(() => { + nt && nt(ot), this.manager.itemEnd(et) + }, 0), + ot + ) + if (loading[et] !== void 0) { + loading[et].push({ onLoad: nt, onProgress: rt, onError: it }) + return + } + ;(loading[et] = []), loading[et].push({ onLoad: nt, onProgress: rt, onError: it }) + const at = new Request(et, { + headers: new Headers(this.requestHeader), + credentials: this.withCredentials ? 'include' : 'same-origin', + }), + st = this.mimeType, + lt = this.responseType + fetch(at) + .then((ct) => { + if (ct.status === 200 || ct.status === 0) { + if ( + (ct.status === 0 && console.warn('THREE.FileLoader: HTTP Status 0 received.'), + typeof ReadableStream > 'u' || ct.body === void 0 || ct.body.getReader === void 0) + ) + return ct + const ut = loading[et], + ht = ct.body.getReader(), + dt = ct.headers.get('Content-Length'), + pt = dt ? parseInt(dt) : 0, + mt = pt !== 0 + let gt = 0 + const yt = new ReadableStream({ + start(bt) { + vt() + function vt() { + ht.read().then(({ done: xt, value: kt }) => { + if (xt) bt.close() + else { + gt += kt.byteLength + const St = new ProgressEvent('progress', { lengthComputable: mt, loaded: gt, total: pt }) + for (let Tt = 0, At = ut.length; Tt < At; Tt++) { + const Et = ut[Tt] + Et.onProgress && Et.onProgress(St) + } + bt.enqueue(kt), vt() + } + }) + } + }, + }) + return new Response(yt) + } else throw new HttpError(`fetch for "${ct.url}" responded with ${ct.status}: ${ct.statusText}`, ct) + }) + .then((ct) => { + switch (lt) { + case 'arraybuffer': + return ct.arrayBuffer() + case 'blob': + return ct.blob() + case 'document': + return ct.text().then((ut) => new DOMParser().parseFromString(ut, st)) + case 'json': + return ct.json() + default: + if (st === void 0) return ct.text() + { + const ht = /charset="?([^;"\s]*)"?/i.exec(st), + dt = ht && ht[1] ? ht[1].toLowerCase() : void 0, + pt = new TextDecoder(dt) + return ct.arrayBuffer().then((mt) => pt.decode(mt)) + } + } + }) + .then((ct) => { + Cache.add(et, ct) + const ut = loading[et] + delete loading[et] + for (let ht = 0, dt = ut.length; ht < dt; ht++) { + const pt = ut[ht] + pt.onLoad && pt.onLoad(ct) + } + }) + .catch((ct) => { + const ut = loading[et] + if (ut === void 0) throw (this.manager.itemError(et), ct) + delete loading[et] + for (let ht = 0, dt = ut.length; ht < dt; ht++) { + const pt = ut[ht] + pt.onError && pt.onError(ct) + } + this.manager.itemError(et) + }) + .finally(() => { + this.manager.itemEnd(et) + }), + this.manager.itemStart(et) + } + setResponseType(et) { + return (this.responseType = et), this + } + setMimeType(et) { + return (this.mimeType = et), this + } + } + class AnimationLoader extends Loader$2 { + constructor(et) { + super(et) + } + load(et, nt, rt, it) { + const ot = this, + at = new FileLoader(this.manager) + at.setPath(this.path), + at.setRequestHeader(this.requestHeader), + at.setWithCredentials(this.withCredentials), + at.load( + et, + function (st) { + try { + nt(ot.parse(JSON.parse(st))) + } catch (lt) { + it ? it(lt) : console.error(lt), ot.manager.itemError(et) + } + }, + rt, + it, + ) + } + parse(et) { + const nt = [] + for (let rt = 0; rt < et.length; rt++) { + const it = AnimationClip.parse(et[rt]) + nt.push(it) + } + return nt + } + } + class CompressedTextureLoader extends Loader$2 { + constructor(et) { + super(et) + } + load(et, nt, rt, it) { + const ot = this, + at = [], + st = new CompressedTexture(), + lt = new FileLoader(this.manager) + lt.setPath(this.path), + lt.setResponseType('arraybuffer'), + lt.setRequestHeader(this.requestHeader), + lt.setWithCredentials(ot.withCredentials) + let ct = 0 + function ut(ht) { + lt.load( + et[ht], + function (dt) { + const pt = ot.parse(dt, !0) + ;(at[ht] = { width: pt.width, height: pt.height, format: pt.format, mipmaps: pt.mipmaps }), + (ct += 1), + ct === 6 && + (pt.mipmapCount === 1 && (st.minFilter = LinearFilter), + (st.image = at), + (st.format = pt.format), + (st.needsUpdate = !0), + nt && nt(st)) + }, + rt, + it, + ) + } + if (Array.isArray(et)) for (let ht = 0, dt = et.length; ht < dt; ++ht) ut(ht) + else + lt.load( + et, + function (ht) { + const dt = ot.parse(ht, !0) + if (dt.isCubemap) { + const pt = dt.mipmaps.length / dt.mipmapCount + for (let mt = 0; mt < pt; mt++) { + at[mt] = { mipmaps: [] } + for (let gt = 0; gt < dt.mipmapCount; gt++) + at[mt].mipmaps.push(dt.mipmaps[mt * dt.mipmapCount + gt]), + (at[mt].format = dt.format), + (at[mt].width = dt.width), + (at[mt].height = dt.height) + } + st.image = at + } else (st.image.width = dt.width), (st.image.height = dt.height), (st.mipmaps = dt.mipmaps) + dt.mipmapCount === 1 && (st.minFilter = LinearFilter), + (st.format = dt.format), + (st.needsUpdate = !0), + nt && nt(st) + }, + rt, + it, + ) + return st + } + } + class ImageLoader extends Loader$2 { + constructor(et) { + super(et) + } + load(et, nt, rt, it) { + this.path !== void 0 && (et = this.path + et), (et = this.manager.resolveURL(et)) + const ot = this, + at = Cache.get(et) + if (at !== void 0) + return ( + ot.manager.itemStart(et), + setTimeout(function () { + nt && nt(at), ot.manager.itemEnd(et) + }, 0), + at + ) + const st = createElementNS('img') + function lt() { + ut(), Cache.add(et, this), nt && nt(this), ot.manager.itemEnd(et) + } + function ct(ht) { + ut(), it && it(ht), ot.manager.itemError(et), ot.manager.itemEnd(et) + } + function ut() { + st.removeEventListener('load', lt, !1), st.removeEventListener('error', ct, !1) + } + return ( + st.addEventListener('load', lt, !1), + st.addEventListener('error', ct, !1), + et.slice(0, 5) !== 'data:' && this.crossOrigin !== void 0 && (st.crossOrigin = this.crossOrigin), + ot.manager.itemStart(et), + (st.src = et), + st + ) + } + } + class CubeTextureLoader extends Loader$2 { + constructor(et) { + super(et) + } + load(et, nt, rt, it) { + const ot = new CubeTexture(), + at = new ImageLoader(this.manager) + at.setCrossOrigin(this.crossOrigin), at.setPath(this.path) + let st = 0 + function lt(ct) { + at.load( + et[ct], + function (ut) { + ;(ot.images[ct] = ut), st++, st === 6 && ((ot.needsUpdate = !0), nt && nt(ot)) + }, + void 0, + it, + ) + } + for (let ct = 0; ct < et.length; ++ct) lt(ct) + return ot + } + } + class DataTextureLoader extends Loader$2 { + constructor(et) { + super(et) + } + load(et, nt, rt, it) { + const ot = this, + at = new DataTexture(), + st = new FileLoader(this.manager) + return ( + st.setResponseType('arraybuffer'), + st.setRequestHeader(this.requestHeader), + st.setPath(this.path), + st.setWithCredentials(ot.withCredentials), + st.load( + et, + function (lt) { + const ct = ot.parse(lt) + ct && + (ct.image !== void 0 + ? (at.image = ct.image) + : ct.data !== void 0 && + ((at.image.width = ct.width), (at.image.height = ct.height), (at.image.data = ct.data)), + (at.wrapS = ct.wrapS !== void 0 ? ct.wrapS : ClampToEdgeWrapping), + (at.wrapT = ct.wrapT !== void 0 ? ct.wrapT : ClampToEdgeWrapping), + (at.magFilter = ct.magFilter !== void 0 ? ct.magFilter : LinearFilter), + (at.minFilter = ct.minFilter !== void 0 ? ct.minFilter : LinearFilter), + (at.anisotropy = ct.anisotropy !== void 0 ? ct.anisotropy : 1), + ct.encoding !== void 0 && (at.encoding = ct.encoding), + ct.flipY !== void 0 && (at.flipY = ct.flipY), + ct.format !== void 0 && (at.format = ct.format), + ct.type !== void 0 && (at.type = ct.type), + ct.mipmaps !== void 0 && ((at.mipmaps = ct.mipmaps), (at.minFilter = LinearMipmapLinearFilter)), + ct.mipmapCount === 1 && (at.minFilter = LinearFilter), + ct.generateMipmaps !== void 0 && (at.generateMipmaps = ct.generateMipmaps), + (at.needsUpdate = !0), + nt && nt(at, ct)) + }, + rt, + it, + ), + at + ) + } + } + class TextureLoader extends Loader$2 { + constructor(et) { + super(et) + } + load(et, nt, rt, it) { + const ot = new Texture(), + at = new ImageLoader(this.manager) + return ( + at.setCrossOrigin(this.crossOrigin), + at.setPath(this.path), + at.load( + et, + function (st) { + ;(ot.image = st), (ot.needsUpdate = !0), nt !== void 0 && nt(ot) + }, + rt, + it, + ), + ot + ) + } + } + class Light extends Object3D { + constructor(et, nt = 1) { + super(), (this.isLight = !0), (this.type = 'Light'), (this.color = new Color$1(et)), (this.intensity = nt) + } + dispose() {} + copy(et, nt) { + return super.copy(et, nt), this.color.copy(et.color), (this.intensity = et.intensity), this + } + toJSON(et) { + const nt = super.toJSON(et) + return ( + (nt.object.color = this.color.getHex()), + (nt.object.intensity = this.intensity), + this.groundColor !== void 0 && (nt.object.groundColor = this.groundColor.getHex()), + this.distance !== void 0 && (nt.object.distance = this.distance), + this.angle !== void 0 && (nt.object.angle = this.angle), + this.decay !== void 0 && (nt.object.decay = this.decay), + this.penumbra !== void 0 && (nt.object.penumbra = this.penumbra), + this.shadow !== void 0 && (nt.object.shadow = this.shadow.toJSON()), + nt + ) + } + } + class HemisphereLight extends Light { + constructor(et, nt, rt) { + super(et, rt), + (this.isHemisphereLight = !0), + (this.type = 'HemisphereLight'), + this.position.copy(Object3D.DefaultUp), + this.updateMatrix(), + (this.groundColor = new Color$1(nt)) + } + copy(et, nt) { + return super.copy(et, nt), this.groundColor.copy(et.groundColor), this + } + } + const _projScreenMatrix$1 = new Matrix4(), + _lightPositionWorld$1 = new Vector3(), + _lookTarget$1 = new Vector3() + class LightShadow { + constructor(et) { + ;(this.camera = et), + (this.bias = 0), + (this.normalBias = 0), + (this.radius = 1), + (this.blurSamples = 8), + (this.mapSize = new Vector2(512, 512)), + (this.map = null), + (this.mapPass = null), + (this.matrix = new Matrix4()), + (this.autoUpdate = !0), + (this.needsUpdate = !1), + (this._frustum = new Frustum()), + (this._frameExtents = new Vector2(1, 1)), + (this._viewportCount = 1), + (this._viewports = [new Vector4(0, 0, 1, 1)]) + } + getViewportCount() { + return this._viewportCount + } + getFrustum() { + return this._frustum + } + updateMatrices(et) { + const nt = this.camera, + rt = this.matrix + _lightPositionWorld$1.setFromMatrixPosition(et.matrixWorld), + nt.position.copy(_lightPositionWorld$1), + _lookTarget$1.setFromMatrixPosition(et.target.matrixWorld), + nt.lookAt(_lookTarget$1), + nt.updateMatrixWorld(), + _projScreenMatrix$1.multiplyMatrices(nt.projectionMatrix, nt.matrixWorldInverse), + this._frustum.setFromProjectionMatrix(_projScreenMatrix$1), + rt.set(0.5, 0, 0, 0.5, 0, 0.5, 0, 0.5, 0, 0, 0.5, 0.5, 0, 0, 0, 1), + rt.multiply(nt.projectionMatrix), + rt.multiply(nt.matrixWorldInverse) + } + getViewport(et) { + return this._viewports[et] + } + getFrameExtents() { + return this._frameExtents + } + dispose() { + this.map && this.map.dispose(), this.mapPass && this.mapPass.dispose() + } + copy(et) { + return ( + (this.camera = et.camera.clone()), + (this.bias = et.bias), + (this.radius = et.radius), + this.mapSize.copy(et.mapSize), + this + ) + } + clone() { + return new this.constructor().copy(this) + } + toJSON() { + const et = {} + return ( + this.bias !== 0 && (et.bias = this.bias), + this.normalBias !== 0 && (et.normalBias = this.normalBias), + this.radius !== 1 && (et.radius = this.radius), + (this.mapSize.x !== 512 || this.mapSize.y !== 512) && (et.mapSize = this.mapSize.toArray()), + (et.camera = this.camera.toJSON(!1).object), + delete et.camera.matrix, + et + ) + } + } + class SpotLightShadow extends LightShadow { + constructor() { + super(new PerspectiveCamera(50, 1, 0.5, 500)), (this.isSpotLightShadow = !0), (this.focus = 1) + } + updateMatrices(et) { + const nt = this.camera, + rt = RAD2DEG * 2 * et.angle * this.focus, + it = this.mapSize.width / this.mapSize.height, + ot = et.distance || nt.far + ;(rt !== nt.fov || it !== nt.aspect || ot !== nt.far) && + ((nt.fov = rt), (nt.aspect = it), (nt.far = ot), nt.updateProjectionMatrix()), + super.updateMatrices(et) + } + copy(et) { + return super.copy(et), (this.focus = et.focus), this + } + } + class SpotLight extends Light { + constructor(et, nt, rt = 0, it = Math.PI / 3, ot = 0, at = 1) { + super(et, nt), + (this.isSpotLight = !0), + (this.type = 'SpotLight'), + this.position.copy(Object3D.DefaultUp), + this.updateMatrix(), + (this.target = new Object3D()), + (this.distance = rt), + (this.angle = it), + (this.penumbra = ot), + (this.decay = at), + (this.shadow = new SpotLightShadow()) + } + get power() { + return this.intensity * Math.PI + } + set power(et) { + this.intensity = et / Math.PI + } + dispose() { + this.shadow.dispose() + } + copy(et, nt) { + return ( + super.copy(et, nt), + (this.distance = et.distance), + (this.angle = et.angle), + (this.penumbra = et.penumbra), + (this.decay = et.decay), + (this.target = et.target.clone()), + (this.shadow = et.shadow.clone()), + this + ) + } + } + const _projScreenMatrix = new Matrix4(), + _lightPositionWorld = new Vector3(), + _lookTarget = new Vector3() + class PointLightShadow extends LightShadow { + constructor() { + super(new PerspectiveCamera(90, 1, 0.5, 500)), + (this.isPointLightShadow = !0), + (this._frameExtents = new Vector2(4, 2)), + (this._viewportCount = 6), + (this._viewports = [ + new Vector4(2, 1, 1, 1), + new Vector4(0, 1, 1, 1), + new Vector4(3, 1, 1, 1), + new Vector4(1, 1, 1, 1), + new Vector4(3, 0, 1, 1), + new Vector4(1, 0, 1, 1), + ]), + (this._cubeDirections = [ + new Vector3(1, 0, 0), + new Vector3(-1, 0, 0), + new Vector3(0, 0, 1), + new Vector3(0, 0, -1), + new Vector3(0, 1, 0), + new Vector3(0, -1, 0), + ]), + (this._cubeUps = [ + new Vector3(0, 1, 0), + new Vector3(0, 1, 0), + new Vector3(0, 1, 0), + new Vector3(0, 1, 0), + new Vector3(0, 0, 1), + new Vector3(0, 0, -1), + ]) + } + updateMatrices(et, nt = 0) { + const rt = this.camera, + it = this.matrix, + ot = et.distance || rt.far + ot !== rt.far && ((rt.far = ot), rt.updateProjectionMatrix()), + _lightPositionWorld.setFromMatrixPosition(et.matrixWorld), + rt.position.copy(_lightPositionWorld), + _lookTarget.copy(rt.position), + _lookTarget.add(this._cubeDirections[nt]), + rt.up.copy(this._cubeUps[nt]), + rt.lookAt(_lookTarget), + rt.updateMatrixWorld(), + it.makeTranslation(-_lightPositionWorld.x, -_lightPositionWorld.y, -_lightPositionWorld.z), + _projScreenMatrix.multiplyMatrices(rt.projectionMatrix, rt.matrixWorldInverse), + this._frustum.setFromProjectionMatrix(_projScreenMatrix) + } + } + class PointLight extends Light { + constructor(et, nt, rt = 0, it = 1) { + super(et, nt), + (this.isPointLight = !0), + (this.type = 'PointLight'), + (this.distance = rt), + (this.decay = it), + (this.shadow = new PointLightShadow()) + } + get power() { + return this.intensity * 4 * Math.PI + } + set power(et) { + this.intensity = et / (4 * Math.PI) + } + dispose() { + this.shadow.dispose() + } + copy(et, nt) { + return ( + super.copy(et, nt), + (this.distance = et.distance), + (this.decay = et.decay), + (this.shadow = et.shadow.clone()), + this + ) + } + } + class DirectionalLightShadow extends LightShadow { + constructor() { + super(new OrthographicCamera(-5, 5, 5, -5, 0.5, 500)), (this.isDirectionalLightShadow = !0) + } + } + class DirectionalLight extends Light { + constructor(et, nt) { + super(et, nt), + (this.isDirectionalLight = !0), + (this.type = 'DirectionalLight'), + this.position.copy(Object3D.DefaultUp), + this.updateMatrix(), + (this.target = new Object3D()), + (this.shadow = new DirectionalLightShadow()) + } + dispose() { + this.shadow.dispose() + } + copy(et) { + return super.copy(et), (this.target = et.target.clone()), (this.shadow = et.shadow.clone()), this + } + } + class AmbientLight extends Light { + constructor(et, nt) { + super(et, nt), (this.isAmbientLight = !0), (this.type = 'AmbientLight') + } + } + class RectAreaLight extends Light { + constructor(et, nt, rt = 10, it = 10) { + super(et, nt), (this.isRectAreaLight = !0), (this.type = 'RectAreaLight'), (this.width = rt), (this.height = it) + } + get power() { + return this.intensity * this.width * this.height * Math.PI + } + set power(et) { + this.intensity = et / (this.width * this.height * Math.PI) + } + copy(et) { + return super.copy(et), (this.width = et.width), (this.height = et.height), this + } + toJSON(et) { + const nt = super.toJSON(et) + return (nt.object.width = this.width), (nt.object.height = this.height), nt + } + } + class SphericalHarmonics3 { + constructor() { + ;(this.isSphericalHarmonics3 = !0), (this.coefficients = []) + for (let et = 0; et < 9; et++) this.coefficients.push(new Vector3()) + } + set(et) { + for (let nt = 0; nt < 9; nt++) this.coefficients[nt].copy(et[nt]) + return this + } + zero() { + for (let et = 0; et < 9; et++) this.coefficients[et].set(0, 0, 0) + return this + } + getAt(et, nt) { + const rt = et.x, + it = et.y, + ot = et.z, + at = this.coefficients + return ( + nt.copy(at[0]).multiplyScalar(0.282095), + nt.addScaledVector(at[1], 0.488603 * it), + nt.addScaledVector(at[2], 0.488603 * ot), + nt.addScaledVector(at[3], 0.488603 * rt), + nt.addScaledVector(at[4], 1.092548 * (rt * it)), + nt.addScaledVector(at[5], 1.092548 * (it * ot)), + nt.addScaledVector(at[6], 0.315392 * (3 * ot * ot - 1)), + nt.addScaledVector(at[7], 1.092548 * (rt * ot)), + nt.addScaledVector(at[8], 0.546274 * (rt * rt - it * it)), + nt + ) + } + getIrradianceAt(et, nt) { + const rt = et.x, + it = et.y, + ot = et.z, + at = this.coefficients + return ( + nt.copy(at[0]).multiplyScalar(0.886227), + nt.addScaledVector(at[1], 2 * 0.511664 * it), + nt.addScaledVector(at[2], 2 * 0.511664 * ot), + nt.addScaledVector(at[3], 2 * 0.511664 * rt), + nt.addScaledVector(at[4], 2 * 0.429043 * rt * it), + nt.addScaledVector(at[5], 2 * 0.429043 * it * ot), + nt.addScaledVector(at[6], 0.743125 * ot * ot - 0.247708), + nt.addScaledVector(at[7], 2 * 0.429043 * rt * ot), + nt.addScaledVector(at[8], 0.429043 * (rt * rt - it * it)), + nt + ) + } + add(et) { + for (let nt = 0; nt < 9; nt++) this.coefficients[nt].add(et.coefficients[nt]) + return this + } + addScaledSH(et, nt) { + for (let rt = 0; rt < 9; rt++) this.coefficients[rt].addScaledVector(et.coefficients[rt], nt) + return this + } + scale(et) { + for (let nt = 0; nt < 9; nt++) this.coefficients[nt].multiplyScalar(et) + return this + } + lerp(et, nt) { + for (let rt = 0; rt < 9; rt++) this.coefficients[rt].lerp(et.coefficients[rt], nt) + return this + } + equals(et) { + for (let nt = 0; nt < 9; nt++) if (!this.coefficients[nt].equals(et.coefficients[nt])) return !1 + return !0 + } + copy(et) { + return this.set(et.coefficients) + } + clone() { + return new this.constructor().copy(this) + } + fromArray(et, nt = 0) { + const rt = this.coefficients + for (let it = 0; it < 9; it++) rt[it].fromArray(et, nt + it * 3) + return this + } + toArray(et = [], nt = 0) { + const rt = this.coefficients + for (let it = 0; it < 9; it++) rt[it].toArray(et, nt + it * 3) + return et + } + static getBasisAt(et, nt) { + const rt = et.x, + it = et.y, + ot = et.z + ;(nt[0] = 0.282095), + (nt[1] = 0.488603 * it), + (nt[2] = 0.488603 * ot), + (nt[3] = 0.488603 * rt), + (nt[4] = 1.092548 * rt * it), + (nt[5] = 1.092548 * it * ot), + (nt[6] = 0.315392 * (3 * ot * ot - 1)), + (nt[7] = 1.092548 * rt * ot), + (nt[8] = 0.546274 * (rt * rt - it * it)) + } + } + class LightProbe extends Light { + constructor(et = new SphericalHarmonics3(), nt = 1) { + super(void 0, nt), (this.isLightProbe = !0), (this.sh = et) + } + copy(et) { + return super.copy(et), this.sh.copy(et.sh), this + } + fromJSON(et) { + return (this.intensity = et.intensity), this.sh.fromArray(et.sh), this + } + toJSON(et) { + const nt = super.toJSON(et) + return (nt.object.sh = this.sh.toArray()), nt + } + } + class MaterialLoader extends Loader$2 { + constructor(et) { + super(et), (this.textures = {}) + } + load(et, nt, rt, it) { + const ot = this, + at = new FileLoader(ot.manager) + at.setPath(ot.path), + at.setRequestHeader(ot.requestHeader), + at.setWithCredentials(ot.withCredentials), + at.load( + et, + function (st) { + try { + nt(ot.parse(JSON.parse(st))) + } catch (lt) { + it ? it(lt) : console.error(lt), ot.manager.itemError(et) + } + }, + rt, + it, + ) + } + parse(et) { + const nt = this.textures + function rt(ot) { + return nt[ot] === void 0 && console.warn('THREE.MaterialLoader: Undefined texture', ot), nt[ot] + } + const it = MaterialLoader.createMaterialFromType(et.type) + if ( + (et.uuid !== void 0 && (it.uuid = et.uuid), + et.name !== void 0 && (it.name = et.name), + et.color !== void 0 && it.color !== void 0 && it.color.setHex(et.color), + et.roughness !== void 0 && (it.roughness = et.roughness), + et.metalness !== void 0 && (it.metalness = et.metalness), + et.sheen !== void 0 && (it.sheen = et.sheen), + et.sheenColor !== void 0 && (it.sheenColor = new Color$1().setHex(et.sheenColor)), + et.sheenRoughness !== void 0 && (it.sheenRoughness = et.sheenRoughness), + et.emissive !== void 0 && it.emissive !== void 0 && it.emissive.setHex(et.emissive), + et.specular !== void 0 && it.specular !== void 0 && it.specular.setHex(et.specular), + et.specularIntensity !== void 0 && (it.specularIntensity = et.specularIntensity), + et.specularColor !== void 0 && it.specularColor !== void 0 && it.specularColor.setHex(et.specularColor), + et.shininess !== void 0 && (it.shininess = et.shininess), + et.clearcoat !== void 0 && (it.clearcoat = et.clearcoat), + et.clearcoatRoughness !== void 0 && (it.clearcoatRoughness = et.clearcoatRoughness), + et.iridescence !== void 0 && (it.iridescence = et.iridescence), + et.iridescenceIOR !== void 0 && (it.iridescenceIOR = et.iridescenceIOR), + et.iridescenceThicknessRange !== void 0 && (it.iridescenceThicknessRange = et.iridescenceThicknessRange), + et.transmission !== void 0 && (it.transmission = et.transmission), + et.thickness !== void 0 && (it.thickness = et.thickness), + et.attenuationDistance !== void 0 && (it.attenuationDistance = et.attenuationDistance), + et.attenuationColor !== void 0 && + it.attenuationColor !== void 0 && + it.attenuationColor.setHex(et.attenuationColor), + et.fog !== void 0 && (it.fog = et.fog), + et.flatShading !== void 0 && (it.flatShading = et.flatShading), + et.blending !== void 0 && (it.blending = et.blending), + et.combine !== void 0 && (it.combine = et.combine), + et.side !== void 0 && (it.side = et.side), + et.shadowSide !== void 0 && (it.shadowSide = et.shadowSide), + et.opacity !== void 0 && (it.opacity = et.opacity), + et.transparent !== void 0 && (it.transparent = et.transparent), + et.alphaTest !== void 0 && (it.alphaTest = et.alphaTest), + et.depthTest !== void 0 && (it.depthTest = et.depthTest), + et.depthWrite !== void 0 && (it.depthWrite = et.depthWrite), + et.colorWrite !== void 0 && (it.colorWrite = et.colorWrite), + et.stencilWrite !== void 0 && (it.stencilWrite = et.stencilWrite), + et.stencilWriteMask !== void 0 && (it.stencilWriteMask = et.stencilWriteMask), + et.stencilFunc !== void 0 && (it.stencilFunc = et.stencilFunc), + et.stencilRef !== void 0 && (it.stencilRef = et.stencilRef), + et.stencilFuncMask !== void 0 && (it.stencilFuncMask = et.stencilFuncMask), + et.stencilFail !== void 0 && (it.stencilFail = et.stencilFail), + et.stencilZFail !== void 0 && (it.stencilZFail = et.stencilZFail), + et.stencilZPass !== void 0 && (it.stencilZPass = et.stencilZPass), + et.wireframe !== void 0 && (it.wireframe = et.wireframe), + et.wireframeLinewidth !== void 0 && (it.wireframeLinewidth = et.wireframeLinewidth), + et.wireframeLinecap !== void 0 && (it.wireframeLinecap = et.wireframeLinecap), + et.wireframeLinejoin !== void 0 && (it.wireframeLinejoin = et.wireframeLinejoin), + et.rotation !== void 0 && (it.rotation = et.rotation), + et.linewidth !== 1 && (it.linewidth = et.linewidth), + et.dashSize !== void 0 && (it.dashSize = et.dashSize), + et.gapSize !== void 0 && (it.gapSize = et.gapSize), + et.scale !== void 0 && (it.scale = et.scale), + et.polygonOffset !== void 0 && (it.polygonOffset = et.polygonOffset), + et.polygonOffsetFactor !== void 0 && (it.polygonOffsetFactor = et.polygonOffsetFactor), + et.polygonOffsetUnits !== void 0 && (it.polygonOffsetUnits = et.polygonOffsetUnits), + et.dithering !== void 0 && (it.dithering = et.dithering), + et.alphaToCoverage !== void 0 && (it.alphaToCoverage = et.alphaToCoverage), + et.premultipliedAlpha !== void 0 && (it.premultipliedAlpha = et.premultipliedAlpha), + et.visible !== void 0 && (it.visible = et.visible), + et.toneMapped !== void 0 && (it.toneMapped = et.toneMapped), + et.userData !== void 0 && (it.userData = et.userData), + et.vertexColors !== void 0 && + (typeof et.vertexColors == 'number' + ? (it.vertexColors = et.vertexColors > 0) + : (it.vertexColors = et.vertexColors)), + et.uniforms !== void 0) + ) + for (const ot in et.uniforms) { + const at = et.uniforms[ot] + switch (((it.uniforms[ot] = {}), at.type)) { + case 't': + it.uniforms[ot].value = rt(at.value) + break + case 'c': + it.uniforms[ot].value = new Color$1().setHex(at.value) + break + case 'v2': + it.uniforms[ot].value = new Vector2().fromArray(at.value) + break + case 'v3': + it.uniforms[ot].value = new Vector3().fromArray(at.value) + break + case 'v4': + it.uniforms[ot].value = new Vector4().fromArray(at.value) + break + case 'm3': + it.uniforms[ot].value = new Matrix3().fromArray(at.value) + break + case 'm4': + it.uniforms[ot].value = new Matrix4().fromArray(at.value) + break + default: + it.uniforms[ot].value = at.value + } + } + if ( + (et.defines !== void 0 && (it.defines = et.defines), + et.vertexShader !== void 0 && (it.vertexShader = et.vertexShader), + et.fragmentShader !== void 0 && (it.fragmentShader = et.fragmentShader), + et.extensions !== void 0) + ) + for (const ot in et.extensions) it.extensions[ot] = et.extensions[ot] + if ( + (et.shading !== void 0 && (it.flatShading = et.shading === 1), + et.size !== void 0 && (it.size = et.size), + et.sizeAttenuation !== void 0 && (it.sizeAttenuation = et.sizeAttenuation), + et.map !== void 0 && (it.map = rt(et.map)), + et.matcap !== void 0 && (it.matcap = rt(et.matcap)), + et.alphaMap !== void 0 && (it.alphaMap = rt(et.alphaMap)), + et.bumpMap !== void 0 && (it.bumpMap = rt(et.bumpMap)), + et.bumpScale !== void 0 && (it.bumpScale = et.bumpScale), + et.normalMap !== void 0 && (it.normalMap = rt(et.normalMap)), + et.normalMapType !== void 0 && (it.normalMapType = et.normalMapType), + et.normalScale !== void 0) + ) { + let ot = et.normalScale + Array.isArray(ot) === !1 && (ot = [ot, ot]), (it.normalScale = new Vector2().fromArray(ot)) + } + return ( + et.displacementMap !== void 0 && (it.displacementMap = rt(et.displacementMap)), + et.displacementScale !== void 0 && (it.displacementScale = et.displacementScale), + et.displacementBias !== void 0 && (it.displacementBias = et.displacementBias), + et.roughnessMap !== void 0 && (it.roughnessMap = rt(et.roughnessMap)), + et.metalnessMap !== void 0 && (it.metalnessMap = rt(et.metalnessMap)), + et.emissiveMap !== void 0 && (it.emissiveMap = rt(et.emissiveMap)), + et.emissiveIntensity !== void 0 && (it.emissiveIntensity = et.emissiveIntensity), + et.specularMap !== void 0 && (it.specularMap = rt(et.specularMap)), + et.specularIntensityMap !== void 0 && (it.specularIntensityMap = rt(et.specularIntensityMap)), + et.specularColorMap !== void 0 && (it.specularColorMap = rt(et.specularColorMap)), + et.envMap !== void 0 && (it.envMap = rt(et.envMap)), + et.envMapIntensity !== void 0 && (it.envMapIntensity = et.envMapIntensity), + et.reflectivity !== void 0 && (it.reflectivity = et.reflectivity), + et.refractionRatio !== void 0 && (it.refractionRatio = et.refractionRatio), + et.lightMap !== void 0 && (it.lightMap = rt(et.lightMap)), + et.lightMapIntensity !== void 0 && (it.lightMapIntensity = et.lightMapIntensity), + et.aoMap !== void 0 && (it.aoMap = rt(et.aoMap)), + et.aoMapIntensity !== void 0 && (it.aoMapIntensity = et.aoMapIntensity), + et.gradientMap !== void 0 && (it.gradientMap = rt(et.gradientMap)), + et.clearcoatMap !== void 0 && (it.clearcoatMap = rt(et.clearcoatMap)), + et.clearcoatRoughnessMap !== void 0 && (it.clearcoatRoughnessMap = rt(et.clearcoatRoughnessMap)), + et.clearcoatNormalMap !== void 0 && (it.clearcoatNormalMap = rt(et.clearcoatNormalMap)), + et.clearcoatNormalScale !== void 0 && + (it.clearcoatNormalScale = new Vector2().fromArray(et.clearcoatNormalScale)), + et.iridescenceMap !== void 0 && (it.iridescenceMap = rt(et.iridescenceMap)), + et.iridescenceThicknessMap !== void 0 && (it.iridescenceThicknessMap = rt(et.iridescenceThicknessMap)), + et.transmissionMap !== void 0 && (it.transmissionMap = rt(et.transmissionMap)), + et.thicknessMap !== void 0 && (it.thicknessMap = rt(et.thicknessMap)), + et.sheenColorMap !== void 0 && (it.sheenColorMap = rt(et.sheenColorMap)), + et.sheenRoughnessMap !== void 0 && (it.sheenRoughnessMap = rt(et.sheenRoughnessMap)), + it + ) + } + setTextures(et) { + return (this.textures = et), this + } + static createMaterialFromType(et) { + const nt = { + ShadowMaterial, + SpriteMaterial, + RawShaderMaterial, + ShaderMaterial, + PointsMaterial, + MeshPhysicalMaterial, + MeshStandardMaterial, + MeshPhongMaterial, + MeshToonMaterial, + MeshNormalMaterial, + MeshLambertMaterial, + MeshDepthMaterial, + MeshDistanceMaterial, + MeshBasicMaterial, + MeshMatcapMaterial, + LineDashedMaterial, + LineBasicMaterial, + Material, + } + return new nt[et]() + } + } + class LoaderUtils { + static decodeText(et) { + if (typeof TextDecoder < 'u') return new TextDecoder().decode(et) + let nt = '' + for (let rt = 0, it = et.length; rt < it; rt++) nt += String.fromCharCode(et[rt]) + try { + return decodeURIComponent(escape(nt)) + } catch { + return nt + } + } + static extractUrlBase(et) { + const nt = et.lastIndexOf('/') + return nt === -1 ? './' : et.slice(0, nt + 1) + } + static resolveURL(et, nt) { + return typeof et != 'string' || et === '' + ? '' + : (/^https?:\/\//i.test(nt) && /^\//.test(et) && (nt = nt.replace(/(^https?:\/\/[^\/]+).*/i, '$1')), + /^(https?:)?\/\//i.test(et) || /^data:.*,.*$/i.test(et) || /^blob:.*$/i.test(et) ? et : nt + et) + } + } + class InstancedBufferGeometry extends BufferGeometry { + constructor() { + super(), + (this.isInstancedBufferGeometry = !0), + (this.type = 'InstancedBufferGeometry'), + (this.instanceCount = 1 / 0) + } + copy(et) { + return super.copy(et), (this.instanceCount = et.instanceCount), this + } + clone() { + return new this.constructor().copy(this) + } + toJSON() { + const et = super.toJSON(this) + return (et.instanceCount = this.instanceCount), (et.isInstancedBufferGeometry = !0), et + } + } + class BufferGeometryLoader extends Loader$2 { + constructor(et) { + super(et) + } + load(et, nt, rt, it) { + const ot = this, + at = new FileLoader(ot.manager) + at.setPath(ot.path), + at.setRequestHeader(ot.requestHeader), + at.setWithCredentials(ot.withCredentials), + at.load( + et, + function (st) { + try { + nt(ot.parse(JSON.parse(st))) + } catch (lt) { + it ? it(lt) : console.error(lt), ot.manager.itemError(et) + } + }, + rt, + it, + ) + } + parse(et) { + const nt = {}, + rt = {} + function it(pt, mt) { + if (nt[mt] !== void 0) return nt[mt] + const yt = pt.interleavedBuffers[mt], + bt = ot(pt, yt.buffer), + vt = getTypedArray(yt.type, bt), + xt = new InterleavedBuffer(vt, yt.stride) + return (xt.uuid = yt.uuid), (nt[mt] = xt), xt + } + function ot(pt, mt) { + if (rt[mt] !== void 0) return rt[mt] + const yt = pt.arrayBuffers[mt], + bt = new Uint32Array(yt).buffer + return (rt[mt] = bt), bt + } + const at = et.isInstancedBufferGeometry ? new InstancedBufferGeometry() : new BufferGeometry(), + st = et.data.index + if (st !== void 0) { + const pt = getTypedArray(st.type, st.array) + at.setIndex(new BufferAttribute(pt, 1)) + } + const lt = et.data.attributes + for (const pt in lt) { + const mt = lt[pt] + let gt + if (mt.isInterleavedBufferAttribute) { + const yt = it(et.data, mt.data) + gt = new InterleavedBufferAttribute(yt, mt.itemSize, mt.offset, mt.normalized) + } else { + const yt = getTypedArray(mt.type, mt.array), + bt = mt.isInstancedBufferAttribute ? InstancedBufferAttribute : BufferAttribute + gt = new bt(yt, mt.itemSize, mt.normalized) + } + mt.name !== void 0 && (gt.name = mt.name), + mt.usage !== void 0 && gt.setUsage(mt.usage), + mt.updateRange !== void 0 && + ((gt.updateRange.offset = mt.updateRange.offset), (gt.updateRange.count = mt.updateRange.count)), + at.setAttribute(pt, gt) + } + const ct = et.data.morphAttributes + if (ct) + for (const pt in ct) { + const mt = ct[pt], + gt = [] + for (let yt = 0, bt = mt.length; yt < bt; yt++) { + const vt = mt[yt] + let xt + if (vt.isInterleavedBufferAttribute) { + const kt = it(et.data, vt.data) + xt = new InterleavedBufferAttribute(kt, vt.itemSize, vt.offset, vt.normalized) + } else { + const kt = getTypedArray(vt.type, vt.array) + xt = new BufferAttribute(kt, vt.itemSize, vt.normalized) + } + vt.name !== void 0 && (xt.name = vt.name), gt.push(xt) + } + at.morphAttributes[pt] = gt + } + et.data.morphTargetsRelative && (at.morphTargetsRelative = !0) + const ht = et.data.groups || et.data.drawcalls || et.data.offsets + if (ht !== void 0) + for (let pt = 0, mt = ht.length; pt !== mt; ++pt) { + const gt = ht[pt] + at.addGroup(gt.start, gt.count, gt.materialIndex) + } + const dt = et.data.boundingSphere + if (dt !== void 0) { + const pt = new Vector3() + dt.center !== void 0 && pt.fromArray(dt.center), (at.boundingSphere = new Sphere(pt, dt.radius)) + } + return et.name && (at.name = et.name), et.userData && (at.userData = et.userData), at + } + } + class ObjectLoader extends Loader$2 { + constructor(et) { + super(et) + } + load(et, nt, rt, it) { + const ot = this, + at = this.path === '' ? LoaderUtils.extractUrlBase(et) : this.path + this.resourcePath = this.resourcePath || at + const st = new FileLoader(this.manager) + st.setPath(this.path), + st.setRequestHeader(this.requestHeader), + st.setWithCredentials(this.withCredentials), + st.load( + et, + function (lt) { + let ct = null + try { + ct = JSON.parse(lt) + } catch (ht) { + it !== void 0 && it(ht), console.error("THREE:ObjectLoader: Can't parse " + et + '.', ht.message) + return + } + const ut = ct.metadata + if (ut === void 0 || ut.type === void 0 || ut.type.toLowerCase() === 'geometry') { + console.error("THREE.ObjectLoader: Can't load " + et) + return + } + ot.parse(ct, nt) + }, + rt, + it, + ) + } + async loadAsync(et, nt) { + const rt = this, + it = this.path === '' ? LoaderUtils.extractUrlBase(et) : this.path + this.resourcePath = this.resourcePath || it + const ot = new FileLoader(this.manager) + ot.setPath(this.path), ot.setRequestHeader(this.requestHeader), ot.setWithCredentials(this.withCredentials) + const at = await ot.loadAsync(et, nt), + st = JSON.parse(at), + lt = st.metadata + if (lt === void 0 || lt.type === void 0 || lt.type.toLowerCase() === 'geometry') + throw new Error("THREE.ObjectLoader: Can't load " + et) + return await rt.parseAsync(st) + } + parse(et, nt) { + const rt = this.parseAnimations(et.animations), + it = this.parseShapes(et.shapes), + ot = this.parseGeometries(et.geometries, it), + at = this.parseImages(et.images, function () { + nt !== void 0 && nt(ct) + }), + st = this.parseTextures(et.textures, at), + lt = this.parseMaterials(et.materials, st), + ct = this.parseObject(et.object, ot, lt, st, rt), + ut = this.parseSkeletons(et.skeletons, ct) + if ((this.bindSkeletons(ct, ut), nt !== void 0)) { + let ht = !1 + for (const dt in at) + if (at[dt].data instanceof HTMLImageElement) { + ht = !0 + break + } + ht === !1 && nt(ct) + } + return ct + } + async parseAsync(et) { + const nt = this.parseAnimations(et.animations), + rt = this.parseShapes(et.shapes), + it = this.parseGeometries(et.geometries, rt), + ot = await this.parseImagesAsync(et.images), + at = this.parseTextures(et.textures, ot), + st = this.parseMaterials(et.materials, at), + lt = this.parseObject(et.object, it, st, at, nt), + ct = this.parseSkeletons(et.skeletons, lt) + return this.bindSkeletons(lt, ct), lt + } + parseShapes(et) { + const nt = {} + if (et !== void 0) + for (let rt = 0, it = et.length; rt < it; rt++) { + const ot = new Shape$1().fromJSON(et[rt]) + nt[ot.uuid] = ot + } + return nt + } + parseSkeletons(et, nt) { + const rt = {}, + it = {} + if ( + (nt.traverse(function (ot) { + ot.isBone && (it[ot.uuid] = ot) + }), + et !== void 0) + ) + for (let ot = 0, at = et.length; ot < at; ot++) { + const st = new Skeleton().fromJSON(et[ot], it) + rt[st.uuid] = st + } + return rt + } + parseGeometries(et, nt) { + const rt = {} + if (et !== void 0) { + const it = new BufferGeometryLoader() + for (let ot = 0, at = et.length; ot < at; ot++) { + let st + const lt = et[ot] + switch (lt.type) { + case 'BufferGeometry': + case 'InstancedBufferGeometry': + st = it.parse(lt) + break + case 'Geometry': + console.error('THREE.ObjectLoader: The legacy Geometry type is no longer supported.') + break + default: + lt.type in Geometries + ? (st = Geometries[lt.type].fromJSON(lt, nt)) + : console.warn(`THREE.ObjectLoader: Unsupported geometry type "${lt.type}"`) + } + ;(st.uuid = lt.uuid), + lt.name !== void 0 && (st.name = lt.name), + st.isBufferGeometry === !0 && lt.userData !== void 0 && (st.userData = lt.userData), + (rt[lt.uuid] = st) + } + } + return rt + } + parseMaterials(et, nt) { + const rt = {}, + it = {} + if (et !== void 0) { + const ot = new MaterialLoader() + ot.setTextures(nt) + for (let at = 0, st = et.length; at < st; at++) { + const lt = et[at] + if (lt.type === 'MultiMaterial') { + const ct = [] + for (let ut = 0; ut < lt.materials.length; ut++) { + const ht = lt.materials[ut] + rt[ht.uuid] === void 0 && (rt[ht.uuid] = ot.parse(ht)), ct.push(rt[ht.uuid]) + } + it[lt.uuid] = ct + } else rt[lt.uuid] === void 0 && (rt[lt.uuid] = ot.parse(lt)), (it[lt.uuid] = rt[lt.uuid]) + } + } + return it + } + parseAnimations(et) { + const nt = {} + if (et !== void 0) + for (let rt = 0; rt < et.length; rt++) { + const it = et[rt], + ot = AnimationClip.parse(it) + nt[ot.uuid] = ot + } + return nt + } + parseImages(et, nt) { + const rt = this, + it = {} + let ot + function at(lt) { + return ( + rt.manager.itemStart(lt), + ot.load( + lt, + function () { + rt.manager.itemEnd(lt) + }, + void 0, + function () { + rt.manager.itemError(lt), rt.manager.itemEnd(lt) + }, + ) + ) + } + function st(lt) { + if (typeof lt == 'string') { + const ct = lt, + ut = /^(\/\/)|([a-z]+:(\/\/)?)/i.test(ct) ? ct : rt.resourcePath + ct + return at(ut) + } else return lt.data ? { data: getTypedArray(lt.type, lt.data), width: lt.width, height: lt.height } : null + } + if (et !== void 0 && et.length > 0) { + const lt = new LoadingManager(nt) + ;(ot = new ImageLoader(lt)), ot.setCrossOrigin(this.crossOrigin) + for (let ct = 0, ut = et.length; ct < ut; ct++) { + const ht = et[ct], + dt = ht.url + if (Array.isArray(dt)) { + const pt = [] + for (let mt = 0, gt = dt.length; mt < gt; mt++) { + const yt = dt[mt], + bt = st(yt) + bt !== null && + (bt instanceof HTMLImageElement ? pt.push(bt) : pt.push(new DataTexture(bt.data, bt.width, bt.height))) + } + it[ht.uuid] = new Source$1(pt) + } else { + const pt = st(ht.url) + it[ht.uuid] = new Source$1(pt) + } + } + } + return it + } + async parseImagesAsync(et) { + const nt = this, + rt = {} + let it + async function ot(at) { + if (typeof at == 'string') { + const st = at, + lt = /^(\/\/)|([a-z]+:(\/\/)?)/i.test(st) ? st : nt.resourcePath + st + return await it.loadAsync(lt) + } else return at.data ? { data: getTypedArray(at.type, at.data), width: at.width, height: at.height } : null + } + if (et !== void 0 && et.length > 0) { + ;(it = new ImageLoader(this.manager)), it.setCrossOrigin(this.crossOrigin) + for (let at = 0, st = et.length; at < st; at++) { + const lt = et[at], + ct = lt.url + if (Array.isArray(ct)) { + const ut = [] + for (let ht = 0, dt = ct.length; ht < dt; ht++) { + const pt = ct[ht], + mt = await ot(pt) + mt !== null && + (mt instanceof HTMLImageElement ? ut.push(mt) : ut.push(new DataTexture(mt.data, mt.width, mt.height))) + } + rt[lt.uuid] = new Source$1(ut) + } else { + const ut = await ot(lt.url) + rt[lt.uuid] = new Source$1(ut) + } + } + } + return rt + } + parseTextures(et, nt) { + function rt(ot, at) { + return typeof ot == 'number' + ? ot + : (console.warn('THREE.ObjectLoader.parseTexture: Constant should be in numeric form.', ot), at[ot]) + } + const it = {} + if (et !== void 0) + for (let ot = 0, at = et.length; ot < at; ot++) { + const st = et[ot] + st.image === void 0 && console.warn('THREE.ObjectLoader: No "image" specified for', st.uuid), + nt[st.image] === void 0 && console.warn('THREE.ObjectLoader: Undefined image', st.image) + const lt = nt[st.image], + ct = lt.data + let ut + Array.isArray(ct) + ? ((ut = new CubeTexture()), ct.length === 6 && (ut.needsUpdate = !0)) + : (ct && ct.data ? (ut = new DataTexture()) : (ut = new Texture()), ct && (ut.needsUpdate = !0)), + (ut.source = lt), + (ut.uuid = st.uuid), + st.name !== void 0 && (ut.name = st.name), + st.mapping !== void 0 && (ut.mapping = rt(st.mapping, TEXTURE_MAPPING)), + st.offset !== void 0 && ut.offset.fromArray(st.offset), + st.repeat !== void 0 && ut.repeat.fromArray(st.repeat), + st.center !== void 0 && ut.center.fromArray(st.center), + st.rotation !== void 0 && (ut.rotation = st.rotation), + st.wrap !== void 0 && + ((ut.wrapS = rt(st.wrap[0], TEXTURE_WRAPPING)), (ut.wrapT = rt(st.wrap[1], TEXTURE_WRAPPING))), + st.format !== void 0 && (ut.format = st.format), + st.type !== void 0 && (ut.type = st.type), + st.encoding !== void 0 && (ut.encoding = st.encoding), + st.minFilter !== void 0 && (ut.minFilter = rt(st.minFilter, TEXTURE_FILTER)), + st.magFilter !== void 0 && (ut.magFilter = rt(st.magFilter, TEXTURE_FILTER)), + st.anisotropy !== void 0 && (ut.anisotropy = st.anisotropy), + st.flipY !== void 0 && (ut.flipY = st.flipY), + st.premultiplyAlpha !== void 0 && (ut.premultiplyAlpha = st.premultiplyAlpha), + st.unpackAlignment !== void 0 && (ut.unpackAlignment = st.unpackAlignment), + st.userData !== void 0 && (ut.userData = st.userData), + (it[st.uuid] = ut) + } + return it + } + parseObject(et, nt, rt, it, ot) { + let at + function st(dt) { + return nt[dt] === void 0 && console.warn('THREE.ObjectLoader: Undefined geometry', dt), nt[dt] + } + function lt(dt) { + if (dt !== void 0) { + if (Array.isArray(dt)) { + const pt = [] + for (let mt = 0, gt = dt.length; mt < gt; mt++) { + const yt = dt[mt] + rt[yt] === void 0 && console.warn('THREE.ObjectLoader: Undefined material', yt), pt.push(rt[yt]) + } + return pt + } + return rt[dt] === void 0 && console.warn('THREE.ObjectLoader: Undefined material', dt), rt[dt] + } + } + function ct(dt) { + return it[dt] === void 0 && console.warn('THREE.ObjectLoader: Undefined texture', dt), it[dt] + } + let ut, ht + switch (et.type) { + case 'Scene': + ;(at = new Scene()), + et.background !== void 0 && + (Number.isInteger(et.background) + ? (at.background = new Color$1(et.background)) + : (at.background = ct(et.background))), + et.environment !== void 0 && (at.environment = ct(et.environment)), + et.fog !== void 0 && + (et.fog.type === 'Fog' + ? (at.fog = new Fog(et.fog.color, et.fog.near, et.fog.far)) + : et.fog.type === 'FogExp2' && (at.fog = new FogExp2(et.fog.color, et.fog.density))) + break + case 'PerspectiveCamera': + ;(at = new PerspectiveCamera(et.fov, et.aspect, et.near, et.far)), + et.focus !== void 0 && (at.focus = et.focus), + et.zoom !== void 0 && (at.zoom = et.zoom), + et.filmGauge !== void 0 && (at.filmGauge = et.filmGauge), + et.filmOffset !== void 0 && (at.filmOffset = et.filmOffset), + et.view !== void 0 && (at.view = Object.assign({}, et.view)) + break + case 'OrthographicCamera': + ;(at = new OrthographicCamera(et.left, et.right, et.top, et.bottom, et.near, et.far)), + et.zoom !== void 0 && (at.zoom = et.zoom), + et.view !== void 0 && (at.view = Object.assign({}, et.view)) + break + case 'AmbientLight': + at = new AmbientLight(et.color, et.intensity) + break + case 'DirectionalLight': + at = new DirectionalLight(et.color, et.intensity) + break + case 'PointLight': + at = new PointLight(et.color, et.intensity, et.distance, et.decay) + break + case 'RectAreaLight': + at = new RectAreaLight(et.color, et.intensity, et.width, et.height) + break + case 'SpotLight': + at = new SpotLight(et.color, et.intensity, et.distance, et.angle, et.penumbra, et.decay) + break + case 'HemisphereLight': + at = new HemisphereLight(et.color, et.groundColor, et.intensity) + break + case 'LightProbe': + at = new LightProbe().fromJSON(et) + break + case 'SkinnedMesh': + ;(ut = st(et.geometry)), + (ht = lt(et.material)), + (at = new SkinnedMesh(ut, ht)), + et.bindMode !== void 0 && (at.bindMode = et.bindMode), + et.bindMatrix !== void 0 && at.bindMatrix.fromArray(et.bindMatrix), + et.skeleton !== void 0 && (at.skeleton = et.skeleton) + break + case 'Mesh': + ;(ut = st(et.geometry)), (ht = lt(et.material)), (at = new Mesh(ut, ht)) + break + case 'InstancedMesh': + ;(ut = st(et.geometry)), (ht = lt(et.material)) + const dt = et.count, + pt = et.instanceMatrix, + mt = et.instanceColor + ;(at = new InstancedMesh(ut, ht, dt)), + (at.instanceMatrix = new InstancedBufferAttribute(new Float32Array(pt.array), 16)), + mt !== void 0 && (at.instanceColor = new InstancedBufferAttribute(new Float32Array(mt.array), mt.itemSize)) + break + case 'LOD': + at = new LOD() + break + case 'Line': + at = new Line$2(st(et.geometry), lt(et.material)) + break + case 'LineLoop': + at = new LineLoop(st(et.geometry), lt(et.material)) + break + case 'LineSegments': + at = new LineSegments(st(et.geometry), lt(et.material)) + break + case 'PointCloud': + case 'Points': + at = new Points(st(et.geometry), lt(et.material)) + break + case 'Sprite': + at = new Sprite(lt(et.material)) + break + case 'Group': + at = new Group() + break + case 'Bone': + at = new Bone() + break + default: + at = new Object3D() + } + if ( + ((at.uuid = et.uuid), + et.name !== void 0 && (at.name = et.name), + et.matrix !== void 0 + ? (at.matrix.fromArray(et.matrix), + et.matrixAutoUpdate !== void 0 && (at.matrixAutoUpdate = et.matrixAutoUpdate), + at.matrixAutoUpdate && at.matrix.decompose(at.position, at.quaternion, at.scale)) + : (et.position !== void 0 && at.position.fromArray(et.position), + et.rotation !== void 0 && at.rotation.fromArray(et.rotation), + et.quaternion !== void 0 && at.quaternion.fromArray(et.quaternion), + et.scale !== void 0 && at.scale.fromArray(et.scale)), + et.castShadow !== void 0 && (at.castShadow = et.castShadow), + et.receiveShadow !== void 0 && (at.receiveShadow = et.receiveShadow), + et.shadow && + (et.shadow.bias !== void 0 && (at.shadow.bias = et.shadow.bias), + et.shadow.normalBias !== void 0 && (at.shadow.normalBias = et.shadow.normalBias), + et.shadow.radius !== void 0 && (at.shadow.radius = et.shadow.radius), + et.shadow.mapSize !== void 0 && at.shadow.mapSize.fromArray(et.shadow.mapSize), + et.shadow.camera !== void 0 && (at.shadow.camera = this.parseObject(et.shadow.camera))), + et.visible !== void 0 && (at.visible = et.visible), + et.frustumCulled !== void 0 && (at.frustumCulled = et.frustumCulled), + et.renderOrder !== void 0 && (at.renderOrder = et.renderOrder), + et.userData !== void 0 && (at.userData = et.userData), + et.layers !== void 0 && (at.layers.mask = et.layers), + et.children !== void 0) + ) { + const dt = et.children + for (let pt = 0; pt < dt.length; pt++) at.add(this.parseObject(dt[pt], nt, rt, it, ot)) + } + if (et.animations !== void 0) { + const dt = et.animations + for (let pt = 0; pt < dt.length; pt++) { + const mt = dt[pt] + at.animations.push(ot[mt]) + } + } + if (et.type === 'LOD') { + et.autoUpdate !== void 0 && (at.autoUpdate = et.autoUpdate) + const dt = et.levels + for (let pt = 0; pt < dt.length; pt++) { + const mt = dt[pt], + gt = at.getObjectByProperty('uuid', mt.object) + gt !== void 0 && at.addLevel(gt, mt.distance) + } + } + return at + } + bindSkeletons(et, nt) { + Object.keys(nt).length !== 0 && + et.traverse(function (rt) { + if (rt.isSkinnedMesh === !0 && rt.skeleton !== void 0) { + const it = nt[rt.skeleton] + it === void 0 + ? console.warn('THREE.ObjectLoader: No skeleton found with UUID:', rt.skeleton) + : rt.bind(it, rt.bindMatrix) + } + }) + } + } + const TEXTURE_MAPPING = { + UVMapping, + CubeReflectionMapping, + CubeRefractionMapping, + EquirectangularReflectionMapping, + EquirectangularRefractionMapping, + CubeUVReflectionMapping, + }, + TEXTURE_WRAPPING = { RepeatWrapping, ClampToEdgeWrapping, MirroredRepeatWrapping }, + TEXTURE_FILTER = { + NearestFilter, + NearestMipmapNearestFilter, + NearestMipmapLinearFilter, + LinearFilter, + LinearMipmapNearestFilter, + LinearMipmapLinearFilter, + } + class ImageBitmapLoader extends Loader$2 { + constructor(et) { + super(et), + (this.isImageBitmapLoader = !0), + typeof createImageBitmap > 'u' && console.warn('THREE.ImageBitmapLoader: createImageBitmap() not supported.'), + typeof fetch > 'u' && console.warn('THREE.ImageBitmapLoader: fetch() not supported.'), + (this.options = { premultiplyAlpha: 'none' }) + } + setOptions(et) { + return (this.options = et), this + } + load(et, nt, rt, it) { + et === void 0 && (et = ''), this.path !== void 0 && (et = this.path + et), (et = this.manager.resolveURL(et)) + const ot = this, + at = Cache.get(et) + if (at !== void 0) + return ( + ot.manager.itemStart(et), + setTimeout(function () { + nt && nt(at), ot.manager.itemEnd(et) + }, 0), + at + ) + const st = {} + ;(st.credentials = this.crossOrigin === 'anonymous' ? 'same-origin' : 'include'), + (st.headers = this.requestHeader), + fetch(et, st) + .then(function (lt) { + return lt.blob() + }) + .then(function (lt) { + return createImageBitmap(lt, Object.assign(ot.options, { colorSpaceConversion: 'none' })) + }) + .then(function (lt) { + Cache.add(et, lt), nt && nt(lt), ot.manager.itemEnd(et) + }) + .catch(function (lt) { + it && it(lt), ot.manager.itemError(et), ot.manager.itemEnd(et) + }), + ot.manager.itemStart(et) + } + } + let _context$1 + const AudioContext = { + getContext: function () { + return ( + _context$1 === void 0 && (_context$1 = new (window.AudioContext || window.webkitAudioContext)()), _context$1 + ) + }, + setContext: function (tt) { + _context$1 = tt + }, + } + class AudioLoader extends Loader$2 { + constructor(et) { + super(et) + } + load(et, nt, rt, it) { + const ot = this, + at = new FileLoader(this.manager) + at.setResponseType('arraybuffer'), + at.setPath(this.path), + at.setRequestHeader(this.requestHeader), + at.setWithCredentials(this.withCredentials), + at.load( + et, + function (st) { + try { + const lt = st.slice(0) + AudioContext.getContext().decodeAudioData(lt, function (ut) { + nt(ut) + }) + } catch (lt) { + it ? it(lt) : console.error(lt), ot.manager.itemError(et) + } + }, + rt, + it, + ) + } + } + class HemisphereLightProbe extends LightProbe { + constructor(et, nt, rt = 1) { + super(void 0, rt), (this.isHemisphereLightProbe = !0) + const it = new Color$1().set(et), + ot = new Color$1().set(nt), + at = new Vector3(it.r, it.g, it.b), + st = new Vector3(ot.r, ot.g, ot.b), + lt = Math.sqrt(Math.PI), + ct = lt * Math.sqrt(0.75) + this.sh.coefficients[0].copy(at).add(st).multiplyScalar(lt), + this.sh.coefficients[1].copy(at).sub(st).multiplyScalar(ct) + } + } + class AmbientLightProbe extends LightProbe { + constructor(et, nt = 1) { + super(void 0, nt), (this.isAmbientLightProbe = !0) + const rt = new Color$1().set(et) + this.sh.coefficients[0].set(rt.r, rt.g, rt.b).multiplyScalar(2 * Math.sqrt(Math.PI)) + } + } + const _eyeRight = new Matrix4(), + _eyeLeft = new Matrix4(), + _projectionMatrix = new Matrix4() + class StereoCamera { + constructor() { + ;(this.type = 'StereoCamera'), + (this.aspect = 1), + (this.eyeSep = 0.064), + (this.cameraL = new PerspectiveCamera()), + this.cameraL.layers.enable(1), + (this.cameraL.matrixAutoUpdate = !1), + (this.cameraR = new PerspectiveCamera()), + this.cameraR.layers.enable(2), + (this.cameraR.matrixAutoUpdate = !1), + (this._cache = { focus: null, fov: null, aspect: null, near: null, far: null, zoom: null, eyeSep: null }) + } + update(et) { + const nt = this._cache + if ( + nt.focus !== et.focus || + nt.fov !== et.fov || + nt.aspect !== et.aspect * this.aspect || + nt.near !== et.near || + nt.far !== et.far || + nt.zoom !== et.zoom || + nt.eyeSep !== this.eyeSep + ) { + ;(nt.focus = et.focus), + (nt.fov = et.fov), + (nt.aspect = et.aspect * this.aspect), + (nt.near = et.near), + (nt.far = et.far), + (nt.zoom = et.zoom), + (nt.eyeSep = this.eyeSep), + _projectionMatrix.copy(et.projectionMatrix) + const it = nt.eyeSep / 2, + ot = (it * nt.near) / nt.focus, + at = (nt.near * Math.tan(DEG2RAD$1 * nt.fov * 0.5)) / nt.zoom + let st, lt + ;(_eyeLeft.elements[12] = -it), + (_eyeRight.elements[12] = it), + (st = -at * nt.aspect + ot), + (lt = at * nt.aspect + ot), + (_projectionMatrix.elements[0] = (2 * nt.near) / (lt - st)), + (_projectionMatrix.elements[8] = (lt + st) / (lt - st)), + this.cameraL.projectionMatrix.copy(_projectionMatrix), + (st = -at * nt.aspect - ot), + (lt = at * nt.aspect - ot), + (_projectionMatrix.elements[0] = (2 * nt.near) / (lt - st)), + (_projectionMatrix.elements[8] = (lt + st) / (lt - st)), + this.cameraR.projectionMatrix.copy(_projectionMatrix) + } + this.cameraL.matrixWorld.copy(et.matrixWorld).multiply(_eyeLeft), + this.cameraR.matrixWorld.copy(et.matrixWorld).multiply(_eyeRight) + } + } + let Clock$1 = class { + constructor(et = !0) { + ;(this.autoStart = et), (this.startTime = 0), (this.oldTime = 0), (this.elapsedTime = 0), (this.running = !1) + } + start() { + ;(this.startTime = now$5()), (this.oldTime = this.startTime), (this.elapsedTime = 0), (this.running = !0) + } + stop() { + this.getElapsedTime(), (this.running = !1), (this.autoStart = !1) + } + getElapsedTime() { + return this.getDelta(), this.elapsedTime + } + getDelta() { + let et = 0 + if (this.autoStart && !this.running) return this.start(), 0 + if (this.running) { + const nt = now$5() + ;(et = (nt - this.oldTime) / 1e3), (this.oldTime = nt), (this.elapsedTime += et) + } + return et + } + } + function now$5() { + return (typeof performance > 'u' ? Date : performance).now() + } + const _position$1 = new Vector3(), + _quaternion$1 = new Quaternion(), + _scale$1 = new Vector3(), + _orientation$1 = new Vector3() + class AudioListener extends Object3D { + constructor() { + super(), + (this.type = 'AudioListener'), + (this.context = AudioContext.getContext()), + (this.gain = this.context.createGain()), + this.gain.connect(this.context.destination), + (this.filter = null), + (this.timeDelta = 0), + (this._clock = new Clock$1()) + } + getInput() { + return this.gain + } + removeFilter() { + return ( + this.filter !== null && + (this.gain.disconnect(this.filter), + this.filter.disconnect(this.context.destination), + this.gain.connect(this.context.destination), + (this.filter = null)), + this + ) + } + getFilter() { + return this.filter + } + setFilter(et) { + return ( + this.filter !== null + ? (this.gain.disconnect(this.filter), this.filter.disconnect(this.context.destination)) + : this.gain.disconnect(this.context.destination), + (this.filter = et), + this.gain.connect(this.filter), + this.filter.connect(this.context.destination), + this + ) + } + getMasterVolume() { + return this.gain.gain.value + } + setMasterVolume(et) { + return this.gain.gain.setTargetAtTime(et, this.context.currentTime, 0.01), this + } + updateMatrixWorld(et) { + super.updateMatrixWorld(et) + const nt = this.context.listener, + rt = this.up + if ( + ((this.timeDelta = this._clock.getDelta()), + this.matrixWorld.decompose(_position$1, _quaternion$1, _scale$1), + _orientation$1.set(0, 0, -1).applyQuaternion(_quaternion$1), + nt.positionX) + ) { + const it = this.context.currentTime + this.timeDelta + nt.positionX.linearRampToValueAtTime(_position$1.x, it), + nt.positionY.linearRampToValueAtTime(_position$1.y, it), + nt.positionZ.linearRampToValueAtTime(_position$1.z, it), + nt.forwardX.linearRampToValueAtTime(_orientation$1.x, it), + nt.forwardY.linearRampToValueAtTime(_orientation$1.y, it), + nt.forwardZ.linearRampToValueAtTime(_orientation$1.z, it), + nt.upX.linearRampToValueAtTime(rt.x, it), + nt.upY.linearRampToValueAtTime(rt.y, it), + nt.upZ.linearRampToValueAtTime(rt.z, it) + } else + nt.setPosition(_position$1.x, _position$1.y, _position$1.z), + nt.setOrientation(_orientation$1.x, _orientation$1.y, _orientation$1.z, rt.x, rt.y, rt.z) + } + } + let Audio$1 = class extends Object3D { + constructor(et) { + super(), + (this.type = 'Audio'), + (this.listener = et), + (this.context = et.context), + (this.gain = this.context.createGain()), + this.gain.connect(et.getInput()), + (this.autoplay = !1), + (this.buffer = null), + (this.detune = 0), + (this.loop = !1), + (this.loopStart = 0), + (this.loopEnd = 0), + (this.offset = 0), + (this.duration = void 0), + (this.playbackRate = 1), + (this.isPlaying = !1), + (this.hasPlaybackControl = !0), + (this.source = null), + (this.sourceType = 'empty'), + (this._startedAt = 0), + (this._progress = 0), + (this._connected = !1), + (this.filters = []) + } + getOutput() { + return this.gain + } + setNodeSource(et) { + return (this.hasPlaybackControl = !1), (this.sourceType = 'audioNode'), (this.source = et), this.connect(), this + } + setMediaElementSource(et) { + return ( + (this.hasPlaybackControl = !1), + (this.sourceType = 'mediaNode'), + (this.source = this.context.createMediaElementSource(et)), + this.connect(), + this + ) + } + setMediaStreamSource(et) { + return ( + (this.hasPlaybackControl = !1), + (this.sourceType = 'mediaStreamNode'), + (this.source = this.context.createMediaStreamSource(et)), + this.connect(), + this + ) + } + setBuffer(et) { + return (this.buffer = et), (this.sourceType = 'buffer'), this.autoplay && this.play(), this + } + play(et = 0) { + if (this.isPlaying === !0) { + console.warn('THREE.Audio: Audio is already playing.') + return + } + if (this.hasPlaybackControl === !1) { + console.warn('THREE.Audio: this Audio has no playback control.') + return + } + this._startedAt = this.context.currentTime + et + const nt = this.context.createBufferSource() + return ( + (nt.buffer = this.buffer), + (nt.loop = this.loop), + (nt.loopStart = this.loopStart), + (nt.loopEnd = this.loopEnd), + (nt.onended = this.onEnded.bind(this)), + nt.start(this._startedAt, this._progress + this.offset, this.duration), + (this.isPlaying = !0), + (this.source = nt), + this.setDetune(this.detune), + this.setPlaybackRate(this.playbackRate), + this.connect() + ) + } + pause() { + if (this.hasPlaybackControl === !1) { + console.warn('THREE.Audio: this Audio has no playback control.') + return + } + return ( + this.isPlaying === !0 && + ((this._progress += Math.max(this.context.currentTime - this._startedAt, 0) * this.playbackRate), + this.loop === !0 && (this._progress = this._progress % (this.duration || this.buffer.duration)), + this.source.stop(), + (this.source.onended = null), + (this.isPlaying = !1)), + this + ) + } + stop() { + if (this.hasPlaybackControl === !1) { + console.warn('THREE.Audio: this Audio has no playback control.') + return + } + return (this._progress = 0), this.source.stop(), (this.source.onended = null), (this.isPlaying = !1), this + } + connect() { + if (this.filters.length > 0) { + this.source.connect(this.filters[0]) + for (let et = 1, nt = this.filters.length; et < nt; et++) this.filters[et - 1].connect(this.filters[et]) + this.filters[this.filters.length - 1].connect(this.getOutput()) + } else this.source.connect(this.getOutput()) + return (this._connected = !0), this + } + disconnect() { + if (this.filters.length > 0) { + this.source.disconnect(this.filters[0]) + for (let et = 1, nt = this.filters.length; et < nt; et++) this.filters[et - 1].disconnect(this.filters[et]) + this.filters[this.filters.length - 1].disconnect(this.getOutput()) + } else this.source.disconnect(this.getOutput()) + return (this._connected = !1), this + } + getFilters() { + return this.filters + } + setFilters(et) { + return ( + et || (et = []), + this._connected === !0 + ? (this.disconnect(), (this.filters = et.slice()), this.connect()) + : (this.filters = et.slice()), + this + ) + } + setDetune(et) { + if (((this.detune = et), this.source.detune !== void 0)) + return ( + this.isPlaying === !0 && this.source.detune.setTargetAtTime(this.detune, this.context.currentTime, 0.01), this + ) + } + getDetune() { + return this.detune + } + getFilter() { + return this.getFilters()[0] + } + setFilter(et) { + return this.setFilters(et ? [et] : []) + } + setPlaybackRate(et) { + if (this.hasPlaybackControl === !1) { + console.warn('THREE.Audio: this Audio has no playback control.') + return + } + return ( + (this.playbackRate = et), + this.isPlaying === !0 && + this.source.playbackRate.setTargetAtTime(this.playbackRate, this.context.currentTime, 0.01), + this + ) + } + getPlaybackRate() { + return this.playbackRate + } + onEnded() { + this.isPlaying = !1 + } + getLoop() { + return this.hasPlaybackControl === !1 + ? (console.warn('THREE.Audio: this Audio has no playback control.'), !1) + : this.loop + } + setLoop(et) { + if (this.hasPlaybackControl === !1) { + console.warn('THREE.Audio: this Audio has no playback control.') + return + } + return (this.loop = et), this.isPlaying === !0 && (this.source.loop = this.loop), this + } + setLoopStart(et) { + return (this.loopStart = et), this + } + setLoopEnd(et) { + return (this.loopEnd = et), this + } + getVolume() { + return this.gain.gain.value + } + setVolume(et) { + return this.gain.gain.setTargetAtTime(et, this.context.currentTime, 0.01), this + } + } + const _position = new Vector3(), + _quaternion = new Quaternion(), + _scale = new Vector3(), + _orientation = new Vector3() + class PositionalAudio extends Audio$1 { + constructor(et) { + super(et), + (this.panner = this.context.createPanner()), + (this.panner.panningModel = 'HRTF'), + this.panner.connect(this.gain) + } + disconnect() { + super.disconnect(), this.panner.disconnect(this.gain) + } + getOutput() { + return this.panner + } + getRefDistance() { + return this.panner.refDistance + } + setRefDistance(et) { + return (this.panner.refDistance = et), this + } + getRolloffFactor() { + return this.panner.rolloffFactor + } + setRolloffFactor(et) { + return (this.panner.rolloffFactor = et), this + } + getDistanceModel() { + return this.panner.distanceModel + } + setDistanceModel(et) { + return (this.panner.distanceModel = et), this + } + getMaxDistance() { + return this.panner.maxDistance + } + setMaxDistance(et) { + return (this.panner.maxDistance = et), this + } + setDirectionalCone(et, nt, rt) { + return ( + (this.panner.coneInnerAngle = et), (this.panner.coneOuterAngle = nt), (this.panner.coneOuterGain = rt), this + ) + } + updateMatrixWorld(et) { + if ((super.updateMatrixWorld(et), this.hasPlaybackControl === !0 && this.isPlaying === !1)) return + this.matrixWorld.decompose(_position, _quaternion, _scale), _orientation.set(0, 0, 1).applyQuaternion(_quaternion) + const nt = this.panner + if (nt.positionX) { + const rt = this.context.currentTime + this.listener.timeDelta + nt.positionX.linearRampToValueAtTime(_position.x, rt), + nt.positionY.linearRampToValueAtTime(_position.y, rt), + nt.positionZ.linearRampToValueAtTime(_position.z, rt), + nt.orientationX.linearRampToValueAtTime(_orientation.x, rt), + nt.orientationY.linearRampToValueAtTime(_orientation.y, rt), + nt.orientationZ.linearRampToValueAtTime(_orientation.z, rt) + } else + nt.setPosition(_position.x, _position.y, _position.z), + nt.setOrientation(_orientation.x, _orientation.y, _orientation.z) + } + } + class AudioAnalyser { + constructor(et, nt = 2048) { + ;(this.analyser = et.context.createAnalyser()), + (this.analyser.fftSize = nt), + (this.data = new Uint8Array(this.analyser.frequencyBinCount)), + et.getOutput().connect(this.analyser) + } + getFrequencyData() { + return this.analyser.getByteFrequencyData(this.data), this.data + } + getAverageFrequency() { + let et = 0 + const nt = this.getFrequencyData() + for (let rt = 0; rt < nt.length; rt++) et += nt[rt] + return et / nt.length + } + } + class PropertyMixer { + constructor(et, nt, rt) { + ;(this.binding = et), (this.valueSize = rt) + let it, ot, at + switch (nt) { + case 'quaternion': + ;(it = this._slerp), + (ot = this._slerpAdditive), + (at = this._setAdditiveIdentityQuaternion), + (this.buffer = new Float64Array(rt * 6)), + (this._workIndex = 5) + break + case 'string': + case 'bool': + ;(it = this._select), + (ot = this._select), + (at = this._setAdditiveIdentityOther), + (this.buffer = new Array(rt * 5)) + break + default: + ;(it = this._lerp), + (ot = this._lerpAdditive), + (at = this._setAdditiveIdentityNumeric), + (this.buffer = new Float64Array(rt * 5)) + } + ;(this._mixBufferRegion = it), + (this._mixBufferRegionAdditive = ot), + (this._setIdentity = at), + (this._origIndex = 3), + (this._addIndex = 4), + (this.cumulativeWeight = 0), + (this.cumulativeWeightAdditive = 0), + (this.useCount = 0), + (this.referenceCount = 0) + } + accumulate(et, nt) { + const rt = this.buffer, + it = this.valueSize, + ot = et * it + it + let at = this.cumulativeWeight + if (at === 0) { + for (let st = 0; st !== it; ++st) rt[ot + st] = rt[st] + at = nt + } else { + at += nt + const st = nt / at + this._mixBufferRegion(rt, ot, 0, st, it) + } + this.cumulativeWeight = at + } + accumulateAdditive(et) { + const nt = this.buffer, + rt = this.valueSize, + it = rt * this._addIndex + this.cumulativeWeightAdditive === 0 && this._setIdentity(), + this._mixBufferRegionAdditive(nt, it, 0, et, rt), + (this.cumulativeWeightAdditive += et) + } + apply(et) { + const nt = this.valueSize, + rt = this.buffer, + it = et * nt + nt, + ot = this.cumulativeWeight, + at = this.cumulativeWeightAdditive, + st = this.binding + if (((this.cumulativeWeight = 0), (this.cumulativeWeightAdditive = 0), ot < 1)) { + const lt = nt * this._origIndex + this._mixBufferRegion(rt, it, lt, 1 - ot, nt) + } + at > 0 && this._mixBufferRegionAdditive(rt, it, this._addIndex * nt, 1, nt) + for (let lt = nt, ct = nt + nt; lt !== ct; ++lt) + if (rt[lt] !== rt[lt + nt]) { + st.setValue(rt, it) + break + } + } + saveOriginalState() { + const et = this.binding, + nt = this.buffer, + rt = this.valueSize, + it = rt * this._origIndex + et.getValue(nt, it) + for (let ot = rt, at = it; ot !== at; ++ot) nt[ot] = nt[it + (ot % rt)] + this._setIdentity(), (this.cumulativeWeight = 0), (this.cumulativeWeightAdditive = 0) + } + restoreOriginalState() { + const et = this.valueSize * 3 + this.binding.setValue(this.buffer, et) + } + _setAdditiveIdentityNumeric() { + const et = this._addIndex * this.valueSize, + nt = et + this.valueSize + for (let rt = et; rt < nt; rt++) this.buffer[rt] = 0 + } + _setAdditiveIdentityQuaternion() { + this._setAdditiveIdentityNumeric(), (this.buffer[this._addIndex * this.valueSize + 3] = 1) + } + _setAdditiveIdentityOther() { + const et = this._origIndex * this.valueSize, + nt = this._addIndex * this.valueSize + for (let rt = 0; rt < this.valueSize; rt++) this.buffer[nt + rt] = this.buffer[et + rt] + } + _select(et, nt, rt, it, ot) { + if (it >= 0.5) for (let at = 0; at !== ot; ++at) et[nt + at] = et[rt + at] + } + _slerp(et, nt, rt, it) { + Quaternion.slerpFlat(et, nt, et, nt, et, rt, it) + } + _slerpAdditive(et, nt, rt, it, ot) { + const at = this._workIndex * ot + Quaternion.multiplyQuaternionsFlat(et, at, et, nt, et, rt), Quaternion.slerpFlat(et, nt, et, nt, et, at, it) + } + _lerp(et, nt, rt, it, ot) { + const at = 1 - it + for (let st = 0; st !== ot; ++st) { + const lt = nt + st + et[lt] = et[lt] * at + et[rt + st] * it + } + } + _lerpAdditive(et, nt, rt, it, ot) { + for (let at = 0; at !== ot; ++at) { + const st = nt + at + et[st] = et[st] + et[rt + at] * it + } + } + } + const _RESERVED_CHARS_RE = '\\[\\]\\.:\\/', + _reservedRe = new RegExp('[' + _RESERVED_CHARS_RE + ']', 'g'), + _wordChar = '[^' + _RESERVED_CHARS_RE + ']', + _wordCharOrDot = '[^' + _RESERVED_CHARS_RE.replace('\\.', '') + ']', + _directoryRe = /((?:WC+[\/:])*)/.source.replace('WC', _wordChar), + _nodeRe = /(WCOD+)?/.source.replace('WCOD', _wordCharOrDot), + _objectRe = /(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace('WC', _wordChar), + _propertyRe = /\.(WC+)(?:\[(.+)\])?/.source.replace('WC', _wordChar), + _trackRe = new RegExp('^' + _directoryRe + _nodeRe + _objectRe + _propertyRe + '$'), + _supportedObjectNames = ['material', 'materials', 'bones'] + class Composite { + constructor(et, nt, rt) { + const it = rt || PropertyBinding.parseTrackName(nt) + ;(this._targetGroup = et), (this._bindings = et.subscribe_(nt, it)) + } + getValue(et, nt) { + this.bind() + const rt = this._targetGroup.nCachedObjects_, + it = this._bindings[rt] + it !== void 0 && it.getValue(et, nt) + } + setValue(et, nt) { + const rt = this._bindings + for (let it = this._targetGroup.nCachedObjects_, ot = rt.length; it !== ot; ++it) rt[it].setValue(et, nt) + } + bind() { + const et = this._bindings + for (let nt = this._targetGroup.nCachedObjects_, rt = et.length; nt !== rt; ++nt) et[nt].bind() + } + unbind() { + const et = this._bindings + for (let nt = this._targetGroup.nCachedObjects_, rt = et.length; nt !== rt; ++nt) et[nt].unbind() + } + } + class PropertyBinding { + constructor(et, nt, rt) { + ;(this.path = nt), + (this.parsedPath = rt || PropertyBinding.parseTrackName(nt)), + (this.node = PropertyBinding.findNode(et, this.parsedPath.nodeName) || et), + (this.rootNode = et), + (this.getValue = this._getValue_unbound), + (this.setValue = this._setValue_unbound) + } + static create(et, nt, rt) { + return et && et.isAnimationObjectGroup + ? new PropertyBinding.Composite(et, nt, rt) + : new PropertyBinding(et, nt, rt) + } + static sanitizeNodeName(et) { + return et.replace(/\s/g, '_').replace(_reservedRe, '') + } + static parseTrackName(et) { + const nt = _trackRe.exec(et) + if (nt === null) throw new Error('PropertyBinding: Cannot parse trackName: ' + et) + const rt = { nodeName: nt[2], objectName: nt[3], objectIndex: nt[4], propertyName: nt[5], propertyIndex: nt[6] }, + it = rt.nodeName && rt.nodeName.lastIndexOf('.') + if (it !== void 0 && it !== -1) { + const ot = rt.nodeName.substring(it + 1) + _supportedObjectNames.indexOf(ot) !== -1 && ((rt.nodeName = rt.nodeName.substring(0, it)), (rt.objectName = ot)) + } + if (rt.propertyName === null || rt.propertyName.length === 0) + throw new Error('PropertyBinding: can not parse propertyName from trackName: ' + et) + return rt + } + static findNode(et, nt) { + if (nt === void 0 || nt === '' || nt === '.' || nt === -1 || nt === et.name || nt === et.uuid) return et + if (et.skeleton) { + const rt = et.skeleton.getBoneByName(nt) + if (rt !== void 0) return rt + } + if (et.children) { + const rt = function (ot) { + for (let at = 0; at < ot.length; at++) { + const st = ot[at] + if (st.name === nt || st.uuid === nt) return st + const lt = rt(st.children) + if (lt) return lt + } + return null + }, + it = rt(et.children) + if (it) return it + } + return null + } + _getValue_unavailable() {} + _setValue_unavailable() {} + _getValue_direct(et, nt) { + et[nt] = this.targetObject[this.propertyName] + } + _getValue_array(et, nt) { + const rt = this.resolvedProperty + for (let it = 0, ot = rt.length; it !== ot; ++it) et[nt++] = rt[it] + } + _getValue_arrayElement(et, nt) { + et[nt] = this.resolvedProperty[this.propertyIndex] + } + _getValue_toArray(et, nt) { + this.resolvedProperty.toArray(et, nt) + } + _setValue_direct(et, nt) { + this.targetObject[this.propertyName] = et[nt] + } + _setValue_direct_setNeedsUpdate(et, nt) { + ;(this.targetObject[this.propertyName] = et[nt]), (this.targetObject.needsUpdate = !0) + } + _setValue_direct_setMatrixWorldNeedsUpdate(et, nt) { + ;(this.targetObject[this.propertyName] = et[nt]), (this.targetObject.matrixWorldNeedsUpdate = !0) + } + _setValue_array(et, nt) { + const rt = this.resolvedProperty + for (let it = 0, ot = rt.length; it !== ot; ++it) rt[it] = et[nt++] + } + _setValue_array_setNeedsUpdate(et, nt) { + const rt = this.resolvedProperty + for (let it = 0, ot = rt.length; it !== ot; ++it) rt[it] = et[nt++] + this.targetObject.needsUpdate = !0 + } + _setValue_array_setMatrixWorldNeedsUpdate(et, nt) { + const rt = this.resolvedProperty + for (let it = 0, ot = rt.length; it !== ot; ++it) rt[it] = et[nt++] + this.targetObject.matrixWorldNeedsUpdate = !0 + } + _setValue_arrayElement(et, nt) { + this.resolvedProperty[this.propertyIndex] = et[nt] + } + _setValue_arrayElement_setNeedsUpdate(et, nt) { + ;(this.resolvedProperty[this.propertyIndex] = et[nt]), (this.targetObject.needsUpdate = !0) + } + _setValue_arrayElement_setMatrixWorldNeedsUpdate(et, nt) { + ;(this.resolvedProperty[this.propertyIndex] = et[nt]), (this.targetObject.matrixWorldNeedsUpdate = !0) + } + _setValue_fromArray(et, nt) { + this.resolvedProperty.fromArray(et, nt) + } + _setValue_fromArray_setNeedsUpdate(et, nt) { + this.resolvedProperty.fromArray(et, nt), (this.targetObject.needsUpdate = !0) + } + _setValue_fromArray_setMatrixWorldNeedsUpdate(et, nt) { + this.resolvedProperty.fromArray(et, nt), (this.targetObject.matrixWorldNeedsUpdate = !0) + } + _getValue_unbound(et, nt) { + this.bind(), this.getValue(et, nt) + } + _setValue_unbound(et, nt) { + this.bind(), this.setValue(et, nt) + } + bind() { + let et = this.node + const nt = this.parsedPath, + rt = nt.objectName, + it = nt.propertyName + let ot = nt.propertyIndex + if ( + (et || ((et = PropertyBinding.findNode(this.rootNode, nt.nodeName) || this.rootNode), (this.node = et)), + (this.getValue = this._getValue_unavailable), + (this.setValue = this._setValue_unavailable), + !et) + ) { + console.error('THREE.PropertyBinding: Trying to update node for track: ' + this.path + " but it wasn't found.") + return + } + if (rt) { + let ct = nt.objectIndex + switch (rt) { + case 'materials': + if (!et.material) { + console.error('THREE.PropertyBinding: Can not bind to material as node does not have a material.', this) + return + } + if (!et.material.materials) { + console.error( + 'THREE.PropertyBinding: Can not bind to material.materials as node.material does not have a materials array.', + this, + ) + return + } + et = et.material.materials + break + case 'bones': + if (!et.skeleton) { + console.error('THREE.PropertyBinding: Can not bind to bones as node does not have a skeleton.', this) + return + } + et = et.skeleton.bones + for (let ut = 0; ut < et.length; ut++) + if (et[ut].name === ct) { + ct = ut + break + } + break + default: + if (et[rt] === void 0) { + console.error('THREE.PropertyBinding: Can not bind to objectName of node undefined.', this) + return + } + et = et[rt] + } + if (ct !== void 0) { + if (et[ct] === void 0) { + console.error( + 'THREE.PropertyBinding: Trying to bind to objectIndex of objectName, but is undefined.', + this, + et, + ) + return + } + et = et[ct] + } + } + const at = et[it] + if (at === void 0) { + const ct = nt.nodeName + console.error( + 'THREE.PropertyBinding: Trying to update property for track: ' + ct + '.' + it + " but it wasn't found.", + et, + ) + return + } + let st = this.Versioning.None + ;(this.targetObject = et), + et.needsUpdate !== void 0 + ? (st = this.Versioning.NeedsUpdate) + : et.matrixWorldNeedsUpdate !== void 0 && (st = this.Versioning.MatrixWorldNeedsUpdate) + let lt = this.BindingType.Direct + if (ot !== void 0) { + if (it === 'morphTargetInfluences') { + if (!et.geometry) { + console.error( + 'THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.', + this, + ) + return + } + if (!et.geometry.morphAttributes) { + console.error( + 'THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.morphAttributes.', + this, + ) + return + } + et.morphTargetDictionary[ot] !== void 0 && (ot = et.morphTargetDictionary[ot]) + } + ;(lt = this.BindingType.ArrayElement), (this.resolvedProperty = at), (this.propertyIndex = ot) + } else + at.fromArray !== void 0 && at.toArray !== void 0 + ? ((lt = this.BindingType.HasFromToArray), (this.resolvedProperty = at)) + : Array.isArray(at) + ? ((lt = this.BindingType.EntireArray), (this.resolvedProperty = at)) + : (this.propertyName = it) + ;(this.getValue = this.GetterByBindingType[lt]), (this.setValue = this.SetterByBindingTypeAndVersioning[lt][st]) + } + unbind() { + ;(this.node = null), (this.getValue = this._getValue_unbound), (this.setValue = this._setValue_unbound) + } + } + PropertyBinding.Composite = Composite + PropertyBinding.prototype.BindingType = { Direct: 0, EntireArray: 1, ArrayElement: 2, HasFromToArray: 3 } + PropertyBinding.prototype.Versioning = { None: 0, NeedsUpdate: 1, MatrixWorldNeedsUpdate: 2 } + PropertyBinding.prototype.GetterByBindingType = [ + PropertyBinding.prototype._getValue_direct, + PropertyBinding.prototype._getValue_array, + PropertyBinding.prototype._getValue_arrayElement, + PropertyBinding.prototype._getValue_toArray, + ] + PropertyBinding.prototype.SetterByBindingTypeAndVersioning = [ + [ + PropertyBinding.prototype._setValue_direct, + PropertyBinding.prototype._setValue_direct_setNeedsUpdate, + PropertyBinding.prototype._setValue_direct_setMatrixWorldNeedsUpdate, + ], + [ + PropertyBinding.prototype._setValue_array, + PropertyBinding.prototype._setValue_array_setNeedsUpdate, + PropertyBinding.prototype._setValue_array_setMatrixWorldNeedsUpdate, + ], + [ + PropertyBinding.prototype._setValue_arrayElement, + PropertyBinding.prototype._setValue_arrayElement_setNeedsUpdate, + PropertyBinding.prototype._setValue_arrayElement_setMatrixWorldNeedsUpdate, + ], + [ + PropertyBinding.prototype._setValue_fromArray, + PropertyBinding.prototype._setValue_fromArray_setNeedsUpdate, + PropertyBinding.prototype._setValue_fromArray_setMatrixWorldNeedsUpdate, + ], + ] + class AnimationObjectGroup { + constructor() { + ;(this.isAnimationObjectGroup = !0), + (this.uuid = generateUUID$1()), + (this._objects = Array.prototype.slice.call(arguments)), + (this.nCachedObjects_ = 0) + const et = {} + this._indicesByUUID = et + for (let rt = 0, it = arguments.length; rt !== it; ++rt) et[arguments[rt].uuid] = rt + ;(this._paths = []), (this._parsedPaths = []), (this._bindings = []), (this._bindingsIndicesByPath = {}) + const nt = this + this.stats = { + objects: { + get total() { + return nt._objects.length + }, + get inUse() { + return this.total - nt.nCachedObjects_ + }, + }, + get bindingsPerObject() { + return nt._bindings.length + }, + } + } + add() { + const et = this._objects, + nt = this._indicesByUUID, + rt = this._paths, + it = this._parsedPaths, + ot = this._bindings, + at = ot.length + let st, + lt = et.length, + ct = this.nCachedObjects_ + for (let ut = 0, ht = arguments.length; ut !== ht; ++ut) { + const dt = arguments[ut], + pt = dt.uuid + let mt = nt[pt] + if (mt === void 0) { + ;(mt = lt++), (nt[pt] = mt), et.push(dt) + for (let gt = 0, yt = at; gt !== yt; ++gt) ot[gt].push(new PropertyBinding(dt, rt[gt], it[gt])) + } else if (mt < ct) { + st = et[mt] + const gt = --ct, + yt = et[gt] + ;(nt[yt.uuid] = mt), (et[mt] = yt), (nt[pt] = gt), (et[gt] = dt) + for (let bt = 0, vt = at; bt !== vt; ++bt) { + const xt = ot[bt], + kt = xt[gt] + let St = xt[mt] + ;(xt[mt] = kt), St === void 0 && (St = new PropertyBinding(dt, rt[bt], it[bt])), (xt[gt] = St) + } + } else + et[mt] !== st && + console.error( + 'THREE.AnimationObjectGroup: Different objects with the same UUID detected. Clean the caches or recreate your infrastructure when reloading scenes.', + ) + } + this.nCachedObjects_ = ct + } + remove() { + const et = this._objects, + nt = this._indicesByUUID, + rt = this._bindings, + it = rt.length + let ot = this.nCachedObjects_ + for (let at = 0, st = arguments.length; at !== st; ++at) { + const lt = arguments[at], + ct = lt.uuid, + ut = nt[ct] + if (ut !== void 0 && ut >= ot) { + const ht = ot++, + dt = et[ht] + ;(nt[dt.uuid] = ut), (et[ut] = dt), (nt[ct] = ht), (et[ht] = lt) + for (let pt = 0, mt = it; pt !== mt; ++pt) { + const gt = rt[pt], + yt = gt[ht], + bt = gt[ut] + ;(gt[ut] = yt), (gt[ht] = bt) + } + } + } + this.nCachedObjects_ = ot + } + uncache() { + const et = this._objects, + nt = this._indicesByUUID, + rt = this._bindings, + it = rt.length + let ot = this.nCachedObjects_, + at = et.length + for (let st = 0, lt = arguments.length; st !== lt; ++st) { + const ct = arguments[st], + ut = ct.uuid, + ht = nt[ut] + if (ht !== void 0) + if ((delete nt[ut], ht < ot)) { + const dt = --ot, + pt = et[dt], + mt = --at, + gt = et[mt] + ;(nt[pt.uuid] = ht), (et[ht] = pt), (nt[gt.uuid] = dt), (et[dt] = gt), et.pop() + for (let yt = 0, bt = it; yt !== bt; ++yt) { + const vt = rt[yt], + xt = vt[dt], + kt = vt[mt] + ;(vt[ht] = xt), (vt[dt] = kt), vt.pop() + } + } else { + const dt = --at, + pt = et[dt] + dt > 0 && (nt[pt.uuid] = ht), (et[ht] = pt), et.pop() + for (let mt = 0, gt = it; mt !== gt; ++mt) { + const yt = rt[mt] + ;(yt[ht] = yt[dt]), yt.pop() + } + } + } + this.nCachedObjects_ = ot + } + subscribe_(et, nt) { + const rt = this._bindingsIndicesByPath + let it = rt[et] + const ot = this._bindings + if (it !== void 0) return ot[it] + const at = this._paths, + st = this._parsedPaths, + lt = this._objects, + ct = lt.length, + ut = this.nCachedObjects_, + ht = new Array(ct) + ;(it = ot.length), (rt[et] = it), at.push(et), st.push(nt), ot.push(ht) + for (let dt = ut, pt = lt.length; dt !== pt; ++dt) { + const mt = lt[dt] + ht[dt] = new PropertyBinding(mt, et, nt) + } + return ht + } + unsubscribe_(et) { + const nt = this._bindingsIndicesByPath, + rt = nt[et] + if (rt !== void 0) { + const it = this._paths, + ot = this._parsedPaths, + at = this._bindings, + st = at.length - 1, + lt = at[st], + ct = et[st] + ;(nt[ct] = rt), (at[rt] = lt), at.pop(), (ot[rt] = ot[st]), ot.pop(), (it[rt] = it[st]), it.pop() + } + } + } + class AnimationAction { + constructor(et, nt, rt = null, it = nt.blendMode) { + ;(this._mixer = et), (this._clip = nt), (this._localRoot = rt), (this.blendMode = it) + const ot = nt.tracks, + at = ot.length, + st = new Array(at), + lt = { endingStart: ZeroCurvatureEnding, endingEnd: ZeroCurvatureEnding } + for (let ct = 0; ct !== at; ++ct) { + const ut = ot[ct].createInterpolant(null) + ;(st[ct] = ut), (ut.settings = lt) + } + ;(this._interpolantSettings = lt), + (this._interpolants = st), + (this._propertyBindings = new Array(at)), + (this._cacheIndex = null), + (this._byClipCacheIndex = null), + (this._timeScaleInterpolant = null), + (this._weightInterpolant = null), + (this.loop = LoopRepeat), + (this._loopCount = -1), + (this._startTime = null), + (this.time = 0), + (this.timeScale = 1), + (this._effectiveTimeScale = 1), + (this.weight = 1), + (this._effectiveWeight = 1), + (this.repetitions = 1 / 0), + (this.paused = !1), + (this.enabled = !0), + (this.clampWhenFinished = !1), + (this.zeroSlopeAtStart = !0), + (this.zeroSlopeAtEnd = !0) + } + play() { + return this._mixer._activateAction(this), this + } + stop() { + return this._mixer._deactivateAction(this), this.reset() + } + reset() { + return ( + (this.paused = !1), + (this.enabled = !0), + (this.time = 0), + (this._loopCount = -1), + (this._startTime = null), + this.stopFading().stopWarping() + ) + } + isRunning() { + return ( + this.enabled && + !this.paused && + this.timeScale !== 0 && + this._startTime === null && + this._mixer._isActiveAction(this) + ) + } + isScheduled() { + return this._mixer._isActiveAction(this) + } + startAt(et) { + return (this._startTime = et), this + } + setLoop(et, nt) { + return (this.loop = et), (this.repetitions = nt), this + } + setEffectiveWeight(et) { + return (this.weight = et), (this._effectiveWeight = this.enabled ? et : 0), this.stopFading() + } + getEffectiveWeight() { + return this._effectiveWeight + } + fadeIn(et) { + return this._scheduleFading(et, 0, 1) + } + fadeOut(et) { + return this._scheduleFading(et, 1, 0) + } + crossFadeFrom(et, nt, rt) { + if ((et.fadeOut(nt), this.fadeIn(nt), rt)) { + const it = this._clip.duration, + ot = et._clip.duration, + at = ot / it, + st = it / ot + et.warp(1, at, nt), this.warp(st, 1, nt) + } + return this + } + crossFadeTo(et, nt, rt) { + return et.crossFadeFrom(this, nt, rt) + } + stopFading() { + const et = this._weightInterpolant + return et !== null && ((this._weightInterpolant = null), this._mixer._takeBackControlInterpolant(et)), this + } + setEffectiveTimeScale(et) { + return (this.timeScale = et), (this._effectiveTimeScale = this.paused ? 0 : et), this.stopWarping() + } + getEffectiveTimeScale() { + return this._effectiveTimeScale + } + setDuration(et) { + return (this.timeScale = this._clip.duration / et), this.stopWarping() + } + syncWith(et) { + return (this.time = et.time), (this.timeScale = et.timeScale), this.stopWarping() + } + halt(et) { + return this.warp(this._effectiveTimeScale, 0, et) + } + warp(et, nt, rt) { + const it = this._mixer, + ot = it.time, + at = this.timeScale + let st = this._timeScaleInterpolant + st === null && ((st = it._lendControlInterpolant()), (this._timeScaleInterpolant = st)) + const lt = st.parameterPositions, + ct = st.sampleValues + return (lt[0] = ot), (lt[1] = ot + rt), (ct[0] = et / at), (ct[1] = nt / at), this + } + stopWarping() { + const et = this._timeScaleInterpolant + return et !== null && ((this._timeScaleInterpolant = null), this._mixer._takeBackControlInterpolant(et)), this + } + getMixer() { + return this._mixer + } + getClip() { + return this._clip + } + getRoot() { + return this._localRoot || this._mixer._root + } + _update(et, nt, rt, it) { + if (!this.enabled) { + this._updateWeight(et) + return + } + const ot = this._startTime + if (ot !== null) { + const lt = (et - ot) * rt + if (lt < 0 || rt === 0) return + ;(this._startTime = null), (nt = rt * lt) + } + nt *= this._updateTimeScale(et) + const at = this._updateTime(nt), + st = this._updateWeight(et) + if (st > 0) { + const lt = this._interpolants, + ct = this._propertyBindings + switch (this.blendMode) { + case AdditiveAnimationBlendMode: + for (let ut = 0, ht = lt.length; ut !== ht; ++ut) lt[ut].evaluate(at), ct[ut].accumulateAdditive(st) + break + case NormalAnimationBlendMode: + default: + for (let ut = 0, ht = lt.length; ut !== ht; ++ut) lt[ut].evaluate(at), ct[ut].accumulate(it, st) + } + } + } + _updateWeight(et) { + let nt = 0 + if (this.enabled) { + nt = this.weight + const rt = this._weightInterpolant + if (rt !== null) { + const it = rt.evaluate(et)[0] + ;(nt *= it), et > rt.parameterPositions[1] && (this.stopFading(), it === 0 && (this.enabled = !1)) + } + } + return (this._effectiveWeight = nt), nt + } + _updateTimeScale(et) { + let nt = 0 + if (!this.paused) { + nt = this.timeScale + const rt = this._timeScaleInterpolant + if (rt !== null) { + const it = rt.evaluate(et)[0] + ;(nt *= it), + et > rt.parameterPositions[1] && (this.stopWarping(), nt === 0 ? (this.paused = !0) : (this.timeScale = nt)) + } + } + return (this._effectiveTimeScale = nt), nt + } + _updateTime(et) { + const nt = this._clip.duration, + rt = this.loop + let it = this.time + et, + ot = this._loopCount + const at = rt === LoopPingPong + if (et === 0) return ot === -1 ? it : at && (ot & 1) === 1 ? nt - it : it + if (rt === LoopOnce) { + ot === -1 && ((this._loopCount = 0), this._setEndings(!0, !0, !1)) + e: { + if (it >= nt) it = nt + else if (it < 0) it = 0 + else { + this.time = it + break e + } + this.clampWhenFinished ? (this.paused = !0) : (this.enabled = !1), + (this.time = it), + this._mixer.dispatchEvent({ type: 'finished', action: this, direction: et < 0 ? -1 : 1 }) + } + } else { + if ( + (ot === -1 && + (et >= 0 + ? ((ot = 0), this._setEndings(!0, this.repetitions === 0, at)) + : this._setEndings(this.repetitions === 0, !0, at)), + it >= nt || it < 0) + ) { + const st = Math.floor(it / nt) + ;(it -= nt * st), (ot += Math.abs(st)) + const lt = this.repetitions - ot + if (lt <= 0) + this.clampWhenFinished ? (this.paused = !0) : (this.enabled = !1), + (it = et > 0 ? nt : 0), + (this.time = it), + this._mixer.dispatchEvent({ type: 'finished', action: this, direction: et > 0 ? 1 : -1 }) + else { + if (lt === 1) { + const ct = et < 0 + this._setEndings(ct, !ct, at) + } else this._setEndings(!1, !1, at) + ;(this._loopCount = ot), + (this.time = it), + this._mixer.dispatchEvent({ type: 'loop', action: this, loopDelta: st }) + } + } else this.time = it + if (at && (ot & 1) === 1) return nt - it + } + return it + } + _setEndings(et, nt, rt) { + const it = this._interpolantSettings + rt + ? ((it.endingStart = ZeroSlopeEnding), (it.endingEnd = ZeroSlopeEnding)) + : (et + ? (it.endingStart = this.zeroSlopeAtStart ? ZeroSlopeEnding : ZeroCurvatureEnding) + : (it.endingStart = WrapAroundEnding), + nt + ? (it.endingEnd = this.zeroSlopeAtEnd ? ZeroSlopeEnding : ZeroCurvatureEnding) + : (it.endingEnd = WrapAroundEnding)) + } + _scheduleFading(et, nt, rt) { + const it = this._mixer, + ot = it.time + let at = this._weightInterpolant + at === null && ((at = it._lendControlInterpolant()), (this._weightInterpolant = at)) + const st = at.parameterPositions, + lt = at.sampleValues + return (st[0] = ot), (lt[0] = nt), (st[1] = ot + et), (lt[1] = rt), this + } + } + const _controlInterpolantsResultBuffer = new Float32Array(1) + class AnimationMixer extends EventDispatcher$1 { + constructor(et) { + super(), + (this._root = et), + this._initMemoryManager(), + (this._accuIndex = 0), + (this.time = 0), + (this.timeScale = 1) + } + _bindAction(et, nt) { + const rt = et._localRoot || this._root, + it = et._clip.tracks, + ot = it.length, + at = et._propertyBindings, + st = et._interpolants, + lt = rt.uuid, + ct = this._bindingsByRootAndName + let ut = ct[lt] + ut === void 0 && ((ut = {}), (ct[lt] = ut)) + for (let ht = 0; ht !== ot; ++ht) { + const dt = it[ht], + pt = dt.name + let mt = ut[pt] + if (mt !== void 0) ++mt.referenceCount, (at[ht] = mt) + else { + if (((mt = at[ht]), mt !== void 0)) { + mt._cacheIndex === null && (++mt.referenceCount, this._addInactiveBinding(mt, lt, pt)) + continue + } + const gt = nt && nt._propertyBindings[ht].binding.parsedPath + ;(mt = new PropertyMixer(PropertyBinding.create(rt, pt, gt), dt.ValueTypeName, dt.getValueSize())), + ++mt.referenceCount, + this._addInactiveBinding(mt, lt, pt), + (at[ht] = mt) + } + st[ht].resultBuffer = mt.buffer + } + } + _activateAction(et) { + if (!this._isActiveAction(et)) { + if (et._cacheIndex === null) { + const rt = (et._localRoot || this._root).uuid, + it = et._clip.uuid, + ot = this._actionsByClip[it] + this._bindAction(et, ot && ot.knownActions[0]), this._addInactiveAction(et, it, rt) + } + const nt = et._propertyBindings + for (let rt = 0, it = nt.length; rt !== it; ++rt) { + const ot = nt[rt] + ot.useCount++ === 0 && (this._lendBinding(ot), ot.saveOriginalState()) + } + this._lendAction(et) + } + } + _deactivateAction(et) { + if (this._isActiveAction(et)) { + const nt = et._propertyBindings + for (let rt = 0, it = nt.length; rt !== it; ++rt) { + const ot = nt[rt] + --ot.useCount === 0 && (ot.restoreOriginalState(), this._takeBackBinding(ot)) + } + this._takeBackAction(et) + } + } + _initMemoryManager() { + ;(this._actions = []), + (this._nActiveActions = 0), + (this._actionsByClip = {}), + (this._bindings = []), + (this._nActiveBindings = 0), + (this._bindingsByRootAndName = {}), + (this._controlInterpolants = []), + (this._nActiveControlInterpolants = 0) + const et = this + this.stats = { + actions: { + get total() { + return et._actions.length + }, + get inUse() { + return et._nActiveActions + }, + }, + bindings: { + get total() { + return et._bindings.length + }, + get inUse() { + return et._nActiveBindings + }, + }, + controlInterpolants: { + get total() { + return et._controlInterpolants.length + }, + get inUse() { + return et._nActiveControlInterpolants + }, + }, + } + } + _isActiveAction(et) { + const nt = et._cacheIndex + return nt !== null && nt < this._nActiveActions + } + _addInactiveAction(et, nt, rt) { + const it = this._actions, + ot = this._actionsByClip + let at = ot[nt] + if (at === void 0) (at = { knownActions: [et], actionByRoot: {} }), (et._byClipCacheIndex = 0), (ot[nt] = at) + else { + const st = at.knownActions + ;(et._byClipCacheIndex = st.length), st.push(et) + } + ;(et._cacheIndex = it.length), it.push(et), (at.actionByRoot[rt] = et) + } + _removeInactiveAction(et) { + const nt = this._actions, + rt = nt[nt.length - 1], + it = et._cacheIndex + ;(rt._cacheIndex = it), (nt[it] = rt), nt.pop(), (et._cacheIndex = null) + const ot = et._clip.uuid, + at = this._actionsByClip, + st = at[ot], + lt = st.knownActions, + ct = lt[lt.length - 1], + ut = et._byClipCacheIndex + ;(ct._byClipCacheIndex = ut), (lt[ut] = ct), lt.pop(), (et._byClipCacheIndex = null) + const ht = st.actionByRoot, + dt = (et._localRoot || this._root).uuid + delete ht[dt], lt.length === 0 && delete at[ot], this._removeInactiveBindingsForAction(et) + } + _removeInactiveBindingsForAction(et) { + const nt = et._propertyBindings + for (let rt = 0, it = nt.length; rt !== it; ++rt) { + const ot = nt[rt] + --ot.referenceCount === 0 && this._removeInactiveBinding(ot) + } + } + _lendAction(et) { + const nt = this._actions, + rt = et._cacheIndex, + it = this._nActiveActions++, + ot = nt[it] + ;(et._cacheIndex = it), (nt[it] = et), (ot._cacheIndex = rt), (nt[rt] = ot) + } + _takeBackAction(et) { + const nt = this._actions, + rt = et._cacheIndex, + it = --this._nActiveActions, + ot = nt[it] + ;(et._cacheIndex = it), (nt[it] = et), (ot._cacheIndex = rt), (nt[rt] = ot) + } + _addInactiveBinding(et, nt, rt) { + const it = this._bindingsByRootAndName, + ot = this._bindings + let at = it[nt] + at === void 0 && ((at = {}), (it[nt] = at)), (at[rt] = et), (et._cacheIndex = ot.length), ot.push(et) + } + _removeInactiveBinding(et) { + const nt = this._bindings, + rt = et.binding, + it = rt.rootNode.uuid, + ot = rt.path, + at = this._bindingsByRootAndName, + st = at[it], + lt = nt[nt.length - 1], + ct = et._cacheIndex + ;(lt._cacheIndex = ct), (nt[ct] = lt), nt.pop(), delete st[ot], Object.keys(st).length === 0 && delete at[it] + } + _lendBinding(et) { + const nt = this._bindings, + rt = et._cacheIndex, + it = this._nActiveBindings++, + ot = nt[it] + ;(et._cacheIndex = it), (nt[it] = et), (ot._cacheIndex = rt), (nt[rt] = ot) + } + _takeBackBinding(et) { + const nt = this._bindings, + rt = et._cacheIndex, + it = --this._nActiveBindings, + ot = nt[it] + ;(et._cacheIndex = it), (nt[it] = et), (ot._cacheIndex = rt), (nt[rt] = ot) + } + _lendControlInterpolant() { + const et = this._controlInterpolants, + nt = this._nActiveControlInterpolants++ + let rt = et[nt] + return ( + rt === void 0 && + ((rt = new LinearInterpolant(new Float32Array(2), new Float32Array(2), 1, _controlInterpolantsResultBuffer)), + (rt.__cacheIndex = nt), + (et[nt] = rt)), + rt + ) + } + _takeBackControlInterpolant(et) { + const nt = this._controlInterpolants, + rt = et.__cacheIndex, + it = --this._nActiveControlInterpolants, + ot = nt[it] + ;(et.__cacheIndex = it), (nt[it] = et), (ot.__cacheIndex = rt), (nt[rt] = ot) + } + clipAction(et, nt, rt) { + const it = nt || this._root, + ot = it.uuid + let at = typeof et == 'string' ? AnimationClip.findByName(it, et) : et + const st = at !== null ? at.uuid : et, + lt = this._actionsByClip[st] + let ct = null + if ((rt === void 0 && (at !== null ? (rt = at.blendMode) : (rt = NormalAnimationBlendMode)), lt !== void 0)) { + const ht = lt.actionByRoot[ot] + if (ht !== void 0 && ht.blendMode === rt) return ht + ;(ct = lt.knownActions[0]), at === null && (at = ct._clip) + } + if (at === null) return null + const ut = new AnimationAction(this, at, nt, rt) + return this._bindAction(ut, ct), this._addInactiveAction(ut, st, ot), ut + } + existingAction(et, nt) { + const rt = nt || this._root, + it = rt.uuid, + ot = typeof et == 'string' ? AnimationClip.findByName(rt, et) : et, + at = ot ? ot.uuid : et, + st = this._actionsByClip[at] + return (st !== void 0 && st.actionByRoot[it]) || null + } + stopAllAction() { + const et = this._actions, + nt = this._nActiveActions + for (let rt = nt - 1; rt >= 0; --rt) et[rt].stop() + return this + } + update(et) { + et *= this.timeScale + const nt = this._actions, + rt = this._nActiveActions, + it = (this.time += et), + ot = Math.sign(et), + at = (this._accuIndex ^= 1) + for (let ct = 0; ct !== rt; ++ct) nt[ct]._update(it, et, ot, at) + const st = this._bindings, + lt = this._nActiveBindings + for (let ct = 0; ct !== lt; ++ct) st[ct].apply(at) + return this + } + setTime(et) { + this.time = 0 + for (let nt = 0; nt < this._actions.length; nt++) this._actions[nt].time = 0 + return this.update(et) + } + getRoot() { + return this._root + } + uncacheClip(et) { + const nt = this._actions, + rt = et.uuid, + it = this._actionsByClip, + ot = it[rt] + if (ot !== void 0) { + const at = ot.knownActions + for (let st = 0, lt = at.length; st !== lt; ++st) { + const ct = at[st] + this._deactivateAction(ct) + const ut = ct._cacheIndex, + ht = nt[nt.length - 1] + ;(ct._cacheIndex = null), + (ct._byClipCacheIndex = null), + (ht._cacheIndex = ut), + (nt[ut] = ht), + nt.pop(), + this._removeInactiveBindingsForAction(ct) + } + delete it[rt] + } + } + uncacheRoot(et) { + const nt = et.uuid, + rt = this._actionsByClip + for (const at in rt) { + const st = rt[at].actionByRoot, + lt = st[nt] + lt !== void 0 && (this._deactivateAction(lt), this._removeInactiveAction(lt)) + } + const it = this._bindingsByRootAndName, + ot = it[nt] + if (ot !== void 0) + for (const at in ot) { + const st = ot[at] + st.restoreOriginalState(), this._removeInactiveBinding(st) + } + } + uncacheAction(et, nt) { + const rt = this.existingAction(et, nt) + rt !== null && (this._deactivateAction(rt), this._removeInactiveAction(rt)) + } + } + class Uniform { + constructor(et) { + typeof et == 'string' && + (console.warn('THREE.Uniform: Type parameter is no longer needed.'), (et = arguments[1])), + (this.value = et) + } + clone() { + return new Uniform(this.value.clone === void 0 ? this.value : this.value.clone()) + } + } + let id$1 = 0 + class UniformsGroup extends EventDispatcher$1 { + constructor() { + super(), + (this.isUniformsGroup = !0), + Object.defineProperty(this, 'id', { value: id$1++ }), + (this.name = ''), + (this.usage = StaticDrawUsage), + (this.uniforms = []) + } + add(et) { + return this.uniforms.push(et), this + } + remove(et) { + const nt = this.uniforms.indexOf(et) + return nt !== -1 && this.uniforms.splice(nt, 1), this + } + setName(et) { + return (this.name = et), this + } + setUsage(et) { + return (this.usage = et), this + } + dispose() { + return this.dispatchEvent({ type: 'dispose' }), this + } + copy(et) { + ;(this.name = et.name), (this.usage = et.usage) + const nt = et.uniforms + this.uniforms.length = 0 + for (let rt = 0, it = nt.length; rt < it; rt++) this.uniforms.push(nt[rt].clone()) + return this + } + clone() { + return new this.constructor().copy(this) + } + } + class InstancedInterleavedBuffer extends InterleavedBuffer { + constructor(et, nt, rt = 1) { + super(et, nt), (this.isInstancedInterleavedBuffer = !0), (this.meshPerAttribute = rt) + } + copy(et) { + return super.copy(et), (this.meshPerAttribute = et.meshPerAttribute), this + } + clone(et) { + const nt = super.clone(et) + return (nt.meshPerAttribute = this.meshPerAttribute), nt + } + toJSON(et) { + const nt = super.toJSON(et) + return (nt.isInstancedInterleavedBuffer = !0), (nt.meshPerAttribute = this.meshPerAttribute), nt + } + } + class GLBufferAttribute { + constructor(et, nt, rt, it, ot) { + ;(this.isGLBufferAttribute = !0), + (this.buffer = et), + (this.type = nt), + (this.itemSize = rt), + (this.elementSize = it), + (this.count = ot), + (this.version = 0) + } + set needsUpdate(et) { + et === !0 && this.version++ + } + setBuffer(et) { + return (this.buffer = et), this + } + setType(et, nt) { + return (this.type = et), (this.elementSize = nt), this + } + setItemSize(et) { + return (this.itemSize = et), this + } + setCount(et) { + return (this.count = et), this + } + } + class Raycaster { + constructor(et, nt, rt = 0, it = 1 / 0) { + ;(this.ray = new Ray(et, nt)), + (this.near = rt), + (this.far = it), + (this.camera = null), + (this.layers = new Layers()), + (this.params = { Mesh: {}, Line: { threshold: 1 }, LOD: {}, Points: { threshold: 1 }, Sprite: {} }) + } + set(et, nt) { + this.ray.set(et, nt) + } + setFromCamera(et, nt) { + nt.isPerspectiveCamera + ? (this.ray.origin.setFromMatrixPosition(nt.matrixWorld), + this.ray.direction.set(et.x, et.y, 0.5).unproject(nt).sub(this.ray.origin).normalize(), + (this.camera = nt)) + : nt.isOrthographicCamera + ? (this.ray.origin.set(et.x, et.y, (nt.near + nt.far) / (nt.near - nt.far)).unproject(nt), + this.ray.direction.set(0, 0, -1).transformDirection(nt.matrixWorld), + (this.camera = nt)) + : console.error('THREE.Raycaster: Unsupported camera type: ' + nt.type) + } + intersectObject(et, nt = !0, rt = []) { + return intersectObject(et, this, rt, nt), rt.sort(ascSort), rt + } + intersectObjects(et, nt = !0, rt = []) { + for (let it = 0, ot = et.length; it < ot; it++) intersectObject(et[it], this, rt, nt) + return rt.sort(ascSort), rt + } + } + function ascSort(tt, et) { + return tt.distance - et.distance + } + function intersectObject(tt, et, nt, rt) { + if ((tt.layers.test(et.layers) && tt.raycast(et, nt), rt === !0)) { + const it = tt.children + for (let ot = 0, at = it.length; ot < at; ot++) intersectObject(it[ot], et, nt, !0) + } + } + class Spherical { + constructor(et = 1, nt = 0, rt = 0) { + return (this.radius = et), (this.phi = nt), (this.theta = rt), this + } + set(et, nt, rt) { + return (this.radius = et), (this.phi = nt), (this.theta = rt), this + } + copy(et) { + return (this.radius = et.radius), (this.phi = et.phi), (this.theta = et.theta), this + } + makeSafe() { + return (this.phi = Math.max(1e-6, Math.min(Math.PI - 1e-6, this.phi))), this + } + setFromVector3(et) { + return this.setFromCartesianCoords(et.x, et.y, et.z) + } + setFromCartesianCoords(et, nt, rt) { + return ( + (this.radius = Math.sqrt(et * et + nt * nt + rt * rt)), + this.radius === 0 + ? ((this.theta = 0), (this.phi = 0)) + : ((this.theta = Math.atan2(et, rt)), (this.phi = Math.acos(clamp$5(nt / this.radius, -1, 1)))), + this + ) + } + clone() { + return new this.constructor().copy(this) + } + } + class Cylindrical { + constructor(et = 1, nt = 0, rt = 0) { + return (this.radius = et), (this.theta = nt), (this.y = rt), this + } + set(et, nt, rt) { + return (this.radius = et), (this.theta = nt), (this.y = rt), this + } + copy(et) { + return (this.radius = et.radius), (this.theta = et.theta), (this.y = et.y), this + } + setFromVector3(et) { + return this.setFromCartesianCoords(et.x, et.y, et.z) + } + setFromCartesianCoords(et, nt, rt) { + return (this.radius = Math.sqrt(et * et + rt * rt)), (this.theta = Math.atan2(et, rt)), (this.y = nt), this + } + clone() { + return new this.constructor().copy(this) + } + } + const _vector$4 = new Vector2() + class Box2 { + constructor(et = new Vector2(1 / 0, 1 / 0), nt = new Vector2(-1 / 0, -1 / 0)) { + ;(this.isBox2 = !0), (this.min = et), (this.max = nt) + } + set(et, nt) { + return this.min.copy(et), this.max.copy(nt), this + } + setFromPoints(et) { + this.makeEmpty() + for (let nt = 0, rt = et.length; nt < rt; nt++) this.expandByPoint(et[nt]) + return this + } + setFromCenterAndSize(et, nt) { + const rt = _vector$4.copy(nt).multiplyScalar(0.5) + return this.min.copy(et).sub(rt), this.max.copy(et).add(rt), this + } + clone() { + return new this.constructor().copy(this) + } + copy(et) { + return this.min.copy(et.min), this.max.copy(et.max), this + } + makeEmpty() { + return (this.min.x = this.min.y = 1 / 0), (this.max.x = this.max.y = -1 / 0), this + } + isEmpty() { + return this.max.x < this.min.x || this.max.y < this.min.y + } + getCenter(et) { + return this.isEmpty() ? et.set(0, 0) : et.addVectors(this.min, this.max).multiplyScalar(0.5) + } + getSize(et) { + return this.isEmpty() ? et.set(0, 0) : et.subVectors(this.max, this.min) + } + expandByPoint(et) { + return this.min.min(et), this.max.max(et), this + } + expandByVector(et) { + return this.min.sub(et), this.max.add(et), this + } + expandByScalar(et) { + return this.min.addScalar(-et), this.max.addScalar(et), this + } + containsPoint(et) { + return !(et.x < this.min.x || et.x > this.max.x || et.y < this.min.y || et.y > this.max.y) + } + containsBox(et) { + return this.min.x <= et.min.x && et.max.x <= this.max.x && this.min.y <= et.min.y && et.max.y <= this.max.y + } + getParameter(et, nt) { + return nt.set((et.x - this.min.x) / (this.max.x - this.min.x), (et.y - this.min.y) / (this.max.y - this.min.y)) + } + intersectsBox(et) { + return !(et.max.x < this.min.x || et.min.x > this.max.x || et.max.y < this.min.y || et.min.y > this.max.y) + } + clampPoint(et, nt) { + return nt.copy(et).clamp(this.min, this.max) + } + distanceToPoint(et) { + return _vector$4.copy(et).clamp(this.min, this.max).sub(et).length() + } + intersect(et) { + return this.min.max(et.min), this.max.min(et.max), this + } + union(et) { + return this.min.min(et.min), this.max.max(et.max), this + } + translate(et) { + return this.min.add(et), this.max.add(et), this + } + equals(et) { + return et.min.equals(this.min) && et.max.equals(this.max) + } + } + const _startP = new Vector3(), + _startEnd = new Vector3() + class Line3 { + constructor(et = new Vector3(), nt = new Vector3()) { + ;(this.start = et), (this.end = nt) + } + set(et, nt) { + return this.start.copy(et), this.end.copy(nt), this + } + copy(et) { + return this.start.copy(et.start), this.end.copy(et.end), this + } + getCenter(et) { + return et.addVectors(this.start, this.end).multiplyScalar(0.5) + } + delta(et) { + return et.subVectors(this.end, this.start) + } + distanceSq() { + return this.start.distanceToSquared(this.end) + } + distance() { + return this.start.distanceTo(this.end) + } + at(et, nt) { + return this.delta(nt).multiplyScalar(et).add(this.start) + } + closestPointToPointParameter(et, nt) { + _startP.subVectors(et, this.start), _startEnd.subVectors(this.end, this.start) + const rt = _startEnd.dot(_startEnd) + let ot = _startEnd.dot(_startP) / rt + return nt && (ot = clamp$5(ot, 0, 1)), ot + } + closestPointToPoint(et, nt, rt) { + const it = this.closestPointToPointParameter(et, nt) + return this.delta(rt).multiplyScalar(it).add(this.start) + } + applyMatrix4(et) { + return this.start.applyMatrix4(et), this.end.applyMatrix4(et), this + } + equals(et) { + return et.start.equals(this.start) && et.end.equals(this.end) + } + clone() { + return new this.constructor().copy(this) + } + } + const _vector$3 = new Vector3() + class SpotLightHelper extends Object3D { + constructor(et, nt) { + super(), + (this.light = et), + this.light.updateMatrixWorld(), + (this.matrix = et.matrixWorld), + (this.matrixAutoUpdate = !1), + (this.color = nt) + const rt = new BufferGeometry(), + it = [0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, -1, 0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, -1, 1] + for (let at = 0, st = 1, lt = 32; at < lt; at++, st++) { + const ct = (at / lt) * Math.PI * 2, + ut = (st / lt) * Math.PI * 2 + it.push(Math.cos(ct), Math.sin(ct), 1, Math.cos(ut), Math.sin(ut), 1) + } + rt.setAttribute('position', new Float32BufferAttribute(it, 3)) + const ot = new LineBasicMaterial({ fog: !1, toneMapped: !1 }) + ;(this.cone = new LineSegments(rt, ot)), this.add(this.cone), this.update() + } + dispose() { + this.cone.geometry.dispose(), this.cone.material.dispose() + } + update() { + this.light.updateMatrixWorld() + const et = this.light.distance ? this.light.distance : 1e3, + nt = et * Math.tan(this.light.angle) + this.cone.scale.set(nt, nt, et), + _vector$3.setFromMatrixPosition(this.light.target.matrixWorld), + this.cone.lookAt(_vector$3), + this.color !== void 0 + ? this.cone.material.color.set(this.color) + : this.cone.material.color.copy(this.light.color) + } + } + const _vector$2 = new Vector3(), + _boneMatrix = new Matrix4(), + _matrixWorldInv = new Matrix4() + class SkeletonHelper extends LineSegments { + constructor(et) { + const nt = getBoneList(et), + rt = new BufferGeometry(), + it = [], + ot = [], + at = new Color$1(0, 0, 1), + st = new Color$1(0, 1, 0) + for (let ct = 0; ct < nt.length; ct++) { + const ut = nt[ct] + ut.parent && + ut.parent.isBone && + (it.push(0, 0, 0), it.push(0, 0, 0), ot.push(at.r, at.g, at.b), ot.push(st.r, st.g, st.b)) + } + rt.setAttribute('position', new Float32BufferAttribute(it, 3)), + rt.setAttribute('color', new Float32BufferAttribute(ot, 3)) + const lt = new LineBasicMaterial({ + vertexColors: !0, + depthTest: !1, + depthWrite: !1, + toneMapped: !1, + transparent: !0, + }) + super(rt, lt), + (this.isSkeletonHelper = !0), + (this.type = 'SkeletonHelper'), + (this.root = et), + (this.bones = nt), + (this.matrix = et.matrixWorld), + (this.matrixAutoUpdate = !1) + } + updateMatrixWorld(et) { + const nt = this.bones, + rt = this.geometry, + it = rt.getAttribute('position') + _matrixWorldInv.copy(this.root.matrixWorld).invert() + for (let ot = 0, at = 0; ot < nt.length; ot++) { + const st = nt[ot] + st.parent && + st.parent.isBone && + (_boneMatrix.multiplyMatrices(_matrixWorldInv, st.matrixWorld), + _vector$2.setFromMatrixPosition(_boneMatrix), + it.setXYZ(at, _vector$2.x, _vector$2.y, _vector$2.z), + _boneMatrix.multiplyMatrices(_matrixWorldInv, st.parent.matrixWorld), + _vector$2.setFromMatrixPosition(_boneMatrix), + it.setXYZ(at + 1, _vector$2.x, _vector$2.y, _vector$2.z), + (at += 2)) + } + ;(rt.getAttribute('position').needsUpdate = !0), super.updateMatrixWorld(et) + } + } + function getBoneList(tt) { + const et = [] + tt.isBone === !0 && et.push(tt) + for (let nt = 0; nt < tt.children.length; nt++) et.push.apply(et, getBoneList(tt.children[nt])) + return et + } + class PointLightHelper extends Mesh { + constructor(et, nt, rt) { + const it = new SphereGeometry(nt, 4, 2), + ot = new MeshBasicMaterial({ wireframe: !0, fog: !1, toneMapped: !1 }) + super(it, ot), + (this.light = et), + this.light.updateMatrixWorld(), + (this.color = rt), + (this.type = 'PointLightHelper'), + (this.matrix = this.light.matrixWorld), + (this.matrixAutoUpdate = !1), + this.update() + } + dispose() { + this.geometry.dispose(), this.material.dispose() + } + update() { + this.color !== void 0 ? this.material.color.set(this.color) : this.material.color.copy(this.light.color) + } + } + const _vector$1 = new Vector3(), + _color1 = new Color$1(), + _color2 = new Color$1() + class HemisphereLightHelper extends Object3D { + constructor(et, nt, rt) { + super(), + (this.light = et), + this.light.updateMatrixWorld(), + (this.matrix = et.matrixWorld), + (this.matrixAutoUpdate = !1), + (this.color = rt) + const it = new OctahedronGeometry(nt) + it.rotateY(Math.PI * 0.5), + (this.material = new MeshBasicMaterial({ wireframe: !0, fog: !1, toneMapped: !1 })), + this.color === void 0 && (this.material.vertexColors = !0) + const ot = it.getAttribute('position'), + at = new Float32Array(ot.count * 3) + it.setAttribute('color', new BufferAttribute(at, 3)), this.add(new Mesh(it, this.material)), this.update() + } + dispose() { + this.children[0].geometry.dispose(), this.children[0].material.dispose() + } + update() { + const et = this.children[0] + if (this.color !== void 0) this.material.color.set(this.color) + else { + const nt = et.geometry.getAttribute('color') + _color1.copy(this.light.color), _color2.copy(this.light.groundColor) + for (let rt = 0, it = nt.count; rt < it; rt++) { + const ot = rt < it / 2 ? _color1 : _color2 + nt.setXYZ(rt, ot.r, ot.g, ot.b) + } + nt.needsUpdate = !0 + } + et.lookAt(_vector$1.setFromMatrixPosition(this.light.matrixWorld).negate()) + } + } + class GridHelper extends LineSegments { + constructor(et = 10, nt = 10, rt = 4473924, it = 8947848) { + ;(rt = new Color$1(rt)), (it = new Color$1(it)) + const ot = nt / 2, + at = et / nt, + st = et / 2, + lt = [], + ct = [] + for (let dt = 0, pt = 0, mt = -st; dt <= nt; dt++, mt += at) { + lt.push(-st, 0, mt, st, 0, mt), lt.push(mt, 0, -st, mt, 0, st) + const gt = dt === ot ? rt : it + gt.toArray(ct, pt), + (pt += 3), + gt.toArray(ct, pt), + (pt += 3), + gt.toArray(ct, pt), + (pt += 3), + gt.toArray(ct, pt), + (pt += 3) + } + const ut = new BufferGeometry() + ut.setAttribute('position', new Float32BufferAttribute(lt, 3)), + ut.setAttribute('color', new Float32BufferAttribute(ct, 3)) + const ht = new LineBasicMaterial({ vertexColors: !0, toneMapped: !1 }) + super(ut, ht), (this.type = 'GridHelper') + } + } + class PolarGridHelper extends LineSegments { + constructor(et = 10, nt = 16, rt = 8, it = 64, ot = 4473924, at = 8947848) { + ;(ot = new Color$1(ot)), (at = new Color$1(at)) + const st = [], + lt = [] + for (let ht = 0; ht <= nt; ht++) { + const dt = (ht / nt) * (Math.PI * 2), + pt = Math.sin(dt) * et, + mt = Math.cos(dt) * et + st.push(0, 0, 0), st.push(pt, 0, mt) + const gt = ht & 1 ? ot : at + lt.push(gt.r, gt.g, gt.b), lt.push(gt.r, gt.g, gt.b) + } + for (let ht = 0; ht <= rt; ht++) { + const dt = ht & 1 ? ot : at, + pt = et - (et / rt) * ht + for (let mt = 0; mt < it; mt++) { + let gt = (mt / it) * (Math.PI * 2), + yt = Math.sin(gt) * pt, + bt = Math.cos(gt) * pt + st.push(yt, 0, bt), + lt.push(dt.r, dt.g, dt.b), + (gt = ((mt + 1) / it) * (Math.PI * 2)), + (yt = Math.sin(gt) * pt), + (bt = Math.cos(gt) * pt), + st.push(yt, 0, bt), + lt.push(dt.r, dt.g, dt.b) + } + } + const ct = new BufferGeometry() + ct.setAttribute('position', new Float32BufferAttribute(st, 3)), + ct.setAttribute('color', new Float32BufferAttribute(lt, 3)) + const ut = new LineBasicMaterial({ vertexColors: !0, toneMapped: !1 }) + super(ct, ut), (this.type = 'PolarGridHelper') + } + } + const _v1 = new Vector3(), + _v2$4 = new Vector3(), + _v3 = new Vector3() + class DirectionalLightHelper extends Object3D { + constructor(et, nt, rt) { + super(), + (this.light = et), + this.light.updateMatrixWorld(), + (this.matrix = et.matrixWorld), + (this.matrixAutoUpdate = !1), + (this.color = rt), + nt === void 0 && (nt = 1) + let it = new BufferGeometry() + it.setAttribute( + 'position', + new Float32BufferAttribute([-nt, nt, 0, nt, nt, 0, nt, -nt, 0, -nt, -nt, 0, -nt, nt, 0], 3), + ) + const ot = new LineBasicMaterial({ fog: !1, toneMapped: !1 }) + ;(this.lightPlane = new Line$2(it, ot)), + this.add(this.lightPlane), + (it = new BufferGeometry()), + it.setAttribute('position', new Float32BufferAttribute([0, 0, 0, 0, 0, 1], 3)), + (this.targetLine = new Line$2(it, ot)), + this.add(this.targetLine), + this.update() + } + dispose() { + this.lightPlane.geometry.dispose(), + this.lightPlane.material.dispose(), + this.targetLine.geometry.dispose(), + this.targetLine.material.dispose() + } + update() { + _v1.setFromMatrixPosition(this.light.matrixWorld), + _v2$4.setFromMatrixPosition(this.light.target.matrixWorld), + _v3.subVectors(_v2$4, _v1), + this.lightPlane.lookAt(_v2$4), + this.color !== void 0 + ? (this.lightPlane.material.color.set(this.color), this.targetLine.material.color.set(this.color)) + : (this.lightPlane.material.color.copy(this.light.color), + this.targetLine.material.color.copy(this.light.color)), + this.targetLine.lookAt(_v2$4), + (this.targetLine.scale.z = _v3.length()) + } + } + const _vector$d = new Vector3(), + _camera = new Camera() + class CameraHelper extends LineSegments { + constructor(et) { + const nt = new BufferGeometry(), + rt = new LineBasicMaterial({ color: 16777215, vertexColors: !0, toneMapped: !1 }), + it = [], + ot = [], + at = {} + st('n1', 'n2'), + st('n2', 'n4'), + st('n4', 'n3'), + st('n3', 'n1'), + st('f1', 'f2'), + st('f2', 'f4'), + st('f4', 'f3'), + st('f3', 'f1'), + st('n1', 'f1'), + st('n2', 'f2'), + st('n3', 'f3'), + st('n4', 'f4'), + st('p', 'n1'), + st('p', 'n2'), + st('p', 'n3'), + st('p', 'n4'), + st('u1', 'u2'), + st('u2', 'u3'), + st('u3', 'u1'), + st('c', 't'), + st('p', 'c'), + st('cn1', 'cn2'), + st('cn3', 'cn4'), + st('cf1', 'cf2'), + st('cf3', 'cf4') + function st(mt, gt) { + lt(mt), lt(gt) + } + function lt(mt) { + it.push(0, 0, 0), ot.push(0, 0, 0), at[mt] === void 0 && (at[mt] = []), at[mt].push(it.length / 3 - 1) + } + nt.setAttribute('position', new Float32BufferAttribute(it, 3)), + nt.setAttribute('color', new Float32BufferAttribute(ot, 3)), + super(nt, rt), + (this.type = 'CameraHelper'), + (this.camera = et), + this.camera.updateProjectionMatrix && this.camera.updateProjectionMatrix(), + (this.matrix = et.matrixWorld), + (this.matrixAutoUpdate = !1), + (this.pointMap = at), + this.update() + const ct = new Color$1(16755200), + ut = new Color$1(16711680), + ht = new Color$1(43775), + dt = new Color$1(16777215), + pt = new Color$1(3355443) + this.setColors(ct, ut, ht, dt, pt) + } + setColors(et, nt, rt, it, ot) { + const st = this.geometry.getAttribute('color') + st.setXYZ(0, et.r, et.g, et.b), + st.setXYZ(1, et.r, et.g, et.b), + st.setXYZ(2, et.r, et.g, et.b), + st.setXYZ(3, et.r, et.g, et.b), + st.setXYZ(4, et.r, et.g, et.b), + st.setXYZ(5, et.r, et.g, et.b), + st.setXYZ(6, et.r, et.g, et.b), + st.setXYZ(7, et.r, et.g, et.b), + st.setXYZ(8, et.r, et.g, et.b), + st.setXYZ(9, et.r, et.g, et.b), + st.setXYZ(10, et.r, et.g, et.b), + st.setXYZ(11, et.r, et.g, et.b), + st.setXYZ(12, et.r, et.g, et.b), + st.setXYZ(13, et.r, et.g, et.b), + st.setXYZ(14, et.r, et.g, et.b), + st.setXYZ(15, et.r, et.g, et.b), + st.setXYZ(16, et.r, et.g, et.b), + st.setXYZ(17, et.r, et.g, et.b), + st.setXYZ(18, et.r, et.g, et.b), + st.setXYZ(19, et.r, et.g, et.b), + st.setXYZ(20, et.r, et.g, et.b), + st.setXYZ(21, et.r, et.g, et.b), + st.setXYZ(22, et.r, et.g, et.b), + st.setXYZ(23, et.r, et.g, et.b), + st.setXYZ(24, nt.r, nt.g, nt.b), + st.setXYZ(25, nt.r, nt.g, nt.b), + st.setXYZ(26, nt.r, nt.g, nt.b), + st.setXYZ(27, nt.r, nt.g, nt.b), + st.setXYZ(28, nt.r, nt.g, nt.b), + st.setXYZ(29, nt.r, nt.g, nt.b), + st.setXYZ(30, nt.r, nt.g, nt.b), + st.setXYZ(31, nt.r, nt.g, nt.b), + st.setXYZ(32, rt.r, rt.g, rt.b), + st.setXYZ(33, rt.r, rt.g, rt.b), + st.setXYZ(34, rt.r, rt.g, rt.b), + st.setXYZ(35, rt.r, rt.g, rt.b), + st.setXYZ(36, rt.r, rt.g, rt.b), + st.setXYZ(37, rt.r, rt.g, rt.b), + st.setXYZ(38, it.r, it.g, it.b), + st.setXYZ(39, it.r, it.g, it.b), + st.setXYZ(40, ot.r, ot.g, ot.b), + st.setXYZ(41, ot.r, ot.g, ot.b), + st.setXYZ(42, ot.r, ot.g, ot.b), + st.setXYZ(43, ot.r, ot.g, ot.b), + st.setXYZ(44, ot.r, ot.g, ot.b), + st.setXYZ(45, ot.r, ot.g, ot.b), + st.setXYZ(46, ot.r, ot.g, ot.b), + st.setXYZ(47, ot.r, ot.g, ot.b), + st.setXYZ(48, ot.r, ot.g, ot.b), + st.setXYZ(49, ot.r, ot.g, ot.b), + (st.needsUpdate = !0) + } + update() { + const et = this.geometry, + nt = this.pointMap, + rt = 1, + it = 1 + _camera.projectionMatrixInverse.copy(this.camera.projectionMatrixInverse), + setPoint('c', nt, et, _camera, 0, 0, -1), + setPoint('t', nt, et, _camera, 0, 0, 1), + setPoint('n1', nt, et, _camera, -rt, -it, -1), + setPoint('n2', nt, et, _camera, rt, -it, -1), + setPoint('n3', nt, et, _camera, -rt, it, -1), + setPoint('n4', nt, et, _camera, rt, it, -1), + setPoint('f1', nt, et, _camera, -rt, -it, 1), + setPoint('f2', nt, et, _camera, rt, -it, 1), + setPoint('f3', nt, et, _camera, -rt, it, 1), + setPoint('f4', nt, et, _camera, rt, it, 1), + setPoint('u1', nt, et, _camera, rt * 0.7, it * 1.1, -1), + setPoint('u2', nt, et, _camera, -rt * 0.7, it * 1.1, -1), + setPoint('u3', nt, et, _camera, 0, it * 2, -1), + setPoint('cf1', nt, et, _camera, -rt, 0, 1), + setPoint('cf2', nt, et, _camera, rt, 0, 1), + setPoint('cf3', nt, et, _camera, 0, -it, 1), + setPoint('cf4', nt, et, _camera, 0, it, 1), + setPoint('cn1', nt, et, _camera, -rt, 0, -1), + setPoint('cn2', nt, et, _camera, rt, 0, -1), + setPoint('cn3', nt, et, _camera, 0, -it, -1), + setPoint('cn4', nt, et, _camera, 0, it, -1), + (et.getAttribute('position').needsUpdate = !0) + } + dispose() { + this.geometry.dispose(), this.material.dispose() + } + } + function setPoint(tt, et, nt, rt, it, ot, at) { + _vector$d.set(it, ot, at).unproject(rt) + const st = et[tt] + if (st !== void 0) { + const lt = nt.getAttribute('position') + for (let ct = 0, ut = st.length; ct < ut; ct++) lt.setXYZ(st[ct], _vector$d.x, _vector$d.y, _vector$d.z) + } + } + const _box$4 = new Box3() + class BoxHelper extends LineSegments { + constructor(et, nt = 16776960) { + const rt = new Uint16Array([0, 1, 1, 2, 2, 3, 3, 0, 4, 5, 5, 6, 6, 7, 7, 4, 0, 4, 1, 5, 2, 6, 3, 7]), + it = new Float32Array(8 * 3), + ot = new BufferGeometry() + ot.setIndex(new BufferAttribute(rt, 1)), + ot.setAttribute('position', new BufferAttribute(it, 3)), + super(ot, new LineBasicMaterial({ color: nt, toneMapped: !1 })), + (this.object = et), + (this.type = 'BoxHelper'), + (this.matrixAutoUpdate = !1), + this.update() + } + update(et) { + if ( + (et !== void 0 && console.warn('THREE.BoxHelper: .update() has no longer arguments.'), + this.object !== void 0 && _box$4.setFromObject(this.object), + _box$4.isEmpty()) + ) + return + const nt = _box$4.min, + rt = _box$4.max, + it = this.geometry.attributes.position, + ot = it.array + ;(ot[0] = rt.x), + (ot[1] = rt.y), + (ot[2] = rt.z), + (ot[3] = nt.x), + (ot[4] = rt.y), + (ot[5] = rt.z), + (ot[6] = nt.x), + (ot[7] = nt.y), + (ot[8] = rt.z), + (ot[9] = rt.x), + (ot[10] = nt.y), + (ot[11] = rt.z), + (ot[12] = rt.x), + (ot[13] = rt.y), + (ot[14] = nt.z), + (ot[15] = nt.x), + (ot[16] = rt.y), + (ot[17] = nt.z), + (ot[18] = nt.x), + (ot[19] = nt.y), + (ot[20] = nt.z), + (ot[21] = rt.x), + (ot[22] = nt.y), + (ot[23] = nt.z), + (it.needsUpdate = !0), + this.geometry.computeBoundingSphere() + } + setFromObject(et) { + return (this.object = et), this.update(), this + } + copy(et, nt) { + return super.copy(et, nt), (this.object = et.object), this + } + } + class Box3Helper extends LineSegments { + constructor(et, nt = 16776960) { + const rt = new Uint16Array([0, 1, 1, 2, 2, 3, 3, 0, 4, 5, 5, 6, 6, 7, 7, 4, 0, 4, 1, 5, 2, 6, 3, 7]), + it = [1, 1, 1, -1, 1, 1, -1, -1, 1, 1, -1, 1, 1, 1, -1, -1, 1, -1, -1, -1, -1, 1, -1, -1], + ot = new BufferGeometry() + ot.setIndex(new BufferAttribute(rt, 1)), + ot.setAttribute('position', new Float32BufferAttribute(it, 3)), + super(ot, new LineBasicMaterial({ color: nt, toneMapped: !1 })), + (this.box = et), + (this.type = 'Box3Helper'), + this.geometry.computeBoundingSphere() + } + updateMatrixWorld(et) { + const nt = this.box + nt.isEmpty() || + (nt.getCenter(this.position), + nt.getSize(this.scale), + this.scale.multiplyScalar(0.5), + super.updateMatrixWorld(et)) + } + } + class PlaneHelper extends Line$2 { + constructor(et, nt = 1, rt = 16776960) { + const it = rt, + ot = [1, -1, 0, -1, 1, 0, -1, -1, 0, 1, 1, 0, -1, 1, 0, -1, -1, 0, 1, -1, 0, 1, 1, 0], + at = new BufferGeometry() + at.setAttribute('position', new Float32BufferAttribute(ot, 3)), + at.computeBoundingSphere(), + super(at, new LineBasicMaterial({ color: it, toneMapped: !1 })), + (this.type = 'PlaneHelper'), + (this.plane = et), + (this.size = nt) + const st = [1, 1, 0, -1, 1, 0, -1, -1, 0, 1, 1, 0, -1, -1, 0, 1, -1, 0], + lt = new BufferGeometry() + lt.setAttribute('position', new Float32BufferAttribute(st, 3)), + lt.computeBoundingSphere(), + this.add( + new Mesh( + lt, + new MeshBasicMaterial({ color: it, opacity: 0.2, transparent: !0, depthWrite: !1, toneMapped: !1 }), + ), + ) + } + updateMatrixWorld(et) { + this.position.set(0, 0, 0), + this.scale.set(0.5 * this.size, 0.5 * this.size, 1), + this.lookAt(this.plane.normal), + this.translateZ(-this.plane.constant), + super.updateMatrixWorld(et) + } + } + const _axis = new Vector3() + let _lineGeometry, _coneGeometry + class ArrowHelper extends Object3D { + constructor( + et = new Vector3(0, 0, 1), + nt = new Vector3(0, 0, 0), + rt = 1, + it = 16776960, + ot = rt * 0.2, + at = ot * 0.2, + ) { + super(), + (this.type = 'ArrowHelper'), + _lineGeometry === void 0 && + ((_lineGeometry = new BufferGeometry()), + _lineGeometry.setAttribute('position', new Float32BufferAttribute([0, 0, 0, 0, 1, 0], 3)), + (_coneGeometry = new CylinderGeometry(0, 0.5, 1, 5, 1)), + _coneGeometry.translate(0, -0.5, 0)), + this.position.copy(nt), + (this.line = new Line$2(_lineGeometry, new LineBasicMaterial({ color: it, toneMapped: !1 }))), + (this.line.matrixAutoUpdate = !1), + this.add(this.line), + (this.cone = new Mesh(_coneGeometry, new MeshBasicMaterial({ color: it, toneMapped: !1 }))), + (this.cone.matrixAutoUpdate = !1), + this.add(this.cone), + this.setDirection(et), + this.setLength(rt, ot, at) + } + setDirection(et) { + if (et.y > 0.99999) this.quaternion.set(0, 0, 0, 1) + else if (et.y < -0.99999) this.quaternion.set(1, 0, 0, 0) + else { + _axis.set(et.z, 0, -et.x).normalize() + const nt = Math.acos(et.y) + this.quaternion.setFromAxisAngle(_axis, nt) + } + } + setLength(et, nt = et * 0.2, rt = nt * 0.2) { + this.line.scale.set(1, Math.max(1e-4, et - nt), 1), + this.line.updateMatrix(), + this.cone.scale.set(rt, nt, rt), + (this.cone.position.y = et), + this.cone.updateMatrix() + } + setColor(et) { + this.line.material.color.set(et), this.cone.material.color.set(et) + } + copy(et) { + return super.copy(et, !1), this.line.copy(et.line), this.cone.copy(et.cone), this + } + } + class AxesHelper extends LineSegments { + constructor(et = 1) { + const nt = [0, 0, 0, et, 0, 0, 0, 0, 0, 0, et, 0, 0, 0, 0, 0, 0, et], + rt = [1, 0, 0, 1, 0.6, 0, 0, 1, 0, 0.6, 1, 0, 0, 0, 1, 0, 0.6, 1], + it = new BufferGeometry() + it.setAttribute('position', new Float32BufferAttribute(nt, 3)), + it.setAttribute('color', new Float32BufferAttribute(rt, 3)) + const ot = new LineBasicMaterial({ vertexColors: !0, toneMapped: !1 }) + super(it, ot), (this.type = 'AxesHelper') + } + setColors(et, nt, rt) { + const it = new Color$1(), + ot = this.geometry.attributes.color.array + return ( + it.set(et), + it.toArray(ot, 0), + it.toArray(ot, 3), + it.set(nt), + it.toArray(ot, 6), + it.toArray(ot, 9), + it.set(rt), + it.toArray(ot, 12), + it.toArray(ot, 15), + (this.geometry.attributes.color.needsUpdate = !0), + this + ) + } + dispose() { + this.geometry.dispose(), this.material.dispose() + } + } + class ShapePath { + constructor() { + ;(this.type = 'ShapePath'), (this.color = new Color$1()), (this.subPaths = []), (this.currentPath = null) + } + moveTo(et, nt) { + return ( + (this.currentPath = new Path$1()), this.subPaths.push(this.currentPath), this.currentPath.moveTo(et, nt), this + ) + } + lineTo(et, nt) { + return this.currentPath.lineTo(et, nt), this + } + quadraticCurveTo(et, nt, rt, it) { + return this.currentPath.quadraticCurveTo(et, nt, rt, it), this + } + bezierCurveTo(et, nt, rt, it, ot, at) { + return this.currentPath.bezierCurveTo(et, nt, rt, it, ot, at), this + } + splineThru(et) { + return this.currentPath.splineThru(et), this + } + toShapes(et, nt) { + function rt(vt) { + const xt = [] + for (let kt = 0, St = vt.length; kt < St; kt++) { + const Tt = vt[kt], + At = new Shape$1() + ;(At.curves = Tt.curves), xt.push(At) + } + return xt + } + function it(vt, xt) { + const kt = xt.length + let St = !1 + for (let Tt = kt - 1, At = 0; At < kt; Tt = At++) { + let Et = xt[Tt], + $t = xt[At], + Dt = $t.x - Et.x, + jt = $t.y - Et.y + if (Math.abs(jt) > Number.EPSILON) { + if ((jt < 0 && ((Et = xt[At]), (Dt = -Dt), ($t = xt[Tt]), (jt = -jt)), vt.y < Et.y || vt.y > $t.y)) continue + if (vt.y === Et.y) { + if (vt.x === Et.x) return !0 + } else { + const Pt = jt * (vt.x - Et.x) - Dt * (vt.y - Et.y) + if (Pt === 0) return !0 + if (Pt < 0) continue + St = !St + } + } else { + if (vt.y !== Et.y) continue + if (($t.x <= vt.x && vt.x <= Et.x) || (Et.x <= vt.x && vt.x <= $t.x)) return !0 + } + } + return St + } + const ot = ShapeUtils.isClockWise, + at = this.subPaths + if (at.length === 0) return [] + if (nt === !0) return rt(at) + let st, lt, ct + const ut = [] + if (at.length === 1) return (lt = at[0]), (ct = new Shape$1()), (ct.curves = lt.curves), ut.push(ct), ut + let ht = !ot(at[0].getPoints()) + ht = et ? !ht : ht + const dt = [], + pt = [] + let mt = [], + gt = 0, + yt + ;(pt[gt] = void 0), (mt[gt] = []) + for (let vt = 0, xt = at.length; vt < xt; vt++) + (lt = at[vt]), + (yt = lt.getPoints()), + (st = ot(yt)), + (st = et ? !st : st), + st + ? (!ht && pt[gt] && gt++, + (pt[gt] = { s: new Shape$1(), p: yt }), + (pt[gt].s.curves = lt.curves), + ht && gt++, + (mt[gt] = [])) + : mt[gt].push({ h: lt, p: yt[0] }) + if (!pt[0]) return rt(at) + if (pt.length > 1) { + let vt = !1, + xt = 0 + for (let kt = 0, St = pt.length; kt < St; kt++) dt[kt] = [] + for (let kt = 0, St = pt.length; kt < St; kt++) { + const Tt = mt[kt] + for (let At = 0; At < Tt.length; At++) { + const Et = Tt[At] + let $t = !0 + for (let Dt = 0; Dt < pt.length; Dt++) + it(Et.p, pt[Dt].p) && (kt !== Dt && xt++, $t ? (($t = !1), dt[Dt].push(Et)) : (vt = !0)) + $t && dt[kt].push(Et) + } + } + xt > 0 && vt === !1 && (mt = dt) + } + let bt + for (let vt = 0, xt = pt.length; vt < xt; vt++) { + ;(ct = pt[vt].s), ut.push(ct), (bt = mt[vt]) + for (let kt = 0, St = bt.length; kt < St; kt++) ct.holes.push(bt[kt].h) + } + return ut + } + } + const _tables = _generateTables() + function _generateTables() { + const tt = new ArrayBuffer(4), + et = new Float32Array(tt), + nt = new Uint32Array(tt), + rt = new Uint32Array(512), + it = new Uint32Array(512) + for (let lt = 0; lt < 256; ++lt) { + const ct = lt - 127 + ct < -27 + ? ((rt[lt] = 0), (rt[lt | 256] = 32768), (it[lt] = 24), (it[lt | 256] = 24)) + : ct < -14 + ? ((rt[lt] = 1024 >> (-ct - 14)), + (rt[lt | 256] = (1024 >> (-ct - 14)) | 32768), + (it[lt] = -ct - 1), + (it[lt | 256] = -ct - 1)) + : ct <= 15 + ? ((rt[lt] = (ct + 15) << 10), (rt[lt | 256] = ((ct + 15) << 10) | 32768), (it[lt] = 13), (it[lt | 256] = 13)) + : ct < 128 + ? ((rt[lt] = 31744), (rt[lt | 256] = 64512), (it[lt] = 24), (it[lt | 256] = 24)) + : ((rt[lt] = 31744), (rt[lt | 256] = 64512), (it[lt] = 13), (it[lt | 256] = 13)) + } + const ot = new Uint32Array(2048), + at = new Uint32Array(64), + st = new Uint32Array(64) + for (let lt = 1; lt < 1024; ++lt) { + let ct = lt << 13, + ut = 0 + for (; !(ct & 8388608); ) (ct <<= 1), (ut -= 8388608) + ;(ct &= -8388609), (ut += 947912704), (ot[lt] = ct | ut) + } + for (let lt = 1024; lt < 2048; ++lt) ot[lt] = 939524096 + ((lt - 1024) << 13) + for (let lt = 1; lt < 31; ++lt) at[lt] = lt << 23 + ;(at[31] = 1199570944), (at[32] = 2147483648) + for (let lt = 33; lt < 63; ++lt) at[lt] = 2147483648 + ((lt - 32) << 23) + at[63] = 3347054592 + for (let lt = 1; lt < 64; ++lt) lt !== 32 && (st[lt] = 1024) + return { + floatView: et, + uint32View: nt, + baseTable: rt, + shiftTable: it, + mantissaTable: ot, + exponentTable: at, + offsetTable: st, + } + } + function toHalfFloat(tt) { + Math.abs(tt) > 65504 && console.warn('THREE.DataUtils.toHalfFloat(): Value out of range.'), + (tt = clamp$5(tt, -65504, 65504)), + (_tables.floatView[0] = tt) + const et = _tables.uint32View[0], + nt = (et >> 23) & 511 + return _tables.baseTable[nt] + ((et & 8388607) >> _tables.shiftTable[nt]) + } + function fromHalfFloat(tt) { + const et = tt >> 10 + return ( + (_tables.uint32View[0] = + _tables.mantissaTable[_tables.offsetTable[et] + (tt & 1023)] + _tables.exponentTable[et]), + _tables.floatView[0] + ) + } + var DataUtils = Object.freeze({ __proto__: null, toHalfFloat, fromHalfFloat }) + class ParametricGeometry extends BufferGeometry { + constructor() { + console.error('THREE.ParametricGeometry has been moved to /examples/jsm/geometries/ParametricGeometry.js'), + super() + } + } + class TextGeometry extends BufferGeometry { + constructor() { + console.error('THREE.TextGeometry has been moved to /examples/jsm/geometries/TextGeometry.js'), super() + } + } + function FontLoader() { + console.error('THREE.FontLoader has been moved to /examples/jsm/loaders/FontLoader.js') + } + function Font() { + console.error('THREE.Font has been moved to /examples/jsm/loaders/FontLoader.js') + } + function ImmediateRenderObject() { + console.error('THREE.ImmediateRenderObject has been removed.') + } + class WebGLMultisampleRenderTarget extends WebGLRenderTarget { + constructor(et, nt, rt) { + console.error( + 'THREE.WebGLMultisampleRenderTarget has been removed. Use a normal render target and set the "samples" property to greater 0 to enable multisampling.', + ), + super(et, nt, rt), + (this.samples = 4) + } + } + class DataTexture2DArray extends DataArrayTexture { + constructor(et, nt, rt, it) { + console.warn('THREE.DataTexture2DArray has been renamed to DataArrayTexture.'), super(et, nt, rt, it) + } + } + class DataTexture3D extends Data3DTexture { + constructor(et, nt, rt, it) { + console.warn('THREE.DataTexture3D has been renamed to Data3DTexture.'), super(et, nt, rt, it) + } + } + typeof __THREE_DEVTOOLS__ < 'u' && + __THREE_DEVTOOLS__.dispatchEvent(new CustomEvent('register', { detail: { revision: REVISION } })) + typeof window < 'u' && + (window.__THREE__ + ? console.warn('WARNING: Multiple instances of Three.js being imported.') + : (window.__THREE__ = REVISION)) + const THREE$1 = Object.freeze( + Object.defineProperty( + { + __proto__: null, + ACESFilmicToneMapping, + AddEquation, + AddOperation, + AdditiveAnimationBlendMode, + AdditiveBlending, + AlphaFormat, + AlwaysDepth, + AlwaysStencilFunc, + AmbientLight, + AmbientLightProbe, + AnimationClip, + AnimationLoader, + AnimationMixer, + AnimationObjectGroup, + AnimationUtils, + ArcCurve, + ArrayCamera, + ArrowHelper, + Audio: Audio$1, + AudioAnalyser, + AudioContext, + AudioListener, + AudioLoader, + AxesHelper, + BackSide, + BasicDepthPacking, + BasicShadowMap, + Bone, + BooleanKeyframeTrack, + Box2, + Box3, + Box3Helper, + BoxBufferGeometry: BoxGeometry, + BoxGeometry, + BoxHelper, + BufferAttribute, + BufferGeometry, + BufferGeometryLoader, + ByteType, + Cache, + Camera, + CameraHelper, + CanvasTexture, + CapsuleBufferGeometry: CapsuleGeometry, + CapsuleGeometry, + CatmullRomCurve3, + CineonToneMapping, + CircleBufferGeometry: CircleGeometry, + CircleGeometry, + ClampToEdgeWrapping, + Clock: Clock$1, + Color: Color$1, + ColorKeyframeTrack, + ColorManagement, + CompressedTexture, + CompressedTextureLoader, + ConeBufferGeometry: ConeGeometry, + ConeGeometry, + CubeCamera, + CubeReflectionMapping, + CubeRefractionMapping, + CubeTexture, + CubeTextureLoader, + CubeUVReflectionMapping, + CubicBezierCurve, + CubicBezierCurve3, + CubicInterpolant, + CullFaceBack, + CullFaceFront, + CullFaceFrontBack, + CullFaceNone, + Curve: Curve$1, + CurvePath, + CustomBlending, + CustomToneMapping, + CylinderBufferGeometry: CylinderGeometry, + CylinderGeometry, + Cylindrical, + Data3DTexture, + DataArrayTexture, + DataTexture, + DataTexture2DArray, + DataTexture3D, + DataTextureLoader, + DataUtils, + DecrementStencilOp, + DecrementWrapStencilOp, + DefaultLoadingManager, + DepthFormat, + DepthStencilFormat, + DepthTexture, + DirectionalLight, + DirectionalLightHelper, + DiscreteInterpolant, + DodecahedronBufferGeometry: DodecahedronGeometry, + DodecahedronGeometry, + DoubleSide, + DstAlphaFactor, + DstColorFactor, + DynamicCopyUsage, + DynamicDrawUsage, + DynamicReadUsage, + EdgesGeometry, + EllipseCurve, + EqualDepth, + EqualStencilFunc, + EquirectangularReflectionMapping, + EquirectangularRefractionMapping, + Euler, + EventDispatcher: EventDispatcher$1, + ExtrudeBufferGeometry: ExtrudeGeometry, + ExtrudeGeometry, + FileLoader, + FlatShading, + Float16BufferAttribute, + Float32BufferAttribute, + Float64BufferAttribute, + FloatType, + Fog, + FogExp2, + Font, + FontLoader, + FramebufferTexture, + FrontSide, + Frustum, + GLBufferAttribute, + GLSL1, + GLSL3, + GreaterDepth, + GreaterEqualDepth, + GreaterEqualStencilFunc, + GreaterStencilFunc, + GridHelper, + Group, + HalfFloatType, + HemisphereLight, + HemisphereLightHelper, + HemisphereLightProbe, + IcosahedronBufferGeometry: IcosahedronGeometry, + IcosahedronGeometry, + ImageBitmapLoader, + ImageLoader, + ImageUtils, + ImmediateRenderObject, + IncrementStencilOp, + IncrementWrapStencilOp, + InstancedBufferAttribute, + InstancedBufferGeometry, + InstancedInterleavedBuffer, + InstancedMesh, + Int16BufferAttribute, + Int32BufferAttribute, + Int8BufferAttribute, + IntType, + InterleavedBuffer, + InterleavedBufferAttribute, + Interpolant, + InterpolateDiscrete, + InterpolateLinear, + InterpolateSmooth, + InvertStencilOp, + KeepStencilOp, + KeyframeTrack, + LOD, + LatheBufferGeometry: LatheGeometry, + LatheGeometry, + Layers, + LessDepth, + LessEqualDepth, + LessEqualStencilFunc, + LessStencilFunc, + Light, + LightProbe, + Line: Line$2, + Line3, + LineBasicMaterial, + LineCurve, + LineCurve3, + LineDashedMaterial, + LineLoop, + LineSegments, + LinearEncoding, + LinearFilter, + LinearInterpolant, + LinearMipMapLinearFilter, + LinearMipMapNearestFilter, + LinearMipmapLinearFilter, + LinearMipmapNearestFilter, + LinearSRGBColorSpace: LinearSRGBColorSpace$1, + LinearToneMapping, + Loader: Loader$2, + LoaderUtils, + LoadingManager, + LoopOnce, + LoopPingPong, + LoopRepeat, + LuminanceAlphaFormat, + LuminanceFormat, + MOUSE, + Material, + MaterialLoader, + MathUtils, + Matrix3, + Matrix4, + MaxEquation, + Mesh, + MeshBasicMaterial, + MeshDepthMaterial, + MeshDistanceMaterial, + MeshLambertMaterial, + MeshMatcapMaterial, + MeshNormalMaterial, + MeshPhongMaterial, + MeshPhysicalMaterial, + MeshStandardMaterial, + MeshToonMaterial, + MinEquation, + MirroredRepeatWrapping, + MixOperation, + MultiplyBlending, + MultiplyOperation, + NearestFilter, + NearestMipMapLinearFilter, + NearestMipMapNearestFilter, + NearestMipmapLinearFilter, + NearestMipmapNearestFilter, + NeverDepth, + NeverStencilFunc, + NoBlending, + NoColorSpace: NoColorSpace$1, + NoToneMapping, + NormalAnimationBlendMode, + NormalBlending, + NotEqualDepth, + NotEqualStencilFunc, + NumberKeyframeTrack, + Object3D, + ObjectLoader, + ObjectSpaceNormalMap, + OctahedronBufferGeometry: OctahedronGeometry, + OctahedronGeometry, + OneFactor, + OneMinusDstAlphaFactor, + OneMinusDstColorFactor, + OneMinusSrcAlphaFactor, + OneMinusSrcColorFactor, + OrthographicCamera, + PCFShadowMap, + PCFSoftShadowMap, + PMREMGenerator, + ParametricGeometry, + Path: Path$1, + PerspectiveCamera, + Plane, + PlaneBufferGeometry: PlaneGeometry, + PlaneGeometry, + PlaneHelper, + PointLight, + PointLightHelper, + Points, + PointsMaterial, + PolarGridHelper, + PolyhedronBufferGeometry: PolyhedronGeometry, + PolyhedronGeometry, + PositionalAudio, + PropertyBinding, + PropertyMixer, + QuadraticBezierCurve, + QuadraticBezierCurve3, + Quaternion, + QuaternionKeyframeTrack, + QuaternionLinearInterpolant, + REVISION, + RGBADepthPacking, + RGBAFormat, + RGBAIntegerFormat, + RGBA_ASTC_10x10_Format, + RGBA_ASTC_10x5_Format, + RGBA_ASTC_10x6_Format, + RGBA_ASTC_10x8_Format, + RGBA_ASTC_12x10_Format, + RGBA_ASTC_12x12_Format, + RGBA_ASTC_4x4_Format, + RGBA_ASTC_5x4_Format, + RGBA_ASTC_5x5_Format, + RGBA_ASTC_6x5_Format, + RGBA_ASTC_6x6_Format, + RGBA_ASTC_8x5_Format, + RGBA_ASTC_8x6_Format, + RGBA_ASTC_8x8_Format, + RGBA_BPTC_Format, + RGBA_ETC2_EAC_Format, + RGBA_PVRTC_2BPPV1_Format, + RGBA_PVRTC_4BPPV1_Format, + RGBA_S3TC_DXT1_Format, + RGBA_S3TC_DXT3_Format, + RGBA_S3TC_DXT5_Format, + RGBFormat, + RGB_ETC1_Format, + RGB_ETC2_Format, + RGB_PVRTC_2BPPV1_Format, + RGB_PVRTC_4BPPV1_Format, + RGB_S3TC_DXT1_Format, + RGFormat, + RGIntegerFormat, + RawShaderMaterial, + Ray, + Raycaster, + RectAreaLight, + RedFormat, + RedIntegerFormat, + ReinhardToneMapping, + RepeatWrapping, + ReplaceStencilOp, + ReverseSubtractEquation, + RingBufferGeometry: RingGeometry, + RingGeometry, + SRGBColorSpace: SRGBColorSpace$1, + Scene, + ShaderChunk, + ShaderLib, + ShaderMaterial, + ShadowMaterial, + Shape: Shape$1, + ShapeBufferGeometry: ShapeGeometry, + ShapeGeometry, + ShapePath, + ShapeUtils, + ShortType, + Skeleton, + SkeletonHelper, + SkinnedMesh, + SmoothShading, + Source: Source$1, + Sphere, + SphereBufferGeometry: SphereGeometry, + SphereGeometry, + Spherical, + SphericalHarmonics3, + SplineCurve, + SpotLight, + SpotLightHelper, + Sprite, + SpriteMaterial, + SrcAlphaFactor, + SrcAlphaSaturateFactor, + SrcColorFactor, + StaticCopyUsage, + StaticDrawUsage, + StaticReadUsage, + StereoCamera, + StreamCopyUsage, + StreamDrawUsage, + StreamReadUsage, + StringKeyframeTrack, + SubtractEquation, + SubtractiveBlending, + TOUCH, + TangentSpaceNormalMap, + TetrahedronBufferGeometry: TetrahedronGeometry, + TetrahedronGeometry, + TextGeometry, + Texture, + TextureLoader, + TorusBufferGeometry: TorusGeometry, + TorusGeometry, + TorusKnotBufferGeometry: TorusKnotGeometry, + TorusKnotGeometry, + Triangle, + TriangleFanDrawMode, + TriangleStripDrawMode, + TrianglesDrawMode, + TubeBufferGeometry: TubeGeometry, + TubeGeometry, + UVMapping, + Uint16BufferAttribute, + Uint32BufferAttribute, + Uint8BufferAttribute, + Uint8ClampedBufferAttribute, + Uniform, + UniformsGroup, + UniformsLib, + UniformsUtils, + UnsignedByteType, + UnsignedInt248Type, + UnsignedIntType, + UnsignedShort4444Type, + UnsignedShort5551Type, + UnsignedShortType, + VSMShadowMap, + Vector2, + Vector3, + Vector4, + VectorKeyframeTrack, + VideoTexture, + WebGL1Renderer, + WebGL3DRenderTarget, + WebGLArrayRenderTarget, + WebGLCubeRenderTarget, + WebGLMultipleRenderTargets, + WebGLMultisampleRenderTarget, + WebGLRenderTarget, + WebGLRenderer, + WebGLUtils, + WireframeGeometry, + WrapAroundEnding, + ZeroCurvatureEnding, + ZeroFactor, + ZeroSlopeEnding, + ZeroStencilOp, + _SRGBAFormat, + sRGBEncoding, + }, + Symbol.toStringTag, + { value: 'Module' }, + ), + ), + variableVector3$1 = new Vector3(0, 0, 0), + outlineEffectColor = 16777215, + nodesAreRelatives = (tt, et) => { + var ot, at + if (!(tt != null && tt.ref_id) || !(et != null && et.ref_id)) return !1 + let nt = !1 + const rt = tt.guests, + it = et.guests + return ( + (((ot = tt.children) != null && ot.includes(et.ref_id)) || + ((at = et.children) != null && at.includes(tt.ref_id))) && + (nt = !0), + ((rt != null && rt.find((st) => st.ref_id === et.ref_id)) || + (it != null && it.find((st) => st.ref_id === tt.ref_id))) && + (nt = !0), + nt + ) + }, + mock = { + exact: [ + { + boost: 0, + date: 1672152975, + description: 'The credit card debt and job growth in the US economy', + episode_title: 'Café ₿: #Bitcoin Holiday Hangout & @StatusMoneyUSA a #BTC Credit Card', + guests: [ + { + name: ' BITVOLT7', + profile_picture: 'https://pbs.twimg.com/profile_images/1532194001511714818/O8nSTKcx_400x400.png', + ref_id: '2b9913b7-393c-4125-9aeb-4a8bf32bfa44', + twitter_handle: 'BITVOLT7', + }, + { + name: ' samcallah', + profile_picture: 'https://pbs.twimg.com/profile_images/1502454836981166082/cQG0YQxc_400x400.jpg', + ref_id: 'a3dbdb56-e228-4382-98bc-d4495ff6dfbd', + twitter_handle: 'samcallah', + }, + { + name: ' taodejing2', + profile_picture: 'https://pbs.twimg.com/profile_images/1575442322531274756/-ZdL-K9S_400x400.jpg', + ref_id: '4914799b-a230-4bee-95c9-cf3ac44b6b70', + twitter_handle: 'TyonClubhouse', + }, + { + name: ' MrHodl', + profile_picture: 'https://pbs.twimg.com/profile_images/1607490976670519296/vhLAojMR_400x400.jpg', + ref_id: '01d6ee68-c0ef-4ead-b2b7-7eb04694519e', + twitter_handle: 'MrHodl', + }, + { + name: ' TomerStrolight', + profile_picture: 'https://pbs.twimg.com/profile_images/1591960241008148481/HtyINxtU_400x400.jpg', + ref_id: '57beb381-b9e8-4dd1-82f6-4e544a63146b', + twitter_handle: 'TomerStrolight', + }, + { + name: ' VailshireCap', + profile_picture: 'https://pbs.twimg.com/profile_images/1475554600094552064/DSlPG1lx_400x400.jpg', + ref_id: '73c15965-ddad-4e32-9746-da92f5d24134', + twitter_handle: 'VailshireCap', + }, + { + name: 'bergealex4', + profile_picture: 'https://pbs.twimg.com/profile_images/1273374628577247233/tYigkAZH_400x400.jpg', + ref_id: 'da4bb8ab-540d-4f88-a2a6-f3a3941c5b74', + twitter_handle: 'bergealex4', + }, + { + name: ' LukeMikic21', + profile_picture: 'https://pbs.twimg.com/profile_images/1604626418708742147/gWyVLeqa_400x400.jpg', + ref_id: '0a907108-f59f-420f-9986-79b0f060f690', + twitter_handle: 'LukeMikic21', + }, + { + name: ' 2140data', + profile_picture: 'https://pbs.twimg.com/profile_images/1598330787778232320/ZVFcRtet_400x400.jpg', + ref_id: 'c8fb52d1-fa69-410d-bf96-8a7559bba863', + twitter_handle: '2140data', + }, + { + name: ' majdmaksad', + profile_picture: 'https://pbs.twimg.com/profile_images/1483883774471516167/zvEjiCTO_400x400.jpg', + ref_id: '1a63c59d-a760-4f8b-bba9-ddfd3cff9f33', + twitter_handle: 'majdmaksad', + }, + ], + hosts: [ + { + name: ' PeterAnsel9', + profile_picture: 'https://pbs.twimg.com/profile_images/1607979298153197568/JqAbDyi__400x400.jpg', + ref_id: '6cb2b160-fa27-4fac-9ccf-77886ba01521', + twitter_handle: 'PeterAnsel9', + }, + { + name: ' NeilJacobs', + profile_picture: 'https://pbs.twimg.com/profile_images/1599432572727169025/NSoPdchB_400x400.jpg', + ref_id: 'c61e3ff9-f540-4343-bc26-1c3a4b537b78', + twitter_handle: 'NeilJacobs', + }, + { + name: ' nathanfast', + profile_picture: 'https://pbs.twimg.com/profile_images/1545758157103697920/RyLn465N_400x400.jpg', + ref_id: '739d907e-cbc6-4a05-9246-45c7c5d2a853', + twitter_handle: 'nathanfast', + }, + { + name: 'TYonClubhouse', + profile_picture: 'https://pbs.twimg.com/profile_images/1575442322531274756/-ZdL-K9S_400x400.jpg', + ref_id: 'cc057990-16d0-4588-83c7-1eb9734eb994', + twitter_handle: 'tyonclubhouse', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/239722cb-4216-414a-a17b-5adf9d52e15a.jpg', + keyword: !0, + link: 'https://stakwork-uploads.s3.amazonaws.com/uploads/customers/2707/media_to_local/b27dcf88-bdfb-4433-b0fe-c9040dbf392f/11aa5648-d416-46f3-a66a-0750e9d71ccd.mp3', + node_type: 'clip', + pub_key: '02574d6e8e787372184b6f17c40d6c6fe1777db9015801f95dfd24692784d767cd', + ref_id: 'ada07186-c3fc-4b5e-b9c7-3ce54e1b94c7', + show_title: 'Swan.com', + text: "I do want to ask you quickly about, you mentioned the credit card debt that is soaring and savings rates going down. It is a small percentage of the overall kind of US household net worth, which I believe is about well over 100 trillion, maybe 140,000,000,000,000. When housing prices were high. But it does seem like this 1 trillion or whatever of credit card debt, while it's serious, is still a fairly small percentage of overall US. Household net worth. And I was wondering if you could comment on that. Yeah, that's a great point, Terrence. And you got to think in terms of the strata of economics, right? So people who are generally wealthy and then sort of the middle class, which has been decimated, and then the poorer classes, this is obviously affecting really harshly the poorer classes, right. Inflation just crushes people in the lower classes, financially speaking. They have minimum wage jobs. We've talked about this many times on here, but you cannot survive on one minimum wage job. So maybe they have two or three. And then as the economy tightens, they're starting to get fired from some of these. The cost of goods and services is rapidly increasing. So they can't even afford their basic groceries. They may not be able to afford gas to drive to work. All of these things, they just get worse and worse. So it does affect the lower economic classes. Disproportionately that's what drives me nuts, right. That's what makes Bitcoin so beautiful, is those are the same classes who can benefit most strongly from Bitcoin, from a fair type of money instead of the unjust system that we have. So, yeah, it's affecting them. Now. I will say, though, that the wealth effect is real, too, and that affects the upper classes. Disproportionately why? Because wealthier people own more assets, right? They own houses, they own stocks, they own bonds, they own art, they own whatever. And the valuations of those kind of things have also come down dramatically. So we're actually seeing that across the board, which is sort of interesting. And you don't always see this. You only see this in like real recessions where the poor people are buying less of their normal goods and services, the consumer staples, and the wealthier people are actually buying less of their garbage that they buy diamond rings and pearls and boats and wealthy person things, yachts, those kind of sales are all significantly down as well. So it's affecting everybody, but it affects everybody. Disproportionately that makes a lot of sense. Yeah. Thank you for that breakdown. I wanted to ask you and Sam about job growth because Nick Temeros from the Wall Street Journal, the so called Fed whisperer who seems to have inside info sometimes on what the Fed is about to do, he said that incorrectly, that we've never seen a period like this where we've had so much job growth. This is part ways wrong. There is no job growth, but so little demand for any type of housing. Talking about the housing slump, and I posted in the Nest something from gaming grandpa La Urban Nerd at La Urban Nerd, who replied the job growth is a mirage will become very clear in the next few months. And then they posted, the alleged job growth and all these downward revisions, they seem to be all happening in a downward direction where they're off by over a million, 1.1 million jobs that never existed. And the Philadelphia Fed recently admitted that US jobs were overstated by at least 1.1 million. Sam Callahan had pointed this out to us at Swan, our great economist and researcher, and I was hoping both of you could comment on this. I've never been called an economist before. Oh, sorry. Hey, I mentioned it as a compliment. Yeah. No, I have been under the belief that the labor market is not as strong as being portrayed by government officials and Fed officials for a long time. And it's because of the methodology of how these things are calculated. The payrolls number uses these really large adjustments that are basically pulled out of thin air with, as we're seeing now, large backward revisions. And the Philly Fed themselves did a report. I think that's what's showing in the nest that a lot of these jobs in those payrolls weren't actually there. Right? So they were basically over a million that were set in the headline that were there are not there now. What is this, like, six months later? Eight months later? And that's usually what happens, but nobody really thinks about that, or nobody goes back and checks up on these revisions. But it's basically painting this picture that the labor force is stronger than it is. And we know that a lot of it is what Dr. Jeff was saying, how this is, like people thinking on second jobs. We know that the jolts, like the job openings that they always talk about, it's a lot of people basically being poached from other jobs, so there isn't any new jobs being created. It's people getting poached. And there's a lot of these, like, fake job postings where they put out, like, thousands of job openings. And then this one researcher went through them and applied to all of them and heard back from a very, very tiny percentage of them at all. And so that's the kind of numbers that are used in how these things are calculated. And you have to dig into the methodology, how they're calculated. Then they always point to the unemployment rate being low. But the US. Unemployment rate is low today, not because there's an actual increase of number of people working, but because the labor force itself is shrinking since COVID There's 3.5 million people that are no longer in the workforce. A lot of that is from early retirements as well as just regular retirements. Baby boomers retiring. And so that's a sign of a tight labor market and structurally tight labor market. There's not a lot of workers out there, and the Fed doesn't like that. The Fed wants to see the labor market gets some more slack into it. They want the unemployment rate to go up, but it's kind of hard to do that. When there's just not that many people actually in the active workforce. So there's like a misunderstanding of why the unemployment rate is even low. At 50 year lows is what you often hear. And so personally, I think that has the potential for a trapdoor effect where people think the labor market is stronger than it is until it's not. And oftentimes unemployment rate is reflected where it doesn't just creep up, it kind of spikes a little bit. And so that's what I think I expect to happen in Q one of 2023. We see actually more layoffs start to happen because of the Fed's overtightening and all these other factors. But yeah, that's kind of my summary of the labor market. I think it's a circus. There's a lot of the sharad being pushed out by the Fed officials and it's not as strong as people think. ", + timestamp: '01:37:18-01:44:39', + topics: ['US economy', 'credit card debt', 'job growth', 'US labour market'], + type: 'twitter_space', + weight: 127.51501043433724, + }, + { + boost: 0, + date: 1672152975, + description: 'Dr. Jeff Ross, of Vailshire Capital, gives his Bitcoin and overall marco outlook for 2023', + episode_title: 'Café ₿: #Bitcoin Holiday Hangout & @StatusMoneyUSA a #BTC Credit Card', + guests: [ + { + name: ' BITVOLT7', + profile_picture: 'https://pbs.twimg.com/profile_images/1532194001511714818/O8nSTKcx_400x400.png', + ref_id: '2b9913b7-393c-4125-9aeb-4a8bf32bfa44', + twitter_handle: 'BITVOLT7', + }, + { + name: ' samcallah', + profile_picture: 'https://pbs.twimg.com/profile_images/1502454836981166082/cQG0YQxc_400x400.jpg', + ref_id: 'a3dbdb56-e228-4382-98bc-d4495ff6dfbd', + twitter_handle: 'samcallah', + }, + { + name: ' taodejing2', + profile_picture: 'https://pbs.twimg.com/profile_images/1575442322531274756/-ZdL-K9S_400x400.jpg', + ref_id: '4914799b-a230-4bee-95c9-cf3ac44b6b70', + twitter_handle: 'TyonClubhouse', + }, + { + name: ' MrHodl', + profile_picture: 'https://pbs.twimg.com/profile_images/1607490976670519296/vhLAojMR_400x400.jpg', + ref_id: '01d6ee68-c0ef-4ead-b2b7-7eb04694519e', + twitter_handle: 'MrHodl', + }, + { + name: ' TomerStrolight', + profile_picture: 'https://pbs.twimg.com/profile_images/1591960241008148481/HtyINxtU_400x400.jpg', + ref_id: '57beb381-b9e8-4dd1-82f6-4e544a63146b', + twitter_handle: 'TomerStrolight', + }, + { + name: ' VailshireCap', + profile_picture: 'https://pbs.twimg.com/profile_images/1475554600094552064/DSlPG1lx_400x400.jpg', + ref_id: '73c15965-ddad-4e32-9746-da92f5d24134', + twitter_handle: 'VailshireCap', + }, + { + name: 'bergealex4', + profile_picture: 'https://pbs.twimg.com/profile_images/1273374628577247233/tYigkAZH_400x400.jpg', + ref_id: 'da4bb8ab-540d-4f88-a2a6-f3a3941c5b74', + twitter_handle: 'bergealex4', + }, + { + name: ' LukeMikic21', + profile_picture: 'https://pbs.twimg.com/profile_images/1604626418708742147/gWyVLeqa_400x400.jpg', + ref_id: '0a907108-f59f-420f-9986-79b0f060f690', + twitter_handle: 'LukeMikic21', + }, + { + name: ' 2140data', + profile_picture: 'https://pbs.twimg.com/profile_images/1598330787778232320/ZVFcRtet_400x400.jpg', + ref_id: 'c8fb52d1-fa69-410d-bf96-8a7559bba863', + twitter_handle: '2140data', + }, + { + name: ' majdmaksad', + profile_picture: 'https://pbs.twimg.com/profile_images/1483883774471516167/zvEjiCTO_400x400.jpg', + ref_id: '1a63c59d-a760-4f8b-bba9-ddfd3cff9f33', + twitter_handle: 'majdmaksad', + }, + ], + hosts: [ + { + name: ' PeterAnsel9', + profile_picture: 'https://pbs.twimg.com/profile_images/1607979298153197568/JqAbDyi__400x400.jpg', + ref_id: '6cb2b160-fa27-4fac-9ccf-77886ba01521', + twitter_handle: 'PeterAnsel9', + }, + { + name: ' NeilJacobs', + profile_picture: 'https://pbs.twimg.com/profile_images/1599432572727169025/NSoPdchB_400x400.jpg', + ref_id: 'c61e3ff9-f540-4343-bc26-1c3a4b537b78', + twitter_handle: 'NeilJacobs', + }, + { + name: ' nathanfast', + profile_picture: 'https://pbs.twimg.com/profile_images/1545758157103697920/RyLn465N_400x400.jpg', + ref_id: '739d907e-cbc6-4a05-9246-45c7c5d2a853', + twitter_handle: 'nathanfast', + }, + { + name: 'TYonClubhouse', + profile_picture: 'https://pbs.twimg.com/profile_images/1575442322531274756/-ZdL-K9S_400x400.jpg', + ref_id: 'cc057990-16d0-4588-83c7-1eb9734eb994', + twitter_handle: 'tyonclubhouse', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/239722cb-4216-414a-a17b-5adf9d52e15a.jpg', + keyword: !0, + link: 'https://stakwork-uploads.s3.amazonaws.com/uploads/customers/2707/media_to_local/515f3625-8d91-439b-8d44-968fe6ab16de/19ec29f4-268c-4015-aa6e-245563dbc49d.mp3', + node_type: 'clip', + pub_key: '034248fa888690a85021cf117c168a535c53b92e1fdf3e4f9cefddfe09118d8207', + ref_id: '2a0fb607-c735-4b09-809a-3c74cc61de97', + show_title: 'Swan.com', + text: "have Dr. Jeff Ross from Valshire Capital. Welcome. I was hoping you could give us your usual sort of breakdown on the state of the markets and what you're seeing, how was the Christmas sales and so forth. Thank you. Yeah. Hey, Terrence, thanks for having me up. And hey, everybody. It's fun to hear you all. I hope you all had a great Christmas or just happy holidays and have had some good time off. It's been good for me. Been refreshing hanging out with family a bit here. I think the main thing, I spent a lot of time over the longer weekend kind of just looking from 30,000ft up at what's going on, kind of with macro and what's happening with bitcoin in particular. 2022 was kind of a rough year. It was a confusing year for a lot of people. I think that the setup still remains pretty rough. I think retail sales are just showing a continuously weakening consumer. Interestingly, consumer confidence is rising. I think it's because consumers think that inflation, or at least high inflation, isn't going to last forever, so they're getting more confident. But savings rates are near all time lows right now. Credit card usage is near all time highs. People are basically maxing out their credit cards. They're draining their savings. That bodes poorly. A lot of companies, if you've been paying attention to any earnings reports, most major companies are preparing for recession. They just say, yeah, it's inevitable, it's coming. So we have to kind of prepare for this. Companies that have lots of merchandise, they're having a really hard time selling it. Again, that's not good from a consumer perspective. And if you understand that the GDP in the US. 70% of the GDP, approximately 70%, is based on the consumer, based on consumption. So weak consumer just means a weak economy. So we still have the same setup we've had going for a while, right? We have a slowing economy, we have some disinflation, and we have a hawkish Fed, and we have those three factors that is just always historically poor for risk assets. So until something changes, you still got to be prepared for more downside. I said I was looking at the 30,000 foot view, so I'm really bearish at the moment, but I will tell you that I think we're moving along in bitcoin. I tweeted this out on Christmas a couple of days ago. As far as the four year kind of cycle goes for bitcoin, I think we're moving out of the year of widespread panic and disillusionment. That happened in 2018 and it happened again, I think, this last year in 2022. And I think we're moving into and we're probably already there in disinterest. What does disinterest mean? It basically means there's nobody really left who cares other than the hardcore bitcoiners, right? It's just us left. We have our little rooms, we keep each other motivated. We're encouraging each other. We're still dollar cost averaging. It's basically us left. The traders don't care anymore. There's no volatility in the space anymore. Most of the garbage crypto exchanges have gotten liquidated. There may be a few more to come still. I think there probably will be. I think we're going to see some bitcoin miners still go out of business before this is over. It's going to get worse before it gets better. But that period of disinterest is when new bull markets start. So I'm actually really encouraged the best businesses for bitcoin typically start during those periods of widespread panic and disillusionment. Basically when everybody else is panicking, that's when people, the creative people, get the best ideas for how they can make something better for the next go around. So that's what I'm looking at. I'm actually really encouraged that we're getting really close to a bottom. I think we still have more pain to come, but it's in the short term, in the next couple of quarters, I think, at the latest. And then I'm really encouraged. I was telling the people over at Bitcoin magazine, I think there's a really good chance we've hit a bottom in the price of bitcoin before the bitcoin covers in Miami. And then it's basically just up from there. So I think, by the way, I think the bull market will start out slowly again because we're still in this period of disinterest. I think most people won't believe it when we start, but it's setting the stage for 2024, and 2025 being just absolutely fantastic year. So I hope people are dollar costs averaging with me. If not, if you're a trader, that's fine too, but don't try to pick a bottom. That's very hard to do. But I'm very excited for people and my friends who are dollar costs averaging right now because I think finally we're going to have better days ahead by the end of 2023. I love that. Yeah. I think during this period of disinterest, there's also just people are not taking crypto and altcoins seriously because they've obviously failed and there's all this fraud with FTX and so forth. So it's a time for bitcoiners, the ones that are left to get to know each other even better and learn from each other and just go deeper, right, and maybe upsell ourselves or just increase our conviction. And like you said, this is a time when a lot of great ideas will come and creative people will people be more creative and hopefully come up with some new projects and ideas and startups that can really move the needle. I do want to ask you quickly about, you mentioned the credit card debt that is soaring and savings rates going down. It is a small percentage of the overall kind of US household net worth, which I believe is about well over 100 trillion, maybe 140,000,000,000,000. When housing prices were high. But it does seem like this 1 trillion or whatever of credit card debt, while it's serious, is still a fairly small percentage of overall US. Household net worth. And I was wondering if you could comment on that. Yeah, that's a great point, Terrence. And you got to think in terms of the strata of economics, right? So people who are generally wealthy and then sort of the middle class, which has been decimated, and then the poorer classes, this is obviously affecting really harshly the poorer classes, right. Inflation just crushes people in the lower classes, financially speaking. They have minimum wage jobs. We've talked about this many times on here, but you cannot survive on one minimum wage job. So maybe they have two or three. And then as the economy tightens, they're starting to get fired from some of these. The cost of goods and services is rapidly increasing. So they can't even afford their basic groceries. They may not be able to afford gas to drive to work. All of these things, they just get worse and worse. So it does affect the lower economic classes. Disproportionately that's what drives me nuts, right. That's what makes Bitcoin so beautiful, is those are the same classes who can benefit most strongly from Bitcoin, from a fair type of money instead of the unjust system that we have. So, yeah, it's affecting them. Now. I will say, though, that the wealth effect is real, too, and that affects the upper classes. Disproportionately why? Because wealthier people own more assets, right? They own houses, they own stocks, they own bonds, they own art, they own whatever. And the valuations of those kind of things have also come down dramatically. So we're actually seeing that across the board, which is sort of interesting. And you don't always see this. You only see this in like real recessions where the poor people are buying less of their normal goods and services, the consumer staples, and the wealthier people are actually buying less of their garbage that they buy diamond rings and pearls and boats and wealthy person things, yachts, those kind of sales are all significantly down as well. So it's affecting everybody, but it affects everybody. Disproportionately that makes a lot of sense. Yeah. Thank you for that breakdown. ", + timestamp: '01:31:53-01:39:57', + topics: [ + 'Jeff Ross', + 'Bitcoin macro outlook', + 'poor outlook for risk assets', + 'hawkish US Fed', + 'Disinflation', + 'shitcoin failures', + ], + type: 'twitter_space', + weight: 122.72901871778198, + }, + { + boost: 0, + date: 1672152975, + description: 'Bitcoin regulations in America', + episode_title: 'Café ₿: #Bitcoin Holiday Hangout & @StatusMoneyUSA a #BTC Credit Card', + guests: [ + { + name: ' BITVOLT7', + profile_picture: 'https://pbs.twimg.com/profile_images/1532194001511714818/O8nSTKcx_400x400.png', + ref_id: '2b9913b7-393c-4125-9aeb-4a8bf32bfa44', + twitter_handle: 'BITVOLT7', + }, + { + name: ' samcallah', + profile_picture: 'https://pbs.twimg.com/profile_images/1502454836981166082/cQG0YQxc_400x400.jpg', + ref_id: 'a3dbdb56-e228-4382-98bc-d4495ff6dfbd', + twitter_handle: 'samcallah', + }, + { + name: ' taodejing2', + profile_picture: 'https://pbs.twimg.com/profile_images/1575442322531274756/-ZdL-K9S_400x400.jpg', + ref_id: '4914799b-a230-4bee-95c9-cf3ac44b6b70', + twitter_handle: 'TyonClubhouse', + }, + { + name: ' MrHodl', + profile_picture: 'https://pbs.twimg.com/profile_images/1607490976670519296/vhLAojMR_400x400.jpg', + ref_id: '01d6ee68-c0ef-4ead-b2b7-7eb04694519e', + twitter_handle: 'MrHodl', + }, + { + name: ' TomerStrolight', + profile_picture: 'https://pbs.twimg.com/profile_images/1591960241008148481/HtyINxtU_400x400.jpg', + ref_id: '57beb381-b9e8-4dd1-82f6-4e544a63146b', + twitter_handle: 'TomerStrolight', + }, + { + name: ' VailshireCap', + profile_picture: 'https://pbs.twimg.com/profile_images/1475554600094552064/DSlPG1lx_400x400.jpg', + ref_id: '73c15965-ddad-4e32-9746-da92f5d24134', + twitter_handle: 'VailshireCap', + }, + { + name: 'bergealex4', + profile_picture: 'https://pbs.twimg.com/profile_images/1273374628577247233/tYigkAZH_400x400.jpg', + ref_id: 'da4bb8ab-540d-4f88-a2a6-f3a3941c5b74', + twitter_handle: 'bergealex4', + }, + { + name: ' LukeMikic21', + profile_picture: 'https://pbs.twimg.com/profile_images/1604626418708742147/gWyVLeqa_400x400.jpg', + ref_id: '0a907108-f59f-420f-9986-79b0f060f690', + twitter_handle: 'LukeMikic21', + }, + { + name: ' 2140data', + profile_picture: 'https://pbs.twimg.com/profile_images/1598330787778232320/ZVFcRtet_400x400.jpg', + ref_id: 'c8fb52d1-fa69-410d-bf96-8a7559bba863', + twitter_handle: '2140data', + }, + { + name: ' majdmaksad', + profile_picture: 'https://pbs.twimg.com/profile_images/1483883774471516167/zvEjiCTO_400x400.jpg', + ref_id: '1a63c59d-a760-4f8b-bba9-ddfd3cff9f33', + twitter_handle: 'majdmaksad', + }, + ], + hosts: [ + { + name: ' PeterAnsel9', + profile_picture: 'https://pbs.twimg.com/profile_images/1607979298153197568/JqAbDyi__400x400.jpg', + ref_id: '6cb2b160-fa27-4fac-9ccf-77886ba01521', + twitter_handle: 'PeterAnsel9', + }, + { + name: ' NeilJacobs', + profile_picture: 'https://pbs.twimg.com/profile_images/1599432572727169025/NSoPdchB_400x400.jpg', + ref_id: 'c61e3ff9-f540-4343-bc26-1c3a4b537b78', + twitter_handle: 'NeilJacobs', + }, + { + name: ' nathanfast', + profile_picture: 'https://pbs.twimg.com/profile_images/1545758157103697920/RyLn465N_400x400.jpg', + ref_id: '739d907e-cbc6-4a05-9246-45c7c5d2a853', + twitter_handle: 'nathanfast', + }, + { + name: 'TYonClubhouse', + profile_picture: 'https://pbs.twimg.com/profile_images/1575442322531274756/-ZdL-K9S_400x400.jpg', + ref_id: 'cc057990-16d0-4588-83c7-1eb9734eb994', + twitter_handle: 'tyonclubhouse', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/239722cb-4216-414a-a17b-5adf9d52e15a.jpg', + keyword: !0, + link: 'https://stakwork-uploads.s3.amazonaws.com/uploads/customers/2707/media_to_local/b27dcf88-bdfb-4433-b0fe-c9040dbf392f/11aa5648-d416-46f3-a66a-0750e9d71ccd.mp3', + node_type: 'clip', + pub_key: '02574d6e8e787372184b6f17c40d6c6fe1777db9015801f95dfd24692784d767cd', + ref_id: '2969a789-41bf-4e23-8ab8-31a76c5a5754', + show_title: 'Swan.com', + text: "very quickly, just before perhaps we could give the mic to Luke. But I just want to quickly echo what Sam was saying and it just pinned at the top. The report from Pierre Rashard and I think Jill Burnett at Block, where I think they've done a very fantastic job of dispelling a lot of the fun around the security budget and actually sort of introducing, perhaps not introducing, for everyone. But bringing back to the front a different way to discuss that, wherein, when we're discussing minors, we're really discussing finality and not security. And I think when you considered that under this optic, you can look at it in very different ways. That makes sense. Luke, go ahead. Yeah. To the discussion about America losing the war and really burdensome regulation being pushed for in America. What odds do you guys put on, say, like a Texas or even a shitcoin in Miami actually succeeding and forming their own independent state? I shared something in the nest. I think it was the former Russian president put out some very interesting and provocative predictions for the year 2030. But he talked about the possibility, probably a very small possibility, of a Texas forming like an allied state with Mexico. Obviously that's madness and probably won't happen in a long time, but what odds do you guys genuinely put on like a Texas succeeding from the US. If the US Tries to attack bitcoin? Yeah. The balkanization of the US. Has been discussed a lot about in Bitcoin circles. Tone Vase swears by it and thinks by 2030, 2035, you'll see the Balkanization. And I've put some thought into it. And if you think about it, what is one of the glue that is keeping a lot of these states together, even though ideologically they're radically different? Right. Like, people in California want a certain type of government. People in Texas want a certain type of government. People in Florida want a certain type of government. People in New York want a certain type of government. The glue that's keeping it together is the common currency. It's the US. Dollar. Right. So what happens if and Parker Lewis has touched upon this before in the past? What happens if all of a sudden state like Florida, Wyoming, starts putting bitcoin on its balance sheet and starts to realize that it doesn't need those federal dollars anymore, basically becoming self sufficient in a sense? Right. It's a very interesting question. And now think about how the marijuana industry has been treated in the United States, right? On a federal level, marijuana is illegal, right? But on a state level, it's thriving, right? California, Colorado, Oregon, washington State. So you can kind of see it in that direction. I think on a federal level, they're extremely hostile to bitcoin, obviously, because they get a tremendous amount of power from being able to control the monetary policy it funds themselves and also this world police type of outlook, right. The ability for the US government to place sanctions on entire countries through the office of foreign asset Control, that gives them a tremendous amount of power. Bitcoin is a threat to that. So obviously, I don't think on the federal level, I think on the federal level, bitcoin could be the last to be really accepted. But on a state level, that's a whole different conversation. I think states like Texas that get a tremendous amount of economic opportunity from the bitcoin mining industry, I think they're going to try to protect it tooth and nail. It's very similar to how the marijuana industry played out. I think that's what's going to happen perhaps on a state level. And I think that as soon as a state that brave state starts to put bitcoin on their balance sheet, man, in my opinion, that's game over. Like it's done right now. Hold on, Nico. You don't think the federal government is not going to enforce the constitution and not allow that to happen with military? I mean, that's like seceding, dude. That's a big deal. I think that things are going to get so crazy, and I think that we're all feeling it right now. I think that we're all feeling the fourth turning vibes. The corruption, the theft is so blatant, so in your face. The $1.7 trillion optimus bill, bro, I'm not going to get into any of the political stuff in there, but they had $65 million just into the research of fish, bro, there was a point in the bill. I'm not kidding. This is 100% real. There was $120,000 being dedicated to researching whether thanos the fictional character from the Avengers movies, whether he could really snap his fingers or not. Right? I couldn't agree with you more. There's a bill about a bee crossing on a fucking highway, but $3.5 million dedicated to bees? The theft is so blatant, bro, it's in your face, right? And it goes to are we at the very dying ends of an empire, the American empire, right? Empires usually last 300 years. We're about that point. It's so blatant. It's so corrupt. It's so in your face. And I don't know, man, if I'm a state like Texas, if I'm a state like Florida, ideologically I'm very different. And I'm seeing this and all of a sudden I have an alternative. I have an option to opt out of that entirely. I don't know why you wouldn't take that. Right? And then that goes to the other theory that. Ex former president of Russia said that you could potentially see an American civil war. I don't want to talk about that because war is terrible. War is hell. Of course we'd want to avoid that, but, I mean, if the momentum of history is going in that direction, so be it. But I don't know what's going to happen. On a macro level, I think predicting that it's, like, almost impossible. But what I can tell you, and I think what makes me, as an individual extremely optimistic, is that if my wealth is in bitcoin, my family's future, my future is protected because I can go where I'm treated best. If it means picking up and leaving and taking everything with me, I can only by writing down twelve words or 24 words. And I think that by itself is going to radically change the world. Because what I think governments are doing today is I think that they have a lot of their citizens hostage, and then they force their citizens to use money that steals from them. And perhaps in the United States, it's not quite noticeable because the inflation rate is only two to 4%. It got all the way up to 7%. But if you live in Argentina, where that inflation rate is 92%, man, bitcoin isn't a speculation for you. Bitcoin is survival. Those people already understand what it means to live in a country where their government currency fails, right? So that's what I'm bullish on, man. I'm bullish on individuals. I'm bullish on Central and Latin America. I'm bullish on what's going on over there in the United States. We shall see. I'm going to fight like hell. I love my country. I'm a first generation immigrant. I love not what the American government stands for, but what the original vision of America stood for. And I love it, and I'm going to fight for it. I'm going to stay here to the very bitter end. But, you know, if it comes to being thrown in a gulag because I'm writing twelve words or taking, like, uprooting my my life and my family's life and moving to El Salvador, then so be it. Obviously, I don't want to do that. I want to fight. And I want to win the race of adoption, get the ideals of bitcoin into the mainstream consciousness of America so that we could avoid that fucking war altogether. And I think that's what I try to do every single day. And that's what swan tries to do every single day. And that's what all bitcoiners try to do every single day. We fight this. We fight this information war, this psychological warfare that's happening every single day. It's trench warfare on the battlegrounds of the internet, man. And I think we're going to win. I think bitcoin's incentives are going to be any type of coercion that they try to jump, that they try to throw at us. Anyways, I'm sorry for ranting a little bit it's just a very passionate topic for me. ", + timestamp: '01:05:44-01:15:03', + topics: ['Bitcoin regulation', 'bitcoin attack'], + type: 'twitter_space', + weight: 79.79824311351389, + }, + { + boost: 0, + date: 1672152975, + description: + "Discussion on Dmitry Medvedev's 2023 global predictions, the US losing the Bitcoin regulation war and Texas succeeding from the union due to bitcoin", + episode_title: 'Café ₿: #Bitcoin Holiday Hangout & @StatusMoneyUSA a #BTC Credit Card', + guests: [ + { + name: ' BITVOLT7', + profile_picture: 'https://pbs.twimg.com/profile_images/1532194001511714818/O8nSTKcx_400x400.png', + ref_id: '2b9913b7-393c-4125-9aeb-4a8bf32bfa44', + twitter_handle: 'BITVOLT7', + }, + { + name: ' samcallah', + profile_picture: 'https://pbs.twimg.com/profile_images/1502454836981166082/cQG0YQxc_400x400.jpg', + ref_id: 'a3dbdb56-e228-4382-98bc-d4495ff6dfbd', + twitter_handle: 'samcallah', + }, + { + name: ' taodejing2', + profile_picture: 'https://pbs.twimg.com/profile_images/1575442322531274756/-ZdL-K9S_400x400.jpg', + ref_id: '4914799b-a230-4bee-95c9-cf3ac44b6b70', + twitter_handle: 'TyonClubhouse', + }, + { + name: ' MrHodl', + profile_picture: 'https://pbs.twimg.com/profile_images/1607490976670519296/vhLAojMR_400x400.jpg', + ref_id: '01d6ee68-c0ef-4ead-b2b7-7eb04694519e', + twitter_handle: 'MrHodl', + }, + { + name: ' TomerStrolight', + profile_picture: 'https://pbs.twimg.com/profile_images/1591960241008148481/HtyINxtU_400x400.jpg', + ref_id: '57beb381-b9e8-4dd1-82f6-4e544a63146b', + twitter_handle: 'TomerStrolight', + }, + { + name: ' VailshireCap', + profile_picture: 'https://pbs.twimg.com/profile_images/1475554600094552064/DSlPG1lx_400x400.jpg', + ref_id: '73c15965-ddad-4e32-9746-da92f5d24134', + twitter_handle: 'VailshireCap', + }, + { + name: 'bergealex4', + profile_picture: 'https://pbs.twimg.com/profile_images/1273374628577247233/tYigkAZH_400x400.jpg', + ref_id: 'da4bb8ab-540d-4f88-a2a6-f3a3941c5b74', + twitter_handle: 'bergealex4', + }, + { + name: ' LukeMikic21', + profile_picture: 'https://pbs.twimg.com/profile_images/1604626418708742147/gWyVLeqa_400x400.jpg', + ref_id: '0a907108-f59f-420f-9986-79b0f060f690', + twitter_handle: 'LukeMikic21', + }, + { + name: ' 2140data', + profile_picture: 'https://pbs.twimg.com/profile_images/1598330787778232320/ZVFcRtet_400x400.jpg', + ref_id: 'c8fb52d1-fa69-410d-bf96-8a7559bba863', + twitter_handle: '2140data', + }, + { + name: ' majdmaksad', + profile_picture: 'https://pbs.twimg.com/profile_images/1483883774471516167/zvEjiCTO_400x400.jpg', + ref_id: '1a63c59d-a760-4f8b-bba9-ddfd3cff9f33', + twitter_handle: 'majdmaksad', + }, + ], + hosts: [ + { + name: ' PeterAnsel9', + profile_picture: 'https://pbs.twimg.com/profile_images/1607979298153197568/JqAbDyi__400x400.jpg', + ref_id: '6cb2b160-fa27-4fac-9ccf-77886ba01521', + twitter_handle: 'PeterAnsel9', + }, + { + name: ' NeilJacobs', + profile_picture: 'https://pbs.twimg.com/profile_images/1599432572727169025/NSoPdchB_400x400.jpg', + ref_id: 'c61e3ff9-f540-4343-bc26-1c3a4b537b78', + twitter_handle: 'NeilJacobs', + }, + { + name: ' nathanfast', + profile_picture: 'https://pbs.twimg.com/profile_images/1545758157103697920/RyLn465N_400x400.jpg', + ref_id: '739d907e-cbc6-4a05-9246-45c7c5d2a853', + twitter_handle: 'nathanfast', + }, + { + name: 'TYonClubhouse', + profile_picture: 'https://pbs.twimg.com/profile_images/1575442322531274756/-ZdL-K9S_400x400.jpg', + ref_id: 'cc057990-16d0-4588-83c7-1eb9734eb994', + twitter_handle: 'tyonclubhouse', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/239722cb-4216-414a-a17b-5adf9d52e15a.jpg', + keyword: !0, + link: 'https://stakwork-uploads.s3.amazonaws.com/uploads/customers/2707/media_to_local/515f3625-8d91-439b-8d44-968fe6ab16de/19ec29f4-268c-4015-aa6e-245563dbc49d.mp3', + node_type: 'clip', + pub_key: '034248fa888690a85021cf117c168a535c53b92e1fdf3e4f9cefddfe09118d8207', + ref_id: '12445bad-9deb-4bff-ba8a-e8a490b00cc5', + show_title: 'Swan.com', + text: "Luke, go ahead. Yeah. To the discussion about America losing the war and really burdensome regulation being pushed for in America. What odds do you guys put on, say, like a Texas or even a shitcoin in Miami actually succeeding and forming their own independent state? I shared something in the nest. I think it was the former Russian president put out some very interesting and provocative predictions for the year 2030. But he talked about the possibility, probably a very small possibility, of a Texas forming like an allied state with Mexico. Obviously that's madness and probably won't happen in a long time, but what odds do you guys genuinely put on like a Texas succeeding from the US. If the US Tries to attack bitcoin? Yeah. The balkanization of the US. Has been discussed a lot about in Bitcoin circles. Tone Vase swears by it and thinks by 2030, 2035, you'll see the Balkanization. And I've put some thought into it. And if you think about it, what is one of the glue that is keeping a lot of these states together, even though ideologically they're radically different? Right. Like, people in California want a certain type of government. People in Texas want a certain type of government. People in Florida want a certain type of government. People in New York want a certain type of government. The glue that's keeping it together is the common currency. It's the US. Dollar. Right. So what happens if and Parker Lewis has touched upon this before in the past? What happens if all of a sudden state like Florida, Wyoming, starts putting bitcoin on its balance sheet and starts to realize that it doesn't need those federal dollars anymore, basically becoming self sufficient in a sense? Right. It's a very interesting question. And now think about how the marijuana industry has been treated in the United States, right? On a federal level, marijuana is illegal, right? But on a state level, it's thriving, right? California, Colorado, Oregon, washington State. So you can kind of see it in that direction. I think on a federal level, they're extremely hostile to bitcoin, obviously, because they get a tremendous amount of power from being able to control the monetary policy it funds themselves and also this world police type of outlook, right. The ability for the US government to place sanctions on entire countries through the office of foreign asset Control, that gives them a tremendous amount of power. Bitcoin is a threat to that. So obviously, I don't think on the federal level, I think on the federal level, bitcoin could be the last to be really accepted. But on a state level, that's a whole different conversation. I think states like Texas that get a tremendous amount of economic opportunity from the bitcoin mining industry, I think they're going to try to protect it tooth and nail. It's very similar to how the marijuana industry played out. I think that's what's going to happen perhaps on a state level. And I think that as soon as a state that brave state starts to put bitcoin on their balance sheet, man, in my opinion, that's game over. Like it's done right now. Hold on, Nico. You don't think the federal government is not going to enforce the constitution and not allow that to happen with military? I mean, that's like seceding, dude. That's a big deal. I think that things are going to get so crazy, and I think that we're all feeling it right now. I think that we're all feeling the fourth turning vibes. The corruption, the theft is so blatant, so in your face. The $1.7 trillion optimus bill, bro, I'm not going to get into any of the political stuff in there, but they had $65 million just into the research of fish, bro, there was a point in the bill. I'm not kidding. This is 100% real. There was $120,000 being dedicated to researching whether thanos the fictional character from the Avengers movies, whether he could really snap his fingers or not. Right? I couldn't agree with you more. There's a bill about a bee crossing on a fucking highway, but $3.5 million dedicated to bees? The theft is so blatant, bro, it's in your face, right? And it goes to are we at the very dying ends of an empire, the American empire, right? Empires usually last 300 years. We're about that point. It's so blatant. It's so corrupt. It's so in your face. And I don't know, man, if I'm a state like Texas, if I'm a state like Florida, ideologically I'm very different. And I'm seeing this and all of a sudden I have an alternative. I have an option to opt out of that entirely. I don't know why you wouldn't take that. Right? And then that goes to the other theory that. Ex former president of Russia said that you could potentially see an American civil war. I don't want to talk about that because war is terrible. War is hell. Of course we'd want to avoid that, but, I mean, if the momentum of history is going in that direction, so be it. But I don't know what's going to happen. On a macro level, I think predicting that it's, like, almost impossible. But what I can tell you, and I think what makes me, as an individual extremely optimistic, is that if my wealth is in bitcoin, my family's future, my future is protected because I can go where I'm treated best. If it means picking up and leaving and taking everything with me, I can only by writing down twelve words or 24 words. And I think that by itself is going to radically change the world. Because what I think governments are doing today is I think that they have a lot of their citizens hostage, and then they force their citizens to use money that steals from them. And perhaps in the United States, it's not quite noticeable because the inflation rate is only two to 4%. It got all the way up to 7%. But if you live in Argentina, where that inflation rate is 92%, man, bitcoin isn't a speculation for you. Bitcoin is survival. Those people already understand what it means to live in a country where their government currency fails, right? So that's what I'm bullish on, man. I'm bullish on individuals. I'm bullish on Central and Latin America. I'm bullish on what's going on over there in the United States. We shall see. I'm going to fight like hell. I love my country. I'm a first generation immigrant. I love not what the American government stands for, but what the original vision of America stood for. And I love it, and I'm going to fight for it. I'm going to stay here to the very bitter end. But, you know, if it comes to being thrown in a gulag because I'm writing twelve words or taking, like, uprooting my my life and my family's life and moving to El Salvador, then so be it. Obviously, I don't want to do that. I want to fight. And I want to win the race of adoption, get the ideals of bitcoin into the mainstream consciousness of America so that we could avoid that fucking war altogether. And I think that's what I try to do every single day. And that's what swan tries to do every single day. And that's what all bitcoiners try to do every single day. We fight this. We fight this information war, this psychological warfare that's happening every single day. It's trench warfare on the battlegrounds of the internet, man. And I think we're going to win. I think bitcoin's incentives are going to be any type of coercion that they try to jump, that they try to throw at us. Anyways, I'm sorry for ranting a little bit it's just a very passionate topic for me. I love your quote unquote rants. I think to me they just come across passionate and well thought out. I am. Thanks, Terry. Just to go back and answer League's question maybe a little bit differently, I think this session, it would be very hostile. Like, that's a totally different ball game. It would be on the brink of civil war. We're also intertwined and the whole country depends on, say, Texas and Florida for different resources. That's just not going to happen without some kind of military response. But in the Constitution, there is the 10th Amendment right that powers not delegated to the United States by the Constitution are reserved to the states respectively, or to the people. And so I always said the migration of hash rate was bullish to go to America because I called it the disunited king of hash rate because they're strong state government and to avoid tyranny and the ineffective central planning, every state is free to enact its own policies that work for its own populations. And so unless the government banned, outright banned bitcoin a commodity, I don't see how they could stop states from adding it to their balance sheets or the Treasuries just saying, hey, we're going to buy a little bit of bitcoin unless there was some federal ban on bitcoin. And so there's a difference between suspicion and just purchasing bitcoin right now because there's no kind of federal law preventing them from doing that. And they have states rights and that's protected by the Constitution, the 10th Amendment. So that's how I kind of see that scenario. ", + timestamp: '01:06:40-01:16:49', + topics: ['Dmitry Medvedev', 'balkanization of the us', 'Bitcoin regulation', 'Texas secession'], + type: 'twitter_space', + weight: 76.08473176624994, + }, + { + boost: 0, + date: 1671644776, + description: 'The BCV foundation and Bitcoin education in Nigeria', + episode_title: '#Bitcoin Creators Space', + guests: [ + { + name: '@DecouvreBitcoin', + profile_picture: 'https://pbs.twimg.com/profile_images/1362747604044566530/Invedmre_400x400.jpg', + ref_id: '0eda190b-4373-41fc-bc28-c3b95af30949', + twitter_handle: 'DecouvreBitcoin', + }, + { + name: '@Bridge2Bitcoin', + profile_picture: 'https://pbs.twimg.com/profile_images/1533812215198924800/vAAlVRxO_400x400.jpg', + ref_id: '1aaf2c24-8d26-4038-b55a-8b94427b20c7', + twitter_handle: 'Bridge2Bitcoin', + }, + { + name: '@orangepillapp', + profile_picture: 'https://pbs.twimg.com/profile_images/1570918965601505282/SOApRCif_400x400.jpg', + ref_id: 'ba5b79b4-e2e7-4778-8879-df793b8420a4', + twitter_handle: 'orangepillapp', + }, + { + name: '@knutsvanholm', + profile_picture: 'https://pbs.twimg.com/profile_images/1586261395833774081/RQ8SYxiM_400x400.jpg', + ref_id: 'e12ebe66-706b-40d2-804a-861a4c79bbfa', + twitter_handle: 'knutsvanholm', + }, + { + name: '@bcvFoundation', + profile_picture: 'https://pbs.twimg.com/profile_images/1460813196902633476/edbNgO7y_400x400.jpg', + ref_id: 'd65bc3c3-cdd7-4539-8cb9-6a8d86f580c8', + twitter_handle: 'bcvFoundation', + }, + { + name: 'Christopher', + profile_picture: 'https://pbs.twimg.com/profile_images/1345072452775370754/cBVFzpkV_400x400.jpg', + ref_id: '7dacb545-925d-4201-9b9c-869d992dcdb3', + twitter_handle: 'Chrissuccess', + }, + ], + hosts: [ + { + name: '@steliosats', + profile_picture: 'https://pbs.twimg.com/profile_images/1495784740921786371/a73Qu4HR_400x400.jpg', + ref_id: '7eed8e35-f762-4882-adf9-b45ad16c3c54', + twitter_handle: 'steliosats', + }, + { + name: '@geyserfund', + profile_picture: 'https://pbs.twimg.com/profile_images/1554429112978120706/yr1hXl6R_400x400.jpg', + ref_id: '02a48cf4-58d0-4014-803c-9120dedeec52', + twitter_handle: 'geyserfund', + }, + { + name: 'UKNOWN', + profile_picture: 'https://pbs.twimg.com/profile_images/930811252665933826/2cVZF58S_400x400.jpg', + ref_id: 'bcd18bb0-8224-4f6b-af71-e16120ae4323', + twitter_handle: 'NodedPodcast', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/c9bb5d58-c781-464d-878a-8b6c469ba198.jpg', + keyword: !0, + link: 'https://stakwork-uploads.s3.amazonaws.com/uploads/customers/2707/media_to_local/b18df9d2-d034-4e1f-bcd1-d70b30fe9059/506355bc-c119-4f18-bf0b-abe9be8c17d6.mp3', + node_type: 'clip', + pub_key: '029099ec31eb33594611dc47d5c93de2c1aa86918e3a36b408c14a500601c8bc9b', + ref_id: '0330ada0-fbc0-4f8f-a560-a6c059a72907', + show_title: 'Geyser 🌊', + text: "So, yeah, tell us a bit about your project and I'm sure more and more people will join up. All right. I'm just handle that because I'm just like handling the accounts where I really know about this project because I'm a beneficiary of the project. So they have been going around in communities in Nigeria and some other places, and they've been giving out pamphlets, teaching people about Bitcoin and how we can help them secure financial power or financial freedom yet. So basically I got about 100,000 from them after the education. And also I've been keeping in touch with these people and they offered me because I really don't have anything doing. So they offered me to get this job to just handle the account. And I'm still learning about the project. But basically what they do is they just teach people. We just tell people about it's more like we're going to like the grassroots. I don't know if you're with me. We're going to the grassroots to really uneducated places, to just teach people, like traders and random people on the streets. We're just teaching them and telling them stuff about bitcoin, because I think it starts from there, because education is a big problem. There's this gap, there's this space between the educator and the uneducated ones that the uneducators also never really get the chance to understand what this is all about. They just keep suffering and suffering and they don't really know how to really get out of the circle or the matrix of just being suppressed financially. Right. So that's basically what it's all about. So they've been doing a great job. They've been going around. And I'm a beneficiary, so it's more like my testimony, right? Yeah. I'm just saying that to the space, basically wait, I'm sure if it worked, but basically they're receiving donations of Geyser. And the main purpose of the initiative is essentially reaching out to rural communities, doing basic education about bitcoin. And there's also an element of mining, is that right? Not really, but solar. Really? Solar power. About renewable energy. Because Nigeria has power issues. Has power issues, especially in the local communities, the grassroots, like I said. That'S incredible. So we just try to help people with small solar power generators that they used to. And we have some people that mine bitcoin in very small scale. They have this really small miners, so they use our solar power generators. Got you. So I can see here you guys are focused on six African communities in three countries. Ghana, Kenya, Nigeria. Yes. And you guys are an NGO dedicated to promoting, expanding bitcoin across the world. Yes. Focusing on education, school and rural areas. Yes. Yes. So this is an incredible project. You guys are calling it bits and stats and help educate school students and other individuals. So how do you guys do that? And what's your experience so far? Like, how has it been received? It has been really good because when schools were still in session, because now schools are on holidays now, vacation. Right. When schools were still in session, like secondary school education, we used to go around and teach, like, school children in classes. We just take minutes of their time because in schools they have recess and different times and other stuff like that. So we just go around and we try to teach and we hand out pamphlets, like I said. But we haven't really given out bitcoin to this secondary school students because most of them don't really, like, possess phones and other things like that. So we just basically teach them how it works. But then we go around and trade as people that sell stuff, people that just, like, randomly work on things, like outside. We just try to teach them on the streets, we just walk around. Have you tried using different tools like machancura to use SMS to send people? I just learnt about machancura last month and it's really innovative, but I haven't really done anything and I haven't really connected with people. So I think we should do more of that. We would have to connect with people because we had one representative in Ghana for the Afro Bitcoin conference some weeks back. It's just a tool that you can start using. I recommend you just playing with it, and it really just means that you can use your feature phone and some of the old phones to receive. Satoshi is pretty straightforward. Okay, that's great. Yes, I saw some stuff about it, so I'll definitely play around with it. And I can't people around too, since. That'S how you really learn, right? You learn and practice with really feeling it. Yes. That's cool. Yeah. Thank you for the awesome initiative, for the opportunity. Also really appreciate of ", + timestamp: '00:10:34-00:16:46', + topics: ['Bitcoin education', 'Nigeria', 'Bitcoin mining', 'BCV foundation', 'Geyser'], + type: 'twitter_space', + weight: 62.68289275364415, + }, + { + boost: 0, + date: 1671644776, + description: "The introduction to Bitcoin in Nigeria and how it's gradually taking it's place", + episode_title: '#Bitcoin Creators Space', + guests: [ + { + name: '@DecouvreBitcoin', + profile_picture: 'https://pbs.twimg.com/profile_images/1362747604044566530/Invedmre_400x400.jpg', + ref_id: '0eda190b-4373-41fc-bc28-c3b95af30949', + twitter_handle: 'DecouvreBitcoin', + }, + { + name: '@Bridge2Bitcoin', + profile_picture: 'https://pbs.twimg.com/profile_images/1533812215198924800/vAAlVRxO_400x400.jpg', + ref_id: '1aaf2c24-8d26-4038-b55a-8b94427b20c7', + twitter_handle: 'Bridge2Bitcoin', + }, + { + name: '@orangepillapp', + profile_picture: 'https://pbs.twimg.com/profile_images/1570918965601505282/SOApRCif_400x400.jpg', + ref_id: 'ba5b79b4-e2e7-4778-8879-df793b8420a4', + twitter_handle: 'orangepillapp', + }, + { + name: '@knutsvanholm', + profile_picture: 'https://pbs.twimg.com/profile_images/1586261395833774081/RQ8SYxiM_400x400.jpg', + ref_id: 'e12ebe66-706b-40d2-804a-861a4c79bbfa', + twitter_handle: 'knutsvanholm', + }, + { + name: '@bcvFoundation', + profile_picture: 'https://pbs.twimg.com/profile_images/1460813196902633476/edbNgO7y_400x400.jpg', + ref_id: 'd65bc3c3-cdd7-4539-8cb9-6a8d86f580c8', + twitter_handle: 'bcvFoundation', + }, + { + name: 'Christopher', + profile_picture: 'https://pbs.twimg.com/profile_images/1345072452775370754/cBVFzpkV_400x400.jpg', + ref_id: '7dacb545-925d-4201-9b9c-869d992dcdb3', + twitter_handle: 'Chrissuccess', + }, + ], + hosts: [ + { + name: '@steliosats', + profile_picture: 'https://pbs.twimg.com/profile_images/1495784740921786371/a73Qu4HR_400x400.jpg', + ref_id: '7eed8e35-f762-4882-adf9-b45ad16c3c54', + twitter_handle: 'steliosats', + }, + { + name: '@geyserfund', + profile_picture: 'https://pbs.twimg.com/profile_images/1554429112978120706/yr1hXl6R_400x400.jpg', + ref_id: '02a48cf4-58d0-4014-803c-9120dedeec52', + twitter_handle: 'geyserfund', + }, + { + name: 'UKNOWN', + profile_picture: 'https://pbs.twimg.com/profile_images/930811252665933826/2cVZF58S_400x400.jpg', + ref_id: 'bcd18bb0-8224-4f6b-af71-e16120ae4323', + twitter_handle: 'NodedPodcast', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/c9bb5d58-c781-464d-878a-8b6c469ba198.jpg', + keyword: !0, + link: 'https://stakwork-uploads.s3.amazonaws.com/uploads/customers/2707/media_to_local/885fe09b-bb21-49a5-8667-3c73ed36918f/196dc1e8-c7a4-4dc7-902f-d00107aefb42.mp3', + node_type: 'clip', + pub_key: '0372cd0c8469f2034336a243e018d4d60e07efef8e7d10417807da1173bd5b002f', + ref_id: '83ce1420-66d3-41e6-b987-b35fe2cf019f', + show_title: 'Geyser 🌊', + text: "All right. Hello. Good evening. Hey, good evening. Yeah, how's it going? It's going great. Thanks, guys, for the opportunity to speak. Yes, I'm grateful. Fantastic. Yeah. I mean, not many people today. We've had better turnouts. I think it was a bit of a last minute call, but I wasn't. Even expecting I just saw a notification and I came up. Awesome. Yeah, it's cool, man. So, yeah, tell us a bit about your project and I'm sure more and more people will join up. All right. I'm just handle that because I'm just like handling the accounts where I really know about this project because I'm a beneficiary of the project. So they have been going around in communities in Nigeria and some other places, and they've been giving out pamphlets, teaching people about Bitcoin and how we can help them secure financial power or financial freedom yet. So basically I got about 100,000 from them after the education. And also I've been keeping in touch with these people and they offered me because I really don't have anything doing. So they offered me to get this job to just handle the account. And I'm still learning about the project. But basically what they do is they just teach people. We just tell people about it's more like we're going to like the grassroots. I don't know if you're with me. We're going to the grassroots to really uneducated places, to just teach people, like traders and random people on the streets. We're just teaching them and telling them stuff about bitcoin, because I think it starts from there, because education is a big problem. There's this gap, there's this space between the educator and the uneducated ones that the uneducators also never really get the chance to understand what this is all about. They just keep suffering and suffering and they don't really know how to really get out of the circle or the matrix of just being suppressed financially. Right. So that's basically what it's all about. So they've been doing a great job. They've been going around. And I'm a beneficiary, so it's more like my testimony, right? Yeah. I'm just saying that to the space, basically wait, I'm sure if it worked, but basically they're receiving donations of Geyser. And the main purpose of the initiative is essentially reaching out to rural communities, doing basic education about bitcoin. And there's also an element of mining, is that right? Not really, but solar. Really? Solar power. About renewable energy. Because Nigeria has power issues. Has power issues, especially in the local communities, the grassroots, like I said. That'S incredible. So we just try to help people with small solar power generators that they used to. And we have some people that mine bitcoin in very small scale. They have this really small miners, so they use our solar power generators. Got you. So I can see here you guys are focused on six African communities in three countries. Ghana, Kenya, Nigeria. Yes. And you guys are an NGO dedicated to promoting, expanding bitcoin across the world. Yes. Focusing on education, school and rural areas. Yes. Yes. So this is an incredible project. You guys are calling it bits and stats and help educate school students and other individuals. So how do you guys do that? And what's your experience so far? Like, how has it been received? It has been really good because when schools were still in session, because now schools are on holidays now, vacation. Right. When schools were still in session, like secondary school education, we used to go around and teach, like, school children in classes. We just take minutes of their time because in schools they have recess and different times and other stuff like that. So we just go around and we try to teach and we hand out pamphlets, like I said. But we haven't really given out bitcoin to this secondary school students because most of them don't really, like, possess phones and other things like that. So we just basically teach them how it works. But then we go around and trade as people that sell stuff, people that just, like, randomly work on things, like outside. We just try to teach them on the streets, we just walk around. Have you tried using different tools like machancura to use SMS to send people? I just learnt about machancura last month and it's really innovative, but I haven't really done anything and I haven't really connected with people. So I think we should do more of that. We would have to connect with people because we had one representative in Ghana for the Afro Bitcoin conference some weeks back. It's just a tool that you can start using. I recommend you just playing with it, and it really just means that you can use your feature phone and some of the old phones to receive. Satoshi is pretty straightforward. Okay, that's great. Yes, I saw some stuff about it, so I'll definitely play around with it. And I can't people around too, since. That'S how you really learn, right? You learn and practice with really feeling it. Yes. That's cool. Yeah. Thank you for the awesome initiative, ", + timestamp: '00:09:59-00:16:41', + topics: ['Nigeria', 'Bitcoin adoption'], + type: 'twitter_space', + weight: 61.64845435071934, + }, + { + boost: 0, + date: null, + description: "Greg Foss' Thoughts on countries interested in joining the BRICS forum", + episode_title: 'Café ₿: #Bitcoin News & Trusted P2P Reviews w/ @Apollosats', + guests: [ + { + name: '@2140data', + profile_picture: 'https://pbs.twimg.com/profile_images/1598330787778232320/ZVFcRtet_400x400.jpg', + ref_id: '190b5001-a42a-46cc-b0d3-b6f74c625648', + twitter_handle: '2140data', + }, + { + name: '@FossGregfoss', + profile_picture: 'https://abs.twimg.com/sticky/default_profile_images/default_profile_400x400.png', + ref_id: '09913e9b-38dc-4465-9d4d-ae0c9ba9eeca', + twitter_handle: 'Fuckkkk', + }, + { + name: '@w_s_bitcoin', + profile_picture: 'https://pbs.twimg.com/profile_images/1594796869233811474/g0_ZRshz_400x400.png', + ref_id: 'b178b239-3b18-4a16-9d43-c5d15ba6f7f4', + twitter_handle: 'w_s_bitcoin', + }, + { + name: '@NeilJacobs', + profile_picture: 'https://pbs.twimg.com/profile_images/1599432572727169025/NSoPdchB_400x400.jpg', + ref_id: '4b6997e1-ce0b-4a1d-90e7-dbaccef4b783', + twitter_handle: 'NeilJacobs', + }, + { + name: '@brandon_gentile', + profile_picture: 'https://pbs.twimg.com/profile_images/1561369452284895236/-8WgdwEm_400x400.jpg', + ref_id: 'f940c5e8-4808-4197-a38f-3f19d311a7ad', + twitter_handle: 'brandon_gentile', + }, + { + name: '@apollosats', + profile_picture: 'https://pbs.twimg.com/profile_images/1576946734927794176/2ail9FoU_400x400.jpg', + ref_id: '74f4280f-5fdb-4bbc-aee2-a2ed32d64372', + twitter_handle: 'apollosats', + }, + { + name: '@StackchainSig', + profile_picture: 'https://pbs.twimg.com/profile_images/1589791699571802117/n_Y1Qm7J_400x400.jpg', + ref_id: '6e652629-38ec-49d8-9f5c-3ba28f80c799', + twitter_handle: 'StackchainSig', + }, + { + name: '@TomerStrolight', + profile_picture: 'https://pbs.twimg.com/profile_images/1591960241008148481/HtyINxtU_400x400.jpg', + ref_id: '7af639f8-8c5c-4ce1-a43b-e8560ed40e2b', + twitter_handle: 'TomerStrolight', + }, + ], + hosts: [ + { + name: '@alexstanczyk', + profile_picture: 'https://pbs.twimg.com/profile_images/1539055022364708864/rwErK6x1_400x400.jpg', + ref_id: '6455df34-1abc-4ce8-9bb8-b02d411accec', + twitter_handle: 'alexstanczyk', + }, + { + name: '@pacificbitcoin', + profile_picture: 'https://pbs.twimg.com/profile_images/1570140686753619970/UFEnzSv5_400x400.jpg', + ref_id: 'f8268a26-9761-40c1-bdd6-dad9db44d032', + twitter_handle: 'pacificbitcoin', + }, + { + name: '@SwanBitcoin', + profile_picture: 'https://pbs.twimg.com/profile_images/1491428856858914820/aFlitvha_400x400.jpg', + ref_id: 'da3f56bf-9763-4389-a9ec-d807049bd0b8', + twitter_handle: 'SwanBitcoin', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/239722cb-4216-414a-a17b-5adf9d52e15a.jpg', + keyword: !0, + link: 'https://stakwork-uploads.s3.amazonaws.com/uploads/customers/2707/media_to_local/7cf57bdb-c905-46e3-a7e5-4c0bfd4f8d04/71c08fae-cce8-4600-ab9e-758420e78dcf.mp3', + node_type: 'clip', + pub_key: '029099ec31eb33594611dc47d5c93de2c1aa86918e3a36b408c14a500601c8bc9b', + ref_id: '639d4f31-2190-4fc2-a0dc-57cf53c3d97b', + show_title: 'Swan.com', + text: "a question. I got a question coming in. Wicked. Yeah, go ahead. This is coming in from text greg, I don't know how much longer we've got you for. That's why I wanted to get this to you before. I didn't mean to cut you off. But this comes from Sholey, and his question is, foss, I'm interested in your take on countries wanting to join the BRICS and move away from the US dollar for trade. Apparently this was a tweet from Kim.com, so please don't shoot me for the source, but apparently Russia has announced that twelve more countries are interested in joining the BRICS. What do you think about all this? Yeah, well, it's not hard to see the playbook, right? When you have your US dollar controlled reserve asset of the world, which is US treasuries, when that gets frozen and you need to call on it and you can't so I'm talking about Putin here. You look for alternatives. Now, Marty Ben here's a shout out to my friend Marty. He had an amazing publication on Friday, okay, calling the same thing, but says it won't be gold backed oil trades, it'll eventually be bitcoin backed oil trades. And that makes sense from my perspective of digital energy versus natural resource energy. And why sell valuable natural resource energy for US dollar fee when ultimately, rather than selling it for gold, which is a far better store of value than US dollars or US treasuries, but you could sell it for digital energy. As an engineer, I'm not a physicist, so there's some physicists that hate the fact that sailor, and maybe me, at times refer to bitcoin as digital energy. But I don't care. Understand? It's selling natural resource energy for digital energy is just about the smartest thing you can do in a closed loop energy frame. Okay? So one more shout out, I'll step down or try and shut up. So thank you, wicked for great input, Terence. Great input, aunt. Great input. And a shout out to one of your listeners that just reached out to me via DM. We want to talk some more about the big utilities in the US. Becoming bitcoin miners. It's the most logical step in the world. The energy guys know it. The ESG guys, they already have their heads shoved firmly up their ass, so they're not going to hear it. But people who manage the grid and manage energy understand that bitcoin and bitcoin mining is the perfect regulator, okay? With a switch, you can turn power up or power down your bitcoin miners, and you create incremental cash flow to defease capital expenditures, to building things like, oh, nuclear power plants. Because normally a nuclear power plant has a 20 year return on investment profile. And if you insert bitcoin mining in there, you can reduce that return on investment profile by at least one half, okay? And that's a meaningful adjustment to the capex that's required for building a core nuclear generator. So small nuclear modular reactors, big core nuclear reactors, it's what's going to really solve the energy crisis, people. And bitcoin is going to help with that. So don't overthink things. ", + timestamp: '01:11:11-01:14:33', + topics: ['BRICS forum'], + type: 'twitter_space', + weight: 25.360525131225586, + }, + { + boost: 0, + date: 0, + description: 'What will Bitcoin look like in a scenario of global adoption? ', + episode_title: 'Café ₿: #Bitcoin Fix the Money, Fix the World', + guests: [ + { + name: 'OrangePild', + profile_picture: 'https://pbs.twimg.com/profile_images/1608905201334845441/SHUsfTBW_400x400.jpg', + ref_id: '1c33ba0e-3e6b-41f6-aed4-5217aa534521', + twitter_handle: 'OrangePild', + }, + { + name: 'Neil Jacobs', + profile_picture: 'https://pbs.twimg.com/profile_images/1593645788978102277/UAQCQKeE_400x400.jpg', + ref_id: '0bc759e0-b055-4800-a79d-2b950fe5cc53', + twitter_handle: 'NeilJacobs', + }, + { + name: 'Dr. Jeff Ross', + profile_picture: 'https://pbs.twimg.com/profile_images/1475554600094552064/DSlPG1lx_400x400.jpg', + ref_id: '51a969bb-dbf7-4d20-b128-74dcc5f560f6', + twitter_handle: 'VailshireCap', + }, + { + name: 'Jason Brett', + profile_picture: 'https://pbs.twimg.com/profile_images/1591476397847060482/bNapBM4Y_400x400.jpg', + ref_id: '750a85f9-59f2-4627-817c-a437b65ee45e', + twitter_handle: 'RegulatoryJason', + }, + { + name: 'Tatum Turn Up', + profile_picture: 'https://pbs.twimg.com/profile_images/1600036563429343233/PXP0gxRj_400x400.jpg', + ref_id: '31824d8a-a2a6-434e-8d10-f0be1c2f8389', + twitter_handle: 'tatumturnup', + }, + { + name: 'Stackchain ⛓ Signal', + profile_picture: 'https://pbs.twimg.com/profile_images/1589791699571802117/n_Y1Qm7J_400x400.jpg', + ref_id: 'b0242af7-0d94-4551-ba25-a8b216b82fce', + twitter_handle: 'StackchainSig', + }, + { + name: 'Ross', + profile_picture: 'https://pbs.twimg.com/profile_images/1602431687564357632/57oH7beH_400x400.jpg', + ref_id: 'cdb90285-daa9-4dd2-b96a-78dd5e8ba468', + twitter_handle: 'theyoungrossco', + }, + { + name: 'BTC Sessions', + profile_picture: 'https://pbs.twimg.com/profile_images/1602307254937866240/CKiRrFui_400x400.jpg', + ref_id: 'e207ef16-44d1-40c4-929a-ea2736f60a94', + twitter_handle: 'BTCsessions', + }, + { + name: 'TC', + profile_picture: 'https://pbs.twimg.com/profile_images/1607590332925095937/6CTv4688_400x400.jpg', + ref_id: '083ddb42-c4a0-4360-8de3-6178e3b659ec', + twitter_handle: 'Meditation_Man', + }, + { + name: 'Tomer Strolight', + profile_picture: 'https://pbs.twimg.com/profile_images/1591960241008148481/HtyINxtU_400x400.jpg', + ref_id: '3a2bc97d-072c-4ed9-9a59-17ceeb68fe99', + twitter_handle: 'TomerStrolight', + }, + ], + hosts: [ + { + name: 'Swan.com', + profile_picture: 'https://pbs.twimg.com/profile_images/1491428856858914820/aFlitvha_400x400.jpg', + ref_id: '995b79e6-02fe-4395-8aa7-fdc000584e71', + twitter_handle: 'SwanBitcoin', + }, + { + name: 'PB23 😎 Pacific Bitcoin Festival', + profile_picture: 'https://pbs.twimg.com/profile_images/1570140686753619970/UFEnzSv5_400x400.jpg', + ref_id: '9dd05f7c-4891-440c-aa61-677a92e70a0f', + twitter_handle: 'pacificbitcoin', + }, + { + name: 'NICO⚡️', + profile_picture: 'https://pbs.twimg.com/profile_images/1513692277515997188/t5Ja3SFr_400x400.jpg', + ref_id: 'ccd52021-88cc-4e7d-9822-6eed5a169ca9', + twitter_handle: 'nico_lechuga', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/239722cb-4216-414a-a17b-5adf9d52e15a.jpg', + keyword: !0, + link: 'https://stakwork-uploads.s3.amazonaws.com/uploads/customers/2707/media_to_local/84e104dc-230e-40a7-9ec0-16c5a0d6873b/e7948dc4-eff7-4d6e-8ed2-80f524a8c494.mp3', + node_type: 'clip', + pub_key: '03c18d0c6c35333f22bc524e21a5fd1d2d9886f5d4d958dc1de95d025de5c84cfc', + ref_id: '1171938e-b754-45ff-958d-ca89aa3ab235', + show_title: 'Swan.com', + text: "Ross, you have your hands up. Thanks to ross, you have your hands up, and then we're going to wrap it up. Yeah, thanks for letting me speak. I want to ask a question to the experts here that have been around longer than me. My reason for asking the question is actually someone in my twitter feed asked the question. They said, construct a sentence that would really piss off a bitcoiner. And I constructed one so well that I would like to know the answer to my own question. So, what I wrote is, assuming 10 billion people in the world and an absolute global adoption of Bitcoin, if every single person in the world wanted to make a single layer, one transaction just multiplying out 2500 to 3000 transactions per block times, hours, years, et cetera. It would take somewhere between 60 and 70 ish years for one person, for each person in the world to make a single transaction on layer one. So with that and the ultimate vision of bitcoin being the kind of global reserve asset and understanding, there's more layers like lightning and possibly even layer three, et cetera, that will come in time, what do you guys see as the, I guess, endgame of the landscape of what bitcoin would look like in a global adoption scenario? Let me ask you something. So most transactions right now are through debit cards, credit cards, electronic transfers. What layer do you think that is in the traditional? Well, I would say it's layer three at least, if not higher. It's layer three. Right. So how long has that system been around? Like 50 years, give or take? Exactly. It's been around for 60 years. Bitcoin's roughly a decade and a half old. Decade and change. Right. I think lightning is a great solution, but I still think that it needs a lot of work. I think there's so many awesome projects that are being worked on, and I think that we will find a solution to the problem that you're talking about. And that was a very big component of the block size for us. Right. We must, and I'm aware of that history too. But the thing is, even with a. Smaller block size, it still can't like every blockchain is too slow for global layer one transactions per person. Eventually. I think that's where layer two is going to come in. There's been speculation that the blocks are going to be filled. That's been said for the last five years or so. That still hasn't been the case. There's been times where the men pool gets cleared out. So I mean, like, I don't know, man. I think Tomer actually was talking about this yesterday. I think that it could potentially be a problem in the future. But I think where we are now, we have much bigger, clear and present dangers in front of us. And I think that's what Jason was really talking about today from the regulatory perspective. And I think that's really where my worry is. That that's really where my concern is in terms of scaling. Yes, I agree. I think that what's the Lightning Network capacity right now? It's $89 million. That's not a large amount in a global sense. Obviously there needs to be more. But if you look back and see how far we've come, I remember when the Lightning Network first became a thing, people were like, no, this isn't going to work. Right? And the fact that we've come from zero dollars to eighty nine million dollars lighting network capacity, I think is a massive deal and I think it's just going to continue to get bigger and better. Maybe that's the optimist to me. I have no idea. I don't know if Dr. Ross, Neil or Tomer, Jason, any of you guys want to chime in on that? TC yeah, I mean, my answer can be slightly adapted from the one you were referencing that I made yesterday. It's like we will cross that bridge and the bridges that lead to it as we come to them. There's so many different ways that we can scale this technology as demand increases for utilizing it. And what tends to be the surprising thing is many ways, just do nothing and let people figure out how to use it more efficiently. There were all these people who were clamoring for bigger blocks through a hard fork and we kept the blocks small and people figured out how to cram a lot more transactions. So that now the calculus that you're doing is, oh, there's 2500 to 3000 transactions per block, not 1000 transactions per block, which is what we were seeing beforehand. And there's so many different things that will be developed in cryptography. In fact, the fact that Schnor's signatures exist right now with cross signature aggregation can make transactions so much smaller. And of course there's all these other layers. So give a time. Like all technologies that you've seen before, they look like they're not going to work for the whole world. Early on. I don't know how old you are, but if you were here for the early days of the Internet, you could barely get a JPEG through the thing in. 15 minutes. And so it looked like it wouldn't scale. And I remember a couple of decades ago there being some fun about the Internet, that there's only so many addresses that would go around and so wouldn't the Internet fail in a few years time as more and more people came on? And of course, we've engineered a way around all these things. So I think especially when you're dealing with technology that's immaterial in its nature, that's non physical, that's purely digital, there are so many different ways to scale it that it won't end up being a concern. There will be many concerns along the way, but they will all be solved and surmounted. ", + timestamp: '02:02:51-02:08:46', + topics: ['Bitcoin Adoption', 'Hyperbitcoinization'], + type: 'twitter_space', + weight: 25.169692039489746, + }, + { + boost: 0, + date: 1671644776, + description: 'Crowdfunding for different Bitcoin communities using Geyser', + episode_title: '#Bitcoin Creators Space', + guests: [ + { + name: '@DecouvreBitcoin', + profile_picture: 'https://pbs.twimg.com/profile_images/1362747604044566530/Invedmre_400x400.jpg', + ref_id: '0eda190b-4373-41fc-bc28-c3b95af30949', + twitter_handle: 'DecouvreBitcoin', + }, + { + name: '@Bridge2Bitcoin', + profile_picture: 'https://pbs.twimg.com/profile_images/1533812215198924800/vAAlVRxO_400x400.jpg', + ref_id: '1aaf2c24-8d26-4038-b55a-8b94427b20c7', + twitter_handle: 'Bridge2Bitcoin', + }, + { + name: '@orangepillapp', + profile_picture: 'https://pbs.twimg.com/profile_images/1570918965601505282/SOApRCif_400x400.jpg', + ref_id: 'ba5b79b4-e2e7-4778-8879-df793b8420a4', + twitter_handle: 'orangepillapp', + }, + { + name: '@knutsvanholm', + profile_picture: 'https://pbs.twimg.com/profile_images/1586261395833774081/RQ8SYxiM_400x400.jpg', + ref_id: 'e12ebe66-706b-40d2-804a-861a4c79bbfa', + twitter_handle: 'knutsvanholm', + }, + { + name: '@bcvFoundation', + profile_picture: 'https://pbs.twimg.com/profile_images/1460813196902633476/edbNgO7y_400x400.jpg', + ref_id: 'd65bc3c3-cdd7-4539-8cb9-6a8d86f580c8', + twitter_handle: 'bcvFoundation', + }, + { + name: 'Christopher', + profile_picture: 'https://pbs.twimg.com/profile_images/1345072452775370754/cBVFzpkV_400x400.jpg', + ref_id: '7dacb545-925d-4201-9b9c-869d992dcdb3', + twitter_handle: 'Chrissuccess', + }, + ], + hosts: [ + { + name: '@steliosats', + profile_picture: 'https://pbs.twimg.com/profile_images/1495784740921786371/a73Qu4HR_400x400.jpg', + ref_id: '7eed8e35-f762-4882-adf9-b45ad16c3c54', + twitter_handle: 'steliosats', + }, + { + name: '@geyserfund', + profile_picture: 'https://pbs.twimg.com/profile_images/1554429112978120706/yr1hXl6R_400x400.jpg', + ref_id: '02a48cf4-58d0-4014-803c-9120dedeec52', + twitter_handle: 'geyserfund', + }, + { + name: 'UKNOWN', + profile_picture: 'https://pbs.twimg.com/profile_images/930811252665933826/2cVZF58S_400x400.jpg', + ref_id: 'bcd18bb0-8224-4f6b-af71-e16120ae4323', + twitter_handle: 'NodedPodcast', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/c9bb5d58-c781-464d-878a-8b6c469ba198.jpg', + keyword: !0, + link: 'https://stakwork-uploads.s3.amazonaws.com/uploads/customers/2707/media_to_local/b18df9d2-d034-4e1f-bcd1-d70b30fe9059/506355bc-c119-4f18-bf0b-abe9be8c17d6.mp3', + node_type: 'clip', + pub_key: '029099ec31eb33594611dc47d5c93de2c1aa86918e3a36b408c14a500601c8bc9b', + ref_id: '70cd556c-8349-4f80-b276-4c0056b46536', + show_title: 'Geyser 🌊', + text: "so we have people in Africa and I think possibly Asia. But yeah, we have again, we have I think in around three days, we had 30 new projects being created on Geyser using this Lightning address feature, which is pretty big deal. We have you really need six clicks to create a project on Geyser. It's pretty seamless. And we had quite a lot of educators create projects on Geyser. We had Bitcoin community in Honduras, bitcoin in Hausa, Nigeria, and also we just heard from BCB based in Ghana as well, bitcoin, Essex, UK, and Orange Pill Yosemite, which is in California. So really featuring four different continents. These are micro communities. These are little micro communities that are focused on meetups focus on orange Peel in the community, raising funds for supporting education initiatives that are pretty small scale but nonetheless importance. Again, Bitcoin is a grassroots movement, and so what these creators are doing is that they're setting up these super micro, grassroot level initiatives to get support from the community and create their own community on Geyser. Again, Geyser is, yes, a crowdfunding platform, but it's really a place where people can come together to support common causes and support getting shit done. You have an idea and you get some people together, some people throw in new ideas, some people throw some money, some people throw resources. And so gather should be seen a little bit more widely and we will soon have more features to enable these types of feedback loops and conversations. ", + timestamp: '00:17:16-00:19:06', + topics: ['Bitcoin', 'crowdfunding', 'Geyser'], + type: 'twitter_space', + weight: 55.39905291682817, + }, + { + boost: 0, + date: null, + description: 'About ApolloSats: P2P reviews for Bitcoin related products and services', + episode_title: 'Café ₿: #Bitcoin News & Trusted P2P Reviews w/ @Apollosats', + guests: [ + { + name: '@2140data', + profile_picture: 'https://pbs.twimg.com/profile_images/1598330787778232320/ZVFcRtet_400x400.jpg', + ref_id: '190b5001-a42a-46cc-b0d3-b6f74c625648', + twitter_handle: '2140data', + }, + { + name: '@FossGregfoss', + profile_picture: 'https://abs.twimg.com/sticky/default_profile_images/default_profile_400x400.png', + ref_id: '09913e9b-38dc-4465-9d4d-ae0c9ba9eeca', + twitter_handle: 'Fuckkkk', + }, + { + name: '@w_s_bitcoin', + profile_picture: 'https://pbs.twimg.com/profile_images/1594796869233811474/g0_ZRshz_400x400.png', + ref_id: 'b178b239-3b18-4a16-9d43-c5d15ba6f7f4', + twitter_handle: 'w_s_bitcoin', + }, + { + name: '@NeilJacobs', + profile_picture: 'https://pbs.twimg.com/profile_images/1599432572727169025/NSoPdchB_400x400.jpg', + ref_id: '4b6997e1-ce0b-4a1d-90e7-dbaccef4b783', + twitter_handle: 'NeilJacobs', + }, + { + name: '@brandon_gentile', + profile_picture: 'https://pbs.twimg.com/profile_images/1561369452284895236/-8WgdwEm_400x400.jpg', + ref_id: 'f940c5e8-4808-4197-a38f-3f19d311a7ad', + twitter_handle: 'brandon_gentile', + }, + { + name: '@apollosats', + profile_picture: 'https://pbs.twimg.com/profile_images/1576946734927794176/2ail9FoU_400x400.jpg', + ref_id: '74f4280f-5fdb-4bbc-aee2-a2ed32d64372', + twitter_handle: 'apollosats', + }, + { + name: '@StackchainSig', + profile_picture: 'https://pbs.twimg.com/profile_images/1589791699571802117/n_Y1Qm7J_400x400.jpg', + ref_id: '6e652629-38ec-49d8-9f5c-3ba28f80c799', + twitter_handle: 'StackchainSig', + }, + { + name: '@TomerStrolight', + profile_picture: 'https://pbs.twimg.com/profile_images/1591960241008148481/HtyINxtU_400x400.jpg', + ref_id: '7af639f8-8c5c-4ce1-a43b-e8560ed40e2b', + twitter_handle: 'TomerStrolight', + }, + ], + hosts: [ + { + name: '@alexstanczyk', + profile_picture: 'https://pbs.twimg.com/profile_images/1539055022364708864/rwErK6x1_400x400.jpg', + ref_id: '6455df34-1abc-4ce8-9bb8-b02d411accec', + twitter_handle: 'alexstanczyk', + }, + { + name: '@pacificbitcoin', + profile_picture: 'https://pbs.twimg.com/profile_images/1570140686753619970/UFEnzSv5_400x400.jpg', + ref_id: 'f8268a26-9761-40c1-bdd6-dad9db44d032', + twitter_handle: 'pacificbitcoin', + }, + { + name: '@SwanBitcoin', + profile_picture: 'https://pbs.twimg.com/profile_images/1491428856858914820/aFlitvha_400x400.jpg', + ref_id: 'da3f56bf-9763-4389-a9ec-d807049bd0b8', + twitter_handle: 'SwanBitcoin', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/239722cb-4216-414a-a17b-5adf9d52e15a.jpg', + keyword: !0, + link: 'https://stakwork-uploads.s3.amazonaws.com/uploads/customers/2707/media_to_local/7cf57bdb-c905-46e3-a7e5-4c0bfd4f8d04/71c08fae-cce8-4600-ab9e-758420e78dcf.mp3', + node_type: 'clip', + pub_key: '029099ec31eb33594611dc47d5c93de2c1aa86918e3a36b408c14a500601c8bc9b', + ref_id: '7c3d3625-4308-437e-80bb-38fb8b2a678c', + show_title: 'Swan.com', + text: "want to welcome up Apollo and Julian from Apollo. So, Apollo, just a really quick intro. If I understand it right, they're building the first review site, leveraging sets, and you log in with lightning. So basically, you get to review the products you love, find companies you trust, and earn bitcoin. Julian, good morning. Welcome. Talk to us about what you're doing and why are you doing it, and then maybe we can open it up for some questions, if you like. Sounds good, Alex. Yeah, thanks so much for having me, and, yeah, I really enjoyed the conversation this morning. Sorry to interrupt the crucible, but I think it's actually a pretty great segue into talking about what we do at Apollo, which is finding the truth right, through the contest of ideas and context of information. So, yeah, you gave a really great intro. Basically, we are a marketplace for user reviews of bitcoin products and services, and the idea is pretty simple. We wanted to build somewhere for bitcoin is to educate other bitcoinrs about not only what products and services exist in the space, but also how to compare them and what basis. And we felt that that was kind of missing in the space and probably needed to just help adoption, which is the mission we started the company on the basis of, hey, we want to do whatever we can to help bitcoin adoption. It's the most important thing we could be spending our time on. And in the process of doing that, and I can talk a little bit more about that. Of what we learned from one of the biggest challenges to work on bitcoin adoption, we realized that we kind of needed something like this, which was we needed somewhere that we could send new bitcoiners who just wanted to start the process of going down the rabbit hole. So, yes, pause there, but happy to take any questions. I love it. That is the mission. I agree. What I'm excited about is I'm starting to see a lot more of this kind of direction where people are recognizing that is the mission increasing adoption as much which is possible. Let's go ahead and open it up. If anybody up here on the panel has questions for Jillian, go ahead. And if you're in the audience and you have questions about what these guys are doing and how it works and all that kind of stuff, you can request to come up. You can ask questions in Telegram if you like. Tmecafetcoinclub, I've got a question. So to use this service, I'm assuming you have to run your own Lightning network node, is that right? You don't have to, no. So you can sign up in a few different ways. You can just sign up with an email address or with your Twitter account, or you can log in with Light. But for now, on the infrastructure side is pretty straightforward. Like we just kind of run our own we're not running a node yet ourselves, but we just have our kind of own internal Sachs ledger, maintaining everybody's account balances. And we will send SATS to whatever address that users have on their end. Got it. Cool. So you can hook it up with like a Wallet of Satoshi account or whatever, something like that, you're saying? Yeah, exactly. So Wallet of Satoshi or Zebony account, I mean, a lot of people are using kind of Lightning addresses, like ball toll addresses for the first time, which is really cool to see. But yeah, whatever Lightning address you have spin line up, send it to us and we'll send you Sat. How do you know the reviews are legit reviews and not just someone trying to accumulate Sat? Yeah, it's a great question, to be honest. And it's the best one we're focused on that happen from day one. And there are a couple of answers, right? Like one is in the longer term, what we're building is a marketplace that run like a market, right? And the idea is it's a market for information. So we want the best, most reliable reviews to organically surface to the top and the way that that is going to happen. And what we're building is that there is a system of incentives between these two sides of the marketplace, right? Reviewers on the one hand and readers of reviews on the other. That allows for that. Right. So how can that happen? Well, basically reviews after they're written and we publish them, and I'll talk a little bit about the moderation that we do before we actually publish, but after they're published, they can be uploaded and kind of similar to stack and use, if you guys are familiar with that. Basically every upvote is actually, in effect a transaction, right? So you have users sending SATS from their account to the author of a review to upload that review. So the idea is people vote with SATS on what is most helpful, most reliable. And so if the market works effectively, then the best reviews, most helpful reviews are going to rise to the top. That's what we're kind of building for the longer run. Now, obviously in the short run, we need to do some things to bootstrap that market and also put up some guardrails to obviously make sure that people aren't gaming the system, which certainly they are trying to do already. Right? So we have a few things that we do upfront to filter for spam and other kind of obvious bad actors that are going to come in and just try and publish a bunch of reviews and earn as many stats as possible. But you end up again. So if you got a follow up, yeah, I got a couple of other ones if no one else wants to go. So is it going to be bitcoin only companies because I see or bitcoin only things because I see Anthony Pompeano's newsletters on here, clearly like he's a controversial person. So I'm just curious if you guys are how you decide what companies get to go on here or newsletters or whatever. Yeah, so short answer is yes, bitcoin only. Like that's the mission. It's bitcoin adoption. And specifically it's like we want to educate bitcoin is and help bitcoin is educate each other. And so the mission is bitcoin only. The products are almost entirely bitcoin only, except where I would say for a couple of instances, right? One is where there's some just overlap between bitcoin only products and crypto stuff. Like there are exchanges that we want people to review that obviously have bitcoin and crypto and maybe some newsletters or other content pieces or wallets or whatever the case may be. It's obviously relevant for us to let people educate each other on those products, even if they're not bitcoin only. So that's one instance of where they overlap. When it comes to things. Julian, don't you think that's a little conflicting, just a little bit? I mean, first you say bitcoin only, but it's bitcoin only except when it's not coin only. I know there's a lot of bitcoinners are going to take issue with that. And if what you're trying to do is increase bitcoin adoption, giving any kind of platform for something that's distracting people into bullshit is maybe that's I just know there's a lot of bitcoin is going to have an issue with that. And I know right now, Julian, I see like the Pump newsletter has an awful rating on your site. So I'm assuming mostly bitcoiners are the only ones kind of going on here right now. But what happens when he or a bunch of crypto people find this site, right? Then it just becomes a review site. Yeah, well, so a couple of things, right? One is at the moment, because we're so early, we're running a bunch of little experiments, right? So we don't really know how this is going to play out. So we've got the pop newsletter on there. We put the bankless newsletter on there too. Right. And part of that was to see how are people going to respond. And pretty much all of our users right now are bitcoin only users from what we can tell. And the results have been whether it's for those newsletters or for like Coinbase or other crypto exchanges. Right. Many of the reviews coming through, a lot of them are kind of nuanced and are actually bitcoin is telling. Other bitcoin is like, hey, this is an exchange that if you really have to use it as your first place to buy bitcoin, you can do that. But get your coins off exchanges, find an alternative. Like people are writing reviews, for example, of Coinbase saying like, hey, don't use this platform, go and use Swamp instead. And the reason why I think it actually is important to have all of this information at people's disposal is because people have these questions, they are going to find out coinbase is going to be top of mind for them. So we want to build somewhere where people can, I guess, do a bit of self directed learning, learn from bitcoin is who have been through these on ramps, have been through these experiences and are going to be able to answer the questions that I think people are going to inevitably have. Does that answer the question? No, but I'll let Neil go. Well, yeah, and that's kind of like a shameless plug. But are you going to be adding bitcoin merch and apparel companies? Because I would love my company to be on it. Sure, yeah. We're taking recommendations on constantly on categories, products and it's to some degree like demand driven. Obviously we're not going to put anything that people just request up there, but yeah, shoot me a note and we'll add it to the list of things to consider. Sure, I'll dare so. I just want to reiterate, I mean, I'm not going to beat a dead horse, but I would suggest to you, Jillian, to consider that you don't have non bitcoin things on there. And the reason why I say that is you use the term get on the mission and that's start or you use the term the mission, I say get on the mission. But this concept of on being on the mission, of bitcoin adoption is starting to permeate through the interwebs a little bit. And I would just suggest be careful about that because like anything that you're doing to give a platform to something that's going to draw people off mission, what I call being on the mission and what I think a lot of other bitcoinners agree is on the mission I think is going to be looked at in the long term. I think you're going to see that that was a mistake. When you say things like, well, we're doing a bunch of experiments. Like what it sounds like to a bitcoin? Or is you're experimenting to figure out where you're going to make the most money? This is very fiat mindset, in my opinion. It's very much like opens you wide open to being sponsored by shitcoins. And that's not a good place to be, man. Yeah, I see you're right there. That we absolutely do need to stay focused. And we will. And I guess to that end, we have some principles that we're sure very firmly aligned with. One is we know that ultimately whatever we are doing is in service of that mission of increasing Bitcoin adoption. And so we're open to feedback and changing what we list, how the incentives work, everything else along the way, and we certainly will be. The other thing too is we're just not going to do certain things that you might ordinarily see with some other types of companies in this category. Right. So we're not going to be running ads, we're not going to be taking sponsorships from companies. There's not going to be any pay to play or like affiliate linking or anything like that. Really what we're building is okay, let me ask you a question then. The way the system works, if I'm understanding it correctly, is people boost with SATS, who gets the stats? If you write a great review and other users are sending you stats because they find it helpful, all of those stats go to you. Okay, but then how do you make money? Well, right now we don't. Right. We're a startup. What's the business model? How do you intend to make money? Well, so there are a couple of potential ways we can. Right. So what we're trying to do is build this marketplace that is a meeting place for potential users of products, people who have used them, and then the companies themselves. And so we want to be able to mediate a really great high signal conversation between these three sides of the marketplace. And so we think that that's going to generate a lot of value not just for users of people who review them, but also the companies themselves. I get the concept, but what I'm asking you is how do you make money on that sort of triumvirate of people talking to each other and creating this marketplace of ideas? Yeah. So one way that we could is partnering with companies directly in a transparent way. So if Swan or anybody else is talking to users on our platform and we're providing this meeting place for great quality conversation, then we can have companies that could potentially use that. Okay, so this is my point. This is what I'm getting at. What if that company that comes to you and offers you that sweet, juicy, lucrative deal, what if it's Sam Bankman Freed, and he's like, hey Julian, I'm going to give you $100 million if you help us out here. Well, the short answer is like, we're just not going to do that because it would so obviously undermine the integrity of the platform that it just wouldn't be I appreciate the hypothetical, but it would just be so contrary to what we're trying to do that it's just not something that is realistic for us. All right, cool. I hope time proves that out. Okay, we're very close to the end of the show. We've got time for maybe one or two more questions. We'll give you some time to make some closing comments, Jillian, and then we'll move to wrap. Go ahead. Wicked. Yeah, kind of. In summary and you can correct me if I'm wrong here, but it sounds like you might allow reviews to be written about companies that are crypto friendly or crypto curious. But in the long run, you don't plan to ever partner with those companies, and you plan to stick with only bitcoin, only companies that you may generate revenue from in the future. Is that correct? That's right. Yeah. We are a bitcoin only company for bitcoiners and bitcoin only companies. And to the extent that there's going to be any information on crypto products on our website, it is specifically for the purpose of steering bitcoins away from them. And so that will be borne out both by the content we produce and have on the platform. And also, I'm assuming, from what other bitcoin is going to help other bitcoin learn about as well. I would just, like, make one last thought. I mean, this is your company, obviously you run it the way you like, but the whole steering away thing, you're actually just giving them a platform that potentially will cause them to lose a lot of money. And my observation is that when people get burned, they figure that shit out on their own. They don't need to be led down these pathways where they might go look at this stuff. That's just my opinion. Let's go with simplest and then we're going to give you a few minutes to make closing thoughts, Jillian, and then we'll wrap. Go ahead, simplest. Hey, thanks so much. Yeah, a quick question because I'm just aware of the dynamics of how you keep these sort of platforms, these review platforms, honest. And I've always kind of wondered, like with Yelp and everything, just how they do that. And in your case, and regarding the point that Alex is making about the crypto so called curious companies is how do you prevent down the road? Like, if those companies become aware once you grow big enough to really be having an impact in the market, what if they use their armies of whatever to be coming in and just giving themselves glowing ratings? And like, I understand you have some measures in place, but when that becomes overwhelming and if there's a few of those companies or a number of them, how do you prevent them from providing millions of five star reviews to themselves, so to speak? Yeah, that's a really great question and so there are a couple of different ways that we can address that in the short term and then longer run it's going to be more of an engineering challenge, but it's certainly on our minds, right. In the kind of short to medium term, what we're going to do is implement basically a cost to posting. So right now we're kind of bootstrapping the marketplace by rewarding people just for posting reviews and sending them sentence of doing that. We want to get to the point where people are actually willing to pay a small fee to actually write and post their reviews and so on. Like a small scale. We think that's going to disincentivize people just costlessly attacking us with that information right at a small scale. But your question about how do we disincentivize or just prevent large scale attacks like that, then things get a little bit more sophisticated. But there's a really interesting concept called a web of trust, which is a way of basically preventing this kind of class of civil attacks on information platforms. Won't go into the details, but essentially you can implement a range of preventative measures where you can make the cost of posting scale exponentially. For people who are posting a lot in a short space of time. You can do a whole bunch of things where we can identify sophisticated attackers and impose basically a big enough cost so that it's not actually economical for them to engage in that behavior. ", + timestamp: '01:48:01-02:07:24', + topics: ['ApolloSats', 'P2P reviews'], + type: 'twitter_space', + weight: 21.470260620117188, + }, + { + boost: 0, + date: null, + description: 'The Bitcoin Village project in Nigeria', + episode_title: 'The Orange Sun ☀️ #Bitcoin News and Talk', + guests: [ + { + name: 'Portland Hodl', + profile_picture: 'https://pbs.twimg.com/profile_images/1562306406526492672/LiqmI9NS_400x400.jpg', + ref_id: '530aba21-392f-4156-9e91-4fc5c76fced1', + twitter_handle: 'PortlandHODL', + }, + { + name: 'Miykael Woodward', + profile_picture: 'https://pbs.twimg.com/profile_images/1473433558475689985/CM0o3oWu_400x400.jpg', + ref_id: '6fe02a78-4f07-47e7-8e64-b278a3167835', + twitter_handle: 'MiykaelWoodward', + }, + { + name: 'Okin Mobi', + profile_picture: 'https://pbs.twimg.com/profile_images/1518945775685967873/O0wPrIKO_400x400.jpg', + ref_id: 'bbd18918-7758-4bdb-b9a5-641bf92748a6', + twitter_handle: 'OKIN_17', + }, + { + name: 'TK☣️Ph.Ple₿', + profile_picture: 'https://pbs.twimg.com/profile_images/1505791887415730177/d0YDQ3Xc_400x400.jpg', + ref_id: '9e3ffa2c-9410-48e9-a726-8312c0abcd7c', + twitter_handle: 'ToxiKat27', + }, + { + name: 'Funsho Jimoh', + profile_picture: 'https://pbs.twimg.com/profile_images/1600143435775856641/uqgmtT23_400x400.jpg', + ref_id: 'a237ffb0-792b-484e-b12f-65a2b679eaf1', + twitter_handle: 'fnicencool', + }, + { + name: 'prince ogbonna', + profile_picture: 'https://pbs.twimg.com/profile_images/1595693872637681664/TeWJzTut_400x400.jpg', + ref_id: '0b0c70b1-23b1-4d98-b259-6dbb67b7481d', + twitter_handle: 'princejoj0', + }, + { + name: 'The Bitcoin Village', + profile_picture: 'https://pbs.twimg.com/profile_images/1544318244789649410/kQ2G1MCE_400x400.jpg', + ref_id: 'd894aca4-36f6-4821-a00b-a4e860b19502', + twitter_handle: 'VillageBitcoin', + }, + { + name: 'Masterguantai', + profile_picture: 'https://pbs.twimg.com/profile_images/1521025685078302720/w9dZwehS_400x400.jpg', + ref_id: '29baf525-42eb-41a6-98f9-a0d6b4480af0', + twitter_handle: 'MasterGuantai', + }, + ], + hosts: [ + { + name: 'Jeremy Garcia', + profile_picture: 'https://pbs.twimg.com/profile_images/1589056396816896001/dslbBQSX_400x400.jpg', + ref_id: 'e5e68f75-d71a-4477-ae9a-6a891f2d84d0', + twitter_handle: 'Jerimican5445', + }, + { + name: 'Satoshi’s Journal', + profile_picture: 'https://pbs.twimg.com/profile_images/1598641632601047042/qrZMP5Oy_400x400.jpg', + ref_id: 'd977ed11-09b0-4143-828d-582ecb8b58ca', + twitter_handle: 'SatoshisJournal', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/9b2e17f2-71c5-4f1e-a3e7-720d06dab810.jpg', + keyword: !0, + link: 'https://stakwork-uploads.s3.amazonaws.com/uploads/customers/2707/media_to_local/bef977d0-8a6a-441b-a8cb-58baebe2bfd7/b9ec2918-1059-48ac-b5ee-69018c42a07c.mp3', + node_type: 'clip', + pub_key: '03c18d0c6c35333f22bc524e21a5fd1d2d9886f5d4d958dc1de95d025de5c84cfc', + ref_id: '6cbed027-125f-454c-b03a-865df0b60d36', + show_title: 'Satoshi’s Journal', + text: "intent of the village was, of course, first and foremost to have a school that we could educate that village about Bitcoin and then bring the plebs along as we build it so that they can see the proof of work. And using Satoshi's Journal, the media company, as the videographer, so to speak, as the media, we can bring that to you live from Nigeria. So it's actually a really cool way to be able to have the pleb, see what we're doing in real life, and then along the way, if donations want to be donated, so be it. And we're already seeing that, so we will document the whole thing all the way up from the foundation to final erection, to the ribbon cutting, to the first graduates of Lightning Development Academy, to you name it. It's going to be basically old, and I plan on when we die, we hope that there's many, many more schools built like this, and we plan on building more because we know that in the future, we will be, with the help of the plebs, educating the future businessmen and women of the world. And we're living a small snippet of a Bitcoin standard, and if we can instill education in this village in the form of what money is and what Bitcoin is, bitcoin being the best money ever known by man, we are basically allowing them to have a bright future. And I've told Olu and our team that we don't know what's going to happen in the future with what we're doing, but I'm confident that what we're doing and what all you guys are doing as plebs in your respective areas on an individual basis, you can move a mountain, so to speak. So don't ever underestimate what you can do as an individual. Yeah, so that's ", + timestamp: '02:48:50-02:51:13', + topics: ['The Bitcoin Village', 'Nigeria', 'Bitcoin Adoption'], + type: 'twitter_space', + weight: 19.850265502929688, + }, + { + boost: 0, + date: null, + description: 'Immutability of the Bitcoin consensus code ', + episode_title: 'Café ₿: Sovereign Computing w/ Matt & Aiden, Start9', + guests: [ + { + name: 'Andrew', + profile_picture: 'https://pbs.twimg.com/profile_images/1465763053014859786/xYFN2czJ_400x400.jpg', + ref_id: 'ae4b13f8-0ee7-480a-b47a-82b967ad7a79', + twitter_handle: 'AP_ArchPublic', + }, + { + name: 'Matt Hill', + profile_picture: 'https://pbs.twimg.com/profile_images/1347317316057321474/ieMjzK3x_400x400.jpg', + ref_id: '3576ad28-a04d-4388-865b-3ec5114c4f9f', + twitter_handle: '_MattHill_', + }, + { + name: 'Lauren', + profile_picture: 'https://pbs.twimg.com/profile_images/1586022214901501952/U1dRyCxP_400x400.jpg', + ref_id: '7f14bbf5-a60b-496b-a361-3663cf120299', + twitter_handle: 'LaurenJauregui', + }, + { + name: 'Aiden McClelland', + profile_picture: 'https://pbs.twimg.com/profile_images/1470160097225498624/0BjKB_2W_400x400.jpg', + ref_id: '04ddd9d4-9329-4e6c-aaa3-d65ea4a9342a', + twitter_handle: '_dr_bonez', + }, + { + name: 'Peter', + profile_picture: 'https://pbs.twimg.com/profile_images/1581695667193643009/EljNY-TH_400x400.jpg', + ref_id: 'a3384925-e15e-421d-b9f9-6d44e273ed05', + twitter_handle: 'PeterAnsel9', + }, + { + name: 'Lisa', + profile_picture: 'https://pbs.twimg.com/profile_images/1541581547815436288/Li8wORWt_400x400.jpg', + ref_id: 'e6f0c6e3-3237-4b13-878f-bb740cd32f8d', + twitter_handle: 'lisa_hough_', + }, + { + name: 'Isabelle', + profile_picture: 'https://pbs.twimg.com/profile_images/1466874333410717698/WRQh2-_m_400x400.jpg', + ref_id: 'c8df253f-47b3-465e-878e-8405c01c090d', + twitter_handle: 'isabelfoxenduke', + }, + { + name: 'Tone', + profile_picture: 'https://pbs.twimg.com/profile_images/1416821178266787844/T1OkI9ZW_400x400.jpg', + ref_id: '5729ac07-51d6-4268-b585-62680c846acb', + twitter_handle: 'ToneVays', + }, + ], + hosts: [ + { + name: 'Alex Stanczyk', + profile_picture: 'https://pbs.twimg.com/profile_images/1539055022364708864/rwErK6x1_400x400.jpg', + ref_id: '3126e2a3-bbe4-456b-b298-9714085fa286', + twitter_handle: 'alexstanczyk', + }, + { + name: 'Derek', + profile_picture: 'https://pbs.twimg.com/profile_images/1598322677827207169/Cw0A3oOP_400x400.jpg', + ref_id: 'f441b996-7eeb-4210-b24c-fa011161709d', + twitter_handle: 'derekmross', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/239722cb-4216-414a-a17b-5adf9d52e15a.jpg', + keyword: !0, + link: 'https://stakwork-uploads.s3.amazonaws.com/uploads/customers/2707/media_to_local/0ec4a941-250c-4e1d-8d2a-6c506c3ba4b2/4bd8010d-b2fd-41b4-8041-8a953ef06492.mp3', + node_type: 'clip', + pub_key: '02574d6e8e787372184b6f17c40d6c6fe1777db9015801f95dfd24692784d767cd', + ref_id: '2a3ee0fe-bcfc-412d-b1ee-2ba7f72528bd', + show_title: 'Swan.com', + text: "something that's probably important to bring up for people who are brand new and they're listening to this and they're new to bitcoin. They're trying to figure all this stuff out. Bitcoin is always say, well, you can't change bitcoin it's mutable. Like there's no small group of people controlling it. You can't change it. Right? I think that deserves a bit of explanation, because some people are going to be listening to this, going, look, you just changed it. Does somebody want to take a shot of this? Tom or go ahead, please. Yeah. The consensus rules of bitcoin remain completely unchanged. This reference client offers new interface features and spending preferences that make certain things that were harder to do before easier to do, or certain things that were toggled off before toggled on by default now. And that's what happens in 90% of these releases of bitcoin core. It's like support for having multiple wallet files, support for enabling, replaced by fee transactions by default. This feature, which I haven't really looked into, that I guess allows you to spend the entire contents of a wallet without change or something. I'm not sure what this feature does yet. So these are new features that keep coming out from time to time, and occasionally some API call. Again, nothing to do with the consensus algorithm will get retired or replaced by something else so that it works better, or bugs are resolved where interface issues happen. But the actual operation of bitcoin itself remains unchanged, which is why only three or 4% of people are running this new release right now. And there's no incompatibility there's no one getting all this. Block was okay for version 24, but it wasn't okay for version 23, or vice versa. The same rules apply, the same spending rules for each transaction. The same consensus rules for each block remain completely unchanged. Any attempt to change those things is known as a soft fork or a hard fork. Hard forks don't happen in bitcoin, so they're soft forks. And these are very infrequent things. And if there was one in the works, everyone here would know about it. They're widely discussed, and they must be adopted by all minors, and they generally also need to be supported by all clients or an overwhelming majority of clients. Soft forks are somewhat backwards. They are backwards compatible, so that even if not everybody upgrades, everyone will remain in perfect consensus that the state of the chain is valid. But the miners almost can check for the new rules that come with software. So I'll kind of stop there because I'm already maybe over complicating a little bit of what your question was. I thought that was a pretty good explanation. I like to keep it even dumber, but I think that was pretty good for me. I always go back to the monopoly board analogy because I think they're just easy. Maybe I could offer one other little explanation that I hope will keep it easy but paint a big picture for people. Bitcoin core is the piece of software known as the satoshi client, and it's a piece of software that was first launched, that bitcoin launched on, and it does everything that bitcoin does. It allows someone to mine, it allows someone to create a wallet. It allows them to secure the wallet. It allows them to create transactions and receive transactions to that wallet. It does everything that the bitcoin ecosystem does. It's the reference client. And so it is bitcoin, and it establishes the peer to peer network. Like, if you run it, it connects it's the note, it creates a copy of the blockchain, it stores a copy of the blockchain. It does everything that you've ever heard that bitcoin does. And it is a very tight piece of software. But as it ages, the open source developers who work on it make it easier to use. Initially, there were only like a few buttons you can press and only a few things you can do. And over the years, they've added user interface improvements and additional commands that don't break the consensus algorithm that make it easier to do things. And that's really why new versions, for the most part keep coming out, that there are ideas that the community feels make it easier to use, better to use, more secure to use. And so those features are added to bitcoin core. Right, okay. But I think what people wonder is, if you can make changes to it, how can we be sure that it's not going to be changed for evil purposes against the best, it's not in the best interests of the common man, it's not going to benefit some small group of people over everybody else. How do we know that that's going to happen tomorrow? Yeah, the first point that I was making is changes to the consensus code of, like, what it takes to spend bitcoin or how many bitcoin can get generated or what makes a valid block are not changes that can be made in bitcoin core without complete consensus of the entire community. All the miners and all the use. Words that have nothing to do with Vicky. Try to use words that people are going to understand everything you just said. If I was brand new, I wouldn't understand a damn thing you just said. Right. Changes to bitcoin core don't change the rules of bitcoin, if that's what you want to say. Like, if someone tried to change the rules of bitcoin in bitcoin core, what would quickly happen is there would be a split in the network. It would be what's called a hard fork. And then people that splits the monopoly board into right, okay. People would have to if you want to do that, anybody can change that. But if you want to do that, you're creating a new monopoly board and saying, come play with me. And what ends up happening is nobody comes to play with you and then your monopoly game dies. Right. That's what's happened historically, yes. Perfect example is like bitcoin cash, right? They changed the rules, it made a different version of bitcoin, and now that version of bitcoin is worth like one half of 1% of what bitcoin is worth. BCH and BSV have basically been both deplatformed off the exchanges at this point. And they're just dying. They're just like these. They're making their last little twitches as they perish. ", + timestamp: '00:48:29-00:55:14', + topics: ['Bitcoin core update', 'Satoshi client'], + type: 'twitter_space', + weight: 18.508241653442383, + }, + { + boost: 0, + date: null, + description: 'UTXO and release of Bitcoin version 24.0 features', + episode_title: 'Café ₿: Sovereign Computing w/ Matt & Aiden, Start9', + guests: [ + { + name: 'Andrew', + profile_picture: 'https://pbs.twimg.com/profile_images/1465763053014859786/xYFN2czJ_400x400.jpg', + ref_id: 'ae4b13f8-0ee7-480a-b47a-82b967ad7a79', + twitter_handle: 'AP_ArchPublic', + }, + { + name: 'Matt Hill', + profile_picture: 'https://pbs.twimg.com/profile_images/1347317316057321474/ieMjzK3x_400x400.jpg', + ref_id: '3576ad28-a04d-4388-865b-3ec5114c4f9f', + twitter_handle: '_MattHill_', + }, + { + name: 'Lauren', + profile_picture: 'https://pbs.twimg.com/profile_images/1586022214901501952/U1dRyCxP_400x400.jpg', + ref_id: '7f14bbf5-a60b-496b-a361-3663cf120299', + twitter_handle: 'LaurenJauregui', + }, + { + name: 'Aiden McClelland', + profile_picture: 'https://pbs.twimg.com/profile_images/1470160097225498624/0BjKB_2W_400x400.jpg', + ref_id: '04ddd9d4-9329-4e6c-aaa3-d65ea4a9342a', + twitter_handle: '_dr_bonez', + }, + { + name: 'Peter', + profile_picture: 'https://pbs.twimg.com/profile_images/1581695667193643009/EljNY-TH_400x400.jpg', + ref_id: 'a3384925-e15e-421d-b9f9-6d44e273ed05', + twitter_handle: 'PeterAnsel9', + }, + { + name: 'Lisa', + profile_picture: 'https://pbs.twimg.com/profile_images/1541581547815436288/Li8wORWt_400x400.jpg', + ref_id: 'e6f0c6e3-3237-4b13-878f-bb740cd32f8d', + twitter_handle: 'lisa_hough_', + }, + { + name: 'Isabelle', + profile_picture: 'https://pbs.twimg.com/profile_images/1466874333410717698/WRQh2-_m_400x400.jpg', + ref_id: 'c8df253f-47b3-465e-878e-8405c01c090d', + twitter_handle: 'isabelfoxenduke', + }, + { + name: 'Tone', + profile_picture: 'https://pbs.twimg.com/profile_images/1416821178266787844/T1OkI9ZW_400x400.jpg', + ref_id: '5729ac07-51d6-4268-b585-62680c846acb', + twitter_handle: 'ToneVays', + }, + ], + hosts: [ + { + name: 'Alex Stanczyk', + profile_picture: 'https://pbs.twimg.com/profile_images/1539055022364708864/rwErK6x1_400x400.jpg', + ref_id: '3126e2a3-bbe4-456b-b298-9714085fa286', + twitter_handle: 'alexstanczyk', + }, + { + name: 'Derek', + profile_picture: 'https://pbs.twimg.com/profile_images/1598322677827207169/Cw0A3oOP_400x400.jpg', + ref_id: 'f441b996-7eeb-4210-b24c-fa011161709d', + twitter_handle: 'derekmross', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/239722cb-4216-414a-a17b-5adf9d52e15a.jpg', + keyword: !0, + link: 'https://stakwork-uploads.s3.amazonaws.com/uploads/customers/2707/media_to_local/0ec4a941-250c-4e1d-8d2a-6c506c3ba4b2/4bd8010d-b2fd-41b4-8041-8a953ef06492.mp3', + node_type: 'clip', + pub_key: '02574d6e8e787372184b6f17c40d6c6fe1777db9015801f95dfd24692784d767cd', + ref_id: '48de736c-df85-48ea-9856-e9b608a6025e', + show_title: 'Swan.com', + text: "I was just going to echo back to some of the points that Tomar was making about utxels and stuff. Did you guys see that, the release of bitcoin cord 24.0? It has some really great features into it that allow users to sort of, like, spend all UTXOs. So when you're sending a transaction, you don't generate change, which I think it's really cool. It's a really cool feature for privacy. It's kind of like, explain that. What does that mean? You know how Sparrow gives you the ability to sort of create, like, if you're going to send bitcoin or receive bitcoin, you can create, like, new addresses in order to sort of get past the common input ownership heuristic of chain analysis. Use English. Use words that explain it, like you're explaining it to a five year old. Okay, so essentially what this code is allowing you to do is you can. Empty out a wallet. You know, when you send out a transaction, you're actually sending all of the amount of all the BTC you have. In that wallet address. You're sending it out, and then you're receiving a UTXO back from the receiving address, from the address you said, like, change. So in other words, if I'm buying something and let's say I've got one UTXO or one address that is in the denomination of a $10 bill, for example, I go and buy let's call it a cheeseburger for $5, I get $5 and change. And the problem with the $5 and change is that that's trackable, right? Yes, 100%. Yeah. And they're also including a change output randomization, which is kind of like what Monero does, but not really. It's a way to sort of, like, generate random amounts so that anybody watching the chain can't really tell which UTXO belongs to you. And they do it in a very technical way, but yeah, man, I'm super excited about it because this is increasing the level of privacy that you can achieve just with bitcoin core. These are small tweaks to the privacy enhancements of bitcoin. And these are all backwards compatible, right? Like, if people don't want to adopt this, they don't have to kind of thing. Yes. Ant, do you have any comments? Full RBF equals one. Oh, yeah, let's get that. Bitcoin core version 24. There's already 3.8, maybe 4% of total public bitcoin nodes running. It interesting across the world. ", + timestamp: '00:45:21-00:48:27', + topics: ['UTXOs feature', 'Bitcoin core v24.0'], + type: 'twitter_space', + weight: 18.260805130004883, + }, + { + boost: 0, + date: 1671644776, + description: "The Orange Pill app and it's piggybank feature", + episode_title: '#Bitcoin Creators Space', + guests: [ + { + name: '@DecouvreBitcoin', + profile_picture: 'https://pbs.twimg.com/profile_images/1362747604044566530/Invedmre_400x400.jpg', + ref_id: '0eda190b-4373-41fc-bc28-c3b95af30949', + twitter_handle: 'DecouvreBitcoin', + }, + { + name: '@Bridge2Bitcoin', + profile_picture: 'https://pbs.twimg.com/profile_images/1533812215198924800/vAAlVRxO_400x400.jpg', + ref_id: '1aaf2c24-8d26-4038-b55a-8b94427b20c7', + twitter_handle: 'Bridge2Bitcoin', + }, + { + name: '@orangepillapp', + profile_picture: 'https://pbs.twimg.com/profile_images/1570918965601505282/SOApRCif_400x400.jpg', + ref_id: 'ba5b79b4-e2e7-4778-8879-df793b8420a4', + twitter_handle: 'orangepillapp', + }, + { + name: '@knutsvanholm', + profile_picture: 'https://pbs.twimg.com/profile_images/1586261395833774081/RQ8SYxiM_400x400.jpg', + ref_id: 'e12ebe66-706b-40d2-804a-861a4c79bbfa', + twitter_handle: 'knutsvanholm', + }, + { + name: '@bcvFoundation', + profile_picture: 'https://pbs.twimg.com/profile_images/1460813196902633476/edbNgO7y_400x400.jpg', + ref_id: 'd65bc3c3-cdd7-4539-8cb9-6a8d86f580c8', + twitter_handle: 'bcvFoundation', + }, + { + name: 'Christopher', + profile_picture: 'https://pbs.twimg.com/profile_images/1345072452775370754/cBVFzpkV_400x400.jpg', + ref_id: '7dacb545-925d-4201-9b9c-869d992dcdb3', + twitter_handle: 'Chrissuccess', + }, + ], + hosts: [ + { + name: '@steliosats', + profile_picture: 'https://pbs.twimg.com/profile_images/1495784740921786371/a73Qu4HR_400x400.jpg', + ref_id: '7eed8e35-f762-4882-adf9-b45ad16c3c54', + twitter_handle: 'steliosats', + }, + { + name: '@geyserfund', + profile_picture: 'https://pbs.twimg.com/profile_images/1554429112978120706/yr1hXl6R_400x400.jpg', + ref_id: '02a48cf4-58d0-4014-803c-9120dedeec52', + twitter_handle: 'geyserfund', + }, + { + name: 'UKNOWN', + profile_picture: 'https://pbs.twimg.com/profile_images/930811252665933826/2cVZF58S_400x400.jpg', + ref_id: 'bcd18bb0-8224-4f6b-af71-e16120ae4323', + twitter_handle: 'NodedPodcast', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/c9bb5d58-c781-464d-878a-8b6c469ba198.jpg', + keyword: !0, + link: 'https://stakwork-uploads.s3.amazonaws.com/uploads/customers/2707/media_to_local/b18df9d2-d034-4e1f-bcd1-d70b30fe9059/506355bc-c119-4f18-bf0b-abe9be8c17d6.mp3', + node_type: 'clip', + pub_key: '029099ec31eb33594611dc47d5c93de2c1aa86918e3a36b408c14a500601c8bc9b', + ref_id: 'fed2b741-e9a2-4858-bee8-faa259806d3e', + show_title: 'Geyser 🌊', + text: "orange Fill up. Do you want to come up and tell us a bit about your project? Let me add it to the spaces too. Did you get the invite? I'd love to hear about what your features releases are up to. So Builders feature orangeville app. We have Lightning Piggybank, which is essentially an electronic cash piggy bank for children that accepts bitcoin sent over lightning. So this is a pretty small project, but it's a pretty sweet thing, actually. So let me add this to the it's pretty incredible, actually. I need to show you guys. I need to show you this. Imagine a piggy bank, but instead of an actual pig, it's like a cardboard box with a Geyser satoshi. Yes, we did. What's up, mate? I cannot do from the desk, though. You cannot talk? I'm not on desktop. Oh, no. You can't talk from desktop? No, it's got to be mobile. Yeah. It'S painful. Yeah, we got to talk to you. Yeah, exactly. But yeah, just to finish up this thought, there you have this really cool piggy bank which has this, like essentially this counter, this wallet counter of how many Satoshi the project has, which is really cool. And this person is just raising money connecting their Geyser project onto their Lightning Piggy Bank, which is fucking cool. I mean, this looks like a little DIY type of fun project that a father did for his son or something super cool. But let's go back to you, Matteo. Let's talk about orangeville app. Why not? What's up with you? Yeah, for sure. Orange. Bill app is a mobile app. We use Geolocation, which is the only approximate to connect you with nearby users, nearby pledge, and soon we'll let you find events. So meet up, conference, whatever. Actually, it could be anything because the user can create events straight from the App and then put the address. And then you'll be able to invite people there nearby to the event. So it doesn't have to be a meetup. It could be like a soccer game or picnic on the beach or anything. That's pretty cool. Hopefully it comes out January or February. Definitely February. And then we're going to launch the search feature, which will allow you to search for people all over the world. So if you're traveling and you're going to Ghana, you'll be able to look for clubs in the App there in Ghana. And then you can chat them up and say, hey, I'm coming to Ghana next week or next month or whatever, and I'd like to meet with you. I don't know anybody in Ghana. And of course, you can also search by gender for dating, age, profession. Right? We got to do yeah, I'm sure it's going to be like 95% guys, though. It's not can you confirm that? No, it's not. I don't have the number precisely because some users, they don't put a picture. And I know there's one woman that I talk to, obviously I talk to everybody on the app and you wouldn't know she's a woman, but it's a woman. But I think it's about 10% women and 90% men, which it looks it doesn't look good. But Tinder, which is the biggest dating app on planet, the ratio meant to women, it's 97% men, 3% women. No way. I know, it's crazy. Wow. But there's so much there's so many. Better than they are. Yeah, we're doing better than Tinder. Yeah. The point is that when you have, I don't know, hundreds of millions of user, it works even if you have one or 2%. But yeah. So with the search, you'll be able to search, obviously only if the other users have disclosed those information. So age, gender, profession, which is going to I think the profession looking for Profession is going to kickstart the Bitcoin secular economy, right? Because imagining you can look plumber in Oxford and then you can paint that because obviously if it's in the app, it's a bitcoin max. Right. So that's going to be very exciting. ", + timestamp: '00:19:33-00:24:59', + topics: ['Orange pill app', 'Geyser', 'piggybank', 'piggybank'], + type: 'twitter_space', + weight: 42.97230338635478, + }, + { + boost: 0, + date: null, + description: 'The solutions to main challenges facing the ranching industry in Nigeria ', + episode_title: "The Orange Sun 🌞 Let's talk #Bitcoin & Cattle Ranching/Sustainability", + guests: [ + { + name: 'Texas Slim', + profile_picture: 'https://pbs.twimg.com/profile_images/1589784780970795011/02jf0fqp_400x400.jpg', + ref_id: 'b4448c8e-9238-4aba-bd25-efb329ea5a72', + twitter_handle: 'modernTman', + }, + { + name: 'Lucas', + profile_picture: 'https://pbs.twimg.com/profile_images/1596345084966014976/maviSGq3_400x400.jpg', + ref_id: 'e3adb591-b29f-435b-bd34-210f2dbcedaa', + twitter_handle: 'impossiblyso', + }, + { + name: 'Firebust', + profile_picture: 'https://pbs.twimg.com/profile_images/1517827165198458880/N79Wpx85_400x400.jpg', + ref_id: '0fb6c7f3-a673-4fe5-9599-8165800a2ff0', + twitter_handle: 'FireBursts', + }, + { + name: 'Hamza Yusuf', + profile_picture: 'https://pbs.twimg.com/profile_images/1318064165030940672/sakbSOvT_400x400.jpg', + ref_id: '03a74669-b653-4c57-8799-a312cb041089', + twitter_handle: 'Hamzayu28849293', + }, + { + name: "Adenekan's Father", + profile_picture: 'https://pbs.twimg.com/profile_images/1505572078023495683/Wo_pJvTU_400x400.jpg', + ref_id: 'b8259997-2ef0-4e6e-8d58-a69b5eda550a', + twitter_handle: 'AdenekanFatai4', + }, + { + name: 'Adenekan', + profile_picture: 'https://pbs.twimg.com/profile_images/1505572078023495683/Wo_pJvTU_400x400.jpg', + ref_id: 'ca6a563e-0e84-4811-be82-a3b3cd12d399', + twitter_handle: 'AdenekanFatai4', + }, + { + name: 'Heritage', + profile_picture: 'https://pbs.twimg.com/profile_images/1510397558652350469/jYOl00tU_400x400.jpg', + ref_id: '98a6d9df-3c39-49ec-8a39-074e61af4ece', + twitter_handle: 'herrytheeagle', + }, + { + name: 'Enoch', + profile_picture: 'https://pbs.twimg.com/profile_images/1596235105663533056/5mRUbLm3_400x400.jpg', + ref_id: '4f8af040-3d0c-49c1-806e-aef89d8693fb', + twitter_handle: 'KazEnoch', + }, + ], + hosts: [ + { + name: 'Jeremy Garcia', + profile_picture: 'https://pbs.twimg.com/profile_images/1589056396816896001/dslbBQSX_400x400.jpg', + ref_id: 'e5e68f75-d71a-4477-ae9a-6a891f2d84d0', + twitter_handle: 'Jerimican5445', + }, + { + name: 'Oluwasegun Kosemani', + profile_picture: 'https://pbs.twimg.com/profile_images/1538403135101800450/sO-RPI9U_400x400.jpg', + ref_id: '25ce4b90-6689-4dd9-84b6-240c7bcbe407', + twitter_handle: 'MrlamilamiKosch', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/9b2e17f2-71c5-4f1e-a3e7-720d06dab810.jpg', + keyword: !0, + link: 'https://stakwork-uploads.s3.amazonaws.com/uploads/customers/2707/media_to_local/a91f79fd-d85f-4440-b012-4bdafdc83341/f1d1c5b5-b8c9-44ed-a217-f75b398376d5.mp3', + node_type: 'clip', + pub_key: '02574d6e8e787372184b6f17c40d6c6fe1777db9015801f95dfd24692784d767cd', + ref_id: '754762ac-7680-4b80-9ff4-f314ae65d146', + show_title: 'Satoshi’s Journal', + text: "Good morning, everyone. Such an insightful, interesting topic we have today. Like when she said we don't have all the time to dictate it so that we respect our guest time. But Ariel, thank you, sir, for being with us. I mean, it's no small thing that you're here. We know what your time means to us and all that. Thank you. It's such an honor to have you here. I'll just go right into it. I may not be able to exhaust my questions and I planned on, but just to make some few comments here, that bitcoin builds communities. And I think that is what Texas Lime has been trying to point out. It's all about community building and we can achieve that. But the pain point for catering is in interior that quickly. I heard from identity is one, security is a big issue. And that's because one of the reason is that we're not doing ranching here. Okay? We're not doing ranching here. The farmers get to the railroads, get to move around and all that. We don't have a ranching system. But a ranching system is so important where they are set out, places where that is, well, knowledge that these cows can feed on, the advantage is big. The advantages, less risks of diseases, we can have less risk. And also when these cattle are moving and moving, they don't get the right yield in terms of adding weight and pounds and all that. So that's a challenge I think we can sort out. And how do we sort that out? I mean, I know we're having a big project where we can begin to have a bitcoin only ranching system built in Nigeria that will technique one, security two, it will help us foster bitcoin education easily. And also we begin to have the fattest and the biggest cows and the most healthiest cows that Nigerian can produce. I think satoshi journal, we can do that. We can push that. I know we have a big project, but for now let me just quickly drop so that we can respect that. Yes, this time. Thank you so much. Yeah, no problem. And last but not least, lucas, do you have a question or comment? Oh, I'm glad we had time. I'm sorry to come late to the conversation, but I work with towns in New Mexico and Colorado trying to get them to adopt bitcoin to begin a. Localized currency based on their water system. And I grew up on a farm ranch, and to me. Giving rural areas starts with like, valuing water and watersheds. More yeah, I totally drive with that. And I highly recommend that you follow Texas, slim and a dennett and anyone else on this panel if you want to partner up and see if you guys can help further what you're trying to do. It's right in line with what Texas and slim is doing ", + timestamp: '01:59:32-02:02:45', + topics: ['Bitcoin ranching system', 'ranching'], + type: 'twitter_space', + weight: 17.55785369873047, + }, + { + boost: 0, + date: 1671644776, + description: 'The Bridge2Bitcoin project', + episode_title: '#Bitcoin Creators Space', + guests: [ + { + name: '@DecouvreBitcoin', + profile_picture: 'https://pbs.twimg.com/profile_images/1362747604044566530/Invedmre_400x400.jpg', + ref_id: '0eda190b-4373-41fc-bc28-c3b95af30949', + twitter_handle: 'DecouvreBitcoin', + }, + { + name: '@Bridge2Bitcoin', + profile_picture: 'https://pbs.twimg.com/profile_images/1533812215198924800/vAAlVRxO_400x400.jpg', + ref_id: '1aaf2c24-8d26-4038-b55a-8b94427b20c7', + twitter_handle: 'Bridge2Bitcoin', + }, + { + name: '@orangepillapp', + profile_picture: 'https://pbs.twimg.com/profile_images/1570918965601505282/SOApRCif_400x400.jpg', + ref_id: 'ba5b79b4-e2e7-4778-8879-df793b8420a4', + twitter_handle: 'orangepillapp', + }, + { + name: '@knutsvanholm', + profile_picture: 'https://pbs.twimg.com/profile_images/1586261395833774081/RQ8SYxiM_400x400.jpg', + ref_id: 'e12ebe66-706b-40d2-804a-861a4c79bbfa', + twitter_handle: 'knutsvanholm', + }, + { + name: '@bcvFoundation', + profile_picture: 'https://pbs.twimg.com/profile_images/1460813196902633476/edbNgO7y_400x400.jpg', + ref_id: 'd65bc3c3-cdd7-4539-8cb9-6a8d86f580c8', + twitter_handle: 'bcvFoundation', + }, + { + name: 'Christopher', + profile_picture: 'https://pbs.twimg.com/profile_images/1345072452775370754/cBVFzpkV_400x400.jpg', + ref_id: '7dacb545-925d-4201-9b9c-869d992dcdb3', + twitter_handle: 'Chrissuccess', + }, + ], + hosts: [ + { + name: '@steliosats', + profile_picture: 'https://pbs.twimg.com/profile_images/1495784740921786371/a73Qu4HR_400x400.jpg', + ref_id: '7eed8e35-f762-4882-adf9-b45ad16c3c54', + twitter_handle: 'steliosats', + }, + { + name: '@geyserfund', + profile_picture: 'https://pbs.twimg.com/profile_images/1554429112978120706/yr1hXl6R_400x400.jpg', + ref_id: '02a48cf4-58d0-4014-803c-9120dedeec52', + twitter_handle: 'geyserfund', + }, + { + name: 'UKNOWN', + profile_picture: 'https://pbs.twimg.com/profile_images/930811252665933826/2cVZF58S_400x400.jpg', + ref_id: 'bcd18bb0-8224-4f6b-af71-e16120ae4323', + twitter_handle: 'NodedPodcast', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/c9bb5d58-c781-464d-878a-8b6c469ba198.jpg', + keyword: !0, + link: 'https://stakwork-uploads.s3.amazonaws.com/uploads/customers/2707/media_to_local/b18df9d2-d034-4e1f-bcd1-d70b30fe9059/506355bc-c119-4f18-bf0b-abe9be8c17d6.mp3', + node_type: 'clip', + pub_key: '029099ec31eb33594611dc47d5c93de2c1aa86918e3a36b408c14a500601c8bc9b', + ref_id: 'c11fe5dc-bed6-408f-ae1b-650580184f3e', + show_title: 'Geyser 🌊', + text: "love to hear from Bridge to Bitcoin, because I know you guys, I don't know if you've created it or if you're well, it's a Bitcoin asset project, right? Let's talk about that. Welcome. Hey, Mick. How are you? This is Christopher from bridge to bitcoin. Hi guys. How is everyone this evening? Good to be here. Great to join you guys in your space. So thanks for setting this up. Mick, apologies for joining late. So apologies if I go over ground that you've already talked about out. Oh, no, don't worry. Sorry for tagging you last minute. No worries. Thanks for tagging. It's been great to speak with Connet. And also I just want to bring it back. Well, actually, I'll start off by saying congratulations on getting 30 projects listed this week on Geyser. That's fantastic. That's really great. And just to resonate with what Connett was saying in terms of things get built in a bear market, I think it's fantastic. And you guys are really promoting it. So thank you for everything that you and the Geyser team are doing, helping people, or Bitcoin is build in this bear market. Because for me, for the rest of the team, it's really important that we build foundations now so we're ready as the ball comes out. It's fantastic to see. So for those who don't know about bridge, for those who don't know about bridge to bitcoin, we onboard merchants to accept bitcoin payments. And we received a grant from Geyser early this year. I'm ashamed to say we haven't yet, and it's been on our to do list for weeks, months, to put up a project, a crowdfunding project on Geyser. And we should really do that soon. But, yeah, we'll get that. It's definitely on our to do list. So we hope to do that soon, especially now, as you say, Nick, the ease of putting up a lightning address. And that makes it so easy, as Joe Nakamoto tweeted about earlier this week. So we shall definitely get on to that. But I just want to go back on what I heard Mateo from Orange Pellet talking about, because he dropped off the call now. I think he has. That's a shame. But I really resonate with what he was saying in terms of how. For. Us, onboarding merchants is one of the cornerstones of Bitcoin success, certainly from my perspective, and making the user interface really easy is really important. I sort of resonate with what Mate was saying in that I think most people are currently not fussed about decentralization, they're not fussed about privacy. We as Bitcoin as are, we get it, we've been down the rabbit hole. But most of the society, they want convenience, they want ease. And that's unfortunately why I think CBDCs are going to hit hard, because people won't do their homework, they won't do their research, people are going to welcome it with open arms, unfortunately. So for me, merchant adoption is really important and introducing that in a way that's really easy. So the way we do that for Bridget to Bitcoin, ironically, it's not Bitcoin that we're selling merchants. For us, it's about creating additional revenue for them by saying, oh, hi, guys. Hi, merchants. What we're going to do is we're going to create a new customer base for you called Bitcoinners, and they're going to come and spend their currency for at your shop service and it's going to create additional revenue. And so for me, it's a slow orange bill, because what happens is a lot of these merchants get bitcoin is coming and using their services or buying their products, and we as Bitcoin as we're fantastic customers. We're so enthusiastic. We travel miles, we buy stuff from all over the globe, we get it shipped over, because you as a Bitcoin business, we want to support you. But if you're new to Bitcoin as a merchant, you kind of get overwhelmed quite quickly with how much attention you get by accepting Bitcoin. And it's great, because what that happens, and what we've evidently seen is that those new merchants suddenly get this influx of bitcoiners and it leads them down the rabbit hole without us having to do anything. Because bitcoin is they make an impression because we're such happy people, especially in these economic times where everyone's feeling the pinch, we will go that extra mile, literally, to spend our bitcoin, to spend our SATS, and replace them. And we're happy about it. We're more than happy, we're enthusiastic. We're the best customers you could ever have. That's amazing. For me, it's kind of a cornerstone of how we can it's sort of a Trojan horse. Trojan horse orange pill. So we're going around to regular businesses so who don't even know about bitcoin, and that's what we're planning on next year. We're going to trade shows. We're just to speak to regular people. We've got no idea about bitcoin, and we're going to talk to them about this fantastic payment processing network called the lightning network. And bitcoin normally is quite late on in the conversation, actually, because as everyone, I think, on the call knows, the processing fees on the lightning network are next to zero. They're really cheap compared to what our fiat counterparts are charging. Plus we've got instant settlement, all those fantastic things. So we talk about it's really interesting. We talk about the payment rails. That lightning network is a payment rail and how better than it and eventually we get to the bitcoin piece. But, yeah, for me, it's about making their businesses more profitable, having additional revenue, and it's fantastic because you literally see them fall down the rabbit hole. So we had that recently with a small chain of pubs, just two pubs that we onboarded last month, I think it was last month or the month before. So this landlord, he owned two pubs and he was not a bitcoiner, and he was not interested in bitcoin. But when James, my partner, said, right, we can bring extra customers to your pub, they're called bitcoin as, and they will spend their currency, but it will create additional revenue, he was like, fine, okay, I'm not interested in bitcoin, but I am interested in additional revenue. So if they're going to come and spend their currency and I can give it to my local currency, great, because it's good for my business, I said, fantastic. ", + timestamp: '00:51:38-00:58:00', + topics: ['Bridge2Bitcoin', 'Bitcoin payments'], + type: 'twitter_space', + weight: 35.60085180856705, + }, + { + boost: 0, + date: 1671735703, + description: 'Tips for building a bitcoin community', + episode_title: 'TOXIC HAPPY HOUR! #Bitcoin, Pysh, Booth, BTC Ben & the Plebs! 🍻😂', + guests: [ + { + name: 'Jeff Booth', + profile_picture: 'https://pbs.twimg.com/profile_images/1362957991410954241/spiaMAg2_400x400.jpg', + ref_id: 'f1143bcc-9ab9-4716-8259-0e5b026f8039', + twitter_handle: 'JeffBooth', + }, + { + name: 'George Gammon', + profile_picture: 'https://pbs.twimg.com/profile_images/1246550014450700291/2n_iHigp_400x400.jpg', + ref_id: '7ca1bc4f-3a57-4a6a-bedf-ef47a8b37297', + twitter_handle: 'GeorgeGammon', + }, + { + name: 'Neil Jacobs', + profile_picture: 'https://pbs.twimg.com/profile_images/1593645788978102277/UAQCQKeE_400x400.jpg', + ref_id: '0bc759e0-b055-4800-a79d-2b950fe5cc53', + twitter_handle: 'NeilJacobs', + }, + { + name: 'Preston Pysh', + profile_picture: 'https://pbs.twimg.com/profile_images/1408783276081299462/f4Ye5n7-_400x400.jpg', + ref_id: '01ad2c81-2d0c-44a9-93a1-42c07287aa80', + twitter_handle: 'PrestonPysh', + }, + { + name: 'Brian', + profile_picture: 'https://pbs.twimg.com/profile_images/1589300685182570500/cTffQlpJ_400x400.jpg', + ref_id: 'b167b1cd-bbce-4839-a03c-194f006f954d', + twitter_handle: 'BrianTheDrumer', + }, + { + name: 'BTC Ben', + profile_picture: 'https://pbs.twimg.com/profile_images/1348015880664473610/S-uDNLlZ_400x400.jpg', + ref_id: '2c95b3dd-e3a2-4cf0-a49e-a8915d2bfcd5', + twitter_handle: 'bensemchee', + }, + { + name: 'Craig Shipp', + profile_picture: 'https://pbs.twimg.com/profile_images/1605961563420114945/MWGqR1Gm_400x400.jpg', + ref_id: '8d6ca47a-89a2-4331-bae4-2fae18055a95', + twitter_handle: 'CraigShipp', + }, + ], + hosts: [ + { + name: 'PUBLORD', + profile_picture: 'https://pbs.twimg.com/profile_images/1480160632360124416/AM_vVRko_400x400.jpg', + ref_id: '8126d933-0986-4fd2-a6be-c02581294463', + twitter_handle: 'publordhodl', + }, + { + name: 'Anders', + profile_picture: 'https://pbs.twimg.com/profile_images/1391477993726529545/xqIjHq5w_400x400.jpg', + ref_id: '78672de6-3c5f-4d95-8fd9-f2b512fa7a04', + twitter_handle: 'Anders_', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/0c42d408-e518-4ecf-b282-d864a8c14002.jpg', + keyword: !0, + link: 'https://stakwork-uploads.s3.amazonaws.com/uploads/customers/2707/media_to_local/dbc5dd26-2307-4f64-a377-105e2a277d9c/be3d47a7-2fcd-4de8-8f22-71851953d022.mp3', + node_type: 'clip', + pub_key: '02574d6e8e787372184b6f17c40d6c6fe1777db9015801f95dfd24692784d767cd', + ref_id: 'd65c7fdb-df02-4bef-a6e6-8d214f6284d4', + show_title: 'PUBLORD', + text: "will be here, too, of course. Yeah. I'm planning on setting up on the Tribe relay. Like when I get up. I'm going to get a laptop next week before I head was just talking about it. Honestly. Brian, DM me a list of like, some of the top speakers you think would be able to explain it because look at us, we're a bunch of regards, as they say, explain it to us like we're five and wear masks in a swimming pool. Like that kind of level. Yeah. Let's talk offline, brother, because I want to hear more about this wearing masks in your cart. All right. Sounds good, Bobby. I'm heading out with Brian as well. Always a blast. I appreciate the invite. I thoroughly enjoyed the Noster talk, to be quite honest with you. BTC sessions. Have a wonderful bonanza tomorrow. Looks awesome. Yellow, I really came here today just to kind of be around you and just love this group. I love you, Preston. Man thanks again for stopping Preston. Good, deep Preston. Happy holidays. Thanks for all you do for the space. Preston. Oh, yeah, man, my pleasure. And I'm honored to be a part of this movement with everybody else. Okay. Let that putt with Preston fish sink in. Preston. Just let it sink in. Oh, wait, yeah. Preston, before you go, because listen, I had an idea for you guys, because, listen, I like to go skiing in Colorado every year. And there's a place there go to Breckenridge or Keystone, but they've got this one little area where they had Lindsey Vaughn do a run, okay? And this for the kids for the most part, even though the adults can't hit it either. But they've got I don't know how many hundreds of meters it is, but they've got to run at a time there, and you get to try to test yourself against a time. So what I'm thinking is pressing you go solo on that course early, all right? You put your score up there, and then anyone who beats it, you get some SAS. Preston puts up the initial score, and you get SAS if you beat it. Just saying. I'm there. On a serious note, I am going to this Jackson Hole event in 1 March to I don't know if it's the second or the 3 March, but I'll be out there for that if anybody's in that area. All right, guys, see you. Thanks for the have a good one, man. Take care. Okay. BTC session. Ben, sorry, one question. Just say one quick thing. Just because BT session is in and probably I wanted to get your support on it as well. I'm trying to start a small bitcoin community in South London. And I'll put in your chat and mentioned earlier, I just wondered if I could get support from you guys because of BT sessions just turned up just now. I just wondered if I could get some maybe some help on some talking points as well, because I'm just trying to build something that's very I wanted to be very simple conversational. It's the first one, but I want to build on it. It's free. And I'm going to get some sponsors from some beer companies so we can do free beer as a kind of a pool. But it's going to be my pub that I run. I put it in a chat. So I just wanted some help, really. It doesn't have to be big. It's not going to be nothing like the Harvey party right now, but I'm planning on being there as well, so maybe I can get some people to come along for that as well. Sounds awesome, man. What kind of people are you expecting? Is there going to be some experienced bitcoiners? Is there going to be a mix of newbies what's the demographic you're looking at first? It's yeah, mix. I mean, I've got an old far who's written about 20 books about my favorite football team, which is Crystal Palace, but he's got a few properties and stuff and he wants to invest in Bitcoin. And I said to him it's exactly the same thing I said. It's like if I tried to explain to you how a car works, the fact that he knows how a car works, you still need to learn how to drive it. I can tell you all the benefits of how good a car is against a horse, but you still need to learn to drive. You wouldn't give a car to a ten year old and all this sort of stuff. There's an education that still needs to be learned. So we got to start small and then build up because he's got property, he writes books and stuff. I've got mathematician coming, a C plus plus, programmer coming, people I know, and obviously there is some shit coinners who want to come along and learn. But obviously you look at the meeting, I put it in the chat, it is Bitcoin. And I've called it Bring the chat. As in BTC. That's the breakdown of BTC. But obviously it's Bitcoin and it's the first one, so it's kind of build from there. But it is a case of break them in gently and I don't want to be fun. It's not about let's overload them with too much tech. But I kind of want to go with if we want to go down the economic rule road, then we'll go down the economic rule if we want to get to understand how Bitcoin works. But it's a case of it will evolve because of I can do as many I could do one a week, I could do one a month. It's about that engagement and just making it fun and free. That's the main thing. I think that's great. What I would say is maybe if you're doing a couple each month, then you could look at it as there's always going to be kind of like a beginner night, and then there will always be like the secondary. One will be maybe more in depth topics that will be of interest to the people that have been there for a while and have leveled up or the ones that are coming in already with a good base knowledge. And then that way you various things, I could actually split it. So we do the first one and then we work out how to split it on the technical to the beginner type side of things. And then I could do alternative nights based on maybe work it that way. Because probably knows that I love these spaces and I love learning myself and I want to share what I learn. And I think the best way to learn is to share your knowledge. The more I want to share it, the more I have to learn myself to make sure that what I'm saying is correct. And that's why I love these spaces so much, because I'm addicted to him. London I would just posit one thing. And this is cool that you're here asking these questions when Ben is here, because if anyone wants to learn anything about Wallace in general, see reviews and learn how to do things, you go to BTC sessions on YouTube, you can learn so much. However, there's a different level when you can do it sort of in person and you see it happening. And Ben. We did Halloween in Charlotte, North Carolina. And what was really cool, and I was mentioning this earlier on the space, and people don't understand, even if you've been here a year, you forget how far advanced you are when it comes to not only understanding Bitcoin and what it means, but the technology behind it. So if you can set up London, just a simple thing where you just show somebody how to download a wallet, either moon wallet, whatever wasabi wallet, and send them some SATS, dude, they are blown away and they'll be new to the space. But I'll tell you what, that changes lives when they see that. When you do that, that is like putting a couple shovels about 3ft down into the ground to start that rabbit hole journey. When they see that you just sent them value outside of the Swiss system, it was pretty cool to see. And yeah, when I saw that, I forgot, man. Sometimes it's like when you used to believe in Santa Claus, man. Used to believe in Santa Claus. Then you got older. But when you see people that do Lightning Network for the first time, you believe in Santa Claus again yourself. You see that spark of joy in their eye. Wait, you don't believe in capitals? What are you talking about? I was going to say Santiago. I think he pulled it back. ", + timestamp: '02:14:38-02:24:14', + topics: ['bitcoin community'], + type: 'twitter_space', + weight: 36.0744936342072, + }, + { + boost: 0, + date: 1671735703, + description: 'What bitcoin represent vs what Nodster network represent?', + episode_title: 'TOXIC HAPPY HOUR! #Bitcoin, Pysh, Booth, BTC Ben & the Plebs! 🍻😂', + guests: [ + { + name: 'Jeff Booth', + profile_picture: 'https://pbs.twimg.com/profile_images/1362957991410954241/spiaMAg2_400x400.jpg', + ref_id: 'f1143bcc-9ab9-4716-8259-0e5b026f8039', + twitter_handle: 'JeffBooth', + }, + { + name: 'George Gammon', + profile_picture: 'https://pbs.twimg.com/profile_images/1246550014450700291/2n_iHigp_400x400.jpg', + ref_id: '7ca1bc4f-3a57-4a6a-bedf-ef47a8b37297', + twitter_handle: 'GeorgeGammon', + }, + { + name: 'Neil Jacobs', + profile_picture: 'https://pbs.twimg.com/profile_images/1593645788978102277/UAQCQKeE_400x400.jpg', + ref_id: '0bc759e0-b055-4800-a79d-2b950fe5cc53', + twitter_handle: 'NeilJacobs', + }, + { + name: 'Preston Pysh', + profile_picture: 'https://pbs.twimg.com/profile_images/1408783276081299462/f4Ye5n7-_400x400.jpg', + ref_id: '01ad2c81-2d0c-44a9-93a1-42c07287aa80', + twitter_handle: 'PrestonPysh', + }, + { + name: 'Brian', + profile_picture: 'https://pbs.twimg.com/profile_images/1589300685182570500/cTffQlpJ_400x400.jpg', + ref_id: 'b167b1cd-bbce-4839-a03c-194f006f954d', + twitter_handle: 'BrianTheDrumer', + }, + { + name: 'BTC Ben', + profile_picture: 'https://pbs.twimg.com/profile_images/1348015880664473610/S-uDNLlZ_400x400.jpg', + ref_id: '2c95b3dd-e3a2-4cf0-a49e-a8915d2bfcd5', + twitter_handle: 'bensemchee', + }, + { + name: 'Craig Shipp', + profile_picture: 'https://pbs.twimg.com/profile_images/1605961563420114945/MWGqR1Gm_400x400.jpg', + ref_id: '8d6ca47a-89a2-4331-bae4-2fae18055a95', + twitter_handle: 'CraigShipp', + }, + ], + hosts: [ + { + name: 'PUBLORD', + profile_picture: 'https://pbs.twimg.com/profile_images/1480160632360124416/AM_vVRko_400x400.jpg', + ref_id: '8126d933-0986-4fd2-a6be-c02581294463', + twitter_handle: 'publordhodl', + }, + { + name: 'Anders', + profile_picture: 'https://pbs.twimg.com/profile_images/1391477993726529545/xqIjHq5w_400x400.jpg', + ref_id: '78672de6-3c5f-4d95-8fd9-f2b512fa7a04', + twitter_handle: 'Anders_', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/0c42d408-e518-4ecf-b282-d864a8c14002.jpg', + keyword: !0, + link: 'https://stakwork-uploads.s3.amazonaws.com/uploads/customers/2707/media_to_local/dbc5dd26-2307-4f64-a377-105e2a277d9c/be3d47a7-2fcd-4de8-8f22-71851953d022.mp3', + node_type: 'clip', + pub_key: '02574d6e8e787372184b6f17c40d6c6fe1777db9015801f95dfd24692784d767cd', + ref_id: 'fbefee4e-b2e3-4635-88ac-800d3482e9f8', + show_title: 'PUBLORD', + text: "on Craig's recommendation. I went to Jack.com. Was not what I thought it was going to be. Thank you, Craig. I had an education. Look, we'll talk about the notes a lot of times. All the fact Preston jumped in, I wanted to just have a few more words. I know he's got a busy schedule, but preston, you're coming to the end of 2022 investor podcast, one of the best ones we have any tweaks to next year. Guests are looking forward to have not really just doing the same thing in reference to the Noster conversation there. The thing that's such a game changer for folks is if you want to run your own relay and host your own data, you can do it. And the barrier to entry to do it is really low. In fact, that's what I've been doing while I'm here talking to you guys is I'm setting up my own relay to host my own data and to make sure fucking go that nobody can mess with it. And so when you look at what this protocol represents, when we look at Bitcoin, it represents it's like equal sign free and open money, free and open markets. When you look at Noster, it's similar to Bitcoin in the regard that equals sign free and open speech around the world. Nobody can shut it down. Right. That's what it represents. Now, we are in the very, very early days of this, and so whether we can pull it off or not at scale, I don't know. It sure seems like we can. When you have guys like Jack Dorsey in there, like every minute of the day working on the protocol and working on I don't know if he's working on clients or if he's just working on the protocol, but he's in there. And that guy wouldn't be in there if he didn't find a whole lot of promise behind the rudimentary building block of an event. That is where it all starts, with this protocol and everybody's just building around it. It's pretty exciting. Hey, Preston, are you able to limit who can see your data that you host by only letting people that you trade public keys with access it or something like that? Is that a concept? Yeah. And Brian, correct me if I'm wrong, because you seem to be pretty well versed in all this, but from what I understand, as I'm literally trying to set this thing up, I'm struggling a lot setting this up because this is not my area of expertise, but I have an appreciation for what it represents. I'm trying to learn along the way. But my understanding is you can host, you can relay whatever accounts you want, as many as you want or as little as you want, and people can connect to it. And you can allow that connection or not allow that connection, but it's creating this web of interaction between these encrypted messages that are of very small size, and they're just being passed around from relay to relay. Jim, are you basically asking, is there a way of blocking people? I guess it's more my thinking was more if you're going to host data, so maybe you want some of it open to anybody so you have a permission set on that data where anybody can just log on with a public key. You don't know if they're a bot or anything else, and they can see your stuff. But then maybe there's other stuff you only want your followers to see or something like that. I don't know. Maybe testify. Just let me know. There's a new version of Domas just got released. Is that relevant? I'm sorry. We ", + timestamp: '01:35:32-01:39:29', + topics: ['Nodster network'], + type: 'twitter_space', + weight: 35.643925540367206, + }, + { + boost: 0, + date: 0, + description: 'The Genesis crypto lending fraud', + episode_title: 'The Orange Sun ☀️ #Bitcoin News and Talk', + guests: [ + { + name: 'Portland Hodl', + profile_picture: 'https://pbs.twimg.com/profile_images/1562306406526492672/LiqmI9NS_400x400.jpg', + ref_id: '530aba21-392f-4156-9e91-4fc5c76fced1', + twitter_handle: 'PortlandHODL', + }, + { + name: 'Miykael Woodward', + profile_picture: 'https://pbs.twimg.com/profile_images/1473433558475689985/CM0o3oWu_400x400.jpg', + ref_id: '6fe02a78-4f07-47e7-8e64-b278a3167835', + twitter_handle: 'MiykaelWoodward', + }, + { + name: 'Okin Mobi', + profile_picture: 'https://pbs.twimg.com/profile_images/1518945775685967873/O0wPrIKO_400x400.jpg', + ref_id: 'bbd18918-7758-4bdb-b9a5-641bf92748a6', + twitter_handle: 'OKIN_17', + }, + { + name: 'TK☣️Ph.Ple₿', + profile_picture: 'https://pbs.twimg.com/profile_images/1505791887415730177/d0YDQ3Xc_400x400.jpg', + ref_id: '9e3ffa2c-9410-48e9-a726-8312c0abcd7c', + twitter_handle: 'ToxiKat27', + }, + { + name: 'Funsho Jimoh', + profile_picture: 'https://pbs.twimg.com/profile_images/1600143435775856641/uqgmtT23_400x400.jpg', + ref_id: 'a237ffb0-792b-484e-b12f-65a2b679eaf1', + twitter_handle: 'fnicencool', + }, + { + name: 'prince ogbonna', + profile_picture: 'https://pbs.twimg.com/profile_images/1595693872637681664/TeWJzTut_400x400.jpg', + ref_id: '0b0c70b1-23b1-4d98-b259-6dbb67b7481d', + twitter_handle: 'princejoj0', + }, + { + name: 'The Bitcoin Village', + profile_picture: 'https://pbs.twimg.com/profile_images/1544318244789649410/kQ2G1MCE_400x400.jpg', + ref_id: 'd894aca4-36f6-4821-a00b-a4e860b19502', + twitter_handle: 'VillageBitcoin', + }, + { + name: 'Masterguantai', + profile_picture: 'https://pbs.twimg.com/profile_images/1521025685078302720/w9dZwehS_400x400.jpg', + ref_id: '29baf525-42eb-41a6-98f9-a0d6b4480af0', + twitter_handle: 'MasterGuantai', + }, + ], + hosts: [ + { + name: 'Jeremy Garcia', + profile_picture: 'https://pbs.twimg.com/profile_images/1589056396816896001/dslbBQSX_400x400.jpg', + ref_id: 'e5e68f75-d71a-4477-ae9a-6a891f2d84d0', + twitter_handle: 'Jerimican5445', + }, + { + name: 'Satoshi’s Journal', + profile_picture: 'https://pbs.twimg.com/profile_images/1598641632601047042/qrZMP5Oy_400x400.jpg', + ref_id: 'd977ed11-09b0-4143-828d-582ecb8b58ca', + twitter_handle: 'SatoshisJournal', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/9b2e17f2-71c5-4f1e-a3e7-720d06dab810.jpg', + keyword: !0, + link: 'https://s3.amazonaws.com/stakwork-uploads/uploads/customers/2707/media_to_local/a99c4b03-009f-4027-a9c7-3c249a0cf9b7/a99c4b03-009f-4027-a9c7-3c249a0cf9b7.mp3', + node_type: 'clip', + pub_key: '02574d6e8e787372184b6f17c40d6c6fe1777db9015801f95dfd24692784d767cd', + ref_id: '663836ff-8d5a-4037-a62f-72568fff46f1', + show_title: 'Satoshi’s Journal', + text: "that's very interesting. But Genesis future is more uncertain because the business is heavily focused on lending out customer crypto and has already engaged restructuring advisers. The crypto lender is part of DCG, the conglomerate controlled by Barry Silbert. SEC officials said the possibility of a DCG or Genesis bankruptcy had no bearing on deciding whether to pursue a charge. It is the latest in a series of recent crypto enforcement actions led by Gensler after the collapse of FTX Bankman Freed's crypto exchange late last year, Genzler was roundly criticized on social media and by lawmakers for the SEC's failure to impose safeguards on the nascent crypto industry. Gentler's SEC and Commodity Futures Trading Commission, chaired by Roston Benham, are the two regulators that oversee crypto activity in the US. Both agencies filed complaints against Bankman Freed, but the SEC has of late revved up the pace and the scope of enforcement actions. The SEC brought a similar action against now bankrupt crypto lender BlockFi and settled last year. Earlier this month, Coinbase settled with New York State regulators over historically inadequate know your customer protocols. Since Bankman Freed was indicted on federal fraud charges in December, the SEC has filed five crypto related enforcement actions. So the SEC is finally getting some stuff done. They have been criticized, and it's really great to see them finally do their job. And hopefully they'll essentially what I see happening is, of course, the Winkleboss twins are pissed because they are like a little cornered animal. And you know what happens when you corner an animal? They'll fight you back, but they're fighting back. And they're in a corner because they're trying to get their customers paid back. But they're having a little war with Barry Sober, and Barry Sobert is not paying them back. So now you got basically a pending, they're probably going to go and sue Barry Sobert and then now you have the SEC charge them with those charges. So once again it's just going to show you this is all inevitable. They should have all known better but I think it just they're not idiots. They should have known better but I think that they do idiotic stuff because there's already been a precedence by which people that do bad stuff, they end up just getting bailed out anyways or they just get out of it with a little slap on their hand. And we saw that many times in our history. And it's sad because basically these crypto exchanges are going to be probably let off with a small little slap on the hand but at the expense of millions and millions of dollars from their customers who they basically took advantage of. They were not good stewards of their customers money and they were using that customer's money to borrow against, to buy more assets and just become over leveraged. So we don't know what the balance sheets of Barry Silbert's DCG company is and we don't know the balance sheets of Gemini but yes, who knows, they may be worse than what we think and this could cause further cascading of crypto in general. The unfortunate part about this is that as we all know, crypto and bitcoin are two separate things. Bitcoin is not competing against any of those cryptocurrencies that are on exchanges of which there's 20,000 plus and that's still defined. But essentially as those cryptocurrencies as they get rug pulled and litigated against, so to speak, bitcoin is going to go down with them. But when it's all said and done, bitcoin just keeps doing what it's supposed to be doing every ten minutes, just block by block verifies transactions, validate transactions and it could give the rats ass about what's happening around it. Nevertheless, the cascading effect of the shit coins caused bitcoin to go down. So who knows, there might be some further damage, so to speak. Damage is not the right word. There can be some further lowering of the price of bitcoin just because of the shit coins getting finally rug pulled by regulation. It was highly necessary and I'm glad that they're finally doing something. It'll be interesting to see what the SEC does as far as new laws and regulation that come out of this. And it will also be interesting to see if the Winklevoss twins have the liquidity to be able to sustain multiple litigations and perhaps even further degradation of the value of what's on their balance sheet. I think another thing that's interesting we all know about Binance, it'd be interesting to see what their balance sheets look like if they're as bad as we think they are. According to Binat's CEO, in a stone cold manner, he told them that they're good to go and they have the liquidity to sustain even a further drop. But that was a huge liquidation. They went under anyways. We're seeing it all. Rugpool and Bitcoin will stand on the end, we all know that. And it'll be interesting just to see if everything pans out. Just another game, theoretically, in bitcoin. ", + timestamp: '00:41:05-00:48:14', + topics: ['crypto lending fraud', 'DCG', 'SCC', 'Winklevoss'], + type: 'twitter_space', + weight: 14.263422012329102, + }, + { + boost: 0, + date: null, + description: 'Decentralization of bitcoin and holding ', + episode_title: 'Café ₿: Thanksgiving Special 🦃 w/ the Café Bitcoin Crew', + guests: [ + { + name: 'Rob Hamilton', + profile_picture: 'https://pbs.twimg.com/profile_images/1524033110630969351/wTUr8S36_400x400.jpg', + ref_id: '94b18625-4778-4cfe-9c78-823704d1c1b1', + twitter_handle: 'Rob1Ham', + }, + { + name: 'Tomer Strolight', + profile_picture: 'https://pbs.twimg.com/profile_images/1591960241008148481/HtyINxtU_400x400.jpg', + ref_id: '3a2bc97d-072c-4ed9-9a59-17ceeb68fe99', + twitter_handle: 'TomerStrolight', + }, + { + name: 'DJ Satoshi', + profile_picture: 'https://pbs.twimg.com/profile_images/915987644043030528/5nh3JQSz_400x400.jpg', + ref_id: '02ae35cb-3728-441f-84c5-a8db5d9150b4', + twitter_handle: 'satoshi__tomiie', + }, + { + name: 'Lauren', + profile_picture: 'https://pbs.twimg.com/profile_images/1586022214901501952/U1dRyCxP_400x400.jpg', + ref_id: '7f14bbf5-a60b-496b-a361-3663cf120299', + twitter_handle: 'LaurenJauregui', + }, + { + name: 'Shaeroden', + profile_picture: 'https://pbs.twimg.com/profile_images/1560742113410678789/cHZ2tUjU_400x400.jpg', + ref_id: '0da06a5c-038f-4737-9af7-17bed3712e68', + twitter_handle: 'Shaeroden', + }, + { + name: 'Andres', + profile_picture: 'https://pbs.twimg.com/profile_images/1401952614795943950/aL2h3Wb4_400x400.jpg', + ref_id: 'db4abfe9-e3bb-4ffa-9783-ce67f5b20270', + twitter_handle: 'andresvbr9', + }, + { + name: 'Peter Ansel', + profile_picture: 'https://pbs.twimg.com/profile_images/1374726811221954565/R7ttqYMI_400x400.jpg', + ref_id: '2d418514-e03c-414d-8ed1-10c894aacb6e', + twitter_handle: 'peteransell', + }, + ], + hosts: [ + { + name: 'Alex Stanczyk', + profile_picture: 'https://pbs.twimg.com/profile_images/1539055022364708864/rwErK6x1_400x400.jpg', + ref_id: '3126e2a3-bbe4-456b-b298-9714085fa286', + twitter_handle: 'alexstanczyk', + }, + { + name: 'Neil Jacobs', + profile_picture: 'https://pbs.twimg.com/profile_images/1593645788978102277/UAQCQKeE_400x400.jpg', + ref_id: '0bc759e0-b055-4800-a79d-2b950fe5cc53', + twitter_handle: 'NeilJacobs', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/239722cb-4216-414a-a17b-5adf9d52e15a.jpg', + keyword: !0, + link: 'https://stakwork-uploads.s3.amazonaws.com/uploads/customers/2707/media_to_local/c25e3b3c-b5ef-435e-9e7d-9e406089e7b1/572908d4-f2cc-4c7b-980c-8359d2c8000d.mp3', + node_type: 'clip', + pub_key: '02574d6e8e787372184b6f17c40d6c6fe1777db9015801f95dfd24692784d767cd', + ref_id: '2acb23ed-c7ca-4f51-abb6-bfcc0a87316a', + show_title: 'Swan.com', + text: "I'm amazed you fell for like well, I don't know if they fell for the Rogers thing, because I think Roger believed what he was saying, but it's like, who's Roger to understand how an exchange works, right? Because I don't know. I was friends with Roger. I was talking to I know, but I was friends with him. I was talking to him all the time back then. I was working with the guy, and even I was like, but I worked a bit instant, so I had to work directly with Mount Cox back then. And it was such a shit show because I had all my funds on Cox, too. But after that experience, I was like, okay, I'm never using Cox again. These guys are a train wreck, dude. You guys got to understand that Brad was raised not only Mormon, but Canadian, which is a double whammy of gullibility. That's true. The truth is right there. Take that with some extra maple syrup today. Wow. Good one. It's amazing you're not a bee catcher, Brad. Well, Brad's also smart. He's just really nice. So he keeps being like, oh, I guess it's true. Maybe Roger does know things I don't. That's the one thing, though, I knew the entire time, was that Bitcoin was the thing to pay attention to, and you always wanted more Bitcoin, and that decentralization was the most important thing about why this asset is valuable in the first place. And sacrificing any form, any sort of decentralization, invalidates the investment case for bitcoin. So if you're going to make the blocks bigger so that people can't run nodes as easier or set a precedent that some centralized cartel of businesses or devs even, can just change the parameters of either the code or the monetary policy, that completely invalidates the sound money properties of the asset. Which is why I never fell for bitcoin cash or ethereum or any of these things, because decentralization is the most important thing. So that also is what I focused on the whole time. It's like, this is only important because of decentralization. And you have to maximize decentralization even at the expense of pumping mentals, as Richard Hart would like to say, or Fomonomics or whatever you want to call it. Like the ethereum people sacrifice their ceremony properties for ponzi. Nomics, they actually made a centralized change in the code with the IP one five nine to try to actually make the stock to flow meme of ethereum better than the stock to flow meme of bitcoin. And it's the stupidest thing, and I'm so glad, is that when they became Brad, is that when they became ultrasound money? Because I have to tell you, I've talked to many ultrasound technicians and none of them are using ethereum. So I don't think it caught on. Hey, Brad, I think the real lesson that I've learned from you, because I love when we get in clubhouse and we just rib you, it's a good time. But I think the real lesson of Brad is you can make some of the dumbest, stupidest fucking mistakes for a decade and you still come out just fine. You have a core bitcoin position. Yeah, it's good. Literally, you have to do this thing where if you're not a conservative person who's able to just safely rationally hold bitcoin and not get distracted, you know, auto diagnosed me with what was it? Activity bias. Auto. Yeah. So this is probably worth going over for anybody in the room, but everyone has activity bias. It's not just Brad. Brad just has maybe more pronounced activity bias than others. Hyperactivity bias. Yeah. So this comes from evolutionary biology, essentially, which is that, like, let's imagine you're a small mammal on the grasslands and the grass blows, but it's above your head, you can't see what's behind it. Nine times out of ten, it's going to be the wind that's moving the grass. One time out of ten, it's going to be something that's going to eat you. And so it behooves you to run away to have a strong bias towards action. Which is why all organisms on earth have a strong bias towards action. Right. Cause one out of ten times you get totally eaten by a predator. So in markets, though, this works against us because you want to have a strong bias against action, and it's very difficult to just sit still like this is the quote I posted from Jesse Livermore's book, which, again, go read reminisces of a stock operator, this bear market. It's a very instructive book. It was written in the early 19 hundreds. And interestingly enough, a lot of what was going on, like pre collapse of 1929, is very similar to what's going on in cryptocurrency today, like the bucket shops and everything. It's really an interesting parallel. But basically you want to have a strong bias against action in investing terms. And so huddling at its most simple basic level is just getting a bitcoin position and then saying no every single day to selling that bitcoin position. That's it. And then if you want to sort of judo your activity bias, right, make it work for you, you go from huddling, which is mainly a passive activity, to stacking SATS, which is an active activity. So what do you do when the price is down? You stack SATS, right? And this is a way that you could actually hijack your own activity bias for something beneficial, but you don't want to use your activity bias to trade chick coins to sell in and out of your position, generate taxable events. You want to sit on your ass and do nothing. And that's the hardest thing to do. I love it. This episode of Cafe Bitcoin has been legendary and epic in that this will be the one remembered as when American hotel compared Brad Mills to a small furry mammal in the grass trying to avoid being eaten by predators. I thought it was the wind. You blow us canadian and not a Mormon. Yeah, not anymore. One of the things that you said, the thing that you just said was great and all, but most of us don't have the ability to control our activity bias. So I think most people, like some less so than others, they're going to come in and they're going to try to trade. They're going to go search YouTube about crypto and they're going to find, like, you know, people who think they're smart, who are actually just drinking koolaid themselves. And there's a lot of people in that category, like, sure, there's bitboy and people like that who are just grifters that are getting paid to show garbage, but then there's like, people who are unbiased, they're not getting paid to show garbage. They actually are good at technical analysis and trend following things like that, but they drink the Kool Aid of Defy and crypto and NFPs and they start giving smart sounding advice to new entrants and then they just create a whole class of people that are going to just go repeat all the mistakes that all the early bitcoiners made with their activity bias. So the thing is I think we really should push the idea of for new market participants and even people in here that maybe got ripped off on Luna or Celsius or FTX or any of these things we've all kind of had those types of experiences in the past. The way you get forward from it. I think honestly if you can't do what Hauddle said and actually control your activity bias and recognize that and just sit patient just buy and hold and dollar cost average and maybe had your risk at the top or something like that is create an internal bitcoin maxi personality like this is what the allship owners should do they should drink the bitcoin Koolaid like Jekyll and Hyde style have a bitcoin maxi personality inside of them. Even if they think bitcoin Maxis are cringe and stupid and boomers and don't understand utility, blah blah blah, every shift corner should have a bitcoin Maxi inside of them. Wait that doesn't sound right. Okay, so every shit corner should have a bitcoin maxi inside of them that controls their bitcoin, the private keys to the bitcoin and that bitcoin maxi personality needs to sign up with Casa or Unchained or somebody to do multi stig to protect the other personality. The FOMO sapien activity bias personality from going out and gambling away all their money. Yolo betting on some ICO buying a JPEG because Gary vee told them it's going to get them into his bedroom or something like that there needs to be like everybody should have a bitcoin max inside them. I'm just calling it that's what they got to do. And let the bitcoin maximize personality. Manage your bitcoin and segregate your portfolio so that you're protecting yourself from your Dgen side and if everybody did that they'd be like me because I made all these mistakes and then I'm still here and bitcoin changed my life. So most people are going to shit coin they should just do it in a way that protects themselves from what inevitably is going to happen. ", + timestamp: '01:43:16-01:52:28', + topics: ['ultrasound money', 'Ethereum', 'bitcoin maxi'], + type: 'twitter_space', + weight: 13.933148503303528, + }, + { + boost: 0, + date: 1671644776, + description: 'Some of the importance of Bitcoin Creator spaces and how it helps Bitcoiners', + episode_title: '#Bitcoin Creators Space', + guests: [ + { + name: '@DecouvreBitcoin', + profile_picture: 'https://pbs.twimg.com/profile_images/1362747604044566530/Invedmre_400x400.jpg', + ref_id: '0eda190b-4373-41fc-bc28-c3b95af30949', + twitter_handle: 'DecouvreBitcoin', + }, + { + name: '@Bridge2Bitcoin', + profile_picture: 'https://pbs.twimg.com/profile_images/1533812215198924800/vAAlVRxO_400x400.jpg', + ref_id: '1aaf2c24-8d26-4038-b55a-8b94427b20c7', + twitter_handle: 'Bridge2Bitcoin', + }, + { + name: '@orangepillapp', + profile_picture: 'https://pbs.twimg.com/profile_images/1570918965601505282/SOApRCif_400x400.jpg', + ref_id: 'ba5b79b4-e2e7-4778-8879-df793b8420a4', + twitter_handle: 'orangepillapp', + }, + { + name: '@knutsvanholm', + profile_picture: 'https://pbs.twimg.com/profile_images/1586261395833774081/RQ8SYxiM_400x400.jpg', + ref_id: 'e12ebe66-706b-40d2-804a-861a4c79bbfa', + twitter_handle: 'knutsvanholm', + }, + { + name: '@bcvFoundation', + profile_picture: 'https://pbs.twimg.com/profile_images/1460813196902633476/edbNgO7y_400x400.jpg', + ref_id: 'd65bc3c3-cdd7-4539-8cb9-6a8d86f580c8', + twitter_handle: 'bcvFoundation', + }, + { + name: 'Christopher', + profile_picture: 'https://pbs.twimg.com/profile_images/1345072452775370754/cBVFzpkV_400x400.jpg', + ref_id: '7dacb545-925d-4201-9b9c-869d992dcdb3', + twitter_handle: 'Chrissuccess', + }, + ], + hosts: [ + { + name: '@steliosats', + profile_picture: 'https://pbs.twimg.com/profile_images/1495784740921786371/a73Qu4HR_400x400.jpg', + ref_id: '7eed8e35-f762-4882-adf9-b45ad16c3c54', + twitter_handle: 'steliosats', + }, + { + name: '@geyserfund', + profile_picture: 'https://pbs.twimg.com/profile_images/1554429112978120706/yr1hXl6R_400x400.jpg', + ref_id: '02a48cf4-58d0-4014-803c-9120dedeec52', + twitter_handle: 'geyserfund', + }, + { + name: 'UKNOWN', + profile_picture: 'https://pbs.twimg.com/profile_images/930811252665933826/2cVZF58S_400x400.jpg', + ref_id: 'bcd18bb0-8224-4f6b-af71-e16120ae4323', + twitter_handle: 'NodedPodcast', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/c9bb5d58-c781-464d-878a-8b6c469ba198.jpg', + keyword: !0, + link: 'https://stakwork-uploads.s3.amazonaws.com/uploads/customers/2707/media_to_local/885fe09b-bb21-49a5-8667-3c73ed36918f/196dc1e8-c7a4-4dc7-902f-d00107aefb42.mp3', + node_type: 'clip', + pub_key: '0372cd0c8469f2034336a243e018d4d60e07efef8e7d10417807da1173bd5b002f', + ref_id: 'c80659ad-87eb-488c-be5d-00ac386a2b15', + show_title: 'Geyser 🌊', + text: "Did you get the invite? I'd love to hear about what your features releases are up to. So Builders feature orangeville app. We have Lightning Piggybank, which is essentially an electronic cash piggy bank for children that accepts bitcoin sent over lightning. So this is a pretty small project, but it's a pretty sweet thing, actually. So let me add this to the it's pretty incredible, actually. I need to show you guys. I need to show you this. Imagine a piggy bank, but instead of an actual pig, it's like a cardboard box with a Geyser satoshi. Yes, we did. What's up, mate? I cannot do from the desk, though. You cannot talk? I'm not on desktop. Oh, no. You can't talk from desktop? No, it's got to be mobile. Yeah. It'S painful. Yeah, we got to talk to you. Yeah, exactly. But yeah, just to finish up this thought, there you have this really cool piggy bank which has this, like essentially this counter, this wallet counter of how many Satoshi the project has, which is really cool. And this person is just raising money connecting their Geyser project onto their Lightning Piggy Bank, which is fucking cool. I mean, this looks like a little DIY type of fun project that a father did for his son or something super cool. But let's go back to you, Matteo. Let's talk about orangeville app. Why not? What's up with you? Yeah, for sure. Orange. Bill app is a mobile app. We use Geolocation, which is the only approximate to connect you with nearby users, nearby pledge, and soon we'll let you find events. So meet up, conference, whatever. Actually, it could be anything because the user can create events straight from the App and then put the address. And then you'll be able to invite people there nearby to the event. So it doesn't have to be a meetup. It could be like a soccer game or picnic on the beach or anything. That's pretty cool. Hopefully it comes out January or February. Definitely February. And then we're going to launch the search feature, which will allow you to search for people all over the world. So if you're traveling and you're going to Ghana, you'll be able to look for clubs in the App there in Ghana. And then you can chat them up and say, hey, I'm coming to Ghana next week or next month or whatever, and I'd like to meet with you. I don't know anybody in Ghana. And of course, you can also search by gender for dating, age, profession. Right? We got to do yeah, I'm sure it's going to be like 95% guys, though. It's not can you confirm that? No, it's not. I don't have the number precisely because some users, they don't put a picture. And I know there's one woman that I talk to, obviously I talk to everybody on the app and you wouldn't know she's a woman, but it's a woman. But I think it's about 10% women and 90% men, which it looks it doesn't look good. But Tinder, which is the biggest dating app on planet, the ratio meant to women, it's 97% men, 3% women. No way. I know, it's crazy. Wow. But there's so much there's so many. Better than they are. Yeah, we're doing better than Tinder. Yeah. The point is that when you have, I don't know, hundreds of millions of user, it works even if you have one or 2%. But yeah. So with the search, you'll be able to search, obviously only if the other users have disclosed those information. So age, gender, profession, which is going to I think the profession looking for Profession is going to kickstart the Bitcoin secular economy, right? Because imagining you can look plumber in Oxford and then you can paint that because obviously if it's in the app, it's a bitcoin max. Right. So that's going to be very exciting. The Meetups is really the first iteration of the social movements, right? It's a social network that Bitcoin is creating that you are enabling through the IRL meetups. But that's really the first iteration. Well, the Meetup is every meet up is not necessary. You can search for plumber and connect with the guy or girl, whatever, and then it's like you found the plumber online instead of on the app. And, you know, he's already a player because he's on the app and he's paying to be in the app. So we filed through all that kind of stuff. So Profession, I think, is going to be a big game changer for Bitcoin ecosystem. And then location again, travel, or if you just move to a place or whatever, and then obviously user name. So if you want to connect with some specific plan. So the search yeah, it's going to be amazing. So when's the search coming out? I think we're launching the search on a limited version of Search. We can only search by username probably this week or next week. And then we're going to expand it like, we're going to expand it ideally in January. Right now we're focusing 100% on Android because obviously, especially in some part of the part of the world, most labs have an Android. And so we need to be on Android ASAP, which will come in January. But yeah, searches come in ASAP. I think January, February, like Q One, 2023, we're going to launch pretty much everything. And then after that, we're going to launch the Orange Pages. So Orange Pages, it's in the name, right? We have partnered with oh, nice. Yeah, we partnered with BTC Map, and they have all the merchants that accept bitcoin. We got the API, and so you'll be able to look grocery store or airstalls, whatever you need right through the app on a map. So one place to find all these people, all these merchants and businesses and friends and girlfriend and boyfriend and events and meets up. So it's one stop. For all on Top Shopify. All the Bitcoin connections in real life in the offline. Right. The goal is to foster as many in real life connection as possible because I think that's how you win the battle when we meet him in real life is 100 times more powerful than meeting sending a DM or an email or a zoom call, right? Yeah. Right. So where does Geyser come in here? You guys are launching a project, right? We are. So what's the idea? Like, what's the idea behind the project? Yeah, probably today, maybe tomorrow. We're going to launch the campaign on Geyser. If you get a membership, orange fill up is a membership based up. Why? Because first, we don't want to do advertising. Everybody hates advertising, I think, especially the clubs. Second, we don't want to do any tracking of data, any data monetization, any of that. Third, we don't want spammers and scammers and bots and people that they just don't care about Bitcoin. So the app is membership based. If you go through the app, unfortunately, you have to pay with Fiat because Apple doesn't let us take payment in SATS, but we also have membership in SATS that you can buy on our website, which is Theorangeprop.com. Actually, it's my domain. It's also bitcoin is social. Just put it yesterday and then on Geyser. Nice. Yeah, I know. It was available. That's amazing. $10 on Geyser. That's going to be worth millions ", + timestamp: '00:19:42-00:29:28', + topics: ['Bitcoin Creator space'], + type: 'twitter_space', + weight: 33.67529732328345, + }, + { + boost: 0, + date: null, + description: 'Problems with the beef industry in the United States', + episode_title: "The Orange Sun 🌞 Let's talk #Bitcoin & Cattle Ranching/Sustainability", + guests: [ + { + name: 'Texas Slim', + profile_picture: 'https://pbs.twimg.com/profile_images/1589784780970795011/02jf0fqp_400x400.jpg', + ref_id: 'b4448c8e-9238-4aba-bd25-efb329ea5a72', + twitter_handle: 'modernTman', + }, + { + name: 'Lucas', + profile_picture: 'https://pbs.twimg.com/profile_images/1596345084966014976/maviSGq3_400x400.jpg', + ref_id: 'e3adb591-b29f-435b-bd34-210f2dbcedaa', + twitter_handle: 'impossiblyso', + }, + { + name: 'Firebust', + profile_picture: 'https://pbs.twimg.com/profile_images/1517827165198458880/N79Wpx85_400x400.jpg', + ref_id: '0fb6c7f3-a673-4fe5-9599-8165800a2ff0', + twitter_handle: 'FireBursts', + }, + { + name: 'Hamza Yusuf', + profile_picture: 'https://pbs.twimg.com/profile_images/1318064165030940672/sakbSOvT_400x400.jpg', + ref_id: '03a74669-b653-4c57-8799-a312cb041089', + twitter_handle: 'Hamzayu28849293', + }, + { + name: "Adenekan's Father", + profile_picture: 'https://pbs.twimg.com/profile_images/1505572078023495683/Wo_pJvTU_400x400.jpg', + ref_id: 'b8259997-2ef0-4e6e-8d58-a69b5eda550a', + twitter_handle: 'AdenekanFatai4', + }, + { + name: 'Adenekan', + profile_picture: 'https://pbs.twimg.com/profile_images/1505572078023495683/Wo_pJvTU_400x400.jpg', + ref_id: 'ca6a563e-0e84-4811-be82-a3b3cd12d399', + twitter_handle: 'AdenekanFatai4', + }, + { + name: 'Heritage', + profile_picture: 'https://pbs.twimg.com/profile_images/1510397558652350469/jYOl00tU_400x400.jpg', + ref_id: '98a6d9df-3c39-49ec-8a39-074e61af4ece', + twitter_handle: 'herrytheeagle', + }, + { + name: 'Enoch', + profile_picture: 'https://pbs.twimg.com/profile_images/1596235105663533056/5mRUbLm3_400x400.jpg', + ref_id: '4f8af040-3d0c-49c1-806e-aef89d8693fb', + twitter_handle: 'KazEnoch', + }, + ], + hosts: [ + { + name: 'Jeremy Garcia', + profile_picture: 'https://pbs.twimg.com/profile_images/1589056396816896001/dslbBQSX_400x400.jpg', + ref_id: 'e5e68f75-d71a-4477-ae9a-6a891f2d84d0', + twitter_handle: 'Jerimican5445', + }, + { + name: 'Oluwasegun Kosemani', + profile_picture: 'https://pbs.twimg.com/profile_images/1538403135101800450/sO-RPI9U_400x400.jpg', + ref_id: '25ce4b90-6689-4dd9-84b6-240c7bcbe407', + twitter_handle: 'MrlamilamiKosch', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/9b2e17f2-71c5-4f1e-a3e7-720d06dab810.jpg', + keyword: !0, + link: 'https://stakwork-uploads.s3.amazonaws.com/uploads/customers/2707/media_to_local/a91f79fd-d85f-4440-b012-4bdafdc83341/f1d1c5b5-b8c9-44ed-a217-f75b398376d5.mp3', + node_type: 'clip', + pub_key: '02574d6e8e787372184b6f17c40d6c6fe1777db9015801f95dfd24692784d767cd', + ref_id: 'd8a44c3b-6219-49d5-9a35-4b2ca5972d7c', + show_title: 'Satoshi’s Journal', + text: "at this time I wanted to get the perspective of Texas Lim and Dennekin and Hansa, I'm sorry if I'm mispronouncing your name, but Texas Limb, could you just briefly tell us what the problem is with the beef industry in the United States relative to the commercialization thereof? And then I also want to just hear the same thing from Adenikan to see if they have similar problems as we do here in the US. Please go ahead there. Texas Lim. Yeah, you brought up earlier basically the multinational processors in the United States and whenever we say processors, okay, that's the same as, you know, in Nigeria then using the butcher. So let's make sure everybody has that perspective and understanding. We have processors and butchers are basically the same thing. They're the ones that harvest the animal, they're the ones that cut the animal up and in the United States they also control the distribution. What has happened in the United States throughout the my lifetime. Basically. I'll use Texas as an example. We had a processor butcher in every county across the state of Texas. That was 254 butcher processors. They were called microprocessing centers. They're called abortoires butchers, whatever you want to say, but they're the ones that harvest the animal. Well, in my lifetime now, those 254 processing centers are no more. And what we have is for multinational processing, basically corporations, they're not basically housed in the United States. Three of them are from Brazil, South America. And what they do is they control the butchering, the processing of the cows. They also control the distribution. The distribution is a global market in which United States consumers do not have access to. The beef has grown in the United States, the beef is harvested. In the United States, the beef is shipped overseas to the highest bidder. This happens across many different countries. In Australia, they're up against the same thing. A lot of their beef is shipped across seas to the highest bidder. Same thing in Africa. Africa's beef is not basically being consumed by the African people in a way. Or basically the distribution is not controlled by the butcher processors. I'm not for sure exactly on the same level, and it can speak to that. But in the United States, we've always said that we have to feed the world. Well, we never did feed the world. What we did was we created distribution centers across the world to a lot of the highest bidders. And what we did in the United States is we quit feeding our communities. We took the most powerful food sources and we shipped them overseas to where the American people are suffering. And one of the biggest bottlenecks to our basically beef in the United States are these multiprocessing centers, the multinationals JBS Cargill, national and Tyson. And so they have a lot of poll across the globe. Nigerian beef is also sold on that same global brokerage market, same as Australia, same as South America, same as so many small countries that basically do not have access to sound money. And basically all of that energy is stolen and shipped to the highest bidders. Eliminating any form of distribution to local communities. That is what we have to get back to. That's what the Beef Initiative is accomplishing right now. We're building out nodes across the United States where we're back to feeding our communities first, and then we distribute across the nation. And we do it by ourselves. We do not have to have permission from the multinational processing centers. We have our opening up our own processing centers. And therefore we control the distribution. And that's kind of a good long and short of it as far as what we are up against. As I say, the biggest threat to the American rancher at this time is the multinational processing centers, which takes away basically the power to steward the animal to its right age and age and weight and basically how they do that is they do not give access to processing centers in a timely manner. And a lot of times you will have to basically schedule kill dates within the cattle industry in the United States a year and basically 18 months out. That is hard to do as a rancher in the United States, because you quit being a rancher and what you become is basically a babysitter of that cow all the way until it's going to be harvested and the money is made by the distribution in the processor, not the cattle rancher. Whenever you do not have access to that processing center, you lose out probably two thirds of what your margins could be in the United States. And therefore, if you have access to a decentralized processing center, as you do through the beef initiative, let's say you sell a cow, if you're having to use one of the multinational processings, you'll make maybe $400 profit off that cow. If you're able to take that cow all the way to the consumer themselves, in which the beef initiative gives people market access to be able to do that, $400 basically turns into anything between probably 25 and $3,500 margin. So you can understand how much control of the margins profits that the distribution, the multinationals have taken away from the American rancher. I have to say that it's probably the same in a lot of similarities across the globe, because if you control the butchery, the processing, you control the cow in a way that has been taken away from the rancher. And I think that's amazing, the parallel, because the fact that money has been controlled since the advent of money by central authorities so as to have power over the people, it's the same thing. Cattle industry and in farming is the powers that be. If they can control the land and they can basically monopolize the farming and ranching, then they can control the people to a certain extent. That's the reason why we have to get onto a decentralized money and onto decentralized farming. And that's essentially what the beef initiative ", + timestamp: '00:53:50-01:00:33', + topics: ['Beef processing centers', 'Beef distribution', 'butchering'], + type: 'twitter_space', + weight: 13.423835754394531, + }, + { + boost: 0, + date: null, + description: 'Changing the narrative about Stackchain and Bitcoin', + episode_title: 'Café ₿: Sovereign Computing w/ Matt & Aiden, Start9', + guests: [ + { + name: 'Andrew', + profile_picture: 'https://pbs.twimg.com/profile_images/1465763053014859786/xYFN2czJ_400x400.jpg', + ref_id: 'ae4b13f8-0ee7-480a-b47a-82b967ad7a79', + twitter_handle: 'AP_ArchPublic', + }, + { + name: 'Matt Hill', + profile_picture: 'https://pbs.twimg.com/profile_images/1347317316057321474/ieMjzK3x_400x400.jpg', + ref_id: '3576ad28-a04d-4388-865b-3ec5114c4f9f', + twitter_handle: '_MattHill_', + }, + { + name: 'Lauren', + profile_picture: 'https://pbs.twimg.com/profile_images/1586022214901501952/U1dRyCxP_400x400.jpg', + ref_id: '7f14bbf5-a60b-496b-a361-3663cf120299', + twitter_handle: 'LaurenJauregui', + }, + { + name: 'Aiden McClelland', + profile_picture: 'https://pbs.twimg.com/profile_images/1470160097225498624/0BjKB_2W_400x400.jpg', + ref_id: '04ddd9d4-9329-4e6c-aaa3-d65ea4a9342a', + twitter_handle: '_dr_bonez', + }, + { + name: 'Peter', + profile_picture: 'https://pbs.twimg.com/profile_images/1581695667193643009/EljNY-TH_400x400.jpg', + ref_id: 'a3384925-e15e-421d-b9f9-6d44e273ed05', + twitter_handle: 'PeterAnsel9', + }, + { + name: 'Lisa', + profile_picture: 'https://pbs.twimg.com/profile_images/1541581547815436288/Li8wORWt_400x400.jpg', + ref_id: 'e6f0c6e3-3237-4b13-878f-bb740cd32f8d', + twitter_handle: 'lisa_hough_', + }, + { + name: 'Isabelle', + profile_picture: 'https://pbs.twimg.com/profile_images/1466874333410717698/WRQh2-_m_400x400.jpg', + ref_id: 'c8df253f-47b3-465e-878e-8405c01c090d', + twitter_handle: 'isabelfoxenduke', + }, + { + name: 'Tone', + profile_picture: 'https://pbs.twimg.com/profile_images/1416821178266787844/T1OkI9ZW_400x400.jpg', + ref_id: '5729ac07-51d6-4268-b585-62680c846acb', + twitter_handle: 'ToneVays', + }, + ], + hosts: [ + { + name: 'Alex Stanczyk', + profile_picture: 'https://pbs.twimg.com/profile_images/1539055022364708864/rwErK6x1_400x400.jpg', + ref_id: '3126e2a3-bbe4-456b-b298-9714085fa286', + twitter_handle: 'alexstanczyk', + }, + { + name: 'Derek', + profile_picture: 'https://pbs.twimg.com/profile_images/1598322677827207169/Cw0A3oOP_400x400.jpg', + ref_id: 'f441b996-7eeb-4210-b24c-fa011161709d', + twitter_handle: 'derekmross', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/239722cb-4216-414a-a17b-5adf9d52e15a.jpg', + keyword: !0, + link: 'https://stakwork-uploads.s3.amazonaws.com/uploads/customers/2707/media_to_local/0ec4a941-250c-4e1d-8d2a-6c506c3ba4b2/4bd8010d-b2fd-41b4-8041-8a953ef06492.mp3', + node_type: 'clip', + pub_key: '02574d6e8e787372184b6f17c40d6c6fe1777db9015801f95dfd24692784d767cd', + ref_id: 'd72f67b3-c42f-43cf-8e01-47065fe8e638', + show_title: 'Swan.com', + text: "Good morning. Good morning. Alex is getting him up here, but what's up, Derek? What's up, Hand? Good morning, sir. Morning. I've seen you down on the trenches, Derek, defending the stock chain. Oh, absolutely. There's a lot of defending going on last evening. It was fun though. We made progress. He seems to be changing his stance. Yeah, it was great. It was actually one of our best shows we've done in a while. Tell us a little bit about it. Well, yesterday during Cafe Bitcoin, brad Mills had tweeted out that Stack Chain was a shit coin and then proceeded to run with that narrative throughout the day and different polls and post comments. Whatnot? Peter and Greg Foss and others called him out during the show. But throughout the day he continued to talk about Stack Chain in that way. We thought that it was kind of a lack of information available, right? And we had hoped that once he saw what Stack Chain was, our community project, what it was all about, what we were doing, that he would change his tune. So we invited him to our evening spaces and for 2 hours we talked Stack Chain about basically all of our accomplishments and different things that we've done over the past four months. And he changed his tune. He is not sure about our massive Twitter thread, the actual Stack Chain itself, but he understands and understood every other aspect of our community from lightning nodes to support, to donations across the world, to bitcoin communities, to having fun and stacking stats. It's an interesting progression. What did he not get about the long Twitter thread? He took back his initial statement too because he was talking a lot of crap yesterday. I mean, he got a first hand experience of that Stack Chain energy all day. He was basically calling everyone in Stock Chain shit coin and calling Stack Chain a shit coin and so doing like polls and all kinds of stuff. And so Stack Chainers weren't too happy about that. I'll tell you what though, him talking about it was great for Stack Chain because it spread awareness that a lot of his followers had no clue what Stack Chain was. We had new Stackers come in last night and do stack joins and get new blocks. So. Hey, fudd is great for stack chain. Apparently it spreads awareness. It's like bitcoin. It's funny, it's like the ECB, the more they shit talk bitcoin, the more relevant bitcoin becomes. Absolutely. They don't even talking about bitcoin. What's that like? Yeah, like they're huge. Bitcoin is so small, what are they. Even doing talking about bitcoin? No, that's the point though, if they are talking about it, that means it is relevant regardless of whether they're trying. You see what I'm saying? Oh, I see. All right, I'll be right back, I'm going to grab my coffee. Do what you want. I am pretty surprised that he stayed in there for the whole two and a half hours and just kind of listened to what everyone had to say. I thought that was actually pretty decent of him. Absolutely. Especially in the beginning he was getting attacked a little bit, everyone's defensive of our community, so I think that he had a fixed skin and he stayed around and he learned his final conclusion was basically like oh, Stack Chain similar to the community that I have over on Clubhouse. I was like, well yeah, we're literally just friends buying bitcoin together and having fucking fun. He compared it to the original Pleb movement, which I wasn't really understanding that comparison, but it was an interesting conversation for sure. That poll that he did was pretty funny. Most people are like what is Stock chain, right? And then Lauren's response in that thread was the absolute best. She did another poll. How many of these people voting are shitcoiners or followers or shit winners? Really funny. Yeah, I wasn't triggered at all. Alex. Mowing bare action coming in. No talking about bitcoin at Thanksgiving. Marin yeah. Alex my mom sent me another text yesterday. I don't know what her vendetta is about bitcoin, but I can't talk about it at Thanksgiving now. I have online friends that are bitcoiners that she's coming at and text messages. We added my mom, just as a joke to one of the stack chain, like, back end chats. And it's really funny. She has no idea what's going on in there, so now she has a lot to say about that. So one of two things is either is going to happen, it's either slowly going to sink in that she's maybe a little off base, or she's going to double. Triple down. Yeah, she's tripling down right now. Oh, that's too funny. That's an interesting phenomenon. That was well documented, I thought, in that article was talking about the other day. What was it called? Why people struggle with bitcoin by Nick Beard. You guys should go check that out. I thought it was really well written talks about people who just can't, for whatever reason, they just can't. They tend to double down. Down, triple. I have yet to see somebody who's tripled down, so to speak, come around. Have you guys seen examples of that? A triple down person would be somebody like a Rubini or a chef or a monger or you guys understand what I'm saying? They go from, yeah, I don't think this thing is a thing to just full on attacking it's immoral. It's going to destroy society in the environment, et cetera. Those people are married to their beliefs, and you're not going to change them at least anytime in the near future. So that's like an ideologue, right? It doesn't matter what the facts are. They're going to believe what they're going to believe. And a lot of that, I think, is tied to their survival in some ways. Back to that saying you can't convince somebody of anything if it directly contradicts what they use to make a living or whatever. ", + timestamp: '00:04:20-00:11:57', + topics: ['Stackchain'], + type: 'twitter_space', + weight: 13.423835754394531, + }, + { + boost: 0, + date: 1670706053, + description: 'Stacks is trying to reinvent the wheel - Bitcoin Maxi', + episode_title: 'Bear Market Buidl — Major #Bitcoin developments! #Stacks #Sidechains', + guests: [ + { + name: '@GriffdenNFT', + profile_picture: 'https://pbs.twimg.com/profile_images/1604377729062895617/R4pSEdH4_400x400.png', + ref_id: 'dafdf7ec-28c0-43d3-a0d9-b2d266f38738', + twitter_handle: 'GriffdenNFT', + }, + { + name: '@Chad_333', + profile_picture: 'https://pbs.twimg.com/profile_images/1592310541732970496/o1tbw9Eo_400x400.jpg', + ref_id: '484c7695-6a4e-4141-9585-1109bf23f8cf', + twitter_handle: 'Chad_333', + }, + { + name: '@jackbinswitch', + profile_picture: 'https://pbs.twimg.com/profile_images/1601214177439260672/O0SpU5B1_400x400.jpg', + ref_id: '9685e7f3-3e0c-4b84-9fd9-b8a1d96f6ae9', + twitter_handle: 'jackbinswitch', + }, + { + name: '@jimdotbtc', + profile_picture: 'https://pbs.twimg.com/profile_images/1593210347825119237/L_SNThWQ_400x400.png', + ref_id: '5dcf5545-fad6-44ee-ae56-360c5efe1151', + twitter_handle: 'jimdotbtc', + }, + ], + hosts: [ + { + name: '@BigRpic', + profile_picture: 'https://pbs.twimg.com/profile_images/1604962150388219904/WqiCye-r_400x400.jpg', + ref_id: '726f0c95-9d94-4d44-a056-8ad3c9e3ddd5', + twitter_handle: 'BigRpic', + }, + { + name: '@CarlsonDoc', + profile_picture: 'https://pbs.twimg.com/profile_images/1597382056308350977/1NPexynZ_400x400.png', + ref_id: 'e34fa2b2-a58e-4461-81a0-d10c1058dfc2', + twitter_handle: 'CarlsonDoc', + }, + { + name: '@STXLDN', + profile_picture: 'https://pbs.twimg.com/profile_images/1533793338931007488/o3laQDCp_400x400.jpg', + ref_id: '5c3bc906-3aed-44f9-851a-94804c6fe5ca', + twitter_handle: 'STXLDN', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/99046513-2614-4eae-9de4-5781ba4b330a.jpg', + keyword: !0, + link: 'https://stakwork-uploads.s3.amazonaws.com/uploads/customers/2707/media_to_local/fc3bebcb-8271-433e-8d81-84dd06f3b022/aec527bc-539d-4d3b-9bad-db4af9e1a1ba.mp3', + node_type: 'clip', + pub_key: '03c7a7f42d94fdfc7a655515c1421cd1d20db090a1c24150201de0b1dc6a30b0ee', + ref_id: '3cced3da-246a-4df7-884c-689661de7d66', + show_title: 'STX:LDN', + text: "conversation in one Twitter spaces where somebody had actually said something about I think their analogy was like, oh, so Stacks is trying to reinvent the wheel and you don't need to reinvent the wheel. Everyone's heard that argument comes from the max before. I mean, I think people repeat what they hear and it's like, ultimately I'm a bitcoin Maxi. What really shocked me when I got to the Bitcoin conference was that it's like, oh, I'm like out. I like, really helped back in 2013, I think 2012, actually, dash and I went to our first bitcoin. I've got a photo on Facebook. We went to a Bitcoin London conference because we'd made our minds that we were going to get this ATM. It took quite a long time to kind of sort it out, but yeah, I think with 2012, we went to the Bitcoin conference and it was just such a small space and then to walk in. I'd never been to the Bitcoin conference in Miami before. I was really lucky enough to get invited by the Stack conference to go and talk. So while I was there, I thought, well, I'll buy a ticket for the Bitcoin conference. It was like $1,000 or something, and I was out of there within an hour. And I was quite depressed because I was like, I'm not part of that gang. And I felt like walking in there being like, hey, look, we've come. And actually it was like, oh, I'm kind of out. And I do think that there's there's just forces at work here, unfortunately, which are kind of corporate forces, which are setting the tone and just slowing things down. But, you know, I know we're all impatient, but ultimately time will tell. And I'm sure that the open source, decentralized nature of Stacks means it will be an unstoppable juggernaut, just as Bitcoin was. But there's literally people trying to slow it down, trying to play the advantage while we're small to keep us silent. And part of that is kind of brainwashing people. There are several things at work, and it's cool that you brought it up, Jim. The first thing is, we're the early adopters. We're the earliest adopters of early adopters on a macro time frame. If you look at how long, if you look at the scope of what's actually happening here, this is a move to it. Like, we talk about the industrial age, you talk about the Bronze Age, you talk about the no, we're at an epoch of time in human history with this information age or whatever you want to call it. And as we are right now, if you were looking at a chart, we're just barely making ripples in this macro time frame. What we do now is going to reverberate for several generations after us. And the thing is, when you were talking about one of the things that Stacks has to address is everybody knows what Bitcoin is. But then the second you hear anything else and you see the three letters, whether it's sol or STX or whatever it is, stacks just gets put in that category of, oh, that's just another coin to address that. You have to assume the audience has a basic understanding of crypto, has a basic understanding of why crypto matters, has all of these different things. So a lot of I think what we're fighting against right now are headwinds that won't exist in 20 years. Getting rid of the crypto element, that's the way it gets important, is once people don't even associate the word crypto with what they're doing. And one of the things that I'm working on, hopefully for next year is we've got a comedy festival in Brighton, and we're working with experts to see if we can come up with an entire ticketing solution in time. This is I think it's in February 2024. And so if we can come up with an X verse wallet that holds a ticket and a kind of process for the stewards, reading those tickets and letting people into the venue. We can onboard 20,000 people. That's a long weekend. It's a Thursday to a Sunday and we have three large venues. We get about 20 to 25,000 people through in those four days and they will all have an expert wallet. That's what we're trying. That's what I'm hoping for. Luckily, my wife is the producer of the festival, so she's witnessed a decade of me going through this stuff. So she's trusting me that I can kind of say, I think I can pull this off now. I've spoken about it for years, obviously since 2015. Like we were talking about, Alice is like, yeah, Straightaway is going right, this is going to replace all tickets. Do it now. Within two weeks, we'll just be all on the blockchain. But here we are several years later. But now it's actually a possibility with stacks and with experts. We had to have mobile. That was the frustration a year ago. We were like, yeah, this is ideal. We were even trying to do a fat boy slim gig where I was asking for guest list for it, which is a big live show he was doing. But I was like, Give me some guest list. I will stand at the gate with my laptop and figure out how to get people through. You don't worry about that. I'll make sure the right people get in because I was just like, let's just at least do something because we can do this. But now that they're on mobile, hopefully we've got a year or more than a year to kind of pull together a solution where suddenly we get 20,000 tickets into people's walls. And what some people don't sometimes appreciate is that the whole beauty of crypto with this pseudonymous network is that a payment network is a communication network. They're the same thing. And so the minute you've got tickets in someone's wallet, well, you can now communicate with them. You've got like a reach to them. You don't know they've not given you any information. You don't know who they are. But you've got a communication channel. So now they've got a ticket. You can now say, okay, well, now your ticket. Maybe we can maybe if we've got time to get there, it's like, now your ticket can be staked after the event. The ticket is an NFT and now you can stake your ticket and that's earning you money off your next year's tickets. And these are all non crypto people. And that, I think, is, I guess, our key because ultimately that's all I found within crypto is just walls. It's amazing to have these bridges. It's amazing that this stuff is going on, but it's still just a real battle. And actually what's going to really change things is when we can get those applications out there that are onboarding masses of non crypto people who just have a phone, and now they have an app on their phone and that app is connected to Stacks, and they don't even need to know about the connection to Stacks. They just have an app on their phone that holds their tickets and gets promotions out to them and they just show it to someone. When they turn up at a venue, it gives them a QR code in the when we get there, I think that's when we can really onboard the message. ", + timestamp: '00:48:55-00:55:58', + topics: ['Bitcoin Maxi'], + type: 'twitter_space', + weight: 24.555915094150443, + }, + { + boost: 0, + date: 1672099200, + description: 'Controversies about energy sources in the world', + episode_title: 'Blockware Intelligence Podcast: 2022 Highlights', + guests: [ + { + name: 'Michael', + profile_picture: 'https://pbs.twimg.com/profile_images/1558687629599657990/vf-bU14b_400x400.jpg', + ref_id: 'c7b4faa1-db77-4459-b03f-0e41e15efae7', + twitter_handle: 'MichaelHawaii', + }, + { + name: 'Cory Klippsten', + profile_picture: 'https://pbs.twimg.com/profile_images/1569687200857755648/fxiCeaqc_400x400.jpg', + ref_id: 'ddfb9b4c-4e6a-4f4c-a01b-e6bb1bc55464', + twitter_handle: 'coryklippsten', + }, + { + name: 'Joe Consorti', + profile_picture: 'https://pbs.twimg.com/profile_images/1596902707511664640/GYGWVDts_400x400.jpg', + ref_id: '8d2024b2-03bb-454d-9bd6-bb121904b76a', + twitter_handle: 'JoeConsorti', + }, + { + name: 'Jeff Booth', + profile_picture: 'https://pbs.twimg.com/profile_images/1362957991410954241/spiaMAg2_400x400.jpg', + ref_id: 'f1143bcc-9ab9-4716-8259-0e5b026f8039', + twitter_handle: 'JeffBooth', + }, + { + name: 'James Lavish', + profile_picture: 'https://pbs.twimg.com/profile_images/1466279082157502464/flD6cWI3_400x400.jpg', + ref_id: 'cf06ab2d-2ff3-4d7b-bef6-b996ae68517a', + twitter_handle: 'jameslavish', + }, + { + name: 'Adam O', + profile_picture: 'https://pbs.twimg.com/profile_images/1395896857990160391/tJpgS2_p_400x400.jpg', + ref_id: '95af0dd3-1e27-41b9-a36b-8a2c44438e85', + twitter_handle: 'denverbitcoin', + }, + { + name: 'Jack Mallers', + profile_picture: 'https://pbs.twimg.com/profile_images/1599778945699909632/O0qc9ykA_400x400.jpg', + ref_id: 'd2e4aac5-e5e1-42fc-8f08-b3a77c076a64', + twitter_handle: 'jackmallers', + }, + { + name: 'Lyn Alden', + profile_picture: 'https://pbs.twimg.com/profile_images/1521181379677073414/bm4LcJTr_400x400.jpg', + ref_id: '903381dd-4b8a-4b59-8ecd-3281ae3ba297', + twitter_handle: 'LynAldenContact', + }, + { + name: 'Dylan LeClair', + profile_picture: 'https://pbs.twimg.com/profile_images/1508157904913899522/3l7ctauV_400x400.jpg', + ref_id: '283edea0-55cf-4245-95df-8d6d3dcb1851', + twitter_handle: 'DylanLeClair_', + }, + { + name: 'Jeff Ross', + profile_picture: 'https://pbs.twimg.com/profile_images/1475554600094552064/DSlPG1lx_400x400.jpg', + ref_id: 'ae6ee2a2-1cf7-41a0-8366-ff6e94a6403c', + twitter_handle: 'VailshireCap', + }, + { + name: 'Stacy Herbert', + profile_picture: 'https://pbs.twimg.com/profile_images/1546484196750905346/5WYPz-bc_400x400.jpg', + ref_id: '7477463b-1f3a-4b83-94c3-9d5a63b576c0', + twitter_handle: 'Stacyherbert', + }, + { + name: 'Greg Foss', + profile_picture: 'https://pbs.twimg.com/profile_images/1552599670945464320/3OgqRHNo_400x400.jpg', + ref_id: '853d9f80-f6cf-490f-9d1e-f29cdc6acc6f', + twitter_handle: 'FossGregfoss', + }, + { + name: 'Preston Pysh', + profile_picture: 'https://pbs.twimg.com/profile_images/1408783276081299462/f4Ye5n7-_400x400.jpg', + ref_id: '01ad2c81-2d0c-44a9-93a1-42c07287aa80', + twitter_handle: 'PrestonPysh', + }, + ], + hosts: [ + { + name: 'Blockware Intelligence', + profile_picture: 'https://pbs.twimg.com/profile_images/953108582110781441/irB2GVXn_400x400.jpg', + ref_id: '0ff00f04-2450-4699-b6a3-0467e29cddde', + twitter_handle: 'BlockwareTeam', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/ea2cf2ae-76de-4185-818c-384b3b06228b.jpg', + keyword: !0, + link: 'https://www.youtube.com/watch?v=WxGMeufy8jw', + node_type: 'clip', + pub_key: '02574d6e8e787372184b6f17c40d6c6fe1777db9015801f95dfd24692784d767cd', + ref_id: '144eff69-fd7a-48da-b92f-bb5b13e0b4f7', + show_title: 'Blockware Intelligence', + text: "a mismatch between perceptions and reality about where some of the technology is in terms of different energy sources, right? So something, you know, like three quarters of global energy comes from hydrocarbons and then the rest, you know, hydro and nuclear are big chunks, and only something like 5% is wind and solar. But as wind and solar have kind of been pushed to be larger and larger parts of the grid, and there are certainly applications where they're useful, there's very hot and dry regions of the world. Rooftop solar can give you kind of more autonomy from the local grid if you have, say, rooftop solar and a battery backup, for example. But as they've kind of put policies ahead of technology and you kind of like obfuscate the cost, overstate the strengths and get that into the grid, it's kind of caused some issues. There's also a challenge where there's not a lot of investment in the grid itself, right? So, for example, California keeps having their electrical grid parts, electrical grid, face rolling. Brownouts you can imagine if you were to say ten x the number of electrical vehicles that are drawing power from that grid instead of through the gasoline distribution system we have. If that starts going over the grid, that's more stress on the grid. You need more copper, you need more redundancy, you need more cables bringing that around. And so I think the short term way out of this is frankly, there needs to be more supply of hydrocarbons, natural gas, oil and coal because that's what the world is currently short of, especially in certain locations. Longer term, I'd like to see a nuclear renaissance. Combination of smaller reactors and a better regulatory environment could really make nuclear come back. I mean, decades ago, it was actually pretty cheap and quick to build a nuclear plant, as there have been a handful of accidents, which even if you add up all those accidents, even if you take the worst case, scenario of not just immediate death, which is very few, but if you kind of take the high end estimates for environmental damage and what that could have caused kind of in the region, it's like it killed fewer people than coal kills, like every year, for example, through particulates in the air. But nuclear got that kind of increasing regulatory burden and that now makes it almost impossible in many places in the world to build a new nuclear facility. And of course, you want safe operations. So, for example, part of why Chernobyl was so bad is they didn't even have the shield. That now is standard practice among the nuclear facilities. Obviously, there's really bad ways to build a nuclear facility, but the modern ways and back then, even the responsible ways can build safe nuclear. And so I'd like to see that combination of they've developed small modular reactors that's been a bit like a push lately. And if there were kind of easing regulatory environment, I think that nuclear can at least solve a lot of the baseload grid power. And then longer term there's interesting things like ocean thermal energy that I think is under explored. There are other ways to get baseload power, but the general thing you need is that you need to have nature do as much of the storage and concentration as possible because the more that you have to replicate with machines, the less efficient and energy dense that's going to be. And so I think that's the big theme that a lot of people are missing in the energy space. ", + timestamp: '00:49:04-00:52:35', + topics: ['energy sources'], + type: 'youtube', + weight: 37.306806397580786, + }, + { + boost: 0, + date: 1672099200, + description: "Institutional adoption lowering Bitcoin's volatility", + episode_title: 'Blockware Intelligence Podcast: 2022 Highlights', + guests: [ + { + name: 'Michael', + profile_picture: 'https://pbs.twimg.com/profile_images/1558687629599657990/vf-bU14b_400x400.jpg', + ref_id: 'c7b4faa1-db77-4459-b03f-0e41e15efae7', + twitter_handle: 'MichaelHawaii', + }, + { + name: 'Cory Klippsten', + profile_picture: 'https://pbs.twimg.com/profile_images/1569687200857755648/fxiCeaqc_400x400.jpg', + ref_id: 'ddfb9b4c-4e6a-4f4c-a01b-e6bb1bc55464', + twitter_handle: 'coryklippsten', + }, + { + name: 'Joe Consorti', + profile_picture: 'https://pbs.twimg.com/profile_images/1596902707511664640/GYGWVDts_400x400.jpg', + ref_id: '8d2024b2-03bb-454d-9bd6-bb121904b76a', + twitter_handle: 'JoeConsorti', + }, + { + name: 'Jeff Booth', + profile_picture: 'https://pbs.twimg.com/profile_images/1362957991410954241/spiaMAg2_400x400.jpg', + ref_id: 'f1143bcc-9ab9-4716-8259-0e5b026f8039', + twitter_handle: 'JeffBooth', + }, + { + name: 'James Lavish', + profile_picture: 'https://pbs.twimg.com/profile_images/1466279082157502464/flD6cWI3_400x400.jpg', + ref_id: 'cf06ab2d-2ff3-4d7b-bef6-b996ae68517a', + twitter_handle: 'jameslavish', + }, + { + name: 'Adam O', + profile_picture: 'https://pbs.twimg.com/profile_images/1395896857990160391/tJpgS2_p_400x400.jpg', + ref_id: '95af0dd3-1e27-41b9-a36b-8a2c44438e85', + twitter_handle: 'denverbitcoin', + }, + { + name: 'Jack Mallers', + profile_picture: 'https://pbs.twimg.com/profile_images/1599778945699909632/O0qc9ykA_400x400.jpg', + ref_id: 'd2e4aac5-e5e1-42fc-8f08-b3a77c076a64', + twitter_handle: 'jackmallers', + }, + { + name: 'Lyn Alden', + profile_picture: 'https://pbs.twimg.com/profile_images/1521181379677073414/bm4LcJTr_400x400.jpg', + ref_id: '903381dd-4b8a-4b59-8ecd-3281ae3ba297', + twitter_handle: 'LynAldenContact', + }, + { + name: 'Dylan LeClair', + profile_picture: 'https://pbs.twimg.com/profile_images/1508157904913899522/3l7ctauV_400x400.jpg', + ref_id: '283edea0-55cf-4245-95df-8d6d3dcb1851', + twitter_handle: 'DylanLeClair_', + }, + { + name: 'Jeff Ross', + profile_picture: 'https://pbs.twimg.com/profile_images/1475554600094552064/DSlPG1lx_400x400.jpg', + ref_id: 'ae6ee2a2-1cf7-41a0-8366-ff6e94a6403c', + twitter_handle: 'VailshireCap', + }, + { + name: 'Stacy Herbert', + profile_picture: 'https://pbs.twimg.com/profile_images/1546484196750905346/5WYPz-bc_400x400.jpg', + ref_id: '7477463b-1f3a-4b83-94c3-9d5a63b576c0', + twitter_handle: 'Stacyherbert', + }, + { + name: 'Greg Foss', + profile_picture: 'https://pbs.twimg.com/profile_images/1552599670945464320/3OgqRHNo_400x400.jpg', + ref_id: '853d9f80-f6cf-490f-9d1e-f29cdc6acc6f', + twitter_handle: 'FossGregfoss', + }, + { + name: 'Preston Pysh', + profile_picture: 'https://pbs.twimg.com/profile_images/1408783276081299462/f4Ye5n7-_400x400.jpg', + ref_id: '01ad2c81-2d0c-44a9-93a1-42c07287aa80', + twitter_handle: 'PrestonPysh', + }, + ], + hosts: [ + { + name: 'Blockware Intelligence', + profile_picture: 'https://pbs.twimg.com/profile_images/953108582110781441/irB2GVXn_400x400.jpg', + ref_id: '0ff00f04-2450-4699-b6a3-0467e29cddde', + twitter_handle: 'BlockwareTeam', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/ea2cf2ae-76de-4185-818c-384b3b06228b.jpg', + keyword: !0, + link: 'https://www.youtube.com/watch?v=WxGMeufy8jw', + node_type: 'clip', + pub_key: '02574d6e8e787372184b6f17c40d6c6fe1777db9015801f95dfd24692784d767cd', + ref_id: '9f9305dd-fff2-4bb3-9e3f-698a55090999', + show_title: 'Blockware Intelligence', + text: "Look, the people who are interested in this space, in the institutions, they're from the technology side. They look at this as technology. The technology analysts are the ones who are the ones who are analyzing it, the ones who understand cryptography and cryptocurrency implications and how it all fits into the space. But once that kind of bleeds over and really moves into the financial world and people start looking at this as digital money, I think that's where it starts to differentiate itself. But the big break will be when people understand that it's a store of value. Now, how do we get there? Right? So the question is, what is it going to take for bitcoin to be, in particular, to be seen as a store of value? And I think it's going to take the asset to have enough market value and liquidity that the volatility dampens and it's going to happen in steps, right? So it's going to take a few very large institutional investors to start buying Bitcoin, right, and not just buying it, but then also announcing that they bought it, right? So you've got what, you've got five firms, we talked about this before, we got five firms that control $30 trillion of investment assets in the world. So if you figure that there's about $700 trillion in total investment assets, $730,000,000,000,000 in investment assets, that's a lot. 30 trillion out of 700, $720. But five of those firms, you got BlackRock, Vanguard, Fidelity, State Street and Morgan Stanley. And if any of those firms start announcing that they've really taken this and considered a separate asset and we know that, we talked about Fidelity, we know that they're doing something. BlackRock, of course, is doing something. But when Vanguard comes out, when Morgan Stanley comes out and says, we are putting this in our portfolios, that's going to be a big deal. And once they do that and they start buying it, then you're going to get a lot of other investment managers that feel like they've got to do this. So it. Takes time, but we'll come back to that in a second. But once they start buying this and they decide they want to have a 1% position in this, well then bitcoin 1% position in all assets, right? So if you look at all portfolios across all asset classes, between bonds, investment bonds, corporate bonds, sovereign bonds, you've got stocks, you've got real estate, you've got art and collectibles, and you've got gold and silver and metals. But if you put all of that in a basket in one big portfolio and you say that 1% of that has to be the separate asset class, well then you're already at $350,000,000 bitcoin. $350,000 bitcoin. Sorry, don't want to get it right. Too excited. But $350,000 bitcoin. Okay. Now you're talking about a $7 trillion asset, right? You get that up to 2% and you're talking about over a $10 trillion, $14 trillion asset. Now you, now you really do have the ability to put money in this and not see that same volatility. It's just not going to move the same way as it does here as such a small asset. I mean, we're not even half a trillion dollars anymore. But once you have that, then I think that it takes off. And I don't know where that breaking point is, but it's somewhere before that store value recognition that it just becomes completely uncorrelated. So maybe somewhere between 100 and $200,000 bitcoin where it just, it rips up and it just complete completely decorates to the rest of the market. ", + timestamp: '00:27:01-00:31:15', + topics: ['Institutional Bitcoin adoption', 'Bitcoin volatility', 'bitcoin'], + type: 'youtube', + weight: 37.30680637726857, + }, + { + boost: 0, + date: null, + description: + 'Discussion on how do you sell the value proposition of Bitcoin to small investors circa late 2022', + episode_title: 'TOXIC HAPPY HOUR! #Bitcoin is Easy Like Sunday Morning! 🍻😂', + guests: [ + { + name: ' 2140data', + profile_picture: 'https://pbs.twimg.com/profile_images/1598330787778232320/ZVFcRtet_400x400.jpg', + ref_id: 'c8fb52d1-fa69-410d-bf96-8a7559bba863', + twitter_handle: '2140data', + }, + { + name: 'Tomer Strolight', + profile_picture: 'https://pbs.twimg.com/profile_images/1591960241008148481/HtyINxtU_400x400.jpg', + ref_id: '3a2bc97d-072c-4ed9-9a59-17ceeb68fe99', + twitter_handle: 'TomerStrolight', + }, + { + name: ' TC', + profile_picture: 'https://pbs.twimg.com/profile_images/1480160632360124416/AM_vVRko_400x400.jpg', + ref_id: 'dac0717a-a743-40d4-a89f-7523f071bbb0', + twitter_handle: 'publordhodl', + }, + { + name: ' kann b', + profile_picture: 'https://pbs.twimg.com/profile_images/1480160632360124416/AM_vVRko_400x400.jpg', + ref_id: '1170bde7-7f3c-4c4f-a158-5c48a98fe92b', + twitter_handle: 'publordhodl', + }, + { + name: ' Dallas Rushing', + profile_picture: 'https://pbs.twimg.com/profile_images/1602759767029604352/hzuwh5ZB_400x400.jpg', + ref_id: '13fed037-77ce-48eb-9544-25e7abff9395', + twitter_handle: 'dallasirushing', + }, + { + name: ' Lisa Hough', + profile_picture: 'https://pbs.twimg.com/profile_images/1541581547815436288/Li8wORWt_400x400.jpg', + ref_id: '5e154adf-d8bd-4adf-a23b-47a51c183163', + twitter_handle: 'lisa_hough_', + }, + { + name: ' Collectooor of sats', + profile_picture: 'https://pbs.twimg.com/profile_images/1594362077132587009/cNAE2FU5_400x400.jpg', + ref_id: 'c84d0e47-7eeb-419b-a36e-5055b96044f0', + twitter_handle: 'hoardingsats', + }, + { + name: ' Gold Leader', + profile_picture: 'https://pbs.twimg.com/profile_images/1594152783011250176/lHMHv3gB_400x400.jpg', + ref_id: '96c4f802-25ff-4a81-b91f-cae5562bf4a3', + twitter_handle: 'GoldLeader89', + }, + ], + hosts: [ + { + name: 'Publordhodl', + profile_picture: 'https://pbs.twimg.com/profile_images/1480160632360124416/AM_vVRko_400x400.jpg', + ref_id: '5e189a7b-56c3-40ae-834e-4e2ccee3a9ad', + twitter_handle: 'Publordhodl', + }, + { + name: ' Anders_', + profile_picture: 'https://pbs.twimg.com/profile_images/1391477993726529545/xqIjHq5w_400x400.jpg', + ref_id: '15bdd6b9-bdfd-492d-b7bf-c5a56ecadc50', + twitter_handle: 'Anders_', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/0c42d408-e518-4ecf-b282-d864a8c14002.jpg', + keyword: !0, + link: 'https://stakwork-uploads.s3.amazonaws.com/uploads/customers/2707/media_to_local/4e00853b-49e3-4b46-bd13-bf7f2aa25905/56f0089c-a7f2-4b1b-8576-a3e4ddb9791f.mp3', + node_type: 'clip', + pub_key: '034248fa888690a85021cf117c168a535c53b92e1fdf3e4f9cefddfe09118d8207', + ref_id: '28845fb4-d3b9-4615-af36-f3f3862d93f7', + show_title: 'PUBLORD', + text: "I'm just going to ask a general question here. Again, thanks, guys, for having me up. First of all, so how do you sell to someone? Again, I'm really small investor, like maybe 20 grand that I'm putting in. But how do you sell to anyone at this point who's looking at the price today and going, you know what, I got in at 30. If you did, and it's now at 17, where where do you at all try to convince someone at that point to put any more money in based on on what you see? Again, you can look historically at where it's gone to and where it's gone up to, but I'm constantly trying to talk to people and trying to orange pill them, for lack of a better term. And I cannot at all find the vernacular to try to convince someone because it seems so nefarious in terms of what's happening. Again, this is really common. You guys have or I'll buy at 16 and throw another ten grand in or 20 grand or whatever it is, but when it drops another 50% down to 10,000, how do you hold all the words you hear about, you know, diamond hands and can you hear me? It's so difficult. And again, I'm just a 58 or 52 year old guy who's trying to, you know, take some of his savings and, you know, make some money out of it, but it's anyone to hear me. Yeah, you're good. TC, can you hear TC or no, sorry. Did you hear TC was trying not a great answer for you, but I. Don'T think you can hear me. I put money in in 2020 when COVID hit into an ETF following an index, and I've made more money in that ETF index than I did in any of my Bitcoin. I'll have an answer for you here in a second. I got my own views on this, but TC yeah, you had your hand up. I don't know if you can even hear me, though. Wait, let me check. Conn, can you hear TC right now speaking? No, I can't. I'm going to go out and come back. Okay. If you drop and come back, I. Got a good answer for you. Yeah, jump out and come back. I can go for an hour on this one, but you go first. I know, man. It's a great question. It's an absolute great question. It's the question. And what it is, is it's the portal through this threshold where you leave behind the purely speculative, fiat minded way of analyzing everything, and you start your journey understanding Bitcoin. You heard him say it about the investment part. I was making more money. He's new. We'll talk. Man, I hope he comes back here soon, but Jesus, that is the question. Yeah, you're right. I guess I'll just start off by saying this is the problem with focusing on the price, because the price is actually distracting you and it's giving you bad information. Much like everything in markets today, in the legacy fiat system, the signals are all distorted. They're all warped. And during the bull market, we see everything warped in the overvalued direction. And in the bear market, you see things destroyed. And through a lens of just looking at percentage gains or losses, all you're determining is which direction the market moved. And that doesn't tell you anything when it comes to Bitcoin. As far as what Bitcoin is, the momentum that Bitcoin has in the world, it's one of the things that greases the wheels for all the legacy financial, media and governments to continue to fudge bitcoin because they've got such an easy sell to people when they say, hey, look, this thing's down 70%. How could it possibly be good? How could it possibly be healthy? Elizabeth Warren says, oh, how are you going to let people put themselves at risk owning this kind of horrible asset? It's such a narrow, small minded way to look at the whole thing. When you actually start understanding bitcoin, and you realize that right now, at the depths of the bear market, bitcoin is absolutely alive and kicking, and it has got amazing momentum, and there is so many people building and investing and adopting and adapting to bitcoin. There's major, major industries today. We stopped even, like, making a big deal out of it. You remember back in 2020 where every little insurance company or bank that even sniffed at bitcoin, it was like a huge story. Oh, my god, so and so is looking at it's happening so frequently now. We don't even pay attention to it anymore. The world is plowing towards a bitcoin reality here. And what's beautiful about it is that anybody who really wants to use Bitcoin as a way to preserve their wealth and improve their future, you have such an opportunity, especially during the bear market, to arbitrage the lack of knowledge that people have on average and to see through the fed and realize how healthy and alive and strong and growing stronger bitcoin is. And at that point, you realize how absolutely inaccurate the price is as a signal. And if anything, you're just able to arbitrage that knowledge gap. You realize that you're looking at something that's basically better than it was a year ago when it was 70% higher and it's on sale and you go from there. This is so on point. Look, Ben, this is the journey that everyone takes. Everyone takes a journey for the most part. You come in for number, go up technology, dude, I was there. And in fact, I got to look at the exact date of my first I'm almost at the five year anniversary because it was in mid December, mid December 2017. And yeah, you guys can thank me. I think I got into the market like three weeks before you. Dude, me and you are the exact same era. Bitcoin was at 17 five with my first purchase, not that I was going to buy a whole god amp coin, and it spiked up to almost 20. And you're right, I spent 2018, man. I was catching those knives all the way down. And the more I learned about bitcoin and what it represented, the more I understood it. But I'll tell you what, man. Yeah, go ahead. Sorry, just one more thing I wanted to add is the other thing that really dissuades people or points them in the wrong direction is they think about how many dollars they're putting into bitcoin, and what they need to really realize is how much capital and how much monetary energy they are removing from the fiat legacy system. That is one of the key perspectives that if you don't have that perspective, you don't realize what you're actually doing. You're not investing in bitcoin. You're not speculating on bitcoin's price. You're literally removing your capital and your monetary energy that you've accrued from a system that is so riddled with risk and uncertainty, and you're moving it into a brand new system. It's not controlled by any of these governments or central banks and allows you as a sovereign individual to hold your own wealth and remove it from that giant house of cards. That's I think equally as important a concept to understand. Yeah. And this goes into and con saying, well, what do you tell a friend? Or how do you explain to somebody what this means? And believe it or not, man, it's different things to different people and different cultures, okay? And what I mean is this. If you're in Venezuela or you're in Turkey watching your currency go through hyperinflation, guess where you want some of your life value, all the work that you did, you probably want a little bit in bitcoin. Let's say you're in some war torn country, you're trying to cross borders. Guess what, man? You're going to get jacked up for cash. You're going to be standing at an ATM hoping to get, like, €400 out before you leave, okay? The value in bitcoin is immense. And in the US. Oh, my god. What about in the US. What could you guys possibly see in bitcoin? And I've talked to many people like this. You want to talk about orange filling? There's one guy talking to I just don't get it. What is the use case? I said, well, listen, you're pretty well off this guy's, like, in his 60s, everything. And I just mentioned to him, can you name one thing? Just name one thing that you own that can't be confiscated by the government or bank. Name one thing you own and you can see the wheels turning. He's thinking of the two homes. He's looking at the credit cards that will be shut down, and I'll get back to that in a second. He's looking at the cars, okay? He's got a boat. And he goes, I got nothing. I said, well, that's why bitcoin is something you should at least be interested in. I'm not telling him, sell everything you own and buy bitcoin. I'm saying you just may want to have some exposure to this. And you want to talk about the volatility or the price. We talk about this quite a bit, man. In Canada, some truckers got ten grand in a bank account, and he's got a $10,000 line of credit that was shut down overnight. I'd rather have an asset class that can take can take a hit. Okay? Maybe it goes down 70%, but it's what the best bitcoiners around are. The ones that start at the top and when those prices are dropping, man, I was giddy as a schoolgirl when it went from 20 and we're down under six and then five and then four. I'm realizing, my God, this is what an amazing opportunity just to have this exposure. But TCI, I like what you said, man. It's more about you're not moving fiat. You're gaining. You're transferring the value of your work. You're taking chips off the table. You're removing your chips from the casino. Look, you're talking about insolvency. Jump out there and came back in and heard everything everyone said. Yeah, you were talking about insolvency. Hold on 1 second. Con again, when I hear someone like you guys talk, I'm always assuming that your dollar cost overall price right now is much lower than, let's say, $17,000, right? Pub, you just said that you bought in law. So if you told me right now, if you wanted to, you know what my average cost has been? Like 3000. So you're already that's nothing to do with it, dude. That's nothing to do with it. I don't think you can hear me. For some reason. You can't here. I'm going to leave and come back. Yeah, go ahead, TC. Leave. I'll bring you finish and then I'll just jump. Stay up here, man. Stay up here because we may have some questions for you. Go ahead. I want to be able to be here because, again, what I keep on trying to wrap my head around is, okay, so again, I'm I'm in. I'm down 50, 60%, to be honest, and I'm trying to decide, okay, so that was money that I didn't, you know, I don't need right now, but I have other money that I want to now possibly invest. And as you said, catching the knives on the way down. I got you. If you can hear me, I got you. Dude, can you hear me? I'm not going to get some Black Swan event or some can you hear. TC when he jumps in? Can you hear him? No, I can't. It just says host there. I'm not seeing anything. So again, I'm going to just back out again and come back in and listen, you guys, you're helping. So just let you know that. Let me go. I got a whole another one that's pretty simple to understand, which is basically, man, there are people who are millionaires in Lebanon who, after a bank bail in, it doesn't matter how much you have in the bank, you can't access it. They'll give you $100 and say, come back next week if you want more. We're watching Canada, trying to figure out how they're going to just strengthen their authoritarian ability to wield the banking system to punish people who don't politically align with them. We're seeing in China the use of the banking system to control people's movement. We're seeing the same things happening in Iran where there's a huge protest underway and the government is using the banking system to punish people who are protesting. We have rules coming into place in Europe where you're no longer going to be able to do any cash transaction above, I think, €10,000. There are similar things in the United States where every single transaction above $600, you have to account for and disclose and fill out paperwork. If you don't see what's happening here, you're blind. You're in denial. We're marching towards a world of infinitely more capital controls than what we currently have. And in this context, the price of bitcoin is irrelevant, other than how many stats can you get for every dollar that you're moving out of that other system, period? It has nothing to do with the price, because real bitcoiners are not interested in what the price is going to be tomorrow or next month or next year. I mean, I'm not even tripping what's the price going to be in 2030? I'm looking at a little kid that I intend on handing down most, if not all of it to decades from now. This is about preservation of your ability to have choices, because what happens when crisis hits, whether it's in your own life, your own little personal sphere, or if it's strife in your nation or in the world at large, what matters is what choices you have, and that's what your money and your capital represent. It's your ability to actually do something in a situation that you don't want to be in. Can you acquire food for your family? Can you put a roof over your family's head? Can you acquire transportation to remove your family from a bad situation? I'll tell you, with all these capital controls coming in, the ordinary person on the street is quickly losing. Optionality in the future. The future is becoming more and more certain that you're going to have less choices than you have today. That's what this is about. The price is irrelevant except for how many facts you can get for each dollar you're moving out of that fiat system. That's the point here. DC. Listen, what's nice is we got a good plan, because when they try to make you eat the bugs, I know of a few guys that are still selling stakes for bitcoin. Air Texas Swim. I wish he was around. There's going to be a circular side economy, a black market economy for bitcoin, for sure. This is great, man. Hey, you got, like, anyone whose handle is Fording SAS collector or what's ", + timestamp: '01:12:05-01:28:25', + topics: ['Bitcoin value proposition', 'New Bitcoin investors', 'Bitcoin price volatility'], + type: 'twitter_space', + weight: 13.165740966796875, + }, + { + boost: 0, + date: null, + description: 'The Nigerian butcher enterprise ', + episode_title: "The Orange Sun 🌞 Let's talk #Bitcoin & Cattle Ranching/Sustainability", + guests: [ + { + name: 'Texas Slim', + profile_picture: 'https://pbs.twimg.com/profile_images/1589784780970795011/02jf0fqp_400x400.jpg', + ref_id: 'b4448c8e-9238-4aba-bd25-efb329ea5a72', + twitter_handle: 'modernTman', + }, + { + name: 'Lucas', + profile_picture: 'https://pbs.twimg.com/profile_images/1596345084966014976/maviSGq3_400x400.jpg', + ref_id: 'e3adb591-b29f-435b-bd34-210f2dbcedaa', + twitter_handle: 'impossiblyso', + }, + { + name: 'Firebust', + profile_picture: 'https://pbs.twimg.com/profile_images/1517827165198458880/N79Wpx85_400x400.jpg', + ref_id: '0fb6c7f3-a673-4fe5-9599-8165800a2ff0', + twitter_handle: 'FireBursts', + }, + { + name: 'Hamza Yusuf', + profile_picture: 'https://pbs.twimg.com/profile_images/1318064165030940672/sakbSOvT_400x400.jpg', + ref_id: '03a74669-b653-4c57-8799-a312cb041089', + twitter_handle: 'Hamzayu28849293', + }, + { + name: "Adenekan's Father", + profile_picture: 'https://pbs.twimg.com/profile_images/1505572078023495683/Wo_pJvTU_400x400.jpg', + ref_id: 'b8259997-2ef0-4e6e-8d58-a69b5eda550a', + twitter_handle: 'AdenekanFatai4', + }, + { + name: 'Adenekan', + profile_picture: 'https://pbs.twimg.com/profile_images/1505572078023495683/Wo_pJvTU_400x400.jpg', + ref_id: 'ca6a563e-0e84-4811-be82-a3b3cd12d399', + twitter_handle: 'AdenekanFatai4', + }, + { + name: 'Heritage', + profile_picture: 'https://pbs.twimg.com/profile_images/1510397558652350469/jYOl00tU_400x400.jpg', + ref_id: '98a6d9df-3c39-49ec-8a39-074e61af4ece', + twitter_handle: 'herrytheeagle', + }, + { + name: 'Enoch', + profile_picture: 'https://pbs.twimg.com/profile_images/1596235105663533056/5mRUbLm3_400x400.jpg', + ref_id: '4f8af040-3d0c-49c1-806e-aef89d8693fb', + twitter_handle: 'KazEnoch', + }, + ], + hosts: [ + { + name: 'Jeremy Garcia', + profile_picture: 'https://pbs.twimg.com/profile_images/1589056396816896001/dslbBQSX_400x400.jpg', + ref_id: 'e5e68f75-d71a-4477-ae9a-6a891f2d84d0', + twitter_handle: 'Jerimican5445', + }, + { + name: 'Oluwasegun Kosemani', + profile_picture: 'https://pbs.twimg.com/profile_images/1538403135101800450/sO-RPI9U_400x400.jpg', + ref_id: '25ce4b90-6689-4dd9-84b6-240c7bcbe407', + twitter_handle: 'MrlamilamiKosch', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/9b2e17f2-71c5-4f1e-a3e7-720d06dab810.jpg', + keyword: !0, + link: 'https://stakwork-uploads.s3.amazonaws.com/uploads/customers/2707/media_to_local/a91f79fd-d85f-4440-b012-4bdafdc83341/f1d1c5b5-b8c9-44ed-a217-f75b398376d5.mp3', + node_type: 'clip', + pub_key: '02574d6e8e787372184b6f17c40d6c6fe1777db9015801f95dfd24692784d767cd', + ref_id: 'da54483f-f9f4-4c4b-9320-6ba317e64b44', + show_title: 'Satoshi’s Journal', + text: "Thank you, Jeremy. I'm so glad to do this. Thank you, Texasleam. That was a fantastic one, OG. Or should I say big omi. I already have multiple questions from what you said because Katie Ranchon is a big business in Nigeria. That's the number one business of the number one man leading the federal republic of Nigeria, the president of the federal Republic of Nigeria. And the person of General Mohammedu Buhari loves caterbranching. We could call him a herdman. He loves cataracting so much that there is a big discussion about re energizing the grazing routes in Nigeria. Whether that's good or bad, it's a tough conversation. This is a conversation that causes opera in Nigeria. Good and bad people die. Machetes are used, guns are used. It's a billion dollar empire in Nigeria. But the stats are not really open because of so many underlying tone. So I don't think this conversation will end here. Looking forward to something bigger, most likely, maybe at a conference, inviting our top executive of the government and so on and so forth. It's something we've been trying to solve. I'm so glad I missed identity here. So let me use the opportunity to say a big welcome to a highly respected man, of course, the father of our regular listener here, Adenica, is the leader of the Nigeria butcher association and the leader of the Paraguay Butcher enterprise. If you understand the butcher's business in Nigeria, you would know that it's not a small game at all. You must have butchers most likely around every market. And if you're not eating beef in Nigeria, you're most likely eating fish. And I think beef is the biggest protein in Nigeria that people really go for, whether it is ram, whether it is cow or cali or whatever it is you want to call it. It's a big business. I eat beef all the time. And I also have beef with the altcoin. Mr. Adelekon, once again, is the Nigeria Butcher's Association leader. One of the leaders and the leader of paracoli butcher's enterprise is also the array, bobani atundda Liquid of Bagura land. Please join us to welcome this respectable Nigerian, Mr. Adeniko. Thank you, Mr. Denikon. You're welcome to the microphone, sir. Eric, bobanizi going to come? Is your daddy going to come as a speaker or you're going to do most of this speaking for him? Yeah, he's going to join as a speaker also because I would like us to just hear from his experience and we should learn a lot. Okay. Please send Mr. Adenikan. Oh, I'm sorry. Okay, I'm biting him now. I'm so sorry. I forgot to bite him up for some reason. I thought it was going to be with Adenikin, but Adenikin, I just invited him Upani. It's a big title. From my understanding. Maybe I'm going to ask him what's that title means. For my understanding, Bob Banigi means elevate the king. Or should I say give the king some worthy respect. Give the king some worthy respect. So when they say you are the Arab, Bobani, you are like the king elevator the king. Should I say positive image? Because anybody that means respect, value, something like that. I read Bobani. That's a fantastic title. I sent your dad an invite, Dennekin, but if it's not working, your dad may have to just request to speak because I don't think the invite to Texas slim worked. So, Mr. Dennekin, if you could kindly click the there you go. No, that's not you. Hansa yusuf bhagudo. That's not him trying to invite him up. Maybe it'll work with you. I've already tried to invite him up several times. So just give us a few seconds, and we'll get Mr. Denikin up here. And in the interim, what I was saying earlier, though, is the similarities between bitcoin and farming and ranchers are uncanny. Farmers and ranchers are such that they are super sovereign. They know the land, they know how to work it. They know how to get it to the point where, on a selfsustainable manner, it could actually regeneratively, produce what it needs to produce, and they use their intellect to get the land to do what it naturally does, and then they use the animals to do what they naturally do. And when you get those two things in synchronization, the land and the animals, you have a beautiful thing. Unfortunately, due to the commercialization of food and the industry around food, that whole cycle has been screwed up. Okay, so there he is. Let me let him know. Jeremy, real quick, before I just accepted Mr. Identical, the Arab bobani of boogeland. But quickly. I also accepted Amaza Yusuf. But I want to ask AMA Yuzu a question before I push him back to a listener mode and maybe bring him back later. Please, quickly, tell me your name, what you do, and why you requested to speak, because your name sounds like you're from the north, and you may be a butcher or you may be into categorization. Real quick. I invited also he's a fellow member, and we are doing something with Texas. So he's a full animal and has been a friend since secondary school days. So you can just let him speak and just introduce himself. Oh, okay. All right. We're going to do that much later. So, first of all, we have in the building we don't need about anymore. Good morning, sir. Can you speak to us so we hear from you? Mr. Dennett, you may have to click on the bottom left hand corner. On your screen, there's a mic button. You have to unmike that. It's a little purple button, because right now you're on mute if you're trying to talk. Yeah. Can you hear me now? Yes, sir. Welcome to the I was happy to be on this platform because there is a lot of challenges in doing category in Nigeria. There's more challenges. I think you have more to make a mistake. I think we have to orientate us about the challenges. It's not easy. I do have a past five years now. I've been in the business so long. So what is coming up that I'm here, and I think it's a kind of opportunity for us to move up. I appreciate it. Thank you very much. Mr. So what Mr. Adele just said clearly is you guys should orientate everybody here. Basically us and the orientation team on, I think maybe how bitcoin can be of value to them. However, there's a lot of challenges that the butcher and khaki ranching industry is going through. But he's very appreciative of the invite and he's been on this Johnny for 35 years and he's glad to be here. Thank you very much. ", + timestamp: '00:22:56-00:32:14', + topics: ['Butchers sovereignty'], + type: 'twitter_space', + weight: 13.040050506591797, + }, + { + boost: 0, + date: 1672099200, + description: " Natalie Brunell's thoughs around SBF's unethical fraud", + episode_title: 'Blockware Intelligence Podcast: 2022 Highlights', + guests: [ + { + name: 'Michael', + profile_picture: 'https://pbs.twimg.com/profile_images/1558687629599657990/vf-bU14b_400x400.jpg', + ref_id: 'c7b4faa1-db77-4459-b03f-0e41e15efae7', + twitter_handle: 'MichaelHawaii', + }, + { + name: 'Cory Klippsten', + profile_picture: 'https://pbs.twimg.com/profile_images/1569687200857755648/fxiCeaqc_400x400.jpg', + ref_id: 'ddfb9b4c-4e6a-4f4c-a01b-e6bb1bc55464', + twitter_handle: 'coryklippsten', + }, + { + name: 'Joe Consorti', + profile_picture: 'https://pbs.twimg.com/profile_images/1596902707511664640/GYGWVDts_400x400.jpg', + ref_id: '8d2024b2-03bb-454d-9bd6-bb121904b76a', + twitter_handle: 'JoeConsorti', + }, + { + name: 'Jeff Booth', + profile_picture: 'https://pbs.twimg.com/profile_images/1362957991410954241/spiaMAg2_400x400.jpg', + ref_id: 'f1143bcc-9ab9-4716-8259-0e5b026f8039', + twitter_handle: 'JeffBooth', + }, + { + name: 'James Lavish', + profile_picture: 'https://pbs.twimg.com/profile_images/1466279082157502464/flD6cWI3_400x400.jpg', + ref_id: 'cf06ab2d-2ff3-4d7b-bef6-b996ae68517a', + twitter_handle: 'jameslavish', + }, + { + name: 'Adam O', + profile_picture: 'https://pbs.twimg.com/profile_images/1395896857990160391/tJpgS2_p_400x400.jpg', + ref_id: '95af0dd3-1e27-41b9-a36b-8a2c44438e85', + twitter_handle: 'denverbitcoin', + }, + { + name: 'Jack Mallers', + profile_picture: 'https://pbs.twimg.com/profile_images/1599778945699909632/O0qc9ykA_400x400.jpg', + ref_id: 'd2e4aac5-e5e1-42fc-8f08-b3a77c076a64', + twitter_handle: 'jackmallers', + }, + { + name: 'Lyn Alden', + profile_picture: 'https://pbs.twimg.com/profile_images/1521181379677073414/bm4LcJTr_400x400.jpg', + ref_id: '903381dd-4b8a-4b59-8ecd-3281ae3ba297', + twitter_handle: 'LynAldenContact', + }, + { + name: 'Dylan LeClair', + profile_picture: 'https://pbs.twimg.com/profile_images/1508157904913899522/3l7ctauV_400x400.jpg', + ref_id: '283edea0-55cf-4245-95df-8d6d3dcb1851', + twitter_handle: 'DylanLeClair_', + }, + { + name: 'Jeff Ross', + profile_picture: 'https://pbs.twimg.com/profile_images/1475554600094552064/DSlPG1lx_400x400.jpg', + ref_id: 'ae6ee2a2-1cf7-41a0-8366-ff6e94a6403c', + twitter_handle: 'VailshireCap', + }, + { + name: 'Stacy Herbert', + profile_picture: 'https://pbs.twimg.com/profile_images/1546484196750905346/5WYPz-bc_400x400.jpg', + ref_id: '7477463b-1f3a-4b83-94c3-9d5a63b576c0', + twitter_handle: 'Stacyherbert', + }, + { + name: 'Greg Foss', + profile_picture: 'https://pbs.twimg.com/profile_images/1552599670945464320/3OgqRHNo_400x400.jpg', + ref_id: '853d9f80-f6cf-490f-9d1e-f29cdc6acc6f', + twitter_handle: 'FossGregfoss', + }, + { + name: 'Preston Pysh', + profile_picture: 'https://pbs.twimg.com/profile_images/1408783276081299462/f4Ye5n7-_400x400.jpg', + ref_id: '01ad2c81-2d0c-44a9-93a1-42c07287aa80', + twitter_handle: 'PrestonPysh', + }, + ], + hosts: [ + { + name: 'Blockware Intelligence', + profile_picture: 'https://pbs.twimg.com/profile_images/953108582110781441/irB2GVXn_400x400.jpg', + ref_id: '0ff00f04-2450-4699-b6a3-0467e29cddde', + twitter_handle: 'BlockwareTeam', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/ea2cf2ae-76de-4185-818c-384b3b06228b.jpg', + keyword: !0, + link: 'https://www.youtube.com/watch?v=WxGMeufy8jw', + node_type: 'clip', + pub_key: '02574d6e8e787372184b6f17c40d6c6fe1777db9015801f95dfd24692784d767cd', + ref_id: 'd98bc278-4c35-4325-992c-78437ccf3569', + show_title: 'Blockware Intelligence', + text: "I'm curious, what are your thoughts on the whole SBF debacle? Is he just going to be in the Bahamas forever, or do you think he might get arrested at some point? And also, why do you think the media isn't necessarily painting him as this obvious villain? Yeah, I'm really disappointed by everything that's happened with SPF. And it's sad that bitcoin looks bad in this whole thing, especially for people who don't understand the space. But it's neutral. It did nothing wrong. It was just cross collateralized. And people like SBF create these paper versions of Bitcoin, and that's so unethical. So my reaction is, I hope that the DOJ I hope that the SEC, I hope that law enforcement agencies go after him and bring him in and formally charge him. Because in my opinion, what he did was fraudulent. It was a Ponzi scheme. It was to enrich himself. I mean, the fact that he was basically loaning money, using an air token as collateral loaning money to himself, that people affiliated with him, including his parents, may have purchased expensive properties, this is wrong. This is not what this revolution of Bitcoin and removing the power of money from the state. This is not what this is about. It's not about enriching a small group of individuals who think that they have the right decisions on how the future should be created. It's wrong. And he duped so many smart people, which is amazing to me, these massive institutions, from the VCs to these celebrities who had a ton of money. You would think that they would all do their due diligence to make sure that they're not just, like, putting their money into a group of Silicon Valley former Ivy League nerds who are going to basically wash trade it. With themselves to pump up the value and take out loans and to become their own bank and take out credit lines and then trade it and pay off politicians and then lose all the money. I mean, this is ridiculous. And they did it all offshore for a reason because everything that they did is inherently illegal. And so I hope that it's a huge lesson. I hope that in the end, I think it actually strengthens Bitcoin and what bitcoin is all about and bitcoin's value proposition. But in the meantime, I just hope that these policy makers actually hold them accountable and take the time to learn about why this happened and how the fact that he's sort of, as of right now, getting a little bit of a pass, like Representative Maxine Waters, I think, tweeted at him something that was equivalent to, oh, please talk to us, Sam. Thank you for explaining the things that have been going wrong. It's like, no, hold this guy accountable. This is the Bernie Madoff of crypto right now and everybody's just sort of approaching him on eggshells and I don't understand that. So I think that charges will come down. I saw that Caroline Ellison was spotted in New York. I'm sure she's working with an attorney who wants to get her some sort of a plea deal. The only way that that will happen is if she divulges a ton of information. So I think it's going to be a couple of people pitted against each other. Caroline versus SBF, and we're going to learn more in the coming days. And I don't buy any of the crap he's been selling to the media. He knew what he was doing. He just thought he would get away with it, to be able to complete his mission and plan of whatever he wants to do with all that money. But it was wrong. He was using customer funds and he should be in jail, I think. Yeah. I mean, it's pretty insane how it got so big and how so many big names, whether it's like Tom Brady or Sequoia, were just full fledged behind FTX and SPF. It's pretty wild. The ", + timestamp: '00:56:24-01:00:18', + topics: ['Natalie Brunell', 'SBF'], + type: 'youtube', + weight: 36.019356007815745, + }, + { + boost: 0, + date: 1672207217, + description: 'Receiving geyser donations directly to your wallet and tipping creators with Mash', + episode_title: 'The Orange 🌞 Reading/Discussion "The Book of Satoshi" & Bitcoin News', + guests: [ + { + name: 'CouncilmannJamm', + profile_picture: 'https://pbs.twimg.com/profile_images/1251040014152024066/dD3b2eA4_400x400.jpg', + ref_id: '6c989c2c-d24d-49a2-8eb1-1d2f1c47f347', + twitter_handle: 'jamm_councilman', + }, + { + name: 'thotsnplayerz', + profile_picture: 'https://pbs.twimg.com/profile_images/1608733749663109120/wwYEZgF2_400x400.jpg', + ref_id: '66bbe365-9e85-4c34-9d51-39d8b49937b7', + twitter_handle: 'thotsnplayerz', + }, + { + name: 'Will Schoellkopf', + profile_picture: 'https://pbs.twimg.com/profile_images/1487515153302130691/t5sDMzZW_400x400.jpg', + ref_id: '461e2245-1672-4fa1-94f5-7aaf1afa531f', + twitter_handle: 'realBitcoinDog', + }, + { + name: 'OKIN_17', + profile_picture: 'https://pbs.twimg.com/profile_images/1518945775685967873/O0wPrIKO_400x400.jpg', + ref_id: 'dbcdeab8-4824-43f7-aeb8-2b9eda6cbbad', + twitter_handle: 'OKIN_17', + }, + ], + hosts: [ + { + name: 'SatoshisJournal', + profile_picture: 'https://pbs.twimg.com/profile_images/1518661993103859712/y_QefqVZ_400x400.jpg', + ref_id: '63fac069-bfe9-49ae-b52c-1d1f226b3275', + twitter_handle: 'SatoshisJournal', + }, + { + name: 'Jeremy Garcia', + profile_picture: 'https://pbs.twimg.com/profile_images/1589056396816896001/dslbBQSX_400x400.jpg', + ref_id: 'e5e68f75-d71a-4477-ae9a-6a891f2d84d0', + twitter_handle: 'Jerimican5445', + }, + { + name: 'ToxiKat27', + profile_picture: 'https://pbs.twimg.com/profile_images/1505791887415730177/d0YDQ3Xc_400x400.jpg', + ref_id: '50023cce-8a6f-4974-ad3b-fd7a9c0abf19', + twitter_handle: 'ToxiKat27', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/9b2e17f2-71c5-4f1e-a3e7-720d06dab810.jpg', + keyword: !0, + link: 'https://stakwork-uploads.s3.amazonaws.com/uploads/customers/2707/media_to_local/ecefba20-39fd-4974-8388-066857965b2a/cf486c39-08f9-4ada-9b72-7a297ad74d74.mp3', + node_type: 'clip', + pub_key: '', + ref_id: 'b8080ee6-90b2-4f75-8c69-79510c82aa08', + show_title: 'Satoshi’s Journal', + text: "The next little piece in here is to talk about make your Geyser donations flow to your own wallet. So a bit more than a week ago, geyser, for those that don't know who Geyser is or what it is, geyser is a company or website that allows you to earn Satoshi's for whatever you're trying to earn them for. So if you are trying to earn Satoshi's for a book, to write a book, you can put your project on there. There's a vetting system you have to go through. We're probably going to put the Bitcoin village on there. We haven't done it yet, but if anyone wants to donate to the Bitcoin village, that's yet another place they can go to if and when we get onto the Geyser fund. But you can find a bunch of other different donations for different things that are happening in bitcoin. So anyways, this article says a bit more than a week ago, guys are rolled out. A very neat feature that I missed. So here it is. You can now, as a project creator, receive donations directly to your own wallet through a lightning address. This allows you to receive the funds straight to the wallet of your choice, ideally on custodial, without them ever sitting on geyser's node. So that is pretty cool and I didn't know about that until I read this article. The next thing is mash. For those that don't know what Mash is, mash is a company that allows you to integrate their software into your website and allow such things as tips to happen. We just integrated it into our website. So if you go to our website and I have yet to unveil it because I'm trying to come up with a way to best unveil it, but essentially, if you go to our website now, there's a little button on the bottom right? You click it, it'll allow you to create a Mash account. And then once you create a Mash account, you can tip our website and the tips that are on our website are going to go to our content creators. So if people find value with the content of our content creators, they can click the button, they can send a tip of whatever value they want. All those tips accumulate on a wallet that we have associated with our Getmash account and then we will disperse those to our content creators how we deem fit. It's pretty cool feature. So Mash, basically it says here Mash got a small lifting to better suit creators and what they want to do with their content. Mash is a service that allows content creators to monetize what they create in a user friendly way. It just got easier to use with more customization available Ie themes. Mash button placement, push button placement, cherry on top what previously required copy pasting multiple snippets to make the Mash magic work on a custom website now requires only one code snippet. Cool. So that's pretty cool. I didn't set up the Mash on our website, but whoever did probably would relate with this feature. And there's a few more things. Looks like Albie got an extension for developers. Looks like there's some Sat streaming in the Pod verse and a bunch of other things. This is a long article, so I'm not going to read it all, but I highly recommend you check it out on ", + timestamp: '00:14:17-00:18:05', + topics: ['Geyser Fund', 'crowdfunding', 'Mash'], + type: 'twitter_space', + weight: 37.03219712996155, + }, + { + boost: 0, + date: 1672207217, + description: 'Making payments on the Lightning Network', + episode_title: 'The Orange 🌞 Reading/Discussion "The Book of Satoshi" & Bitcoin News', + guests: [ + { + name: 'CouncilmannJamm', + profile_picture: 'https://pbs.twimg.com/profile_images/1251040014152024066/dD3b2eA4_400x400.jpg', + ref_id: '6c989c2c-d24d-49a2-8eb1-1d2f1c47f347', + twitter_handle: 'jamm_councilman', + }, + { + name: 'thotsnplayerz', + profile_picture: 'https://pbs.twimg.com/profile_images/1608733749663109120/wwYEZgF2_400x400.jpg', + ref_id: '66bbe365-9e85-4c34-9d51-39d8b49937b7', + twitter_handle: 'thotsnplayerz', + }, + { + name: 'Will Schoellkopf', + profile_picture: 'https://pbs.twimg.com/profile_images/1487515153302130691/t5sDMzZW_400x400.jpg', + ref_id: '461e2245-1672-4fa1-94f5-7aaf1afa531f', + twitter_handle: 'realBitcoinDog', + }, + { + name: 'OKIN_17', + profile_picture: 'https://pbs.twimg.com/profile_images/1518945775685967873/O0wPrIKO_400x400.jpg', + ref_id: 'dbcdeab8-4824-43f7-aeb8-2b9eda6cbbad', + twitter_handle: 'OKIN_17', + }, + ], + hosts: [ + { + name: 'SatoshisJournal', + profile_picture: 'https://pbs.twimg.com/profile_images/1518661993103859712/y_QefqVZ_400x400.jpg', + ref_id: '63fac069-bfe9-49ae-b52c-1d1f226b3275', + twitter_handle: 'SatoshisJournal', + }, + { + name: 'Jeremy Garcia', + profile_picture: 'https://pbs.twimg.com/profile_images/1589056396816896001/dslbBQSX_400x400.jpg', + ref_id: 'e5e68f75-d71a-4477-ae9a-6a891f2d84d0', + twitter_handle: 'Jerimican5445', + }, + { + name: 'ToxiKat27', + profile_picture: 'https://pbs.twimg.com/profile_images/1505791887415730177/d0YDQ3Xc_400x400.jpg', + ref_id: '50023cce-8a6f-4974-ad3b-fd7a9c0abf19', + twitter_handle: 'ToxiKat27', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/9b2e17f2-71c5-4f1e-a3e7-720d06dab810.jpg', + keyword: !0, + link: 'https://stakwork-uploads.s3.amazonaws.com/uploads/customers/2707/media_to_local/ecefba20-39fd-4974-8388-066857965b2a/cf486c39-08f9-4ada-9b72-7a297ad74d74.mp3', + node_type: 'clip', + pub_key: '', + ref_id: '9f2d3be4-e7df-4b86-981c-466bde0d92ad', + show_title: 'Satoshi’s Journal', + text: "Today I found a really good article. It's basically, I've never heard of this, but it's called the Twitter handle is at all end markets. So, like at Lightning network markets, but it's spelled with an all and an end and then markets. And I guess they post a newsletter. And what's cool is that they basically track what's happening in Lightning. So I'm going to really quickly go over some of the things that are happening in Lightning that I didn't know what was happening. So this one covers the week of the 19th to the 25th, and if you want to follow along, you click the article. Second one to the left on the nest. So it looks like some guy, his. Name is Renee Aaron. He's been working on connecting vending machines to Lightning. So that's pretty cool to do. So he designed a small, easily pluggable module that comes with its own screen and can be used by the vending machine to generate a Lightning invoice and display it as a QR code. The product is currently being tested by a bunch of merchants in Europe, but given its plug and playiness and the benefits of using Lightning in this type of machines. I'd say I'm quite bullish on this. That is pretty awesome. I mean, anything that you can plug into, anything that you need to pay, especially Lightning, that just helps with even more people getting used to using everyday things with bitcoin. So in this case, you can go to an arcade room, arcade game place, and there's a Lightning network module that allows you to scan a QR code and pay instead of having to put quarters and then play your game. So someday that will probably be just commonplace. Probably every machine that can have the ability to be have payments will have Lightning network. And for those that are new, lightning network is a second layered on top of bitcoin that allows instant and basically free transactions. And there's a common misconception amongst normies that think that bitcoin is slow, but when they're talking about that, they're talking about the first layer. And because of the first layer, transactions are completed about every ten minutes. That's why people think it's slow. But even relatively speaking, that's faster than a lot of other things in this world that we use for payments. And one thing is credit cards. Although credit cards can be swiped and allow payment to be done instantly, when you go to the store, that payment is still not instant because it hasn't been quote, unquote, validate or verified 30 days. 30 days later. 30 days later you get a credit card statement and then that's quote unquote finality versus in ten minutes on the bitcoin layer, one network, you have finality in ten minutes. Now, when you go on to the second layer with Lightning, you have basically finality in seconds and for free. Another problem, of course, with Visa, Mastercard and other credit cards is the exorbitant fees you have to pay. So it's an amazing thing what's being done, and the rest of the rule hasn't come to their awakening on it. ", + timestamp: '00:10:27-00:14:17', + topics: ['Lightning Network'], + type: 'twitter_space', + weight: 37.03219711188569, + }, + { + boost: 0, + date: null, + description: 'Related news and updates on Start9 operating system', + episode_title: 'Café ₿: Sovereign Computing w/ Matt & Aiden, Start9', + guests: [ + { + name: 'Andrew', + profile_picture: 'https://pbs.twimg.com/profile_images/1465763053014859786/xYFN2czJ_400x400.jpg', + ref_id: 'ae4b13f8-0ee7-480a-b47a-82b967ad7a79', + twitter_handle: 'AP_ArchPublic', + }, + { + name: 'Matt Hill', + profile_picture: 'https://pbs.twimg.com/profile_images/1347317316057321474/ieMjzK3x_400x400.jpg', + ref_id: '3576ad28-a04d-4388-865b-3ec5114c4f9f', + twitter_handle: '_MattHill_', + }, + { + name: 'Lauren', + profile_picture: 'https://pbs.twimg.com/profile_images/1586022214901501952/U1dRyCxP_400x400.jpg', + ref_id: '7f14bbf5-a60b-496b-a361-3663cf120299', + twitter_handle: 'LaurenJauregui', + }, + { + name: 'Aiden McClelland', + profile_picture: 'https://pbs.twimg.com/profile_images/1470160097225498624/0BjKB_2W_400x400.jpg', + ref_id: '04ddd9d4-9329-4e6c-aaa3-d65ea4a9342a', + twitter_handle: '_dr_bonez', + }, + { + name: 'Peter', + profile_picture: 'https://pbs.twimg.com/profile_images/1581695667193643009/EljNY-TH_400x400.jpg', + ref_id: 'a3384925-e15e-421d-b9f9-6d44e273ed05', + twitter_handle: 'PeterAnsel9', + }, + { + name: 'Lisa', + profile_picture: 'https://pbs.twimg.com/profile_images/1541581547815436288/Li8wORWt_400x400.jpg', + ref_id: 'e6f0c6e3-3237-4b13-878f-bb740cd32f8d', + twitter_handle: 'lisa_hough_', + }, + { + name: 'Isabelle', + profile_picture: 'https://pbs.twimg.com/profile_images/1466874333410717698/WRQh2-_m_400x400.jpg', + ref_id: 'c8df253f-47b3-465e-878e-8405c01c090d', + twitter_handle: 'isabelfoxenduke', + }, + { + name: 'Tone', + profile_picture: 'https://pbs.twimg.com/profile_images/1416821178266787844/T1OkI9ZW_400x400.jpg', + ref_id: '5729ac07-51d6-4268-b585-62680c846acb', + twitter_handle: 'ToneVays', + }, + ], + hosts: [ + { + name: 'Alex Stanczyk', + profile_picture: 'https://pbs.twimg.com/profile_images/1539055022364708864/rwErK6x1_400x400.jpg', + ref_id: '3126e2a3-bbe4-456b-b298-9714085fa286', + twitter_handle: 'alexstanczyk', + }, + { + name: 'Derek', + profile_picture: 'https://pbs.twimg.com/profile_images/1598322677827207169/Cw0A3oOP_400x400.jpg', + ref_id: 'f441b996-7eeb-4210-b24c-fa011161709d', + twitter_handle: 'derekmross', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/239722cb-4216-414a-a17b-5adf9d52e15a.jpg', + keyword: !0, + link: 'https://stakwork-uploads.s3.amazonaws.com/uploads/customers/2707/media_to_local/0ec4a941-250c-4e1d-8d2a-6c506c3ba4b2/4bd8010d-b2fd-41b4-8041-8a953ef06492.mp3', + node_type: 'clip', + pub_key: '02574d6e8e787372184b6f17c40d6c6fe1777db9015801f95dfd24692784d767cd', + ref_id: '0fe0af9b-421e-43ab-800d-7354379ea21f', + show_title: 'Swan.com', + text: "Yeah, I should mention the embassy pro. As I said earlier, our business model is selling computers. We just launched a new one. It begins shipping next week. We've been preselling it for months. It required version 00:33 in order to run, which is why it hasn't shipped yet. So 33 is now done, so it will be shipping next week. These are very powerful mini PCs, 32 gigs of Ram. It's got a very powerful processor and two terabyte NVMe drive. So your disk storage is going to be very fast. And when it comes to running Bitcoin and Lightning and Electrs and then anything else under the sun, you might want to self host. It really is nice to have this sort of like device that's not a Raspberry Pi, right? Raspberry Pi is cool, but ultimately if you want to do this right and you want to have a good time doing it and not run into resource ceilings constantly, then you're going to need a more powerful device. So if you don't already have a mini PC or laptop or desktop that is adequately powered from a CPU Ram and storage standpoint and you want to run a server and you want to do it right, you're going to have to buy something. We actually have an incredible deal. Right. So the device that we are selling, if you were to go online and price out an Intel Nook, say, which is like the goto kind of mini PC solution, if you were to go build an Intel Nook to the exact specification that we sell the Embassy Pro, it would be a few hundred dollars more expensive. So we are not like this luxury overpriced product. We are actually undercutting the computer hardware market for a comparable device. So if you do need to buy something, come buy it from us. Because again, we're not gouging the price. In fact we're undercutting the price. And two, this is how we survive and how we're going to continue to build what we're building, which we hope you all can agree is a good purpose. So do business with us if you can. The Embassy Pro is the best headless server on the market for the best price on the market. And now we can get into whatever you want. And you also mentioned a moment earlier about people like the Federation model, about people running servers for their friends. And that's a lot of what we are thinking about as we put together this product, as we put together the Embassy Pro, that we are trying to get a more powerful product so that people can support more users on the device. Uncle Jim. Right. The Uncle Jim model. And we think it is a little. Bit. We have an ideal in our head that everybody on the planet will be running their own servers and connecting peer to peer. But we also know that that's not reality. As you mentioned earlier, it's not how humans work. And so we are acknowledging that. And while we will hold that as an ideal, this strategy for expansion is actually to go after families, organizations, content creators who have followers, to get them on board with the idea of self hosting and then gradually push to the edges. Right? So the Embassy Pro 33 and our entire roadmap for the next couple of years is really oriented around, do you get this, do you understand what's happening? Do you want to protect yourself and those who trust you? This is the best and easiest way that has ever existed for you to do that. We want to be that solution because we know that once, say, I use the church a lot because quite frankly, churches are going to be very quick to adopt this technology. We've actually had multiple conversations with heads of churches who are looking to do this because churches have been sort of under attack recently from this perspective. We know that when the pastor of a church sets up a private server, you know, in the back office and tells everyone in the congregation like, hey, we're not going to use Discord anymore, we're not going to use Telegram anymore, we're going to use our own private chat server. And in order to do that, all you have to do is go to Church of Christ.com, sign in with an email and password and chat with the members of the congregation. As in, there's no difference to what you are accustomed to. It's exactly the same experience from the congregation member perspective. They're having the same experience differences. Now it's just private and there's no intermediary. Scooping all your info churches, but it's a trusted intermediary. Exactly. But now the people in the audience understand this and they're like, wow, I want to do that for my family. So the head of family or whoever the most technical person in the family is, is now going to go get a device, put it in the home and be like, hey family, we're going to have private family talks, we're going to share pictures with each other in. A way that it doesn't in the future. Every tribe and every family is going to have its own CTO. Yeah, but we're trying to make that job really easy. Right? We're trying to take the job of system administrator, which is traditionally very hard job, highly paid job. We're trying to turn it into a Gui, a graphical user interface that a college intern could do. Right. Anybody? You're making the user interface very simple or the experience very simple. Okay, so question, you're basically building an operating system. Yes. That seems like a really hard thing to do. Why not just use Linux or something like that? We do use linux. Linux? Linux is a very unfortunately a very small part of an operating system. The basis of what we've built. We use Linux, we use docker, we use all of these tools that already exist in our open source. We're not shying away from any of the intellectual capital that has been built in the open source community over the many years. But there's a lot that has to be built for the user experience that we want. Okay, so in other words this is like a Linux stack but you guys are designing it in a way so it's super easy for people to use and it's focused on decentralizing stuff. Yes, but almost every Linux distro out there. When you say I'm running Linux, you're running probably one of two desktop environments like Gnome or KDE and we don't have any of that. We had to start pretty low in the stack in order to be able to design the experience towards a server device as opposed to a client device. So a lot of it is different than what you'd expect out of something like Ubuntu or ", + timestamp: '01:49:29-01:56:20', + topics: ['Embassy Pro', 'Data protection solution', 'Start9 operating system'], + type: 'twitter_space', + weight: 12.334749221801758, + }, + { + boost: 0, + date: 1668866400, + description: 'Listener question: Is there counterparty risk to USDC given banks exposure to the stablecoin?', + episode_title: 'FTX Is Worse Than Enron w/ Lawrence Lepard, Caitlin Long, Dylan LeClair, and Dr. Jeff Ross', + guests: [ + { + name: ' Jeff Ross', + profile_picture: 'https://pbs.twimg.com/profile_images/1307109108127019008/rPNj47yJ_400x400.jpg', + ref_id: '4f4f53c7-5a3a-46df-b334-9951fe38dc96', + twitter_handle: 'realjeffreyross', + }, + { + name: ' Dylan LeClair', + profile_picture: 'https://pbs.twimg.com/profile_images/1599858581611941922/XxvPPWAt_400x400.jpg', + ref_id: 'c1d20e9f-7362-47be-a3a0-5b9c004cd58e', + twitter_handle: 'DylanLeClair_', + }, + { + name: 'Sam Rule', + profile_picture: 'https://pbs.twimg.com/profile_images/1522271013026729987/RQZOdzjq_400x400.jpg', + ref_id: '09214ea0-d8ff-47cb-84fe-08e8517768e5', + twitter_handle: 'samjrule', + }, + { + name: ' Caitlin Long', + profile_picture: 'https://pbs.twimg.com/profile_images/1362592672150528003/iYZ84uXB_400x400.jpg', + ref_id: 'c0244641-6347-4b82-b2a9-0ee38b600c08', + twitter_handle: 'CaitlinLong_', + }, + { + name: ' Lawrence Lepard', + profile_picture: 'https://pbs.twimg.com/profile_images/1114275000889032704/mOUsG1XC_400x400.png', + ref_id: 'bafa8935-8957-4a9f-aaaa-e45fb46615d4', + twitter_handle: 'LawrenceLepard', + }, + ], + hosts: [ + { + name: 'q_liketheletter', + profile_picture: 'https://pbs.twimg.com/profile_images/1560683048680665088/4MrHM_UY_400x400.jpg', + ref_id: '3303023d-a793-432c-8020-9151bd237523', + twitter_handle: 'q_liketheletter', + }, + { + name: ' phjlljp', + profile_picture: 'https://pbs.twimg.com/profile_images/1601641645572767745/2Obq9UgK_400x400.jpg', + ref_id: '2e5ffdd9-fea5-4daf-85e5-27015890442f', + twitter_handle: 'phjlljp', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/1583c7c4-f4f2-4e52-8f27-a1eaeb6289fd.jpg', + keyword: !0, + link: 'https://traffic.libsyn.com/secure/bitcoinmagazine/22.11.18_FTX_Worse_Than_ENRON_Moon_and_Crowd_Health.mp3?dest-id=1210361', + node_type: 'clip', + pub_key: '034248fa888690a85021cf117c168a535c53b92e1fdf3e4f9cefddfe09118d8207', + ref_id: '8b94fbcf-e349-4b2f-8425-66287345b9ae', + show_title: 'Bitcoin Magazine Podcast', + text: "also wonder a little bit with the risk with these banks. Like, yes, a lot of crypto companies use these banks, but these banks also interact with USDC, and USDC interacts with a lot of other counterparties. And so, like, is there some level of counterparty risk or credit risk that USDC faces with some of these financial institutions as well? And what does that mean? And I've also kind of been scratching my head a little bit about why all of these just have stopped processing US. DC. On Salona. And I don't think I've ever seen an example before of a stable coin kind of dying on a specific protocol and what that even means. Either of you have thoughts on that? Yeah, anybody else? Yes? I'm not sure. I think it's more so just like it was more of an FTX thing. I don't know the long history of stable coins. On Salana, but I do know that they were one of the first ones to kind of have like coinbase. You could do each base withdrawals, but FTX had all the rap soul tokens. Maybe it's just like finance and everyone else just kind of sticking a fork in them. I'm not really sure. Well, I guess what I'm asking is I'm guessing that USDC on Solana would follow the same minting and burning processes as USDC on any other protocol and that it's circle at the end of the day that has some process for ensuring that a fraudulent party couldn't just MIT a bunch of USDC and injected into the system. And so whatever the risk is there with Salana, does that also extend to Tron for example, or some of these other parties and I just don't know enough about how these stable coins actually interrupt with the banking system trying to get an understanding of that risk. Yeah, I think the scary thing is and I was listening to that Larry, you were saying something about that Mark guy and he's like a known short seller with the banks. And Caitlyn, your point about firing from the hip on rumors is totally true in finance and crypto. It's no different from the legacy system. But if there is somewhat of just because of the rumors or because of the potential for a fraud case, we don't know. This is more so to speculation than anything. But if there's like, you know, I mean these are fractional reserve banks, right? So if there is a kind of a run right, and like the crypto, native companies don't really have many places to go, but just, you know, I think these things are non zero probability. That could get pretty hairy for an ecosystem that doesn't really have any options. Well, that's what Ryan Selkus has been talking about. Yeah, sorry, go ahead. No, I think that's just one of the things I'm looking at is like, OK, you have not only like the companies, but you have some stable coins on these rails and the Send network and hearing some I got some McBurnie's in my ear and my DMs that are saying like certain counterparties as of yesterday, not too well known, just some very small scale institutional players have alerted their clients that they're no longer accepting sen like Sen Silvergate exchange network wires out of an abundance of caution and stuff like that. Just kind of flares my kind of senses up a little bit, kind of ring some alarm bells when you see like, an institution, say, hey, we're no longer accepting this crypto exchange network wire out of an abundance of caution. And the stock's down 50% month over month and 10% day every day. Are you referring to Falcon act? That was true, yeah, they sent it out to clients. So Falcon X is not small. I mean, Falcon X is one of the biggest institutional custodians. I don't know exactly how they describe their platform, but they're big. Again, I just careful here. Yeah, but that may be rumor, it may be true. But one thing to caution everybody. There are laws in the United States against a bank run. There are actually laws against that. I would just encourage everybody take a deep breath. It may or may not be true. There are so many rumors floating around this sector right now. And maybe this is where those of us who have the proverbial gray hair can think back to the times that we've been through. The various financial crises, the bond market correction, the Long Term Capital Management collapse in 1997, you know, the tech stock bubble bursting in 2001, and then of course, the mortgage bubble bursting. And seven into eight and nine through the great financial crisis, the rumors fly. And it's not until afterwards that you see where the real truth was. The sad thing about this sector is that there's definitely things move fast, right? And so the rumor mill can move things a lot faster than they otherwise might. So I would just caution everybody, especially when it comes to the banks, just definitely ", + timestamp: '00:28:12-00:33:48', + topics: ['counterparty risk of USDC', 'USDC on Solana', 'Circle', 'stablecoins', 'SEN network', 'falconx'], + type: 'podcast', + weight: 15.743046803788744, + }, + { + boost: 0, + date: 1672207217, + description: 'Improvements made to the Bitcoin node', + episode_title: 'The Orange 🌞 Reading/Discussion "The Book of Satoshi" & Bitcoin News', + guests: [ + { + name: 'CouncilmannJamm', + profile_picture: 'https://pbs.twimg.com/profile_images/1251040014152024066/dD3b2eA4_400x400.jpg', + ref_id: '6c989c2c-d24d-49a2-8eb1-1d2f1c47f347', + twitter_handle: 'jamm_councilman', + }, + { + name: 'thotsnplayerz', + profile_picture: 'https://pbs.twimg.com/profile_images/1608733749663109120/wwYEZgF2_400x400.jpg', + ref_id: '66bbe365-9e85-4c34-9d51-39d8b49937b7', + twitter_handle: 'thotsnplayerz', + }, + { + name: 'Will Schoellkopf', + profile_picture: 'https://pbs.twimg.com/profile_images/1487515153302130691/t5sDMzZW_400x400.jpg', + ref_id: '461e2245-1672-4fa1-94f5-7aaf1afa531f', + twitter_handle: 'realBitcoinDog', + }, + { + name: 'OKIN_17', + profile_picture: 'https://pbs.twimg.com/profile_images/1518945775685967873/O0wPrIKO_400x400.jpg', + ref_id: 'dbcdeab8-4824-43f7-aeb8-2b9eda6cbbad', + twitter_handle: 'OKIN_17', + }, + ], + hosts: [ + { + name: 'SatoshisJournal', + profile_picture: 'https://pbs.twimg.com/profile_images/1518661993103859712/y_QefqVZ_400x400.jpg', + ref_id: '63fac069-bfe9-49ae-b52c-1d1f226b3275', + twitter_handle: 'SatoshisJournal', + }, + { + name: 'Jeremy Garcia', + profile_picture: 'https://pbs.twimg.com/profile_images/1589056396816896001/dslbBQSX_400x400.jpg', + ref_id: 'e5e68f75-d71a-4477-ae9a-6a891f2d84d0', + twitter_handle: 'Jerimican5445', + }, + { + name: 'ToxiKat27', + profile_picture: 'https://pbs.twimg.com/profile_images/1505791887415730177/d0YDQ3Xc_400x400.jpg', + ref_id: '50023cce-8a6f-4974-ad3b-fd7a9c0abf19', + twitter_handle: 'ToxiKat27', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/9b2e17f2-71c5-4f1e-a3e7-720d06dab810.jpg', + keyword: !0, + link: 'https://stakwork-uploads.s3.amazonaws.com/uploads/customers/2707/media_to_local/ecefba20-39fd-4974-8388-066857965b2a/cf486c39-08f9-4ada-9b72-7a297ad74d74.mp3', + node_type: 'clip', + pub_key: '', + ref_id: '51926635-4d2a-47d0-9e11-62c173898631', + show_title: 'Satoshi’s Journal', + text: "like I said, I've been listening to that bitcoin explained podcast, digging into it lately, just plowing through all of it, because that's what I love about the podcast so far, is that the episodes are only like 30, 40 minutes long. They're all these long two hour, three hour drawing out conversations about bitcoin. They really just get to the point and get to the meat and potatoes, so to speak, of whatever they're talking about. And the most recent episode I listen to was about bitcoin core. Update 21. So this was like two years ago almost already now. And it's cool to see what Satoshi was talking about and what the nodes did then to the improvements that we've made since then and then where the mindset was then, and then where we are now, and the things that we've done with Taproot and everything else. It's really cool to see that transition and be able to look back and see the inner workings. Like I said, these guys go into the real deep nitty gritty how the nodes communicate with one another, why they communicate with one another in certain ways, and how they used to communicate with each other in which there were basically ways for people to attack you, essentially. Or act maliciously against your node because of the way that the original protocol used to work and how they've improved upon it to where those options are no longer viable. And you really get to see that bitcoin core developers really do have an adversarial mindset when it comes to the meticulous choices of what bits they choose, why they choose them, and why they do integrate them overall. Yeah, I think that's one of the most powerful things about bitcoin is it's very slow in its evolution. Well, it's exactly like how evolution is happening on earth. I mean, it doesn't happen overnight and it happens very slowly. And in many ways, it actually requires a consensus of nature to be able to make that evolution. And so, like bitcoin, you're not just going to make a change overnight. When these developers are developing, they first have to do a bit, then that bit has to be talked about by the developers. And then before you can even integrate it, there's a long, drawn out process, vetting process that I'm not even aware of, but they're very meticulous, like Tk said, to implement any changes into bitcoin. And these changes would be like soft forks. That wouldn't be hard forks, they would just be little tiny changes that could be done. And of course, you then have to update those have to get updated, minors have to get updated, and they have to have the consensus to accept those updates. It's just not like an easy process. It's a long, arduous process to finally get to the point where you can actually implement it. That's how I understand it, anyways. And because of that, it's a beautiful thing because bitcoin is like actually think about it this way. One of the oldest creatures on Earth is a crocodile. A crocodile from millions of years ago till now has evolved, but for the most part, it's still the same, but it's become more resilient. And the tiny, small changes that has happened to that crocodile have made it that much more resilient. So that's the same thing with bitcoin. It just gets hardened and hardened and hardened and hardened after many, many years. And so hundreds of years from now. Bitcoin is going to be a hardened freaking crocodile, so to speak. Anyways, that might have been a dumb ", + timestamp: '00:32:45-00:36:44', + topics: ['Bitcoin improvement'], + type: 'twitter_space', + weight: 35.70854341455261, + }, + { + boost: 0, + date: 1670706053, + description: 'On-chain game for stack', + episode_title: 'Bear Market Buidl — Major #Bitcoin developments! #Stacks #Sidechains', + guests: [ + { + name: '@GriffdenNFT', + profile_picture: 'https://pbs.twimg.com/profile_images/1604377729062895617/R4pSEdH4_400x400.png', + ref_id: 'dafdf7ec-28c0-43d3-a0d9-b2d266f38738', + twitter_handle: 'GriffdenNFT', + }, + { + name: '@Chad_333', + profile_picture: 'https://pbs.twimg.com/profile_images/1592310541732970496/o1tbw9Eo_400x400.jpg', + ref_id: '484c7695-6a4e-4141-9585-1109bf23f8cf', + twitter_handle: 'Chad_333', + }, + { + name: '@jackbinswitch', + profile_picture: 'https://pbs.twimg.com/profile_images/1601214177439260672/O0SpU5B1_400x400.jpg', + ref_id: '9685e7f3-3e0c-4b84-9fd9-b8a1d96f6ae9', + twitter_handle: 'jackbinswitch', + }, + { + name: '@jimdotbtc', + profile_picture: 'https://pbs.twimg.com/profile_images/1593210347825119237/L_SNThWQ_400x400.png', + ref_id: '5dcf5545-fad6-44ee-ae56-360c5efe1151', + twitter_handle: 'jimdotbtc', + }, + ], + hosts: [ + { + name: '@BigRpic', + profile_picture: 'https://pbs.twimg.com/profile_images/1604962150388219904/WqiCye-r_400x400.jpg', + ref_id: '726f0c95-9d94-4d44-a056-8ad3c9e3ddd5', + twitter_handle: 'BigRpic', + }, + { + name: '@CarlsonDoc', + profile_picture: 'https://pbs.twimg.com/profile_images/1597382056308350977/1NPexynZ_400x400.png', + ref_id: 'e34fa2b2-a58e-4461-81a0-d10c1058dfc2', + twitter_handle: 'CarlsonDoc', + }, + { + name: '@STXLDN', + profile_picture: 'https://pbs.twimg.com/profile_images/1533793338931007488/o3laQDCp_400x400.jpg', + ref_id: '5c3bc906-3aed-44f9-851a-94804c6fe5ca', + twitter_handle: 'STXLDN', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/99046513-2614-4eae-9de4-5781ba4b330a.jpg', + keyword: !0, + link: 'https://stakwork-uploads.s3.amazonaws.com/uploads/customers/2707/media_to_local/fc3bebcb-8271-433e-8d81-84dd06f3b022/aec527bc-539d-4d3b-9bad-db4af9e1a1ba.mp3', + node_type: 'clip', + pub_key: '03c7a7f42d94fdfc7a655515c1421cd1d20db090a1c24150201de0b1dc6a30b0ee', + ref_id: '09e8e827-fd7b-4800-8633-9f4fe7416210', + show_title: 'STX:LDN', + text: "I'm just going to pop in and just thank you for those kind words, Jack. You've been an awesome peer alongside everybody else in there. To have a more Stacks native user and a big voice for Stacks is great to have in the group. You have some amazing questions. I've learned a lot just from you being curious and sharing those curiosities with our mentors and I can echo everything you said. I think that it's such a fantastic opportunity, especially for someone like me who has minimal real world business experience, to be able to go in and learn the Lean Startup method from all of our mentors. Did I get rugged? Sorry. No, you're here. I thought I got rugged. Okay, just making sure. Thank you. And for anyone who's interested in building in Stacks and wants to open your network and meet some great people, possibly or some great team members, I could highly recommend the Web three pre accelerator startup Lab. And I'm really excited to see everybody start to get their ideas formed and just this great experience. And of course, being kind of brought into the Sachs community in this way, it gives me a lot of exposure to small, big, all types of people in this community. So I guess I could talk a bit about what we're doing. My team and I have pretty much landed on our idea. We have to speak to a few mentors here soon to make sure we can get some legal clarity before we continue on because it is going to be on chain gambling and that's a really important part, I believe, to build an investment ready startup. We have to have all those things in line before we go forward into the stacks. Accelerator, hopefully. And we're currently just building out one simple game. It's going to be an on chain digital coin flipping game with 50 50 odds playing against the house. We have many ways that we want to expand upon that, but if we see some success with this project and building more on chain games for Stacks, that is our grand vision. And we would love to also open up our platform to other builders or other people who want to build on chain gambling games but might not have the resources, whether it be a dev or the marketing sense. So it's really going to be a bit more than just the fungible flip game. But one thing we learned in the Pre accelerator is go for that one killer feature and shoot for something simple and something that was maybe done on another chain. So I had just remembered this game I had played on Salana about a year ago called Djen Coin Flip and that's where I drew the inspiration for our game from. And yeah, it's looking like it's going to turn out to be a success. The reason I thought this would be a good application for Stacks is I come from the NFT trading world where we're all degenerates mainly, and I look to that as being one of the bigger consumers, consumer groups, I should say, in web three, kind of like the Degenerate Gamblers or Speculators. And I truly haven't seen a ton of degenerate outlets for users on Stacks. So we want to be able to build out some of those fun games or gambling s games for Stacks users. We're mainly shooting for more non traditional gambling games, as I've noticed, that's blown up in the online gambling world over the past couple of years. But we really think that transparency is important when you're online gambling and we're going to be able to provide that through smart contracts on Stacks, of course. ", + timestamp: '00:20:15-00:24:50', + topics: ['On-chain game'], + type: 'twitter_space', + weight: 22.50741216002476, + }, + { + boost: 0, + date: 1633737600, + description: 'Public mempools versus private mempools ', + episode_title: 'Understanding Miner Extractable Value On Ethereum', + guests: [ + { + name: 'Nathan Worsley', + profile_picture: 'https://pbs.twimg.com/profile_images/1576238702908637186/xzcScTyV_400x400.jpg', + ref_id: '20529242-4546-475a-af1a-125b83aedd81', + twitter_handle: 'NathanWorsley_', + }, + { + name: 'Robert Miller', + profile_picture: 'https://pbs.twimg.com/profile_images/1595788538938695680/w6i5Q6s4_400x400.jpg', + ref_id: '292cfadd-7e67-4e34-876b-99804d416e20', + twitter_handle: 'robertjmiller_', + }, + { + name: 'Jordan Frankfurt', + profile_picture: 'https://pbs.twimg.com/profile_images/1544902585462788097/bGe0hNIi_400x400.png', + ref_id: '149db25a-26b1-4f69-8c9e-ec87e08ab8c8', + twitter_handle: 'jordanfrankfurt', + }, + ], + hosts: [ + { + name: 'Will Foxley', + profile_picture: 'https://pbs.twimg.com/profile_images/1580970227193376776/9oQfeExj_400x400.jpg', + ref_id: '704b9e82-3e40-40b6-874c-6bb8fadafbef', + twitter_handle: 'wsfoxley', + }, + { + name: 'Zack Voell', + profile_picture: 'https://pbs.twimg.com/profile_images/1595803006737448961/fFrf7VJb_400x400.jpg', + ref_id: 'e32c7661-c635-4089-a620-ffce509eff0e', + twitter_handle: 'zackvoell', + }, + { + name: 'Compass Mining', + profile_picture: 'https://pbs.twimg.com/profile_images/1425165074373791744/f2CgInvP_400x400.jpg', + ref_id: '812e5d37-47fb-4077-915f-df52e2ef84d8', + twitter_handle: 'compass_mining', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/ae91fac6-a1af-4877-9a92-e793d556ee66.jpg', + keyword: !0, + link: 'https://www.youtube.com/watch?v=6IxaLCPm6_E', + node_type: 'clip', + pub_key: '03c18d0c6c35333f22bc524e21a5fd1d2d9886f5d4d958dc1de95d025de5c84cfc', + ref_id: '330a0238-1acc-47fe-b809-48cc986a0b21', + show_title: 'Compass Mining', + text: "I'll rise to the challenge. Jordan, at flush spots, we like to point out the places in which our projects fall short so people can hold us accountable and I hope those of you on the panel do and the community abroad. So I think private mempos could be something that is very centralizing for the network overall. And I think it also turns the network into something more opaque. For better or for worse, the public mempool is that it is public and so everyone can sort of see transactions passing through. They have the same information that it has a level of transparency to it somewhat. There are kind of nuances over there, but you don't know what's going on with your transaction when it goes to flashpots protect you assume that we are a good actor. You assume that we're passing your transaction on without doing anything. And this is a repeated game where you see the game update, right? So you pass a transaction to us, you see the state of the chain, you see if you're a front run or not. You can choose to not use this if you don't want, but there are trust assumptions baked into that and it is a more centralized vector that has less transparency over the outcomes. I think, to be clear for the listeners, I'm not shitting on flashbacks. Protect I think it's a really cool thing. We are planning on integrating it into uniflop. Oh, some alpha. Yeah, we are actively working on utilizing this service. So we're big fans of flashbacks. Maybe I could give a little bit of color to some theoretical problems with having completely private mempools as Robert touched on. I think this is very important. Anyone running a full note or mining doesn't actually have access to the entire MEMP pool. They only have access to a small part of the men pool. The mempool is being shared around everywhere, but each person only can see a small piece of it. And the mempool is like communicating information that traders are using to capture mev. But that's not the only kind of information it's communicating. It's also communicating information about load on the network and it's communicating information about appropriate prices to set the transactions. And if you start to close off all of the menpoles, then that information is no longer being communicated around the network and you have to find other ways of communicating it. And also another point that Robert touched on as well is this issue of censorship. When the mental is open and everything is being shared around the network, you have some assurances about whether you're being censored or not, whether something is happening to your transaction. Maybe it's getting delayed and someone's doing some kind of private statistical extraction that you don't know about. If you have confidence that your transaction is going everywhere around the mempool to all these different nodes, and you can see that, then you can have some proof that that's not happening. That's not to say that I don't like the idea of private MEMP pools, but this is like maybe an argument that you could make sure sorry, go ahead. One thing that just crossed my mind, as you're saying that is a proliferation of private or at least like secondary mental mechanisms or gossip mechanisms would be essentially allowing users more choice in their privacy of the transactions. We see them, like the Quinn, things like Clover and Dandelion as mechanisms for providing users with better safety and defense against Eclipse attacks or whatever their Node. And maybe that's one point in favor of a proliferation of transaction relay mechanisms. ", + timestamp: '00:45:01-00:48:33', + topics: ['Public Mempool', 'Private Mempool'], + type: 'youtube', + weight: 12.134265304355546, + }, + { + boost: 0, + date: 1670706053, + description: 'Deep Lake finance: built for stacks', + episode_title: 'Bear Market Buidl — Major #Bitcoin developments! #Stacks #Sidechains', + guests: [ + { + name: '@GriffdenNFT', + profile_picture: 'https://pbs.twimg.com/profile_images/1604377729062895617/R4pSEdH4_400x400.png', + ref_id: 'dafdf7ec-28c0-43d3-a0d9-b2d266f38738', + twitter_handle: 'GriffdenNFT', + }, + { + name: '@Chad_333', + profile_picture: 'https://pbs.twimg.com/profile_images/1592310541732970496/o1tbw9Eo_400x400.jpg', + ref_id: '484c7695-6a4e-4141-9585-1109bf23f8cf', + twitter_handle: 'Chad_333', + }, + { + name: '@jackbinswitch', + profile_picture: 'https://pbs.twimg.com/profile_images/1601214177439260672/O0SpU5B1_400x400.jpg', + ref_id: '9685e7f3-3e0c-4b84-9fd9-b8a1d96f6ae9', + twitter_handle: 'jackbinswitch', + }, + { + name: '@jimdotbtc', + profile_picture: 'https://pbs.twimg.com/profile_images/1593210347825119237/L_SNThWQ_400x400.png', + ref_id: '5dcf5545-fad6-44ee-ae56-360c5efe1151', + twitter_handle: 'jimdotbtc', + }, + ], + hosts: [ + { + name: '@BigRpic', + profile_picture: 'https://pbs.twimg.com/profile_images/1604962150388219904/WqiCye-r_400x400.jpg', + ref_id: '726f0c95-9d94-4d44-a056-8ad3c9e3ddd5', + twitter_handle: 'BigRpic', + }, + { + name: '@CarlsonDoc', + profile_picture: 'https://pbs.twimg.com/profile_images/1597382056308350977/1NPexynZ_400x400.png', + ref_id: 'e34fa2b2-a58e-4461-81a0-d10c1058dfc2', + twitter_handle: 'CarlsonDoc', + }, + { + name: '@STXLDN', + profile_picture: 'https://pbs.twimg.com/profile_images/1533793338931007488/o3laQDCp_400x400.jpg', + ref_id: '5c3bc906-3aed-44f9-851a-94804c6fe5ca', + twitter_handle: 'STXLDN', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/99046513-2614-4eae-9de4-5781ba4b330a.jpg', + keyword: !0, + link: 'https://stakwork-uploads.s3.amazonaws.com/uploads/customers/2707/media_to_local/fc3bebcb-8271-433e-8d81-84dd06f3b022/aec527bc-539d-4d3b-9bad-db4af9e1a1ba.mp3', + node_type: 'clip', + pub_key: '03c7a7f42d94fdfc7a655515c1421cd1d20db090a1c24150201de0b1dc6a30b0ee', + ref_id: 'a3fe7197-5948-404f-a8b0-f04bb130db27', + show_title: 'STX:LDN', + text: "can you tell me? I'm friends with Rafa, and as I understand it, he's co founder on Deep Lake. What are they actually doing? How does it work? Well, I can't tell you from a technical standpoint, but I can tell you from a Djen trader standpoint, deep Lake Finances is a way for people to trade perpetual futures instead of using a centralized exchange like BitMEX or what have you. It's a D Five protocol that allows you to do that. Really, the ultimate thing is the way it's being built is whatever kind of liquidity providers you want to have, you'll be able to make these pairs on this platform and trade their futures so the applications go bigger than just Bitcoin and Stacks or whatever. The applications for something like that can be scaled up tremendously, but just that in and of itself. So there's a huge need in the market for such an app. Hey? Well, yeah, I think right now there's a huge need for a lot. Right? I mean, you don't know what you don't know, but something like that. Absolutely. 100%. Just from a trader standpoint, which before I, when I learned about crypto, the next thing I learned was trading crypto from a trader standpoint, a decentralized exchange that I can trade futures on and not have to risk leaving my coins in a centralized exchange, especially status posts, FTX and all of this other nonsense we've watched. That's massive. That's absolutely massive. The audience for that is enormous. Well, that's great. I'm so happy for RAF coming up with this and putting his team together. It's really impressive. I had no idea what it really meant by a perpetual and when you say futures market, well, yeah, I understand that and that's great. That's just great. Yeah, it's awesome. Right? A lot of tech people don't like to think about it this way, but I think about it this way because this is just what I've seen. What's being built in Web Three started on the back of traders period when the news and when everyone in the real world and everyone was just insisting bitcoin itself was a scam and it was tulips and it was this, it was that, and the other traders were out there with their skin in the game, day one. And the liquidity that we've provided to these various chains, sometimes more liquidity than we cared to, but the liquidity we've provided has built this market. And I think that that natural progression is still there because it's still such a young market. Like I said, this is what we're seeing happen right now. The fruits that come to all this labor are going to take generations to ultimately come to fruition. But yeah, traders bring eyeballs, traders bring liquidity. And having apps like that on any chain are really going to bring the investment, bring the capital, bring the interest. It's going to do just like it did with me when I discovered crypto. The giant green candles makes people be like, hey, what's going on over there? I'm going to check this out. Or with NFTs, they come for the pictures and they leave with the understanding of the evils of Fiat. Right? I mean, this is what we're doing. So, yeah, having something like that being built right now, is just huge for Sax. 100%. Yeah. I didn't know what Rafa was trying to put together. And when they published that landing page for Deep Lake, I thought, well, that's interesting. I just didn't know what they meant by perpetuals. And when you talk about futures oh, of course, right. Makes a lot of sense. One thing I do know is I don't believe Rafa is the co founder of Deep Lake, but he is partnering with them for whatever project he is building. Is that right? Rafa is not the co founder of Deep Lake. No. I just dropped an article in a link if you want to check it out. It's a small dive about what they're working on. The guy who started, a guy named Abdel Harass. Really just cool dude, really smart guy. But yeah, there's a little article down there below if you want to check it out. Absolutely amazing tech. Thank you. ", + timestamp: '01:02:21-01:08:24', + topics: ['Deep Lake finance', 'stacks'], + type: 'twitter_space', + weight: 21.730685924323048, + }, + { + boost: 0, + date: 1671735703, + description: 'Steps to onboarding a new bitcoiner', + episode_title: 'TOXIC HAPPY HOUR! #Bitcoin, Pysh, Booth, BTC Ben & the Plebs! 🍻😂', + guests: [ + { + name: 'Jeff Booth', + profile_picture: 'https://pbs.twimg.com/profile_images/1362957991410954241/spiaMAg2_400x400.jpg', + ref_id: 'f1143bcc-9ab9-4716-8259-0e5b026f8039', + twitter_handle: 'JeffBooth', + }, + { + name: 'George Gammon', + profile_picture: 'https://pbs.twimg.com/profile_images/1246550014450700291/2n_iHigp_400x400.jpg', + ref_id: '7ca1bc4f-3a57-4a6a-bedf-ef47a8b37297', + twitter_handle: 'GeorgeGammon', + }, + { + name: 'Neil Jacobs', + profile_picture: 'https://pbs.twimg.com/profile_images/1593645788978102277/UAQCQKeE_400x400.jpg', + ref_id: '0bc759e0-b055-4800-a79d-2b950fe5cc53', + twitter_handle: 'NeilJacobs', + }, + { + name: 'Preston Pysh', + profile_picture: 'https://pbs.twimg.com/profile_images/1408783276081299462/f4Ye5n7-_400x400.jpg', + ref_id: '01ad2c81-2d0c-44a9-93a1-42c07287aa80', + twitter_handle: 'PrestonPysh', + }, + { + name: 'Brian', + profile_picture: 'https://pbs.twimg.com/profile_images/1589300685182570500/cTffQlpJ_400x400.jpg', + ref_id: 'b167b1cd-bbce-4839-a03c-194f006f954d', + twitter_handle: 'BrianTheDrumer', + }, + { + name: 'BTC Ben', + profile_picture: 'https://pbs.twimg.com/profile_images/1348015880664473610/S-uDNLlZ_400x400.jpg', + ref_id: '2c95b3dd-e3a2-4cf0-a49e-a8915d2bfcd5', + twitter_handle: 'bensemchee', + }, + { + name: 'Craig Shipp', + profile_picture: 'https://pbs.twimg.com/profile_images/1605961563420114945/MWGqR1Gm_400x400.jpg', + ref_id: '8d6ca47a-89a2-4331-bae4-2fae18055a95', + twitter_handle: 'CraigShipp', + }, + ], + hosts: [ + { + name: 'PUBLORD', + profile_picture: 'https://pbs.twimg.com/profile_images/1480160632360124416/AM_vVRko_400x400.jpg', + ref_id: '8126d933-0986-4fd2-a6be-c02581294463', + twitter_handle: 'publordhodl', + }, + { + name: 'Anders', + profile_picture: 'https://pbs.twimg.com/profile_images/1391477993726529545/xqIjHq5w_400x400.jpg', + ref_id: '78672de6-3c5f-4d95-8fd9-f2b512fa7a04', + twitter_handle: 'Anders_', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/0c42d408-e518-4ecf-b282-d864a8c14002.jpg', + keyword: !0, + link: 'https://stakwork-uploads.s3.amazonaws.com/uploads/customers/2707/media_to_local/dbc5dd26-2307-4f64-a377-105e2a277d9c/be3d47a7-2fcd-4de8-8f22-71851953d022.mp3', + node_type: 'clip', + pub_key: '02574d6e8e787372184b6f17c40d6c6fe1777db9015801f95dfd24692784d767cd', + ref_id: '4491ca29-82ab-4599-8d39-039653b35aa3', + show_title: 'PUBLORD', + text: "No, I just did that last night. I literally sent a text to it. I got this guy that I onboarded this year. A few months ago, he's bought a little bit of Bitcoin. He's got like maybe a couple of $100 worth on cash app. And last night, he was finally asking me, he was asking a question. I was like, oh, shit. I left before I could teach you how to use wallet. So literally, I spent 45 minutes writing this text, basically explaining exactly in detail and taking pictures, like how to download, like, blue wallet, create a wallet, save his keys, told him to write them down, and then how to copy and paste the address and explain private keys. And it took a while, but I sent it. And at the bottom, it's like, congratulations. Like, you now own value that nobody can take for you. And I know that when he finishes that, he's a little older guy and he doesn't really know much about tech, he's going to feel really accomplished when he gets that done. And that's such a good feeling. It's like you do forget like Pablo was saying, you get down the rabbit hole, and you forget there are still people at the Tilt, like, they haven't even crossed in yet. And pulling them across even just a little bit and planting that seed, it's an amazing it's an amazing part. I love hearing all this stuff. You're absolutely right. That feeling of that person kind of having and you just know that there's going to be many more AHA moments throughout their bitcoin journey. But witnessing some of those first ones are pretty incredible. And especially this past month or so, I've had an influx and this gets me so bullish. I've had an influx of people booking me for one on ones saying, I've never self custody before, and now is the time, because this year has scared the hell out of me. So SBF has gifted us with a whole new generation of self sovereign hoddlers that are getting their shit off exchanges. I had a session earlier this week with a dude, probably 20s, early 30s, something like that, and his mom, and they were both taking self custody for the first time, and they were doing it on cold cards. His mom learned how to air gap in a transaction, which is incredible, and she did very well. That's amazing. Yeah. And she understood what was happening. As I was saying, like, oh, well, you just need when I was explaining the SD card, I was like, yeah, you bring it over. All you're doing is you're giving a signature like you would on using your credit card. You're signing the transaction. You're giving permission to send only the transaction that's in front of you. And she's like, okay, that makes sense. And she got it. I've been through a ton of these sessions this month, and it's just every time the people are like, this is really not that bad. Like, once you kind of understand what you're doing, it's just getting over the hurdle of saying, okay, I'm going to spend some time to learn this. But once they do, they're like, oh, my God. I don't know why I was so afraid. It's such an amazing feeling. If I did this where I'm doing on the 18th, would any of you be happy to dial in and answer questions? We kind of did, like, a Twitter space for it, maybe I'd be happy to join the space that you're talking about setting up. Also, I'm a fan of the idea of doing a split night. Like, one more for the beginners and one for the people who are kind of well into their journey and just want to connect on more up to date things. You could have sections to the night I've seen people do where, okay, from this time to this time is beginners, and then from this time to this time is advanced. And then you can also encourage the advanced folks to show up for the beginner section so that you have hands on deck to assist individuals as they set up the first wall. Very good. That's a great idea right there. I'll go one further and you have different sections. You can have, like, an upstairs for advanced, downstairs for beginners. Because I'll tell you what, when I saw BTC session in action, trying to explain Bitcoin from zero to now, you are running your own node in 20 minutes. One of the most impressive things you'll ever see. Let me tell you something. Ben knows his stuff. And it was PowerPoint after PowerPoint after PowerPoint, and my eyes were glazed over. I was learning a lot, man. But then he brought it home, beginning to end. Yeah. You got to break it down in small bites. I think that's exactly what I want to do. I want to try and make it, like, fun. We're going to have a laugh and joke. We can make it really typical, but I don't really want to bamboozle people as well. At the same time, I kind of want to build the community like we do on this space. This is a great thing I love about your space, probably, is that we can talk about some random stuff sometimes, but it's just because we're all on the same wavelength. This is why I love hanging out. You know what I mean? It's just hanging out with mates. Yeah. This is where we sort of begin, man. I've always started with just simple questions between each other. But it's tough, man. I mean, to come into this. First off, you're not going to drag anybody 26 miles to a marathon. So the ones that you try to orange pill that you wish, guess what? They better have a good foundational. Understanding that the money system is broken to begin with after that, that's just the beginning, man. That's just beginning. Going down this rabbit hole. Okay, now you think I understood what? I never heard the term Austrian economics until I found bitcoin. What do you mean, Austrian economics? What the hell is going on here? You don't understand that stuff, man. You just go down there, you start learning about the debatement of currency and the Fed, how this all began. Yeah, that's hard to put into one weekend, let alone one day. The money system is broken. You all we know. And the prophecy is coming true tomorrow. It's like Saturday. Easy. It's easy. Educator, sir. ", + timestamp: '02:24:15-02:31:42', + topics: ['bitcoin self custody', 'bitcoin education'], + type: 'twitter_space', + weight: 28.510520965677095, + }, + { + boost: 0, + date: 1671735703, + description: 'Possibility of block mining on the hash rate', + episode_title: 'TOXIC HAPPY HOUR! #Bitcoin, Pysh, Booth, BTC Ben & the Plebs! 🍻😂', + guests: [ + { + name: 'Jeff Booth', + profile_picture: 'https://pbs.twimg.com/profile_images/1362957991410954241/spiaMAg2_400x400.jpg', + ref_id: 'f1143bcc-9ab9-4716-8259-0e5b026f8039', + twitter_handle: 'JeffBooth', + }, + { + name: 'George Gammon', + profile_picture: 'https://pbs.twimg.com/profile_images/1246550014450700291/2n_iHigp_400x400.jpg', + ref_id: '7ca1bc4f-3a57-4a6a-bedf-ef47a8b37297', + twitter_handle: 'GeorgeGammon', + }, + { + name: 'Neil Jacobs', + profile_picture: 'https://pbs.twimg.com/profile_images/1593645788978102277/UAQCQKeE_400x400.jpg', + ref_id: '0bc759e0-b055-4800-a79d-2b950fe5cc53', + twitter_handle: 'NeilJacobs', + }, + { + name: 'Preston Pysh', + profile_picture: 'https://pbs.twimg.com/profile_images/1408783276081299462/f4Ye5n7-_400x400.jpg', + ref_id: '01ad2c81-2d0c-44a9-93a1-42c07287aa80', + twitter_handle: 'PrestonPysh', + }, + { + name: 'Brian', + profile_picture: 'https://pbs.twimg.com/profile_images/1589300685182570500/cTffQlpJ_400x400.jpg', + ref_id: 'b167b1cd-bbce-4839-a03c-194f006f954d', + twitter_handle: 'BrianTheDrumer', + }, + { + name: 'BTC Ben', + profile_picture: 'https://pbs.twimg.com/profile_images/1348015880664473610/S-uDNLlZ_400x400.jpg', + ref_id: '2c95b3dd-e3a2-4cf0-a49e-a8915d2bfcd5', + twitter_handle: 'bensemchee', + }, + { + name: 'Craig Shipp', + profile_picture: 'https://pbs.twimg.com/profile_images/1605961563420114945/MWGqR1Gm_400x400.jpg', + ref_id: '8d6ca47a-89a2-4331-bae4-2fae18055a95', + twitter_handle: 'CraigShipp', + }, + ], + hosts: [ + { + name: 'PUBLORD', + profile_picture: 'https://pbs.twimg.com/profile_images/1480160632360124416/AM_vVRko_400x400.jpg', + ref_id: '8126d933-0986-4fd2-a6be-c02581294463', + twitter_handle: 'publordhodl', + }, + { + name: 'Anders', + profile_picture: 'https://pbs.twimg.com/profile_images/1391477993726529545/xqIjHq5w_400x400.jpg', + ref_id: '78672de6-3c5f-4d95-8fd9-f2b512fa7a04', + twitter_handle: 'Anders_', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/0c42d408-e518-4ecf-b282-d864a8c14002.jpg', + keyword: !0, + link: 'https://stakwork-uploads.s3.amazonaws.com/uploads/customers/2707/media_to_local/dbc5dd26-2307-4f64-a377-105e2a277d9c/be3d47a7-2fcd-4de8-8f22-71851953d022.mp3', + node_type: 'clip', + pub_key: '02574d6e8e787372184b6f17c40d6c6fe1777db9015801f95dfd24692784d767cd', + ref_id: 'c09cfdab-f18f-45ad-9542-bd095f3ef52a', + show_title: 'PUBLORD', + text: "Well said, DC. Just real quick, I see bitcoin blue. We respect the hands here. I didn't know if you're going to change topics. Did I ever tell you my Easter egg analogy? Easter egg analogy for that? Yeah, I've heard it. Tell it again, though. I like it. Yeah, so it's pretty cool. At a club here, they had different age groups for an Easter egg hunt, and what they did like kids. They had like five and under in one area. Then they had like kids that were six to eight and then like nine to eleven, but they had three different Easter egg hunts going on. All right, so those little kids, look, they're not going to really surf too deep, so they literally would just leave the eggs open on the ground. I mean literally on the ground next to the tree, whatever, progressively got a little bit harder. So the other kids sort of hit them. You can only see a little bit of the egg. They would find them. And for the older kids, of course, man, you got to stuff very deep. So the difficulty adjusting to me is, guess what? There's a certain number of eggs we got to find every hour. You got little kids looking for hard eggs to find. Guess what, man? It's going to take a while. So what do they do? Difficulty adjustment. We're going to take you guys and we're going to put you we're going to take you from the hard part, and once in a while, we got to shift you back down to where everything is out in the open. We're going to give you some of the easy eggs to find, and over the course of everything, that's going to average out to our ten minute block time. I love it. And it's a great metaphor. It's amazing how something like that is like the missing ingredient to a system that can actually regulate itself over a long period of time. It's like truly mind boggling when you consider the computing power that's on Bitcoin today versus when it started. Satoshi ran that shit for like a week before he found Howl, who started running it, or however long it was, how Hal joined. And now there was two people with computers running this code. And today it's just like, absurd. The number of machines that are just computing as fast as they possibly can. Here's the same issuance timing. Here's some fed. TC what guarantees that the next block will be guessed correctly? Nothing. So essentially, there is a possibility for the block. The next block never gets mine. It's true, but we've never seen that happen so far. And the thing about it is, again, humans don't do so well with big numbers. You look at the total hash rate, and it's like over 200 x a hash overhead. That's over 200 million trillion guesses per second. You're saying I'm thinking of a number and you got a million trillion people no, 200 million trillion people standing in front of you all guessing. Wait a minute. 200 million trillion. Is that the omnibus, the next spending bill for the government? Oh, yeah, definitely no. TC it's amazing the foresight that Satoshi had, because in some of his writings you could see that he was saying that, I know in the future, because of Moore's Law, like, computing power is going to increase and blah, blah, blah, blah, blah. And so he's like, oh, it is necessary for this network, for its longevity, to have a way to, like, self regulate. And it's just the level of fucking, like, genius you have to have in order to foresee all this shit and write the code that makes it work. It's just fucking unbelievable. I was telling my friend that the difficulty adjustment is like, what makes it work? It's one of the things that makes it work. But to me, it's like, if it wasn't there, bitcoin wouldn't function the way it does, right? It wouldn't. It's a perfect balance. And where we saw it, really, the first time I saw it unleashed was when China took all those miners offline. And I forget the percentage that came offline. It was 50%. Oh, man. And it worked. It was just beautiful to watch unfold. Because when that adjusted, guess what, TikTok neck block. There's no stopping bitcoin. You can break it down even more, and it's even more beautiful. It's like the hash rate started to come offline. Blocks start to come in slower. Then no more than two weeks later, this adjustment occurs and re incentivizes whoever's still hashing gives them a bonus. They were sitting on the sideline, an incentive to start doing that activity. Dude, I know this first hand. I FOMOD into mining. Last summer, June, July 21, I saw the hash rate plummet. I realized that the difficulty adjustment had crashed, and it was easier to find blocks today than it was a couple of months ago. Let's fucking go. And that's what's really incredible about it, is the resulting incentives that come from those changes while simultaneously stabilizing a system that's having absolute volatile changes. How do you kill something like that? Where the human incentives are, the greed is just, like, ever present. If the fucking hash rate drops, everyone's going to foAmal into mining. Like the small people, like everybody in their house. And it's just so beautifully. It's so elegant, because in a way, it's harnessing forces and variables that are so hard to human psychologies. Like game theory. Whoever came up with bitcoin, whoever Satoshi is, bro, I'll get on your knees and suck your dick. That's the level of fucking, like, why does this shit keep coming up in this room, man? I swear to God. First breakfast because it sucks. The happy hour, bro. I think the longest I've ever had to wait for a confirm that I knew was going to be next block was like, 84 minutes, and the shortest I've gotten I've gotten them were like, literally by the time I go to check, it's confirmed, like, within, like, 20 seconds. So it's crazy how the variance can be. Yeah, bitcoin is beautiful. I said it. Bitcoin ", + timestamp: '00:21:59-00:29:16', + topics: ['block mining', 'hash rate'], + type: 'twitter_space', + weight: 28.510520950548525, + }, + { + boost: 0, + date: 0, + description: 'More thoughts, questions and answers on Nation States and the Information age', + episode_title: 'The Sovereign Individual - The End of Egalitarian Economics', + guests: [ + { + name: 'chriskapilla', + profile_picture: 'https://pbs.twimg.com/profile_images/1362817539135463427/2AXUeFLV_400x400.jpg', + ref_id: '9d495790-93f2-4d6c-b770-b2885f66859d', + twitter_handle: 'chriskapilla', + }, + { + name: 'remydenton', + profile_picture: '', + ref_id: '5c5beb0c-c214-4f23-b79a-e71bf9368f2d', + twitter_handle: '', + }, + { + name: 'JackRonaldi', + profile_picture: 'https://pbs.twimg.com/profile_images/1583261828628496384/IazkwYjk_400x400.jpg', + ref_id: '01621476-f040-49dd-8160-4035228faf78', + twitter_handle: 'JackRonaldi', + }, + { + name: 'AlistairZ80Aftw', + profile_picture: 'https://pbs.twimg.com/profile_images/1362882489895841795/gH2zix3l_400x400.jpg', + ref_id: '3dcba197-47ca-40c0-857d-73cec4325801', + twitter_handle: 'AlistairZ80Aftw', + }, + { + name: 'mattonbtc', + profile_picture: 'https://pbs.twimg.com/profile_images/1549459254280687618/jzdHJou3_400x400.jpg', + ref_id: '998167d3-e036-4ef1-9a05-4f062903f0c5', + twitter_handle: 'mattonbtc', + }, + { + name: 'wai_wairua', + profile_picture: 'https://pbs.twimg.com/profile_images/1536570699761848320/T10Owc60_400x400.jpg', + ref_id: 'c4d4ff36-73fa-4471-91ba-de0f99a49e99', + twitter_handle: 'wai_wairua', + }, + { + name: 'UltraSolomon', + profile_picture: 'https://pbs.twimg.com/profile_images/1468332451055427601/YVgUuUHc_400x400.jpg', + ref_id: '6371d519-cc98-4bf4-9f82-be17b1ea532a', + twitter_handle: 'UltraSolomon', + }, + ], + hosts: [ + { + name: 'BTC_Venetians', + profile_picture: 'https://pbs.twimg.com/profile_images/1557482467539521537/Kel-eVww_400x400.jpg', + ref_id: 'a6313ca9-3869-4477-88ad-30172957edcf', + twitter_handle: 'BTC_Venetians', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/75ec86b1-cb6d-467f-a66e-5e642e5c126a.jpg', + keyword: !0, + link: 'https://stakwork-uploads.s3.amazonaws.com/uploads/customers/2707/media_to_local/c8cc9ec1-061d-4f53-a24b-ee43a56c7715/e650057e-2369-4e75-8119-4975a1fc4cac.mp3', + node_type: 'clip', + pub_key: '03eb026c3e6597055595e42299377a4e164982775cc67f1d2135d9f1cd3a89f526', + ref_id: 'af7832e4-45e7-44e6-a91c-04652f9ce4fa', + show_title: 'Bitcoin Venetians Book Club', + text: "let's move on to my favorite question that I came up with, which was, let's imagine that the nation state doesn't survive and it's a bunch of small sovereignties. I guess where I'm always confused is, as a bigger entity, you're more powerful. So if we split up into a bunch of smaller ones, like, what's to prevent, like, some Genghis Khan coming around and conquering the small, weaker sovereignties, small sovereignties. I guess part of it is the wealth being unconfiscatable, the wealth being situated online rather than in terms of physical resources, in terms of information, and in terms of Internet native money. I find this very interesting. Like, it's kind of the Jason P. Lowry form of address. And I challenge that. Because if you have one country with nukes or greater violence in one country without, and this is physical violence, not informational violence. And the authors having talked about infrastructure being a key component of wealth, it does strike me that the physical you can't just ignore the physical component and a lot of the debates. The nature of violence is shifting, and it's easier to defend your wealth than ever before and much more costly to attack that wealth. And so therefore, the cost of violence is changing and favoring the individual. And I understand that. But at the same time, I just don't think you can ever discount an army moving onto your front doorstep and taking your culture and your home and your roads and everything else. I think I'd have a very similar critique of Jason Larry, whose name was previously banned in the book club, but we'll let you off as you've been away. But I guess the question is maybe the relevant question isn't if there was a large country with big armies, couldn't they just bulldoze everything? But would such a nation be one of the ones that collapsed? Would it be sustainable if it could no longer use extractive techniques against its own population to fund that war? I sometimes wonder if we'll see, like, I don't know, I got to find the right phrase, like cyber Vikings. I wonder if all of the kind of plundering of, like, other small sovereignties would be technological purely rather than physical. Yeah, I think maybe the violence will go into both domains. And I think we already kind of see that with hackers attacking people, especially, like, in the ethereum and rest of the crypto space where people are a bit more careless and there's a lot of security vulnerabilities you keep seeing like hacks tens of millions of dollars stolen all the time. But I think on the physical versus digital violence, I don't know, I think it'd be a calculus for even if it's a smaller attacker and smaller sovereignty, it would be a calculus. Like, let's say we're all on bitcoin and it's sound money. What if we came off of sound money and we funded a big war effort and we could steal people's maybe not their digital welcome bitcoin because you can't crack that security. But I think money at the end of the day is like a means to an end, not an end itself. And the means that it is the end that it's a means to is in the physical world mostly, at least for the time being. And if you can appropriate all of that wealth physically doesn't really matter in my opinion, or it doesn't matter as much what the ledger of bitcoin says if you have the physical wealth. And I mean, I guess a relevant factor is that is the armies these days are less and less human based and more and more technologically based in terms of drones and remote fighting and things like that. So you don't even have the hearts and minds issue that you may have had in the past in persuading people to go to war and give up their lives for this fictitious entity of the nation. I know we've had this discussion quite a few times. Yeah. And I'm just wondering if you follow the trend of the book and you say I mean, we've seen it already, these hyper wealth concentrations where we've already got single people who are more wealthy than entire nations. Significantly more. In some cases and whether or not they will have private armies and then able to fund those armies to then kind of perhaps do what they want. So there is countercases to be made against this claim that things will be defendable in the informational age. But I'm not wanting to get too dystopian. I still think that it is a powerful force for positive, and it's quite hard to weigh. It's very hard to weigh what force will mean more and how it gets discounted. Talking about a nation state funding its military, how much of that defunding through perhaps bitcoin, how much of that will actually have an effect. It's really hard to quantify. ", + timestamp: '01:02:09-01:08:19', + topics: ['Economies of Scale', 'Nation States', 'Information Age'], + type: 'twitter_space', + weight: 10.800045251846313, + }, + { + boost: 0, + date: null, + description: 'Hosting family thanksgiving and discussing bitcoin', + episode_title: 'Café ₿: Thanksgiving Special 🦃 w/ the Café Bitcoin Crew', + guests: [ + { + name: 'Rob Hamilton', + profile_picture: 'https://pbs.twimg.com/profile_images/1524033110630969351/wTUr8S36_400x400.jpg', + ref_id: '94b18625-4778-4cfe-9c78-823704d1c1b1', + twitter_handle: 'Rob1Ham', + }, + { + name: 'Tomer Strolight', + profile_picture: 'https://pbs.twimg.com/profile_images/1591960241008148481/HtyINxtU_400x400.jpg', + ref_id: '3a2bc97d-072c-4ed9-9a59-17ceeb68fe99', + twitter_handle: 'TomerStrolight', + }, + { + name: 'DJ Satoshi', + profile_picture: 'https://pbs.twimg.com/profile_images/915987644043030528/5nh3JQSz_400x400.jpg', + ref_id: '02ae35cb-3728-441f-84c5-a8db5d9150b4', + twitter_handle: 'satoshi__tomiie', + }, + { + name: 'Lauren', + profile_picture: 'https://pbs.twimg.com/profile_images/1586022214901501952/U1dRyCxP_400x400.jpg', + ref_id: '7f14bbf5-a60b-496b-a361-3663cf120299', + twitter_handle: 'LaurenJauregui', + }, + { + name: 'Shaeroden', + profile_picture: 'https://pbs.twimg.com/profile_images/1560742113410678789/cHZ2tUjU_400x400.jpg', + ref_id: '0da06a5c-038f-4737-9af7-17bed3712e68', + twitter_handle: 'Shaeroden', + }, + { + name: 'Andres', + profile_picture: 'https://pbs.twimg.com/profile_images/1401952614795943950/aL2h3Wb4_400x400.jpg', + ref_id: 'db4abfe9-e3bb-4ffa-9783-ce67f5b20270', + twitter_handle: 'andresvbr9', + }, + { + name: 'Peter Ansel', + profile_picture: 'https://pbs.twimg.com/profile_images/1374726811221954565/R7ttqYMI_400x400.jpg', + ref_id: '2d418514-e03c-414d-8ed1-10c894aacb6e', + twitter_handle: 'peteransell', + }, + ], + hosts: [ + { + name: 'Alex Stanczyk', + profile_picture: 'https://pbs.twimg.com/profile_images/1539055022364708864/rwErK6x1_400x400.jpg', + ref_id: '3126e2a3-bbe4-456b-b298-9714085fa286', + twitter_handle: 'alexstanczyk', + }, + { + name: 'Neil Jacobs', + profile_picture: 'https://pbs.twimg.com/profile_images/1593645788978102277/UAQCQKeE_400x400.jpg', + ref_id: '0bc759e0-b055-4800-a79d-2b950fe5cc53', + twitter_handle: 'NeilJacobs', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/239722cb-4216-414a-a17b-5adf9d52e15a.jpg', + keyword: !0, + link: 'https://stakwork-uploads.s3.amazonaws.com/uploads/customers/2707/media_to_local/c25e3b3c-b5ef-435e-9e7d-9e406089e7b1/572908d4-f2cc-4c7b-980c-8359d2c8000d.mp3', + node_type: 'clip', + pub_key: '02574d6e8e787372184b6f17c40d6c6fe1777db9015801f95dfd24692784d767cd', + ref_id: '5faa3765-8f15-41c7-8c8e-6136a0e67b5f', + show_title: 'Swan.com', + text: "Hey, I appreciate what American Huddle said. I don't know if it's a funny story, but it's a few years now that I've been hosting my family's thanksgiving. And I'll tell you that flips everything on its head when you're the host, I tend to find that there's a lot less of that kind of reactionary stuff in your direction. I don't know if people are just minding their manners more because you're serving them a feast, but it goes a little easier. And a couple of days ago, my mother in law rolls into town. Last year, I was talking her up about bitcoin. I sent a small amount to a blue wallet on her phone, got her set up, and first thing she says to me when she shows up, she says, did you see what happened to bitcoin? And that's when last night I thought it was funny. I sat her down in front of YouTube, and I played her this one time, and then it crashed. Video from YouTube, and she kind of had a blank stare after that thing played. I hope you guys know what video I'm talking about. The guy who says, this one time, bitcoin went from way up to $36 and then it crashed down to $20. Yeah. Anyways, find that video if you haven't seen it, but you fill in the blanks. I think that one ended at the cycle that peaked at around 1200. So you kind of fill in the blanks of then it went to 20 and crashed down to three, and then it went to 69 and it crashed down to 15. And you kind of help them fire off a couple of brain cells and put two and two together and realize sort of the bigger picture and the fact that they have the time frame of a mosquito and the way they're thinking about it. So for me, that was gratifying to kind of actually see a little light bulb go off in my mother in law's eyes last night when I was showing her that. So yeah, I don't know, maybe that works for somebody else. I've never actually heard that one. Jacob found it. No, he's going to play it right now. Oh, epic. Right now. Role. This one time bitcoin went from way to it crashed down to another time bitcoin went from way to $29. And then it crashed $3. And then another time bitcoin went all the way to $213. And then it crashed all the way to $70. And then another time bitcoin went all the way to $1,100. And then it crashed all the way to $239. So the moral of the story is don't buy bitcoin because you know it's going to crash again. He did a follow up tweet too. Then like the next bull market, he also said nothing. That video is so priceless because I'm pretty sure he's serious. I keep going back and forth between it's sarcasm or he's actually serious. But either way you got to watch it, Alex, because just the expression on the guys face. And then he's a bitcoin on Twitter. I didn't know his name. What's his name? Let me give his last name. 1 second. Yeah, I mean, I played that for my mother in law last night and then continued it. It went all the way up to 20,000 and it crashed down to 3000. You kind of have to help people because they still don't realize they hear that word crash and all they think is bad, bad, bad. You kind of have to put two and two together for them. But yes. Anyways, maybe that will help anybody with their relatives. You're welcome. That's hilarious. Shout out to Q in the audience. Going to throw you an invite. We need to remove somebody. Jacob, you be the bad guy. Take me off. Take me off. I'm handling my kids. And then also Brad Mills. What we're doing today, guys, is we're just telling funny or interesting thanksgiving or otherwise bitcoin stories. It's been pretty light, pretty chill and fun. I think it's worth noting. I think it's worth noting too, when you're talking with family and bitcoin, especially over. Time because you're going to be right. With time, you're going to be right. The bear markets, people poke funny or whatever, that's fine. But given enough time, you're going to come out looking so smart and so intelligent. I think that's where the stay humble part comes in. And you kind of have to be a little graceful with being right, at least around family, in my opinion. Sometimes when you're on Twitter, it's fun to be like, yeah, what's up, bitch? You were wrong, motherfucker. But like, I don't really say that's, like my aunt or something. The problem is if your family finds your Twitter and then they know how you're thinking anyway, so you can, like, try and be so polite. But then, like, three days before you showed up to Thanksgiving, you were like, bro, when I see these pores, I'm going to be just thinking, fuck you in my head. So just don't tweet stuff like that. You know what I mean? Don't be one to yourself. Maybe share that with your wife. We're all learning here. Hey, Q, tell us some funny or interesting bitcoin stories, man. I told you so. I've gotten this week have been actually kind of hilarious, I will say. Just the overall response and naivety of normaland versus especially those of us who I think very much understand the difference between bitcoin and crypto. The conversations I keep hearing is like, oh, shit, bitcoin is going to go to zero now because Sam is like, not going to be a thing that FTX is going under. It's really funny, at least to me, because at this point, I'm just like, you're right. You're absolutely right. We're not going to make it. And then I love my favorite thing is it's always people who are very bullish on the tech industry as a whole. And so it's just a very simple, how's your SaaS portfolio doing? How's that Facebook stock treating you? Everything's kind of gone to shit. So I don't know. It's pour yourself a nice heavy glass of whiskey, put your legs on the table and just let's see who bled the least, not who made the most, if you will. But I don't know. Painkillers are fun right now. I just wanted to say to the Swan family, thank you very much for everyone who hit me up after Pacific Bitcoin. Like, I am successful surgery and fully recovering right now. My Achilles. That's awesome too. I have this one uncles who will not stop calling bitcoin bitcoin, and they've been calling it bitcoin to my face since 2015. And I'm like, did you guys all miss the part where I became the richest person in the family or no, a ", + timestamp: '01:05:22-01:13:51', + topics: ['family thanksgiving', 'bitcoin crash', 'bitcoin discuss'], + type: 'twitter_space', + weight: 10.792905569076538, + }, + { + boost: 0, + date: 1637366400, + description: + 'The narrative around nuclear energy is getting louder and more encouraging for Bitcoin mining communities', + episode_title: 'Securing Bitcoin With Nuclear Energy', + guests: [ + { + name: 'Nuclear Bitcoiner', + profile_picture: 'https://pbs.twimg.com/profile_images/1443185278525579278/_Yl1nao1_400x400.jpg', + ref_id: '60f5891f-0864-4ed4-987a-81da4768b3ba', + twitter_handle: 'nuclearbitcoinr', + }, + { + name: 'Eric McErlain', + profile_picture: + 'https://pbs.twimg.com/profile_images/1252969137/Screen_shot_2011-02-23_at_10.59.21_PM_400x400.png', + ref_id: '4815365d-44d0-4b06-9d9e-32070158d03c', + twitter_handle: 'atomiceric', + }, + { + name: 'Puru Goyal', + profile_picture: 'https://pbs.twimg.com/profile_images/1590742805613203456/QAtYq_C__400x400.jpg', + ref_id: 'c24af059-b38b-4ce5-9547-9192c9eff579', + twitter_handle: 'purugyl', + }, + ], + hosts: [ + { + name: 'Zack Voell', + profile_picture: 'https://pbs.twimg.com/profile_images/1595803006737448961/fFrf7VJb_400x400.jpg', + ref_id: 'e32c7661-c635-4089-a620-ffce509eff0e', + twitter_handle: 'zackvoell', + }, + { + name: 'Compass Mining', + profile_picture: 'https://pbs.twimg.com/profile_images/1425165074373791744/f2CgInvP_400x400.jpg', + ref_id: '812e5d37-47fb-4077-915f-df52e2ef84d8', + twitter_handle: 'compass_mining', + }, + { + name: 'Will Foxley', + profile_picture: 'https://pbs.twimg.com/profile_images/1580970227193376776/9oQfeExj_400x400.jpg', + ref_id: '704b9e82-3e40-40b6-874c-6bb8fadafbef', + twitter_handle: 'wsfoxley', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/ae91fac6-a1af-4877-9a92-e793d556ee66.jpg', + keyword: !0, + link: 'https://www.youtube.com/watch?v=YBaA17NODlA', + node_type: 'clip', + pub_key: '03c18d0c6c35333f22bc524e21a5fd1d2d9886f5d4d958dc1de95d025de5c84cfc', + ref_id: '34c231bc-7fcf-4f55-a124-d67b008399a0', + show_title: 'Compass Mining', + text: "to have you continue that train of thought, elaborate more on where nuclear stands now compared to maybe where it did a decade ago. Well, the Fukushima event definitely derailed the deployment of generation four reactors and put that on delay for a while. So it seems like we're finally just starting to get back around to that. But I agree with you. The narrative around nuclear has gone for a complete flip just in the last few months, and it's reinvigorating and very encouraging to see that level of public participation and growth and notoriety growing and getting better and leaning less away from outdated, basically, flood. For nuclear relies on the old technology and basically problems that have been solved or in the process of being solved. My interest has been mostly in the advanced reactors, in the small modular reactors like the little little guys like the 1, because I've gotten really obsessed with the small the SMR action plan here in Canada where we are planning to basically upgrade remote communities from diesel generation to nuclear power. And some of these communities, the electricity prices out there are outrageous. It's pretty lucky for the communities that can get diesel barged in. But some communities that need to get their fuel shipped in, they're paying as much as ninety cents a kilowatt hour, sometimes even more. And that all gets subsidized so that it equalizes with the on grid prices. So that's a lot of money that could be spent for better investments if we could get a more stable long term energy supply in there that doesn't need to be constantly refueled. But the reason that I see Bitcoin mining being a super good amplification for that is that it just completely eliminates the demand risk of making these investments before the current situation is there's a lot of hesitancy to build large generation projects in far remote communities because there isn't a customer base to recoup that investment. But now we can deploy in excess and deploy a customer right alongside the reactor that will scoop up everything and then be perfectly aligned to the generation profile and they can be scaled and adjusted as needed. Depends on how communities grow there's. A lot of this is going to be used for remote conventional mining applications so they can incorporate bitcoin mining as a way to just better economize the reactors that they plan to use for their operations. And this is going to be a complete game changer for these communities that they've been energy impoverished for generations. And some of the stories that you hear about remote communities in Canada, especially indigenous ones, it's hard to hear and you want to come up with a solution to fix it. But the conventional problem has just been throw money at it and all that does is it just seems to just go down a hole and it invites corruption and it never goes to places that it needs to. These people need water resources, they need better food and just fixing the energy will have a cascade effect and resolve all of that. Yeah, no I agree 100% with all of that and it's crazy to watch people sort of in these conversations realize the location independence and almost unlimited demand for energy from bitcoin miners and how that resource can be deployed to very quickly and easily expand like energy infrastructure for nuclear or other energy sources. It's just insane and almost unprecedented. Before we dig into that though, I did want to know if peru if you had anything to add on to that with regards to the inflection point, a flip in public perception, nuclear skills poised for massive growth, like real growth infrastructure wise and popularity growth as well. Yeah, I think that makes sense to me. Also, one more thing I want to point out is a lot of the reactors that we see online today have been built out to 1970s and we haven't seen growth in reactor build out since then. And I think it's important to understand the energy market that we are currently living in to figure out why nuclear hasn't made a push so far. Nuclear accidents have definitely changed the world public perception over time and they do not help for sure because it's such a political thing. But apart from that, if you look at the energy build out that's happened especially in the United States, and if you look at the generations have been brought online then you'll see a period between 2000 and 2005 where there was a massive build out of natural gas power plants all around the United States. I think combined my numbers might be slightly off but I think in those five, six years combined there was around 200 gigawatts of natural gas power plants just built in the United States. And what led from there was just cheap natural gas prices. And nuclear has found really tough and not just nuclear, even coal power plants have found it really difficult to exist in a market environment like this where natural gas is certainly so cheap. So it just depends on like the build up that happens and now, I think the opportunity for special advanced nuclear reactors would come probably, I think, in 2030 to 2040s. That's the time frame where a lot of these existing power plants that we have currently are going to retire, especially, I mean, any predictions on energy markets generally are wrong, but I don't want to say that, but I'm looking at the trends. I think a lot of the existing plans are going to retire in 2030. And that's where I also wrote this on a Twitter thread where I feel that's exactly the opportunity which a lot of these private companies in the advanced nuclear reactor space are trying to fight for. So that's another important factor, aside from the accidents over time which have changed public perception. Got ", + timestamp: '00:15:37-00:21:49', + topics: ['Nuclear Energy Narrative', 'Bitcoin Mining'], + type: 'youtube', + weight: 10.626491553126828, + }, + { + boost: 0, + date: 1633737600, + description: 'Miner extractable value on Bitcoin', + episode_title: 'Understanding Miner Extractable Value On Ethereum', + guests: [ + { + name: 'Nathan Worsley', + profile_picture: 'https://pbs.twimg.com/profile_images/1576238702908637186/xzcScTyV_400x400.jpg', + ref_id: '20529242-4546-475a-af1a-125b83aedd81', + twitter_handle: 'NathanWorsley_', + }, + { + name: 'Robert Miller', + profile_picture: 'https://pbs.twimg.com/profile_images/1595788538938695680/w6i5Q6s4_400x400.jpg', + ref_id: '292cfadd-7e67-4e34-876b-99804d416e20', + twitter_handle: 'robertjmiller_', + }, + { + name: 'Jordan Frankfurt', + profile_picture: 'https://pbs.twimg.com/profile_images/1544902585462788097/bGe0hNIi_400x400.png', + ref_id: '149db25a-26b1-4f69-8c9e-ec87e08ab8c8', + twitter_handle: 'jordanfrankfurt', + }, + ], + hosts: [ + { + name: 'Will Foxley', + profile_picture: 'https://pbs.twimg.com/profile_images/1580970227193376776/9oQfeExj_400x400.jpg', + ref_id: '704b9e82-3e40-40b6-874c-6bb8fadafbef', + twitter_handle: 'wsfoxley', + }, + { + name: 'Zack Voell', + profile_picture: 'https://pbs.twimg.com/profile_images/1595803006737448961/fFrf7VJb_400x400.jpg', + ref_id: 'e32c7661-c635-4089-a620-ffce509eff0e', + twitter_handle: 'zackvoell', + }, + { + name: 'Compass Mining', + profile_picture: 'https://pbs.twimg.com/profile_images/1425165074373791744/f2CgInvP_400x400.jpg', + ref_id: '812e5d37-47fb-4077-915f-df52e2ef84d8', + twitter_handle: 'compass_mining', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/ae91fac6-a1af-4877-9a92-e793d556ee66.jpg', + keyword: !0, + link: 'https://www.youtube.com/watch?v=6IxaLCPm6_E', + node_type: 'clip', + pub_key: '03c18d0c6c35333f22bc524e21a5fd1d2d9886f5d4d958dc1de95d025de5c84cfc', + ref_id: '03c6b2f5-685e-4921-a230-e14e5679f792', + show_title: 'Compass Mining', + text: "on some level the answer is very simple in terms of comparative me v opportunities and strategies and development on Ethereum other chains versus bitcoin. On another level, maybe the answer is a little bit more intricate. But my question is basically in context of everything we've described and explained and understood so far in this conversation about Me V. Like why basically are there this many opportunities and this much development attention to minor and maximum extractable value on the bitcoin chain as opposed to a theorem and other chains? And maybe to add a little bit more interesting content to that answer, like if or when would anything like that change for Bitcoin? Maybe as a preface or to set up some of your answers, I know we're seeing an increasing amount of developer attention paid to covenant contracts, bills for bitcoin and Lightning and if those reach a pretty high level of sophistication there could be some interesting opportunities for MVP on bitcoin. Right now there just really isn't that much. So I'm curious to know your guys'insights on why that is and what, if anything, would sort of be a catalyst to kind of change that situation for bitcoin miners. Nathan, maybe you go first and then everybody else can jump in. Yeah, sure. I think it's just simply a function of the size of D five currently on bitcoin and that if we see that start to change, then we'll see the me the situation starts to change on bitcoin. Really like the incentives and the opportunity from me v not entirely, but mostly being generated by DFI and the DFI economy is just bigger than Ethereum at the moment. We are seeing people starting to make inroads into bitcoin with D five development and as that becomes bigger, I think these problems will become more pertinent bitcoin. I've been philosophically, it takes a very conservative approach to a lot of these issues. So they've pushed off a little bit of the default development down the road a little bit and I guess using Ethereum more as a testing ground to see how these issues have worked out. Yes, for sure. Robert, go ahead. Anybody? I think Nathan hit the spoke to it very well, I think. I would also note that there's more mev on bitcoin than I think bitcoin is like to acknowledge. In particular, there's a lot of griefing vectors that you can make money if you assume that you are a counterparty in a channel and a minor in the lightning network. So you just grief. Your counterparty take a lot of their money and I think most of that payment ends up going into a minor. There's like a bunch of different vectors for that as possible. There's a good article on this by a lightning developer, Lisa Nicole on Twitter. And then I think that there's some mev in bitcoin that just isn't really being exercised by miners right now. And there's some sort of theoretical mev that you could imagine too. So I kind of think of if there's giant arbitrage opportunities between centralized exchanges and you really wanted to be the first person to make a deposit at one centralized exchange, everybody is sold. You need to get new bitcoin on boarded there. You could imagine a minor exercising their control over yeah, this is the one. You could imagine a minor exercising their control over transaction ordering to be the only party that deposits at that centralized exchange and thus is able to capture the arbitrage. Something like that. Yeah, no, that makes sense. I actually forgot about this article at Austin Bit Devs a bit ago. They mentioned this for anyone watching who's interested in lightning and also mud, which I guess the Venn diagram there might be pretty small, but it's a great read. She explains some pretty interesting concepts. Yeah, Jordan, curious to know your insight too. You and I personally offline talk a lot about bitcoin and ethereum compared to ecosystems. MVP on bitcoin pretty small. What, if anything, would change that? Yeah, I think actually, Robert, the clockwork paper that you wrote had there's a section of it that gave me, I think, a decent or a better generalized framework for thinking about MVP opportunities. And it's just that, like, every MVP opportunity is like highly context dependent. And when you have a chain like ethereum where there is more context, like there's more state that can be manipulated, you therefore will have more MEB opportunities. So in the state, or in the case of bitcoin where you're primarily just managing transfers and just etxo's everywhere, there's a much simpler state surface on the chain than there is on ethereum. And ethereum is like orders of magnitude more complex and therefore creative people can find more interesting things to do to manipulate. So that state surface might change. For bitcoin. With ethereum, there's obviously certain changes that are happening with like, channel disputes and we'll see if there are more in the future. I'm sure that people are going to keep building on bitcoin and maybe someday we'll see some cool new opportunities arise. Maybe we should build it. Jordan. I mean, there's already plans, right, for AMM on bitcoin. I think Jack Dorsey said he's going to build it. So, I mean, as soon as that AMM is this, there's instantly mere available on Bitcoin, you can't have the AMM without having mev. It goes back all the way to that FHIR network or something like that back in 2015 that Matt Carello tried to build was that relay network. Those are also I always see them as infrastructure for maintaining mev, so it certainly exists. And James Preswich and Hustle and one other author have a paper back in 2019 talking about bitcoin mev and how that would lead to chain instability, which, Robert, I know you and I had a few Twitter DMs about. That subject like, what would it look like for transaction fees to become such a bounty for miners to start looking at reorganizing that network? Which would be pretty interesting. ", + timestamp: '00:21:48-00:27:58', + topics: ['Bitcoin Miner Extractable Value', 'Lightning Miner Extractable Value'], + type: 'youtube', + weight: 10.626491547282228, + }, + { + boost: 0, + date: null, + description: 'Experimenting with the Raspberry Pi', + episode_title: 'Reverse Proxy - #Bitcoin Nodes - NGINX is the Answer!🦾', + guests: [ + { + name: 'Pedro', + profile_picture: 'https://pbs.twimg.com/profile_images/1395874649876140035/z-IycTAj_400x400.jpg', + ref_id: '78acd8b7-3097-40c3-b626-245bc911dc49', + twitter_handle: 'pedromvpg', + }, + { + name: 'Machankura', + profile_picture: 'https://pbs.twimg.com/profile_images/1536075376409059331/0zddZFmE_400x400.jpg', + ref_id: '855f2d8f-2230-475d-b5c1-dcaace579de4', + twitter_handle: 'Machankura8333', + }, + { + name: 'DJ Satoshi', + profile_picture: 'https://pbs.twimg.com/profile_images/915987644043030528/5nh3JQSz_400x400.jpg', + ref_id: '02ae35cb-3728-441f-84c5-a8db5d9150b4', + twitter_handle: 'satoshi__tomiie', + }, + { + name: 'Portland.HODL', + profile_picture: 'https://pbs.twimg.com/profile_images/1562306406526492672/LiqmI9NS_400x400.jpg', + ref_id: 'aaa58ce5-7907-4c3a-9881-839cd012c456', + twitter_handle: 'PortlandHODL', + }, + { + name: 'anonsats', + profile_picture: 'https://pbs.twimg.com/profile_images/1601204123818401792/iQ85pwvS_400x400.jpg', + ref_id: 'f3bf3677-9864-4fe3-a8b0-976a67be45cd', + twitter_handle: 'anonsats', + }, + { + name: '₿rettInThe13%', + profile_picture: 'https://pbs.twimg.com/profile_images/1593104719311929345/tTSjoS2n_400x400.jpg', + ref_id: '0ad02828-02ee-465b-87c6-96e559905ed8', + twitter_handle: 'brettinthewoods', + }, + { + name: 'EasySats', + profile_picture: 'https://pbs.twimg.com/profile_images/1593330030905540618/ZHqVPhTM_400x400.jpg', + ref_id: 'd6d16cf5-4a9b-4517-897d-5cf98467ed1a', + twitter_handle: 'EasySats_', + }, + ], + hosts: [ + { + name: 'okin@8333.mobi', + profile_picture: 'https://pbs.twimg.com/profile_images/1518945775685967873/O0wPrIKO_400x400.jpg', + ref_id: '7af60fa9-1611-4029-b691-aa1481f99062', + twitter_handle: 'OKIN_17', + }, + { + name: 'Dread', + profile_picture: 'https://pbs.twimg.com/profile_images/1532557131819491328/vvs1cD-7_400x400.jpg', + ref_id: 'e61af76b-8fbd-4719-b753-0a70edd22fa8', + twitter_handle: 'PoleVaultDream', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/30180c4d-27f9-4215-81e0-6a22b16aba43.jpg', + keyword: !0, + link: 'https://stakwork-uploads.s3.amazonaws.com/uploads/customers/2707/media_to_local/e464bf90-24b2-48ec-b50a-e51c45412a19/00d3308d-b0b8-452b-a4bb-6025a731c457.mp3', + node_type: 'clip', + pub_key: '03c18d0c6c35333f22bc524e21a5fd1d2d9886f5d4d958dc1de95d025de5c84cfc', + ref_id: '896a10a9-621e-4f5e-a8d7-d4504dffd923', + show_title: 'okin@8333.mobi ⚡️ 🏰', + text: "Dell laptop, right? You can install NGINX on that, and then you can forward traffic through that Dell laptop into a Raspberry Pi that's running another node for you. You can do literally whatever. You can create this mangled net of whatever you want and point anything to anything internally. It typically works. There are a couple of caveats, but overall yeah, you don't even have to have it running on the same machine. Just the traffic has to initially hit NGINX first. That's the only requirement that it goes through NGINX first so that it can get routed. Blessings, blessings. I'm just going to have so much fun. Wow. Do it. Well, the Dell laptop is currently not a laptop anymore. That is an embassy node. As Dread said, once you use the X 86 hardware, it literally you put another OS on it. So it's running. I don't think it has any access to terminal anymore. But I do have my 20, my 2011 2010 MacBook Pro. So that one I'll probably do it. On, and you can still SSH into it and you know, you I mean, you still have root access to your machine, so you could do whatever you want. Yeah, you still do that's true experiment? Yeah. Go for it. Portland. Oh, I was going to say, as a note, we kind of mentioned earlier that Ram was one of the biggest factors as part of the IBD. So the initial block download. So when your device downloads the Bitcoin Core client, then you got to sync it up. My experimentation on specifically the Raspberry Pi is that the Raspberry Pi is not memory limited, it's processing power limited. And that is due to the Secpk basically message the elliptic curve cryptography that is happening, the processor literally cannot handle that amount of processing quickly. Like it takes forever. And I did this by doing the Perf tools in Linux and basically watched for which functions it was calling the most often. And the two of them were basically some square operations for that encryption library and some multiplication operations that were just getting ran again and again and again. And that's why on these Raspberry PiS it makes sense that they typically with the initial block download, it does really good until you kind of hit like 2017 or block right around like 500,000 or so. And then Seguit comes in and you start getting actually like complex transactions in there. And that is because it's spending so much time processing all these encrypted messages and validating that they're all valid. And where that goes is x 86 hardware is so much faster at doing these operations and that's why even installing bitcoin core and downloading these initial block downloads over on these x 86 machines that aren't as small as the raspberry pi. But it's so much more performant is because of the fact that these machines are so much better at handling these kind of operations quickly and efficiently. The Raspberry Pi just sits there and churns and churns and churns. And that's why even towards the very last part of the IBD nowadays, usually like the last like 10%, it is just excruciating while this little pie is just churning numbers all the time. And whether you have 4GB or 8GB, I found does not matter one bit. Both still take a long time. Two to four is a difference, I will note that. But four to eight, there's no difference at all. That's interesting. I had a different result because testing all the embassies we've had to down, I've done like 20 IBDs in the last month, and I have a Raspberry Pi for four gig and a Raspberry Pi for eight gig with the exact same config set up on the embassy. And the four gig took usually between seven to 14 days to finish. To your point, excruciatingly slow for the last 5%, but the eight gig actually did it in 72 hours, sometimes a little bit less in some cases. I'm not sure that's because we cranked up the cores in the bitcoin.com, but it definitely moves faster than the four gig for us. I would like to look into this because my theory was based on one thing as well. So I looked at the memory usage and both for me, this is just bitcoin core. I'm not running a suite on top, right? So I'm just running bitcoin core. Both Raspberry PiS basically tapped out at about 2.7 to 2.8gb of memory usage. So that was kind of like I double checked and that's why I ran the perf tools, is to verify that what's actually going on under the hood here. And I verified same SD card in both of them. So they both have the same transfer speed. The memory isn't being used. So my thought is like, tell me if I'm wrong here, but if it's only using 2.7 gigs and both are taken like you said, it was roughly about two weeks to complete on both the four and the eight gigabyte, and it's not using the extra Ram. That's why the results are roughly the same, I believe, but those are my thoughts there. Even if you get eight, it's not going to touch that amount of memory. Have you measured the memory usage when you're doing these IBDs? Not going to remember. I remember they were both being maxed out on the processing power, but the memory usage, I don't remember if it was using more than 2.7. I didn't check it. But the one thing that I was going to ask you is, did you tinker with the bitcoin.com any at all? Did you try to change any of the settings? There no okay. On my actual production node I do, but on this, for this experiment, no, I did not. And I actually have a nice little write up on my Twitter where I also compared this to the IBD on some X 86 architectures as well as the IBD on different types of devices, HDD, SSDs and 2.5 inch 5400 rpm laptop drives. This was just like a barrage of different tests I was running on these to see, like, okay, where is the Achilles heel in the initial block download? And one thing you noted thread that I think points to my theory being maybe more correct. And again, anybody come up and tell me if there's a reason why this is wrong? You mentioned that the Raspberry Pi processor was at 100%. That's the bottleneck at that point, right? That means the car is floored, it can't go any faster. And those Raspberry PiS between the four and the eight gigabyte are basically the same frequency. So I don't know unless there's some other little bottleneck or something that I could be missing that the limitation at that point is literally how many cycles does it take to complete this total download? And that is if you're running at 100% CPU, which is the case. That's why I experimented with this, is that, yeah, the CPU, it's bound to that. That's as fast as it can go because it's using all of the resources of the brain to do it. Yeah. I would need someone smarter than me to tell you what resources are being used to make it go faster in each case. But what I can tell you is that in the conf, I would tinker if I were you. I tinker with the RPC threads, the threads that are used to handle and also tinker with the work queue to service the RPC calls. I think those two settings and the configuration might boost even though the processing power is maxed out. I'm not sure how it goes faster, but it seems to handle the heavier blocks better. It's almost the same speed for the first four years of IBD. But after that, it seems like if you increase the work beyond the queue, the work queue and the threads, it seems to speed up on the bigger blocks. ", + timestamp: '01:47:37-01:55:51', + topics: ['Raspberry Pi'], + type: 'twitter_space', + weight: 10.239102840423584, + }, + { + boost: 0, + date: 1671735703, + description: 'What is Difficulty Adjustments?', + episode_title: 'TOXIC HAPPY HOUR! #Bitcoin, Pysh, Booth, BTC Ben & the Plebs! 🍻😂', + guests: [ + { + name: 'Jeff Booth', + profile_picture: 'https://pbs.twimg.com/profile_images/1362957991410954241/spiaMAg2_400x400.jpg', + ref_id: 'f1143bcc-9ab9-4716-8259-0e5b026f8039', + twitter_handle: 'JeffBooth', + }, + { + name: 'George Gammon', + profile_picture: 'https://pbs.twimg.com/profile_images/1246550014450700291/2n_iHigp_400x400.jpg', + ref_id: '7ca1bc4f-3a57-4a6a-bedf-ef47a8b37297', + twitter_handle: 'GeorgeGammon', + }, + { + name: 'Neil Jacobs', + profile_picture: 'https://pbs.twimg.com/profile_images/1593645788978102277/UAQCQKeE_400x400.jpg', + ref_id: '0bc759e0-b055-4800-a79d-2b950fe5cc53', + twitter_handle: 'NeilJacobs', + }, + { + name: 'Preston Pysh', + profile_picture: 'https://pbs.twimg.com/profile_images/1408783276081299462/f4Ye5n7-_400x400.jpg', + ref_id: '01ad2c81-2d0c-44a9-93a1-42c07287aa80', + twitter_handle: 'PrestonPysh', + }, + { + name: 'Brian', + profile_picture: 'https://pbs.twimg.com/profile_images/1589300685182570500/cTffQlpJ_400x400.jpg', + ref_id: 'b167b1cd-bbce-4839-a03c-194f006f954d', + twitter_handle: 'BrianTheDrumer', + }, + { + name: 'BTC Ben', + profile_picture: 'https://pbs.twimg.com/profile_images/1348015880664473610/S-uDNLlZ_400x400.jpg', + ref_id: '2c95b3dd-e3a2-4cf0-a49e-a8915d2bfcd5', + twitter_handle: 'bensemchee', + }, + { + name: 'Craig Shipp', + profile_picture: 'https://pbs.twimg.com/profile_images/1605961563420114945/MWGqR1Gm_400x400.jpg', + ref_id: '8d6ca47a-89a2-4331-bae4-2fae18055a95', + twitter_handle: 'CraigShipp', + }, + ], + hosts: [ + { + name: 'PUBLORD', + profile_picture: 'https://pbs.twimg.com/profile_images/1480160632360124416/AM_vVRko_400x400.jpg', + ref_id: '8126d933-0986-4fd2-a6be-c02581294463', + twitter_handle: 'publordhodl', + }, + { + name: 'Anders', + profile_picture: 'https://pbs.twimg.com/profile_images/1391477993726529545/xqIjHq5w_400x400.jpg', + ref_id: '78672de6-3c5f-4d95-8fd9-f2b512fa7a04', + twitter_handle: 'Anders_', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/0c42d408-e518-4ecf-b282-d864a8c14002.jpg', + keyword: !0, + link: 'https://stakwork-uploads.s3.amazonaws.com/uploads/customers/2707/media_to_local/dbc5dd26-2307-4f64-a377-105e2a277d9c/be3d47a7-2fcd-4de8-8f22-71851953d022.mp3', + node_type: 'clip', + pub_key: '02574d6e8e787372184b6f17c40d6c6fe1777db9015801f95dfd24692784d767cd', + ref_id: '17d338d5-a11d-405f-bbc1-257b4e145723', + show_title: 'PUBLORD', + text: "I tried something new out. I just put out the first little sort of educational thread from the time chain calendar account. It's the last one on the next at the top. It's only four posts really short. It's just a little explanation of the difficulty adjustment. I'm just floating it out there. I want to see if anybody appreciates that, if it's useful to anyone. I want to start basically sort of attempting to describe the most important aspects of bitcoin in these very small bitesized chunks that people can hopefully wrap their head around and then put those things together and have a better understanding of things like city showers. He might appreciate it. He might need to update his mental model of what the difficulty adjustment is. Difficulty adjustments means, for example, instead of just talking bitcoin, like, do something with a bitcoin. I'm just setting up my new hosting service in Europe, which is going to provide self custodonial virtual private servers with the preinstalled BTC pay server, whoever is interested to I'm still not going to announce the official link to the website because I'm working on It hosted service for self custody. So it means like no. Is that not an oxymoron? No, it's no KYC. Because me, as a hosting provider, I'm just dealing with infrastructure. I'm not holding the code. Yeah, but if you're providing the infrastructure, how is it well, that's really stupid of you to say that. If you were like an It guy, you would understand. That's funny. I'm speaking English. It is my native tongue. Try again. City show. Here's the thing, my man. Go ahead, hit the little mute button. I muted you for a second there. You can unmute yourself. Well, that's the thing about custody behavior. Like in these democratic spaces where everyone can vote their opinion, there is always our it's not democratic. We're having a party. We love to talk bitcoin, we love to meet new friends. Same thing. But the warm welcoming from the Pub Lord was like really unnecessary. Whoa. It wasn't Puppy. It was TC. Man, puppy has been quiet. This is TC. I like to mute people when it gets out of hand. Sometimes it's as simple as just something absurd has been said. I haven't said a word yet today, but what's up, Pubby? How are you doing? I'm doing good, man. We're off to another rousing start like we were yesterday. Yeah, goers. I really do want to know truthfully. Please. How is you hosting a service, self custody, for anyone? Because you own the root privileges to that server. So it means you are the only person who is in charge of that instance. So whatever happens with that instance is up to you. I'm not managing how do I know you don't have the root credentials? Well, it means like, if you're running a route and you can check out the ch root group, you can only see that you are the only user in that. Right, but if you set it up, how do I know you don't have the same credentials? I don't have the credentials because when you spin up the template of the OS, for example, Linux instance, or whatsoever, you are the only person who can access the server and manage it on the root level. Wait, so you're creating software that other people host themselves? No, the software has been already created by the community. Of course it's open source. You can check it out. Go on to Btcpaserver.org. I know. BTC pay server. I'm familiar with BTC pay server. Yeah, to promote a bitcoin and to teach people how they can manage their own funds. What part are you hosting? That's the only part I'm trying to understand. I'm just hosting the machine like CPU Ram and the storage space. That's it? Yeah. So how is it self custody? Well, self custody is because you're going to have a ledger wallet being connected with the BTC based server. So you're going to think, no, run away. Anybody that's in public, in the audience, listening, don't do that. That's a bad idea. Why not? Because you're trusting a third party, and that goes against the whole self custody thing that PC is trying to point out. Well, if you're going to host your own BTC based server on your computer, on your home network, if you think that's really smart from the security perspective, I'll go ahead, my friend. Once when you wake up with some Chinese IP address on your Zix or router because your telcos are not updating their boxes and you lose your so I have to trust you. No, you're trusting the tier three data center level of security and their architecture behind. Okay, so I have to trust someone, though. Well, are you not trusting, satoshi Nakamoto, that there is no American government, there are no private keys, like of the majority of the bitcoin network? Maybe the feds? Do you think they have the master key to shah 256? Do you really think that the banks have allowed bitcoin to exist and to convert? Bitcoin needs permission from the bank, okay? I mean, you can swap pictures of a hotel. The banks have to give permission, or the government has to give permission to bitcoin. Is bitcoin asking permission? Well, you can exchange and swap the pictures of hot ladies with your friends. No one forbids them. All right? This guy is not serious. Puppy. I don't know what to say. There it is again. Why is it two days in a row, man? They just come in from everywhere now. Wait, what about here's the advantage of toju you know what the funny thing is? You're treating bitcoin as I treat the IPV four layer, or IPV six, with SSL encryption only. It's a better way to encrypt it, and it's another layer on the network. You're just talking about the network infrastructure, and you make belief like value. Oh, we believe in God. We believe in bitcoin. Well, it's okay now. It's 16 grand bitcoin to the moon. 100,000, 1 million. It's a perceived value. I'm not against it. I'm just saying I'm dealing with bitcoin as a technology. You brought the server, man. Listen, what you're offering up is centralized, dude. I would rather centralize. You said yourself I have to trust the data center provider and their equipment and their good faith, and that is completely against the tenets of bitcoin. Don't you get it? Do we need to draw it up on a little board so you can get it? No. You can take your computer and you can put it in the living room. Or you can take your computer and put it in, like, your basement. Or you can take your computer and put it in your neighbor's house. Or you can take your computer and put it in a cloud or so you could just do either of those and just keep your fucking seat phrase in a place that no one's going to find. The stamped like titanium. And then that's your fucking bitcoin. You don't need to fucking put it anywhere else other than a place where you have it. I'm saying you can run a lightning note and you don't have to use the same bitcoin address to receive the funds, but still, you're going to have to allow the technology and instruments of trade to exist somewhere. I say only that's better if you have a root privileges on your own box. Are you new to bitcoin? Are you an It guy that just found out about Bitcoin, like, a year ago? Don't be ridiculous. Come on. Oh, so you're Satoshi's son. Okay, I get it. No, I'm a Commodore 64 guy and like, Cube Basic, literally before the 90s, so you can speak whatever you want to enter. A piece of shit. You sound like someone that gets very technically well versed, but it has no idea of bitcoin and how it works and the philosophy behind it. I know that only if you want to receive the bitcoin for your services. Downloadable digital products. I'm not saying about the physical goods because it's stupid. ", + timestamp: '00:07:11-00:16:55', + topics: ['Difficulty Adjustments', 'bitcoin payment'], + type: 'twitter_space', + weight: 25.58466473425889, + }, + { + boost: 0, + date: null, + description: 'Governments attack on Bitcoin and anonymity', + episode_title: 'Café ₿: #Bitcoin News & Trusted P2P Reviews w/ @Apollosats', + guests: [ + { + name: '@2140data', + profile_picture: 'https://pbs.twimg.com/profile_images/1598330787778232320/ZVFcRtet_400x400.jpg', + ref_id: '190b5001-a42a-46cc-b0d3-b6f74c625648', + twitter_handle: '2140data', + }, + { + name: '@FossGregfoss', + profile_picture: 'https://abs.twimg.com/sticky/default_profile_images/default_profile_400x400.png', + ref_id: '09913e9b-38dc-4465-9d4d-ae0c9ba9eeca', + twitter_handle: 'Fuckkkk', + }, + { + name: '@w_s_bitcoin', + profile_picture: 'https://pbs.twimg.com/profile_images/1594796869233811474/g0_ZRshz_400x400.png', + ref_id: 'b178b239-3b18-4a16-9d43-c5d15ba6f7f4', + twitter_handle: 'w_s_bitcoin', + }, + { + name: '@NeilJacobs', + profile_picture: 'https://pbs.twimg.com/profile_images/1599432572727169025/NSoPdchB_400x400.jpg', + ref_id: '4b6997e1-ce0b-4a1d-90e7-dbaccef4b783', + twitter_handle: 'NeilJacobs', + }, + { + name: '@brandon_gentile', + profile_picture: 'https://pbs.twimg.com/profile_images/1561369452284895236/-8WgdwEm_400x400.jpg', + ref_id: 'f940c5e8-4808-4197-a38f-3f19d311a7ad', + twitter_handle: 'brandon_gentile', + }, + { + name: '@apollosats', + profile_picture: 'https://pbs.twimg.com/profile_images/1576946734927794176/2ail9FoU_400x400.jpg', + ref_id: '74f4280f-5fdb-4bbc-aee2-a2ed32d64372', + twitter_handle: 'apollosats', + }, + { + name: '@StackchainSig', + profile_picture: 'https://pbs.twimg.com/profile_images/1589791699571802117/n_Y1Qm7J_400x400.jpg', + ref_id: '6e652629-38ec-49d8-9f5c-3ba28f80c799', + twitter_handle: 'StackchainSig', + }, + { + name: '@TomerStrolight', + profile_picture: 'https://pbs.twimg.com/profile_images/1591960241008148481/HtyINxtU_400x400.jpg', + ref_id: '7af639f8-8c5c-4ce1-a43b-e8560ed40e2b', + twitter_handle: 'TomerStrolight', + }, + ], + hosts: [ + { + name: '@alexstanczyk', + profile_picture: 'https://pbs.twimg.com/profile_images/1539055022364708864/rwErK6x1_400x400.jpg', + ref_id: '6455df34-1abc-4ce8-9bb8-b02d411accec', + twitter_handle: 'alexstanczyk', + }, + { + name: '@pacificbitcoin', + profile_picture: 'https://pbs.twimg.com/profile_images/1570140686753619970/UFEnzSv5_400x400.jpg', + ref_id: 'f8268a26-9761-40c1-bdd6-dad9db44d032', + twitter_handle: 'pacificbitcoin', + }, + { + name: '@SwanBitcoin', + profile_picture: 'https://pbs.twimg.com/profile_images/1491428856858914820/aFlitvha_400x400.jpg', + ref_id: 'da3f56bf-9763-4389-a9ec-d807049bd0b8', + twitter_handle: 'SwanBitcoin', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/239722cb-4216-414a-a17b-5adf9d52e15a.jpg', + keyword: !0, + link: 'https://stakwork-uploads.s3.amazonaws.com/uploads/customers/2707/media_to_local/7cf57bdb-c905-46e3-a7e5-4c0bfd4f8d04/71c08fae-cce8-4600-ab9e-758420e78dcf.mp3', + node_type: 'clip', + pub_key: '029099ec31eb33594611dc47d5c93de2c1aa86918e3a36b408c14a500601c8bc9b', + ref_id: '75ac478b-3dfa-45a8-9fa0-cebaacccfc05', + show_title: 'Swan.com', + text: "if you're from anywhere in the world, the same logic applies. It's starting in the EU. But don't be surprised when the same type of Draconian laws and the rules that they're trying to implement around Bitcoin spread around the rest of the world. Because the legacy system is losing, right? They've already lost. They just haven't realized it yet. And so once they start to realize it, we all want them to surrender and to adopt this new standard which will bring about peace and prosperity to the entire world. But it's very likely they won't, and they'll go down kicking and screaming, and when they do, they're going to try to claw back as much power as possible that they've lost. And in an attempt to do so, they're going to make it very difficult for you to acquire bitcoin, most likely. So it's kind of now or never. Like, you don't have much longer to build your stack and take it into self custody, at least not to do it easily. It's a exit. Lagarde talked about this, Madame Lazard, where she was like, there can be no exit, basically, because if there's an exit, they can escape or control the lizard people system. It just feels a lot like the Drowning Man, you know, grasping anything they can and that will end up being just keeps feeling like that. What cracks me about this is that a lot of this kind of stuff was basically in the yea zone two years ago. Like, all this was, like total conspiracy tinfoil hat shit. But as it turns out, it's all real. Those conspiracy theorist guys were right. You know, what happens over time is that overturn window shifts little by little. And the stuff that people used to say, wow, that's crazy. You know who says it's crazy? The lizard people. Because they want you to think that the people who are calling them out for their crazy are crazy. That's called gas lighting. Doesn't help when you keep calling them lizard people. But no, I totally agree. I do that on purpose because I know it triggers the fuck out of people, and I don't care. How does Europe get there in the first place? Just what platitudes over principles? First principles? I guess just in the last decade or two of energy policies. I mean, my gosh. Neil Jacobs, you've been very quiet this morning. You have anything? Thoughts? No. Stage camper. Hey, guys. He is there? No, I had to shut my door. I had to shut my door in my office. What's up? What's going on in your world, Neil? Nothing, just listening in, keeping up with all the bitcoin news. I find it really interesting that there was that Reuters story about prosecutors at the Justice Department saying that they have enough evidence to criminally charge Czech. Yeah. So you haven't seen this? I heard a rumor. I didn't see it. Tell us what you tell us. Well, basically, they've been investigating finance since 2018. So this isn't a new thing, just that they violated certain anti money laundering laws. And there's a lot of conspiracies, obviously, on Twitter of why it was leaked. Now, apparently the prosecutors at the Justice Department are kind of split on whether they should file criminal charges or not, and there's prosecutors who think there's plenty of evidence to do so. So maybe there's some disgruntled prosecutors who wanted to get the message out. And there's a Reuters story on it. I could find it and pin it. This is binance us only. Correct? I don't know if it goes back, it doesn't have to be by 2018? I don't think so, because I don't think Finance US existed in 2018. Yeah, that's just it. That's what a lot of people a lot of people may assume that for the US to have jurisdictional authority over an entity, it has to be a United States company. That's not true. As far as the US is concerned, us regulators have been doing this for a while. They basically said, if what you're doing interfaces with US citizens, we have jurisdiction. Right. Even if you're in another country. Now, again, the question becomes, well, how do you enforce extra jurisdictional authority? Well, the US figured out how to do it because they weaponized the US dollar to do it, and that's the reason they were able to get away with nonsense. So when other countries try to do it, can they do it? I don't know. That ultimately comes down to cooperation. Right? So if one country goes to another and says, hey, you have a guy we think is a criminal, hand him over, that's called an extradition agreement. They have to agree to do that where the US has just gotten so used to beating up the whole world with the US dollar stick, you don't comply, we're just going to turn off your US dollar payment rails and then you're screwed. So I pinned the Reuters article at the top if anyone wants to read it, find out a little more details. Yeah, it's fascinating. The question to me becomes, are they going to be able to find him? That's a good point. I just heard a lot of people saying, oh, they're thinking about charging him, why not SBF? It's like this investigation has been going on for four years, so you could say the timing is curious, for sure. I don't know if there's some conspiracy here. I don't know, man. I learned a long time ago, I used to second guess my suspicions. And then I learned from Jim Rickards, there's no such thing as a coincidence. At least that's what they're taught. Like intel officers respect the coincidence. Because if there's a coincidence, there's a chance there's something there. And then the other side of that is growing up in the hood, I suspect everything. Brandon knows what I'm talking about. It's not necessarily a bad thing. It's a crucible, baby. It's crucible 100%. If you put it in the crucible and you love on fire and you burn it and you purify it and it turns out it was bullshit, great. But if it turns out it was something, well, then, hey, sometimes people don't like it. When I talk about stuff that's getting into that yeastone window. I get taddled on. I feel a separate spaces eventually, alex is that what you're saying? No, it's not what I'm saying. Cory gives me pretty wide latitude. I mean, he mentions to me when I get tattled on, but he doesn't tell me to stop talking about what I'm talking about. You do a job threading the needle. Well, okay, so here's where I draw the line. I don't want to hurt Bitcoin and I don't want to hurt Swan. So if there's something that's potentially going to be damaging to bitcoin or Swan, I probably won't go there. But as you well know, there's lots of stuff that in that gray zone. Over the target, sir. See, that's what I'm saying. If it's over the target, then why not? To me, that's fair game. Because this is what I think. This is just my opinion. Some of you may think I'm crazy and not like this, and that's okay. I think the lizard people already look at it like they're at war. It's just we haven't figured that out yet, and they're not playing by the same rules. Until we accept that as reality, we're going to be on the back foot the entire time. Well, you're spot on in my opinion, because Greg touched on this earlier, right? It's we are what the 300 billion market cap. It's a rounding error, and we're that small subset of society. I rate transient minority that's feeling that way and understand that so few people get that. I think we get that. And then, like you said, the lizard people get that. But eventually, as we know, bitcoin changes you. And more and more people, as they come into the space, as we've all seen as bitcoins all changed us, they start thinking more like us. And it's the number responsibility go up technologies, as Vesky says. So people start coming into our thinking and into exactly what you're saying. Alex well, it's not really even our thinking, I don't think being responsible is like a tribal thing. It's just good for humanity, full stop. There's nothing wrong with that. Correct? Rob Salt. And good morning. I suppose you have something to add to this. Yeah, what I was wondering is the conversation seems to constantly get brought up of how anonymous are we on bitcoin and they're going to be coming after it and this and that, and I just think to myself, how many options are there to be anonymous on bitcoin? Is that really even a thing? Because last time I checked this ledger system, it's both a big net positive and a huge net negative as well. So the ledger system, it's almost like the perfect way to be having money of the future that is governed money. It's like being sovereign. It's not going to be the first ten years of adoption in bitcoin. Seems being sovereign is going to be about 50 years down the line when we're in a hyper bikinize world. If that does happen, a game theory out in my mind, it's almost going to be used against bitcoiners, it seems like, in the very beginning. And I think they're starting to realize that that this ledger. So it's like the best thing, if you want to really onboard bitcoin and you want bitcoin to get adopted, the best thing you can do is get rich in a legal way. I'm just being dead point blank serious about it. There's so much I hate, man. I got my .2 bitcoin in cold storage and I got it non KYC. It's like, no, the best way to get this to adopt is to become a multimillionaire, get rich and do it in a legal way and pay your taxes on it, be smart about it. There's ways to build corporations, there's ways to do things in a smart and efficient way, but more bitcoinners need to get filthy fucking rich. And I hate to be like the guy, the bearer of bad news, but that just is what needs to happen for it to get adopted, it seems like. Because this whole non KYC stuff, I don't think it's going to cut it. I think it's going to get used against them. So I don't know, it's kind of what my it might. Sure it might. But the question becomes, how enforceable is it? That's really the argument. I don't think there's a question that there are tools you can use for privacy in bitcoin. It's so what rob said, like, will the privacy be used against people? I don't know. The exchanges that we bought our bitcoin from, I know there's going to be some select few that were in very early from mining and things like that. But for the majority of the exchanges you bought the bitcoin from whether it's cash app, whether it's swan, whether it's coinbase, wherever it's from, if they come to your exchange and they say, hey, we are now legally requiring and they probably already have done this. Someone can correct me if I'm wrong and say we need their Social Security number of every single person that has bought Bitcoin from your exchange. Yeah, sure, Rob, but I mean, that's the beginning of a pathway that potentially leads into the mist and disappears. Like, you're right, KYC exchanges. And you know what? The exchanges have been warned for a long time that eventually they're going to have to give up their customer lists. Right? But when I'm talking about privacy tools in Bitcoin, what I'm saying is there are ways to break all of those links and the question then becomes, if you choose to break those links, what then happens on the other side of that? We could go ahead and then we'll go TC yeah, so a couple of points here I agree with Rob. Like, I think, first of all, if you're trying to come in into Bitcoin in size, non KYC is not an option. I mean, go try and buy a million dollars with a Bitcoin. Non KYC ain't going to happen. And even if you're able to find a buyer, a peer to peer or seller, rather peer to peer seller, you're still trying to leave the legacy system with a million dollars. You don't think they're going to fucking know when you take that million dollars out of the system and then transfer it. That's just crazy talk. And then number two, in terms of privacy, this is something I used to be pretty worried about, but I'm honestly not worried about it at all anymore. I'm very bullish on Fedramps. We have yet to see if they actually play out and work the way that we're being told they're going to work. But if they do, we're talking about fucking perfect privacy. We're talking about us setting up the Cafe Fediment, which we obviously will do, right? I mean, Alex will be a guardian, aunt's going to be a guardian, so we're going to have trusted second parties. These are people that we know we've met in person because we went to Pacific Bitcoin. They're trusted second parties. Guardian setting up a guardian system, multistic system, protecting all of our Bitcoin. And then guess what we can do inside of that mint. We can fucking transact with each other with perfect privacy and nobody can see when we pass SATS back and forth, which, by the way, will be instant and free because you know how we do on Cafe Bitcoin. I'm not worried about the privacy aspect of it at all. I think the tools are going to be coming soon and I'm hopeful that they're going to work as advertised. And anyone who's going to try to track what we're doing are going to find themselves kind of at a loss once these tools come online and we have these second layers that allow us to basically fucking put the big old middle finger up to one. We got about four minutes to finish up on this topic and they're going to be introducing a featured guest here. So let's TC, what are you thinking? Okay, I'll just keep it to the one point. I was going to make two points, but my point is really, I disagree wholeheartedly with what Rob is saying. The public nature of the bitcoin blockchain is an absolute feature and it's not a bug and it's not a problem. Part of the reason that this system actually works for a new global monetary system is the fact that anybody can audit it. The fact that if I do a transaction with you and we don't know each other and you're on the other side of the planet, you have just as much visibility over that as I do. These are absolutely essential, non negotiable features of bitcoin. And that being said, you have to keep in mind, too, that there's a real distinction between the information that's outside of bitcoin and the information that's actually inside bitcoin. There's no names or addresses or phone numbers or email addresses or photos of your face on the bitcoin network. You have to keep in mind that there's a really clear distinction between what's on chain and what's outside of that. And then the last thing I'll say is that just even if somebody knows what you have or what transactions you make, there's a big leap between that and what any potential consequences might be, both from the point of view of laws and regulations and anything you may or may not have done wrong. And then exactly what Alex said, which is the enforceability of all of this. So I think, Rob, you did a great job scaring a bunch of people. I wanted to kind of counter that and remind people that this is not a problem or a bug or something broken. Just to be clear, I said people need to get wealthy in a legal way so they can legally own large amounts of people need to take their money that they earn and they need to save it in the right format so that it actually is theirs and it actually has some purchasing power in the future. This is not about everybody needs to be a millionaire right now. That's not the right message. Yeah, I would like more bitcoinner to be millions. I definitely stand by exactly with what I said. More bitcoinners do need to be millionaires. That'd be a great thing. More bitcoinners do need to own businesses in a legal way. That'd be a great thing. Less bitcoiners need to be sitting there with non KYC bitcoin and being excited about it. Even if bitcoin goes to 10 million, a lot of bitcoinners still won't be rich. And they'll think they're rich in their mind because they have 0.1 bitcoin non KYC fiat. This is such a Fiat mindframe. This is garbage, dude. Where are you talking about? Decent? Okay, let me say it in a nicer way. What are you saying to a person that works hard? Maybe they have two jobs and they're just paying their bills and they're just getting by and they are diligently stacking SATS and saving, and you come to them and say they need to be a millionaire. What does that do for them? What's the actual point there? Okay, you guys are talking past each other. You're both right. Relax. I understand both of your points of view. I get it. There's a place for both of you in the world. You're both correct. Let's leave it at that. There's no point in we don't have time to cage match. Like, if we had another 20 minutes in the show, I'd be like, Go for it. But we need to move on here. We could go yeah, I'm just going to wrap a bow on this. We're all going to be Fiat Millionaires at some point in the future. It's not a matter of if, but when. Right? But the thing is, that million dollars is going to buy you a fucking gallon of milk because it won't matter anymore. You've all seen that cartoon where it's, like, showing the different stages, like, decade over decade of bitcoin, and it's like Fiat Millionaire on the left and then bitcoin on the right. And as each decade progresses, the millionaire gets poorer and poorer until the end, when they're living in a beat down house with broken windows and shit. And then that bitcoin on the right is living in the castle at the end. I mean, that's basically where we're headed. Fiat on the left and bitcoin on the right. With Fiat, a million dollars is constantly getting devalued, debased, and eventually will be worth fucking nothing. So I'm going to be millionaires eventually, I won't get a million bucks and instantly turn it into bitcoin today. Yeah, exactly. I love that. Meme, like, at the end of it, it's like I heard he's a bitcoiner there's another one with a bubble. It's a bubble. It's a bubble. It's a bubble. And in the end, he's like living in a dome with a whole beautiful existence inside. It's a bubble. Yes, it is a bubble. ", + timestamp: '01:26:29-01:46:21', + topics: ['Anonymity'], + type: 'twitter_space', + weight: 10.214787483215332, + }, + { + boost: 0, + date: 1671644776, + description: 'Thoughts on how Bitcoin may evolve over the coming years and would have a high price', + episode_title: '#Bitcoin Creators Space', + guests: [ + { + name: '@DecouvreBitcoin', + profile_picture: 'https://pbs.twimg.com/profile_images/1362747604044566530/Invedmre_400x400.jpg', + ref_id: '0eda190b-4373-41fc-bc28-c3b95af30949', + twitter_handle: 'DecouvreBitcoin', + }, + { + name: '@Bridge2Bitcoin', + profile_picture: 'https://pbs.twimg.com/profile_images/1533812215198924800/vAAlVRxO_400x400.jpg', + ref_id: '1aaf2c24-8d26-4038-b55a-8b94427b20c7', + twitter_handle: 'Bridge2Bitcoin', + }, + { + name: '@orangepillapp', + profile_picture: 'https://pbs.twimg.com/profile_images/1570918965601505282/SOApRCif_400x400.jpg', + ref_id: 'ba5b79b4-e2e7-4778-8879-df793b8420a4', + twitter_handle: 'orangepillapp', + }, + { + name: '@knutsvanholm', + profile_picture: 'https://pbs.twimg.com/profile_images/1586261395833774081/RQ8SYxiM_400x400.jpg', + ref_id: 'e12ebe66-706b-40d2-804a-861a4c79bbfa', + twitter_handle: 'knutsvanholm', + }, + { + name: '@bcvFoundation', + profile_picture: 'https://pbs.twimg.com/profile_images/1460813196902633476/edbNgO7y_400x400.jpg', + ref_id: 'd65bc3c3-cdd7-4539-8cb9-6a8d86f580c8', + twitter_handle: 'bcvFoundation', + }, + { + name: 'Christopher', + profile_picture: 'https://pbs.twimg.com/profile_images/1345072452775370754/cBVFzpkV_400x400.jpg', + ref_id: '7dacb545-925d-4201-9b9c-869d992dcdb3', + twitter_handle: 'Chrissuccess', + }, + ], + hosts: [ + { + name: '@steliosats', + profile_picture: 'https://pbs.twimg.com/profile_images/1495784740921786371/a73Qu4HR_400x400.jpg', + ref_id: '7eed8e35-f762-4882-adf9-b45ad16c3c54', + twitter_handle: 'steliosats', + }, + { + name: '@geyserfund', + profile_picture: 'https://pbs.twimg.com/profile_images/1554429112978120706/yr1hXl6R_400x400.jpg', + ref_id: '02a48cf4-58d0-4014-803c-9120dedeec52', + twitter_handle: 'geyserfund', + }, + { + name: 'UKNOWN', + profile_picture: 'https://pbs.twimg.com/profile_images/930811252665933826/2cVZF58S_400x400.jpg', + ref_id: 'bcd18bb0-8224-4f6b-af71-e16120ae4323', + twitter_handle: 'NodedPodcast', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/c9bb5d58-c781-464d-878a-8b6c469ba198.jpg', + keyword: !0, + link: 'https://stakwork-uploads.s3.amazonaws.com/uploads/customers/2707/media_to_local/885fe09b-bb21-49a5-8667-3c73ed36918f/196dc1e8-c7a4-4dc7-902f-d00107aefb42.mp3', + node_type: 'clip', + pub_key: '0372cd0c8469f2034336a243e018d4d60e07efef8e7d10417807da1173bd5b002f', + ref_id: 'ee9d0400-3d38-46f6-9741-f99864e86ed4', + show_title: 'Geyser 🌊', + text: "is Christopher from bridge to bitcoin. Hi guys. How is everyone this evening? Good to be here. Great to join you guys in your space. So thanks for setting this up. Mick, apologies for joining late. So apologies if I go over ground that you've already talked about out. Oh, no, don't worry. Sorry for tagging you last minute. No worries. Thanks for tagging. It's been great to speak with Connet. And also I just want to bring it back. Well, actually, I'll start off by saying congratulations on getting 30 projects listed this week on Geyser. That's fantastic. That's really great. And just to resonate with what Connett was saying in terms of things get built in a bear market, I think it's fantastic. And you guys are really promoting it. So thank you for everything that you and the Geyser team are doing, helping people, or Bitcoin is build in this bear market. Because for me, for the rest of the team, it's really important that we build foundations now so we're ready as the ball comes out. It's fantastic to see. So for those who don't know about bridge, for those who don't know about bridge to bitcoin, we onboard merchants to accept bitcoin payments. And we received a grant from Geyser early this year. I'm ashamed to say we haven't yet, and it's been on our to do list for weeks, months, to put up a project, a crowdfunding project on Geyser. And we should really do that soon. But, yeah, we'll get that. It's definitely on our to do list. So we hope to do that soon, especially now, as you say, Nick, the ease of putting up a lightning address. And that makes it so easy, as Joe Nakamoto tweeted about earlier this week. So we shall definitely get on to that. But I just want to go back on what I heard Mateo from Orange Pellet talking about, because he dropped off the call now. I think he has. That's a shame. But I really resonate with what he was saying in terms of how. For. Us, onboarding merchants is one of the cornerstones of Bitcoin success, certainly from my perspective, and making the user interface really easy is really important. I sort of resonate with what Mate was saying in that I think most people are currently not fussed about decentralization, they're not fussed about privacy. We as Bitcoin as are, we get it, we've been down the rabbit hole. But most of the society, they want convenience, they want ease. And that's unfortunately why I think CBDCs are going to hit hard, because people won't do their homework, they won't do their research, people are going to welcome it with open arms, unfortunately. So for me, merchant adoption is really important and introducing that in a way that's really easy. So the way we do that for Bridget to Bitcoin, ironically, it's not Bitcoin that we're selling merchants. For us, it's about creating additional revenue for them by saying, oh, hi, guys. Hi, merchants. What we're going to do is we're going to create a new customer base for you called Bitcoinners, and they're going to come and spend their currency for at your shop service and it's going to create additional revenue. And so for me, it's a slow orange bill, because what happens is a lot of these merchants get bitcoin is coming and using their services or buying their products, and we as Bitcoin as we're fantastic customers. We're so enthusiastic. We travel miles, we buy stuff from all over the globe, we get it shipped over, because you as a Bitcoin business, we want to support you. But if you're new to Bitcoin as a merchant, you kind of get overwhelmed quite quickly with how much attention you get by accepting Bitcoin. And it's great, because what that happens, and what we've evidently seen is that those new merchants suddenly get this influx of bitcoiners and it leads them down the rabbit hole without us having to do anything. Because bitcoin is they make an impression because we're such happy people, especially in these economic times where everyone's feeling the pinch, we will go that extra mile, literally, to spend our bitcoin, to spend our SATS, and replace them. And we're happy about it. We're more than happy, we're enthusiastic. We're the best customers you could ever have. That's amazing. For me, it's kind of a cornerstone of how we can it's sort of a Trojan horse. Trojan horse orange pill. So we're going around to regular businesses so who don't even know about bitcoin, and that's what we're planning on next year. We're going to trade shows. We're just to speak to regular people. We've got no idea about bitcoin, and we're going to talk to them about this fantastic payment processing network called the lightning network. And bitcoin normally is quite late on in the conversation, actually, because as everyone, I think, on the call knows, the processing fees on the lightning network are next to zero. They're really cheap compared to what our fiat counterparts are charging. Plus we've got instant settlement, all those fantastic things. So we talk about it's really interesting. We talk about the payment rails. That lightning network is a payment rail and how better than it and eventually we get to the bitcoin piece. But, yeah, for me, it's about making their businesses more profitable, having additional revenue, and it's fantastic because you literally see them fall down the rabbit hole. So we had that recently with a small chain of pubs, just two pubs that we onboarded last month, I think it was last month or the month before. So this landlord, he owned two pubs and he was not a bitcoiner, and he was not interested in bitcoin. But when James, my partner, said, right, we can bring extra customers to your pub, they're called bitcoin as, and they will spend their currency, but it will create additional revenue, he was like, fine, okay, I'm not interested in bitcoin, but I am interested in additional revenue. So if they're going to come and spend their currency and I can give it to my local currency, great, because it's good for my business, I said, fantastic. Do you set them up with the bdcpa server or what is it that you guys do? We look at the plethora of solutions that are currently in the market, depending on how that particular business is structured. Depends on which solution we sign, post them towards. Generally, the smaller the business, the more options they have. As the business gets bigger and more complicated, it sort of narrows it down quite quickly. So as a one man band, as a mum and pop shop, with just maybe one or two employees, you could literally just have a wallet satoshi, especially if you're just a guy who runs a food truck, all you need is a wallet. Satoshi really, isn't it? Just sat that on your phone because it's you. But as the business gets bigger, it gets more complicated, because you might be looking at multiple employees, multistate. You might have a board of directors who want to have multistake and so on. Yeah, I was also thinking for, like, exchanging back from Landing to Fiat, how would you guys recommend they do that? So in the UK and Europe, you can use a service called Coin Corner, and we'll help you get set up with that. Outside of Europe, we're speaking to IBEX, so we love the IBEX team. IBEX are looking at coming over to Europe, so fingers crossed that hopefully they'll have that flipping service, as I call it, hopefully in 2023 at some point. So I think that we'll see more of this, because for us, what our push is, especially when we're going to the likes of Coin Corner and IBACs, what we're saying is it's really important for merchants at the moment, in these early days, that there is this ability for new businesses to flip into their local currency. But having said that, coming back to my story about the pub for this landlord, not interested in Bitcoin at all, and we said, that's fine from my perspective, I don't mind that because they're adding to the liquidity of the lightning network and the liquidity of Bitcoin because they're a new merchant. That's absolutely fine. That's great. Another business that gets bitcoin. That's fantastic. So we set him up in his first pub, put in place his point of sale devices, made sure his admin console was all set up and everything was fine. And then two weeks later, we went to his second pub. And bear in mind, we hadn't spoken to this landlord during those two weeks. So we set him up in his first pub so that all his transactions, all his sales that he was receiving, flipped instantly into the local currency. So he wasn't holding Bitcoin on his books or balance sheet. Not interested in bitcoin. Two weeks later, we go to his second pub to do the same again, put in place the hardware devices, set up his console, make sure he's happy with anything. He came up to us completely unprompted, and he said to myself and my colleague James, he said, Kristen James, at this pub, I'd like to hold the Bitcoin. I don't want to flip it into the local currency. And we said nothing. Bear in mind, two weeks beforehand, not interested in Bitcoin and just wanted Fiat currency. We said nothing to him in those two weeks. For me, that's a really good example of how Bitcoin is coming into the past have set him off on that rabbit hole journey. And for whatever reason, Bitcoin is coming in, as I say, being enthusiastic. He's obviously either spoken to Bitcoinrs or he's read up and he's realized that there's value. And that's why I say it's a really soft orange pill and it's really valuable because we're not having to orange pill individuals. It's almost an organic process and it's quite controversial, but I think that the way we orange pill individuals is wrong in so much. It's really resource heavy and it's quite cultish, isn't it? We come across as cultish very quickly. We meet new coiners or complete newbies, but this merchant adoption is a really soft orange pill Trojan horse. And that's why I say when we speak to the likes of IBEX, what we say is having that ability to flip, to offer that service, is really important to get our foot into the door for merchants currently. And then what we're finding is merchants are going, actually, I get bitcoin now, now I want some bitcoin. And so it's really interesting, I was just leaping that back to what Mate was saying in terms of how we need to make the interface easy and effectively smooth and almost non threatening, because the services we provide run alongside the current systems that merchants have. So at the moment, we're not replacing anything. So we come in and go, this is a bolt on for your service, for your product, for your shop. We literally bolt it on and it provides you additional revenue. And the same for Ecommerce, it's a plug in that just bolts on, you don't have to change anything, swap anything out, it's just an additional service that you can have to create additional revenue for your business. So, yeah, completely agree with Mateo. If we need to get the UX and the UI really smooth, make it really non threatening, really simple. So, yeah, I'd love for more projects to help with that, that would be fantastic. And then hopefully what we're seeing is they fall deeper and deeper down the rabbit hole really quickly and they turn into bitcoin really quickly. But. Yeah. Thanks, Mick. Thanks for everything that guys are doing. I'm loving oh my God, thank you, Chris. I'm loving the building that's going on. And we've also launched another business, actually, me and the team, and we take on a couple of other people and we're probably going to put this on Geyser as well. But we've launched and you've seen that, we've given you a cardmaker, laser Eyes cards. So if anyone on the basis is listening, check out Laserrise cards, send Twitter handle. They're essentially Bolt cards, but they're completely blank in terms of the electronics in them. And you can do what you like with them, so you can link them to your own node and your own wallet, or you can use a custodial service like Coin Corner, but there are risks, of course, because they're an exchange and so on. Get money off exchanges, yada, yada, yada. I won't go on about that. But you can do what you like with them. But the unique selling point is that you can have whatever images you like on your cards. And we've got a gallery on our website and they're called laser eyes cards because we put places on them. And the idea is when you tap on to make your payment, so they contact us, pick on debit cards, NFC cards. When you tap on the point of sale device, your eyes turn to laser. So we literally give you laser eyes. So we hope to be adding that to your crowdfunding project platform on guys as soon because we have a couple more products in the pipeline and we. Think, yeah, ", + timestamp: '00:51:49-01:04:53', + topics: ['Bitcoin evolution'], + type: 'twitter_space', + weight: 24.426984779829223, + }, + { + boost: 0, + date: 1665946635, + description: "Hodl, Ben and Evan's review of TABConf", + episode_title: 'TABConf Mixtape Vol 2: Sound Bites from TABConf', + guests: [ + { + name: 'Michael', + profile_picture: 'https://pbs.twimg.com/profile_images/1558687629599657990/vf-bU14b_400x400.jpg', + ref_id: 'c7b4faa1-db77-4459-b03f-0e41e15efae7', + twitter_handle: 'MichaelHawaii', + }, + { + name: 'Ben', + profile_picture: 'https://pbs.twimg.com/profile_images/1580596905721171969/0NnLeJWA_400x400.jpg', + ref_id: 'da0132b9-0d19-43e6-bc1a-9c7818c79ba4', + twitter_handle: 'benshapiro', + }, + { + name: 'brandon', + profile_picture: 'https://pbs.twimg.com/profile_images/1575598727812812803/4FkPb0vt_400x400.jpg', + ref_id: '8a27da7a-c05c-44da-8247-3c5f68bc3164', + twitter_handle: 'ThrillerBitcoin', + }, + { + name: 'shane', + profile_picture: 'https://pbs.twimg.com/profile_images/1575598727812812803/4FkPb0vt_400x400.jpg', + ref_id: '2e5ce678-7d04-4a48-8bd1-281329ea9424', + twitter_handle: 'ThrillerBitcoin', + }, + { + name: 'exfrog', + profile_picture: 'https://pbs.twimg.com/profile_images/1575598727812812803/4FkPb0vt_400x400.jpg', + ref_id: 'd0dc102c-404e-4753-9290-9a3fe27fe2ee', + twitter_handle: 'ThrillerBitcoin', + }, + { + name: 'josh', + profile_picture: 'https://pbs.twimg.com/profile_images/1575598727812812803/4FkPb0vt_400x400.jpg', + ref_id: '34eb29e3-da86-485f-b20a-059f7d41f6ad', + twitter_handle: 'ThrillerBitcoin', + }, + { + name: 'autumn', + profile_picture: 'https://pbs.twimg.com/profile_images/1575598727812812803/4FkPb0vt_400x400.jpg', + ref_id: '3224f2ec-3e77-485f-88b8-6930e19f8ac6', + twitter_handle: 'ThrillerBitcoin', + }, + { + name: 'buck', + profile_picture: 'https://pbs.twimg.com/profile_images/1575598727812812803/4FkPb0vt_400x400.jpg', + ref_id: '00a55ec0-9b1a-482a-893a-345d350a33a0', + twitter_handle: 'ThrillerBitcoin', + }, + { + name: 'stephen', + profile_picture: 'https://pbs.twimg.com/profile_images/1575598727812812803/4FkPb0vt_400x400.jpg', + ref_id: '9dc56711-eacc-4691-821e-fe2a26855ea9', + twitter_handle: 'ThrillerBitcoin', + }, + { + name: 'hodl', + profile_picture: 'https://pbs.twimg.com/profile_images/1575598727812812803/4FkPb0vt_400x400.jpg', + ref_id: 'b012eda0-b78c-46e7-ab46-6a7139584fc7', + twitter_handle: 'ThrillerBitcoin', + }, + { + name: 'evan', + profile_picture: 'https://pbs.twimg.com/profile_images/1575598727812812803/4FkPb0vt_400x400.jpg', + ref_id: '9a8418e9-8976-425c-95ce-ed2fe307e380', + twitter_handle: 'ThrillerBitcoin', + }, + { + name: 'muzz', + profile_picture: 'https://pbs.twimg.com/profile_images/1575598727812812803/4FkPb0vt_400x400.jpg', + ref_id: '444b8330-caa1-4bcf-8144-7d9110ae2242', + twitter_handle: 'ThrillerBitcoin', + }, + { + name: 'thomas', + profile_picture: 'https://pbs.twimg.com/profile_images/1575598727812812803/4FkPb0vt_400x400.jpg', + ref_id: 'e2140e58-314d-4425-bc97-20f52f951866', + twitter_handle: 'ThrillerBitcoin', + }, + { + name: 'justin', + profile_picture: 'https://pbs.twimg.com/profile_images/1575598727812812803/4FkPb0vt_400x400.jpg', + ref_id: '2ce04090-b9b1-4e84-a87f-9c9dc9ececec', + twitter_handle: 'ThrillerBitcoin', + }, + { + name: 'stakamoto', + profile_picture: 'https://pbs.twimg.com/profile_images/1575598727812812803/4FkPb0vt_400x400.jpg', + ref_id: '8b249d9b-8521-4e0e-bf24-2d8b8721d26b', + twitter_handle: 'ThrillerBitcoin', + }, + ], + hosts: [ + { + name: 'ThrillerX', + profile_picture: 'https://pbs.twimg.com/profile_images/1575598727812812803/4FkPb0vt_400x400.jpg', + ref_id: '231d171e-06a4-4294-9cf2-6640e27429ea', + twitter_handle: 'ThrillerBitcoin', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/4240c90e-0086-4ece-bfe5-84a282c5059e.jpg', + keyword: !0, + link: 'https://2.gum.fm/op3.dev/e/pdst.fm/e/dts.podtrac.com/redirect.mp3/media.transistor.fm/82539eb6/c2b4aa1b.mp3', + node_type: 'clip', + pub_key: '', + ref_id: '821f7b5c-c6ad-422b-b4e1-ed34f915e4af', + show_title: 'Thriller Bitcoin', + text: "a lot of fun. I very much appreciate you. Anything cool that you've seen here, like as far as the talks, because you're a bitcoin or, you know, all these things, what do you think has been like the most, most memorable thing that you've seen? Well, I mean, that's one of the unfortunate things is because I'm responsible for all five rooms, I only ever get to spend like moments making sure that the room is good before I have to go to the next room. So I got to see a bunch of like a little bit of a bunch of talks that I really wish I could have sat there and engaged in. The coolest thing I've seen so far was probably Andrew Polestra's codex thing, like making a paper computer at the end of yesterday's event in the Socratic village. It's a really neat, complicated thing. There were, like, 20 to 30 people in there with scissors, cutting out these things, putting them together that help you code and decode without a computer. It was really neat and very engaging, and it was like I don't often see events have engaging workshops that actually are well attended, like people who will sit down and focus and learn a thing for 3 hours. That's kind of what sets Tabcomp apart from every other conference I've done is people are actually here to do the thing, not just watch someone talk and then watch someone else talk. Yeah. Do you think there's room for both at the conferences? I think there very much is, and I think that's one of the things that this year at Tabcomp was kind of missing compared to last year is there's no real beginner track if you're not ready to dive into command line stuff. There's not really a whole lot, but the next gen village is doing a good job of getting, like, the younger kids involved and having content for that. I think we have too many conferences that project to the lowest common denominator that have the same speakers come giving kind of the same talks to the same audience a lot. And events like Tabcomp and BTC Plus are kind of not that they're really more about learning and doing and doing it in an environment of your peers and friends. Yeah, that's cool. Thanks for coming on the pod, man. Appreciate it. I appreciate everything you do, by the way. You too. I really love hanging out with you, man. Paul, do you want to be on my podcast? Sure. 40. What do you like about tapcom this year? It's just like last year, but more Tabcomp is, like, getting, like, a semester of Bitcoin education. Four days? Yeah. In four days. Does it feel like every day has gotten better? I feel like every day has gotten relatively better than the day past. It's almost like it's like steps. Yeah, I didn't know about that. I run out of room in my brain, so at some point I'm stopped learning. But, yeah, I've gone to so many good talks and learn so much from so many different angles. There's a really interesting theme this year about how lightning is totally broken. Really? Okay, tell me more. Macarola did a talk on lightning is broken, but we can fix it. And there's a lot of terrible news about problems with lightning. And there are things that these are problems that have been pretty well known that we basically need to work on and improve to make, basically, lightning. Right now, you basically want to trust your channel partner. There are things that your channel partner can do to make your life miserable. There's attacks that we know about that just don't happen a lot. Because it's a small community. But as we become like a big deal, either we're basically only going to have to make channel relationships, business relationships and just formalize that kind of way, or we're going to find more cipher punk ways to do this in kind of a bitcoin ethos because we'd like to be able to open up anonymous channels but it's just a little bit dangerous. So it's kind of this long to do list and it really kind of depends on who you talk to after that talk of how bummed they are versus how kind of exciting. You're kind of bumming me out right now. It's like it's sounding like it's a major thing, but if you think about it from an engineer perspective, right, any engineer, you start out a project, you have 100% problems, nothing works, right? And then you start fixing one problem at a time and you make it a little bit better. And maybe at some point you're 75%, you ship it, and then you keep on fixing problems and maybe new problems you didn't know about come up. You try to fix those. So from an engineering perspective, these are all things that we believe we can find, we hope we can find good solutions for. And everybody I talk to that is working on it is excited to work on these problems and wants to think deeply about them. So it's kind of an exciting talk to like, hey, let's not let's not hide. Let's not pretend like everything's perfect right now. Let's engage with the issues that we have. Like, lightning works really great right now for for what we're doing. It could just it could be a lot better, and we need to be aware of how it could be better and not just pretend that it's perfect right now. Yeah. What's the most memorable thing you've seen? Is it Ben Carmen? I love seeing Ben Carmen. I think Ben Carmen is the most memorable thing I've seen. This is such a beautiful site. I'm actually excited he's going to do, like, live coding. Oh, really? You're going to watch it? Yeah, I've hung out with him a million times, but I've never actually sat there and watched him code before. So he's going to be coding in like an hour. So I'm going to watch that. I actually got to watch Epic Coludus live. Yeah. That was awesome, right? Dude, everybody keeps bringing this up and this recording. Yeah, actually. I didn't know I would like it that much, but something happened to me, like in the middle of yesterday where I was like, maybe my head was starting to fill up with ideas. I was like, I want to sit down and start building something, I think something I'm going to try to talk to the organizers about. There's a lot of after parties. The last talk happens at 05:00 p.m.. People go to dinner. Then there's an after party, then there's another after party, but I'd like to have a quiet room to go after the last talk and just people are there with laptops building stuff because I don't like the idea that I'm still, like, two days away from having my laptop open and really coded. Speaking of Evan, I've been recording everybody for this mix tape that I'm doing, and everybody keeps saying your thing is, like, the most memorable thing here. What do you have to say about that? Well, first, I'm flattered, but I think there's much more epic things I've seen. I got a demo of Stratum V Two that's going to be super impactful, super important for decentralizing mining. So I think that's near the top of the list for me. Also really cool to see tony, Giorgio's, Ellen, spoit. Ellen. Ellen spoit has so much potential. The workshop was awesome. I was able to execute that attack that we saw last week on LNG nodes 15.1 and under. That was pretty awesome to compare. Yeah. Tony walked us through, like, hands on. We could do it on our own laptops. We set up a virtual lightning network, and we would steal funds from one of the nodes on that lightning network. Dude, that was sick. Do you see how many nervous people I saw some BCS in the room. They look nervous. Oh, yeah. I mean, listen, the thing is, we need to be doing these things now. Stuff like the Ellen Depog. We need to get that out of the way now before it becomes, like, a headline on New York Times, Financial Times next time that happens. Right. And, yeah, we need tools like L and Spoid to, like, you know, see how things hold up and find where things break. So I'm looking forward to more exploits being released. I think it's an excellent foundation, and I hope more people try to break Ln and contribute to Ellen spoiled. Do you think Ben's going to break Ln? I'm not breaking. Or is it going to help? I'm helping lightning, making lightning more private. Carmen, how's your tab comp? It's been great. Best tab comp ever. Better than last year, I think. So we got more people here. Workshops have been really good. Talks have been really good. More of my friends are here. You're here. Thank you, Ben. Yeah, it's been really good. I've had a lot of fun. It's got out of the attacking lightning panel. That was phenomenal. So Paul was saying yeah, it was really good. Probably going to have to turn off my lightning note eventually. This is terrifying. Really? Not really, but how do we fix it? Just talk about it? Well, talking doesn't actually do anything. We have to write code. But a lot of it's, like, research as well. It's like, we just know there's problems and we have ideas of solutions, but not like, oh, this is a real fix. It's like, oh, this is an approximation of a fix. So we're just still a lot of research to do by always smart people, hopefully to figure out better mitigations and solutions to these problems. But I'm not going to be able to do it. But smarter people than me are working on it, thankfully. Thank you guys for coming on the pod. I appreciate you all. ", + timestamp: '00:50:17-01:00:04', + topics: ['TABConf', 'Bitcoin community'], + type: 'podcast', + weight: 9.932519761232543, + }, + { + boost: 0, + date: null, + description: 'Introducing the Start9 sovereign computing model', + episode_title: 'Café ₿: Sovereign Computing w/ Matt & Aiden, Start9', + guests: [ + { + name: 'Andrew', + profile_picture: 'https://pbs.twimg.com/profile_images/1465763053014859786/xYFN2czJ_400x400.jpg', + ref_id: 'ae4b13f8-0ee7-480a-b47a-82b967ad7a79', + twitter_handle: 'AP_ArchPublic', + }, + { + name: 'Matt Hill', + profile_picture: 'https://pbs.twimg.com/profile_images/1347317316057321474/ieMjzK3x_400x400.jpg', + ref_id: '3576ad28-a04d-4388-865b-3ec5114c4f9f', + twitter_handle: '_MattHill_', + }, + { + name: 'Lauren', + profile_picture: 'https://pbs.twimg.com/profile_images/1586022214901501952/U1dRyCxP_400x400.jpg', + ref_id: '7f14bbf5-a60b-496b-a361-3663cf120299', + twitter_handle: 'LaurenJauregui', + }, + { + name: 'Aiden McClelland', + profile_picture: 'https://pbs.twimg.com/profile_images/1470160097225498624/0BjKB_2W_400x400.jpg', + ref_id: '04ddd9d4-9329-4e6c-aaa3-d65ea4a9342a', + twitter_handle: '_dr_bonez', + }, + { + name: 'Peter', + profile_picture: 'https://pbs.twimg.com/profile_images/1581695667193643009/EljNY-TH_400x400.jpg', + ref_id: 'a3384925-e15e-421d-b9f9-6d44e273ed05', + twitter_handle: 'PeterAnsel9', + }, + { + name: 'Lisa', + profile_picture: 'https://pbs.twimg.com/profile_images/1541581547815436288/Li8wORWt_400x400.jpg', + ref_id: 'e6f0c6e3-3237-4b13-878f-bb740cd32f8d', + twitter_handle: 'lisa_hough_', + }, + { + name: 'Isabelle', + profile_picture: 'https://pbs.twimg.com/profile_images/1466874333410717698/WRQh2-_m_400x400.jpg', + ref_id: 'c8df253f-47b3-465e-878e-8405c01c090d', + twitter_handle: 'isabelfoxenduke', + }, + { + name: 'Tone', + profile_picture: 'https://pbs.twimg.com/profile_images/1416821178266787844/T1OkI9ZW_400x400.jpg', + ref_id: '5729ac07-51d6-4268-b585-62680c846acb', + twitter_handle: 'ToneVays', + }, + ], + hosts: [ + { + name: 'Alex Stanczyk', + profile_picture: 'https://pbs.twimg.com/profile_images/1539055022364708864/rwErK6x1_400x400.jpg', + ref_id: '3126e2a3-bbe4-456b-b298-9714085fa286', + twitter_handle: 'alexstanczyk', + }, + { + name: 'Derek', + profile_picture: 'https://pbs.twimg.com/profile_images/1598322677827207169/Cw0A3oOP_400x400.jpg', + ref_id: 'f441b996-7eeb-4210-b24c-fa011161709d', + twitter_handle: 'derekmross', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/239722cb-4216-414a-a17b-5adf9d52e15a.jpg', + keyword: !0, + link: 'https://stakwork-uploads.s3.amazonaws.com/uploads/customers/2707/media_to_local/0ec4a941-250c-4e1d-8d2a-6c506c3ba4b2/4bd8010d-b2fd-41b4-8041-8a953ef06492.mp3', + node_type: 'clip', + pub_key: '02574d6e8e787372184b6f17c40d6c6fe1777db9015801f95dfd24692784d767cd', + ref_id: '700e8ab8-7cc3-476c-87ea-524081f2322c', + show_title: 'Swan.com', + text: "right, Matt. Well, thanks for joining us. Very excited to be talking to you guys about what you're doing. I know there's a bunch of swans who have ordered stuff from you guys, and it's pretty fascinating. So for those people who don't know what Star Nine is, if you don't mind, would you give, like, a five minute summary on what start Nine is, what are you guys doing? Why are you doing it? And then we'll start opening it up to whatever it is you guys are working on, and then we can do some Q and A, if you like. Yeah, sounds good. So we are, in the broadest sense, a computer company. And our goal as a company is to make self hosting software, open source software, accessible to everyone. And that might sound really boring right out of the gate, right? But when you understand what that means, and you understand that in the current model of computing, that basically your cell phone and your laptop, all these things that you call computers or devices, are really functioning as remote controls that are operating somebody else's computer somewhere else. And oftentimes the computer that you're operating most of the time, in fact, is owned and controlled by one of the Big Ten tech giants. Other times, it is just a small cloud computer that is hosted by the app that you happen to be using in that moment. So, for example, there might be a Notetaking app on your phone that is plugging into a server somewhere that is owned by two founders in a room running that server. And so every piece of information that you write in that Notepad, every time you use it, those signals are flowing through their servers. All the data is stored on their servers. And this scales all the way up to whenever you use Twitter, for instance, or Facebook or Google. Every piece of information is flowing through their servers. So all your communications are intermediated. You are never talking to somebody directly. You are always talking to somebody through a messenger. And that messenger very often has full access to everything you're saying, when you're saying it, et cetera. And secondly, all the data that is produced in those interactions, whether it's you storing a photo or you sending a message to somebody, all that data is likewise stored forever on those third party servers. And sort of how it's always been. When I say always, I mean since the second computing revolution, the cloud computing revolution took off about 20 years ago, give or take. This is just how it is and we've gotten very used to it and it's been very convenient of course has led to many conveniences and superpowers that people have to get more done in a day. But I forget who says this definitely Lornal Arcos in Red Rising but I'm sure somebody in the real world has said it as well. The bill comes due at the end of the meal so the bill is coming due. This wasn't free. It comes at enormous unforeseen costs that are just now starting to be felt and will continue to rise. And so we recognize this as a company, as individuals and we set out to kind of do something about it. And our solution to this is the solution to this which is a disintermediated computing paradigm where human beings and their computers are interacting with each other and those computers are interacting with other computers without the involvement of trusted central third parties. That doesn't mean it's PeerToPeer. It just means federation is okay too. Meaning I can run a server and people who trust me, who are close to me in my life can use my server to interact with each other. It's okay to trust people that you know and who have earned it. So we envision a computing paradigm where people are either communicating PeerToPeer or at least utilizing the servers of people that they trust. You know, members of families, the organization that you belong to, whatever it is. And in order to make that possible, for that computing paradigm to be possible at all it requires people to run their own servers. And I don't mean a server sitting in a bunker somewhere that you don't control. I mean a physical server that you have physical access to. It requires that. And secondly it requires you to be able to use that server. So it's not enough to just buy a Raspberry Pi and install Linux. The vast majority of people in the world are incapable or at least don't have the time and energy and patience to use that thing properly and in perpetuity. These things require enormous amounts of technical acumen. They require time, they require ongoing maintenance forever. It's not a set up and forget type of thing. And so what we have set out to do is provide the tools, namely in the form of an operating system that enables a totally non technical individual to set up and administer a physical personal server for the purpose. Of installing and running almost any variety of self hosted open source software under the sun and converting their computing life to a private one that excludes any trusted third parties. And we try to do this without compromise. It's an ongoing series of trade offs but we are really taking a purist approach to this and trying to do without compromise ultimately resulting in you. When you say without compromise what do you mean by that? I mean that to make anything functional. There's always this trade off between user experience, like making something super easy and convenient, and the principle underlying your purpose, which is to enforce privacy censorship resistance. It's the age old issue of security is basically it's the exact opposite of convenience, right? Like you always have this battle going on between the two things where you're trying to protect your stuff, it just makes it less convenient. And finding the balance there is pretty tough. It's a hard it's a hard computer science problem. It is. And under certain paradigms of computing, like once you have accepted the cloud computing paradigm, this intermediated custodial computing paradigm, you're sort of bound to fail at the privacy and censorship resistance principles because it's. Not really you can't do it with that. You can't without an enormous injection of trust and oversight, which itself just raises costs and ultimately corrupts. Right? So the stance is that we got away with this for a while because it was young and new. It's like in a man. I don't know. There are also massive, massive honey pots for hackers, right? Like when you have these centralized databases full of everybody's information. How many times have we heard this story over the last ten years where even huge credit rating agencies that have hundreds of millions of people, hundreds of millions of records on people get hacked and everybody's information gets stolen and it's big problem. Yeah. The four costs that we talk about with the current computing paradigm are privacy, invasion of privacy, censorship, the security vulnerability that you just mentioned, which is that anything that is worth hacking will eventually be hacked. Period. That's an axiom. And lastly is cost because in order to try to preserve the things that consumers want, like privacy and censorship resistance, the costs forever rise because there's more and more middlemen, right? Security is just more and more layers. And so what's happening here is these tech giants and to be honest, some of the smaller software as a service providers as well, like I mentioned, the tiny little note taking app that's on your phone or something, their costs are rising. It is not a good business to be a service provider of information and data. That is a bad thesis. It was the thesis in Silicon Valley for the last few decades. It's what their bread and butter was, was this idea of, you know, give away some free software product and then just become an indispensable middle man, like to sit right in the middle of everyone's stuff and make them totally dependent on you and then eventually, someday we'll figure out how to see them. Which is the problem. It's what the problem we're facing with everything today. You're seeing it used as a method of control over the masses. A great example of this is Apple and the Apple Store, right? They're threatening to remove Twitter from the Apple store. You need their permission. They are the gatekeepers with the power. That is correct. Apple, as Quick Anecdote canceled our original app, right? Originally, we wrote an Android and iOS app that you would use to connect to your embassy. That is how you administered. Your server was through a native app for these platforms. And Apple shut us down. They told us that we can no longer release additional updates. They provided very little information or guidance. We appealed through multiple boards, and eventually they just said, you're out. And our response to that, I wrote up a huge blog post about this and posted it from my Twitter account and from the start, Nine Twitter account a couple of days ago, if anyone wants to read it. But our response was the proper one, which is what you do when any central authority, whether it's Apple or in a nation state, becomes sort of domineering in your life. You can't punch back. That's their game, right? You're not going to win through you're not going to beat politics with politics. You're not going to beat, you know, business through trying to compete with Apple, you have to opt out, right? This is the most powerful tool available to a club. It's the most powerful tool available to all of us is to simply stop feeding the beast, stop using the things that they offer. Don't fight them for better offerings. You don't go to Apple and say, hey, I want better privacy. Just stop using them. And when I say just, that's actually really hard, right? Like, it's not easy to go on strike and to opt out of these highly convenient systems that we've become largely dependent on. But that's our job. That's what we're doing in Star Nines. We are trying to give people the tools that enable them to opt out of these massive big data surveillance systems. And the good news is that it's not all or nothing. You don't have to, like, take the full plunge. It's not like this huge daunting thing. You just need to take that first step and then gradually, over the course of years, even move your digital life on to systems that you control or that someone in your family controls. And by doing this, not only will you be protecting yourself with minimal convenience loss, by the way, because what we have done is not some crazy, esoteric, inconvenient thing. It's for anyone who has and uses an embassy. You'll know, like, it's not that bad, and it's going to get better and better and better by the month. We're moving very fast and making it very convenient. But not only are you protecting yourself with minimal loss of convenience, but you are almost indirectly fighting back, right? It's a consequence. You're doing something that's in your own best selfish interest while simultaneously benefiting the world by starving out the beasts that are suffocating it. And that's a very powerful idea. In fact, we think it's so powerful that it's bound to happen. I do think that there are scenarios where we go through an enormous period of history where something like this does not come about, but so long as we and others and quite frankly, the whole Bitcoin space keeps pushing for these opt out abilities, which is what Bitcoin is, by the way. Bitcoin is this huge opt out technology for opting out of the fiat monetary system and it's a huge one. And we're just taking that same idea and be like, yo, opt out ", + timestamp: '01:17:40-01:30:45', + topics: ['Start9 computing model', 'Cloud computing revolution', 'Computing paradigms', 'Opt-out technology'], + type: 'twitter_space', + weight: 9.312597274780273, + }, + { + boost: 0, + date: 1670878744, + description: 'Thoughts on Binance and CZ', + episode_title: 'Escaping $ Debasement With #Bitcoin', + guests: [ + { + name: 'Joe Consorti', + profile_picture: 'https://pbs.twimg.com/profile_images/1596902707511664640/GYGWVDts_400x400.jpg', + ref_id: '8d2024b2-03bb-454d-9bd6-bb121904b76a', + twitter_handle: 'JoeConsorti', + }, + { + name: 'Nik Bhatia', + profile_picture: 'https://pbs.twimg.com/profile_images/1496241412580397058/s7jy5g3a_400x400.jpg', + ref_id: 'd76f4499-ccf6-4153-9bc1-257a580aa079', + twitter_handle: 'timevalueofbtc', + }, + { + name: 'Sam Callahan', + profile_picture: 'https://pbs.twimg.com/profile_images/1592532728775409667/0DayEP2Q_400x400.jpg', + ref_id: '5a044a91-8dee-421c-86dd-8c734dc9bc32', + twitter_handle: 'CallahanMusic_', + }, + { + name: 'Brian De Mint', + profile_picture: 'https://pbs.twimg.com/profile_images/1546297674512470016/oEVF8rJQ_400x400.jpg', + ref_id: '064e04f7-8320-4854-8325-0cc19cd7ff55', + twitter_handle: 'BrianTheMint', + }, + { + name: 'Dylan LeClair', + profile_picture: 'https://pbs.twimg.com/profile_images/1508157904913899522/3l7ctauV_400x400.jpg', + ref_id: '283edea0-55cf-4245-95df-8d6d3dcb1851', + twitter_handle: 'DylanLeClair_', + }, + { + name: '@coryklippsten', + profile_picture: 'https://pbs.twimg.com/profile_images/1569687200857755648/fxiCeaqc_400x400.jpg', + ref_id: '21aca21d-9a96-40a9-a8b8-a523ae6591c3', + twitter_handle: 'coryklippsten', + }, + { name: 'Matt C', profile_picture: '', ref_id: '337e3256-0602-4baf-a4b7-ca6d0655c569', twitter_handle: '' }, + ], + hosts: [ + { + name: 'Bitcoin Magazine', + profile_picture: 'https://pbs.twimg.com/profile_images/1444022922377576453/AzvXYXGr_400x400.jpg', + ref_id: '0e7b904e-5161-4aa8-9f0b-65bee6050ddd', + twitter_handle: 'BitcoinMagazine', + }, + { + name: 'Chris Alaimo', + profile_picture: 'https://pbs.twimg.com/profile_images/1579209742370672646/rck7M_MR_400x400.jpg', + ref_id: '3a1bd698-9d67-40e4-ba6d-3e2262b385ca', + twitter_handle: 'ChrisAlaimo6', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/f3a55dda-3dd5-4f62-99c1-bab3a88c27c1.jpg', + keyword: !0, + link: 'https://stakwork-uploads.s3.amazonaws.com/uploads/customers/2707/media_to_local/80ab6951-8961-4aad-a458-a397ed6fd3cf/88c750f6-7569-4f69-947c-d61a398c358c.mp3', + node_type: 'clip', + pub_key: '02814a5050f43a36bb052c7a3f22f0e86700abe037a44d99b45e0cb424d9398cbf', + ref_id: 'ea039879-1342-42d9-92e1-1fd4b6561488', + show_title: 'Bitcoin Magazine', + text: "You'Ve been all over the scams in 2022 and even before that. But I've posted a little bit today, and some people have said this is valuable. Some people have said you're just a paranoid floodster. But I've been posting a little bit today about finance BNB. If you take a peek at BNB and bitcoin terms to basically add all time highs, ten X in the span of week in 2021, and just for instance, right, like, I like to evaluate things in bitcoin terms in this industry, whether it's private valuations, public valuations, crypto tokens, right? And B. And B is worth 2.8 million bitcoin, which is certainly fascinating, right, given that it's a centralized fork of ethereum that finance spun up from nothing. They've arbitrarily halted the BNB chain multiple times. So thoughts on thoughts on CZ? Obviously, he's the main character now, which we've seen in crypto doesn't usually end well, I guess. Just give me your preliminary thoughts. Yeah, I mean, it won't end well eventually, one way or another. We don't know if it'll be some cataclysm or some kind of like, slow bleed just chipping away at regulation. And at the end of the day, the assets that are trading on this platform, finance aren't worth anything. So the trading infrastructure itself that only trades worthless assets isn't worth anything either. And I think that basically makes crypto trading platforms inherent value pretty much zero, other than whoever is still playing greater fool crypto gambling games on their platforms. So as long as that continues, maybe they can continue to extract value. But I don't think you can actually end up going public or monetizing this thing with some kind of exit through this sort of offshore distributed type thing. It's just easy getting rich basically, as long as you possibly can and trying to keep the window open as long as possible. I 100% agree with you on BNB. Obviously, this is company script. It's you know, he can pause the validators at any time. I think he, you know, if he wants to replace one of these guys on the, on the zoom calls at any moment, he can do it really easily. And there aren't that many of them, and they collude and cooperate, obviously, so nothing decentralized about that. Yeah, it's just weird. People betting on B and B is just kind of being long CZ and jumping on trades that he's also long. Kind of just betting on this guy to be smarter than the other people betting on him to be. The smartest guy in the room. Which is the same trade that 100 crypto funds NVCs have had on Sam bank and Creed for the last couple of years, which is just basically belong anything Sam's involved in. Because Even if it's a total scam and even if it's total bullshit. He's so smart that if you just pile into the same trade and ape him, then you'll probably do well. Right? And that's what so many of these people did. It was kind of like the new version of the GBTC ARB trade, which everybody piled into in 2000 and 22,021 and then got burned and led to this next brainless move of just going along salana and salana ecosystem crap. And, you know, it's just not a lot of independent thought. And nor would you expect there to be much, because when it comes to crypto, folks like these are people that have chosen to spend their life's work on something worthless. So I'm not sure why you would have high expectations for them. So, Matt, I see you have your hand up. Corey, I just want to add one thing to the combo and then would love to hear your thoughts on Matt. I can't confirm this, but heard from an extremely reliable source over the weekend, just kind of on your GBTC thread a little bit and waiting for confirmation on this. Decided. I haven't posted this officially on Twitter, but hearing from the extremely reliable source, heard that Alameda was actually very much involved in the GBTC trade of Genesis. Posted to Genesis, borrow more, lever up long the GBTC discount premium with leverage essentially, apparently, according to the source, who will remain nameless, but definitely very much in the know in terms of all of this happening in the industry. Very connected person. Told me that DCG executives were actually going around and this is in 2000 and 22,021 were actually going around and pitching these three Arrows capital and now meters of the world and everyone else to go do this trade, this leveraged circle jerk with DCG entities of buying the bitcoin or sending dollars to DCG. I can be a source for that. This was active and very heavily promoted. Everybody was doing it back in 2021. Buy a bunch of bitcoin or even just send cash and they would just convert it into bitcoin for you. And then remember, it used to be a one year lock up. And then when they started really wanting to push it, they changed it to a six month lock up. And that's when the flood really came. And this is where all the BlockFi yield was coming from because it doesn't matter what asset it was like, let's say that you could get, you know, essentially like risk free 20 or 30% on this GBTC premium. You can double that out a bunch of different ways. Even if it started to drop a little bit, even if your expectation was six or eight, you could still pay like 10% on stables and consider three or 4% to be like customer acquisition costs, like marketing costs, and still have some left over to pay some yield on that. But at the end of the day, all this is is something that is illegal in traditional finance, which is funding institutional trading and leverage with retail deposits. It's not something that you can do. It's not something you can get away with. So it's funny Sam Bankman Freed even tweeted out in the wake of the Celsius collapse in June that Instow to Instow loans are fine because both are sophisticated, but retail lending to Enstow is shady. Well, at the same time, of course, doing exactly that in a slightly murkier way. Yeah, I think it's interesting to see the pattern. And maybe this is just trying to frame a lot of these industry participants under the same light, and maybe CZ or other actors are more legitimate. But it's interesting, the same kind of like position of strength kind of shoot down on some industry players say this is a poor risk model. It's like position of weakness and act really, really strong. Right? We've seen this happen over and over and over again. And in the reality, none of these guys were all that sophisticated and they were just levered to the tips in various ways and various carry trades that blew up in their face. The other funny thing was this thread that came out yesterday or the day before, and obviously I think it was Rom he's like crypto CFA or something like that, and I retweeted him and tweeted a couple of his things out over the last week. But basically just sniffing out and putting together that Alameda was probably made money at first when the only people on FTX were relatively unsophisticated or small fish, basically. And then when the big guys came, the smarter guys that were way smarter than people with 18 months of junior experience at James Street, or someone who looks and talks like Caroline and everybody on math or whatever, like when real shops came and started trading on FTX, they just started ripping Alameda's face off. And I verified with multiple funds that they were duplicating. The strategy that I tweeted out about, basically just at closing, there was some kind of like rebalancing or refunding of these leverage tokens that existed on FTT. And one guy made 50 X on his money in a year or something like that, and lots of other people were on that trade. I guess at least a few people have pointed to CMS Holdings as having really ripped the face off of Alameda for the last few years, basically doing this, and lots of other people learned how to do it too. It just really wasn't that complicated. So I think that thesis of this guy basically wasn't nearly as smart as people thought. Not some kind of like super genius, obviously just losing money. And the reason that he started getting into retail. As long as people were dumb enough to go along with this theory of FTX equity is valuable and FTT token is valuable. And all this other stuff the move into retail, like sponsoring the arenas and buying blockfolio and sponsoring Pomp and all this other stuff was really just to try to get into a position where they could take fees off of people. Because this is Ben Hunt. Excellent theory. Talking about this a lot too, in the last few days that you want to be in the flows, right? You don't want to be in directional bets at some point. So it's just like this houdini escape attempt to try somehow to get into the retail business where low end people will eat fees and build this big financial institution that's kind of more retail focused since they obviously couldn't make money trading. ", + timestamp: '00:08:42-00:19:36', + topics: ['Binance BNB', 'Changpeng Zhao', 'Alameda Research', 'bnb'], + type: 'twitter_space', + weight: 17.912974381160645, + }, + { + boost: 0, + date: null, + description: 'Brad Mills explains his stance that Stackchain is a shitcoin', + episode_title: 'Café ₿: Bitcoin Lightning ⚡️ Q&A w/ Bobby & Paul From Voltage!', + guests: [ + { + name: 'Tomer Strolight', + profile_picture: 'https://pbs.twimg.com/profile_images/1591960241008148481/HtyINxtU_400x400.jpg', + ref_id: '3a2bc97d-072c-4ed9-9a59-17ceeb68fe99', + twitter_handle: 'TomerStrolight', + }, + { + name: ' Brady Swenson', + profile_picture: 'https://pbs.twimg.com/profile_images/1502564606836981763/fmqtNrNc_400x400.jpg', + ref_id: '560cf9ee-2844-4ced-bbfd-d0ec639b2177', + twitter_handle: 'CitizenBitcoin', + }, + { + name: ' Jeff Ross', + profile_picture: 'https://pbs.twimg.com/profile_images/1307109108127019008/rPNj47yJ_400x400.jpg', + ref_id: '4f4f53c7-5a3a-46df-b334-9951fe38dc96', + twitter_handle: 'realjeffreyross', + }, + { + name: ' 2140data', + profile_picture: 'https://pbs.twimg.com/profile_images/1598330787778232320/ZVFcRtet_400x400.jpg', + ref_id: 'c8fb52d1-fa69-410d-bf96-8a7559bba863', + twitter_handle: '2140data', + }, + { + name: ' q_liketheletter', + profile_picture: 'https://pbs.twimg.com/profile_images/1560683048680665088/4MrHM_UY_400x400.jpg', + ref_id: 'd82c0d30-d0d3-4947-a358-d28f1cd5292e', + twitter_handle: 'q_liketheletter', + }, + { + name: ' iBobbyShell', + profile_picture: 'https://pbs.twimg.com/profile_images/1583132979571920896/1Std3_ya_400x400.jpg', + ref_id: '2f9bd0a3-1215-4a89-9dc6-d64f170961af', + twitter_handle: 'iBobbyShell', + }, + { + name: ' Tone Vays', + profile_picture: 'https://pbs.twimg.com/profile_images/1416821178266787844/T1OkI9ZW_400x400.jpg', + ref_id: 'ac43b4f0-9056-4a6b-9d30-4a6250405ade', + twitter_handle: 'ToneVays', + }, + { + name: ' sonofsats', + profile_picture: 'https://pbs.twimg.com/profile_images/1593080311000211456/Dr_NQ9Iw_400x400.jpg', + ref_id: 'd584f070-a66a-4b53-b15a-8142f8daea66', + twitter_handle: 'sonofsats', + }, + { + name: ' futurepaul', + profile_picture: 'https://pbs.twimg.com/profile_images/1508452962917666821/1QheRD09_400x400.jpg', + ref_id: 'fcb50ec8-2669-47da-87b9-1702affb30c9', + twitter_handle: 'futurepaul', + }, + { + name: ' Greg Foss', + profile_picture: 'https://pbs.twimg.com/profile_images/1552599670945464320/3OgqRHNo_400x400.jpg', + ref_id: 'a2ba4e1e-aab7-43b0-90d7-d3c6a9738ad0', + twitter_handle: 'FossGregfoss', + }, + { + name: ' Brad Mills', + profile_picture: 'https://pbs.twimg.com/profile_images/1541955880752750592/XJqwIn2E_400x400.jpg', + ref_id: '9a49201c-3b03-4a83-bcb8-d92dbf3d55b6', + twitter_handle: 'bradmillscan', + }, + ], + hosts: [ + { + name: 'Alex Stanczyk', + profile_picture: 'https://pbs.twimg.com/profile_images/1539055022364708864/rwErK6x1_400x400.jpg', + ref_id: '3126e2a3-bbe4-456b-b298-9714085fa286', + twitter_handle: 'alexstanczyk', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/239722cb-4216-414a-a17b-5adf9d52e15a.jpg', + keyword: !0, + link: 'https://stakwork-uploads.s3.amazonaws.com/uploads/customers/2707/media_to_local/0ad62f26-289d-4eba-af0b-0da68515cbb6/c5c6ea3d-df5a-464d-9b41-a6bf3a0372a9.mp3', + node_type: 'clip', + pub_key: '034248fa888690a85021cf117c168a535c53b92e1fdf3e4f9cefddfe09118d8207', + ref_id: '929def08-6b32-4313-a296-eaa1e5ee8d1b', + show_title: 'Swan.com', + text: "Alex, can I ask Brad a quick question? Of course, go ahead. Hey, Brad. Stack chain is just the gamification of turning Kuckbucks into SATS. And the only reward is people get more SATS. So I'm curious, why did you post that stack chain was a shit coin this morning? Oh, my God. Here we go. Shot fired. Bread went off the stage. He's requesting come back up to defend himself. It should be interesting. The reality is that there are lots of detractors of stock chain. For various reasons. It is something that can. Oh, my God. What's up, Brad? How can you declare it? How come you posted as a shit coin? Do you not understand what we're doing over there? 3 million cookbooks converted hold on. 3 million cookbooks converted in four months by $500. I spent a lot of time in the Djen pits of shitcoinery, and this feels like a shit coiny thing to me. So that's why I said that, because the shit coins do stuff like that. Which means you're buying right now, right? Buying bitcoin. I'm always buying bitcoin. None at all. Good burn, Alex. What? Buying bitcoin? No, I'm not buying can we just back up? What exactly is stock chain? Sorry, I'm sort of be the idiot on the panel. Here we go. Look, this is what it is. It's a bunch of clubs decided we're going to stack some bitcoin and play a fun game on Twitter and post memes and kind of replicate what a blockchain is while they stack bitcoin and compete for blocks in a big long Twitter thread and kind of meme about it. But to me, I was a big fan of like, the Lightning Trust torch and all those things like the state chain torch and things like that. I loved that stuff. I thought that was cool because it served the purpose. It was like a political message. The lightning torch was similar, but the Lightning torch was like almost a political message because we were sending the lightning torch proving to the shit pointers, like to Roger Fur and all the BCRs that lightning wasn't vapourware and that you were sending it across borders. People were kind of like making a political statement. Like somebody received it in Iran and then sent it back over to someone else in another country. And it was kind of like a political statement that I could get behind. But the stock chain culture, I think, to me looks more like a little bit useless and a waste of energy. It looks like we could be doing better things with our time. And as an outsider looking in on it, that isn't part of bitcoin culture. It does look like a bunch of weird people, like, bragging about pumping the price of bitcoin even though they're only buying like, $5. It just feels okay, hold on. Brad, Brad, Brad. It's fasci. OK, as a proud stock chainer, I think you need to do more. Okay? I would happy to talk to you offline because it actually is a very noble cause. Nothing more than a bunch of clubs, but that's exactly what it is. Okay? Okay. And I just want to end with this. I have a proud stock chainer. I think I've done it four times. That being said, it is the total antithesis of shit coinery. Okay? It actually is a disciplined and find the stock chain tip. Sort of teaches you how the blockchain works indirectly. Just my opinion from a 60 year old fuck. Okay, this actually is a cool thing. Because there's at least a dozen swans who are stack chainers, including Corey Clifton and oh, by the way, Michael Sailors. A stack chainer. Everybody's a shit owner now. No, I'm on the other side of it. I think Brad has way too much free time in his hands. I guess he needs to find. It. I didn't get in on the premiere of the Fact chain, so maybe that's why I'm salty. For those of you who missed it, you got to go back and listen to the podcast recording of this show for the Thanksgiving special was so goddamn funny. There was one part where American Hall was comparing Brad Mills to a small furry mammal in the grass. It's great. I'll leave it at that. You got to go check it out. It's hilarious. So, Brad, I think some of your concerns are probably valid. It does look a little odd from the outside, but honestly, it's just a bunch of plebs having fun stacking SATS in the bear market. That's really what it comes down to. Ant is also correct. There probably is our $3 million cuckbuck mark. He said asterisks. And that's probably correct because there are some people who play this game and squash or they create fake receipts or whatever, but they're losers because they didn't get a stack stats by doing that. And then the other thing is that in effect, it actually increases the difficulty adjustment because the block height goes up. There's another dollar added once that happens. So somebody else is purchasing more Sass and it's really just a fun way. To shift the gamification of stacking. That's really what it is. And a way for people to talk shit about each other while doing it, which makes it fun. I don't know something about it. It's all good. I'm a fan of both of yours. I'm a fan. And if we are all thinking alike, then somebody isn't thinking right. Quoting General George Patton. If all bitcoiners are thinking alike, then somebody isn't thinking. So thank you for your input, Brad and everybody, I'm signing off. I'll listen to voltage. Thanks, guys. Don't worry. Normally I'm not aligned with the things that you say, but I think stacking is pretty dumb. I'm just going to take this one. That's for a back ended compliment. Brad. That change. Awesome. Well, I just followed Brad because. Nice. Alright, Brad, I just want to say we all love you, man. Let's keep ", + timestamp: '01:23:39-01:30:26', + topics: ['Brad Mills', 'Stackchain is a shitcoin', 'what is a stackchain'], + type: 'twitter_space', + weight: 9.22888708114624, + }, + { + boost: 0, + date: null, + description: + 'Tone Vays gives his analysis about what is needed for a final Bitcoin capitulation and the return to a bull market', + episode_title: 'Café ₿: Bitcoin Lightning ⚡️ Q&A w/ Bobby & Paul From Voltage!', + guests: [ + { + name: 'Tomer Strolight', + profile_picture: 'https://pbs.twimg.com/profile_images/1591960241008148481/HtyINxtU_400x400.jpg', + ref_id: '3a2bc97d-072c-4ed9-9a59-17ceeb68fe99', + twitter_handle: 'TomerStrolight', + }, + { + name: ' Brady Swenson', + profile_picture: 'https://pbs.twimg.com/profile_images/1502564606836981763/fmqtNrNc_400x400.jpg', + ref_id: '560cf9ee-2844-4ced-bbfd-d0ec639b2177', + twitter_handle: 'CitizenBitcoin', + }, + { + name: ' Jeff Ross', + profile_picture: 'https://pbs.twimg.com/profile_images/1307109108127019008/rPNj47yJ_400x400.jpg', + ref_id: '4f4f53c7-5a3a-46df-b334-9951fe38dc96', + twitter_handle: 'realjeffreyross', + }, + { + name: ' 2140data', + profile_picture: 'https://pbs.twimg.com/profile_images/1598330787778232320/ZVFcRtet_400x400.jpg', + ref_id: 'c8fb52d1-fa69-410d-bf96-8a7559bba863', + twitter_handle: '2140data', + }, + { + name: ' q_liketheletter', + profile_picture: 'https://pbs.twimg.com/profile_images/1560683048680665088/4MrHM_UY_400x400.jpg', + ref_id: 'd82c0d30-d0d3-4947-a358-d28f1cd5292e', + twitter_handle: 'q_liketheletter', + }, + { + name: ' iBobbyShell', + profile_picture: 'https://pbs.twimg.com/profile_images/1583132979571920896/1Std3_ya_400x400.jpg', + ref_id: '2f9bd0a3-1215-4a89-9dc6-d64f170961af', + twitter_handle: 'iBobbyShell', + }, + { + name: ' Tone Vays', + profile_picture: 'https://pbs.twimg.com/profile_images/1416821178266787844/T1OkI9ZW_400x400.jpg', + ref_id: 'ac43b4f0-9056-4a6b-9d30-4a6250405ade', + twitter_handle: 'ToneVays', + }, + { + name: ' sonofsats', + profile_picture: 'https://pbs.twimg.com/profile_images/1593080311000211456/Dr_NQ9Iw_400x400.jpg', + ref_id: 'd584f070-a66a-4b53-b15a-8142f8daea66', + twitter_handle: 'sonofsats', + }, + { + name: ' futurepaul', + profile_picture: 'https://pbs.twimg.com/profile_images/1508452962917666821/1QheRD09_400x400.jpg', + ref_id: 'fcb50ec8-2669-47da-87b9-1702affb30c9', + twitter_handle: 'futurepaul', + }, + { + name: ' Greg Foss', + profile_picture: 'https://pbs.twimg.com/profile_images/1552599670945464320/3OgqRHNo_400x400.jpg', + ref_id: 'a2ba4e1e-aab7-43b0-90d7-d3c6a9738ad0', + twitter_handle: 'FossGregfoss', + }, + { + name: ' Brad Mills', + profile_picture: 'https://pbs.twimg.com/profile_images/1541955880752750592/XJqwIn2E_400x400.jpg', + ref_id: '9a49201c-3b03-4a83-bcb8-d92dbf3d55b6', + twitter_handle: 'bradmillscan', + }, + ], + hosts: [ + { + name: 'Alex Stanczyk', + profile_picture: 'https://pbs.twimg.com/profile_images/1539055022364708864/rwErK6x1_400x400.jpg', + ref_id: '3126e2a3-bbe4-456b-b298-9714085fa286', + twitter_handle: 'alexstanczyk', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/239722cb-4216-414a-a17b-5adf9d52e15a.jpg', + keyword: !0, + link: 'https://stakwork-uploads.s3.amazonaws.com/uploads/customers/2707/media_to_local/0ad62f26-289d-4eba-af0b-0da68515cbb6/c5c6ea3d-df5a-464d-9b41-a6bf3a0372a9.mp3', + node_type: 'clip', + pub_key: '034248fa888690a85021cf117c168a535c53b92e1fdf3e4f9cefddfe09118d8207', + ref_id: '332af4b9-782f-40e4-878c-45bb9d7edcdc', + show_title: 'Swan.com', + text: "Yeah, for sure. Shout out to Tone Vays throwing you an invite to come up. Brady Swenson in the audience throwing you invites. Guys, Tone Vays had a well, there was an article regarding Tone Vays in a strategy session he did on YouTube talking about what we need to see before he's convinced we've got capitulation. We're moving up again. Hey, good morning. How's it going, Tom? Morning, guys. So would you mind just taking two minutes? And when I say two minutes, I'm serious about two minutes. Because sometimes you can go for like a 20 minutes rant. Alright, five minutes. You want to tell us what you're thinking in terms of what we need to see in prices, et cetera, what we need to hold before we know we're back into a bull market. There's a lot of speculation that we're hitting the bottom. There's a lot of market indicators popping up that people are saying mean at the bottom. I don't know if at the bottom. What do you think, Tom? Yes. I have to go and check the price of bitcoin real quick because it just woke up in time for spaces. Lucifer, back up to 16, I'll tell you. 16,370? Yeah. Well, we're back to 16 four after flirting with 1601 more time. So I am one of the view that if you get too many chances to buy the perfect low, it's not the low unless you get so many chances to buy the low that everyone gets bored and thinks bitcoin is never going up again. So at the moment we've had too many chances to buy the perfect low of 1600 or a little bit under. And that makes me so right now I am leaning towards the direction of one more capitulation. How long can it go? Hard to say. 1413, but it's the structure of the capitulation, right? 15 and a half, like we did a few weeks ago. And if we were already at $20,000, I would be full on full market right now. That's it. That was the low. Kind of like what happened with COLVID, but right now it feels more like 2015, where we crashed into the sub 200 low and then we spent like five months, six months flirting between 203 hundred, maybe got to 350. And then once again, like after January we crashed the below 200, and then again in August we crashed to below 200. So now it feels more like 2015 again, like we spent so much time at the low. And it wasn't even the low. So people A, got bored and then B, got hit with one more capitulation. So for me to call a bull market right now, I would need a clean, higher high, which means we go up to 21 22 $23,000 range, and then on the way back, don't go below 19 and reverse at 19 and start to push towards 21 22 again. So that's what it would take for me right now to consider a bull market or, you know, a quick drop to below 14 followed by a swift rebound back to 18. That would also get me super bullish. Got it. That was a great summary. So shout out to Jeff Ross in the audience throwing you an invite. If you want to come up and give us your five minutes on what's going on in the markets, you're welcome too. For those of us who are aggressively stacking this low or this correction, you're telling me that we still have a chance that this might last a little while longer? Yeah, it feels like it. But keep stacking because time wise, this can't last too much longer. I can't see this. I'm already a little bit like, wow, this thing lasted far too long. But I guess as late as March, there is no way we're going to be sitting at these lows with less than twelve months to go to the having. With everyone having their countdown in days when it's less than 365 on their wall, I just can't see it. I love it. Personally. I've been super aggressively stacking this entire time, and I know many others are. There's some new data out from Glass Node that says entities owning less than one bitcoin of collectively accumulated 1.5 billion so added 96,200 bitcoin to their holdings since the FTX collapsed, all time high balance increase. And then entities owning less than ten bitcoin have added over 3 billion worth in the last month. Yeah, those are my two favorite metrics. Wallets that have accumulated over one bitcoin has just crossed 950,000. Let's hope that's 1 million leading into before the having, right? Like in the next three months, by the end of Q one, I would love to see that metric break 1 million wallets that have stacked more than one bitcoin. And the other metric, well, double metric, how many bitcoins are entering the Lightning network and how many bitcoins are entering the liquid network? That one is super small because once bitcoin enters those networks, it doesn't really leave. There's no reason for it to leave. It's better there in both of those networks because it's there because it solves a problem. And that problem requires bitcoin liquidity to come off on shape. Not the solution. I should say not that problem. Yeah. But it's also a way to mark sort of network growth. So we talk about this thing called the Network of Fact where and Lawrence LaPard says that like one of the only things that would concern him is if the bitcoin network started getting weaker, meaning less users, less lightning growth, all that other kind of stuff. That's an interesting point, because as long as bitcoin keeps getting stronger, it's already the super dominant. It's the only proof of work network really worth talking about at this point. And that's exciting because that just means it's just getting stronger all the time, regardless of price. Jeff ", + timestamp: '00:16:01-00:22:44', + topics: [ + 'Tone Vays analysis', + 'Bitcoin capitulation', + 'Bitcoin bull market signals', + 'Lightning and Liquid networks', + ], + type: 'twitter_space', + weight: 9.22888708114624, + }, + { + boost: 0, + date: 1637366400, + description: 'Nuclear Reactors are safe - salt cooled reactors with TRISO nuclear fuel particles', + episode_title: 'Securing Bitcoin With Nuclear Energy', + guests: [ + { + name: 'Nuclear Bitcoiner', + profile_picture: 'https://pbs.twimg.com/profile_images/1443185278525579278/_Yl1nao1_400x400.jpg', + ref_id: '60f5891f-0864-4ed4-987a-81da4768b3ba', + twitter_handle: 'nuclearbitcoinr', + }, + { + name: 'Eric McErlain', + profile_picture: + 'https://pbs.twimg.com/profile_images/1252969137/Screen_shot_2011-02-23_at_10.59.21_PM_400x400.png', + ref_id: '4815365d-44d0-4b06-9d9e-32070158d03c', + twitter_handle: 'atomiceric', + }, + { + name: 'Puru Goyal', + profile_picture: 'https://pbs.twimg.com/profile_images/1590742805613203456/QAtYq_C__400x400.jpg', + ref_id: 'c24af059-b38b-4ce5-9547-9192c9eff579', + twitter_handle: 'purugyl', + }, + ], + hosts: [ + { + name: 'Zack Voell', + profile_picture: 'https://pbs.twimg.com/profile_images/1595803006737448961/fFrf7VJb_400x400.jpg', + ref_id: 'e32c7661-c635-4089-a620-ffce509eff0e', + twitter_handle: 'zackvoell', + }, + { + name: 'Compass Mining', + profile_picture: 'https://pbs.twimg.com/profile_images/1425165074373791744/f2CgInvP_400x400.jpg', + ref_id: '812e5d37-47fb-4077-915f-df52e2ef84d8', + twitter_handle: 'compass_mining', + }, + { + name: 'Will Foxley', + profile_picture: 'https://pbs.twimg.com/profile_images/1580970227193376776/9oQfeExj_400x400.jpg', + ref_id: '704b9e82-3e40-40b6-874c-6bb8fadafbef', + twitter_handle: 'wsfoxley', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/ae91fac6-a1af-4877-9a92-e793d556ee66.jpg', + keyword: !0, + link: 'https://www.youtube.com/watch?v=YBaA17NODlA', + node_type: 'clip', + pub_key: '03c18d0c6c35333f22bc524e21a5fd1d2d9886f5d4d958dc1de95d025de5c84cfc', + ref_id: 'd1295013-33f3-431f-99a0-baa6d83500ad', + show_title: 'Compass Mining', + text: "I think Eric said pretty much everything I had to add. I think apart from the safety case, I think it's a really heavy regulated industry which not a lot of people understand. You can't just make a reactor in your backyard and put it online. It doesn't happen that easily. Right. So there's a lot of regulatory compliance that goes into it. And especially if you work in the industry, you realize, which I had not a huge amount of appreciation for, which I've realized over the last four years that licensing of reactors not super easy now. So that's another drag on the industry which has been happening. But I mean, part of it is required because of just how the technology is. And like Eric was saying, it's like we pay the price for it. But apart from that, I feel like we just have to point out how cool nuclear technology really is. Like, if you are really serious about climate crisis and everything else that you see in the mainstream media and you're not pro nuclear, you're just kidding yourself because the energy mat just doesn't add up. So I feel like apart from validating the safety cases for the advanced reactors specially, which have really improved over the build up that we've seen over the 1970s, which were mostly pressurized like auto reactors. So a lot of the reactors that we are probably going to see over the next decade or so would be sold reactors which will have these trip particle fuels, which if you look at it, I think they're pretty much the most robust fuel on the planet today. So I would ask anyone to go Google tripod fuel and look up what they actually are and realize how cool that technology really is and how badly we need it. Because that small amount of particle which is the size of a golf ball, can produce power as much as a coal plant or natural plant can. So that's just really powerful, right? I mean, nuclear reactors are safe today. Like the build up that we're seeing, we'll probably see in the licensing that I've been part of the technologies out there. It's just a matter of building it. And I think it just depends on the economic incentives. If the incentives are right there, then people are going to go out there and build it. And the opportunity I was talking about is going to show up sometime over the next decade where a lot of these private companies which have been involved in the space for a while now. I kind of like relate this to the space race for these private companies, which was happening in the early 2000s, where companies like SpaceX and Blue Origin were just starting out and not a lot of people had heard about SpaceX for the first ten years, right? Like we just started hearing about when they start launching rockets, but they had a massive amount of failure going into those rocket launches. And I think it's similar with these private nuclear companies of today where they're slowly and privately building out these technology options for us. I think we'll start to hear more of those in the next five years or so and it's just going to happen. And I think the public sentiment will drive from that because people will soon realize that if you want to be serious about climate change, then you have to be on the side of nuclear. I think it's very similar to like even with Bitcoin, I feel like that's just the sentiment. I think there's just the economic incentives are going to be such that it'll just drive adoption naturally. I'm with you there, ", + timestamp: '00:35:08-00:38:18', + topics: ['Nuclear Reactors Technology', 'TRISO Particle Nuclear Fuel'], + type: 'youtube', + weight: 9.170270925405587, + }, + { + boost: 0, + date: null, + description: + 'Relationship of Year-on-Year change of Bitcoin Hashrate, the Bitcoin Economy and The Energy Industry', + episode_title: 'Café ₿: #Bitcoin News & Trusted P2P Reviews w/ @Apollosats', + guests: [ + { + name: '@2140data', + profile_picture: 'https://pbs.twimg.com/profile_images/1598330787778232320/ZVFcRtet_400x400.jpg', + ref_id: '190b5001-a42a-46cc-b0d3-b6f74c625648', + twitter_handle: '2140data', + }, + { + name: '@FossGregfoss', + profile_picture: 'https://abs.twimg.com/sticky/default_profile_images/default_profile_400x400.png', + ref_id: '09913e9b-38dc-4465-9d4d-ae0c9ba9eeca', + twitter_handle: 'Fuckkkk', + }, + { + name: '@w_s_bitcoin', + profile_picture: 'https://pbs.twimg.com/profile_images/1594796869233811474/g0_ZRshz_400x400.png', + ref_id: 'b178b239-3b18-4a16-9d43-c5d15ba6f7f4', + twitter_handle: 'w_s_bitcoin', + }, + { + name: '@NeilJacobs', + profile_picture: 'https://pbs.twimg.com/profile_images/1599432572727169025/NSoPdchB_400x400.jpg', + ref_id: '4b6997e1-ce0b-4a1d-90e7-dbaccef4b783', + twitter_handle: 'NeilJacobs', + }, + { + name: '@brandon_gentile', + profile_picture: 'https://pbs.twimg.com/profile_images/1561369452284895236/-8WgdwEm_400x400.jpg', + ref_id: 'f940c5e8-4808-4197-a38f-3f19d311a7ad', + twitter_handle: 'brandon_gentile', + }, + { + name: '@apollosats', + profile_picture: 'https://pbs.twimg.com/profile_images/1576946734927794176/2ail9FoU_400x400.jpg', + ref_id: '74f4280f-5fdb-4bbc-aee2-a2ed32d64372', + twitter_handle: 'apollosats', + }, + { + name: '@StackchainSig', + profile_picture: 'https://pbs.twimg.com/profile_images/1589791699571802117/n_Y1Qm7J_400x400.jpg', + ref_id: '6e652629-38ec-49d8-9f5c-3ba28f80c799', + twitter_handle: 'StackchainSig', + }, + { + name: '@TomerStrolight', + profile_picture: 'https://pbs.twimg.com/profile_images/1591960241008148481/HtyINxtU_400x400.jpg', + ref_id: '7af639f8-8c5c-4ce1-a43b-e8560ed40e2b', + twitter_handle: 'TomerStrolight', + }, + ], + hosts: [ + { + name: '@alexstanczyk', + profile_picture: 'https://pbs.twimg.com/profile_images/1539055022364708864/rwErK6x1_400x400.jpg', + ref_id: '6455df34-1abc-4ce8-9bb8-b02d411accec', + twitter_handle: 'alexstanczyk', + }, + { + name: '@pacificbitcoin', + profile_picture: 'https://pbs.twimg.com/profile_images/1570140686753619970/UFEnzSv5_400x400.jpg', + ref_id: 'f8268a26-9761-40c1-bdd6-dad9db44d032', + twitter_handle: 'pacificbitcoin', + }, + { + name: '@SwanBitcoin', + profile_picture: 'https://pbs.twimg.com/profile_images/1491428856858914820/aFlitvha_400x400.jpg', + ref_id: 'da3f56bf-9763-4389-a9ec-d807049bd0b8', + twitter_handle: 'SwanBitcoin', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/239722cb-4216-414a-a17b-5adf9d52e15a.jpg', + keyword: !0, + link: 'https://stakwork-uploads.s3.amazonaws.com/uploads/customers/2707/media_to_local/7cf57bdb-c905-46e3-a7e5-4c0bfd4f8d04/71c08fae-cce8-4600-ab9e-758420e78dcf.mp3', + node_type: 'clip', + pub_key: '029099ec31eb33594611dc47d5c93de2c1aa86918e3a36b408c14a500601c8bc9b', + ref_id: '2b1c8514-7d10-4e83-9006-9974ec31d35a', + show_title: 'Swan.com', + text: "I appreciate it. I wasn't going to do, like, anti who's holding bitcoin rant and who's mining bitcoin rant? Whenever we could ask that question. I wanted to look at these kind of hash rate numbers year over year and just going back to late 2018, and this isn't like exact science. I just basically picked the first dates that I could find in January for that year. So just take it with a grain of salt. But January 8, in 2018, hash rate was around 16 X A hash. January 9, wow. 2019, it was floating around 45 X A hash, which was like 181% increase. I believe January 20 was around 100 X A hash, which would have been like 122% increase over the previous year of 45. And then January 21 was 150 x a hash about which was, you know, about a 50% increase. So where are we going to be in January 2020? Oh, I guess that was 2021. January 2022, I didn't get that one, so I'm missing that one. But January 2023, you know, I don't know where we're going to be for there, but I mean, right now, today, it's 260. The problem is they're not making money, right? So there's an overhashing, arguably, miners bought a lot of rigs last year. They were overfunded, and they thought number would go up, and now they're hashing like, there's no tomorrow and selling every bitcoin. They mine pretty much immediately because they're losing money left and right in the bear market. So you could easily see rigs going offline soon and the hash rate coming down to match the price better. So here's the interesting thing, because I agree with you. I did just go grab January 2022, and it looked like that it was floating around basically, like 175, 190 x A hash. If the year before was like 150, it's like even less as far as is like, the increase. You're going from like 181% to 120% down to 50, and then like, a little bit less. But now it's like up to 260. So I know it's like a lot of numbers. If you're not looking at it, like, I am right here to kind of hear it I hope I'm relaying it correctly for everyone to understand. I feel like we already had a massive correction in the amount of X A hash, and now it feels like it's going back up. Well, exactly. And if you pull this up over like this same time frame, like go back to like I just pulled it up to like 2016 now, and I can see all this hash rate. And you can see it like goes from like this little line there's like this kind of upward, you know, trajectory. And then right around May 2021, you know, of course there was like a big drop. Like it it gets, you know, June, July, July it drops. June, it drops way down to like 87 from and this was in 2021, so May 2021, it had been cranking along. It was like 179 X A hash doing great. Then all of a sudden it dropped huge, down 87 X A hash per second. And then from there you can see it's almost like a bunch of miners turned off. And then here goes a bunch of new ones. Bump bump, bum bum bum bum, boom boom boom. And it goes all the way up. And here we are, 260 something. Yes, I show this article, I've been showing it a lot recently on this show, and I know a lot of you still haven't fucking read it, so I put it up in the nest for those who still haven't checked it out, because it is really fucking interesting. And it's exactly what we talk about every single time we talk about this. It's this bitcoin energy gravity idea that Joe Burnett came up with. But it's a really simple and beautiful idea. It's this idea that when bitcoin is flying high and the prices is surging, it becomes very profitable to mine. So new investors, instead of just aping into bitcoin, what they do instead is they ape into mine. Charts are bullshit. I'm sorry. Because you can't tell what's going on right now when bitcoin dropped from 69 to ten because they're using this log ten bullshit scale. Like, I like the chart idea. It's just that execution is atrocious because they should just show what happens when you go from linearly, what happens when you go from 69 to 17 in terms because I can't tell because it's all gobbled up by this bullshit. Learn how to read log charts and then get back to me. But anyways, what I was saying is like, no, it's bullshit. Log chart. This is exactly what can be used. It's exactly what plan B used to fool everybody into bullshit. I'm sorry, it's bullshit. Get a better chart. The plan B thing is a completely different problem. But yeah, no, all this is saying this is saying something that's fundamental to bitcoin. And honestly, I don't think you can argue against it because this is what happens with capital in the bitcoin ecosystem. At least now that it's been fully capitalized is like when the price is flying high and it's cheaper to mine a bitcoin than to buy it outright, then what you get is you get investment in miners, and that naturally stifles aping into bitcoin. It naturally stifles investment in actual just buying bitcoin spot. And so then you get half rate increase, and then once the price starts falling and it gets to a certain point and it actually becomes more expensive to mine than to buy spot bitcoin, then that flips. And then instead of investing in miners or keeping miners on, you just start buying spot. So it's this dance that goes back and forth. And that's why he's called this bitcoin energy gravity, because it's basically when the price flies too quickly up too high, then there's this natural gravity that brings it back down, which is the flip from investing in spot into cash rate instead, because it becomes cheaper just to set up miners and mine bitcoin than to buy the spot itself. Right? If it costs five grand to mine a bitcoin, you're not going to buy bitcoin. You're going to buy miners and mine in bitcoin for five grand to pop. You know what I'm saying? But if all of a sudden it costs 20 grand to mine a bitcoin and you're not going to invest in miners anymore, you're going to just buy the spot bitcoin instead if you want to invest in bitcoin. So that's kind of like that's the natural back and forth that we see playing out over and over again. So one thing that I think could get us to a peda hash very quickly is if we do get this next run in price, that's like crazy, right? And this is not concerning retail. Retail, they all buy bitcoin spot. This is concerning more like institutional grade investment, which we've been seeing a lot going into mining this past cycle. But I think this will kind of continue this back and forth dynamic between supporting further hash rate and then just buying spot bitcoin. All it comes down to is, what's the cheapest way we can get bitcoin? That's really it. Yeah, I agree with that. It's good evidence for what I think people know from first principles. You have a volatile asset. So when the price goes up and it's cheaper to mine bitcoin instead of buying it, people are going to buy bitcoin. And then because it's volatile and because there's a lot of opium, they're going to overbuy and over invest, and then bitcoin will crash at some point because it's so volatile. And then you're going to overhash and miners will go bankrupt, and then the hash rate comes back down and then go back up. But, yeah, it's good evidence for that. He could have explained it in plain English the way you just did, by the way. I don't know why I'm a big fan of plain English bullshit terms. Doesn't he explain it in the article? Did you click into the article? Are you just reading the tweet? No, I'm just saying, like energy, gravity. BS. He could just say like, when the price goes up, you have overhauling and people over invest when the price goes down. You don't need these kind of terms necessarily. There's a certain segment of the population who's not interested in these things unless it has new terminology because they feel like they're smarter, because they're reading new words. That's true. Fair enough. It's marketing. And gravity is one of these fundamental things that everyone feels like is such an important thing in the universe. And it is. We wouldn't be here without gravity. So, I mean, why not name this? See the meaning, man. It always comes back to the same shit. All these different areas. Terminology, analogies are great because they make it easy for people to understand. But at the end of the day, to me, all I know is these motherfuckers will never stop printing. Ever. They've done it my whole life. I came up with a new term recently. So instead of looking at bitcoin year over year growth, I think we should now start looking at it. Epoch over epoch growth. EOE. There is a tweet from bitcoin magazine. It's a billboard in Kansas City. So there's this huge billboard. It's got a US dollar bill on it that says BTC in the middle. It's really funny, but it says, $1 from 2010 will buy you forty two cents of goods today. Do you know why? I think it's fantastic. Human race needs to wake the fuck up. I don't know who's next. Foster tomer. I've spoken already. Let Greg go. Well, good morning, guys. Greg. I'm doing well, guys. Nice conversation. Can I just interesting conversation. Remember, there are a ton of equity investors who cannot buy spot bitcoin. So they buy bitcoin miners as a proxy for bitcoin spot exposure. So in a perfect world with efficient markets, your argument would make 100% sense. But in the absence of equity buyers who cannot buy bitcoin spot and buy bitcoin for miners for what's called beta exposure, that's why the price of bitcoin miners went up into unrealistic levels on a valuation basis relative to the price of spot bitcoin. Okay? So then think of when investors have unit price bias. Mom and pop retail, oh, I can buy a stock of a bitcoin miner at $4 a share rather than buying bitcoin for 40,000. They don't understand that you can't buy a partial bitcoin. They just have unit price bias. So there's that coming into the equation. And then remember, bitcoin mining is a shit business. Okay? Describe to me any other business where you don't control your energy input costs and you don't control your output revenue. Both are set by markets outside of your control. So you want to be a publicly traded bitcoin miner. That's a shit business. Okay? So any bitcoin miner that does not control the cost of their energy is not a great business. And then back to Alex's comment. You're totally right. You can't stop printing. Why? Because it's pure mathematics. The debt spiral is funded by printing more fiat. Fiat is the error term in the debt spiral. So don't overthink things, but try and explain supply and demand where you have a $350,000,000,000 asset, where the Bitcoin publicly traded bitcoin miners at the top of their market cap at the top of their market caps weren't even measured more than $50 billion. Remember that. I'm curious. Like, got to see your hand. But, Greg, I want to ask you a question. I asked this question, I think, to Tone or somebody else the other day, but okay, for these people who cannot buy Bitcoin, the actual layer, one base layer asset, they have to buy a derivative or a security. Do you think MicroStrategy is a better proxy for bitcoin than any other securitized bitcoin product? So, having spent a dinner with Michael Sailor in La and having owned his MicroStrategy at times over common stock, at times over the past, I believe MicroStrategy today is an exceptional buy. Why? Not because of their bitcoin holdings, but because of Mr. Sailor's vision and where lightning and payment rails are going. But I can't talk too much out of school about that. I will just tell you. The capital structure of MicroStrategy is so hedged and wedged with capital structure arbitrage players convert ARB players, to be exact, where they bought almost zero coupon bonds. Some of them had a nominal coupon on them in order to play the optionality of the MicroStrategy stock, because that's all convert ARB desks do, is get optionality out of a convertible ARB excuse me, a convertible bond and play the ball game and play put Call parody on options markets using a convertible bond. That's what they did there. So that capital structure is a little Bit. It's extremely levered to the convert ARB equity desks and convert ARB desks on Wall Street at a price of under $200. I did the math recently. Yes, I did buy some MicroStrategy stock after having the pleasure of sitting down with the CEO face to face. But I don't own it because it owns Bitcoin. I own it because of a vision of a CEO who I really like. Okay, I'm not going to tell other people how to buy Bitcoin, but I'll just tell you if you're buying Bitcoin using other derivatives rather than buying spot Bitcoin, go and get your fucking investment policy guidelines changed, please. So that you can actually invest efficiently on behalf of your unitholders, rather than with one hand tied behind your back because you're too fancy to buy spot bitcoin, but you're going to buy all these other derivatives that's absolutely atrocious risk management. Oh, guess what? That reflects probably 90% of the pension funds and money managers in America and Canada. You know what? Let's apply Kui bono to that, though. Why are those entities precluded from buying underlying assets? You might ask yourself that question. Because the market is so manipulated. Alex, that's not what I think. I mean, Greg can probably back. No, it's more it takes time, gentlemen and ladies. It takes time to change an investment policy. Why are those policies like that in the first place? Greg, I'll tell you why. Because they are staffed by people that are septogenarians. Like, I know Warren and Charlie Munger aren't septogenarians, they're octogenarians and whatever 90 year old people are. But at the end of the day, they're fucking they're from past times, right? They're trying to COVID their ass. They're all invested in bank stocks and everything that bitcoin is going to disintermediate. So God forbid they should buy the spot. But yeah, we'll buy these Bitcoin buyers. Do you think it has anything to do, anything at all to do with the fact that Wall Street can't make a profit if pension fund is buying an underlying asset versus a Securitized product? Yeah, 100%. Yeah, that's not a bad thing. Greg, have you also in the past talked about how these funds are dumping grounds for crappy wall? That was Max Kaiser. Max Kaiser went on Tucker and completely explained how all that works. That was my true. Yeah. Now don't forget, look, there are structured products that make sense. There are all sorts of things that when you get the alchemist, when I say alchemists, these are the structured product derivatives guys that turn a single B structure into AAA structure like they did on The Big Short and that's bullshit. But there are actually a lot of good structured products that make things more efficient for a large fund. Now, I'm talking a large fund that cannot buy. Remember, if you're a really large fund and you have to own at least 1% of your fund in something in order to justify allocating an analyst time to that particular investment, if you're a trillion dollar fund, 1% of a trillion dollars restricts you to basically large cap everything. Which means you'll never be able to get into small cap anything unless you can do it through a structured product. So understand that there's different ways of skinning that fish, but it's the difference between big money and mom and pop retail money, okay? And you can't apply a blanket solution to everything and then I just want to start by or end by saying this, look, log scale is log scale. Don't confuse it for what it is, but don't say that people are trying to terence, this is not a shout out or a shot at you. It's just saying as long as people understand they're looking at a log scale, they shouldn't call it. It's just a part of mathematics. And log scales mean a ton to the mathematicians. They may not mean a ton to the mom and pop retail crowd. So just, guys, if you break everything down to first principles, mathematics. You break things down into what's a good business and a bad business. I don't know if I'd want to be a bitcoin miner where you have no control over your business, but then you were able to sell stock to the public at an inflated price and feel good about yourself. Look at Argo Blockchain right now. They are living the nightmare of taking capital at the wrong price and deploying it wrongly. And, yes, you're right. There's a lot of hash that will come off of the system. Why? Guys are running rigs because they're trying to generate cash flow. It doesn't mean they're trying to generate a profit. They're trying to generate cash flow. There's a big difference. People understand that difference. Yeah, the thing you said about any business where you can't control your input costs or your price of sale, I had not heard it put quite that way before, but that makes a lot of damn sense. I was like, oh, damn. Yeah, you're kind of right. Which leads me to the next thing. Those businesses might only make sense if they're actually power producers. Amen, brother. Amen. And that's where the world's going. When you see Duke Energy mining bitcoin and stabilizing the grid, you'll understand that bitcoin and its beauty have arrived in capitalist America right now. It was just a precursor and a fucking horror film because it was sold to unsophisticated investors at the wrong price by people that were CEOs of mining companies because they did it in their parents basement. Very simple. Yeah. So when you see announcements like ExxonMobil rolling out this flared gas project where they believe it's going to reduce their greenhouse gas emissions by, like, 63%, they're rolling it out across four countries where they're taking this flared gas. My understanding is they're not actually giving a crap about the bitcoin, just trying to reduce emissions so it looks good on their books. Alexand, respectfully, that's not the energy producers we're thinking about here. We're thinking about the electricity distributors. We're thinking about Shameless promotion of a business I'm involved in. We own peaker plants that are on call. They are not running 95% of the time, but we have capital costs. Don't you think it would be wise for us to figure out how to explain this concept? I've heard the word before, but I'm not sure I understand what it means. It's a peaker plant. Okay. The grid is inherently unstable because the grid and the demand for electricity fluctuates during the day. Right? The biggest electricity draw on a grid is when people get home from work and they turn on their stoves. Electric stoves. They turn up their heat. Electric heat. They turn on their hair dryers because they're going out at night. Anyway, the point is, the grid is set up for maximum demand. But there's not always maximum demand going on in the grid. But it's an ancient technology that needs you to be able to supply that power so that the grid does not black out when everybody goes to maximum demand. So in a given day, if you have 100 megawatt demand or peak demand, 100 megawatt, I'm talking about a micro grid here that's set up for the 06:00 P.m. Draw versus during the day, the true demand from the grid might be half of that, meaning 50 MW. So you have power producers that are primed to provide 100 MW, but only 50 MW is being used during the day or in the middle of the night. So what are you supposed to do with that? You're probably supposed to mine bitcoin to defray your capital costs of building these plants. Now, I talked about a peaker plant. This is a plant that is on call so that when you have a draw because of really exceptionally cold weather or really hot weather in the summertime when everyone's turning on their air conditioners and you have rolling blackouts, that's when the peaker plants come on. But a regular utility is always load balancing during the day just because that's the draw on the grid. So you'll have the Duke energies of the world that are baseload providers, not peakers baseload providers that are going to be mining energy because it helps to stabilize their grid. Why? Because you want demand for when your turbines are turning and no one has demand for it. Well, in Canada, we pay Americans to take that electricity from us. We don't sell it to them cheaply. Alex. We pay you lucky people to take our electricity. How messed up is that versus us mining bitcoin with that excess power capacity, and that is a fact. One of our nuclear generators sells not cells, gives power to the northern peninsula in Michigan, and doesn't just give it to them, we pay them money to take it as well. Well, if that's a good business model, you've rewritten fucking capitalism. Okay? So start mining bitcoin Canada, and get your fucking asses and gear. ", + timestamp: '00:35:14-00:58:57', + topics: ['Bitcoin Hashrate', 'Bitcoin Economy', 'Energy Industry'], + type: 'twitter_space', + weight: 9.1248779296875, + }, + { + boost: 0, + date: null, + description: + "Discussion on how much information investors and promotors knew about how BlockFi (and others) business's worked", + episode_title: 'TOXIC HAPPY HOUR! #Bitcoin is Easy Like Sunday Morning! 🍻😂', + guests: [ + { + name: ' 2140data', + profile_picture: 'https://pbs.twimg.com/profile_images/1598330787778232320/ZVFcRtet_400x400.jpg', + ref_id: 'c8fb52d1-fa69-410d-bf96-8a7559bba863', + twitter_handle: '2140data', + }, + { + name: 'Tomer Strolight', + profile_picture: 'https://pbs.twimg.com/profile_images/1591960241008148481/HtyINxtU_400x400.jpg', + ref_id: '3a2bc97d-072c-4ed9-9a59-17ceeb68fe99', + twitter_handle: 'TomerStrolight', + }, + { + name: ' TC', + profile_picture: 'https://pbs.twimg.com/profile_images/1480160632360124416/AM_vVRko_400x400.jpg', + ref_id: 'dac0717a-a743-40d4-a89f-7523f071bbb0', + twitter_handle: 'publordhodl', + }, + { + name: ' kann b', + profile_picture: 'https://pbs.twimg.com/profile_images/1480160632360124416/AM_vVRko_400x400.jpg', + ref_id: '1170bde7-7f3c-4c4f-a158-5c48a98fe92b', + twitter_handle: 'publordhodl', + }, + { + name: ' Dallas Rushing', + profile_picture: 'https://pbs.twimg.com/profile_images/1602759767029604352/hzuwh5ZB_400x400.jpg', + ref_id: '13fed037-77ce-48eb-9544-25e7abff9395', + twitter_handle: 'dallasirushing', + }, + { + name: ' Lisa Hough', + profile_picture: 'https://pbs.twimg.com/profile_images/1541581547815436288/Li8wORWt_400x400.jpg', + ref_id: '5e154adf-d8bd-4adf-a23b-47a51c183163', + twitter_handle: 'lisa_hough_', + }, + { + name: ' Collectooor of sats', + profile_picture: 'https://pbs.twimg.com/profile_images/1594362077132587009/cNAE2FU5_400x400.jpg', + ref_id: 'c84d0e47-7eeb-419b-a36e-5055b96044f0', + twitter_handle: 'hoardingsats', + }, + { + name: ' Gold Leader', + profile_picture: 'https://pbs.twimg.com/profile_images/1594152783011250176/lHMHv3gB_400x400.jpg', + ref_id: '96c4f802-25ff-4a81-b91f-cae5562bf4a3', + twitter_handle: 'GoldLeader89', + }, + ], + hosts: [ + { + name: 'Publordhodl', + profile_picture: 'https://pbs.twimg.com/profile_images/1480160632360124416/AM_vVRko_400x400.jpg', + ref_id: '5e189a7b-56c3-40ae-834e-4e2ccee3a9ad', + twitter_handle: 'Publordhodl', + }, + { + name: ' Anders_', + profile_picture: 'https://pbs.twimg.com/profile_images/1391477993726529545/xqIjHq5w_400x400.jpg', + ref_id: '15bdd6b9-bdfd-492d-b7bf-c5a56ecadc50', + twitter_handle: 'Anders_', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/0c42d408-e518-4ecf-b282-d864a8c14002.jpg', + keyword: !0, + link: 'https://stakwork-uploads.s3.amazonaws.com/uploads/customers/2707/media_to_local/4e00853b-49e3-4b46-bd13-bf7f2aa25905/56f0089c-a7f2-4b1b-8576-a3e4ddb9791f.mp3', + node_type: 'clip', + pub_key: '034248fa888690a85021cf117c168a535c53b92e1fdf3e4f9cefddfe09118d8207', + ref_id: 'c9e43dce-1fac-4545-be91-7aa8594fa7e6', + show_title: 'PUBLORD', + text: "you're good. I was just going to ask DC or Gold I'm definitely familiar with I would take a decent amount of the details with a lot of these centralized earn yield type of products that all blew up. Do you guys know? Two questions would be one, do you think that investors like Pump or you Scope had full access to know all that they were doing to generate yield on those funds? And if that already has come out definitively, then cool. I just haven't been following that super close and because like I mean with them being a US company, like I figured there'd be access into like seeing exactly what they're doing to earn yield on that even by like investors. Maybe not like super tiny investors, but like if you're there from like if you're a seed guy, like you probably have access to know what they were doing to generate all that yield. Is that can you guys confirm if that was the case? Yeah, I'll take this one. Started proof of keys. Not your keys, not your coin. Listen, here's the problem. Even if McCormick would have said to block by, hey listen, I'm not sure what are you guys doing here? I'd like to have you as a sponsor. Thank you for whatever amount of money you're doing or anyone else that promotes it. Here's what goes on man, for proof of reserves. And it reminds me from the movie The Big Short, all right, if you remember, they go down to the rating agencies saying, what the hell is going on here? What is going on with these bonds? These bonds, you know, are just full of dog shit wrapped in cat shit and then layered with some more dog shit. How are they getting these ratings? And they finally get the lead to admit, listen, if we don't give them the rating. They'll just go down the street to Moody's and get the rating they want. This is exactly the same thing. So we can beat these guys up. Okay? But at the end of the day, there's always going to be another grip, another angle. It's going to be someone else that, oh, yeah, let's start a company. Proof of reserves. All right? We'll get proofofreserves.com, and we'll get all these companies to write us checks. And then when they go out and they want to be sponsored by someone, that person is going to call us, hey, you guys are proofofreserves.com. Does BlockFi have all this stuff? Oh, yeah, man. Yeah. So we're cashing checks from BlockFi and it's proof of reserves.com. We're making a mint until the ponzi blows up. It always blows up. James Ma'am real quick, if I could. Just add one thing on that. I think the question, too, is like, that people should ask is, you're like, okay, this exchange is offering me 6% yield on Bitcoin. You're like, well, where exactly is that yield coming from? Who's paying 6% to borrow Bitcoin? And why would somebody do that? And one of the reasons is that people will borrow Bitcoin to short it, and they'll pay a yield for that. But that 6% is still pretty rich. But I think what a lot of these companies were doing was basically like, for a Bit, you could earn 20% on UST. And so there were companies were probably taking dollar loans against an asset like Bitcoin, and maybe they're paying whatever, 8%, even 10% to borrow those dollars and then trying to go earn 20 over on Terra and then make that gap between the two. And they could pay that out as a yield into Bitcoin. But either way, the problem is, like, all of this sort of set on each other, and a lot of them start to go well, each competitor starts to move it further out on the risk curve, and they're like, well, they're doing it. Maybe we can inch a little bit more, a little bit more. And then by the time a couple of months goes by, everybody looks up and everybody is just, like, waist deep and fucking risk and systemic potential bulbs and stuff. And then there's no way to really unwind that correctly without there being shortfalls and you can't liquidate everything in time. So it's unfortunate that, like, a lot of them felt the need to take on more risk to stay competitive, which ultimately is probably the reason why all of the above kind of blew up. Yeah. James go ahead, man. Let's see your hand up. Hey, good morning, guys. Morning, Dallas. Puppy. Yeah, I just wanted to weigh in on some of the comments regarding I mean, there's a lot that's been said, so I'm going to try and synthesize my thoughts. I'll just start with the Exchange avenue because that's obviously who I work for. There is a palpable kind of steering via the capital stack of the ideas and execution of some of these exchanges. Meaning, like, if you're going to continue to ship coin, your cap table may have some influence on that, which is a real problem. So I just wanted to acknowledge the fact that Lisa, who was just in here, and myself, there are a layer of toxic, extremely, extremely toxic individuals who are working within these what we'll call third generation exchanges that are going to come out of this shitstorm and are extremely adamant about, obviously, for pledge to hold your own keys, but also to provide a level of we'll call it proper fiduciary custody, like a traditional bank does, being bitcoin only for institutionals. So I understand that you should never leave your keys on an exchange, but we're also preparing for governance models where they're not allowed to hold their own keys. So there's a really deep balance and I think that what you're hitting on pubby is important because you can only protect yourself so much reputationally wise in this space. Like TC and Gold said earlier, you should be fucking Ostracized. Like, you really need to understand this is not about this other bullshit, it's about Bitcoin. And there's a huge segment of the market that's going to get captured by an exchange, especially a US regulated exchange, that acts like a real fiduciary for the first time in this space. And they do have proof of reserves and they'll most likely be audited either after IPO or they will give out some kind of information to show their liabilities as well. So it's a complete transition. The fraud and the corruption in this space has just shown everything is getting whittled down and we see it on a regular basis and it's just very exciting to kind of help push that extreme toxicity on some pretty high levels of capital inflow into the space. You made some excellent points there and one I want to highlight was anyone that came in, which is, I know the majority of us, you heard about this thing called Mount Cocks, Mount Cox blowing up. Everybody came in in 2017. You start hearing this thing about not your keys, not your coin. Well, guess what, man, that was being preached. But honestly, aside from a couple of small exchanges, it never really sunk in with many people, all right? Until this year. Until this year, when you started seeing everything unwind, from Luna and Celsius and Voyager, now FTX and Blockbuster, now you're seeing it unwind and you understand what that means. Not your keys, not your coin. And this isn't to say, look, if you're new, yes, practically, you need an exchange to buy your bitcoin. For many people, however, anything else, you're going to do all right with your bitcoin, you can leave it there, not a problem. You just better understand the risk. Here's the assumption you're making that one, they bought the bitcoin. They say they did all right, because it's easily just a number on a balance sheet. That's a good feeling. You log into your account and you see that whole coin you bought. That's great. Your assumption is that they have it. Okay? That's your assumption. And two, that they're going to stay solvent. They're going to stay solvent. It's not going to go away. This is the wild rest, man. And there's a reason, all right? The government obviously is fearful, fearful of an asset class that is decentralized, censorship resistant. Anything they can do that will allow anything conflated with the wild west. They don't care. The more people that lose their money, the more people that lose their money is better for them. Most people are going to find bitcoin or people that are going to stay away from it for the longer time. But I think you have some great points here, man. Yeah, I appreciate it. I just want to make one more quick comment. There are varying. Like, we've sat down on regular basis and formed products and offerings for clients that can help alleviate some of the initial transition. Right. We don't want to hold any of your keys. We don't want to hold any of it. It's a risk to us. We get a withdrawal fee on the way out. We're good with that, man. Have a nice day. Here's your keys. But we do have some smaller options. Like, for example, we can give someone an address on the blockchain to see their funds and literally have them. It's kind of like our pleb level, easy access to verify exactly what's there. But I get it. At the end of the day, the private key is the asset itself. So there's a level of extreme balance between acting as a fiduciary, like a bank, which we're happy to have that bank underneath to provide that further security for people coming in, not having to seek yield from other parts of the business like the exchange, because you have a bank underneath. But it's definitely a really intense issue that's going on right now in particularly, and I'm narrowing this to the we'll call it the institutionalization or the financial end of bitcoin. And obviously we're really excited to help miners out and help all the parts of the bitcoin space. And I couldn't be more happy to be in a community of guys like yourself. Pubby, TC, Dallas, everyone, where this isn't a fucking joke. This is truly something important and I'm ready to lose my job every day going in and speaking the truth. Yeah, here's the hard part, man. You just want to have faith in something. If I could just find faith with one institution in this quote unquote industry. I hate using that term, my God. But like you say, man, we got to slow our heroes. Every month it's another company disappointing us. It's another person that you thought was bitcoin only that is rug pulling shit coining. Whatever. That's the disheartening thing. Dear God, why can't there just be an honest damn company? And you're right. Look, I get it. There's got to be a company that can offer some sort of on exchange solution for clients. Well, you know, develop a company where it's an easy multi safe for someone to handle. I don't know. I don't have all those answers. Until then, I'll just always say my assumption is if I have in self custody, it's not mine. It's zero, it's nothing. It's gone into somebody's pocket. It sucks that we have to be like that, because I know then you get, oh, my God, they're so toxic. Well, guess what? We've seen so many people they're targeting. You get people come in, they came into Celsius, they came into Luna, and they're in the space. Oh, my God. Bitcoin is at what, 20, 30, 40,000, whatever it was at that time, they came in, well, I missed a boat. I got to find this next bitcoin. That's a nickel, because that's my ticket out of here. The system is broken outside. My 401K sucks, so I'm going all in on this thing. That's a nickel. It's going to be $30 next year, and I'll be saved. It's a battle that we love to fight, man. It gives me purpose. Gives me a great purpose in life, is to help people understand what both systems are like, but it's disheartening the number of people that are coming into a space that has genuine intentions to help people and just rug pulling them as well. That's all I have to say ", + timestamp: '00:55:59-01:08:18', + topics: ['yield generating products', 'investor disclosures', 'influencer marketing'], + type: 'twitter_space', + weight: 8.947233200073242, + }, + { + boost: 0, + date: null, + description: 'Current bitcoin mining energy situation in Kenya', + episode_title: '#Bitcoin Kenya 🇰🇪 - meet the Kenya Bitcoin community', + guests: [ + { + name: 'Noelyne Sumba', + profile_picture: 'https://pbs.twimg.com/profile_images/1585949523901292545/tWf-IwWO_400x400.jpg', + ref_id: '44455b1d-76cf-49df-baa0-cd606652885b', + twitter_handle: 'noelynesumba', + }, + { + name: 'Okjodom', + profile_picture: 'https://pbs.twimg.com/profile_images/1577811376487088128/J2Z4nIgI_400x400.jpg', + ref_id: '4c9df92d-3bb5-4d08-9a7e-a9ba15f58f03', + twitter_handle: 'okjodom', + }, + { + name: 'Master Guantai', + profile_picture: 'https://pbs.twimg.com/profile_images/1521025685078302720/w9dZwehS_400x400.jpg', + ref_id: '64c326c4-d4a9-4e6c-82fe-0c9bac8a7094', + twitter_handle: 'MasterGuantai', + }, + { + name: 'Lorraine Marcel', + profile_picture: 'https://pbs.twimg.com/profile_images/2361719231/German_sheperd_Puppies_400x400.jpg', + ref_id: 'ab30679d-7931-4921-a4f8-6fee74e412c8', + twitter_handle: 'lorrainemarcel1', + }, + ], + hosts: [ + { + name: 'Mary Imasuen', + profile_picture: 'https://pbs.twimg.com/profile_images/1465290507752558596/lZVbU9np_400x400.jpg', + ref_id: '2d8ed8ce-5112-4dfa-9aa2-5fa8b874af68', + twitter_handle: 'mary_imasuen', + }, + { + name: 'Lukas Poland', + profile_picture: 'https://pbs.twimg.com/profile_images/1382603302160932865/RgeQnCXM_400x400.jpg', + ref_id: '217a2c5a-1cfd-4840-bbff-eec43da8c52f', + twitter_handle: 'duczko', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/56bbafde-60ef-4e4b-b930-978429c6a635.jpg', + keyword: !0, + link: 'https://stakwork-uploads.s3.amazonaws.com/uploads/customers/2707/media_to_local/9f2ebf6e-a880-4579-986c-ff0c9c517559/2cb59251-775d-4691-9c8f-30fb9d7707b9.mp3', + node_type: 'clip', + pub_key: '02574d6e8e787372184b6f17c40d6c6fe1777db9015801f95dfd24692784d767cd', + ref_id: '3dff5b59-31e0-4ce9-8add-c8a2ba564259', + show_title: 'Global Bitcoin Fest', + text: "so much for sharing. That sounds like a lot going on. How many people do you usually get to those meetups? Okay, so we have we it changes from 30 to 50. 30 to 50 people. Whoa, that's a lot. But part of it at our class, like the class and then the others are newbies and then we have the speakers and of course just anybody else in the bitcoin community. Okay, do you get swamped with bitcoin or so you manage to. Yeah, they come. But here's the thing, I am not that kind of a person who blocks people from getting to these meetings because at the end of the day, I want them to see why bitcoin and not shit coin. So I don't like tend to block people from coming to our meetups as long as you understand this is about bitcoin and not sheetcoin. So I find it important for them to learn and understand why we are advocating for bitcoin and not the sheet coins that they are probably participating in. And I have students, I can tell you for a fact, I've had students who are actually participating in shit coins. And they come, they listen, they learn, and they're like, okay, I'm just going to drop these and focus on bitcoin. So, yeah, so that's my approach. That's the female approach. Awesome. I guess most of us have been there, at least for sure. I was the shit corner, and I think that's the past many of us walk through. So I feel sympathy for the people in the shitcoin game. As long as they're not the main shillers, I feel sympathy. Exactly. So, Gridless, I'd like to hear a little bit about what you guys are doing with mining. And yes, could you share a little bit about that? Yes. So what we do is we find mini grid developers who are in rural communities who have overbuilt their mini grid capacity. So they have for instance, I'll just talk real numbers. There's a site in Morgana about two and a half hours outside of Nairobi that has a 50 kilowatt mini grid that was built a couple of years ago. The community only needs 30. It during the day, and then at night, between six and 10:00 p.m., the usage goes up another 10. So what that means is throughout 20 hours of the day, there's 20 kw available for use. And it's not being used, it's just being dissipated as heat. And that means that the developer, the mini grid developer isn't getting the full amount of revenue that they could get. And during those other 4 hours between six and ten, there's still 10 kw that are not being used. So what we did is we went, we walked in and we did a deal with them to buy that extra capacity as a buyer of last resort. It's just stranded electricity. And then what we do is we put in six minors in that case, because each of them takes about just over 3 kw. So we put six miners in that location on site and just started mining. The effects of that are pretty interesting in that, first of all, the sustainability of the business for that mini grid developer increases. It means they have full usage all the time. We can curtail our energy use within minutes and we can do it remotely. So it's automated even. And the plan is that we can continue to grow with other mini grids like this. So some of them will be small, 50 kw, like where we are. Others will be larger. 500 kw is the next site that's actually, we're about a third of the way built out with miners on it this week. And it might get even larger than that at some point. But really we focus on these smaller mini grids that don't have any grid connection back to the main national grid. And so it really helps strengthen them as a business. Sometimes I can't promise this at all, always happen, but at least in this case it has. Because they're getting the returns from us and being able to utilize their energy at full capacity, they can lower the cost of the energy for the people in the community. So in this case it dropped from about 1000 shillings per month per family, so household group to around 400 shillings per month. And so it's a sizable decrease in costs for a rural household. And it means that they can go from just first when families get this, they put on Led lights and then the second thing they do is make sure they can charge their phones. And then after that, if they still have some extra disposable income, they might look at buying a television or refrigerator or something like that. But what they can do is slowly, over time, this usually takes five to ten years. That community increases the amount of power they need. And with our set up and the way we've done, our business relationship with the mini grid provider is that we can just decrease the number of miners that are on site and move into a new location. So the community always comes first for power. That community means both households and local businesses. And then we come third. And then if the community and businesses increase, then we decrease. Is that clear? Does that make sense to everybody? Yeah. This sounds like the perfect model to showcase for all the bitcoin haters and energy use. Haters basically empowering local communities through bitcoin mining. What's the model? Do you buy the energy from them? That's right. We go ahead and structure a deal with the mini grid provider. So obviously we get a wholesale rate because we're coming in and buying the stranded electricity that nobody else can buy. But it is still significant enough because we're utilizing that excess energy 24/7, that it makes a significant impact on their business. Who is we? This is what we as gridless. So I should make sure everybody understands this too, that with hydro and possibly geothermal, but we're not doing that yet, that's 24/7. So it's very efficient power. As we look at the models for mining, however, if we look at solar and wind, it has a lot more variability in that the sun doesn't shine at night and the wind doesn't always blow and we can't just go put storage, battery storage in place for those dead times because that increases the expense significantly to install. So mining in those locations is a little different. You can still do it, but your return on investment goes from, you know, twelve to 15 months to maybe three years and and so you have to think a lot more you know, you have to think a lot more creatively about how you solve for solar and wind, but hydro and geothermal are particularly good for this. And how large is the market? How many minute grids are there in Kenya would you estimate that need this service? Yeah, so our estimate in East Africa, most of this Kenya, is there's about 200 stranded energy, renewable energy. Now, not all of that is going to be super useful because some of it's solar and wind. But even within the hydro mini grid space, there's a significant amount. So one of the things we did, we announced at the Africa Bitcoin Conference this last week was the Green Africa Mining Alliance. You can find out about it by going to just Gamma Africa or on Twitter. It's gamma underscore Africa. And the reason we did that is because there is a few other miners in Africa doing either on a small, very small kind of grassroots scale, like Carbon Coin is doing in Nigeria, or larger, like we see with Sebastian and his crew doing it called Big Block Data Center in the Congo. So there are a couple of people doing it in different stages, and we need more of it. Even as Grid list, we can never do all the mini grids that need this, even in East Africa, much less the rest of Africa. So Gamma is really about trying to get more people mining across Africa and creating a place that they can go to understand it, find help, be connected with good mining resources, including the people who sell it so they don't get scammed on buying the actual miners and then understanding what models work. What I'd like to see as well with Gamma is that we provide a body of knowledge and data, real information from the mining sites that can be helpful for policy and regulatory bodies as they start to make the rules around this across the continent so that they're at least coming from a position of information, of knowledge, not of ignorance. So, yes, what I'd like to do in the future is create a way that people can get real information and start their own mining. That's super awesome. Angola seems to have a fairly thriving mining community. Maybe I don't know if you're in contact with them in orland okay, yeah. Thank you. So I'd like to highlight I got to meet Eric in Ghana. Eric, thank you for the Tshirt. I really loved it. So if anyone saw the video that's the Gamma Tshirt Eric is talking about and maybe I'd just like to highlight the importance of what I saw Griddless is doing in Kenya. And so just recently there was news that came out that our solar electricity distributor is about to start billing people, that is, electricity consumers in dollars, Euros, and other foreign currencies. So this is because of the Depreciating Shilling. And of course, it's a bitching shortage of forex in the domestic market. So with this, we have companies like Gridless giving us a solution for cheap energy. And I think it's going to be a game changer for Kenya. For example, just today, I did not have power for a few hours before this space started. And I was worried, I was like, come on, what's happening? And it's been happening in terms of power shortages. So I think gridlock is doing a wonderful job and if Kenya can be able to receive cheap energy, then yes, I understand it's necessary. Thanks Darwin. What I hope we can do too, speaking to that is let me give you a story. So if you guys remember here in Kenya two weeks ago, we had a nationwide power outage for 5 hours and the people on the mini grid didn't lose power, the people that were on the main grid did. And so there's something interesting that's going on that's counterintuitive about national grid connection versus microgrid or mini grid connection. And I think especially for people in rural parts of the country, it becomes really interesting when you can start pushing electrification to the edges, making it less expensive, more available and more reliable than the national grid. And I think that bitcoin mining is the thing that can actually drive that. It's that silver bullet that was missing from it. Most people don't realize this, but any mini grid operator of any type, whether it's hydro or solar or wind, has had a real fight to be sustainable in this country, sorry, not even just in this country, across East Africa. So bitcoin mining as a buyer of last resort that's geographically agnostic, can go anywhere, I think can solve a lot of those issues and increase the connectivity and electrification that's needed in the country. So, ", + timestamp: '01:28:52-01:41:46', + topics: ['bitcoin mining Kenya', 'bitcoin energy', 'Gridless Kenya', 'Kenya National grid'], + type: 'twitter_space', + weight: 8.81690502166748, + }, + { + boost: 0, + date: 0, + description: 'What is a speedy trial?', + episode_title: 'Taproot Activation Q&A with Bitcoin Devs - TABConf 2021', + guests: [ + { + name: 'Andrew Chow', + profile_picture: 'https://pbs.twimg.com/profile_images/1452266201770496010/44FHCtZM_400x400.jpg', + ref_id: 'f96d87ca-5060-4021-aeb9-61db03312027', + twitter_handle: 'andrewrchow', + }, + { + name: 'Ben Carman', + profile_picture: 'https://pbs.twimg.com/profile_images/1550704386007089152/pLwUSeff_400x400.jpg', + ref_id: '1d1e95ba-b4af-415f-aafe-85c6dd7571b8', + twitter_handle: 'benthecarman', + }, + { + name: 'Matt Corallo', + profile_picture: 'https://pbs.twimg.com/profile_images/697361498587451394/_rX0-O0W_400x400.png', + ref_id: '08cb3c45-c0bc-4a60-ae5b-a1283d352c8b', + twitter_handle: 'TheBlueMatt', + }, + { + name: 'Pieter Wuille', + profile_picture: 'https://pbs.twimg.com/profile_images/1264051937172836353/n7gHdLbB_400x400.jpg', + ref_id: '40260d2f-3480-47d6-8515-d2e780901273', + twitter_handle: 'pwuille', + }, + { + name: 'Vivek Kasarabada', + profile_picture: '', + ref_id: '60ed22d0-8cf3-410e-8a7c-9c343ae109ca', + twitter_handle: '', + }, + { + name: 'Murch', + profile_picture: 'https://pbs.twimg.com/profile_images/1269477743525130241/-U843Cmt_400x400.png', + ref_id: '3e2c1c73-a057-4475-9782-3bb0d3d8cc62', + twitter_handle: 'murchandamus', + }, + { + name: 'Andrew Poelstra', + profile_picture: 'https://pbs.twimg.com/profile_images/1316562683009921024/FSscAYvJ_400x400.jpg', + ref_id: '15fb9c53-c988-4af1-bbf0-4832d71b0a01', + twitter_handle: 'Blockstream', + }, + ], + hosts: [ + { + name: ' TABConf (The Atlanta Bitcoin Conference)', + profile_picture: 'https://pbs.twimg.com/profile_images/1596233571521499138/YE8Us_Ml_400x400.jpg', + ref_id: 'eb1b6016-6223-4b2b-9264-2423ce66304f', + twitter_handle: 'tabconf', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/e7d2a4ca-6b44-4a45-a94c-6f48987979f7.jpg', + keyword: !0, + link: 'https://www.youtube.com/watch?v=MrxtqAlRI2U', + node_type: 'clip', + pub_key: '029099ec31eb33594611dc47d5c93de2c1aa86918e3a36b408c14a500601c8bc9b', + ref_id: '88a4665a-7414-4ccd-96e4-3fb43f93d9bc', + show_title: 'TABConf (The Atlanta Bitcoin Conference)', + text: "For context, maybe we could explain what Speedy Trial is. My understanding is it basically allows you to put a delay between activation and signaling, but there's also a way to back out if things seem to be going wrong. The activation mechanism we have used previously for CSV and SegWit was called Bit nine version bits. Speedy Trial is a modification to this where we have the start time of the first signaling period was really soon after the parameters had been finalized. And this allowed us to then see very quickly if nodes and minors were upgrading and then were starting to signal for Taproom. And one of the other key features in the speedy trial is that we added a minimum activation height. So this allowed us to delay the activation to a height in the future once there was enough signaling and the software cab locked in. So what this allows us to do is we can see whether Taproot would fail really early on and if it would fail, then it would fail quickly and we could try a different deployment method. I'd rather mention the end time. So the end time for the signaling was also fairly short. There was a whole period of about three months, but we activated it in like four weeks. The lock in was after was it. The second or a third signal? It was a third, I think. Anyways, we have a minimum activation height so that in between the the lock in time and the actual activation time, that's when everyone can upgrade. Everyone knows that Tap Rout going to happen and so they can be ready by the time we reach that minimum activation height. And so for Taproot, that minimum activation height is that 709,000, whatever. So here a small call to action. If you're running a full node and you're not running one or 22.0 or a newer version than that, you might want to upgrade when you get home immediately. Go ahead. ", + timestamp: '00:05:16-00:07:48', + topics: ['speedy trial', 'minimum height activation'], + type: 'youtube', + weight: 8.499536991119385, + }, + { + boost: 0, + date: 1632355200, + description: 'The overview of the current state of the ASIC Bitcoin mining hardware market', + episode_title: 'The ASIC Mining Hardware Market', + guests: [ + { + name: 'Vincent Zhang', + profile_picture: 'https://pbs.twimg.com/profile_images/1158285609196109825/fuB-e6lm_400x400.jpg', + ref_id: '98e7bc98-3a3b-4ddf-9b48-5dcd78973739', + twitter_handle: 'Whatsminer_MBT', + }, + { + name: 'Vincent Vuong', + profile_picture: 'https://pbs.twimg.com/profile_images/1260974518547312640/n47yvbNL_400x400.jpg', + ref_id: '8390e230-e36b-4e0d-9f5d-70c6635bf3c2', + twitter_handle: 'BitcoinVincent', + }, + ], + hosts: [ + { + name: 'Will Foxley', + profile_picture: 'https://pbs.twimg.com/profile_images/1580970227193376776/9oQfeExj_400x400.jpg', + ref_id: '704b9e82-3e40-40b6-874c-6bb8fadafbef', + twitter_handle: 'wsfoxley', + }, + { + name: 'Zack Voell', + profile_picture: 'https://pbs.twimg.com/profile_images/1595803006737448961/fFrf7VJb_400x400.jpg', + ref_id: 'e32c7661-c635-4089-a620-ffce509eff0e', + twitter_handle: 'zackvoell', + }, + { + name: 'Compass Mining', + profile_picture: 'https://pbs.twimg.com/profile_images/1425165074373791744/f2CgInvP_400x400.jpg', + ref_id: '812e5d37-47fb-4077-915f-df52e2ef84d8', + twitter_handle: 'compass_mining', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/ae91fac6-a1af-4877-9a92-e793d556ee66.jpg', + keyword: !0, + link: 'https://www.youtube.com/watch?v=qKeUCNXa4Uc', + node_type: 'clip', + pub_key: '03c18d0c6c35333f22bc524e21a5fd1d2d9886f5d4d958dc1de95d025de5c84cfc', + ref_id: '198dfd3b-7d1b-422c-b118-48520629af43', + show_title: 'Compass Mining', + text: "kind of want to kick off the general ASIC market conversation with us today with just like a general question on an update or an overview of the current state of the market. Like, if you look at price charts for the assets themselves right now, you see a little bit of selling activity over the past couple of days, maybe a little bit of fear, some dicey news coming from different regulators around the world. But if we focus on the hardware market, like if you were to give sort of a concise update on the state of Bitcoin mining hardware right now, what does the market look like? What are some key data points or movers and shakers jostling for leadership positions? And whatnot in this slice of the market? What things sort of stand out to you? Vincent from Compass I'll toss it back to you and then vincent from what's? Minor also, for sure. I appreciate that. I personally see that. I think in July we saw a lot of people had excess inventory, but we slowly starting to see markets pick back up again, especially with the coin wrapping up. Even with that slight dip down to 42K ish, we haven't seen too much selling and too much decreases in hardware. Typically. I spoke about this on an article with Coin desk where the asics generally don't go down in value as quickly as they go up in value. And we're starting to see that a bunch of public companies are making large announcements about picking up machines for Q two, Q three, Q four of next year. And for me, I think that it's extremely bullish because there's a lot of equipment that is on the secondary markets that these publicly traded companies can't touch. And so that's why it's going to be an interesting little bit. They're basically just purchasing from the manufacturer when sometimes specifically in July and August, the secondary market was cheaper than what was on the threat from the manufacturer. And I think that once people realize that and they realize they need to take advantage of all these areas, it's going to change how people procure their asics. That is interesting. Yeah, we saw a lot of heat on secondary markets there. Vincent, from what's minor? Same question to you. When you look at the ASIC market in general right now, what's the status of the market? What are key things that you see that stand out to you? Yeah, so market so in this year actually changed a lot. So we have to say change a lot. And the first change, so what I can see is actually this change happened since last year, not only this year, but this year, the trend was enhanced. So what I observed is the capital from North America and Europe. So they invested huge since the year 2020. So the big players, they sign agreement, longterm agreement, either with us or with Bitmen, and the procurement plan and quantity is really huge. And so the trend was changed, even enhanced this year, because this year, the investors in China, they were not able to put the Arctic minus in China mining further. So some small players doing mining in China, however, the large data center, all of them are almost closed and the regulation and the policies becoming more strict. So the investors from China, they reduce procurement quantity in big quantity. So we have to say more miners are moving outside of China and we can see that. So more miners are actually purchased by the investors outside of China. This is number one. Number two is that right now the big players, they prefer purchase the minus in advance. For example, as Vincent said just now, big players, they even purchase the supply of the in the year to some 22. Okay. Q. Two. Q two. Q three. Q four. They have the contract with us or with some other purchasers. So they prefer purchase even more than half year earlier than the supply time. And so, however, we are not saying the minus in stock are not able to be sold out. So some small and medium investors, they are trying to access to the minus available immediately. And this is not a small portion. So also big quantity can be traded. And also the Easter miner. So in the month of May and June, so the Easter miner becomes really cheap due to the regulations published in China. However, it's recovered very fast. But what I can see is probably from October, November onwards. So if bitcoin price will not have a significant increase or growth, I think the price of the miners may drop down. And another point is, so right now we can say the vendors like us, ask hardware providers like us. So we will prefer have long term cooperation with big players and investors. Okay, so you can see that right now, the sales policy from asik provider vendors also change a lot comparing with a few years back. It is totally changed and slowly it is not becoming the vendor market. So also it is well balanced right now between the vendor market and the purchase market. Okay, so these are the observations I can share. ", + timestamp: '00:07:45-00:15:02', + topics: ['ASIC', 'Bitcoin Mining Hardware Market', 'markets'], + type: 'youtube', + weight: 8.467833996035228, + }, + { + boost: 0, + date: 1671029781, + description: 'Aftermath of the crypto market crash: Financial standings of DCG and Genesis', + episode_title: 'Café ₿: GBTC was the Genesis of the Crypto Contagion w/ @samcallah', + guests: [ + { + name: '@StackchainSig', + profile_picture: 'https://pbs.twimg.com/profile_images/1589791699571802117/n_Y1Qm7J_400x400.jpg', + ref_id: '6e652629-38ec-49d8-9f5c-3ba28f80c799', + twitter_handle: 'StackchainSig', + }, + { + name: '@Meditation_Man', + profile_picture: 'https://pbs.twimg.com/profile_images/1597303881339314176/kFqDWvq0_400x400.jpg', + ref_id: 'cf7119ec-50a5-4ba2-a9a6-4a24835f3364', + twitter_handle: 'Meditation_Man', + }, + { + name: '@TomerStrolight', + profile_picture: 'https://pbs.twimg.com/profile_images/1591960241008148481/HtyINxtU_400x400.jpg', + ref_id: '7af639f8-8c5c-4ce1-a43b-e8560ed40e2b', + twitter_handle: 'TomerStrolight', + }, + { + name: '@2140data', + profile_picture: 'https://pbs.twimg.com/profile_images/1598330787778232320/ZVFcRtet_400x400.jpg', + ref_id: '190b5001-a42a-46cc-b0d3-b6f74c625648', + twitter_handle: '2140data', + }, + { + name: ' @samcallah', + profile_picture: 'https://pbs.twimg.com/profile_images/1502454836981166082/cQG0YQxc_400x400.jpg', + ref_id: 'ee5d0119-780d-4539-9b84-83025e95c03f', + twitter_handle: 'samcallah', + }, + { + name: '@sonofsats', + profile_picture: 'https://pbs.twimg.com/profile_images/1593080311000211456/Dr_NQ9Iw_400x400.jpg', + ref_id: '07f15eea-1f9a-41bc-b974-ffd370885708', + twitter_handle: 'sonofsats', + }, + ], + hosts: [ + { + name: '@alexstanczyk', + profile_picture: 'https://pbs.twimg.com/profile_images/1539055022364708864/rwErK6x1_400x400.jpg', + ref_id: '6455df34-1abc-4ce8-9bb8-b02d411accec', + twitter_handle: 'alexstanczyk', + }, + { + name: '@SwanBitcoin', + profile_picture: 'https://pbs.twimg.com/profile_images/1491428856858914820/aFlitvha_400x400.jpg', + ref_id: 'da3f56bf-9763-4389-a9ec-d807049bd0b8', + twitter_handle: 'SwanBitcoin', + }, + { + name: '@pacificbitcoin', + profile_picture: 'https://pbs.twimg.com/profile_images/1570140686753619970/UFEnzSv5_400x400.jpg', + ref_id: 'f8268a26-9761-40c1-bdd6-dad9db44d032', + twitter_handle: 'pacificbitcoin', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/239722cb-4216-414a-a17b-5adf9d52e15a.jpg', + keyword: !0, + link: 'https://stakwork-uploads.s3.amazonaws.com/uploads/customers/2707/media_to_local/75d674de-3859-49f5-abcd-927017e3a24f/b763dc91-acba-4530-9c22-88fea8193185.mp3', + node_type: 'clip', + pub_key: '029099ec31eb33594611dc47d5c93de2c1aa86918e3a36b408c14a500601c8bc9b', + ref_id: '7b90a2ff-ac29-43a9-9911-0eec916e3088', + show_title: 'Swan.com', + text: "happens to DCG? What happens now? Are these guys in trouble? What do you think? DCG and Genesis are definitely in a tough spot right now because basically they basically have huge holes in their balance sheets from having exposure to all these blow ups. Genesis had exposure to three AC. Like I just said, they also had maybe the worst trade in history when they traded $1 billion worth of Bitcoin for $1 billion worth of UST with the Luna Foundation, which basically went to zero. So they gave, like, the hardest money in the world for an Elgo stable coin. And so they got crushed on that. They got crushed on three AC, and then they had 175,000,000 trapped on FTX when that collapsed. And so Genesis has a huge hole in its balance sheet as well as DCG, because DCG actually bailed out Genesis after they blew up from three AC. And then DCG has been kind of they have a ton of debt on their balance sheet now after they did that. So essentially, they took on that Three Arrows Capital loan, that $1.1 billion hole on Genesis. They basically just assumed it on their balance sheet. And then they also took out a $575,000,000 loan with Genesis to basically try to buy more GBTC shares themselves to try to prop it up. And if you look at, like, their buys, you can just look at their SEC filings. And when they bought the GBTC shares, they're down about 77% on those GBTC purchases themselves. Basically, the problem is liquidity here, where Genesis needs liquidity to fund withdrawals and pay its creditors. But they don't. They have all these, like, long term investments on their balance sheet. They basically have a ten year loan to DCG. So that's not like a short term that's not liquid. And they also have a lot of GBTC shares which aren't really liquid for Genesis or DCG, because there's a rule where if you are the issuer of a security like Genesis or DCG, you can't sell more than 1% of the outstanding shares for every quarter. And so right now, DCG owns 66 million shares of GBTC. But according to that rule, they can only sell about 6 million or 7 million shares a quarter. And so that's why it's extremely ill liquid right now that they have all this GBTC on their balance sheets. And so basically, they're desperate for cash. And DCG owes Genesis $1.7 billion, and they're both trying to fill that hole. And so, yeah, the question becomes, what happens to DCG? What options do they have? What does it mean for GBTC holders and what does it mean for the price of bitcoin? And there's a lot of options they have. They can sell GBTC shares. But it's like I said, there's a rule about it. And I think they are doing that right now. I think that's why you're seeing the discount widen right now. You're seeing Genesis and DCG probably selling what they can, according to that rule, to try to raise cash. But again, that's not even close to the $1.7 billion hole that's in their balance sheet or just that they owe to Genesis in terms of DCG. And so that's not enough. So what else could they do? Well, DCG could raise funds. It was previously valued at $10 billion. It'd probably be a fraction of that today because that was at the top of the bull market. And so there's still value in DCG. They have a giant venture portfolio, and they can kind of leverage Grayscale itself. So Grayscale still brings in $300 million in fees a year. And so they can leverage that annual revenue to try to raise funds, to try to raise cash, essentially, so they can leverage those future cash flows. And then they have assets like CoinDesk and Foundry. They have those GBTC shares. That's about 10% of the total supply right now. They have those. They can leverage those to raise money. They also have bankruptcy claims at three AC and FTX and elementary Research. You don't know what's in that value there, but there's probably some residual value in those bankruptcy claims. And so they can leverage all those assets to raise capital. But again, that's probably not enough. And then the next thing they could do is they could sell the assets themselves. So there's a rumor that they could sell Coin for $300 million because they have consensus conference, and they actually make like 50 million in annual revenue at Coin. So they can sell that asset. They could sell Grayscale itself to another sponsor, and that would probably bring in like 400 to 500 million. But again, it's still probably not enough for them to fill the hole. And why would they sell Grayscale the trust? Because it would basically put them out of business because that's their big cash cow. And so they would basically sell the trust to raise all this money to try to stay alive. But then why even stay alive? Because you just sold your main cash cow. The next thing they could do is they could restructure the loans. And so they have a bunch of loans with Genesis and you could restructure the loan so that both parties could have more runway. And so it's the best interest, kind of, of both parties to negotiate a deal to allow both parties to avoid bankruptcy. And so you can do a lot of different things. It could raise a little bit of money for the reasons that I just said, and they could give some of that to Genesis to kind of help them pay off their withdrawals and stay alive a little bit. The Genesis creditors could roll their debt into DCG warrants so they can have a senior claim on the cash flow from GBTC. There's a lot of different ways they could kind of negotiate their debts to try to keep themselves alive. And I think that's probably what's happening right now. It's probably quiet. They're trying to figure out how they can kind of manage this and all of these things, like selling off the trust to a different sponsor, that wouldn't affect GBTC holders at all. I mean, that would just change the sponsor and none of that would affect GBTC shareholders. Now, what would affect GBTC shareholders if they seek something called Reg M exemption? And so if the SEC approved this, grayscale would have to apply for Reg M relief, which would allow GBTC shareholders to redeem their shares for the underlying assets at a one to one ratio. And so it basically eliminate the discount to NAV overnight. And so that 45% would disappear. GBTC shareholders would be able to wait. Let me see if I understand this right. You're saying that under Reg M, they would redeem in kind, meaning shareholders would get the bitcoin. Yeah, if the Sac allowed that, they would have to basically approve in kind redemption for shareholders to take custody of the underlying bitcoin. But this would pose a lot of challenges for GBTC shareholders because a lot of it is in those retirement accounts that aren't legally allowed to hold spot bitcoin. But they could redeem at one to one in cash, too. So it wouldn't be the worst thing for them either. They would just get cash, but it wouldn't be a 45% discount. Then it would be a wow, that. Actually seems like a pretty reasonable solution. Yeah, no, it is. It would be the best solution if you're a GBDC shareholder. Right? Yeah, I would definitely say that. I just don't think it's going to happen because Reg M exemption and an ETF approval are pretty much the same thing. I mean, you're basically giving Grayscale the ability to create and redeem shares simultaneously. And so it becomes political, where the SEC would be seen as supportive for the cryptocurrency industry in the wake of the FTX collapse. In other words, screw the TBDC shareholders. Like, screw all you guys. This is important to us politically, so you're just going to have to suck it up. That's messed up. Yeah, exactly. Yeah, that's exactly what's happening. And so they could do that. I just don't think it's going to happen. Now, here's where it gets interesting, is because there's no reason why Grayscale can't offer redemptions today. And if they actually cared about GBTC shareholders, they would allow that. When you say offer redemptions, what do you mean by that? Like, redemptions in kind or what are you talking about? I'm talking about redemptions in kind. So back in 2014, actually, the trust was doing this. So it was allowing the issuance of shares and the redemption of the underlying bitcoin. But then they got a cease and desist letter from the SEC, and this was kind of finished in 2014, where they had to stop doing that. Ever since then, they haven't allowed redemptions because they got a cease and desist. They're like, hey, you're not need cap. You're violating reg. M. You can't do that. And and Grayscale was like, okay, but the key point here is that it's only a violation of Reg M if Grayscale is issuing and redeeming shares at the exact same time. Now, when the premium was there, they were issuing shares like crazy because all these institutional investors were putting on this trade. And Grayscow, can you unpack that? I'm sorry to interrupt you there, but what does that mean at the exact same time? It doesn't make sense to me. What does that mean? So, like I said, an ETF can issue and redeem shares at the same time to keep the trust in NAV. That's what I mean. Right? So that's what I mean by at the same time. They can basically fluctuate and redeem and issue it at the same time. Right. And so after they were doing they got the cease and dislike from the SEC, they were essentially only issuing shares. They weren't redeeming the shares anymore. Hey, Sam. Sam, why does the SEC zero in on that particular issue? To determine that something is an ETF versus not. That's just a rule from the Exchange Act, where it's just only certain securities can do Reg M, essentially, where they issue a redeem. Usually it's like Treasuries and money market funds and things like that. It's just in the laws since the 40s or something. 30s or 40s. What we're trying to zero in on is why. I don't understand that part. We don't have to get yes, it. Doesn'T honestly, yeah, it doesn't seem important. Let's move on. They were issuing shares like crazy when they were putting on a premium trade. So they created 422,000,000 shares from January 2020 to March 2021. Now, once the premium trade disappeared, they haven't issued or created any new shares, so it's stuck at 692,000,000 shares. And so since they aren't issuing shares, they can allow redemptions right now legally. And this would close the NAV to discount almost overnight, because all of these GBTC shareholders, the accredited investors, would be able to basically have a reverse arbitrage where they could sell GBTC or redeem GBTC shares for spot bitcoin underlying in the trust and take that bitcoin and then sell it for dollars and collect the difference in the discount. And so you would see that discount get armed away extremely quickly if DCG or Grayscale just allowed redemptions. And they could do it legally. There's literally it's kind of an administrative thing, basically. If I understand right, they would have to make a filing with the SEC and say, we're no longer issuing shares, we're now redeeming shares. And at that point, they can just go ahead and do it. Yeah, exactly. Honestly, the negative to the sponsor would be that they can't collect the 2% on the value of the underlying asset. It starts to erode their assets under management, so to speak. That's exactly right. That's why they're not doing it, is because as people would redeem the bitcoin, it would be less bitcoin in the trust and that would lower their fee and that's their cash cow. And so the premium trade added bitcoin to the trust and it also added a ton of buy pressure to spot bitcoin, because people would put on this trade and the bitcoin would go in the trust and it would never get sold, it would just sit there. But if they allow it to happen. So they're trying to figure out right now, how do we stay alive without losing the assets under management, which is bitcoin? It's ideal for them to keep the bitcoin in the trust, basically, because, by the way, 2% is a gigantic amount on these assets. Oh, yeah. That's another reason why you can be critical of DCG, because the Toronto ETF is a 1% fee, and then there's another similar Osprey bitcoin trust, that's zero point 49% fee, and there's no reason to have a huge management fee for these trusts. I mean, it's a gigantic cash cow. It's unbelievable in the gold world. If you were to compare it to the largest ETF in the gold world, which is GLD, I think the sponsor collects 15 basis points or something like it's some really small amount. But the point is that if it's worth tens of billions of dollars and it starts to turn into some real. Money yeah, it costs, like, less than $1,000 to set up a trust. And basically all they have to do is collect the bitcoin, but then they just, like, give it to coinbase. So they don't really do anything. They literally just sit there and collect the 2%. Yeah. Depending upon how you manage it, the operational cost of administering one of these things could be like 100 grand plus a month. But, I mean, that's a drop in the well compared to the well collecting. It's unbelievable. Yeah, but you have to understand, like, redemptions. If they allowed redemptions, it would be good for GBTC shareholders, it would be bad for spot bitcoin holders, because, like, I said they would put on this trade where they would redeem GBTC shares for spot bitcoin and then sell the spot bitcoin to collect the difference. Where's the premium pressure in the market right away, basically. Yeah, exactly. They would meet in the middle, so the premium would meet in the middle and the spot would go down. Meet somewhere in the middle, right? Yeah. I mean, the discount would go to NAV, so GBCC holders would love it. But the reason that's happening is because the bitcoin is leaving the trust and theoretically, those institutional credit investors would sell that bitcoin to collect the discount that currently exists. So whereas the premium trade added a ton of buy pressure to spot bitcoin, if they added redemptions, it would actually add a lot of sell pressure to spot bitcoin. That's assuming that they want to hold dollars in the end, though, right? Yeah. That is assuming as the discount. There'S going to be an arbitrage. The bottom line is, if somebody can arbit and collect a spread, they're going to. Right? I mean, that's just going to happen. What is the fiduciary responsibility of the trust? I guess my question is, is there any conflicting fiduciary kinds of responsibilities at this point during whatever this process that you're talking about is going to happen? Yes. I mean, this is why there's been a recent lawsuit that just got filed by Firtree saying that Grayscale basically breached the trust agreement by not allowing shareholders to review relevant documents, as well as not allowing a redemption when there's no legal reason for them not to allow it. And so I'm not a lawyer, but they're getting sued for potential mismanagement or wrongdoing of the trust because they're basically hiding behind this idea that they're going to get approval for BTF, because that would allow the discount to disappear, but then it would also allow the bitcoin not to leave the trust. And so it's their best option. Right. It's the best option for GBC shareholders, but it's also the best option for Grayscale because they would get to keep their AUM, but they keep getting rejected. Right. And the SEC just had a response on December 9 that basically was very like they were just like, this isn't happening, is how I would summarize it. And so Firtree, in that lawsuit, they're saying they keep hiding behind this idea that they're going to get approved from an ETF and that's why they're not allowing redemptions right now, but it's not going well and GBTC shareholders getting hurt for it. Yeah, that seems like a pretty bullshit excuse because we're going to become an ETF, therefore we're not going to I mean, that's pretty bullshit, obviously, to me anyway. And the way they kind of change the trust charter over the years, that's another thing they have a problem with, because shareholders used to have kind of ways they could vote greater than 75% to avoid any kind of, like, liquidation. They. Had some rights before, but as of 2017, Grace Kell basically removed that in the trust. And now it's basically all in their court in terms of what they can do. And so there's a lot of issues around how they change the trust charter and basically give all the power to Grayscale and not to any power to the shareholders. And that's kind of all in this lawsuit that just came out, like, last week. But it's been an ongoing thing for years now. ", + timestamp: '01:24:54-01:44:01', + topics: ['DCG', 'Genesis'], + type: 'twitter_space', + weight: 16.40026499856909, + }, + { + boost: 0, + date: 1677582e3, + description: 'The goal of Blockchain Boy', + episode_title: 'Ep. 514 The Future of Crypto in the Media with Blockchain Boy', + guests: [ + { + name: 'Lucas Dimos', + profile_picture: 'https://pbs.twimg.com/profile_images/1092408696838197250/n0-St2nZ_400x400.jpg', + ref_id: '9ac17e2f-49bd-4fc5-bfe5-2f380ca63574', + twitter_handle: 'lucasdimos', + }, + { + name: 'Blockchain Boy', + profile_picture: 'https://pbs.twimg.com/profile_images/1602154101642592256/A0OX97CT_400x400.jpg', + ref_id: '4b070a6f-bcc8-4708-abaf-cc830709600f', + twitter_handle: 'BlockchainBoyy', + }, + ], + hosts: [ + { + name: 'Aaron Malone', + profile_picture: 'https://pbs.twimg.com/profile_images/1521495204196503553/abk-5S0m_400x400.jpg', + ref_id: 'bd103540-8c0a-4ab3-b5cd-24a3f2c43ab2', + twitter_handle: 'pizzamind', + }, + { + name: 'Bryce Paul', + profile_picture: 'https://pbs.twimg.com/profile_images/1182725652794892288/QbDOKHcP_400x400.jpg', + ref_id: '0d670dbf-f434-43b6-b454-8e5345d7ee51', + twitter_handle: 'BrycePaul101', + }, + { + name: 'Pizza Mind', + profile_picture: 'https://pbs.twimg.com/profile_images/1521495204196503553/abk-5S0m_400x400.jpg', + ref_id: '16cb01cf-9f04-45db-a440-47259b02b86a', + twitter_handle: 'pizzamind', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/93a6fe5b-364c-43f4-9f38-7da3e811460b.jpg', + keyword: !0, + link: 'https://audio1.redcircle.com/episodes/68f31cee-f404-40fe-85d7-a406019e916f/stream.mp3', + node_type: 'clip', + pub_key: '037f7331a5bef6c6f880246747befcc3767f3bb9730bc5e6f7c3770f4184ed0bff', + ref_id: '2485d5dc-6159-4638-aef1-e645f226a8a1', + show_title: 'CRYPTO 101', + text: "gamble to bet on them. Like anything is. Same thing with Raddix, like I mentioned before. Although anything but salon or cardano I'll just say. That interesting take. All right, yeah. Could you expand on that last point? Anything but solana and cardano. What's the reason? That's half a joke. I don't mind cardano, but I think Salona is pretty centralized. VC garbage. I've been calling it Mid forever, and I felt very vindicated when it finally shit the bed. Fair enough. Well, you are only a couple of years away from really being able to do whatever you want in life, and I mean whatever you want. Your businesses are going to be able to be ran on autopilot. You're going to have more money than you can count in a multitude of different currencies with the way things are. Headed to be able to rent a car in the States. Yeah, well, you can't do that yet. But the point I'm getting at is what are your real dreams and goals? Like, when you're fully empowered to do literally anything you want in this world, what do you want your impact and your legacy to be? That's a great question, and I'm still figuring out what I really want to do with the rest of my life. I just know that I really like building cool things with cool people, and I think I'm always going to do that, no matter whether it's big or small. I think it's just I have to do something. I'm like a shark. Sharks have to keep swimming or they sink. Right? And so it's very similar with me. Maybe I'll have some more time to go live in the country and be away from people for times. But no, I really like empowering people to be their best selves. That's really what makes me the happiest, is, like, I'm a very loving and caring person, and I love to see people do good things and succeed. So I would really love to get into sort of micro loans and sort of entrepreneurship guidance and maybe even ethical VCs, because I don't think a lot of VCs are very ethical. And so I'd love to do something along the lines of that to empower more entrepreneurs to have an effect in their community and environment outside of Web Three, too. I've been doing micro loans on the platform called Kiva for many years, and I think it's super cool and needs a Web Three version. Yeah, I've actually never heard of Kiva. Tell us a little bit more about what micro loans are. And has that been a way that you could generate passive income or anything? No, it's just mostly a tax write off for really rich people. It's not like super well known, but you get to actually empower entrepreneurs in other countries. Oh, there's Jonah. Jonah. I'm on a podcast. Oh, he's bringing stuff. Jonah. What's up, brother? Thanks, bro. No, he's one of my fantastic team members over here. Thanks, bro. I wish I got a coffee delivery in the middle of podcast. That was sick, wasn't it? Look at that. Yeah, look at that. Dude, he hooked me up. I bet there's even an espresso shot in there. That's crazy, man. Fantastic. So where was I? Oh, yeah. So you can empower entrepreneurs from other places around the world who need maybe an $800 loan to get more fertilizer for their crops, to double their yield, or who are opening a small store in their community. And it's a way because charities actually can be actually very damaging ", + timestamp: '00:21:17-00:24:30', + topics: ['Blockchain Boy'], + type: 'podcast', + weight: 79.08077270705402, + }, + { + boost: 0, + date: 1642464e3, + description: 'Channels jamming and Lightning invoice on the Lightning network', + episode_title: 'Lightning for Plebs - TABConf 2021', + guests: [ + { + name: 'ketominer', + profile_picture: 'https://pbs.twimg.com/profile_images/1245972079528329218/YDUD9N2Q_400x400.jpg', + ref_id: '2f8b0b59-6f23-4c89-973c-668cc7666998', + twitter_handle: 'ketominer', + }, + { + name: 'Ryan Gentry', + profile_picture: 'https://pbs.twimg.com/profile_images/1362751223217160203/ekMa_yY-_400x400.jpg', + ref_id: '8fe78b55-bc38-40df-9cb5-ffd5c84166a2', + twitter_handle: 'RyanTheGentry', + }, + { + name: 'Dread', + profile_picture: 'https://pbs.twimg.com/profile_images/1532557131819491328/vvs1cD-7_400x400.jpg', + ref_id: 'e61af76b-8fbd-4719-b753-0a70edd22fa8', + twitter_handle: 'PoleVaultDream', + }, + { + name: 'Andre Neves', + profile_picture: 'https://pbs.twimg.com/profile_images/1604172627550969856/bYCGb7Ev_400x400.jpg', + ref_id: '227e071d-f8a6-4137-8078-729fa9eb3a13', + twitter_handle: 'andreneves', + }, + { + name: 'Nate G', + profile_picture: 'https://pbs.twimg.com/profile_images/1542983032507858944/9w_UUx5Z_400x400.jpg', + ref_id: 'bda29551-f17f-452c-9204-4d6cafdf4f3b', + twitter_handle: 'natecgriffin', + }, + ], + hosts: [ + { + name: 'TABConf ', + profile_picture: 'https://pbs.twimg.com/profile_images/1596233571521499138/YE8Us_Ml_400x400.jpg', + ref_id: 'd2f50d77-ec8d-4554-bc40-387ababbb536', + twitter_handle: 'tabconf', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/e7d2a4ca-6b44-4a45-a94c-6f48987979f7.jpg', + keyword: !0, + link: 'https://www.youtube.com/watch?v=mQOBuXsGZt0', + node_type: 'clip', + pub_key: '02574d6e8e787372184b6f17c40d6c6fe1777db9015801f95dfd24692784d767cd', + ref_id: 'cd29b1a1-f94b-4eee-84ce-ddf8a4fcb0c5', + show_title: 'TABConf (The Atlanta Bitcoin Conference)', + text: "let's theorize a little bit. You know, I know, like, one that always, you know, the the Dodge's always point out is the flood and loop attack, right? Which I think is like mostly mitigated by anchor channels. But what are some things that, you know, like, for instance, somebody a country that really doesn't like Bukle and El Salvador. Like, what are some things that you think they could do to try and mess with their infrastructure? What were some things you'd watch out for? Jam all the channels. All of them. Just jam them all. Okay. It's a real thing. Channels have limits in HLCs and in flights. And also there are a couple of ways where you can essentially deploy very small sorry, very small value payments in terms of let me rephrase large volume of payments with very small amounts. And then you can also lock up liquidity on routes by using small number of payments with large amounts. So for making a payment through Ryan and Ryan's node goes offline after the HLC sent, I now have liquidity stuck on one side and I can't do anything until it settles, right, until it cancels or airs out. So imagine someone spending an attacker, spending up hundreds of nodes, deploying some capital to the network, and then using some form of scripting to jam a lot of channels. All of a sudden in El Salvador, you can't make a payment through open node to buy your McDonald's, right. Because channels are jammed or liquidity is not unavailable. So channel jamming is one. I guess spamming and probing is a big one as well. On our nodes at least, we're seeing the numbers vary, but any given month is like 50%, 60% are probing, probing payments and probes are essentially I'm trying to get an estimate of whether this payment will clear and I'm trying to get an estimate of the fee that will cost me. So a lot of wallets do this probing mechanism to find out for users. And so, hey, your payment is 1000 SATS. It's going to cost you ten stats to make this payment and you send that fake payment across once the returns failed back, you now have a very discreet estimate. We're seeing lots of spam in the network, but again, it's in its infancy. What happens if someone is actively trying to spam it? Twenty four seven? I think we have yet to see what it's like. And there's also a vulnerability in the invoices, right? Like if you give an invoice out, like let's say you're asking for tips on Twitter, or you put an invoice out on a post, you're showing your information, right? Like they can see your note at that point. So I feel like, what is it, about twelve that might solve that, but things like that, maybe not. Things that provide more privacy for us. Would be good to be able to remain anonymous as possible while still conducting your transactions. Rendezvous routing. Let's go from your lips to God's ears, man. Yeah, right now a regular lightning invoice can be decoded and you can see. Imagine that I give you an invoice, you pay it and you could decode the invoice and says, that is actually going to me. Right? But if I can give you an invoice where you don't see where the final destination is, that protects your nodes privacy, but you still get paid for it. So that's something that hopefully in the future we can get going. Is rendezvous the same as trampoline? No. Yeah, you give me that. Fight for it. You're going to get in trouble asking that. I think conceptually, high level, they're the same. But this is the type of thing where it's like the differences are so small, but so important that Tbast and Connor would like get into a fistfight or something. Hilarious. Yeah, I think all of those attacks are. The thing that I love about the Bitcoin community is that we're very honest about this type of stuff and we're continually critically thinking about what are the ways in which this could fail, what are the ways and thinking about what are the ways that we can protect ourselves against these adversarial environments. Because absolutely, I know it's like the protocol developers a lot of the time are kind of like, this is ridiculous that you guys are having fun and making friendship channels and stuff. Like, you know, this is going to be an adversarial environment. And I think we are aware, but it just hasn't been the case just yet. And so I think kind of to close here again, this has all been about lighting for Plebs. I'm curious. The Plebnet now, I think is it like 1000 registered nodes. 5000 registered nodes. Holy shit. Thousand nodes. Okay, 1000 registered nodes, 5000 users, which is incredible. ", + timestamp: '00:24:02-00:28:52', + topics: ['Lightning Liquidity', 'Lightning invoice', 'Lightning channels jamming'], + type: 'youtube', + weight: 8.078713541988659, + }, + { + boost: 0, + date: 1637366400, + description: 'Education efforts and safety regulations in the nuclear energy sector', + episode_title: 'Securing Bitcoin With Nuclear Energy', + guests: [ + { + name: 'Nuclear Bitcoiner', + profile_picture: 'https://pbs.twimg.com/profile_images/1443185278525579278/_Yl1nao1_400x400.jpg', + ref_id: '60f5891f-0864-4ed4-987a-81da4768b3ba', + twitter_handle: 'nuclearbitcoinr', + }, + { + name: 'Eric McErlain', + profile_picture: + 'https://pbs.twimg.com/profile_images/1252969137/Screen_shot_2011-02-23_at_10.59.21_PM_400x400.png', + ref_id: '4815365d-44d0-4b06-9d9e-32070158d03c', + twitter_handle: 'atomiceric', + }, + { + name: 'Puru Goyal', + profile_picture: 'https://pbs.twimg.com/profile_images/1590742805613203456/QAtYq_C__400x400.jpg', + ref_id: 'c24af059-b38b-4ce5-9547-9192c9eff579', + twitter_handle: 'purugyl', + }, + ], + hosts: [ + { + name: 'Zack Voell', + profile_picture: 'https://pbs.twimg.com/profile_images/1595803006737448961/fFrf7VJb_400x400.jpg', + ref_id: 'e32c7661-c635-4089-a620-ffce509eff0e', + twitter_handle: 'zackvoell', + }, + { + name: 'Compass Mining', + profile_picture: 'https://pbs.twimg.com/profile_images/1425165074373791744/f2CgInvP_400x400.jpg', + ref_id: '812e5d37-47fb-4077-915f-df52e2ef84d8', + twitter_handle: 'compass_mining', + }, + { + name: 'Will Foxley', + profile_picture: 'https://pbs.twimg.com/profile_images/1580970227193376776/9oQfeExj_400x400.jpg', + ref_id: '704b9e82-3e40-40b6-874c-6bb8fadafbef', + twitter_handle: 'wsfoxley', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/ae91fac6-a1af-4877-9a92-e793d556ee66.jpg', + keyword: !0, + link: 'https://www.youtube.com/watch?v=YBaA17NODlA', + node_type: 'clip', + pub_key: '03c18d0c6c35333f22bc524e21a5fd1d2d9886f5d4d958dc1de95d025de5c84cfc', + ref_id: '475acbce-5a5c-4881-a93d-7d41edf1ae84', + show_title: 'Compass Mining', + text: "Eric, I wanted to pick up on that note a hint to you next exactly for the reason that I know you work in a lot of the education efforts and dialogue and conversation. And as I'm sure we're all familiar, facts and data don't always win the day, and bitcoin people know that as well as any other industry. I'm just curious if you have any extra color to add on how those conversations are going in terms of education and presenting the tech as it stands, reliability, safety and just general promise. How are those conversations going? Well, I think you're exactly right. A lot of times in our industry, we argue with facts and data in the face of emotion, and it doesn't always work. I think what's important, and I take this line from one of my colleagues in the industry it's no more and fearless. And the more that we talk about what our real record is. And I think we've got a record to be proud of, especially here in the United States, since Three Mile Island, where we've not only done tremendous work in upgrading safety standards and operational standards here in the United States, but we've also done a lot of really important work in terms of regulating ourselves. Coming out of Three Mile Island. We established the Nuclear Regulatory Commission. We used to have the Atomic Energy Commission, which had the dual mission of promoting the industry and guaranteeing its safety. And it was decided by President Carter and Congress that those two missions were incompatible. We needed to break this apart. So we created the Nuclear Regulatory Commission, the Department of Energy to it on the promotional aspect of that. So that was one thing was great. We have a very, very tough regulator. There are two resident inspectors at every plant in the United States. And those guys and women and women have the ability to shut those plants down if they're operating unsafely. It's never happened, but they do have the authority to do so, and people need to know that. It's something that's very important to know. The other thing that's important to know is that also growing out at Three Mile Island, we established something called the Institution of Nuclear Power Operations, which was an internal industry peerreview group where we would all evaluate each other's operational safety together and decide and rank our plants according to how well they matched up against our standards. Column one through column four. And the fact is that within our business, you're known, I mean, number one is the best and number four is the lowest. And if you're a plant manager. You're running a plant. You following the info column force into your career. We do not tolerate that kind of operational pace in our industry and we got to get people up at the very top because the fact of it is that we're held to a different standard than other industries and we're not afraid of that. We've been held to different standards now for a very long time. We're not afraid of that. And we need to tell that story. We need to be very out front about that. A lot of really talented social scientists who look at our industry did some research a couple of years ago and they found that a lot of the public still has what they call existential threat about nuclear power. It's born out of the fact that we're born out of a weapons program. Even the first commercial reactor in the United States was built by the United States Navy under the supervision of Hymen Rica Over. You pile that on top of you can't see radiation. You can't smell it, you can't taste it. It feels like a risk that you can't mitigate when in fact, we know what we can do and we can what we need to do is we need to meet people where they live and we need to address their fears and let them ask any question that they like. We want to let them know that we have safety systems on top of safety systems that guarantee the operations of our plants. We've got to talk about things like the people who seem to support us most in the world or the communities that are closest to our plants. They know the people who work in them. They know how much their communities mean to them and when they go to work every day. They know that they're guaranteeing not only the safety operations of the plant, they're also guaranteeing the continued operation of economic engine for the community that they live in. These plants throw off tens of millions of dollars in property taxes. They provide direct support for education and first responders, public safety, public libraries. I mean, they're really, really very important to the communities that they're based in. So I believe as long as we're upfront about who we are, what we're doing, meeting people where they are and addressing their fears directly, I think we're in a much better place than we were, let's say, 30, 40 years ago. And I was very small and still remember my father telling me about his tour of TMI back in the ", + timestamp: '00:24:37-00:29:38', + topics: ['Nuclear Energy Education', 'Nuclear Energy Regulations'], + type: 'youtube', + weight: 8.023174886839682, + }, + { + boost: 0, + date: 1596686400, + description: 'Environmental Issues in Planet', + episode_title: 'Chat 45 - Bitcoin an Energy Revolution A panel at the VOB Conf', + guests: [ + { + name: 'Tone Vays', + profile_picture: 'https://pbs.twimg.com/profile_images/1416821178266787844/T1OkI9ZW_400x400.jpg', + ref_id: 'da6fc991-7080-461c-86e3-4ac18c2f413d', + twitter_handle: 'tonevays', + }, + { + name: 'Phillip Sandner', + profile_picture: 'https://pbs.twimg.com/profile_images/1043824764161335296/2SW3duCV_400x400.jpg', + ref_id: 'e1996e82-0354-421c-85d5-f18eebec9506', + twitter_handle: 'philippsandner', + }, + { + name: 'Jesse Peltan', + profile_picture: 'https://pbs.twimg.com/profile_images/1123954968636088326/EAjHUGDE_400x400.png', + ref_id: '96309505-caeb-47bb-a1ba-712b97292675', + twitter_handle: 'JessePeltan', + }, + { + name: 'Christopher Bendikson', + profile_picture: '', + ref_id: 'd72ead54-7bff-4874-870f-123e665fddfd', + twitter_handle: '', + }, + { + name: 'Christian Stoll', + profile_picture: + 'https://pbs.twimg.com/profile_images/3296579573/69ebedb479a9bdb9d536fe887e2d3113_400x400.jpeg', + ref_id: 'ff74d59c-f846-4b16-a5e5-771fb8139f18', + twitter_handle: 'Granddragon14', + }, + ], + hosts: [], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/9e7e229f-2631-4542-b5d7-7fcd502798dc.jpg', + keyword: !0, + link: 'https://traffic.megaphone.fm/CSN6935967461.mp3?updated=1627959014', + node_type: 'clip', + pub_key: '', + ref_id: '4fdf8ab1-a3e8-4390-b618-a8a915fa3f68', + show_title: 'Bitcoin Audible', + text: "issues that we have on the planet. Today are how is steel produced, how are metals produced, how is concrete produced, how is electricity produced and how it's farming done. Everything else makes almost no difference. Those are the big issues. If our ground is in any way. It doesn't matter how much energy we use. If our mining and our metal production is done in a clean way, it doesn't matter how many metals we use. The earth is completely full. The cost of the earth is just materials. So if we're looking at the long term sustainability, it's a question of how these couple of processes are done. And so the question of bitcoin's impact on that gets such a small percentage of consumption. The question is more of which way does it incentivize production? Because if you see even a small swing in the way that if bitcoin for example, is able to balance grids and enable them to use higher percentage renewables, then you'll see a higher renewable penetration and you'll see overall lower utilization of fossil fuels than you would in a situation without bitcoin. ", + timestamp: '00:29:09-00:30:22', + topics: [], + type: 'podcast', + weight: 7.965680956840515, + }, + { + boost: 0, + date: 1672207217, + description: 'Satoshi Nakamoto on Double Spin, Proof of Work and transaction fees', + episode_title: 'The Orange 🌞 Reading/Discussion "The Book of Satoshi" & Bitcoin News', + guests: [ + { + name: 'CouncilmannJamm', + profile_picture: 'https://pbs.twimg.com/profile_images/1251040014152024066/dD3b2eA4_400x400.jpg', + ref_id: '6c989c2c-d24d-49a2-8eb1-1d2f1c47f347', + twitter_handle: 'jamm_councilman', + }, + { + name: 'thotsnplayerz', + profile_picture: 'https://pbs.twimg.com/profile_images/1608733749663109120/wwYEZgF2_400x400.jpg', + ref_id: '66bbe365-9e85-4c34-9d51-39d8b49937b7', + twitter_handle: 'thotsnplayerz', + }, + { + name: 'Will Schoellkopf', + profile_picture: 'https://pbs.twimg.com/profile_images/1487515153302130691/t5sDMzZW_400x400.jpg', + ref_id: '461e2245-1672-4fa1-94f5-7aaf1afa531f', + twitter_handle: 'realBitcoinDog', + }, + { + name: 'OKIN_17', + profile_picture: 'https://pbs.twimg.com/profile_images/1518945775685967873/O0wPrIKO_400x400.jpg', + ref_id: 'dbcdeab8-4824-43f7-aeb8-2b9eda6cbbad', + twitter_handle: 'OKIN_17', + }, + ], + hosts: [ + { + name: 'SatoshisJournal', + profile_picture: 'https://pbs.twimg.com/profile_images/1518661993103859712/y_QefqVZ_400x400.jpg', + ref_id: '63fac069-bfe9-49ae-b52c-1d1f226b3275', + twitter_handle: 'SatoshisJournal', + }, + { + name: 'Jeremy Garcia', + profile_picture: 'https://pbs.twimg.com/profile_images/1589056396816896001/dslbBQSX_400x400.jpg', + ref_id: 'e5e68f75-d71a-4477-ae9a-6a891f2d84d0', + twitter_handle: 'Jerimican5445', + }, + { + name: 'ToxiKat27', + profile_picture: 'https://pbs.twimg.com/profile_images/1505791887415730177/d0YDQ3Xc_400x400.jpg', + ref_id: '50023cce-8a6f-4974-ad3b-fd7a9c0abf19', + twitter_handle: 'ToxiKat27', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/9b2e17f2-71c5-4f1e-a3e7-720d06dab810.jpg', + keyword: !0, + link: 'https://stakwork-uploads.s3.amazonaws.com/uploads/customers/2707/media_to_local/ecefba20-39fd-4974-8388-066857965b2a/cf486c39-08f9-4ada-9b72-7a297ad74d74.mp3', + node_type: 'clip', + pub_key: '', + ref_id: 'bd8acc65-31a6-4d6c-93e2-cb91d3909825', + show_title: 'Satoshi’s Journal', + text: "15. It's entitled more on double spend proof of work and transaction fees. In this exchange, Satoshi provides several clarifications and discusses compensation of miners, ie. Nodes via transaction fees once the entire supply of Bitcoin has been created. So once again, he's asked about that. On Monday, November 7 17th, 2008, at 904, Satoshi Nakamoto wrote I'll try and hurry up and release the source code as soon as possible to serve as a reference to help clear up all these implementation questions. Ray Dillinger, who goes by I Guess Bear, wrote when a coin is spent, the buyer and seller digitally signed a blinded transaction record. Satoshi Nakamoto replies only the buyer signs and there's no blinding. If someone doublespends, then the transaction record can be unblinded, revealing the identity of the cheater. Identities are not used and there is no reliance on recourse. It's all prevention. This is done via a fairly standard cut and choose algorithm where the buyer responds to several challenges with secret shares. Okay, so I'm trying to remember who this person was. I think this is Ray Dillinger that said that. So Ray says this is done via a fairly standard cut and choose algorithm where the buyer responds to several challenges with secret shares. Satoshi says no challenges or secret shares. A basic transaction is just what you see in the figure in section two. A signature of the buyer, satisfying the public key of the previous transaction and a new public key of the seller that must be satisfied to spend the next time. Then Ray Dillinger says they may also. Receive chains as long as the one they're trying to extend while they work, in which the last few links are links that are not common with the chain on which they are working. These they ignore. Satoshi says. Right. If it's equal in length, ties are broken by keeping the earliest one received, and then Ray says, if it contains a double spend, then they create a transaction which is proof of double spending, add it to their Pool A, broadcast it, and continue work. Satoshi responds, there's no need for reporting of proof of double spending like that. If the same chain contains both spends, then the block is invalid and rejected. Same. If a block didn't have enough proof of work, that block is invalid and rejected. There's no need to circulate a report about it. Every node could see that and reject it before laying it. If there are two competing chains, each containing a different version of the same transaction, with one trying to give money to the one person and the other trying to give the same money to someone else, resolving which of the spends is valid is what the whole proof of work chain is about. We're not, quote unquote, on the lookout for double spends to sound the alarm and cast a cheater. We merely adjudicate which one of the spends is valid. Receivers of transactions must wait a few blocks to make sure that resolution has had time to complete. Wouldbe cheaters can try and simultaneously double spend all they want, and all they accomplish is that within a few blocks, one of the spends becomes valid and the other becomes invalid. Any later double spends are immediately rejected once there's already a spend in the main chain. Even if an earlier spend wasn't in the chain yet, if it was already in all the other nodes pools, then the second spend would be turned away by all those nodes that already have the first spend. Then Ray says. If the new chain. Is accepted, then they give up on adding their current link, dump all the transactions from pool l back into pool A along with transactions they've received or created since starting work. Eliminate from pool A those transaction records which are already part of the link in the new chain, and start working again trying to extend the new chain. Satoshi says. Right, they also refresh whenever a new transaction comes in, so Al pretty much contains everything in A all the time. Ray comments CPU intensive digital signature algorithm to sign the chain, including the new block Al. Satoshi responds It's a hash cache style shaw 256 proof of work partial preimage of zero, not a signature. Ray says, Is there a mechanism to make sure that the chain does not consist solely of links added by just three or four fastest nodes? Cause a broadcast transaction record could easily miss those three or four nodes. And if it does, and those nodes continue to dominate the chain, the transaction might never get added. And Satoshi responds, if you're thinking of it as a CPU intensive digital signing, then you may be thinking of a race to finish a long operation first and the fastest always winning. The proof of work is a hash cast style two shot, 256 collision finding. It's a memoryless process where you do millions of hashes a second with a small chance of finding one each time. The three or four fastest nodes dominance would only be proportional to their share of the total CPU power. Anyone's chance of finding a solution at any time is proportional to their CPU power. There will be transaction fees, so nodes will be an incentive to receive and include all the transactions they can. Nodes will eventually be compensated by transaction fees alone when the total coins created hits the predetermined ceiling. So they continue. Ray Dillinger then says, also the work requirement for adding a link to the chain should vary with the numbers of links adding to that chain in the previous week, causing the rate of the coin generation to be strictly controlled. Satoshi says right. Ray says you need coin aggregation for this to scale. There needs to be a provable transaction where someone retires ten single coins and creates a new coin with denomination ten, et cetera. Satoshi says every transaction is one of these section nine combining and splitting value. So I guess he just referred to him a section. So yeah, in that. Exchange they use the word note a lot, but in the context of that it's synonymous with miners, just to make that clear. So a miner of course, is a computer that is specifically used to mine Bitcoin. That's all it can do. And it validates transactions and the node is what? Verifies transactions. So, like on the Bitcoin blockchain, for you to be truly certain that your transaction has gone through a minimum of six, validations is required, meaning that six other nodes have looked at your transaction and deemed it verifiable. And once it's verifiable, you can essentially be confident that you have achieved, not consensus you've achieved, yeah, consensus, your transaction is good to go. And so Portland asked me a trick question the other day. He said, if there are five blocks that have been mined, how many times has your transaction been verified? And it just stumped me, I don't know why, because the thing that came to my head was that minimum six validations, I just was stumped. And he asked me like three times, and I said, I don't know the answer. And he says five. And anyway, so the answer was right in front of me. So every block is basically mined approximately every ten minutes, and in five blocks you can basically equivocate that to five validations of your transaction. The more validations of your transaction, the more set in stone, so to speak. That transaction is. So it's just like if you solve a problem, if I give you a sheet of paper and it says has an equation ten times ten and I give it to you and you have to write the answer on the paper while you put 100. And then I tell you to give that to six other people to make sure that your calculations are right. Those six people check, and they do indeed concur that ten times ten is 100. And since I made the rule, when I get those six confirmations from those six people that you did your math correctly, then that gives me confidence that the calculation is done is correct. And so that's what basically the nodes are doing. When you broadcast a transaction, the nodes are all looking at it, and it takes a minimum of six to basically solidify that into the bitcoin blockchain forever. That'll give you full insurance, full confidence that your transaction is good to go. And all that happens in basically six blocks, which is 60 minutes. And the beautiful thing about that is the fact that that's all being done with computers and no intermediary. Whereas if you were to go and swipe your card at McDonald's to make a transaction, you're doing that first through essential authority, and the verifiability of that transaction doesn't happen. And the finalization of it doesn't happen until basically 30 days when you get your bank statement, and it shows that you have a charge for $10 at McDonald's. So, relatively speaking, bitcoin is way faster than legacy systems. Although you can swipe your credit card fast and think that you have paid for what you think you paid for, there could be an error in the system, and maybe you could get charged falsely for something, or someone could go and double pay for something, or someone could steal your credit card and pay for other things. So that's the problem with legacy system, is there's just so many damn intermediaries, whereas bitcoin, you just freaking do your lightning transaction or your bitcoin on chain transaction, and there's no one in the middle. So it's pretty profound. ", + timestamp: '01:07:07-01:19:03', + topics: ['Satoshi Nakamoto', 'Double Spin', 'Proof of Work', 'transaction fees'], + type: 'twitter_space', + weight: 23.245500377568373, + }, + { + boost: 0, + date: 1672167683, + description: 'Bitcoin as a superior savings system', + episode_title: 'TOXIC HAPPY HOUR! #Bitcoin, Beer and Plebs! 🍻😂🤌🏻', + guests: [ + { + name: 'Dr. Jeff Ross', + profile_picture: 'https://pbs.twimg.com/profile_images/1475554600094552064/DSlPG1lx_400x400.jpg', + ref_id: '51a969bb-dbf7-4d20-b128-74dcc5f560f6', + twitter_handle: 'VailshireCap', + }, + { + name: 'Tomer Strolight', + profile_picture: 'https://pbs.twimg.com/profile_images/1591960241008148481/HtyINxtU_400x400.jpg', + ref_id: '3a2bc97d-072c-4ed9-9a59-17ceeb68fe99', + twitter_handle: 'TomerStrolight', + }, + { + name: 'Laura Shin', + profile_picture: 'https://pbs.twimg.com/profile_images/1539462748173746176/hxR80FYT_400x400.png', + ref_id: 'a56a7b4d-edca-41d5-9d51-33396aa05b96', + twitter_handle: 'laurashin', + }, + ], + hosts: [ + { + name: 'PUBLORD', + profile_picture: 'https://pbs.twimg.com/profile_images/1480160632360124416/AM_vVRko_400x400.jpg', + ref_id: '8126d933-0986-4fd2-a6be-c02581294463', + twitter_handle: 'publordhodl', + }, + { + name: 'Anders Jensen', + profile_picture: 'https://pbs.twimg.com/profile_images/1382039124991954947/Wb9kT7MO_400x400.jpg', + ref_id: 'af45195e-77a6-463f-ba64-29c6b0437d9c', + twitter_handle: 'andersjensenorg', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/2a1450bc-0649-4dc5-8ec9-1474af1ea1c3.jpg', + keyword: !0, + link: 'https://stakwork-uploads.s3.amazonaws.com/uploads/customers/2707/media_to_local/f7b6cfcb-7cd4-4401-a3fb-7735bb570c07/2ae49fca-a048-4a34-93b9-247513af5699.mp3', + node_type: 'clip', + pub_key: '', + ref_id: '433eb4ba-ba64-468f-9e3c-130fbc948adf', + show_title: 'Anders_🍆', + text: "what. Do you do in your IRA? What can you put your money in that's going to be better? Well, the one I have doesn't have it's limited to some of the access. In fact, once I found bitcoin, those contributions stopped, to be honest with you. And, yeah, whatever they're in, they're in, but they're limited in where they can go, you see? So I'm letting that one ride out. Just another hedge, but everything else now, man, is straight. Bitcoin, brother. What's going on, Clark? Just chilling, man. Putting up some overhead storage in the garage. Take a couple of weeks off at the end of every year to recoup. Kind of feel blessed that I was able to work 50 weeks out of the year. So take these last two off. Yeah, on stage, Craig. Well, Jeff Ben, I don't know who else is going to Miami. ANZ and I, we're starting to spread our wings a little bit this year. We made it up to Charlotte for Halloween. Anderson pacific bitcoin. Now we're rolling into Bitcoin Day in Naples. It's been really cool to see all these other conferences and meetups start and look, I don't even care how small they are to get their foot in the door, but hey, we may have a dinner date with Fosse and Lawrence LaPard. They're going to be down there, man. So we'll hook up with them. And I think we're trying to get James Lavish to go. So when you get some of those quality folks showing up at a smaller type venue, it's really cool, man. You get to just hang out. You meet them offline, just the nicest people in the world. So if you're in the central, southeastern, southwestern Florida area and can make it over to Naples, yeah, we'll be there. Hey, shoot, I'm coming all the way from that west coast. If you're anywhere in the United States or anywhere in this universe, you should be at bitcoin day. It'll be fun. So the problem is, puppy. I think the reason why I haven't been given a feeling of 100% confirmation of our little gig there is probably because, as you said, they're trying to get James Lavish. If he's coming, I don't think there's any room left for us, bro. He'll be on stage with us if we do it. That's right. That's what we'll do. Just like Dr. Jeff came on. Toxic happier in Swan Dome, pacific bitcoin. But he was big timing us after 15 minutes. He just left. He just walked out. And you know why? Because he is part of a documentary. When is that coming out, Dr. Jeff? Well, first of all, I left because you always got to leave early to keep the people wanting for more, right? You can't overstay your welcome. So that's number one. That's the number one. Rule two, that documentary, I don't know when it's coming out. They're doing a good job with it, though. It's pretty sweet, but we'll see. So I think they interviewed a bunch of people at the conference, and I think they're going to try to get it out as a Netflix kind of movie. And I can't remember what they're calling it. It's like, God bless bitcoin or something like that. And just basically what bitcoin is. And I like to talk about sort of the social justice side of bitcoin and how it's meant for the plebs, not for the institutional elites and things like that. I don't know when it's coming out, but I'm guessing sometime maybe this year. I love it. Just like casually. So this documentary about me is going on the biggest network in the world ever called Netflix. No, we're just happy for you, Jeff. I'm looking forward to see it. I know if you're in it, it's going to be high quality work. So a quick shout out on that note to JD down there is Bitcoin Bacon. He does documentaries as well, and he's going to do one on toxicity. I'm honored and looking forward to play a small role in that. And yeah, that's it, I guess. But when it comes to bitcoin, really, the way I look at it is it's my love. If there's anything, bitcoin is love. And ", + timestamp: '01:12:02-01:16:37', + topics: ['Bitcoin Hodling', 'Pacific Bitcoin Conference'], + type: 'twitter_space', + weight: 22.774441499003483, + }, + { + boost: 0, + date: null, + description: 'Bitcoin Timechain: How Difficulty adjustment factors into the Timechain', + episode_title: 'Café ₿: Bitcoin News, Bitcoin Timechain ⛓Day w/ Ant & TC', + guests: [ + { + name: '@2140data', + profile_picture: 'https://pbs.twimg.com/profile_images/1598330787778232320/ZVFcRtet_400x400.jpg', + ref_id: '190b5001-a42a-46cc-b0d3-b6f74c625648', + twitter_handle: '2140data', + }, + { + name: '@Meditation_Man', + profile_picture: 'https://pbs.twimg.com/profile_images/1597303881339314176/kFqDWvq0_400x400.jpg', + ref_id: 'cf7119ec-50a5-4ba2-a9a6-4a24835f3364', + twitter_handle: 'Meditation_Man', + }, + { + name: '@TimechainStats', + profile_picture: 'https://pbs.twimg.com/profile_images/1316207411741569028/LpDkqBMv_400x400.png', + ref_id: '48e0e34d-8e04-47c0-972c-96cda708a719', + twitter_handle: 'TimechainStats', + }, + { + name: '@TimechainCaL', + profile_picture: 'https://pbs.twimg.com/profile_images/1589772501638184961/0qP3C4Wk_400x400.jpg', + ref_id: '72d94cc5-b62e-4fe2-8275-837eab35a74a', + twitter_handle: 'TimechainCaL', + }, + ], + hosts: [ + { + name: '@SwanBitcoin', + profile_picture: 'https://pbs.twimg.com/profile_images/1491428856858914820/aFlitvha_400x400.jpg', + ref_id: 'da3f56bf-9763-4389-a9ec-d807049bd0b8', + twitter_handle: 'SwanBitcoin', + }, + { + name: '@alexstanczyk', + profile_picture: 'https://pbs.twimg.com/profile_images/1539055022364708864/rwErK6x1_400x400.jpg', + ref_id: '6455df34-1abc-4ce8-9bb8-b02d411accec', + twitter_handle: 'alexstanczyk', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/239722cb-4216-414a-a17b-5adf9d52e15a.jpg', + keyword: !0, + link: 'https://stakwork-uploads.s3.amazonaws.com/uploads/customers/2707/media_to_local/678e39f2-a92a-4745-b875-02645e38e747/9499bd7b-c204-4ad2-aa5b-d046f95f5a09.mp3', + node_type: 'clip', + pub_key: '029099ec31eb33594611dc47d5c93de2c1aa86918e3a36b408c14a500601c8bc9b', + ref_id: '49fe88a8-79ec-423c-a550-a32eb875f090', + show_title: 'Swan.com', + text: "And so I think the difficulty adjustment is a huge part of this, right? And so I don't know if either one of you guys can extrapolate on how the difficulty adjustment plays into this. Anybody could jump on that. I can comment. We could go for it. Yeah. So basically, depending on how quickly the blocks are coming in or how slowly the issuance of bitcoin is set in stone, or the targeted issuance is set in stone, so we know how many bitcoin should be mined in a given span of time. And so if blocks are coming in too quickly, in other words, if the timestamps are coming in closer than ten minutes, on average than every 2016 blocks, which is roughly two weeks, if they're coming in the way they should be. But if they're coming in quicker than the difficulty goes up, and it gets harder to mine. And the reason why they were coming in quicker in the first place is very likely because there were more miners on the network mining than there were the previous two weeks. And so they were hitting those blocks a little bit faster than they were before. So when the difficulty goes up, then all those new miners that just joined have to compete in a little bit harder fashion to bring in new blocks and you get the issuance back on track. And that's part of I think this is also like a very key point of what makes bitcoin hard money as well, right? Like the fact that we can predict how much bitcoin is going to be mined far, far into the future. We know with a pretty high degree of certainty that on average, for the next year and a half, 900 bitcoin are going to be mined a day, right? It might be like a few bitcoin more, a few bitcoin less, but in terms of any monetary system that we've ever had as humans, I mean, we've never had even anything close to this degree of certainty, right? I mean, it is fucking insane how crazy that is. Right. We have a totally automated system that handles the issuance of Bitcoin and there's really nothing else like it. It's one of the most exquisite engineering solutions ever in my mind. And the fact that it's such small lines of code, it's a beautiful system and once you fully understand or start to understand the way that it works, you'll lose a lot. It smashes a lot of the fudge out of your mind, like minor death spiral, stuff like that. Whenever you start hearing these headlines about price being a certain point and like, miners are going to go off the network and oh my gosh, Bitcoin is going to fail and die, they're not thinking about the difficulty adjustment when they write those types of headlines. Well, maybe they are, but they don't. Yeah. And the other thing that is important to remember is despite few lines of code, there's the whole fact that the code meets the real world through difficulty adjusted proof of work. So it's not just the fact that those in the mining portion of the architecture are having to expend real world energy at a real cost, and that this difficulty adjustment kicks in every two weeks to ensure a balancing effect. No matter how many or how few participants are mining in order to target ten minute average block times. This is where the rubber meets the road. It's code, it's real world participants, it's the boundaries and limitations of the expenditure of real cost and real energy. All these things coming together. And this is why this thing, I think, is so challenging for people who are on the outside just peering at the price and trying to understand what the hell is going on, let alone the whole fog and cloud of crypto and shit coins that just distracts and confuses. This thing is truly, truly special. ", + timestamp: '01:14:46-01:19:27', + topics: ['Bitcoin Timechain', 'Difficulty adjustment'], + type: 'twitter_space', + weight: 7.870050430297852, + }, + { + boost: 0, + date: 1596671100, + description: 'Unfair ways Bitcoin mining is assessed;Electricity consumption', + episode_title: 'Chat_45 - Bitcoin & an Energy Revolution, A panel at the VOB Conf', + guests: [ + { + name: 'Christian Stoll', + profile_picture: + 'https://pbs.twimg.com/profile_images/3296579573/69ebedb479a9bdb9d536fe887e2d3113_400x400.jpeg', + ref_id: 'ff74d59c-f846-4b16-a5e5-771fb8139f18', + twitter_handle: 'Granddragon14', + }, + { + name: 'Jesse Peltan', + profile_picture: 'https://pbs.twimg.com/profile_images/1123954968636088326/EAjHUGDE_400x400.png', + ref_id: '96309505-caeb-47bb-a1ba-712b97292675', + twitter_handle: 'JessePeltan', + }, + { + name: 'Phillip Sandner', + profile_picture: 'https://pbs.twimg.com/profile_images/1043824764161335296/2SW3duCV_400x400.jpg', + ref_id: 'e1996e82-0354-421c-85d5-f18eebec9506', + twitter_handle: 'philippsandner', + }, + { + name: 'Tone Vays', + profile_picture: 'https://pbs.twimg.com/profile_images/1416821178266787844/T1OkI9ZW_400x400.jpg', + ref_id: 'da6fc991-7080-461c-86e3-4ac18c2f413d', + twitter_handle: 'tonevays', + }, + { + name: 'Christopher Bendiksen', + profile_picture: 'https://pbs.twimg.com/profile_images/1362772558882484233/3nS-l35s_400x400.jpg', + ref_id: 'd99d354e-41d4-4117-9b70-05955a85f9da', + twitter_handle: 'C_Bendiksen', + }, + ], + hosts: [ + { + name: 'Guy Swann', + profile_picture: 'https://pbs.twimg.com/profile_images/1401969630634196995/DqOuszMi_400x400.jpg', + ref_id: '39c31930-d799-40a0-9a46-193117d03418', + twitter_handle: 'TheGuySwann', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/9e7e229f-2631-4542-b5d7-7fcd502798dc.jpg', + keyword: !0, + link: 'https://traffic.megaphone.fm/CSN6935967461.mp3?updated=1627959014', + node_type: 'clip', + pub_key: '', + ref_id: '2b8ef20b-4134-4d6a-bb2f-ee72a42468d2', + show_title: 'Bitcoin Audible', + text: "And I have to interject there too, that there is something important to keep in mind. When you look at different people comparing energy consumption, they very often talk about electricity consumption on a national scale. But that's not energy consumption. The electricity consumption of the country is only a small part of their primary energy consumption. So electricity is only, I think, a small double digit percentage of the total energy that we go through as a species. Sorry, go ahead. But I was going to say, in addition to that, not only is electricity a smaller percentage, electricity is a sizable percentage of total consumption, but for a given country, a huge percentage of most countries, energy use is outsourced. So if you're not a country like the US or China that's manufacturing for the world and you're a country that's importing, you are artificially reporting lower energy consumption numbers because all the products that made that everybody uses those emissions are reported under China or they're reported under the US. But in reality that's still energy consumption. So it's not really a fair comparison to say like bitcoin uses x amount of energy, like electricity versus x whatever small country, when you're only looking at the direct energy consumption in that country and not looking at the fact that they're getting all the resources from other countries that are consuming it elsewhere. Not only that, but you can flip that entire narrative on its head and say like when bitcoin uses more electricity than Chile, that means that even if Chile flipped their entire electricity infrastructure to try to mess with the bitcoin blockchain, they couldn't. Yeah, I mean, energy consumption is a good thing. It's just a matter of how it's consumed and how we produce that. Let me add one more thing. Everybody knows the market cap of gold, right? That's around 9 trillion. And that's 50 times more than bitcoin. And we know it from bitcoin. That by theory, if the bitcoin price is 9000 ethnic and by theory the production foster formed by bitcoin should also be 9000. It's not the case, I know, but by theory it should be the case. So now take gold. Honestly, nobody discusses gold. If gold, if the market is having a market cap of 9 billion and times 50 times more than bitcoin, then in case gold is produced, then what is in theory the production price of gold. That's the market cap of today. So 50 times more resources are being spent second by second, day by day, to somehow get gold out of good to ground. But this is not electricity. That's equipment and machinery and that's kind of, I don't know, all kinds of things which are working in some kind of gold mine. But isn't this also wasted resources to some degree? Nobody discusses this and it's 50 times higher at this point. I remember I remember a paper from Cruze Tomato that are exactly comparing metal mining with crypto mining. Oh, interesting. Okay. It was Nature Sustainability 2018. Bitcoin mining waste, ridiculously dangerous to the environment, like the cyanide that is used to extract the gold. And then if you just go through all of the environmental damage that gold mining does, bitcoin is like a space compared to what goes on in order to get gold out of the ground. And it was funny when gaming was brought up, I was speaking a concert, I think it was decentralized, in Athens Beach back in November and there were a lot of people there that is a stake and other nonsense. And I got into this big argument with someone that kept saying how bitcoin is so bad for the environment and mining can't continue to happen and how proof of stake of currency is the future. So it was a lot younger than me. And I asked him, do you play video games? I haven't played video games since I was about 21, 22. And I asked them do you play video games? And you said yes. And I said, well, how much electricity are you wasting by playing video games? Where is the productivity in that? So if you take all the gaming in the world, everyone that ever plays video games, you combine all that, how much electricity that is using, and please make an argument that that is more productive use of electricity than bitcoin, that is trying to give everyone politically neutral government free money. This is why this entire line of discussion is kind of like a bit of a red herring because the problem is that we don't have a good way to price externalities and if we did, then the price mechanism would take care of the rep. So I think it's partially done and it's partially I agree. I think a lot of it is a red herring and kind of missing the major point, which is the real environmental issues that we have on the planet today are how is steel produced, how are metals produced, how is concrete produced, how is electricity produced and how is farming done? Everything else makes almost no difference. Like those are the big issues. If our farms produce any way, it doesn't matter how much energy we use. If our mining and our metal production is done in a clean way, it doesn't matter how many metals we use. The earth is completely full. Like the cost of the earth is just materials. So if we're looking at the long term sustainability, it's a question of how these couple of processes are done and so the question of bitcoin's impact on that. It's such a small percentage of consumption. The question is more of which way does it incentivize production? Because if you see even a small swing in the way that if bitcoin, for example, is able to balance grids and enable them to use higher percentage renewables, then you'll see a higher renewable penetration and you'll see overall lower utilization of fossil fuels than you would in a situation without bitcoin. ", + timestamp: '00:23:49-00:30:20', + topics: ['Bitcoin mining'], + type: 'podcast', + weight: 7.813010811805725, + }, + { + boost: 0, + date: 1637366400, + description: 'Bitcoin can act as a baseload for energy, including nuclear energy', + episode_title: 'Securing Bitcoin With Nuclear Energy', + guests: [ + { + name: 'Nuclear Bitcoiner', + profile_picture: 'https://pbs.twimg.com/profile_images/1443185278525579278/_Yl1nao1_400x400.jpg', + ref_id: '60f5891f-0864-4ed4-987a-81da4768b3ba', + twitter_handle: 'nuclearbitcoinr', + }, + { + name: 'Eric McErlain', + profile_picture: + 'https://pbs.twimg.com/profile_images/1252969137/Screen_shot_2011-02-23_at_10.59.21_PM_400x400.png', + ref_id: '4815365d-44d0-4b06-9d9e-32070158d03c', + twitter_handle: 'atomiceric', + }, + { + name: 'Puru Goyal', + profile_picture: 'https://pbs.twimg.com/profile_images/1590742805613203456/QAtYq_C__400x400.jpg', + ref_id: 'c24af059-b38b-4ce5-9547-9192c9eff579', + twitter_handle: 'purugyl', + }, + ], + hosts: [ + { + name: 'Zack Voell', + profile_picture: 'https://pbs.twimg.com/profile_images/1595803006737448961/fFrf7VJb_400x400.jpg', + ref_id: 'e32c7661-c635-4089-a620-ffce509eff0e', + twitter_handle: 'zackvoell', + }, + { + name: 'Compass Mining', + profile_picture: 'https://pbs.twimg.com/profile_images/1425165074373791744/f2CgInvP_400x400.jpg', + ref_id: '812e5d37-47fb-4077-915f-df52e2ef84d8', + twitter_handle: 'compass_mining', + }, + { + name: 'Will Foxley', + profile_picture: 'https://pbs.twimg.com/profile_images/1580970227193376776/9oQfeExj_400x400.jpg', + ref_id: '704b9e82-3e40-40b6-874c-6bb8fadafbef', + twitter_handle: 'wsfoxley', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/ae91fac6-a1af-4877-9a92-e793d556ee66.jpg', + keyword: !0, + link: 'https://www.youtube.com/watch?v=YBaA17NODlA', + node_type: 'clip', + pub_key: '03c18d0c6c35333f22bc524e21a5fd1d2d9886f5d4d958dc1de95d025de5c84cfc', + ref_id: '42296529-2820-4c4f-be26-e12104e2b723', + show_title: 'Compass Mining', + text: "it's about, like, the base load status of bitcoin mining and how the industry kind of use bitcoin itself. I'm assuming that it's not understood among most nuclear engineers or people working on these plans that bitcoin can act as a base load for energy. I mean, it's becoming a more prevalent talking point in a lot of different industries, especially natural gas. Is there an education initiative that's needed to that process, or do you guys see that it's already happening, that these plants are all across the US. All across canada and elsewhere, are already doing bitcoin as a buyer of last resort for energy? Back to you. Actually, yeah, definitely need some educational input there, I think, from other communities, because I think, like, one thing we need to understand, like, very few people today believe in bitcoin and bitcoin mining, and equally, very few people out there believe in nuclear, and there's a very fine nexus of people who believe in both. Right. So there's a big gap of knowledge in either industries about each other, and I think there's a lot of gaps to be filled there. One last thing I'll add to that point is this is something I've been thinking about for a while. I think sean connell tweeted this out too is like, I think bitcoin mining will serve as a global energy floor because suddenly you have a source, like a demand source, which will take up any energy above a certain price, and it'll just mine until it's profitable. I think it's going to have a massive impact on the energy markets, which people are authorizing right now, where a lot of these commodity prices are going to converge together because suddenly you'll realize that today, if I'm running a power plant and I'm selling my electricity to the grid, why am I doing it? Why don't I just mine bitcoin with it? Why sell it to the grid? Because I'm ten times more profitable just mining bitcoin rather than selling it to the grid. So if you believe in free markets out there and you believe in the economic incentives, then it just makes so much sense to these power providers. Just mine bitcoin because you don't even have to go anywhere. You can just colocate these in your own facilities and the footprint is so small, they're traveling in these mini huts where you can stack up these miners together and just mine on site and that you have a demand for there. So that's why I'm saying I think the grid will have to pay up a premium on top of the bitcoin mining for them to be incentivised to sell to the grid. And that's going to have massive ramifications for the energy market, which will completely change the game, I think, especially for all these advanced new technologies or other renewable technologies in the future. Yeah, peru is exactly right. We already have one example. Talent energy is building 150 megawatt mine as a joint venture with terror at Susquehanna nuclear generating station in Pennsylvania. That's going to be electricity that's flowing directly to their bottom line as bitcoin. When that announcement was made in July, after like a preliminary sort of heads up in an investor call in March, I was shocked that it happened that quickly. I mean, I'd been doing a lot of thinking about that and I didn't think it would happen as quickly as it did. Now that it has, now that they've broken the seal and, you know, as operators get their heads around this and understand that there are a variety of different models that they could use, they can do a straight power purchase agreement, they could do a joint venture. Maybe they do something as simple as taking some of the ample real estate they have inside the wire at these plants and just leasing it back to the mining company and maybe granting them access to office space for them to base. The employees are going to service that site and you can rely on the industry best security in nuclear. Physical security is credible on our planet. I think you're going to see more and more of these again. I talked to an industry executive just a couple of hours ago. He said he's up to his elbows and bitcoin miners coming to him. Okay, so it's happening. I'm doing my best to educate my members. I've held three webinars this year on the opportunity in bitcoin. I've been asked to establish a bitcoin cryptocurrency task force within NEI. We're going to be doing more events like this. So yeah, we understand what the. Opportunity is we're moving as quickly as we can and we're trying to get our people as comfortable as possible with it because we think there's a great future in it. That's insane. It's insanely awesome to hear all of that, especially, you know, building a task force internally to focus on this sort of stuff. Whoever that executives up to his elbows, he'll be, I'm sure, up to his eyeballs before too long or too much longer. But we're sort of at the top of the hour here and we want to wrap up relatively shortly. I wish we had time this conversation to go on for at least a couple more hours. This has been insanely bullish and insightful and like, just hearing you guys, you know, working full time in the nuclear industry, echoing a lot of the same things we talk about in our own niche, twitter circles and communities, we are speaking the same language and thinking along the same lines and it's incredibly, incredibly bullish. ", + timestamp: '00:54:47-01:00:12', + topics: ['Bitcoin Energy Baseload', 'Bitcoin Mining', 'Bitcoin Education'], + type: 'youtube', + weight: 7.779880290018898, + }, + { + boost: 0, + date: 1596686400, + description: 'Impact of [[Electricity Consumption]]', + episode_title: 'Chat 45 - Bitcoin an Energy Revolution A panel at the VOB Conf', + guests: [ + { + name: 'Tone Vays', + profile_picture: 'https://pbs.twimg.com/profile_images/1416821178266787844/T1OkI9ZW_400x400.jpg', + ref_id: 'da6fc991-7080-461c-86e3-4ac18c2f413d', + twitter_handle: 'tonevays', + }, + { + name: 'Phillip Sandner', + profile_picture: 'https://pbs.twimg.com/profile_images/1043824764161335296/2SW3duCV_400x400.jpg', + ref_id: 'e1996e82-0354-421c-85d5-f18eebec9506', + twitter_handle: 'philippsandner', + }, + { + name: 'Jesse Peltan', + profile_picture: 'https://pbs.twimg.com/profile_images/1123954968636088326/EAjHUGDE_400x400.png', + ref_id: '96309505-caeb-47bb-a1ba-712b97292675', + twitter_handle: 'JessePeltan', + }, + { + name: 'Christopher Bendikson', + profile_picture: '', + ref_id: 'd72ead54-7bff-4874-870f-123e665fddfd', + twitter_handle: '', + }, + { + name: 'Christian Stoll', + profile_picture: + 'https://pbs.twimg.com/profile_images/3296579573/69ebedb479a9bdb9d536fe887e2d3113_400x400.jpeg', + ref_id: 'ff74d59c-f846-4b16-a5e5-771fb8139f18', + twitter_handle: 'Granddragon14', + }, + ], + hosts: [], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/9e7e229f-2631-4542-b5d7-7fcd502798dc.jpg', + keyword: !0, + link: 'https://traffic.megaphone.fm/CSN6935967461.mp3?updated=1627959014', + node_type: 'clip', + pub_key: '', + ref_id: '30641d73-c61d-47f4-bf37-f78566574dc8', + show_title: 'Bitcoin Audible', + text: "kind of an inherent moral question there as well, is that do we get to subjectively put our values on to them? Like in making judgments over whether or not they can make that choice as to whether or not it is their value or not? And obviously, in a decentralized system, where are you going to do to stop it anyway? It's inherently an incredibly difficult thing to control or alter. Yeah, this gets to a very steep level of freedom versus coercion. Domini, to say that you watching a Netflix show is a waste of our common resources. I mean, that's not my difference. Did anybody compute how much electricity costs to watch 90 minutes Netflix movie? Honestly, there's research out there looking into data centers which is directly linked to subjectivity. So I have one student that looks into Amazon currently for the comfort print of Amazon, where you exactly have streaming as one source of electricity consumption. I made an estimate, I think two years ago of the electricity draw just gaming console Iceland in the United States, and it's on the level of 50 kilowatt hours. I like to make a couple of points here. I think that one of the important points to note is that electricity consumption is not in itself a bad thing. So electricity production and consumption is good, that provides value. The negative side is when there are externalities associated with how that is produced. So if we enable more renewables, more sustainable energy sources through bitcoin mining, then it's a net positive. I think the other part that is important to note here is that in the total scale of human energy consumption, bitcoin is nothing. It is completely dwarfed by any industrial process. Aluminum smelting, like concrete production, steel production. Bitcoin is such a small drop in the bucket compared to any of that, that any effects that bitcoin has on a more financial level, like if there's restructuring in the way that business is done, that will be far more significant than any effect of the direct energy consumption of bitcoin. And I have to interject there too, that there is something important to keep in mind. When you look at different people comparing energy consumption, they very often talk about electricity consumption on a national scale. But that's not energy consumption. The electricity consumption of the country is only a small part of their primary energy consumption. So electricity is only, I think, a small double digit percent of the total energy that we go through as a species. Sorry, go ahead. But I was going to say, in addition to that, not only is electricity a smaller percentage, electricity is a sizable percentage of total consumption, but for a given country, a huge percentage of energy use. Of most countries, energy use is outsourced. So if you're not a country like the US. Or China that's manufacturing for the world, and you're a country that's importing, you are artificially reporting lower energy consumption numbers. Because all those products that made that everybody uses, those emissions are reported under China or they're reported under the US. But in reality that's still energy consumption. So it's not ", + timestamp: '00:21:14-00:25:05', + topics: ['electricity consumption'], + type: 'podcast', + weight: 7.691150903701782, + }, + { + boost: 0, + date: 1632355200, + description: 'Accessibility and the price of manufacturing potential ASIC home miners ', + episode_title: 'The ASIC Mining Hardware Market', + guests: [ + { + name: 'Vincent Zhang', + profile_picture: 'https://pbs.twimg.com/profile_images/1158285609196109825/fuB-e6lm_400x400.jpg', + ref_id: '98e7bc98-3a3b-4ddf-9b48-5dcd78973739', + twitter_handle: 'Whatsminer_MBT', + }, + { + name: 'Vincent Vuong', + profile_picture: 'https://pbs.twimg.com/profile_images/1260974518547312640/n47yvbNL_400x400.jpg', + ref_id: '8390e230-e36b-4e0d-9f5d-70c6635bf3c2', + twitter_handle: 'BitcoinVincent', + }, + ], + hosts: [ + { + name: 'Will Foxley', + profile_picture: 'https://pbs.twimg.com/profile_images/1580970227193376776/9oQfeExj_400x400.jpg', + ref_id: '704b9e82-3e40-40b6-874c-6bb8fadafbef', + twitter_handle: 'wsfoxley', + }, + { + name: 'Zack Voell', + profile_picture: 'https://pbs.twimg.com/profile_images/1595803006737448961/fFrf7VJb_400x400.jpg', + ref_id: 'e32c7661-c635-4089-a620-ffce509eff0e', + twitter_handle: 'zackvoell', + }, + { + name: 'Compass Mining', + profile_picture: 'https://pbs.twimg.com/profile_images/1425165074373791744/f2CgInvP_400x400.jpg', + ref_id: '812e5d37-47fb-4077-915f-df52e2ef84d8', + twitter_handle: 'compass_mining', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/ae91fac6-a1af-4877-9a92-e793d556ee66.jpg', + keyword: !0, + link: 'https://www.youtube.com/watch?v=qKeUCNXa4Uc', + node_type: 'clip', + pub_key: '03c18d0c6c35333f22bc524e21a5fd1d2d9886f5d4d958dc1de95d025de5c84cfc', + ref_id: '8dbb367b-5cba-4f05-a1db-104d0c66b579', + show_title: 'Compass Mining', + text: "shift this exact same conversation into the accessibility and the price of manufacturing of hardware with a slant towards retail or home miners or hosted miners. If Damien doesn't mind throwing up my screen one more time here, I'll share it for you. In the market multiple times over the past, over previous market cycles, we've seen sort of small gimmicky devices that try and make it easier for people to mine at home. This one you see here, featured in a CNBC article with a variety of inputs there on some little plastic power strip is the latest version. We've also seen companies like Coin Mine try and offer products like this. How viable, long term or at all are these types of hardware devices when you're looking at a market filled with like top tier leading hardware, like what's miners manufacturing? And will this ever have sort of any place in the hardware market or are they mostly cyclical gimmicks that catch headlines, maybe sell a few units, but don't really have any profitability or long term lifespan? Curious to know both of your thoughts on these little devices we see popping up all the time. Vincent from what's minor? I'll toss it back to you and then Vincent from Compass, I want to hear your thoughts too. Yeah, so what we can see is in the year 20, 17, 20, 18, so people can easily mine at home because at that point of time the power consumption of the minus is lower and so the current brought by the minus is not so high. However, since 2019, so almost all the minus switched to more than 3000 watts. Okay, like our minus is 3400, 500 watts. So based on the 220 watts power, so the currency of the minor goes to 16 amp. So it is higher than the staff at home appliance at home. So we can see that some investors or some individuals, they have interest to invest because they might have some capital available, cash flow available, they just want to buy some minors and put it at home for mining bitcoin. So no matter this is interest or is kind of the investment, however, there are a lot of people try to do that. So from our point of view, this will not become the mainstream. Okay. Because right now you can see that the mining facility data center are becoming bigger and bigger. So earlier you hardly can see hundred megawatts mining farms. Right now you can see even one gigawatts mining data centers. So all those data centers are hosting the miners, most likely from the big investors. So this will consume, you can say 99% or 95% at least the supply capacity from our site. So the strength of our R and D will not be put to the 5% market. However, right now what we are trying to do is for mining business, one of the most important factor is that the power cost should be lower as much as possible. As lower as possible. So what we are trying to look into is how to reutilize the heat generated by the minus. So if we can reuse those heat generated by the minus, which means, for example, if we can share those hit at the power cost that we paid, which means you reduce the power cost to 20%, right now you have. So that's why we are looking into those areas. So how we can reduce the operation cost of the investors as much as possible. So that's why we spend a lot of time and they invested a lot into water cooling minus and the immersive mining minus. Okay. Because by concentrating more hardware together, so the heat generated by the miners may be reutilized in some of the cases, so it will reduce the cost of the mining. Okay, so this is the area where we are trying to work, because what we can see, at least from my side, I can see that the power cost of individual at home, actually it is not competitive. Okay. This will require the individual. Investors always should upgrade their or minus with the latest power efficiency ones. So otherwise it may not have the good profit level as they expected when the time goes. This is the share from my side. Yeah, it's interesting to see all sorts of creative solutions that homeowners try and make. And over the past year or two, or maybe a little bit more, we've seen, like you mentioned across the board, a crazy push to expand immersion mining tools and heat reuse tools for all sorts of novel and creative use cases. Again, to sort of maximize the amount of utility we can get out of a mining operation and sort of trim costs as well. Vincent, same question to you. Like what sort of utility or place in the market, if any of these sort of, not to be too critical, but kind of gimmicky small machines have when people are trying to look for cheap, affordable ways to start mining? Yeah, for sure. For me, I think that these smaller miners are like, especially retail miners. They're not 100% profit driven, so a lot of them are. They need to find alternative use cases. So a lot of people will run a minor instead of running a heater. Same thing, a little bit louder, but you still can heat your entire force. So by doing that, you kind of get two and one, and you're also mining some big one at the same time. And there's also people that are also interested in doing lottery mining. Lottery mining is basically solo mining with one machine where you have one in a million chance of getting it. But that's way better than winning it's, better odds than winning the lottery at least, right? So there's people that will do that and run their machines at Lost. And then there's people that just want to support the network as well, right? So people that want to just support the network, run a machine and kind of like put their vote in, cast their vote in, and that's totally fine. Not everything in the world is entirely profit driven. And then there's also use cases where sometimes when people have a solar set up in their house, right, the solar curve kind of goes up like this over time, where the peak happens in the middle of the day. In the middle of day is when people aren't at home. And so what you can do is you can start utilizing miners to kind of use that power when it's peaked, when you're not using anything else. And so there are a lot of alternative uses for these kind of small giving miners that allow retail to kind of keep themselves competitive. I think that's the best thing about retail miners is they can take advantage of these, whereas for the large institutional players, it's a lot harder to kind of push that kind of stuff through because there's a lot more involved with regards to the decision making and everything. For me, I think the simplest solution is like a retail investor, and I'm not trying to be a shield or anything, but it would be to purchase from Compass. The whole solution is very simple. Like, you don't have to invest in infrastructure, you don't have to invest in upgrading electrical, and you have to deal with the heat, the noise, the screen. It becomes a lot more simple like that. But there is definitely a larger subclass of people that want to get their hands on a minor and get dirty with it and try to find use cases for it. And I think there is a time and place and everybody in retail has the opportunity to do that, especially right now, when it's profitable for everybody. You can't guarantee that for the future, but as long as you find an alternative view sport, it's doable. ", + timestamp: '00:25:59-00:36:02', + topics: ['ASIC Home Miners'], + type: 'youtube', + weight: 7.590939760401884, + }, + { + boost: 0, + date: 1639872e3, + description: 'Big States and Small States', + episode_title: + 'PFP016 Remigijus Šimašius, Bullies as Neighbors-on the Foreign Policy of Small Countries (PFS 2008)', + guests: [], + hosts: [], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/624262ef-b30f-4114-8061-e310187e6bb4.jpg', + keyword: !0, + link: 'https://www.youtube.com/watch?v=0WAituFO614', + node_type: 'clip', + pub_key: '02574d6e8e787372184b6f17c40d6c6fe1777db9015801f95dfd24692784d767cd', + ref_id: '4369ba7b-c9c8-4bf8-906a-1d8e27b1558b', + show_title: 'Property and Freedom Society', + text: "private privilege for people those days to discuss about imperialism and because it is usually not small stages who act such first ones it's usually big stages who start some kind of ongoing work to what you say when people try to draft the practical institution practically is when we discuss theoretical aspects of prior traditional defense but we see that our reality and general public do not allow is never to defend a country because ", + timestamp: '00:01:04-00:06:14', + topics: ['Big States', 'Small States', 'imperialism'], + type: 'youtube', + weight: 7.585623406215426, + }, + { + boost: 0, + date: null, + description: 'Bitcoin non-profitable projects and Bitcoin tipping', + episode_title: 'The Orange Sun 🌞 VISA, MasterCard & #Bitcoin #BOLT12', + guests: [ + { + name: 'Oluwasegun Kosemani', + profile_picture: 'https://pbs.twimg.com/profile_images/1538403135101800450/sO-RPI9U_400x400.jpg', + ref_id: '25ce4b90-6689-4dd9-84b6-240c7bcbe407', + twitter_handle: 'MrlamilamiKosch', + }, + { + name: '~₿ Maxi~', + profile_picture: 'https://pbs.twimg.com/profile_images/1446241859651637250/i67F3y9p_400x400.jpg', + ref_id: 'ad997ae7-0726-431a-9f72-82da091c0658', + twitter_handle: 'fede0891', + }, + { + name: 'TK☣️Ph.Ple₿', + profile_picture: 'https://pbs.twimg.com/profile_images/1505791887415730177/d0YDQ3Xc_400x400.jpg', + ref_id: '9e3ffa2c-9410-48e9-a726-8312c0abcd7c', + twitter_handle: 'ToxiKat27', + }, + { + name: 'FireBurs†s', + profile_picture: 'https://pbs.twimg.com/profile_images/1517827165198458880/N79Wpx85_400x400.jpg', + ref_id: 'cda1d3ad-dd80-458b-a5fb-a28861df10a7', + twitter_handle: 'FireBursts', + }, + { + name: 'Nikolai Tjongarero', + profile_picture: 'https://pbs.twimg.com/profile_images/1578458155964682274/_SzDxkAJ_400x400.jpg', + ref_id: '821ee040-2267-454e-a59a-92da51568afa', + twitter_handle: 'BitcoinNaijaShw', + }, + { + name: 'ブランドン', + profile_picture: 'https://pbs.twimg.com/profile_images/834861311762649090/N0KAP4zH_400x400.jpg', + ref_id: '3d41531d-6a59-4771-81f9-0924b4c02561', + twitter_handle: 'blario', + }, + ], + hosts: [ + { + name: 'Satoshi’s Journal', + profile_picture: 'https://pbs.twimg.com/profile_images/1598641632601047042/qrZMP5Oy_400x400.jpg', + ref_id: 'd977ed11-09b0-4143-828d-582ecb8b58ca', + twitter_handle: 'SatoshisJournal', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/9b2e17f2-71c5-4f1e-a3e7-720d06dab810.jpg', + keyword: !0, + link: 'https://stakwork-uploads.s3.amazonaws.com/uploads/customers/2707/media_to_local/94a86a32-91c2-4717-b5cb-b36cef925776/38decc02-c922-4c1d-a605-7cd54c91a01d.mp3', + node_type: 'clip', + pub_key: '03c18d0c6c35333f22bc524e21a5fd1d2d9886f5d4d958dc1de95d025de5c84cfc', + ref_id: '5e6d5d88-bdb0-4350-8c03-13b0a24d3050', + show_title: 'Satoshi’s Journal', + text: "else was I going to go over? Did I forget anything on charitable stuff that we're working on? Oh, master Gaunte is going to be coming out with a video. I'll give you guys a sneak peek. So we came upon a project, eva Kamani. She came to our space. She's actually going to be working with us out of Kenya. And she brought to my knowledge, a children's. I don't know what they call it, actually. It's not a school. It's like a kid house or children house where they take care of children by providing them food and water and maybe some education. And it's been a while since I read up exactly what they do, but she bought it to my attention. The guy that runs it has been running it for years. I think he has like 30 kids that he takes care of. And when I heard about it, I told her, hey, I want to help them. Master Gaunte is going to go and do a documentary and orange pill them. So we're not just going to give him satoshi orange pill them. So that's an up and coming video. That's the sneak peek. So someday you guys will see a pretty cool video of us orange peeling. And then at the same time, if we can get them to the point where they understand what bitcoin is, this children's home actually could be the first children's home that accepts bitcoin, and they could actually end up making a bunch of more children home. We all know that the value of bitcoin is going to go up. So those first few businesses that start, whether they're a nonprofit or not, the compounding effects of bitcoin over time is such that this one children's home could actually unfold and fund a bunch of others if they use the bitcoin that we donate to them wisely. So that's one of the biggest reasons why if you have a chance and you're so inclined, you can send a few sets. I think the best thing about bitcoin is you can send freaking one satoshi, ten satoshi, 100 satoshi. Anyone can afford to send one satoshi is $0.04, last I checked. I think it's less now. Anyone has the capacity with the lightning wallet to send ten satoshi's, and every satoshi counts. And you can't do that with dollars. You can't send half of a penny to somebody with not even visa. It's not like you can physically get a penny and cut it into multiple pieces. With bitcoin, you can send freaking increments of a penny and increments of a satoshi. I've never sent microsets. Have you ever sent microsets, olu or tk? I've never done it. But my understanding is one satoshi can be actually denominator. You can actually send parts of a satoshi. So from a charitable standpoint, there's no excuse, so to speak, because there's no room for someone saying, well, I can't afford one satoshi, I can't afford a fraction of a satoshi. Every satoshi counts. And in the end, when we get the dollar SAP parity dollar SAP parity, meaning that one bitcoin will someday be worth that 100 million, I think. So that's why literally every set counts. If you can send satoshi to somebody in central South Africa, central America, anywhere, get them orange filled, support them, send them the stats, tell them the importance of saving those stats. I'll tell you an example. It was actually Alexander the Great. Oh, so go ahead, be maxi, because I've been talking long time. Go ahead, it's fine. I was just curious because the first time I heard about what's like a micro, as you said, like micro. My understanding, simple understanding, is that once the toshi can be, you can send transactions via lightning in such a manner where you can send parts of a satoshi. So a satoshi can be divisible into. What they're called, and they're actually not defended by your actual node. That's what makes it so hard to actually defend using such a thing, because the milestones that are in between you and your channel partner within the lightning network, the nodes don't defend those. It's like a weird tracking system they have for the like it's almost like dust limit type stuff. If your partner channel closes it, and for close to your channel, those milliseconds are lost. There's nothing guaranteeing that you get those milliseats back from that other person, from your counterparty, because they really don't like it's, not really. They don't really exist. So this is how we get into this argument of all bitcoin is divisible infinitely. And that's not how it works. You can't just keep dividing bitcoin forever. What ends up happening is you end up just multiplying the supply because then you'll have a smaller denominated unit that's actually going to be worth more because it's smaller and more divisible. Therefore it would be a secondary monetary asset on the network itself. It's a very nuanced topic, but once you get down to integrity of it. So is it more like, let's say sorry, is it more like a theory, some sort like conspiracy theory that some people believe you can, like, you know, create? Like Microsoft like today is very small unit of a sad essentially. Essentially that's what it is. Because bitcoin itself only recognizes the units individually, which is 2.1 quadrillion satoshis. That's all there ever is. Well, with lightning, we have the ability to send fractions of those satoshis which are denominated as millisats. The only thing is when you settle those millisets, that those millisets can't get settled on chain because they don't exist. So you see where we have this dichotomy of when you lose a channel partner. Those milliseconds are just dumb. That's why if your balance is that small at closing time of the deal on the chain, you won't see your balance because there are many sites. They. Only exist within the lightning network. And that's it. They don't exist anywhere else. Yeah, that's what lightning network is going to take over everywhere. Because if your balance is that small, this is very, very small. But of course can be broken in lightning. It's long. You will get any transaction that you do. But with lightning, you can actually still have something still smaller than the smallest partnership. Actually, you can have something so smaller than that. And I think everything will be repricing bitcoin, because everything will not be valuable if one start can be equal to one dollars. Jesus Christ. So if you just have 100 and you have $100, and imagine the inflation that would have messed up with the dollar. In fact, all bitcoin has to be the richest in the world. And that's why it's just 21 million. Try and get some guys, please. Yeah. And I'm sure in the future will get to the point where these millisets won't be as theoretical per se. There's not a conspiracy or anything behind it's possible using lightning and the possibilities of lightning are as much as a developer can develop and make things more possible. So we're seeing developments in lightning all the time. I mean, I just talked about eight companies that are contenders for the I think it's a both for fun competition. Yeah, that one, I bought it like yesterday for the first time. The both twelve that you can they're trying to integrate the onion, like anonymous chat where if a buyer wants to shout and tell them how I'm here or whatever. But I don't know what the issue is because I was listening to someone and they said it was really hard to integrate the bolt twelve. Yeah, no, that twelve is going to be awesome because it allows you to have a static QR code that you don't have to. So right now when you use lightning invoices, they expire and bolt twelve will allow a lightning invoice to be used into perpetuity is how I understand it. And bolt twelve will be we're going to try to get that integrated as soon as possible. It's just a matter of I'm sure some developer has already got it to the point where they're using it and it just hasn't proliferated. But as soon as it becomes basically unleashed in full, then everyone's going to have the ability just to real quickly create a lightning address and post it at their business and that lightning address will last forever. The implications of that are awesome. I mean, that's just one innovation that's happening of many in the future. We don't even know what's going to happen in the future. Open source. So like you can put that on basically any lightning network apps. Yeah, I mean, that's the cool thing about lightning is anybody that develops on lightning, because lightning is an open protocol, anything developed is complimentary of anything else that's developed. So whether you're building an exchange or you're building whatever you want to build on bitcoin or lightning, the open source part of it allows the system or everything on top of it just to get better and be complimentary. So it's freaking awesome, man. I think almost every day I hear something new that's happening. Portland Hodl, he does a space every week and he talks about the bitcoin improvement plan. Yeah, bitcoin improvement proposals. And every week he talks about a new BIP and he explains what that BIP is. So these bitcoinners that are developing on top of bitcoin, they come to the table with a proposal and whether it's implemented or not is a whole different story. But they at least come to the table and they say, hey, we would like to implement this proposal and that's on bitcoin. I don't know if they have a similar thing for lightning. Do they have like a thing for lightning that's like a lightning improvement? They do. I think it is called bulk. I think that's why the bitcoin. Is what you have said. The fact that you can reuse the QR code and look at how interesting that is going to be. I think Bmax was talking about lightning apps, but what about other things like billboard, like your shirts. If you are a walking billboard for Satoshi John, there is a cure code. Boom. Just imagine. Or for any business at all, especially road fines, billboard, books, souvenirs tea cups, frames, just imagine on posters, on stickers, initially on both eleven, we could not use more than one invoice for one transaction. If you try to reuse it, you may be in trouble, you may find yourself in trouble. So that's what is making both twelve very more interesting. Everything that both level does is what both twelve can do and do better. But now you can actually use one QR code on lightning. You don't have to be changing it. You can put it on anything. You can put it on a tattoo. Wow. That'S a really good point. If you were actually to use these static QR codes from both twelve and put them on billboards, put them on shirts. If you're a businessman or woman, you just prominently display them everywhere. People could just literally scan the QR code off the side of your car, off of bill billboard, off the side of your hat. If you do get a tattooed on your shirt, on your skin, I mean jeez, the implications are amazing because people can just send payments to each other using the bolt twelve wherever they put it. ", + timestamp: '01:10:47-01:25:10', + topics: ['Bitcoin Charity', 'Bitcoin Ttipping'], + type: 'twitter_space', + weight: 7.444137096405029, + }, + { + boost: 0, + date: 1677582e3, + description: 'What Micro Loans are and the motivation behind them', + episode_title: 'Ep. 514 The Future of Crypto in the Media with Blockchain Boy', + guests: [ + { + name: 'Lucas Dimos', + profile_picture: 'https://pbs.twimg.com/profile_images/1092408696838197250/n0-St2nZ_400x400.jpg', + ref_id: '9ac17e2f-49bd-4fc5-bfe5-2f380ca63574', + twitter_handle: 'lucasdimos', + }, + { + name: 'Blockchain Boy', + profile_picture: 'https://pbs.twimg.com/profile_images/1602154101642592256/A0OX97CT_400x400.jpg', + ref_id: '4b070a6f-bcc8-4708-abaf-cc830709600f', + twitter_handle: 'BlockchainBoyy', + }, + ], + hosts: [ + { + name: 'Aaron Malone', + profile_picture: 'https://pbs.twimg.com/profile_images/1521495204196503553/abk-5S0m_400x400.jpg', + ref_id: 'bd103540-8c0a-4ab3-b5cd-24a3f2c43ab2', + twitter_handle: 'pizzamind', + }, + { + name: 'Bryce Paul', + profile_picture: 'https://pbs.twimg.com/profile_images/1182725652794892288/QbDOKHcP_400x400.jpg', + ref_id: '0d670dbf-f434-43b6-b454-8e5345d7ee51', + twitter_handle: 'BrycePaul101', + }, + { + name: 'Pizza Mind', + profile_picture: 'https://pbs.twimg.com/profile_images/1521495204196503553/abk-5S0m_400x400.jpg', + ref_id: '16cb01cf-9f04-45db-a440-47259b02b86a', + twitter_handle: 'pizzamind', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/93a6fe5b-364c-43f4-9f38-7da3e811460b.jpg', + keyword: !0, + link: 'https://chrt.fm/track/DD9393/audio1.redcircle.com/episodes/68f31cee-f404-40fe-85d7-a406019e916f/stream.mp3', + node_type: 'clip', + pub_key: '03eb026c3e6597055595e42299377a4e164982775cc67f1d2135d9f1cd3a89f526', + ref_id: 'e2a347d3-a7ce-4200-836e-0c3df94980ce', + show_title: 'CRYPTO 101', + text: "Look at that. Yeah, look at that. Dude, he hooked me up. I bet there's even an espresso shot in there. That's crazy, man. Fantastic. So where was I? Oh, yeah. So you can empower entrepreneurs from other places around the world who need maybe an $800 loan to get more fertilizer for their crops, to double their yield, or who are opening a small store in their community. And it's a way because charities actually can be actually very damaging for local communities. Like with those Tom shoes. You buy a pair of shoes, they ship a pair to somebody who needs them in Africa or whatever, you're putting the shoemaker out of business. It's ridiculous. And you're hurting the local economy by making them dependent on foreign aid. And I don't believe in that. I don't want to give people what they need. I want to give them the tools to get them where they need to be by themselves. And I think that's really what makes me happiest. And so I want to find ways of doing that, and that's just one way of doing that. Yeah, no, I love it, man. So I kind of want to talk back to Tik tok I was just thinking, I saw the other day there was a potential ban on TikTok that, like, lawmakers are out. What's your take on that? You have a quick take? Well, we can choose who we want to sell our data to, but it's going to be sold anyways, and they just want American companies to own our data and not China. But I mean, they just let that weather balloon get across the entire continent in the United States before shooting it down. So ", + timestamp: '00:24:04-00:25:29', + topics: ['Micro Loans'], + type: 'podcast', + weight: 72.76897614568216, + }, + { + boost: 0, + date: 1637366400, + description: + 'Anticipated Bitcoin mining industry and nuclear energy industry intersections in the near future', + episode_title: 'Securing Bitcoin With Nuclear Energy', + guests: [ + { + name: 'Nuclear Bitcoiner', + profile_picture: 'https://pbs.twimg.com/profile_images/1443185278525579278/_Yl1nao1_400x400.jpg', + ref_id: '60f5891f-0864-4ed4-987a-81da4768b3ba', + twitter_handle: 'nuclearbitcoinr', + }, + { + name: 'Eric McErlain', + profile_picture: + 'https://pbs.twimg.com/profile_images/1252969137/Screen_shot_2011-02-23_at_10.59.21_PM_400x400.png', + ref_id: '4815365d-44d0-4b06-9d9e-32070158d03c', + twitter_handle: 'atomiceric', + }, + { + name: 'Puru Goyal', + profile_picture: 'https://pbs.twimg.com/profile_images/1590742805613203456/QAtYq_C__400x400.jpg', + ref_id: 'c24af059-b38b-4ce5-9547-9192c9eff579', + twitter_handle: 'purugyl', + }, + ], + hosts: [ + { + name: 'Zack Voell', + profile_picture: 'https://pbs.twimg.com/profile_images/1595803006737448961/fFrf7VJb_400x400.jpg', + ref_id: 'e32c7661-c635-4089-a620-ffce509eff0e', + twitter_handle: 'zackvoell', + }, + { + name: 'Compass Mining', + profile_picture: 'https://pbs.twimg.com/profile_images/1425165074373791744/f2CgInvP_400x400.jpg', + ref_id: '812e5d37-47fb-4077-915f-df52e2ef84d8', + twitter_handle: 'compass_mining', + }, + { + name: 'Will Foxley', + profile_picture: 'https://pbs.twimg.com/profile_images/1580970227193376776/9oQfeExj_400x400.jpg', + ref_id: '704b9e82-3e40-40b6-874c-6bb8fadafbef', + twitter_handle: 'wsfoxley', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/ae91fac6-a1af-4877-9a92-e793d556ee66.jpg', + keyword: !0, + link: 'https://www.youtube.com/watch?v=YBaA17NODlA', + node_type: 'clip', + pub_key: '03c18d0c6c35333f22bc524e21a5fd1d2d9886f5d4d958dc1de95d025de5c84cfc', + ref_id: '27290854-e30c-4f09-aee9-c6ee23a4854d', + show_title: 'Compass Mining', + text: "thing I would want to wrap up with is a little bit of an open ended, forward looking question. Like we've talked about a lot of the dynamics for bitcoin miners and nuclear power producers to work together, a lot of the mainstream perceptions on both of these sectors. If you had to, I guess, pick one or two things in the very near term future that you're expecting to see. I know a couple of you guys have mentioned that some of the recent developments have surprised you or been larger and faster than maybe you expected. Looking forward to the next two years? What's something at the intersection of bitcoin mining and nuclear energy that you are expecting to see you're looking forward to? Whether it's one particular company or maybe a broader trend in adoption, I'm not really sure. I'll leave that up to you, but yeah. Any expectations, Ryan? I'll hand it back to you. Well, in the next few years, I would love to see bitcoin mining be applied in such a way that we could save the Pickering reactor from being shut down, because that is a travesty. That we're going to lose. That and nuclear power in Ontario is one of the biggest reasons why we were able to eliminate a lot of our coal power. And if we lose a reactor, it's going to just go back in the wrong direction because we've got the refurbishing, the Bruce reactor and the Darlington reactor right now, there's no reason why they couldn't go ahead and do the Pickering as well. But I think one of the big concerns is those demand risks. With more renewables coming online and there are intermittent seats, it causes too many surplus generation events and then it creates massive economic liabilities on the reactors and then they get deemed economical and then they get shut down. And so we now have an opportunity to kind of reverse that trend in a way. And make a big gains in the saving reactors and refurbishing them because we could keep it going for another 40 years easily if we just put the time and money into it. Interesting. That's actually fascinating. Peru, I want to ask you to same question. Anything in particular you're expecting over the next short term? Two, three years? Yeah, not two three years, but I feel like by mid 20s what you'll see there's a lot of these small modular reactors that Ryan been talking about for a while too. I think those are going to come online, either demonstration plans or companies are going to start making them because the life cycle of making constructing these plants is much shorter compared to the full scale plants that we've seen in the past and companies are already developing it. And I think, like I talked about, I think it makes so much economic sense to just mine bitcoin with them until the grid providers are offering you prices which are comparable or a premium on top of the bitcoin mining price. Like if I'm running a nuclear advanced technology company today and I understand bitcoin mining and I'm just like trying to get these reactors online as soon as possible and colocating a mid bitcoin mining rig at the same site. And just mining with bitcoin with it until the grid prices reflect a premium which I'm willing to take and provide my power to the grid. I don't want to bet on the timing of this, but I think we'll definitely see this over the deck and I think it's going to be great to see. I think bitcoin mining industry will also evolve over the next few years for sure, based on just how much hash power is going to come online over the next couple of years. I think both industries are going to benefit from this. That's awesome. Eric? Yeah. Same question. You just wrap up on anything you're expecting, I guess. Well, I mean, when you ask me what's going to happen in nuclear next two, three years, I have to remind you we plan 510, 15 and 25 year increments. So that could be tough. So I'm going to say more of the same. I mean, we had those three announcements in July, talent and Terrawolf energy, harbor and Standard power, and then of course Oklahoma and Compass within like ten days of one another. Bang, bang, bang. It just completely changed the way we look at the world. And I think we're going to see more of that. We're going to see more of that. We're going to see it happen more rapidly. From any eyes perspective, we're hoping that one of the introductions that we've brokered will turn into an actual deal. Whether it's a straight power purchase agreement or something more profound like a joint venture between a minor and an operating plant site. We're crossing our fingers that we'll be able to say we helped something like that happen sometime soon, but I would say more of the same. The one thing that I will think that I'm going to project may happen in five to seven years and it builds up something. Peru said. I think you may very well see an announcement about new build for An SMR where the miner is twinned with the construction of the reactor. That they will happen at the same time, or roughly at the same time. So when the reactor goes critical, that miner will be able to take that power immediately. I think that we're going to see that kind of coordination. I would like to see that kind of coordination between advanced reactor manufacturers and mine. How's that? That's awesome. That's perfect. To seeing some agreement from the other gentleman here on the panel with regards to that. That would be beautiful to see. Getting more conversation in the chat. We're a little bit over time now, so unfortunately we do have to wrap up. But I will say for everyone watching, all three of these guys are on Twitter. Relatively active, but definitely must follows. You can find their handles in the description below this video. It's all three of you. Thank you again so much for coming on the stream, chatting with Will and me. It's been a super fun, informative, insightful conversation. Super glad we found time to do this and that's a route for us here at the Compass Livestream. Appreciate y'all watching. Be sure to like and subscribe if you enjoyed the conversation. Helps other miners find this content. This conversation in particular was just outstanding. So, again, thanks to all three of you. Appreciate your time. And that's a wrap. ", + timestamp: '01:00:13-01:06:32', + topics: ['Bitcoin Mining Industry', 'Nuclear Energy Industry'], + type: 'youtube', + weight: 7.335028414441784, + }, + { + boost: 0, + date: 1670706053, + description: 'Understanding stacks', + episode_title: 'Bear Market Buidl — Major #Bitcoin developments! #Stacks #Sidechains', + guests: [ + { + name: '@GriffdenNFT', + profile_picture: 'https://pbs.twimg.com/profile_images/1604377729062895617/R4pSEdH4_400x400.png', + ref_id: 'dafdf7ec-28c0-43d3-a0d9-b2d266f38738', + twitter_handle: 'GriffdenNFT', + }, + { + name: '@Chad_333', + profile_picture: 'https://pbs.twimg.com/profile_images/1592310541732970496/o1tbw9Eo_400x400.jpg', + ref_id: '484c7695-6a4e-4141-9585-1109bf23f8cf', + twitter_handle: 'Chad_333', + }, + { + name: '@jackbinswitch', + profile_picture: 'https://pbs.twimg.com/profile_images/1601214177439260672/O0SpU5B1_400x400.jpg', + ref_id: '9685e7f3-3e0c-4b84-9fd9-b8a1d96f6ae9', + twitter_handle: 'jackbinswitch', + }, + { + name: '@jimdotbtc', + profile_picture: 'https://pbs.twimg.com/profile_images/1593210347825119237/L_SNThWQ_400x400.png', + ref_id: '5dcf5545-fad6-44ee-ae56-360c5efe1151', + twitter_handle: 'jimdotbtc', + }, + ], + hosts: [ + { + name: '@BigRpic', + profile_picture: 'https://pbs.twimg.com/profile_images/1604962150388219904/WqiCye-r_400x400.jpg', + ref_id: '726f0c95-9d94-4d44-a056-8ad3c9e3ddd5', + twitter_handle: 'BigRpic', + }, + { + name: '@CarlsonDoc', + profile_picture: 'https://pbs.twimg.com/profile_images/1597382056308350977/1NPexynZ_400x400.png', + ref_id: 'e34fa2b2-a58e-4461-81a0-d10c1058dfc2', + twitter_handle: 'CarlsonDoc', + }, + { + name: '@STXLDN', + profile_picture: 'https://pbs.twimg.com/profile_images/1533793338931007488/o3laQDCp_400x400.jpg', + ref_id: '5c3bc906-3aed-44f9-851a-94804c6fe5ca', + twitter_handle: 'STXLDN', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/99046513-2614-4eae-9de4-5781ba4b330a.jpg', + keyword: !0, + link: 'https://stakwork-uploads.s3.amazonaws.com/uploads/customers/2707/media_to_local/fc3bebcb-8271-433e-8d81-84dd06f3b022/aec527bc-539d-4d3b-9bad-db4af9e1a1ba.mp3', + node_type: 'clip', + pub_key: '03c7a7f42d94fdfc7a655515c1421cd1d20db090a1c24150201de0b1dc6a30b0ee', + ref_id: '3008a0a4-d3c8-4d33-aa67-f39e4ce1a87c', + show_title: 'STX:LDN', + text: "Yeah, that's awesome. I definitely agree with the degenerate part, for sure, but no, I'm looking forward to it. Thank you. Yeah, I appreciate that. It sounds really good. Thanks, Chad. Yeah, it's not really what our mentors are maybe pushing us to kind of do, which is more build infrastructure for Stacks, but that's where we can hopefully turn this into a more dev tool for users or creators, I should say builders that want to build on chain gambling games. And yeah, we're really excited about it. Thank you, guys. Yeah, I personally think the more user ability there is like, things to do based on chain I find more appealing than I guess, like, the super techy stuff because hold on 1 second. My daughter just pulled food out the fridge and I'm not even ready to start dinner yet. Yeah. Griffin, you were more of an Ethereal native before you came to Stacks. Kind of like myself, I think it'd be interesting to talk to you about the most striking thing that you notice switching from Eve to kind of get an exposure to this ecosystem, which I find to be completely unique in the crypto space. I hadn't found anything like it thus far. Right. And so when I came here, I'm like, oh, yeah, I'm home. This is where I'm supposed to be. So I think you probably also have some really good perspective where that's concerned. Yeah, I'd love to touch on that. That's a great point, and I'd love to make that clear to you. I missed our conversation the other day. I don't know if you saw my DM on Zoom, but I'd love to catch up one on one sometime too. But coming from Aetherium, I first tried out Stacks maybe three or four months ago, and I guess I truly didn't understand the awesome tech behind it. And as someone who is used to my transactions completing about 30 seconds to a minute, I wasn't super excited to use Stacks. But once I understood that they at the foundation and a hero all understand that's one of the biggest issues users have with Stacks and that they're working on Scaling, then I really realize that this is going to be a viable competitor to the other smart contract blockchains one day. And I'm just happy to be here. Like Trevor had mentioned before, all the noise happens and it's a smaller community. So you guys obviously are a bit more tight knit and respecting to community members, which is something that has dropped significantly in the Ethereum community as it grew. So I really hope that Stacks can find a way to carry on that great culture that it's got right now and be that inviting blockchain that Ethereum and Solana have failed to be as they grew. It's that, like, feels at home type feel. I know exactly what you're saying. Yeah. I mean web three. A big part of web three is community. Right. That's one of the underlying pillars of what it is. And I have faith that this community will be able to grow and maintain its character. I think it's one of the benefits of Stacks, being a community that has been slow to grow. You have guys like Jim and Dash who were here at the very beginning. Right. And so they have such interesting perspective to see how it's shaped so far. Yeah, I think that you cannot have where we're going with being disjointed and just kind of when someone new comes in, they just feel like a mark being ready to be ripped off, right? You need cohesiveness and you need good people trying to go towards a common vision. And the common vision here is having a user owned internet built on Bitcoin, right? That's really what it's all about. And I think that we're off to a damn good start. So I'm excited. I don't worry about us losing our character. I think that the fact that this thing has just been building slowly over the past few years only reinforces the foundation. And that's the thing as well, jack I say this to a lot of people about the build up lap. Because the build up here, if we actually look at things and I know you guys, that Dash and Jim have been here for a lot longer than me, but even I had heard of blockstep when it first came out, and not first came out, I'd say probably a bit later on towards the ICO or the token. So, shall we say. So I'd heard about it and I was a bit dubious because it was kind of like, okay, it's bitcoin not on bitcoin, it's a bit weird. Sounds a bit weird to do another chain. I suppose at that time, maybe I wasn't as experienced. I was just starting out professionally in crypto, so maybe I wasn't that experienced as I am now. But when I first kind of started researching back into it and I've seen stacks and then I started researching and I realized it was block stack, it was like, wow, so this has been here for a long time because I remembered that block stack had been around since even a few years prior to the whole token. So going back and looking at the whole kind of long history of block stack in the game and stacks in its current form, it's been around a lot longer than a lot of stuff, like a hell of a lot of stuff. It actually borders on being around a lot longer than even Ethereum itself. Do you understand what I'm trying to say? It borders on being around longer than the theorem itself. So it's like yeah, I think it's just great to see that at this moment in time with obviously the Stack 2.0 upgrade, we've got 2.1 coming and all of the hard work that the builders that were here before us have done. It just really just seems like it is the right time for this to be out there in the world. And as what Trevor said to Grifton, it's like before the noise comes, isn't it? Like you said, you've got the tight knit community and you've got everybody just building. And because everybody has that focus, as you said, Jack, of the user user on Internet, on bitcoin, nobody's like there's not a million other 29 880,000 different coins and tokens that we're all talking about. I suppose that's one of the key or some of the key elements, but yeah, sorry, Jim, go ahead. I was just going to say, well, thanks for doing this call. It's really been interesting hearing you guys, and thanks for all the big intros, jack it's actually really interesting just even listening to this call and taking myself back to the same sort of point in the last cycle, because I think Dash and I were kind of working with Stacks probably around 2017, possibly a little earlier. I think it was interesting as we we imported one of the we imported the first two way bitcoin ATM into the UK in 2014, and it was just a big, you know, it was a big bet on bitcoin. And, you know, we were, we were thinking about remittance and, you know, the difference it was going to make for, you know, the world's unbanked. That was kind of the initial reason we got into it. And so we met quite a few really interesting people, not being not crypto people prior to that. So we were actually musicians working in the music industry, so it was a steep learning curve. But we met this guy, Mike Cohen, who's one of the core developers on Stacks now. I remember him coming into where we had the ATM, possibly around 2015, and saying he was like, oh, have you heard of ethereum? There's a big thing coming along, it's going to be really exciting. It's got the security of bitcoin in a way, but it operates really quickly, so you can have these things called smart contracts. And, of course, I'm going into my old work in music and thinking how we could set up all these amazing payment mechanisms where a stage manager presses a button to say that the band has finished the gig, and then there's this whole domino effect of payments. And then by the time you get on the bus, you've been paid. That sort of got us thinking. So I really got into a theory briefly, but Mike had already said, this is what we're kind of working on is doing on bitcoin. You know, it can be done on bitcoin, right? And this is just vitalics kind of jump the gun. It's really, really cool, but it should be done properly, it should be done in a different way, and it will happen. And I think he was already involved with Blocksack, and then, yes, probably a year or two later, we started doing this stuff, this at Mining, which didn't really work too well. I think it was a bit of a scrum for just lots of people with lots of ideas and no real central. It just didn't feel like it was really working. And then I think that was running up to the beginning of sort of 20 end of 2020, beginning of 2021, when it felt bit similar like this. You know, things were just about to sort of certainly with Stacks, the main net was about to launch, but there was no one really there. But there were people coming in. It was a really exciting vibe. Lots and lots of community, really great sense of just a handful of you sort of doing this really exciting stuff. And I was just buzzing because for years I've been thinking, this is coming and suddenly it's here and we can make NFTs. And so I'm like, we got to go big. And then dash. And I like, let's get fat, boy slim. It struck me, the last big Whiff and Brighton fat Boy Slim was the last big sort of global superstar that came out of Brighton, which was why Thoughts instantly went to go, let's get Fat Boy Slim on board. But it was just such a funny environment because we started with all these huge names. Fatboy Slim, Cara Delevingne, Orbital, Dave Stewart from the Arithmetic and Chemical X got them all together, all through various we're friends with a lot of people through music anyway, and Chemical let's very good friends with Kara Delevingne. And so we then march these guys into this empty network and it was a hell of a sales pitch, I tell you, because we were saying, this isn't going to be the hype that you're expecting. If you go and do this in a theorem, yes, it will be worth you probably make millions out of it, but this is bitcoin and in ten years time you're going to be revered as Legends for being so ahead of the game for doing this. So we did manage somehow to get them in, but then it was funny because there just was no one there. We were lucky that we sold, I think the Car One sold for 20 or $30,000 worth of stacks, which she gave to her charity. So that was really successful in that. We got some noise out there, but I guess I was thinking things would move a bit quicker. I got kicked out of so many reddit and different groups for going in there and trying to say, hey, this is it. This is the thing everyone's been waiting for. And everyone's just like, shit coin, shit coin to get out. I mean, I just got kicked out so many forums and just everywhere I went, the moderators just kicked me. And I mean, I can't necessarily blame them because at the end of the day, as we've said, there's this huge number of pointless coins and you know, 99.9% of them are just scams. And so you can't blame someone's defense mechanism for that. It's operating correctly, ultimately, to call me a shit coin, but I'm just in there trying to say, research, look into this. This is the way that Vitalics should have done. It kind of unfortunate. They probably had this minibus idea was at the same time or around the same time, but he just wanted to do it properly, which was another thing I was especially at the time, back in 2018, 2017, the Tether thing had been massive. There. Was this whole security thing was just flying around, and it was like, this is the right way to do it. But at the same time, the whole time that Stacks was trying to decentralize to the point where it could start bringing in the audiences, the ethereum mess was just growing. The off bitcoin, blockchain, unmined kind of mess was just growing at a rate of knots. And it's just kind of sad that didn't kind of just have that leap of instead of burning, because they always knew burning was bad, and that's for people who don't know. That's how theorem kind of started. You had to get value in there for people to stake, and mine and all the rest of it, it was burning bitcoin. And so the quicker they got that value locked into ethereum, then they got people going, okay, we've got a network here, and we're all supporting it, we're all invested. And if only you'd had the thought to just do proof of transfer, because we wouldn't have this whole mess, we wouldn't be here now. We'd all just be in that. I don't know what it would have been like, but it'd be a very different world if everything had just had just started from here. But here we are trying to do it. But yes, it feels like a really big battle now, because it was really interesting when we had that Sappy Seals thing a few couple of months ago. I think that was really interesting. It was someone with an enormous following on a theorem doing kind of follower farming or something, just trying to go out and get people to follow on Twitter, and just said, I'm thinking of moving to Stacks and everything. Everyone on Stacks flipped out and go, quick, I'll post on this guy's thing. He's got 100,000 followers a day. But what was really interesting was that was what triggered the BNS rush, because all these people that kind of I've been trying to get my voice into their forums, they suddenly just got introduced by a person who wasn't going to get shut down, and he was even trolling in a way. But suddenly these people, all it took was someone to say, there's something you can do with bitcoin. And then the cleverer of those lot looked into it and then went, holy shit, this is a really cool idea. And then it was a really amazing event, and it does fill me with confidence that we're in the right place, we're doing the right thing. But it is quite a battle going through this and actually getting everyone to kind of get on board. I was shocked by the bitcoin conference when I went out to Miami, went down to the conference on the Friday I was with Drew Falkman, and we went in and we were just instantly taken by just a funny vibe. And we'd been talking about I was going out there with a special work of art that I really wanted to get into the conference and went down there and they were just like, no stacks there's. No stacks. NFTs are allowed in here. But in the center of the conference was a huge array of screens selling Ethereum NFTs. And I was quite shocked, I was quite shocked that it was preferred to put Ethereum NFTs on screens in there and somehow put it under an umbrella of being valid at the Bitcoin event. But that was shut out. And then I got a photo, I think, of which one was it, Miami Coin or New York Coin? It was the closest we got to that conference was about three blocks away and I've got a photo of this truck with just a flatbed lorry with a Miami Coin sign on. And I kind of felt at the time that there was a bit of a bit of a there's like a kind of old boys club already in Bitcoin with these guys from I guess from Block Stream that started all this stuff with side chains and they kind of create they were kind of, in a way, the original Bitcoin accelerator, I guess. But they were going down a route of everything being federated and centralized and so now we've sort of got it from both sides. We've got established businesses who have an inferior way of operating, basically, and a business model that was always going to get swamped by decentralization eventually. Maybe they thought they'd have a bigger head start, I don't know, but now they're definitely not happy about stacks and doing it on. There was a big thing with Adam back and maneuver on Twitter. Manev was being very reasonable and Adam pack just kept going back to pre mine, pre mine and lack of Bitcoin miners, which I couldn't actually disagree with him with the bitcoin mining thing, which sounds like this new upgrade is going to allow decentralized mining, which could in the perfect world, you've got everyone in Bitcoin. Like, again, if I think go back to Vitalic, if he had done what Mane did, I think at that point the small Bitcoin community would have said, it's our job now to mine this smart contract network. So while it's just automatically assigned 1% of what you're holding to mine, we'd just be in this amazing world where this smart network is just accepted as being a good thing, but instead we kind of got to fight for that. But decentralized mining is a massive step towards that because that does allow people, hopefully to mine with very small amounts, which will be that's a game changer because that's when we can just start getting people. That argument then falls away once you've got the centralized mining, that argument goes. The other arguments were just, in my opinion, bullshit, because the whole pre mining thing, it's like, I mean, look at Bitcoin, look at him. And every successful network kind of started that's the process of decentralizing who mines it. In the beginning, it's just kind of got to be done. And it sounded like an argument of a corporation fighting against something that they know is good and know is competitive and know is worthwhile, but they're going to argue it till they're ready in the face that they're going to find some some issues with it. So anyway, yeah, it's been a long journey, but it's really nice hearing you guys tonight and seeing some new people coming on. It does feel like we're just getting into that bit where the markets have kind of got close enough to the bottom that people start kind of moving again and then some people are looking for other change while things are down, they're looking around and some people are coming here and finding this amazing network. And thanks for letting me go on, Jim. Totally, totally. Respect goes out to you, my brother. And it's funny hearing your story as well, especially yourself being from the UK. Because part of the reason why we started up Stacks London, we kind of just started off out of the blue because I've been around in the space for a minute and I've not really seen anybody talking about Stacks since, you know, the old block stack days. So when I, when I really dove in in 2020, I was like, you know, after a couple of months, I was like, well, what's going on? And I'm going to all these events and speaking to all, you know, same people and same networks, and it's like, nobody's talking about Stacks and talk to people about Stacks, they're like, you know what, Stacks? And then now go block stack. And they're like, oh yeah, block stack. You know, we remember block Stack, like. What'S going on over there right now? So it's really weird. And then there's a lot of synonymity as well, with your early story as well, because, I mean, my first real kind of, I would say, dive into learning about bitcoin was around 2013, 2014, and then when I first kind of discovered, let's say, all right, blockchain and what blockchains are and how blockchain operates wasn't until like, a year later and again, coming from a music background, my first thing was, okay, so when you said that bit about people getting paid, I swear that we literally had that same we was in the studio having that same conversation. I think everyone who got in at that time immediately, if your mind operates quite quickly, like a lot of, I think, builders minds do, you do tend to jump instantly to the ultimate solution, which is like, oh, look, here we go. Everyone in the world who has a phone now can transact with anyone else in the world. Great poverty is kind of on its way out, but now later on, you're like, yeah, we're ten years into this game now and it still feels a long way away. Even in terms of just that kind of accessibility for people. That focus really isn't on remittance, I guess it's more on certainly now it's like on people sort of surviving and building businesses and making money. But it would be great once that kind of rush gets in the same way. Like the.com bubble, it's like this massive rush and then afterwards the really useful shit sort of starts happening and hopefully we'll sort of get to that point soon when the real thing that bitcoin has to give humanity can really start working for people. Yeah, definitely. I think that's part of a lot of people's entrance into Stacks as it being stacked rather than Block Stack is that kind of frustration. I think that's where it definitely sits for me, having that frustration that you're watching this thing play out all over again and everybody's heads just in the clouds and you've got all of these new people coming in. Nobody wants to let people or teach people the actual core fundamentals. They just want to, I feel like, a feeling of they want to sell their particular idea. So I feel that a lot of projects have just completely run away with that. And again, not to say that there's not a lot of other great projects out there, let's say Blockchains and the technology and cryptocurrencies themselves do kind of provide that open medium for people to create these ideas and do these things. So that kind of what you said about walking in the room and everybody's like, we don't want to do anything different. That kind of Maxi rooms where we just want to stick with just this. That is an absolute ludicrous idea. I've said this in plenty of Maxi spaces, so if any Maxis decided to jump in there, it's no different than what I say in their spaces. At the end of the day, ", + timestamp: '00:24:51-00:48:54', + topics: ['Stacks', 'Web 3'], + type: 'twitter_space', + weight: 13.500243841282398, + }, + { + boost: 0, + date: 1632355200, + description: 'Vincent Zhang and WhatsMiner introduction', + episode_title: 'The ASIC Mining Hardware Market', + guests: [ + { + name: 'Vincent Zhang', + profile_picture: 'https://pbs.twimg.com/profile_images/1158285609196109825/fuB-e6lm_400x400.jpg', + ref_id: '98e7bc98-3a3b-4ddf-9b48-5dcd78973739', + twitter_handle: 'Whatsminer_MBT', + }, + { + name: 'Vincent Vuong', + profile_picture: 'https://pbs.twimg.com/profile_images/1260974518547312640/n47yvbNL_400x400.jpg', + ref_id: '8390e230-e36b-4e0d-9f5d-70c6635bf3c2', + twitter_handle: 'BitcoinVincent', + }, + ], + hosts: [ + { + name: 'Will Foxley', + profile_picture: 'https://pbs.twimg.com/profile_images/1580970227193376776/9oQfeExj_400x400.jpg', + ref_id: '704b9e82-3e40-40b6-874c-6bb8fadafbef', + twitter_handle: 'wsfoxley', + }, + { + name: 'Zack Voell', + profile_picture: 'https://pbs.twimg.com/profile_images/1595803006737448961/fFrf7VJb_400x400.jpg', + ref_id: 'e32c7661-c635-4089-a620-ffce509eff0e', + twitter_handle: 'zackvoell', + }, + { + name: 'Compass Mining', + profile_picture: 'https://pbs.twimg.com/profile_images/1425165074373791744/f2CgInvP_400x400.jpg', + ref_id: '812e5d37-47fb-4077-915f-df52e2ef84d8', + twitter_handle: 'compass_mining', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/ae91fac6-a1af-4877-9a92-e793d556ee66.jpg', + keyword: !0, + link: 'https://www.youtube.com/watch?v=qKeUCNXa4Uc', + node_type: 'clip', + pub_key: '03c18d0c6c35333f22bc524e21a5fd1d2d9886f5d4d958dc1de95d025de5c84cfc', + ref_id: '3cb5fd13-1b10-4dc0-b8e3-f2fc0f1ec406', + show_title: 'Compass Mining', + text: "the two Vincents are going to unload a lot of information, insights and some fun opinions on us. This conversation, I want to give you both a chance to introduce yourselves, give us a little background on sort of how you got into the mining industry and your focus on the ASIC markets. Vincent, from What's Minor, do you mind just introducing yourself and giving us maybe a brief history of What's Minor and what led up to where you are today? Yeah. So I should say good morning. So here it's midnight in China. My name is Vincent. Right now I serve in as a sales director in Watts Minor. So actually there's a small story for myself being in this industry. So before I joined What's Minor, I was working in telecommunication industry. So I worked in DT Corporation for 14 years. I sold a lot of telecommunication equipment to India. However, in the year 2018, I just quit the job, my previous job, and by chance I got joined in What's Minor. And so when I joined what's? Minor? So actually the situation of Microbity What's Minor is not as good as right now we are because though we released the most efficient minus based on 16 nanometer from TSMC, however, we were not able to get a sufficient supply capacity in the year 2018. And of course, everybody knows that the mining profit in the year 2018 is not so good. So due to these reasons, the situation of What's Minor in the year 2018 is not so good. So however, this situation get changed in the year 2019. And so myself is very pleased to join work with Microbity as Sales Director because starting from the year 2019, so we export more business chances outside of China. So we can say after I joined what's minus, our overseas market enhance a lot, probably later via the conversation, so we can share more information about What's Minor and myself. But I'm already in this industry for three years. ", + timestamp: '00:01:34-00:05:06', + topics: ['Vincent Zhang', 'WhatsMiner', 'minor'], + type: 'youtube', + weight: 7.285317421145426, + }, + { + boost: 0, + date: 1677582e3, + description: "Lucas' real dreams and goals in life", + episode_title: 'Ep. 514 The Future of Crypto in the Media with Blockchain Boy', + guests: [ + { + name: 'Lucas Dimos', + profile_picture: 'https://pbs.twimg.com/profile_images/1092408696838197250/n0-St2nZ_400x400.jpg', + ref_id: '9ac17e2f-49bd-4fc5-bfe5-2f380ca63574', + twitter_handle: 'lucasdimos', + }, + { + name: 'Blockchain Boy', + profile_picture: 'https://pbs.twimg.com/profile_images/1602154101642592256/A0OX97CT_400x400.jpg', + ref_id: '4b070a6f-bcc8-4708-abaf-cc830709600f', + twitter_handle: 'BlockchainBoyy', + }, + ], + hosts: [ + { + name: 'Aaron Malone', + profile_picture: 'https://pbs.twimg.com/profile_images/1521495204196503553/abk-5S0m_400x400.jpg', + ref_id: 'bd103540-8c0a-4ab3-b5cd-24a3f2c43ab2', + twitter_handle: 'pizzamind', + }, + { + name: 'Bryce Paul', + profile_picture: 'https://pbs.twimg.com/profile_images/1182725652794892288/QbDOKHcP_400x400.jpg', + ref_id: '0d670dbf-f434-43b6-b454-8e5345d7ee51', + twitter_handle: 'BrycePaul101', + }, + { + name: 'Pizza Mind', + profile_picture: 'https://pbs.twimg.com/profile_images/1521495204196503553/abk-5S0m_400x400.jpg', + ref_id: '16cb01cf-9f04-45db-a440-47259b02b86a', + twitter_handle: 'pizzamind', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/93a6fe5b-364c-43f4-9f38-7da3e811460b.jpg', + keyword: !0, + link: 'https://chrt.fm/track/DD9393/audio1.redcircle.com/episodes/68f31cee-f404-40fe-85d7-a406019e916f/stream.mp3', + node_type: 'clip', + pub_key: '03eb026c3e6597055595e42299377a4e164982775cc67f1d2135d9f1cd3a89f526', + ref_id: 'd266ac59-706d-4b4c-b0ca-d9ea3ae4fc34', + show_title: 'CRYPTO 101', + text: "to be? That's a great question, and I'm still figuring out what I really want to do with the rest of my life. I just know that I really like building cool things with cool people, and I think I'm always going to do that, no matter whether it's big or small. I think it's just I have to do something. I'm like a shark. Sharks have to keep swimming or they sink. Right? And so it's very similar with me. Maybe I'll have some more time to go live in the country and be away from people for times. But no, I really like empowering people to be their best selves. That's really what makes me the happiest, is, like, I'm a very loving and caring person, and I love to see people do good things and succeed. So I would really love to get into sort of micro loans and sort of entrepreneurship guidance and maybe even ethical VCs, because I don't think a lot of VCs are very ethical. And so I'd love to do something along the lines of that to empower more entrepreneurs to have an effect in their community and environment outside of Web Three, too. I've been doing micro loans on the platform called Kiva for many years, and I think it's super cool and needs a Web Three version. Yeah, I've actually never heard of Kiva. Tell us a little bit more about what micro loans are. And has that been a way that you could generate passive income or anything? No, it's just mostly a tax write off for really rich people. It's not like super well known, but you get to actually empower entrepreneurs in other countries. Oh, there's Jonah. Jonah. I'm on a podcast. Oh, he's bringing stuff. Jonah. What's up, brother? Thanks, bro. No, he's one of my fantastic team members over here. Thanks, bro. I wish I got ", + timestamp: '00:22:22-00:24:01', + topics: ['Lucas Dimos'], + type: 'podcast', + weight: 71.21921050996978, + }, + { + boost: 0, + date: 1625958277, + description: 'How Bitcoin helps increase business competitiveness and change business model', + episode_title: 'WHY ARE WE BULLISH? Brandon Quittem, Timothy Kim, Shinobi, Steve Barbour ep185', + guests: [ + { + name: 'Brandon Quittem', + profile_picture: 'https://pbs.twimg.com/profile_images/1502403738861940736/9J5VuTye_400x400.jpg', + ref_id: '65512044-7810-4ece-8156-5519e072cb66', + twitter_handle: 'Bquittem', + }, + { + name: 'Shinobi', + profile_picture: 'https://pbs.twimg.com/profile_images/1526590501742428160/0Y5H2uJK_400x400.jpg', + ref_id: 'a05dface-33a7-400d-a749-99efe0d96118', + twitter_handle: 'shinobi602', + }, + { + name: 'Steve Barbour', + profile_picture: 'https://pbs.twimg.com/profile_images/1592714173469065216/q8kXPyQI_400x400.jpg', + ref_id: '63a731b8-4759-4360-9e9d-d66f884e12d8', + twitter_handle: 'SGBarbour', + }, + { + name: 'Timothy Kim', + profile_picture: 'https://pbs.twimg.com/profile_images/1569681307029934081/2s_nWYo__400x400.jpg', + ref_id: 'e0323798-c70f-4cc3-96ff-87bab50c2313', + twitter_handle: 'realtimothykim', + }, + ], + hosts: [ + { + name: 'Ben Perrin', + profile_picture: 'https://pbs.twimg.com/profile_images/1181715113226596352/ipGVEcYH_400x400.jpg', + ref_id: 'e6b013ef-178b-4b41-95ee-423148a3dc3a', + twitter_handle: 'profbenperrin', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/419512c2-e309-4b25-bfe2-cd481d53f66d.jpg', + keyword: !0, + link: 'https://anchor.fm/s/11e95d20/podcast/play/37027401/https%253A%252F%252Fd3ctxlq1ktw2nl.cloudfront.net%252Fstaging%252F2021-6-10%252Ffb6d5638-4579-5707-9740-0e586c980ba7.mp3', + node_type: 'clip', + pub_key: '037f7331a5bef6c6f880246747befcc3767f3bb9730bc5e6f7c3770f4184ed0bff', + ref_id: 'fe680ae3-835d-492f-b664-7d645d02a99f', + show_title: 'BTC Sessions', + text: "Can I pivot into why I think why I'm bullish on this episode? Yeah, man, let's do it. As I'm on my fourth shot of Ryan, I'm about to lose any coherency on the same topic. I just love seeing any startups, especially any Bitcoin related, like pro bitcoin related startups do well. One of my favorite follows on Twitter is like, Tahini's Restaurant. Like a little franchise that's like big into bitcoin and you know they're going to kill it because just having bitcoin in your treasury, it makes it so difficult for any other competitor, to any other competitor, they're a restaurant business. Any other competitor that's in a restaurant, that's a tough freaking market to be in. Like the restaurant business, maybe bitcoin mining is like the only harder market because it's so easy to get into. But like, restauranting, it's an easy business. The low barrier to entry, tough margins. But Tahini, I don't know who else who's a direct competitor in their area. I think they're based in Ontario. It's probably a million Sharma places that do like what Tahini does. He's going to fucking kill those guys. They're going to kill all their competition because they might have the exact same profit margin. They might have at the end of the year, 10% profit, just like every other competitor in the area. Sort of like plus or minus a few percent. Some guys in the negative, whatnot, the team is going to kill them. They're going to kill them because they're going to have this bitcoin treasury. And I was saying that locally on a local podcast. And Lloyd, I got this small wheel field business we're getting into motors and stuff. Aside from the bitcoin mining focus that we have, what we're doing is actually not that different than what a lot of oil service companies do. And I said on this podcast locally, I'm like, my competition will have no chance to compete with me if they don't adopt a bitcoin treasury. And they don't even have to build bitcoin mines. All you have to do as any small business owner is convert a little bit of your treasury and your profits into bitcoin and to hoddle it and to speculate properly on it. And you're going to crush your competition, like your feet of competition. So my bullishness that I wanted to bring to this episode is like. I think that small businesses and true entrepreneurs. Not Fiat entrepreneurs. Not the guys just going out and trying to get raising money from these VCs and not really building anything. But actually true entrepreneurs. People going out and starting small businesses. I think we're going to see finally a true economic boom in small businesses that we've seen suppression over for over 100 years. Like over 50 years for sure. Ever since. Like the full on 1971 Fiat standard. But when I showed up on the show, I was driving. I do a lot of driving around Alberta, Saskatchewan, you know, Alberta, well, Sessions, we go through all these small towns. Every small town is fucking same. And I think about it from like, the bitcoin perspective. All these small towns are identical. They have the same franchises. They got the Mr. Lube. They got, like, the petro Canada. They got gas station. They all got franchises. There's no fucking small businesses anywhere. They're all dead. They're dead. Everything's a franchise now, right? Which in and of itself isn't a problem. But the fact is, these people are just licensees of a business model. They're not finding their own supply chains and building a small business. They're going out and becoming a licensee of a big Fiat, like a big corporation that ends up benefiting from the Fiat. ", + timestamp: '01:23:33-01:27:13', + topics: ['business model'], + type: 'podcast', + weight: 7.273831367495893, + }, + { + boost: 0, + date: null, + description: 'The future of payments on Bitcoin and on the Lightning Network', + episode_title: 'The Orange Sun 🌞 VISA, MasterCard & #Bitcoin #BOLT12', + guests: [ + { + name: 'Oluwasegun Kosemani', + profile_picture: 'https://pbs.twimg.com/profile_images/1538403135101800450/sO-RPI9U_400x400.jpg', + ref_id: '25ce4b90-6689-4dd9-84b6-240c7bcbe407', + twitter_handle: 'MrlamilamiKosch', + }, + { + name: '~₿ Maxi~', + profile_picture: 'https://pbs.twimg.com/profile_images/1446241859651637250/i67F3y9p_400x400.jpg', + ref_id: 'ad997ae7-0726-431a-9f72-82da091c0658', + twitter_handle: 'fede0891', + }, + { + name: 'TK☣️Ph.Ple₿', + profile_picture: 'https://pbs.twimg.com/profile_images/1505791887415730177/d0YDQ3Xc_400x400.jpg', + ref_id: '9e3ffa2c-9410-48e9-a726-8312c0abcd7c', + twitter_handle: 'ToxiKat27', + }, + { + name: 'FireBurs†s', + profile_picture: 'https://pbs.twimg.com/profile_images/1517827165198458880/N79Wpx85_400x400.jpg', + ref_id: 'cda1d3ad-dd80-458b-a5fb-a28861df10a7', + twitter_handle: 'FireBursts', + }, + { + name: 'Nikolai Tjongarero', + profile_picture: 'https://pbs.twimg.com/profile_images/1578458155964682274/_SzDxkAJ_400x400.jpg', + ref_id: '821ee040-2267-454e-a59a-92da51568afa', + twitter_handle: 'BitcoinNaijaShw', + }, + { + name: 'ブランドン', + profile_picture: 'https://pbs.twimg.com/profile_images/834861311762649090/N0KAP4zH_400x400.jpg', + ref_id: '3d41531d-6a59-4771-81f9-0924b4c02561', + twitter_handle: 'blario', + }, + ], + hosts: [ + { + name: 'Satoshi’s Journal', + profile_picture: 'https://pbs.twimg.com/profile_images/1598641632601047042/qrZMP5Oy_400x400.jpg', + ref_id: 'd977ed11-09b0-4143-828d-582ecb8b58ca', + twitter_handle: 'SatoshisJournal', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/9b2e17f2-71c5-4f1e-a3e7-720d06dab810.jpg', + keyword: !0, + link: 'https://stakwork-uploads.s3.amazonaws.com/uploads/customers/2707/media_to_local/94a86a32-91c2-4717-b5cb-b36cef925776/38decc02-c922-4c1d-a605-7cd54c91a01d.mp3', + node_type: 'clip', + pub_key: '03c18d0c6c35333f22bc524e21a5fd1d2d9886f5d4d958dc1de95d025de5c84cfc', + ref_id: '1984e7b9-23f1-4ef0-8fcb-deac4ef23cc7', + show_title: 'Satoshi’s Journal', + text: "Yeah, and that's one of the tools we're working at Satoshi Journalist. We've always paid our writers in Satoshi's, but once these QR codes become static through both twelve, we'll have the ability for all content creators to be have their associated lighting address prominently displayed next to their profile. And people want to tip them. They can be tipped. I mean, that's what basically the future is going to be. And of course Twitter is going to do the same thing. I listened to a long interview with Elon Musk when he acquired Twitter and he mentioned that he's going to allow content creators to be paid. And so I bet you he'll probably integrate the Volt twelve static QR code in such a manner where all content creators will have their respective QR code. And if they have good content, then you can send them tips, or if they don't, then you don't send them tips. And then what Olu said, it's going to catch fire because as soon as Mastercard and Visa are undermined by the fact that people can simply send Satoshis to other people instantly and basically for free via a static QR code, you don't need to freaking swipe cards no more. You don't need to freaking do all this stupid legacy system, fiat minded crap. You just get the QR code, have it into perpetuity as long as you want it, and boom, boom, boom. So the implications are huge from a game theory standpoint, although it might not happen right away if Visa and Mastercard aren't watching their back, so to speak, they're going to be like Blockbuster. And then you have a block stream, of course, is working on it. Another interesting angle is just imagine all these card issues, right? They integrate with Lightning because they want to catch up with technology. Don't forget, technology is always ahead of regulation. Regulation will have to catch up to technology. And these other companies that would actually make interoperability with Lightning even more accessible and easy with what they already have in their system, will be the one to accelerate this adoption. But this is how the game theory may even play out more interestingly, once they integrate with both twelve, because of the technology and the potential risk to them not integrating with it, they begin to see more adoption, right? And usually they are used to texting their people, their users. They have so much user base, they have so much merchants, so they just apply a little more fees. That's how to generate revenue on the cards. And now they've given many financial institutions the opportunity to print their own cards, right? So you go to the bank, the bank prints instant card for you. You just take the card and you start swiping once you leave the banking off. Or you just go to the nearest ATM, even, right at the banking.org, and you start swiping. That's my diamond. My daughter, she's just purchasing. My point, she's a bitcoin, a little bitcoin. And the card issuers, their competition will start from the people that can just begin an SME and start to create cards that you can spend lightning on. You do not need Mastercard, Visa card integration. That's where the competition will start from. The competition will not be a bigger company. It will be small companies. You can't you see all these bitcoin companies, they're going to come in droves and just small, small companies. SMEs everywhere will now have the ability to make cars that we just QR code you can actually tap and go. I think it's going to be fantastic. If you can use a platform that will charge you ten times lesser than what Mastercard and Visa is charging you right now, you save a lot of money in one year. And in Nigeria, it will cash fire ease in Africa. It will catch fire ease once people realize, because we are the experiment for the west, for Swift, for Mastercard, for Visa. Go and check their database. Africa is where the number is. Nigeria is number one. South Africa, Kenya. So the market of many of these companies is in Africa. 1.5 billion people will be 3 billion people in the shop field for 30 years. And you have 500 million people. Internet penetration is already more than 100 million people as we speak. You can access Internet with USA. So it's a fantastic thing to have the opportunity to do. Charitable effort. Just imagine the air drop you can do with lightning, static curl code to the entire nation, and you're not even spending much, but you're on boarding lots of people at once, and you're not curing too much fees. You can't do that on chain. You're going to cure too much crazy fees. I've tried it over and over again. But on Lightning, you're giving it away. You can give out a hundred thousand satoshi to 100,000 people. Wow. And you probably wouldn't have spent nothing with one QR code. And repeatedly you can keep paying it. You can do a minus A toshi. This gonna be fantastic, dude. I mean, more and more you talk about it, I get more and more excited. But one thing that's kind of interesting is once Visa Master become obsolete from Bitcoin and lightning, nevertheless, there'll probably be some iterations of the legacy system around. But once we get to the point where those individuals or sorry, those companies go obsolete, since you're in the payment sector, you know, the answer is this probably better than most is. I mean, for them to make money in the future, they'll probably end up running their own lightning node kind of deal and trying to make money through running transactions to their node because they would provide liquidity to the network and that would be one method by which they could make money. There are going to be other ways, but do you foresee them maybe becoming lightning node operators and taking I mean, I don't know how profitable that is, but what do you think about that? I'm not very active in this area. Portland is working right now, so I don't think he can talk. I would have suggested maybe a king can take this part, but I think it's very technical. I may be able to say some terrible part of it. Like I've already said, it's just going to be interesting when I talk, but people may not be able to see it insightfully from the length of somebody who puts together the code and understand how the pipe is supposed to look. I feel that the decentralization of nodes in general will create pipes of money. Our partner used the word pipe the other day when we're having a conversation and I could get it instantly because that was a very glaring example. So the bigger the pipe, the bigger the transactions I can pass through that pipe. I think it would be more interesting here because bitcoin is already everything. There will be proof of stake to a level, but it cannot have power over proof of work. It's just going to be proof of stake basically in the area of, oh, I got a bigger pipe, so bigger transactions come my way. And you can't query that because you don't have that. You know how I mean? I think people will run lightning nodes, but you're going to still have to have enough bitcoin to be able to do that. If you don't, then your transaction capacity will not be as much. Banks will run nodes, community microfinances will run notes. I mean, I think this is going to basically change regulation general, because it's an opportunity for revenue generation for the government. If I look at it from a public private partnership perspective, what I see is many opportunities for taxation for the government. So if the government is wise, you can't you shouldn't bitcoin it gets on now the quicker you can start to accumulate SATS and maybe some bitcoin in some very rare cases, you give people international money transfer patrol license to do legitimate bitcoin transaction in your country. You know how I mean? Because whether you give them or not, it's already happening. It's under your radar, but you can't stop it. Why don't you allow people run nodes? Why don't you expand that economy in general so you can see it, let it be transparent, but it's already decentralized. People would do it with or without you. So a lot of people would be able to run a node, but you know, the space needed for that purpose becomes larger. So I don't know, I think it's going to get like five terabytes in some decades and I don't know if it's going to be cheaper to get the necessary tools you need for that or it's going to be more affordable. Depends on how the world is. But in an imagine world, I want to believe that things will get cheaper because bitcoin will price stuff and in fact, once you have some, you can actually confidently spend and acquire what you want even more better than operating on the fiat monetary experience where things are very difficult. Even when you put the proof of work and you don't get to be paid what you deserve, you get cheated and somebody to come and tax you. They come and tax you for the services they don't offer you. So yeah, a lot of people want to know it depends on how cheaper it is in the future or affordable. But I think I kind of answered it to the best of my knowledge, jeremy, if I didn't. Yeah, no problem. Hey. Good morning, Oakland. ", + timestamp: '01:42:06-01:53:40', + topics: ['Bitcoin Payment', 'Lightning Network Payment'], + type: 'twitter_space', + weight: 7.166842460632324, + }, + { + boost: 0, + date: null, + description: "The sovereign individual's role in Bitcoin and vice versa", + episode_title: 'Bitcoin Charlotte Book Club - Sovereign Individual Ch 1-7', + guests: [ + { + name: 'Bolt', + profile_picture: 'https://pbs.twimg.com/profile_images/1352721439879786496/wfevZ8bG_400x400.jpg', + ref_id: 'b165e497-f255-4ce5-9762-30c90dcf776d', + twitter_handle: 'Bitcoin_CLT', + }, + { + name: 'Victor', + profile_picture: 'https://pbs.twimg.com/profile_images/1519726025013350400/GHxSzgA3_400x400.jpg', + ref_id: 'd91fff8d-e4c6-4aeb-9f32-021e4a4ff9a6', + twitter_handle: 'victorwong', + }, + { + name: 'George', + profile_picture: 'https://pbs.twimg.com/profile_images/1173474608856608768/vEBnPUdm_400x400.jpg', + ref_id: '5946bdf6-8feb-43aa-b2ca-46b2944b0572', + twitter_handle: 'GeorgeNotFound', + }, + { + name: 'Mark', + profile_picture: 'https://pbs.twimg.com/profile_images/1511102924310544387/j6E29xq6_400x400.jpg', + ref_id: 'c8cd0c95-c105-41c4-8fae-9dbfa76d84f2', + twitter_handle: 'markiplier', + }, + ], + hosts: [ + { + name: 'Jacob Parrish', + profile_picture: 'https://pbs.twimg.com/profile_images/1552345395195412481/bgjme0Jh_400x400.jpg', + ref_id: '476161bc-6773-4695-845f-15fe87affd67', + twitter_handle: 'Jacobp102', + }, + { + name: 'Liz', + profile_picture: 'https://pbs.twimg.com/profile_images/1256650517549211648/cHwvj5o9_400x400.jpg', + ref_id: '6538f07d-01e3-43c7-9068-55f3ec737d65', + twitter_handle: 'LIZ_Y2K', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/fe6bdbce-e91d-43cf-ab33-0e98bffabecc.jpg', + keyword: !0, + link: 'https://stakwork-uploads.s3.amazonaws.com/uploads/customers/2707/media_to_local/3a4d250d-90a6-417a-a6b4-0f701bdd9e2e/daa90ea7-aa7e-41f5-9fec-7e513ca75667.mp3', + node_type: 'clip', + pub_key: '02574d6e8e787372184b6f17c40d6c6fe1777db9015801f95dfd24692784d767cd', + ref_id: '5efbc2c3-e67a-4b16-9c9d-285bdd37e906', + show_title: 'Bitcoin Charlotte', + text: "One of the things that I thought was really cool, which I never thought about with Bitcoin, this kind of goes into violence as well as he or she will even be able to act after death. For the first time, an individual will be capable of carrying on elaborate tasks even if he is biologically dead. It will no longer be possible for either an enemy at war or criminal to completely extinguish the capability of an individual to retaliate by killing him. This is one of the more revolutionary innovations in the logic of violence in the whole history. And so that really gets you to start thinking, what if someone came to get your money and you go, don't kill me, because if you kill me, I have money that will be paid to other people to come find you or your family. That would be pretty scary. Would you come after me then? Let's see. I'm not the best to have in dialogue with myself, so I'm going to just keep on looking around. So I got to page around a page 186, I think. So I had about 40 pages left to reach the desired area, which goes to the chapter eight, which starts with the end of egalitarian economics. But yeah, I think the book really starts to just get exciting for me. So I'm excited to move forward at this point, but it is a tricky one to get through if you're not an avid reader. But I'm getting better at it. Trying to think of some other really good points that I liked about this book. Unions. That was the word I was thinking of before. Unions were a really interesting topic in this book, and I want to find these quotes on some of it that were really cool. But the working so the idea with unions in this was they could use violence to get what they wanted. And that's one of the big turning points, too. It doesn't make much sense for unions to form anymore because companies do not have to be in a central location where they have all this manufacturing going on, and there's a lot of valuable stuff there that they know how to use. The worker simply sees the factories and ransom them back to the owners. The tactic of great simplicity, and one that in most cases, was profitable and fun for those participating. One sit down striker wrote, I'm having a great time. Something new, something different. Lots of grub and music. Maybe someone requested we got bro. So I was listening to the prior unions today, and so they were saying that those don't really exist anymore. Correct, because when I was working my government job, I was part of a union, really, and people would definitely abuse it. You could say something happened, and then the union would come and support you, basically, and you would kind of get whatever you wanted. How did the union have their power? What do you mean? How are they able to demand things? Well, you had someone from the union come and support you if you said this was like this one lady I worked with. She said she was getting harassed at work in our signal shop. So then the union came and like, an attorney, almost like it was an attorney, but someone had the union to take it her side of the story. And then it was kind of funny because we were all in the union. So then they had to get all of our other sides of the story, but they had to support us, too, like any people she was complaining about. I got you. Where was the union from? It was a union. You work for the DLP. I should know that, but I don't remember that's. Okay. How's it been going? Oh, we're just kind of monologuing over here, and I can't remember much of the book. How about you? How's it going? It's all right. Just cooking some steaks and pizza. The union is UFCW local 1994 Montgomery County Employee Union. That is a voice for working America. I'm not familiar. Mark, did the sovereign individual talk about unions? Yeah, quite a bit. We're talking about how violence, the use of violence or union is basically saying, hey, we're not working and we can also run the factory. We run the factory, we know how to do it, and they can hold the factory hostage. But that's basically dying away because things are getting more decentralized with the information age. Right, that makes sense. I listened to the book, actually, and I did it a while ago. I don't exactly what you guys discussed. I found it to be really good. I definitely didn't capture near as much of it as you do when you read it because you get through it a lot faster. The time you're committing to the book is a lot less. But yeah, it's so much to tackle. I mean, you could have long conversations about any small parts if you really dive deep into them. So I don't know if there's any particular subject you guys are talking about, but we have many people in here. But if there's anything interesting anybody wants to talk about. ", + timestamp: '00:21:00-00:27:56', + topics: ["Sovereign individual's role"], + type: 'twitter_space', + weight: 7.131711006164551, + }, + { + boost: 0, + date: 1671720944, + description: "@mattyicesensei and @johnmichaeldrew's opinions on Web3", + episode_title: 'Café ₿: #Bitcoin News & Bitcoin Day w/ @Bitcoindayio', + guests: [ + { + name: '@johnmichaeldrew', + profile_picture: 'https://pbs.twimg.com/profile_images/1512897699942744064/PuRU3K8P_400x400.jpg', + ref_id: '6b72ee7f-52ef-4847-96ed-78ea09e3f19b', + twitter_handle: 'johnmichaeldrew', + }, + { + name: '@mattyicesensei', + profile_picture: 'https://pbs.twimg.com/profile_images/1607138483579101186/0qm0xaCF_400x400.jpg', + ref_id: '286abd3b-cecc-4ec5-bf88-2a9fd5393083', + twitter_handle: 'mattyicesensei', + }, + { + name: '@Bitcoindayio', + profile_picture: 'https://pbs.twimg.com/profile_images/1493098733608837121/tLI-XTwl_400x400.jpg', + ref_id: '6a87699e-7a27-4928-89e8-d884f1458bf9', + twitter_handle: 'Bitcoindayio', + }, + ], + hosts: [ + { + name: '@alexstanczyk', + profile_picture: 'https://pbs.twimg.com/profile_images/1539055022364708864/rwErK6x1_400x400.jpg', + ref_id: '6455df34-1abc-4ce8-9bb8-b02d411accec', + twitter_handle: 'alexstanczyk', + }, + { + name: '@SwanBitcoin', + profile_picture: 'https://pbs.twimg.com/profile_images/1491428856858914820/aFlitvha_400x400.jpg', + ref_id: 'da3f56bf-9763-4389-a9ec-d807049bd0b8', + twitter_handle: 'SwanBitcoin', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/239722cb-4216-414a-a17b-5adf9d52e15a.jpg', + keyword: !0, + link: 'https://stakwork-uploads.s3.amazonaws.com/uploads/customers/2707/media_to_local/83744e68-b563-4004-b52a-cfdfff89748f/12c9b9f2-fbce-4784-9404-88a574baa762.mp3', + node_type: 'clip', + pub_key: '', + ref_id: 'f80dd079-1a9d-4bda-b8dd-81c05d203533', + show_title: 'Swan.com', + text: "Thank you, John. Maddie, I was just wondering, I'm just kind of looking through your stuff, recent stuff. Can you tell me your opinions on web three and products like step in, for example, and just where are you on ethereum? Where are you on crypto? Bitcoin? What do you think about web three in its future? This can be for either of you, actually. Alex, are you going to allow that on this? I was going to ask him. Maddie's very knowledgeable. Maddie's knowledgeable. I'm sure he can answer. But you want us to answer that, Alex? Yeah, we do this thing called the crucible on this show sometimes where sometimes there's hard questions. So I don't mind. Go ahead. Sure. Let me take it from here then. Me personally, I use different platforms, different things. I like to gamble. I like to do different things. So where I'm at with web three, I'm fully bullish web three, I'm fully bullish bitcoin. Bitcoin is my savings. It's where I store most of my wealth. When I like to gamble, I use stuff on ethereum. I play different metaverse games. I do all sorts of stuff. So for me, there's a use case, there's a value there. It's not anywhere near the same value as bitcoin. But, yeah, I have fun with all sorts of stuff. I like to gamble. I like to go to the casino. I like to do all sorts of stuff. So with a small portion of my wealth, I gamble and do that kind of stuff. Does that answer your question? When you say gamble, do you mean literally gaming, or are you talking about purchasing shit coins and then gambling on return? Oh, all of the above. So quite literally, I go, like, for example, if you use a theorem, if you've ever heard of the metaverse, if you go into, say you go into central land, you can literally go to a casino into central land and gamble. So I like to do stuff like that. There's all sorts of different things you can do gamble for returns. But for the most of my wealth, I'm just dollar cost. Averaging and stacking stats, but there's a lot of different fun things you can do out there. Most of it, probably 90% of all of it is scams, ponzi schemes, all sorts of different stuff. But there's definitely things that I find value and personally, aside from bitcoin, although I just think they're different things. Right. You don't store all your wealth and Bakarat casino chips, but you might like to go play and gamble and do different things. So that's the way I like to look at it, if that makes sense. ", + timestamp: '01:56:23-01:59:20', + topics: ['Web3'], + type: 'twitter_space', + weight: 16.6951974581924, + }, + { + boost: 0, + date: 1667347200, + description: 'The business model of Amboss', + episode_title: 'Meet the Makers: Anthony & Dolu', + guests: [ + { + name: 'Anthony Potdevin', + profile_picture: 'https://pbs.twimg.com/profile_images/1252630766909079555/qf-qI5EZ_400x400.jpg', + ref_id: 'da0a9fdc-eda1-4e07-8341-2100428065d1', + twitter_handle: 'thunderhubio', + }, + { + name: 'Dolu Zerologin', + profile_picture: 'https://pbs.twimg.com/profile_images/1577320325158682626/igGerO9A_400x400.jpg', + ref_id: '4c228a2d-4f9c-4bbd-bf49-d2be3159c6a4', + twitter_handle: 'Dolu_Web', + }, + ], + hosts: [ + { + name: 'Zapp Ed', + profile_picture: 'https://pbs.twimg.com/profile_images/1519990234070540288/adGqlFoj_400x400.jpg', + ref_id: 'bbe7cf1d-cd8d-4d36-926d-76f41b775fbb', + twitter_handle: 'zapp_ed', + }, + { + name: 'Moritz', + profile_picture: 'https://pbs.twimg.com/profile_images/1452933125743460360/5xkRoFj7_400x400.jpg', + ref_id: 'e23e282d-82b3-4c9d-859c-c1c7f41eef84', + twitter_handle: 'getAlby', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/965489b4-a414-4fd0-ab8c-55911b1596aa.jpg', + keyword: !0, + link: 'https://www.youtube.com/watch?v=wiIzexAc2gs', + node_type: 'clip', + pub_key: '02574d6e8e787372184b6f17c40d6c6fe1777db9015801f95dfd24692784d767cd', + ref_id: '7ef24d02-66fe-4872-b1f1-ea144bfcaf5c', + show_title: 'BOLT FUN', + text: "model of Ambulance today? Yeah, so this is a very interesting point because a lot of feedback that we get is like you're in this growth phase, don't charge anything. Just try to get as much users as possible. And while I think it is in a way correct, like we should be looking to get as much users and as much feedback as possible for our products having a price for the different products, which at this point the price is very minimal. The space is very small. Like the lightning. Space is very small. And what we charge for our product is also very small. So overall revenue still is very small. So it's more of like a symbolic thing. But what it helps us is see where there is interest or where there is value that people are willing to pay for some services, right? For example, if we were to do a magma our marketplace and have everything free. We wouldn't really know if people are using it because it's useful to them or just because it's free. People love free stuff. If it's free, they will use it even if they don't really need it. If you see enlightening with rebalancing, people rebalance all the time and if it costs them almost nothing, then they just do it because they want to, not really, because it could be something that is useful to them. Right? So adding this price point on top does help us see like, okay, there's interest from the community to further expand this service. They do see value in it. Let's maybe put more focus towards that part. And in terms of business model right now for us, we have ads on our home page. We focus on Bitcoin and Lightning ads and then we have subscriptions that you get some additional perks you can personalize further your node page you can add like a node and then for the more analytics interested people there is time series that they can access like further get further insights into what is happening around nodes or around the Lightning space. In general, for us, it's really about experimenting. So we're trying out all these different revenue models, like figuring out where people see value, where they're willing to give us some stats to improve their experience or have something nicer or more data or something that gets improved for them. Yeah, thanks a lot for sharing this. I think it's very, very encouraging also for new developers in this space to learn from you. And I think people should take the time to experiment and learn as much as possible. And I'm also curious to learn from you Dulo, what experiments or what experience also led to the most recent project zero lock in. Can you share some history on that? ", + timestamp: '00:16:35-00:19:57', + topics: ['Amboss', 'Lightning ads'], + type: 'youtube', + weight: 7.334451631469231, + }, + { + boost: 0, + date: null, + description: 'Bitcoin News for December 20th, 2022', + episode_title: 'The Orange Sun 🌞 Interview with Nzonda Fotsing Sr. #Bitcoin', + guests: [ + { + name: 'TK☣️Ph.Ple₿', + profile_picture: 'https://pbs.twimg.com/profile_images/1505791887415730177/d0YDQ3Xc_400x400.jpg', + ref_id: '9e3ffa2c-9410-48e9-a726-8312c0abcd7c', + twitter_handle: 'ToxiKat27', + }, + { + name: 'Funsho Jimoh', + profile_picture: 'https://pbs.twimg.com/profile_images/1600143435775856641/uqgmtT23_400x400.jpg', + ref_id: 'a237ffb0-792b-484e-b12f-65a2b679eaf1', + twitter_handle: 'fnicencool', + }, + { + name: 'Heritage Falodun', + profile_picture: 'https://pbs.twimg.com/profile_images/1510397558652350469/jYOl00tU_400x400.jpg', + ref_id: 'b2bcc65a-b060-4dbe-b9ac-a7d64a11d2ac', + twitter_handle: 'herrytheeagle', + }, + { + name: 'Nzonda Fotsing Sr', + profile_picture: 'https://pbs.twimg.com/profile_images/1458565804291670016/XaLi8e6a_400x400.jpg', + ref_id: '53fe4486-5ef3-4988-8ada-47c3cb1c2d51', + twitter_handle: 'BitcoinSophist', + }, + { + name: 'ROB', + profile_picture: 'https://pbs.twimg.com/profile_images/1605484577669074946/CkYjFUxH_400x400.jpg', + ref_id: '25c5f080-fd07-4b37-9014-7fc05419edce', + twitter_handle: 'robertlamonta15', + }, + ], + hosts: [ + { + name: 'Satoshi’s Journal', + profile_picture: 'https://pbs.twimg.com/profile_images/1598641632601047042/qrZMP5Oy_400x400.jpg', + ref_id: 'd977ed11-09b0-4143-828d-582ecb8b58ca', + twitter_handle: 'SatoshisJournal', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/9b2e17f2-71c5-4f1e-a3e7-720d06dab810.jpg', + keyword: !0, + link: 'https://stakwork-uploads.s3.amazonaws.com/uploads/customers/2707/media_to_local/e4a700c7-f311-4270-be71-e2783252be6c/d4cb7ccf-f7e8-4071-a74b-943cc09fd967.mp3', + node_type: 'clip', + pub_key: '03c18d0c6c35333f22bc524e21a5fd1d2d9886f5d4d958dc1de95d025de5c84cfc', + ref_id: 'ed128fbb-3ad8-4d26-921c-495edfda3cbd', + show_title: 'Satoshi’s Journal', + text: "So as soon as she comes up, I will put the focus and landlight on him. But the first thing I have in the nest is I try to let you up top. Tiki. I'm not sure what happened. I'll send you an invite. So, bitcoin sapiens, he's been on a roll these last few weeks. You could tell he's taking some time to think out some really good quotes. And this quote he says, I think I'm here. Yeah. Okay, I'm up. Hey, what's up, tk? Yeah, it's showing on my end. Like, you know how it gets louder when you come to speaker? It got louder. So I assumed that I bumped up to speaker, but then I look and I'm still listening and I have mike. I'm like, what the heck? That was weird. Yeah, I don't know. That is weird. I'm going to share the nest or share the space now. Okay. So bitcoin sapien says, a common misconception is thinking bitcoin is the first iteration of a new tech, when in truth, bitcoin is the final iteration of a dream that took decades to achieve and includes the hard work of incredibly smart people from all around the world. And that's a very good point to make because a lot of people think that bitcoin was the first cryptocurrency and it was the first iteration of an innovation. But bitcoin came upon the hard work of many cryptographers, engineers, scientists, mathematicians, just people in general trying to study how to get a digital money that was totally out of the hands of government. And so up until bitcoin, many people tried many different things. And finally, satoshi nakamoto was able to put together an iteration of all the things that had been done before him or her or them and come up with bitcoin. So I like that quote from bitcoin sapiens. It's a good one. The next thing I have up here was another quote, this one by Jeff Booth. He says, trying to measure a non linear system. The economy, like a linear system, ensures you miss small changes in conditions that lead to critical states, which also means that you might dramatically underestimate the risk. Of said system bitcoin. Yeah, I think a lot of people try to think that economy is a linear system. And they use these linear metrics to try to measure a system that you can't measure on a linear basis. One thing like the CPI, we all know that's also known as the CPI, the Consumer Price Index, is a basket of weighted goods and services that people, that the economists use as a means to try to gauge what inflation is. But that's their linear way of trying to measure something that's not linear. And that's just one metric of many that economists try to use to measure an economy. I mean, it's almost like it's using the wrong tool, basically. If you have a system that has so many variables and it's really what it comes down to. It's such a complex system. How do you measure such a complex system? How do you try to think just in your human body right now? How do you measure all of the complexities that are happening in your body? How are you to measure every freaking neuron that's going in your head right now? Just back and forth, back and forth, exploding, firing off information, the blood going through your veins? How do you measure that? The pumping of your heart, the treble of your voice? You can't measure the human body with linear metrics. The human body is a complex organism. And I implore anybody to try to measure the human body using a linear metric. So that's basically what Jeff Booth is saying. The economy is a living organism that has so many variables, and if you're trying to measure it with a linear system, then you're going to miss a lot of he says, small changes and conditions. I'm thinking you miss big changes. Anyways, that was a cool quote. I liked it. The next thing I got up here is, ", + timestamp: '00:05:39-00:11:10', + topics: ['Bitcoin News'], + type: 'twitter_space', + weight: 6.58552348613739, + }, + { + boost: 0, + date: null, + description: 'Interesting predictions from the Sovereign Individual', + episode_title: 'Bitcoin Charlotte Book Club - Sovereign Individual Ch 1-7', + guests: [ + { + name: 'Bolt', + profile_picture: 'https://pbs.twimg.com/profile_images/1352721439879786496/wfevZ8bG_400x400.jpg', + ref_id: 'b165e497-f255-4ce5-9762-30c90dcf776d', + twitter_handle: 'Bitcoin_CLT', + }, + { + name: 'Victor', + profile_picture: 'https://pbs.twimg.com/profile_images/1519726025013350400/GHxSzgA3_400x400.jpg', + ref_id: 'd91fff8d-e4c6-4aeb-9f32-021e4a4ff9a6', + twitter_handle: 'victorwong', + }, + { + name: 'George', + profile_picture: 'https://pbs.twimg.com/profile_images/1173474608856608768/vEBnPUdm_400x400.jpg', + ref_id: '5946bdf6-8feb-43aa-b2ca-46b2944b0572', + twitter_handle: 'GeorgeNotFound', + }, + { + name: 'Mark', + profile_picture: 'https://pbs.twimg.com/profile_images/1511102924310544387/j6E29xq6_400x400.jpg', + ref_id: 'c8cd0c95-c105-41c4-8fae-9dbfa76d84f2', + twitter_handle: 'markiplier', + }, + ], + hosts: [ + { + name: 'Jacob Parrish', + profile_picture: 'https://pbs.twimg.com/profile_images/1552345395195412481/bgjme0Jh_400x400.jpg', + ref_id: '476161bc-6773-4695-845f-15fe87affd67', + twitter_handle: 'Jacobp102', + }, + { + name: 'Liz', + profile_picture: 'https://pbs.twimg.com/profile_images/1256650517549211648/cHwvj5o9_400x400.jpg', + ref_id: '6538f07d-01e3-43c7-9068-55f3ec737d65', + twitter_handle: 'LIZ_Y2K', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/fe6bdbce-e91d-43cf-ab33-0e98bffabecc.jpg', + keyword: !0, + link: 'https://stakwork-uploads.s3.amazonaws.com/uploads/customers/2707/media_to_local/3a4d250d-90a6-417a-a6b4-0f701bdd9e2e/daa90ea7-aa7e-41f5-9fec-7e513ca75667.mp3', + node_type: 'clip', + pub_key: '02574d6e8e787372184b6f17c40d6c6fe1777db9015801f95dfd24692784d767cd', + ref_id: '1ba72c1d-ff22-4572-ad24-8171bfce9de3', + show_title: 'Bitcoin Charlotte', + text: "I guess that is hard for me to get through. But when they talk about what they predicted happened in 2000, I mean, they weren't right on that, correct? Yeah, I think the reality of that is there were some really interesting predictions that were right or close to right. There's plenty of things that weren't right, but anytime you're predicting the future, if you're right at all, it's usually pretty impressive, especially with the way technology is and how things change, it's hard to predict about anything. So I think they made some pretty bold claims that were shown to be pretty true. And I think that's what people get attracted to when you kind of look back on it and say, wow, they're actually right on some of these things, whether it's digital currency or they even reference pandemic and how the state will control people. And there's just so much overlap with the reality we're living through. I definitely find that stuff interesting. I already knew all that stuff before I read it, though, because I've been talking about so much on podcast and things. You're just so smart, bro. Well, a lot of people talk about especially Robert Breedlove. He references the sovereign individual a lot, so if you're listening to his podcast, you're going to know a lot of that stuff. These authors take in a ton of information and I do kind of like how they seem to make the best logical conclusion from the information. There's bias here, of course, but they really analyze all these things. They take in a lot of different authors and they look at what they wrote and what they think is wrong about what other authors wrote and they cite all those things and kind of go through that and a journey with all this. And it is I do like that part of it. It just seems like it takes quite a while to get through some of those points. But mark so what we started with was the gist that I got from this book was those in control of violence. Where violence is incentivized is basically how you can predict what's going to happen in the future and who's going to be in control. Whoever has the best leverage on violence. So they're reading part of the book. They're talking about the state didn't have any really control because there were nights. And the nights because of some of the metal workers and stuff, made certain improvements to the horses and forget about the stirrups and something else to make them just badass soldiers. And one night can take out like 20 guys or something. And so if you had a group of that, you can basically go in, pillage and go anywhere you wanted and do what you wanted and no one else could stop you, not even a state. But they kind of lead you through that, through all those things. And I was wondering if you got that from listening it from it, if it was like they seem to be the theme. The people control it. I'm saying that monopoly on force or something like that. Yeah, I think are you talking about just how technology brings a lot of it continues to show that that monopoly gets weakened and the power to individuals get strengthened. It can go both ways because technology can be used in either direction. I know they talk about that quite a bit. I guess I'm talking about the incentive for violence. So before agriculture, there was all these groups and every day they had to go out and find food and bring it home. They're very busy dealing with that and they couldn't store food for that long. So the incentive to go and take out some other village wasn't that great because they didn't have a lot of stuff and they had to keep themselves alive anyway. So once agriculture wasn't developed, all of a sudden a lot of wealth started to become available, which then made it so there was something to steal. So then you could go then it made sense. Oh, if I become a violent person here, I can get a lot of riches or a lot of food or a lot of whatever. That kind of leads all the way into the nation state to where we're at now, where violence can be incentivized because you can actually take over a lot of stuff. That's what I'm getting at. Which leads to Bitcoin, where we talk about this a lot, where storing your money the proper way with Bitcoin, with cold storage or multisig makes the incentive for someone to come steal it very small because you got to go through so many hoops to make that actually happen. Yeah, I 100% agree with you. The incentives in a fiat based system and basically throughout all of history, except for a few periods of time when gold worked pretty well, of course you could still steal it and you could confiscate it, but at a different time with different ways of doing, forcing people to give things up and stuff. You could secure something physical like that pretty good and that provided people some way to store value and protect their property rights, really, and their wealth. But it obviously has major issues and failures, just the physical realm. And then bitcoin solves that by creating an uncomplicated property. And it seems that they definitely dialed into that some in the sovereign individual that will be a natural evolution of humanity because they've recognized this problem with the incentives, which is basically what you were saying. It's inevitable that those things are going to happen because humans were incentivized to gain that power and to control people either through what they thought was best for the people morally or immorally and then eventually they would abuse that power and that brought us to where we are. I think that makes a lot of sense. I think another thing where they just use their philosophy and all their research and hard work to really dial into some things that are really important that a lot of people don't understand on just human nature. ", + timestamp: '00:27:58-00:34:52', + topics: ['The Sovereign Individual predictions'], + type: 'twitter_space', + weight: 6.520025253295898, + }, + { + boost: 0, + date: 1647576e3, + description: + 'Introduction - How [[Bitcoin UASF]] went down, [[taproot]] lot=true, speedy trial, [[small blocks]]', + episode_title: 'How Bitcoin UASF went down taproot lot true speedy trial small blocks', + guests: [ + { + name: 'Luke Dashjr', + profile_picture: '', + ref_id: 'c3b2367f-2863-421b-8b2c-c093423f0eaa', + twitter_handle: '', + }, + ], + hosts: [], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/b79a3eb8-bcd0-4338-b979-d32aef360785.jpg', + keyword: !1, + link: 'https://www.youtube.com/watch?v=rspXF6Gp3-g', + node_type: 'clip', + pub_key: '', + ref_id: 'b1eabcd8-8d00-4950-b264-f4f2741ca3a7', + show_title: 'Stephan Livera Podcast', + text: '', + timestamp: '00:00:00-00:03:40', + topics: ['bitcoin uasf', 'taproot', 'small blocks'], + type: 'youtube', + weight: 6.440371671951619, + }, + { + boost: 0, + date: 1647576e3, + description: '[[Small blocks]]', + episode_title: 'How Bitcoin UASF went down taproot lot true speedy trial small blocks', + guests: [ + { + name: 'Luke Dashjr', + profile_picture: '', + ref_id: 'c3b2367f-2863-421b-8b2c-c093423f0eaa', + twitter_handle: '', + }, + ], + hosts: [], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/b79a3eb8-bcd0-4338-b979-d32aef360785.jpg', + keyword: !1, + link: 'https://www.youtube.com/watch?v=rspXF6Gp3-g', + node_type: 'clip', + pub_key: '', + ref_id: 'a61c7685-556b-4886-8908-fd0ead4dc1f2', + show_title: 'Stephan Livera Podcast', + text: '', + timestamp: '00:43:55-00:00:00', + topics: ['small blocks'], + type: 'youtube', + weight: 6.440371671951619, + }, + { + boost: 0, + date: null, + description: "Cory Klippsten and John Ely's words on the Bold Bitcoin credit card and Bitcoin space", + episode_title: 'Café ₿: Bitcoin Credit Card w/ @BoldBitcoin @John_ely_21m', + guests: [ + { + name: 'Cory Klippsten', + profile_picture: 'https://pbs.twimg.com/profile_images/1569687200857755648/fxiCeaqc_400x400.jpg', + ref_id: 'ddfb9b4c-4e6a-4f4c-a01b-e6bb1bc55464', + twitter_handle: 'coryklippsten', + }, + { + name: 'Greg Foss', + profile_picture: 'https://pbs.twimg.com/profile_images/1552599670945464320/3OgqRHNo_400x400.jpg', + ref_id: '853d9f80-f6cf-490f-9d1e-f29cdc6acc6f', + twitter_handle: 'FossGregfoss', + }, + { name: 'Wicked', profile_picture: '', ref_id: 'fee44016-b05f-4961-a6d8-7dac655cd931', twitter_handle: '' }, + { + name: '@BoldBitcoin', + profile_picture: 'https://pbs.twimg.com/profile_images/1559592705231044609/iJrNKxF9_400x400.png', + ref_id: 'dd4e1c4c-d111-4f01-ad95-18200d50cdb8', + twitter_handle: 'BoldBitcoin', + }, + { + name: '@John_ely_21m', + profile_picture: 'https://pbs.twimg.com/profile_images/1560444673046585346/VN8n2LtM_400x400.jpg', + ref_id: 'a24436b1-5992-4711-a4a5-0770546ea80a', + twitter_handle: 'John_Ely_21m', + }, + ], + hosts: [ + { + name: 'Alex Stanczyk', + profile_picture: 'https://pbs.twimg.com/profile_images/1539055022364708864/rwErK6x1_400x400.jpg', + ref_id: '3126e2a3-bbe4-456b-b298-9714085fa286', + twitter_handle: 'alexstanczyk', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/239722cb-4216-414a-a17b-5adf9d52e15a.jpg', + keyword: !0, + link: 'https://stakwork-uploads.s3.amazonaws.com/uploads/customers/2707/media_to_local/7061be6d-b144-4a81-a13b-3d125e3e2812/edf29ab4-2b4b-4fdf-9998-8a9b8e9437c8.mp3', + node_type: 'clip', + pub_key: '02574d6e8e787372184b6f17c40d6c6fe1777db9015801f95dfd24692784d767cd', + ref_id: '7fea625e-c79b-402b-bce5-66e4e97d9598', + show_title: 'Swan.com', + text: "going to give you a couple of moments to make some closing comments, but before we do that, I want to welcome up Corey Clips and CEO Swan Bitcoin. Corey, do you have something you want to add? Absolutely, yeah. I just wanted to just give the backstory of how we connected with Bold in the first place. I think it'll be kind of fun for people to hear. I don't know if John even knows the story from Zach, but from like November through February of this year, so this was probably three or four months, we were deeply exploring, mostly me and Jeremy show. Walter had a product who was new to the company. We were really exploring whether to launch a Swan card and what that might look like and what we can do. And we were talking to all the providers and the program managers and digging the interchange fees and all this kind of stuff and basically netted out saying, that's a whole company. It's just way too complicated to do just with, like, a small team inside of a small but growing company like Swan. And so basically it was kind of wanting to kill it, but was still keeping the consideration open. And then I think Zach just reached out and I was like, oh, yeah, that's it. You need a team that's just doing this literally every day. And I'd rather partner with these guys in the future or something like that, but just see a team just go hard after that specific problem and nail it. So then we invested out of both Bitcoin or Ventures and Elzonte Capital and obviously have been rolling out the red carpet for them at our events and things like that. So really psyched to have you guys in the space. And this was illuminating the parts I heard and want to thank you for coming and sharing. That's awesome. Thank you, Corey. Yeah, it was great meeting you in La. You know how to throw a good party. A great party. I'll be there for the festival next year for sure. That's awesome. Just to wrap up. I know Alex wants me to wrap up. So appreciative you guys having me. We're excited at Bold to launch in the US next year. We're an amazing team of bitcoiners building an innovative product to help other bitcoiners and also to attract precoiners to make the Bold move to live on a bitcoin standard. You can follow us at bold bitcoin on Twitter. You can take the 30 seconds to go to get Bold IO to sign up for our waitlist. We certainly got some fun things in store for you. Before we launch, we'll be giving you a few ways to earn some stats and have some fun. And thanks again. My DMs are open. Love to hear what you guys all think. Awesome. John, thanks so much for being here. Very excited about what you guys are doing. I wish you the best. Hope it works out great. We'll probably have you back from time to time, check out where your progress is at and how things are going. Go ahead, Corey. So, I don't know if anybody switched over for a minute, but I just went and toured into the CoinDesk space doing their rundown of the top 40 most influential people in crypto for 2022. And they let me up on stage, and you'll probably hear about it on Twitter later today. That was pretty fun. Oh, God. Here's Tom. Tory. I honestly was really trying to pull punches and not be mean. I mean, these reporters hosting a space about this, they have no idea, but it's like you had literally zero bitcoiners out of 40. The only person that writes about bitcoin that got honored was Nick Carter, and he was honored for attacking toxic bitcoin maximus, and that's why he made the list. So, yeah, it's pretty funny, I bet. I hope it's recorded okay. I think it was recorded, yeah. So it would be toward the end, probably 15 minutes before the end of their space or before, whatever, 09:00 a.m. Pacific was, I think a space spun up already right now talking about it. So I'm going to see if I can find that good stuff. ", + timestamp: '02:03:53-02:08:08', + topics: ['Cory Klippsten', 'John Ely', 'Bold Bitcoin credit card'], + type: 'twitter_space', + weight: 6.436822414398193, + }, + { + boost: 0, + date: 1587380431, + description: 'The availability of foods and other supplies during the covid 19 pandemic', + episode_title: 'Life in Interesting Times - Part 1', + guests: [ + { + name: 'Matt Murray', + profile_picture: 'https://pbs.twimg.com/profile_images/1273726156236140544/SJjI1WD7_400x400.jpg', + ref_id: '72ce0a76-8593-4898-9369-f39b4bc3d2d3', + twitter_handle: 'MattMurray28', + }, + { + name: 'Louise Reynolds', + profile_picture: 'https://pbs.twimg.com/profile_images/602592582754050048/RbAMd-Re_400x400.jpg', + ref_id: 'b4c2b12b-96a1-4d37-ae74-5be0883f3091', + twitter_handle: 'reynoldslouise', + }, + { + name: 'Jon Slaughter', + profile_picture: 'https://pbs.twimg.com/profile_images/1336713360/samantha_test_090_400x400.jpg', + ref_id: 'a295820c-0098-433a-8cc3-cc13085b85c8', + twitter_handle: 'jonslaughtermd', + }, + ], + hosts: [ + { + name: 'Kim Howerton', + profile_picture: 'https://pbs.twimg.com/profile_images/858822375457964032/Of4fbmsT_400x400.jpg', + ref_id: '49ab70ff-a8e5-4e0f-855a-49abe8a5b645', + twitter_handle: 'theketonist', + }, + { + name: 'Daisy Brackenhall ', + profile_picture: 'https://pbs.twimg.com/profile_images/858822375457964032/Of4fbmsT_400x400.jpg', + ref_id: 'd68ff5aa-c521-4199-9a6d-bf2cf077ccaa', + twitter_handle: 'theketonist', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/a8e3517b-b44d-4270-adaa-57587896b1e7.jpg', + keyword: !0, + link: 'https://traffic.libsyn.com/secure/ketolifesupport/ketolifesupport-0031-life-in-interesting-times_tc.mp3?dest-id=2479037', + node_type: 'clip', + pub_key: '032318b5d36e680f7ce77f01e1e5e848da79bbd8c86018513c77b32a869e080e90', + ref_id: '51ef662a-201f-4c3c-b60d-bbc627c74e8e', + show_title: 'Keto Life Support', + text: "You've got a huge apartment. We can see it. We're looking at each other on Zoom. Kim, you have a very small apartment. Don't you have a partner that you have to share it with all the time? How's that going? Yeah, it's very small here and we don't have really any outdoor space, which is kind of a bummer. And, like, it's in some ways awesome. We're getting along super well and everything's really, like, great. And at the same time, like, there's no space. So working from home is more challenging because you don't want to bother the other person and, like, you know, you're like, talking about this whatever topic and, like, I'm sure they could care less. So I think it's trying to be respectful of more of the ears space than anything else, but everything's, you know, I think there's just a certain amount of surrender that has to happen. This is what is and this is what's going on in terms of what you can and can't do. I mean, I realized all of my hobbies involved shopping, things like that, but in terms of availability here, the first week was rough. In terms of shopping, like, meat was sold out in a lot of stores for when I would go in, but within a couple of days to a week, that seemed to shake out. And now the only thing you can't find here are paper towels and toilet paper. You have to get in line before the store opens to be able to get those but everything else, there's a vegetable. There's like a call Monterey Market. There's a market a block away from me. It's like if you put an incredible farmers market in a building, like they get all the produce from all the local farms and things. It's just a couple of blocks, like a block away from me. And that is like superstar. I shouldn't tell people if you're in the Bay Area. No, it's super stocked and full. But they're only letting like a quarter of the people in that their usual occupancy is. So you have to stand in line outside and you can only go in when somebody comes out. And so that's pretty much what's going on here with the social distinguish thing, is causing things to go at a slightly slower pace, but you just kind of put your earbuds in and listen to some music and just wait in line for an hour and you're fine. And so food seems really well handled here in the Bay Area in terms of being able to access we want we don't have any limits. I don't know how I would do with a family of five to only be able to buy like £2 of meat. You'd have to go to the store like every day, which seems to be kind of counter to what you want to do. I'm trying to limit my trips maybe once a week. So there are no limits. It's very state to state here, though, because I hear from a lot of people, like a lot of clients in their state, they're having a lot of supply issues. But you can get your deliveries. I can't. You can still get Whole Foods and you can still get your Amazon deliveries to you. Yes, but so many people are having so much stuff delivered that everything is booked way out. And so, like, you might place an Instacart or Amazon order and instead of coming in a day or two days or whatever day, whatever the appropriate amount of time, it might be weeks. Instacart is supposed to come the same day, but it's like Instacart is a program. You can shop for groceries and they deliver them. There are other similar programs. It used to be you book it in the morning, you get it in the midday. Now you book it in the morning, you get it four days later. And so they're trying to hire staff to catch that up. I just got a notification that a local Whole Foods is actually closing at 01:00 in the afternoon. So all afternoon they can just do deliveries. And so I think that people are shaking out how to make this work. I think that a lot of it is people hoarding buy more than that they need, which is understandable because no one wants to go out. Kim, if you need toilet paper, I didn't hoard, but buying one pack at one of those box stores will last me an entire year. So I can always send you some. We are fine. Because I actually did get up very early the other day and go to get in line at Target before they opened and it worked and we were fine on toilet paper. The bigger issue was paper towels. Those things hardly. I use a lot of paper towels when I cook because especially with chicken or something, I wash my hands. I use paper towels instead of a dish towel because that way I'm just throwing it away, drying off meat. I use paper towels. I use paper towels a lot. I find this toilet paper thing is weird. I can almost understand the initial rush, but why is it still out of people can't still be I said the same thing. I was like the hoarders have hoarded. What is happening? Well, I actually heard that because nobody's going to work. Exactly. Well, they make those gigantic rolls of single ply garbage toilet paper that are at work, but no one's using that toilet paper. Everybody needs residential size roles and they're not told to make that many. So they've got a shift from making commercial grade toilet paper to residential grade toilet paper and plus the panic buying. So there is a shortage of supply. But human nature it's a weird thing to grasp on to, but I think it's just a control issue. Yeah, I think it's something people can control in an uncontrollable environment. And luckily for me, as I said, I'm not a hoarder, but I do keep meat in the freezer and stuff. So at the end of February, we went to Pipers play. Matt's daughter had a play and we had some friends that came into town and we cooked ribs, baby back ribs and wings before we all went to the play. So the very next day I was going to the box store and I got replacement ribs and replacement wings. And this was just at the start of the spread of the disease as well here in the US. So I had those things in the freezer to begin with and restock them when I use them. Yeah, I think there are a lot of services like butcher box and where you can get meat delivered. And I guess so many people started doing that. They are now have a waitlist. But one of the things that is coming out of this time, in the United States anyway, is a lot of people are getting more interested in their food supply chain. And so in California, I'm in Northern California, but even north of me, about 4 hours up towards Oregon, california is really a big state for anybody that doesn't know. So about 4 hours above me there are a bunch of farms and like one of them is called Five Mary's Farm and they sell direct to the public. They said their number of orders to the public have tripled. So people placing orders to be shipped or to be picked up. And a lot of the restaurant supply farms, a lot of farms just are like connected to a farm to table restaurant. And so with the restaurants closing down, a lot of the restaurants have started supplying to homes. And so, you know, one of the silver linings is I think a lot of people might get a lot more intimately acquainted with where their food comes from, start to form relationships with food producers. And so I'm actually going to do a blog post about it this week where you can find in your area or as close to your area as I know about a local food producer who you can order directly from. Kim ", + timestamp: '00:36:39-00:44:02', + topics: ['Covid 19 pandemic', 'toilet paper', 'food supplies'], + type: 'podcast', + weight: 6.419591903686523, + }, + { + boost: 0, + date: 1672772445, + description: 'Bitcoin mining and malicious attacks', + episode_title: 'TOXIC HAPPY HOUR! #Bitcoin, Foss, Max Keiser & the Plebs! 🍻😂', + guests: [ + { + name: 'Greg Foss', + profile_picture: 'https://pbs.twimg.com/profile_images/1552599670945464320/3OgqRHNo_400x400.jpg', + ref_id: '853d9f80-f6cf-490f-9d1e-f29cdc6acc6f', + twitter_handle: 'FossGregfoss', + }, + { + name: 'Jeff Ross', + profile_picture: 'https://pbs.twimg.com/profile_images/1475554600094552064/DSlPG1lx_400x400.jpg', + ref_id: 'ae6ee2a2-1cf7-41a0-8366-ff6e94a6403c', + twitter_handle: 'VailshireCap', + }, + { + name: 'Craig Shipp', + profile_picture: 'https://pbs.twimg.com/profile_images/1605961563420114945/MWGqR1Gm_400x400.jpg', + ref_id: '8d6ca47a-89a2-4331-bae4-2fae18055a95', + twitter_handle: 'CraigShipp', + }, + { + name: 'Oluwasegun Kosemani', + profile_picture: 'https://pbs.twimg.com/profile_images/1538403135101800450/sO-RPI9U_400x400.jpg', + ref_id: '25ce4b90-6689-4dd9-84b6-240c7bcbe407', + twitter_handle: 'MrlamilamiKosch', + }, + { + name: 'Max Keiser', + profile_picture: 'https://pbs.twimg.com/profile_images/1361873587582472195/y57DiTYX_400x400.jpg', + ref_id: '743efd07-d194-4c74-8663-45c3b8646b8e', + twitter_handle: 'Maxkeiser', + }, + { + name: 'Isabel Foxen Duke', + profile_picture: 'https://pbs.twimg.com/profile_images/1466874333410717698/WRQh2-_m_400x400.jpg', + ref_id: '58989d4a-4a96-4ffc-8cbe-f233ffb10420', + twitter_handle: 'isabelfoxenduke', + }, + ], + hosts: [ + { + name: 'Publord', + profile_picture: 'https://pbs.twimg.com/profile_images/1480160632360124416/AM_vVRko_400x400.jpg', + ref_id: '5b7b7e22-fe55-4e1c-933d-6544f6600351', + twitter_handle: 'publordhodl', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/0c42d408-e518-4ecf-b282-d864a8c14002.jpg', + keyword: !0, + link: 'https://stakwork-uploads.s3.amazonaws.com/uploads/customers/2707/media_to_local/7de8e4aa-50a6-4f57-a8ff-6ca16a4f0ae4/76c3395a-4fe5-4802-8d2a-92cca1f1ea0b.mp3', + node_type: 'clip', + pub_key: '02574d6e8e787372184b6f17c40d6c6fe1777db9015801f95dfd24692784d767cd', + ref_id: 'e4520df5-b812-4247-bd2d-7db10bc5b51f', + show_title: 'PUBLORD', + text: "Brandon gentley here. I don't know how far down the road you guys are going with this, but I just was reading a bunch of stuff over the Christmas holiday just on grid attacks and just stuff that I was only somewhat aware of over the last ten years and seeing some little more high profile ones. But there's a lot more than I had ever thought. There were just minor attacks, thousands of people losing power, things like that, all over America, et cetera. How does bitcoin mining does it, can it? Will it? How does it kind of stabilize just from more malicious attacks? Damn, that's a great question. Cyber warfare? I'm not an expert there, Brennan, so I can't help you with that. I'll just tell you, it's pretty easy to knock out the North American power grid, okay, with some sort of carbon bomb that sprinkles carbon all over the transformers of every single major US. City. I'm not telling you how to do it, and maybe I've got my facts wrong, but I don't know how bitcoin mining helps with that, except to say the following there will be lots of bitcoin miners that are still spinning even if a major North American grid goes down. And that's the beauty of the bitcoin mining network. How could it help, actually, in a pure capitalist way? Well, if you get utilities creating more revenue streams and therefore getting increased revenues and using what's called operating leverage, meaning every single cent of electricity that they get demand for, over and above their fixed cost base creates enormous profits. Well, then the bitcoin miners can increase the revenues of the utilities, which allow them to be able to spend more money to defend their grid against cyber attack. Does that make any sense? Yeah, it does. Greg, I appreciate it. And I'm sure that there's whether it's the Jason Lowry of the world who you've mentioned numerous times kind of going down this type of road thinking about things like that, and then that's just one of those things where I was shocked. I was really blown away, actually, at how much it was happening. And it seems to be happening at the small level where no one notices. And I would imagine that there are some type of, like you said, some capitalistic approaches that either are being done or will be done eventually and just kind of figure out as it's kind of become more prominent, which, like you said, cyber warfare. The biowarfare aspects we know are going to be more of the future and not so much the kinetic side. So yeah. Thanks, Greg. So you're welcome. And you know, what makes me happy is like, smart kids like you are asking these questions. This is what gives me for those of you who don't know, I've met Brandon in in La. And he and Larry LaPard and I, you know, talked about these things. And the world's in good shape when young kids and when I say kids, I mean anyone younger than 35 when young kids are asking these questions and planning for the future. Not everyone's a fan of Jason Lowry. I'm going to see him in Boston in a couple of weeks. I've met him before. Look, the kid has ideas that turn some people off and that's fine. No one else. We can't be groupthink. If everyone's thinking alike, then somebody isn't thinking according to General George Patton, right? So let's keep the lines of communication open for people that might have different ideas or ideology than you have. So the world is in good shape when the kids are asking these questions and not the old men like Max and myself. I don't know the fucking answer. All I know is I want the kids to ask these questions so that when they are my age, they will have solved a lot of the problems that we're now dealing with. Right, Max? Hey, Greg. Yeah, we're going to solve them all. I'm curious your opinion. You have a lot of experience. You're gaining new knowledge over time, like we all are. I personally see a time where no matter what the cost of electricity, individuals randomly all over the world are going to be willing to run miners, especially when they're configured to produce heat for a home if you're going to have to buy heat anyway. And you could run a minor to heat your home and generate SATS for doing it. I even believe some people would be willing to lose money to accumulate SAS. Do you feel similar about the overall worldwide market for mining because of the pools that are out there? The ability for anybody to mine even with just one machine and still gain some SAS, I feel like it's a great opportunity that's never going to go away. Potentially just about your no. Let's take it to one of our power plants in northern Ontario. We are considering adding a greenhouse right next door that will create leafy greens for the indigenous community. So the indigenous communities in Canada have some of the highest tuberculosis rates because they don't get enough sunlight. And if you had a 35 megawatt mining facility, which we do, it's operated by Hut Eight, a publicly traded bitcoin miner. If the heat from that bitcoin mining facility was vented into a greenhouse and used to grow leafy greens for the indigenous communities, do you think that would be a benefit? And so that's just one extension on an industrial size project from exactly what you're saying. Okay, these are secondary and tertiary benefits from the efficient use of energy and its byproducts, which are heat in terms of making life better for various communities around you. So whether it's heating your home or heating a greenhouse to grow leafy greens to allow to combat tuberculosis, lots of these indigenous communities in northern Ontario, there's less than 100 people living in these communities. And if you could put an entire ecosystem to work around a bitcoin mining facility, I'm not going to. I'm not indigenous, and I really don't want to offend any of them if I'm pining on something. But I do think it would make sense to take that heat and heat the school, heat the greenhouse, heat the local tribunal. Every single indigenous community is set up in a similar way. So this is really good stuff as far as I'm concerned. I got to make sure I don't get between the wall and the wallpaper, because I don't know this stuff inside out. But there are people that are studying these projects for the benefit of remote communities everywhere in the world, not just in Canada, but remote communities in Africa, et cetera. So your idea on a home basis, Jim, can be taken to a village in Africa or a remote community in northern Canada for the benefit of all the less privileged. And I got to be careful, not less privileged, just less electricity centric populations. In the case of northern Canada, all of these communities run off of diesel reciprocating engines, diesel fuel, rather than having some sort of electricity solution that incorporates bitcoin mining. So you guys have seen ice road truckers and you've seen their trucking, diesel fuel to northern remote communities. Don't you think the environment would benefit by having a bitcoin mining solution that allowed for an electrification of a remote community running on, let's say, liquefied natural gas rather than diesel fuel? All of these things are possible with bitcoin mining. You never hear any of this from the politicians because, well, first of all, they're not smart enough to think this way. And secondly, they're biased because, you know, oh my God, bitcoin mining is bad. So peel away a layer of the onion and you'll see all the different ways that Bitcoin mining can help remote communities, whether it's your own house or a small village in northern Canada. ", + timestamp: '01:07:37-01:16:31', + topics: ['bitcoin mining attacks', 'bitcoin mining facility'], + type: 'twitter_space', + weight: 22.711352085784924, + }, + { + boost: 0, + date: 1629691200, + description: '[[Bitcoiners]] seeing the signals of the depreciation of [[fiat money]]', + episode_title: 'WHY ARE WE BULLISH Bitcoin Meme Hub Jan Capek Bitcoin Mechanic Max Hillebrand ep195', + guests: [ + { + name: 'Max Hillebrand', + profile_picture: 'https://pbs.twimg.com/profile_images/1311357499514269696/-HQFwyFH_400x400.jpg', + ref_id: '9a86cc59-ed01-4757-88f6-e9d9d63067b9', + twitter_handle: 'HillebrandMax', + }, + { + name: 'Bitcoin Mechanic', + profile_picture: '', + ref_id: 'faae3a37-0115-4074-af21-7d79c429c7cb', + twitter_handle: '', + }, + { + name: 'Jan Capek', + profile_picture: '', + ref_id: 'ec6f8b14-6c4b-42e9-8e86-9aa902c0906d', + twitter_handle: '', + }, + { + name: 'Bitcoin Meme Hub', + profile_picture: '', + ref_id: 'dcd5a590-2018-4707-a49b-8142d7b14e33', + twitter_handle: '', + }, + ], + hosts: [], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/419512c2-e309-4b25-bfe2-cd481d53f66d.jpg', + keyword: !0, + link: 'https://anchor.fm/s/11e95d20/podcast/play/39201536/https%3A%2F%2Fd3ctxlq1ktw2nl.cloudfront.net%2Fstaging%2F2021-7-23%2F214267789-44100-2-17e9fbafdf841.m4a', + node_type: 'clip', + pub_key: '', + ref_id: 'b03519b0-5139-4ad4-910a-40f40e332352', + show_title: 'BTC Sessions', + text: "I was like six years old, my parents had we still have a house, small cottage in the mountains and when you bought it, it was actually an old house with all these relics from the beginning of the century. And what I actually discovered there was like a small envelope. When I opened it, there were like the German marks, but these were already the million banknotes. And at that time I was like, wow, this is a lot of money. And then I had this discussion with my dad explaining me that, well actually this was not worth even like you should put it into a stove. They used it for heating because you couldn't buy a bread with that recently. I'm kind of afraid that you just exhausted my reasoning as well with this, but let's wait with them. Back in 2019, I got the purse made from the Venezuelan Bolivars. It was being sold at some conference and I even bought a small backpack for my daughter. So this is really a topic that not too many people realize and I think we are in our own bubble as Bitcoin is that we do like watch for all these things and we're like seeing, I don't think we're seeing like Bitcoin appreciation, but this is the depreciation of all the paper toy money. And then I think Max already hit a few points basically saying that the merchants are greedy and they're like increasing the prices. But the problem is that the merchants also have info. They have to pay whatever transportation for the goods they have to buy, the raw materials if they're actually manufacturing and directly to selling. It all adds up. And I actually had a talk with a friend of mine who has a big machining shop and he produces parts and thousands of pieces on CNC lights. And he said, well, the iron material, which used to be like the cheapest material being used, went up 100% in last month. And when you look at the development of iron ore now, it dropped actually at the end of July. But this is a strong signal that something is already going on and it will be projected into the economy eventually because these are the initial parts of the whole economical chain, the people who are actually manufacturing something. And at the end you have the merchants selling you your airports or whatever. So we are going to see something interesting in a couple of months or years. So I'm kind of scared of that. It ", + timestamp: '00:16:17-00:18:55', + topics: ['bitcoiners', 'fiat money'], + type: 'podcast', + weight: 6.382523059875072, + }, + { + boost: 0, + date: 1669766400, + description: 'Konstantin Wünscher narrates how he founded Kollider', + episode_title: 'Meet the Makers: Konstantin & Arvin', + guests: [ + { + name: 'Konstantin Wünscher', + profile_picture: 'https://pbs.twimg.com/profile_images/917464868663582720/PMFCqusG_400x400.jpg', + ref_id: '5f027fce-7775-4824-b941-d2f4120d2d0f', + twitter_handle: 'krychtiukmd', + }, + { + name: 'Arvin Galoy', + profile_picture: 'https://pbs.twimg.com/profile_images/1429792764464611329/4VQqlZiM_400x400.jpg', + ref_id: 'e0eb434a-9219-4c57-b9e4-da6ceeaec040', + twitter_handle: 'GaloyMoney', + }, + ], + hosts: [ + { + name: 'Zapp Ed', + profile_picture: 'https://pbs.twimg.com/profile_images/1519990234070540288/adGqlFoj_400x400.jpg', + ref_id: 'bbe7cf1d-cd8d-4d36-926d-76f41b775fbb', + twitter_handle: 'zapp_ed', + }, + { + name: 'Moritz Alby', + profile_picture: 'https://pbs.twimg.com/profile_images/859727763292512258/kiFpZ2vO_400x400.jpg', + ref_id: 'e88efbf8-3809-4508-a86a-d7bf9effb574', + twitter_handle: 'MoritzKaminski', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/965489b4-a414-4fd0-ab8c-55911b1596aa.jpg', + keyword: !0, + link: 'https://www.youtube.com/watch?v=CjwjScc0TYg', + node_type: 'clip', + pub_key: '02574d6e8e787372184b6f17c40d6c6fe1777db9015801f95dfd24692784d767cd', + ref_id: 'caca294d-8661-49a2-80a9-32e4e8452c03', + show_title: 'BOLT FUN', + text: "content. What about you? Did you immediately start with Collider or was there also some experimentation in between? Yeah, there was a lot of experimentation. Actually, I remember our first product that we build had nothing to do with trading. It was actually a data labeling service that used Lightning to pay people to label images. Because my background is machine learning and AI, that's what I studied. So even though I came out of this finance job, I thought I got, well, payments, that's pretty cool. Maybe start with customer facing product rather than having to deal with other big trading firms. So basically what we're trying to test is whether people are into micro payments of this. Because the idea was just like this labeling model that was pretty state of the art back then, which basically enabled you to make some sort of very rough outline and then we'll do the rest for you. In terms of labeling was sort of an unsupervised learning technique. But anyway, so we were paying people for like every time they made a label, they would get some SATS and we were just thinking, would people do that? And we kind of realized quite quickly is that these were really very neat things combined. Like people that would label data, they probably wouldn't know about Lightning or it would be not usable to them. And also it was just like people didn't really care about very small amounts. So basically we're just testing whether Michael payments are so popular. I don't know. We did test it and we didn't get any of this. So we kind of scrapped that idea, although I thought it was a cool product. And then we started basically focusing on something that we know more about, which was obviously finance trading and stuff. And then we built a very simple spread betting interface, which was not like an exchange, was just like, you can make it back with someone else about price. And yeah, we did that. And then I don't know why, I think we sort of realized that the problem this is, again, people don't necessarily need to want to do that in a very small again, basically, again, it was focused on very small payments, and people didn't care about very small amounts that much for that application as well, like trading. So if they want to trade, they want to trade size. We kind of come to terms like, in order for this to work, we actually have to build a proper exchange where people can basically trade whatever amounts they want and make it very similar to what already exists in order to kind of ease in the users into this new idea of using lightning rather than just throwing something completely different at him. It was sort of the journey that we went down. But yeah, compared to Arman, it was very like product driven. We were only thinking about products most of the time. We were thinking, how do we get this technology into as many hands as possible? And again, trading is probably one of the most popular things to do in crypto. If there's any application, it's like used very like a lot and then trading. And so we thought, well, that's a good starting point, let's just try to create what already exists. But with Lightning kind of derisk, that's what we narrowed down on and that's how we then build. And yeah, I think this is sort of it. And now we obviously made branch out a little bit away from just trading. I was thinking about more payments and more of the stuff that is probably like what Alan mentioned. Actual sort of problems that you could solve with this technology because trading is obviously it's needed as a backbone but the things that that enables is not necessarily very obvious to people but it can enable other financial sort of instruments or abilities for people. But yeah, so this is what was the journey, very product driven, quite a bit of experimentation with different ideas. ", + timestamp: '00:10:10-00:15:01', + topics: ['Konstantin Wünscher', 'Kollider'], + type: 'youtube', + weight: 9.398438332070137, + }, + { + boost: 0, + date: null, + description: 'Solution for the massive debt growth in third world countries', + episode_title: 'Gladstein & Sam Callahan - World Bank / IMF & #Bitcoin', + guests: [ + { + name: 'Sam Callahan', + profile_picture: 'https://pbs.twimg.com/profile_images/1592532728775409667/0DayEP2Q_400x400.jpg', + ref_id: '5a044a91-8dee-421c-86dd-8c734dc9bc32', + twitter_handle: 'CallahanMusic_', + }, + { + name: 'Alex Gladstein', + profile_picture: 'https://pbs.twimg.com/profile_images/1382371620669452292/VOPKOc8w_400x400.jpg', + ref_id: '49445c1c-7c66-4b73-9eec-09a337befbec', + twitter_handle: 'gladstein', + }, + { + name: 'Brady', + profile_picture: 'https://pbs.twimg.com/profile_images/1502564606836981763/fmqtNrNc_400x400.jpg', + ref_id: '45bbbb01-6163-4b3b-905a-fc67174893d9', + twitter_handle: 'CitizenBitcoin', + }, + ], + hosts: [ + { + name: 'Neil Jacobs', + profile_picture: 'https://pbs.twimg.com/profile_images/1593645788978102277/UAQCQKeE_400x400.jpg', + ref_id: '0bc759e0-b055-4800-a79d-2b950fe5cc53', + twitter_handle: 'NeilJacobs', + }, + { + name: 'Alex Stanczyk', + profile_picture: 'https://pbs.twimg.com/profile_images/1539055022364708864/rwErK6x1_400x400.jpg', + ref_id: '3126e2a3-bbe4-456b-b298-9714085fa286', + twitter_handle: 'alexstanczyk', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/239722cb-4216-414a-a17b-5adf9d52e15a.jpg', + keyword: !0, + link: 'https://stakwork-uploads.s3.amazonaws.com/uploads/customers/2707/media_to_local/f8be7c60-94a5-41d0-972c-6301cd4ad7f0/4e5bf86b-6193-4f6e-8fa3-933344b2053e.mp3', + node_type: 'clip', + pub_key: '02574d6e8e787372184b6f17c40d6c6fe1777db9015801f95dfd24692784d767cd', + ref_id: 'f76300e2-dc0d-4960-a1cf-6c7b90ad4cfa', + show_title: 'Swan.com', + text: "Yeah. So it creates these dependence on these international financial institutions. And when these poor countries get into debt, usually they just need to get in more debt. And, you know, the IMF mission statement is to achieve sustainable growth and prosperity for all of its 190 member countries. And the World Bank's mission statement is to, is to reduce poverty and improve living standards by promoting sustainable growth and investment in people. Now, when these poor countries need money, there's really not many places to go. The IMF and World Bank are some of their only options. And if you look at the data, Alex, I'd love, if you just go over, have they achieved their mission, would you say? And can you talk about the amount of growth that's happened in the debt over the last, say, four or five decades for these third world countries? Because it's just insane to me. Yeah, a country I looked at, Bangladesh, had a couple of hundred million dollars in external debt in the early seventy s and now has $100 billion today, for example. So the whole machine has basically made it so that these countries have more debt than they could ever possibly pay back. And again, the debt is denominated in a currency that they cannot print. So the whole system just needs to be disrupted and broken. I think that in the future that if we do end up having a bitcoin standard, that the system would be disrupted and broken, because then you wouldn't have certain countries that could issue with paperwork, the reserve currency. All countries would be on the same standard, and every country would be able to, if it wanted to without needing permission from a great power, they could convert their energy into this reserve currency through mining. And maybe that's not sufficient. Right? And I'm not suggesting that all countries will become equal. You're still going to have huge inequities that result from labor productivity and all kinds of other things. But the point being that even small countries, they won't necessarily have to shape their economy to suit the needs of foreign powers to get foreign hard currency. They could, for example, invest in local electricity production, which is good for the local population anyway, and then use that to mine Bitcoin or to power the local economy. And I think that's a much better kind of choice than selling stuff for other countries that is just going to go to paying it back more debt. So I think there's like a light at the end of the tunnel. Maybe there's a way out. And that's something that I try to be pretty hopeful about. Certainly a lot of people at the African Bitcoin conference think this, and I think it just starts to make sense once you talk to enough people. We should all speak the same monetary language. There should be one standard. It is completely ridiculous that there's 41 central banks in Africa. Each one is its own lording over everybody else. And then there's also the French, who still control a huge chunk of Africa. So in a Bitcoin standard, the power of these institutions to repress people is dramatically diminished. It's not eliminated at all, but it's certainly diminished by a lot. So that keeps me optimistic about the future. Yeah, absolutely. Bitcoin is a light at the end of the tunnel because it's hard to see another way for this to get disrupted, in ", + timestamp: '00:59:02-01:02:59', + topics: ['Debt growth solution'], + type: 'twitter_space', + weight: 6.3401312828063965, + }, + { + boost: 0, + date: 0, + description: 'Implications of Taproot activation on the protocol', + episode_title: 'Taproot Activation Q&A with Bitcoin Devs - TABConf 2021', + guests: [ + { + name: 'Andrew Chow', + profile_picture: 'https://pbs.twimg.com/profile_images/1452266201770496010/44FHCtZM_400x400.jpg', + ref_id: 'f96d87ca-5060-4021-aeb9-61db03312027', + twitter_handle: 'andrewrchow', + }, + { + name: 'Ben Carman', + profile_picture: 'https://pbs.twimg.com/profile_images/1550704386007089152/pLwUSeff_400x400.jpg', + ref_id: '1d1e95ba-b4af-415f-aafe-85c6dd7571b8', + twitter_handle: 'benthecarman', + }, + { + name: 'Matt Corallo', + profile_picture: 'https://pbs.twimg.com/profile_images/697361498587451394/_rX0-O0W_400x400.png', + ref_id: '08cb3c45-c0bc-4a60-ae5b-a1283d352c8b', + twitter_handle: 'TheBlueMatt', + }, + { + name: 'Pieter Wuille', + profile_picture: 'https://pbs.twimg.com/profile_images/1264051937172836353/n7gHdLbB_400x400.jpg', + ref_id: '40260d2f-3480-47d6-8515-d2e780901273', + twitter_handle: 'pwuille', + }, + { + name: 'Vivek Kasarabada', + profile_picture: '', + ref_id: '60ed22d0-8cf3-410e-8a7c-9c343ae109ca', + twitter_handle: '', + }, + { + name: 'Murch', + profile_picture: 'https://pbs.twimg.com/profile_images/1269477743525130241/-U843Cmt_400x400.png', + ref_id: '3e2c1c73-a057-4475-9782-3bb0d3d8cc62', + twitter_handle: 'murchandamus', + }, + { + name: 'Andrew Poelstra', + profile_picture: 'https://pbs.twimg.com/profile_images/1316562683009921024/FSscAYvJ_400x400.jpg', + ref_id: '15fb9c53-c988-4af1-bbf0-4832d71b0a01', + twitter_handle: 'Blockstream', + }, + ], + hosts: [ + { + name: ' TABConf (The Atlanta Bitcoin Conference)', + profile_picture: 'https://pbs.twimg.com/profile_images/1596233571521499138/YE8Us_Ml_400x400.jpg', + ref_id: 'eb1b6016-6223-4b2b-9264-2423ce66304f', + twitter_handle: 'tabconf', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/e7d2a4ca-6b44-4a45-a94c-6f48987979f7.jpg', + keyword: !0, + link: 'https://www.youtube.com/watch?v=MrxtqAlRI2U', + node_type: 'clip', + pub_key: '029099ec31eb33594611dc47d5c93de2c1aa86918e3a36b408c14a500601c8bc9b', + ref_id: 'f9d1d228-19db-4a2d-bfb3-7853fd745ea0', + show_title: 'TABConf (The Atlanta Bitcoin Conference)', + text: "implications does it have for the protocol? What are some things that will be possible day one on activation? And also what are some things that you guys see coming in the future that will take advantage of these changes that aren't really being built yet? It all depends on your wallet. If your question is from the perspective of a wallet developer, well, as soon as Tap root activates, they will be able to make use of the features that Taproot introduces. If you're just using a wallet, well, you are restricted to whatever your wallet can do. So there is no impact as a wallet user. There is no impact on you unless you update to a wallet that can. Make use of these features more generally. So first you'll see transactions that make use of Schneider's signatures. Schneider signatures are slightly smaller than the current ECDSA signatures. So there is a small savings there for the inputs if you are involved in multisig multisig that uses K of K keys. So two of two or three of three can be expressed as a Tweak in the keypath. So when people implement a signature or sorry, a public key aggregation method like for example, music, they'll be able to do keypath spins and multisig wallets will be able to look the same as single SIG underwire. And I know for a fact that a few companies are working on this already because it will be huge savings compared to having an actual multisig script in the transaction to just have a keypad spend. Yeah, go ahead. Good. We'll move on to lightning at the end. Okay. So more generally, I mean, this is the design goal of Taproot that it introduces a new address type that can be used for everything. So before we had separate output types, separate addresses for the simple pay to pubkey pay to pubkey hash style things. And on the one hand and on the other hand, p to SHP to WSH for the more complicated script things Taproot produces allows it to produce a single address that is different from all of the ones before. But it can be used by everything and even better at spending time. In many cases, you cannot distinguish what it was. So this is both an efficiency saving because it's cheaper, it's also privacy saving because you're not revealing to the world what kind of wallet construction you are using. So, for example, right now you can detect like, there's some fairly large multi sigs that are basically only used by one entity. And so you can very trivially detect like, oh, all of these, I don't know, what's the liquid policy now? Like nine of 15, like all of the nine of 15s are liquid, basically. Okay, well, whatever. And so you could hide some of that policy, so you wouldn't necessarily reveal that when you spend the transaction. Another thing that's a little bit down the line, but a cool crypto trick you can do with Taproot is you can produce a ring signature over all. Of the Taproot outputs or all of. Your Taproot outputs above a certain threshold and prove that you are holding a coin of a certain value without revealing which one. Other than that one of the tapered ones. Yeah. So it's generally that kind of fits into a broader category, like Schnorzigs are much simpler mathematically. And so there's a lot of cool tricks you can do like that and other stuff like the signature aggregation and whatnot. And then also with lightning, this is also something that's kind of further down the line. And there's no real concrete I guess AJ has one concrete proposal for it, but eventually we're going to get PTLCs instead of HTLCs. So instead of using a hash, we can use public keys and revealing the private key for it, or revealing a signature, an adapter signature for it. And that allows us to decorate payments across hops, right? So right now, if you go to send an HTLC or you go to send a payment enlightening, it goes through four hops. And all of those four hops see it's payment hash, you know, ABC, and they all see the same payment hash. And so later they could, you know, get together and correlate and say like, hey, I saw a payment hash ABC. It's like, yeah, I saw that too. And you can correlate and tell where that payment maybe came from, where it went to. And with PTLCs, there's an additional blinding factor added at each hop, so they won't see the same data and only kind of their immediate peers will see the same ID. So if you're missing a hop, you won't necessarily be as able to correlate that. So it's one fewer correlation metric. There's obviously other time based correlation metrics that are problematic, but like the on chain stuff, it's one fewer correlation metric where you can group certain types of transactions. There are other issues, but remove one at a time. I'd say the explain like I'm five, is just like standard user wallet is basically the same, and then all the fancy stuff gets cheaper once actually people build up stuff. I think that's a good summary. What will change on activation time for a normal wallet user is absolutely nothing until their wallet starts making use of it. ", + timestamp: '00:12:40-00:18:29', + topics: ['Taproot', 'Taproot activation'], + type: 'youtube', + weight: 6.240247130393982, + }, + { + boost: 0, + date: 1671634578, + description: 'How Bitcoin mining will open up more markets', + episode_title: 'Café ₿: 23’ Macro Outlook w/ Joe Burnett & Mitch from Blockware', + guests: [ + { + name: 'Cory Klippsten', + profile_picture: 'https://pbs.twimg.com/profile_images/1569687200857755648/fxiCeaqc_400x400.jpg', + ref_id: 'ddfb9b4c-4e6a-4f4c-a01b-e6bb1bc55464', + twitter_handle: 'coryklippsten', + }, + { + name: 'Tomer Strolight', + profile_picture: 'https://pbs.twimg.com/profile_images/1591960241008148481/HtyINxtU_400x400.jpg', + ref_id: '3a2bc97d-072c-4ed9-9a59-17ceeb68fe99', + twitter_handle: 'TomerStrolight', + }, + { + name: 'Joe Burnnet', + profile_picture: 'https://pbs.twimg.com/profile_images/1601649626754564105/9TubQjRd_400x400.jpg', + ref_id: '1c849151-1cca-44db-9a69-665fac5dc6f6', + twitter_handle: 'IIICapital', + }, + { + name: 'Mitchell Askew', + profile_picture: 'https://pbs.twimg.com/profile_images/435841191524204544/mzKR9KCX_400x400.jpeg', + ref_id: 'fc4ba3ae-eacc-489d-a888-397ba6b1f842', + twitter_handle: 'mitchell_askew', + }, + ], + hosts: [ + { + name: 'Alex Stanczyk', + profile_picture: 'https://pbs.twimg.com/profile_images/1539055022364708864/rwErK6x1_400x400.jpg', + ref_id: '3126e2a3-bbe4-456b-b298-9714085fa286', + twitter_handle: 'alexstanczyk', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/239722cb-4216-414a-a17b-5adf9d52e15a.jpg', + keyword: !0, + link: 'https://stakwork-uploads.s3.amazonaws.com/uploads/customers/2707/media_to_local/601898b8-8964-48ba-aa92-ab3f1c4ad0bb/75f49b1a-9dce-41fd-8517-77b607c9c154.mp3', + node_type: 'clip', + pub_key: '', + ref_id: '6c3edea1-97d0-41d4-a015-0f16417f2ee7', + show_title: 'Swan.com', + text: "Why couldn't it work? I think it's fascinating because if you think about power generation, the power generation and distribution has been hand in hand at the absolute key to prosperity globally ever since we figured out how to leverage rubbing two sticks together and making a fire in a cave. And the fact that they're bringing on six new nuclear reactors, they're embracing Bitcoin mining, and they have these alliances in the chip industry. Wow, man, that's a freaking power move. I mean, more in terms of sorry, go ahead, nuclear, my bad. Well, this isn't just that building new nuclear reactors. There is intention to do that. This is restarting their existing fleet. They've got 30 gigawatts sitting on the sideline right now just waiting to be put back into action. And then on top of that, they do want to get into the small modular reactor game and also build new nuclear assets, nuclear in Japan. And Bitcoin mining is going to be very interesting. What I was getting at, Alex, when I said I don't know if it could work, what I meant is literally backing their currency with the Bitcoin that they're mining. So keeping the Bitcoin and then somehow backing their currency with it. I just don't know how those dynamics work. I mean, they have so much debt that would they technically have to default on that before they make the switch over to a Bitcoin backed currency. Or like I don't even know how that would work because obviously they can't back their currency with Bitcoin and then still expect to be able to pay off their debts if their currency is backed in Bitcoin at that point because you can't print more of it anymore. To me, the simplest way would just be to hyperinflate the currency, switch the currency to a new Bitcoin backed currency and then get to hit the reset switch. So all the debts basically go to zero in real purchasing terms and they can reset the whole currency. This is the idea behind gold. You know, the funny thing about central bankers and gold is if you watch what they say, when they're no longer in charge of the central bank, many of them will admit candidly in interviews that the reason that they hold gold is that it's the emergency reset switch. If the currency ever blows up and collapses, they can use gold to basically declare that currency the old one and this is the new one. And gold is the reset switch. You have to have some trustable reset switch. I'm not saying it needs to be gold, but I can see how it would be a pretty I'm not going to say seamless, but it seems to make a lot of sense to me. Like, okay, you know what's super interesting? Wiremart hyperinflation. I know you guys are probably sick of hearing me talk about wire, but it's fascinating. Do you know how they reset the currency? One dude came along and he introduced a new money, and guess what? The money had as its primary attribute. He said there was a limited quantity. We will never print more than this amount. And instantly the people accepted it. And then what did they do a few years later? Well, yeah, obviously they can renege on those promises, but my point is that confidence is the key to all currency systems, and in context of Japan, I think that would work. Yeah. There's no easier way to convince a populace of a better currency when your current currency is collapsing and failing. So when you are kind of under that pressure and you're getting squeezed from every angle, it's easy to get out by saying, hey, well, look at this new one we have. It's backed by this underlying thing called Bitcoin that can't be printed more of, so we won't print more of it either. And, I mean, who knows if they'll keep that promise, but at least it'll be better than what they have now. And I don't know. Again, looking my only exposure to kind of where the Japanese yen is in terms of its purchasing power is what the price of Bitcoin is in terms of yen. And it doesn't look like it's inflating that much, at least relative to its exchange rate for Bitcoin. So, like, I don't know if they're being squeezed that much at the moment, but obviously it's only a matter of time before all fiats have to squeeze, as we always talk about here, right? Yeah, I don't know. Interesting times ahead, for sure. Nuclear, what's the latest in regard to small modular reactors? SMRs people who don't take two minutes and explain what the heck they are and then tell us what's going on in that space. Yeah, so small modular reactors are basically just smaller versions of a nuclear reactor. Anything less than 300 MW is what fits into this small modular category. There's many different designs. I think 70 are being proposed right now globally. About half of them are just smaller versions of the existing boiled water reactors that most of the global reactor fleet is designed by, based on. But some of them are going to be using new cooling technologies like high temperature gas and liquid metal cooling and solid state cooling, various technologies that have been proven in the past but put on a shelf as they only stuck with one design and just built many of those. But right now in Canada, there are several projects ongoing. There's a 300 megawatt BWRX reactor by GE attachee that just got nearly a billion dollars in financing from the federal government and the province. So there's a lot of money being funneled into these projects. The Go dates are still looking 2027 28 to have these demonstration units operated. And I'm just actively trying to connect the dots and see how we can integrate bitcoin mining into this new future that nuclear power is getting into, because I think it'll be greatly beneficial and open up even more markets than the small modular reactors would be capable of. Because now we can essentially play out the pioneer species idea and drop a nuclear reactor wherever we want, monetize it immediately, and then just start building around it. So it's going to be very exciting. Lots of countries are pursuing different versions of the SMRs. I just happen to be most familiar with what's going on in Canada. It's looking like Argentina might actually be the first country to have a deployable commercial scale SMR outside of besides China, obviously. But that's going to be a very interesting future for Nuclear. And we'll keep you guys updated as things go along. Awesome, obviously. Happy to have you back. Anytime, nuclear, you've got some great stuff, and I'm super fascinated by the SMR industry. ", + timestamp: '00:54:19-01:01:51', + topics: ['Bitcoin mining', 'Currency hyperinflation'], + type: 'twitter_space', + weight: 14.955047728896634, + }, + { + boost: 0, + date: 1666137600, + description: 'Tools for managing Lightning nodes', + episode_title: 'Meet the Makers: Alan & Kwinten', + guests: [ + { + name: 'Alan Plus', + profile_picture: 'https://pbs.twimg.com/profile_images/1565235279451103233/XD8pJuIo_400x400.jpg', + ref_id: 'e362fed6-ec06-4d8a-a052-3137b24f213f', + twitter_handle: 'alnboltn', + }, + { + name: 'Kwinten De Backe', + profile_picture: 'https://pbs.twimg.com/profile_images/917859380699320320/p_v-fjmh_400x400.jpg', + ref_id: 'be68f240-1f4c-4b27-b4bb-752c90cbe0c3', + twitter_handle: 'QuintenDeBacke1', + }, + ], + hosts: [ + { + name: 'Moritz Alby', + profile_picture: 'https://pbs.twimg.com/profile_images/859727763292512258/kiFpZ2vO_400x400.jpg', + ref_id: 'e88efbf8-3809-4508-a86a-d7bf9effb574', + twitter_handle: 'MoritzKaminski', + }, + { + name: 'Zapp Ed', + profile_picture: 'https://pbs.twimg.com/profile_images/1519990234070540288/adGqlFoj_400x400.jpg', + ref_id: 'bbe7cf1d-cd8d-4d36-926d-76f41b775fbb', + twitter_handle: 'zapp_ed', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/965489b4-a414-4fd0-ab8c-55911b1596aa.jpg', + keyword: !0, + link: 'https://www.youtube.com/watch?v=GyA8tHNKmig', + node_type: 'clip', + pub_key: '02574d6e8e787372184b6f17c40d6c6fe1777db9015801f95dfd24692784d767cd', + ref_id: '7e996fc8-37c7-447f-b0e5-c6dbf58015fe', + show_title: 'BOLT FUN', + text: "Now, as we have now, both of you come from the field of node operations. Can you share a bit like the tools that you use and why you use these tools to manage Lightning nodes? Alan, if you want to go first. Well, actually I don't actively manage my node at all, so I manually go in every day and do things, but I don't use any tools. And the reason is because I don't want to compete with other node operators, so I don't want to outcompete them. So my role is really to make sure that everyone else is successful and making money and make sure that the network is decentralized as much as we can do it and everyone has capacity both ways and stuff like that. So I don't want to be like a routing node, so I'm kind of supporting smaller nodes while still growing and stuff like that and for that I don't need automated tools. Can you tell us a bit more? You mentioned just the purpose you want to help smaller nodes, but do you do that under like the Lightning network plus node or how does it work and how do I get support from you if I am a small node operator? So one way I do it is, for example, if there is a swap that is open between smaller nodes and it's failing because somebody fell out of the swap, these liquidity swaps and let's say there are three people and one node is just out because something happened, then I take their place. This happens quite often and my node is quite big. So those other two node operators are typically satisfied with me taking the place because they get more connectivity. And the other thing is I allow anybody to open a channel to us if they want to, even small channels like 50K sets or something like that, which is typically not possible to other big nodes because they don't want small channels. The minimum is usually a million or 2 million nowadays, which could be a bit too much for a beginner because they don't want to risk that much money. And sometimes I do open to people that I chat with and so these are the ways basically I just create liquidity for people or help them organize their own little swaps and stuff. And you do that all really manually or rely on standard tools that are out there? Yes, mostly like 90% of the time. I did try a couple of tools because I wanted to learn. So there are some situations where I use some automation. I also wrote some scripts of my own for setting fees. For example, I experimented with all kinds of different fee structures. Zero fee, very low fee, higher fees, optimal fees, all kinds. And I found that all of those strategies have an advantage and a disadvantage. So there's no optimal perfect strategy. You can make money in different ways really. You just have to find your own niche. And I also found that being a completely zero fee node is not beneficial for other nodes. So unless I want to be like zero fee routing who makes money on being super well connected and selling channels? That's a different story. But I don't want to be a zero fee routing because that's too much competition to other nodes. So setting some small reasonable fee is probably the best way how I can stay out of other people's business. But at the same time it's kind of like the best of two worlds. Like trying to be a good router for others but also not taking their profits. And where do you see does this go to in the future? So it seems for me like you are very much supporting the operations of your platform basically right when someone needs a replacement also then you jump in and help out to create one of these swaps or to complete them. But where does this go to? Do you always think, okay, this is where you want to stay or do you have some ideas where this could lead to? Yeah, I have ideas and I think the future is going to be more and more automation in this swap creation. So for example, I have this idea where I could have a wallet, a brand new wallet that I create or maybe join some existing wallet. Basically when a new user wants to open a channel they would open it through a swap immediately. So they would have two channels immediately on the at the beginning, one incoming, one outgoing. So it would be all the swap creation would be done through an API and transparently for the users. Because this way you don't have to go to a website and you don't have to log in and do all of those things. It's just all done in the background. So yes, this is I think is the future where this is going to be one of the ways how you get incoming liquidity? Yes, I think that's a very interesting topic. We should come to that in a second. ", + timestamp: '00:16:30-00:23:25', + topics: ['Lightning nodes', 'nodes operators'], + type: 'youtube', + weight: 6.396489111901376, + }, + { + boost: 0, + date: null, + description: 'The Bitcoin Village project in Nigeria', + episode_title: 'The Orange Sun ☀️ #Bitcoin News and Talk', + guests: [ + { + name: 'Portland Hodl', + profile_picture: 'https://pbs.twimg.com/profile_images/1562306406526492672/LiqmI9NS_400x400.jpg', + ref_id: '530aba21-392f-4156-9e91-4fc5c76fced1', + twitter_handle: 'PortlandHODL', + }, + { + name: 'Miykael Woodward', + profile_picture: 'https://pbs.twimg.com/profile_images/1473433558475689985/CM0o3oWu_400x400.jpg', + ref_id: '6fe02a78-4f07-47e7-8e64-b278a3167835', + twitter_handle: 'MiykaelWoodward', + }, + { + name: 'Okin Mobi', + profile_picture: 'https://pbs.twimg.com/profile_images/1518945775685967873/O0wPrIKO_400x400.jpg', + ref_id: 'bbd18918-7758-4bdb-b9a5-641bf92748a6', + twitter_handle: 'OKIN_17', + }, + { + name: 'TK☣️Ph.Ple₿', + profile_picture: 'https://pbs.twimg.com/profile_images/1505791887415730177/d0YDQ3Xc_400x400.jpg', + ref_id: '9e3ffa2c-9410-48e9-a726-8312c0abcd7c', + twitter_handle: 'ToxiKat27', + }, + { + name: 'Funsho Jimoh', + profile_picture: 'https://pbs.twimg.com/profile_images/1600143435775856641/uqgmtT23_400x400.jpg', + ref_id: 'a237ffb0-792b-484e-b12f-65a2b679eaf1', + twitter_handle: 'fnicencool', + }, + { + name: 'prince ogbonna', + profile_picture: 'https://pbs.twimg.com/profile_images/1595693872637681664/TeWJzTut_400x400.jpg', + ref_id: '0b0c70b1-23b1-4d98-b259-6dbb67b7481d', + twitter_handle: 'princejoj0', + }, + { + name: 'The Bitcoin Village', + profile_picture: 'https://pbs.twimg.com/profile_images/1544318244789649410/kQ2G1MCE_400x400.jpg', + ref_id: 'd894aca4-36f6-4821-a00b-a4e860b19502', + twitter_handle: 'VillageBitcoin', + }, + { + name: 'Masterguantai', + profile_picture: 'https://pbs.twimg.com/profile_images/1521025685078302720/w9dZwehS_400x400.jpg', + ref_id: '29baf525-42eb-41a6-98f9-a0d6b4480af0', + twitter_handle: 'MasterGuantai', + }, + ], + hosts: [ + { + name: 'Jeremy Garcia', + profile_picture: 'https://pbs.twimg.com/profile_images/1589056396816896001/dslbBQSX_400x400.jpg', + ref_id: 'e5e68f75-d71a-4477-ae9a-6a891f2d84d0', + twitter_handle: 'Jerimican5445', + }, + { + name: 'Satoshi’s Journal', + profile_picture: 'https://pbs.twimg.com/profile_images/1598641632601047042/qrZMP5Oy_400x400.jpg', + ref_id: 'd977ed11-09b0-4143-828d-582ecb8b58ca', + twitter_handle: 'SatoshisJournal', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/9b2e17f2-71c5-4f1e-a3e7-720d06dab810.jpg', + keyword: !0, + link: 'https://stakwork-uploads.s3.amazonaws.com/uploads/customers/2707/media_to_local/bef977d0-8a6a-441b-a8cb-58baebe2bfd7/b9ec2918-1059-48ac-b5ee-69018c42a07c.mp3', + node_type: 'clip', + pub_key: '03c18d0c6c35333f22bc524e21a5fd1d2d9886f5d4d958dc1de95d025de5c84cfc', + ref_id: '63cc2dff-cc56-40e2-8c22-93153e7d3255', + show_title: 'Satoshi’s Journal', + text: "It looks like Olu finally got up here. I know he's having some issues. I think he's at the Bitcoin village, so connection is not very good, so give him a chance. Olu, if you can hear me, how's everything going at the Bitcoin village? Yes. I have to hide myself in the heart to be able to talk. Can you guys hear me? I'm in a whole place. Can you hear me? What did you say? You're hiding in, like, a heart, like a small bamboo and tree kind of thing we put together so we can hide our head here when the sun is very construction site. Hello, everybody. Top of the morning. It's been crazy. Bad network, but still we have some level of internet. Anyway, thank you. Jeremy Tk. Towel. Prince Blanca out there. I see Janet. I see amica. Extremely. Daniel, lots of you. Big respect. Thank you. Thank you so much. I'm freaking excited. We're getting donations. $1,500. We're getting donations. It's crazy. Yeah. No, it is, man. Yeah. I can hear you. We can hear you, Olivia. Oh, yeah. Okay. It's so amazing that you have to look. Things happen, right? Nigeria's name is known for multiple things. Apart from our musicians painting the country in a positive color by winning Grammy awards, BT awards, and whiskey. David Bernarboy doing well. Our politicians are denting our name with their corruption and some fraud. Stars are also messing up the name of the country with scam. But bitcoiners are lifting the name of the country up. In many cases, when people do stuff, they associate Nigeria with scam. Unfortunately, it's not about that. The major percentage of people in Nigeria are very good people. And the base coin village is a big example of one of those good projects. Although I have seen and heard people say one or two negative things on Twitter, I smile. I will come here, and I can see the progress. And very soon, they're going to start seeing pictures, and they will see and they will come here. The people who don't have the opportunity, capacity, or one or two things are the people that will miss out. But because it's a monumental structure, you will come here. Maybe if you can't make it in 23, you can make it in 24, 25. The building will be there forever. When we leave this face of earth, when I am no more, when myself and Jeremy are no more, maybe 70 years from now, hopefully we'll leave longer. Because I would like to leave to, like, 100 years when I have teeth no more. And I can just I don't have to be able to pronounce it. I can actually picture that with you notice saying that. Can you say it again how you would be saying that? There are people called land grabbers. Land grabbers. Right. They take money from you every time you're doing construction. They table people. The government has dealt with them, but still that's what they do. So they were at the site yesterday with machetes and everything and sticks and they went to disturb the construction workers. So they called me. I couldn't get to them for a long time. They couldn't get to me for a long time. So when it got to me this morning, I had to step in to the CABAC, which is the paramount ruler, and of course some of the leaders. And we went to the site and we've been waiting for them to show up. They didn't show up because I already got military people on standby to make sure they don't disturb the progress of the work. It's not like they didn't vandalize anything, but they scared the workers away from the site. Anybody that knows Nigeria know this is how these land grabbers come, all because they want to get money. But I stack their money today. I'm ready to give to them. But I'm going to give them a serious warning. The next time they come and do such thing, you're going to be in trouble. So that has been the stress for today. They take money when you're about to do your after your. So what is trying to do is take money. They take money for digging. They take money digging, which is excavation. They take money for your DPC down proof cost. They take money for the first level of blocks. When you get to your decking. They take money when you roof. They take money. Once you put the gates. They take money until you're done with construction. They take money about five times. So if you don't know how to operate with them strategically, they can stress you. And they demand for crazy amount of money. They are called, or more, only length. The Nigerians here can attest taste to that. It's terrible. But I thank God I've been able to douse the tension. And they're requesting for $1,000. I told them that's crazy, I'm going to give you guys $500. So I told them you have to write an undertaking, blah, blah, blah. They refused to say never, blah, blah, blah. I put my phone number, I said I was going to record them, blah, blah, blah. At the end of the day, I gave them $200 first. I said, I'll give you 250. When these guys completely stopped the job today, finished their job today. So at the end of today's work, I'll give you 250. And I said, so let me take pictures with you. Stupidly. They took pictures with me and I recorded them when I was giving them money. Why did I do that? So that when they come another time or when another set comes. Because what they usually do is they come in different sets. So once you give them money, they tell other people, oh, he gave us money. So you can go and act like you didn't know anything about it. So those are the challenges of construction in Nigeria. And I think it's because the Bitcoin village, Nielsen, is already online. So some of them can go online and they can see, okay, this is a big project. As a matter of fact, whether it's big or not, anytime they are doing construction, they look for construction sites and they come and say, oh, we are the community people. And really the community don't like them. They are the thugs on its uneducated parts of the community that's full of disturbance. But the paramount king has given an order and set up like a vigilante group to protect the construction site workers. So that's just an update. There's a lot of work right there. So I wanted to update you all. That's what I went through in case somebody saw me and he took my pictures while I was Qurin. I said, get out of here, get out of here. It's just me trying to let our work be smooth, because they can delay work for like a week if you don't pay them. Like they delayed us yesterday. And every day counts because we need to launch this next year, especially during the conference. That aside, I can't wait to release pictures of updates for you guys. Most likely by I'm looking at next weekend, substantial progress would have been made. And I just want to thank the stock chain as they've been very nice. It's more like the stock chain as they are competing with each other. Somebody puts 100. Somebody puts 500, somebody put 1005. So, Jeremy, what we're going to do is what we have said before, after the orange song, we're going to have our meeting maybe today or much later or maybe by the next meeting, so we can put together a necessary document that is faction as we need and anybody that would need it. Maybe we're going to put it up on the official Twitter of the Bitcoin village and or invite people to private meetings. I don't know where we're going to put that up. Maybe it's a torture on the website so people can see some of the documents that we have all approved by the legacy government, and they can see the quotation from the QS, and they can see how transparent and the amount that the construction is going to cost you. And I know the quotation by the quantity surveyor. So we're going to put up the architectural drawing, the mechanical information, the electrical information, the soil test, the approved building plan from the government. All documents will be put up there with biweekly progress pictures and videos so that this donation can keep coming in, and not just for the donation's sake. Anyway, that's what we have said when it was just you and I working on this. Why do we have to be transparent? I've never, ever taken donations in my life. Public donations like this. And it's amazing. It's really amazing. The budget we had initially shut up tremendously because of inflation. Things are getting expensive day by day. There is blocks, cements and all that. And we really need to let people know we are building this for bitcoinners and even non bitcoinrs that will become bitcoinners. Who wants a bitcoin village and bitcoin development center that people will walk into and be very happy and befitting place that whatever certificates you get out of here would be valid for you and you'll be proud that you came here. Even if it is a developing community, in five years this place is going to be a city because of the fort mainland bridge. If they finish the fort mainland bridge by 2027, which is five years from now, I want to say five years because I know that the government can be very terrible and it might even take seven years. It's going to open up. And the value of properties here might shoot up to as much as $500,000 per plus. So we are properly positioned and we must do things rightly. I'm just so glad that the statuers have turned up for us. Even jeff boots and so many people have commended positively about what we are doing. This is what we plan between ourselves and look at the world embracing us. Even corey of swan give us a light by retreating. I know retreat is not necessary endorsements, but retreating on your timeline is some level of association and we appreciate that. So all bitcoiners follow bitcoin village, advillage bitcoin and trade at this particular and spread the word this that we're doing this on a private property so the governments don't have power over what we're doing. So care less about the naysayers and we will continue to be as transparent as possible. It's been myself and Jeremy putting our heart and money to this all the time and myself on the ground doing the work. But now we have you guys bitcoin as a family and I really want to thank phil for making this possible. Our teammates will involve the stock chainers and anthony of stock chain. Great guy. And all the stock chains and tao will give us more like an open attestation. Tao attested to our proof of work openly, without an iota of doubt. And I've never heard tao say such about any construction project around this bitcoin ecosystem, although maybe I've not featured in the space where it must have done that. But tao really talks in spaces. When he's talking, it's either educating or not. Now, this is not simply jeremy and all my team members know me. I don't care. I don't think I have sleep on my shoulders because I know how people look at me as a black man, and of course because I'm from africa, nigeria. So I protect my image, I get my money and I respect myself. But when people say something great about what we are doing here, far away, here in Nigeria. I have to give Kudos to what Kudos is due. So you can do your check and balances. You can verify as much as you want. The address is open with or without me. You can go to the village, you can ask village questions. You can go to the site if you want. Very soon we're going to put a big sign at the waterway so anybody that is on the boats can actually see the sign, verify. You don't have to know me and put the word out. Let them know we are building a bitcoin village. Some people, my colleagues, come if they like it's, to their own pocket. But when we start to give lectures and we start to graduate bitcoin and lightning developers, then you will go and ask those people that will be changing the world if it still is come, or you yourself is the person that is bipolar and have issues in your life. And I'm sorry, it's not to be condescending to anybody, but it's just how I feel. So thank you all. I'm sorry I came in here late. I've been trying to come online, but it's been terrible network issue. And of course, because I've been around putting in work, so I have to hit the road again. I may not be able to talk too much, but thank you, big thank you to stock chain US for donating their money. And because of that, we're going to make the budget transparent. From the engineer to every necessary person on the team will come on spaces at different times, so you can have a talk with them and all of that. This project is going to cost way over. Way over. The last time we checked in Nigeria, money for just one building is about 104,000,000 there. You can calculate that in dollars for whatever it is it's going to cost, whether black market rate or CBN rate. So you can see it's not a child's place. You see the type of building we are trying to do. It's something we could have put together a bongalu. And let's say we start to finish the bongalu in three weeks, but of what use would it be? Because it would be the same size of building and the same look with every other building in the village, we have to do something that the villagers will look and say, wow, okay, this is monumental. If this can come to our community, then we must take our life seriously. Like I told the young men that came to distract the place yesterday, I told them today, I said, look, you are only marking yourself negatively. Because when other people in this community will be learning and will be graduating and some of them might get employed by bigcoin companies internationally, you would regret your actions today instead of you supporting the progress of this building. Because with or without you, this will rise. You just take your money and you go on the day of lunch or by three years when this monumental structure is already manifesting lots of greatness, you'll be regretting. So you better go and change your ways and think of how you can come and learn. Maybe this is your go to opportunity to break through from the poverty that you have been entrenched in. Two of them came to me later and apologized and say, you will never see us here again. Please, I would like to learn bitcoin and I was very glad to them. So, yeah, what we're doing, the blockers here and there, but we are overcoming challenges and we are moving at a very unprecedented pace, even though there are delays. But I'm very glad. I thank you all. Sorry for taking your time. You can ask questions and hopefully you guys are preparing dusting your passport so we can all marry Gada as friends, as brothers, as one bitcoin is in Nigeria come March 2023. God bless you all. Hey, can you just give us an update as to what is going on exactly at the village? Of course. They started the foundation. So are they starting the first level of the blocks or exactly where are they at? Because I haven't talked to you to get an update on it. When you talk and you have Indians like this. So if I say today we're going to show you the level where we are at and we have some blockers and we don't make it today, it's going to look like, what's up? So look at the Nigerian bitcoin conference. It was supposed to be 24th and 25 February, but Nigerian government already splitted the presidential election for the 25 February and the entire week before 25th is going to be security, heavy security all over the country. So we had to move our conference a month after. Look at the radio show, which is supposed to start on the 11 December, which is two days from now, all paid up. We have to move the radio show just because we don't want our airtime to be exhausted and we can capitalize on the airtime for promotion of the Bitcoin nigerian Bitcoin Conference on the Bitcoin Village construction, of course, adoption, education, work. So I want to talk less and let videos and pictures do the talking and then we can have a proper space and title it Bitcoin Village Updates. Whether we can come ask questions thereabout. Yeah, that makes sense. No problem. The thing that you mentioned that was interesting to me that I would never have imagined happening. I've been in construction for over 15 years and I never would have imagined the fact that you have people coming to work on a construction project and then the next day another group comes and then the next day another group comes for the mere intense. Grab us or Lilac. Any Nigerian come up? You cannot whether you are building, whether you are the richest man on earth building anything in Nigeria, the size of their construction work is how they will mobilize. They will mobilize so much, and they will give you a bill. And the worst the government can do is just to come and chase them. You're going to call security for them, and they would get off the land. And the crazy thing is, they start stressing your construction workers. They start stressing them, stressing them, stressing them. They might relay them before you get there. And you don't want a situation whereby you're going to be involved in the police all the time in a community whereby you have been accepted. The paramount king is in support. All the chieftains I support, 9% of the people I support. So if you bad eggs are only out to get their little unwarranted illegal money. But we're in Nigeria. It's crazy. Even though government have issued an anti land grabbers law, if it's supposed to be effective, but these motherfuckers are the ones encouraging it the most. The richest people in Nigeria, in Nigeria are the people that make use of these thugs. They use them for disruptions. So these thugs have contacts. At the end of the day, you, you, you call cops on them. The next you park jet, they go by car, you're not there or something. You know, you don't want all of that. You don't want to show because of you. And it's funny, they came out outside the community and they start to say, oh, my father had a house here 35 years ago. So it's not a bad news. It's just me being 100% transferring. So that, you know that that can be an entrance for one day, two days. If you don't manage it well, it can extend to one week, two weeks. It happens to almost every construction site, except you want to man a military base. And when I say military base, like two, three military guys, the Nigerian policies are much strong enough to stop them. You have to pay us the right pay them the day times four or five what the government is paying them to scare the land grabbers away. Yeah, that's very interesting, and yet one of many obstacles and challenges that you're facing. So for you guys that don't know, olu and I, we hired a surveyor and a project engineer. And if I could be there, I'd be overseeing the construction myself. But Olu is there, and he's the one on the ground doing all the work. As far as yes, we have the engineer and we have the surveyor, and they're doing their respective jobs. And what their positions? As in the construction project, those positions are very important, but it's very important to have someone on the ground to inspect the work. That's basically what you call quality assurance. And so Olu is doing a lot of things already. I mean, he's the CEO of bought me cash, and he's helping with Satoshi's journal, and now he's on the ground in the village. So I've told him many times in the conversation how thankful I am to have a partner that's doing this, because it's a lot of work. I mean, I've done construction for many years, and I've been the inspector, I've been the engineer, the surveyor, the designer, the quality assurance, I've been all of it. So I understand how intense construction is. And when you have to deal with shenanigans like what olu is talking about, additional to all of the other responsibilities on the construction site, that is a very stressful deal. So thank you, Olu, for the update. I look forward to the pictures. Already we have some pictures, but I think that it's going to be really cool to see everything come together and look forward to the videos as ", + timestamp: '01:56:17-02:20:03', + topics: ['The Bitcoin Village', 'Nigeria', 'Bitcoin Adoption'], + type: 'twitter_space', + weight: 6.083251953125, + }, + { + boost: 0, + date: 0, + description: 'Michael Atwood talks about OshiApp', + episode_title: 'Cool Apps Built on Lightning - March 16, 2022 - Voltage Twitter Spaces', + guests: [ + { + name: 'Chad Atkins', + profile_picture: 'https://pbs.twimg.com/profile_images/1200611447979544576/W9ocRJTb_400x400.jpg', + ref_id: '62da3c50-0a46-400b-81a3-5f482f5b8fee', + twitter_handle: 'Chemchad', + }, + { + name: 'Michael Atwood', + profile_picture: 'https://pbs.twimg.com/profile_images/1362207977470521345/Jy2_Ge60_400x400.jpg', + ref_id: '16359ade-afb9-4a37-be0b-0844a6134327', + twitter_handle: 'Dooowta', + }, + ], + hosts: [ + { + name: 'Nate Glasky', + profile_picture: '', + ref_id: '0662789d-b39e-4aed-ad6f-44257695b6af', + twitter_handle: '', + }, + { + name: ' Bobby Watts', + profile_picture: '', + ref_id: 'ae2685c6-1307-473a-95b0-87c234e50483', + twitter_handle: '', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/2ec62250-4755-4616-8342-096a2cfab95f.jpg', + keyword: !0, + link: 'https://www.youtube.com/watch?v=4EJrnxYOShY', + node_type: 'clip', + pub_key: '', + ref_id: '9f69933d-69fe-47a0-af4d-9d80726e60aa', + show_title: 'Voltage', + text: "All right, it looks like Michael is here from Oshie app. I want to invite him up because I know he's got some cool game plan and stuff just going on, like from Miami, like getting Oshi app utilized down there. And he's got some traction in Texas, I think I saw Marty using Oshie app or something, like buying some local beef. And there's been some block parties using. So if you are available to chat, Michael, feel free to hop up. It's funny because actually that's one app that I am absolutely a fanboy over and I totally did not put it on my list for some reason. But yeah, dude, Mike. I see Mike all the time in Austin. So if you want to tell us about Oshi, Mike, feel free to raise your hand. Or we'll send you an invite or I can just explain it, but I'd. Rather you do it. Yeah, I can chat a little bit about it, I guess, until it comes up. But anyone who's not using Oshi, it's pretty sweet. Like, as a consumer, you can download the app and then just check locally what deals around you, what small businesses around you are willing to give you bitcoin back for coming in and shopping. And it's as simple as you get a gift card, essentially, like just a deal to that business, and you can go in and make that purchase and the business will say, hey, you get this percent sat back. And what's really cool from a consumer perspective that I like because I love whenever applications are gamified, kind of like fold. Like if you referred people to fold now that they have this every time someone swipes their fold card, I get paid. Like, in the last week, I've made 1300 stats just by referring people two years ago to fold. And Oshi is kind of the same way, but it's a little better where you as a consumer, if you refer businesses onto Oshi app, you can earn like a very small fraction passively on all the purchases done at that business. And there's like an incentive model that if you're an advocate for the brand and for those businesses, you can earn a little bit, too. But it's pretty great. What I would really love to see happen is, like, everyone's going to Miami 35,000 people next month, right? Like, if we could get ten to 20 businesses around the conference or onboarded to Oshi, you could just flip open the app, see what businesses around there want to support Bitcoiners. And it's like, yo, come grab a burger, get 15% back in SATS. And it just gets Bitcoin back to everyone who shops. And the thing that's really great about this is, if you've noticed, like, Lolly and Fold, they're really focused on bigger companies, bigger providers. And there's a lot of organizations, there's like three providers out there that give you access to these gift card networks. So if anyone wanted to spin up their own fold or Lolly or things like that, there's partners you can partner with that give you access to that. So there's tooling out there for big businesses, but there's not one out there for B to C. Like getting small businesses on board. It's something that's literally never been done. So it's pretty cutting edge and it's a big problem that could be solved. But I'm personally passionate about this because at my last job, I've managed marketing for small businesses for like ten years. And 60, 70% of businesses in America are small businesses. It creates most of the jobs in our communities. And whenever you can have a Bitcoin circular economy at a very local level, you're keeping money in your community. You're not exporting money to Walmart, who's then sending it to China. You're not sending money directly to Visa and Mastercard. You're keeping it on a local level, empowering small businesses and rewarding consumers for being a part of that Bitcoin circular economy. So if there was an application that was one that really gave back to local communities, it's definitely Oshi in my mind. Yeah, I think when I talked to Mike about Oshio a while ago, it was like what really kind of blew my mind was, up until this point, I always envision sort of brick and mortar lightning commerce to have the merchant generating the invoice from somehow. But with Oshi, the customer generates the invoice and pays it on their own phone and then just shows the merchant, basically, and the merchant scans it or whatever and says, okay, cool, you got it. And I just think that's super cool. And it takes away so much friction from the merchant, especially a merchant that might not be well, that might be like, Bitcoin curious, but doesn't want to have to run a note or BTTP server, something crazy like that. I just think that's really cool. And there was a Bitcoin block party, I think, a month or two ago in Austin, which where the Bitcoiners got a bunch of restaurants and bars to use Oshi, and there was a huge sort of get together around it, which was pretty cool. I hope they throw another one of those because sounds like a lot of fun. A lot of stuff is happening in Austin. Not going to lie. I'm going to invite Kyle Murphy up if he's available. I know you might be passively listening like Michael, but there was the hackathon this weekend at Pleb lab, the SATS by Southwest Hackathon. And I'd be really interested to maybe hear at a high level what were some of the projects, maybe that really had legs, that based on what you heard on the ground floor, like maybe people are going to pursue a bit further that could really come to life. I'm sorry, were you talking to me? It kind of muted as I accepted the speaking thought. Yeah. What'S going on? This past weekend we threw a hackathon. As far as some of the projects that had legs, I would say. I. Don'T have a lot of hackathon. I have zero hackathon experience to kind of counter it too. I've never been to a hackathon or hosted a hackathon before this weekend, but just from some of the things I heard from some of the devs who obviously have a bit more experience with hackathons than myself, it was really quite unbelievable. The amounts of high level projects that actually came out of this past weekend. I think we had ten projects that actually presented and a handful more that were built but did not present. Of the ten that we saw presented, there were seven or eight that I think really I'm not sure people will have the time to kind of really push forward with, but if they did, I would be bullish on seeing all seven or eight of them kind of push forward as a potential bitcoin company. The winner of the hackathon was a project called Pleb FM, which was like a live streaming stats kind of update for pushing music on, like a jukebox style kind of thing, where it was like you could basically pick a number of stats. You could get your song pushed to the top of the queue and you would see, like, a live leaderboard for music being played and streamed over the Lightning Network, which was really freaking cool. Nice, that's exciting. We saw some good business stuff. I know Nifty Nye and someone else were working on Lightning, like a dashboard for kind of merchant services, which I think for things like Ocean and a handful of other businesses are going to be really powerful. One of the things that's kind of really lacking for business integration is the company's ability to really trap and pay attention to what's going on in their finances. So the kind of Lightning dashboard that really showed like where money went, where money came from, kind of open channels and a whole host of other things in real time in a really easy to read manner was also pretty cool. And that was Lisa from Block Streams project. She's been working on that accounting stuff for a while, so that's pretty cool to see. Yeah, she kicked it into high gear this weekend. It was pretty cool to see. I believe she's actually sitting at Club Lab right now, kind of continuing to work on it. So as far as projects that are pushing along forward after the hackathon, that seems to be one of them. When you're in the groove, you're in the groove. Absolutely. Sounds like a good time. Yeah, it looks like we're almost to an hour. Austin bit devs is tomorrow. I will be there if anyone wants to say hi. I'm sure Kyle will be there. ", + timestamp: '00:44:28-00:53:59', + topics: ['Michael Atwood'], + type: 'youtube', + weight: 6.080077648162842, + }, + { + boost: 0, + date: 1590465600, + description: 'How does Bitcoin is the next level of protest?', + episode_title: + 'Chat 39 - Bitcoin Renaissance - with Marty Bent John Vallis Alex Gladstein Elizabeth Prefontaine Brady Swenson', + guests: [ + { + name: 'Alex Gladstein', + profile_picture: 'https://pbs.twimg.com/profile_images/1382371620669452292/VOPKOc8w_400x400.jpg', + ref_id: '49445c1c-7c66-4b73-9eec-09a337befbec', + twitter_handle: 'gladstein', + }, + { + name: 'Marty Bent', + profile_picture: 'https://pbs.twimg.com/profile_images/1362747135981199370/mSy97J12_400x400.jpg', + ref_id: '655bdcb1-21c3-411c-aa24-fe7e4c7a248c', + twitter_handle: 'MartyBent', + }, + { + name: 'John Vallis', + profile_picture: 'https://pbs.twimg.com/profile_images/1568743166035070976/4MyKww8A_400x400.jpg', + ref_id: 'c3a9fe29-3b78-4665-af54-e293e9d68962', + twitter_handle: 'johnkvallis', + }, + { + name: '& Brady Swenson', + profile_picture: '', + ref_id: '0b68a085-0680-44b8-891c-6e1e84ac4eb1', + twitter_handle: '', + }, + { + name: 'Elizabeth Prefontaine', + profile_picture: 'https://pbs.twimg.com/profile_images/1382790711427354625/D09LMToL_400x400.jpg', + ref_id: '4506df72-5de4-4144-abc4-011408b6b496', + twitter_handle: 'Eprefon', + }, + ], + hosts: [], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/9e7e229f-2631-4542-b5d7-7fcd502798dc.jpg', + keyword: !0, + link: 'https://traffic.megaphone.fm/CSN4002307424.mp3?updated=1627951379', + node_type: 'clip', + pub_key: '', + ref_id: '67236e2a-900b-4cf6-bc6c-165c0f7e3219', + show_title: 'Bitcoin Audible', + text: "do think eventually the impact of Bitcoin will be as kind of like this protest tool that can be wielded nonviolently in a really compelling way. And it's really tough to defeat governments when they have a monopoly of violence. You can do it. And in fact, nonviolent protests, if we're going to try to be optimistic here for Bitcoin, nonviolent protests are way more successful in history than violent ones by, like, an order of magnitude. I think it's something like 35% of all nonviolent movements, ranging from Gandhi to MLK or whatever, have ultimately been successful in the last 100 years. And only like, less than 10% of the violent ones have done what the violent people wanted to do. Right. For obvious reasons. Usually it's like a small group of male people willing to have guns who are willing to fight in these violent ones, whereas everybody can participate in the nonviolent revolutions. And these are usually like people power protests where you have to go in the street and try to convince the police in the military to join you, and then the dictator has no more people to support him and he's overthrown. This has happened quite a few times in the world. So bitcoin is like the next level of that kind of protest where we all start opting out to this other financial system. And I do think people it is inevitable that they're going to realize that and they're going to know that. But we're so early. I mean, we might be decades away from that being a reality. We're just so early. Less than 1% of humans have used Bitcoin. Far fewer than that. Understand Bitcoin, maybe 1000 of that or fewer. So I don't think that Coin needs our help, but I think bitcoin will be a tool that humans end up using to really erode some of these more arbitrary power structures. Yeah, one of the things I've noticed during the crisis is because I looked out and I asked myself, ", + timestamp: '00:18:14-00:20:02', + topics: [], + type: 'podcast', + weight: 6.0710978507995605, + }, + { + boost: 0, + date: 1625958277, + description: 'How the franchise model access the cheap capital from fiat money destroy small businesses', + episode_title: 'WHY ARE WE BULLISH? Brandon Quittem, Timothy Kim, Shinobi, Steve Barbour ep185', + guests: [ + { + name: 'Brandon Quittem', + profile_picture: 'https://pbs.twimg.com/profile_images/1502403738861940736/9J5VuTye_400x400.jpg', + ref_id: '65512044-7810-4ece-8156-5519e072cb66', + twitter_handle: 'Bquittem', + }, + { + name: 'Shinobi', + profile_picture: 'https://pbs.twimg.com/profile_images/1526590501742428160/0Y5H2uJK_400x400.jpg', + ref_id: 'a05dface-33a7-400d-a749-99efe0d96118', + twitter_handle: 'shinobi602', + }, + { + name: 'Steve Barbour', + profile_picture: 'https://pbs.twimg.com/profile_images/1592714173469065216/q8kXPyQI_400x400.jpg', + ref_id: '63a731b8-4759-4360-9e9d-d66f884e12d8', + twitter_handle: 'SGBarbour', + }, + { + name: 'Timothy Kim', + profile_picture: 'https://pbs.twimg.com/profile_images/1569681307029934081/2s_nWYo__400x400.jpg', + ref_id: 'e0323798-c70f-4cc3-96ff-87bab50c2313', + twitter_handle: 'realtimothykim', + }, + ], + hosts: [ + { + name: 'Ben Perrin', + profile_picture: 'https://pbs.twimg.com/profile_images/1181715113226596352/ipGVEcYH_400x400.jpg', + ref_id: 'e6b013ef-178b-4b41-95ee-423148a3dc3a', + twitter_handle: 'profbenperrin', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/419512c2-e309-4b25-bfe2-cd481d53f66d.jpg', + keyword: !0, + link: 'https://anchor.fm/s/11e95d20/podcast/play/37027401/https%253A%252F%252Fd3ctxlq1ktw2nl.cloudfront.net%252Fstaging%252F2021-6-10%252Ffb6d5638-4579-5707-9740-0e586c980ba7.mp3', + node_type: 'clip', + pub_key: '037f7331a5bef6c6f880246747befcc3767f3bb9730bc5e6f7c3770f4184ed0bff', + ref_id: '07ab82b4-2fe7-42f9-9018-bb8f4188eb3b', + show_title: 'BTC Sessions', + text: "Can I just go down a random rabbit hole that I have thought about a month that you just completely unlocked? So I get really high a lot, and I do really silly things with my time me too. That I'm going to make a bunch of different hamburger recipes. And so when I do stuff like that, sometimes I have funnier ideas. Like, what if we open source the franchise model where I specifically lay out the exact process of something, like how it's supposed to be done, like how you're supposed to cook this food and I opensource it and anybody can do that. But if I catch you fucking up, if I catch you deviating from that brand, I get to sue the shit out of you and take a bunch of money from you. But if you follow everything to the tee, everything is yours. I was actually thinking of something like that. I don't know. I'm really open with what we do in our business. And I've always tried to help people and educate people in the oil field space about bitcoin mining. And I was thinking like, okay, we did a lot of work on building these designs for bitcoin mines, and I want bitcoiners to go out and be successful, whether they're like oil companies, whether they're like semi competitors or not. I'm like, maybe I should open source all my designs open source so that we're not going to legally do anything against anyone that builds exactly what I build. I'll give them all the spec, all the anything like suppliers. Because there's a lot more to business than just, like, how you build something. You guys still do well. And part of my idea was like, maybe I'll just go do this. A rising tide ends up lifting all boats anyway. It's going to make more credibility around what we do in our little niche market. And in the end, I'm going to get more business anyway and sort of what you're thinking. As long as they don't, I don't know, try to bring in their own legal, say, like patent something and try to bring in their own little legal monopoly around what they're doing based off our designs, then it's totally open market. I don't know. I think that's like a very interesting idea, something I've actually been thinking about a lot because I'd like to sort of maybe open source all the stuff that we designed in house that right now we would probably like certainly if it wasn't me at the helm, it was just like a regular Fiat Maxi. At Helm, we would go after anyone that copied it. But right now we're sort of cool with what goes on. But I didn't mean to interrupt you. You can keep going, but the liquor is starting to hit me hard. I know. I'm happy to hear that I'm not the only one thinking along those lines because I am exactly on the same point with you. Like, all of these small businesses dying and being cannibalized by these massive franchises. It's sickening. When I was a kid, I used to go around places and every place I want is the new unique thing for that area and that locality. And let's go find those things and experience them. And they're all fucking gone back not that long ago, I come from Newfoundland. There was a lot of and this would be the same anywhere, but I'm just speaking from my own experience, like my family history. There was always like, in this small town in Newfoundland where my people come from, there's always mom and pops. It was like father and son shops back in the day. Maybe mostly men doing a lot of the business stuff. But it was always like, this guy and sons or these brothers and like, you know, like, doing all that stuff. And the theory the Fiat sort of kinesium thinking on this is like, well, the Walmart models, like, push them all out and stuff. Like, no, it's not the Walmart model or the Amazon model that killed small businesses. It's fucking Fiat money printing that kills small businesses. It's not the fact that these guys made these big distribution change. It's the fact that they how do. Those get paid for it's the fact. That their access to capital, like, their cost of capital is less than everyone else. That's why kill small businesses. Fuck. I remember when I started my business and I was like, just trying to try to get sales. I would go to these, like, clean tech conferences, like in Alberta, like emissions reduction. Like, we do massive emissions reduction stuff. So I went to these emissions reduction, like, clean tech conferences and I'm looking around at what people are selling and I would do like a little pitch event, like a little pitch contest to see if I could get interest in our business and stuff. And I'm not a great pitcher, really, but there are these really polished people, like, pitching their products. But I look at their products and they stink. They're terrible. They're the worst. Like, they're not scalable in any rational world, but these people are just running around like these circuits of, like, emissions reduction conference, clean tech. And it's the same with all the buzzwords, like AI blockchain conferences, all that shit we dealt with in 2017. It's like all these non scalable crap products with these entrepreneurs raising money, but not actually getting customers. Raising money is the metric for success, but not getting customers. It's like customers is all that matters. Sales, customers, product, service. Sorry, we work. That's like one of the biggest Fiat Maxi disasters ever. Everyone's about raising money. I'm just, like, ranting at this point because I'm like, buzzing. But like, you go on, like LinkedIn, everyone's congratulating, patting each other on the back for raising money. It's like, why don't you talk about the sales you made, like, the customers you acquired? Because that's what's fucking important in real life. But it's just look at all the money we raised at this valuation. That's all it is on there. And like, all society is that way now. And then you see all these shows. You got like, Shark Tank, Dragons, Dan in Canada's version of Shark Tank, and all these entrepreneurial shows, like startups mostly. Not really a lot of people not really bringing much to market. But just like it's just like this VC hype scene, which is a whole nother rabbit hole, which triggers me is like the VC aspect of Twitter, which is like all these VCs on Twitter that are like, look, man, a VC is like a Fiat Maxi. There's no way around it. And all these people clinging on to bitcoin, it's like bitcoin is going to destroy your core business model in the long run. It's just like this weird juxtaposition where all the Fiat Maxis are, like, pumping into bitcoin. But I guess it's just people doing it what's in their own best interests. But the business models are incompatible with bitcoin, but it's just people doing what's in their own best interests and profiting in the short term. But it's like a weird it's like this weird phenomenon in the future, when bitcoin and sound money returns, there's not going to be this VC culture we're seeing right now, which are basically the dependence of the money printing hierarchy, right? It goes down to the VCs. And I don't know, I was just, like, getting there. Yeah, I bullish on small businesses, man. I think small businesses are going to be insane. Like, I can't wait for the bitcoin standard. And I really promote, like, I'm straight up promoting my own competitors in our locality, like the Lloyd Alberta, Saskatchewan area, guys accept bitcoin as payment, or if no one wants to pay in bitcoin, which is still hard to do. I have a lot of customers paying me in bitcoin because they're minors, so they have bitcoin. But like, you guys are selling motors. You're my competitor. I don't give a shit. Sell your motors, convert your profit to bitcoin and stay in business because that is how you're going to win as a small business right now. Yeah, Steve, to your point there, I think you identified a ton of issues that we're having right now. And they all stem from the fact that money is easy, right? And what that leads to is a cascading effect of the bigger you are, the closer you are, the more access to capital you have, et cetera. That's what drives our behavior. So until we change incentives, we're not going to see anything change in the real world. I have a slightly more charitable view of venture capital. I think what we have now is obviously an extreme overgrowth of that and it's way too much money sloshing around there. And you can see portfolios in VC land or directly correlated to how easy the money is during that during the period of their fund. No surprise. And so I think what we need is a bitcoinized world in order to change these things. We'll see a mass definacialization, which I think is a huge net positive for normal people. Right? I think it's demons. They're devil people. Okay, let's talk about this for a second. I think the caricature of these that we see today I would agree with, but I would argue that there is a place, and I want to hear you guys opinion. I think there's a place for people who place longterm bets on very risky type businesses. Right? I think the model makes sense. 100 failed and one of them changes the world. I just think that right now they have too much money, they're able to raise too much because everyone needs yield. So everyone's going through so hard to find right now. It's so hard to find. That's kind of the problem though is so much money flashing around is what makes them devil people. Because I agree that money printer is distortionary. They're like a secondary distortionary effect, throwing it around at crazy things wildly instead of thinking about who actually can make a solid plan in an argument to us, who do we know and trust and actually being scrutinizing and skeptical in where they put their money, the money printer distorts things and they wind up with a pile of money. And so they go on and distort things again because they just see it as a gambling casino. It's not the role, it's what our perverted monetary system, the mechanism converted the role into. Yeah, I have no ill will towards any VC or anyone that works in any of those. I just call it the cantillon ladder, right? Center banking down to the pleb. Like anyone hide the letter, it's no problem, you're doing what's in your own best interest and all that. But we're all working to reverse, just flip the mechanism of how money is created through mining and distribution, through sound bitcoin mechanisms instead of like the top down fiat mechanism. But it's just a commentary on like it's just this funny like, it's funny that some of the most prominent and influential people in the bitcoin space are like people that are in position. Like they're higher up the Cantillan ladder. Like they're benefiting from fiat. They didn't scrap and grow a small business into something amazing. They went to school. And this is not a knock on. These people individually, but it's just the system. Like, they go to school, they work for this fund, and they benefit immensely. But because they're like us, like the big bitcoinners, they go out and crush it. They want the sound money standard, too. It's just ironic to me. It's almost like coinbase. Like coinbase is an exchange. The more bitcoin succeeds, the less relevant they become. It's like you're putting yourself out of work in a sense. But, yeah, certainly it's never a hate against the player. It's just like the system is such a fucked up mess. There's all this irony and hypocrisy in this whole space that's funny to comment on because. It perverts everybody's actions. Right. The problem is I posted that what I was talking about at the beginning of the show. I took a screenshot of that CNBC upside of inflation, increased wages, and one of my friends commented on it, who's like an intelligent person, and he's like, well off and has a good job and everything. He commented, he's like, well, yeah, but the upside of that is that my debt gradually gets willed down and gone away. But when you think of what induced that debt in the first place is asset inflation. You can't just save money for a house nowadays and then buy your house or only have like, a short mortgage. You can't just for the most part, you can't just save money for a new car nowadays. You have to then you have to, like, get a payment plan and pay it off over 5678 year terms. Now people are looking at it from a perspective of, oh, well, maybe it's okay in this context because it fixes the problem that the problem itself caused. The very base layer of all of this perverts all of our incentives to drive us to do things that we wouldn't normally do in a system that is just a money that actually functions. In a free market. Yeah, well, speak for yourself, but I'm perfect and I always do the right thing. I just want to take it aside. We haven't heard from our friend tim, are you alive? Is the water working? How's the water? I think he's got a how are you doing, Tim? ", + timestamp: '01:27:13-01:41:29', + topics: ['fiat money', 'franchise model'], + type: 'podcast', + weight: 6.056178092959222, + }, + { + boost: 0, + date: 0, + description: 'Will the Nation States survive the information age?', + episode_title: 'The Sovereign Individual - The End of Egalitarian Economics', + guests: [ + { + name: 'chriskapilla', + profile_picture: 'https://pbs.twimg.com/profile_images/1362817539135463427/2AXUeFLV_400x400.jpg', + ref_id: '9d495790-93f2-4d6c-b770-b2885f66859d', + twitter_handle: 'chriskapilla', + }, + { + name: 'remydenton', + profile_picture: '', + ref_id: '5c5beb0c-c214-4f23-b79a-e71bf9368f2d', + twitter_handle: '', + }, + { + name: 'JackRonaldi', + profile_picture: 'https://pbs.twimg.com/profile_images/1583261828628496384/IazkwYjk_400x400.jpg', + ref_id: '01621476-f040-49dd-8160-4035228faf78', + twitter_handle: 'JackRonaldi', + }, + { + name: 'AlistairZ80Aftw', + profile_picture: 'https://pbs.twimg.com/profile_images/1362882489895841795/gH2zix3l_400x400.jpg', + ref_id: '3dcba197-47ca-40c0-857d-73cec4325801', + twitter_handle: 'AlistairZ80Aftw', + }, + { + name: 'mattonbtc', + profile_picture: 'https://pbs.twimg.com/profile_images/1549459254280687618/jzdHJou3_400x400.jpg', + ref_id: '998167d3-e036-4ef1-9a05-4f062903f0c5', + twitter_handle: 'mattonbtc', + }, + { + name: 'wai_wairua', + profile_picture: 'https://pbs.twimg.com/profile_images/1536570699761848320/T10Owc60_400x400.jpg', + ref_id: 'c4d4ff36-73fa-4471-91ba-de0f99a49e99', + twitter_handle: 'wai_wairua', + }, + { + name: 'UltraSolomon', + profile_picture: 'https://pbs.twimg.com/profile_images/1468332451055427601/YVgUuUHc_400x400.jpg', + ref_id: '6371d519-cc98-4bf4-9f82-be17b1ea532a', + twitter_handle: 'UltraSolomon', + }, + ], + hosts: [ + { + name: 'BTC_Venetians', + profile_picture: 'https://pbs.twimg.com/profile_images/1557482467539521537/Kel-eVww_400x400.jpg', + ref_id: 'a6313ca9-3869-4477-88ad-30172957edcf', + twitter_handle: 'BTC_Venetians', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/75ec86b1-cb6d-467f-a66e-5e642e5c126a.jpg', + keyword: !0, + link: 'https://stakwork-uploads.s3.amazonaws.com/uploads/customers/2707/media_to_local/c8cc9ec1-061d-4f53-a24b-ee43a56c7715/e650057e-2369-4e75-8119-4975a1fc4cac.mp3', + node_type: 'clip', + pub_key: '03eb026c3e6597055595e42299377a4e164982775cc67f1d2135d9f1cd3a89f526', + ref_id: 'e96970d0-30a7-4f86-8f81-996ba87a088c', + show_title: 'Bitcoin Venetians Book Club', + text: "Kind of behind on questions here. So let's move on to the next one, which is, do you all think the nation state will survive? The information Age. Going to say, yeah, the big ones will, but in reduced form. What do you mean? America will, for instance. United Kingdom will. For instance. The smaller nations like China, and I don't mean physically, they're just more small in Fragility, if you like, will struggle to keep things going. Argentina will struggle to keep things going. I have the opposite opinion of this in some respects. I think as long as humans are, as long as we remain biological, we're very tribal creatures and we like to have identity. You just look at the soccer World Cup and during covered things were really heated in my community and became so tribal almost overnight between different camps of beliefs. And I think that during times of strife, we look for our colors and our team, and very few people are able to remain unbiased. And so I'm wondering if we'll ever truly be without that kind of place and home. Now I wonder whether if you're in New Zealand, you've got a much closer relationship to the Maori's over there, whether that color is what you said. We have nothing like it in England. Yeah, it might influence my views. Yeah, for sure. These things are different here. Can you speak to how much autonomy the Maori's have? Whether they want more, whether they would get more? Under what circumstances? Well, in the circumstances with the end of the welfare state, with the government finding it harder and harder to hand out free money, would New Zealand survive as a single entity like that? Or would the Maoris and the non Maori want to go their separate ways, much like Americans do with the Indian reservations tend to be autonomous in a way. That is what I'm trying to get at. Do the Maori's have that kind of autonomy that the engines in America and the First Nations do? Yeah, many are fiercely independent and we do have a treaty. But you can't ignore economies and their wealth was taken as an act of war and they were tricked and the usual kind of colonial game. And I don't know if you can unwind that damage. If the world were to change into an information age, if that loss of identity and loss of skill and loss of all that would actually kind of unravel, I think that the damages is probably a little bit too late. Thank you. And the situation over there is beyond my can. So thank you for explaining that. And then just to also challenge kind of what you were saying or at least my interpretation of it. So, like in the US. For example, or even in Canada, it just seems like there's a lot of divisions and some people have certain views and other people have different views, and it doesn't seem like they can reconcile on those. So I often wonder if you set aside military strength, which is where it's good to be united as one big country for all other intents and purposes. It seems like there's a lot of different views in the states. And should they all be forced to kind of share one set of laws and one set of beliefs and ideologies? And it seems like they just kind of rotate. Like one party is in power and they kind of screw over the rest of the people and then another party's in power and they screw over the rest of the people. So I don't know, it seems like that's not very stable unless what you're talking about, it survives. But maybe the states get more independence and people can move around and find things that work for them better than other places. So just looking at the chapter here and thinking about which nation states might collapse, first it says devolutionary pressures will tend to be most intense in large political entities where incomes for most of the population are stagnant or falling. Jurisdictions in Latin America and Asia, where per capita income is rising rapidly, may endure for generations or until lifetime income prospects there equate with those in the formerly rich industrial countries. And then it says, later on, another spur to devolution will be high indebtedness of the central government. So national debts would succeed 100% of GDP. That's just about everywhere by now, isn't it? Pretty much. Yeah. It's kind of like when a marriage is facing financial difficulties. It only compounds the problems. Same thing, maybe, with a nation state. When it's facing financial difficulties, people start pointing fingers and running into problems. Jeff, I think my base case for this is like some kind of world war. And once again, I think the authors might just be early and post that war. Then you have more of a dissolution into this kind of smaller states, not the huge nation states like I just watched in Japan, which is the quote earlier kind of huge debt, declining population, and they've just reactivated their military. And I think that's a very interesting. Trend, not a civil war. Being out of the states and everything else like that. It's so different there. It's very different. Perhaps you could comment on that. I don't know. Like, January 6, it seemed like they came pretty close, and I worry about what will happen in the next one, especially if Trump runs again. And whichever side wins, blames the other side for cheating. ", + timestamp: '00:54:35-01:01:52', + topics: ['Economies of Scale', 'Nation States', 'Information Age'], + type: 'twitter_space', + weight: 6.051017999649048, + }, + { + boost: 0, + date: 1642222800, + description: '[[Global Bitcoin Festival]]', + episode_title: 'WHY ARE WE BULLISH Duczko Thomas Jestopher Morgen Rochard Rick Vanderhulst ep229', + guests: [ + { + name: 'Rick Vanderhulst', + profile_picture: '', + ref_id: '4c184180-b77d-4e25-ac7c-4d2e86cdde85', + twitter_handle: '', + }, + { + name: 'Morgen Rochard', + profile_picture: 'https://pbs.twimg.com/profile_images/1362921386256211972/IpIK8cwI_400x400.jpg', + ref_id: 'c29b26e9-82c8-4c0a-8130-aa083d33ec48', + twitter_handle: 'MorgenRochard', + }, + { + name: 'Thomas Jestopher', + profile_picture: 'https://pbs.twimg.com/profile_images/1607521016368201730/6GSHGkGX_400x400.jpg', + ref_id: '50388de7-3ec7-401b-8349-5ee1d8a004c0', + twitter_handle: 'Jestopher_BTC', + }, + { name: 'Duczko', profile_picture: '', ref_id: '2b6de75e-0cf5-4fec-b458-d1b8ee3f86df', twitter_handle: '' }, + ], + hosts: [], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/b87feb17-6926-4295-b2c2-d1c2e9d49ca8.jpg', + keyword: !0, + link: 'https://anchor.fm/s/11e95d20/podcast/play/46171740/https%3A%2F%2Fd3ctxlq1ktw2nl.cloudfront.net%2Fstaging%2F2022-0-15%2F68b825e2-6752-7447-34ca-b27f0ea69256.mp3', + node_type: 'clip', + pub_key: '', + ref_id: '5bf12d7b-3c9b-4019-bca9-88899aaa4b35', + show_title: 'BTC Sessions', + text: "I didn't say what I do now. So this is connected to what I've been doing for the past few months where I'm involved with a project called Global Bitcoin Fest. And we're a group of people that just enjoy listening to local communities tell their stories. What's happening in their community, what's the history, what's the setting in Argentina, Venezuela, Cuba, Ethiopia, wherever. We did this back on September 7, we did the first thing together. So we started back when neighbor made his announcement, 7 June. Okay, let's do a legal tender here. So we started having Twitter spaces where we were giving away sats in Latin America, Cuba, Venezuela, Sabato, and Mexico. So we formed a small group of people and chatting in a Twitter chat. And then one guy had this idea, okay, let's do a Twitter space 24 hours on the day. On the 7 September, let's do a nonstop 24 hours space. So we decided to separate out 24 sections and have communities join in from all over the world, 1 hour slots each, and talk about their community and kind of celebrate together the adoption of Bitcoin. What I was really taken back by was how powerful this idea was. There were so many people that just joined in and like, yeah, let's do this. We organized this literally in six days. And we had Japan, Australia, Tonga, and greater Polynesia, Vietnam, Hong Kong, Nigeria, Sudan, Ethiopia, Greece, Venezuela, Cuba, El Salvador, Argentina. Communities from all over the world were taking these slots, and we didn't have much time to assess what the actual quality would be of these spaces. And then we did 24 hours non stop. Just awesome content was just one space that was kind of like not really Maxy. But everybody else was really knowledgeable communities that have been really diving deep into this. And we got so inspired that. Okay, let's keep doing this on a weekly basis with one new country every week. So on Sunday, we're actually going to do Argentina was just announced last week. We did Guatemala, the week before that, we did Indonesia, before that, Japan, before that, Costa Rica. And there's an emerging pattern where people seem to have been these dormant cells. People have been kind of doing their own thing. They didn't kind of know what they could contribute or do. And then they've been building up all this knowledge by themselves and kind of Orange Pilling friends here and there. And now they're emboldened by everything that's happening. So, for example, I talked to Bitcoin, a Casi in South Africa, and he was like, look, I didn't know how to apply my knowledge, but now I got so inspired by Bitcoin Beach in Alzheimer. So I started this with my surf kids that I'm kind of supporting. There's 40 kids that I'm trying to impoverish communities. I'm trying to help. So now I'm bringing in Bitcoin as part of their education and making it part of my project and making like a small Bitcoin Beach here in South Africa. And there's all these small stories where all these community builders have built up knowledge for so many years. When I first drove into Bitcoin in 2017, there was so little. I felt it was so hard to find good quality knowledge. I found Andreas Antonopoulos, and that was kind of it when I was trying to Google it. So I got all fooled by the shit coin stories and everything, and I just went all in on shit coins, and then I lost 98%. Now, I really believe that ", + timestamp: '00:19:46-00:24:39', + topics: ['global bitcoin festival'], + type: 'podcast', + weight: 6.044204792136057, + }, + { + boost: 0, + date: 1596671100, + description: "Bitcoin mining;User's choice in defining value", + episode_title: 'Chat_45 - Bitcoin & an Energy Revolution, A panel at the VOB Conf', + guests: [ + { + name: 'Christian Stoll', + profile_picture: + 'https://pbs.twimg.com/profile_images/3296579573/69ebedb479a9bdb9d536fe887e2d3113_400x400.jpeg', + ref_id: 'ff74d59c-f846-4b16-a5e5-771fb8139f18', + twitter_handle: 'Granddragon14', + }, + { + name: 'Jesse Peltan', + profile_picture: 'https://pbs.twimg.com/profile_images/1123954968636088326/EAjHUGDE_400x400.png', + ref_id: '96309505-caeb-47bb-a1ba-712b97292675', + twitter_handle: 'JessePeltan', + }, + { + name: 'Phillip Sandner', + profile_picture: 'https://pbs.twimg.com/profile_images/1043824764161335296/2SW3duCV_400x400.jpg', + ref_id: 'e1996e82-0354-421c-85d5-f18eebec9506', + twitter_handle: 'philippsandner', + }, + { + name: 'Tone Vays', + profile_picture: 'https://pbs.twimg.com/profile_images/1416821178266787844/T1OkI9ZW_400x400.jpg', + ref_id: 'da6fc991-7080-461c-86e3-4ac18c2f413d', + twitter_handle: 'tonevays', + }, + { + name: 'Christopher Bendiksen', + profile_picture: 'https://pbs.twimg.com/profile_images/1362772558882484233/3nS-l35s_400x400.jpg', + ref_id: 'd99d354e-41d4-4117-9b70-05955a85f9da', + twitter_handle: 'C_Bendiksen', + }, + ], + hosts: [ + { + name: 'Guy Swann', + profile_picture: 'https://pbs.twimg.com/profile_images/1401969630634196995/DqOuszMi_400x400.jpg', + ref_id: '39c31930-d799-40a0-9a46-193117d03418', + twitter_handle: 'TheGuySwann', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/9e7e229f-2631-4542-b5d7-7fcd502798dc.jpg', + keyword: !0, + link: 'https://traffic.megaphone.fm/CSN6935967461.mp3?updated=1627959014', + node_type: 'clip', + pub_key: '', + ref_id: '4636725f-ae47-4777-bd41-f78a4694ba05', + show_title: 'Bitcoin Audible', + text: "Yeah. And there's kind of an inherent moral question there as well, is that do we get to subjectively put our values on to them? Like in making judgments over whether or not they can make that choice as to whether or not it is their value or not? And obviously, in a decentralized system, what are you going to do to stop it anyway? It's inherently an incredibly difficult thing to control or alter. Yeah, this gets to a very deep level of freedom versus coercion. Who am I to say that you're watching a Netflix show is a waste of our common resources? I mean, that's not my tournament to make, of course. Did anybody compute how much electricity costs to watch 90 minutes electricity. Honestly, there's research out there looking into data centers which is directly linked to such activities. I have one student that looked into Amazon, currently the comfort print of Amazon, where you actually have streaming as one source of electricity consumption. I made an estimate, I think two years ago of the electricity draw, just gaming console Iceland in the United States and it's on the level of something like 50 kilowatt hours. Wow. I like to make a couple of points here. So I think that one of the important points to note is that electricity consumption is not in itself a bad thing. So electricity consumption, like electricity production and consumption is good like that is that provides value. The negative side is when there are externalities associated with how that is produced. So if we enable more renewables, more sustainable energy sources through bitcoin mining, then it's a net positive. I think the other part that is important to note here is that in the total scale of human energy consumption, bitcoin is nothing like it is completely dwarfed by any industrial process, aluminum smelting, like concrete production, scale production. Bitcoin is such a small drop in the bucket compared to any of that, that any effects that bitcoin has on a more financial level, like if there's restructuring in the way that business is done, that will be far more significant than any effect of the direct energy consumption ", + timestamp: '00:21:12-00:23:48', + topics: ['Bitcoin mining'], + type: 'podcast', + weight: 5.944497585296631, + }, + { + boost: 0, + date: 1670547229, + description: 'Thoughts on the gridless mining operation that started in Africa and how the progress has been', + episode_title: 'Rabbit Hole Recap #230: Building in the Bear Party Rip', + guests: [ + { + name: 'Jason', + profile_picture: 'https://pbs.twimg.com/profile_images/1458137423716622342/ctyc_MTX_400x400.jpg', + ref_id: 'ca893631-4be5-42c4-bff1-92cc2f6e43fe', + twitter_handle: 'JasonWrich', + }, + { + name: ' Texas Slim', + profile_picture: 'https://pbs.twimg.com/profile_images/1589784780970795011/02jf0fqp_400x400.jpg', + ref_id: 'add0c8be-0524-43e1-a3a3-aea1058057d4', + twitter_handle: 'modernTman', + }, + ], + hosts: [ + { + name: ' Marty Bent', + profile_picture: 'https://pbs.twimg.com/profile_images/1362747135981199370/mSy97J12_400x400.jpg', + ref_id: '0b8ba673-da17-4371-a6e1-dd112d173b14', + twitter_handle: 'MartyBent', + }, + { + name: 'ODELL', + profile_picture: 'https://pbs.twimg.com/profile_images/1421584695746338819/Z_7ZfAeP_400x400.jpg', + ref_id: '6981a34b-301a-45f1-8299-59a3f719f6e2', + twitter_handle: 'ODELL', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/da64b29e-c2c0-41a6-ba29-acbaa2d022e8.jpg', + keyword: !0, + link: 'https://anchor.fm/s/91b8fbc8/podcast/play/61912544/https%253A%252F%252Fd3ctxlq1ktw2nl.cloudfront.net%252Fstaging%252F2022-11-9%252F301977145-44100-2-474e79172e2da.mp3', + node_type: 'clip', + pub_key: '0372cd0c8469f2034336a243e018d4d60e07efef8e7d10417807da1173bd5b002f', + ref_id: 'f66a9f05-a885-44f3-9673-f910c78d6360', + show_title: 'Rabbit Hole Recap', + text: "This was cool. We were talking about this earlier, block and Stillmark, right? Yes, Stillmark and Block led a $2 million funding around for a bitcoin mining company in East Africa. You guys may have seen it's called Grades. You may have seen videos of bitcoinners. I believe Nick from Luxor, Marshall Long from Rhodium, and a couple of others took a trip to Africa a few months ago. And the common video they were sharing was like a mining operation working off a small hydro facility in some rural place. Micro hydro? Yeah. In Africa. That's what Grid list is doing. And the way I understand it, these Grid List has basically got a problem where they can spin up these micro hydro turbines that produce electricity, basically have. A pipe that running water runs, and they throw turbine in there. Yes, but it's such a rural area, they don't have that many customers, and so they have to sell the electricity at a relatively high cost. What bitcoin mining is uniquely suited to do is come in and consume a lot of that electricity or use a lot of electricity to produce revenue. They have small rural villages that have no electricity. They come in, they put a new electricity project in. They subsidize with bitcoin mining. Yes, exactly. I think it drives the price from like seventeen cents kilowatt hour down to four, three or $0.04. They have pictures of some of the operations. It's like super bootstrappy and just really a lot of just like creative engineering that's going on there. Yeah. So shout out to the team. I feel like there's a lot of overlap there with the ranching community. I would like to see all these small producers have little micro mining operations. And that's the cool thing, is we have so much of our irrigation water is in pipe, so it's very seasonal when it runs. But as long as you have enough fall, you could put micro hydro in any of those pipes and utilize it to make electricity and mine bitcoin, whatever your season run long is. And in Tennessee, you see a lot of natural gas wells on these properties, too. Yeah, I mean, that's the first hashtag that we put down. You may have seen the video on Twitter, but it's literally our hash shut. There's a fence and there's grazing cattle right on the I love that picture. Yeah. And that's the cool thing. In Texas, you have all those non productive wells just waiting for the opportunity. All up and down the Texas Panhandle. I can't remember his name. His name was Bill. He came out to Colorado. He was West Texas. He's outside of Parritten. But he was fascinated because all the stranded gas wells in the Texas Panhandle, I mean, you can smell it. It's so untapped at this point. Well, we've talked about me and you have talked about and I know Matt, we've talked about too. But if you want to think about a significantly robust circular economy, you talk about a ranch with excess natural gas or excess hydro. That's mining bitcoin. You're tending to the land, producing cattle, and then you're producing money with your excess natural gas, hydro, whatever it is. You want to talk about yielding revenue per acre on a farm. Bitcoin mining really allows you to supercharge the value you're getting out of your land. And it battles all the droughts, all the manipulation in the commodity markets, hyperinflation, extended cut dates where you can't harvest a cow. I mean, talk about saving the rancher. That is the circle of energy that we talk about. And if you're using an electric heater to heat a barn or a well house or a spring house anyways, you're going to be burning electricity. You might as well mine bitcoin, use that miner as your heater and put that stuff in cold storage for whatever it is that happens to go sideways when you need it. It's pretty cool seeing all the club engineering around using S nine as heaters. Yeah. The 3D printed parts and different ducts. If you're a rancher out there renaissance lately on Twitter. Yeah. And if you're a rancher out there who's got excess hydro, excess gas in your land, but you don't have the capital to invest in a mining operation, reach out to bitcoin miners. You can go borrow it for Barry. No. Or you just broker a deal with a miner. You say, hey, I'll give you this electricity as a pastor, I won't charge you for it, just give me a repair on the bitcoin mine. And there is like a percentage gas or hydro sitting there anyway. You're not making any money off of it. You can make 5% satisfy stream from. A minor yet if they're flaring it anyways. Yeah. I mean, that's insane. I see how much they flare. That blows my mind. Talk about wasted money. Yeah. We're doing that here in Tennessee, tom and I at Standard Bitcoin up north, northern Tennessee. There's a ton of farmland with these wells on it like the one we're using with the cattle grazing next to we just go to landowner, say, hey, we'll pay your land lease for the year. Just let us find bitcoin with your gas. So you're not using. I'm more than happy to do it. Well, I think a lot of especially in Texas where I come from, we have to funnel that information. There's people out there that's going to be extremely interested. That was one thing that we found out during the summit this year. Those type of possibilities. In the beginning, I said, one of these days, ranchers are going to innovate further into bitcoin than any of us right here, because they have all the resources and once they understand it and they get that good education, it's going to be fascinating. We're at Jason's ranch, but during the mining conversation, we had all their eyes lit up. That was a damn good presentation. Meeting the pumps and stuff, too. They all right away and immediately obvious when one of us said just like, make sure you hire a licensed electrician, or it's like dangerous or whatever, they're like, honey, this is not dangerous. Exactly. But that was so classic. They're talking about doing this and doing that. As an underground coal miner that's dealing with 12,470 volts household power is no big deal. Then if you're a bit wider and you really care about the robustness and distribution of the network, there's nothing better than getting small modular mining farms or mining data centers spread throughout rural farmland. There's nobody better to protect a bitcoin mining operation than a rancher a mennonite rural Nigerian villages. Yeah, don't, come on, bring us happening. Yes, it is. Moving on from ", + timestamp: '01:18:12-01:25:21', + topics: ['Africa Bitcoin MIning'], + type: 'podcast', + weight: 10.341832935773114, + }, + { + boost: 0, + date: null, + description: 'Kenya background, culture and tribes', + episode_title: '#Bitcoin Kenya 🇰🇪 - meet the Kenya Bitcoin community', + guests: [ + { + name: 'Noelyne Sumba', + profile_picture: 'https://pbs.twimg.com/profile_images/1585949523901292545/tWf-IwWO_400x400.jpg', + ref_id: '44455b1d-76cf-49df-baa0-cd606652885b', + twitter_handle: 'noelynesumba', + }, + { + name: 'Okjodom', + profile_picture: 'https://pbs.twimg.com/profile_images/1577811376487088128/J2Z4nIgI_400x400.jpg', + ref_id: '4c9df92d-3bb5-4d08-9a7e-a9ba15f58f03', + twitter_handle: 'okjodom', + }, + { + name: 'Master Guantai', + profile_picture: 'https://pbs.twimg.com/profile_images/1521025685078302720/w9dZwehS_400x400.jpg', + ref_id: '64c326c4-d4a9-4e6c-82fe-0c9bac8a7094', + twitter_handle: 'MasterGuantai', + }, + { + name: 'Lorraine Marcel', + profile_picture: 'https://pbs.twimg.com/profile_images/2361719231/German_sheperd_Puppies_400x400.jpg', + ref_id: 'ab30679d-7931-4921-a4f8-6fee74e412c8', + twitter_handle: 'lorrainemarcel1', + }, + ], + hosts: [ + { + name: 'Mary Imasuen', + profile_picture: 'https://pbs.twimg.com/profile_images/1465290507752558596/lZVbU9np_400x400.jpg', + ref_id: '2d8ed8ce-5112-4dfa-9aa2-5fa8b874af68', + twitter_handle: 'mary_imasuen', + }, + { + name: 'Lukas Poland', + profile_picture: 'https://pbs.twimg.com/profile_images/1382603302160932865/RgeQnCXM_400x400.jpg', + ref_id: '217a2c5a-1cfd-4840-bbff-eec43da8c52f', + twitter_handle: 'duczko', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/56bbafde-60ef-4e4b-b930-978429c6a635.jpg', + keyword: !0, + link: 'https://stakwork-uploads.s3.amazonaws.com/uploads/customers/2707/media_to_local/9f2ebf6e-a880-4579-986c-ff0c9c517559/2cb59251-775d-4691-9c8f-30fb9d7707b9.mp3', + node_type: 'clip', + pub_key: '02574d6e8e787372184b6f17c40d6c6fe1777db9015801f95dfd24692784d767cd', + ref_id: '0bb19102-ebb2-4519-ac7a-e6e69593a091', + show_title: 'Global Bitcoin Fest', + text: "let's get started. We have the Kenya community here and let's talk about Kenya. Let's talk about what's happening in the country today, the economic situation, a little bit about the culture. But maybe if we could start first about the history of Kenya. Is there anyone that you must agree, Guantai, think would be the right person to start? I'll put Nilen on the spot, maybe to give a history of Kenya and that Bitcoin background in Kenya. Is that okay, Nileen? Yeah, it's okay. So when we talk about Kenya, it's a very famous country. Lots of people have heard about it. Kenya is a very beautiful country. I have to get it that it's located in Eastern Africa bordered by the Indian Ocean. We have the lake in the western region. We have a mountain in the central region. And most of you have heard about the Masai. Mara has very beautiful wildlife. And Kenya, what can I say? Population 56 million. So we have very many Kenyans. Kenya is a country itself is divided into 47 counties. And in the 47 counties we have almost 44 ethnic groups. So we're divided into tribes, 44 tribes. And I can say Kenya is more of a family and community oriented culture. Of course, this being influenced by the African traditions and what we experienced during the colonial period. And so far, I believe Kenya is a very innovative country, very driven country. And yeah, that's maybe in terms of the culture, in terms of the monetary history of Kenya, I can say Kenya became a colony in the 1920s and in the 1920s. We used to use the Indian rupee back then. And it was before that it was abolished and we started using the East Africa currency. So this was used between Kenya, Uganda and Tanzania. Back then it was known as Tanganika. So we've come along with, in terms of our currency as Kenyans eastern Africa currency was used for a while. Then came 1966. So we gained our independence at around 1960, 319 66. The central bank of Kenya was established. And with that, they started issuing currencies from five cents, ten cents, twenty five cents. Yeah. That was around the 1960s. If you look at history books, it says during that time, up to the 70s, kenya's economy was flourishing. So we were doing quite well until the 1980s. Usually talk about what the hell happened in 1971. So it really affected Kenya. And so the 1980s had lots of deterioration of the coffee industry, tea industry, which Kenya is very well known for exporting, if you've heard about Kenyan tea. So we had financial deficits in our balance of payments. There was a shortage of forex, very bad shortage of forex in the 1980s in Kenya. And with that, we, the government obviously turned to the World Bank and the IMF and it suffered the conditions that came with that through the structural adjustment programs. And so far, fast forward in the 1990s, we had the effects of the structural adjustment program. So in this, you found that the conditions were privatization of the public sector and also in terms of agricultural production, the government was really onto it. And the consumer policies, they were work 2021, we still are undergoing some structural adjustment programs 20 years later through stuff like the extended Fund facility from the IMF. And of course, it comes with its own effects. We have wage bill being frozen for the sector and for the health sector, for example, that led to the firing of lots of Nazis. So you find that our health sector, the key areas that are important to people, end up suffering first and the health sector amongst them. So, yeah, I can say in terms of our history, we've come a long way as Kenya, but we are still persevering. Thanks. Hello. Is anyone with me? Yes. I was just waiting if somebody else wanted to jump in to share about Kenya. Yeah, only Lorraine can do the culture for us. Lorraine. I just arrived from Ghana. I was with Lorraine in Ghana. She's a fantastic lady. I got to meet her for the very first time, and that felt really good. So, Lorraine, if you can tell us what do you think about the culture of Kenya? Okay, thank you for that. Nolene, it was also a pleasure just meeting you. Noline has mentioned we have 44 tribes. Different tribes. Right. The funny thing or the interesting part about Ken we don't have one major culture that defines us all. We have different tribes, have different distinct cultures. And this is interesting because as we meet, we get to chandler about each other. I'll talk about having different groups. We have three distinct groups. I think there's a fourth one. But I'll talk about the banter. I'll talk about the nylons and the Cush outs. So within these three groups, you also have now we have the tribes in them, right? And the Banter is actually the major one. We have the Luas, the Kikuyu. The canvas all in the bantu's. And I think Gwentai and Nolin at our bantu. And then there's us, the nylon, the Lewis, the massage, the Kaleen jeans. And then we have the Kushites and so much more. Right? I believe Kenyans are pretty enterprise. They are hustlers mode. Of course, not as much as Nigerians, but we are very entrepreneurial. We like to do business, we like to get things done. We are very friendly. By the way, Kenya is a very welcoming country. That's why you see, like most investors actually just like to come to Kenya and have their business here. Invest in us, invest in our structure. Right? What else can I say? When it comes in terms of religion, it's an open thing. We have freedom of religion. You can be a Christian, though. Majority are Christians. And then you have 10% being Muslim. And then there's a small section, the Hindus and the Sikhs, minorities. But it's an open space. You can worship. You can worship or just pray to whoever, anything that you want. What else can I say about our culture? I think that is what I would say about culture. I'd also talk about as Kenyans, we can boost about the natural resources that we have. We have the wildlife, we have the mountains, we have the lakes, we also have the oceans. It's really a beautiful for people who are thinking about coming to Kenya, it's a beautiful place that you can come to. You won't necessarily miss a thing to do here in Kenya. You can visit the Maasai Mara as Nolene mentioned. You can visit the Indian Ocean. You can even just chill in the bushes with the lions and the giraffes and all that. So about language, I think that is part of our culture. We actually speak to Ahili and English as the main languages here. And so Healy was brought about by the Arabic and then east people. This was to facilitate the trades back then, the East Africa, we have Tanzanians, Ugandans, also speak Swahili. What else? I think that's about it. When it comes to our culture, I'll just call you, okay? Because I can't pronounce your name. Would you want to add something on that? Just mention the favorite food. Kenyans love their Galilee and you can take it. The number. I was in Ghana and I think I told noline. I miss Susan. I want to go back home and eat Susan. So it's true. Absolutely. Yeah. So you have to try that. It's made of khan. So khan pairs very well with things like fish. And there is also another highlight, which is Namatoma in Sahil that is roast or grilled beef. Could be beef. Could be good. Very good. If you're out there taking a bit of a drive, experiencing game drive, you're experiencing maybe the beach. If you ever visit Kenya and go to the cross part of it. So there's a bunch of things to see. It's a lively culture, very welcoming, but that is objective from this side. So you have to experience it for yourself. You're welcome. ", + timestamp: '00:37:27-00:47:45', + topics: ['Kenya structural adjustment', 'Kenya cultures', 'kenya'], + type: 'twitter_space', + weight: 5.850915908813477, + }, + { + boost: 0, + date: null, + description: "Bitcoin is the only asset that don't have counterparty risk", + episode_title: 'Bitcoin Backed Stablecoin’s', + guests: [ + { + name: 'Andrew Begin', + profile_picture: 'https://pbs.twimg.com/profile_images/1461826323102449665/spEoEcpR_400x400.jpg', + ref_id: '28db7b9d-1c71-4981-8044-baf001e58b94', + twitter_handle: 'agbegin', + }, + { + name: 'Yago', + profile_picture: 'https://pbs.twimg.com/profile_images/1369335486456684546/AIJdrQ5l_400x400.jpg', + ref_id: '0819a9d1-c085-42d5-8b3b-bc3ce79ff1ea', + twitter_handle: 'EdanYago', + }, + { + name: 'Sovereign Horizon', + profile_picture: 'https://pbs.twimg.com/profile_images/1604168916300873731/mLszGVm6_400x400.jpg', + ref_id: '6c159904-fe63-437e-91b5-5c444bbd11fa', + twitter_handle: 'SovereignHRZN', + }, + { + name: 'Art of Thomas', + profile_picture: 'https://pbs.twimg.com/profile_images/1547047357371797504/avnHBa2W_400x400.jpg', + ref_id: '2c312138-9a5f-4a75-9c19-513d5703d5ce', + twitter_handle: 'TheArtOfTomas', + }, + { + name: 'Maximiliano Carjuzaa', + profile_picture: 'https://pbs.twimg.com/profile_images/1566622024662917120/B6uyn9QR_400x400.jpg', + ref_id: 'a5273c83-28f1-4df3-b8c6-d3b081f55b31', + twitter_handle: 'maxcarjuzaa', + }, + ], + hosts: [ + { + name: 'Alexandria The Great', + profile_picture: 'https://pbs.twimg.com/profile_images/1575525599493427203/XubWEoDX_400x400.jpg', + ref_id: '0c977f79-ed3c-46e9-8363-6c6c519d014a', + twitter_handle: 'alesander97', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/046c6869-0627-4825-8ecf-45ff0aed97b6.jpg', + keyword: !0, + link: 'https://stakwork-uploads.s3.amazonaws.com/uploads/customers/2707/media_to_local/5e4a506b-0534-4217-b682-b568f6212b73/2b4c8ed5-a7cc-43df-95f1-0d75e2c886ab.mp3', + node_type: 'clip', + pub_key: '', + ref_id: '3ff527f0-04a4-4bb5-9279-87f48ac98da0', + show_title: 'Alexandria The Great 🌋⛏🇿🇼', + text: "Yeah, I love that explanation. I think we can't really get rid of counterparty risk. But I do think that there are ways of minimizing it as much as possible. And when I look at all stable coins, I think the one stable coin that really stood out to me was dollar and chain for how it minimized the labor of counterparty risk by firstly making sure that everything was done by small contract or funds. Like Yoga said that everything can be you can look at all the amount of bitcoin that's backed on the exposure so you can verify everything. And then also the fact that it's backed by for 169, for example. Even. Though there's a dispute about how much that's relevant. But if you look at most of these other like you talked about Taylor for example where you first had counterparty risk when it comes to just who is keeping the funds with the UST where you don't know whether how much these guys have in the bank? The audit. The auditing and all that stuff. I see. So when you have a question, maybe you can dispute about what I'm saying. No, not at all. No, it's not related. I can go after it. You can go now. Sorry. I guess it is kind of related because with the dollar backstable coin there will always be risks. But when I'm using USBC, okay, it's very centralized. And yes, the risk is that my money could be frozen by the US government if they were to enforce that, which I believe they do in some cases, or at least on Tether. I'm not sure about USBC, but the point is that they could. But at least I know that there are dollars in a bank account. Or at least it's supposed to be. But with USDC, I believe it's more transparent. Right. I don't know, Max. I think maybe just when I read about the money on Shane, I was a little bit scary because there's so many tokens involved or maybe I don't understand it yet, but maybe there's something I'm missing and I'm hoping to learn. Yeah, I just wanted to agree with what you were saying, Alex, and at. That point, ", + timestamp: '01:12:39-01:15:04', + topics: ['Bitcoin asset'], + type: 'twitter_space', + weight: 5.823068022727966, + }, + { + boost: 0, + date: 1675801804, + description: 'Hacker space opening in Italy similar to Bitcoin Park', + episode_title: 'CD87: Bitcoin Dev Kit with Steve, Daniela, Alekos, and ThunderBiscuit', + guests: [ + { + name: 'ThunderBiscuit', + profile_picture: 'https://pbs.twimg.com/profile_images/1004180692794839040/qvYqY796_400x400.jpg', + ref_id: '2932056a-dad7-4618-9c8d-d275b9f150d5', + twitter_handle: 'thunderB__', + }, + { name: 'Steve', profile_picture: '', ref_id: '8602c01d-a34f-426d-b143-581f25d3d3c8', twitter_handle: '' }, + { + name: 'Daniela', + profile_picture: '', + ref_id: '7d011916-5300-4d32-a08b-fe4731bff5f2', + twitter_handle: '', + }, + { name: 'Alekos', profile_picture: '', ref_id: '9b7499d2-4c12-48c9-b8ed-614d09f0fdf2', twitter_handle: '' }, + ], + hosts: [ + { + name: 'Matt Odell', + profile_picture: 'https://pbs.twimg.com/profile_images/1421584695746338819/Z_7ZfAeP_400x400.jpg', + ref_id: '4f2825ff-3b88-4595-84d4-36e81544b79a', + twitter_handle: 'ODELL', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/a09a2c49-84f1-4d0b-b150-6e6103f4ee41.jpg', + keyword: !0, + link: 'https://anchor.fm/s/45563e80/podcast/play/64675885/https%253A%252F%252Fd3ctxlq1ktw2nl.cloudfront.net%252Fstaging%252F2023-1-7%252F311592986-44100-2-a038b9bfbe62c.mp3', + node_type: 'clip', + pub_key: '037f7331a5bef6c6f880246747befcc3767f3bb9730bc5e6f7c3770f4184ed0bff', + ref_id: '5458df9b-3a25-4e1e-b7a0-e14daaa8d66d', + show_title: 'Citadel Dispatch', + text: "Speaking of communities, I'm going to self promote our dealers doing so. Daniel and I, we believe in Italy. We live in a small town Canon, near Milan called Brexit. Probably nobody has ever heard of it. We are bored when we're there. We just don't know what to do. So we decided to open kind of a bitcoin acrospace. Awesome. It's going to be super small compared to this. It's nothing compared to Bitcoin Park, but yeah, you got to start mall, I guess. Good goals to have that. So is it open yet? No. Right before leaving, we signed rent. Oh, congratulations. Yeah. So we found a spot in the city center. So cool. Like Italian. How far is it out of Milan? It's 1 hour by car. That's awesome. With trains, it's like 35 minutes. I love Milan. Milan is a great city. Yeah, I mean, yeah, we used to live there. It's it's good. It's also bad. Well, I'm a former New Yorker, so Milan feels like Italy meets New York. Yeah. Yeah. It's like it was very familiar to me. It wasn't like a tourist city. It was actually like I was there and people were going to work and things. Yeah. It was a big financial center of Italy, I guess. So, yeah. We're doing this thing hopefully in a couple of months, it's going to be ready and fully open. So if you come by Italy and. Europe, how do we find more information about it? Do you have a site or anything? Yeah, we have a website. The website is BS. It the place is called AK BS because BS is like the shortened version of Brexit of our city. Cool. Actually ACS, maybe I shouldn't say this because some listeners will come in and steal the domain for us, but Act PS is a valid DNS like domain. It's a Bahamas domain, but it costs like $500. So we can't afford it right now. Someone buy the domain for them. Yeah. And give it to us, please. So we have the Aces it domain, which was much cheaper. Yeah. We have a Twitter profile which is ACBS with the four in place of the year. Is that ACK. Like a meaning like acre? Because it's an accurate space. Yeah. And I think it's going to be where we want it to be. A bitcoin like physical place. Probably going to be more of a cipher punk. So we're trying to open it a little bit more. Yeah, not the sheet coins, obviously. Greater open source. But yeah, greater open source kind of environment. Because in that small town, there are not that many bitcoin. So if you just open a bitcoin space, I think what is going to come instead if we open a space, which is more of a basically where we teach about privacy, about freedom, about technology. Kind of like a CPB. Exactly. That's one of the big that's one of the big inspiration. 3D printing. Yeah. We're going to have a lot of non software stuff. So I want to have like 3D printers, CNC machines. That's awesome. But also like art and things like that. I didn't know. Yeah, that would be great. There's only one designer and we don't have any two of them. One of the things, we're not artists. We have art all over because you empower the local artists. We have walls. Yeah, that's what we want to do. Apparently policy is full of awesome art because I think at some point they managed to onboard the artist. So I hope we're going to be able to do that as well. To onboard people that are more of an artistic style than us. And they'll make paintings for us. You're first thing to go up on the wall, which is from here in Nashville. The Spiral guys took us out on a little team building exercise. We went shooting. Shooting automatic weapons and handguns. Love it. And sniper rifle. In an old movie theater. In an old movie theater. So anybody in Nashville here? I recommend going checking it out, but they let us keep the target from one of the from the sniper rifle stuff. So we got yeah, that's going to. Be the first part for that. Because in Italy, guns are like, I don't know, maybe for American people listening to these, they think, oh, California, nobody can get a gun in Italy is like worse than that. Nobody really? California is very easy to get a gun in comparison to Italy. Yeah, it's like in Europe in general, probably nobody has ever seen a gun. Basically. I'm glad you got to experience our local pastime. Yeah, I know. That's great. Super fun. You can train us in building Bitcoin wallets and we'll train you how to use them. Yeah, I know. It's super useful skill, actually. I mean, it's fun. But it was also interesting for me because I'm like, maybe in the future I'll need to shoot a gun. So it's a useful skill to have to defend yourself. And going back to the hackers conversation about yeah, not talking about people not taking personal feelings, that big thing. People don't have guns because they don't take responsibility for their own life, basically. And you're saying, too, it's a whole other technical rabbit hole to fall down, too, like how the guns work, how to maintain them. We didn't do that this week. But it's another protect. People know about those other things too. But to the hacker space, I mean, that is awesome. And I love seeing all the different spaces, physical spaces opening up. And one of the cool things with Bitcoin Park is like, a lot of people come here and then go back home and then they launch something back home. Everyone's just like, how do I do this in my city? Well, at the scale of Bitcoin Park, you do it by losing a ton of money. So I don't suggest that, but start small. Physical spaces are really important. And I'm happy if you guys need any feedback or anything like that, we're happy to help. And we're already talking about like I said, he was kind of helping us look at the coffee machine yesterday. Just but technological trading back and forth too. Like, alicos has a bunch of great ideas and Danielle like great ideas for hackerspace stuff that, hey, maybe that's kind of stuff we want to do here at Bitcoin Park. And some of the ways we've got some of the things we've set up here, the art and all those things, it might be taken back home. So, yeah, I feel like there's not so much of the practical side of building things. This is like a great off if they don't have 3D printers and stuff like that, which is something we really want to have tools. And you can I would love to. Have 3D printers here too. There's going to be a lot of cross pollination between all 100% oriented community. And it's very grassroots. It's very like bitcoin. It's inherently distributed. It's not like one group is doing it. You go back where you live and then you open one. I think for us, yeah, the main inspiration was parallel in palace because it's super cool. And again, also the same with us. Here was parallel palace. Yeah. We just made it easier to pronounce. Other places. Great. So, again, we're going to be like nothing compared to them. But that's, I guess, how you start. You can go up. At some point, we'll be reaching out to get a proper place. I'm already so hyped because we've done like a notion page with all the events we want to do and all the projects we want to work on. And there's just so much stuff. We're just like we're going to have game night and bitcoin night and movie night, where we show The Matrix and other films that might help people to just understand the, I don't know, like, psychopath point of view. And then we have so many projects we want to work on, like, I don't know, fridge, which you can be with Lightning and then you open it and you take whatever you want it to buy. Like a self service bar. Exactly, yeah. Because, again, I think the problem for us is going to be there are not that many bitcoins, so we have to be open to tech people in general, to people who build this. But it also will click to them. It'll click to them if they make their first bitcoin payment, actually just using bitcoin, even if it's the shittiest wallet. Buying a beer at your little bar with Lightning or with bitcoin. There's so many people that come here. It's the first time ever using bitcoin and maybe they've been in the space for like four years, three years, and they just never actually used it to buy something. They have this thing called the Blessed One One, which is an ATM, like a really small one, which accepts coin. So basically, people just I don't know, they take out their coins that's good pockets and they just buy one. Europe change. You put it in and you get SAS and Lightning and then you can. Buy them how to set up a wallet. Yeah. Great workshops. A thing. You guys did mention it before, but they do if anybody wants to support what's going on there. In Russia, they've got a BBDC Pay server where you can how do we get there? Donation page. Yeah, on the website. And it should be like a donation. On the front page, I think a link to it. Yeah. In the menu, I think, above. Great website. We're also on Geyser. That's fun. Yeah, but we don't have our own license. Yeah, we do have only address. Sorry, so what are you using, like a Lightning address with them? I didn't know they set up something for us. But they take a fee because we don't have L and D notes and they just pay service. Best approach? I'm looking at it. It looks great. 10,000 euro soft cap goal. Yeah. I mean, that's kind of a random goal. We're going to open the place anyway, so it's not like we need to reach a goal to open it. We're going to open it anyway. And we're going to start super small. Right now we're looking for a used furniture. Like we're looking for a desk that we can get it for $20 or something like that. Yeah, if you're going to buy chairs, we're going to buy used chairs because yeah, absolutely. Yeah. We don't have a specific goal in mind, but whatever we can get, obviously it's going to go towards ", + timestamp: '01:06:35-01:16:24', + topics: ['Bitcoin Park'], + type: 'podcast', + weight: 46.10662364780383, + }, + { + boost: 0, + date: null, + description: 'Bitcoin Standard is encouraging value for value system', + episode_title: 'The Orange Sun 🌞 VISA, MasterCard & #Bitcoin #BOLT12', + guests: [ + { + name: 'Oluwasegun Kosemani', + profile_picture: 'https://pbs.twimg.com/profile_images/1538403135101800450/sO-RPI9U_400x400.jpg', + ref_id: '25ce4b90-6689-4dd9-84b6-240c7bcbe407', + twitter_handle: 'MrlamilamiKosch', + }, + { + name: '~₿ Maxi~', + profile_picture: 'https://pbs.twimg.com/profile_images/1446241859651637250/i67F3y9p_400x400.jpg', + ref_id: 'ad997ae7-0726-431a-9f72-82da091c0658', + twitter_handle: 'fede0891', + }, + { + name: 'TK☣️Ph.Ple₿', + profile_picture: 'https://pbs.twimg.com/profile_images/1505791887415730177/d0YDQ3Xc_400x400.jpg', + ref_id: '9e3ffa2c-9410-48e9-a726-8312c0abcd7c', + twitter_handle: 'ToxiKat27', + }, + { + name: 'FireBurs†s', + profile_picture: 'https://pbs.twimg.com/profile_images/1517827165198458880/N79Wpx85_400x400.jpg', + ref_id: 'cda1d3ad-dd80-458b-a5fb-a28861df10a7', + twitter_handle: 'FireBursts', + }, + { + name: 'Nikolai Tjongarero', + profile_picture: 'https://pbs.twimg.com/profile_images/1578458155964682274/_SzDxkAJ_400x400.jpg', + ref_id: '821ee040-2267-454e-a59a-92da51568afa', + twitter_handle: 'BitcoinNaijaShw', + }, + { + name: 'ブランドン', + profile_picture: 'https://pbs.twimg.com/profile_images/834861311762649090/N0KAP4zH_400x400.jpg', + ref_id: '3d41531d-6a59-4771-81f9-0924b4c02561', + twitter_handle: 'blario', + }, + ], + hosts: [ + { + name: 'Satoshi’s Journal', + profile_picture: 'https://pbs.twimg.com/profile_images/1598641632601047042/qrZMP5Oy_400x400.jpg', + ref_id: 'd977ed11-09b0-4143-828d-582ecb8b58ca', + twitter_handle: 'SatoshisJournal', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/9b2e17f2-71c5-4f1e-a3e7-720d06dab810.jpg', + keyword: !0, + link: 'https://stakwork-uploads.s3.amazonaws.com/uploads/customers/2707/media_to_local/94a86a32-91c2-4717-b5cb-b36cef925776/38decc02-c922-4c1d-a605-7cd54c91a01d.mp3', + node_type: 'clip', + pub_key: '03c18d0c6c35333f22bc524e21a5fd1d2d9886f5d4d958dc1de95d025de5c84cfc', + ref_id: '5483d49e-fa1a-430c-9d2a-ed11e3a6beec', + show_title: 'Satoshi’s Journal', + text: "I implore you to check out and have this website on your desktop or on your phone. I literally have it on my phone and I click them every morning for the show. Super helpful. They're free. TC is going to be making it open source, so we think it's good now, but there's going to be a lot of people that can make it better once he makes it open source. Timechainstats.com, I don't think is open source, that is Aunt's Baby. So he just updates it as plebs, give him inspiration or constructive criticism. He makes it better. So check out both of those soon to be on our website. And then lastly, most importantly, the subject today inspired by Master Guanti was just bitcoinners are charitable. We could probably talk about this for many, many more hours in 2 hours, but I think that the biggest thing that I've seen in the bitcoin space with bitcoinners is I haven't met one bitcoin that's not charitable. They want to help people, they're selfless. And I think bitcoin is a reflection of what the future is going to be. Because when your time is denominated by a money that is actually representative of your value, I think you'll be more happier. You'd be happier. Sorry. And you'll actually be able to help people because you'll have money that is not inflating away faster than you can create it or you can make it. And so I think right now we're seeing a small iteration of living under a bitcoin standard. So bitcoinners are trying to help each other everyday on spaces, even just taking time out of their day just to create a new tool. Like we just talked about timechainstats.com and timechain. Sorry. Timechainstats.com and timechaincollender.com. Those two tools were created by two individuals. Timechainstattsk.com has been in the works for over two years if I'm not mistaken. I think when I first got spaces, Ant was working on it and he's still been working on it and revamping it and making it that much better. I mean, he's not getting paid to do that, he's just providing a tool and it's a very helpful tool. And now you got time train calendar, same thing. TC is not getting paid for it, but he's created it. So I know that TC has a donate button, so if you have a chance to send him some stats, please do. I'm trying to find it now, actually. So if you go to the app, I think it's under, let's see, where is it? Oh, so if you click the settings button and then you go to contact, you can find it. It says, donate me a beer or cup of coffee. Cheers. So I clicked his donate button and while I'm here, I'll just send him $10 here. Okay, copy. And just go to Strike and $10. All right, so, yeah, you can simply do that. It took me just a few seconds, but at North, TC expect tips. No bitcoin, really expects tips. They give the option of tips, but, I mean, it's like freaking twisting a Bitcoinner's arm to be able to send them tips. Like, no one wants to get tipped. I mean, they do, but they don't like they feel like they're what's it called? They don't want to bother people. So, yeah, just tip those people that you respect their time and the value that they bring on a value to value basis. I think that's the future. It's funny because we should have already been living a value for value basis, where you provide value and you get whatever your value is in return. But Fiat has broken that system, but now we're living it. We're seeing it through our fellow pubs. They provide value and we provide. So, for instance, the videos that we've been doing with Wicked, those aren't free. He charges us a certain amount and I'm willing to pay him that amount because the value that his videos provide you all and me, obviously, is a function of how many views we get. So one video got 570,000 views. Apparently that was valuable. The current one is 15,700 views. Apparently that's valuable. So I will continue to provide monetary money to those people that provide value to me and vice versa. So that's just the way it should work, and that's how the future is going to be. ", + timestamp: '00:29:58-00:35:57', + topics: ['Bitcoin Standard', 'Bitcoin Tools'], + type: 'twitter_space', + weight: 5.705638647079468, + }, + { + boost: 0, + date: null, + description: 'Seed phrase metal backups - seed phrase stamping systems', + episode_title: '#Bitcoin Self Custody Q&A Episode 15', + guests: [ + { + name: '@ToxiKat27', + profile_picture: 'https://pbs.twimg.com/profile_images/1505791887415730177/d0YDQ3Xc_400x400.jpg', + ref_id: '29e1a1c3-1dbe-4ab2-955d-8a7a7476996b', + twitter_handle: 'ToxiKat27', + }, + { + name: '@Lil_WhiTe_Boi19', + profile_picture: 'https://pbs.twimg.com/profile_images/1594796869233811474/g0_ZRshz_400x400.png', + ref_id: 'c737d37a-be78-4bd1-823a-04d569aefcfe', + twitter_handle: 'w_s_bitcoin', + }, + { + name: '@Tarek_Z_Saad', + profile_picture: 'https://pbs.twimg.com/profile_images/1598082570931130374/aiUPJ1HC_400x400.jpg', + ref_id: '16091cbf-d110-4299-af6e-84ecd0429d59', + twitter_handle: 'Tarek_Z_Saad', + }, + { + name: '@BeyondBlu3', + profile_picture: 'https://pbs.twimg.com/profile_images/1577513247107842050/JCDgPikZ_400x400.jpg', + ref_id: '0be89e9a-6e96-4241-8ee8-cdebf9b134b1', + twitter_handle: 'BeyondBlu3', + }, + { + name: '@life2_one', + profile_picture: '', + ref_id: 'd2a45191-e863-4e56-8a05-08afdff7f421', + twitter_handle: '', + }, + { + name: '@KahnsMichel', + profile_picture: '', + ref_id: '937fcaa9-4b73-4fbe-ada4-b40720644a1d', + twitter_handle: 'kahnsmichel', + }, + { + name: '@Jimmy14624', + profile_picture: 'https://pbs.twimg.com/profile_images/1594796869233811474/g0_ZRshz_400x400.png', + ref_id: '73c17ab8-ce99-4c87-ba45-3334c255c97b', + twitter_handle: 'w_s_bitcoin', + }, + { + name: '@SovereignHRZN', + profile_picture: 'https://pbs.twimg.com/profile_images/1604168916300873731/mLszGVm6_400x400.jpg', + ref_id: '2811a110-d1cc-4a2d-bead-59b4e1805817', + twitter_handle: 'SovereignHRZN', + }, + { + name: '@XpatSantiago', + profile_picture: 'https://pbs.twimg.com/profile_images/1599096281493778433/qeSvcIuj_400x400.jpg', + ref_id: 'bca4859c-3c8b-42c2-a0ee-86eb581f4078', + twitter_handle: 'XpatSantiago', + }, + { + name: '@MrHodl', + profile_picture: 'https://pbs.twimg.com/profile_images/1570497262735728640/q5ZDJFKz_400x400.jpg', + ref_id: '8abfce7f-a49d-49f9-8bab-6861e41910d5', + twitter_handle: 'MrHodl', + }, + { + name: '@bankhatin', + profile_picture: 'https://pbs.twimg.com/profile_images/1596672372744019969/prxTKz_7_400x400.jpg', + ref_id: 'c4af2875-19ec-4439-85da-4ff34ae397fe', + twitter_handle: 'bankhatin', + }, + ], + hosts: [ + { + name: 'Wicked Smart Bitcoin', + profile_picture: 'https://pbs.twimg.com/profile_images/1594796869233811474/g0_ZRshz_400x400.png', + ref_id: '6bbf5f18-35e4-4ad0-aade-dbd493b1f4eb', + twitter_handle: 'w_s_bitcoin', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/4127f08c-505a-4a7d-935f-e93e87204089.jpg', + keyword: !0, + link: 'https://stakwork-uploads.s3.amazonaws.com/uploads/customers/2707/media_to_local/58879b11-db25-4b12-b182-960933e015e9/df9bdaae-4143-4873-baa6-dd7e56407c6f.mp3', + node_type: 'clip', + pub_key: '02814a5050f43a36bb052c7a3f22f0e86700abe037a44d99b45e0cb424d9398cbf', + ref_id: 'd9edac8b-8349-4e52-b61e-a22ef687f4f3', + show_title: 'Wicked Smart Bitcoin ∞/21M', + text: "Hey, guys, I just had a quick thing. Ed, you were talking about stamping it in metal, and I bought a buddy of mine's house burned down and he left his chain in there and it was just a pile of melted. So the titanium thing is definitely for the heat, you know what I mean? I don't know what temperatures the other metals go out at, but there was some left of the metal. Yeah, there was a pile. Has a video of all the hardware, all the metal devices with. He went through, he stressed us. He took molten, basically fire. He was shot at with the AK 47. He did all sorts of tests and I'm not sure, I don't remember the exact results for each one of those titanium plates, but it's there. So if you go on Twitter and you look up Loft and you look up some of these metal backups, there's a video out there with him doing all these tests. And yeah, they're not all created equal 100%. Yeah, I think it's changed. Mostly made out of copper, I don't even know. Or nickel. Those are metals that have a much lower melting point than steel and titanium, obviously. Titanium has probably one of the highest ones, right? Titanium. You can literally drop it in a volcano and it won't melt in the lava. Not that it matters, but like yeah, in a house fire, I think as long as you have it stamped in steel or titanium, like, it will survive the fire, right? Whether it will survive a shot from AK 47, that's another question. I'm not that paranoid. I'm not getting shot at enough to really care about that. Fire gets hot, man. It made a Toyota into a pile of metal also, you know what I mean? So it's hot. I'd stick with titanium if I was going to stamp anything on, anything. But yeah, I will say I myself use titanium plates, as I said before. And there are some benefits to that one is that it's a lighter metal, so it's easier to just fucking store. You have a big pile of them. It's not going to be heavy. That doesn't really matter too much to most people. That's one, though, it's kind of nice. And then it's also stronger. So like, it doesn't bend as easy if you've got a thin sheet of it. Because the ones I use are like pretty thin little cards. They don't bend. But if you're using kind of a thin version made out of steel, it would start to bend and warp. That can be a little bit more of a concern if you're worried about the plate, like bending in a way that could fuck up the lettering or something. And then of course, the biggest benefit in my mind is like, it's just got a higher melting point. But all that being said, it is harder to stamp into. So you have to really put some fucking muscle into it when you're stamping these things, right? And I've posted videos of like not videos, but pictures of the hammer I use when I stamp these things. It's probably not the best hammer for doing it, honestly, because it's like a jewelry hammer made out of copper. But man, this thing is fucked. It's just totally warped where I actually hit it because you have to hit it really hard to imprint the lettering in titanium. So definitely it requires some proof of work if you want to use titanium plates, you know what I'm saying? Yeah, one more thing I just wanted to add real quick and I'm done. You guys say don't use your names in your seed freeze. Is that even common names in your past phrase in your past race? Okay, I thought it wouldn't generate a name, right? No. If you're curious about what words are in the seed phrase, you can look up bit 39 word list and you'll see it's a list of 2048 words. Each one has a unique starting four letters, right? So you only need the first four letters of each word. That's a little known secret, but like if you're stamping them in titanium, you're going to save yourself a lot of effort and a lot of time if you just stamp the first four letters because that's all you need. There's a little bit of alpha. And then in terms of your passphrase, that can be anything you want. So that can be any characters, upper, lower case numbers, spaces, literally anything you want can be that passphrase. Now, of course, the more crazy and complicated you make it, the more responsible you have to be when you are backing it up or writing it down or memorizing it or whatever. Right? So there's a trade off there. The trade off is you can make it really complicated, just like how you can make a password on your bank account really complicated. But if you forget it, then you lose all your bitcoin. So you just have to make sure your backups of it are done really well. Don't fuck that shit up because it's really hard to recover your funds once you forget your passphrase or are uncertain if like, oh, did I make all these characters some of these capitalized, or did I put a space there? Or did I use an underscore or that these types of things, just like a password. It gets really fucking risky once you start throwing in a bunch of random shit, and then you just have to make sure that he backed it up really good. You know what I'm saying? Yes. All right, let's go to whoever had their hand up first, wasn't paying attention. I just want to tell everybody, if you need something like this, I mean, steel crypto, you can just look, I'm sorry. It's written Sierra, Echo, Echo, Delta, October, Romeo. And they also got pretty cool videos on YouTube. And it's very small, and you can hide it in the door, or you can make a hole in the wall and hide it there. It's pretty cool. And it's about $150, and it's with hammer and stems, and it's made in Germany, stainless steel. I just want to let you know it's pretty good because it's not so big like a card. That's the difference. Because if you want to go out with it, I think a card can be pretty hard in your pocket, and it's just like a roll. It's like coins you stem. Yeah. So there's a bunch of options. There's a bunch of companies who are now starting to make different options for this, and there's a bunch of good options for me, myself. A lot of these options are getting pretty expensive, right? $150 for, like, a metal backup is in my mind, that's too expensive. I'm not going to spend that kind of money, especially since one thing I'm doing is I'm helping a lot of my friends and family kind of get their seed phrases stamped, whether I'm doing it for them or whether I help them do it. Obviously, if I do it for them, they have to trust me. But it's better than them fucking keeping their bitcoin on exchanges. So I do what I got to do. And because I'm doing kind of a lot, I'm like dozens or whatever, I've kind of made my own DIY system, stamping system, and each of the titanium honestly, each of my titanium plates runs me about $2.50 a pop. I've got it down. I've got my price down per se stamp. So I can't imagine paying, like, $100 just for one or two set ups, you know what I'm saying? I'm sure it's nice if you have. A good passphrase, you can make many backups, and you can spread them out. Seat race. A metal plate is nice if your house gets burned. But if you have a backup of your seed in your mother in law's house and your grandmother's house and your cousin's house, and in a bank account or in safety deposit box, if your house burns down and your seed burns down with it, well, you have four or five other backups in different locations. And as long as your password is good, that's the main thing. I try to, like, hammer home is that your passphrase has to be as long as your seat. Those first four letters of those words, that's how long it has to be for it to be as secure as the seat itself. So I personally have yeah, I have it. I bought Crypto Stealing a long time ago. I don't really think I ever used it because I just have so many backups laying around different locations. So I don't have that signal point of failure. So, yeah, it really depends on how you're set up. Also, if you're mostly safe then you don't really have to worry about any of them. Yeah, that's a whole nother can of worms, which always gets brought up. And I love talking about multi saga as well. I think it's pretty interesting setup configuration. The other one that a lot of people use is like you can 3D print or buy for like 510 bucks the the stamping guide for stamping steel washers, you know, and that's one that a lot of people use too. You just get yourself a bunch of cheap stainless steel washers. You stamp the first four letters in each one and then you bolt them all together. Make sure you bolt them in the right order, of course, but that's like a good economical way of doing things too. If you're trying to back things up a little bit cheaper. You don't want to break the bank for a dopeass stamping system. I will say, man, like the fucking what was that company that made the titanium ones, like the Thor, whatever comes with the hammer and it's like $300. I was envious of that stamping system and that's ultimately what got me to just do the DIY myself. Because if you look at my setup, I designed and 3D printed my own stamping guide. And if you look at it, it's like kind of pretty similar to what they had. But yeah, I mean, peach their own. Anyway, the whole point is back up your fucking seafarers. Don't rely on don't rely on your device holding that for you. Whether you're holding it on a hot wallet in your phone or whether you're holding it on a signing device, you got to have backups because there's no guarantee that your phone's going to be with you forever. You might lose it, the app might stop working, your signing device might break, you might burn in a fire. You guys have to have these things backed up. So either back them up on a piece of metal and store that somewhere safe or back it up in multiple places with a pass raise on top for that extra security. There's many different options, but you just have to make sure that whatever option you choose works for you and is secure. Go ahead, Sovereign. Yeah, I just want to comment on the price point of steel plates. I have been looking around a little bit. It looks like to me the best bang for your buck if you're going to go with steel is keystone. It's like exactly the same as biddle fabulous. And it's $49 and they also have $39 option and it's yeah, like using $100 or more for steel plate is just ridiculous. I know everybody loves to kill the bill fuddle, but come on man, it's not worth that price. So yeah, that's what I would recommend. Check out keystone. I know, I'm getting a couple of those from myself. Yeah, there's options for everyone at every price point I think. Yeah, I've got some poor friends and I'm just like buy some fucking washers and just get yourself a cheap stamping system off Amazon for like $20 or whatever and go wild. Because the other thing about these seed phrase stamping systems is you're not going to keep that seed phrase for your whole life, let's be honest. Most likely, most likely you're going to cycle through a few kind of throughout your time in Bitcoin, right? You're going to figure out a new way to set it up or you're going to want to just kind of make a new one just to make sure you're up to speed on everything. Maybe you will keep the same one your whole fucking life, I don't know. But in my experience I haven't. I kind of cycle through them every once in a while just to kind of keep things fresh. And so if you're spending fifty dollars to one hundred dollars on a brand new seed plate backup every single time you create a new seed phrase, I can get expensive real quick. So finding yourself an economical way of doing that might help out the other thing with these keystone. So here I'm looking at the link that you just sent in the nest. One thing I don't like about these things, these keystone tablets is if they ever get damaged, if they get warped and then those little letters pop out, then you're fucked. Right? Yeah. That's why they made the plus one because the cheaper one for 39, they had one slot for four letters but now they've updated it to the plus, which is like 49 instead of 39. And now they actually have one individual slot per letter and also like 20 more screws or something. So it should be better. But yeah, they can be worse. But for a multi sake set up, I wouldn't be worried. Okay, got it. Okay, I see here. It looks cool for sure. I've just seen some reviews. Like I haven't tried it myself yet, but it looks for the price point, I would rather get two of these than a bill model to be honest. Yeah, cool. Yeah, good stuff. All right. Well yeah, I think we kind of beat that to death. I just want to show you because I think not everybody got the knowledge as you post. I just want to make it everybody as easy as possible. So I just want to think to everybody, you know what I mean? I mean somebody get, I don't know, thirty k a month so he don't give a fuck about the cost. So that's a fiat world. It's so crazy and insane. ", + timestamp: '01:23:06-01:39:40', + topics: ['Titanium seed phrase plates', 'Seedor', 'keystone', 'titanium'], + type: 'twitter_space', + weight: 5.703676700592041, + }, + { + boost: 0, + date: 1676083645, + description: 'Lessons from previous Bitcoin soft forks on Bitcoin', + episode_title: + "BR023 - OP_VAULT for Bitcoin Covenants Panel ft. James O'Beirne, Rijndael, Antoine Poinsot & Carman", + guests: [ + { + name: 'Carman', + profile_picture: 'https://pbs.twimg.com/profile_images/1609775498971725824/5vyAafE3_400x400.jpg', + ref_id: '09405d70-6fa6-4f2c-92f1-a2951ad56447', + twitter_handle: 'benthecarman', + }, + { + name: 'Antoine Poinsot', + profile_picture: 'https://pbs.twimg.com/profile_images/1108377445936316423/ArRDGbr5_400x400.jpg', + ref_id: '1ba10809-b3e6-4e37-a906-697a0368b814', + twitter_handle: 'darosior', + }, + { + name: 'Rijndael', + profile_picture: 'https://pbs.twimg.com/profile_images/1542705395873058817/0zsy4Yur_400x400.jpg', + ref_id: '861d5324-8ede-4059-826f-f29abca5d7e6', + twitter_handle: 'rot13maxi', + }, + { + name: "James O'Beirne", + profile_picture: 'https://pbs.twimg.com/profile_images/1542173995650408450/iDxrdmuj_400x400.jpg', + ref_id: 'e8e48fcf-9e54-4c66-9b20-aacf5c5b504e', + twitter_handle: 'jamesob', + }, + ], + hosts: [ + { + name: 'NVK', + profile_picture: 'https://pbs.twimg.com/profile_images/608402052247658497/ENDv0BNd_400x400.png', + ref_id: 'd754e29b-2d3e-4280-8d72-f41d2a465a78', + twitter_handle: 'Coinkite', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/f1879df9-9bc6-4a76-951f-24548da768ef.jpg', + keyword: !0, + link: 'https://anchor.fm/s/9500fad8/podcast/play/64850866/https%253A%252F%252Fd3ctxlq1ktw2nl.cloudfront.net%252Fstaging%252F2023-1-11%252Fc53436f3-e1a6-2cae-eecb-fb61b06f804d.mp3', + node_type: 'clip', + pub_key: '037f7331a5bef6c6f880246747befcc3767f3bb9730bc5e6f7c3770f4184ed0bff', + ref_id: '1510e150-aee2-42cb-ac57-79b4997bb6cb', + show_title: 'Bitcoin.Review Podcast with NVK & Guests', + text: "Well, another thing that is a relatively recent development is I think AJ set up Bitcoin inquisition, which is let's proactively merge different software proposals into a Cignet so that people can play with them on a shared network. And so, unlike some of the more ambiguous ambitious big change proposals, because Op Vault is really targeted at a very specific shape of use cases, maybe there's an easier path here of it ends up on something like Bitcoin acquisition. People can build little dummy wallets and normal users can get a little bit of stick time playing with okay, what would custody in a post Op Vault world look like? And demonstrate that this is better. And so even if you don't know whether or not the mechanic is trying to screw you, you can at least kind of take it for a test drive first. There might be some stuff like that where it's less about how do we go and win the rhetorical fight on reddit and it's more about what can we do to incrementally derisk the proposal so that the community understands what they're signing up for. I mean, there was a lot of that at Tap Root, right? There was a lot of sort of working groups and things like that, but Tap Root still felt pretty rammed through. Optech did a workshop on tap root, I think, two years before activation. So you could write code and watch videos about tapirt, but people still felt like it was sprung on them. Tap root is just so hard. It's so hard to get. Until very recently, didn't I feel like, fully understand Tap root for this proposal? I had to write a bunch of tests. It's all in taproot. And there were things that I just kind of didn't understand and I found it pretty difficult to get sort of valid taproot constructions. And I basically relied on sort of the example code that other people are written. So, again, I'm massively positive on taproot. I think it's awesome, but it was like, so difficult to get your arms around. Even as a deeply technical person, I. Wanted to address as well. You said that it was a small group of people, but why it's true is that it was a small group of people that cut it for tapris. I found that there was a lot of demand and the defense had a high bar. Well, there was a lot of demand, a decade of research. When did we start discussing milk rice scrapes? In 2012 or something? With raspberry? Yeah, yeah, years ago. So, yeah, a decade of research, a lot of involvement, and a lot of people in the community with the workshops, a lot of involvement with the activation. And maybe that's why as well, people are not happy with it because they were actually involved. I think Teprit did put a very not high bar, but reasonable community involvement and normal user involvement. Schneider is a similar thing. Like, people have been wanting schnor and bitcoin for years. See, like, the Schneider is funny that he brought that up. It's always been a concern of mine that what if acdsa is back door, right? And it's not revealed for a long time and there is no proof for acdsa. So the idea of, like and again, this is a fundamental change to bitcoin, right? Adding another crypto primitive is like crazy different, but just having a secondary fallback crypto primitive in bitcoin before we're big enough that state actors are going to that extent, right? It's pretty cool. Thanks. Antoine is stepping out. Appreciate it. But now we have this sort of like the fights have always been hard. Up return limit back in 2009, 2010 because people are concerned about the worst part of Dick butts and then you had say P two Sh was also a huge fight. The original block size changed from 32 megabytes to 1 know SegWit was a bamboozle of most people. People did not understand that the block size increased. I don't know, I just hope that this one is not part of the contention. Like we can find a path where like this is the gardening sale, not the construction sale. I think the point Ryan Dow made is so good. And what I love about the idea of people taking this for a test drive en masse with inquisition is like that gives technical people who maybe don't want to work on Core or don't have time to work on Core can't they can write tooling to kind of make this an easier process to be able to experiment with this stuff more easily. So I just love that idea. I think something keep in mind too, like MVK, you just went through all those different software from the original block size decrease to like stuff like segment tapri like you didn't mention like CLTV or CSV or like BIP 66 I think, or 68. Like there's tons of bits that are like we're soft fork that just like are just normal things that happened and no one cares because they're like simple small upgrades that are ", + timestamp: '01:37:06-01:42:14', + topics: ['soft forks'], + type: 'podcast', + weight: 47.136215082032344, + }, + { + boost: 0, + date: 1601200800, + description: + 'Politicians defunding the police which resulted in an increase in the rate of crime in Manhattan ', + episode_title: 'Orange Pill [OP7] - Bitcoin is Love', + guests: [ + { + name: ' Abe Cambridge', + profile_picture: 'https://pbs.twimg.com/profile_images/1368910908282572802/MTMBCPZU_400x400.jpg', + ref_id: '5eed11cc-94e5-4e17-b923-95183699f193', + twitter_handle: 'abecambridge', + }, + { + name: 'Mitch Feierstein', + profile_picture: 'https://pbs.twimg.com/profile_images/2625988157/vky9cedsgb0mf3usbh3x_400x400.jpeg', + ref_id: 'f9a70e2b-f905-4c70-afcf-3ef7004b7cab', + twitter_handle: 'PlanetPonzi', + }, + { + name: ' Alakanani Itireleng', + profile_picture: 'https://pbs.twimg.com/profile_images/1512849723283185673/MzgEELWq_400x400.jpg', + ref_id: 'bda1bc91-3acc-4dc7-82eb-03c70f63525f', + twitter_handle: 'bitcoinlady', + }, + ], + hosts: [ + { + name: 'Max Keiser', + profile_picture: 'https://pbs.twimg.com/profile_images/1361873587582472195/y57DiTYX_400x400.jpg', + ref_id: '743efd07-d194-4c74-8663-45c3b8646b8e', + twitter_handle: 'Maxkeiser', + }, + { + name: ' Stacy Herbert', + profile_picture: 'https://pbs.twimg.com/profile_images/1546484196750905346/5WYPz-bc_400x400.jpg', + ref_id: '4b6f90a8-8e0b-4f51-8995-431a30cf87f4', + twitter_handle: 'stacyherbert', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/afa24463-19f7-4875-b6f4-b261d1d6c648.jpg', + keyword: !0, + link: 'https://www.buzzsprout.com/1263314/5617321-orange-pill-op7-bitcoin-is-love.mp3', + node_type: 'clip', + pub_key: '02574d6e8e787372184b6f17c40d6c6fe1777db9015801f95dfd24692784d767cd', + ref_id: '5216f100-c7ac-4b62-91d8-e394f5a0d531', + show_title: 'Orange Pill Podcast', + text: "kind of back to the 70s when I grew up here. But the crime is worse now. So it's a reflection of just complete lawlessness throughout. The police, obviously, have been defunded. So even if you wanted to, you know, the politicians said, defund the police if you don't defund the police. So they've taken away, what, half a billion dollars from their budget. And so the police aren't motivated to do anything. So the crime has skyrocketed here in Manhattan. It's very dangerous to walk around here. Is this a Larry David kind of is really dangerous. Oh, my God. Because I remember a little bit of the I'm sure Max remembers the 3000 murdered a year. Well, Mitch, you're saying that the streets are empty and I saw the videos and it looks really eerie, for sure. Only very occasionally are the streets that empty, so that's freaky. That's very freaky to have that day after day. So the crime where's the crime coming from? I've read some stories about it. So you have a lot more burglaries, I guess now. So people in the Upper East Side are complaining. So there's home invasions, there's burglaries. Is there a lot of crime with guns and knives, or is it mostly burglaries and muggings? Well, I think I think you have the whole gambit that you run. I mean, the murder rate is up close to 300%. Look, I was walking down the street and I was accosted. People tried to take my money. So I've been in the city my entire life when I was little, and I went in the wrong neighborhood. Not little, but younger. Still. Spiked the kids. Oh, my God. Yeah. I mean, I used to get beat up regularly, so I can tell when something bad is about to happen and when there are four guys that ask you for money and there's two in front of you and two behind you in the middle of the day in Midtown, there's nobody around. Something bad is going to happen. All right, so you're getting mugs, basically. There's a lot of muggings. You could get mugged any day now. Broad daylight. That's the new normal. It's the new normal. But I ran into the middle of the street because I'd rather take my chances of getting hit by a car or if one of them had a weapon or getting bashed in the skull. So I didn't get hit by a car, but a couple of cars jammed the brakes on, and the guys didn't chase me into the road, so I. Just took off meeting here on orange pill. One pill makes you smaller, and one pill makes you large. So you used to be a small person back in the walking around. Maybe that's why. Or maybe you're small now, and it feels like, you know how when you're tiny, everything feels bigger, but maybe the problem feels bigger because to me it seems like when I go to New York and I haven't been there in six months, but that it feels very sort of Disney compared to how it used to be. There was a kind of niceness about all the freaks and crazy people in New York City in the it's kind of lost that touch and maybe you need some more body slow. I mean, I remember Max's face like he hadn't been back to New York City in 1520 years and then seeing some people jet ski down the East River, like, how many corpses there's a. Lot of dead bodies in there. Why would you have a jet ski? Yeah, it's nuts now, though. But look, the police told me not to go out. I've got friends who work for the city, and they said, don't go out here at night. And I said, okay, great. But 11:00 at night four nights ago. I needed some ice cream bad. I was having an ice cream emergency. So what does one do? You walk to, of course, the CVS or the Dwayne Reid or whatever it is because they're open 24 hours and they sell ice cream. I walked in and the ice cream cabinet had locks across it. Have you ever gone in so far? And it said, Please ring the bell? I hit the bell and some guy comes like five minutes later and I said, You've got to be kidding me. You're locking up your ice cream? Are things that bad? He goes, oh, yes, they steal the ice cream regularly. They come and clean it out. I said, but isn't there anybody that sees it happening? He goes, no, we don't see it. And I said to him, I said, but the beer and the wine doesn't seem to be locked up. Wouldn't they steal that first? He goes, no, they steal the ice cream. I don't get it. That is definitely old school, where they had the plexiglass everywhere, at the bodega or at the grocery store. This was before you had big change like CVS coming in there. And of course, taxi drivers put up that plexiglass during the because of all the muggings that were going on. The subway system. We remember in the 70s as being all graffiti, all dilapidated crimes, boo, boxes. Have you been down the subway at all? Has it gone back to this state? I did try to take the subway during the day because I had a meeting down on Wall Street and it was empty. I took it and there was nobody on it. So it was fairly safe, fairly quick and painless, but nobody was on it. No graffiti going back to the 1970s. You know Tompkins Square Park in the East Village? It became an encampment. People were living there for months on end, became a nogo zone for police, and it was a drug open drug bazaar. Have we gotten to that stage? I don't think there's anybody here to participate in that. I think that if you look around on the street, it's like filled with homeless people and the people Bill de Blasio decided to let out of the prisons. So, I mean, that's the problem. I think he's let thousands of people out because of COVID, so coughing around, or they're out on the streets looking for somebody to rip off because they're convicted felons now that have been given a chance to come in and repopulate the city. That's why most of the people who live in Manhattan have left. I mean, most of the people who are here are gone. I went into my dry cleaner and he told me that the business is down 70% 70%. He goes, this is bad. And if you look, a lot of the shops are closed and they're never coming back. So if you think about that little video of Grand Central that I sent you and all the new buildings that have gone up, the real estate loans that are astronomic, there's so much space. They better get those printing presses on high here, I'm telling you. We kind of lost you a few times there, but I think everybody kind of gets the gist of it. But before we wrap this up, Mitch, I want to ask you one thing, of course, that we saw in the, as Max mentioned, Taxi Driver, the famous film, and the Times Square was the Deuce that was like the home of open air prostitution and drug dealing and all sorts of stuff like that. But we also had one thing we're missing in our economy these days, is the serial killer. I think most serial killers now, they used to be like in their thirty s and forty s. Most of them do school shootings and mass shootings at 20. Now, I think those same guys might have, you know, become serial killers back in the day. Do you think we might see the return of the serial killer to Manhattan? Because that's missing and we lost him. Well, it says my Internet is unstable. Did you get me back? You have me? Yeah, I see you. You're there? Oh, no, it's very unstable. You're a very stable genius, though. Mitch, what do you think about the serial killer missing from Manhattan? Are they going to return? I think that they are, but I think they've been reincarnated. I think there were 86 people arrested in Times Square last weekend with their peaceful protests. I guess that turned not so peaceful. So you're saying that serial killers have now become peaceful protesters? They've played antifa. Oh, my God. What about the squeegee man? Back in the 70s, everywhere you go, there's guys with squeegees who do your windshield for a dollar. Have you seen that come back yet? No, I haven't seen the squeegee men come back yet because I think people are too afraid with covet to open their windows. I mean, everybody here. This is the other thing here, petrified. And they've become a bunch of mask Nazis. It's like you have a mask on. What? You know, and they'll start screaming in the streets. If they catch people with no mask on, it's like, oh, my God, this is like the end of the world. Even if you're drinking some substance while walking down the street, you must have a mask on. So they got to figure out how to make the masks more permeable. Well, Mitch, I'm not totally convinced that you're not an alternative universe. Larry David, who stayed in New York and didn't go to Beverly Hills, there's a similarity between the two of you. I can imagine Larry David also getting in trouble with the mask Nazis, as you say. There you go. Well, I hope not. And look, I hope the city turns around but I don't see it happening, especially not with Mayor de Blasio in office. I mean, everybody's complaining about him. I don't think he's got one ally left in New York. I think he's alienated everybody. But I don't know if that's his plan, but I think he got to give New York City miss from now. On until I saw a statistic, something like 15,000 empty apartments. Is that number going to go up? Absolutely. There's plenty of stock out there that's empty. And who wants to rent a two bedroom apartment for $9,000 that you're going to have all the creature comforts and be able to have your meetings on Zoom. And no business is really transacted here. So all the apartments are pretty much cleared out. So I think they're going to have a problem, especially with the massive amount of new builds that they put up here that I've been railing about for years. There's not enough revenues to support that. And the tax revenues in the city have absolutely collapsed and they've cratered. So I don't know. We're going to have to have an economic reset or the planet Ponzi Ponzi scheme has finally exploded. But we're surviving on the fumes of Jerome Powell's quantitative easing. Infinity. But remember, you can never, ever Ponzi. Scheme, and that's a good place to end. And of course, do not worry about Manhattan real estate, because in the 70s, when they went bankrupt, not only did Donald Trump come to the rescue, because the federal government said what was the famous thing they said to Ford, said to Manhattan, shop dead. Well, don't worry, jerome Powell's got your back. And he's going to be buying up all those apartments in Manhattan and it's going to be fine because you can't taper a Ponzi. You can't taper a ponzi. Come on, dance. Boats on a Ponzi scheme. Everybody's getting ready. The boat's floating on Powell's ocean of money and we're all wearing Lays and all you can eat buffet at the FIA Ponzi scheme. Mitch yeah, all you can eat at the Warren Buffet. Yeah. Well, thanks a lot for joining us on Orangeville. Thanks for having me, guys. And be well. And I'll see you from London next time. Yeah, right. That'll ever happen? Is that the Curb Your Enthusiasm team music? It sounds like Barnum and Bailey circus on track. Oh, I don't know. Well, I don't know why, but every time we meet Mitch or whatever it is, say we go to dinner with him in Manhattan, it's like going to dinner with Larry David. Like chaos ensues. Right. Because there's always something that's wrong. Yeah. It's totally chaotic. Every time you're with them, suddenly the whole place is erupted in mad, chaotic scenes, for sure. Well, actually, I've got a New York City headline, and it does factor into this video, this viral video that we saw you of Max and Stacey, the twinning couple, responding and reacting to Jerome Powell's speech this past week. Well, there's the whole money printer go. The fact is you can't taper ponzi. But what's happened over the past few weeks and months is Jerome Powell has been trying to psych everybody out. Right? So in the spring, like April, May, they said they were going to buy all these junk bonds. And what happened? Junk bonds went soared, right? Like people went ballistic by piling in ordinary Robin Hoodters trying to buy junk bonds because they thought they were going to be like the hedge funds and frontrun the Fed. But no real hedge funds or private equity who have a private line to Jerome Powell did it because they knew Jerome Powell was going to step away from the market. And he did. But also, we see that the heart of the financial center of America, when they're just being sprayed with money and no real economic activity, we see just a total collapse happening in the real estate markets in America. And that's going to be, I guarantee you, within six to nine months, the taxpayer is going to start bailing out all of these REITs. This chart shows the number of turnstile entries, seated dining reservations, and how a popular New York City REIT is performing is, as far as I can tell, a darn good proxy of where New York City is heading. So we could just be mocking our friend Mitch Ferstein, who might, after he sees our reaction, like, not be our friend anymore. But the fact is he could be right? Because this is a collapse in all those, like, no activity on the New York subway, no activity at the restaurants, and the REITs are collapsing. This confirms what Mitch was reporting on his man on the street journalism citizen journalist. Mitch, this confirms what he was saying. Turnstyle entries. Right. This is a REIT. Right? Now, am I looking at this? Yeah, three lines there, and it's REIT turn style entries and food. You know, people sitting down for reservations at restaurants. Right. The ten day moving average. So it's up off the bottom, but it's still kind of scuttling around the bottom there so you can't sustain the economy. There's no V shape there. There's no V shape. It's an l. It's an L shape. And it's kind of an L heading, like an L heading slightly with a positive angular bias. But it's more L than anything else, which an L is for losing. Well, yeah, and part of the problem is you have the pandemic and the shutdown, which is restricting movement of humans around the earth. But you have things like this story out this past week with Finsen leaks, and New York City is one of the prime locations to launder your money. Right? So now Finn Send has to pretend to actually look at these SARS. What are the suspicious activity reports that they have to file? All bankers do it and to avoid any them getting fines or in trouble. So what. They do is they flood, like with all this paper money all over the place. They flood the Finsen, which is part of the treasury. The regulator is looking at money laundering. They flood them with these SARS. So they're looking at these suspicious activity reports and there's like tens of millions sent to the US treasury. And of course, what do they do? They've flooded with all of this money, these paper like reports, and nobody looks at them. It's just this vast, you know, kascis bureaucracy, because they just the banks just flood them like $10,000. That number was set, by the way, back in the 80s, so it's not that much money. And by the way, money launderers know you're doing that, right? So they instead buy Manhattan real estate or something like that. So we've had this situation now where the treasury and the regulators are overloaded with these pointless reports that just financially survey ordinary citizens and small business people and suppress commerce. Like they raise the cost of any commerce, right. It's more bureaucracy. Right. So bureaucracy gets in the way of commerce and it doesn't help anybody really stop the money laundering. Well, according to the Fence end report, no, the people who were now caught laundering and terrorist funding and the trillions, that didn't stop them whatsoever. Yeah. Well. Partly because what happens is if you have $5 billion that you've looted from an Eastern European nation. Right. What happens you go to your bank. One of these big major banks who. By the way. Helped write the money laundering laws so their lawyers can tell you exactly. For a fee of the 5 billion. We'll take a billion of your 5 billion and we'll launder it for you. And that's like a perfectly fine vig to pay, right? Anybody who wants to steal 5 billion, they're happy to give a billion of it over to somebody if they get away with 4 billion. These banks wrote the laws and they know exactly what they left out for their own clients, right? It's regulatory capture and it's gaming of the system. And there's a lot of humans involved. As I've explained on Wall Street before, the people who are responsible for regulation in the various offices are open to bribes. And that's true in every single layer of the financial stack that governs the American economy. ", + timestamp: '00:16:08-00:34:28', + topics: ['Larry David'], + type: 'podcast', + weight: 5.601966619491577, + }, + { + boost: 0, + date: 1647061200, + description: '[[Bitcoin Mining Incentives]]', + episode_title: 'WHY ARE WE BULLISH Kal Kassa Pierre Corbin Chris Smith Ben Gagnon ep243', + guests: [ + { + name: 'Chris Smith', + profile_picture: 'https://pbs.twimg.com/profile_images/1248417464825724928/BjsozM7k_400x400.jpg', + ref_id: '488a0f68-f24b-4d0b-9835-4b38a59f149e', + twitter_handle: 'chrissmithonair', + }, + { + name: 'Ben Gagnon', + profile_picture: '', + ref_id: 'd86128cb-056a-4233-bd95-cda98867f61c', + twitter_handle: '', + }, + { + name: 'Pierre Corbin', + profile_picture: '', + ref_id: 'a0a46e2e-1b24-4ce5-b34c-ca322067930a', + twitter_handle: '', + }, + { + name: 'Kal Kassa', + profile_picture: 'https://pbs.twimg.com/profile_images/1515885093893681156/cpZcX_2q_400x400.jpg', + ref_id: '5cf2cf3e-5cde-4426-b71f-f357195d40be', + twitter_handle: 'KalKassa', + }, + ], + hosts: [], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/bbf0a536-990b-49b4-a9c3-a2a40fa38f88.jpg', + keyword: !0, + link: 'https://anchor.fm/s/11e95d20/podcast/play/48924119/https%3A%2F%2Fd3ctxlq1ktw2nl.cloudfront.net%2Fstaging%2F2022-2-12%2F253272604-44100-2-dac52f14aaffa.mp3', + node_type: 'clip', + pub_key: '', + ref_id: 'f5449a66-a156-4b0a-abeb-6ff5e28434ac', + show_title: 'BTC Sessions', + text: "sure. So what I find very interesting about mining and house developing is just the incentives that are there for miners. Right. So it incentivizes the whole energy market to just become more green. Right. So it will put big miners at the center of this energy shift that governments have been supposedly pushing for years and also put them down the road at the center of the money creation. Right. Because we, of course, believe in a world where Bitcoin will be in the middle. And that's, in fact, maybe a question to you, Ben, is it already happening and to what point or when do you think could happen? The shift of rather than miners looking for the cheap energy and contacting energy producers, turning to energy producers, contacting miners in order to stabilize the grid and be able to leverage this cheaper energy themselves. Is there already this shift happening? Is bid farms being contacted already, or when do you see this really growing? Because I think this is when the hash rates will potentially increase even more. Right. Once these big players themselves get into this. Yeah, it's a great point. The vertical integration with the energy industry is really key. If you're thinking long term about Bitcoin mining economics and reward having every four years, obviously, unless the price continues to outpace the network by a considerable amount, you're going to have compressed margins. Right. And margins that get continuously smaller over time. So you're going to need cheaper and cheaper sources of power. And that can only really come from monetizing that energy that nobody else is using. So the vertical integration is here. We've been curtailing at some of our farms in Quebec since I think 2018, maybe even 2017. And at the beginning of this year, the program was so successful over the past couple of years, it was implemented across the entire province at every single mine. Texas is doing the same things. They have all sorts of curtailment programs for Bitcoin miners. And so it's really starting to enter into the mainstream space. You'd be surprised how many oil and gas companies and energy companies, power plant companies are doing their own small mining projects and pilot projects. These are massive companies. They don't need to press release something so small. They can do this under the radar. They can get comfortable with it. And I think what they're all learning or have already learned is that Bitcoin mining should be seen as like a buyer of energy or a buyer of last resort for your energy. And so energy is very interesting market energy is very easily stored, but electricity is not. And so once you've converted it into electricity, it's the flow of electrons. You can't really put that Genie back in the bottle. So cost effectively. And Bitcoin mining is a way to maximize utility and get all that full financial value out of it, which is a boon for everybody. It will reduce our costs, it will increase their profitability. It will incentivize more production, more development, more power generation, which should lead to increasing levels of human flourishing all over the world. Every time there's increases in power development and energy utilization, you have huge increases in human flourishing. I think this is what Bitcoin mining is really incentivizing. That's awesome. I wanted to share ", + timestamp: '01:04:37-01:08:18', + topics: ['bitcoin mining incentives'], + type: 'podcast', + weight: 5.523631239085138, + }, + { + boost: 0, + date: 1589889600, + description: 'Small business and the Fresh Start Commission', + episode_title: 'How to Address Regulations Suspended During the COVID-19 Crisis', + guests: [], + hosts: [], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/da1bbdc0-4d0a-43ed-8345-ee43102db244.jpg', + keyword: !0, + link: 'https://traffic.libsyn.com/secure/mercatuspolicydownload/MPD-038-PPIMCWebinar-v1.mp3?dest-id=655459', + node_type: 'clip', + pub_key: '', + ref_id: '55e562c3-41d2-4bfb-94d5-26ac7098ba2f', + show_title: 'Mercatus Policy Download', + text: "All right, very good. Look, another question here. As we all know, small businesses have likely suffered disproportionately during this public health crisis. Are there specific actions governments could take through this commission to help them recover faster. Elliot, I'm going to send that to you first. Yeah. One that Michael and I have been discussing and talking about is business licensing. For instance, if a business's license expired during this coronavirus pandemic during the month that we've all been working from home, do they have to re register? Do they have to re up? Should governments deem them granted for a certain time after to allow them enough time to re register or lift the burden to allow them to reopen faster? Another one is digitizing government. A lot of how you create a business and how you file your taxes is still largely done by paper. One area where governments can improve that is by digitizing government moving that online to catch up in the digital age. All right, excellent. Does anybody else want to comment on that in the small businesses? But the whole point of this is actually to help small businesses by making sure that, as she states, localities and the federal government have the right attitude going forward, that they try to encourage the rebound and encourage the growth without actually getting in the way. Okay, very good. Our next question. Can I just add on one thing? I'm not sure I would quite agree that the whole point is to help small businesses. I think that's the effect, though. I think regulation inadvertently disproportionately harm small businesses. So to whatever degree they can be cut back when unnecessary, that's going to similarly disproportionately help small businesses. And you could target that. There's no reason not to think that a commission could focus on regulations that are harming small businesses more. For example, regulations that came out of DoddFrank. I think the intent of DoddFrank was to target larger financial operators, financial service providers, but a lot of smaller banks, a lot of smaller businesses got caught up as sort of collateral damage. ", + timestamp: '00:20:54-00:23:11', + topics: ['small business', 'Fresh Start Commission'], + type: 'podcast', + weight: 5.479238152503967, + }, + { + boost: 0, + date: null, + description: 'How to recover lost Bitcoin wallet', + episode_title: 'Café ₿: #Bitcoin Beginner Q&A', + guests: [ + { + name: 'Peter', + profile_picture: 'https://pbs.twimg.com/profile_images/1581695667193643009/EljNY-TH_400x400.jpg', + ref_id: 'a3384925-e15e-421d-b9f9-6d44e273ed05', + twitter_handle: 'PeterAnsel9', + }, + { + name: 'Stephan Livera', + profile_picture: 'https://pbs.twimg.com/profile_images/1362551718110580740/v-W5Q2uo_400x400.jpg', + ref_id: '72f57157-c96e-4466-8bf1-290cfe1f8a0b', + twitter_handle: 'stephanlivera', + }, + { + name: 'Thomas J Lake', + profile_picture: 'https://pbs.twimg.com/profile_images/1529168328534769670/5cl2Y_k-_400x400.jpg', + ref_id: '21541a47-0601-447c-99c2-312d1a63c19f', + twitter_handle: 'thomaslake', + }, + { + name: 'Goodguy', + profile_picture: 'https://pbs.twimg.com/profile_images/1363216959576285185/unulY4yd_400x400.jpg', + ref_id: '0c3fec75-9cc2-4c0f-8dbe-db7fae2b585b', + twitter_handle: 'goodguybiker', + }, + ], + hosts: [ + { + name: 'Brady Swenson', + profile_picture: 'https://pbs.twimg.com/profile_images/1502564606836981763/fmqtNrNc_400x400.jpg', + ref_id: '49966553-d55b-44c9-94ec-8fee09eee5c2', + twitter_handle: 'CitizenBitcoin', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/239722cb-4216-414a-a17b-5adf9d52e15a.jpg', + keyword: !0, + link: 'https://stakwork-uploads.s3.amazonaws.com/uploads/customers/2707/media_to_local/35b20273-49f2-45ea-a9f4-dc479d86573c/7ae5315f-beb2-41e2-b672-65dd1f102017.mp3', + node_type: 'clip', + pub_key: '', + ref_id: 'df4ad67d-6316-4762-a7c5-884c162dd8a9', + show_title: 'Swan.com', + text: "very short. Point and then something about this afternoon switch spaces. So you hear the expression programmable money. And someone once said it about bitcoin. Many people said bitcoin is programmable money. And now you hear about central bank digital currencies and you hear programmable money. What's the difference? The difference is bitcoin is money that's programmable by you for your purposes, to the extent that it's programmable CBDC is money that's not programmable by you but is programmable by the government so they can make it disappear from your wallet, they can make it expire, they can make it not able to purchase certain goods. Bitcoin, to the extent that it's programmable for you, is like you can spend it however you want, you can put whatever constraints you want on it being spent. So it's a difference of who's in charge. It makes a really big difference. The other point I want to make is if you can get that afternoon thing with Brady, Sam and Alex, I'm sure it's going to be amazing. They got really awesome topics on there which are going to talk about freedom, I'm sure. So if you can make time for it, do I unfortunately can't, but I'll be listening to the replay. All right, let's keep rolling with the questions we have up here. Chad d Wagner. Good morning. Hey, good morning, everybody. This is kind of a newbie question. I've been working on getting my coins off the exchanges and getting it into some hardware wallets. The question I've been kind of struggling with is, let's say I'm using the Moon wallet and for some reason Moon. Goes out of business or is taken. Off the app store, something like that. So am I able to take my. Keys and apply those to a different. App or a different wallet and recover. Those funds or how does that work? Yes. So the short answer is moon wallet. Even if Moon were to disappear tomorrow, there is a recovery tool, and that's publicly available on their GitHub. Now, Moon is a special case, just to be clear. So for listeners out there, most bitcoin wallets are operating on what's known as a typical seed word, the recovery phrase. Twelve or 24 words basis. That's what most wallets are working on. Moon is a special case because they use a descriptor wallet. Basically, it's a bit of a technical term, but they use a set up where it requires a little bit of a special way to recover if Moon were to go down. So what you would need is your written down, back up, and also the recovery kit. So in the middle button on the bottom on your Moon wallet, you'll see a tab called security. You click that in that backup, you'll see there's a three step process. The first step is the username and password, but you don't have to do that in this case, we're talking about if Moon wallet disappeared. And so that second and third step, that second step is you're writing down kind of like a passcode for a descriptor. And then that third piece is the recovery kit PDF. You would have to combine those two in order to be able to recover your coins. Now, Moon wallet have a recovery tool that you can run. And what you would do is you would create another wallet, generate a receive address, then run this Moon Wallet recovery process and input as part of that, the address that you want to receive all of your Moon Wallet coins into. I know it sounds a little bit complicated, but what we're talking about here is if Moon wallet were to totally disappear, the other case is if, let's say, you just lost this phone and you needed to recover it into another phone, then it's a simpler process, you could just basically use Moon and import an existing wallet. Are you following me there? Absolutely, yes. That would go for any of the apps or hardware wallets. As long as we have our keys, we can recover it somehow. Correct? But yeah, just note that there's a difference in Moon and most of the typical other wallets. That's just the key differences for you to understand. So, Chad, one of the important things I think to understand here is that when you're creating a wallet on a phone, you're using a persistently connected Internet device. So I would always consider apps that you make on a desktop, on a website, in a browser, or on a phone, what we call a hot wallet. And there's all sorts of terms we hear industry use warm wallets and secure wallets and all sorts of funny things. But if it's made on a website, in a plugin, in a browser, on your desktop, or in a phone, it's a hot wallet. And so what that means is there's potential that your private keys, when you're creating those 24 words, that information may have been accessed by no click malware that we know now exists, like Pegasus from the NSO group and all these other types of persistent issues, zero days that exist in a lot of the browsers right now. These attack surfaces that people are using to take that private information from people's plugins. So if you're looking to store your bitcoin for a long period of time, I would always encourage people to learn about and use something like a nano ledger or a cold card. These are physical devices that have something called a secure enclave. They have a special chip that does that 24 word creation offline and then hashes that information and sends it back out to the computer. So these are a superior way of doing this. We used to have to sync the bitcoin, blockchain up, and then disconnect from the Internet and create the wallets. And we had hundreds of different addresses. The benefit of using that stick is you can make hundreds of different bitcoin addresses and they can all be backed up by those same 24 words in a really easy to use, standardized way that you could put in any other hardware wallet. And lastly, I would encourage people not to digitize their 24 words, their twelve words. Anytime you can keep those things in written format, you can etch them into things like metal for redundancy from floods and fire. I think that's a much safer way. I would never store those things in a cloud or take photos of those things or print those things off again, because that takes a cold wallet created in an offline situation and it introduces online or potentially online devices to it. So even if your printer is not connected to the WiFi network, right, I would be wary of using that due to exploits and things like that. So writing these things down by hand and keeping them in multiple safe, redundant places I think is really important too. The Moon Wallet is great as a mobile wallet, like for taking money around, but I wouldn't leave money in it as a store value. Yes. Thank you. I've been experimenting with the Sparrow on. The computer side and then I got the Cold card. So I've just been playing around with everything and really enjoying it. Very cool. Yeah, that's great. So definitely once you're ready, get the Cold card set up. And what you can do is just as an example, test it out with a small amount and then practice, like as an example, spin up your Cold card, initialize it, and then if you're able to do the Micro SD card with Sparrow Wallet or Specter, then that's great. If not, if you're a beginner, just plug it in and you can use it just like that. And then you can practice sending a small amount of Bitcoin and you can even practice like, wiping the seed out of the Cold card and then recovering your twelve or 24 words by using the import existing feature on your Cold card. And so that can sort of help you prove it to yourself that, wow. Yes. With these twelve or 24 words, I can actually recover my coins. But if you want to do that, just obviously practice with a small amount, like $20, $50, something small. And then see, prove it to yourself in that way. Oh, wow. These same twelve words, it deterministically creates that same ", + timestamp: '01:12:50-01:20:37', + topics: ['Programmable money', 'CBDC', 'Moonwallet', 'Bitcoin recovery', 'bitcoin'], + type: 'twitter_space', + weight: 5.435932159423828, + }, + { + boost: 0, + date: 1588968217, + description: 'Small intestinal bacterial overgrowth (SIBO)', + episode_title: 'Q&A: Kim & Dr Ken Berry', + guests: [], + hosts: [], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/a8e3517b-b44d-4270-adaa-57587896b1e7.jpg', + keyword: !0, + link: 'https://traffic.libsyn.com/secure/ketolifesupport/ketolifesupport-0033-q-and-a-with-dr-b_tc.mp3?dest-id=2479037', + node_type: 'clip', + pub_key: '032d7609ff3f4a5232e4d60967971e23bc671dfb68020845a59bab5dc1f3b93b87', + ref_id: '2bf2f8fe-9d2f-4d41-838d-787f2ca9734e', + show_title: 'Keto Life Support', + text: "SIBO, small intestinal bacterial overgrowth. What do you think about this? Some people make a huge deal out of this and they want you to buy all kinds of supplements and prebiotic fiber. Honestly, in my experience, eating a real whole food ketogenic diet, you repopulate your small intestine with the bacteria that should be there, because even the name of it implies that there shouldn't be any bacteria in your small intestine, which is absolutely not true whatsoever. But what you do want is you want very docile, tame, nice bacteria to be in your small bowel and eating the proper human diet, whether it's carnivore or fatty meat, heavy keto is going to repopulate your entire body, your skin, under your arms, your growing, all your spots that might have an odor or have gas or have bloating. All that stuff is just going to get better when you stop feeding and promoting the bad bacteria. My understanding is SIBO is when because your lower intestine is supposed to have a lot more bacteria, a lot more aggressive bacteria, but SIBO is when it switches it up and somehow the angry lower intestinal bacteria get your small intestine and vice versa. Is that right? That's the theory, but I'm not sure if I agree with that 100%. I don't know that that's ever been proven. It's very hard to get a scope into the latter part of the small intestine. We can get an EGD down through the stomach into the first part of the duodenum, but you have to swallow the camera capsule to photograph the rest of the small intestine. But you can't get a scope there to take a biopsy. The only way to get a biopsy of like, your jazzunum or your ilium is to do surgery. There's literally no other way to do it yet. And so even if you do a colonoscopy, you can only go to the sea, come and see the ileocecal valve. You can't get into the ilium any length at all. So when you start talking definitively about the bacteria in the small intestine, my first question would be, how do you know what bacteria is there? Because if you haven't had abdominal surgery, then there's no way to know what bacteria is in your small intestine. So one thing that just my common sense nondoctor self seems to know, though, is a lot of people who identify with having SIBO, they eat fermentable foods and they suddenly look nine months pregnant. Yes, that bloating, I think probably is the most common complaint of SIBO and whether that's coming from inflammation or whether that's coming from and this would technically be an infection, because you're saying that bacteria from the large colon is invading the small colon and that would technically be an infection, whether it's either one keto or carnivore is going to fix that. And you know, Kim, we have multiple friends who are carnivores who have actually had their gut bacteria or their colon bacteria checked and they have a beautiful distribution of the proper bacteria in their colon. And therefore, if you have good bacteria in your colon, there's no bad bacteria going to get to your small bag. Right? So people are asking, how long will this take to resolve? And the good news is, carnivore are more of a lifestyle, so you have plenty of time, but I think they would like to discomfort sooner. So, do you have any tips? Yeah, so my experience in the clinic has been six to eight weeks of fatty meat, heavy keto or carnivore and you're going to be pretty much symptom free. And you got to remember, and so for some very few people, it's coffee. Coffee is what's causing the inflammation in the gut. Tea can do it as well. And so when I say beef, butter, eggs and bacon and water, that's what I mean, because if you do that and you're still drinking coffee and tea, then you don't know, especially if your symptoms get no better, then don't come at me and say, hey, I tried your diet and it didn't work because you're still drinking coffee and tea. And I love coffee and tea. I know that would suck. But at the same time, it also sucks to have these conditions we're talking about. And so each and every one of us gets to decide, do I want to do that or not. And so I'm just saying this is a viable logical option to try. And if you don't want to do it, then eat whatever and suffer the consequences. But if I have one of these conditions, I would think that I would do that. Now, one thing I have noticed is there do seem to be of the issues that people might have. Some people do have a sensitivity to eggs or especially egg whites. Do you think it might be worthwhile. To leave those also very rare. Not really. It's very rare. And so if you've done three to six weeks of the beef, butter, eggs and bacon and you're still having problems, then I would say let's leave out the egg whites and just eat the yolks and see what that does. But yeah, that would be about the only thing on that diet that could potentially cause a problem. And I'll tell you, Kim, I would predict if you had removed all those foods, even if you were in the past sensitive to egg whites, you would no longer be sensitive to the egg whites. So many people think that these food sensitivities are permanent and they're not permanent. They're not necessarily permanent. When your immune system calms down and stops being pissed off at the world, it tends to stop reacting to things that it used to react to. For example, back when I was eating crap, if I got within 100 yards of ragweed or cat dander, I would be this for two weeks, right? And now I could lay in a field of ragweed and pet dirty cats all day long and I might sneeze one time. So what happened there? Why am I no longer allergic to these things that literally used to put me in the bed? I had such an allergic reaction, my eyes would swell up. It's because my immune system is now able to discern me from nonme. And I think so many times when people are allergic to tree nuts, when they're allergic to things that are like completely ancestral, that's usually what's going on. And once they get all the inflammatory crap out of their diet, their immune system over the course of a month to three months will calm down and they can reintroduce those foods and they no longer are troubled with that. Got it. Someone asked ", + timestamp: '00:19:40-00:26:23', + topics: ['SIBO', 'small intestine'], + type: 'podcast', + weight: 5.423373699188232, + }, + { + boost: 0, + date: 0, + description: 'Thoughts on the over all chapter and some favorite quotes', + episode_title: 'The Sovereign Individual - The End of Egalitarian Economics', + guests: [ + { + name: 'chriskapilla', + profile_picture: 'https://pbs.twimg.com/profile_images/1362817539135463427/2AXUeFLV_400x400.jpg', + ref_id: '9d495790-93f2-4d6c-b770-b2885f66859d', + twitter_handle: 'chriskapilla', + }, + { + name: 'remydenton', + profile_picture: '', + ref_id: '5c5beb0c-c214-4f23-b79a-e71bf9368f2d', + twitter_handle: '', + }, + { + name: 'JackRonaldi', + profile_picture: 'https://pbs.twimg.com/profile_images/1583261828628496384/IazkwYjk_400x400.jpg', + ref_id: '01621476-f040-49dd-8160-4035228faf78', + twitter_handle: 'JackRonaldi', + }, + { + name: 'AlistairZ80Aftw', + profile_picture: 'https://pbs.twimg.com/profile_images/1362882489895841795/gH2zix3l_400x400.jpg', + ref_id: '3dcba197-47ca-40c0-857d-73cec4325801', + twitter_handle: 'AlistairZ80Aftw', + }, + { + name: 'mattonbtc', + profile_picture: 'https://pbs.twimg.com/profile_images/1549459254280687618/jzdHJou3_400x400.jpg', + ref_id: '998167d3-e036-4ef1-9a05-4f062903f0c5', + twitter_handle: 'mattonbtc', + }, + { + name: 'wai_wairua', + profile_picture: 'https://pbs.twimg.com/profile_images/1536570699761848320/T10Owc60_400x400.jpg', + ref_id: 'c4d4ff36-73fa-4471-91ba-de0f99a49e99', + twitter_handle: 'wai_wairua', + }, + { + name: 'UltraSolomon', + profile_picture: 'https://pbs.twimg.com/profile_images/1468332451055427601/YVgUuUHc_400x400.jpg', + ref_id: '6371d519-cc98-4bf4-9f82-be17b1ea532a', + twitter_handle: 'UltraSolomon', + }, + ], + hosts: [ + { + name: 'BTC_Venetians', + profile_picture: 'https://pbs.twimg.com/profile_images/1557482467539521537/Kel-eVww_400x400.jpg', + ref_id: 'a6313ca9-3869-4477-88ad-30172957edcf', + twitter_handle: 'BTC_Venetians', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/75ec86b1-cb6d-467f-a66e-5e642e5c126a.jpg', + keyword: !0, + link: 'https://stakwork-uploads.s3.amazonaws.com/uploads/customers/2707/media_to_local/c8cc9ec1-061d-4f53-a24b-ee43a56c7715/e650057e-2369-4e75-8119-4975a1fc4cac.mp3', + node_type: 'clip', + pub_key: '03eb026c3e6597055595e42299377a4e164982775cc67f1d2135d9f1cd3a89f526', + ref_id: '946f1308-fffb-4aeb-89b2-68b043873ae2', + show_title: 'Bitcoin Venetians Book Club', + text: "right, let's kick off with the first question. What did you think of the chapter overall and any favorite quotes? I think my first one first favorite quote was headline in there. The higher returns in poor areas on, well, 242 somewhere around there. Bitcoin City makes me think of that. El Salvador makes me think of that. This isn't a quote, but just as an idea. I love their little section about how Hollywood production companies work, being a template for future companies. That really made it more concrete what they were talking about. Yeah, I thought that was interesting, especially with the benefit of hindsight how we've seen simultaneously, like, megacorporations arise, but also the Internet has enabled the scale of business to be really small. All over Twitter, I see like Solopreneurs that are bringing in like tens of thousands, if not hundreds of thousands per month. And like they're just using all these different, like, lowtext tax all over the Internet to do their thing and by one person can just like, make a decent living that way. But then there's also a lot of other people that are just kind of stuck as wage slaves or whatever in the big corporations. Another quote I've got there is the genuine upsurgeon opportunity is almost inevitably accompanied by at least a brief surgeon inequality. And that seems to speak to people here. Dr. McCall would like that one, I think, but I don't see her here also regulations having a positive rather than negative market value. Or if Peter McCormack was here, he'd probably agree with that too. Well, I think that's quite interesting because it talks about sort of a marketplace for regulation so you can actually find out in an experimental sense which regulations are important for a good functioning society rather than just being as a means of extraction and coercion the regulations that you opt in if you're far more mobile globally. I actually saw an interesting post about this recently and it was kind of along the ideas of having a sunset clause for new laws saying that a new law should perhaps have a start and an end date, but also saying that similar to a scientific hypothesis or theory, that you make a new law and it says it's going to achieve XYZ and you measure against that and within a specific three year time frame or whatever is necessary. If it hasn't achieved that, then the law is revoked. And I thought that would be a very interesting way to do things. It's quite competitive if a few different countries were doing that against each other. Yeah, I love that. That's kind of like how product management works and startups. You make sure you have metrics that you're collecting to check what's the response to whatever you're trying to do and if the response is not what you want or what do you expect, you kind of pivot. You try something else. Which I think would be great if we can bring something like that to politics and lawmaking, you can just imagine. Sorry, go ahead. Sure. I was just going to say one of the really interesting parts of this chapter is talking about how there will be competition between jurisdictions in a way that there's not or there hasn't been previously and that that alone will sort of create this incentive to be more efficient in whatever format that takes. So jurisdictions can operate a little bit more like companies do today and less like just total monopolists as they are currently. Here is one quote that I did like. In the post industrial period jobs will be tasked to do, not something you have. Could you read that one more time? Sorry, yes. In the post industrial period, jobs will be tasks that you do, not something that you have. Do you think that's similar to how you have like bounties for coders? Do you think that's what the quote is getting at? I think that's exactly it, yes. I took from that that people won't have careers. Well, it depends on how you define career. I guess if a career was a succession of tasks that were related then it could still be a career but they wouldn't have permanent lifetime jobs. Yes, a career was a succession of tasks for a single wall employer or within the same part of an industry. Whereas the succession of tasks sounded a lot more like piece work or gig work in the modern part. Yeah, I think gig work is probably close. Yeah, I think we'd probably find out where it makes sense for something to be a salaried position where the benefits from that obviously they make the relationships, they have all that continuous local knowledge where that makes sense from an economic perspective and where actually it's just labor laws which are making that the case at the moment. And actually it would be far more efficient to farm it out on a piecemeal basis. I think that's an important point. I think the book maybe to keep it shorter doesn't go into the opposing argument as much, but I think anything where you're facing with people, it's probably useful to have kind of the same person in the role. But also like even I'm not a coder, but I would imagine that having the same person work on the same code base would be useful over a long period of time because they kind of know what's going on rather than having multiple people kind of going in there and doing piecework. As somebody who is a coder, I can completely agree with that. There's kind of this fallacy, I think that you can just replace one programmer with another when in reality it's not about the writing of the code, it's about the understanding of what's going on in the code which takes a lot of time to acquire and also kind of this ownership over what the code does. So, long story short, I agree that there are multiple industries and types of jobs where replacing people just willy nilly is probably not the best idea. I think I'll little bit on that with Remy because I'm also a coder. But open source, generally somebody in a corporate environment, it should be the same coder all the time or the same pair because that's where the corporate knowledge resides. But in open source you have so many different people looking at the same set of code, they do become a bit interchangeable and you do end up with documentation about how new people should approach a project. So it depends like most things. Yeah, great point. Did anyone get the sense that I don't know much about the authors, but they seem like they have libertarian tendencies. And it seems like that kind of comes out in the book to me, because some of the stuff that they talk about how the idea and the pursuit of equality as a goal is going to go away in this digital age. And I wonder how much of that is like they've come at that logically and how much of that is what they want because of a certain view of how things should work. A few episodes ago there was one of our number who posted a BBC interview on James Dell Davidson and Reese Mogg. I don't know if you heard that, but it gives you an awful lot of background. Very libertarian tendencies. Very libertarian tendencies. ", + timestamp: '00:09:33-00:19:19', + topics: ['The Sovereign Individual - The End of Egalitarian Economics'], + type: 'twitter_space', + weight: 5.396452784538269, + }, + { + boost: 0, + date: 1636866e3, + description: '[[Lightning]] and [[Bitcoin]] Have Actual Use Cases', + episode_title: 'WHY ARE WE BULLISH JoeyTweets Mario Gibney Bobby Shell Len ep215', + guests: [ + { + name: 'Bobby Shell', + profile_picture: 'https://pbs.twimg.com/profile_images/1090426395979890690/uUdaFXo__400x400.jpg', + ref_id: '438f8067-3fed-49d2-91d9-5018cb043aac', + twitter_handle: 'BobbyShell2', + }, + { name: 'Len', profile_picture: '', ref_id: '1fc627d9-a446-4e48-b960-ad97fcdbcaa0', twitter_handle: '' }, + { + name: 'Mario Gibney', + profile_picture: '', + ref_id: '1a3f05f5-5c4a-455f-b4ec-f682080a5518', + twitter_handle: '', + }, + { + name: 'JoeyTweets', + profile_picture: '', + ref_id: 'e6ada141-9c3c-4e1b-b8ab-2389c94f4130', + twitter_handle: '', + }, + ], + hosts: [], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/f3b67780-d9c2-4a20-ab5c-115032a05b3a.jpg', + keyword: !0, + link: 'https://anchor.fm/s/11e95d20/podcast/play/43334718/https%3A%2F%2Fd3ctxlq1ktw2nl.cloudfront.net%2Fstaging%2F2021-10-14%2F0bfc842d-3fe7-98e0-1a25-43385ac48a7d.mp3', + node_type: 'clip', + pub_key: '', + ref_id: '3242aa43-f999-485b-9c94-8457526d6dbd', + show_title: 'BTC Sessions', + text: "run a Lightning note and I too am hugely bullish on Lightning. I can see the potential in using it for quick and cheap settlements and having somebody like Jack Dorsey also on board too, and implementing it on Twitter. That's a freaking amazing idea where you could tip people for ideas for tweets or whatever. And it just goes to show you that Lightning or Bitcoin itself. There's an actual case, use. It's not just strictly an asset where you park your money. It's also a currency you can use to spend. And Lightning is the way that you could easily spend Bitcoin. One thing that's really interesting to me, too is like, you buy Bitcoin and it appreciates in value. But to us, one Bitcoin is one Bitcoin, right? Like, what if you never actually spend it and you just use it for data transmission? Do you really owe taxes? You didn't buy anything with it. You're just using it as a data tool. I think that's going to become a conversation later, but it's way too premature to really talk about that. How much Bitcoin would you really need to have to utilize that? Right? I don't know. It's tough because I don't know exactly how they're utilizing these rails for this infrastructure that they're building with, like, impervious and a lot of these concepts. So I don't know. I couldn't really comment to that point. But it is one thing, again, from the content creator perspective and to the point about Twitter, it kind of. Sets. Itself in the middle of those intermediaries that were typically taking a cut of any type of revenue that you used to get. In particular, I'm looking at your YouTube that we're on right now, that ad revenue is what keeps a lot of people afloat. And all of a sudden you can introduce revenue sources that are very easy to utilize and kind of almost like bypasses what YouTube is trying to do in taking their massive cut of everything. So I find that to be interesting. They very much try to get you using super chats and stuff like that. But when there's a simple way of like, oh, I can just drop a tip here, and that begins to proliferate through lots of other alternative platforms, at what point do enough people say, well, I'm going to go through this method of this method. At what point do some of the bigger players start saying, Well, I guess we better put this in here because there's a huge demand for it and albeit small at first, we're losing some market share because of that. I don't know how that affects that moving forward. No, it would definitely be groundbreaking in that regards. And it would certainly shake like the YouTube to the world, et cetera, not just to change gears, but there's another application that Lightning would truly thrive in, and it's the world of restaurants right now, a lot of transactions that are done in restaurants are done through Visa, Mastercard, and they take their slice of the pie one, two, three, 4% every time the card is swiped. And from what I understand, restaurants, they have a very thin margin for profit. And if you're able to increase the profit by taking away that one 4% that Mastercard and Visa do, then you can make businesses way more profitable. And it's just simply just implementing Lightning on the current system, it's easier said than done. But once it's able to be implemented in restaurants and you're able to pay for your meals with Lightning, it's going to make profits just shoot through the roof for a lot of these small businesses. Did you see? I think it was Ben Ark. ", + timestamp: '00:51:21-00:55:28', + topics: ['lightning', 'bitcoin', 'bitcoin', 'lightning'], + type: 'podcast', + weight: 5.393006804006006, + }, + { + boost: 0, + date: 1640926800, + description: 'What Kind of Wallet Am I Going to Use?', + episode_title: 'WHY ARE WE BULLISH Tone Vays Jaime Garcia Trent Dudenhoeffer KC Hodl ep225', + guests: [ + { + name: 'Tone Vays', + profile_picture: 'https://pbs.twimg.com/profile_images/1416821178266787844/T1OkI9ZW_400x400.jpg', + ref_id: 'da6fc991-7080-461c-86e3-4ac18c2f413d', + twitter_handle: 'tonevays', + }, + { + name: 'KC Hodl', + profile_picture: 'https://pbs.twimg.com/profile_images/1506986051683950592/MMMse9gr_400x400.jpg', + ref_id: 'b2264dd3-e587-403e-9447-9e99afc1910d', + twitter_handle: 'kc_hodl', + }, + { + name: 'Trent Dudenhoeffer', + profile_picture: '', + ref_id: '3b466176-3bbc-481d-9634-e127a9232404', + twitter_handle: '', + }, + { + name: 'Jaime Garcia', + profile_picture: 'https://pbs.twimg.com/profile_images/953009048642715648/PKaQy5UD_400x400.jpg', + ref_id: 'f259c6b5-71d6-4c5c-897c-3cfbe80cccc2', + twitter_handle: 'jaimegarciag', + }, + ], + hosts: [], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/c8ae0def-c33c-4d17-af4e-31ddaeedaf8a.jpg', + keyword: !0, + link: 'https://anchor.fm/s/11e95d20/podcast/play/45510131/https%3A%2F%2Fd3ctxlq1ktw2nl.cloudfront.net%2Fstaging%2F2021-11-31%2Fc821a6ba-7ef1-35ba-b24e-b96e84186843.mp3', + node_type: 'clip', + pub_key: '', + ref_id: 'd9b2af2b-2bf8-477f-9cde-dd27660ddde7', + show_title: 'BTC Sessions', + text: "am I going to use? Things like that. What are you seeing there? Definitely, yeah. Usually the first thing is which kind of mobile wallet should I use first for a small amount. And now there's so many great options over the last year, especially with the Lightning wallets coming out. Blue wallet, moon, so many great options. Usually people like to play around there, kind of get their comfortability up and then go to an actual hardware wallet of some kind. So, yeah, it's always fun to talk about the benefits and disadvantages of each wallet, whether it be a treasure, a ledger, a cold card, so many different ones. And I think a lot of times people just order kind of whatever's cheapest usually has been kind of what I've noticed and try it out and then kind of figure out what they like and don't like about it. And then when they get ready to go to the next step, they kind of have a little bit of familiarity with the different options. So I've got ", + timestamp: '00:16:43-00:17:37', + topics: [], + type: 'podcast', + weight: 5.371685059434086, + }, + { + boost: 0, + date: 1640066400, + description: 'What types of small shift in characteristic can make major changes', + episode_title: 'Diana Jones: The New Management Model — Guarding Group Relationships', + guests: [], + hosts: [], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/f2b2a2b2-8869-4256-94b9-a91c91c1ce7e.jpg', + keyword: !0, + link: 'https://dts.podtrac.com/redirect.mp3/cdn.mises.org/148_e4b_diana-jones.mp3', + node_type: 'clip', + pub_key: '', + ref_id: '10cc2a43-918c-477f-a29c-de6fa5ddc79e', + show_title: 'Economics For Business', + text: "That's one of the challenges, I think, with systems thinking that you get confused about causality. Maybe there is no causality, it's just a lot of things interacting together and the outcome emerges. But you do say that small shifts can generate major change. If we've done everything else right, you qualify it. But are these small shifts like reading people better? Is that the kind of small shift that can generate a major change in the system? I do think that there's several things I think becoming more skilled and understanding how groups work. And if you read my book, it's a complete handbook on how groups work for leaders. And the thing when you read any book is to take several things from the book and practice them and then notice the impact and you'll see things rapidly. But the small things are like the shift for leaders to move from being meeting managers where they're focused on their content and like getting on with stuff, to actually being guardians of group development, particularly in the first four minutes. That the second is for probably everyone to shift from being so focused on content to being very mindful of what is the purpose of the interaction or any meeting and what is the outcome you want. So many people just don't know why they're at meetings, they don't know why they're talking about stuff because the purpose and the outcome has just been lost, gone, forgotten. And it's such an opportunity for leaders to tune into if we have this conversation, the dramatic impact out here is going to be A, B and C and that's what we want. So shifting from content to purpose and outcome, which means the conversations shift from explaining and describing stuff to enabling people to participate in bringing expertise and experience from the group. So those are the things I'm talking about. And on my website, under Leadership levers, I've got two complimentary downloads that people can just they don't need to put their email in, they can just take them around the shift for the first four minutes of any meeting if you want to really generate engagement and participation. So those kinds of shifts, and it's mostly leaders shifting away from being focused on their own content and expertise and drawing that out from others. That's the basis of it. It's easy for me to say, but it does require people to give up some things, give up being the know it all expert or knowing when to use it, but not that to be the main orientation. I find when trying to apply systems thinking in business, one of the steps is you've got to discard a lot of things that you used to know, used to do, like hierarchy and command and control and things like that. You can actively discard those in order to be able to get into the new place. ", + timestamp: '00:44:48-00:48:09', + topics: ['small shift'], + type: 'podcast', + weight: 5.31725980650619, + }, + { + boost: 0, + date: 1675274375, + description: 'The importance of education about taxation and small government ', + episode_title: 'Is Sound Money the Answer? with George Gammon (WiM268)', + guests: [ + { + name: 'George Gammon', + profile_picture: 'https://pbs.twimg.com/profile_images/1246550014450700291/2n_iHigp_400x400.jpg', + ref_id: '7ca1bc4f-3a57-4a6a-bedf-ef47a8b37297', + twitter_handle: 'GeorgeGammon', + }, + ], + hosts: [ + { + name: 'Robert Breedlove', + profile_picture: 'https://pbs.twimg.com/profile_images/1592020087044591616/46enYwAc_400x400.jpg', + ref_id: '0ed69c56-241c-4b63-87a5-8f2157fe51a5', + twitter_handle: 'Breedlove22', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/ca3ab815-dc2e-408a-a0c5-8bbe50270a97.jpg', + keyword: !0, + link: 'https://cdn.simplecast.com/audio/2effec98-bec5-4728-ba08-7a86d776e682/episodes/d6e8f010-e2d5-4489-bb8e-9b7446a4795b/audio/0ad4fb89-2eda-4ad7-8432-b6be08c8ce10/default_tc.mp3?aid=rss_feed&feed=MLdpYXYI', + node_type: 'clip', + pub_key: '03a3451db4748e483d2e1ee5d0b3a6872253253b57edf4b084a56952b432a224b3', + ref_id: 'd8d7f0d9-d40b-4431-8f02-f8bf15823175', + show_title: 'The "What is Money?" Show', + text: "And so then that's what kind of leads me to the conclusion that, wait a minute here. Sound money is definitely desirable, but if we're putting 100% of our energy on this as though that's a panacea, that's a big mistake. And if I have to allocate 100% of my if I've got 24 hours in a day, and so I've got 100% of my mental bandwidth, you know, if I really want to move the needle. As far as our shared objectives, for me, I come to the conclusion that that it it's more beneficial for me to allocate 90% of my time and energy to trying to persuade people that we need small governments, we need low taxation. And then 10% saying that, hey, sound money is definitely beneficial, definitely desirable, as opposed to what a lot of people would do is they allocate 90% of their time and energy saying, well, sound money, sound money, sound money, sound money, sound money. Because we get sound money, then everything else just falls into place. And again, especially when you look at the amount of government spending that we have today just as a result of taxation, just to forget the deficits, forget the deficits just as a result of taxation. I think you've got to come to the conclusion that a society, even with a fixed base layer, if they favor big government, you're going to get big government because people just vote free stuff. And I think that the overriding theme in what I see when I study history is it's just the same thing. It's like this cycle that we can't get out of as human beings where hard times create strong men and strong men create good times, good times create weak men and weak men create hard times. It's just over and over and over and over again. And so I truly believe that right now we're in a period of kind of weak men, if you will, but I think that we now have the internet and we now have a lot of tools that we didn't have before. And I can either sit here and just wave the white flag and say, oh, we're all doomed and we're just going to have to go through this cycle. Fourth, turning, whatever you want to call it, or I can get out there and try to pound the table for small governments with the help of the Internet and allocate as much of my mental bandwidth as I can towards that to try to impact positive change. But that's really my message, you know, is that I think that as a collective group, we're going to be a lot more successful in achieving our objectives if we allocate 90% of our time to persuading people the benefits. Of small government instead of trying to persuade them that sound money is the way to get to that small government type of environment that we're trying to strive for. I think that's kind of we can rip on that. But that's kind of my main message. Yeah, no, that's really well said. And again, to reiterate, we're basically saying we have the same ends in mind. The end, absolutely. Smaller government, less government interference in the market process. In the market process. Lower consumer prices as a result of economic productivity. Yes, exactly. So the more uninhibited the market process is, the more consumer price deflation it will create, right. Through trade, innovation, just trade and innovation basically more high intensity, higher intensity trade, more innovation, gives you lower prices. Government intervention is opposite to that. Right. That's actually interfering with the market process tends to create consumer price inflation. So the end in mind is to minimize government interference in the market process as much as possible. Where we're, I guess, exploring is what's the appropriate allocation of mental energy towards the means to achieve that end, right? Is it all sound money? Is it all advocating for education or persuasion, let's say, in the minds of people about small government, or is it a mix and to ", + timestamp: '00:24:27-00:29:24', + topics: ['Tax education', 'sound money', 'small government'], + type: 'podcast', + weight: 38.492371921380055, + }, + { + boost: 0, + date: 1673685e3, + description: "What's required to force Genesis into bankruptcy  ", + episode_title: 'The Chopping Block: Why Gemini Users Are Mad at Genesis and DCG - Ep. 443', + guests: [], + hosts: [ + { + name: 'Tarun Chitra', + profile_picture: 'https://pbs.twimg.com/profile_images/1587539091444432897/Z6_nmrCB_400x400.jpg', + ref_id: 'dfad4b23-92ff-4aa1-9aa4-abc1d54cd6d3', + twitter_handle: 'tarunchitra', + }, + { + name: 'Haseeb Qureshi', + profile_picture: 'https://pbs.twimg.com/profile_images/1581025415551889408/thQwG4lb_400x400.jpg', + ref_id: '790e4217-dd9f-416f-b9f8-ed596937f5b5', + twitter_handle: 'hosseeb', + }, + { + name: 'Tom Schmidt', + profile_picture: 'https://pbs.twimg.com/profile_images/1563232354277085189/xQL92DR4_400x400.jpg', + ref_id: 'bc9d3bfd-36b0-4cbc-a491-9370decf4c99', + twitter_handle: 'tomhschmidt', + }, + { + name: 'Robert Leshner', + profile_picture: 'https://pbs.twimg.com/profile_images/1587956987786104833/1SiKVj-s_400x400.jpg', + ref_id: 'ebaa2166-7982-423d-9f43-add89e7d47f9', + twitter_handle: 'rleshner', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/7de0d293-8ae3-4362-8500-8f7300f3fe41.jpg', + keyword: !0, + link: 'https://traffic.megaphone.fm/LSHML4726349989.mp3?updated=1673643857', + node_type: 'clip', + pub_key: '02545c14cbb18a61f20dd45f5e3dcbd9acae3de282369501040adce32a75311309', + ref_id: 'a24f0efb-66be-40a2-afa2-bf29f370b10d', + show_title: 'Unchained', + text: "a mutually yeah. You could almost perform like a bribery attack where you're like, hey, if you got if the rest of the creditors don't give us the money, like me and two of my friends who are like small fry creditors are going to go push Genesis into bankruptcy and screw everyone else over. It does seem like an unstable it does seem like an unstable equilibrium. Well, I think the reason why it's more stable than that and this is I'm not, you know, an expert in restructuring law or any of that, but what I think makes it a more stable situation that prevents that is that any resolution has to be done equally amongst the various creditors. So you can't have like three creditors who like threaten them with some ultimatum and say, give us all our money. Back or read oh no, I'm not saying threaten the company, I'm saying threaten the other shareholders. That might be legal. I'm pretty sure that's extortion, but you know, there's maybe some way you can structure it. Yeah, but anything has to hold up, right? ", + timestamp: '00:12:38-00:13:43', + topics: ['Genesis', 'bankruptcy'], + type: 'podcast', + weight: 25.351043899322917, + }, + { + boost: 0, + date: 1533945600, + description: 'Government subsidies and small business', + episode_title: 'Government and Big Business | Peter G. Klein', + guests: [], + hosts: [], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/58189b3c-aa25-408d-8c5e-76f97c9501da.jpg', + keyword: !0, + link: 'http://www.podtrac.com/pts/redirect.mp3/feeds.soundcloud.com/stream/335241913-misesmedia-government-and-big-business-peter-g-klein-1.mp3', + node_type: 'clip', + pub_key: '', + ref_id: '58c66464-fdd6-4f04-848b-f98021c4089c', + show_title: 'Mises University 2017', + text: "are direct subsidies for small companies, especially in the tech sector. Governments build science parks and fund Incubators. And the SBIR program, which gives cash to tech startups, you have lots of indirect subsidies as well. So if we're going to say that subsidized interstate highways constitute gives sort of an unfair advantage to Walmart and Amazon, then we would have to say that subsidized electricity, subsidized telecommunication services give an advantage to small firms that are able to be in some small town, right? If it weren't for electricity subsidies, maybe you couldn't afford to live in Auburn, Alabama. You'd have to live in a big city that has a big nuclear plant. Okay? And the only reason a little startup company can be in Auburn, Alabama, or wherever is because they have access to the Internet and they have access to they can make phone calls, they can get electricity off the grid. All of those things are subsidized by the state just as much as the road system. So it's not clear that the kind of Kevin Carson argument makes any sense specifically favoring one type of firm over another. Okay? More generally, think of what the government does to the economy, to society, right? I mean, restricting trade and starting wars and controlling the education system and so forth makes us all much poorer than we otherwise would be. And the massive scale of government intervention around the world, it requires the international division of labor, reduces stocks of human capital, if you want to use that language. It makes us all dumber than we otherwise would be if we didn't have state control of education. Reduces the marginal product of labor in many contexts, right? So, I mean, all of these things it might be that if we had a free society and we had better education systems, better transportation communication systems, maybe the economies of scale and scope and production would be even larger than they are now. Maybe we'd see bigger firms than we see now if we were to get rid of the state and all of its harms. So ", + timestamp: '00:37:00-00:39:18', + topics: ['government subsidies', 'small business', 'subsidies'], + type: 'podcast', + weight: 5.2884098291397095, + }, + { + boost: 0, + date: 1665118800, + description: 'Smaller states offer more opportunities and promote decentralization', + episode_title: 'Breaking Away: On Secession and Small States', + guests: [], + hosts: [], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/6ec51741-3d93-4116-a619-d62a7cee1feb.jpg', + keyword: !0, + link: 'https://dts.podtrac.com/redirect.mp3/cdn.mises.org/102-radiorothbard-20221007.mp3', + node_type: 'clip', + pub_key: '', + ref_id: '56ded69f-9178-41fb-a466-b3f270175343', + show_title: 'Radio Rothbard', + text: "Rockwell summed up this principle in a 2005 article called What We Mean by Decentralization. Rockwell writes under decentralization jurisdictions must compete for residence and capital which provide some incentive for greater degrees of freedom, if only because local despotism is neither popular nor productive. If despots insist on ruling anyway, people and capital will find a way to leave. This is most fully realized, of course, by the type of decentralization that results from fullblown secession. As Rothbard put it in 1977, secession means greater competition between governments of different geographical areas, enabling people of one state to zip across the border to relatively greater freedom more easily. Now, of course, the idea would be you wouldn't have to physically relocate to escape despotism. But we don't live in that ideal world. We have to work with what we have. And the fact is, governments like to abuse rights. So the question is do we want governments that are huge and control vast swaths of land that require us to move thousands of miles to escape them? Or do we want something smaller where exit is much easier, albeit still not without cost? And of course, keep in mind that in a world with only one state and no secession, there is no escape at all, ever, anywhere. We've seen this issue of exit in the modern world. Of course it's true in countless refugee situations where the most oppressed people are only able to save their own lives by fleeing across an international border. We saw it in Venezuela over the past decade when Venezuelans, desperate for food, had to escape across an international border just to get basic necessities. Thank goodness that border was there and limited the reach of the Venezuelan regime. Exit was possible if only the Venezuelan state was even smaller and the people of that region had even more options for bordering states into which they might exit and escape. Historically as well, we know the concept of exit has been an absolutely key factor in how the west roast to achieve the highest standards of living in the world has ever known. As historian Ralph Reyko has noted in his essay The European Miracle, the fact that Europe has been so decentralized throughout its post Roman history, in contrast to the huge empires of the east, meant that entrepreneurs and capital could indeed escape across Western Europe's countless borders in a highly decentralized Christendom. This was especially the case in Europe's Middle Ages. And as historians Nathan Rosenberg and Ellie Birds will note in their book how the West Grew Rich, it was in these highly decentralized Middle Ages that the institutional groundwork was laid for Europe's economic miracle. Similarly, historian Jean Bay Schuler showed this in his research and he concluded the first condition for the maximization of economic efficiency is the liberation of civil society with respect to the state. But how did this liberation occur which led to the success of markets in Europe? Bayflair tells us the expansion of capitalism in Europe owes its origins to political anarchy unquote, that is, to the existence of a large number of small states without any overriding imperial or state power. Not since Rome has Europe been unified under a single government. And that has meant more freedom and more economic growth. One reason this works is that a region of the world or region or world of small states is more difficult to even. It's even difficult to even attempt autophy. So for a private entrepreneur, moving one's capital from one place to another does not cut off one's access to markets outside the borders of a small jurisdiction. Small states and principalities have always experienced big incentives toward doing business with surrounding states. This means more trade. It means more efficient markets. Opponents of secession and breaking up states are often opposed, however, on the grounds that smaller states will throw up trade barriers and be more inclined to violate rights. The reasons for this assumption aren't actually clear, but they are common objections. On the contrary, small states want to attract capital, and it shows. This is why efforts to impose a single global minimum tax tend to meet the most resistance from smaller countries like Ireland and Hungary. As is the case nowadays, having lower taxes is a major way that small states attract wealth. Moreover, in modern times, the empirical evidence supports the idea that small states tend to be more open to free trade, more open to a free flow of labor, more open to lower taxes. For example, Sergio Costello and Truatomozawa conclude in their study on small states that in a world of specialized and growing trade, quote small economies naturally grow more trade oriented in both exports and imports. Ceteris paribus small nations thus become more trade focused than large ones. Unquote economist Gary Becker in 1998 noted, quote since 1950, real per capita GDP has risen somewhat faster in smaller nations than it has in bigger ones. Becker concluded that the statistics on actual performance show that dire warnings about the economic price suffered by small nations are not all warranted. Smallness can be an asset in the division of labor in the modern world, where economies are linked through international transactions. Of the 14 countries with populations over 100 million, only the US. And Japan are wealthy. William Easterly and An Ard Cray conclude from their own study on small states controlling for location, smaller states are actually richer than other states in per capita GDP. Microstates have, on average, higher income and productivity levels than small states and grow no more slowly than large states. So it turns out Rothbard was right when he suggested that small states are more likely to embrace free trade. As he wrote in the 1990s. This was due also to sociological reasons. Rothbard says the greater the number of new nations and the smaller the size of each, the better, for it would be far more difficult to sow the illusion of selfsufficiency if the slogan were by North Dakota or even by 56th street than it is now to convince the public to buy American. Similarly, down with South Dakota or down with 55th street would be a more difficult sell than spreading fear or hatred of the Japanese or whatever foreign boogeyman we currently hate. In other words, bigness brings delusions of selfsufficiency, and it is actually large states that more often turn to protectionism and economic nationalism and control. A second benefit of small states is that they prefer a offer, a solution. When constitutions and democracy fail ", + timestamp: '00:09:41-00:16:21', + topics: ['Smaller states', 'Decentralization'], + type: 'podcast', + weight: 5.421848896549872, + }, + { + boost: 0, + date: 1629691200, + description: '[[Bolt 12]] is the next [[payment negotiation UX]]', + episode_title: 'WHY ARE WE BULLISH Bitcoin Meme Hub Jan Capek Bitcoin Mechanic Max Hillebrand ep195', + guests: [ + { + name: 'Max Hillebrand', + profile_picture: 'https://pbs.twimg.com/profile_images/1311357499514269696/-HQFwyFH_400x400.jpg', + ref_id: '9a86cc59-ed01-4757-88f6-e9d9d63067b9', + twitter_handle: 'HillebrandMax', + }, + { + name: 'Bitcoin Mechanic', + profile_picture: '', + ref_id: 'faae3a37-0115-4074-af21-7d79c429c7cb', + twitter_handle: '', + }, + { + name: 'Jan Capek', + profile_picture: '', + ref_id: 'ec6f8b14-6c4b-42e9-8e86-9aa902c0906d', + twitter_handle: '', + }, + { + name: 'Bitcoin Meme Hub', + profile_picture: '', + ref_id: 'dcd5a590-2018-4707-a49b-8142d7b14e33', + twitter_handle: '', + }, + ], + hosts: [], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/419512c2-e309-4b25-bfe2-cd481d53f66d.jpg', + keyword: !0, + link: 'https://anchor.fm/s/11e95d20/podcast/play/39201536/https%3A%2F%2Fd3ctxlq1ktw2nl.cloudfront.net%2Fstaging%2F2021-7-23%2F214267789-44100-2-17e9fbafdf841.m4a', + node_type: 'clip', + pub_key: '', + ref_id: '1f486e9a-51aa-476a-8430-b149c88817f4', + show_title: 'BTC Sessions', + text: "learn and test out wallets and see what's up because it's a lot of fun to play with if you haven't if you haven't tried already. Max, you are up. Dude. Please let us know what has you feeling bullish this week. Oh, this week specifically it was Bolt Twelve to stay with the Lightning network. That's the next generation payment negotiation. Ux flow and it's really magical and super useful. So far. A Lightning network invoice both Eleven is a one time payment secret basically. And it's the string that you should only use once to request a payment and that makes things a bit awkward. Main thing is that you cannot get a tattoo of your Lightning invoice because that would be a very shortlift fun and that we got to solve. Of course, right. There are current nice hacks around this, mainly LN-URL which is kind of a separate server that you need to set up and that then you have a small domain link, btcsessions. Compayme and all of a sudden you can toss Ben some sense, right? That's possible with this add on service. But what both Twelve is doing now is to do kind of a similar thing, but inside the Lightning network directly, running completely inside your Lightning node and communicating only inside the Lightning network. So you don't need to have a separate server, you don't need to run any separate software, you don't need to have a domain and all of these things are taken care of. It's all just Lightning pop keys at that point. And the cool things that you can do is static invoices or the static offers, right. So you actually can get a tattoo right on your forehead. People can scan all the time and continue sending you one set as you deserve, obviously for the heroic act, but it also allows for automatic recurring payments. So you can say hey, scan this QR code and you will pay me forever. One set every minute. That's great. And there's also nice messaging involved here directly. So sender and merchant can communicate and send messages back and forth about details of the payment, which is fascinating as well. Well, because there is some difference between the time where this offer was created and you print the QR code and when then someone actually pays the QR code. You can also do, for example some trickery with the exchange rate. You can print the QR code with an offer that says pay me $5 in dollars and a week later, of course, the stat price is much different as the shake coin continues to hyperinflate. Right. So you are going to get less shake coins for those five stats. Five Bitcoin. Sorry, you get less stats for those five bitcoins. Exactly. And this can also be negotiated again at the time where you actually make that payment. So small things like this that really show in hindsight how bad Lightning was and how much of a hack it was in the beginning and as a miracle that it actually worked. But now that we have well over four years under our belt of actually implementing this craziness, we've learned a thing or two, and that is all kind of cohesively packaged under Bolt Twelve Lightning offers by Rusty Russell So Bolt twelve.org as a really useful resource that shows you all the fabulous things. It's still very early so far only implemented by C-Lightning, and one other full Lightning note implementation will need to implement it before it's considered no longer a draft in the spec. But I'm bullish as fuck, especially as a podcaster and content creator. I've been showing Bitcoin on chain QR codes on YouTube videos for way too long, and Lightning made that terribly worse because every QR code that you show, only the first listener can pay it and nobody else can. So getting Lightning back to the beautiful days of sending stats for watching cat videos on YouTube, which obviously is the highest achievement of humankind in this regard, we're on a good path, so that makes me even more bullish. That's the main ", + timestamp: '01:21:28-01:25:47', + topics: ['bolt 12', 'payment negotiation ux'], + type: 'podcast', + weight: 5.268418788934759, + }, + { + boost: 0, + date: 1633752e3, + description: + 'The Domino Effects of [[El Salvador]] Making [[Bitcoin Legal Tender]], Citizens are now using [[Chivo Wallet]]', + episode_title: 'WHY ARE WE BULLISH Haley Berkoe Tip Jamie Stuckert Colin Aulds ep206', + guests: [ + { + name: 'Jamie Stuckert', + profile_picture: 'https://pbs.twimg.com/profile_images/1481004564090433537/ZAj3C3Kv_400x400.jpg', + ref_id: 'ee047505-97c1-4086-a01c-3d18bd40b2d2', + twitter_handle: 'JamiaStuckert', + }, + { + name: 'Colin Aulds', + profile_picture: 'https://pbs.twimg.com/profile_images/1151579149091262464/uNkb8aat_400x400.jpg', + ref_id: '7b6066e2-2ef5-4e90-9d93-dedb1d289118', + twitter_handle: 'Colin_Aulds', + }, + { + name: 'Tip', + profile_picture: 'https://pbs.twimg.com/profile_images/1598405188343468032/yL-obWRx_400x400.jpg', + ref_id: '72362a7b-2a0a-44ae-beb4-bb0f36a485fc', + twitter_handle: 'tip_nz', + }, + { + name: 'Haley Berkoe', + profile_picture: '', + ref_id: 'b62ba399-282a-4628-811c-25e280541c99', + twitter_handle: '', + }, + ], + hosts: [], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/2e84c98a-d7d8-4341-a129-3f4eaebe1e3e.jpg', + keyword: !0, + link: 'https://anchor.fm/s/11e95d20/podcast/play/41540590/https%3A%2F%2Fd3ctxlq1ktw2nl.cloudfront.net%2Fstaging%2F2021-9-9%2Fd7420ef4-f713-f016-1ad9-b5411c2f99ee.mp3', + node_type: 'clip', + pub_key: '', + ref_id: '54d58e3e-b828-4a9e-92c3-f761826c0319', + show_title: 'BTC Sessions', + text: "would say so many things I'm just bullish every day. But more specifically, what's going on in El Salvador. So just yesterday was one month since they made Bitcoin legal tender, and since then, like, half the nation has already downloaded the Chival app. That's 3 million people is the population 6 million. Yeah. Just right around that, right. Yeah. So that's like a pretty big number. And then I saw this other statistic that 2.5 million Salvadorans living in the United States will eventually be sending remittances through cheevo. That is a significant number. And it's just extremely powerful because all of Latin America is going to watch how they implemented this and they're going to start doing it, too. So imagine I'm just ready. I think we're all ready for the dominoes to fall. It would be crucial for Bitcoin to get into these other countries. And also what you mentioned earlier over in Africa, the whole world really needs it. But what's going on in El Salvador is just fascinating. I think it's a little bit soon to try and really make judgment calls on the situation because it's really tough. The education component is really tough. Like I was telling Chimberra in Bitcoin Beach this the other day, I'm like if there were teams of hundreds of people going into El Salvador to train everybody, it would be a little different. But you have to have a lot of resources for that, right? So it's a process. It takes time, and hopefully more people will get educated. Read more. The Spanish community is now doing podcasts and they're sharing more stories. I'm super excited. I think it's going to go well eventually. And I'm excited for the rest of the world to fall behind them. Yeah. It's unique in El Salvador because it's coming from two ends of the spectrum, too. You've got this initial grassroots movement with Bitcoin Beach, where it's just a small community kind of bubbling up in El Zonte. And then you've got now coming from a more top down approach where obviously the government is like, hey, this is legal tender and some Bitcoin is kind of pushed against the enforcement type measures around that. Now, granted, as an individual or a business owner, you don't have to hold Bitcoin. It's an effort for people to accept Bitcoin and choose to swap it to US dollars immediately if they want to. But Bitcoin is a very averse to any sort of use of force in a lot of instances. But that said, the world is kind of watching here, and I guess we'll see how it continues to play out. I love that it was started as a grassroots thing in small communities. I like seeing that around the world. And I'm moderately curious as to one how this plays out down there. If we see another kind of cycle, as we've seen in past, where it's huge boom followed by a bust, because that could look spectacularly bad if it's massive boom for the end of the year, and then it's like a two year bear market after that, that may not look great on the world stage. So hopefully that's not the case. But also, I'm really curious as to because they're not going to be the last country to do this. And I'm really about what's next. You hear rumblings in other locales, but a lot of it seems to just be like, oh, we're just going to kind of give our stamp of this exists and it's official that you're allowed to own it and some sort of regulatory clarity. But I'm curious about the next country to say this is legal tender, and I don't know where that'll be or how long it'll take, but I don't know. Colin Haley, Tip, what do you feel about what Jamie is talking about in El Salvadora? What are you interested in? What are you worried about? ", + timestamp: '00:46:11-00:50:54', + topics: ['el salvador', 'bitcoin legal tender', 'chivo wallet'], + type: 'podcast', + weight: 5.268418789235816, + }, + { + boost: 0, + date: 1472358600, + description: 'Getting funding as a small business ', + episode_title: 'TheMacroView Episode 4: Access to Capital', + guests: [], + hosts: [], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/8e52e9c4-52e8-4dea-8ed9-8c6a7fcef25a.jpg', + keyword: !0, + link: 'https://www.blogtalkradio.com/themacroview/2016/08/28/themacroview-episode-4-access-to-capital.mp3', + node_type: 'clip', + pub_key: '', + ref_id: '9ac59d0a-2e8d-430b-87e4-493026d9cbe3', + show_title: 'The Macro View', + text: "underwritten by a bank and they've got a whole process behind it. But originally the idea was kind of skipping the bureaucratic process that goes on behind the scenes of a CD that costs interest and just deciding which loans you're going to make and kind of having the underwriting of a bank. Now there's risk involved, which there's not. With CD you get at the IC, that's why you get a lower rate. But in a yield starved world, for some people it was a really good option to start investing in these peer to peer loans and we'll see how it ends up working out over the next five to ten years. But being able to kind of cut out the middle man and get capital right into the hands of people that need it, I think that that's a very interesting innovation and the ability to document those loans. And I know there was a scandal recently with Lending Club, but for the most part you're able to document that stuff very well. It's not that hard with modern day technology to have a really strong and secure database to be able to document these securities very well and make sure that they're not getting lost or being overly diluted. And you can have rules surrounding small businesses in regards to how often the liquidity can be offered by the investors. Maybe they do have to hold it for six months. So you don't just get a plumbing in the price a little bit after it goes up on the market and you have a plugin to where, if you're an investor, get a quick and easy report on what's going on behind the scenes of that business and where that capital is actually being used. All that's possible with today's technology. All that's possible with today's technology. And we're operating in a financial services world that is based on 1940 laws and 1933 laws. The entire infrastructure, the legal infrastructure and regulatory infrastructure up until basically DoddFrank and you've had Tweaks here and there, you had Glass Eagle and then it got repealed and you kind of had the merger of lending banks and investment banks or commercial banks and investment banks. You had kind of the merger and consolidation amongst that after the repeal of Glass Steagall, which set up a firewall and then the Volcker rule kind of did that and moved closer towards that. And that was part of Don Frank. And frankly, I think disclosure is the most important part of that. And yes, because we have an insured financial system, when it comes to just everyday consumer deposits, it's very hard to have that moral hazard of allowing prop trading desks that can take almost unlimited leverage with individual depositors that have financial insurance for their deposits because those prop traders kind of know in the back of their minds, hey, we're not really losing anybody's money. So as long as you have that moral hazard. It's very hard to have a commercial banking system that's merged with an investment banking system because you basically have customer deposits that are insured being put up as collateral to trade risky assets and to do it via risky strategies if it was fully disclosed and people knew the risks that they were taking with their deposits and there was an insurance. Which if there was an insurance. Banks wouldn't really take that risk because nobody would let their money be that kind of risk taking with it. With their savings and with their checking account that they use to buy food every day. It just wouldn't happen. But if you had a system like that, then you wouldn't really necessarily need the separation. The system that we do have with the insurance, you do need the separation. So it's an interesting framework that we have because the way that businesses gain access to capital today is really based on a world that was way before the current information. And I know in the 80s things got a little bit stricter in the because you had the pink slip pushers, the pink sheets pushers, and the penny stock brokers that were kind of running rampant and your wolves of Wall Street type characters that were ripping off old ladies and selling them a bunch of junk. And that's not what I'm advocating. What I'm advocating is having a legitimate market that has really strong accountability built into the technological infrastructure of it. You have a fast registration process. You have standardized types of offerings. You have auctions that are available, and you farm that exchange API out to every brokerage firm. And you hold brokerage firms accountable for keeping documentation and backup documentation on it. And you set up rules to where the brokerage firms aren't going to get sued for recommending it as a small part of somebody's portfolio, and aren't going to get sued if somebody without getting any recommendation or professional financial advice goes off and buys a bunch on their own and take that risk. Because casinos don't get sued when somebody walks in with $10,000 and puts it on the table, that was that guy's life savings and you just let him blow it. They're kind of in a world where they understand, look, people are going to come in and take bad risks and make bad decisions. And to a certain extent, while it's sad that's the world of investments too, people have to learn that you can't just make willynilly bad investments. You got to diversify. You got to play it long. You got to think about the long term. You got to build a good, strong portfolio that isn't dependent on one or two things working out that's basically going to follow the overall economy. But maybe you can outperform a little bit on the upside and maybe you could protect a little bit of risk on the downside. If you have a really good financial adviser, you're your own professional financial adviser and you know what you're doing and you know how to manage that risk, there are ways to do that. There are ways to use the markets that we have to get a good return. I think this would be a way that would increase that. I also think that it would open up structured products that would allow a lot of capital to flow from institutions to these small businesses and that would really open up the market for entrepreneurs to gain access to capital. If you had strong structured products that were based on pools of strong interest rate loans to small startup businesses that also had a tax incentive built in, you'd have institutions all over the place trying to buy into this. And you'd also have it as if you structured it properly to where you have the right risk management protocols in place. You'd also have a lot of retirees who might be able to clip a little bit better of a coupon, do it in a safe manner, and while helping to build the next generation of businesses. So there's a lot of things you can do. I'm not saying it would be their entire portfolio, maybe five, six, 7%. You can index annuities to these pools there's all sorts of interesting things you could do with structured products if you had a more vibrant market where investors of all sizes could come and gain access to startup and small business debt and equity offerings in a way that was accountable and in a way that was efficient and in a way that maybe offered a little bit of liquidity. But you understood these are small businesses that are trying to grow that liquidity three, five years down the road. If you actually had a world that preached truth that didn't say one out of every three businesses goes out of business, only one out of every three businesses is still in business after the first year. Only one out of every ten is in business after the third year. All these little cliches that just simply aren't true. About 68% of businesses three years in are still alive. So yeah, you've got one out of three that after three years go out of business and by five years 50%, a little over 50% are still alive. You have pretty close to 50%. Five out of ten. Let's use real numbers and let's plan risks around those real numbers and let's understand that yes, there's tail events but the more vibrant of a market we have, the more of an opportunity there is for people to find ways to manage the risk around that market. And when you have ways to manage the risk around that market, three standard deviation market events that put 75% of small businesses that started that year out of business and a lot of people lose money on that, you have ways to manage that risk and you have way to cost efficiently prevent yourself from losing big time on one of those events. So I think that what we really need is a combination of public policy that provides a tax incentive for the private redistribution of wealth that is wealthy people and people of all sorts taking minority stakes in small businesses and startup businesses, getting a tax incentive to do so. And as that business grows, obviously there's going to be tax base that grows and it pays way more than the taxes that are credited or deducted. By making this investment, by giving people these deductions and credits to make these investments, you're going to have much more taxes that come in a couple of years down the road. But not only are you going to have that. You're also going to have a more vibrant market for it and you're going to have incentives for entrepreneurs to go and create a very accountable market where small and startup businesses come in and properly have the standardized paperwork to make the offering to register quickly. Make it not very expensive and be able to attach that tax credit to it. Be able to attach that tax deduction to it very easily. Raise the capital. Put the capital to work. Hire people. Go on with their idea as they grow their business. You already have strong accountability. It will be easier for them to go back to the market. Maybe the first row is a convertible debt, maybe the second round is convertible preferred. Maybe the third round is a pure common equity. And that's the conversion point for the other two. And those are a year apart. Each they're done on the same exchange. The exchange, the brokerages, they make a little bit of money off of it, people get their tax credit for it, they get to invest in the next generation of businesses. Those businesses raise the capital, they put the capital to work. The economy grows and flourishes and it's going to be well worth having this market when you've got an economy that's growing at 4% as opposed to the measly 1.1% that we got. In order to do this, we've got to make it fair to the people that are participating in the market, that are providing this profession where they're not going to get sued all the time because the business goes out of business. Look, businesses do go out of business. Some succeed, some fail. It's not as outrageous a number that fail as society likes to preach, as we showed you here on slide 13 in tonight's podcast. It's nowhere near those outrageous numbers, but some do. Some businesses succeed, some fail. And when you take the risk of investing in a small business, you have to understand that why you should diversify. But when you're taking that risk at an early stage yet it should be a small part of your portfolio, you're able to get a lot of upside down in the future, you're able to get a lot of upside down in the future. And that's the benefit because you're starting out, you're getting a lower valuation before that company enters into the hyper growth stage. The other thing is. If you open this market up to a credit. Not just accredited investors. And if you had a vibrant market for these types of opportunities. You'd have financial professionals that whether they specialize in that or at least they make it a part of their repertoire and put it as a part of their model and take the time to really start to understand that market. Financial professionals will help their clients make those right decisions. They will. Financial professionals already have fiduciary responsibility. And if they might say, look, you should look at doing this as part of a tax plan and understand you might lose some money on it if you have this tax credit tax deduction, they also might look at it and say, look, if you have ten companies, five are going to succeed, five might go out of business. And the five that you have a finite amount of risk, the five that succeed, out of the five that succeed, three of them you're going to get a two X return and one of them you're going to get a three X return or whatever. You can show different models. You can model it out, and you can say, this is what we're expecting out of it. There is risk involved in this, as there is with everything. That's why it's only a small part of your portfolio. We're diversified, but this is something that we got to get happening. Everybody's complaining about the inequality. Inequality, wealth inequality, income inequality. The reason there's a lot of inequality is because there's absolutely no incentive for a wealthy person to take risk investing in a small business that's just starting out. When you can vary, it's very difficult. There's no vibrant market. It's hard to keep them accountable. People live around the world. If you're an entrepreneur, you've got to go out and find the wealthy person. You got to court the wealthy people, and you got to court many wealthy people in order to find the one that likes your idea. Well, that's not cheap, and that's not easy. And if you're just an average dude or you're an average gal looking to start a business. You come from middle class America or you come from even poor neighborhood in America. But you worked your ass off. And you got a little bit saved up. And you had enough to be able to go off on your own and not have to worry about a salary for a little bit. Now you got to find a wealthy person. Then you can use the Internet all you want, but when it comes down to at the end of the day, wealthy people want to know you can go out and have a drink with them. They want to know that they can trust you, that they can look you in your eyes. They want to shake your hand. It's not an easy thing to do. If you don't come from a lot of money, and it costs a lot of money to get there, you got to constantly be going around and trying to meet with these wealthy people and hope one finds a job. You got to figure out ways to hang out where wealthy people are. Guess what? Wealthy people don't hang out where it's cheap. They hang out places where it's pretty expensive for the most part, and at least pretty expensive for a young entrepreneur that's just starting out. So if banks aren't going to do that job anymore, we've got to figure out a way to incentivize those wealthy people to seek out good ideas. And we got to have a vibrant marketplace for that to be done. And we've got to institutionalize that marketplace in a way to where the offering documents are standardized. People know what they're getting into. They know what they're doing. And there is an incentive, a financial incentive, a tax incentive to do so that will get this economy bumping again, that will get this economy moving really fast. You'll have a velocity of money. You'll have to start kicking up interest rates and then you know what you're going to have? You're going to have banks all over starting platforms for this. They're going to start brokerage houses that will really advise, look 3% help get this tax deduction out there. And maybe the political way to do it is to not make a permanent tax deduction. Make it five to seven years. Seek out some best practices, emulate those best practices, be able to find ways to get more resources to the small business owners so that you have lower failure rates. There are other ways to do this and in a competitive world you're probably going to actually see failure rates at the beginning increase a little bit. And then what you're going to see is you're going to see profits and diminishing returns. The law of diminishing returns. As you have more people participating in the same industry, competing for the same customers, they're going to start to have the price compete. And when they start to price compete, they'll also compete with innovation and new products and new services. But when they start to price compete, you're also going to have lower margins. You're going to have smaller profits. And then capital is going to be diverted away from that. It's going to be put towards even newer businesses. And if you have this perpetual cycle of new innovation, new innovation, new disruption, lower prices, more goods, more services, more abundance for people, more jobs available, more people consuming, more people having jobs, more people getting wage increases, guess what? That also means we can start to pay down our debt. That means we no longer have to have budget deficits every single year. We can have balance budgets. We can have budget surpluses. We have large budget surpluses and windfalls where we can pay whole chunks of our debt down and prepay whole chunks of our debt and we won't have to refinance it. The other ", + timestamp: '00:35:52-00:52:23', + topics: ['Small business', 'funding', 'merger', 'lending'], + type: 'podcast', + weight: 5.265220403671265, + }, + { + boost: 0, + date: 1623733200, + description: 'The Goals of Small Business', + episode_title: 'Andrew Frazier on Running Your Business', + guests: [], + hosts: [], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/f2b2a2b2-8869-4256-94b9-a91c91c1ce7e.jpg', + keyword: !0, + link: 'https://dts.podtrac.com/redirect.mp3/cdn.mises.org/122_e4b_andrew-frazier.mp3', + node_type: 'clip', + pub_key: '', + ref_id: 'bda964fc-b276-490e-98b6-3009769f941e', + show_title: 'Economics For Business', + text: "and be profitable. Right. So you have a few techniques. You talk about standardized methods and processes. One of the elements I picked out of the book that I loved was you're thinking about goals. You call them smart goals. That's an acronym, smart. You might walk us through some elements of that, but tell us about goal setting for small businesses. Okay, well, a lot of times you have so many things going on within your business that you have to do that sometimes you forget about planning and doing the things that are important but not urgent. And that's really what goals are. They're very important, but sometimes they're missed. But by having goals and focusing on them, it allows you to move forward and many times move forward even faster and better than you would have. So the Smart Goal effect, which is commonly known to include specific measurable achievable, relevant and time based, where the specificness gives you a chance to get clarity around the goal. And that's generally qualitative and quantitative. You have to have it measurable because you can't improve anything that you can't measure. It has to be attainable. So you need to analyze what it will take to achieve the goal and then it has to be relevant, does it contribute to your business strategy and your profitability, and then you got to achieve it within a certain time. So time bound and have reasonable delivery targets and ways to gauge your progress. So really by developing smart goals, it's a way to plan for your business and it's a way to measure how you're doing and continually make improvements. So Andrew, given that given those set of smart goals, you say that every business from the outset should have detailed, standardized methods and processes. Besides the smart goals, what are the detailed methods and processes that we should be building? Well, it's important to be able to have consistency, and by setting out processes and procedures, it allows you to do that. It's also very hard to manage people, but it's very easy to manage systems. So by having a system or process that helps, you be able to manage more effectively and make sure your business is running the way that you want it to. Michael Gerber, who wrote the email, really talks about the key to running a successful small business is really about running it like a franchise. So that the same way a franchise has processes, procedures, and clear ways of doing business, you should be working towards that with your small business ", + timestamp: '00:15:38-00:18:45', + topics: ['Small Business'], + type: 'podcast', + weight: 5.25807249546108, + }, + { + boost: 0, + date: 1642222800, + description: '[[Bitcoin]] Versus Banks in [[Australia]]', + episode_title: 'WHY ARE WE BULLISH Duczko Thomas Jestopher Morgen Rochard Rick Vanderhulst ep229', + guests: [ + { + name: 'Rick Vanderhulst', + profile_picture: '', + ref_id: '4c184180-b77d-4e25-ac7c-4d2e86cdde85', + twitter_handle: '', + }, + { + name: 'Morgen Rochard', + profile_picture: 'https://pbs.twimg.com/profile_images/1362921386256211972/IpIK8cwI_400x400.jpg', + ref_id: 'c29b26e9-82c8-4c0a-8130-aa083d33ec48', + twitter_handle: 'MorgenRochard', + }, + { + name: 'Thomas Jestopher', + profile_picture: 'https://pbs.twimg.com/profile_images/1607521016368201730/6GSHGkGX_400x400.jpg', + ref_id: '50388de7-3ec7-401b-8349-5ee1d8a004c0', + twitter_handle: 'Jestopher_BTC', + }, + { name: 'Duczko', profile_picture: '', ref_id: '2b6de75e-0cf5-4fec-b458-d1b8ee3f86df', twitter_handle: '' }, + ], + hosts: [], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/b87feb17-6926-4295-b2c2-d1c2e9d49ca8.jpg', + keyword: !0, + link: 'https://anchor.fm/s/11e95d20/podcast/play/46171740/https%3A%2F%2Fd3ctxlq1ktw2nl.cloudfront.net%2Fstaging%2F2022-0-15%2F68b825e2-6752-7447-34ca-b27f0ea69256.mp3', + node_type: 'clip', + pub_key: '', + ref_id: 'c2dff822-95ca-45fd-bf30-61ed21ecc3b1', + show_title: 'BTC Sessions', + text: "this is actually fact in Australia. So there was a case Bitcoin versus banks, a guy that was dancing with his small Bitcoin exchange. He was just doing transactions on one of the peer to peer exchanges, helping people. And several of the big banks in Australia, they've actually invested in one or several exchanges at the same time. They're not allowing these other exchanges to bank. So clearly there is something going on with their own incentives. Yeah. It's unfortunate. Jess, I don't know if you have anything that you wanted to add in. I haven't let you chat much yet. Sure. Let's see the experience in Turkey. I think, Rick, you mentioned that. They'Ll. Just pass along a check that is the asset and write the new information on it and just pass it around. You'll have like ten different names on there. And it's just sort of this delayed settlement because no one has the money because all of that inflation. And it was just like, wow, that's the Fiat system. And here in the US, the financial center of the world, on a sunny day, it's still one to seven business days. Everything is going perfect. I just had my first experience ", + timestamp: '01:06:17-01:07:52', + topics: ['bitcoin', 'australia'], + type: 'podcast', + weight: 5.248069832838849, + }, + { + boost: 0, + date: null, + description: 'Bitcoin backed stablecoins as a solution and how it works in emerging markets', + episode_title: '#Bitcoin solutions for Emerging Economies', + guests: [ + { + name: '@RSK', + profile_picture: 'https://pbs.twimg.com/profile_images/1592915327343624195/HPPSuVx3_400x400.jpg', + ref_id: 'b326a250-3fc1-46da-a64c-2659a4de0e3a', + twitter_handle: 'RSKsmart', + }, + { + name: 'Femi Longe', + profile_picture: 'https://pbs.twimg.com/profile_images/1547047357371797504/avnHBa2W_400x400.jpg', + ref_id: '7a5a41f1-6d1e-46c9-b97f-20ae03eafdd1', + twitter_handle: 'TheArtOfTomas', + }, + { + name: '@Alexandria The Great', + profile_picture: 'https://pbs.twimg.com/profile_images/1575525599493427203/XubWEoDX_400x400.jpg', + ref_id: '1c95e8b2-3a98-46ce-933f-ef9f50c518c5', + twitter_handle: 'alesander97', + }, + ], + hosts: [ + { + name: 'Tomas Villalonga', + profile_picture: 'https://abs.twimg.com/sticky/default_profile_images/default_profile_400x400.png', + ref_id: '4f1cff71-07e0-4d7a-8992-d4b0609ca0b1', + twitter_handle: 'TomasVillalonga', + }, + { + name: 'Brian De Mint', + profile_picture: 'https://pbs.twimg.com/profile_images/1546297674512470016/oEVF8rJQ_400x400.jpg', + ref_id: '064e04f7-8320-4854-8325-0cc19cd7ff55', + twitter_handle: 'BrianTheMint', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/b2dd8be4-74b5-47b2-b470-e568657f3a0d.jpg', + keyword: !0, + link: 'https://stakwork-uploads.s3.amazonaws.com/uploads/customers/2707/media_to_local/1ced1636-bd02-426f-a451-f1ebcd2108d1/f1d75b7e-a877-4052-acdd-23958f6207d6.mp3', + node_type: 'clip', + pub_key: '', + ref_id: '41015fe4-63fd-46d7-8dde-f065457f2af6', + show_title: 'Art of Tomas', + text: "Yeah, I think so. As a bitcoin, I wish I could just tell people, just buy bitcoin and it fixes everything. I wish it was so easy. But for most people, unfortunately, bitcoin volatile, it's too much. So I think looking for like I put on the title bitcoinsolutions, and I think things like a bitcoin backed stablecoin for a lot of people in the world make a lot of sense. And if you could do it in a way that also benefits bitcoin, which is what rootstock is doing and why I like it so much, I think that is the best way forward. Alex, please. Yeah, definitely. I think one of the things that we actually started working on with our skill and metamorphosis in the space was that what we wanted to do was we wanted to look at how can we achieve market penetration. One of the problems that we have in emerging markets, or I can't say Zimbabwe's, emerging market in undeveloped markets like Zimbabwe for example, is because we face sanctions and of disadvantage we can't have what sort of central exchanges. So the thing about central exchanges, especially like what we saw with FTX was these exchanges often don't hold any bitcoin, they just come up with the own kind of altcoins and then they promote them and then they just dump them on retailers, for example. Right, but the thing about these exchanges is that you have these new types of what you call it, stable coins like USCC or UST that can pay these guys massive amount of startup capital. And then these individuals, these exchanges now have incentive to register these debt coins only and promote them regardless of whether they're beneficial to the end user, right? So there's kind of an unfair advantage when it comes to bitcoin versus these other cryptocurrencies at the end of the day. So what we saw was that because we don't have exchanges that can propagate the only agendas involved with, we can now we kind of have an advantage. And this advantage now comes with to access bitcoin which is highly demanded as well, where comes at a cost at 10% premium because first there's a cost of getting the capital outside of Zubay to buy this bitcoin and then coming back to Salad here, which is on 2% depending on the level of liquidity that you have and that you're transporting. The second challenge is that the second premium is that it comes from individuals wanting to make a profit. Now, if you are passionate bitcoin like myself and Metamorphosis, what you can do is say let's forgo the profits today. But also depending that we have a job with our so it's really nice that we've been able to get a company like I was K for example, that actually pays us to grow these communities to improve risk on adoption in Zimbabwe. Anyway, what is happening is that you can basically forgo the profit and then bring the trees down to about 2% 3% and then what happens is that you now can sell bitcoin cheaper than most of these stable coins like US CC UCC. And then also you can also undercut the current legacy system which is also charging around ten to 15% premium. And then people can now start seeing what should the financial benefits of using bitcoin. Once again, the problem is that Bitcoin's financial benefits was taken away when exchanges went away. But now we're saying, okay, maybe that's actually an advantage and something that we can use against these individuals to ensure that we can push Bitcoin because backstabbing like Donald Chain, for example, at a very low fee. If you guys can do that, that is brilliant, because that gives you an advantage. I wanted to ask you, we're going. To be working on that. We believe that stable coins are kind of the short term solution for a lot of people. Like you said Thomas, a lot of people cannot afford the volatility of bitcoin, but they can use for sure unstable coin that is backed by bitcoin and that all the fees that you pay go back to the miners and to the bigger ecosystem. And I think it's a certain solution for a lot of people. And we believe that a lot of people are going to embrace crypto through a single point that is backed by bitcoin. They are going to see how bitcoin can add value to their life, and then they're going to understand bitcoin after that. So I think what Alexandria is proposing, I think is key, and I believe it's a great strategy because it's going to be for them, like, seven to 8% cheaper than buying USDT and more secure even for them. So, yeah, I think it's a great strategy and I hope we can make this happen and it's going to help a lot of people there. Yes, absolutely. Absolutely. For me, a bitcoin backstop solves many, many things. At the same time, it allows for millions of users that cannot use bitcoin to benefit from bitcoin, to benefit from the growth of the network, the security from the network. And also because all the fees go to the bitcoin miners, all those new users, they are also making the bitcoin network stronger. So it combines a lot of things that it surprises me that a lot of bitcoiners have such a hard time understanding this. And that's why I wanted to have your perspective, Brian, in all of these. Because in your book, bitcoin evangelism, you do a great job explaining everything of how bitcoin is, how it works, what it means. And he also described when you talk about altcoins, that a lot of the altcoin services would be built on big coin eventually. So I wanted to ask you if you have tried any of the VidCon layer two solutions or these big compact stable coins, or if you have any questions or anything in that regard. Yeah, that's actually part of why I really like jumping on with you guys. I see this as a really good opportunity for me to learn. The only layer, too, I really have any familiarity with is lightning. I mean, I really want to learn more about rootstock. I want to learn more about bitcoin backstable coins. If you wouldn't mind, can you break down how a bitcoin backed stablecoin works? Like, how did the bitcoin reserves work and that sort of thing? Because this is very much I mean, it's pretty funny. Bitcoin is such a new space, right? I mean, I've been in it for ten years, and it's evolving at such a light speed that even the quote unquote experts, nobody's an expert at every element of it. Nobody's a doctor in bitcoin at this point, right? So I'm really here in, like, a learning capacity for these particular things. So if you want to mind just breaking that down, because I feel like that's part of my bitcoin, evangelism is to help people understand some of these emerging concepts, because, yes, I think the concept of a bitcoin backed stablecoin has a lot of allure of people that I talk to that particularly talk about the volatility. Like you mentioned earlier, a bitcoin where I lean into the volatility of bitcoin. I actually don't shy away from that, but I go the one bitcoin is one bitcoin and that sort of thing. And that doesn't appeal to everybody. And I understand why, if you wouldn't mind just illuminating this idea of bitcoin back stablecoins a little bit more for me. I mean, you guys are talking about it in a very practical sense, so I get it in that regard, the need for it and why it works. But if you can maybe even explain some of the technical side of it, not on like a computer science standpoint, but just maybe how the reserves work, how do the fees go to the miners and those types of things. Right, yeah, I can do that. I wouldn't be able to explain it technically, even if you wanted me to. But basically, the bitcoin network would stand as, like, the base layer, and on top of it, you have different layers, too. Like lighting is one, liquid is another one, and you have Rootstock. Some of the key characteristics that I love about Rootstock is that the main currency is pegged one to one to BTC. So it's our BTC, and you have the bridge that you can go back and forth. And one of the platforms that are running now on Rootstock is called Money on chain. And I created the first bitcoin backed stale coin. Before. Sorry, I skipped this very important point is that root stock is merged mine by the bitcoin miners. So if you're a bitcoin miner, you can mine both chains at the same time with no extra cost, and you earn more bitcoin if you do. So Roots talk at the same time, make the bitcoin miners earn more money, which most like now is quite important. So you earn so that the revenue would be the mining reward plus the bitcoin fee from the block and then whatever fee reward from the root stock block. Okay. And you get that in bitcoin. Right. And then we have the main chain, which is money on Chain. Actually, before we go into money on chain, to me, the fact that Rootstock has bitcoin as its native currency and the fees go to the bitcoin miners makes it very much aligned with bitcoin because it means that all the value from Rootstock is going to accrue to bitcoin, the asset. And all the extra financial movement that happens on Rootstock goes to the bitcoin miners to make the bitcoin network stronger. So they're very much aligned in that sense. Sure. Yeah, I want to add on I just want to add a few other points. The first thing is, as soon as you buy your bitcoin, basically what you do is you plug into a permissionless, peg into small bitcoin. So you have a small contract plus your bitcoin. And then this allows you to basically now mint a dollar and chain. So dollar and chain is basically now a bitcoin has backed eight to one. So for every $1 of bitcoin, so dollars of bitcoin, you have $8 of bitcoin basically backing it, basically. And then I think what autonomous is saying is that whenever the individuals that are mining bitcoin, these individuals with a slight switch can also use a place that's called neo merge mining, which allows them to also mine the restock network, basically, which is the second layer towards that. So right now we're saying about kind of varies from 40% to about 60% of breakcoin hashing power. And like what you said, basically all of the cryptographic hashes from the restock network is actually added onto bitcoins. They're one's block, basically. So this means it's very beneficial to the bigger ecosystem because every dollar that individuals buy basically just adds value to bitcoin itself. But I think also the one thing that I think was important was I can't sell bitcoin at extremely low premium at 3%. For example, in because of the volatility, we can see bitcoin moving from 5% to 2% on a daily basis, which is good if you're just someone who wants to buy and hold it for a day to day basis. But now if I want to pennies with the market and offer extremely low fees, for example, so that bitcoin adoption can occur much rapidly, it's not really possible because of monetility. But what I can do is I can use the same that uses bitcoin as a net currency and basically start selling that at about 3%, where the only thing that I'm charging is the cost of transportation to go to a country that has exchanged, buy the bitcoin, come back to Zimbabwe and sell it to individuals. So that individuals can now use this as a form of remittances. Because the one thing I'm noticing is that everyone wants to use big kind of remittance, but the cost of fees is what's really kind of interesting sometimes. I remember I wanted to do a geo transaction when I was in Boswana with my father who's in Zim. As soon as you heard the fees, you're so shocked that we were paying this much in Zimbabwe. And that's something that I've always kind of disliked and I think I want to try changing, but it's only possible because I can use auto and chain, which has no volatility and stuff. ", + timestamp: '00:22:42-00:37:24', + topics: ['Bitcoin-backed stablecoins', 'Bitcoin exchanges', 'Brian De Mint', 'Rootstock blockchain'], + type: 'twitter_space', + weight: 5.239642381668091, + }, + { + boost: 0, + date: 1472358600, + description: 'Growing small business to increase the economy', + episode_title: 'TheMacroView Episode 4: Access to Capital', + guests: [], + hosts: [], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/8e52e9c4-52e8-4dea-8ed9-8c6a7fcef25a.jpg', + keyword: !0, + link: 'https://www.blogtalkradio.com/themacroview/2016/08/28/themacroview-episode-4-access-to-capital.mp3', + node_type: 'clip', + pub_key: '', + ref_id: '7eca97d5-7a23-4e41-8e04-cfffdef85f06', + show_title: 'The Macro View', + text: "can start to really fund our Social Security liabilities and our entitlements and we're going to talk about that in another episode. But one of the things we got to do to be able to do any of this, we got to get the economy moving again. And the way you get the economy moving again is you do what we had throughout the early 90s, which is just flourishing small businesses that were able to access capital. And yeah, you had scams that went on with the pink sheets pushers and the people robbing old granny. Yeah, it's sad and it sucks. And a lot of these regulations exist but most business owners aren't like that. And honestly anymore. I don't know if it was just totally I'm too young to know and I didn't work there. I don't know if Wall Street was just really a bad place back then. Maybe it was. But I'm in the financial industry and I know a bunch of financial advisors and guess what? They're not bad people. They're not bad people, they're good people. They want to do best by their clients. They want to do best by their clients and they're not going to go and rip their clients off. But if you had a vibrant market where they could get good information, they knew that these securities were legitimate, that they had been vetted, that they were on a market where there's transparency into the businesses. Maybe you don't require quarterlies for small businesses because that's too expensive, but maybe you require an annual or maybe like I said, you have some sort of financial portal where shareholders can at least gain that next level of insight into what's going on in the business at that early stage of a small business. But we need a vibrant market. We need a vibrant market where wealthy people and nonwealthy people can go and find strong early stage business deals. Investment opportunities and ventures that are early stage and start up and where they can put capital at risk in a way that feels safe and secure on a market. That they vet them and make the registration process cheap and easy and the securities that are offered are somewhat standardized and you have some insight into that. Business people will do it. And then you slap a tax credit for pre revenue and a tax deduction for post revenue and that accounts for the risk. And maybe what you do is for those pre revenue businesses, the only type of security they can offer is a convertible that pays a coupon. So you're lowering the risk profile. I wouldn't be a fan of that. But hey, it's a step in the right direction. I'd rather prefer where investors and businesses, businesses offer the type of security that investors want to buy and where as long as that capital is flowing to a small business or startup that is taking that capital, putting it to work and hiring new people, what I want to see is I want to see new businesses come out with new technologies, with new products, with new services. I want to see them compete against the old ones. I want to see them hire new people. I want to see them drive the cost of goods down. I want to see them drive wages up by competing for the best talent. And the way that you do that is you get entrepreneurs who are out there. There are entrepreneurs out there who want capital to put to work, who they know with the right amount. They just overcame the barriers to entry that we all set upon them with our really high regulatory costs and ridiculous regulations. If we just overcame that as an entrepreneur, we would be successful. And what we need to get there is a little bit more capital than what we foresaw because we didn't realize all these regulations were coming out. We started three or four years ago and wham, we got slapped with tons of. Uncertainty and we have no clue when it's going to be implemented when or what's going to be implemented when and it's a total mess if you're an early stage entrepreneur especially in a highly regulated industry. And that's my weekly rant for today. I hope you guys enjoyed the show. We're going to be wrapping up here in just a second. Got about four minutes left. I apologize for the technical error earlier on. Had a little bit of trouble with my microphone when I tried to dial in it's just a ton of static in my headphones. So we had the show scheduled earlier and unfortunately I was in it. Had a lot of static going on had to unplug my microphone and try to figure out what was going on so I just had to end up recreating the episode. Sorry about that for all those that listened to the first one I had posted and are now going to check back in a little bit later. So to wrap up I wanted to talk about something that I saw the other day that I thought was really funny. I thought it was very creative and expertly put together and what it's called is Lovegov and you could just YouTube search YouTube lovegov and it's a series about six short videos about five minutes each and it is a sort of a satirical show where a girl falls in love with a guy named Gov and Gov is sort of for all intents and purposes a government regulator but kind of is the allencompassing federal regulator. He comes and points out every little thing and it's just her life through college and government encouraging her to do this with certain incentives or Gov not government but Gov is encouraging her to do this with certain incentives or encouraging her to do that with certain incentives like in college and going abroad and taking on all this debt and then when she gets out starting a business oh yeah I love small business. Not as much as big business but I like small business too and here I've got your ocean safety regulations and I'm not doing it justice at all. You got it. And maybe on the next episode I'll play a little clip for man might try to reach out and get permission to do that. I think it's done by the Independence Institute but if you go on YouTube just type in Lovspace G-O-V Lovegov and you'll find it and I think that you'll really enjoy it. I think it's really well put together. It's the type of thing that we need more of. We need more satirical comical culture winning culture winning media that's funny. That's light but there really does nail the point across and I think that this little short series of videos really dead it was really good. Had me laughing but at the same time was a serious point that got across and got made and I think it's very relatable and would be very relatable to a lot of people of all political ideologies to show how government gets involved in the market and really destroys a lot of the market incentives and makes it to where people have a much harder time going about chasing their dreams and pursuing what it is that they really want to do and what they thought was their version of the American Dream. Not some Washington bureaucrats version of it. Again, this is Andrew Smith coming to you live from downtown La. This was the macro view. Hope you guys enjoyed it. Tonight's episode is all about access to capital, how we're going to get it, why it's so important, and talk a little bit about why we don't have it right now. If you're just tuning in now, go back and listen to the episode in full in about ten minutes and we're going to wrap up here. Hope you guys have a wonderful weekend. Take care. Again, this is The Macro View, coming to you live from downtown La. ", + timestamp: '00:52:24-01:00:00', + topics: [ + 'Small business', + 'investment', + 'new business', + 'capital access', + 'entrepreneur', + 'government regulations', + ], + type: 'podcast', + weight: 5.209966659545898, + }, + { + boost: 0, + date: 1671321600, + description: 'How big data center miners help enable self sovereignty for individuals', + episode_title: '#Bitcoin Mining Saves the World - Brought to you by Marathon', + guests: [ + { + name: 'Steve Barbour', + profile_picture: 'https://pbs.twimg.com/profile_images/1592714173469065216/q8kXPyQI_400x400.jpg', + ref_id: '63a731b8-4759-4360-9e9d-d66f884e12d8', + twitter_handle: 'SGBarbour', + }, + { + name: 'Nathaniel Harmon', + profile_picture: 'https://pbs.twimg.com/profile_images/1578090357102780416/etXW-RA9_400x400.jpg', + ref_id: '9105fb4e-4150-4c25-90f1-8ea770585749', + twitter_handle: 'NateHawaii', + }, + { + name: 'Taylor Monnig', + profile_picture: 'https://pbs.twimg.com/profile_images/1599563776621219840/mvb8y3zY_400x400.jpg', + ref_id: 'b8513b01-ff94-4d7f-944f-5c92e1126885', + twitter_handle: 'taylorbmonnig', + }, + { + name: 'Harry Suddock', + profile_picture: '', + ref_id: '6440ea0f-c982-4b76-b7c2-9c6bf7e9a4a9', + twitter_handle: '', + }, + ], + hosts: [ + { + name: 'George Kaloudis', + profile_picture: 'https://pbs.twimg.com/profile_images/1545498090118950913/aGCJaGqF_400x400.jpg', + ref_id: '4ae2c311-16fd-4586-b65d-f046b1feb9ce', + twitter_handle: 'gckaloudis', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/492cbcce-3744-4d8b-b2ca-3a7f063e798a.jpg', + keyword: !0, + link: 'https://www.youtube.com/watch?v=Tk8oChjgVhw', + node_type: 'clip', + pub_key: '029099ec31eb33594611dc47d5c93de2c1aa86918e3a36b408c14a500601c8bc9b', + ref_id: '6e890ef3-7358-40d6-a01f-44f444dbabfc', + show_title: 'Swan Bitcoin', + text: "Taylor, we're talking about the little guy a lot over here. And you work at a big public mining company. So how exactly are you big data center public miner helping enable self sovereignty for the little guy? So I guess I'll take it from a society perspective, our last two acquisitions are good examples of this. These are sites that are in, you know, rural Georgia, have a ton of excess power that was simply just going to waste. We've been able to go in there, utilize over 100 power, provide over, you know, 50 jobs, and introduce bitcoin into the daily lives of all these people, along with millions of dollars of revenue for these small cities. So from a self sovereignty perspective, it might be a little bit difficult. But from a societal perspective, we're making a huge impact with mining all across rural Georgia by building these data centers. Cool. Let's talk about energy. I think people want to hear us talk about energy anyway. So Harry you touched on it. Per capita energy production is a good thing. Energy go up, bad things go down. I read something recently from Lyn Alden where basically we're just trying to capture the sun in some capacity, as much concentrate as sun as we can. That's ", + timestamp: '00:09:38-00:10:45', + topics: ['Self sovereignty', 'Bitcoin mining'], + type: 'youtube', + weight: 11.383676517140954, + }, + { + boost: 0, + date: 1623733200, + description: 'The Processes and Procedures in Small Business', + episode_title: 'Andrew Frazier on Running Your Business', + guests: [], + hosts: [], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/f2b2a2b2-8869-4256-94b9-a91c91c1ce7e.jpg', + keyword: !0, + link: 'https://dts.podtrac.com/redirect.mp3/cdn.mises.org/122_e4b_andrew-frazier.mp3', + node_type: 'clip', + pub_key: '', + ref_id: '3dacb7c8-34d2-4e73-8064-5d53c6857239', + show_title: 'Economics For Business', + text: "to our interview. When I was in the big business world, Andrew, we used to build what we call process maps, which are every step in the process, every handoff who's involved, what the output is, what the input is to the next step. Is that what you're advocating, that kind of detailed process mapping our step by step outline of activity? I'm advocating that, of course, in small business, you have a lot less resources and manpower, so it's a process. And early on, when you're working in your business, you're working and sort of developing them as you go. But to move forward and grow, you have to become a supervisor and a manager. And at those levels, you develop the process and procedures so that you can build your organization and continue to do business the way that you want to do business and in the way that has made your business successful previously. Yeah, we used to have a thing called the Procedures Book that catches all of those processes. Do you recommend that small businesses have something like that? They accumulate these processes over time? I think you do the keys to really going from working in your business to working on your business. That's where you develop your processes and procedures and you optimize your business. So that's really what working on your business is. And by doing that, you also increase capacity. So you're working in the business, you're working on developing your products, your services, finding the right target market for that. Once you do that, then you should pivot to working on your business, which is really when you're putting processes and procedures into place, you're optimizing your business plan and your strategy, and then you're building capacity and then working on the future of your business, you're really developing your strategic growth plan ", + timestamp: '00:19:37-00:21:44', + topics: ['Small Business'], + type: 'podcast', + weight: 5.171255588532055, + }, + { + boost: 0, + date: 1613511331, + description: 'The Bitcoin education', + episode_title: 'WHY ARE WE BULLISH? Bitcoin Buying Tsunami Swells in All Waters ep147', + guests: [ + { + name: ' Away Slice', + profile_picture: 'https://pbs.twimg.com/profile_images/1493953883370053632/rvtEfkr-_400x400.jpg', + ref_id: 'ff304d54-ca39-45eb-98ef-483460548c9a', + twitter_handle: 'add_slice', + }, + { + name: 'Littlest Hodler', + profile_picture: 'https://pbs.twimg.com/profile_images/1396223393322749952/uzavXUxh_400x400.jpg', + ref_id: '5eaa1126-c920-4860-89a0-459e64be2af5', + twitter_handle: 'littlesthodler', + }, + { + name: ' and Colin Aulds', + profile_picture: 'https://pbs.twimg.com/profile_images/1151579149091262464/uNkb8aat_400x400.jpg', + ref_id: 'fbd7719d-1c4a-497d-96a8-1d34e2e91702', + twitter_handle: 'Colin_Aulds', + }, + { + name: ' Mark Moss', + profile_picture: 'https://pbs.twimg.com/profile_images/1501276126823346177/6grHYzO4_400x400.jpg', + ref_id: '5a1cc110-3363-4dd1-a568-e80f70a51925', + twitter_handle: '1MarkMoss', + }, + ], + hosts: [ + { + name: 'Ben Perrin', + profile_picture: 'https://pbs.twimg.com/profile_images/1181715113226596352/ipGVEcYH_400x400.jpg', + ref_id: 'e6b013ef-178b-4b41-95ee-423148a3dc3a', + twitter_handle: 'profbenperrin', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/419512c2-e309-4b25-bfe2-cd481d53f66d.jpg', + keyword: !0, + link: 'https://anchor.fm/s/11e95d20/podcast/play/26808829/https%253A%252F%252Fd3ctxlq1ktw2nl.cloudfront.net%252Fstaging%252F2021-1-16%252F91cb3e87-a549-79e0-bed0-3b2785b9eed4.mp3', + node_type: 'clip', + pub_key: '02c431e64078b10925584d64824c9d1d12eca05e2c56660ffa5ac84aa6946adfe5', + ref_id: '1376395c-9c36-4f82-bdde-86ce6cf7ba26', + show_title: 'BTC Sessions', + text: "most of the time, spent some time with a small company. Now I'm back with the big guys and account management. So I'm not doing as much face to face anymore. But in sales we talk about 90% of sales is listening. So to Mark's point earlier, you don't just say, you know, I've got this widget and it solves 86 problems. Nobody cares about that. If they only care about the one, maybe two problems that it solves for them that's specific to their use case, right? So I have a personal rule with friends. I'm from a very small town. I don't have a lot of friends that are in a bitcoin. I have had two people this week alone come to me. Usually starts on like, Facebook messenger or something, and then we meet up for a beer and chat about it, but I never bring it up. I'm involved a little bit with the Bitcoin runners fitness club over in Europe, so I have a couple of t shirts and stuff, so I wear them to the gym so people know, but I never bring it up. I let people come to me, and then they bring up, listen, I'm worried about how much my grocery bill is going to be next year. I'm worried about bank of Canada borrowing all this money on Canada too. So it's like they say, we're borrowing money from the bank of Canada, but what they really mean is that we're just printing it, and it's impoverishing all our children and grandchildren, right? So I wait for those kind of conversations, and then usually I'll sit down with them with a beer and say, what do you want to do? Do you want to get in? I don't want to show anybody while I'm here, but I do tend to point people to shake pay. I find it's an incredibly simple user interface. If you can send an e transfer, you can use shakepay, share it to Ben. Because you pointed me to blue wallet when I was kind of onboarding my wife a few months ago. I've been doing the hardware thing for a little while and was kind of out of the loop as far as digital wallet goes outside of lightning, so I asked for you for some recommendation. Blue is great because it's got some very basic features. It's easy to learn, and then you can kind of scale up from there as you need. But I think I have an onboarding a lot of people. That's not my goal here, but that's my system for doing so when it arises, right, is that I wait for people to come to me, and I wait for their specific problem, and then I say, well, I can help you out. And this is the underlying technology behind bitcoin that may help alleviate your fears or put you on the right path to whatever decision is right for you. And sometimes that means they spend. I had a buddy the other day that cashed in $50 on his wealthsimple account after doing some stock trading just to see what it was like. And maybe he comes back to me. Maybe that's as far as he goes, right? But I've had other guys that I've helped out that I know are a little bit deep for average, regular middle class people. So that's my strategy for onboarding. It's not something I actively seek out, but I'm always happy to talk about it when it comes out. That's awesome. Tons of noobs coming in these days, and it's only just beginning. I feel like all of us are probably starting to get those friends and family members or even just random DMs from people on all kinds of different platforms. So exciting to see. But we've got our work cut out for us, that's for damn sure. So what I want to do, obviously, again, there's almost 140 people watching smash like button. Give this a share. Let's get a few more people watching it here. We're going to jump to Mark. Mark, dude, let's do a refresh here. What has you feeling bullish this week? Yes, I mean there's so much to be bullish for, right? But I guess today I was digging through some data, looking at working on my next video. Some of the data I was looking at today ", + timestamp: '00:47:46-00:51:21', + topics: ['Bitcoin education'], + type: 'podcast', + weight: 5.149457931518555, + }, + { + boost: 0, + date: 1571767106, + description: 'Is the device able to verify bitcoin transactions? ', + episode_title: 'BUC Live: Lightning Hardware and Nodes Panel from The Lightning Conference Berlin', + guests: [ + { + name: 'ketominer', + profile_picture: 'https://pbs.twimg.com/profile_images/1245972079528329218/YDUD9N2Q_400x400.jpg', + ref_id: '2f8b0b59-6f23-4c89-973c-668cc7666998', + twitter_handle: 'ketominer', + }, + { + name: 'Stacie Waleyco', + profile_picture: 'https://pbs.twimg.com/profile_images/1490885395390861317/MOzYmFOn_400x400.jpg', + ref_id: 'd4292662-08f9-4b16-a889-b61a401edcc2', + twitter_handle: 'satsie', + }, + { + name: 'Christian Rotzoll', + profile_picture: 'https://pbs.twimg.com/profile_images/1593996559162773504/qKZTYL0I_400x400.jpg', + ref_id: '8c13f2e9-d81a-4116-9ad7-d14a66d5f899', + twitter_handle: 'rtzll', + }, + { + name: 'Sebastian Küng', + profile_picture: 'https://abs.twimg.com/sticky/default_profile_images/default_profile_400x400.png', + ref_id: '04448652-5b1f-480c-a573-17c7de956e2c', + twitter_handle: 'sebastiankueng', + }, + ], + hosts: [ + { + name: 'Anita Posch', + profile_picture: 'https://pbs.twimg.com/profile_images/1491071678725644288/yehGegWl_400x400.jpg', + ref_id: 'b60af304-7a57-4a2a-b988-92b960a6b0a1', + twitter_handle: 'AnitaPosch', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/357dc2db-2643-49f0-9393-5a20ed21d0fe.jpg', + keyword: !0, + link: 'https://bitcoinundco.com/en/podlove/file/533/s/feed/c/mp3/029-en.mp3', + node_type: 'clip', + pub_key: '03abd9980b0c94ddbce7bde91affd5894ca40aaeda0ee0a33503e0c9bb55307274', + ref_id: 'f6e48088-be00-4596-8731-433c94a02ddb', + show_title: 'The Anita Posch Show: A Bitcoin only podcast', + text: "When I think about buying a Bitcoin node or Lightning node, I'm mostly interested in verifying my own Bitcoin transactions because I don't want the hassle to install a full note on my laptop and stuff. Do your products verify Bitcoin transactions? I mean, can I verify my own? I think I can speak for everyone here. That's the main goal of having the hardware for loans. Okay, I just heard that not all devices do that. So that's why I'm asking. I don't know, maybe this is a misinformation. Yeah. So those boxes, I think everybody has started with very small hardware. So I think the castle box also in the beginning. Raspberry Pi three. Raspberry. Also had the raspberry pi three in the past. Now also offering or being able to use the Raspberry Pi four and with the response such a low powered hardware, then you would need maybe to get the whole blockchain, you were not able to verify it yourself, so you had to rely on some kind of downloaded blockchain, whatever. That was not a good approach. But now with the recipe by four and I think even also all the other boxes are using now power full enough hardware to really verify the whole complete blockchain yourself and have the whole copy of the blockchain then at your service. And then you can do everything with your node and verify everything on your side without relying on any third ", + timestamp: '00:07:06-00:08:37', + topics: ['Bitcoin', 'BTC Node'], + type: 'podcast', + weight: 5.1300153732299805, + }, + { + boost: 0, + date: 1266645600, + description: 'Big business Vs Small Business in the Free Market', + episode_title: '13. Monopoly and Competition', + guests: [], + hosts: [], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/ef62c7ab-ef09-47b7-9af4-2ebe2384a72f.jpg', + keyword: !0, + link: 'https://dts.podtrac.com/redirect.mp3/cdn.mises.org/13_AustrianEcon_Rothbard_1972.mp3', + node_type: 'clip', + pub_key: '', + ref_id: 'cd0d29e6-af1f-4a94-8fc9-cc38a719807b', + show_title: 'Austrian Economics: An Introductory Course', + text: "thing about big business versus small business. It's not always true that big business can out compete small business on the free market. When Standard Oil, for example, had achieved something like 90% of the oil refinery business by 1900, they began to slip. After that, before the anti trust action against Santa world. They began to slip because they weren't the company gets too big on the market, they began to get sluggish bureaucratic. They don't look for new things, new inventions and new processes. Santa role was the last major company to get into the involved. Santa Claus always been based on Cleveland western Pennsylvania oil fields. And so they're the last major company that began interest in Texas and Oklahoma oil fields. This is the wave of the future. And so then Golf comes in as a new company in Texas and they begin to outdo being to take an increasing share of the business away from San Oil company. And the same thing happened all across the board. US steel, for example, gets formed with something like an attempt to monopolize. The whole steel industry gets form as 80% of the share of the market or something like that. It's now something like 20% slipping all the time. Every year USD sinks deeper and deeper into slots. They were too big, they were outcompeted. USD was the last corporation in the world, practically. They adopted the basic oxygen process, which is the latest improvement in the method of producing steel. And this is through many areas across the board. One of my favorite examples of this is the heroic small business which is always able to outcompete big business or larger business is therefore always put out of business by government. These are the heroic small pushcard peddlers. If you remember back to the push car pedaling masses. The push car peddlers, they have almost no capital. You can't get much smaller than a push card cover. The capital has push cart and as they supply apples or whatever, and that's it. Sometime before the push cart, the push car pedal was sort of the aristocrat of a pedaling business. Before you got to be wealthy enough to be a push car pedal, you just had a box or a case or the lease or something, that was it. Anyway, the push car peddler doesn't have any capital. It doesn't have nearly as much capital as retail stores or department stores, et cetera. And yeah, he has a great advantage. He's mobile when it's raining out, he packs up shop, he doesn't have to pay rent, he zips around, he can get to the best corner, he can get to the rush hour corner, 42nd street or whatever. And therefore he's usually able to do very well in competition to such an extent that in city after city, in town after town, the United States, the retail interests, the retail stores were able to put political pressure on the government to outlaw the pushback, either by charging a license to them, which is prohibitive, or by just putting out of business altogether. Usually on the grounds, of course, the government can't say, municipal government can't say we're doing this because we want to privilege the retail stores. That would be a little too hairy. So they say it is unaesthetic. New York is so beautiful, for example, and the streets are so beautiful, we can't allow the ice to push guard pepper. So you can imagine how much ice that cuts. And the retail business, by the way, the whole history of the retail business in the United States is a whole history, a whole record of humbling, the competition of new people coming up and delaying a competitive process by the use of government. First, it was a traveling salesman. As you all might know, traveling salesman jokes were sort of the big dirty joke thing years ago. And the reason is the traveling sales were illegal most of the time, 50 to about 18 months. The institution of traveling sales when it first comes in about 1850. Before that, there are only six stores, and you buy from somebody in New York, in Detroit. Traveling sales is a great new invention in the retailing industry. And for about 25 years, I put out a business because the existing stores are competing in the traveling sales. And then, like the fact traveling sales, when mobile flexibility zip around, they sell on a personal basis and all that. And so town after town, all over the United States, past ordinances either outlawing traveling sales altogether, ultimately placing very high license taxes in order to get into beach for Wyoming, have to pay $100 a year or something. So if the traveling sales going to pay all the license fees, you would have to pay $20,000 a year or something out of business. As a result of traveling sales was always in a state of illegality. He was constantly on the lamb from the cops, one panel to the other. Therefore had a sort of disreputable. The whole profession was disreputable. Something like bookies today, I guess. And so he had a family salesman joke because of the disreputable profession. Finally, after 25, 30 years of being a state of outlaw, they finally did so well, they finally pushed their way through, and they finally allowed to exist. It became accepted in the retail industry, and most firms then began to operate employee traveling. So they sort of joined them if they couldn't lick them no sooner. That happened in late 19th century. Things are doing pretty well, and all of a sudden, that vicious new monopolistic thing comes in horizon terrible thing, the apartment store. An apartment store first comes in. I said, oh, my god, it's awful. Awful thing. Instead of having one store sell, one product has this terrible monopoly store like Macy's that's selling everything. That's obviously an evil monopoly. You have to smash it. And so the government starts putting on department store, special department store taxes and special restrictions. And that took about 20 years before the department stores worked themselves out of that. Finally, the department store is just about accepted, and the hobbling of the apartment store is eliminated. We got a new terrible thing. The chain store. Amp the first big chain store. And I still remember I'm moving up to remember the days and amp an evil monopoly and you have to smash it and break it up because the mom and pop stores are going to be put out of business. And that's where they had spaceway. And all these others coming out competed amp and nobody talks anymore about breaking up amp. Amp is pretty cruddy shape in comparison with the newer and more efficient stores. ", + timestamp: '01:13:30-01:19:27', + topics: ['Big business', 'Small Business', 'Free Market'], + type: 'podcast', + weight: 5.126088380813599, + }, + { + boost: 0, + date: 1471930200, + description: 'Survival rate of small business and startups ', + episode_title: 'TheMacroView Episode #3: Financial Entanglement', + guests: [], + hosts: [], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/8e52e9c4-52e8-4dea-8ed9-8c6a7fcef25a.jpg', + keyword: !0, + link: 'https://www.blogtalkradio.com/themacroview/2016/08/23/themacroview-episode-3-financial-entanglement.mp3', + node_type: 'clip', + pub_key: '', + ref_id: 'bdc4757d-1e87-4fa3-b293-6f375af8490f', + show_title: 'The Macro View', + text: "scatter plot chart and it kind of shows from the first year through the 10th year, we have a little bit more data than that, but this was a more complete data set and more recent as well. This is slide number 13 on episode four slideshow. And basically what this shows is that look, after year two, about 79% of businesses are still alive. Tier three, about 67%. This notion, which we hear, it's a cliche that we hear a lot throughout our lifetimes, that within three years, 90% businesses or nine out of every ten businesses go bankrupt, it's actually not true. About one out of every three goes bankrupt. Two out of every three are still alive after three years. Now, after four years, it goes down slightly under 60%, just 60%. After five years, just under 55%, about 53%. After six years, about 48%. After seven, about 44. After eight, about 41. After nine, about 38%. And by year ten, about 36% of the businesses are still alive. Essentially, after three years, you got one out of every three that's gone bankrupt. After ten years, you got two out of every three that's gone bankrupt. So is it that risky? What we're not showing here in this slide, and I may add a slide trying to show this, is what the upside is not every business is a grand slam, not every business is a grand slam. And you could still lose money as an investor through dilution and have a restructuring and whatnot, but the business still be alive. That is the case. I'm not going to deny that is the case. But if businesses are generally surviving far longer than what we expect, should there be this much fear built around this idea of businesses going out of business really quickly and not being able to lend to businesses? If you're a private individual who's not necessarily in a credit investor, not really even having a market for it, not really having exchanges for it, making it highly restrictive on banks and offering incentives to banks to only lend in certain ways to these small businesses, ie. SBA loans that are guaranteed 75% are guaranteed by Small Business Administration of the government, and in some cases, higher than 75% are guaranteed. So why would a bank lend to any other small business other than through an SBA loan? So you've got misalignment of incentives, you've got a number of other issues on the banking side, and then on the private individual side, you have literal laws that make it more difficult. The lower the amount of capital available to people the lower the amount of capital available to people that are trying to start a business and restrict mechanisms for delivering capital from an individual with capital to provide any business that needs capital to put to work, and then being able to come to a transaction that makes sense, a value that makes sense to both of them. And to do this on a mass scale with thousands of people. As opposed to trying to find one or two or three wealthy individuals and have it set up in the right way with technology. You can do it really. Really quickly and really. Really easily. And you can be fully accountable and you can have the bookkeeping and records keeping. You could do based annual reports that provide enough information to shareholders and most good business owners are going to do that anyways. But the idea that we don't have this mechanism in place and that it's actually illegal to raise money from somebody who's not an accredited investor from the general public if you're not a publicly traded company. And I-E-A large company because a lot of the exchanges have rules where you have to be over a certain size in order to list on those exchanges. Now, there's the over the counter exchanges that don't, but a lot of those are looked at very poorly by mainstream America, and there are no mechanisms offered by the big retail brokers for equity or debt crowdfunding for small businesses to be able to access those markets. And quite frankly, I don't blame them for it yet because the rules are not really clear on where that's going to go. The jobs that tried to clear that up, and now you get the SEC trying to really write the rules, and it's not really much is changing. They can do well. If you're worth 50 million, want to raise capital from the general public and not go public, then you can kind of do that. But you got to be big already. 50 million is not a huge business, but that's not the size I'm talking about, okay? The size I'm talking about are startups to three or $4 million, maybe $5 million in revenue, or if it's a very low margin business, maybe two or 3 million to $5 million in profits. That's the size business that I'm talking about that has difficulty gaining access to capital. And we need to figure out a way to match people who have capital to lend or invest with businesses that are of that size. That have capital. That have a need for capital to be able to put it to work and put it to work quickly. That will hire people that have good business models. That they could scale them. Will become profitable. And all they need is access to capital to get there. That's what the next show is going to be about. I hope you guys enjoyed this little pop up show that I did tonight, talking about the cost of the regulatory environment. Remember, it's about 11% of GDP. That's the hidden cost. That's the hidden cost that affects people's wages, that affects the amount of money that you pay at stores for goods. That affects every aspect of your life. It affects the cost of the house you buy or the home that you rent. Whatever the case is, whatever you're thinking about, why is this so difficult? This is a big reason why these regulatory costs $1.8 trillion in regulatory costs, the hidden regulatory costs, which are more than the federal tax base, excluding capital gains and some excess taxes and things like that. But if you're just to account for corporate and individual income taxes, the regulatory costs are bigger than that income tax base. That's insane. Those are hidden costs that we're all feeling right now. We're wondering why. And some people are saying it's Mexican immigration. Some people are saying it's free trade agreement. Some people are saying other outlandish things that have no basis in reality or tried and true economic theory. We do need to simplify the tax code even if we leave rates the same, we got to simplify it. We got to flatten it. We got to flatten it for people. We got to make it a lot easier for them to comply. It's got to be able to be filled out in a matter of a day. And same thing for small businesses and really for all businesses so that they can keep more of that money and they're not having to pay auditors and accountants to prepare it. And we've got to go to a system where we adopt somewhat of a no harm, no foul rule for business owners where so long as we got to get rid of all this idea, we got to regulate best practices. Best practices regulate themselves. If you're not providing best practices as a business owner, you will have a competitor who will and will steal your market share, will steal your employees and we'll put you out of business. That's what happens. That's how competition works. That's how the market works. So we've got to get rid of rules and regulations that serve no purpose other than to say hey, we know better than you and if you don't do it our way, we're going to impose fines on you. All those do is set up barriers to entry and really do disincentivize the wealthy people who would invest under the current system from investing and would disincentivize the nonwealthy people who they're just not able to invest in these companies from investing if they understood those situations as well. Because it's very risky if your business could be put out of business by the government because you lost a sheet of paper or because you happen to run a factory and you have to have a stop button for the assembly line. But the assembly line is set up in a way to where it doesn't really work that way in your factory, which is a real case. I can't remember the name of it, but I'll post on the website when we eventually get the website up and going. But this was an actual case where essentially OSHA came in and said you have to have this and that. If they had actually understood the business circumstantially, not just broadly, these are the rules, these are the regulations, you have to do this. They don't understand why they really didn't need that. And there's a lot of those cases all throughout every single industry. No matter what industry you're talking about, you have tons of regulatory costs that are related to things that don't matter at all, that barely ever happen. And if they do happen, they're more of a tragedy that wouldn't be prevented by that regulation. And the reason that regulation exists is primarily because some expert who either worked for or used to work for a big major corporation, walked into a congressional hearing and publicly gave guidance to the regulatory bureaucracy that was writing the rules that Congress delegated the right to write and this expert is guiding them. This expert basically works for one of the big companies in that industry. That's how these things work. They don't come to small five person shop say hey, how do we do this? No, they go to a quote unquote expert from a major corporation and that quote unquote expert from a major corporation has their own interests and they're going to guide what they want to guide. At the end of the day. You end up with massive regulatory costs that don't really solve the problems that people cried out for regulation to solve because those problems are best solved by competition and regulatory bureaucracies prevent competition and by preventing competition they prevent the end goal that they've stated to try to achieve. Which is to create more equality in these markets and more fairness in these markets and a better distributive share of whatever and to have less negative incentives in the market for people to go out and commit crimes. Financial crimes. And to rip people off to make it harder for people to do that. Well the way you make it harder for people to do that is you have tons of competition. That's the way that you do that. And by having all this regulatory cost you reduce the competition and therefore reduce the amount of natural regulation that occurs from it. Well everybody, I hope you enjoyed tonight's pop up episode. I'm going to call tonight for there again this ", + timestamp: '00:44:04-00:55:36', + topics: ['Small business', 'entrepreneurship', 'startup', 'regulatory cost', 'income tax'], + type: 'podcast', + weight: 5.105514287948608, + }, + { + boost: 0, + date: 1596686400, + description: '[[Bitcoin Energy Consumption]]', + episode_title: 'Chat 45 - Bitcoin an Energy Revolution A panel at the VOB Conf', + guests: [ + { + name: 'Tone Vays', + profile_picture: 'https://pbs.twimg.com/profile_images/1416821178266787844/T1OkI9ZW_400x400.jpg', + ref_id: 'da6fc991-7080-461c-86e3-4ac18c2f413d', + twitter_handle: 'tonevays', + }, + { + name: 'Phillip Sandner', + profile_picture: 'https://pbs.twimg.com/profile_images/1043824764161335296/2SW3duCV_400x400.jpg', + ref_id: 'e1996e82-0354-421c-85d5-f18eebec9506', + twitter_handle: 'philippsandner', + }, + { + name: 'Jesse Peltan', + profile_picture: 'https://pbs.twimg.com/profile_images/1123954968636088326/EAjHUGDE_400x400.png', + ref_id: '96309505-caeb-47bb-a1ba-712b97292675', + twitter_handle: 'JessePeltan', + }, + { + name: 'Christopher Bendikson', + profile_picture: '', + ref_id: 'd72ead54-7bff-4874-870f-123e665fddfd', + twitter_handle: '', + }, + { + name: 'Christian Stoll', + profile_picture: + 'https://pbs.twimg.com/profile_images/3296579573/69ebedb479a9bdb9d536fe887e2d3113_400x400.jpeg', + ref_id: 'ff74d59c-f846-4b16-a5e5-771fb8139f18', + twitter_handle: 'Granddragon14', + }, + ], + hosts: [], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/9e7e229f-2631-4542-b5d7-7fcd502798dc.jpg', + keyword: !0, + link: 'https://traffic.megaphone.fm/CSN6935967461.mp3?updated=1627959014', + node_type: 'clip', + pub_key: '', + ref_id: '8ab125e2-e555-4adc-817a-bbf5bb93bf40', + show_title: 'Bitcoin Audible', + text: "really a fair comparison to say, like bitcoin uses x amount of energy, like electricity versus x whatever small country, when you're only looking at the direct energy consumption in that country and not looking at the fact that they're getting all the resources from other countries that are consuming that elsewhere. Not only that, but you can flip that entire narrative on its head and say when bitcoin uses more electricity than Chile, that means that even if Chile flipped their entire electricity infrastructure to try to mess with the bitcoin blockchain, they couldn't. Energy consumption is a good thing, it's just a matter of how it's consumed and how we produce that. Let me add one more thing. Everybody knows the market cap off gold, right? That's around 9 trillion. And that's 50 times more than bitcoin. And we know it from bitcoin. That like by theory, if the bitcoin price is, say, 9000, by theory the production cost of bondoid bitcoin should also be 9000. It's not the case, I know, but by theory it should be the case. So now take gold. Honestly, nobody discusses gold. If gold, if the market is having a market cap of 9 trillion and times 50 times more than bitcoin, then in case gold is produced, then what? If by theory the production price of gold that's the market cap of today, 50 times more resources are being spent second by second, day by day to somehow get gold out of the ground. But this is not electricity, that's equipment and machinery and that's kind of, I don't know, all kinds of things which are working in some kind of gold mine. But isn't this also wasted resources to some degree? Nobody discusses this and it's 50 times higher at this point. I remember a paper from cruises to my loan that are exactly comparing metal mining with crypto mining. Oh, interesting. Okay, so it wasn't nature sustainability in 2018. It's just so much more dangerous to the environment like the cyanide that is used to extract the gold. And then if you just go through all of the environmental damage that gold mining does, bitcoin is like a space compared to what goes on in order to get sold out of the ground. And it was funny when gaming was brought up, I was speaking a conference, I think it was decentralized in Athens Green back in November. And there were a lot of people there that into cookie and other nonsense. And I got into this big argument with someone that kept saying how bitcoin is so bad for the environment and mining can continue to happen and how proof of stake of currency is the future. And he was a lot younger than me. And I asked him, do you play video games? I haven't played video games since I was about 21, 22. And I asked him do you play video games? And he said yes. And I said, well, how much electricity are you wasting by playing video games? Where is the productivity in that? So if you take all the gaming in the world, everyone that ever plays video games, you combine all that, how much electricity that is using and please make an argument that is more productive use of electricity than bitcoin that is trying to give everyone politically neutral, government free money. This is why this entire line of discussion is kind of like a bit of a red herring. Because the problem is that we don't have a good way to price externality and if we did, then the price mechanism would take care of the rep. I think it's partially done and I agree. I think a lot of it is a red herring and kind of missing the major point, which is the real environmental ", + timestamp: '00:25:05-00:29:09', + topics: ['bitcoin energy consumption'], + type: 'podcast', + weight: 5.094594955444336, + }, + { + boost: 0, + date: 1665118800, + description: 'The Macro tyranny ', + episode_title: 'Breaking Away: On Secession and Small States', + guests: [], + hosts: [], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/6ec51741-3d93-4116-a619-d62a7cee1feb.jpg', + keyword: !0, + link: 'https://dts.podtrac.com/redirect.mp3/cdn.mises.org/102-radiorothbard-20221007.mp3', + node_type: 'clip', + pub_key: '', + ref_id: '8d9636c6-d564-47e0-89b6-5b9f87b27a34', + show_title: 'Radio Rothbard', + text: "damage to the same extent that macro tyranny maximizes it. If Hitler had ruled only Berlin and Stalin only Moscow, the history of the world may have been considerably less bloody. Large states are playgrounds for despots and dictators, while small states provide far fewer opportunities for ambitious politicians to spread their mayhem beyond their local communities. But we don't have to take lose word for it. The highly influential political scientist Hannah Arrest has discussed how only larger states can hope to be truly totalitarian. Even she notes that a number of states in Europe in the 1930s had pushed totalitarian ideas and as their ideal, but outside the Soviet Union, none managed to actually achieve the goal. And here's a long quote, but it helps us, so we'll quote it at length although totalitarian ideology had served well enough to organize the masses until the movement seized power, the absolute size of the country then forced the wouldbe totalitarian rulers of masses into the more familiar patterns of class or party dictatorship. The truth is that these countries simply did not control enough human material to allow for total domination and its inherent great losses in population. Without much hope for the conquest of more heavily populated territories, the tyrants in these small countries were forced into a certain old fashioned moderation, lest they lose whatever people they had to rule. This is also why Nazism, up to the outbreak of the war and its expansion over Europe, lags so far behind its Russian counterparts in consistency and ruthlessness. Even the German people were not numerous enough to allow for the full development of this newest form of government that is totalitarianism. Only if Germany had won the war would she have known a fully developed totalitarian rulership. So rents a Holocaust survivor, hardly a defender of the Nazis, but even she concluded that yeah, they wanted to be totalitarians, but not even Germany was big enough to bring that about. So they're smaller is better in this case, especially when it comes to the worst case scenarios as well. But what about that middle ground, right? We're not necessarily just always talking about avoiding full blown totalitarianism, but we do find some of these previous examples. You want more free trade, you want more freedom, you want the ability to escape despotism smaller states are generally your answer. Now, as a final issue though, we have to cover, as the book does, the issue of international relations and war, because we see these advantages all for the domestic population, right? But anytime you bring up this topic, you're going to hear that breaking up states into smaller pieces, this is bad, because if we reduce the power of the US government or any other western states, then China will step in and conquer the entire planet the next day. So this is a difficult topic and so I try to provide as much of a treatment as I can in the book. Certainly it's not exhaustive and we do need more people really exploring these issues. And with all international relations it requires a certain amount of speculation. But some good research has been done looking at the issue of how do small states fare against these larger states. And so there are a few things we can note when talking about this. For example, the assumption that large states will always dominate in international relations is based on mistaken notion that larger states in terms of GDP access and access to military resources currently are necessarily the more powerful states. More accurately, however, it is wealthier states and blocks of states, not necessarily the larger states, that tend to have an advantage in terms of military deterrence and innovative research by China expert Michael Beckley, for example, he notes that the biggest variable here is actually GDP per capita, not overall GDP. And this helps explain why we can find many cases of smaller states successfully deterring and defeating larger ones. During the 19th and early 20th centuries, for example, both Japan and the United Kingdom repeatedly defeated and humiliated the much larger China. At the time, a reliance on GDP and military manufacturing statistics would also suggested the Soviet Union three times the geographic size of the US. And with an immense weapons industry, should have outlasted the United States. The GDP measure also suggests that Israel is the weakest military power in the Middle East. Clearly, none of these things were true are true. These really case is instructive because it shows us that small states, rather than having to become big themselves, can simply freeride off larger states as the State of Israel has managed to long exploit American wealth and taxpayer revenues without actually giving up its own independence. Moreover, the possibility of nuclear deterrence diminishes the need for immense and expensive conventional forces, as again demonstrated by the State of Israel. Deterrent defense capability can thus be obtained even by Switzerland sized states. And then of course, there's no reason why a group of small wealthy states cannot very effectively form an alliance of their own among themselves without having internal control mechanisms, as has been done throughout history. You don't necessarily have to have small states form a state of their own in order to carry out effective defense measures. So for example, for the United States to break up into smaller pieces and there's no reason to assume the new, smaller, successful states would be at the mercy of larger ones, there is every reason to assume the new smaller American states would be just as unified on foreign policy as they are now, which is to say, virtually in lockstep. Unfortunately, no matter what might be said about small states and international relations, many will cling to the idea that because of alleged foreign threats, virtually nothing, nothing could justify secession ever. There is, of course, nothing new about this attitude. For centuries states have justified their bigness and their taxes on the claims that you need us to defend us against foreigners. And of course in the United States we've seen this in many cases where you're just supposed to accept whatever the government wants to do in the name of national defense. And this was, I mean, the conservative movement standard bearer back in the 50s. William Buckley said this in the early 50s we have to accept big government for the duration, for neither an offensive nor a defensive war can be waged given our current government skills, except through the instrument of a totalitarian bureaucracy within our shores. We must accept large armies and air force's, atomic energy, central intelligence, war production boards and the attendance centralization of power in Washington. So yes, freedom is all right, but I mean, come on, you're just going to have to have the CIA and you're just going to have to surrender those freedoms until we defeat all the bad guys in the whole world. If that takes 300 years, thens the breaks. So the real world experience suggests that fortune actually favors the decentralized in terms of wealth, freedom, economic development and more. And is for these reasons that Rothbard supported what he called universal rights. Locally enforced as an adherent of national rights, Rothbard believed rights are certainly universal, yet he also understood that their enforcement ", + timestamp: '00:23:17-00:30:41', + topics: ['Macro Tyranny'], + type: 'podcast', + weight: 5.224080560699853, + }, + { + boost: 0, + date: 1656979200, + description: 'How Lightning can improve the feedback process on music platforms', + episode_title: + 'Lightning Networks Impact on Music w/ Michael Rhee, Founder of Wavlake - Voltage Twitter Spaces', + guests: [ + { + name: 'Michael Rhee', + profile_picture: 'https://pbs.twimg.com/profile_images/1348612450/IMG_0298_400x400.JPG', + ref_id: '91302fb9-2d08-400e-bd1f-2d52e0af5508', + twitter_handle: 'rheedio', + }, + { + name: '@rheedio', + profile_picture: 'https://pbs.twimg.com/profile_images/1348612450/IMG_0298_400x400.JPG', + ref_id: 'a20f5e1f-5969-47a6-b986-faf29c0c4da0', + twitter_handle: 'rheedio', + }, + ], + hosts: [ + { + name: '@voltage_cloud', + profile_picture: 'https://pbs.twimg.com/profile_images/1508657900486422529/Lfa70poj_400x400.png', + ref_id: '3b622187-60ce-43c2-a21f-ae749c2d961a', + twitter_handle: 'voltage_cloud', + }, + { + name: 'Bobby Shell', + profile_picture: 'https://pbs.twimg.com/profile_images/1090426395979890690/uUdaFXo__400x400.jpg', + ref_id: '438f8067-3fed-49d2-91d9-5018cb043aac', + twitter_handle: 'BobbyShell2', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/2ec62250-4755-4616-8342-096a2cfab95f.jpg', + keyword: !0, + link: 'https://www.youtube.com/watch?v=aZt44KjXHh0', + node_type: 'clip', + pub_key: '', + ref_id: '3db5f375-817e-4275-980c-6475803c430b', + show_title: 'Voltage', + text: "this, we chatted a little bit about two things I had brought up to you about how independent artists, whenever I launched my first song on Spotify, I had to go through CD Baby or one of these groups that helped push your music to these platforms. And the thing that was discouraging was it said, hey, when you hit $25, you can claim your first cash out. And I was just like, that's going to take forever with how many plays you need to get. So that got me excited. And you actually brought up an even more important point, was this feedback loop that it creates for young artists because you can be motivated and see these amounts and stats come in that are much lower denominated. And that's actually a pretty impactful thing for a young entrepreneur. Let's dig into that a little bit and just what that can actually do for creatives. Yeah. So, Bobby, just using yourself as an example, you publish your music, it went up on Spotify and maybe a dozen other streaming platforms. How long did it take for you to figure out how many listens or streams or dollars you earned from those platforms? Like from the time of track was played to the time you got some sort of feedback about that? Do you know what the lag was like? So it was actually pretty challenging to hear and kind of find out because there was obviously on Spotify you can see the plays you have, but like in some of these other platforms, it was actually pretty hard to see that data, like being a new artist. Yeah. Because it's all opaque. And I think this is one of the interesting things or interesting aspects and features of the value for value model that podcast and 20 is built on. And then also experiments like Wavelake where you have users who are tipping SATS to artists for their tracks. And I think one of the, I guess, challenges as a new artist, when you're deploying your music and distributing it via some music distributor and blanketing all these different streaming platforms with your music, you're essentially throwing your music into a black box. It's virtually a black box, and you might get some sense of the kind of traction you're getting on the platforms over the course of a few months. So there could be a lag time of two to three months where the streaming platform has gathered some sort of statistics on how many plays you've gotten, and then that translates into some kind of a royalty payment that is obviously calculated from some kind of internal algorithm, and then it's spit back to the artist in the form of some number. Let's say it's $30 for a bunch of plays that happened three months ago. So there's a pretty long lag time between when someone was engaging with your music versus when you find out about it and see some kind of a reward for that work that you put in. And what's been really cool to see is with some of the artists on Wave Lake, they're receiving these like, small tips. It's nothing to write home about, but at the same time, as you said, if you're a newer artist and you're just working on honing your craft and finding your voice, those small monetary donations, those little tips operate as a really strong encouragement mechanism. And it's also an instantaneous feedback loop. So you could post a song on Wavelake, for example, and that day, like that hour, someone could hear it, love it, tip you, and you'll see that show up in your wallet, you'll see that 21 stats or whatever the user wants to tip you, you'll see it show up in your wallet near almost immediately. And so I think that can act as a really strong feedback mechanism for someone who especially if I speak about myself a little bit like making music. As a teenager in my bedroom, I was just recording kind of lame demos on a fortrack just over and over. And then years later, MySpace came along and you put those up and see how many plays you get. And I think we're at a point now where we have this really novel monetary network that's open and it's completely borderless and anyone can use it. And then on the other hand, you have the ability to pay and support artists that you love. And as a creator, you can not only benefit from that monetarily, but that can be a lot of encouragement that a particular song or some sort of direction you're going in artistically is resonating with someone out there in the world or a group of people in the world. And that kind of motivation means a lot, I think, when you're just starting out and you're finding your voice. And you could have other ways of using this kind of feedback loop as well. For example, if you have a demo or a couple of lines of a verse or a melody, and you want to share that with a group of fans or potential listeners, and you can say, like, hey, if you like this, what do you think of this? And then people start tipping because they want to see more of that, or they want you to flesh that out into a complete song. I mean, the possibilities kind of again, they go as far as we can imagine at this point. And I think that is a much different model. It's a very different model from what exists today in these very sort of monolithic corporate streaming platforms, where you're essentially like, you're forced to throw your work into this giant pool, and you're out there competing with heavily marketed acts and figuring out how you can show up in the midst of all that is pretty difficult. And even when you do get some engagement, you won't find out about it for months. And so I think there's a lot of potential not only to create a better royalty mechanic for artists, but it's also a way to encourage art. Yeah, absolutely. So the feedback loop portion, one thing about that that I love is, like we discussed before, is imagine you're a young artist and you put music online and you just see like, five SATS come in, ten stats. Of course, you could obviously see a million SATS come in, but that's fairly uncommon. But to have these kind of small affirmations towards the art you're doing or the content you're creating, or just these positive reinforcements, one of the biggest things I know for anyone pursuing anything psychologically in the world, like when we talk about just the psychology of it, is it's hard to get affirmation. We're a digital world. There's a lot of working from home. And one thing I love about lightning is there's this positive and encouraging reinforcement where we can reward each other in minimal ways, but whenever you see that come through, it kind of helps you push through. And I have a friend who struggles with being creative due to not having kind of the reinforcement he needs. And he's one of the most talented people I know. And I just really wish that was there. And I could see that being really transformative. We've heard safety and talk about fiat art and things that are not fiat art, et cetera, and to see true talent be rewarded and have this really kind of grassroots incentive mechanism I think is really important. And it does kind of segue into what I was talking to you about before. As far as content creators just being on the web, people have the opportunity to do anything they want and even leverage music in different ways. And there's obviously a lot of opportunity for people who are musicians to create reach. But there's even ways that people who create content, they could even leverage these creative, independent songs in really unique ways to, you know, further their art. So it's ", + timestamp: '00:05:55-00:15:37', + topics: ['Lightning Network'], + type: 'youtube', + weight: 5.061400574481365, + }, + { + boost: 0, + date: 1624507200, + description: 'Intro', + episode_title: 'Bitcoin Fixes This 48 Small Business with Ali', + guests: [ + { name: 'Ali', profile_picture: '', ref_id: '1169edf2-a89f-4d89-94a4-1be1a7b9aef0', twitter_handle: '' }, + ], + hosts: [], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/2536a974-d668-4ac2-8613-0b37aa0ca08c.jpg', + keyword: !0, + link: 'https://anchor.fm/s/2a4e8034/podcast/play/36003846/https%3A%2F%2Fd3ctxlq1ktw2nl.cloudfront.net%2Fstaging%2F2021-5-23%2F969a4306-e9eb-95c5-0e15-42d37c0e61e8.mp3', + node_type: 'clip', + pub_key: '', + ref_id: '01dc5a33-88e1-49ef-abb3-c5744cf8a046', + show_title: 'Bitcoin Fixes This', + text: "Welcome to Bitcoin Fixes this, where we explore the impact that Bitcoin will have in all aspects of society. Today's guest is Ali, owner of Tahini's Restaurants and Bitcoin Enthusiast. He is a small business owner who's been through a lot of different ups and downs in the business. In this episode, he talks about what it takes to make it in the world of small business, why he decided to put the Treasuries of his company into Bitcoin, and why Fiat money is so destructive. To say Ali is a Bitcoin enthusiast would be an understatement. He's been cheerleading Bitcoin and explaining how Bitcoin is great for small businesses since his discovery of it more than a year ago. I loved learning about the hustle, the unfair advantages of the large government subsidized companies, and why companies like his have a fighting chance with Bitcoin. This is the future of businesses built using Bitcoin savings technology. I hope you learned something. Ali Tahini, how's everything going, man? Good. Jimmy. How are you? It's an honor to finally be at your show. I'm a big fan. I've been looking for a while now. Oh, well, that's awesome. Yeah. It's always interesting to get, like, different perspectives and stuff. And you certainly have an interesting perspective because they're running a small business for a while. And obviously you have decided to put some ", + timestamp: '00:00:00-00:01:25', + topics: [], + type: 'podcast', + weight: 5.0513938665398985, + }, + { + boost: 0, + date: 1658322407, + description: + 'Many causes of diarrhea such as fat malabsorption and bile acid malabsorption (1/3 of IBS diarrhea cases)', + episode_title: 'Dr. Norm Robillard - SIBO, Digestion, and Gut Health on Carnivore/Keto', + guests: [], + hosts: [], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/5e0220b3-7c70-4423-bb76-3b75bc132fad.jpg', + keyword: !0, + link: 'https://traffic.libsyn.com/secure/carnivorecast/Carnivore_Cast_207_Dr_Norm_Robillard.mp3?dest-id=775699', + node_type: 'clip', + pub_key: '', + ref_id: '167a7be2-f14b-455a-9c20-95057af5ea7d', + show_title: 'Carnivore Cast', + text: "was interesting on a carnivore diet, it kind of flipped that around. And then also when I work with people that have diarrhea or constipation, we look at it mechanistically. So with diarrhea, it can be fat malabsorption, it can be bile acid malabsorption. Right. Most of 95% or more of the bile that improves that helps solubilize the fat so the lightbased can digest them. It's reabsorbed in the terminal small intestine before it hits the lodge ball, goes back to the liver, saves a lot of energy because cholesterol is an expensive molecule and that's kind of what bile is made up. So if more than just a couple of percent of the bio is malabsorbed, it leads to diarrhea. And it's believed that about a third of the IBS diarrhea cases of BIOACID malabsorption. ", + timestamp: '00:21:47-00:22:41', + topics: [ + 'bile acid reabsorption', + 'diarrhea', + 'small intestine', + 'liver', + 'cholesterol', + 'fat malabsorption', + 'bile', + ], + type: 'podcast', + weight: 5.039563265710219, + }, + { + boost: 0, + date: 1672772445, + description: 'Bitcoin miners and retail customers', + episode_title: 'TOXIC HAPPY HOUR! #Bitcoin, Foss, Max Keiser & the Plebs! 🍻😂', + guests: [ + { + name: 'Greg Foss', + profile_picture: 'https://pbs.twimg.com/profile_images/1552599670945464320/3OgqRHNo_400x400.jpg', + ref_id: '853d9f80-f6cf-490f-9d1e-f29cdc6acc6f', + twitter_handle: 'FossGregfoss', + }, + { + name: 'Jeff Ross', + profile_picture: 'https://pbs.twimg.com/profile_images/1475554600094552064/DSlPG1lx_400x400.jpg', + ref_id: 'ae6ee2a2-1cf7-41a0-8366-ff6e94a6403c', + twitter_handle: 'VailshireCap', + }, + { + name: 'Craig Shipp', + profile_picture: 'https://pbs.twimg.com/profile_images/1605961563420114945/MWGqR1Gm_400x400.jpg', + ref_id: '8d6ca47a-89a2-4331-bae4-2fae18055a95', + twitter_handle: 'CraigShipp', + }, + { + name: 'Oluwasegun Kosemani', + profile_picture: 'https://pbs.twimg.com/profile_images/1538403135101800450/sO-RPI9U_400x400.jpg', + ref_id: '25ce4b90-6689-4dd9-84b6-240c7bcbe407', + twitter_handle: 'MrlamilamiKosch', + }, + { + name: 'Max Keiser', + profile_picture: 'https://pbs.twimg.com/profile_images/1361873587582472195/y57DiTYX_400x400.jpg', + ref_id: '743efd07-d194-4c74-8663-45c3b8646b8e', + twitter_handle: 'Maxkeiser', + }, + { + name: 'Isabel Foxen Duke', + profile_picture: 'https://pbs.twimg.com/profile_images/1466874333410717698/WRQh2-_m_400x400.jpg', + ref_id: '58989d4a-4a96-4ffc-8cbe-f233ffb10420', + twitter_handle: 'isabelfoxenduke', + }, + ], + hosts: [ + { + name: 'Publord', + profile_picture: 'https://pbs.twimg.com/profile_images/1480160632360124416/AM_vVRko_400x400.jpg', + ref_id: '5b7b7e22-fe55-4e1c-933d-6544f6600351', + twitter_handle: 'publordhodl', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/0c42d408-e518-4ecf-b282-d864a8c14002.jpg', + keyword: !0, + link: 'https://stakwork-uploads.s3.amazonaws.com/uploads/customers/2707/media_to_local/7de8e4aa-50a6-4f57-a8ff-6ca16a4f0ae4/76c3395a-4fe5-4802-8d2a-92cca1f1ea0b.mp3', + node_type: 'clip', + pub_key: '02574d6e8e787372184b6f17c40d6c6fe1777db9015801f95dfd24692784d767cd', + ref_id: '7eea8bdf-2873-4759-b53b-a207aa8bcdcf', + show_title: 'PUBLORD', + text: "So circling back real quick to the movie Generational Wealth, I think Tomer put it together. I think he had a partner in it. That's a fantastic movie on YouTube. And my take on the question that Jim asked about the utility company using all the power to mine bitcoin and not giving it to retail customers. Retail customers are always going to be willing to pay more than what a miner would pay for electricity. Because the miners are so distributed around the world, it's so competitive, they have to get really cheap electricity or use stranded electricity, right, that they have no customers for. So I think it would always be a situation where retail customers would come first in the pecking order. The utility company would much rather sell to them at a higher price than using that energy for mining. I would say assuming wait a minute, wouldn't you have to account for, let's say, governments preventing utility companies from raising the rate so high to make it profitable, to sell it to the retail customers over the mining? Because if they are the only ones that know their profitability for the use of that electricity in either direction, and they are the ones making the electricity, so they have the purest cost, the cost of getting it out of the ground and processing it, and then it's free to send any direction. But if they control one of the directions and it makes them profits, I feel like there's a potential economic conflict in there that could be created if you have enough other situation, enough other characteristics. Like a type of power company that has a monopoly kind of situation where it's the only company in a region and nobody else can't go anywhere else. Utility companies are regulated by governments already. I'm not a fan of government at any level, but I am a fan of people creating rules and holding other people accountable to them so that you can get along in a society. So I would hope that a utility company is going to do the right thing is the best way I could say it. Making sure that, look, they were built to make money selling to customers and they figured out a way for most people to be satisfied at that level. Now they find a revenue stream that comes into existence that wasn't there when these things were invented, these grids and the idea of giving, producing electricity for people, all of a sudden there's something that changes the game and it literally changes incentives, it feels like. And I just worry that it could. Turn into something they lose money doing that. Only if they can sell the electricity to retail more for more than what they can use it for for bitcoin mining if they had rate. Yes. I don't know that you can make that statement without knowing, without using an example of a potential price for bitcoin, which maybe we're not at it now because the value of bitcoin is too low. But if the value of bitcoin was ten times what it is now, it's way more profitable for everybody to mine bitcoin, even at a very small amount of hash rate. And so there could be a tipping point. Am I thinking correctly on this or not? Yes and no. Okay, thank you. The grid is designed for peak power, okay? It's designed for the 06:00 p.m. When everyone gets home from work, draw on the grid. And the reality is, most of the time the grid is not using or there's more supply than there is demand. So that's when you need the offtakers, which could be bitcoin miners, that will benefit from now from a source of energy that is not set by a regulator. Don't forget, the regulator sets the cost of electricity based on things like peak power demand, as well as global adjustments on their stupid wind farms and solar projects that are heretofore unprofitable. But you got to put the ESG narrative on it. So the reality of in Ontario is because seventeen cents of that is absolute government waste. That is waste that goes to producing wind farms and solar farms that have no economic benefit to the grid whatsoever, but because of their ESG narrative. So the reality is five cent kilowatt hour power, 22 cent kilowatt hour retail prices, that's all set by the regulator at the wrong price because of all their waste in their projects. The beautiful thing about bitcoin is that it takes demand from the grid when the solar panels are producing electricity, but there's no one there to take it. Right? That's the stupid thing about solar panels. The sun doesn't shine at 06:00 p.m. At night, and the wind generally doesn't blow at 06:00 p.m. At night. So these are the demands for bitcoin that will allow the regulated utilities to actually capitalize on the capital expenditures in their wasted products or projects, rather solar and wind. The most efficient power is nuclear, but the reality is building a nuclear power plant requires basically a 20 to 30 year payoff period because it is so capital intensive at the outset. Well, bitcoin mining will shorten the ROI on a nuclear reactor materially because it creates an additional revenue stream that otherwise wasn't there calculated in the cash flows. So lots of good things, jim, you're right. But the reality is the regulator sets the marginal price of power based on peak demand in the system, and that peak demand is so far in excess of what global bitcoin miners can mine at that I don't see a time when a utility would only be bitcoin mining. That just doesn't make sense to me. However, never say never. It's not a zero chance probability. It's just unlikely, in my opinion. ", + timestamp: '00:47:21-00:53:52', + topics: ['mining energy', 'bitcoin miners'], + type: 'twitter_space', + weight: 17.809161091592113, + }, + { + boost: 0, + date: 1672772445, + description: 'Michael Saylor and integration of Microstrategy with the Lightning Network', + episode_title: 'TOXIC HAPPY HOUR! #Bitcoin, Foss, Max Keiser & the Plebs! 🍻😂', + guests: [ + { + name: 'Greg Foss', + profile_picture: 'https://pbs.twimg.com/profile_images/1552599670945464320/3OgqRHNo_400x400.jpg', + ref_id: '853d9f80-f6cf-490f-9d1e-f29cdc6acc6f', + twitter_handle: 'FossGregfoss', + }, + { + name: 'Jeff Ross', + profile_picture: 'https://pbs.twimg.com/profile_images/1475554600094552064/DSlPG1lx_400x400.jpg', + ref_id: 'ae6ee2a2-1cf7-41a0-8366-ff6e94a6403c', + twitter_handle: 'VailshireCap', + }, + { + name: 'Craig Shipp', + profile_picture: 'https://pbs.twimg.com/profile_images/1605961563420114945/MWGqR1Gm_400x400.jpg', + ref_id: '8d6ca47a-89a2-4331-bae4-2fae18055a95', + twitter_handle: 'CraigShipp', + }, + { + name: 'Oluwasegun Kosemani', + profile_picture: 'https://pbs.twimg.com/profile_images/1538403135101800450/sO-RPI9U_400x400.jpg', + ref_id: '25ce4b90-6689-4dd9-84b6-240c7bcbe407', + twitter_handle: 'MrlamilamiKosch', + }, + { + name: 'Max Keiser', + profile_picture: 'https://pbs.twimg.com/profile_images/1361873587582472195/y57DiTYX_400x400.jpg', + ref_id: '743efd07-d194-4c74-8663-45c3b8646b8e', + twitter_handle: 'Maxkeiser', + }, + { + name: 'Isabel Foxen Duke', + profile_picture: 'https://pbs.twimg.com/profile_images/1466874333410717698/WRQh2-_m_400x400.jpg', + ref_id: '58989d4a-4a96-4ffc-8cbe-f233ffb10420', + twitter_handle: 'isabelfoxenduke', + }, + ], + hosts: [ + { + name: 'Publord', + profile_picture: 'https://pbs.twimg.com/profile_images/1480160632360124416/AM_vVRko_400x400.jpg', + ref_id: '5b7b7e22-fe55-4e1c-933d-6544f6600351', + twitter_handle: 'publordhodl', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/0c42d408-e518-4ecf-b282-d864a8c14002.jpg', + keyword: !0, + link: 'https://stakwork-uploads.s3.amazonaws.com/uploads/customers/2707/media_to_local/7de8e4aa-50a6-4f57-a8ff-6ca16a4f0ae4/76c3395a-4fe5-4802-8d2a-92cca1f1ea0b.mp3', + node_type: 'clip', + pub_key: '02574d6e8e787372184b6f17c40d6c6fe1777db9015801f95dfd24692784d767cd', + ref_id: '4f0b1fbc-47f6-49c7-afe1-4978eabe5c4a', + show_title: 'PUBLORD', + text: "Dude, it always helps when you explain things. I appreciate it. I will be paying attention. Keep my eye on it. But I take the simple route. Just accumulate as many SATS as I can and let the rest of the world fall apart around me. Can anyone up on the stage comment on Michael Sailor's comments about what he's going to be doing with Lightning with his team at MicroStrategy? Does anybody have any insight? Can I comment? Craig and I know I talk too much. He needs to buy IBEX mercado. And I told Mr. Sailor that at dinner in La. At the Pacific Bitcoin Conference. Now, Michael is not going to ever take advice from Foss. Well, maybe he will, but at the end of the day and Max Kaiser maybe can chime in on this, I was really excited to hear what Sailors shared those comments with us privately. So now that it's public yeah, he's trying to incorporate the Lightning protocol into his business. He's a very smart guy when it comes to that stuff. So I'm pretty excited. And I say tongue in cheek, he should just go out and buy IBEX Mercado. It's a company that had their origins in El Salvador and Guatemala that I'm pretty tight with. I say that because IBEX Mercado has some of the top Lightning engineers in the world. And Mr. Sailor was saying that it's very tough, and it is true, it's very tough to find Lightning engineers. So I think it's going to be great for what he does, because it's going to just further the development of the Lightning Network. And I actually think I hate to say this, but there would be a role for MicroStrategy stock within the portfolio of the Bitcoin Opportunities Fund. Why is that? Well, because for the first time in a while, it's looking awfully cheap to me compared to outright Bitcoin exposure, too. So Sailor is a very smart guy. In fact, he's too smart by a half sometimes. But I really hope he does continue this, because with him and Jack Dorsey pitching the Lightning Network, these are two brilliant people that have some big following and some big brains. So I'm not sure what Max thinks, but there's my two cent. Thanks. Right. Well, I guess the speculation was which way would MicroStrategy go to expand their bitcoin presence. I guess one idea was they would get more into mining, and then the other one was lightning networks. And Sailor has explained why he's not really interested in getting into the mining side of things. He's given a couple of times. He's explained that he just doesn't like the economics of mining. Plus, I think that he sees lightning as a gateway to massive global adoption, which would have the effect of increasing the bitcoin price, which he has a lot of bitcoin. So anything that's going to help that boost that price up, he's going to be interested in, for sure. So with Lightning, you've got that ability to really reach the billions of people that he likes to talk about that can be part of this unconfiscatable distributed wealth network of property. So I can see it makes sense. IBEX mercado is yeah, it's a company down here. It's an excellent company. He should definitely look at it and at the very minimum, he should take a position. I know we just invested in the company. We took a small position in their latest round for easy capital. And so it's looking good. Hey, that's awesome, Max, because I'm also an investor. I'm not sure if you knew that I was one of the seed investors in iVEX Mercado. So I love Jose. I love his team. A bunch of real smart South American or Central American programmers doing a great thing, doing merchant adoption. So onboarding the city of Miami. So there's obviously, you know, if you're onboarding the city of Miami and that's where Sailor lives, it's sort of cool. And then, to be clear, I hate bitcoin mining as a standalone business as well. The future for bitcoin mining is going to be the energy companies that own their own assets that mine bitcoin to balance the grid. So that is the key for Mr. Sailor. Don't get involved in a bitcoin mining company that does not own its own energy assets in the future. It'll be the Duke energy of the world. It will be the Tepcos, that's the big Japanese utility that's starting to mine bitcoin itself in order to load balance its grid. So there will be a time to own bitcoin miners, but it won't be a bitcoin miner that doesn't own its own energy source. It will be a bitcoin miner that is perhaps part utility and part bitcoin miner. That's balancing of grid for the benefit of all its contributors, which include users. It includes the different sources of electricity, whether it would be natural gas, wind, solar, nuclear, you know, all the mixing pot. And balancing the grid is a very difficult thing. So when you have a bitcoin miner that can power up and down with the flick of a switch, that's the type of bitcoin mining that makes sense, not the type that. Buys its electricity from ERCOT and then becomes hostage to the PPA, the Power Producer Agreement with ERCOT. They can be interrupted at any time. So the world is changing. Sailor is a smart dude. I think there's going to be a lot of really cool opportunities in the Bitcoin mining square, and that'll be with companies again, that are not your run of the mill Bitcoin miners, but have names like Exxon and Duke. Energy and TEPCO and all of these big utilities that are going to learn that bitcoin actually is a super useful tool to help them increase revenues and also balance their grid or balance their load base. So, yeah, some really cool stuff happening. Sailor is a genius. I'm not. So let's just see where life goes. ", + timestamp: '00:27:47-00:34:12', + topics: ['Michael Saylor', 'Microstrategy', '', 'Lightning Network', 'bitcoin miners'], + type: 'twitter_space', + weight: 17.809161086484142, + }, + { + boost: 0, + date: 1673549347, + description: 'Some common ways people lose bitcoin', + episode_title: + 'BR019 - Proof of Keys Day Twitter Space ft. Lopp, Craig Raw, Lazy Ninja, mshodl, Rijndael & guests', + guests: [], + hosts: [ + { + name: ' Jameson Lopp', + profile_picture: 'https://pbs.twimg.com/profile_images/1594137153625276416/t1RUP3yP_400x400.jpg', + ref_id: '062ec6c8-0fa2-4bf6-9aa1-7ab347df2530', + twitter_handle: 'lopp', + }, + { + name: ' Craig Raw', + profile_picture: 'https://pbs.twimg.com/profile_images/1362841242665631745/UtA3FBQU_400x400.jpg', + ref_id: 'f2d1f5f0-2e1c-4d16-937d-4d48627cb955', + twitter_handle: 'craigraw', + }, + { + name: ' Lazy Ninja and Rijndael', + profile_picture: 'https://pbs.twimg.com/profile_images/1362843002318721028/PNKWuu0-_400x400.jpg', + ref_id: '23edbd50-9b0b-4e9a-aa56-57c2af074173', + twitter_handle: 'FreedomIsntSafe', + }, + { + name: 'Justine Harper', + profile_picture: 'https://pbs.twimg.com/profile_images/1559710083734540289/HXTH4kqO_400x400.jpg', + ref_id: '7b5a8957-1c4b-474f-bc38-291b382a13e6', + twitter_handle: 'mshodl', + }, + { + name: ' Dee', + profile_picture: 'https://pbs.twimg.com/profile_images/1600155411868434433/9k1KQ8i5_400x400.jpg', + ref_id: 'ad33288b-28d4-4f15-9492-f64bce891613', + twitter_handle: 'HodlDee', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/f1879df9-9bc6-4a76-951f-24548da768ef.jpg', + keyword: !0, + link: 'https://anchor.fm/s/9500fad8/podcast/play/63399670/https%253A%252F%252Fd3ctxlq1ktw2nl.cloudfront.net%252Fstaging%252F2023-0-12%252F0a789f60-2c9a-6bbb-945a-79f3dd937cee.mp3', + node_type: 'clip', + pub_key: '032d7609ff3f4a5232e4d60967971e23bc671dfb68020845a59bab5dc1f3b93b87', + ref_id: '1958362b-b149-4466-b873-4d22a36d67d8', + show_title: 'Bitcoin.Review Podcast with NVK & Guests', + text: "In terms of people losing their funds. Why don't we kick off with maybe talking about what are the most common ways people lose bitcoin? I'll start with one example, and maybe we go around the panel sort of like going through it. But one of the most common examples I see is people bamboozling themselves. People will screw themselves or their coins before they ever get hacked. So people will go out there, they'll hear an example from somebody that's either extremely smart or extremely dumb and sounds extremely smart, and they would have like, a super complicated setup, and you require many computers, and they would do a super complex multisig, and then the person can get the money out. A very good example of this in the way back in the day was bitcoin armory. There's probably a lot of people on this call that have lost money in bitcoin armory. It was fantastically safe. So safe that many people never managed to get their money out. So what other stories do you guys see as very common ways people lose bitcoin? Yeah, I'll go second here. When I first started, I was forex trading like an idiot, and someone was like, hey, I have a trading platform. Buy some, give me some money, and I'll double your money. The classic. And they were only taking bitcoin. So I was like, you know, what the heck is that? Never heard of it. Well, I've heard of it, but never bought it. How does it work? And they said, oh, you know, go on this exchange, buy some, and then send it over and I'll send you some back. And they were pretty smart. I started off with a small amount and a few hundred dollars and gave them it. And surprisingly, they actually did double my money. And then that convinced me to give them a lot more money, and that's where I felt a culprit of what they did. But I realized at that time that bitcoin was immutable, and there's no way that I could get back my money. And it kind of hit me hard, and I was really frustrated, obviously. But it was a user error, right? It was me being an idiot, being greedy, and wanting more money at the time. So I think people need to take a little bit of responsibility sometimes when they're handling their money. Obviously, I'm still a young guy and had lots to learn, and that sent me down the Bitcoin rabbit hole. And here I am, right, learning how to store my keys. A lot more safe than I did on an exchange. Right. So that's kind of my sob story. But it comes like some real pain to learn. Yeah, absolutely right. I think a lot of people, when they lose money, they get mad and they try and put someone else, blame someone else. But if you really learn about these things and store things properly and understand, then hopefully you don't have anything to worry about. Yeah. Thanks for that, Justine. Hey, I think you guys are on point. I generally think the majority of Bitcoin is lost by user error at unchained. And in personal experience, we deal with a lot of either newcomers to self custody or people have been dealing with single SIG, and this is kind of their first interaction with multisig. And what I found is there's just so much to learn about Bitcoin, right? This is kind of the first time in history that we can truly own our assets and we can truly own our money. And that takes personal responsibility just like anything else. If you want to grow your own food, if you want to protect your home, there are skills that you have to learn. And I think Bitcoin is the same way, but it's new. It's a new thing that people have to do. They're used to being able to just call the bank, right? The bank is going to handle it for you. So I think there's a learning curve. The problem is, in my opinion, that we sort of as a community, I use the word community loosely here as Bitcoin. Twitter, we sort of have this, like, all or nothing mentality, and I don't think we speak enough about like, there's all of these things that you can do, and each individual has to sort of look at their own attack factors and their skill set and what they're capable of, and it's okay to take steps, right? So in my experience, it's over complicating things. It's doing something because they saw on Twitter that was the only way they could do it, right? And maybe it was way beyond their skill set. The worst thing I've ever seen is multiple times past phrases. I have a love hate relationship with passphrases because I've seen people mess them up. Miss one letter, forget that you capitalize something, think that you could memorize it and you don't. And then all of a sudden you've lost access. So user error, over complicating things or making it so complicated that you then don't distribute your keys. So you've got this really over complicated system, but everything sitting in one drawer. So I just think that over complicating things, user error is sort of the biggest threat, even though obviously outside vectors are something that we need to consider as well. But I think that, yes, user error over complication and pass phrases in ways that are maybe too complicated for the user at hand. That seems like there's a trend there. So Lock has this fantastic list of people who have been physically attacked over their bitcoins. James, do you want to give people a little bit of a primer on that list and where they can find it? Yeah, sure. Well, it's linked directly from my main page@lop.net. It's the physical bitcoin attacks GitHub repository and like a lot of other things that we talk about with security in this space, I think it can be easy for people to blow it out of proportion. Now, I think last I checked, I've got nearly 150 different attacks that I've managed to come across and archive over the years. And this is actually a very, very small number. You know, in the grand scheme of things, it's probably one of the rarest forms of loss in the bitcoin space. But there are definitely some patterns and things that we can learn from that, one of which is that the most common event that causes this is people who are doing high value, face to face cash and bitcoin trades. So that like face to face OTC stuff. It's definitely risky because your counterparty may be a criminal and they may assault you and take all of your money. So there are things that we can learn from that. Also, a number of people who have experienced home invasions in this space, it generally happens because they're well known, and usually they're well known because they're being flashy and flaunting their wealth on social media. So you can definitely learn a lot about how important operational security and privacy is when it comes to protecting yourself physically. But kind of getting back to the original question, I think one of the most common forms of loss is when you're not holding your own bitcoin, you're keeping them with a third party. And that opens you up to just a multitude of forms of different loss, whether it's the third party having an insider attack, the third party being hacked, or in many cases, just the security system to access that third party account being compromised, usually through SIM swapping or password leaks or whatever. The best way I can describe it is that when you have your bitcoin with a trusted third party, you're still vulnerable to all of the same risks as you are with self custody, plus a whole lot more because of all of the things that can go wrong with the various third party actors who are controlling access to those keys. Yeah, not your keys, not your coins. Right. I mean, it's that simple. When it comes to third parties, it's so amazing to me that after Gox, I think a lot of the people who are new haven't experienced and maybe was forgotten. It was quite a long time ago now. And before that we had my wallet, which was, I think I can't remember, it was a lot of coin on that one as well. And then we had big Ver with crops. We had FCX in Alameda, which were like the recent high profile ones, celsius, all this stuff. Right. It's very unfortunate what happened to look, because now you have guys like Woody or Susan sort of fighting self custody, saying as if with third parties, you were safer if they offered some form of insurance. I would take their suggestions more face value instead of just being bullshit. But they're not liable for those losses in the way that people think they are. You just become an unsecured creditor and good luck to yourself. So, Rendell, you've been working in Bitcoin quite a bit, and you probably know some interesting ", + timestamp: '00:07:44-00:17:21', + topics: ['Bitcoin Losses', 'Bitcoin trading'], + type: 'podcast', + weight: 22.766568059128208, + }, + { + boost: 0, + date: 1628150829, + description: 'The Regulatory on Small Scale', + episode_title: ' #14: Julia Reinhardt - What do GDPR and AI regulations mean for Silicon Valley?', + guests: [], + hosts: [], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/3ab6c599-bbcd-4c8f-beef-bcf509ed4afa.jpg', + keyword: !0, + link: 'https://anchor.fm/s/1a9df3e0/podcast/play/38326682/https%253A%252F%252Fd3ctxlq1ktw2nl.cloudfront.net%252Fstaging%252F2021-7-5%252F1c697b61-ec63-9b13-21c8-20beb6d5ca8d.mp3', + node_type: 'clip', + pub_key: '', + ref_id: 'd67cf7af-79a8-457e-b65b-293fb279dcfe', + show_title: 'Voices of the Data Economy', + text: "early on. Yeah, I just sort of picked up your line that they do it out of marketing because I think this is also something we discussed in a podcast with Safia Noble, the author of Algorithms of Oppression. And I'm not sure if there is a word called like privacy washing, like you have green washing, but probably it has become like a marketing gig to talk about your customer data and how safe it is and having discussions around that. So yeah, just a comment, not a question, but okay, so first we had GDPR and now we have the proposed AI regulations in Europe and we have never really spoken about it in this podcast. I would say that even me or particularly the audience are pretty new to this and you seem to be very deeply involved in this. So if you could take us through what are actually these AI regulations that have been proposed in Europe and what are their challenges, and then probably we can go deeper into it. Yeah, sure. So, yeah, the upcoming AI regulation that has been tabled by the Commission, but is only on the negotiation table now for member States and the European Parliament is actually the core thing I'm working on in my fellowship. And my intention is really to make sure that this upcoming regulation again from Europe does not again cause that lagging behind the small players. Because in the field of AI, as you all know, size clearly matters. The more data you can gather, the better your AI system works. And we're already pretty far down the road to Monetization because players in the market have access to an impressive range of data, and they can also afford gathering high quality data, which then enables them to build better performing AI. And for small scale providers, what's most important is the clarity of the guidance. I mean, that sounds phenomenal. Who wouldn't say that? But if you follow advice, you set up an internal team analyzing those rules for your in house implementation adapted to your AI system, you get much better at estimating necessary additional processes to say why. I work on that. And again, this link to the small scale providers of AI in general, the regulatory draft that the European commissioned, and it was tabled on April 21, so that's not very long ago. And in Brussels, things take time, comedies are formed. But the draft that the European Commission tabled also has been very long time in the making funded line. The Commission president announced something like it already at the beginning of her presidency, and then it came up this year. It's the most ambitious and the most comprehensive attempt at reining in the risks linked to the deployment of AI that we have seen so far across the globe. So it's a bold new step before the big focus of the past years were always just principles. I'm saying just. But I mean, of course you start with principles on an international level. The OECD principles on AI that were adopted in May 2019. OECD. Most European countries and the US are members of the Organization for Economic Cooperation and Development. So they're already promoted uses of AI that are innovative but also trustworthy, that respect human rights and democratic values. And I think now, in 2021, really, we're at the stage of how do you transform these principles into practical rules and regulations. So the rules that the European Commission proposed wouldn't cover all AI systems. They do cover systems that are deemed to pose a significant risk to the safety and fundamental rights of people living in Europe. You know, it's the geographical scope of people living in Europe. So it's a risk based approach. It has several layers, and those layers have different rules for different classes of AI systems. There are some that are prohibited. There are some that are considered high risk and have follow certain rules, and then others where they just say, you have to be more transparent. Do you want me to go more into details of what those rules are? Yes. I mean, broadly, if you could point it out. One, two, three. I don't know if it can be done that way. Absolutely. Sometimes it's confusing because it's really so much risk. You have to know in which category your AI system falls. And that's really on the developers, kind of to understand the categories. And in the end, it's actually pretty clear that not many AI systems actually fall under that rule. So definitely something to understand. So for some users of AI, the Commission proposes an outright ban. That's a use where the Commission says it's an unacceptable threat to citizens. That, for example, an AI system that likely causes physical or psychological harm by manipulating a person's behavior. That's a question of definition. Or by exploiting their vulnerabilities like age or disability. Then also something like social scoring systems where people collect points and also minuses, like those we know in China, and facial recognition in public spaces by law enforcement authorities. So not all facial recognition, but just, you know, those used by police and public spaces, essentially. Although even there, you have exceptions, and I think too many of them. So that's, you know, the systems that the Commission proposals should be banned in Europe. But most of the regulatory draft actually focuses on AI that is considered high risk. And what is high risk is, of course, defined in the regulatory draft. So that's kind of problematic uses in the recruiting field, in the employment admissions context, determining a person's creditworthiness or eligibility for public services and benefits, and also some applications used in law enforcement and security and judiciary. And for those, these systems have to meet different requirements and undergo kind of a conformity assessment. So, of course, before they can be placed in the European market. So in a way, that's kind of FDA, as we call it in the US. Like clinical testing, not for drugs or for vaccines, but for algorithms, it's to make sure that an AI system complies with several requirements around serious risk management. It has to use data sets and training, validation, and testing that are relevant, representative, free of errors, complete. That's a super tall order. Of course, then documentation about a high risk AI system must be really extensive and very precise. Why you chose certain designs, why you designed it in a specific way, and also to show that the developers really check all these factors diligently. The keyword is always human oversight. So high risk AI systems must be designed in a way that allows people to understand the capabilities and the limitations of a system and to counter socalled, automation, bias, and also, if necessary, reverse or override the output. And then, of course, accuracy, robustness, security, and transparency. So this is kind of this clinical testing for algorithm. ", + timestamp: '00:20:36-00:29:57', + topics: ['Small Scale'], + type: 'podcast', + weight: 4.966172337540865, + }, + { + boost: 0, + date: 1627704e3, + description: '[[Jurisdictional arbitrage]] moves people when [[prohibitive tax regime]] is implemented', + episode_title: 'WHY ARE WE BULLISH Natalie Brunell Aaron Segal Lauren Sieckmann Dan Held ep191', + guests: [ + { + name: 'Dan Held', + profile_picture: 'https://pbs.twimg.com/profile_images/1522608646043181060/QQRjVYhi_400x400.jpg', + ref_id: '3e22facc-9310-4346-82ac-3e183b88fa51', + twitter_handle: 'Ledger', + }, + { + name: 'Lauren Sieckmann', + profile_picture: '', + ref_id: '427bb439-f251-4c7e-89fb-b53ecd8c9a82', + twitter_handle: '', + }, + { + name: 'Aaron Segal', + profile_picture: 'https://pbs.twimg.com/profile_images/884309028125294592/sLDGwzDO_400x400.jpg', + ref_id: 'f7483c61-ba76-4a19-8d8d-992966e1f79e', + twitter_handle: 'AaronSegalActor', + }, + { + name: 'Natalie Brunell', + profile_picture: '', + ref_id: 'a09e8874-abbe-4a85-b19d-08cac1c8afde', + twitter_handle: '', + }, + ], + hosts: [], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/419512c2-e309-4b25-bfe2-cd481d53f66d.jpg', + keyword: !0, + link: 'https://anchor.fm/s/11e95d20/podcast/play/38086440/https%3A%2F%2Fd3ctxlq1ktw2nl.cloudfront.net%2Fstaging%2F2021-6-31%2F116ac8f3-ce82-01e5-2865-da5c486c8330.mp3', + node_type: 'clip', + pub_key: '', + ref_id: 'ea5f251b-6174-4663-b1c8-176375396b6e', + show_title: 'BTC Sessions', + text: "don't know. What are your feelings on kind of this? How bad would it have to get for people to actually think about jurisdictional arbitrage? Oh, you're muted. Probably a prohibitive tax regime if you start to get really prohibitive like 70%, 80% taxes. I think people start to look at moving. I think about it in this function of like you got 100% tax rate of slavery. And so we all exist in the semislavery state of our output is taxed, usually without our permission. And so you either pay that or go to prison. So it's literally sort of a mob feeling there. At what point do people break? I think that's totally subjective for any type of person. Like, a lot of people have already kind of broken and moved to different countries, like renounce their US citizenship or they moved to Puerto Rico. I've moved to Austin from California, which is a small amount of sort of that arbitrage because Texas is a much more open society when it comes to earning money and keeping it. Now I can escape federal. If you want to escape federal, you go to Puerto Rico. If you want to escape all of that, then you go renounce your citizenship. So I made the decision at a certain point that paying California taxes plus federal taxes was too much. I couldn't bear it anymore. And we're seeing a lot of other people make that decision as well. But at what rate will federal start to push people? Ultimately, people vote with their pocketbook. If you make it really cost prohibitive in terms of taxation, I think that's what really moves people. ", + timestamp: '00:18:02-00:19:39', + topics: ['jurisdictional arbitrage', 'prohibitive tax regime'], + type: 'podcast', + weight: 4.962566375739069, + }, + { + boost: 0, + date: 1642827600, + description: "[[Tonga]]'s Interest in Following [[El Salvador]]'s Footsteps", + episode_title: 'WHY ARE WE BULLISH Mario Gibney Mauricio Di Bartolomeo Josias Carbon Bang Bitcoin', + guests: [ + { + name: 'Bang Bitcoin ', + profile_picture: '', + ref_id: 'ac7edd0f-886d-449a-ba1a-06033ad12695', + twitter_handle: '', + }, + { + name: 'Josias Carbon', + profile_picture: '', + ref_id: 'f3c2c48b-c174-43cc-acfc-2151634b7c77', + twitter_handle: '', + }, + { + name: 'Mauricio Di Bartolomeo', + profile_picture: '', + ref_id: '10c70dfd-93fb-4e95-99d4-2bebf561e737', + twitter_handle: '', + }, + { + name: 'Mario Gibney', + profile_picture: '', + ref_id: '1a3f05f5-5c4a-455f-b4ec-f682080a5518', + twitter_handle: '', + }, + ], + hosts: [], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/f29a41a4-6764-439e-9fcf-74fefaffc681.jpg', + keyword: !0, + link: 'https://anchor.fm/s/11e95d20/podcast/play/46497075/https%3A%2F%2Fd3ctxlq1ktw2nl.cloudfront.net%2Fstaging%2F2022-0-22%2F243683259-44100-2-0108d40b0f999.mp3', + node_type: 'clip', + pub_key: '', + ref_id: '80462fda-0ec7-4677-bd1b-cd7741154f39', + show_title: 'BTC Sessions', + text: "Look at Tonga, too. Super unfortunate what just happened with the tsunami there. But Lord FA Sitsua has been pushing hard and is looking like they're going to attempt to basically mirror what El Salvador has done. Later this year. They're putting forth more or less the same bill with some slight changes. Again, we got to wait till the fall to see what that actually looks like. But I'll be Frank here, I didn't know of Tonga before this and all of a sudden there's starting to be some recognition before the disaster that just happened. But up alongside El Salvador, you see mentions of this island nation that probably not a lot of people were aware of prior to kind of this human interest piece in and around El Salvador. And so I think we might see more of that over time. Of course, the Volatility lets the Naysayers have their temporary wins here and there. But I mean, it's like Peter Schiff tweets, right? You can always go back in a long enough time frame and highlightership yeah, you can always highlight some amazing Peter Schiff tweets and say, man, if you had just dollar cost average every time this man tweeted about Bitcoin, you would be sitting pretty. And it's very, very true of a lot of this where again, people again, even in the chat, look at what it's done in the past three months. Three months. How short is your time frame? Do you plan for the future at all with that kind of a small window of which you frame things? I would guess not. Bitcoin is boiling the legacy financial system slowly. Just a frog just boiling it slowly. Yeah, absolutely. And that's ", + timestamp: '01:05:32-01:07:59', + topics: ['tonga', 'el salvador', 'tonga', 'tonga'], + type: 'podcast', + weight: 4.962566472366181, + }, + { + boost: 0, + date: null, + description: 'Important things every new Bitcoiner should know', + episode_title: 'Café ₿: #Bitcoin Beginner Q&A', + guests: [ + { + name: 'Peter', + profile_picture: 'https://pbs.twimg.com/profile_images/1581695667193643009/EljNY-TH_400x400.jpg', + ref_id: 'a3384925-e15e-421d-b9f9-6d44e273ed05', + twitter_handle: 'PeterAnsel9', + }, + { + name: 'Stephan Livera', + profile_picture: 'https://pbs.twimg.com/profile_images/1362551718110580740/v-W5Q2uo_400x400.jpg', + ref_id: '72f57157-c96e-4466-8bf1-290cfe1f8a0b', + twitter_handle: 'stephanlivera', + }, + { + name: 'Thomas J Lake', + profile_picture: 'https://pbs.twimg.com/profile_images/1529168328534769670/5cl2Y_k-_400x400.jpg', + ref_id: '21541a47-0601-447c-99c2-312d1a63c19f', + twitter_handle: 'thomaslake', + }, + { + name: 'Goodguy', + profile_picture: 'https://pbs.twimg.com/profile_images/1363216959576285185/unulY4yd_400x400.jpg', + ref_id: '0c3fec75-9cc2-4c0f-8dbe-db7fae2b585b', + twitter_handle: 'goodguybiker', + }, + ], + hosts: [ + { + name: 'Brady Swenson', + profile_picture: 'https://pbs.twimg.com/profile_images/1502564606836981763/fmqtNrNc_400x400.jpg', + ref_id: '49966553-d55b-44c9-94ec-8fee09eee5c2', + twitter_handle: 'CitizenBitcoin', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/239722cb-4216-414a-a17b-5adf9d52e15a.jpg', + keyword: !0, + link: 'https://stakwork-uploads.s3.amazonaws.com/uploads/customers/2707/media_to_local/35b20273-49f2-45ea-a9f4-dc479d86573c/7ae5315f-beb2-41e2-b672-65dd1f102017.mp3', + node_type: 'clip', + pub_key: '', + ref_id: '3d112a9e-f3a1-4edb-96b0-c3a8c63b0c4a', + show_title: 'Swan.com', + text: "would be the top three things. You think it would be important for a new person to know and then we can kind of go around and get the same thoughts from Tomer and maybe Peter and really anybody else who wants to go. A good guy. Yeah, sure. So I think there's a few obviously key resources that are important. I think getting motivated and understanding, like having a good sense of what bitcoin is matters, and so getting, I think, the right jumping off point matters. Obviously, stacking stats and accumulating some stats is important, not your keys is an important thing. But for example, reading as an example, the Bullish Case for Bitcoin by VJ. Boyer party, right? So I think that's a good example of a short, intro, long essay or booklet length thing that you can read and. It will give you some sense of the motivation here and some sense of the problem and the challenge. So I think that is an important starting point. Of course, our CTO yarn pritzker, co founder of swan, has written inventing bitcoin that's also a fantastic starting point in terms of understanding some of the technicals of bitcoin without getting into the actual, like having to read code or technical aspects of it. I think it's a fantastic intro book. So I often recommend that as a starter book. I think those are some really good places to start. And then from there, and I mean, even harkening back to Greg Foster's comments earlier, right, this whole idea of skin in the game, put your money where your mouth is. I think it's a similar thing with bitcoin. What you'll find is you can lecture to people all day, but until they have some actual skin in the game, what's the chances that they are going to really take it seriously and spend some time learning? I think one other tip I would give for new people is actually use the technology, right? Send an on chain transaction, right? Use a bitcoin wallet, receive some bitcoin, like withdraw some coin and practice spending some bitcoin on chain, even if it's to yourself into another wallet that you control. In some sense, it's moving money out of your left pocket, into your right pocket, but actually using the thing. Then what happens is you'll start to ask yourself more questions because then you'll start thinking, oh, hey, wow, okay, I just sent a transaction. Oh, look, let me look up the transaction ID. And let me look that up in a block explorer like mentor space or block stream info as some examples, or OXT me or some of the kycp.org, like these different explorers out there. And they can give you some things to think about and understand. Okay, what was the fee rate for this? What are these inputs and outputs? What's going on there? All of these aspects. And I understand at the start that sounds like jargon, it sounds like engineering, it sounds like, whoa, that's like but what happens over time is as you get into bitcoin, you just, you start to once you have that right, motivation, then you just you can't stop going further down the rabbit hole. All right, tomorrow, if you had to pick three things, what are the most important things you think a new person would be valuable for a new person to understand about bitcoin? Yeah. So the first thing is use bitcoin the way it was designed to be used, and tune out all the rest. Tune out people promising yield, people talking about altcoins, people talking about yield, people talking about staking, people talking about everything else. Just go back to the very beginning. Bitcoin was the granddaddy. It came out as software that you can run where you can take custody of these things called bitcoin. And you could send them and spend them. So start there. Start at the very beginning. And it's like learning to drive a car. Do it with a small amount of money, as you would drive a car in an empty parking lot at the beginning. So use a small amount of money. Practice. I'm preaching the same things, just with different words than what Stefan said. So get those two things going and then let your curiosity lead you through the various aspects of the rabbit hole and many others. You may be a reader, you may be a tinkerer. You may be someone who prefers to learn from videos. You may be someone who likes to listen to spaces, all these sorts of things. There is no one right path, which is beautiful because there's many right paths. There are also wrong paths that lead you to the right path. You may get wrecked or burned by trying to be greedy or something else. And those are lessons. Again, you may learn them at someone else's expense by watching someone else make mistakes, or you may have to learn these lessons personally. But I think that, for me, is the thing. Go back to basics. Practice with a safe amount and follow your curiosity. ", + timestamp: '00:30:18-00:35:03', + topics: ['Bitcoin education'], + type: 'twitter_space', + weight: 4.926955223083496, + }, + { + boost: 0, + date: 1633363603, + description: 'Innovation and scams', + episode_title: + ' The Bitcoin v Crypto War with Udi Wertheimer, Crypto Cobain, Alex Gladstein & Allen Farrington', + guests: [ + { + name: 'Crypto Cobain', + profile_picture: 'https://pbs.twimg.com/profile_images/1601273673041776641/7FrXDRv6_400x400.jpg', + ref_id: '8fa5fec2-f714-433e-a8c9-ee5e76dabaf0', + twitter_handle: 'cobie', + }, + { + name: 'Allen Farrington', + profile_picture: 'https://pbs.twimg.com/profile_images/1414147363560730624/EXMx91D6_400x400.jpg', + ref_id: '8660a251-950b-4888-adbf-21f790210cf6', + twitter_handle: 'allenf32', + }, + { + name: 'Udi Wertheimer', + profile_picture: 'https://pbs.twimg.com/profile_images/1600897375001874432/8pdVDKUz_400x400.jpg', + ref_id: '483291b7-2101-4c28-a065-93b1524d0552', + twitter_handle: 'udiWertheimer', + }, + { + name: 'Alex Gladstein', + profile_picture: 'https://pbs.twimg.com/profile_images/1382371620669452292/VOPKOc8w_400x400.jpg', + ref_id: '49445c1c-7c66-4b73-9eec-09a337befbec', + twitter_handle: 'gladstein', + }, + ], + hosts: [ + { + name: 'Peter McCormack', + profile_picture: 'https://pbs.twimg.com/profile_images/1524287442307723265/_59ITDbJ_400x400.jpg', + ref_id: '887a65a7-a2d8-4371-887e-bc7a6ca6ff17', + twitter_handle: 'PeterMcCormack', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/4e607036-8fde-48ef-ab76-9c2ac4bab031.jpg', + keyword: !0, + link: 'https://chtbl.com/track/282487/traffic.libsyn.com/secure/whatbitcoindid/WBD405_-_Cobie_Udi_Alex__Allen.mp3', + node_type: 'clip', + pub_key: '', + ref_id: '1f39afe1-2026-44ca-a0b5-80aea9a8cc83', + show_title: 'What Bitcoin Did with Peter McCormack', + text: "Push back there. That's a lot. Great stuff. Let me go one by one. The first thing you said ethereum. If we're talking about ethereum desension, we have to talk about the monetary policy. We have to talk about the hardforks. I mean, nobody knows how much ETH is going to be minted in 2023. 2024. A small group of people will decide. And I think it's really dishonest, actually, to not mention that. And that's why I think it's centralized. So that's my point. My perspective. Second thing is on innovation. But as I mentioned, everyone knows it. I had to go dig in interview at EF Engineers to find out how much if they thought would be minted in the night. Like, nobody knows, literally nobody whose job. Is to mention it to you. Like people talk about it all the time. Who's the dishonest actor who's supposed to represent those facts? Anyone who's saying it's decentralized when clearly a small group of people is going to determine the monetary policy and not the public. Do you mean cosmic EIP? And there's an EIP 1559. So that economic activity on chain impacts the future. Yeah, it's a hard fork. And the people, the users don't get to decide, they just get hard forked out. This to me is quite clear. But again, we can debate and then just to do a couple of other things and we keep going on the innovation. Why are we all here? The innovation is to escape regulation. Bitcoin is money beyond regulation. NFTs are trading Art beyond regulation. Unitswap is trading assets beyond regulation. ETH is supposed to be running contracts beyond regulation. So it's all about can you evade regulation or not? So I do think that's the important thing with regard to crypto and being nice to people and this idea of are these toxic people bad for Bitcoin? I agree with you, Udi. Bitcoin is going to be fine. Like, Bitcoin is going to, I think, complete its mission over time. It's the people that aren't going to be fine, right? The people that are going to miss this project, the people who've been gaslit for a decade by the mainstream media about Bitcoin, who've been told not to buy Bitcoin because it's dangerous, because it's scary. A lot of people have really lost a huge opportunity, especially in emerging markets, because of what their government and the media have told them to stay away from Bitcoin. When it comes to these crypto projects, I think it's the opposite. I think we need to be more outspoken. Otherwise what happens is that Ripple is in Bloomberg today, and you have smart people who don't know a lot about the space thinking that Bhutan is going to adopt Ripple as their currency. Like that's in fucking Bloomberg today, okay? And you have Carnegie Mellon, a very prestigious institution, by the way, which is a very important institution in America, taking all this money from Hopkinson and promoting Cardano. This is what happens when we don't speak out. People get scammed. So I think it's actually the opposite. We should be talking more about these things because bitcoin is going to be fine. People need our help. And look, if you've got all the time in the world and you're a talented trader, you're going to be fine. Like you're going to clean up in the coming years as we go through these different kinds of crypto bull markets. But the average person is going to be confused. They're not going to know what's going on. And it's not like the average person bought a bunch of salana last Thanksgiving. They bought it in the last couple of months. Like the people who created Solona made the most money. These are the things on my mind. That's a really interesting point because if you listen to Charles Hutchinson's interview on Lex Friedman, I think everyone can agree he's a complete dishonest prick when he talks about Bitcoin. And his job there is to convince the listeners of Lexus show and perhaps Lex, that Cardano is something they should consider. And what's really interesting is I moderate all the comments on my YouTube because there's so many scammers, and when I talk about scammers, it's like, join my Telegram group. If you go on any Vice video at the moment, you can see what we're dealing with. I have to delete hundreds a day. But in there, what we also have is there is consistent chilling from people saying, but you need to consider cardano, why aren't you considering Hex? And it's always the same projects, so I'm going to throw this over to Kobe. How much do people actually pay? Look, you mix in the trading community. There's a lot of people out there trading. And the way I explained it recently to somebody, I don't buy anything apart from Bitcoin. But I almost feel like I'm sat in a conference room in Vegas with Alex Gladstein discussing human rights and through the window and seeing all my friends on the roulette table and having fun. And whilst I know they're gambling, I see all this ", + timestamp: '00:46:09-00:50:44', + topics: ['Crypto scams', 'Carnegie Mellon', 'Charles Hutchison'], + type: 'podcast', + weight: 4.92695522332177, + }, + { + boost: 0, + date: 1672167683, + description: 'Does Bitcoin mining price determine Bitcoin price?', + episode_title: 'TOXIC HAPPY HOUR! #Bitcoin, Beer and Plebs! 🍻😂🤌🏻', + guests: [ + { + name: 'Dr. Jeff Ross', + profile_picture: 'https://pbs.twimg.com/profile_images/1475554600094552064/DSlPG1lx_400x400.jpg', + ref_id: '51a969bb-dbf7-4d20-b128-74dcc5f560f6', + twitter_handle: 'VailshireCap', + }, + { + name: 'Tomer Strolight', + profile_picture: 'https://pbs.twimg.com/profile_images/1591960241008148481/HtyINxtU_400x400.jpg', + ref_id: '3a2bc97d-072c-4ed9-9a59-17ceeb68fe99', + twitter_handle: 'TomerStrolight', + }, + { + name: 'Laura Shin', + profile_picture: 'https://pbs.twimg.com/profile_images/1539462748173746176/hxR80FYT_400x400.png', + ref_id: 'a56a7b4d-edca-41d5-9d51-33396aa05b96', + twitter_handle: 'laurashin', + }, + ], + hosts: [ + { + name: 'PUBLORD', + profile_picture: 'https://pbs.twimg.com/profile_images/1480160632360124416/AM_vVRko_400x400.jpg', + ref_id: '8126d933-0986-4fd2-a6be-c02581294463', + twitter_handle: 'publordhodl', + }, + { + name: 'Anders Jensen', + profile_picture: 'https://pbs.twimg.com/profile_images/1382039124991954947/Wb9kT7MO_400x400.jpg', + ref_id: 'af45195e-77a6-463f-ba64-29c6b0437d9c', + twitter_handle: 'andersjensenorg', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/2a1450bc-0649-4dc5-8ec9-1474af1ea1c3.jpg', + keyword: !0, + link: 'https://stakwork-uploads.s3.amazonaws.com/uploads/customers/2707/media_to_local/f7b6cfcb-7cd4-4401-a3fb-7735bb570c07/2ae49fca-a048-4a34-93b9-247513af5699.mp3', + node_type: 'clip', + pub_key: '', + ref_id: '2656d145-191a-4e86-8261-04c88a9a6562', + show_title: 'Anders_🍆', + text: "Sack, welcome to the stage. How's it going? Merry Christmas, police. Navidat. Hey. Merry Christmas, everybody. Good to be here. And I just had a quick question. I thought I'd throw it out there. It's not heavy heavy, but I just got caught up on some of the Miting concerns, and I just thought I'd ask if anybody can share with me. Their thoughts on how bad is what. Does it actually mean to the price. Of bitcoin that all of these miners under? I think there's a lot of questions. See if there was any feedback that's a lot of people sorry if I'll keep quiet. If you have further, I'll let you finish. Okay. So I think that's a it's been a discussion going on for years whether mining drives the price of bitcoin or the price of bitcoin drives mining. I guess there's a feedback loop there, but definitely the higher the price of bitcoin, the more incentive to mine it, for sure. But it also seems to sometimes on shorter term lead the price of bitcoin. Because either people see it as a confirmation that there is belief in it and it's getting more secure as hashing rate goes up, or like we saw when china quote unquote, well, actually did ban bitcoin mining back in was that I can't even remember. Was it may this year? I think it was 2021 around that time, and the hash rate dropped to half and a lot of people got spooked and the price of bitcoin collapsed. I'd say a little bit of both, but tomar, you are well worse. Go ahead. Yeah, I think maybe I'd say two things. One, over the history of bitcoin mining has been incredibly volatile. Up and down, back and forth. When the first asics came in, there was only one company making asics. Then a few others came in, that one company disappeared. It wasn't even a real company. And then many of those went out of business. And of course, bitcoin survives through it all. The most important innovation in bitcoin that people talk about is this difficulty adjustment thing which relates to the mining. And so if miners go out of business, then it gets easier to mine bitcoin. And that means that bitcoin continues to operate flawlessly. It also means that it gets cheaper to mine bitcoin, so more people are attracted to mining it if it becomes profitable again. And so what I've noticed in my ten years in bitcoin now is mining is like if the bitcoin price is like a sign curve up and down, but skewed up and to the right. The bitcoin mining is like a scaled up version of it. When the price goes up, you get way more mining, and when the price goes down, you end up getting way less mining and it lags behind. So they run ahead and they run behind. I don't think it's any fundamental what I'm getting to is I don't think it's any fundamental concern to bitcoin's ongoing steadiness or its security or anything of that nature. It's simply a reflection of what the economics are to mine bitcoin at any given point in time. And when the price was high and energy was cheap and money was cheap, people were borrowing money to pay for miners and energy on credit to mine expensive bitcoin. And now that it isn't. They aren't. So it's just rational. But the same number of bitcoin are being produced as would have been the case if the price had been high or if the price had been $1, than just kind of that's a promise that no amount of added or subtracted mining can break the supply. And its issuance schedule and the rate of development of the blocks is essentially exactly as described in the white paper. And when I say essentially, I don't even need that, it is exactly as described in the white paper and will continue to be. So. I think those are awesome points that Tomer made. And I'll throw just a little side tangent on this because I think in terms of investments for almost everything regarding the bitcoin miners, right now, there's a perfect trifecta going against minors. I like to think in terms of three trifectas. What's the trifecta? Low bitcoin price, high energy prices and then a high hash rate. Right now, those three things combine to make it really difficult to survive as a public bitcoin miner or even a private bitcoin miner. And so I get asked all the time by people like, should they invest in this minor because it looks stronger, this minor? I would say I would still avoid all of them. I think they're still dangerous and I still think we're going to see more of a minor capitulation before this is over. To Tomer's point, and this is critically important to understand, that doesn't affect bitcoin. At the very least, the network is still super strong. It will still continue to do what it's designed to do. But bitcoin miners, they offer beta to the price of bitcoin. And so in bull markets they can outperform for a season, and then in bear markets they tend to drastically underperform. I would just be super careful. We were talking before Tomer, you got up here, we were talking about bitcoin proxies, talking about GBTC and MicroStrategy. I would include minors in that list as well. A lot of people invest in miners in their IRAs and their 401 KS because they can invest in bitcoin itself. If you are you've had a tough year and I think it's going to get worse before it gets better. I still think we're going to see many miners, like flat out capitulate actually go bankrupt. Some will survive, a small handful will survive all of that. What that does is it drags the price of bitcoin down a little bit further. It drives the price of asics down a little bit further. I like it, though. This is capitalism. It's called creative destruction, right? So basically the people who have been smart and who have been ready for tough times, they're going to get rewarded, they're going to get cheap. Minors, individuals who have been saying giving up, and who have been smart and they've had their head downs, they've stayed humble, they've been stacking SATS and putting some cash. Away, they're going to be able to buy asics for super cheap and they're going to be mining in the next cycle. And that's awesome. That's the way it should be. Bitcoin itself, it naturally decentralizes. Over time, it gets more and more decentralized, unlike cryptos, which get more centralized over time. So I think it's beautiful. It's sad if you're an owner of one of those companies because they're going to get smoked, but it's great if you're everybody else in the bitcoin ", + timestamp: '01:36:47-01:43:20', + topics: ['Bitcoin mining', 'Bitcoin hashrate', 'Bitcoin network'], + type: 'twitter_space', + weight: 14.092456989642082, + }, + { + boost: 0, + date: null, + description: 'How Bitcoin has performed as a tool for freedom in the year 2022 ', + episode_title: 'Gladstein & Sam Callahan - World Bank / IMF & #Bitcoin', + guests: [ + { + name: 'Sam Callahan', + profile_picture: 'https://pbs.twimg.com/profile_images/1592532728775409667/0DayEP2Q_400x400.jpg', + ref_id: '5a044a91-8dee-421c-86dd-8c734dc9bc32', + twitter_handle: 'CallahanMusic_', + }, + { + name: 'Alex Gladstein', + profile_picture: 'https://pbs.twimg.com/profile_images/1382371620669452292/VOPKOc8w_400x400.jpg', + ref_id: '49445c1c-7c66-4b73-9eec-09a337befbec', + twitter_handle: 'gladstein', + }, + { + name: 'Brady', + profile_picture: 'https://pbs.twimg.com/profile_images/1502564606836981763/fmqtNrNc_400x400.jpg', + ref_id: '45bbbb01-6163-4b3b-905a-fc67174893d9', + twitter_handle: 'CitizenBitcoin', + }, + ], + hosts: [ + { + name: 'Neil Jacobs', + profile_picture: 'https://pbs.twimg.com/profile_images/1593645788978102277/UAQCQKeE_400x400.jpg', + ref_id: '0bc759e0-b055-4800-a79d-2b950fe5cc53', + twitter_handle: 'NeilJacobs', + }, + { + name: 'Alex Stanczyk', + profile_picture: 'https://pbs.twimg.com/profile_images/1539055022364708864/rwErK6x1_400x400.jpg', + ref_id: '3126e2a3-bbe4-456b-b298-9714085fa286', + twitter_handle: 'alexstanczyk', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/239722cb-4216-414a-a17b-5adf9d52e15a.jpg', + keyword: !0, + link: 'https://stakwork-uploads.s3.amazonaws.com/uploads/customers/2707/media_to_local/f8be7c60-94a5-41d0-972c-6301cd4ad7f0/4e5bf86b-6193-4f6e-8fa3-933344b2053e.mp3', + node_type: 'clip', + pub_key: '02574d6e8e787372184b6f17c40d6c6fe1777db9015801f95dfd24692784d767cd', + ref_id: '888c6962-f33f-4e88-a1cb-6819baabe35f', + show_title: 'Swan.com', + text: "We can pivot a little bit from Africa and just talk about maybe 2022 more broadly. We're coming up on the year end. I feel like you have a unique perspective, given your position at the Human Rights Foundation and your work specifically around Bitcoin being used as a tool for freedom. And I was wondering, if you just think back in 2022, how have we done? How is Bitcoin done to be a tool for freedom? In your mind? What got you excited this year in that kind of purpose for Bitcoin? Bitcoin is doing what it was created to do, which has become a parallel economy for people that don't want to deal with the state. I think that in doing so, it is also kind of finding its way through the existing financial system. So I think that there are things that pop up as Bitcoin adopts that you couldn't have predicted. Some of them are temporary and some of them are permanent. Who knows? We know that we don't know what Satoshi or Hal or any of the early Bitcoinners thought would happen. But it seems pretty obvious that Bitcoin's ability to monetize stranded energy was not really at the top of their list when they were designing the white paper, right? Or when Satoshi was designing the white paper. That was not very clearly not something they realized would happen, or at least was maybe a peripheral thought. So you get a lot of these things along the way towards separating money from state, and one of them happens to be improving Fiat services, which I know Bitcoinrs are divided on. But the reality is, it's true. On our way to the Bitcoin standard, we live in the Fiat standard. It is what it is. And it's really interesting how Bitcoin can connect Fiat companies in ways that Fiat companies cannot use Fiat rails to connect to Fiat companies. Like, this is kind of a powerful thing, and it'll end up in the end with Bitcoin companies connecting with Bitcoin companies. But for now and I guess being in Africa really brings us into focus, but you realize how financially disconnected the world is, and that's not again, it was designed that way. It was designed by companies and services who found a business model and being able to connect people and be able to extract rent from them, moving money on a particular rail or service. So I think, for me, this year has been a big reflection on, like, capitalism more generally, or what we would refer to capitalism. Like, I'm kind of with Alan Farrington. He wrote a great piece called this Is Not Capitalism. I would encourage everybody to read it. Makes for a great holiday read. It's also part of his awesome book called Bitcoin is Venice, which you should read. But basically he's describing how, like, the post 71 Fiat political economy, which essentially is like an operation where the state can be the lender blast resort for all parts of what would normally be a free market economy, obviously not capitalism. And I think that's true for a lot of things in the world. But on the other hand, it is what it is. It's kind of like a cop out to say that it's not capitalism. In a way it's not communism, you know what I mean? It is the American model of economic growth and development. And if you want to say that that's not capitalism, fine, but you got to call it something else. But that's what kind of like leftist critics would describe as capitalism. That's like what they don't like, right? It's like American multinational companies, right? So if we're going to sit here and say that's not capitalist, okay, fine, and I'm sympathetic to that. But the idea is that in the reality is we have a business industry globally that is known as capitalist, at least to most people, and won the cold War or whatever and has developed since then. And I think it has the wrong incentives inside of it, right? So if your incentives in, quote unquote, capitalism, let's say 1.0 or whatever this is that we have fiat capitalism or whatever you want to call it, the incentives are wrong. The incentives are for companies to come in and split people apart, to make money off of them and to attract rent. So I think whatever bitcoin brings to the table, bitcoinism or capitalism 20 or whatever you'd want to call it, is really interesting because it's open. So and I'm who knows how this thought process will develop over the coming decade, but it seems at least plausible that over time, like bitcoinism would result in costs like going down or rather deflating because of the open competition that results from bitcoin economies. Whereas in the capitalist 1.0 model you have a lot of these systems that are set up to become Indian monopolies which end up doing a lot of rent seeking and kind of like unusual things that put money in the hands of a very small percentage of the population and extract resources from others. I think this goes all the way to the macro level of global trade and commerce, all the way down to the micro level of daily payments. And I think that I'm very optimistic about a bitcoin like a different system being built on bitcoin where the incentives are just different. And you would start to see that in Africa, let's say, when you're thinking about how broken the continent is and how broken apart it is rather by both local corrupt leaders and by foreign powers and how Bitcoin would just unite and we create one simple monetary language for the continent. I just think the incentives are very different. I think companies are incentivized to cooperate, cooperate with people as opposed to exclude them or exploit them. And I know this is overly simplistic and clearly, like you could steal man it, but you can just kind of feel this it's very palpable when you're talking to the entrepreneurs in the space. Yeah, that's one of the big things I'm ruminating on as we close out 2022 ", + timestamp: '00:35:28-00:42:23', + topics: ['Bitcoin 2022', 'Bitcoin freedom'], + type: 'twitter_space', + weight: 4.890018939971924, + }, + { + boost: 0, + date: 1671720944, + description: 'What to expect on Bitcoin Day Naples?', + episode_title: 'Café ₿: #Bitcoin News & Bitcoin Day w/ @Bitcoindayio', + guests: [ + { + name: '@johnmichaeldrew', + profile_picture: 'https://pbs.twimg.com/profile_images/1512897699942744064/PuRU3K8P_400x400.jpg', + ref_id: '6b72ee7f-52ef-4847-96ed-78ea09e3f19b', + twitter_handle: 'johnmichaeldrew', + }, + { + name: '@mattyicesensei', + profile_picture: 'https://pbs.twimg.com/profile_images/1607138483579101186/0qm0xaCF_400x400.jpg', + ref_id: '286abd3b-cecc-4ec5-bf88-2a9fd5393083', + twitter_handle: 'mattyicesensei', + }, + { + name: '@Bitcoindayio', + profile_picture: 'https://pbs.twimg.com/profile_images/1493098733608837121/tLI-XTwl_400x400.jpg', + ref_id: '6a87699e-7a27-4928-89e8-d884f1458bf9', + twitter_handle: 'Bitcoindayio', + }, + ], + hosts: [ + { + name: '@alexstanczyk', + profile_picture: 'https://pbs.twimg.com/profile_images/1539055022364708864/rwErK6x1_400x400.jpg', + ref_id: '6455df34-1abc-4ce8-9bb8-b02d411accec', + twitter_handle: 'alexstanczyk', + }, + { + name: '@SwanBitcoin', + profile_picture: 'https://pbs.twimg.com/profile_images/1491428856858914820/aFlitvha_400x400.jpg', + ref_id: 'da3f56bf-9763-4389-a9ec-d807049bd0b8', + twitter_handle: 'SwanBitcoin', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/239722cb-4216-414a-a17b-5adf9d52e15a.jpg', + keyword: !0, + link: 'https://stakwork-uploads.s3.amazonaws.com/uploads/customers/2707/media_to_local/83744e68-b563-4004-b52a-cfdfff89748f/12c9b9f2-fbce-4784-9404-88a574baa762.mp3', + node_type: 'clip', + pub_key: '', + ref_id: '6f72249d-ab08-4a9e-ac54-545f618c29d2', + show_title: 'Swan.com', + text: "another speaker we don't have up there yet because we're announcing it just now, but I sneak preview that we're also luke Jr. Actually is down there, so he's going to be coming as well. We're going to get him on the schedule, but we're trying to get all the bit devs going to come in from the ones that are nearby, at least Miami and Tampa and those guys. But we're going to have a bit devs, kind of a day long. I don't know if they're going to kind of just have a 1 hour thing, but we're going to have bit devs as well from all over Florida come together, which is probably the first time they've ever done that. And then also Mike Yarmou's Muzz, he's going to have one of his bitcoin blitz chess tournaments as well. Well, that's brand new. I don't even know that. Thanks, Edward. That's cool. Let's turn it and then yeah, we got the bitcoin or the toxic happy hour, guys. So you want to talk about that? Is he still on? Yeah, I'm here, man. All right. I know Anders, I think, had reached out to you, and it's pretty cool because we had just gone up to Charlotte, and when your first conference is the bitcoin conference, you think like most conferences are like this. Of course, there's bit block boom and Pacific. Bitcoin now are the larger. But it was great, man. Yeah, they invited us up just to hang out, man, basically. And the great thing I'm working my travel schedule, and if I'm here, I'm coming down there, man. I know Anders will be there. What was great is and it takes you back to your roots because the people you have coming in, what you don't realize is how much you know. So people that have been here for a couple of years, you don't realize how much you've learned. And when you go to these conferences and you meet people that were in your shoes three, four, five years ago, it's just really cool because really you're helping somebody. You're really helping somebody to learn and understand. And that's my favorite part of it. It's not there just to see and be seen. It's there because there are absolute no corners that come to these. And I'm up in Charlotte for Halloween. What was cool is you had some rooms going on everywhere, and one was simply showing them, hey, how do I download a lightning wallet? And to see their faces. When you send them a few stats, they start to get it like, my God, I've got value outside the system here. This is the coolest thing ever. So yes, man. Yes. Dr. Kapir we'll come down there. I see fossils on stage. He and Larry's there. So hopefully we'll meet up with them as well, because, man, at the end of the day, bitcoin is about humanity, about the friendships you meet here. Fantastic. Hey, Greg. How's it going? Hi, guys. Were you talking to Foss? Yeah. Nice to talk to you guys. Nice to talk to you. I'm getting some feedback here. If you're up here and if you're not talking, mute yourself, please, because it causes the feedback. Alex, how are you, buddy? I actually have to be up and then jump. I saw this thing come across. I'm actually going on a lead lag report spaces at noon, so I have to prepare for that a little bit. But I think I know why we're here. We're talking about the Naples bitcoin. Naples day. There'll be the second or third one I've been to. This will be number three. It's a great spot. It's a great group of people. Larry LaPard is going to be there, I think. I'm trying to get James Lavish to come. I know Maddie Ice is going to be there. I hope Steve Luka is going to be there again because he put on a great show the last time. So looking forward to seeing everybody at Bitcoin Naples. It won't be a disappointment, I promise you that. And Puppy lives in the vicinity, I think Tampa Bays within a couple of hours drive, right. So let's hope to see everybody there. And if I don't talk to you before the Christmas break, happy holidays to everybody. 2023 is going to be an exciting year. So let's get ready. Thanks, guys. Thanks, Greg. Talk to you later. Have a merry Christmas. Thanks, robin hobro. Yeah, we hope that so. Yeah. Hopefully people come down from Tampa. Angel is coming down. He's like in Jacksonville or something. He's up north a little ways but talked to quite a few people coming from Miami, too. So few caravans hopefully, coming from Miami. So I think it is even if you've been to bitcoin 22 or whatever, I think it is certainly a different vibe. Like I said, smaller and little less glitzy maybe. But hopefully we get people from both. I like the smaller venues. There's less people. The people to speaker ratio is a lot lower and it's more intimate. You can spend more time talking to them. And I like those environments a lot better, personally. It's. One of the reasons why Pacific Bitcoin did so well is it was smaller we're having at the college down there, and I think that I'm hoping we'll get some students from the college if we can get the word out to them. And then also wanting to make it like I really like the Bitcoin summer model where they were doing development with students that's kind of working with colleges, that's kind of the model or the vibe that I'm looking to recreate is get some students orange pills or help them get into this space more. Very cool. Very cool. Yeah. So we're at Florida southwestern state college, which is its main campus, is up in Fort Myers. But they do have a campus down in Naples. It's named after the county, so it's the Collier campus where Naples is in Collier County. And it's a beautiful small little campus. It's got about maybe eight or ten buildings on the campus. And we've got a nice room, a large room in one of the buildings and then a smaller classroom on the side for some networking events. And probably that chess event will take place in that room. A beautiful little setting. And I know we've been talking about Florida people, but Naples is a beautiful vacation destination. So in January, the weather is absolutely beautiful. The beaches are awesome. You can come down for a long weekend, stay in a nice hotel, spend Friday on the beach, saturday at bitcoin day and Sunday on the beach and head back to wherever you're coming from and be totally relaxed. ", + timestamp: '01:48:15-01:55:45', + topics: ['BitcoinDay.io'], + type: 'twitter_space', + weight: 12.160706504077877, + }, + { + boost: 0, + date: null, + description: "Alex Gladstein's recap of his African Bitcoin Conference experience", + episode_title: 'Gladstein & Sam Callahan - World Bank / IMF & #Bitcoin', + guests: [ + { + name: 'Sam Callahan', + profile_picture: 'https://pbs.twimg.com/profile_images/1592532728775409667/0DayEP2Q_400x400.jpg', + ref_id: '5a044a91-8dee-421c-86dd-8c734dc9bc32', + twitter_handle: 'CallahanMusic_', + }, + { + name: 'Alex Gladstein', + profile_picture: 'https://pbs.twimg.com/profile_images/1382371620669452292/VOPKOc8w_400x400.jpg', + ref_id: '49445c1c-7c66-4b73-9eec-09a337befbec', + twitter_handle: 'gladstein', + }, + { + name: 'Brady', + profile_picture: 'https://pbs.twimg.com/profile_images/1502564606836981763/fmqtNrNc_400x400.jpg', + ref_id: '45bbbb01-6163-4b3b-905a-fc67174893d9', + twitter_handle: 'CitizenBitcoin', + }, + ], + hosts: [ + { + name: 'Neil Jacobs', + profile_picture: 'https://pbs.twimg.com/profile_images/1593645788978102277/UAQCQKeE_400x400.jpg', + ref_id: '0bc759e0-b055-4800-a79d-2b950fe5cc53', + twitter_handle: 'NeilJacobs', + }, + { + name: 'Alex Stanczyk', + profile_picture: 'https://pbs.twimg.com/profile_images/1539055022364708864/rwErK6x1_400x400.jpg', + ref_id: '3126e2a3-bbe4-456b-b298-9714085fa286', + twitter_handle: 'alexstanczyk', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/239722cb-4216-414a-a17b-5adf9d52e15a.jpg', + keyword: !0, + link: 'https://stakwork-uploads.s3.amazonaws.com/uploads/customers/2707/media_to_local/f8be7c60-94a5-41d0-972c-6301cd4ad7f0/4e5bf86b-6193-4f6e-8fa3-933344b2053e.mp3', + node_type: 'clip', + pub_key: '02574d6e8e787372184b6f17c40d6c6fe1777db9015801f95dfd24692784d767cd', + ref_id: 'f84d9798-f31e-480e-9da6-9be8dc74f6be', + show_title: 'Swan.com', + text: "can rerehearse. No, it's interesting because I saw Sam clapping, so I thought that it was working, but apparently not. It was. I think we probably heard more than we heard a lot of it. Man did you hear me talking about the mining? Mining? No. Okay, so we didn't hear the mining. So maybe start there. Okay, so to recap awesome event. No one tried to sell me a token. You learned a lot about how the main use case for a lot of Africa today is receiving bitcoin from abroad, because crossborder payments suck, and a lot of entrepreneurs have found ways to be the off ramp for their families and communities in different countries. Like, I met a guy who was doing this in Somalia. Like, lives in Mogadishu, has 30,000 clients in Somalia. He receives the bitcoin or stable coins from abroad, and then he's the off ramp, and that's what he gets paid for to do. There's tons of businesses like this in Africa today, and you get enough businesses like that, and then you also probably start to start to get a little bit of a circular economy going as well. So that's why we started seeing, I think, a bunch of other people pop up at the conference who are doing merchant services and then mining. So I guess what I was trying to say about mining is that I think it's going to have a huge decade in Africa. It's going to be transformative. I met a kid I say a kid not to be diminutive, because he was, like, 19 years old, and he's from northern Nigeria, and he learned everything on YouTube about how to mind you guys can hear me fine, right? We're good? Brady yeah, we're good. Okay. So he learned how to mine on YouTube, and I guess in the delta region of Nigeria, there's an enormous amount of flared gas at night. I spoke to people who grew up there. You can just see it like the fire in the sky at night, and obviously represents an enormous opportunity to turn that into money and economic activity through the bitcoin network. I talked to him a little bit, and he's planning to go down there and capture some of that flared gas with a container operation this year. So I'm sure security will be, like, a high budget item for him, but that's the kind of gritty entrepreneur that you meet out there. I also just was shocked at the number of developers. I hosted a workshop about bitcoin for nonprofits. Maybe there were 35 people there. 20 of 20 of them were bitcoin lightning engineers from Nigeria. So they came to the workshop because they have local causes. They want to support and they want to be like the Uncle Jim type person. But I'm sitting there in this room and I'm like, wait a second, there's got to be more bitcoin engineers in Lagos than in San Francisco at this point. It's pretty amazing. And I think that's going to just explode in the coming two years. So, Kala is a program started by Carla Kirk Cohen and Bernard Para and a bunch of other African bitcoiners. And it helps programmers and coders become bitcoin programmers and coders. It's an incredible initiative. Qala is what it's called. So Ahref is proud to support Kala and they're going to be churning out a couple, at least a dozen, if not more bitcoin ecosystem contributors every year. And apparently they got in their first cohort, which is just sort of wrapping up. 100% of the graduates got placed with jobs in bitcoin companies, which is incredible. So that's something that's really cool. So I think that's another huge area that you start to see is that there's going to be this huge explosion of growth of contributors to the bitcoin ecosystem. From countries there, I learned about a bunch of other projects. One of them was the fact that a lot of people in Africa, in sub Saharan Africa, have feature phones, but they can't necessarily pay for. Internet is very expensive in a lot of countries. So you might have like an Android or whatever, but not be able to actually have data unless you're at a cafe with WiFi or something. So that's why it's very important to figure out how to use what's called USSD to interact with the bitcoin network. So USSD is like, you can use it on a candy bar phone. It's like a way to use text message protocol to run small apps. So it's sort of how it sort of impacts the type of thing. But the idea is you can send a text message and then get a series of commands back to your phone without Internet that allow you to send a receive bitcoin, which is pretty freaking amazing. And it's done by a team that was speaking at the African Bitcoin Conference and is growing and fundraising. So, yeah, I just got my mind blown like three times a day by stuff I was learning. I met this woman who launched this educational initiative in Nigeria to help girls and boys and teenage girls and boys, Muslims and Christians learn how to use bitcoin. That blew my mind when she told me about how it all works. So, yeah, I consider a pilgrimage to the Africa bitcoin Conference to be at the same level as going to, again, a place like Elsante or one of the other bitcoin circular communities. So, bucket list item for all of you for next year. So anyway, yeah, really fun. Yeah, I remember reading about that. I think it's machakura. I don't know if I'm right, but basically sending bitcoin over text messages. So it's tools like that that get me inspired, because trying to get it. Gives you like a menu and it's like, do you want to send? Do you want to receive? And of course, it's custodial there's issues, but it's like a way for people to send and receive and do activity over the lightning network using text message. And you can easily just withdraw. You can, like, withdraw funds to your own control as well at any point. So I think you start seeing people use some of these kind of systems as kind of spending wallets. Like, you might have some bitcoin in the same way that you might use like a wallet of satoshi or maybe someday soon a fetishment to do spending because it gives you something like privacy that you want. Well, in Africa, people might also have their cold storage or whatever, their savings, and then they might have a little bit of bitcoin in, for example, an account that allows them to get out there and use it and spend it without internet access, which is pretty amazing, actually. So anyway. Yeah, it's incredible just giving them the tools they need. ", + timestamp: '00:15:52-00:23:31', + topics: ['African Bitcoin Conference'], + type: 'twitter_space', + weight: 4.890018939971924, + }, + { + boost: 0, + date: 1635566400, + description: '[[John Vallis]] Intro', + episode_title: 'WHY ARE WE BULLISH Adam Curry Untapped Growth John Vallis Guy Swann ep211', + guests: [ + { + name: 'Adam Curry', + profile_picture: 'https://pbs.twimg.com/profile_images/1401922551161442307/XjN2DdFD_400x400.jpg', + ref_id: 'c304fffc-7fe0-49a1-86b8-d3278f5c89dc', + twitter_handle: 'adamcurry', + }, + { + name: 'John Vallis', + profile_picture: 'https://pbs.twimg.com/profile_images/1568743166035070976/4MyKww8A_400x400.jpg', + ref_id: 'c3a9fe29-3b78-4665-af54-e293e9d68962', + twitter_handle: 'johnkvallis', + }, + { + name: 'Guy Swann', + profile_picture: 'https://pbs.twimg.com/profile_images/1401969630634196995/DqOuszMi_400x400.jpg', + ref_id: '39c31930-d799-40a0-9a46-193117d03418', + twitter_handle: 'TheGuySwann', + }, + { + name: 'Untapped Growth', + profile_picture: '', + ref_id: '79de7f8f-4f00-48c4-897a-57aa2a5fb7da', + twitter_handle: '', + }, + ], + hosts: [], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/6b8fbd46-fa4a-4d07-a142-9aeb242d249f.jpg', + keyword: !0, + link: 'https://anchor.fm/s/11e95d20/podcast/play/42550048/https%3A%2F%2Fd3ctxlq1ktw2nl.cloudfront.net%2Fstaging%2F2021-9-30%2F442bcfea-951a-39d6-a1ce-0bbc6c7b43c3.mp3', + node_type: 'clip', + pub_key: '', + ref_id: '5b032ecb-09f5-4581-a1a8-cd0865de6076', + show_title: 'BTC Sessions', + text: "you, brother. It's always a pleasure. Yeah. I host a podcast or two podcasts now, I guess one called Bitcoin Rapid Fire and that's my own. And the other is closing the loop. And that's for CT, a subsidiary Bitcoin company of a larger energy group in Norway. And mine. I just started because I became obsessed with Bitcoin and in 2019, it kind of bubbled over and I couldn't not talk about it. And I needed some excuse to hit up these people in the space to have these conversations. And I guess since then, it's morphed into I don't get too deep into the technical aspect of things. I really like to discuss what's happening on the personal side of this phenomenon and how engaging with this thing and adopting it and using it as your kind of lens for many different aspects of reality influences people on a very personal and deep level and what kind of impacts that's having on culture and such. So, yeah, that's what I like to investigate. And I can't wait to chat with you guys. You also like to Orange pill people like Peterson, so that's a plus, too. I love watching him dive down that rabbit hole and start bringing in his circle into it. So I know that was a while back, but once again, kudos on that. So glad to have you. Thank you. Yeah, it's inevitable that Peterson takes the Orange pill and really goes down the rabbit hole. So it's nice to participate in some small way in that. Yeah. Peterson totally was on the same foundation of the principles to grasp it from and just started running with it. It's just great. So much of the bullshit in a matter of like 20 minutes. It was pretty amazing. Yeah, it was. God, why don't you take it away, let people know who you are and what you do as well. I'm the guy ", + timestamp: '00:08:28-00:10:23', + topics: ['john vallis'], + type: 'podcast', + weight: 4.856878281588437, + }, + { + boost: 0, + date: 1632628800, + description: + 'The Analogy of [[Automobile Innovation]] for Mass Production and the Development of Related Industries to [[Bitcoin]] and [[Lightning]] Development', + episode_title: 'WHY ARE WE BULLISH Denver Bitcoin CryptoMags Lord Fusitua Jim Crider ep203', + guests: [ + { + name: 'Jim Crider', + profile_picture: '', + ref_id: 'acb937b5-97e9-4881-a45e-0e9511382019', + twitter_handle: '', + }, + { + name: 'Lord Fusitua', + profile_picture: 'https://pbs.twimg.com/profile_images/1511890587586560000/xGb_Dq_D_400x400.jpg', + ref_id: '45559c92-d4f0-42a5-8dc4-a8cce65e95a1', + twitter_handle: 'LordFusitua', + }, + { + name: 'CryptoMags', + profile_picture: '', + ref_id: '79cd9104-fa2c-4996-a179-8acb75642acd', + twitter_handle: '', + }, + { + name: 'Denver Bitcoin', + profile_picture: '', + ref_id: '5ab53f2f-797f-4e1b-90d8-f2ca90e88af4', + twitter_handle: '', + }, + ], + hosts: [], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/638c47da-8592-4d7b-aa1a-20e28fa0499f.jpg', + keyword: !0, + link: 'https://anchor.fm/s/11e95d20/podcast/play/40846589/https%3A%2F%2Fd3ctxlq1ktw2nl.cloudfront.net%2Fstaging%2F2021-8-25%2F381320f0-9d1f-9ee7-893f-57af427aca69.mp3', + node_type: 'clip', + pub_key: '', + ref_id: '6f3620f8-fd11-4b37-b8c1-7b8bd991420c', + show_title: 'BTC Sessions', + text: "Think about when the car became much more accessible to normal people. That changed. Not only that changed the perception of the value of a car, that changed industries for production, and that also changed gosh, the way that cities were constructed. And we could have looked at that and said, Henry Ford, this is trash. You're making crap cars on a line. But the iteration there of, hey, let's get this to the masses. And then later on we're going to have these Supercars. But right now it's about getting it to the masses and allowing for an infrastructure to be built that we can continue to progress and build on from here. And allowing that to be shared. Yes, Henry Ford did some pretty crappy stuff, I guess. But the infrastructure that was built based off of that being accessible to the masses allowed for other people who weren't related. They weren't benefiting directly from Ford or company stock or whatever it was. This network of, hey, we're going to build roads, we're going to build gas stations, we're going to make tires. And right then it opened up a place of progress in a whole industry and the creation of something that had been thought of before just because it became accessible to more people. And that's what's happening right now. It's no longer this small thing that's for cyberpunks or something. It's the masses. And hey, how can this fit with my life? Ford effectively created the context for the word infrastructure. Infrastructure didn't mean anything before there was an automobile because all those roads, those highways, everything that infrastructure came from having an automobile. And that's exactly like you're saying. The entire infrastructure of what Bitcoin and Lightning will be used by will change the way people live, the way people consume music, food, how they store value. It will have ramifications right across the human experience. And just quickly, I just realized I completely did not answer Magg's question at all. Sorry. We've ", + timestamp: '01:19:31-01:21:40', + topics: ['automobile innovation', 'bitcoin', 'lightning'], + type: 'podcast', + weight: 4.856878280787084, + }, + { + boost: 0, + date: 1676393011, + description: 'The small time deposits component of M2 money', + episode_title: '#24 Decoding M2 (Non-M1): Money supply USA', + guests: [], + hosts: [ + { + name: 'Matthew Mezinskis', + profile_picture: 'https://pbs.twimg.com/profile_images/1497857369455398914/un-TpS6g_400x400.jpg', + ref_id: '0dc3360c-5243-43f0-a2f4-19f8a171550d', + twitter_handle: 'crypto_voices', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/3325efce-80a8-490c-8645-cad1b9a22d94.jpg', + keyword: !0, + link: 'https://anchor.fm/s/d8decf3c/podcast/play/65039444/https%253A%252F%252Fd3ctxlq1ktw2nl.cloudfront.net%252Fstaging%252F2023-1-14%252F312793741-44100-2-d61bc3a08476d.mp3', + node_type: 'clip', + pub_key: '02574d6e8e787372184b6f17c40d6c6fe1777db9015801f95dfd24692784d767cd', + ref_id: '3bfbecac-2ad1-4983-9ed0-f1e48f1f0149', + show_title: 'Crypto Voices', + text: "let's put savings back on. We have savings deposits, the vast majority of non M One, M Two retail money market funds. And now let's add the final component of M Two that we haven't looked at yet, and that is small time deposits. Now this is actually back to a bank. Typically. Typically this can be found in a bank, small time deposits. And let's take off savings and retail just to see this one now you see this one's a little bit more jumpy and way down compared to where it's been around the global financial crisis. It was a little bit more than retail money market funds. 1.4 trillion on the eve of the global financial crisis. And then you see that it fell steadily, steadily all the way until basically today where it's $357,000,000,000 of a small time deposit money supply for retail investors in the United States. There is at the zoom here again to comment on the retail nature of what M two is supposed to be. It's supposed to be more retail liquid monetary assets. Of course that's not always the case with small time deposits. They could be small companies that hold time deposits. Nonetheless, this is just how the Federal Reserve counts it out. I believe it's under $100,000 is a small time deposit. And so what is a time deposit? Similar instruments like a money market fund actually or even a savings deposit, which I didn't perhaps give a full definition either. This is again, when you want to hold your money, you want to hold a balance with a bank. And as we learned in prior videos, that does not mean that there's just physical banknotes and coins sitting in a big vault waiting for you to retrieve. No, that's not how the system works. It's a fiduciary system. It's a fractional reserve banking system and basically nearly all of the money always is lent out by banks in the effort to pursue interest, to pursue profit. And it's a highly regulated industry. They claim that the regulations stop prior bank runs and prior crises. That's very, very debatable, very very arguable. I personally don't believe that at all. But nonetheless that's what they claim. So a time deposit is a very unique type of deposit where unlike a demand deposit and unlike even a savings deposit, which now after regulation do changed, basically has no difference than checking accounts. As I mentioned, a time deposit is basically where you know that you are depositing this money with the bank in return explicitly for interest and you won't be able to take the money out until the term ends. So the deposit might be a month, it might be three months, it might be six months, it might be a year, it might be well over a year. But it is a strictly defined term by the bank where it is very very clear that you are loaning your money to the bank. You can't take the money out of the deposit, the time deposit before term comes due. And if you do, there will be a penalty for you to pay, not the bank. And in return for this time deposit account, which what is in it for you if you offer this to the bank, if you deposit your money in the bank into a time deposit account you should receive higher interest payments than you would in a savings account or a checking account. Sometimes checking accounts pay interest, sometimes not. Sometimes they're just free. But that's how it works. So again, not a huge number and even a smaller number than retail money market funds as of today. But this is an account that you will typically find back in the bank. And again it's just defined by the Federal Reserve as a small number, meaning under 100,000 denomination time deposits. So typically retail, but it certainly could be small companies as well using small time ", + timestamp: '00:15:42-00:19:51', + topics: ['Small time deposits', 'Time deposit', 'M2 money supply'], + type: 'podcast', + weight: 42.29542842100859, + }, + { + boost: 0, + date: 1624507200, + description: 'Small business regulations and [[problems with employment]]', + episode_title: 'Bitcoin Fixes This 48 Small Business with Ali', + guests: [ + { name: 'Ali', profile_picture: '', ref_id: '1169edf2-a89f-4d89-94a4-1be1a7b9aef0', twitter_handle: '' }, + ], + hosts: [], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/2536a974-d668-4ac2-8613-0b37aa0ca08c.jpg', + keyword: !0, + link: 'https://anchor.fm/s/2a4e8034/podcast/play/36003846/https%3A%2F%2Fd3ctxlq1ktw2nl.cloudfront.net%2Fstaging%2F2021-5-23%2F969a4306-e9eb-95c5-0e15-42d37c0e61e8.mp3', + node_type: 'clip', + pub_key: '', + ref_id: 'b1b5acae-0bc8-4117-8d1b-b61e79bea99f', + show_title: 'Bitcoin Fixes This', + text: "up in the morning. I had a question about your being a small business. What sort of regulations have you seen over the past year and a half with chronovirus and everything? I imagine that couldn't have been easy. And to some degree, I imagine it's still very difficult. What has that been like? Yeah, it's been tough, Jimmy. We were forced to close down our dine in area, but we're already operating most of our business with deliveries, online delivery platforms like Uber Eats and get the dishes and all these door dash and all these things and then take out like, people just come in and pick up two or three Sharmas and take it to their families. And our business has to adapt to this shift in the way people order food. Luckily, we were already there. We were integrated with all the online platforms and we were able to make that transition quite easily. But, yeah, for the first month, I remember the first March of 2020, within one week, our sales dropped like 80% in a week. And it's quite devastating because we didn't know how long things going to last or anything. We laid off people, we tried to get them back, but they said, no, we're getting free money from the government. And that's part of also the reason why we felt like something was messed up with the financial economy and we felt like there was too much money flying around and it was being worth less as time goes by. So, yeah, we just hustle through it, Jimmy, like we did what any business owner would do. You just hustle through it. Something like that Bitcoin wouldn't save you from a situation like this. You need to just make your business work. And if it works and you've done the Bitcoin decision now, you have a successful business and you're in a position of strength to expand your business however you want or to do all the things that you want to do with your business. So it has been challenging, it has been tough, but you got to fight through it. That's the best advice I can give to people. And it sounds like you had some labor problems, maybe even some regulatory problems and things like that. How do you deal with the fact that people are getting paid more to not work, and how do you hire people in that sort of weird incentive environment? Yeah, it was backwards, Jimmy. We tried to get people hired after business started picking back up in 2020. And then they were just like, no, we're good. We're getting free money at home. We were like, okay, for a while there, we had to raise our pay just to attract the people staying at home. So we had to basically compete with the government and paying employees. So, yeah, we did that. But then at one point we said, you know what? We don't want to come back school, you guys. We're just going to hire a whole new crew of people and train them from scratch. And we did that, and it worked out fine in our industry. I feel like there's always some people that are willing to work. You just have to really look for them, but they're not easy to find, but you end up finding good people eventually. Yeah, I've noticed that about small businesses, even here in Austin and everywhere else, you see Help Wanted signs just absolutely everywhere. And the reason is because no one really has to work. So they get paid maybe 20% more for working versus sitting at home and doing nothing. And they'd rather just sit at home. It feels very off. And I can't imagine how difficult it must be for a small business owner to have to kind of deal with all of that. It's really hard, Jimmy. Like, I have my sister and her husband. They're dentists. They have a few clinics here in London, Ontario. They have it even worse because most of their employees are like female hygienists and dental assistants. And they have their kids staying at home and not going to school. And it's even harder to get them to come back to work because they say, oh, we can't leave our kids at home by themselves. We're just going to stay at home, get paid, and you go figure it out. We can't come yeah, it's tough on medium and small businesses. And it's just the reality. It's the backward reality that we have to deal with right now. It's insane to me. Well, does the Canadian government sort of, like, subsidize you for at least some of the hardship that you're going through, or do you kind of just have to deal with it as a small business and sort of not have that many workers or shorten your hours. What are your options? Here's a cherry on top, Jimmy. If your business does well or improves from the previous year, improved, like its sales and its revenue, then you don't qualify as a business for any government assistance. Right. So we have been able to be in that situation where actually our business improved from last year. But because we hustled and got our business going and our revenues increased, we get left out from all the government grants and the rent subsidies and all of that that is given to everybody else that basically just locked their doors and didn't bother to try. I'm fair, but I'd rather be in this position where we don't need help than in a position where we're handing out a hand to the government and asking them for grants and whatnot. So I'm happy this way. Well, are your competitors that kept the prices the same? Are those ones that got, like, government assistance, or are they hustling just like you? Well, yeah. I'll give you an example. Like one of our stores we have like a neighbor, that restaurant, it's like a pizza store. And they've been basically they shut their doors since this whole thing started and they've been able to get enough grants to pay off themselves, their landlords, everyone, and not basically not do a thing, just have the door shut. So from this perspective, it kind of feels unfair. It feels right that if you're not able to adapt in this environment, then you should be kind of liquidated and other entrepreneurs can take up that space and make a model that works better in this environment and so on. But that's just not the way it's working right now. And in that sense, it's kind of unfair. But who cares? You got to pick up our sleeves and that's Bitcoin so they can do whatever they want. ", + timestamp: '00:18:56-00:27:00', + topics: ['problems with employment'], + type: 'podcast', + weight: 4.846990585328009, + }, + { + boost: 0, + date: 1266645600, + description: 'Power of small stock holder', + episode_title: '5. The Profit Motive', + guests: [], + hosts: [], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/ef62c7ab-ef09-47b7-9af4-2ebe2384a72f.jpg', + keyword: !0, + link: 'https://dts.podtrac.com/redirect.mp3/cdn.mises.org/05_AustrianEcon_Rothbard_1972.mp3', + node_type: 'clip', + pub_key: '', + ref_id: '99fc3f47-1cb2-449e-bd46-97a597fce97a', + show_title: 'Austrian Economics: An Introductory Course', + text: "Well, how about the stock solar manager? This junction the first place. Nobody said it's either way, there's usually a store manager developed here. The story goes. Well, after all the stockholder sitting there. He's got no control. He's just having a dividend. Well, it's true. If I have one share of General Motors stock I'm not going to have a very powerful influence on the decision making process of General Motors. No reason why I should. Nobody expects to. But nobody ever claimed that no New York classical economics with an IQ over 20 has ever maintained that the small stockholder has much power. The point is that the large stockholders have the power. And if you get the large stockholders together on issues then they become dominant. The small stockholders stockholders already do have power. Another way it's very important, a small stockholder if he doesn't like the way things are going if he doesn't like the profit record usually as a corporation he has stock in, what does he do? He sells it. I don't like General Motors this year. Profits are falling, I'm selling a stock. If people start selling the stock small, they are, this means the price of the stock declines and the big guys are holding a lot of stock at a very worried because the value of their assets goes down this way by voting with their feet, so to speak. The small stockholder does it decision, even though not directly not by voting, but by voting in the market, just since it's more powerful. So that's one thing. Also a person currently should contrast this the power the small stockholders have by voting with their feet and the corporations contrast this is so called publicly owned and we'll get back again later, because the government ownership, so called publicly owned operation, where every citizen, by virtue of being a citizen, for example, owns a post office. Well, can we sell our shares in the post office? I don't like the way the post office is being run. I want to sell my share, where do I go to sell it? Obviously we can't go anywhere talking, we ain't got no shares. It's really government owned and the public ownership is a pure mythology by which the government closest operation so we have the power in a private corporation to sell a share if we don't like it, we don't have the power in a so called publicly owned government operation you can't sell the shares of the public school, for example. Okay, let's ", + timestamp: '00:07:39-00:10:00', + topics: ['Small stock holder', 'stockholder'], + type: 'podcast', + weight: 4.837404131889343, + }, + { + boost: 0, + date: 0, + description: "Talk about Value to Value Apps and Brian Murray' Project", + episode_title: 'Cool Apps Built on Lightning - March 16, 2022 - Voltage Twitter Spaces', + guests: [ + { + name: 'Chad Atkins', + profile_picture: 'https://pbs.twimg.com/profile_images/1200611447979544576/W9ocRJTb_400x400.jpg', + ref_id: '62da3c50-0a46-400b-81a3-5f482f5b8fee', + twitter_handle: 'Chemchad', + }, + { + name: 'Michael Atwood', + profile_picture: 'https://pbs.twimg.com/profile_images/1362207977470521345/Jy2_Ge60_400x400.jpg', + ref_id: '16359ade-afb9-4a37-be0b-0844a6134327', + twitter_handle: 'Dooowta', + }, + ], + hosts: [ + { + name: 'Nate Glasky', + profile_picture: '', + ref_id: '0662789d-b39e-4aed-ad6f-44257695b6af', + twitter_handle: '', + }, + { + name: ' Bobby Watts', + profile_picture: '', + ref_id: 'ae2685c6-1307-473a-95b0-87c234e50483', + twitter_handle: '', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/2ec62250-4755-4616-8342-096a2cfab95f.jpg', + keyword: !0, + link: 'https://www.youtube.com/watch?v=4EJrnxYOShY', + node_type: 'clip', + pub_key: '', + ref_id: 'addee850-119f-472c-87c2-05fc0642abeb', + show_title: 'Voltage', + text: "guess until someone raises their hand, there's one. I don't have a list maybe like you do, but one of the things that's on my mind is I've been playing a bit more with some of these value for value apps where basically whenever you find something good, you can tip or just get someone sat. Like what I've been mainly playing with and enjoying is Fountain and Stacker News. I just think it's super fascinating and I can see in the future how there could be like a Wikipedia that's Lightning based where you get tips for creating good content and I can just see how that could really take off. But I've been really having a good time with Fountain, using that app and just onboarding a lot of friends, and I know they're doing a ton of things behind the scenes that are going to be rolling out over the next couple of months, which is exciting. Yeah. Fountain is really slick because it's sort of like an overlay, over spotify if you want it to be. Right. I had a little bit of time playing with it recently, but it's really cool. I recommend anyone to try out Fountain if you listen to podcasts. Yeah, and I just heard, someone told me today that whenever they logged in, fountain gave them like 1000 free stats or something and you can use it to kick start streaming stats to people and paying content creators, but pretty sweet. What's up, Brian? Hey, welcome up, man. A fellow shadowy supercoder, I believe. Yeah. Brian of London. What's up, man? You're muted right now. Did you want to share something. That'S unmute? I'm in a car, so if it sounds terrible, I'll duck off again. Yeah, I joined Voltage today. I've been building stuff all to do with Podcasting 2.0 for a few months now and interfacing with Hive. I know, don't worry, it's another blockchain thing. But this whole business of value for value is absolutely critical. And Lightning is very important because of the low fees and other than the hassles I've been having with nodes and hardware braking, which is why I just started up a voltage node tonight because I spent the whole day messing about with an umbrella and broken SD cards and stuff. So I'm really hoping that Voltage is going to be better for me to build something kind of that I can really share. But yeah, looking forward to getting that going. And what I'm actually doing is converting from Hive into Lightning and lightning into hive because there's about four, four or 5000 Lightning enabled podcasts on the value for value system right now. But the little secret behind that is that about two and a half or 3000 of those I put there because they're all video channels on something called Three Speak and I handle the stats for those. So, yeah, there's a lot coming. A lot coming. I love the vision. That's awesome. Having the ability to send not just quick payments, but small, instant free ones, relatively free, is just incredible. Like, worldwide, the amount of things that you could build is incredible. So that's really cool, Brian. Yes. Anyway, thanks. A lot of stuff to build. I hope that Voltage helps smooth some of those corners for what you're building. Well, yeah, I mean, I was building something and I've been building it all sort of within my home, basically. And I just got to the point where I'm sharing. I've got a method to expose invoices out into the world, but I don't like how I'm doing it. And I have to have a node that's public. Lightning is a bit of a fiddle, I've got to say. I develop on two things because I'm developing on the Hive blockchain, which is super easy because it's got no fees and very quick and it's got an easy developer and I don't have to think about all these channels and stuff. But what Lightning brings is this ability to have these wallets all over the place. That the way Lightning works for small wallets on phones, inside apps like Fountain and stuff. There's nothing else like it that I've seen. So there is a combination, which is what I'm combining two different things because I think on the receiving side for podcasters, actually receiving SATS on their own node is beyond most people keeping a node running with the channels, with the liquidity in the right places and all of that stuff. I don't think that's going to be a mass market thing. Yeah, I think over time that should be softened around the corners, automated a little bit, hopefully. But yeah, we're still definitely early days where it's nice and tough, so to speak. Yeah, it's a struggle learning. I've been on this for like nine months now, learning how to open channels at the right time so you don't get whacked with too much fees and who to open channels to and the sort of the dark art of channel fee pricing and all that stuff. So you open a channel and go to bed and then in the morning the SATS that you thought that you would have for outbound have all snuck off somewhere because somebody rooted a million SATS for you and you didn't change your fees, that kind of stuff. Anyway, it's all learning. Very cool. All right, thanks for having me on. I'm going to mute. Bye bye. Thank ", + timestamp: '00:02:18-00:08:42', + topics: ['Brian Murray'], + type: 'youtube', + weight: 4.822762489318848, + }, + { + boost: 0, + date: null, + description: 'Bitcoin price indicators and how Bitcoin pricing might stabilize ', + episode_title: 'Café ₿: #Bitcoin Beginner Q&A', + guests: [ + { + name: 'Peter', + profile_picture: 'https://pbs.twimg.com/profile_images/1581695667193643009/EljNY-TH_400x400.jpg', + ref_id: 'a3384925-e15e-421d-b9f9-6d44e273ed05', + twitter_handle: 'PeterAnsel9', + }, + { + name: 'Stephan Livera', + profile_picture: 'https://pbs.twimg.com/profile_images/1362551718110580740/v-W5Q2uo_400x400.jpg', + ref_id: '72f57157-c96e-4466-8bf1-290cfe1f8a0b', + twitter_handle: 'stephanlivera', + }, + { + name: 'Thomas J Lake', + profile_picture: 'https://pbs.twimg.com/profile_images/1529168328534769670/5cl2Y_k-_400x400.jpg', + ref_id: '21541a47-0601-447c-99c2-312d1a63c19f', + twitter_handle: 'thomaslake', + }, + { + name: 'Goodguy', + profile_picture: 'https://pbs.twimg.com/profile_images/1363216959576285185/unulY4yd_400x400.jpg', + ref_id: '0c3fec75-9cc2-4c0f-8dbe-db7fae2b585b', + twitter_handle: 'goodguybiker', + }, + ], + hosts: [ + { + name: 'Brady Swenson', + profile_picture: 'https://pbs.twimg.com/profile_images/1502564606836981763/fmqtNrNc_400x400.jpg', + ref_id: '49966553-d55b-44c9-94ec-8fee09eee5c2', + twitter_handle: 'CitizenBitcoin', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/239722cb-4216-414a-a17b-5adf9d52e15a.jpg', + keyword: !0, + link: 'https://stakwork-uploads.s3.amazonaws.com/uploads/customers/2707/media_to_local/35b20273-49f2-45ea-a9f4-dc479d86573c/7ae5315f-beb2-41e2-b672-65dd1f102017.mp3', + node_type: 'clip', + pub_key: '', + ref_id: 'dbc2c8f6-e85d-449c-a431-e52f6e7594e2', + show_title: 'Swan.com', + text: "We're going to continue to do these, I think. I've been talking to Jacob about this, doing this maybe once a week, doing a beginner Q and A, getting back to our roots. And if you guys want to participate in that, we'll talk about it and see if we can do this on a more regular thing. Let's do one more quick question, and then we will make some closing comments and wrap the show. Zoom out. Do you have a beginner question? Welcome. Hi. Thanks. It was a little more advanced, and it was specific to you guys talking about the pricing and the measurement of pricing. So it's not a simple one. Sorry. But I was very fascinated to understand how the price might stabilize over time and what the indicators are there. In. Terms of pricing everything in Bitcoin. I'm going to I'll give a quick answer to that, and we'll move whether my answer suffices or not. Okay. So basically, I think there's an opportunity first of all, there's an opportunity cost, and also, there's not enough monetary energy in it yet for it to be more stable in my iceberg versus ice cube example. But the other thing is, is that it's not quite being used as a medium of exchange yet, which will also help stabilize. And the reason it's not, in my opinion, is that we're still in the value accrual phase. There's an opportunity cost. Many of the people holding it don't want to use it or sell it because we believe it's going to gain in value. I mean, we'll use it on a small scale. I'm using it on a small scale. But, you know, if if a if you look at the the coins that are held today, I think something like 60% or more of the supply has not moved in more than a year. And what that tells me is that the people that are holding it think that there's an opportunity costing it and that's why it's not moving. And until that's arbitraged away, you're not going to see it fully employed as a medium of exchange. Without that, there's still going to be that level of volatility there. Go ahead soon. Yeah, thanks. I guess there's a bit of reading to do that on economics, but it's fascinating to see how the globe or the whole world might start to equalize and synchronize in terms of how they measure and value everything around the world. On top of that, I just wanted to add maybe to some of the newbies. I've been in this space for a couple of years and thought I had a good understanding. And then I listened to Lynn Olden over the weekend and she described bitcoin as being unique in that it solves this abstraction of the money. And my head exploded because I realized somehow that actually there's a coupling of the transaction itself and the record of that transaction. And it just completely blew my mind because I for some reason couldn't see that until she described it and it solves the abstraction. I think that's the double spend issue. By Zenfine general's one, but it was. Her description specifically on simply bitcoin of it being married. Awesome. Yeah, it takes all sorts. Every one of us who explains bitcoin will reach different people. And that's the reason why it's great to have such a great spectrum of personalities that are doing it. Let's get to some closing comments and we'll wrap. Thanks for coming. Zoom tomer. Do you want to make closing comments and we'll let Stefan go and then we'll move to wrap. Closing comments. Bitcoin is not that hard. It's a very simple thing that you can take custody of. Use it the way it was originally intended to be used because it's kept all those promises. There's a lot of charlatans in the space. Beware of people promising easy returns, safe returns, quick returns. They're all out to get your bitcoin from you and they're selling you something different. I just hope you can learn the lesson at the expense of others rather than at your own expense. The direction that it's going in is you will likely eventually own bitcoin. So start figuring out how to own it sooner rather than later. Awesome point out. Before we go to you, Stefan, I just want to say thanks to Good Guy and Neil and everybody who comes up here on the regular, we're really out of time. Otherwise I do closing comments with all you guys. We love you guys, we appreciate you guys coming. Stefan, closing comments and then we'll wrap. Yeah, look, I would just say don't feel overwhelmed. It's very simple. Like once you've withdrawn and then actually practiced doing a transaction, you'll find it's actually a lot simpler than what was thought. So I think it's a common thing where people are maybe they're a little worried the first time they've ever done it. But then after that, I promise you, it's a magical feeling. Doing your first bitcoin transaction, doing your first lightning transaction. I think most of us can remember our first bitcoin and our first lightning transaction, so definitely get out there and give it a go, if you haven't already. We do have some regular webinars that we're running, so make sure you get on with our swan email list and you'll find out about those because we're hosting some webinars ", + timestamp: '02:01:53-02:07:04', + topics: ['Bitcoin volatility', 'pricing'], + type: 'twitter_space', + weight: 4.822762489318848, + }, + { + boost: 0, + date: null, + description: 'Is there a minimum withdrawal amount in Tweetoshi?', + episode_title: 'Café ₿: Bitcoin News & Using Bitcoin w/ Twitter, @tweetoshiapp', + guests: [ + { + name: '@TweetoshiApp', + profile_picture: 'https://pbs.twimg.com/profile_images/1532819967133028352/frxdtSHX_400x400.jpg', + ref_id: '97e59475-beaf-44fe-b1b0-ea2a63d335b6', + twitter_handle: 'TweetoshiApp', + }, + ], + hosts: [ + { + name: '@alexstanczyk', + profile_picture: 'https://pbs.twimg.com/profile_images/1539055022364708864/rwErK6x1_400x400.jpg', + ref_id: '6455df34-1abc-4ce8-9bb8-b02d411accec', + twitter_handle: 'alexstanczyk', + }, + { + name: '@pacificbitcoin', + profile_picture: 'https://pbs.twimg.com/profile_images/1570140686753619970/UFEnzSv5_400x400.jpg', + ref_id: 'f8268a26-9761-40c1-bdd6-dad9db44d032', + twitter_handle: 'pacificbitcoin', + }, + { + name: '@SwanBitcoin', + profile_picture: 'https://pbs.twimg.com/profile_images/1491428856858914820/aFlitvha_400x400.jpg', + ref_id: 'da3f56bf-9763-4389-a9ec-d807049bd0b8', + twitter_handle: 'SwanBitcoin', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/239722cb-4216-414a-a17b-5adf9d52e15a.jpg', + keyword: !0, + link: 'https://stakwork-uploads.s3.amazonaws.com/uploads/customers/2707/media_to_local/25fad353-f7a7-43cb-9197-beef1e783983/e2ec31c3-43e5-4e81-af3a-b153b8c219ca.mp3', + node_type: 'clip', + pub_key: '', + ref_id: 'fc9b5e45-fc94-42dd-a722-bde164f8c24b', + show_title: 'Swan.com', + text: "a maximum is there a minimum limit in terms of what you can withdraw or can you withdraw like a single satoshi? Yes, for now there is like a super small minimum limit of 100 satoshi. We would like to get it down to one satoshi in the future, just like for the for the, like, let's say a meme. So we can withdraw literally anything, but for now, there is 100 satoshi limit. Cool, thanks. Would one satoshi even be possible? Because you still have to pay the unchanged transaction fee. Now you can withdraw one satoshi from Thunder Games, for example. So it's possible. Yeah, but what does that mean? Are they paying the transaction fee? I'm assuming that there is no routing fee for that small of the transfer. Like if you're doing one satoshi from Thunders custodial wallet to Moon or to whatever, they have it set up in such a way that it works. Either they eat the fee or their channel is set to zero fee. Because if your channel is set to zero fee, it's lighting ", + timestamp: '01:52:34-01:53:48', + topics: ['Tweetoshi App'], + type: 'twitter_space', + weight: 4.8130316734313965, + }, + { + boost: 0, + date: 1599305976, + description: 'How US debt affects the economy ', + episode_title: 'Borrowing - where is the money going? Corporate, Small Business, Government', + guests: [], + hosts: [], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/abd94520-1490-42aa-b349-9e861494a654.jpg', + keyword: !0, + link: 'https://anchor.fm/s/138410f8/podcast/play/19113751/https%253A%252F%252Fd3ctxlq1ktw2nl.cloudfront.net%252Fstaging%252F2020-09-05%252Ff840233e9317a45e95724ebf5de7e057.m4a', + node_type: 'clip', + pub_key: '', + ref_id: 'e97927cd-526b-46ef-bde2-7e60339fd4a5', + show_title: 'Economy Guy', + text: "small businesses doing regarding borrowing money? Well, they go to a bank and they borrow money. And typically the bank, they go to an SBA bank. That's a Small Business Administration bank. That's a bank that does Small Business Administration loans. So what is one of those loans? Sounds interesting. What is that loan? Well, the SBA, the Small Business Administration, which is a government agency, guarantees someplace between 50% and 85% of that loan. In case of default, the government will back it. So that reduces that much risk of the loan to the bank that's doing the borrowing. So that really lowers the risk to the bank. That's pretty good for the bank, right? In spite of that, the SBA banks are not lending right now. You say what? Huh? Why? Well, you see, the SBA banks are going back to the Small Business Administration and saying, hey, you know, that amount that you guarantee, we'd like you to increase it to 90%, even 100%. Splendid. Fully guaranteed. So you see, the banks don't want to take any risk or truly minimal risk. That's where they're coming from. Now, do we have a measure of how much? When I say SBA lending is stopped because small businesses is the heart of the US economy. Small businesses are the things that create employment, big employment. Most people work for small businesses, not the big corporations. So encouraging small businesses to borrow money and then using it as a good loan and creating jobs, creating profit, creating their own business, growing their own business is a good thing for the US. I mean that would create a boom in the US GDP. But the lending has basically stopped. And I have one measure of a group of banks. So it's not all lending, but a group of banks. Their measure is that since April of this year, 99% of the loans have stopped. Only 1% of loans equivalent to the last year have gone through 99%. That's effectively all lending to small businesses have stopped. And why? How big are the loans? I mean, the loans we're talking about are 5 million to $10 million, no more than 5 million. SBA loan can't be more than $5 million, but the Cares Act increased it to 10 million. Well, that didn't mean anything because nobody's lending money. So who Cares Act did not affect anything. What are the banks doing? They don't want to have any risk. What they're saying is to companies that are surviving through this pandemic, they're saying, well, I don't know if you're going to make it when we recover. I mean, you may only be growing because of the pandemic. When you may be gone, your bone could be bad. And they're saying to the people who are really hurting that need their money, we don't know if you're going to make it when the pandemic is done because you may run out of money before it's done. So in both cases, a good company and a bad company is not lending because it's all about risk. That's kind of interesting when it comes to small businesses. And the result there is without lending in that particular sector, we're not going to have a fast recovery or as fast as possible. So one thing for you, the listener, to listen watch for is lending to small businesses. Is there something that could happen in the future that you will hear in the news that is freeing up money? If so, that will be good for the economy. If not, it's going to be a slow growth. And now for the last area who are borrowing money? That's the government or the US. Treasury. In the case of the United States, people who are lending money are throwing money at the US Treasury. That's big bucks. The big bucks are going to the US Treasury. That's where the money is ending up. And how big is big? Well, this calendar year for 2020, the big bucks, it looks like the US Treasury is going to borrow about $5.4 trillion. That's so big, it's unimaginable. How big? In the good old days, when we were borrowing too much, it was $1 trillion a year. This year it's going to be $5.4 trillion. That puts it into perspective. Horrible, horrible, horrible. And that doesn't count if there's a new stimulus package passed by Congress this year, which I doubt will happen, my personal opinion is that Congress is at loggerheads. The two parties aren't about to agree on anything since we're so close to an election. So I don't think a new stimulus package would happen. But if it did, it would be even more borrowing. That's as simple as that. We don't have the money. Otherwise. The only way to get it is to borrow it. So the US government is the perfect example of bad borrowing. They borrow money. It is not productive. It does not pay back anything. They're not building roads and bridges that can pay back the money or contribute to productivity or all those good things that you can do with money. No. So what happens with all of the debt, which incidentally, is going to be 100% of GDP this year? That's supposed to be a magic number. It shouldn't happen. It should cause comets to fall out of the sky or something. But that's what's happening to the US economy this year. It's massive debt. But what happens every year as they bring in taxes? Where does the money go? Well, part of that money goes to paying the interest on the debt. And the bigger the debt, the bigger the interest. Now, that interest is not productive. It just goes to pay back the people who lent the money. It's not going to building roads or building factories or buying things that are important to buy. It's not helping the economy one little bit. So I say to you, ignore that. It's not good US Treasury, even though that's where the money is being thrown, it's not good debt. So there is my positive message for the day. I hope you liked it. That's where we stand. Corporate debt is they're in good shape. They have too much money. They don't know what they're going to do with it. They'll probably do something foolish with it. They have in the past. Small businesses can't get a loan so we can't grow. Because of that, the treasury has more money than they can use. Anytime they want money, they just say, please give me, and people give me it. So that's happening. That's the world of debt in the United States today. That'll change, of course. But be aware that all of those are not good things for our future and are not rosy rosie, I'm sorry to say that I do want some a lot more Rosies. So ", + timestamp: '00:12:05-00:19:41', + topics: ['US debt'], + type: 'podcast', + weight: 4.810045599937439, + }, + { + boost: 0, + date: 1673549347, + description: 'How different people use different methods to safekeep their assets', + episode_title: + 'BR019 - Proof of Keys Day Twitter Space ft. Lopp, Craig Raw, Lazy Ninja, mshodl, Rijndael & guests', + guests: [], + hosts: [ + { + name: ' Jameson Lopp', + profile_picture: 'https://pbs.twimg.com/profile_images/1594137153625276416/t1RUP3yP_400x400.jpg', + ref_id: '062ec6c8-0fa2-4bf6-9aa1-7ab347df2530', + twitter_handle: 'lopp', + }, + { + name: ' Craig Raw', + profile_picture: 'https://pbs.twimg.com/profile_images/1362841242665631745/UtA3FBQU_400x400.jpg', + ref_id: 'f2d1f5f0-2e1c-4d16-937d-4d48627cb955', + twitter_handle: 'craigraw', + }, + { + name: ' Lazy Ninja and Rijndael', + profile_picture: 'https://pbs.twimg.com/profile_images/1362843002318721028/PNKWuu0-_400x400.jpg', + ref_id: '23edbd50-9b0b-4e9a-aa56-57c2af074173', + twitter_handle: 'FreedomIsntSafe', + }, + { + name: 'Justine Harper', + profile_picture: 'https://pbs.twimg.com/profile_images/1559710083734540289/HXTH4kqO_400x400.jpg', + ref_id: '7b5a8957-1c4b-474f-bc38-291b382a13e6', + twitter_handle: 'mshodl', + }, + { + name: ' Dee', + profile_picture: 'https://pbs.twimg.com/profile_images/1600155411868434433/9k1KQ8i5_400x400.jpg', + ref_id: 'ad33288b-28d4-4f15-9492-f64bce891613', + twitter_handle: 'HodlDee', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/f1879df9-9bc6-4a76-951f-24548da768ef.jpg', + keyword: !0, + link: 'https://anchor.fm/s/9500fad8/podcast/play/63399670/https%253A%252F%252Fd3ctxlq1ktw2nl.cloudfront.net%252Fstaging%252F2023-0-12%252F0a789f60-2c9a-6bbb-945a-79f3dd937cee.mp3', + node_type: 'clip', + pub_key: '032d7609ff3f4a5232e4d60967971e23bc671dfb68020845a59bab5dc1f3b93b87', + ref_id: '08600eb8-a8b1-4be4-b505-3adc409da2f8', + show_title: 'Bitcoin.Review Podcast with NVK & Guests', + text: "holes, but just before I go there, I just kind of like want to recap. So I think we all agree that different people, different needs, different solutions. Even the same people might need different solutions, right? You want your spending wallet, you want your lightning wallet, you want maybe a warm wallet. I think we all agree that keys should never be on a computer or touch a computer. I think we all agree that harder wallets work great. I think we all agree that multisig solves a lot of problems. We don't all agree that single SIG plus passphrase is great, but we do have some agreement on where the faults lie. We can recap that if you guys want to pick at anything I said, so don't feel like I am putting your foot down here. So I guess the main thing is that I want people to take out of this sort of like, simpler, more new part of the conversation is don't get overwhelmed with solutions out there. You have time, you can test things, you can experiment with different services, you can experiment with different wallets. Most of the solutions are free. And then if you want to get into harder wallets and you can even build your own solutions out there, I think it's important that people don't roll their own solutions, especially not their own cryptography. I don't think that's a concern anymore, but it used to be back in the day, and then sort of like we can start getting to the weeds of some of the FUD that confuses people around different solutions and go from there. Do you guys have any sort of like short comments about the previous sort of like noob conversation that you want to before we move on? Yeah, I mean, like, we said it earlier, but just to really drive it home. If you got $50 or $100 on coinbase or Gemini, just go install moon wallet or blue wallet on your phone and get it off and start playing with it. Like, you don't have to go straight to seed plate buried behind the third oak tree. If you've got $50 on coinbase, you can really start small. So you just said it, but it's worth saying over and over and over again. I mean, that question does come up every single time I do spaces somewhere or back in the clubhouse thing. It's amazing to me how much people don't understand that they don't need to do like twelve out of twelve DVDs for $100 worth of Bitcoin. And that is how you should be experimenting with Bitcoin. Don't go buy an asset with all your life savings until you understand how the heck that asset works. Well, a lot of people I've heard the same thing, like clubhouse or friends will say, well, I only have $100 worth of Bitcoin. I don't really want to go buy this hardware wallet. That's a certain amount of money. It seems kind of crazy for the amount. It's like, well, you don't have to. There's free mobile wallets. That could be your first step. So I think the biggest takeaway from this space is it's not all or nothing. Like take the steps and we're kind of walking through the steps specifically. But you don't have to spend money on an assigning device or hardware wallet. You can just download a mobile wallet. That's the first step. And then even when you start getting more sophisticated, you also don't have to have one wallet, right? I have Blue wallet on my phone. I also have several multi six set up, right? And you can think about partitioning your money where you have a really small bucket of money that's super easy to get to and very easy to spend. And then you have a bigger bucket of money that's harder to get to and harder to spend. And those things can change as your life does. Just like we're not walking around with our life saving in our pocket, right? We take what we need to spend when we go get coffee or whatnot and the other is secured somewhere. So, yeah, the multiple wallets, depending on your needs is totally good. You know it's a segregation, right? It's like hygiene in that sense. You're going to have your savings account, you're going to have your checking account, you're going to have your credit card. You do segregate fiat in all these buckets in your life, right? So why not do the same with Bitcoin? You don't want to be buying coffee of all your wealth. I think there is something interesting to be said about diversity and how to apply diversity from a security mindset. For example, one really common trope that we see is people coming to us who they have, for their safety, diversified their funds across five or ten different wallets. And some of these may be self custody, some may be custodians, but their whole idea is don't put all of your eggs in one basket. And my push back against that is that yes, that type of diversity does of course reduce the chance that a single catastrophe will completely wipe you out and cause you to lose everything. But it can also be increasing the chance that you will have a partial loss in one or more of those setups will fail. So one interesting aspect of multisig is that the diversity that you can add to the setup by having keys on different hardware manufacturer devices in different physical locations and basically different security properties around each of the keys in that setup is that that security is actually additive. It creates a stronger and stronger setup because it's essentially eliminating these single points of failure. If an attacker, for example, compromises supply chain of popular hardware manufacturer. If your multisig setup is not using all the same hardware manufacturer, you're protected from that. That's just one example. So, point being, diversity can be good, but applied the wrong way, it can actually be harmful. It's kind of fascinating and it really goes to show like why there is no sort of fix all solution. Each set up is going to have different sets of trade offs. And the complexity also does increase some issues there too. So you could argue on one side, it's like you want to have some diversity in your harder wallets because if one vendor is evil or really like, realistically speaking, it's going to be a targeted attack against you that it's going to maybe replace Harder or something like that. You could be fault to that, but at the same time you could have multiple Harder Wallets and say, the software update on some of them break the multisig setup, it's unlikely to have full loss of funds, but it could be quite the issue to sort of go back to you being functional. And then each vendor is going to offer sort of like different thresholds and some vendors out there offer simply either no security or illusion of security or like really crappy hardware. There's like hundreds of hardware wallets. I'd say probably out of 195 of them are absolute garbage and should never be used. And the guys from Ledger actually do a great job breaking Harder Wallets. You should check out their Don John blog where they have broken Harder Wallets and how long it takes to break them and how much money does it cost to break them. There's Harder Wallets that cost like $10 to break. There's Harder Wallets that cost half a million dollars to break. Not all things are equal just because they're the same category. So I guess this is a good segue to move to more sort of like rabbit holes of security and things of sorts. So why don't I bring up maybe lazy ninja who is a security researcher for hardware. He has helped us find problems. We have a good guy as well. He's a fantastic security researcher here too. We have what else do we have here that is of the category for the beginner stuff? While we're on the topic, I know Sparrow has a great thing called Master Fingerprint ID. You know, we as well have something called Master Fingerprint ID that you can check on the cold card itself. So if you're you know, you're dealing with a single SIG wallet and you know, you don't know if in your if you're in your passphrase wallet or you're in your BIP 85 wallet or whatever you want, you can go to Advanced Tools and go to View Identity and then it will give you a string of eight letters and numbers. And that's basically the first four bytes of your public key. So it's just a great way to know. It's kind of like a username or something like that, right? It's just a way to identify what wallet you're in without having to try and sign a transaction and get that error. So it's just a good thing for beginners to know about and I find it very useful. Thanks. Dee. I think we're going to be attacking a lot of those little issues. Justine and Jameson, thank you so much for joining me. Like, I love if you guys stay, but if anybody needs to go, totally. I don't want to take up your time, but you guys have a lot of knowledge to push out, so please do stay if you can. And with the first part of the space is gone. Let's improvise on the second part, which I think will be really cool to sort of talk about some of the fun around solutions and some of the ways the products in the market do address them. Hopefully, we can clear a few of those, because that's, in my view, one of the things that keep people from using good solutions is just this fear of the nearly impossible attacks, or actually attacks that are completely alive. So why don't we start with can ", + timestamp: '01:09:32-01:19:34', + topics: ['Hardware wallet', 'multiple crypto wallet'], + type: 'podcast', + weight: 21.998553860382764, + }, + { + boost: 0, + date: 1665687900, + description: + 'Small Towns Only Have Terrible Food Choices - Socioeconomic Problem? It’s A Govt Subsidy Problem - Flipped Food Pyramid ', + episode_title: '#1104 Dr. Philip Ovadia - Heart Surgeon Explains What To Eat To Save Your Life', + guests: [], + hosts: [], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/7934bd86-9344-4f1a-9c36-ea5f63ae418e.jpg', + keyword: !0, + link: 'https://anchor.fm/s/b4841110/podcast/play/58963723/https%253A%252F%252Fd3ctxlq1ktw2nl.cloudfront.net%252Fstaging%252F2022-9-12%252F290744275-44100-2-e4f30b61276f1.mp3', + node_type: 'clip', + pub_key: '032ff32727b06d20a13a0a8d8dfe09d39659c16deeaffbf94d6d21ec6bb28850b6', + ref_id: '50cf9922-5d13-4a4b-8621-e934b422aebf', + show_title: 'The Pomp Podcast', + text: "town in North Carolina my wife and I were driving through at one point, and it's kind of one of these streets where there's three, four, five stop lights, but it's a one way or a kind of straight shot that you can look down. And for whatever reason, I said to her, oh, my God, look at all the signs. And it was Wendy's McDonald's. Bojangles chickfila. It was just like all of it, right? And it was almost like a shot you would see on the Internet that kind of goes by when we were like, wow, America is so stupid. And as we looked, what I think shocked me was in that small town, I don't know if you could have an average salary and eat healthy, right? Because everything that was thrown in your face was cheap and unhealthy. And so how much of the obesity epidemic or kind of the rise in the unhealthy American is a socioeconomic and like a poverty problem or a money problem versus people have the money to go and eat healthy. It's just they aren't educated or they're lazy, and they don't want to do the work to actually do that. Yeah. So I do think that both play into it. When you look at why is processed food so inexpensive? You start to look at government incentives around the crops that get subsidized versus why aren't those subsidies going to the ranchers who are raising cattle? So you have to ask, why is that food the inexpensive food? I mean, the reality is it doesn't need to be that way. We could very easily shift what becomes the inexpensive food for people. And then there certainly is the educational piece of it. And quite frankly, we start to get into the miss educational piece of this because, you know, the predominant messaging around healthy food here in the United States for the past 50 years has been the food pyramid. That whole grains are the healthiest thing you should be eating and cereals and wheat and all of this. That's insane. That is literally insane. We have more than enough evidence at this point to know that that shouldn't be the case. The food pyramid should essentially be flipped upside down. So then you start asking those questions because it's like, okay, not only have we gotten this wrong, but we got it so wrong that it almost has to be intentional. You can't mess things up this badly without there being some intentionality to it. Okay, so ", + timestamp: '00:12:30-00:15:19', + topics: ['Small Towns', 'Socioeconomic Problem', 'Govt Subsidy Problem', 'Flipped Food Pyramid'], + type: 'podcast', + weight: 4.9863560048368285, + }, + { + boost: 0, + date: 1676681753, + description: 'The possible applications of Cashu Chaumian Ecash', + episode_title: 'WHY ARE WE BULLISH? Ant, Bitcoin Island, Decentra Suze ep324', + guests: [ + { + name: 'Decentra Suze', + profile_picture: 'https://pbs.twimg.com/profile_images/1614189317345214464/Z4BZBBbb_400x400.jpg', + ref_id: 'da307464-4ac8-449a-81f0-74ea9749dd1b', + twitter_handle: 'DecentraSuze', + }, + { + name: 'Ant', + profile_picture: 'https://pbs.twimg.com/profile_images/1617275233831886853/RlWpn1qQ_400x400.jpg', + ref_id: '9575e6e8-cd06-48f0-b548-801f7d2357a5', + twitter_handle: '2140data', + }, + { + name: 'Bitcoin Island', + profile_picture: '', + ref_id: '9b88c77a-65c9-4ae6-a30c-890937636d7f', + twitter_handle: 'BitcoinIslandPH', + }, + ], + hosts: [ + { + name: 'Ben Perrin', + profile_picture: 'https://pbs.twimg.com/profile_images/1181715113226596352/ipGVEcYH_400x400.jpg', + ref_id: 'e6b013ef-178b-4b41-95ee-423148a3dc3a', + twitter_handle: 'profbenperrin', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/419512c2-e309-4b25-bfe2-cd481d53f66d.jpg', + keyword: !0, + link: 'https://anchor.fm/s/11e95d20/podcast/play/65227742/https%253A%252F%252Fd3ctxlq1ktw2nl.cloudfront.net%252Fstaging%252F2023-1-18%252F313420179-44100-2-8fb4b50d66df8.mp3', + node_type: 'clip', + pub_key: '02545c14cbb18a61f20dd45f5e3dcbd9acae3de282369501040adce32a75311309', + ref_id: '784b1ee8-56e7-403c-b813-24713fd3a29c', + show_title: 'BTC Sessions', + text: "first of all, has anybody here either heard of or used Ecash via lightning? Bill, you have? I'll just ask, what has your experience been? I haven't been able to use it. I've only heard about it, but here on the island we have a fairly small community, like I said, 250 different businesses. And I'd like to see them being able to save on chain through something like this. I've just not really understood it. I end up going to talk to people and show them how to save bond chain and I think they understand it. I need to go back and check on them in a month to make sure. But if there was an Uncle Jim on the island so they could be self sufficient on this and know that they're saving, that would be a pretty great solution. Yeah, I love the kind of in between again, helping people like Uncle Jimming for somebody when you know, and it doesn't even have to be a permanent thing, but being like an interim Uncle Jim for people and helping them along their Bitcoin journey, I think that's a valuable thing to provide. And then some people will move beyond that and move into self custody for themselves and then other people that maybe that ends up being their last stop along the journey. But at least it's better than just full leave your money with a single entity that you then have to trust. At least you can kind of remove single points of failure with a mechanism like this. And I'm curious, your thoughts on this stuff. Are you for are you for it? Do you have reservations about it? What are you thinking? Thanks. Yeah. I believe that you should have an adversarial stance in all things in Bitcoin, everything that comes up until you fully understand it and then maybe try to understand it even more. Right now I really like it a lot from what I've read, and I don't fully understand it as well as I can, as well as I should or could right now. But it is exciting. I think that I'm from Texas. There's a lot of farms around here and like small communities and that's where I see a lot of potential here for something like this, where people don't really think about it a lot. But in small, like little ranching communities, they all know each other, but their access to the legacy financial system, it can be difficult or even nonexistent sometimes, or even predatory in some ways. And seeing something like this, the right platform with the right user experience, I think could be really major for the local ranching communities and just other communities small around the world, obviously. But that's what I think right now. Close to home. Yeah, absolutely. And I'll jump to susie as well. Again, I don't know your experience with this kind of stuff, but just from kind of seeing that there, do you have initial impressions? Where are you at with this kind of stuff? The first thing that popped into my mind was whether or not it would be able to give you some non. KYC Bitcoin oh, yeah, you could easily be able to clean it up. Yeah, you could easily be able to clean it. I mean, you could have peer to peer markets with this type of stuff. Very simply, again, there's a lot of already kind of peer to peer non KYC solutions to be able to buy bitcoin. Like I mentioned, hoddle Hall off the top of the show, but there's robo sas, there's bisc, there's even just like obviously directly in person. But you could easily integrate like a chow mein ecache version or have that as an option on one of those markets and be able to exchange whatever other value for Chow me and Ecash SATS or Lightning or on Chain or whatever else people want. But yeah, obviously the interface right now is not going to be the simplest for people, but I just saw the old mate, ", + timestamp: '00:16:30-00:21:14', + topics: ['Cashu', 'Chaumian Ecash'], + type: 'podcast', + weight: 42.912927374554435, + }, + { + boost: 0, + date: 1664323200, + description: 'Beacon for community of bitcoiners & benefits for ermployees', + episode_title: 'TRUBIT bringing Digital Loyalty Assets to Bitcoin - Voltage Twitter Spaces', + guests: [ + { + name: '@0xLinden', + profile_picture: 'https://pbs.twimg.com/profile_images/1439365331202437125/JBiXogun_400x400.jpg', + ref_id: 'b8bb4402-8f86-4220-9dee-0fa28ff8de72', + twitter_handle: '0xLinden', + }, + { + name: 'Stephen Doge', + profile_picture: 'https://pbs.twimg.com/profile_images/1215979900387184641/nZXkhgoP_400x400.jpg', + ref_id: '076972a2-cdab-4766-8c66-618472b80772', + twitter_handle: 'StephenDodge20', + }, + { + name: '@617a7a', + profile_picture: 'https://pbs.twimg.com/profile_images/1548336437308715016/FUZFJf9k_400x400.jpg', + ref_id: '148d77a5-6e95-4855-9e17-19e68f648898', + twitter_handle: '617a7a', + }, + { + name: '@ian__major', + profile_picture: 'https://pbs.twimg.com/profile_images/1427414299169984517/Hw0ux6ie_400x400.jpg', + ref_id: '7ed41a74-21a4-43a4-9a05-e977c981b6d3', + twitter_handle: 'ian__major', + }, + ], + hosts: [ + { + name: '@voltage_cloud', + profile_picture: 'https://pbs.twimg.com/profile_images/1508657900486422529/Lfa70poj_400x400.png', + ref_id: '3b622187-60ce-43c2-a21f-ae749c2d961a', + twitter_handle: 'voltage_cloud', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/2ec62250-4755-4616-8342-096a2cfab95f.jpg', + keyword: !0, + link: 'https://www.youtube.com/watch?v=1Cn7F1Oo_6Q', + node_type: 'clip', + pub_key: '03c7a7f42d94fdfc7a655515c1421cd1d20db090a1c24150201de0b1dc6a30b0ee', + ref_id: 'f10270d7-1cdc-4922-853a-1f8247750382', + show_title: 'Voltage', + text: "Bitcoin meetups are big. But even just acknowledging that there's a lot of crypto ones and blockchain ones, and if we can kind of just show that, hey, these brands are seeing these kind of groups come to them and host events or do things at their locations that's just, again, another selling point for them. Like, hey, this is growing. Hey, this is not a fad, it's not going away. You should probably start doing something to kind of cater to again this consumer segment that's growing and you're now actively engaging with, we plan to do more of that. Yeah, I think that's one of the things that has me most excited about what you guys are offering is giving the community something to use to expand. By landing a business, you've provided a beacon for the community of Bitcoin to support them and now that business is like, okay, I see there's an asset and the rewards are a thing. It's getting some interest. Oh, I guess there's a network where I can actually transact on and then layer three, if you will, right. The community of people and how it's expanding or what kind of people it's bringing into the business. I think you get a lot of compounding effects there. So, yeah, just super excited for it. And it's kind of funny too. Just like one quick note on that. We've kind of seen a little bit and kind of didn't mean to discover it, but talking with brands was even just not only from the consumer perspective, but employees like benefits to the employees themselves for small mom and pop mid size bigger. But that's actually a pretty attractive offer for brands to attract employees and reward them. I'm sure many people are aware of internal rewards programs for doing certain things or hitting certain milestones, stuff like that, but it is kind of something we have more recently heard and seen from things as far as just employee benefits, health benefits, things like that. So kind of something we're keeping a tabs on. ", + timestamp: '00:41:08-00:43:30', + topics: ['bitcoiner community'], + type: 'youtube', + weight: 4.831891866310001, + }, + { + boost: 0, + date: null, + description: 'How to store your Bitcoin', + episode_title: 'Café ₿: #Bitcoin Beginner Q&A', + guests: [ + { + name: 'Peter', + profile_picture: 'https://pbs.twimg.com/profile_images/1581695667193643009/EljNY-TH_400x400.jpg', + ref_id: 'a3384925-e15e-421d-b9f9-6d44e273ed05', + twitter_handle: 'PeterAnsel9', + }, + { + name: 'Stephan Livera', + profile_picture: 'https://pbs.twimg.com/profile_images/1362551718110580740/v-W5Q2uo_400x400.jpg', + ref_id: '72f57157-c96e-4466-8bf1-290cfe1f8a0b', + twitter_handle: 'stephanlivera', + }, + { + name: 'Thomas J Lake', + profile_picture: 'https://pbs.twimg.com/profile_images/1529168328534769670/5cl2Y_k-_400x400.jpg', + ref_id: '21541a47-0601-447c-99c2-312d1a63c19f', + twitter_handle: 'thomaslake', + }, + { + name: 'Goodguy', + profile_picture: 'https://pbs.twimg.com/profile_images/1363216959576285185/unulY4yd_400x400.jpg', + ref_id: '0c3fec75-9cc2-4c0f-8dbe-db7fae2b585b', + twitter_handle: 'goodguybiker', + }, + ], + hosts: [ + { + name: 'Brady Swenson', + profile_picture: 'https://pbs.twimg.com/profile_images/1502564606836981763/fmqtNrNc_400x400.jpg', + ref_id: '49966553-d55b-44c9-94ec-8fee09eee5c2', + twitter_handle: 'CitizenBitcoin', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/239722cb-4216-414a-a17b-5adf9d52e15a.jpg', + keyword: !0, + link: 'https://stakwork-uploads.s3.amazonaws.com/uploads/customers/2707/media_to_local/35b20273-49f2-45ea-a9f4-dc479d86573c/7ae5315f-beb2-41e2-b672-65dd1f102017.mp3', + node_type: 'clip', + pub_key: '', + ref_id: '6faac813-7f72-4208-a6ea-a8f330da5d1e', + show_title: 'Swan.com', + text: "one other thing real quick. The documentation that Sparrow has, in particular with Cold card, this is again from a boomer perspective, it is super easy to follow and it's almost conversational and step by step. And it was really easy for me to follow the Sparrow documentation when it came to integrating it with the Cold cart and spinning up the Cold card. Super easy. Can I make one small fun fact addition to this? You're not storing your Bitcoin in your hardware wallet. Your Bitcoin are safely stored in every copy of the blockchain everywhere in the world. I've got a couple of backups for you over here. What you're able to store is the private keys that nobody can recreate, that allow only the holder of the private key to spend the Bitcoin according to its rules. And what makes this kind of unique versus any other form of property that ever existed before is not only can you take custody of it, but you can back it up. So, like, if you were a gold investor and you took custody of some gold, you'd have to put it in some location. And if that location became inaccessible to you, you can't get at that gold. And it can only be in one location. You can put half of it one place half the other, but you lose half of it if that location disappears. The fact that you can back up your keys because they're just information means that you can have this self custody asset that's yours. It's not the banks, it's yours. And if you lose access to one location, you can recover it from another location or multiple locations. And that's one of the most extraordinary aspects of Bitcoin, and it's a fun fact. So I thought I'd add it because it's related to this question. Now that you're working on taking self custody, the beauty of it is you can back it up. You want to make sure nobody else gets their hands on any of your backups, but that's something you'll figure out what works best for you over time. ", + timestamp: '01:20:45-01:22:43', + topics: ['Bitcoin hardware wallet', 'Bitcoin self-custody'], + type: 'twitter_space', + weight: 4.755598068237305, + }, + { + boost: 0, + date: 1671084129, + description: 'A quick reminder and some news on the Bitcoin Beach Show with DJSatoshi', + episode_title: 'The Orange Sun 🌞 Does Price = Value? #Bitcoin', + guests: [ + { + name: 'ToxiKat27', + profile_picture: 'https://pbs.twimg.com/profile_images/1505791887415730177/d0YDQ3Xc_400x400.jpg', + ref_id: '50023cce-8a6f-4974-ad3b-fd7a9c0abf19', + twitter_handle: 'ToxiKat27', + }, + { + name: 'AnuragSaikia', + profile_picture: 'https://pbs.twimg.com/profile_images/1016367353762852864/gDL5h8jh_400x400.jpg', + ref_id: '0bb60736-56c5-4964-a9c3-e881b0b313b6', + twitter_handle: 'AnuragSaikia', + }, + { + name: 'fnicencool', + profile_picture: 'https://pbs.twimg.com/profile_images/1600143435775856641/uqgmtT23_400x400.jpg', + ref_id: 'bfef6a55-2d08-407e-b147-e04d68af7dd6', + twitter_handle: 'fnicencool', + }, + { + name: 'MrlamilamiKosch', + profile_picture: 'https://pbs.twimg.com/profile_images/1538403135101800450/sO-RPI9U_400x400.jpg', + ref_id: 'f8c8f97a-f79a-4950-8e3d-d2e94d27b3c8', + twitter_handle: 'MrlamilamiKosch', + }, + ], + hosts: [ + { + name: 'SatoshisJournal', + profile_picture: 'https://pbs.twimg.com/profile_images/1518661993103859712/y_QefqVZ_400x400.jpg', + ref_id: '63fac069-bfe9-49ae-b52c-1d1f226b3275', + twitter_handle: 'SatoshisJournal', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/9b2e17f2-71c5-4f1e-a3e7-720d06dab810.jpg', + keyword: !0, + link: 'https://stakwork-uploads.s3.amazonaws.com/uploads/customers/2707/media_to_local/19874ad0-9c3f-451c-b82d-ac41de6aa3a3/62af50e6-2127-4e0d-804c-a3cec392fd0b.mp3', + node_type: 'clip', + pub_key: '03eb026c3e6597055595e42299377a4e164982775cc67f1d2135d9f1cd3a89f526', + ref_id: '1aec7881-31ab-4c1c-9f79-800cb8379ca1', + show_title: 'Satoshi’s Journal', + text: "Okay. The next so I just remind you guys of the bitcoin beat show that Phil, my teammate and DJ satoshi have monday through Friday at 03:00 p.m., which is 03:00 p.m. Mountain standard time. And that would be 10:00 P.m. African time. And the intent of this show is pretty fun, actually. They play some bitcoin music, literally bitcoin music. There's some awesome bitcoin music artists that have done raps and parodies and just cool songs and they all revolve around bitcoin. So today, Phil actually had a lady come on, what was her name? Tips in the ships from music. She was awesome. She came on the show and she was talking to us and then we listened to her music, her bitcoin music. So if you guys remember, monday through Friday, 03:00 p.m. Mountain standard, 10:00 p.m. Nigerian time, you can go and listen to music. And then also, what's cool about the show is it's very random. Like you don't know what you're going to listen to because basically Phil will randomly choose small snippets of bitcoin education, whether that is from Andreas Antonopoulos, Robert Breedlove, Marty Benz, you name it. You'll hear something and it'll be so random and it will catch you by surprise, but it's really cool because you just get to hear Andrea Santanopolis in 2012 or whenever it was just talking to people about bitcoin or Robert Briel, a little snippet of him talking about whatever he talked about in his podcast about bitcoin. So, yeah, you guys can check it out. Today was a pretty cool show. I think today was the third day of the show. So he'll have it Monday through Friday and it lasts. I think he's going to run it for an hour. But today's session went for like freaking oh, jeez, almost 4 hours. 3 hours and 43 minutes. But they had a good time. There was a lot of people that came in and we're talking. I saw yellow on there, I saw Tomer, I saw the Kingo, I saw Oakland, and it was pretty cool. They had a good time. ", + timestamp: '00:51:49-00:54:24', + topics: ['Bitcoin Beach Show'], + type: 'twitter_space', + weight: 9.72359306380532, + }, + { + boost: 0, + date: 1639803600, + description: '[[Bitcoin]] Shorted as a [[Hedge Fund]] Against [[Traditional Market Equity Positions]]', + episode_title: 'WHY ARE WE BULLISH Michael Schmidt Jeff Ross Joseph Brown Greg Foss ep224', + guests: [ + { + name: 'Greg Foss', + profile_picture: 'https://pbs.twimg.com/profile_images/1552599670945464320/3OgqRHNo_400x400.jpg', + ref_id: '853d9f80-f6cf-490f-9d1e-f29cdc6acc6f', + twitter_handle: 'FossGregfoss', + }, + { + name: 'Jeff Ross', + profile_picture: 'https://pbs.twimg.com/profile_images/1475554600094552064/DSlPG1lx_400x400.jpg', + ref_id: 'ae6ee2a2-1cf7-41a0-8366-ff6e94a6403c', + twitter_handle: 'VailshireCap', + }, + { + name: 'Joseph Brown', + profile_picture: '', + ref_id: '803206b6-7b9f-48e0-a5d5-7348f6842cca', + twitter_handle: '', + }, + { + name: 'Michael Schmidt', + profile_picture: '', + ref_id: 'e94a106d-cbea-4b30-b0cb-3825979179ca', + twitter_handle: '', + }, + ], + hosts: [], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/728d91e9-025d-43a7-8467-2c8d264ddf59.jpg', + keyword: !0, + link: 'https://anchor.fm/s/11e95d20/podcast/play/45019495/https%3A%2F%2Fd3ctxlq1ktw2nl.cloudfront.net%2Fstaging%2F2021-11-18%2Fe04d11e7-ede5-a987-e943-f3fc2482fe80.mp3', + node_type: 'clip', + pub_key: '', + ref_id: '46c0e9e5-6d49-4830-b405-6021fd365979', + show_title: 'BTC Sessions', + text: "traditional equity markets are sick, okay? I need people to understand how sick the traditional equity markets are. Jeff Ross probably understands this better as well as anyone. The breadth or the average stock in the Nasdaq, the small cap Nasdaq stocks have given it up by 66%. Ok? This year, if you look at Jim Cramer's list of have to own stocks, they're like, it's a piece of garbage. And yet Bitcoin is hung in there in the face of futures product that all the knuckleheads in the world are shorting Bitcoin as a hedge against their equity positions. Okay? How do I know? Because I just know how much stupid money there is out there. And I know they need to short something because they're long all this other garbage that they say, Well, I can't sell my other garbage. So I might as well short something and pretend it's a hedge. Let me tell you something. Bitcoin is a long, volatility asset. And most of the fucking world has no clue what that even means. Except I'm going to tell you, it means if you are hedging short ball assets, which are equities and credit, high yield bonds, investment grade bonds, and you're hedging those short ball assets by selling along or shorting a long ball asset. You're inverted, buddy, and you're going to get crushed on the way in and crushed on the way out. And that's what the dumb money is doing in this market, because they are absolutely. They're hedged and wedged, okay? They're in a fucking shit trade, and they're trying to make that trade better by shorting something because there's an instrument out there called Bitcoin futures that they think is overpriced. They need to do some mathematics. They need to understand that they're shorting a rounding error. And by the way, they're also shorting a long ball asset. Over time, Bitcoin will become to be appreciated as insurance. And what is insurance? It's long volatility, it's short credit. The two things are exactly synonymous. So Seb, Bunny and I wrote an article that we submitted to Bitcoin magazine this week, and it's gotten some really good feedback on ", + timestamp: '00:25:57-00:28:10', + topics: ['bitcoin', 'hedge fund', 'traditional market equity positions'], + type: 'podcast', + weight: 4.755598081860736, + }, + { + boost: 0, + date: null, + description: 'Revenue stream source, business competition and model of the Bold Bitcoin credit card', + episode_title: 'Café ₿: Bitcoin Credit Card w/ @BoldBitcoin @John_ely_21m', + guests: [ + { + name: 'Cory Klippsten', + profile_picture: 'https://pbs.twimg.com/profile_images/1569687200857755648/fxiCeaqc_400x400.jpg', + ref_id: 'ddfb9b4c-4e6a-4f4c-a01b-e6bb1bc55464', + twitter_handle: 'coryklippsten', + }, + { + name: 'Greg Foss', + profile_picture: 'https://pbs.twimg.com/profile_images/1552599670945464320/3OgqRHNo_400x400.jpg', + ref_id: '853d9f80-f6cf-490f-9d1e-f29cdc6acc6f', + twitter_handle: 'FossGregfoss', + }, + { name: 'Wicked', profile_picture: '', ref_id: 'fee44016-b05f-4961-a6d8-7dac655cd931', twitter_handle: '' }, + { + name: '@BoldBitcoin', + profile_picture: 'https://pbs.twimg.com/profile_images/1559592705231044609/iJrNKxF9_400x400.png', + ref_id: 'dd4e1c4c-d111-4f01-ad95-18200d50cdb8', + twitter_handle: 'BoldBitcoin', + }, + { + name: '@John_ely_21m', + profile_picture: 'https://pbs.twimg.com/profile_images/1560444673046585346/VN8n2LtM_400x400.jpg', + ref_id: 'a24436b1-5992-4711-a4a5-0770546ea80a', + twitter_handle: 'John_Ely_21m', + }, + ], + hosts: [ + { + name: 'Alex Stanczyk', + profile_picture: 'https://pbs.twimg.com/profile_images/1539055022364708864/rwErK6x1_400x400.jpg', + ref_id: '3126e2a3-bbe4-456b-b298-9714085fa286', + twitter_handle: 'alexstanczyk', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/239722cb-4216-414a-a17b-5adf9d52e15a.jpg', + keyword: !0, + link: 'https://stakwork-uploads.s3.amazonaws.com/uploads/customers/2707/media_to_local/7061be6d-b144-4a81-a13b-3d125e3e2812/edf29ab4-2b4b-4fdf-9998-8a9b8e9437c8.mp3', + node_type: 'clip', + pub_key: '02574d6e8e787372184b6f17c40d6c6fe1777db9015801f95dfd24692784d767cd', + ref_id: '3b4b6a17-9995-4f90-88d0-15cfd0b53be6', + show_title: 'Swan.com', + text: "I was wondering a couple of things. One, I may have missed it. I was wondering where your revenue streams are coming from in this process and also who you see as your competition in this industry. Yeah, thanks. The business model is pretty simple. We're not lending out your bitcoin and trying to earn a yield on that stuff. Your bitcoin is sitting on the blockchain. So the way we make money is just like a regular credit card company. We make money on your purchases, the transaction fees that go through, we get a small percentage of the transaction fees. And then also, if you do choose to carry a balance month to month and there's interest accruing on that, then we would make money off of that. But if you do pay off your credit card statement every month, there's no interest and we're not making revenue that way. So, again, one of the things I love about this company is that they've got a vision for long term, and I think that that's sort of the business model that will get us there. So, quick follow up question. Are you going to set up a system or processes where it encourages people to pay off their balance monthly, or is that just something you're leaving up to the user? Right, yeah, I think it'll be similar to a typical credit card monthly statement with an option to pay in bitcoin or pay in US dollars. The idea is we want to encourage responsible use of credit and so we want people to pay off their balances and protect their bitcoin. So, yeah, it would be sort of a monthly statement sort of scenario. Hey, John, good to see you and thanks for coming to our party in Los Angeles. And quick shout out, Alex, to you and the whole swan team on that, the Pacific Bitcoin Conference. Honestly, best days of my life. Absolutely loved that you guys killed. It unbelievable that this was your first conference ever because that was to the T. It was so professional, so onto the topic here. John, my question for you. At what point do you margin call the client? So, let's say you have $10,000 worth of bitcoin, you spent three and a half thousand, and then the price of bitcoin drops. At what point do people have to post collateral to avoid their bitcoin being? Is that called rehypothecated or? I don't know. You know what I mean? Yeah, I know what you mean. Yeah, not rehypothecated, but yeah. When do you get a margin call? So, yeah, you've got a credit limit based on the value of your bitcoin, and if you get to 80% of your credit limit, you're going to start to get margin called. Again, we are coming up with any innovative ways we can to make sure that you keep as much of your bitcoin as you possibly can. But then, yes, we do have the ability to liquidate when you get over 100% of your credit limit, and obviously we're very upfront that the price of bitcoin can drop. So you have to be careful about your spending balances. And I appreciate the question, Anders, and yes, that party was off the hook. Thank you. Thank you. Actually, just there was one question I forgot to ask you. Like, so how long time would people have to replenish with new bitcoin all paid off with Fiat? Or is that basically what you're warning as you get near that 80% loan to value and then by the time it hits that you will take the collateral, which is totally understandable, just trying to understand the product. Yes, for sure. I mean, so we're still working at details, but you can expect to have something like a two day window to deposit your bitcoin to increase your collateral so that you're not underwater. And again, I don't have any specific details, but me and the guys, we're thinking up anyways we can to make sure that this doesn't happen. Right. Again, our business model is for you to save your bitcoin, spend Fiat dollars. So we're going to make sure you guys are happy and we don't want to take your bitcoin. Right? Thank you so much, John. Thank you, Anders. And looking forward to the party in Miami and straight. Thank you. Of course, we're going bigger and better all the time, for sure. ", + timestamp: '01:42:54-01:48:38', + topics: ['Bold Bitcoin credit card'], + type: 'twitter_space', + weight: 4.754698872566223, + }, + { + boost: 0, + date: 1590465600, + description: 'What is the [[geopolitics sphere]] of Bitcoin?', + episode_title: + 'Chat 39 - Bitcoin Renaissance - with Marty Bent John Vallis Alex Gladstein Elizabeth Prefontaine Brady Swenson', + guests: [ + { + name: 'Alex Gladstein', + profile_picture: 'https://pbs.twimg.com/profile_images/1382371620669452292/VOPKOc8w_400x400.jpg', + ref_id: '49445c1c-7c66-4b73-9eec-09a337befbec', + twitter_handle: 'gladstein', + }, + { + name: 'Marty Bent', + profile_picture: 'https://pbs.twimg.com/profile_images/1362747135981199370/mSy97J12_400x400.jpg', + ref_id: '655bdcb1-21c3-411c-aa24-fe7e4c7a248c', + twitter_handle: 'MartyBent', + }, + { + name: 'John Vallis', + profile_picture: 'https://pbs.twimg.com/profile_images/1568743166035070976/4MyKww8A_400x400.jpg', + ref_id: 'c3a9fe29-3b78-4665-af54-e293e9d68962', + twitter_handle: 'johnkvallis', + }, + { + name: '& Brady Swenson', + profile_picture: '', + ref_id: '0b68a085-0680-44b8-891c-6e1e84ac4eb1', + twitter_handle: '', + }, + { + name: 'Elizabeth Prefontaine', + profile_picture: 'https://pbs.twimg.com/profile_images/1382790711427354625/D09LMToL_400x400.jpg', + ref_id: '4506df72-5de4-4144-abc4-011408b6b496', + twitter_handle: 'Eprefon', + }, + ], + hosts: [], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/9e7e229f-2631-4542-b5d7-7fcd502798dc.jpg', + keyword: !0, + link: 'https://traffic.megaphone.fm/CSN4002307424.mp3?updated=1627951379', + node_type: 'clip', + pub_key: '', + ref_id: 'b241a91d-07ff-4169-9df8-16783be79ed1', + show_title: 'Bitcoin Audible', + text: "The geopolitics also are really interesting because you would think that as we move forward let's say a decade, bitcoin continues to, I think, increase in value against fiat currencies governments are going to want to start to monopolize the mining businesses in their countries. It's just what they're going to try and do because they're going to have that power. Most of them, especially these dictatorships, have total monopoly over natural resources. So this will just inevitably contribute to this planetary decentralization because you're going to have all these different governments that don't agree with each other and are essentially in a cold conflict with each other, competing in a rivalry environment to mine so that they can get more bitcoin. And that could shake out where in 40 years from now, you have a very competitive framework of many different governments all sort of competing against each other. And that just kind of continues to build on bitcoin, censorship, resistance and uptime and strength. And it's just this brilliant way that I believe it will kind of unfold. It kind of takes our base worst flaws and somebody talking about with the. Rally bitcoin crew like a week ago or so. That when governments get involved. Like the more antagonistic governments are in trying to exert control over bitcoin. The stronger bitcoin becomes because you have more powerful invested interests that specifically want to either make sure they have the upper hand or make sure they have enough power to defend against the upper hand of someone else in order to play the game of the global value system. And I thought that was so crazy. Yeah, and there's going to be governments that have Manhattan Project style initiatives to get the cheapest energy possible. And who knows, a lot of it might be whether it's fission fusion, or if you just track the price of some of these renewable techs over the last 30 years, it's pretty expensive by the decade. So I agree with Marty. It's a very exciting part of bitcoin that I think will become more popular to discuss in the near future is the sort of energy geopolitics side of it. Yeah. Again, I don't know if Satoshi could receive this either, but luckily for us, like, the supply schedule so intensive in the beginning, that most bitcoins in the hands of individuals and corporations and state will be fighting over less and less bitcoin and have less economic yeah, that's. The crazy thing I always think about. They missed the boat. If governments had wanted to, they could have accumulated literally all the bitcoin and killed it early, but they didn't. And now you've got whatever it is. I think Nick Carter has some data on this, but some absurd percentage of bitcoin is not even held by regulated entities. It's in the hands of people. Some of them might be government officials or corporate leaders, but they're individually held and there's only so much more bitcoin to fight over. So there's like a couple of million bitcoin left to be mined and governments are going to fight really intensely over that remaining bitcoin. It's serious. So exciting. Marty, I love it when you recently been bringing people on to talk about this space and all the activity and following it very closely. Guys, go ahead. Again, the opportunity is massive. It's almost hard to fathom just here in North America, and it's such an easy sell. In practice, it may be harder because you got to sell people on bitcoin simultaneously. But just from an economics point of view, it seems like it would be an easy sell. It helps you meet your regulatory requirements. It reduces your cleanup cost, it subsidizes this and that. Has it been for you guys selling? Yeah, I mean, it's getting easier with the conditions of the market and the oil market specifically, people are sort of desperate to find alternative streams of revenue. Yeah, I think more people are coming around a bitcoin just naturally as it gets older. The natural gas sector, the stranded natural gas sector is really starting to come around to this. It's sort of different than what we're doing on the oil and gas fields. There's a lot of stranded natural gas reserves that are not being utilized at all that could really, with small minimal capital investments, could get bitcoin mining operations set up and start being turning into productive assets. Ever since we've sort of come publicly, we've had a bunch of people reach out to us. Guys, this is the last question, and I'm going to pose it to each of you, but I'm ", + timestamp: '01:18:10-01:23:22', + topics: ['geopolitics sphere'], + type: 'podcast', + weight: 4.754698872566223, + }, + { + boost: 0, + date: 1675472948, + description: 'How Bitcoin empowers individuals', + episode_title: 'WHY ARE WE BULLISH? Mickey Koss, Nozomi Hayase, The Bitcoin Explorers ep320', + guests: [ + { + name: 'Nozomi Hayase', + profile_picture: 'https://pbs.twimg.com/profile_images/1362950252823597060/i-UISQoY_400x400.jpg', + ref_id: 'f82d9145-3308-493d-aa13-1fc3e21b7dd4', + twitter_handle: 'nozomimagine', + }, + { + name: 'The Bitcoin Explorers', + profile_picture: 'https://pbs.twimg.com/profile_images/1380933164596625408/vDK0Tf2r_400x400.jpg', + ref_id: 'a81905a1-3698-4c2d-b9d3-205e4b91a08f', + twitter_handle: 'BitcoinExplorer', + }, + { + name: 'Mickey Koss', + profile_picture: 'https://abs.twimg.com/sticky/default_profile_images/default_profile_400x400.png', + ref_id: '47e8b134-431a-40a8-8f56-21778cf6f927', + twitter_handle: 'MickeyKoss', + }, + ], + hosts: [ + { + name: 'Ben Perrin', + profile_picture: 'https://pbs.twimg.com/profile_images/1181715113226596352/ipGVEcYH_400x400.jpg', + ref_id: 'e6b013ef-178b-4b41-95ee-423148a3dc3a', + twitter_handle: 'profbenperrin', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/419512c2-e309-4b25-bfe2-cd481d53f66d.jpg', + keyword: !0, + link: 'https://anchor.fm/s/11e95d20/podcast/play/64479948/https%253A%252F%252Fd3ctxlq1ktw2nl.cloudfront.net%252Fstaging%252F2023-1-4%252F310976616-44100-2-e34c125fc6cf3.mp3', + node_type: 'clip', + pub_key: '02545c14cbb18a61f20dd45f5e3dcbd9acae3de282369501040adce32a75311309', + ref_id: 'd865c803-93a1-47ae-b851-5bd6a683eda5', + show_title: 'BTC Sessions', + text: "if you have thoughts, and then we'll go to the zombie. Yeah. So I think a lot of that story is kind of like how bitcoin empowers individual and small communities to kind of lift them up. Right? And so on the other side of that coin, the similar theme is how bitcoin lifts up societies. Right? And so I see a lot of this playing out with Brandon Quidom's pioneer species thesis. And so your story was like, business and all that, and I'm kind of thinking towards the integration of bitcoin mining and energy production, especially in Africa. Super bullish on Africa. And then we just had, I think it was the first small modular reactor in Canada. Right. And so that's kind of the new hotness in the energy space right now I see kind of this integration between bitcoin mining and energy lifting up societies in places like Africa, and then potentially even reinvigorating like the American Midwest. People call it the rust belt because they used to have so much manufacturing. If we can bring cheap and abundant energy to the world, that's a huge opportunity for everyone in society. Right. And that's what I'm really kind of excited about, in addition to, obviously the individuals and the businesses. ", + timestamp: '01:06:00-01:07:22', + topics: ['individualism'], + type: 'podcast', + weight: 35.74698741708972, + }, + { + boost: 0, + date: 1675274375, + description: 'The value of a small government and Bitcoin ', + episode_title: 'Is Sound Money the Answer? with George Gammon (WiM268)', + guests: [ + { + name: 'George Gammon', + profile_picture: 'https://pbs.twimg.com/profile_images/1246550014450700291/2n_iHigp_400x400.jpg', + ref_id: '7ca1bc4f-3a57-4a6a-bedf-ef47a8b37297', + twitter_handle: 'GeorgeGammon', + }, + ], + hosts: [ + { + name: 'Robert Breedlove', + profile_picture: 'https://pbs.twimg.com/profile_images/1592020087044591616/46enYwAc_400x400.jpg', + ref_id: '0ed69c56-241c-4b63-87a5-8f2157fe51a5', + twitter_handle: 'Breedlove22', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/ca3ab815-dc2e-408a-a0c5-8bbe50270a97.jpg', + keyword: !0, + link: 'https://cdn.simplecast.com/audio/2effec98-bec5-4728-ba08-7a86d776e682/episodes/d6e8f010-e2d5-4489-bb8e-9b7446a4795b/audio/0ad4fb89-2eda-4ad7-8432-b6be08c8ce10/default_tc.mp3?aid=rss_feed&feed=MLdpYXYI', + node_type: 'clip', + pub_key: '03a3451db4748e483d2e1ee5d0b3a6872253253b57edf4b084a56952b432a224b3', + ref_id: '61f104e1-77d8-48c4-9def-92d74cbf0d64', + show_title: 'The "What is Money?" Show', + text: "of time left here, but I think we have enough time to go through at least one more point here, I guess. Part core, even to your argument, I think, correct me if I'm wrong, is that we should be spending the right proportion of time on educating people about the value of small government, competing in the court of public opinion, if you will, to shrink government and the right. Because it's not a panacea. Yes, and some proportion to sound money as well, which is obviously important to some extent, depending on context, et cetera, et cetera. And I agree with you there. But a thought experiment I would like to advance is that the existence of fiat currency is actually a distortion of the voting mechanism which we traditionally depend upon in a democracy to express our political preferences. Now, this example, there's a book called The Ethics of Money Production by an author named Holzman, and this is where I get this example, and he's basically making the argument that the market economy could be understood as a system that's basically catering to the needs of consumers as expressed in money payments. So the example I always like to give is if I go into the market and I buy a car, I'm actually signaling to the market economy to produce more cars, right? I'm casting a vote to specifically the car that I buy, right? If I buy a 2020 Tesla, that's what I'm telling the market to make more of. And the inverse is also true. You go and sell a house, right? You're actually signaling to the market economy to produce less houses. So it's this, it's a real kind of grassroots democratic process taking place where one unit of currency or one unit of money is equal to one vote, if you will. And when you look at the market economy through that lens, and then you consider that there's a central bank sitting in the middle of every modern market economy, that it's effectively an institution that can create its own votes. It is able to expand currency supplies and manipulate that process of consumers expressing their preferences in the marketplace and creating all the distortions that we've described today. So when you ask that question earlier, right, would you rather live in a society that believed in small government but was run on fiat currency, or live in a society that believed in big government but was run on sound money? I feel like in a society running on fiat currency, it almost doesn't matter what the democratic collective wishes are or preferences are of the majority because they can't be adequately expressed through a democratic mechanism, when in fact it's the central bank. Or I'll put in the commercial banking system that surrounds the central bank as part of this as well, they get a disproportionate amount of influence because they're effectively creating these new votes called currency units out of nothing. Or to the extent that they are creating them out of nothing, they're able to disproportionately sway the vote of the market process, let's say. So how would you wrestle with that? Because this is a bit of a rabbit hole, because if you draw this conclusion to the end, you're like, oh, well, democracy is kind of a scam. It's really about the money that creates the votes and movements in society. Democracy maybe has at least a limited effect. But I'd love to just hear what you think about that in general. Well, first I think you have to compartmentalize the Fed in the commercial banking system, because what you just described again assumes that the Fed has control, or a significant amount of control over the amount of currency units that is contributing to those votes, as you said. So if we assume for a moment that the Fed really doesn't control the amount of M two, then the Fed isn't really impacting the voting system. So then it would be the commercial banks. Right. But if the commercial banks, then assuming that they don't have a perverse incentive, which is the bill, right, there you go. Like free banking, they would lend for productive means and they would lend to businesses that would produce more goods and services because those are the entities that have the highest probability of paying them back. And so although, yes, the banking system is controlling the amount of m two amount of currency units, I think if you could eliminate or reduce the size of government, then you would have a system where that additional increase might not be optimal. But I think that's debatable. But at least it's not a massive anchor. At least it isn't extremely detrimental. And another fun thought experiment is I get the people that say, well, listen, we want a fixed M two supply, full reserve banking because we want a consistent unit of measurement. We always want to have twelve inches in a foot as an example. You hear that all the time. But I don't know that if we have 5% deflation, you're still changing the amount of inches in the foot, just like 5% inflation. I would push back on that one again a bitcoin, or would again disentangle monetary inflation from price inflation in that case. So they're advocating for integrity of the money supply, not necessarily integrity of price consistency. Right. But the initial argument is that the economy is going to function better if you always have twelve inches in a foot. Meaning that if the value of that currency unit relative to goods and services. Remains constant that's where I'm disagreeing. I don't think it's about the constancy of the relationship between the currency unit and goods and services. It's just the integrity of the money supply itself. So the less the money supply changes, the more it adequately reflects changes in the productive economy. But if you get supply that changes, obviously price changes become distorted. You don't know if it's policy or supply and demand fundamentals. Right, okay, got it. So then the argument there is that if prices are going down by 5%, even though that may be an inconsistent amount of value currency relative to goods and services, that would be optimal because that's what the free market is producing. Because that's a result of the free market and the decisions that are being made by the individuals pursuing their own self interest. I think you could summarize the argument as the money supply that changes least is best. So an ideal money supply in a bitcoin or world is a fixed money supply, so the pricing signals that money, this would be everything. The other weird thing, in a bitcoin world, there is no difference between base money and broad, all right? You could say there's lending on top of it. If you introduce full reserve with a bitcoin base layer, right? Then there could be if there's IOUs that are produced by the fiduciary correct. Or the underlying base layer, then theoretically you could have an additional amount of broad relative to base, although that base could be used as broad. Very similar to the way gold was. Yes. And the theory there is that because bitcoin is more portable, because it's sound money, you're obviously dissuaded from taking on debt because it tends to increase in purchasing power over time, and because it's hyper portable, you don't need to centralize the custody and borrow currency units on top of it, necessarily. So I think there's less of an incentive for there to be a higher proportion of broad money to base money in a bitcoin world. Like another way of saying global debt to GDP would contract ten X, perhaps from what do we have? 20 or 30%? This is what I really wanted to discuss with you as well, because I think that we've really discussed the sound money component of it, but that doesn't necessarily mean that we've discussed the bitcoin standard component of it, because there is a difference between gold being old money. And bitcoin sound money. For sure. You got it. I don't think we should crack that can of worms right now, though, because if I'm going to get you off in 2 hours, we only got about five minutes. That one will definitely ", + timestamp: '01:50:29-02:00:37', + topics: ['Small government', 'Bitcoin value'], + type: 'podcast', + weight: 34.26857319961412, + }, + { + boost: 0, + date: 1663767761, + description: 'what is Small modular reactors ?', + episode_title: 'Mining Bitcoin with Nuclear Energy with Ryan MacLeod', + guests: [ + { + name: 'Ryan MacLeod', + profile_picture: 'https://pbs.twimg.com/profile_images/1443185278525579278/_Yl1nao1_400x400.jpg', + ref_id: '20a72757-923c-4a01-ad4f-7ccdc2a83e03', + twitter_handle: 'NuclearBitcoinr', + }, + ], + hosts: [ + { + name: 'Peter McCormack', + profile_picture: 'https://pbs.twimg.com/profile_images/1524287442307723265/_59ITDbJ_400x400.jpg', + ref_id: '887a65a7-a2d8-4371-887e-bc7a6ca6ff17', + twitter_handle: 'PeterMcCormack', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/4e607036-8fde-48ef-ab76-9c2ac4bab031.jpg', + keyword: !0, + link: 'https://chtbl.com/track/282487/traffic.libsyn.com/secure/whatbitcoindid/WBD557_-_Ryan_Macleod.mp3', + node_type: 'clip', + pub_key: '032ff32727b06d20a13a0a8d8dfe09d39659c16deeaffbf94d6d21ec6bb28850b6', + ref_id: 'ccac3748-afc5-4404-8497-1710f501f49f', + show_title: 'What Bitcoin Did with Peter McCormack', + text: "the SMR modules, when they're created and they're approved, will that wipe out any need to build these larger reactors? Is that the death of those? Is the desired just to only have SMRs? Not necessarily. There's potentially room for all the different types. There's still, like, the UAE's just built a few large reactors. The hinkley point C's. Almost finished in the UK. I think there's the reactors in Georgia that have been taking a while, but they're almost finished taking a while, 15 years. When you say the small reactors, what is the scale compared to, like, a normal nuclear reactor? The term Small modular reactor applies to reactors that are less than 300. Conventional reactors are in like 600, 700 megawatt units, and they benefit from the economies of scale so they can have a wider customer base to share the risk of the costs with I have. No idea what that amount of power, how many people that services. So if you had one of these SMRs, how many would we need in the UK to serve 70 million people? Well, it depends because it will be locally dependent. The difference is you can build one large reactor and then all the transmission infrastructure to get it to the customers, or you can build the SMRs in hyperlocal grids too. Do you have a look at how much grid the UK grid uses? I'd love to. I guess you might have an idea of what the Canada grid uses. Is Canada have a single grid? Because it's quite it's pretty spread out. Yeah, as soon as you start getting further north, it gets pretty remote and there's a lot of off grid that depends on diesel. That's the goal of the SMR action plan for off grid, is to get remote communities off of diesel, upgrade them to nuclear with these small modular reactors. OK, but I can't imagine the construction of a small modular modular reactor is going to be cheap. But they must be like the estimated cars. The first of a kind reactors are going to be in the orders of several hundreds of millions, a few billion. But the expected cost, once the technology is mature, the cost will be cut in half because once the manufacturing facilities are built and all of the supply chains are developed and the expertise is aligned, that will significantly drive the cost down as more reactors are deployed. But yeah, getting it over those initial hurdles is going to be quite costly and require like, public private risk sharing and capital investment. So it says Greater London uses just under 40,000 gigawatt hours and it says it could be supplied by two or so, like, large nuclear power plants. Okay, so that'd be like four SMRs? Depends on the type of SMR. If you're going with a 300 megawatt unit, then yeah, but if you want to apply it to like, a small community that only needs 15 to 20 MW, you can build either a few of the really small reactors that are going to be in the ten megawatt range. Oh, you can build like tiny versions of these? Yeah, that's the thing, because we want to build some that are in the one to ten megawatt range, in the 50 to 150 megawatt range, and then like the 200 to 300 megawatt range. So we'll have a wide variety of applications that these reactors can be applied to. So the smaller ones, one to 10 MW, what kind of size geography do they need? Like a track field hockey arena. Oh, wow. Yeah, not much. Okay. And do they know the construction time or something like that? They're expecting the smaller ones to be in the orders of like one to two years and then the larger ones being like, the five years ballpark so. It'S really important to get through that regulatory process then. Absolutely, yeah. And are there enough people out there who are available to be able to work to construct these, to work at these? Is that another thing that has to be worked on to train people up? Yeah. In many jurisdictions that is the case. That's why it is being so costly to build the Hinkley reactor in the Vocal reactor in Georgia for the UK and the US markets, because they let their supply chain atrophy by not building or refurbishing any of the reactors for decades. Whereas in Canada, we are actively refurbishing our reactors right now. The Darlington has undergone refurbishment. The point, Lapro. Reactor has undergone refurbishment. Bruce reactor is currently under refurbishment. So this will extend the life of those reactors for at least another four decades. What's involved in refurbishing it is essentially using the site to put in new technology. Yeah. A lot of the parts in these reactors are interchangeable. They can just be replaced with new parts, and the pressure tubes just get replaced with fresh zirconium pressure tubes, and they replace the turbines if they need to. Just anything that's starting to show its age just gets replaced. But the core of the reactor pretty much remains unchanged. And how much time goes into refurbing a reactor, as opposed to by building one from scratch? Each reactor probably takes, like, two to three years to refurb. Yeah. Okay. And that has the advantage of sustaining our supply chain and our workforce and making sure that the industry remains robust and doesn't lose our expertise. So ", + timestamp: '00:20:06-00:25:51', + topics: ['Small modular reactors'], + type: 'podcast', + weight: 4.754855089440576, + }, + { + boost: 0, + date: 1673187067, + description: 'How do micro reactors contribute to the decentralization of the energy industry?', + episode_title: '@NuclearBitcoinr - Mining #bitcoin With Small Modular Nuclear Reactors. #313', + guests: [ + { + name: 'Nuclear Bitcoiner', + profile_picture: 'https://pbs.twimg.com/profile_images/1443185278525579278/_Yl1nao1_400x400.jpg', + ref_id: '60f5891f-0864-4ed4-987a-81da4768b3ba', + twitter_handle: 'nuclearbitcoinr', + }, + ], + hosts: [ + { + name: 'Daniel Prince', + profile_picture: 'https://pbs.twimg.com/profile_images/1589940494364205056/rnHs5gI3_400x400.jpg', + ref_id: 'df2d4d35-3e96-44ed-b1cc-cb8a714bbe30', + twitter_handle: 'PrinceySOV', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/e1eca67b-d372-4031-bf1f-8f0ff7fe6092.jpg', + keyword: !0, + link: 'https://anchor.fm/s/1346f9e8/podcast/play/63208295/https%253A%252F%252Fd3ctxlq1ktw2nl.cloudfront.net%252Fstaging%252F2023-0-8%252F4a07b2fe-eb1d-2c82-677e-8f2808a09536.mp3', + node_type: 'clip', + pub_key: '02545c14cbb18a61f20dd45f5e3dcbd9acae3de282369501040adce32a75311309', + ref_id: '58d095b5-4c46-4586-888c-8b56a9afd883', + show_title: `Once Bitten! - gl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0 ); - gl_FragColor.rgb += weights[ 0 ] * getSample( 0.0, axis ); +A Bitcoin Podcast. +`, + text: "So I think it's all going to all going to fit together and like, the small modular reactors have so much potential. When you say small, how small are we talking? Small encompasses anything less than 300 MW. So, like, your typical nuclear reactor that we have out there is, depending on how old they are, 700, 800 MW. Like the new ones that are just being built in the UAE, they're like 1.4 gigawatts per unit. These reactors that are being built now are huge, but they have a narrow market that they can be built in once they're built. And if the market is there, that's great. But there's communities throughout Africa that could be better served by a reactor that generates just 5 MW instead of 500. So there's going to be a lot more applicability. And then the range goes from the micro reactors are anything less than 10 MW. Small is anything less than 300. And then there's the micro ones that they have, they're even smaller. And the micro ones are basically going to be able to fit a nearly complete reactor on the back of a transport trailer and just ship it to site and assemble the final components. Because the idea is that they're going to be mass produced in a factory type of setting on an assembly line so that they can take advantage of repeat construction and learning techniques to improve the construction process and get a lot of more standardized practices in the material and the supply chains that they use. So that's going to be going to reduce the costs dramatically. But then the problem is I'm trying to picture this in my mind. As. We all decentralize, this helps us get out of the cities, right? We don't need to be in cities anymore. And we could go out to areas of natural beauty and build communities around a micro reactor. Am I using the right words here? Yes. And that thing could be about the size of a shipping container or a little bit larger. Well, the main components would be in the shipping container. There would have to be a building built around it to house it. But even then it wouldn't be that size of maybe like a public school or like a hockey arena, something. So it would just be like a building because it would be built and it would be running and whatever else, but it wouldn't be like one of these massive eyesores. It's going to be pretty small. Oh, yeah. They'll be able to build them in a way that you wouldn't even know what it was unless you actually knew what it was. They'll just be a nondescript building that's just over there with a bunch of power lines coming out of it. And then the cool thing about the modularity is, say you've got a five megawatt reactor, but your community needs like 13 MW. You can build three of these units in tandem and then couple them all together. And then you can have just say, one central control room, or you can have one central turbine building. And then each of the the generator modules would be on their own. So instead of having three of each, you can kind of streamline that a bit. And then where I see a lot of, like, the bitcoin mining come in is like, perhaps you see that in the future. This community has the potential to develop up to 30 MW, but they're only consuming about 13 now. You can just build the full 30, fill that space with the bitcoin miners, and then as the community grows into its new energy profile, you can just peel off miners and deploy them somewhere else where it will make more sense to them. And then the locations where I'm talking about in northern Canada, we also have the added benefit that these little guys are space heaters if configured in the right way. And then like, on top of that, like Troy Cross was talking with, McCormick recently, threw out some interesting ideas about one being like, a lot of the carbon capture technology is basically just drawing air through a fan and through a medium that absorbs the carbon. And then out the other side, it's like, well, just run your miners through and then you can, you can take the fans to blow the air through the carbon capture, and then you can probably capture the heat and go send that off into a greenhouse or something nearby. Or you can take that carbon and you can distribute that into the greenhouse. There's so many different ways that this can be configured. And the ideas that I'm seeing with the modeling is very complex and convoluted with how they're trying to be like, oh, well, you can ramp up and down the reactors. That's a cool capability. But then you're either losing out on potential economic benefit or when you do ramp up and down your core, like any generator, even like a natural gas generator, that puts unnecessary wear and stress on the equipment and the lifetime of your generation station. So if you can just leave your reactor running at 100% all the time, regardless of what your local demand. Looks like that's going to have a significant improvement on the lifetime of your reactor. For one of these microreactors, sorry to jump in on my mind is racing one of these microreactors that you take and you build a community around. If I remember rightly, about half an hour ago, we were talking about the shelf life of the fuel rods. It's like one and a half or three years you might only need to take out before they get switched out. Is that correct? Yeah, that's typically like the lightwater reactors that we're familiar with, the traditional type, the one that we're going to be building at CNL or demonstrating, that's going to be the one we anticipate to deploy to remote off grid communities. It's going to have a 20 year fuel cycle. So basically so you don't even need to go to a uranium rich plane. You just turn up with your module, it gets built, the fuel cells turn up, and then you just need another delivery in 20 years and you're good to go. Pretty much, yeah. Or yeah, or you could just keep keep a second fuel pod just on hand. Right. And then yeah, then you've got 40 years worth of fuel available on site, and you're basically limited to how well you maintain your reactor and do your preventative maintenance. There are some parts that are going to wear over time, like anything like maintaining a classic car. There's some parts that you're going to need to swap out over time, but for the most part, you can keep the main components in good enough shape that you can push them 40, 60, 80 years. It's like the complete opposite of what happened in the Gold Rush. Instead of risking life and limb to cross mountain ranges and blizzards and people that wanted to basically kill you to get to the other side to hopefully find gold, you're taking all that shit with you already and just plugging in and building a community around it and civilization, immediate civilization. That's the idea. Sounds like the pioneer species idea in a nutshell. We go to where the power is, and now we have the ability to put the power wherever we want. Like there's going to be within reason, like there's going to be some limitations, but like, even some of these reactors are going to be designed in such a way that they're like, seismically stable so that even a strong earthquake is not even going to bother them. And I remember Ross Stevens talking about this in his interview with Michael Sailor. Did you watch that one when they did the MicroStrategy World Day start of 2021? With all the content that I consume? Yeah. I'm surprised I haven't gotten that one because those are two, two big brains for sure. Taylor interviewed Ross and it was the first time I'd ever even heard about Ross. He had never been on any podcast or appeared anywhere at all. In a bitcoin space. And that was the opening interview. And at some point in that interview, Ross did basically say bitcoin is going to communities give us the ability to move decentralize ourselves to areas of natural beauty where we can now build up around he used the example of a waterfall for a great example, because now you can mine bitcoin, but you guys are taking one step further, like yeah, no, just load up the truck guys. Let's go. Because we got the mini nuclear reactor and we're solid for 40 years. Yeah, it blows my mind. Oh, I know. When I started really digging into it, I was just trying to do the good kind of scientist thing where you're just like, well, how can this not work? And trying to come up and conceive of all the ways that it doesn't. But every pathway that I've gone down leads me to just like, this is the way forward. But it takes a lot of education for people to not only get nuclear power and bitcoin and how electricity systems work. These are things that a small fraction of the world understands, even one of the three of them. But putting all three of them together, I'm still pretty neophyte in my understanding of nuclear power. I'm not a nuclear engineer or anything. I work with tons of them, and I can pick their brains whenever I need to. ", + timestamp: '01:07:09-01:17:31', + topics: ['micro reactors', 'reactors'], + type: 'podcast', + weight: 19.120022996014775, + }, + { + boost: 0, + date: 1528156800, + description: 'Store value of Bitcoin in a volatile market and its mass adoption barrier ', + episode_title: 'Cryptocurrency Price Volatility and Bitcoin Store-of-value', + guests: [], + hosts: [ + { + name: 'Andreas M. Antonopoulos', + profile_picture: 'https://pbs.twimg.com/profile_images/1362967502247129090/Q2ypSr9W_400x400.jpg', + ref_id: '132bc4d2-c16e-466e-8ab2-6f8a9a9a6568', + twitter_handle: 'aantonop', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/1c3fe064-f637-41ea-8a4b-a533ef5985b1.jpg', + keyword: !0, + link: 'https://www.youtube.com/watch?v=wzzZT95ijTo', + node_type: 'clip', + pub_key: '02574d6e8e787372184b6f17c40d6c6fe1777db9015801f95dfd24692784d767cd', + ref_id: '1806f209-3cd6-496a-baf3-0351b7f432aa', + show_title: 'aantonop', + text: "James asks store value in a volatile market. My smart friend says that the biggest barrier to mass adoption is price volatility, which limits Bitcoin's use as a store. Store value. Its most convincing use case to date. It's a lousy story value if the price keeps changing. Is this right? Are there other obstacles to mass adoption? What are they, in your opinion? James, your friend may be smart, but I don't think they understand some of the basic economics at play here. So, first of all, I don't think price volatility really affects bitcoin's use as a store of value. Store value is definitely a longterm perspective. It certainly affects Bitcoin's use as a medium of exchange, but as a store of value. If you are buying and investing in bitcoin and using it as a store of value, then you have a long term perspective. Certainly more than a year. How is Bitcoin doing? In the last year. It's up about 600%. Sounds like a pretty good store of value to me. Over the last three years. Definitely pretty good store value. If you look at it over three months, it's probably not a good store of value. But that's not what store value means. Store value is definitely a long term perspective. The other thing about this is that it's a bit of a circular argument because volatility really is an expression of size. For example, in a follow up question, James said, we tend to harbor an expectation that this volatility, a key obstacle to bitcoin's wider success, will eventually calm down. But bitcoin's resistance to regulation is a feature, not a bug. So where will the stability come from? Absent of mass adoption and absent of regulation. I think there's a broad misunderstanding about how volatility is dealt with in capital markets and currency markets. The idea that regulators control volatility in the currency, I think is an illusion. Regulation doesn't control volatility. If anything, regulated markets that don't have enough flexibility and liquidity are more volatile. I would say the biggest contributor to volatility is the small size of a currency. And you've got to understand that Bitcoin is currently traded on a global basis. Unlike most other national currencies that have primarily domestic markets, bitcoin is a global market. And for a global market, it's tiny. It really is absolutely tiny. $100 billion is nothing in currencies, even for a currency that's only domestic, let alone for a currency that's traded globally. So this kind of sounds like a circular argument, basically saying the biggest barrier to mass adoption is the lack of mass adoption. And if only there was more mass adoption, then there'd be more mass adoption. The biggest barrier to bitcoin being big is that bitcoin is small. And if only bitcoin was bigger than it could be bigger, because that's what price volatility is. It's that this currency is small. And so if the fact that it's small is a barrier to it becoming big, that's kind of circular logic. As bitcoin gets bigger, volatility goes down. As the market becomes more liquid, as it is traded more and used for different purposes and not just speculation, I think that reduces volatility. The more companies depend on bitcoin as an input, or use it for payments to contractors or providers, or hold inventory and purchase things based on bitcoin, or sell things based on bitcoin, the more the price of volatility is reduced. Right now, it's mostly used for speculation, it's mostly dealt with as a short term basis. It's traded globally in a wide open market, and as a result, it's quite volatile. So yes, bitcoin will become less volatile as it grows, or at least I certainly hope it will. I think the economics ", + timestamp: '00:00:00-00:04:24', + topics: ['Price volatility', 'Regulation resistance', 'Small size currency', 'Market liquidity'], + type: 'youtube', + weight: 4.673567056655884, + }, + { + boost: 0, + date: 1670943361, + description: 'Discussion on the percentage of Bitcoiners who self custody and the limitations of Layer 1s', + episode_title: 'Café ₿: SBF Arrested 🚨 🚨 #Bitcoin Not Crypto', + guests: [ + { + name: ' Tone Vays', + profile_picture: 'https://pbs.twimg.com/profile_images/1416821178266787844/T1OkI9ZW_400x400.jpg', + ref_id: 'ac43b4f0-9056-4a6b-9d30-4a6250405ade', + twitter_handle: 'ToneVays', + }, + { + name: ' 2140data', + profile_picture: 'https://pbs.twimg.com/profile_images/1598330787778232320/ZVFcRtet_400x400.jpg', + ref_id: 'c8fb52d1-fa69-410d-bf96-8a7559bba863', + twitter_handle: '2140data', + }, + { + name: ' BITVOLT7', + profile_picture: 'https://pbs.twimg.com/profile_images/1532194001511714818/O8nSTKcx_400x400.png', + ref_id: '2b9913b7-393c-4125-9aeb-4a8bf32bfa44', + twitter_handle: 'BITVOLT7', + }, + { + name: ' Tomer Strolight', + profile_picture: 'https://pbs.twimg.com/profile_images/1591960241008148481/HtyINxtU_400x400.jpg', + ref_id: '4e0b6941-6d5c-439c-9d30-7c5691828930', + twitter_handle: 'TomerStrolight', + }, + { + name: 'Neil Jacobs', + profile_picture: 'https://pbs.twimg.com/profile_images/1593645788978102277/UAQCQKeE_400x400.jpg', + ref_id: '0bc759e0-b055-4800-a79d-2b950fe5cc53', + twitter_handle: 'NeilJacobs', + }, + { + name: ' StackchainSig', + profile_picture: 'https://pbs.twimg.com/profile_images/1589791699571802117/n_Y1Qm7J_400x400.jpg', + ref_id: 'c000ebd6-1c05-4c6a-ad07-5e5c10cc3fb3', + twitter_handle: 'StackchainSig', + }, + { + name: ' Joe Carlasare', + profile_picture: 'https://pbs.twimg.com/profile_images/1567374701667794944/2ghrkDx7_400x400.jpg', + ref_id: '75b3a3fa-f118-4ea0-9477-25832844c900', + twitter_handle: 'JoeCarlasare', + }, + { + name: ' w_s_bitcoin', + profile_picture: 'https://pbs.twimg.com/profile_images/1594796869233811474/g0_ZRshz_400x400.png', + ref_id: '268a731a-0e21-4cb1-ad73-d8d21f433393', + twitter_handle: 'w_s_bitcoin', + }, + { + name: ' TYonClubhouse', + profile_picture: 'https://pbs.twimg.com/profile_images/1575442322531274756/-ZdL-K9S_400x400.jpg', + ref_id: '519d68be-1a96-4394-8bab-48f570f1a6cd', + twitter_handle: 'TYonClubhouse', + }, + ], + hosts: [ + { + name: 'Alex Stanczyk', + profile_picture: 'https://pbs.twimg.com/profile_images/1539055022364708864/rwErK6x1_400x400.jpg', + ref_id: '3126e2a3-bbe4-456b-b298-9714085fa286', + twitter_handle: 'alexstanczyk', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/239722cb-4216-414a-a17b-5adf9d52e15a.jpg', + keyword: !0, + link: 'https://stakwork-uploads.s3.amazonaws.com/uploads/customers/2707/media_to_local/ee6b20fb-2dd2-467b-8e0e-0c2301d9ff68/3f03e525-44df-4eeb-ad79-f6e66ccca86d.mp3', + node_type: 'clip', + pub_key: '034248fa888690a85021cf117c168a535c53b92e1fdf3e4f9cefddfe09118d8207', + ref_id: 'b8d90bd0-45fb-40d9-87db-b9a908a8684a', + show_title: 'Swan.com', + text: "I have a quick question, and it kind of just got sparked by what Nico said and what we've been talking about in general with the importance of self custody and the spreading of this message. But in its current form, right now, as it is, the protocol, what percentage of the world do we honestly think can actually self custody on the base layer? Like, realistically, do we know that number? Like 1-2-I don't know. That's a really good question. I mean, you could surmise from the glass node data about the number of bitcoin addresses with one bitcoin or more. I don't know what percentage, because that doesn't necessarily represent that one bitcoin is for each individual. Right, but I mean, you could surmise that a percentage of that is definitely individuals taking self custody. I think you could make a pretty good bet that there's definitely a record amount of individuals taking bitcoin into self custody. And every time one of these blow ups happen, which I believe is really the silver lining of this whole FTX disaster, is a lot of people burn their fingers on the stove and they realize, oh crap, not your keys, not your bitcoin. And it's interesting because it just came out that CZ sorry, that Binance is seeing record amount of outflows as well. Now, if you've been here for a while, this was before my time in Bitcoin malgax blew up, and that was one of the only exchanges at that time. And I guess a lot of people learned their lesson. So what I'm trying to say is that every wave of these disasters, I think a small percentage of people realize not your keys, not your Bitcoin. It's just unfortunate that these things need to happen in order for individuals to learn those types of lessons. Because I know a lot of like, there was this fund, it was like Travis Kling or something, the Coggy fund wrecked, totally gone. He had most of the funds on FTX. And there's been horror stories that I've read of people's, mothers, individuals, that just for some reason or the other, they left their wealth on FTX. And it's unfortunate that that's the price that had to be paid for people to realize the truth. I also want to give a shout out to Corey because he did great work and he got a ton of crap for it, for basically beating the battle drum about celsius about FTX and getting individuals to take self custody. It's just crazy how effective the shitcoiners are at just drowning out that. It's like, oh, these Bitcoin maxis, they're radicals, they're crazy. They call you all these names. But the bear market is kind of bittersweet. We get vindicated, but at the same time, a lot of people lose their life savings. And I think that's really tragic. Man yeah, I think kind of where I was getting at is I personally believe self custody is incredibly important and probably one of the key, if not the most important feature of Bitcoin. Without enough users controlling their bitcoin and having it in self custody and using it right, kind of growing the network in terms of its peer to peer connections, there's no Bitcoin failed. We need to have as many peer to peer connections as possible. Right? That's the whole fucking point of Bitcoin. But I guess what I was getting at is like, I don't want to oversell the technology either, though, and make it seem like everyone can do this, because that's just not true, at least in its current form. And maybe we'll make updates in the future that will make it that way, will make it possible for everyone to but it's actually I mean, in my opinion, it's very likely that we also may not, right? We may kind of choose to keep the base layer in a way where it's a settlement layer and the vast majority of people having their bitcoin on layers on top and they don't necessarily have their own private keys or they have kind of these other ways of having custodial relationships like fettiments or custodial lightning wallets or things like this. So it's like while I see the importance, at least especially in this moment when we are so early and everyone can at this very moment, who knows about Bitcoin and has Bitcoin, everyone who has it now, they really can take self custody, right? It's a few pennies. I don't say everyone, but a lot of people can take self custody. It only costs a few pennies of on chain fees and the block chain is not congested. The mempool is clearing regularly. But at a certain point we do have to like realize that it becomes difficult to onboard everyone. And so I don't want to oversell the technology when it's not really there yet. And it may never be. You see what I'm saying? I think that's a dangerous thing too, because then you have a bunch of people who are like, well, fuck, what am I going to do now? Right? Once we get to that point where it's like, well, sorry, train is full, I think you can hide a lot of the complexity of self custody behind a slick user interface and just kind of remove that's not what I'm talking about though, Nico. I'm talking about the literal limitations of the technology itself. There's only so much block space and right now we don't have good enough ways to batch transactions, which we might in the future, but at least now we don't on main chain. I don't even understand why this is an issue. Because you can't take self custody without taking self custody on the main chain. We're talking about man self custody. No, I guess that's a fair point. But I guess that also makes the assumption that all of these transactions are trying to not happen on layers above. I'm talking about what you're saying, storing their wealth in Bitcoin and then us banging the table saying it's not your Bitcoin unless you take self custody. But then when the rest of the world wakes up, they realize that they're too late. Do federations help with this at all? That's what I'm saying, is like I think that's why I'm saying it's kind of dangerous to be going down this narrative path of not your keys, not your coins, and that's the only option. But we're not there yet. Wicked. In the interim, we're not at the point where billions of people are trying to crowd into Bitcoin and everybody's trying to take self custody and it's the man. The pools got 3 billion transactions, though, and influential. And so I don't want people to come back and be like, man, those fucking early as bitches just didn't we weren't considering the realistic situation here, which is that the vast majority of people probably will never hold their own keys. At least in our current technological stack of Bitcoin. Things may change on the basis we're worried about that. I feel like you're over worried about something like who cares we don't know what I care. Look, calm down. Because about people being in control of their money. That's the whole fucking point. That's not what I'm saying. You just said you don't want people in the future to go back and listen to these and be like, hey, they said a bunch of stupid shit. It's like, look, nobody knows the future, man. I don't have a crystal. Like, my membership expired to the Seance network. I no longer have access to the ability to predict the future. So just don't even worry about it. We go one step at a time here. Okay? But we're talking about a future where everyone uses Bitcoin and we're saying that everyone needs to take self custody. But those two ideas do not jive. That's all I'm saying. Wicked. Wicked. Are you really worried that Kevin O'Leary, Peter Schiff, Charlie Munger are not going to be able to have self custody? Those motherfuckers will, man. They're going to be on the base layer settlement just like the rest of us because we're so early. It won't matter for us to pay the equivalent of $5,000 to settle a transaction on chain when it's wicked expensive. But everyone else in the fucking world is going to have to use Fetty Mint's and other custodial solutions to use bitcoin. And I think it's greatest be realistic about that in human history. It's going to happen. I agree with that. Yeah. But 80% of the people who are fucking poor and in developing nations who don't have the chance to get in on this transfer of wealth or are doing it in a way where they have a little bit of bitcoin, but it's in a custodial lightning wallet, so maybe they get fucked along the way anyways, you know what I'm saying? All I'm saying is we just have to be careful with how we word things and the expectations we set. I would push back against that man a little bit. Look, at this moment in time, I think the more individuals taking self custody of their Bitcoin, the better, and I think that perhaps in the future, those we agree on that and the circumstances will arise. Maybe, I have no idea. But right now, that isn't the case. Right now it's incredibly easy, incredibly cheap. Of course, I don't think it's very difficult because I've been doing it for a while. But the steps I don't think are very difficult. I don't think setting up a ledger or a treasure or a jade or a cold card, I don't think it's that hard, man. And I think that you can get a percentage of the population, specifically the people that have spent less time in the Fiat Matrix. I think you can get them accustomed to it, man. It's what I do, bro. I literally have a cabinet full of hardware wallets and I hand them out like candy bars. Yeah, man. I'm running out custody every single weekday morning this is what I thank you for doing that, by the way, we're planning on doing for a very long time moving forward. I think it's really important to spread this message. I'm not saying don't usually custody. I'm just saying we're going to reach a saturation point at some point, and it might be there. Well, we're not there yet, but it might come. Deep breath. It might sneak up on us. Angry Apple, take a deep breath. I can just see Nico at Halloween. And here's a treasure for you. And here's a ledger for you. I literally subsidize it, bro. So hold on, I have to tell you guys the story because it's a good story. So before I dropped out of college, this was 2016, by the way. My last class was public speaking, and they're like, what are you going to do your presentation on? So I did my presentation on bitcoin. At the very end, I said, guys, if you download a bitcoin wallet or something like that, I will literally give you $10 worth of bitcoin. Mind you, this was 2016. There was a class of 29 people. Only three people took up that offer like mad. Wow. Yeah, dude, it's interesting. But hey, ngu, I think, fixes a lot of this. Tommer has had his hand up for a long time. Let's go with Tomer, and then I have a question for the panel. Okay, I have a point to make, but just to weigh in on the last conversation, I think by the time this becomes what wicked's concern comes up, there will be good solutions for it. There'll be other things, but I don't want to really belabor that point. I shared another tweet that I made last night at the top of the nest, which I think for me at least, is an attempt to condense a lot of this conversation, which is, I said the most important feature of bitcoin is auditability. It's not that I'm just trying to make a case where it's not that there's 21 million coins or that even that this is a finite number of coins. It's that you can actually see where every coin is, including, most importantly, yours. And so you know that you've got what you've got. And that certainty is the invention that we've never seen before. We've never had that ability for you to have, knowingly what you have in a financial system, in a digital asset that is invulnerable to attack. I feel like I'm just kind of going over and over some of these things, but it's a different lens because everybody tends to focus at different times on different features of this thing. And now with all these custodial blow ups that we've seen, and we remember, why not your keys? Not your coins. And the reason your keys are so important is you can see what's on there, so can everyone else. And so all these games of, well, how many bitcoins actually exist in. The paper world. Nobody knows how many exist on chain. Everybody knows which coins are yours in custody. Nobody knows which coins are yours in self custody, you know, and everybody else knows. And so it's a night and day difference. It's incredibly stark contrast to what existed before. Even with things like gold that you can take self custody of, you don't know how much gold there is out there. You can't audit the global supply of gold. You can't actually verify for yourself that the thing that you hold in your hand that you think is gold is gold, but you can verify all of that easily trivially, inexpensively, instantly, continuously with Bitcoin. That's the that's a great point. Great point. How many diamonds are there out there? Does anybody know? Infinite. You can make diamonds out of carbon. So take your pencil that and squeeze it really hard. You get a diamond. There's a lot off the coast of South Africa, that's for sure. Angry Apple makes his own diamonds. He just grabs the carbon and crushes it in its vest until it becomes a diamond. That's right. And these man made diamonds are better than those shitty ones you find in the Earth crust anyway, so they're more perfect. ", + timestamp: '01:22:31-01:37:39', + topics: ['Bitcoin self-custody', 'limitations of Layer 1s'], + type: 'twitter_space', + weight: 9.165734869028597, + }, + { + boost: 0, + date: 1624507200, + description: '[[Ali]] background', + episode_title: 'Bitcoin Fixes This 48 Small Business with Ali', + guests: [ + { name: 'Ali', profile_picture: '', ref_id: '1169edf2-a89f-4d89-94a4-1be1a7b9aef0', twitter_handle: '' }, + ], + hosts: [], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/2536a974-d668-4ac2-8613-0b37aa0ca08c.jpg', + keyword: !0, + link: 'https://anchor.fm/s/2a4e8034/podcast/play/36003846/https%3A%2F%2Fd3ctxlq1ktw2nl.cloudfront.net%2Fstaging%2F2021-5-23%2F969a4306-e9eb-95c5-0e15-42d37c0e61e8.mp3', + node_type: 'clip', + pub_key: '', + ref_id: '533a527d-5146-4c10-8091-329cbc8bf06a', + show_title: 'Bitcoin Fixes This', + text: "of your Treasuries into Bitcoin. But before we get into all of that, can you tell us for my audience, just like how you got started and how you got into the business that you're in? Yeah, for sure. So I came to Canada from Egypt back in 2011. We were already Canadian citizens at that point. But I came with my brother to kind of start our careers here. And we came here. We were looking for a business to kind of buy outright or art together. And we found this cool restaurant in London, Ontario, that was doing pretty well. So we decided, you know what? Let's get into the restaurant industry. And we just bought that restaurant outright and we started from there. And then we grew that restaurant from small, like, little local place to a franchise. We now have over six locations in Ontario, and we're non stop growing the business. And ", + timestamp: '00:01:25-00:02:30', + topics: ['ali'], + type: 'podcast', + weight: 4.660259485245579, + }, + { + boost: 0, + date: 1666137600, + description: 'Fastest way to grow connectivity for nodes?', + episode_title: 'Meet the Makers: Alan & Kwinten', + guests: [ + { + name: 'Alan Plus', + profile_picture: 'https://pbs.twimg.com/profile_images/1565235279451103233/XD8pJuIo_400x400.jpg', + ref_id: 'e362fed6-ec06-4d8a-a052-3137b24f213f', + twitter_handle: 'alnboltn', + }, + { + name: 'Kwinten De Backe', + profile_picture: 'https://pbs.twimg.com/profile_images/917859380699320320/p_v-fjmh_400x400.jpg', + ref_id: 'be68f240-1f4c-4b27-b4bb-752c90cbe0c3', + twitter_handle: 'QuintenDeBacke1', + }, + ], + hosts: [ + { + name: 'Moritz Alby', + profile_picture: 'https://pbs.twimg.com/profile_images/859727763292512258/kiFpZ2vO_400x400.jpg', + ref_id: 'e88efbf8-3809-4508-a86a-d7bf9effb574', + twitter_handle: 'MoritzKaminski', + }, + { + name: 'Zapp Ed', + profile_picture: 'https://pbs.twimg.com/profile_images/1519990234070540288/adGqlFoj_400x400.jpg', + ref_id: 'bbe7cf1d-cd8d-4d36-926d-76f41b775fbb', + twitter_handle: 'zapp_ed', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/965489b4-a414-4fd0-ab8c-55911b1596aa.jpg', + keyword: !0, + link: 'https://www.youtube.com/watch?v=GyA8tHNKmig', + node_type: 'clip', + pub_key: '02574d6e8e787372184b6f17c40d6c6fe1777db9015801f95dfd24692784d767cd', + ref_id: 'c9e0fbb2-302b-44c3-b69c-dfac38c97f98', + show_title: 'BOLT FUN', + text: "could also take this question right now actually. What's the fastest way to grow connectivity capacity for your node? Is it better to open a few big channels or lots of small ones. I don't have all the data from all the node operators, but based on what I heard, what I've seen, there is no single strategy that is a winning strategy. So as I mentioned before, you could be a zero fee router and still make money by selling channels, or you could never sell channels and just make money on routing and have very high fees. But the same way as the question implied, you could have a lot of smaller channels, like 1 million set channels and to a bunch of nodes. So you connect a lot of different areas of the Lightning network, all kinds of services for micro payments. Or you could just decide that you're going to have ten channels, but they are very big between high capacity nodes. So all of these in my opinion and in my experience work, and you just have to find the right nodes to connect to. And this is a dynamic system, so there's no like one solution, it just changes and as soon as a new node enters the scene, it changes the whole dynamic. So it's a moving target. And if you find your sweet spot, you have to like continuously change that sweet spot a little bit. But it's there is a possibility to make money. There are some people who make serious money, I can tell you that. But yeah, just to answer directly the question, the fastest way really to grow your node is that two ways. One is you use a service like Lightningnetworkplus where you have, where you get two channels for every channel open. Technically, this is you doubling the speed of your growth. The other way is you can open channels to whoever you want to and whoever accepts your channels and then you empty those channels through an exchange or through loop. I mean, that is possible. It's expensive, but you can do this, you can buy channels if you have the capacity to do this. That's also a very fast way because you just keep opening chance you could build your node in a day technically if you have the money. ", + timestamp: '00:23:26-00:26:32', + topics: ['Lightning nodes'], + type: 'youtube', + weight: 4.8936503202747375, + }, + { + boost: 0, + date: 1658548800, + description: 'Managing [[privacy keys]] is difficult', + episode_title: 'WHY ARE WE BULLISH Lisa Hough JC Crown Brandon Quittem ep274', + guests: [ + { + name: 'Brandon Quittem', + profile_picture: 'https://pbs.twimg.com/profile_images/1502403738861940736/9J5VuTye_400x400.jpg', + ref_id: '65512044-7810-4ece-8156-5519e072cb66', + twitter_handle: 'Bquittem', + }, + { + name: 'JC Crown', + profile_picture: '', + ref_id: '79ae57b7-59d1-416a-961e-9e584ced2dfa', + twitter_handle: '', + }, + { + name: 'Lisa Hough', + profile_picture: '', + ref_id: 'a65a3362-03a6-4a6d-a901-3067f8b5dc81', + twitter_handle: '', + }, + ], + hosts: [], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/419512c2-e309-4b25-bfe2-cd481d53f66d.jpg', + keyword: !0, + link: 'https://anchor.fm/s/11e95d20/podcast/play/55198112/https%3A%2F%2Fd3ctxlq1ktw2nl.cloudfront.net%2Fstaging%2F2022-6-22%2F277659593-44100-2-f891dab224966.mp3', + node_type: 'clip', + pub_key: '', + ref_id: '5992b639-b05a-4e6d-bd94-4c1b6907bda3', + show_title: 'BTC Sessions', + text: "other thing is that managing private keys are hard and humans have no relationship to protecting information. And a Bitcoin that I'm sure everyone on this call is familiar with. Gigi, he explained it really well with the map is the territory meaning the information, your private keys or twelve word seats, that is your Bitcoin. And we have a lot of history and practice storing physical things we know to bury gold or put money under a mattress or in a bank fault. But we're not really good at information and so anything that makes that process easier is really important. And of course the reason is if the supply is held in individuals custody, it acts as a deterrent for any would be state level actor or other nefarious actor. Essentially says, good luck attacking us because it's going to be very hard and as long as you increase the cost of tyranny, I predict that that will repel the attacks because it's going to be really obvious how hard the attack would be to make. And so I don't know enough about the protocol to save it the finer details, but that's my sense. Yeah, I like that. And I like your Nigerian example. I think there'll probably be instances of even rather than even just countries, like even small tightening groups, small towns or something, having a sediment or whatever it may be, or in the future a FedRAMP for a citadel perhaps. We'll see how it goes. But yeah, no, I love that idea. JC. ", + timestamp: '00:17:24-00:19:05', + topics: ['privacy keys'], + type: 'podcast', + weight: 4.651410079704728, + }, + { + boost: 0, + date: 1641859200, + description: 'About the Network mining simulator', + episode_title: 'Brink Projects: Research and Improvements for Bitcoin - TABConf 2021', + guests: [ + { + name: 'Gloria Zhao', + profile_picture: 'https://pbs.twimg.com/profile_images/1144496084330266631/aPKPfoX3_400x400.png', + ref_id: 'cebd71c3-4ccf-452d-8ba7-4982f49fd060', + twitter_handle: 'GloriaHuiZhao', + }, + { + name: 'Mike Schmidt', + profile_picture: 'https://pbs.twimg.com/profile_images/1320935020589158400/gFovyRlj_400x400.jpg', + ref_id: 'd503db9b-a7b1-49e1-8ef6-7541df3c2473', + twitter_handle: 'nytmike', + }, + { + name: 'Jesse Posner', + profile_picture: 'https://pbs.twimg.com/profile_images/1467067234484830213/T6PtLZq1_400x400.jpg', + ref_id: 'bb55767f-dfbb-4182-8dd8-e1b08e0c6ad6', + twitter_handle: 'jesseposner', + }, + { + name: 'Larry Ruane', + profile_picture: 'https://pbs.twimg.com/profile_images/1226076521/bike_crop_400x400.JPG', + ref_id: 'ce38f2dd-d41f-4957-ad83-671c3dc29cc5', + twitter_handle: 'larryruane', + }, + ], + hosts: [ + { + name: 'TABConf (The Atlanta Bitcoin Conference)', + profile_picture: 'https://pbs.twimg.com/profile_images/1596233571521499138/YE8Us_Ml_400x400.jpg', + ref_id: 'e46f0c05-8cc5-4264-9c40-83b13f4edd0a', + twitter_handle: 'tabconf', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/e7d2a4ca-6b44-4a45-a94c-6f48987979f7.jpg', + keyword: !0, + link: 'https://www.youtube.com/watch?v=UFro74sS8q0', + node_type: 'clip', + pub_key: '02574d6e8e787372184b6f17c40d6c6fe1777db9015801f95dfd24692784d767cd', + ref_id: '6731ba0c-c57b-4fb1-a2f6-6e1ec641e830', + show_title: 'TABConf (The Atlanta Bitcoin Conference)', + text: "rulane. I'm a part time Brink Grantee, so I hope to go full time someday. Most of what I do is PR review, but I thought it would be more interesting than just saying I do PR review and then go sit down. I thought I would present a project I started a couple of years ago, and that some of my break time. I've used to improve this little project and thought it might be interesting to present here. And it's something I call a network mining simulator. And there's a link to the repo here. And what does this simulator do? It can produce a million blocks in 10 seconds. Okay, so that's actually a higher block rate than many altcoins, believe it or not. So not really it's not creating real blocks, it's creating simulated blocks. So what the simulator does is it's what it is, is it's a command line program written and go. It's pretty small. It's like 400 lines of code. So it's very limited there. It's very simple. And I consider it a good tool for learning and actually chain code seminar. They're using this as part of their curriculum to bring in new developers and teach them some of these concepts. So it's really for learning and intuition building. And so what the level of the simulation is, is very, very basic. It's just a set of mining nodes, and there's only mining nodes, and each of them is creating blocks, generating blocks, according to Hassan distribution, which is like real bitcoin that we're all familiar with. And then these blocks are relayed across a simulated network and the network has latency. So each branch of the edge of the network has latency. The network is not fully connected necessarily. So what these nodes do is it's just like in real bitcoin, they generate new blocks, and as soon as they generate a new block, they forward it out. Or if they receive a block that is better than the one that they already know about, then they relay that to their peers. And then there's logic in there to make sure that we don't have infinite loops of forwarding. And then just like in the real bitcoin network, this kind of set up generates these temporary chain splits. And I'm not talking about hard forks or soft forks here, but just temporary chain splits due to timing. And then there ends up being these reorgs when mining nodes find out about a better chain, and that creates stale blocks. So this simulator is really to get at that aspect of bitcoin where we have these small reords that happen, they happen today in real life. And I said before, this is really mainly for learning, but this could be useful. I'm not really sure, but it could be useful for resisting harmful protocol modifications. I mean, there's people that are proposing all the time we had the block size war, right, in 2015 through 2017, and that's kind of settled down, but it's possible in the future you could have something like that where people are proposing larger blocks or more complex block validation. That's kind of analogous to slower block propagation if the blocks take a long time to validate. Or sometimes I haven't really heard this too much, but if people propose like a shorter block interval, then that will change the dynamics of these mining, these chain splits that I mentioned. So these are some of the results of these bad ideas if they were to be implemented. Higher scale block rate which represents a loss of security because miners will not make as much revenue and they're not going to be willing to put in as much ash rate. Also it will encourage the formation of specialized block relay networks. We actually had that a few years ago, but I think it's not being used anymore. But a specialized block relay network is easier to attack. There's also some of these bad ideas can cause greater incentive for geographic centralization. Now there's always a little bit of an incentive to do that, but if we make certain changes, larger blocks and smaller block interval and things like that, that increases the incentive for geographical centralization that's also easier to attack for especially state level attack. So the simulator runs off of a configuration. It's just a file that has a static set of mining nodes, each of which has a static hash rate. So like I said, it's very simple. And then there's a static network topology and each network connection has a static network latency. So time is a big thing in the simulator. There's also a block interval parameter so you can specify. So default is of course 600 seconds bitcoin. But you could play with that and change the block interval. So here's a quick example, like a really simple this took me five minutes to think of. It's a simple example of a configuration file for the simulators. There's only five minors here and each row or each line is a mining node. It has the name of the minor, then the then the hash rate and then, and then to the right of that is are the peers. So this is not a fully connected network with a delay. So for each configuration or each peer has a delay network delay. And so you run that, if you ran that configuration, it takes about 10 seconds. And then you can see like a bunch of statistics that prints out a summary at the end. And like one of the most interesting things is probably the stale block rate. So we see like 1% stale blocks in that with that configuration. And then you can see the per nodes have different stale block rates because depending on where they are in the network and then you can change the parameters of this. So here I increased a couple of the delays, network delays and then the stale rate went up. It more than doubled stale rate here with that change. And then this next one, I decreased the block size to two minutes from ten minutes to two minutes. And then the sale rate went crazy as a 10% sale rate. So this will show that's very bad for the network. You can also turn on detailed tracing mode T option on this, and then it'll print a line for everything that happens in the simulator so you can analyze exactly how the reords happen. It's kind of cool to study when those happen. It does print a line too, for reords, and I have some future improvements. And actually, that's it. That's all I have to COVID. ", + timestamp: '00:23:07-00:30:34', + topics: ['Network mining simulator', 'mining nodes'], + type: 'youtube', + weight: 4.627060462133696, + }, + { + boost: 0, + date: 1676449800, + description: 'The ramifications of the Paxos BUSD stablecoin situation for all of crypto', + episode_title: 'The Chopping Block: The SEC Is Attacking Crypto – Will Gary Gensler Succeed? - Ep. 456', + guests: [ + { + name: 'Marc Boiron', + profile_picture: 'https://pbs.twimg.com/profile_images/1486397784844496897/ZyNlahT2_400x400.jpg', + ref_id: '3f27d12e-0a50-42c0-8b76-b3bb15fa1ce6', + twitter_handle: 'boironattorney', + }, + ], + hosts: [ + { + name: 'Tarun Chitra', + profile_picture: 'https://pbs.twimg.com/profile_images/1587539091444432897/Z6_nmrCB_400x400.jpg', + ref_id: 'dfad4b23-92ff-4aa1-9aa4-abc1d54cd6d3', + twitter_handle: 'tarunchitra', + }, + { + name: 'Tom Schmidt', + profile_picture: 'https://pbs.twimg.com/profile_images/1563232354277085189/xQL92DR4_400x400.jpg', + ref_id: 'bc9d3bfd-36b0-4cbc-a491-9370decf4c99', + twitter_handle: 'tomhschmidt', + }, + { + name: 'Robert Leshner', + profile_picture: 'https://pbs.twimg.com/profile_images/1587956987786104833/1SiKVj-s_400x400.jpg', + ref_id: 'ebaa2166-7982-423d-9f43-add89e7d47f9', + twitter_handle: 'rleshner', + }, + { + name: 'Haseeb Qureshi', + profile_picture: 'https://pbs.twimg.com/profile_images/1581025415551889408/thQwG4lb_400x400.jpg', + ref_id: '790e4217-dd9f-416f-b9f8-ed596937f5b5', + twitter_handle: 'hosseeb', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/7de0d293-8ae3-4362-8500-8f7300f3fe41.jpg', + keyword: !0, + link: 'https://pdrl.fm/98e0b1/traffic.megaphone.fm/LSHML5322156529.mp3?updated=1676422435', + node_type: 'clip', + pub_key: '037f7331a5bef6c6f880246747befcc3767f3bb9730bc5e6f7c3770f4184ed0bff', + ref_id: 'a3fd38b6-998f-4c62-ab60-554ef9275993', + show_title: 'Unchained', + text: "Well, I think the worst case scenario that plays out is that Paxos is a smaller issuer than someone like center consortium that creates USD coin and that this creates some sort of precedent that gets used to attack other stablecoin issuers. $14 billion be USD is a lot, but it's the third largest stable coin. I think the bigger risk comes if there's precedent that gets used and established against other stable coins, USD coin and tether. And I think that's the sort of doomsday scenario in my mind, which is stable coins are like the primary on and off ramp and bridge between traditional markets and crypto. And however effective this attack on crypto is right now, by targeting banks and getting them to debank large crypto players. There's a lot of articles about this recently. I think by taking out stable coins, they're going to take out an even bigger on and offram for the majority of consumers and investors. And I think if it's successful, it draws into question how are people supposed to use this stuff? And fundamentally, I think this will take a long time to play out, especially if Paxos is going to take this through the legal system and defend themselves. I think it might be years, but it has the potential to put a shadow over stable coins for the two years that this takes to play out, potentially. And I think to the average user, I think this will be generally invisible. But I think the larger ramification is going to be the people that are saying, like, hey, I'm a traditional financial institution. Should I interact with stable coins? Or hey, I'm a bank, or hey, I'm a hedge fund. Should I interact with stable coins? And they're going to say, you know what, the last headline I saw on this was there's active litigation about the security nature of a stable coin and they're going to shy away from it. It just it creates a chilling effect for what I perceive to be the most important asset class in crypto. I think going after stable coins is impactful in a way that going after any individual company is not right. If Celsius is shuttered or if Kraken has a piece of its business shuttered, it doesn't really have a permanent effect on the rest of the ecosystem. But I think stable coins have an outsized impact on the rest of the ecosystem when they come under attack. And so I'm quite nervous, frankly, about this action against Paxos because of the ramifications and the knock on effects it'll have elsewhere. Well, I'm hoping that once we learn more about the nature of this lawsuit, that we see that there's some more explicit rationale that's not okay stable coin equal security, and it's something more idiosyncratic to what USD was doing or what finance was doing or something like that. That I think, is our best hope at the moment. If in fact, Gensler is going to say stable coins are securities. Bar none, unless Congress tells me otherwise. That's the way it is. Then the other counterside to that is that of course there does seem to be a lot of legislative energy behind having some kind of stable Coin legislative framework. And maybe that will be accelerated if in fact there is some regulatory action and public outcry and more attention on this question. Because the net effect of this, like I said, is going to be pushing stable coins overseas, right? If ultimately Circle can't issue it and Paxo can't issue it, well, Tether is not going to stop. And Tether, it's much harder to go after Tether, obviously, than it is to go after domestic US. Companies. That being said, BSD are any Americans using BOST? One, obviously Americans by and large don't need stable coins because they already have dollars. And then second, of course, Binance USD, binance is a small player in the US. They have very small market share with Binance US. And then of course in the US. USCC is by far the most well known stablecoin behind Tether. So it does feel like a weird target to choose. And I have to assume by the nature of that, that it's really a backdoor way of getting at finance than it is something more specific to stablecoin in general or even about Paxos. It's actually really unfortunate on the stablecoin legislation because that's just such a good point, that nothing's happened on that front. And unfortunately, right in the current Congress, it's just hard to see anything happening. But it is like the lowest hanging fruit possible. It's really easy legislation, honestly, when you think about what do we want to know? We want to know that you're holding assets that aren't just going to disappear and we want to know that you're actually holding them, basically, period. It's not that hard. And so it's just unfortunate that we're likely not going to see that anytime soon only because of the makeup of Congress, even though I think we've got a lot of folks in the House and Senate who frankly are really thoughtful on this issue and could deal with it quite easily. Yeah, it's a big hit to B and B as well, because again, speculation at the moment, but I think it seems to cast a bit of a specter that Gensler is going to be coming after Binance and especially with the affiliation with FTX. Again, I think this is kind of bullshit, but the narrative that propagated in the US by some parties that the downfall of FTX was caused by Binance or caused by CZ in some way makes him an easy target. And certainly, you know, now that he's consolidated market share and he's, you know, the the guy and the big guy on the block and the biggest overseas unregulated exchange or sort of underregulated, let's say, exchange, I think it's it's very clear that there's a lot of he's, he's he's the biggest game that there is to hunt in this industry. And I think Denzel is going to be going after him however he can, even if it causes some collateral damage along the way. When this news came out, was there any celebrating at Polygon that BNB was taking a hit? We never celebrate the failures of others more seriously. Honestly, it's not good for anyone in the industry. I mean, all L ones, all L two S do well with this industry growing. It sounds so typical, but it's just true. There's so much more to grow, and as you guys already know, plug and we're focused on a way bigger market. So the desire for anyone to go down is not big at all. It's really we just want to see the market grow, and this does not help that at all. ", + timestamp: '00:22:50-00:29:30', + topics: ['stablecoins', 'BUSD', 'Paxos'], + type: 'podcast', + weight: 40.60979587666329, + }, + { + boost: 0, + date: 1672159829, + description: 'What is signature aggregation? How can it be done interactively and non-interactively?', + episode_title: + 'Pieter Wuille and Tim Ruffing - Nesting, ROAST, Half-Aggregation, Adaptor Signatures (part 2)', + guests: [ + { + name: 'Tim Ruffing', + profile_picture: 'https://pbs.twimg.com/profile_images/925128264502439936/XcmMIk8k_400x400.jpg', + ref_id: '222f7374-6d68-4934-81ed-37567c515b59', + twitter_handle: 'real_or_random', + }, + { + name: 'Pieter Wuille', + profile_picture: 'https://pbs.twimg.com/profile_images/1264051937172836353/n7gHdLbB_400x400.jpg', + ref_id: '40260d2f-3480-47d6-8515-d2e780901273', + twitter_handle: 'pwuille', + }, + ], + hosts: [ + { + name: 'John Newbery', + profile_picture: 'https://pbs.twimg.com/profile_images/1249773577659977728/T2e7Cy2W_400x400.jpg', + ref_id: '76e8955c-952a-4700-a00c-ed0b1eecde92', + twitter_handle: 'jfnewbery', + }, + { + name: 'Adam Jonas', + profile_picture: 'https://pbs.twimg.com/profile_images/672878026930032640/QKhWiMi3_400x400.jpg', + ref_id: '6b623811-3131-4a29-8070-eb52a3fff63b', + twitter_handle: 'adamjonas', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/24a144b0-7ca3-40e9-9c42-86b9fce0b662.jpg', + keyword: !0, + link: 'https://anchor.fm/s/12fe0620/podcast/play/62357551/https%253A%252F%252Fd3ctxlq1ktw2nl.cloudfront.net%252Fstaging%252F2022-11-18%252F1e2ca48f-a779-0eda-2bbd-357c9a24e294.mp3', + node_type: 'clip', + pub_key: '02574d6e8e787372184b6f17c40d6c6fe1777db9015801f95dfd24692784d767cd', + ref_id: 'c13cad10-b242-4812-ad19-3bce525dfeb0', + show_title: 'The Chaincode Podcast', + text: "So Peter, you have mentioned cross input aggregation as the inspiration for a lot of the work that actually has been done to date. Let's talk about signature aggregation. Maybe start with interactive flow aggregation and sort of a cross input aggregation history and then we'll explore let's first say. What signature aggregation is. It's very closely related to a multisignature, but the difference is really think of a multisignature with multiple participants each signing, but they can all be signing a different message rather than signing all different. Allow all messages to be different rather than the same. Now, signature aggregation can be done interactively or non interactively, which refers to the rounds of interaction at signing time. Is it possible for them to just create their partial signature now once their individual one, and can a third party aggregate them? Or do they really need to collaborate in order to produce that signature? Now, if we're restricting ourselves to interactive ones, which is certainly the easier thing to build, there is a trivial way of turning any multisignature scheme into an aggregated signature scheme. Namely, everyone just signs everybody's message because it's interactive. They're talking anyway. Effectively the message could be like, here are all the messages and all the. Designers take all the individual messages, concatenate them these forms to message you or like put into the multi signature. Or you say the message is key one signs message this, key two signs message that, key three signs message that, and everybody signs that. That makes an interactive aggregated signature scheme. Just take a multi signature scheme and turn into that and you're there. That is modulus some subtle details. Yeah, let's not go into that, but just as a warning. So don't do this at home. Yes, of course. Still have your friendly neighborhood cryptographer have a look at it before you move on. That's just because of being able to actually tease out private keys based on reuse nonsense or what is the actual issue that you'd be most concerned if I did that? What would be the first mistake I would make? In the music paper, I remember Russell O'Connor came up with this fairly far fetched attack of like if you just do that what I just said and try to use that specifically in the context of Bitcoin transactions with one signature, there was a problem, I don't remember. There could be a problem. If you're a single party and you have multiple messages that you want to. Sign, you can be tricked into and you participate multiple times, you can be tricked into signing the same one instead of different one. Right? It's like you could be tricked into, I think, signing your message twice instead of only once. And it's not even clear if that is a problem. But I really may not remember the details. And if you're interested, look at the Music One paper. There's an appendix that exactly specifies the attack and then the problems. But yeah, because this was sort of. Full Glorial knowledge of like you can build an IAS out of a multi signature scheme. Here's a way of doing that. And that paper is like maybe don't do just that. Because apparently if you have a simple idea and it looks obviously correct and you try to insecure and you try to really prove it secure, it can turn out that there are actually subtle problems with it. Interactive aggregate signature scheme. We now know how to do that. So we can take music one, music two. Those can be turned into an aggregate signature scheme if needed. And so that is something that could be used for, say, cross inputs aggregation, but only under the condition that all the input signers are collaborating, right? And usually that is the case. Usually there's just one party involved. But say in a coin join transaction there are multiple participants. So if such a scheme were to be deployed and you have a coin join, then of course coin joins are at the same time the strongest motivation for wanting something like cross input signature aggregation, I think. Because think about it this way, every input in a bitcoin transaction today has one signature. In sort of a music taproot world, they will in fact all have exactly one signature. That signature takes up some block space. But if we were to be using a cross input signature aggregation scheme, there would just be one signature for the whole transaction. So that's a cost savings. And it is a cost savings that you shouldn't call it a coin join. But like a pay joint where A wants to pay B and C wants to pay D, they can join these two transactions into A and C pay B and D. And interestingly, in a cross input signature aggregation world, this aggregate transaction would be smaller than the sum of the individual ones because there's only one signature rather than two. So there's this economic motivation. Now that economic motivation is small. It's partially due to the fact that Seguid introduced a discount for witnesses. So those signature are already relatively inexpensive. They also have a relatively low cost on the ecosystem, but this makes the differential between the two fairly small. So it isn't like, wow, this is going to incentivize everyone to start merging their transactions. But it is a nice thing in the sense of like it gives a potential justification like, hi, I regulator, why are you merging your transactions? Being able to say, well, it's cheaper is a much better justification than like. Makes sense. So that's interactive aggregation, it has complications. All aggregate signature schemes that we want to do across more than individual inputs, like need consensus rules to work with them. In the same sense that, like, as explained, like, in a way, there's a relation with batch validation, where in batch validation we're thinking of, well, you first run all the scripts, pretend all the signatures succeed, but keep a list of all signature checks that have to be done and now do all those signature checks at the end. In a cross input signature aggregation world, it would be exactly the same, except there is now just a single signature provided rather than multiple signatures. And even technically these schemes are very similar. So that the math that's used for both is comparable. Except of course, in one case you have multiple signatures that need to be merged together versus just one. So another reason to see why this requires a consensus change is really like what consensus supports now is no signature verification. This is really like an algorithm that takes a single public key, a single message transaction and ", + timestamp: '00:18:49-00:26:42', + topics: ['Signature aggregation scheme', 'signatures'], + type: 'podcast', + weight: 13.299509345139551, + }, + { + boost: 0, + date: 1669105800, + description: 'Statements of newly appointed FTX CEO John Ray in the first day declaration', + episode_title: "The Chopping Block on FTX/Alameda: Is Sam Bankman-Fried 'Crypto Kanye'? - Ep. 424", + guests: [ + { + name: 'N/A', + profile_picture: 'https://pbs.twimg.com/profile_images/1478260779522658306/rm6XqGZx_400x400.jpg', + ref_id: '9862384f-b99b-4777-aa71-538d41591686', + twitter_handle: 'unchained_pod', + }, + ], + hosts: [ + { + name: 'Haseeb Qureshi', + profile_picture: 'https://pbs.twimg.com/profile_images/1581025415551889408/thQwG4lb_400x400.jpg', + ref_id: '790e4217-dd9f-416f-b9f8-ed596937f5b5', + twitter_handle: 'hosseeb', + }, + { + name: ' Robert Leshner', + profile_picture: 'https://pbs.twimg.com/profile_images/1587956987786104833/1SiKVj-s_400x400.jpg', + ref_id: '08f19db5-dbb2-4ca7-886a-d4aaa9de1e0d', + twitter_handle: 'rleshner', + }, + { + name: ' Tom Schmidt', + profile_picture: 'https://pbs.twimg.com/profile_images/1563232354277085189/xQL92DR4_400x400.jpg', + ref_id: '1c211a97-8535-426b-9091-9d23ae0fbc11', + twitter_handle: 'tomhschmidt', + }, + { + name: ' Tarun Chitra', + profile_picture: 'https://pbs.twimg.com/profile_images/1587539091444432897/Z6_nmrCB_400x400.jpg', + ref_id: '8d941896-7865-49b9-9505-cf91882986bb', + twitter_handle: 'tarunchitra', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/7de0d293-8ae3-4362-8500-8f7300f3fe41.jpg', + keyword: !0, + link: 'https://traffic.megaphone.fm/LSHML8128135235.mp3?updated=1669122227', + node_type: 'clip', + pub_key: '0201497bb9e66239cdf8fe218ee3e3c7c5b1bea880787ccdd433e7af55f88b53ed', + ref_id: '51ecdc95-4e1d-448b-923c-5a7e1822f131', + show_title: 'Unchained', + text: "you guys are at a brick wall. I take it you guys are trying to hide your location. They're in the same elementary school gymnasium. That's where they go and live from right now. This is a metaphor about the state of the industry, is what it is. That is true. It's been a pretty dark and depressing couple of weeks. Normally we run the show every couple of weeks. We're doing another show on basically one week after we did our previous show. Just because the amount of news and craziness was going on with this FTX fallout has been just absolutely incredible. I'm going to go to and get into it and kind of walk through what's happened since last Monday. If you recall, last Monday, FTX had already entered the bankruptcy proceedings on that Friday night before last week. Friday before last, there was this midnight massacre when FTX got hacked. And we've learned much more about each of these things to understand exactly what took place in this quote, unquote, unauthorized access to FTX accounts. So the first and most important thing that happened was that there was an affidavit released by the new CEO, John Ray, who is basically the liquidator who liquidated Enron. And he essentially described the absolute pandemonium that was the books and records and corporate controls at FTX. And so what he stated in the filing and it's absolutely incredible, incredible filing. I recommend you read it. It's pretty light reading if you can skim through like kind of the perfunctory stuff. But there's a choice. Quote, at the beginning of this filing, he says, Never in my career have I seen such a complete failure of corporate controls and such a complete absence of trustworthy financial information has occurred here. From compromised systems integrity and faulty regulatory oversight abroad to the concentration of control in the hands of a very small group of inexperienced, unsophisticated, and potentially compromised individuals, this situation is unprecedented. So there's all these revelations that we're now getting of just how horribly managed and horribly run FTX was to having all of the private keys in one shared Google spreadsheet that apparently everybody in the core team had access to private loans being given from the company to Sam personally, as well as to buy Bahamian property for employees. Almost negative accounting, just absolutely incredible oversights and just understanding where the money was going and keeping things running. Of course, I think we alluded last time to the Mickey Mouse accounting firm that actually did their audits for 2021 and John Ray basically stated in the affidavit, look, I do not believe that these audits should be considered to be reliable because these auditors are just not serious people. The way he called them out was pretty hilarious. He's like, FTX US was audited by Armanino, a firm I have heard of. FTX International was audited by whatever the name of the firm was, a firm I've never heard of, and whose only claim to fame is to have opened the first CPA in the Metaverse. That was like, amazing. There were so many Zingers that were like, I've read some pretty staid and boring bankruptcy filings, but that one has a lot of character in it. And bankruptcy filings aren't exactly where you're like, wow, the great American novel was written, but that one actually could be. There's a lot more in there as well. So beyond the selfdealing that was taking place on the balance sheet of FTX, it was also revealed in there that Alameda was explicitly exempted from liquidations within their risk engine. So confirming what many people had suspected, that there was an enshrined special relationship between Element and FDX. And now, again, we don't know the extent of it, but at the very least they had a different status in the risk engine compared to any other marketing. All I have to say is if you followed any Djen and on trading account since 2019, you would have already known that there was tons of evidence and analysis. I don't know how investors who invested in it did not look into that because that was like pretty public knowledge. In fact, actually, Alex PAX work with you actually talked about his experience investing in or not investing in Almata in 2019. And I feel like a lot of the stuff there should have been stood out as diligence for any future investor, but somehow everyone just kind of ignored it. Well, so my assumption was that that was obviously true in the early days, right? I mean, it was explicitly part of the strategy of FTX in the early days, was that Alameda was going to be the kind of point market maker, but the idea was that they cleaned up their act over time, right? If guinea was on Odlots, the founder of Winchmemt, and he said explicitly, like, yeah, we kind of assumed that they'd clean things up. Same thing that Kyle Davis said, the reason why Three Arrows was trading on FDX, that they assumed that there were just corporate controls in place that prevented this after they went big. So it's one thing to have this as a bootstrapping mechanism when you're a small Hong Kong exchange and you're kind of trying to get something up and running. It's another thing when you're a $40 billion company. You've got all these stall words investing on the captable. I would not be surprised if there were, again, misrepresentations that were made to investors about this because almost certainly it's one of the most obvious things investors would have asked for. And it's also almost certainly the case that they did not turn over source code to investors for Diligence. You can tell from all the stuff that we're hearing now about how Diligence went that it was gun to the head. It was very like, look, you've got to commit now, you've got to put money in now. These audits and this data room is all you're getting. And if you're not in, then we're going to go to the next guy, and there's many next guys that are lined up ready to put checks ", + timestamp: '00:01:11-00:06:44', + topics: ['FTX', 'John Ray'], + type: 'podcast', + weight: 6.117964948082447, + }, + { + boost: 0, + date: 1632355200, + description: 'What parts of ASIC miners are the most difficult to obtain?', + episode_title: 'The ASIC Mining Hardware Market', + guests: [ + { + name: 'Vincent Zhang', + profile_picture: 'https://pbs.twimg.com/profile_images/1158285609196109825/fuB-e6lm_400x400.jpg', + ref_id: '98e7bc98-3a3b-4ddf-9b48-5dcd78973739', + twitter_handle: 'Whatsminer_MBT', + }, + { + name: 'Vincent Vuong', + profile_picture: 'https://pbs.twimg.com/profile_images/1260974518547312640/n47yvbNL_400x400.jpg', + ref_id: '8390e230-e36b-4e0d-9f5d-70c6635bf3c2', + twitter_handle: 'BitcoinVincent', + }, + ], + hosts: [ + { + name: 'Will Foxley', + profile_picture: 'https://pbs.twimg.com/profile_images/1580970227193376776/9oQfeExj_400x400.jpg', + ref_id: '704b9e82-3e40-40b6-874c-6bb8fadafbef', + twitter_handle: 'wsfoxley', + }, + { + name: 'Zack Voell', + profile_picture: 'https://pbs.twimg.com/profile_images/1595803006737448961/fFrf7VJb_400x400.jpg', + ref_id: 'e32c7661-c635-4089-a620-ffce509eff0e', + twitter_handle: 'zackvoell', + }, + { + name: 'Compass Mining', + profile_picture: 'https://pbs.twimg.com/profile_images/1425165074373791744/f2CgInvP_400x400.jpg', + ref_id: '812e5d37-47fb-4077-915f-df52e2ef84d8', + twitter_handle: 'compass_mining', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/ae91fac6-a1af-4877-9a92-e793d556ee66.jpg', + keyword: !0, + link: 'https://www.youtube.com/watch?v=qKeUCNXa4Uc', + node_type: 'clip', + pub_key: '03c18d0c6c35333f22bc524e21a5fd1d2d9886f5d4d958dc1de95d025de5c84cfc', + ref_id: 'd2273e47-dfdb-4847-8690-ef58fe22d5c0', + show_title: 'Compass Mining', + text: "Totally. So I want to move back to an earlier question or earlier thought that you had. Vincent from compass. Damien, if you could share my screen really quickly, looking at just like ASIC parts in general, interested in knowing your thoughts on what parts of an ASIC are the most difficult to come by. So I'm not sure if you guys can see my screen currently, but if you guys can't see my screen right now but let me get a link over to Damon, he can throw this up. But basically, when you look inside an ASIC, there's a million different parts, right? And all those parts are kind of hard to come by. Some parts are harder than others. And I'm wondering, from your perspective in the procurement area, what parts inside an ASIC right now are so hard to come by that it might be causing a bottleneck? Like, we talk about the hash boards a lot and like the Wafer chips, but there's other parts inside of ASIC, like the PSU even, like going inside that. There's different parts inside that that are difficult to come by. So, Vincent, from what's fine, actually, I'll start with you since you are more on the development side of these machines. But yeah, if you could scroll down maybe a little bit more. Damian, we could take a look at some of the parts inside of an ASIC. Vince, I'll give you the floor. Yeah. So I can see that. Yes. Is there any part inside an ASIC minor that is particularly tough to come by with sanding? Of course, the hashboards themselves can be difficult to procure from chip manufacturers. Is there anything else others should be aware of given that there's a lot of demand right now to fix minors as well, and people are trying to find locations where they can be fixed? Okay, so this is a good question. So for the minus from our site, follow impulse can be used for all this. The fan is uniformed for all the minus. But yes, there's different for M 30 series and M 20 series. So the fence, the difference is M 20 series is four pin fence and six pin fence. And now we are supplying the four pin fence. In terms of Om 30 series, it can be used. All the models are used the same fence, and the control card and adapter card can be uniformed. However, as you said, the hashboard cannot be mixed with each other in case only when the hashboard are being produced with the same bin of the chips. So for example, M 30s plus may be produced with bin one, bin two, when the users want to replace the mix the hashboard from different miners. So what he needs to do is he need to make sure the model of the miners are same and the bin of those hashboard are the same due to the hashboard of the different miners may be different because, for example, some of the chips need to have 14 watts power to make them work. So if we put twelve watts power supply units on those miners, on those chips, it won't work. Right now, the power models, we have two types. One type is twelve. Watts and another type is 14 watts. Okay. You cannot mix use the twelve watts power supply unit to the minus. Need 14 watts power supply unit. Okay, so this is the difference why we cannot just make it simple just because the chips we can get, they are not as beautiful as just like one. Okay, so different chips from the same wafer, okay, so they have different performance and characters. So we have to make the minus based on the research on the chips we can get. So that's why all the minors, they are different. Okay. Only the same model of the minus. So we have a different version number for people can see M 30s plus, but the M 30s plus maybe have version one. Version two. Okay, so only version one the same version of the hardware so they can mix with the hashboard. So even with the same model of the minus, still we need to check the hashboard. So whether they are from the same bin or not from same bin of the chips, so we actually have the training and the documents to present. That awesome. Vincent, same question to you. Maybe like when you're looking at an ASIC and you're looking at the hardware market, North America, what are the hardest parts to come by currently inside of ASIC? The good thing about brand new Asics is they don't break that much, I hope. But it's really hard for us and a lot of people in the secondary markets to procure hash boards, control boards, and then just the general PS use. So the PSU is a the biggest failure point, mainly for bidding units, less so on the MicroBT units, thank God. But yeah, it's hard now because for MicroBT, just like Vincent said, there are multiple types of miners, right? And so each one, I think they had to create different power supplies for each different one. And so it's harder to mix and match and find the exact power supply that you need. Especially because some used to accept 277 involved and now they don't accept that anymore. And so those are the type of equipment that's what I'm usually looking at. And for the older machines, it's much easier to zombify them. So like the S nine S, you could interchange hashboards relatively simply, you can interchange every piece of equipment. Now it's becoming a lot harder to do that and I'm not sure if that's from a manufacturer's design point of view or they just want to limit it and reduce the amount of like interchanging and swapping of parts between miners. Yeah, no, that makes sense. Maybe Compass can become a spare part center in North America so you could change some power supply unit can joke and keep it there in North America. Exactly. Right now we already have multiple services center in North America, so we have two services center in Canada and so we should have two services center right now in united States, also one in Canada. So bit forms and heart rate, they are our repair centers. And in United States, one is HM. Tech. Okay. And I do not remember the name, but they should have some small quantity of the spares available. But recently the demand of the spills become huge. So specifically for power supply unit and the control board. Yeah, and I think that's also in part due to when you guys start dealing with more institutional clients. And a lot what they're trying to do is they want to stock up on these parts and then have repair technicians on site that can quickly repair them versus once the machine goes down, they order the part. And this is just so they can minimize the amount of downtime, because everybody wants to take advantage of this period of extremely high probability. And having even one machine down is a lot for even a couple of days, right? Yeah, for sure. Definitely. We can't make predictions necessarily too far in the future, but it's one of the most profitable times to be mining at all. That makes perfect sense. We know that miners are boarding Asics themselves, not only just spare parts, but it makes perfect sense to see the pattern repeat with spare parts. ", + timestamp: '00:36:03-00:45:52', + topics: ['ASIC Miner Parts'], + type: 'youtube', + weight: 4.625530958293724, + }, + { + boost: 0, + date: 1624507200, + description: 'How [[Ali]] got into [[Bitcoin]]', + episode_title: 'Bitcoin Fixes This 48 Small Business with Ali', + guests: [ + { name: 'Ali', profile_picture: '', ref_id: '1169edf2-a89f-4d89-94a4-1be1a7b9aef0', twitter_handle: '' }, + ], + hosts: [], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/2536a974-d668-4ac2-8613-0b37aa0ca08c.jpg', + keyword: !0, + link: 'https://anchor.fm/s/2a4e8034/podcast/play/36003846/https%3A%2F%2Fd3ctxlq1ktw2nl.cloudfront.net%2Fstaging%2F2021-5-23%2F969a4306-e9eb-95c5-0e15-42d37c0e61e8.mp3', + node_type: 'clip', + pub_key: '', + ref_id: '6565a1d2-53e0-48a8-bd22-9ea1080c4364', + show_title: 'Bitcoin Fixes This', + text: "That's awesome. So how did you get into sort of Bitcoin in the first place? It didn't come out of nowhere. And how did you start putting some of your corporate treasures into Bitcoin? What's the story behind that? Yeah, so it started in 2020. We were a class of 2020. We're pretty new to this space. And after March of 2020, I had this feeling that there's something really messed up with the financial situation and that I needed to find a solution for my personal wealth. So I kind of went on this quest in search of a solution. And then I bumped into the Number Zero and Bitcoin by Robert Breedlove. And I bumped into Preston Pitch and say Fiden's book. And so I kept reading and learning. The more I learned, the more I buy Bitcoin. And then I bumped into Jeff Booth's book. I said, Tomorrow devoured that in like three days, and then bought more Bitcoin. And I just kept buying it more personally. And then I kept dragging my partners in with me and I felt like I found a solution and it grew from this cool investment idea to the best investment idea to a way of life where I need to incorporate my business into it, I need to incorporate my kids into it, I need to incorporate my family, everyone. Right? So it kind of consumed me personally. And then my partners. And then we were sitting and talking for two times, I believe, about putting the companies treasury into Bitcoin, but we didn't really pull the trigger on it. And as soon as we heard the MicroStrategy that first time buy that they ever did, it was like 250,000,000. I believe that's when it was like, that's what pushed us over the cliff. And we said, you know what? This is a race of accumulation. Everybody is going to want to own Bitcoin. Every Corporation is going to want to buy it eventually will. So we got to go all in and we did that. And then here we are. And you still haven't had to sell any Bitcoin, which is rather remarkable. How have you managed to do that? Well, good question, actually, Jimmy, because a lot of people are asking me about how do we take Bitcoin payments and all that. And the reason why we never have to sell any Bitcoin is because we never used it as a payment method. We just used it as a savings technology. So we operate 100% of Fiat. We pay our employees, our suppliers, our rent or electricity, and then whatever is left, whatever profits left, we just take that and we just convert it into Bitcoin. And that profit we never had to sell to this day to expand. The way we're able to do any of our expansions is we just finance it and then we just put it as an expense, we put those payments as an expense, and that's how we never sold any Bitcoin. It's a simple strategy, but not a lot of people realize that they can do it with their business, but it's very effective. It's very helpful for your business. I think any business right now is going to struggle with inflation and with monopolies of their industries. And you need some sort of edge. You need to have a balance sheet strategy. Otherwise you're just going to fall behind year after year and you're going to wake up five years down the road with your money being worthless. And you're going to say, Man, I wish I figured out this Bitcoin thing earlier and that's why we're promoting it here. We love it when small businesses get into Bitcoin. Yes, of course. It's nice when you hear the big Corporation announce their billion dollar buys or whatever. But for me, I get really pumped up when a small business DMs me and asks me about, hey, we're going to do the same thing, what you guys are doing, and we want to know how to do this or how to do that. And this is what keeps us going. This is why we promote human freedom and this is what gets us ", + timestamp: '00:14:04-00:18:56', + topics: ['ali', 'bitcoin', 'bitcoin', 'bitcoin'], + type: 'podcast', + weight: 4.618438363076077, + }, + { + boost: 0, + date: 1610901076, + description: 'Moving away from the principles of America which is small government', + episode_title: 'Quoth the Raven #237 - Jake Ducey', + guests: [], + hosts: [], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/710ac70a-11fc-40ec-a2a2-01b92fb8015e.jpg', + keyword: !0, + link: 'https://mcdn.podbean.com/mf/web/6kaqr2/ducey.mp3', + node_type: 'clip', + pub_key: '', + ref_id: '7b4a8ab4-5254-4195-8546-183e6a078a7a', + show_title: 'Quoth the Raven', + text: "I guess it's true. We're moving away from the principles of what America was about, which was small government, and we're electing psychopaths, and we're giving them free rein to bring as many psychopaths in as they want. And we have such a docile population that nobody's critical thinking, nobody's looking at the ramifications of this, and nobody's looking at all. They just do whatever they say. I hadn't thought of it like that, but I mean, it's hard to argue against that point. But we live in a representative republic, so these are the representatives we've chosen to represent us. And, I mean, we're reaping what we so to some degree. I think what you just said makes a lot of sense, though, because I said the exact same thing yesterday in a conversation, which is people are just doing what they're told. That's it. There's no pushback. There's no questions. There's no nothing. If Gavin Newsom told you to do your laundry on Tuesdays only do you do it? Most people would do it. Yeah, right. And he said the reason was because of global warming. And so only on Tuesdays. Yeah, I mean, if he said that, there would be scores of people lined up thinking like, all right, well, there must have been some committee, some task force, some focus group that got together to arrive at that conclusion. And the truth is, as you know and I know, they're really just kind of pulling things out of the sky. Yes. And it's not just with political rule, but that manifests itself in our world. I mean, most people have terrible health, terrible finances, and they, in general, have a very subpar life. And I think it's because we've been conditioned in our society to not think for ourselves. And I think, personally, that it's a long standing social programming that's been designed to ultimately get total control over the population. Isn't it weird when you kind of step back I was talking to somebody the other day about preventative medicine and two different types of medicine. One, where you are trying to address things before they occur, and the other one where traditional medicine where something goes wrong, and then you try to deal with it then. And when you step back and you look at the way that we live, not just we talk about macro all the time, which is this incessant and constant need to be spending and that that is the virtue of the economy, supposedly, as these people tell us. But also, you look at things like you're talking about you look at things like mental health, like physical health, exercise, diet. We've just been conditioned to make the worst possible choices when it comes to all of those things. Yeah, we have. I mean, I'm more sinister. I think it's all on purpose, and I think that there's very evil people in the world that want total control over the world. But yeah, I mean, my rule of thumb started when I was 19 in college, you know, when I started everything I was doing, and I raised my hand in economics class and asked my teacher why we couldn't audit the Federal Reserve as a freshman in college. It was 2011, I think maybe I think 2011. And he told me to shut up and memorize the textbook. So I dropped out. And my Mo has always been, never believe anything the government tells you, and basically, never do anything anyone else tells you, too. People don't tell you to start a business or any of that. And that's kind of always been my Mo. I don't advise it for everyone. It's worked out pretty good for me. Yeah, well, you're letting the market decide what your value is. You're not letting an econ professor put a dollar amount on it. You're not letting a degree put a dollar amount on it. Right? You went out and you started doing your own thing. And what the hell is your own thing, by the way? Because one of the things I wanted to talk to you about, we didn't talk about on your podcast. You have another podcast channel called I love Prosperity? And that's the one where me and you were chatting, but your main YouTube account is just called Jake Dosey. You got 600,000 subscribers. What the fuck is going on on this channel that you have 600,000 subscribers? What is Jake do see up to? ", + timestamp: '00:14:09-00:18:47', + topics: ['America', 'Small government'], + type: 'podcast', + weight: 4.613381505012512, + }, + { + boost: 0, + date: 1590692100, + description: 'Concrete ways for companies to tap into blockchains', + episode_title: 'Episode 5: The Future of Corporations in the Age of Blockchains', + guests: [ + { + name: 'Jason Potts', + profile_picture: 'https://pbs.twimg.com/profile_images/1444448536947396612/MWoMpiut_400x400.jpg', + ref_id: '83de5ad8-399d-4d5e-beb6-036bc73f2e60', + twitter_handle: 'profjasonpotts', + }, + { + name: 'Aaron Wright', + profile_picture: 'https://pbs.twimg.com/profile_images/1467700275209195530/MuLAUZ7l_400x400.jpg', + ref_id: '926d7ff6-0327-49a0-811e-3f2e2db2fc5c', + twitter_handle: 'awrigh01', + }, + { + name: 'Luis Cuende', + profile_picture: 'https://pbs.twimg.com/profile_images/1590314672640630784/SniHt1kT_400x400.jpg', + ref_id: 'bf8c4b16-8bdb-4249-8e34-9c4458808890', + twitter_handle: 'licuende', + }, + ], + hosts: [ + { + name: 'Jeremy Allaire', + profile_picture: 'https://pbs.twimg.com/profile_images/1501707897641779208/cpB2Dk9__400x400.jpg', + ref_id: 'df622380-4129-458c-8e10-8088f172f002', + twitter_handle: 'jerallaire', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/99d17d22-4448-4267-9065-f55b341f43d2.jpg', + keyword: !0, + link: 'https://mcdn.podbean.com/mf/web/2jwy9x/secure_money-movement_episode-5.mp3', + node_type: 'clip', + pub_key: '', + ref_id: '4b80af11-a773-43bb-8ada-b5771e2cf481', + show_title: 'The Money Movement', + text: "last item, which is for projects in the world today or companies in the world today, what are some concrete ways that they could begin tapping into this and using it? And if you want to share an example too, that'd be awesome. Yeah, definitely. I think murder like companies it's communities, I think I mean, companies can also use DAOs. Like we ourselves use dio. But communities are super interesting. For example, there's this virtual world in VR called the Central Anti, owned by its users, and they have this do that they use. So users absolutely govern everything in the platform. So it's extremely helpful. One thing that I've been also involved with is called Help out. And the idea is to allow for people to create, like, very small, localized health clubs or volunteers and supervisors who are able to donate funds and also receive donations all over the Internet and then give those donations to people in need. So the idea is that you don't need to wait for this big, kind of slow moving nonprofits to actually take action. You can make a thousand, like, decentralized organizations bloom that actually tackle these problems in a very small scale. So, yeah, I think online communities are wonderful, and I think we're moving towards a world where there's going to be more and more communities. With the employment we have right now and the need for meaning as a civilization, I think communities are the way to go. I love it. It's so exciting. Luis, really appreciate you joining us to share your vision and share where you guys are at. And we'll be tracking it really closely and wish you really continued success and we'll talk really soon. Louise, thank you so much. Thank you. ", + timestamp: '00:25:49-00:27:22', + topics: ['Help squads', 'Luis Cuende', 'nonprofits'], + type: 'podcast', + weight: 4.587138891220093, + }, + { + boost: 0, + date: 1519171200, + description: 'The anti-vaccination movement in the 19th century', + episode_title: + 'PFP063 | Anthony Daniels (Theodore Dalrymple) | “Public Health” as a Lever for Tyranny (PFS 2010)', + guests: [], + hosts: [], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/624262ef-b30f-4114-8061-e310187e6bb4.jpg', + keyword: !0, + link: 'https://www.youtube.com/watch?v=-KZBCni4Mik', + node_type: 'clip', + pub_key: '02574d6e8e787372184b6f17c40d6c6fe1777db9015801f95dfd24692784d767cd', + ref_id: '04e7ce48-3c54-41ef-a7d5-59f923b85354', + show_title: 'Property and Freedom Society', + text: "another very important example struggle over smallpox vaccination in England and Wales during the 19th century. In the first two or three decades of the 20th century, it probably come as a surprise to you to know that the anti vaccination movement was one of the strongest and most durable social movements of the 19th century, and it published mass circulation journals continuously for 50 or 60 years. In response to the British government's attempt in the 1850s to make the vaccination of children compulsory and instituted fines for those parents who did not have their children vaccinated. That compulsion and vaccination in the United States is still quite common. The arguments of antivaccinators were composed of two main strands. I have quite a large collection of anti vaccination literature. The first of these was that vaccination was, as a matter of empirical fact, either useless or harmful, responsible for spreading such diseases as syphilis and even leprosy, and also that it was ineffective against small bonds. Well, this is not a strand that I'm interested in here. There was a second strand according to which, even if compulsory retination were effective against smallpox, it would still not be justified because it would make the state, and not the parents of children the arbiter as to how they the children should be best looked after, and that this was the beginning of a slippery slope. Interestingly, this was a movement that was predominantly working class. Working class was asking for protection from the state, not protection of the state. And I'll quote just one ditty from here the flavor of England state. Men of England, claim your freedom, make the noble stand. Sweep the unjust law of tyrants from your native land. Strike the blows of vaccination, claim your liberty. Sound the echo through the nation. Britains shall be free. Well, in the event something like a compromise was reached in 1898, according to which parents could opt out of having their children vaccinated if they could persuade a magistrate that they were conscientious objectors to vaccination. The model for conscientious vaccination that conscientious objection during the first world war. In any case, as it happened, smallpox declined as a serious health threat in western countries for a variety of reasons. Only one of them vaccination and the passion they went out of the promises. Well, immunization against contagious disease is an interesting case because for no such diseases, somewhere between 80 and 90% of the population must be immune in order for there to develop what is called herd immunity. That is to say that the nonminis are protected against infection because an epidemic cannot take hold in the population. Well, the success of immunization campaign is in eradicating or controlling various contagious disease, as in my view encouraged the epidemiologists and the public health doctors and governments ever since. And of course the discovery of the damaging effect of smoking autoimcountry. And they hope to repeat these trials for the common diseases which are currently great significance both in terms of mobility and economically in western populations. Diseases such as hypertension, coronary artery disease, stroke, type two diabetes, osteoporosis and various forms of cancer which seem to be related to lifestyle. In most such cases, of course, causation is rather less tearcut or well established than it was for infectious diseases or even the connection between smoking and various kinds of disease. But nevertheless, measures of varying degrees of coerciveness are proposed to reduce the burdens of these conditions from the contents of food to denial of medical treatment to those whose lifestyle has brought on their own conditions. Well, the lockers stand out. Public health authorities to interfere in the lives of individuals of the general public derives in large part from the fact that while the risks are taken by the individuals, the costs of consequent illness, when it develops, are borne by others in the form of idle insurance or of course in Britain, by the state medical system. In other words, I smoke, but you pay for the treatment of my cancer. And the hope of many people on Britain, I think, is that eventually they'll have an extremely expensive procedure which will more than pay back the amount of taxes that they have paid. But of course, it's not possible for everyone to get more out of the system. Nevertheless, that is the hope. Now, it's again obvious that people who pay the taxation cannot be the administrators or controllers of it and a class of bureaucrats charged with reducing costs or sometimes making profits charged with the administration. And incidentally, they are likely to transfer as much as possible of the money raised by taxation or insurance into their own personal funds. And this is not a negligible thing. ", + timestamp: '00:17:44-00:24:10', + topics: ['anti-vaccination movement', 'Small pox', 'vaccination'], + type: 'youtube', + weight: 4.582683563232422, + }, + { + boost: 0, + date: 1674635400, + description: 'The large percentage of vested Solana in FTX bankruptcy', + episode_title: "The Chopping Block: Here's Why Gemini Could End Up Filing for Bankruptcy - Ep. 447", + guests: [], + hosts: [ + { + name: 'Haseeb Qureshi', + profile_picture: 'https://pbs.twimg.com/profile_images/1581025415551889408/thQwG4lb_400x400.jpg', + ref_id: '790e4217-dd9f-416f-b9f8-ed596937f5b5', + twitter_handle: 'hosseeb', + }, + { + name: 'Robert Leshner', + profile_picture: 'https://pbs.twimg.com/profile_images/1587956987786104833/1SiKVj-s_400x400.jpg', + ref_id: 'ebaa2166-7982-423d-9f43-add89e7d47f9', + twitter_handle: 'rleshner', + }, + { + name: 'Tom Schmidt', + profile_picture: 'https://pbs.twimg.com/profile_images/1563232354277085189/xQL92DR4_400x400.jpg', + ref_id: 'bc9d3bfd-36b0-4cbc-a491-9370decf4c99', + twitter_handle: 'tomhschmidt', + }, + { + name: 'Tarun Chitra', + profile_picture: 'https://pbs.twimg.com/profile_images/1587539091444432897/Z6_nmrCB_400x400.jpg', + ref_id: 'dfad4b23-92ff-4aa1-9aa4-abc1d54cd6d3', + twitter_handle: 'tarunchitra', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/7de0d293-8ae3-4362-8500-8f7300f3fe41.jpg', + keyword: !0, + link: 'https://traffic.megaphone.fm/LSHML8027241616.mp3?updated=1674608143', + node_type: 'clip', + pub_key: '037f7331a5bef6c6f880246747befcc3767f3bb9730bc5e6f7c3770f4184ed0bff', + ref_id: 'ecaaa46f-b7ad-49b7-aae3-402befc21ab6', + show_title: 'Unchained', + text: "who come in the door. I agree with this. I think what is interesting is how many people are clamoring for FTX to be restarted. Like even after FTX declared bankruptcy, it's sort of mildly related where people feel like there is some gap in the market because they're like, look, I loved the FTX, UX, I loved the cross margining, and yet now it's gone and nothing is really replacing it. And now even John J. Ray was discussing this week the possibility of restarting FTX. So it's like, I agree with respect to like, hey, this is sort of a small moment in time market for these bankruptcy claims, but there is a question of like, who's going to sort of come fill that gap or our binance and the other big exchange is going to develop their own sort of similar products. By the way, I just looked it up. So the FTX Almita combined had 50.5 million sole, which is over a billion now, and it completely vests in 2028. So I think the vast majority of it is actually because they did those crazy seven year vests even with their soul. What? Yes, there's a lot of ecosystem sales. Those were seven year vests, I guess. So you're talking about serum. I'm not talking about salana. No, I'm talking about salana. That's like the crazy part. They agreed to a longer vest than the default. What? That's insane. That's so insane crazy. Yeah, there's a Salana Foundation blog post talking about the 50.5 million so 54.5 million soul. You could definitely bootstrap a prediction market on betting on how that gets distributed. Well, I think that's enough. That's enough money. But it also means you need, like, a trustee for seven years to, like, manage the liquidation of this soul, you. Know, Make Madoff was much longer than that, so it's not that crazy. Yeah, I do think the whole wind down process has dust that they just continue to collect and report on for years and years and years. Yeah, it's going to be painful. Well, with respect to FTX, we did get a story that the liquidators identified 5.5 billion in liquid assets for the FTX total estate. We still don't have a good number on the liabilities, so we don't know what that represents in terms of a percentage recovery, but it's at least better than some people were originally ", + timestamp: '00:40:52-00:43:17', + topics: ['Solana', 'FTX'], + type: 'podcast', + weight: 28.556055558933764, + }, + { + boost: 0, + date: 1632628800, + description: '[[Bitcoin]] is a Money that Reflects Human Time Effort and Efficiency is Tied to [[Energy]]', + episode_title: 'WHY ARE WE BULLISH Denver Bitcoin CryptoMags Lord Fusitua Jim Crider ep203', + guests: [ + { + name: 'Jim Crider', + profile_picture: '', + ref_id: 'acb937b5-97e9-4881-a45e-0e9511382019', + twitter_handle: '', + }, + { + name: 'Lord Fusitua', + profile_picture: 'https://pbs.twimg.com/profile_images/1511890587586560000/xGb_Dq_D_400x400.jpg', + ref_id: '45559c92-d4f0-42a5-8dc4-a8cce65e95a1', + twitter_handle: 'LordFusitua', + }, + { + name: 'CryptoMags', + profile_picture: '', + ref_id: '79cd9104-fa2c-4996-a179-8acb75642acd', + twitter_handle: '', + }, + { + name: 'Denver Bitcoin', + profile_picture: '', + ref_id: '5ab53f2f-797f-4e1b-90d8-f2ca90e88af4', + twitter_handle: '', + }, + ], + hosts: [], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/638c47da-8592-4d7b-aa1a-20e28fa0499f.jpg', + keyword: !0, + link: 'https://anchor.fm/s/11e95d20/podcast/play/40846589/https%3A%2F%2Fd3ctxlq1ktw2nl.cloudfront.net%2Fstaging%2F2021-8-25%2F381320f0-9d1f-9ee7-893f-57af427aca69.mp3', + node_type: 'clip', + pub_key: '', + ref_id: '1ac39cf4-fc11-47e7-8972-113c674860b2', + show_title: 'BTC Sessions', + text: "go back three years, 2018. I remember watching Steve doing presentations in Edmonton like 3 hours north of where I am, and it was still small and it was like it was a struggle to get interest still. Oh, no, they laughed in the industry was really laughing at this. Yeah, it was crazy. And to see the inevitable success of what him and you have been talking about over these past years is fantastic. We have a money that actually reflects human time, effort and efficiency. Well, of course it's going to be tied to energy. Of course it was going to. And the people that made those connections early are the ones that I think will be incredibly successful. And apparently with my Freudian sleep and slip. Sexy. Well, successful. Well, no, you're right. But you make a good point. Point. It's one of those things where I think gold for the age of time was a representation because of its proof of work. Gold is scarce to a very high degree just because of its natural occurrence in the Earth's crust. And it's difficult to find and it's certainly difficult to refine and Polish and get into any kind of a jewelry and such. There's always been proof of work throughout the history. And there's a recent documentary Mags was mentioned in it, and I was as well featured in a recent documentary, what's it called? This machine Greens, I think. Yeah. Definitely check out that documentary, if anybody that's in the audience hasn't seen it yet, in my opinion, there's like a little bit of kind of green washing in there a Bitcoin. And I don't think Bitcoin we don't need to greenwash it. It's great. Bitcoin is great as it is, but it really into the history of how energy interacts with money. And obviously how Bitcoin is what I would call the most precise, most accurate representation of proof of work, the most accurate representation of energy input, because it truly comes down to the kilowatt hour. Right. What it takes to produce a kilowatt hour like Henry Ford predicted. Right. We have now a decentralized currency that is tied to kilowatt hours. I love it. I don't know if you were going to add in there, but feel free to if you had any thoughts on what Adam was saying, many thoughts. Which one would you like now? All of them just throw it at us. Mag. Well, ", + timestamp: '00:33:52-00:36:48', + topics: ['bitcoin', 'energy'], + type: 'podcast', + weight: 4.565201282639802, + }, + { + boost: 0, + date: 1669389148, + description: 'Podcasting 2.0 would incentivize value signal instead of attention signal', + episode_title: + 'BR011 - Podcasting 2.0 & Value-4-Value Experts Roundtable ft. Adam Curry, Oscar Merry, Gigi & Odell', + guests: [ + { + name: 'Oscar Merry', + profile_picture: 'https://pbs.twimg.com/profile_images/1385168885071089664/3VHhMawv_400x400.jpg', + ref_id: '485b9165-ae61-4698-8244-16ae10f4ccbc', + twitter_handle: 'MerryOscar', + }, + { + name: 'Gigi', + profile_picture: 'https://pbs.twimg.com/profile_images/1566370176446119943/UeuACt-4_400x400.jpg', + ref_id: '9d8917ab-730b-4b1a-8321-49fb00907644', + twitter_handle: 'dergigi', + }, + { + name: 'Matt Odell', + profile_picture: 'https://pbs.twimg.com/profile_images/1421584695746338819/Z_7ZfAeP_400x400.jpg', + ref_id: '4f2825ff-3b88-4595-84d4-36e81544b79a', + twitter_handle: 'ODELL', + }, + { + name: 'Adam Curry', + profile_picture: 'https://pbs.twimg.com/profile_images/1401922551161442307/XjN2DdFD_400x400.jpg', + ref_id: 'c304fffc-7fe0-49a1-86b8-d3278f5c89dc', + twitter_handle: 'adamcurry', + }, + ], + hosts: [ + { + name: 'NVK', + profile_picture: 'https://pbs.twimg.com/profile_images/608402052247658497/ENDv0BNd_400x400.png', + ref_id: 'd754e29b-2d3e-4280-8d72-f41d2a465a78', + twitter_handle: 'Coinkite', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/cd6b8d64-bd52-4f1e-86b3-ca8ba2eb169f.jpg', + keyword: !0, + link: 'https://anchor.fm/s/9500fad8/podcast/play/61194167/https%253A%252F%252Fd3ctxlq1ktw2nl.cloudfront.net%252Fstaging%252F2022-10-25%252F7ed25489-c7da-b1a0-f01e-659dc80098be.mp3', + node_type: 'clip', + pub_key: '037f7331a5bef6c6f880246747befcc3767f3bb9730bc5e6f7c3770f4184ed0bff', + ref_id: 'eba87a50-4628-4106-94ae-5aee0e5f3584', + show_title: 'Bitcoin.Review', + text: "Think there's another point here which is often missed in the discussion, especially as the volumes of SATS that are being streamed are still quite low. It's definitely still early, I think. And it goes back to what Gigi and Adam were both saying about the incentives here and right now, if you're a content creator, the thing that you're incentivized to do is maximize your audience attention and that has terrible negative incentives for media consumption on the internet. It means that as a creator, you will say shocking things just to pull people's attention in. You will frame your content around a clickbait headline and also you will create content when there doesn't necessarily need to be content because you're stuck in the YouTube algorithm and you need to make a video every week just to kind of get paid because you get paid for every minute of attention that your audience give you. That is really messed up. And what we can actually do with value for value and streaming stats is flip the incentives so that it's based on a value signal rather than an attention signal. And that is a fundamentally different thing. And so especially when it's so early, especially when the onboarding for your mainstream audience who don't care about bitcoin is still quite challenging. Yes, the volumes are going to be small, but in the long term what this is going to allow is content creators to actually focus on just one thing, which is the value that they are providing to their audience, which is an amazing shift. If you look at every single big tech platform, it's all driven by that attention signal and look at all the problems we have. If we can change it to a value signal, we can create a much better internet. And it's going to take time to get there. But ultimately every now and again on YouTube is a great example because everybody knows it. Every now and again on YouTube you will find a hidden gem that provides you with so much value. And the reason that you don't discover those more often is because instead the YouTube algorithm will serve you up with a clickbait headline of some video that was created yesterday about the latest shocking news event and you don't get the. News to the 10 minutes in. Exactly. So this is so much bigger than just replacing the advertising income for creators on a weekly basis. So Oscar, it's fixing ", + timestamp: '00:29:07-00:31:26', + topics: ['Podcasting 2.0'], + type: 'podcast', + weight: 6.314446555932114, + }, + { + boost: 0, + date: 1629172800, + description: 'People earning money by working for Bitcoin', + episode_title: 'WHY ARE WE BULLISH Tomer Walton Obi Gigi ep194', + guests: [ + { + name: 'Walton', + profile_picture: 'https://pbs.twimg.com/profile_images/1579938510538153994/EYbT5PEr_400x400.jpg', + ref_id: 'ec8c8747-a001-42ba-ae87-bfdef751b781', + twitter_handle: 'beeforbacon1', + }, + { + name: 'Gigi', + profile_picture: 'https://pbs.twimg.com/profile_images/1566370176446119943/UeuACt-4_400x400.jpg', + ref_id: '9d8917ab-730b-4b1a-8321-49fb00907644', + twitter_handle: 'dergigi', + }, + { name: 'Obi', profile_picture: '', ref_id: 'f5ce3cb3-d943-483c-a619-c60936181c0a', twitter_handle: '' }, + { name: 'Tomer', profile_picture: '', ref_id: '9dfdecd6-c851-4766-ac32-4c1818ef5a9a', twitter_handle: '' }, + ], + hosts: [], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/419512c2-e309-4b25-bfe2-cd481d53f66d.jpg', + keyword: !0, + link: 'https://anchor.fm/s/11e95d20/podcast/play/38875088/https%3A%2F%2Fd3ctxlq1ktw2nl.cloudfront.net%2Fstaging%2F2021-7-16%2F212938750-44100-2-a8edaa1664f71.m4a', + node_type: 'clip', + pub_key: '', + ref_id: '315fbf52-eab1-4f1b-b3c7-e4e418498664', + show_title: 'BTC Sessions', + text: "Obi, any thoughts on the creativity of Bitcoinners? Yeah, it was beautiful the way you recited it. Walton kind of doing this litany or this inventory of the different types of creativity that the community keeps growing into. And it is like a branching tree which keeps branching and branching and branching and welcoming more and more people with more and more skills. It's geographically decentralized, totally society. New society. Yeah, it's a new society. That all you have to do to enter the society. You can be anywhere in the world is to be honest and put in work, and it's honest work. This is the moral code of Bitcoin. Good, honest work and more and more people. And I think we're kind of at the stage because I've wanted to work in Bitcoin since I first heard about it and fell down the rabbit hole and the only opportunities were to work at exchanges. It also sold shit coins and I felt I wouldn't do it because I'd be working against Bitcoin if I was doing that. And now things have gotten to the point where I can say I'm going to write and there's going to be somebody who might pay me some time for writing. But the work is good, honest work and I appreciate it. And I get together at Bitcoin Meetups and more and more of the people are finding work opportunities at companies that do something that support Bitcoin and Bitcoin only some are Fiat miners, right? They run a restaurant, they do something else, they collect Fiat and they turn it into Bitcoin, which is perfectly moral as well. But it's also really exciting to see. I won't list off all the companies, but I was at a small Bitcoin meetup the other day and there were people there who are working at Casa, this was in Canada, so there were people there working at Bull, Bitcoin at hotel, hotel at Lydon. And it was just really nice to see that people are finding a way to work within the ecosystem, providing more and more value. And so this is a frontier that's being developed and there's more and more stores, if you will, in this new frontier. So I think it really is glorious and we watch it grow exponentially. Right. The fact that I'm actually getting together with people and everybody is getting an opportunity to earn money by working for Bitcoin is really profound. Obi, go ", + timestamp: '01:14:25-01:16:48', + topics: [], + type: 'podcast', + weight: 4.565201282516726, + }, + { + boost: 0, + date: 1642222800, + description: '[[Sweden]] Banks Blocks Money Transfers Outside of [[EU]]', + episode_title: 'WHY ARE WE BULLISH Duczko Thomas Jestopher Morgen Rochard Rick Vanderhulst ep229', + guests: [ + { + name: 'Rick Vanderhulst', + profile_picture: '', + ref_id: '4c184180-b77d-4e25-ac7c-4d2e86cdde85', + twitter_handle: '', + }, + { + name: 'Morgen Rochard', + profile_picture: 'https://pbs.twimg.com/profile_images/1362921386256211972/IpIK8cwI_400x400.jpg', + ref_id: 'c29b26e9-82c8-4c0a-8130-aa083d33ec48', + twitter_handle: 'MorgenRochard', + }, + { + name: 'Thomas Jestopher', + profile_picture: 'https://pbs.twimg.com/profile_images/1607521016368201730/6GSHGkGX_400x400.jpg', + ref_id: '50388de7-3ec7-401b-8349-5ee1d8a004c0', + twitter_handle: 'Jestopher_BTC', + }, + { name: 'Duczko', profile_picture: '', ref_id: '2b6de75e-0cf5-4fec-b458-d1b8ee3f86df', twitter_handle: '' }, + ], + hosts: [], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/b87feb17-6926-4295-b2c2-d1c2e9d49ca8.jpg', + keyword: !0, + link: 'https://anchor.fm/s/11e95d20/podcast/play/46171740/https%3A%2F%2Fd3ctxlq1ktw2nl.cloudfront.net%2Fstaging%2F2022-0-15%2F68b825e2-6752-7447-34ca-b27f0ea69256.mp3', + node_type: 'clip', + pub_key: '', + ref_id: 'ef84d742-b332-4b77-8242-948a3737f91f', + show_title: 'BTC Sessions', + text: "I predict Sweden is going to be the first country in the world after China to adopt a CBDC because we have, like, over 99% of all transactions are digital. Over 98% of all the population have a digital ID. And we are used to total control and we like it. So what's happening in Sweden right now is basically the banks have said you can't transfer money out of the EU. Several banks. Recently, I had an old investor of mine called me and like, Lucas, you live in Vietnam. I need to make a deposit to Vietnamese company. Okay. Or to Vietnamese account. I'm like, So why don't you do that yourself? He's like, Because you obviously have the money. He's like, yeah, but all the questions I'm getting from the bank, it's so freaky. I just don't want to deal with it. Yes, Bitcoin peace of mind in international transactions. Even the people that have the money just really don't want to deal with the banks at this point because it's so creepy. At one point, my cousin, who lives in Brussels, was transferring money to Sweden. Eventually, after two weeks of DD, he sent an email directly to the bank and like, do you want, do you want make a blood sample or P sample? Check if my urine is clean. What's up? It becomes invasive. It's just such a pain in the ass. I don't know if any of you recently have had to actually just go into a bank. Oh, my God. Oh, my God. Just standing in that lineup and you're like, this is still how people do things. Like, people still haven't experienced this. Oh, you need some money on the other side of the globe. Cool. It's there. Now that's as simple as it is. It's insane. And then just stand in line and have these long transfer times. And I don't know how it is in the US. I'm not familiar with exactly how ACH works and how quick it is. At least in Canada, we've got e transfers, which are pretty fast. So the small amount of dollars that I do get paid, I typically send over to like, a sats back Visa card so I can then make purchases. But when I want to fund that, it's like, I send it and it lands in like a minute. So that's nice. But that's local within Canada. What's ACH ", + timestamp: '00:57:19-01:00:16', + topics: ['sweden', 'eu', 'sweden'], + type: 'podcast', + weight: 4.565201343093071, + }, + { + boost: 0, + date: 1673187067, + description: 'How Nuclear Bitcoiner got into Bitcoin and Bitcoin mining?', + episode_title: '@NuclearBitcoinr - Mining #bitcoin With Small Modular Nuclear Reactors. #313', + guests: [ + { + name: 'Nuclear Bitcoiner', + profile_picture: 'https://pbs.twimg.com/profile_images/1443185278525579278/_Yl1nao1_400x400.jpg', + ref_id: '60f5891f-0864-4ed4-987a-81da4768b3ba', + twitter_handle: 'nuclearbitcoinr', + }, + ], + hosts: [ + { + name: 'Daniel Prince', + profile_picture: 'https://pbs.twimg.com/profile_images/1589940494364205056/rnHs5gI3_400x400.jpg', + ref_id: 'df2d4d35-3e96-44ed-b1cc-cb8a714bbe30', + twitter_handle: 'PrinceySOV', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/e1eca67b-d372-4031-bf1f-8f0ff7fe6092.jpg', + keyword: !0, + link: 'https://anchor.fm/s/1346f9e8/podcast/play/63208295/https%253A%252F%252Fd3ctxlq1ktw2nl.cloudfront.net%252Fstaging%252F2023-0-8%252F4a07b2fe-eb1d-2c82-677e-8f2808a09536.mp3', + node_type: 'clip', + pub_key: '02545c14cbb18a61f20dd45f5e3dcbd9acae3de282369501040adce32a75311309', + ref_id: '50e012ee-2ed3-4fbe-9703-2b4b2695f5ef', + show_title: `Once Bitten! - for ( int i = 1; i < n; i++ ) { +A Bitcoin Podcast. +`, + text: "nuclear energy, you're obsessed with bitcoin, and this has all come together for you in the perfect fishing, I suppose, to use the analogy. Talk us through it. What happened? How did bitcoin enter your life? And how did you kind of realize, oh, damn, there's two fixes here? Yeah, it clicked with me at the right place at the right time. It's the shortest way to put it. But I had been aware of bitcoin since fairly early on, probably like 1112. I had gone through down the rabbit hole of what is money from the zeitgeist documentaries and then falling along with Ron Paul and all that and the fed, that sort of thing. And then there was some content that I had consumed where max kaiser would pop up every once in a while, and he was doing his evangelizing thing while bitcoin was still worth pennies. And he had found the solution to all of the things he's been complaining about for many decades. And then life moved on. I got more attentive to other topics and, like, started like like listening to things like like Joe Rogan and Jordan Peterson cultural, cultural stuff that was going on. And then it would have been 1718. I cashed out of a poker site, like, a few hundred dollars, and they had it available to cash out as Bitcoin. So I spun up a wallet on my tablet and cashed out. And then I just left it there and forgot about it and never really took the deep dive. And then when it was the big run up in the Bull Run in early 21, attracted me to be like, yeah, what is this thing? Because now my few hundred dollars is now worth a few thousand dollars. And I started to actually take it seriously. I dove right off the deep end because Max being my first touch point, I went right into the Orange Pill podcast. And then before long, yeah, my whole podcast list is frigging like breed love and phallus and you and bitcoin audible and VTC sessions. Everything flipped to very laser eyed Orange Pill. And then it was when I heard two podcasts in short succession with Adamo and Steve Barber talking about what they're doing with upstream data. And it's like, very excitedly telling my wife about all this stuff. And she's like, oh, yeah, that's cool. The Internet money in it and it's consuming clear gas. That's pretty cool. And maybe the environmentalists will back off. But no, you try to point that out to them and they're just like, I don't care. That's stupid. We're solving the problem that you complain about. And it's like, well, it's a stupid way to solve it. Do you just like complaining about things then? Clearly. And then it was the time when Elon Musk went on his little tirade about, oh, Bitcoin's energy use is bad. And then the market dumped. I was having a conversation with my wife, who was she was just reading the article and she was like, oh, this is stupid. And she works in the industry as well. She's like, well, we're going to start building small modular reactors, so why don't we mine Bitcoin with small modular reactors? She reacted to that as if it's like, well, that's a given. It just makes sense. Like, if you're saying what you're saying is true, then that just makes sense. And I just got lost in my mind for a long period of time. There just processing, like, yes, this is actually a very good idea, especially with how we intend to deploy these small modular reactors to off grid communities where they don't have the consumption capacity to justify the investment to build a large power asset. Now we can deploy them with built in customers. And then I just started consuming everything I could along those lines. Like, I read that long essay by the Drew Armstrong and AJ. Scalia, the guys from Cathedral bitcoin in the case for more energy, I was consuming, like anything that Nick Carter was putting out or Linnaldon. I loved the pioneer species idea that Brandon Quinn put out there, and that's exactly it. We're going to drop nuclear reactors in the middle of nowhere, and the bitcoin mining is going to act as the catalyst to grow that seed. It was perfect. And the more I learn about the reactors, that is one of their biggest problems. After you get through the concerns about the waste and the mining and the material and the labor, the economics is one of the large sticking points that needs to be overcome. And if we can have a guaranteed customer, no matter where we build a nuclear reactor, we open up a lot more opportunities to build nuclear reactors where it would not have made sense before. And because they're smaller, they have a lot more applications that they can be applied to, whereas typically the big reactors have to be at least relatively close to a large consumption load, like a large city or industrial park or what have you. So I was deeply on that rabbit ", + timestamp: '00:55:50-01:01:06', + topics: ['Nuclear Bitcoiner'], + type: 'podcast', + weight: 18.56063246999693, + }, + { + boost: 0, + date: 1624507200, + description: 'How difficult business is without [[Bitcoin]] and how it helped', + episode_title: 'Bitcoin Fixes This 48 Small Business with Ali', + guests: [ + { name: 'Ali', profile_picture: '', ref_id: '1169edf2-a89f-4d89-94a4-1be1a7b9aef0', twitter_handle: '' }, + ], + hosts: [], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/2536a974-d668-4ac2-8613-0b37aa0ca08c.jpg', + keyword: !0, + link: 'https://anchor.fm/s/2a4e8034/podcast/play/36003846/https%3A%2F%2Fd3ctxlq1ktw2nl.cloudfront.net%2Fstaging%2F2021-5-23%2F969a4306-e9eb-95c5-0e15-42d37c0e61e8.mp3', + node_type: 'clip', + pub_key: '', + ref_id: '181df76a-5789-48c8-8153-57f0be3ec7f8', + show_title: 'Bitcoin Fixes This', + text: "keeping your Treasuries in Bitcoin. If you didn't have Bitcoin, what would your business be like? And how difficult would things be without having sort of that savings available to you? Yeah. Like I said, Jimmy, we would be like, Bitcoin just put us in a position of strength. We can see the world. We feel like we can see the world more clearly now, and we can see what's going on with our competitors, even these small dynamics of monopolies and food costs and inflation and stuff like that. Bitcoin kind of opened our eyes to a whole side of the financial system that we had no idea was important until today. And it's been a blessing. And it's made us better business people. It makes us know the value of real money. Like all the money that we have is all debt, everything. Right. And Bitcoin is the only thing one of the few things that's in our financial system that's actually real and it's not debt. And that's something that's pretty big in our culture, even in our religion. And that's something maybe we can touch on. Jimmy, I was talking about this with Dave over the Miami conference, and we were talking about how there's 2 billion Muslims in the world that have no idea how their money works. And if they knew how it works, they would all go running towards Bitcoin. And the reason for that is, Jimmy, is that in the Muslim faith, we're forbidden to use interest. Right. We have something called like halal. And then Haram. Halal is permissible. Just like with the chicken meat. You'll find like halal meats. That just means permissible. And then the opposite of it is Haram. And so what's halal in our money is supposed to be anything that has no interest. Anything that has interest is Haram. And then what you realize is that the whole world economy is running on debt and everything in your life and has interest touching it from mortgage on your house to your car to your business to everything. Right. And you realize that your whole world is kind of Harold. And the only thing that's actually halal is Bitcoin. And it's kind of blasphemous to say because a lot of Muslims will disagree with me. And they'll just say I'm crazy. And I'll say, what do you know about hello? And they would skewer me for things. But if you think about it from first principles, this is actually what's going on. And we've just been dancing around this fact just because we're deeply entrenched into the debt economy and the debt the debt financial system. But if people actually knew what was going on, you'd find 2 billion Muslims around the world just running towards Bitcoin. And that would be a good message to kind of get out there. I would get skewered for it for just talking about this. After talking to John Vallas, he kind of called me. You know what, Ali? People are dying on this. Hell. This is a good message. If you want to talk about it, you should just go for it. Yeah, here I am. Well, it's interesting because you're talking about how the whole system is built on that. A lot of businesses, a lot of small businesses are built on that, and they are extremely fragile, which is why they need all these crazy government bailouts and so on. But your business because you've built it on Bitcoin and you have the savings and so on, you're a lot less fragile and you're able to overcome a lot of the problems that you're encountering, and you can sort of thrive through this environment. And that seems to me the direction you want businesses to go in is to be a lot more resilient to sort of like economic shocks and so on, whereas that hasn't been the case. Most businesses these days are built on that. And this Haram halal thing that you're talking about seems to be like a very good suggestion as a way to build better, more stronger businesses that can sort of withstand shock events like we're seeing. Yeah, it's exactly like you describe it, Jimmy. It makes you more antifragile. And being in debt, especially being in debt in a tough time, is one of the weakest points you can ever be in your life. We do have some debt just because we're in the whole world run on a debt economy. Right. But we have Bitcoin. We have the option to pay all of our debt off in an instant and not bend the need to anyone, anywhere. Right. And that's where the anti fragility comes from. Like I said, we're always in a position of power. We're always in a position where we love what we're working on. We're not working because we're trying to catch up. We're working because we are passionate about this business. Right. It's a subtle but big difference, Jimmy, in your mindset and in your business decisions, when you're just working because you love what you do and you're in a position of strength, it just makes your life so much happier and it makes you just a happier person. But when you're in a lot of debt and you're just working to catch up and just try to catch the inflation rug pull that's happening. You're not in a good position mentally, physically. You're just trying to do everything you can so that you can catch up to all these things that are going up in price. And the house that you want to get is running away from you year after year and you're trying to catch up. It's just a demoralizing, depressing feeling. But when Bitcoin is your unit of account, everything is getting cheaper. Over time, everything is getting cheaper. And that just changes your philosophy on life and your ethics and your food at work. It changes everything. And people make fun of Bitcoin, or sometimes they say, oh, you guys say, like, Bitcoin fixes everything. It fixes a lot of things. And I didn't realize this until I was fully entrenched with my life and my business and my kids, but it really does change everything. And before Bitcoin, I wanted to have three kids. After finding Bitcoin, I want to have five kids, six kids. I'm more optimistic about the future. I'm rationally optimistic about the future. I'm looking forward to it. I think my family is going to thrive, and that's a big paradigm shift to what most people think right now. So it's a beautiful thing, and I'm here for it. I'm here to promote it. I'm here to do whatever that restaurant chain can do to help in this economic revolution that's going on. And I'm happy to be a part of it. Yeah. It sounds to me like a real you're getting real satisfaction out of running your business because you're actually providing value and you're not having to rely on debt or government subsidies or anything like that. Instead, what you're doing is actually providing value to your customers. And instead of having to service that and all this other stuff, you're able to say, okay, well, I'm providing value. I'm clearly doing something that other people find valuable. And that seems to me much more satisfying for you than, say, being in debt and having to constantly worry about that aspect of it, which unfortunately, is the reality of a lot of small businesses you seem to have found, like, an alternate path that's a lot more satisfying and gives you a lot more of a positive feel going forward and to the point where you want five kids and not three, which is great. It sort of reflects an optimism for the future that many people that are in debt don't have. Yeah, that's true. That's what Bitcoin is, Jimmy. And it's a wonderful thing. And it's a wonderful thing to be able to think like this in this world that we're living in right now, because everybody around me is thinking the opposite. Everyone around me is thinking that their dream house is running away from them. They won't be able to afford education for their kids. So they're hoping that their parents can leave them enough money in their inheritance so that they can pay for their kids education. And this is what people around are really concerned about and for us, for my family, for my partner's family, for everyone that I got involved into Bitcoin, we stopped thinking like that, and we started taking responsibility for ourselves. And we feel secure about the future for kids, the education of our kids and the future of our business, the ability of us to secure homes. It's been a super, life changing year. All of this happened to me, like, for us in 2021, ", + timestamp: '00:33:39-00:44:50', + topics: ['bitcoin', 'bitcoin'], + type: 'podcast', + weight: 4.530133247376293, + }, + { + boost: 0, + date: 1671534e3, + description: 'The keys of dYdX success in DeFi', + episode_title: 'Ep. 494 The Facts About Using Leverage when Trading Crypto', + guests: [ + { + name: 'Antonio Juliano', + profile_picture: 'https://pbs.twimg.com/profile_images/1486890878694133761/85ev-DD6_400x400.jpg', + ref_id: '025d2715-f5e7-4ba1-884c-45ba1e7770c5', + twitter_handle: 'antoniomjuliano', + }, + ], + hosts: [ + { + name: 'Aaron Malone', + profile_picture: 'https://pbs.twimg.com/profile_images/1521495204196503553/abk-5S0m_400x400.jpg', + ref_id: 'bd103540-8c0a-4ab3-b5cd-24a3f2c43ab2', + twitter_handle: 'pizzamind', + }, + { + name: 'Pizza Mind', + profile_picture: 'https://pbs.twimg.com/profile_images/1521495204196503553/abk-5S0m_400x400.jpg', + ref_id: '16cb01cf-9f04-45db-a440-47259b02b86a', + twitter_handle: 'pizzamind', + }, + { + name: 'Bryce Paul', + profile_picture: 'https://pbs.twimg.com/profile_images/1182725652794892288/QbDOKHcP_400x400.jpg', + ref_id: '0d670dbf-f434-43b6-b454-8e5345d7ee51', + twitter_handle: 'BrycePaul101', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/93a6fe5b-364c-43f4-9f38-7da3e811460b.jpg', + keyword: !0, + link: 'https://audio1.redcircle.com/episodes/0270c2f2-f726-498b-9a8d-0f907aa5736a/stream.mp3', + node_type: 'clip', + pub_key: '02545c14cbb18a61f20dd45f5e3dcbd9acae3de282369501040adce32a75311309', + ref_id: '22add7db-9562-44a4-a883-52f4d87d48f5', + show_title: 'CRYPTO 101', + text: "of the time, I don't even realize that I have ExpressVPN on. It just kind of runs in the background seamlessly, and it's really easy to use. It just stays on all the time. And you just tap one button, and then you're protected, okay? You tap one button, then it goes off, and you're unprotected. Pretty easy. Now, ExpressVPN, it's totally available on all your devices, phones, computers, smart TVs, even iPads, all that stuff. So there's no excuse for you guys to be using it. Now, I want everybody who's listening to Crypto 101 today to protect your online activity today, okay? And you got to use the VPN that's rated number one by Business Insider. So visit my exclusive link, ExpressVPN. Comcrypto 101, and you could get a three month extra freebie for a one year package, okay? So that's ExpressVPN Comcrypto 101, Expressvpn.com Crypto 101 to learn more. And again, you could get an extra three free months on a one year package. All right, now on to our guest. Hey, are you ready? The Christmas Countdown is on at JCPenney through Saturday. Use your coupon and dash away with very merry savings on last minute gifts across the store, like fine jewelry. Stocking stuffers up to 70% off after coupons and save up to 50% on Comfy stylish outerwear for the whole FAM. Add curbside pickup to make your trip extra quick. We got your holiday. JCPenney offers good on select items through 1224 exclusions. Apply CSTORE or Jcp.com for details. If you run a small business, you need the most from every investment. That's why Comcast Business gives you more like our new gigspeed WiFi plus unlimited data, all on the largest, fastest, reliable network for small businesses. Comcast business powering possibilities. Don't miss our special holiday offer and ask how to get up to a $750 prepaid card with a qualifying bundle call today ends twelve four 2022 restrictions apply. Requires gigabit extra bundle with two year ", + timestamp: '00:16:46-00:18:53', + topics: ['dYdX', 'vpn'], + type: 'podcast', + weight: 10.605576747712993, + }, + { + boost: 0, + date: 1593259200, + description: 'Comparing modern human stomach to other primates ', + episode_title: 'Episode 112: Mental Health And Metabolism: Autism, Depression And Your Small Intestine', + guests: [], + hosts: [], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/e8ad867b-9cbe-4126-9f37-313b4d2329a5.jpg', + keyword: !0, + link: 'https://www.buzzsprout.com/482971/4336655-episode-112-mental-health-and-metabolism-autism-depression-and-your-small-intestine.mp3', + node_type: 'clip', + pub_key: '032d7609ff3f4a5232e4d60967971e23bc671dfb68020845a59bab5dc1f3b93b87', + ref_id: 'fff2f38f-b219-4c96-bf6c-c8b7b48d55af', + show_title: 'Dr Karl Goldkamp - Keto Naturopath', + text: "primates. So when we compare our gut, or if you want to be more specific, if we can compare our belly. And we're not talking about obese to obese, we're talking about a healthy human to a healthy ape, a human to a healthy chimpanzee, that we have differences. So the thing is that the normal belly of a man or woman human is flat. It is obviously not meant to be obese, but it's certainly not meant to be bulgy like an ape. So an ape, if you've seen it, has a big Ponchy belly and it's not because the ape is unhealthy. And I'm going to give you a comparison in a little second when I get to that graph. Actually, it's coming out one of the big differences. So when you compare various apes, a given versus a RangATang versus a gorilla versus a chimpanzee versus a human, and another one called simiang, call it another ape, that their stomachs. All stomachs, including humans and chimpanzees, are pretty much the same. Pretty much the same within a small difference. So the smallest stomach would be the orangutan. But other than that, we're pretty much spot on to be about this. And it's not that different by much. Okay, now we go to the small intestine. So the shortest small intestine is by the shortest small intestine is by the gorilla. The longest small intestine is by humans. In fact the intestinal length, which is in humans about 20ft is about over four times longer than an Agrilla. So where do the rest fall? So if you go to Gibbon orangutang pretty much all of them chimpanzees live on the short side, pretty close to a chimpanzee is pretty similar to us. So they're all short. So the longest short intestine is humans by a long shot, a lot longer than chimpanzees as well. Okay, what about the colon? So the colon is you can also call the colon your large intestine. So the colon, the shortest colon is humans. And so that's about 25. It's about a quarter of the length of everybody else's. So you go, that's interesting. So you could say that the one striking difference in this comparison is wicked long small intestine and very short large intestine. We say large intestine is kind of the width, right, as opposed to the length. And so what does that mean? What does that cares other than length? What else can I tell you here is that we have let's open up the mammalian comparison here. So in terms of we're going to say in terms of the colon. So the last part is large intestine, colon and rectum. Man, cat and dog actually goes man and cat are almost exactly the same. Dog is a little shorter. And so as being a relatively short short by, it's a quarter of what everybody else is in terms of cattle, very long sheep, very long horse, very long pig, long like three or four times as long as humans, but not as long as cattle and sheep. I won't keep going. You're probably not interested in rat or human or guinea pig. Okay. But man, cat and dog are almost identically, the same, whereas cattle, sheep and horses are hugely different. So let's think of that. Cattle, sheep, horse, pig, not so much pig. Let's go horse, chap, sheep and cattle, what do they eat? They're ungulates. Ungulates, meaning they chew and they chew and they chew and so they chew their cut, right? The cattle has four different parts of the stomach and it actually does, and it actually turns the carbohydrates into saturated fats. That's what happens in the stomach. And the reason they need a large colon, they need a long large intestine is because that's where the final degrading or digestion of veggies and fiber get fermented and so on and so forth. Humans really can't do that. We really can't ferment much fiber. We can't extract it, we can't break down the cell walls. All these other guys can break down the cell walls by their long, their big stomachs, their long colons, and they can extract a lot more out of it. Okay then. So what about stomach comparisons? Man and dog and pig all look pretty similar, actually about the same size, about the same shape. And you can bet that the ox I don't have a cow in front of me. The ox will stand in are much different. As we just said, OK? Humans can digest meat easily. They have a stomach PH acidity. To be able to do that one to one and a half in terms of a PH. D, you realize a PH of one to one and a half if you could extract that. And that can burn through metal, certain metals, I should say. So it's hugely acidic. So water, as you know, is PH around seven, arguably. A little bit more alkaline, a little bit more acidic, depending on where you get your water and what's in it. But we're going to call it seven. Okay. Whereas the small intestine manages low residue, low fiber diet. So why did I say that? Because man had a very big, humans had a very big, long, four times as long small intestine. It doesn't do well. It needs a low fiber diet. It doesn't do well with fiber. High fiber diets mean big large intestine, long large intestine. We don't have that. So it's a mismatch. So by looking at our guts, we line up with what carnivores had. We have a larger large intestine. We have a smaller colon or a colon. It's the same size as carnivores, okay? ", + timestamp: '00:17:52-00:24:44', + topics: ['Human stocmach', 'primate stomach', 'gastric acid level'], + type: 'podcast', + weight: 4.4907612800598145, + }, + { + boost: 0, + date: 1599305976, + description: 'Buying bonds ', + episode_title: 'Borrowing - where is the money going? Corporate, Small Business, Government', + guests: [], + hosts: [], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/abd94520-1490-42aa-b349-9e861494a654.jpg', + keyword: !0, + link: 'https://anchor.fm/s/138410f8/podcast/play/19113751/https%253A%252F%252Fd3ctxlq1ktw2nl.cloudfront.net%252Fstaging%252F2020-09-05%252Ff840233e9317a45e95724ebf5de7e057.m4a', + node_type: 'clip', + pub_key: '', + ref_id: '139f6af7-950d-44cd-a3fc-86cae3f86d65', + show_title: 'Economy Guy', + text: "I talk about three areas of people who are loan borrowing money. Big corporations are borrowing money, small businesses are borrowing money and governments are borrowing money. Those three categories, they're all borrowing money. So let's hit them in order and try to understand them. One at a time. Let's start with big corporations. Big companies, great big companies are selling bonds right now. They do not need the money in general. They don't have a good productive use for the money. They're just selling it because interest rates are so cheap, are so low that they have to pay very small amount of interest. And then they have all this big bundle of money that they can put in the bank or by other companies with or whatever they want to do with. They become very rich because they have borrowed this money through the issuance of corporate bonds. Now interesting, who's going to buy those bonds? Well, the answer is there are a huge number of funds out there that are buying bonds. Why are they doing that? Aren't they worried about the risk of bonds? You know how a bond works. The value goes down when interest rates go up, or the value goes up when interest rates go down. Well, interest rates are so low they can't go down too much more. They could, but it doesn't look like it. I don't think it's the Fed's goal. I think the Fed's goal is to keep interest rates level right now. But in a crisis, if interest rates were pushed up, the value of those bonds that people are buying would go down. So that's risk, big risk. But they're not doing that. And the big because is because the Fed itself is buying big corporate bonds. That's basically saying, hey, there's a government guarantee. It's not the same as a guarantee, but it's like having a government guarantee that if you buy those same bonds you'll be safe because the government's not going to screw themselves over by raising interest rates. So that's the thinking. It's a low risk bet. And when you borrow or lend, actually lend money, risk is what's the name of the game. That's what it's all about. ", + timestamp: '00:06:20-00:08:37', + topics: ['Bonds', 'borrowing'], + type: 'podcast', + weight: 4.4870123863220215, + }, + { + boost: 0, + date: 1485660600, + description: 'How useful is the Small Business Administration', + episode_title: 'TheMacroView Episode 32: Understanding Financial Markets Part 5 of 5', + guests: [], + hosts: [], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/8e52e9c4-52e8-4dea-8ed9-8c6a7fcef25a.jpg', + keyword: !0, + link: 'https://www.blogtalkradio.com/themacroview/2017/01/29/themacroview-episode-32-understanding-financial-markets-part-5-of-5.mp3', + node_type: 'clip', + pub_key: '', + ref_id: '7ace464e-d855-496a-a80a-b6e7ccb0f12e', + show_title: 'The Macro View', + text: "So next is the SBA. The SBA, don't get it wrong, is a fully politicized organization. It sounds like a good idea to a lot of people. You guarantee a portion of bank loans to businesses that otherwise wouldn't qualify, and you could stimulate more business investment, you could stimulate more startups and create more jobs. Right? But there are two major issues with it. There's both inherently two major issues with it, and then there's also an explicitly major issue due to the government's direction of the SBA. That's the third issue. That's just as bad, honestly. So the first problem in error with the SBA is that it only exists as a result of government guaranteeing bank loans for housing and real estate projects, which, once the government started doing, sucked up a larger and larger portion of a bank's finite capital. So this meant less capital available for business loans, and small businesses were being neglected by banks as a result of government guaranteeing housing loans. The second problem is that even absent government guarantees of housing loans, it would push banks to make loans to businesses that otherwise wouldn't qualify due to their risk profile. This means necessarily that it would divert capital away from businesses that could qualify for such loans, businesses that serve more urgent consumer demands and have less risky business models. The last issue with the SBA, which is an issue that is likely to change under the Trump administration, at least slightly, though it will probably just be more of a redirection under the Trump administration, is that the SBA under the Obama administration became an affirmative action lender almost exclusively. So the business model, the risk inherent, the owner experience, collateral, posted, all of that no longer mattered. The SBA was directed by the Obama administration to focus on guaranteeing loans of racial, gender, or sexual preference minority groups, as well as towards disabled small business owners. This is just an absurd idea. Lending is not about creating so called social justice or cosmic justice. Lending is about earning a reasonable rate of return while assuming as little risk as possible. The race, gender or sexual preference, or the physical ability of the borrower should have absolutely nothing to do with the lending process. Once again, all this does is shift the bank's limited capital from businesses that would qualify for a loan to our identity groups, with the quality of the loan being meaningless, the quality of the business being meaningless. The SBA also became an environmental activist lender. The SBA was also directed at the behest of the Obama administration to dramatically increase the number of green, quote unquote, so called green business loans that it made so disregard cost, disregard viability. If the business was supposedly doing something that could even potentially help reduce CO2 emissions, it was now extra qualified for the SBA programs. ", + timestamp: '00:20:25-00:23:45', + topics: ['Small Business Administration', 'SBA'], + type: 'podcast', + weight: 4.480609655380249, + }, + { + boost: 0, + date: 1671827663, + description: 'What are BOLT 11 and BOLT 12?', + episode_title: 'BR015 - Lightning Experts Roundtable ft. Calle, Roy, Rijndael & t-bast', + guests: [ + { + name: 'Roy', + profile_picture: 'https://pbs.twimg.com/profile_images/1518195698323398656/v6d0knBt_400x400.jpg', + ref_id: '528205f8-c65b-4b81-8e90-64a89737acd3', + twitter_handle: 'RoyNemer', + }, + { + name: 'Calle', + profile_picture: 'https://pbs.twimg.com/profile_images/1514769710432219142/CIKDCEbq_400x400.jpg', + ref_id: 'c467552d-e3ae-4c55-a695-8369a63960bb', + twitter_handle: 'danielaacallee', + }, + { + name: 'Rijndael', + profile_picture: 'https://pbs.twimg.com/profile_images/1542705395873058817/0zsy4Yur_400x400.jpg', + ref_id: '861d5324-8ede-4059-826f-f29abca5d7e6', + twitter_handle: 'rot13maxi', + }, + { + name: 't-bast', + profile_picture: 'https://pbs.twimg.com/profile_images/1103941624843788289/Pg2rEZph_400x400.jpg', + ref_id: 'd3eacec2-0bdc-49cd-8bef-e99fa2776d3b', + twitter_handle: 'realtbast', + }, + ], + hosts: [ + { + name: 'NVK', + profile_picture: 'https://pbs.twimg.com/profile_images/608402052247658497/ENDv0BNd_400x400.png', + ref_id: 'd754e29b-2d3e-4280-8d72-f41d2a465a78', + twitter_handle: 'Coinkite', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/cd6b8d64-bd52-4f1e-86b3-ca8ba2eb169f.jpg', + keyword: !0, + link: 'https://anchor.fm/s/9500fad8/podcast/play/62615840/https%253A%252F%252Fd3ctxlq1ktw2nl.cloudfront.net%252Fstaging%252F2022-11-23%252Ff9ece2e5-a873-2d6a-d49f-602887e5b810.mp3', + node_type: 'clip', + pub_key: '039c26c7a2f03083901b6c9ef94c3d9f12f88f348965dddd5ab54635993728007c', + ref_id: '87aa1d63-e44d-43f4-8b02-dfbd1fab476a', + show_title: 'Bitcoin.Review', + text: "So just for people sort of understand, because I'm guilty myself, we all sort of like drop like BIP, while enlightening is bolt numbers. So who wants to explain what Bolt Eleven bolts Twelve and Bolt 15 are? Just sort of like a high level. What is Bolt 18? I don't even know. Bolt 15 is it bolt 15? NBK just made it up. It's a secret project. That a new one. Yeah. I had no idea this existed. So Bolt Eleven is the standard way that you do a Lightning invoice. Right. So Lightning is very different from on chain bitcoin because there aren't really static addresses. You have to encode a hash that the preimage to which gets revealed to make the payment atomic and lightning. There might be some other routing information. There's an amount all that needs to be encoded into an invoice, and that format and the payment flow there is all in Bolt Eleven. Bolt Twelve is a way of doing reasonable payment codes all over the Lightning network. So there's been a lot of excitement and development around things like Lightning addresses and Ln URL that's kind of similar. It's the same problem that Bolt twelve tries to addresses, but it addresses it by having you host a web server that can resolve, that can render out a Bolt Eleven invoice, whereas Bolt twelve just goes over. Gossip Kelly, I think you wanted to say something. Yeah. If I may add, so Bolt Eleven is mainly focuses on the invoice format and how we make a single payment. But Bolt Twelve itself is a whole package of features, so to speak. So you have all sorts of things in there, starting with offers, what you were alluding to. So these are static payment identifiers, basically, but it goes on with rock, blinding, onion messaging, merkel trees, schnor signatures, all these kind of things that are like I think the idea is to have a big package of many features that everyone can implement at the same time, so we can upgrade the network in a fairly global way. But what we're seeing already is that people are picking parts out of that proposal and implementing them one by one into their nodes, basically choosing what they need and whatnot there's also room for discussion there if that was the best approach or not. So having one big package and then seeing it fragmented again across the network, or if it would be better to really keep things atomic small so that we can really measure the synchronicity of the entire network, basically upgrading to ", + timestamp: '00:08:06-00:11:03', + topics: ['BOLT 11', 'BOLT 12'], + type: 'podcast', + weight: 11.522468360169754, + }, + { + boost: 0, + date: 1669389148, + description: 'Challenges with Lightning network and micropayments for Podcasting 2.0', + episode_title: + 'BR011 - Podcasting 2.0 & Value-4-Value Experts Roundtable ft. Adam Curry, Oscar Merry, Gigi & Odell', + guests: [ + { + name: 'Oscar Merry', + profile_picture: 'https://pbs.twimg.com/profile_images/1385168885071089664/3VHhMawv_400x400.jpg', + ref_id: '485b9165-ae61-4698-8244-16ae10f4ccbc', + twitter_handle: 'MerryOscar', + }, + { + name: 'Gigi', + profile_picture: 'https://pbs.twimg.com/profile_images/1566370176446119943/UeuACt-4_400x400.jpg', + ref_id: '9d8917ab-730b-4b1a-8321-49fb00907644', + twitter_handle: 'dergigi', + }, + { + name: 'Matt Odell', + profile_picture: 'https://pbs.twimg.com/profile_images/1421584695746338819/Z_7ZfAeP_400x400.jpg', + ref_id: '4f2825ff-3b88-4595-84d4-36e81544b79a', + twitter_handle: 'ODELL', + }, + { + name: 'Adam Curry', + profile_picture: 'https://pbs.twimg.com/profile_images/1401922551161442307/XjN2DdFD_400x400.jpg', + ref_id: 'c304fffc-7fe0-49a1-86b8-d3278f5c89dc', + twitter_handle: 'adamcurry', + }, + ], + hosts: [ + { + name: 'NVK', + profile_picture: 'https://pbs.twimg.com/profile_images/608402052247658497/ENDv0BNd_400x400.png', + ref_id: 'd754e29b-2d3e-4280-8d72-f41d2a465a78', + twitter_handle: 'Coinkite', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/cd6b8d64-bd52-4f1e-86b3-ca8ba2eb169f.jpg', + keyword: !0, + link: 'https://anchor.fm/s/9500fad8/podcast/play/61194167/https%253A%252F%252Fd3ctxlq1ktw2nl.cloudfront.net%252Fstaging%252F2022-10-25%252F7ed25489-c7da-b1a0-f01e-659dc80098be.mp3', + node_type: 'clip', + pub_key: '037f7331a5bef6c6f880246747befcc3767f3bb9730bc5e6f7c3770f4184ed0bff', + ref_id: '5d6441cb-9fb5-465e-b297-0a66ccc5823f', + show_title: 'Bitcoin.Review', + text: "Okay, so there are a couple of things. First of all, I want to point out, for ten years, I wasn't really aware of it, but for ten years, the podcasting industry kept saying to each other, we can't make podcasting for effect. I'm going to, from time to time, just let you hear one of the booths come in. We can't change podcasting. We can't upgrade it. We can't do anything because Apple won't do it or Spotify won't do it, and they actually got to groveling and please Apple, will you listen to us? And it was just horrendous, and it was impossible. They had boards and steering committees for ten years, meetings meetups. How do we move podcasting forward? How do we get more features in? You know what? Because people are just talkers. Most people are not builders, and we just sat down and built it. And then it came together because everyone really wanted it. But people like to yap a lot. So this is the same thing with the Lightning infrastructure. I'm really disappointed with Lightning infrastructure in general. I'm disappointed with the thinking, with the attitude of some of the developers. Bolt twelve, which would be fantastic for what we're doing here, is now a punchline. It's just a fucking punchline. It's like oh yeah, bolt twelve. If Claire doesn't do it, they don't do it, whatever. But the most disappointing thing is that the Lightning network was not even really architected to do micropayments. And when I raised this early on in one of the meetings with Lightning Labs, I said we're having a real problem the way it's set up. And we're basically having to act as a go between, a guaranteed liquidity provider for very small amounts, you know, so when someone sends two SATS or one Sat as a part of a split, we'd like it to arrive and we know there's going to arrive with. So we have to do things like stack them up to reduce fees and there's all kinds of things that people are doing. But the answer from Lightning Labs was we'll just have people send bigger amounts. So just so you know, the beauty of what we're talking about here is not what the industry is building, they're doing something else. It's about incentives, right? A lot of these entities are trying to sort of like be visa replacements or whatever because that's where the big money is. So they are focusing their development in sort of essentially being the middleman. Because middleman is a business approval model, right? But they talk a big game and I'm sick of that shit. You're not building it for micro payments, we're doing it for micro payments. Now. ", + timestamp: '01:37:54-01:40:42', + topics: ['Podcasting 2.0', 'Lightning network', 'micropayments'], + type: 'podcast', + weight: 6.190523690607058, + }, + { + boost: 0, + date: 1648771200, + description: 'Obstacles and barriers faced in bootstrapping a lightning network and how to overcome them', + episode_title: 'Synonym Spaces Lightning Tokens', + guests: [ + { + name: 'Paolo Ardoino', + profile_picture: 'https://pbs.twimg.com/profile_images/1583467513198923781/nCWMWFIn_400x400.jpg', + ref_id: '9bb3e215-6065-4fe2-aac5-2b1d5545d48c', + twitter_handle: 'paoloardoino', + }, + { + name: 'John Carvalho', + profile_picture: 'https://pbs.twimg.com/profile_images/1601964735016177676/c1mAfspt_400x400.jpg', + ref_id: 'f28f037f-a3af-48af-bdd3-28023219b524', + twitter_handle: 'BitcoinErrorLog', + }, + { + name: 'Reza Bandegi', + profile_picture: 'https://pbs.twimg.com/profile_images/1446675390370500614/4LGHNSkl_400x400.jpg', + ref_id: 'ead50c13-2f13-4ffc-86b5-5a3eb49a5804', + twitter_handle: 'r32a_', + }, + ], + hosts: [ + { + name: 'Synonym', + profile_picture: 'https://pbs.twimg.com/profile_images/1509611612692484098/21wQpOvO_400x400.jpg', + ref_id: '7bc90c93-e6e6-4596-8ec5-e77fe735cf05', + twitter_handle: 'Synonym_to', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/63e0cbc0-731d-4ea0-9dd2-2b8b841eb28a.jpg', + keyword: !0, + link: 'https://www.youtube.com/watch?v=QflalrGaIvw', + node_type: 'clip', + pub_key: '', + ref_id: 'b9fd54d3-49e8-44e1-a208-7780d50a3b3a', + show_title: 'Synonym', + text: "are some of the obstacles and barriers that you kind of see besides kind of like bootstrapping a network and so on? And how do you plan to overcome them or kind of help various partners, businesses to kind of overcome them and launch more tokens on Lightning. As Pablo mentioned, I think that making sure it's safe is probably the shortest term and most important that we have. We recently had audits done on the stack and we'll have no audits done after these updates. And so we just want to make sure that everything in the stack is really safe and reliable before we go trying to convince people to buy these channels, own tether that's within Lightning, add this to their apps and add this to their platforms and integrate it. We want to make sure that we're confident and we want to demonstrate that we're confident enough to run it ourselves in these notable platforms before we start convincing others that it's safe to do so. Yeah, I would say that audit is probably one thing. There are some other obvious things like figuring out the user experience for this inside of a wallet. It's kind of a new challenge. It's a novel thing to convey to a user. And then the rest, I guess, is just business development. Just going out there and educating different apps and platforms and businesses about this technology and helping assist them with integrating it and adding it into their products. Yeah, I'd like to add that. So the team that works on Omni Gold is quite small, and the number of people that you know how this stuff works is very small. So development is not as fast as I'd like it to be. So getting more people to contribute and look at this is a challenge. There's so many cool projects out there to work on, and sticking out of the rest of the projects out there and getting the attention of developers is definitely a challenge. So if anybody out there thinks this is a cool project and they like to contribute, you should check it ", + timestamp: '00:18:06-00:20:12', + topics: ['Bostrapping lightning networks', 'lightning network barriers'], + type: 'youtube', + weight: 4.467333025674428, + }, + { + boost: 0, + date: 1644642e3, + description: 'Discussions of the Nuclear Industry on [[Bitcoin]]', + episode_title: 'WHY ARE WE BULLISH Brian Harrington Jim Crider Nuclear Bitcoiner ep237', + guests: [ + { + name: 'Nuclear Bitcoiner', + profile_picture: 'https://pbs.twimg.com/profile_images/1443185278525579278/_Yl1nao1_400x400.jpg', + ref_id: '60f5891f-0864-4ed4-987a-81da4768b3ba', + twitter_handle: 'nuclearbitcoinr', + }, + { + name: 'Jim Crider', + profile_picture: '', + ref_id: 'acb937b5-97e9-4881-a45e-0e9511382019', + twitter_handle: '', + }, + { + name: 'Brian Harrington', + profile_picture: '', + ref_id: '82840fe2-b87e-433c-8f54-e4d1aa4f3dbf', + twitter_handle: '', + }, + ], + hosts: [], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/9523aa00-daf4-42af-b25b-75d9682bc5a6.jpg', + keyword: !0, + link: 'https://anchor.fm/s/11e95d20/podcast/play/47542056/https%3A%2F%2Fd3ctxlq1ktw2nl.cloudfront.net%2Fstaging%2F2022-1-12%2F247506637-44100-2-21f5120cfb677.mp3', + node_type: 'clip', + pub_key: '', + ref_id: '287d232d-d28d-400c-b4dd-c0026022fce4', + show_title: 'BTC Sessions', + text: "now about the state of the nuclear industry. There's been some delays and problems recently, but if Bitcoin's are familiar with flood, the nuclear industry has been dealing with FUD for decades and it finally seems like we've public perception wise. There's been a great breakthrough. It seems to have taken an energy crisis to finally get us there, but it's finally being given the serious discussion that it really deserves. Yeah. I loved watching all the developments with the Bitcoin mining space like the Oaklo Compass team up, whatever the talent energy plan for the Sasquatch reactor in Pennsylvania and one of the other interesting ones that doesn't get a lot of attention. But Ukraine is an interesting use case for Bitcoin mining. They had announced unless anything has changed since I saw the announcement, they are planning on building several hundred megawatts worth of capacity attached to a few of their nuclear reactors. And the story of how it started is actually kind of funny because there was some operators that were running a few Asics at the reactor on the slide, and then they got caught and then the authorities, instead of throwing them out, figured, hey, we can just do this for ourselves. And now they've announced that within two years or so they're going to have some pretty big operations going on there. And I have no doubt that Russia is considering this angle with the way that they've been talking lately. They are big nuclear power. They've got lots of stranded Hydro. They are definitely considering leveraging their Bitcoin mining opportunities there. Canada also has these very similar opportunities. We have a robust nuclear industry. We have tons of Hydro, lots of it's stranded in Northern communities that don't have the industries that they used to to support that electricity capacity. And then we're also Canada is going full speed with the SMR action plan, where we're hoping to have six or so new Gen, four small modular reactors demonstrated in the country at various already certified nuclear sites like Canadian Nuclear Labs and Ontario Power Generation. And I saw that First Nations Power Authority has cut a deal with X Energy and terrestrial energy to nuclear reactor manufacturers. So there's plans to drop these small modular reactors all throughout remote communities in Northern Canada to upgrade them off of diesel. And I've been starting to think about it after Brandon quitams the Pioneer Species essay that he wrote. It fits in perfectly to the idea that I'm promoting within the nuclear industry. We can take a power source, whatever it is, but now we can take a small modular reactor anywhere we're not geographically limited, and we can have a complimentary set of Bitcoin mining to go along with it as basically a seed that then turns an energy desert into a flourishing ecosystem, because within a short time it will start inviting more complex second order industries like the hydrogen production facilities or desalination or definitely going to have different mining operations attached to these things. But it will be the seed that grows into the mighty Oak level communities. And we can start planting those seeds all over Northern Canada, because the way I see it is if global warming and climate change goes the way that the most far end predictions go, Northern Canada is probably going to be a lot more habitable in the not too distant future. So why not start preparing now? And it's also a great opportunity to help out and build partnerships and collaborations with Indigenous communities that have been energy impoverished for generations and been promised by consecutive governments every cycle that they're going to do something to help, but it ends up just kind of falling flat. I thought that happens. I thought that Trudeau had a perfect opportunity. He promised two major things. He was going to legalize cannabis and he was going to bring water to Indigenous communities. He could have used one to fund the other, but I don't know. Yeah, but the budget balances itself, man, so it's fine. We don't pay attention to monetary policy and finances. Yeah. I've got a question for you in around the nuclear stuff, ", + timestamp: '00:47:20-00:51:54', + topics: ['bitcoin'], + type: 'podcast', + weight: 4.454448139404517, + }, + { + boost: 0, + date: 1662010885, + description: 'SD card vs USB connection for hardware wallets', + episode_title: 'BR005 - Bitcoin Wallet Experts Roundtable ft. Odell, Bitstein & Pierre Rochard', + guests: [ + { + name: 'Charles Guillemet', + profile_picture: 'https://pbs.twimg.com/profile_images/1363770113162379265/7S1mRttg_400x400.jpg', + ref_id: 'c726ddde-836d-4f6c-9b6e-bb9e4d9365a7', + twitter_handle: 'P3b7_', + }, + { + name: 'Matt Odell', + profile_picture: 'https://pbs.twimg.com/profile_images/1421584695746338819/Z_7ZfAeP_400x400.jpg', + ref_id: '4f2825ff-3b88-4595-84d4-36e81544b79a', + twitter_handle: 'ODELL', + }, + { + name: 'Graig Raw', + profile_picture: 'https://pbs.twimg.com/profile_images/1362841242665631745/UtA3FBQU_400x400.jpg', + ref_id: '66fade84-61db-4cb1-b4a9-b759e285eb82', + twitter_handle: 'craigraw', + }, + { + name: 'Lazy Ninja', + profile_picture: 'https://pbs.twimg.com/profile_images/1362843002318721028/PNKWuu0-_400x400.jpg', + ref_id: 'f855515d-75c4-4287-9a3d-e45d7ac25ddf', + twitter_handle: 'FreedomIsntSafe', + }, + ], + hosts: [ + { + name: 'NVK', + profile_picture: 'https://pbs.twimg.com/profile_images/608402052247658497/ENDv0BNd_400x400.png', + ref_id: 'd754e29b-2d3e-4280-8d72-f41d2a465a78', + twitter_handle: 'Coinkite', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/cd6b8d64-bd52-4f1e-86b3-ca8ba2eb169f.jpg', + keyword: !0, + link: 'https://anchor.fm/s/9500fad8/podcast/play/56934513/https%253A%252F%252Fd3ctxlq1ktw2nl.cloudfront.net%252Fstaging%252F2022-8-1%252Fba1b9425-ee1c-d0fd-3048-f50bdcc17c14.mp3', + node_type: 'clip', + pub_key: '02545c14cbb18a61f20dd45f5e3dcbd9acae3de282369501040adce32a75311309', + ref_id: '3e106ab0-ad0d-4aa4-8ea1-0bbeb122ae78', + show_title: 'Bitcoin.Review', + text: "Do you guys want to do the air gap a little bit more? I want to get you and Charles in a fight here because I do. Have a go for it. Some thoughts on SD card versus USB connection, which I think is sort of interesting. I'll give you sort of my you've heard this before, rebel, but the benefit of the cold card, right, is you can do USB less, right? You can just do SD cards to physically transport the PSBTs across the air gap, right? And then you mentioned the attacker synchronicity, right? He maybe can modify the PSPT, but it's physically transported over that barrier by a human. Now, I do have one thing there that I brought up before, is SD cards aren't just physical media, they are actually microcontrollers. So the hacker can actually insert software on the SD card. And when you plug the software, when you plug that SD card into the cold card, it can do stuff, right? It could do things like you could maybe drop a file on it on the computer. But when it gets plugged into the cold card, it shows the cold card different files. Now, obviously, the user can verify addresses and catch it there, but there's other things it could do. It could try to exploit protocol errors in the SD card interface with the thing. Right? So the attacker has a small microcontroller that he can attack with. Yeah, I completely agree with you there, because essentially nothing is fail proof given enough resources, enough time, right? That's how we think about this stuff. So on a computer, the way a computer reads a drive is much different than the way codecard reads the drive. The way codecard is looking at micro SD, it is a substantially smaller surface and purpose, right? So we can audit that. We can look at that and try to find paths in which attackers could try to exploit that. The amount of people out there that can insert malicious firmware on a micro C is much smaller than the people who can do malicious things with USB, right? I mean, USB is an absolute clusterfuck. It's huge attack surface. What's nice about what Ledger does is that ledger is using a secure element that is designed to handle things in a very narrow way too, right? You guys are probably using SIBO or something like that to talk back. So the thing is but you're still connected, and that connection matters because if you were trying to do a remote attack, you want feedback, right? Like, is this working? Try this other thing. Is this working? Try this other thing. Oh, did you get something? Oh, you need to go there to get it. Now. You need this other bug to happen in order to extract, right? So there is a very long list of things you're going to probably need to do to pen test it. Now, if you're not USB, technically you could have the software trying to do that and then there is the bugs, right? You could have a bug that has a hole on it and then boom, gone. Yeah, I'm really curious to hear Charles thoughts on this before he goes, because I'm really interested. Yeah, sure. When you have to sign a transaction, at some point you need to communicate with the blockchain. There was nothing like those walls are completely separated. You need to bring some data from the blockchain to your sign and sign it and then bring back this signed payload to the blockchain. So when we say I got or something, it's just a matter of channel. What does your channel look like? Is it complete? Is it SD? Card? Is it USB? And then we can discuss then. This is about attachment face. So your thesis is to say like the SD card, attach your face is simpler than USB. It can be debated. I don't know. USB is a large standard. I agree with you, this is our standard. And if you try to implement the standard overall, there is some area to do mistakes. So what we do is to implement a very small subset of this tunnel and when we implement USB, it's implemented on another microchip, it's not implemented in the secure limit, so that you have like another layer of another layer to do this communication. And the attic surface of the securement itself is not bigger because of USB. But again, what I want to say, there is no perfect solution. There's plenty of trade off and when you choose SD card versus USB in terms of UX, it's clearly less convenient and the US is better with USB. Does USB have a larger article surface? Maybe you're comfortable with that. But I think the trade off is better in terms of UX and this is the one we choose. But yeah, I agree with you. When you implement USB, you have to be very careful. You have to limit what kind of USB style you implement and then you have to do penetration testing, verify how it works and so on. What's nice about this new standard for PSBT is that we no longer need to take arbitrary data in or arbitrary formats in to operate with. Right? So you can be very, very picky about which data bytes really you're picking in and you're letting in to sign. Right? It's not like we're executing stuff from a microSD card too. Right, so you do reduce their death. Reminds me way back then there was a power differential analysis attack on a treasure and they were able to read the treasure calculating keys and able to leak out the keys. So, you know, it just goes to show, right, I mean, like the stakes are very high, right? So like how you find the straight offs and how we derisk each solution. Really is really is the challenge there of finding a good security sort of set for people. I would have to jump now. Yeah, you need to go, right? Yeah. That was a great discussion. Thank you. Thank you very much for having me. And maybe we can continue the discussion in the next episode. Thank you again. It was a pleasure. Appreciate you, Charles. Thanks. Bye. I really appreciate you guys coming, and we'll do this again, Charles, don't worry. Yeah, cool. I'll let you thank you guys. And then if you guys are still game, we can keep on going. I can keep going. Yeah, sure. Happy to. Cool. I have a few more minutes, but not forever. Okay. Yeah. I just love the fact that we can have a bunch of different people from the industry in a non contentious sort of environment to sort of, like, just talk shop and sort of discuss the challenges and things we have and sort of where we can go. I don't see a lot of that out there. So thanks for being here. Okay, ", + timestamp: '01:40:27-01:48:26', + topics: ['hardware wallets'], + type: 'podcast', + weight: 4.463118593191631, + }, + { + boost: 0, + date: 1667347200, + description: 'How Anthony Potdevin discovered the Lightning network', + episode_title: 'Meet the Makers: Anthony & Dolu', + guests: [ + { + name: 'Anthony Potdevin', + profile_picture: 'https://pbs.twimg.com/profile_images/1252630766909079555/qf-qI5EZ_400x400.jpg', + ref_id: 'da0a9fdc-eda1-4e07-8341-2100428065d1', + twitter_handle: 'thunderhubio', + }, + { + name: 'Dolu Zerologin', + profile_picture: 'https://pbs.twimg.com/profile_images/1577320325158682626/igGerO9A_400x400.jpg', + ref_id: '4c228a2d-4f9c-4bbd-bf49-d2be3159c6a4', + twitter_handle: 'Dolu_Web', + }, + ], + hosts: [ + { + name: 'Zapp Ed', + profile_picture: 'https://pbs.twimg.com/profile_images/1519990234070540288/adGqlFoj_400x400.jpg', + ref_id: 'bbe7cf1d-cd8d-4d36-926d-76f41b775fbb', + twitter_handle: 'zapp_ed', + }, + { + name: 'Moritz', + profile_picture: 'https://pbs.twimg.com/profile_images/1452933125743460360/5xkRoFj7_400x400.jpg', + ref_id: 'e23e282d-82b3-4c9d-859c-c1c7f41eef84', + twitter_handle: 'getAlby', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/965489b4-a414-4fd0-ab8c-55911b1596aa.jpg', + keyword: !0, + link: 'https://www.youtube.com/watch?v=wiIzexAc2gs', + node_type: 'clip', + pub_key: '02574d6e8e787372184b6f17c40d6c6fe1777db9015801f95dfd24692784d767cd', + ref_id: '1b0f7188-cbe0-4fdc-ae0e-a5f3b8d6ea2c', + show_title: 'BOLT FUN', + text: "think we should come back to that later on. Over to you, Anthony. Can you tell us a bit about your background and your first touch point when it comes to Lightning? I think first touch point was similar to Daly's time, like 2018, and I believe the first interaction I had with it online was with Polio Feed and with I think it was Lightning Spin. I think it was like one of the OGS from Rui Gomez that it was like, pay 100 SATS, and then you get to 1000 SATS, and then you get to spin a Roulette, and the Roulette is like, times two or times four. So it was the classic, like, give me 100 SATS, I'll give you 200 back. That type of functionality. I think this was my first interaction with Lightning. Seeing these micro payments go online without knowing who was behind these projects or where they were based, or if it was a company or where I was based, didn't really matter. It was just like a website and through pur codes, like being able to send back and forth, it just seemed amazing to me. And was it also that what fascinates you most about the Lightning network, the possibility of these super fast transactions no matter where you are. So, for me, the front facing part that's really interesting is being able to move value across the Internet with very little friction. And if you want to send one sat anywhere in the world, you can do it. And I think that breaks a huge boundary, or sort of breaks, like, the borders in the world for very small transactions. The backside part or more on the developer side is that since you're able to play with these very small amounts and do it very quickly, it just becomes very fun. And you get to experiment a lot and you get to try to break stuff and figure out what went wrong and not risk too much funds in the process of just playing around with it. Can you describe a bit like your journey as a Lightning developer? What experiments have you done so far? And maybe also, like, successful ones unsuccessful ones. Yeah. Since first interaction was with, say, a Lightning spin app, I wanted to try something similar in which the main functionality with Lightning was receiving and sending out payments. So I built this Lightning Roulette, like a mini Lightning Roulette website in which there was a Roulette like this casino game that you can send some SATS and then you can put it on a color or on numbers and then spend the Roulette and you get like some earnings based on it. This was like my very first experiment. Never went live with it or anything. I didn't really want any legal issues of having like a gambling site. And from here I moved over to ThunderHub was the next one. That is an LD note manager for me. It started off just as like a learning experience. I had previously just tried out the sending and the receiving functionality of a node. Like, get some stats and send out some stats. And I wanted to see the full API. What else was there offered in regards to channels, in regards to forwarding payments, in regards to signing messages? There's a full API that L and D covers that unless you have a very specific use case for each of these APIs, you never really go deep into it. So my thinking was, if I build a UI that can do everything, where you can do everything for your node, you sort of have to learn every single API endpoint that there is in an L and D. So it started off like that, just trying to build this UI that would have the most complete feature set connecting to L and D. That way I would be able to learn what were all the possibilities and what was everything that could be built on LNG. From here I met Jesse, my co founder for Ambassador. He was like, helping out with ThunderHub and getting feedback and answering questions and doing documentation and blog posts regarding it. So it was quite interesting to see also his passion. And here we met up and we were like, yeah, let's maybe build out another tool or something more professional. And we started off ambox with the idea of doing like a professional ThunderHub or like a more beefed up ThunderHub version. So with caching and database possibilities and really taking it to the next level, we built that for some months and we were very close to releasing it. And we realized there wasn't really a market for it and it wasn't really something that people needed. Our thinking was that this would be maybe interesting for companies or bigger players in the space. And what we didn't realize is that a lot of these bigger players, since a node is handling money, it has value. A lot of these companies sort of prefer to build everything in house and trust the least amount of outsource programs as possible, just to keep everything tight and secure. So we realized there wasn't really a market for it. And around the same time that we were realizing that, we saw that one ML was still the only explorer that was decent and used in the Lightning Space. And he said, just let's have the side idea, let's do this explorer and see how it goes. Maybe people find it interesting. And I think since the first week that we released amboss Space had a lot of feedback, a lot of good feedback. Like people really interested, thank God I don't have to go to One ML again type of situation. So we were like, okay, this is interesting. We're getting a lot of community feedback. Seems to be something that people were looking for. So we kept on that path ever since we started building out this Explorer, continued on it and building more features and yeah, that's like main focus right now. Yeah, super cool. The UI of Amber Space is definitely quite an improvement compared to what we have had in the ecosystem just one year ago. That's amazing to see that. And also very interesting, also your journey, because somehow it started off with experimenting, like for yourself, building an I own app with this Roulette app I think you mentioned, and then as an open source project, but maybe more or less mainly for learning things yourself, right. With the different data points in an LNG node. But it also then quickly developed to acquire known open source tool for node runners, I think ThunderHub. And now also with Amber Space, there comes also the whole commercial side and business perspective into it. But what I also liked regarding Amber Space, you also quickly thought about different ways of monetizing your service. At least that's what I remember. You tried out rather quickly to charge users, even if it was just some little sudden amount. But this also then gives you some first feeling, okay, where is the real value that you guys can deliver and that might end up in a proper product at the end? And ", + timestamp: '00:07:03-00:16:34', + topics: ['Anthony Potdevin', 'Lightning developer'], + type: 'youtube', + weight: 4.92705722391535, + }, + { + boost: 0, + date: 1670056200, + description: 'Gemini earning & Genesis negotiation: How the banking industry works', + episode_title: 'The Chopping Block: SBF Wants to Win in the Court of Public Opinion. Will He? - Ep. 428', + guests: [], + hosts: [ + { + name: 'Tom Schmidt', + profile_picture: 'https://pbs.twimg.com/profile_images/1563232354277085189/xQL92DR4_400x400.jpg', + ref_id: 'bc9d3bfd-36b0-4cbc-a491-9370decf4c99', + twitter_handle: 'tomhschmidt', + }, + { + name: 'Haseeb Qureshi', + profile_picture: 'https://pbs.twimg.com/profile_images/1581025415551889408/thQwG4lb_400x400.jpg', + ref_id: '790e4217-dd9f-416f-b9f8-ed596937f5b5', + twitter_handle: 'hosseeb', + }, + { + name: 'Robert Leshner', + profile_picture: 'https://pbs.twimg.com/profile_images/1587956987786104833/1SiKVj-s_400x400.jpg', + ref_id: 'ebaa2166-7982-423d-9f43-add89e7d47f9', + twitter_handle: 'rleshner', + }, + { + name: 'Tarun Chitra', + profile_picture: 'https://pbs.twimg.com/profile_images/1587539091444432897/Z6_nmrCB_400x400.jpg', + ref_id: 'dfad4b23-92ff-4aa1-9aa4-abc1d54cd6d3', + twitter_handle: 'tarunchitra', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/7de0d293-8ae3-4362-8500-8f7300f3fe41.jpg', + keyword: !0, + link: 'https://traffic.megaphone.fm/LSHML5256608163.mp3?updated=1670080150', + node_type: 'clip', + pub_key: '03c7a7f42d94fdfc7a655515c1421cd1d20db090a1c24150201de0b1dc6a30b0ee', + ref_id: '6681918f-0067-45b2-b7ad-0f79d9ce724d', + show_title: 'Unchained', + text: "much did you put into Gemini Earn? And isn't Gemini Earn Genesis? Yeah, so they wrote it off completely and just paying it and die back to the it was about $2 million. It was almost the same. They were just starting this program. It was like dripping into Genesis. Yeah, that's great that they I mean, it's not luck, right? Like they did the slow rollout. That's great. Good for them. Well, it's not just there is some luck in that the timing of when this happened could have been totally different. But my point is both protocols had these events, they were relatively small communities, responded pretty quickly. So I would just like to say that and you can see how the debt is and people are all fighting about it versus like, I don't know how the Genesis get like billions of dollars of debt and not liquidate anyone. Good question. Because the humans didn't want to liquidate their best customers. Yes, that is definitely true. I think for Genesis and for Gemini earn specifically, my understanding is like, that's actually a large bulk of sort of the debt. It's like almost a billion dollars it's coming from Gemini earned. And I think it is inherently this weird issue, which I don't know why these programs were set up this way where you said inherent, like duration mismatch matches, right. Where you sell these sort of yield services to retail customers with the idea you can always deposit, you can always withdraw like a bank. But then on the back side you're making fixed term loans to market makers. And so even if the loans are fine, you're setting yourself up for a bankrupt because inherently there's no way to sort of and these aren't very liquid assets. It's not like you can go to the Fed and borrow against them or sell them easily. It's like these are sort of weird bespoke lending agreements. And so it's almost as if you raise a few million dollars and you told all the Jim and I are depositors to go on a vacation for six months when these loans are supposed to expire and they get their loans back. That is almost like an easier solution rather than trying to get everyone immediate liquidity for a product that just isn't designed to have immediate liquidity. Yeah, I mean, that's true, but what you're describing as banking and that's what Genesis is. Genesis is a bank. Right. I guess my question is why did Gemini not sort of bake that into the SLAs? The idea that in certain market conditions it's not guaranteed you're going to be able to withdraw one to one or some limitations on that or something better. I mean, you're right that I guess this is just banking, but it's weird to me that they're not presented more clearly upfront. Yeah. Gemini is one of the biggest creditors and I think that's who Genesis is negotiating with right now. Because if Gemini pushes them to bankruptcy, then it's all going to be a gigantic mess. And I think it's pretty clear that's not good for Gemini or for Gemini customers. But yeah, I think the answer, unfortunately is that that's what banking is. And banking is basically the business of duration mismatch and trying to manage that duration mismatch so that it doesn't explode in your face. And that's why eventually we invented central banks, is because managing those duration mismatches in times of real trial generally requires a bigger, stronger bank to come and save you. And if you recall, that's what we thought CZ was doing when we thought it was still a duration mismatch thing. Now we know it's not a duration mismatch thing, but that was presumably what the story was about how finance was going to save FTX. That was basically a pseudo central bank stepping in to help a weaker bank. Yeah, I mean, in all these cases you have entities in the case of FTX, it was essentially running out, making venture investments and buying up all these things with FTX customer money. In Genesis case, it's having like longer term assets, longer term loans against really short term gemini earn customer money that wants to withdraw every time bad things happen. In all these cases, it's investing for the long term with liabilities that can be demanded on a moment's notice. Yes, it's true. And I think look, I agree with you, Robert, that DFI shows us a much better way to resolve these problems. It's much better to have everything out in the open and have smart people thinking about this and not just a management team that's pushed into a corner and has to make up stuff to defend itself. We've seen the same behavior basically from FTX as from Genesis, which is that they just say whatever they need to to keep deposits on platform, and as the deposits leave, then all of a sudden everybody just goes quiet. So as a result of this attack, which to be clear, we're actually not sure whether Avi made money from this attack because presumably he was shorting it on the central exchange. So we don't know how the positions ended out. We do know the open interest and it was not very high on any of those. I was going to say there's only like 70 million and open interest on Curve perp. So I think he just evaporated 40 mil unless he had maybe some long exposure. But I don't know if there's like a gigabyte move for the Curve short. I see. So we think it was like a lost one. Do you think someone like that wouldn't be bragging about it if they even broke even? That's fair. I think specifically he was, like, building up this short because he was trying to reach so Michael, the Curve founder, has like, I think, a few hundred mill in curve as collateral and so trying to hit his liquidation threshold, which was like they hoped that that would cause us to sort of massive dump and unfortunately got discovered and squeezed. Right? Yeah. And then Curve released their white paper for their stable coin in the middle of this thing, which was emergency pocket white paper. Exactly. A great move to have in your utility belt when you need it. My one criticism, I mean, there's maybe some benefits and merits to put in that's very unspecified, but I will say my one criticism is I don't think any defy mechanism needs to use the word adiabatic because it has been to do with crypto, and that paper has. It six times seeing it to run. Yeah. Okay, so the consequence of this is that obviously there was some bad debt on Ave. Ave is going to pay that back. So I think, obviously. Fine. It's a relatively small amount of debt for Ave as well as for maker. And then Ave paused lending markets for 17 of their tokens compound, then went and did the same thing, which is, I think, a different set of like, ten tokens. Doesn'T have there's no, like, debt ceiling. Aviv three ", + timestamp: '00:39:42-00:46:23', + topics: ['Gemini', 'Genesis'], + type: 'podcast', + weight: 6.995534682333783, + }, + { + boost: 0, + date: 0, + description: "Building on Lightning: Chad Atkins's Lightning App", + episode_title: 'Cool Apps Built on Lightning - March 16, 2022 - Voltage Twitter Spaces', + guests: [ + { + name: 'Chad Atkins', + profile_picture: 'https://pbs.twimg.com/profile_images/1200611447979544576/W9ocRJTb_400x400.jpg', + ref_id: '62da3c50-0a46-400b-81a3-5f482f5b8fee', + twitter_handle: 'Chemchad', + }, + { + name: 'Michael Atwood', + profile_picture: 'https://pbs.twimg.com/profile_images/1362207977470521345/Jy2_Ge60_400x400.jpg', + ref_id: '16359ade-afb9-4a37-be0b-0844a6134327', + twitter_handle: 'Dooowta', + }, + ], + hosts: [ + { + name: 'Nate Glasky', + profile_picture: '', + ref_id: '0662789d-b39e-4aed-ad6f-44257695b6af', + twitter_handle: '', + }, + { + name: ' Bobby Watts', + profile_picture: '', + ref_id: 'ae2685c6-1307-473a-95b0-87c234e50483', + twitter_handle: '', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/2ec62250-4755-4616-8342-096a2cfab95f.jpg', + keyword: !0, + link: 'https://www.youtube.com/watch?v=4EJrnxYOShY', + node_type: 'clip', + pub_key: '', + ref_id: 'f507641d-2514-41d3-a4f3-9b218136fa98', + show_title: 'Voltage', + text: "you. Talk to you later. Cool. And on that note, before you kind of dive into your list and you've got a pretty extensive listening, one of the things that I think is going to start coming to these apps in the future that I'm eager to be built out, I know it's early is Imagine on the podcasting app. If you're someone who's an avid listener, a podcast, and you have a good reputation and track history of sharing very key clips, you might be able to receive value even as a consumer because you refer new listeners to, let's say, a small podcast, right? Like I refer someone to Marty Ben's podcast and my audience is a bunch of legacy finance dudes and they like it and it leads to more listeners and subscriptions for Marty. Marty could say, hey, out of my 43% that I make in Fountain, which is what his percentage is right now, and he dives the rest across his team. I'm willing to give Bobby Zero 1% of that or 1% of that 43%. And it creates like a waterfall incentive structure where people can actually earn for doing good things and being a good consumer. So Michael Sailor says you can pay to reduce spam and make everything a Lightning invoice, but you don't necessarily need to do that you could just kind of like Breeze and Fountain does. You can't necessarily stream one Sat. Anyone who uses the apps, they send it in like 100 sat batches. You could do the same thing where if you refer enough people over every week, you might get a small deposit of SATS into your account because you're actually a good economic actor in sharing value and passing it forward to an audience that may not hear it. So I'm pretty bullish on the idea of that. I was thinking about this the other day. I don't know how this would work, but I'm just going to say it anyway. It only takes a second. What if there was a sort of like a router firmware built with Lightning so other people can connect to your WiFi or whatever and stream Sat for the WiFi connection and you can hook up your neighborhood to that or something? I don't know. I think that would be pretty cool. Yeah, that's interesting. I know we have a lot of new people here. This is an open discussion. We're just talking about everything being built on Lightning. What cool apps are out there right now, what's coming in the future. And if you're building something, feel free to raise your hand. I see Chad in the audience. I know he is building something, so if he doesn't mind, I'm going to invite him up. We will see. I'm going to give him a second here. If not, I'm going to talk about it anyway. When he comes up, he can take over. So Chad has built this interesting sort of Lightning app called satbox, satbox TV. It's essentially a Lightning enabled jukebox powered by YouTube and Twitch, where you basically just paste in a YouTube link and specify how many stats you want to pay to play it. And depending on how much stats you pay, you could jump over people that are on the playlist. So if there's like three videos in queue for like 500 stats each, and you link a YouTube video and pay 600 stats, you will go above them and it plays the YouTube video up to five minutes and then it cuts you off. So he posted a couple of weeks ago about it and we actually had some pretty some people didn't do just music. Some of them are pretty funny. But I think it's a really cool idea and I'd be interested to see more of that sort of music on Lightning sort of get developed. So Chad, if you're out there, let me know. We'll pull you up if you want to talk about it. That's super interesting. That could create even like a bidding or auction service for marketing and advertisements during online shows. You could see the live bidding, which would create a more transparent structure of advertising. But I'll let Chad speak. Can you guys hear me? Yes, sir. Sorry about that. I was on my laptop, so I had to open it up on my phone. Yeah. So I missed what you were just saying, but I guess I could just start from the beginning. Yeah, man, go for it. My name is Chad. I've been building something not so serious, mostly for fun. It's my first lightning app called satbox TV. Yeah. How I originally announced it and described it to people was simply just as a lightning powered jukebox. But more generally, it's just a live stream that plays a viewer chosen content. So right now it broadcasts the livestream to Twitch TV and the content is just YouTube videos. The way it works is the viewers can just add a YouTube video to a queue by attaching some SATS to it and making a lightning payment. And the video in the queue with the highest amount of SATS attached to it is played next on the live stream for like five minutes. So, yeah, it's pretty simple. It's all automated and it can be kind of fun if there's enough people in there because it's kind of gamified. If you want to mess around with people, you can just snipe like a meme video in there or something. And since it's on Twitch, it's integrated with the chat room so you can respond and see what people think of the videos you're playing, whether it's a song or something funny. But yeah, it's pretty simple. That's mostly it. Yeah, it was pretty funny when we had a few people in there doing it a couple of weeks ago. People are playing the first five minutes of like, the Honey Badger documentary. I was enjoying watching it on the side, just people posting stuff. It was pretty good, but I think the sort of projects are really cool and I hope people kind of try it out more. Yeah, thanks. There's a couple more things I want to do to it right now. I've been running the stream, like Live 24/7, so I think I'm going to cut it down and maybe build it around a schedule to try and get more people in there at specific times and just trying to make it fun and maybe have something for. No, I. Was just going to say yes. If you have a thing where it's like Thursday is satbox night or something like that, I would totally like yeah, spread the word and participate. Like, that'd be great. Exactly. So I'm thinking of doing some stuff like that and just figuring out some more ways to make it fun and try to onboard some gamers into bitcoin. That's the goal. I love it. Nice. ", + timestamp: '00:08:42-00:16:20', + topics: ['Lightning', 'Chad Atkins', 'podcasting'], + type: 'youtube', + weight: 4.446621894836426, + }, + { + boost: 0, + date: 1638594e3, + description: 'Small Countries Monetizing their Native Energy Resource for [[Bitcoin]]', + episode_title: 'WHY ARE WE BULLISH Max Keiser Meditation Man Stephan Livera ep221', + guests: [ + { + name: 'Max Keiser', + profile_picture: 'https://pbs.twimg.com/profile_images/1361873587582472195/y57DiTYX_400x400.jpg', + ref_id: '743efd07-d194-4c74-8663-45c3b8646b8e', + twitter_handle: 'Maxkeiser', + }, + { + name: 'Stephan Livera', + profile_picture: 'https://pbs.twimg.com/profile_images/1362551718110580740/v-W5Q2uo_400x400.jpg', + ref_id: '72f57157-c96e-4466-8bf1-290cfe1f8a0b', + twitter_handle: 'stephanlivera', + }, + { + name: 'Meditation Man', + profile_picture: '', + ref_id: '6cf1c2b8-8a28-4840-9132-3c2631d6ea58', + twitter_handle: '', + }, + ], + hosts: [], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/7070839d-051e-48e4-bd9a-95c09b310db2.jpg', + keyword: !0, + link: 'https://anchor.fm/s/11e95d20/podcast/play/44361406/https%3A%2F%2Fd3ctxlq1ktw2nl.cloudfront.net%2Fstaging%2F2021-11-4%2Fbe464ffe-83aa-f709-63c9-c1fc5961e7f2.mp3', + node_type: 'clip', + pub_key: '', + ref_id: '97fe1ee4-8b91-403e-8a64-d8f839be5b52', + show_title: 'BTC Sessions', + text: "absolutely. I think El Salvador is such an incredible place for this to start. I've thought for a long time that being in the United States and trying to Orange pill so many different people, talking to so many people who are just not receptive to even opening their minds enough to start understanding Bitcoin, it's no surprise that it's in the more like the developing nations, the smaller nations, where you're going to see this kind of embrace of Bitcoin happen. And if you just look at El Salvador as the first they're dollarized, they're under the thumb of all those global institutions, IMF, et cetera, and they don't have sort of their destiny in their own hands in so many ways. So with Bitcoin comes this incredible monetary sort of Renaissance there that can give them sovereignty in ways they've never had before. It's incredible to me. They're tying this all into volcano energy. What an incredible thing to actually have a buyer in Bitcoin for their native sovereign energy source that otherwise they wouldn't really be able to bring to market. So it's a really incredible synergy of those forces of having the ability to cancel out their debt and be whole and sovereign in a monetary fashion, but also to actually be able to monetize their native energy resource. And you just start looking around the world. How many small countries are out there with broken currencies or dollarized or just completely not in control monetarily, but they have some kind of energy resource. They've just never been in a position to be able to actually bring it to market or even just adopting Bitcoin and gaining that sort of nation state sovereignty against the sort of world economy. And then that just leads right into the geopolitics and the dynamics there. So it's an incredible development. And I predict, should everything go well, we're going to just see an absolute domino effect of small countries, and that's where it's going to start. It's going to start on the edges. Big countries like the United States are going to be one of the last, if not the last, to adopt this fully. And so I'm really excited to see what happens next. I like early ", + timestamp: '00:35:17-00:37:56', + topics: ['bitcoin'], + type: 'podcast', + weight: 4.4097411691227, + }, + { + boost: 0, + date: 1616679600, + description: "Debate on bitcoin vs dollar's supremacy", + episode_title: "Debating Professor Hanke on Bitcoin's value", + guests: [ + { + name: 'Hong Fang', + profile_picture: 'https://pbs.twimg.com/profile_images/1554126711502999553/EkTARSpF_400x400.jpg', + ref_id: '9adabc40-bbc7-44aa-8a11-c139f3697f80', + twitter_handle: 'hfangca', + }, + { + name: 'Saifedean Ammous', + profile_picture: 'https://pbs.twimg.com/profile_images/1362635264158552067/CSsOKrBd_400x400.jpg', + ref_id: 'a61d4df9-1db4-4bdc-a7e9-a4c99268e59b', + twitter_handle: 'saifedean', + }, + { + name: 'Professor Steve Hanke', + profile_picture: 'https://pbs.twimg.com/profile_images/915395033871867905/3zbE7bAT_400x400.jpg', + ref_id: '4a754eea-7f67-46d0-b4d2-f0aa58aba36e', + twitter_handle: 'steve_hanke', + }, + ], + hosts: [ + { + name: 'David Lin', + profile_picture: 'https://pbs.twimg.com/profile_images/1494034862688411662/PnegVyJF_400x400.jpg', + ref_id: '4aa21d3b-afe2-434b-a77c-79dba268a23d', + twitter_handle: 'davidlin_TV', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/5cdd0aef-f1a7-4d3b-8336-7f81c2db4a40.jpg', + keyword: !0, + link: 'https://www.buzzsprout.com/1849151/9671311-debating-professor-hanke-on-bitcoin-s-value.mp3', + node_type: 'clip', + pub_key: '', + ref_id: '9020a99f-62d8-462a-81aa-515e31bb5536', + show_title: 'The Bitcoin Standard Podcast', + text: "Must be a price at which you would have to if you think it's small, and you have to be able to name a price at which you would admit that it's no longer small, it's no longer a footnote, because it is much bigger than it was last year in Lebanon. It's not as big as the dollar yet, but it's much bigger than what it was last year. So if the trend continues, at what level would you admit that this is just something that people can use? It works. It does what it says on the tin. You can send it across the world, and it maintains its supply. It takes time. When Elon Musk first started to invent electricity cards, people in the traditional auto industry think that was just a joke, a footnote. But now Tesla is the most valuable auto company in the world. So it takes time. And when the paradigm shifts, it comes slowly and then suddenly. But I'd like to ask professor Hanky to specify a price at which bitcoin becomes big enough for him to stop saying it has a fundamental you just. Measure the measurements that I've given you, the dimensions that I've given you. In other words, how many commodities? When are we going to start pricing oil and bitcoin? When are we pricing corn? When are we pricing wheat? Okay, that's a commodities. When are we going to start pricing cars and manufactured goods and bitcoin? You're talking about the speculative aggregate moving this thing around. I'm talking about the uses of it in transactions. It is actually being used in transactions. Dr. Hank it's probably just not as visible to us, in us, than to other people living in different regimes where inflation is super, is taking away their health for example, in Latin America, there are a lot of actually commercial entities in their export business. For example, with Asia, they're selling commodities to Asia. They transact in bitcoin. This is an academic footnote. The dollar dominates all of these transactions. Yeah, but the British found dominated at some point, and it doesn't anymore, just because it does. That's exactly my point about entry of a competitor, a superior competitor. And the US dollar became superior after World War One and drove the British pound sterling to the sidelines. ", + timestamp: '00:28:15-00:30:59', + topics: ['Transactional currency', 'dollar supremacy'], + type: 'podcast', + weight: 4.409741163253792, + }, + { + boost: 0, + date: 1627704e3, + description: '[[Bitcoin narrative shift]] in the [[Film industry]]', + episode_title: 'WHY ARE WE BULLISH Natalie Brunell Aaron Segal Lauren Sieckmann Dan Held ep191', + guests: [ + { + name: 'Dan Held', + profile_picture: 'https://pbs.twimg.com/profile_images/1522608646043181060/QQRjVYhi_400x400.jpg', + ref_id: '3e22facc-9310-4346-82ac-3e183b88fa51', + twitter_handle: 'Ledger', + }, + { + name: 'Lauren Sieckmann', + profile_picture: '', + ref_id: '427bb439-f251-4c7e-89fb-b53ecd8c9a82', + twitter_handle: '', + }, + { + name: 'Aaron Segal', + profile_picture: 'https://pbs.twimg.com/profile_images/884309028125294592/sLDGwzDO_400x400.jpg', + ref_id: 'f7483c61-ba76-4a19-8d8d-992966e1f79e', + twitter_handle: 'AaronSegalActor', + }, + { + name: 'Natalie Brunell', + profile_picture: '', + ref_id: 'a09e8874-abbe-4a85-b19d-08cac1c8afde', + twitter_handle: '', + }, + ], + hosts: [], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/419512c2-e309-4b25-bfe2-cd481d53f66d.jpg', + keyword: !0, + link: 'https://anchor.fm/s/11e95d20/podcast/play/38086440/https%3A%2F%2Fd3ctxlq1ktw2nl.cloudfront.net%2Fstaging%2F2021-6-31%2F116ac8f3-ce82-01e5-2865-da5c486c8330.mp3', + node_type: 'clip', + pub_key: '', + ref_id: 'c9a7d4e3-bdca-4b73-8209-0eefae9248cb', + show_title: 'BTC Sessions', + text: "keep it rolling. And Lauren, since we're just with you, we're going to keep rolling with your reason for being bullish. Meanwhile, if people are in the chat, of course, keep those chat messages coming. I'll bring them up as they come up and are relevant to the conversation. And, of course, smash that like, button. Give it a share. And Lauren, what has you feeling bullish this week? All right. So I guess my reason for being bullish is, I guess, a big narrative shift around Bitcoin that I've seen in the film industry. So as I mentioned, I was writing a screenplay about Bitcoin. And eventually I came to the conclusion that a documentary would be more appropriate for the time. You can produce a documentary a lot quicker than you can a feature film. So I started pitching this idea, this concept that I wrote out to a bunch of producers. And so the first responses I got were, there's no way anybody is going to make a Bitcoin documentary with you. The target audience will be a small group of nerds. Everybody knows that this is stupid. So I just kept pitching it. And I have a friend that I taught his daughter volleyball, and he's a really good documentary producer. I stood on with him for probably five months. I kept pitching it to him and I kept saying, I'm telling you, this is brilliant. We have to make this documentary. So eventually, around March this year, he came around and we're producing this documentary together, and we've been working on it. So that was huge. And I'm really bullish about this documentary. But I guess in the past month, throughout this process of making this documentary, I've spoken with a lot of people in Hollywood, and when I tell them I'm making a Bitcoin documentary now, the response has changed and their eyes light up. They're like Bitcoin. I've been trying to get into it, but I don't know where to start. And so I've been telling them what books to read and what podcast listen to. So I think it's awesome that I feel like there's a really big narrative shift and people are really starting to see the value and they want to learn, and it is just a matter of people are overwhelmed and they don't know where to start. And I was in that same boat a year and a half ago. I had no idea where to start. It's overwhelming when you first look into it. And I think that's why a lot of people, they take the easier route because they don't want to put in the work and they'll judge it, and they'll call it a group of shadowy figures, and they'll make up things like that. That's where the fun comes. I don't want to put in the work to learn. But yeah, I've seen a huge narrative shift. I think it's really bullish. I love it ", + timestamp: '00:44:17-00:46:40', + topics: ['bitcoin narrative shift', 'film industry'], + type: 'podcast', + weight: 4.389463424688496, + }, + { + boost: 0, + date: 1632355200, + description: 'How do supply issues affect the Bitcoin ASIC market in general?', + episode_title: 'The ASIC Mining Hardware Market', + guests: [ + { + name: 'Vincent Zhang', + profile_picture: 'https://pbs.twimg.com/profile_images/1158285609196109825/fuB-e6lm_400x400.jpg', + ref_id: '98e7bc98-3a3b-4ddf-9b48-5dcd78973739', + twitter_handle: 'Whatsminer_MBT', + }, + { + name: 'Vincent Vuong', + profile_picture: 'https://pbs.twimg.com/profile_images/1260974518547312640/n47yvbNL_400x400.jpg', + ref_id: '8390e230-e36b-4e0d-9f5d-70c6635bf3c2', + twitter_handle: 'BitcoinVincent', + }, + ], + hosts: [ + { + name: 'Will Foxley', + profile_picture: 'https://pbs.twimg.com/profile_images/1580970227193376776/9oQfeExj_400x400.jpg', + ref_id: '704b9e82-3e40-40b6-874c-6bb8fadafbef', + twitter_handle: 'wsfoxley', + }, + { + name: 'Zack Voell', + profile_picture: 'https://pbs.twimg.com/profile_images/1595803006737448961/fFrf7VJb_400x400.jpg', + ref_id: 'e32c7661-c635-4089-a620-ffce509eff0e', + twitter_handle: 'zackvoell', + }, + { + name: 'Compass Mining', + profile_picture: 'https://pbs.twimg.com/profile_images/1425165074373791744/f2CgInvP_400x400.jpg', + ref_id: '812e5d37-47fb-4077-915f-df52e2ef84d8', + twitter_handle: 'compass_mining', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/ae91fac6-a1af-4877-9a92-e793d556ee66.jpg', + keyword: !0, + link: 'https://www.youtube.com/watch?v=qKeUCNXa4Uc', + node_type: 'clip', + pub_key: '03c18d0c6c35333f22bc524e21a5fd1d2d9886f5d4d958dc1de95d025de5c84cfc', + ref_id: '05fee350-6926-4873-885a-76fd23008692', + show_title: 'Compass Mining', + text: "those insights. So Damon is actually going to throw up a video here in a second. So this is Los Angeles Bay and Long Beach Bay, which of course is one of the larger inbound places for bringing in shipping containers from Asia. This is like one of the key places for dropping off stuff to go to market in the US. From the Pacific Rim. And it is totally backed up. I saw Tweet earlier today and I don't know if the number is quite on basis, but apparently 16% of all shipping containers in the world are stuck in this bay right now. And that includes like a lot of necessary parts for bitcoin mining. So this kind of speaks to, in a visual sense, to the way that there's been a supply crunch all across the world on all markets and it's been extending for almost two years now. You first saw these images in April 2020. Here we are coming up on April 2022 in six months or so and we saw the same images in the same bay. So Vincent from Compass, I'll throw it to you, the supply chain issues run deep in every single market right now. How is it affecting the bitcoin ASIC market in general since we have all these different computer parts that are not necessary for Asics, we have all these people demanding to buy Asics to take advantage of the increased bitcoin price right now. Yeah, this is a really interesting question. I actually wanted to ask Vincent for MicroBT a question about this too. Generally a lot of people think that I guess he dropped off for a. Little bit kill me back. But for us right now, I have a feeling that there's a higher bare minimum cost that the manufacturers are producing the asics at just because one of the supply crunch of the wafers, generally the cryptocurrency industry consumes less than 1% of the overall capacity of the semiconductor companies like TSMC or Samsung. So we're not in the grand scheme of things, we are not that big of a player compared to like the cars and Apple and everything. We get second tier treatment compared to them just based on the number that they produce. So I think that there's an overall higher bare minimum cost that the manufacturer is producing at and that is getting passed on to the clients as well. So a lot of people think that producing is cheap. They aren't really realizing that all the parts and components of an ASIC are slowly decreasing in price as well. And that brings me to a question that I wanted to ask Vincent from what's minor? So generally the price of ASIC materials remains relatively stable even when the bitcoin price increases or decreases. But have you guys started to see an increase in your cost to produce a machine based on the amount of wafers that you guys are getting from the foundry? Obviously, if there's details you can't share, then don't worry about it. Yeah, so what we can see is in past one and a half years so everything become shortage. Okay? So no matter it is the ASIC chips we took from, we take from Fondue factory or the chips for power supply unit or the components for power supply unit and hashboard and other parts. So what we can see is this of course have serious impact on the cost of the minor and the lead time of the miners. Right now the situation is not only the cost increased, but also the lead time also becoming longer. So recently you might have read the news that both TSMC and Samsung increased the cost of the waivers. The reason they give is given is because right now the mind from various kinds of the waivers of the chips are huge. For example, we are working with Samsung. Samsung. Normally, they have clients like Qualcomm and Samsung Electronics and Media. Okay. So because everyone won't get more supply of the waivers. So for example, my actual requirement is hundred, but I may put 120 or 150 to Samsung phones refreshed because I know that I put 180 or something. So definitely my demand may be cut in some percentage. So to try to get more waiver supply capacity from either TSMC or from Samsung. So the purchase of the waivers may increase the demand from themselves. So which means, you know, both pharmacy and the TSMC may receive double of the real demand. So they try to increase the cost of the Wafers to prevent the purchase of the waiver unnecessary, put more demand of the waivers. This is the reason they give to us. Definitely you will understand that for the ASIC hardware the most cost is from the chips, okay? And also recently some of the components which is very important for making the minus, also the cost increase a lot. I just give you one example. There is one chip which is power management chips to making the power supply unit earlier we can acquire this chips at you can say half dollar, okay? So now you are not able to get sufficient quantity even at $5 per chip. So the cost increase ten times. However, though it has a little impact on the cost because this is not a major cost of the hardware. So however, definitely the cost increase and then the problem is the lead time is too long. Okay? So comparing with the previous situation, of course this is the impact on the hardware side. And so for logistics also we can see in one month. So once in a year the real house in United States or in different countries totally get contested. So there's no work to petitize the cargo and the container cannot be returned back and the flight, you cannot get execution space. So all this not only impact the cost of the waivers but also the supply efficiency of the hardware rigs. And of course it also has a small impact due to copyright 19 situation in China and in the factory outside of China, for example in Pasta in the month of August. So Malaysia and Thailand factory almost closed because of COVID-19 situation becoming worse. So all these factors actually have the impact on the supply of the minus and the cost of the minus. Yeah, there's a great question from Vincent, a great answer actually also from Vincent. But there's so many different factors that go into that. I guess a followup question to all of that is like how long do you foresee all of these different exogenous factors persisting that lead to a tenx increase in price and these crazy long lead times, some of which you said is related to the COVID-19 situation but also just other unrelated manufacturing and supply chain complications? Do you see this problem persisting maybe only for a year or two at most? Or is it just the new state of the market when you're manufacturing bitcoin. Asics back to you visit from Westminster. From the situation right now we can see is that the situation may be becoming better from Q Three to some 22 because earlier Samsung will give you the answer no, definitely no. Okay, so I do not have more supply capacity, but right now what we can see is we might be able to get some more supply capacity in Q Two and Q Four, however, and the answer is not solid right now. So what we are expecting is maybe from Q 423. So the supply situation of the wafers and chips shall becoming better. Got you. That makes sense. It's a little ways off, but not too far. ", + timestamp: '00:15:03-00:25:58', + topics: ['Bitcoin ASIC Market'], + type: 'youtube', + weight: 4.388186931722114, + }, + { + boost: 0, + date: 1677681754, + description: + 'Why KYC anti-money laundering measures are not effective and how to use Bitcoin to overcome KYC/AML', + episode_title: 'Freedom Money w/ Jeanine, Abubakar, Mills and Matt Odell', + guests: [ + { + name: ' Jeanine', + profile_picture: 'https://pbs.twimg.com/profile_images/850023968484368386/jBcIv7W1_400x400.jpg', + ref_id: 'dd36be1a-acf4-4bcf-a085-d713f49c4494', + twitter_handle: 'JudgeJeanine', + }, + { + name: 'Abubakar Nur Khalil', + profile_picture: 'https://pbs.twimg.com/profile_images/1570024329512992768/D42LDEjI_400x400.jpg', + ref_id: 'ee2cd308-168e-4ffc-9332-2957981b5acc', + twitter_handle: 'ihate1999', + }, + { + name: 'Matt Odell', + profile_picture: 'https://pbs.twimg.com/profile_images/1421584695746338819/Z_7ZfAeP_400x400.jpg', + ref_id: '4f2825ff-3b88-4595-84d4-36e81544b79a', + twitter_handle: 'ODELL', + }, + ], + hosts: [ + { + name: 'CK', + profile_picture: 'https://pbs.twimg.com/profile_images/1575940779746394133/xMNVsyxY_400x400.jpg', + ref_id: '1f90d285-6fad-4812-8d2e-69b8a52a59b2', + twitter_handle: 'ck_SNARKs', + }, + { + name: 'Mills', + profile_picture: 'https://pbs.twimg.com/profile_images/1574338066231304193/3SBMUkej_400x400.jpg', + ref_id: 'b88d7a57-b9a6-4cdb-95d8-1be4d118eeeb', + twitter_handle: 'SpecificMills', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/1583c7c4-f4f2-4e52-8f27-a1eaeb6289fd.jpg', + keyword: !0, + link: 'https://anchor.fm/s/cefa18a0/podcast/play/65803306/https%253A%252F%252Fd3ctxlq1ktw2nl.cloudfront.net%252Fstaging%252F2023-2-1%252F315488876-44100-2-69f740e2360ea.m4a', + node_type: 'clip', + pub_key: '037f7331a5bef6c6f880246747befcc3767f3bb9730bc5e6f7c3770f4184ed0bff', + ref_id: '77ce133d-2bdb-490c-9638-88cc560062dc', + show_title: 'Bitcoin Magazine Podcast', + text: "that. Awesome. Yeah. It seems like it's important to understand cost benefit analysis. Understanding your risk is like a really good first step, and then you can decide what you're willing to undertake to mitigate that. So that makes a lot of sense just from a practicality standpoint and to kind of segue this a little bit more onto the Bitcoin side of things. I know you and Matt talked about anti money laundering laws as they relate to financial surveillance, and I would just be curious your thoughts on how you see Bitcoin fitting into that. Obviously in the Bitcoin community we talk a lot about individual freedom, self determination, but it seems that obviously there's many people that participate in seed exchanges. They don't necessarily have privacy measures for when they're sending their Bitcoin. So I would be curious how you approach that perhaps in your life, for what tools and capabilities you would point people towards if they want to try and understand to what degree they are exposed and then how they can go about mitigating. Yeah, so my opinion on anti money laundering policies are generally, I mean, this isn't even my opinion. This is based on research that I've done for my newsletter. I've cited studies regarding the effectiveness of anti money laundering, including from the United Nations. I think it I think I cited it in the interview. There was a United Nations paper or report about the effectiveness of AML back in 2011, and their conclusion was that strangely compared to, for example, the policies that cut down on drug trafficking, the amount of laundered money that is captured by any of those policies is less than 1%. And that's significantly less than the effectiveness of anti drug trafficking. And so their question was, well wait a second, are the drug traffickers just so much smarter than the money launderers? What's going on here? And my guess would be that, well, I have a lot of guesses of why it's not effective, but the point is that it's not effective for whatever reason, and that's in a system where we don't really have non KYC for bank accounts anymore. I mean, if you have significant wealth, then you can get that. But that's a small number of people. And maybe that's part of the problem is that the only people who end up getting privacy are the people who have a ton of money and engage in the most corruption. But yeah, so even when you have mostly to fully KYC system, apparently the anti money laundering rules are not really working. Most of the people saying that they're fighting this say, oh, it's cash's fault. And that hasn't really borne out either because cash has a number of benefits that are outweighed by any cost like that. And so the problem with when AML gets applied to things like Bitcoin is that the people doing the investigations think that they've got the golden goose because they have a database that anyone, a record of all these financial transactions that anyone can download and sift through. And they think that because they have that, that they'll eventually just find all the answers and they'll be able to track money flows perfectly. The problem with that is, as I've talked about a number of times, especially most recently in Prague with my blockchain surveillance talk, a lot of the work that they do, like most of the overwhelming majority of the work, they do. If they have any certainty at all about where coins came from or who owns which coins currently that information is usually tied to, they have very clear evidence that this is an exchange address because the exchange has published it. For example, that's one of the rare instances where they can say with relative certainty, like these coins at least come from this entity. That doesn't tell them necessarily which customer owned the coins or if they're just owned by the exchange or whatever. But that's like the most amount of certainty I've seen that they can get. Everything else is just guesswork. They're making guesses about why money moves, they're making guesses about who controls which coins at any given time. And given that all of this stuff can be moved in ten minutes or less, every ten minutes or less, it's quite complicated to actually get any concrete evidence of what is happening on the blockchain. And they like to claim otherwise. They like to market themselves as they can solve investigations. Their software gets bought by all of these governments and investigators, but at the end of the day, and actually sometimes they are honest about this, including coin bases. Investigators in particular. They wrote a series of blog posts where they said blockchain analysis is more art than science, which I find to be an infuriating statement that they're trying to put people in jail with art. That doesn't seem like such a great idea. So the thing people have to understand is that when AML gets applied to Bitcoin, it's getting applied to a system where people make the assumption that because they have the data, they have the answers. The problem is, there's a lot of interpretation that goes into figuring out what that data means. And in a lot of cases, there is not enough information. And that's by design. Bitcoin was designed, as it says in the white paper, to basically give a very limited amount of information, just the basic necessary details for the transfer to be validated. And that's it. There are some guesses you can make. Obviously, given that I focus on Bitcoin privacy, there's a number of things that you can give away and give hints that a certain transfer is for a certain purpose or that it may belong to a certain person, and that's still important. But at the end of the day, a lot of the work that the people that you're fighting against are doing is guesswork. And it should scare people that people could potentially be put in jail based on guesswork that they even themselves call art and not science. Like, at the bare minimum, if their standard does not reach the level of science, then I don't think they should have any authority whatsoever to be putting people in jail. But there's also certain times where it's pretty cut and dry, and then they do throw people in jail, which I feel like is important to mention. We had a situation where the Volunteers team, the main opposition leader in Russia, was accepting donations using Bitcoin, and they kept using the same reused address. So any payments that go to that address are obviously going to the volunteers donation fund. So the Putin regime went to Finance and said to Finance, we want to know the identities of every single person on Finance who sent money to this donation fund, and Finance just handed it right over in that situation. That's just very obvious on chain, what happened there mixed with KYC data. Yeah. So in that instance, that's, like I said, where an entity is publicly associating themselves and their identity with an address, they're not using fresh addresses for each donation. They're not offering a way to do donations more privately, for example, with reasonable payment codes. One of the tools and yeah, the other thing people have to remember is that because of these AML policies, which go back way before Bitcoin, but especially with these exchanges, these banks, these crypto banks, are not your friend by law. The AML rules make the banks basically in an adversarial relationship with you as a customer because their job is well, the job that the compliance people have is to try to make sure as much as possible to prevent little people. Not so much the big people, but little people with less money from doing anything that might get the bank in trouble with the government. So anytime you're using exchange, if there is any reason whatsoever that somebody could use your financial data against you, do not think that the exchange will protect you. Maybe you'll get lucky and maybe some of them will stand up for you if your case has enough marketable public relations value to them in fighting the case. But do not count on that. You should not consider any exchange to be your friend. ", + timestamp: '00:12:37-00:20:36', + topics: ['KYC', 'anti-money laundering'], + type: 'podcast', + weight: 43.188702609415806, + }, + { + boost: 0, + date: null, + description: 'What would happen if Starlink were to integrate BOLT 12 static QR codes?', + episode_title: 'The Orange Sun 🌞 VISA, MasterCard & #Bitcoin #BOLT12', + guests: [ + { + name: 'Oluwasegun Kosemani', + profile_picture: 'https://pbs.twimg.com/profile_images/1538403135101800450/sO-RPI9U_400x400.jpg', + ref_id: '25ce4b90-6689-4dd9-84b6-240c7bcbe407', + twitter_handle: 'MrlamilamiKosch', + }, + { + name: '~₿ Maxi~', + profile_picture: 'https://pbs.twimg.com/profile_images/1446241859651637250/i67F3y9p_400x400.jpg', + ref_id: 'ad997ae7-0726-431a-9f72-82da091c0658', + twitter_handle: 'fede0891', + }, + { + name: 'TK☣️Ph.Ple₿', + profile_picture: 'https://pbs.twimg.com/profile_images/1505791887415730177/d0YDQ3Xc_400x400.jpg', + ref_id: '9e3ffa2c-9410-48e9-a726-8312c0abcd7c', + twitter_handle: 'ToxiKat27', + }, + { + name: 'FireBurs†s', + profile_picture: 'https://pbs.twimg.com/profile_images/1517827165198458880/N79Wpx85_400x400.jpg', + ref_id: 'cda1d3ad-dd80-458b-a5fb-a28861df10a7', + twitter_handle: 'FireBursts', + }, + { + name: 'Nikolai Tjongarero', + profile_picture: 'https://pbs.twimg.com/profile_images/1578458155964682274/_SzDxkAJ_400x400.jpg', + ref_id: '821ee040-2267-454e-a59a-92da51568afa', + twitter_handle: 'BitcoinNaijaShw', + }, + { + name: 'ブランドン', + profile_picture: 'https://pbs.twimg.com/profile_images/834861311762649090/N0KAP4zH_400x400.jpg', + ref_id: '3d41531d-6a59-4771-81f9-0924b4c02561', + twitter_handle: 'blario', + }, + ], + hosts: [ + { + name: 'Satoshi’s Journal', + profile_picture: 'https://pbs.twimg.com/profile_images/1598641632601047042/qrZMP5Oy_400x400.jpg', + ref_id: 'd977ed11-09b0-4143-828d-582ecb8b58ca', + twitter_handle: 'SatoshisJournal', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/9b2e17f2-71c5-4f1e-a3e7-720d06dab810.jpg', + keyword: !0, + link: 'https://stakwork-uploads.s3.amazonaws.com/uploads/customers/2707/media_to_local/94a86a32-91c2-4717-b5cb-b36cef925776/38decc02-c922-4c1d-a605-7cd54c91a01d.mp3', + node_type: 'clip', + pub_key: '03c18d0c6c35333f22bc524e21a5fd1d2d9886f5d4d958dc1de95d025de5c84cfc', + ref_id: '7a7c8427-a11e-438b-ac49-345882ca9a3f', + show_title: 'Satoshi’s Journal', + text: "but I think I'm on to something. So you guys tell me. So if Starlink, let's just say that their base model cost about $500. If they were to integrate these static QR codes, bolt twelve lightning codes, because they're going to provide, they're going to actually charge a monthly subscription, we know that. But if they could actually basically integrate these bolt twelve QR codes on their units or within a location, and if they do this on a communal basis, people can just scan those Lightning QR codes and then send in Satoshis somehow, some way for the data they're using. Whatever data they use, that's what they pay and they don't have to pay anymore. So like if they were to use that and that's the future with just content creators as well. So like in the future you probably pay for public utilities and you pay for internet. That way you pay as you go kind of deal. That's the beauty of lightning is you can simply send the corresponding satoshis that relate to the amount of energy you expend or data you use. In Africa, you can speak to us and maybe the Ramifications, I understand you guys have to buy certain data for your internet and all, so if you can pay as you go through satoshis, I think you guys kind of have an iteration of that now, but it's like more fiat. So do you foresee us? You guys kind of doing that with lightning? Oh, you're on mute. If you're trying to talk, or maybe. You can't talk, you will have to rephrase that question. That question is very white. Okay, let's summarize the question again. Yeah, no, that's right. So right now there's the ability for people to listen to podcasts and only pay for the part that they listen to. And if they find value in the first minute and they just want to pay for the first minute, then they just send satoshis and they don't have to listen to the whole thing. So from a standpoint of utilities and maybe Starlink, when you pay on a monthly basis for the amount of energy you expend, whether it's natural gas or propane, whatever, or you have to send Satoshis for data usage, whether it's cell phone data or WiFi, whatever, do you think that maybe in Africa you guys might be the first to institute that? On the basis of, for instance, internet, you just pay as you go, and so if you need ten megabits megabytes of data for one month or whatever, you don't necessarily need to pay for that ten megabytes right away, you just use it, and then you're constantly streaming stats as you need it to them. Does that make sense? That was a long question, sorry. Yes, it does make sense. In simple response, which is in support of what you've said. In support of what you said. It means you can now monetize second, you can ordinarily monetize airtime. But how do you do that? Clearly on YouTube, it's not very transparent. How do they do their calculations? But now you know what, you want to pay ahead, because you can tell and say with five satoshis, I can watch as much as 20 seconds. So if the content is not interesting, I can quickly withdraw it's. Fantastic. And I somewhat agree again, because if you look at it, you would realize that you need to actually pay for the content you consume because somebody put together that creativity, they put part into it, they maybe wrote it down, they got props for it. Props can be expensive, but then you just see it on the platter and you don't pay for it. You haven't encouraged that person. In many case, people still plagiarize content of people that they didn't pay. Yes, it's all over the world. Somebody will create a content and because they don't have a big audience, a bigger influencer, so to say, would come across that content and blow it up in their own way. And that other person would have been plagiarized and may never, ever, ever get that support or that voice that will redirect the ownership of that content to that person. So if you will consume anybody's content at all there must be that upfront agreement. That's how I'm saying it. From a business case angle, there must be that upfront agreement whereby you don't have to read the terms and conditions. Maybe something you already signed up to get it into the platform or something you can just click over there and you pay for SATS just to preview. You can preview 5 seconds that we have right now on YouTube and you practically won't even feel it that you're paying for it. You can just pay, say, like we're saying military, but you know, when the millisecond is too much, you start to accumulate. Then you will realize that you're paying money. But I think it can be very interesting. And that is possible. Enlightenment. Both twelve. Starlink it doesn't have to be that major. I think somebody else can integrate both twelve and they can catch on for a particular region. Yeah, it really can't. Just imagine just imagine church and a church house may be redeemed Christian Church of God decided to check them out the Redeemed Christian Church of God is a big Christian community in Nigeria we have millions of followers and not online followers. I mean real life. If the church wants to raise a billion dollars a day just by taking offering all around a few branches. Thousands of branches. And they are well organized just imagine a QR code. That you don't have to replace. So all the goodies of both eleven. All the goodies. Everything that cure code can do. And now you can reuse it. That's renewable energy at its finest. At its finest. You don't have to expend any more energy. You just have it one time and inbox you can always get paid. So nice, so nice. Once it catches on is going to be fine for any other technology because you don't have to just imagine the integration of Mastercard, Visa card I think this is how Block Street is thinking. If they're not thinking like that, then they might be sleeping on a bicycle. But I believe they have fantastic people over there. They have fantastic people over there. Because this is the game over for mastercard and visa and quickly. This is how they would destroy their own future. But it will help them make some kick out of it. They will integrate first of all that's the bait bitcoin game theory if you will run to it mastercard and Visa will integrate quickly with both twelve. Maybe they have done with both eleven they already can see. So I think like what we said about portnaut earlier, the VIPs for Bitcoin chain, I think both such is represented in enlightenment. Maybe ports, I can tell us what's better, but I think this is the final game changer. And once Mastercard, Visa, card, American Express, Discovery, Union, Pay from China, all these guys finish their integration, the adoption will spread so much and people will see that, okay, your charges are too high. I think I want to go to the service that the charges are no longer high. And in a short period of time, new companies will step up to Mastercard and have 50 million users, 170,000,000 users, just like that. Because you can minimally charge people with just one QR code. You can go everywhere. I can just have my QR code with you for life. If you want to pay me, keep paying me forever and ever for whatsoever service. It's awesome. It's fantastic. I love it. And I agree, any organization, whether it is styling and both twelve block stream, it could be any small organization. It's a fair play. It's a fair play. Africa is a battleground overall for adoption. So let's see how we play that. We are right here. We are already taking our own market share. They will meet us here. ", + timestamp: '01:31:12-01:42:05', + topics: ['Starlink', 'BOLT 12'], + type: 'twitter_space', + weight: 4.388186931610107, + }, + { + boost: 0, + date: 1663791655, + description: 'Nunchuk implements Bip21 ', + episode_title: + 'BR006 - BestBuy stocks HW, Podcasting 2.0, COLDCARD, ETH Merge, ATEC608A, Mullvad VPN hardware & MORE ft. Odell, Bitsten & Pierre Rochard', + guests: [ + { + name: 'Pierre Rochard', + profile_picture: 'https://pbs.twimg.com/profile_images/1567258180861792256/EEEBkvQR_400x400.jpg', + ref_id: '426b30ba-7c24-4558-b926-ec307756a876', + twitter_handle: 'BitcoinPierre', + }, + { + name: 'Matt Odell', + profile_picture: 'https://pbs.twimg.com/profile_images/1421584695746338819/Z_7ZfAeP_400x400.jpg', + ref_id: '4f2825ff-3b88-4595-84d4-36e81544b79a', + twitter_handle: 'ODELL', + }, + { + name: 'Micheal Goldstein', + profile_picture: 'https://pbs.twimg.com/profile_images/1362578436665995266/yssI-4C__400x400.jpg', + ref_id: '1d5697ef-ac55-4685-9ee1-80d8d7c6c501', + twitter_handle: 'bitstein', + }, + ], + hosts: [ + { + name: 'NVK', + profile_picture: 'https://pbs.twimg.com/profile_images/608402052247658497/ENDv0BNd_400x400.png', + ref_id: 'd754e29b-2d3e-4280-8d72-f41d2a465a78', + twitter_handle: 'Coinkite', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/cd6b8d64-bd52-4f1e-86b3-ca8ba2eb169f.jpg', + keyword: !0, + link: 'https://anchor.fm/s/9500fad8/podcast/play/57914686/https%253A%252F%252Fd3ctxlq1ktw2nl.cloudfront.net%252Fstaging%252F2022-8-22%252F6271b859-79c4-08f7-d185-5b9264f98cfe.mp3', + node_type: 'clip', + pub_key: '', + ref_id: '67e86e10-e641-4eb7-a81f-0b7b2d204f4b', + show_title: 'Bitcoin.Review', + text: "let me just find here for Nonchuck, I have a small update here, but that's not a release. So they implemented BIP 21. Let me see if I can find their releases. I can't remember where they are. Oh, anyway, so they implemented BIP 31 21, I think. There is no recent software release yet, so wait for the next show to hear more about Nunchuck. ", + timestamp: '00:39:24-00:39:57', + topics: ['Nunchuk', 'Bip21', 'nonchuck'], + type: 'podcast', + weight: 4.412737994407362, + }, + { + boost: 0, + date: 1652745600, + description: 'Peter Lynch advices on value investment', + episode_title: 'Classic 14: One Up on Wall Street', + guests: [], + hosts: [], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/4bb9069b-a373-4b1c-9cda-024b2bf4dc84.jpg', + keyword: !0, + link: 'https://chrt.fm/track/E9BCD5/pdst.fm/e/mgln.ai/track/rss.art19.com/episodes/aa2cdb4f-7255-40fa-9c59-b21965561b76.mp3?rss_browser=BAhJIglSdWJ5BjoGRVQ%253D--b5256dfb3e291f0e61e613b6a95f6f144da168ba', + node_type: 'clip', + pub_key: '', + ref_id: 'a2b5f8c4-37aa-4931-951e-87416315eeab', + show_title: 'We Study Billionaires - The Investor’s Podcast Network', + text: "The first section is preparing to invest. So Steve is going to highlight a couple of things here with this. So one of the first things that Peter Lynch talks about in this section is that professional needs to follow rules and amateur doesn't. And this is actually a big advantage for amateurs. So let's talk about some of the constraints that professionals have. They can't necessarily buy what they like. And the thing is that most institutional investors, they buy big brand names. They're doing in partly because they have so much money that they need to employ. They can only buy Kali SMP 500. That's one reason. But also because being in asset management is also about not looking bad. And it's really easy to look bad if you're buying, for instance, small cap stocks. And he's actually talking about this saying apparently that was going on in the 90s on Wall Street saying you can never get fired buying IBM. And I just thought that was a really fun quote. I mean, this is true though. This is something that you see on the professional side, that so many of these guys just take this safe path that if they're wrong, but all their buddies are wrong as well, then it doesn't look nearly as bad. But if you go out and you do something that's just really off the beaten path and it fails, I mean, you're going to get slaughtered in this business. So that's a really interesting highlight. One thing that he says to cope with that as an amateur investor is to buy small cap stocks. And I think it's really interesting approach that he's having. I think it's both correct and also think it's wrong. So I think it's correct in the sense that you can definitely find many small cap stocks that might be interesting. They are not really analyzed by analysts, so you can find a lot of great value. But another thing is that we just talked to you too about before, that the way that this book is created is created as a beginner's book, like how do you find your first stock? And I would say that the worst thing you can probably do, trying to pick the first stock is probably to find a small cap business. So I can't feel that counterintuitive well. So expound on that stick. Tell us why you think that that's bad. Well, there are actually multiple reasons. One reason is that small cap stocks, there are less information out there. Another thing is that smaller companies tend to be more volatile. And if you haven't tried to invest before, you don't necessarily know what happens when your stock lose. Just say 5% and you definitely don't know what you're going to do if that stock drops. Call it 50%. And one more thing, which is really investor bias, is that people usually invest too much in a single stock the first time that they're investing. I can definitely testify to that. I think it would probably not be uncommon for someone to invest as much as 20% in just one stock. And that might be okay if you Warren Buffett. But if you're a new investor, this is the first stock you found this great small cap company because you read this book, invested 20% of that. I think it can be really dangerous for you to do so. Yeah, I want to add a comment to this as well. As far as I think that something that I think a lot of people need to think about is when you get into some of these smaller companies, they don't nearly have as much of a competitive advantage and enduring competitive advantage as some of the mid or large cap companies. That can be eroded rapidly, especially if you're in a company that's a tech company that's moving pretty fast paced, somebody could come along and just quickly erode whatever competitive advantage that the company has. And that's something that I think a lot of new investors aren't thinking about and don't necessarily understand the ramifications of how badly that could destroy the price that you paid in a really fast and rapid way. And another thing, and clearly this might also be case for bigger companies, but smaller companies typically don't have the same credit ratings, which means that they are more vulnerable, for instance, to interest rate risk. So there's a lot of things that you might not be able to see when you just read through the financial statements. But as you get more experience and you actually get to work with a lot of stocks, a lot of these things would appear more logic to you. So definitely not start up with small cap companies. This is how I'd like to summarize the small cap part, is, yes, there's more opportunity in small cap because you don't have the big players kind of necessarily operating down in them because they've got to move much larger sums of money. So there are potential opportunities there in the value, but it's kind of harder to play in that space if you don't know what in the world you're doing. So that's how I kind of balance the argument, is, yeah, you could have some upside there, but you really got to know what you're doing. Let's take a quick break and hear from today's sponsors. All those points and miles can feel pretty pointless if they expire or go unused every year. It's time to reboot your credit card with Apple Card. Apple Card gives you unlimited cashback every day on every purchase. It's real cash you can spend right away, however you want. No need to wait and wait to use. Apply now in the Wallet app on iPhone and start using it right away, subject to credit approval. Daily cash is available via an Apple Cash card or as a statement credit. See Apple Card customer agreement for terms and conditions. Apple Cash card is issued by Green Bank member FDIC. As inflation surpasses highs not seen in 40 years, the dollar's value decreases with every passing day. You're paying more at the pump, the grocery store, cars, and housing. Face it, your paper money is worth less. That's why I'm excited to tell you about my partnership with Boolean Max. Bullying Max will ship gold and silver directly to your door for you to hold at your home and your own safe. Buy direct from Bullying MAX.com without talking to a salesperson and your shipment insured precious metals order is shipped directly to your home. It's fast. It's easy. To help you get started, I worked out a special offer with them just for you. Get bullying max's Gold Investor kit Just go to bullying Maxcom. WSB. This kit includes 3oz of the world's most desirable gold coins, including the Gold, American Eagle, and Canadian Maple Leaf. This offer is limited to only one per household, so get yours now. Go to Bullyingmax.com wsbtoday. Podcasts can sometimes seem like it's just two people getting together and talking over a cup of coffee, but I can assure you there is a lot happening behind the scenes. To keep this show running smoothly, our head of operations imported all of our Disjointed work from different sheets and docks into Monday.com and provided our team total visibility. Monday.com is an intuitive platform that enables us to manage everything from advertising budgets to podcast, scheduling, and inventory, all in one place. To become a billionaire, you have to incorporate systems. That's why we use Mondaycom. It's the best place to make a customized system that works for you. Teams of any size in any industry can use Monday.com to build, run, and scale all of their workflows. With Monday.com, there's nothing your team can't do. Sign up for your free two week trial at monday. Compodcast. That's monday. Compodcast. All right, back to the show. It also seems like whenever you ring through this, that it seems like since the institutional investors can only invest in bigger companies, they seem to be more efficient. But that's actually not true either, because the interesting thing is that the big institutional funds can actually just pick and choose among the SP 500. They're actually restricted in a lot of ways. So some of them might be restricted in terms of waiting, in terms of the market capitalization. So, in other words, even though that some of the smaller, bigger companies might seem appealing, they might not be able to invest more in that, and nothing is even if they have the freedom to do so, they might not be allowed to, say, have more than 1% or 2% in any of the SP five or 100 stock. So even though it might seem like, oh, we're heavily tilted into a small SP 500, stock that's only way called it zero 5%. They're still constrained in many ways. So basically my point is that SMP 500 is not, as it might appear, a more efficient index just because they're big and just because everyone has access to the information. Everyone, even the big players, and especially the big players, are constrained a lot. So there's a lot of efficiency in that index as well. I know that clearly couldn't include everything in the first few chapters, but I think that's something that's extremely important for anyone starting to invest in both indexes and individual stock picks. So one final thing that I want to add to this section that I really like about Peter Lynch's writing is he says that stock picking is both an art and a science. And we've mentioned this on the show before, but I really like how he spells this out. He says that too much of either is a dangerous thing. A person infatuated with measurement who has his head stuck in the sands of the balance sheet is not likely to succeed. And if you could tell the future from a balance sheet, then the mathematicians and accountants would be the richest people in the world by now. And what he's really getting out here and this is what I like about his writing style and the book, the way he writes it. He talks about this qualitative feel of going out and walking through, testing out these different companies that he had personal experiences with that kind of gave him a tip off. But then he does get into the math and he talks about different multiples that he finds are appropriate to pay and at what times in cyclical stocks versus financial stocks or whatever. He gets into that and he talks about being originally tipped off through a qualitative means. And then he backed it up with quantitative research. All right, so now we're into the meat of the book. We're going to go into the second part, and this is called Picking Winners, which I'm sure everyone wants to hear about. So let's talk about this section. I thoroughly enjoyed this section and for me, this was the most interesting section also because he introduced the concept of ten bagger. And for anyone that's not familiar with the term ten bagger, that means that you will invest in a stock that you'll get ten X on, basically. And he guides people in terms of how do you find these companies, which is a very interesting discussion. One of the things that I would like to highlight here and also goes hand in hand with some of the things that Preston talked about the introduction is that he's basically saying here, literally, that the best place to look is close to home. And his thesis here is that where you are an expert, you can probably make the best qualities analysis. And I completely agree with that. I just think that it's very important that you don't confuse familiarity with expertise. And I just want to come up with an example here. If people are thinking about who is the best person to value my home, who is the best person to do that? I think a lot of them would say that's probably myself. Now, there have been a lot of studies about this, and it actually turns out that the worst person you can think of to value your own home, that yourself, because you have so much bias every time you look at your own home, that is very difficult for you to do. So and I think this really underlines the difference between expertise, which is actually what Peter Lynch is talking about, and then familiarity. He's basically saying here, if you're familiar with a product that you really like, then that is your cue to start your analysis. It's not your cue to actually invest in that company. So I think that's a good point. And in continuation of this, he comes up with this example. He's saying that he realized the huge success of Pampers, and he was saying that, okay, so I saw everyone buying Pembers. It was a great product. It has a wide mode. Should you buy that stock? Well, actually, Hampers was not really a stock because it was owned by Procter and Gamble. And if you look at even though it was a huge success, it was still less than 1% of the revenue of that company. So you probably shouldn't go in and buy that, at least not for that argument. It's the same thing you see here with Nintendo right now and with all. Those the Pokemon Go. Pokemon Go, yes. Thank you, Preston. You clearly have young kids. No, I saw you look up, and I was like, he can't remember the name of it exactly. It's the same thing because Nintendo had, like, soaring stock price whenever Pokemon Ghost came out, and they were, like, literally making no money of that product that time, which was a lot of fun. So I just think that's another example of if you have a really good story, it's not the same as you actually have a huge potential for monetizing it. So I guess my thing I want to ask you, how many times have you seen a person that you just get in a random conversation and the person says, oh, my, I got to go and buy, like, your example, Nintendo, this Pokemon Go thing, everybody in the world is playing it. And that was literally their start and the end of their analysis for buying a company, and that was it. There was nothing else discussed. Not only did they not look at the earnings and all the other pieces that would drive a potential price that you would pay. But they're not talking about that second point either of like. Okay. So that's one product in the whole product mix of the company that might make up like your diaper example. Less than 1% of the total revenues of the company. And the person literally just purchased the stock around that one idea that had less than 1% of the overall revenue. I guess for me, I've talked to enough people through the years to learn that most people are not big picture thinkers. And I think that when you see a guy like Peter Lynch, these guys can start with this really big idea, like, hey, this might be a great company. Then when they go and they assess the company, they start with the big picture. Okay, so how much money is this company bringing in a year? Okay, they're making $100 million. Okay, they're making $100 million. The product that I was first introduced to that kind of gave me the idea of looking at this company only makes up 10% of the revenue. So that's $10 million. Of the 100 million that they're bringing in, the margin on that thing that I'm looking at is 3%. So how much am I willing to pay for? They're picking it apart from big picture to small picture, and they're then saying, well, how much is that worth to me to pay to own that in a per share basis? And then they're making a very intelligent and thoughtful decision to own it or not own it. And I think another argument consideration of this person is that Lincoln in this section go through the traits of a really good stock. And like Warren Buffett, I think we probably mentioned this a few times on the podcast he's saying that the simpler, the better. And I don't want to brand myself as a big Nintendo Pokemon fan. It's not what I'm saying, but I'm just thinking something like that computer game, I guess you would need to reinvent yourself in a year, too. I don't know how long the computer gaming cycle is, but it's something to consider compared to, say, the Dunkin Donuts example. He came up with Dunkin Donuts. It's in a convenient location, at least according to Pilot Lynch. They make great coffee. They don't need to reinvent how to make a good cup of coffee. They don't need to reinvent a good donut. It's just not how that works. And it's something that you would do every day. It's something that drinking coffee has done for so many years and continues to for so many years. I'm not saying Nintendo is a bad company. I'm just saying that they probably need to come up with a new computer game, continue the success, basically. And this actually also takes me to the list of some of the traits of the perfect stock, which I found really funny and interesting. The first one was actually a boring name. I found that discussion pretty funny. I think there's actually also been studies about that, that if you have a really boring name because people don't want to tell that they own boring stocks, they usually do good. The boring stocks, spin offs, that's typically also something that's doing well. So on this idea, I want to read something. The greatest companies in lousy industry share certain characteristics. They are lowcost operators and penny pinchers and executive suites. They avoid going into debt. They reject the corporate cash system. Their workers are well paid and have a stake in the company's future. They grow fast and faster than many companies in the fashionable fast growth industries. Pompous boardrooms overblown executive salaries, demoralized rank and file, executive indebtedness and mediocre performance go hand in hand. This also works in reversed modest boardrooms. Reasonable executive salaries and a motivated rank and file. And small debts equals superior performance most of the time. And he really says a lot of the ideas that we see the Warren Buffets of the world and other really successful business owners and investors say is almost a common thread through all these books. So I wanted to throw that one in there because it totally relates to what sticks getting out here. Another interesting trade that Pelinda is talking about is he's looking at no growth industries. And I'll simply love this concept because every time you hear like a stock pitch or read an analysis, you'll be like, oh, this nanotechnology is growing by 50% or 3D printers are growing by 200% a year or whatever it is. And he's saying that that is not where he's looking. He is looking at industries where there are no disruptors because when there is no disruptors, there are very little competition and you have fewer expenses, basically, and you have higher margins. I just want to come up with one example. This was actually a type of investment I was looking into months ago that didn't pan out for one reason or the other, but the concept is still the same. I was looking at a landfill and you might be thinking, a landfill? That sounds like the most boring thing they ever heard about. But the thesis about this landfill out in the rural area in North America was that it has a lot of pricing power, it has a lot of monopoly power because who is going to build a landfill right next to a landfill? It really doesn't make any sense. Another thing is that if you have the chance to drive called 50 miles, 100 miles to the landfill is actually even though you can find a cheaper landfill called 500 miles away, it's still going to be very expensive for you because you have to pay for the gas to get there. So you have a lot of pricing power in that area because you have monopoly power. And believe me, there are no disruptors in this industry. If you have a landfill in the middle of a rural area, it's really, really hard to compete with that company. So I'm not saying that everyone should go out and buy a landfill. That's definitely what I'm saying. But I'm. Saying that's the way that Peter Lynch is thinking about it. I just wanted to bring up that example so perhaps everyone could get a better grasp of what he might have meant by that. So if you feel like you're ready to fall asleep because maybe you're talking about landfills or whatever with a boring. Name, preston, could you come up with an interesting name for the landfill? No. Right. It's bad and bad. If you're ready to fall asleep talking about the pick, you're probably starting in the right location. So now we talked about some trades of the perfect stocks and he also has some interesting trades in terms of the stocks to avoid. So one thing is that you should always dig into financial statements and see how they make the revenue and how that's divided into the different customers. And he's saying that he has a strict color of point with 25%. I mean, basically he doesn't want one customer to have more than 10%, but if it's more than 25%, it's usually a big nono. And I think you see that with a lot of companies, especially those companies that are heavily tied into the public sector. And you might think, well, it's public sector, it's stable, but guess what? Whenever there are new legislation and the public sector might be 80% of your revenue, like, we've seen multiple examples of this, you're just heading for big trouble. And I think that was a really good example that he came up with. And basically, I think that it's very clear whenever you're reading the book that Peter Lynch's foundation is really into value investing. Even though he talks a lot about ten baggers and he talks about grow stocks, he is really like it's a very core value investor. And he also has a really interesting section about hot stocks and new issues and why you should avoid that. So I think when you hear the term ten backer, it's not necessarily, how do I find the next silicon silicon Valley style up? That's definitely not what he's saying. He's actually saying you can get ten X if you buy undervalued great companies. Let's take a quick break and hear from today's sponsors. It's 04:30 P.m. In New York City and Wall Street's closing. Bell Rings you know what that means? Your portfolio has probably sunk a little bit deeper into the red, which means a few more sleepless nights and gray hairs. The data shows that this has been the worst start in 50 years. And Goldman Sachs warns that the best case is a flat lining portfolio. If you line up today's SMP chart with 2008, it's a mirror image. Except now we're dealing with 40 year high inflation and chaotic supply chains. So how can investors combat this mess? Well, I'm doing it with a safe haven asset, one that was available only to the billionaire class back in 2008. Contemporary art in 2008, the day after Lehman Brothers collapsed, the art market saw a record breaking auction to the tune of $111,000,000, showing that art still sells. And it's not just 2008. Contemporary art has outpaced the SP by more than double over the last 25 years. That's why I've been investing with my friends at Masterworks for the last year. They're offering fractionalized investments in the top of the contemporary art world, delivering an astounding 29% average net returns from the sale of just six paintings. But here's where it gets really good. When you sign up to masterworks. Comillionaires, you'll be entered to win a Rolex wristwatch. That's right, a Rolex could be yours for free just by signing up at Masterworks Combillionaires. See importantregulation a disclosures at masterworks. COMCD that's Masterworks combillionaires to enter to win a Rolex. Hey. So if you're like me protecting your identity and your information, these things are not top of mind very often. So you might be interested in something that's sort of an all in one encompassing platform, and that is a Vast. And they're new. A Vast One feature has everything you need antivirus data breach, monitoring, firewall protection, ransomware protection, PC speed up, smart scan, you name it. It's all there on one thing. So you don't have to have multiple platforms running on your computer at all times. And for someone like me, that is exactly what I want. Good news is that there's a free option to try out and get started, but there's also a premium version that has more advanced protection and allows you to protect multiple devices. My favorite part about a Vast One is the ransomware protection, which secures your personal photos, documents, and other files from being modified, deleted, or encrypted by ransomware attacks. So now you can confidently take control of your online world with A Vast One. It helps you stay safe from viruses, phishing attacks, ransomware hacking attempts, and other cybercrimes. Learn more about Avast. One at a Vastcom. All those points and miles can feel pretty pointless if they expire or go unused every year. It's time to reboot your credit card with Apple Card. Apple Card gives you unlimited cash back every day on every purchase. It's real cash you can spend right away, however you want. No need to wait and wait to use Apply Now in the Wallet app on iPhone and start using it right away. Subject to credit approval, daily cash is available via Apple Cash Card or as a statement credit. See Apple Card customer agreement for terms and conditions. Apple Cash card is issued by Green Bank member FDIC. All right, back to the show. So I want to kind of piggyback on that comment, because the thing that I find interesting about Peter Lynch is he will buy a growth company, or what we would refer to as a growth company, but he will buy it at the right price. That's an appropriate premium to pay for the growth that's occurring. So I want to read a short section here. Any growth stock that sells for 40 times its earnings for the upcoming year is dangerously high priced and in most cases, extravagant. As a rule of thumb, a stock should sell at or below its growth rate. That is, the rate at which it increases its earnings every year. Even the fastest growing companies can rarely achieve more than a 25% growth rate, and a 40% growth rate is a rarity. At the time I was researching this company, the PE ratio of the entire S and P 500 was 23 and Coca Cola had a PE of 30. So you can obviously tell this was written a long time ago. If it came down to a choice between owning Coca Cola, a 15% grower selling at 30 times earnings, and the Body Shop, a 30% grower selling at 40 times earning, I would actually prefer the ladder. And the reason that he would prefer the latter is because there's less of a margin between the growth rate of The Body Shop and the premium that was being paid at 40 times earnings. So I really like this example because he's getting into he's talking about growth picks for people out there that are growth investors digging. I really aren't. But for people that are and are interested in some of these ideas, I think the key point here is if you are going to pay for a premium, that thing better be growing like crazy in order to actually justify that expensive price that you're paying. And I think that's a really great highlight that he puts in his book. All right, so the final section we're going to cover is called The Long Term View. And this is some other great conversations for anybody that's just trying to get a good foundation for their investing approach. In this section there's a really fun chapter that's called The Twelve Silliest and Most Dangerous Things People Say about stock Prices. So we're just going to throw a couple of these out here and maybe add some commentary to some of his comments. So one that I really liked is if it's gone down this much already, it can't go much lower. And boy, I'll tell you, I've hung on to some pics that have taught me that lesson a lot of times over. So if you ever hear that phrase or you catch yourself saying that phrase, try to remember this from Peter Lynch's book, because it's a doozy. And whether it's higher or lower, it's all about understanding why is it going high, why is it going long, and what is the price compared to the value? And I think another argument here is that if you had invested in Peter Lenses fund with the day he took over, as we talked about in the very beginning of this episode, your $10,000 would have turned into $280,000. So a way to be thinking about this is that, well, I should probably hold on to this mutual fund for 13 years because my initial investment was $10,000. Well, you can lose it like that, but remember, you also took a conscious decision to stay in that mutual fund whenever that 10,000 turned into 50,000 or whenever it turned into 100,000 and so on. And the thing is a really interesting perception to have, because it actually goes the same way as if you're looking at a stock that can't fall any further and you're like, well, this stock used to be $10, but now it's $1. I'm only risking one dollars per stock. But, I mean, if you're buying for $10,000 and you're buying 10,000 stocks, it's the same thing. And I know from myself that it's very easy to get anchored on a stock price and not so much on your position for how many times I've. Heard people say, well, you know, it's a really cheap stock. I can buy more shares because it's a cheap stock. I have heard that so many times from people to the point where I don't even want to say anything because I feel like I'm going to hurt feelings or something like that with some people. I think as a person becomes more educated in investing and they hear that, it really tells you how little the person really understands what they're doing. Because whether a stock is $0.50 or, like Berkshire Hathaway, $200,000 a share, there is no difference in the fundamental assets that are beneath or that represent that share of ownership in the equity. So I know we're poking a little bit of fun, but it is serious. I would argue that a majority of people actually believe that and don't understand how wrong that statement is. And that's one of the points that Peter Lynch has here. The quote he has is, it's only $3 a share. What can I lose? Is the way he has it phrased. Well, I like this one because you hear this one a lot, too. When it rebounds to $10, I'll sell. And the person has already convinced himself from a psychological standpoint that they're selling when it gets to ten. There's really no reason why they're selling when it gets to ten other than it got to ten, which was a nice round number. Again, they're not digging into the fundamentals behind what represents $10 a share. Why would you sell when the market cap hits that? Is there something that hit a PE of 40 times earnings? Well, if that's your reasoning, then maybe that makes some sense. But if there's no analysis behind why you came up with that figure, that's kind of tied to a return, a percent of a return compared to where the market is at. I would argue you're making some really bad decisions on the way that you're buying and selling. Yeah, it really comes back to the financial behavior that you have in terms of anchoring. At least that's what they call it, anchoring. So if you bought a stock call it $10. That is the average price, or that is like the anchor price you have in your head. And you don't necessarily think about this person said, Why does it really happen? Why is it not $10 anymore? So that's why it's so easy to say, okay, when it rebounds, to call it $10 or whatever price I bought it for. If that's the case, then I'll sell. And then we just tend to forget the opportunity cost that I want with this, that you could probably invest in something that you might get a better return of. But it's like we put everything into small mental boxes, and it's really hard to say stock ABC was a really bad investment because I lost money. It's better to say I broke even, even though you haven't broke even, because it took you ten years to break even or whatever how long it took. So I want to put this in context. So let's say that in your local town, there's a hardware store that you want to buy, and let's say you have enough money to just buy it outright, and the hardware store makes $100,000 a year after all the employees are paid. That's how much money you would be able to keep as the owner. So a reasonable price to maybe buy would be a million dollars, because you get a 10% return on your money. So when you say, that a stock, I'm going to sell it when it gets to $10. That'd be like buying this million dollar hardware store. And then some random person comes into your store and says, I'd like to buy your store for $1.1 million. And you had told yourself in advance, if somebody comes along and offers me $1.1 million, I'm selling it. There's no analysis behind why you'd be willing to sell at 1.1 other than you told yourself you would sell at 1.1. Maybe your earnings are in $100,000 anymore. Maybe your earnings are $200,000, which means you might be able to sell it for $2 million. That's how you need to think when you're looking at one share of stock, is what's the earnings what did the earnings just go up to as the price went up? Maybe I can even make more money because the market is undervaluing it at $10. That's how a person needs to think. They always need to look at the profit versus the price versus the risk that's associated with it and treat it as if it's an entire business. One share is the same thing as an entire business. And that is so fundamental. To be successful in the markets is to always look at things that way. All right, so that concludes our comments for the book. We really like this book, and there's so much more that we could cover. Peter lynch is a fantastic writer. He keeps a qualitative and quantitative at the same time, and it's entertaining, which is a rarity when you get into investing books. So if you're a new investor and you're really trying to understand things and you're just starting out, I would tell you, go out and get one of his books and read it. You'll really enjoy it. There's Beating the street and then there's also one up on Wall Street. And both are really great books. So at this point in the show, we're going to take a question from the audience, and this question comes from Jordan Lee Smith. Hi there, Preston and Stick. Jordan Lee speaking from Birmingham, United Kingdom. Warren Buffett has said many times that when he was in his early days as an investor, he would bind to companies and stocks that were fair companies at wonderful prices, or cigar books, as he calls them. However, today, he now establishes that this approach was bad and instead invest in wonderful companies at fair prices. My question is, for an investor starting today, would it still be wise to follow Buffett's old methods of buying into ", + timestamp: '00:08:15-00:41:14', + topics: ['Peter Lynch', 'investment', 'small-cap stocks'], + type: 'podcast', + weight: 4.3581032986492785, + }, + { + boost: 0, + date: 1653624e3, + description: '[[Bitcoiners]] Defends Against Critiques ', + episode_title: + 'WHY ARE WE BULLISH SeedSigner MMA Fighter Kenny Florian Bitrefill CEO Sergej Kotliar ep259', + guests: [ + { + name: 'Bitrefill CEO Sergej Kotliar', + profile_picture: '', + ref_id: '62f3aab5-0adf-4268-85f4-58cd53d85e6b', + twitter_handle: '', + }, + { + name: 'MMA Fighter Kenny Florian', + profile_picture: '', + ref_id: 'f272bf4f-6d43-461e-b053-7f680568db5d', + twitter_handle: '', + }, + { + name: 'SeedSigner', + profile_picture: 'https://pbs.twimg.com/profile_images/1571221494927134721/FieppCOA_400x400.jpg', + ref_id: '31ac465a-d2db-4255-b52d-50a10937f80d', + twitter_handle: 'Seedsigner', + }, + ], + hosts: [], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/87cd8227-9464-45ed-8512-4e545d3812c2.jpg', + keyword: !0, + link: 'https://anchor.fm/s/11e95d20/podcast/play/52675132/https%3A%2F%2Fd3ctxlq1ktw2nl.cloudfront.net%2Fstaging%2F2022-4-27%2F268355760-44100-2-56b5b1e41dcf9.mp3', + node_type: 'clip', + pub_key: '', + ref_id: '4167618b-6ac6-403f-adcc-09716938e08e', + show_title: 'BTC Sessions', + text: "that are to some small extent. Right. They can raise it can be used for bad things. It can be used for crime, or it's a glorified Wall Street pet type investment that just gets people rich and so on. Or it kills the planets with the energy consumption and so on. I very often feel like Bitcoin is very often end up on the defensive. Like, oh, you know, it's not so bad with the planet. Some of it's renewable. Right. Analysis said that it was 99% last time. That's great. But I really feel like there are so many things that this thing of ours achieves. The same way that if you accidentally offend someone, if you start apologizing, it's just going to keep coming at you. Right. It kind of got me thinking a lot that we should really push Bitcoin not in a defensive. No, it's not so bad, but push it in an offensive and aggressive way. Look, here's the things that it gets done, and not just from the pushing narrative. I actually feel like we're the number seven largest currency in the world. We're not even the size of a small country. We're the size of a medium country. All right. Also Freedom Forum where there's people that are talking about things that are like very objectively good. Right. Undisputably. There's like nobody, no sensible person that's going to disagree with any of it. Hey, people in this and that country want democracy. Yes. I really think this is a big opportunity if we all sort of make an effort for it to really push, to make Bitcoin be a force, not just a tool. Right. It is already a tool. And that's great, but an actual force of making the changes in the outside world just by the wealth and power and utility that we've amassed in this community. If we figure out how to channel this really powerfully, I think that is the way forward. Not apologizing for things that are trade offs and explaining cost benefit and whatever. But look, it has certain costs. Here's what we achieved. Here's why it's worth it. The one who disagrees. They can do the weighing of the cost of benefits. I don't know. I have a lot of half baked ideas in my head, but I figured out this one here as well. I mean, currently the US of A is, I think, the most internationally generous country. But maybe it should be Bitcoin. I like the road you're going down here with the topic. You're right. ", + timestamp: '00:49:52-00:53:32', + topics: ['bitcoiners'], + type: 'podcast', + weight: 4.353698041567212, + }, + { + boost: 0, + date: 1616679600, + description: "Saifedean Ammous discusses gold stability and bitcoin's future", + episode_title: "Debating Professor Hanke on Bitcoin's value", + guests: [ + { + name: 'Hong Fang', + profile_picture: 'https://pbs.twimg.com/profile_images/1554126711502999553/EkTARSpF_400x400.jpg', + ref_id: '9adabc40-bbc7-44aa-8a11-c139f3697f80', + twitter_handle: 'hfangca', + }, + { + name: 'Saifedean Ammous', + profile_picture: 'https://pbs.twimg.com/profile_images/1362635264158552067/CSsOKrBd_400x400.jpg', + ref_id: 'a61d4df9-1db4-4bdc-a7e9-a4c99268e59b', + twitter_handle: 'saifedean', + }, + { + name: 'Professor Steve Hanke', + profile_picture: 'https://pbs.twimg.com/profile_images/915395033871867905/3zbE7bAT_400x400.jpg', + ref_id: '4a754eea-7f67-46d0-b4d2-f0aa58aba36e', + twitter_handle: 'steve_hanke', + }, + ], + hosts: [ + { + name: 'David Lin', + profile_picture: 'https://pbs.twimg.com/profile_images/1494034862688411662/PnegVyJF_400x400.jpg', + ref_id: '4aa21d3b-afe2-434b-a77c-79dba268a23d', + twitter_handle: 'davidlin_TV', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/5cdd0aef-f1a7-4d3b-8336-7f81c2db4a40.jpg', + keyword: !0, + link: 'https://www.buzzsprout.com/1849151/9671311-debating-professor-hanke-on-bitcoin-s-value.mp3', + node_type: 'clip', + pub_key: '', + ref_id: '5e1c63cb-adb2-4e52-a529-324dcb9d6632', + show_title: 'The Bitcoin Standard Podcast', + text: "have one final topic that I like to address. I just need to make one small answer. Move on. Jastrum's book, the golden constant. Gold developed the most constant value over time, and did that for centuries as discussing that book. But you look at gold's supply, it also didn't have a currency board. It also didn't have a monetary policy where somebody was practicing monetary supply in order to stabilize the price of gold. In fact, what gave gold that stability was the fact that it had the lowest least elasticity of supply response to demand. Gold is the one good whose supply increases the least every year because it doesn't corrode. So gold that has been produced over thousands of years is accumulating. And so marginal production is always very tiny, because marginal new production is always tiny compared to the stockpile. That's what gave gold its stability, because its market is predominantly a monetary market and very little demand for industry and very little impact of mining. So bitcoin actually improves on that because it has a terminal growth rate of zero. So it should actually, in time, become better gold than gold in this regard. And I think volatility is going to be with us for a while because bitcoin is still very small, and it's going to grow. But I think before we get to the point where we can use bitcoin to buy our coffee, we need there's an enormous stage to cross first, which is people need to build cash balances in bitcoin so that they can trade other goods with bitcoin. But we're nowhere near that. The total amount of cash balances in bitcoin are less than 1% of total cash balances in the world. But as it grows, I think we're going to see more of that. So I think from now on to the point where you can buy your coffee with bitcoin, there is an enormous, enormous opportunity of essentially a new asset monetizing that could eat up bonds and could eat up all kinds of other stores of value that people are using. So you'll get your stability to buy coffee at a price of bitcoin, maybe $1 million or $5 million. So you're welcome to sit it out and wait out until then, or you can buy bitcoins. Now, speculating on the fact that this is going to happen, and if you are correct, it will be massively rewarding ", + timestamp: '00:43:56-00:46:16', + topics: ['Gold stability', 'bitcoin stability'], + type: 'podcast', + weight: 4.35361862182618, + }, + { + boost: 0, + date: 1649206290, + description: 'How Bitcoin affects small business owners and migration?', + episode_title: 'E34: Cory Klippsten on Building Swan Bitcoin, Angel Investing, and the Lightning Network', + guests: [], + hosts: [], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/b6c52903-5124-43f4-8632-bc9aeb941f2e.jpg', + keyword: !0, + link: 'https://anchor.fm/s/71a8cc78/podcast/play/50175964/https%253A%252F%252Fd3ctxlq1ktw2nl.cloudfront.net%252Fstaging%252F2022-3-6%252Fcbaa049f-6ea6-b67f-24ed-63b1a824b7b2.mp3', + node_type: 'clip', + pub_key: '', + ref_id: '1df5002c-3c8a-42db-960a-2a35a6596b63', + show_title: 'The Kevin Rooke Show', + text: "Do you think now that we have what seems like more freedom to move around and I guess lower switching costs for workers. You can kind of like move between cities and states more freely as work kind of transition online. Do you think that is a catalyst that these governments can use to introduce new experiments and new business zones and new tax cuts and add in Bitcoin as a balance sheet to strengthen their balance sheet? Yeah. First of all, being able to have health care without an employer. Say what you like or don't like philosophically about single payer health care or what is it, the ACA that Obama administration pushed through. But that's been dramatically good for small businesses and small business owners and entrepreneurs. Being able to still have health care without having to be an employee. I think we're still seeing an unlock of productivity and creativity and entrepreneurship just because people can get insurance and you can have a wife with cancer and still be able to get insurance like that. I think say what you like about wanting health care to be a free market, but the good thing is that people can take on a lot more risk because they're not just hamstrung by employer provided health care. And then you've got this remote work thing where people don't need to meet in person anymore. People are so used to closing big deals and signing up for services online now without having to meet somebody in person. That means you really can just pick up and live in Coeur d'alene or Lake Country up in Minnesota or maybe you just love the Florida Keys and want to be in Margaritaville every night, but you can roll out your laptop during the day just enough to get some design work done. Like you can do that. It's just fascinating. It's a great time for that. I was just actually talking this morning. One of my wife's best friends out here is an actor and she has, thank God, switched over from retail as the way that she supports and kind of gets to auditions and does that whole thing to working and marketing from her laptop. She works for companies in San Diego and Orange County and she can do it on her own time. She can miss 6 hours from twelve to six to go to a couple of auditions and then work from 06:00 p.m. To midnight. And that's totally normal now. And she can get paid like a normal middle management, senior management type salary while still being flexible enough to continue pursuing her acting. And that's true of so many people that want to pursue coaching basketball. We've got somebody on our customer service team who's like a high school coach in a Midwestern state and he does customer service stuff in the morning and then after he gets his kids to bed, he does like a couple more hours of cleanup at night. But the whole middle of his day is doing his passion love it. Do you think that we're going to see we've already seen in the last couple of years a decent amount of migration within the US between different cities, also outside of the US. Internationally? Do you think we see more migration in the coming couple of years than the last two, or do you think we kind of like revert towards the mean and get back to a normal. Yeah, I think we're at mean reversion time, probably. Yeah. Interesting. Yeah. I mean, I think if you moved to Austin after 2019, you bought the top. It's not that much different. San Francisco. There's plenty of bombs in the traffic stocks. It is awesome that there's a high density of bitcoiners, though, so that is a huge bonus. And I got a lot of friends out there. But, yeah, I think, again, you just got to go, like, where you're comfortable. We've got people in Idaho and Montana, but we got people in Manhattan. And I live in the burbs of Los Angeles because I like the weather. It's the only warm, dry coastline in the history of the most powerful nation in history. Maybe it's worth the sunshine tax. I could go without some of the policies around here, but it's sunny right now. I like it. ", + timestamp: '00:40:38-00:45:17', + topics: ['small business owners', 'migration', 'migration'], + type: 'podcast', + weight: 4.352794708248209, + }, + { + boost: 0, + date: 1586303100, + description: + "Guy's Take: Discussion on why smaller blocksizes force creative thinking around privacy and the need for Layer 2 solutions", + episode_title: + 'Read_375 - A Match Made in the Whitepaper - Treatise on Bitcoin & Privacy, Part 1 [Giacomo Zucco]', + guests: [], + hosts: [ + { + name: 'Guy Swann', + profile_picture: 'https://pbs.twimg.com/profile_images/1401969630634196995/DqOuszMi_400x400.jpg', + ref_id: '39c31930-d799-40a0-9a46-193117d03418', + twitter_handle: 'TheGuySwann', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/9e7e229f-2631-4542-b5d7-7fcd502798dc.jpg', + keyword: !0, + link: 'https://traffic.megaphone.fm/CSN5990505715.mp3?updated=1627942852', + node_type: 'clip', + pub_key: '034248fa888690a85021cf117c168a535c53b92e1fdf3e4f9cefddfe09118d8207', + ref_id: '7ef1c3a7-3028-4a9d-a012-82a61645ecb4', + show_title: 'Bitcoin Audible', + text: "point for this was that making the block size small actually forces us to aggregate as much information as possible to take data off of the chain, which is the current way to best de anonymize someone's history or someone's transactions and of course connect it to the rest of their transactions, the rest of their history. And that is one thing that I've talked about numerous times on this show, but that always keeps coming back, is that the layer two technologies may very well be just by the nature of how they scale, how they have to scale. They provide scalability by removing data from the time chain, by not having to put data on the chain. In doing so, you necessarily get privacy from the typical vulnerabilities of observing the time chain, of observing the bitcoin system, and it trades chain analysis, chain analysis with network analysis, which is much harder, much more obscure, much less the specifics are very very hard to pinpoint. And because Lightning network, just as the example of our layer two that's already working pretty amazingly is that everything is onion routed by default. So inherent to the system is a huge degree of privacy that's a benefit over the time chain, over the base layer. And I think that's going to be a massively, massively undervalued benefit to the lightning network that people are just not properly accounting for or realizing, I think. ", + timestamp: '00:42:35-00:44:29', + topics: ['small block size', 'take data off chain', 'layer 2 scalability'], + type: 'podcast', + weight: 4.347929239273071, + }, + { + boost: 0, + date: 1653436800, + description: 'Michael Atwood on the future of payments in terms of bitcoin over the next year', + episode_title: 'Small Businesses Embracing Bitcoin w/ Michael from Oshi App - Voltage Twitter Spaces', + guests: [ + { + name: 'Michael Atwood', + profile_picture: 'https://pbs.twimg.com/profile_images/1362207977470521345/Jy2_Ge60_400x400.jpg', + ref_id: '16359ade-afb9-4a37-be0b-0844a6134327', + twitter_handle: 'Dooowta', + }, + ], + hosts: [ + { + name: '@voltage_cloud', + profile_picture: 'https://pbs.twimg.com/profile_images/1508657900486422529/Lfa70poj_400x400.png', + ref_id: '3b622187-60ce-43c2-a21f-ae749c2d961a', + twitter_handle: 'voltage_cloud', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/2ec62250-4755-4616-8342-096a2cfab95f.jpg', + keyword: !0, + link: 'https://www.youtube.com/watch?v=kMDSsyAEvd8', + node_type: 'clip', + pub_key: '', + ref_id: '3d451e38-8616-43bc-8269-c3b8ce7d9b15', + show_title: 'Voltage', + text: "if there's any small business owners in the audience maybe that are not in the know on bitcoin, I'm sure most of you are throwing emoji up. I would love to see if there's anyone here kind of learning about bitcoin for the first time in some farms. We're going to be inviting some people up here at the end for some questions. So I'll leave that request pending here and we'll pull you up. But Michael, where do you see, I guess just moving forward, where do you see payments going in terms of bitcoin over the next year? There's obviously a lot of these altcoins scams and things happening. Like the tether is losing value apparently this week I haven't read too much into that. The Luna and Terra blow up, rehypothecation rates going down in D five. There just seems to be all these problems. Is that impacting and creating confusion for small business owners and these newly bitcoin adopters or what do you think on that? How is that impacting the market. In terms of the downturn in the market and that implosion of Terra and all that stuff? Most business owners have no clue that it's even going on. I haven't really noticed any change in that whatsoever, which is funny. It just goes to show, like they're busy running their business. They're not sitting here paying attention to all this stuff like we are because we're enamored by it and we're in the ecosystem. They're just trying to run their business. I don't know what the second part of the question was. Yeah, just in general, some of that has made like local news headlines in Denver and my wife's, mom and dad are asking and other people just kind of say, like, what is this? How does this affect me? But that's good. Yeah, I think small business owners are typically working more hours than just a w two worker. They have a lot more on their shoulders they're having to manage. So they're probably less tuned into some of that stuff. Yeah, for sure. It's really difficult, even though it takes just a few minutes to get businesses set up and ready to go, even, like to train our staff, it doesn't take long just for them to find some time to do it because it's not exactly on the top of their list of priorities. Right. And so tomorrow, or, sorry, Saturday in Rockdale, which is home to the biggest bitcoin mining farm in North America, to my knowledge, there's a guy named Brett, he owns Brett's Backyard Barbecue. So I'll be going there tomorrow to get him set up to accept bitcoin because on Saturday they're having like a big event there and everyone's going to be able to pay with bitcoin. And it's only going to take me a few minutes to get him set up. But he's a busy guy. He's one of one of the best barbecue joints in Texas. He's the soon to be mayor of Rocktail, Texas, and he's going to be the first legitimate bitcoin mayor. That's pretty cool. That's ", + timestamp: '00:06:37-00:09:44', + topics: ['Bitcoin transactions'], + type: 'youtube', + weight: 4.330187141144266, + }, + { + boost: 0, + date: 1665118800, + description: 'What is the correct size of a State', + episode_title: 'Breaking Away: On Secession and Small States', + guests: [], + hosts: [], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/6ec51741-3d93-4116-a619-d62a7cee1feb.jpg', + keyword: !0, + link: 'https://dts.podtrac.com/redirect.mp3/cdn.mises.org/102-radiorothbard-20221007.mp3', + node_type: 'clip', + pub_key: '', + ref_id: 'be782fc1-f095-4012-8711-f27a9cbb4e8b', + show_title: 'Radio Rothbard', + text: "you don't have to remind me afterwards that the correct size of state is zero and it's nothing that we're against it. I agree that's the end goal. But and moreover, these political entities, communities, policies, don't even have to be organized as states, right? Historically we have political communities that aren't states at all. But that's all topics that I've covered in other talks or will in the future. So for now, let's just stick to talking about states, the status quo situation where we're just trying to move away from. We're trying to take the next step and really just find ways to break down the power of the ruling state elites by removing some territory, some populations from their iron grip. And the reason we have to address the issue of the size of states is because many people do believe, in fact, that bigger is better. They like big states and want to keep them that way. They believe that larger states are essential for economic success, for peace, for trade. And then there's another group of people who think that size doesn't matter at all, that they think that every problem of conflict within a political jurisdiction can be dealt with by democracy. Just let people vote. And there is no need for people to have any sort of political independence or a policy of their own at all. They'll have elections and everything will just work itself out. People who believe that they're going to be difficult to convince on secession and of course, the states themselves, they're agents. They oppose secession because states want to be big. Being big and getting bigger is an important goal of every state. It's part of state building. They want to consolidate power and exercise, increase their taxable population. What we want is the opposite of that. We don't want state building, we want state unbuilding, we want state demolition. And so this is a process that we can, I think, use. And for many people in the public, the idea that bigger is good, or at least that size doesn't matter, does in fact, have its limits. For example, most people already have in their minds some upper limits as to the correct size of states. To see this, simply ask a person if he or she wants to live under a single global state. Most people not all, but most. I would suggest a sizable majority of people in the world would be opposed to this. Most people, just from casually observing the world, have a sense that putting global governing power in the hands of some distant elite from a different culture on a different continent, that speaks a different language, might not produce optimal results. On the instinctive level, then, many people recognize that something more local is necessary partly because of this instinct. Radical decentralization in the form of many diverse states historically has been the norm throughout human history. Even in the days of the Roman Empire, which viewed itself as having universal jurisdiction, the Romans never subjugated the Persians. The tribes of northern Europe, the kingdoms of sub Saharan Africa. They didn't even know about the Americas. So even in the age of huge empires the world was still decentralized. It's never been ruled from a single place. Yet ignoring all this, many people continue to insist that adding a new country or a large group of new small states to our already existing large number of countries would bring anarchy. Everyone who's read a serious book on international relations already knows that the world is already in a state of anarchy. Though it's already accepted fact that the international system is anarchic. There is no final arbiter of law or policy internationally. There's no global monopolist. And so creating anarchy is hardly a danger. It's already here. We already live in the system. The question is what are the size of the subunits in? It ideally down to super local level but it's obviously not at the global level right now. So how many independent policies should there be? How big should they be? That's probably the harder question that you can have to endure because a lot of people choose larger. But I'm going to suggest to you here that smaller is in fact better in most cases. After all, thanks to status quo bias, many people seem to believe that we've somehow magically arrived right now at exactly the correct number of states and they're all currently the right size. Also, the UN has explicitly said as much among the international lease it's basically been dogma since 45 that the world's existing borders as they have currently been drawn shall never be moved or changed. The doctrine of territorial integrity basically dictates this. And so the international community likes to preserve borders as they are and forever. There are exceptions but approved secession, as in the case of Kosovo's de facto secession, right? That sort of thing is only encouraged by the establishment when that sort of secession serves the interests of certain great powers and their allies. So for the most part it's very much frowned upon. So if we're in the thankless job of promoting secession, we have to make the case that smaller and more numerous states are in fact better for the world. From the perspective of enhancing freedom and free markets we can see three key ways that smaller and more numerous states are better and we can also look at some of the empirical evidence and the actual historical experience while we're at it. So number one the first reason that smaller states are beneficial is that they offer more opportunities for exit. This in turn makes states more inclined to respect property rights whether they ", + timestamp: '00:03:16-00:09:38', + topics: ['State'], + type: 'podcast', + weight: 4.443824941783508, + }, + { + boost: 0, + date: 1675982745, + description: 'The 300 kb limit for Bitcoin blocks', + episode_title: 'CD89: Open Source Week Party Rip at Bitcoin Park with NVK, Vivek, Paul, Tony, and the Bens', + guests: [ + { + name: 'NVK', + profile_picture: 'https://pbs.twimg.com/profile_images/608402052247658497/ENDv0BNd_400x400.png', + ref_id: 'd754e29b-2d3e-4280-8d72-f41d2a465a78', + twitter_handle: 'Coinkite', + }, + { + name: 'Vivek', + profile_picture: 'https://pbs.twimg.com/profile_images/1386020558069026816/GvPjQySx_400x400.jpg', + ref_id: '742d5011-6af1-4004-b4e8-57959614b4b5', + twitter_handle: 'citadeldispatch', + }, + { + name: 'the Bens', + profile_picture: 'https://pbs.twimg.com/profile_images/1386020558069026816/GvPjQySx_400x400.jpg', + ref_id: '55580f1d-310f-47c4-9a07-2c0a4ec19ca7', + twitter_handle: 'citadeldispatch', + }, + { + name: 'Paul', + profile_picture: 'https://pbs.twimg.com/profile_images/1386020558069026816/GvPjQySx_400x400.jpg', + ref_id: 'b150b9d0-c3c3-435d-b457-a86c335c2586', + twitter_handle: 'citadeldispatch', + }, + { + name: 'Tony', + profile_picture: 'https://pbs.twimg.com/profile_images/1386020558069026816/GvPjQySx_400x400.jpg', + ref_id: '8293895d-c43c-4777-a282-d873de069fd1', + twitter_handle: 'citadeldispatch', + }, + ], + hosts: [ + { + name: 'ODELL', + profile_picture: 'https://pbs.twimg.com/profile_images/1421584695746338819/Z_7ZfAeP_400x400.jpg', + ref_id: '6981a34b-301a-45f1-8299-59a3f719f6e2', + twitter_handle: 'ODELL', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/a09a2c49-84f1-4d0b-b150-6e6103f4ee41.jpg', + keyword: !0, + link: 'https://anchor.fm/s/45563e80/podcast/play/64795761/https%253A%252F%252Fd3ctxlq1ktw2nl.cloudfront.net%252Fstaging%252F2023-1-9%252F311995738-44100-2-29ea6a9620c7d.mp3', + node_type: 'clip', + pub_key: '03a3451db4748e483d2e1ee5d0b3a6872253253b57edf4b084a56952b432a224b3', + ref_id: 'e7094410-4a3e-43ce-8454-3eee9565878e', + show_title: 'Citadel Dispatch', + text: "So where do we want to start? What do we want to talk about? This goes straight to 300 kilobyte blocks. You want to talk about 300 kilobyte blocks? It's never going to happen. We are starting UASF tomorrow. We have hats. What's the compelling argument for it? I know what the compelling argument is, but you want to give yeah, you can. An overview and the Em radio kind of thing shortwave. Well, no, I mean, I think the real argument is they're small. The real argument is when we increase the block size to essentially four megs, we should have been operating under the assumption that blocks would always be full. That's the only safe assumption. Of course they're going to be full, but instead, in the meantime, we've just had relatively empty blocks consistently. And now that they're full, everyone's like, that's crazy. That's too much of a burden on my node. But the real question should have been when we increased it in the first place, would it be a burden on nodes or would it not be a burden on notes? Right. When they changed it? Right? Yeah. Big blockers were all like, where's the block? Exactly. That's what I'm saying. So the argument for 300 KB is like, if you don't like big blocks, then let's make them smaller. Right? Yeah. Well, full blocks. Well, they'll always be full if it's. At 332 megabyte blocks and then satoshi. Down into 1 original sin. The original if you talk to the. Big blockers, thank God we don't have 32 meg blocks. That'd be fine. Well, one plus side of that is that the Raspberry Pi Fetish would have never happened. No, not in a box. How do you feel about Raspies. Razor. Is as the supply chain restored and. They have the most close source, most awful company as a chipmaker. If you have 32 megabyte blocks and then you have this set up with Segwood or Taproot, then you'd have like 128 megabyte blocks, right? Well, yeah, it depends on how you're going to look at it. But if you did all this V by Shenanigans yeah. That would be for normal. Well, provided the discount would be the same. Right, because maybe we use a different discount formally. Yeah. But if we used all the same. Yeah, it would be just 120 minus the coinbase witness and all that stuff. 32 bytes or something. I don't know. Ben is the one that should know this thing. That's too dead. Right. I think that people weren't expecting actual four megabyte blocks. It was always like, well, in theory, if somehow we had only witnessed data in the block, it would be four megs, but no one thought that would happen. I mean, thankfully, now we have Dick. Butts filling the blocks. It fixes all the FUD. About threeway missions, full security budget. We're going to be secured by monkeys. Now, more than the storage stuff, though, the stuff I personally cared about even back then was IBD. That was like the big issue. But bandwidth isn't like the biggest restriction on IBD. Normally it's like validating everything, which is CPU. True. Unless you're going through Tor and then thinking that. How much drive space do you need for one year of four megabyte blocks? Somebody did the math. Like just average. Four times 144. Drive space is definitely not the issue. Well, there's one issue, which is like, there is a threshold of price change on SSD drives. Right? So I think right now the commodity sort of like SPAC that China puts out is 1 TB drives. Sorry, actually the Philippines does those drives anyways. And once you go to two or four terabyte drives, the price is completely different. It's not just like double the price kind of thing. I can't remember which one is the one that's the standard right now. I think I saw a tweet from Stephan Livera that said it went from twenty eight cents per gig or something like that to now $0.03, something like that. Yeah, but that's only for the main size that you get with all the shit books. Hold the mic closer to your math. Yeah. Like that. So whatever is the drive that is the standard for most things, that's going to be the drive that has that price. As soon as you deviate from that one specific model that everybody gets. He was talking about just a Samsung like typical whatever model, like 870 Evo. It's probably like 1 TB. Exactly. Yeah. But then 1 TB is probably not enough anymore, right? Yeah. So now you have to go to two terabytes. That's going to suck for everyone's. Raspberry Pi's right now, that's going to suck for a lot of people once we hit that threshold. Good. It's just a reality. Well, we can soft fork the size down. It's very easy. Or just let them have Prune nose. How far are we from 1 TB? You just randomly talk to that. Are we like 700gb already? No, it's like 600, I think. Okay, that's going to change very fast. How much was TX index, the inventory fact filters, all that? Like where we at with all the good shit? I don't know. I mean, technically you only need about 300 blocks to be safe. Yeah, that's the math. Well, no, you should have 216 or 2016, like the difficulty adjustment period. I just did the math. It's 210gb a year. If you have four megabyte blocks all year. Okay, the block ", + timestamp: '00:06:35-00:12:39', + topics: ['Bitcoin', '300kb block size'], + type: 'podcast', + weight: 35.542531998953606, + }, + { + boost: 0, + date: 1667658156, + description: 'Bullish about merchant adoption through Lightning network and The Bolt Card', + episode_title: 'WHY ARE WE BULLISH? HodlSolo, James Dewar, Christopher Gordon, Peter Rounce ep302', + guests: [ + { + name: 'Peter Rounce', + profile_picture: '', + ref_id: '0f59ce14-c4c9-49a3-9ff1-2d4051931a19', + twitter_handle: '', + }, + { + name: 'Christopher Gordon', + profile_picture: '', + ref_id: 'b4b8fac7-00ae-423d-b22e-e1ecf079bb5d', + twitter_handle: '', + }, + { + name: 'James Dewar', + profile_picture: 'https://pbs.twimg.com/profile_images/1092486738814078978/WxYQsqYo_400x400.jpg', + ref_id: '960d2bf1-17e6-4821-a041-4a1283ef0bce', + twitter_handle: 'IndigoFast', + }, + { + name: 'HodlSolo', + profile_picture: 'https://pbs.twimg.com/profile_images/1526883855742943233/WE19hgdQ_400x400.jpg', + ref_id: '93734db0-ad98-41ef-8548-5b3868edc23f', + twitter_handle: 'HodlSolo', + }, + ], + hosts: [ + { + name: 'Ben Perrin', + profile_picture: 'https://pbs.twimg.com/profile_images/1181715113226596352/ipGVEcYH_400x400.jpg', + ref_id: 'e6b013ef-178b-4b41-95ee-423148a3dc3a', + twitter_handle: 'profbenperrin', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/419512c2-e309-4b25-bfe2-cd481d53f66d.jpg', + keyword: !0, + link: 'https://anchor.fm/s/11e95d20/podcast/play/60115562/https%253A%252F%252Fd3ctxlq1ktw2nl.cloudfront.net%252Fstaging%252F2022-10-5%252F295093647-44100-2-15ee570c17e32.mp3', + node_type: 'clip', + pub_key: '02545c14cbb18a61f20dd45f5e3dcbd9acae3de282369501040adce32a75311309', + ref_id: '98a90a75-7ec6-412a-b5a0-dca009985290', + show_title: 'BTC Sessions', + text: "everything. Guys to the moon. Exactly. But we're super bullish about merchant adoption. As I say, for those who don't know who we are and what we do, we're bridged a bitcoin and we onboard merchants to accept bitcoin payments in the UK, although we're looking at seeing what we can do internationally to help people to help our bitcoin brothers and sisters abroad. But we're mainly based in the UK at the moment. And why are we bullish? Well, I'll take you on a little journey through the bitcoin space, sort of my little journey as to why I'm bullish. So most of us on the call hopefully know about bitcoin if you're not you'll know soon. It's the hardest sound money there is. And when I heard about it, I was like, wow, this is amazing, this is great, this is fantastic. But I can't buy coffee with it. This is a shit. Yeah, it's great if I want to move large amounts abroad and stuff, but it's supposed to be a peer to peer digital cash and other than send large quantities abroad, I can't go down the shops and spend it. That wasn't so great initially, but there was a turning point, and for me, the first turning point was the Lightning Network. So I think it was in 2015, the Lightning Network paper was written and first transaction was 2017. And then we had the Lightning Torch in 2019 and that's when things started taking off. And for me, that was the first turning point, the Lightning Network and the development of the Lightning Network. So, for those who aren't familiar with the Lightning Network, because there appear to be quite a few bitcoiners who don't know about the lining network, what the Lightning Network does is you can transact or you can send bitcoin on the Lightning Network, which is a second layer. We think of bitcoin as the first layer. The Lightning Network is a second layer built on top of bitcoin, and you can transfer bitcoin on the second layer at near zero transaction fees. So if you're moving small amounts, it's great. There are fees that hike up the larger the amount you transact. But if you're doing small transactions, like buying a coffee the fees are tiny, they are negligible. And on top of that, with the Lightning network, it's a near instant settlement. So for those who don't work in the retail sector, if you are a merchant, when you accept a payment system through traditional payment rails, that payment is not settled normally for a few days. The final settlement might not happen for two or three days. Visa or Mastercard might not clear that payment for two or three days. So within that period, they might turn around to you and say, actually, that was a fraudulent transaction because that card or whatever, that was a stolen card. So we're going to charge that back to you. So sorry, you gave away whatever it was. You sold that helmet for $100 and you're not going to get it. You've lost the helmet. So speak to your insurance company. With the Lightning network, it's near instant settlement. And I say near instant because it might take a few seconds, but it's final. Near instant and final, so you have no chargeback. So just those two things on their own are fantastic. So that was a real turning point for me. Now, the second turning point for me and for us was earlier this year when we formed Ridged a Bitcoin with James and Simon. And that's what Coin Corner and to a certain extent what Jack Mallards would strike are doing. But certainly for us, it was Coin Corner. Now, they released what they call the bulk cards. And that's a contactless bitcoin debit card and a there's big sort of for all about it. And I was like, oh, this is amazing. This is great. Now I can tap and pay. And if I'm honest, I was a. Bit poop poohy about it. It was just like, we've got that technology about it. Bitcoin is supposed to be cutting edge, but we're using technology accessory. I don't get it. We're using QR codes now, that's new. So I was just like, I don't get it. I don't know why everyone is so excited. But what got me excited was the merchant app that they released to go with the bulk car. So for those who aren't familiar with Corn Corner do is they allow customers to pay with Bitcoin and the merchant can choose to accept that bitcoin or at point of sale, they can flip it straight into the local currency, bit euros or pound sterlings and hopefully other currencies, as hopefully they extend into other countries soont. A small request. Coin corner. Danny mommy. So that's fantastic because now businesses, if they don't want to have bitcoin on the books or the balance sheets, they don't have to they don't have to hold onto it. Let me put it this way. Some merchants don't want to have the volatility. They don't want to experience that. So that suddenly, for me, opened the doors to a whole load of merchants. So from our perspective, when we now go to businesses or business comes to us. The conversation piece is not the initial conversation piece is not about bitcoin, it's about this fantastic new payment rail that they can start using because they don't have to hold bitcoin on the books or the balance sheets. Now, if you're a toxic maxi, you might turn around and just go, what the hell are you doing? They're not real bitcoin and so they're not holding the bitcoin. But for me, that is the start of their journey and they're adding to the liquidity of bitcoin and the lightning network, and that's really important. They're contributing to the space and it's an interesting journey. So we had an interesting so we've onboarded one of the pubs that we're mainly James, thank you very much. James onboarded a pub in London called the Georgian Dunsha. Head down that's in by the river, anyone in London, and the owner has two pubs, and we set him up the first pub just outside of Renting, and he said to James, right, I want to flip the bitcoin I receive into pound sterling. Yes, no problem, that's great. And then James and I went along to his pub in London a little while later and we set him up with all the point of sale devices and made sure it was all up and running. And without prompting, he turned around to us and he said, this bub, I want to hold the bitcoin, I don't want to flip it. And as I say, that was without prompting. And that sort of illustrates the sort of soft power of opening the door to merchants for me, just like, gives them an option and they go away, they read about it. And for me, it's an interesting I quite like the fact that merchants might start off flipping it because it's a soft sell of bitcoin, if you like. So for me, maybe this is a harsh way of putting it, but I think we've been selling bitcoin wrong, as in we've been selling bitcoin, we're trying to orange pill individuals and that's a really resource, heavy way of winning people over with bitcoin. And it's quite threatening and toxic and can be quite aggressive and cultish because we're effectively saying to people, you're doing it wrong, your money is wrong, you've got it all wrong. We're right, we're going to be rich, have fun staying, pool, all of that shit. But by onboarding merchants this way, what we're doing is they're getting bitcoin is coming to their shop or their restaurant or their pub, whatever it is. And if they're flipping into euros or Great British pounds and they're not holding the bitcoin, they'll still get bitcoin has come in, and those bitcoin is will come in through their doors. And bitcoin is, we're a crazy bunch, we will travel miles to spend on bitcoin. The catchment area for bitcoin is the catchment area for other businesses. For those bitcoin is much larger than your normal customer and those bitcoin is will come and when they get there, they will be the most enthusiastic customers you have ever seen. They will record themselves spending their currency and post it on social media. It's mental. You don't get that with the US dollar. You don't get someone coming into a coffee shop and going, hey, guys, I just bought a five dollar coffee. This is amazing. You only get it with bitcoin. We post on social media, we love it. We want to spend our bitcoin and we love it so much, we post on social media and we rave about how good and easy it is. Get the owner out here. Let's give him a congratulations round of applause for accepting bitcoin. Everything exactly. So what you're getting is you're getting loads of happy people turn up who want to spend their money. That's not like your regular customer. So for me, that's part of their orange pilling there's. All these happy bitcoin is turning up and it's going to make them think, they're going to think, hold on, we're going through some pretty shit economic types. Yeah, these guys, they travel fucking far to get here and then they're really happy to spend their currency and they're thanking me. But there must be something to this bitcoin. So it starts and thinking it sows the seed, if you like. I just want to say, what's the name of that part? Because maybe I should go there and tell them specifically that I flew from Canada. To come to the point, it's the Georgian Devonshire in London, in West London, if anyone's listening. So, yeah, it starts their orange pinning journey. And yes, it's a much softer power. So, as I say, the pitch when we go in, the pitch is not initially about bitcoin. The pitch starts off with, do you want to use do you want additional revenue, essentially, because we're going to open up your business to these customers that aren't coming to you. So it's additional revenue. That's the starting conversation. Do you want additional revenue and do you want to use a cheaper payment rail? And it's not replacing anything yet, it's running alongside. So there's no we're not asking you to change anything, we're just giving you something extra that runs alongside and complements runs in parallel with the system that a business currently uses. So, in other words, there's very little downside. I would actually say there's only upside. Either you get more business, which is more likely, you get more revenue or you don't, at no cost, because at the moment, there are companies and we will help the small businesses with the initial set up. So you either get more revenue or you don't. And the evidence is coming. So it's a long story. We help with the marketing as well. So we will put it out to our bitcoin and to all the local meetup groups, locals, business, and so we will make sure that they know that there's this business. So that's part of the package that we offer. And the evidence is that this is really working. So we're seeing so the George and Devonshire who opened their doors to bitcoin, is it last week? I think it was last week, yeah, last Friday, instantly. As soon as we posted on Twitter. They had people that afternoon coming and all weekend there were bitcoin as a rolling through the doors, literally posting videos on social media. And all this week, because I was in the sister pub this evening for the park meet up and the manager there said that the owner had been saying every day this week he's had customers who wouldn't have had otherwise. Yeah, I love to hear that. This is very sorry to interject, but this is very parallel to there's a guy in Miami Beach and he runs a taco place called Takisa Tacos. And I was in Miami in 2021. Gladstone was putting on the Oswald Freedom Forum. There was involved in organizing it. So I was speaking there and I said I was going to be in town. I tweeted out, hey, I'm in town. What big corners are around? And John, the owner of Takisa Tacos in Miami Beach, said, hey, I own a taco joint. This is where we're at. Come to Tokyo. Tacos. We'll set you up. So bring some bitcoiners, bring some clubs down and we'll see what we can do. We accept bitcoin here, lightning, we accept all of that. Sweet. So I get it's, like, me, guy, Swanseafon, Lavara, and then like ten or twelve other plebs, we show up. Dude is like, great, come on, there's a table in the back. And he fed us all tacos. He gave us all tacos the whole night for free. Then, I mean, we tipped we tip the shit out of the shop, obviously, like, more than we would have paid for the tacos, for sure, but nonetheless, like, the gesture was and then flash forward a year later to the Bitcoin 2022 conference. His taco joint was packed every night, every bitcoin. I think Unchained Capital had their staff party there. There was all like, bitcoin and my airbnb was above the taco joint department there. It was amazing. And so I'm so happy because you're so right. It attracts people and they will move the earth just to get a taco right. And pancakes. It's beautiful. It's fantastic. And we've got hard data to show that as well. I'm bullish about merchant adoption. We're getting loads more merchants on the map. And actually I've got a map to share, hopefully. We had a little trial run early and I kind of messed it up. Let's see if I can bring it up to share with. Let's see. Can I do that? I'll tell you when I see it. Let's just share my screen. Apologies, everyone. So let's share screen. And don't worry, if you accidentally show the stream screen, we'll get a little bit of stream section and people can see backstage. Cool. Yeah. I'll bring up the private chat. So that private conversations. Of all the travelers. I'm probably the least technical person. So present share screen and is that cool? So that's the screen I wanted to show you guys. Try it again. Present share screen. Click on the one that you want and then hit Share. Oh, I see it's taking me through. I'm at least technically minded person. Okay, here we go. There's three sections. There we go. This is our backstage, just so you know. Cool. There we go. So this is apologies, guys. And you got to put in the right tab. Or did you pick the wrong window? Might be. What can you see? I see the BTC sessions. Backstage screen. I think the wrong window. I think Pete the guy building all the apps is going to have to help me, is going to have to. Do it for me. Gone, Pete. What am I doing wrong? This is kind of killed my flow. Gone, Pete. I'm enjoying this. I'll let Pete do it and then I'll explain why the technical people build application. Yes, I am probably one of the least technical people that exist in the bitcoin space. It's quite embarrassing. So as you watch Pete Masters way through this process, he is the one that's building many of the fantastic applications and websites that you use with bitcoin. And so you'll be able to appreciate that. What about micelike? He's putting up his lights. He doesn't care. He's hung me up to dry. He's just putting his slides up. Tell you what, I'm going to quit while I'm ahead and just say I've got a slide. I've got a slide that shows the number of merchants in the last four months has almost doubled in the UK. So we've gone from, I think it's 51 merchants except in bitcoin to 91 in the space of four months. And it's a better graphic. It doesn't sound like very much because we're a small country, but the graphic is pretty cool because we've got a map with all the bitcoin logos with all the merchants that accept it. And it looks fantastic. So, yeah, I'm super bullish about merchant adoption. Prince another podcaster, Daniel Prince, he gave us the phrase, accept it and they will come. And that seems to be true because it happens there's. The Suffolk Jungle Rooms, and they often have meetups there. And they get people from all over the place coming. And ideally, I'd like to see a bitcoin accepted here, sticker on every high street. And I think we're not too far off. And I think we do this strange thing in bitcoin. We evangelize bitcoin, don't we? It's like this thing that's going to it will fix everything. But we do evangelize a lot. But actually, what I think would be good is if we normalize it. That's one of my tags. Let's normalize bitcoin don't evangelize it. That just scares people off. Who are these crazy culty people? We just want it in society. It's a PeerToPeer digital cash system. So, yeah, we're almost seeing a new business every day. So gradually, even suddenly, I think it's happening. I love that you brought up Daniel Prince because this is how I'm going to segue into getting Peter on his merchant side stuff here. But the quote that Prince, he gave you, accept it and they will come. He uttered those words to me as we made our way through a town in Spain. Following the conference in France, which was surfing bitcoin, we went across the border into I can't remember the name of the town now. We were in Beeritz San, I can't remember. Nonetheless, there was one guy who served coffee and like falafel or something like that, something in somewhere in the Spanish town that accepted bitcoin. And we met him at the conference and Dan was on a mission to find his shop and make sure that we went and we bought anything from him. And so it was me, Daniel Prince, his wife and all of his children, of which there are many. It's like wandering through the old town to find this one shop of this dude who actually is from Canada, who moved to Spain and opened up his shop and to hunt it down before it closed for the siesta in the afternoon. And we found it, we got there, we met up with them, we took pictures again, like did a stream or did pictures of us spending our money with this bitcoiner in Spain on a coastal town. And it was beautiful. And like, in what other instance would you get that? And I think the time is ripe for merchant adoption. I think it was too early in 20 14, 20 15, because the inevitability of scaling and having to introduce second layers was there. Well, the time has come and passed for that. And now we do have the lightning network and it's here you can do on chain, but Lightning is kind of the way to go to future proof yourself. And so with that, I want to kind of jump to Peter and talk about your experience in and around merchant adoption from the perspective of the person actually making the purchases. Yeah, sure. Well, I'm from class of 2012, I suppose, so I remember 20 13, 20 14 when we were excited about the technology, we knew it was a zero to one moment digital scarcity. And we. Knew that it worked. I think for the first time, it was decentralized and it worked. So that excitement led to going out and demonstrating it to people. And when you demonstrated it in 2013, 2014, you would get someone to install a wallet, you'd send them some bitcoin and then you'd wait 20 minutes for a block or two, you know, and that's kind of where it failed in terms. Of a demonstration. Obviously, technically, it didn't fail at all, but it required a lot of explanation if someone didn't sort of get it immediately, maybe didn't understand the cryptography or whatever. So I would say there's a big difference, as you say, with the Lightning network and where we are now with things like the Bolt card, that's made it so much easier. The user experience, the customer experience is completely different. It's reached the state of the legacy financial systems in. And I would say it's going past it now, which is, of course, the whole plan, really. We're not going to take them on, we're going to build around them with things like the Bolt card, for example. The Bolt card is actually a very simple idea. It's purely an NFC card, which gives a different reading each time. And this is based on some clever technology by an XP. When a customer comes to use it, though, they're simply going up to a point of sale terminal at the merchant, looking at how much it is and tapping to pay, just like you would. I looked it up earlier. So in the UK, we've had tap to pay for since 2007, is that right? 2007? I have to check. Yes, 2007. In the US, I think it's been a bit more recent, 2017. And so you see a different response with UK and US customers. In the UK, everyone's used to tapping to pay. It started off as £10 and then it was 20, then it was 40 and there wasn't a problem. This problem where you think someone's going to come past you and tap your card in your pocket, it just never really happened. The reason I'm laughing, Pete, I'm not laughing at you, I'm laughing at the Chat drop. Water all over his crops, freezing cold. Apologies for wondering why I'm giggling beside you. Sorry, I have to let that out. Sorry. I'm equally intrigued by the bold card and the point of sale, but also, I did just drop melted ice all over my crotch. Sorry, Paul, sorry, I was about to burst out. Nonetheless, continue. I'm going to interject while my nuts are on the table here. ", + timestamp: '00:42:00-01:07:06', + topics: ['merchant adoption', 'Lightning network', 'The Bolt Card'], + type: 'podcast', + weight: 4.878220435474277, + }, + { + boost: 0, + date: 1676083645, + description: 'The main benefits of OP_VAULT', + episode_title: + "BR023 - OP_VAULT for Bitcoin Covenants Panel ft. James O'Beirne, Rijndael, Antoine Poinsot & Carman", + guests: [ + { + name: 'Carman', + profile_picture: 'https://pbs.twimg.com/profile_images/1609775498971725824/5vyAafE3_400x400.jpg', + ref_id: '09405d70-6fa6-4f2c-92f1-a2951ad56447', + twitter_handle: 'benthecarman', + }, + { + name: 'Antoine Poinsot', + profile_picture: 'https://pbs.twimg.com/profile_images/1108377445936316423/ArRDGbr5_400x400.jpg', + ref_id: '1ba10809-b3e6-4e37-a906-697a0368b814', + twitter_handle: 'darosior', + }, + { + name: 'Rijndael', + profile_picture: 'https://pbs.twimg.com/profile_images/1542705395873058817/0zsy4Yur_400x400.jpg', + ref_id: '861d5324-8ede-4059-826f-f29abca5d7e6', + twitter_handle: 'rot13maxi', + }, + { + name: "James O'Beirne", + profile_picture: 'https://pbs.twimg.com/profile_images/1542173995650408450/iDxrdmuj_400x400.jpg', + ref_id: 'e8e48fcf-9e54-4c66-9b20-aacf5c5b504e', + twitter_handle: 'jamesob', + }, + ], + hosts: [ + { + name: 'NVK', + profile_picture: 'https://pbs.twimg.com/profile_images/608402052247658497/ENDv0BNd_400x400.png', + ref_id: 'd754e29b-2d3e-4280-8d72-f41d2a465a78', + twitter_handle: 'Coinkite', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/f1879df9-9bc6-4a76-951f-24548da768ef.jpg', + keyword: !0, + link: 'https://anchor.fm/s/9500fad8/podcast/play/64850866/https%253A%252F%252Fd3ctxlq1ktw2nl.cloudfront.net%252Fstaging%252F2023-1-11%252Fc53436f3-e1a6-2cae-eecb-fb61b06f804d.mp3', + node_type: 'clip', + pub_key: '037f7331a5bef6c6f880246747befcc3767f3bb9730bc5e6f7c3770f4184ed0bff', + ref_id: '9abcd65c-f311-4a4a-ae65-bbef89f36fc7', + show_title: 'Bitcoin.Review Podcast with NVK & Guests', + text: "we had to just, like, sort of, like, wrap up the benefits, right, like, of this for, like, your average user, right, like, out there who is going to be engaging in hats and other means of getting things into bitcoin dramatically or undramatically. What would you say are like the ten main sort of one liners that like, okay, we activate this today. You gain this set of lists nearly immediately. Right. Like assuming of course there's a UI to use it and stuff, but it's like very achievable, very simple, very safe. You get it? Yeah. So my tagline has kind of been you get the operational complexity of single SIG with multisig security, multisig safety. And personally, if I could do this for my own funds, I would sleep a lot better at night. Because I could have coins in cold storage and I could be alerted if if somehow, in any number of a million different ways, you know, my infrastructure got compromised, my, you know, rodolfo backdoor, my, my cold card, you know, there's just a million different ways you can get popped. And I don't want to rely on having built the perfect fortress and pre anticipated everything. And so I want to be able to have reactive security. And I think offalt is to date, kind of the most straightforward, easiest to use way to do that. So essentially you get end user sort of like amazing security. You can build some fairly safe, straightforward scripts that sort of like handle normal people's money problems. You can have institutional problems resolved. You can create there's probably also like. A middle thing in there too, right? There's been a lot of discussion about things like Ecashements like cashew or Fetty Mint. And this would also be an upgrade for their set up because what those systems are is they're basically just smaller custodians, right? And so if you want to Uncle Jim funds for your family, your friends, your community, your school, whatever, and give them like a very private lightning wallet via Chami and Ecash, it would be great if you could upgrade your security setup without dramatically increasing operational complexity. Yeah, so you get the DLCs, right? So we can finally have some interesting dynamic stable coins or any other kinds of dynamic contracts really being represented in the actual chain or protected by the chain. And we get some simplicity upvault. It's a small patch compared to other things that do covenants. This is like my new school, totally. At least I have not bumped into very reasonable, very strong opposition from anybody who understands this stuff. So I don't know, it feels like a very sort of sane next feature for when everybody is sort of in the mood of getting next feature and you resolve the fee problem, which is kind of a huge deal. I think that the rest of the unresolved things are more practical, like how to handle the keys and how to sort of do things in the UI, sort of like the implementation, real sort of like issues. But those things are true for ", + timestamp: '01:01:55-01:05:30', + topics: ['OP_VAULT'], + type: 'podcast', + weight: 35.95881198075342, + }, + { + boost: 0, + date: 1671663632, + description: 'Factors affecting BTC miner profitability', + episode_title: '#Bitcoin and Macro Jam Session 🎸🔥', + guests: [], + hosts: [ + { + name: 'Joe Bonet', + profile_picture: 'https://pbs.twimg.com/profile_images/1285967527848353824/bwKVva55_400x400.jpg', + ref_id: '207abdda-54a5-4eab-980a-ac936c7298e1', + twitter_handle: 'Joebonnet', + }, + { + name: 'Danny Condon', + profile_picture: 'https://pbs.twimg.com/profile_images/1449366565074440194/B_iLnyPw_400x400.jpg', + ref_id: '0e671cc8-0dd8-46b1-90be-451b23932fae', + twitter_handle: 'DannyCondon1989', + }, + { + name: 'Blake Davis', + profile_picture: 'https://pbs.twimg.com/profile_images/1532456877602349056/yg52j806_400x400.jpg', + ref_id: 'ce01300a-c603-4a32-9c98-8b05160a1959', + twitter_handle: 'BlakeDavis50', + }, + { + name: 'Mitchelle Askew', + profile_picture: 'https://pbs.twimg.com/profile_images/435841191524204544/mzKR9KCX_400x400.jpeg', + ref_id: '5f69ba8e-c266-4b31-bc1c-10de71e6ff79', + twitter_handle: 'Mitchell_Askew', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/7c53ad3c-1ce2-4661-8896-4c40dcc23b4d.jpg', + keyword: !0, + link: 'https://stakwork-uploads.s3.amazonaws.com/uploads/customers/2707/media_to_local/81882712-0c04-4852-b4d7-308376f102b3/c0c2c28c-b1f6-4568-8754-c3b7a4faa285.mp3', + node_type: 'clip', + pub_key: '03a3451db4748e483d2e1ee5d0b3a6872253253b57edf4b084a56952b432a224b3', + ref_id: 'a659e54a-bb90-4f6c-9179-a9e05224c988', + show_title: 'Blockware Solutions', + text: "Are you seeing this is a little bit more of a kind of right to the point question, but difficulty we got a pretty material negative difficulty adjustment. Two difficulties back. We came back up about 3% currently. I admit I have not checked today, but yesterday I think it was a double digit, which usually kind of washes out a bit over the two week period. But looking at potentially at another materially negative difficulty adjustment. What do you think? As far as and this is feeding on the back of a lot of the points you've been talking about, about these long term investments difficulty almost being a laggard indicators of sort of well, in Arrears investments, what do you see for difficulty for like, 2023 and for even, maybe even the next couple of years? And even so, like hash price right. I mean the spread is small right now. Survival is the name of the game. Not all are surviving as is clearly evident. Right. What do you think from a difficulty perspective as we can look forward? Yeah, totally. Yeah right now I just looked we're projected to go down about 4% which will put us below the previous low that we just made in difficulty. So yeah, it's interesting and it'll be interesting to see how that plays out over the next two weeks before it happens. But yeah, I think there's a few factors that are going to affect difficulty in the short term and in the long term. One thing that I think is interesting about difficulty potentially in the short term is we saw this bitmain, just released this new firmware for S 19 J Pros and other Pro series machines and it basically came out with this firmware that enables those machines to become more efficient. But they have to reduce their hash rate by about 20%. And there's no guarantee at all that a majority of miners are going to implement this new firmware like tomorrow. But over time, if they do, that's a material drop in hash rate that we might see which might lead to even lower difficulty. So not only miners adopting this new firmware would increase their operating profitability of their machine but enough miners doing this and running this new firmware could actually lower the total network difficulty for everybody and actually make everyone more profitable. So it's in a weird way that potentially every miner could win by implementing this new efficiency gain at least in the short term. Yeah, I think it's like a cool it's a relevant and moderately creative bear market opportunity if you will. Right. Because you go back a year it's just about getting as much hash rate as possible and now it's about basically mitigating cost like paying eighty nine cents per kilowatt hour a year ago relative to the market there were cheaper options because energy was cheaper but that was tenable. Now it's like you're underwater. And an interesting ", + timestamp: '00:39:57-00:43:25', + topics: ['Bitcoin mining'], + type: 'twitter_space', + weight: 10.51428035061009, + }, + { + boost: 0, + date: 1641168e3, + description: 'Multiple aspects of scalability', + episode_title: 'Scaling Bitcoin On-Chain - TABConf 2021', + guests: [ + { + name: 'Andrew Chow', + profile_picture: 'https://pbs.twimg.com/profile_images/1452266201770496010/44FHCtZM_400x400.jpg', + ref_id: 'f96d87ca-5060-4021-aeb9-61db03312027', + twitter_handle: 'andrewrchow', + }, + { + name: 'Mark Erhardt Murch', + profile_picture: 'https://pbs.twimg.com/profile_images/1269477743525130241/-U843Cmt_400x400.png', + ref_id: 'ef2f2f68-ae16-4e78-80cb-0be9bd156988', + twitter_handle: 'Murchandamus', + }, + { + name: 'Andrew Poelstra', + profile_picture: 'https://pbs.twimg.com/profile_images/1316562683009921024/FSscAYvJ_400x400.jpg', + ref_id: '15fb9c53-c988-4af1-bbf0-4832d71b0a01', + twitter_handle: 'Blockstream', + }, + { + name: 'Peter Wuille', + profile_picture: 'https://pbs.twimg.com/profile_images/1264051937172836353/n7gHdLbB_400x400.jpg', + ref_id: 'fb836ce4-a933-4419-99d8-932fe65219a1', + twitter_handle: 'pwuille', + }, + ], + hosts: [ + { + name: 'Stephan Liverra', + profile_picture: 'https://pbs.twimg.com/profile_images/1362551718110580740/v-W5Q2uo_400x400.jpg', + ref_id: '551f3a72-9f09-4bcc-bc3b-80ec5605e30f', + twitter_handle: 'stephanlivera', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/e7d2a4ca-6b44-4a45-a94c-6f48987979f7.jpg', + keyword: !0, + link: 'https://www.youtube.com/watch?v=GbhXJ43e2Bc', + node_type: 'clip', + pub_key: '', + ref_id: 'd96fca70-c1c7-4b71-9d35-9aadf2820909', + show_title: 'TABConf (The Atlanta Bitcoin Conference)', + text: "We've been talking about signature aggregation where we're getting rid of some of the signatures that go on chain. But there are multiple aspects to scalability and on chain space is only one of them, CPU consumption is another. And it turns out you can sort of get something similar to signature aggregation without actually doing it. And that is you still have multiple keys on chain and you still have multiple signature completely created independently on chain. But you sort of aggregate them at validation time together and then validate them all at once. And it turns out you can do this somewhat more efficiently than validating multiple them. And this is something that isn't so much being done in. This is a known technique. There are papers going back 1015 years explaining how batch validation improves things, but in most settings it isn't all that interesting. In our case it very much is, because if we have a block with thousands of signatures in it, we really only care if all of them are valid or not. It's not like we care if one fails which one it is. The block is invalid, throw it away. So that's really the use case for batch validation and Taproot and the Schnour signature scheme it introduced have been specifically designed to permit batch validation. It's not implemented, but it was a design criterion in BIP 340 and 341 342 that nothing in there would interfere with the ability to batch validate, which is the rationale for some of the maybe more unexpected changes. For example, the Taproot script logic doesn't have a check multisig anymore, specifically because the check multisig has existed before, isn't compatible with batch validation. Sorry, go on. I was just to add to that the ECDSA signatures that we were using before Schnorr signatures were not compatible with batch validation either. Although maybe in retrospect there were some small tweaks I guess Satoshi could have done that would have made it possible, but they weren't. And we thought about that when defining the Schnor signatures for Taproom. And so, as I understand you then, would that be mostly a CPU saving. Or what would be purely CPU saving? That would decrease the sync time so. You could spin up your bitcoin full node faster in a batch validation world? Theoretically. Well, only for the batch validation signatures. Not the fast stuff, obviously, because that would still be. We'Re not in a rush about that, because it only becomes relevant once taproot signatures are really commonly being used. Right. But then of course, once you implement it, it would still apply to all transactions from that point onward compatible. So once Tap root rolls out and there is Schnorr signatures in the blocks, if you later then do the batch validation, you get all the savings. And it is not restricted to initial synchronization, of course. Right. It also helps with a new block that comes in, or a new transaction that comes in. Mostly new transaction, because we cache the result of signature validation and we don't do it again. ", + timestamp: '00:40:19-00:43:50', + topics: ['Multiple Bitcoin keys on-chain', 'Bitcoin signature validation'], + type: 'youtube', + weight: 4.30657198974179, + }, + { + boost: 0, + date: 1673685e3, + description: 'The reasons for Cameron Winklevoss to ask Barry Silbert to resign as CEO of DCG', + episode_title: 'The Chopping Block: Why Gemini Users Are Mad at Genesis and DCG - Ep. 443', + guests: [], + hosts: [ + { + name: 'Tarun Chitra', + profile_picture: 'https://pbs.twimg.com/profile_images/1587539091444432897/Z6_nmrCB_400x400.jpg', + ref_id: 'dfad4b23-92ff-4aa1-9aa4-abc1d54cd6d3', + twitter_handle: 'tarunchitra', + }, + { + name: 'Haseeb Qureshi', + profile_picture: 'https://pbs.twimg.com/profile_images/1581025415551889408/thQwG4lb_400x400.jpg', + ref_id: '790e4217-dd9f-416f-b9f8-ed596937f5b5', + twitter_handle: 'hosseeb', + }, + { + name: 'Tom Schmidt', + profile_picture: 'https://pbs.twimg.com/profile_images/1563232354277085189/xQL92DR4_400x400.jpg', + ref_id: 'bc9d3bfd-36b0-4cbc-a491-9370decf4c99', + twitter_handle: 'tomhschmidt', + }, + { + name: 'Robert Leshner', + profile_picture: 'https://pbs.twimg.com/profile_images/1587956987786104833/1SiKVj-s_400x400.jpg', + ref_id: 'ebaa2166-7982-423d-9f43-add89e7d47f9', + twitter_handle: 'rleshner', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/7de0d293-8ae3-4362-8500-8f7300f3fe41.jpg', + keyword: !0, + link: 'https://traffic.megaphone.fm/LSHML4726349989.mp3?updated=1673643857', + node_type: 'clip', + pub_key: '02545c14cbb18a61f20dd45f5e3dcbd9acae3de282369501040adce32a75311309', + ref_id: '0329d1cb-7a66-4de5-a67d-36f28fce092f', + show_title: 'Unchained', + text: "The interesting thing is that when Cameron is cameron was accusing DCG Genesis of fraud, a specific request, clearly look, whether or not they're performing fraud, you still want to get your users paid back, right? So one way or another you want to find a peaceful resolution that's still outside of bankruptcy. And so the remedy that Cameron proposes to make him feel okay about the resolution here is for Barry to step down. Which is a very interesting thing to ask for because one, of course, Barry is not the CEO of Genesis, right? So Barry is not involved in Genesis except as a sort of distant owner, like an owner of the parent company. But then second, Barry kind of is DCG. It's like asking Elon to step down from Tesla or from SpaceX. Right. He's so deeply intertwined with that company and he owns obviously the vast majority of it. So I'm not really certain what Cameron is thinking and asking for Barry to step down. It could be that Barry has just been so ostensibly, what he's claiming is that Barry has been so difficult to work with, he's been dodging requests, he's been unresponsive, and that really it just looked this guy stonewalling me. And literally, if you don't put someone there who's not going to stonewall me, I am going to push you into bankruptcy. Because otherwise I have a choice. That could be the essence of what he's asking for. It could also just be a way of kind of grandstanding for earn users and show like, look, I'm doing something, I'm asking for this big kind of loud request. I don't know. Yeah, that I think is actually kind of like the genius stroke here, which is basically Cameron getting in front of the story and deflecting blame on Gemini towards DCG. And that's kind of what I've been seeing on Twitter is like, Earn users are not pissed at Gemini, they're actually pissed at Genesis. If you think about it, that doesn't really make sense, right? Like, if you deposit money into a bank and then your bank makes a bunch of bad loans and has a bunch of defaults or liquidity crunch, you don't get mad at your bank's counterparty, you get mad at the bank. And yet Gemini has been able to basically get all of their users to be mad at Genesis themselves. Well, one small clarification there. The Gemini Earn users are in lending agreements directly with Genesis. So they're not lending money to Gemini who lends money to Genesis when they sign the PDF. That's like the terms of service or whatever. It's like an agreement between Genesis and the customer directly. And so they're directly providing the money to Genesis, not to Gemini in the middle. So that's the weird nuance there. And this has been front and center that Gemini Earn. It's not like Gemini is going out and managing like a portfolio to generate a return. It's gemini Earn is a funnel into Genesis. Yeah, that makes sense. ", + timestamp: '00:13:43-00:16:36', + topics: ['DCG', 'Genesis', 'Gemini', 'Barry Silbert'], + type: 'podcast', + weight: 20.563728973264343, + }, + { + boost: 0, + date: 1666137600, + description: 'Focus areas on node management', + episode_title: 'Meet the Makers: Alan & Kwinten', + guests: [ + { + name: 'Alan Plus', + profile_picture: 'https://pbs.twimg.com/profile_images/1565235279451103233/XD8pJuIo_400x400.jpg', + ref_id: 'e362fed6-ec06-4d8a-a052-3137b24f213f', + twitter_handle: 'alnboltn', + }, + { + name: 'Kwinten De Backe', + profile_picture: 'https://pbs.twimg.com/profile_images/917859380699320320/p_v-fjmh_400x400.jpg', + ref_id: 'be68f240-1f4c-4b27-b4bb-752c90cbe0c3', + twitter_handle: 'QuintenDeBacke1', + }, + ], + hosts: [ + { + name: 'Moritz Alby', + profile_picture: 'https://pbs.twimg.com/profile_images/859727763292512258/kiFpZ2vO_400x400.jpg', + ref_id: 'e88efbf8-3809-4508-a86a-d7bf9effb574', + twitter_handle: 'MoritzKaminski', + }, + { + name: 'Zapp Ed', + profile_picture: 'https://pbs.twimg.com/profile_images/1519990234070540288/adGqlFoj_400x400.jpg', + ref_id: 'bbe7cf1d-cd8d-4d36-926d-76f41b775fbb', + twitter_handle: 'zapp_ed', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/965489b4-a414-4fd0-ab8c-55911b1596aa.jpg', + keyword: !0, + link: 'https://www.youtube.com/watch?v=GyA8tHNKmig', + node_type: 'clip', + pub_key: '02574d6e8e787372184b6f17c40d6c6fe1777db9015801f95dfd24692784d767cd', + ref_id: '2ff6b481-d06c-42e3-9ad5-9fa7a84dbd96', + show_title: 'BOLT FUN', + text: "quite some minutes into this session. I think we can also take questions any time. So also to the audience, to the listeners, feel free to ask anything. Is there a unique chance to have here two professional note operators that you can ask? I'm curious. So there is quite a lot of happening regarding new standards or the protocols or even new tools. What are you most excited about that has been released recently or is being worked on right now. In the area of node management? Yeah, I think so. Another sneak peek maybe that we are working on commando connector. So to connect to your C lightning node through the Albi extension, through the commando plugin. And I think this will be something which will get more people into running a C lightning node. Because right now there is not really a good UI for that. Or there are some, but not that great. But if we can get it to Albi, then this will open up a whole new area of people running C Lightning nodes and you will be able to have the entire command of your C Lightning node, everything that you want to do, all plugin commands that you want to run. And this can all through the web ALM protocol. This will all be able to happen in the browser or even if the website integrates Commando, then they can directly talk to the node. That's also possible. So that's something that we're currently working on at Albi, but it's not ready yet, of course. But that's something that I'm quite excited about. I heard about a start up, but I can't really talk about details. But there is something coming up which is very exciting. It's a web based tool that will allow node operators to just set them forget, but we will see how well it will work. But that seems to be coming soon. I can tell you. I don't know. I mean, that's the promise. We'll see how it goes. It should come out within a few weeks if all goes well. But I'm not associated with that project, so I can talk about it. But aside from node management, I think I'm most excited about RGB and Tarot because I think those two things will open possibilities for node operators to earn more money by not just being routers and channel providers, but also to provide liquidity to exchange tokens, like mostly probably fiat tokens to Bitcoin and so on. So that could be a good revenue source and brand new revenue source, a brand new way to make money on the Lightning network. I'm not sure if this is going to take off in a big way, but I think even if it's just for a few years, even if it's just a small way, it's still a good extra income. So that's going to make sure that current node operators stay in business and more people join and the network just keeps growing. And that's what we need, I guess. ", + timestamp: '00:41:19-00:45:36', + topics: ['RGB', 'Node routers', 'node management'], + type: 'youtube', + weight: 4.524002028228006, + }, + { + boost: 0, + date: 1669105800, + description: 'Whether the Bahamian government was the ‘FTX’ hacker', + episode_title: "The Chopping Block on FTX/Alameda: Is Sam Bankman-Fried 'Crypto Kanye'? - Ep. 424", + guests: [ + { + name: 'N/A', + profile_picture: 'https://pbs.twimg.com/profile_images/1478260779522658306/rm6XqGZx_400x400.jpg', + ref_id: '9862384f-b99b-4777-aa71-538d41591686', + twitter_handle: 'unchained_pod', + }, + ], + hosts: [ + { + name: 'Haseeb Qureshi', + profile_picture: 'https://pbs.twimg.com/profile_images/1581025415551889408/thQwG4lb_400x400.jpg', + ref_id: '790e4217-dd9f-416f-b9f8-ed596937f5b5', + twitter_handle: 'hosseeb', + }, + { + name: ' Robert Leshner', + profile_picture: 'https://pbs.twimg.com/profile_images/1587956987786104833/1SiKVj-s_400x400.jpg', + ref_id: '08f19db5-dbb2-4ca7-886a-d4aaa9de1e0d', + twitter_handle: 'rleshner', + }, + { + name: ' Tom Schmidt', + profile_picture: 'https://pbs.twimg.com/profile_images/1563232354277085189/xQL92DR4_400x400.jpg', + ref_id: '1c211a97-8535-426b-9091-9d23ae0fbc11', + twitter_handle: 'tomhschmidt', + }, + { + name: ' Tarun Chitra', + profile_picture: 'https://pbs.twimg.com/profile_images/1587539091444432897/Z6_nmrCB_400x400.jpg', + ref_id: '8d941896-7865-49b9-9505-cf91882986bb', + twitter_handle: 'tarunchitra', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/7de0d293-8ae3-4362-8500-8f7300f3fe41.jpg', + keyword: !0, + link: 'https://traffic.megaphone.fm/LSHML8128135235.mp3?updated=1669122227', + node_type: 'clip', + pub_key: '0201497bb9e66239cdf8fe218ee3e3c7c5b1bea880787ccdd433e7af55f88b53ed', + ref_id: '9f78ecd6-03f5-4f0e-ba8b-1dbb60b09052', + show_title: 'Unchained', + text: "the other thing that's going on that's also very strange is that there's this jurisdictional battle between the Bahamas and the US. So John Ray, he originally filed for bankruptcy in the US. And the Bahamas. The Bahamas. SEC basically fired back and said, hey, this entity is in the Bahamas, therefore this is subject to Bahamas bankruptcy. And later it was revealed that supposedly, and again, this is still very unclear exactly what happened, but supposedly the Bahamas government instructed Sam to actually take the digital assets left in FTX and move them under Bahaman custody for the Bahamas government for some reason, and it's all very vague. Exactly. Did this actually happen? How did this happen? Is that the FTX unauthorized access FTX hacker that we were talking about on Friday night? If so, like, what the hell were they doing? Why were they selling off all the all coins to get access to put everything into eat and die? It's a very strange pattern of behavior. Well, they were also doing it on one end, curve. Right, exactly. And regulators actually know how to use curve. The suggestion is that they instructed Sam to do this. And so it was Sam who was actually going on chain and dumping these assets. The story at least makes sense. Like the pattern of behavior does look like, okay, this is something somebody's sophisticated about DeFi who's doing a lot of this liquidating. Yes, I think I've kind of come around on this. I think there's something else going on. I agree. If it's just a matter of moving the assets into their custody like that, that's one thing. But we also saw them basically eating a bunch of slippage on these, like on chain swaps, and then moving them into censorship resistant assets. And then I think recently they like cashed out some of their rent VTC for BTC. And so they'll probably shove that through a mixer and so I think this might actually just be a vanilla hack, and maybe the Bahamian jurisdictional battle and custody battle is like a different thing that we haven't yet seen. But I think the hack was maybe just an actual hack. And that seems to be what Sam was implying in his DMs with Kelsey Piper, which is that this was either a straight up hack or it was a disgruntled employee who I guess had access to the Google sheet when they had all the private keys. So, yeah, it's hard to tell at this point. It's crazy that they did everything in Google like shared good Gmail account. Yeah, it's such bad OpSec for like how did it right for managing a small amount of money, let alone a large amount of money. It's just preposterous. No one in crypto is that dumb. Besides yes, everything that we're learning about what was happening inside of FTX, it just belies so much amateurishness. Everyone listening to this stream right now is smarter than that. That is so stupid. ", + timestamp: '00:17:46-00:20:42', + topics: ['FTX', 'Bahamian government', 'Bahamas'], + type: 'podcast', + weight: 5.694210546365008, + }, + { + boost: 0, + date: 1659484800, + description: 'Important UX design processes that needs to be solved for promoting Bitcoin adoption ', + episode_title: 'Austin Bitcoin Design Club Interview w/ Sahil, FuturePaul, and Car', + guests: [ + { + name: 'Car Gonzalez', + profile_picture: 'https://pbs.twimg.com/profile_images/1541855444720836608/F4v02BuD_400x400.jpg', + ref_id: 'b554604d-47eb-4c7c-b6c9-87a062e6a844', + twitter_handle: 'Car_mdq_2010', + }, + { + name: 'Sahil Chaturvedi', + profile_picture: 'https://pbs.twimg.com/profile_images/1362511727066107904/yP4o43cz_400x400.jpg', + ref_id: '8b56eaa4-c9d6-46e8-a313-fbccd0ee86b5', + twitter_handle: 'SahilC0', + }, + { + name: 'Future Paul', + profile_picture: 'https://pbs.twimg.com/profile_images/1508452962917666821/1QheRD09_400x400.jpg', + ref_id: 'ec933e22-f395-4817-b608-4337eaaf60a4', + twitter_handle: 'futurepaul', + }, + ], + hosts: [ + { + name: 'Paul Miller', + profile_picture: 'https://pbs.twimg.com/profile_images/1508452962917666821/1QheRD09_400x400.jpg', + ref_id: '825ccf41-8cae-43c9-81e9-a8868e07768e', + twitter_handle: 'futurepaul', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/2ec62250-4755-4616-8342-096a2cfab95f.jpg', + keyword: !0, + link: 'https://www.youtube.com/watch?v=k_I5EiOyolM', + node_type: 'clip', + pub_key: '', + ref_id: 'e9443306-25af-42d3-830d-ed6a26721103', + show_title: 'Voltage', + text: "What's the most important thing that can be solved, you think, in bitcoin design? Just over whatever point of time you would like to define. I hate to say one year, five years, because it's going to change quite a bit, but what's the most important UX piece that needs to be solved for where we are today in bitcoin, in your guy's opinion? Do you have any idea? Yeah, I can start because it is something I'm biased, obviously, and I think about this every freaking day, but I think a lot about businesses adopting bitcoin and it's kind of scary to think a lot of businesses jump into custodial bitcoin and there's a lot of reasons why. So I think a lot about how do we build the use cases for small businesses, but also big businesses like MicroStrategy. What do they need? I don't know. That's part of the UX research process is, hey, what does Sailor need to be able to hold his own keys? Is it a bigger multisig quorum? Is it like fine grained financial controls? I don't know. But I think that to me is super, super predicting because there's a lot of people working on single SIG wallets and Lightning wallets and all that stuff is really great. But I think it's a very underserved market for larger businesses with many stakeholders thinking about how do they control their own keys. Yeah, a couple of other things that pop to my mind is right now, bitcoinners are pretty familiar with a lightning and on chain distinction. And I think we have to figure out how we hide that. Do we hide that? What is exposed to a user when they're spending Bitcoin, how much do they need to know about the layer two? And that kind of comes back to like, well, what trade offs is the layer two making? We don't want to lie to the user that there aren't trade offs, but at the same time, we do want to give people an easy path and then kind of like what Sahil is saying. I think there are a lot of things right now in Bitcoin where you have to go all the way, step one. And so it'd be really nice for a lot of these where if you onboarded someone to some Bitcoin experience, that they could gradually level up so that they're taking on more responsibility over time. The comparison I always use a bitcoin is like a marriage or working out. There are certain things that you can't have done for you. They're going to take work, but like those, theoretically, you can start out small and work your way up to more responsibility. Absolutely. ", + timestamp: '00:11:25-00:14:31', + topics: ['Bitcoin design', 'Custodial Bitcoin'], + type: 'youtube', + weight: 4.302124736522732, + }, + { + boost: 0, + date: 1671534e3, + description: "Antonio Juliano's advice for new bitcoiners ", + episode_title: 'Ep. 494 The Facts About Using Leverage when Trading Crypto', + guests: [ + { + name: 'Antonio Juliano', + profile_picture: 'https://pbs.twimg.com/profile_images/1486890878694133761/85ev-DD6_400x400.jpg', + ref_id: '025d2715-f5e7-4ba1-884c-45ba1e7770c5', + twitter_handle: 'antoniomjuliano', + }, + ], + hosts: [ + { + name: 'Aaron Malone', + profile_picture: 'https://pbs.twimg.com/profile_images/1521495204196503553/abk-5S0m_400x400.jpg', + ref_id: 'bd103540-8c0a-4ab3-b5cd-24a3f2c43ab2', + twitter_handle: 'pizzamind', + }, + { + name: 'Pizza Mind', + profile_picture: 'https://pbs.twimg.com/profile_images/1521495204196503553/abk-5S0m_400x400.jpg', + ref_id: '16cb01cf-9f04-45db-a440-47259b02b86a', + twitter_handle: 'pizzamind', + }, + { + name: 'Bryce Paul', + profile_picture: 'https://pbs.twimg.com/profile_images/1182725652794892288/QbDOKHcP_400x400.jpg', + ref_id: '0d670dbf-f434-43b6-b454-8e5345d7ee51', + twitter_handle: 'BrycePaul101', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/93a6fe5b-364c-43f4-9f38-7da3e811460b.jpg', + keyword: !0, + link: 'https://stream.redcircle.com/episodes/0270c2f2-f726-498b-9a8d-0f907aa5736a/stream.mp3', + node_type: 'clip', + pub_key: '027be063cca62a6c08fbe2e8eba0aae10ad27a8896d04ee347a90fea2bce5e85ac', + ref_id: '7fb2989d-f3f8-4e89-b1bb-66e08ed2f294', + show_title: 'CRYPTO 101', + text: "I love it, man. I'm excited for V four. We're going to be hopefully being able to bring you back onto the podcast to tell us about how the rollout went and what we can continue to keep tabs on with dYdX. But for now, we've got a final closing question and this is a lay up, this whole softball, but it's really for a lot of our listeners who this might be the first time they've ever heard about crypto and they just decide, oh, Crypto 101, and they found you. So what would you tell somebody who's just now entering into the crypto space, they're about to buy their first bitcoin? Well, first of all, congratulations. You've decided to enter the crypto space after the collapse of FTX, which I think maybe you'll get an NFP for that or something someday. But seriously, I am really excited about what we're building at Tydx and more broadly, a lot of the stuff that's going on in crypto in general. I think crypto has a ton of promise, right? We can really build this financial system that's powered by code and not humans. And just once you wrap your head around that fundamental paradigm shift just even that it's possible to do that. Not that we've done that yet, that it's possible to do that. I think that's something to be excited about. I think a lot of people get disillusioned in crypto because they can't wrap their head around the timing of crypto. I think a lot of people understand the promise. It's like oh, yeah. Okay. Like Metallic. And everybody else has been out here saying, there's this fundamentally new technology, but come on, guys, what have we actually built? Sure, there's things like dYdX and Uniswap that have some real volume. A billion dollars a day is something for sure, but that are an overall small part of the crypto market. And even if we zoom out farther or super small part of the overall finance market, but if we really zoom out and think about, well, what's fundamentally newly possible with this technology on a really long time horizon, like ten years, 1020 years, plus. I think there's a huge amount of reason to be optimistic about that. We're really at the forefront of building towards that at dYdX, and I think there's a lot to be excited about. Man antonio, what a positive note to end things on. And I couldn't agree more. Zoom out. Zoom out. Don't stay too zoomed into the price charts and looking at 1 minute candles. That's how you're going to drive yourself crazy. Thank you so much for joining us, and we're excited to stay informed. ", + timestamp: '00:41:55-00:44:28', + topics: ['Antonio Juliano', 'crypto'], + type: 'podcast', + weight: 10.07245675720714, + }, + { + boost: 0, + date: 1623733200, + description: 'The Flexibility in Small Business', + episode_title: 'Andrew Frazier on Running Your Business', + guests: [], + hosts: [], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/f2b2a2b2-8869-4256-94b9-a91c91c1ce7e.jpg', + keyword: !0, + link: 'https://dts.podtrac.com/redirect.mp3/cdn.mises.org/122_e4b_andrew-frazier.mp3', + node_type: 'clip', + pub_key: '', + ref_id: '6537e3ab-da86-41c5-acac-2e513ce23634', + show_title: 'Economics For Business', + text: "look to potentially get external financing. Yeah. Another aspect that comes up when we talk about this, Andrew, is the issue of flexibility. So we said right at the beginning that small businesses are more flexible in the way they can adapt and be agile in the marketplace. But sometimes financing, especially debt financing, can limit your flexibility. You've got covenants, you've got reporting dates, you got payback dates and that kind of thing. How do you manage that balance between retaining flexibility and giving up some of it to someone who's giving you a loan? Well, there's always a lot of trade offs, especially in small business, and sometimes you need the capital to grow. But you can still be very flexible as a small business in terms of the way you work with your clients, being able to provide additional things quickly and easily that they may need, and being able to understand them better so that you can craft your products and services to even meet their needs better. So yes, financing can take away some flexibility, but at the end of the day, a lot of small business flexibility is non financing related. You have to meet the covenants and you have to do a certain amount of business. So it's going to require you to make sure you're doing a certain amount in a period of time, but that's not necessarily going to keep you from being flexible in most situations. Yeah. Okay. So now with your coaching, I've grown my business. I've got procedures and processes in place, I got some financing, maybe things are going well. I'm starting to add people. I need to hire some people. And you say that changes the character of the business more than anything else. Tell us about that change and what happens to the business owner when you start hiring people? Well, hiring people, unfortunately, you can't just hire yourself. So whoever comes into your organization is going to have an impact on whoever's there. They're going to bring their personality, they're going to bring their work ethic, they're going to bring their skills and expertise, they're going to bring their historical work experience. All those things can affect your culture either positively or negatively. And one of the things I talked to a lot of business owners, especially when they're looking to grow, is you have to manage your culture, which is really how we do things here. So if you don't create and manage your culture, it's going to create itself, and that's not necessarily a good thing. So understanding that there is a certain culture. That you have to manage it to be able to grow your business without it changing too much. It's important to not hire too many people at the same time because you really want to bring people in and help them to understand the culture. How you do things. So that you have consistency ", + timestamp: '00:35:23-00:39:02', + topics: ['Flexibility in Small Business'], + type: 'podcast', + weight: 4.290586471558082, + }, + { + boost: 0, + date: 1677054600, + description: 'Royalty issues in the NFT communities', + episode_title: 'The Chopping Block: The Inside Story of How Blur Toppled NFT Giant OpenSea - Ep. 459', + guests: [ + { + name: 'Pacman Blur', + profile_picture: 'https://pbs.twimg.com/profile_images/1499571704753901569/wLAcCdsu_400x400.jpg', + ref_id: 'c042615e-905a-49af-8761-fa6fb1be4b8a', + twitter_handle: 'PacmanBlur', + }, + ], + hosts: [ + { + name: 'Tarun Chitra', + profile_picture: 'https://pbs.twimg.com/profile_images/1587539091444432897/Z6_nmrCB_400x400.jpg', + ref_id: 'dfad4b23-92ff-4aa1-9aa4-abc1d54cd6d3', + twitter_handle: 'tarunchitra', + }, + { + name: 'Haseeb Qureshi', + profile_picture: 'https://pbs.twimg.com/profile_images/1581025415551889408/thQwG4lb_400x400.jpg', + ref_id: '790e4217-dd9f-416f-b9f8-ed596937f5b5', + twitter_handle: 'hosseeb', + }, + { + name: 'Tom Schmidt', + profile_picture: 'https://pbs.twimg.com/profile_images/1563232354277085189/xQL92DR4_400x400.jpg', + ref_id: 'bc9d3bfd-36b0-4cbc-a491-9370decf4c99', + twitter_handle: 'tomhschmidt', + }, + { + name: 'Robert Leshner', + profile_picture: 'https://pbs.twimg.com/profile_images/1587956987786104833/1SiKVj-s_400x400.jpg', + ref_id: 'ebaa2166-7982-423d-9f43-add89e7d47f9', + twitter_handle: 'rleshner', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/7de0d293-8ae3-4362-8500-8f7300f3fe41.jpg', + keyword: !0, + link: 'https://pdrl.fm/98e0b1/traffic.megaphone.fm/LSHML7945807763.mp3?updated=1677011996', + node_type: 'clip', + pub_key: '', + ref_id: '6825363e-4733-4d3b-be8f-ef3a90b3549b', + show_title: 'Unchained', + text: "even though you guys are trying to play nice, they're like, no, screw Blur, we're not going to take them off. I think a lot of people who are listening to this conversation, who are not very deep in NFTs, might be confused about why we keep talking about royalties. Royalties, royalties, royalties. It seems like royalties is like, at the heart of this big conflict between all the big marketplaces in NFTs. Maybe just to kind of build the intuition, why are royalties so fraud? Why are they so important? Why are people arguing about them? Because we're not talking about fees. Right? Fees are also another element of it, which is that OpenSea has the highest take rate of any of the NFT exchanges. But the big fight has been over royalties. Why do you think it is that royalties are this giant battleground? Yeah, I think a lot of it is path dependency, to be honest. The way the NFT culture started was PFPs, like larger collections. They weren't the norm. It was initially like one of one art, like small batch collections, and for like, one of one artists. This whole concept of royalties made a lot of sense because collectors of those collections, they have a very personal relationship with the art, and they have a personal relationship with the artists, and they'll oftentimes want to pay the royalty because they want to honor the artists and help sustain them. It's a really beautiful thing. PFP collections, as they got big, it kind of became the norm to still have the royalties, and it kind of became like the default way that a lot of these collections would monetize, not from like, a total monetary perspective, but from like, a cultural perspective. So, you know, if you look like yuga labs, for example, like, they make most of their money off of the mints, and actually a very small proportion of the money that they've made has been off of the royalties. But I think it just kind of became the norm for everyone to expect. When we looked at the market. It seemed rather suboptimal from from a value capture perspective for the collection creators, to be honest, because, you know, in in any sort of financial market, any increase in take rates results in a nonlinear decrease in trading volume. If you decrease the take rates, we can have significantly more trading volume. You can have tighter spreads, more liquidity. There's a lot of things, and then there's a lot of things that can only happen once you have more liquidity. And it felt to us like the space was kind of being held back by this norm that wasn't actually long term optimal, but it was the norm, because that's kind of how the space started effectively. That makes sense. Okay, so there's a lot of kind of cultural path dependence to how royalties played out and how they became such an important battleground, both symbolically, financially, and even emotionally, for why all these exchanges were fighting with each other over this concept of royalties and trying to enforce them on chain through blacklisting each other and doing all this other complicated stuff. You could argue that royalties were sort of like liquidity mining for artists, and that it attracted artists at a certain time in 2021 where you're basically arguing that they got this annuity that would be there perpetually, and that's why you should put your art in an NFT. And I think there's just some point at which it became an unreasonable subsidy relative to market friction. Also, by the way, has steve we all know this episode is your victory lap episode. We'll get to that. We'll get to that. Sorry. Go ahead, Tom. No, I totally agree. I think from my conversations with artists and galleries, a lot of them initially viewed digital art has been around for a while, but a lot of them viewed the attraction of NFPs as a reaching a bigger market, but also getting access to the secondaries. It was kind of sort of a very like semifamous moment where, like, not an artist, but Mark Cuban was talking about tokenizing, you know, cavs tickets and letting them trade on like an NFP exchange. Then someone was like, no, like, you don't you know, you can't enforce the royalties on chain. He's like, wait, what's the point of the tokenization then, if I don't get the secondary speed? And so it's like even somewhat sophisticated people sort of, sort of missed this point. Wait, we're recalling Mark Cuban who lost a lot of his money in iron finance. The sophisticated person here. Just checking. I'm trying to be kind. I'm trying to be kind on the pod today. So the other thing that always struck me as strange about this story about royalties, and again, I'm trying not to take too much of a victory laugh, because I did predict that this would happen. But the thing that also struck me as strange is that crypto in crypto, we find a way to tokenize almost everything. Pretty much anything that can be on chain, we find some way to break it down into tokens and trade it. But for some reason, people never did that to royalties. They never tokenized their royalty stream and then sold it to third parties. There were a few projects that did this here and there, but it wasn't widespread, it wasn't common. But this seems like the obvious way to understand what royalties are. When an artist ends up working with a music label, what they do is they end up basically selling off vast majority of their royalties to the label in order to basically get an upfront payment to allow them to go create art or whatever, and also take away most of their risk. If NFT artists had done this, what they would find is that actually, you can just sell this off for a lump sum payment and basically sell it. You could have sold it to the exchange in the first place. So there's nothing about even the nature of royalties that guarantees that they're structured as an annuity. If you just sold it off upfront, which you could in principle, then I think the norms would have been very different if, in fact, when royalties were created, that they were initially tokenized and most people would just sold them alongside the initial NFP mint. Yeah, I think it's very interesting. Ultimately, I think, especially on Twitter, what ends up happening is there's no nuance that's allowed in any of these conversations. And there's nuance at multiple levels. There's nuance in the types of NFPs, right? So like large PFPs like Azuki or Yuga, those are like venture backed companies, those are startups. And that's a very different beast than like a one of one artist that sells super rare and collector that's buying a bunch of art is very different than a retail user who is a newcomer, is very different than a trader who is going to be very price sensitive, is different than like a market maker. And now after our token launch, there are a lot more market makers in the space than there were before, which is something that's quite interesting, which is what we were hoping for ultimately. But basically there are all these different demographics and use cases and the conversation has only ever been a binary. Will you fully enforce royalties or not fully enforced royalties? And it's like the market has tried to apply a one size fits all solution to a market that is actually very segmented. So it was just very surprised. Not surprising, I think I'm not surprised anymore, but it was more so just, it was like, okay, this is going to be a short term noise effectively because the market will do what the market is going to do. This conversation can prevent it for a little bit, but the market is ultimately what's going to win out at the end of the day and you can't really stop the market forces. So it just seemed kind of like an inevitability, but it was a conversation that lasted for a lot longer than I think it needed to. And we could have focused on more productive conversations, but it wasn't able to just because of the lack of nuance. 100%. ", + timestamp: '00:13:20-00:20:35', + topics: ['NFT Royalties', 'NFT collections'], + type: 'podcast', + weight: 40.09700499339939, + }, + { + boost: 0, + date: 1676083645, + description: "The risk of Bitcoin's early ossification leading to challenges with self-custody in the future", + episode_title: + "BR023 - OP_VAULT for Bitcoin Covenants Panel ft. James O'Beirne, Rijndael, Antoine Poinsot & Carman", + guests: [ + { + name: 'Carman', + profile_picture: 'https://pbs.twimg.com/profile_images/1609775498971725824/5vyAafE3_400x400.jpg', + ref_id: '09405d70-6fa6-4f2c-92f1-a2951ad56447', + twitter_handle: 'benthecarman', + }, + { + name: 'Antoine Poinsot', + profile_picture: 'https://pbs.twimg.com/profile_images/1108377445936316423/ArRDGbr5_400x400.jpg', + ref_id: '1ba10809-b3e6-4e37-a906-697a0368b814', + twitter_handle: 'darosior', + }, + { + name: 'Rijndael', + profile_picture: 'https://pbs.twimg.com/profile_images/1542705395873058817/0zsy4Yur_400x400.jpg', + ref_id: '861d5324-8ede-4059-826f-f29abca5d7e6', + twitter_handle: 'rot13maxi', + }, + { + name: "James O'Beirne", + profile_picture: 'https://pbs.twimg.com/profile_images/1542173995650408450/iDxrdmuj_400x400.jpg', + ref_id: 'e8e48fcf-9e54-4c66-9b20-aacf5c5b504e', + twitter_handle: 'jamesob', + }, + ], + hosts: [ + { + name: 'NVK', + profile_picture: 'https://pbs.twimg.com/profile_images/608402052247658497/ENDv0BNd_400x400.png', + ref_id: 'd754e29b-2d3e-4280-8d72-f41d2a465a78', + twitter_handle: 'Coinkite', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/f1879df9-9bc6-4a76-951f-24548da768ef.jpg', + keyword: !0, + link: 'https://anchor.fm/s/9500fad8/podcast/play/64850866/https%253A%252F%252Fd3ctxlq1ktw2nl.cloudfront.net%252Fstaging%252F2023-1-11%252Fc53436f3-e1a6-2cae-eecb-fb61b06f804d.mp3', + node_type: 'clip', + pub_key: '037f7331a5bef6c6f880246747befcc3767f3bb9730bc5e6f7c3770f4184ed0bff', + ref_id: '2a01dc8c-19f7-47a8-bfa8-92645a7314c0', + show_title: 'Bitcoin.Review Podcast with NVK & Guests', + text: "super effective. But see, here's the thing. As bitcoin grows, right, and we have more people with their bags depending on it, the more you're going to have screech, that's a feature, right? You want this to be progressively become more immutable even as a feature set. So I think we're still in a place where a few things could get in. But I don't think we're far from a true ossification of new features. Unless people come up with some more clever way of testing them out on main chain, I don't see how this gets much easier. I just think it's just to spice up the conversation and throw in some opposition. I think the counterpoint to that is that I'm really worried about some future where Bitcoin the scale of Bitcoin is limited to what we have today and it becomes this gold like asset where as a regular person, as a non institution, you can't actually take custody of your bitcoin. I just think that's a failure mode because at that point it's just like maybe a slightly better gold that develops a paper market, gets captured by governments to some extent rehypothecated all that stuff. Yeah, I mean, can we just recognize that gold lost it had to have 5000 year run, right? And it's an element, it is a fucking universe element. It conducts electricity really well. I mean just like this thing lost an element lost, right to human ingenuity. Right? The MMT guys are smart as fuck, right? And they will find a way to try to gain bitcoin. FTX was a Fiat maxi attack on bitcoin. They inflated the bitcoin supply by what, 20% for the epoch. It's crazy. It's absolutely crazy. And bitcoin not inflating is the whole fucking point. We're going to have to create defenses against Fiat attacks. It's not going to be the guy using the back door or an ECDSA. Extremely unlikely, right? Like it's going to be like how they, they capture, you know, 60% of the bitcoin custody and coinbase and then they start inflating that. Exactly. Because, look, changes that happen to bitcoin consensus are in the open. You can look at the code and you can judge it for yourself. So if someone comes along and tries to change the supply schedule or the inflation rate, that's obvious. And that's not going to be a very effective attack on bitcoin for that reason. It's going to be exactly what you're describing. It's going to be on these higher layers on the Fiat, on and off ramps. If they want to antagonize bitcoin, hiring an open source developer to go and try and sneak some change in is going to be totally effective. Operation Orchestra is in full effect. Right, let's waste everybody's time with stupid shit, but think about the whole game that just happened against bitcoin, right? Total price Suppression coordinated or uncoordinated. So you have the Fiat Max is doing and come on state backed like FTX, right, like inflating the supply. And then you have CME adding all the possible ways for you to short bitcoin and then they don't give us a Spot ETF to call his motherfuckers up. Right. And bitcoin is extremely illiquid, right? You have Spot, you have 10% of all bitcoin supply available on Spot. So you can't call their bullshit. If you just think about that for a second, it's like, holy shit. And this is not even how far these guys can go. This is a Sunday play for them. Right? Absolutely. It's also today, it's something like only 10% of all bitcoin is custody done on these institutions. It gets worse without Ball, so you can't reasonably custody lots of bitcoin safely. It's going to move more and more and more on the coin base and it becomes like an even easier attack. And what's the natural market response like, oh, well, I can't actually move my bitcoin because it's too expensive, because it's like locked up with 50 HSMs. So instead what I'm going to do is I'm going to transfer a paper claim on my bitcoin, which is custody at this institutional custody solution. And then you just start rehypothecating bitcoin. Well, that's exactly what happened to Gold. Bingo. But MVK, to go back to your point, it is vitally important that we maintain this culture of not changing the premises of bitcoin, not changing the property rights. And so people have to develop the ability to distinguish changes that are even remotely close to challenging that versus these gardening changes, where it's like, yeah, you can completely understand this feature. It's not going anywhere near the viability of the system or the premises. Bitcoin is like America, and America relies on the founding documents, the frameworks that are tangible, but it also relies on the cultural ethos of pushing back on ambiguous situations that challenge the premises of the system. So I totally believe we need people out there who are skeptical, but you need to have the wisdom to be able to differentiate between things that are going to help the system versus things that challenge its premises. Yeah. I mean, one of the longest running debates in Bitcoin, which is like I think one of the juicier debates is, should bitcoin be money or should it be smart contract fuel? Right? And I think that anytime somebody tries to introduce a change that allows for more expressibility of script or allows for more novel pagan mechanisms or whatever, one of the pushbacks is, okay, well, Bitcoin isn't for arbitrary program execution. It's for money. Hopefully, the thing that people can distinguish is that a vault or something like it is doubling down on custody. Right. It's making the money part better. Right? Yeah. My rule of thumb for Bitcoin sort of like very grug brain sort of framework is every single Bitcoin feature serves at the store of value. Pleasure. That's the king. Right? Anything else you add in Bitcoin is for that bitcoin having uncensored transactions. It's because we doubt that you don't have a store of value, right, because somebody can just make you not spend or take it from you or block you. So some privacy is for that, so that you have the privacy to transact your store of value, so you protect the store of value. Right? So every single change and every single thing that I see people trying to add to it, does it really fit that box? And it's a small box. I think that was one of the original sins of the CTV sort of frame narrative. It was, like, sort of unleashing this galaxy brain into sort of like, look at all the cliches they can do. Oh, my God, this is amazing. Right? That doesn't really help with store of value, so go fuck yourself kind of thing, right? And I think that if we can just help people who may be on the fence or who may be against this proposal, for example, just understand that this does fit that small box. It's in the name, and this thing is to help you hold your coins and have property over your coins and not be capturable. Right? I think this would move sort of, like fairly fast and fairly straightforward. And if we have more criticism, that is, like, completely stupid and retarded addressed is even better, too, right? We need to get things that are completely absurd addressed and raised, even by us. It's like, oh, what if shot 256 is broken. Well, I mean, airplanes fall from the sky. Everybody can understand that. So 51% attack every all time high, it comes back to bitcoin, right? It's not like that. You have to have this sort of very attainable china. You have to have this very attainable, very drug brain explanations of things, because my pocket doesn't care about how complex and cool bitcoin is. I don't want to have to think too deeply about these concerns with my money. And I feel like you've been doing a very good job. From the things I've read and sort of seen about up vault, I guess that's where I wanted to do with this episode. It's, like, sort of like address it, see if we can pursue some paths here, reflect ", + timestamp: '01:42:14-01:50:45', + topics: ['Bitcoin ossification'], + type: 'podcast', + weight: 35.73467097580786, + }, + { + boost: 0, + date: 1663791655, + description: 'Software update: Blockclock', + episode_title: + 'BR006 - BestBuy stocks HW, Podcasting 2.0, COLDCARD, ETH Merge, ATEC608A, Mullvad VPN hardware & MORE ft. Odell, Bitsten & Pierre Rochard', + guests: [ + { + name: 'Pierre Rochard', + profile_picture: 'https://pbs.twimg.com/profile_images/1567258180861792256/EEEBkvQR_400x400.jpg', + ref_id: '426b30ba-7c24-4558-b926-ec307756a876', + twitter_handle: 'BitcoinPierre', + }, + { + name: 'Matt Odell', + profile_picture: 'https://pbs.twimg.com/profile_images/1421584695746338819/Z_7ZfAeP_400x400.jpg', + ref_id: '4f2825ff-3b88-4595-84d4-36e81544b79a', + twitter_handle: 'ODELL', + }, + { + name: 'Micheal Goldstein', + profile_picture: 'https://pbs.twimg.com/profile_images/1362578436665995266/yssI-4C__400x400.jpg', + ref_id: '1d5697ef-ac55-4685-9ee1-80d8d7c6c501', + twitter_handle: 'bitstein', + }, + ], + hosts: [ + { + name: 'NVK', + profile_picture: 'https://pbs.twimg.com/profile_images/608402052247658497/ENDv0BNd_400x400.png', + ref_id: 'd754e29b-2d3e-4280-8d72-f41d2a465a78', + twitter_handle: 'Coinkite', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/cd6b8d64-bd52-4f1e-86b3-ca8ba2eb169f.jpg', + keyword: !0, + link: 'https://anchor.fm/s/9500fad8/podcast/play/57914686/https%253A%252F%252Fd3ctxlq1ktw2nl.cloudfront.net%252Fstaging%252F2022-8-22%252F6271b859-79c4-08f7-d185-5b9264f98cfe.mp3', + node_type: 'clip', + pub_key: '', + ref_id: '6f6860cf-08b2-4c3c-96e8-dc9ef8474b37', + show_title: 'Bitcoin.Review', + text: "All right, next block clock 1.2.0 was released yesterday. It's a small release now, the micro, it's the same binary for both, which is kind of cool. So we now support the block lock micro. And there is a new version for the mini. Wait, let's see that again. It's fucking tiny. Yeah, it's just like the bitcoin price right now. Fucking tiny. You don't need to update your block lock mini. This update is kind of optional. Not much for it. It just wanted to consolidate to a single binary so there is less stuff to be reviewed. ", + timestamp: '00:12:43-00:13:27', + topics: ['Blockclock'], + type: 'podcast', + weight: 4.302981214595846, + }, + { + boost: 0, + date: 1673187067, + description: "Nuclear Bitcoiner's background and his work in Canadian Nuclear Labs", + episode_title: '@NuclearBitcoinr - Mining #bitcoin With Small Modular Nuclear Reactors. #313', + guests: [ + { + name: 'Nuclear Bitcoiner', + profile_picture: 'https://pbs.twimg.com/profile_images/1443185278525579278/_Yl1nao1_400x400.jpg', + ref_id: '60f5891f-0864-4ed4-987a-81da4768b3ba', + twitter_handle: 'nuclearbitcoinr', + }, + ], + hosts: [ + { + name: 'Daniel Prince', + profile_picture: 'https://pbs.twimg.com/profile_images/1589940494364205056/rnHs5gI3_400x400.jpg', + ref_id: 'df2d4d35-3e96-44ed-b1cc-cb8a714bbe30', + twitter_handle: 'PrinceySOV', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/e1eca67b-d372-4031-bf1f-8f0ff7fe6092.jpg', + keyword: !0, + link: 'https://anchor.fm/s/1346f9e8/podcast/play/63208295/https%253A%252F%252Fd3ctxlq1ktw2nl.cloudfront.net%252Fstaging%252F2023-0-8%252F4a07b2fe-eb1d-2c82-677e-8f2808a09536.mp3', + node_type: 'clip', + pub_key: '02545c14cbb18a61f20dd45f5e3dcbd9acae3de282369501040adce32a75311309', + ref_id: 'a1ba314f-1a9e-432e-9350-d3b085c5c4d6', + show_title: `Once Bitten! - if ( i >= samples ) { +A Bitcoin Podcast. +`, + text: "how did that kind of come to be? Was that just following your nose when you were going through the education system? Like, I enjoy being in the lab and want to carry on this kind of field of investigative kind of scientific work. Well, basically I played into my strengths in high school was math, chemistry, physics. And then I probably had the intellect that I could have gone on and done something like a full on engineering, but I was not mature enough at the time to pursue that and would have, may or may not have been successful. So I went into the college technical trade route and became a chemical technologist. Basically, I learned how to do lots of just laboratory technical stuff and operate instruments that do the heavy lifting. And then I had a few jobs in the industry in Ontario. And then ultimately, after my most recent layoff, before I started working at Canadian Nuclear Labs, I had a year long period where I was unemployed. And then I just kept throwing resumes out to everywhere that had good work prospects for chemical technologists. And getting into the nuclear field is a pretty good space to see the wider landscape of just like the whole energy systems as a whole, because here we do a lot more than just, like, nuclear research. We do energy storage research, hydrogen research, electrical engineering type of stuff. So there's a pretty wide spectrum. And now we're even getting in on fusion, which was announced that CNL is collaborating with Fusion company before that big announcement, what was it, yesterday or two days ago, that some fusion company in the United States had just successfully created more power from a fusion reaction than they had previously. So that's another project that's being collaborated on here at Canadian Nuclear Labs. Lots of cool stuff Canadian Nuclear labs do. What exactly? What's the kind of remit you have there? It's essentially like the equivalent of the national laboratories. Like the United States has, like the Argonne National Labs. And what is it? The Idaho National Lab. There's six or seven in the United States, but this is Canada's equivalent, where we do the big research and it supports the wider industry. And we're also going to be building what is likely going to be the first small modular reactor in Canada. It's going to be the first demonstration unit for this type of reactor. Well, then there's several other ones that are going to be built at various other sites. And that's a project that Canada is very excited to move forward on with leveraging our existing nuclear power infrastructure, like right from mining to fuel fabrication and reactor design and construction. We've got everything from mining to the decommissioning and waste processing. All right, okay. ", + timestamp: '00:10:29-00:13:41', + topics: ['Nuclear Bitcoiner', 'technologists'], + type: 'podcast', + weight: 17.283954599942344, + }, + { + boost: 0, + date: 0, + description: 'What might the information age do to income distribution?', + episode_title: 'The Sovereign Individual - The End of Egalitarian Economics', + guests: [ + { + name: 'chriskapilla', + profile_picture: 'https://pbs.twimg.com/profile_images/1362817539135463427/2AXUeFLV_400x400.jpg', + ref_id: '9d495790-93f2-4d6c-b770-b2885f66859d', + twitter_handle: 'chriskapilla', + }, + { + name: 'remydenton', + profile_picture: '', + ref_id: '5c5beb0c-c214-4f23-b79a-e71bf9368f2d', + twitter_handle: '', + }, + { + name: 'JackRonaldi', + profile_picture: 'https://pbs.twimg.com/profile_images/1583261828628496384/IazkwYjk_400x400.jpg', + ref_id: '01621476-f040-49dd-8160-4035228faf78', + twitter_handle: 'JackRonaldi', + }, + { + name: 'AlistairZ80Aftw', + profile_picture: 'https://pbs.twimg.com/profile_images/1362882489895841795/gH2zix3l_400x400.jpg', + ref_id: '3dcba197-47ca-40c0-857d-73cec4325801', + twitter_handle: 'AlistairZ80Aftw', + }, + { + name: 'mattonbtc', + profile_picture: 'https://pbs.twimg.com/profile_images/1549459254280687618/jzdHJou3_400x400.jpg', + ref_id: '998167d3-e036-4ef1-9a05-4f062903f0c5', + twitter_handle: 'mattonbtc', + }, + { + name: 'wai_wairua', + profile_picture: 'https://pbs.twimg.com/profile_images/1536570699761848320/T10Owc60_400x400.jpg', + ref_id: 'c4d4ff36-73fa-4471-91ba-de0f99a49e99', + twitter_handle: 'wai_wairua', + }, + { + name: 'UltraSolomon', + profile_picture: 'https://pbs.twimg.com/profile_images/1468332451055427601/YVgUuUHc_400x400.jpg', + ref_id: '6371d519-cc98-4bf4-9f82-be17b1ea532a', + twitter_handle: 'UltraSolomon', + }, + ], + hosts: [ + { + name: 'BTC_Venetians', + profile_picture: 'https://pbs.twimg.com/profile_images/1557482467539521537/Kel-eVww_400x400.jpg', + ref_id: 'a6313ca9-3869-4477-88ad-30172957edcf', + twitter_handle: 'BTC_Venetians', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/75ec86b1-cb6d-467f-a66e-5e642e5c126a.jpg', + keyword: !0, + link: 'https://stakwork-uploads.s3.amazonaws.com/uploads/customers/2707/media_to_local/c8cc9ec1-061d-4f53-a24b-ee43a56c7715/e650057e-2369-4e75-8119-4975a1fc4cac.mp3', + node_type: 'clip', + pub_key: '03eb026c3e6597055595e42299377a4e164982775cc67f1d2135d9f1cd3a89f526', + ref_id: 'c7542511-7354-423c-b6e0-8c0349d5a511', + show_title: 'Bitcoin Venetians Book Club', + text: "so next question is what might the information age do to income distribution? I was wondering on this, I haven't really thought it through properly, and some people might have more experience in reality on this. Can somebody in the Congo really fire up a laptop and get the same way to someone in Silicon Valley? Is that currently possible or does the market arbitrage that fact? And because you're putting it to a broad swath, it's more competitive and actually has a downward pressure on that bouncy or that price that might be paid. If he's working remotely, he'll be able to save money because it doesn't matter where he is except if he's a gamer. If he's a gamer, he needs low latency and the Congo will be no good for it. There's also a funny part of this, which is that currently somebody who can potentially do the exact same job in the Congo or even Eastern Europe, for example, will earn less money than somebody who's doing that job in Western Europe or the US. Some extent, I think part of that could be there are sort of cultural soft skills that go into a job that are important, but it also might be just a timeline thing like that. It takes enough time and enough progress on this sort of technical evolution of having these geographic walls broken down for that to play out, and for a software developer in the middle of the Congo to be exactly equal to a software developer in Silicon Valley. I don't think that I think, in. Terms of the book, the guy in the Congo is not necessarily a local. He's one of our locals, if you like. He's on holiday or a protracted holiday, or maybe he's moved there. I don't think that setting up equal payment is really that relevant at this point. The big change was there was some capability at all. I remember back in the Ox working as a consultant and then looking into subcontracting out to people in Asia. They'd be getting much less than I would be, but they'd be getting something, and it'd be so much more than they could get any other way, that it was a big step up for them. And maybe over time, you've got an algorithmic coming together of the two different prices, but initially there's going to be a gap. But I don't think that gap really matters to those people because of such a greater opportunity than it was before. You know what I thought of, actually this question was, even within the US, in, say, the same company, they will offer a different salary. If you live in Silicon Valley versus, I don't know, Montana or something, doing the exact same job, if you were to move from one of those cities or locations to another within the same country, they would change the amount of money they're paying you, which is kind of hilarious, but I'm not sure what clearly, there's some force going on there. I don't know if it's just like, habit or go ahead, Chris. London waiting has been around at least the last 30 years. Whatever job you did, if you did it in London, you would get paid more for being in London than you would if you were doing the same job elsewhere in England. I think the Silicon Valley thing, as much as it seems ridiculous, isn't really ridiculous just because the living expenses being there requires a higher salary. Right. So it makes sense from the employee's perspective, but from the company's perspective, shouldn't. They. For the exact same amount of skills? If you can pay somebody less, why would you not do that? Well, from a company point of view, you're probably paying more, so you can bring them in and dress them down when they do wrong. That's a good point. I think companies are as a result of the pandemic and working from home, companies are more much more comfortable than with people working. Twitter has required everybody to go into the office, haven't they? So I wonder whether there's something to be said there that their wage bill is going to go up, even though they've got rid of loads of people. Michael Sailor said once, I think it might have been with some podcast, he was saying at MicroStrategy, he told people that if they didn't come into the office, they're gone. But then he learned through the pandemic that that was actually kind of stupid and he changed his policy. I suppose the discussions kind of seem to be around whether there's intrinsic value to an employer having the employee there or not. And I think that's currently playing out in real time because everyone was talking about the new way of working. But I know in my own circles, my own business circles, everyone who could recall employees since has. So I don't know if that's got to do with Micromanagement or anything, or perhaps some business models are better having people there than not. It's probably one of those kind of middle ground things. But, yeah, even in New Zealand, like in our major city, Auckland, people will get paid significantly more to work there. And part of that is because it's factored into it's so much more expensive to live there. It's an interesting question. Got a new speaker, it looks like. Solomon, do you want to share your thoughts? Yeah, I just wanted to share my thoughts on the London situation. So I live and work in London, and in the business that I work in, I get paid a lot more money to be in London than I would be if I was in another city like Manchester or Birmingham or anything. And to my understanding, the way all works out is it all balances out in the end, because in London, they get so much more business. Like the company I work for, most of the people come from the Middle East and you just wouldn't get that business anywhere else at that level of volume as well. So it all balances out, it's just levels, isn't it? Like if you're in a small town, there's less customers. Yes, the cost of living is lower, but everything is the same in terms of percentages of ratios. Do you get what I'm saying? So that's how I look at it. They worked out salaries and costs to get there. Wherever you are in the country, the two end up being the same. So you can live in York, but you're going to pay the same as because you're traveling all the way down to London. Absolutely right. Nobody wants to leave London to go Birmingham or Exeter or somewhere to do work. So, Solomon, in your industry, maybe you can tell us what that is. Is there still a distinct advantage to in person, face to face sort of physical meetings, rather than, could the whole thing just be done online? In which case it would make more sense for people to live in cheaper areas and get paid less? You could never do it online. The business that I'm in, maybe some of the KYC stuff, maybe, but not the whole business. The whole business has to be face to face and the staff have to come in. Yeah, like in my own experience sorry, go ahead. I was just going to ask in some far off future, if you could put on a VR headset and there's a robot in London and you're outside of it and you could just using our imaginations, do the same job, is there still an intrinsic arbitrage there or not? In terms of salary? That's a question for you, Sullivan. Was that question for me? What was the question? It was quite yeah. Let's just say that in the future, using our imaginations, we find a way around you needing to be physically in your job in London and you moved outside. I don't know if it's VR sets in, the robot, just to say we found a way around it. Do you still think that there would be a difference in the wage or not? Actually I've actually said something similar, but I've always said that the transportation system across the UK needs to be better so that people can come from, let's say, Manchester or Wolverhampton to London in a very short period of time with like some super high speed rail and that kind of allows people to live outside of London. It also gets rid of the crowding at the same time. It might make the house prices go up across the country, but it all averages out so that you don't have like, what is it, 9 million people in one sea? That's what I think is advantageous. As for using VR and headsets and stuff and alternative reality, I can't even get my head around that. I think it's all about transportation, making sure that you can get across England really quickly and that will be amazing. But I don't think the transportation system is incentivized to do that because it seems to be quite unionized. That's my understanding. Maybe people can correct me on that. That's an interesting point because what I was going to say is during COVID I started a new job during COVID and I hadn't met my coworkers until maybe like a year and a half in. And while we got along meeting virtually or video, it wasn't really until we got to meet in person that we became kind of like we started clicking, I would say, as a team and Gelling and I think it's like human interactions. You do need to be kind of face to face to build those relationships and to build that trust. It's much harder when there's like a screen in between and I don't know, maybe at some point in the future VR can kind of mimic that somehow, but I don't really see that on the horizon anytime soon. To your point, Solomon, it seems like transportation being quick would be the best way to overcome that because like let's say people do want to live in different places and be a dispersed population. Like, if you could I think the hyperloop I believe it was something like you could go from New York to Hong Kong in 90 minutes. If you could do that kind of commute halfway around the world that quickly, then people could live anywhere and they could kind of just come in and meet when they need to and work from home the rest of the time. Yeah, that would be an absolute dream if that happened. That would be an absolute dream. One of the things I missed for not living in London now that I'm living far out on the east coast is that when the nights draw in, which is early. If you want a bus and it turns out once an hour, you've got to use a torch to wave it down. You can't just stand there with your arm. ", + timestamp: '00:42:09-00:54:26', + topics: ['Income Distribution', 'Information Age'], + type: 'twitter_space', + weight: 4.247717380523682, + }, + { + boost: 0, + date: 1639803600, + description: '[[Bitcoin [[Bull Market]] Prediction', + episode_title: 'WHY ARE WE BULLISH Michael Schmidt Jeff Ross Joseph Brown Greg Foss ep224', + guests: [ + { + name: 'Greg Foss', + profile_picture: 'https://pbs.twimg.com/profile_images/1552599670945464320/3OgqRHNo_400x400.jpg', + ref_id: '853d9f80-f6cf-490f-9d1e-f29cdc6acc6f', + twitter_handle: 'FossGregfoss', + }, + { + name: 'Jeff Ross', + profile_picture: 'https://pbs.twimg.com/profile_images/1475554600094552064/DSlPG1lx_400x400.jpg', + ref_id: 'ae6ee2a2-1cf7-41a0-8366-ff6e94a6403c', + twitter_handle: 'VailshireCap', + }, + { + name: 'Joseph Brown', + profile_picture: '', + ref_id: '803206b6-7b9f-48e0-a5d5-7348f6842cca', + twitter_handle: '', + }, + { + name: 'Michael Schmidt', + profile_picture: '', + ref_id: 'e94a106d-cbea-4b30-b0cb-3825979179ca', + twitter_handle: '', + }, + ], + hosts: [], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/728d91e9-025d-43a7-8467-2c8d264ddf59.jpg', + keyword: !0, + link: 'https://anchor.fm/s/11e95d20/podcast/play/45019495/https%3A%2F%2Fd3ctxlq1ktw2nl.cloudfront.net%2Fstaging%2F2021-11-18%2Fe04d11e7-ede5-a987-e943-f3fc2482fe80.mp3', + node_type: 'clip', + pub_key: '', + ref_id: 'a03e4374-8b17-4875-93ff-3410295eaae1', + show_title: 'BTC Sessions', + text: "It's interesting because there were so many people that thought before the end of the calendar year, we were going to get that parabola that blow off top. And historically, we've only got 2013 and 2017 to look for. So November and then December to have a Bull market run into a second calendar year would be the most Bitcoin fuck you thing ever, because it's like the opposite of what the majority like right now. You have like, obviously there's like the whole Plan B stock to flow thing, and everybody that hated that idea, like, dancing on its grave and all that kind of stuff. And I'm not vouching for stock flow or anything, but I'm just saying that the sentiment that I've seen other than, like, hardcore Bitcoin is pretty muted to bearish at the end of a bold year. And historically, we haven't really seen that yet. So it would be just so poetically Bitcoin to see like a blow off top in, like, spring. It would be hilarious. Yeah. I basically projected out to some time at the beginning, like very, very late February to very, very early April for this market cycle. And here if we do start to resume upward 70 $80,000 and higher, you're going to hear the drumbeat of the super cycle really starting to take hold, especially in people who are very new to Bitcoin. And I don't buy into the service cycle yet. Let's say you're right. Let's say that we're getting longer Bull runs and then shorter bear markets. But like equally violent, the super cycle happens when the length of the bear run extends beyond the four you're having. Right. Like that's the true supercycle, I imagine. Yeah. So eventually those so if you draw a line through the Bull market tops in terms of blocks and the bear market bottoms, you actually get lines that are both going to the right. But the bear market is going to the right slower than the one than the Bull market. So those do eventually converge, which I mean, before that, you probably just get such small differences between Bull and bear markets that you don't really get much at all, especially as the market starts to price that in. Yeah. And then I was also tripped up a little bit because the central bank expanded their balance sheet like crazy after the repo market blew up. But only half of the money actually has made its way into the economy yet. Right. I don't think people can really even conceptualize that. Well, what that even means because that means like another 25% up in stocks in like half a year. I don't know if you guys have seen Joseph Wang, the Fed guy, he put a chart out basically showing how the money flowed into the real economy. Half of it went into the real economy from the Fed, but the other half went into the TGA and then into the reverse repo and is now, I would assume, going to make its way into the real economy. Damn. Okay. Well, I'll open it up to Jeff. Joe, thoughts, do you prescribe to anything around, like having impact on price? Are you cynical of that kind of thing? What's your general thoughts on what we're talking about here? I'll ", + timestamp: '01:07:54-01:12:11', + topics: ['bull market'], + type: 'podcast', + weight: 4.226754200646043, + }, + { + boost: 0, + date: 1662010885, + description: 'How Sparrow wallet improving UX for Bitcoin client software', + episode_title: 'BR005 - Bitcoin Wallet Experts Roundtable ft. Odell, Bitstein & Pierre Rochard', + guests: [ + { + name: 'Charles Guillemet', + profile_picture: 'https://pbs.twimg.com/profile_images/1363770113162379265/7S1mRttg_400x400.jpg', + ref_id: 'c726ddde-836d-4f6c-9b6e-bb9e4d9365a7', + twitter_handle: 'P3b7_', + }, + { + name: 'Matt Odell', + profile_picture: 'https://pbs.twimg.com/profile_images/1421584695746338819/Z_7ZfAeP_400x400.jpg', + ref_id: '4f2825ff-3b88-4595-84d4-36e81544b79a', + twitter_handle: 'ODELL', + }, + { + name: 'Graig Raw', + profile_picture: 'https://pbs.twimg.com/profile_images/1362841242665631745/UtA3FBQU_400x400.jpg', + ref_id: '66fade84-61db-4cb1-b4a9-b759e285eb82', + twitter_handle: 'craigraw', + }, + { + name: 'Lazy Ninja', + profile_picture: 'https://pbs.twimg.com/profile_images/1362843002318721028/PNKWuu0-_400x400.jpg', + ref_id: 'f855515d-75c4-4287-9a3d-e45d7ac25ddf', + twitter_handle: 'FreedomIsntSafe', + }, + ], + hosts: [ + { + name: 'NVK', + profile_picture: 'https://pbs.twimg.com/profile_images/608402052247658497/ENDv0BNd_400x400.png', + ref_id: 'd754e29b-2d3e-4280-8d72-f41d2a465a78', + twitter_handle: 'Coinkite', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/cd6b8d64-bd52-4f1e-86b3-ca8ba2eb169f.jpg', + keyword: !0, + link: 'https://anchor.fm/s/9500fad8/podcast/play/56934513/https%253A%252F%252Fd3ctxlq1ktw2nl.cloudfront.net%252Fstaging%252F2022-8-1%252Fba1b9425-ee1c-d0fd-3048-f50bdcc17c14.mp3', + node_type: 'clip', + pub_key: '02545c14cbb18a61f20dd45f5e3dcbd9acae3de282369501040adce32a75311309', + ref_id: 'f779d2b8-6e89-4ddd-ae99-6d1223615400', + show_title: 'Bitcoin.Review', + text: "and that sort of like, brings Craig in because Craig did a very incredible, in my view, upgrade in UX from a similar model to Electrum. Right. It's an SPV wallet, it's a desktop wallet and it's sort of like he does multi SIG, it does a lot of the advanced features, but like, it's a much more sane UI and UX. So Craig, like, what brought you to develop Sparrow and like, some of the reasons why you made those UX decisions? Yeah. If we zoom out a little bit here and we look at where we have come from and where we're going and what people view as important in the space, I think that most of the kind of opinions and the views that you see all have a very natural and human flaws that they fail to kind of take into account the kind of span of time. They all have quite a recency bias to them. And for me, designing Sparrow, it's not dissimilar really. I was just trying to improve and take what I think is ultimately going to be seen as a fairly small, incremental step in terms of the UX of wallets taking at least the UX of sort of more advanced, more capable wallets, perhaps more difficult for nobs, but certainly you're able to do more with them. My intent was to really take what Electrum was offering at the time, which I thought was a good concept and a good kind of model. This idea of a light client which they really pioneered and really just put it into a different package with better UX, with a more sane kind of data model and UI model. You know, that was really my intent. Where we are going next, it's hard to say, right. If I knew the answer to that, I would be trying to build it, perhaps, but it's really hard to say. And that's, I guess one of the great things we all get to experience on this journey is the ability to see whatever is next and kind of be part of that. But yeah, that's really what I was trying to do. I kind of built Sparrow for myself. That's already the case. Whenever I come to a decision point and I don't know what to do, I kind of have to go back and say, well, what would I like to use here? And that kind of defines it for me. I have the advantage that I didn't set this thing up to be a business like you guys. We didn't start it as a business for gold card either. It's just kind of funny. We did it because there was no alternative that we were sort of happy with. Yeah, I mean, sure, so often it begins there, but now it's become something else, right. And I think that's always a challenge, right. That kind of trying to maintain the balance of who are you building those things for? Because if you're building it for somebody that isn't you, that immediately creates a bit more of a challenge. Right now you're trying to imagine yourself as someone else and what would this person ", + timestamp: '00:07:41-00:11:10', + topics: ['Bitcoin UX', 'Sparrow wallet'], + type: 'podcast', + weight: 4.24243519079696, + }, + { + boost: 0, + date: 1664928e3, + description: "kotty Auditore's suggestion for BOLT FUN", + episode_title: 'Meet the Makers: René & Koty', + guests: [ + { + name: 'kotty Auditore', + profile_picture: 'https://pbs.twimg.com/profile_images/1608131189289746432/DP7GXDLw_400x400.jpg', + ref_id: '8d04ee18-3cc1-4a73-8510-05e70dbdb661', + twitter_handle: 'koty_auditore', + }, + { + name: 'Rene Aaron', + profile_picture: 'https://pbs.twimg.com/profile_images/1499715029834375172/g8uCieYv_400x400.jpg', + ref_id: '0ed58288-3a54-46e4-8734-8a133ffcdbb3', + twitter_handle: '_reneaaron', + }, + ], + hosts: [ + { + name: 'Ed Pratt', + profile_picture: 'https://pbs.twimg.com/profile_images/1093488670567473153/MNg7qh0q_400x400.jpg', + ref_id: '6c9444a7-3133-4cf2-b078-96a5e5af4b93', + twitter_handle: 'MrEdPratt', + }, + { + name: 'Moritz Kaminski', + profile_picture: 'https://pbs.twimg.com/profile_images/859727763292512258/kiFpZ2vO_400x400.jpg', + ref_id: '2e185741-dd90-4772-a554-5f4d28e11650', + twitter_handle: 'MoritzKaminski', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/965489b4-a414-4fd0-ab8c-55911b1596aa.jpg', + keyword: !0, + link: 'https://www.youtube.com/watch?v=5XQKuhLnhjg', + node_type: 'clip', + pub_key: '', + ref_id: 'fd20d403-6fec-401f-9503-d20e298912b6', + show_title: 'BOLT FUN', + text: "I said before I had a suggestion for Bug fund. It's just like this is an idea I want to share with you and then you play with it. I love we have this hackathon. I love the way it went through. It was so smooth. Ed is amazing. The judges were really nice but now that it's called we are Makers like when you're presenting you're a maker, either you are a developer or a designer or any role, you are, let's say, in a team, why also not include like, projects to be granted or have a price, projects that involve businesses? Because one of the things that I noticed about the whole event is that what's kind of like a cool shark tank. Not a shark tank like with Mark Cuban very asking for loans and so on. This was more like grants, but it was kind of the same way because what's the value of it? How does it work? You have to present it and you're being judged. So it felt kind of, as I said, again, nice shark tank one. So why not having something like that as well and have like a section you might start with something like maybe small prices or a section of people who think of a business using Weber land, using Lightning in general in their communities and they present and you have Geyser. Yes, of course. But Geyser is more open to crowd funds. You can have a non governmental project. I'm talking about a business, let's say someone who says, I'm going to open, I don't know, or a juice stand and I'm going to charge Enlightening and then okay, it might sound simple, but it's like how are you going to do it? How are you going to charge people? How are you going to be sure that people will pay you in Bitcoin? Are you going to teach them so they will present like a whole project of what they're going to do to have a business that works with Bitcoin? Because I think that's something that we all want to see in the end. We need Bitcoin to be used in businesses and people creating business and jobs for people around the globe. So something like that would be like, let's say in a very extreme scenario, someone don't have the funds to start something, but maybe the price is enough to at least buy a new phone and buy a stand, let's say for these hypothetical orange juice stands, just to say something and he can kick off from there. Or she. The idea is that bigger teams can present something in front of a jury and they get also a bit of a bit more funding so that they can really start off product development process and have an MVP as an outcome and contest it. Yes. I would love when I was presenting this to all of you guys, I was like in the back of my mind I was having this. Imagine if this is not only a project for a feature or an application, but also to take these applications that are presented in the hackathon. Imagine that someone takes one of the projects in the hackathon and they make it like they're going to use it for their business. That would be sick. That would be really nice to see happening. ", + timestamp: '00:30:27-00:34:59', + topics: ['kotty Auditore', 'BOLT FUN'], + type: 'youtube', + weight: 4.326165081267448, + }, + { + boost: 0, + date: 1636993919, + description: 'What is CPU consumption', + episode_title: + 'SLP321 On chain scaling with Bitcoin Core Developers Pieter Wuille, Andrew Poelstra, Andrew Chow & Murch', + guests: [ + { + name: 'Pieter Wuille', + profile_picture: 'https://pbs.twimg.com/profile_images/1264051937172836353/n7gHdLbB_400x400.jpg', + ref_id: '40260d2f-3480-47d6-8515-d2e780901273', + twitter_handle: 'pwuille', + }, + { + name: 'Andrew Chow', + profile_picture: 'https://pbs.twimg.com/profile_images/1452266201770496010/44FHCtZM_400x400.jpg', + ref_id: 'f96d87ca-5060-4021-aeb9-61db03312027', + twitter_handle: 'andrewrchow', + }, + { + name: 'Andrew Poelstra', + profile_picture: 'https://pbs.twimg.com/profile_images/1316562683009921024/FSscAYvJ_400x400.jpg', + ref_id: '15fb9c53-c988-4af1-bbf0-4832d71b0a01', + twitter_handle: 'Blockstream', + }, + { + name: 'Murch', + profile_picture: 'https://pbs.twimg.com/profile_images/1269477743525130241/-U843Cmt_400x400.png', + ref_id: '3e2c1c73-a057-4475-9782-3bb0d3d8cc62', + twitter_handle: 'murchandamus', + }, + ], + hosts: [ + { + name: 'Stephan Livera', + profile_picture: 'https://pbs.twimg.com/profile_images/1362551718110580740/v-W5Q2uo_400x400.jpg', + ref_id: '72f57157-c96e-4466-8bf1-290cfe1f8a0b', + twitter_handle: 'stephanlivera', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/b79a3eb8-bcd0-4338-b979-d32aef360785.jpg', + keyword: !0, + link: 'https://anchor.fm/s/7d083a4/podcast/play/43381293/https%253A%252F%252Fd3ctxlq1ktw2nl.cloudfront.net%252Fstaging%252F2021-10-15%252F4872859a-d95f-b966-4c6d-df50c0d78454.mp3', + node_type: 'clip', + pub_key: '027be063cca62a6c08fbe2e8eba0aae10ad27a8896d04ee347a90fea2bce5e85ac', + ref_id: 'c6a74c1e-d942-46d9-85e0-b7f33bb41078', + show_title: 'Stephan Livera Podcast', + text: "one way to think about it. Are there any other big ideas or any other kind of key topics that you think we should touch on in terms of on chain scaling, batch validation? We've been talking about signature aggregation where we're getting rid of some of the signatures that go on chain, but there are multiple aspects to scalability and on chain space is only one of them, CPU consumption is another. And it turns out you can sort of get something similar to signature aggregation without actually doing it. And that is you still have multiple keys on chain, and you still have multiple signature completely created independently on chain, but you sort of aggregate them at validation time together and then validate them all at once. And it turns out you can do it somewhat more efficiently than validating multiple. And this is something that isn't so much being done in. This is a known technique. Like there are papers going back 1015 years explaining how batch validation improves things, but in most settings it isn't all that interesting. In our case, it very much is, because if we have a block with thousands of signatures in it, we really only care if all of them are valid or not. It's not like we care if one fails which one it is. The block is invalid, throw it away. So that's really the use case for batch validation and tap root and the Schnorr signature scheme it introduced have been specifically designed to permit batch validation. It's not implemented, but it was a design criterion in 342 that nothing in there would interfere with the ability to batch validate, which is the rationale for some of the maybe more unexpected changes. For example, the tap root script logic doesn't have a check multisig anymore, specifically because the check multisig as it existed before isn't compatible with batch validation. And so, I'm sorry, go on. To add to that, the ECDSA signatures that you were using before schnor signatures were not compatible with batch validation either. Although maybe in retrospect there were some small tweaks I guess Satoshi could have done that would have made it possible, but they weren't. And we thought about that when defining the Schnoar signatures for Tappery. And so, as I understand you then, would that be mostly a CPU saving. Or what would be purely CPU savings? That would decrease the sync time. Yeah. So you could spin up your bitcoin full node faster in a batch validation world? Theoretically. Well, only for the batch validation signatures. Yeah. Not the fast off, obviously, because that would still be. We'Re not in a rush about that, because it only becomes relevant once tap root signatures are really commonly being used. Right. But then, of course, once you implement it, it would still apply to all transactions from that point onward, compatible. So once tap root rolls out and there is Schnor signatures in the blocks, if you later then do the batch validation, you get all that. And it is not restricted to initial synchronization, of course. Right. It also helps with a new block that comes in or a new transaction that comes in. Mostly new transaction, because we cache the result of signature validation and we don't do it again. I think I'd have another ", + timestamp: '00:39:51-00:43:14', + topics: ['CPU consumption'], + type: 'podcast', + weight: 4.2267541905781005, + }, + { + boost: 0, + date: 1646456400, + description: 'Decentralization Aspect on [[Microliquidity Pools]]', + episode_title: 'WHY ARE WE BULLISH Troy Cross GoodGuy Biker Jesse Berger ep241', + guests: [ + { + name: 'Jesse Berger', + profile_picture: 'https://pbs.twimg.com/profile_images/1552386182868307971/5ApLS7LH_400x400.jpg', + ref_id: '5b38df61-d11d-4958-8aaf-80b2bcbdd175', + twitter_handle: 'jayberjay', + }, + { + name: 'GoodGuy Biker', + profile_picture: '', + ref_id: 'bca843d2-d773-4261-bac4-1402812c7131', + twitter_handle: '', + }, + { + name: 'Troy Cross', + profile_picture: 'https://pbs.twimg.com/profile_images/1561364830774124544/cKmEpj_m_400x400.jpg', + ref_id: 'ea01fb42-72e2-417f-bb3e-a45d18feeed8', + twitter_handle: 'thetrocro', + }, + ], + hosts: [], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/0ade0cc4-6303-4e28-8b00-6b3e659c1e3a.jpg', + keyword: !0, + link: 'https://anchor.fm/s/11e95d20/podcast/play/48587749/https%3A%2F%2Fd3ctxlq1ktw2nl.cloudfront.net%2Fstaging%2F2022-2-5%2F251962996-44100-2-951ca965b13a5.mp3', + node_type: 'clip', + pub_key: '', + ref_id: 'ee97306e-085f-4232-b84f-05350bd383c4', + show_title: 'BTC Sessions', + text: "Micro Liquidity Pools I want you to think of the future of Bitcoin. Like lots of little Islands of micro liquidity. The decentralization aspect is going to basically cause people to leave the main island, the main chain, go to small, trusted Islands where the rules are different, allowing them to party and do whatever they want with people that they trust, people that they love, and then they're going to get back on their main boat and drive back that main chain. So we're all going to take our cruise ships to party Islands and we're going to live the best Bitcoin life on top of those layers. So that's really cool too. ", + timestamp: '02:02:03-02:02:33', + topics: ['microliquidity pools'], + type: 'podcast', + weight: 4.201971989276868, + }, + { + boost: 0, + date: 1641254400, + description: 'How does the Liquidity advertisement works?', + episode_title: 'Scaling Bitcoin Off-Chain - TABConf 2021', + guests: [ + { + name: 'Graham Krizek', + profile_picture: 'https://pbs.twimg.com/profile_images/1600169182347288582/yNztRz0g_400x400.jpg', + ref_id: '186974f3-37dd-4d62-9d88-1b7fa88c6cce', + twitter_handle: 'gkrizek', + }, + { + name: 'Stephen Livera', + profile_picture: 'https://pbs.twimg.com/profile_images/1362551718110580740/v-W5Q2uo_400x400.jpg', + ref_id: '9c9974bd-6a59-480f-8d5a-12b634b15b39', + twitter_handle: 'stephanlivera', + }, + { + name: 'Alex Bosworth', + profile_picture: 'https://pbs.twimg.com/profile_images/1364274244960481281/G5gNi3di_400x400.jpg', + ref_id: '2389663a-f7f8-42a7-99da-551089a9ea6a', + twitter_handle: 'alexbosworth', + }, + { + name: 'Matt Corallo', + profile_picture: 'https://pbs.twimg.com/profile_images/697361498587451394/_rX0-O0W_400x400.png', + ref_id: '08cb3c45-c0bc-4a60-ae5b-a1283d352c8b', + twitter_handle: 'TheBlueMatt', + }, + { + name: 'Niftynei', + profile_picture: 'https://pbs.twimg.com/profile_images/1594756549162975240/J-4dbH6W_400x400.jpg', + ref_id: '5e9f617b-cc12-4e3d-9fb5-ad058f14b171', + twitter_handle: 'niftynei', + }, + ], + hosts: [ + { + name: 'TABConf (The Atlanta Bitcoin Conference)', + profile_picture: 'https://pbs.twimg.com/profile_images/1596233571521499138/YE8Us_Ml_400x400.jpg', + ref_id: 'e46f0c05-8cc5-4264-9c40-83b13f4edd0a', + twitter_handle: 'tabconf', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/e7d2a4ca-6b44-4a45-a94c-6f48987979f7.jpg', + keyword: !0, + link: 'https://www.youtube.com/watch?v=984L-GQkfgk', + node_type: 'clip', + pub_key: '02574d6e8e787372184b6f17c40d6c6fe1777db9015801f95dfd24692784d767cd', + ref_id: 'acdb65ab-789f-480c-9f88-414599d19a43', + show_title: 'TABConf (The Atlanta Bitcoin Conference)', + text: "you with the Sea Lightning and Block Stream approach. Could you tell us a little bit about Liquidity Adversements? Like, what are they, how do they work? Yeah, liquidity advertisements. So this is kind of in the theme of there's only going to be so much bitcoin available, and of all the bitcoin available, only so much of it is going to be interested in making itself available to a lightning capacity, so to speak. So given this assumption that there's like a subset of bitcoin that wants to be deployed to the Lightning network but needs help figuring out where to deploy itself to the idea, with Liquidity Ads, it's a Lightning spec proposal. So our hope is that it'll get adopted by other implementations and then be part of the Lightning spec. So anyone who runs a Lightning node will have access to it. But what it does generally is it allows for anyone who runs a node to advertise that they have bitcoin on their node, that they're willing to allocate to channels with other nodes. So if you start up a new node, you can basically start gossiping with the other peers. You collect all these liquidity advertisements that any other node on the network is advertising. You can see who's advertising it. You can maybe talk to some data providers about, hey, tell me about this node, what's this reputation like, how much should I value as a node in the network with my inbound liquidity needs? How much should I value what they're offering me? And then decide basically, you pay them for the service of them giving you inbound liquidity. And for those of you who are like, inbound liquidity, for those of you who aren't really familiar with Lightning terminology basically is the ability to receive payments. So this is when you open a channel, the other side of the channel needs to have funds on it so that whenever you receive a payment, those funds can be pushed to you. So basically this gives you a way to source from any node on the network. Currently only nodes that are running C Lightning and have the stuff set up exactly correctly. But hopefully in the future any node in Lightning network that wants to be able to advertise liquidity will be able to and any node that wants to be able to purchase some inbound liquidity from them will be able to do it. So it's very decentralized. There's no centralized market. You kind of have to decide how much you want to price your liquidity at on your own. We don't really have a lot of help for that. But it is like super decentralized. And hopefully it allows people in the market who have liquidity the ability to kind of set up a signal such that people who are looking for inbound liquidity. If they're willing to pay for it, we hope that that means that they're going to make good use of it. Right. Because clearly they have a use for it. So this is kind of a way of kind of decentralized matching via billboard system who has liquidity that they want to deploy and people who would like to make use of that, I think. But I'll be giving a talk on it tomorrow morning if you want to learn more about how they work. Excellent. Maybe a little bit out there as well. Like with, as an example with El Salvador, there's 6 million people who are coming onto the Lightning network. You guys are all working on the Lightning network in some way, shape or form. Do you have any thoughts on that? Does that represent like a stress test of lightning or do you think it's early days and there's essentially still a lot of on chain usage. They're not really using as much lightning yet. It is a good stress test just to just get more people using it. I mean, you're going to find where the needs are of the people and what needs to be fixed and all those things. So it is a good stress test, but I think a large amount of the like El Salvador stuff is custodial right now. So it's not necessarily stressing the lower level, like the network itself a lot. But it's really, I mean, helping a lot of people that are starting to use nodes in a much more serious way. I guess instead of just having these small nodes that do a few payments a day or something, they're actually doing like substantial payments. So I think that it's a good stress test. Any usage is good right now. I think it's more testing the implementations themselves than the network itself right. Now, which is good. I think that's a natural step in evolving the network is helping us figure out where the gaps are in these implementations and then also in the tooling, all of these things. Right? I mean, we're still obscenely early in Lightning's lifetime. I mean, certainly volume of payments wise and also people saw the CVE's that came through a few weeks ago, which can kind of best be described as like prior to a few weeks ago, the security model of lightning included you shall not open a lightning channel with any bitcoin miners. And even today, depending on the exact channel type, that's maybe a little true, right? So the security model of Lightning still has a long way to go, and we're still tightening a lot of issues up, which kind of the point about custodial wallets to some extent today with lightning, if you want to open a reasonably large amount of funds into a channel that you want those funds back. You probably kind of want to know your counterparty. Or at least know that your counterparty is not actively malicious. You're not going to put in some amount of work to steal your funds like this. We're getting there. We're getting there quickly, but we're still getting there at least make sure they're not a minor. ", + timestamp: '00:22:50-00:28:15', + topics: ['Liquidity advertisement', 'Lightning network'], + type: 'youtube', + weight: 4.194948703387623, + }, + { + boost: 0, + date: 1673187067, + description: + 'Nuclear Bitcoiner sharing his experience in El Salvador and meeting other Bitcoiners around the world', + episode_title: '@NuclearBitcoinr - Mining #bitcoin With Small Modular Nuclear Reactors. #313', + guests: [ + { + name: 'Nuclear Bitcoiner', + profile_picture: 'https://pbs.twimg.com/profile_images/1443185278525579278/_Yl1nao1_400x400.jpg', + ref_id: '60f5891f-0864-4ed4-987a-81da4768b3ba', + twitter_handle: 'nuclearbitcoinr', + }, + ], + hosts: [ + { + name: 'Daniel Prince', + profile_picture: 'https://pbs.twimg.com/profile_images/1589940494364205056/rnHs5gI3_400x400.jpg', + ref_id: 'df2d4d35-3e96-44ed-b1cc-cb8a714bbe30', + twitter_handle: 'PrinceySOV', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/e1eca67b-d372-4031-bf1f-8f0ff7fe6092.jpg', + keyword: !0, + link: 'https://anchor.fm/s/1346f9e8/podcast/play/63208295/https%253A%252F%252Fd3ctxlq1ktw2nl.cloudfront.net%252Fstaging%252F2023-0-8%252F4a07b2fe-eb1d-2c82-677e-8f2808a09536.mp3', + node_type: 'clip', + pub_key: '02545c14cbb18a61f20dd45f5e3dcbd9acae3de282369501040adce32a75311309', + ref_id: 'ba64a3e2-dd25-459b-8968-154f986c42f8', + show_title: `Once Bitten! - break; +A Bitcoin Podcast. +`, + text: "crossed. Adopting Bitcoin, give us some stories. What was going on. How was it? El Salvador? That was wild. So I took my wife. We were initially going to bring the whole family, but I wanted to just take her with us and then we can pay attention to the conference and not have to worry about the kids. Maybe next time. Or we'll go when there isn't a conference and they can enjoy the atmosphere. First we landed from Canada, so I'm still wearing my winter jacket because it was snowing in Canada when I left. And then it wasn't so bad in the airport where there's air conditioning, but as soon as you walk out of that door, you just get hit by just a wave of humidity, 30 deg, 70% humidity. And then that was definitely a change. And we had rented a car. So then we're off to like, okay, let's go find our hotel. And we didn't get a place in the city. We were off in the coast in what is it? El Tunco. Yeah, somewhere along there, about 15 minutes from Elzante. So we were driving back and forth to the city to get to the conference. So that first night was wild because we're driving in the dark in a foreign country and there's dogs all over the place. I'm used to where we are outside at night, everyone's got reflective gear, so you can see them coming from a mile away. You're driving these streets in El Salvador, and there's tight streets and the trees come hanging right over the roads. And then all of a sudden, oh, there's a person on the side of the road. Shit. Careful. So you have to be a lot more attentive because it's very dark along those roads. And then we get to our hotel. It was a really nice hotel, but the road, like the little side road that we had to take to get up there was the equivalent of the backwoods hunting road that we went to like the weekend before. It was pretty surprising. And then the armed guard led us into the compound where we were. They opened the gate for us, and he was very friendly, chat, and then starting to get into More where the language barrier was very interesting. And we live fairly close to Quebec and we get lots of French classes, so we found ourselves quite often there's, close enough similarities that we would start dropping, like, French terms and then be really confused when they look at you. No, not here. But we got checked in, and that was fun. And then we woke up and went to the conference the next day, met with a few people. Like I had been speaking with Jason Martinez and Joshua Lopez from down there in advance of the conference because we shared a panel together just talking about different ideas of how we can use bitcoin mining and potentially nuclear power and possibly even fusion in El Salvador. And then I was just running around taking in all the talks. A lot of it was very lightning and technical focused. But then there was a few other ones that were a little bit more like growing adoption in rural remote areas. And Austin Hill gave a presentation on what they're doing with Sonoda. I caught the one to talk about the Thunder games and the way that they've gotten everyone addicted to solitaire again, because now you can earn SATS playing solitaire. There was a good party atmosphere, very jovial. I met yeah, met Walker and Carla. Greg Foss was there. Met taco. Then at the end of the first day, they had a showing of the DAREDE Dream documentary that Valice did with a bunch of others. So we walked in, and then I sat down right behind a guy. I didn't get a good look at his face, but it looked like it was valid, so I just stayed quiet. And then I heard him talking to someone in front of me. I was like, oh, yeah, that's definitely it. But I didn't want to bother him while the movie was playing. But I could see when he first came on the screen, there was another guy a few seats over. He's, like, looking at us. He's like, Is that the guy? Yeah, that's the guy that's on the screen right now. And then I met a few of the others that were in the video. I met Mike Peterson briefly when we were down at the beach. And I met Chimbera, one of the guys that's doing the work down there. So we had a good conversation with just him and my wife when we were on the beach on our own the day after, because they did the first two days were conference at the hotel. And then the third day was everyone went and did the tour to Bitcoin Beach. And it was pretty packed. I'm sure they did very well financially for those few days and then because we had such a great time, we came back the day after on the Friday and I took a few surfing lessons and we just wandered around and checked out the place where it was a little quieter and enjoyed the sunset. And then on the Thursday night they had arranged to do like a turtle release where they let all the baby turtles go and run down to the ocean. So that was a lot of fun. Just really chill atmosphere. It was a really cool place and met a ton of cool people. Definitely your first time? First time around like that many bitcoiners in real life? Yes. I had been to a small Ish meet up in Toronto, would have been last July, I believe. I had met Fox in person there and the Canadian bitcoin or guys were there, a few of my other internet friends. But it is funny just going and meeting these people that you're used to just hearing their voice in your head and you feel like you are all part of this community but now they're real people standing in front of you like Paco and Prince Philip and meeting tons of cool people. But yeah, the one regret I had was I wanted to chase down Samson and talk to him a little bit more. But we'll get there. And then there was the nuclear conference. I was in Canada for four days and then I got on a plane to go to Japan. I went from very little travel at all to going to McCormick. Brought me to London to Bedford in the summer as well. So there was that. So I went from nothing. I had never left Canada outside of. Like, cross nights of Bedford. I stole the show for you. Oh, it was great. I'm sure I'll find more opportunities to do a little bit more touristy stuff. Where you put up in the Swan Hotel. Is that the name of it? Right there on the canal in Bedford? It wasn't right on the canal, it was nearby. It was only about a two block walk. I walked around downtown and along the canal and all that, checked it out, took a whole bunch of pictures, show. Everyone back home where Best in Japan did you go? Where was that conference? Cory Yama, which was on the Bullet train. It was about 2 hours north of Tokyo. I have no idea physical distance in kilometers because that train was crazy fast. Are people still going crazy covered over there and masked up on all transportation? What's the word there didn't seem like there was a lot of enforcement of it. There was. It was heavily suggested that you wear masks in crowded areas and that you're just kind of polite about it, but it didn't seem like there was any aggressive enforcement. But they're already kind of accustomed to that in their culture. So it wasn't much of a surprise to see more masks in Japan than I have been in Canada since they dropped the requirements to do so here. It wasn't bad. Nice. Good to hear. Yeah, man, Japan, what a crazy world. What a crazy, crazy world. It's an amazing place to visit. Incredible culture. Tokyo itself blows you away. And the food, obviously is just amazing. Yeah. We had a few hours in Tokyo before we had to catch our flights. We went and walked around the what is it, the Rapungi what was the, the Palace Gardens. Oh, right, yes. Yeah, like that that whole place. The walls of that place could fit my tiny little small town in northern Ontario inside of it, probably. It was very impressive architecture and building and then beautiful gardens. Did the souvenir collecting make sure that everybody got something for Christmas? But yeah, the idea was very well received. Even though we didn't win the contest. Everybody I talked to, there was one fellow that didn't seem to grasp the, well, my banking system works, so why do I need something like this? Well, you're not thinking broad enough. That's your problem. ", + timestamp: '01:23:58-01:33:27', + topics: ['Nuclear Bitcoiner'], + type: 'podcast', + weight: 17.01499311138621, + }, + { + boost: 0, + date: 1651896e3, + description: 'Discussion About Covenants and CTV', + episode_title: 'WHY ARE WE BULLISH Evan Kaloudis Q Bob Burnett ep256', + guests: [ + { + name: 'Q', + profile_picture: 'https://pbs.twimg.com/profile_images/1560683048680665088/4MrHM_UY_400x400.jpg', + ref_id: 'b0f3fa4c-eb2a-4888-be23-6bb0a529fc26', + twitter_handle: 'q_liketheletter', + }, + { + name: 'Bob Burnett', + profile_picture: '', + ref_id: 'cb1f53fa-5573-428d-b220-3e0c56f07588', + twitter_handle: '', + }, + { + name: 'Evan Kaloudis', + profile_picture: 'https://pbs.twimg.com/profile_images/1596923848997445633/DqxrGpkW_400x400.jpg', + ref_id: '420172fa-9431-4ba4-965c-adab17648d1b', + twitter_handle: 'evankaloudis', + }, + ], + hosts: [], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/2f714adf-e499-4c1f-9864-016a00737153.jpg', + keyword: !0, + link: 'https://anchor.fm/s/11e95d20/podcast/play/51637933/https%3A%2F%2Fd3ctxlq1ktw2nl.cloudfront.net%2Fstaging%2F2022-4-7%2F264028787-44100-2-16d4702c9083f.mp3', + node_type: 'clip', + pub_key: '', + ref_id: '8b91e81a-82c0-4174-b2f5-f0f665c94fa9', + show_title: 'BTC Sessions', + text: "I'll talk about very briefly because it's very convoluted and there's a lot of nuance to it is Jeff been very bullish about all the discussion about Covenants, about CTV and the small discussions around any prevail, which I'm personally very bullish about because of the enhancements it's going to make for the Lightning network through the L two spec. So there's a lot going on. Anyone who says that Bitcoin development has stagnated does not know what the hell they're talking about is misinformed and sharing their own bags. So we've got the greatest minds in the world working on this machine and it gets a little bit better every year. Damn. Okay, hold on. I maybe wanted to touch on Tarot. ", + timestamp: '00:33:31-00:34:21', + topics: [], + type: 'podcast', + weight: 4.176346512567695, + }, + { + boost: 0, + date: 1671646019, + description: 'David Zell discusses what Bitcoin Policy Institute and how it helps Bitcoiners', + episode_title: '#Bitcoin in DC', + guests: [ + { + name: ' Matthew Pines', + profile_picture: 'https://pbs.twimg.com/profile_images/1518262325949734915/a5SFNpxO_400x400.jpg', + ref_id: '6243401a-eb27-494a-b393-f2ecb02e02a7', + twitter_handle: 'matthew_pines', + }, + { + name: ' Zack Shapiro', + profile_picture: 'https://pbs.twimg.com/profile_images/1602521378695118850/I5eXxQN5_400x400.jpg', + ref_id: '736f0806-a6f5-41ea-84f8-d8e5cbd832c9', + twitter_handle: 'coinlawyer_', + }, + { + name: ' Jason Brett', + profile_picture: 'https://pbs.twimg.com/profile_images/1591476397847060482/bNapBM4Y_400x400.jpg', + ref_id: '7b8919ad-3196-46d5-9423-80eddf653e9f', + twitter_handle: 'RegulatoryJason', + }, + { + name: 'Grant McCarty', + profile_picture: 'https://pbs.twimg.com/profile_images/1587887156797792261/6w4ewhwj_400x400.jpg', + ref_id: '0bbb9ce6-25d3-4626-b3c2-96007355664f', + twitter_handle: 'grant_mccarty', + }, + { + name: ' Stephen Pollock', + profile_picture: 'https://pbs.twimg.com/profile_images/1591160404293521408/pUvBZfsR_400x400.jpg', + ref_id: '0c6704ac-558d-4de9-95f0-f96ee59657c8', + twitter_handle: 'spollockbtc', + }, + { + name: ' David Zell', + profile_picture: 'https://pbs.twimg.com/profile_images/1574417496962105344/CcIm-voF_400x400.jpg', + ref_id: '79345f31-415f-4859-9d10-2684e7006305', + twitter_handle: 'DavidZell_', + }, + ], + hosts: [ + { + name: 'Chris Alaimo', + profile_picture: 'https://pbs.twimg.com/profile_images/1579209742370672646/rck7M_MR_400x400.jpg', + ref_id: '3a1bd698-9d67-40e4-ba6d-3e2262b385ca', + twitter_handle: 'ChrisAlaimo6', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/f3a55dda-3dd5-4f62-99c1-bab3a88c27c1.jpg', + keyword: !0, + link: 'https://stakwork-uploads.s3.amazonaws.com/uploads/customers/2707/media_to_local/db9d2590-44dc-4060-bb5b-224a803cc8f7/d068deeb-6e2d-4cae-87c9-eaead4be4316.mp3', + node_type: 'clip', + pub_key: '034248fa888690a85021cf117c168a535c53b92e1fdf3e4f9cefddfe09118d8207', + ref_id: 'ab983731-f12f-41d4-8921-6388b9c064b6', + show_title: 'Bitcoin Magazine', + text: "to keep going here David Zell, our co founder, coming from the BPI account. David, I just want to kick over to you, and we've talked about a lot so far. We've really went down the rabbit hole on a lot of these items, which is awesome, even more than we expect to be able to do, primarily because some of our fellows and friends have hopped on and contributed to the conversation. So thanks for doing that, David, to those sort of listening thinking, all right, this all sounds good. I kind of have a pretty broad understanding of the status quo in DC. And where things are and maybe where they could go one way or the other or a few different directions. Could you tell us just a little bit about what BPI and other advocacy organizations like us are working on and what people are listening are like, I want to get involved. I want to call my mayor or whatever they need to do to sort of be a part of the solution here or be a part of the efforts that we're talking about. What would you have to say? What do you recommend? Yeah, well, there's sort of a host of lobbying organizations, trade associations, nonprofits that are doing similar work. We are a 501 public charity, so we're not lobbyists. We sort of focus entirely on education and advocacy. BPI is a think tank that we started a year ago. The way that we work is primarily by awarding fellowships to academics and other researchers who are thinking about similar questions as US. Right? Like, what is the future of Bitcoin and the United States, and how can the US. And other open societies leverage these monetary networks toward beneficial ends? Our sort of thesis in doing this is that unlike really any other mainline political issue or political debate, rather, that which is being debated is not totally set in stone. The terms are a little undefined. So take another issue like, I don't know, gun control or marijuana legalization or whatever it is. These policy debates happen within a pretty bounded, like, shared understanding and meaning. Like, no one is debating what a gun is. No one is debating what marijuana is. People aren't really sure all the time what Bitcoin is. And so. To have a conversation about the policy implications of x, you need to know what x is. And so we viewed BPI as a way to kind of educate and to address that issue, right, to help define that which is being discussed. The other sort of reason for this strategic approach is that if you don't believe that bitcoin is good, like if your sort of prior is that this is bad, it's going to be really hard to like, lobby someone if that's their view. Like if you go tell them, like, for example, you know, Zach wrote this great article for us explaining why Warren and Marshall's bill would effectively neuter the industry overall. But if your view is that the industry is bad, then who cares? And if you were knocking down doors trying to explain to someone why certain policies wouldn't be good for bitcoin, if you don't believe bitcoin is good, if they don't believe bitcoin is good, you're not going to get very far. So I'd say the main thing we do at BPI is sort of produce research that advances a worldview, that net bitcoin is good for the world, and in particular is good for democracies like the United States. So I guess into the kind of nitty gritty of what we do, you can kind of bucket it, I guess, broadly in three ways. I mean, we sort of publish research everything ranging from long form white papers and policy memos all the way down to sort of like basic educational materials, like one pagers on bitcoin and other various and other sort of important topics, right? So bitcoin and energy, bitcoin and national security, bitcoin and financial inclusion, bitcoin and CBDCs, all of this stuff. And disseminate that research mostly at the federal level to staffers on the Hill. The second is sort of education and advocacy. So Grant and I are in DC pretty often. Grant especially is up there a week or two out of every month, just building relationships, being a resource, taking questions, taking meetings, and sort of funneling the really awesome research that our fellows do to decision makers in the government. We also host events in DC. Cocktail hours, dinners, luncheon, learns, et cetera, and just try to provide some touch point to people who thought deeply about these issues and have views that run contrary to some of the sort of apocalyptic visions of bitcoin that some in DC have. And then third is sort of on the media side. So placing op eds about bitcoin in mainstream outlets being a resource for journalists and reporters, all sort of toward this end of having a kind of serious dialogue about the benefits and risks that bitcoin brings to the United States, but ultimately advancing this vision that we have of an America strengthened by bitcoin. So that's sort of what we do. Another really awesome group that's been around for a long time is Coin Center. They're also a think tank, but they're a 501. And so they do sort of direct lobbying. And so when bills have some probability of passing and there's language that needs to be changed, coin center is one of the sort of forces that's always there, pushing back. So that's a little bit about who we are and what we do. You can go on our website just by searching Bitcoin Policy Institute or by going to Btcpolicy.org. You can read some of the research that's been discussed today, like Zack's article, like Math White paper. But to the second part of your question, which was what can everyday people and bitcoinners do? I think first is making your voice heard. There are, even though it sounds corny, like real benefits to making sure that your elected officials know how you feel about issues. And usually it's not that hard right now, you don't want to necessarily flood a random office with an email every day about why you love Satoshi and why Bitcoin is the best thing since sliced bread. But making it clear, especially when sort of key legislation is on the table, making your voice and your opinion heard does actually matter. An example, I guess, that might help make that sound a little less naive and utopian, would be, for example, gun control, where you pull Americans and say, do you support universal background checks? It's like 90% of Americans will say yes, depending on how you phrase the poll. And even if your focus group is just card carrying NRA members, that number is still hovering around the low 80%. So if you were to kind of look at that without any other context and say, well, we live in a democracy, and the overwhelming majority of Americans support universal background checks on private sales and transfers of firearms, you would expect maybe that policy would be passed. But it hasn't been. And this isn't really a political commentary on whether it should be, but it's more to make the observation that when you kind of peel back the curtain, the amount of phone calls that politicians receive over universal background checks are seven to one against. So you got 90% of the country that supports this thing, you've got 80% of card carrying NRA members that support this thing. But the most passionate people who are sort of single issue voters on this topic are sort of by far and away the loudest voice. And so the point is just to say that a small share of the population for whom a certain issue is their most important can really wield a disproportionate or outsized impact on the conversation in DC. So I think making it clear to your elected official how you feel about these issues is important. Staying kind of aware of what's going on is kind of necessary for that. And the other big thing people can do is to donate to the people that are doing work like us. No one is sort of making money educating Washington. And so if you've got the means, donating to organizations like ours or to coin center is a really tangible and great way to participate in this effort and to support education on bitcoin. So that's a little bit about who we are, what we do, and some of the ways that I think it's best for someone to get involved. ", + timestamp: '01:02:41-01:13:19', + topics: ['David Zell', 'Bitcoin Policy Institute'], + type: 'twitter_space', + weight: 10.133384334462765, + }, + { + boost: 0, + date: 1672167683, + description: 'Benefits of owning Bitcoin', + episode_title: 'TOXIC HAPPY HOUR! #Bitcoin, Beer and Plebs! 🍻😂🤌🏻', + guests: [ + { + name: 'Dr. Jeff Ross', + profile_picture: 'https://pbs.twimg.com/profile_images/1475554600094552064/DSlPG1lx_400x400.jpg', + ref_id: '51a969bb-dbf7-4d20-b128-74dcc5f560f6', + twitter_handle: 'VailshireCap', + }, + { + name: 'Tomer Strolight', + profile_picture: 'https://pbs.twimg.com/profile_images/1591960241008148481/HtyINxtU_400x400.jpg', + ref_id: '3a2bc97d-072c-4ed9-9a59-17ceeb68fe99', + twitter_handle: 'TomerStrolight', + }, + { + name: 'Laura Shin', + profile_picture: 'https://pbs.twimg.com/profile_images/1539462748173746176/hxR80FYT_400x400.png', + ref_id: 'a56a7b4d-edca-41d5-9d51-33396aa05b96', + twitter_handle: 'laurashin', + }, + ], + hosts: [ + { + name: 'PUBLORD', + profile_picture: 'https://pbs.twimg.com/profile_images/1480160632360124416/AM_vVRko_400x400.jpg', + ref_id: '8126d933-0986-4fd2-a6be-c02581294463', + twitter_handle: 'publordhodl', + }, + { + name: 'Anders Jensen', + profile_picture: 'https://pbs.twimg.com/profile_images/1382039124991954947/Wb9kT7MO_400x400.jpg', + ref_id: 'af45195e-77a6-463f-ba64-29c6b0437d9c', + twitter_handle: 'andersjensenorg', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/2a1450bc-0649-4dc5-8ec9-1474af1ea1c3.jpg', + keyword: !0, + link: 'https://stakwork-uploads.s3.amazonaws.com/uploads/customers/2707/media_to_local/f7b6cfcb-7cd4-4401-a3fb-7735bb570c07/2ae49fca-a048-4a34-93b9-247513af5699.mp3', + node_type: 'clip', + pub_key: '', + ref_id: 'b8945614-0c02-4427-8749-f760691a4bea', + show_title: 'Anders_🍆', + text: "Swiss bank account in your pocket or Swiss bank account in your head. Even better. Make sure you always have a backup of that Swiss bank account, though, in your head, because some things do happen. Strokes hit your head, memory loss, whatever. I'm serious. brainwallets are a super dangerous way to carry bitcoin, so always make sure you have a backup of your seat. I could never memorize 24 words anyway, so it's not an option for me. No. Okay, Craig, real quick, though, I think you could. I genuinely think most people can with enough time. Like, in my own experience, a long time ago, you can probably do twelve in about a day. The main thing is, if you're going to try to remember the words, don't say them out loud, especially around devices like cell phones, et cetera. But, yeah, just there are trade offs with everything self custody related. If you suddenly start carrying words in your head, you suddenly become very valuable, very quick. So, yeah, brainwall, make a song about it. You strike me as a kind of a guy who it's actually quite incredible. That many people are in the bitcoin. Because Mike, I think you can hear Tomar speaking. I'll come back tomorrow. Yeah, sorry, Craig, I was saying, you strike me as the kind of guy who might once have known dozens of phone numbers off by heart. Dozens of, like, seven digit phone numbers off by heart. So I bet you could do the twelve word thing. If I lose my phone, I wouldn't be able to call anybody. I don't know anybody to know. Now you lose, now you don't. But I bet in the 1980s and you did. Yeah, but that was a long time ago. It's just a matter of necessity, right? If you think you need to do it, you do it, and if you don't think you need to do it, you don't. I mean, that's what it comes. Down to the perfect example of this. Is the memorization of street names. If you ask my parents what's the name of every street in their city, they'll know them all. If you ask me, I literally probably know three to five going back. It's actually kind of incredible that less people appreciate bitcoin because there's all positive all the way around, right? Like, pretty much everybody cares about poor people, whether in their own country, in other countries, they can empathize and want them to have a better life. And if they can help them, they would do it. Right. And obviously moving to Bitcoin, buying and holding, I mean, you're doing that. And then there's also, like the personal gain, the, like, purchasing power. You could really save your time and be paid handsomely for it in the future. The incentive and the incentives are all there. It just speaks to how indoctrinated people are. Like, growing up in a system where you think that this is just reality and also education. Like, this is how economics work. And then also just like, I guess the complexity, the technicality of bitcoin. But if you just looked at the positives, right, and the incentives, it's actually kind of mind blowing that not more people are on it. And like the point Puppy makes about the insurance policy, I mean, just the peace of mind. Remember one of the insurance companies used to advertise peace of mind. Just the peace of mind of knowing that a good chunk of your net worth is safe and sound and nobody can get to it and take it away from you. That is just mind boggling. I've never had that before. I've always worried about various investments and so on and so forth. And who's going to come take the money? Who's going to sue me? And what's my attack surface all this stuff, right? With bitcoin, just sit back and relax, don't worry about it. Right? So they have to understand that it's inevitable, right? And they have to understand that it's uncensorious and uncomplicated. So, yeah, you have to whatever steps you have to go through to make them understand that. Otherwise, like, someone else, I don't know if it was Clark or somebody else here was asking about the hash rate. Hey, the hash rates going down. Like, what do you guys think? Okay, I just wanted to check if I'm getting a little nervous. Like we just went all in. I think his question is more like, is this shit still going to survive? So I think you need to get once people understand that, then they can appreciate what you're saying. Craig. The first bear market, right? Everybody has that worry. Is everybody else right out there that says it's going to zero? And yeah, it's painful that first time that you go through that whole thing. But he'll get through it. He'll be good. Orland oh, yeah, I was going to say that in regard to the hash rate, it doesn't matter because bitcoin dynamically scales with the difficulty number. So even if we lose a bunch of hash rate, you'll have a small period of pain where blocks come in slightly slower, but after two weeks it will adjust. And that's the beauty of it. There is so much work being done for you as a hoddler just by these miners and node runners. You don't really have to do anything. You can just buy it, send it to friends, do whatever. And the incentive structure is that people want to run nodes to operate businesses or whatnot, or validate their funds exist. And the miners are out there just trying to collect bitcoin from fees and the coin based transactions. And I think it's just so beautiful that it all works harmoniously and continues just tick to the next block. Yeah, as long as it can withstand a nation state attack, then it's doing what it needs to do. Most minors also run nodes, isn't that the case? That is correct. Every minor is a node at some point. So for example, if you have one thousand s nineteen minors in a warehouse, those S 19s need to know which transactions to put in the block, what is the height of the next block, what was the previous block's hash. And so basically what the node is, it has a function called get block template. And then it will kind of tell node operating software that runs on these machines or some computer that sends work out to these machines. It'll send out all of the work that these machines do. These machines do their work and they report back. That's all they do. But at the end of the day, the node is needed to get the work for the miners. And then also the other side of it is once that block has been mined, like let's say Craig, you have your thousand S 19, so you find your block, how do you get it back to the bitcoin network? The minor machines don't do that. They send it to the node and the node does a broadcast. So yeah, every miner is a node at some point. We're talking earlier about that. And one of my favorite, if not favorite, is that difficulty adjustment. And I told the story of TC. I'll tell you guys again if you're new here and trying to understand what is this are talking about, all right? And basically I equate it to an Easter egg hunt. And guess what? When every place go up, there's not as many minors. Like when all the minors get offline to keep everything humming along, humming along, you got to make it easier. So my daughter had a place that they would go and do Easter egg hunt at this club, but they had different age levels. So you can imagine, look, anyone under age of five, they basically just had those eggs, like out in the open, plastic eggs, so the kids just around pick them up for the next age group up. They're sort of hidden a little bit, peeking out. And then for the older kids, man, they got those things buried sure enough. Yeah, those older kids, guess what? Sometimes if it gets too hard, we're going to put you in this other field. We're going to find some easier eggs for you. And it's absolutely just beautiful to watch it in action every two weeks. Well, 21 40 blocks, I believe, but it's such a cool feature that hasn't been broken yet, man, it just comes along ", + timestamp: '02:11:25-02:19:32', + topics: ['Bitcoin self-custody', 'Bitcoin hashrate', 'bear market'], + type: 'twitter_space', + weight: 12.02900368436996, + }, + { + boost: 0, + date: 1671720944, + description: 'The problems with the US financial system', + episode_title: 'Café ₿: #Bitcoin News & Bitcoin Day w/ @Bitcoindayio', + guests: [ + { + name: '@johnmichaeldrew', + profile_picture: 'https://pbs.twimg.com/profile_images/1512897699942744064/PuRU3K8P_400x400.jpg', + ref_id: '6b72ee7f-52ef-4847-96ed-78ea09e3f19b', + twitter_handle: 'johnmichaeldrew', + }, + { + name: '@mattyicesensei', + profile_picture: 'https://pbs.twimg.com/profile_images/1607138483579101186/0qm0xaCF_400x400.jpg', + ref_id: '286abd3b-cecc-4ec5-bf88-2a9fd5393083', + twitter_handle: 'mattyicesensei', + }, + { + name: '@Bitcoindayio', + profile_picture: 'https://pbs.twimg.com/profile_images/1493098733608837121/tLI-XTwl_400x400.jpg', + ref_id: '6a87699e-7a27-4928-89e8-d884f1458bf9', + twitter_handle: 'Bitcoindayio', + }, + ], + hosts: [ + { + name: '@alexstanczyk', + profile_picture: 'https://pbs.twimg.com/profile_images/1539055022364708864/rwErK6x1_400x400.jpg', + ref_id: '6455df34-1abc-4ce8-9bb8-b02d411accec', + twitter_handle: 'alexstanczyk', + }, + { + name: '@SwanBitcoin', + profile_picture: 'https://pbs.twimg.com/profile_images/1491428856858914820/aFlitvha_400x400.jpg', + ref_id: 'da3f56bf-9763-4389-a9ec-d807049bd0b8', + twitter_handle: 'SwanBitcoin', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/239722cb-4216-414a-a17b-5adf9d52e15a.jpg', + keyword: !0, + link: 'https://stakwork-uploads.s3.amazonaws.com/uploads/customers/2707/media_to_local/83744e68-b563-4004-b52a-cfdfff89748f/12c9b9f2-fbce-4784-9404-88a574baa762.mp3', + node_type: 'clip', + pub_key: '', + ref_id: 'ebecb620-735b-490e-bc9d-b4033f11144a', + show_title: 'Swan.com', + text: "not everybody up here is from the United States, but from those you who are I mean, do you feel like your tax dollars are being well spent? Fuck no. Really? Okay. No, look, not very well up here in Canada. First of all, why are we being taxed, Alex? Okay, that go back one more step and say, I mean, this isn't our tax dollars. They're your tax dollars, but they've been handed over to this other entity and they're spending it however they want. It's not our money anymore. Hold on. Can we talk about we talk about Taxing and Swan because you can make it so that you don't actually have to pay taxes. That's how this world works. Okay? That's not true. That's not the way it works. Okay, you have two days left because Swan is going to skeleton Crew next week. If you want to get it done, you need to talk to us quickly. But wait, there's more. There's $65 million earmarked, a good chunk of which is going to be used to build a federal building named after Nancy Pelosi to house more administrators that we don't need to pay. Oh, but that's right. This is how you get rid of inflation, right? Can we at least make, like, a gold statue at this point? The corruption is just so rampant that it's disgusting. The state is rotting. Criminals are looting your tax dollars, and, like, someone alluded to it's. Not even tax dollars at this point, right? They're generating funds out of, like, the Treasury, Federal Reserve, like, nasty cycle. And so they're looting your tax dollars and your currency while the empire burns and really opting out with Bitcoin. The only option I see, it's not even current tax dollars either, Tyler. It's future tax dollars that you haven't even paid yet. It's gross. Yeah, it's like generational slavery. We're serfs. That's what we are. Not just United States citizens. The world is paying for this. The entire world. People who have no say. It's taxation without representation for the rest of the world. Okay, forget what I said. I want to see this Pelosi statue. I need to see it. She's building a whole damn building. As long as it looks as good as Cristiano Ronaldo's statue that they unveiled in Portugal, I'm good with it. Have you guys seen I'm going to share in the neck. I'll put it in there when I stop driving it's from, like, the 40s. It's one of the New York fed. Fed head. And he talks in the article. It's like an American affairs, and it just says, Taxes for whatever government taxes are obsolete. Like taxes are obsolete. And he goes in there and explains the four reasons why we have taxes. Basically, long story short, it's just for coercion, distributing wealth, whatever. So he admits in the 40s why we have taxes, because as you guys, we all know, just printing of currency, we don't need taxes. It's just straight theft at the end of the day and they admit it in this paper. So I'll share in the next in a little bit, actually, from Americans. I'm not 100% against taxes. I think there are some good things that need to be done. But at the end of the day, if they're printing far, far more money and spending it on crazy stuff than they're actually taking it in taxes, that's just fiscal irresponsibility and it's destructive for the currency and it's not good for the future. So in general, it's also a good example, Alex, of like, how, like, the systems that we've had established since, like, really since the formation of this country. If you have if you allow for human control of the money printer, it is impossible to maintain its disconnection from the political sphere. Like, it is absolutely impossible, especially the executive sphere, because, like, both of those separate spheres are incentivized to gain more and more influence and power and sway over the money printer and eventually it just gets subsumed by the entire system. Yeah, history has shown that this is the case. Could someone explain to me how America existed before 1913, before they started, like, the US. Government started taking income tax, like personal income tax, like, how were the roads and schools and everything, subways, the army, the navy, like, how do they, how did the US. Fund all this stuff? Like almost 150 years, right? Well, since, since the the American revolution, there was also this is stuff that I learned, particularly this past year that I was not aware of. The US. From my understanding, has experienced multiple bubbles of runaway like paper printing and inflation because we were trying to figure out how to actually make a money that would work. Well, they always knew that it's enshrined in the constitution, right, that gold and silver are the only things that are legal as tender. But there's been multiple hyperinflation events through the history of the US. As they were funding, like, big federal military build ups. So the continental was the currency that was like hyperinflated to pay for the revolutionary war. And then the greenbacks were the currency that was hyperinflated to pay for the Civil war. These were not redeemable, by the way. That's the important part. They weren't actually there was no discipline on the monetary supply because they were able to just print it. Well, for those folks who are still gold bugs, I was a gold bug for many years. And my one thing to you I'm not going to hammer this point, but my one thing to you is that gold's greatest weakness is subject to the whims of mankind. Like, if one dude with a pen can basically remove gold redeem ability and close the gold wind 1971, that right there proves to you that gold cannot act as a check on unlimited money printing, as much as we might want it to be. The simple fact is it's not and bitcoin is very different than that because nobody can control the supply issuance of bitcoin. It's fixed and it will never change. Not to mention, Alex, the monetization of gold destroys the actual value of the material or the mineral or whatever you want the metal. When we have such great industrial uses of gold, especially in electronics, and then we have so much of it just locked up in vaults, sitting around, you want to talk about how Keynesians are like, oh, we need to push the dollars through the system to get as much velocity or whatever? Let's talk about all the gold coffers that could be used to power much better electronics and help get areas like Africa and Central America and South America up to par. As far as the modernization goes, I don't know if that's even a thing, really, Mike. I mean, the amount of gold that's used is the amount of gold that industry is demanding. And that's it it's a small portion, actually, each year. Yeah, but you can't tell me that if gold wasn't monetized and was actually, as far as a price point, cheaper, the electronics wouldn't improve. That sounds kind of speculative, but that's all right. If it was cheaper to use gold and electronics, which is a very useful metal to use electronics than electronics would improve. I mean, what's hard to understand about that? So I looked up how the US used to function. The federal government, after it was created, we just had excise taxes, so they would just charge goods and services instead of income tax. And I believe in that because we get quadruple taxed in our current system just to keep it essentially performance based. Right. If the government that we want to do this particular thing, and we're going to ask the people for the money, the people have to give the money to the government, versus it being a law that you give the money to the government, they can do whatever they want with it. Those are two different things. Yeah. And as I was alluding to earlier, the wealthiest seem to manage to avoid that because of the byzantine rules and loopholes that exist in the tax structure. Is there more ridiculous bill? Yeah, I didn't realize that. There must be a lag on my end. I'll reset. No, we're kind of both doing it to each other. That's all right. ", + timestamp: '00:50:07-00:58:49', + topics: ['US finance', 'US commerce'], + type: 'twitter_space', + weight: 10.380105016289042, + }, + { + boost: 0, + date: 1579649999, + description: 'Insight about Bitcoin Notes', + episode_title: 'Bitcoin TA, Bitcoins Future, & Bitcoin Explained by Tone Vays @ Brisbane Bitcoin Meetup', + guests: [ + { + name: 'Willy Woo', + profile_picture: 'https://pbs.twimg.com/profile_images/1600775715892432896/c1rFKYSz_400x400.jpg', + ref_id: 'b0d7c243-e94d-40d6-a844-f0da905c4356', + twitter_handle: 'woonomic', + }, + { + name: 'Tyler Jenks', + profile_picture: 'https://abs.twimg.com/sticky/default_profile_images/default_profile_400x400.png', + ref_id: '5b920cbf-7be2-4380-9c3c-87e99d8b7612', + twitter_handle: 'Tylerjenks', + }, + { + name: 'Tai Zen', + profile_picture: 'https://pbs.twimg.com/profile_images/712935760085659648/0_mfEI59_400x400.jpg', + ref_id: 'f0e33df4-8524-460a-88a5-e4ebf6f5149e', + twitter_handle: 'Taizen', + }, + ], + hosts: [ + { + name: 'Tony Vays', + profile_picture: 'https://pbs.twimg.com/profile_images/1416821178266787844/T1OkI9ZW_400x400.jpg', + ref_id: '504da881-f363-4d95-b1fd-fa7b6986639f', + twitter_handle: 'ToneVays', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/4ae5cf53-106f-4ba8-9a77-3ef1de3b44b6.jpg', + keyword: !0, + link: 'https://dts.podtrac.com/redirect.mp3/api.spreaker.com/download/episode/21932193/bitcoin_ta_bitcoins_future_bitcoin_explained_by_tone_vays_brisbane_bitcoin_meetup.mp3', + node_type: 'clip', + pub_key: '', + ref_id: '22824927-75e2-4592-9876-6f271258bf9c', + show_title: 'Trading Bitcoin: The Tone Vays Podcast', + text: "more work for that many people, quantum computers, it's a lot of work and a lot of energy to be used for. Again, something I'm not scared of, but a lot of people are already blown out of proportion. Good answers. So in 50 or 100 or however many years it will hypothetically take for a Bitcoin denominated society, do you guys actually see the majority of people running their own foremost or do you think it will be mainly custodial? I think it will be mainly custodial. I don't think everybody will be running their own full nodes. Everyone probably shouldn't be running their own full nodes. People that understand full nodes, people that would be able to upgrade those nodes when needed, should be running them. And not everybody, but everybody will be running their lightning nodes. I don't like calling a lightning nodes. I would love to call something else other than a node because it makes it sound a lot like a Bitcoin node. So I think not very few more than today. Today we only have about 10,000 notes. So I think it will be more. Yes, if a million people actively use Bitcoin, maybe 50,000 nodes will have if 50 or 100,000 nodes, that's enough. So I'm not expecting that, but everyone will have their lightning node in their pocket on their cell phone. I think like the question should include it's not just the fact that people will be able to run note, but will the cost of running note stay low. Because it's very important for a network to be sort of easily accessible by more people. It's so I don't spend like $10,000 in order to spin a note or it will become high and high and essentially become just two notes talking to each other. It becomes PayPal. Right? So cost of running a note, it has to be kept very low. Barry I think Bitcoin achieved that and given that its size has a little bit that much compared to eleven years, compared to all coins in a shorter period of time, the decisions that Bitcoin developers and Bitcoin hasn't made, it sort of like a trade off that hasn't made to maintain this has to continue over to hyperlink organization to keep the barriers from slow. I think custodial services will always be useful because honestly, some people don't want to manage their own money, they'd rather pay an expert to do it for them. And that's a sensible choice in many cases. But it will be different to the current situation where only banks have access to the banking system. Everyone will be able to get access if they want to and I think a lot more businesses will run nodes and get direct access to those payment rails. Awesome. So I want to give credit to John from Bitcoin rapidly for this question, but it's a really good one. I think it has to be added in. When do you think the first central bank will have Bitcoin towards reserves or do you think they even have a will? I think it's more likely that some Caribbean island central bank already has. No central bank ever will. I think they will. It's possible that some already kind of have, if not people at those banks already have. So it's a matter of time before it happens. How long before the end of this decade? I think we will definitely hear some countries maybe being even public about it. But you don't really want to be public about it. You kind of may just want to do it and have it as a backup. It will more likely happen in a country that isn't as transparent in their finances like Australia or US or some of the others, but a couple of the other countries that don't have to be as transparent with what their central banks have their money in, they are way more likely to do it earlier than the fully transparent ones, which is going to be very interesting. Yes, I would be surprised if there's not any small countries or small governments that's been stashing Bitcoin side. That is to say like the primary beta thing that central banks who started up in Bitcoin will be those that has the most to those have the most to lose in the rate of the bottom monitoring central bankruptcy, which aka is less smaller governments that are struggling to do the bigger scheme of things. Because if you look at the alternative, the ECB actually says this bitcoin could be a negative perception risk to the central banking system because it exposes something that's not doing very well. So you can see that the people that want to keep their status quo do a lot of fight against that. But the flip side things is that smaller central banks and smaller countries would actually say hey. We're going to compete for big boys. Let's maybe put out a little bit of folks here and when Bitcoin prices goes up. That sort of whatever. 510 percent of location could become 10% 20% of the irresistant asset and the next wave small country will say look. We would copy it and it becomes a circular positive effect and sooner or later the big boys have to kind of like chip in and say. Okay. Become like this. Let's be part of it. But that will take a long time. Central banking is fascinating. It's very conservative in some ways. From what I could find out, there's only three central banks at the moment that even buy shares directly. That's Japan, Switzerland and Norway. So they're very traditional just by government bonds and stuff like that. But in other ways they ", + timestamp: '00:40:15-00:46:33', + topics: ['Bitcoin Notes'], + type: 'podcast', + weight: 4.165180206298828, + }, + { + boost: 0, + date: 1653436800, + description: 'The response from small business owners after their bitcoin adoption', + episode_title: 'Small Businesses Embracing Bitcoin w/ Michael from Oshi App - Voltage Twitter Spaces', + guests: [ + { + name: 'Michael Atwood', + profile_picture: 'https://pbs.twimg.com/profile_images/1362207977470521345/Jy2_Ge60_400x400.jpg', + ref_id: '16359ade-afb9-4a37-be0b-0844a6134327', + twitter_handle: 'Dooowta', + }, + ], + hosts: [ + { + name: '@voltage_cloud', + profile_picture: 'https://pbs.twimg.com/profile_images/1508657900486422529/Lfa70poj_400x400.png', + ref_id: '3b622187-60ce-43c2-a21f-ae749c2d961a', + twitter_handle: 'voltage_cloud', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/2ec62250-4755-4616-8342-096a2cfab95f.jpg', + keyword: !0, + link: 'https://www.youtube.com/watch?v=kMDSsyAEvd8', + node_type: 'clip', + pub_key: '', + ref_id: '4310fd96-1c4f-42a7-b72f-60fc5968c75d', + show_title: 'Voltage', + text: "Now what's the like? So a lot of businesses, you know, they're interested in accepting bitcoin payments. Maybe they get it, maybe they don't. It's about 50 50. What's the response from a small business owner after they're accepting bitcoin? Is it kind of like one person a day, a couple of people a month? Are they noticing anything, material change? Or are they just glad that they're kind of keeping up with the times and maybe they have a bitcoin sticker on the front of their building and it creates conversation. What is that like? I would say in general, a lot of them are kind of indifferent about it. I do think they like the fact that they can kind of say, yeah, like, hey, we accept bitcoin. And if they do happen to be more into the idea of bitcoin, then they are fairly enthusiastic about it. I've seen business owners in the past that are like, literally customers come up and they're like, we accept bitcoin. And the customer is like, what? That is not what I was expecting. But yeah, it really just depends. There's a lot of indifference. I wouldn't say that. Maybe they'll have a few cups of coffee sold per week in bitcoin from just the people who are aware that this business even accepts bitcoin. Right? And that's kind of where Oshi tries to come in with the incentives and the map and everything. But yeah, business though, who are accepting bitcoin. Unless there's some sort of special event, like a bitcoin business warming party, they're not accepting heaps of bitcoin right now. Most people are still completely unaware that cash app, even you can send bitcoin payments over cash app. It kind of blows my mind. Like I said, I just had a meeting with a Texas reporter and awesome guy. He asked really great questions, but literally had no clue about bitcoin. Not a clue. And he's reporting on it. So this is the state that we're in right now. This is kind of the state of affairs. But I really like to talk about how small business owners in my experience, what I have seen is they're pretty eager to like, tell their customers about it, depending on the owner. So that's what's not really factored in, I think whenever a lot of people start talking about a consumer paying with bitcoin, but what is that business? And how are they going to train their staff? Whenever a customer comes up and wants to buy like a $3 cup of coffee and swipe their card and that's going to cost that business 5.6% if they're using something like square or toast whenever, they could just use bitcoin and save like 5% or more depending on what they're using. So then you're going to have business owners actually training their staff to say, hey, this customer comes in, tell them we accept bitcoin so that we can save money on these sales. Maybe we can increase our profit margins a substantial amount, or maybe we can actually give the customer back, like some bitcoin rewards or bitcoin cash back with that arbitrage between lightning and the traditional legacy payment processors. Absolutely. ", + timestamp: '00:09:45-00:12:57', + topics: ['Michael Atwood', 'Bitcoin transactions'], + type: 'youtube', + weight: 4.158902193931075, + }, + { + boost: 0, + date: 1591295582, + description: 'Increased Stablecoin adoption and volume post-COVID', + episode_title: 'Episode 6: International Payments with Stablecoins', + guests: [ + { + name: 'Fabricio Tota', + profile_picture: 'https://pbs.twimg.com/profile_images/1593923295660986368/PetsVmSs_400x400.jpg', + ref_id: 'd2b39da6-93a0-4511-98b3-3a57c9cf6491', + twitter_handle: 'ftota', + }, + { + name: 'Sebastian Serrano', + profile_picture: 'https://pbs.twimg.com/profile_images/1586767206628605954/sAcHMD2y_400x400.jpg', + ref_id: '22b37ca6-24f3-4f1e-ac19-b5c6f150499f', + twitter_handle: 'sserrano44', + }, + { + name: ' Darius Sit', + profile_picture: 'https://pbs.twimg.com/profile_images/1407598510350819328/EGiy4zAh_400x400.jpg', + ref_id: 'cc4c1681-7fdf-4404-96a5-7e7fbed467cd', + twitter_handle: 'dariussitzl', + }, + ], + hosts: [ + { + name: 'Jeremy Allaire', + profile_picture: 'https://pbs.twimg.com/profile_images/1501707897641779208/cpB2Dk9__400x400.jpg', + ref_id: 'df622380-4129-458c-8e10-8088f172f002', + twitter_handle: 'jerallaire', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/99d17d22-4448-4267-9065-f55b341f43d2.jpg', + keyword: !0, + link: 'https://mcdn.podbean.com/mf/web/tr7dhp/episode-6.mp3', + node_type: 'clip', + pub_key: '', + ref_id: '7434dc95-111e-4fa4-81bd-6019a1249950', + show_title: 'The Money Movement', + text: "in the post COVID world this dramatic increase in circulation of stable coins and on chain transactions have been growing super fast. It's now like, definitely the killer app of blockchains. But are you seeing that as well? Just like more and more diverse kind of counterparties that are looking to adopt this now. Exactly. This, of course, the traders, as usual. But we're to going see guys like furniture distributors, alcohol distributors, guys on the street who are just buying and selling wholesale, closing ecommerce guys. It makes complete sense for them to do it this way. So the local currency, no problem. They can use the Internet system, anything. Dollars is stable coin. And inside this has been happening in huge sizes as well. So it's become very corporate, in fact. Yeah. So this is, I think, a major shift that people have been sort of looking for, waiting for, which is all of a sudden you've got corporates from small to medium to even some large who are just like, this is just a better way to settle and a better way to move value. And they're just adopting it organically, they're figuring it out. Obviously, it's benefiting firms like you that are kind of key liquidity enablers in the entire region. And it's obviously very exciting. So if you had to fast forward two years, I don't want to say five years, let's just say two years, three years, is this going to be ten x what it is today? Where do you see the volumes? Where do you see the adoption? I think the sky's the limit. The fact is this, china has already launched it. The big banks in China, the Chinese banks have built infrastructure for it. So everyone was thinking this is adoption technology. Everyone's going to take some time, structure, know China, the big banks have already adopted it, build infrastructure. They are paying civil servants in the digital currency. And I think it's a fact that when China adopts something, the rest of Asia will follow very quickly. So we're getting requests and engagement from the rest of the Southwest Asian Central banks to start looking to this again. Like I said, people don't realize that there are two sets behind. And I think the adoption will happen very, very quickly because it's already a reality in China. I think most people don't know how real the adoption is. There seems like a real tipping point moment. I think so, yes. Awesome. Darius, so wonderful to have you on the program. Share your perspective from me, really exciting what's happening, and look forward to seeing you very, very soon. Have a great night. Thank you. Thank you. You too. Thank you. Excellent. So obviously a lot of very interesting things happening here. The demand for dollars, the demand for high speed, efficient, secure transactions, the speed and utility of the internet, these are all really powerful forces that are driving stable point payments internationally. And just to echo what we're hearing, like, this isn't just traders. This is now corporations of all types, even small merchants that are figuring out that this is just a better way to do business. So very, very exciting. I want to turn now to another part of the world, to Latin America, and welcome our first of two guests from the region. The first, Fabricio Toda, is director at Mercado Bitcoin, the leading digital currency exchange in Brazil. ", + timestamp: '00:09:23-00:13:06', + topics: ['Stablecoin adoption'], + type: 'podcast', + weight: 4.142722249031067, + }, + { + boost: 0, + date: 1667002494, + description: 'Reason for being bullish: Adoption markers for Bitcoins', + episode_title: 'WHY ARE WE BULLISH? Brady Swenson, Kristin Thompson, Alex Stanczyk, Jon Chernot ep300', + guests: [ + { + name: 'Brady Swenson', + profile_picture: 'https://pbs.twimg.com/profile_images/1502564606836981763/fmqtNrNc_400x400.jpg', + ref_id: '49966553-d55b-44c9-94ec-8fee09eee5c2', + twitter_handle: 'CitizenBitcoin', + }, + { + name: 'Alex Stanczyk', + profile_picture: 'https://pbs.twimg.com/profile_images/1539055022364708864/rwErK6x1_400x400.jpg', + ref_id: '3126e2a3-bbe4-456b-b298-9714085fa286', + twitter_handle: 'alexstanczyk', + }, + { + name: 'Jon Chernot ', + profile_picture: 'https://pbs.twimg.com/profile_images/1557153813122859008/VlOtu_p4_400x400.jpg', + ref_id: '9e92acc2-17ad-4e7b-89d9-98a43fd12a6f', + twitter_handle: 'jonchenot', + }, + { + name: 'Kristin Thompson', + profile_picture: 'https://pbs.twimg.com/profile_images/1517531647956033536/lf6DvsQm_400x400.jpg', + ref_id: '29ff14ed-7fa9-4c27-a972-0d708f7f78b7', + twitter_handle: 'SpeakServeGrow', + }, + ], + hosts: [ + { + name: 'Benjamin Tyler Perrin', + profile_picture: 'https://pbs.twimg.com/profile_images/1602307254937866240/CKiRrFui_400x400.jpg', + ref_id: '3ea64cca-4564-4e24-b3a4-2c3f93ba3e7f', + twitter_handle: 'BTCsessions', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/419512c2-e309-4b25-bfe2-cd481d53f66d.jpg', + keyword: !0, + link: 'https://anchor.fm/s/11e95d20/podcast/play/59744982/https%253A%252F%252Fd3ctxlq1ktw2nl.cloudfront.net%252Fstaging%252F2022-9-29%252F293755446-44100-2-5ef66a75db649.mp3', + node_type: 'clip', + pub_key: '', + ref_id: 'b6fe310d-bfa4-48aa-bfc2-d36ed303d024', + show_title: 'BTC Sessions', + text: "we're going to give it a rotation and I'm going to toss it to the cricket man himself. Brady, I would love to know. Why. Are the crickets bullish? Let me know. All right. I'm going to give Ben here a worldwide exclusive on why are we bullish, and I'm also going to create a little side chain of why we bullish and we're going to reason, riff and rotate on this as well. I guess we're already going to anyway, never mind change. All right, so I'm going to present here for a second, if you don't mind, sir. Yeah, I'll pull it. Let me see. Is it a browser? Here we go. Okay. You see anything? No, not yet. So hit present, hit share screen, and then it will let you choose something yup. And then you got to hit share. Yeah, something goofing up, unfortunately. So I may not be able to give actually, shoot me the link in. The private chat and I'll bring it up. I'll shoot you the file. Yeah. And if somebody else wants to go in the meantime, because this might take 90 seconds, I don't want to do 90 seconds of dead air. Then we can come back to mine. All good. Well, who shall I pick on? Maybe Alex. Alex? Maybe let's do a whirlwind of wider alphabetical. Yeah. All right. So I like to pay attention to adoption markers. I think the price is not very revealing of adoption. So some adoptions markers I look at is like strength of the network, cash, power, how much money is moving on the network, number of wallets, the amount of bitcoin that's allocated to channels and committed, number of nodes, all those kind of things. So some of the adoption markers that have been interesting to me as of late is, number one, we've passed $14 trillion worth of USD value transferred on the bitcoin network. As of now, we still have two months ago, last year was 13.1 trillion. So we've already surpassed that. We're already growing in that regard, the institutional, or I should say the legacy sort of system. Adoption markers are pretty strong for 2022. You've got KPMG canada in bitcoin, bank of New York mellon in bitcoin, forbes saying that the use case strengthens for bitcoin, bloomberg referring to bitcoin as a safe haven, bill gross in bitcoin, ken Griffin in bitcoin, state street in bitcoin, morgan Stanley asset management in bitcoin, critic Smith saying that bitcoin is going to benefit from all this crazy monetary stuff that's going on in the world. Goonblock in bitcoin. Russia announced it's going to take payment for energy and rubles or gold or bitcoin bridgewater backs a crypto fund. BlackRock starting to respond to client demand in bitcoin, on and on and on. There's a ton of these. I'm not going to read them all. There's a ton of these. And then finally, we just hit an all time record for the number of addresses that have held bitcoin for longer than three months. Yeah, that's huge. That is, to me is mind blowing, because what it really means is the people that are holding for more than three months, they're not short term in and out sellers, which is most of the people that came in and over the last six months, a lot of that selling pressure was coming from people who are newer. So everybody who's holding right now have figured out they're not selling. That, to me, is incredibly freaking bullish. I don't know if that's a bottom marker, but damn, let's go send it. It's great because you realize how much of the price is effectively calculated at the fringe right there's x amount of liquid bitcoin. But there's so much of it that is basically just sitting, held away and that the conviction of those people is continuously growing. And to see that much being held on chain and a singular address for an individual for longer and longer, it denotes that there's a small liquid market and during the bear market, there happens to be more sellers in that small liquid market. But it takes very little movement to change that trajectory and it can really rip. I think that we've got an interesting decade ahead of us that a lot of people are underestimating what can happen. So it's going to be a good time to be a good time. John and Kristen, do either of you want to jump in, comment on Alex's topic before we rotate to Brady's? I mean, I think one of the things that I learned really early on from bitcoin errs is watch what they do, not what they say. And so when we hear headlines like that, and here at Swan, when we're watching the market and I'm clipping little headlines, we see people changing their tune, whether it's JPMorgan or, you know, it's just the list is really long of people who have tried to vilify bitcoin while secretly stacking in the meantime or putting up the channels to be doing business in bitcoin. And so I think that's just a great lesson that I learned from bitcoiners, which has just played true over and over again. And then the other thing that I was really cluing in on that Alex was sharing was about the number of bitcoin is really holding. And so if we think back to, let's say, four years ago, or the last bottom was maybe, let's say 3000, right when the last bear market. And so just imagining now that the floor has raised up to, let's just say around the $20,000 mark in that time period. And that's really interesting and I think it's not my reason, but it could be a reason to be bullish to really think about the lower end is so much higher than it was four years ago and then four years before that. And that trend continuing is one great reason why it's such a great store value. Yeah, there's just a little side note here. There's a really cool graph I had a bunch of unchained guys on last week and Phil Geiger brought up this chart, the Hoddle waves over at Unchained. And it's really cool because you can actually see up along the top, this is like the UTXO age distribution, meaning how long has a particular coin been sitting in an address and not moved. And so, like, the scale goes anywhere from 24 hours to ten plus years. And you can see some of the. Widening on some of these longer time frames. Right. Some of the tenure stuff, obviously there's not a lot there. It's starting to get to the point where it's pretty constant, but you can see particularly like five to seven years, it's starting to widen. Three to five years is much wider than it was back in 2018. Two to three years, the one to two year is getting really wide quite a bit. You saw it start to move quite a bit and tighten, meaning lots of people were moving their coins around as we had a bull market. But now there's a lot of coins that have been sitting in a singular address, something like that. 23% of all coins have been sitting in a singular address for between one and two years. So those people are just sitting on it. And that's on top of all of the other, like 15%, three to five years, seven and a half percent, two to three years, even another 13, 14%, six months to twelve months sitting in a singular address. Right. You're not getting a lot of movement out of like half to 60% of the bitcoin stack. And that's pretty impressive. I like that. But nonetheless, I'll get John's thought on this and then we'll do a rotation. So, John, any thoughts on Alex's topics, on some of the metrics that he's been measuring and excited about? How bullshit is. Not just really just affirming that thesis of people more as people value this thing, the more they the more they want to hold on to it and they want to acquire. And it's that natural progression as a bitcoin or like you want to understand it. So it just shows the more that the deeper you go down the rabbit hole, the more you want to acquire, the more you want to hold on to, and really why we're all here and that's why numbers go up, is such a powerful thing. And yeah, I'm excited. It's great. Awesome, man, awesome. I love it. All right, well, let's round up this topic. There are so many interesting metrics that you can track, and again, those hoddle waves are really cool, but a lot of the stuff Alex mentioned, it's so unique to a money to be able to even be aware of those things. And this is part of, again, fix the money, fix the world. If you know how it functions, you can better calculate and decide on your economic action. ", + timestamp: '00:25:06-00:35:12', + topics: [], + type: 'podcast', + weight: 4.483882345180122, + }, + { + boost: 0, + date: 1671827663, + description: 'Generating money in Lightning Network is discussed', + episode_title: 'BR015 - Lightning Experts Roundtable ft. Calle, Roy, Rijndael & t-bast', + guests: [ + { + name: 'Roy', + profile_picture: 'https://pbs.twimg.com/profile_images/1518195698323398656/v6d0knBt_400x400.jpg', + ref_id: '528205f8-c65b-4b81-8e90-64a89737acd3', + twitter_handle: 'RoyNemer', + }, + { + name: 'Calle', + profile_picture: 'https://pbs.twimg.com/profile_images/1514769710432219142/CIKDCEbq_400x400.jpg', + ref_id: 'c467552d-e3ae-4c55-a695-8369a63960bb', + twitter_handle: 'danielaacallee', + }, + { + name: 'Rijndael', + profile_picture: 'https://pbs.twimg.com/profile_images/1542705395873058817/0zsy4Yur_400x400.jpg', + ref_id: '861d5324-8ede-4059-826f-f29abca5d7e6', + twitter_handle: 'rot13maxi', + }, + { + name: 't-bast', + profile_picture: 'https://pbs.twimg.com/profile_images/1103941624843788289/Pg2rEZph_400x400.jpg', + ref_id: 'd3eacec2-0bdc-49cd-8bef-e99fa2776d3b', + twitter_handle: 'realtbast', + }, + ], + hosts: [ + { + name: 'NVK', + profile_picture: 'https://pbs.twimg.com/profile_images/608402052247658497/ENDv0BNd_400x400.png', + ref_id: 'd754e29b-2d3e-4280-8d72-f41d2a465a78', + twitter_handle: 'Coinkite', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/cd6b8d64-bd52-4f1e-86b3-ca8ba2eb169f.jpg', + keyword: !0, + link: 'https://anchor.fm/s/9500fad8/podcast/play/62615840/https%253A%252F%252Fd3ctxlq1ktw2nl.cloudfront.net%252Fstaging%252F2022-11-23%252Ff9ece2e5-a873-2d6a-d49f-602887e5b810.mp3', + node_type: 'clip', + pub_key: '039c26c7a2f03083901b6c9ef94c3d9f12f88f348965dddd5ab54635993728007c', + ref_id: '5d13b0d2-3755-4363-9361-4b431f57b9c6', + show_title: 'Bitcoin.Review', + text: "money. This is one of the reasons why as much as morally and sort of like personally I don't like, I'm a big believer that 70% to 80% of the world's population is going to use custodial, right? Because in Custodial you don't have any of these issues. You can still have more ethically aligned custodials where they're not fractioning and they're not screen users. But no, you can't an IOU is free to move. Sorry, what did you say? Right. No, you can't. That's the problem with custodial. Whenever you give an hour to do. Because there's cost of capital, right, there is always an opportunity cost on the capital. I mean, you see this with bitcoin back loans, right, and chain. It's not their coins and they cannot move the coins without you seeing it. So they're going to charge you 14% interest on it. While other lending platforms that may not be like, they're not like evil or anything, they're just sort of like using a different business model, right, to be able to offer you say six, seven, eight, 9% interest, they have to lend out that coin because they have to find money somewhere else. These are always the challenges when it comes to this stuff. But again, because at least in my view, the amount of at least for the foreseeable sort of future, the transaction economic transaction size for Lightning, for mobile operation, right, we're going to probably talk about a person will be using like the equivalent of a low sheety credit card. So like say five hundred dollars to one thousand dollars a month, that's their economic capacity for a month, right. So those transactions are still reasonably okay. So if you have a billion people, that's a trillion dollars that you need of economic capital stuck in this Lightning sort of like liquidity providers, it's not that much money. It sounds like a lot of money to us, but like it's not a lot of money when you're talking about payments and other value adds that you may pull money from. Because Lightning still benefits from being essentially a business in the middle, right. You still can nick one dime people, and I mean this in the nice way of describing it, but you have means of taking a cut of things of asking for a set here and there, for that specific feature, for going faster, for this and that. Right. While in Bayeslayer there is no way of making money as a business in the middle. That's why I sell hardware and I sell it once people get their code card. They pay me once and that's it. The customer is gone. I could technically make a feature in the wallet that sort of sends one output to us, but nobody's going to use that and they're going to just change the software and flash the firmware and then it's gone. So I do find this very interesting. The Lightning since the beginning is that there is a path to monetization and when there is monetization, there's features, there's interesting things that you can do because there's money. And it seems like everybody is trying to create models where they do make money. That to me is the best part of Lightning. Really. Sorry colleague, go ahead. I just want to bring a little bit nuance to what you just said because I think it's very interesting, especially enlightening if you look at funds locked up in a Lightning channel that can generate some sort of yield which is directly tied to the usage of the funds. So it's a utility basically that pays you as a node operator and we are seeing many, many people on the internet trying to make a buck from forwarding payments. So the thing that I want to add though is that I think we are suffering a little bit from a fiat mind here, which is that you have a clear separation between institutions holding your money and the users moving that money or a ledger entry on a database of that institution. So we tend to think in this binary way that you have a big corporation handling the money business and the little user shoveling it around. And I think that's where I see Bitcoin, Shine and Lightning as well, basically where we have these different layers of responsibility that could be the on chain wallet and then a Lightning note on top and then a custodial wallet on top of that. Because now for the first time, you can become the custodian of your community as well. Say you have a school, say you have 1000 students there, right? So on a piece of paper you can calculate we won't be able to open channels for everyone in the near future. So obviously that makes things custodial solutions kind of a necessity if you want to scale too fast or faster than possible. But now, for the first time with Bitcoin, the school can become the custodian of the students, right? And this wasn't possible before. You cannot create a credit card on behalf of the school, give them to the students to use that right? And especially having money on that credit card that they can use to buy other stuff as well in the grocery store or whatever. So I think the spectrum of custody ranging from one chain up to completely no control except for database entry, is much broader than it actually looks. If you look at only the banking world and how we handle money in. The fiat world yeah, for sure. When I mean like a business in the middle, it's more like a value add and the size of the business because that's where the business logic lives. It can be as a single user, right? Just helping say you're the dad and you just run the nodes for the house and you want to take a cut from your kids. Kind of joking. But it could be the Uncle Jim in the neighborhood. This scales from a unit all the way to Visa size. It's really cool in that sense. Of course they will have different challenges and different sort of requirements and stuff, but the dynamic is very similar. You do expand into this sort of like pay to play in a way, right. The person offering you the value add has a way to receive money now and that was not possible before, right? It's like the Podcasting 2.0 stuff. There is a way for you to collect value either by the dynamics of the network because you're providing an actual service to that specific transaction or you're just like an auxiliary to it providing some other form of value add. Right. Because again, you can transport 10,000 of a dollar right now, economically speaking, right. That is a reality right now. That was just never possible before. Even with IOUs in a bank, they were never able to go that low. Right. Because we're talking about mainframes in like 1950s, 1960s here, right, where a dollar was like a lot of money and if they were able to have that dollar broken down all the way to 10,000 of a dollar in those days was actually economically meaningful transaction in aggregate, right? Or they weren't or maybe that was not fought. So it's just really cool to have this total dynamic change now because when you're talking about 10,000 of a dollar fee on something that's palatable, right? And when you're talking about like 8 billion people transacting, that's also real money. It may not be the kind of money that Visa used to make, but it is a lot of money for a lot of small companies that are providing value to a lot of people. Right? It's just so cool how this dynamic changes. A lot of times the reason why you see pricing models not tied very closely to value, a lot of times it comes down to metering, right? So because in Lightning, the atomic unit of movement is a payment, you can meter at the individual payment. So you can charge a 10,000th of a cent per payment. And if you have an application that uses payments as like atomic user interactions, like you're doing Podcasting 2.0 and every minute there's a payment, you can meter your value add at that level and not have to do something like a monthly subscription, or not have to do something where users feel like they're paying too much for not enough service. And I was referring to 10,000 of a cent dollar meaning something that's still sort of economically interesting to two parties right now, but we can do 100 million. It's just crazy how small this gets, right? So we have a lot of runaway as a unit bitcoin versus dollar increases in price. Anyways, ", + timestamp: '00:39:06-00:48:42', + topics: ['Lightning Network'], + type: 'podcast', + weight: 10.619592564456063, + }, + { + boost: 0, + date: 1639872e3, + description: 'Big States Bullies', + episode_title: + 'PFP016 Remigijus Šimašius, Bullies as Neighbors-on the Foreign Policy of Small Countries (PFS 2008)', + guests: [], + hosts: [], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/624262ef-b30f-4114-8061-e310187e6bb4.jpg', + keyword: !0, + link: 'https://www.youtube.com/watch?v=0WAituFO614', + node_type: 'clip', + pub_key: '02574d6e8e787372184b6f17c40d6c6fe1777db9015801f95dfd24692784d767cd', + ref_id: 'c5d2ef78-9d30-45ab-8d1a-edef9b356569', + show_title: 'Property and Freedom Society', + text: "of how to deal with putting but before going to details let me see about some challenges but in fact it's not true and then publicist we are also included studying the fact that all big nations were small nations and the fact that world wars small nations do we survive and actually as political mission points out there is usually help coming from abroad for small occupied reasons because there's no army pieces like this table and this country opposite arguments historical arguments and you may have very different issues and in fact historian travel studio said when words do occur and he said that essentials money would and of course really sometimes it's a good structure. And one more interesting thing is that historical numbers also show abroad industry in genesis of states and wars and wars it made the operation which is like capital and then the strongest one capital press which actually finances some Buddhists in order to period afterwards it was about one circle and economically and looking from the other hand but actually there were strategies with wishburg was very intensive which was even more intensive between them and there was again some accents which created an atmosphere of an image that is very unsafe for stormers was fighting against Russian fascia especially in the right part of the World War II. And then another stress it was cooperation of the Zealand because the participation of the unions in Communist Party was much much higher than the traditional and it meant that they have stronger power how dealing in such a difficult situation of course there is in order to keep the conflicts between and Poland alive because they didn't want Poland between Alaska and Soviet to make an alliance against possible threats from Russia. If we had this kind of alliance quite different of course obeyable is again quite a sense. And just like this was quite example in ancient times. And for example all the actions of citizens who actually were choosing Decembers very often. So anyway this is twice and very much ", + timestamp: '00:11:14-00:25:56', + topics: ['Sanctions', 'Russia', 'World War II', 'Soviet Union'], + type: 'youtube', + weight: 4.108680856598606, + }, + { + boost: 0, + date: 1665446400, + description: 'What are users behaviours on the Lightning apps', + episode_title: 'Austin Bitcoin Club: August - Value for Value Panel', + guests: [ + { + name: 'Justin Rezvani', + profile_picture: 'https://pbs.twimg.com/profile_images/1574666257781104641/hWG0vkSQ_400x400.jpg', + ref_id: 'b00877d0-ccbe-4c77-9c8c-88ab15063150', + twitter_handle: 'justin_rezvani', + }, + { + name: 'Lyle Pratt', + profile_picture: 'https://pbs.twimg.com/profile_images/1477702801962721285/KqnrA7oU_400x400.jpg', + ref_id: 'ab752a01-84bb-4260-a683-2eb5798b1dce', + twitter_handle: 'lylepratt', + }, + { + name: 'Keyan Kousha', + profile_picture: 'https://pbs.twimg.com/profile_images/1403763601391951878/ybuppfHt_400x400.jpg', + ref_id: '7ef39c9b-63ba-4dd0-989e-2230afb45129', + twitter_handle: 'k00bideh', + }, + ], + hosts: [ + { + name: 'Kevin Rooke', + profile_picture: 'https://pbs.twimg.com/profile_images/1090667005055627264/67EgQy25_400x400.jpg', + ref_id: 'ff98589a-b761-4996-80ca-786d04e30060', + twitter_handle: 'kerooke', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/b29c81c8-cccd-4a6b-b78f-3c1591a54d27.jpg', + keyword: !0, + link: 'https://www.youtube.com/watch?v=Kjt4ggwFTfo', + node_type: 'clip', + pub_key: '02574d6e8e787372184b6f17c40d6c6fe1777db9015801f95dfd24692784d767cd', + ref_id: '876e20ef-be1b-44e6-a77d-4af5beb33ad4', + show_title: 'Austin Bitcoin Club', + text: "It's like the instant settlement and also then the small the ability to do these super small transaction sizes that you couldn't can't be supported on credit cards or other fiat networks. I think one really interesting thing to think about is that today we may have a very small number of people using Lightning, but we have about 100 million people in the world with access to Lightning on the apps already on their phone. The biggest source of that being cache app with 70 plus million users. But we got Paxful and Cracky and a bunch of others, Robin Hood's planning to integrate it. So it does kind of feel like we're waiting for the killer app to show up, and when it does, it's like we have all the tinder ready to go, we're pouring oil on the fire, and we get one match. I think there's a real case to be made for, like, an app that quickly gets up to 10 million users, because we have all these people who have lightning access, haven't realized it yet, don't really care about it yet, but in the right context, it might be really easy for them to switch over and go, oh, this makes sense. I want to ask you guys all about the way users are using your apps today. What has surprised you guys the most? Maybe we could go through start with you, Justin. The number of communities people want to start. That was very surprising. Like, we had, you know, with only about 2700 creators, they created over 1400 communities. So that was a big surprise. Like, I didn't think that people actually wanted to create their own destinations on the web. I thought they just wanted to follow the most influential people. That was a big surprise. And then just transaction volume. We did 120,000 transactions in the first six months of the business. I didn't even think people wanted to give each other stats. I didn't know I didn't think it was going to be a thing. It's a thing. People want to do it. So the question becomes, in our next version that we're trying to launch in. October? How can we accelerate that transaction volume? How can we build a system that makes it much faster to transact and send money quicker with just user actions inside the UI UX? Those are two things that surprised me. What was the most surprising thing for you? Loud. Honestly, I think it's been the amount of sort of business development messaging traffic. Sending messages has been by far and away the most popular thing so far. Not so many video calls, a good amount of streams. I FaceTime you once, I was like. On a run, it was like 10 seconds a minute. What are we doing here? It's great, but it's kind of surprising. Like, I'll see messaging traffic and look at user stats that have received messages and just reach out to them. They're like, what are people messaging you about? And a lot of times it's like, oh, well, they work in Bitcoin, and I wanted to see if I could set up a call with them to talk to them about XYZ. It's a totally reasonable use case for monetizing your time, and it seems to be what people want to do. So do you think this is going to be big for, like, consultants and people paid by the hour? Is that going to be yeah, I mean, you know, imagine like, you're some dude that works in some software enterprise, like, you know, let's say Cisco, and you're like a mid level exec and you get people trying to sell you shit all the time, right? 24/7. You're getting emails, you're getting phone calls, you're getting all this stuff. And I sell software, and I'm trying to target this person in Cisco with my software so that he'll buy my software. So what are my options? I can try to get his email address and target him with LinkedIn ads and spend maybe 2000, $3,000 and maybe he clicks them and reaches out. I can do the same thing on Facebook. I can cold call them and annoy him. Or if he's got a Vida account and he's set a price for his time, maybe it's $500 an hour to talk on the phone, but somebody can call him immediately and get his attention with 100% certainty and know for sure if he's going to buy the product or not. And it's way more efficient than hoping that somebody clicks an ad question on that. Does the company get the $500 or. Does he personally in this case, he personally, but we have had quite a few people that said, well, what if I wanted to set up a company account where my employees have Vita accounts and then they're getting a split and the company is getting a split or something like that? So it's an idea we're exploring. Kind of like split payments on the Fountain app, honestly. Right. Kean, what's been the most surprising thing for you? Seeing stacker. News grow. I think that there isn't a lot of resistance to as much resistance to spending when people are earning. I mean, this isn't like a huge economic insight, I guess, because it's exactly how most B to B companies make money. They allow people to make more money using their product than they would if they hadn't, so they can charge that margin. Yeah. And so I think that's kind of it, that these are micro economies, they're still economies, all the incentives are the same, they're just tinier, or at least stacker news is tinier, and so the same rules kind of apply. That makes sense. Yeah. It's kind of like if you spend a couple of years printing a lot of money and air dropping it to everyone in the world, they're going to spend it. Right. If you give people money, they'll figure out a way to use it, for sure. ", + timestamp: '00:27:43-00:33:30', + topics: ['Lightning apps'], + type: 'youtube', + weight: 4.232409343387016, + }, + { + boost: 0, + date: 1626724415, + description: 'Final thoughts and guests contact info', + episode_title: 'WHY ARE WE BULLISH? Jeff Booth, Alyse Killeen, Marty Bent, Vijay Boyapati ep187', + guests: [ + { + name: 'Jeff Booth', + profile_picture: 'https://pbs.twimg.com/profile_images/1362957991410954241/spiaMAg2_400x400.jpg', + ref_id: 'f1143bcc-9ab9-4716-8259-0e5b026f8039', + twitter_handle: 'JeffBooth', + }, + { + name: 'Alyse Killeen', + profile_picture: 'https://pbs.twimg.com/profile_images/1469812274223194115/nynN-53X_400x400.jpg', + ref_id: '4612f685-03a9-4ff7-8dbd-153db478effc', + twitter_handle: 'AlyseKilleen', + }, + { + name: 'Marty Bent', + profile_picture: 'https://pbs.twimg.com/profile_images/1362747135981199370/mSy97J12_400x400.jpg', + ref_id: '655bdcb1-21c3-411c-aa24-fe7e4c7a248c', + twitter_handle: 'MartyBent', + }, + { + name: 'Vijay Boyapati ', + profile_picture: 'https://pbs.twimg.com/profile_images/1383215714056605700/49XT3cEZ_400x400.jpg', + ref_id: '0e976bc7-e7d6-4666-85f3-6b7c19be3b2f', + twitter_handle: 'real_vijay', + }, + ], + hosts: [ + { + name: 'Benjamin Tyler Perin', + profile_picture: 'https://pbs.twimg.com/profile_images/1602307254937866240/CKiRrFui_400x400.jpg', + ref_id: 'b3ebb661-634f-48db-b063-1a277fdc2f82', + twitter_handle: 'BTCsessions', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/419512c2-e309-4b25-bfe2-cd481d53f66d.jpg', + keyword: !0, + link: 'https://anchor.fm/s/11e95d20/podcast/play/37508074/https%253A%252F%252Fd3ctxlq1ktw2nl.cloudfront.net%252Fstaging%252F2021-6-19%252Fb68e9969-564d-3bd0-e65a-629ff8e395df.mp3', + node_type: 'clip', + pub_key: '', + ref_id: '310c587e-f3a7-4fbe-aacb-e9b0e73726d1', + show_title: 'BTC Sessions', + text: "it down the line one last time just to get you guys to once again remind people where they can find you and any final thoughts you may have. So, Marty, why don't you leave us up, let people know where they can find you and any final thoughts you might have. Hang on. Twitter allow you find me at Marty Bent. I just like to echo what Jeff said there at the end. Lean into conspicuous consumption, really does a lot of damage to the environment and makes us consume more. Whereas arguably, if we had a sound money standard via bitcoin, the opportunity cost that consumption rises. So you're forced to be more efficient, which would help the environment. Absolutely. How about you, Elise? Where can people find you and any final thoughts? Well, there's a link for founders on Stillmark.com to reach out. I have open DMs on Twitter. Maybe a mistake and, yeah, it was a lovely way to spend a Friday, guys. Thanks for having me. Thank you. And Jeff, one last time, where can people find you and any final thought you may have? I'm with Marty. Best places on Twitter at Jeff booth and Marty, at least. Ben, this was awesome. Thanks a lot for having me. Yeah, it's been a pleasure. Thanks for putting this together. Ben, Lisa, pleasure to meet you finally. Awesome, guys. Thank you. Thank you, guys. All, I'm going to cut your audio video and do my intro here, but all of you are welcome back anytime. Thank you all and everybody watching here, thank you so much for being here. Now, I was talking earlier and I was talking about a block block and I was trying to think of the best way to do this. I was talking about all the comments in here and I'm just kind of seeing who stuck it out. We still got 280 people in here. I've got to say, there was one moment during the show, there was a comment that gave me a good giggle and I hope that the person is still here, the accountant, the bitcoin corporation, when he said print the crap out of everything and that gave me that gave me a good laugh. It was perfectly timed with what Jeff was saying. So, dude, if you trust me enough with your information to send you a block clock, yeah, you were very quiet during the show with nonstop caps locks. Dude, if you trust me with your information to ship a block clock to you. I can do that. What I need you to do is just shoot me a quick email and I'm going to have to verify in some way, shape or form who you are, the best way to do that. Or you can add me on Twitter. My Twitter handle is just BTC Sessions, or the email is BTC sessions@gmail.com, and I will do my due diligence to make sure this is the right person. But just let me know that you're on the show and we'll chat and we'll figure some stuff. Yes, small caps are broken, I'm sure, man. Anyways, guys, the accountant, the Bitcoin corporation, reach out to me. We'll get chatting and I'll make sure that, yeah, via Twitter. Cool. What's your Twitter handle? Put your Twitter handle in the chat right now and I'll make sure that I have the right person and, yeah, everybody else that's watching, of course, thank you so much for being here. As always, make sure you hit like, Sub, Share, all those things help so much. They get this in front of more eyeballs. And I always love having you all here. ", + timestamp: '01:26:07-01:29:59', + topics: [], + type: 'podcast', + weight: 4.075675964358401, + }, + { + boost: 0, + date: 1673991804, + description: 'Introducing Schmidty and his work at Bitcoin Optech', + episode_title: + 'BR020 - Zeus, Alby, Bitcoin Knots Keys Leaked +MORE ft. Sjors, Schmidty, Evan Kaloudis & Justin Moon', + guests: [ + { name: 'Sjors', profile_picture: '', ref_id: 'fa5c587a-09ef-4cbd-b470-cfc78163f749', twitter_handle: '' }, + { + name: 'Evan Kaloudis', + profile_picture: 'https://pbs.twimg.com/profile_images/1596923848997445633/DqxrGpkW_400x400.jpg', + ref_id: '420172fa-9431-4ba4-965c-adab17648d1b', + twitter_handle: 'evankaloudis', + }, + { + name: 'Schmidty', + profile_picture: 'https://pbs.twimg.com/profile_images/1334879848280494083/A6ssSEfV_400x400.jpg', + ref_id: '28f55137-e733-4f5b-b988-7cb60ef0d330', + twitter_handle: 'bitschmidty', + }, + { + name: 'Justin Moon', + profile_picture: 'https://pbs.twimg.com/profile_images/1512674225651335169/iYHDJQcy_400x400.jpg', + ref_id: '1d2cdf64-358f-4b00-8f2b-0c94f798dc2c', + twitter_handle: '_JustinMoon_', + }, + ], + hosts: [ + { + name: 'NVK', + profile_picture: 'https://pbs.twimg.com/profile_images/608402052247658497/ENDv0BNd_400x400.png', + ref_id: 'd754e29b-2d3e-4280-8d72-f41d2a465a78', + twitter_handle: 'Coinkite', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/f1879df9-9bc6-4a76-951f-24548da768ef.jpg', + keyword: !0, + link: 'https://anchor.fm/s/9500fad8/podcast/play/63636824/https%253A%252F%252Fd3ctxlq1ktw2nl.cloudfront.net%252Fstaging%252F2023-0-17%252Fa8844ef8-32a4-a7cb-a945-627aad9505c1.mp3', + node_type: 'clip', + pub_key: '02545c14cbb18a61f20dd45f5e3dcbd9acae3de282369501040adce32a75311309', + ref_id: '62034201-203b-42ff-9884-a850d6298caf', + show_title: 'Bitcoin.Review Podcast with NVK & Guests', + text: "Very cool. So Mike, why don't you don't you give us a little intro about yourself at bitcoin op tech? I think a lot of people don't know much about it. Yeah, I think we, we do a good job, but we don't do strong on the marketing front, which is maybe common for a lot of the tech folks in this space. So, Mike Schmidt I have two different roles in the bitcoin ecosystem. The first one is executive director at Brink and Brink is a 501 charity in the US. That our mission is solely to support open source development in the bitcoin ecosystem with a particular focus on bitcoin core developers and getting them funded. And we've been around two years sponsoring eleven different developers and a bunch of those are in London in an office working together on bitcoin core. And then the second part of my work in the bitcoin ecosystem is a contributor at bitcoin Optech. So there's a few of us that get together. We're most known for our technical newsletter that covers weekly updates in bitcoin open source work. So bitcoin core, the lightning implementations and some other projects that we cover as well as any news from the mailing list. And so if there's anybody who's interested in bitcoin review and is a subscriber here, should obviously also subscribe to the aptech newsletter. It's a good way to stay up to speed without having to go through IRC meetings and mailing list posts and things like that. And we also have done workshops in the past. What's that choice? It's a great mailing list. I was going to find things that got merged in bitcoin core through the mailing list, not always through the notifications. What I was going to say is that if you have nearly unsubscribed or muted the mailing list due to the RBF discussions and everything else like I did, bitcoin optic is a fantastic way of keeping up to date. They also review some of the stuff so they'll put like pertinent commentary on the topics and on things that you would likely miss because bitcoin core does get the fake news rhetoric about not much is going on, but it is an absolute cluster of amount of stuff that gets worked on. If you ever done anything on bitcoin core, you're going to very much understand what rebates means to that point. In the last month, at the end of the year in December, optic put out our annual Year in Review, which summarizes everything that OPEC has covered and that has happened in the ecosystem for that last year. And one of our little statistics that came out of that is people say nothing's happening in bitcoin. There's no innovations, there's no interesting discussions going on. And we published just our little publication put out the equivalent of a 200 page book on the development and discussions that are happening in the bitcoin ecosystem. I believe it. Yeah. I mean, I know this from my own book. It's like 200 plus pages, but if I had transcript every episode, it would have been just ginormous. And the episodes cover only a small part of what bitcoin is working on. So, yeah, there's plenty out there. It's just less marketing department and some of the things sound less cool than Sharding and to the Chess and NFTs. Hey, you're not looking for a 5.4% yield on Staking. Ethereum? No, I thought it was up to. Seven and a half. You just don't get your coins right. I don't know, man. Yeah, that's right. They're locked forever. ", + timestamp: '00:03:40-00:07:24', + topics: ['Schmidty'], + type: 'podcast', + weight: 21.362822151492544, + }, + { + boost: 0, + date: 1668116851, + description: 'Challenges of orange pilling the family ', + episode_title: 'UFC @NicolauMatheus - @LuPinheiroMMA - Fighting for #bitcoin! #296', + guests: [ + { + name: 'Matheus Nicolau', + profile_picture: 'https://pbs.twimg.com/profile_images/1600020909946912768/LlhR_2HX_400x400.jpg', + ref_id: 'be94e55e-4b46-4b37-92bb-431496b067de', + twitter_handle: 'NicolauMatheus', + }, + { + name: 'Luana Pinheiro', + profile_picture: 'https://pbs.twimg.com/profile_images/1461887787406221317/EFrMNheP_400x400.jpg', + ref_id: '219d8df1-3a60-41ff-8aa4-d08992f49148', + twitter_handle: 'LuPinheiroMMA', + }, + ], + hosts: [ + { + name: 'Lauren', + profile_picture: 'https://pbs.twimg.com/profile_images/1586022214901501952/U1dRyCxP_400x400.jpg', + ref_id: '7f14bbf5-a60b-496b-a361-3663cf120299', + twitter_handle: 'LaurenJauregui', + }, + { + name: 'Daniel Prince', + profile_picture: 'https://pbs.twimg.com/profile_images/1589940494364205056/rnHs5gI3_400x400.jpg', + ref_id: 'df2d4d35-3e96-44ed-b1cc-cb8a714bbe30', + twitter_handle: 'PrinceySOV', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/e1eca67b-d372-4031-bf1f-8f0ff7fe6092.jpg', + keyword: !0, + link: 'https://anchor.fm/s/1346f9e8/podcast/play/60430338/https%253A%252F%252Fd3ctxlq1ktw2nl.cloudfront.net%252Fstaging%252F2022-10-10%252F62ad9fbe-64bf-f20b-66a5-c8e493cfe60f.mp3', + node_type: 'clip', + pub_key: '', + ref_id: 'ccc45d70-f16e-498f-9f66-12cf8a221337', + show_title: `Once Bitten! - } +A Bitcoin Podcast. +`, + text: "do you try and explain it to your parents? Has Luana tried to explain it to parents, brothers, sisters? She said that for her parents was kind of difficult to explain because they're kind of old school, they are older and they didn't know much about the technology and everything around technology and computer, they don't know much about it. But some of her brothers already have cryptos and know a lot of not a lot, but they know about cryptos and Bitchcoin and everything. So they support her since the beginning. That's good to hear. What's not good to hear, I suppose, are the other cryptos. We try to steer clear of those. Have you both kind of come to that conclusion yourselves, that there is Bitcoin which is safe and stable and sound money and there's others? I'll start from me, since the beginning, from few years ago, before, even way before I was starting to receive in Bitchcoin, I already knew and heard about Bitchcoin. I knew a little bit about crypto, what's going to be the technology, something new, but I knew at this I heard that the Bitcoin was like the most powerful, the most trustful crypto. And for me, and for one, I think as well, for now, we are just receiving in Bitcoin because I don't want to be doing like trades and stuff like that. So like I said, I put just a small amount in Bitcoin. All the market right now is down the price of Bitcoin. I really believe that we're still going up in the near future. So we're putting all our money for now in Bitcoin because for me it's the safest way for keeping our money. And does Luana feel the same way? She's seen the other cryptos. She said that at the moment the only thing that is in her mind is the Bitcoin. She doesn't feel safe to put her money in other cryptos right now and it's not her idea. Perfect, wonderful. Stay like that because there are a lot of people out there that are going to try and contact you, especially because you are in the public eye, because you are fighters. It's a dangerous world because people will come and try and sell you things that are not good for you or your family. She said that when she announced that she was receiving Bitcoin, she received a lot of message telling her to be careful with some crypto and telling the cryptos like, oh, you received it in Bitcoin, but be careful with that and that and that crypto because it's not good and stuff like that. So I think that's why she also stay only in Bitcoin. It's very difficult for people in your position when you have this fan base that other people can use you to sell to them. So I would certainly be wary of people coming to you offering you money just to say, we have now decided to buy X-Y-Z cryptocurrency because you could end up in a lot of trouble. Like Kim Kardashian. What happened with Kim Kardashian? She was receiving. She put a lot of money, specifically. Crypto, and she was paid by another cryptocurrency to say something about that cryptocurrency on social media. And she was paid a lot of money, but she then didn't report the money that she had been paid. And so she faced a criminal charge from the securities and Exchange Commissions in the United States. So just by aligning yourselves with these other projects could really end in a lot of trouble for that influencer. Got it? Yeah. So just stick to Bitcoin because there is no CEO, there is no marketing department. You know all of this already, so ", + timestamp: '00:13:34-00:20:33', + topics: ['Bitcoin price', 'Orangepilling challenges', 'crypto'], + type: 'podcast', + weight: 4.788048102306679, + }, + { + boost: 0, + date: 1629691200, + description: '[[Lightning]] is chain agnostic', + episode_title: 'WHY ARE WE BULLISH Bitcoin Meme Hub Jan Capek Bitcoin Mechanic Max Hillebrand ep195', + guests: [ + { + name: 'Max Hillebrand', + profile_picture: 'https://pbs.twimg.com/profile_images/1311357499514269696/-HQFwyFH_400x400.jpg', + ref_id: '9a86cc59-ed01-4757-88f6-e9d9d63067b9', + twitter_handle: 'HillebrandMax', + }, + { + name: 'Bitcoin Mechanic', + profile_picture: '', + ref_id: 'faae3a37-0115-4074-af21-7d79c429c7cb', + twitter_handle: '', + }, + { + name: 'Jan Capek', + profile_picture: '', + ref_id: 'ec6f8b14-6c4b-42e9-8e86-9aa902c0906d', + twitter_handle: '', + }, + { + name: 'Bitcoin Meme Hub', + profile_picture: '', + ref_id: 'dcd5a590-2018-4707-a49b-8142d7b14e33', + twitter_handle: '', + }, + ], + hosts: [], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/419512c2-e309-4b25-bfe2-cd481d53f66d.jpg', + keyword: !0, + link: 'https://anchor.fm/s/11e95d20/podcast/play/39201536/https%3A%2F%2Fd3ctxlq1ktw2nl.cloudfront.net%2Fstaging%2F2021-7-23%2F214267789-44100-2-17e9fbafdf841.m4a', + node_type: 'clip', + pub_key: '', + ref_id: 'ba7bc3fe-38e0-47e1-b917-f9e4c005a972', + show_title: 'BTC Sessions', + text: "It doesn't solve every problem. And it's not the only layer two thing that Bitcoin has. And it's also chain agnostic, too. Right? So you can have Lightning on anything else as well, if you want it. So it's not strictly technically, strictly a Bitcoin only project. But let's be honest, all of the Lightning devs. Their requirement for contributing, at least to LND is you got to understand Bitcoin. They're not like, oh, and you also need a firm understanding of BSV or F or one of these shit coins. So I think it's an exciting and good project. It's definitely a reason to be bullish. It's incredibly cool software, but as we all would say, it's early on, it's experimental. Be careful with what you do in Lightning, but at the same time, that's kind of all right, because no one would ever tell you to send tens of thousands of dollars using Lightning anyway. It's not really designed for that. It is designed for small, very rapid payments. It's not designed for big final settlement stuff. And now, just to finish up, now is a good time to open channels on the Lightning network. If you want to get something like an embassy OS or just something far more custom than that, because you want to be online all the time with Lightning, that's one thing to remember if you want to do something like that. The blocks are basically empty at the moment, not empty, but there's a lot of space in the blocks. So it's a good time to open channels and play around. And there's always test. Net as well, if you really don't want to use any sets. So, yeah, that's my piece. But testing things on mainnet makes mistakes very memorable. Can confirm what's your experience of Lightning Dove in a lot. Well, actually, back in 2017, that was still before Lightning being officially usable on maintenance. I did a presentation in Parole New Police, which is a place where the Bitcoinners used to get together and still get together in truck. And I was demonstrating real life Lightning running over, I think, a Litecoin and Bitcoin test nets and did a transaction on there. And by that time, I actually deeply studied all the mechanics. And what just made me super exciting is that when you look at the mechanics of the crypto behind it, essentially the thing that it's trust less is when you look at it, it's super simple in a way. Once you understand it, then you'll be, well, this is a great idea, and you would be wondering why this hasn't come much earlier. But things evolved. So that was back then, and I've been following it ever since then. Now I'm Super excited that we have fine Lashner in place, so that's going to make a few things a little bit more smooth within the Latin network. So I think this is the layer that the smart contracts are going to be running on. I can't think of anything else. In terms of practice, we as a pool, we don't have a really good business case. But I think a year ago when there was the Lightning torch going, that experiment, we were one of the ones holding the torch at like $200. So that Bitcoin that needed to be transferred with the next step was like $200. And that was already a little difficult, but we managed and it was really exciting. So this is my experience. If there is anything that people call the DeFi, this is going to be the place where it's going to be happening. Yeah. ", + timestamp: '01:08:24-01:12:14', + topics: ['lightning', 'lightning'], + type: 'podcast', + weight: 4.075675964374691, + }, + { + boost: 0, + date: 1669766400, + description: 'How Konstantin Wünscher came in contact with Lightning network', + episode_title: 'Meet the Makers: Konstantin & Arvin', + guests: [ + { + name: 'Konstantin Wünscher', + profile_picture: 'https://pbs.twimg.com/profile_images/917464868663582720/PMFCqusG_400x400.jpg', + ref_id: '5f027fce-7775-4824-b941-d2f4120d2d0f', + twitter_handle: 'krychtiukmd', + }, + { + name: 'Arvin Galoy', + profile_picture: 'https://pbs.twimg.com/profile_images/1429792764464611329/4VQqlZiM_400x400.jpg', + ref_id: 'e0eb434a-9219-4c57-b9e4-da6ceeaec040', + twitter_handle: 'GaloyMoney', + }, + ], + hosts: [ + { + name: 'Zapp Ed', + profile_picture: 'https://pbs.twimg.com/profile_images/1519990234070540288/adGqlFoj_400x400.jpg', + ref_id: 'bbe7cf1d-cd8d-4d36-926d-76f41b775fbb', + twitter_handle: 'zapp_ed', + }, + { + name: 'Moritz Alby', + profile_picture: 'https://pbs.twimg.com/profile_images/859727763292512258/kiFpZ2vO_400x400.jpg', + ref_id: 'e88efbf8-3809-4508-a86a-d7bf9effb574', + twitter_handle: 'MoritzKaminski', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/965489b4-a414-4fd0-ab8c-55911b1596aa.jpg', + keyword: !0, + link: 'https://www.youtube.com/watch?v=CjwjScc0TYg', + node_type: 'clip', + pub_key: '02574d6e8e787372184b6f17c40d6c6fe1777db9015801f95dfd24692784d767cd', + ref_id: 'abb2867c-0c1e-4cc2-8f60-35322740d3f2', + show_title: 'BOLT FUN', + text: "to you, Constantine. Can you tell us a bit about your background and the first touch point in lightning? Yeah, absolutely. So I guess I touched crypto before I touched lightning, so I didn't come into the space immediately into lightning, right out of the gates. When I finished my degree, I started working in a cryptocurrency firm and they were just making markets across pretty much any sort of exchange and cryptocurrency. And back then I was more interested in the trading part, to be honest. So that excited me. But quite quickly I sort of realized what was wrong with just general, like traditional finance and also bit of crypto. Because basically we are touching both you're moving Fiat and we are moving crypto. And like large scales just realized it's just inefficient. It doesn't work very well. On the feared side, you had like capital controls. You weren't able to move money in amounts and the speed that you wanted to across countries on an institutional level. On the crypto side, it was just like super slow moving bitcoin took free. Confirmation was that like an hour and some exchange also had some sort of like they only moved to once a day and that probably was just because it was just really clunky to use and it was just like on both ends, it was a really bad experience. And so that sort of made me realize in order for this to actually take off, there needs to be, one, improved user experience on this and two, it needs to be much faster. Even crypto needs to be these transactions that they did, they needed to be much faster. And the reason I sort of went down on bitcoin is because bitcoin was pretty much the best or most adopted asset then, institutional wise. Like, people were trading that on large scale, and now I think it's pretty much the most traded asset out there and probably the most stable one as well. It was very sort of practical thinking. And I was thinking, is there anything that makes crypto, like bitcoin faster? And then back then, they just actually just, I don't know how long line that was around, but it was very small then and realized that's around and actually that can improve this whole payment speed quite dramatically. And I think then it was sort of like, yeah, this is pretty much the way to go. This would pretty much solve the problems all that this firm I was working for had in terms of capital efficiency. So I thought I might as well spend my time building some infrastructure for companies like that and start exploring that. Now I'm here. That's pretty much it. Obviously, it had to happen. Like, a lot of things happen in the meantime. In terms of the problems I sort of hit along the way. This was very, like, on the capital markets. First world problem kind of ends. Obviously there's a lot of other problems that it solves, but I guess this was my initial sort of spark where I thought, like, yeah, I mean, there's purpose that needs, like, work in order for finance to progress. But yeah, so this is how I got started. So it was very practical thinking from like, okay, there was a problem, how can I solve it? What's the technologies out there? What's a technology that's probably very likely to continue to exist in the future? And so that was bitcoin and lightning. So it just made sense to me, and that's how it went. Yeah, now I'm here. ", + timestamp: '00:01:46-00:05:42', + topics: ['Konstantin Wünscher', 'Lightning network'], + type: 'youtube', + weight: 6.038835757849391, + }, + { + boost: 0, + date: 1640926800, + description: "[[El Salvador]]'s Government Wallet, [[Chivo]]", + episode_title: 'WHY ARE WE BULLISH Tone Vays Jaime Garcia Trent Dudenhoeffer KC Hodl ep225', + guests: [ + { + name: 'Tone Vays', + profile_picture: 'https://pbs.twimg.com/profile_images/1416821178266787844/T1OkI9ZW_400x400.jpg', + ref_id: 'da6fc991-7080-461c-86e3-4ac18c2f413d', + twitter_handle: 'tonevays', + }, + { + name: 'KC Hodl', + profile_picture: 'https://pbs.twimg.com/profile_images/1506986051683950592/MMMse9gr_400x400.jpg', + ref_id: 'b2264dd3-e587-403e-9447-9e99afc1910d', + twitter_handle: 'kc_hodl', + }, + { + name: 'Trent Dudenhoeffer', + profile_picture: '', + ref_id: '3b466176-3bbc-481d-9634-e127a9232404', + twitter_handle: '', + }, + { + name: 'Jaime Garcia', + profile_picture: 'https://pbs.twimg.com/profile_images/953009048642715648/PKaQy5UD_400x400.jpg', + ref_id: 'f259c6b5-71d6-4c5c-897c-3cfbe80cccc2', + twitter_handle: 'jaimegarciag', + }, + ], + hosts: [], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/c8ae0def-c33c-4d17-af4e-31ddaeedaf8a.jpg', + keyword: !0, + link: 'https://anchor.fm/s/11e95d20/podcast/play/45510131/https%3A%2F%2Fd3ctxlq1ktw2nl.cloudfront.net%2Fstaging%2F2021-11-31%2Fc821a6ba-7ef1-35ba-b24e-b96e84186843.mp3', + node_type: 'clip', + pub_key: '', + ref_id: '450d6337-33ea-43a4-97f0-928b9d4174eb', + show_title: 'BTC Sessions', + text: "a question regarding El Salvador. I'm wondering there's Shiva Shiva is the government wallet, if I'm not mistaken, on chain, it's not Lightning enabled, is that correct? Yes. Tivo is a funny animal, because I wouldn't really refer to it as a wallet at all. I think it's an app. It's basically like a government bank which facilitates transactions within the Cheebo ecosystem. And in that sense, it works very well. It does have the capability of Lightning, and they have recently upgraded their app so that it functions a little bit better. One of the things that people experience when they went down to the conferences was a bit of a pain point between the traditional Lightning wallets and cheeble. A lot of transactions we had stuck. And so it seemed like the Unchained transactions were a little bit better. But of course, with on chain transactions, we know that there's a bit of a wait and it just sort of defeats the purpose of having a Lightning fast transactions. Right. Yeah, it's a bit of a different animal. And I have been encouraging folks down in El Salvador to sure use Cheebo for some things, but definitely not store a whole lot of their savings on it. And looking back at some of your tutorials and some of the referencing a lot of what you've done in order to get people to use some alternative wallets. Right. But, yeah, definitely when it comes to chival, it's a different animal. I think we could talk about this the whole time we're here. So I won't monopolize any more of it and just throw in that some of the things that I have been on and that normally asked me usually is things like, what does it mean to mine? How do you get Bitcoin things like that? But then after a lot of them just get hung up on that. But after that, it's like, how do I get a wallet? Which wallet should I use? And then I've been working with some actually in the audience there's Daxosa from El Salvador. If it's not the first node in El Salvador, it's like one of the first. And we use your video on how to set up a node for him to set up a node in El Salvador. That's actually so exciting for me. And like he just said, like Greetings from El Salvador in the comments. So shout out. One of the things that he's doing, he's actually because we know that the Chival Point of Sale system was having a lot of issues, even more than the personal wallet. He's working with folks like usually small merchants to set up BTC pay server solutions using his node as kind of like the point. And he's encouraging well, he's not also learning, but he's encouraging other people to set up their own notes and their own Lightning channels in order to set their own POS system so that they don't have to depend on these centralized options that I guess they were necessary evil to have, like that opening mass adoption. But I think that we can all agree that it's something that is almost the entirety. This is a Bitcoin right? Yeah, absolutely. And it almost sounds like the chival wallet was having liquidity issues with the connectivity of their Lightning portion of it. Like if they were having trouble getting Lightning transactions to go through, I imagine it's difficult to onboard millions of people and have a reliable set of inbound liquidity for millions of people right out the gate. But regardless, I highly advocate that people go to nongovernmental wallets if possible have self custody tone, ", + timestamp: '00:17:37-00:22:42', + topics: ['el salvador', 'chivo'], + type: 'podcast', + weight: 4.07567598814776, + }, + { + boost: 0, + date: 1671663632, + description: 'How profitable is Antminer S19 Pro?', + episode_title: '#Bitcoin and Macro Jam Session 🎸🔥', + guests: [], + hosts: [ + { + name: 'Joe Bonet', + profile_picture: 'https://pbs.twimg.com/profile_images/1285967527848353824/bwKVva55_400x400.jpg', + ref_id: '207abdda-54a5-4eab-980a-ac936c7298e1', + twitter_handle: 'Joebonnet', + }, + { + name: 'Danny Condon', + profile_picture: 'https://pbs.twimg.com/profile_images/1449366565074440194/B_iLnyPw_400x400.jpg', + ref_id: '0e671cc8-0dd8-46b1-90be-451b23932fae', + twitter_handle: 'DannyCondon1989', + }, + { + name: 'Blake Davis', + profile_picture: 'https://pbs.twimg.com/profile_images/1532456877602349056/yg52j806_400x400.jpg', + ref_id: 'ce01300a-c603-4a32-9c98-8b05160a1959', + twitter_handle: 'BlakeDavis50', + }, + { + name: 'Mitchelle Askew', + profile_picture: 'https://pbs.twimg.com/profile_images/435841191524204544/mzKR9KCX_400x400.jpeg', + ref_id: '5f69ba8e-c266-4b31-bc1c-10de71e6ff79', + twitter_handle: 'Mitchell_Askew', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/7c53ad3c-1ce2-4661-8896-4c40dcc23b4d.jpg', + keyword: !0, + link: 'https://stakwork-uploads.s3.amazonaws.com/uploads/customers/2707/media_to_local/81882712-0c04-4852-b4d7-308376f102b3/c0c2c28c-b1f6-4568-8754-c3b7a4faa285.mp3', + node_type: 'clip', + pub_key: '03a3451db4748e483d2e1ee5d0b3a6872253253b57edf4b084a56952b432a224b3', + ref_id: '3138e8b2-0b4d-4ddf-876c-b5448436273e', + show_title: 'Blockware Solutions', + text: "sure man. I think like one other point, I'll light on that and then we'll wrap it up here pretty shortly is let's assume that demand for mining is a total demand is a constant, right? And you've got this interesting factor where XPS, you know, it's kind of let's think bitcoin, let's put our bitcoin hats on. Like XPS are relatively scarce. They've only been in delivery for approximately four months. So there's less XPS in circulation than J Pros. Right? And in this, so you've got this scarce asset of sorts to begin with and then as you look at basically Pros being right around breakeven, I think like eight cents, eight point two cents, something like that, is probably the breakeven on J Pros. Right now. That demand, which is a constant over the whole market, is shifting to XPS, which places that incremental premium. So in theory, right, if we get some price recovery, we get a material negative difficulty adjustment and S 19 J Pros become get back in the money, so to speak, right? And for a little bit more of a perceived elongated time period, it's logical to think that if this disproportionate premium still exists that some of that demand will then shift back to the S 19 J Pros. Right. And then in which case, that could be a catalyst for XP price reduction, which would probably coincide with S 19 J Pro. Price appreciation, which is something that we talk about all the time, is central to the point that bitcoin miners are not just yield machines, they're more like dividend paying assets and that asset has a value. So right now, if I'm thinking about, like, buying miners, I'm looking at S 19 J Pros as a probably slightly higher risk yield play. This is not financial advice, right, but just kind of skip on here, but potentially most likely a more lucrative opportunity for asset side appreciation. It's not incredibly difficult for S 19 J Pros to go from 2000 to 4000 in price, but it's more challenging for XPS to go from 6000 to 12,000. And if you're allocating a certain amount of fixed capital towards either of those, your likelihood of getting a more material asset side appreciation on an upside play out is more likely on pros. But the risk there is that you're going to be carrying an asset that might have a very small and potentially negative yield. So I'm kind of down in the weeds here, but that's the way I've been thinking about this lately, so I figured I'd share those insights. Yeah, totally agree. And I think a historical example of kind of what you're talking about, an extreme historical example is kind of looking back at the S Nine, how it behaved during the bear market of 2020. And then up until mid 2021, these rigs were basically like scrap scrap metal. You could buy it for $40 and the rig itself, just holding it actually outperformed bitcoin fairly significantly from the bottom of the 2020 bear market up to the top of the 2021 bull market. So, yeah, that's an extreme example. But yes, if you buy the less efficient machine, you definitely have potentially more upside appreciation. If the price of bitcoin runs on the machine itself, obviously your cash flows are going to soar as well. But you carry that short term risk of, hey, this machine might not be spinning off positive cash flows if the price of bitcoin goes down further. Yeah, spot on, man. Love it. ", + timestamp: '00:47:14-00:51:30', + topics: ['Antminer S19 Pro'], + type: 'twitter_space', + weight: 9.950559236875215, + }, + { + boost: 0, + date: 1672012800, + description: 'Learning From Bitcoin History and the Importance of History', + episode_title: 'A Christmas Trip! | EP 20', + guests: [ + { + name: 'Erik Cason', + profile_picture: 'https://pbs.twimg.com/profile_images/1528431738145361921/roDCkAUy_400x400.jpg', + ref_id: '345e1da8-42ed-442b-8b90-ecb44bab61a1', + twitter_handle: 'Erikcason', + }, + { + name: 'FractalEncrypt', + profile_picture: 'https://pbs.twimg.com/profile_images/1588218887807680512/lFJArP4n_400x400.jpg', + ref_id: '888ea071-8312-4aca-b229-7447217e59f0', + twitter_handle: 'FractalEncrypt', + }, + ], + hosts: [ + { + name: 'Coinicarus', + profile_picture: 'https://pbs.twimg.com/profile_images/1576751322388373506/Uc4PKada_400x400.jpg', + ref_id: 'd2cf5b2b-ae0e-439a-a461-9c3e964b4619', + twitter_handle: 'Coinicarus', + }, + { + name: 'Walton', + profile_picture: 'https://pbs.twimg.com/profile_images/1579938510538153994/EYbT5PEr_400x400.jpg', + ref_id: 'ec8c8747-a001-42ba-ae87-bfdef751b781', + twitter_handle: 'beeforbacon1', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/e79b1a57-ecd0-4df3-b8ec-1a1a55d047e7.jpg', + keyword: !0, + link: 'https://www.youtube.com/watch?v=MvM9x7_Je0s', + node_type: 'clip', + pub_key: '', + ref_id: '87520be0-ad60-48d0-aba6-44aec1452a09', + show_title: 'Pleb UnderGround', + text: "They still believe that their government and their secret services are the good guys. Essentially like Carl Sagan. Their government is their god for many people essentially in the western world. Whether they're wrecked that education system they're training you be a patriot. It's part of this whole thing. Where are you getting your history from? It's from this well of this free public education system. So yeah, I think fully they're doing this in a purposeful way and also I really love to think about what Eric was talking about. The history that we get. You don't think about it too much but it's actually like there's so many holes in history. We actually only have a very small fraction of human history that we understand because it's really history is written by the winners and it's a series of winners. So everybody that's winning, you're kind of getting their version of the story and you're just kind of sweeping away the losers. And every winner is always the good guy. Like Eric wasania like, hey, these are the good guys. Mistakes were made. I just died over here. That was so funny. Like yeah, mistakes are made, we're all good but sometimes we just make mistakes. Like no, all history is a matter of you're getting the story from somebody who's basically feeding it to you and they're at the top of it and basically they're the good guys. So all history is suspect. Which brings us back to Bitcoin which has the one true history that we can all agree on. So I just love that we now have a countermeasure that is widely distributed and that individuals can utilize and leverage for their own self sovereign needs and tools and stuff. So I think that we've always had this history fed down in a I don't know if it's top down way in essence, like you're getting fed history from a higher source. But now it's like, no, the history is widely distributed and if you try to feed me some bullshit, my note is going to reject that as invalid. And we haven't had this before. This is an awesome history actually is. It is fundamentally a proof of stake where they're like hey here's our story, take that on. And when you start to actually do the proof of work in history you find all of those holes and you realize that the blockchain of history doesn't actually sink up in any meaningful way. And that's why it's so important that we now have this time chain because it turns out that the control of wealth is the most important thing that has ever happened. In addition to the fact of that, there has been a constant century long propaganda war against people to understand the importance of that history, not only in terms of the actual historicism of events that have happened, but also the historicism of the actual accounting of how the general monetary system works. Because if you actually understand how the Brenton Wood system came about, it's truly horrifying to realize that we essentially played the shell game where we're like, yeah, we're going to get everybody back to a gold standard. But in the meantime, you guys should all take these dollars that will totally exchange for gold whenever you guys want. We absolutely will not inflate the shit out of it. And this, like, former Nazi bank that we said that we would suspend, let's make that into the bank of International Settlements, because gold from the teeth of millions of dead Jews. That's like a great base to start an international monetary system. To me, that's one of the ones that's so horrifying is realizing that the bank of International Settlements was literally the SS gold laundering bank in Switzerland, and they decided to make that into the world's largest financial institution. What the hell? ", + timestamp: '00:24:36-00:28:32', + topics: ['Bitcoin History'], + type: 'youtube', + weight: 11.15302576837389, + }, + { + boost: 0, + date: 1656979200, + description: 'Making content royalties accessible through the Lightning Network', + episode_title: + 'Lightning Networks Impact on Music w/ Michael Rhee, Founder of Wavlake - Voltage Twitter Spaces', + guests: [ + { + name: 'Michael Rhee', + profile_picture: 'https://pbs.twimg.com/profile_images/1348612450/IMG_0298_400x400.JPG', + ref_id: '91302fb9-2d08-400e-bd1f-2d52e0af5508', + twitter_handle: 'rheedio', + }, + { + name: '@rheedio', + profile_picture: 'https://pbs.twimg.com/profile_images/1348612450/IMG_0298_400x400.JPG', + ref_id: 'a20f5e1f-5969-47a6-b986-faf29c0c4da0', + twitter_handle: 'rheedio', + }, + ], + hosts: [ + { + name: '@voltage_cloud', + profile_picture: 'https://pbs.twimg.com/profile_images/1508657900486422529/Lfa70poj_400x400.png', + ref_id: '3b622187-60ce-43c2-a21f-ae749c2d961a', + twitter_handle: 'voltage_cloud', + }, + { + name: 'Bobby Shell', + profile_picture: 'https://pbs.twimg.com/profile_images/1090426395979890690/uUdaFXo__400x400.jpg', + ref_id: '438f8067-3fed-49d2-91d9-5018cb043aac', + twitter_handle: 'BobbyShell2', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/2ec62250-4755-4616-8342-096a2cfab95f.jpg', + keyword: !0, + link: 'https://www.youtube.com/watch?v=aZt44KjXHh0', + node_type: 'clip', + pub_key: '', + ref_id: 'c7beffcd-bb44-4cf9-a04a-a26f6439114c', + show_title: 'Voltage', + text: "final, like eight to ten minutes, I want to open the floor because I know I think there's a lot of musicians here. Everyone loves music, and I feel like we all have opinions and it'd be cool to pick your mind and others. But on Friday, and I mentioned this to you before, I'm dropping a little article. It's like a 1 minute read on how I think Lightning could help just content creators who are not musicians. And even though I am a musician, I wanted to make a video file documenting my son's life. I tried to use a song that was copywritten. I knew I couldn't use it on YouTube because I get the internet. And when I tried to post it, it was flagged immediately. And I was just like, cool. At least I tried, but I was just like, how cool would it be if I could pay via Lightning? If I wanted to use this audio file, an artist could say, I'm going to charge this many SATS per listen. And it can almost be fragmented to where if someone watches 1% of the video, 10%, 20%, I want to be able to pay a small fee to allow people to watch it. And the thing for me is I only have family members listening. I might have 30 views in like a one year time frame, but I want my mom and dad to hear what I'm creating. And this obviously could scale to an infinite amount. But the thing is, it removes middlemen. You brought up some points where people could sample music. There's even bigger ways that can be used. But I just feel like that is transformative to the industry and it just gives people access to things they didn't have before. To create movie scenes that are more compelling, to create music that is more sonically beautiful, and to just reshape history in a way. And I think, like Steve Jobs said, what no idea is original, everything's stolen, or whatever. And it's just like hip hop was based off samples. When you look at the most popular music, it is hip hop and rap music. And to think about how things in the past can be repurposed for future innovation, it's abundantly clear that that's necessary. If I can just add one more thought to that. I think to everyone's detriment, I think we've been conditioned into thinking that the copyright for content I think we've been conditioned into thinking that all content should be locked down in this really severe and restrictive way. And that's the best way for artists and creators to be recuperated for their work. And I think that's a fallacy. I think this idea that we have to lock everything behind paywalls is not necessarily beneficial to the creators. If anything, what we've seen is that these very large platforms have been able to derive enormous profit off of this model. And just because content is available online doesn't necessarily mean you lose the copyright to it or the rights to it at all. Gigi has written really interesting stories about this, about this value economy and this idea that content online, it's incredibly trivial to make a copy of an MP3 or a video file or any other media for that matter, on the Internet. And so with that in mind, does it make sense for us to create all of these barriers to entry and barriers to sharing? I think that's a big question that we're going to be exploring with wavelength over the next couple of years. Is challenging that concept and also challenging the idea that artists are benefiting from the current regime? ", + timestamp: '00:29:28-00:33:28', + topics: ['Lightning Network'], + type: 'youtube', + weight: 4.076299375088045, + }, + { + boost: 0, + date: 1640926800, + description: 'Adopting to [[Bitcoin and Mining]]', + episode_title: 'WHY ARE WE BULLISH Tone Vays Jaime Garcia Trent Dudenhoeffer KC Hodl ep225', + guests: [ + { + name: 'Tone Vays', + profile_picture: 'https://pbs.twimg.com/profile_images/1416821178266787844/T1OkI9ZW_400x400.jpg', + ref_id: 'da6fc991-7080-461c-86e3-4ac18c2f413d', + twitter_handle: 'tonevays', + }, + { + name: 'KC Hodl', + profile_picture: 'https://pbs.twimg.com/profile_images/1506986051683950592/MMMse9gr_400x400.jpg', + ref_id: 'b2264dd3-e587-403e-9447-9e99afc1910d', + twitter_handle: 'kc_hodl', + }, + { + name: 'Trent Dudenhoeffer', + profile_picture: '', + ref_id: '3b466176-3bbc-481d-9634-e127a9232404', + twitter_handle: '', + }, + { + name: 'Jaime Garcia', + profile_picture: 'https://pbs.twimg.com/profile_images/953009048642715648/PKaQy5UD_400x400.jpg', + ref_id: 'f259c6b5-71d6-4c5c-897c-3cfbe80cccc2', + twitter_handle: 'jaimegarciag', + }, + ], + hosts: [], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/c8ae0def-c33c-4d17-af4e-31ddaeedaf8a.jpg', + keyword: !0, + link: 'https://anchor.fm/s/11e95d20/podcast/play/45510131/https%3A%2F%2Fd3ctxlq1ktw2nl.cloudfront.net%2Fstaging%2F2021-11-31%2Fc821a6ba-7ef1-35ba-b24e-b96e84186843.mp3', + node_type: 'clip', + pub_key: '', + ref_id: '193f741e-2e1e-472f-a152-4514cb6d6372', + show_title: 'BTC Sessions', + text: "the media, probably because of its energy output, and people will think, okay, well, if I'm buying Bitcoin, I might as well mine it. Right? That sounds like the best way to go about it. And at that point I'm like, all right, pump breaks a little bit. All you really have to do is download Swan, get a recurring by going every single day or every week at the very least, and then download this blue wallet here. And then when you feel comfortable, like write down your seed phrase, send it over to blue Wallet, and then you'll be holding your own keys. So, yeah, a lot of people go for that mining right off the bat, but it really doesn't take much to be sovereign with Bitcoin. And that's like the beautiful thing about it. So it's just those baby steps. But I think that getting them on the right exchange is arguably the most important. I used to send everybody to Coinbase. That's how I started to. And now Coinbase is the coin casino, as a lot of people would say. I can only talk so bad about them because that's how I started buying Bitcoin in the first place. But with other options like Swan or river that only have Bitcoin, I think that that's a great way to kind of mold a new coiner into only buying Bitcoin and staying away from unregulated securities. Two things about what you said there that really stood out to me. Number one is the baby steps, right? You can throw everything in the kitchen to sink at somebody when they first walk in the door, but they're going to turn right back around and leave. And so getting those small attainable goals that they can just reach out and grab and then move on to the next, I think is very, very important. Something as simple as get off zero. And like you said, set a recurring buy. And then the next step is just some self custody, like learn how to use a wallet and then you can hit the ground running. But the exchange is important piece of it. And you're right. If you throw somebody into a situation where the first thing they're greeted with is 100 other coins that are treated with the same amount of, what's the word I'm looking for? That they're equally as viable as Bitcoin. It's setting somebody up for failure. They're promoted as equally viable. They're not, but they are promoted as such. And Coinbase is one of the big promoters of everything, basically. Yeah. They have all the courses until the SEC goes after for security and then Ripple gets removed from Coinbase over there. Yeah, absolutely. I'm wondering when that's going to. I mean, obviously regulators are slow to act and I'm not like a huge I err on the side of people making their own mistakes. But at the same time, regulator is going to regulate, it's going to happen. It puts us in a tough space. I was one of the first to drive that bus on YouTube, warning people that these are all unlicensed and registered security, starting with Etherium back in 20, 16, 17 days. And it puts us in a tough place because on the one hand, we are pretty libertarian and we don't want the SEC to exist. But on the other hand, they weren't created for a reason with a job to do. They're not very good at their job. But I don't understand how people think that a world of a billion tokens, the better world. I just don't get it. That's just me. Yeah. So ", + timestamp: '00:27:24-00:31:23', + topics: ['bitcoin and mining'], + type: 'podcast', + weight: 4.07567598814776, + }, + { + boost: 0, + date: 1593259200, + description: 'How human stomach process plants and carbohydrates ', + episode_title: 'Episode 112: Mental Health And Metabolism: Autism, Depression And Your Small Intestine', + guests: [], + hosts: [], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/e8ad867b-9cbe-4126-9f37-313b4d2329a5.jpg', + keyword: !0, + link: 'https://www.buzzsprout.com/482971/4336655-episode-112-mental-health-and-metabolism-autism-depression-and-your-small-intestine.mp3', + node_type: 'clip', + pub_key: '032d7609ff3f4a5232e4d60967971e23bc671dfb68020845a59bab5dc1f3b93b87', + ref_id: 'd013b6c4-0962-464c-96e8-4070946d99a5', + show_title: 'Dr Karl Goldkamp - Keto Naturopath', + text: "We don't digest plants well. We can't break down cell walls and so we can't be chewing a gut and extract. There's no way we can make saturated fats from fermenting plants to break down their cell wall. So that's just not a possibility. So consequently, when you think of not only is breakfast time, meal time a carbohydrate based meal and it's a carbohydrate is a refined carbohydrate based meal. And it's been that way for the last 50 years. So if I grew up on, what did I grew up on? I grew up on wheaties and before that, Cheerios. And so then towards the end, it got even worse. Then there was Captain Crunch. And you think about, how do my folks ever agree to having their kids have this, you know, haven't gotten to dare yet, but that's coming up. So anyway, consequently, when you see these, there's a cereal now that's called colon blow. Colon blow incredibly high in fiber. So this is exactly what we're not suited to. So apart from the fact that it's a processed food, so it's not even, you know, you can't find this concentrated kind of fiber at all in the world in nature, but it has to be manmade. So it's very processed and it's in the wrong direction. If they were trying to improve carbs, okay, so in order to break down plant cellulose for humans, that is, they need to ferment it. That's why things get pickled, right? But if you just keep a mouthful of pickle juice for a while, you know, that's acidic, you'll actually start taking off the enamel of your teeth. So it wasn't something we were meant to do, but that's the only way you can break down plants is by fermenting them and pickling them. So you could say, well, gosh, I heard fermented foods are good for our small intestine. Now, just think of that. I just told you the small intestine was only for low fiber, low residue diets, I e. Carnivore, meat, things like this, meat, fish, chicken. So now we're saying, well, yeah, they can eat fermented foods. So you have the NATO, which is kind of a tempe, comes from soy, or you have sauerkraut. They're famous for these stories. And yes, they do bring in lactic acid. They do bring in all sorts of other bacteria that do help us digest something we were not meant to digest in the first place. So, yes, you can say there's a truth in that based on inappropriate, inappropriate diet recommendation. Okay, you can cook your veggies, right, senium, raw, you can Purpure them, you can breed vegetables to be more tender. You can chew for a very long time. But basically, the bottom line is we weren't meant to eat them. And this isn't my prejudice now. So what else can I tell you about this OK plant Technologies artificial selection. We've now bread, cauliflower, broccoli, and all these things which we consider really healthy. I went to school and I know I was really healthy. Well, they're nothing like they were. So it's not so much what we're having now is really healthy. It's probably back in the day where they looked pretty much just like weeds. They were much more concentrated with those things. So forapanese if you want to say, okay, so now when you go back up to the Eskimos sorry, the Inuits, and they're out there during the night or during the day of their day fishing, where do they get their vitamin D and so on? Well, they have the organs of the animals they eat. I'm sure every so often there's a polar bear. But polar bear liver can actually be toxic in vitamin A. So a little bit is good, and I don't know how much they know, but certainly they have some of you may remember cod liver oil. There's a whole generation that grew up on that, and they can have terrible memories of it, but that was high in vitamin A and vitamin D. So they get their vitamin D from the food that they're eating. And when you're a carnivore, your need for vitamin C is a lot less. I haven't taken vitamin C outside of a few COVID supplementation times in the last couple of years, and I'm quite fine. Whereas when I was having carbs, our garden and so on and so forth, and medical school, I had cancer stores periodically. Interesting ", + timestamp: '00:24:45-00:29:24', + topics: ['Digestive track', 'carbohydrates digestion', 'Inuit diet'], + type: 'podcast', + weight: 4.065291881561279, + }, + { + boost: 0, + date: 1653436800, + description: + 'Are businesses going on-chain route or Lightning Network quick to adopt with respect to payments on a local level?', + episode_title: 'Small Businesses Embracing Bitcoin w/ Michael from Oshi App - Voltage Twitter Spaces', + guests: [ + { + name: 'Michael Atwood', + profile_picture: 'https://pbs.twimg.com/profile_images/1362207977470521345/Jy2_Ge60_400x400.jpg', + ref_id: '16359ade-afb9-4a37-be0b-0844a6134327', + twitter_handle: 'Dooowta', + }, + ], + hosts: [ + { + name: '@voltage_cloud', + profile_picture: 'https://pbs.twimg.com/profile_images/1508657900486422529/Lfa70poj_400x400.png', + ref_id: '3b622187-60ce-43c2-a21f-ae749c2d961a', + twitter_handle: 'voltage_cloud', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/2ec62250-4755-4616-8342-096a2cfab95f.jpg', + keyword: !0, + link: 'https://www.youtube.com/watch?v=kMDSsyAEvd8', + node_type: 'clip', + pub_key: '', + ref_id: 'ca89bac3-188b-4e90-8d0b-fe42d0abf067', + show_title: 'Voltage', + text: "And as far as payments, like on a local level, are a lot of businesses going the on chain route or is Lightning pretty quick to adopt? I know with layer two and just trying to understand bitcoin, are people fast tracking the lightning and it's easier and makes more sense, or is that kind of a hurdle where they're just starting with on chain payments? No, I mean, typically I just get them set up straight for lightning. I think we're at the moment now where you're already starting to see something too. It's like, should we even be separating like, bitcoin and lightning or should we just be saying, like, bitcoin? It's bitcoin. You want to accept bitcoin? Well, yeah, like if you want to accept bitcoin, then you're going to be using something called lightning. But the different wallets, whether it's a centralized sort of wallet or whether it's something like Mood where you can just scan any invoice and it's just going to pay on chain or lightning, those are pretty fantastic tools. And I get businesses set up. If I had to pick between on chain or lightning, I would go with lightning. Every single time because most of the businesses I'm getting set up are just selling small ticket items. It's fast casual restaurants or services where they don't have time to wait for the confirmation. That also adds another kind of confusing hurdle for employees. So I just go straight, straight to lighting. ", + timestamp: '00:05:06-00:06:36', + topics: ['Lightning Network', 'On-chain transactions'], + type: 'youtube', + weight: 4.046232331137288, + }, + { + boost: 0, + date: 1666640962, + description: 'Bitcoin as a currency is discussed', + episode_title: 'S12 E6: Talking Politics with Ben de Waal, Alexandra Moxin & Karo Zagorus', + guests: [ + { + name: 'Ben de Waal', + profile_picture: 'https://pbs.twimg.com/profile_images/1590206971818512384/18qb3LEl_400x400.jpg', + ref_id: 'd8679601-a65f-41ea-9b55-c1a7791b39c3', + twitter_handle: 'Ben_deWaal', + }, + { + name: 'Karo Zagorus', + profile_picture: 'https://pbs.twimg.com/profile_images/1601691364260978689/i38u9RRt_400x400.jpg', + ref_id: '358c2fe3-3615-4c90-bb6a-d4176b893b5e', + twitter_handle: 'btcdragonlord', + }, + { + name: 'Alexandra Moxin', + profile_picture: 'https://pbs.twimg.com/profile_images/1566131791916040192/8Nqn-lqU_400x400.jpg', + ref_id: 'be708104-b97c-4ef1-bbfd-054260b868d3', + twitter_handle: 'Alexandra933', + }, + ], + hosts: [ + { + name: 'Vlad Costea', + profile_picture: 'https://pbs.twimg.com/profile_images/1508539000499355652/ykhgt9iH_400x400.jpg', + ref_id: '2bd8a174-9fb5-4415-ba49-d10a3796859f', + twitter_handle: 'TheVladCostea', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/5fc9c8b0-687f-487e-bde3-bea15e155e3e.jpg', + keyword: !0, + link: 'https://bitcoin-takeover.com/audio/media/2022-10-24_s12_e6_talking_politics_with_ben_de_waal__alexandra_moxin__karo_zagorus.mp3', + node_type: 'clip', + pub_key: '039c26c7a2f03083901b6c9ef94c3d9f12f88f348965dddd5ab54635993728007c', + ref_id: '746c6d41-2f19-4b40-bca5-215942de62cc', + show_title: 'Bitcoin Takeover Podcast', + text: "See? And people say, maxis are so harsh. We're we're not we're quite reasonable. I've always been well, not always, but since 20, 19 20 18, 20 19 I've been a maxi hat I'm wearing is bull bitcoin. Bull bitcoin's mission. And it's their new mission. It's a small, select group of us. And do I want to say what the actual mission is? No, but I'm here to spread awareness about self sovereignty and privacy and the importance of privacy and the importance of having a currency that is valuable. Is bitcoin going to replace all of the currencies around all of the world? Probably not. And I think that that's actually a good thing, because we still need small, localized groups of currency. Not everything needs to be on the bitcoin main chain. We can use lightning networks, we can use rings of fire. We can use many other ways and methods, but we need to have local currencies. I really think that there's a few countries that will probably be the central reserve standard going forward once it's out of the reins of the central banks, which I think should happen as soon as possible. And that puts me in extreme danger saying that. But I mean, look, if you're going to set the rules, you've got to play by them. And where does all of the money laundering happen? Right? Ask those questions. Start looking into it and ask, why do we have these predatory lending systems? Why are we harming individuals so that the very, very few at the top can benefit? Money should be about its usefulness, right? And it should be something that it's not meant to be in the hands of a few. It's a tool. Money is simply a tool. It's meant to unlock whatever it is that you're working on, and it's meant to extend it and make it broader. And it's a tool to unlock what you're working on so that you can share it with the world. So the minute we're censored, when we have censorship in our money, it's so harmful. And, like, you look at the history of the federal reserve system and how predatory they are with the loans, the way the IMF operates, and how reactive they've been toward el Salvador, the first country to take bitcoin as make it currency. It's been over a year now, and I really applaud their effort. It just takes one, and that one has been going for a little bit longer than a year. And I'm really looking forward to some of the efforts around the globe to make bitcoin a standard. And I think in the next, if I were to estimate I don't know which countries, but countries that are really looking at the financial landscape and looking at the money printer and how what's the US. Debt clock at? Like, what, 13 trillion or something? Ridiculous. You look in Canada, every single person is responsible for about $70,000 worth of the national debt. You can't pay it off in your lifetime and still buy a house. It's so predatory. Is the solution burning it down? No. Is the solution, replacing it? Maybe eventually, but in the interim, we've got to kind of work together and I think I highly implore. If any countries are listening out there, consider, please, for the love of God, consider taking Bitcoin as currency because it exists now as a standard. You can utilize the El Salvador example. There's many different resources and yeah, you should give it a shot. Why not? You also sounded like a politician, ", + timestamp: '00:18:52-00:22:47', + topics: ['Bitcoin Currency'], + type: 'podcast', + weight: 4.325172448353293, + }, + { + boost: 0, + date: 1673187067, + description: 'The ideas to improve the use of nuclear power', + episode_title: '@NuclearBitcoinr - Mining #bitcoin With Small Modular Nuclear Reactors. #313', + guests: [ + { + name: 'Nuclear Bitcoiner', + profile_picture: 'https://pbs.twimg.com/profile_images/1443185278525579278/_Yl1nao1_400x400.jpg', + ref_id: '60f5891f-0864-4ed4-987a-81da4768b3ba', + twitter_handle: 'nuclearbitcoinr', + }, + ], + hosts: [ + { + name: 'Daniel Prince', + profile_picture: 'https://pbs.twimg.com/profile_images/1589940494364205056/rnHs5gI3_400x400.jpg', + ref_id: 'df2d4d35-3e96-44ed-b1cc-cb8a714bbe30', + twitter_handle: 'PrinceySOV', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/e1eca67b-d372-4031-bf1f-8f0ff7fe6092.jpg', + keyword: !0, + link: 'https://anchor.fm/s/1346f9e8/podcast/play/63208295/https%253A%252F%252Fd3ctxlq1ktw2nl.cloudfront.net%252Fstaging%252F2023-0-8%252F4a07b2fe-eb1d-2c82-677e-8f2808a09536.mp3', + node_type: 'clip', + pub_key: '02545c14cbb18a61f20dd45f5e3dcbd9acae3de282369501040adce32a75311309', + ref_id: 'e8539d75-fa8f-494a-bace-cf2e9997ba6c', + show_title: `Once Bitten! - float theta = dTheta * float( i ); - gl_FragColor.rgb += weights[ i ] * getSample( -1.0 * theta, axis ); - gl_FragColor.rgb += weights[ i ] * getSample( theta, axis ); +A Bitcoin Podcast. +`, + text: "What were the other ideas being pitched then? What was the winning idea? The winning team was pitching an idea of how to retrofit ports in order to be able to support nuclear powered freighters. So they had some pretty cool ideas of how they're going to do that. It's going to take a lot of harmonization across regulatory and licensing bodies that manage that sort of thing. But they had these cool ideas. One of the judges actually brought up just like, well, what are you going to do when you're parked in port and not using your generators or if you're just going through a canal or something? She threw out the idea. Well, could you mind bitcoin with it? And I'm sitting there in the corner just like, yeah, you could. You just fill one of those containers with a few asics and away you go. When you're not using your full capacity. But they were actually prepared. They had another slide where it's just like, oh yeah, we're going to retrofit transformers on the port. So you can basically just plug in and you can distribute that electricity into whatever local grid you have access to. That seems to solve for tidal waves, though. No, but there's definitely interesting security and safety risks. What else? Give us another give us another example. There must have been a bunch of shakes. Yeah, there was six ideas in the contest altogether. One of them was the young guy that I had already told you about that's doing the education and advocacy. He's got a small team of like three or four people with him that are just trying to and they had really good metrics that they were following for they were showing like this, this is how many people thought favorably of nuclear power before we talked to them. And then, then we then we gave them a pitch and then came back three months later. And then, oh, there's like a 20% increase in interest in these ideas and technology. So they were really good at showing that they were having success on the ground in their education efforts. And then there was another one. There was two that were robot related. One was a robot that was designed to go into, like, highly active areas and pick up any radioactive debris that you may want to collect and analyze or clean or examine various ways. And then the other one was a submersible robot that would be wirelessly and autonomously controlled in the fuel bay rods, which is where the fuel rods go after they immediately get taken out of the reactor. They're basically kept in a pool for three, four or five years before they can be put into the dry storage. So he was proposing an interesting idea of some autonomous robots that can be used to do actions in the pool without having to pull the rods out to do anything related to them. And then the final idea was an idea to instead of the typical way that we capture energy from nuclear fission is that we heat up a medium, whether it's a gas or liquid or a salt, and then we run that through heat exchanger, collect that heat, and then run it through a turbine. But what they were proposing was something that would collect the decay, because when nuclear fissile material decays, it will emit particles, so an electron will just fly off of it, and that's part of the decay process. So they were proposing something similar to how photovoltaic cells collect photons, but designing it to collect the material and the electrons and various other little nuclear material that comes out during the nuclear fission process. Those were the six. And then ours was, yeah, we're going to fix the economics of nuclear reactors by mining bitcoin. Love it. Love the fact you got that done, man. That's so awesome. Well, now I've got a taste of it. So I think I'm going to start applying to just speak at various other conferences. I did the El Salvador conference this time. Maybe I'd like to do the African one next time. And then with the nuclear conferences, they have various different ones for different niches in the industry. So I might start applying to just do general technical talks at some of those conferences and just get me in the room with these people. We got a big one coming up in Europe, in Prague in June. So if you want, I'd happily put you in touch with the organizers. Be the 8th, 10 June. I don't know what year. Someone's shaping up well, that coincides a bit too close with the Canada bitcoin conference. It's going to be the weekend after. I can only travel so much. I have limited vacation time. These trips, aside from like, until bitcoin pumps and then. You can do whatever the hell you like, right? Yeah, I got to fill my bags as much as I can right now while we got this fire sale going on, but who knows if another one of these exchanges bites the dust and then drags us down a little bit more? But ultimately, short term pain for long term gain. That is what it is. Back under ten k, and then we can all start tweeting back at Hoglernaut. ", + timestamp: '01:33:27-01:39:03', + topics: ['nuclear power'], + type: 'podcast', + weight: 16.44662687615222, + }, + { + boost: 0, + date: 1670604293, + description: 'US Dollar charts from FX is discussed', + episode_title: '$80 Trillion in Shadow Banking - FedWatch 122', + guests: [], + hosts: [ + { + name: 'Christian Keroles', + profile_picture: 'https://pbs.twimg.com/profile_images/1575940779746394133/xMNVsyxY_400x400.jpg', + ref_id: '36a8028f-cd0c-4deb-99d3-6f39a70141e5', + twitter_handle: 'ck_SNARKs', + }, + { + name: 'Nolan Bauerle', + profile_picture: '', + ref_id: '7a85907c-0bec-464f-b287-21d68203a74d', + twitter_handle: 'writenolan', + }, + { + name: 'Ansel Lindner', + profile_picture: 'https://pbs.twimg.com/profile_images/815670919460859904/N7_JQzOU_400x400.jpg', + ref_id: '8dd6dc43-3492-49f3-b754-6bd5c6729b1d', + twitter_handle: 'AnselLindner', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/1583c7c4-f4f2-4e52-8f27-a1eaeb6289fd.jpg', + keyword: !0, + link: 'https://anchor.fm/s/cefa18a0/podcast/play/61945665/https%253A%252F%252Fd3ctxlq1ktw2nl.cloudfront.net%252Fstaging%252F2022-11-9%252F302105926-44100-2-9a02866644933.m4a', + node_type: 'clip', + pub_key: '039c26c7a2f03083901b6c9ef94c3d9f12f88f348965dddd5ab54635993728007c', + ref_id: '9c870970-e48f-49e1-8781-3c25f4fd58c6', + show_title: 'Bitcoin Magazine Podcast', + text: "supply. But I have one of this slide that has images on it. Can you bring that up? Chris number 13. So these are some charts to show what they found here in FX. And on the leftmost chart, the green line is US dollar denominated and the orange line is total. And they estimate that about 88% to 90% of all of this off balance sheet stuff is in US dollars. So that shows the dollar is king. The dollar is what the global financial system is, a dollar based system. And I will also say that these other currencies, like the Euro or the yen that might have a small sliver, they're based on the US dollar too because they hold US dollars in their reserves. The middle chart is showing kind of by maturity. So the large pink section is less than one year. And like I said, about 30% is overnight and about 70% I believe is less than a week. So that's pretty crazy. Okay, ", + timestamp: '00:47:26-00:48:35', + topics: ['US Dollar chart', 'currencies'], + type: 'podcast', + weight: 7.221315227189421, + }, + { + boost: 0, + date: 1673187067, + description: 'What role does Bitcoin mining play in the the nuclear power sector?', + episode_title: '@NuclearBitcoinr - Mining #bitcoin With Small Modular Nuclear Reactors. #313', + guests: [ + { + name: 'Nuclear Bitcoiner', + profile_picture: 'https://pbs.twimg.com/profile_images/1443185278525579278/_Yl1nao1_400x400.jpg', + ref_id: '60f5891f-0864-4ed4-987a-81da4768b3ba', + twitter_handle: 'nuclearbitcoinr', + }, + ], + hosts: [ + { + name: 'Daniel Prince', + profile_picture: 'https://pbs.twimg.com/profile_images/1589940494364205056/rnHs5gI3_400x400.jpg', + ref_id: 'df2d4d35-3e96-44ed-b1cc-cb8a714bbe30', + twitter_handle: 'PrinceySOV', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/e1eca67b-d372-4031-bf1f-8f0ff7fe6092.jpg', + keyword: !0, + link: 'https://anchor.fm/s/1346f9e8/podcast/play/63208295/https%253A%252F%252Fd3ctxlq1ktw2nl.cloudfront.net%252Fstaging%252F2023-0-8%252F4a07b2fe-eb1d-2c82-677e-8f2808a09536.mp3', + node_type: 'clip', + pub_key: '02545c14cbb18a61f20dd45f5e3dcbd9acae3de282369501040adce32a75311309', + ref_id: '39b8ddc0-5c0b-4fd0-9d71-6fee6f556a98', + show_title: `Once Bitten! - } +A Bitcoin Podcast. +`, + text: "hole. And then in July of 21, an organization that I belonged to called North American Young Generation and Nuclear was hosting this contest called Innovation for Nuclear, and it was how to come up with innovative ideas for the nuclear power industry to tackle the UN Sustainable Development Goals. Everyone's like, oh yeah. The UN Sustainable Development Goals. Yeah, I know the feelings that many in the bitcoin space have towards us. But you read the goals on their face value, it's like ending poverty, improving health, improving infrastructure on their face value, they're all good things, but the shadiness is what happens behind the scenes. So it's like, all right, well, being able to deploy nuclear reactors anywhere tackles pretty much all of those goals. But then if you can accelerate and amplify their capability of doing that, it just does it even better. And then it opens up all kinds of opportunities for education, for entrepreneurial enterprises in places where that have basically been in cycles of poverty for generations. I'm sure you've spoken with the guys that are doing a lot of the humanitarian outreach. On the bitcoin side. There's a lot of places that could use some reliable, affordable electricity where we're applying these small modular reactors in northern Canada. They've been running on diesel generators for decades, and getting diesel into remote northern communities on trucks and on planes takes the already exorbitantly expensive diesel and doubles it, triples it in some cases. The cost of electricity in these communities is incredibly high. The Ifor end contest with the UN Sustainable Development Goals. We submitted an idea. So I assembled a team that consisted of myself and myself, my wife and two others, and we submitted it. And then we won the first phase which was just basically just a short, like, little three minute pitch and a five page paper. And we won that. And then we went head to head with another team for the full North American contest. And then we ended up winning that one. And basically all I'm doing is I'm just pitching, like Bitcoin mining. It's the perfect demand response. It has these seven properties that make it the perfect consumer of electricity. I didn't really get too elaborate because we only had so much space to work within and we wanted to focus on the UN goals and how it applies to those. And then we won. And the third phase of the contest was supposed to be hosted at the IYNC Conference in Russia, in Sochi, Russia, in May. But that kind of got kiboshed by events in Ukraine. So they very quickly rushed and found a new venue in Koreana Japan. And then we did our final pitch of the idea there. We did not win, but there was pretty solid competition. So I'm doesn't bother me at all like this. Just going to this conference was an opportunity for me to get gauged the space and from like the younger perspective and also orange pill everybody that was willing to have a conversation with me. So I had some pretty good ones. And being a bit of an introvert, I could have done more, but I think I did pretty good for my personality and the way that I am. So I'm very happy with how it went and I think I have a lot more confidence to go and be even more aggressive next time. But we'll see. But even for being in a bear market, the people that I was talking to, the idea clicked with them. There was definitely some discussion of like, oh, well, what about that FTX stuff? And what about the price of the hardware? And these are variables that you have to play with. It's a game trying to maximize the variables in their favor. If you play with leverage at the top, like core scientific, taking out debt against your Bitcoin holdings and your hardware right at the top of the market, and then it takes a dump, you're going to be in a tough spot. But then if you're more like the guys at Clean Spark, where they've stayed well capitalized, now they're in an advantageous position to scoop up all of this cheap hardware. And I hear that a lot of their facilities are based out of Georgia, which Georgia is going to be turning on a new nuclear reactor very soon. So I'm very curious to see how that affects the Bitcoin mining in Georgia. And then another interesting one is in Pennsylvania, there's a project to connect a Bitcoin data mining center to one of their reactors. There's definitely some interesting stuff going on in Ohio. I don't know if you're familiar with Austin Hill and the Sonoda you haven't heard about. That one yet. They're developing basically an application where you will be able to stream SATS in real time as you're consuming electricity to pay for your utility bill. Just basically like we do with Fountain app when I get streamed to you while listening to your podcasts. Like they're setting something up so that you can do that with your utility bill in real time as your meter is ticking. That's awesome. Because the way that he was explaining it is like when you're buying using that electricity and not paying for it two months, that's a credit risk on the utility. Of course, that's gone. And then they can offer you lower prices because that takes a huge liability off of their balance sheets. ", + timestamp: '01:01:06-01:07:09', + topics: ['Bitcoin mining', 'nuclear power'], + type: 'podcast', + weight: 16.336694690582807, + }, + { + boost: 0, + date: 1673187067, + description: 'What is Uranium, and why U-235 being used as fuel in nuclear reactors', + episode_title: '@NuclearBitcoinr - Mining #bitcoin With Small Modular Nuclear Reactors. #313', + guests: [ + { + name: 'Nuclear Bitcoiner', + profile_picture: 'https://pbs.twimg.com/profile_images/1443185278525579278/_Yl1nao1_400x400.jpg', + ref_id: '60f5891f-0864-4ed4-987a-81da4768b3ba', + twitter_handle: 'nuclearbitcoinr', + }, + ], + hosts: [ + { + name: 'Daniel Prince', + profile_picture: 'https://pbs.twimg.com/profile_images/1589940494364205056/rnHs5gI3_400x400.jpg', + ref_id: 'df2d4d35-3e96-44ed-b1cc-cb8a714bbe30', + twitter_handle: 'PrinceySOV', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/e1eca67b-d372-4031-bf1f-8f0ff7fe6092.jpg', + keyword: !0, + link: 'https://anchor.fm/s/1346f9e8/podcast/play/63208295/https%253A%252F%252Fd3ctxlq1ktw2nl.cloudfront.net%252Fstaging%252F2023-0-8%252F4a07b2fe-eb1d-2c82-677e-8f2808a09536.mp3', + node_type: 'clip', + pub_key: '02545c14cbb18a61f20dd45f5e3dcbd9acae3de282369501040adce32a75311309', + ref_id: '313705da-96e5-4cd4-aee7-48ca03a80b42', + show_title: `Once Bitten! - } - `,blending:NoBlending,depthTest:!1,depthWrite:!1})}function _getEquirectMaterial(){return new ShaderMaterial({name:"EquirectangularToCubeUV",uniforms:{envMap:{value:null}},vertexShader:_getCommonVertexShader(),fragmentShader:` +A Bitcoin Podcast. +`, + text: "You answer a really basic question, because I was talking to the kids before I came down to do this interview, and I was asking them, just pitching them basic questions. Like it was with Lauren at the beginning of this, and my 15 year old daughter said, oh, yeah, well, nuclear comes from nuclear power comes from uranium. Okay. Pretty good one way. Yeah. What's uranium? And then there was silence. And it's like we just use these words. We don't know. I don't know. Can you explain to us exactly what uranium is? I don't have a periodic table on the walls around me, but uranium is a heavy element. It fits in that section. If you do look at the periodic table, that segment, that kind of fits beneath everything else. It's referred to as an actinide. Yeah, an actinide. And then there's the Lanthanides, and it fits in the same section as, like, plutonium and neptunium europium. There's a few other ones. But essentially what it is is the makeup of the protons and the neutrons in certain types of uranium. Because that's another thing you get into. It's not just uranium. There's uranium 238, there's uranium 235, there's uranium 233. But in its natural form, the proportions are 98 ish percent uranium 238. And only a small fragment of that is U 235 and then U 233. So then U 238 isn't fissile in its current form. It can be bred into plutonium 239 and then uses fuel. Yeah, they call like that's what they use. The the breeder reactors is what they're called. It puts material that can be made into fissile material into a state where they can process it into something fissile. But the naturally occurring U 235 is what they're after for creating the fissile reaction. So the refining and enrichment process will separate out the U 238 and make it a higher concentration of U 235. So most reactors use about 5% U 235, and then there's some types that use as much as 20. And then, like, weapons grade enriched uranium is, like, 90% U 235. So there's there's a very significant difference in the processing techniques for for getting these different grades of uranium to be usable in the different applications that they're used for, and then to create the energy with it. Once you start the chain reaction by releasing a neutron, it will make contact with the nucleus of that uranium atom, which is already unstable. And so then it will break apart because it's even more unstable when that neutron sticks to it and it will break into two smaller elements and then it releases a little bit of energy, or actually a lot of bit of energy and several other neutrons. So the way that they maintain the chain reaction is that they will have absorbers in the reactor that will absorb two of those nutrients and then one of them will continue on to cascade into another uranium atom and then continue just cycling that process. And if it gets going too fast, that's what the control rods are for. They'll put the control rods in to absorb more neutrons and slow the reaction down. Or if they want to speed the reaction up, they can pull out the control rods and allow for more neutrons to form inside the reactor, creating more chain reactions and then the energy that's released from that is collected. Most reactors these days use water or a pressurized water type of system. And then that water collects that energy and it heats up and then through a system of heat exchangers and condensers and turbines, that gets converted into electrical energy. So how do we get uranium? We mine it. It's in the ground. It's all over the place. Like northern Saskatchewan in Canada is where our main reserves are. There's lots of uranium reserves throughout Africa, throughout South America, throughout Russia and Kazakhstan. Like Australia. Although they don't have any nuclear power, they have a massive uranium mining industry that they support, I think somewhere about 10% of the world's supply of uranium. And then on top of that, uranium is just the primary one that we use. Eventually there will be reactors that are capable of using thorium as their fuel, but that has to go through a similar process, like I described with the breeder reactors, that it needs to be made into a slightly different nuclei of thorium in order to be used as fuel. So it's a slightly more complicated process to use it than uranium because it can just be some reactors, like the Cando reactors can take fresh uranium basically straight out of the ground. It just needs to be processed into the right geometry and fuel rod shape, but it doesn't need any enrichment beyond the natural 2% amount that we need. But you can only get so much energy out of these with the conventional reactors. So that's why there's now efforts to reprocess and recycle a lot of this fuel to get more out of it than we previously have been able to with the traditional fleet of reactors. So that's where a lot of the advanced reactor and generation four types are going to come in, where where instead of using water as their main medium, they're going to use either like a molten salt or a high temperature gas or liquid sodium is one of them. And then there's graphite cooled type of reactor. I'm probably missing a few. But there's a lot of new designs that are being proposed to be commercialized and like most of them have already been proven throughout the decades. But just the way that it was easier to just choose one design and build lots of that similar design made more economic sense at the time. So they just kind of stuck with that. And a lot of these new designs that are being proposed now were just sitting on a shelf for decades and now they're just being brushed off and having new safety features applied to them. And we're going to start demonstrating and deploying them probably before the end of the decade. ", + timestamp: '00:21:13-00:28:01', + topics: ['Uranium', 'uranium'], + type: 'podcast', + weight: 16.23323383988826, + }, + { + boost: 0, + date: 1653436800, + description: 'Michael Atwood on Bitcoin awareness for small businesses', + episode_title: 'Small Businesses Embracing Bitcoin w/ Michael from Oshi App - Voltage Twitter Spaces', + guests: [ + { + name: 'Michael Atwood', + profile_picture: 'https://pbs.twimg.com/profile_images/1362207977470521345/Jy2_Ge60_400x400.jpg', + ref_id: '16359ade-afb9-4a37-be0b-0844a6134327', + twitter_handle: 'Dooowta', + }, + ], + hosts: [ + { + name: '@voltage_cloud', + profile_picture: 'https://pbs.twimg.com/profile_images/1508657900486422529/Lfa70poj_400x400.png', + ref_id: '3b622187-60ce-43c2-a21f-ae749c2d961a', + twitter_handle: 'voltage_cloud', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/2ec62250-4755-4616-8342-096a2cfab95f.jpg', + keyword: !0, + link: 'https://www.youtube.com/watch?v=kMDSsyAEvd8', + node_type: 'clip', + pub_key: '', + ref_id: '076eecc3-0553-4bb7-8fe2-9f43a6d54f79', + show_title: 'Voltage', + text: "we dive into talking a little bit about Oshi and how you solve some of these problems and create the incentives that really encourage people to interact and use bitcoin, what are you thinking about on a local level people could do if they're not aware of oshi? My mind goes to you. Could chromebooks hang up a little sheet of paper and tell people, hey, you can download a bitcoin wallet here or use, let's say, cash app, we have a wallet, you can pay us immediately and we'll give you a three or 4% discount. And the business owner knows less than 1% of people are going to do it, but they're kind of creating that conversation. Do you see bitcoiners who are business owners getting creative and maybe doing that if they're not leveraging Oshi? Or a lot of these business owners really just kind of coming to you without getting too creative on their own, like trying to create a solution and educate? Yeah, there's definitely a lot of handholding. Let's talk about a business that doesn't really understand much about bitcoin and really doesn't even understand much about, say, like the rewards and incentives. Like maybe they signed up with square or Toast for this really cookie cutter like reward system. I talk to businesses all the time and I was like, hey, do you run any specials or promotions? And they're like, no. And I'm like, you have a happy hour special? Oh, yeah, happy hour specials. Like how about 30% back, 30% off? You give like 30% back in bitcoin and it totally changes the game, right? It changes brain cells. But then there are also business owners that are really into bitcoin and they're like, yo, I want your bitcoin, I want KYC free SATS. I am willing to give you a discount if you pay me in bitcoin, not only because it's going to save me maybe a few percentage points in processing fees, but also because I just want it. And business owners again, the ones that really understand this and their company is in a position in which they can hold bitcoin on the balance sheet without having to convert the bitcoin they receive to dollars, which, in general considering it's a very small percentage of sales right now, most businesses can do this, but if they hold on, say they do a 10% pay with bitcoin discount and they hold on to that bitcoin over the course of years or whether it's six months or a year, two years, whatever do they think that the price of bitcoin is going to appreciate or the purchasing power of bitcoin is going to appreciate? At least 10%, right, within a year's time? If that's the case, and that 10% discount that they gave to a customer, whether it's a 10% pay with bitcoin discount or it's a 10% SATS back, that's a free discount. It's a free discount. And if we ever get into a scenario or I would say when we get into a scenario in which more and more businesses are wanting their customers to pay with bitcoin whether because the dollar just continues to fly. Away into oblivion, which is highly likely, then they're maybe going to have to compete amongst one another to incentivize customers to pay with bitcoin, which could create a crazy flywheel effect, in which case, like, the business will give you, like, 20% off if you pay us in bitcoin, because we know in a year's time that's free for us. It gets pretty crazy with the game theory on that. I love it. Yeah. I've been a small business owner in the past and I've always found really creative ways to create language that encourage people to come in or give their eyes attention to me. And I would be doing that saying, save up to 30% and they come in and you have some way in which you can get them set up by using bitcoin in less than two to three minutes. And they would be grateful for that. And then they might become a regular just for that one value they create in their life. So that's cool. Yeah, it's getting super easy too. I imagine something in the near future where these businesses might have partners. They have their strike ref link. Maybe they're selling like stechco vouchers, maybe they're using bit ramp. They're selling bitcoin on the spot so they have a way to actually load their customers wallet with bitcoin on lightning network. Maybe they have a way to refer their customers to strike and they'll get like $10 in bitcoin for every referral they get. And then their customer will get ten free bucks as well. Right. Because it's all about the incentives. Without the incentives, like, a business starts accepting bitcoin and you're not a bitcoiner, and even if you are, maybe you're over the whole novelty of bitcoin, or maybe you're not ideological enough to make every single transaction a bitcoin payment. Like just because you want to support the businesses, which that's not something we can rely on now or even into the future. It's all about the incentives. So how are these businesses going to incentivize consumers to pay with bitcoin? And where are they going to get maybe the money to incentivize them? So, yeah, I find it pretty fascinating where you could have like something near the register where you say, hey, download this app, get set up with bitcoin, come back next time, and we'll give you 20% off your coffee. Or give you 20% sets back off your coffee. The business gets $10. There's a strike rep fleet. The customer gets $10, whatever the case may be. So it's pretty exciting. Thank you. ", + timestamp: '00:12:58-00:18:15', + topics: ['Oshi app', 'Michael Atwood', 'Bitcoin awareness'], + type: 'youtube', + weight: 3.983682561160926, + }, + { + boost: 0, + date: 1647061200, + description: 'Experiences on Interacting With Other [[Bitcoiners]]', + episode_title: 'WHY ARE WE BULLISH Kal Kassa Pierre Corbin Chris Smith Ben Gagnon ep243', + guests: [ + { + name: 'Chris Smith', + profile_picture: 'https://pbs.twimg.com/profile_images/1248417464825724928/BjsozM7k_400x400.jpg', + ref_id: '488a0f68-f24b-4d0b-9835-4b38a59f149e', + twitter_handle: 'chrissmithonair', + }, + { + name: 'Ben Gagnon', + profile_picture: '', + ref_id: 'd86128cb-056a-4233-bd95-cda98867f61c', + twitter_handle: '', + }, + { + name: 'Pierre Corbin', + profile_picture: '', + ref_id: 'a0a46e2e-1b24-4ce5-b34c-ca322067930a', + twitter_handle: '', + }, + { + name: 'Kal Kassa', + profile_picture: 'https://pbs.twimg.com/profile_images/1515885093893681156/cpZcX_2q_400x400.jpg', + ref_id: '5cf2cf3e-5cde-4426-b71f-f357195d40be', + twitter_handle: 'KalKassa', + }, + ], + hosts: [], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/bbf0a536-990b-49b4-a9c3-a2a40fa38f88.jpg', + keyword: !0, + link: 'https://anchor.fm/s/11e95d20/podcast/play/48924119/https%3A%2F%2Fd3ctxlq1ktw2nl.cloudfront.net%2Fstaging%2F2022-2-12%2F253272604-44100-2-dac52f14aaffa.mp3', + node_type: 'clip', + pub_key: '', + ref_id: '345a7d30-5d4b-483c-8d3d-fd1999f7e34c', + show_title: 'BTC Sessions', + text: "rather than just kind of leave it wide open, I'm kind of curious to get some of your take on experiences. You guys have had either meeting Bitcoiners from different parts of the world and what that experience is like, or if you so please maybe tell me about the first time you ever got to speak to another Bitcoin or in person and what that was like. So I'll open it up to whoever wants to jump in first. But one of those two avenues that you want to take, feel free. To. Let'S do Chris, and then we'll do call. Okay, cool. Yeah. I would love to jump in here. I'm going to tell this story because I love this story. It was the first time that I walked into the Bitcoin magazine office and we were actually talking about that the other day and how working in Bitcoin is really a peace of mind. And it's not only monetary freedom, it's freedom for your mind. And the first time you work in Bitcoin, the first time you work surrounding that common goal. Being around an environment where everyone is like minded is truly something that is very bullish in my opinion, because not only are people working for revenue, people working for profit, obviously everybody has to make money, but there's a bigger goal in mind. And being in an environment where that resonates to every single person who you work with, you can always get grounded in that fact. Back to when I first walked into the office, it was like no environment I had ever been in before. And I would go to say, like, Bitcoin meetups are that way as well. I don't know if you all have a Bitcoin meetup that you go to, but if you don't, I highly suggest you find one. Or if you can't find one, you start one yourself because it is so awesome to just put yourself in an environment with those like minded individuals where you can truly find peace of mind. Yeah, I 100% agree. And I agree with your point about if there's no meetup near you, just start one. Even if there's like one person that shows up the first time, it's well worth it. So, yeah, absolutely. Cal, you were about to say something as well. Feel free to jump in. Yeah, sure. So I fell down the rabbit hole in early 2020. And I guess because of that, I didn't really have any in life, kind of in real life friends or anyone to kind of chat with. So it wasn't until probably early 2021 when I happened to be in Austin, Texas. Unchained capital at the time was holding Bit debts. Still is, I think, in a new location. So that walking into that their office on I think it's Fifth Street, and it's a large office. But because there are so many Bitcoin years, it just looked so small, right? It felt so small. And just walking in and having access to Parker Lewis and Jimmy's song, and I was kind of in the midst of my heroes. Right. So it was a pretty great experience to have, and it kind of helped me kind of tie myself into the community. So now when I travel around or I'm in Ethiopia, I always have a good reference point. I always have good kind of sources and citations. So I was really kind of blessed to have that opportunity. Awesome. And you bring up a good point of being surrounded by some of the people that you may have kind of watched or listened to prior Bitcoin, especially ones that have been around the block, are incredibly accessible. So surprisingly to me, I think my first time I met Adam back at Bitcoin 2019. And I'm like, here's the guy that was cited in the white paper that has basically been part of the Cyberpunk movement has built a large portion of the backbone of what Bitcoin was based on. And I just walked up to him and started chatting. And if you can read social cues, if you're in a conversation with somebody often, if they don't know, you get that where the body is kind of tilted and the feet are facing away, and they might feel like they're basically signaling like, okay, well, I'm ready to exit the conversation and go chat to other people. Adam back, as a guy who's been around the block, everybody wants to chat with him, and he definitely has more important people to talk to than me. But no, I walked up to him and it was just straight attention, focus. He sat there and talked to me for like 20 minutes, half an hour, with no indication that he had anywhere else he would rather be. And it was astounding to me, like, how generous Bitcoin is with their time. And there's been many other examples of that, but it definitely strikes me. So I'll pass it to our other two panelists to comment. Maybe if it's okay, I'll do Pierre first and then Ben. But Pierre, do you want to comment either on your first chat with another Bitcoin or how it's been meeting Bitcoinners abroad? Yeah. So I've been traveling a lot the past year. Basically, you don't have a home anymore. I just travel. And so I've met a few on the way. But very interesting is meeting them here in El Salvador because I'm just around the corner from the original Bitcoin peach. So you can just head there and talk Bitcoin whenever you want. They're very open people and just with anyone that you meet because everyone that is here is also just a bunch of travelers. Everyone goes for drinks and just wants to meet others. So there's a lot of meeting people and there's a lot of Bitcoiners, obviously. And it's really great the interactions you can have. And I was having a conversation with a guy called Dave that is from Canada, in fact, that lives in the US, and he's in his late 40s or so. He's just invested and very interested in Bitcoin and he was saying how this is the place where he had to come visit and has to come back because it's just like attending Woodstock or any kind of major events that happen. It's the source of nation state adoption. And there's just a lot of passion, even in someone that doesn't necessarily work in Bitcoin. So we have just all around great interactions with people here. Awesome. And I'll toss it to Ben Last. Any comments on any of this that you'd like to throw in? Yeah, of course. I always think Bitcoin is just such a great filter for people. If you meet somebody and they're a Bitcoin or they're into Bitcoin, you know that they just get it right. Most of the people that you meet in the world, chances are they don't get it or haven't gotten it yet. And I'd say it's only true for bitcoiners. It's not true for crypto in general. But when you meet another Bitcoin or you're all on the same page and it's a big club and we're all in it and it's permissionless. You're right. It's very accessible. Every time. When I was getting started in this industry and I've been all over the world meeting people, building mining facilities and striking strategic relationships and all this stuff, I'm always surprised every time when I walk up to somebody and I start talking and it's okay. This is the head of this company, this is the founder of this thing, and everybody's all in this together. Pretty amazing thing to find those like minded people. It's like having a Tinder app and you can just filter out 99% of people that you don't want to talk to without doing any swiping. So it's just a great filter. Yeah. Bitcoin meetups are the ultimate swipe. Right. I would like to say you're right. No swiping required. And you know what? I will say that while it's great meeting Bitcoin is in person, one person I really want to meet. My favorite no Coiner is David Wong, and he is back again this week. And he's my favorite person. He never misses a show. He hates Bitcoin, but he's here every Friday. So, David, it's really good to see you. Thank you. David would like everybody to know that Bitcoin is a cult. They smile, they talk of nice things. They appeared to be in apartments and use cheap mining heat. So thank you, David. Love you, man. Glad you made it. But with that we'll wrap up that topic. Everybody in the chat, welcome. I see Yellow. Yellow has joined us. Yellow, good to see you. We can relax now. You're here. Thank you. And good to see the Canadian Bitcoinners in here. Canadian Bitcoinners had some nice things to say about Ben. Danielle. They're saying that you're one of the smartest minds in Bitcoin mining and Big Pharma is very lucky to have you on staff. So shout out to LAN and Joey over at Canadian Bitcoins. You guys are awesome. And I'm having you guys on again sometime soon in the coming weeks. So excited to see you guys again. But with that, let's change gears. Let's jump to our next topic. Pierre, you're next on my screen. I hope I'm not throwing you under the bus or cat mail guard here, but I'm going to toss it to you. What are you excited about this week, man? What are you bullish about? So I'd say ", + timestamp: '00:13:42-00:24:08', + topics: ['bitcoiners'], + type: 'podcast', + weight: 3.9809007065510573, + }, + { + boost: 0, + date: 1662010885, + description: 'Explaining the seedless multisig setups', + episode_title: 'BR005 - Bitcoin Wallet Experts Roundtable ft. Odell, Bitstein & Pierre Rochard', + guests: [ + { + name: 'Charles Guillemet', + profile_picture: 'https://pbs.twimg.com/profile_images/1363770113162379265/7S1mRttg_400x400.jpg', + ref_id: 'c726ddde-836d-4f6c-9b6e-bb9e4d9365a7', + twitter_handle: 'P3b7_', + }, + { + name: 'Matt Odell', + profile_picture: 'https://pbs.twimg.com/profile_images/1421584695746338819/Z_7ZfAeP_400x400.jpg', + ref_id: '4f2825ff-3b88-4595-84d4-36e81544b79a', + twitter_handle: 'ODELL', + }, + { + name: 'Graig Raw', + profile_picture: 'https://pbs.twimg.com/profile_images/1362841242665631745/UtA3FBQU_400x400.jpg', + ref_id: '66fade84-61db-4cb1-b4a9-b759e285eb82', + twitter_handle: 'craigraw', + }, + { + name: 'Lazy Ninja', + profile_picture: 'https://pbs.twimg.com/profile_images/1362843002318721028/PNKWuu0-_400x400.jpg', + ref_id: 'f855515d-75c4-4287-9a3d-e45d7ac25ddf', + twitter_handle: 'FreedomIsntSafe', + }, + ], + hosts: [ + { + name: 'NVK', + profile_picture: 'https://pbs.twimg.com/profile_images/608402052247658497/ENDv0BNd_400x400.png', + ref_id: 'd754e29b-2d3e-4280-8d72-f41d2a465a78', + twitter_handle: 'Coinkite', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/cd6b8d64-bd52-4f1e-86b3-ca8ba2eb169f.jpg', + keyword: !0, + link: 'https://anchor.fm/s/9500fad8/podcast/play/56934513/https%253A%252F%252Fd3ctxlq1ktw2nl.cloudfront.net%252Fstaging%252F2022-8-1%252Fba1b9425-ee1c-d0fd-3048-f50bdcc17c14.mp3', + node_type: 'clip', + pub_key: '02545c14cbb18a61f20dd45f5e3dcbd9acae3de282369501040adce32a75311309', + ref_id: '18d862c2-f8bc-41c8-bea3-9b934701f0a8', + show_title: 'Bitcoin.Review', + text: "exactly it. I mean, humans have been doing physical custody forever since humans were around, right? Like I was there screaming in the forest, running after animals to eat and I was probably custodying whatever I killed. Right? So it is a very natural thing for people to do, which is really cool. People understand that natively, they don't have to sort of like get schooled on how to keep something secret physically. So that's like a nice first step. So that when they go to the next round and sort of like the next upgrade in security and do, I don't know, multi SIG or passphrase or whatever, they will instinctively understand that. Now, maybe they have two secrets as opposed to one, and they should put it in two separate places, right? Yeah. I am not a fan of the seedless designs and I think will lead to a lot of grief. And BK, what are your thoughts on seedless multi SIG setups? So, like top signer is seedless, right? That essentially negates all my rents that I just had because, you know, really like we have to try stuff to see if we can come up with the next thing. Right? Because seeds are not perfect. They are amazing, but they're not perfect. So how do we go to the next thing? And there is also tap route, which does change the security trade offs as well when it comes to multi SIG and any signer sort of derisking them and stuff. So tap signer is our attempt at doing seedless by still making the user ideally back up on their phone an encrypted key where the encryption of the key is laser etched on the card so the phone cannot see that private key. Now, we are very clear that the trade offs that we made on that product are not for you to put your life savings in single SIG, right? But it could work for you to have your life savings in multisig. Because, see, you can have a tap signer as just one of your signers, one that is high availability to you, so the keys are not on the phone. And the other signer could be a cold card that's deep buried somewhere where you do have a backup. And maybe the third one is a service or is another cold card or something, right? So you could derisk the lack of that seedless signer of that multisig. We essentially get back to seeds even though you're functioning on a daily basis. Seedless, I think it's an interesting proposition and as Charles and Lazy would be very familiar with, this is java cards are a very old and resilient technology, right? So the chances of that device breaking beyond recoverability are very low. So that also gives me a bit more comfort. And those devices are essentially fully sealed, right? Because they are NFC sort of essentially baked into plastic. And on Charles case I think you guys put epoxy over the se, right? Or no, I can't remember. But the package is resilient enough. You should be able to at least recover in a lab in case you need to provide that you have the pin and all that good stuff on your case. But anyways, I think two things are important. One is we need to recognize that seeds are an incredible achievement. We should push people towards them, but we should not stop attempting to come up with alternatives that may resolve some of the UX challenges, at least for the daily operational part of your life. That's sort of like my view on this. I'm kind of curious on Lazy's view on this. So I'm a single SIG maximalist for personal savings. I think there may be a seeless multi SIG for an intermediate value of spending or something like that. Like your normal bank account, not your life savings account might work, but I've just been really against what bothers me with multi SIG is when you have sort of the two of three, like a two of two multi sigma much more comfortable with. But when you start having two of three, I think it starts really leaving room for people to mess up because they don't realize that they need three of three public keys backed up and the redundancy in their backup setup of all those. So I'm really two or two maybe multi SIG but I'm really just a single SIG passphrase guy. That's all I ever recommend right now. I am 100% with you there. I don't think people appreciate the complexity and the room to screw yourself out of your money by using multi SIG. It's a ginormous complexity increase, right? It's literally exponential. People think it's small though. Like it seems like it doesn't seem like a lot, but there's so many things that just go like I look at some of the dumb things. Well, I don't want to describe what I did specifically, but I did something with my backup so I could have it sort of more available. So there was some superficial protection and not superficial, some strong protection. I get somebody just casually finding it outside the passphrase and I had sort of done it a couple times and tested it. And then I tested at one time and I realized I had duplicated one of the things on there in a way that I could figure it out. But I'm like, I did this like three times and I didn't catch this simple mistake. And this is just sort of a simple single fig type of thing. I'm like, Holy cow. Adding small things just create a lot more additional complexity than people appreciate. Going back to that support question early in the conversation, it's like one support question we used to get back in the day was people have programmer husbands and then the husband dies and then he left a super complex multi SIG setup that is incredible. It's so secure that the wife can't figure out. Nobody can. I am a staunch believer that multi SIG should be done managed, right? So you're going to have a wallet like Nunchuck that will sort of like help you set up the multi SIG in very specific use. Case or Craig solution is going to use a similar solution, ideally, like on Sparrow. Like, I understand you want to let people be grownups and set up all the stuff however they want, but people make mistakes and they don't back up things the right way, so they do end up screaming themselves over. And I think a lot of the hate for single SIG come from people doing FUDding harder wallets. Really. There are some actors in the space that the paranoia they have against Hart or wallets is completely uncalled for because it's provably wrong, right? It can be provably wrong, right? If you do your diet, you do all the stuff and you could resolve that the paranoia, instead of pushing noobs to do multi Sigma 50 CDs. There's an interesting aspect that I just want to touch on there, which is essentially inheritance planning, which is what you just mentioned. If you have a really complicated multisig and you pass away and whoever you want to receive your bitcoin isn't able to access it, that is not unique to multi SIG. I've gotten messages at midnight from a friend. I'm going into surgery tomorrow. My wife knows where my seat and my passport is, but I told her to call you. If something bad happens, it's free to recover it. And like, obviously that's not a great situation because she has, you know, whoever your heir is has the whole kid and caboodle. Now, if you have a welloiled, multisig UX, then if you're already trusting me for the recovery process, I could have one of those keys. She could still call me in that situation. I could still walk her through the set up, but I can't spend it on my own. She can't spend it on her own. Maybe you involve some other third party in there so that I'm not trusted, right? So, like, all of a sudden that inheritance issue could be mitigated to a degree and made more safer in a multisite setup. Multisick does offer some advantages in that inheritance situation. The challenge now is that if you have access to the quorum set up information, the script and the Xbox, you can find out the amount and you don't want to share that amount with friends or family, right? You want to be blinded but you want them to be part of the recovery set up later. I think that's where tap root is going to really shine later on once we have, like, a proper mousse back and sort of because then you can lower the threshold of those keys and you can come up with much more clever ways of blinding those amounts to essentially the Saving Grace keys that are out there, the emergency keys. Until then, you know, every time you do multiseg with a third party, you're essentially doxing your coins to the third party, which is a much worse attack surface than the security of the single SIG, right? Because say we're friends now, or say for example you're a non bitcoiner and let's say some bad guys assume that you do have knowledge over other people's money, you're now at risk and they could try to coerce you even though you don't have that, to try to get that information on other bitcoiners, right? This attack surface is terrible. I pressed up by accident, to be honest. ", + timestamp: '01:11:32-01:21:48', + topics: ['multisig wallet'], + type: 'podcast', + weight: 3.9956684686900736, + }, + { + boost: 0, + date: null, + description: 'Top 3 reasons to embrace Bitcoin adoption', + episode_title: 'Café ₿: #Bitcoin Beginner Q&A', + guests: [ + { + name: 'Peter', + profile_picture: 'https://pbs.twimg.com/profile_images/1581695667193643009/EljNY-TH_400x400.jpg', + ref_id: 'a3384925-e15e-421d-b9f9-6d44e273ed05', + twitter_handle: 'PeterAnsel9', + }, + { + name: 'Stephan Livera', + profile_picture: 'https://pbs.twimg.com/profile_images/1362551718110580740/v-W5Q2uo_400x400.jpg', + ref_id: '72f57157-c96e-4466-8bf1-290cfe1f8a0b', + twitter_handle: 'stephanlivera', + }, + { + name: 'Thomas J Lake', + profile_picture: 'https://pbs.twimg.com/profile_images/1529168328534769670/5cl2Y_k-_400x400.jpg', + ref_id: '21541a47-0601-447c-99c2-312d1a63c19f', + twitter_handle: 'thomaslake', + }, + { + name: 'Goodguy', + profile_picture: 'https://pbs.twimg.com/profile_images/1363216959576285185/unulY4yd_400x400.jpg', + ref_id: '0c3fec75-9cc2-4c0f-8dbe-db7fae2b585b', + twitter_handle: 'goodguybiker', + }, + ], + hosts: [ + { + name: 'Brady Swenson', + profile_picture: 'https://pbs.twimg.com/profile_images/1502564606836981763/fmqtNrNc_400x400.jpg', + ref_id: '49966553-d55b-44c9-94ec-8fee09eee5c2', + twitter_handle: 'CitizenBitcoin', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/239722cb-4216-414a-a17b-5adf9d52e15a.jpg', + keyword: !0, + link: 'https://stakwork-uploads.s3.amazonaws.com/uploads/customers/2707/media_to_local/35b20273-49f2-45ea-a9f4-dc479d86573c/7ae5315f-beb2-41e2-b672-65dd1f102017.mp3', + node_type: 'clip', + pub_key: '', + ref_id: '124cbc47-3581-4bd6-add0-fe0855bc9ac3', + show_title: 'Swan.com', + text: "All right, as we move to Peter and Good Guy, I want to rephrase the question, why should somebody even care? Why should somebody care to learn about Bitcoin, use Bitcoin, et cetera? Why does it even matter? Peter, top three things, I think the. Top three things for me are one, you need to understand that you've been infected by a Fiat Virus. All you know currently, financially, for most people is this Fiat system. And this is outside of that, it's different. I think that's really critical. Once you say, okay, I've been infected by this, how can I frame this? To look at this a little differently? Don't be afraid of the responsibility of holding your own wealth. The technology works, and you can trust this technology. This is one of the first times in human history where the technology, because of its properties, allows for it to be trusted and there's no third party trust involved. And then the last thing is for me, once again, was this took a long time for me to do, but it's something that I think that I was encouraged to do and didn't really quite understand until later on in my journey. And that's try to create a visual of a flow chart of how the data moves around. This is just data moving around. In. A digital world, basically. And if you can kind of build yourself a flowchart of how this stuff is moving around, it makes the psychology of the responsibility of holding your own wealth much more palatable. All right, cool. And thanks, by the way, to all of you guys, stefan, Tomer, Peter and Good Guy. And Stefan, we're going to go back to you in a minute. And see if there's anything else major you want to COVID And then I would suggest we just start hitting questions. Q and a. I suspect we could do q and a for another hour easy. Yeah, I think q and a bad idea. Okay, awesome. Good guy. Same question to you. Why should anybody care? Why does learning about bitcoin even matter? Well, I'll put it simply, and I'll give you three reasons. First off, it's been life changing for me and so many people around me. I've watched many people around me go from struggling to make rent payments to buying homes for their family and benefiting their extended family, spending all of their time now working in charitable ways. And it's amazing to see people making solutions to the problems in their own lives. And a lot of times bitcoin has been a big part of that. So you hold bitcoin for any amount of time, and that could be life changing for you. First off, life practice DCA dollar cost averaging. And it doesn't just have to be into bitcoin necessarily. If you're investing into your child benefits or your tax free savings accounts and your bitcoin, I think dollar cost average is a life changing practice. A lot of us get moments when we can save, but if we come up with regular intervals where we hold ourselves accountable to investing, that compounds incredible over time. And you end up with huge amounts of money later by investing small amounts of money regularly. I think that's a very powerful practice. It's hard because cash flow can be waning, but I think it's an important practice. Secondly is the sovereignty aspect. Bitcoin, why does it matter? It allows you to hold your money in a way that it can't be taken from you. Once you have that knowledge and that understanding and a little bit of knowledge in the bitcoin space provides you a ton of value to people outside of it. And so I would encourage everybody to get hardware, wallets, something like a nano ledger or the cold card. These are really great ways to hold your bitcoin in a way that's in your own possession and it's safe from all these things we see like FTX and three arrows and all of these shit coins, all of these platforms devaluing. And then lastly is just a warning for people. We're seeing a lot of romance. Spencer and I work in the space and we try to assist a lot of people with these types of things. And we're seeing a lot of romance scams and something specifically called pig butchering. And so I would encourage everybody who's new and in the space to learn about some of these common scams that used to happen in traditional sense with money and calling cards and gift cards. Now they try to convince people to basically invest money into websites. They get you to buy cryptocurrency. They get you to buy bitcoin and send it to some kind of website and your money is gone. And so it's often these are romance scams. These are people that can come into your life. We have individuals here that have been dating people for as many as seven months. And this 68 year old woman lost her life savings, $260,000, by investing into a website. She was unable to get it back. This person disappeared the day she did it. They also deal with young people that are interacting with people on the Internet in the same way. It's often pictures of their meals and it's lifestyle making fun of small investments. And eventually they get you to send some money or cryptocurrency to a website. So instead of sending your money or leaving your money on any website, use really good on and off ramps like Swan. These are legitimate, these are safe. Buy your bitcoin and put in something like a hardware wallet and you can avoid all that stuff together. So, yeah, dollar cost average. Be sovereign and avoid the scams. Awesome. I'm going to add one comment here and then we'll go back to Stefan. In the vein of why anybody should care, and this is directed really to somebody who's really, really brand new trying to figure all this out. I would suggest that the reason that you should care is the most valuable asset any of us have is our time. Every second, every minute, every hour of the day that ticks by goes away. You will never see those again, ever. And what people do is we invest so much of our time running on this hamster wheel, trying to earn these little fiat pieces of paper. Well, to be fair, they're not paper anymore. They're mostly represented in digital format now. But the problem with these fiat units of currencies is that they're always losing value because they keep making more and more and more of them. And whether you're young or old, if you're confused by this concept of running on this hamster wheel and you get up and you run, run, run, run every day, and then you do it again the next day, you do it again the next day. And no matter how fast you run, no matter how hard you work, the prices of things are keep running away from you. If you feel like you're getting to the point where there's like, what is the point of all this? Why are we even doing it? You need to understand, you have to figure out a way to leverage all of that. And I would suggest to you, and this is a deep discussion, so I can't explain it all just in two minutes. So I'm just going to give you the summary bitcoin, is going to allow you to leverage that in a way that the human race has never seen ever in the history of mankind. And we can unpack that if you guys want, but I'm just going to encourage you to think about that for a second. If you want to weigh out bitcoin is the Way, I will go to Stefan for any other general commentary and we'll start opening it up for questions. Go ahead, Stefan. Yeah, sure. I think ultimately, as I've mentioned before, you have to understand the problem of the system we're in. And that system rewards people who are well positioned in terms of ability to be near the credit, near the printer, their position in terms of access to politicians, to have, let's say, favorable regulation, things like this. Of course, that doesn't mean everyone should just give up. It means people should look at ways to I think it's important to sort of play good offense and good defense, right? Look for ways to earn more, like ethically, of course, not talking about like scamming or anything, but ethically, earning more and then looking at ways to save like, ways to save your wealth and then so that's kind of how I see it. I see it as you come up with a thesis of what you think bitcoin is. What does bitcoin compete with? What does it actually replace? It's a replacement for central banking or for fiat fractional reserve systems. That's what it replaces. So that's how I would contextualize this, Tomargood. I've shared a link to a free copy of my of my book that tries to answer this question and even in just its first essay, which is just a two minute read called why bitcoin exists. So the book, why bitcoin is available for download. For free download. And I really tried to answer this by writing a book on it. But to summarize the first essay as quickly as possible, it's like we have money that is broken, it's unreliable, it fails to serve all mankind, and its days are numbered. And bitcoin fixes all of those things. So that's as briefly as I can put why you should be interested in bitcoin. ", + timestamp: '00:35:04-00:44:50', + topics: ['Fiat system', 'Bitcoin technology', 'dollar cost averaging'], + type: 'twitter_space', + weight: 3.9808995723724365, + }, + { + boost: 0, + date: 1668213420, + description: 'Bugs in running a Lightning node', + episode_title: 'CD79: lightning development, bugs, and the path forward', + guests: [ + { + name: 'Ben Carman', + profile_picture: 'https://pbs.twimg.com/profile_images/1550704386007089152/pLwUSeff_400x400.jpg', + ref_id: '1d1e95ba-b4af-415f-aafe-85c6dd7571b8', + twitter_handle: 'benthecarman', + }, + { + name: 'Evan Kaloudis', + profile_picture: 'https://pbs.twimg.com/profile_images/1596923848997445633/DqxrGpkW_400x400.jpg', + ref_id: '420172fa-9431-4ba4-965c-adab17648d1b', + twitter_handle: 'evankaloudis', + }, + { + name: 'Brqgoo', + profile_picture: 'https://pbs.twimg.com/profile_images/1597268344029298691/-m6_LYWF_400x400.jpg', + ref_id: '6a5e65a9-a1a6-4e73-8e54-53f168c080b6', + twitter_handle: 'brqgoo', + }, + { + name: 'Seard Salmon', + profile_picture: 'https://pbs.twimg.com/profile_images/1562116931980779521/bsHY79h-_400x400.jpg', + ref_id: '10074712-9e7d-44ee-9451-9df214834ec6', + twitter_handle: 'Seardsalmon', + }, + { + name: 'Tony g', + profile_picture: 'https://pbs.twimg.com/profile_images/1523582744609136642/02NBRq6H_400x400.jpg', + ref_id: '79cc45bb-d9c7-41da-8776-88b2a9f45bf7', + twitter_handle: 'TonyGuoga', + }, + { + name: 'Bluematt', + profile_picture: 'https://pbs.twimg.com/profile_images/697361498587451394/_rX0-O0W_400x400.png', + ref_id: '2c96fe6b-ec49-4a1d-824d-9b5d6a94a844', + twitter_handle: 'thebluematt', + }, + ], + hosts: [ + { + name: 'Matt Odell', + profile_picture: 'https://pbs.twimg.com/profile_images/1421584695746338819/Z_7ZfAeP_400x400.jpg', + ref_id: '4f2825ff-3b88-4595-84d4-36e81544b79a', + twitter_handle: 'ODELL', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/a09a2c49-84f1-4d0b-b150-6e6103f4ee41.jpg', + keyword: !0, + link: 'https://anchor.fm/s/45563e80/podcast/play/60492378/https%253A%252F%252Fd3ctxlq1ktw2nl.cloudfront.net%252Fstaging%252F2022-10-12%252F296489339-44100-2-5853beb87e727.mp3', + node_type: 'clip', + pub_key: '', + ref_id: 'e2f9e9e3-946f-44e8-a323-f43a599a3e2c', + show_title: 'Citadel Dispatch', + text: "what would you want to see here? Let's say you're Barack and you discover the second exploit. Presumably you wouldn't do what Barack did. How would you proceed? I think what you do is certainly the first thing you do is you reach out to the vendor and you make sure you give them a reasonable amount of time to patch it. Right. Which vendor do all the Lightning implementations or just L and D? If it affects more than one that you're aware of? Certainly for security issues, you tell the minimum number of people required in order for the issue to get patched. So you start with L and D, because that's the only one you're aware of has this problem. To be clear. It's like you would reach out to them privately. You wouldn't just go post, like, an issue on GitHub. Right, right. Which is what Anthony Towns did right, about ten days before this happened. Yeah, I mean, I don't think he also I think he'd said that he screwed up. He didn't realize that this was a major security issue. But yeah, that's also not the correct yeah. I think an important part of understanding responsible disclosure is that you coordinate with the vendor about release timeline. Right. So if you're the one reporting a bug, you are allowed to say to the vendor, hey, I think this is really critical. I think I should go public with this in two weeks. Can you get a patch together and make sure you get that shipped ASAP? And then that's a conversation that you have with the vendor. It's not like the vendor gets to say, like, no, this has to stay private, or here's the release timeline. Take it or leave it. That's a conversation you have with them. And then I think once the fix is released, at that point, it becomes a question of, like, what you think is the makes the most sense for users. So really, you know, patching an issue quietly does not get the most people to upgrade. And so, you know, you've seen this back when I worked a bunch of Bitcoin core. We had these kinds of conversations a lot. When you have an issue, do you tell people about it so that people go and upgrade really quickly, or do you not tell people about it because you don't want to give attackers enough information to go exploit the vulnerability? And so it becomes a balancing act. And again, this is where you, the reporter, get to have a conversation with the vendor and where you, the reporter, gets to ultimately decide. I don't know if I would have decided to do that, but it would have been totally reasonable, or at least totally justified, to go exploit the issue after the patch had been released. Or maybe a few days after. The patch had been released so that people had a chance to upgrade on their own, to highlight the issue and to kind of force people to upgrade. But prior to there being a patch and prior to people having at least a small window of time to upgrade themselves, actually exploiting it just seems like putting users at more risk than is necessary. Isn't that kind of just like, the sad truth, the sad reality of the situation, like, we talked about just saying that because there are significant volumes on lightning now, and there are big companies and corporations looking at lightning, and then things like this overall hurt the perception of lightning. I mean, but isn't the perception of lightning just wrong currently? Like, we live in this happy little lightning world that all of our payments are fast and easy. We can do zero cough atomic swaps, we can do all these other fancy shit, but lightning is pretty broken. I mean, Matt, your talk crawler, your talk at Atlanta was like a really good talk and it just kind of highlighted that lightning is kind of broken in its current state. Yeah. As well. This is literally a valid transaction on chain. Right. I think that's the way certain people are framing it. So if your L two was affected by it, they feel like in essence, it was your fault. Bitcoin Core thought this was valid and I think that's where some people are drawing the line. Yeah, totally. I mean, it was Lndy's bug. It was rust lightning's bug. The foundational issue was that there was a bug. The foundational issue was not that it was exploited. The only question then is like, okay, there is a bug. Given there is a bug, should you exploit it? That's a very different question from like, whose fault is the fact that there is a bug? Right. And bugs happen. That's not going to change. That's the reality of software development. But yeah. So I think to the point about lightning being broken and the perception of lightning being wrong, I think it is important to highlight the difference between your counterparty and like I always kind of make the point that you shouldn't open channels with a counterparty you don't know or at least don't trust enough that they're not going to, like, try to steal your money and, like, put in a bunch of effort to steal your money. I think there's a very different world from and then there's denial of service attacks against lightning. Not in the take your note offline, but in the saturate your liquidity so that you can't send payments. So let me I guess I should rephrase my earlier statement about there not being denial of service attacks against lightning, just that the saturating liquidity denial of service attacks. So there's a lot of things that are broken with lightning and where the perception is maybe wrong. But I think those are different from you're going to lose funds maybe because your counterparty did something without them even being involved. So when we were talking about routing an HTLC through multiple hops and then stealing funds, that's something where your counterproduct can be totally honest and they go to chain and then your node doesn't see it, and then you still lose funds. Right. So I think that's the kind of thing where aside from these bugs generally, I think there's not really much in the way of known issues for lightning, for why this might be why you might lose funds if your counterpart is completely honest. And regarding previous bugs, Matt, it's not our first bug on lightning, right? There's one in 2019. And then Antoine Riad and Gleb also found a dust one last year that I guess they responsibly disclosed. Do you remember how that process was? And maybe we can touch on that. Yeah, that was across the whole that was basically on every lightning note. So they reached out to everyone. They emailed all of the I don't know who I was on the email list, but, you know, basically all the maintainers or the kind of lead maintainer or two of all the lighting implementations and kind of describe the issue. They describe the basically the issue was that because Lightning has some concepts, dust outputs. If an output is dust, if an HTLC, the value of the HTLC is dust below some threshold, then it just gets burned to feed. So a counterparty can send a bunch of HTLCs that were just barely below this threshold, and in fact, they can even do things to increase this threshold that nodes will currently accept. And then if they do that, then they can burn a lot of your money to fees. And I guess if they're a minor, they get free money then, because they burn the money to fees, and then they get to claim the fees because they're a minor. So they reached out to all the Lightning implementations. All the Lightning implementations added a bunch of code to patch it and then ship that code. And then I think after everyone had shipped or some period of time afterwards, they disclosed it publicly and Antoine wrote up a change to the bolts to kind of describe this issue and note that implementers of the Bolt Spec need to do something to ameliorate this issue. Unlike the kind of onchain stuff that we've been talking about, there's no way to go, like, exploit the issue to force people to upgrade. There's nothing like that. We can only write code and tell people that this issue exists and you should upgrade. And then if you were to exploit this issue, you have to actually go steal funds. You couldn't just like, cause the issue and then get those done. And then there was the other bug where none of the lighting implementations were actually checking the chain for commitment transactions, right. For funding. For funding. The funding transaction had the right script and the right value, actually, that's all we were. So before LDK was LDK Wrestling existed, and it was a joke. It was like a tiny project and no one used it and it wasn't even ready for production, but we were checking it. But yeah, I mean, again, that was another case where you couldn't do something to actively force everyone to upgrade. You could only actually go steal funds. Which obviously has a very different moral question. ", + timestamp: '00:48:50-00:58:01', + topics: ['Lightning node'], + type: 'podcast', + weight: 4.718464210259866, + }, + { + boost: 0, + date: 1671048633, + description: 'Potential bitcoin market outlook', + episode_title: 'BR014 - On-chain Economics Experts Roundtable ft. Checkmate, Permabull & TXMC', + guests: [ + { + name: 'Checkmate', + profile_picture: 'https://pbs.twimg.com/profile_images/1572347785072226304/1RsAUOvi_400x400.png', + ref_id: '78b4085f-732c-4c40-8d8d-dbb8b64d641c', + twitter_handle: '_Checkmatey_', + }, + { + name: 'TXMC', + profile_picture: 'https://pbs.twimg.com/profile_images/1596714909307387910/Od-gB-bC_400x400.jpg', + ref_id: 'c458508a-f223-46a1-9eef-961f60c9c100', + twitter_handle: 'TXMCtrades', + }, + { + name: 'Permabull', + profile_picture: 'https://pbs.twimg.com/profile_images/1009795179102994434/SfG90ffx_400x400.jpg', + ref_id: '7aea8ebb-29e2-4ce0-b6b7-9b8364e10c58', + twitter_handle: 'PermabullNino', + }, + ], + hosts: [ + { + name: 'NVK', + profile_picture: 'https://pbs.twimg.com/profile_images/608402052247658497/ENDv0BNd_400x400.png', + ref_id: 'd754e29b-2d3e-4280-8d72-f41d2a465a78', + twitter_handle: 'Coinkite', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/cd6b8d64-bd52-4f1e-86b3-ca8ba2eb169f.jpg', + keyword: !0, + link: 'https://anchor.fm/s/9500fad8/podcast/play/62206185/https%253A%252F%252Fd3ctxlq1ktw2nl.cloudfront.net%252Fstaging%252F2022-11-14%252Fdcd28b47-9893-81ee-960b-def91bce3b84.mp3', + node_type: 'clip', + pub_key: '02574d6e8e787372184b6f17c40d6c6fe1777db9015801f95dfd24692784d767cd', + ref_id: '6f2b1717-7294-4cd3-967b-ee0930060b1c', + show_title: 'Bitcoin.Review', + text: "has to leave in about ten to 15 minutes. Any topics or you want to bring on before you start sort of like wrapping up and maybe drop off? No top of mind. Not really. I guess maybe one thing that I'm curious, in terms of what the room thinks, what are we thinking in terms of market outlook over the next six months? Personally, I'm just waiting for another shoe to drop or we go sideways. There is not going to be up for a while. There's not going to be the crisp is up. I concur with that. The underlying dynamics of the market outside of bitcoin entirely has fundamentally changed from the way it has been throughout bitcoin's life. And it could conceivably be this way throughout, at least maybe this year. I'm sorry, this next year, it could be tough conditions. So I personally don't think that the low of price is in, but that doesn't mean we have to go straight down. I think a crab market is probably the least expected and most painful thing we could deal with. And we could certainly continue to range. We could have rallies, we could have crashes. But I think that the low probably won't be in until maybe the second quarter or third quarter of next year. And then maybe things could possibly start looking more constructive. But we haven't seen a real capitulation in TradFi, and that is probably what's going to be the bottom of the broad bear market. So I think bitcoin kind of has to wait for that. Unfortunately, we're essentially on the grind right now. Here's the interesting thing, right? Bitcoin, because it's so small, often responds to whichever is the new interested big pocket in bitcoin, right? So previously was private investors, VCs, that was the 2017 cycle. Before that was technology people that wanted to do payments. This cycle was the equity guys, right? There were a lot of equity guys that came in. That's why they were trading bitcoin like equity. That's why bitcoin traded like an equity, right? So what's the next pocket? Because the equity guys are getting burned and they're going to get poor. Realistically speaking, if the fed doesn't pivot in some amazing way soon, they're all going to be having fun staying poor. So who's the next pocket? It's a good question, but when I look at the overall spread of what's going on right now, and just to kind of bring it back to the previous point. So the last time rodolfo we did this podcast, price was selling off down to 15 five, and we all said, is this the bottom? And I think I said yes. So I'm going to have to just maintain that that that called the bottom on the actual bottom. Respect. When I look at transfer volume and whale activity and all these things, I can't help but feel that we have a textbook layout. Every bottom has looked exactly like this, but the big money appears to be massively under allocated to it. And I've been describing this like if your bond portfolio. Is selling off. You don't go digging around for couch cushions, right? Bitcoin is so small. If you needed the money from bitcoin to save your bond portfolio, you've sold it. You are so everybody's short bitcoin. That meme, is always true. I think that there is an under ownership problem in here as well. And also bitcoin tends to be the first thing to sniff out some kind of change. I agree, TX, that the world's in for an absolute shit storm. It's not good, right? Macro looks absolutely horrific. The question is, does the market sniff out that the Fed has to reverse course because of how bad it is, and it's thus potentially probably crabbing? And also not all time hiring anytime soon. But do we actually start? To get that under bid when the market starts to realize that this is an unsustainable recession that's coming and they're going to have to reverse course or their hands going to get forced at some point. Right? The luke groman moment. Yeah, I think that's possible here's. ", + timestamp: '01:21:27-01:25:24', + topics: ['bitcoin market'], + type: 'podcast', + weight: 7.996680560360117, + }, + { + boost: 0, + date: 1636866e3, + description: '[[Bitcoiners]] Passionate on Educating Normies', + episode_title: 'WHY ARE WE BULLISH JoeyTweets Mario Gibney Bobby Shell Len ep215', + guests: [ + { + name: 'Bobby Shell', + profile_picture: 'https://pbs.twimg.com/profile_images/1090426395979890690/uUdaFXo__400x400.jpg', + ref_id: '438f8067-3fed-49d2-91d9-5018cb043aac', + twitter_handle: 'BobbyShell2', + }, + { name: 'Len', profile_picture: '', ref_id: '1fc627d9-a446-4e48-b960-ad97fcdbcaa0', twitter_handle: '' }, + { + name: 'Mario Gibney', + profile_picture: '', + ref_id: '1a3f05f5-5c4a-455f-b4ec-f682080a5518', + twitter_handle: '', + }, + { + name: 'JoeyTweets', + profile_picture: '', + ref_id: 'e6ada141-9c3c-4e1b-b8ab-2389c94f4130', + twitter_handle: '', + }, + ], + hosts: [], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/f3b67780-d9c2-4a20-ab5c-115032a05b3a.jpg', + keyword: !0, + link: 'https://anchor.fm/s/11e95d20/podcast/play/43334718/https%3A%2F%2Fd3ctxlq1ktw2nl.cloudfront.net%2Fstaging%2F2021-10-14%2F0bfc842d-3fe7-98e0-1a25-43385ac48a7d.mp3', + node_type: 'clip', + pub_key: '', + ref_id: '29cdad6e-4b64-4e9e-bd36-5843b5783d9d', + show_title: 'BTC Sessions', + text: "disagree with Joey in a way. I get his whole story and we've all heard it. But am I bullish on Norman? No, because they're living the same life they always have. What I am bullish on those Bitcoin is telling the story like he just so eloquently did. And I was in a clubhouse with American Hotto and I was just like, dude, I'm obsessed with telling my friends about it and he's just like those people chose their life basically like natural selection. And I'm just like Mario, I don't really talk bad about normally if you go look at my Twitter right now, I got a text today of a friend who hit me up and said, hey, thanks for getting me into Bitcoin. I'm afraid to really talk about it with people because they're all living the same struggling life and now I have more money than what is due on my mortgage and he's just making shit, tons of money because he invests in Bitcoin and has for three to four years. And it's just like for me it's just I try to tell everyone about it. I probably spend four or 5 hours a week Orange billing people at 06:00 a.m. At the coffee shop or late at night if people want to talk my wife's friends and it's just like it's near and dear to my heart. I just love helping educate people. That's just what I do. I'm bullish on people that are passionate like Joey, passionate like me and have like the knowledge that Mario does and just come with the receipts like Lynn and same with you, Ben. Like you're willing to put in time every day and do this stuff. I'm really glad that there's people who care and I think that's what's really going to change the game because you think about it like you plant that seed and now they have the opportunity to plant a seed. It's different from the network effective Bitcoin. It's a network effective accountability. It's hard to hold like what I said earlier, it's hard to hold politicians accountable. You can hold friends accountable, you can text them and check in with them and the more you do it, the more they understand it because every conversation you have, they walk away with more knowledge and that's really what it's all about. That's how revolution start. And I think we're all in on that. Sounds like you're bullish on Normies becoming Bitcoinners because of other Bitcoinness. Yeah, I'm bullish on the real world happening. I can get some stats. We talked about it under show there was actually a poll conducted by Ipsos not too long ago and they actually showed that in 2016 there was 3% ownership of Bitcoin by the people that they polled. And in 2021 that number has increased to 14%. So it's 14%. You could say it's still very small but it's one in seven people, you know, invested in Bitcoin. So from that you're going to have some discussion going on between those people and that's how it's going to grow and that's how the seed is going to be planted. And every time I think about this, man, I think this is just going to go through the roof. I just want to liquidate everything. I have to buy more Bitcoin but I'm pretty much tapped out. And the only thing I have left is just a kidney and a lung for sale. Ps five. Apparently. It looks like he's in a Taliban hostage video in there. Like every week we record me. Well. That'S great. Yes. Although I will say I don't have a PS five. I haven't had a PlayStation for years. I do have an Xbox and a Nintendo because me and my wife are hidden Mario Kart on the regular. But I am Switch for life, man. Yeah, I love. I Switch. The first game in console I ever got for myself out of this. Thank you, Bitcoin. It was getting me through Quarantine and I came back from Miami. Actually. I can't wait till, like five years from now when. Hold on. I got to pull up this website. Has everybody seen this website that I'm about to pull up right here? It's called Bitcoinorshit.com. ", + timestamp: '01:38:30-01:42:13', + topics: ['bitcoiners'], + type: 'podcast', + weight: 3.935025216900664, + }, + { + boost: 0, + date: 1640926800, + description: 'Not So Good Experiences on [[Lightning Wallets]] Such as [[Muun Wallet]]', + episode_title: 'WHY ARE WE BULLISH Tone Vays Jaime Garcia Trent Dudenhoeffer KC Hodl ep225', + guests: [ + { + name: 'Tone Vays', + profile_picture: 'https://pbs.twimg.com/profile_images/1416821178266787844/T1OkI9ZW_400x400.jpg', + ref_id: 'da6fc991-7080-461c-86e3-4ac18c2f413d', + twitter_handle: 'tonevays', + }, + { + name: 'KC Hodl', + profile_picture: 'https://pbs.twimg.com/profile_images/1506986051683950592/MMMse9gr_400x400.jpg', + ref_id: 'b2264dd3-e587-403e-9447-9e99afc1910d', + twitter_handle: 'kc_hodl', + }, + { + name: 'Trent Dudenhoeffer', + profile_picture: '', + ref_id: '3b466176-3bbc-481d-9634-e127a9232404', + twitter_handle: '', + }, + { + name: 'Jaime Garcia', + profile_picture: 'https://pbs.twimg.com/profile_images/953009048642715648/PKaQy5UD_400x400.jpg', + ref_id: 'f259c6b5-71d6-4c5c-897c-3cfbe80cccc2', + twitter_handle: 'jaimegarciag', + }, + ], + hosts: [], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/c8ae0def-c33c-4d17-af4e-31ddaeedaf8a.jpg', + keyword: !0, + link: 'https://anchor.fm/s/11e95d20/podcast/play/45510131/https%3A%2F%2Fd3ctxlq1ktw2nl.cloudfront.net%2Fstaging%2F2021-11-31%2Fc821a6ba-7ef1-35ba-b24e-b96e84186843.mp3', + node_type: 'clip', + pub_key: '', + ref_id: '325d3cbf-9cf8-49bf-aa7b-8c8bc8e113ff', + show_title: 'BTC Sessions', + text: "I was going to ask you, when I saw you in Dubai back in October, we did a little Lightning workshop at Understanding Bitcoin, which again, thank you for having me out for that. That was great. I'm really glad you came. Yeah, it was a lot of fun. I really appreciated the invite and I'm really glad that I made it out. Funny enough, when we were about to do the Lightning tutorial, I was going to use Moon Wallet Muun, and it was like the only time that for some reason the back end of Moon just wasn't working, literally just for the entirety of that session. And then it immediately was back to normal. So Unfortunately, I didn't get to use that as the demo, but we did get to play around with Lightning. You had Dove into Lightning, like quite a couple of years prior and had not the greatest experience, obviously, because Liquidity was low and it was a little bit more difficult and fees were high and it wasn't super clear. Have you touched on like played with any Lightning wallet sense, or are you still kind of like sidelining it until it gets a little bit easier. I'm still kind of sidelining it. Actually, I've used some of the custodial solutions like Blue Wallet, and that's very smooth. But I've also tried using some of the non custodial solutions like Bitfinex, and I was not happy about that at all. Every time I was to open a Lightning channel, it was charging me 3000 sats, which I thought was a little bit high considering the fees have been almost nothing. And then there was one time they charged me $9,000 to open a channel and I'm like, no, I'm not doing this. I'm going to wait and I'll get back to the near future. I'm not using my Bitcoin to buy five dollar transactions anyway, so it's fine. I don't really need it. At the moment on chain fees are pretty damn small. It's good for the transactions that I deal with, but I won't get back into it. It's not my to do list early next year. Yeah, I think you'll find and again, it depends on the types of transactions you're trying to do. Like, if you're sending hundreds or thousands of dollars, Lightning is not really like the initial like an on chain transaction is still completely affordable enough for that type of stuff. And the liquidity, depending on the wallet that you're using, you may end up incurring some on chain transaction fees anyways, as channels get established. There's definitely been some issues in and around that. I really do enjoy Moon, but some of the stuff that I found with Moon is if I receive it, it's so easy to receive payments, like immediately with zero set up on Moon, but then later on down the line, if you go to send a larger transaction, even if you're going to send like $100 out and you've received a lot of payments on Moon, just the way that they work it in the back end, they're doing, I believe, submarine swaps. It ends up requiring an on chain transaction, and there's so many UTXOs involved in it that ends up being a pretty substantial fee if you come across that they're also doing that's a separate one. Yeah. So pay with Moon is a different company, and then Moon wallet, spelled M-U-N is a totally different there seems to be a lot of that happening in Bitcoin. Lightninglabs has the At Lightning Twitter handle. And there's a little bit of conferences called Bitcoin. It's a confusing space. Yeah, exactly. Well, Trent, I want to get a little bit of your input on this as well. Without diving into where we'll be talking about multi segment a little bit. What have you encountered this year in terms of people trying to learn various things, whether it be wallets, Lightning hardware. What are some of the things that you've found with people learning about Bitcoin this year? Yeah. Well, in general, just a lot more curiosity, a lot more people wanting to plug into the network, and then I feel like mining gets so much attention in ", + timestamp: '00:22:42-00:27:24', + topics: ['lightning wallets', 'muun wallet'], + type: 'podcast', + weight: 3.9350252381201503, + }, + { + boost: 0, + date: 1669766400, + description: 'How Arvin came into bitcoin and integration of Galoy with Lightning', + episode_title: 'Meet the Makers: Konstantin & Arvin', + guests: [ + { + name: 'Konstantin Wünscher', + profile_picture: 'https://pbs.twimg.com/profile_images/917464868663582720/PMFCqusG_400x400.jpg', + ref_id: '5f027fce-7775-4824-b941-d2f4120d2d0f', + twitter_handle: 'krychtiukmd', + }, + { + name: 'Arvin Galoy', + profile_picture: 'https://pbs.twimg.com/profile_images/1429792764464611329/4VQqlZiM_400x400.jpg', + ref_id: 'e0eb434a-9219-4c57-b9e4-da6ceeaec040', + twitter_handle: 'GaloyMoney', + }, + ], + hosts: [ + { + name: 'Zapp Ed', + profile_picture: 'https://pbs.twimg.com/profile_images/1519990234070540288/adGqlFoj_400x400.jpg', + ref_id: 'bbe7cf1d-cd8d-4d36-926d-76f41b775fbb', + twitter_handle: 'zapp_ed', + }, + { + name: 'Moritz Alby', + profile_picture: 'https://pbs.twimg.com/profile_images/859727763292512258/kiFpZ2vO_400x400.jpg', + ref_id: 'e88efbf8-3809-4508-a86a-d7bf9effb574', + twitter_handle: 'MoritzKaminski', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/965489b4-a414-4fd0-ab8c-55911b1596aa.jpg', + keyword: !0, + link: 'https://www.youtube.com/watch?v=CjwjScc0TYg', + node_type: 'clip', + pub_key: '02574d6e8e787372184b6f17c40d6c6fe1777db9015801f95dfd24692784d767cd', + ref_id: '6d58ed61-0116-4ce8-b26e-bcfa9a32b7d5', + show_title: 'BOLT FUN', + text: "and arvind? What fascinates you about lightning? Okay, so I guess I came at it from sort of a practical place as well, but from kind of a different perspective. So I'm based in the Caribbean, and I guess transferring money is not a solved problem here. We have lots of different currencies across different islands, and we usually have to settle to USD and go through correspondent banks, and online payments are a pain. Sending money anywhere is a pain. So, yeah, I guess I kind of found bitcoin from that angle, from that lens of being able to, I guess, work around some of these systems that aren't friendly to countries in this region. So I found lightning while looking at bitcoin, I guess pretty early. Like, I remember playing I've been dabbling with it at the edges for quite some time now. I'm not really developing in it directly, but I remember buying testnet coffee on the eclair. There's some website that they had quite a while back when eclair was launched. And then I remember when the main net versions of it came out. And yeah, the network was super small. I remember there was that graph where you could literally count all the nodes in the network. I don't know if you remember that really old ARPANET diagram, but the whole Internet was like one page. It felt like I would like to know and now it's totally different. But yeah, I think what fascinated me about it was just like the novel way that it used bitcoin as sort of a base layer supplement system type thing to build something on top of it that sort of gets around some of the restrictions of the base there. And yeah, I guess one thing led to another and I ended up working directly eventually. And I guess that's where I'm now. Can you describe a bit like, what was the journey from discovering lightning until having a full time position at Galloy? Yeah, so it started off with me just playing with the apps and stuff. I got into some of the node projects pretty early. I think I was dabbling with nodes and stuff before like umbrella and raspberry and stuff, or even things. Like there was a guy, I think he was based in Chiang Way at the time, Damien Me, who was just publishing, hey, I figured out how to run a node on a Raspberry pi. Somebody else should try this. So, yeah, I was kind of playing with things from those days and then eventually that evolved into more user facing research, researching, I guess, just the UX of lightning. And it was quite new for developers and it wasn't always super intuitive how you would integrate it or make use of it and stuff. I spent some time doing some of those things and around that, I'd say like a year ago. So this is still in me, kind of just doing random sort of drive by contributions to different repos and just playing at the edges. At the time I started to look into it's, not really quite a bitcoin thing, but I was looking into how to do Neobanks in the Caribbean just because, again, that's like a persistent problem still. And I came across Galloy as part of this bitcoin banking platform, which I thought was cool because they were doing so many things I was looking at, but they had this really nice Bitcoin angle to it and that sort of attracted me to it. So I started to look into the project, started to contribute open source to the open source code base. So started to just contribute in there and learn about it and stuff. And one thing led to the other and I ended up joining them. It's kind of how I went from dabbling to dabbling and just random contributions here and there to jumping in for them. We should maybe talk a bit later, but about these random contributions because maybe there's also a way for any other developer to get into this ecosystem ", + timestamp: '00:05:43-00:10:09', + topics: ['Galoy', 'Lightning network'], + type: 'youtube', + weight: 5.830436750167251, + }, + { + boost: 0, + date: 1641168e3, + description: 'Major adoption of Bitcoin mempool', + episode_title: 'Scaling Bitcoin On-Chain - TABConf 2021', + guests: [ + { + name: 'Andrew Chow', + profile_picture: 'https://pbs.twimg.com/profile_images/1452266201770496010/44FHCtZM_400x400.jpg', + ref_id: 'f96d87ca-5060-4021-aeb9-61db03312027', + twitter_handle: 'andrewrchow', + }, + { + name: 'Mark Erhardt Murch', + profile_picture: 'https://pbs.twimg.com/profile_images/1269477743525130241/-U843Cmt_400x400.png', + ref_id: 'ef2f2f68-ae16-4e78-80cb-0be9bd156988', + twitter_handle: 'Murchandamus', + }, + { + name: 'Andrew Poelstra', + profile_picture: 'https://pbs.twimg.com/profile_images/1316562683009921024/FSscAYvJ_400x400.jpg', + ref_id: '15fb9c53-c988-4af1-bbf0-4832d71b0a01', + twitter_handle: 'Blockstream', + }, + { + name: 'Peter Wuille', + profile_picture: 'https://pbs.twimg.com/profile_images/1264051937172836353/n7gHdLbB_400x400.jpg', + ref_id: 'fb836ce4-a933-4419-99d8-932fe65219a1', + twitter_handle: 'pwuille', + }, + ], + hosts: [ + { + name: 'Stephan Liverra', + profile_picture: 'https://pbs.twimg.com/profile_images/1362551718110580740/v-W5Q2uo_400x400.jpg', + ref_id: '551f3a72-9f09-4bcc-bc3b-80ec5605e30f', + twitter_handle: 'stephanlivera', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/e7d2a4ca-6b44-4a45-a94c-6f48987979f7.jpg', + keyword: !0, + link: 'https://www.youtube.com/watch?v=GbhXJ43e2Bc', + node_type: 'clip', + pub_key: '', + ref_id: '65a9d9c6-3211-444a-a49f-f4a34b9ab5fb', + show_title: 'TABConf (The Atlanta Bitcoin Conference)', + text: "I think I'd have another small topic to touch on, for ontime scaling. So I think one of the interesting things we've seen this year is that suddenly in the middle of the year, the mempool stopped backlogging as much, and I'm still looking for somebody to change my mind on that. But my hypothesis is that this is simply due to the smaller inputs that the average input size has decreased so much. So we saw this year a very significant adoption of native segment inputs. Yeah. And the average input size I calculated has roughly decreased from 126 V bytes to 107 or 108 VB. So just by having inputs that are 15% less weight, I think that we can fit a bunch more payments and about the same volume of payments can now easily fit into our blocks and our menpool clears much more often. Yeah, I guess. As if. We're a 2017 panel and we are talking about the interaction between the fee market and the block size. That's kind of a surprising nonlinearity, right? Because 15% sounds like 15% is cool. You can put it in your release notes and stuff, but you wouldn't expect it to result in qualitative changes in the way the network operates. But it does. You get kind of this nonlinear benefit to being able to cram more meaning into every bite. It really depends on the relation between the supply and demand. And if you're right at that level where you had more before and by removing 17% you are below you get a dramatic difference between the menpal clearing and the mentor not clearing, which is the difference between basically no fees and whatever people are willing to pay. So I don't know if that's the only reason, though. I feel like probably the ecosystem just has matured more and is more using RBF and other RBF transactions are also. Up to 25% now. There's just changes in wallet behavior and a bunch of other things within wallets can have an outsized impact. Yeah, so I guess it's like saying essentially on the margin because more people are using native Seguit and batching and maybe some lightning use and maybe people are a bit smarter about when they spend all of these things have, I guess, driven this outcome. I mean, also fee rate based input selection, right? If you use fewer inputs at high fee rates, the peaks of the mempool will be significantly lower because people add less data when the fees are already high and then it levels a little more up during the time that the mempool is empty because people use more inputs than right. So it sort of shifts transaction data from the high fee rate times to the low fee rate times. Also much more dumb, just better fee estimation. Can Andy talk about the bitcoin wallet dropping change outputs more frequently? Yeah. Okay, sure. Yeah, I've read some of your code, but I don't remember exactly how it works. But in short, I'll let you. Yeah, sure. So when you build your transactions so that you do not have to create change outputs, when you hit exactly the amount of funds that you need to pay to the recipients, your transactions are slightly smaller. You create fewer pieces of bitcoin in the first place that don't then later have to get spent again. And some of the players in the space have introduced UTXO selection algorithms that explicitly seek for these sort of input sets when they build transactions. One of them was that bitcoin core emerged a few pull requests this year that had been open for quite some time. Yes. And they introduced this behavior into bitcoin core. Now, I don't know exactly how many people are using bitcoin core because I. Also don't think that would really have a significant impact on transaction sizes, because even in simulations I've run, it's not that many that have changeless transactions. Well, 4% more transactions without change is almost fine. Anyway, 4% is 4%. ", + timestamp: '00:43:51-00:48:26', + topics: ['Bitcoin mempool', 'free market'], + type: 'youtube', + weight: 3.9350252419142993, + }, + { + boost: 0, + date: 1636993919, + description: 'Why the mempool stopped backlogging', + episode_title: + 'SLP321 On chain scaling with Bitcoin Core Developers Pieter Wuille, Andrew Poelstra, Andrew Chow & Murch', + guests: [ + { + name: 'Pieter Wuille', + profile_picture: 'https://pbs.twimg.com/profile_images/1264051937172836353/n7gHdLbB_400x400.jpg', + ref_id: '40260d2f-3480-47d6-8515-d2e780901273', + twitter_handle: 'pwuille', + }, + { + name: 'Andrew Chow', + profile_picture: 'https://pbs.twimg.com/profile_images/1452266201770496010/44FHCtZM_400x400.jpg', + ref_id: 'f96d87ca-5060-4021-aeb9-61db03312027', + twitter_handle: 'andrewrchow', + }, + { + name: 'Andrew Poelstra', + profile_picture: 'https://pbs.twimg.com/profile_images/1316562683009921024/FSscAYvJ_400x400.jpg', + ref_id: '15fb9c53-c988-4af1-bbf0-4832d71b0a01', + twitter_handle: 'Blockstream', + }, + { + name: 'Murch', + profile_picture: 'https://pbs.twimg.com/profile_images/1269477743525130241/-U843Cmt_400x400.png', + ref_id: '3e2c1c73-a057-4475-9782-3bb0d3d8cc62', + twitter_handle: 'murchandamus', + }, + ], + hosts: [ + { + name: 'Stephan Livera', + profile_picture: 'https://pbs.twimg.com/profile_images/1362551718110580740/v-W5Q2uo_400x400.jpg', + ref_id: '72f57157-c96e-4466-8bf1-290cfe1f8a0b', + twitter_handle: 'stephanlivera', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/b79a3eb8-bcd0-4338-b979-d32aef360785.jpg', + keyword: !0, + link: 'https://anchor.fm/s/7d083a4/podcast/play/43381293/https%253A%252F%252Fd3ctxlq1ktw2nl.cloudfront.net%252Fstaging%252F2021-10-15%252F4872859a-d95f-b966-4c6d-df50c0d78454.mp3', + node_type: 'clip', + pub_key: '027be063cca62a6c08fbe2e8eba0aae10ad27a8896d04ee347a90fea2bce5e85ac', + ref_id: '362a90a7-c9dc-4c90-827b-8cf469895c35', + show_title: 'Stephan Livera Podcast', + text: "small topic to touch on for online scaling. So I think one of the interesting things we've seen this year is that suddenly in the middle of the year, the mempool stopped backlogging as much and I'm still looking for somebody to change my mind on that. But my hypothesis is that this is simply due to the smaller inputs and that the average input size has decreased so much. So we saw this year a very significant adoption of native segment inputs. And the average input size I calculated has roughly decreased from 126 V bytes to 107 or 108 V bytes. So just by having inputs that are 15% less weight, I think that we can fit a bunch more payments. And about the same volume of payments can now easily fit into our blocks and our mempool clears much more often. Yes, I guess as if we're a 2017 panel and we were talking about the interaction between the fee market and the block size. That's kind of surprising nonlinearity, right? Because 15% sounds like 15% is cool. You can put it in your release notes and stuff, but you wouldn't expect it to result in qualitative changes in the way the network operates. But it does. You get this nonlinear benefit to being able to cram more meaning into every bite. It really depends on the relation between supply and demand. And if you're right at that level where you had more before and by removing 17%, you are below, you get a dramatic difference between the mental clearing and the mental not clearing, which is the difference between basically no fees and whatever people are willing to pay. So I don't know if that's the only reason, though. I feel like probably the ecosystem just has matured more and is more using RBF. RBF transactions are also up to 25% now. It's just changes in wallet behavior and a bunch of other things within wallets can have an outsized impact. Yeah, so I guess it's like saying essentially on the margin, because more people are using native SegWit and batching and maybe some lightning use, and maybe people are a bit smarter about when they spend all these things have, I guess, driven this outcome. I mean, also fee rate based input selection, right? If you use fewer inputs at high fee rates, the peaks of the mempu will be significantly lower because people add less data when the fees are already high, and then it levels a little more up during the time that the mempua is empty because people use more inputs then. Right. So it sort of shifts transaction data from the high fee rate times to the low fee rate times. Also much more just better fee estimation. Yeah. Can Andy talk about the bitcoin wallet dropping change outputs more frequently? Yeah, okay, sure. Yeah, I've read some of your code, but I don't remember exactly how it works, but in short, I'll let you know. Yeah, sure. So when you build your transaction so that you do not have to create change outputs, when you hit exactly the amount of funds that you need to pay to the recipients and your transactions are slightly smaller, you create fewer pieces of bitcoin in the first place that don't then later have to get spend again. And some of the players in the space have introduced UT EXO selection algorithms that explicitly seek for these sort of input sets when they build transactions. One of them was that bitcoin core emerged a few pull requests this year that had been open for quite some time. Yes, and they introduced this behavior into bitcoin corps. Now, I don't know exactly how many people are using bitcoin core, because I. Also don't think that would really have a significant impact on transaction sizes, because even in simulations I've run, it's not that many have changeless transactions. Well, 4% more transactions without change is. Almost anyway, 4% to 4%. So we've only got a couple of minutes ", + timestamp: '00:43:14-00:47:15', + topics: ['Bitcoin Network'], + type: 'podcast', + weight: 3.9350252170485933, + }, + { + boost: 0, + date: 1664323200, + description: 'Loyalty program', + episode_title: 'TRUBIT bringing Digital Loyalty Assets to Bitcoin - Voltage Twitter Spaces', + guests: [ + { + name: '@0xLinden', + profile_picture: 'https://pbs.twimg.com/profile_images/1439365331202437125/JBiXogun_400x400.jpg', + ref_id: 'b8bb4402-8f86-4220-9dee-0fa28ff8de72', + twitter_handle: '0xLinden', + }, + { + name: 'Stephen Doge', + profile_picture: 'https://pbs.twimg.com/profile_images/1215979900387184641/nZXkhgoP_400x400.jpg', + ref_id: '076972a2-cdab-4766-8c66-618472b80772', + twitter_handle: 'StephenDodge20', + }, + { + name: '@617a7a', + profile_picture: 'https://pbs.twimg.com/profile_images/1548336437308715016/FUZFJf9k_400x400.jpg', + ref_id: '148d77a5-6e95-4855-9e17-19e68f648898', + twitter_handle: '617a7a', + }, + { + name: '@ian__major', + profile_picture: 'https://pbs.twimg.com/profile_images/1427414299169984517/Hw0ux6ie_400x400.jpg', + ref_id: '7ed41a74-21a4-43a4-9a05-e977c981b6d3', + twitter_handle: 'ian__major', + }, + ], + hosts: [ + { + name: '@voltage_cloud', + profile_picture: 'https://pbs.twimg.com/profile_images/1508657900486422529/Lfa70poj_400x400.png', + ref_id: '3b622187-60ce-43c2-a21f-ae749c2d961a', + twitter_handle: 'voltage_cloud', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/2ec62250-4755-4616-8342-096a2cfab95f.jpg', + keyword: !0, + link: 'https://www.youtube.com/watch?v=1Cn7F1Oo_6Q', + node_type: 'clip', + pub_key: '03c7a7f42d94fdfc7a655515c1421cd1d20db090a1c24150201de0b1dc6a30b0ee', + ref_id: 'd2d3e71f-24ad-4cf3-b516-f63ac5283d50', + show_title: 'Voltage', + text: "working with and talking still with several mom and pop and just kind of given the broader macro environment, obviously it's every other day, it seems like it's the end of the world, but they're dealing with a lot. Labor shortages, supply chain issues. Like these small mom and pops are one looking for any break they can get. But I think they also acknowledge that they need some differentiation to again, to kind of speak to everything that he and just spoke to. But also they know that this customer segment, or maybe they don't kind of our job, but this consumer segment tends to skew younger but also higher income. And if they want to be able to keep a customer base that is able to purchase their actual products with rising costs and just kind of more and more strain and friction between them and the end customer, they're going to need to have some type of solution to that. And while bitcoin is probably not the only answer, I think it's a critical one for kind of a global debt crisis that's kind of unfolding before us. So I think that might become more apparent as things continue to kind of unfold. But it's kind of something that I think we could do a better job of, say, hey guys, look at this asset standing in the test of time. Zoom out a bit. It's obviously appreciating in value, and typically the people that own this are again, pretty savvy involved in multiprograms skew higher income. These are the kind of customers that you want to attract if you want to have your business be around for another decade. Yeah, I'm just thinking it probably is a lot easier to sort of cold orange pill a business into just giving bitcoin a loyalty thing instead of accepting it outright, even though that's sort of what a lot of bitcoinners go for. Every time I go to a mom and pop sort of coffee shop and I see them using toast or clover and I know that they're getting charged like $0.50 plus 3% or whatever it is on a $4 cup of coffee, it hurts my soul. I know his margins are already super thin and stuff, so we hate it. Because they want us to integrate with it. And integrating with them is a pain in the butt. Yeah, that too, right? When I talk about Bitcoin, it's like, okay, yeah, sure, put it in the system. It's like it's getting easier with things like IBEX and open noted stuff. But as far as going that loyalty route, that might be like the foot in the door that we've been missing instead of going from this like zero to 100, it's a little bit of a softer onboarding onto bitcoin for a lot of these businesses that haven't even thought about it. Yeah, exactly. I almost think there's an analogy to how we at times observe that folks in the Western world tend to have different behavior as it relates to Bitcoin versus the arguably much more kind of colorful peer to peer activity that we see in places like Africa and places like Southeast Asia, et cetera. You see all these dynamic communities springing up. That's awesome. And we believe that that is inevitable to see more and more of that, even in the Western world. But I think the same sort of dynamic is at play. Like, all fiats are melting ice cubes, but some are melting faster than others. And so the ones that are melting slower than others. I think that message of using Bitcoin as a medium of exchange is just something that takes a little bit more time in those markets. And so for the same reason as we see that dynamic I just described, I think that's been our observation, is that for brands kind of in this part of the world where we're based, the notion of extending their loyalty program with this additional reward type tends to be a little bit of, as you said, easier stepping stone. ", + timestamp: '00:34:13-00:38:17', + topics: ['TRUBIT loyal program'], + type: 'youtube', + weight: 3.9981546053837542, + }, + { + boost: 0, + date: 1670056200, + description: + 'Reverberation accross all the learning protocols in DeFi - Avi Eisenberg tried pulling off an attack on Aave', + episode_title: 'The Chopping Block: SBF Wants to Win in the Court of Public Opinion. Will He? - Ep. 428', + guests: [], + hosts: [ + { + name: 'Tom Schmidt', + profile_picture: 'https://pbs.twimg.com/profile_images/1563232354277085189/xQL92DR4_400x400.jpg', + ref_id: 'bc9d3bfd-36b0-4cbc-a491-9370decf4c99', + twitter_handle: 'tomhschmidt', + }, + { + name: 'Haseeb Qureshi', + profile_picture: 'https://pbs.twimg.com/profile_images/1581025415551889408/thQwG4lb_400x400.jpg', + ref_id: '790e4217-dd9f-416f-b9f8-ed596937f5b5', + twitter_handle: 'hosseeb', + }, + { + name: 'Robert Leshner', + profile_picture: 'https://pbs.twimg.com/profile_images/1587956987786104833/1SiKVj-s_400x400.jpg', + ref_id: 'ebaa2166-7982-423d-9f43-add89e7d47f9', + twitter_handle: 'rleshner', + }, + { + name: 'Tarun Chitra', + profile_picture: 'https://pbs.twimg.com/profile_images/1587539091444432897/Z6_nmrCB_400x400.jpg', + ref_id: 'dfad4b23-92ff-4aa1-9aa4-abc1d54cd6d3', + twitter_handle: 'tarunchitra', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/7de0d293-8ae3-4362-8500-8f7300f3fe41.jpg', + keyword: !0, + link: 'https://traffic.megaphone.fm/LSHML5256608163.mp3?updated=1670080150', + node_type: 'clip', + pub_key: '03c7a7f42d94fdfc7a655515c1421cd1d20db090a1c24150201de0b1dc6a30b0ee', + ref_id: '8b5e41e9-6cc2-4070-8210-6f49967759f2', + show_title: 'Unchained', + text: "speaking of chaos and defy, so we did have also last week a very interesting attack that took place against Ave, and this kind of caused reverberations across all the lending protocols in DPHI. So, Terune and Robert, I assume you guys are closest to this, but I'll give the very, very high level. So we talked before about the Mango markets attacker, avi Eisenberg. Abraham Eisenberg is a full name. So he was the one who manipulated Mango Markets and to have a very profitable trading strategy, quote unquote. He announced earlier this idea that he could basically do an attack against Ave by borrowing assets that were essentially that were less liquid than Ave was kind of giving them credit for and essentially manipulating markets after doing large loans. So I think essentially the way the attack were actually truly yours, it's probably better if you walk through it. Describe for us what exactly happened with the attack, what happened with Curve and all the kind of play by play why they ended up incurring bad debt at the end of this episode. Well, I mean, the bad debt that the protocol had is the thing that you should be worried about at the end, not the ones he made. But he was sort of doing a little bit of the opposite of what happened in Mango, where instead of trying to push the price up of some piece of collateral to borrow everything, he actually put some USDC's collateral, then sorted. Curve tried to push the price down, and then basically by pushing it down, he basically could bar all of the supply of curve. And then if it mean reverted, then you can do a Mango style thing. Now, he didn't really analyze where curve liquidity was. There was there are not many places to get curve. For instance, comics Finance is a place where people end up locking up curve for multiple years, and there's quite a bit of liquidity in there. And so it was easy for people to take the other side of his trade and basically grief him for shorting this in the way he did. The protocol realized that debt because basically there wasn't enough curve to do the liquidation. And so it was just expensive in some way sense. But the total amount of bad debt was like under $2 million. So it was relatively small. Yeah. So I think at the end of the day, the sheer destruction and overall liquidity since the FTX incident has made these Mango selling more likely, which is why I think people are being much more cautious. But the main point is in the V, both compound and there are borrow and supply caps which you can use to kind of limit the max size. Of these types of so if I can summarize in a sentence, there were some stale parameters for borrowing and lending long term, mostly borrowing long tail assets. And these parameters assumed market conditions that looked more like January than that look like today. And all the stuff, ironically, that we've been talking about with credit destruction for. Mango, it's actually quite different. Version is different, yes. In Mango it was sort of the long tail parameters. Here, there's this weird thing where like, the collateral use was actually like good collateral and the liquidation threshold was somewhat high. And it's actually very hard to convince people to lower liquidation thresholds in these communities on the major assets, meaning East WBTC, USDC, tether obviously put up USDC and then shorter curve. So it's a little bit more nuanced if you actually go and look at the details. But yes, it's one of these things where liquidity conditions deteriorated going through governance. By the time the proposal would make it through, it was late. And so we submitted the proposal for stuff. But I guess the point is, I think it was sort of unprecedented, but it wasn't like a huge loss. Also, Maker had some bad debt as well last week from Gemini Earn. So if you remember, Maker put part of the safety module into Gemini Earn to earn some yield, and it incurred some losses from them and has written them off and paid ", + timestamp: '00:35:18-00:39:41', + topics: ['DeFi', 'Avi Eisenberg', 'Aave'], + type: 'podcast', + weight: 6.190678169952389, + }, + { + boost: 0, + date: 1623733200, + description: 'The Process of Financing in Small Business', + episode_title: 'Andrew Frazier on Running Your Business', + guests: [], + hosts: [], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/f2b2a2b2-8869-4256-94b9-a91c91c1ce7e.jpg', + keyword: !0, + link: 'https://dts.podtrac.com/redirect.mp3/cdn.mises.org/122_e4b_andrew-frazier.mp3', + node_type: 'clip', + pub_key: '', + ref_id: '6e2a0132-8291-4ea4-b1a8-dc87c0adf527', + show_title: 'Economics For Business', + text: "product and service should be. In that order. Yeah. So one of your great phrases is the more you know, the more you grow. So we've talked a little bit about that. If you know your customers and know your market, you're going to grow as you grow, you're going to need capital and finance to expand your business. And you've got a methodology for that too. It comes under an acronym, which you call Pray. Pray. But praying is not what you need. It's much more systematic approach to finance. So can you walk us through the Pray acronym and how small businesses approach financing? Yeah, definitely. I mean, I look at it as to access capital, you must pray. And it's a strategy for being able to increase the likelihood and the magnitude of financing that you're going to be able to attain. So, never hurts to pray. Definitely. Prayer works for many people, but in business financing, it also means to prepare to get your business and financial affairs in order. Research are for research, understanding the landscape of options and requirements for business financing. A for symbol. Putting together the important documentation on a timely basis. It's really interesting how many loans never get processed because all the documentation doesn't get turned in by the business owner and then yield. Once you have things in, you're going to go through due diligence and other stuff and you have to be patient. So you need to start the financing process early so that you have time to successfully go through and have the money and time for what you need. Most important thing is to prepare. You talk to any loan officer anywhere. Biggest reason why people don't get financing and really don't deserve to get financing is because they're not prepared. Yeah. So another element of that which we think is really important, and you just highlighted Andrew, is understanding time. That understanding that it's going to take time to get through that process of financing or any process that you're involved with. And therefore early preparation is a key element to success. So do you find that there's a misunderstanding of the time things take, the time it takes to get a loan, the time it takes to find the right supplier? Yeah. I think one thing I always tell business owners, especially new business owners, is everything takes longer and it's more expensive than you would expect. As a business owner, a lot of times you come in and you're like, okay, I'm going to be selling a million dollars a year too. Usually not that easy. So it takes time to learn, understand your market, build your relationships, so have customers satisfying. So the timing, it's always going to take you longer than you planned and expected. Especially for financing, it's important to start early and that's where you have a plan. If you have a plan, you already know when you think you're going to need financing and for what. And you have a plan of where your business is going and you know if you're achieving the plan or not and how that's going to impact you. Unfortunately, a lot of businesses don't have a plan and really they're kind of out there just winging it. And you don't want to wing it on your livelihood. Yeah. Would you agree, Andrew, that sources of financing are becoming more plentiful for small businesses? We talk about not having to go to the bank for a bank loan because there's crowdsourcing, there's angel investing, there's fintech platforms that offer an alternative to banks. Is that true in your experience for businesses or do we still need to go to the bank manager? I think there's more options, but there's also more risk because some of the options are more predatory and can hurt you as opposed to help you. But micro lenders tend to be one of the best options for people. Crowdfunding, depending on the type of business you have, may work, but it also depends on your network and it's a lot of work to even do. So sometimes it might be easier to just make money with your business and focus on it. So I'm a big fan of self financing, friends and family, and as you get up and have some cash flow and you have some profitability and success, that's when you. Really want to ", + timestamp: '00:30:07-00:35:23', + topics: ['Financing in Small Business'], + type: 'podcast', + weight: 3.923132896423765, + }, + { + boost: 0, + date: 1669852800, + description: 'What is the future of bitcoin technology', + episode_title: + 'The Future of Bitcoin Technology with Pierre Rochard, Dhruv Bansal, Warren Togami and Guy Swann', + guests: [ + { + name: 'Warren Togami', + profile_picture: 'https://pbs.twimg.com/profile_images/1577819570039128065/bBmumEx9_400x400.jpg', + ref_id: 'f082b94a-673f-4b99-b46e-49a342b5792a', + twitter_handle: 'wtogami', + }, + { + name: 'Dhruv Bansal', + profile_picture: 'https://pbs.twimg.com/profile_images/908397811284172800/kR9kKNsE_400x400.jpg', + ref_id: '6ed2b14a-d97d-4a3f-b5b5-4c3222d85624', + twitter_handle: 'dhruvbansal', + }, + { + name: 'Pierre Rochard', + profile_picture: 'https://pbs.twimg.com/profile_images/1567258180861792256/EEEBkvQR_400x400.jpg', + ref_id: '426b30ba-7c24-4558-b926-ec307756a876', + twitter_handle: 'BitcoinPierre', + }, + ], + hosts: [ + { + name: 'Guy Swann', + profile_picture: 'https://pbs.twimg.com/profile_images/1401969630634196995/DqOuszMi_400x400.jpg', + ref_id: '39c31930-d799-40a0-9a46-193117d03418', + twitter_handle: 'TheGuySwann', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/492cbcce-3744-4d8b-b2ca-3a7f063e798a.jpg', + keyword: !0, + link: 'https://www.youtube.com/watch?v=o26mezhnffU', + node_type: 'clip', + pub_key: '02574d6e8e787372184b6f17c40d6c6fe1777db9015801f95dfd24692784d767cd', + ref_id: 'f3d0a35e-3e21-4c0c-874c-d6f2b1f37eed', + show_title: 'Swan Bitcoin', + text: "so I want to start this off with what is your focus on bitcoin technology right now? Like when you project out in the short to medium term, what is the thing that you think is the most important next step for what we need to take advantage of and the tool that essentially is going to accomplish that for kind of the next use case or the next market? Start with you, Drew. Wow. Maybe I'll try to play my own trade by just saying multisig is really important. I mean that in a very general sense. Unchained, I think, is somewhat well known for offering multisig vaulting products and other financial services delivered through cold storage, multisig solutions. I do think that's really important. And investing in better security technology for bitcoiners is how we help keep them bitcoiners for many decades. I think more advanced forms of multisig, everything from configurable vaults with timeouts or other kinds of structures that are well suited to products like inheritance is really important. But I think multisig is actually way more important than, quote, unquote, just cold storage. I think multisig thematically is sort of considered a security technology. It should be considered a collaboration technology. And that's why Unchain often calls our product collaborative custody and not multisig because we're seeing coins with you. I think another form of collaborative custody is a lightning channel. We don't think of it that way frequently, but that's really what it is. It's a pre agreed collaboration over certain coins with certain rules that are very different than a product. You might get it unchained, but it's another form of collaboration through multisig. I think I'm going to make the general claim that in bitcoin, the way that we do collaboration, whether it's in an adversarial context, in a friendly context, in a financial services context, in an anonymous trading context, however we're collaborating. Whatever the locus of connectivity between individuals is, multisig shows up. And so I think that's an important theme for us to get better at as Bitcoiners all up and down the stack. Yeah, I agree with the emphasis on multisig. Fundamentally, bitcoin, if we think of it as a company, it's not a startup anymore, right? Bitcoin at this point has product market fit. It has trillions of dollars worth of transactions flowing through it, not every year over the past year. And the emphasis should be on reinvesting in what we know people value in Bitcoin, so they value holding Bitcoin. Multisig is a great way to hold Bitcoin. We also see that they value transacting in Bitcoin, whether it's small transactions or large transactions. Even over the past few months of the bear market, we still see a massive number of transactions going through the Bitcoin network. So the emphasis, I think, should be looking at Bitcoin as a monetary system where we want the software to be as reliable and as stable as possible so that people can feel confident that this is a monetary system that is going to continue to endure and is going to be there for them whether it's next year or ten years from now. Right now, in the markets, what we see is tremendous price volatility. But if you look at the underlying technology of Bitcoin and the blocks that come out on average every ten minutes, there is no volatility there. And the the protocol continues to function exactly as we expect it to. So I think that the emphasis should be focusing on reinvesting in Bitcoin's fundamentals what we know works, and then as a secondary focus, I also think it's really interesting to look at what will the future of Bitcoin's product market fit be? And there I really think that payments makes a lot of sense, specifically through the lightning network. So the lightning network enables smaller value transfers that are just not economical at the base layer because we want to keep the base layer to be as decentralized as possible. We want to keep the cost of running a Bitcoin node as low as possible. So there are trade offs between the different layers. And when we look at the other cryptocurrencies, they've taken trade offs that really are starting to reveal themselves as profoundly misguided. So when we think about the future of Bitcoin technology, we have to keep in mind that there are constraints if we want Bitcoin to continue to be decentralized and to be successful as a stable, sovereign monetary system that is really serving its users. So Pierre actually covered nearly all the points I wanted to make, but I'll speak from a developer's point of view, like, you know, bitcoin for stability and security. But it's not magic. It's because developers had been acting in a science driven peer review process for years. And you may have heard about the so called block size war, where people wanted to move fast and break things. If you don't have stability and security, you have nothing at the base layer. And now as Lightning is growing, we need we also need that stability and security at the lightning layer two level. So I'm glad you brought up Lightning. Lightning is something that I've focused on a lot and I literally use it essentially every day. And particularly in the context of small payments, it's amazing what you can do to incentivize people in the Bitcoin community. Like, I use it a lot in the Audio Knocks group for just kind of like fans of Bitcoin Audible. And I literally pay them to keep me off of Twitter and keep me from getting constantly distracted with everything. If they post articles that they're interested in to help kind of curate, like my having to just explore and dig through all of the trash to find good stuff to read about, I'll just pay them 21,000 SATS. If they post something that I end up wanting to read on the show and it saves me an unbelievable amount of time, and then I do the same thing and throw somebody 5000 stats on Twitter. If there's like some ridiculous sounding story, I'm like, please, somebody posted the source. I'll pay you 5000 SATS. And it's been surprising to see how many people will actually go get a Lightning wallet when they're in that situation. They're like, all right, I've never even done this before. Where do I post my invoice? But those like, small incentives, I think the liquidity and the adoption of Lightning is kind of getting to a very interesting place where certain use cases that didn't make sense early in the bootstrapping era now do, because now they can quickly sign up and offload on cash app or actually pay through cash app. Accept it. There's a huge variety of options and the payments are far more reliable today than they have been. And it's starting to look like we're entering a new phase where there's a whole lot of use cases that now suddenly makes them. And maybe actually I'll turn this right back over to you, Warren. Like, what do you ", + timestamp: '00:01:17-00:09:06', + topics: ['bitcoin technology', 'multisig', 'multisig'], + type: 'youtube', + weight: 5.8957802652854445, + }, + { + boost: 0, + date: 1630296e3, + description: '[[PlebNet]] is a Community of [[Plebs]] that Interact to Learn About [[Lightning]] and Bitcoin', + episode_title: 'WHY ARE WE BULLISH Plebnet Takeover With JC KP VS and Walton ep196', + guests: [ + { + name: 'VS and Walton', + profile_picture: '', + ref_id: '5277e03c-a4d5-4b4b-ac6b-4dfd8fc9b8ce', + twitter_handle: '', + }, + { name: 'KP', profile_picture: '', ref_id: '9b4f73fc-d67b-4734-90e3-34dde1b7c4cc', twitter_handle: '' }, + { name: 'JC', profile_picture: '', ref_id: 'cbd12a77-50f2-4a20-a176-1083ce920f32', twitter_handle: '' }, + ], + hosts: [], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/419512c2-e309-4b25-bfe2-cd481d53f66d.jpg', + keyword: !0, + link: 'https://anchor.fm/s/11e95d20/podcast/play/39539755/https%3A%2F%2Fd3ctxlq1ktw2nl.cloudfront.net%2Fstaging%2F2021-7-30%2F215548612-44100-2-1d28a0866fcfc.m4a', + node_type: 'clip', + pub_key: '', + ref_id: 'c9fe9c3a-3c24-4803-817d-64d5fa2d58dc', + show_title: 'BTC Sessions', + text: "But my reason for being bullish this week is that Pleb. Net exists. So I'm going to defer to somebody from the panel to explain what the hell is Pleb. Net? Kind of how it got started and how far it's come. So maybe like KP, do you maybe want to start us off with this and let us know what Club. Net is? Yeah, what the heck is Pleb. Net? So it's pretty interesting. When we got started in Lightning, there was a clubhouse room and then there is a small Telegram chat group which has got the Lntx bot. And this was like February, late February time frame and we throw in the LNTS bots and then we were all learning Lightning. There were of course, long term Masters like JC over here and CJ and several others. They were our go to people to actually answer a question or ask any questions to them. And the way I learn, Ben, is I like to learn in communities because guess what, that's how you get to interact with everybody and be able to actually feed off of each other. And in Bitcoin similar enlightening is, I don't know, is a great answer. And then you go and search all sorts of details behind that. So we used to hang around in clubhouse and then we actually created the small group and then we started opening channels and we started learning about the Lightning in general. And then we were thinking about this. And then we sort of like jointly created this group called FloodNET. I think Rajwinder came up with the idea how it throws around in a Telegram group, somebody throws a name and there were five different names about what the name means. And then flip. Net came in and then basically it took off from there, honestly. And then this is almost five or six months. It is hard to believe that it is six months. And the growth after that has been tremendous. And the reason being that the folks who are actually participating in this, they help each other. And at this point of time, as of this morning, I was checking and I'm actually stunned by this. 3500 people. There is 670 nodes out there in ClubNet and you know how many? I was just looking. There is almost 630 bitcoins 630 BTC on the nodes in pub. Net. That is a freaking big deal. And actually, if I looked at the average size of a node is about 95 million satoshis. So these are not like what it used to be. A small baby club. Net in the month of February is like a full grown. And then guess what, within pub. Net, you also have groups that specialize in advanced discussions, tools development. There are hardware development folks. Actually, there is a group which is only for node runners. There is a group which actually only for learning and playing with Lntx parts. So it's a whole gamut. There is an umbrella of five different Telegram groups, believe it or not, but really well connected. And then it is evolving from there. So that's plenty. And if you want to participate and learn about Lightning, guess what, just go to plumbing.org. It will land you into one of the Telegram groups. There will be tons of memes. You will find the people having a lot of fun over there. However, they are pretty serious and they all love Lightning. So that in short, is ClubNet. One thing I really liked that KP said was that it's okay to say I don't know. And actually this is something that's really valued in the Bitcoin community when people have the humility to accept that they don't know something and actually to acknowledge to other people that they don't know something. And I think that's a core part of what being a club is about is knowing your own limitations and wanting to be part of a larger community and recognizing that we all have different things to learn from ourselves. So the name pleb. Net really could not be better. So thanks for our Linda and Katie. You really touched on a lot of things that I really love. And I do want to stress one thing too, because while now it has gotten there are people that are very advanced, very serious. And that's one of my favorite things about it. It started out one my of most favorite parts was it was just a lot of people who Lightning always felt intimidating. People didn't know how easy it was or what tools existed. And you talk to somebody about Lightning, even if they've been in Bitcoin for a while, their eyes kind of glazed, like, oh, yeah, I don't know if I can set up like a Linux computer just to do some testnet coffee shop transaction stuff. And it's like, no, it's actually huge. There are communities out there, like all this stuff. And when we renew, sometimes someone would call me a Lightning expert. And I've been doing it for a while. But I'm not a developer. I'm like, guys, I'm not an expert. I can't even send a Lightning payment in the console on LND. But now it's gotten to the point where anybody, doesn't matter how long you've been doing this, you're going to be able to learn something from Premier. And the biggest thing is that the whole point of it is that you can go there knowing nothing at all, and there are going to be 100 people just like you and help each other and step by step get through it. And it's actually easier than you think. But that was, I think the root of it was a place where people who don't know and want to know and want to learn and get with a great community of people, some of whom were not even really necessarily Bitcoiners more than six months ago. And they've now gone to full blown Lightning routing operators, generating fees on hundreds of transactions a day. So that's part of the magic, I think of it. It's a place of learning for everybody. Like a tuition free College campus. You've got lots of great minds there, people contributing their time willingly. And it's this weird social experiment, as JC says, where anyone, no matter where they're at in their journey, can learn something. It's very exciting. Kp, what was that stat? How many Bitcoin did you say? Roughly 630 bitcoins. An average node. Average node is 94 million. Satoshis, as of this morning, I'm looking. At one third of the Bitcoin on the entire Lightning node. If I'm not wrong, in fairness, is. That calculation for outbound and inbound correct. It is outbound and inbound. There is no way to know the separation. So, yeah, thanks for clarifying that. But it's still like those nodes which are affiliated with our ClubNet. The point is, actually, it has grown and it is not about ClubNet, it is about Lightning. It is about expanding Lightning. And I keep saying this in our chats and what I honestly believe in, when you have a sound money and a monetary value and a store of value like Bitcoin, and when it flies on Lightning network across the globe, unhindered in an open, secure system, magic happens and it will happen. We are just beginning. It is just the beginning at this point of time. And that is the beauty of this whole group. And what everybody is doing there. Yeah. ", + timestamp: '00:07:42-00:15:26', + topics: ['plebnet', 'plebs', 'lightning'], + type: 'podcast', + weight: 3.9111918211253958, + }, + { + boost: 0, + date: 1653436800, + description: 'Hurdles small businesses encounter when trying to embrace Bitcoin', + episode_title: 'Small Businesses Embracing Bitcoin w/ Michael from Oshi App - Voltage Twitter Spaces', + guests: [ + { + name: 'Michael Atwood', + profile_picture: 'https://pbs.twimg.com/profile_images/1362207977470521345/Jy2_Ge60_400x400.jpg', + ref_id: '16359ade-afb9-4a37-be0b-0844a6134327', + twitter_handle: 'Dooowta', + }, + ], + hosts: [ + { + name: '@voltage_cloud', + profile_picture: 'https://pbs.twimg.com/profile_images/1508657900486422529/Lfa70poj_400x400.png', + ref_id: '3b622187-60ce-43c2-a21f-ae749c2d961a', + twitter_handle: 'voltage_cloud', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/2ec62250-4755-4616-8342-096a2cfab95f.jpg', + keyword: !0, + link: 'https://www.youtube.com/watch?v=kMDSsyAEvd8', + node_type: 'clip', + pub_key: '', + ref_id: 'd0f57eb5-87ba-4180-ad39-96589093a0f0', + show_title: 'Voltage', + text: "yeah. One of the things I've spoken to you about before was there's a few people in my local community that wanted to accept Bitcoin or put it on their balance sheet. And they ran into issues where, for some reason, for accounting, it was complex. And their tax adviser said they need to buy it through PayPal because it's easier for accounting. That's one of many issues. But what are the hurdles small businesses are trying to overcome when it comes to just embracing bitcoin as a whole? If you could break those down, I. Would say maybe the biggest hurdle is just understanding what the hell bitcoin is and why they should use it. Let's say, okay, they understand that the hurdles are educating them on the tools. So they need to find the tools. It's really easy for them to go, okay, what do I do? I'm the business owner. I just download moon wallet and now I can accept bitcoin. It's like, well, if you're running a business and you have employees, you're not just going to be swinging around your moon wallet, right? So there are different tools, right? There's iVEX, there's open node, there's voltage, run your own BDC, pay server, run your own node, right there's all these different tools, the startup costs and a lot of these is effectively zero. The setup time can take as little as like five minutes and you can be up and running. So really, it's all about knowledge and awareness of these different things. And really, I think that the Bitcoin community has a lot of work to do in making sure that business owners become more aware of these tools and actually just educating themselves on what the tools are so they'll feel a lot more comfortable and confident whenever they walk up to a business and they're like, hey, do you guys take Bitcoin? What if the business owner is intrigued? What are they going to do? What's their next step? And honestly, most even of the bitcoin community is awesome, but I think a lot of them don't know the next steps. And just so bringing awareness to that would be a huge help. Let's say the businesses are now all set up and they accept bitcoin. Everything's ready to go. The next hurdle is the point of sale system. How do they integrate bitcoin, whether it's in a hacky way or one of these days will have hopefully a more seamless integration with the bigger point of sale systems. But how do they get that going? And that at this moment, in my opinion, is one of the biggest hurdles for businesses that are eager and willing and maybe already starting to accept it's, that point of sale? ", + timestamp: '00:02:32-00:05:05', + topics: ['Michael Atwood', 'Bitcoin awareness', 'Bitcoin community'], + type: 'youtube', + weight: 3.8968925007363358, + }, + { + boost: 0, + date: 1674262945, + description: 'Ben Perrin sharing his experience building Bitcoin circular economy with Bitcoin meetups', + episode_title: 'WHY ARE WE BULLISH? Joe Consorti, Texas Slim, Max Gagliardi ep316', + guests: [ + { + name: 'Joe Consorti', + profile_picture: 'https://pbs.twimg.com/profile_images/1596902707511664640/GYGWVDts_400x400.jpg', + ref_id: '8d2024b2-03bb-454d-9bd6-bb121904b76a', + twitter_handle: 'JoeConsorti', + }, + { + name: 'Max Gagliardi', + profile_picture: 'https://pbs.twimg.com/profile_images/1607930248301010944/2HRR14Fm_400x400.jpg', + ref_id: '30de157e-f240-40a2-8048-bc2b39efef86', + twitter_handle: 'max_gagliardi', + }, + { + name: 'Texas Slim', + profile_picture: 'https://pbs.twimg.com/profile_images/1589784780970795011/02jf0fqp_400x400.jpg', + ref_id: 'b4448c8e-9238-4aba-bd25-efb329ea5a72', + twitter_handle: 'modernTman', + }, + ], + hosts: [ + { + name: 'Ben Perrin', + profile_picture: 'https://pbs.twimg.com/profile_images/1181715113226596352/ipGVEcYH_400x400.jpg', + ref_id: 'e6b013ef-178b-4b41-95ee-423148a3dc3a', + twitter_handle: 'profbenperrin', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/419512c2-e309-4b25-bfe2-cd481d53f66d.jpg', + keyword: !0, + link: 'https://anchor.fm/s/11e95d20/podcast/play/63800208/https%253A%252F%252Fd3ctxlq1ktw2nl.cloudfront.net%252Fstaging%252F2023-0-21%252F308565129-44100-2-d4a2c0e1b4223.mp3', + node_type: 'clip', + pub_key: '037f7331a5bef6c6f880246747befcc3767f3bb9730bc5e6f7c3770f4184ed0bff', + ref_id: '0886e428-dab9-4882-9479-e2f64b5ed145', + show_title: 'BTC Sessions', + text: "Yeah, I love that. I'll echo what Joe said. I think in particular what you said, the idea of educating new up and coming ranchers is so key and creating those relationships. I'll tag in here and say that because of what I saw you guys were doing. It got me curious about, Jeez, I should try and find somebody in Canada because I'm in Alberta. There's got to be somebody. I went to the website. There wasn't anybody yet in Canada that was on the beef initiative, but I still was curious. So I tweeted out and they said, hey, is there a cattle rancher somewhere in Alberta that might be interested in selling beef for bitcoin? Not three minutes later from somebody and my freezer, I could tell you right now, is stalked. Me and my friend both split. We bought half a cow together, filled our freezers, and we paid him bitcoin. And so now he's my guy. And I had a couple of little minute steaks before we came on this show. But yeah, again, I think it's so valuable creating those communities and forging those connections with the people around you. Not just in the sense of the beef initiative, but I think it's forging the way for people to be thinking in those lines. And so I've kind of made it my mission this year to start hitting the local meetup as often as possible. And I'm really pushing for the local meetup. And they've already said that they're happy to do this. But at the beginning of every single meet up, we're going to take five minutes for anybody to get up and say, hey, I've got a business, or I create something, or I do something, offer service, and I'm willing to accept bitcoin for it. Or inversely, somebody to get up and say, hey, I'm moving to a bitcoin standard. I'm looking for the following services or goods. Can anybody, if you guys don't directly do that, or do you know of people in your circles of friends? And like, when you get even a small meet up, when you start playing six degrees of Kevin Bacon in that small group of people, you can connect to a lot of people and you'd be surprised what you can find. Just. By making it known that you're looking for it. People come out of the woodwork and they're passionate. And so you don't need the grocery store to accept bitcoin. You need local people that you create genuine connections to to accept bitcoin. And you are on a bitcoin standard. You are a self sovereign. You've built a community. And yes, we can be sovereign individuals, but we can be sovereign communities as well. I mean, that's what's happening. You're right. It's not a numbers game, man. I always tell everybody it's one handshake, one rancher, one cow, one family at a time. And everything that you just said comes along with that one handshake. So at these bitcoin meetups, I tell everybody, hey, you guys go find a rancher and don't even tell them about bitcoin. Say, would you feed us at our gathering? It leads into bitcoin, man. Go get him to feed you. Ask him to feed you. Say, hey, man, we want some steaks, we want some barbecue, we want some burgers, whatever it is that he wants to provide. And guess what? You're letting him educate why he does what he does and then the conversation always goes into bitcoin, man. We don't have to be used car salesman to try to onboard these ranchers. All we have to do is go, hey, man, would you educate me a little bit about why you do what you do and would you come feed us? And then boom, it happens. Every one of them gets on board and everyone wants to know more, they want to feed you more. And all of a sudden, just like you, your freezer is full. That's how it starts. It's perfect. And we need a day, a microsumit or a summit in Canada. I'm just saying Calgary is the place to come to. I think that's what we need to shoot for you. We've talked about it a couple of times, but they have the stampede. They have all that kind of stuff up in Calgary. It'd be pretty badass. We do. I'd love to have you here. If you do come up too, I'll take you for a hike in the mountains. We can go check it out. It's a beautiful area. ", + timestamp: '01:29:25-01:34:11', + topics: ['circular economy', 'ranchers'], + type: 'podcast', + weight: 21.881644866366297, + }, + { + boost: 0, + date: 1590465600, + description: 'Looking Forward on Bitcoin dominated world', + episode_title: + 'Chat 39 - Bitcoin Renaissance - with Marty Bent John Vallis Alex Gladstein Elizabeth Prefontaine Brady Swenson', + guests: [ + { + name: 'Alex Gladstein', + profile_picture: 'https://pbs.twimg.com/profile_images/1382371620669452292/VOPKOc8w_400x400.jpg', + ref_id: '49445c1c-7c66-4b73-9eec-09a337befbec', + twitter_handle: 'gladstein', + }, + { + name: 'Marty Bent', + profile_picture: 'https://pbs.twimg.com/profile_images/1362747135981199370/mSy97J12_400x400.jpg', + ref_id: '655bdcb1-21c3-411c-aa24-fe7e4c7a248c', + twitter_handle: 'MartyBent', + }, + { + name: 'John Vallis', + profile_picture: 'https://pbs.twimg.com/profile_images/1568743166035070976/4MyKww8A_400x400.jpg', + ref_id: 'c3a9fe29-3b78-4665-af54-e293e9d68962', + twitter_handle: 'johnkvallis', + }, + { + name: '& Brady Swenson', + profile_picture: '', + ref_id: '0b68a085-0680-44b8-891c-6e1e84ac4eb1', + twitter_handle: '', + }, + { + name: 'Elizabeth Prefontaine', + profile_picture: 'https://pbs.twimg.com/profile_images/1382790711427354625/D09LMToL_400x400.jpg', + ref_id: '4506df72-5de4-4144-abc4-011408b6b496', + twitter_handle: 'Eprefon', + }, + ], + hosts: [], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/9e7e229f-2631-4542-b5d7-7fcd502798dc.jpg', + keyword: !0, + link: 'https://traffic.megaphone.fm/CSN4002307424.mp3?updated=1627951379', + node_type: 'clip', + pub_key: '', + ref_id: '307ee148-c00d-4195-b815-bee1f45abe5d', + show_title: 'Bitcoin Audible', + text: "just wondering, this is the bitcoin renaissance discussion that we're having. I'm wondering, aside from, let's say, your own personal wealth number go up, what is it about how you envision a future in which bitcoin is increasingly used or a bitcoin denominated world? What is it that kind of pulls you forward the most, that motivates you the most, that gets you the most excited about the prospects of a world like that? So, guy, I'll give it to you first. Independence. Just the idea. Like our increasingly interconnected world, this kind of goes in line with Marty's, we have two paths kind of thing, and it's something I talk about all the time on the show, is that the more connected we are in the digital era, the less independence we kind of naturally have. It kind of flips the dynamics of the physical world, both in the privacy sense and in the like, we are individual sense on its head. And it kind of makes the individualism the thing that we have to go reach and find, and privacy the thing that we have to go reach and find. Whereas it's the default in the physical. We are individuals. Our life is private unless we go outside and we yell to the world what the hell we're doing in our bathroom, you know? And I think the fact that there's the ability to build systems which can finally extend that into the digital era where we have privacy. Hopefully. Like. Fingers crossed by default. Where we have that which is truly ours in the digital space as it becomes more and more part of our lives. As we start going to conferences in VR. And even though we are so much more connected. We can still retain that which makes us who we are as individuals. I think every technology that incrementally pushes us closer to that is significant, no matter how small. And I think Bitcoin is the biggest step in that direction, as we have had since the birth of the Internet. I just want people to get out of the rat race, like doing jobs they don't like, to sustain a system that they don't understand, and it's only sustainable via consumerism and conspicuous consumption. There's a lot of people out there struggling, working paycheck to paycheck, wondering why they can't ever get out of a state of just treading water or sinking even. So, I hope the ability provided by sound monetary system and digital age to accumulate capital, save money to open up your time so that you can do other productive things, is what encourages me the most, is getting people out of the rat race. And instead of thinking about their next paycheck, thinking about something creative that they can provide to the world. Ready for me. Intrinsically, it's my kids, their kids future. Hope for them, hope for a better future, and then extrinsically. Yeah, just human potential being realized on a massive scale. Beautiful art and architecture and projects, people being able to pursue their dreams, their artisan, reperfecting it. And. Imagine a million people that are not dedicating their lives to creating strange financial products, just for one little example, and being able to dedicate it to something they're really passionate about that benefits the world, not just growing some middleman industry. So, yeah, a better future for my kids and for humanity. Alex? Yeah, I spoke about this in the keynote I gave for Bitcoin magazine having a celebration. But I think there's this really interesting trend in humans where by on the one hand, we have a drift towards authoritarianism, and that's kind of where it all began. And that force is super strong in our societies and in the way we organize ourselves. But over time, humans have created technology to fight that and to liberate one another. And that's just an amazing quality of humanity. So we started with governance and we started with collecting these, for example. And I know there are many other practitioners of what we now call democracy that were happening simultaneously around the world, in Latin America, Africa, Asia. But just to use Clste as the example, 2500 years ago, he came up with the idea that we should be ruled by rules and not by rulers. And of course, he was one of the elites in ancient Greece. And the other elites were like, you're crazy. And they chased him out. They were like, get out of here. We want the power for ourselves. But he came back and he managed to sort of start to implement this idea and over time, this more meritocratic, more democratic way of governing sort of took root. And humans have continued to just chip away at that, despite the fact that those in power are giving up what they have in order to achieve it. It's a very interesting, very kind of inspiring trend in history. But over time now, we have half the world living under more or less an open government where the people can kind of replace the rulers and there's lots of checks and balances and there's special interests, but there's also free press and there's the business community and the government. Everybody's kind of competing and balancing each other out and that's really healthy for society. And then you had the information movement where it used to be very closed and centralized and you had to be elite or wealthy to access the riches of the library of Alexandria, or to become knowledgeable. You had to have a certain class structure or you had to have certain permissions. Right now, today, everybody's got, thanks to the printing press, and then later the radio, the TV and the internet, everybody's got the ability to learn about everything and also to have their voice, this incredibly powerful, progressive trend in history. So you have the opening of government and the opening of information. And I think that bitcoin is the opening of money, which is like the third piece of this trinity. And they all kind of like interact with each other, they all amplify each other. So we're just now able to get to the third part through Satoshi's invention, but it wasn't possible before. But now we have the opening of money and we have the separation of money from state, which is beginning. And I really think that future societies that have all three are going to lead the world in terms of happiness, productivity, human thriving, et cetera. I think you're going to have societies that have one of the three or two of the three, but really the goal will be to have all three. And I think they'll work very beautifully. I love that my answer is probably a synthesis of the ones that you all gave, but for me, it's always been about freedom. I fundamentally believe in what this experience we're having as human beings on earth is. And I'm extremely curious what manifests when we become ever freer to have unrestricted access to joy, education, curiosity, love, beauty, expression, innovation, all of these things, like, what is our potential in a seemingly infinite universe? And I think the more we unshackle ourselves from everything that holds us back, whether they be internal or external, the more able we are to explore that potential. And it excites me just saying that, because I know it's a journey and perhaps a never ending one, but I'm excited by the prospects of bitcoin because I think it's an extremely powerful tool in helping to further us down that pathway and maybe even bring the timeline forward in a very powerful way. ", + timestamp: '01:23:22-01:32:00', + topics: [], + type: 'podcast', + weight: 3.8546091318130493, + }, + { + boost: 0, + date: null, + description: 'What is an Oracle and how does it work', + episode_title: 'Bitcoin Backed Stablecoin’s', + guests: [ + { + name: 'Andrew Begin', + profile_picture: 'https://pbs.twimg.com/profile_images/1461826323102449665/spEoEcpR_400x400.jpg', + ref_id: '28db7b9d-1c71-4981-8044-baf001e58b94', + twitter_handle: 'agbegin', + }, + { + name: 'Yago', + profile_picture: 'https://pbs.twimg.com/profile_images/1369335486456684546/AIJdrQ5l_400x400.jpg', + ref_id: '0819a9d1-c085-42d5-8b3b-bc3ce79ff1ea', + twitter_handle: 'EdanYago', + }, + { + name: 'Sovereign Horizon', + profile_picture: 'https://pbs.twimg.com/profile_images/1604168916300873731/mLszGVm6_400x400.jpg', + ref_id: '6c159904-fe63-437e-91b5-5c444bbd11fa', + twitter_handle: 'SovereignHRZN', + }, + { + name: 'Art of Thomas', + profile_picture: 'https://pbs.twimg.com/profile_images/1547047357371797504/avnHBa2W_400x400.jpg', + ref_id: '2c312138-9a5f-4a75-9c19-513d5703d5ce', + twitter_handle: 'TheArtOfTomas', + }, + { + name: 'Maximiliano Carjuzaa', + profile_picture: 'https://pbs.twimg.com/profile_images/1566622024662917120/B6uyn9QR_400x400.jpg', + ref_id: 'a5273c83-28f1-4df3-b8c6-d3b081f55b31', + twitter_handle: 'maxcarjuzaa', + }, + ], + hosts: [ + { + name: 'Alexandria The Great', + profile_picture: 'https://pbs.twimg.com/profile_images/1575525599493427203/XubWEoDX_400x400.jpg', + ref_id: '0c977f79-ed3c-46e9-8363-6c6c519d014a', + twitter_handle: 'alesander97', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/046c6869-0627-4825-8ecf-45ff0aed97b6.jpg', + keyword: !0, + link: 'https://stakwork-uploads.s3.amazonaws.com/uploads/customers/2707/media_to_local/5e4a506b-0534-4217-b682-b568f6212b73/2b4c8ed5-a7cc-43df-95f1-0d75e2c886ab.mp3', + node_type: 'clip', + pub_key: '', + ref_id: 'baa7169a-4b3a-462c-bcb5-03a34d1a41f1', + show_title: 'Alexandria The Great 🌋⛏🇿🇼', + text: "that is a very interesting question because we are definitely using an oracle, but I will explain how it works. That is one of the biggest challenges in creating decentralized protocol. When we started working designing the protocol, we first focus on the tablecon protocol and then we launched the protocol using a centralized oracle because in that day the standard was maker diode had lunch in like six or seven months before us. So we thought, well, if the market accept a centralized oracle, we can start doing the same for a while. So we launched the protocol using a centralized oracle and we start working on a decentralized oracle and we create. First. Prototype of a truly decentralized protocol. I strongly believe that we have to go further with our oracles, but I also know that we have the best oracles out there. Why we have the best oracles out there? Well, because in order for you to be able to run a price feeder for the oracle, you have to take MOC token first and you have to be in the top ten MOC stakeholders. So you are going to have a lot of money at risk because if you cheat, basically what you are doing is you are making people lose faith in the protocol and the money will go away from the protocol. Turning your MOC token basically useless. So the first thing is that you have to have a lot of stakes on the protocol to be able to run an old, but that is not enough. We have an ebrid protocol for the oracle, some. Of the protocol runs of chain and some part of the protocol run on chain. So there is lottery every block and one of ten node operation is chosen. And that node operator is the one in charge to record the price. But in order to record the price, he has to have the approval of at least five more nodes operator. So in order to get the approval for the other five node operator, they have to query the price of Bitcoin in the five biggest exchange trading USD against Bitcoin, not USD, not USDC, USD against Bitcoin. And then you have to make some mathematic with that number to reach the true value of Bitcoin. And then you have to ask for the other node operator to sign your transaction. And once you have your transaction signed for at least five operations, then you can record the price of Bitcoin on chain. So what I said, this is an alpha prototype version of the Oracles. Well, because we have just ten nodes, we don't have 200 nodes. And why we have only just ten nodes? Well, because of restriction in the way signs are stored on the blockchain, if you have 200 nodes operator and you have to get 100 signs, then the transaction will be very big and very costly. Of course, there are techniques that can solve the problems that I hope we are going to implement in the near future. So from a practical perspective, sovereign community has talked quite a lot about the Oracle problem. And I think there's, while I think it will always remain a problem, I don't believe it is a very serious problem. It's a problem which is relatively easy to overcome in a practical sense. And one way that it can be overcome is what Max just described, which is having more and more robust and more and more decentralized or federated Oracle. A second way in which it is overcome by protocols that actually consume this data is by having multiple different Oracle systems that they use. And then you're not just using one federated or decentralized Oracle, you're using an assortment of them and you're able to observe if there are outliers or if one is misbehaving. And then the third, and this is I think ultimately the most important, is you can also observe organic price feeds that are unchanged. So when you start having trading occur on decentralized exchanges, a price emerges and this price gets arbed away quite efficiently, because arbitrage traders can make profit from any difference in price between the real price and the price on the exchange, or rather I would say the endogenous price and the exogenous price, the price outside. And so with strong volume, or even with relatively light volume, because arbitrage is so profitable, you get very robust pricing. And so one of the things that Sovereign does with its decks is it uses it as effectively a price feed as well. So while the Oracle problem is always going to be a problem because you always have to have sort of like this external piece of information that's not in the blockchain. Right? If what you're trying to pick to is the dollar, as more and more assets and more and more of the economy becomes blockchain native, it reduces that problem. But even now if you're careful and use a robust set of mechanisms to make sure that your price feed is accurate both on chain and off chain, both Federated and decentralized, then in practice the vulnerability of the space for exploits is quite small. And we can see this because there have been many exploits in the crypto space. Most of them, or very few of them were through the means of exploiting articles. Go ahead, you first. Yeah, I just want to say it was really interesting hearing from you both. I guess I would like to just put out a reminder that when you try to take something to something in the real world like Bitcoin in and of itself, like a lot of people forget this, like one BTC is in and of itself valuable because of the strength of the network. It's not linked to anything. Some can argue that it's linked to the electricity that is used to produce it, but in and of itself it's valuable because of the network. Right, so that's a good point. You have to have something that can actually maintain the peg and it's interesting that you want to use a more centralized Oracle. I assume the goal is mass adoption. Right. So using a more centralized Oracle, do you fair about that? It's sort of an attack vector because I mean your goal I assume is to have a permissionless stable coin. But if it's somewhat centralized then doesn't that fit the purpose? I completely agree with you. I don't like Federated Oracles. That is why the money in China Oracle is not Federated. There is a competition between people trying to run an old and I don't feel like on chain volume, merchant price or on chain transaction are valuable today because they are highly manipulated and there are plenty of attacks in the defy world manipulating on transactions. So I think that I don't know if we are going to see a day where we can trust the price of the centralized exchange, but I definitely think that today you cannot trust in the price of a decentralized exchange because it's very easy to manipulate especially with advanced protocols like Ave and flash loans out there. You cannot trust on chain volume. ", + timestamp: '00:40:14-00:50:23', + topics: ['Oracle', 'oracles'], + type: 'twitter_space', + weight: 3.8546091318130493, + }, + { + boost: 0, + date: 1671116162, + description: "Highest priority on Preston Pysh's and Dr. Jeff Ross' radar", + episode_title: 'Café ₿: MacroStrategy w/ Foss, Lepard, Lavish, Dr.Jeff, Pysh', + guests: [ + { + name: 'Dr. Jeff Ross', + profile_picture: 'https://pbs.twimg.com/profile_images/1475554600094552064/DSlPG1lx_400x400.jpg', + ref_id: '51a969bb-dbf7-4d20-b128-74dcc5f560f6', + twitter_handle: 'VailshireCap', + }, + { + name: 'James Lavish', + profile_picture: 'https://pbs.twimg.com/profile_images/1466279082157502464/flD6cWI3_400x400.jpg', + ref_id: 'cf06ab2d-2ff3-4d7b-bef6-b996ae68517a', + twitter_handle: 'jameslavish', + }, + { + name: 'Lawrence Lepard', + profile_picture: 'https://pbs.twimg.com/profile_images/1114275000889032704/mOUsG1XC_400x400.png', + ref_id: '0452f07a-5ee6-447d-901b-d96fe2c51324', + twitter_handle: 'LawrenceLepard', + }, + { + name: 'Preston Pysh', + profile_picture: 'https://pbs.twimg.com/profile_images/1408783276081299462/f4Ye5n7-_400x400.jpg', + ref_id: '01ad2c81-2d0c-44a9-93a1-42c07287aa80', + twitter_handle: 'PrestonPysh', + }, + { + name: 'Greg Foss', + profile_picture: 'https://pbs.twimg.com/profile_images/1552599670945464320/3OgqRHNo_400x400.jpg', + ref_id: '853d9f80-f6cf-490f-9d1e-f29cdc6acc6f', + twitter_handle: 'FossGregfoss', + }, + ], + hosts: [ + { + name: 'Alex Stanczyk', + profile_picture: 'https://pbs.twimg.com/profile_images/1539055022364708864/rwErK6x1_400x400.jpg', + ref_id: '3126e2a3-bbe4-456b-b298-9714085fa286', + twitter_handle: 'alexstanczyk', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/239722cb-4216-414a-a17b-5adf9d52e15a.jpg', + keyword: !0, + link: 'https://stakwork-uploads.s3.amazonaws.com/uploads/customers/2707/media_to_local/d6d54b80-b92d-4611-a490-b4e3605f7ae9/bce474b2-d95d-4867-8ec0-392a9b1efd42.mp3', + node_type: 'clip', + pub_key: '02574d6e8e787372184b6f17c40d6c6fe1777db9015801f95dfd24692784d767cd', + ref_id: '15e10126-3ca8-461d-bb9d-d412b8333b32', + show_title: 'Swan.com', + text: "if I understand correctly, was a former pilot in the United States military. So what is the highest priority object on your radar, Preston? Highest priority back to like what Greg was saying with the Vics and stuff. Yeah. So when we do macro strategy, I was going around asking everybody what they think is the most important thing going on. What are you keeping track of that's concerning to you or what do you find fascinating or what's the most important macro issue on your radar? I don't find anything concerning. I find all of this to be a massive opportunity. I'm with Greg. I think the VIX is really important. I watch what the dollar is doing pretty closely. The global M two numbers which are highly correlated to the performance of the dollar itself. I've said before that it's pretty much a bitcoin versus dollar kind of world. And when you look at why I think we've had a bit of a breather and why you've had a bit of a bounce in equities and why you're seeing the VIX compress the way it is, I really think that because you've seen Dollar weakness for, I don't know, what, two months now. I think that's what's kind of put that little small bounce in the markets that makes it look like it's potentially going to reverse itself. And it's just like Jeff said, a total trap door moment. As long as you have negative spreads between inflation around the world and the interest rates, this pressure is this feeling of like everything kind of falling apart in the markets is not going to disappear. That's the thing that's driving all this because it's just one giant economic calculation that starts with the foundation of inflation. And if you can't out hurdle inflation, the math does not work. Right. So I'm looking at that, obviously, is that negative spread. I'm looking at the short duration versus long duration, which Jeff also addressed. And he's exactly right when it comes to banks and their ability to make money, the way that they can assure that is through the duration, the short duration versus the long duration and making sure it's a positively sloped curve. And right now you don't have that around the world. So, like, all these things are super important for people to really kind of understand why we're seeing what we're seeing. And it's going to have to resolve because as this credit gets impaired, it's only going to get more impaired until it resolves itself and they're going to have to step in with, just like Larry said, unbound amounts of printing. So I don't really place one of those things that I mentioned higher than the other. I think that they're all kind of interconnected and equally important to kind of be able to wrap your head around and for people that aren't intimately familiar with macro or some of the terminology. I can understand how that just sounds like a bunch of garbage, but I would just say that if I was going to simply describe it, think of like, you're in a lazy river and you're trying to go against the current. The current speeding up. It's getting harder for people just to retain their spot in the lazy river. Instead, they're starting to get pulled with the current, and that current is speeding up. And so it's really hard for somebody when you think of like a profitable business and somebody who's able to outperform in that environment to actually move up current like a fish. There's not too much of that happening in this environment. So that's how I would describe all the goblin gook that I said up front. And if I was going to put it in like a visual for everybody to really understand, I would describe it the way I did there at the end. And you guys want to respond to that? All right, let's go to Jeff Ross. Most important object on your radar right now? Well, I think I just covered it, so I don't want to take over and just repeat everything. But I think I think the most important thing besides I think volatility is important. I think well, lots of things are important, but to me, the most important sign is that the front end of the yield curve is now fully inverted. That just suggests to me that the trap has been set and that something is now we're just waiting for something to happen and for something to break. So just get ready for the floor dropout moment. All right, let's open it up. If you're in the audience and you want to come up here and ask questions of these guys, raise your hand. We'll bring you up. We'll be kind of I promise. If you want to ask questions in text, you can do that in our Telegram group. That's TM me. I'm sorry. It's? What is it, Jacob? I'm like forgetting it right now. Tmecafelinkler. While we're waiting for questions, Alex, I want to build on Dr. Jeff's excellent point. This is perhaps lost on a lot of people that when you are now shorting bonds, you are paid positive carry because overnight or repo is set off of fed funds, and every other point on the curve is below fed funds. That in itself leads to enormous stresses in the system. Okay, I know it's not second nature for people to understand that, but that is a dynamic that has very rarely existed all across the yield curve in the USA for a sustained amount of time. And that's why we're pushing up count the daily average not daily average, the daily time limits that the curve is inverted that Jeff is looking at and that is assigned. The pressure is building and building and building until something breaks. So the easiest thing that the Fed can control is the short end of the curve. And right now they have it like a coiled spring. Okay. Everything else in the market is coiled against the short term interest rates at the Fed, such that if you short the treasury bonds, you're paid overnight to do it. Wow, that's sort of cool. People need to understand that they're paying a short term they're making shortterm decisions at a long term expense. Right. The shortterm decision is, let's keep raising rates so we can suppress inflation and try to get it under control. The expense they're going to pay in the long run is they're and I sound like a broken record, but they're going to destroy supply chains and make the next round worse because the inflation isn't going to come in at seven or 8% on the next round. It's going to come in at like twelve or 15%. So that's the price. Right. They're making a short term decision at a long term expense. And they've been doing this continually for like 40 years. Right. So it's just building and building and coiling and coiling and so nobody should be surprised in the coming three to five years when this scenario plays out. That's pretty spooky. ", + timestamp: '01:41:29-01:49:09', + topics: ['Preston Pysh', 'Dr. Jeff Ross'], + type: 'twitter_space', + weight: 7.955174819771106, + }, + { + boost: 0, + date: 1593259200, + description: 'Gut health and GI track ', + episode_title: 'Episode 112: Mental Health And Metabolism: Autism, Depression And Your Small Intestine', + guests: [], + hosts: [], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/e8ad867b-9cbe-4126-9f37-313b4d2329a5.jpg', + keyword: !0, + link: 'https://www.buzzsprout.com/482971/4336655-episode-112-mental-health-and-metabolism-autism-depression-and-your-small-intestine.mp3', + node_type: 'clip', + pub_key: '032d7609ff3f4a5232e4d60967971e23bc671dfb68020845a59bab5dc1f3b93b87', + ref_id: '47586bfe-8c83-4281-96b8-c9e0dc0a3ba3', + show_title: 'Dr Karl Goldkamp - Keto Naturopath', + text: "So today I would like to talk primarily about our guts and where do we get the justification that based on our GI tract, our gastrointestinal tract, from stomach to small intestine to large intestine, and we're going to leave it at that, and we know we'll get into it, that this does have some relevance? Can you base everything on it? I can leave that up to you. It's not a question that I feel I have to answer. So I think it's relevant to have a working knowledge, working common knowledge. It doesn't have to be so esoteric. You don't need to be an anthropologist. You don't need to be an archaeologist. You don't even need to be a medical doctor. In fact, I wish most medical doctors would know what we're going to talk about. And a good portion of the information that I have comes from a talk that I attended by Doctor Anchildders. She's a doctor in the Northwest. She's a diabetic, as well as being a psychiatrist, a child adolescent adult psychiatrist, which is really pretty interesting. One of the talks that I attended that she spoke at, she made a reference to animals, and she was very big into and is very much into her dogs and dogs and the diets of dogs. I'm going to get to that a little later. But it was very similar to shared with you about the nephrologist, the kidney doctor who talked about her cats that they had, and it was how they were getting sick and couldn't digest things properly on a processed food diet, otherwise known as cat food diet. And finally she gave up and just started giving them raw meat. And cats are obligate carnivores. And so gave them meat, chicken, fish, and so on, and everything became right then. They're great, happy cats now. Well, a similar story that I'll share with you later is also going to be about dogs. Even though dogs are not considered obligate carnivores, they're considered a little more omnivorous, and that's sort of up in the air, meaning perhaps they are obligate carnivores. So we're going to look at the gastrointestinal tract comparative differences and similarities to see if that speaks to the kind of diets that we have. That's going to be one vein that we're going to talk about today. And we're going to go off a few other offshoots of a little into autism, a little into mental disorders, because it's all related. I think she's a fascinating woman sorry, a fascinating doctor to listen to that she presents from, just like you remember, Dr. Christopher Palmer came from the idea of mental disorders. And he referred to, and I've referred to subsequently a number of times that Dr. Nora Lolkov, who is the head of the addiction agency, us. Addiction Agency, and how they're now starting to study the ketogenic diet for its effect on mental disorders. So there's a big circle here that we're going to be talking about. Okay, ", + timestamp: '00:03:30-00:06:49', + topics: ['Gut health', 'GI track', 'anthropologist'], + type: 'podcast', + weight: 3.8545703887939453, + }, + { + boost: 0, + date: 1625958277, + description: + 'The characteristic and culture of Bitcoiners and Bitcoin maximalists communities, putting a premium on reputation', + episode_title: 'WHY ARE WE BULLISH? Brandon Quittem, Timothy Kim, Shinobi, Steve Barbour ep185', + guests: [ + { + name: 'Brandon Quittem', + profile_picture: 'https://pbs.twimg.com/profile_images/1502403738861940736/9J5VuTye_400x400.jpg', + ref_id: '65512044-7810-4ece-8156-5519e072cb66', + twitter_handle: 'Bquittem', + }, + { + name: 'Shinobi', + profile_picture: 'https://pbs.twimg.com/profile_images/1526590501742428160/0Y5H2uJK_400x400.jpg', + ref_id: 'a05dface-33a7-400d-a749-99efe0d96118', + twitter_handle: 'shinobi602', + }, + { + name: 'Steve Barbour', + profile_picture: 'https://pbs.twimg.com/profile_images/1592714173469065216/q8kXPyQI_400x400.jpg', + ref_id: '63a731b8-4759-4360-9e9d-d66f884e12d8', + twitter_handle: 'SGBarbour', + }, + { + name: 'Timothy Kim', + profile_picture: 'https://pbs.twimg.com/profile_images/1569681307029934081/2s_nWYo__400x400.jpg', + ref_id: 'e0323798-c70f-4cc3-96ff-87bab50c2313', + twitter_handle: 'realtimothykim', + }, + ], + hosts: [ + { + name: 'Ben Perrin', + profile_picture: 'https://pbs.twimg.com/profile_images/1181715113226596352/ipGVEcYH_400x400.jpg', + ref_id: 'e6b013ef-178b-4b41-95ee-423148a3dc3a', + twitter_handle: 'profbenperrin', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/419512c2-e309-4b25-bfe2-cd481d53f66d.jpg', + keyword: !0, + link: 'https://anchor.fm/s/11e95d20/podcast/play/37027401/https%253A%252F%252Fd3ctxlq1ktw2nl.cloudfront.net%252Fstaging%252F2021-6-10%252Ffb6d5638-4579-5707-9740-0e586c980ba7.mp3', + node_type: 'clip', + pub_key: '037f7331a5bef6c6f880246747befcc3767f3bb9730bc5e6f7c3770f4184ed0bff', + ref_id: '00f5cd32-cb12-4c4c-979a-ed45445a103e', + show_title: 'BTC Sessions', + text: "voters. I have a question, Shinobi. Do you think that I know we're kind of going down a little bit of a detour here, but in regards to I guess it applies in regards to breedlove or in regards to politicians or whatever if somebody messes up, do you think? Because right now, yeah, sure, the whole bit clout debacle and dude has more followers than he's ever had and so and so forth, do you think that's just a symptom of less? Like only a small percentage of people actually being in tune with bitcoin and kind of the incentives, it aligns and that shifts over time where people begin to kind of align with that low time preference ethos and eventually expect more of people and that has more of an actual impact on their actions moving forward? Or do you think that's just like a forever symptom of people just don't give a shit and they're not going to look deep enough to care? I think we're in our eternal September and I do think the amount of people in just pure numbers who actually start to go deeper down the hole think more about time preference and to what degree or what bar they hold other people, that number will grow. But percentage wise versus the people who don't give a shit, no, it's probably just going to keep shrinking and that's just a fundamental thing here. That's all it comes down to. Even personally speaking, I don't give a shit about people dumping a shit coin or trading a shit coin. Have at it. Just don't sit here and try to bullshit me about what you're fucking doing. You're dumping a shit coin to get more bitcoin. Own it. Yeah, I think the major point here is that the immune system of bitcoin, the toxicity, the way we police each other, et cetera, that's very important in the beginning with any community. You have to establish norms and ways to go about things and whatever. But at a certain point back to its eternal September, right, the new entrants outnumber the ideologically motivated people in the beginning that are incubating. And that has to happen for bitcoin to succeed. So our job is to just simply provide cover fire so that bitcoin can get through the door. We're trying to incubate this thing so it becomes too big to fail and then necessarily it must outgrow us at some point. And so there's going to be that tension point, like are we too big to fail now? Should we relax a little bit or do we need to stay vigilant for another period of time? And I don't know the answer to these questions, but if Bitcoin can't accept way more new users that aren't ideologically aligned, then Bitcoin failed from the beginning. Yeah, absolutely. And old breed love, he didn't really turn on Bitcoin like, some guys in the past, like Mr. Roger Verte and others. I don't think it's even in the same conversation. I never even liked that. I ignored all the dramas. Like, man, the guy guy's doing what he's doing. He's not directly I don't want to go into that conversation, but to me, it was like, okay, I'm also a big Sony Maxie. I'm also like, Dude, that's sort of gay. That's like an old saying. It's sort of, like, ridiculous. It's like, whatever. Who cares? Whatever. He's not out there scamming. Or maybe some people disagree, but it's this simple. Just own it. Yes, just own it. Just own it. This is the one thing I said, don't act like you're the first person to dump a shit coin block. I wanted to create my own Fiat called Soy Coin. Like, Steve owes you coins and like, just like, you give me your bitcoin, you give me all your bitcoin, I'll custody and I'll give you my Fiat and you can redeem your Fiat for my coins. And I consider myself a bitcoin like Maxi, Maxis, Maxi. That's what I think of myself. And I thought it was a great idea because I know I wouldn't fuck anyone, I wouldn't steal your coins. But I was joking about it online and people are ripping into me. I'm like, well, it's not even a bad idea in some context. It's in some situations, custodial options in certain situations are a good idea, but people are so quick to just, like, narrow vision, censorship, resistance, like, run your own Node, like all the memes hoddle stacks at. And when you go against it, it doesn't mean you're not a Bitcoin. Maxi is just like, chill sometimes, you know? I do like the implications of the interim as, like, in the context of what Brandon is talking about and politicians coming into the fray. And I do like that, given it's still so niche. There's that immediate pushback when you start seeing dumb shit, right? Like, if you're a politician, I love. It when people say something dumb, like, online, and you get trashed by your fellow Bitcoin guys. Like bitcoin people. It's a good thing. Yeah, it's a very good thing. Yeah, 100%. And I like the idea of because there was a guy from it doesn't. Happen anywhere else, man. It doesn't happen anywhere else. You could be in any other industry and people don't call you out. It's all about political correctness. There's no, like, just straight to the point. Like, be real, be truthful, be honest. And if you don't be honest, I think it's a really good thing. We literally told the richest man on the planet to go fuck himself and sell all his coins. So, like, the president has said, it. Doesn'T matter if callers had an amazing reply to Elon. Peter McCormack, like, in that little timeframe where Elon was being a weirdo with bitcoin, is that what you're talking about? Was that we were referring to where, like, Jack wreck them? I'm not sure about that. What was that one? Were you on turn on bitcoin about being dirty and then, like, Jack wrecked him on Twitter with all these reasons why, like, you're a fraud. It was, like, the best thing I've ever seen in my life. We all said, Go fuck yourself. Jack boiled down why Elon was actually a fucking idiot. Yeah, and I like that idea of because, like, politicians are used to, okay, I'm elected and then I get my term and whatever. And then I can just kind of like when it comes around to election time again, then I can start putting out the sound bites and sounding good. But bitcoin is like, they still how long ago was SegWit two X? And anybody involved in pushing that is like, as soon as they say anything, it's like, fuck you, man. What you tried to do was not okay. And so I feel like that seems. It'S only the people that didn't own it at all that are still getting shit. Because, like, anyone that owned it I don't know, was it the guy from Zappo or, like, one of the guys that were pushing it then? He owned it later. He's totally forgiven it's. Like, fine, you just got to own it. Right? Exactly. Fucking publicly apologize. One of the only fucking ones. And for that he's fucking badass in my book. Because that takes such a big person to do something like that. We're so used to people never, like, owning anything. I don't know what I love about the bitcoin space because I'm tied to the oil field and I'm tied to the bitcoin space. And I'm, like, sort of equally tied because I'm, like, on both ends of the spectrum. Like, in oil field, like, all these Fiat Maxi missions, fucking Nazis are like, saying, this is the way it's got to be. You're bad. You're bad for doing your business. You have to pay us a penalty. And it's ridiculous, this carbon tax stuff. And none of the oil companies, none of the people in the oil field are, like, making a platform of standing up against these people. But at least what I see in bitcoin, like, Marty Bent's, a big voice. There's other people in the bitcoin space that are big voices that are standing up against the bullshit. And you don't see that in normal industries because everyone is trying to be politically correct. But bitcoin people don't give a fuck about that because most of them, like, real bitcoiners are, like, self sovereign individuals. They don't care about being canceled. They don't care about, like, what anyone else thinks of them. I really have a hope that this is going to grow well, I'm seeing it grow. Like, I'm seeing Bitcoin penetrate the oil and get, like, the energy industries and the oil and gas. And so this is another bullish topic, but like, it's penetrating these industries, and I think it's going to change them. Like, I think it's going to change in big time. I'm out on LinkedIn trolling people, telling them to stop your bullshit. People don't normally see that kind of thing on LinkedIn because I just think it's necessary. Bitcoin maxis are considered almost like extreme intolerant individuals over bullshit. And I think it's going to permeate as it continues to be a factor in society. Like bitcoin continues to be a factor in society. I think there's an important point you made there. And regarding the bitcoin community, I think of it like a sports team or a fraternity or any type of organization, even a company who has the same mission or same goal, and we all align to this baseline value. So we may have very different personal lives or interests or whatever, but that sports team feel is important, right? Getting your ass kicked every day in practice is why you win games. And so the internal attacking that we do amongst each other is, in a way, practice. It's sharpening our tools, we're checking each other, et cetera. And that's why Bitcoin becomes the best team, right? Because we practice hard and we hold each other accountable at the same time. There's no tolerance of just nonsense. There's no nonsense tolerance. Stop fucking around. And you have to defend yourself. If you make a misstep, as we all have found out online at one time or another by saying something stupid. Exactly. Say something else stupid. The net of this, just to wrap up the net of this, is that it forces or it challenges a lot of people to become the best version of themselves, right? And that's where the magic is. You want to go write about Bitcoin? Okay, great. You better spend 100 hours or 1000 hours reading the existing literature. And if you're going to put something out there, it better be good because you're vying for the respect of the community. And so, speaking for myself, it challenges me to put out the best version of content that I can or be a better version of myself in my personal life or whatever it is. And that's extremely powerful, right? People eat differently. They work out, they change their diet, they Chernoby quit smoking. There's all these examples, and that's amazing. That's just a crucible of positive development. And positive development comes with pain and sacrifice and challenge. That's the only way. And constructive criticism, which is what we're all really doing to each other. And a lot of people can't take it in life. Maybe not. It's a hard thing for a lot of people, like, constructive criticism. And it's just ruthless in this space. Ruthless. Like, you can't make a misstep without getting constructively criticized by some anon on Twitter, but it's a beautiful thing. It's a really beautiful thing. It is a beautiful thing. People walking into, like, bitcoin Twitter, they're like, Jesus Christ, you guys are just tearing each other apart. You're such a l to each other. It's a meme at this point for a person to get the dogs attacking. Like the bitcoin dogs attack. And when they say something ridiculous, like whether it's FUD against bitcoin, which is usually something fun against bitcoin, and then all the someone finds it right online and then the dogs attack and it's like, I smell something, say something stupid, that's exactly you almost like, can't stop yourself from fucking. Just like, getting on there and joining in. But it's amusing to see as soon as they say something stupid, like you see a list of big players jump in and just grill. Yes, it is great. I love the standard that everybody's held, too. And if you can endure that, if you can then look at responses. If you get that flak and you can endure it and look at it and go, okay, what's actually behind this? Is it bullshit or did I do something that was totally off base? If you can get through that, then you can go a long way in bitcoin. Just in having that and it extrapolates out to the rest of your life, right? Like, if you can endure the criticism and then take the good criticism, the stuff that actually makes you improve yourself and use it to iterate, as opposed to just becoming defensive, I think that's a good trait to have. And bitcoin definitely gave me thicker skin than I used to have, that's for sure. It's also real and honest and supportive. Like, let's discard, let's say 1020 percent of people who are just being mean for no reason, they can go fuck themselves. They have no value to the conversation. But the other part of it is it's honest feedback. And almost nowhere in life you get that, right? We're taught culturally to be I mean, politically correct is what we call it now, but we kind of shy away from any amount of conflict. And what does that do? You're actually lying to your friends and your family. And we become such pussies, we can't actually say what we mean because the true thing is hard to say. And oh, my God, the chat is loving Timmy right now. He's the boss, man. He's a boss. I feel kind of bad right now. I think he might legitimately sleeping, but we're just going to roll with it, guys. I feel bad. I screenshotted the chat and posted on it. I don't want to stand, man. I've almost polished off as twixer, man. We got to go. It's all good. Well, I'm also Irish and Scottish, but I weigh like, literally almost £70. Don't dock yourself. We weigh £150. Shinobi, how tall are you? Let's just say it's hard for me to. Put, like, mass on and keep it. I'm 180. I thought I was thin. Brandon, what was the last thing you're saying there? We're all another good point. Yeah. Okay. The point is that because we're politically correct, we beat around the bush. We don't say things honestly. And the thing about that is you think you're doing you actually hurt people. Exactly. You think you're doing the right thing by not bringing up conflict. But in fact, the exact opposite is true. The hard truth is important. You have to give your friend a point. You have to give your family a point. You just made me think of, like, an idol of mine, which sort of no longer is Kevin O'Leary. Okay? Kevin O'Leary. So I grew up for years before Kevin O'Leary became big on Shark Tank and in the US. He was on Canadian dragonstone. Remember that sessions? Like, he was a big one, dragons. Before he got really big in the US. And became a big swinging dick. Like a big famous guy. I love that guy because I would watch that show. I always wanted to start a little small business when I was younger. I was like, that's so cool. What are these people doing? I love seeing their inventions. He would be ruthless. He'd be ruthless to people. But he would tell them his truth. Whether it was the truth or his truth, he would tell them his opinion. And I was like, man, this guy's the best. You don't see guys like this. You don't see guys that are cut throat. Your idea is shit because of this. Rip the dreams down on live TV, right? Like, just rip them down ruthless. He made a name for himself for doing that. And he became famous. Went into a shark tank, became famous. Now he's, like, hating on bitcoin, which is sad to me to see because I was like, this guy is the fucking boss. I love this guy. And now he's like, clean coins and ethical coins and all this stuff. I'm like, dude, you just totally ruined your image. I hope you'll eventually come to the good side and figure it out. He'll figure it out. Because I feel like he's one of the good guys generally, but he's also a guy, but wanting to make money. But he's one of the way you're saying, like, bitcoin ers, what I consider bitcoin is are ruthless. They don't sugarcoat anything. If you go out and do something silly stupid, even to say something stupid, misstep, you're getting called out. And it's not because people are you're right. You mentioned, like, the people that are just, like, constantly just negative. Like, you know, we've seen those people. Like, most of us, I think, like, everyone on this chat are like we're actually just this is constructive criticism. This is like, what we think. We might be wrong, but we're like, this is what we think. And we're going to give it to you if you missed that. And we're going to say you're an idiot, but don't take it to heart. Learn if it's the truth, absorb it and be better next time. And you're right. That's why Bitcoin is not going to lose. Because it just attracts the best people that are willing to be this non politically correct, just ruthless. It doesn't matter what it means to us to not be your friend. We're just going to tell you what we think in the end. Honestly, I think it's going to like Brandon shinobi. I actually never met Tammy before. I would love to know him more. BTC sessions. In my mind, you guys got a sick reputation. Like, sick reputation. If we were going to do business, I wouldn't need a credit application to give you credit. I'd be like, I already know things about you from peripherally listening to you guys, that it would just be you get full credit. I know your reputations and that's why I think that's the thing that differentiates this industry from others. Especially in the mining space, man, it's such a scammy space. My only goal, my only goal is that we try to provide a good service. My only goal is to not fuck any of our customers anytime and absorb the cost of that. Because I know the reputation thing. It's the only thing that's going to carry us forward for like, a long, long time. Because the Fiat method of bailing out and like getting bailouts and like, equity raises and stuff doesn't work. Like, it's a reputational thing. Yeah. If you know what I'm getting at. There's a different ethos and it's coming back. Yes. Online. It's pretty much me and Adam. Like Denver bitcoin. I have other sales guys that aren't as online. But we get business because I think we build a good product. But it's a reputation thing. People want to work with people that you know that won't fuck you, especially in this space. I've had suppliers. Mining is a weird space. I've had suppliers that I've worked with for like literally years. All of a sudden, screw us. I had built up. I thought they were a reputable supplier. They screwed us because just the market changes, like, asics get pricey faster, they can't compensate us for the shit they sent us and it just burns bridges down. Whereas I feel like the long game is you can never ever, under any circumstance, you don't need a legal contract. You just have to be good faith business, not screw somebody. Eat the cost of your own mistake, your reputation will live on and it'll carry you to a place like you'll never get, no matter what kind of contracts you get, no matter what kind of Fiat backing you get. I feel like our company, I don't think we've ever screwed a customer. We fucked up like a bunch of times. I've shipped guys stuff that was instable asics I bring them back at our costs, replace them with something that works. Don't fuck anyone over. It's a small space. It's all reputation. That's the way it used to be. I think in my mind, that's the way it used to be. Before the Fiat range, I could buy a minor off of reddit with no escrow from a random person and actually have the Asics show up and not get screwed and make the money. That I thought was it because you had a big handle, like people knew who you were? Or was it because he bought off a reputable seller? It was just because it was a dude who didn't fucking screw me. He's an honest dude and I will never forget that. I would not be in this space right now if that is not an honest dude, because I would have just. He was on bitcoin talk or something or read it and had a rep. RA. He had a rep. That's it. There was no legal probably a legal contract, right? You just trust it. There's a comment here. Fisher jay character and integrity. And so when you're talking about bitcoin versus Fiat versus also shit coins, that seems to be the separating ethos where bitcoin is perfectly aligned with trying to get the best character and integrity out of everybody, because that's what works best for an unforgivably sound money. If you don't have those attributes, then who's going to extend credit via bitcoin? You just straight up wouldn't. Who's going to deal with you? Who's going to trust you in that way, shape or form? It brings back truth and it brings back characteristics of personalities that people actually want to deal with. And I don't see that in the altcoin space. I don't see that in the Fiat space, for damn sure. And it's refreshing to see that come back. I doubt that any shit pointers lose sleep over failing to deliver something for their client. We've gone through problems where our suppliers fuck us. We end up letting our customers down on delivery timings. I literally can't sleep for weeks knowing that our reputation is at risk over something that was whether it's in our controller or out of control or just poor planning. To me, the only way to do business in this industry, like bitcoin mining, is a weird thing where it's like I've been scammed multiple times and I'm like, really conservative on who I work with. I still get scammed. It's wild. So it's an industry in my mind that if we can't build up an amazing rate, you can be a Fiat max. You get infinite feet injecting your company and try to offer service and bail itself out with more Fiat injection. But when you're actually a small business trying to do it organically and get customers, you have to be super conservative, work really hard to find the right suppliers and not screw it up. And no matter what happens, if you're going to make money on the sale and the service or not. You take the loss as opposed to fuck your customer up. If you can do it that way, it's better to make your customer whole take a loss. Because as soon as one guy publicly says, these guys fucked us, we had a dispute. Why not? You're done. You're just fucking done. In this space. This space is so small. I look at it like it starts with mining. Mining is sort of the start of the distribution point of the coin. I have a theory that if you can just build an insanely reputable business in mining, you don't have to have any legal contracts. Your word is going to just carry you and let you get you could sell asics at a price, at a premium, just on your word. Because your customer knows that if they buy off you, nothing is going to go wrong. And that's not something you normally see in the fiat world. Everyone's like, buying insurance and shit. You can't even get insurance in this fucking industry. Like in Bitcoin Mine. You can't get it. I could talk about that for a while. They're censoring bitcoin miners to a big degree, and it's affecting our business. Shinobi's got a pushback. I can feel it. Real quick. One complaint doesn't burn. Shit. I'm sorry. Do you not remember Cobra in 2017? Shrieking. How long? Mining is a scam for like six months. I do remember that. Why is 10% of the entire network using over ASIC boost, which only how long hardware supports? What is that again? Fair enough. I have to start wrapping this because I have sleep. Can I give a 32nd point to Steve? I'm having a lot of fun. Why are you controlling this conversation? Just leave. You could actually just go do what you want and leave your screen empty. I can imagine. You want to go. Have fun with your wife and your kids and stuff. I'm having a good time. I'd come back. Tim would still be here. Tim is still going to be here. As long as Snowbie and Brandon want to hang out. Who. Do your thing. Let's pause, toss to it. Brandon, what does he have to say here? This is the best podcast I've ever been on. For Steve. Here. What you're describing is you're seeing the world through a bitcoin lens. You have long term thinking. Reputation matters. You're living in the future. Okay. I feel like I'm living in 2077, where it's all just this guy. Like, this guy's got a name. This company's got a name. It's not 2021. Agreed. And most people are living in the present or the past, which is short termism. Right? Incentives lead them there. This is planned obsolescence. Just in time economy. Get a new job every six months. Doesn't fucking matter. Just in time. Manufacturing. I fucking hate that shit. Yes. We literally build things so that they break really soon so that we can sell them another one, right? Yeah. Everyone's steeped in Fiat. And so I think that's the major difference here. I think the number one thing is long term thinking versus short term thinking. And then also bitcoin community puts a premium on reputation. I am hitting the stampede. Who is that? There's a dude from Edmonton. I just saw him in a Bitcoin meetup the other day. Anyway, he's asking for hitting Calgary Stampede, which started today. I may I'm not sure. Any are there Calgary bitcoin meetups. There? Are there's one every two weeks? I'll let you know. Why am I not there? I don't know. What the fuck are you doing with your life, man? You guys are in these weird social circles. You won't invite your boys? I don't know, man. I thought you were busy. They came from Saskatchewan. Yeah. I thought you were showering or something. I thought you're busy. You guys fuck with the Sheepdogs ", + timestamp: '01:56:18-02:26:03', + topics: ['Bitcoiners', 'Bitcoin maximalists', 'reputation'], + type: 'podcast', + weight: 3.8466525077836837, + }, + { + boost: 0, + date: 1639872e3, + description: 'Investment and Internalization in Foreign Policies', + episode_title: + 'PFP016 Remigijus Šimašius, Bullies as Neighbors-on the Foreign Policy of Small Countries (PFS 2008)', + guests: [], + hosts: [], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/624262ef-b30f-4114-8061-e310187e6bb4.jpg', + keyword: !0, + link: 'https://www.youtube.com/watch?v=0WAituFO614', + node_type: 'clip', + pub_key: '02574d6e8e787372184b6f17c40d6c6fe1777db9015801f95dfd24692784d767cd', + ref_id: '300c09ff-ce2f-4b87-b3d8-cc7dd4d4f7d1', + show_title: 'Property and Freedom Society', + text: "the bully or exploiting the bully also receiving super gas. Because economics of this you may see that usually small countries is better places to make and show profits and mounting money in case of managers. In this case Russia would be interested in not selling certain energy to this country. So this computer the absence of internalization there is no need for every system to think about how to adapt and how to deal. In this case when you have a bulletproof this is a strong soldier in place and then to do fashionable jazz energy companies. There's no political involved in the process and there's no split of pressing on energy issues in order to get something politically because have local dixator or country. It means that dixator tries everything into Persian people just for being government and actually for all of their people. It's not a big deal whether you obtain one government or another government while it is a free nation. So this kind of centralization wanted to protect and just say that creating strong power inside. And the other aspect of that. ", + timestamp: '00:25:57-00:33:16', + topics: ['State Foreign Policies', 'State Investment'], + type: 'youtube', + weight: 3.8100023383634563, + }, + { + boost: 0, + date: 1672216200, + description: 'Why so many Lending Companies went bust in 2022', + episode_title: "The Chopping Block Recaps 2022: Crypto's Biggest Winners and Losers and Best Memes - Ep. 437", + guests: [ + { + name: 'Tom Schmidt', + profile_picture: 'https://pbs.twimg.com/profile_images/1563232354277085189/xQL92DR4_400x400.jpg', + ref_id: 'bc9d3bfd-36b0-4cbc-a491-9370decf4c99', + twitter_handle: 'tomhschmidt', + }, + { + name: 'Robert Leshner', + profile_picture: 'https://pbs.twimg.com/profile_images/1587956987786104833/1SiKVj-s_400x400.jpg', + ref_id: 'ebaa2166-7982-423d-9f43-add89e7d47f9', + twitter_handle: 'rleshner', + }, + { + name: 'Tarun Chitra', + profile_picture: 'https://pbs.twimg.com/profile_images/1587539091444432897/Z6_nmrCB_400x400.jpg', + ref_id: 'dfad4b23-92ff-4aa1-9aa4-abc1d54cd6d3', + twitter_handle: 'tarunchitra', + }, + ], + hosts: [ + { + name: 'Haseeb Qureshi', + profile_picture: 'https://pbs.twimg.com/profile_images/1581025415551889408/thQwG4lb_400x400.jpg', + ref_id: '790e4217-dd9f-416f-b9f8-ed596937f5b5', + twitter_handle: 'hosseeb', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/7de0d293-8ae3-4362-8500-8f7300f3fe41.jpg', + keyword: !0, + link: 'https://pdrl.fm/98e0b1/traffic.megaphone.fm/LSHML7648700824.mp3?updated=1672173949', + node_type: 'clip', + pub_key: '', + ref_id: '100d4882-b3a5-4d34-b7f1-c3251dc7c462', + show_title: 'Unchained', + text: "Sure the line, the prices, the product was coined by Calcimati last year. So yeah, I think it is fitting that this is the year of the dissolution of that meme well called out. So my biggest surprise, and by the way, I just want to point out for the audience, you can tell we're all being cute and we're all dancing around like the actual biggest surprises, but whatever, I'll continue in the theme of being cute. Well, because we already said them. We kind of already said that. We already said that because like the biggest losers. Yeah, exactly. Okay. But I just want to say that in case we don't actually say it. So in my case, the biggest surprise I would say was the death of all the lenders. So it doesn't surprise me that lenders died, right? Like, okay, of course prices go down. Some people were leveraged, some people made bad loans, they died. It turns out every fucking lender in the industry died. Every single one of them. We basically had a great financial crisis level extinction event for every single lender. That was surprising to me. Basically nobody has made money in lending since inception, which is really just mind boggling to me. You would think that in a cycle there would be some people who sort of went too far toward the tide and ended up getting carried away when the tide increased, but the people who were closer to shore would be okay, and there would be some people who were like, oh, I had better risk management. I did this, I did that, and that's why I didn't do what those crazy people did. Doesn't matter what you did. Almost everybody died from this generation of lenders. And I would not have even if you told me that prices in crypto would have drawn down 50% plus in a single year, I would assume like, well, you know, BlockFi is going to be screwed, but like, other people will be fine. But turns out, no, every single lender died. And so anybody who's building a thesis last year about, well, I'm going to underwrite this lender because they're better than the other. Yeah, okay, BlockFi is crazy, sell season is crazy, but these guys are going to be fine. No, the entire category all got destroyed this year. I do remember talking to some people who were investing in BlockBy, like, last few rounds, and I had just been like, oh, what's your thesis? Like, why do you think they're going to be really great? People always said the same thing for all of these mega lender rounds. Like self is blocked by not Amber, the person amber used babble, stuff like that. People would always basically say the following they have these like really great borrowers who are market makers. Everyone said the same thing about all the lenders. So maybe this is just like the cycle of life, it seems. So there's a lot of lessons about why fundamentally or what could you have arrived at to know that the entire category was just not underwriting. And I think a large part of it comes from the fact that lending on the whole made a lot of money last year, right? So people made in aggregate in the billions last year. Obviously it was a crazy year for crypto leverage period and so a lot of that would just end up getting recycled as crypto leverage. But the difference between lending so there are some very successful lending companies in web, two traditional startups, but most of them have some kind of innovation and the innovation might be a point of sale integration like Binary later. It might be some clever underwriting or being able to model out exactly what your repayment schedule is going to be or something like that. Nobody in crypto had all of these. People had bad 2020. They all did. They all did. But they didn't die. Right? They didn't die. They didn't die. That was a lot of just repricing due to rates. So like the attractiveness of these lending, basically being able to get high risk debt just on the whole got destroyed because of rates going up, right? So that's ultimately what a lot of these lenders were really doing was packaging up high risk borrowers but they didn't die. Everyone in crypto died. And I think part of the reason why that is that ultimately the lenders in crypto were competing on taking risk because there was no way to compete on technology. Nobody had any better technology, there was no actual innovation. Normally when VCs back a sector they do so because the person who has the better, you know, structural advantage is going to win. The person who has better technology, who has better vertical integration, who has better execution, whatever, they're the person who's going to win. And venture capital is in the business of finding that one person, giving them lots, lots of money and achieving the outside success. But if there is no vector for competition besides risk, besides just taking more risk, then basically every single person that is venture backable takes a bunch of risks and as soon as the tide increases they all drown together and that's basically what happened. And so I think for me that's a big lesson about just what it looks like to find a category, even if it's making money that actually has the properties of venture. The properties of venture should be that as a company gets bigger, it becomes more robust, not less robust. And that seems to be what happened to the lenders that as lenders try to get bigger, they became less and less robust. In traditional finance, lending is not a venture type business. It's something that obviously lending is a big business, it's massive, but it's not the kind of thing that small players grow overnight through some kind of magic growth hack or structural advantage and then end up becoming these big incumbents. It's the opposite. It's a very slow moving industry with very entrenched players. Well, one thing I would dispute about that characterization is that a lot of edge lending that requires either Novel underwriting standards or packaging up loans in some weird way like buying out payload example or pipe all these invoice. Factoring type of things. They were venturebacked because they had some sort of like there's this outsized premium that that market is going to grow and the current users are just small. Right, but I think that also points to real innovation, right. It's like understanding there's a class of users that nobody else understands how to underwrite and they have some technological way to underwrite them in real time or at a much faster sales cycle than anybody else can, right. That's both by now, pay later and. In spite of certain VCs asking me to stop calling VCs down on the show. Wait, who asked you to stop calling me that? I'm not telling you but you have. To call them out. What are you talking about? I'm not calling them out. I'm just going to let them hear that I said that so they know. I think the problem is VCs just took the model of the pipes of the world like oh, let's translate it to this edge asset that we don't understand but people are securitizing in some way and oh, it seems to be growing. I can kind of see the growth investor story for this because they're just like what's the spreadsheet of the numbers and it's not really about the technology. That is sort of the difference between late stage growth investors and seed investors. If you're investing in growth stuff you're not actually underwriting the technology anymore. At some point you might be if it's like SpaceX but like most fintech stuff it's not right. Like and so I think like there's a sense in which calling a nod venture investable is not totally true but it is true that the growth investors maybe were not so sophisticated. And I'm not going to call venture investors dumb so I'm just going to say that leave it at that. I think one of the things that makes it interesting from a venture perspective is that at a hypothetical level, lending is a business that could require a lot of capital for something that is mostly just software and a little bit of people. And I think venture investors get excited about businesses that could require $5 billion just because that's something that you can deploy assets and capital into its scale. Unlike most other businesses in our space or in finance in general. It's one of the things that could soak up just huge amounts of capital given the right conditions. And it gets better as it gets bigger, because when it's small, it's like, oh, why would we bet on this? What's the odds of this making any sense as it gets bigger? I think people's eyes widen when they see how much capital it could ask to soak up. And that's what makes it interesting from a business perspective, in a way that we're building this protocol or we're building a new blockchain. It's very different. I think that was true in a bull market when there was tons and tons of money, and that money was trying to find a home. Right. So I think it was very true last year. This year, I think many fewer people are thinking of businesses in that context. And I think this is exactly where the counter analogy, of course, is that Blockbuster had a huge employee base. All these lenders had tons and tons of bodies. Right. Whereas, Robert, to your point about compound compound ave, they don't need employees. They just kind of run their super capital light. That is actually traditionally what VCs like. VCs like the idea that with a small amount of principal investment, you can build something really big, that's the advantage of software businesses is that they don't scale through people, they scale through software. And DFI is the apotheosis of that. And so I think the regular lenders we're seeing were not. Yes. I will take this opportunity to say that DFI is better than the old way of doing business with tons of people and spreadsheets and making up decisions on the fly and choosing who to lend to based on how much they grow out with you or Tweet. Good tweets. DFI is vastly superior to all of these businesses that have failed in almost every way. And there's a reason why DFI has performed exceptionally this year in terms of the resilience and the smoothness of their operating versus the CFI, and the fact. That DFI does not trust your self certified balance sheet. It checks like you got to put the collateral in the fucking contract. Yes, it's very hard to scam a smart contract. It's very easy to scam a human at a lender. Speaking of that, I'm ready for our last category, because this ties into my best meme. Okay, ", + timestamp: '00:57:50-01:07:52', + topics: ['Lending Companies'], + type: 'podcast', + weight: 11.145632554335025, + }, + { + boost: 0, + date: 1644037200, + description: 'Protesting on Negative Temperatures', + episode_title: 'WHY ARE WE BULLISH Yellow Sean Harris Plan Marcus ep235', + guests: [ + { + name: 'Plan Marcus', + profile_picture: '', + ref_id: '59eabed3-a4d8-4924-a492-c7a5bf112e16', + twitter_handle: '', + }, + { + name: 'Sean Harris', + profile_picture: 'https://pbs.twimg.com/profile_images/1602092854188261378/QpI6m349_400x400.jpg', + ref_id: '7213bc9e-9d1e-4dab-a894-f3431b8abde7', + twitter_handle: 'BigSeanHarris', + }, + { name: 'Yellow', profile_picture: '', ref_id: '932cc68f-cd06-4adc-8447-4a9422f7a9a8', twitter_handle: '' }, + ], + hosts: [], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/46277681-3564-4504-9ca8-e2f41d658d28.jpg', + keyword: !0, + link: 'https://anchor.fm/s/11e95d20/podcast/play/47216896/https%3A%2F%2Fd3ctxlq1ktw2nl.cloudfront.net%2Fstaging%2F2022-1-5%2F246293871-44100-2-1e73fa52f5258.mp3', + node_type: 'clip', + pub_key: '', + ref_id: '72743f40-5811-46ea-b47e-145c68c72c5b', + show_title: 'BTC Sessions', + text: "up there. They're not running their trucks. It's costing them a lot of time, a lot of money, probably a lot of stress on their families as well. It's not like they're there. What's the temperature over there? I'm like, so bullish, if you're like -20 willing to. Yeah. There's spots as they were driving through, especially like in Saskatchewan and Manitoba and stuff where parts of Ontario was like -30 or something. And people were standing outside just cheering them on flags and stuff. Yeah. I don't know. I guess that's what Claus was talking about. We have a small but closing window of Apple tree. They figured nobody's going to protest in the midst of the window. We got to push this through now, guys. The window is closing right now. I guess if it was going to be anybody in the winter, it was going to be Canada. We don't give fuck Canada, Russia, those two. Yeah, exactly. Awesome. Well, I won't take up too much time with this topic, but again, I'll just say thanks to anybody that's contributed or shared or anything. Follow Hong Kong Coddle if you want updates on that. I'll be putting those out as they come. So, yeah, let's keep it rolling. If you haven't already, like subscribe all that good stuff, keep the comments coming. I'll start pulling them up, but we're going to rotate yellow. You get to take us on a journey. What are you bullish about? This week? ", + timestamp: '00:18:21-00:19:55', + topics: [], + type: 'podcast', + weight: 3.8047182962583412, + }, + { + boost: 0, + date: 1637384400, + description: + '[[Hillary Clinton]] on Cryptocurrency Undermining National Currencies and the Role of the Dollar as the Reserve Currency', + episode_title: 'WHY ARE WE BULLISH Bitcoin Brendo Stacking Hats Josh Terry ep217', + guests: [ + { + name: 'Josh Terry', + profile_picture: '', + ref_id: '1e5ab8da-a3a5-41aa-af6c-e056e9995baf', + twitter_handle: '', + }, + { + name: 'Stacking Hats', + profile_picture: '', + ref_id: '3247f8a5-954a-4d1b-aa04-df1956eb9bd3', + twitter_handle: '', + }, + { + name: 'Bitcoin Brendo', + profile_picture: 'https://pbs.twimg.com/profile_images/1362868540756254723/-vueErUH_400x400.jpg', + ref_id: 'a10413d8-38f5-42fd-a7a9-de79d90f26ec', + twitter_handle: 'BitcoinBrendo', + }, + ], + hosts: [], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/1bf7b1ea-f717-4c0f-ae66-0e00b26603df.jpg', + keyword: !0, + link: 'https://anchor.fm/s/11e95d20/podcast/play/43657768/https%3A%2F%2Fd3ctxlq1ktw2nl.cloudfront.net%2Fstaging%2F2021-10-20%2F27c2440d-0d0e-8b28-945a-dab5701ed4cc.mp3', + node_type: 'clip', + pub_key: '', + ref_id: 'f15740f5-7c02-44d6-90c1-ff61fc00a120', + show_title: 'BTC Sessions', + text: "quote. I think it was Gandhi, actually. But first they ignore you, then they laugh at you, then they fight you, then you win. And I think that we're kind of straddling the line and stepping over into the then they fight you phase. I say that because of this clip that dropped today, and I'll just play it here. This is Hillary Clinton. Take a listen. And then one more area that I hope nation States start paying greater attention to is the rise of cryptocurrency. Because what looks like a very interesting and somewhat exotic effort to literally mine new coins in order to trade with them has the potential for undermining currencies, for undermining the role of the dollar as the reserve currency for destabilizing nations, perhaps starting with small ones, but going much larger. So when we think about this new environment in which we find ourselves that we've been discussing for the last some minutes, we can't just think about nation States. So she's basically saying that Bitcoin stands to destabilize and undermine nation States and their currencies. And to me, it kind of sounds like, well, nobody is ignoring it at this point. By and large, the laughter has gotten more sparse and has quieted down a lot. And we're starting to hear a lot more of these higher ups. And legitimate people start to look at this, some favorably but others as a legitimate threat. And you see examples of people on either side of the fence here. ", + timestamp: '00:08:37-00:10:45', + topics: ['hillary clinton'], + type: 'podcast', + weight: 3.8047181391399194, + }, + { + boost: 0, + date: 1666137600, + description: 'The motivation of building apps on the Lightning network', + episode_title: 'Meet the Makers: Alan & Kwinten', + guests: [ + { + name: 'Alan Plus', + profile_picture: 'https://pbs.twimg.com/profile_images/1565235279451103233/XD8pJuIo_400x400.jpg', + ref_id: 'e362fed6-ec06-4d8a-a052-3137b24f213f', + twitter_handle: 'alnboltn', + }, + { + name: 'Kwinten De Backe', + profile_picture: 'https://pbs.twimg.com/profile_images/917859380699320320/p_v-fjmh_400x400.jpg', + ref_id: 'be68f240-1f4c-4b27-b4bb-752c90cbe0c3', + twitter_handle: 'QuintenDeBacke1', + }, + ], + hosts: [ + { + name: 'Moritz Alby', + profile_picture: 'https://pbs.twimg.com/profile_images/859727763292512258/kiFpZ2vO_400x400.jpg', + ref_id: 'e88efbf8-3809-4508-a86a-d7bf9effb574', + twitter_handle: 'MoritzKaminski', + }, + { + name: 'Zapp Ed', + profile_picture: 'https://pbs.twimg.com/profile_images/1519990234070540288/adGqlFoj_400x400.jpg', + ref_id: 'bbe7cf1d-cd8d-4d36-926d-76f41b775fbb', + twitter_handle: 'zapp_ed', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/965489b4-a414-4fd0-ab8c-55911b1596aa.jpg', + keyword: !0, + link: 'https://www.youtube.com/watch?v=GyA8tHNKmig', + node_type: 'clip', + pub_key: '02574d6e8e787372184b6f17c40d6c6fe1777db9015801f95dfd24692784d767cd', + ref_id: '8019d172-6711-45bb-a305-bf773c9ae85d', + show_title: 'BOLT FUN', + text: "actually choose to build things around Lightning? What's the main motivation behind that? Should I or should Alan answer this question or should Ed? I know. Yeah. So I don't know, it just kind of clicked for me since the beginning. So I was looking for some things to do after graduating university, and I just came across this. And it's just something that is when you're able to look at it and understand the system, how it really works, then you cannot be not excited. I find it's just that, yeah, I don't know. It's an open system. Everyone can participate, and that means that the possibilities are endless and I don't know what else I can see about it. And that hasn't been set for many times before. Alan? Well, for me, the bitcoin was definitely the default base layer, right? So I found that that's the future of money in terms of like a monetary base layer. But it was obvious from the beginning that it won't be able to handle all of the payments in the world because of hardware constraints on nodes and the Lightning network was promising to solve that, and it did. So it was like a perfect storm of things. Like you have the perfect base layer, and now we have a really solid solution for payment for the payment rail. So there's nothing else out there, really, that could compete for me. I know that there are many coins that promise all kinds of things, but the problem is none of them have the base layer. So no matter how good they are in terms of speed, it's just like nobody cares, really, aside from a small group of fanatic people who are invested in the success of those coins on short term. But on the long term, I don't think it's going to work. It's just a default. There's no other option for us right now. You either go with the Custodial system or bitcoin. And Lightning, I think. I think it's a very good summary from the two of you. But now you're working on Lightning Network Plus. You already mentioned that the Rings of Fire. Maybe you can explain a bit what is the Ring of Fire and what led to or what problem do you want to solve now with Lightning Network Plus? Sure. So I think the biggest issue that new users of the Lightning Network face is that they can open channels to other nodes and spend their bitcoin, but if they want to receive funds. So for example, somebody pays them for their work, or they receive tips, or they get paid by all these gaming apps and the podcasting apps and all the stacker news, all of these places which pay you, they won't be able to receive until they spend from their channel. And if they want to receive a lot of money, they will have to spend a lot before that can happen. So that's very unexpected for most users because on base layer bitcoin, there is no such problem. You can just receive any amount instantly. But on Lightning, that's not the case. So you have to have somebody opening a channel to you in order for you to be able to receive money. Or you have to empty your own new channel, which is cumbersome. So basically every node has this problem. Every new user has this problem. And somebody came up with this idea, it wasn't me, somebody before Lightning Network Plus was created, that why don't a couple of node operators band together, like team up and open to each other? So let's say we have three people, and everybody opens to another node operator in like a circle, or like a triangle rather, if it's three people, and then everybody receives a channel and also opens a channel to somebody else. So instantly you have two channels and you have incoming liquidity and outgoing liquidity, and the problem is solved. It's a rather simple solution to this initial problem. Basically, Lightning Network Plus, all it does is just allows node operators to team up and create these triangles and other shapes. There are square pentagons and you can also create so called dual funded channels which is between two node operators and it's a double sized channel ", + timestamp: '00:06:18-00:12:01', + topics: ['Lightning network', 'ring of fire'], + type: 'youtube', + weight: 3.9958031609925744, + }, + { + children: ['6825363e-4733-4d3b-be8f-ef3a90b3549b'], + episode_title: 'The Chopping Block: The Inside Story of How Blur Toppled NFT Giant OpenSea - Ep. 459', + guests: [ + { + name: 'Pacman Blur', + profile_picture: 'https://pbs.twimg.com/profile_images/1499571704753901569/wLAcCdsu_400x400.jpg', + ref_id: 'c042615e-905a-49af-8761-fa6fb1be4b8a', + twitter_handle: 'PacmanBlur', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/7de0d293-8ae3-4362-8500-8f7300f3fe41.jpg', + node_type: 'episode', + ref_id: 'd4948551-6ec5-4649-a700-364592e09edd', + show_title: 'Unchained', + }, + { + children: ['100d4882-b3a5-4d34-b7f1-c3251dc7c462'], + episode_title: "The Chopping Block Recaps 2022: Crypto's Biggest Winners and Losers and Best Memes - Ep. 437", + guests: [ + { + name: 'Tom Schmidt', + profile_picture: 'https://pbs.twimg.com/profile_images/1563232354277085189/xQL92DR4_400x400.jpg', + ref_id: 'bc9d3bfd-36b0-4cbc-a491-9370decf4c99', + twitter_handle: 'tomhschmidt', + }, + { + name: 'Robert Leshner', + profile_picture: 'https://pbs.twimg.com/profile_images/1587956987786104833/1SiKVj-s_400x400.jpg', + ref_id: 'ebaa2166-7982-423d-9f43-add89e7d47f9', + twitter_handle: 'rleshner', + }, + { + name: 'Tarun Chitra', + profile_picture: 'https://pbs.twimg.com/profile_images/1587539091444432897/Z6_nmrCB_400x400.jpg', + ref_id: 'dfad4b23-92ff-4aa1-9aa4-abc1d54cd6d3', + twitter_handle: 'tarunchitra', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/7de0d293-8ae3-4362-8500-8f7300f3fe41.jpg', + node_type: 'episode', + ref_id: '25e36282-297b-4f9d-b6e9-da65731be8a8', + show_title: 'Unchained', + }, + { + children: ['a3fd38b6-998f-4c62-ab60-554ef9275993'], + episode_title: 'The Chopping Block: The SEC Is Attacking Crypto – Will Gary Gensler Succeed? - Ep. 456', + guests: [ + { + name: 'Marc Boiron', + profile_picture: 'https://pbs.twimg.com/profile_images/1486397784844496897/ZyNlahT2_400x400.jpg', + ref_id: '3f27d12e-0a50-42c0-8b76-b3bb15fa1ce6', + twitter_handle: 'boironattorney', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/7de0d293-8ae3-4362-8500-8f7300f3fe41.jpg', + node_type: 'episode', + ref_id: '53cab9be-0f22-42a2-aef5-87920c2431cf', + show_title: 'Unchained', + }, + { + children: ['ecaaa46f-b7ad-49b7-aae3-402befc21ab6'], + episode_title: "The Chopping Block: Here's Why Gemini Could End Up Filing for Bankruptcy - Ep. 447", + guests: [], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/7de0d293-8ae3-4362-8500-8f7300f3fe41.jpg', + node_type: 'episode', + ref_id: '6028f484-d0b9-424a-87e5-d0dcb39f9fc7', + show_title: 'Unchained', + }, + { + children: ['0329d1cb-7a66-4de5-a67d-36f28fce092f', 'a24f0efb-66be-40a2-afa2-bf29f370b10d'], + episode_title: 'The Chopping Block: Why Gemini Users Are Mad at Genesis and DCG - Ep. 443', + guests: [], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/7de0d293-8ae3-4362-8500-8f7300f3fe41.jpg', + node_type: 'episode', + ref_id: '092e9794-afc9-41fe-a635-4802777415a1', + show_title: 'Unchained', + }, + { + children: ['6681918f-0067-45b2-b7ad-0f79d9ce724d', '8b5e41e9-6cc2-4070-8210-6f49967759f2'], + episode_title: 'The Chopping Block: SBF Wants to Win in the Court of Public Opinion. Will He? - Ep. 428', + guests: [], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/7de0d293-8ae3-4362-8500-8f7300f3fe41.jpg', + node_type: 'episode', + ref_id: '36f1f7e1-df70-4528-8474-4bba448b1ed0', + show_title: 'Unchained', + }, + { + children: ['9f78ecd6-03f5-4f0e-ba8b-1dbb60b09052', '51ecdc95-4e1d-448b-923c-5a7e1822f131'], + episode_title: "The Chopping Block on FTX/Alameda: Is Sam Bankman-Fried 'Crypto Kanye'? - Ep. 424", + guests: [ + { + name: 'N/A', + profile_picture: 'https://pbs.twimg.com/profile_images/1478260779522658306/rm6XqGZx_400x400.jpg', + ref_id: '9862384f-b99b-4777-aa71-538d41591686', + twitter_handle: 'unchained_pod', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/7de0d293-8ae3-4362-8500-8f7300f3fe41.jpg', + node_type: 'episode', + ref_id: '6d267cc1-22b1-42fc-9b60-9701e64a75d0', + show_title: 'Unchained', + }, + { + children: ['1f39afe1-2026-44ca-a0b5-80aea9a8cc83'], + episode_title: + ' The Bitcoin v Crypto War with Udi Wertheimer, Crypto Cobain, Alex Gladstein & Allen Farrington', + guests: [ + { + name: 'Crypto Cobain', + profile_picture: 'https://pbs.twimg.com/profile_images/1601273673041776641/7FrXDRv6_400x400.jpg', + ref_id: '8fa5fec2-f714-433e-a8c9-ee5e76dabaf0', + twitter_handle: 'cobie', + }, + { + name: 'Allen Farrington', + profile_picture: 'https://pbs.twimg.com/profile_images/1414147363560730624/EXMx91D6_400x400.jpg', + ref_id: '8660a251-950b-4888-adbf-21f790210cf6', + twitter_handle: 'allenf32', + }, + { + name: 'Udi Wertheimer', + profile_picture: 'https://pbs.twimg.com/profile_images/1600897375001874432/8pdVDKUz_400x400.jpg', + ref_id: '483291b7-2101-4c28-a065-93b1524d0552', + twitter_handle: 'udiWertheimer', + }, + { + name: 'Alex Gladstein', + profile_picture: 'https://pbs.twimg.com/profile_images/1382371620669452292/VOPKOc8w_400x400.jpg', + ref_id: '49445c1c-7c66-4b73-9eec-09a337befbec', + twitter_handle: 'gladstein', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/4e607036-8fde-48ef-ab76-9c2ac4bab031.jpg', + node_type: 'episode', + ref_id: 'a7afaa66-6878-40c2-97fd-88a20ae007fd', + show_title: 'What Bitcoin Did with Peter McCormack', + }, + { + children: ['ccac3748-afc5-4404-8497-1710f501f49f'], + episode_title: 'Mining Bitcoin with Nuclear Energy with Ryan MacLeod', + guests: [ + { + name: 'Ryan MacLeod', + profile_picture: 'https://pbs.twimg.com/profile_images/1443185278525579278/_Yl1nao1_400x400.jpg', + ref_id: '20a72757-923c-4a01-ad4f-7ccdc2a83e03', + twitter_handle: 'NuclearBitcoinr', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/4e607036-8fde-48ef-ab76-9c2ac4bab031.jpg', + node_type: 'episode', + ref_id: '910f5aab-7896-4c19-8649-64dcef44c369', + show_title: 'What Bitcoin Did with Peter McCormack', + }, + { + children: ['7ef1c3a7-3028-4a9d-a012-82a61645ecb4'], + episode_title: + 'Read_375 - A Match Made in the Whitepaper - Treatise on Bitcoin & Privacy, Part 1 [Giacomo Zucco]', + guests: [], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/9e7e229f-2631-4542-b5d7-7fcd502798dc.jpg', + node_type: 'episode', + ref_id: '47c54384-785c-4a4b-bad1-cac242d8f190', + show_title: 'Bitcoin Audible', + }, + { + children: ['2b8ef20b-4134-4d6a-bb2f-ee72a42468d2', '4636725f-ae47-4777-bd41-f78a4694ba05'], + episode_title: 'Chat_45 - Bitcoin & an Energy Revolution, A panel at the VOB Conf', + guests: [ + { + name: 'Christian Stoll', + profile_picture: + 'https://pbs.twimg.com/profile_images/3296579573/69ebedb479a9bdb9d536fe887e2d3113_400x400.jpeg', + ref_id: 'ff74d59c-f846-4b16-a5e5-771fb8139f18', + twitter_handle: 'Granddragon14', + }, + { + name: 'Jesse Peltan', + profile_picture: 'https://pbs.twimg.com/profile_images/1123954968636088326/EAjHUGDE_400x400.png', + ref_id: '96309505-caeb-47bb-a1ba-712b97292675', + twitter_handle: 'JessePeltan', + }, + { + name: 'Phillip Sandner', + profile_picture: 'https://pbs.twimg.com/profile_images/1043824764161335296/2SW3duCV_400x400.jpg', + ref_id: 'e1996e82-0354-421c-85d5-f18eebec9506', + twitter_handle: 'philippsandner', + }, + { + name: 'Tone Vays', + profile_picture: 'https://pbs.twimg.com/profile_images/1416821178266787844/T1OkI9ZW_400x400.jpg', + ref_id: 'da6fc991-7080-461c-86e3-4ac18c2f413d', + twitter_handle: 'tonevays', + }, + { + name: 'Christopher Bendiksen', + profile_picture: 'https://pbs.twimg.com/profile_images/1362772558882484233/3nS-l35s_400x400.jpg', + ref_id: 'd99d354e-41d4-4117-9b70-05955a85f9da', + twitter_handle: 'C_Bendiksen', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/9e7e229f-2631-4542-b5d7-7fcd502798dc.jpg', + node_type: 'episode', + ref_id: 'aa033894-120f-494e-9d6b-c6d62dfb0a69', + show_title: 'Bitcoin Audible', + }, + { + children: [ + '307ee148-c00d-4195-b815-bee1f45abe5d', + 'b241a91d-07ff-4169-9df8-16783be79ed1', + '67236e2a-900b-4cf6-bc6c-165c0f7e3219', + ], + episode_title: + 'Chat 39 - Bitcoin Renaissance - with Marty Bent John Vallis Alex Gladstein Elizabeth Prefontaine Brady Swenson', + guests: [ + { + name: 'Alex Gladstein', + profile_picture: 'https://pbs.twimg.com/profile_images/1382371620669452292/VOPKOc8w_400x400.jpg', + ref_id: '49445c1c-7c66-4b73-9eec-09a337befbec', + twitter_handle: 'gladstein', + }, + { + name: 'Marty Bent', + profile_picture: 'https://pbs.twimg.com/profile_images/1362747135981199370/mSy97J12_400x400.jpg', + ref_id: '655bdcb1-21c3-411c-aa24-fe7e4c7a248c', + twitter_handle: 'MartyBent', + }, + { + name: 'John Vallis', + profile_picture: 'https://pbs.twimg.com/profile_images/1568743166035070976/4MyKww8A_400x400.jpg', + ref_id: 'c3a9fe29-3b78-4665-af54-e293e9d68962', + twitter_handle: 'johnkvallis', + }, + { + name: '& Brady Swenson', + profile_picture: '', + ref_id: '0b68a085-0680-44b8-891c-6e1e84ac4eb1', + twitter_handle: '', + }, + { + name: 'Elizabeth Prefontaine', + profile_picture: 'https://pbs.twimg.com/profile_images/1382790711427354625/D09LMToL_400x400.jpg', + ref_id: '4506df72-5de4-4144-abc4-011408b6b496', + twitter_handle: 'Eprefon', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/9e7e229f-2631-4542-b5d7-7fcd502798dc.jpg', + node_type: 'episode', + ref_id: '53402b84-7b30-4fec-a741-d9ef8fa03389', + show_title: 'Bitcoin Audible', + }, + { + children: [ + '4fdf8ab1-a3e8-4390-b618-a8a915fa3f68', + '8ab125e2-e555-4adc-817a-bbf5bb93bf40', + '30641d73-c61d-47f4-bf37-f78566574dc8', + ], + episode_title: 'Chat 45 - Bitcoin an Energy Revolution A panel at the VOB Conf', + guests: [ + { + name: 'Tone Vays', + profile_picture: 'https://pbs.twimg.com/profile_images/1416821178266787844/T1OkI9ZW_400x400.jpg', + ref_id: 'da6fc991-7080-461c-86e3-4ac18c2f413d', + twitter_handle: 'tonevays', + }, + { + name: 'Phillip Sandner', + profile_picture: 'https://pbs.twimg.com/profile_images/1043824764161335296/2SW3duCV_400x400.jpg', + ref_id: 'e1996e82-0354-421c-85d5-f18eebec9506', + twitter_handle: 'philippsandner', + }, + { + name: 'Jesse Peltan', + profile_picture: 'https://pbs.twimg.com/profile_images/1123954968636088326/EAjHUGDE_400x400.png', + ref_id: '96309505-caeb-47bb-a1ba-712b97292675', + twitter_handle: 'JessePeltan', + }, + { + name: 'Christopher Bendikson', + profile_picture: '', + ref_id: 'd72ead54-7bff-4874-870f-123e665fddfd', + twitter_handle: '', + }, + { + name: 'Christian Stoll', + profile_picture: + 'https://pbs.twimg.com/profile_images/3296579573/69ebedb479a9bdb9d536fe887e2d3113_400x400.jpeg', + ref_id: 'ff74d59c-f846-4b16-a5e5-771fb8139f18', + twitter_handle: 'Granddragon14', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/9e7e229f-2631-4542-b5d7-7fcd502798dc.jpg', + node_type: 'episode', + ref_id: '3a9db5f7-6722-469c-a0c6-6b157f44f33f', + show_title: 'Bitcoin Audible', + }, + { + children: ['1df5002c-3c8a-42db-960a-2a35a6596b63'], + episode_title: 'E34: Cory Klippsten on Building Swan Bitcoin, Angel Investing, and the Lightning Network', + guests: [], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/b6c52903-5124-43f4-8632-bc9aeb941f2e.jpg', + node_type: 'episode', + ref_id: 'fccdc763-2b69-4418-9a7a-78cdfe615ba9', + show_title: 'The Kevin Rooke Show', + }, + { + children: ['362a90a7-c9dc-4c90-827b-8cf469895c35', 'c6a74c1e-d942-46d9-85e0-b7f33bb41078'], + episode_title: + 'SLP321 On chain scaling with Bitcoin Core Developers Pieter Wuille, Andrew Poelstra, Andrew Chow & Murch', + guests: [ + { + name: 'Pieter Wuille', + profile_picture: 'https://pbs.twimg.com/profile_images/1264051937172836353/n7gHdLbB_400x400.jpg', + ref_id: '40260d2f-3480-47d6-8515-d2e780901273', + twitter_handle: 'pwuille', + }, + { + name: 'Andrew Chow', + profile_picture: 'https://pbs.twimg.com/profile_images/1452266201770496010/44FHCtZM_400x400.jpg', + ref_id: 'f96d87ca-5060-4021-aeb9-61db03312027', + twitter_handle: 'andrewrchow', + }, + { + name: 'Andrew Poelstra', + profile_picture: 'https://pbs.twimg.com/profile_images/1316562683009921024/FSscAYvJ_400x400.jpg', + ref_id: '15fb9c53-c988-4af1-bbf0-4832d71b0a01', + twitter_handle: 'Blockstream', + }, + { + name: 'Murch', + profile_picture: 'https://pbs.twimg.com/profile_images/1269477743525130241/-U843Cmt_400x400.png', + ref_id: '3e2c1c73-a057-4475-9782-3bb0d3d8cc62', + twitter_handle: 'murchandamus', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/b79a3eb8-bcd0-4338-b979-d32aef360785.jpg', + node_type: 'episode', + ref_id: 'ae631d96-3b81-4308-bcc1-a57f81339b5c', + show_title: 'Stephan Livera Podcast', + }, + { + children: ['a61c7685-556b-4886-8908-fd0ead4dc1f2', 'b1eabcd8-8d00-4950-b264-f4f2741ca3a7'], + episode_title: 'How Bitcoin UASF went down taproot lot true speedy trial small blocks', + guests: [ + { + name: 'Luke Dashjr', + profile_picture: '', + ref_id: 'c3b2367f-2863-421b-8b2c-c093423f0eaa', + twitter_handle: '', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/b79a3eb8-bcd0-4338-b979-d32aef360785.jpg', + node_type: 'episode', + ref_id: '4bea6c89-43b4-4e5e-9fea-0662d9ee7c00', + show_title: 'Stephan Livera Podcast', + }, + { + children: ['72743f40-5811-46ea-b47e-145c68c72c5b'], + episode_title: 'WHY ARE WE BULLISH Yellow Sean Harris Plan Marcus ep235', + guests: [ + { + name: 'Plan Marcus', + profile_picture: '', + ref_id: '59eabed3-a4d8-4924-a492-c7a5bf112e16', + twitter_handle: '', + }, + { + name: 'Sean Harris', + profile_picture: 'https://pbs.twimg.com/profile_images/1602092854188261378/QpI6m349_400x400.jpg', + ref_id: '7213bc9e-9d1e-4dab-a894-f3431b8abde7', + twitter_handle: 'BigSeanHarris', + }, + { name: 'Yellow', profile_picture: '', ref_id: '932cc68f-cd06-4adc-8447-4a9422f7a9a8', twitter_handle: '' }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/46277681-3564-4504-9ca8-e2f41d658d28.jpg', + node_type: 'episode', + ref_id: '46277681-3564-4504-9ca8-e2f41d658d28', + show_title: 'BTC Sessions', + }, + { + children: ['784b1ee8-56e7-403c-b813-24713fd3a29c'], + episode_title: 'WHY ARE WE BULLISH? Ant, Bitcoin Island, Decentra Suze ep324', + guests: [ + { + name: 'Decentra Suze', + profile_picture: 'https://pbs.twimg.com/profile_images/1614189317345214464/Z4BZBBbb_400x400.jpg', + ref_id: 'da307464-4ac8-449a-81f0-74ea9749dd1b', + twitter_handle: 'DecentraSuze', + }, + { + name: 'Ant', + profile_picture: 'https://pbs.twimg.com/profile_images/1617275233831886853/RlWpn1qQ_400x400.jpg', + ref_id: '9575e6e8-cd06-48f0-b548-801f7d2357a5', + twitter_handle: '2140data', + }, + { + name: 'Bitcoin Island', + profile_picture: '', + ref_id: '9b88c77a-65c9-4ae6-a30c-890937636d7f', + twitter_handle: 'BitcoinIslandPH', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/419512c2-e309-4b25-bfe2-cd481d53f66d.jpg', + node_type: 'episode', + ref_id: 'b05fa33c-fc91-4b55-a592-85eaa1a5b3fd', + show_title: 'BTC Sessions', + }, + { + children: ['d865c803-93a1-47ae-b851-5bd6a683eda5'], + episode_title: 'WHY ARE WE BULLISH? Mickey Koss, Nozomi Hayase, The Bitcoin Explorers ep320', + guests: [ + { + name: 'Nozomi Hayase', + profile_picture: 'https://pbs.twimg.com/profile_images/1362950252823597060/i-UISQoY_400x400.jpg', + ref_id: 'f82d9145-3308-493d-aa13-1fc3e21b7dd4', + twitter_handle: 'nozomimagine', + }, + { + name: 'The Bitcoin Explorers', + profile_picture: 'https://pbs.twimg.com/profile_images/1380933164596625408/vDK0Tf2r_400x400.jpg', + ref_id: 'a81905a1-3698-4c2d-b9d3-205e4b91a08f', + twitter_handle: 'BitcoinExplorer', + }, + { + name: 'Mickey Koss', + profile_picture: 'https://abs.twimg.com/sticky/default_profile_images/default_profile_400x400.png', + ref_id: '47e8b134-431a-40a8-8f56-21778cf6f927', + twitter_handle: 'MickeyKoss', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/419512c2-e309-4b25-bfe2-cd481d53f66d.jpg', + node_type: 'episode', + ref_id: 'b723d81b-9c99-4797-b3a8-67f824924f0c', + show_title: 'BTC Sessions', + }, + { + children: ['0886e428-dab9-4882-9479-e2f64b5ed145'], + episode_title: 'WHY ARE WE BULLISH? Joe Consorti, Texas Slim, Max Gagliardi ep316', + guests: [ + { + name: 'Joe Consorti', + profile_picture: 'https://pbs.twimg.com/profile_images/1596902707511664640/GYGWVDts_400x400.jpg', + ref_id: '8d2024b2-03bb-454d-9bd6-bb121904b76a', + twitter_handle: 'JoeConsorti', + }, + { + name: 'Max Gagliardi', + profile_picture: 'https://pbs.twimg.com/profile_images/1607930248301010944/2HRR14Fm_400x400.jpg', + ref_id: '30de157e-f240-40a2-8048-bc2b39efef86', + twitter_handle: 'max_gagliardi', + }, + { + name: 'Texas Slim', + profile_picture: 'https://pbs.twimg.com/profile_images/1589784780970795011/02jf0fqp_400x400.jpg', + ref_id: 'b4448c8e-9238-4aba-bd25-efb329ea5a72', + twitter_handle: 'modernTman', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/419512c2-e309-4b25-bfe2-cd481d53f66d.jpg', + node_type: 'episode', + ref_id: 'eaeec64e-8e03-4826-a7c5-e1969a71ca2d', + show_title: 'BTC Sessions', + }, + { + children: ['98a90a75-7ec6-412a-b5a0-dca009985290'], + episode_title: 'WHY ARE WE BULLISH? HodlSolo, James Dewar, Christopher Gordon, Peter Rounce ep302', + guests: [ + { + name: 'Peter Rounce', + profile_picture: '', + ref_id: '0f59ce14-c4c9-49a3-9ff1-2d4051931a19', + twitter_handle: '', + }, + { + name: 'Christopher Gordon', + profile_picture: '', + ref_id: 'b4b8fac7-00ae-423d-b22e-e1ecf079bb5d', + twitter_handle: '', + }, + { + name: 'James Dewar', + profile_picture: 'https://pbs.twimg.com/profile_images/1092486738814078978/WxYQsqYo_400x400.jpg', + ref_id: '960d2bf1-17e6-4821-a041-4a1283ef0bce', + twitter_handle: 'IndigoFast', + }, + { + name: 'HodlSolo', + profile_picture: 'https://pbs.twimg.com/profile_images/1526883855742943233/WE19hgdQ_400x400.jpg', + ref_id: '93734db0-ad98-41ef-8548-5b3868edc23f', + twitter_handle: 'HodlSolo', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/419512c2-e309-4b25-bfe2-cd481d53f66d.jpg', + node_type: 'episode', + ref_id: '922ae599-5631-4ffe-977e-a9174fc028bb', + show_title: 'BTC Sessions', + }, + { + children: ['b6fe310d-bfa4-48aa-bfc2-d36ed303d024'], + episode_title: 'WHY ARE WE BULLISH? Brady Swenson, Kristin Thompson, Alex Stanczyk, Jon Chernot ep300', + guests: [ + { + name: 'Brady Swenson', + profile_picture: 'https://pbs.twimg.com/profile_images/1502564606836981763/fmqtNrNc_400x400.jpg', + ref_id: '49966553-d55b-44c9-94ec-8fee09eee5c2', + twitter_handle: 'CitizenBitcoin', + }, + { + name: 'Alex Stanczyk', + profile_picture: 'https://pbs.twimg.com/profile_images/1539055022364708864/rwErK6x1_400x400.jpg', + ref_id: '3126e2a3-bbe4-456b-b298-9714085fa286', + twitter_handle: 'alexstanczyk', + }, + { + name: 'Jon Chernot ', + profile_picture: 'https://pbs.twimg.com/profile_images/1557153813122859008/VlOtu_p4_400x400.jpg', + ref_id: '9e92acc2-17ad-4e7b-89d9-98a43fd12a6f', + twitter_handle: 'jonchenot', + }, + { + name: 'Kristin Thompson', + profile_picture: 'https://pbs.twimg.com/profile_images/1517531647956033536/lf6DvsQm_400x400.jpg', + ref_id: '29ff14ed-7fa9-4c27-a972-0d708f7f78b7', + twitter_handle: 'SpeakServeGrow', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/419512c2-e309-4b25-bfe2-cd481d53f66d.jpg', + node_type: 'episode', + ref_id: 'b534755c-92b6-4df1-b1f9-a28578661f48', + show_title: 'BTC Sessions', + }, + { + children: ['1376395c-9c36-4f82-bdde-86ce6cf7ba26'], + episode_title: 'WHY ARE WE BULLISH? Bitcoin Buying Tsunami Swells in All Waters ep147', + guests: [ + { + name: ' Away Slice', + profile_picture: 'https://pbs.twimg.com/profile_images/1493953883370053632/rvtEfkr-_400x400.jpg', + ref_id: 'ff304d54-ca39-45eb-98ef-483460548c9a', + twitter_handle: 'add_slice', + }, + { + name: 'Littlest Hodler', + profile_picture: 'https://pbs.twimg.com/profile_images/1396223393322749952/uzavXUxh_400x400.jpg', + ref_id: '5eaa1126-c920-4860-89a0-459e64be2af5', + twitter_handle: 'littlesthodler', + }, + { + name: ' and Colin Aulds', + profile_picture: 'https://pbs.twimg.com/profile_images/1151579149091262464/uNkb8aat_400x400.jpg', + ref_id: 'fbd7719d-1c4a-497d-96a8-1d34e2e91702', + twitter_handle: 'Colin_Aulds', + }, + { + name: ' Mark Moss', + profile_picture: 'https://pbs.twimg.com/profile_images/1501276126823346177/6grHYzO4_400x400.jpg', + ref_id: '5a1cc110-3363-4dd1-a568-e80f70a51925', + twitter_handle: '1MarkMoss', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/419512c2-e309-4b25-bfe2-cd481d53f66d.jpg', + node_type: 'episode', + ref_id: 'b317d76a-25e6-42f6-bc97-3de9f6c3f081', + show_title: 'BTC Sessions', + }, + { + children: [ + '00f5cd32-cb12-4c4c-979a-ed45445a103e', + '07ab82b4-2fe7-42f9-9018-bb8f4188eb3b', + 'fe680ae3-835d-492f-b664-7d645d02a99f', + ], + episode_title: 'WHY ARE WE BULLISH? Brandon Quittem, Timothy Kim, Shinobi, Steve Barbour ep185', + guests: [ + { + name: 'Brandon Quittem', + profile_picture: 'https://pbs.twimg.com/profile_images/1502403738861940736/9J5VuTye_400x400.jpg', + ref_id: '65512044-7810-4ece-8156-5519e072cb66', + twitter_handle: 'Bquittem', + }, + { + name: 'Shinobi', + profile_picture: 'https://pbs.twimg.com/profile_images/1526590501742428160/0Y5H2uJK_400x400.jpg', + ref_id: 'a05dface-33a7-400d-a749-99efe0d96118', + twitter_handle: 'shinobi602', + }, + { + name: 'Steve Barbour', + profile_picture: 'https://pbs.twimg.com/profile_images/1592714173469065216/q8kXPyQI_400x400.jpg', + ref_id: '63a731b8-4759-4360-9e9d-d66f884e12d8', + twitter_handle: 'SGBarbour', + }, + { + name: 'Timothy Kim', + profile_picture: 'https://pbs.twimg.com/profile_images/1569681307029934081/2s_nWYo__400x400.jpg', + ref_id: 'e0323798-c70f-4cc3-96ff-87bab50c2313', + twitter_handle: 'realtimothykim', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/419512c2-e309-4b25-bfe2-cd481d53f66d.jpg', + node_type: 'episode', + ref_id: '94e1df77-e561-4361-b8ad-e98862d6e51a', + show_title: 'BTC Sessions', + }, + { + children: ['310c587e-f3a7-4fbe-aacb-e9b0e73726d1'], + episode_title: 'WHY ARE WE BULLISH? Jeff Booth, Alyse Killeen, Marty Bent, Vijay Boyapati ep187', + guests: [ + { + name: 'Jeff Booth', + profile_picture: 'https://pbs.twimg.com/profile_images/1362957991410954241/spiaMAg2_400x400.jpg', + ref_id: 'f1143bcc-9ab9-4716-8259-0e5b026f8039', + twitter_handle: 'JeffBooth', + }, + { + name: 'Alyse Killeen', + profile_picture: 'https://pbs.twimg.com/profile_images/1469812274223194115/nynN-53X_400x400.jpg', + ref_id: '4612f685-03a9-4ff7-8dbd-153db478effc', + twitter_handle: 'AlyseKilleen', + }, + { + name: 'Marty Bent', + profile_picture: 'https://pbs.twimg.com/profile_images/1362747135981199370/mSy97J12_400x400.jpg', + ref_id: '655bdcb1-21c3-411c-aa24-fe7e4c7a248c', + twitter_handle: 'MartyBent', + }, + { + name: 'Vijay Boyapati ', + profile_picture: 'https://pbs.twimg.com/profile_images/1383215714056605700/49XT3cEZ_400x400.jpg', + ref_id: '0e976bc7-e7d6-4666-85f3-6b7c19be3b2f', + twitter_handle: 'real_vijay', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/419512c2-e309-4b25-bfe2-cd481d53f66d.jpg', + node_type: 'episode', + ref_id: '10c6d370-de6e-4a37-9981-d2c27e69d9e0', + show_title: 'BTC Sessions', + }, + { + children: ['c9a7d4e3-bdca-4b73-8209-0eefae9248cb', 'ea5f251b-6174-4663-b1c8-176375396b6e'], + episode_title: 'WHY ARE WE BULLISH Natalie Brunell Aaron Segal Lauren Sieckmann Dan Held ep191', + guests: [ + { + name: 'Dan Held', + profile_picture: 'https://pbs.twimg.com/profile_images/1522608646043181060/QQRjVYhi_400x400.jpg', + ref_id: '3e22facc-9310-4346-82ac-3e183b88fa51', + twitter_handle: 'Ledger', + }, + { + name: 'Lauren Sieckmann', + profile_picture: '', + ref_id: '427bb439-f251-4c7e-89fb-b53ecd8c9a82', + twitter_handle: '', + }, + { + name: 'Aaron Segal', + profile_picture: 'https://pbs.twimg.com/profile_images/884309028125294592/sLDGwzDO_400x400.jpg', + ref_id: 'f7483c61-ba76-4a19-8d8d-992966e1f79e', + twitter_handle: 'AaronSegalActor', + }, + { + name: 'Natalie Brunell', + profile_picture: '', + ref_id: 'a09e8874-abbe-4a85-b19d-08cac1c8afde', + twitter_handle: '', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/419512c2-e309-4b25-bfe2-cd481d53f66d.jpg', + node_type: 'episode', + ref_id: 'a52e09df-91bc-4997-ad65-725ee971af2b', + show_title: 'BTC Sessions', + }, + { + children: ['315fbf52-eab1-4f1b-b3c7-e4e418498664'], + episode_title: 'WHY ARE WE BULLISH Tomer Walton Obi Gigi ep194', + guests: [ + { + name: 'Walton', + profile_picture: 'https://pbs.twimg.com/profile_images/1579938510538153994/EYbT5PEr_400x400.jpg', + ref_id: 'ec8c8747-a001-42ba-ae87-bfdef751b781', + twitter_handle: 'beeforbacon1', + }, + { + name: 'Gigi', + profile_picture: 'https://pbs.twimg.com/profile_images/1566370176446119943/UeuACt-4_400x400.jpg', + ref_id: '9d8917ab-730b-4b1a-8321-49fb00907644', + twitter_handle: 'dergigi', + }, + { name: 'Obi', profile_picture: '', ref_id: 'f5ce3cb3-d943-483c-a619-c60936181c0a', twitter_handle: '' }, + { name: 'Tomer', profile_picture: '', ref_id: '9dfdecd6-c851-4766-ac32-4c1818ef5a9a', twitter_handle: '' }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/419512c2-e309-4b25-bfe2-cd481d53f66d.jpg', + node_type: 'episode', + ref_id: '95403824-42d5-4fe8-b50b-72e08ab368c8', + show_title: 'BTC Sessions', + }, + { + children: [ + '1f486e9a-51aa-476a-8430-b149c88817f4', + 'ba7bc3fe-38e0-47e1-b917-f9e4c005a972', + 'b03519b0-5139-4ad4-910a-40f40e332352', + ], + episode_title: 'WHY ARE WE BULLISH Bitcoin Meme Hub Jan Capek Bitcoin Mechanic Max Hillebrand ep195', + guests: [ + { + name: 'Max Hillebrand', + profile_picture: 'https://pbs.twimg.com/profile_images/1311357499514269696/-HQFwyFH_400x400.jpg', + ref_id: '9a86cc59-ed01-4757-88f6-e9d9d63067b9', + twitter_handle: 'HillebrandMax', + }, + { + name: 'Bitcoin Mechanic', + profile_picture: '', + ref_id: 'faae3a37-0115-4074-af21-7d79c429c7cb', + twitter_handle: '', + }, + { + name: 'Jan Capek', + profile_picture: '', + ref_id: 'ec6f8b14-6c4b-42e9-8e86-9aa902c0906d', + twitter_handle: '', + }, + { + name: 'Bitcoin Meme Hub', + profile_picture: '', + ref_id: 'dcd5a590-2018-4707-a49b-8142d7b14e33', + twitter_handle: '', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/419512c2-e309-4b25-bfe2-cd481d53f66d.jpg', + node_type: 'episode', + ref_id: '2e6613fa-ef17-413b-9158-0e3be5d5ae51', + show_title: 'BTC Sessions', + }, + { + children: ['c9fe9c3a-3c24-4803-817d-64d5fa2d58dc'], + episode_title: 'WHY ARE WE BULLISH Plebnet Takeover With JC KP VS and Walton ep196', + guests: [ + { + name: 'VS and Walton', + profile_picture: '', + ref_id: '5277e03c-a4d5-4b4b-ac6b-4dfd8fc9b8ce', + twitter_handle: '', + }, + { name: 'KP', profile_picture: '', ref_id: '9b4f73fc-d67b-4734-90e3-34dde1b7c4cc', twitter_handle: '' }, + { name: 'JC', profile_picture: '', ref_id: 'cbd12a77-50f2-4a20-a176-1083ce920f32', twitter_handle: '' }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/419512c2-e309-4b25-bfe2-cd481d53f66d.jpg', + node_type: 'episode', + ref_id: 'c0895c34-042b-4f51-a884-2330d9f83bc7', + show_title: 'BTC Sessions', + }, + { + children: ['6f3620f8-fd11-4b37-b8c1-7b8bd991420c', '1ac39cf4-fc11-47e7-8972-113c674860b2'], + episode_title: 'WHY ARE WE BULLISH Denver Bitcoin CryptoMags Lord Fusitua Jim Crider ep203', + guests: [ + { + name: 'Jim Crider', + profile_picture: '', + ref_id: 'acb937b5-97e9-4881-a45e-0e9511382019', + twitter_handle: '', + }, + { + name: 'Lord Fusitua', + profile_picture: 'https://pbs.twimg.com/profile_images/1511890587586560000/xGb_Dq_D_400x400.jpg', + ref_id: '45559c92-d4f0-42a5-8dc4-a8cce65e95a1', + twitter_handle: 'LordFusitua', + }, + { + name: 'CryptoMags', + profile_picture: '', + ref_id: '79cd9104-fa2c-4996-a179-8acb75642acd', + twitter_handle: '', + }, + { + name: 'Denver Bitcoin', + profile_picture: '', + ref_id: '5ab53f2f-797f-4e1b-90d8-f2ca90e88af4', + twitter_handle: '', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/638c47da-8592-4d7b-aa1a-20e28fa0499f.jpg', + node_type: 'episode', + ref_id: '638c47da-8592-4d7b-aa1a-20e28fa0499f', + show_title: 'BTC Sessions', + }, + { + children: ['54d58e3e-b828-4a9e-92c3-f761826c0319'], + episode_title: 'WHY ARE WE BULLISH Haley Berkoe Tip Jamie Stuckert Colin Aulds ep206', + guests: [ + { + name: 'Jamie Stuckert', + profile_picture: 'https://pbs.twimg.com/profile_images/1481004564090433537/ZAj3C3Kv_400x400.jpg', + ref_id: 'ee047505-97c1-4086-a01c-3d18bd40b2d2', + twitter_handle: 'JamiaStuckert', + }, + { + name: 'Colin Aulds', + profile_picture: 'https://pbs.twimg.com/profile_images/1151579149091262464/uNkb8aat_400x400.jpg', + ref_id: '7b6066e2-2ef5-4e90-9d93-dedb1d289118', + twitter_handle: 'Colin_Aulds', + }, + { + name: 'Tip', + profile_picture: 'https://pbs.twimg.com/profile_images/1598405188343468032/yL-obWRx_400x400.jpg', + ref_id: '72362a7b-2a0a-44ae-beb4-bb0f36a485fc', + twitter_handle: 'tip_nz', + }, + { + name: 'Haley Berkoe', + profile_picture: '', + ref_id: 'b62ba399-282a-4628-811c-25e280541c99', + twitter_handle: '', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/2e84c98a-d7d8-4341-a129-3f4eaebe1e3e.jpg', + node_type: 'episode', + ref_id: '2e84c98a-d7d8-4341-a129-3f4eaebe1e3e', + show_title: 'BTC Sessions', + }, + { + children: ['5b032ecb-09f5-4581-a1a8-cd0865de6076'], + episode_title: 'WHY ARE WE BULLISH Adam Curry Untapped Growth John Vallis Guy Swann ep211', + guests: [ + { + name: 'Adam Curry', + profile_picture: 'https://pbs.twimg.com/profile_images/1401922551161442307/XjN2DdFD_400x400.jpg', + ref_id: 'c304fffc-7fe0-49a1-86b8-d3278f5c89dc', + twitter_handle: 'adamcurry', + }, + { + name: 'John Vallis', + profile_picture: 'https://pbs.twimg.com/profile_images/1568743166035070976/4MyKww8A_400x400.jpg', + ref_id: 'c3a9fe29-3b78-4665-af54-e293e9d68962', + twitter_handle: 'johnkvallis', + }, + { + name: 'Guy Swann', + profile_picture: 'https://pbs.twimg.com/profile_images/1401969630634196995/DqOuszMi_400x400.jpg', + ref_id: '39c31930-d799-40a0-9a46-193117d03418', + twitter_handle: 'TheGuySwann', + }, + { + name: 'Untapped Growth', + profile_picture: '', + ref_id: '79de7f8f-4f00-48c4-897a-57aa2a5fb7da', + twitter_handle: '', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/6b8fbd46-fa4a-4d07-a142-9aeb242d249f.jpg', + node_type: 'episode', + ref_id: '6b8fbd46-fa4a-4d07-a142-9aeb242d249f', + show_title: 'BTC Sessions', + }, + { + children: ['29cdad6e-4b64-4e9e-bd36-5843b5783d9d', '3242aa43-f999-485b-9c94-8457526d6dbd'], + episode_title: 'WHY ARE WE BULLISH JoeyTweets Mario Gibney Bobby Shell Len ep215', + guests: [ + { + name: 'Bobby Shell', + profile_picture: 'https://pbs.twimg.com/profile_images/1090426395979890690/uUdaFXo__400x400.jpg', + ref_id: '438f8067-3fed-49d2-91d9-5018cb043aac', + twitter_handle: 'BobbyShell2', + }, + { name: 'Len', profile_picture: '', ref_id: '1fc627d9-a446-4e48-b960-ad97fcdbcaa0', twitter_handle: '' }, + { + name: 'Mario Gibney', + profile_picture: '', + ref_id: '1a3f05f5-5c4a-455f-b4ec-f682080a5518', + twitter_handle: '', + }, + { + name: 'JoeyTweets', + profile_picture: '', + ref_id: 'e6ada141-9c3c-4e1b-b8ab-2389c94f4130', + twitter_handle: '', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/f3b67780-d9c2-4a20-ab5c-115032a05b3a.jpg', + node_type: 'episode', + ref_id: 'f3b67780-d9c2-4a20-ab5c-115032a05b3a', + show_title: 'BTC Sessions', + }, + { + children: ['f15740f5-7c02-44d6-90c1-ff61fc00a120'], + episode_title: 'WHY ARE WE BULLISH Bitcoin Brendo Stacking Hats Josh Terry ep217', + guests: [ + { + name: 'Josh Terry', + profile_picture: '', + ref_id: '1e5ab8da-a3a5-41aa-af6c-e056e9995baf', + twitter_handle: '', + }, + { + name: 'Stacking Hats', + profile_picture: '', + ref_id: '3247f8a5-954a-4d1b-aa04-df1956eb9bd3', + twitter_handle: '', + }, + { + name: 'Bitcoin Brendo', + profile_picture: 'https://pbs.twimg.com/profile_images/1362868540756254723/-vueErUH_400x400.jpg', + ref_id: 'a10413d8-38f5-42fd-a7a9-de79d90f26ec', + twitter_handle: 'BitcoinBrendo', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/1bf7b1ea-f717-4c0f-ae66-0e00b26603df.jpg', + node_type: 'episode', + ref_id: '1bf7b1ea-f717-4c0f-ae66-0e00b26603df', + show_title: 'BTC Sessions', + }, + { + children: ['97fe1ee4-8b91-403e-8a64-d8f839be5b52'], + episode_title: 'WHY ARE WE BULLISH Max Keiser Meditation Man Stephan Livera ep221', + guests: [ + { + name: 'Max Keiser', + profile_picture: 'https://pbs.twimg.com/profile_images/1361873587582472195/y57DiTYX_400x400.jpg', + ref_id: '743efd07-d194-4c74-8663-45c3b8646b8e', + twitter_handle: 'Maxkeiser', + }, + { + name: 'Stephan Livera', + profile_picture: 'https://pbs.twimg.com/profile_images/1362551718110580740/v-W5Q2uo_400x400.jpg', + ref_id: '72f57157-c96e-4466-8bf1-290cfe1f8a0b', + twitter_handle: 'stephanlivera', + }, + { + name: 'Meditation Man', + profile_picture: '', + ref_id: '6cf1c2b8-8a28-4840-9132-3c2631d6ea58', + twitter_handle: '', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/7070839d-051e-48e4-bd9a-95c09b310db2.jpg', + node_type: 'episode', + ref_id: '7070839d-051e-48e4-bd9a-95c09b310db2', + show_title: 'BTC Sessions', + }, + { + children: ['a03e4374-8b17-4875-93ff-3410295eaae1', '46c0e9e5-6d49-4830-b405-6021fd365979'], + episode_title: 'WHY ARE WE BULLISH Michael Schmidt Jeff Ross Joseph Brown Greg Foss ep224', + guests: [ + { + name: 'Greg Foss', + profile_picture: 'https://pbs.twimg.com/profile_images/1552599670945464320/3OgqRHNo_400x400.jpg', + ref_id: '853d9f80-f6cf-490f-9d1e-f29cdc6acc6f', + twitter_handle: 'FossGregfoss', + }, + { + name: 'Jeff Ross', + profile_picture: 'https://pbs.twimg.com/profile_images/1475554600094552064/DSlPG1lx_400x400.jpg', + ref_id: 'ae6ee2a2-1cf7-41a0-8366-ff6e94a6403c', + twitter_handle: 'VailshireCap', + }, + { + name: 'Joseph Brown', + profile_picture: '', + ref_id: '803206b6-7b9f-48e0-a5d5-7348f6842cca', + twitter_handle: '', + }, + { + name: 'Michael Schmidt', + profile_picture: '', + ref_id: 'e94a106d-cbea-4b30-b0cb-3825979179ca', + twitter_handle: '', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/728d91e9-025d-43a7-8467-2c8d264ddf59.jpg', + node_type: 'episode', + ref_id: '728d91e9-025d-43a7-8467-2c8d264ddf59', + show_title: 'BTC Sessions', + }, + { + children: [ + '193f741e-2e1e-472f-a152-4514cb6d6372', + '325d3cbf-9cf8-49bf-aa7b-8c8bc8e113ff', + '450d6337-33ea-43a4-97f0-928b9d4174eb', + 'd9b2af2b-2bf8-477f-9cde-dd27660ddde7', + ], + episode_title: 'WHY ARE WE BULLISH Tone Vays Jaime Garcia Trent Dudenhoeffer KC Hodl ep225', + guests: [ + { + name: 'Tone Vays', + profile_picture: 'https://pbs.twimg.com/profile_images/1416821178266787844/T1OkI9ZW_400x400.jpg', + ref_id: 'da6fc991-7080-461c-86e3-4ac18c2f413d', + twitter_handle: 'tonevays', + }, + { + name: 'KC Hodl', + profile_picture: 'https://pbs.twimg.com/profile_images/1506986051683950592/MMMse9gr_400x400.jpg', + ref_id: 'b2264dd3-e587-403e-9447-9e99afc1910d', + twitter_handle: 'kc_hodl', + }, + { + name: 'Trent Dudenhoeffer', + profile_picture: '', + ref_id: '3b466176-3bbc-481d-9634-e127a9232404', + twitter_handle: '', + }, + { + name: 'Jaime Garcia', + profile_picture: 'https://pbs.twimg.com/profile_images/953009048642715648/PKaQy5UD_400x400.jpg', + ref_id: 'f259c6b5-71d6-4c5c-897c-3cfbe80cccc2', + twitter_handle: 'jaimegarciag', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/c8ae0def-c33c-4d17-af4e-31ddaeedaf8a.jpg', + node_type: 'episode', + ref_id: 'c8ae0def-c33c-4d17-af4e-31ddaeedaf8a', + show_title: 'BTC Sessions', + }, + { + children: [ + 'c2dff822-95ca-45fd-bf30-61ed21ecc3b1', + 'ef84d742-b332-4b77-8242-948a3737f91f', + '5bf12d7b-3c9b-4019-bca9-88899aaa4b35', + ], + episode_title: 'WHY ARE WE BULLISH Duczko Thomas Jestopher Morgen Rochard Rick Vanderhulst ep229', + guests: [ + { + name: 'Rick Vanderhulst', + profile_picture: '', + ref_id: '4c184180-b77d-4e25-ac7c-4d2e86cdde85', + twitter_handle: '', + }, + { + name: 'Morgen Rochard', + profile_picture: 'https://pbs.twimg.com/profile_images/1362921386256211972/IpIK8cwI_400x400.jpg', + ref_id: 'c29b26e9-82c8-4c0a-8130-aa083d33ec48', + twitter_handle: 'MorgenRochard', + }, + { + name: 'Thomas Jestopher', + profile_picture: 'https://pbs.twimg.com/profile_images/1607521016368201730/6GSHGkGX_400x400.jpg', + ref_id: '50388de7-3ec7-401b-8349-5ee1d8a004c0', + twitter_handle: 'Jestopher_BTC', + }, + { name: 'Duczko', profile_picture: '', ref_id: '2b6de75e-0cf5-4fec-b458-d1b8ee3f86df', twitter_handle: '' }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/b87feb17-6926-4295-b2c2-d1c2e9d49ca8.jpg', + node_type: 'episode', + ref_id: 'b87feb17-6926-4295-b2c2-d1c2e9d49ca8', + show_title: 'BTC Sessions', + }, + { + children: ['80462fda-0ec7-4677-bd1b-cd7741154f39'], + episode_title: 'WHY ARE WE BULLISH Mario Gibney Mauricio Di Bartolomeo Josias Carbon Bang Bitcoin', + guests: [ + { + name: 'Bang Bitcoin ', + profile_picture: '', + ref_id: 'ac7edd0f-886d-449a-ba1a-06033ad12695', + twitter_handle: '', + }, + { + name: 'Josias Carbon', + profile_picture: '', + ref_id: 'f3c2c48b-c174-43cc-acfc-2151634b7c77', + twitter_handle: '', + }, + { + name: 'Mauricio Di Bartolomeo', + profile_picture: '', + ref_id: '10c70dfd-93fb-4e95-99d4-2bebf561e737', + twitter_handle: '', + }, + { + name: 'Mario Gibney', + profile_picture: '', + ref_id: '1a3f05f5-5c4a-455f-b4ec-f682080a5518', + twitter_handle: '', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/f29a41a4-6764-439e-9fcf-74fefaffc681.jpg', + node_type: 'episode', + ref_id: 'f29a41a4-6764-439e-9fcf-74fefaffc681', + show_title: 'BTC Sessions', + }, + { + children: ['5992b639-b05a-4e6d-bd94-4c1b6907bda3'], + episode_title: 'WHY ARE WE BULLISH Lisa Hough JC Crown Brandon Quittem ep274', + guests: [ + { + name: 'Brandon Quittem', + profile_picture: 'https://pbs.twimg.com/profile_images/1502403738861940736/9J5VuTye_400x400.jpg', + ref_id: '65512044-7810-4ece-8156-5519e072cb66', + twitter_handle: 'Bquittem', + }, + { + name: 'JC Crown', + profile_picture: '', + ref_id: '79ae57b7-59d1-416a-961e-9e584ced2dfa', + twitter_handle: '', + }, + { + name: 'Lisa Hough', + profile_picture: '', + ref_id: 'a65a3362-03a6-4a6d-a901-3067f8b5dc81', + twitter_handle: '', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/419512c2-e309-4b25-bfe2-cd481d53f66d.jpg', + node_type: 'episode', + ref_id: '065c0900-4e3c-48a0-87b8-4068dc441c82', + show_title: 'BTC Sessions', + }, + { + children: ['4167618b-6ac6-403f-adcc-09716938e08e'], + episode_title: + 'WHY ARE WE BULLISH SeedSigner MMA Fighter Kenny Florian Bitrefill CEO Sergej Kotliar ep259', + guests: [ + { + name: 'Bitrefill CEO Sergej Kotliar', + profile_picture: '', + ref_id: '62f3aab5-0adf-4268-85f4-58cd53d85e6b', + twitter_handle: '', + }, + { + name: 'MMA Fighter Kenny Florian', + profile_picture: '', + ref_id: 'f272bf4f-6d43-461e-b053-7f680568db5d', + twitter_handle: '', + }, + { + name: 'SeedSigner', + profile_picture: 'https://pbs.twimg.com/profile_images/1571221494927134721/FieppCOA_400x400.jpg', + ref_id: '31ac465a-d2db-4255-b52d-50a10937f80d', + twitter_handle: 'Seedsigner', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/87cd8227-9464-45ed-8512-4e545d3812c2.jpg', + node_type: 'episode', + ref_id: '87cd8227-9464-45ed-8512-4e545d3812c2', + show_title: 'BTC Sessions', + }, + { + children: ['8b91e81a-82c0-4174-b2f5-f0f665c94fa9'], + episode_title: 'WHY ARE WE BULLISH Evan Kaloudis Q Bob Burnett ep256', + guests: [ + { + name: 'Q', + profile_picture: 'https://pbs.twimg.com/profile_images/1560683048680665088/4MrHM_UY_400x400.jpg', + ref_id: 'b0f3fa4c-eb2a-4888-be23-6bb0a529fc26', + twitter_handle: 'q_liketheletter', + }, + { + name: 'Bob Burnett', + profile_picture: '', + ref_id: 'cb1f53fa-5573-428d-b220-3e0c56f07588', + twitter_handle: '', + }, + { + name: 'Evan Kaloudis', + profile_picture: 'https://pbs.twimg.com/profile_images/1596923848997445633/DqxrGpkW_400x400.jpg', + ref_id: '420172fa-9431-4ba4-965c-adab17648d1b', + twitter_handle: 'evankaloudis', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/2f714adf-e499-4c1f-9864-016a00737153.jpg', + node_type: 'episode', + ref_id: '2f714adf-e499-4c1f-9864-016a00737153', + show_title: 'BTC Sessions', + }, + { + children: ['f5449a66-a156-4b0a-abeb-6ff5e28434ac', '345a7d30-5d4b-483c-8d3d-fd1999f7e34c'], + episode_title: 'WHY ARE WE BULLISH Kal Kassa Pierre Corbin Chris Smith Ben Gagnon ep243', + guests: [ + { + name: 'Chris Smith', + profile_picture: 'https://pbs.twimg.com/profile_images/1248417464825724928/BjsozM7k_400x400.jpg', + ref_id: '488a0f68-f24b-4d0b-9835-4b38a59f149e', + twitter_handle: 'chrissmithonair', + }, + { + name: 'Ben Gagnon', + profile_picture: '', + ref_id: 'd86128cb-056a-4233-bd95-cda98867f61c', + twitter_handle: '', + }, + { + name: 'Pierre Corbin', + profile_picture: '', + ref_id: 'a0a46e2e-1b24-4ce5-b34c-ca322067930a', + twitter_handle: '', + }, + { + name: 'Kal Kassa', + profile_picture: 'https://pbs.twimg.com/profile_images/1515885093893681156/cpZcX_2q_400x400.jpg', + ref_id: '5cf2cf3e-5cde-4426-b71f-f357195d40be', + twitter_handle: 'KalKassa', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/bbf0a536-990b-49b4-a9c3-a2a40fa38f88.jpg', + node_type: 'episode', + ref_id: 'bbf0a536-990b-49b4-a9c3-a2a40fa38f88', + show_title: 'BTC Sessions', + }, + { + children: ['ee97306e-085f-4232-b84f-05350bd383c4'], + episode_title: 'WHY ARE WE BULLISH Troy Cross GoodGuy Biker Jesse Berger ep241', + guests: [ + { + name: 'Jesse Berger', + profile_picture: 'https://pbs.twimg.com/profile_images/1552386182868307971/5ApLS7LH_400x400.jpg', + ref_id: '5b38df61-d11d-4958-8aaf-80b2bcbdd175', + twitter_handle: 'jayberjay', + }, + { + name: 'GoodGuy Biker', + profile_picture: '', + ref_id: 'bca843d2-d773-4261-bac4-1402812c7131', + twitter_handle: '', + }, + { + name: 'Troy Cross', + profile_picture: 'https://pbs.twimg.com/profile_images/1561364830774124544/cKmEpj_m_400x400.jpg', + ref_id: 'ea01fb42-72e2-417f-bb3e-a45d18feeed8', + twitter_handle: 'thetrocro', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/0ade0cc4-6303-4e28-8b00-6b3e659c1e3a.jpg', + node_type: 'episode', + ref_id: '0ade0cc4-6303-4e28-8b00-6b3e659c1e3a', + show_title: 'BTC Sessions', + }, + { + children: ['287d232d-d28d-400c-b4dd-c0026022fce4'], + episode_title: 'WHY ARE WE BULLISH Brian Harrington Jim Crider Nuclear Bitcoiner ep237', + guests: [ + { + name: 'Nuclear Bitcoiner', + profile_picture: 'https://pbs.twimg.com/profile_images/1443185278525579278/_Yl1nao1_400x400.jpg', + ref_id: '60f5891f-0864-4ed4-987a-81da4768b3ba', + twitter_handle: 'nuclearbitcoinr', + }, + { + name: 'Jim Crider', + profile_picture: '', + ref_id: 'acb937b5-97e9-4881-a45e-0e9511382019', + twitter_handle: '', + }, + { + name: 'Brian Harrington', + profile_picture: '', + ref_id: '82840fe2-b87e-433c-8f54-e4d1aa4f3dbf', + twitter_handle: '', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/9523aa00-daf4-42af-b25b-75d9682bc5a6.jpg', + node_type: 'episode', + ref_id: '9523aa00-daf4-42af-b25b-75d9682bc5a6', + show_title: 'BTC Sessions', + }, + { + children: ['50cf9922-5d13-4a4b-8621-e934b422aebf'], + episode_title: '#1104 Dr. Philip Ovadia - Heart Surgeon Explains What To Eat To Save Your Life', + guests: [], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/7934bd86-9344-4f1a-9c36-ea5f63ae418e.jpg', + node_type: 'episode', + ref_id: '919ca76f-b3c7-48f1-9f5f-872537d43632', + show_title: 'The Pomp Podcast', + }, + { + children: ['746c6d41-2f19-4b40-bca5-215942de62cc'], + episode_title: 'S12 E6: Talking Politics with Ben de Waal, Alexandra Moxin & Karo Zagorus', + guests: [ + { + name: 'Ben de Waal', + profile_picture: 'https://pbs.twimg.com/profile_images/1590206971818512384/18qb3LEl_400x400.jpg', + ref_id: 'd8679601-a65f-41ea-9b55-c1a7791b39c3', + twitter_handle: 'Ben_deWaal', + }, + { + name: 'Karo Zagorus', + profile_picture: 'https://pbs.twimg.com/profile_images/1601691364260978689/i38u9RRt_400x400.jpg', + ref_id: '358c2fe3-3615-4c90-bb6a-d4176b893b5e', + twitter_handle: 'btcdragonlord', + }, + { + name: 'Alexandra Moxin', + profile_picture: 'https://pbs.twimg.com/profile_images/1566131791916040192/8Nqn-lqU_400x400.jpg', + ref_id: 'be708104-b97c-4ef1-bbfd-054260b868d3', + twitter_handle: 'Alexandra933', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/5fc9c8b0-687f-487e-bde3-bea15e155e3e.jpg', + node_type: 'episode', + ref_id: 'ded2e35d-9fec-4bad-90f7-f3102d4eebd5', + show_title: 'Bitcoin Takeover Podcast', + }, + { + children: [ + '181df76a-5789-48c8-8153-57f0be3ec7f8', + 'b1b5acae-0bc8-4117-8d1b-b61e79bea99f', + '6565a1d2-53e0-48a8-bd22-9ea1080c4364', + '533a527d-5146-4c10-8091-329cbc8bf06a', + '01dc5a33-88e1-49ef-abb3-c5744cf8a046', + ], + episode_title: 'Bitcoin Fixes This 48 Small Business with Ali', + guests: [ + { name: 'Ali', profile_picture: '', ref_id: '1169edf2-a89f-4d89-94a4-1be1a7b9aef0', twitter_handle: '' }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/2536a974-d668-4ac2-8613-0b37aa0ca08c.jpg', + node_type: 'episode', + ref_id: '2536a974-d668-4ac2-8613-0b37aa0ca08c', + show_title: 'Bitcoin Fixes This', + }, + { + children: ['77ce133d-2bdb-490c-9638-88cc560062dc'], + episode_title: 'Freedom Money w/ Jeanine, Abubakar, Mills and Matt Odell', + guests: [ + { + name: ' Jeanine', + profile_picture: 'https://pbs.twimg.com/profile_images/850023968484368386/jBcIv7W1_400x400.jpg', + ref_id: 'dd36be1a-acf4-4bcf-a085-d713f49c4494', + twitter_handle: 'JudgeJeanine', + }, + { + name: 'Abubakar Nur Khalil', + profile_picture: 'https://pbs.twimg.com/profile_images/1570024329512992768/D42LDEjI_400x400.jpg', + ref_id: 'ee2cd308-168e-4ffc-9332-2957981b5acc', + twitter_handle: 'ihate1999', + }, + { + name: 'Matt Odell', + profile_picture: 'https://pbs.twimg.com/profile_images/1421584695746338819/Z_7ZfAeP_400x400.jpg', + ref_id: '4f2825ff-3b88-4595-84d4-36e81544b79a', + twitter_handle: 'ODELL', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/1583c7c4-f4f2-4e52-8f27-a1eaeb6289fd.jpg', + node_type: 'episode', + ref_id: '43dd10a8-c5d5-4643-9432-93868289f163', + show_title: 'Bitcoin Magazine Podcast', + }, + { + children: ['9c870970-e48f-49e1-8781-3c25f4fd58c6'], + episode_title: '$80 Trillion in Shadow Banking - FedWatch 122', + guests: [], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/1583c7c4-f4f2-4e52-8f27-a1eaeb6289fd.jpg', + node_type: 'episode', + ref_id: '6e8b01d5-df4f-4124-a13a-3ee9c93c8eb2', + show_title: 'Bitcoin Magazine Podcast', + }, + { + children: ['8b94fbcf-e349-4b2f-8425-66287345b9ae'], + episode_title: 'FTX Is Worse Than Enron w/ Lawrence Lepard, Caitlin Long, Dylan LeClair, and Dr. Jeff Ross', + guests: [ + { + name: ' Jeff Ross', + profile_picture: 'https://pbs.twimg.com/profile_images/1307109108127019008/rPNj47yJ_400x400.jpg', + ref_id: '4f4f53c7-5a3a-46df-b334-9951fe38dc96', + twitter_handle: 'realjeffreyross', + }, + { + name: ' Dylan LeClair', + profile_picture: 'https://pbs.twimg.com/profile_images/1599858581611941922/XxvPPWAt_400x400.jpg', + ref_id: 'c1d20e9f-7362-47be-a3a0-5b9c004cd58e', + twitter_handle: 'DylanLeClair_', + }, + { + name: 'Sam Rule', + profile_picture: 'https://pbs.twimg.com/profile_images/1522271013026729987/RQZOdzjq_400x400.jpg', + ref_id: '09214ea0-d8ff-47cb-84fe-08e8517768e5', + twitter_handle: 'samjrule', + }, + { + name: ' Caitlin Long', + profile_picture: 'https://pbs.twimg.com/profile_images/1362592672150528003/iYZ84uXB_400x400.jpg', + ref_id: 'c0244641-6347-4b82-b2a9-0ee38b600c08', + twitter_handle: 'CaitlinLong_', + }, + { + name: ' Lawrence Lepard', + profile_picture: 'https://pbs.twimg.com/profile_images/1114275000889032704/mOUsG1XC_400x400.png', + ref_id: 'bafa8935-8957-4a9f-aaaa-e45fb46615d4', + twitter_handle: 'LawrenceLepard', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/1583c7c4-f4f2-4e52-8f27-a1eaeb6289fd.jpg', + node_type: 'episode', + ref_id: '3475140b-3e58-494f-b929-59e6ec5f1636', + show_title: 'Bitcoin Magazine Podcast', + }, + { + children: ['e7094410-4a3e-43ce-8454-3eee9565878e'], + episode_title: 'CD89: Open Source Week Party Rip at Bitcoin Park with NVK, Vivek, Paul, Tony, and the Bens', + guests: [ + { + name: 'NVK', + profile_picture: 'https://pbs.twimg.com/profile_images/608402052247658497/ENDv0BNd_400x400.png', + ref_id: 'd754e29b-2d3e-4280-8d72-f41d2a465a78', + twitter_handle: 'Coinkite', + }, + { + name: 'Vivek', + profile_picture: 'https://pbs.twimg.com/profile_images/1386020558069026816/GvPjQySx_400x400.jpg', + ref_id: '742d5011-6af1-4004-b4e8-57959614b4b5', + twitter_handle: 'citadeldispatch', + }, + { + name: 'the Bens', + profile_picture: 'https://pbs.twimg.com/profile_images/1386020558069026816/GvPjQySx_400x400.jpg', + ref_id: '55580f1d-310f-47c4-9a07-2c0a4ec19ca7', + twitter_handle: 'citadeldispatch', + }, + { + name: 'Paul', + profile_picture: 'https://pbs.twimg.com/profile_images/1386020558069026816/GvPjQySx_400x400.jpg', + ref_id: 'b150b9d0-c3c3-435d-b457-a86c335c2586', + twitter_handle: 'citadeldispatch', + }, + { + name: 'Tony', + profile_picture: 'https://pbs.twimg.com/profile_images/1386020558069026816/GvPjQySx_400x400.jpg', + ref_id: '8293895d-c43c-4777-a282-d873de069fd1', + twitter_handle: 'citadeldispatch', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/a09a2c49-84f1-4d0b-b150-6e6103f4ee41.jpg', + node_type: 'episode', + ref_id: '68309686-0bf0-4156-8f95-615ba255fdc4', + show_title: 'Citadel Dispatch', + }, + { + children: ['5458df9b-3a25-4e1e-b7a0-e14daaa8d66d'], + episode_title: 'CD87: Bitcoin Dev Kit with Steve, Daniela, Alekos, and ThunderBiscuit', + guests: [ + { + name: 'ThunderBiscuit', + profile_picture: 'https://pbs.twimg.com/profile_images/1004180692794839040/qvYqY796_400x400.jpg', + ref_id: '2932056a-dad7-4618-9c8d-d275b9f150d5', + twitter_handle: 'thunderB__', + }, + { name: 'Steve', profile_picture: '', ref_id: '8602c01d-a34f-426d-b143-581f25d3d3c8', twitter_handle: '' }, + { + name: 'Daniela', + profile_picture: '', + ref_id: '7d011916-5300-4d32-a08b-fe4731bff5f2', + twitter_handle: '', + }, + { name: 'Alekos', profile_picture: '', ref_id: '9b7499d2-4c12-48c9-b8ed-614d09f0fdf2', twitter_handle: '' }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/a09a2c49-84f1-4d0b-b150-6e6103f4ee41.jpg', + node_type: 'episode', + ref_id: '52f31c46-14c5-49f1-9836-70862c6f6567', + show_title: 'Citadel Dispatch', + }, + { + children: ['e2f9e9e3-946f-44e8-a323-f43a599a3e2c'], + episode_title: 'CD79: lightning development, bugs, and the path forward', + guests: [ + { + name: 'Ben Carman', + profile_picture: 'https://pbs.twimg.com/profile_images/1550704386007089152/pLwUSeff_400x400.jpg', + ref_id: '1d1e95ba-b4af-415f-aafe-85c6dd7571b8', + twitter_handle: 'benthecarman', + }, + { + name: 'Evan Kaloudis', + profile_picture: 'https://pbs.twimg.com/profile_images/1596923848997445633/DqxrGpkW_400x400.jpg', + ref_id: '420172fa-9431-4ba4-965c-adab17648d1b', + twitter_handle: 'evankaloudis', + }, + { + name: 'Brqgoo', + profile_picture: 'https://pbs.twimg.com/profile_images/1597268344029298691/-m6_LYWF_400x400.jpg', + ref_id: '6a5e65a9-a1a6-4e73-8e54-53f168c080b6', + twitter_handle: 'brqgoo', + }, + { + name: 'Seard Salmon', + profile_picture: 'https://pbs.twimg.com/profile_images/1562116931980779521/bsHY79h-_400x400.jpg', + ref_id: '10074712-9e7d-44ee-9451-9df214834ec6', + twitter_handle: 'Seardsalmon', + }, + { + name: 'Tony g', + profile_picture: 'https://pbs.twimg.com/profile_images/1523582744609136642/02NBRq6H_400x400.jpg', + ref_id: '79cc45bb-d9c7-41da-8776-88b2a9f45bf7', + twitter_handle: 'TonyGuoga', + }, + { + name: 'Bluematt', + profile_picture: 'https://pbs.twimg.com/profile_images/697361498587451394/_rX0-O0W_400x400.png', + ref_id: '2c96fe6b-ec49-4a1d-824d-9b5d6a94a844', + twitter_handle: 'thebluematt', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/a09a2c49-84f1-4d0b-b150-6e6103f4ee41.jpg', + node_type: 'episode', + ref_id: '665facde-c1bd-4091-a071-09e28606b863', + show_title: 'Citadel Dispatch', + }, + { + children: ['5d13b0d2-3755-4363-9361-4b431f57b9c6', '87aa1d63-e44d-43f4-8b02-dfbd1fab476a'], + episode_title: 'BR015 - Lightning Experts Roundtable ft. Calle, Roy, Rijndael & t-bast', + guests: [ + { + name: 'Roy', + profile_picture: 'https://pbs.twimg.com/profile_images/1518195698323398656/v6d0knBt_400x400.jpg', + ref_id: '528205f8-c65b-4b81-8e90-64a89737acd3', + twitter_handle: 'RoyNemer', + }, + { + name: 'Calle', + profile_picture: 'https://pbs.twimg.com/profile_images/1514769710432219142/CIKDCEbq_400x400.jpg', + ref_id: 'c467552d-e3ae-4c55-a695-8369a63960bb', + twitter_handle: 'danielaacallee', + }, + { + name: 'Rijndael', + profile_picture: 'https://pbs.twimg.com/profile_images/1542705395873058817/0zsy4Yur_400x400.jpg', + ref_id: '861d5324-8ede-4059-826f-f29abca5d7e6', + twitter_handle: 'rot13maxi', + }, + { + name: 't-bast', + profile_picture: 'https://pbs.twimg.com/profile_images/1103941624843788289/Pg2rEZph_400x400.jpg', + ref_id: 'd3eacec2-0bdc-49cd-8bef-e99fa2776d3b', + twitter_handle: 'realtbast', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/cd6b8d64-bd52-4f1e-86b3-ca8ba2eb169f.jpg', + node_type: 'episode', + ref_id: '274ecab4-c5d8-4ad7-9e16-b1cb5dd39d13', + show_title: 'Bitcoin.Review', + }, + { + children: ['6f2b1717-7294-4cd3-967b-ee0930060b1c'], + episode_title: 'BR014 - On-chain Economics Experts Roundtable ft. Checkmate, Permabull & TXMC', + guests: [ + { + name: 'Checkmate', + profile_picture: 'https://pbs.twimg.com/profile_images/1572347785072226304/1RsAUOvi_400x400.png', + ref_id: '78b4085f-732c-4c40-8d8d-dbb8b64d641c', + twitter_handle: '_Checkmatey_', + }, + { + name: 'TXMC', + profile_picture: 'https://pbs.twimg.com/profile_images/1596714909307387910/Od-gB-bC_400x400.jpg', + ref_id: 'c458508a-f223-46a1-9eef-961f60c9c100', + twitter_handle: 'TXMCtrades', + }, + { + name: 'Permabull', + profile_picture: 'https://pbs.twimg.com/profile_images/1009795179102994434/SfG90ffx_400x400.jpg', + ref_id: '7aea8ebb-29e2-4ce0-b6b7-9b8364e10c58', + twitter_handle: 'PermabullNino', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/cd6b8d64-bd52-4f1e-86b3-ca8ba2eb169f.jpg', + node_type: 'episode', + ref_id: '933d3953-2983-4a8b-a4dc-e9615eeecb88', + show_title: 'Bitcoin.Review', + }, + { + children: [ + '3e106ab0-ad0d-4aa4-8ea1-0bbeb122ae78', + '18d862c2-f8bc-41c8-bea3-9b934701f0a8', + 'f779d2b8-6e89-4ddd-ae99-6d1223615400', + ], + episode_title: 'BR005 - Bitcoin Wallet Experts Roundtable ft. Odell, Bitstein & Pierre Rochard', + guests: [ + { + name: 'Charles Guillemet', + profile_picture: 'https://pbs.twimg.com/profile_images/1363770113162379265/7S1mRttg_400x400.jpg', + ref_id: 'c726ddde-836d-4f6c-9b6e-bb9e4d9365a7', + twitter_handle: 'P3b7_', + }, + { + name: 'Matt Odell', + profile_picture: 'https://pbs.twimg.com/profile_images/1421584695746338819/Z_7ZfAeP_400x400.jpg', + ref_id: '4f2825ff-3b88-4595-84d4-36e81544b79a', + twitter_handle: 'ODELL', + }, + { + name: 'Graig Raw', + profile_picture: 'https://pbs.twimg.com/profile_images/1362841242665631745/UtA3FBQU_400x400.jpg', + ref_id: '66fade84-61db-4cb1-b4a9-b759e285eb82', + twitter_handle: 'craigraw', + }, + { + name: 'Lazy Ninja', + profile_picture: 'https://pbs.twimg.com/profile_images/1362843002318721028/PNKWuu0-_400x400.jpg', + ref_id: 'f855515d-75c4-4287-9a3d-e45d7ac25ddf', + twitter_handle: 'FreedomIsntSafe', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/cd6b8d64-bd52-4f1e-86b3-ca8ba2eb169f.jpg', + node_type: 'episode', + ref_id: '8a89a96d-5877-4d00-9e11-c33d19ed7264', + show_title: 'Bitcoin.Review', + }, + { + children: ['67e86e10-e641-4eb7-a81f-0b7b2d204f4b', '6f6860cf-08b2-4c3c-96e8-dc9ef8474b37'], + episode_title: + 'BR006 - BestBuy stocks HW, Podcasting 2.0, COLDCARD, ETH Merge, ATEC608A, Mullvad VPN hardware & MORE ft. Odell, Bitsten & Pierre Rochard', + guests: [ + { + name: 'Pierre Rochard', + profile_picture: 'https://pbs.twimg.com/profile_images/1567258180861792256/EEEBkvQR_400x400.jpg', + ref_id: '426b30ba-7c24-4558-b926-ec307756a876', + twitter_handle: 'BitcoinPierre', + }, + { + name: 'Matt Odell', + profile_picture: 'https://pbs.twimg.com/profile_images/1421584695746338819/Z_7ZfAeP_400x400.jpg', + ref_id: '4f2825ff-3b88-4595-84d4-36e81544b79a', + twitter_handle: 'ODELL', + }, + { + name: 'Micheal Goldstein', + profile_picture: 'https://pbs.twimg.com/profile_images/1362578436665995266/yssI-4C__400x400.jpg', + ref_id: '1d5697ef-ac55-4685-9ee1-80d8d7c6c501', + twitter_handle: 'bitstein', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/cd6b8d64-bd52-4f1e-86b3-ca8ba2eb169f.jpg', + node_type: 'episode', + ref_id: '249e2426-55d6-473c-bbe0-4bebf74594e9', + show_title: 'Bitcoin.Review', + }, + { + children: ['5d6441cb-9fb5-465e-b297-0a66ccc5823f', 'eba87a50-4628-4106-94ae-5aee0e5f3584'], + episode_title: + 'BR011 - Podcasting 2.0 & Value-4-Value Experts Roundtable ft. Adam Curry, Oscar Merry, Gigi & Odell', + guests: [ + { + name: 'Oscar Merry', + profile_picture: 'https://pbs.twimg.com/profile_images/1385168885071089664/3VHhMawv_400x400.jpg', + ref_id: '485b9165-ae61-4698-8244-16ae10f4ccbc', + twitter_handle: 'MerryOscar', + }, + { + name: 'Gigi', + profile_picture: 'https://pbs.twimg.com/profile_images/1566370176446119943/UeuACt-4_400x400.jpg', + ref_id: '9d8917ab-730b-4b1a-8321-49fb00907644', + twitter_handle: 'dergigi', + }, + { + name: 'Matt Odell', + profile_picture: 'https://pbs.twimg.com/profile_images/1421584695746338819/Z_7ZfAeP_400x400.jpg', + ref_id: '4f2825ff-3b88-4595-84d4-36e81544b79a', + twitter_handle: 'ODELL', + }, + { + name: 'Adam Curry', + profile_picture: 'https://pbs.twimg.com/profile_images/1401922551161442307/XjN2DdFD_400x400.jpg', + ref_id: 'c304fffc-7fe0-49a1-86b8-d3278f5c89dc', + twitter_handle: 'adamcurry', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/cd6b8d64-bd52-4f1e-86b3-ca8ba2eb169f.jpg', + node_type: 'episode', + ref_id: '0f13f1e8-6031-4920-86bf-c2fbcaaed641', + show_title: 'Bitcoin.Review', + }, + { + children: ['5216f100-c7ac-4b62-91d8-e394f5a0d531'], + episode_title: 'Orange Pill [OP7] - Bitcoin is Love', + guests: [ + { + name: ' Abe Cambridge', + profile_picture: 'https://pbs.twimg.com/profile_images/1368910908282572802/MTMBCPZU_400x400.jpg', + ref_id: '5eed11cc-94e5-4e17-b923-95183699f193', + twitter_handle: 'abecambridge', + }, + { + name: 'Mitch Feierstein', + profile_picture: 'https://pbs.twimg.com/profile_images/2625988157/vky9cedsgb0mf3usbh3x_400x400.jpeg', + ref_id: 'f9a70e2b-f905-4c70-afcf-3ef7004b7cab', + twitter_handle: 'PlanetPonzi', + }, + { + name: ' Alakanani Itireleng', + profile_picture: 'https://pbs.twimg.com/profile_images/1512849723283185673/MzgEELWq_400x400.jpg', + ref_id: 'bda1bc91-3acc-4dc7-82eb-03c70f63525f', + twitter_handle: 'bitcoinlady', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/afa24463-19f7-4875-b6f4-b261d1d6c648.jpg', + node_type: 'episode', + ref_id: '993787ca-ce29-4d5b-b834-37a83ea2125a', + show_title: 'Orange Pill Podcast', + }, + { + children: ['7434dc95-111e-4fa4-81bd-6019a1249950'], + episode_title: 'Episode 6: International Payments with Stablecoins', + guests: [ + { + name: 'Fabricio Tota', + profile_picture: 'https://pbs.twimg.com/profile_images/1593923295660986368/PetsVmSs_400x400.jpg', + ref_id: 'd2b39da6-93a0-4511-98b3-3a57c9cf6491', + twitter_handle: 'ftota', + }, + { + name: 'Sebastian Serrano', + profile_picture: 'https://pbs.twimg.com/profile_images/1586767206628605954/sAcHMD2y_400x400.jpg', + ref_id: '22b37ca6-24f3-4f1e-ac19-b5c6f150499f', + twitter_handle: 'sserrano44', + }, + { + name: ' Darius Sit', + profile_picture: 'https://pbs.twimg.com/profile_images/1407598510350819328/EGiy4zAh_400x400.jpg', + ref_id: 'cc4c1681-7fdf-4404-96a5-7e7fbed467cd', + twitter_handle: 'dariussitzl', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/99d17d22-4448-4267-9065-f55b341f43d2.jpg', + node_type: 'episode', + ref_id: '72c4dd20-64fa-4d68-a0bd-ac50207ae1c0', + show_title: 'The Money Movement', + }, + { + children: ['4b80af11-a773-43bb-8ada-b5771e2cf481'], + episode_title: 'Episode 5: The Future of Corporations in the Age of Blockchains', + guests: [ + { + name: 'Jason Potts', + profile_picture: 'https://pbs.twimg.com/profile_images/1444448536947396612/MWoMpiut_400x400.jpg', + ref_id: '83de5ad8-399d-4d5e-beb6-036bc73f2e60', + twitter_handle: 'profjasonpotts', + }, + { + name: 'Aaron Wright', + profile_picture: 'https://pbs.twimg.com/profile_images/1467700275209195530/MuLAUZ7l_400x400.jpg', + ref_id: '926d7ff6-0327-49a0-811e-3f2e2db2fc5c', + twitter_handle: 'awrigh01', + }, + { + name: 'Luis Cuende', + profile_picture: 'https://pbs.twimg.com/profile_images/1590314672640630784/SniHt1kT_400x400.jpg', + ref_id: 'bf8c4b16-8bdb-4249-8e34-9c4458808890', + twitter_handle: 'licuende', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/99d17d22-4448-4267-9065-f55b341f43d2.jpg', + node_type: 'episode', + ref_id: 'cc447ce2-af39-4938-8ec8-2d70a6cfd851', + show_title: 'The Money Movement', + }, + { + children: ['61f104e1-77d8-48c4-9def-92d74cbf0d64', 'd8d7f0d9-d40b-4431-8f02-f8bf15823175'], + episode_title: 'Is Sound Money the Answer? with George Gammon (WiM268)', + guests: [ + { + name: 'George Gammon', + profile_picture: 'https://pbs.twimg.com/profile_images/1246550014450700291/2n_iHigp_400x400.jpg', + ref_id: '7ca1bc4f-3a57-4a6a-bedf-ef47a8b37297', + twitter_handle: 'GeorgeGammon', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/ca3ab815-dc2e-408a-a0c5-8bbe50270a97.jpg', + node_type: 'episode', + ref_id: '337981db-17c3-4c4e-8195-26cda6855ead', + show_title: 'The "What is Money?" Show', + }, + { + children: ['e97927cd-526b-46ef-bde2-7e60339fd4a5', '139f6af7-950d-44cd-a3fc-86cae3f86d65'], + episode_title: 'Borrowing - where is the money going? Corporate, Small Business, Government', + guests: [], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/abd94520-1490-42aa-b349-9e861494a654.jpg', + node_type: 'episode', + ref_id: 'b43f377d-6599-421b-af45-a8ecee409420', + show_title: 'Economy Guy', + }, + { + children: ['58c66464-fdd6-4f04-848b-f98021c4089c'], + episode_title: 'Government and Big Business | Peter G. Klein', + guests: [], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/58189b3c-aa25-408d-8c5e-76f97c9501da.jpg', + node_type: 'episode', + ref_id: '705db675-bc09-4cba-b578-e9904f339f55', + show_title: 'Mises University 2017', + }, + { + children: ['5e1c63cb-adb2-4e52-a529-324dcb9d6632', '9020a99f-62d8-462a-81aa-515e31bb5536'], + episode_title: "Debating Professor Hanke on Bitcoin's value", + guests: [ + { + name: 'Hong Fang', + profile_picture: 'https://pbs.twimg.com/profile_images/1554126711502999553/EkTARSpF_400x400.jpg', + ref_id: '9adabc40-bbc7-44aa-8a11-c139f3697f80', + twitter_handle: 'hfangca', + }, + { + name: 'Saifedean Ammous', + profile_picture: 'https://pbs.twimg.com/profile_images/1362635264158552067/CSsOKrBd_400x400.jpg', + ref_id: 'a61d4df9-1db4-4bdc-a7e9-a4c99268e59b', + twitter_handle: 'saifedean', + }, + { + name: 'Professor Steve Hanke', + profile_picture: 'https://pbs.twimg.com/profile_images/915395033871867905/3zbE7bAT_400x400.jpg', + ref_id: '4a754eea-7f67-46d0-b4d2-f0aa58aba36e', + twitter_handle: 'steve_hanke', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/5cdd0aef-f1a7-4d3b-8336-7f81c2db4a40.jpg', + node_type: 'episode', + ref_id: 'a12faf50-f4fb-472d-b3a1-030747594fa5', + show_title: 'The Bitcoin Standard Podcast', + }, + { + children: ['a2b5f8c4-37aa-4931-951e-87416315eeab'], + episode_title: 'Classic 14: One Up on Wall Street', + guests: [], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/4bb9069b-a373-4b1c-9cda-024b2bf4dc84.jpg', + node_type: 'episode', + ref_id: '87054fe7-6a5c-471a-b518-5e9414d0c644', + show_title: 'We Study Billionaires - The Investor’s Podcast Network', + }, + { + children: ['3bfbecac-2ad1-4983-9ed0-f1e48f1f0149'], + episode_title: '#24 Decoding M2 (Non-M1): Money supply USA', + guests: [], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/3325efce-80a8-490c-8645-cad1b9a22d94.jpg', + node_type: 'episode', + ref_id: '04dd4023-ed42-4259-921c-e305af656389', + show_title: 'Crypto Voices', + }, + { + children: ['f6e48088-be00-4596-8731-433c94a02ddb'], + episode_title: 'BUC Live: Lightning Hardware and Nodes Panel from The Lightning Conference Berlin', + guests: [ + { + name: 'ketominer', + profile_picture: 'https://pbs.twimg.com/profile_images/1245972079528329218/YDUD9N2Q_400x400.jpg', + ref_id: '2f8b0b59-6f23-4c89-973c-668cc7666998', + twitter_handle: 'ketominer', + }, + { + name: 'Stacie Waleyco', + profile_picture: 'https://pbs.twimg.com/profile_images/1490885395390861317/MOzYmFOn_400x400.jpg', + ref_id: 'd4292662-08f9-4b16-a889-b61a401edcc2', + twitter_handle: 'satsie', + }, + { + name: 'Christian Rotzoll', + profile_picture: 'https://pbs.twimg.com/profile_images/1593996559162773504/qKZTYL0I_400x400.jpg', + ref_id: '8c13f2e9-d81a-4116-9ad7-d14a66d5f899', + twitter_handle: 'rtzll', + }, + { + name: 'Sebastian Küng', + profile_picture: 'https://abs.twimg.com/sticky/default_profile_images/default_profile_400x400.png', + ref_id: '04448652-5b1f-480c-a573-17c7de956e2c', + twitter_handle: 'sebastiankueng', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/357dc2db-2643-49f0-9393-5a20ed21d0fe.jpg', + node_type: 'episode', + ref_id: 'c6ecd519-ce8f-45b5-89ca-30a6a017f5d6', + show_title: 'The Anita Posch Show: A Bitcoin only podcast', + }, + { + children: ['7b4a8ab4-5254-4195-8546-183e6a078a7a'], + episode_title: 'Quoth the Raven #237 - Jake Ducey', + guests: [], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/710ac70a-11fc-40ec-a2a2-01b92fb8015e.jpg', + node_type: 'episode', + ref_id: 'b94dbd49-6ac1-497c-8f5b-d13140968920', + show_title: 'Quoth the Raven', + }, + { + children: ['55e562c3-41d2-4bfb-94d5-26ac7098ba2f'], + episode_title: 'How to Address Regulations Suspended During the COVID-19 Crisis', + guests: [], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/da1bbdc0-4d0a-43ed-8345-ee43102db244.jpg', + node_type: 'episode', + ref_id: '406ce1e1-5f39-4c94-907c-eb5e501d2c64', + show_title: 'Mercatus Policy Download', + }, + { + children: [ + 'e2a347d3-a7ce-4200-836e-0c3df94980ce', + 'd266ac59-706d-4b4c-b0ca-d9ea3ae4fc34', + '2485d5dc-6159-4638-aef1-e645f226a8a1', + ], + episode_title: 'Ep. 514 The Future of Crypto in the Media with Blockchain Boy', + guests: [ + { + name: 'Lucas Dimos', + profile_picture: 'https://pbs.twimg.com/profile_images/1092408696838197250/n0-St2nZ_400x400.jpg', + ref_id: '9ac17e2f-49bd-4fc5-bfe5-2f380ca63574', + twitter_handle: 'lucasdimos', + }, + { + name: 'Blockchain Boy', + profile_picture: 'https://pbs.twimg.com/profile_images/1602154101642592256/A0OX97CT_400x400.jpg', + ref_id: '4b070a6f-bcc8-4708-abaf-cc830709600f', + twitter_handle: 'BlockchainBoyy', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/93a6fe5b-364c-43f4-9f38-7da3e811460b.jpg', + node_type: 'episode', + ref_id: '9585c916-c55a-4284-b348-f8a52c24dc8d', + show_title: 'CRYPTO 101', + }, + { + children: ['22add7db-9562-44a4-a883-52f4d87d48f5', '7fb2989d-f3f8-4e89-b1bb-66e08ed2f294'], + episode_title: 'Ep. 494 The Facts About Using Leverage when Trading Crypto', + guests: [ + { + name: 'Antonio Juliano', + profile_picture: 'https://pbs.twimg.com/profile_images/1486890878694133761/85ev-DD6_400x400.jpg', + ref_id: '025d2715-f5e7-4ba1-884c-45ba1e7770c5', + twitter_handle: 'antoniomjuliano', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/93a6fe5b-364c-43f4-9f38-7da3e811460b.jpg', + node_type: 'episode', + ref_id: '1d938eb2-3bc2-4268-85d1-8967a1292a18', + show_title: 'CRYPTO 101', + }, + { + children: [ + '8d9636c6-d564-47e0-89b6-5b9f87b27a34', + '56ded69f-9178-41fb-a466-b3f270175343', + 'be782fc1-f095-4012-8711-f27a9cbb4e8b', + ], + episode_title: 'Breaking Away: On Secession and Small States', + guests: [], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/6ec51741-3d93-4116-a619-d62a7cee1feb.jpg', + node_type: 'episode', + ref_id: '50ab3e37-ccb3-4902-825b-a9da36579707', + show_title: 'Radio Rothbard', + }, + { + children: [ + '6537e3ab-da86-41c5-acac-2e513ce23634', + '6e2a0132-8291-4ea4-b1a8-dc87c0adf527', + '3dacb7c8-34d2-4e73-8064-5d53c6857239', + 'bda964fc-b276-490e-98b6-3009769f941e', + ], + episode_title: 'Andrew Frazier on Running Your Business', + guests: [], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/f2b2a2b2-8869-4256-94b9-a91c91c1ce7e.jpg', + node_type: 'episode', + ref_id: '8ec14282-c5bc-4da6-b516-3140efaf6b8f', + show_title: 'Economics For Business', + }, + { + children: ['10cc2a43-918c-477f-a29c-de6fa5ddc79e'], + episode_title: 'Diana Jones: The New Management Model — Guarding Group Relationships', + guests: [], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/f2b2a2b2-8869-4256-94b9-a91c91c1ce7e.jpg', + node_type: 'episode', + ref_id: '2fee3ffd-e6f5-4fbf-9cac-2b8977b93b79', + show_title: 'Economics For Business', + }, + { + children: ['cd0d29e6-af1f-4a94-8fc9-cc38a719807b'], + episode_title: '13. Monopoly and Competition', + guests: [], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/ef62c7ab-ef09-47b7-9af4-2ebe2384a72f.jpg', + node_type: 'episode', + ref_id: 'a77be405-8402-477a-9d72-b96d1e7ea63b', + show_title: 'Austrian Economics: An Introductory Course', + }, + { + children: ['99fc3f47-1cb2-449e-bd46-97a597fce97a'], + episode_title: '5. The Profit Motive', + guests: [], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/ef62c7ab-ef09-47b7-9af4-2ebe2384a72f.jpg', + node_type: 'episode', + ref_id: '32aad837-d99a-4b5a-b6ea-e12c590b925a', + show_title: 'Austrian Economics: An Introductory Course', + }, + { + children: ['bdc4757d-1e87-4fa3-b293-6f375af8490f'], + episode_title: 'TheMacroView Episode #3: Financial Entanglement', + guests: [], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/8e52e9c4-52e8-4dea-8ed9-8c6a7fcef25a.jpg', + node_type: 'episode', + ref_id: '62e4eee0-25ba-495a-a7e6-dd0685a75d13', + show_title: 'The Macro View', + }, + { + children: ['7eca97d5-7a23-4e41-8e04-cfffdef85f06', '9ac59d0a-2e8d-430b-87e4-493026d9cbe3'], + episode_title: 'TheMacroView Episode 4: Access to Capital', + guests: [], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/8e52e9c4-52e8-4dea-8ed9-8c6a7fcef25a.jpg', + node_type: 'episode', + ref_id: '23ea78f2-8e21-42fe-980a-8c6ff04c2748', + show_title: 'The Macro View', + }, + { + children: ['7ace464e-d855-496a-a80a-b6e7ccb0f12e'], + episode_title: 'TheMacroView Episode 32: Understanding Financial Markets Part 5 of 5', + guests: [], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/8e52e9c4-52e8-4dea-8ed9-8c6a7fcef25a.jpg', + node_type: 'episode', + ref_id: 'b51b127d-9641-42a7-aac5-bd5b1228f52a', + show_title: 'The Macro View', + }, + { + children: ['d67cf7af-79a8-457e-b65b-293fb279dcfe'], + episode_title: ' #14: Julia Reinhardt - What do GDPR and AI regulations mean for Silicon Valley?', + guests: [], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/3ab6c599-bbcd-4c8f-beef-bcf509ed4afa.jpg', + node_type: 'episode', + ref_id: 'f18bb143-9582-41f3-b65b-1dbe8de6cfc3', + show_title: 'Voices of the Data Economy', + }, + { + children: ['167a7be2-f14b-455a-9c20-95057af5ea7d'], + episode_title: 'Dr. Norm Robillard - SIBO, Digestion, and Gut Health on Carnivore/Keto', + guests: [], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/5e0220b3-7c70-4423-bb76-3b75bc132fad.jpg', + node_type: 'episode', + ref_id: '14dbb9b7-ec35-49e5-bbb9-1f2d626a5d6f', + show_title: 'Carnivore Cast', + }, + { + children: ['51ef662a-201f-4c3c-b60d-bbc627c74e8e'], + episode_title: 'Life in Interesting Times - Part 1', + guests: [ + { + name: 'Matt Murray', + profile_picture: 'https://pbs.twimg.com/profile_images/1273726156236140544/SJjI1WD7_400x400.jpg', + ref_id: '72ce0a76-8593-4898-9369-f39b4bc3d2d3', + twitter_handle: 'MattMurray28', + }, + { + name: 'Louise Reynolds', + profile_picture: 'https://pbs.twimg.com/profile_images/602592582754050048/RbAMd-Re_400x400.jpg', + ref_id: 'b4c2b12b-96a1-4d37-ae74-5be0883f3091', + twitter_handle: 'reynoldslouise', + }, + { + name: 'Jon Slaughter', + profile_picture: 'https://pbs.twimg.com/profile_images/1336713360/samantha_test_090_400x400.jpg', + ref_id: 'a295820c-0098-433a-8cc3-cc13085b85c8', + twitter_handle: 'jonslaughtermd', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/a8e3517b-b44d-4270-adaa-57587896b1e7.jpg', + node_type: 'episode', + ref_id: 'c6996d2f-8541-4622-968f-4e4dee7f78e4', + show_title: 'Keto Life Support', + }, + { + children: ['2bf2f8fe-9d2f-4d41-838d-787f2ca9734e'], + episode_title: 'Q&A: Kim & Dr Ken Berry', + guests: [], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/a8e3517b-b44d-4270-adaa-57587896b1e7.jpg', + node_type: 'episode', + ref_id: '41f7e1a4-f5b9-4a7e-8dbd-ee3fcb15260f', + show_title: 'Keto Life Support', + }, + { + children: ['22824927-75e2-4592-9876-6f271258bf9c'], + episode_title: 'Bitcoin TA, Bitcoins Future, & Bitcoin Explained by Tone Vays @ Brisbane Bitcoin Meetup', + guests: [ + { + name: 'Willy Woo', + profile_picture: 'https://pbs.twimg.com/profile_images/1600775715892432896/c1rFKYSz_400x400.jpg', + ref_id: 'b0d7c243-e94d-40d6-a844-f0da905c4356', + twitter_handle: 'woonomic', + }, + { + name: 'Tyler Jenks', + profile_picture: 'https://abs.twimg.com/sticky/default_profile_images/default_profile_400x400.png', + ref_id: '5b920cbf-7be2-4380-9c3c-87e99d8b7612', + twitter_handle: 'Tylerjenks', + }, + { + name: 'Tai Zen', + profile_picture: 'https://pbs.twimg.com/profile_images/712935760085659648/0_mfEI59_400x400.jpg', + ref_id: 'f0e33df4-8524-460a-88a5-e4ebf6f5149e', + twitter_handle: 'Taizen', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/4ae5cf53-106f-4ba8-9a77-3ef1de3b44b6.jpg', + node_type: 'episode', + ref_id: '4b228b78-99c7-4884-b91d-9dc711bde8e6', + show_title: 'Trading Bitcoin: The Tone Vays Podcast', + }, + { + children: ['1806f209-3cd6-496a-baf3-0351b7f432aa'], + episode_title: 'Cryptocurrency Price Volatility and Bitcoin Store-of-value', + guests: [], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/1c3fe064-f637-41ea-8a4b-a533ef5985b1.jpg', + node_type: 'episode', + ref_id: '556a9506-357d-4dea-a6bb-75f391f7340d', + show_title: 'aantonop', + }, + { + children: ['3dff5b59-31e0-4ce9-8add-c8a2ba564259', '0bb19102-ebb2-4519-ac7a-e6e69593a091'], + episode_title: '#Bitcoin Kenya 🇰🇪 - meet the Kenya Bitcoin community', + guests: [ + { + name: 'Noelyne Sumba', + profile_picture: 'https://pbs.twimg.com/profile_images/1585949523901292545/tWf-IwWO_400x400.jpg', + ref_id: '44455b1d-76cf-49df-baa0-cd606652885b', + twitter_handle: 'noelynesumba', + }, + { + name: 'Okjodom', + profile_picture: 'https://pbs.twimg.com/profile_images/1577811376487088128/J2Z4nIgI_400x400.jpg', + ref_id: '4c9df92d-3bb5-4d08-9a7e-a9ba15f58f03', + twitter_handle: 'okjodom', + }, + { + name: 'Master Guantai', + profile_picture: 'https://pbs.twimg.com/profile_images/1521025685078302720/w9dZwehS_400x400.jpg', + ref_id: '64c326c4-d4a9-4e6c-82fe-0c9bac8a7094', + twitter_handle: 'MasterGuantai', + }, + { + name: 'Lorraine Marcel', + profile_picture: 'https://pbs.twimg.com/profile_images/2361719231/German_sheperd_Puppies_400x400.jpg', + ref_id: 'ab30679d-7931-4921-a4f8-6fee74e412c8', + twitter_handle: 'lorrainemarcel1', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/56bbafde-60ef-4e4b-b930-978429c6a635.jpg', + node_type: 'episode', + ref_id: '1b47b05f-8f86-4e19-9694-d4255e9e89ac', + show_title: 'Global Bitcoin Fest', + }, + { + children: ['1aec7881-31ab-4c1c-9f79-800cb8379ca1'], + episode_title: 'The Orange Sun 🌞 Does Price = Value? #Bitcoin', + guests: [ + { + name: 'ToxiKat27', + profile_picture: 'https://pbs.twimg.com/profile_images/1505791887415730177/d0YDQ3Xc_400x400.jpg', + ref_id: '50023cce-8a6f-4974-ad3b-fd7a9c0abf19', + twitter_handle: 'ToxiKat27', + }, + { + name: 'AnuragSaikia', + profile_picture: 'https://pbs.twimg.com/profile_images/1016367353762852864/gDL5h8jh_400x400.jpg', + ref_id: '0bb60736-56c5-4964-a9c3-e881b0b313b6', + twitter_handle: 'AnuragSaikia', + }, + { + name: 'fnicencool', + profile_picture: 'https://pbs.twimg.com/profile_images/1600143435775856641/uqgmtT23_400x400.jpg', + ref_id: 'bfef6a55-2d08-407e-b147-e04d68af7dd6', + twitter_handle: 'fnicencool', + }, + { + name: 'MrlamilamiKosch', + profile_picture: 'https://pbs.twimg.com/profile_images/1538403135101800450/sO-RPI9U_400x400.jpg', + ref_id: 'f8c8f97a-f79a-4950-8e3d-d2e94d27b3c8', + twitter_handle: 'MrlamilamiKosch', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/9b2e17f2-71c5-4f1e-a3e7-720d06dab810.jpg', + node_type: 'episode', + ref_id: 'a0826cdb-6198-4416-bd12-1dd5aa09a075', + show_title: 'Satoshi’s Journal', + }, + { + children: [ + 'bd8acc65-31a6-4d6c-93e2-cb91d3909825', + '51926635-4d2a-47d0-9e11-62c173898631', + 'b8080ee6-90b2-4f75-8c69-79510c82aa08', + '9f2d3be4-e7df-4b86-981c-466bde0d92ad', + ], + episode_title: 'The Orange 🌞 Reading/Discussion "The Book of Satoshi" & Bitcoin News', + guests: [ + { + name: 'CouncilmannJamm', + profile_picture: 'https://pbs.twimg.com/profile_images/1251040014152024066/dD3b2eA4_400x400.jpg', + ref_id: '6c989c2c-d24d-49a2-8eb1-1d2f1c47f347', + twitter_handle: 'jamm_councilman', + }, + { + name: 'thotsnplayerz', + profile_picture: 'https://pbs.twimg.com/profile_images/1608733749663109120/wwYEZgF2_400x400.jpg', + ref_id: '66bbe365-9e85-4c34-9d51-39d8b49937b7', + twitter_handle: 'thotsnplayerz', + }, + { + name: 'Will Schoellkopf', + profile_picture: 'https://pbs.twimg.com/profile_images/1487515153302130691/t5sDMzZW_400x400.jpg', + ref_id: '461e2245-1672-4fa1-94f5-7aaf1afa531f', + twitter_handle: 'realBitcoinDog', + }, + { + name: 'OKIN_17', + profile_picture: 'https://pbs.twimg.com/profile_images/1518945775685967873/O0wPrIKO_400x400.jpg', + ref_id: 'dbcdeab8-4824-43f7-aeb8-2b9eda6cbbad', + twitter_handle: 'OKIN_17', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/9b2e17f2-71c5-4f1e-a3e7-720d06dab810.jpg', + node_type: 'episode', + ref_id: 'c6447277-9a58-411f-85e1-5ac166884ce5', + show_title: 'Satoshi’s Journal', + }, + { + children: ['ed128fbb-3ad8-4d26-921c-495edfda3cbd'], + episode_title: 'The Orange Sun 🌞 Interview with Nzonda Fotsing Sr. #Bitcoin', + guests: [ + { + name: 'TK☣️Ph.Ple₿', + profile_picture: 'https://pbs.twimg.com/profile_images/1505791887415730177/d0YDQ3Xc_400x400.jpg', + ref_id: '9e3ffa2c-9410-48e9-a726-8312c0abcd7c', + twitter_handle: 'ToxiKat27', + }, + { + name: 'Funsho Jimoh', + profile_picture: 'https://pbs.twimg.com/profile_images/1600143435775856641/uqgmtT23_400x400.jpg', + ref_id: 'a237ffb0-792b-484e-b12f-65a2b679eaf1', + twitter_handle: 'fnicencool', + }, + { + name: 'Heritage Falodun', + profile_picture: 'https://pbs.twimg.com/profile_images/1510397558652350469/jYOl00tU_400x400.jpg', + ref_id: 'b2bcc65a-b060-4dbe-b9ac-a7d64a11d2ac', + twitter_handle: 'herrytheeagle', + }, + { + name: 'Nzonda Fotsing Sr', + profile_picture: 'https://pbs.twimg.com/profile_images/1458565804291670016/XaLi8e6a_400x400.jpg', + ref_id: '53fe4486-5ef3-4988-8ada-47c3cb1c2d51', + twitter_handle: 'BitcoinSophist', + }, + { + name: 'ROB', + profile_picture: 'https://pbs.twimg.com/profile_images/1605484577669074946/CkYjFUxH_400x400.jpg', + ref_id: '25c5f080-fd07-4b37-9014-7fc05419edce', + twitter_handle: 'robertlamonta15', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/9b2e17f2-71c5-4f1e-a3e7-720d06dab810.jpg', + node_type: 'episode', + ref_id: '8418f2a4-1874-403a-9e58-7a76a8e09d4f', + show_title: 'Satoshi’s Journal', + }, + { + children: [ + '663836ff-8d5a-4037-a62f-72568fff46f1', + '6cbed027-125f-454c-b03a-865df0b60d36', + '63cc2dff-cc56-40e2-8c22-93153e7d3255', + ], + episode_title: 'The Orange Sun ☀️ #Bitcoin News and Talk', + guests: [ + { + name: 'Portland Hodl', + profile_picture: 'https://pbs.twimg.com/profile_images/1562306406526492672/LiqmI9NS_400x400.jpg', + ref_id: '530aba21-392f-4156-9e91-4fc5c76fced1', + twitter_handle: 'PortlandHODL', + }, + { + name: 'Miykael Woodward', + profile_picture: 'https://pbs.twimg.com/profile_images/1473433558475689985/CM0o3oWu_400x400.jpg', + ref_id: '6fe02a78-4f07-47e7-8e64-b278a3167835', + twitter_handle: 'MiykaelWoodward', + }, + { + name: 'Okin Mobi', + profile_picture: 'https://pbs.twimg.com/profile_images/1518945775685967873/O0wPrIKO_400x400.jpg', + ref_id: 'bbd18918-7758-4bdb-b9a5-641bf92748a6', + twitter_handle: 'OKIN_17', + }, + { + name: 'TK☣️Ph.Ple₿', + profile_picture: 'https://pbs.twimg.com/profile_images/1505791887415730177/d0YDQ3Xc_400x400.jpg', + ref_id: '9e3ffa2c-9410-48e9-a726-8312c0abcd7c', + twitter_handle: 'ToxiKat27', + }, + { + name: 'Funsho Jimoh', + profile_picture: 'https://pbs.twimg.com/profile_images/1600143435775856641/uqgmtT23_400x400.jpg', + ref_id: 'a237ffb0-792b-484e-b12f-65a2b679eaf1', + twitter_handle: 'fnicencool', + }, + { + name: 'prince ogbonna', + profile_picture: 'https://pbs.twimg.com/profile_images/1595693872637681664/TeWJzTut_400x400.jpg', + ref_id: '0b0c70b1-23b1-4d98-b259-6dbb67b7481d', + twitter_handle: 'princejoj0', + }, + { + name: 'The Bitcoin Village', + profile_picture: 'https://pbs.twimg.com/profile_images/1544318244789649410/kQ2G1MCE_400x400.jpg', + ref_id: 'd894aca4-36f6-4821-a00b-a4e860b19502', + twitter_handle: 'VillageBitcoin', + }, + { + name: 'Masterguantai', + profile_picture: 'https://pbs.twimg.com/profile_images/1521025685078302720/w9dZwehS_400x400.jpg', + ref_id: '29baf525-42eb-41a6-98f9-a0d6b4480af0', + twitter_handle: 'MasterGuantai', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/9b2e17f2-71c5-4f1e-a3e7-720d06dab810.jpg', + node_type: 'episode', + ref_id: 'a7dcf3bf-b9f2-41f1-a3f3-ffd2db3a0b96', + show_title: 'Satoshi’s Journal', + }, + { + children: [ + '754762ac-7680-4b80-9ff4-f314ae65d146', + 'd8a44c3b-6219-49d5-9a35-4b2ca5972d7c', + 'da54483f-f9f4-4c4b-9320-6ba317e64b44', + ], + episode_title: "The Orange Sun 🌞 Let's talk #Bitcoin & Cattle Ranching/Sustainability", + guests: [ + { + name: 'Texas Slim', + profile_picture: 'https://pbs.twimg.com/profile_images/1589784780970795011/02jf0fqp_400x400.jpg', + ref_id: 'b4448c8e-9238-4aba-bd25-efb329ea5a72', + twitter_handle: 'modernTman', + }, + { + name: 'Lucas', + profile_picture: 'https://pbs.twimg.com/profile_images/1596345084966014976/maviSGq3_400x400.jpg', + ref_id: 'e3adb591-b29f-435b-bd34-210f2dbcedaa', + twitter_handle: 'impossiblyso', + }, + { + name: 'Firebust', + profile_picture: 'https://pbs.twimg.com/profile_images/1517827165198458880/N79Wpx85_400x400.jpg', + ref_id: '0fb6c7f3-a673-4fe5-9599-8165800a2ff0', + twitter_handle: 'FireBursts', + }, + { + name: 'Hamza Yusuf', + profile_picture: 'https://pbs.twimg.com/profile_images/1318064165030940672/sakbSOvT_400x400.jpg', + ref_id: '03a74669-b653-4c57-8799-a312cb041089', + twitter_handle: 'Hamzayu28849293', + }, + { + name: "Adenekan's Father", + profile_picture: 'https://pbs.twimg.com/profile_images/1505572078023495683/Wo_pJvTU_400x400.jpg', + ref_id: 'b8259997-2ef0-4e6e-8d58-a69b5eda550a', + twitter_handle: 'AdenekanFatai4', + }, + { + name: 'Adenekan', + profile_picture: 'https://pbs.twimg.com/profile_images/1505572078023495683/Wo_pJvTU_400x400.jpg', + ref_id: 'ca6a563e-0e84-4811-be82-a3b3cd12d399', + twitter_handle: 'AdenekanFatai4', + }, + { + name: 'Heritage', + profile_picture: 'https://pbs.twimg.com/profile_images/1510397558652350469/jYOl00tU_400x400.jpg', + ref_id: '98a6d9df-3c39-49ec-8a39-074e61af4ece', + twitter_handle: 'herrytheeagle', + }, + { + name: 'Enoch', + profile_picture: 'https://pbs.twimg.com/profile_images/1596235105663533056/5mRUbLm3_400x400.jpg', + ref_id: '4f8af040-3d0c-49c1-806e-aef89d8693fb', + twitter_handle: 'KazEnoch', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/9b2e17f2-71c5-4f1e-a3e7-720d06dab810.jpg', + node_type: 'episode', + ref_id: '47406d36-917a-47f7-b89e-26181d6070bc', + show_title: 'Satoshi’s Journal', + }, + { + children: [ + '1984e7b9-23f1-4ef0-8fcb-deac4ef23cc7', + '7a7c8427-a11e-438b-ac49-345882ca9a3f', + '5e6d5d88-bdb0-4350-8c03-13b0a24d3050', + '5483d49e-fa1a-430c-9d2a-ed11e3a6beec', + ], + episode_title: 'The Orange Sun 🌞 VISA, MasterCard & #Bitcoin #BOLT12', + guests: [ + { + name: 'Oluwasegun Kosemani', + profile_picture: 'https://pbs.twimg.com/profile_images/1538403135101800450/sO-RPI9U_400x400.jpg', + ref_id: '25ce4b90-6689-4dd9-84b6-240c7bcbe407', + twitter_handle: 'MrlamilamiKosch', + }, + { + name: '~₿ Maxi~', + profile_picture: 'https://pbs.twimg.com/profile_images/1446241859651637250/i67F3y9p_400x400.jpg', + ref_id: 'ad997ae7-0726-431a-9f72-82da091c0658', + twitter_handle: 'fede0891', + }, + { + name: 'TK☣️Ph.Ple₿', + profile_picture: 'https://pbs.twimg.com/profile_images/1505791887415730177/d0YDQ3Xc_400x400.jpg', + ref_id: '9e3ffa2c-9410-48e9-a726-8312c0abcd7c', + twitter_handle: 'ToxiKat27', + }, + { + name: 'FireBurs†s', + profile_picture: 'https://pbs.twimg.com/profile_images/1517827165198458880/N79Wpx85_400x400.jpg', + ref_id: 'cda1d3ad-dd80-458b-a5fb-a28861df10a7', + twitter_handle: 'FireBursts', + }, + { + name: 'Nikolai Tjongarero', + profile_picture: 'https://pbs.twimg.com/profile_images/1578458155964682274/_SzDxkAJ_400x400.jpg', + ref_id: '821ee040-2267-454e-a59a-92da51568afa', + twitter_handle: 'BitcoinNaijaShw', + }, + { + name: 'ブランドン', + profile_picture: 'https://pbs.twimg.com/profile_images/834861311762649090/N0KAP4zH_400x400.jpg', + ref_id: '3d41531d-6a59-4771-81f9-0924b4c02561', + twitter_handle: 'blario', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/9b2e17f2-71c5-4f1e-a3e7-720d06dab810.jpg', + node_type: 'episode', + ref_id: 'dc7b8177-4cef-4da2-bb05-b12dfe4c05bb', + show_title: 'Satoshi’s Journal', + }, + { + children: [ + 'e4520df5-b812-4247-bd2d-7db10bc5b51f', + '7eea8bdf-2873-4759-b53b-a207aa8bcdcf', + '4f0b1fbc-47f6-49c7-afe1-4978eabe5c4a', + ], + episode_title: 'TOXIC HAPPY HOUR! #Bitcoin, Foss, Max Keiser & the Plebs! 🍻😂', + guests: [ + { + name: 'Greg Foss', + profile_picture: 'https://pbs.twimg.com/profile_images/1552599670945464320/3OgqRHNo_400x400.jpg', + ref_id: '853d9f80-f6cf-490f-9d1e-f29cdc6acc6f', + twitter_handle: 'FossGregfoss', + }, + { + name: 'Jeff Ross', + profile_picture: 'https://pbs.twimg.com/profile_images/1475554600094552064/DSlPG1lx_400x400.jpg', + ref_id: 'ae6ee2a2-1cf7-41a0-8366-ff6e94a6403c', + twitter_handle: 'VailshireCap', + }, + { + name: 'Craig Shipp', + profile_picture: 'https://pbs.twimg.com/profile_images/1605961563420114945/MWGqR1Gm_400x400.jpg', + ref_id: '8d6ca47a-89a2-4331-bae4-2fae18055a95', + twitter_handle: 'CraigShipp', + }, + { + name: 'Oluwasegun Kosemani', + profile_picture: 'https://pbs.twimg.com/profile_images/1538403135101800450/sO-RPI9U_400x400.jpg', + ref_id: '25ce4b90-6689-4dd9-84b6-240c7bcbe407', + twitter_handle: 'MrlamilamiKosch', + }, + { + name: 'Max Keiser', + profile_picture: 'https://pbs.twimg.com/profile_images/1361873587582472195/y57DiTYX_400x400.jpg', + ref_id: '743efd07-d194-4c74-8663-45c3b8646b8e', + twitter_handle: 'Maxkeiser', + }, + { + name: 'Isabel Foxen Duke', + profile_picture: 'https://pbs.twimg.com/profile_images/1466874333410717698/WRQh2-_m_400x400.jpg', + ref_id: '58989d4a-4a96-4ffc-8cbe-f233ffb10420', + twitter_handle: 'isabelfoxenduke', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/0c42d408-e518-4ecf-b282-d864a8c14002.jpg', + node_type: 'episode', + ref_id: 'fb60247a-9b2e-41d4-83f4-f4cf92eb20f4', + show_title: 'PUBLORD', + }, + { + children: [ + '4491ca29-82ab-4599-8d39-039653b35aa3', + 'd65c7fdb-df02-4bef-a6e6-8d214f6284d4', + 'fbefee4e-b2e3-4635-88ac-800d3482e9f8', + 'c09cfdab-f18f-45ad-9542-bd095f3ef52a', + '17d338d5-a11d-405f-bbc1-257b4e145723', + ], + episode_title: 'TOXIC HAPPY HOUR! #Bitcoin, Pysh, Booth, BTC Ben & the Plebs! 🍻😂', + guests: [ + { + name: 'Jeff Booth', + profile_picture: 'https://pbs.twimg.com/profile_images/1362957991410954241/spiaMAg2_400x400.jpg', + ref_id: 'f1143bcc-9ab9-4716-8259-0e5b026f8039', + twitter_handle: 'JeffBooth', + }, + { + name: 'George Gammon', + profile_picture: 'https://pbs.twimg.com/profile_images/1246550014450700291/2n_iHigp_400x400.jpg', + ref_id: '7ca1bc4f-3a57-4a6a-bedf-ef47a8b37297', + twitter_handle: 'GeorgeGammon', + }, + { + name: 'Neil Jacobs', + profile_picture: 'https://pbs.twimg.com/profile_images/1593645788978102277/UAQCQKeE_400x400.jpg', + ref_id: '0bc759e0-b055-4800-a79d-2b950fe5cc53', + twitter_handle: 'NeilJacobs', + }, + { + name: 'Preston Pysh', + profile_picture: 'https://pbs.twimg.com/profile_images/1408783276081299462/f4Ye5n7-_400x400.jpg', + ref_id: '01ad2c81-2d0c-44a9-93a1-42c07287aa80', + twitter_handle: 'PrestonPysh', + }, + { + name: 'Brian', + profile_picture: 'https://pbs.twimg.com/profile_images/1589300685182570500/cTffQlpJ_400x400.jpg', + ref_id: 'b167b1cd-bbce-4839-a03c-194f006f954d', + twitter_handle: 'BrianTheDrumer', + }, + { + name: 'BTC Ben', + profile_picture: 'https://pbs.twimg.com/profile_images/1348015880664473610/S-uDNLlZ_400x400.jpg', + ref_id: '2c95b3dd-e3a2-4cf0-a49e-a8915d2bfcd5', + twitter_handle: 'bensemchee', + }, + { + name: 'Craig Shipp', + profile_picture: 'https://pbs.twimg.com/profile_images/1605961563420114945/MWGqR1Gm_400x400.jpg', + ref_id: '8d6ca47a-89a2-4331-bae4-2fae18055a95', + twitter_handle: 'CraigShipp', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/0c42d408-e518-4ecf-b282-d864a8c14002.jpg', + node_type: 'episode', + ref_id: '87a2efa8-6b4c-486d-8511-d6a95cb84514', + show_title: 'PUBLORD', + }, + { + children: ['28845fb4-d3b9-4615-af36-f3f3862d93f7', 'c9e43dce-1fac-4545-be91-7aa8594fa7e6'], + episode_title: 'TOXIC HAPPY HOUR! #Bitcoin is Easy Like Sunday Morning! 🍻😂', + guests: [ + { + name: ' 2140data', + profile_picture: 'https://pbs.twimg.com/profile_images/1598330787778232320/ZVFcRtet_400x400.jpg', + ref_id: 'c8fb52d1-fa69-410d-bf96-8a7559bba863', + twitter_handle: '2140data', + }, + { + name: 'Tomer Strolight', + profile_picture: 'https://pbs.twimg.com/profile_images/1591960241008148481/HtyINxtU_400x400.jpg', + ref_id: '3a2bc97d-072c-4ed9-9a59-17ceeb68fe99', + twitter_handle: 'TomerStrolight', + }, + { + name: ' TC', + profile_picture: 'https://pbs.twimg.com/profile_images/1480160632360124416/AM_vVRko_400x400.jpg', + ref_id: 'dac0717a-a743-40d4-a89f-7523f071bbb0', + twitter_handle: 'publordhodl', + }, + { + name: ' kann b', + profile_picture: 'https://pbs.twimg.com/profile_images/1480160632360124416/AM_vVRko_400x400.jpg', + ref_id: '1170bde7-7f3c-4c4f-a158-5c48a98fe92b', + twitter_handle: 'publordhodl', + }, + { + name: ' Dallas Rushing', + profile_picture: 'https://pbs.twimg.com/profile_images/1602759767029604352/hzuwh5ZB_400x400.jpg', + ref_id: '13fed037-77ce-48eb-9544-25e7abff9395', + twitter_handle: 'dallasirushing', + }, + { + name: ' Lisa Hough', + profile_picture: 'https://pbs.twimg.com/profile_images/1541581547815436288/Li8wORWt_400x400.jpg', + ref_id: '5e154adf-d8bd-4adf-a23b-47a51c183163', + twitter_handle: 'lisa_hough_', + }, + { + name: ' Collectooor of sats', + profile_picture: 'https://pbs.twimg.com/profile_images/1594362077132587009/cNAE2FU5_400x400.jpg', + ref_id: 'c84d0e47-7eeb-419b-a36e-5055b96044f0', + twitter_handle: 'hoardingsats', + }, + { + name: ' Gold Leader', + profile_picture: 'https://pbs.twimg.com/profile_images/1594152783011250176/lHMHv3gB_400x400.jpg', + ref_id: '96c4f802-25ff-4a81-b91f-cae5562bf4a3', + twitter_handle: 'GoldLeader89', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/0c42d408-e518-4ecf-b282-d864a8c14002.jpg', + node_type: 'episode', + ref_id: 'de9ef389-d0ee-4ce1-ad23-38bfafa28a35', + show_title: 'PUBLORD', + }, + { + children: ['1171938e-b754-45ff-958d-ca89aa3ab235'], + episode_title: 'Café ₿: #Bitcoin Fix the Money, Fix the World', + guests: [ + { + name: 'OrangePild', + profile_picture: 'https://pbs.twimg.com/profile_images/1608905201334845441/SHUsfTBW_400x400.jpg', + ref_id: '1c33ba0e-3e6b-41f6-aed4-5217aa534521', + twitter_handle: 'OrangePild', + }, + { + name: 'Neil Jacobs', + profile_picture: 'https://pbs.twimg.com/profile_images/1593645788978102277/UAQCQKeE_400x400.jpg', + ref_id: '0bc759e0-b055-4800-a79d-2b950fe5cc53', + twitter_handle: 'NeilJacobs', + }, + { + name: 'Dr. Jeff Ross', + profile_picture: 'https://pbs.twimg.com/profile_images/1475554600094552064/DSlPG1lx_400x400.jpg', + ref_id: '51a969bb-dbf7-4d20-b128-74dcc5f560f6', + twitter_handle: 'VailshireCap', + }, + { + name: 'Jason Brett', + profile_picture: 'https://pbs.twimg.com/profile_images/1591476397847060482/bNapBM4Y_400x400.jpg', + ref_id: '750a85f9-59f2-4627-817c-a437b65ee45e', + twitter_handle: 'RegulatoryJason', + }, + { + name: 'Tatum Turn Up', + profile_picture: 'https://pbs.twimg.com/profile_images/1600036563429343233/PXP0gxRj_400x400.jpg', + ref_id: '31824d8a-a2a6-434e-8d10-f0be1c2f8389', + twitter_handle: 'tatumturnup', + }, + { + name: 'Stackchain ⛓ Signal', + profile_picture: 'https://pbs.twimg.com/profile_images/1589791699571802117/n_Y1Qm7J_400x400.jpg', + ref_id: 'b0242af7-0d94-4551-ba25-a8b216b82fce', + twitter_handle: 'StackchainSig', + }, + { + name: 'Ross', + profile_picture: 'https://pbs.twimg.com/profile_images/1602431687564357632/57oH7beH_400x400.jpg', + ref_id: 'cdb90285-daa9-4dd2-b96a-78dd5e8ba468', + twitter_handle: 'theyoungrossco', + }, + { + name: 'BTC Sessions', + profile_picture: 'https://pbs.twimg.com/profile_images/1602307254937866240/CKiRrFui_400x400.jpg', + ref_id: 'e207ef16-44d1-40c4-929a-ea2736f60a94', + twitter_handle: 'BTCsessions', + }, + { + name: 'TC', + profile_picture: 'https://pbs.twimg.com/profile_images/1607590332925095937/6CTv4688_400x400.jpg', + ref_id: '083ddb42-c4a0-4360-8de3-6178e3b659ec', + twitter_handle: 'Meditation_Man', + }, + { + name: 'Tomer Strolight', + profile_picture: 'https://pbs.twimg.com/profile_images/1591960241008148481/HtyINxtU_400x400.jpg', + ref_id: '3a2bc97d-072c-4ed9-9a59-17ceeb68fe99', + twitter_handle: 'TomerStrolight', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/239722cb-4216-414a-a17b-5adf9d52e15a.jpg', + node_type: 'episode', + ref_id: '94726593-cead-47f6-8029-6848f277358c', + show_title: 'Swan.com', + }, + { + children: [ + 'f80dd079-1a9d-4bda-b8dd-81c05d203533', + '6f72249d-ab08-4a9e-ac54-545f618c29d2', + 'ebecb620-735b-490e-bc9d-b4033f11144a', + ], + episode_title: 'Café ₿: #Bitcoin News & Bitcoin Day w/ @Bitcoindayio', + guests: [ + { + name: '@johnmichaeldrew', + profile_picture: 'https://pbs.twimg.com/profile_images/1512897699942744064/PuRU3K8P_400x400.jpg', + ref_id: '6b72ee7f-52ef-4847-96ed-78ea09e3f19b', + twitter_handle: 'johnmichaeldrew', + }, + { + name: '@mattyicesensei', + profile_picture: 'https://pbs.twimg.com/profile_images/1607138483579101186/0qm0xaCF_400x400.jpg', + ref_id: '286abd3b-cecc-4ec5-bf88-2a9fd5393083', + twitter_handle: 'mattyicesensei', + }, + { + name: '@Bitcoindayio', + profile_picture: 'https://pbs.twimg.com/profile_images/1493098733608837121/tLI-XTwl_400x400.jpg', + ref_id: '6a87699e-7a27-4928-89e8-d884f1458bf9', + twitter_handle: 'Bitcoindayio', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/239722cb-4216-414a-a17b-5adf9d52e15a.jpg', + node_type: 'episode', + ref_id: '2c2ac736-0711-4418-8a44-6f9de54cbe6f', + show_title: 'Swan.com', + }, + { + children: [ + '12445bad-9deb-4bff-ba8a-e8a490b00cc5', + '2a0fb607-c735-4b09-809a-3c74cc61de97', + '2969a789-41bf-4e23-8ab8-31a76c5a5754', + 'ada07186-c3fc-4b5e-b9c7-3ce54e1b94c7', + ], + episode_title: 'Café ₿: #Bitcoin Holiday Hangout & @StatusMoneyUSA a #BTC Credit Card', + guests: [ + { + name: ' BITVOLT7', + profile_picture: 'https://pbs.twimg.com/profile_images/1532194001511714818/O8nSTKcx_400x400.png', + ref_id: '2b9913b7-393c-4125-9aeb-4a8bf32bfa44', + twitter_handle: 'BITVOLT7', + }, + { + name: ' samcallah', + profile_picture: 'https://pbs.twimg.com/profile_images/1502454836981166082/cQG0YQxc_400x400.jpg', + ref_id: 'a3dbdb56-e228-4382-98bc-d4495ff6dfbd', + twitter_handle: 'samcallah', + }, + { + name: ' taodejing2', + profile_picture: 'https://pbs.twimg.com/profile_images/1575442322531274756/-ZdL-K9S_400x400.jpg', + ref_id: '4914799b-a230-4bee-95c9-cf3ac44b6b70', + twitter_handle: 'TyonClubhouse', + }, + { + name: ' MrHodl', + profile_picture: 'https://pbs.twimg.com/profile_images/1607490976670519296/vhLAojMR_400x400.jpg', + ref_id: '01d6ee68-c0ef-4ead-b2b7-7eb04694519e', + twitter_handle: 'MrHodl', + }, + { + name: ' TomerStrolight', + profile_picture: 'https://pbs.twimg.com/profile_images/1591960241008148481/HtyINxtU_400x400.jpg', + ref_id: '57beb381-b9e8-4dd1-82f6-4e544a63146b', + twitter_handle: 'TomerStrolight', + }, + { + name: ' VailshireCap', + profile_picture: 'https://pbs.twimg.com/profile_images/1475554600094552064/DSlPG1lx_400x400.jpg', + ref_id: '73c15965-ddad-4e32-9746-da92f5d24134', + twitter_handle: 'VailshireCap', + }, + { + name: 'bergealex4', + profile_picture: 'https://pbs.twimg.com/profile_images/1273374628577247233/tYigkAZH_400x400.jpg', + ref_id: 'da4bb8ab-540d-4f88-a2a6-f3a3941c5b74', + twitter_handle: 'bergealex4', + }, + { + name: ' LukeMikic21', + profile_picture: 'https://pbs.twimg.com/profile_images/1604626418708742147/gWyVLeqa_400x400.jpg', + ref_id: '0a907108-f59f-420f-9986-79b0f060f690', + twitter_handle: 'LukeMikic21', + }, + { + name: ' 2140data', + profile_picture: 'https://pbs.twimg.com/profile_images/1598330787778232320/ZVFcRtet_400x400.jpg', + ref_id: 'c8fb52d1-fa69-410d-bf96-8a7559bba863', + twitter_handle: '2140data', + }, + { + name: ' majdmaksad', + profile_picture: 'https://pbs.twimg.com/profile_images/1483883774471516167/zvEjiCTO_400x400.jpg', + ref_id: '1a63c59d-a760-4f8b-bba9-ddfd3cff9f33', + twitter_handle: 'majdmaksad', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/239722cb-4216-414a-a17b-5adf9d52e15a.jpg', + node_type: 'episode', + ref_id: '883300ba-aeb4-42e5-bbd2-7c989e481a3b', + show_title: 'Swan.com', + }, + { + children: ['6c3edea1-97d0-41d4-a015-0f16417f2ee7'], + episode_title: 'Café ₿: 23’ Macro Outlook w/ Joe Burnett & Mitch from Blockware', + guests: [ + { + name: 'Cory Klippsten', + profile_picture: 'https://pbs.twimg.com/profile_images/1569687200857755648/fxiCeaqc_400x400.jpg', + ref_id: 'ddfb9b4c-4e6a-4f4c-a01b-e6bb1bc55464', + twitter_handle: 'coryklippsten', + }, + { + name: 'Tomer Strolight', + profile_picture: 'https://pbs.twimg.com/profile_images/1591960241008148481/HtyINxtU_400x400.jpg', + ref_id: '3a2bc97d-072c-4ed9-9a59-17ceeb68fe99', + twitter_handle: 'TomerStrolight', + }, + { + name: 'Joe Burnnet', + profile_picture: 'https://pbs.twimg.com/profile_images/1601649626754564105/9TubQjRd_400x400.jpg', + ref_id: '1c849151-1cca-44db-9a69-665fac5dc6f6', + twitter_handle: 'IIICapital', + }, + { + name: 'Mitchell Askew', + profile_picture: 'https://pbs.twimg.com/profile_images/435841191524204544/mzKR9KCX_400x400.jpeg', + ref_id: 'fc4ba3ae-eacc-489d-a888-397ba6b1f842', + twitter_handle: 'mitchell_askew', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/239722cb-4216-414a-a17b-5adf9d52e15a.jpg', + node_type: 'episode', + ref_id: 'a41902c1-9f41-4ea4-b135-0d2078f6074b', + show_title: 'Swan.com', + }, + { + children: ['b8d90bd0-45fb-40d9-87db-b9a908a8684a'], + episode_title: 'Café ₿: SBF Arrested 🚨 🚨 #Bitcoin Not Crypto', + guests: [ + { + name: ' Tone Vays', + profile_picture: 'https://pbs.twimg.com/profile_images/1416821178266787844/T1OkI9ZW_400x400.jpg', + ref_id: 'ac43b4f0-9056-4a6b-9d30-4a6250405ade', + twitter_handle: 'ToneVays', + }, + { + name: ' 2140data', + profile_picture: 'https://pbs.twimg.com/profile_images/1598330787778232320/ZVFcRtet_400x400.jpg', + ref_id: 'c8fb52d1-fa69-410d-bf96-8a7559bba863', + twitter_handle: '2140data', + }, + { + name: ' BITVOLT7', + profile_picture: 'https://pbs.twimg.com/profile_images/1532194001511714818/O8nSTKcx_400x400.png', + ref_id: '2b9913b7-393c-4125-9aeb-4a8bf32bfa44', + twitter_handle: 'BITVOLT7', + }, + { + name: ' Tomer Strolight', + profile_picture: 'https://pbs.twimg.com/profile_images/1591960241008148481/HtyINxtU_400x400.jpg', + ref_id: '4e0b6941-6d5c-439c-9d30-7c5691828930', + twitter_handle: 'TomerStrolight', + }, + { + name: 'Neil Jacobs', + profile_picture: 'https://pbs.twimg.com/profile_images/1593645788978102277/UAQCQKeE_400x400.jpg', + ref_id: '0bc759e0-b055-4800-a79d-2b950fe5cc53', + twitter_handle: 'NeilJacobs', + }, + { + name: ' StackchainSig', + profile_picture: 'https://pbs.twimg.com/profile_images/1589791699571802117/n_Y1Qm7J_400x400.jpg', + ref_id: 'c000ebd6-1c05-4c6a-ad07-5e5c10cc3fb3', + twitter_handle: 'StackchainSig', + }, + { + name: ' Joe Carlasare', + profile_picture: 'https://pbs.twimg.com/profile_images/1567374701667794944/2ghrkDx7_400x400.jpg', + ref_id: '75b3a3fa-f118-4ea0-9477-25832844c900', + twitter_handle: 'JoeCarlasare', + }, + { + name: ' w_s_bitcoin', + profile_picture: 'https://pbs.twimg.com/profile_images/1594796869233811474/g0_ZRshz_400x400.png', + ref_id: '268a731a-0e21-4cb1-ad73-d8d21f433393', + twitter_handle: 'w_s_bitcoin', + }, + { + name: ' TYonClubhouse', + profile_picture: 'https://pbs.twimg.com/profile_images/1575442322531274756/-ZdL-K9S_400x400.jpg', + ref_id: '519d68be-1a96-4394-8bab-48f570f1a6cd', + twitter_handle: 'TYonClubhouse', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/239722cb-4216-414a-a17b-5adf9d52e15a.jpg', + node_type: 'episode', + ref_id: '6334a91f-b1db-4f05-a381-bc68b121dfb3', + show_title: 'Swan.com', + }, + { + children: [ + 'dbc2c8f6-e85d-449c-a431-e52f6e7594e2', + '6faac813-7f72-4208-a6ea-a8f330da5d1e', + 'df4ad67d-6316-4762-a7c5-884c162dd8a9', + '124cbc47-3581-4bd6-add0-fe0855bc9ac3', + '3d112a9e-f3a1-4edb-96b0-c3a8c63b0c4a', + ], + episode_title: 'Café ₿: #Bitcoin Beginner Q&A', + guests: [ + { + name: 'Peter', + profile_picture: 'https://pbs.twimg.com/profile_images/1581695667193643009/EljNY-TH_400x400.jpg', + ref_id: 'a3384925-e15e-421d-b9f9-6d44e273ed05', + twitter_handle: 'PeterAnsel9', + }, + { + name: 'Stephan Livera', + profile_picture: 'https://pbs.twimg.com/profile_images/1362551718110580740/v-W5Q2uo_400x400.jpg', + ref_id: '72f57157-c96e-4466-8bf1-290cfe1f8a0b', + twitter_handle: 'stephanlivera', + }, + { + name: 'Thomas J Lake', + profile_picture: 'https://pbs.twimg.com/profile_images/1529168328534769670/5cl2Y_k-_400x400.jpg', + ref_id: '21541a47-0601-447c-99c2-312d1a63c19f', + twitter_handle: 'thomaslake', + }, + { + name: 'Goodguy', + profile_picture: 'https://pbs.twimg.com/profile_images/1363216959576285185/unulY4yd_400x400.jpg', + ref_id: '0c3fec75-9cc2-4c0f-8dbe-db7fae2b585b', + twitter_handle: 'goodguybiker', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/239722cb-4216-414a-a17b-5adf9d52e15a.jpg', + node_type: 'episode', + ref_id: '3b7e4cc5-bc15-45e9-bb7a-373fa4cca6f1', + show_title: 'Swan.com', + }, + { + children: ['15e10126-3ca8-461d-bb9d-d412b8333b32'], + episode_title: 'Café ₿: MacroStrategy w/ Foss, Lepard, Lavish, Dr.Jeff, Pysh', + guests: [ + { + name: 'Dr. Jeff Ross', + profile_picture: 'https://pbs.twimg.com/profile_images/1475554600094552064/DSlPG1lx_400x400.jpg', + ref_id: '51a969bb-dbf7-4d20-b128-74dcc5f560f6', + twitter_handle: 'VailshireCap', + }, + { + name: 'James Lavish', + profile_picture: 'https://pbs.twimg.com/profile_images/1466279082157502464/flD6cWI3_400x400.jpg', + ref_id: 'cf06ab2d-2ff3-4d7b-bef6-b996ae68517a', + twitter_handle: 'jameslavish', + }, + { + name: 'Lawrence Lepard', + profile_picture: 'https://pbs.twimg.com/profile_images/1114275000889032704/mOUsG1XC_400x400.png', + ref_id: '0452f07a-5ee6-447d-901b-d96fe2c51324', + twitter_handle: 'LawrenceLepard', + }, + { + name: 'Preston Pysh', + profile_picture: 'https://pbs.twimg.com/profile_images/1408783276081299462/f4Ye5n7-_400x400.jpg', + ref_id: '01ad2c81-2d0c-44a9-93a1-42c07287aa80', + twitter_handle: 'PrestonPysh', + }, + { + name: 'Greg Foss', + profile_picture: 'https://pbs.twimg.com/profile_images/1552599670945464320/3OgqRHNo_400x400.jpg', + ref_id: '853d9f80-f6cf-490f-9d1e-f29cdc6acc6f', + twitter_handle: 'FossGregfoss', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/239722cb-4216-414a-a17b-5adf9d52e15a.jpg', + node_type: 'episode', + ref_id: 'f8a66979-3fac-4793-bad0-8ede604e211b', + show_title: 'Swan.com', + }, + { + children: ['fc9b5e45-fc94-42dd-a722-bde164f8c24b'], + episode_title: 'Café ₿: Bitcoin News & Using Bitcoin w/ Twitter, @tweetoshiapp', + guests: [ + { + name: '@TweetoshiApp', + profile_picture: 'https://pbs.twimg.com/profile_images/1532819967133028352/frxdtSHX_400x400.jpg', + ref_id: '97e59475-beaf-44fe-b1b0-ea2a63d335b6', + twitter_handle: 'TweetoshiApp', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/239722cb-4216-414a-a17b-5adf9d52e15a.jpg', + node_type: 'episode', + ref_id: '1d671494-3407-4619-92b0-99c7d6f95f86', + show_title: 'Swan.com', + }, + { + children: ['7b90a2ff-ac29-43a9-9911-0eec916e3088'], + episode_title: 'Café ₿: GBTC was the Genesis of the Crypto Contagion w/ @samcallah', + guests: [ + { + name: '@StackchainSig', + profile_picture: 'https://pbs.twimg.com/profile_images/1589791699571802117/n_Y1Qm7J_400x400.jpg', + ref_id: '6e652629-38ec-49d8-9f5c-3ba28f80c799', + twitter_handle: 'StackchainSig', + }, + { + name: '@Meditation_Man', + profile_picture: 'https://pbs.twimg.com/profile_images/1597303881339314176/kFqDWvq0_400x400.jpg', + ref_id: 'cf7119ec-50a5-4ba2-a9a6-4a24835f3364', + twitter_handle: 'Meditation_Man', + }, + { + name: '@TomerStrolight', + profile_picture: 'https://pbs.twimg.com/profile_images/1591960241008148481/HtyINxtU_400x400.jpg', + ref_id: '7af639f8-8c5c-4ce1-a43b-e8560ed40e2b', + twitter_handle: 'TomerStrolight', + }, + { + name: '@2140data', + profile_picture: 'https://pbs.twimg.com/profile_images/1598330787778232320/ZVFcRtet_400x400.jpg', + ref_id: '190b5001-a42a-46cc-b0d3-b6f74c625648', + twitter_handle: '2140data', + }, + { + name: ' @samcallah', + profile_picture: 'https://pbs.twimg.com/profile_images/1502454836981166082/cQG0YQxc_400x400.jpg', + ref_id: 'ee5d0119-780d-4539-9b84-83025e95c03f', + twitter_handle: 'samcallah', + }, + { + name: '@sonofsats', + profile_picture: 'https://pbs.twimg.com/profile_images/1593080311000211456/Dr_NQ9Iw_400x400.jpg', + ref_id: '07f15eea-1f9a-41bc-b974-ffd370885708', + twitter_handle: 'sonofsats', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/239722cb-4216-414a-a17b-5adf9d52e15a.jpg', + node_type: 'episode', + ref_id: '9ae3fabe-5d43-47bc-9ab0-541df990773a', + show_title: 'Swan.com', + }, + { + children: [ + '7c3d3625-4308-437e-80bb-38fb8b2a678c', + '75ac478b-3dfa-45a8-9fa0-cebaacccfc05', + '639d4f31-2190-4fc2-a0dc-57cf53c3d97b', + '2b1c8514-7d10-4e83-9006-9974ec31d35a', + ], + episode_title: 'Café ₿: #Bitcoin News & Trusted P2P Reviews w/ @Apollosats', + guests: [ + { + name: '@2140data', + profile_picture: 'https://pbs.twimg.com/profile_images/1598330787778232320/ZVFcRtet_400x400.jpg', + ref_id: '190b5001-a42a-46cc-b0d3-b6f74c625648', + twitter_handle: '2140data', + }, + { + name: '@FossGregfoss', + profile_picture: 'https://abs.twimg.com/sticky/default_profile_images/default_profile_400x400.png', + ref_id: '09913e9b-38dc-4465-9d4d-ae0c9ba9eeca', + twitter_handle: 'Fuckkkk', + }, + { + name: '@w_s_bitcoin', + profile_picture: 'https://pbs.twimg.com/profile_images/1594796869233811474/g0_ZRshz_400x400.png', + ref_id: 'b178b239-3b18-4a16-9d43-c5d15ba6f7f4', + twitter_handle: 'w_s_bitcoin', + }, + { + name: '@NeilJacobs', + profile_picture: 'https://pbs.twimg.com/profile_images/1599432572727169025/NSoPdchB_400x400.jpg', + ref_id: '4b6997e1-ce0b-4a1d-90e7-dbaccef4b783', + twitter_handle: 'NeilJacobs', + }, + { + name: '@brandon_gentile', + profile_picture: 'https://pbs.twimg.com/profile_images/1561369452284895236/-8WgdwEm_400x400.jpg', + ref_id: 'f940c5e8-4808-4197-a38f-3f19d311a7ad', + twitter_handle: 'brandon_gentile', + }, + { + name: '@apollosats', + profile_picture: 'https://pbs.twimg.com/profile_images/1576946734927794176/2ail9FoU_400x400.jpg', + ref_id: '74f4280f-5fdb-4bbc-aee2-a2ed32d64372', + twitter_handle: 'apollosats', + }, + { + name: '@StackchainSig', + profile_picture: 'https://pbs.twimg.com/profile_images/1589791699571802117/n_Y1Qm7J_400x400.jpg', + ref_id: '6e652629-38ec-49d8-9f5c-3ba28f80c799', + twitter_handle: 'StackchainSig', + }, + { + name: '@TomerStrolight', + profile_picture: 'https://pbs.twimg.com/profile_images/1591960241008148481/HtyINxtU_400x400.jpg', + ref_id: '7af639f8-8c5c-4ce1-a43b-e8560ed40e2b', + twitter_handle: 'TomerStrolight', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/239722cb-4216-414a-a17b-5adf9d52e15a.jpg', + node_type: 'episode', + ref_id: 'a119635b-a66a-4a90-a7e3-2a7929666a82', + show_title: 'Swan.com', + }, + { + children: ['7fea625e-c79b-402b-bce5-66e4e97d9598', '3b4b6a17-9995-4f90-88d0-15cfd0b53be6'], + episode_title: 'Café ₿: Bitcoin Credit Card w/ @BoldBitcoin @John_ely_21m', + guests: [ + { + name: 'Cory Klippsten', + profile_picture: 'https://pbs.twimg.com/profile_images/1569687200857755648/fxiCeaqc_400x400.jpg', + ref_id: 'ddfb9b4c-4e6a-4f4c-a01b-e6bb1bc55464', + twitter_handle: 'coryklippsten', + }, + { + name: 'Greg Foss', + profile_picture: 'https://pbs.twimg.com/profile_images/1552599670945464320/3OgqRHNo_400x400.jpg', + ref_id: '853d9f80-f6cf-490f-9d1e-f29cdc6acc6f', + twitter_handle: 'FossGregfoss', + }, + { name: 'Wicked', profile_picture: '', ref_id: 'fee44016-b05f-4961-a6d8-7dac655cd931', twitter_handle: '' }, + { + name: '@BoldBitcoin', + profile_picture: 'https://pbs.twimg.com/profile_images/1559592705231044609/iJrNKxF9_400x400.png', + ref_id: 'dd4e1c4c-d111-4f01-ad95-18200d50cdb8', + twitter_handle: 'BoldBitcoin', + }, + { + name: '@John_ely_21m', + profile_picture: 'https://pbs.twimg.com/profile_images/1560444673046585346/VN8n2LtM_400x400.jpg', + ref_id: 'a24436b1-5992-4711-a4a5-0770546ea80a', + twitter_handle: 'John_Ely_21m', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/239722cb-4216-414a-a17b-5adf9d52e15a.jpg', + node_type: 'episode', + ref_id: '6fe2326f-7cad-4efb-abed-206db564556e', + show_title: 'Swan.com', + }, + { + children: [ + 'f76300e2-dc0d-4960-a1cf-6c7b90ad4cfa', + '888c6962-f33f-4e88-a1cb-6819baabe35f', + 'f84d9798-f31e-480e-9da6-9be8dc74f6be', + ], + episode_title: 'Gladstein & Sam Callahan - World Bank / IMF & #Bitcoin', + guests: [ + { + name: 'Sam Callahan', + profile_picture: 'https://pbs.twimg.com/profile_images/1592532728775409667/0DayEP2Q_400x400.jpg', + ref_id: '5a044a91-8dee-421c-86dd-8c734dc9bc32', + twitter_handle: 'CallahanMusic_', + }, + { + name: 'Alex Gladstein', + profile_picture: 'https://pbs.twimg.com/profile_images/1382371620669452292/VOPKOc8w_400x400.jpg', + ref_id: '49445c1c-7c66-4b73-9eec-09a337befbec', + twitter_handle: 'gladstein', + }, + { + name: 'Brady', + profile_picture: 'https://pbs.twimg.com/profile_images/1502564606836981763/fmqtNrNc_400x400.jpg', + ref_id: '45bbbb01-6163-4b3b-905a-fc67174893d9', + twitter_handle: 'CitizenBitcoin', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/239722cb-4216-414a-a17b-5adf9d52e15a.jpg', + node_type: 'episode', + ref_id: '141ef1e6-e6ec-4d29-a52a-01be662b21ae', + show_title: 'Swan.com', + }, + { + children: ['929def08-6b32-4313-a296-eaa1e5ee8d1b', '332af4b9-782f-40e4-878c-45bb9d7edcdc'], + episode_title: 'Café ₿: Bitcoin Lightning ⚡️ Q&A w/ Bobby & Paul From Voltage!', + guests: [ + { + name: 'Tomer Strolight', + profile_picture: 'https://pbs.twimg.com/profile_images/1591960241008148481/HtyINxtU_400x400.jpg', + ref_id: '3a2bc97d-072c-4ed9-9a59-17ceeb68fe99', + twitter_handle: 'TomerStrolight', + }, + { + name: ' Brady Swenson', + profile_picture: 'https://pbs.twimg.com/profile_images/1502564606836981763/fmqtNrNc_400x400.jpg', + ref_id: '560cf9ee-2844-4ced-bbfd-d0ec639b2177', + twitter_handle: 'CitizenBitcoin', + }, + { + name: ' Jeff Ross', + profile_picture: 'https://pbs.twimg.com/profile_images/1307109108127019008/rPNj47yJ_400x400.jpg', + ref_id: '4f4f53c7-5a3a-46df-b334-9951fe38dc96', + twitter_handle: 'realjeffreyross', + }, + { + name: ' 2140data', + profile_picture: 'https://pbs.twimg.com/profile_images/1598330787778232320/ZVFcRtet_400x400.jpg', + ref_id: 'c8fb52d1-fa69-410d-bf96-8a7559bba863', + twitter_handle: '2140data', + }, + { + name: ' q_liketheletter', + profile_picture: 'https://pbs.twimg.com/profile_images/1560683048680665088/4MrHM_UY_400x400.jpg', + ref_id: 'd82c0d30-d0d3-4947-a358-d28f1cd5292e', + twitter_handle: 'q_liketheletter', + }, + { + name: ' iBobbyShell', + profile_picture: 'https://pbs.twimg.com/profile_images/1583132979571920896/1Std3_ya_400x400.jpg', + ref_id: '2f9bd0a3-1215-4a89-9dc6-d64f170961af', + twitter_handle: 'iBobbyShell', + }, + { + name: ' Tone Vays', + profile_picture: 'https://pbs.twimg.com/profile_images/1416821178266787844/T1OkI9ZW_400x400.jpg', + ref_id: 'ac43b4f0-9056-4a6b-9d30-4a6250405ade', + twitter_handle: 'ToneVays', + }, + { + name: ' sonofsats', + profile_picture: 'https://pbs.twimg.com/profile_images/1593080311000211456/Dr_NQ9Iw_400x400.jpg', + ref_id: 'd584f070-a66a-4b53-b15a-8142f8daea66', + twitter_handle: 'sonofsats', + }, + { + name: ' futurepaul', + profile_picture: 'https://pbs.twimg.com/profile_images/1508452962917666821/1QheRD09_400x400.jpg', + ref_id: 'fcb50ec8-2669-47da-87b9-1702affb30c9', + twitter_handle: 'futurepaul', + }, + { + name: ' Greg Foss', + profile_picture: 'https://pbs.twimg.com/profile_images/1552599670945464320/3OgqRHNo_400x400.jpg', + ref_id: 'a2ba4e1e-aab7-43b0-90d7-d3c6a9738ad0', + twitter_handle: 'FossGregfoss', + }, + { + name: ' Brad Mills', + profile_picture: 'https://pbs.twimg.com/profile_images/1541955880752750592/XJqwIn2E_400x400.jpg', + ref_id: '9a49201c-3b03-4a83-bcb8-d92dbf3d55b6', + twitter_handle: 'bradmillscan', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/239722cb-4216-414a-a17b-5adf9d52e15a.jpg', + node_type: 'episode', + ref_id: '15cae8e2-7cb3-4c60-9b3a-32cb4b231c26', + show_title: 'Swan.com', + }, + { + children: [ + '0fe0af9b-421e-43ab-800d-7354379ea21f', + '700e8ab8-7cc3-476c-87ea-524081f2322c', + '2a3ee0fe-bcfc-412d-b1ee-2ba7f72528bd', + '48de736c-df85-48ea-9856-e9b608a6025e', + 'd72f67b3-c42f-43cf-8e01-47065fe8e638', + ], + episode_title: 'Café ₿: Sovereign Computing w/ Matt & Aiden, Start9', + guests: [ + { + name: 'Andrew', + profile_picture: 'https://pbs.twimg.com/profile_images/1465763053014859786/xYFN2czJ_400x400.jpg', + ref_id: 'ae4b13f8-0ee7-480a-b47a-82b967ad7a79', + twitter_handle: 'AP_ArchPublic', + }, + { + name: 'Matt Hill', + profile_picture: 'https://pbs.twimg.com/profile_images/1347317316057321474/ieMjzK3x_400x400.jpg', + ref_id: '3576ad28-a04d-4388-865b-3ec5114c4f9f', + twitter_handle: '_MattHill_', + }, + { + name: 'Lauren', + profile_picture: 'https://pbs.twimg.com/profile_images/1586022214901501952/U1dRyCxP_400x400.jpg', + ref_id: '7f14bbf5-a60b-496b-a361-3663cf120299', + twitter_handle: 'LaurenJauregui', + }, + { + name: 'Aiden McClelland', + profile_picture: 'https://pbs.twimg.com/profile_images/1470160097225498624/0BjKB_2W_400x400.jpg', + ref_id: '04ddd9d4-9329-4e6c-aaa3-d65ea4a9342a', + twitter_handle: '_dr_bonez', + }, + { + name: 'Peter', + profile_picture: 'https://pbs.twimg.com/profile_images/1581695667193643009/EljNY-TH_400x400.jpg', + ref_id: 'a3384925-e15e-421d-b9f9-6d44e273ed05', + twitter_handle: 'PeterAnsel9', + }, + { + name: 'Lisa', + profile_picture: 'https://pbs.twimg.com/profile_images/1541581547815436288/Li8wORWt_400x400.jpg', + ref_id: 'e6f0c6e3-3237-4b13-878f-bb740cd32f8d', + twitter_handle: 'lisa_hough_', + }, + { + name: 'Isabelle', + profile_picture: 'https://pbs.twimg.com/profile_images/1466874333410717698/WRQh2-_m_400x400.jpg', + ref_id: 'c8df253f-47b3-465e-878e-8405c01c090d', + twitter_handle: 'isabelfoxenduke', + }, + { + name: 'Tone', + profile_picture: 'https://pbs.twimg.com/profile_images/1416821178266787844/T1OkI9ZW_400x400.jpg', + ref_id: '5729ac07-51d6-4268-b585-62680c846acb', + twitter_handle: 'ToneVays', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/239722cb-4216-414a-a17b-5adf9d52e15a.jpg', + node_type: 'episode', + ref_id: '3bc946bc-82f4-48d3-9bd2-fab82353774d', + show_title: 'Swan.com', + }, + { + children: ['2acb23ed-c7ca-4f51-abb6-bfcc0a87316a', '5faa3765-8f15-41c7-8c8e-6136a0e67b5f'], + episode_title: 'Café ₿: Thanksgiving Special 🦃 w/ the Café Bitcoin Crew', + guests: [ + { + name: 'Rob Hamilton', + profile_picture: 'https://pbs.twimg.com/profile_images/1524033110630969351/wTUr8S36_400x400.jpg', + ref_id: '94b18625-4778-4cfe-9c78-823704d1c1b1', + twitter_handle: 'Rob1Ham', + }, + { + name: 'Tomer Strolight', + profile_picture: 'https://pbs.twimg.com/profile_images/1591960241008148481/HtyINxtU_400x400.jpg', + ref_id: '3a2bc97d-072c-4ed9-9a59-17ceeb68fe99', + twitter_handle: 'TomerStrolight', + }, + { + name: 'DJ Satoshi', + profile_picture: 'https://pbs.twimg.com/profile_images/915987644043030528/5nh3JQSz_400x400.jpg', + ref_id: '02ae35cb-3728-441f-84c5-a8db5d9150b4', + twitter_handle: 'satoshi__tomiie', + }, + { + name: 'Lauren', + profile_picture: 'https://pbs.twimg.com/profile_images/1586022214901501952/U1dRyCxP_400x400.jpg', + ref_id: '7f14bbf5-a60b-496b-a361-3663cf120299', + twitter_handle: 'LaurenJauregui', + }, + { + name: 'Shaeroden', + profile_picture: 'https://pbs.twimg.com/profile_images/1560742113410678789/cHZ2tUjU_400x400.jpg', + ref_id: '0da06a5c-038f-4737-9af7-17bed3712e68', + twitter_handle: 'Shaeroden', + }, + { + name: 'Andres', + profile_picture: 'https://pbs.twimg.com/profile_images/1401952614795943950/aL2h3Wb4_400x400.jpg', + ref_id: 'db4abfe9-e3bb-4ffa-9783-ce67f5b20270', + twitter_handle: 'andresvbr9', + }, + { + name: 'Peter Ansel', + profile_picture: 'https://pbs.twimg.com/profile_images/1374726811221954565/R7ttqYMI_400x400.jpg', + ref_id: '2d418514-e03c-414d-8ed1-10c894aacb6e', + twitter_handle: 'peteransell', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/239722cb-4216-414a-a17b-5adf9d52e15a.jpg', + node_type: 'episode', + ref_id: '80617a1c-8bf7-404d-928c-86fc32d643fe', + show_title: 'Swan.com', + }, + { + children: ['49fe88a8-79ec-423c-a550-a32eb875f090'], + episode_title: 'Café ₿: Bitcoin News, Bitcoin Timechain ⛓Day w/ Ant & TC', + guests: [ + { + name: '@2140data', + profile_picture: 'https://pbs.twimg.com/profile_images/1598330787778232320/ZVFcRtet_400x400.jpg', + ref_id: '190b5001-a42a-46cc-b0d3-b6f74c625648', + twitter_handle: '2140data', + }, + { + name: '@Meditation_Man', + profile_picture: 'https://pbs.twimg.com/profile_images/1597303881339314176/kFqDWvq0_400x400.jpg', + ref_id: 'cf7119ec-50a5-4ba2-a9a6-4a24835f3364', + twitter_handle: 'Meditation_Man', + }, + { + name: '@TimechainStats', + profile_picture: 'https://pbs.twimg.com/profile_images/1316207411741569028/LpDkqBMv_400x400.png', + ref_id: '48e0e34d-8e04-47c0-972c-96cda708a719', + twitter_handle: 'TimechainStats', + }, + { + name: '@TimechainCaL', + profile_picture: 'https://pbs.twimg.com/profile_images/1589772501638184961/0qP3C4Wk_400x400.jpg', + ref_id: '72d94cc5-b62e-4fe2-8275-837eab35a74a', + twitter_handle: 'TimechainCaL', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/239722cb-4216-414a-a17b-5adf9d52e15a.jpg', + node_type: 'episode', + ref_id: 'd28e279c-4539-4ec8-b187-1b6447bdb6be', + show_title: 'Swan.com', + }, + { + children: ['ab983731-f12f-41d4-8921-6388b9c064b6'], + episode_title: '#Bitcoin in DC', + guests: [ + { + name: ' Matthew Pines', + profile_picture: 'https://pbs.twimg.com/profile_images/1518262325949734915/a5SFNpxO_400x400.jpg', + ref_id: '6243401a-eb27-494a-b393-f2ecb02e02a7', + twitter_handle: 'matthew_pines', + }, + { + name: ' Zack Shapiro', + profile_picture: 'https://pbs.twimg.com/profile_images/1602521378695118850/I5eXxQN5_400x400.jpg', + ref_id: '736f0806-a6f5-41ea-84f8-d8e5cbd832c9', + twitter_handle: 'coinlawyer_', + }, + { + name: ' Jason Brett', + profile_picture: 'https://pbs.twimg.com/profile_images/1591476397847060482/bNapBM4Y_400x400.jpg', + ref_id: '7b8919ad-3196-46d5-9423-80eddf653e9f', + twitter_handle: 'RegulatoryJason', + }, + { + name: 'Grant McCarty', + profile_picture: 'https://pbs.twimg.com/profile_images/1587887156797792261/6w4ewhwj_400x400.jpg', + ref_id: '0bbb9ce6-25d3-4626-b3c2-96007355664f', + twitter_handle: 'grant_mccarty', + }, + { + name: ' Stephen Pollock', + profile_picture: 'https://pbs.twimg.com/profile_images/1591160404293521408/pUvBZfsR_400x400.jpg', + ref_id: '0c6704ac-558d-4de9-95f0-f96ee59657c8', + twitter_handle: 'spollockbtc', + }, + { + name: ' David Zell', + profile_picture: 'https://pbs.twimg.com/profile_images/1574417496962105344/CcIm-voF_400x400.jpg', + ref_id: '79345f31-415f-4859-9d10-2684e7006305', + twitter_handle: 'DavidZell_', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/f3a55dda-3dd5-4f62-99c1-bab3a88c27c1.jpg', + node_type: 'episode', + ref_id: 'aba10d42-f204-4853-99c4-c8a22f846945', + show_title: 'Bitcoin Magazine', + }, + { + children: ['ea039879-1342-42d9-92e1-1fd4b6561488'], + episode_title: 'Escaping $ Debasement With #Bitcoin', + guests: [ + { + name: 'Joe Consorti', + profile_picture: 'https://pbs.twimg.com/profile_images/1596902707511664640/GYGWVDts_400x400.jpg', + ref_id: '8d2024b2-03bb-454d-9bd6-bb121904b76a', + twitter_handle: 'JoeConsorti', + }, + { + name: 'Nik Bhatia', + profile_picture: 'https://pbs.twimg.com/profile_images/1496241412580397058/s7jy5g3a_400x400.jpg', + ref_id: 'd76f4499-ccf6-4153-9bc1-257a580aa079', + twitter_handle: 'timevalueofbtc', + }, + { + name: 'Sam Callahan', + profile_picture: 'https://pbs.twimg.com/profile_images/1592532728775409667/0DayEP2Q_400x400.jpg', + ref_id: '5a044a91-8dee-421c-86dd-8c734dc9bc32', + twitter_handle: 'CallahanMusic_', + }, + { + name: 'Brian De Mint', + profile_picture: 'https://pbs.twimg.com/profile_images/1546297674512470016/oEVF8rJQ_400x400.jpg', + ref_id: '064e04f7-8320-4854-8325-0cc19cd7ff55', + twitter_handle: 'BrianTheMint', + }, + { + name: 'Dylan LeClair', + profile_picture: 'https://pbs.twimg.com/profile_images/1508157904913899522/3l7ctauV_400x400.jpg', + ref_id: '283edea0-55cf-4245-95df-8d6d3dcb1851', + twitter_handle: 'DylanLeClair_', + }, + { + name: '@coryklippsten', + profile_picture: 'https://pbs.twimg.com/profile_images/1569687200857755648/fxiCeaqc_400x400.jpg', + ref_id: '21aca21d-9a96-40a9-a8b8-a523ae6591c3', + twitter_handle: 'coryklippsten', + }, + { name: 'Matt C', profile_picture: '', ref_id: '337e3256-0602-4baf-a4b7-ca6d0655c569', twitter_handle: '' }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/f3a55dda-3dd5-4f62-99c1-bab3a88c27c1.jpg', + node_type: 'episode', + ref_id: '6c6c782e-382c-44c3-9b0a-5c598ef73ddc', + show_title: 'Bitcoin Magazine', + }, + { + children: ['3138e8b2-0b4d-4ddf-876c-b5448436273e', 'a659e54a-bb90-4f6c-9179-a9e05224c988'], + episode_title: '#Bitcoin and Macro Jam Session 🎸🔥', + guests: [], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/7c53ad3c-1ce2-4661-8896-4c40dcc23b4d.jpg', + node_type: 'episode', + ref_id: '7bebf6d3-5f24-4988-9141-7ed42c826983', + show_title: 'Blockware Solutions', + }, + { + children: ['04e7ce48-3c54-41ef-a7d5-59f923b85354'], + episode_title: + 'PFP063 | Anthony Daniels (Theodore Dalrymple) | “Public Health” as a Lever for Tyranny (PFS 2010)', + guests: [], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/624262ef-b30f-4114-8061-e310187e6bb4.jpg', + node_type: 'episode', + ref_id: 'de789489-56bc-4012-b7c3-9dc92a937161', + show_title: 'Property and Freedom Society', + }, + { + children: [ + '300c09ff-ce2f-4b87-b3d8-cc7dd4d4f7d1', + 'c5d2ef78-9d30-45ab-8d1a-edef9b356569', + '4369ba7b-c9c8-4bf8-906a-1d8e27b1558b', + ], + episode_title: + 'PFP016 Remigijus Šimašius, Bullies as Neighbors-on the Foreign Policy of Small Countries (PFS 2008)', + guests: [], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/624262ef-b30f-4114-8061-e310187e6bb4.jpg', + node_type: 'episode', + ref_id: '62ca7c93-e509-438e-87b3-43400a320f8d', + show_title: 'Property and Freedom Society', + }, + { + children: [ + 'c11fe5dc-bed6-408f-ae1b-650580184f3e', + 'fed2b741-e9a2-4858-bee8-faa259806d3e', + '70cd556c-8349-4f80-b276-4c0056b46536', + '0330ada0-fbc0-4f8f-a560-a6c059a72907', + 'ee9d0400-3d38-46f6-9741-f99864e86ed4', + 'c80659ad-87eb-488c-be5d-00ac386a2b15', + '83ce1420-66d3-41e6-b987-b35fe2cf019f', + ], + episode_title: '#Bitcoin Creators Space', + guests: [ + { + name: '@DecouvreBitcoin', + profile_picture: 'https://pbs.twimg.com/profile_images/1362747604044566530/Invedmre_400x400.jpg', + ref_id: '0eda190b-4373-41fc-bc28-c3b95af30949', + twitter_handle: 'DecouvreBitcoin', + }, + { + name: '@Bridge2Bitcoin', + profile_picture: 'https://pbs.twimg.com/profile_images/1533812215198924800/vAAlVRxO_400x400.jpg', + ref_id: '1aaf2c24-8d26-4038-b55a-8b94427b20c7', + twitter_handle: 'Bridge2Bitcoin', + }, + { + name: '@orangepillapp', + profile_picture: 'https://pbs.twimg.com/profile_images/1570918965601505282/SOApRCif_400x400.jpg', + ref_id: 'ba5b79b4-e2e7-4778-8879-df793b8420a4', + twitter_handle: 'orangepillapp', + }, + { + name: '@knutsvanholm', + profile_picture: 'https://pbs.twimg.com/profile_images/1586261395833774081/RQ8SYxiM_400x400.jpg', + ref_id: 'e12ebe66-706b-40d2-804a-861a4c79bbfa', + twitter_handle: 'knutsvanholm', + }, + { + name: '@bcvFoundation', + profile_picture: 'https://pbs.twimg.com/profile_images/1460813196902633476/edbNgO7y_400x400.jpg', + ref_id: 'd65bc3c3-cdd7-4539-8cb9-6a8d86f580c8', + twitter_handle: 'bcvFoundation', + }, + { + name: 'Christopher', + profile_picture: 'https://pbs.twimg.com/profile_images/1345072452775370754/cBVFzpkV_400x400.jpg', + ref_id: '7dacb545-925d-4201-9b9c-869d992dcdb3', + twitter_handle: 'Chrissuccess', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/c9bb5d58-c781-464d-878a-8b6c469ba198.jpg', + node_type: 'episode', + ref_id: '0992287c-f653-4032-b06c-e8d65e2536e7', + show_title: 'Geyser 🌊', + }, + { + children: [ + 'af7832e4-45e7-44e6-a91c-04652f9ce4fa', + 'e96970d0-30a7-4f86-8f81-996ba87a088c', + 'c7542511-7354-423c-b6e0-8c0349d5a511', + '946f1308-fffb-4aeb-89b2-68b043873ae2', + ], + episode_title: 'The Sovereign Individual - The End of Egalitarian Economics', + guests: [ + { + name: 'chriskapilla', + profile_picture: 'https://pbs.twimg.com/profile_images/1362817539135463427/2AXUeFLV_400x400.jpg', + ref_id: '9d495790-93f2-4d6c-b770-b2885f66859d', + twitter_handle: 'chriskapilla', + }, + { + name: 'remydenton', + profile_picture: '', + ref_id: '5c5beb0c-c214-4f23-b79a-e71bf9368f2d', + twitter_handle: '', + }, + { + name: 'JackRonaldi', + profile_picture: 'https://pbs.twimg.com/profile_images/1583261828628496384/IazkwYjk_400x400.jpg', + ref_id: '01621476-f040-49dd-8160-4035228faf78', + twitter_handle: 'JackRonaldi', + }, + { + name: 'AlistairZ80Aftw', + profile_picture: 'https://pbs.twimg.com/profile_images/1362882489895841795/gH2zix3l_400x400.jpg', + ref_id: '3dcba197-47ca-40c0-857d-73cec4325801', + twitter_handle: 'AlistairZ80Aftw', + }, + { + name: 'mattonbtc', + profile_picture: 'https://pbs.twimg.com/profile_images/1549459254280687618/jzdHJou3_400x400.jpg', + ref_id: '998167d3-e036-4ef1-9a05-4f062903f0c5', + twitter_handle: 'mattonbtc', + }, + { + name: 'wai_wairua', + profile_picture: 'https://pbs.twimg.com/profile_images/1536570699761848320/T10Owc60_400x400.jpg', + ref_id: 'c4d4ff36-73fa-4471-91ba-de0f99a49e99', + twitter_handle: 'wai_wairua', + }, + { + name: 'UltraSolomon', + profile_picture: 'https://pbs.twimg.com/profile_images/1468332451055427601/YVgUuUHc_400x400.jpg', + ref_id: '6371d519-cc98-4bf4-9f82-be17b1ea532a', + twitter_handle: 'UltraSolomon', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/75ec86b1-cb6d-467f-a66e-5e642e5c126a.jpg', + node_type: 'episode', + ref_id: '79ea2957-1161-4729-aacb-1981d9237e22', + show_title: 'Bitcoin Venetians Book Club', + }, + { + children: [ + '27290854-e30c-4f09-aee9-c6ee23a4854d', + '42296529-2820-4c4f-be26-e12104e2b723', + 'd1295013-33f3-431f-99a0-baa6d83500ad', + '475acbce-5a5c-4881-a93d-7d41edf1ae84', + '34c231bc-7fcf-4f55-a124-d67b008399a0', + ], + episode_title: 'Securing Bitcoin With Nuclear Energy', + guests: [ + { + name: 'Nuclear Bitcoiner', + profile_picture: 'https://pbs.twimg.com/profile_images/1443185278525579278/_Yl1nao1_400x400.jpg', + ref_id: '60f5891f-0864-4ed4-987a-81da4768b3ba', + twitter_handle: 'nuclearbitcoinr', + }, + { + name: 'Eric McErlain', + profile_picture: + 'https://pbs.twimg.com/profile_images/1252969137/Screen_shot_2011-02-23_at_10.59.21_PM_400x400.png', + ref_id: '4815365d-44d0-4b06-9d9e-32070158d03c', + twitter_handle: 'atomiceric', + }, + { + name: 'Puru Goyal', + profile_picture: 'https://pbs.twimg.com/profile_images/1590742805613203456/QAtYq_C__400x400.jpg', + ref_id: 'c24af059-b38b-4ce5-9547-9192c9eff579', + twitter_handle: 'purugyl', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/ae91fac6-a1af-4877-9a92-e793d556ee66.jpg', + node_type: 'episode', + ref_id: 'c0dabc11-aced-4078-93be-bca753fc2b14', + show_title: 'Compass Mining', + }, + { + children: [ + 'd2273e47-dfdb-4847-8690-ef58fe22d5c0', + '8dbb367b-5cba-4f05-a1db-104d0c66b579', + '05fee350-6926-4873-885a-76fd23008692', + '198dfd3b-7d1b-422c-b118-48520629af43', + '3cb5fd13-1b10-4dc0-b8e3-f2fc0f1ec406', + ], + episode_title: 'The ASIC Mining Hardware Market', + guests: [ + { + name: 'Vincent Zhang', + profile_picture: 'https://pbs.twimg.com/profile_images/1158285609196109825/fuB-e6lm_400x400.jpg', + ref_id: '98e7bc98-3a3b-4ddf-9b48-5dcd78973739', + twitter_handle: 'Whatsminer_MBT', + }, + { + name: 'Vincent Vuong', + profile_picture: 'https://pbs.twimg.com/profile_images/1260974518547312640/n47yvbNL_400x400.jpg', + ref_id: '8390e230-e36b-4e0d-9f5d-70c6635bf3c2', + twitter_handle: 'BitcoinVincent', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/ae91fac6-a1af-4877-9a92-e793d556ee66.jpg', + node_type: 'episode', + ref_id: 'd2e9db27-864c-4ee5-a7ae-abcf895bda98', + show_title: 'Compass Mining', + }, + { + children: ['330a0238-1acc-47fe-b809-48cc986a0b21', '03c6b2f5-685e-4921-a230-e14e5679f792'], + episode_title: 'Understanding Miner Extractable Value On Ethereum', + guests: [ + { + name: 'Nathan Worsley', + profile_picture: 'https://pbs.twimg.com/profile_images/1576238702908637186/xzcScTyV_400x400.jpg', + ref_id: '20529242-4546-475a-af1a-125b83aedd81', + twitter_handle: 'NathanWorsley_', + }, + { + name: 'Robert Miller', + profile_picture: 'https://pbs.twimg.com/profile_images/1595788538938695680/w6i5Q6s4_400x400.jpg', + ref_id: '292cfadd-7e67-4e34-876b-99804d416e20', + twitter_handle: 'robertjmiller_', + }, + { + name: 'Jordan Frankfurt', + profile_picture: 'https://pbs.twimg.com/profile_images/1544902585462788097/bGe0hNIi_400x400.png', + ref_id: '149db25a-26b1-4f69-8c9e-ec87e08ab8c8', + twitter_handle: 'jordanfrankfurt', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/ae91fac6-a1af-4877-9a92-e793d556ee66.jpg', + node_type: 'episode', + ref_id: '6e8c90dc-12fa-415d-bf33-f286a4c5d1b1', + show_title: 'Compass Mining', + }, + { + children: ['fd20d403-6fec-401f-9503-d20e298912b6'], + episode_title: 'Meet the Makers: René & Koty', + guests: [ + { + name: 'kotty Auditore', + profile_picture: 'https://pbs.twimg.com/profile_images/1608131189289746432/DP7GXDLw_400x400.jpg', + ref_id: '8d04ee18-3cc1-4a73-8510-05e70dbdb661', + twitter_handle: 'koty_auditore', + }, + { + name: 'Rene Aaron', + profile_picture: 'https://pbs.twimg.com/profile_images/1499715029834375172/g8uCieYv_400x400.jpg', + ref_id: '0ed58288-3a54-46e4-8734-8a133ffcdbb3', + twitter_handle: '_reneaaron', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/965489b4-a414-4fd0-ab8c-55911b1596aa.jpg', + node_type: 'episode', + ref_id: '5c8bc8cf-4d41-4c71-8154-aafbd1ed20c1', + show_title: 'BOLT FUN', + }, + { + children: [ + '2ff6b481-d06c-42e3-9ad5-9fa7a84dbd96', + 'c9e0fbb2-302b-44c3-b69c-dfac38c97f98', + '7e996fc8-37c7-447f-b0e5-c6dbf58015fe', + '8019d172-6711-45bb-a305-bf773c9ae85d', + ], + episode_title: 'Meet the Makers: Alan & Kwinten', + guests: [ + { + name: 'Alan Plus', + profile_picture: 'https://pbs.twimg.com/profile_images/1565235279451103233/XD8pJuIo_400x400.jpg', + ref_id: 'e362fed6-ec06-4d8a-a052-3137b24f213f', + twitter_handle: 'alnboltn', + }, + { + name: 'Kwinten De Backe', + profile_picture: 'https://pbs.twimg.com/profile_images/917859380699320320/p_v-fjmh_400x400.jpg', + ref_id: 'be68f240-1f4c-4b27-b4bb-752c90cbe0c3', + twitter_handle: 'QuintenDeBacke1', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/965489b4-a414-4fd0-ab8c-55911b1596aa.jpg', + node_type: 'episode', + ref_id: 'f7310238-67ab-4a2d-8679-72f6511934be', + show_title: 'BOLT FUN', + }, + { + children: [ + 'caca294d-8661-49a2-80a9-32e4e8452c03', + '6d58ed61-0116-4ce8-b26e-bcfa9a32b7d5', + 'abb2867c-0c1e-4cc2-8f60-35322740d3f2', + ], + episode_title: 'Meet the Makers: Konstantin & Arvin', + guests: [ + { + name: 'Konstantin Wünscher', + profile_picture: 'https://pbs.twimg.com/profile_images/917464868663582720/PMFCqusG_400x400.jpg', + ref_id: '5f027fce-7775-4824-b941-d2f4120d2d0f', + twitter_handle: 'krychtiukmd', + }, + { + name: 'Arvin Galoy', + profile_picture: 'https://pbs.twimg.com/profile_images/1429792764464611329/4VQqlZiM_400x400.jpg', + ref_id: 'e0eb434a-9219-4c57-b9e4-da6ceeaec040', + twitter_handle: 'GaloyMoney', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/965489b4-a414-4fd0-ab8c-55911b1596aa.jpg', + node_type: 'episode', + ref_id: '99f0ab76-b0f5-4947-8341-759b5dff5341', + show_title: 'BOLT FUN', + }, + { + children: ['7ef24d02-66fe-4872-b1f1-ea144bfcaf5c', '1b0f7188-cbe0-4fdc-ae0e-a5f3b8d6ea2c'], + episode_title: 'Meet the Makers: Anthony & Dolu', + guests: [ + { + name: 'Anthony Potdevin', + profile_picture: 'https://pbs.twimg.com/profile_images/1252630766909079555/qf-qI5EZ_400x400.jpg', + ref_id: 'da0a9fdc-eda1-4e07-8341-2100428065d1', + twitter_handle: 'thunderhubio', + }, + { + name: 'Dolu Zerologin', + profile_picture: 'https://pbs.twimg.com/profile_images/1577320325158682626/igGerO9A_400x400.jpg', + ref_id: '4c228a2d-4f9c-4bbd-bf49-d2be3159c6a4', + twitter_handle: 'Dolu_Web', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/965489b4-a414-4fd0-ab8c-55911b1596aa.jpg', + node_type: 'episode', + ref_id: 'c775e780-43ca-46c6-b5ef-e65b0103ee61', + show_title: 'BOLT FUN', + }, + { + children: [ + 'b8945614-0c02-4427-8749-f760691a4bea', + '2656d145-191a-4e86-8261-04c88a9a6562', + '433eb4ba-ba64-468f-9e3c-130fbc948adf', + ], + episode_title: 'TOXIC HAPPY HOUR! #Bitcoin, Beer and Plebs! 🍻😂🤌🏻', + guests: [ + { + name: 'Dr. Jeff Ross', + profile_picture: 'https://pbs.twimg.com/profile_images/1475554600094552064/DSlPG1lx_400x400.jpg', + ref_id: '51a969bb-dbf7-4d20-b128-74dcc5f560f6', + twitter_handle: 'VailshireCap', + }, + { + name: 'Tomer Strolight', + profile_picture: 'https://pbs.twimg.com/profile_images/1591960241008148481/HtyINxtU_400x400.jpg', + ref_id: '3a2bc97d-072c-4ed9-9a59-17ceeb68fe99', + twitter_handle: 'TomerStrolight', + }, + { + name: 'Laura Shin', + profile_picture: 'https://pbs.twimg.com/profile_images/1539462748173746176/hxR80FYT_400x400.png', + ref_id: 'a56a7b4d-edca-41d5-9d51-33396aa05b96', + twitter_handle: 'laurashin', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/2a1450bc-0649-4dc5-8ec9-1474af1ea1c3.jpg', + node_type: 'episode', + ref_id: '54fa34c9-0729-42ab-92d5-e5f8289ed32a', + show_title: 'Anders_🍆', + }, + { + children: ['d9edac8b-8349-4e52-b61e-a22ef687f4f3'], + episode_title: '#Bitcoin Self Custody Q&A Episode 15', + guests: [ + { + name: '@ToxiKat27', + profile_picture: 'https://pbs.twimg.com/profile_images/1505791887415730177/d0YDQ3Xc_400x400.jpg', + ref_id: '29e1a1c3-1dbe-4ab2-955d-8a7a7476996b', + twitter_handle: 'ToxiKat27', + }, + { + name: '@Lil_WhiTe_Boi19', + profile_picture: 'https://pbs.twimg.com/profile_images/1594796869233811474/g0_ZRshz_400x400.png', + ref_id: 'c737d37a-be78-4bd1-823a-04d569aefcfe', + twitter_handle: 'w_s_bitcoin', + }, + { + name: '@Tarek_Z_Saad', + profile_picture: 'https://pbs.twimg.com/profile_images/1598082570931130374/aiUPJ1HC_400x400.jpg', + ref_id: '16091cbf-d110-4299-af6e-84ecd0429d59', + twitter_handle: 'Tarek_Z_Saad', + }, + { + name: '@BeyondBlu3', + profile_picture: 'https://pbs.twimg.com/profile_images/1577513247107842050/JCDgPikZ_400x400.jpg', + ref_id: '0be89e9a-6e96-4241-8ee8-cdebf9b134b1', + twitter_handle: 'BeyondBlu3', + }, + { + name: '@life2_one', + profile_picture: '', + ref_id: 'd2a45191-e863-4e56-8a05-08afdff7f421', + twitter_handle: '', + }, + { + name: '@KahnsMichel', + profile_picture: '', + ref_id: '937fcaa9-4b73-4fbe-ada4-b40720644a1d', + twitter_handle: 'kahnsmichel', + }, + { + name: '@Jimmy14624', + profile_picture: 'https://pbs.twimg.com/profile_images/1594796869233811474/g0_ZRshz_400x400.png', + ref_id: '73c17ab8-ce99-4c87-ba45-3334c255c97b', + twitter_handle: 'w_s_bitcoin', + }, + { + name: '@SovereignHRZN', + profile_picture: 'https://pbs.twimg.com/profile_images/1604168916300873731/mLszGVm6_400x400.jpg', + ref_id: '2811a110-d1cc-4a2d-bead-59b4e1805817', + twitter_handle: 'SovereignHRZN', + }, + { + name: '@XpatSantiago', + profile_picture: 'https://pbs.twimg.com/profile_images/1599096281493778433/qeSvcIuj_400x400.jpg', + ref_id: 'bca4859c-3c8b-42c2-a0ee-86eb581f4078', + twitter_handle: 'XpatSantiago', + }, + { + name: '@MrHodl', + profile_picture: 'https://pbs.twimg.com/profile_images/1570497262735728640/q5ZDJFKz_400x400.jpg', + ref_id: '8abfce7f-a49d-49f9-8bab-6861e41910d5', + twitter_handle: 'MrHodl', + }, + { + name: '@bankhatin', + profile_picture: 'https://pbs.twimg.com/profile_images/1596672372744019969/prxTKz_7_400x400.jpg', + ref_id: 'c4af2875-19ec-4439-85da-4ff34ae397fe', + twitter_handle: 'bankhatin', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/4127f08c-505a-4a7d-935f-e93e87204089.jpg', + node_type: 'episode', + ref_id: '258c5ca5-52a6-4ce3-9994-e629263123d8', + show_title: 'Wicked Smart Bitcoin ∞/21M', + }, + { + children: ['41015fe4-63fd-46d7-8dde-f065457f2af6'], + episode_title: '#Bitcoin solutions for Emerging Economies', + guests: [ + { + name: '@RSK', + profile_picture: 'https://pbs.twimg.com/profile_images/1592915327343624195/HPPSuVx3_400x400.jpg', + ref_id: 'b326a250-3fc1-46da-a64c-2659a4de0e3a', + twitter_handle: 'RSKsmart', + }, + { + name: 'Femi Longe', + profile_picture: 'https://pbs.twimg.com/profile_images/1547047357371797504/avnHBa2W_400x400.jpg', + ref_id: '7a5a41f1-6d1e-46c9-b97f-20ae03eafdd1', + twitter_handle: 'TheArtOfTomas', + }, + { + name: '@Alexandria The Great', + profile_picture: 'https://pbs.twimg.com/profile_images/1575525599493427203/XubWEoDX_400x400.jpg', + ref_id: '1c95e8b2-3a98-46ce-933f-ef9f50c518c5', + twitter_handle: 'alesander97', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/b2dd8be4-74b5-47b2-b470-e568657f3a0d.jpg', + node_type: 'episode', + ref_id: '08c3748a-a85d-4d4f-a702-1fc3f1c46f33', + show_title: 'Art of Tomas', + }, + { + children: [ + 'd013b6c4-0962-464c-96e8-4070946d99a5', + 'fff2f38f-b219-4c96-bf6c-c8b7b48d55af', + '47586bfe-8c83-4281-96b8-c9e0dc0a3ba3', + ], + episode_title: 'Episode 112: Mental Health And Metabolism: Autism, Depression And Your Small Intestine', + guests: [], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/e8ad867b-9cbe-4126-9f37-313b4d2329a5.jpg', + node_type: 'episode', + ref_id: 'd862511e-6330-48b3-9d4a-44e8f754f0a5', + show_title: 'Dr Karl Goldkamp - Keto Naturopath', + }, + { + children: ['3ff527f0-04a4-4bb5-9279-87f48ac98da0', 'baa7169a-4b3a-462c-bcb5-03a34d1a41f1'], + episode_title: 'Bitcoin Backed Stablecoin’s', + guests: [ + { + name: 'Andrew Begin', + profile_picture: 'https://pbs.twimg.com/profile_images/1461826323102449665/spEoEcpR_400x400.jpg', + ref_id: '28db7b9d-1c71-4981-8044-baf001e58b94', + twitter_handle: 'agbegin', + }, + { + name: 'Yago', + profile_picture: 'https://pbs.twimg.com/profile_images/1369335486456684546/AIJdrQ5l_400x400.jpg', + ref_id: '0819a9d1-c085-42d5-8b3b-bc3ce79ff1ea', + twitter_handle: 'EdanYago', + }, + { + name: 'Sovereign Horizon', + profile_picture: 'https://pbs.twimg.com/profile_images/1604168916300873731/mLszGVm6_400x400.jpg', + ref_id: '6c159904-fe63-437e-91b5-5c444bbd11fa', + twitter_handle: 'SovereignHRZN', + }, + { + name: 'Art of Thomas', + profile_picture: 'https://pbs.twimg.com/profile_images/1547047357371797504/avnHBa2W_400x400.jpg', + ref_id: '2c312138-9a5f-4a75-9c19-513d5703d5ce', + twitter_handle: 'TheArtOfTomas', + }, + { + name: 'Maximiliano Carjuzaa', + profile_picture: 'https://pbs.twimg.com/profile_images/1566622024662917120/B6uyn9QR_400x400.jpg', + ref_id: 'a5273c83-28f1-4df3-b8c6-d3b081f55b31', + twitter_handle: 'maxcarjuzaa', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/046c6869-0627-4825-8ecf-45ff0aed97b6.jpg', + node_type: 'episode', + ref_id: '21d1d401-626c-4ec2-ba30-3c08f08ec3ea', + show_title: 'Alexandria The Great 🌋⛏🇿🇼', + }, + { + children: ['896a10a9-621e-4f5e-a8d7-d4504dffd923'], + episode_title: 'Reverse Proxy - #Bitcoin Nodes - NGINX is the Answer!🦾', + guests: [ + { + name: 'Pedro', + profile_picture: 'https://pbs.twimg.com/profile_images/1395874649876140035/z-IycTAj_400x400.jpg', + ref_id: '78acd8b7-3097-40c3-b626-245bc911dc49', + twitter_handle: 'pedromvpg', + }, + { + name: 'Machankura', + profile_picture: 'https://pbs.twimg.com/profile_images/1536075376409059331/0zddZFmE_400x400.jpg', + ref_id: '855f2d8f-2230-475d-b5c1-dcaace579de4', + twitter_handle: 'Machankura8333', + }, + { + name: 'DJ Satoshi', + profile_picture: 'https://pbs.twimg.com/profile_images/915987644043030528/5nh3JQSz_400x400.jpg', + ref_id: '02ae35cb-3728-441f-84c5-a8db5d9150b4', + twitter_handle: 'satoshi__tomiie', + }, + { + name: 'Portland.HODL', + profile_picture: 'https://pbs.twimg.com/profile_images/1562306406526492672/LiqmI9NS_400x400.jpg', + ref_id: 'aaa58ce5-7907-4c3a-9881-839cd012c456', + twitter_handle: 'PortlandHODL', + }, + { + name: 'anonsats', + profile_picture: 'https://pbs.twimg.com/profile_images/1601204123818401792/iQ85pwvS_400x400.jpg', + ref_id: 'f3bf3677-9864-4fe3-a8b0-976a67be45cd', + twitter_handle: 'anonsats', + }, + { + name: '₿rettInThe13%', + profile_picture: 'https://pbs.twimg.com/profile_images/1593104719311929345/tTSjoS2n_400x400.jpg', + ref_id: '0ad02828-02ee-465b-87c6-96e559905ed8', + twitter_handle: 'brettinthewoods', + }, + { + name: 'EasySats', + profile_picture: 'https://pbs.twimg.com/profile_images/1593330030905540618/ZHqVPhTM_400x400.jpg', + ref_id: 'd6d16cf5-4a9b-4517-897d-5cf98467ed1a', + twitter_handle: 'EasySats_', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/30180c4d-27f9-4215-81e0-6a22b16aba43.jpg', + node_type: 'episode', + ref_id: '18e340ea-90ef-4200-a19d-dc82e1e18e21', + show_title: 'okin@8333.mobi ⚡️ 🏰', + }, + { + children: [ + 'a3fe7197-5948-404f-a8b0-f04bb130db27', + '3cced3da-246a-4df7-884c-689661de7d66', + '3008a0a4-d3c8-4d33-aa67-f39e4ce1a87c', + '09e8e827-fd7b-4800-8633-9f4fe7416210', + ], + episode_title: 'Bear Market Buidl — Major #Bitcoin developments! #Stacks #Sidechains', + guests: [ + { + name: '@GriffdenNFT', + profile_picture: 'https://pbs.twimg.com/profile_images/1604377729062895617/R4pSEdH4_400x400.png', + ref_id: 'dafdf7ec-28c0-43d3-a0d9-b2d266f38738', + twitter_handle: 'GriffdenNFT', + }, + { + name: '@Chad_333', + profile_picture: 'https://pbs.twimg.com/profile_images/1592310541732970496/o1tbw9Eo_400x400.jpg', + ref_id: '484c7695-6a4e-4141-9585-1109bf23f8cf', + twitter_handle: 'Chad_333', + }, + { + name: '@jackbinswitch', + profile_picture: 'https://pbs.twimg.com/profile_images/1601214177439260672/O0SpU5B1_400x400.jpg', + ref_id: '9685e7f3-3e0c-4b84-9fd9-b8a1d96f6ae9', + twitter_handle: 'jackbinswitch', + }, + { + name: '@jimdotbtc', + profile_picture: 'https://pbs.twimg.com/profile_images/1593210347825119237/L_SNThWQ_400x400.png', + ref_id: '5dcf5545-fad6-44ee-ae56-360c5efe1151', + twitter_handle: 'jimdotbtc', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/99046513-2614-4eae-9de4-5781ba4b330a.jpg', + node_type: 'episode', + ref_id: '9f12b8c2-175e-4078-9871-99a2edf2e0f3', + show_title: 'STX:LDN', + }, + { + children: ['f66a9f05-a885-44f3-9673-f910c78d6360'], + episode_title: 'Rabbit Hole Recap #230: Building in the Bear Party Rip', + guests: [ + { + name: 'Jason', + profile_picture: 'https://pbs.twimg.com/profile_images/1458137423716622342/ctyc_MTX_400x400.jpg', + ref_id: 'ca893631-4be5-42c4-bff1-92cc2f6e43fe', + twitter_handle: 'JasonWrich', + }, + { + name: ' Texas Slim', + profile_picture: 'https://pbs.twimg.com/profile_images/1589784780970795011/02jf0fqp_400x400.jpg', + ref_id: 'add0c8be-0524-43e1-a3a3-aea1058057d4', + twitter_handle: 'modernTman', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/da64b29e-c2c0-41a6-ba29-acbaa2d022e8.jpg', + node_type: 'episode', + ref_id: '03b5ca12-0aeb-4f04-aed0-746681d93b56', + show_title: 'Rabbit Hole Recap', + }, + { + children: ['ccc45d70-f16e-498f-9f66-12cf8a221337'], + episode_title: 'UFC @NicolauMatheus - @LuPinheiroMMA - Fighting for #bitcoin! #296', + guests: [ + { + name: 'Matheus Nicolau', + profile_picture: 'https://pbs.twimg.com/profile_images/1600020909946912768/LlhR_2HX_400x400.jpg', + ref_id: 'be94e55e-4b46-4b37-92bb-431496b067de', + twitter_handle: 'NicolauMatheus', + }, + { + name: 'Luana Pinheiro', + profile_picture: 'https://pbs.twimg.com/profile_images/1461887787406221317/EFrMNheP_400x400.jpg', + ref_id: '219d8df1-3a60-41ff-8aa4-d08992f49148', + twitter_handle: 'LuPinheiroMMA', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/e1eca67b-d372-4031-bf1f-8f0ff7fe6092.jpg', + node_type: 'episode', + ref_id: '70bb863d-7226-4b9e-b13e-673f94a3eb86', + show_title: `Once Bitten! - precision mediump float; - precision mediump int; +A Bitcoin Podcast. +`, + }, + { + children: [ + 'e8539d75-fa8f-494a-bace-cf2e9997ba6c', + 'ba64a3e2-dd25-459b-8968-154f986c42f8', + '58d095b5-4c46-4586-888c-8b56a9afd883', + '39b8ddc0-5c0b-4fd0-9d71-6fee6f556a98', + '50e012ee-2ed3-4fbe-9703-2b4b2695f5ef', + '313705da-96e5-4cd4-aee7-48ca03a80b42', + 'a1ba314f-1a9e-432e-9350-d3b085c5c4d6', + ], + episode_title: '@NuclearBitcoinr - Mining #bitcoin With Small Modular Nuclear Reactors. #313', + guests: [ + { + name: 'Nuclear Bitcoiner', + profile_picture: 'https://pbs.twimg.com/profile_images/1443185278525579278/_Yl1nao1_400x400.jpg', + ref_id: '60f5891f-0864-4ed4-987a-81da4768b3ba', + twitter_handle: 'nuclearbitcoinr', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/e1eca67b-d372-4031-bf1f-8f0ff7fe6092.jpg', + node_type: 'episode', + ref_id: '06494953-4c8e-4376-9450-9efb8b00acc3', + show_title: `Once Bitten! - varying vec3 vOutputDirection; +A Bitcoin Podcast. +`, + }, + { + children: ['1ba72c1d-ff22-4572-ad24-8171bfce9de3', '5efbc2c3-e67a-4b16-9c9d-285bdd37e906'], + episode_title: 'Bitcoin Charlotte Book Club - Sovereign Individual Ch 1-7', + guests: [ + { + name: 'Bolt', + profile_picture: 'https://pbs.twimg.com/profile_images/1352721439879786496/wfevZ8bG_400x400.jpg', + ref_id: 'b165e497-f255-4ce5-9762-30c90dcf776d', + twitter_handle: 'Bitcoin_CLT', + }, + { + name: 'Victor', + profile_picture: 'https://pbs.twimg.com/profile_images/1519726025013350400/GHxSzgA3_400x400.jpg', + ref_id: 'd91fff8d-e4c6-4aeb-9f32-021e4a4ff9a6', + twitter_handle: 'victorwong', + }, + { + name: 'George', + profile_picture: 'https://pbs.twimg.com/profile_images/1173474608856608768/vEBnPUdm_400x400.jpg', + ref_id: '5946bdf6-8feb-43aa-b2ca-46b2944b0572', + twitter_handle: 'GeorgeNotFound', + }, + { + name: 'Mark', + profile_picture: 'https://pbs.twimg.com/profile_images/1511102924310544387/j6E29xq6_400x400.jpg', + ref_id: 'c8cd0c95-c105-41c4-8fae-9dbfa76d84f2', + twitter_handle: 'markiplier', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/fe6bdbce-e91d-43cf-ab33-0e98bffabecc.jpg', + node_type: 'episode', + ref_id: '9dcca755-0a20-45e5-8e4d-dfe2800b9c6f', + show_title: 'Bitcoin Charlotte', + }, + { + children: ['821f7b5c-c6ad-422b-b4e1-ed34f915e4af'], + episode_title: 'TABConf Mixtape Vol 2: Sound Bites from TABConf', + guests: [ + { + name: 'Michael', + profile_picture: 'https://pbs.twimg.com/profile_images/1558687629599657990/vf-bU14b_400x400.jpg', + ref_id: 'c7b4faa1-db77-4459-b03f-0e41e15efae7', + twitter_handle: 'MichaelHawaii', + }, + { + name: 'Ben', + profile_picture: 'https://pbs.twimg.com/profile_images/1580596905721171969/0NnLeJWA_400x400.jpg', + ref_id: 'da0132b9-0d19-43e6-bc1a-9c7818c79ba4', + twitter_handle: 'benshapiro', + }, + { + name: 'brandon', + profile_picture: 'https://pbs.twimg.com/profile_images/1575598727812812803/4FkPb0vt_400x400.jpg', + ref_id: '8a27da7a-c05c-44da-8247-3c5f68bc3164', + twitter_handle: 'ThrillerBitcoin', + }, + { + name: 'shane', + profile_picture: 'https://pbs.twimg.com/profile_images/1575598727812812803/4FkPb0vt_400x400.jpg', + ref_id: '2e5ce678-7d04-4a48-8bd1-281329ea9424', + twitter_handle: 'ThrillerBitcoin', + }, + { + name: 'exfrog', + profile_picture: 'https://pbs.twimg.com/profile_images/1575598727812812803/4FkPb0vt_400x400.jpg', + ref_id: 'd0dc102c-404e-4753-9290-9a3fe27fe2ee', + twitter_handle: 'ThrillerBitcoin', + }, + { + name: 'josh', + profile_picture: 'https://pbs.twimg.com/profile_images/1575598727812812803/4FkPb0vt_400x400.jpg', + ref_id: '34eb29e3-da86-485f-b20a-059f7d41f6ad', + twitter_handle: 'ThrillerBitcoin', + }, + { + name: 'autumn', + profile_picture: 'https://pbs.twimg.com/profile_images/1575598727812812803/4FkPb0vt_400x400.jpg', + ref_id: '3224f2ec-3e77-485f-88b8-6930e19f8ac6', + twitter_handle: 'ThrillerBitcoin', + }, + { + name: 'buck', + profile_picture: 'https://pbs.twimg.com/profile_images/1575598727812812803/4FkPb0vt_400x400.jpg', + ref_id: '00a55ec0-9b1a-482a-893a-345d350a33a0', + twitter_handle: 'ThrillerBitcoin', + }, + { + name: 'stephen', + profile_picture: 'https://pbs.twimg.com/profile_images/1575598727812812803/4FkPb0vt_400x400.jpg', + ref_id: '9dc56711-eacc-4691-821e-fe2a26855ea9', + twitter_handle: 'ThrillerBitcoin', + }, + { + name: 'hodl', + profile_picture: 'https://pbs.twimg.com/profile_images/1575598727812812803/4FkPb0vt_400x400.jpg', + ref_id: 'b012eda0-b78c-46e7-ab46-6a7139584fc7', + twitter_handle: 'ThrillerBitcoin', + }, + { + name: 'evan', + profile_picture: 'https://pbs.twimg.com/profile_images/1575598727812812803/4FkPb0vt_400x400.jpg', + ref_id: '9a8418e9-8976-425c-95ce-ed2fe307e380', + twitter_handle: 'ThrillerBitcoin', + }, + { + name: 'muzz', + profile_picture: 'https://pbs.twimg.com/profile_images/1575598727812812803/4FkPb0vt_400x400.jpg', + ref_id: '444b8330-caa1-4bcf-8144-7d9110ae2242', + twitter_handle: 'ThrillerBitcoin', + }, + { + name: 'thomas', + profile_picture: 'https://pbs.twimg.com/profile_images/1575598727812812803/4FkPb0vt_400x400.jpg', + ref_id: 'e2140e58-314d-4425-bc97-20f52f951866', + twitter_handle: 'ThrillerBitcoin', + }, + { + name: 'justin', + profile_picture: 'https://pbs.twimg.com/profile_images/1575598727812812803/4FkPb0vt_400x400.jpg', + ref_id: '2ce04090-b9b1-4e84-a87f-9c9dc9ececec', + twitter_handle: 'ThrillerBitcoin', + }, + { + name: 'stakamoto', + profile_picture: 'https://pbs.twimg.com/profile_images/1575598727812812803/4FkPb0vt_400x400.jpg', + ref_id: '8b249d9b-8521-4e0e-bf24-2d8b8721d26b', + twitter_handle: 'ThrillerBitcoin', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/4240c90e-0086-4ece-bfe5-84a282c5059e.jpg', + node_type: 'episode', + ref_id: 'b8289cbb-ec69-49a8-b6ab-c1fd808acc09', + show_title: 'Thriller Bitcoin', + }, + { + children: ['c13cad10-b242-4812-ad19-3bce525dfeb0'], + episode_title: + 'Pieter Wuille and Tim Ruffing - Nesting, ROAST, Half-Aggregation, Adaptor Signatures (part 2)', + guests: [ + { + name: 'Tim Ruffing', + profile_picture: 'https://pbs.twimg.com/profile_images/925128264502439936/XcmMIk8k_400x400.jpg', + ref_id: '222f7374-6d68-4934-81ed-37567c515b59', + twitter_handle: 'real_or_random', + }, + { + name: 'Pieter Wuille', + profile_picture: 'https://pbs.twimg.com/profile_images/1264051937172836353/n7gHdLbB_400x400.jpg', + ref_id: '40260d2f-3480-47d6-8515-d2e780901273', + twitter_handle: 'pwuille', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/24a144b0-7ca3-40e9-9c42-86b9fce0b662.jpg', + node_type: 'episode', + ref_id: 'daddd93e-7bc6-4c50-a150-5199b437afc9', + show_title: 'The Chaincode Podcast', + }, + { + children: [ + '2a01dc8c-19f7-47a8-bfa8-92645a7314c0', + '1510e150-aee2-42cb-ac57-79b4997bb6cb', + '9abcd65c-f311-4a4a-ae65-bbef89f36fc7', + ], + episode_title: + "BR023 - OP_VAULT for Bitcoin Covenants Panel ft. James O'Beirne, Rijndael, Antoine Poinsot & Carman", + guests: [ + { + name: 'Carman', + profile_picture: 'https://pbs.twimg.com/profile_images/1609775498971725824/5vyAafE3_400x400.jpg', + ref_id: '09405d70-6fa6-4f2c-92f1-a2951ad56447', + twitter_handle: 'benthecarman', + }, + { + name: 'Antoine Poinsot', + profile_picture: 'https://pbs.twimg.com/profile_images/1108377445936316423/ArRDGbr5_400x400.jpg', + ref_id: '1ba10809-b3e6-4e37-a906-697a0368b814', + twitter_handle: 'darosior', + }, + { + name: 'Rijndael', + profile_picture: 'https://pbs.twimg.com/profile_images/1542705395873058817/0zsy4Yur_400x400.jpg', + ref_id: '861d5324-8ede-4059-826f-f29abca5d7e6', + twitter_handle: 'rot13maxi', + }, + { + name: "James O'Beirne", + profile_picture: 'https://pbs.twimg.com/profile_images/1542173995650408450/iDxrdmuj_400x400.jpg', + ref_id: 'e8e48fcf-9e54-4c66-9b20-aacf5c5b504e', + twitter_handle: 'jamesob', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/f1879df9-9bc6-4a76-951f-24548da768ef.jpg', + node_type: 'episode', + ref_id: '56bf65e9-41d5-42e1-95d6-239e4c835781', + show_title: 'Bitcoin.Review Podcast with NVK & Guests', + }, + { + children: ['62034201-203b-42ff-9884-a850d6298caf'], + episode_title: + 'BR020 - Zeus, Alby, Bitcoin Knots Keys Leaked +MORE ft. Sjors, Schmidty, Evan Kaloudis & Justin Moon', + guests: [ + { name: 'Sjors', profile_picture: '', ref_id: 'fa5c587a-09ef-4cbd-b470-cfc78163f749', twitter_handle: '' }, + { + name: 'Evan Kaloudis', + profile_picture: 'https://pbs.twimg.com/profile_images/1596923848997445633/DqxrGpkW_400x400.jpg', + ref_id: '420172fa-9431-4ba4-965c-adab17648d1b', + twitter_handle: 'evankaloudis', + }, + { + name: 'Schmidty', + profile_picture: 'https://pbs.twimg.com/profile_images/1334879848280494083/A6ssSEfV_400x400.jpg', + ref_id: '28f55137-e733-4f5b-b988-7cb60ef0d330', + twitter_handle: 'bitschmidty', + }, + { + name: 'Justin Moon', + profile_picture: 'https://pbs.twimg.com/profile_images/1512674225651335169/iYHDJQcy_400x400.jpg', + ref_id: '1d2cdf64-358f-4b00-8f2b-0c94f798dc2c', + twitter_handle: '_JustinMoon_', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/f1879df9-9bc6-4a76-951f-24548da768ef.jpg', + node_type: 'episode', + ref_id: 'ff88a8b8-bcd6-4d86-8a65-8a68def35b9f', + show_title: 'Bitcoin.Review Podcast with NVK & Guests', + }, + { + children: ['08600eb8-a8b1-4be4-b505-3adc409da2f8', '1958362b-b149-4466-b873-4d22a36d67d8'], + episode_title: + 'BR019 - Proof of Keys Day Twitter Space ft. Lopp, Craig Raw, Lazy Ninja, mshodl, Rijndael & guests', + guests: [], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/f1879df9-9bc6-4a76-951f-24548da768ef.jpg', + node_type: 'episode', + ref_id: '810a3acb-e30e-46bc-8c67-1d504b2e7c09', + show_title: 'Bitcoin.Review Podcast with NVK & Guests', + }, + { + children: ['f9d1d228-19db-4a2d-bfb3-7853fd745ea0', '88a4665a-7414-4ccd-96e4-3fb43f93d9bc'], + episode_title: 'Taproot Activation Q&A with Bitcoin Devs - TABConf 2021', + guests: [ + { + name: 'Andrew Chow', + profile_picture: 'https://pbs.twimg.com/profile_images/1452266201770496010/44FHCtZM_400x400.jpg', + ref_id: 'f96d87ca-5060-4021-aeb9-61db03312027', + twitter_handle: 'andrewrchow', + }, + { + name: 'Ben Carman', + profile_picture: 'https://pbs.twimg.com/profile_images/1550704386007089152/pLwUSeff_400x400.jpg', + ref_id: '1d1e95ba-b4af-415f-aafe-85c6dd7571b8', + twitter_handle: 'benthecarman', + }, + { + name: 'Matt Corallo', + profile_picture: 'https://pbs.twimg.com/profile_images/697361498587451394/_rX0-O0W_400x400.png', + ref_id: '08cb3c45-c0bc-4a60-ae5b-a1283d352c8b', + twitter_handle: 'TheBlueMatt', + }, + { + name: 'Pieter Wuille', + profile_picture: 'https://pbs.twimg.com/profile_images/1264051937172836353/n7gHdLbB_400x400.jpg', + ref_id: '40260d2f-3480-47d6-8515-d2e780901273', + twitter_handle: 'pwuille', + }, + { + name: 'Vivek Kasarabada', + profile_picture: '', + ref_id: '60ed22d0-8cf3-410e-8a7c-9c343ae109ca', + twitter_handle: '', + }, + { + name: 'Murch', + profile_picture: 'https://pbs.twimg.com/profile_images/1269477743525130241/-U843Cmt_400x400.png', + ref_id: '3e2c1c73-a057-4475-9782-3bb0d3d8cc62', + twitter_handle: 'murchandamus', + }, + { + name: 'Andrew Poelstra', + profile_picture: 'https://pbs.twimg.com/profile_images/1316562683009921024/FSscAYvJ_400x400.jpg', + ref_id: '15fb9c53-c988-4af1-bbf0-4832d71b0a01', + twitter_handle: 'Blockstream', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/e7d2a4ca-6b44-4a45-a94c-6f48987979f7.jpg', + node_type: 'episode', + ref_id: 'f7e75069-adf6-41b0-9bb7-a6a2aa846493', + show_title: 'TABConf (The Atlanta Bitcoin Conference)', + }, + { + children: ['cd29b1a1-f94b-4eee-84ce-ddf8a4fcb0c5'], + episode_title: 'Lightning for Plebs - TABConf 2021', + guests: [ + { + name: 'ketominer', + profile_picture: 'https://pbs.twimg.com/profile_images/1245972079528329218/YDUD9N2Q_400x400.jpg', + ref_id: '2f8b0b59-6f23-4c89-973c-668cc7666998', + twitter_handle: 'ketominer', + }, + { + name: 'Ryan Gentry', + profile_picture: 'https://pbs.twimg.com/profile_images/1362751223217160203/ekMa_yY-_400x400.jpg', + ref_id: '8fe78b55-bc38-40df-9cb5-ffd5c84166a2', + twitter_handle: 'RyanTheGentry', + }, + { + name: 'Dread', + profile_picture: 'https://pbs.twimg.com/profile_images/1532557131819491328/vvs1cD-7_400x400.jpg', + ref_id: 'e61af76b-8fbd-4719-b753-0a70edd22fa8', + twitter_handle: 'PoleVaultDream', + }, + { + name: 'Andre Neves', + profile_picture: 'https://pbs.twimg.com/profile_images/1604172627550969856/bYCGb7Ev_400x400.jpg', + ref_id: '227e071d-f8a6-4137-8078-729fa9eb3a13', + twitter_handle: 'andreneves', + }, + { + name: 'Nate G', + profile_picture: 'https://pbs.twimg.com/profile_images/1542983032507858944/9w_UUx5Z_400x400.jpg', + ref_id: 'bda29551-f17f-452c-9204-4d6cafdf4f3b', + twitter_handle: 'natecgriffin', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/e7d2a4ca-6b44-4a45-a94c-6f48987979f7.jpg', + node_type: 'episode', + ref_id: '6eb2a481-408f-4989-9f28-67789651259a', + show_title: 'TABConf (The Atlanta Bitcoin Conference)', + }, + { + children: ['6731ba0c-c57b-4fb1-a2f6-6e1ec641e830'], + episode_title: 'Brink Projects: Research and Improvements for Bitcoin - TABConf 2021', + guests: [ + { + name: 'Gloria Zhao', + profile_picture: 'https://pbs.twimg.com/profile_images/1144496084330266631/aPKPfoX3_400x400.png', + ref_id: 'cebd71c3-4ccf-452d-8ba7-4982f49fd060', + twitter_handle: 'GloriaHuiZhao', + }, + { + name: 'Mike Schmidt', + profile_picture: 'https://pbs.twimg.com/profile_images/1320935020589158400/gFovyRlj_400x400.jpg', + ref_id: 'd503db9b-a7b1-49e1-8ef6-7541df3c2473', + twitter_handle: 'nytmike', + }, + { + name: 'Jesse Posner', + profile_picture: 'https://pbs.twimg.com/profile_images/1467067234484830213/T6PtLZq1_400x400.jpg', + ref_id: 'bb55767f-dfbb-4182-8dd8-e1b08e0c6ad6', + twitter_handle: 'jesseposner', + }, + { + name: 'Larry Ruane', + profile_picture: 'https://pbs.twimg.com/profile_images/1226076521/bike_crop_400x400.JPG', + ref_id: 'ce38f2dd-d41f-4957-ad83-671c3dc29cc5', + twitter_handle: 'larryruane', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/e7d2a4ca-6b44-4a45-a94c-6f48987979f7.jpg', + node_type: 'episode', + ref_id: '89049a1c-0171-4999-b003-57e1b57d92b2', + show_title: 'TABConf (The Atlanta Bitcoin Conference)', + }, + { + children: ['acdb65ab-789f-480c-9f88-414599d19a43'], + episode_title: 'Scaling Bitcoin Off-Chain - TABConf 2021', + guests: [ + { + name: 'Graham Krizek', + profile_picture: 'https://pbs.twimg.com/profile_images/1600169182347288582/yNztRz0g_400x400.jpg', + ref_id: '186974f3-37dd-4d62-9d88-1b7fa88c6cce', + twitter_handle: 'gkrizek', + }, + { + name: 'Stephen Livera', + profile_picture: 'https://pbs.twimg.com/profile_images/1362551718110580740/v-W5Q2uo_400x400.jpg', + ref_id: '9c9974bd-6a59-480f-8d5a-12b634b15b39', + twitter_handle: 'stephanlivera', + }, + { + name: 'Alex Bosworth', + profile_picture: 'https://pbs.twimg.com/profile_images/1364274244960481281/G5gNi3di_400x400.jpg', + ref_id: '2389663a-f7f8-42a7-99da-551089a9ea6a', + twitter_handle: 'alexbosworth', + }, + { + name: 'Matt Corallo', + profile_picture: 'https://pbs.twimg.com/profile_images/697361498587451394/_rX0-O0W_400x400.png', + ref_id: '08cb3c45-c0bc-4a60-ae5b-a1283d352c8b', + twitter_handle: 'TheBlueMatt', + }, + { + name: 'Niftynei', + profile_picture: 'https://pbs.twimg.com/profile_images/1594756549162975240/J-4dbH6W_400x400.jpg', + ref_id: '5e9f617b-cc12-4e3d-9fb5-ad058f14b171', + twitter_handle: 'niftynei', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/e7d2a4ca-6b44-4a45-a94c-6f48987979f7.jpg', + node_type: 'episode', + ref_id: 'd842ce17-a4c0-49a6-bdc5-5268f1d61779', + show_title: 'TABConf (The Atlanta Bitcoin Conference)', + }, + { + children: ['65a9d9c6-3211-444a-a49f-f4a34b9ab5fb', 'd96fca70-c1c7-4b71-9d35-9aadf2820909'], + episode_title: 'Scaling Bitcoin On-Chain - TABConf 2021', + guests: [ + { + name: 'Andrew Chow', + profile_picture: 'https://pbs.twimg.com/profile_images/1452266201770496010/44FHCtZM_400x400.jpg', + ref_id: 'f96d87ca-5060-4021-aeb9-61db03312027', + twitter_handle: 'andrewrchow', + }, + { + name: 'Mark Erhardt Murch', + profile_picture: 'https://pbs.twimg.com/profile_images/1269477743525130241/-U843Cmt_400x400.png', + ref_id: 'ef2f2f68-ae16-4e78-80cb-0be9bd156988', + twitter_handle: 'Murchandamus', + }, + { + name: 'Andrew Poelstra', + profile_picture: 'https://pbs.twimg.com/profile_images/1316562683009921024/FSscAYvJ_400x400.jpg', + ref_id: '15fb9c53-c988-4af1-bbf0-4832d71b0a01', + twitter_handle: 'Blockstream', + }, + { + name: 'Peter Wuille', + profile_picture: 'https://pbs.twimg.com/profile_images/1264051937172836353/n7gHdLbB_400x400.jpg', + ref_id: 'fb836ce4-a933-4419-99d8-932fe65219a1', + twitter_handle: 'pwuille', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/e7d2a4ca-6b44-4a45-a94c-6f48987979f7.jpg', + node_type: 'episode', + ref_id: '8d9b0689-2e69-44c1-afe2-3519e999390a', + show_title: 'TABConf (The Atlanta Bitcoin Conference)', + }, + { + children: [ + '9f69933d-69fe-47a0-af4d-9d80726e60aa', + 'f507641d-2514-41d3-a4f3-9b218136fa98', + 'addee850-119f-472c-87c2-05fc0642abeb', + ], + episode_title: 'Cool Apps Built on Lightning - March 16, 2022 - Voltage Twitter Spaces', + guests: [ + { + name: 'Chad Atkins', + profile_picture: 'https://pbs.twimg.com/profile_images/1200611447979544576/W9ocRJTb_400x400.jpg', + ref_id: '62da3c50-0a46-400b-81a3-5f482f5b8fee', + twitter_handle: 'Chemchad', + }, + { + name: 'Michael Atwood', + profile_picture: 'https://pbs.twimg.com/profile_images/1362207977470521345/Jy2_Ge60_400x400.jpg', + ref_id: '16359ade-afb9-4a37-be0b-0844a6134327', + twitter_handle: 'Dooowta', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/2ec62250-4755-4616-8342-096a2cfab95f.jpg', + node_type: 'episode', + ref_id: '3b818893-4605-499c-a467-5abcc23f9483', + show_title: 'Voltage', + }, + { + children: ['c7beffcd-bb44-4cf9-a04a-a26f6439114c', '3db5f375-817e-4275-980c-6475803c430b'], + episode_title: + 'Lightning Networks Impact on Music w/ Michael Rhee, Founder of Wavlake - Voltage Twitter Spaces', + guests: [ + { + name: 'Michael Rhee', + profile_picture: 'https://pbs.twimg.com/profile_images/1348612450/IMG_0298_400x400.JPG', + ref_id: '91302fb9-2d08-400e-bd1f-2d52e0af5508', + twitter_handle: 'rheedio', + }, + { + name: '@rheedio', + profile_picture: 'https://pbs.twimg.com/profile_images/1348612450/IMG_0298_400x400.JPG', + ref_id: 'a20f5e1f-5969-47a6-b986-faf29c0c4da0', + twitter_handle: 'rheedio', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/2ec62250-4755-4616-8342-096a2cfab95f.jpg', + node_type: 'episode', + ref_id: 'a44e78cd-dc66-4b67-9523-7ddff0d3655f', + show_title: 'Voltage', + }, + { + children: ['f10270d7-1cdc-4922-853a-1f8247750382', 'd2d3e71f-24ad-4cf3-b516-f63ac5283d50'], + episode_title: 'TRUBIT bringing Digital Loyalty Assets to Bitcoin - Voltage Twitter Spaces', + guests: [ + { + name: '@0xLinden', + profile_picture: 'https://pbs.twimg.com/profile_images/1439365331202437125/JBiXogun_400x400.jpg', + ref_id: 'b8bb4402-8f86-4220-9dee-0fa28ff8de72', + twitter_handle: '0xLinden', + }, + { + name: 'Stephen Doge', + profile_picture: 'https://pbs.twimg.com/profile_images/1215979900387184641/nZXkhgoP_400x400.jpg', + ref_id: '076972a2-cdab-4766-8c66-618472b80772', + twitter_handle: 'StephenDodge20', + }, + { + name: '@617a7a', + profile_picture: 'https://pbs.twimg.com/profile_images/1548336437308715016/FUZFJf9k_400x400.jpg', + ref_id: '148d77a5-6e95-4855-9e17-19e68f648898', + twitter_handle: '617a7a', + }, + { + name: '@ian__major', + profile_picture: 'https://pbs.twimg.com/profile_images/1427414299169984517/Hw0ux6ie_400x400.jpg', + ref_id: '7ed41a74-21a4-43a4-9a05-e977c981b6d3', + twitter_handle: 'ian__major', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/2ec62250-4755-4616-8342-096a2cfab95f.jpg', + node_type: 'episode', + ref_id: '0c4f330b-a39d-4312-9775-58b42c7c9723', + show_title: 'Voltage', + }, + { + children: [ + '076eecc3-0553-4bb7-8fe2-9f43a6d54f79', + '4310fd96-1c4f-42a7-b72f-60fc5968c75d', + '3d451e38-8616-43bc-8269-c3b8ce7d9b15', + 'ca89bac3-188b-4e90-8d0b-fe42d0abf067', + 'd0f57eb5-87ba-4180-ad39-96589093a0f0', + ], + episode_title: 'Small Businesses Embracing Bitcoin w/ Michael from Oshi App - Voltage Twitter Spaces', + guests: [ + { + name: 'Michael Atwood', + profile_picture: 'https://pbs.twimg.com/profile_images/1362207977470521345/Jy2_Ge60_400x400.jpg', + ref_id: '16359ade-afb9-4a37-be0b-0844a6134327', + twitter_handle: 'Dooowta', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/2ec62250-4755-4616-8342-096a2cfab95f.jpg', + node_type: 'episode', + ref_id: '205a0650-fefe-4aaf-a894-faa8b72d966a', + show_title: 'Voltage', + }, + { + children: ['e9443306-25af-42d3-830d-ed6a26721103'], + episode_title: 'Austin Bitcoin Design Club Interview w/ Sahil, FuturePaul, and Car', + guests: [ + { + name: 'Car Gonzalez', + profile_picture: 'https://pbs.twimg.com/profile_images/1541855444720836608/F4v02BuD_400x400.jpg', + ref_id: 'b554604d-47eb-4c7c-b6c9-87a062e6a844', + twitter_handle: 'Car_mdq_2010', + }, + { + name: 'Sahil Chaturvedi', + profile_picture: 'https://pbs.twimg.com/profile_images/1362511727066107904/yP4o43cz_400x400.jpg', + ref_id: '8b56eaa4-c9d6-46e8-a313-fbccd0ee86b5', + twitter_handle: 'SahilC0', + }, + { + name: 'Future Paul', + profile_picture: 'https://pbs.twimg.com/profile_images/1508452962917666821/1QheRD09_400x400.jpg', + ref_id: 'ec933e22-f395-4817-b608-4337eaaf60a4', + twitter_handle: 'futurepaul', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/2ec62250-4755-4616-8342-096a2cfab95f.jpg', + node_type: 'episode', + ref_id: 'a60dc641-5d14-4960-ab73-66ff199edd1d', + show_title: 'Voltage', + }, + { + children: ['f3d0a35e-3e21-4c0c-874c-d6f2b1f37eed'], + episode_title: + 'The Future of Bitcoin Technology with Pierre Rochard, Dhruv Bansal, Warren Togami and Guy Swann', + guests: [ + { + name: 'Warren Togami', + profile_picture: 'https://pbs.twimg.com/profile_images/1577819570039128065/bBmumEx9_400x400.jpg', + ref_id: 'f082b94a-673f-4b99-b46e-49a342b5792a', + twitter_handle: 'wtogami', + }, + { + name: 'Dhruv Bansal', + profile_picture: 'https://pbs.twimg.com/profile_images/908397811284172800/kR9kKNsE_400x400.jpg', + ref_id: '6ed2b14a-d97d-4a3f-b5b5-4c3222d85624', + twitter_handle: 'dhruvbansal', + }, + { + name: 'Pierre Rochard', + profile_picture: 'https://pbs.twimg.com/profile_images/1567258180861792256/EEEBkvQR_400x400.jpg', + ref_id: '426b30ba-7c24-4558-b926-ec307756a876', + twitter_handle: 'BitcoinPierre', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/492cbcce-3744-4d8b-b2ca-3a7f063e798a.jpg', + node_type: 'episode', + ref_id: '3af98dc1-5e7c-4ef3-ad74-b9b6afaee8b9', + show_title: 'Swan Bitcoin', + }, + { + children: ['6e890ef3-7358-40d6-a01f-44f444dbabfc'], + episode_title: '#Bitcoin Mining Saves the World - Brought to you by Marathon', + guests: [ + { + name: 'Steve Barbour', + profile_picture: 'https://pbs.twimg.com/profile_images/1592714173469065216/q8kXPyQI_400x400.jpg', + ref_id: '63a731b8-4759-4360-9e9d-d66f884e12d8', + twitter_handle: 'SGBarbour', + }, + { + name: 'Nathaniel Harmon', + profile_picture: 'https://pbs.twimg.com/profile_images/1578090357102780416/etXW-RA9_400x400.jpg', + ref_id: '9105fb4e-4150-4c25-90f1-8ea770585749', + twitter_handle: 'NateHawaii', + }, + { + name: 'Taylor Monnig', + profile_picture: 'https://pbs.twimg.com/profile_images/1599563776621219840/mvb8y3zY_400x400.jpg', + ref_id: 'b8513b01-ff94-4d7f-944f-5c92e1126885', + twitter_handle: 'taylorbmonnig', + }, + { + name: 'Harry Suddock', + profile_picture: '', + ref_id: '6440ea0f-c982-4b76-b7c2-9c6bf7e9a4a9', + twitter_handle: '', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/492cbcce-3744-4d8b-b2ca-3a7f063e798a.jpg', + node_type: 'episode', + ref_id: '625d9252-2f5e-4f53-b577-dd2dfd4d4749', + show_title: 'Swan Bitcoin', + }, + { + children: ['876e20ef-be1b-44e6-a77d-4af5beb33ad4'], + episode_title: 'Austin Bitcoin Club: August - Value for Value Panel', + guests: [ + { + name: 'Justin Rezvani', + profile_picture: 'https://pbs.twimg.com/profile_images/1574666257781104641/hWG0vkSQ_400x400.jpg', + ref_id: 'b00877d0-ccbe-4c77-9c8c-88ab15063150', + twitter_handle: 'justin_rezvani', + }, + { + name: 'Lyle Pratt', + profile_picture: 'https://pbs.twimg.com/profile_images/1477702801962721285/KqnrA7oU_400x400.jpg', + ref_id: 'ab752a01-84bb-4260-a683-2eb5798b1dce', + twitter_handle: 'lylepratt', + }, + { + name: 'Keyan Kousha', + profile_picture: 'https://pbs.twimg.com/profile_images/1403763601391951878/ybuppfHt_400x400.jpg', + ref_id: '7ef39c9b-63ba-4dd0-989e-2230afb45129', + twitter_handle: 'k00bideh', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/b29c81c8-cccd-4a6b-b78f-3c1591a54d27.jpg', + node_type: 'episode', + ref_id: '8eef2f82-bbf9-4fef-ba3d-102679d4a1a5', + show_title: 'Austin Bitcoin Club', + }, + { + children: ['b9fd54d3-49e8-44e1-a208-7780d50a3b3a'], + episode_title: 'Synonym Spaces Lightning Tokens', + guests: [ + { + name: 'Paolo Ardoino', + profile_picture: 'https://pbs.twimg.com/profile_images/1583467513198923781/nCWMWFIn_400x400.jpg', + ref_id: '9bb3e215-6065-4fe2-aac5-2b1d5545d48c', + twitter_handle: 'paoloardoino', + }, + { + name: 'John Carvalho', + profile_picture: 'https://pbs.twimg.com/profile_images/1601964735016177676/c1mAfspt_400x400.jpg', + ref_id: 'f28f037f-a3af-48af-bdd3-28023219b524', + twitter_handle: 'BitcoinErrorLog', + }, + { + name: 'Reza Bandegi', + profile_picture: 'https://pbs.twimg.com/profile_images/1446675390370500614/4LGHNSkl_400x400.jpg', + ref_id: 'ead50c13-2f13-4ffc-86b5-5a3eb49a5804', + twitter_handle: 'r32a_', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/63e0cbc0-731d-4ea0-9dd2-2b8b841eb28a.jpg', + node_type: 'episode', + ref_id: 'a1e3c3cf-2045-4c33-8152-0e162b7ca729', + show_title: 'Synonym', + }, + { + children: [ + 'd98bc278-4c35-4325-992c-78437ccf3569', + '144eff69-fd7a-48da-b92f-bb5b13e0b4f7', + '9f9305dd-fff2-4bb3-9e3f-698a55090999', + ], + episode_title: 'Blockware Intelligence Podcast: 2022 Highlights', + guests: [ + { + name: 'Michael', + profile_picture: 'https://pbs.twimg.com/profile_images/1558687629599657990/vf-bU14b_400x400.jpg', + ref_id: 'c7b4faa1-db77-4459-b03f-0e41e15efae7', + twitter_handle: 'MichaelHawaii', + }, + { + name: 'Cory Klippsten', + profile_picture: 'https://pbs.twimg.com/profile_images/1569687200857755648/fxiCeaqc_400x400.jpg', + ref_id: 'ddfb9b4c-4e6a-4f4c-a01b-e6bb1bc55464', + twitter_handle: 'coryklippsten', + }, + { + name: 'Joe Consorti', + profile_picture: 'https://pbs.twimg.com/profile_images/1596902707511664640/GYGWVDts_400x400.jpg', + ref_id: '8d2024b2-03bb-454d-9bd6-bb121904b76a', + twitter_handle: 'JoeConsorti', + }, + { + name: 'Jeff Booth', + profile_picture: 'https://pbs.twimg.com/profile_images/1362957991410954241/spiaMAg2_400x400.jpg', + ref_id: 'f1143bcc-9ab9-4716-8259-0e5b026f8039', + twitter_handle: 'JeffBooth', + }, + { + name: 'James Lavish', + profile_picture: 'https://pbs.twimg.com/profile_images/1466279082157502464/flD6cWI3_400x400.jpg', + ref_id: 'cf06ab2d-2ff3-4d7b-bef6-b996ae68517a', + twitter_handle: 'jameslavish', + }, + { + name: 'Adam O', + profile_picture: 'https://pbs.twimg.com/profile_images/1395896857990160391/tJpgS2_p_400x400.jpg', + ref_id: '95af0dd3-1e27-41b9-a36b-8a2c44438e85', + twitter_handle: 'denverbitcoin', + }, + { + name: 'Jack Mallers', + profile_picture: 'https://pbs.twimg.com/profile_images/1599778945699909632/O0qc9ykA_400x400.jpg', + ref_id: 'd2e4aac5-e5e1-42fc-8f08-b3a77c076a64', + twitter_handle: 'jackmallers', + }, + { + name: 'Lyn Alden', + profile_picture: 'https://pbs.twimg.com/profile_images/1521181379677073414/bm4LcJTr_400x400.jpg', + ref_id: '903381dd-4b8a-4b59-8ecd-3281ae3ba297', + twitter_handle: 'LynAldenContact', + }, + { + name: 'Dylan LeClair', + profile_picture: 'https://pbs.twimg.com/profile_images/1508157904913899522/3l7ctauV_400x400.jpg', + ref_id: '283edea0-55cf-4245-95df-8d6d3dcb1851', + twitter_handle: 'DylanLeClair_', + }, + { + name: 'Jeff Ross', + profile_picture: 'https://pbs.twimg.com/profile_images/1475554600094552064/DSlPG1lx_400x400.jpg', + ref_id: 'ae6ee2a2-1cf7-41a0-8366-ff6e94a6403c', + twitter_handle: 'VailshireCap', + }, + { + name: 'Stacy Herbert', + profile_picture: 'https://pbs.twimg.com/profile_images/1546484196750905346/5WYPz-bc_400x400.jpg', + ref_id: '7477463b-1f3a-4b83-94c3-9d5a63b576c0', + twitter_handle: 'Stacyherbert', + }, + { + name: 'Greg Foss', + profile_picture: 'https://pbs.twimg.com/profile_images/1552599670945464320/3OgqRHNo_400x400.jpg', + ref_id: '853d9f80-f6cf-490f-9d1e-f29cdc6acc6f', + twitter_handle: 'FossGregfoss', + }, + { + name: 'Preston Pysh', + profile_picture: 'https://pbs.twimg.com/profile_images/1408783276081299462/f4Ye5n7-_400x400.jpg', + ref_id: '01ad2c81-2d0c-44a9-93a1-42c07287aa80', + twitter_handle: 'PrestonPysh', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/ea2cf2ae-76de-4185-818c-384b3b06228b.jpg', + node_type: 'episode', + ref_id: 'e06b030a-063e-4894-9914-d326220f75f8', + show_title: 'Blockware Intelligence', + }, + { + children: ['87520be0-ad60-48d0-aba6-44aec1452a09'], + episode_title: 'A Christmas Trip! | EP 20', + guests: [ + { + name: 'Erik Cason', + profile_picture: 'https://pbs.twimg.com/profile_images/1528431738145361921/roDCkAUy_400x400.jpg', + ref_id: '345e1da8-42ed-442b-8b90-ecb44bab61a1', + twitter_handle: 'Erikcason', + }, + { + name: 'FractalEncrypt', + profile_picture: 'https://pbs.twimg.com/profile_images/1588218887807680512/lFJArP4n_400x400.jpg', + ref_id: '888ea071-8312-4aca-b229-7447217e59f0', + twitter_handle: 'FractalEncrypt', + }, + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/e79b1a57-ecd0-4df3-b8ec-1a1a55d047e7.jpg', + node_type: 'episode', + ref_id: 'b707bbd8-1a9e-4aee-8e0e-2fe0be24c851', + show_title: 'Pleb UnderGround', + }, + { + children: [ + 'd4948551-6ec5-4649-a700-364592e09edd', + '25e36282-297b-4f9d-b6e9-da65731be8a8', + '53cab9be-0f22-42a2-aef5-87920c2431cf', + '6028f484-d0b9-424a-87e5-d0dcb39f9fc7', + '092e9794-afc9-41fe-a635-4802777415a1', + '092e9794-afc9-41fe-a635-4802777415a1', + '36f1f7e1-df70-4528-8474-4bba448b1ed0', + '36f1f7e1-df70-4528-8474-4bba448b1ed0', + '6d267cc1-22b1-42fc-9b60-9701e64a75d0', + '6d267cc1-22b1-42fc-9b60-9701e64a75d0', + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/7de0d293-8ae3-4362-8500-8f7300f3fe41.jpg', + node_type: 'show', + ref_id: '7de0d293-8ae3-4362-8500-8f7300f3fe41', + show_title: 'Unchained', + }, + { + children: ['a7afaa66-6878-40c2-97fd-88a20ae007fd', '910f5aab-7896-4c19-8649-64dcef44c369'], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/4e607036-8fde-48ef-ab76-9c2ac4bab031.jpg', + node_type: 'show', + ref_id: '4e607036-8fde-48ef-ab76-9c2ac4bab031', + show_title: 'What Bitcoin Did with Peter McCormack', + }, + { + children: [ + '47c54384-785c-4a4b-bad1-cac242d8f190', + 'aa033894-120f-494e-9d6b-c6d62dfb0a69', + 'aa033894-120f-494e-9d6b-c6d62dfb0a69', + '53402b84-7b30-4fec-a741-d9ef8fa03389', + '53402b84-7b30-4fec-a741-d9ef8fa03389', + '53402b84-7b30-4fec-a741-d9ef8fa03389', + '3a9db5f7-6722-469c-a0c6-6b157f44f33f', + '3a9db5f7-6722-469c-a0c6-6b157f44f33f', + '3a9db5f7-6722-469c-a0c6-6b157f44f33f', + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/9e7e229f-2631-4542-b5d7-7fcd502798dc.jpg', + node_type: 'show', + ref_id: '9e7e229f-2631-4542-b5d7-7fcd502798dc', + show_title: 'Bitcoin Audible', + }, + { + children: ['fccdc763-2b69-4418-9a7a-78cdfe615ba9'], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/b6c52903-5124-43f4-8632-bc9aeb941f2e.jpg', + node_type: 'show', + ref_id: 'b6c52903-5124-43f4-8632-bc9aeb941f2e', + show_title: 'The Kevin Rooke Show', + }, + { + children: [ + 'ae631d96-3b81-4308-bcc1-a57f81339b5c', + 'ae631d96-3b81-4308-bcc1-a57f81339b5c', + '4bea6c89-43b4-4e5e-9fea-0662d9ee7c00', + '4bea6c89-43b4-4e5e-9fea-0662d9ee7c00', + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/b79a3eb8-bcd0-4338-b979-d32aef360785.jpg', + node_type: 'show', + ref_id: 'b79a3eb8-bcd0-4338-b979-d32aef360785', + show_title: 'Stephan Livera Podcast', + }, + { + children: [ + '46277681-3564-4504-9ca8-e2f41d658d28', + 'b05fa33c-fc91-4b55-a592-85eaa1a5b3fd', + 'b723d81b-9c99-4797-b3a8-67f824924f0c', + 'eaeec64e-8e03-4826-a7c5-e1969a71ca2d', + '922ae599-5631-4ffe-977e-a9174fc028bb', + 'b534755c-92b6-4df1-b1f9-a28578661f48', + 'b317d76a-25e6-42f6-bc97-3de9f6c3f081', + '94e1df77-e561-4361-b8ad-e98862d6e51a', + '94e1df77-e561-4361-b8ad-e98862d6e51a', + '94e1df77-e561-4361-b8ad-e98862d6e51a', + '10c6d370-de6e-4a37-9981-d2c27e69d9e0', + 'a52e09df-91bc-4997-ad65-725ee971af2b', + 'a52e09df-91bc-4997-ad65-725ee971af2b', + '95403824-42d5-4fe8-b50b-72e08ab368c8', + '2e6613fa-ef17-413b-9158-0e3be5d5ae51', + '2e6613fa-ef17-413b-9158-0e3be5d5ae51', + '2e6613fa-ef17-413b-9158-0e3be5d5ae51', + 'c0895c34-042b-4f51-a884-2330d9f83bc7', + '638c47da-8592-4d7b-aa1a-20e28fa0499f', + '638c47da-8592-4d7b-aa1a-20e28fa0499f', + '2e84c98a-d7d8-4341-a129-3f4eaebe1e3e', + '6b8fbd46-fa4a-4d07-a142-9aeb242d249f', + 'f3b67780-d9c2-4a20-ab5c-115032a05b3a', + 'f3b67780-d9c2-4a20-ab5c-115032a05b3a', + '1bf7b1ea-f717-4c0f-ae66-0e00b26603df', + '7070839d-051e-48e4-bd9a-95c09b310db2', + '728d91e9-025d-43a7-8467-2c8d264ddf59', + '728d91e9-025d-43a7-8467-2c8d264ddf59', + 'c8ae0def-c33c-4d17-af4e-31ddaeedaf8a', + 'c8ae0def-c33c-4d17-af4e-31ddaeedaf8a', + 'c8ae0def-c33c-4d17-af4e-31ddaeedaf8a', + 'c8ae0def-c33c-4d17-af4e-31ddaeedaf8a', + 'b87feb17-6926-4295-b2c2-d1c2e9d49ca8', + 'b87feb17-6926-4295-b2c2-d1c2e9d49ca8', + 'b87feb17-6926-4295-b2c2-d1c2e9d49ca8', + 'f29a41a4-6764-439e-9fcf-74fefaffc681', + '065c0900-4e3c-48a0-87b8-4068dc441c82', + '87cd8227-9464-45ed-8512-4e545d3812c2', + '2f714adf-e499-4c1f-9864-016a00737153', + 'bbf0a536-990b-49b4-a9c3-a2a40fa38f88', + 'bbf0a536-990b-49b4-a9c3-a2a40fa38f88', + '0ade0cc4-6303-4e28-8b00-6b3e659c1e3a', + '9523aa00-daf4-42af-b25b-75d9682bc5a6', + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/419512c2-e309-4b25-bfe2-cd481d53f66d.jpg', + node_type: 'show', + ref_id: '419512c2-e309-4b25-bfe2-cd481d53f66d', + show_title: 'BTC Sessions', + }, + { + children: ['919ca76f-b3c7-48f1-9f5f-872537d43632'], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/7934bd86-9344-4f1a-9c36-ea5f63ae418e.jpg', + node_type: 'show', + ref_id: '7934bd86-9344-4f1a-9c36-ea5f63ae418e', + show_title: 'The Pomp Podcast', + }, + { + children: ['ded2e35d-9fec-4bad-90f7-f3102d4eebd5'], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/5fc9c8b0-687f-487e-bde3-bea15e155e3e.jpg', + node_type: 'show', + ref_id: '5fc9c8b0-687f-487e-bde3-bea15e155e3e', + show_title: 'Bitcoin Takeover Podcast', + }, + { + children: [ + '2536a974-d668-4ac2-8613-0b37aa0ca08c', + '2536a974-d668-4ac2-8613-0b37aa0ca08c', + '2536a974-d668-4ac2-8613-0b37aa0ca08c', + '2536a974-d668-4ac2-8613-0b37aa0ca08c', + '2536a974-d668-4ac2-8613-0b37aa0ca08c', + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/3e178b7d-b8b9-4fd4-ba36-017b834537da.jpg', + node_type: 'show', + ref_id: '3e178b7d-b8b9-4fd4-ba36-017b834537da', + show_title: 'Bitcoin Fixes This', + }, + { + children: [ + '43dd10a8-c5d5-4643-9432-93868289f163', + '6e8b01d5-df4f-4124-a13a-3ee9c93c8eb2', + '3475140b-3e58-494f-b929-59e6ec5f1636', + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/1583c7c4-f4f2-4e52-8f27-a1eaeb6289fd.jpg', + node_type: 'show', + ref_id: '1583c7c4-f4f2-4e52-8f27-a1eaeb6289fd', + show_title: 'Bitcoin Magazine Podcast', + }, + { + children: [ + '68309686-0bf0-4156-8f95-615ba255fdc4', + '52f31c46-14c5-49f1-9836-70862c6f6567', + '665facde-c1bd-4091-a071-09e28606b863', + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/a09a2c49-84f1-4d0b-b150-6e6103f4ee41.jpg', + node_type: 'show', + ref_id: 'a09a2c49-84f1-4d0b-b150-6e6103f4ee41', + show_title: 'Citadel Dispatch', + }, + { + children: [ + '274ecab4-c5d8-4ad7-9e16-b1cb5dd39d13', + '274ecab4-c5d8-4ad7-9e16-b1cb5dd39d13', + '933d3953-2983-4a8b-a4dc-e9615eeecb88', + '8a89a96d-5877-4d00-9e11-c33d19ed7264', + '8a89a96d-5877-4d00-9e11-c33d19ed7264', + '8a89a96d-5877-4d00-9e11-c33d19ed7264', + '249e2426-55d6-473c-bbe0-4bebf74594e9', + '249e2426-55d6-473c-bbe0-4bebf74594e9', + '0f13f1e8-6031-4920-86bf-c2fbcaaed641', + '0f13f1e8-6031-4920-86bf-c2fbcaaed641', + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/cd6b8d64-bd52-4f1e-86b3-ca8ba2eb169f.jpg', + node_type: 'show', + ref_id: 'cd6b8d64-bd52-4f1e-86b3-ca8ba2eb169f', + show_title: 'Bitcoin.Review', + }, + { + children: ['993787ca-ce29-4d5b-b834-37a83ea2125a'], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/afa24463-19f7-4875-b6f4-b261d1d6c648.jpg', + node_type: 'show', + ref_id: 'afa24463-19f7-4875-b6f4-b261d1d6c648', + show_title: 'Orange Pill Podcast', + }, + { + children: ['72c4dd20-64fa-4d68-a0bd-ac50207ae1c0', 'cc447ce2-af39-4938-8ec8-2d70a6cfd851'], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/99d17d22-4448-4267-9065-f55b341f43d2.jpg', + node_type: 'show', + ref_id: '99d17d22-4448-4267-9065-f55b341f43d2', + show_title: 'The Money Movement', + }, + { + children: ['337981db-17c3-4c4e-8195-26cda6855ead', '337981db-17c3-4c4e-8195-26cda6855ead'], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/ca3ab815-dc2e-408a-a0c5-8bbe50270a97.jpg', + node_type: 'show', + ref_id: 'ca3ab815-dc2e-408a-a0c5-8bbe50270a97', + show_title: 'The "What is Money?" Show', + }, + { + children: ['b43f377d-6599-421b-af45-a8ecee409420', 'b43f377d-6599-421b-af45-a8ecee409420'], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/abd94520-1490-42aa-b349-9e861494a654.jpg', + node_type: 'show', + ref_id: 'abd94520-1490-42aa-b349-9e861494a654', + show_title: 'Economy Guy', + }, + { + children: ['705db675-bc09-4cba-b578-e9904f339f55'], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/58189b3c-aa25-408d-8c5e-76f97c9501da.jpg', + node_type: 'show', + ref_id: '58189b3c-aa25-408d-8c5e-76f97c9501da', + show_title: 'Mises University 2017', + }, + { + children: ['a12faf50-f4fb-472d-b3a1-030747594fa5', 'a12faf50-f4fb-472d-b3a1-030747594fa5'], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/5cdd0aef-f1a7-4d3b-8336-7f81c2db4a40.jpg', + node_type: 'show', + ref_id: '5cdd0aef-f1a7-4d3b-8336-7f81c2db4a40', + show_title: 'The Bitcoin Standard Podcast', + }, + { + children: ['87054fe7-6a5c-471a-b518-5e9414d0c644'], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/4bb9069b-a373-4b1c-9cda-024b2bf4dc84.jpg', + node_type: 'show', + ref_id: '4bb9069b-a373-4b1c-9cda-024b2bf4dc84', + show_title: 'We Study Billionaires - The Investor’s Podcast Network', + }, + { + children: ['04dd4023-ed42-4259-921c-e305af656389'], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/3325efce-80a8-490c-8645-cad1b9a22d94.jpg', + node_type: 'show', + ref_id: '3325efce-80a8-490c-8645-cad1b9a22d94', + show_title: 'Crypto Voices', + }, + { + children: ['c6ecd519-ce8f-45b5-89ca-30a6a017f5d6'], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/357dc2db-2643-49f0-9393-5a20ed21d0fe.jpg', + node_type: 'show', + ref_id: '357dc2db-2643-49f0-9393-5a20ed21d0fe', + show_title: 'The Anita Posch Show: A Bitcoin only podcast', + }, + { + children: ['b94dbd49-6ac1-497c-8f5b-d13140968920'], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/710ac70a-11fc-40ec-a2a2-01b92fb8015e.jpg', + node_type: 'show', + ref_id: '710ac70a-11fc-40ec-a2a2-01b92fb8015e', + show_title: 'Quoth the Raven', + }, + { + children: ['406ce1e1-5f39-4c94-907c-eb5e501d2c64'], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/da1bbdc0-4d0a-43ed-8345-ee43102db244.jpg', + node_type: 'show', + ref_id: 'da1bbdc0-4d0a-43ed-8345-ee43102db244', + show_title: 'Mercatus Policy Download', + }, + { + children: [ + '9585c916-c55a-4284-b348-f8a52c24dc8d', + '9585c916-c55a-4284-b348-f8a52c24dc8d', + '9585c916-c55a-4284-b348-f8a52c24dc8d', + '1d938eb2-3bc2-4268-85d1-8967a1292a18', + '1d938eb2-3bc2-4268-85d1-8967a1292a18', + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/93a6fe5b-364c-43f4-9f38-7da3e811460b.jpg', + node_type: 'show', + ref_id: '93a6fe5b-364c-43f4-9f38-7da3e811460b', + show_title: 'CRYPTO 101', + }, + { + children: [ + '50ab3e37-ccb3-4902-825b-a9da36579707', + '50ab3e37-ccb3-4902-825b-a9da36579707', + '50ab3e37-ccb3-4902-825b-a9da36579707', + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/6ec51741-3d93-4116-a619-d62a7cee1feb.jpg', + node_type: 'show', + ref_id: '6ec51741-3d93-4116-a619-d62a7cee1feb', + show_title: 'Radio Rothbard', + }, + { + children: [ + '8ec14282-c5bc-4da6-b516-3140efaf6b8f', + '8ec14282-c5bc-4da6-b516-3140efaf6b8f', + '8ec14282-c5bc-4da6-b516-3140efaf6b8f', + '8ec14282-c5bc-4da6-b516-3140efaf6b8f', + '2fee3ffd-e6f5-4fbf-9cac-2b8977b93b79', + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/f2b2a2b2-8869-4256-94b9-a91c91c1ce7e.jpg', + node_type: 'show', + ref_id: 'f2b2a2b2-8869-4256-94b9-a91c91c1ce7e', + show_title: 'Economics For Business', + }, + { + children: ['a77be405-8402-477a-9d72-b96d1e7ea63b', '32aad837-d99a-4b5a-b6ea-e12c590b925a'], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/ef62c7ab-ef09-47b7-9af4-2ebe2384a72f.jpg', + node_type: 'show', + ref_id: 'ef62c7ab-ef09-47b7-9af4-2ebe2384a72f', + show_title: 'Austrian Economics: An Introductory Course', + }, + { + children: [ + '62e4eee0-25ba-495a-a7e6-dd0685a75d13', + '23ea78f2-8e21-42fe-980a-8c6ff04c2748', + '23ea78f2-8e21-42fe-980a-8c6ff04c2748', + 'b51b127d-9641-42a7-aac5-bd5b1228f52a', + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/8e52e9c4-52e8-4dea-8ed9-8c6a7fcef25a.jpg', + node_type: 'show', + ref_id: '8e52e9c4-52e8-4dea-8ed9-8c6a7fcef25a', + show_title: 'The Macro View', + }, + { + children: ['f18bb143-9582-41f3-b65b-1dbe8de6cfc3'], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/3ab6c599-bbcd-4c8f-beef-bcf509ed4afa.jpg', + node_type: 'show', + ref_id: '3ab6c599-bbcd-4c8f-beef-bcf509ed4afa', + show_title: 'Voices of the Data Economy', + }, + { + children: ['14dbb9b7-ec35-49e5-bbb9-1f2d626a5d6f'], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/5e0220b3-7c70-4423-bb76-3b75bc132fad.jpg', + node_type: 'show', + ref_id: '5e0220b3-7c70-4423-bb76-3b75bc132fad', + show_title: 'Carnivore Cast', + }, + { + children: ['c6996d2f-8541-4622-968f-4e4dee7f78e4', '41f7e1a4-f5b9-4a7e-8dbd-ee3fcb15260f'], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/a8e3517b-b44d-4270-adaa-57587896b1e7.jpg', + node_type: 'show', + ref_id: 'a8e3517b-b44d-4270-adaa-57587896b1e7', + show_title: 'Keto Life Support', + }, + { + children: ['4b228b78-99c7-4884-b91d-9dc711bde8e6'], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/4ae5cf53-106f-4ba8-9a77-3ef1de3b44b6.jpg', + node_type: 'show', + ref_id: '4ae5cf53-106f-4ba8-9a77-3ef1de3b44b6', + show_title: 'Trading Bitcoin: The Tone Vays Podcast', + }, + { + children: ['556a9506-357d-4dea-a6bb-75f391f7340d'], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/1c3fe064-f637-41ea-8a4b-a533ef5985b1.jpg', + node_type: 'show', + ref_id: '1c3fe064-f637-41ea-8a4b-a533ef5985b1', + show_title: 'aantonop', + }, + { + children: ['1b47b05f-8f86-4e19-9694-d4255e9e89ac', '1b47b05f-8f86-4e19-9694-d4255e9e89ac'], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/56bbafde-60ef-4e4b-b930-978429c6a635.jpg', + node_type: 'show', + ref_id: '56bbafde-60ef-4e4b-b930-978429c6a635', + show_title: 'Global Bitcoin Fest', + }, + { + children: [ + 'a0826cdb-6198-4416-bd12-1dd5aa09a075', + 'c6447277-9a58-411f-85e1-5ac166884ce5', + 'c6447277-9a58-411f-85e1-5ac166884ce5', + 'c6447277-9a58-411f-85e1-5ac166884ce5', + 'c6447277-9a58-411f-85e1-5ac166884ce5', + '8418f2a4-1874-403a-9e58-7a76a8e09d4f', + 'a7dcf3bf-b9f2-41f1-a3f3-ffd2db3a0b96', + 'a7dcf3bf-b9f2-41f1-a3f3-ffd2db3a0b96', + 'a7dcf3bf-b9f2-41f1-a3f3-ffd2db3a0b96', + '47406d36-917a-47f7-b89e-26181d6070bc', + '47406d36-917a-47f7-b89e-26181d6070bc', + '47406d36-917a-47f7-b89e-26181d6070bc', + 'dc7b8177-4cef-4da2-bb05-b12dfe4c05bb', + 'dc7b8177-4cef-4da2-bb05-b12dfe4c05bb', + 'dc7b8177-4cef-4da2-bb05-b12dfe4c05bb', + 'dc7b8177-4cef-4da2-bb05-b12dfe4c05bb', + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/9b2e17f2-71c5-4f1e-a3e7-720d06dab810.jpg', + node_type: 'show', + ref_id: '9b2e17f2-71c5-4f1e-a3e7-720d06dab810', + show_title: 'Satoshi’s Journal', + }, + { + children: [ + 'fb60247a-9b2e-41d4-83f4-f4cf92eb20f4', + 'fb60247a-9b2e-41d4-83f4-f4cf92eb20f4', + 'fb60247a-9b2e-41d4-83f4-f4cf92eb20f4', + '87a2efa8-6b4c-486d-8511-d6a95cb84514', + '87a2efa8-6b4c-486d-8511-d6a95cb84514', + '87a2efa8-6b4c-486d-8511-d6a95cb84514', + '87a2efa8-6b4c-486d-8511-d6a95cb84514', + '87a2efa8-6b4c-486d-8511-d6a95cb84514', + 'de9ef389-d0ee-4ce1-ad23-38bfafa28a35', + 'de9ef389-d0ee-4ce1-ad23-38bfafa28a35', + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/0c42d408-e518-4ecf-b282-d864a8c14002.jpg', + node_type: 'show', + ref_id: '0c42d408-e518-4ecf-b282-d864a8c14002', + show_title: 'PUBLORD', + }, + { + children: [ + '94726593-cead-47f6-8029-6848f277358c', + '2c2ac736-0711-4418-8a44-6f9de54cbe6f', + '2c2ac736-0711-4418-8a44-6f9de54cbe6f', + '2c2ac736-0711-4418-8a44-6f9de54cbe6f', + '883300ba-aeb4-42e5-bbd2-7c989e481a3b', + '883300ba-aeb4-42e5-bbd2-7c989e481a3b', + '883300ba-aeb4-42e5-bbd2-7c989e481a3b', + '883300ba-aeb4-42e5-bbd2-7c989e481a3b', + 'a41902c1-9f41-4ea4-b135-0d2078f6074b', + '6334a91f-b1db-4f05-a381-bc68b121dfb3', + '3b7e4cc5-bc15-45e9-bb7a-373fa4cca6f1', + '3b7e4cc5-bc15-45e9-bb7a-373fa4cca6f1', + '3b7e4cc5-bc15-45e9-bb7a-373fa4cca6f1', + '3b7e4cc5-bc15-45e9-bb7a-373fa4cca6f1', + '3b7e4cc5-bc15-45e9-bb7a-373fa4cca6f1', + 'f8a66979-3fac-4793-bad0-8ede604e211b', + '1d671494-3407-4619-92b0-99c7d6f95f86', + '9ae3fabe-5d43-47bc-9ab0-541df990773a', + 'a119635b-a66a-4a90-a7e3-2a7929666a82', + 'a119635b-a66a-4a90-a7e3-2a7929666a82', + 'a119635b-a66a-4a90-a7e3-2a7929666a82', + 'a119635b-a66a-4a90-a7e3-2a7929666a82', + '6fe2326f-7cad-4efb-abed-206db564556e', + '6fe2326f-7cad-4efb-abed-206db564556e', + '141ef1e6-e6ec-4d29-a52a-01be662b21ae', + '141ef1e6-e6ec-4d29-a52a-01be662b21ae', + '141ef1e6-e6ec-4d29-a52a-01be662b21ae', + '15cae8e2-7cb3-4c60-9b3a-32cb4b231c26', + '15cae8e2-7cb3-4c60-9b3a-32cb4b231c26', + '3bc946bc-82f4-48d3-9bd2-fab82353774d', + '3bc946bc-82f4-48d3-9bd2-fab82353774d', + '3bc946bc-82f4-48d3-9bd2-fab82353774d', + '3bc946bc-82f4-48d3-9bd2-fab82353774d', + '3bc946bc-82f4-48d3-9bd2-fab82353774d', + '80617a1c-8bf7-404d-928c-86fc32d643fe', + '80617a1c-8bf7-404d-928c-86fc32d643fe', + 'd28e279c-4539-4ec8-b187-1b6447bdb6be', + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/239722cb-4216-414a-a17b-5adf9d52e15a.jpg', + node_type: 'show', + ref_id: '239722cb-4216-414a-a17b-5adf9d52e15a', + show_title: 'Swan.com', + }, + { + children: ['aba10d42-f204-4853-99c4-c8a22f846945', '6c6c782e-382c-44c3-9b0a-5c598ef73ddc'], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/f3a55dda-3dd5-4f62-99c1-bab3a88c27c1.jpg', + node_type: 'show', + ref_id: 'f3a55dda-3dd5-4f62-99c1-bab3a88c27c1', + show_title: 'Bitcoin Magazine', + }, + { + children: ['7bebf6d3-5f24-4988-9141-7ed42c826983', '7bebf6d3-5f24-4988-9141-7ed42c826983'], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/7c53ad3c-1ce2-4661-8896-4c40dcc23b4d.jpg', + node_type: 'show', + ref_id: '7c53ad3c-1ce2-4661-8896-4c40dcc23b4d', + show_title: 'Blockware Solutions', + }, + { + children: [ + 'de789489-56bc-4012-b7c3-9dc92a937161', + '62ca7c93-e509-438e-87b3-43400a320f8d', + '62ca7c93-e509-438e-87b3-43400a320f8d', + '62ca7c93-e509-438e-87b3-43400a320f8d', + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/624262ef-b30f-4114-8061-e310187e6bb4.jpg', + node_type: 'show', + ref_id: '624262ef-b30f-4114-8061-e310187e6bb4', + show_title: 'Property and Freedom Society', + }, + { + children: [ + '0992287c-f653-4032-b06c-e8d65e2536e7', + '0992287c-f653-4032-b06c-e8d65e2536e7', + '0992287c-f653-4032-b06c-e8d65e2536e7', + '0992287c-f653-4032-b06c-e8d65e2536e7', + '0992287c-f653-4032-b06c-e8d65e2536e7', + '0992287c-f653-4032-b06c-e8d65e2536e7', + '0992287c-f653-4032-b06c-e8d65e2536e7', + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/c9bb5d58-c781-464d-878a-8b6c469ba198.jpg', + node_type: 'show', + ref_id: 'c9bb5d58-c781-464d-878a-8b6c469ba198', + show_title: 'Geyser 🌊', + }, + { + children: [ + '79ea2957-1161-4729-aacb-1981d9237e22', + '79ea2957-1161-4729-aacb-1981d9237e22', + '79ea2957-1161-4729-aacb-1981d9237e22', + '79ea2957-1161-4729-aacb-1981d9237e22', + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/75ec86b1-cb6d-467f-a66e-5e642e5c126a.jpg', + node_type: 'show', + ref_id: '75ec86b1-cb6d-467f-a66e-5e642e5c126a', + show_title: 'Bitcoin Venetians Book Club', + }, + { + children: [ + 'c0dabc11-aced-4078-93be-bca753fc2b14', + 'c0dabc11-aced-4078-93be-bca753fc2b14', + 'c0dabc11-aced-4078-93be-bca753fc2b14', + 'c0dabc11-aced-4078-93be-bca753fc2b14', + 'c0dabc11-aced-4078-93be-bca753fc2b14', + 'd2e9db27-864c-4ee5-a7ae-abcf895bda98', + 'd2e9db27-864c-4ee5-a7ae-abcf895bda98', + 'd2e9db27-864c-4ee5-a7ae-abcf895bda98', + 'd2e9db27-864c-4ee5-a7ae-abcf895bda98', + 'd2e9db27-864c-4ee5-a7ae-abcf895bda98', + '6e8c90dc-12fa-415d-bf33-f286a4c5d1b1', + '6e8c90dc-12fa-415d-bf33-f286a4c5d1b1', + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/ae91fac6-a1af-4877-9a92-e793d556ee66.jpg', + node_type: 'show', + ref_id: 'ae91fac6-a1af-4877-9a92-e793d556ee66', + show_title: 'Compass Mining', + }, + { + children: [ + '5c8bc8cf-4d41-4c71-8154-aafbd1ed20c1', + 'f7310238-67ab-4a2d-8679-72f6511934be', + 'f7310238-67ab-4a2d-8679-72f6511934be', + 'f7310238-67ab-4a2d-8679-72f6511934be', + 'f7310238-67ab-4a2d-8679-72f6511934be', + '99f0ab76-b0f5-4947-8341-759b5dff5341', + '99f0ab76-b0f5-4947-8341-759b5dff5341', + '99f0ab76-b0f5-4947-8341-759b5dff5341', + 'c775e780-43ca-46c6-b5ef-e65b0103ee61', + 'c775e780-43ca-46c6-b5ef-e65b0103ee61', + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/965489b4-a414-4fd0-ab8c-55911b1596aa.jpg', + node_type: 'show', + ref_id: '965489b4-a414-4fd0-ab8c-55911b1596aa', + show_title: 'BOLT FUN', + }, + { + children: [ + '54fa34c9-0729-42ab-92d5-e5f8289ed32a', + '54fa34c9-0729-42ab-92d5-e5f8289ed32a', + '54fa34c9-0729-42ab-92d5-e5f8289ed32a', + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/2a1450bc-0649-4dc5-8ec9-1474af1ea1c3.jpg', + node_type: 'show', + ref_id: '2a1450bc-0649-4dc5-8ec9-1474af1ea1c3', + show_title: 'Anders_🍆', + }, + { + children: ['258c5ca5-52a6-4ce3-9994-e629263123d8'], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/4127f08c-505a-4a7d-935f-e93e87204089.jpg', + node_type: 'show', + ref_id: '4127f08c-505a-4a7d-935f-e93e87204089', + show_title: 'Wicked Smart Bitcoin ∞/21M', + }, + { + children: ['08c3748a-a85d-4d4f-a702-1fc3f1c46f33'], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/b2dd8be4-74b5-47b2-b470-e568657f3a0d.jpg', + node_type: 'show', + ref_id: 'b2dd8be4-74b5-47b2-b470-e568657f3a0d', + show_title: 'Art of Tomas', + }, + { + children: [ + 'd862511e-6330-48b3-9d4a-44e8f754f0a5', + 'd862511e-6330-48b3-9d4a-44e8f754f0a5', + 'd862511e-6330-48b3-9d4a-44e8f754f0a5', + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/e8ad867b-9cbe-4126-9f37-313b4d2329a5.jpg', + node_type: 'show', + ref_id: 'e8ad867b-9cbe-4126-9f37-313b4d2329a5', + show_title: 'Dr Karl Goldkamp - Keto Naturopath', + }, + { + children: ['21d1d401-626c-4ec2-ba30-3c08f08ec3ea', '21d1d401-626c-4ec2-ba30-3c08f08ec3ea'], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/046c6869-0627-4825-8ecf-45ff0aed97b6.jpg', + node_type: 'show', + ref_id: '046c6869-0627-4825-8ecf-45ff0aed97b6', + show_title: 'Alexandria The Great 🌋⛏🇿🇼', + }, + { + children: ['18e340ea-90ef-4200-a19d-dc82e1e18e21'], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/30180c4d-27f9-4215-81e0-6a22b16aba43.jpg', + node_type: 'show', + ref_id: '30180c4d-27f9-4215-81e0-6a22b16aba43', + show_title: 'okin@8333.mobi ⚡️ 🏰', + }, + { + children: [ + '9f12b8c2-175e-4078-9871-99a2edf2e0f3', + '9f12b8c2-175e-4078-9871-99a2edf2e0f3', + '9f12b8c2-175e-4078-9871-99a2edf2e0f3', + '9f12b8c2-175e-4078-9871-99a2edf2e0f3', + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/99046513-2614-4eae-9de4-5781ba4b330a.jpg', + node_type: 'show', + ref_id: '99046513-2614-4eae-9de4-5781ba4b330a', + show_title: 'STX:LDN', + }, + { + children: ['03b5ca12-0aeb-4f04-aed0-746681d93b56'], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/da64b29e-c2c0-41a6-ba29-acbaa2d022e8.jpg', + node_type: 'show', + ref_id: 'da64b29e-c2c0-41a6-ba29-acbaa2d022e8', + show_title: 'Rabbit Hole Recap', + }, + { + children: [ + '70bb863d-7226-4b9e-b13e-673f94a3eb86', + '06494953-4c8e-4376-9450-9efb8b00acc3', + '06494953-4c8e-4376-9450-9efb8b00acc3', + '06494953-4c8e-4376-9450-9efb8b00acc3', + '06494953-4c8e-4376-9450-9efb8b00acc3', + '06494953-4c8e-4376-9450-9efb8b00acc3', + '06494953-4c8e-4376-9450-9efb8b00acc3', + '06494953-4c8e-4376-9450-9efb8b00acc3', + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/e1eca67b-d372-4031-bf1f-8f0ff7fe6092.jpg', + node_type: 'show', + ref_id: 'e1eca67b-d372-4031-bf1f-8f0ff7fe6092', + show_title: `Once Bitten! - uniform sampler2D envMap; +A Bitcoin Podcast. +`, + }, + { + children: ['9dcca755-0a20-45e5-8e4d-dfe2800b9c6f', '9dcca755-0a20-45e5-8e4d-dfe2800b9c6f'], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/fe6bdbce-e91d-43cf-ab33-0e98bffabecc.jpg', + node_type: 'show', + ref_id: 'fe6bdbce-e91d-43cf-ab33-0e98bffabecc', + show_title: 'Bitcoin Charlotte', + }, + { + children: ['b8289cbb-ec69-49a8-b6ab-c1fd808acc09'], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/4240c90e-0086-4ece-bfe5-84a282c5059e.jpg', + node_type: 'show', + ref_id: '4240c90e-0086-4ece-bfe5-84a282c5059e', + show_title: 'Thriller Bitcoin', + }, + { + children: ['daddd93e-7bc6-4c50-a150-5199b437afc9'], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/24a144b0-7ca3-40e9-9c42-86b9fce0b662.jpg', + node_type: 'show', + ref_id: '24a144b0-7ca3-40e9-9c42-86b9fce0b662', + show_title: 'The Chaincode Podcast', + }, + { + children: [ + '56bf65e9-41d5-42e1-95d6-239e4c835781', + '56bf65e9-41d5-42e1-95d6-239e4c835781', + '56bf65e9-41d5-42e1-95d6-239e4c835781', + 'ff88a8b8-bcd6-4d86-8a65-8a68def35b9f', + '810a3acb-e30e-46bc-8c67-1d504b2e7c09', + '810a3acb-e30e-46bc-8c67-1d504b2e7c09', + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/f1879df9-9bc6-4a76-951f-24548da768ef.jpg', + node_type: 'show', + ref_id: 'f1879df9-9bc6-4a76-951f-24548da768ef', + show_title: 'Bitcoin.Review Podcast with NVK & Guests', + }, + { + children: [ + 'f7e75069-adf6-41b0-9bb7-a6a2aa846493', + 'f7e75069-adf6-41b0-9bb7-a6a2aa846493', + '6eb2a481-408f-4989-9f28-67789651259a', + '89049a1c-0171-4999-b003-57e1b57d92b2', + 'd842ce17-a4c0-49a6-bdc5-5268f1d61779', + '8d9b0689-2e69-44c1-afe2-3519e999390a', + '8d9b0689-2e69-44c1-afe2-3519e999390a', + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/e7d2a4ca-6b44-4a45-a94c-6f48987979f7.jpg', + node_type: 'show', + ref_id: 'e7d2a4ca-6b44-4a45-a94c-6f48987979f7', + show_title: 'TABConf (The Atlanta Bitcoin Conference)', + }, + { + children: [ + '3b818893-4605-499c-a467-5abcc23f9483', + '3b818893-4605-499c-a467-5abcc23f9483', + '3b818893-4605-499c-a467-5abcc23f9483', + 'a44e78cd-dc66-4b67-9523-7ddff0d3655f', + 'a44e78cd-dc66-4b67-9523-7ddff0d3655f', + '0c4f330b-a39d-4312-9775-58b42c7c9723', + '0c4f330b-a39d-4312-9775-58b42c7c9723', + '205a0650-fefe-4aaf-a894-faa8b72d966a', + '205a0650-fefe-4aaf-a894-faa8b72d966a', + '205a0650-fefe-4aaf-a894-faa8b72d966a', + '205a0650-fefe-4aaf-a894-faa8b72d966a', + '205a0650-fefe-4aaf-a894-faa8b72d966a', + 'a60dc641-5d14-4960-ab73-66ff199edd1d', + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/2ec62250-4755-4616-8342-096a2cfab95f.jpg', + node_type: 'show', + ref_id: '2ec62250-4755-4616-8342-096a2cfab95f', + show_title: 'Voltage', + }, + { + children: ['3af98dc1-5e7c-4ef3-ad74-b9b6afaee8b9', '625d9252-2f5e-4f53-b577-dd2dfd4d4749'], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/492cbcce-3744-4d8b-b2ca-3a7f063e798a.jpg', + node_type: 'show', + ref_id: '492cbcce-3744-4d8b-b2ca-3a7f063e798a', + show_title: 'Swan Bitcoin', + }, + { + children: ['8eef2f82-bbf9-4fef-ba3d-102679d4a1a5'], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/b29c81c8-cccd-4a6b-b78f-3c1591a54d27.jpg', + node_type: 'show', + ref_id: 'b29c81c8-cccd-4a6b-b78f-3c1591a54d27', + show_title: 'Austin Bitcoin Club', + }, + { + children: ['a1e3c3cf-2045-4c33-8152-0e162b7ca729'], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/63e0cbc0-731d-4ea0-9dd2-2b8b841eb28a.jpg', + node_type: 'show', + ref_id: '63e0cbc0-731d-4ea0-9dd2-2b8b841eb28a', + show_title: 'Synonym', + }, + { + children: [ + 'e06b030a-063e-4894-9914-d326220f75f8', + 'e06b030a-063e-4894-9914-d326220f75f8', + 'e06b030a-063e-4894-9914-d326220f75f8', + ], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/ea2cf2ae-76de-4185-818c-384b3b06228b.jpg', + node_type: 'show', + ref_id: 'ea2cf2ae-76de-4185-818c-384b3b06228b', + show_title: 'Blockware Intelligence', + }, + { + children: ['b707bbd8-1a9e-4aee-8e0e-2fe0be24c851'], + image_url: + 'https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/e79b1a57-ecd0-4df3-b8ec-1a1a55d047e7.jpg', + node_type: 'show', + ref_id: 'e79b1a57-ecd0-4df3-b8ec-1a1a55d047e7', + show_title: 'Pleb UnderGround', + }, + ], + related: [ + { + episode_title: 'The Orange Sun ☀️ #Bitcoin vs. Fiat', + ref_id: 'e5b1ad5b-2ce2-4192-a6d9-e99f0e3e88b5', + show_title: 'Satoshi’s Journal', + }, + { + episode_title: 'Orange Sun 🌞 Why Ethereum is a shitcoin/scam & Bitcoin News', + ref_id: '0645c5a3-b511-471d-9d8e-ef63b4dfe340', + show_title: 'Satoshi’s Journal', + }, + { + episode_title: '#Bitcoin Beats⚡🎶 by @SatoshisJournal Genesis Block walkthrough', + ref_id: 'aba7b4db-77bb-40c4-a0d4-4ce20da7b9ba', + show_title: 'Satoshi’s Journal', + }, + { + episode_title: 'The Orange Sun 🌞 Does Price = Value? #Bitcoin', + ref_id: 'a0826cdb-6198-4416-bd12-1dd5aa09a075', + show_title: 'Satoshi’s Journal', + }, + { + episode_title: '#Bitcoin Beats⚡🎶 by @SatoshisJournal w @NEEDcreations & @DJSATOSHI18', + ref_id: 'fd00f285-c11e-40ba-8af9-b67265ac321b', + show_title: 'Satoshi’s Journal', + }, + { + episode_title: 'The Orange Sun ☀️ Reading/Discussion of "The Book of Satoshi."', + ref_id: 'fcbe1196-c55d-476f-92d6-4dcba954eaf3', + show_title: 'Satoshi’s Journal', + }, + { + episode_title: 'The Orange 🌞 Reading/Discussion "The Book of Satoshi" & Bitcoin News', + ref_id: 'c6447277-9a58-411f-85e1-5ac166884ce5', + show_title: 'Satoshi’s Journal', + }, + { + episode_title: 'The Orange Sun 🌞 Bitcoin News and Talk - Happy Holidays!', + ref_id: 'd0b59017-ae64-47d4-be5c-c1531c9d480f', + show_title: 'Satoshi’s Journal', + }, + { + episode_title: `The Orange Sun 🌞 Reading/Discussion Tomer Strolight's "Why Bitcoin?"`, + ref_id: '95848760-3863-4595-b049-f25826eba2d3', + show_title: 'Satoshi’s Journal', + }, + ], + }, + typesWeighedByChildren = ['show', 'episode'], + getSuperficialNodeWeight = (tt, et) => { + var rt + return tt.weight + ? tt.weight + : typesWeighedByChildren.includes(tt.node_type) + ? ((rt = tt == null ? void 0 : tt.children) == null ? void 0 : rt.length) || 0 + : et.filter((it) => it.sourceRef === tt.ref_id || it.targetRef === tt.ref_id).length + }, + getMaxSuperficialWeightPerNodeType = (tt, et) => { + const nt = {} + return ( + tt.forEach((rt) => { + const it = getSuperficialNodeWeight(rt, et) + ;(!nt[rt.node_type] || nt[rt.node_type] < it) && (nt[rt.node_type] = it) + }), + nt + ) + }, + EARTH_RADIUS = 1800, + EARTH_DATA_PADDING = 50, + dataRadius = EARTH_RADIUS + EARTH_DATA_PADDING + function getRandomLngLat() { + return parseFloat((Math.random() * (180 - -180) + -180).toFixed(4)) + } + const getPointAbove = (tt, et) => tt.clone().normalize().clone().negate().normalize().multiplyScalar(et).add(tt), + getPositionFromLngLat = (tt, et, nt) => { + const rt = (et * Math.PI) / 180, + it = ((tt - 180) * Math.PI) / 180, + ot = -nt * Math.cos(rt) * Math.cos(it), + at = nt * Math.sin(rt), + st = nt * Math.cos(rt) * Math.sin(it) + return new Vector3(ot, at, st) + }, + generateEarthGraphPositions = (tt) => { + const et = tt.map((rt) => { + const { longitude: it, latitude: ot } = + rt.longitude && rt.latitude ? rt : { longitude: getRandomLngLat(), latitude: getRandomLngLat() }, + at = getPositionFromLngLat(it, ot, dataRadius) + return { ...rt, ...at } + }), + nt = generateLinksFromNodeData(et, !0, !0) + return { nodes: et, links: nt } + } + function forceCenter(tt, et, nt) { + var rt, + it = 1 + tt == null && (tt = 0), et == null && (et = 0), nt == null && (nt = 0) + function ot() { + var at, + st = rt.length, + lt, + ct = 0, + ut = 0, + ht = 0 + for (at = 0; at < st; ++at) (lt = rt[at]), (ct += lt.x || 0), (ut += lt.y || 0), (ht += lt.z || 0) + for (ct = (ct / st - tt) * it, ut = (ut / st - et) * it, ht = (ht / st - nt) * it, at = 0; at < st; ++at) + (lt = rt[at]), ct && (lt.x -= ct), ut && (lt.y -= ut), ht && (lt.z -= ht) + } + return ( + (ot.initialize = function (at) { + rt = at + }), + (ot.x = function (at) { + return arguments.length ? ((tt = +at), ot) : tt + }), + (ot.y = function (at) { + return arguments.length ? ((et = +at), ot) : et + }), + (ot.z = function (at) { + return arguments.length ? ((nt = +at), ot) : nt + }), + (ot.strength = function (at) { + return arguments.length ? ((it = +at), ot) : it + }), + ot + ) + } + function tree_add$2(tt) { + const et = +this._x.call(null, tt) + return add$4(this.cover(et), et, tt) + } + function add$4(tt, et, nt) { + if (isNaN(et)) return tt + var rt, + it = tt._root, + ot = { data: nt }, + at = tt._x0, + st = tt._x1, + lt, + ct, + ut, + ht, + dt + if (!it) return (tt._root = ot), tt + for (; it.length; ) + if (((ut = et >= (lt = (at + st) / 2)) ? (at = lt) : (st = lt), (rt = it), !(it = it[(ht = +ut)]))) + return (rt[ht] = ot), tt + if (((ct = +tt._x.call(null, it.data)), et === ct)) return (ot.next = it), rt ? (rt[ht] = ot) : (tt._root = ot), tt + do + (rt = rt ? (rt[ht] = new Array(2)) : (tt._root = new Array(2))), + (ut = et >= (lt = (at + st) / 2)) ? (at = lt) : (st = lt) + while ((ht = +ut) == (dt = +(ct >= lt))) + return (rt[dt] = it), (rt[ht] = ot), tt + } + function addAll$2(tt) { + Array.isArray(tt) || (tt = Array.from(tt)) + const et = tt.length, + nt = new Float64Array(et) + let rt = 1 / 0, + it = -1 / 0 + for (let ot = 0, at; ot < et; ++ot) + isNaN((at = +this._x.call(null, tt[ot]))) || ((nt[ot] = at), at < rt && (rt = at), at > it && (it = at)) + if (rt > it) return this + this.cover(rt).cover(it) + for (let ot = 0; ot < et; ++ot) add$4(this, nt[ot], tt[ot]) + return this + } + function tree_cover$2(tt) { + if (isNaN((tt = +tt))) return this + var et = this._x0, + nt = this._x1 + if (isNaN(et)) nt = (et = Math.floor(tt)) + 1 + else { + for (var rt = nt - et || 1, it = this._root, ot, at; et > tt || tt >= nt; ) + switch (((at = +(tt < et)), (ot = new Array(2)), (ot[at] = it), (it = ot), (rt *= 2), at)) { + case 0: + nt = et + rt + break + case 1: + et = nt - rt + break + } + this._root && this._root.length && (this._root = it) + } + return (this._x0 = et), (this._x1 = nt), this + } + function tree_data$2() { + var tt = [] + return ( + this.visit(function (et) { + if (!et.length) + do tt.push(et.data) + while ((et = et.next)) + }), + tt + ) + } + function tree_extent$2(tt) { + return arguments.length + ? this.cover(+tt[0][0]).cover(+tt[1][0]) + : isNaN(this._x0) + ? void 0 + : [[this._x0], [this._x1]] + } + function Half(tt, et, nt) { + ;(this.node = tt), (this.x0 = et), (this.x1 = nt) + } + function tree_find$2(tt, et) { + var nt, + rt = this._x0, + it, + ot, + at = this._x1, + st = [], + lt = this._root, + ct, + ut + for ( + lt && st.push(new Half(lt, rt, at)), et == null ? (et = 1 / 0) : ((rt = tt - et), (at = tt + et)); + (ct = st.pop()); - #include + ) + if (!(!(lt = ct.node) || (it = ct.x0) > at || (ot = ct.x1) < rt)) + if (lt.length) { + var ht = (it + ot) / 2 + st.push(new Half(lt[1], ht, ot), new Half(lt[0], it, ht)), + (ut = +(tt >= ht)) && + ((ct = st[st.length - 1]), (st[st.length - 1] = st[st.length - 1 - ut]), (st[st.length - 1 - ut] = ct)) + } else { + var dt = Math.abs(tt - +this._x.call(null, lt.data)) + dt < et && ((et = dt), (rt = tt - dt), (at = tt + dt), (nt = lt.data)) + } + return nt + } + function tree_remove$2(tt) { + if (isNaN((lt = +this._x.call(null, tt)))) return this + var et, + nt = this._root, + rt, + it, + ot, + at = this._x0, + st = this._x1, + lt, + ct, + ut, + ht, + dt + if (!nt) return this + if (nt.length) + for (;;) { + if (((ut = lt >= (ct = (at + st) / 2)) ? (at = ct) : (st = ct), (et = nt), !(nt = nt[(ht = +ut)]))) return this + if (!nt.length) break + et[(ht + 1) & 1] && ((rt = et), (dt = ht)) + } + for (; nt.data !== tt; ) if (((it = nt), !(nt = nt.next))) return this + return ( + (ot = nt.next) && delete nt.next, + it + ? (ot ? (it.next = ot) : delete it.next, this) + : et + ? (ot ? (et[ht] = ot) : delete et[ht], + (nt = et[0] || et[1]) && nt === (et[1] || et[0]) && !nt.length && (rt ? (rt[dt] = nt) : (this._root = nt)), + this) + : ((this._root = ot), this) + ) + } + function removeAll$2(tt) { + for (var et = 0, nt = tt.length; et < nt; ++et) this.remove(tt[et]) + return this + } + function tree_root$2() { + return this._root + } + function tree_size$2() { + var tt = 0 + return ( + this.visit(function (et) { + if (!et.length) + do ++tt + while ((et = et.next)) + }), + tt + ) + } + function tree_visit$2(tt) { + var et = [], + nt, + rt = this._root, + it, + ot, + at + for (rt && et.push(new Half(rt, this._x0, this._x1)); (nt = et.pop()); ) + if (!tt((rt = nt.node), (ot = nt.x0), (at = nt.x1)) && rt.length) { + var st = (ot + at) / 2 + ;(it = rt[1]) && et.push(new Half(it, st, at)), (it = rt[0]) && et.push(new Half(it, ot, st)) + } + return this + } + function tree_visitAfter$2(tt) { + var et = [], + nt = [], + rt + for (this._root && et.push(new Half(this._root, this._x0, this._x1)); (rt = et.pop()); ) { + var it = rt.node + if (it.length) { + var ot, + at = rt.x0, + st = rt.x1, + lt = (at + st) / 2 + ;(ot = it[0]) && et.push(new Half(ot, at, lt)), (ot = it[1]) && et.push(new Half(ot, lt, st)) + } + nt.push(rt) + } + for (; (rt = nt.pop()); ) tt(rt.node, rt.x0, rt.x1) + return this + } + function defaultX$2(tt) { + return tt[0] + } + function tree_x$2(tt) { + return arguments.length ? ((this._x = tt), this) : this._x + } + function binarytree(tt, et) { + var nt = new Binarytree(et ?? defaultX$2, NaN, NaN) + return tt == null ? nt : nt.addAll(tt) + } + function Binarytree(tt, et, nt) { + ;(this._x = tt), (this._x0 = et), (this._x1 = nt), (this._root = void 0) + } + function leaf_copy$2(tt) { + for (var et = { data: tt.data }, nt = et; (tt = tt.next); ) nt = nt.next = { data: tt.data } + return et + } + var treeProto$2 = (binarytree.prototype = Binarytree.prototype) + treeProto$2.copy = function () { + var tt = new Binarytree(this._x, this._x0, this._x1), + et = this._root, + nt, + rt + if (!et) return tt + if (!et.length) return (tt._root = leaf_copy$2(et)), tt + for (nt = [{ source: et, target: (tt._root = new Array(2)) }]; (et = nt.pop()); ) + for (var it = 0; it < 2; ++it) + (rt = et.source[it]) && + (rt.length + ? nt.push({ source: rt, target: (et.target[it] = new Array(2)) }) + : (et.target[it] = leaf_copy$2(rt))) + return tt + } + treeProto$2.add = tree_add$2 + treeProto$2.addAll = addAll$2 + treeProto$2.cover = tree_cover$2 + treeProto$2.data = tree_data$2 + treeProto$2.extent = tree_extent$2 + treeProto$2.find = tree_find$2 + treeProto$2.remove = tree_remove$2 + treeProto$2.removeAll = removeAll$2 + treeProto$2.root = tree_root$2 + treeProto$2.size = tree_size$2 + treeProto$2.visit = tree_visit$2 + treeProto$2.visitAfter = tree_visitAfter$2 + treeProto$2.x = tree_x$2 + function tree_add$1(tt) { + const et = +this._x.call(null, tt), + nt = +this._y.call(null, tt) + return add$3(this.cover(et, nt), et, nt, tt) + } + function add$3(tt, et, nt, rt) { + if (isNaN(et) || isNaN(nt)) return tt + var it, + ot = tt._root, + at = { data: rt }, + st = tt._x0, + lt = tt._y0, + ct = tt._x1, + ut = tt._y1, + ht, + dt, + pt, + mt, + gt, + yt, + bt, + vt + if (!ot) return (tt._root = at), tt + for (; ot.length; ) + if ( + ((gt = et >= (ht = (st + ct) / 2)) ? (st = ht) : (ct = ht), + (yt = nt >= (dt = (lt + ut) / 2)) ? (lt = dt) : (ut = dt), + (it = ot), + !(ot = ot[(bt = (yt << 1) | gt)])) + ) + return (it[bt] = at), tt + if (((pt = +tt._x.call(null, ot.data)), (mt = +tt._y.call(null, ot.data)), et === pt && nt === mt)) + return (at.next = ot), it ? (it[bt] = at) : (tt._root = at), tt + do + (it = it ? (it[bt] = new Array(4)) : (tt._root = new Array(4))), + (gt = et >= (ht = (st + ct) / 2)) ? (st = ht) : (ct = ht), + (yt = nt >= (dt = (lt + ut) / 2)) ? (lt = dt) : (ut = dt) + while ((bt = (yt << 1) | gt) === (vt = ((mt >= dt) << 1) | (pt >= ht))) + return (it[vt] = ot), (it[bt] = at), tt + } + function addAll$1(tt) { + var et, + nt, + rt = tt.length, + it, + ot, + at = new Array(rt), + st = new Array(rt), + lt = 1 / 0, + ct = 1 / 0, + ut = -1 / 0, + ht = -1 / 0 + for (nt = 0; nt < rt; ++nt) + isNaN((it = +this._x.call(null, (et = tt[nt])))) || + isNaN((ot = +this._y.call(null, et))) || + ((at[nt] = it), + (st[nt] = ot), + it < lt && (lt = it), + it > ut && (ut = it), + ot < ct && (ct = ot), + ot > ht && (ht = ot)) + if (lt > ut || ct > ht) return this + for (this.cover(lt, ct).cover(ut, ht), nt = 0; nt < rt; ++nt) add$3(this, at[nt], st[nt], tt[nt]) + return this + } + function tree_cover$1(tt, et) { + if (isNaN((tt = +tt)) || isNaN((et = +et))) return this + var nt = this._x0, + rt = this._y0, + it = this._x1, + ot = this._y1 + if (isNaN(nt)) (it = (nt = Math.floor(tt)) + 1), (ot = (rt = Math.floor(et)) + 1) + else { + for (var at = it - nt || 1, st = this._root, lt, ct; nt > tt || tt >= it || rt > et || et >= ot; ) + switch (((ct = ((et < rt) << 1) | (tt < nt)), (lt = new Array(4)), (lt[ct] = st), (st = lt), (at *= 2), ct)) { + case 0: + ;(it = nt + at), (ot = rt + at) + break + case 1: + ;(nt = it - at), (ot = rt + at) + break + case 2: + ;(it = nt + at), (rt = ot - at) + break + case 3: + ;(nt = it - at), (rt = ot - at) + break + } + this._root && this._root.length && (this._root = st) + } + return (this._x0 = nt), (this._y0 = rt), (this._x1 = it), (this._y1 = ot), this + } + function tree_data$1() { + var tt = [] + return ( + this.visit(function (et) { + if (!et.length) + do tt.push(et.data) + while ((et = et.next)) + }), + tt + ) + } + function tree_extent$1(tt) { + return arguments.length + ? this.cover(+tt[0][0], +tt[0][1]).cover(+tt[1][0], +tt[1][1]) + : isNaN(this._x0) + ? void 0 + : [ + [this._x0, this._y0], + [this._x1, this._y1], + ] + } + function Quad(tt, et, nt, rt, it) { + ;(this.node = tt), (this.x0 = et), (this.y0 = nt), (this.x1 = rt), (this.y1 = it) + } + function tree_find$1(tt, et, nt) { + var rt, + it = this._x0, + ot = this._y0, + at, + st, + lt, + ct, + ut = this._x1, + ht = this._y1, + dt = [], + pt = this._root, + mt, + gt + for ( + pt && dt.push(new Quad(pt, it, ot, ut, ht)), + nt == null ? (nt = 1 / 0) : ((it = tt - nt), (ot = et - nt), (ut = tt + nt), (ht = et + nt), (nt *= nt)); + (mt = dt.pop()); - void main() { + ) + if (!(!(pt = mt.node) || (at = mt.x0) > ut || (st = mt.y0) > ht || (lt = mt.x1) < it || (ct = mt.y1) < ot)) + if (pt.length) { + var yt = (at + lt) / 2, + bt = (st + ct) / 2 + dt.push( + new Quad(pt[3], yt, bt, lt, ct), + new Quad(pt[2], at, bt, yt, ct), + new Quad(pt[1], yt, st, lt, bt), + new Quad(pt[0], at, st, yt, bt), + ), + (gt = ((et >= bt) << 1) | (tt >= yt)) && + ((mt = dt[dt.length - 1]), (dt[dt.length - 1] = dt[dt.length - 1 - gt]), (dt[dt.length - 1 - gt] = mt)) + } else { + var vt = tt - +this._x.call(null, pt.data), + xt = et - +this._y.call(null, pt.data), + kt = vt * vt + xt * xt + if (kt < nt) { + var St = Math.sqrt((nt = kt)) + ;(it = tt - St), (ot = et - St), (ut = tt + St), (ht = et + St), (rt = pt.data) + } + } + return rt + } + function tree_remove$1(tt) { + if (isNaN((ut = +this._x.call(null, tt))) || isNaN((ht = +this._y.call(null, tt)))) return this + var et, + nt = this._root, + rt, + it, + ot, + at = this._x0, + st = this._y0, + lt = this._x1, + ct = this._y1, + ut, + ht, + dt, + pt, + mt, + gt, + yt, + bt + if (!nt) return this + if (nt.length) + for (;;) { + if ( + ((mt = ut >= (dt = (at + lt) / 2)) ? (at = dt) : (lt = dt), + (gt = ht >= (pt = (st + ct) / 2)) ? (st = pt) : (ct = pt), + (et = nt), + !(nt = nt[(yt = (gt << 1) | mt)])) + ) + return this + if (!nt.length) break + ;(et[(yt + 1) & 3] || et[(yt + 2) & 3] || et[(yt + 3) & 3]) && ((rt = et), (bt = yt)) + } + for (; nt.data !== tt; ) if (((it = nt), !(nt = nt.next))) return this + return ( + (ot = nt.next) && delete nt.next, + it + ? (ot ? (it.next = ot) : delete it.next, this) + : et + ? (ot ? (et[yt] = ot) : delete et[yt], + (nt = et[0] || et[1] || et[2] || et[3]) && + nt === (et[3] || et[2] || et[1] || et[0]) && + !nt.length && + (rt ? (rt[bt] = nt) : (this._root = nt)), + this) + : ((this._root = ot), this) + ) + } + function removeAll$1(tt) { + for (var et = 0, nt = tt.length; et < nt; ++et) this.remove(tt[et]) + return this + } + function tree_root$1() { + return this._root + } + function tree_size$1() { + var tt = 0 + return ( + this.visit(function (et) { + if (!et.length) + do ++tt + while ((et = et.next)) + }), + tt + ) + } + function tree_visit$1(tt) { + var et = [], + nt, + rt = this._root, + it, + ot, + at, + st, + lt + for (rt && et.push(new Quad(rt, this._x0, this._y0, this._x1, this._y1)); (nt = et.pop()); ) + if (!tt((rt = nt.node), (ot = nt.x0), (at = nt.y0), (st = nt.x1), (lt = nt.y1)) && rt.length) { + var ct = (ot + st) / 2, + ut = (at + lt) / 2 + ;(it = rt[3]) && et.push(new Quad(it, ct, ut, st, lt)), + (it = rt[2]) && et.push(new Quad(it, ot, ut, ct, lt)), + (it = rt[1]) && et.push(new Quad(it, ct, at, st, ut)), + (it = rt[0]) && et.push(new Quad(it, ot, at, ct, ut)) + } + return this + } + function tree_visitAfter$1(tt) { + var et = [], + nt = [], + rt + for (this._root && et.push(new Quad(this._root, this._x0, this._y0, this._x1, this._y1)); (rt = et.pop()); ) { + var it = rt.node + if (it.length) { + var ot, + at = rt.x0, + st = rt.y0, + lt = rt.x1, + ct = rt.y1, + ut = (at + lt) / 2, + ht = (st + ct) / 2 + ;(ot = it[0]) && et.push(new Quad(ot, at, st, ut, ht)), + (ot = it[1]) && et.push(new Quad(ot, ut, st, lt, ht)), + (ot = it[2]) && et.push(new Quad(ot, at, ht, ut, ct)), + (ot = it[3]) && et.push(new Quad(ot, ut, ht, lt, ct)) + } + nt.push(rt) + } + for (; (rt = nt.pop()); ) tt(rt.node, rt.x0, rt.y0, rt.x1, rt.y1) + return this + } + function defaultX$1(tt) { + return tt[0] + } + function tree_x$1(tt) { + return arguments.length ? ((this._x = tt), this) : this._x + } + function defaultY$1(tt) { + return tt[1] + } + function tree_y$1(tt) { + return arguments.length ? ((this._y = tt), this) : this._y + } + function quadtree(tt, et, nt) { + var rt = new Quadtree(et ?? defaultX$1, nt ?? defaultY$1, NaN, NaN, NaN, NaN) + return tt == null ? rt : rt.addAll(tt) + } + function Quadtree(tt, et, nt, rt, it, ot) { + ;(this._x = tt), + (this._y = et), + (this._x0 = nt), + (this._y0 = rt), + (this._x1 = it), + (this._y1 = ot), + (this._root = void 0) + } + function leaf_copy$1(tt) { + for (var et = { data: tt.data }, nt = et; (tt = tt.next); ) nt = nt.next = { data: tt.data } + return et + } + var treeProto$1 = (quadtree.prototype = Quadtree.prototype) + treeProto$1.copy = function () { + var tt = new Quadtree(this._x, this._y, this._x0, this._y0, this._x1, this._y1), + et = this._root, + nt, + rt + if (!et) return tt + if (!et.length) return (tt._root = leaf_copy$1(et)), tt + for (nt = [{ source: et, target: (tt._root = new Array(4)) }]; (et = nt.pop()); ) + for (var it = 0; it < 4; ++it) + (rt = et.source[it]) && + (rt.length + ? nt.push({ source: rt, target: (et.target[it] = new Array(4)) }) + : (et.target[it] = leaf_copy$1(rt))) + return tt + } + treeProto$1.add = tree_add$1 + treeProto$1.addAll = addAll$1 + treeProto$1.cover = tree_cover$1 + treeProto$1.data = tree_data$1 + treeProto$1.extent = tree_extent$1 + treeProto$1.find = tree_find$1 + treeProto$1.remove = tree_remove$1 + treeProto$1.removeAll = removeAll$1 + treeProto$1.root = tree_root$1 + treeProto$1.size = tree_size$1 + treeProto$1.visit = tree_visit$1 + treeProto$1.visitAfter = tree_visitAfter$1 + treeProto$1.x = tree_x$1 + treeProto$1.y = tree_y$1 + function tree_add(tt) { + const et = +this._x.call(null, tt), + nt = +this._y.call(null, tt), + rt = +this._z.call(null, tt) + return add$2(this.cover(et, nt, rt), et, nt, rt, tt) + } + function add$2(tt, et, nt, rt, it) { + if (isNaN(et) || isNaN(nt) || isNaN(rt)) return tt + var ot, + at = tt._root, + st = { data: it }, + lt = tt._x0, + ct = tt._y0, + ut = tt._z0, + ht = tt._x1, + dt = tt._y1, + pt = tt._z1, + mt, + gt, + yt, + bt, + vt, + xt, + kt, + St, + Tt, + At, + Et + if (!at) return (tt._root = st), tt + for (; at.length; ) + if ( + ((kt = et >= (mt = (lt + ht) / 2)) ? (lt = mt) : (ht = mt), + (St = nt >= (gt = (ct + dt) / 2)) ? (ct = gt) : (dt = gt), + (Tt = rt >= (yt = (ut + pt) / 2)) ? (ut = yt) : (pt = yt), + (ot = at), + !(at = at[(At = (Tt << 2) | (St << 1) | kt)])) + ) + return (ot[At] = st), tt + if ( + ((bt = +tt._x.call(null, at.data)), + (vt = +tt._y.call(null, at.data)), + (xt = +tt._z.call(null, at.data)), + et === bt && nt === vt && rt === xt) + ) + return (st.next = at), ot ? (ot[At] = st) : (tt._root = st), tt + do + (ot = ot ? (ot[At] = new Array(8)) : (tt._root = new Array(8))), + (kt = et >= (mt = (lt + ht) / 2)) ? (lt = mt) : (ht = mt), + (St = nt >= (gt = (ct + dt) / 2)) ? (ct = gt) : (dt = gt), + (Tt = rt >= (yt = (ut + pt) / 2)) ? (ut = yt) : (pt = yt) + while ((At = (Tt << 2) | (St << 1) | kt) === (Et = ((xt >= yt) << 2) | ((vt >= gt) << 1) | (bt >= mt))) + return (ot[Et] = at), (ot[At] = st), tt + } + function addAll(tt) { + Array.isArray(tt) || (tt = Array.from(tt)) + const et = tt.length, + nt = new Float64Array(et), + rt = new Float64Array(et), + it = new Float64Array(et) + let ot = 1 / 0, + at = 1 / 0, + st = 1 / 0, + lt = -1 / 0, + ct = -1 / 0, + ut = -1 / 0 + for (let ht = 0, dt, pt, mt, gt; ht < et; ++ht) + isNaN((pt = +this._x.call(null, (dt = tt[ht])))) || + isNaN((mt = +this._y.call(null, dt))) || + isNaN((gt = +this._z.call(null, dt))) || + ((nt[ht] = pt), + (rt[ht] = mt), + (it[ht] = gt), + pt < ot && (ot = pt), + pt > lt && (lt = pt), + mt < at && (at = mt), + mt > ct && (ct = mt), + gt < st && (st = gt), + gt > ut && (ut = gt)) + if (ot > lt || at > ct || st > ut) return this + this.cover(ot, at, st).cover(lt, ct, ut) + for (let ht = 0; ht < et; ++ht) add$2(this, nt[ht], rt[ht], it[ht], tt[ht]) + return this + } + function tree_cover(tt, et, nt) { + if (isNaN((tt = +tt)) || isNaN((et = +et)) || isNaN((nt = +nt))) return this + var rt = this._x0, + it = this._y0, + ot = this._z0, + at = this._x1, + st = this._y1, + lt = this._z1 + if (isNaN(rt)) (at = (rt = Math.floor(tt)) + 1), (st = (it = Math.floor(et)) + 1), (lt = (ot = Math.floor(nt)) + 1) + else { + for ( + var ct = at - rt || 1, ut = this._root, ht, dt; + rt > tt || tt >= at || it > et || et >= st || ot > nt || nt >= lt; - vec3 outputDirection = normalize( vOutputDirection ); - vec2 uv = equirectUv( outputDirection ); + ) + switch ( + ((dt = ((nt < ot) << 2) | ((et < it) << 1) | (tt < rt)), + (ht = new Array(8)), + (ht[dt] = ut), + (ut = ht), + (ct *= 2), + dt) + ) { + case 0: + ;(at = rt + ct), (st = it + ct), (lt = ot + ct) + break + case 1: + ;(rt = at - ct), (st = it + ct), (lt = ot + ct) + break + case 2: + ;(at = rt + ct), (it = st - ct), (lt = ot + ct) + break + case 3: + ;(rt = at - ct), (it = st - ct), (lt = ot + ct) + break + case 4: + ;(at = rt + ct), (st = it + ct), (ot = lt - ct) + break + case 5: + ;(rt = at - ct), (st = it + ct), (ot = lt - ct) + break + case 6: + ;(at = rt + ct), (it = st - ct), (ot = lt - ct) + break + case 7: + ;(rt = at - ct), (it = st - ct), (ot = lt - ct) + break + } + this._root && this._root.length && (this._root = ut) + } + return (this._x0 = rt), (this._y0 = it), (this._z0 = ot), (this._x1 = at), (this._y1 = st), (this._z1 = lt), this + } + function tree_data() { + var tt = [] + return ( + this.visit(function (et) { + if (!et.length) + do tt.push(et.data) + while ((et = et.next)) + }), + tt + ) + } + function tree_extent(tt) { + return arguments.length + ? this.cover(+tt[0][0], +tt[0][1], +tt[0][2]).cover(+tt[1][0], +tt[1][1], +tt[1][2]) + : isNaN(this._x0) + ? void 0 + : [ + [this._x0, this._y0, this._z0], + [this._x1, this._y1, this._z1], + ] + } + function Octant(tt, et, nt, rt, it, ot, at) { + ;(this.node = tt), (this.x0 = et), (this.y0 = nt), (this.z0 = rt), (this.x1 = it), (this.y1 = ot), (this.z1 = at) + } + function tree_find(tt, et, nt, rt) { + var it, + ot = this._x0, + at = this._y0, + st = this._z0, + lt, + ct, + ut, + ht, + dt, + pt, + mt = this._x1, + gt = this._y1, + yt = this._z1, + bt = [], + vt = this._root, + xt, + kt + for ( + vt && bt.push(new Octant(vt, ot, at, st, mt, gt, yt)), + rt == null + ? (rt = 1 / 0) + : ((ot = tt - rt), + (at = et - rt), + (st = nt - rt), + (mt = tt + rt), + (gt = et + rt), + (yt = nt + rt), + (rt *= rt)); + (xt = bt.pop()); - gl_FragColor = vec4( texture2D ( envMap, uv ).rgb, 1.0 ); + ) + if ( + !( + !(vt = xt.node) || + (lt = xt.x0) > mt || + (ct = xt.y0) > gt || + (ut = xt.z0) > yt || + (ht = xt.x1) < ot || + (dt = xt.y1) < at || + (pt = xt.z1) < st + ) + ) + if (vt.length) { + var St = (lt + ht) / 2, + Tt = (ct + dt) / 2, + At = (ut + pt) / 2 + bt.push( + new Octant(vt[7], St, Tt, At, ht, dt, pt), + new Octant(vt[6], lt, Tt, At, St, dt, pt), + new Octant(vt[5], St, ct, At, ht, Tt, pt), + new Octant(vt[4], lt, ct, At, St, Tt, pt), + new Octant(vt[3], St, Tt, ut, ht, dt, At), + new Octant(vt[2], lt, Tt, ut, St, dt, At), + new Octant(vt[1], St, ct, ut, ht, Tt, At), + new Octant(vt[0], lt, ct, ut, St, Tt, At), + ), + (kt = ((nt >= At) << 2) | ((et >= Tt) << 1) | (tt >= St)) && + ((xt = bt[bt.length - 1]), (bt[bt.length - 1] = bt[bt.length - 1 - kt]), (bt[bt.length - 1 - kt] = xt)) + } else { + var Et = tt - +this._x.call(null, vt.data), + $t = et - +this._y.call(null, vt.data), + Dt = nt - +this._z.call(null, vt.data), + jt = Et * Et + $t * $t + Dt * Dt + if (jt < rt) { + var Pt = Math.sqrt((rt = jt)) + ;(ot = tt - Pt), + (at = et - Pt), + (st = nt - Pt), + (mt = tt + Pt), + (gt = et + Pt), + (yt = nt + Pt), + (it = vt.data) + } + } + return it + } + function tree_remove(tt) { + if ( + isNaN((dt = +this._x.call(null, tt))) || + isNaN((pt = +this._y.call(null, tt))) || + isNaN((mt = +this._z.call(null, tt))) + ) + return this + var et, + nt = this._root, + rt, + it, + ot, + at = this._x0, + st = this._y0, + lt = this._z0, + ct = this._x1, + ut = this._y1, + ht = this._z1, + dt, + pt, + mt, + gt, + yt, + bt, + vt, + xt, + kt, + St, + Tt + if (!nt) return this + if (nt.length) + for (;;) { + if ( + ((vt = dt >= (gt = (at + ct) / 2)) ? (at = gt) : (ct = gt), + (xt = pt >= (yt = (st + ut) / 2)) ? (st = yt) : (ut = yt), + (kt = mt >= (bt = (lt + ht) / 2)) ? (lt = bt) : (ht = bt), + (et = nt), + !(nt = nt[(St = (kt << 2) | (xt << 1) | vt)])) + ) + return this + if (!nt.length) break + ;(et[(St + 1) & 7] || + et[(St + 2) & 7] || + et[(St + 3) & 7] || + et[(St + 4) & 7] || + et[(St + 5) & 7] || + et[(St + 6) & 7] || + et[(St + 7) & 7]) && + ((rt = et), (Tt = St)) + } + for (; nt.data !== tt; ) if (((it = nt), !(nt = nt.next))) return this + return ( + (ot = nt.next) && delete nt.next, + it + ? (ot ? (it.next = ot) : delete it.next, this) + : et + ? (ot ? (et[St] = ot) : delete et[St], + (nt = et[0] || et[1] || et[2] || et[3] || et[4] || et[5] || et[6] || et[7]) && + nt === (et[7] || et[6] || et[5] || et[4] || et[3] || et[2] || et[1] || et[0]) && + !nt.length && + (rt ? (rt[Tt] = nt) : (this._root = nt)), + this) + : ((this._root = ot), this) + ) + } + function removeAll(tt) { + for (var et = 0, nt = tt.length; et < nt; ++et) this.remove(tt[et]) + return this + } + function tree_root() { + return this._root + } + function tree_size() { + var tt = 0 + return ( + this.visit(function (et) { + if (!et.length) + do ++tt + while ((et = et.next)) + }), + tt + ) + } + function tree_visit(tt) { + var et = [], + nt, + rt = this._root, + it, + ot, + at, + st, + lt, + ct, + ut + for (rt && et.push(new Octant(rt, this._x0, this._y0, this._z0, this._x1, this._y1, this._z1)); (nt = et.pop()); ) + if ( + !tt((rt = nt.node), (ot = nt.x0), (at = nt.y0), (st = nt.z0), (lt = nt.x1), (ct = nt.y1), (ut = nt.z1)) && + rt.length + ) { + var ht = (ot + lt) / 2, + dt = (at + ct) / 2, + pt = (st + ut) / 2 + ;(it = rt[7]) && et.push(new Octant(it, ht, dt, pt, lt, ct, ut)), + (it = rt[6]) && et.push(new Octant(it, ot, dt, pt, ht, ct, ut)), + (it = rt[5]) && et.push(new Octant(it, ht, at, pt, lt, dt, ut)), + (it = rt[4]) && et.push(new Octant(it, ot, at, pt, ht, dt, ut)), + (it = rt[3]) && et.push(new Octant(it, ht, dt, st, lt, ct, pt)), + (it = rt[2]) && et.push(new Octant(it, ot, dt, st, ht, ct, pt)), + (it = rt[1]) && et.push(new Octant(it, ht, at, st, lt, dt, pt)), + (it = rt[0]) && et.push(new Octant(it, ot, at, st, ht, dt, pt)) + } + return this + } + function tree_visitAfter(tt) { + var et = [], + nt = [], + rt + for ( + this._root && et.push(new Octant(this._root, this._x0, this._y0, this._z0, this._x1, this._y1, this._z1)); + (rt = et.pop()); - } - `,blending:NoBlending,depthTest:!1,depthWrite:!1})}function _getCubemapMaterial(){return new ShaderMaterial({name:"CubemapToCubeUV",uniforms:{envMap:{value:null},flipEnvMap:{value:-1}},vertexShader:_getCommonVertexShader(),fragmentShader:` + ) { + var it = rt.node + if (it.length) { + var ot, + at = rt.x0, + st = rt.y0, + lt = rt.z0, + ct = rt.x1, + ut = rt.y1, + ht = rt.z1, + dt = (at + ct) / 2, + pt = (st + ut) / 2, + mt = (lt + ht) / 2 + ;(ot = it[0]) && et.push(new Octant(ot, at, st, lt, dt, pt, mt)), + (ot = it[1]) && et.push(new Octant(ot, dt, st, lt, ct, pt, mt)), + (ot = it[2]) && et.push(new Octant(ot, at, pt, lt, dt, ut, mt)), + (ot = it[3]) && et.push(new Octant(ot, dt, pt, lt, ct, ut, mt)), + (ot = it[4]) && et.push(new Octant(ot, at, st, mt, dt, pt, ht)), + (ot = it[5]) && et.push(new Octant(ot, dt, st, mt, ct, pt, ht)), + (ot = it[6]) && et.push(new Octant(ot, at, pt, mt, dt, ut, ht)), + (ot = it[7]) && et.push(new Octant(ot, dt, pt, mt, ct, ut, ht)) + } + nt.push(rt) + } + for (; (rt = nt.pop()); ) tt(rt.node, rt.x0, rt.y0, rt.z0, rt.x1, rt.y1, rt.z1) + return this + } + function defaultX(tt) { + return tt[0] + } + function tree_x(tt) { + return arguments.length ? ((this._x = tt), this) : this._x + } + function defaultY(tt) { + return tt[1] + } + function tree_y(tt) { + return arguments.length ? ((this._y = tt), this) : this._y + } + function defaultZ(tt) { + return tt[2] + } + function tree_z(tt) { + return arguments.length ? ((this._z = tt), this) : this._z + } + function octree(tt, et, nt, rt) { + var it = new Octree(et ?? defaultX, nt ?? defaultY, rt ?? defaultZ, NaN, NaN, NaN, NaN, NaN, NaN) + return tt == null ? it : it.addAll(tt) + } + function Octree(tt, et, nt, rt, it, ot, at, st, lt) { + ;(this._x = tt), + (this._y = et), + (this._z = nt), + (this._x0 = rt), + (this._y0 = it), + (this._z0 = ot), + (this._x1 = at), + (this._y1 = st), + (this._z1 = lt), + (this._root = void 0) + } + function leaf_copy(tt) { + for (var et = { data: tt.data }, nt = et; (tt = tt.next); ) nt = nt.next = { data: tt.data } + return et + } + var treeProto = (octree.prototype = Octree.prototype) + treeProto.copy = function () { + var tt = new Octree(this._x, this._y, this._z, this._x0, this._y0, this._z0, this._x1, this._y1, this._z1), + et = this._root, + nt, + rt + if (!et) return tt + if (!et.length) return (tt._root = leaf_copy(et)), tt + for (nt = [{ source: et, target: (tt._root = new Array(8)) }]; (et = nt.pop()); ) + for (var it = 0; it < 8; ++it) + (rt = et.source[it]) && + (rt.length + ? nt.push({ source: rt, target: (et.target[it] = new Array(8)) }) + : (et.target[it] = leaf_copy(rt))) + return tt + } + treeProto.add = tree_add + treeProto.addAll = addAll + treeProto.cover = tree_cover + treeProto.data = tree_data + treeProto.extent = tree_extent + treeProto.find = tree_find + treeProto.remove = tree_remove + treeProto.removeAll = removeAll + treeProto.root = tree_root + treeProto.size = tree_size + treeProto.visit = tree_visit + treeProto.visitAfter = tree_visitAfter + treeProto.x = tree_x + treeProto.y = tree_y + treeProto.z = tree_z + function constant$7(tt) { + return function () { + return tt + } + } + function jiggle(tt) { + return (tt() - 0.5) * 1e-6 + } + function x$3(tt) { + return tt.x + tt.vx + } + function y$3(tt) { + return tt.y + tt.vy + } + function z$2(tt) { + return tt.z + tt.vz + } + function forceCollide(tt) { + var et, + nt, + rt, + it, + ot = 1, + at = 1 + typeof tt != 'function' && (tt = constant$7(tt == null ? 1 : +tt)) + function st() { + for (var ut, ht = et.length, dt, pt, mt, gt, yt, bt, vt, xt = 0; xt < at; ++xt) + for ( + dt = ( + nt === 1 + ? binarytree(et, x$3) + : nt === 2 + ? quadtree(et, x$3, y$3) + : nt === 3 + ? octree(et, x$3, y$3, z$2) + : null + ).visitAfter(lt), + ut = 0; + ut < ht; + ++ut + ) + (pt = et[ut]), + (bt = rt[pt.index]), + (vt = bt * bt), + (mt = pt.x + pt.vx), + nt > 1 && (gt = pt.y + pt.vy), + nt > 2 && (yt = pt.z + pt.vz), + dt.visit(kt) + function kt(St, Tt, At, Et, $t, Dt, jt) { + var Pt = [Tt, At, Et, $t, Dt, jt], + Ct = Pt[0], + wt = Pt[1], + It = Pt[2], + Ot = Pt[nt], + Wt = Pt[nt + 1], + zt = Pt[nt + 2], + Ft = St.data, + Nt = St.r, + Ut = bt + Nt + if (Ft) { + if (Ft.index > pt.index) { + var Mt = mt - Ft.x - Ft.vx, + Ht = nt > 1 ? gt - Ft.y - Ft.vy : 0, + en = nt > 2 ? yt - Ft.z - Ft.vz : 0, + sn = Mt * Mt + Ht * Ht + en * en + sn < Ut * Ut && + (Mt === 0 && ((Mt = jiggle(it)), (sn += Mt * Mt)), + nt > 1 && Ht === 0 && ((Ht = jiggle(it)), (sn += Ht * Ht)), + nt > 2 && en === 0 && ((en = jiggle(it)), (sn += en * en)), + (sn = ((Ut - (sn = Math.sqrt(sn))) / sn) * ot), + (pt.vx += (Mt *= sn) * (Ut = (Nt *= Nt) / (vt + Nt))), + nt > 1 && (pt.vy += (Ht *= sn) * Ut), + nt > 2 && (pt.vz += (en *= sn) * Ut), + (Ft.vx -= Mt * (Ut = 1 - Ut)), + nt > 1 && (Ft.vy -= Ht * Ut), + nt > 2 && (Ft.vz -= en * Ut)) + } + return + } + return ( + Ct > mt + Ut || + Ot < mt - Ut || + (nt > 1 && (wt > gt + Ut || Wt < gt - Ut)) || + (nt > 2 && (It > yt + Ut || zt < yt - Ut)) + ) + } + } + function lt(ut) { + if (ut.data) return (ut.r = rt[ut.data.index]) + for (var ht = (ut.r = 0); ht < Math.pow(2, nt); ++ht) ut[ht] && ut[ht].r > ut.r && (ut.r = ut[ht].r) + } + function ct() { + if (et) { + var ut, + ht = et.length, + dt + for (rt = new Array(ht), ut = 0; ut < ht; ++ut) (dt = et[ut]), (rt[dt.index] = +tt(dt, ut, et)) + } + } + return ( + (st.initialize = function (ut, ...ht) { + ;(et = ut), + (it = ht.find((dt) => typeof dt == 'function') || Math.random), + (nt = ht.find((dt) => [1, 2, 3].includes(dt)) || 2), + ct() + }), + (st.iterations = function (ut) { + return arguments.length ? ((at = +ut), st) : at + }), + (st.strength = function (ut) { + return arguments.length ? ((ot = +ut), st) : ot + }), + (st.radius = function (ut) { + return arguments.length ? ((tt = typeof ut == 'function' ? ut : constant$7(+ut)), ct(), st) : tt + }), + st + ) + } + function index$1(tt) { + return tt.index + } + function find$2(tt, et) { + var nt = tt.get(et) + if (!nt) throw new Error('node not found: ' + et) + return nt + } + function forceLink(tt) { + var et = index$1, + nt = dt, + rt, + it = constant$7(30), + ot, + at, + st, + lt, + ct, + ut, + ht = 1 + tt == null && (tt = []) + function dt(bt) { + return 1 / Math.min(lt[bt.source.index], lt[bt.target.index]) + } + function pt(bt) { + for (var vt = 0, xt = tt.length; vt < ht; ++vt) + for (var kt = 0, St, Tt, At, Et = 0, $t = 0, Dt = 0, jt, Pt; kt < xt; ++kt) + (St = tt[kt]), + (Tt = St.source), + (At = St.target), + (Et = At.x + At.vx - Tt.x - Tt.vx || jiggle(ut)), + st > 1 && ($t = At.y + At.vy - Tt.y - Tt.vy || jiggle(ut)), + st > 2 && (Dt = At.z + At.vz - Tt.z - Tt.vz || jiggle(ut)), + (jt = Math.sqrt(Et * Et + $t * $t + Dt * Dt)), + (jt = ((jt - ot[kt]) / jt) * bt * rt[kt]), + (Et *= jt), + ($t *= jt), + (Dt *= jt), + (At.vx -= Et * (Pt = ct[kt])), + st > 1 && (At.vy -= $t * Pt), + st > 2 && (At.vz -= Dt * Pt), + (Tt.vx += Et * (Pt = 1 - Pt)), + st > 1 && (Tt.vy += $t * Pt), + st > 2 && (Tt.vz += Dt * Pt) + } + function mt() { + if (at) { + var bt, + vt = at.length, + xt = tt.length, + kt = new Map(at.map((Tt, At) => [et(Tt, At, at), Tt])), + St + for (bt = 0, lt = new Array(vt); bt < xt; ++bt) + (St = tt[bt]), + (St.index = bt), + typeof St.source != 'object' && (St.source = find$2(kt, St.source)), + typeof St.target != 'object' && (St.target = find$2(kt, St.target)), + (lt[St.source.index] = (lt[St.source.index] || 0) + 1), + (lt[St.target.index] = (lt[St.target.index] || 0) + 1) + for (bt = 0, ct = new Array(xt); bt < xt; ++bt) + (St = tt[bt]), (ct[bt] = lt[St.source.index] / (lt[St.source.index] + lt[St.target.index])) + ;(rt = new Array(xt)), gt(), (ot = new Array(xt)), yt() + } + } + function gt() { + if (at) for (var bt = 0, vt = tt.length; bt < vt; ++bt) rt[bt] = +nt(tt[bt], bt, tt) + } + function yt() { + if (at) for (var bt = 0, vt = tt.length; bt < vt; ++bt) ot[bt] = +it(tt[bt], bt, tt) + } + return ( + (pt.initialize = function (bt, ...vt) { + ;(at = bt), + (ut = vt.find((xt) => typeof xt == 'function') || Math.random), + (st = vt.find((xt) => [1, 2, 3].includes(xt)) || 2), + mt() + }), + (pt.links = function (bt) { + return arguments.length ? ((tt = bt), mt(), pt) : tt + }), + (pt.id = function (bt) { + return arguments.length ? ((et = bt), pt) : et + }), + (pt.iterations = function (bt) { + return arguments.length ? ((ht = +bt), pt) : ht + }), + (pt.strength = function (bt) { + return arguments.length ? ((nt = typeof bt == 'function' ? bt : constant$7(+bt)), gt(), pt) : nt + }), + (pt.distance = function (bt) { + return arguments.length ? ((it = typeof bt == 'function' ? bt : constant$7(+bt)), yt(), pt) : it + }), + pt + ) + } + var noop$6 = { value: () => {} } + function dispatch() { + for (var tt = 0, et = arguments.length, nt = {}, rt; tt < et; ++tt) { + if (!(rt = arguments[tt] + '') || rt in nt || /[\s.]/.test(rt)) throw new Error('illegal type: ' + rt) + nt[rt] = [] + } + return new Dispatch(nt) + } + function Dispatch(tt) { + this._ = tt + } + function parseTypenames$1(tt, et) { + return tt + .trim() + .split(/^|\s+/) + .map(function (nt) { + var rt = '', + it = nt.indexOf('.') + if ((it >= 0 && ((rt = nt.slice(it + 1)), (nt = nt.slice(0, it))), nt && !et.hasOwnProperty(nt))) + throw new Error('unknown type: ' + nt) + return { type: nt, name: rt } + }) + } + Dispatch.prototype = dispatch.prototype = { + constructor: Dispatch, + on: function (tt, et) { + var nt = this._, + rt = parseTypenames$1(tt + '', nt), + it, + ot = -1, + at = rt.length + if (arguments.length < 2) { + for (; ++ot < at; ) if ((it = (tt = rt[ot]).type) && (it = get$4(nt[it], tt.name))) return it + return + } + if (et != null && typeof et != 'function') throw new Error('invalid callback: ' + et) + for (; ++ot < at; ) + if ((it = (tt = rt[ot]).type)) nt[it] = set$2(nt[it], tt.name, et) + else if (et == null) for (it in nt) nt[it] = set$2(nt[it], tt.name, null) + return this + }, + copy: function () { + var tt = {}, + et = this._ + for (var nt in et) tt[nt] = et[nt].slice() + return new Dispatch(tt) + }, + call: function (tt, et) { + if ((it = arguments.length - 2) > 0) + for (var nt = new Array(it), rt = 0, it, ot; rt < it; ++rt) nt[rt] = arguments[rt + 2] + if (!this._.hasOwnProperty(tt)) throw new Error('unknown type: ' + tt) + for (ot = this._[tt], rt = 0, it = ot.length; rt < it; ++rt) ot[rt].value.apply(et, nt) + }, + apply: function (tt, et, nt) { + if (!this._.hasOwnProperty(tt)) throw new Error('unknown type: ' + tt) + for (var rt = this._[tt], it = 0, ot = rt.length; it < ot; ++it) rt[it].value.apply(et, nt) + }, + } + function get$4(tt, et) { + for (var nt = 0, rt = tt.length, it; nt < rt; ++nt) if ((it = tt[nt]).name === et) return it.value + } + function set$2(tt, et, nt) { + for (var rt = 0, it = tt.length; rt < it; ++rt) + if (tt[rt].name === et) { + ;(tt[rt] = noop$6), (tt = tt.slice(0, rt).concat(tt.slice(rt + 1))) + break + } + return nt != null && tt.push({ name: et, value: nt }), tt + } + var frame = 0, + timeout$1 = 0, + interval = 0, + pokeDelay = 1e3, + taskHead, + taskTail, + clockLast = 0, + clockNow = 0, + clockSkew = 0, + clock = typeof performance == 'object' && performance.now ? performance : Date, + setFrame = + typeof window == 'object' && window.requestAnimationFrame + ? window.requestAnimationFrame.bind(window) + : function (tt) { + setTimeout(tt, 17) + } + function now$4() { + return clockNow || (setFrame(clearNow), (clockNow = clock.now() + clockSkew)) + } + function clearNow() { + clockNow = 0 + } + function Timer$1() { + this._call = this._time = this._next = null + } + Timer$1.prototype = timer$1.prototype = { + constructor: Timer$1, + restart: function (tt, et, nt) { + if (typeof tt != 'function') throw new TypeError('callback is not a function') + ;(nt = (nt == null ? now$4() : +nt) + (et == null ? 0 : +et)), + !this._next && taskTail !== this && (taskTail ? (taskTail._next = this) : (taskHead = this), (taskTail = this)), + (this._call = tt), + (this._time = nt), + sleep() + }, + stop: function () { + this._call && ((this._call = null), (this._time = 1 / 0), sleep()) + }, + } + function timer$1(tt, et, nt) { + var rt = new Timer$1() + return rt.restart(tt, et, nt), rt + } + function timerFlush() { + now$4(), ++frame + for (var tt = taskHead, et; tt; ) (et = clockNow - tt._time) >= 0 && tt._call.call(void 0, et), (tt = tt._next) + --frame + } + function wake() { + ;(clockNow = (clockLast = clock.now()) + clockSkew), (frame = timeout$1 = 0) + try { + timerFlush() + } finally { + ;(frame = 0), nap(), (clockNow = 0) + } + } + function poke() { + var tt = clock.now(), + et = tt - clockLast + et > pokeDelay && ((clockSkew -= et), (clockLast = tt)) + } + function nap() { + for (var tt, et = taskHead, nt, rt = 1 / 0; et; ) + et._call + ? (rt > et._time && (rt = et._time), (tt = et), (et = et._next)) + : ((nt = et._next), (et._next = null), (et = tt ? (tt._next = nt) : (taskHead = nt))) + ;(taskTail = tt), sleep(rt) + } + function sleep(tt) { + if (!frame) { + timeout$1 && (timeout$1 = clearTimeout(timeout$1)) + var et = tt - clockNow + et > 24 + ? (tt < 1 / 0 && (timeout$1 = setTimeout(wake, tt - clock.now() - clockSkew)), + interval && (interval = clearInterval(interval))) + : (interval || ((clockLast = clock.now()), (interval = setInterval(poke, pokeDelay))), + (frame = 1), + setFrame(wake)) + } + } + function timeout(tt, et, nt) { + var rt = new Timer$1() + return ( + (et = et == null ? 0 : +et), + rt.restart( + (it) => { + rt.stop(), tt(it + et) + }, + et, + nt, + ), + rt + ) + } + const a$2 = 1664525, + c$4 = 1013904223, + m$3 = 4294967296 + function lcg() { + let tt = 1 + return () => (tt = (a$2 * tt + c$4) % m$3) / m$3 + } + var MAX_DIMENSIONS = 3 + function x$2(tt) { + return tt.x + } + function y$2(tt) { + return tt.y + } + function z$1(tt) { + return tt.z + } + var initialRadius = 10, + initialAngleRoll = Math.PI * (3 - Math.sqrt(5)), + initialAngleYaw = (Math.PI * 20) / (9 + Math.sqrt(221)) + function forceSimulation(tt, et) { + et = et || 2 + var nt = Math.min(MAX_DIMENSIONS, Math.max(1, Math.round(et))), + rt, + it = 1, + ot = 0.001, + at = 1 - Math.pow(ot, 1 / 300), + st = 0, + lt = 0.6, + ct = new Map(), + ut = timer$1(pt), + ht = dispatch('tick', 'end'), + dt = lcg() + tt == null && (tt = []) + function pt() { + mt(), ht.call('tick', rt), it < ot && (ut.stop(), ht.call('end', rt)) + } + function mt(bt) { + var vt, + xt = tt.length, + kt + bt === void 0 && (bt = 1) + for (var St = 0; St < bt; ++St) + for ( + it += (st - it) * at, + ct.forEach(function (Tt) { + Tt(it) + }), + vt = 0; + vt < xt; + ++vt + ) + (kt = tt[vt]), + kt.fx == null ? (kt.x += kt.vx *= lt) : ((kt.x = kt.fx), (kt.vx = 0)), + nt > 1 && (kt.fy == null ? (kt.y += kt.vy *= lt) : ((kt.y = kt.fy), (kt.vy = 0))), + nt > 2 && (kt.fz == null ? (kt.z += kt.vz *= lt) : ((kt.z = kt.fz), (kt.vz = 0))) + return rt + } + function gt() { + for (var bt = 0, vt = tt.length, xt; bt < vt; ++bt) { + if ( + ((xt = tt[bt]), + (xt.index = bt), + xt.fx != null && (xt.x = xt.fx), + xt.fy != null && (xt.y = xt.fy), + xt.fz != null && (xt.z = xt.fz), + isNaN(xt.x) || (nt > 1 && isNaN(xt.y)) || (nt > 2 && isNaN(xt.z))) + ) { + var kt = initialRadius * (nt > 2 ? Math.cbrt(0.5 + bt) : nt > 1 ? Math.sqrt(0.5 + bt) : bt), + St = bt * initialAngleRoll, + Tt = bt * initialAngleYaw + nt === 1 + ? (xt.x = kt) + : nt === 2 + ? ((xt.x = kt * Math.cos(St)), (xt.y = kt * Math.sin(St))) + : ((xt.x = kt * Math.sin(St) * Math.cos(Tt)), + (xt.y = kt * Math.cos(St)), + (xt.z = kt * Math.sin(St) * Math.sin(Tt))) + } + ;(isNaN(xt.vx) || (nt > 1 && isNaN(xt.vy)) || (nt > 2 && isNaN(xt.vz))) && + ((xt.vx = 0), nt > 1 && (xt.vy = 0), nt > 2 && (xt.vz = 0)) + } + } + function yt(bt) { + return bt.initialize && bt.initialize(tt, dt, nt), bt + } + return ( + gt(), + (rt = { + tick: mt, + restart: function () { + return ut.restart(pt), rt + }, + stop: function () { + return ut.stop(), rt + }, + numDimensions: function (bt) { + return arguments.length + ? ((nt = Math.min(MAX_DIMENSIONS, Math.max(1, Math.round(bt)))), ct.forEach(yt), rt) + : nt + }, + nodes: function (bt) { + return arguments.length ? ((tt = bt), gt(), ct.forEach(yt), rt) : tt + }, + alpha: function (bt) { + return arguments.length ? ((it = +bt), rt) : it + }, + alphaMin: function (bt) { + return arguments.length ? ((ot = +bt), rt) : ot + }, + alphaDecay: function (bt) { + return arguments.length ? ((at = +bt), rt) : +at + }, + alphaTarget: function (bt) { + return arguments.length ? ((st = +bt), rt) : st + }, + velocityDecay: function (bt) { + return arguments.length ? ((lt = 1 - bt), rt) : 1 - lt + }, + randomSource: function (bt) { + return arguments.length ? ((dt = bt), ct.forEach(yt), rt) : dt + }, + force: function (bt, vt) { + return arguments.length > 1 ? (vt == null ? ct.delete(bt) : ct.set(bt, yt(vt)), rt) : ct.get(bt) + }, + find: function () { + var bt = Array.prototype.slice.call(arguments), + vt = bt.shift() || 0, + xt = (nt > 1 ? bt.shift() : null) || 0, + kt = (nt > 2 ? bt.shift() : null) || 0, + St = bt.shift() || 1 / 0, + Tt = 0, + At = tt.length, + Et, + $t, + Dt, + jt, + Pt, + Ct + for (St *= St, Tt = 0; Tt < At; ++Tt) + (Pt = tt[Tt]), + (Et = vt - Pt.x), + ($t = xt - (Pt.y || 0)), + (Dt = kt - (Pt.z || 0)), + (jt = Et * Et + $t * $t + Dt * Dt), + jt < St && ((Ct = Pt), (St = jt)) + return Ct + }, + on: function (bt, vt) { + return arguments.length > 1 ? (ht.on(bt, vt), rt) : ht.on(bt) + }, + }) + ) + } + function forceManyBody() { + var tt, + et, + nt, + rt, + it, + ot = constant$7(-30), + at, + st = 1, + lt = 1 / 0, + ct = 0.81 + function ut(mt) { + var gt, + yt = tt.length, + bt = ( + et === 1 + ? binarytree(tt, x$2) + : et === 2 + ? quadtree(tt, x$2, y$2) + : et === 3 + ? octree(tt, x$2, y$2, z$1) + : null + ).visitAfter(dt) + for (it = mt, gt = 0; gt < yt; ++gt) (nt = tt[gt]), bt.visit(pt) + } + function ht() { + if (tt) { + var mt, + gt = tt.length, + yt + for (at = new Array(gt), mt = 0; mt < gt; ++mt) (yt = tt[mt]), (at[yt.index] = +ot(yt, mt, tt)) + } + } + function dt(mt) { + var gt = 0, + yt, + bt, + vt = 0, + xt, + kt, + St, + Tt, + At = mt.length + if (At) { + for (xt = kt = St = Tt = 0; Tt < At; ++Tt) + (yt = mt[Tt]) && + (bt = Math.abs(yt.value)) && + ((gt += yt.value), (vt += bt), (xt += bt * (yt.x || 0)), (kt += bt * (yt.y || 0)), (St += bt * (yt.z || 0))) + ;(gt *= Math.sqrt(4 / At)), (mt.x = xt / vt), et > 1 && (mt.y = kt / vt), et > 2 && (mt.z = St / vt) + } else { + ;(yt = mt), (yt.x = yt.data.x), et > 1 && (yt.y = yt.data.y), et > 2 && (yt.z = yt.data.z) + do gt += at[yt.data.index] + while ((yt = yt.next)) + } + mt.value = gt + } + function pt(mt, gt, yt, bt, vt) { + if (!mt.value) return !0 + var xt = [yt, bt, vt][et - 1], + kt = mt.x - nt.x, + St = et > 1 ? mt.y - nt.y : 0, + Tt = et > 2 ? mt.z - nt.z : 0, + At = xt - gt, + Et = kt * kt + St * St + Tt * Tt + if ((At * At) / ct < Et) + return ( + Et < lt && + (kt === 0 && ((kt = jiggle(rt)), (Et += kt * kt)), + et > 1 && St === 0 && ((St = jiggle(rt)), (Et += St * St)), + et > 2 && Tt === 0 && ((Tt = jiggle(rt)), (Et += Tt * Tt)), + Et < st && (Et = Math.sqrt(st * Et)), + (nt.vx += (kt * mt.value * it) / Et), + et > 1 && (nt.vy += (St * mt.value * it) / Et), + et > 2 && (nt.vz += (Tt * mt.value * it) / Et)), + !0 + ) + if (mt.length || Et >= lt) return + ;(mt.data !== nt || mt.next) && + (kt === 0 && ((kt = jiggle(rt)), (Et += kt * kt)), + et > 1 && St === 0 && ((St = jiggle(rt)), (Et += St * St)), + et > 2 && Tt === 0 && ((Tt = jiggle(rt)), (Et += Tt * Tt)), + Et < st && (Et = Math.sqrt(st * Et))) + do + mt.data !== nt && + ((At = (at[mt.data.index] * it) / Et), + (nt.vx += kt * At), + et > 1 && (nt.vy += St * At), + et > 2 && (nt.vz += Tt * At)) + while ((mt = mt.next)) + } + return ( + (ut.initialize = function (mt, ...gt) { + ;(tt = mt), + (rt = gt.find((yt) => typeof yt == 'function') || Math.random), + (et = gt.find((yt) => [1, 2, 3].includes(yt)) || 2), + ht() + }), + (ut.strength = function (mt) { + return arguments.length ? ((ot = typeof mt == 'function' ? mt : constant$7(+mt)), ht(), ut) : ot + }), + (ut.distanceMin = function (mt) { + return arguments.length ? ((st = mt * mt), ut) : Math.sqrt(st) + }), + (ut.distanceMax = function (mt) { + return arguments.length ? ((lt = mt * mt), ut) : Math.sqrt(lt) + }), + (ut.theta = function (mt) { + return arguments.length ? ((ct = mt * mt), ut) : Math.sqrt(ct) + }), + ut + ) + } + const simulation = forceSimulation().stop(), + defaults$2 = { + numDimensions: 3, + velocityDecay: 0.9, + forceChargeStrength: -20, + forceChargeMinDistance: 10, + forceChargeMaxDistance: 8e3, + forceLinkStrength: 0.04, + forceCenterStrength: 0.85, + disableCollide: !1, + disableCenter: !1, + disableLink: !1, + disableCharge: !1, + forceCollideRadiusMethod: (tt) => (tt.scale || 1) * 6 + 200, + forceLinkDistanceMethod: (tt) => { + const et = tt.source.node_type + let nt = 50 + switch (et) { + case 'topic': + nt = 30 + break + case 'guest': + nt = 30 + break + case 'clip': + nt = 10 + break + case 'episode': + nt = 15 + break + } + return nt * 2 + }, + }, + runForceSimulation = ( + tt, + et, + { + numDimensions: nt = defaults$2.numDimensions, + velocityDecay: rt = defaults$2.velocityDecay, + forceChargeStrength: it = defaults$2.forceChargeStrength, + forceChargeMinDistance: ot = defaults$2.forceChargeMinDistance, + forceChargeMaxDistance: at = defaults$2.forceChargeMaxDistance, + forceLinkStrength: st = defaults$2.forceLinkStrength, + forceCenterStrength: lt = defaults$2.forceCenterStrength, + forceLinkDistanceMethod: ct = defaults$2.forceLinkDistanceMethod, + forceCollideRadiusMethod: ut = defaults$2.forceCollideRadiusMethod, + disableCollide: ht = defaults$2.disableCollide, + disableCenter: dt = defaults$2.disableCenter, + disableLink: pt = defaults$2.disableLink, + disableCharge: mt = defaults$2.disableCharge, + }, + ) => ( + simulation + .alpha(1) + .stop() + .numDimensions(nt) + .velocityDecay(rt) + .force('collide', ht ? null : forceCollide().radius(ut).iterations(1)) + .force('center', dt ? null : forceCenter().strength(lt)) + .force('charge', mt ? null : forceManyBody().strength(it).distanceMin(ot).distanceMax(at)) + .nodes(tt) + .force( + 'link', + pt + ? null + : forceLink() + .distance(ct) + .strength(st) + .id((gt) => gt.id) + .links(et.filter((gt) => !gt.onlyVisibleOnSelect)), + ) + .alpha(1) + .restart(), + simulation + ), + simulationTicks$1 = 60, + collisionTicks$1 = 20, + runSimulationPhase$1 = (tt) => { + for (let et = 0; et < simulationTicks$1; et += 1) tt.tick() + }, + runCollisionPhase$1 = (tt) => { + tt.force( + 'collide', + forceCollide() + .radius((et) => (et.scale || 1) * 20) + .iterations(1), + ) + for (let et = 0; et < collisionTicks$1; et += 1) tt.tick() + }, + generateForceGraphPositions = (tt) => { + const et = tt.map((ot) => ({ ...ot, x: 0, y: 0, z: 0 })), + nt = generateLinksFromNodeData(et, !1, !1), + rt = runForceSimulation(et, nt, { + numDimensions: 3, + forceLinkStrength: 0.5, + forceChargeStrength: -40, + forceCenterStrength: 0.3, + velocityDecay: 0.5, + }) + runSimulationPhase$1(rt), runCollisionPhase$1(rt), rt.stop() + const it = nt.map((ot) => { + const at = et.find((ht) => ht.ref_id === ot.sourceRef), + st = et.find((ht) => ht.ref_id === ot.targetRef), + lt = ['guest', 'topic'].some( + (ht) => ht === (at == null ? void 0 : at.node_type) || ht === (st == null ? void 0 : st.node_type), + ), + ct = new Vector3( + (at == null ? void 0 : at.x) || 0, + (at == null ? void 0 : at.y) || 0, + (at == null ? void 0 : at.z) || 0, + ), + ut = new Vector3( + (st == null ? void 0 : st.x) || 0, + (st == null ? void 0 : st.y) || 0, + (st == null ? void 0 : st.z) || 0, + ) + return { ...ot, onlyVisibleOnSelect: lt, sourcePosition: ct, targetPosition: ut } + }) + return { nodes: et, links: it } + }, + sortAB = (tt, et, nt) => { + let rt = -2 + return ( + tt === nt && et === nt ? (rt = 0) : tt === nt && et !== nt ? (rt = -1) : tt !== nt && et === nt && (rt = 1), rt + ) + }, + sortNodesByHierarchy = (tt) => + tt + .map((nt) => nt) + .sort((nt, rt) => { + let it = 0 + return ( + nt.node_type === 'show' || rt.node_type === 'show' + ? (it = sortAB(nt.node_type, rt.node_type, 'show')) + : nt.node_type === 'episode' || rt.node_type === 'episode' + ? (it = sortAB(nt.node_type, rt.node_type, 'episode')) + : nt.node_type === 'clip' || rt.node_type === 'clip' + ? (it = sortAB(nt.node_type, rt.node_type, 'clip')) + : nt.node_type !== 'guest' && rt.node_type === 'guest' + ? (it = sortAB(nt.node_type, rt.node_type, 'guest')) + : (it = 0), + it + ) + }) + function getMyParents(tt, et) { + const { ref_id: nt } = tt + return !nt || !et + ? [] + : et.filter((it) => { + var ot + return (ot = it.children) == null ? void 0 : ot.includes(nt) + }) + } + function getMyChildren(tt, et) { + return et.filter((rt) => rt.ref_id && tt.includes(rt.ref_id)) + } + const simulationTicks = 60, + collisionTicks = 20, + universeScale$1 = 5e3, + universeCube = { scale: universeScale$1 / 2, position: { x: 0, y: 0, z: 0 } } + function generateNodePosition$1(tt, et) { + const { scale: nt, position: rt } = universeCube, + it = { + x: rt.x + Math.random() * nt - nt * 0.5, + y: rt.y + Math.random() * nt - nt * 0.5, + z: rt.z + Math.random() * nt - nt * 0.5, + }, + ot = getMyParents(tt, et), + at = ot != null && ot.length ? new Vector3(ot[0].x, ot[0].y, ot[0].z) : null + return at && ((it.x = at.x), (it.y = at.y), (it.z = at.z)), new Vector3(it.x, it.y, it.z) + } + const runSimulationPhase = (tt) => { + for (let et = 0; et < simulationTicks; et += 1) tt.tick() + }, + runCollisionPhase = (tt) => { + tt.force( + 'collide', + forceCollide() + .radius((et) => (et.scale || 1) * 20) + .iterations(1), + ) + for (let et = 0; et < collisionTicks; et += 1) tt.tick() + }, + generateSphereGraphPositions = (tt) => { + const et = [], + nt = tt.map((at) => { + const st = generateNodePosition$1(at, et), + lt = { ...at, ...st } + return et.push(lt), lt + }), + rt = generateLinksFromNodeData(nt, !0, !0), + it = runForceSimulation(nt, rt, { + numDimensions: 3, + forceLinkStrength: 0.01, + forceChargeStrength: -80, + velocityDecay: 0.5, + disableCenter: !0, + disableCharge: !0, + }) + runSimulationPhase(it), runCollisionPhase(it), it.stop() + const ot = rt.map((at) => { + const st = nt.find((dt) => dt.ref_id === at.sourceRef), + lt = nt.find((dt) => dt.ref_id === at.targetRef), + ct = new Vector3( + (st == null ? void 0 : st.x) || 0, + (st == null ? void 0 : st.y) || 0, + (st == null ? void 0 : st.z) || 0, + ), + ut = new Vector3( + (lt == null ? void 0 : lt.x) || 0, + (lt == null ? void 0 : lt.y) || 0, + (lt == null ? void 0 : lt.z) || 0, + ) + return { ...at, onlyVisibleOnSelect: !0, sourcePosition: ct, targetPosition: ut } + }) + return { nodes: nt, links: ot } + }, + universeScale = 5e3, + padding = 300, + guestCube = { scale: universeScale / 2, position: { x: 0, y: 0, z: universeScale / 2 + padding } }, + topicCube = { scale: universeScale / 2, position: { x: 0, y: 0, z: -(universeScale / 2 + padding) } }, + dataCube = { scale: universeScale / 2, position: { x: 0, y: 0, z: 0 } } + function generateGuestNodePosition() { + const { scale: tt, position: et } = guestCube, + nt = { + x: et.x + Math.random() * tt - tt * 0.5, + y: et.y + Math.random() * tt - tt * 0.5, + z: et.z + Math.random() * tt - tt * 0.5, + }, + rt = 1, + it = 10 + return new Vector3(nt.x + rt * it, nt.y + rt * it, nt.z + rt * it) + } + function generateTopicNodePosition() { + const { scale: tt, position: et } = topicCube, + nt = { + x: et.x + Math.random() * tt - tt * 0.5, + y: et.y + Math.random() * tt - tt * 0.5, + z: et.z + Math.random() * tt - tt * 0.5, + }, + rt = 1, + it = 10 + return new Vector3(nt.x + rt * it, nt.y + rt * it, nt.z + rt * it) + } + function generateNearbyPosition(tt, et, nt = 1) { + let it = 0, + ot = 10 * 1 + const at = 0 + switch (et) { + case 'episode': + ot += 50 * (nt || 0) + break + case 'clip': + ;(ot = 0), (it += 50 * (nt || 0)) + break + } + const st = new Vector3() + return (st.x = tt.x + it), (st.y = tt.y + ot), (st.z = tt.z + at), st + } + function generateNodePosition(tt, et, nt) { + const { ref_id: rt } = tt, + { scale: it, position: ot } = dataCube, + at = { + x: ot.x + Math.random() * it - it * 0.5, + y: ot.y + Math.random() * it - it * 0.5, + z: ot.z + Math.random() * it - it * 0.5, + }, + st = getMyParents(tt, nt) + let lt = null + if (st != null && st.length) { + const ht = st[0], + pt = getMyChildren(ht.children || [], et).findIndex((mt) => mt.ref_id === rt) + lt = generateNearbyPosition(new Vector3(ht.x, ht.y, ht.z), tt.node_type, pt + 1) + } + lt && ((at.x = lt.x), (at.y = lt.y), (at.z = lt.z)) + const ct = 1, + ut = 1 + return new Vector3(at.x + ct * ut, at.y + ct * ut, at.z + ct * ut) + } + const generateSplitGraphPositions = (tt) => { + const et = sortNodesByHierarchy(tt), + nt = [], + rt = et.map((at) => { + let st = new Vector3(0, 0, 0) + switch (at.node_type) { + case 'guest': + st = generateGuestNodePosition() + break + case 'topic': + st = generateTopicNodePosition() + break + case 'data_series': + st = generateNodePosition({}, et, nt) + break + default: + st = generateNodePosition(at, et, nt) + break + } + const lt = { ...at, ...st } + return nt.push(lt), lt + }), + ot = generateLinksFromNodeData(rt, !0, !0).map((at) => { + const st = rt.find((dt) => dt.ref_id === at.sourceRef), + lt = rt.find((dt) => dt.ref_id === at.targetRef) + let ct = !1 + ;((st == null ? void 0 : st.node_type) === 'guest' || + (st == null ? void 0 : st.node_type) === 'topic' || + (lt == null ? void 0 : lt.node_type) === 'guest' || + (lt == null ? void 0 : lt.node_type) === 'topic') && + (ct = !0) + const ut = new Vector3( + (st == null ? void 0 : st.x) || 0, + (st == null ? void 0 : st.y) || 0, + (st == null ? void 0 : st.z) || 0, + ), + ht = new Vector3( + (lt == null ? void 0 : lt.x) || 0, + (lt == null ? void 0 : lt.y) || 0, + (lt == null ? void 0 : lt.z) || 0, + ) + return { ...at, onlyVisibleOnSelect: ct, sourcePosition: ut, targetPosition: ht } + }) + return rt.sort((at, st) => (st.weight || 0) - (at.weight || 0)), { nodes: rt, links: ot } + }, + getGraphDataPositions = (tt, et) => + tt === 'split' + ? generateSplitGraphPositions(et) + : tt === 'sphere' + ? generateSphereGraphPositions(et) + : tt === 'earth' + ? generateEarthGraphPositions(et) + : generateForceGraphPositions(et), + defaultData$8 = { links: [], nodes: [] }, + shouldIncludeTopics = !0, + maxScale = 26, + fetchGraphData = async (tt) => { + try { + return getGraphData(tt) + } catch { + return defaultData$8 + } + }, + fetchNodes = async (tt) => { + if (!tt) + try { + return await api.get('/prediction/content/latest') + } catch (nt) { + return console.error(nt), mock + } + if (isDevelopment || isE2E) return await api.get(`/v2/searching?word=${tt}&free=true`) + const et = await getLSat() + try { + return await api.get(`/v2/search?word=${tt}`, { Authorization: et }) + } catch (nt) { + if (nt.status === 402) { + const rt = distExports.Lsat.fromHeader(nt.headers.get('www-authenticate')) + return await payLsat(rt), fetchNodes(tt) + } + throw nt + } + }, + getTrends = async () => { + const tt = '/get_trends' + return await api.get(tt) + }, + getSentimentData = async (tt) => { + const et = tt && new URLSearchParams(tt), + nt = et ? `/sentiments?${et.toString()}` : '/sentiments' + if (isE2E) return await api.get(nt) + const rt = await getLSat() + try { + return await api.get(nt, { Authorization: rt }) + } catch (it) { + if (it.status === 402) { + const ot = distExports.Lsat.fromHeader(it.headers.get('www-authenticate')) + return await payLsat(ot), getSentimentData(tt) + } + throw it + } + }, + postInstagraph = async (tt) => { + const et = await getLSat() + try { + await api.post('/instagraph', JSON.stringify(tt), { Authorization: et }) + } catch (nt) { + if (nt.status === 402) { + const rt = distExports.Lsat.fromHeader(nt.headers.get('www-authenticate')) + await payLsat(rt), await postInstagraph(tt) + return + } + throw nt + } + }, + postTeachMe = async (tt) => { + const et = await getLSat() + try { + await api.post('/teachme', JSON.stringify(tt), { Authorization: et }) + } catch (nt) { + if (nt.status === 402) { + const rt = distExports.Lsat.fromHeader(nt.headers.get('www-authenticate')) + await payLsat(rt), await postTeachMe(tt) + return + } + throw nt + } + }, + postAskQuestion = async (tt) => { + const et = await getLSat() + try { + await api.post('/ask_question', JSON.stringify(tt), { Authorization: et }) + } catch (nt) { + if (nt.status === 402) { + const rt = distExports.Lsat.fromHeader(nt.headers.get('www-authenticate')) + await payLsat(rt), await postAskQuestion(tt) + return + } + throw nt + } + }, + getNodeScale = (tt) => { + switch (tt.node_type) { + case 'guest': + case 'episode': + case 'document': + return 2 + case 'show': + return 3 + default: + return 1.5 + } + } + function generateTopicNodesFromMap(tt, et) { + Object.entries(tt).forEach(([nt, rt], it) => { + const { children: ot, position: at } = rt, + { x: st, y: lt, z: ct } = at, + ut = ot.length * 2 > maxScale ? maxScale : ot.length * 2, + ht = `topic_node_${it}` + et({ + x: st, + y: lt, + z: ct, + children: ot, + colors: ['#000'], + id: ht, + label: nt, + name: nt, + type: 'topic', + node_type: 'topic', + ref_id: ht, + scale: ut, + show_title: nt, + text: nt, + weight: 0, + }) + }) + } + function generateGuestNodesFromMap(tt, et) { + Object.entries(tt).forEach(([nt, rt], it) => { + const ot = rt.children, + at = ot.length * 2 > maxScale ? maxScale : ot.length * 2, + st = nt || `guestnode_${it}`, + lt = { + ...rt, + x: 0, + y: 0, + z: 0, + colors: ['#000'], + id: st, + image_url: rt.imageUrl, + label: rt.name, + name: rt.name, + node_type: 'guest', + ref_id: st, + scale: at, + show_title: rt.name, + text: rt.twitterHandle, + type: 'guest', + weight: 0, + } + et(lt) + }) + } + const getGraphData = async (tt) => { + const { graphStyle: et } = useDataStore.getState() + let nt = [] + const rt = {}, + it = {} + try { + const ot = await fetchNodes(tt), + at = Array.isArray(ot.data_series) ? ot.data_series : [], + st = [...ot.exact, ...ot.related, ...at] + let lt = 0 + st.length && + st.forEach((dt, pt) => { + var yt + if ( + (dt.weight && lt < dt.weight && (lt = dt.weight), + ['data_series', 'document', 'tweet'].includes(dt.node_type)) + ) { + const bt = { data_series: 'node_data.webp', document: 'document.jpeg', tweet: 'twitter_placeholder.png' } + nt.push({ + ...dt, + scale: getNodeScale(dt), + id: dt.tweet_id || `${dt.unique_id}_${pt}`, + ref_id: dt.tweet_id || `${dt.unique_id}_${pt}`, + image_url: bt[dt.node_type], + type: dt.type || dt.node_type, + }) + return + } + if (nt.find((bt) => bt.ref_id === dt.ref_id)) return + const gt = + (yt = dt.image_url) == null + ? void 0 + : yt.replace(AWS_IMAGE_BUCKET_URL, CLOUDFRONT_IMAGE_BUCKET_URL).replace('.jpg', '_s.jpg') + nt.push({ + ...dt, + scale: getNodeScale(dt), + id: dt.ref_id || dt.tweet_id || dt.id, + image_url: gt, + type: dt.type || dt.node_type, + }), + dt.node_type === 'episode' && + dt.ref_id && + (dt.guests || []).forEach((vt) => { + var kt + const xt = vt + xt.name && + xt.ref_id && + dt.ref_id && + (it[xt.ref_id] = { + children: [...(((kt = it[xt.ref_id]) == null ? void 0 : kt.children) || []), dt.ref_id], + imageUrl: xt.profile_picture || '', + name: xt.name, + twitterHandle: xt.twitter_handle, + }) + }) + }), + generateGuestNodesFromMap(it, (dt) => { + nt.push(dt) + }), + st.forEach((dt) => { + const { topics: pt, ref_id: mt, show_title: gt } = dt + pt && + pt.forEach((yt) => { + yt !== tt && + gt && + (rt[yt] && !rt[yt].children.includes(mt || gt) + ? rt[yt].children.push(mt || gt) + : (rt[yt] = { position: new Vector3(0, 0, 0), children: [mt || gt] })) + }) + }), + shouldIncludeTopics && + generateTopicNodesFromMap(rt, (dt) => { + nt.push(dt) + }) + const ct = getGraphDataPositions(et, nt), + { links: ut } = ct + ;(nt = ct.nodes), nt.sort((dt, pt) => (pt.weight || 0) - (dt.weight || 0)) + const ht = getMaxSuperficialWeightPerNodeType(nt, ut) + return (nt = addWeightNormalizationToNodes(lt, ht, nt, ut)), { links: ut, nodes: nt } + } catch (ot) { + return console.error(ot), defaultData$8 + } + }, + getSegmentColor = (tt, et) => + tt === 'topic' || et === 'topic' + ? NODE_RELATIVE_HIGHLIGHT_COLORS.topics.segmentColor + : tt === 'guest' || et === 'guest' + ? NODE_RELATIVE_HIGHLIGHT_COLORS.guests.segmentColor + : NODE_RELATIVE_HIGHLIGHT_COLORS.children.segmentColor, + generateLinksFromNodeData = (tt, et, nt) => { + const rt = [] + return ( + tt.forEach((it) => { + const { children: ot, guests: at } = it + ot == null || + ot.forEach((st) => { + if (it.ref_id) { + const lt = tt.find((ht) => ht.ref_id === st) || null + if (!lt) return + const ct = new Vector3(it.x || 0, it.y || 0, it.z || 0), + ut = new Vector3( + (lt == null ? void 0 : lt.x) || 0, + (lt == null ? void 0 : lt.y) || 0, + (lt == null ? void 0 : lt.z) || 0, + ) + rt.push({ + onlyVisibleOnSelect: et, + color: getSegmentColor(it.node_type, (lt == null ? void 0 : lt.node_type) || ''), + source: it.ref_id, + sourceRef: it.ref_id, + sourcePosition: ct, + target: st, + targetRef: st, + targetPosition: ut, + }) + } + }), + at == null || + at.forEach((st) => { + if (st && typeof st != 'string' && it.ref_id) { + const lt = tt.find((ht) => ht.ref_id === (st == null ? void 0 : st.ref_id)) || null + if (!lt) return + const ct = new Vector3(it.x || 0, it.y || 0, it.z || 0), + ut = new Vector3( + (lt == null ? void 0 : lt.x) || 0, + (lt == null ? void 0 : lt.y) || 0, + (lt == null ? void 0 : lt.z) || 0, + ) + rt.push({ + onlyVisibleOnSelect: nt, + color: getSegmentColor(it.node_type, 'guest'), + source: it.ref_id, + sourceRef: it.ref_id, + sourcePosition: ct, + target: st == null ? void 0 : st.ref_id, + targetRef: st == null ? void 0 : st.ref_id, + targetPosition: ut, + }) + } + }) + }), + rt + ) + }, + addWeightNormalizationToNodes = (tt, et, nt, rt) => + nt.map((it) => { + let ot = (it.weight || 0) / tt + return ( + !it.weight && et[it.node_type] && (ot = getSuperficialNodeWeight(it, rt) / et[it.node_type]), + { ...it, weight: ot } + ) + }), + saveConsumedContent = async (tt) => { + await executeIfProd(async () => { + if (!(await distExports$1.enable(!0))) { + console.error('Sphinx enable failed, means no pubkey and no budget (including budget of 0)') + return + } + try { + await distExports$1.saveGraphData({ + metaData: { date: Math.floor(new Date().getTime() / 1e3), ...tt }, + type: 'second_brain_consumed_content', + }) + } catch (nt) { + console.warn(nt) + } + }) + }, + saveSearchTerm = async () => { + await executeIfProd(async () => { + ;(await distExports$1.enable(!0)) || + console.log('Sphinx enable failed, means no pubkey and no budget (including budget of 0)') + }) + }, + graphStyles = ['split', 'force', 'sphere', 'earth'], + defaultData$7 = { + categoryFilter: null, + data: null, + selectionGraphData: { nodes: [], links: [] }, + scrollEventsDisabled: !1, + disableCameraRotation: !1, + graphRadius: isChileGraph ? 1600 : 3056, + graphStyle: 'split', + isFetching: !1, + isTimestampLoaded: !1, + queuedSources: null, + topics: null, + hoveredNode: null, + selectedNode: null, + selectedTimestamp: null, + sources: null, + sphinxModalIsOpen: !1, + cameraFocusTrigger: !1, + selectedNodeRelativeIds: [], + nearbyNodeIds: [], + showSelectionGraph: !1, + showTeachMe: !1, + hideNodeDetails: !1, + }, + useDataStore = react((tt, et) => ({ + ...defaultData$7, + fetchData: async (nt) => { + if (et().isFetching) return + tt({ isFetching: !0, sphinxModalIsOpen: !0 }) + const rt = await fetchGraphData(nt || '') + nt && (await saveSearchTerm()), + tt({ + data: rt, + isFetching: !1, + sphinxModalIsOpen: !1, + disableCameraRotation: !1, + nearbyNodeIds: [], + selectedNodeRelativeIds: [], + showSelectionGraph: !1, + showTeachMe: !1, + }) + }, + setIsFetching: (nt) => tt({ isFetching: nt }), + setData: (nt) => tt({ data: nt }), + setSelectionData: (nt) => tt({ selectionGraphData: nt }), + setScrollEventsDisabled: (nt) => tt({ scrollEventsDisabled: nt }), + setCategoryFilter: (nt) => tt({ categoryFilter: nt }), + setDisableCameraRotation: (nt) => tt({ disableCameraRotation: nt }), + setGraphRadius: (nt) => tt({ graphRadius: nt }), + setGraphStyle: (nt) => tt({ graphStyle: nt }), + setQueuedSources: (nt) => tt({ queuedSources: nt }), + setTopics: (nt) => tt({ topics: nt }), + setHoveredNode: (nt) => tt({ hoveredNode: nt }), + setSelectedNode: (nt) => { + const rt = et().selectedNode + if ((rt == null ? void 0 : rt.ref_id) !== (nt == null ? void 0 : nt.ref_id)) { + const { data: it } = et(), + ot = + (it == null + ? void 0 + : it.nodes + .filter((at) => at.ref_id && nodesAreRelatives(at, nt)) + .map((at) => (at == null ? void 0 : at.ref_id) || '')) || [] + tt({ + hoveredNode: null, + isTimestampLoaded: !1, + selectedNode: nt, + disableCameraRotation: !0, + selectedNodeRelativeIds: ot, + }) + } + }, + setSelectedTimestamp: (nt) => tt({ selectedTimestamp: nt }), + setSources: (nt) => tt({ sources: nt }), + setSphinxModalOpen: (nt) => tt({ sphinxModalIsOpen: nt }), + setCameraFocusTrigger: (nt) => tt({ cameraFocusTrigger: nt }), + setNearbyNodeIds: (nt) => { + const rt = et().nearbyNodeIds + ;(nt.length !== rt.length || nt[0] !== rt[0]) && tt({ nearbyNodeIds: nt }) + }, + setShowSelectionGraph: (nt) => tt({ showSelectionGraph: nt }), + setHideNodeDetails: (nt) => tt({ hideNodeDetails: nt }), + setTeachMe: (nt) => tt({ showTeachMe: nt }), + })), + useSelectedNode = () => useDataStore((tt) => tt.selectedNode), + setIsTimestampLoaded = (tt) => useDataStore.setState({ isTimestampLoaded: tt }), + topupFromToast = async () => { + try { + const tt = await distExports$1.topup() + if (!tt) throw new Error('Topup failed') + if (tt.budget < 5) throw new Error('You set a budget of less than 5 sats') + toast(jsxRuntimeExports.jsx(ToastMessage, { message: `You set a budget of ${tt.budget} sats` }), { + icon: !1, + position: toast.POSITION.BOTTOM_CENTER, + type: 'success', + }) + } catch (tt) { + tt instanceof Error && + toast(jsxRuntimeExports.jsx(ToastMessage, { message: tt.message }), { + icon: !1, + position: toast.POSITION.BOTTOM_CENTER, + type: 'error', + }) + } + }, + ToastMessage = ({ message: tt }) => + tt === BOOST_ERROR_BUDGET + ? jsxRuntimeExports.jsxs('div', { + children: [ + tt, + jsxRuntimeExports.jsx(ButtonWrapper, { + onClick: topupFromToast, + type: 'button', + children: jsxRuntimeExports.jsx(Text$3, { color: 'white', kind: 'medium', children: 'Topup' }), + }), + ], + }) + : jsxRuntimeExports.jsx('div', { children: tt }), + ButtonWrapper = styled$4.button` + background: ${colors.gray200}; + border: 1px solid ${colors.white}; + border-radius: 2px; + margin: 10px; + padding: 5px; - precision mediump float; - precision mediump int; + &:hover { + cursor: pointer; + background-color: ${colors.gray300}; + } +` + var lib$1 = {} + const require$$0 = getAugmentedNamespace(emotionStyledBase_browser_esm) + var ClickOutside = {} + ;(function (tt) { + ;(tt.__esModule = !0), (tt.default = void 0) + var et = nt(reactExports) + nt(propTypesExports) + function nt(ht) { + return ht && ht.__esModule ? ht : { default: ht } + } + function rt(ht) { + if (ht === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called") + return ht + } + function it(ht, dt) { + ;(ht.prototype = Object.create(dt.prototype)), (ht.prototype.constructor = ht), ot(ht, dt) + } + function ot(ht, dt) { + return ( + (ot = Object.setPrototypeOf + ? Object.setPrototypeOf.bind() + : function (pt, mt) { + return (pt.__proto__ = mt), pt + }), + ot(ht, dt) + ) + } + function at(ht, dt, pt) { + return ( + (dt = st(dt)), + dt in ht + ? Object.defineProperty(ht, dt, { value: pt, enumerable: !0, configurable: !0, writable: !0 }) + : (ht[dt] = pt), + ht + ) + } + function st(ht) { + var dt = lt(ht, 'string') + return typeof dt == 'symbol' ? dt : dt + '' + } + function lt(ht, dt) { + if (typeof ht != 'object' || ht === null) return ht + var pt = ht[Symbol.toPrimitive] + if (pt !== void 0) { + var mt = pt.call(ht, dt || 'default') + if (typeof mt != 'object') return mt + throw new TypeError('@@toPrimitive must return a primitive value.') + } + return (dt === 'string' ? String : Number)(ht) + } + var ct = (function (ht) { + function dt() { + for (var mt, gt = arguments.length, yt = Array(gt), bt = 0; bt < gt; bt++) yt[bt] = arguments[bt] + return ( + (mt = ht.call.apply(ht, [this].concat(yt)) || this), + at(rt(mt), 'container', et.default.createRef()), + at(rt(mt), 'handleClick', function (vt) { + var xt = mt.container.current, + kt = vt.target, + St = mt.props.onClickOutside + ;((xt && xt === kt) || (xt && !xt.contains(kt))) && St(vt) + }), + mt + ) + } + it(dt, ht) + var pt = dt.prototype + return ( + (pt.componentDidMount = function () { + document.addEventListener('click', this.handleClick, !0) + }), + (pt.componentWillUnmount = function () { + document.removeEventListener('click', this.handleClick, !0) + }), + (pt.render = function () { + var gt = this.props, + yt = gt.className, + bt = gt.children + return et.default.createElement('div', { className: yt, ref: this.container }, bt) + }), + dt + ) + })(et.default.Component), + ut = ct + tt.default = ut + })(ClickOutside) + var Content$2 = {}, + Option = {}, + util = {} + ;(function (tt) { + ;(tt.__esModule = !0), + (tt.valueExistInSelected = + tt.isomorphicWindow = + tt.isEqual = + tt.hexToRGBA = + tt.getProp = + tt.getByPath = + tt.debounce = + void 0) + var et = function (lt, ct, ut) { + return !!ct.find(function (ht) { + return ot(ht, ut.valueField) === lt || ot(ht, ut.labelField) === lt + }) + } + tt.valueExistInSelected = et + var nt = function (lt, ct) { + lt.length === 4 && (lt = '' + lt[1] + lt[1] + lt[2] + lt[2] + lt[3] + lt[3] + '}') + var ut = parseInt(lt.slice(1, 3), 16), + ht = parseInt(lt.slice(3, 5), 16), + dt = parseInt(lt.slice(5, 7), 16) + return 'rgba(' + ut + ', ' + ht + ', ' + dt + (ct && ', ' + ct) + ')' + } + tt.hexToRGBA = nt + var rt = function (lt, ct) { + ct === void 0 && (ct = 0) + var ut + return function () { + for (var ht = arguments.length, dt = Array(ht), pt = 0; pt < ht; pt++) dt[pt] = arguments[pt] + ut && clearTimeout(ut), + (ut = setTimeout(function () { + lt.apply(void 0, dt), (ut = null) + }, ct)) + } + } + tt.debounce = rt + var it = function (lt, ct) { + return JSON.stringify(lt) === JSON.stringify(ct) + } + tt.isEqual = it + var ot = function (lt, ct) { + return ct + ? ct.split('.').reduce(function (ut, ht) { + return ut[ht] + }, lt) + : void 0 + } + tt.getByPath = ot + var at = function (lt, ct, ut) { + if (!ct) return lt + var ht = Array.isArray(ct) + ? ct + : ct.split('.').filter(function (dt) { + return dt.length + }) + return ht.length ? at(lt[ht.shift()], ht, ut) : lt === void 0 ? ut : lt + } + tt.getProp = at + var st = function () { + return typeof window > 'u' && (commonjsGlobal.window = {}), window + } + tt.isomorphicWindow = st + })(util) + var constants$2 = {} + ;(function (tt) { + ;(tt.__esModule = !0), (tt.LIB_NAME = void 0), (tt.LIB_NAME = 'react-dropdown-select') + })(constants$2) + ;(function (tt) { + ;(tt.__esModule = !0), (tt.default = void 0) + var et = ot(require$$0), + nt = ot(reactExports), + rt = util, + it = constants$2 + function ot(ct) { + return ct && ct.__esModule ? ct : { default: ct } + } + var at = function (ct) { + var ut = ct.item, + ht = ct.props, + dt = ct.state, + pt = ct.methods + return ut && ht.optionRenderer + ? ht.optionRenderer({ item: ut, props: ht, state: dt, methods: pt }) + : nt.default.createElement( + st, + { + role: 'listitem', + disabled: ht.disabled, + direction: ht.direction, + className: it.LIB_NAME + '-option', + color: ht.color, + }, + nt.default.createElement( + 'span', + { className: it.LIB_NAME + '-option-label' }, + (0, rt.getByPath)(ut, ht.labelField), + ), + nt.default.createElement( + 'span', + { + className: it.LIB_NAME + '-option-remove', + onClick: function (gt) { + return pt.removeItem(gt, ut, ht.closeOnSelect) + }, + }, + '×', + ), + ) + }, + st = (0, et.default)('span', { target: 'e1l4eby50' })( + 'padding:0 5px;border-radius:2px;line-height:21px;margin:3px 0 3px 5px;background:', + function (ct) { + var ut = ct.color + return ut + }, + ';color:#fff;display:flex;flex-direction:', + function (ct) { + var ut = ct.direction + return ut === 'rtl' ? 'row-reverse' : 'row' + }, + ';.', + it.LIB_NAME, + '-option-remove{cursor:pointer;width:22px;height:22px;display:inline-block;text-align:center;margin:0 -5px 0 0px;border-radius:0 3px 3px 0;:hover{color:tomato;}}:hover,:hover>span{opacity:0.9;}', + ), + lt = at + tt.default = lt + })(Option) + var Input$1 = {} + ;(function (tt) { + ;(tt.__esModule = !0), (tt.default = void 0) + var et = st(require$$0), + nt = at(reactExports), + rt = util + at(propTypesExports) + var it = constants$2 + function ot(vt) { + if (typeof WeakMap != 'function') return null + var xt = new WeakMap(), + kt = new WeakMap() + return (ot = function (St) { + return St ? kt : xt + })(vt) + } + function at(vt, xt) { + if (!xt && vt && vt.__esModule) return vt + if (vt === null || (typeof vt != 'object' && typeof vt != 'function')) return { default: vt } + var kt = ot(xt) + if (kt && kt.has(vt)) return kt.get(vt) + var St = {}, + Tt = Object.defineProperty && Object.getOwnPropertyDescriptor + for (var At in vt) + if (At != 'default' && Object.prototype.hasOwnProperty.call(vt, At)) { + var Et = Tt ? Object.getOwnPropertyDescriptor(vt, At) : null + Et && (Et.get || Et.set) ? Object.defineProperty(St, At, Et) : (St[At] = vt[At]) + } + return (St.default = vt), kt && kt.set(vt, St), St + } + function st(vt) { + return vt && vt.__esModule ? vt : { default: vt } + } + function lt(vt) { + if (vt === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called") + return vt + } + function ct(vt, xt) { + ;(vt.prototype = Object.create(xt.prototype)), (vt.prototype.constructor = vt), ut(vt, xt) + } + function ut(vt, xt) { + return ( + (ut = Object.setPrototypeOf + ? Object.setPrototypeOf.bind() + : function (kt, St) { + return (kt.__proto__ = St), kt + }), + ut(vt, xt) + ) + } + function ht(vt, xt, kt) { + return ( + (xt = dt(xt)), + xt in vt + ? Object.defineProperty(vt, xt, { value: kt, enumerable: !0, configurable: !0, writable: !0 }) + : (vt[xt] = kt), + vt + ) + } + function dt(vt) { + var xt = pt(vt, 'string') + return typeof xt == 'symbol' ? xt : xt + '' + } + function pt(vt, xt) { + if (typeof vt != 'object' || vt === null) return vt + var kt = vt[Symbol.toPrimitive] + if (kt !== void 0) { + var St = kt.call(vt, xt || 'default') + if (typeof St != 'object') return St + throw new TypeError('@@toPrimitive must return a primitive value.') + } + return (xt === 'string' ? String : Number)(vt) + } + var mt = function (vt, xt) { + var kt = vt.addPlaceholder, + St = vt.searchable, + Tt = vt.placeholder, + At = xt.values && xt.values.length === 0, + Et = xt.values && 0 < xt.values.length + return Et && kt && St ? kt : At ? Tt : '' + }, + gt = (function (vt) { + function xt() { + for (var St, Tt = arguments.length, At = Array(Tt), Et = 0; Et < Tt; Et++) At[Et] = arguments[Et] + return ( + (St = vt.call.apply(vt, [this].concat(At)) || this), + ht(lt(St), 'input', nt.default.createRef()), + ht(lt(St), 'onBlur', function ($t) { + return $t.stopPropagation(), St.props.state.dropdown ? St.input.current.focus() : St.input.current.blur() + }), + ht(lt(St), 'handleKeyPress', function ($t) { + var Dt = St.props, + jt = Dt.props, + Pt = Dt.state, + Ct = Dt.methods + return ( + jt.create && + $t.key === 'Enter' && + !(0, rt.valueExistInSelected)(Pt.search, [].concat(Pt.values, jt.options), St.props) && + Pt.search && + Pt.cursor === null && + Ct.createNew(Pt.search) + ) + }), + St + ) + } + ct(xt, vt) + var kt = xt.prototype + return ( + (kt.componentDidUpdate = function (Tt) { + ;(this.props.state.dropdown || + (Tt.state.dropdown !== this.props.state.dropdown && this.props.state.dropdown) || + this.props.props.autoFocus) && + this.input.current.focus(), + Tt.state.dropdown === this.props.state.dropdown || this.props.state.dropdown || this.input.current.blur() + }), + (kt.render = function () { + var Tt = this.props, + At = Tt.props, + Et = Tt.state, + $t = Tt.methods + return At.inputRenderer + ? At.inputRenderer({ props: At, state: Et, methods: $t, inputRef: this.input }) + : nt.default.createElement(yt, { + ref: this.input, + tabIndex: '-1', + onFocus: function (jt) { + return jt.stopPropagation() + }, + className: it.LIB_NAME + '-input', + size: $t.getInputSize(), + value: Et.search, + readOnly: !At.searchable, + onClick: function () { + return $t.dropDown('open') + }, + onKeyPress: this.handleKeyPress, + onChange: $t.setSearch, + onBlur: this.onBlur, + placeholder: mt(At, Et), + disabled: At.disabled, + }) + }), + xt + ) + })(nt.Component), + yt = (0, et.default)('input', { target: 'e11wid6y0' })( + 'line-height:inherit;border:none;margin-left:5px;background:transparent;padding:0;width:calc(', + function (vt) { + var xt = vt.size + return xt + 'ch' + }, + ' + 5px);font-size:smaller;', + function (vt) { + var xt = vt.readOnly + return xt && 'cursor: pointer;' + }, + ' :focus{outline:none;}', + ), + bt = gt + tt.default = bt + })(Input$1) + ;(function (tt) { + ;(tt.__esModule = !0), (tt.default = void 0) + var et = st(require$$0), + nt = st(reactExports), + rt = st(Option), + it = st(Input$1), + ot = constants$2, + at = util + function st(ht) { + return ht && ht.__esModule ? ht : { default: ht } + } + var lt = function (ht) { + var dt = ht.props, + pt = ht.state, + mt = ht.methods + return nt.default.createElement( + ct, + { + className: + ot.LIB_NAME + '-content ' + (dt.multi ? ot.LIB_NAME + '-type-multi' : ot.LIB_NAME + '-type-single'), + onClick: function (yt) { + yt.stopPropagation(), mt.dropDown('open') + }, + }, + dt.contentRenderer + ? dt.contentRenderer({ props: dt, state: pt, methods: mt }) + : nt.default.createElement( + nt.default.Fragment, + null, + dt.multi + ? pt.values && + pt.values.map(function (gt) { + return nt.default.createElement(rt.default, { + key: '' + (0, at.getByPath)(gt, dt.valueField) + (0, at.getByPath)(gt, dt.labelField), + item: gt, + state: pt, + props: dt, + methods: mt, + }) + }) + : pt.values && + 0 < pt.values.length && + nt.default.createElement('span', null, (0, at.getByPath)(pt.values[0], dt.labelField)), + nt.default.createElement(it.default, { props: dt, methods: mt, state: pt }), + ), + ) + }, + ct = (0, et.default)('div', { target: 'e1gn6jc30' })({ + name: '1m5113o', + styles: 'display:flex;flex:1;flex-wrap:wrap', + }), + ut = lt + tt.default = ut + })(Content$2) + var Dropdown = {}, + NoData = {} + ;(function (tt) { + ;(tt.__esModule = !0), (tt.default = void 0) + var et = it(require$$0), + nt = it(reactExports), + rt = constants$2 + function it(lt) { + return lt && lt.__esModule ? lt : { default: lt } + } + var ot = function (lt) { + var ct = lt.props, + ut = lt.state, + ht = lt.methods + return ct.noDataRenderer + ? ct.noDataRenderer({ props: ct, state: ut, methods: ht }) + : nt.default.createElement(at, { className: rt.LIB_NAME + '-no-data', color: ct.color }, ct.noDataLabel) + }, + at = (0, et.default)('div', { target: 'e1l5ho1t0' })( + 'padding:10px;text-align:center;color:', + function (lt) { + var ct = lt.color + return ct + }, + ';', + ), + st = ot + tt.default = st + })(NoData) + var Item = {} + ;(function (tt) { + ;(tt.__esModule = !0), (tt.default = void 0) + var et = st(require$$0), + nt = at(reactExports), + rt = util + at(propTypesExports) + var it = constants$2 + function ot(bt) { + if (typeof WeakMap != 'function') return null + var vt = new WeakMap(), + xt = new WeakMap() + return (ot = function (kt) { + return kt ? xt : vt + })(bt) + } + function at(bt, vt) { + if (!vt && bt && bt.__esModule) return bt + if (bt === null || (typeof bt != 'object' && typeof bt != 'function')) return { default: bt } + var xt = ot(vt) + if (xt && xt.has(bt)) return xt.get(bt) + var kt = {}, + St = Object.defineProperty && Object.getOwnPropertyDescriptor + for (var Tt in bt) + if (Tt != 'default' && Object.prototype.hasOwnProperty.call(bt, Tt)) { + var At = St ? Object.getOwnPropertyDescriptor(bt, Tt) : null + At && (At.get || At.set) ? Object.defineProperty(kt, Tt, At) : (kt[Tt] = bt[Tt]) + } + return (kt.default = bt), xt && xt.set(bt, kt), kt + } + function st(bt) { + return bt && bt.__esModule ? bt : { default: bt } + } + function lt(bt) { + if (bt === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called") + return bt + } + function ct(bt, vt) { + ;(bt.prototype = Object.create(vt.prototype)), (bt.prototype.constructor = bt), ut(bt, vt) + } + function ut(bt, vt) { + return ( + (ut = Object.setPrototypeOf + ? Object.setPrototypeOf.bind() + : function (xt, kt) { + return (xt.__proto__ = kt), xt + }), + ut(bt, vt) + ) + } + function ht(bt, vt, xt) { + return ( + (vt = dt(vt)), + vt in bt + ? Object.defineProperty(bt, vt, { value: xt, enumerable: !0, configurable: !0, writable: !0 }) + : (bt[vt] = xt), + bt + ) + } + function dt(bt) { + var vt = pt(bt, 'string') + return typeof vt == 'symbol' ? vt : vt + '' + } + function pt(bt, vt) { + if (typeof bt != 'object' || bt === null) return bt + var xt = bt[Symbol.toPrimitive] + if (xt !== void 0) { + var kt = xt.call(bt, vt || 'default') + if (typeof kt != 'object') return kt + throw new TypeError('@@toPrimitive must return a primitive value.') + } + return (vt === 'string' ? String : Number)(bt) + } + var mt = (function (bt) { + function vt() { + for (var kt, St = arguments.length, Tt = Array(St), At = 0; At < St; At++) Tt[At] = arguments[At] + return (kt = bt.call.apply(bt, [this].concat(Tt)) || this), ht(lt(kt), 'item', nt.default.createRef()), kt + } + ct(vt, bt) + var xt = vt.prototype + return ( + (xt.componentDidMount = function () { + var St = this.props, + Tt = St.props, + At = St.methods + this.item.current && + !Tt.multi && + Tt.keepSelectedInList && + At.isSelected(this.props.item) && + this.item.current.scrollIntoView({ block: 'nearest', inline: 'start' }) + }), + (xt.componentDidUpdate = function () { + this.props.state.cursor === this.props.itemIndex && + this.item.current && + this.item.current.scrollIntoView({ behavior: 'smooth', block: 'nearest', inline: 'start' }) + }), + (xt.render = function () { + var St = this.props, + Tt = St.props, + At = St.state, + Et = St.methods, + $t = St.item, + Dt = St.itemIndex + return Tt.itemRenderer + ? Tt.itemRenderer({ item: $t, itemIndex: Dt, props: Tt, state: At, methods: Et }) + : !Tt.keepSelectedInList && Et.isSelected($t) + ? null + : nt.default.createElement( + gt, + { + role: 'option', + ref: this.item, + 'aria-selected': Et.isSelected($t), + 'aria-disabled': $t.disabled, + 'aria-label': (0, rt.getByPath)($t, Tt.labelField), + disabled: $t.disabled, + key: '' + (0, rt.getByPath)($t, Tt.valueField) + (0, rt.getByPath)($t, Tt.labelField), + tabIndex: '-1', + className: + it.LIB_NAME + + '-item ' + + (Et.isSelected($t) ? it.LIB_NAME + '-item-selected' : '') + + ' ' + + (At.cursor === Dt ? it.LIB_NAME + '-item-active' : '') + + ' ' + + ($t.disabled ? it.LIB_NAME + '-item-disabled' : ''), + onClick: $t.disabled + ? void 0 + : function () { + return Et.addItem($t) + }, + onKeyPress: $t.disabled + ? void 0 + : function () { + return Et.addItem($t) + }, + color: Tt.color, + }, + (0, rt.getByPath)($t, Tt.labelField), + ' ', + $t.disabled && nt.default.createElement('ins', null, Tt.disabledLabel), + ) + }), + vt + ) + })(nt.Component), + gt = (0, et.default)('span', { target: 'evc32pp0' })( + 'padding:5px 10px;cursor:pointer;border-bottom:1px solid #fff;&.', + it.LIB_NAME, + '-item-active{border-bottom:1px solid #fff;', + function (bt) { + var vt = bt.disabled, + xt = bt.color + return !vt && xt && 'background: ' + (0, rt.hexToRGBA)(xt, 0.1) + ';' + }, + ';}:hover,:focus{background:', + function (bt) { + var vt = bt.color + return vt && (0, rt.hexToRGBA)(vt, 0.1) + }, + ';outline:none;}&.', + it.LIB_NAME, + '-item-selected{', + function (bt) { + var vt = bt.disabled, + xt = bt.color + return vt + ? ` + background: #f2f2f2; + color: #ccc; + ` + : ` + background: ` + + xt + + `; + color: #fff; + border-bottom: 1px solid #fff; + ` + }, + ';}', + function (bt) { + var vt = bt.disabled + return vt + ? ` + background: #f2f2f2; + color: #ccc; - uniform float flipEnvMap; + ins { + text-decoration: none; + border:1px solid #ccc; + border-radius: 2px; + padding: 0px 3px; + font-size: x-small; + text-transform: uppercase; + } + ` + : '' + }, + ';', + ), + yt = mt + tt.default = yt + })(Item) + ;(function (tt) { + ;(tt.__esModule = !0), (tt.default = void 0) + var et = st(require$$0), + nt = st(reactExports), + rt = constants$2, + it = st(NoData), + ot = st(Item), + at = util + function st(mt) { + return mt && mt.__esModule ? mt : { default: mt } + } + var lt = function (mt, gt) { + var yt = gt.getSelectRef().getBoundingClientRect(), + bt = yt.bottom + parseInt(mt.dropdownHeight, 10) + parseInt(mt.dropdownGap, 10) + return mt.dropdownPosition === 'auto' + ? bt > (0, at.isomorphicWindow)().innerHeight && bt > yt.top + ? 'top' + : 'bottom' + : mt.dropdownPosition + }, + ct = function (mt) { + var gt = mt.props, + yt = mt.state, + bt = mt.methods + return nt.default.createElement( + ut, + { + tabIndex: '-1', + 'aria-expanded': 'true', + role: 'list', + dropdownPosition: lt(gt, bt), + selectBounds: yt.selectBounds, + portal: gt.portal, + dropdownGap: gt.dropdownGap, + dropdownHeight: gt.dropdownHeight, + className: rt.LIB_NAME + '-dropdown ' + rt.LIB_NAME + '-dropdown-position-' + lt(gt, bt), + }, + gt.dropdownRenderer + ? gt.dropdownRenderer({ props: gt, state: yt, methods: bt }) + : nt.default.createElement( + nt.default.Fragment, + null, + gt.create && + yt.search && + !(0, at.valueExistInSelected)(yt.search, [].concat(yt.values, gt.options), gt) && + nt.default.createElement( + ht, + { + role: 'button', + className: rt.LIB_NAME + '-dropdown-add-new', + color: gt.color, + onClick: function () { + return bt.createNew(yt.search) + }, + }, + gt.createNewLabel.replace('{search}', '"' + yt.search + '"'), + ), + yt.searchResults.length === 0 + ? nt.default.createElement(it.default, { + className: rt.LIB_NAME + '-no-data', + state: yt, + props: gt, + methods: bt, + }) + : yt.searchResults.map(function (vt, xt) { + return nt.default.createElement(ot.default, { + key: vt[gt.valueField].toString(), + item: vt, + itemIndex: xt, + state: yt, + props: gt, + methods: bt, + }) + }), + gt.selectAll && + gt.options && + gt.multi && + nt.default.createElement( + dt, + { + role: 'button', + className: rt.LIB_NAME + '-dropdown-select-all', + color: gt.color, + onClick: function () { + return bt.areAllSelected() ? bt.clearAll() : bt.selectAll() + }, + }, + bt.areAllSelected() ? gt.clearAllLabel : gt.selectAllLabel, + ), + ), + ) + }, + ut = (0, et.default)('div', { target: 'e1qjn9k92' })( + 'position:absolute;', + function (mt) { + var gt = mt.selectBounds, + yt = mt.dropdownGap, + bt = mt.dropdownPosition + return bt === 'top' ? 'bottom: ' + (gt.height + 2 + yt) + 'px' : 'top: ' + (gt.height + 2 + yt) + 'px' + }, + ';', + function (mt) { + var gt = mt.selectBounds, + yt = mt.dropdownGap, + bt = mt.dropdownPosition, + vt = mt.portal + return vt + ? ` + position: fixed; + ` + + (bt === 'bottom' + ? 'top: ' + (gt.bottom + yt) + 'px;' + : 'bottom: ' + ((0, at.isomorphicWindow)().innerHeight - gt.top + yt) + 'px;') + + ` + left: ` + + (gt.left - 1) + + 'px;' + : 'left: -1px;' + }, + ';border:1px solid #ccc;width:', + function (mt) { + var gt = mt.selectBounds + return gt.width + }, + 'px;padding:0;display:flex;flex-direction:column;background:#fff;border-radius:2px;box-shadow:0 0 10px 0 ', + function () { + return (0, at.hexToRGBA)('#000000', 0.2) + }, + ';max-height:', + function (mt) { + var gt = mt.dropdownHeight + return gt + }, + ';overflow:auto;z-index:9;:focus{outline:none;}', + ), + ht = (0, et.default)('div', { target: 'e1qjn9k91' })( + 'color:', + function (mt) { + var gt = mt.color + return gt + }, + ';padding:5px 10px;:hover{background:', + function (mt) { + var gt = mt.color + return gt && (0, at.hexToRGBA)(gt, 0.1) + }, + ';outline:none;cursor:pointer;}', + ), + dt = (0, et.default)('div', { target: 'e1qjn9k90' })( + 'color:', + function (mt) { + var gt = mt.color + return gt + }, + ';padding:5px 10px;position:sticky;bottom:0;margin:0;opacity:1;background:#fff;box-shadow:0 0 10px 0 ', + function () { + return (0, at.hexToRGBA)('#000000', 0.2) + }, + ';:hover{outline:none;cursor:pointer;}', + ), + pt = ct + tt.default = pt + })(Dropdown) + var Loading = {} + ;(function (tt) { + ;(tt.__esModule = !0), (tt.default = void 0) + var et = it(require$$0), + nt = it(reactExports), + rt = constants$2 + function it(lt) { + return lt && lt.__esModule ? lt : { default: lt } + } + var ot = function (lt) { + var ct = lt.props + return ct.loadingRenderer + ? ct.loadingRenderer({ props: ct }) + : nt.default.createElement(at, { className: rt.LIB_NAME + '-loading', color: ct.color }) + }, + at = (0, et.default)('div', { target: 'e1l5cpc30' })( + "@keyframes dual-ring-spin{0%{transform:rotate(0deg);}100%{transform:rotate(180deg);}}padding:0 5px;display:block;width:auto;height:auto;:after{content:' ';display:block;width:16px;height:16px;border-radius:50%;border-width:1px;border-style:solid;border-color:", + function (lt) { + var ct = lt.color + return ct + }, + ' transparent;animation:dual-ring-spin 0.7s ease-in-out infinite;margin:0 0 0 -10px;}', + ), + st = ot + tt.default = st + })(Loading) + var Clear = {} + ;(function (tt) { + ;(tt.__esModule = !0), (tt.default = void 0) + var et = it(require$$0), + nt = it(reactExports), + rt = constants$2 + function it(lt) { + return lt && lt.__esModule ? lt : { default: lt } + } + var ot = function (lt) { + var ct = lt.props, + ut = lt.state, + ht = lt.methods + return ct.clearRenderer + ? ct.clearRenderer({ props: ct, state: ut, methods: ht }) + : nt.default.createElement( + at, + { + className: rt.LIB_NAME + '-clear', + tabIndex: '-1', + onClick: function () { + return ht.clearAll() + }, + onKeyPress: function () { + return ht.clearAll() + }, + }, + '×', + ) + }, + at = (0, et.default)('div', { target: 'e11qlq5e0' })({ + name: '992gsg', + styles: 'line-height:25px;margin:0 10px;cursor:pointer;:focus{outline:none;}:hover{color:tomato;}', + }), + st = ot + tt.default = st + })(Clear) + var Separator = {} + ;(function (tt) { + ;(tt.__esModule = !0), (tt.default = void 0) + var et = it(require$$0), + nt = it(reactExports), + rt = constants$2 + function it(lt) { + return lt && lt.__esModule ? lt : { default: lt } + } + var ot = function (lt) { + var ct = lt.props, + ut = lt.state, + ht = lt.methods + return ct.separatorRenderer + ? ct.separatorRenderer({ props: ct, state: ut, methods: ht }) + : nt.default.createElement(at, { className: rt.LIB_NAME + '-separator' }) + }, + at = (0, et.default)('div', { target: 'e19h5j1v0' })({ + name: 'cmi1n0', + styles: 'border-left:1px solid #ccc;width:1px;height:25px;display:block', + }), + st = ot + tt.default = st + })(Separator) + var DropdownHandle = {} + ;(function (tt) { + ;(tt.__esModule = !0), (tt.default = void 0) + var et = it(require$$0), + nt = it(reactExports), + rt = constants$2 + function it(lt) { + return lt && lt.__esModule ? lt : { default: lt } + } + var ot = function (lt) { + var ct = lt.props, + ut = lt.state, + ht = lt.methods + return nt.default.createElement( + at, + { + tabIndex: '-1', + onClick: function (pt) { + return ht.dropDown(ut.dropdown ? 'close' : 'open', pt) + }, + dropdownOpen: ut.dropdown, + onKeyPress: function (pt) { + return ht.dropDown('toggle', pt) + }, + onKeyDown: function (pt) { + return ht.dropDown('toggle', pt) + }, + className: rt.LIB_NAME + '-dropdown-handle', + rotate: ct.dropdownHandleRenderer ? 0 : 1, + color: ct.color, + }, + ct.dropdownHandleRenderer + ? ct.dropdownHandleRenderer({ props: ct, state: ut, methods: ht }) + : nt.default.createElement( + 'svg', + { fill: 'currentColor', viewBox: '0 0 40 40' }, + nt.default.createElement('path', { + d: 'M31 26.4q0 .3-.2.5l-1.1 1.2q-.3.2-.6.2t-.5-.2l-8.7-8.8-8.8 8.8q-.2.2-.5.2t-.5-.2l-1.2-1.2q-.2-.2-.2-.5t.2-.5l10.4-10.4q.3-.2.6-.2t.5.2l10.4 10.4q.2.2.2.5z', + }), + ), + ) + }, + at = (0, et.default)('div', { target: 'e1vudypg0' })( + 'text-align:center;', + function (lt) { + var ct = lt.dropdownOpen, + ut = lt.rotate + return ct + ? ` + pointer-events: all; + ` + + (ut ? 'transform: rotate(0deg);margin: 0px 0 -3px 5px;' : '') + + ` + ` + : ` + pointer-events: none; + ` + + (ut ? 'margin: 0 0 0 5px;transform: rotate(180deg);' : '') + + ` + ` + }, + ';cursor:pointer;svg{width:16px;height:16px;}:hover{path{stroke:', + function (lt) { + var ct = lt.color + return ct + }, + ';}}:focus{outline:none;path{stroke:', + function (lt) { + var ct = lt.color + return ct + }, + ';}}', + ), + st = ot + tt.default = st + })(DropdownHandle) + ;(function (tt) { + ;(tt.__esModule = !0), (tt.default = tt.Select = void 0) + var et = gt(require$$0), + nt = mt(reactExports), + rt = gt(reactDomExports) + gt(propTypesExports) + var it = gt(ClickOutside), + ot = gt(Content$2), + at = gt(Dropdown), + st = gt(Loading), + lt = gt(Clear), + ct = gt(Separator), + ut = gt(DropdownHandle), + ht = util, + dt = constants$2 + function pt(Dt) { + if (typeof WeakMap != 'function') return null + var jt = new WeakMap(), + Pt = new WeakMap() + return (pt = function (Ct) { + return Ct ? Pt : jt + })(Dt) + } + function mt(Dt, jt) { + if (!jt && Dt && Dt.__esModule) return Dt + if (Dt === null || (typeof Dt != 'object' && typeof Dt != 'function')) return { default: Dt } + var Pt = pt(jt) + if (Pt && Pt.has(Dt)) return Pt.get(Dt) + var Ct = {}, + wt = Object.defineProperty && Object.getOwnPropertyDescriptor + for (var It in Dt) + if (It != 'default' && Object.prototype.hasOwnProperty.call(Dt, It)) { + var Ot = wt ? Object.getOwnPropertyDescriptor(Dt, It) : null + Ot && (Ot.get || Ot.set) ? Object.defineProperty(Ct, It, Ot) : (Ct[It] = Dt[It]) + } + return (Ct.default = Dt), Pt && Pt.set(Dt, Ct), Ct + } + function gt(Dt) { + return Dt && Dt.__esModule ? Dt : { default: Dt } + } + function yt() { + return ( + (yt = Object.assign + ? Object.assign.bind() + : function (Dt) { + for (var jt, Pt = 1; Pt < arguments.length; Pt++) + for (var Ct in ((jt = arguments[Pt]), jt)) + Object.prototype.hasOwnProperty.call(jt, Ct) && (Dt[Ct] = jt[Ct]) + return Dt + }), + yt.apply(this, arguments) + ) + } + function bt(Dt) { + if (Dt === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called") + return Dt + } + function vt(Dt, jt) { + ;(Dt.prototype = Object.create(jt.prototype)), (Dt.prototype.constructor = Dt), xt(Dt, jt) + } + function xt(Dt, jt) { + return ( + (xt = Object.setPrototypeOf + ? Object.setPrototypeOf.bind() + : function (Pt, Ct) { + return (Pt.__proto__ = Ct), Pt + }), + xt(Dt, jt) + ) + } + function kt(Dt, jt, Pt) { + return ( + (jt = St(jt)), + jt in Dt + ? Object.defineProperty(Dt, jt, { value: Pt, enumerable: !0, configurable: !0, writable: !0 }) + : (Dt[jt] = Pt), + Dt + ) + } + function St(Dt) { + var jt = Tt(Dt, 'string') + return typeof jt == 'symbol' ? jt : jt + '' + } + function Tt(Dt, jt) { + if (typeof Dt != 'object' || Dt === null) return Dt + var Pt = Dt[Symbol.toPrimitive] + if (Pt !== void 0) { + var Ct = Pt.call(Dt, jt || 'default') + if (typeof Ct != 'object') return Ct + throw new TypeError('@@toPrimitive must return a primitive value.') + } + return (jt === 'string' ? String : Number)(Dt) + } + var At = (function (Dt) { + function jt(Ct) { + var wt + return ( + (wt = Dt.call(this, Ct) || this), + kt(bt(wt), 'onDropdownClose', function () { + wt.setState({ cursor: null }), wt.props.onDropdownClose() + }), + kt(bt(wt), 'onScroll', function () { + wt.props.closeOnScroll && wt.dropDown('close'), wt.updateSelectBounds() + }), + kt(bt(wt), 'updateSelectBounds', function () { + return wt.select.current && wt.setState({ selectBounds: wt.select.current.getBoundingClientRect() }) + }), + kt(bt(wt), 'getSelectBounds', function () { + return wt.state.selectBounds + }), + kt(bt(wt), 'dropDown', function (It, Ot, Wt) { + It === void 0 && (It = 'toggle'), Wt === void 0 && (Wt = !1) + var zt = (Ot && Ot.target) || (Ot && Ot.srcElement) + return wt.props.onDropdownCloseRequest !== void 0 && wt.state.dropdown && Wt === !1 && It === 'close' + ? wt.props.onDropdownCloseRequest({ + props: wt.props, + methods: wt.methods, + state: wt.state, + close: function () { + return wt.dropDown('close', null, !0) + }, + }) + : wt.props.portal && + !wt.props.closeOnScroll && + !wt.props.closeOnSelect && + Ot && + zt && + zt.offsetParent && + zt.offsetParent.classList.contains('react-dropdown-select-dropdown') + ? void 0 + : wt.props.keepOpen + ? wt.setState({ dropdown: !0 }) + : It === 'close' && wt.state.dropdown + ? (wt.select.current.blur(), + wt.setState({ + dropdown: !1, + search: wt.props.clearOnBlur ? '' : wt.state.search, + searchResults: wt.props.options, + })) + : It !== 'open' || wt.state.dropdown + ? It === 'toggle' && (wt.select.current.focus(), wt.setState({ dropdown: !wt.state.dropdown })) + : wt.setState({ dropdown: !0 }) + }), + kt(bt(wt), 'getSelectRef', function () { + return wt.select.current + }), + kt(bt(wt), 'addItem', function (It) { + if (wt.props.multi) { + if ((0, ht.valueExistInSelected)((0, ht.getByPath)(It, wt.props.valueField), wt.state.values, wt.props)) + return wt.removeItem(null, It, !1) + wt.setState({ values: [].concat(wt.state.values, [It]) }) + } else wt.setState({ values: [It], dropdown: !1 }) + return ( + wt.props.clearOnSelect && + wt.setState({ search: '' }, function () { + wt.setState({ searchResults: wt.searchResults() }) + }), + !0 + ) + }), + kt(bt(wt), 'removeItem', function (It, Ot, Wt) { + Wt === void 0 && (Wt = !1), + It && Wt && (It.preventDefault(), It.stopPropagation(), wt.dropDown('close')), + wt.setState({ + values: wt.state.values.filter(function (zt) { + return (0, ht.getByPath)(zt, wt.props.valueField) !== (0, ht.getByPath)(Ot, wt.props.valueField) + }), + }) + }), + kt(bt(wt), 'setSearch', function (It) { + wt.setState({ cursor: null }), + wt.setState({ search: It.target.value }, function () { + wt.setState({ searchResults: wt.searchResults() }) + }) + }), + kt(bt(wt), 'getInputSize', function () { + return wt.state.search + ? wt.state.search.length + : 0 < wt.state.values.length + ? wt.props.addPlaceholder.length + : wt.props.placeholder.length + }), + kt(bt(wt), 'toggleSelectAll', function () { + return wt.setState({ values: wt.state.values.length === 0 ? wt.selectAll() : wt.clearAll() }) + }), + kt(bt(wt), 'clearAll', function () { + wt.props.onClearAll(), wt.setState({ values: [] }) + }), + kt(bt(wt), 'selectAll', function (It) { + It === void 0 && (It = []), wt.props.onSelectAll() + var Ot = + 0 < It.length + ? It + : wt.props.options.filter(function (Wt) { + return !Wt.disabled + }) + wt.setState({ values: Ot }) + }), + kt(bt(wt), 'isSelected', function (It) { + return !!wt.state.values.find(function (Ot) { + return (0, ht.getByPath)(Ot, wt.props.valueField) === (0, ht.getByPath)(It, wt.props.valueField) + }) + }), + kt(bt(wt), 'areAllSelected', function () { + return ( + wt.state.values.length === + wt.props.options.filter(function (It) { + return !It.disabled + }).length + ) + }), + kt(bt(wt), 'safeString', function (It) { + return It.replace(/[.*+?^${}()|[\]\\]/g, '\\$&') + }), + kt(bt(wt), 'sortBy', function () { + var It = wt.props, + Ot = It.sortBy, + Wt = It.options + return ( + Ot && + Wt.sort(function (zt, Ft) { + return (0, ht.getProp)(zt, Ot) < (0, ht.getProp)(Ft, Ot) + ? -1 + : (0, ht.getProp)(zt, Ot) > (0, ht.getProp)(Ft, Ot) + ? 1 + : 0 + }), + Wt + ) + }), + kt(bt(wt), 'searchFn', function (It) { + var Ot = It.state, + Wt = It.methods, + zt = new RegExp(Wt.safeString(Ot.search), 'i') + return Wt.sortBy().filter(function (Ft) { + return zt.test((0, ht.getByPath)(Ft, wt.props.searchBy) || (0, ht.getByPath)(Ft, wt.props.valueField)) + }) + }), + kt(bt(wt), 'searchResults', function () { + var It = { state: wt.state, props: wt.props, methods: wt.methods } + return wt.props.searchFn(It) || wt.searchFn(It) + }), + kt(bt(wt), 'activeCursorItem', function (It) { + return wt.setState({ activeCursorItem: It }) + }), + kt(bt(wt), 'handleKeyDown', function (It) { + var Ot = { + event: It, + state: wt.state, + props: wt.props, + methods: wt.methods, + setState: wt.setState.bind(bt(wt)), + } + return wt.props.handleKeyDownFn(Ot) || wt.handleKeyDownFn(Ot) + }), + kt(bt(wt), 'handleKeyDownFn', function (It) { + var Ot = It.event, + Wt = It.state, + zt = It.props, + Ft = It.methods, + Nt = It.setState, + Ut = Wt.cursor, + Mt = Wt.searchResults, + Ht = Ot.key === 'Escape', + en = Ot.key === 'Enter', + sn = Ot.key === 'ArrowUp', + Kt = Ot.key === 'ArrowDown', + rn = Ot.key === 'Backspace', + nn = Ot.key === 'Tab' && !Ot.shiftKey, + hn = Ot.shiftKey && Ot.key === 'Tab' + if (Kt && !Wt.dropdown) return Ot.preventDefault(), wt.dropDown('open'), Nt({ cursor: 0 }) + if ((Kt || (nn && Wt.dropdown)) && Ut === null) return Nt({ cursor: 0 }) + if ( + ((sn || Kt || (hn && Wt.dropdown) || (nn && Wt.dropdown)) && Ot.preventDefault(), + Ht && wt.dropDown('close'), + en) + ) { + var vn = Mt[Ut] + if (vn && !vn.disabled) { + if (zt.create && (0, ht.valueExistInSelected)(Wt.search, Wt.values, zt)) return null + Ft.addItem(vn) + } + } + return (Kt || (nn && Wt.dropdown)) && Mt.length === Ut + ? Nt({ cursor: 0 }) + : ((Kt || (nn && Wt.dropdown)) && + Nt(function (an) { + return { cursor: an.cursor + 1 } + }), + (sn || (hn && Wt.dropdown)) && + 0 < Ut && + Nt(function (an) { + return { cursor: an.cursor - 1 } + }), + (sn || (hn && Wt.dropdown)) && Ut === 0 && Nt({ cursor: Mt.length }), + void ( + rn && + zt.backspaceDelete && + wt.getInputSize() === 0 && + wt.setState({ values: wt.state.values.slice(0, -1) }) + )) + }), + kt(bt(wt), 'renderDropdown', function () { + return wt.props.portal + ? rt.default.createPortal( + nt.default.createElement(at.default, { props: wt.props, state: wt.state, methods: wt.methods }), + wt.dropdownRoot, + ) + : nt.default.createElement(at.default, { props: wt.props, state: wt.state, methods: wt.methods }) + }), + kt(bt(wt), 'createNew', function (It) { + var Ot, + Wt = ((Ot = {}), (Ot[wt.props.labelField] = It), (Ot[wt.props.valueField] = It), Ot) + wt.addItem(Wt), wt.props.onCreateNew(Wt), wt.setState({ search: '' }) + }), + (wt.state = { + dropdown: !1, + values: Ct.values, + search: '', + selectBounds: {}, + cursor: null, + searchResults: Ct.options, + }), + (wt.methods = { + removeItem: wt.removeItem, + dropDown: wt.dropDown, + addItem: wt.addItem, + setSearch: wt.setSearch, + getInputSize: wt.getInputSize, + toggleSelectAll: wt.toggleSelectAll, + clearAll: wt.clearAll, + selectAll: wt.selectAll, + searchResults: wt.searchResults, + getSelectRef: wt.getSelectRef, + isSelected: wt.isSelected, + getSelectBounds: wt.getSelectBounds, + areAllSelected: wt.areAllSelected, + handleKeyDown: wt.handleKeyDown, + activeCursorItem: wt.activeCursorItem, + createNew: wt.createNew, + sortBy: wt.sortBy, + safeString: wt.safeString, + }), + (wt.select = nt.default.createRef()), + (wt.dropdownRoot = typeof document < 'u' && document.createElement('div')), + wt + ) + } + vt(jt, Dt) + var Pt = jt.prototype + return ( + (Pt.componentDidMount = function () { + this.props.portal && this.props.portal.appendChild(this.dropdownRoot), + (0, ht.isomorphicWindow)().addEventListener('resize', (0, ht.debounce)(this.updateSelectBounds)), + (0, ht.isomorphicWindow)().addEventListener('scroll', (0, ht.debounce)(this.onScroll)), + this.dropDown('close'), + this.select && this.updateSelectBounds() + }), + (Pt.componentDidUpdate = function (wt, It) { + var Ot = this + !this.props.compareValuesFunc(wt.values, this.props.values) && + this.props.compareValuesFunc(wt.values, It.values) && + (this.setState({ values: this.props.values }, function () { + Ot.props.onChange(Ot.state.values) + }), + this.updateSelectBounds()), + wt.options !== this.props.options && this.setState({ searchResults: this.searchResults() }), + It.values !== this.state.values && (this.props.onChange(this.state.values), this.updateSelectBounds()), + It.search !== this.state.search && this.updateSelectBounds(), + It.values !== this.state.values && this.props.closeOnSelect && this.dropDown('close'), + wt.multi !== this.props.multi && this.updateSelectBounds(), + It.dropdown && It.dropdown !== this.state.dropdown && this.onDropdownClose(), + It.dropdown || It.dropdown === this.state.dropdown || this.props.onDropdownOpen() + }), + (Pt.componentWillUnmount = function () { + this.props.portal && this.props.portal.removeChild(this.dropdownRoot), + (0, ht.isomorphicWindow)().removeEventListener( + 'resize', + (0, ht.debounce)(this.updateSelectBounds, this.props.debounceDelay), + ), + (0, ht.isomorphicWindow)().removeEventListener( + 'scroll', + (0, ht.debounce)(this.onScroll, this.props.debounceDelay), + ) + }), + (Pt.render = function () { + var wt = this + return nt.default.createElement( + it.default, + { + onClickOutside: function (Ot) { + return wt.dropDown('close', Ot) + }, + }, + nt.default.createElement( + Et, + yt( + { + onKeyDown: this.handleKeyDown, + 'aria-label': 'Dropdown select', + 'aria-expanded': this.state.dropdown, + onClick: function (Ot) { + return wt.dropDown('open', Ot) + }, + tabIndex: this.props.disabled ? '-1' : '0', + direction: this.props.direction, + style: this.props.style, + ref: this.select, + disabled: this.props.disabled, + className: dt.LIB_NAME + ' ' + this.props.className, + color: this.props.color, + }, + this.props.additionalProps, + ), + nt.default.createElement(ot.default, { props: this.props, state: this.state, methods: this.methods }), + (this.props.name || this.props.required) && + nt.default.createElement('input', { + tabIndex: -1, + style: { opacity: 0, width: 0, position: 'absolute' }, + name: this.props.name, + required: this.props.required, + pattern: this.props.pattern, + defaultValue: + this.state.values + .map(function (It) { + return It[wt.props.labelField] + }) + .toString() || [], + disabled: this.props.disabled, + }), + this.props.loading && nt.default.createElement(st.default, { props: this.props }), + this.props.clearable && + nt.default.createElement(lt.default, { props: this.props, state: this.state, methods: this.methods }), + this.props.separator && + nt.default.createElement(ct.default, { props: this.props, state: this.state, methods: this.methods }), + this.props.dropdownHandle && + nt.default.createElement(ut.default, { + onClick: function () { + return wt.select.current.focus() + }, + props: this.props, + state: this.state, + methods: this.methods, + }), + this.state.dropdown && !this.props.disabled && this.renderDropdown(), + ), + ) + }), + jt + ) + })(nt.Component) + ;(tt.Select = At), + (At.defaultProps = { + addPlaceholder: '', + placeholder: 'Select...', + selectAll: !1, + selectAllLabel: 'Select all', + clearAllLabel: 'Clear all', + values: [], + options: [], + multi: !1, + disabled: !1, + searchBy: 'label', + sortBy: null, + clearable: !1, + searchable: !0, + dropdownHandle: !0, + separator: !1, + keepOpen: void 0, + noDataLabel: 'No data', + createNewLabel: 'add {search}', + disabledLabel: 'disabled', + dropdownGap: 5, + closeOnScroll: !1, + debounceDelay: 0, + labelField: 'label', + valueField: 'value', + color: '#0074D9', + keepSelectedInList: !0, + closeOnSelect: !1, + clearOnBlur: !0, + clearOnSelect: !0, + dropdownPosition: 'bottom', + dropdownHeight: '300px', + autoFocus: !1, + portal: null, + create: !1, + direction: 'ltr', + name: null, + required: !1, + pattern: void 0, + onChange: function () {}, + onDropdownOpen: function () {}, + onDropdownClose: function () {}, + onDropdownCloseRequest: void 0, + onClearAll: function () {}, + onSelectAll: function () {}, + onCreateNew: function () {}, + searchFn: function () {}, + handleKeyDownFn: function () {}, + additionalProps: null, + backspaceDelete: !0, + compareValuesFunc: ht.isEqual, + }) + var Et = (0, et.default)('div', { target: 'e1gzf2xs0' })( + 'box-sizing:border-box;position:relative;display:flex;border:1px solid #ccc;width:100%;border-radius:2px;padding:2px 5px;flex-direction:row;direction:', + function (Dt) { + var jt = Dt.direction + return jt + }, + ';align-items:center;cursor:pointer;min-height:36px;', + function (Dt) { + var jt = Dt.disabled + return jt ? 'cursor: not-allowed;pointer-events: none;opacity: 0.3;' : 'pointer-events: all;' + }, + ' :hover,:focus-within{border-color:', + function (Dt) { + var jt = Dt.color + return jt + }, + ';}:focus,:focus-within{outline:0;box-shadow:0 0 0 3px ', + function (Dt) { + var jt = Dt.color + return (0, ht.hexToRGBA)(jt, 0.2) + }, + ';}*{box-sizing:border-box;}', + ), + $t = At + tt.default = $t + })(lib$1) + const Select$2 = getDefaultExportFromCjs(lib$1), + StyledSelect$1 = styled$4(Select$2)` + &.react-dropdown-select { + background: ${colors.primaryBlueBorder}; + border: none; + border-radius: 8px; + font-size: 14px; + font-weight: 600; + color: ${colors.white}; + border: none; + width: 100%; - varying vec3 vOutputDirection; + .react-dropdown-select-clear { + display: none; + } - uniform samplerCube envMap; + &.hasSelected { + .react-dropdown-select-clear { + display: block; + } + } - void main() { + &:hover { + opacity: 1; + box-shadow: 0 0 10px 2px ${colors.primaryBlueBorder}; + } - gl_FragColor = textureCube( envMap, vec3( flipEnvMap * vOutputDirection.x, vOutputDirection.yz ) ); + .react-dropdown-select-input::placeholder { + font-size: 14px; + font-weight: 600; + color: ${colors.white}; + } + } - } - `,blending:NoBlending,depthTest:!1,depthWrite:!1})}function _getCommonVertexShader(){return` + .react-dropdown-select-clear { + &:hover { + color: ${colors.white}; + opacity: 0.7; + } + } - precision mediump float; - precision mediump int; + .react-dropdown-select-input { + width: 100%; + } - attribute float faceIndex; + &.hasSelected { + .react-dropdown-select-input { + display: none; + } + } - varying vec3 vOutputDirection; + .react-dropdown-select-dropdown { + background: ${colors.primaryBlueBorder}; + border: none; + border-radius: 12px; + width: 100%; + .react-dropdown-select-item { + border: none; + & + & { + border-bottom: 1px solid #fff !important; + } + } - // RH coordinate system; PMREM face-indexing convention - vec3 getDirection( vec2 uv, float face ) { + .react-dropdown-select-item-selected { + background: ${colors.white}; + color: ${colors.primaryBlueBorder}; + border: none; + } + } +` + function FaCheck(tt) { + return GenIcon({ + tag: 'svg', + attr: { viewBox: '0 0 512 512' }, + child: [ + { + tag: 'path', + attr: { + d: 'M173.898 439.404l-166.4-166.4c-9.997-9.997-9.997-26.206 0-36.204l36.203-36.204c9.997-9.998 26.207-9.998 36.204 0L192 312.69 432.095 72.596c9.997-9.997 26.207-9.997 36.204 0l36.203 36.204c9.997 9.997 9.997 26.206 0 36.204l-294.4 294.401c-9.998 9.997-26.207 9.997-36.204-.001z', + }, + }, + ], + })(tt) + } + function FaRegQuestionCircle(tt) { + return GenIcon({ + tag: 'svg', + attr: { viewBox: '0 0 512 512' }, + child: [ + { + tag: 'path', + attr: { + d: 'M256 8C119.043 8 8 119.083 8 256c0 136.997 111.043 248 248 248s248-111.003 248-248C504 119.083 392.957 8 256 8zm0 448c-110.532 0-200-89.431-200-200 0-110.495 89.472-200 200-200 110.491 0 200 89.471 200 200 0 110.53-89.431 200-200 200zm107.244-255.2c0 67.052-72.421 68.084-72.421 92.863V300c0 6.627-5.373 12-12 12h-45.647c-6.627 0-12-5.373-12-12v-8.659c0-35.745 27.1-50.034 47.579-61.516 17.561-9.845 28.324-16.541 28.324-29.579 0-17.246-21.999-28.693-39.784-28.693-23.189 0-33.894 10.977-48.942 29.969-4.057 5.12-11.46 6.071-16.666 2.124l-27.824-21.098c-5.107-3.872-6.251-11.066-2.644-16.363C184.846 131.491 214.94 112 261.794 112c49.071 0 101.45 38.304 101.45 88.8zM298 368c0 23.159-18.841 42-42 42s-42-18.841-42-42 18.841-42 42-42 42 18.841 42 42z', + }, + }, + ], + })(tt) + } + const defaultProps$5 = { + colorName: 'black', + disabled: !1, + maxLength: 524288, + placeholder: '', + placeholderTextColor: 'gray100', + returnKeyType: 'done', + textAlign: 'left', + type: 'text', + }, + WebTextArea = styled$4.textarea` + -webkit-appearance: none; + -webkit-text-fill-color: ${({ colorName: tt }) => colors[tt]}; + background: transparent; + border: none; + color: ${({ colorName: tt }) => colors[tt]}; + cursor: ${({ disabled: tt }) => (tt ? 'default' : 'text')}; + margin: 0; + opacity: 1; + outline: 0; + padding: 0; + text-align: ${({ textAlign: tt }) => tt}; + resize: none; - uv = 2.0 * uv - 1.0; + &:focus { + border: none; + box-shadow: none; + outline: none; + } - vec3 direction = vec3( uv, 1.0 ); + &::placeholder { + -webkit-text-fill-color: ${({ placeholderTextColor: tt }) => colors[tt]}; + color: ${({ placeholderTextColor: tt }) => colors[tt]}; + } +` + WebTextArea.displayName = 'WebTextInput' + const BaseTextArea = reactExports.forwardRef( + ( + { + autoFocus: tt, + className: et, + colorName: nt = defaultProps$5.colorName, + defaultValue: rt, + disabled: it = defaultProps$5.disabled, + id: ot, + maxLength: at = defaultProps$5.maxLength, + name: st, + onBlur: lt, + onChange: ct, + onFocus: ut, + onKeyDown: ht, + placeholder: dt = defaultProps$5.placeholder, + placeholderTextColor: pt = defaultProps$5.placeholderTextColor, + textAlign: mt = defaultProps$5.textAlign, + value: gt, + }, + yt, + ) => { + const bt = reactExports.useCallback( + (vt) => { + ct && ct(vt.target.value) + }, + [ct], + ) + return jsxRuntimeExports.jsx(WebTextArea, { + ref: yt, + autoFocus: tt, + className: et, + colorName: nt, + defaultValue: rt, + disabled: it, + id: ot, + maxLength: at, + name: st, + onBlur: lt, + onChange: bt, + onFocus: ut, + onKeyDown: ht, + placeholder: dt, + placeholderTextColor: pt, + textAlign: mt, + value: gt, + }) + }, + ) + BaseTextArea.displayName = 'BaseTextArea' + const Wrapper$r = styled$4(Flex).attrs({ background: 'inputBg2', px: 8, py: 12 })` + border-radius: 8px; +`, + TextArea = ({ id: tt, label: et, message: nt, name: rt, rules: it, ...ot }) => { + const { + control: at, + formState: { errors: st }, + } = useFormContext(), + lt = get$5(st, rt) + return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { + children: [ + jsxRuntimeExports.jsxs(Flex, { + align: 'center', + direction: 'row', + pb: 4, + pl: 4, + children: [ + jsxRuntimeExports.jsx(Label$3, { htmlFor: tt, children: et }), + jsxRuntimeExports.jsxs(QuestionIcon$2, { + role: 'tooltip', + children: [ + jsxRuntimeExports.jsx(FaRegQuestionCircle, { color: colors.secondaryText4 }), + jsxRuntimeExports.jsx('div', { className: 'tooltip', children: nt }), + ], + }), + ], + }), + jsxRuntimeExports.jsx(Wrapper$r, { + children: jsxRuntimeExports.jsx(Controller, { + control: at, + name: rt, + render: ({ field: { onBlur: ct, onChange: ut, value: ht } }) => + jsxRuntimeExports.jsx(BaseTextArea, { + ...ot, + colorName: 'white', + id: tt, + name: rt, + onBlur: ct, + onChange: ut, + placeholderTextColor: 'inputPlaceholder', + value: ht || '', + }), + rules: it, + }), + }), + lt && + jsxRuntimeExports.jsx(Flex, { + pl: 4, + pt: 8, + shrink: 1, + tabIndex: 0, + children: jsxRuntimeExports.jsx(Text$3, { + color: 'primaryRed', + kind: 'regularBold', + children: jsxRuntimeExports.jsxs(Flex, { + align: 'center', + direction: 'row', + shrink: 1, + children: [ + jsxRuntimeExports.jsx(MdError, {}), + jsxRuntimeExports.jsx(Flex, { pl: 4, shrink: 1, children: lt.message }), + ], + }), + }), + }), + ], + }) + }, + QuestionIcon$2 = styled$4(Flex)` + cursor: default; + margin-left: 6px; + position: relative; - if ( face == 0.0 ) { + .tooltip { + position: absolute; + background-color: ${colors.dashboardHeader}; + border: 1px solid ${colors.secondaryText4}; + border-radius: 4px; + color: ${colors.white}; + top: 22px; + padding: 4px 8px; + font-size: 13px; + visibility: hidden; + width: 175px; + } - direction = direction.zyx; // ( 1, v, u ) pos x + &:hover .tooltip { + visibility: visible; + } - } else if ( face == 1.0 ) { + &:focus .tooltip { + visibility: visible; + } +`, + Label$3 = styled$4.label` + color: ${colors.lightGray}; + font-size: 14px; + font-weight: 600; +`, + message$5 = 'Submit Text', + Document = () => + jsxRuntimeExports.jsx(Flex, { + children: jsxRuntimeExports.jsx(TextArea, { + id: 'cy-text-id', + label: 'Text', + maxLength: 50, + message: message$5, + name: 'document', + placeholder: 'Type your text here...', + rules: { ...requiredRule$1 }, + }), + }) + var reactInputMask = { exports: {} }, + reactInputMask_production_min = { exports: {} }, + invariant$1 = function (tt, et, nt, rt, it, ot, at, st) { + if (!tt) { + var lt + if (et === void 0) + lt = new Error( + 'Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.', + ) + else { + var ct = [nt, rt, it, ot, at, st], + ut = 0 + ;(lt = new Error( + et.replace(/%s/g, function () { + return ct[ut++] + }), + )), + (lt.name = 'Invariant Violation') + } + throw ((lt.framesToPop = 1), lt) + } + }, + browser = invariant$1 + const invariant$2 = getDefaultExportFromCjs(browser) + function t$1(tt) { + return tt && typeof tt == 'object' && 'default' in tt ? tt.default : tt + } + var e$1 = reactExports, + n$1 = t$1(e$1), + i$3 = reactDomExports, + r$2 = t$1(browser) + function a$1() { + return (a$1 = + Object.assign || + function (tt) { + for (var et = 1; et < arguments.length; et++) { + var nt = arguments[et] + for (var rt in nt) Object.prototype.hasOwnProperty.call(nt, rt) && (tt[rt] = nt[rt]) + } + return tt + }).apply(this, arguments) + } + function o(tt, et) { + ;(tt.prototype = Object.create(et.prototype)), + (tt.prototype.constructor = tt), + (function (nt, rt) { + for (var it = Object.getOwnPropertyNames(rt), ot = 0; ot < it.length; ot++) { + var at = it[ot], + st = Object.getOwnPropertyDescriptor(rt, at) + st && st.configurable && nt[at] === void 0 && Object.defineProperty(nt, at, st) + } + })(tt, et) + } + function l$1(tt, et) { + if (tt == null) return {} + var nt, + rt, + it = {}, + ot = Object.keys(tt) + for (rt = 0; rt < ot.length; rt++) (nt = ot[rt]), et.indexOf(nt) >= 0 || (it[nt] = tt[nt]) + return it + } + function u(tt) { + return requestAnimationFrame(tt) + } + function s$1(tt) { + cancelAnimationFrame(tt) + } + function c$3(tt) { + var et = tt.ownerDocument + return et.hasFocus() && et.activeElement === tt + } + function f$1(tt) { + return tt == null ? void 0 : tt.ownerDocument + } + function h$2(tt) { + var et = (function (nt) { + var rt + return (rt = f$1(nt)) == null ? void 0 : rt.defaultView + })(tt) + return !!et && tt instanceof et.HTMLElement + } + function g$1(tt) { + return e$1.useCallback( + function () { + var et = tt.current, + nt = typeof window < 'u' && h$2(et) + if (!et || !nt) return null + if ((et.nodeName !== 'INPUT' && (et = et.querySelector('input')), !et)) + throw new Error("react-input-mask: inputComponent doesn't contain input node") + return et + }, + [tt], + ) + } + function v$2(tt, et) { + var nt, + rt, + it, + ot, + at = e$1.useRef({ start: null, end: null }), + st = g$1(tt), + lt = e$1.useCallback( + function () { + return (function (gt) { + var yt = gt.selectionStart, + bt = gt.selectionEnd + return { start: yt, end: bt, length: bt - yt } + })(st()) + }, + [st], + ), + ct = e$1.useCallback(function () { + return at.current + }, []), + ut = e$1.useCallback( + function (gt) { + var yt = st() + yt && + c$3(yt) && + ((function (bt, vt, xt) { + xt === void 0 && (xt = vt), bt.setSelectionRange(vt, xt) + })(yt, gt.start, gt.end), + (at.current = lt())) + }, + [st, lt], + ), + ht = e$1.useCallback( + function () { + at.current = lt() + }, + [lt], + ), + dt = + ((nt = ht), + (rt = e$1.useRef(null)), + (it = e$1.useCallback( + function () { + rt.current === null && + (function gt() { + nt(), (rt.current = u(gt)) + })() + }, + [nt], + )), + (ot = e$1.useCallback(function () { + s$1(rt.current), (rt.current = null) + }, [])), + e$1.useEffect( + function () { + rt.current && (ot(), it()) + }, + [it, ot], + ), + e$1.useEffect(s$1, []), + [it, ot]), + pt = dt[0], + mt = dt[1] + return ( + e$1.useLayoutEffect(function () { + if (et) { + var gt = st() + return ( + gt.addEventListener('focus', pt), + gt.addEventListener('blur', mt), + c$3(gt) && pt(), + function () { + gt.removeEventListener('focus', pt), gt.removeEventListener('blur', mt), mt() + } + ) + } + }), + { getSelection: lt, getLastSelection: ct, setSelection: ut } + ) + } + function d$1(tt, et) { + var nt = e$1.useRef(), + rt = v$2(nt, et), + it = rt.getSelection, + ot = rt.getLastSelection, + at = rt.setSelection, + st = (function (ht, dt) { + var pt = g$1(ht), + mt = e$1.useRef(dt) + return { + getValue: e$1.useCallback( + function () { + return pt().value + }, + [pt], + ), + getLastValue: e$1.useCallback(function () { + return mt.current + }, []), + setValue: e$1.useCallback( + function (gt) { + mt.current = gt + var yt = pt() + yt && (yt.value = gt) + }, + [pt], + ), + } + })(nt, tt), + lt = st.getValue, + ct = st.getLastValue, + ut = st.setValue + return { + inputRef: nt, + getInputState: function () { + return { value: lt(), selection: it() } + }, + getLastInputState: function () { + return { value: ct(), selection: ot() } + }, + setInputState: function (ht) { + var dt = ht.value, + pt = ht.selection + ut(dt), at(pt) + }, + } + } + var p$2 = ['disabled', 'onBlur', 'onChange', 'onFocus', 'onMouseDown', 'readOnly', 'value'], + m$2 = { 9: /[0-9]/, a: /[A-Za-z]/, '*': /[A-Za-z0-9]/ }, + P$1 = function (tt) { + var et = this + ;(this.isCharacterAllowedAtPosition = function (nt, rt) { + var it = et.maskOptions.maskPlaceholder + return !!et.isCharacterFillingPosition(nt, rt) || (!!it && it[rt] === nt) + }), + (this.isCharacterFillingPosition = function (nt, rt) { + var it = et.maskOptions.mask + if (!nt || rt >= it.length) return !1 + if (!et.isPositionEditable(rt)) return it[rt] === nt + var ot = it[rt] + return new RegExp(ot).test(nt) + }), + (this.isPositionEditable = function (nt) { + var rt = et.maskOptions, + it = rt.mask, + ot = rt.permanents + return nt < it.length && ot.indexOf(nt) === -1 + }), + (this.isValueEmpty = function (nt) { + return nt.split('').every(function (rt, it) { + return !et.isPositionEditable(it) || !et.isCharacterFillingPosition(rt, it) + }) + }), + (this.isValueFilled = function (nt) { + return et.getFilledLength(nt) === et.maskOptions.lastEditablePosition + 1 + }), + (this.getDefaultSelectionForValue = function (nt) { + var rt = et.getFilledLength(nt), + it = et.getRightEditablePosition(rt) + return { start: it, end: it } + }), + (this.getFilledLength = function (nt) { + return ( + (function (rt, it) { + for (var ot = rt.length - 1; ot >= 0; ot--) if (it(rt[ot], ot)) return ot + return -1 + })(nt.split(''), function (rt, it) { + return et.isPositionEditable(it) && et.isCharacterFillingPosition(rt, it) + }) + 1 + ) + }), + (this.getStringFillingLengthAtPosition = function (nt, rt) { + return ( + nt.split('').reduce( + function (it, ot) { + return et.insertCharacterAtPosition(it, ot, it.length) + }, + (function (it, ot) { + ot === void 0 && (ot = 1) + for (var at = '', st = 0; st < ot; st++) at += it + return at + })(' ', rt), + ).length - rt + ) + }), + (this.getLeftEditablePosition = function (nt) { + for (var rt = nt; rt >= 0; rt--) if (et.isPositionEditable(rt)) return rt + return null + }), + (this.getRightEditablePosition = function (nt) { + for (var rt = et.maskOptions.mask, it = nt; it < rt.length; it++) if (et.isPositionEditable(it)) return it + return null + }), + (this.formatValue = function (nt) { + var rt = et.maskOptions, + it = rt.maskPlaceholder, + ot = rt.mask + if (!it) { + for ( + nt = et.insertStringAtPosition('', nt, 0); + nt.length < ot.length && !et.isPositionEditable(nt.length); - direction = direction.xzy; - direction.xz *= -1.0; // ( -u, 1, -v ) pos y + ) + nt += ot[nt.length] + return nt + } + return et.insertStringAtPosition(it, nt, 0) + }), + (this.clearRange = function (nt, rt, it) { + if (!it) return nt + var ot = rt + it, + at = et.maskOptions, + st = at.maskPlaceholder, + lt = at.mask, + ct = nt + .split('') + .map(function (ut, ht) { + var dt = et.isPositionEditable(ht) + return !st && ht >= ot && !dt ? '' : ht < rt || ht >= ot ? ut : dt ? (st ? st[ht] : '') : lt[ht] + }) + .join('') + return et.formatValue(ct) + }), + (this.insertCharacterAtPosition = function (nt, rt, it) { + var ot = et.maskOptions, + at = ot.mask, + st = ot.maskPlaceholder + if (it >= at.length) return nt + var lt = et.isCharacterAllowedAtPosition(rt, it), + ct = et.isPositionEditable(it), + ut = et.getRightEditablePosition(it), + ht = st && ut ? rt === st[ut] : null, + dt = nt.slice(0, it) + return ( + (!lt && ct) || (nt = dt + (lt ? rt : at[it])), + lt || ct || ht || (nt = et.insertCharacterAtPosition(nt, rt, it + 1)), + nt + ) + }), + (this.insertStringAtPosition = function (nt, rt, it) { + var ot = et.maskOptions, + at = ot.mask, + st = ot.maskPlaceholder + if (!rt || it >= at.length) return nt + var lt = rt.split(''), + ct = et.isValueFilled(nt) || !!st, + ut = nt.slice(it) + return ( + (nt = lt.reduce(function (ht, dt) { + return et.insertCharacterAtPosition(ht, dt, ht.length) + }, nt.slice(0, it))), + ct + ? (nt += ut.slice(nt.length - it)) + : et.isValueFilled(nt) + ? (nt += at.slice(nt.length).join('')) + : (nt = ut + .split('') + .filter(function (ht, dt) { + return et.isPositionEditable(it + dt) + }) + .reduce(function (ht, dt) { + var pt = et.getRightEditablePosition(ht.length) + return pt === null + ? ht + : (et.isPositionEditable(ht.length) || (ht += at.slice(ht.length, pt).join('')), + et.insertCharacterAtPosition(ht, dt, ht.length)) + }, nt)), + nt + ) + }), + (this.processChange = function (nt, rt) { + var it = et.maskOptions, + ot = it.mask, + at = it.prefix, + st = it.lastEditablePosition, + lt = nt.value, + ct = nt.selection, + ut = rt.value, + ht = rt.selection, + dt = lt, + pt = '', + mt = 0, + gt = 0, + yt = Math.min(ht.start, ct.start) + return ( + ct.end > ht.start + ? ((pt = dt.slice(ht.start, ct.end)), + (gt = (mt = et.getStringFillingLengthAtPosition(pt, yt)) ? ht.length : 0)) + : dt.length < ut.length && (gt = ut.length - dt.length), + (dt = ut), + gt && + (gt === 1 && + !ht.length && + (yt = + ht.start === ct.start ? et.getRightEditablePosition(ct.start) : et.getLeftEditablePosition(ct.start)), + (dt = et.clearRange(dt, yt, gt))), + (dt = et.insertStringAtPosition(dt, pt, yt)), + (yt += mt) >= ot.length + ? (yt = ot.length) + : yt < at.length && !mt + ? (yt = at.length) + : yt >= at.length && yt < st && mt && (yt = et.getRightEditablePosition(yt)), + { value: (dt = et.formatValue(dt)), enteredString: pt, selection: { start: yt, end: yt } } + ) + }), + (this.maskOptions = (function (nt) { + var rt = nt.mask, + it = nt.maskPlaceholder, + ot = [] + if (!rt) + return { maskPlaceholder: null, mask: null, prefix: null, lastEditablePosition: null, permanents: [] } + if (typeof rt == 'string') { + var at = !1, + st = '' + rt.split('').forEach(function (ut) { + at || ut !== '\\' ? ((!at && m$2[ut]) || ot.push(st.length), (st += ut), (at = !1)) : (at = !0) + }), + (rt = st.split('').map(function (ut, ht) { + return ot.indexOf(ht) === -1 ? m$2[ut] : ut + })) + } else + rt.forEach(function (ut, ht) { + typeof ut == 'string' && ot.push(ht) + }) + it && + ((it = + it.length === 1 + ? rt.map(function (ut, ht) { + return ot.indexOf(ht) !== -1 ? ut : it + }) + : it.split('')), + ot.forEach(function (ut) { + it[ut] = rt[ut] + }), + (it = it.join(''))) + for ( + var lt = ot + .filter(function (ut, ht) { + return ut === ht + }) + .map(function (ut) { + return rt[ut] + }) + .join(''), + ct = rt.length - 1; + ot.indexOf(ct) !== -1; - } else if ( face == 2.0 ) { + ) + ct-- + return { maskPlaceholder: it, prefix: lt, mask: rt, lastEditablePosition: ct, permanents: ot } + })(tt)) + }, + k$2 = (function (tt) { + function et() { + return tt.apply(this, arguments) || this + } + return ( + o(et, tt), + (et.prototype.render = function () { + var nt = this.props, + rt = nt.children, + it = l$1(nt, ['children']) + return n$1.cloneElement(rt, it) + }), + et + ) + })(n$1.Component), + b$1 = e$1.forwardRef(function (tt, et) { + var nt = tt.alwaysShowMask, + rt = tt.children, + it = tt.mask, + ot = tt.maskPlaceholder, + at = tt.beforeMaskedStateChange, + st = l$1(tt, ['alwaysShowMask', 'children', 'mask', 'maskPlaceholder', 'beforeMaskedStateChange']) + ;(function (jt) { + var Pt = jt.mask, + Ct = jt.maskPlaceholder + Pt && Ct && Ct.length !== 1 && Ct.length !== Pt.length && r$2(!1) + })(tt) + var lt, + ct, + ut = new P$1({ mask: it, maskPlaceholder: ot }), + ht = !!it, + dt = !st.disabled && !st.readOnly, + pt = tt.value !== null && tt.value !== void 0, + mt = + ((lt = ht), + (ct = e$1.useRef()), + e$1.useEffect(function () { + ct.current = lt + }), + ct.current), + gt = d$1( + (function (jt) { + return '' + jt + })((pt ? tt.value : tt.defaultValue) || ''), + ht, + ), + yt = gt.inputRef, + bt = gt.getInputState, + vt = gt.setInputState, + xt = gt.getLastInputState, + kt = g$1(yt) + if (ht && pt) { + var St = kt(), + Tt = (St && c$3(St)) || nt || tt.value ? ut.formatValue(tt.value) : tt.value + at && (Tt = at({ nextState: { value: Tt, selection: { start: null, end: null } } }).value), + vt(a$1({}, xt(), { value: Tt })) + } + var At = xt(), + Et = At.selection, + $t = At.value + e$1.useLayoutEffect(function () { + if (ht) { + var jt = c$3(kt()), + Pt = Et, + Ct = bt(), + wt = a$1({}, Ct) + if (!pt) { + var It = Ct.value, + Ot = ut.formatValue(It), + Wt = ut.isValueEmpty(Ot) + !Wt || jt || nt ? (wt.value = Ot) : Wt && !jt && (wt.value = '') + } + jt && !mt + ? (wt.selection = ut.getDefaultSelectionForValue(wt.value)) + : pt && jt && Pt && Pt.start !== null && Pt.end !== null && (wt.selection = Pt), + at && (wt = at({ currentState: Ct, nextState: wt })), + vt(wt) + } + }) + var Dt = a$1({}, st, { + onFocus: function (jt) { + yt.current = jt.target + var Pt = bt().value + if (ht && !ut.isValueFilled(Pt)) { + var Ct = ut.formatValue(Pt), + wt = ut.getDefaultSelectionForValue(Ct), + It = { value: Ct, selection: wt } + at && ((Ct = (It = at({ currentState: bt(), nextState: It })).value), (wt = It.selection)), + vt(It), + Ct !== Pt && tt.onChange && tt.onChange(jt), + u(function () { + vt(xt()) + }) + } + tt.onFocus && tt.onFocus(jt) + }, + onBlur: function (jt) { + var Pt = bt().value, + Ct = xt().value + if (ht && !nt && ut.isValueEmpty(Ct)) { + var wt = '', + It = { value: wt, selection: { start: null, end: null } } + at && (wt = (It = at({ currentState: bt(), nextState: It })).value), + vt(It), + wt !== Pt && tt.onChange && tt.onChange(jt) + } + tt.onBlur && tt.onBlur(jt) + }, + onChange: + ht && dt + ? function (jt) { + var Pt = bt(), + Ct = xt(), + wt = ut.processChange(Pt, Ct) + at && (wt = at({ currentState: Pt, previousState: Ct, nextState: wt })), + vt(wt), + tt.onChange && tt.onChange(jt) + } + : tt.onChange, + onMouseDown: + ht && dt + ? function (jt) { + var Pt = kt(), + Ct = bt().value, + wt = f$1(Pt) + if (!c$3(Pt) && !ut.isValueFilled(Ct)) { + var It = jt.clientX, + Ot = jt.clientY, + Wt = new Date().getTime() + wt.addEventListener('mouseup', function zt(Ft) { + if ((wt.removeEventListener('mouseup', zt), c$3(Pt))) { + var Nt = Math.abs(Ft.clientX - It), + Ut = Math.abs(Ft.clientY - Ot), + Mt = Math.max(Nt, Ut), + Ht = new Date().getTime() - Wt + if ((Mt <= 10 && Ht <= 200) || (Mt <= 5 && Ht <= 300)) { + var en = xt(), + sn = a$1({}, en, { selection: ut.getDefaultSelectionForValue(en.value) }) + vt(sn) + } + } + }) + } + tt.onMouseDown && tt.onMouseDown(jt) + } + : tt.onMouseDown, + ref: function (jt) { + ;(yt.current = i$3.findDOMNode(jt)), + (function (Pt) { + return typeof Pt == 'function' + })(et) + ? et(jt) + : et !== null && typeof et == 'object' && (et.current = jt) + }, + value: ht && pt ? $t : tt.value, + }) + return rt + ? ((function (jt, Pt) { + p$2.filter(function (Ct) { + return Pt.props[Ct] != null && Pt.props[Ct] !== jt[Ct] + }).length && r$2(!1) + })(tt, rt), + n$1.createElement(k$2, Dt, rt)) + : n$1.createElement('input', Dt) + }) + ;(b$1.displayName = 'InputMask'), + (b$1.defaultProps = { alwaysShowMask: !1, maskPlaceholder: '_' }), + (reactInputMask_production_min.exports = b$1) + var reactInputMask_production_minExports = reactInputMask_production_min.exports + reactInputMask.exports = reactInputMask_production_minExports + var reactInputMaskExports = reactInputMask.exports + const InputMask = getDefaultExportFromCjs(reactInputMaskExports), + defaultProps$4 = { + autoComplete: 'off', + colorName: 'black', + disabled: !1, + maxLength: 524288, + placeholder: '', + placeholderTextColor: 'gray100', + returnKeyType: 'done', + textAlign: 'left', + type: 'text', + }, + autoCompleteValuesWeb = { + billTo: 'billing organization', + city: 'billing address-level2', + country: 'billing country-name', + creditCardCVC: 'cc-csc', + creditCardExpiryDate: 'cc-exp', + creditCardName: 'cc-name', + creditCardNumber: 'cc-number', + currentPassword: 'current-password', + email: 'username email', + firstName: 'given-name', + lastName: 'family-name', + newPassword: 'new-password', + off: 'off', + on: 'on', + oneTimeCode: 'one-time-code', + organization: 'organization', + province: 'billing address-level1', + streetAddress: 'billing street-address', + tel: 'tel-national', + url: 'url', + }, + whiteAutofill = ` + &:-webkit-autofill:active, + &:-webkit-autofill:focus, + &:-webkit-autofill:hover { + box-shadow: inset 0 0 0 1000px ${colors.white}; + } +`, + WebTextInput = styled$4.input` + -webkit-appearance: none; + -webkit-text-fill-color: ${({ colorName: tt }) => colors[tt]}; + background: transparent; + border: none; + color: ${({ colorName: tt }) => colors[tt]}; + cursor: ${({ disabled: tt }) => (tt ? 'default' : 'text')}; + margin: 0; + opacity: 1; + outline: 0; + padding: 0; + text-align: ${({ textAlign: tt }) => tt}; - direction.x *= -1.0; // ( -u, v, 1 ) pos z + ${whiteAutofill} - } else if ( face == 3.0 ) { + &:focus { + border: none; + box-shadow: none; + outline: none; + } - direction = direction.zyx; - direction.xz *= -1.0; // ( -1, v, -u ) neg x + &[type='number'] { + appearance: textfield; + -webkit-appearance: textfield; - } else if ( face == 4.0 ) { + &::-webkit-outer-spin-button, + &::-webkit-inner-spin-button { + appearance: none; + -webkit-appearance: none; + } + } - direction = direction.xzy; - direction.xy *= -1.0; // ( -u, -1, v ) neg y + &::placeholder { + -webkit-text-fill-color: ${({ placeholderTextColor: tt }) => colors[tt]}; + color: ${({ placeholderTextColor: tt }) => colors[tt]}; + } +` + WebTextInput.displayName = 'WebTextInput' + const BaseTextInput = reactExports.forwardRef( + ( + { + autoCapitalize: tt, + autoComplete: et = defaultProps$4.autoComplete, + autoFocus: nt, + className: rt, + colorName: it = defaultProps$4.colorName, + defaultValue: ot, + disabled: at = defaultProps$4.disabled, + id: st, + maxLength: lt = defaultProps$4.maxLength, + name: ct, + onBlur: ut, + onChange: ht, + onFocus: dt, + onKeyDown: pt, + placeholder: mt = defaultProps$4.placeholder, + placeholderTextColor: gt = defaultProps$4.placeholderTextColor, + textAlign: yt = defaultProps$4.textAlign, + type: bt = defaultProps$4.type, + value: vt, + }, + xt, + ) => { + const kt = reactExports.useCallback( + (St) => { + ht && ht(St.target.value) + }, + [ht], + ) + return jsxRuntimeExports.jsx(WebTextInput, { + ref: xt, + autoCapitalize: tt, + autoComplete: autoCompleteValuesWeb[et], + autoFocus: nt, + className: rt, + colorName: it, + defaultValue: ot, + disabled: at, + id: st, + maxLength: lt, + name: ct, + onBlur: ut, + onChange: kt, + onFocus: dt, + onKeyDown: pt, + placeholder: mt, + placeholderTextColor: gt, + textAlign: yt, + type: bt, + value: vt, + }) + }, + ) + BaseTextInput.displayName = 'BaseTextInput' + const Wrapper$q = styled$4(Flex).attrs({ background: 'inputBg2', px: 8, py: 12 })` + border-radius: 8px; +`, + TextInput = ({ + id: tt, + label: et, + mask: nt = '', + message: rt, + name: it, + rules: ot, + showMask: at = !1, + maskPlaceholder: st = null, + ...lt + }) => { + const { + control: ct, + formState: { errors: ut }, + } = useFormContext(), + ht = get$5(ut, it) + return jsxRuntimeExports.jsxs(Flex, { + shrink: 1, + children: [ + jsxRuntimeExports.jsxs(Flex, { + align: 'center', + direction: 'row', + pb: 4, + pl: 4, + children: [ + jsxRuntimeExports.jsx(Label$2, { htmlFor: tt, children: et }), + rt && + jsxRuntimeExports.jsxs(QuestionIcon$1, { + name: it, + role: 'tooltip', + children: [ + jsxRuntimeExports.jsx(FaRegQuestionCircle, { color: colors.secondaryText4 }), + jsxRuntimeExports.jsx('div', { className: 'tooltip', children: rt }), + ], + }), + ], + }), + jsxRuntimeExports.jsx(Wrapper$q, { + children: jsxRuntimeExports.jsx(Controller, { + control: ct, + name: it, + render: ({ field: { onBlur: dt, onChange: pt, value: mt, ref: gt } }) => { + const { disabled: yt = defaultProps$4.disabled, textAlign: bt = defaultProps$4.textAlign } = lt + return nt + ? jsxRuntimeExports.jsx(InputMask, { + alwaysShowMask: at, + disabled: !1, + inputRef: gt, + mask: nt, + maskPlaceholder: st, + onBlur: dt, + onChange: pt, + value: mt, + children: jsxRuntimeExports.jsx(WebTextInput, { + colorName: 'white', + disabled: yt, + id: tt, + placeholderTextColor: 'inputPlaceholder', + textAlign: bt, + }), + }) + : jsxRuntimeExports.jsx(BaseTextInput, { + ...lt, + colorName: 'white', + id: tt, + name: it, + onBlur: dt, + onChange: pt, + placeholderTextColor: 'inputPlaceholder', + value: mt || '', + }) + }, + rules: ot, + }), + }), + ht && + jsxRuntimeExports.jsx(Flex, { + pl: 4, + pt: 8, + shrink: 1, + tabIndex: 0, + children: jsxRuntimeExports.jsx(Text$3, { + color: 'primaryRed', + kind: 'regularBold', + children: jsxRuntimeExports.jsxs(Flex, { + align: 'center', + direction: 'row', + shrink: 1, + children: [ + jsxRuntimeExports.jsx(MdError, { fontSize: 18 }), + jsxRuntimeExports.jsx(Flex, { pl: 4, shrink: 1, children: ht.message }), + ], + }), + }), + }), + ], + }) + }, + QuestionIcon$1 = styled$4(Flex)` + cursor: default; + margin-left: 6px; + position: relative; - } else if ( face == 5.0 ) { + .tooltip { + position: absolute; + background-color: ${colors.dashboardHeader}; + border: 1px solid ${colors.secondaryText4}; + border-radius: 4px; + color: ${colors.white}; + top: 22px; + padding: 4px 8px; + font-size: 13px; + visibility: hidden; + width: 175px; + z-index: 1; + } - direction.z *= -1.0; // ( u, v, -1 ) neg z + ${(tt) => + tt.name === 'endTime' && + ` + .tooltip { + left: -68px; + } + `} - } + &:hover .tooltip { + visibility: visible; + } - return direction; + &:focus .tooltip { + visibility: visible; + } +`, + Label$2 = styled$4.label` + color: ${colors.lightGray}; + font-size: 14px; + font-weight: 600; +`, + message$4 = 'Submit github repository', + GithubRepository = () => + jsxRuntimeExports.jsx(Flex, { + children: jsxRuntimeExports.jsx(TextInput, { + id: 'cy-github-repository-id', + label: 'Github repository', + message: message$4, + name: 'source', + placeholder: 'Type github repository here...', + rules: { ...requiredRule$1 }, + }), + }), + message$3 = 'Submit RSS feed', + RSSFeed = () => + jsxRuntimeExports.jsx(Flex, { + children: jsxRuntimeExports.jsx(TextInput, { + id: 'cy-rss-feed-id', + label: 'RSS feed', + maxLength: 200, + message: message$3, + name: 'source', + placeholder: 'Type RSS link here...', + rules: { ...requiredRule$1 }, + }), + }), + latitudeReg = /^(-?\d{1,2}(\.\d+)?|90(\.0+)?)$/, + longitudeReg = /^(-?\d{1,3}(\.\d+)?|180(\.0+)?)$/, + Location = ({ setValue: tt }) => { + const [et, nt] = reactExports.useState(!1), + rt = () => { + tt && tt('withLocation', !et), nt(!et) + }, + it = (at) => { + const st = Number(at) + return st < -90 || st > 90 + ? 'Latitude must be between -90 and 90.' + : !st && st !== 0 + ? 'Latitude is required.' + : !0 + }, + ot = (at) => + at < -180 || at > 180 + ? 'Longitude must be between -180 and 180.' + : !at && at !== 0 + ? 'Longitude is required.' + : !0 + return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { + children: [ + jsxRuntimeExports.jsx(Flex, { + direction: 'row', + pt: 12, + children: jsxRuntimeExports.jsxs(CheckBoxWrapper, { + children: [ + 'Add location', + jsxRuntimeExports.jsx('button', { + className: 'checkbox', + id: 'add-node-location-checkbox', + onClick: rt, + type: 'button', + children: et && jsxRuntimeExports.jsx(FaCheck, { color: colors.lightBlue500 }), + }), + ], + }), + }), + et && + jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { + children: jsxRuntimeExports.jsxs(Flex, { + direction: 'row', + pt: 12, + children: [ + jsxRuntimeExports.jsx(Flex, { + basis: '50%', + pr: 16, + children: jsxRuntimeExports.jsx(TextInput, { + id: 'add-node-latitude', + label: 'Latitude', + message: 'Enter latitude coordinates', + name: 'latitude', + placeholder: 'Enter latitude (-90 to 90)', + rules: { + ...requiredRule$1, + pattern: { message: 'Incorrect longitude format', value: latitudeReg }, + validate: { latitude: it }, + }, + }), + }), + jsxRuntimeExports.jsx(Flex, { + basis: '50%', + pl: 16, + children: jsxRuntimeExports.jsx(TextInput, { + id: 'add-node-location-longitude', + label: 'Longitude', + message: 'Enter longitude coordinates', + name: 'longitude', + placeholder: 'Enter longitude (-180 to 180)', + rules: { + ...requiredRule$1, + pattern: { message: 'Incorrect longitude format', value: longitudeReg }, + validate: { longitude: ot }, + }, + }), + }), + ], + }), + }), + ], + }) + }, + Wrapper$p = styled$4(Flex).attrs({ background: 'inputBg2', basis: '25%', px: 8, py: 12 })` + border-radius: 8px; + margin-right: 8px; +`, + name = 'tags', + TagInput = ({ id: tt, label: et, message: nt, rules: rt, ...it }) => { + const { + setValue: ot, + getValues: at, + clearErrors: st, + formState: { errors: lt }, + } = useFormContext(), + ct = get$5(lt, name), + [ut, ht] = reactExports.useState(''), + dt = at(name), + pt = reactExports.useCallback( + (yt) => { + if (yt.type === 'keydown') { + if (yt.key !== 'Enter') return + yt.preventDefault() + } + if (!ut.trim() || (dt && dt.length === 15)) return + const bt = new Set([...(dt || []), ut]) + ot(name, [...bt]), ht(''), st(name) + }, + [ut, ot, dt, st], + ), + mt = reactExports.useCallback( + (yt) => { + if (!dt) return + const bt = dt.findIndex((vt) => vt === yt) + dt.splice(bt, 1), ot(name, [...dt], { shouldValidate: !0 }) + }, + [ot, dt], + ), + gt = reactExports.useCallback( + (yt) => { + ht(yt) + }, + [ht], + ) + return jsxRuntimeExports.jsxs(Flex, { + shrink: 1, + children: [ + jsxRuntimeExports.jsxs(Flex, { + align: 'center', + direction: 'row', + pb: 4, + pl: 4, + children: [ + jsxRuntimeExports.jsx(Label$1, { htmlFor: tt, children: et }), + jsxRuntimeExports.jsxs(QuestionIcon, { + role: 'tooltip', + children: [ + jsxRuntimeExports.jsx(FaRegQuestionCircle, { color: colors.secondaryText4 }), + jsxRuntimeExports.jsx('div', { className: 'tooltip', children: nt }), + ], + }), + ], + }), + jsxRuntimeExports.jsxs(Flex, { + direction: 'row', + children: [ + jsxRuntimeExports.jsx(Wrapper$p, { + children: jsxRuntimeExports.jsx(Controller, { + name, + render: () => + jsxRuntimeExports.jsx(BaseTextInput, { + ...it, + colorName: 'white', + id: tt, + name, + onChange: gt, + onKeyDown: pt, + placeholderTextColor: 'inputPlaceholder', + value: ut || '', + }), + rules: rt, + }), + }), + jsxRuntimeExports.jsxs(AddTagButton, { + onClick: pt, + role: 'button', + tabIndex: 0, + children: [ + jsxRuntimeExports.jsx(Text$3, { color: 'lightGray', kind: 'regular', children: 'Add Tag' }), + jsxRuntimeExports.jsx(MdAdd, { fontSize: 16 }), + ], + }), + ], + }), + jsxRuntimeExports.jsx(Flex, { + direction: 'row', + grow: 0, + pt: 8, + shrink: 1, + wrap: 'wrap', + children: + dt == null + ? void 0 + : dt.map((yt) => + jsxRuntimeExports.jsx( + Flex, + { + pr: 4, + pt: 4, + children: jsxRuntimeExports.jsxs(Flex, { + align: 'center', + background: 'white', + borderRadius: 12, + direction: 'row', + px: 8, + py: 4, + tabIndex: 0, + children: [ + jsxRuntimeExports.jsx(Flex, { + children: jsxRuntimeExports.jsx(Text$3, { color: 'black', children: yt }), + }), + jsxRuntimeExports.jsx(CloseButton$6, { + onClick: () => mt(yt), + role: 'button', + tabIndex: 0, + children: jsxRuntimeExports.jsx(MdRemove, { fontSize: 12 }), + }), + ], + }), + }, + yt, + ), + ), + }), + ct && + jsxRuntimeExports.jsx(Flex, { + id: 'tag-input-errors', + pl: 4, + pt: 8, + shrink: 1, + tabIndex: 0, + children: jsxRuntimeExports.jsx(Text$3, { + color: 'primaryRed', + kind: 'regularBold', + children: jsxRuntimeExports.jsxs(Flex, { + align: 'center', + direction: 'row', + shrink: 1, + children: [ + jsxRuntimeExports.jsx(MdError, { fontSize: 18 }), + jsxRuntimeExports.jsx(Flex, { pl: 4, shrink: 1, children: ct.message }), + ], + }), + }), + }), + ], + }) + }, + CloseButton$6 = styled$4(Flex)` + cursor: pointer; +`, + AddTagButton = styled$4(Flex).attrs({ + align: 'center', + borderRadius: 8, + borderSize: 1, + direction: 'row', + px: 8, + py: 8, + })` + border-color: ${colors.gray500}; + cursor: pointer; + color: ${colors.lightGray}; +`, + QuestionIcon = styled$4(Flex)` + cursor: default; + margin-left: 6px; + position: relative; - } + .tooltip { + position: absolute; + background-color: ${colors.dashboardHeader}; + border: 1px solid ${colors.secondaryText4}; + border-radius: 4px; + color: ${colors.white}; + top: 22px; + padding: 4px 8px; + font-size: 13px; + visibility: hidden; + width: 250px; + } - void main() { + &:hover .tooltip { + visibility: visible; + } - vOutputDirection = getDirection( uv, faceIndex ); - gl_Position = vec4( position, 1.0 ); + &:focus .tooltip { + visibility: visible; + } +`, + Label$1 = styled$4.label` + color: ${colors.lightGray}; + font-size: 14px; + font-weight: 600; +`, + tagRule = { required: { message: 'You need to enter at least 1 topic tag to submit a node.', value: !0 } }, + timeRegex = /^\d{2}:\d{2}:\d{2}$/, + twitterOrYoutubeRegexOrMp3 = + /^(?:(?:https?:\/\/)?(?:www\.)?(?:youtube\.com\/(?:watch\?v=|embed\/)|youtu\.be\/)[\w-]{11}(?:\S*)?|(?:https?:\/\/)?(?:www\.)?twitter\.com\/i\/spaces\/\d+.*$|.+\.mp3)$/i, + SourceUrl = ({ setValue: tt, startTime: et }) => { + const [nt, rt] = reactExports.useState(!1), + it = () => { + tt && tt('withTimeStamps', !nt), rt(!nt) + } + return jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { + children: jsxRuntimeExports.jsxs(Flex, { + children: [ + jsxRuntimeExports.jsx(TextInput, { + id: 'add-node-link', + label: 'Link', + message: 'Paste a valid YouTube or Twitter Space link here.', + name: 'link', + placeholder: 'Paste your link here...', + rules: { + ...requiredRule$1, + pattern: { + message: 'You must enter a valid YouTube, Twitter Space or mp3 link.', + value: twitterOrYoutubeRegexOrMp3, + }, + }, + }), + jsxRuntimeExports.jsx(Flex, { + direction: 'row', + pt: 12, + children: jsxRuntimeExports.jsxs(CheckBoxWrapper, { + children: [ + 'Add timestamps', + jsxRuntimeExports.jsx('button', { + className: 'checkbox', + id: 'add-node-timestamps-checkbox', + onClick: it, + type: 'button', + children: nt && jsxRuntimeExports.jsx(FaCheck, { color: colors.lightBlue500 }), + }), + ], + }), + }), + nt && + jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { + children: [ + jsxRuntimeExports.jsxs(Flex, { + direction: 'row', + pt: 12, + children: [ + jsxRuntimeExports.jsx(Flex, { + basis: '50%', + pr: 16, + children: jsxRuntimeExports.jsx(TextInput, { + id: 'add-node-start-time', + label: 'Start Time', + mask: '99:99:99', + maskPlaceholder: '_', + message: + 'Enter start and end timestamps which will encompass the segment of video or audio you want to submit. [hh:mm:ss]', + name: 'startTime', + placeholder: '00:00:00', + rules: { + ...requiredRule$1, + pattern: { message: 'Timestamp must be in the format hh:mm:ss', value: timeRegex }, + }, + showMask: !0, + }), + }), + jsxRuntimeExports.jsx(Flex, { + basis: '50%', + pl: 16, + children: jsxRuntimeExports.jsx(TextInput, { + id: 'add-node-end-time', + label: 'End Time', + mask: '99:99:99', + maskPlaceholder: '_', + message: + 'Enter start and end timestamps which will encompass the segment of video or audio you want to submit. [hh:mm:ss]', + name: 'endTime', + placeholder: '00:00:00', + rules: { + ...requiredRule$1, + pattern: { message: 'Timestamp must be in the format hh:mm:ss', value: timeRegex }, + validate: { + endTime: (ot) => ot > (et || '00:00:00') || 'End time should be greater than start time', + }, + }, + showMask: !0, + }), + }), + ], + }), + jsxRuntimeExports.jsx(Flex, { + pt: 12, + children: jsxRuntimeExports.jsx(TextArea, { + id: 'add-node-description', + label: 'Clip Description', + maxLength: 100, + message: + 'Enter a short description of your audio/video segment. Think of this as the title of your node. [max 100 characters]', + name: 'description', + rules: requiredRule$1, + }), + }), + jsxRuntimeExports.jsx(Flex, { + pt: 12, + children: jsxRuntimeExports.jsx(TagInput, { + id: 'add-node-tags', + label: 'Tags', + maxLength: 50, + message: + "Enter some topic tags that capture the main ideas of your segment. Be specific! Generic tags aren't useful for anyone. Think, 'What term(s) would someone search to find my node? [max: 15, max characters per tag: 50]", + rules: tagRule, + }), + }), + ], + }), + jsxRuntimeExports.jsx(Location, { setValue: tt }), + ], + }), + }) + }, + CheckBoxWrapper = styled$4.div` + color: ${colors.lightGray}; + font-size: 14px; + font-weight: 600; + display: flex; - } - `}function WebGLCubeUVMaps(tt){let et=new WeakMap,nt=null;function rt(st){if(st&&st.isTexture){const lt=st.mapping,ct=lt===EquirectangularReflectionMapping||lt===EquirectangularRefractionMapping,ut=lt===CubeReflectionMapping||lt===CubeRefractionMapping;if(ct||ut)if(st.isRenderTargetTexture&&st.needsPMREMUpdate===!0){st.needsPMREMUpdate=!1;let ht=et.get(st);return nt===null&&(nt=new PMREMGenerator(tt)),ht=ct?nt.fromEquirectangular(st,ht):nt.fromCubemap(st,ht),et.set(st,ht),ht.texture}else{if(et.has(st))return et.get(st).texture;{const ht=st.image;if(ct&&ht&&ht.height>0||ut&&ht&&it(ht)){nt===null&&(nt=new PMREMGenerator(tt));const dt=ct?nt.fromEquirectangular(st):nt.fromCubemap(st);return et.set(st,dt),st.addEventListener("dispose",ot),dt.texture}else return null}}}return st}function it(st){let lt=0;const ct=6;for(let ut=0;utet.maxTextureSize&&(Pt=Math.ceil(jt/et.maxTextureSize),jt=et.maxTextureSize);const Ct=new Float32Array(jt*Pt*4*yt),wt=new DataArrayTexture(Ct,jt,Pt,yt);wt.type=FloatType,wt.needsUpdate=!0;const It=Dt*4;for(let Wt=0;Wt0)return tt;const it=et*nt;let ot=arrayCacheF32[it];if(ot===void 0&&(ot=new Float32Array(it),arrayCacheF32[it]=ot),et!==0){rt.toArray(ot,0);for(let at=1,st=0;at!==et;++at)st+=nt,tt[at].toArray(ot,st)}return ot}function arraysEqual(tt,et){if(tt.length!==et.length)return!1;for(let nt=0,rt=tt.length;nt":" "} ${st}: ${nt[at]}`)}return rt.join(` -`)}function getEncodingComponents(tt){switch(tt){case LinearEncoding:return["Linear","( value )"];case sRGBEncoding:return["sRGB","( value )"];default:return console.warn("THREE.WebGLProgram: Unsupported encoding:",tt),["Linear","( value )"]}}function getShaderErrors(tt,et,nt){const rt=tt.getShaderParameter(et,35713),it=tt.getShaderInfoLog(et).trim();if(rt&&it==="")return"";const ot=/ERROR: 0:(\d+)/.exec(it);if(ot){const at=parseInt(ot[1]);return nt.toUpperCase()+` - -`+it+` - -`+handleSource(tt.getShaderSource(et),at)}else return it}function getTexelEncodingFunction(tt,et){const nt=getEncodingComponents(et);return"vec4 "+tt+"( vec4 value ) { return LinearTo"+nt[0]+nt[1]+"; }"}function getToneMappingFunction(tt,et){let nt;switch(et){case LinearToneMapping:nt="Linear";break;case ReinhardToneMapping:nt="Reinhard";break;case CineonToneMapping:nt="OptimizedCineon";break;case ACESFilmicToneMapping:nt="ACESFilmic";break;case CustomToneMapping:nt="Custom";break;default:console.warn("THREE.WebGLProgram: Unsupported toneMapping:",et),nt="Linear"}return"vec3 "+tt+"( vec3 color ) { return "+nt+"ToneMapping( color ); }"}function generateExtensions(tt){return[tt.extensionDerivatives||tt.envMapCubeUVHeight||tt.bumpMap||tt.tangentSpaceNormalMap||tt.clearcoatNormalMap||tt.flatShading||tt.shaderID==="physical"?"#extension GL_OES_standard_derivatives : enable":"",(tt.extensionFragDepth||tt.logarithmicDepthBuffer)&&tt.rendererExtensionFragDepth?"#extension GL_EXT_frag_depth : enable":"",tt.extensionDrawBuffers&&tt.rendererExtensionDrawBuffers?"#extension GL_EXT_draw_buffers : require":"",(tt.extensionShaderTextureLOD||tt.envMap||tt.transmission)&&tt.rendererExtensionShaderTextureLod?"#extension GL_EXT_shader_texture_lod : enable":""].filter(filterEmptyLine).join(` -`)}function generateDefines(tt){const et=[];for(const nt in tt){const rt=tt[nt];rt!==!1&&et.push("#define "+nt+" "+rt)}return et.join(` -`)}function fetchAttributeLocations(tt,et){const nt={},rt=tt.getProgramParameter(et,35721);for(let it=0;it/gm;function resolveIncludes(tt){return tt.replace(includePattern,includeReplacer)}function includeReplacer(tt,et){const nt=ShaderChunk[et];if(nt===void 0)throw new Error("Can not resolve #include <"+et+">");return resolveIncludes(nt)}const deprecatedUnrollLoopPattern=/#pragma unroll_loop[\s]+?for \( int i \= (\d+)\; i < (\d+)\; i \+\+ \) \{([\s\S]+?)(?=\})\}/g,unrollLoopPattern=/#pragma unroll_loop_start\s+for\s*\(\s*int\s+i\s*=\s*(\d+)\s*;\s*i\s*<\s*(\d+)\s*;\s*i\s*\+\+\s*\)\s*{([\s\S]+?)}\s+#pragma unroll_loop_end/g;function unrollLoops(tt){return tt.replace(unrollLoopPattern,loopReplacer).replace(deprecatedUnrollLoopPattern,deprecatedLoopReplacer)}function deprecatedLoopReplacer(tt,et,nt,rt){return console.warn("WebGLProgram: #pragma unroll_loop shader syntax is deprecated. Please use #pragma unroll_loop_start syntax instead."),loopReplacer(tt,et,nt,rt)}function loopReplacer(tt,et,nt,rt){let it="";for(let ot=parseInt(et);ot0&&(yt+=` -`),bt=[pt,mt].filter(filterEmptyLine).join(` -`),bt.length>0&&(bt+=` -`)):(yt=[generatePrecision(nt),"#define SHADER_NAME "+nt.shaderName,mt,nt.instancing?"#define USE_INSTANCING":"",nt.instancingColor?"#define USE_INSTANCING_COLOR":"",nt.supportsVertexTextures?"#define VERTEX_TEXTURES":"",nt.useFog&&nt.fog?"#define USE_FOG":"",nt.useFog&&nt.fogExp2?"#define FOG_EXP2":"",nt.map?"#define USE_MAP":"",nt.envMap?"#define USE_ENVMAP":"",nt.envMap?"#define "+ut:"",nt.lightMap?"#define USE_LIGHTMAP":"",nt.aoMap?"#define USE_AOMAP":"",nt.emissiveMap?"#define USE_EMISSIVEMAP":"",nt.bumpMap?"#define USE_BUMPMAP":"",nt.normalMap?"#define USE_NORMALMAP":"",nt.normalMap&&nt.objectSpaceNormalMap?"#define OBJECTSPACE_NORMALMAP":"",nt.normalMap&&nt.tangentSpaceNormalMap?"#define TANGENTSPACE_NORMALMAP":"",nt.clearcoatMap?"#define USE_CLEARCOATMAP":"",nt.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",nt.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",nt.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",nt.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",nt.displacementMap&&nt.supportsVertexTextures?"#define USE_DISPLACEMENTMAP":"",nt.specularMap?"#define USE_SPECULARMAP":"",nt.specularIntensityMap?"#define USE_SPECULARINTENSITYMAP":"",nt.specularColorMap?"#define USE_SPECULARCOLORMAP":"",nt.roughnessMap?"#define USE_ROUGHNESSMAP":"",nt.metalnessMap?"#define USE_METALNESSMAP":"",nt.alphaMap?"#define USE_ALPHAMAP":"",nt.transmission?"#define USE_TRANSMISSION":"",nt.transmissionMap?"#define USE_TRANSMISSIONMAP":"",nt.thicknessMap?"#define USE_THICKNESSMAP":"",nt.sheenColorMap?"#define USE_SHEENCOLORMAP":"",nt.sheenRoughnessMap?"#define USE_SHEENROUGHNESSMAP":"",nt.vertexTangents?"#define USE_TANGENT":"",nt.vertexColors?"#define USE_COLOR":"",nt.vertexAlphas?"#define USE_COLOR_ALPHA":"",nt.vertexUvs?"#define USE_UV":"",nt.uvsVertexOnly?"#define UVS_VERTEX_ONLY":"",nt.flatShading?"#define FLAT_SHADED":"",nt.skinning?"#define USE_SKINNING":"",nt.morphTargets?"#define USE_MORPHTARGETS":"",nt.morphNormals&&nt.flatShading===!1?"#define USE_MORPHNORMALS":"",nt.morphColors&&nt.isWebGL2?"#define USE_MORPHCOLORS":"",nt.morphTargetsCount>0&&nt.isWebGL2?"#define MORPHTARGETS_TEXTURE":"",nt.morphTargetsCount>0&&nt.isWebGL2?"#define MORPHTARGETS_TEXTURE_STRIDE "+nt.morphTextureStride:"",nt.morphTargetsCount>0&&nt.isWebGL2?"#define MORPHTARGETS_COUNT "+nt.morphTargetsCount:"",nt.doubleSided?"#define DOUBLE_SIDED":"",nt.flipSided?"#define FLIP_SIDED":"",nt.shadowMapEnabled?"#define USE_SHADOWMAP":"",nt.shadowMapEnabled?"#define "+lt:"",nt.sizeAttenuation?"#define USE_SIZEATTENUATION":"",nt.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",nt.logarithmicDepthBuffer&&nt.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 modelMatrix;","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform mat4 viewMatrix;","uniform mat3 normalMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;","#ifdef USE_INSTANCING"," attribute mat4 instanceMatrix;","#endif","#ifdef USE_INSTANCING_COLOR"," attribute vec3 instanceColor;","#endif","attribute vec3 position;","attribute vec3 normal;","attribute vec2 uv;","#ifdef USE_TANGENT"," attribute vec4 tangent;","#endif","#if defined( USE_COLOR_ALPHA )"," attribute vec4 color;","#elif defined( USE_COLOR )"," attribute vec3 color;","#endif","#if ( defined( USE_MORPHTARGETS ) && ! defined( MORPHTARGETS_TEXTURE ) )"," attribute vec3 morphTarget0;"," attribute vec3 morphTarget1;"," attribute vec3 morphTarget2;"," attribute vec3 morphTarget3;"," #ifdef USE_MORPHNORMALS"," attribute vec3 morphNormal0;"," attribute vec3 morphNormal1;"," attribute vec3 morphNormal2;"," attribute vec3 morphNormal3;"," #else"," attribute vec3 morphTarget4;"," attribute vec3 morphTarget5;"," attribute vec3 morphTarget6;"," attribute vec3 morphTarget7;"," #endif","#endif","#ifdef USE_SKINNING"," attribute vec4 skinIndex;"," attribute vec4 skinWeight;","#endif",` -`].filter(filterEmptyLine).join(` -`),bt=[pt,generatePrecision(nt),"#define SHADER_NAME "+nt.shaderName,mt,nt.useFog&&nt.fog?"#define USE_FOG":"",nt.useFog&&nt.fogExp2?"#define FOG_EXP2":"",nt.map?"#define USE_MAP":"",nt.matcap?"#define USE_MATCAP":"",nt.envMap?"#define USE_ENVMAP":"",nt.envMap?"#define "+ct:"",nt.envMap?"#define "+ut:"",nt.envMap?"#define "+ht:"",dt?"#define CUBEUV_TEXEL_WIDTH "+dt.texelWidth:"",dt?"#define CUBEUV_TEXEL_HEIGHT "+dt.texelHeight:"",dt?"#define CUBEUV_MAX_MIP "+dt.maxMip+".0":"",nt.lightMap?"#define USE_LIGHTMAP":"",nt.aoMap?"#define USE_AOMAP":"",nt.emissiveMap?"#define USE_EMISSIVEMAP":"",nt.bumpMap?"#define USE_BUMPMAP":"",nt.normalMap?"#define USE_NORMALMAP":"",nt.normalMap&&nt.objectSpaceNormalMap?"#define OBJECTSPACE_NORMALMAP":"",nt.normalMap&&nt.tangentSpaceNormalMap?"#define TANGENTSPACE_NORMALMAP":"",nt.clearcoat?"#define USE_CLEARCOAT":"",nt.clearcoatMap?"#define USE_CLEARCOATMAP":"",nt.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",nt.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",nt.iridescence?"#define USE_IRIDESCENCE":"",nt.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",nt.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",nt.specularMap?"#define USE_SPECULARMAP":"",nt.specularIntensityMap?"#define USE_SPECULARINTENSITYMAP":"",nt.specularColorMap?"#define USE_SPECULARCOLORMAP":"",nt.roughnessMap?"#define USE_ROUGHNESSMAP":"",nt.metalnessMap?"#define USE_METALNESSMAP":"",nt.alphaMap?"#define USE_ALPHAMAP":"",nt.alphaTest?"#define USE_ALPHATEST":"",nt.sheen?"#define USE_SHEEN":"",nt.sheenColorMap?"#define USE_SHEENCOLORMAP":"",nt.sheenRoughnessMap?"#define USE_SHEENROUGHNESSMAP":"",nt.transmission?"#define USE_TRANSMISSION":"",nt.transmissionMap?"#define USE_TRANSMISSIONMAP":"",nt.thicknessMap?"#define USE_THICKNESSMAP":"",nt.decodeVideoTexture?"#define DECODE_VIDEO_TEXTURE":"",nt.vertexTangents?"#define USE_TANGENT":"",nt.vertexColors||nt.instancingColor?"#define USE_COLOR":"",nt.vertexAlphas?"#define USE_COLOR_ALPHA":"",nt.vertexUvs?"#define USE_UV":"",nt.uvsVertexOnly?"#define UVS_VERTEX_ONLY":"",nt.gradientMap?"#define USE_GRADIENTMAP":"",nt.flatShading?"#define FLAT_SHADED":"",nt.doubleSided?"#define DOUBLE_SIDED":"",nt.flipSided?"#define FLIP_SIDED":"",nt.shadowMapEnabled?"#define USE_SHADOWMAP":"",nt.shadowMapEnabled?"#define "+lt:"",nt.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",nt.physicallyCorrectLights?"#define PHYSICALLY_CORRECT_LIGHTS":"",nt.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",nt.logarithmicDepthBuffer&&nt.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;",nt.toneMapping!==NoToneMapping?"#define TONE_MAPPING":"",nt.toneMapping!==NoToneMapping?ShaderChunk.tonemapping_pars_fragment:"",nt.toneMapping!==NoToneMapping?getToneMappingFunction("toneMapping",nt.toneMapping):"",nt.dithering?"#define DITHERING":"",nt.opaque?"#define OPAQUE":"",ShaderChunk.encodings_pars_fragment,getTexelEncodingFunction("linearToOutputTexel",nt.outputEncoding),nt.useDepthPacking?"#define DEPTH_PACKING "+nt.depthPacking:"",` -`].filter(filterEmptyLine).join(` -`)),at=resolveIncludes(at),at=replaceLightNums(at,nt),at=replaceClippingPlaneNums(at,nt),st=resolveIncludes(st),st=replaceLightNums(st,nt),st=replaceClippingPlaneNums(st,nt),at=unrollLoops(at),st=unrollLoops(st),nt.isWebGL2&&nt.isRawShaderMaterial!==!0&&(vt=`#version 300 es -`,yt=["precision mediump sampler2DArray;","#define attribute in","#define varying out","#define texture2D texture"].join(` -`)+` -`+yt,bt=["#define varying in",nt.glslVersion===GLSL3?"":"layout(location = 0) out highp vec4 pc_fragColor;",nt.glslVersion===GLSL3?"":"#define gl_FragColor pc_fragColor","#define gl_FragDepthEXT gl_FragDepth","#define texture2D texture","#define textureCube texture","#define texture2DProj textureProj","#define texture2DLodEXT textureLod","#define texture2DProjLodEXT textureProjLod","#define textureCubeLodEXT textureLod","#define texture2DGradEXT textureGrad","#define texture2DProjGradEXT textureProjGrad","#define textureCubeGradEXT textureGrad"].join(` -`)+` -`+bt);const xt=vt+yt+at,kt=vt+bt+st,St=WebGLShader(it,35633,xt),Tt=WebGLShader(it,35632,kt);if(it.attachShader(gt,St),it.attachShader(gt,Tt),nt.index0AttributeName!==void 0?it.bindAttribLocation(gt,0,nt.index0AttributeName):nt.morphTargets===!0&&it.bindAttribLocation(gt,0,"position"),it.linkProgram(gt),tt.debug.checkShaderErrors){const $t=it.getProgramInfoLog(gt).trim(),Dt=it.getShaderInfoLog(St).trim(),jt=it.getShaderInfoLog(Tt).trim();let Pt=!0,Ct=!0;if(it.getProgramParameter(gt,35714)===!1){Pt=!1;const wt=getShaderErrors(it,St,"vertex"),It=getShaderErrors(it,Tt,"fragment");console.error("THREE.WebGLProgram: Shader Error "+it.getError()+" - VALIDATE_STATUS "+it.getProgramParameter(gt,35715)+` - -Program Info Log: `+$t+` -`+wt+` -`+It)}else $t!==""?console.warn("THREE.WebGLProgram: Program Info Log:",$t):(Dt===""||jt==="")&&(Ct=!1);Ct&&(this.diagnostics={runnable:Pt,programLog:$t,vertexShader:{log:Dt,prefix:yt},fragmentShader:{log:jt,prefix:bt}})}it.deleteShader(St),it.deleteShader(Tt);let At;this.getUniforms=function(){return At===void 0&&(At=new WebGLUniforms(it,gt)),At};let Et;return this.getAttributes=function(){return Et===void 0&&(Et=fetchAttributeLocations(it,gt)),Et},this.destroy=function(){rt.releaseStatesOfProgram(this),it.deleteProgram(gt),this.program=void 0},this.name=nt.shaderName,this.id=programIdCount++,this.cacheKey=et,this.usedTimes=1,this.program=gt,this.vertexShader=St,this.fragmentShader=Tt,this}let _id=0;class WebGLShaderCache{constructor(){this.shaderCache=new Map,this.materialCache=new Map}update(et){const nt=et.vertexShader,rt=et.fragmentShader,it=this._getShaderStage(nt),ot=this._getShaderStage(rt),at=this._getShaderCacheForMaterial(et);return at.has(it)===!1&&(at.add(it),it.usedTimes++),at.has(ot)===!1&&(at.add(ot),ot.usedTimes++),this}remove(et){const nt=this.materialCache.get(et);for(const rt of nt)rt.usedTimes--,rt.usedTimes===0&&this.shaderCache.delete(rt.code);return this.materialCache.delete(et),this}getVertexShaderID(et){return this._getShaderStage(et.vertexShader).id}getFragmentShaderID(et){return this._getShaderStage(et.fragmentShader).id}dispose(){this.shaderCache.clear(),this.materialCache.clear()}_getShaderCacheForMaterial(et){const nt=this.materialCache;return nt.has(et)===!1&&nt.set(et,new Set),nt.get(et)}_getShaderStage(et){const nt=this.shaderCache;if(nt.has(et)===!1){const rt=new WebGLShaderStage(et);nt.set(et,rt)}return nt.get(et)}}class WebGLShaderStage{constructor(et){this.id=_id++,this.code=et,this.usedTimes=0}}function WebGLPrograms(tt,et,nt,rt,it,ot,at){const st=new Layers,lt=new WebGLShaderCache,ct=[],ut=it.isWebGL2,ht=it.logarithmicDepthBuffer,dt=it.vertexTextures;let pt=it.precision;const mt={MeshDepthMaterial:"depth",MeshDistanceMaterial:"distanceRGBA",MeshNormalMaterial:"normal",MeshBasicMaterial:"basic",MeshLambertMaterial:"lambert",MeshPhongMaterial:"phong",MeshToonMaterial:"toon",MeshStandardMaterial:"physical",MeshPhysicalMaterial:"physical",MeshMatcapMaterial:"matcap",LineBasicMaterial:"basic",LineDashedMaterial:"dashed",PointsMaterial:"points",ShadowMaterial:"shadow",SpriteMaterial:"sprite"};function gt(Et,$t,Dt,jt,Pt){const Ct=jt.fog,wt=Pt.geometry,It=Et.isMeshStandardMaterial?jt.environment:null,Ot=(Et.isMeshStandardMaterial?nt:et).get(Et.envMap||It),Wt=Ot&&Ot.mapping===CubeUVReflectionMapping?Ot.image.height:null,zt=mt[Et.type];Et.precision!==null&&(pt=it.getMaxPrecision(Et.precision),pt!==Et.precision&&console.warn("THREE.WebGLProgram.getParameters:",Et.precision,"not supported, using",pt,"instead."));const Ft=wt.morphAttributes.position||wt.morphAttributes.normal||wt.morphAttributes.color,Nt=Ft!==void 0?Ft.length:0;let Ut=0;wt.morphAttributes.position!==void 0&&(Ut=1),wt.morphAttributes.normal!==void 0&&(Ut=2),wt.morphAttributes.color!==void 0&&(Ut=3);let Mt,Ht,en,sn;if(zt){const an=ShaderLib[zt];Mt=an.vertexShader,Ht=an.fragmentShader}else Mt=Et.vertexShader,Ht=Et.fragmentShader,lt.update(Et),en=lt.getVertexShaderID(Et),sn=lt.getFragmentShaderID(Et);const Kt=tt.getRenderTarget(),rn=Et.alphaTest>0,nn=Et.clearcoat>0,hn=Et.iridescence>0;return{isWebGL2:ut,shaderID:zt,shaderName:Et.type,vertexShader:Mt,fragmentShader:Ht,defines:Et.defines,customVertexShaderID:en,customFragmentShaderID:sn,isRawShaderMaterial:Et.isRawShaderMaterial===!0,glslVersion:Et.glslVersion,precision:pt,instancing:Pt.isInstancedMesh===!0,instancingColor:Pt.isInstancedMesh===!0&&Pt.instanceColor!==null,supportsVertexTextures:dt,outputEncoding:Kt===null?tt.outputEncoding:Kt.isXRRenderTarget===!0?Kt.texture.encoding:LinearEncoding,map:!!Et.map,matcap:!!Et.matcap,envMap:!!Ot,envMapMode:Ot&&Ot.mapping,envMapCubeUVHeight:Wt,lightMap:!!Et.lightMap,aoMap:!!Et.aoMap,emissiveMap:!!Et.emissiveMap,bumpMap:!!Et.bumpMap,normalMap:!!Et.normalMap,objectSpaceNormalMap:Et.normalMapType===ObjectSpaceNormalMap,tangentSpaceNormalMap:Et.normalMapType===TangentSpaceNormalMap,decodeVideoTexture:!!Et.map&&Et.map.isVideoTexture===!0&&Et.map.encoding===sRGBEncoding,clearcoat:nn,clearcoatMap:nn&&!!Et.clearcoatMap,clearcoatRoughnessMap:nn&&!!Et.clearcoatRoughnessMap,clearcoatNormalMap:nn&&!!Et.clearcoatNormalMap,iridescence:hn,iridescenceMap:hn&&!!Et.iridescenceMap,iridescenceThicknessMap:hn&&!!Et.iridescenceThicknessMap,displacementMap:!!Et.displacementMap,roughnessMap:!!Et.roughnessMap,metalnessMap:!!Et.metalnessMap,specularMap:!!Et.specularMap,specularIntensityMap:!!Et.specularIntensityMap,specularColorMap:!!Et.specularColorMap,opaque:Et.transparent===!1&&Et.blending===NormalBlending,alphaMap:!!Et.alphaMap,alphaTest:rn,gradientMap:!!Et.gradientMap,sheen:Et.sheen>0,sheenColorMap:!!Et.sheenColorMap,sheenRoughnessMap:!!Et.sheenRoughnessMap,transmission:Et.transmission>0,transmissionMap:!!Et.transmissionMap,thicknessMap:!!Et.thicknessMap,combine:Et.combine,vertexTangents:!!Et.normalMap&&!!wt.attributes.tangent,vertexColors:Et.vertexColors,vertexAlphas:Et.vertexColors===!0&&!!wt.attributes.color&&wt.attributes.color.itemSize===4,vertexUvs:!!Et.map||!!Et.bumpMap||!!Et.normalMap||!!Et.specularMap||!!Et.alphaMap||!!Et.emissiveMap||!!Et.roughnessMap||!!Et.metalnessMap||!!Et.clearcoatMap||!!Et.clearcoatRoughnessMap||!!Et.clearcoatNormalMap||!!Et.iridescenceMap||!!Et.iridescenceThicknessMap||!!Et.displacementMap||!!Et.transmissionMap||!!Et.thicknessMap||!!Et.specularIntensityMap||!!Et.specularColorMap||!!Et.sheenColorMap||!!Et.sheenRoughnessMap,uvsVertexOnly:!(Et.map||Et.bumpMap||Et.normalMap||Et.specularMap||Et.alphaMap||Et.emissiveMap||Et.roughnessMap||Et.metalnessMap||Et.clearcoatNormalMap||Et.iridescenceMap||Et.iridescenceThicknessMap||Et.transmission>0||Et.transmissionMap||Et.thicknessMap||Et.specularIntensityMap||Et.specularColorMap||Et.sheen>0||Et.sheenColorMap||Et.sheenRoughnessMap)&&!!Et.displacementMap,fog:!!Ct,useFog:Et.fog===!0,fogExp2:Ct&&Ct.isFogExp2,flatShading:!!Et.flatShading,sizeAttenuation:Et.sizeAttenuation,logarithmicDepthBuffer:ht,skinning:Pt.isSkinnedMesh===!0,morphTargets:wt.morphAttributes.position!==void 0,morphNormals:wt.morphAttributes.normal!==void 0,morphColors:wt.morphAttributes.color!==void 0,morphTargetsCount:Nt,morphTextureStride:Ut,numDirLights:$t.directional.length,numPointLights:$t.point.length,numSpotLights:$t.spot.length,numRectAreaLights:$t.rectArea.length,numHemiLights:$t.hemi.length,numDirLightShadows:$t.directionalShadowMap.length,numPointLightShadows:$t.pointShadowMap.length,numSpotLightShadows:$t.spotShadowMap.length,numClippingPlanes:at.numPlanes,numClipIntersection:at.numIntersection,dithering:Et.dithering,shadowMapEnabled:tt.shadowMap.enabled&&Dt.length>0,shadowMapType:tt.shadowMap.type,toneMapping:Et.toneMapped?tt.toneMapping:NoToneMapping,physicallyCorrectLights:tt.physicallyCorrectLights,premultipliedAlpha:Et.premultipliedAlpha,doubleSided:Et.side===DoubleSide,flipSided:Et.side===BackSide,useDepthPacking:!!Et.depthPacking,depthPacking:Et.depthPacking||0,index0AttributeName:Et.index0AttributeName,extensionDerivatives:Et.extensions&&Et.extensions.derivatives,extensionFragDepth:Et.extensions&&Et.extensions.fragDepth,extensionDrawBuffers:Et.extensions&&Et.extensions.drawBuffers,extensionShaderTextureLOD:Et.extensions&&Et.extensions.shaderTextureLOD,rendererExtensionFragDepth:ut||rt.has("EXT_frag_depth"),rendererExtensionDrawBuffers:ut||rt.has("WEBGL_draw_buffers"),rendererExtensionShaderTextureLod:ut||rt.has("EXT_shader_texture_lod"),customProgramCacheKey:Et.customProgramCacheKey()}}function yt(Et){const $t=[];if(Et.shaderID?$t.push(Et.shaderID):($t.push(Et.customVertexShaderID),$t.push(Et.customFragmentShaderID)),Et.defines!==void 0)for(const Dt in Et.defines)$t.push(Dt),$t.push(Et.defines[Dt]);return Et.isRawShaderMaterial===!1&&(bt($t,Et),vt($t,Et),$t.push(tt.outputEncoding)),$t.push(Et.customProgramCacheKey),$t.join()}function bt(Et,$t){Et.push($t.precision),Et.push($t.outputEncoding),Et.push($t.envMapMode),Et.push($t.envMapCubeUVHeight),Et.push($t.combine),Et.push($t.vertexUvs),Et.push($t.fogExp2),Et.push($t.sizeAttenuation),Et.push($t.morphTargetsCount),Et.push($t.morphAttributeCount),Et.push($t.numDirLights),Et.push($t.numPointLights),Et.push($t.numSpotLights),Et.push($t.numHemiLights),Et.push($t.numRectAreaLights),Et.push($t.numDirLightShadows),Et.push($t.numPointLightShadows),Et.push($t.numSpotLightShadows),Et.push($t.shadowMapType),Et.push($t.toneMapping),Et.push($t.numClippingPlanes),Et.push($t.numClipIntersection),Et.push($t.depthPacking)}function vt(Et,$t){st.disableAll(),$t.isWebGL2&&st.enable(0),$t.supportsVertexTextures&&st.enable(1),$t.instancing&&st.enable(2),$t.instancingColor&&st.enable(3),$t.map&&st.enable(4),$t.matcap&&st.enable(5),$t.envMap&&st.enable(6),$t.lightMap&&st.enable(7),$t.aoMap&&st.enable(8),$t.emissiveMap&&st.enable(9),$t.bumpMap&&st.enable(10),$t.normalMap&&st.enable(11),$t.objectSpaceNormalMap&&st.enable(12),$t.tangentSpaceNormalMap&&st.enable(13),$t.clearcoat&&st.enable(14),$t.clearcoatMap&&st.enable(15),$t.clearcoatRoughnessMap&&st.enable(16),$t.clearcoatNormalMap&&st.enable(17),$t.iridescence&&st.enable(18),$t.iridescenceMap&&st.enable(19),$t.iridescenceThicknessMap&&st.enable(20),$t.displacementMap&&st.enable(21),$t.specularMap&&st.enable(22),$t.roughnessMap&&st.enable(23),$t.metalnessMap&&st.enable(24),$t.gradientMap&&st.enable(25),$t.alphaMap&&st.enable(26),$t.alphaTest&&st.enable(27),$t.vertexColors&&st.enable(28),$t.vertexAlphas&&st.enable(29),$t.vertexUvs&&st.enable(30),$t.vertexTangents&&st.enable(31),$t.uvsVertexOnly&&st.enable(32),$t.fog&&st.enable(33),Et.push(st.mask),st.disableAll(),$t.useFog&&st.enable(0),$t.flatShading&&st.enable(1),$t.logarithmicDepthBuffer&&st.enable(2),$t.skinning&&st.enable(3),$t.morphTargets&&st.enable(4),$t.morphNormals&&st.enable(5),$t.morphColors&&st.enable(6),$t.premultipliedAlpha&&st.enable(7),$t.shadowMapEnabled&&st.enable(8),$t.physicallyCorrectLights&&st.enable(9),$t.doubleSided&&st.enable(10),$t.flipSided&&st.enable(11),$t.useDepthPacking&&st.enable(12),$t.dithering&&st.enable(13),$t.specularIntensityMap&&st.enable(14),$t.specularColorMap&&st.enable(15),$t.transmission&&st.enable(16),$t.transmissionMap&&st.enable(17),$t.thicknessMap&&st.enable(18),$t.sheen&&st.enable(19),$t.sheenColorMap&&st.enable(20),$t.sheenRoughnessMap&&st.enable(21),$t.decodeVideoTexture&&st.enable(22),$t.opaque&&st.enable(23),Et.push(st.mask)}function xt(Et){const $t=mt[Et.type];let Dt;if($t){const jt=ShaderLib[$t];Dt=UniformsUtils.clone(jt.uniforms)}else Dt=Et.uniforms;return Dt}function kt(Et,$t){let Dt;for(let jt=0,Pt=ct.length;jt0?rt.push(bt):pt.transparent===!0?it.push(bt):nt.push(bt)}function lt(ht,dt,pt,mt,gt,yt){const bt=at(ht,dt,pt,mt,gt,yt);pt.transmission>0?rt.unshift(bt):pt.transparent===!0?it.unshift(bt):nt.unshift(bt)}function ct(ht,dt){nt.length>1&&nt.sort(ht||painterSortStable),rt.length>1&&rt.sort(dt||reversePainterSortStable),it.length>1&&it.sort(dt||reversePainterSortStable)}function ut(){for(let ht=et,dt=tt.length;ht=tt.get(rt).length?(ot=new WebGLRenderList,tt.get(rt).push(ot)):ot=tt.get(rt)[it],ot}function nt(){tt=new WeakMap}return{get:et,dispose:nt}}function UniformsCache(){const tt={};return{get:function(et){if(tt[et.id]!==void 0)return tt[et.id];let nt;switch(et.type){case"DirectionalLight":nt={direction:new Vector3,color:new Color$1};break;case"SpotLight":nt={position:new Vector3,direction:new Vector3,color:new Color$1,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":nt={position:new Vector3,color:new Color$1,distance:0,decay:0};break;case"HemisphereLight":nt={direction:new Vector3,skyColor:new Color$1,groundColor:new Color$1};break;case"RectAreaLight":nt={color:new Color$1,position:new Vector3,halfWidth:new Vector3,halfHeight:new Vector3};break}return tt[et.id]=nt,nt}}}function ShadowUniformsCache(){const tt={};return{get:function(et){if(tt[et.id]!==void 0)return tt[et.id];let nt;switch(et.type){case"DirectionalLight":nt={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Vector2};break;case"SpotLight":nt={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Vector2};break;case"PointLight":nt={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Vector2,shadowCameraNear:1,shadowCameraFar:1e3};break}return tt[et.id]=nt,nt}}}let nextVersion=0;function shadowCastingLightsFirst(tt,et){return(et.castShadow?1:0)-(tt.castShadow?1:0)}function WebGLLights(tt,et){const nt=new UniformsCache,rt=ShadowUniformsCache(),it={version:0,hash:{directionalLength:-1,pointLength:-1,spotLength:-1,rectAreaLength:-1,hemiLength:-1,numDirectionalShadows:-1,numPointShadows:-1,numSpotShadows:-1},ambient:[0,0,0],probe:[],directional:[],directionalShadow:[],directionalShadowMap:[],directionalShadowMatrix:[],spot:[],spotShadow:[],spotShadowMap:[],spotShadowMatrix:[],rectArea:[],rectAreaLTC1:null,rectAreaLTC2:null,point:[],pointShadow:[],pointShadowMap:[],pointShadowMatrix:[],hemi:[]};for(let ut=0;ut<9;ut++)it.probe.push(new Vector3);const ot=new Vector3,at=new Matrix4,st=new Matrix4;function lt(ut,ht){let dt=0,pt=0,mt=0;for(let $t=0;$t<9;$t++)it.probe[$t].set(0,0,0);let gt=0,yt=0,bt=0,vt=0,xt=0,kt=0,St=0,Tt=0;ut.sort(shadowCastingLightsFirst);const At=ht!==!0?Math.PI:1;for(let $t=0,Dt=ut.length;$t0&&(et.isWebGL2||tt.has("OES_texture_float_linear")===!0?(it.rectAreaLTC1=UniformsLib.LTC_FLOAT_1,it.rectAreaLTC2=UniformsLib.LTC_FLOAT_2):tt.has("OES_texture_half_float_linear")===!0?(it.rectAreaLTC1=UniformsLib.LTC_HALF_1,it.rectAreaLTC2=UniformsLib.LTC_HALF_2):console.error("THREE.WebGLRenderer: Unable to use RectAreaLight. Missing WebGL extensions.")),it.ambient[0]=dt,it.ambient[1]=pt,it.ambient[2]=mt;const Et=it.hash;(Et.directionalLength!==gt||Et.pointLength!==yt||Et.spotLength!==bt||Et.rectAreaLength!==vt||Et.hemiLength!==xt||Et.numDirectionalShadows!==kt||Et.numPointShadows!==St||Et.numSpotShadows!==Tt)&&(it.directional.length=gt,it.spot.length=bt,it.rectArea.length=vt,it.point.length=yt,it.hemi.length=xt,it.directionalShadow.length=kt,it.directionalShadowMap.length=kt,it.pointShadow.length=St,it.pointShadowMap.length=St,it.spotShadow.length=Tt,it.spotShadowMap.length=Tt,it.directionalShadowMatrix.length=kt,it.pointShadowMatrix.length=St,it.spotShadowMatrix.length=Tt,Et.directionalLength=gt,Et.pointLength=yt,Et.spotLength=bt,Et.rectAreaLength=vt,Et.hemiLength=xt,Et.numDirectionalShadows=kt,Et.numPointShadows=St,Et.numSpotShadows=Tt,it.version=nextVersion++)}function ct(ut,ht){let dt=0,pt=0,mt=0,gt=0,yt=0;const bt=ht.matrixWorldInverse;for(let vt=0,xt=ut.length;vt=nt.get(ot).length?(st=new WebGLRenderState(tt,et),nt.get(ot).push(st)):st=nt.get(ot)[at],st}function it(){nt=new WeakMap}return{get:rt,dispose:it}}class MeshDepthMaterial extends Material{constructor(et){super(),this.isMeshDepthMaterial=!0,this.type="MeshDepthMaterial",this.depthPacking=BasicDepthPacking,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.setValues(et)}copy(et){return super.copy(et),this.depthPacking=et.depthPacking,this.map=et.map,this.alphaMap=et.alphaMap,this.displacementMap=et.displacementMap,this.displacementScale=et.displacementScale,this.displacementBias=et.displacementBias,this.wireframe=et.wireframe,this.wireframeLinewidth=et.wireframeLinewidth,this}}class MeshDistanceMaterial extends Material{constructor(et){super(),this.isMeshDistanceMaterial=!0,this.type="MeshDistanceMaterial",this.referencePosition=new Vector3,this.nearDistance=1,this.farDistance=1e3,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.setValues(et)}copy(et){return super.copy(et),this.referencePosition.copy(et.referencePosition),this.nearDistance=et.nearDistance,this.farDistance=et.farDistance,this.map=et.map,this.alphaMap=et.alphaMap,this.displacementMap=et.displacementMap,this.displacementScale=et.displacementScale,this.displacementBias=et.displacementBias,this}}const vertex=`void main() { - gl_Position = vec4( position, 1.0 ); -}`,fragment$h=`uniform sampler2D shadow_pass; -uniform vec2 resolution; -uniform float radius; -#include -void main() { - const float samples = float( VSM_SAMPLES ); - float mean = 0.0; - float squared_mean = 0.0; - float uvStride = samples <= 1.0 ? 0.0 : 2.0 / ( samples - 1.0 ); - float uvStart = samples <= 1.0 ? 0.0 : - 1.0; - for ( float i = 0.0; i < samples; i ++ ) { - float uvOffset = uvStart + i * uvStride; - #ifdef HORIZONTAL_PASS - vec2 distribution = unpackRGBATo2Half( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( uvOffset, 0.0 ) * radius ) / resolution ) ); - mean += distribution.x; - squared_mean += distribution.y * distribution.y + distribution.x * distribution.x; - #else - float depth = unpackRGBAToDepth( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( 0.0, uvOffset ) * radius ) / resolution ) ); - mean += depth; - squared_mean += depth * depth; - #endif - } - mean = mean / samples; - squared_mean = squared_mean / samples; - float std_dev = sqrt( squared_mean - mean * mean ); - gl_FragColor = pack2HalfToRGBA( vec2( mean, std_dev ) ); -}`;function WebGLShadowMap(tt,et,nt){let rt=new Frustum;const it=new Vector2,ot=new Vector2,at=new Vector4,st=new MeshDepthMaterial({depthPacking:RGBADepthPacking}),lt=new MeshDistanceMaterial,ct={},ut=nt.maxTextureSize,ht={0:BackSide,1:FrontSide,2:DoubleSide},dt=new ShaderMaterial({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new Vector2},radius:{value:4}},vertexShader:vertex,fragmentShader:fragment$h}),pt=dt.clone();pt.defines.HORIZONTAL_PASS=1;const mt=new BufferGeometry;mt.setAttribute("position",new BufferAttribute(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));const gt=new Mesh(mt,dt),yt=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=PCFShadowMap,this.render=function(kt,St,Tt){if(yt.enabled===!1||yt.autoUpdate===!1&&yt.needsUpdate===!1||kt.length===0)return;const At=tt.getRenderTarget(),Et=tt.getActiveCubeFace(),$t=tt.getActiveMipmapLevel(),Dt=tt.state;Dt.setBlending(NoBlending),Dt.buffers.color.setClear(1,1,1,1),Dt.buffers.depth.setTest(!0),Dt.setScissorTest(!1);for(let jt=0,Pt=kt.length;jtut||it.y>ut)&&(it.x>ut&&(ot.x=Math.floor(ut/It.x),it.x=ot.x*It.x,wt.mapSize.x=ot.x),it.y>ut&&(ot.y=Math.floor(ut/It.y),it.y=ot.y*It.y,wt.mapSize.y=ot.y)),wt.map===null){const Wt=this.type!==VSMShadowMap?{minFilter:NearestFilter,magFilter:NearestFilter}:{};wt.map=new WebGLRenderTarget(it.x,it.y,Wt),wt.map.texture.name=Ct.name+".shadowMap",wt.camera.updateProjectionMatrix()}tt.setRenderTarget(wt.map),tt.clear();const Ot=wt.getViewportCount();for(let Wt=0;Wt0){const Pt=Dt.uuid,Ct=St.uuid;let wt=ct[Pt];wt===void 0&&(wt={},ct[Pt]=wt);let It=wt[Ct];It===void 0&&(It=Dt.clone(),wt[Ct]=It),Dt=It}return Dt.visible=St.visible,Dt.wireframe=St.wireframe,$t===VSMShadowMap?Dt.side=St.shadowSide!==null?St.shadowSide:St.side:Dt.side=St.shadowSide!==null?St.shadowSide:ht[St.side],Dt.alphaMap=St.alphaMap,Dt.alphaTest=St.alphaTest,Dt.clipShadows=St.clipShadows,Dt.clippingPlanes=St.clippingPlanes,Dt.clipIntersection=St.clipIntersection,Dt.displacementMap=St.displacementMap,Dt.displacementScale=St.displacementScale,Dt.displacementBias=St.displacementBias,Dt.wireframeLinewidth=St.wireframeLinewidth,Dt.linewidth=St.linewidth,Tt.isPointLight===!0&&Dt.isMeshDistanceMaterial===!0&&(Dt.referencePosition.setFromMatrixPosition(Tt.matrixWorld),Dt.nearDistance=At,Dt.farDistance=Et),Dt}function xt(kt,St,Tt,At,Et){if(kt.visible===!1)return;if(kt.layers.test(St.layers)&&(kt.isMesh||kt.isLine||kt.isPoints)&&(kt.castShadow||kt.receiveShadow&&Et===VSMShadowMap)&&(!kt.frustumCulled||rt.intersectsObject(kt))){kt.modelViewMatrix.multiplyMatrices(Tt.matrixWorldInverse,kt.matrixWorld);const jt=et.update(kt),Pt=kt.material;if(Array.isArray(Pt)){const Ct=jt.groups;for(let wt=0,It=Ct.length;wt=1):zt.indexOf("OpenGL ES")!==-1&&(Wt=parseFloat(/^OpenGL ES (\d)/.exec(zt)[1]),Ot=Wt>=2);let Ft=null,Nt={};const Ut=tt.getParameter(3088),Mt=tt.getParameter(2978),Ht=new Vector4().fromArray(Ut),en=new Vector4().fromArray(Mt);function sn(zn,Jn,Hn){const pr=new Uint8Array(4),fr=tt.createTexture();tt.bindTexture(zn,fr),tt.texParameteri(zn,10241,9728),tt.texParameteri(zn,10240,9728);for(let xr=0;xrkn||wn.height>kn)&&(Dn=kn/Math.max(wn.width,wn.height)),Dn<1||fn===!0)if(typeof HTMLImageElement<"u"&&wn instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&wn instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&wn instanceof ImageBitmap){const un=fn?floorPowerOfTwo:Math.floor,Zt=un(Dn*wn.width),Xt=un(Dn*wn.height);gt===void 0&&(gt=vt(Zt,Xt));const Sn=pn?vt(Zt,Xt):gt;return Sn.width=Zt,Sn.height=Xt,Sn.getContext("2d").drawImage(wn,0,0,Zt,Xt),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+wn.width+"x"+wn.height+") to ("+Zt+"x"+Xt+")."),Sn}else return"data"in wn&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+wn.width+"x"+wn.height+")."),wn;return wn}function kt(wn){return isPowerOfTwo(wn.width)&&isPowerOfTwo(wn.height)}function St(wn){return st?!1:wn.wrapS!==ClampToEdgeWrapping||wn.wrapT!==ClampToEdgeWrapping||wn.minFilter!==NearestFilter&&wn.minFilter!==LinearFilter}function Tt(wn,fn){return wn.generateMipmaps&&fn&&wn.minFilter!==NearestFilter&&wn.minFilter!==LinearFilter}function At(wn){tt.generateMipmap(wn)}function Et(wn,fn,pn,kn,Dn=!1){if(st===!1)return fn;if(wn!==null){if(tt[wn]!==void 0)return tt[wn];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+wn+"'")}let un=fn;return fn===6403&&(pn===5126&&(un=33326),pn===5131&&(un=33325),pn===5121&&(un=33321)),fn===33319&&(pn===5126&&(un=33328),pn===5131&&(un=33327),pn===5121&&(un=33323)),fn===6408&&(pn===5126&&(un=34836),pn===5131&&(un=34842),pn===5121&&(un=kn===sRGBEncoding&&Dn===!1?35907:32856),pn===32819&&(un=32854),pn===32820&&(un=32855)),(un===33325||un===33326||un===33327||un===33328||un===34842||un===34836)&&et.get("EXT_color_buffer_float"),un}function $t(wn,fn,pn){return Tt(wn,pn)===!0||wn.isFramebufferTexture&&wn.minFilter!==NearestFilter&&wn.minFilter!==LinearFilter?Math.log2(Math.max(fn.width,fn.height))+1:wn.mipmaps!==void 0&&wn.mipmaps.length>0?wn.mipmaps.length:wn.isCompressedTexture&&Array.isArray(wn.image)?fn.mipmaps.length:1}function Dt(wn){return wn===NearestFilter||wn===NearestMipmapNearestFilter||wn===NearestMipmapLinearFilter?9728:9729}function jt(wn){const fn=wn.target;fn.removeEventListener("dispose",jt),Ct(fn),fn.isVideoTexture&&mt.delete(fn)}function Pt(wn){const fn=wn.target;fn.removeEventListener("dispose",Pt),It(fn)}function Ct(wn){const fn=rt.get(wn);if(fn.__webglInit===void 0)return;const pn=wn.source,kn=yt.get(pn);if(kn){const Dn=kn[fn.__cacheKey];Dn.usedTimes--,Dn.usedTimes===0&&wt(wn),Object.keys(kn).length===0&&yt.delete(pn)}rt.remove(wn)}function wt(wn){const fn=rt.get(wn);tt.deleteTexture(fn.__webglTexture);const pn=wn.source,kn=yt.get(pn);delete kn[fn.__cacheKey],at.memory.textures--}function It(wn){const fn=wn.texture,pn=rt.get(wn),kn=rt.get(fn);if(kn.__webglTexture!==void 0&&(tt.deleteTexture(kn.__webglTexture),at.memory.textures--),wn.depthTexture&&wn.depthTexture.dispose(),wn.isWebGLCubeRenderTarget)for(let Dn=0;Dn<6;Dn++)tt.deleteFramebuffer(pn.__webglFramebuffer[Dn]),pn.__webglDepthbuffer&&tt.deleteRenderbuffer(pn.__webglDepthbuffer[Dn]);else{if(tt.deleteFramebuffer(pn.__webglFramebuffer),pn.__webglDepthbuffer&&tt.deleteRenderbuffer(pn.__webglDepthbuffer),pn.__webglMultisampledFramebuffer&&tt.deleteFramebuffer(pn.__webglMultisampledFramebuffer),pn.__webglColorRenderbuffer)for(let Dn=0;Dn=lt&&console.warn("THREE.WebGLTextures: Trying to use "+wn+" texture units while this GPU supports only "+lt),Ot+=1,wn}function Ft(wn){const fn=[];return fn.push(wn.wrapS),fn.push(wn.wrapT),fn.push(wn.magFilter),fn.push(wn.minFilter),fn.push(wn.anisotropy),fn.push(wn.internalFormat),fn.push(wn.format),fn.push(wn.type),fn.push(wn.generateMipmaps),fn.push(wn.premultiplyAlpha),fn.push(wn.flipY),fn.push(wn.unpackAlignment),fn.push(wn.encoding),fn.join()}function Nt(wn,fn){const pn=rt.get(wn);if(wn.isVideoTexture&&In(wn),wn.isRenderTargetTexture===!1&&wn.version>0&&pn.__version!==wn.version){const kn=wn.image;if(kn===null)console.warn("THREE.WebGLRenderer: Texture marked for update but no image data found.");else if(kn.complete===!1)console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete");else{nn(pn,wn,fn);return}}nt.activeTexture(33984+fn),nt.bindTexture(3553,pn.__webglTexture)}function Ut(wn,fn){const pn=rt.get(wn);if(wn.version>0&&pn.__version!==wn.version){nn(pn,wn,fn);return}nt.activeTexture(33984+fn),nt.bindTexture(35866,pn.__webglTexture)}function Mt(wn,fn){const pn=rt.get(wn);if(wn.version>0&&pn.__version!==wn.version){nn(pn,wn,fn);return}nt.activeTexture(33984+fn),nt.bindTexture(32879,pn.__webglTexture)}function Ht(wn,fn){const pn=rt.get(wn);if(wn.version>0&&pn.__version!==wn.version){hn(pn,wn,fn);return}nt.activeTexture(33984+fn),nt.bindTexture(34067,pn.__webglTexture)}const en={[RepeatWrapping]:10497,[ClampToEdgeWrapping]:33071,[MirroredRepeatWrapping]:33648},sn={[NearestFilter]:9728,[NearestMipmapNearestFilter]:9984,[NearestMipmapLinearFilter]:9986,[LinearFilter]:9729,[LinearMipmapNearestFilter]:9985,[LinearMipmapLinearFilter]:9987};function Kt(wn,fn,pn){if(pn?(tt.texParameteri(wn,10242,en[fn.wrapS]),tt.texParameteri(wn,10243,en[fn.wrapT]),(wn===32879||wn===35866)&&tt.texParameteri(wn,32882,en[fn.wrapR]),tt.texParameteri(wn,10240,sn[fn.magFilter]),tt.texParameteri(wn,10241,sn[fn.minFilter])):(tt.texParameteri(wn,10242,33071),tt.texParameteri(wn,10243,33071),(wn===32879||wn===35866)&&tt.texParameteri(wn,32882,33071),(fn.wrapS!==ClampToEdgeWrapping||fn.wrapT!==ClampToEdgeWrapping)&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping."),tt.texParameteri(wn,10240,Dt(fn.magFilter)),tt.texParameteri(wn,10241,Dt(fn.minFilter)),fn.minFilter!==NearestFilter&&fn.minFilter!==LinearFilter&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter.")),et.has("EXT_texture_filter_anisotropic")===!0){const kn=et.get("EXT_texture_filter_anisotropic");if(fn.type===FloatType&&et.has("OES_texture_float_linear")===!1||st===!1&&fn.type===HalfFloatType&&et.has("OES_texture_half_float_linear")===!1)return;(fn.anisotropy>1||rt.get(fn).__currentAnisotropy)&&(tt.texParameterf(wn,kn.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(fn.anisotropy,it.getMaxAnisotropy())),rt.get(fn).__currentAnisotropy=fn.anisotropy)}}function rn(wn,fn){let pn=!1;wn.__webglInit===void 0&&(wn.__webglInit=!0,fn.addEventListener("dispose",jt));const kn=fn.source;let Dn=yt.get(kn);Dn===void 0&&(Dn={},yt.set(kn,Dn));const un=Ft(fn);if(un!==wn.__cacheKey){Dn[un]===void 0&&(Dn[un]={texture:tt.createTexture(),usedTimes:0},at.memory.textures++,pn=!0),Dn[un].usedTimes++;const Zt=Dn[wn.__cacheKey];Zt!==void 0&&(Dn[wn.__cacheKey].usedTimes--,Zt.usedTimes===0&&wt(fn)),wn.__cacheKey=un,wn.__webglTexture=Dn[un].texture}return pn}function nn(wn,fn,pn){let kn=3553;fn.isDataArrayTexture&&(kn=35866),fn.isData3DTexture&&(kn=32879);const Dn=rn(wn,fn),un=fn.source;if(nt.activeTexture(33984+pn),nt.bindTexture(kn,wn.__webglTexture),un.version!==un.__currentVersion||Dn===!0){tt.pixelStorei(37440,fn.flipY),tt.pixelStorei(37441,fn.premultiplyAlpha),tt.pixelStorei(3317,fn.unpackAlignment),tt.pixelStorei(37443,0);const Zt=St(fn)&&kt(fn.image)===!1;let Xt=xt(fn.image,Zt,!1,ut);Xt=An(fn,Xt);const Sn=kt(Xt)||st,Rn=ot.convert(fn.format,fn.encoding);let jn=ot.convert(fn.type),On=Et(fn.internalFormat,Rn,jn,fn.encoding,fn.isVideoTexture);Kt(kn,fn,Sn);let Zn;const Vn=fn.mipmaps,qn=st&&fn.isVideoTexture!==!0,zn=un.__currentVersion===void 0||Dn===!0,Jn=$t(fn,Xt,Sn);if(fn.isDepthTexture)On=6402,st?fn.type===FloatType?On=36012:fn.type===UnsignedIntType?On=33190:fn.type===UnsignedInt248Type?On=35056:On=33189:fn.type===FloatType&&console.error("WebGLRenderer: Floating point depth texture requires WebGL2."),fn.format===DepthFormat&&On===6402&&fn.type!==UnsignedShortType&&fn.type!==UnsignedIntType&&(console.warn("THREE.WebGLRenderer: Use UnsignedShortType or UnsignedIntType for DepthFormat DepthTexture."),fn.type=UnsignedIntType,jn=ot.convert(fn.type)),fn.format===DepthStencilFormat&&On===6402&&(On=34041,fn.type!==UnsignedInt248Type&&(console.warn("THREE.WebGLRenderer: Use UnsignedInt248Type for DepthStencilFormat DepthTexture."),fn.type=UnsignedInt248Type,jn=ot.convert(fn.type))),zn&&(qn?nt.texStorage2D(3553,1,On,Xt.width,Xt.height):nt.texImage2D(3553,0,On,Xt.width,Xt.height,0,Rn,jn,null));else if(fn.isDataTexture)if(Vn.length>0&&Sn){qn&&zn&&nt.texStorage2D(3553,Jn,On,Vn[0].width,Vn[0].height);for(let Hn=0,pr=Vn.length;Hn>=1,pr>>=1}}else if(Vn.length>0&&Sn){qn&&zn&&nt.texStorage2D(3553,Jn,On,Vn[0].width,Vn[0].height);for(let Hn=0,pr=Vn.length;Hn0&&zn++,nt.texStorage2D(34067,zn,Zn,Xt[0].width,Xt[0].height));for(let Hn=0;Hn<6;Hn++)if(Zt){Vn?nt.texSubImage2D(34069+Hn,0,0,0,Xt[Hn].width,Xt[Hn].height,jn,On,Xt[Hn].data):nt.texImage2D(34069+Hn,0,Zn,Xt[Hn].width,Xt[Hn].height,0,jn,On,Xt[Hn].data);for(let pr=0;pr0&&mn(wn)===!1){const Xt=un?fn:[fn];pn.__webglMultisampledFramebuffer=tt.createFramebuffer(),pn.__webglColorRenderbuffer=[],nt.bindFramebuffer(36160,pn.__webglMultisampledFramebuffer);for(let Sn=0;Sn0&&mn(wn)===!1){const fn=wn.isWebGLMultipleRenderTargets?wn.texture:[wn.texture],pn=wn.width,kn=wn.height;let Dn=16384;const un=[],Zt=wn.stencilBuffer?33306:36096,Xt=rt.get(wn),Sn=wn.isWebGLMultipleRenderTargets===!0;if(Sn)for(let Rn=0;Rn0&&et.has("WEBGL_multisampled_render_to_texture")===!0&&fn.__useRenderToTexture!==!1}function In(wn){const fn=at.render.frame;mt.get(wn)!==fn&&(mt.set(wn,fn),wn.update())}function An(wn,fn){const pn=wn.encoding,kn=wn.format,Dn=wn.type;return wn.isCompressedTexture===!0||wn.isVideoTexture===!0||wn.format===_SRGBAFormat||pn!==LinearEncoding&&(pn===sRGBEncoding?st===!1?et.has("EXT_sRGB")===!0&&kn===RGBAFormat?(wn.format=_SRGBAFormat,wn.minFilter=LinearFilter,wn.generateMipmaps=!1):fn=ImageUtils.sRGBToLinear(fn):(kn!==RGBAFormat||Dn!==UnsignedByteType)&&console.warn("THREE.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType."):console.error("THREE.WebGLTextures: Unsupported texture encoding:",pn)),fn}this.allocateTextureUnit=zt,this.resetTextureUnits=Wt,this.setTexture2D=Nt,this.setTexture2DArray=Ut,this.setTexture3D=Mt,this.setTextureCube=Ht,this.rebindTextures=Pn,this.setupRenderTarget=$n,this.updateRenderTargetMipmap=Nn,this.updateMultisampleRenderTarget=Tn,this.setupDepthRenderbuffer=_n,this.setupFrameBufferTexture=vn,this.useMultisampledRTT=mn}function WebGLUtils(tt,et,nt){const rt=nt.isWebGL2;function it(ot,at=null){let st;if(ot===UnsignedByteType)return 5121;if(ot===UnsignedShort4444Type)return 32819;if(ot===UnsignedShort5551Type)return 32820;if(ot===ByteType)return 5120;if(ot===ShortType)return 5122;if(ot===UnsignedShortType)return 5123;if(ot===IntType)return 5124;if(ot===UnsignedIntType)return 5125;if(ot===FloatType)return 5126;if(ot===HalfFloatType)return rt?5131:(st=et.get("OES_texture_half_float"),st!==null?st.HALF_FLOAT_OES:null);if(ot===AlphaFormat)return 6406;if(ot===RGBAFormat)return 6408;if(ot===LuminanceFormat)return 6409;if(ot===LuminanceAlphaFormat)return 6410;if(ot===DepthFormat)return 6402;if(ot===DepthStencilFormat)return 34041;if(ot===RedFormat)return 6403;if(ot===RGBFormat)return console.warn("THREE.WebGLRenderer: THREE.RGBFormat has been removed. Use THREE.RGBAFormat instead. https://github.com/mrdoob/three.js/pull/23228"),6408;if(ot===_SRGBAFormat)return st=et.get("EXT_sRGB"),st!==null?st.SRGB_ALPHA_EXT:null;if(ot===RedIntegerFormat)return 36244;if(ot===RGFormat)return 33319;if(ot===RGIntegerFormat)return 33320;if(ot===RGBAIntegerFormat)return 36249;if(ot===RGB_S3TC_DXT1_Format||ot===RGBA_S3TC_DXT1_Format||ot===RGBA_S3TC_DXT3_Format||ot===RGBA_S3TC_DXT5_Format)if(at===sRGBEncoding)if(st=et.get("WEBGL_compressed_texture_s3tc_srgb"),st!==null){if(ot===RGB_S3TC_DXT1_Format)return st.COMPRESSED_SRGB_S3TC_DXT1_EXT;if(ot===RGBA_S3TC_DXT1_Format)return st.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT;if(ot===RGBA_S3TC_DXT3_Format)return st.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT;if(ot===RGBA_S3TC_DXT5_Format)return st.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT}else return null;else if(st=et.get("WEBGL_compressed_texture_s3tc"),st!==null){if(ot===RGB_S3TC_DXT1_Format)return st.COMPRESSED_RGB_S3TC_DXT1_EXT;if(ot===RGBA_S3TC_DXT1_Format)return st.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(ot===RGBA_S3TC_DXT3_Format)return st.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(ot===RGBA_S3TC_DXT5_Format)return st.COMPRESSED_RGBA_S3TC_DXT5_EXT}else return null;if(ot===RGB_PVRTC_4BPPV1_Format||ot===RGB_PVRTC_2BPPV1_Format||ot===RGBA_PVRTC_4BPPV1_Format||ot===RGBA_PVRTC_2BPPV1_Format)if(st=et.get("WEBGL_compressed_texture_pvrtc"),st!==null){if(ot===RGB_PVRTC_4BPPV1_Format)return st.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(ot===RGB_PVRTC_2BPPV1_Format)return st.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(ot===RGBA_PVRTC_4BPPV1_Format)return st.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(ot===RGBA_PVRTC_2BPPV1_Format)return st.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}else return null;if(ot===RGB_ETC1_Format)return st=et.get("WEBGL_compressed_texture_etc1"),st!==null?st.COMPRESSED_RGB_ETC1_WEBGL:null;if(ot===RGB_ETC2_Format||ot===RGBA_ETC2_EAC_Format)if(st=et.get("WEBGL_compressed_texture_etc"),st!==null){if(ot===RGB_ETC2_Format)return at===sRGBEncoding?st.COMPRESSED_SRGB8_ETC2:st.COMPRESSED_RGB8_ETC2;if(ot===RGBA_ETC2_EAC_Format)return at===sRGBEncoding?st.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:st.COMPRESSED_RGBA8_ETC2_EAC}else return null;if(ot===RGBA_ASTC_4x4_Format||ot===RGBA_ASTC_5x4_Format||ot===RGBA_ASTC_5x5_Format||ot===RGBA_ASTC_6x5_Format||ot===RGBA_ASTC_6x6_Format||ot===RGBA_ASTC_8x5_Format||ot===RGBA_ASTC_8x6_Format||ot===RGBA_ASTC_8x8_Format||ot===RGBA_ASTC_10x5_Format||ot===RGBA_ASTC_10x6_Format||ot===RGBA_ASTC_10x8_Format||ot===RGBA_ASTC_10x10_Format||ot===RGBA_ASTC_12x10_Format||ot===RGBA_ASTC_12x12_Format)if(st=et.get("WEBGL_compressed_texture_astc"),st!==null){if(ot===RGBA_ASTC_4x4_Format)return at===sRGBEncoding?st.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR:st.COMPRESSED_RGBA_ASTC_4x4_KHR;if(ot===RGBA_ASTC_5x4_Format)return at===sRGBEncoding?st.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR:st.COMPRESSED_RGBA_ASTC_5x4_KHR;if(ot===RGBA_ASTC_5x5_Format)return at===sRGBEncoding?st.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR:st.COMPRESSED_RGBA_ASTC_5x5_KHR;if(ot===RGBA_ASTC_6x5_Format)return at===sRGBEncoding?st.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR:st.COMPRESSED_RGBA_ASTC_6x5_KHR;if(ot===RGBA_ASTC_6x6_Format)return at===sRGBEncoding?st.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR:st.COMPRESSED_RGBA_ASTC_6x6_KHR;if(ot===RGBA_ASTC_8x5_Format)return at===sRGBEncoding?st.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR:st.COMPRESSED_RGBA_ASTC_8x5_KHR;if(ot===RGBA_ASTC_8x6_Format)return at===sRGBEncoding?st.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR:st.COMPRESSED_RGBA_ASTC_8x6_KHR;if(ot===RGBA_ASTC_8x8_Format)return at===sRGBEncoding?st.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR:st.COMPRESSED_RGBA_ASTC_8x8_KHR;if(ot===RGBA_ASTC_10x5_Format)return at===sRGBEncoding?st.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR:st.COMPRESSED_RGBA_ASTC_10x5_KHR;if(ot===RGBA_ASTC_10x6_Format)return at===sRGBEncoding?st.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR:st.COMPRESSED_RGBA_ASTC_10x6_KHR;if(ot===RGBA_ASTC_10x8_Format)return at===sRGBEncoding?st.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR:st.COMPRESSED_RGBA_ASTC_10x8_KHR;if(ot===RGBA_ASTC_10x10_Format)return at===sRGBEncoding?st.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR:st.COMPRESSED_RGBA_ASTC_10x10_KHR;if(ot===RGBA_ASTC_12x10_Format)return at===sRGBEncoding?st.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR:st.COMPRESSED_RGBA_ASTC_12x10_KHR;if(ot===RGBA_ASTC_12x12_Format)return at===sRGBEncoding?st.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR:st.COMPRESSED_RGBA_ASTC_12x12_KHR}else return null;if(ot===RGBA_BPTC_Format)if(st=et.get("EXT_texture_compression_bptc"),st!==null){if(ot===RGBA_BPTC_Format)return at===sRGBEncoding?st.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT:st.COMPRESSED_RGBA_BPTC_UNORM_EXT}else return null;return ot===UnsignedInt248Type?rt?34042:(st=et.get("WEBGL_depth_texture"),st!==null?st.UNSIGNED_INT_24_8_WEBGL:null):tt[ot]!==void 0?tt[ot]:null}return{convert:it}}class ArrayCamera extends PerspectiveCamera{constructor(et=[]){super(),this.isArrayCamera=!0,this.cameras=et}}class Group extends Object3D{constructor(){super(),this.isGroup=!0,this.type="Group"}}const _moveEvent={type:"move"};class WebXRController{constructor(){this._targetRay=null,this._grip=null,this._hand=null}getHandSpace(){return this._hand===null&&(this._hand=new Group,this._hand.matrixAutoUpdate=!1,this._hand.visible=!1,this._hand.joints={},this._hand.inputState={pinching:!1}),this._hand}getTargetRaySpace(){return this._targetRay===null&&(this._targetRay=new Group,this._targetRay.matrixAutoUpdate=!1,this._targetRay.visible=!1,this._targetRay.hasLinearVelocity=!1,this._targetRay.linearVelocity=new Vector3,this._targetRay.hasAngularVelocity=!1,this._targetRay.angularVelocity=new Vector3),this._targetRay}getGripSpace(){return this._grip===null&&(this._grip=new Group,this._grip.matrixAutoUpdate=!1,this._grip.visible=!1,this._grip.hasLinearVelocity=!1,this._grip.linearVelocity=new Vector3,this._grip.hasAngularVelocity=!1,this._grip.angularVelocity=new Vector3),this._grip}dispatchEvent(et){return this._targetRay!==null&&this._targetRay.dispatchEvent(et),this._grip!==null&&this._grip.dispatchEvent(et),this._hand!==null&&this._hand.dispatchEvent(et),this}disconnect(et){return this.dispatchEvent({type:"disconnected",data:et}),this._targetRay!==null&&(this._targetRay.visible=!1),this._grip!==null&&(this._grip.visible=!1),this._hand!==null&&(this._hand.visible=!1),this}update(et,nt,rt){let it=null,ot=null,at=null;const st=this._targetRay,lt=this._grip,ct=this._hand;if(et&&nt.session.visibilityState!=="visible-blurred"){if(ct&&et.hand){at=!0;for(const gt of et.hand.values()){const yt=nt.getJointPose(gt,rt);if(ct.joints[gt.jointName]===void 0){const vt=new Group;vt.matrixAutoUpdate=!1,vt.visible=!1,ct.joints[gt.jointName]=vt,ct.add(vt)}const bt=ct.joints[gt.jointName];yt!==null&&(bt.matrix.fromArray(yt.transform.matrix),bt.matrix.decompose(bt.position,bt.rotation,bt.scale),bt.jointRadius=yt.radius),bt.visible=yt!==null}const ut=ct.joints["index-finger-tip"],ht=ct.joints["thumb-tip"],dt=ut.position.distanceTo(ht.position),pt=.02,mt=.005;ct.inputState.pinching&&dt>pt+mt?(ct.inputState.pinching=!1,this.dispatchEvent({type:"pinchend",handedness:et.handedness,target:this})):!ct.inputState.pinching&&dt<=pt-mt&&(ct.inputState.pinching=!0,this.dispatchEvent({type:"pinchstart",handedness:et.handedness,target:this}))}else lt!==null&&et.gripSpace&&(ot=nt.getPose(et.gripSpace,rt),ot!==null&&(lt.matrix.fromArray(ot.transform.matrix),lt.matrix.decompose(lt.position,lt.rotation,lt.scale),ot.linearVelocity?(lt.hasLinearVelocity=!0,lt.linearVelocity.copy(ot.linearVelocity)):lt.hasLinearVelocity=!1,ot.angularVelocity?(lt.hasAngularVelocity=!0,lt.angularVelocity.copy(ot.angularVelocity)):lt.hasAngularVelocity=!1));st!==null&&(it=nt.getPose(et.targetRaySpace,rt),it===null&&ot!==null&&(it=ot),it!==null&&(st.matrix.fromArray(it.transform.matrix),st.matrix.decompose(st.position,st.rotation,st.scale),it.linearVelocity?(st.hasLinearVelocity=!0,st.linearVelocity.copy(it.linearVelocity)):st.hasLinearVelocity=!1,it.angularVelocity?(st.hasAngularVelocity=!0,st.angularVelocity.copy(it.angularVelocity)):st.hasAngularVelocity=!1,this.dispatchEvent(_moveEvent)))}return st!==null&&(st.visible=it!==null),lt!==null&&(lt.visible=ot!==null),ct!==null&&(ct.visible=at!==null),this}}class DepthTexture extends Texture{constructor(et,nt,rt,it,ot,at,st,lt,ct,ut){if(ut=ut!==void 0?ut:DepthFormat,ut!==DepthFormat&&ut!==DepthStencilFormat)throw new Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");rt===void 0&&ut===DepthFormat&&(rt=UnsignedIntType),rt===void 0&&ut===DepthStencilFormat&&(rt=UnsignedInt248Type),super(null,it,ot,at,st,lt,ut,rt,ct),this.isDepthTexture=!0,this.image={width:et,height:nt},this.magFilter=st!==void 0?st:NearestFilter,this.minFilter=lt!==void 0?lt:NearestFilter,this.flipY=!1,this.generateMipmaps=!1}}class WebXRManager extends EventDispatcher$1{constructor(et,nt){super();const rt=this;let it=null,ot=1,at=null,st="local-floor",lt=null,ct=null,ut=null,ht=null,dt=null,pt=null;const mt=nt.getContextAttributes();let gt=null,yt=null;const bt=[],vt=[],xt=new PerspectiveCamera;xt.layers.enable(1),xt.viewport=new Vector4;const kt=new PerspectiveCamera;kt.layers.enable(2),kt.viewport=new Vector4;const St=[xt,kt],Tt=new ArrayCamera;Tt.layers.enable(1),Tt.layers.enable(2);let At=null,Et=null;this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(Ft){let Nt=bt[Ft];return Nt===void 0&&(Nt=new WebXRController,bt[Ft]=Nt),Nt.getTargetRaySpace()},this.getControllerGrip=function(Ft){let Nt=bt[Ft];return Nt===void 0&&(Nt=new WebXRController,bt[Ft]=Nt),Nt.getGripSpace()},this.getHand=function(Ft){let Nt=bt[Ft];return Nt===void 0&&(Nt=new WebXRController,bt[Ft]=Nt),Nt.getHandSpace()};function $t(Ft){const Nt=vt.indexOf(Ft.inputSource);if(Nt===-1)return;const Ut=bt[Nt];Ut!==void 0&&Ut.dispatchEvent({type:Ft.type,data:Ft.inputSource})}function Dt(){it.removeEventListener("select",$t),it.removeEventListener("selectstart",$t),it.removeEventListener("selectend",$t),it.removeEventListener("squeeze",$t),it.removeEventListener("squeezestart",$t),it.removeEventListener("squeezeend",$t),it.removeEventListener("end",Dt),it.removeEventListener("inputsourceschange",jt);for(let Ft=0;Ft=0&&(vt[Mt]=null,bt[Mt].dispatchEvent({type:"disconnected",data:Ut}))}for(let Nt=0;Nt=vt.length){vt.push(Ut),Mt=en;break}else if(vt[en]===null){vt[en]=Ut,Mt=en;break}if(Mt===-1)break}const Ht=bt[Mt];Ht&&Ht.dispatchEvent({type:"connected",data:Ut})}}const Pt=new Vector3,Ct=new Vector3;function wt(Ft,Nt,Ut){Pt.setFromMatrixPosition(Nt.matrixWorld),Ct.setFromMatrixPosition(Ut.matrixWorld);const Mt=Pt.distanceTo(Ct),Ht=Nt.projectionMatrix.elements,en=Ut.projectionMatrix.elements,sn=Ht[14]/(Ht[10]-1),Kt=Ht[14]/(Ht[10]+1),rn=(Ht[9]+1)/Ht[5],nn=(Ht[9]-1)/Ht[5],hn=(Ht[8]-1)/Ht[0],vn=(en[8]+1)/en[0],an=sn*hn,Qt=sn*vn,_n=Mt/(-hn+vn),Pn=_n*-hn;Nt.matrixWorld.decompose(Ft.position,Ft.quaternion,Ft.scale),Ft.translateX(Pn),Ft.translateZ(_n),Ft.matrixWorld.compose(Ft.position,Ft.quaternion,Ft.scale),Ft.matrixWorldInverse.copy(Ft.matrixWorld).invert();const $n=sn+_n,Nn=Kt+_n,Tn=an-Pn,cn=Qt+(Mt-Pn),mn=rn*Kt/Nn*$n,In=nn*Kt/Nn*$n;Ft.projectionMatrix.makePerspective(Tn,cn,mn,In,$n,Nn)}function It(Ft,Nt){Nt===null?Ft.matrixWorld.copy(Ft.matrix):Ft.matrixWorld.multiplyMatrices(Nt.matrixWorld,Ft.matrix),Ft.matrixWorldInverse.copy(Ft.matrixWorld).invert()}this.updateCamera=function(Ft){if(it===null)return;Tt.near=kt.near=xt.near=Ft.near,Tt.far=kt.far=xt.far=Ft.far,(At!==Tt.near||Et!==Tt.far)&&(it.updateRenderState({depthNear:Tt.near,depthFar:Tt.far}),At=Tt.near,Et=Tt.far);const Nt=Ft.parent,Ut=Tt.cameras;It(Tt,Nt);for(let Ht=0;Ht0&&(gt.alphaTest.value=yt.alphaTest);const bt=et.get(yt).envMap;if(bt&&(gt.envMap.value=bt,gt.flipEnvMap.value=bt.isCubeTexture&&bt.isRenderTargetTexture===!1?-1:1,gt.reflectivity.value=yt.reflectivity,gt.ior.value=yt.ior,gt.refractionRatio.value=yt.refractionRatio),yt.lightMap){gt.lightMap.value=yt.lightMap;const kt=tt.physicallyCorrectLights!==!0?Math.PI:1;gt.lightMapIntensity.value=yt.lightMapIntensity*kt}yt.aoMap&&(gt.aoMap.value=yt.aoMap,gt.aoMapIntensity.value=yt.aoMapIntensity);let vt;yt.map?vt=yt.map:yt.specularMap?vt=yt.specularMap:yt.displacementMap?vt=yt.displacementMap:yt.normalMap?vt=yt.normalMap:yt.bumpMap?vt=yt.bumpMap:yt.roughnessMap?vt=yt.roughnessMap:yt.metalnessMap?vt=yt.metalnessMap:yt.alphaMap?vt=yt.alphaMap:yt.emissiveMap?vt=yt.emissiveMap:yt.clearcoatMap?vt=yt.clearcoatMap:yt.clearcoatNormalMap?vt=yt.clearcoatNormalMap:yt.clearcoatRoughnessMap?vt=yt.clearcoatRoughnessMap:yt.iridescenceMap?vt=yt.iridescenceMap:yt.iridescenceThicknessMap?vt=yt.iridescenceThicknessMap:yt.specularIntensityMap?vt=yt.specularIntensityMap:yt.specularColorMap?vt=yt.specularColorMap:yt.transmissionMap?vt=yt.transmissionMap:yt.thicknessMap?vt=yt.thicknessMap:yt.sheenColorMap?vt=yt.sheenColorMap:yt.sheenRoughnessMap&&(vt=yt.sheenRoughnessMap),vt!==void 0&&(vt.isWebGLRenderTarget&&(vt=vt.texture),vt.matrixAutoUpdate===!0&&vt.updateMatrix(),gt.uvTransform.value.copy(vt.matrix));let xt;yt.aoMap?xt=yt.aoMap:yt.lightMap&&(xt=yt.lightMap),xt!==void 0&&(xt.isWebGLRenderTarget&&(xt=xt.texture),xt.matrixAutoUpdate===!0&&xt.updateMatrix(),gt.uv2Transform.value.copy(xt.matrix))}function ot(gt,yt){gt.diffuse.value.copy(yt.color),gt.opacity.value=yt.opacity}function at(gt,yt){gt.dashSize.value=yt.dashSize,gt.totalSize.value=yt.dashSize+yt.gapSize,gt.scale.value=yt.scale}function st(gt,yt,bt,vt){gt.diffuse.value.copy(yt.color),gt.opacity.value=yt.opacity,gt.size.value=yt.size*bt,gt.scale.value=vt*.5,yt.map&&(gt.map.value=yt.map),yt.alphaMap&&(gt.alphaMap.value=yt.alphaMap),yt.alphaTest>0&&(gt.alphaTest.value=yt.alphaTest);let xt;yt.map?xt=yt.map:yt.alphaMap&&(xt=yt.alphaMap),xt!==void 0&&(xt.matrixAutoUpdate===!0&&xt.updateMatrix(),gt.uvTransform.value.copy(xt.matrix))}function lt(gt,yt){gt.diffuse.value.copy(yt.color),gt.opacity.value=yt.opacity,gt.rotation.value=yt.rotation,yt.map&&(gt.map.value=yt.map),yt.alphaMap&&(gt.alphaMap.value=yt.alphaMap),yt.alphaTest>0&&(gt.alphaTest.value=yt.alphaTest);let bt;yt.map?bt=yt.map:yt.alphaMap&&(bt=yt.alphaMap),bt!==void 0&&(bt.matrixAutoUpdate===!0&&bt.updateMatrix(),gt.uvTransform.value.copy(bt.matrix))}function ct(gt,yt){gt.specular.value.copy(yt.specular),gt.shininess.value=Math.max(yt.shininess,1e-4)}function ut(gt,yt){yt.gradientMap&&(gt.gradientMap.value=yt.gradientMap)}function ht(gt,yt){gt.roughness.value=yt.roughness,gt.metalness.value=yt.metalness,yt.roughnessMap&&(gt.roughnessMap.value=yt.roughnessMap),yt.metalnessMap&&(gt.metalnessMap.value=yt.metalnessMap),et.get(yt).envMap&&(gt.envMapIntensity.value=yt.envMapIntensity)}function dt(gt,yt,bt){gt.ior.value=yt.ior,yt.sheen>0&&(gt.sheenColor.value.copy(yt.sheenColor).multiplyScalar(yt.sheen),gt.sheenRoughness.value=yt.sheenRoughness,yt.sheenColorMap&&(gt.sheenColorMap.value=yt.sheenColorMap),yt.sheenRoughnessMap&&(gt.sheenRoughnessMap.value=yt.sheenRoughnessMap)),yt.clearcoat>0&&(gt.clearcoat.value=yt.clearcoat,gt.clearcoatRoughness.value=yt.clearcoatRoughness,yt.clearcoatMap&&(gt.clearcoatMap.value=yt.clearcoatMap),yt.clearcoatRoughnessMap&&(gt.clearcoatRoughnessMap.value=yt.clearcoatRoughnessMap),yt.clearcoatNormalMap&&(gt.clearcoatNormalScale.value.copy(yt.clearcoatNormalScale),gt.clearcoatNormalMap.value=yt.clearcoatNormalMap,yt.side===BackSide&>.clearcoatNormalScale.value.negate())),yt.iridescence>0&&(gt.iridescence.value=yt.iridescence,gt.iridescenceIOR.value=yt.iridescenceIOR,gt.iridescenceThicknessMinimum.value=yt.iridescenceThicknessRange[0],gt.iridescenceThicknessMaximum.value=yt.iridescenceThicknessRange[1],yt.iridescenceMap&&(gt.iridescenceMap.value=yt.iridescenceMap),yt.iridescenceThicknessMap&&(gt.iridescenceThicknessMap.value=yt.iridescenceThicknessMap)),yt.transmission>0&&(gt.transmission.value=yt.transmission,gt.transmissionSamplerMap.value=bt.texture,gt.transmissionSamplerSize.value.set(bt.width,bt.height),yt.transmissionMap&&(gt.transmissionMap.value=yt.transmissionMap),gt.thickness.value=yt.thickness,yt.thicknessMap&&(gt.thicknessMap.value=yt.thicknessMap),gt.attenuationDistance.value=yt.attenuationDistance,gt.attenuationColor.value.copy(yt.attenuationColor)),gt.specularIntensity.value=yt.specularIntensity,gt.specularColor.value.copy(yt.specularColor),yt.specularIntensityMap&&(gt.specularIntensityMap.value=yt.specularIntensityMap),yt.specularColorMap&&(gt.specularColorMap.value=yt.specularColorMap)}function pt(gt,yt){yt.matcap&&(gt.matcap.value=yt.matcap)}function mt(gt,yt){gt.referencePosition.value.copy(yt.referencePosition),gt.nearDistance.value=yt.nearDistance,gt.farDistance.value=yt.farDistance}return{refreshFogUniforms:nt,refreshMaterialUniforms:rt}}function WebGLUniformsGroups(tt,et,nt,rt){let it={},ot={},at=[];const st=nt.isWebGL2?tt.getParameter(35375):0;function lt(vt,xt){const kt=xt.program;rt.uniformBlockBinding(vt,kt)}function ct(vt,xt){let kt=it[vt.id];kt===void 0&&(mt(vt),kt=ut(vt),it[vt.id]=kt,vt.addEventListener("dispose",yt));const St=xt.program;rt.updateUBOMapping(vt,St);const Tt=et.render.frame;ot[vt.id]!==Tt&&(dt(vt),ot[vt.id]=Tt)}function ut(vt){const xt=ht();vt.__bindingPointIndex=xt;const kt=tt.createBuffer(),St=vt.__size,Tt=vt.usage;return tt.bindBuffer(35345,kt),tt.bufferData(35345,St,Tt),tt.bindBuffer(35345,null),tt.bindBufferBase(35345,xt,kt),kt}function ht(){for(let vt=0;vt0){Tt=kt%St;const jt=St-Tt;Tt!==0&&jt-Dt.boundary<0&&(kt+=St-Tt,$t.__offset=kt)}kt+=Dt.storage}return Tt=kt%St,Tt>0&&(kt+=St-Tt),vt.__size=kt,vt.__cache={},this}function gt(vt){const xt=vt.value,kt={boundary:0,storage:0};return typeof xt=="number"?(kt.boundary=4,kt.storage=4):xt.isVector2?(kt.boundary=8,kt.storage=8):xt.isVector3||xt.isColor?(kt.boundary=16,kt.storage=12):xt.isVector4?(kt.boundary=16,kt.storage=16):xt.isMatrix3?(kt.boundary=48,kt.storage=48):xt.isMatrix4?(kt.boundary=64,kt.storage=64):xt.isTexture?console.warn("THREE.WebGLRenderer: Texture samplers can not be part of an uniforms group."):console.warn("THREE.WebGLRenderer: Unsupported uniform value type.",xt),kt}function yt(vt){const xt=vt.target;xt.removeEventListener("dispose",yt);const kt=at.indexOf(xt.__bindingPointIndex);at.splice(kt,1),tt.deleteBuffer(it[xt.id]),delete it[xt.id],delete ot[xt.id]}function bt(){for(const vt in it)tt.deleteBuffer(it[vt]);at=[],it={},ot={}}return{bind:lt,update:ct,dispose:bt}}function createCanvasElement(){const tt=createElementNS("canvas");return tt.style.display="block",tt}function WebGLRenderer(tt={}){this.isWebGLRenderer=!0;const et=tt.canvas!==void 0?tt.canvas:createCanvasElement(),nt=tt.context!==void 0?tt.context:null,rt=tt.depth!==void 0?tt.depth:!0,it=tt.stencil!==void 0?tt.stencil:!0,ot=tt.antialias!==void 0?tt.antialias:!1,at=tt.premultipliedAlpha!==void 0?tt.premultipliedAlpha:!0,st=tt.preserveDrawingBuffer!==void 0?tt.preserveDrawingBuffer:!1,lt=tt.powerPreference!==void 0?tt.powerPreference:"default",ct=tt.failIfMajorPerformanceCaveat!==void 0?tt.failIfMajorPerformanceCaveat:!1;let ut;nt!==null?ut=nt.getContextAttributes().alpha:ut=tt.alpha!==void 0?tt.alpha:!1;let ht=null,dt=null;const pt=[],mt=[];this.domElement=et,this.debug={checkShaderErrors:!0},this.autoClear=!0,this.autoClearColor=!0,this.autoClearDepth=!0,this.autoClearStencil=!0,this.sortObjects=!0,this.clippingPlanes=[],this.localClippingEnabled=!1,this.outputEncoding=LinearEncoding,this.physicallyCorrectLights=!1,this.toneMapping=NoToneMapping,this.toneMappingExposure=1,Object.defineProperties(this,{gammaFactor:{get:function(){return console.warn("THREE.WebGLRenderer: .gammaFactor has been removed."),2},set:function(){console.warn("THREE.WebGLRenderer: .gammaFactor has been removed.")}}});const gt=this;let yt=!1,bt=0,vt=0,xt=null,kt=-1,St=null;const Tt=new Vector4,At=new Vector4;let Et=null,$t=et.width,Dt=et.height,jt=1,Pt=null,Ct=null;const wt=new Vector4(0,0,$t,Dt),It=new Vector4(0,0,$t,Dt);let Ot=!1;const Wt=new Frustum;let zt=!1,Ft=!1,Nt=null;const Ut=new Matrix4,Mt=new Vector2,Ht=new Vector3,en={background:null,fog:null,environment:null,overrideMaterial:null,isScene:!0};function sn(){return xt===null?jt:1}let Kt=nt;function rn(dn,Jt){for(let En=0;En0?dt=mt[mt.length-1]:dt=null,pt.pop(),pt.length>0?ht=pt[pt.length-1]:ht=null};function Ar(dn,Jt,En,Ln){if(dn.visible===!1)return;if(dn.layers.test(Jt.layers)){if(dn.isGroup)En=dn.renderOrder;else if(dn.isLOD)dn.autoUpdate===!0&&dn.update(Jt);else if(dn.isLight)dt.pushLight(dn),dn.castShadow&&dt.pushShadow(dn);else if(dn.isSprite){if(!dn.frustumCulled||Wt.intersectsSprite(dn)){Ln&&Ht.setFromMatrixPosition(dn.matrixWorld).applyMatrix4(Ut);const nr=cn.update(dn),lr=dn.material;lr.visible&&ht.push(dn,nr,lr,En,Ht.z,null)}}else if((dn.isMesh||dn.isLine||dn.isPoints)&&(dn.isSkinnedMesh&&dn.skeleton.frame!==an.render.frame&&(dn.skeleton.update(),dn.skeleton.frame=an.render.frame),!dn.frustumCulled||Wt.intersectsObject(dn))){Ln&&Ht.setFromMatrixPosition(dn.matrixWorld).applyMatrix4(Ut);const nr=cn.update(dn),lr=dn.material;if(Array.isArray(lr)){const cr=nr.groups;for(let Hr=0,vr=cr.length;Hr0&&jr(Un,Jt,En),Ln&&vn.viewport(Tt.copy(Ln)),Un.length>0&&Fr(Un,Jt,En),Kn.length>0&&Fr(Kn,Jt,En),nr.length>0&&Fr(nr,Jt,En),vn.buffers.depth.setTest(!0),vn.buffers.depth.setMask(!0),vn.buffers.color.setMask(!0),vn.setPolygonOffset(!1)}function jr(dn,Jt,En){const Ln=hn.isWebGL2;Nt===null&&(Nt=new WebGLRenderTarget(1,1,{generateMipmaps:!0,type:nn.has("EXT_color_buffer_half_float")?HalfFloatType:UnsignedByteType,minFilter:LinearMipmapLinearFilter,samples:Ln&&ot===!0?4:0})),gt.getDrawingBufferSize(Mt),Ln?Nt.setSize(Mt.x,Mt.y):Nt.setSize(floorPowerOfTwo(Mt.x),floorPowerOfTwo(Mt.y));const Un=gt.getRenderTarget();gt.setRenderTarget(Nt),gt.clear();const Kn=gt.toneMapping;gt.toneMapping=NoToneMapping,Fr(dn,Jt,En),gt.toneMapping=Kn,_n.updateMultisampleRenderTarget(Nt),_n.updateRenderTargetMipmap(Nt),gt.setRenderTarget(Un)}function Fr(dn,Jt,En){const Ln=Jt.isScene===!0?Jt.overrideMaterial:null;for(let Un=0,Kn=dn.length;Un0&&_n.useMultisampledRTT(dn)===!1?Un=Qt.get(dn).__webglMultisampledFramebuffer:Un=Hr,Tt.copy(dn.viewport),At.copy(dn.scissor),Et=dn.scissorTest}else Tt.copy(wt).multiplyScalar(jt).floor(),At.copy(It).multiplyScalar(jt).floor(),Et=Ot;if(vn.bindFramebuffer(36160,Un)&&hn.drawBuffers&&Ln&&vn.drawBuffers(dn,Un),vn.viewport(Tt),vn.scissor(At),vn.setScissorTest(Et),Kn){const cr=Qt.get(dn.texture);Kt.framebufferTexture2D(36160,36064,34069+Jt,cr.__webglTexture,En)}else if(nr){const cr=Qt.get(dn.texture),Hr=Jt||0;Kt.framebufferTextureLayer(36160,36064,cr.__webglTexture,En||0,Hr)}kt=-1},this.readRenderTargetPixels=function(dn,Jt,En,Ln,Un,Kn,nr){if(!(dn&&dn.isWebGLRenderTarget)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");return}let lr=Qt.get(dn).__webglFramebuffer;if(dn.isWebGLCubeRenderTarget&&nr!==void 0&&(lr=lr[nr]),lr){vn.bindFramebuffer(36160,lr);try{const cr=dn.texture,Hr=cr.format,vr=cr.type;if(Hr!==RGBAFormat&&Xt.convert(Hr)!==Kt.getParameter(35739)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");return}const Nr=vr===HalfFloatType&&(nn.has("EXT_color_buffer_half_float")||hn.isWebGL2&&nn.has("EXT_color_buffer_float"));if(vr!==UnsignedByteType&&Xt.convert(vr)!==Kt.getParameter(35738)&&!(vr===FloatType&&(hn.isWebGL2||nn.has("OES_texture_float")||nn.has("WEBGL_color_buffer_float")))&&!Nr){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");return}Jt>=0&&Jt<=dn.width-Ln&&En>=0&&En<=dn.height-Un&&Kt.readPixels(Jt,En,Ln,Un,Xt.convert(Hr),Xt.convert(vr),Kn)}finally{const cr=xt!==null?Qt.get(xt).__webglFramebuffer:null;vn.bindFramebuffer(36160,cr)}}},this.copyFramebufferToTexture=function(dn,Jt,En=0){const Ln=Math.pow(2,-En),Un=Math.floor(Jt.image.width*Ln),Kn=Math.floor(Jt.image.height*Ln);_n.setTexture2D(Jt,0),Kt.copyTexSubImage2D(3553,En,0,0,dn.x,dn.y,Un,Kn),vn.unbindTexture()},this.copyTextureToTexture=function(dn,Jt,En,Ln=0){const Un=Jt.image.width,Kn=Jt.image.height,nr=Xt.convert(En.format),lr=Xt.convert(En.type);_n.setTexture2D(En,0),Kt.pixelStorei(37440,En.flipY),Kt.pixelStorei(37441,En.premultiplyAlpha),Kt.pixelStorei(3317,En.unpackAlignment),Jt.isDataTexture?Kt.texSubImage2D(3553,Ln,dn.x,dn.y,Un,Kn,nr,lr,Jt.image.data):Jt.isCompressedTexture?Kt.compressedTexSubImage2D(3553,Ln,dn.x,dn.y,Jt.mipmaps[0].width,Jt.mipmaps[0].height,nr,Jt.mipmaps[0].data):Kt.texSubImage2D(3553,Ln,dn.x,dn.y,nr,lr,Jt.image),Ln===0&&En.generateMipmaps&&Kt.generateMipmap(3553),vn.unbindTexture()},this.copyTextureToTexture3D=function(dn,Jt,En,Ln,Un=0){if(gt.isWebGL1Renderer){console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: can only be used with WebGL2.");return}const Kn=dn.max.x-dn.min.x+1,nr=dn.max.y-dn.min.y+1,lr=dn.max.z-dn.min.z+1,cr=Xt.convert(Ln.format),Hr=Xt.convert(Ln.type);let vr;if(Ln.isData3DTexture)_n.setTexture3D(Ln,0),vr=32879;else if(Ln.isDataArrayTexture)_n.setTexture2DArray(Ln,0),vr=35866;else{console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: only supports THREE.DataTexture3D and THREE.DataTexture2DArray.");return}Kt.pixelStorei(37440,Ln.flipY),Kt.pixelStorei(37441,Ln.premultiplyAlpha),Kt.pixelStorei(3317,Ln.unpackAlignment);const Nr=Kt.getParameter(3314),Gr=Kt.getParameter(32878),eo=Kt.getParameter(3316),Zr=Kt.getParameter(3315),Jr=Kt.getParameter(32877),wr=En.isCompressedTexture?En.mipmaps[0]:En.image;Kt.pixelStorei(3314,wr.width),Kt.pixelStorei(32878,wr.height),Kt.pixelStorei(3316,dn.min.x),Kt.pixelStorei(3315,dn.min.y),Kt.pixelStorei(32877,dn.min.z),En.isDataTexture||En.isData3DTexture?Kt.texSubImage3D(vr,Un,Jt.x,Jt.y,Jt.z,Kn,nr,lr,cr,Hr,wr.data):En.isCompressedTexture?(console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: untested support for compressed srcTexture."),Kt.compressedTexSubImage3D(vr,Un,Jt.x,Jt.y,Jt.z,Kn,nr,lr,cr,wr.data)):Kt.texSubImage3D(vr,Un,Jt.x,Jt.y,Jt.z,Kn,nr,lr,cr,Hr,wr),Kt.pixelStorei(3314,Nr),Kt.pixelStorei(32878,Gr),Kt.pixelStorei(3316,eo),Kt.pixelStorei(3315,Zr),Kt.pixelStorei(32877,Jr),Un===0&&Ln.generateMipmaps&&Kt.generateMipmap(vr),vn.unbindTexture()},this.initTexture=function(dn){dn.isCubeTexture?_n.setTextureCube(dn,0):dn.isData3DTexture?_n.setTexture3D(dn,0):dn.isDataArrayTexture?_n.setTexture2DArray(dn,0):_n.setTexture2D(dn,0),vn.unbindTexture()},this.resetState=function(){bt=0,vt=0,xt=null,vn.reset(),Sn.reset()},typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}class WebGL1Renderer extends WebGLRenderer{}WebGL1Renderer.prototype.isWebGL1Renderer=!0;class FogExp2{constructor(et,nt=25e-5){this.isFogExp2=!0,this.name="",this.color=new Color$1(et),this.density=nt}clone(){return new FogExp2(this.color,this.density)}toJSON(){return{type:"FogExp2",color:this.color.getHex(),density:this.density}}}class Fog{constructor(et,nt=1,rt=1e3){this.isFog=!0,this.name="",this.color=new Color$1(et),this.near=nt,this.far=rt}clone(){return new Fog(this.color,this.near,this.far)}toJSON(){return{type:"Fog",color:this.color.getHex(),near:this.near,far:this.far}}}class Scene extends Object3D{constructor(){super(),this.isScene=!0,this.type="Scene",this.background=null,this.environment=null,this.fog=null,this.overrideMaterial=null,this.autoUpdate=!0,typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}copy(et,nt){return super.copy(et,nt),et.background!==null&&(this.background=et.background.clone()),et.environment!==null&&(this.environment=et.environment.clone()),et.fog!==null&&(this.fog=et.fog.clone()),et.overrideMaterial!==null&&(this.overrideMaterial=et.overrideMaterial.clone()),this.autoUpdate=et.autoUpdate,this.matrixAutoUpdate=et.matrixAutoUpdate,this}toJSON(et){const nt=super.toJSON(et);return this.fog!==null&&(nt.object.fog=this.fog.toJSON()),nt}}class InterleavedBuffer{constructor(et,nt){this.isInterleavedBuffer=!0,this.array=et,this.stride=nt,this.count=et!==void 0?et.length/nt:0,this.usage=StaticDrawUsage,this.updateRange={offset:0,count:-1},this.version=0,this.uuid=generateUUID$1()}onUploadCallback(){}set needsUpdate(et){et===!0&&this.version++}setUsage(et){return this.usage=et,this}copy(et){return this.array=new et.array.constructor(et.array),this.count=et.count,this.stride=et.stride,this.usage=et.usage,this}copyAt(et,nt,rt){et*=this.stride,rt*=nt.stride;for(let it=0,ot=this.stride;itet.far||nt.push({distance:lt,point:_intersectPoint.clone(),uv:Triangle.getUV(_intersectPoint,_vA,_vB,_vC,_uvA,_uvB,_uvC,new Vector2),face:null,object:this})}copy(et,nt){return super.copy(et,nt),et.center!==void 0&&this.center.copy(et.center),this.material=et.material,this}}function transformVertex(tt,et,nt,rt,it,ot){_alignedPosition.subVectors(tt,nt).addScalar(.5).multiply(rt),it!==void 0?(_rotatedPosition.x=ot*_alignedPosition.x-it*_alignedPosition.y,_rotatedPosition.y=it*_alignedPosition.x+ot*_alignedPosition.y):_rotatedPosition.copy(_alignedPosition),tt.copy(et),tt.x+=_rotatedPosition.x,tt.y+=_rotatedPosition.y,tt.applyMatrix4(_viewWorldMatrix)}const _v1$2=new Vector3,_v2$1=new Vector3;class LOD extends Object3D{constructor(){super(),this._currentLevel=0,this.type="LOD",Object.defineProperties(this,{levels:{enumerable:!0,value:[]},isLOD:{value:!0}}),this.autoUpdate=!0}copy(et){super.copy(et,!1);const nt=et.levels;for(let rt=0,it=nt.length;rt0){let rt,it;for(rt=1,it=nt.length;rt0){_v1$2.setFromMatrixPosition(this.matrixWorld);const it=et.ray.origin.distanceTo(_v1$2);this.getObjectForDistance(it).raycast(et,nt)}}update(et){const nt=this.levels;if(nt.length>1){_v1$2.setFromMatrixPosition(et.matrixWorld),_v2$1.setFromMatrixPosition(this.matrixWorld);const rt=_v1$2.distanceTo(_v2$1)/et.zoom;nt[0].object.visible=!0;let it,ot;for(it=1,ot=nt.length;it=nt[it].distance;it++)nt[it-1].object.visible=!1,nt[it].object.visible=!0;for(this._currentLevel=it-1;itlt)continue;dt.applyMatrix4(this.matrixWorld);const Et=et.ray.origin.distanceTo(dt);Etet.far||nt.push({distance:Et,point:ht.clone().applyMatrix4(this.matrixWorld),index:xt,face:null,faceIndex:null,object:this})}}else{const bt=Math.max(0,at.start),vt=Math.min(yt.count,at.start+at.count);for(let xt=bt,kt=vt-1;xtlt)continue;dt.applyMatrix4(this.matrixWorld);const Tt=et.ray.origin.distanceTo(dt);Ttet.far||nt.push({distance:Tt,point:ht.clone().applyMatrix4(this.matrixWorld),index:xt,face:null,faceIndex:null,object:this})}}}updateMorphTargets(){const nt=this.geometry.morphAttributes,rt=Object.keys(nt);if(rt.length>0){const it=nt[rt[0]];if(it!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let ot=0,at=it.length;ot0){const it=nt[rt[0]];if(it!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let ot=0,at=it.length;otit.far)return;ot.push({distance:ct,distanceToRay:Math.sqrt(st),point:lt,index:et,face:null,object:at})}}class VideoTexture extends Texture{constructor(et,nt,rt,it,ot,at,st,lt,ct){super(et,nt,rt,it,ot,at,st,lt,ct),this.isVideoTexture=!0,this.minFilter=at!==void 0?at:LinearFilter,this.magFilter=ot!==void 0?ot:LinearFilter,this.generateMipmaps=!1;const ut=this;function ht(){ut.needsUpdate=!0,et.requestVideoFrameCallback(ht)}"requestVideoFrameCallback"in et&&et.requestVideoFrameCallback(ht)}clone(){return new this.constructor(this.image).copy(this)}update(){const et=this.image;"requestVideoFrameCallback"in et===!1&&et.readyState>=et.HAVE_CURRENT_DATA&&(this.needsUpdate=!0)}}class FramebufferTexture extends Texture{constructor(et,nt,rt){super({width:et,height:nt}),this.isFramebufferTexture=!0,this.format=rt,this.magFilter=NearestFilter,this.minFilter=NearestFilter,this.generateMipmaps=!1,this.needsUpdate=!0}}class CompressedTexture extends Texture{constructor(et,nt,rt,it,ot,at,st,lt,ct,ut,ht,dt){super(null,at,st,lt,ct,ut,it,ot,ht,dt),this.isCompressedTexture=!0,this.image={width:nt,height:rt},this.mipmaps=et,this.flipY=!1,this.generateMipmaps=!1}}class CanvasTexture extends Texture{constructor(et,nt,rt,it,ot,at,st,lt,ct){super(et,nt,rt,it,ot,at,st,lt,ct),this.isCanvasTexture=!0,this.needsUpdate=!0}}let Curve$1=class{constructor(){this.type="Curve",this.arcLengthDivisions=200}getPoint(){return console.warn("THREE.Curve: .getPoint() not implemented."),null}getPointAt(et,nt){const rt=this.getUtoTmapping(et);return this.getPoint(rt,nt)}getPoints(et=5){const nt=[];for(let rt=0;rt<=et;rt++)nt.push(this.getPoint(rt/et));return nt}getSpacedPoints(et=5){const nt=[];for(let rt=0;rt<=et;rt++)nt.push(this.getPointAt(rt/et));return nt}getLength(){const et=this.getLengths();return et[et.length-1]}getLengths(et=this.arcLengthDivisions){if(this.cacheArcLengths&&this.cacheArcLengths.length===et+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;const nt=[];let rt,it=this.getPoint(0),ot=0;nt.push(0);for(let at=1;at<=et;at++)rt=this.getPoint(at/et),ot+=rt.distanceTo(it),nt.push(ot),it=rt;return this.cacheArcLengths=nt,nt}updateArcLengths(){this.needsUpdate=!0,this.getLengths()}getUtoTmapping(et,nt){const rt=this.getLengths();let it=0;const ot=rt.length;let at;nt?at=nt:at=et*rt[ot-1];let st=0,lt=ot-1,ct;for(;st<=lt;)if(it=Math.floor(st+(lt-st)/2),ct=rt[it]-at,ct<0)st=it+1;else if(ct>0)lt=it-1;else{lt=it;break}if(it=lt,rt[it]===at)return it/(ot-1);const ut=rt[it],dt=rt[it+1]-ut,pt=(at-ut)/dt;return(it+pt)/(ot-1)}getTangent(et,nt){let it=et-1e-4,ot=et+1e-4;it<0&&(it=0),ot>1&&(ot=1);const at=this.getPoint(it),st=this.getPoint(ot),lt=nt||(at.isVector2?new Vector2:new Vector3);return lt.copy(st).sub(at).normalize(),lt}getTangentAt(et,nt){const rt=this.getUtoTmapping(et);return this.getTangent(rt,nt)}computeFrenetFrames(et,nt){const rt=new Vector3,it=[],ot=[],at=[],st=new Vector3,lt=new Matrix4;for(let pt=0;pt<=et;pt++){const mt=pt/et;it[pt]=this.getTangentAt(mt,new Vector3)}ot[0]=new Vector3,at[0]=new Vector3;let ct=Number.MAX_VALUE;const ut=Math.abs(it[0].x),ht=Math.abs(it[0].y),dt=Math.abs(it[0].z);ut<=ct&&(ct=ut,rt.set(1,0,0)),ht<=ct&&(ct=ht,rt.set(0,1,0)),dt<=ct&&rt.set(0,0,1),st.crossVectors(it[0],rt).normalize(),ot[0].crossVectors(it[0],st),at[0].crossVectors(it[0],ot[0]);for(let pt=1;pt<=et;pt++){if(ot[pt]=ot[pt-1].clone(),at[pt]=at[pt-1].clone(),st.crossVectors(it[pt-1],it[pt]),st.length()>Number.EPSILON){st.normalize();const mt=Math.acos(clamp$5(it[pt-1].dot(it[pt]),-1,1));ot[pt].applyMatrix4(lt.makeRotationAxis(st,mt))}at[pt].crossVectors(it[pt],ot[pt])}if(nt===!0){let pt=Math.acos(clamp$5(ot[0].dot(ot[et]),-1,1));pt/=et,it[0].dot(st.crossVectors(ot[0],ot[et]))>0&&(pt=-pt);for(let mt=1;mt<=et;mt++)ot[mt].applyMatrix4(lt.makeRotationAxis(it[mt],pt*mt)),at[mt].crossVectors(it[mt],ot[mt])}return{tangents:it,normals:ot,binormals:at}}clone(){return new this.constructor().copy(this)}copy(et){return this.arcLengthDivisions=et.arcLengthDivisions,this}toJSON(){const et={metadata:{version:4.5,type:"Curve",generator:"Curve.toJSON"}};return et.arcLengthDivisions=this.arcLengthDivisions,et.type=this.type,et}fromJSON(et){return this.arcLengthDivisions=et.arcLengthDivisions,this}};class EllipseCurve extends Curve$1{constructor(et=0,nt=0,rt=1,it=1,ot=0,at=Math.PI*2,st=!1,lt=0){super(),this.isEllipseCurve=!0,this.type="EllipseCurve",this.aX=et,this.aY=nt,this.xRadius=rt,this.yRadius=it,this.aStartAngle=ot,this.aEndAngle=at,this.aClockwise=st,this.aRotation=lt}getPoint(et,nt){const rt=nt||new Vector2,it=Math.PI*2;let ot=this.aEndAngle-this.aStartAngle;const at=Math.abs(ot)it;)ot-=it;ot0?0:(Math.floor(Math.abs(st)/ot)+1)*ot:lt===0&&st===ot-1&&(st=ot-2,lt=1);let ct,ut;this.closed||st>0?ct=it[(st-1)%ot]:(tmp.subVectors(it[0],it[1]).add(it[0]),ct=tmp);const ht=it[st%ot],dt=it[(st+1)%ot];if(this.closed||st+2it.length-2?it.length-1:at+1],ht=it[at>it.length-3?it.length-1:at+2];return rt.set(CatmullRom(st,lt.x,ct.x,ut.x,ht.x),CatmullRom(st,lt.y,ct.y,ut.y,ht.y)),rt}copy(et){super.copy(et),this.points=[];for(let nt=0,rt=et.points.length;nt=rt){const at=it[ot]-rt,st=this.curves[ot],lt=st.getLength(),ct=lt===0?0:1-at/lt;return st.getPointAt(ct,nt)}ot++}return null}getLength(){const et=this.getCurveLengths();return et[et.length-1]}updateArcLengths(){this.needsUpdate=!0,this.cacheLengths=null,this.getCurveLengths()}getCurveLengths(){if(this.cacheLengths&&this.cacheLengths.length===this.curves.length)return this.cacheLengths;const et=[];let nt=0;for(let rt=0,it=this.curves.length;rt1&&!nt[nt.length-1].equals(nt[0])&&nt.push(nt[0]),nt}copy(et){super.copy(et),this.curves=[];for(let nt=0,rt=et.curves.length;nt0){const ht=ct.getPoint(0);ht.equals(this.currentPoint)||this.lineTo(ht.x,ht.y)}this.curves.push(ct);const ut=ct.getPoint(1);return this.currentPoint.copy(ut),this}copy(et){return super.copy(et),this.currentPoint.copy(et.currentPoint),this}toJSON(){const et=super.toJSON();return et.currentPoint=this.currentPoint.toArray(),et}fromJSON(et){return super.fromJSON(et),this.currentPoint.fromArray(et.currentPoint),this}};class LatheGeometry extends BufferGeometry{constructor(et=[new Vector2(0,-.5),new Vector2(.5,0),new Vector2(0,.5)],nt=12,rt=0,it=Math.PI*2){super(),this.type="LatheGeometry",this.parameters={points:et,segments:nt,phiStart:rt,phiLength:it},nt=Math.floor(nt),it=clamp$5(it,0,Math.PI*2);const ot=[],at=[],st=[],lt=[],ct=[],ut=1/nt,ht=new Vector3,dt=new Vector2,pt=new Vector3,mt=new Vector3,gt=new Vector3;let yt=0,bt=0;for(let vt=0;vt<=et.length-1;vt++)switch(vt){case 0:yt=et[vt+1].x-et[vt].x,bt=et[vt+1].y-et[vt].y,pt.x=bt*1,pt.y=-yt,pt.z=bt*0,gt.copy(pt),pt.normalize(),lt.push(pt.x,pt.y,pt.z);break;case et.length-1:lt.push(gt.x,gt.y,gt.z);break;default:yt=et[vt+1].x-et[vt].x,bt=et[vt+1].y-et[vt].y,pt.x=bt*1,pt.y=-yt,pt.z=bt*0,mt.copy(pt),pt.x+=gt.x,pt.y+=gt.y,pt.z+=gt.z,pt.normalize(),lt.push(pt.x,pt.y,pt.z),gt.copy(mt)}for(let vt=0;vt<=nt;vt++){const xt=rt+vt*ut*it,kt=Math.sin(xt),St=Math.cos(xt);for(let Tt=0;Tt<=et.length-1;Tt++){ht.x=et[Tt].x*kt,ht.y=et[Tt].y,ht.z=et[Tt].x*St,at.push(ht.x,ht.y,ht.z),dt.x=vt/nt,dt.y=Tt/(et.length-1),st.push(dt.x,dt.y);const At=lt[3*Tt+0]*kt,Et=lt[3*Tt+1],$t=lt[3*Tt+0]*St;ct.push(At,Et,$t)}}for(let vt=0;vt0&&xt(!0),nt>0&&xt(!1)),this.setIndex(ut),this.setAttribute("position",new Float32BufferAttribute(ht,3)),this.setAttribute("normal",new Float32BufferAttribute(dt,3)),this.setAttribute("uv",new Float32BufferAttribute(pt,2));function vt(){const kt=new Vector3,St=new Vector3;let Tt=0;const At=(nt-et)/rt;for(let Et=0;Et<=ot;Et++){const $t=[],Dt=Et/ot,jt=Dt*(nt-et)+et;for(let Pt=0;Pt<=it;Pt++){const Ct=Pt/it,wt=Ct*lt+st,It=Math.sin(wt),Ot=Math.cos(wt);St.x=jt*It,St.y=-Dt*rt+yt,St.z=jt*Ot,ht.push(St.x,St.y,St.z),kt.set(It,At,Ot).normalize(),dt.push(kt.x,kt.y,kt.z),pt.push(Ct,1-Dt),$t.push(mt++)}gt.push($t)}for(let Et=0;Et.9&&At<.1&&(xt<.2&&(at[vt+0]+=1),kt<.2&&(at[vt+2]+=1),St<.2&&(at[vt+4]+=1))}}function dt(vt){ot.push(vt.x,vt.y,vt.z)}function pt(vt,xt){const kt=vt*3;xt.x=et[kt+0],xt.y=et[kt+1],xt.z=et[kt+2]}function mt(){const vt=new Vector3,xt=new Vector3,kt=new Vector3,St=new Vector3,Tt=new Vector2,At=new Vector2,Et=new Vector2;for(let $t=0,Dt=0;$t80*nt){st=ct=tt[0],lt=ut=tt[1];for(let mt=nt;mtct&&(ct=ht),dt>ut&&(ut=dt);pt=Math.max(ct-st,ut-lt),pt=pt!==0?1/pt:0}return earcutLinked(ot,at,nt,st,lt,pt),at}};function linkedList(tt,et,nt,rt,it){let ot,at;if(it===signedArea(tt,et,nt,rt)>0)for(ot=et;ot=et;ot-=rt)at=insertNode(ot,tt[ot],tt[ot+1],at);return at&&equals(at,at.next)&&(removeNode(at),at=at.next),at}function filterPoints(tt,et){if(!tt)return tt;et||(et=tt);let nt=tt,rt;do if(rt=!1,!nt.steiner&&(equals(nt,nt.next)||area(nt.prev,nt,nt.next)===0)){if(removeNode(nt),nt=et=nt.prev,nt===nt.next)break;rt=!0}else nt=nt.next;while(rt||nt!==et);return et}function earcutLinked(tt,et,nt,rt,it,ot,at){if(!tt)return;!at&&ot&&indexCurve(tt,rt,it,ot);let st=tt,lt,ct;for(;tt.prev!==tt.next;){if(lt=tt.prev,ct=tt.next,ot?isEarHashed(tt,rt,it,ot):isEar(tt)){et.push(lt.i/nt),et.push(tt.i/nt),et.push(ct.i/nt),removeNode(tt),tt=ct.next,st=ct.next;continue}if(tt=ct,tt===st){at?at===1?(tt=cureLocalIntersections(filterPoints(tt),et,nt),earcutLinked(tt,et,nt,rt,it,ot,2)):at===2&&splitEarcut(tt,et,nt,rt,it,ot):earcutLinked(filterPoints(tt),et,nt,rt,it,ot,1);break}}}function isEar(tt){const et=tt.prev,nt=tt,rt=tt.next;if(area(et,nt,rt)>=0)return!1;let it=tt.next.next;for(;it!==tt.prev;){if(pointInTriangle(et.x,et.y,nt.x,nt.y,rt.x,rt.y,it.x,it.y)&&area(it.prev,it,it.next)>=0)return!1;it=it.next}return!0}function isEarHashed(tt,et,nt,rt){const it=tt.prev,ot=tt,at=tt.next;if(area(it,ot,at)>=0)return!1;const st=it.xot.x?it.x>at.x?it.x:at.x:ot.x>at.x?ot.x:at.x,ut=it.y>ot.y?it.y>at.y?it.y:at.y:ot.y>at.y?ot.y:at.y,ht=zOrder(st,lt,et,nt,rt),dt=zOrder(ct,ut,et,nt,rt);let pt=tt.prevZ,mt=tt.nextZ;for(;pt&&pt.z>=ht&&mt&&mt.z<=dt;){if(pt!==tt.prev&&pt!==tt.next&&pointInTriangle(it.x,it.y,ot.x,ot.y,at.x,at.y,pt.x,pt.y)&&area(pt.prev,pt,pt.next)>=0||(pt=pt.prevZ,mt!==tt.prev&&mt!==tt.next&&pointInTriangle(it.x,it.y,ot.x,ot.y,at.x,at.y,mt.x,mt.y)&&area(mt.prev,mt,mt.next)>=0))return!1;mt=mt.nextZ}for(;pt&&pt.z>=ht;){if(pt!==tt.prev&&pt!==tt.next&&pointInTriangle(it.x,it.y,ot.x,ot.y,at.x,at.y,pt.x,pt.y)&&area(pt.prev,pt,pt.next)>=0)return!1;pt=pt.prevZ}for(;mt&&mt.z<=dt;){if(mt!==tt.prev&&mt!==tt.next&&pointInTriangle(it.x,it.y,ot.x,ot.y,at.x,at.y,mt.x,mt.y)&&area(mt.prev,mt,mt.next)>=0)return!1;mt=mt.nextZ}return!0}function cureLocalIntersections(tt,et,nt){let rt=tt;do{const it=rt.prev,ot=rt.next.next;!equals(it,ot)&&intersects(it,rt,rt.next,ot)&&locallyInside(it,ot)&&locallyInside(ot,it)&&(et.push(it.i/nt),et.push(rt.i/nt),et.push(ot.i/nt),removeNode(rt),removeNode(rt.next),rt=tt=ot),rt=rt.next}while(rt!==tt);return filterPoints(rt)}function splitEarcut(tt,et,nt,rt,it,ot){let at=tt;do{let st=at.next.next;for(;st!==at.prev;){if(at.i!==st.i&&isValidDiagonal(at,st)){let lt=splitPolygon(at,st);at=filterPoints(at,at.next),lt=filterPoints(lt,lt.next),earcutLinked(at,et,nt,rt,it,ot),earcutLinked(lt,et,nt,rt,it,ot);return}st=st.next}at=at.next}while(at!==tt)}function eliminateHoles(tt,et,nt,rt){const it=[];let ot,at,st,lt,ct;for(ot=0,at=et.length;ot=nt.next.y&&nt.next.y!==nt.y){const dt=nt.x+(it-nt.y)*(nt.next.x-nt.x)/(nt.next.y-nt.y);if(dt<=rt&&dt>ot){if(ot=dt,dt===rt){if(it===nt.y)return nt;if(it===nt.next.y)return nt.next}at=nt.x=nt.x&&nt.x>=lt&&rt!==nt.x&&pointInTriangle(itat.x||nt.x===at.x&§orContainsSector(at,nt)))&&(at=nt,ut=ht)),nt=nt.next;while(nt!==st);return at}function sectorContainsSector(tt,et){return area(tt.prev,tt,et.prev)<0&&area(et.next,tt,tt.next)<0}function indexCurve(tt,et,nt,rt){let it=tt;do it.z===null&&(it.z=zOrder(it.x,it.y,et,nt,rt)),it.prevZ=it.prev,it.nextZ=it.next,it=it.next;while(it!==tt);it.prevZ.nextZ=null,it.prevZ=null,sortLinked(it)}function sortLinked(tt){let et,nt,rt,it,ot,at,st,lt,ct=1;do{for(nt=tt,tt=null,ot=null,at=0;nt;){for(at++,rt=nt,st=0,et=0;et0||lt>0&&rt;)st!==0&&(lt===0||!rt||nt.z<=rt.z)?(it=nt,nt=nt.nextZ,st--):(it=rt,rt=rt.nextZ,lt--),ot?ot.nextZ=it:tt=it,it.prevZ=ot,ot=it;nt=rt}ot.nextZ=null,ct*=2}while(at>1);return tt}function zOrder(tt,et,nt,rt,it){return tt=32767*(tt-nt)*it,et=32767*(et-rt)*it,tt=(tt|tt<<8)&16711935,tt=(tt|tt<<4)&252645135,tt=(tt|tt<<2)&858993459,tt=(tt|tt<<1)&1431655765,et=(et|et<<8)&16711935,et=(et|et<<4)&252645135,et=(et|et<<2)&858993459,et=(et|et<<1)&1431655765,tt|et<<1}function getLeftmost(tt){let et=tt,nt=tt;do(et.x=0&&(tt-at)*(rt-st)-(nt-at)*(et-st)>=0&&(nt-at)*(ot-st)-(it-at)*(rt-st)>=0}function isValidDiagonal(tt,et){return tt.next.i!==et.i&&tt.prev.i!==et.i&&!intersectsPolygon(tt,et)&&(locallyInside(tt,et)&&locallyInside(et,tt)&&middleInside(tt,et)&&(area(tt.prev,tt,et.prev)||area(tt,et.prev,et))||equals(tt,et)&&area(tt.prev,tt,tt.next)>0&&area(et.prev,et,et.next)>0)}function area(tt,et,nt){return(et.y-tt.y)*(nt.x-et.x)-(et.x-tt.x)*(nt.y-et.y)}function equals(tt,et){return tt.x===et.x&&tt.y===et.y}function intersects(tt,et,nt,rt){const it=sign$2(area(tt,et,nt)),ot=sign$2(area(tt,et,rt)),at=sign$2(area(nt,rt,tt)),st=sign$2(area(nt,rt,et));return!!(it!==ot&&at!==st||it===0&&onSegment(tt,nt,et)||ot===0&&onSegment(tt,rt,et)||at===0&&onSegment(nt,tt,rt)||st===0&&onSegment(nt,et,rt))}function onSegment(tt,et,nt){return et.x<=Math.max(tt.x,nt.x)&&et.x>=Math.min(tt.x,nt.x)&&et.y<=Math.max(tt.y,nt.y)&&et.y>=Math.min(tt.y,nt.y)}function sign$2(tt){return tt>0?1:tt<0?-1:0}function intersectsPolygon(tt,et){let nt=tt;do{if(nt.i!==tt.i&&nt.next.i!==tt.i&&nt.i!==et.i&&nt.next.i!==et.i&&intersects(nt,nt.next,tt,et))return!0;nt=nt.next}while(nt!==tt);return!1}function locallyInside(tt,et){return area(tt.prev,tt,tt.next)<0?area(tt,et,tt.next)>=0&&area(tt,tt.prev,et)>=0:area(tt,et,tt.prev)<0||area(tt,tt.next,et)<0}function middleInside(tt,et){let nt=tt,rt=!1;const it=(tt.x+et.x)/2,ot=(tt.y+et.y)/2;do nt.y>ot!=nt.next.y>ot&&nt.next.y!==nt.y&&it<(nt.next.x-nt.x)*(ot-nt.y)/(nt.next.y-nt.y)+nt.x&&(rt=!rt),nt=nt.next;while(nt!==tt);return rt}function splitPolygon(tt,et){const nt=new Node$1(tt.i,tt.x,tt.y),rt=new Node$1(et.i,et.x,et.y),it=tt.next,ot=et.prev;return tt.next=et,et.prev=tt,nt.next=it,it.prev=nt,rt.next=nt,nt.prev=rt,ot.next=rt,rt.prev=ot,rt}function insertNode(tt,et,nt,rt){const it=new Node$1(tt,et,nt);return rt?(it.next=rt.next,it.prev=rt,rt.next.prev=it,rt.next=it):(it.prev=it,it.next=it),it}function removeNode(tt){tt.next.prev=tt.prev,tt.prev.next=tt.next,tt.prevZ&&(tt.prevZ.nextZ=tt.nextZ),tt.nextZ&&(tt.nextZ.prevZ=tt.prevZ)}function Node$1(tt,et,nt){this.i=tt,this.x=et,this.y=nt,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function signedArea(tt,et,nt,rt){let it=0;for(let ot=et,at=nt-rt;ot2&&tt[et-1].equals(tt[0])&&tt.pop()}function addContour(tt,et){for(let nt=0;ntNumber.EPSILON){const pn=Math.sqrt(wn),kn=Math.sqrt(In*In+An*An),Dn=_n.x-mn/pn,un=_n.y+cn/pn,Zt=Pn.x-An/kn,Xt=Pn.y+In/kn,Sn=((Zt-Dn)*An-(Xt-un)*In)/(cn*An-mn*In);$n=Dn+cn*Sn-Qt.x,Nn=un+mn*Sn-Qt.y;const Rn=$n*$n+Nn*Nn;if(Rn<=2)return new Vector2($n,Nn);Tn=Math.sqrt(Rn/2)}else{let pn=!1;cn>Number.EPSILON?In>Number.EPSILON&&(pn=!0):cn<-Number.EPSILON?In<-Number.EPSILON&&(pn=!0):Math.sign(mn)===Math.sign(An)&&(pn=!0),pn?($n=-mn,Nn=cn,Tn=Math.sqrt(wn)):($n=cn,Nn=mn,Tn=Math.sqrt(wn/2))}return new Vector2($n/Tn,Nn/Tn)}const Ft=[];for(let Qt=0,_n=wt.length,Pn=_n-1,$n=Qt+1;Qt<_n;Qt++,Pn++,$n++)Pn===_n&&(Pn=0),$n===_n&&($n=0),Ft[Qt]=zt(wt[Qt],wt[Pn],wt[$n]);const Nt=[];let Ut,Mt=Ft.concat();for(let Qt=0,_n=jt.length;Qt<_n;Qt++){const Pn=jt[Qt];Ut=[];for(let $n=0,Nn=Pn.length,Tn=Nn-1,cn=$n+1;$n=0;Qt--){const _n=Qt/yt,Pn=pt*Math.cos(_n*Math.PI/2),$n=mt*Math.sin(_n*Math.PI/2)+gt;for(let Nn=0,Tn=wt.length;Nn=0;){const $n=Pn;let Nn=Pn-1;Nn<0&&(Nn=Qt.length-1);for(let Tn=0,cn=ut+yt*2;Tn0)&&pt.push(xt,kt,Tt),(bt!==rt-1||lt0!=et>0&&this.version++,this._sheen=et}get clearcoat(){return this._clearcoat}set clearcoat(et){this._clearcoat>0!=et>0&&this.version++,this._clearcoat=et}get iridescence(){return this._iridescence}set iridescence(et){this._iridescence>0!=et>0&&this.version++,this._iridescence=et}get transmission(){return this._transmission}set transmission(et){this._transmission>0!=et>0&&this.version++,this._transmission=et}copy(et){return super.copy(et),this.defines={STANDARD:"",PHYSICAL:""},this.clearcoat=et.clearcoat,this.clearcoatMap=et.clearcoatMap,this.clearcoatRoughness=et.clearcoatRoughness,this.clearcoatRoughnessMap=et.clearcoatRoughnessMap,this.clearcoatNormalMap=et.clearcoatNormalMap,this.clearcoatNormalScale.copy(et.clearcoatNormalScale),this.ior=et.ior,this.iridescence=et.iridescence,this.iridescenceMap=et.iridescenceMap,this.iridescenceIOR=et.iridescenceIOR,this.iridescenceThicknessRange=[...et.iridescenceThicknessRange],this.iridescenceThicknessMap=et.iridescenceThicknessMap,this.sheen=et.sheen,this.sheenColor.copy(et.sheenColor),this.sheenColorMap=et.sheenColorMap,this.sheenRoughness=et.sheenRoughness,this.sheenRoughnessMap=et.sheenRoughnessMap,this.transmission=et.transmission,this.transmissionMap=et.transmissionMap,this.thickness=et.thickness,this.thicknessMap=et.thicknessMap,this.attenuationDistance=et.attenuationDistance,this.attenuationColor.copy(et.attenuationColor),this.specularIntensity=et.specularIntensity,this.specularIntensityMap=et.specularIntensityMap,this.specularColor.copy(et.specularColor),this.specularColorMap=et.specularColorMap,this}}class MeshPhongMaterial extends Material{constructor(et){super(),this.isMeshPhongMaterial=!0,this.type="MeshPhongMaterial",this.color=new Color$1(16777215),this.specular=new Color$1(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Color$1(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=TangentSpaceNormalMap,this.normalScale=new Vector2(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=MultiplyOperation,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.fog=!0,this.setValues(et)}copy(et){return super.copy(et),this.color.copy(et.color),this.specular.copy(et.specular),this.shininess=et.shininess,this.map=et.map,this.lightMap=et.lightMap,this.lightMapIntensity=et.lightMapIntensity,this.aoMap=et.aoMap,this.aoMapIntensity=et.aoMapIntensity,this.emissive.copy(et.emissive),this.emissiveMap=et.emissiveMap,this.emissiveIntensity=et.emissiveIntensity,this.bumpMap=et.bumpMap,this.bumpScale=et.bumpScale,this.normalMap=et.normalMap,this.normalMapType=et.normalMapType,this.normalScale.copy(et.normalScale),this.displacementMap=et.displacementMap,this.displacementScale=et.displacementScale,this.displacementBias=et.displacementBias,this.specularMap=et.specularMap,this.alphaMap=et.alphaMap,this.envMap=et.envMap,this.combine=et.combine,this.reflectivity=et.reflectivity,this.refractionRatio=et.refractionRatio,this.wireframe=et.wireframe,this.wireframeLinewidth=et.wireframeLinewidth,this.wireframeLinecap=et.wireframeLinecap,this.wireframeLinejoin=et.wireframeLinejoin,this.flatShading=et.flatShading,this.fog=et.fog,this}}class MeshToonMaterial extends Material{constructor(et){super(),this.isMeshToonMaterial=!0,this.defines={TOON:""},this.type="MeshToonMaterial",this.color=new Color$1(16777215),this.map=null,this.gradientMap=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Color$1(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=TangentSpaceNormalMap,this.normalScale=new Vector2(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.fog=!0,this.setValues(et)}copy(et){return super.copy(et),this.color.copy(et.color),this.map=et.map,this.gradientMap=et.gradientMap,this.lightMap=et.lightMap,this.lightMapIntensity=et.lightMapIntensity,this.aoMap=et.aoMap,this.aoMapIntensity=et.aoMapIntensity,this.emissive.copy(et.emissive),this.emissiveMap=et.emissiveMap,this.emissiveIntensity=et.emissiveIntensity,this.bumpMap=et.bumpMap,this.bumpScale=et.bumpScale,this.normalMap=et.normalMap,this.normalMapType=et.normalMapType,this.normalScale.copy(et.normalScale),this.displacementMap=et.displacementMap,this.displacementScale=et.displacementScale,this.displacementBias=et.displacementBias,this.alphaMap=et.alphaMap,this.wireframe=et.wireframe,this.wireframeLinewidth=et.wireframeLinewidth,this.wireframeLinecap=et.wireframeLinecap,this.wireframeLinejoin=et.wireframeLinejoin,this.fog=et.fog,this}}class MeshNormalMaterial extends Material{constructor(et){super(),this.isMeshNormalMaterial=!0,this.type="MeshNormalMaterial",this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=TangentSpaceNormalMap,this.normalScale=new Vector2(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.flatShading=!1,this.setValues(et)}copy(et){return super.copy(et),this.bumpMap=et.bumpMap,this.bumpScale=et.bumpScale,this.normalMap=et.normalMap,this.normalMapType=et.normalMapType,this.normalScale.copy(et.normalScale),this.displacementMap=et.displacementMap,this.displacementScale=et.displacementScale,this.displacementBias=et.displacementBias,this.wireframe=et.wireframe,this.wireframeLinewidth=et.wireframeLinewidth,this.flatShading=et.flatShading,this}}class MeshLambertMaterial extends Material{constructor(et){super(),this.isMeshLambertMaterial=!0,this.type="MeshLambertMaterial",this.color=new Color$1(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Color$1(0),this.emissiveIntensity=1,this.emissiveMap=null,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=MultiplyOperation,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.fog=!0,this.setValues(et)}copy(et){return super.copy(et),this.color.copy(et.color),this.map=et.map,this.lightMap=et.lightMap,this.lightMapIntensity=et.lightMapIntensity,this.aoMap=et.aoMap,this.aoMapIntensity=et.aoMapIntensity,this.emissive.copy(et.emissive),this.emissiveMap=et.emissiveMap,this.emissiveIntensity=et.emissiveIntensity,this.specularMap=et.specularMap,this.alphaMap=et.alphaMap,this.envMap=et.envMap,this.combine=et.combine,this.reflectivity=et.reflectivity,this.refractionRatio=et.refractionRatio,this.wireframe=et.wireframe,this.wireframeLinewidth=et.wireframeLinewidth,this.wireframeLinecap=et.wireframeLinecap,this.wireframeLinejoin=et.wireframeLinejoin,this.fog=et.fog,this}}class MeshMatcapMaterial extends Material{constructor(et){super(),this.isMeshMatcapMaterial=!0,this.defines={MATCAP:""},this.type="MeshMatcapMaterial",this.color=new Color$1(16777215),this.matcap=null,this.map=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=TangentSpaceNormalMap,this.normalScale=new Vector2(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,this.flatShading=!1,this.fog=!0,this.setValues(et)}copy(et){return super.copy(et),this.defines={MATCAP:""},this.color.copy(et.color),this.matcap=et.matcap,this.map=et.map,this.bumpMap=et.bumpMap,this.bumpScale=et.bumpScale,this.normalMap=et.normalMap,this.normalMapType=et.normalMapType,this.normalScale.copy(et.normalScale),this.displacementMap=et.displacementMap,this.displacementScale=et.displacementScale,this.displacementBias=et.displacementBias,this.alphaMap=et.alphaMap,this.flatShading=et.flatShading,this.fog=et.fog,this}}class LineDashedMaterial extends LineBasicMaterial{constructor(et){super(),this.isLineDashedMaterial=!0,this.type="LineDashedMaterial",this.scale=1,this.dashSize=3,this.gapSize=1,this.setValues(et)}copy(et){return super.copy(et),this.scale=et.scale,this.dashSize=et.dashSize,this.gapSize=et.gapSize,this}}function arraySlice(tt,et,nt){return isTypedArray$2(tt)?new tt.constructor(tt.subarray(et,nt!==void 0?nt:tt.length)):tt.slice(et,nt)}function convertArray(tt,et,nt){return!tt||!nt&&tt.constructor===et?tt:typeof et.BYTES_PER_ELEMENT=="number"?new et(tt):Array.prototype.slice.call(tt)}function isTypedArray$2(tt){return ArrayBuffer.isView(tt)&&!(tt instanceof DataView)}function getKeyframeOrder(tt){function et(it,ot){return tt[it]-tt[ot]}const nt=tt.length,rt=new Array(nt);for(let it=0;it!==nt;++it)rt[it]=it;return rt.sort(et),rt}function sortedArray(tt,et,nt){const rt=tt.length,it=new tt.constructor(rt);for(let ot=0,at=0;at!==rt;++ot){const st=nt[ot]*et;for(let lt=0;lt!==et;++lt)it[at++]=tt[st+lt]}return it}function flattenJSON(tt,et,nt,rt){let it=1,ot=tt[0];for(;ot!==void 0&&ot[rt]===void 0;)ot=tt[it++];if(ot===void 0)return;let at=ot[rt];if(at!==void 0)if(Array.isArray(at))do at=ot[rt],at!==void 0&&(et.push(ot.time),nt.push.apply(nt,at)),ot=tt[it++];while(ot!==void 0);else if(at.toArray!==void 0)do at=ot[rt],at!==void 0&&(et.push(ot.time),at.toArray(nt,nt.length)),ot=tt[it++];while(ot!==void 0);else do at=ot[rt],at!==void 0&&(et.push(ot.time),nt.push(at)),ot=tt[it++];while(ot!==void 0)}function subclip(tt,et,nt,rt,it=30){const ot=tt.clone();ot.name=et;const at=[];for(let lt=0;lt=rt)){ht.push(ct.times[pt]);for(let gt=0;gtot.tracks[lt].times[0]&&(st=ot.tracks[lt].times[0]);for(let lt=0;lt=st.times[mt]){const bt=mt*ht+ut,vt=bt+ht-ut;gt=arraySlice(st.values,bt,vt)}else{const bt=st.createInterpolant(),vt=ut,xt=ht-ut;bt.evaluate(ot),gt=arraySlice(bt.resultBuffer,vt,xt)}lt==="quaternion"&&new Quaternion().fromArray(gt).normalize().conjugate().toArray(gt);const yt=ct.times.length;for(let bt=0;bt=ot)){const st=nt[1];et=ot)break t}at=rt,rt=0;break n}break e}for(;rt>>1;etnt;)--at;if(++at,ot!==0||at!==it){ot>=at&&(at=Math.max(at,1),ot=at-1);const st=this.getValueSize();this.times=arraySlice(rt,ot,at),this.values=arraySlice(this.values,ot*st,at*st)}return this}validate(){let et=!0;const nt=this.getValueSize();nt-Math.floor(nt)!==0&&(console.error("THREE.KeyframeTrack: Invalid value size in track.",this),et=!1);const rt=this.times,it=this.values,ot=rt.length;ot===0&&(console.error("THREE.KeyframeTrack: Track is empty.",this),et=!1);let at=null;for(let st=0;st!==ot;st++){const lt=rt[st];if(typeof lt=="number"&&isNaN(lt)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,st,lt),et=!1;break}if(at!==null&&at>lt){console.error("THREE.KeyframeTrack: Out of order keys.",this,st,lt,at),et=!1;break}at=lt}if(it!==void 0&&isTypedArray$2(it))for(let st=0,lt=it.length;st!==lt;++st){const ct=it[st];if(isNaN(ct)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,st,ct),et=!1;break}}return et}optimize(){const et=arraySlice(this.times),nt=arraySlice(this.values),rt=this.getValueSize(),it=this.getInterpolation()===InterpolateSmooth,ot=et.length-1;let at=1;for(let st=1;st0){et[at]=et[ot];for(let st=ot*rt,lt=at*rt,ct=0;ct!==rt;++ct)nt[lt+ct]=nt[st+ct];++at}return at!==et.length?(this.times=arraySlice(et,0,at),this.values=arraySlice(nt,0,at*rt)):(this.times=et,this.values=nt),this}clone(){const et=arraySlice(this.times,0),nt=arraySlice(this.values,0),rt=this.constructor,it=new rt(this.name,et,nt);return it.createInterpolant=this.createInterpolant,it}}KeyframeTrack.prototype.TimeBufferType=Float32Array;KeyframeTrack.prototype.ValueBufferType=Float32Array;KeyframeTrack.prototype.DefaultInterpolation=InterpolateLinear;class BooleanKeyframeTrack extends KeyframeTrack{}BooleanKeyframeTrack.prototype.ValueTypeName="bool";BooleanKeyframeTrack.prototype.ValueBufferType=Array;BooleanKeyframeTrack.prototype.DefaultInterpolation=InterpolateDiscrete;BooleanKeyframeTrack.prototype.InterpolantFactoryMethodLinear=void 0;BooleanKeyframeTrack.prototype.InterpolantFactoryMethodSmooth=void 0;class ColorKeyframeTrack extends KeyframeTrack{}ColorKeyframeTrack.prototype.ValueTypeName="color";class NumberKeyframeTrack extends KeyframeTrack{}NumberKeyframeTrack.prototype.ValueTypeName="number";class QuaternionLinearInterpolant extends Interpolant{constructor(et,nt,rt,it){super(et,nt,rt,it)}interpolate_(et,nt,rt,it){const ot=this.resultBuffer,at=this.sampleValues,st=this.valueSize,lt=(rt-nt)/(it-nt);let ct=et*st;for(let ut=ct+st;ct!==ut;ct+=4)Quaternion.slerpFlat(ot,0,at,ct-st,at,ct,lt);return ot}}class QuaternionKeyframeTrack extends KeyframeTrack{InterpolantFactoryMethodLinear(et){return new QuaternionLinearInterpolant(this.times,this.values,this.getValueSize(),et)}}QuaternionKeyframeTrack.prototype.ValueTypeName="quaternion";QuaternionKeyframeTrack.prototype.DefaultInterpolation=InterpolateLinear;QuaternionKeyframeTrack.prototype.InterpolantFactoryMethodSmooth=void 0;class StringKeyframeTrack extends KeyframeTrack{}StringKeyframeTrack.prototype.ValueTypeName="string";StringKeyframeTrack.prototype.ValueBufferType=Array;StringKeyframeTrack.prototype.DefaultInterpolation=InterpolateDiscrete;StringKeyframeTrack.prototype.InterpolantFactoryMethodLinear=void 0;StringKeyframeTrack.prototype.InterpolantFactoryMethodSmooth=void 0;class VectorKeyframeTrack extends KeyframeTrack{}VectorKeyframeTrack.prototype.ValueTypeName="vector";class AnimationClip{constructor(et,nt=-1,rt,it=NormalAnimationBlendMode){this.name=et,this.tracks=rt,this.duration=nt,this.blendMode=it,this.uuid=generateUUID$1(),this.duration<0&&this.resetDuration()}static parse(et){const nt=[],rt=et.tracks,it=1/(et.fps||1);for(let at=0,st=rt.length;at!==st;++at)nt.push(parseKeyframeTrack(rt[at]).scale(it));const ot=new this(et.name,et.duration,nt,et.blendMode);return ot.uuid=et.uuid,ot}static toJSON(et){const nt=[],rt=et.tracks,it={name:et.name,duration:et.duration,tracks:nt,uuid:et.uuid,blendMode:et.blendMode};for(let ot=0,at=rt.length;ot!==at;++ot)nt.push(KeyframeTrack.toJSON(rt[ot]));return it}static CreateFromMorphTargetSequence(et,nt,rt,it){const ot=nt.length,at=[];for(let st=0;st1){const ht=ut[1];let dt=it[ht];dt||(it[ht]=dt=[]),dt.push(ct)}}const at=[];for(const st in it)at.push(this.CreateFromMorphTargetSequence(st,it[st],nt,rt));return at}static parseAnimation(et,nt){if(!et)return console.error("THREE.AnimationClip: No animation in JSONLoader data."),null;const rt=function(ht,dt,pt,mt,gt){if(pt.length!==0){const yt=[],bt=[];flattenJSON(pt,yt,bt,mt),yt.length!==0&>.push(new ht(dt,yt,bt))}},it=[],ot=et.name||"default",at=et.fps||30,st=et.blendMode;let lt=et.length||-1;const ct=et.hierarchy||[];for(let ht=0;ht{nt&&nt(ot),this.manager.itemEnd(et)},0),ot;if(loading[et]!==void 0){loading[et].push({onLoad:nt,onProgress:rt,onError:it});return}loading[et]=[],loading[et].push({onLoad:nt,onProgress:rt,onError:it});const at=new Request(et,{headers:new Headers(this.requestHeader),credentials:this.withCredentials?"include":"same-origin"}),st=this.mimeType,lt=this.responseType;fetch(at).then(ct=>{if(ct.status===200||ct.status===0){if(ct.status===0&&console.warn("THREE.FileLoader: HTTP Status 0 received."),typeof ReadableStream>"u"||ct.body===void 0||ct.body.getReader===void 0)return ct;const ut=loading[et],ht=ct.body.getReader(),dt=ct.headers.get("Content-Length"),pt=dt?parseInt(dt):0,mt=pt!==0;let gt=0;const yt=new ReadableStream({start(bt){vt();function vt(){ht.read().then(({done:xt,value:kt})=>{if(xt)bt.close();else{gt+=kt.byteLength;const St=new ProgressEvent("progress",{lengthComputable:mt,loaded:gt,total:pt});for(let Tt=0,At=ut.length;Tt{switch(lt){case"arraybuffer":return ct.arrayBuffer();case"blob":return ct.blob();case"document":return ct.text().then(ut=>new DOMParser().parseFromString(ut,st));case"json":return ct.json();default:if(st===void 0)return ct.text();{const ht=/charset="?([^;"\s]*)"?/i.exec(st),dt=ht&&ht[1]?ht[1].toLowerCase():void 0,pt=new TextDecoder(dt);return ct.arrayBuffer().then(mt=>pt.decode(mt))}}}).then(ct=>{Cache.add(et,ct);const ut=loading[et];delete loading[et];for(let ht=0,dt=ut.length;ht{const ut=loading[et];if(ut===void 0)throw this.manager.itemError(et),ct;delete loading[et];for(let ht=0,dt=ut.length;ht{this.manager.itemEnd(et)}),this.manager.itemStart(et)}setResponseType(et){return this.responseType=et,this}setMimeType(et){return this.mimeType=et,this}}class AnimationLoader extends Loader$2{constructor(et){super(et)}load(et,nt,rt,it){const ot=this,at=new FileLoader(this.manager);at.setPath(this.path),at.setRequestHeader(this.requestHeader),at.setWithCredentials(this.withCredentials),at.load(et,function(st){try{nt(ot.parse(JSON.parse(st)))}catch(lt){it?it(lt):console.error(lt),ot.manager.itemError(et)}},rt,it)}parse(et){const nt=[];for(let rt=0;rt0:it.vertexColors=et.vertexColors),et.uniforms!==void 0)for(const ot in et.uniforms){const at=et.uniforms[ot];switch(it.uniforms[ot]={},at.type){case"t":it.uniforms[ot].value=rt(at.value);break;case"c":it.uniforms[ot].value=new Color$1().setHex(at.value);break;case"v2":it.uniforms[ot].value=new Vector2().fromArray(at.value);break;case"v3":it.uniforms[ot].value=new Vector3().fromArray(at.value);break;case"v4":it.uniforms[ot].value=new Vector4().fromArray(at.value);break;case"m3":it.uniforms[ot].value=new Matrix3().fromArray(at.value);break;case"m4":it.uniforms[ot].value=new Matrix4().fromArray(at.value);break;default:it.uniforms[ot].value=at.value}}if(et.defines!==void 0&&(it.defines=et.defines),et.vertexShader!==void 0&&(it.vertexShader=et.vertexShader),et.fragmentShader!==void 0&&(it.fragmentShader=et.fragmentShader),et.extensions!==void 0)for(const ot in et.extensions)it.extensions[ot]=et.extensions[ot];if(et.shading!==void 0&&(it.flatShading=et.shading===1),et.size!==void 0&&(it.size=et.size),et.sizeAttenuation!==void 0&&(it.sizeAttenuation=et.sizeAttenuation),et.map!==void 0&&(it.map=rt(et.map)),et.matcap!==void 0&&(it.matcap=rt(et.matcap)),et.alphaMap!==void 0&&(it.alphaMap=rt(et.alphaMap)),et.bumpMap!==void 0&&(it.bumpMap=rt(et.bumpMap)),et.bumpScale!==void 0&&(it.bumpScale=et.bumpScale),et.normalMap!==void 0&&(it.normalMap=rt(et.normalMap)),et.normalMapType!==void 0&&(it.normalMapType=et.normalMapType),et.normalScale!==void 0){let ot=et.normalScale;Array.isArray(ot)===!1&&(ot=[ot,ot]),it.normalScale=new Vector2().fromArray(ot)}return et.displacementMap!==void 0&&(it.displacementMap=rt(et.displacementMap)),et.displacementScale!==void 0&&(it.displacementScale=et.displacementScale),et.displacementBias!==void 0&&(it.displacementBias=et.displacementBias),et.roughnessMap!==void 0&&(it.roughnessMap=rt(et.roughnessMap)),et.metalnessMap!==void 0&&(it.metalnessMap=rt(et.metalnessMap)),et.emissiveMap!==void 0&&(it.emissiveMap=rt(et.emissiveMap)),et.emissiveIntensity!==void 0&&(it.emissiveIntensity=et.emissiveIntensity),et.specularMap!==void 0&&(it.specularMap=rt(et.specularMap)),et.specularIntensityMap!==void 0&&(it.specularIntensityMap=rt(et.specularIntensityMap)),et.specularColorMap!==void 0&&(it.specularColorMap=rt(et.specularColorMap)),et.envMap!==void 0&&(it.envMap=rt(et.envMap)),et.envMapIntensity!==void 0&&(it.envMapIntensity=et.envMapIntensity),et.reflectivity!==void 0&&(it.reflectivity=et.reflectivity),et.refractionRatio!==void 0&&(it.refractionRatio=et.refractionRatio),et.lightMap!==void 0&&(it.lightMap=rt(et.lightMap)),et.lightMapIntensity!==void 0&&(it.lightMapIntensity=et.lightMapIntensity),et.aoMap!==void 0&&(it.aoMap=rt(et.aoMap)),et.aoMapIntensity!==void 0&&(it.aoMapIntensity=et.aoMapIntensity),et.gradientMap!==void 0&&(it.gradientMap=rt(et.gradientMap)),et.clearcoatMap!==void 0&&(it.clearcoatMap=rt(et.clearcoatMap)),et.clearcoatRoughnessMap!==void 0&&(it.clearcoatRoughnessMap=rt(et.clearcoatRoughnessMap)),et.clearcoatNormalMap!==void 0&&(it.clearcoatNormalMap=rt(et.clearcoatNormalMap)),et.clearcoatNormalScale!==void 0&&(it.clearcoatNormalScale=new Vector2().fromArray(et.clearcoatNormalScale)),et.iridescenceMap!==void 0&&(it.iridescenceMap=rt(et.iridescenceMap)),et.iridescenceThicknessMap!==void 0&&(it.iridescenceThicknessMap=rt(et.iridescenceThicknessMap)),et.transmissionMap!==void 0&&(it.transmissionMap=rt(et.transmissionMap)),et.thicknessMap!==void 0&&(it.thicknessMap=rt(et.thicknessMap)),et.sheenColorMap!==void 0&&(it.sheenColorMap=rt(et.sheenColorMap)),et.sheenRoughnessMap!==void 0&&(it.sheenRoughnessMap=rt(et.sheenRoughnessMap)),it}setTextures(et){return this.textures=et,this}static createMaterialFromType(et){const nt={ShadowMaterial,SpriteMaterial,RawShaderMaterial,ShaderMaterial,PointsMaterial,MeshPhysicalMaterial,MeshStandardMaterial,MeshPhongMaterial,MeshToonMaterial,MeshNormalMaterial,MeshLambertMaterial,MeshDepthMaterial,MeshDistanceMaterial,MeshBasicMaterial,MeshMatcapMaterial,LineDashedMaterial,LineBasicMaterial,Material};return new nt[et]}}class LoaderUtils{static decodeText(et){if(typeof TextDecoder<"u")return new TextDecoder().decode(et);let nt="";for(let rt=0,it=et.length;rt0){const lt=new LoadingManager(nt);ot=new ImageLoader(lt),ot.setCrossOrigin(this.crossOrigin);for(let ct=0,ut=et.length;ct0){it=new ImageLoader(this.manager),it.setCrossOrigin(this.crossOrigin);for(let at=0,st=et.length;at"u"&&console.warn("THREE.ImageBitmapLoader: createImageBitmap() not supported."),typeof fetch>"u"&&console.warn("THREE.ImageBitmapLoader: fetch() not supported."),this.options={premultiplyAlpha:"none"}}setOptions(et){return this.options=et,this}load(et,nt,rt,it){et===void 0&&(et=""),this.path!==void 0&&(et=this.path+et),et=this.manager.resolveURL(et);const ot=this,at=Cache.get(et);if(at!==void 0)return ot.manager.itemStart(et),setTimeout(function(){nt&&nt(at),ot.manager.itemEnd(et)},0),at;const st={};st.credentials=this.crossOrigin==="anonymous"?"same-origin":"include",st.headers=this.requestHeader,fetch(et,st).then(function(lt){return lt.blob()}).then(function(lt){return createImageBitmap(lt,Object.assign(ot.options,{colorSpaceConversion:"none"}))}).then(function(lt){Cache.add(et,lt),nt&&nt(lt),ot.manager.itemEnd(et)}).catch(function(lt){it&&it(lt),ot.manager.itemError(et),ot.manager.itemEnd(et)}),ot.manager.itemStart(et)}}let _context$1;const AudioContext={getContext:function(){return _context$1===void 0&&(_context$1=new(window.AudioContext||window.webkitAudioContext)),_context$1},setContext:function(tt){_context$1=tt}};class AudioLoader extends Loader$2{constructor(et){super(et)}load(et,nt,rt,it){const ot=this,at=new FileLoader(this.manager);at.setResponseType("arraybuffer"),at.setPath(this.path),at.setRequestHeader(this.requestHeader),at.setWithCredentials(this.withCredentials),at.load(et,function(st){try{const lt=st.slice(0);AudioContext.getContext().decodeAudioData(lt,function(ut){nt(ut)})}catch(lt){it?it(lt):console.error(lt),ot.manager.itemError(et)}},rt,it)}}class HemisphereLightProbe extends LightProbe{constructor(et,nt,rt=1){super(void 0,rt),this.isHemisphereLightProbe=!0;const it=new Color$1().set(et),ot=new Color$1().set(nt),at=new Vector3(it.r,it.g,it.b),st=new Vector3(ot.r,ot.g,ot.b),lt=Math.sqrt(Math.PI),ct=lt*Math.sqrt(.75);this.sh.coefficients[0].copy(at).add(st).multiplyScalar(lt),this.sh.coefficients[1].copy(at).sub(st).multiplyScalar(ct)}}class AmbientLightProbe extends LightProbe{constructor(et,nt=1){super(void 0,nt),this.isAmbientLightProbe=!0;const rt=new Color$1().set(et);this.sh.coefficients[0].set(rt.r,rt.g,rt.b).multiplyScalar(2*Math.sqrt(Math.PI))}}const _eyeRight=new Matrix4,_eyeLeft=new Matrix4,_projectionMatrix=new Matrix4;class StereoCamera{constructor(){this.type="StereoCamera",this.aspect=1,this.eyeSep=.064,this.cameraL=new PerspectiveCamera,this.cameraL.layers.enable(1),this.cameraL.matrixAutoUpdate=!1,this.cameraR=new PerspectiveCamera,this.cameraR.layers.enable(2),this.cameraR.matrixAutoUpdate=!1,this._cache={focus:null,fov:null,aspect:null,near:null,far:null,zoom:null,eyeSep:null}}update(et){const nt=this._cache;if(nt.focus!==et.focus||nt.fov!==et.fov||nt.aspect!==et.aspect*this.aspect||nt.near!==et.near||nt.far!==et.far||nt.zoom!==et.zoom||nt.eyeSep!==this.eyeSep){nt.focus=et.focus,nt.fov=et.fov,nt.aspect=et.aspect*this.aspect,nt.near=et.near,nt.far=et.far,nt.zoom=et.zoom,nt.eyeSep=this.eyeSep,_projectionMatrix.copy(et.projectionMatrix);const it=nt.eyeSep/2,ot=it*nt.near/nt.focus,at=nt.near*Math.tan(DEG2RAD$1*nt.fov*.5)/nt.zoom;let st,lt;_eyeLeft.elements[12]=-it,_eyeRight.elements[12]=it,st=-at*nt.aspect+ot,lt=at*nt.aspect+ot,_projectionMatrix.elements[0]=2*nt.near/(lt-st),_projectionMatrix.elements[8]=(lt+st)/(lt-st),this.cameraL.projectionMatrix.copy(_projectionMatrix),st=-at*nt.aspect-ot,lt=at*nt.aspect-ot,_projectionMatrix.elements[0]=2*nt.near/(lt-st),_projectionMatrix.elements[8]=(lt+st)/(lt-st),this.cameraR.projectionMatrix.copy(_projectionMatrix)}this.cameraL.matrixWorld.copy(et.matrixWorld).multiply(_eyeLeft),this.cameraR.matrixWorld.copy(et.matrixWorld).multiply(_eyeRight)}}let Clock$1=class{constructor(et=!0){this.autoStart=et,this.startTime=0,this.oldTime=0,this.elapsedTime=0,this.running=!1}start(){this.startTime=now$5(),this.oldTime=this.startTime,this.elapsedTime=0,this.running=!0}stop(){this.getElapsedTime(),this.running=!1,this.autoStart=!1}getElapsedTime(){return this.getDelta(),this.elapsedTime}getDelta(){let et=0;if(this.autoStart&&!this.running)return this.start(),0;if(this.running){const nt=now$5();et=(nt-this.oldTime)/1e3,this.oldTime=nt,this.elapsedTime+=et}return et}};function now$5(){return(typeof performance>"u"?Date:performance).now()}const _position$1=new Vector3,_quaternion$1=new Quaternion,_scale$1=new Vector3,_orientation$1=new Vector3;class AudioListener extends Object3D{constructor(){super(),this.type="AudioListener",this.context=AudioContext.getContext(),this.gain=this.context.createGain(),this.gain.connect(this.context.destination),this.filter=null,this.timeDelta=0,this._clock=new Clock$1}getInput(){return this.gain}removeFilter(){return this.filter!==null&&(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination),this.gain.connect(this.context.destination),this.filter=null),this}getFilter(){return this.filter}setFilter(et){return this.filter!==null?(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination)):this.gain.disconnect(this.context.destination),this.filter=et,this.gain.connect(this.filter),this.filter.connect(this.context.destination),this}getMasterVolume(){return this.gain.gain.value}setMasterVolume(et){return this.gain.gain.setTargetAtTime(et,this.context.currentTime,.01),this}updateMatrixWorld(et){super.updateMatrixWorld(et);const nt=this.context.listener,rt=this.up;if(this.timeDelta=this._clock.getDelta(),this.matrixWorld.decompose(_position$1,_quaternion$1,_scale$1),_orientation$1.set(0,0,-1).applyQuaternion(_quaternion$1),nt.positionX){const it=this.context.currentTime+this.timeDelta;nt.positionX.linearRampToValueAtTime(_position$1.x,it),nt.positionY.linearRampToValueAtTime(_position$1.y,it),nt.positionZ.linearRampToValueAtTime(_position$1.z,it),nt.forwardX.linearRampToValueAtTime(_orientation$1.x,it),nt.forwardY.linearRampToValueAtTime(_orientation$1.y,it),nt.forwardZ.linearRampToValueAtTime(_orientation$1.z,it),nt.upX.linearRampToValueAtTime(rt.x,it),nt.upY.linearRampToValueAtTime(rt.y,it),nt.upZ.linearRampToValueAtTime(rt.z,it)}else nt.setPosition(_position$1.x,_position$1.y,_position$1.z),nt.setOrientation(_orientation$1.x,_orientation$1.y,_orientation$1.z,rt.x,rt.y,rt.z)}}let Audio$1=class extends Object3D{constructor(et){super(),this.type="Audio",this.listener=et,this.context=et.context,this.gain=this.context.createGain(),this.gain.connect(et.getInput()),this.autoplay=!1,this.buffer=null,this.detune=0,this.loop=!1,this.loopStart=0,this.loopEnd=0,this.offset=0,this.duration=void 0,this.playbackRate=1,this.isPlaying=!1,this.hasPlaybackControl=!0,this.source=null,this.sourceType="empty",this._startedAt=0,this._progress=0,this._connected=!1,this.filters=[]}getOutput(){return this.gain}setNodeSource(et){return this.hasPlaybackControl=!1,this.sourceType="audioNode",this.source=et,this.connect(),this}setMediaElementSource(et){return this.hasPlaybackControl=!1,this.sourceType="mediaNode",this.source=this.context.createMediaElementSource(et),this.connect(),this}setMediaStreamSource(et){return this.hasPlaybackControl=!1,this.sourceType="mediaStreamNode",this.source=this.context.createMediaStreamSource(et),this.connect(),this}setBuffer(et){return this.buffer=et,this.sourceType="buffer",this.autoplay&&this.play(),this}play(et=0){if(this.isPlaying===!0){console.warn("THREE.Audio: Audio is already playing.");return}if(this.hasPlaybackControl===!1){console.warn("THREE.Audio: this Audio has no playback control.");return}this._startedAt=this.context.currentTime+et;const nt=this.context.createBufferSource();return nt.buffer=this.buffer,nt.loop=this.loop,nt.loopStart=this.loopStart,nt.loopEnd=this.loopEnd,nt.onended=this.onEnded.bind(this),nt.start(this._startedAt,this._progress+this.offset,this.duration),this.isPlaying=!0,this.source=nt,this.setDetune(this.detune),this.setPlaybackRate(this.playbackRate),this.connect()}pause(){if(this.hasPlaybackControl===!1){console.warn("THREE.Audio: this Audio has no playback control.");return}return this.isPlaying===!0&&(this._progress+=Math.max(this.context.currentTime-this._startedAt,0)*this.playbackRate,this.loop===!0&&(this._progress=this._progress%(this.duration||this.buffer.duration)),this.source.stop(),this.source.onended=null,this.isPlaying=!1),this}stop(){if(this.hasPlaybackControl===!1){console.warn("THREE.Audio: this Audio has no playback control.");return}return this._progress=0,this.source.stop(),this.source.onended=null,this.isPlaying=!1,this}connect(){if(this.filters.length>0){this.source.connect(this.filters[0]);for(let et=1,nt=this.filters.length;et0){this.source.disconnect(this.filters[0]);for(let et=1,nt=this.filters.length;et0&&this._mixBufferRegionAdditive(rt,it,this._addIndex*nt,1,nt);for(let lt=nt,ct=nt+nt;lt!==ct;++lt)if(rt[lt]!==rt[lt+nt]){st.setValue(rt,it);break}}saveOriginalState(){const et=this.binding,nt=this.buffer,rt=this.valueSize,it=rt*this._origIndex;et.getValue(nt,it);for(let ot=rt,at=it;ot!==at;++ot)nt[ot]=nt[it+ot%rt];this._setIdentity(),this.cumulativeWeight=0,this.cumulativeWeightAdditive=0}restoreOriginalState(){const et=this.valueSize*3;this.binding.setValue(this.buffer,et)}_setAdditiveIdentityNumeric(){const et=this._addIndex*this.valueSize,nt=et+this.valueSize;for(let rt=et;rt=.5)for(let at=0;at!==ot;++at)et[nt+at]=et[rt+at]}_slerp(et,nt,rt,it){Quaternion.slerpFlat(et,nt,et,nt,et,rt,it)}_slerpAdditive(et,nt,rt,it,ot){const at=this._workIndex*ot;Quaternion.multiplyQuaternionsFlat(et,at,et,nt,et,rt),Quaternion.slerpFlat(et,nt,et,nt,et,at,it)}_lerp(et,nt,rt,it,ot){const at=1-it;for(let st=0;st!==ot;++st){const lt=nt+st;et[lt]=et[lt]*at+et[rt+st]*it}}_lerpAdditive(et,nt,rt,it,ot){for(let at=0;at!==ot;++at){const st=nt+at;et[st]=et[st]+et[rt+at]*it}}}const _RESERVED_CHARS_RE="\\[\\]\\.:\\/",_reservedRe=new RegExp("["+_RESERVED_CHARS_RE+"]","g"),_wordChar="[^"+_RESERVED_CHARS_RE+"]",_wordCharOrDot="[^"+_RESERVED_CHARS_RE.replace("\\.","")+"]",_directoryRe=/((?:WC+[\/:])*)/.source.replace("WC",_wordChar),_nodeRe=/(WCOD+)?/.source.replace("WCOD",_wordCharOrDot),_objectRe=/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC",_wordChar),_propertyRe=/\.(WC+)(?:\[(.+)\])?/.source.replace("WC",_wordChar),_trackRe=new RegExp("^"+_directoryRe+_nodeRe+_objectRe+_propertyRe+"$"),_supportedObjectNames=["material","materials","bones"];class Composite{constructor(et,nt,rt){const it=rt||PropertyBinding.parseTrackName(nt);this._targetGroup=et,this._bindings=et.subscribe_(nt,it)}getValue(et,nt){this.bind();const rt=this._targetGroup.nCachedObjects_,it=this._bindings[rt];it!==void 0&&it.getValue(et,nt)}setValue(et,nt){const rt=this._bindings;for(let it=this._targetGroup.nCachedObjects_,ot=rt.length;it!==ot;++it)rt[it].setValue(et,nt)}bind(){const et=this._bindings;for(let nt=this._targetGroup.nCachedObjects_,rt=et.length;nt!==rt;++nt)et[nt].bind()}unbind(){const et=this._bindings;for(let nt=this._targetGroup.nCachedObjects_,rt=et.length;nt!==rt;++nt)et[nt].unbind()}}class PropertyBinding{constructor(et,nt,rt){this.path=nt,this.parsedPath=rt||PropertyBinding.parseTrackName(nt),this.node=PropertyBinding.findNode(et,this.parsedPath.nodeName)||et,this.rootNode=et,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}static create(et,nt,rt){return et&&et.isAnimationObjectGroup?new PropertyBinding.Composite(et,nt,rt):new PropertyBinding(et,nt,rt)}static sanitizeNodeName(et){return et.replace(/\s/g,"_").replace(_reservedRe,"")}static parseTrackName(et){const nt=_trackRe.exec(et);if(nt===null)throw new Error("PropertyBinding: Cannot parse trackName: "+et);const rt={nodeName:nt[2],objectName:nt[3],objectIndex:nt[4],propertyName:nt[5],propertyIndex:nt[6]},it=rt.nodeName&&rt.nodeName.lastIndexOf(".");if(it!==void 0&&it!==-1){const ot=rt.nodeName.substring(it+1);_supportedObjectNames.indexOf(ot)!==-1&&(rt.nodeName=rt.nodeName.substring(0,it),rt.objectName=ot)}if(rt.propertyName===null||rt.propertyName.length===0)throw new Error("PropertyBinding: can not parse propertyName from trackName: "+et);return rt}static findNode(et,nt){if(nt===void 0||nt===""||nt==="."||nt===-1||nt===et.name||nt===et.uuid)return et;if(et.skeleton){const rt=et.skeleton.getBoneByName(nt);if(rt!==void 0)return rt}if(et.children){const rt=function(ot){for(let at=0;at=ot){const ht=ot++,dt=et[ht];nt[dt.uuid]=ut,et[ut]=dt,nt[ct]=ht,et[ht]=lt;for(let pt=0,mt=it;pt!==mt;++pt){const gt=rt[pt],yt=gt[ht],bt=gt[ut];gt[ut]=yt,gt[ht]=bt}}}this.nCachedObjects_=ot}uncache(){const et=this._objects,nt=this._indicesByUUID,rt=this._bindings,it=rt.length;let ot=this.nCachedObjects_,at=et.length;for(let st=0,lt=arguments.length;st!==lt;++st){const ct=arguments[st],ut=ct.uuid,ht=nt[ut];if(ht!==void 0)if(delete nt[ut],ht0&&(nt[pt.uuid]=ht),et[ht]=pt,et.pop();for(let mt=0,gt=it;mt!==gt;++mt){const yt=rt[mt];yt[ht]=yt[dt],yt.pop()}}}this.nCachedObjects_=ot}subscribe_(et,nt){const rt=this._bindingsIndicesByPath;let it=rt[et];const ot=this._bindings;if(it!==void 0)return ot[it];const at=this._paths,st=this._parsedPaths,lt=this._objects,ct=lt.length,ut=this.nCachedObjects_,ht=new Array(ct);it=ot.length,rt[et]=it,at.push(et),st.push(nt),ot.push(ht);for(let dt=ut,pt=lt.length;dt!==pt;++dt){const mt=lt[dt];ht[dt]=new PropertyBinding(mt,et,nt)}return ht}unsubscribe_(et){const nt=this._bindingsIndicesByPath,rt=nt[et];if(rt!==void 0){const it=this._paths,ot=this._parsedPaths,at=this._bindings,st=at.length-1,lt=at[st],ct=et[st];nt[ct]=rt,at[rt]=lt,at.pop(),ot[rt]=ot[st],ot.pop(),it[rt]=it[st],it.pop()}}}class AnimationAction{constructor(et,nt,rt=null,it=nt.blendMode){this._mixer=et,this._clip=nt,this._localRoot=rt,this.blendMode=it;const ot=nt.tracks,at=ot.length,st=new Array(at),lt={endingStart:ZeroCurvatureEnding,endingEnd:ZeroCurvatureEnding};for(let ct=0;ct!==at;++ct){const ut=ot[ct].createInterpolant(null);st[ct]=ut,ut.settings=lt}this._interpolantSettings=lt,this._interpolants=st,this._propertyBindings=new Array(at),this._cacheIndex=null,this._byClipCacheIndex=null,this._timeScaleInterpolant=null,this._weightInterpolant=null,this.loop=LoopRepeat,this._loopCount=-1,this._startTime=null,this.time=0,this.timeScale=1,this._effectiveTimeScale=1,this.weight=1,this._effectiveWeight=1,this.repetitions=1/0,this.paused=!1,this.enabled=!0,this.clampWhenFinished=!1,this.zeroSlopeAtStart=!0,this.zeroSlopeAtEnd=!0}play(){return this._mixer._activateAction(this),this}stop(){return this._mixer._deactivateAction(this),this.reset()}reset(){return this.paused=!1,this.enabled=!0,this.time=0,this._loopCount=-1,this._startTime=null,this.stopFading().stopWarping()}isRunning(){return this.enabled&&!this.paused&&this.timeScale!==0&&this._startTime===null&&this._mixer._isActiveAction(this)}isScheduled(){return this._mixer._isActiveAction(this)}startAt(et){return this._startTime=et,this}setLoop(et,nt){return this.loop=et,this.repetitions=nt,this}setEffectiveWeight(et){return this.weight=et,this._effectiveWeight=this.enabled?et:0,this.stopFading()}getEffectiveWeight(){return this._effectiveWeight}fadeIn(et){return this._scheduleFading(et,0,1)}fadeOut(et){return this._scheduleFading(et,1,0)}crossFadeFrom(et,nt,rt){if(et.fadeOut(nt),this.fadeIn(nt),rt){const it=this._clip.duration,ot=et._clip.duration,at=ot/it,st=it/ot;et.warp(1,at,nt),this.warp(st,1,nt)}return this}crossFadeTo(et,nt,rt){return et.crossFadeFrom(this,nt,rt)}stopFading(){const et=this._weightInterpolant;return et!==null&&(this._weightInterpolant=null,this._mixer._takeBackControlInterpolant(et)),this}setEffectiveTimeScale(et){return this.timeScale=et,this._effectiveTimeScale=this.paused?0:et,this.stopWarping()}getEffectiveTimeScale(){return this._effectiveTimeScale}setDuration(et){return this.timeScale=this._clip.duration/et,this.stopWarping()}syncWith(et){return this.time=et.time,this.timeScale=et.timeScale,this.stopWarping()}halt(et){return this.warp(this._effectiveTimeScale,0,et)}warp(et,nt,rt){const it=this._mixer,ot=it.time,at=this.timeScale;let st=this._timeScaleInterpolant;st===null&&(st=it._lendControlInterpolant(),this._timeScaleInterpolant=st);const lt=st.parameterPositions,ct=st.sampleValues;return lt[0]=ot,lt[1]=ot+rt,ct[0]=et/at,ct[1]=nt/at,this}stopWarping(){const et=this._timeScaleInterpolant;return et!==null&&(this._timeScaleInterpolant=null,this._mixer._takeBackControlInterpolant(et)),this}getMixer(){return this._mixer}getClip(){return this._clip}getRoot(){return this._localRoot||this._mixer._root}_update(et,nt,rt,it){if(!this.enabled){this._updateWeight(et);return}const ot=this._startTime;if(ot!==null){const lt=(et-ot)*rt;if(lt<0||rt===0)return;this._startTime=null,nt=rt*lt}nt*=this._updateTimeScale(et);const at=this._updateTime(nt),st=this._updateWeight(et);if(st>0){const lt=this._interpolants,ct=this._propertyBindings;switch(this.blendMode){case AdditiveAnimationBlendMode:for(let ut=0,ht=lt.length;ut!==ht;++ut)lt[ut].evaluate(at),ct[ut].accumulateAdditive(st);break;case NormalAnimationBlendMode:default:for(let ut=0,ht=lt.length;ut!==ht;++ut)lt[ut].evaluate(at),ct[ut].accumulate(it,st)}}}_updateWeight(et){let nt=0;if(this.enabled){nt=this.weight;const rt=this._weightInterpolant;if(rt!==null){const it=rt.evaluate(et)[0];nt*=it,et>rt.parameterPositions[1]&&(this.stopFading(),it===0&&(this.enabled=!1))}}return this._effectiveWeight=nt,nt}_updateTimeScale(et){let nt=0;if(!this.paused){nt=this.timeScale;const rt=this._timeScaleInterpolant;if(rt!==null){const it=rt.evaluate(et)[0];nt*=it,et>rt.parameterPositions[1]&&(this.stopWarping(),nt===0?this.paused=!0:this.timeScale=nt)}}return this._effectiveTimeScale=nt,nt}_updateTime(et){const nt=this._clip.duration,rt=this.loop;let it=this.time+et,ot=this._loopCount;const at=rt===LoopPingPong;if(et===0)return ot===-1?it:at&&(ot&1)===1?nt-it:it;if(rt===LoopOnce){ot===-1&&(this._loopCount=0,this._setEndings(!0,!0,!1));e:{if(it>=nt)it=nt;else if(it<0)it=0;else{this.time=it;break e}this.clampWhenFinished?this.paused=!0:this.enabled=!1,this.time=it,this._mixer.dispatchEvent({type:"finished",action:this,direction:et<0?-1:1})}}else{if(ot===-1&&(et>=0?(ot=0,this._setEndings(!0,this.repetitions===0,at)):this._setEndings(this.repetitions===0,!0,at)),it>=nt||it<0){const st=Math.floor(it/nt);it-=nt*st,ot+=Math.abs(st);const lt=this.repetitions-ot;if(lt<=0)this.clampWhenFinished?this.paused=!0:this.enabled=!1,it=et>0?nt:0,this.time=it,this._mixer.dispatchEvent({type:"finished",action:this,direction:et>0?1:-1});else{if(lt===1){const ct=et<0;this._setEndings(ct,!ct,at)}else this._setEndings(!1,!1,at);this._loopCount=ot,this.time=it,this._mixer.dispatchEvent({type:"loop",action:this,loopDelta:st})}}else this.time=it;if(at&&(ot&1)===1)return nt-it}return it}_setEndings(et,nt,rt){const it=this._interpolantSettings;rt?(it.endingStart=ZeroSlopeEnding,it.endingEnd=ZeroSlopeEnding):(et?it.endingStart=this.zeroSlopeAtStart?ZeroSlopeEnding:ZeroCurvatureEnding:it.endingStart=WrapAroundEnding,nt?it.endingEnd=this.zeroSlopeAtEnd?ZeroSlopeEnding:ZeroCurvatureEnding:it.endingEnd=WrapAroundEnding)}_scheduleFading(et,nt,rt){const it=this._mixer,ot=it.time;let at=this._weightInterpolant;at===null&&(at=it._lendControlInterpolant(),this._weightInterpolant=at);const st=at.parameterPositions,lt=at.sampleValues;return st[0]=ot,lt[0]=nt,st[1]=ot+et,lt[1]=rt,this}}const _controlInterpolantsResultBuffer=new Float32Array(1);class AnimationMixer extends EventDispatcher$1{constructor(et){super(),this._root=et,this._initMemoryManager(),this._accuIndex=0,this.time=0,this.timeScale=1}_bindAction(et,nt){const rt=et._localRoot||this._root,it=et._clip.tracks,ot=it.length,at=et._propertyBindings,st=et._interpolants,lt=rt.uuid,ct=this._bindingsByRootAndName;let ut=ct[lt];ut===void 0&&(ut={},ct[lt]=ut);for(let ht=0;ht!==ot;++ht){const dt=it[ht],pt=dt.name;let mt=ut[pt];if(mt!==void 0)++mt.referenceCount,at[ht]=mt;else{if(mt=at[ht],mt!==void 0){mt._cacheIndex===null&&(++mt.referenceCount,this._addInactiveBinding(mt,lt,pt));continue}const gt=nt&&nt._propertyBindings[ht].binding.parsedPath;mt=new PropertyMixer(PropertyBinding.create(rt,pt,gt),dt.ValueTypeName,dt.getValueSize()),++mt.referenceCount,this._addInactiveBinding(mt,lt,pt),at[ht]=mt}st[ht].resultBuffer=mt.buffer}}_activateAction(et){if(!this._isActiveAction(et)){if(et._cacheIndex===null){const rt=(et._localRoot||this._root).uuid,it=et._clip.uuid,ot=this._actionsByClip[it];this._bindAction(et,ot&&ot.knownActions[0]),this._addInactiveAction(et,it,rt)}const nt=et._propertyBindings;for(let rt=0,it=nt.length;rt!==it;++rt){const ot=nt[rt];ot.useCount++===0&&(this._lendBinding(ot),ot.saveOriginalState())}this._lendAction(et)}}_deactivateAction(et){if(this._isActiveAction(et)){const nt=et._propertyBindings;for(let rt=0,it=nt.length;rt!==it;++rt){const ot=nt[rt];--ot.useCount===0&&(ot.restoreOriginalState(),this._takeBackBinding(ot))}this._takeBackAction(et)}}_initMemoryManager(){this._actions=[],this._nActiveActions=0,this._actionsByClip={},this._bindings=[],this._nActiveBindings=0,this._bindingsByRootAndName={},this._controlInterpolants=[],this._nActiveControlInterpolants=0;const et=this;this.stats={actions:{get total(){return et._actions.length},get inUse(){return et._nActiveActions}},bindings:{get total(){return et._bindings.length},get inUse(){return et._nActiveBindings}},controlInterpolants:{get total(){return et._controlInterpolants.length},get inUse(){return et._nActiveControlInterpolants}}}}_isActiveAction(et){const nt=et._cacheIndex;return nt!==null&&nt=0;--rt)et[rt].stop();return this}update(et){et*=this.timeScale;const nt=this._actions,rt=this._nActiveActions,it=this.time+=et,ot=Math.sign(et),at=this._accuIndex^=1;for(let ct=0;ct!==rt;++ct)nt[ct]._update(it,et,ot,at);const st=this._bindings,lt=this._nActiveBindings;for(let ct=0;ct!==lt;++ct)st[ct].apply(at);return this}setTime(et){this.time=0;for(let nt=0;ntthis.max.x||et.ythis.max.y)}containsBox(et){return this.min.x<=et.min.x&&et.max.x<=this.max.x&&this.min.y<=et.min.y&&et.max.y<=this.max.y}getParameter(et,nt){return nt.set((et.x-this.min.x)/(this.max.x-this.min.x),(et.y-this.min.y)/(this.max.y-this.min.y))}intersectsBox(et){return!(et.max.xthis.max.x||et.max.ythis.max.y)}clampPoint(et,nt){return nt.copy(et).clamp(this.min,this.max)}distanceToPoint(et){return _vector$4.copy(et).clamp(this.min,this.max).sub(et).length()}intersect(et){return this.min.max(et.min),this.max.min(et.max),this}union(et){return this.min.min(et.min),this.max.max(et.max),this}translate(et){return this.min.add(et),this.max.add(et),this}equals(et){return et.min.equals(this.min)&&et.max.equals(this.max)}}const _startP=new Vector3,_startEnd=new Vector3;class Line3{constructor(et=new Vector3,nt=new Vector3){this.start=et,this.end=nt}set(et,nt){return this.start.copy(et),this.end.copy(nt),this}copy(et){return this.start.copy(et.start),this.end.copy(et.end),this}getCenter(et){return et.addVectors(this.start,this.end).multiplyScalar(.5)}delta(et){return et.subVectors(this.end,this.start)}distanceSq(){return this.start.distanceToSquared(this.end)}distance(){return this.start.distanceTo(this.end)}at(et,nt){return this.delta(nt).multiplyScalar(et).add(this.start)}closestPointToPointParameter(et,nt){_startP.subVectors(et,this.start),_startEnd.subVectors(this.end,this.start);const rt=_startEnd.dot(_startEnd);let ot=_startEnd.dot(_startP)/rt;return nt&&(ot=clamp$5(ot,0,1)),ot}closestPointToPoint(et,nt,rt){const it=this.closestPointToPointParameter(et,nt);return this.delta(rt).multiplyScalar(it).add(this.start)}applyMatrix4(et){return this.start.applyMatrix4(et),this.end.applyMatrix4(et),this}equals(et){return et.start.equals(this.start)&&et.end.equals(this.end)}clone(){return new this.constructor().copy(this)}}const _vector$3=new Vector3;class SpotLightHelper extends Object3D{constructor(et,nt){super(),this.light=et,this.light.updateMatrixWorld(),this.matrix=et.matrixWorld,this.matrixAutoUpdate=!1,this.color=nt;const rt=new BufferGeometry,it=[0,0,0,0,0,1,0,0,0,1,0,1,0,0,0,-1,0,1,0,0,0,0,1,1,0,0,0,0,-1,1];for(let at=0,st=1,lt=32;at.99999)this.quaternion.set(0,0,0,1);else if(et.y<-.99999)this.quaternion.set(1,0,0,0);else{_axis.set(et.z,0,-et.x).normalize();const nt=Math.acos(et.y);this.quaternion.setFromAxisAngle(_axis,nt)}}setLength(et,nt=et*.2,rt=nt*.2){this.line.scale.set(1,Math.max(1e-4,et-nt),1),this.line.updateMatrix(),this.cone.scale.set(rt,nt,rt),this.cone.position.y=et,this.cone.updateMatrix()}setColor(et){this.line.material.color.set(et),this.cone.material.color.set(et)}copy(et){return super.copy(et,!1),this.line.copy(et.line),this.cone.copy(et.cone),this}}class AxesHelper extends LineSegments{constructor(et=1){const nt=[0,0,0,et,0,0,0,0,0,0,et,0,0,0,0,0,0,et],rt=[1,0,0,1,.6,0,0,1,0,.6,1,0,0,0,1,0,.6,1],it=new BufferGeometry;it.setAttribute("position",new Float32BufferAttribute(nt,3)),it.setAttribute("color",new Float32BufferAttribute(rt,3));const ot=new LineBasicMaterial({vertexColors:!0,toneMapped:!1});super(it,ot),this.type="AxesHelper"}setColors(et,nt,rt){const it=new Color$1,ot=this.geometry.attributes.color.array;return it.set(et),it.toArray(ot,0),it.toArray(ot,3),it.set(nt),it.toArray(ot,6),it.toArray(ot,9),it.set(rt),it.toArray(ot,12),it.toArray(ot,15),this.geometry.attributes.color.needsUpdate=!0,this}dispose(){this.geometry.dispose(),this.material.dispose()}}class ShapePath{constructor(){this.type="ShapePath",this.color=new Color$1,this.subPaths=[],this.currentPath=null}moveTo(et,nt){return this.currentPath=new Path$1,this.subPaths.push(this.currentPath),this.currentPath.moveTo(et,nt),this}lineTo(et,nt){return this.currentPath.lineTo(et,nt),this}quadraticCurveTo(et,nt,rt,it){return this.currentPath.quadraticCurveTo(et,nt,rt,it),this}bezierCurveTo(et,nt,rt,it,ot,at){return this.currentPath.bezierCurveTo(et,nt,rt,it,ot,at),this}splineThru(et){return this.currentPath.splineThru(et),this}toShapes(et,nt){function rt(vt){const xt=[];for(let kt=0,St=vt.length;ktNumber.EPSILON){if(jt<0&&(Et=xt[At],Dt=-Dt,$t=xt[Tt],jt=-jt),vt.y$t.y)continue;if(vt.y===Et.y){if(vt.x===Et.x)return!0}else{const Pt=jt*(vt.x-Et.x)-Dt*(vt.y-Et.y);if(Pt===0)return!0;if(Pt<0)continue;St=!St}}else{if(vt.y!==Et.y)continue;if($t.x<=vt.x&&vt.x<=Et.x||Et.x<=vt.x&&vt.x<=$t.x)return!0}}return St}const ot=ShapeUtils.isClockWise,at=this.subPaths;if(at.length===0)return[];if(nt===!0)return rt(at);let st,lt,ct;const ut=[];if(at.length===1)return lt=at[0],ct=new Shape$1,ct.curves=lt.curves,ut.push(ct),ut;let ht=!ot(at[0].getPoints());ht=et?!ht:ht;const dt=[],pt=[];let mt=[],gt=0,yt;pt[gt]=void 0,mt[gt]=[];for(let vt=0,xt=at.length;vt1){let vt=!1,xt=0;for(let kt=0,St=pt.length;kt0&&vt===!1&&(mt=dt)}let bt;for(let vt=0,xt=pt.length;vt>-ct-14,rt[lt|256]=1024>>-ct-14|32768,it[lt]=-ct-1,it[lt|256]=-ct-1):ct<=15?(rt[lt]=ct+15<<10,rt[lt|256]=ct+15<<10|32768,it[lt]=13,it[lt|256]=13):ct<128?(rt[lt]=31744,rt[lt|256]=64512,it[lt]=24,it[lt|256]=24):(rt[lt]=31744,rt[lt|256]=64512,it[lt]=13,it[lt|256]=13)}const ot=new Uint32Array(2048),at=new Uint32Array(64),st=new Uint32Array(64);for(let lt=1;lt<1024;++lt){let ct=lt<<13,ut=0;for(;!(ct&8388608);)ct<<=1,ut-=8388608;ct&=-8388609,ut+=947912704,ot[lt]=ct|ut}for(let lt=1024;lt<2048;++lt)ot[lt]=939524096+(lt-1024<<13);for(let lt=1;lt<31;++lt)at[lt]=lt<<23;at[31]=1199570944,at[32]=2147483648;for(let lt=33;lt<63;++lt)at[lt]=2147483648+(lt-32<<23);at[63]=3347054592;for(let lt=1;lt<64;++lt)lt!==32&&(st[lt]=1024);return{floatView:et,uint32View:nt,baseTable:rt,shiftTable:it,mantissaTable:ot,exponentTable:at,offsetTable:st}}function toHalfFloat(tt){Math.abs(tt)>65504&&console.warn("THREE.DataUtils.toHalfFloat(): Value out of range."),tt=clamp$5(tt,-65504,65504),_tables.floatView[0]=tt;const et=_tables.uint32View[0],nt=et>>23&511;return _tables.baseTable[nt]+((et&8388607)>>_tables.shiftTable[nt])}function fromHalfFloat(tt){const et=tt>>10;return _tables.uint32View[0]=_tables.mantissaTable[_tables.offsetTable[et]+(tt&1023)]+_tables.exponentTable[et],_tables.floatView[0]}var DataUtils=Object.freeze({__proto__:null,toHalfFloat,fromHalfFloat});class ParametricGeometry extends BufferGeometry{constructor(){console.error("THREE.ParametricGeometry has been moved to /examples/jsm/geometries/ParametricGeometry.js"),super()}}class TextGeometry extends BufferGeometry{constructor(){console.error("THREE.TextGeometry has been moved to /examples/jsm/geometries/TextGeometry.js"),super()}}function FontLoader(){console.error("THREE.FontLoader has been moved to /examples/jsm/loaders/FontLoader.js")}function Font(){console.error("THREE.Font has been moved to /examples/jsm/loaders/FontLoader.js")}function ImmediateRenderObject(){console.error("THREE.ImmediateRenderObject has been removed.")}class WebGLMultisampleRenderTarget extends WebGLRenderTarget{constructor(et,nt,rt){console.error('THREE.WebGLMultisampleRenderTarget has been removed. Use a normal render target and set the "samples" property to greater 0 to enable multisampling.'),super(et,nt,rt),this.samples=4}}class DataTexture2DArray extends DataArrayTexture{constructor(et,nt,rt,it){console.warn("THREE.DataTexture2DArray has been renamed to DataArrayTexture."),super(et,nt,rt,it)}}class DataTexture3D extends Data3DTexture{constructor(et,nt,rt,it){console.warn("THREE.DataTexture3D has been renamed to Data3DTexture."),super(et,nt,rt,it)}}typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("register",{detail:{revision:REVISION}}));typeof window<"u"&&(window.__THREE__?console.warn("WARNING: Multiple instances of Three.js being imported."):window.__THREE__=REVISION);const THREE$1=Object.freeze(Object.defineProperty({__proto__:null,ACESFilmicToneMapping,AddEquation,AddOperation,AdditiveAnimationBlendMode,AdditiveBlending,AlphaFormat,AlwaysDepth,AlwaysStencilFunc,AmbientLight,AmbientLightProbe,AnimationClip,AnimationLoader,AnimationMixer,AnimationObjectGroup,AnimationUtils,ArcCurve,ArrayCamera,ArrowHelper,Audio:Audio$1,AudioAnalyser,AudioContext,AudioListener,AudioLoader,AxesHelper,BackSide,BasicDepthPacking,BasicShadowMap,Bone,BooleanKeyframeTrack,Box2,Box3,Box3Helper,BoxBufferGeometry:BoxGeometry,BoxGeometry,BoxHelper,BufferAttribute,BufferGeometry,BufferGeometryLoader,ByteType,Cache,Camera,CameraHelper,CanvasTexture,CapsuleBufferGeometry:CapsuleGeometry,CapsuleGeometry,CatmullRomCurve3,CineonToneMapping,CircleBufferGeometry:CircleGeometry,CircleGeometry,ClampToEdgeWrapping,Clock:Clock$1,Color:Color$1,ColorKeyframeTrack,ColorManagement,CompressedTexture,CompressedTextureLoader,ConeBufferGeometry:ConeGeometry,ConeGeometry,CubeCamera,CubeReflectionMapping,CubeRefractionMapping,CubeTexture,CubeTextureLoader,CubeUVReflectionMapping,CubicBezierCurve,CubicBezierCurve3,CubicInterpolant,CullFaceBack,CullFaceFront,CullFaceFrontBack,CullFaceNone,Curve:Curve$1,CurvePath,CustomBlending,CustomToneMapping,CylinderBufferGeometry:CylinderGeometry,CylinderGeometry,Cylindrical,Data3DTexture,DataArrayTexture,DataTexture,DataTexture2DArray,DataTexture3D,DataTextureLoader,DataUtils,DecrementStencilOp,DecrementWrapStencilOp,DefaultLoadingManager,DepthFormat,DepthStencilFormat,DepthTexture,DirectionalLight,DirectionalLightHelper,DiscreteInterpolant,DodecahedronBufferGeometry:DodecahedronGeometry,DodecahedronGeometry,DoubleSide,DstAlphaFactor,DstColorFactor,DynamicCopyUsage,DynamicDrawUsage,DynamicReadUsage,EdgesGeometry,EllipseCurve,EqualDepth,EqualStencilFunc,EquirectangularReflectionMapping,EquirectangularRefractionMapping,Euler,EventDispatcher:EventDispatcher$1,ExtrudeBufferGeometry:ExtrudeGeometry,ExtrudeGeometry,FileLoader,FlatShading,Float16BufferAttribute,Float32BufferAttribute,Float64BufferAttribute,FloatType,Fog,FogExp2,Font,FontLoader,FramebufferTexture,FrontSide,Frustum,GLBufferAttribute,GLSL1,GLSL3,GreaterDepth,GreaterEqualDepth,GreaterEqualStencilFunc,GreaterStencilFunc,GridHelper,Group,HalfFloatType,HemisphereLight,HemisphereLightHelper,HemisphereLightProbe,IcosahedronBufferGeometry:IcosahedronGeometry,IcosahedronGeometry,ImageBitmapLoader,ImageLoader,ImageUtils,ImmediateRenderObject,IncrementStencilOp,IncrementWrapStencilOp,InstancedBufferAttribute,InstancedBufferGeometry,InstancedInterleavedBuffer,InstancedMesh,Int16BufferAttribute,Int32BufferAttribute,Int8BufferAttribute,IntType,InterleavedBuffer,InterleavedBufferAttribute,Interpolant,InterpolateDiscrete,InterpolateLinear,InterpolateSmooth,InvertStencilOp,KeepStencilOp,KeyframeTrack,LOD,LatheBufferGeometry:LatheGeometry,LatheGeometry,Layers,LessDepth,LessEqualDepth,LessEqualStencilFunc,LessStencilFunc,Light,LightProbe,Line:Line$2,Line3,LineBasicMaterial,LineCurve,LineCurve3,LineDashedMaterial,LineLoop,LineSegments,LinearEncoding,LinearFilter,LinearInterpolant,LinearMipMapLinearFilter,LinearMipMapNearestFilter,LinearMipmapLinearFilter,LinearMipmapNearestFilter,LinearSRGBColorSpace:LinearSRGBColorSpace$1,LinearToneMapping,Loader:Loader$2,LoaderUtils,LoadingManager,LoopOnce,LoopPingPong,LoopRepeat,LuminanceAlphaFormat,LuminanceFormat,MOUSE,Material,MaterialLoader,MathUtils,Matrix3,Matrix4,MaxEquation,Mesh,MeshBasicMaterial,MeshDepthMaterial,MeshDistanceMaterial,MeshLambertMaterial,MeshMatcapMaterial,MeshNormalMaterial,MeshPhongMaterial,MeshPhysicalMaterial,MeshStandardMaterial,MeshToonMaterial,MinEquation,MirroredRepeatWrapping,MixOperation,MultiplyBlending,MultiplyOperation,NearestFilter,NearestMipMapLinearFilter,NearestMipMapNearestFilter,NearestMipmapLinearFilter,NearestMipmapNearestFilter,NeverDepth,NeverStencilFunc,NoBlending,NoColorSpace:NoColorSpace$1,NoToneMapping,NormalAnimationBlendMode,NormalBlending,NotEqualDepth,NotEqualStencilFunc,NumberKeyframeTrack,Object3D,ObjectLoader,ObjectSpaceNormalMap,OctahedronBufferGeometry:OctahedronGeometry,OctahedronGeometry,OneFactor,OneMinusDstAlphaFactor,OneMinusDstColorFactor,OneMinusSrcAlphaFactor,OneMinusSrcColorFactor,OrthographicCamera,PCFShadowMap,PCFSoftShadowMap,PMREMGenerator,ParametricGeometry,Path:Path$1,PerspectiveCamera,Plane,PlaneBufferGeometry:PlaneGeometry,PlaneGeometry,PlaneHelper,PointLight,PointLightHelper,Points,PointsMaterial,PolarGridHelper,PolyhedronBufferGeometry:PolyhedronGeometry,PolyhedronGeometry,PositionalAudio,PropertyBinding,PropertyMixer,QuadraticBezierCurve,QuadraticBezierCurve3,Quaternion,QuaternionKeyframeTrack,QuaternionLinearInterpolant,REVISION,RGBADepthPacking,RGBAFormat,RGBAIntegerFormat,RGBA_ASTC_10x10_Format,RGBA_ASTC_10x5_Format,RGBA_ASTC_10x6_Format,RGBA_ASTC_10x8_Format,RGBA_ASTC_12x10_Format,RGBA_ASTC_12x12_Format,RGBA_ASTC_4x4_Format,RGBA_ASTC_5x4_Format,RGBA_ASTC_5x5_Format,RGBA_ASTC_6x5_Format,RGBA_ASTC_6x6_Format,RGBA_ASTC_8x5_Format,RGBA_ASTC_8x6_Format,RGBA_ASTC_8x8_Format,RGBA_BPTC_Format,RGBA_ETC2_EAC_Format,RGBA_PVRTC_2BPPV1_Format,RGBA_PVRTC_4BPPV1_Format,RGBA_S3TC_DXT1_Format,RGBA_S3TC_DXT3_Format,RGBA_S3TC_DXT5_Format,RGBFormat,RGB_ETC1_Format,RGB_ETC2_Format,RGB_PVRTC_2BPPV1_Format,RGB_PVRTC_4BPPV1_Format,RGB_S3TC_DXT1_Format,RGFormat,RGIntegerFormat,RawShaderMaterial,Ray,Raycaster,RectAreaLight,RedFormat,RedIntegerFormat,ReinhardToneMapping,RepeatWrapping,ReplaceStencilOp,ReverseSubtractEquation,RingBufferGeometry:RingGeometry,RingGeometry,SRGBColorSpace:SRGBColorSpace$1,Scene,ShaderChunk,ShaderLib,ShaderMaterial,ShadowMaterial,Shape:Shape$1,ShapeBufferGeometry:ShapeGeometry,ShapeGeometry,ShapePath,ShapeUtils,ShortType,Skeleton,SkeletonHelper,SkinnedMesh,SmoothShading,Source:Source$1,Sphere,SphereBufferGeometry:SphereGeometry,SphereGeometry,Spherical,SphericalHarmonics3,SplineCurve,SpotLight,SpotLightHelper,Sprite,SpriteMaterial,SrcAlphaFactor,SrcAlphaSaturateFactor,SrcColorFactor,StaticCopyUsage,StaticDrawUsage,StaticReadUsage,StereoCamera,StreamCopyUsage,StreamDrawUsage,StreamReadUsage,StringKeyframeTrack,SubtractEquation,SubtractiveBlending,TOUCH,TangentSpaceNormalMap,TetrahedronBufferGeometry:TetrahedronGeometry,TetrahedronGeometry,TextGeometry,Texture,TextureLoader,TorusBufferGeometry:TorusGeometry,TorusGeometry,TorusKnotBufferGeometry:TorusKnotGeometry,TorusKnotGeometry,Triangle,TriangleFanDrawMode,TriangleStripDrawMode,TrianglesDrawMode,TubeBufferGeometry:TubeGeometry,TubeGeometry,UVMapping,Uint16BufferAttribute,Uint32BufferAttribute,Uint8BufferAttribute,Uint8ClampedBufferAttribute,Uniform,UniformsGroup,UniformsLib,UniformsUtils,UnsignedByteType,UnsignedInt248Type,UnsignedIntType,UnsignedShort4444Type,UnsignedShort5551Type,UnsignedShortType,VSMShadowMap,Vector2,Vector3,Vector4,VectorKeyframeTrack,VideoTexture,WebGL1Renderer,WebGL3DRenderTarget,WebGLArrayRenderTarget,WebGLCubeRenderTarget,WebGLMultipleRenderTargets,WebGLMultisampleRenderTarget,WebGLRenderTarget,WebGLRenderer,WebGLUtils,WireframeGeometry,WrapAroundEnding,ZeroCurvatureEnding,ZeroFactor,ZeroSlopeEnding,ZeroStencilOp,_SRGBAFormat,sRGBEncoding},Symbol.toStringTag,{value:"Module"})),variableVector3$1=new Vector3(0,0,0),outlineEffectColor=16777215,nodesAreRelatives=(tt,et)=>{var ot,at;if(!(tt!=null&&tt.ref_id)||!(et!=null&&et.ref_id))return!1;let nt=!1;const rt=tt.guests,it=et.guests;return((ot=tt.children)!=null&&ot.includes(et.ref_id)||(at=et.children)!=null&&at.includes(tt.ref_id))&&(nt=!0),(rt!=null&&rt.find(st=>st.ref_id===et.ref_id)||it!=null&&it.find(st=>st.ref_id===tt.ref_id))&&(nt=!0),nt},mock={exact:[{boost:0,date:1672152975,description:"The credit card debt and job growth in the US economy",episode_title:"Café ₿: #Bitcoin Holiday Hangout & @StatusMoneyUSA a #BTC Credit Card",guests:[{name:" BITVOLT7",profile_picture:"https://pbs.twimg.com/profile_images/1532194001511714818/O8nSTKcx_400x400.png",ref_id:"2b9913b7-393c-4125-9aeb-4a8bf32bfa44",twitter_handle:"BITVOLT7"},{name:" samcallah",profile_picture:"https://pbs.twimg.com/profile_images/1502454836981166082/cQG0YQxc_400x400.jpg",ref_id:"a3dbdb56-e228-4382-98bc-d4495ff6dfbd",twitter_handle:"samcallah"},{name:" taodejing2",profile_picture:"https://pbs.twimg.com/profile_images/1575442322531274756/-ZdL-K9S_400x400.jpg",ref_id:"4914799b-a230-4bee-95c9-cf3ac44b6b70",twitter_handle:"TyonClubhouse"},{name:" MrHodl",profile_picture:"https://pbs.twimg.com/profile_images/1607490976670519296/vhLAojMR_400x400.jpg",ref_id:"01d6ee68-c0ef-4ead-b2b7-7eb04694519e",twitter_handle:"MrHodl"},{name:" TomerStrolight",profile_picture:"https://pbs.twimg.com/profile_images/1591960241008148481/HtyINxtU_400x400.jpg",ref_id:"57beb381-b9e8-4dd1-82f6-4e544a63146b",twitter_handle:"TomerStrolight"},{name:" VailshireCap",profile_picture:"https://pbs.twimg.com/profile_images/1475554600094552064/DSlPG1lx_400x400.jpg",ref_id:"73c15965-ddad-4e32-9746-da92f5d24134",twitter_handle:"VailshireCap"},{name:"bergealex4",profile_picture:"https://pbs.twimg.com/profile_images/1273374628577247233/tYigkAZH_400x400.jpg",ref_id:"da4bb8ab-540d-4f88-a2a6-f3a3941c5b74",twitter_handle:"bergealex4"},{name:" LukeMikic21",profile_picture:"https://pbs.twimg.com/profile_images/1604626418708742147/gWyVLeqa_400x400.jpg",ref_id:"0a907108-f59f-420f-9986-79b0f060f690",twitter_handle:"LukeMikic21"},{name:" 2140data",profile_picture:"https://pbs.twimg.com/profile_images/1598330787778232320/ZVFcRtet_400x400.jpg",ref_id:"c8fb52d1-fa69-410d-bf96-8a7559bba863",twitter_handle:"2140data"},{name:" majdmaksad",profile_picture:"https://pbs.twimg.com/profile_images/1483883774471516167/zvEjiCTO_400x400.jpg",ref_id:"1a63c59d-a760-4f8b-bba9-ddfd3cff9f33",twitter_handle:"majdmaksad"}],hosts:[{name:" PeterAnsel9",profile_picture:"https://pbs.twimg.com/profile_images/1607979298153197568/JqAbDyi__400x400.jpg",ref_id:"6cb2b160-fa27-4fac-9ccf-77886ba01521",twitter_handle:"PeterAnsel9"},{name:" NeilJacobs",profile_picture:"https://pbs.twimg.com/profile_images/1599432572727169025/NSoPdchB_400x400.jpg",ref_id:"c61e3ff9-f540-4343-bc26-1c3a4b537b78",twitter_handle:"NeilJacobs"},{name:" nathanfast",profile_picture:"https://pbs.twimg.com/profile_images/1545758157103697920/RyLn465N_400x400.jpg",ref_id:"739d907e-cbc6-4a05-9246-45c7c5d2a853",twitter_handle:"nathanfast"},{name:"TYonClubhouse",profile_picture:"https://pbs.twimg.com/profile_images/1575442322531274756/-ZdL-K9S_400x400.jpg",ref_id:"cc057990-16d0-4588-83c7-1eb9734eb994",twitter_handle:"tyonclubhouse"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/239722cb-4216-414a-a17b-5adf9d52e15a.jpg",keyword:!0,link:"https://stakwork-uploads.s3.amazonaws.com/uploads/customers/2707/media_to_local/b27dcf88-bdfb-4433-b0fe-c9040dbf392f/11aa5648-d416-46f3-a66a-0750e9d71ccd.mp3",node_type:"clip",pub_key:"02574d6e8e787372184b6f17c40d6c6fe1777db9015801f95dfd24692784d767cd",ref_id:"ada07186-c3fc-4b5e-b9c7-3ce54e1b94c7",show_title:"Swan.com",text:"I do want to ask you quickly about, you mentioned the credit card debt that is soaring and savings rates going down. It is a small percentage of the overall kind of US household net worth, which I believe is about well over 100 trillion, maybe 140,000,000,000,000. When housing prices were high. But it does seem like this 1 trillion or whatever of credit card debt, while it's serious, is still a fairly small percentage of overall US. Household net worth. And I was wondering if you could comment on that. Yeah, that's a great point, Terrence. And you got to think in terms of the strata of economics, right? So people who are generally wealthy and then sort of the middle class, which has been decimated, and then the poorer classes, this is obviously affecting really harshly the poorer classes, right. Inflation just crushes people in the lower classes, financially speaking. They have minimum wage jobs. We've talked about this many times on here, but you cannot survive on one minimum wage job. So maybe they have two or three. And then as the economy tightens, they're starting to get fired from some of these. The cost of goods and services is rapidly increasing. So they can't even afford their basic groceries. They may not be able to afford gas to drive to work. All of these things, they just get worse and worse. So it does affect the lower economic classes. Disproportionately that's what drives me nuts, right. That's what makes Bitcoin so beautiful, is those are the same classes who can benefit most strongly from Bitcoin, from a fair type of money instead of the unjust system that we have. So, yeah, it's affecting them. Now. I will say, though, that the wealth effect is real, too, and that affects the upper classes. Disproportionately why? Because wealthier people own more assets, right? They own houses, they own stocks, they own bonds, they own art, they own whatever. And the valuations of those kind of things have also come down dramatically. So we're actually seeing that across the board, which is sort of interesting. And you don't always see this. You only see this in like real recessions where the poor people are buying less of their normal goods and services, the consumer staples, and the wealthier people are actually buying less of their garbage that they buy diamond rings and pearls and boats and wealthy person things, yachts, those kind of sales are all significantly down as well. So it's affecting everybody, but it affects everybody. Disproportionately that makes a lot of sense. Yeah. Thank you for that breakdown. I wanted to ask you and Sam about job growth because Nick Temeros from the Wall Street Journal, the so called Fed whisperer who seems to have inside info sometimes on what the Fed is about to do, he said that incorrectly, that we've never seen a period like this where we've had so much job growth. This is part ways wrong. There is no job growth, but so little demand for any type of housing. Talking about the housing slump, and I posted in the Nest something from gaming grandpa La Urban Nerd at La Urban Nerd, who replied the job growth is a mirage will become very clear in the next few months. And then they posted, the alleged job growth and all these downward revisions, they seem to be all happening in a downward direction where they're off by over a million, 1.1 million jobs that never existed. And the Philadelphia Fed recently admitted that US jobs were overstated by at least 1.1 million. Sam Callahan had pointed this out to us at Swan, our great economist and researcher, and I was hoping both of you could comment on this. I've never been called an economist before. Oh, sorry. Hey, I mentioned it as a compliment. Yeah. No, I have been under the belief that the labor market is not as strong as being portrayed by government officials and Fed officials for a long time. And it's because of the methodology of how these things are calculated. The payrolls number uses these really large adjustments that are basically pulled out of thin air with, as we're seeing now, large backward revisions. And the Philly Fed themselves did a report. I think that's what's showing in the nest that a lot of these jobs in those payrolls weren't actually there. Right? So they were basically over a million that were set in the headline that were there are not there now. What is this, like, six months later? Eight months later? And that's usually what happens, but nobody really thinks about that, or nobody goes back and checks up on these revisions. But it's basically painting this picture that the labor force is stronger than it is. And we know that a lot of it is what Dr. Jeff was saying, how this is, like people thinking on second jobs. We know that the jolts, like the job openings that they always talk about, it's a lot of people basically being poached from other jobs, so there isn't any new jobs being created. It's people getting poached. And there's a lot of these, like, fake job postings where they put out, like, thousands of job openings. And then this one researcher went through them and applied to all of them and heard back from a very, very tiny percentage of them at all. And so that's the kind of numbers that are used in how these things are calculated. And you have to dig into the methodology, how they're calculated. Then they always point to the unemployment rate being low. But the US. Unemployment rate is low today, not because there's an actual increase of number of people working, but because the labor force itself is shrinking since COVID There's 3.5 million people that are no longer in the workforce. A lot of that is from early retirements as well as just regular retirements. Baby boomers retiring. And so that's a sign of a tight labor market and structurally tight labor market. There's not a lot of workers out there, and the Fed doesn't like that. The Fed wants to see the labor market gets some more slack into it. They want the unemployment rate to go up, but it's kind of hard to do that. When there's just not that many people actually in the active workforce. So there's like a misunderstanding of why the unemployment rate is even low. At 50 year lows is what you often hear. And so personally, I think that has the potential for a trapdoor effect where people think the labor market is stronger than it is until it's not. And oftentimes unemployment rate is reflected where it doesn't just creep up, it kind of spikes a little bit. And so that's what I think I expect to happen in Q one of 2023. We see actually more layoffs start to happen because of the Fed's overtightening and all these other factors. But yeah, that's kind of my summary of the labor market. I think it's a circus. There's a lot of the sharad being pushed out by the Fed officials and it's not as strong as people think. ",timestamp:"01:37:18-01:44:39",topics:["US economy","credit card debt","job growth","US labour market"],type:"twitter_space",weight:127.51501043433724},{boost:0,date:1672152975,description:"Dr. Jeff Ross, of Vailshire Capital, gives his Bitcoin and overall marco outlook for 2023",episode_title:"Café ₿: #Bitcoin Holiday Hangout & @StatusMoneyUSA a #BTC Credit Card",guests:[{name:" BITVOLT7",profile_picture:"https://pbs.twimg.com/profile_images/1532194001511714818/O8nSTKcx_400x400.png",ref_id:"2b9913b7-393c-4125-9aeb-4a8bf32bfa44",twitter_handle:"BITVOLT7"},{name:" samcallah",profile_picture:"https://pbs.twimg.com/profile_images/1502454836981166082/cQG0YQxc_400x400.jpg",ref_id:"a3dbdb56-e228-4382-98bc-d4495ff6dfbd",twitter_handle:"samcallah"},{name:" taodejing2",profile_picture:"https://pbs.twimg.com/profile_images/1575442322531274756/-ZdL-K9S_400x400.jpg",ref_id:"4914799b-a230-4bee-95c9-cf3ac44b6b70",twitter_handle:"TyonClubhouse"},{name:" MrHodl",profile_picture:"https://pbs.twimg.com/profile_images/1607490976670519296/vhLAojMR_400x400.jpg",ref_id:"01d6ee68-c0ef-4ead-b2b7-7eb04694519e",twitter_handle:"MrHodl"},{name:" TomerStrolight",profile_picture:"https://pbs.twimg.com/profile_images/1591960241008148481/HtyINxtU_400x400.jpg",ref_id:"57beb381-b9e8-4dd1-82f6-4e544a63146b",twitter_handle:"TomerStrolight"},{name:" VailshireCap",profile_picture:"https://pbs.twimg.com/profile_images/1475554600094552064/DSlPG1lx_400x400.jpg",ref_id:"73c15965-ddad-4e32-9746-da92f5d24134",twitter_handle:"VailshireCap"},{name:"bergealex4",profile_picture:"https://pbs.twimg.com/profile_images/1273374628577247233/tYigkAZH_400x400.jpg",ref_id:"da4bb8ab-540d-4f88-a2a6-f3a3941c5b74",twitter_handle:"bergealex4"},{name:" LukeMikic21",profile_picture:"https://pbs.twimg.com/profile_images/1604626418708742147/gWyVLeqa_400x400.jpg",ref_id:"0a907108-f59f-420f-9986-79b0f060f690",twitter_handle:"LukeMikic21"},{name:" 2140data",profile_picture:"https://pbs.twimg.com/profile_images/1598330787778232320/ZVFcRtet_400x400.jpg",ref_id:"c8fb52d1-fa69-410d-bf96-8a7559bba863",twitter_handle:"2140data"},{name:" majdmaksad",profile_picture:"https://pbs.twimg.com/profile_images/1483883774471516167/zvEjiCTO_400x400.jpg",ref_id:"1a63c59d-a760-4f8b-bba9-ddfd3cff9f33",twitter_handle:"majdmaksad"}],hosts:[{name:" PeterAnsel9",profile_picture:"https://pbs.twimg.com/profile_images/1607979298153197568/JqAbDyi__400x400.jpg",ref_id:"6cb2b160-fa27-4fac-9ccf-77886ba01521",twitter_handle:"PeterAnsel9"},{name:" NeilJacobs",profile_picture:"https://pbs.twimg.com/profile_images/1599432572727169025/NSoPdchB_400x400.jpg",ref_id:"c61e3ff9-f540-4343-bc26-1c3a4b537b78",twitter_handle:"NeilJacobs"},{name:" nathanfast",profile_picture:"https://pbs.twimg.com/profile_images/1545758157103697920/RyLn465N_400x400.jpg",ref_id:"739d907e-cbc6-4a05-9246-45c7c5d2a853",twitter_handle:"nathanfast"},{name:"TYonClubhouse",profile_picture:"https://pbs.twimg.com/profile_images/1575442322531274756/-ZdL-K9S_400x400.jpg",ref_id:"cc057990-16d0-4588-83c7-1eb9734eb994",twitter_handle:"tyonclubhouse"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/239722cb-4216-414a-a17b-5adf9d52e15a.jpg",keyword:!0,link:"https://stakwork-uploads.s3.amazonaws.com/uploads/customers/2707/media_to_local/515f3625-8d91-439b-8d44-968fe6ab16de/19ec29f4-268c-4015-aa6e-245563dbc49d.mp3",node_type:"clip",pub_key:"034248fa888690a85021cf117c168a535c53b92e1fdf3e4f9cefddfe09118d8207",ref_id:"2a0fb607-c735-4b09-809a-3c74cc61de97",show_title:"Swan.com",text:"have Dr. Jeff Ross from Valshire Capital. Welcome. I was hoping you could give us your usual sort of breakdown on the state of the markets and what you're seeing, how was the Christmas sales and so forth. Thank you. Yeah. Hey, Terrence, thanks for having me up. And hey, everybody. It's fun to hear you all. I hope you all had a great Christmas or just happy holidays and have had some good time off. It's been good for me. Been refreshing hanging out with family a bit here. I think the main thing, I spent a lot of time over the longer weekend kind of just looking from 30,000ft up at what's going on, kind of with macro and what's happening with bitcoin in particular. 2022 was kind of a rough year. It was a confusing year for a lot of people. I think that the setup still remains pretty rough. I think retail sales are just showing a continuously weakening consumer. Interestingly, consumer confidence is rising. I think it's because consumers think that inflation, or at least high inflation, isn't going to last forever, so they're getting more confident. But savings rates are near all time lows right now. Credit card usage is near all time highs. People are basically maxing out their credit cards. They're draining their savings. That bodes poorly. A lot of companies, if you've been paying attention to any earnings reports, most major companies are preparing for recession. They just say, yeah, it's inevitable, it's coming. So we have to kind of prepare for this. Companies that have lots of merchandise, they're having a really hard time selling it. Again, that's not good from a consumer perspective. And if you understand that the GDP in the US. 70% of the GDP, approximately 70%, is based on the consumer, based on consumption. So weak consumer just means a weak economy. So we still have the same setup we've had going for a while, right? We have a slowing economy, we have some disinflation, and we have a hawkish Fed, and we have those three factors that is just always historically poor for risk assets. So until something changes, you still got to be prepared for more downside. I said I was looking at the 30,000 foot view, so I'm really bearish at the moment, but I will tell you that I think we're moving along in bitcoin. I tweeted this out on Christmas a couple of days ago. As far as the four year kind of cycle goes for bitcoin, I think we're moving out of the year of widespread panic and disillusionment. That happened in 2018 and it happened again, I think, this last year in 2022. And I think we're moving into and we're probably already there in disinterest. What does disinterest mean? It basically means there's nobody really left who cares other than the hardcore bitcoiners, right? It's just us left. We have our little rooms, we keep each other motivated. We're encouraging each other. We're still dollar cost averaging. It's basically us left. The traders don't care anymore. There's no volatility in the space anymore. Most of the garbage crypto exchanges have gotten liquidated. There may be a few more to come still. I think there probably will be. I think we're going to see some bitcoin miners still go out of business before this is over. It's going to get worse before it gets better. But that period of disinterest is when new bull markets start. So I'm actually really encouraged the best businesses for bitcoin typically start during those periods of widespread panic and disillusionment. Basically when everybody else is panicking, that's when people, the creative people, get the best ideas for how they can make something better for the next go around. So that's what I'm looking at. I'm actually really encouraged that we're getting really close to a bottom. I think we still have more pain to come, but it's in the short term, in the next couple of quarters, I think, at the latest. And then I'm really encouraged. I was telling the people over at Bitcoin magazine, I think there's a really good chance we've hit a bottom in the price of bitcoin before the bitcoin covers in Miami. And then it's basically just up from there. So I think, by the way, I think the bull market will start out slowly again because we're still in this period of disinterest. I think most people won't believe it when we start, but it's setting the stage for 2024, and 2025 being just absolutely fantastic year. So I hope people are dollar costs averaging with me. If not, if you're a trader, that's fine too, but don't try to pick a bottom. That's very hard to do. But I'm very excited for people and my friends who are dollar costs averaging right now because I think finally we're going to have better days ahead by the end of 2023. I love that. Yeah. I think during this period of disinterest, there's also just people are not taking crypto and altcoins seriously because they've obviously failed and there's all this fraud with FTX and so forth. So it's a time for bitcoiners, the ones that are left to get to know each other even better and learn from each other and just go deeper, right, and maybe upsell ourselves or just increase our conviction. And like you said, this is a time when a lot of great ideas will come and creative people will people be more creative and hopefully come up with some new projects and ideas and startups that can really move the needle. I do want to ask you quickly about, you mentioned the credit card debt that is soaring and savings rates going down. It is a small percentage of the overall kind of US household net worth, which I believe is about well over 100 trillion, maybe 140,000,000,000,000. When housing prices were high. But it does seem like this 1 trillion or whatever of credit card debt, while it's serious, is still a fairly small percentage of overall US. Household net worth. And I was wondering if you could comment on that. Yeah, that's a great point, Terrence. And you got to think in terms of the strata of economics, right? So people who are generally wealthy and then sort of the middle class, which has been decimated, and then the poorer classes, this is obviously affecting really harshly the poorer classes, right. Inflation just crushes people in the lower classes, financially speaking. They have minimum wage jobs. We've talked about this many times on here, but you cannot survive on one minimum wage job. So maybe they have two or three. And then as the economy tightens, they're starting to get fired from some of these. The cost of goods and services is rapidly increasing. So they can't even afford their basic groceries. They may not be able to afford gas to drive to work. All of these things, they just get worse and worse. So it does affect the lower economic classes. Disproportionately that's what drives me nuts, right. That's what makes Bitcoin so beautiful, is those are the same classes who can benefit most strongly from Bitcoin, from a fair type of money instead of the unjust system that we have. So, yeah, it's affecting them. Now. I will say, though, that the wealth effect is real, too, and that affects the upper classes. Disproportionately why? Because wealthier people own more assets, right? They own houses, they own stocks, they own bonds, they own art, they own whatever. And the valuations of those kind of things have also come down dramatically. So we're actually seeing that across the board, which is sort of interesting. And you don't always see this. You only see this in like real recessions where the poor people are buying less of their normal goods and services, the consumer staples, and the wealthier people are actually buying less of their garbage that they buy diamond rings and pearls and boats and wealthy person things, yachts, those kind of sales are all significantly down as well. So it's affecting everybody, but it affects everybody. Disproportionately that makes a lot of sense. Yeah. Thank you for that breakdown. ",timestamp:"01:31:53-01:39:57",topics:["Jeff Ross","Bitcoin macro outlook","poor outlook for risk assets","hawkish US Fed","Disinflation","shitcoin failures"],type:"twitter_space",weight:122.72901871778198},{boost:0,date:1672152975,description:"Bitcoin regulations in America",episode_title:"Café ₿: #Bitcoin Holiday Hangout & @StatusMoneyUSA a #BTC Credit Card",guests:[{name:" BITVOLT7",profile_picture:"https://pbs.twimg.com/profile_images/1532194001511714818/O8nSTKcx_400x400.png",ref_id:"2b9913b7-393c-4125-9aeb-4a8bf32bfa44",twitter_handle:"BITVOLT7"},{name:" samcallah",profile_picture:"https://pbs.twimg.com/profile_images/1502454836981166082/cQG0YQxc_400x400.jpg",ref_id:"a3dbdb56-e228-4382-98bc-d4495ff6dfbd",twitter_handle:"samcallah"},{name:" taodejing2",profile_picture:"https://pbs.twimg.com/profile_images/1575442322531274756/-ZdL-K9S_400x400.jpg",ref_id:"4914799b-a230-4bee-95c9-cf3ac44b6b70",twitter_handle:"TyonClubhouse"},{name:" MrHodl",profile_picture:"https://pbs.twimg.com/profile_images/1607490976670519296/vhLAojMR_400x400.jpg",ref_id:"01d6ee68-c0ef-4ead-b2b7-7eb04694519e",twitter_handle:"MrHodl"},{name:" TomerStrolight",profile_picture:"https://pbs.twimg.com/profile_images/1591960241008148481/HtyINxtU_400x400.jpg",ref_id:"57beb381-b9e8-4dd1-82f6-4e544a63146b",twitter_handle:"TomerStrolight"},{name:" VailshireCap",profile_picture:"https://pbs.twimg.com/profile_images/1475554600094552064/DSlPG1lx_400x400.jpg",ref_id:"73c15965-ddad-4e32-9746-da92f5d24134",twitter_handle:"VailshireCap"},{name:"bergealex4",profile_picture:"https://pbs.twimg.com/profile_images/1273374628577247233/tYigkAZH_400x400.jpg",ref_id:"da4bb8ab-540d-4f88-a2a6-f3a3941c5b74",twitter_handle:"bergealex4"},{name:" LukeMikic21",profile_picture:"https://pbs.twimg.com/profile_images/1604626418708742147/gWyVLeqa_400x400.jpg",ref_id:"0a907108-f59f-420f-9986-79b0f060f690",twitter_handle:"LukeMikic21"},{name:" 2140data",profile_picture:"https://pbs.twimg.com/profile_images/1598330787778232320/ZVFcRtet_400x400.jpg",ref_id:"c8fb52d1-fa69-410d-bf96-8a7559bba863",twitter_handle:"2140data"},{name:" majdmaksad",profile_picture:"https://pbs.twimg.com/profile_images/1483883774471516167/zvEjiCTO_400x400.jpg",ref_id:"1a63c59d-a760-4f8b-bba9-ddfd3cff9f33",twitter_handle:"majdmaksad"}],hosts:[{name:" PeterAnsel9",profile_picture:"https://pbs.twimg.com/profile_images/1607979298153197568/JqAbDyi__400x400.jpg",ref_id:"6cb2b160-fa27-4fac-9ccf-77886ba01521",twitter_handle:"PeterAnsel9"},{name:" NeilJacobs",profile_picture:"https://pbs.twimg.com/profile_images/1599432572727169025/NSoPdchB_400x400.jpg",ref_id:"c61e3ff9-f540-4343-bc26-1c3a4b537b78",twitter_handle:"NeilJacobs"},{name:" nathanfast",profile_picture:"https://pbs.twimg.com/profile_images/1545758157103697920/RyLn465N_400x400.jpg",ref_id:"739d907e-cbc6-4a05-9246-45c7c5d2a853",twitter_handle:"nathanfast"},{name:"TYonClubhouse",profile_picture:"https://pbs.twimg.com/profile_images/1575442322531274756/-ZdL-K9S_400x400.jpg",ref_id:"cc057990-16d0-4588-83c7-1eb9734eb994",twitter_handle:"tyonclubhouse"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/239722cb-4216-414a-a17b-5adf9d52e15a.jpg",keyword:!0,link:"https://stakwork-uploads.s3.amazonaws.com/uploads/customers/2707/media_to_local/b27dcf88-bdfb-4433-b0fe-c9040dbf392f/11aa5648-d416-46f3-a66a-0750e9d71ccd.mp3",node_type:"clip",pub_key:"02574d6e8e787372184b6f17c40d6c6fe1777db9015801f95dfd24692784d767cd",ref_id:"2969a789-41bf-4e23-8ab8-31a76c5a5754",show_title:"Swan.com",text:"very quickly, just before perhaps we could give the mic to Luke. But I just want to quickly echo what Sam was saying and it just pinned at the top. The report from Pierre Rashard and I think Jill Burnett at Block, where I think they've done a very fantastic job of dispelling a lot of the fun around the security budget and actually sort of introducing, perhaps not introducing, for everyone. But bringing back to the front a different way to discuss that, wherein, when we're discussing minors, we're really discussing finality and not security. And I think when you considered that under this optic, you can look at it in very different ways. That makes sense. Luke, go ahead. Yeah. To the discussion about America losing the war and really burdensome regulation being pushed for in America. What odds do you guys put on, say, like a Texas or even a shitcoin in Miami actually succeeding and forming their own independent state? I shared something in the nest. I think it was the former Russian president put out some very interesting and provocative predictions for the year 2030. But he talked about the possibility, probably a very small possibility, of a Texas forming like an allied state with Mexico. Obviously that's madness and probably won't happen in a long time, but what odds do you guys genuinely put on like a Texas succeeding from the US. If the US Tries to attack bitcoin? Yeah. The balkanization of the US. Has been discussed a lot about in Bitcoin circles. Tone Vase swears by it and thinks by 2030, 2035, you'll see the Balkanization. And I've put some thought into it. And if you think about it, what is one of the glue that is keeping a lot of these states together, even though ideologically they're radically different? Right. Like, people in California want a certain type of government. People in Texas want a certain type of government. People in Florida want a certain type of government. People in New York want a certain type of government. The glue that's keeping it together is the common currency. It's the US. Dollar. Right. So what happens if and Parker Lewis has touched upon this before in the past? What happens if all of a sudden state like Florida, Wyoming, starts putting bitcoin on its balance sheet and starts to realize that it doesn't need those federal dollars anymore, basically becoming self sufficient in a sense? Right. It's a very interesting question. And now think about how the marijuana industry has been treated in the United States, right? On a federal level, marijuana is illegal, right? But on a state level, it's thriving, right? California, Colorado, Oregon, washington State. So you can kind of see it in that direction. I think on a federal level, they're extremely hostile to bitcoin, obviously, because they get a tremendous amount of power from being able to control the monetary policy it funds themselves and also this world police type of outlook, right. The ability for the US government to place sanctions on entire countries through the office of foreign asset Control, that gives them a tremendous amount of power. Bitcoin is a threat to that. So obviously, I don't think on the federal level, I think on the federal level, bitcoin could be the last to be really accepted. But on a state level, that's a whole different conversation. I think states like Texas that get a tremendous amount of economic opportunity from the bitcoin mining industry, I think they're going to try to protect it tooth and nail. It's very similar to how the marijuana industry played out. I think that's what's going to happen perhaps on a state level. And I think that as soon as a state that brave state starts to put bitcoin on their balance sheet, man, in my opinion, that's game over. Like it's done right now. Hold on, Nico. You don't think the federal government is not going to enforce the constitution and not allow that to happen with military? I mean, that's like seceding, dude. That's a big deal. I think that things are going to get so crazy, and I think that we're all feeling it right now. I think that we're all feeling the fourth turning vibes. The corruption, the theft is so blatant, so in your face. The $1.7 trillion optimus bill, bro, I'm not going to get into any of the political stuff in there, but they had $65 million just into the research of fish, bro, there was a point in the bill. I'm not kidding. This is 100% real. There was $120,000 being dedicated to researching whether thanos the fictional character from the Avengers movies, whether he could really snap his fingers or not. Right? I couldn't agree with you more. There's a bill about a bee crossing on a fucking highway, but $3.5 million dedicated to bees? The theft is so blatant, bro, it's in your face, right? And it goes to are we at the very dying ends of an empire, the American empire, right? Empires usually last 300 years. We're about that point. It's so blatant. It's so corrupt. It's so in your face. And I don't know, man, if I'm a state like Texas, if I'm a state like Florida, ideologically I'm very different. And I'm seeing this and all of a sudden I have an alternative. I have an option to opt out of that entirely. I don't know why you wouldn't take that. Right? And then that goes to the other theory that. Ex former president of Russia said that you could potentially see an American civil war. I don't want to talk about that because war is terrible. War is hell. Of course we'd want to avoid that, but, I mean, if the momentum of history is going in that direction, so be it. But I don't know what's going to happen. On a macro level, I think predicting that it's, like, almost impossible. But what I can tell you, and I think what makes me, as an individual extremely optimistic, is that if my wealth is in bitcoin, my family's future, my future is protected because I can go where I'm treated best. If it means picking up and leaving and taking everything with me, I can only by writing down twelve words or 24 words. And I think that by itself is going to radically change the world. Because what I think governments are doing today is I think that they have a lot of their citizens hostage, and then they force their citizens to use money that steals from them. And perhaps in the United States, it's not quite noticeable because the inflation rate is only two to 4%. It got all the way up to 7%. But if you live in Argentina, where that inflation rate is 92%, man, bitcoin isn't a speculation for you. Bitcoin is survival. Those people already understand what it means to live in a country where their government currency fails, right? So that's what I'm bullish on, man. I'm bullish on individuals. I'm bullish on Central and Latin America. I'm bullish on what's going on over there in the United States. We shall see. I'm going to fight like hell. I love my country. I'm a first generation immigrant. I love not what the American government stands for, but what the original vision of America stood for. And I love it, and I'm going to fight for it. I'm going to stay here to the very bitter end. But, you know, if it comes to being thrown in a gulag because I'm writing twelve words or taking, like, uprooting my my life and my family's life and moving to El Salvador, then so be it. Obviously, I don't want to do that. I want to fight. And I want to win the race of adoption, get the ideals of bitcoin into the mainstream consciousness of America so that we could avoid that fucking war altogether. And I think that's what I try to do every single day. And that's what swan tries to do every single day. And that's what all bitcoiners try to do every single day. We fight this. We fight this information war, this psychological warfare that's happening every single day. It's trench warfare on the battlegrounds of the internet, man. And I think we're going to win. I think bitcoin's incentives are going to be any type of coercion that they try to jump, that they try to throw at us. Anyways, I'm sorry for ranting a little bit it's just a very passionate topic for me. ",timestamp:"01:05:44-01:15:03",topics:["Bitcoin regulation","bitcoin attack"],type:"twitter_space",weight:79.79824311351389},{boost:0,date:1672152975,description:"Discussion on Dmitry Medvedev's 2023 global predictions, the US losing the Bitcoin regulation war and Texas succeeding from the union due to bitcoin",episode_title:"Café ₿: #Bitcoin Holiday Hangout & @StatusMoneyUSA a #BTC Credit Card",guests:[{name:" BITVOLT7",profile_picture:"https://pbs.twimg.com/profile_images/1532194001511714818/O8nSTKcx_400x400.png",ref_id:"2b9913b7-393c-4125-9aeb-4a8bf32bfa44",twitter_handle:"BITVOLT7"},{name:" samcallah",profile_picture:"https://pbs.twimg.com/profile_images/1502454836981166082/cQG0YQxc_400x400.jpg",ref_id:"a3dbdb56-e228-4382-98bc-d4495ff6dfbd",twitter_handle:"samcallah"},{name:" taodejing2",profile_picture:"https://pbs.twimg.com/profile_images/1575442322531274756/-ZdL-K9S_400x400.jpg",ref_id:"4914799b-a230-4bee-95c9-cf3ac44b6b70",twitter_handle:"TyonClubhouse"},{name:" MrHodl",profile_picture:"https://pbs.twimg.com/profile_images/1607490976670519296/vhLAojMR_400x400.jpg",ref_id:"01d6ee68-c0ef-4ead-b2b7-7eb04694519e",twitter_handle:"MrHodl"},{name:" TomerStrolight",profile_picture:"https://pbs.twimg.com/profile_images/1591960241008148481/HtyINxtU_400x400.jpg",ref_id:"57beb381-b9e8-4dd1-82f6-4e544a63146b",twitter_handle:"TomerStrolight"},{name:" VailshireCap",profile_picture:"https://pbs.twimg.com/profile_images/1475554600094552064/DSlPG1lx_400x400.jpg",ref_id:"73c15965-ddad-4e32-9746-da92f5d24134",twitter_handle:"VailshireCap"},{name:"bergealex4",profile_picture:"https://pbs.twimg.com/profile_images/1273374628577247233/tYigkAZH_400x400.jpg",ref_id:"da4bb8ab-540d-4f88-a2a6-f3a3941c5b74",twitter_handle:"bergealex4"},{name:" LukeMikic21",profile_picture:"https://pbs.twimg.com/profile_images/1604626418708742147/gWyVLeqa_400x400.jpg",ref_id:"0a907108-f59f-420f-9986-79b0f060f690",twitter_handle:"LukeMikic21"},{name:" 2140data",profile_picture:"https://pbs.twimg.com/profile_images/1598330787778232320/ZVFcRtet_400x400.jpg",ref_id:"c8fb52d1-fa69-410d-bf96-8a7559bba863",twitter_handle:"2140data"},{name:" majdmaksad",profile_picture:"https://pbs.twimg.com/profile_images/1483883774471516167/zvEjiCTO_400x400.jpg",ref_id:"1a63c59d-a760-4f8b-bba9-ddfd3cff9f33",twitter_handle:"majdmaksad"}],hosts:[{name:" PeterAnsel9",profile_picture:"https://pbs.twimg.com/profile_images/1607979298153197568/JqAbDyi__400x400.jpg",ref_id:"6cb2b160-fa27-4fac-9ccf-77886ba01521",twitter_handle:"PeterAnsel9"},{name:" NeilJacobs",profile_picture:"https://pbs.twimg.com/profile_images/1599432572727169025/NSoPdchB_400x400.jpg",ref_id:"c61e3ff9-f540-4343-bc26-1c3a4b537b78",twitter_handle:"NeilJacobs"},{name:" nathanfast",profile_picture:"https://pbs.twimg.com/profile_images/1545758157103697920/RyLn465N_400x400.jpg",ref_id:"739d907e-cbc6-4a05-9246-45c7c5d2a853",twitter_handle:"nathanfast"},{name:"TYonClubhouse",profile_picture:"https://pbs.twimg.com/profile_images/1575442322531274756/-ZdL-K9S_400x400.jpg",ref_id:"cc057990-16d0-4588-83c7-1eb9734eb994",twitter_handle:"tyonclubhouse"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/239722cb-4216-414a-a17b-5adf9d52e15a.jpg",keyword:!0,link:"https://stakwork-uploads.s3.amazonaws.com/uploads/customers/2707/media_to_local/515f3625-8d91-439b-8d44-968fe6ab16de/19ec29f4-268c-4015-aa6e-245563dbc49d.mp3",node_type:"clip",pub_key:"034248fa888690a85021cf117c168a535c53b92e1fdf3e4f9cefddfe09118d8207",ref_id:"12445bad-9deb-4bff-ba8a-e8a490b00cc5",show_title:"Swan.com",text:"Luke, go ahead. Yeah. To the discussion about America losing the war and really burdensome regulation being pushed for in America. What odds do you guys put on, say, like a Texas or even a shitcoin in Miami actually succeeding and forming their own independent state? I shared something in the nest. I think it was the former Russian president put out some very interesting and provocative predictions for the year 2030. But he talked about the possibility, probably a very small possibility, of a Texas forming like an allied state with Mexico. Obviously that's madness and probably won't happen in a long time, but what odds do you guys genuinely put on like a Texas succeeding from the US. If the US Tries to attack bitcoin? Yeah. The balkanization of the US. Has been discussed a lot about in Bitcoin circles. Tone Vase swears by it and thinks by 2030, 2035, you'll see the Balkanization. And I've put some thought into it. And if you think about it, what is one of the glue that is keeping a lot of these states together, even though ideologically they're radically different? Right. Like, people in California want a certain type of government. People in Texas want a certain type of government. People in Florida want a certain type of government. People in New York want a certain type of government. The glue that's keeping it together is the common currency. It's the US. Dollar. Right. So what happens if and Parker Lewis has touched upon this before in the past? What happens if all of a sudden state like Florida, Wyoming, starts putting bitcoin on its balance sheet and starts to realize that it doesn't need those federal dollars anymore, basically becoming self sufficient in a sense? Right. It's a very interesting question. And now think about how the marijuana industry has been treated in the United States, right? On a federal level, marijuana is illegal, right? But on a state level, it's thriving, right? California, Colorado, Oregon, washington State. So you can kind of see it in that direction. I think on a federal level, they're extremely hostile to bitcoin, obviously, because they get a tremendous amount of power from being able to control the monetary policy it funds themselves and also this world police type of outlook, right. The ability for the US government to place sanctions on entire countries through the office of foreign asset Control, that gives them a tremendous amount of power. Bitcoin is a threat to that. So obviously, I don't think on the federal level, I think on the federal level, bitcoin could be the last to be really accepted. But on a state level, that's a whole different conversation. I think states like Texas that get a tremendous amount of economic opportunity from the bitcoin mining industry, I think they're going to try to protect it tooth and nail. It's very similar to how the marijuana industry played out. I think that's what's going to happen perhaps on a state level. And I think that as soon as a state that brave state starts to put bitcoin on their balance sheet, man, in my opinion, that's game over. Like it's done right now. Hold on, Nico. You don't think the federal government is not going to enforce the constitution and not allow that to happen with military? I mean, that's like seceding, dude. That's a big deal. I think that things are going to get so crazy, and I think that we're all feeling it right now. I think that we're all feeling the fourth turning vibes. The corruption, the theft is so blatant, so in your face. The $1.7 trillion optimus bill, bro, I'm not going to get into any of the political stuff in there, but they had $65 million just into the research of fish, bro, there was a point in the bill. I'm not kidding. This is 100% real. There was $120,000 being dedicated to researching whether thanos the fictional character from the Avengers movies, whether he could really snap his fingers or not. Right? I couldn't agree with you more. There's a bill about a bee crossing on a fucking highway, but $3.5 million dedicated to bees? The theft is so blatant, bro, it's in your face, right? And it goes to are we at the very dying ends of an empire, the American empire, right? Empires usually last 300 years. We're about that point. It's so blatant. It's so corrupt. It's so in your face. And I don't know, man, if I'm a state like Texas, if I'm a state like Florida, ideologically I'm very different. And I'm seeing this and all of a sudden I have an alternative. I have an option to opt out of that entirely. I don't know why you wouldn't take that. Right? And then that goes to the other theory that. Ex former president of Russia said that you could potentially see an American civil war. I don't want to talk about that because war is terrible. War is hell. Of course we'd want to avoid that, but, I mean, if the momentum of history is going in that direction, so be it. But I don't know what's going to happen. On a macro level, I think predicting that it's, like, almost impossible. But what I can tell you, and I think what makes me, as an individual extremely optimistic, is that if my wealth is in bitcoin, my family's future, my future is protected because I can go where I'm treated best. If it means picking up and leaving and taking everything with me, I can only by writing down twelve words or 24 words. And I think that by itself is going to radically change the world. Because what I think governments are doing today is I think that they have a lot of their citizens hostage, and then they force their citizens to use money that steals from them. And perhaps in the United States, it's not quite noticeable because the inflation rate is only two to 4%. It got all the way up to 7%. But if you live in Argentina, where that inflation rate is 92%, man, bitcoin isn't a speculation for you. Bitcoin is survival. Those people already understand what it means to live in a country where their government currency fails, right? So that's what I'm bullish on, man. I'm bullish on individuals. I'm bullish on Central and Latin America. I'm bullish on what's going on over there in the United States. We shall see. I'm going to fight like hell. I love my country. I'm a first generation immigrant. I love not what the American government stands for, but what the original vision of America stood for. And I love it, and I'm going to fight for it. I'm going to stay here to the very bitter end. But, you know, if it comes to being thrown in a gulag because I'm writing twelve words or taking, like, uprooting my my life and my family's life and moving to El Salvador, then so be it. Obviously, I don't want to do that. I want to fight. And I want to win the race of adoption, get the ideals of bitcoin into the mainstream consciousness of America so that we could avoid that fucking war altogether. And I think that's what I try to do every single day. And that's what swan tries to do every single day. And that's what all bitcoiners try to do every single day. We fight this. We fight this information war, this psychological warfare that's happening every single day. It's trench warfare on the battlegrounds of the internet, man. And I think we're going to win. I think bitcoin's incentives are going to be any type of coercion that they try to jump, that they try to throw at us. Anyways, I'm sorry for ranting a little bit it's just a very passionate topic for me. I love your quote unquote rants. I think to me they just come across passionate and well thought out. I am. Thanks, Terry. Just to go back and answer League's question maybe a little bit differently, I think this session, it would be very hostile. Like, that's a totally different ball game. It would be on the brink of civil war. We're also intertwined and the whole country depends on, say, Texas and Florida for different resources. That's just not going to happen without some kind of military response. But in the Constitution, there is the 10th Amendment right that powers not delegated to the United States by the Constitution are reserved to the states respectively, or to the people. And so I always said the migration of hash rate was bullish to go to America because I called it the disunited king of hash rate because they're strong state government and to avoid tyranny and the ineffective central planning, every state is free to enact its own policies that work for its own populations. And so unless the government banned, outright banned bitcoin a commodity, I don't see how they could stop states from adding it to their balance sheets or the Treasuries just saying, hey, we're going to buy a little bit of bitcoin unless there was some federal ban on bitcoin. And so there's a difference between suspicion and just purchasing bitcoin right now because there's no kind of federal law preventing them from doing that. And they have states rights and that's protected by the Constitution, the 10th Amendment. So that's how I kind of see that scenario. ",timestamp:"01:06:40-01:16:49",topics:["Dmitry Medvedev","balkanization of the us","Bitcoin regulation","Texas secession"],type:"twitter_space",weight:76.08473176624994},{boost:0,date:1671644776,description:"The BCV foundation and Bitcoin education in Nigeria",episode_title:"#Bitcoin Creators Space",guests:[{name:"@DecouvreBitcoin",profile_picture:"https://pbs.twimg.com/profile_images/1362747604044566530/Invedmre_400x400.jpg",ref_id:"0eda190b-4373-41fc-bc28-c3b95af30949",twitter_handle:"DecouvreBitcoin"},{name:"@Bridge2Bitcoin",profile_picture:"https://pbs.twimg.com/profile_images/1533812215198924800/vAAlVRxO_400x400.jpg",ref_id:"1aaf2c24-8d26-4038-b55a-8b94427b20c7",twitter_handle:"Bridge2Bitcoin"},{name:"@orangepillapp",profile_picture:"https://pbs.twimg.com/profile_images/1570918965601505282/SOApRCif_400x400.jpg",ref_id:"ba5b79b4-e2e7-4778-8879-df793b8420a4",twitter_handle:"orangepillapp"},{name:"@knutsvanholm",profile_picture:"https://pbs.twimg.com/profile_images/1586261395833774081/RQ8SYxiM_400x400.jpg",ref_id:"e12ebe66-706b-40d2-804a-861a4c79bbfa",twitter_handle:"knutsvanholm"},{name:"@bcvFoundation",profile_picture:"https://pbs.twimg.com/profile_images/1460813196902633476/edbNgO7y_400x400.jpg",ref_id:"d65bc3c3-cdd7-4539-8cb9-6a8d86f580c8",twitter_handle:"bcvFoundation"},{name:"Christopher",profile_picture:"https://pbs.twimg.com/profile_images/1345072452775370754/cBVFzpkV_400x400.jpg",ref_id:"7dacb545-925d-4201-9b9c-869d992dcdb3",twitter_handle:"Chrissuccess"}],hosts:[{name:"@steliosats",profile_picture:"https://pbs.twimg.com/profile_images/1495784740921786371/a73Qu4HR_400x400.jpg",ref_id:"7eed8e35-f762-4882-adf9-b45ad16c3c54",twitter_handle:"steliosats"},{name:"@geyserfund",profile_picture:"https://pbs.twimg.com/profile_images/1554429112978120706/yr1hXl6R_400x400.jpg",ref_id:"02a48cf4-58d0-4014-803c-9120dedeec52",twitter_handle:"geyserfund"},{name:"UKNOWN",profile_picture:"https://pbs.twimg.com/profile_images/930811252665933826/2cVZF58S_400x400.jpg",ref_id:"bcd18bb0-8224-4f6b-af71-e16120ae4323",twitter_handle:"NodedPodcast"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/c9bb5d58-c781-464d-878a-8b6c469ba198.jpg",keyword:!0,link:"https://stakwork-uploads.s3.amazonaws.com/uploads/customers/2707/media_to_local/b18df9d2-d034-4e1f-bcd1-d70b30fe9059/506355bc-c119-4f18-bf0b-abe9be8c17d6.mp3",node_type:"clip",pub_key:"029099ec31eb33594611dc47d5c93de2c1aa86918e3a36b408c14a500601c8bc9b",ref_id:"0330ada0-fbc0-4f8f-a560-a6c059a72907",show_title:"Geyser 🌊",text:"So, yeah, tell us a bit about your project and I'm sure more and more people will join up. All right. I'm just handle that because I'm just like handling the accounts where I really know about this project because I'm a beneficiary of the project. So they have been going around in communities in Nigeria and some other places, and they've been giving out pamphlets, teaching people about Bitcoin and how we can help them secure financial power or financial freedom yet. So basically I got about 100,000 from them after the education. And also I've been keeping in touch with these people and they offered me because I really don't have anything doing. So they offered me to get this job to just handle the account. And I'm still learning about the project. But basically what they do is they just teach people. We just tell people about it's more like we're going to like the grassroots. I don't know if you're with me. We're going to the grassroots to really uneducated places, to just teach people, like traders and random people on the streets. We're just teaching them and telling them stuff about bitcoin, because I think it starts from there, because education is a big problem. There's this gap, there's this space between the educator and the uneducated ones that the uneducators also never really get the chance to understand what this is all about. They just keep suffering and suffering and they don't really know how to really get out of the circle or the matrix of just being suppressed financially. Right. So that's basically what it's all about. So they've been doing a great job. They've been going around. And I'm a beneficiary, so it's more like my testimony, right? Yeah. I'm just saying that to the space, basically wait, I'm sure if it worked, but basically they're receiving donations of Geyser. And the main purpose of the initiative is essentially reaching out to rural communities, doing basic education about bitcoin. And there's also an element of mining, is that right? Not really, but solar. Really? Solar power. About renewable energy. Because Nigeria has power issues. Has power issues, especially in the local communities, the grassroots, like I said. That'S incredible. So we just try to help people with small solar power generators that they used to. And we have some people that mine bitcoin in very small scale. They have this really small miners, so they use our solar power generators. Got you. So I can see here you guys are focused on six African communities in three countries. Ghana, Kenya, Nigeria. Yes. And you guys are an NGO dedicated to promoting, expanding bitcoin across the world. Yes. Focusing on education, school and rural areas. Yes. Yes. So this is an incredible project. You guys are calling it bits and stats and help educate school students and other individuals. So how do you guys do that? And what's your experience so far? Like, how has it been received? It has been really good because when schools were still in session, because now schools are on holidays now, vacation. Right. When schools were still in session, like secondary school education, we used to go around and teach, like, school children in classes. We just take minutes of their time because in schools they have recess and different times and other stuff like that. So we just go around and we try to teach and we hand out pamphlets, like I said. But we haven't really given out bitcoin to this secondary school students because most of them don't really, like, possess phones and other things like that. So we just basically teach them how it works. But then we go around and trade as people that sell stuff, people that just, like, randomly work on things, like outside. We just try to teach them on the streets, we just walk around. Have you tried using different tools like machancura to use SMS to send people? I just learnt about machancura last month and it's really innovative, but I haven't really done anything and I haven't really connected with people. So I think we should do more of that. We would have to connect with people because we had one representative in Ghana for the Afro Bitcoin conference some weeks back. It's just a tool that you can start using. I recommend you just playing with it, and it really just means that you can use your feature phone and some of the old phones to receive. Satoshi is pretty straightforward. Okay, that's great. Yes, I saw some stuff about it, so I'll definitely play around with it. And I can't people around too, since. That'S how you really learn, right? You learn and practice with really feeling it. Yes. That's cool. Yeah. Thank you for the awesome initiative, for the opportunity. Also really appreciate of ",timestamp:"00:10:34-00:16:46",topics:["Bitcoin education","Nigeria","Bitcoin mining","BCV foundation","Geyser"],type:"twitter_space",weight:62.68289275364415},{boost:0,date:1671644776,description:"The introduction to Bitcoin in Nigeria and how it's gradually taking it's place",episode_title:"#Bitcoin Creators Space",guests:[{name:"@DecouvreBitcoin",profile_picture:"https://pbs.twimg.com/profile_images/1362747604044566530/Invedmre_400x400.jpg",ref_id:"0eda190b-4373-41fc-bc28-c3b95af30949",twitter_handle:"DecouvreBitcoin"},{name:"@Bridge2Bitcoin",profile_picture:"https://pbs.twimg.com/profile_images/1533812215198924800/vAAlVRxO_400x400.jpg",ref_id:"1aaf2c24-8d26-4038-b55a-8b94427b20c7",twitter_handle:"Bridge2Bitcoin"},{name:"@orangepillapp",profile_picture:"https://pbs.twimg.com/profile_images/1570918965601505282/SOApRCif_400x400.jpg",ref_id:"ba5b79b4-e2e7-4778-8879-df793b8420a4",twitter_handle:"orangepillapp"},{name:"@knutsvanholm",profile_picture:"https://pbs.twimg.com/profile_images/1586261395833774081/RQ8SYxiM_400x400.jpg",ref_id:"e12ebe66-706b-40d2-804a-861a4c79bbfa",twitter_handle:"knutsvanholm"},{name:"@bcvFoundation",profile_picture:"https://pbs.twimg.com/profile_images/1460813196902633476/edbNgO7y_400x400.jpg",ref_id:"d65bc3c3-cdd7-4539-8cb9-6a8d86f580c8",twitter_handle:"bcvFoundation"},{name:"Christopher",profile_picture:"https://pbs.twimg.com/profile_images/1345072452775370754/cBVFzpkV_400x400.jpg",ref_id:"7dacb545-925d-4201-9b9c-869d992dcdb3",twitter_handle:"Chrissuccess"}],hosts:[{name:"@steliosats",profile_picture:"https://pbs.twimg.com/profile_images/1495784740921786371/a73Qu4HR_400x400.jpg",ref_id:"7eed8e35-f762-4882-adf9-b45ad16c3c54",twitter_handle:"steliosats"},{name:"@geyserfund",profile_picture:"https://pbs.twimg.com/profile_images/1554429112978120706/yr1hXl6R_400x400.jpg",ref_id:"02a48cf4-58d0-4014-803c-9120dedeec52",twitter_handle:"geyserfund"},{name:"UKNOWN",profile_picture:"https://pbs.twimg.com/profile_images/930811252665933826/2cVZF58S_400x400.jpg",ref_id:"bcd18bb0-8224-4f6b-af71-e16120ae4323",twitter_handle:"NodedPodcast"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/c9bb5d58-c781-464d-878a-8b6c469ba198.jpg",keyword:!0,link:"https://stakwork-uploads.s3.amazonaws.com/uploads/customers/2707/media_to_local/885fe09b-bb21-49a5-8667-3c73ed36918f/196dc1e8-c7a4-4dc7-902f-d00107aefb42.mp3",node_type:"clip",pub_key:"0372cd0c8469f2034336a243e018d4d60e07efef8e7d10417807da1173bd5b002f",ref_id:"83ce1420-66d3-41e6-b987-b35fe2cf019f",show_title:"Geyser 🌊",text:"All right. Hello. Good evening. Hey, good evening. Yeah, how's it going? It's going great. Thanks, guys, for the opportunity to speak. Yes, I'm grateful. Fantastic. Yeah. I mean, not many people today. We've had better turnouts. I think it was a bit of a last minute call, but I wasn't. Even expecting I just saw a notification and I came up. Awesome. Yeah, it's cool, man. So, yeah, tell us a bit about your project and I'm sure more and more people will join up. All right. I'm just handle that because I'm just like handling the accounts where I really know about this project because I'm a beneficiary of the project. So they have been going around in communities in Nigeria and some other places, and they've been giving out pamphlets, teaching people about Bitcoin and how we can help them secure financial power or financial freedom yet. So basically I got about 100,000 from them after the education. And also I've been keeping in touch with these people and they offered me because I really don't have anything doing. So they offered me to get this job to just handle the account. And I'm still learning about the project. But basically what they do is they just teach people. We just tell people about it's more like we're going to like the grassroots. I don't know if you're with me. We're going to the grassroots to really uneducated places, to just teach people, like traders and random people on the streets. We're just teaching them and telling them stuff about bitcoin, because I think it starts from there, because education is a big problem. There's this gap, there's this space between the educator and the uneducated ones that the uneducators also never really get the chance to understand what this is all about. They just keep suffering and suffering and they don't really know how to really get out of the circle or the matrix of just being suppressed financially. Right. So that's basically what it's all about. So they've been doing a great job. They've been going around. And I'm a beneficiary, so it's more like my testimony, right? Yeah. I'm just saying that to the space, basically wait, I'm sure if it worked, but basically they're receiving donations of Geyser. And the main purpose of the initiative is essentially reaching out to rural communities, doing basic education about bitcoin. And there's also an element of mining, is that right? Not really, but solar. Really? Solar power. About renewable energy. Because Nigeria has power issues. Has power issues, especially in the local communities, the grassroots, like I said. That'S incredible. So we just try to help people with small solar power generators that they used to. And we have some people that mine bitcoin in very small scale. They have this really small miners, so they use our solar power generators. Got you. So I can see here you guys are focused on six African communities in three countries. Ghana, Kenya, Nigeria. Yes. And you guys are an NGO dedicated to promoting, expanding bitcoin across the world. Yes. Focusing on education, school and rural areas. Yes. Yes. So this is an incredible project. You guys are calling it bits and stats and help educate school students and other individuals. So how do you guys do that? And what's your experience so far? Like, how has it been received? It has been really good because when schools were still in session, because now schools are on holidays now, vacation. Right. When schools were still in session, like secondary school education, we used to go around and teach, like, school children in classes. We just take minutes of their time because in schools they have recess and different times and other stuff like that. So we just go around and we try to teach and we hand out pamphlets, like I said. But we haven't really given out bitcoin to this secondary school students because most of them don't really, like, possess phones and other things like that. So we just basically teach them how it works. But then we go around and trade as people that sell stuff, people that just, like, randomly work on things, like outside. We just try to teach them on the streets, we just walk around. Have you tried using different tools like machancura to use SMS to send people? I just learnt about machancura last month and it's really innovative, but I haven't really done anything and I haven't really connected with people. So I think we should do more of that. We would have to connect with people because we had one representative in Ghana for the Afro Bitcoin conference some weeks back. It's just a tool that you can start using. I recommend you just playing with it, and it really just means that you can use your feature phone and some of the old phones to receive. Satoshi is pretty straightforward. Okay, that's great. Yes, I saw some stuff about it, so I'll definitely play around with it. And I can't people around too, since. That'S how you really learn, right? You learn and practice with really feeling it. Yes. That's cool. Yeah. Thank you for the awesome initiative, ",timestamp:"00:09:59-00:16:41",topics:["Nigeria","Bitcoin adoption"],type:"twitter_space",weight:61.64845435071934},{boost:0,date:null,description:"Greg Foss' Thoughts on countries interested in joining the BRICS forum",episode_title:"Café ₿: #Bitcoin News & Trusted P2P Reviews w/ @Apollosats",guests:[{name:"@2140data",profile_picture:"https://pbs.twimg.com/profile_images/1598330787778232320/ZVFcRtet_400x400.jpg",ref_id:"190b5001-a42a-46cc-b0d3-b6f74c625648",twitter_handle:"2140data"},{name:"@FossGregfoss",profile_picture:"https://abs.twimg.com/sticky/default_profile_images/default_profile_400x400.png",ref_id:"09913e9b-38dc-4465-9d4d-ae0c9ba9eeca",twitter_handle:"Fuckkkk"},{name:"@w_s_bitcoin",profile_picture:"https://pbs.twimg.com/profile_images/1594796869233811474/g0_ZRshz_400x400.png",ref_id:"b178b239-3b18-4a16-9d43-c5d15ba6f7f4",twitter_handle:"w_s_bitcoin"},{name:"@NeilJacobs",profile_picture:"https://pbs.twimg.com/profile_images/1599432572727169025/NSoPdchB_400x400.jpg",ref_id:"4b6997e1-ce0b-4a1d-90e7-dbaccef4b783",twitter_handle:"NeilJacobs"},{name:"@brandon_gentile",profile_picture:"https://pbs.twimg.com/profile_images/1561369452284895236/-8WgdwEm_400x400.jpg",ref_id:"f940c5e8-4808-4197-a38f-3f19d311a7ad",twitter_handle:"brandon_gentile"},{name:"@apollosats",profile_picture:"https://pbs.twimg.com/profile_images/1576946734927794176/2ail9FoU_400x400.jpg",ref_id:"74f4280f-5fdb-4bbc-aee2-a2ed32d64372",twitter_handle:"apollosats"},{name:"@StackchainSig",profile_picture:"https://pbs.twimg.com/profile_images/1589791699571802117/n_Y1Qm7J_400x400.jpg",ref_id:"6e652629-38ec-49d8-9f5c-3ba28f80c799",twitter_handle:"StackchainSig"},{name:"@TomerStrolight",profile_picture:"https://pbs.twimg.com/profile_images/1591960241008148481/HtyINxtU_400x400.jpg",ref_id:"7af639f8-8c5c-4ce1-a43b-e8560ed40e2b",twitter_handle:"TomerStrolight"}],hosts:[{name:"@alexstanczyk",profile_picture:"https://pbs.twimg.com/profile_images/1539055022364708864/rwErK6x1_400x400.jpg",ref_id:"6455df34-1abc-4ce8-9bb8-b02d411accec",twitter_handle:"alexstanczyk"},{name:"@pacificbitcoin",profile_picture:"https://pbs.twimg.com/profile_images/1570140686753619970/UFEnzSv5_400x400.jpg",ref_id:"f8268a26-9761-40c1-bdd6-dad9db44d032",twitter_handle:"pacificbitcoin"},{name:"@SwanBitcoin",profile_picture:"https://pbs.twimg.com/profile_images/1491428856858914820/aFlitvha_400x400.jpg",ref_id:"da3f56bf-9763-4389-a9ec-d807049bd0b8",twitter_handle:"SwanBitcoin"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/239722cb-4216-414a-a17b-5adf9d52e15a.jpg",keyword:!0,link:"https://stakwork-uploads.s3.amazonaws.com/uploads/customers/2707/media_to_local/7cf57bdb-c905-46e3-a7e5-4c0bfd4f8d04/71c08fae-cce8-4600-ab9e-758420e78dcf.mp3",node_type:"clip",pub_key:"029099ec31eb33594611dc47d5c93de2c1aa86918e3a36b408c14a500601c8bc9b",ref_id:"639d4f31-2190-4fc2-a0dc-57cf53c3d97b",show_title:"Swan.com",text:"a question. I got a question coming in. Wicked. Yeah, go ahead. This is coming in from text greg, I don't know how much longer we've got you for. That's why I wanted to get this to you before. I didn't mean to cut you off. But this comes from Sholey, and his question is, foss, I'm interested in your take on countries wanting to join the BRICS and move away from the US dollar for trade. Apparently this was a tweet from Kim.com, so please don't shoot me for the source, but apparently Russia has announced that twelve more countries are interested in joining the BRICS. What do you think about all this? Yeah, well, it's not hard to see the playbook, right? When you have your US dollar controlled reserve asset of the world, which is US treasuries, when that gets frozen and you need to call on it and you can't so I'm talking about Putin here. You look for alternatives. Now, Marty Ben here's a shout out to my friend Marty. He had an amazing publication on Friday, okay, calling the same thing, but says it won't be gold backed oil trades, it'll eventually be bitcoin backed oil trades. And that makes sense from my perspective of digital energy versus natural resource energy. And why sell valuable natural resource energy for US dollar fee when ultimately, rather than selling it for gold, which is a far better store of value than US dollars or US treasuries, but you could sell it for digital energy. As an engineer, I'm not a physicist, so there's some physicists that hate the fact that sailor, and maybe me, at times refer to bitcoin as digital energy. But I don't care. Understand? It's selling natural resource energy for digital energy is just about the smartest thing you can do in a closed loop energy frame. Okay? So one more shout out, I'll step down or try and shut up. So thank you, wicked for great input, Terence. Great input, aunt. Great input. And a shout out to one of your listeners that just reached out to me via DM. We want to talk some more about the big utilities in the US. Becoming bitcoin miners. It's the most logical step in the world. The energy guys know it. The ESG guys, they already have their heads shoved firmly up their ass, so they're not going to hear it. But people who manage the grid and manage energy understand that bitcoin and bitcoin mining is the perfect regulator, okay? With a switch, you can turn power up or power down your bitcoin miners, and you create incremental cash flow to defease capital expenditures, to building things like, oh, nuclear power plants. Because normally a nuclear power plant has a 20 year return on investment profile. And if you insert bitcoin mining in there, you can reduce that return on investment profile by at least one half, okay? And that's a meaningful adjustment to the capex that's required for building a core nuclear generator. So small nuclear modular reactors, big core nuclear reactors, it's what's going to really solve the energy crisis, people. And bitcoin is going to help with that. So don't overthink things. ",timestamp:"01:11:11-01:14:33",topics:["BRICS forum"],type:"twitter_space",weight:25.360525131225586},{boost:0,date:0,description:"What will Bitcoin look like in a scenario of global adoption? ",episode_title:"Café ₿: #Bitcoin Fix the Money, Fix the World",guests:[{name:"OrangePild",profile_picture:"https://pbs.twimg.com/profile_images/1608905201334845441/SHUsfTBW_400x400.jpg",ref_id:"1c33ba0e-3e6b-41f6-aed4-5217aa534521",twitter_handle:"OrangePild"},{name:"Neil Jacobs",profile_picture:"https://pbs.twimg.com/profile_images/1593645788978102277/UAQCQKeE_400x400.jpg",ref_id:"0bc759e0-b055-4800-a79d-2b950fe5cc53",twitter_handle:"NeilJacobs"},{name:"Dr. Jeff Ross",profile_picture:"https://pbs.twimg.com/profile_images/1475554600094552064/DSlPG1lx_400x400.jpg",ref_id:"51a969bb-dbf7-4d20-b128-74dcc5f560f6",twitter_handle:"VailshireCap"},{name:"Jason Brett",profile_picture:"https://pbs.twimg.com/profile_images/1591476397847060482/bNapBM4Y_400x400.jpg",ref_id:"750a85f9-59f2-4627-817c-a437b65ee45e",twitter_handle:"RegulatoryJason"},{name:"Tatum Turn Up",profile_picture:"https://pbs.twimg.com/profile_images/1600036563429343233/PXP0gxRj_400x400.jpg",ref_id:"31824d8a-a2a6-434e-8d10-f0be1c2f8389",twitter_handle:"tatumturnup"},{name:"Stackchain ⛓ Signal",profile_picture:"https://pbs.twimg.com/profile_images/1589791699571802117/n_Y1Qm7J_400x400.jpg",ref_id:"b0242af7-0d94-4551-ba25-a8b216b82fce",twitter_handle:"StackchainSig"},{name:"Ross",profile_picture:"https://pbs.twimg.com/profile_images/1602431687564357632/57oH7beH_400x400.jpg",ref_id:"cdb90285-daa9-4dd2-b96a-78dd5e8ba468",twitter_handle:"theyoungrossco"},{name:"BTC Sessions",profile_picture:"https://pbs.twimg.com/profile_images/1602307254937866240/CKiRrFui_400x400.jpg",ref_id:"e207ef16-44d1-40c4-929a-ea2736f60a94",twitter_handle:"BTCsessions"},{name:"TC",profile_picture:"https://pbs.twimg.com/profile_images/1607590332925095937/6CTv4688_400x400.jpg",ref_id:"083ddb42-c4a0-4360-8de3-6178e3b659ec",twitter_handle:"Meditation_Man"},{name:"Tomer Strolight",profile_picture:"https://pbs.twimg.com/profile_images/1591960241008148481/HtyINxtU_400x400.jpg",ref_id:"3a2bc97d-072c-4ed9-9a59-17ceeb68fe99",twitter_handle:"TomerStrolight"}],hosts:[{name:"Swan.com",profile_picture:"https://pbs.twimg.com/profile_images/1491428856858914820/aFlitvha_400x400.jpg",ref_id:"995b79e6-02fe-4395-8aa7-fdc000584e71",twitter_handle:"SwanBitcoin"},{name:"PB23 😎 Pacific Bitcoin Festival",profile_picture:"https://pbs.twimg.com/profile_images/1570140686753619970/UFEnzSv5_400x400.jpg",ref_id:"9dd05f7c-4891-440c-aa61-677a92e70a0f",twitter_handle:"pacificbitcoin"},{name:"NICO⚡️",profile_picture:"https://pbs.twimg.com/profile_images/1513692277515997188/t5Ja3SFr_400x400.jpg",ref_id:"ccd52021-88cc-4e7d-9822-6eed5a169ca9",twitter_handle:"nico_lechuga"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/239722cb-4216-414a-a17b-5adf9d52e15a.jpg",keyword:!0,link:"https://stakwork-uploads.s3.amazonaws.com/uploads/customers/2707/media_to_local/84e104dc-230e-40a7-9ec0-16c5a0d6873b/e7948dc4-eff7-4d6e-8ed2-80f524a8c494.mp3",node_type:"clip",pub_key:"03c18d0c6c35333f22bc524e21a5fd1d2d9886f5d4d958dc1de95d025de5c84cfc",ref_id:"1171938e-b754-45ff-958d-ca89aa3ab235",show_title:"Swan.com",text:"Ross, you have your hands up. Thanks to ross, you have your hands up, and then we're going to wrap it up. Yeah, thanks for letting me speak. I want to ask a question to the experts here that have been around longer than me. My reason for asking the question is actually someone in my twitter feed asked the question. They said, construct a sentence that would really piss off a bitcoiner. And I constructed one so well that I would like to know the answer to my own question. So, what I wrote is, assuming 10 billion people in the world and an absolute global adoption of Bitcoin, if every single person in the world wanted to make a single layer, one transaction just multiplying out 2500 to 3000 transactions per block times, hours, years, et cetera. It would take somewhere between 60 and 70 ish years for one person, for each person in the world to make a single transaction on layer one. So with that and the ultimate vision of bitcoin being the kind of global reserve asset and understanding, there's more layers like lightning and possibly even layer three, et cetera, that will come in time, what do you guys see as the, I guess, endgame of the landscape of what bitcoin would look like in a global adoption scenario? Let me ask you something. So most transactions right now are through debit cards, credit cards, electronic transfers. What layer do you think that is in the traditional? Well, I would say it's layer three at least, if not higher. It's layer three. Right. So how long has that system been around? Like 50 years, give or take? Exactly. It's been around for 60 years. Bitcoin's roughly a decade and a half old. Decade and change. Right. I think lightning is a great solution, but I still think that it needs a lot of work. I think there's so many awesome projects that are being worked on, and I think that we will find a solution to the problem that you're talking about. And that was a very big component of the block size for us. Right. We must, and I'm aware of that history too. But the thing is, even with a. Smaller block size, it still can't like every blockchain is too slow for global layer one transactions per person. Eventually. I think that's where layer two is going to come in. There's been speculation that the blocks are going to be filled. That's been said for the last five years or so. That still hasn't been the case. There's been times where the men pool gets cleared out. So I mean, like, I don't know, man. I think Tomer actually was talking about this yesterday. I think that it could potentially be a problem in the future. But I think where we are now, we have much bigger, clear and present dangers in front of us. And I think that's what Jason was really talking about today from the regulatory perspective. And I think that's really where my worry is. That that's really where my concern is in terms of scaling. Yes, I agree. I think that what's the Lightning Network capacity right now? It's $89 million. That's not a large amount in a global sense. Obviously there needs to be more. But if you look back and see how far we've come, I remember when the Lightning Network first became a thing, people were like, no, this isn't going to work. Right? And the fact that we've come from zero dollars to eighty nine million dollars lighting network capacity, I think is a massive deal and I think it's just going to continue to get bigger and better. Maybe that's the optimist to me. I have no idea. I don't know if Dr. Ross, Neil or Tomer, Jason, any of you guys want to chime in on that? TC yeah, I mean, my answer can be slightly adapted from the one you were referencing that I made yesterday. It's like we will cross that bridge and the bridges that lead to it as we come to them. There's so many different ways that we can scale this technology as demand increases for utilizing it. And what tends to be the surprising thing is many ways, just do nothing and let people figure out how to use it more efficiently. There were all these people who were clamoring for bigger blocks through a hard fork and we kept the blocks small and people figured out how to cram a lot more transactions. So that now the calculus that you're doing is, oh, there's 2500 to 3000 transactions per block, not 1000 transactions per block, which is what we were seeing beforehand. And there's so many different things that will be developed in cryptography. In fact, the fact that Schnor's signatures exist right now with cross signature aggregation can make transactions so much smaller. And of course there's all these other layers. So give a time. Like all technologies that you've seen before, they look like they're not going to work for the whole world. Early on. I don't know how old you are, but if you were here for the early days of the Internet, you could barely get a JPEG through the thing in. 15 minutes. And so it looked like it wouldn't scale. And I remember a couple of decades ago there being some fun about the Internet, that there's only so many addresses that would go around and so wouldn't the Internet fail in a few years time as more and more people came on? And of course, we've engineered a way around all these things. So I think especially when you're dealing with technology that's immaterial in its nature, that's non physical, that's purely digital, there are so many different ways to scale it that it won't end up being a concern. There will be many concerns along the way, but they will all be solved and surmounted. ",timestamp:"02:02:51-02:08:46",topics:["Bitcoin Adoption","Hyperbitcoinization"],type:"twitter_space",weight:25.169692039489746},{boost:0,date:1671644776,description:"Crowdfunding for different Bitcoin communities using Geyser",episode_title:"#Bitcoin Creators Space",guests:[{name:"@DecouvreBitcoin",profile_picture:"https://pbs.twimg.com/profile_images/1362747604044566530/Invedmre_400x400.jpg",ref_id:"0eda190b-4373-41fc-bc28-c3b95af30949",twitter_handle:"DecouvreBitcoin"},{name:"@Bridge2Bitcoin",profile_picture:"https://pbs.twimg.com/profile_images/1533812215198924800/vAAlVRxO_400x400.jpg",ref_id:"1aaf2c24-8d26-4038-b55a-8b94427b20c7",twitter_handle:"Bridge2Bitcoin"},{name:"@orangepillapp",profile_picture:"https://pbs.twimg.com/profile_images/1570918965601505282/SOApRCif_400x400.jpg",ref_id:"ba5b79b4-e2e7-4778-8879-df793b8420a4",twitter_handle:"orangepillapp"},{name:"@knutsvanholm",profile_picture:"https://pbs.twimg.com/profile_images/1586261395833774081/RQ8SYxiM_400x400.jpg",ref_id:"e12ebe66-706b-40d2-804a-861a4c79bbfa",twitter_handle:"knutsvanholm"},{name:"@bcvFoundation",profile_picture:"https://pbs.twimg.com/profile_images/1460813196902633476/edbNgO7y_400x400.jpg",ref_id:"d65bc3c3-cdd7-4539-8cb9-6a8d86f580c8",twitter_handle:"bcvFoundation"},{name:"Christopher",profile_picture:"https://pbs.twimg.com/profile_images/1345072452775370754/cBVFzpkV_400x400.jpg",ref_id:"7dacb545-925d-4201-9b9c-869d992dcdb3",twitter_handle:"Chrissuccess"}],hosts:[{name:"@steliosats",profile_picture:"https://pbs.twimg.com/profile_images/1495784740921786371/a73Qu4HR_400x400.jpg",ref_id:"7eed8e35-f762-4882-adf9-b45ad16c3c54",twitter_handle:"steliosats"},{name:"@geyserfund",profile_picture:"https://pbs.twimg.com/profile_images/1554429112978120706/yr1hXl6R_400x400.jpg",ref_id:"02a48cf4-58d0-4014-803c-9120dedeec52",twitter_handle:"geyserfund"},{name:"UKNOWN",profile_picture:"https://pbs.twimg.com/profile_images/930811252665933826/2cVZF58S_400x400.jpg",ref_id:"bcd18bb0-8224-4f6b-af71-e16120ae4323",twitter_handle:"NodedPodcast"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/c9bb5d58-c781-464d-878a-8b6c469ba198.jpg",keyword:!0,link:"https://stakwork-uploads.s3.amazonaws.com/uploads/customers/2707/media_to_local/b18df9d2-d034-4e1f-bcd1-d70b30fe9059/506355bc-c119-4f18-bf0b-abe9be8c17d6.mp3",node_type:"clip",pub_key:"029099ec31eb33594611dc47d5c93de2c1aa86918e3a36b408c14a500601c8bc9b",ref_id:"70cd556c-8349-4f80-b276-4c0056b46536",show_title:"Geyser 🌊",text:"so we have people in Africa and I think possibly Asia. But yeah, we have again, we have I think in around three days, we had 30 new projects being created on Geyser using this Lightning address feature, which is pretty big deal. We have you really need six clicks to create a project on Geyser. It's pretty seamless. And we had quite a lot of educators create projects on Geyser. We had Bitcoin community in Honduras, bitcoin in Hausa, Nigeria, and also we just heard from BCB based in Ghana as well, bitcoin, Essex, UK, and Orange Pill Yosemite, which is in California. So really featuring four different continents. These are micro communities. These are little micro communities that are focused on meetups focus on orange Peel in the community, raising funds for supporting education initiatives that are pretty small scale but nonetheless importance. Again, Bitcoin is a grassroots movement, and so what these creators are doing is that they're setting up these super micro, grassroot level initiatives to get support from the community and create their own community on Geyser. Again, Geyser is, yes, a crowdfunding platform, but it's really a place where people can come together to support common causes and support getting shit done. You have an idea and you get some people together, some people throw in new ideas, some people throw some money, some people throw resources. And so gather should be seen a little bit more widely and we will soon have more features to enable these types of feedback loops and conversations. ",timestamp:"00:17:16-00:19:06",topics:["Bitcoin","crowdfunding","Geyser"],type:"twitter_space",weight:55.39905291682817},{boost:0,date:null,description:"About ApolloSats: P2P reviews for Bitcoin related products and services",episode_title:"Café ₿: #Bitcoin News & Trusted P2P Reviews w/ @Apollosats",guests:[{name:"@2140data",profile_picture:"https://pbs.twimg.com/profile_images/1598330787778232320/ZVFcRtet_400x400.jpg",ref_id:"190b5001-a42a-46cc-b0d3-b6f74c625648",twitter_handle:"2140data"},{name:"@FossGregfoss",profile_picture:"https://abs.twimg.com/sticky/default_profile_images/default_profile_400x400.png",ref_id:"09913e9b-38dc-4465-9d4d-ae0c9ba9eeca",twitter_handle:"Fuckkkk"},{name:"@w_s_bitcoin",profile_picture:"https://pbs.twimg.com/profile_images/1594796869233811474/g0_ZRshz_400x400.png",ref_id:"b178b239-3b18-4a16-9d43-c5d15ba6f7f4",twitter_handle:"w_s_bitcoin"},{name:"@NeilJacobs",profile_picture:"https://pbs.twimg.com/profile_images/1599432572727169025/NSoPdchB_400x400.jpg",ref_id:"4b6997e1-ce0b-4a1d-90e7-dbaccef4b783",twitter_handle:"NeilJacobs"},{name:"@brandon_gentile",profile_picture:"https://pbs.twimg.com/profile_images/1561369452284895236/-8WgdwEm_400x400.jpg",ref_id:"f940c5e8-4808-4197-a38f-3f19d311a7ad",twitter_handle:"brandon_gentile"},{name:"@apollosats",profile_picture:"https://pbs.twimg.com/profile_images/1576946734927794176/2ail9FoU_400x400.jpg",ref_id:"74f4280f-5fdb-4bbc-aee2-a2ed32d64372",twitter_handle:"apollosats"},{name:"@StackchainSig",profile_picture:"https://pbs.twimg.com/profile_images/1589791699571802117/n_Y1Qm7J_400x400.jpg",ref_id:"6e652629-38ec-49d8-9f5c-3ba28f80c799",twitter_handle:"StackchainSig"},{name:"@TomerStrolight",profile_picture:"https://pbs.twimg.com/profile_images/1591960241008148481/HtyINxtU_400x400.jpg",ref_id:"7af639f8-8c5c-4ce1-a43b-e8560ed40e2b",twitter_handle:"TomerStrolight"}],hosts:[{name:"@alexstanczyk",profile_picture:"https://pbs.twimg.com/profile_images/1539055022364708864/rwErK6x1_400x400.jpg",ref_id:"6455df34-1abc-4ce8-9bb8-b02d411accec",twitter_handle:"alexstanczyk"},{name:"@pacificbitcoin",profile_picture:"https://pbs.twimg.com/profile_images/1570140686753619970/UFEnzSv5_400x400.jpg",ref_id:"f8268a26-9761-40c1-bdd6-dad9db44d032",twitter_handle:"pacificbitcoin"},{name:"@SwanBitcoin",profile_picture:"https://pbs.twimg.com/profile_images/1491428856858914820/aFlitvha_400x400.jpg",ref_id:"da3f56bf-9763-4389-a9ec-d807049bd0b8",twitter_handle:"SwanBitcoin"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/239722cb-4216-414a-a17b-5adf9d52e15a.jpg",keyword:!0,link:"https://stakwork-uploads.s3.amazonaws.com/uploads/customers/2707/media_to_local/7cf57bdb-c905-46e3-a7e5-4c0bfd4f8d04/71c08fae-cce8-4600-ab9e-758420e78dcf.mp3",node_type:"clip",pub_key:"029099ec31eb33594611dc47d5c93de2c1aa86918e3a36b408c14a500601c8bc9b",ref_id:"7c3d3625-4308-437e-80bb-38fb8b2a678c",show_title:"Swan.com",text:"want to welcome up Apollo and Julian from Apollo. So, Apollo, just a really quick intro. If I understand it right, they're building the first review site, leveraging sets, and you log in with lightning. So basically, you get to review the products you love, find companies you trust, and earn bitcoin. Julian, good morning. Welcome. Talk to us about what you're doing and why are you doing it, and then maybe we can open it up for some questions, if you like. Sounds good, Alex. Yeah, thanks so much for having me, and, yeah, I really enjoyed the conversation this morning. Sorry to interrupt the crucible, but I think it's actually a pretty great segue into talking about what we do at Apollo, which is finding the truth right, through the contest of ideas and context of information. So, yeah, you gave a really great intro. Basically, we are a marketplace for user reviews of bitcoin products and services, and the idea is pretty simple. We wanted to build somewhere for bitcoin is to educate other bitcoinrs about not only what products and services exist in the space, but also how to compare them and what basis. And we felt that that was kind of missing in the space and probably needed to just help adoption, which is the mission we started the company on the basis of, hey, we want to do whatever we can to help bitcoin adoption. It's the most important thing we could be spending our time on. And in the process of doing that, and I can talk a little bit more about that. Of what we learned from one of the biggest challenges to work on bitcoin adoption, we realized that we kind of needed something like this, which was we needed somewhere that we could send new bitcoiners who just wanted to start the process of going down the rabbit hole. So, yes, pause there, but happy to take any questions. I love it. That is the mission. I agree. What I'm excited about is I'm starting to see a lot more of this kind of direction where people are recognizing that is the mission increasing adoption as much which is possible. Let's go ahead and open it up. If anybody up here on the panel has questions for Jillian, go ahead. And if you're in the audience and you have questions about what these guys are doing and how it works and all that kind of stuff, you can request to come up. You can ask questions in Telegram if you like. Tmecafetcoinclub, I've got a question. So to use this service, I'm assuming you have to run your own Lightning network node, is that right? You don't have to, no. So you can sign up in a few different ways. You can just sign up with an email address or with your Twitter account, or you can log in with Light. But for now, on the infrastructure side is pretty straightforward. Like we just kind of run our own we're not running a node yet ourselves, but we just have our kind of own internal Sachs ledger, maintaining everybody's account balances. And we will send SATS to whatever address that users have on their end. Got it. Cool. So you can hook it up with like a Wallet of Satoshi account or whatever, something like that, you're saying? Yeah, exactly. So Wallet of Satoshi or Zebony account, I mean, a lot of people are using kind of Lightning addresses, like ball toll addresses for the first time, which is really cool to see. But yeah, whatever Lightning address you have spin line up, send it to us and we'll send you Sat. How do you know the reviews are legit reviews and not just someone trying to accumulate Sat? Yeah, it's a great question, to be honest. And it's the best one we're focused on that happen from day one. And there are a couple of answers, right? Like one is in the longer term, what we're building is a marketplace that run like a market, right? And the idea is it's a market for information. So we want the best, most reliable reviews to organically surface to the top and the way that that is going to happen. And what we're building is that there is a system of incentives between these two sides of the marketplace, right? Reviewers on the one hand and readers of reviews on the other. That allows for that. Right. So how can that happen? Well, basically reviews after they're written and we publish them, and I'll talk a little bit about the moderation that we do before we actually publish, but after they're published, they can be uploaded and kind of similar to stack and use, if you guys are familiar with that. Basically every upvote is actually, in effect a transaction, right? So you have users sending SATS from their account to the author of a review to upload that review. So the idea is people vote with SATS on what is most helpful, most reliable. And so if the market works effectively, then the best reviews, most helpful reviews are going to rise to the top. That's what we're kind of building for the longer run. Now, obviously in the short run, we need to do some things to bootstrap that market and also put up some guardrails to obviously make sure that people aren't gaming the system, which certainly they are trying to do already. Right? So we have a few things that we do upfront to filter for spam and other kind of obvious bad actors that are going to come in and just try and publish a bunch of reviews and earn as many stats as possible. But you end up again. So if you got a follow up, yeah, I got a couple of other ones if no one else wants to go. So is it going to be bitcoin only companies because I see or bitcoin only things because I see Anthony Pompeano's newsletters on here, clearly like he's a controversial person. So I'm just curious if you guys are how you decide what companies get to go on here or newsletters or whatever. Yeah, so short answer is yes, bitcoin only. Like that's the mission. It's bitcoin adoption. And specifically it's like we want to educate bitcoin is and help bitcoin is educate each other. And so the mission is bitcoin only. The products are almost entirely bitcoin only, except where I would say for a couple of instances, right? One is where there's some just overlap between bitcoin only products and crypto stuff. Like there are exchanges that we want people to review that obviously have bitcoin and crypto and maybe some newsletters or other content pieces or wallets or whatever the case may be. It's obviously relevant for us to let people educate each other on those products, even if they're not bitcoin only. So that's one instance of where they overlap. When it comes to things. Julian, don't you think that's a little conflicting, just a little bit? I mean, first you say bitcoin only, but it's bitcoin only except when it's not coin only. I know there's a lot of bitcoinners are going to take issue with that. And if what you're trying to do is increase bitcoin adoption, giving any kind of platform for something that's distracting people into bullshit is maybe that's I just know there's a lot of bitcoin is going to have an issue with that. And I know right now, Julian, I see like the Pump newsletter has an awful rating on your site. So I'm assuming mostly bitcoiners are the only ones kind of going on here right now. But what happens when he or a bunch of crypto people find this site, right? Then it just becomes a review site. Yeah, well, so a couple of things, right? One is at the moment, because we're so early, we're running a bunch of little experiments, right? So we don't really know how this is going to play out. So we've got the pop newsletter on there. We put the bankless newsletter on there too. Right. And part of that was to see how are people going to respond. And pretty much all of our users right now are bitcoin only users from what we can tell. And the results have been whether it's for those newsletters or for like Coinbase or other crypto exchanges. Right. Many of the reviews coming through, a lot of them are kind of nuanced and are actually bitcoin is telling. Other bitcoin is like, hey, this is an exchange that if you really have to use it as your first place to buy bitcoin, you can do that. But get your coins off exchanges, find an alternative. Like people are writing reviews, for example, of Coinbase saying like, hey, don't use this platform, go and use Swamp instead. And the reason why I think it actually is important to have all of this information at people's disposal is because people have these questions, they are going to find out coinbase is going to be top of mind for them. So we want to build somewhere where people can, I guess, do a bit of self directed learning, learn from bitcoin is who have been through these on ramps, have been through these experiences and are going to be able to answer the questions that I think people are going to inevitably have. Does that answer the question? No, but I'll let Neil go. Well, yeah, and that's kind of like a shameless plug. But are you going to be adding bitcoin merch and apparel companies? Because I would love my company to be on it. Sure, yeah. We're taking recommendations on constantly on categories, products and it's to some degree like demand driven. Obviously we're not going to put anything that people just request up there, but yeah, shoot me a note and we'll add it to the list of things to consider. Sure, I'll dare so. I just want to reiterate, I mean, I'm not going to beat a dead horse, but I would suggest to you, Jillian, to consider that you don't have non bitcoin things on there. And the reason why I say that is you use the term get on the mission and that's start or you use the term the mission, I say get on the mission. But this concept of on being on the mission, of bitcoin adoption is starting to permeate through the interwebs a little bit. And I would just suggest be careful about that because like anything that you're doing to give a platform to something that's going to draw people off mission, what I call being on the mission and what I think a lot of other bitcoinners agree is on the mission I think is going to be looked at in the long term. I think you're going to see that that was a mistake. When you say things like, well, we're doing a bunch of experiments. Like what it sounds like to a bitcoin? Or is you're experimenting to figure out where you're going to make the most money? This is very fiat mindset, in my opinion. It's very much like opens you wide open to being sponsored by shitcoins. And that's not a good place to be, man. Yeah, I see you're right there. That we absolutely do need to stay focused. And we will. And I guess to that end, we have some principles that we're sure very firmly aligned with. One is we know that ultimately whatever we are doing is in service of that mission of increasing Bitcoin adoption. And so we're open to feedback and changing what we list, how the incentives work, everything else along the way, and we certainly will be. The other thing too is we're just not going to do certain things that you might ordinarily see with some other types of companies in this category. Right. So we're not going to be running ads, we're not going to be taking sponsorships from companies. There's not going to be any pay to play or like affiliate linking or anything like that. Really what we're building is okay, let me ask you a question then. The way the system works, if I'm understanding it correctly, is people boost with SATS, who gets the stats? If you write a great review and other users are sending you stats because they find it helpful, all of those stats go to you. Okay, but then how do you make money? Well, right now we don't. Right. We're a startup. What's the business model? How do you intend to make money? Well, so there are a couple of potential ways we can. Right. So what we're trying to do is build this marketplace that is a meeting place for potential users of products, people who have used them, and then the companies themselves. And so we want to be able to mediate a really great high signal conversation between these three sides of the marketplace. And so we think that that's going to generate a lot of value not just for users of people who review them, but also the companies themselves. I get the concept, but what I'm asking you is how do you make money on that sort of triumvirate of people talking to each other and creating this marketplace of ideas? Yeah. So one way that we could is partnering with companies directly in a transparent way. So if Swan or anybody else is talking to users on our platform and we're providing this meeting place for great quality conversation, then we can have companies that could potentially use that. Okay, so this is my point. This is what I'm getting at. What if that company that comes to you and offers you that sweet, juicy, lucrative deal, what if it's Sam Bankman Freed, and he's like, hey Julian, I'm going to give you $100 million if you help us out here. Well, the short answer is like, we're just not going to do that because it would so obviously undermine the integrity of the platform that it just wouldn't be I appreciate the hypothetical, but it would just be so contrary to what we're trying to do that it's just not something that is realistic for us. All right, cool. I hope time proves that out. Okay, we're very close to the end of the show. We've got time for maybe one or two more questions. We'll give you some time to make some closing comments, Jillian, and then we'll move to wrap. Go ahead. Wicked. Yeah, kind of. In summary and you can correct me if I'm wrong here, but it sounds like you might allow reviews to be written about companies that are crypto friendly or crypto curious. But in the long run, you don't plan to ever partner with those companies, and you plan to stick with only bitcoin, only companies that you may generate revenue from in the future. Is that correct? That's right. Yeah. We are a bitcoin only company for bitcoiners and bitcoin only companies. And to the extent that there's going to be any information on crypto products on our website, it is specifically for the purpose of steering bitcoins away from them. And so that will be borne out both by the content we produce and have on the platform. And also, I'm assuming, from what other bitcoin is going to help other bitcoin learn about as well. I would just, like, make one last thought. I mean, this is your company, obviously you run it the way you like, but the whole steering away thing, you're actually just giving them a platform that potentially will cause them to lose a lot of money. And my observation is that when people get burned, they figure that shit out on their own. They don't need to be led down these pathways where they might go look at this stuff. That's just my opinion. Let's go with simplest and then we're going to give you a few minutes to make closing thoughts, Jillian, and then we'll wrap. Go ahead, simplest. Hey, thanks so much. Yeah, a quick question because I'm just aware of the dynamics of how you keep these sort of platforms, these review platforms, honest. And I've always kind of wondered, like with Yelp and everything, just how they do that. And in your case, and regarding the point that Alex is making about the crypto so called curious companies is how do you prevent down the road? Like, if those companies become aware once you grow big enough to really be having an impact in the market, what if they use their armies of whatever to be coming in and just giving themselves glowing ratings? And like, I understand you have some measures in place, but when that becomes overwhelming and if there's a few of those companies or a number of them, how do you prevent them from providing millions of five star reviews to themselves, so to speak? Yeah, that's a really great question and so there are a couple of different ways that we can address that in the short term and then longer run it's going to be more of an engineering challenge, but it's certainly on our minds, right. In the kind of short to medium term, what we're going to do is implement basically a cost to posting. So right now we're kind of bootstrapping the marketplace by rewarding people just for posting reviews and sending them sentence of doing that. We want to get to the point where people are actually willing to pay a small fee to actually write and post their reviews and so on. Like a small scale. We think that's going to disincentivize people just costlessly attacking us with that information right at a small scale. But your question about how do we disincentivize or just prevent large scale attacks like that, then things get a little bit more sophisticated. But there's a really interesting concept called a web of trust, which is a way of basically preventing this kind of class of civil attacks on information platforms. Won't go into the details, but essentially you can implement a range of preventative measures where you can make the cost of posting scale exponentially. For people who are posting a lot in a short space of time. You can do a whole bunch of things where we can identify sophisticated attackers and impose basically a big enough cost so that it's not actually economical for them to engage in that behavior. ",timestamp:"01:48:01-02:07:24",topics:["ApolloSats","P2P reviews"],type:"twitter_space",weight:21.470260620117188},{boost:0,date:null,description:"The Bitcoin Village project in Nigeria",episode_title:"The Orange Sun ☀️ #Bitcoin News and Talk",guests:[{name:"Portland Hodl",profile_picture:"https://pbs.twimg.com/profile_images/1562306406526492672/LiqmI9NS_400x400.jpg",ref_id:"530aba21-392f-4156-9e91-4fc5c76fced1",twitter_handle:"PortlandHODL"},{name:"Miykael Woodward",profile_picture:"https://pbs.twimg.com/profile_images/1473433558475689985/CM0o3oWu_400x400.jpg",ref_id:"6fe02a78-4f07-47e7-8e64-b278a3167835",twitter_handle:"MiykaelWoodward"},{name:"Okin Mobi",profile_picture:"https://pbs.twimg.com/profile_images/1518945775685967873/O0wPrIKO_400x400.jpg",ref_id:"bbd18918-7758-4bdb-b9a5-641bf92748a6",twitter_handle:"OKIN_17"},{name:"TK☣️Ph.Ple₿",profile_picture:"https://pbs.twimg.com/profile_images/1505791887415730177/d0YDQ3Xc_400x400.jpg",ref_id:"9e3ffa2c-9410-48e9-a726-8312c0abcd7c",twitter_handle:"ToxiKat27"},{name:"Funsho Jimoh",profile_picture:"https://pbs.twimg.com/profile_images/1600143435775856641/uqgmtT23_400x400.jpg",ref_id:"a237ffb0-792b-484e-b12f-65a2b679eaf1",twitter_handle:"fnicencool"},{name:"prince ogbonna",profile_picture:"https://pbs.twimg.com/profile_images/1595693872637681664/TeWJzTut_400x400.jpg",ref_id:"0b0c70b1-23b1-4d98-b259-6dbb67b7481d",twitter_handle:"princejoj0"},{name:"The Bitcoin Village",profile_picture:"https://pbs.twimg.com/profile_images/1544318244789649410/kQ2G1MCE_400x400.jpg",ref_id:"d894aca4-36f6-4821-a00b-a4e860b19502",twitter_handle:"VillageBitcoin"},{name:"Masterguantai",profile_picture:"https://pbs.twimg.com/profile_images/1521025685078302720/w9dZwehS_400x400.jpg",ref_id:"29baf525-42eb-41a6-98f9-a0d6b4480af0",twitter_handle:"MasterGuantai"}],hosts:[{name:"Jeremy Garcia",profile_picture:"https://pbs.twimg.com/profile_images/1589056396816896001/dslbBQSX_400x400.jpg",ref_id:"e5e68f75-d71a-4477-ae9a-6a891f2d84d0",twitter_handle:"Jerimican5445"},{name:"Satoshi’s Journal",profile_picture:"https://pbs.twimg.com/profile_images/1598641632601047042/qrZMP5Oy_400x400.jpg",ref_id:"d977ed11-09b0-4143-828d-582ecb8b58ca",twitter_handle:"SatoshisJournal"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/9b2e17f2-71c5-4f1e-a3e7-720d06dab810.jpg",keyword:!0,link:"https://stakwork-uploads.s3.amazonaws.com/uploads/customers/2707/media_to_local/bef977d0-8a6a-441b-a8cb-58baebe2bfd7/b9ec2918-1059-48ac-b5ee-69018c42a07c.mp3",node_type:"clip",pub_key:"03c18d0c6c35333f22bc524e21a5fd1d2d9886f5d4d958dc1de95d025de5c84cfc",ref_id:"6cbed027-125f-454c-b03a-865df0b60d36",show_title:"Satoshi’s Journal",text:"intent of the village was, of course, first and foremost to have a school that we could educate that village about Bitcoin and then bring the plebs along as we build it so that they can see the proof of work. And using Satoshi's Journal, the media company, as the videographer, so to speak, as the media, we can bring that to you live from Nigeria. So it's actually a really cool way to be able to have the pleb, see what we're doing in real life, and then along the way, if donations want to be donated, so be it. And we're already seeing that, so we will document the whole thing all the way up from the foundation to final erection, to the ribbon cutting, to the first graduates of Lightning Development Academy, to you name it. It's going to be basically old, and I plan on when we die, we hope that there's many, many more schools built like this, and we plan on building more because we know that in the future, we will be, with the help of the plebs, educating the future businessmen and women of the world. And we're living a small snippet of a Bitcoin standard, and if we can instill education in this village in the form of what money is and what Bitcoin is, bitcoin being the best money ever known by man, we are basically allowing them to have a bright future. And I've told Olu and our team that we don't know what's going to happen in the future with what we're doing, but I'm confident that what we're doing and what all you guys are doing as plebs in your respective areas on an individual basis, you can move a mountain, so to speak. So don't ever underestimate what you can do as an individual. Yeah, so that's ",timestamp:"02:48:50-02:51:13",topics:["The Bitcoin Village","Nigeria","Bitcoin Adoption"],type:"twitter_space",weight:19.850265502929688},{boost:0,date:null,description:"Immutability of the Bitcoin consensus code ",episode_title:"Café ₿: Sovereign Computing w/ Matt & Aiden, Start9",guests:[{name:"Andrew",profile_picture:"https://pbs.twimg.com/profile_images/1465763053014859786/xYFN2czJ_400x400.jpg",ref_id:"ae4b13f8-0ee7-480a-b47a-82b967ad7a79",twitter_handle:"AP_ArchPublic"},{name:"Matt Hill",profile_picture:"https://pbs.twimg.com/profile_images/1347317316057321474/ieMjzK3x_400x400.jpg",ref_id:"3576ad28-a04d-4388-865b-3ec5114c4f9f",twitter_handle:"_MattHill_"},{name:"Lauren",profile_picture:"https://pbs.twimg.com/profile_images/1586022214901501952/U1dRyCxP_400x400.jpg",ref_id:"7f14bbf5-a60b-496b-a361-3663cf120299",twitter_handle:"LaurenJauregui"},{name:"Aiden McClelland",profile_picture:"https://pbs.twimg.com/profile_images/1470160097225498624/0BjKB_2W_400x400.jpg",ref_id:"04ddd9d4-9329-4e6c-aaa3-d65ea4a9342a",twitter_handle:"_dr_bonez"},{name:"Peter",profile_picture:"https://pbs.twimg.com/profile_images/1581695667193643009/EljNY-TH_400x400.jpg",ref_id:"a3384925-e15e-421d-b9f9-6d44e273ed05",twitter_handle:"PeterAnsel9"},{name:"Lisa",profile_picture:"https://pbs.twimg.com/profile_images/1541581547815436288/Li8wORWt_400x400.jpg",ref_id:"e6f0c6e3-3237-4b13-878f-bb740cd32f8d",twitter_handle:"lisa_hough_"},{name:"Isabelle",profile_picture:"https://pbs.twimg.com/profile_images/1466874333410717698/WRQh2-_m_400x400.jpg",ref_id:"c8df253f-47b3-465e-878e-8405c01c090d",twitter_handle:"isabelfoxenduke"},{name:"Tone",profile_picture:"https://pbs.twimg.com/profile_images/1416821178266787844/T1OkI9ZW_400x400.jpg",ref_id:"5729ac07-51d6-4268-b585-62680c846acb",twitter_handle:"ToneVays"}],hosts:[{name:"Alex Stanczyk",profile_picture:"https://pbs.twimg.com/profile_images/1539055022364708864/rwErK6x1_400x400.jpg",ref_id:"3126e2a3-bbe4-456b-b298-9714085fa286",twitter_handle:"alexstanczyk"},{name:"Derek",profile_picture:"https://pbs.twimg.com/profile_images/1598322677827207169/Cw0A3oOP_400x400.jpg",ref_id:"f441b996-7eeb-4210-b24c-fa011161709d",twitter_handle:"derekmross"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/239722cb-4216-414a-a17b-5adf9d52e15a.jpg",keyword:!0,link:"https://stakwork-uploads.s3.amazonaws.com/uploads/customers/2707/media_to_local/0ec4a941-250c-4e1d-8d2a-6c506c3ba4b2/4bd8010d-b2fd-41b4-8041-8a953ef06492.mp3",node_type:"clip",pub_key:"02574d6e8e787372184b6f17c40d6c6fe1777db9015801f95dfd24692784d767cd",ref_id:"2a3ee0fe-bcfc-412d-b1ee-2ba7f72528bd",show_title:"Swan.com",text:"something that's probably important to bring up for people who are brand new and they're listening to this and they're new to bitcoin. They're trying to figure all this stuff out. Bitcoin is always say, well, you can't change bitcoin it's mutable. Like there's no small group of people controlling it. You can't change it. Right? I think that deserves a bit of explanation, because some people are going to be listening to this, going, look, you just changed it. Does somebody want to take a shot of this? Tom or go ahead, please. Yeah. The consensus rules of bitcoin remain completely unchanged. This reference client offers new interface features and spending preferences that make certain things that were harder to do before easier to do, or certain things that were toggled off before toggled on by default now. And that's what happens in 90% of these releases of bitcoin core. It's like support for having multiple wallet files, support for enabling, replaced by fee transactions by default. This feature, which I haven't really looked into, that I guess allows you to spend the entire contents of a wallet without change or something. I'm not sure what this feature does yet. So these are new features that keep coming out from time to time, and occasionally some API call. Again, nothing to do with the consensus algorithm will get retired or replaced by something else so that it works better, or bugs are resolved where interface issues happen. But the actual operation of bitcoin itself remains unchanged, which is why only three or 4% of people are running this new release right now. And there's no incompatibility there's no one getting all this. Block was okay for version 24, but it wasn't okay for version 23, or vice versa. The same rules apply, the same spending rules for each transaction. The same consensus rules for each block remain completely unchanged. Any attempt to change those things is known as a soft fork or a hard fork. Hard forks don't happen in bitcoin, so they're soft forks. And these are very infrequent things. And if there was one in the works, everyone here would know about it. They're widely discussed, and they must be adopted by all minors, and they generally also need to be supported by all clients or an overwhelming majority of clients. Soft forks are somewhat backwards. They are backwards compatible, so that even if not everybody upgrades, everyone will remain in perfect consensus that the state of the chain is valid. But the miners almost can check for the new rules that come with software. So I'll kind of stop there because I'm already maybe over complicating a little bit of what your question was. I thought that was a pretty good explanation. I like to keep it even dumber, but I think that was pretty good for me. I always go back to the monopoly board analogy because I think they're just easy. Maybe I could offer one other little explanation that I hope will keep it easy but paint a big picture for people. Bitcoin core is the piece of software known as the satoshi client, and it's a piece of software that was first launched, that bitcoin launched on, and it does everything that bitcoin does. It allows someone to mine, it allows someone to create a wallet. It allows them to secure the wallet. It allows them to create transactions and receive transactions to that wallet. It does everything that the bitcoin ecosystem does. It's the reference client. And so it is bitcoin, and it establishes the peer to peer network. Like, if you run it, it connects it's the note, it creates a copy of the blockchain, it stores a copy of the blockchain. It does everything that you've ever heard that bitcoin does. And it is a very tight piece of software. But as it ages, the open source developers who work on it make it easier to use. Initially, there were only like a few buttons you can press and only a few things you can do. And over the years, they've added user interface improvements and additional commands that don't break the consensus algorithm that make it easier to do things. And that's really why new versions, for the most part keep coming out, that there are ideas that the community feels make it easier to use, better to use, more secure to use. And so those features are added to bitcoin core. Right, okay. But I think what people wonder is, if you can make changes to it, how can we be sure that it's not going to be changed for evil purposes against the best, it's not in the best interests of the common man, it's not going to benefit some small group of people over everybody else. How do we know that that's going to happen tomorrow? Yeah, the first point that I was making is changes to the consensus code of, like, what it takes to spend bitcoin or how many bitcoin can get generated or what makes a valid block are not changes that can be made in bitcoin core without complete consensus of the entire community. All the miners and all the use. Words that have nothing to do with Vicky. Try to use words that people are going to understand everything you just said. If I was brand new, I wouldn't understand a damn thing you just said. Right. Changes to bitcoin core don't change the rules of bitcoin, if that's what you want to say. Like, if someone tried to change the rules of bitcoin in bitcoin core, what would quickly happen is there would be a split in the network. It would be what's called a hard fork. And then people that splits the monopoly board into right, okay. People would have to if you want to do that, anybody can change that. But if you want to do that, you're creating a new monopoly board and saying, come play with me. And what ends up happening is nobody comes to play with you and then your monopoly game dies. Right. That's what's happened historically, yes. Perfect example is like bitcoin cash, right? They changed the rules, it made a different version of bitcoin, and now that version of bitcoin is worth like one half of 1% of what bitcoin is worth. BCH and BSV have basically been both deplatformed off the exchanges at this point. And they're just dying. They're just like these. They're making their last little twitches as they perish. ",timestamp:"00:48:29-00:55:14",topics:["Bitcoin core update","Satoshi client"],type:"twitter_space",weight:18.508241653442383},{boost:0,date:null,description:"UTXO and release of Bitcoin version 24.0 features",episode_title:"Café ₿: Sovereign Computing w/ Matt & Aiden, Start9",guests:[{name:"Andrew",profile_picture:"https://pbs.twimg.com/profile_images/1465763053014859786/xYFN2czJ_400x400.jpg",ref_id:"ae4b13f8-0ee7-480a-b47a-82b967ad7a79",twitter_handle:"AP_ArchPublic"},{name:"Matt Hill",profile_picture:"https://pbs.twimg.com/profile_images/1347317316057321474/ieMjzK3x_400x400.jpg",ref_id:"3576ad28-a04d-4388-865b-3ec5114c4f9f",twitter_handle:"_MattHill_"},{name:"Lauren",profile_picture:"https://pbs.twimg.com/profile_images/1586022214901501952/U1dRyCxP_400x400.jpg",ref_id:"7f14bbf5-a60b-496b-a361-3663cf120299",twitter_handle:"LaurenJauregui"},{name:"Aiden McClelland",profile_picture:"https://pbs.twimg.com/profile_images/1470160097225498624/0BjKB_2W_400x400.jpg",ref_id:"04ddd9d4-9329-4e6c-aaa3-d65ea4a9342a",twitter_handle:"_dr_bonez"},{name:"Peter",profile_picture:"https://pbs.twimg.com/profile_images/1581695667193643009/EljNY-TH_400x400.jpg",ref_id:"a3384925-e15e-421d-b9f9-6d44e273ed05",twitter_handle:"PeterAnsel9"},{name:"Lisa",profile_picture:"https://pbs.twimg.com/profile_images/1541581547815436288/Li8wORWt_400x400.jpg",ref_id:"e6f0c6e3-3237-4b13-878f-bb740cd32f8d",twitter_handle:"lisa_hough_"},{name:"Isabelle",profile_picture:"https://pbs.twimg.com/profile_images/1466874333410717698/WRQh2-_m_400x400.jpg",ref_id:"c8df253f-47b3-465e-878e-8405c01c090d",twitter_handle:"isabelfoxenduke"},{name:"Tone",profile_picture:"https://pbs.twimg.com/profile_images/1416821178266787844/T1OkI9ZW_400x400.jpg",ref_id:"5729ac07-51d6-4268-b585-62680c846acb",twitter_handle:"ToneVays"}],hosts:[{name:"Alex Stanczyk",profile_picture:"https://pbs.twimg.com/profile_images/1539055022364708864/rwErK6x1_400x400.jpg",ref_id:"3126e2a3-bbe4-456b-b298-9714085fa286",twitter_handle:"alexstanczyk"},{name:"Derek",profile_picture:"https://pbs.twimg.com/profile_images/1598322677827207169/Cw0A3oOP_400x400.jpg",ref_id:"f441b996-7eeb-4210-b24c-fa011161709d",twitter_handle:"derekmross"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/239722cb-4216-414a-a17b-5adf9d52e15a.jpg",keyword:!0,link:"https://stakwork-uploads.s3.amazonaws.com/uploads/customers/2707/media_to_local/0ec4a941-250c-4e1d-8d2a-6c506c3ba4b2/4bd8010d-b2fd-41b4-8041-8a953ef06492.mp3",node_type:"clip",pub_key:"02574d6e8e787372184b6f17c40d6c6fe1777db9015801f95dfd24692784d767cd",ref_id:"48de736c-df85-48ea-9856-e9b608a6025e",show_title:"Swan.com",text:"I was just going to echo back to some of the points that Tomar was making about utxels and stuff. Did you guys see that, the release of bitcoin cord 24.0? It has some really great features into it that allow users to sort of, like, spend all UTXOs. So when you're sending a transaction, you don't generate change, which I think it's really cool. It's a really cool feature for privacy. It's kind of like, explain that. What does that mean? You know how Sparrow gives you the ability to sort of create, like, if you're going to send bitcoin or receive bitcoin, you can create, like, new addresses in order to sort of get past the common input ownership heuristic of chain analysis. Use English. Use words that explain it, like you're explaining it to a five year old. Okay, so essentially what this code is allowing you to do is you can. Empty out a wallet. You know, when you send out a transaction, you're actually sending all of the amount of all the BTC you have. In that wallet address. You're sending it out, and then you're receiving a UTXO back from the receiving address, from the address you said, like, change. So in other words, if I'm buying something and let's say I've got one UTXO or one address that is in the denomination of a $10 bill, for example, I go and buy let's call it a cheeseburger for $5, I get $5 and change. And the problem with the $5 and change is that that's trackable, right? Yes, 100%. Yeah. And they're also including a change output randomization, which is kind of like what Monero does, but not really. It's a way to sort of, like, generate random amounts so that anybody watching the chain can't really tell which UTXO belongs to you. And they do it in a very technical way, but yeah, man, I'm super excited about it because this is increasing the level of privacy that you can achieve just with bitcoin core. These are small tweaks to the privacy enhancements of bitcoin. And these are all backwards compatible, right? Like, if people don't want to adopt this, they don't have to kind of thing. Yes. Ant, do you have any comments? Full RBF equals one. Oh, yeah, let's get that. Bitcoin core version 24. There's already 3.8, maybe 4% of total public bitcoin nodes running. It interesting across the world. ",timestamp:"00:45:21-00:48:27",topics:["UTXOs feature","Bitcoin core v24.0"],type:"twitter_space",weight:18.260805130004883},{boost:0,date:1671644776,description:"The Orange Pill app and it's piggybank feature",episode_title:"#Bitcoin Creators Space",guests:[{name:"@DecouvreBitcoin",profile_picture:"https://pbs.twimg.com/profile_images/1362747604044566530/Invedmre_400x400.jpg",ref_id:"0eda190b-4373-41fc-bc28-c3b95af30949",twitter_handle:"DecouvreBitcoin"},{name:"@Bridge2Bitcoin",profile_picture:"https://pbs.twimg.com/profile_images/1533812215198924800/vAAlVRxO_400x400.jpg",ref_id:"1aaf2c24-8d26-4038-b55a-8b94427b20c7",twitter_handle:"Bridge2Bitcoin"},{name:"@orangepillapp",profile_picture:"https://pbs.twimg.com/profile_images/1570918965601505282/SOApRCif_400x400.jpg",ref_id:"ba5b79b4-e2e7-4778-8879-df793b8420a4",twitter_handle:"orangepillapp"},{name:"@knutsvanholm",profile_picture:"https://pbs.twimg.com/profile_images/1586261395833774081/RQ8SYxiM_400x400.jpg",ref_id:"e12ebe66-706b-40d2-804a-861a4c79bbfa",twitter_handle:"knutsvanholm"},{name:"@bcvFoundation",profile_picture:"https://pbs.twimg.com/profile_images/1460813196902633476/edbNgO7y_400x400.jpg",ref_id:"d65bc3c3-cdd7-4539-8cb9-6a8d86f580c8",twitter_handle:"bcvFoundation"},{name:"Christopher",profile_picture:"https://pbs.twimg.com/profile_images/1345072452775370754/cBVFzpkV_400x400.jpg",ref_id:"7dacb545-925d-4201-9b9c-869d992dcdb3",twitter_handle:"Chrissuccess"}],hosts:[{name:"@steliosats",profile_picture:"https://pbs.twimg.com/profile_images/1495784740921786371/a73Qu4HR_400x400.jpg",ref_id:"7eed8e35-f762-4882-adf9-b45ad16c3c54",twitter_handle:"steliosats"},{name:"@geyserfund",profile_picture:"https://pbs.twimg.com/profile_images/1554429112978120706/yr1hXl6R_400x400.jpg",ref_id:"02a48cf4-58d0-4014-803c-9120dedeec52",twitter_handle:"geyserfund"},{name:"UKNOWN",profile_picture:"https://pbs.twimg.com/profile_images/930811252665933826/2cVZF58S_400x400.jpg",ref_id:"bcd18bb0-8224-4f6b-af71-e16120ae4323",twitter_handle:"NodedPodcast"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/c9bb5d58-c781-464d-878a-8b6c469ba198.jpg",keyword:!0,link:"https://stakwork-uploads.s3.amazonaws.com/uploads/customers/2707/media_to_local/b18df9d2-d034-4e1f-bcd1-d70b30fe9059/506355bc-c119-4f18-bf0b-abe9be8c17d6.mp3",node_type:"clip",pub_key:"029099ec31eb33594611dc47d5c93de2c1aa86918e3a36b408c14a500601c8bc9b",ref_id:"fed2b741-e9a2-4858-bee8-faa259806d3e",show_title:"Geyser 🌊",text:"orange Fill up. Do you want to come up and tell us a bit about your project? Let me add it to the spaces too. Did you get the invite? I'd love to hear about what your features releases are up to. So Builders feature orangeville app. We have Lightning Piggybank, which is essentially an electronic cash piggy bank for children that accepts bitcoin sent over lightning. So this is a pretty small project, but it's a pretty sweet thing, actually. So let me add this to the it's pretty incredible, actually. I need to show you guys. I need to show you this. Imagine a piggy bank, but instead of an actual pig, it's like a cardboard box with a Geyser satoshi. Yes, we did. What's up, mate? I cannot do from the desk, though. You cannot talk? I'm not on desktop. Oh, no. You can't talk from desktop? No, it's got to be mobile. Yeah. It'S painful. Yeah, we got to talk to you. Yeah, exactly. But yeah, just to finish up this thought, there you have this really cool piggy bank which has this, like essentially this counter, this wallet counter of how many Satoshi the project has, which is really cool. And this person is just raising money connecting their Geyser project onto their Lightning Piggy Bank, which is fucking cool. I mean, this looks like a little DIY type of fun project that a father did for his son or something super cool. But let's go back to you, Matteo. Let's talk about orangeville app. Why not? What's up with you? Yeah, for sure. Orange. Bill app is a mobile app. We use Geolocation, which is the only approximate to connect you with nearby users, nearby pledge, and soon we'll let you find events. So meet up, conference, whatever. Actually, it could be anything because the user can create events straight from the App and then put the address. And then you'll be able to invite people there nearby to the event. So it doesn't have to be a meetup. It could be like a soccer game or picnic on the beach or anything. That's pretty cool. Hopefully it comes out January or February. Definitely February. And then we're going to launch the search feature, which will allow you to search for people all over the world. So if you're traveling and you're going to Ghana, you'll be able to look for clubs in the App there in Ghana. And then you can chat them up and say, hey, I'm coming to Ghana next week or next month or whatever, and I'd like to meet with you. I don't know anybody in Ghana. And of course, you can also search by gender for dating, age, profession. Right? We got to do yeah, I'm sure it's going to be like 95% guys, though. It's not can you confirm that? No, it's not. I don't have the number precisely because some users, they don't put a picture. And I know there's one woman that I talk to, obviously I talk to everybody on the app and you wouldn't know she's a woman, but it's a woman. But I think it's about 10% women and 90% men, which it looks it doesn't look good. But Tinder, which is the biggest dating app on planet, the ratio meant to women, it's 97% men, 3% women. No way. I know, it's crazy. Wow. But there's so much there's so many. Better than they are. Yeah, we're doing better than Tinder. Yeah. The point is that when you have, I don't know, hundreds of millions of user, it works even if you have one or 2%. But yeah. So with the search, you'll be able to search, obviously only if the other users have disclosed those information. So age, gender, profession, which is going to I think the profession looking for Profession is going to kickstart the Bitcoin secular economy, right? Because imagining you can look plumber in Oxford and then you can paint that because obviously if it's in the app, it's a bitcoin max. Right. So that's going to be very exciting. ",timestamp:"00:19:33-00:24:59",topics:["Orange pill app","Geyser","piggybank","piggybank"],type:"twitter_space",weight:42.97230338635478},{boost:0,date:null,description:"The solutions to main challenges facing the ranching industry in Nigeria ",episode_title:"The Orange Sun 🌞 Let's talk #Bitcoin & Cattle Ranching/Sustainability",guests:[{name:"Texas Slim",profile_picture:"https://pbs.twimg.com/profile_images/1589784780970795011/02jf0fqp_400x400.jpg",ref_id:"b4448c8e-9238-4aba-bd25-efb329ea5a72",twitter_handle:"modernTman"},{name:"Lucas",profile_picture:"https://pbs.twimg.com/profile_images/1596345084966014976/maviSGq3_400x400.jpg",ref_id:"e3adb591-b29f-435b-bd34-210f2dbcedaa",twitter_handle:"impossiblyso"},{name:"Firebust",profile_picture:"https://pbs.twimg.com/profile_images/1517827165198458880/N79Wpx85_400x400.jpg",ref_id:"0fb6c7f3-a673-4fe5-9599-8165800a2ff0",twitter_handle:"FireBursts"},{name:"Hamza Yusuf",profile_picture:"https://pbs.twimg.com/profile_images/1318064165030940672/sakbSOvT_400x400.jpg",ref_id:"03a74669-b653-4c57-8799-a312cb041089",twitter_handle:"Hamzayu28849293"},{name:"Adenekan's Father",profile_picture:"https://pbs.twimg.com/profile_images/1505572078023495683/Wo_pJvTU_400x400.jpg",ref_id:"b8259997-2ef0-4e6e-8d58-a69b5eda550a",twitter_handle:"AdenekanFatai4"},{name:"Adenekan",profile_picture:"https://pbs.twimg.com/profile_images/1505572078023495683/Wo_pJvTU_400x400.jpg",ref_id:"ca6a563e-0e84-4811-be82-a3b3cd12d399",twitter_handle:"AdenekanFatai4"},{name:"Heritage",profile_picture:"https://pbs.twimg.com/profile_images/1510397558652350469/jYOl00tU_400x400.jpg",ref_id:"98a6d9df-3c39-49ec-8a39-074e61af4ece",twitter_handle:"herrytheeagle"},{name:"Enoch",profile_picture:"https://pbs.twimg.com/profile_images/1596235105663533056/5mRUbLm3_400x400.jpg",ref_id:"4f8af040-3d0c-49c1-806e-aef89d8693fb",twitter_handle:"KazEnoch"}],hosts:[{name:"Jeremy Garcia",profile_picture:"https://pbs.twimg.com/profile_images/1589056396816896001/dslbBQSX_400x400.jpg",ref_id:"e5e68f75-d71a-4477-ae9a-6a891f2d84d0",twitter_handle:"Jerimican5445"},{name:"Oluwasegun Kosemani",profile_picture:"https://pbs.twimg.com/profile_images/1538403135101800450/sO-RPI9U_400x400.jpg",ref_id:"25ce4b90-6689-4dd9-84b6-240c7bcbe407",twitter_handle:"MrlamilamiKosch"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/9b2e17f2-71c5-4f1e-a3e7-720d06dab810.jpg",keyword:!0,link:"https://stakwork-uploads.s3.amazonaws.com/uploads/customers/2707/media_to_local/a91f79fd-d85f-4440-b012-4bdafdc83341/f1d1c5b5-b8c9-44ed-a217-f75b398376d5.mp3",node_type:"clip",pub_key:"02574d6e8e787372184b6f17c40d6c6fe1777db9015801f95dfd24692784d767cd",ref_id:"754762ac-7680-4b80-9ff4-f314ae65d146",show_title:"Satoshi’s Journal",text:"Good morning, everyone. Such an insightful, interesting topic we have today. Like when she said we don't have all the time to dictate it so that we respect our guest time. But Ariel, thank you, sir, for being with us. I mean, it's no small thing that you're here. We know what your time means to us and all that. Thank you. It's such an honor to have you here. I'll just go right into it. I may not be able to exhaust my questions and I planned on, but just to make some few comments here, that bitcoin builds communities. And I think that is what Texas Lime has been trying to point out. It's all about community building and we can achieve that. But the pain point for catering is in interior that quickly. I heard from identity is one, security is a big issue. And that's because one of the reason is that we're not doing ranching here. Okay? We're not doing ranching here. The farmers get to the railroads, get to move around and all that. We don't have a ranching system. But a ranching system is so important where they are set out, places where that is, well, knowledge that these cows can feed on, the advantage is big. The advantages, less risks of diseases, we can have less risk. And also when these cattle are moving and moving, they don't get the right yield in terms of adding weight and pounds and all that. So that's a challenge I think we can sort out. And how do we sort that out? I mean, I know we're having a big project where we can begin to have a bitcoin only ranching system built in Nigeria that will technique one, security two, it will help us foster bitcoin education easily. And also we begin to have the fattest and the biggest cows and the most healthiest cows that Nigerian can produce. I think satoshi journal, we can do that. We can push that. I know we have a big project, but for now let me just quickly drop so that we can respect that. Yes, this time. Thank you so much. Yeah, no problem. And last but not least, lucas, do you have a question or comment? Oh, I'm glad we had time. I'm sorry to come late to the conversation, but I work with towns in New Mexico and Colorado trying to get them to adopt bitcoin to begin a. Localized currency based on their water system. And I grew up on a farm ranch, and to me. Giving rural areas starts with like, valuing water and watersheds. More yeah, I totally drive with that. And I highly recommend that you follow Texas, slim and a dennett and anyone else on this panel if you want to partner up and see if you guys can help further what you're trying to do. It's right in line with what Texas and slim is doing ",timestamp:"01:59:32-02:02:45",topics:["Bitcoin ranching system","ranching"],type:"twitter_space",weight:17.55785369873047},{boost:0,date:1671644776,description:"The Bridge2Bitcoin project",episode_title:"#Bitcoin Creators Space",guests:[{name:"@DecouvreBitcoin",profile_picture:"https://pbs.twimg.com/profile_images/1362747604044566530/Invedmre_400x400.jpg",ref_id:"0eda190b-4373-41fc-bc28-c3b95af30949",twitter_handle:"DecouvreBitcoin"},{name:"@Bridge2Bitcoin",profile_picture:"https://pbs.twimg.com/profile_images/1533812215198924800/vAAlVRxO_400x400.jpg",ref_id:"1aaf2c24-8d26-4038-b55a-8b94427b20c7",twitter_handle:"Bridge2Bitcoin"},{name:"@orangepillapp",profile_picture:"https://pbs.twimg.com/profile_images/1570918965601505282/SOApRCif_400x400.jpg",ref_id:"ba5b79b4-e2e7-4778-8879-df793b8420a4",twitter_handle:"orangepillapp"},{name:"@knutsvanholm",profile_picture:"https://pbs.twimg.com/profile_images/1586261395833774081/RQ8SYxiM_400x400.jpg",ref_id:"e12ebe66-706b-40d2-804a-861a4c79bbfa",twitter_handle:"knutsvanholm"},{name:"@bcvFoundation",profile_picture:"https://pbs.twimg.com/profile_images/1460813196902633476/edbNgO7y_400x400.jpg",ref_id:"d65bc3c3-cdd7-4539-8cb9-6a8d86f580c8",twitter_handle:"bcvFoundation"},{name:"Christopher",profile_picture:"https://pbs.twimg.com/profile_images/1345072452775370754/cBVFzpkV_400x400.jpg",ref_id:"7dacb545-925d-4201-9b9c-869d992dcdb3",twitter_handle:"Chrissuccess"}],hosts:[{name:"@steliosats",profile_picture:"https://pbs.twimg.com/profile_images/1495784740921786371/a73Qu4HR_400x400.jpg",ref_id:"7eed8e35-f762-4882-adf9-b45ad16c3c54",twitter_handle:"steliosats"},{name:"@geyserfund",profile_picture:"https://pbs.twimg.com/profile_images/1554429112978120706/yr1hXl6R_400x400.jpg",ref_id:"02a48cf4-58d0-4014-803c-9120dedeec52",twitter_handle:"geyserfund"},{name:"UKNOWN",profile_picture:"https://pbs.twimg.com/profile_images/930811252665933826/2cVZF58S_400x400.jpg",ref_id:"bcd18bb0-8224-4f6b-af71-e16120ae4323",twitter_handle:"NodedPodcast"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/c9bb5d58-c781-464d-878a-8b6c469ba198.jpg",keyword:!0,link:"https://stakwork-uploads.s3.amazonaws.com/uploads/customers/2707/media_to_local/b18df9d2-d034-4e1f-bcd1-d70b30fe9059/506355bc-c119-4f18-bf0b-abe9be8c17d6.mp3",node_type:"clip",pub_key:"029099ec31eb33594611dc47d5c93de2c1aa86918e3a36b408c14a500601c8bc9b",ref_id:"c11fe5dc-bed6-408f-ae1b-650580184f3e",show_title:"Geyser 🌊",text:"love to hear from Bridge to Bitcoin, because I know you guys, I don't know if you've created it or if you're well, it's a Bitcoin asset project, right? Let's talk about that. Welcome. Hey, Mick. How are you? This is Christopher from bridge to bitcoin. Hi guys. How is everyone this evening? Good to be here. Great to join you guys in your space. So thanks for setting this up. Mick, apologies for joining late. So apologies if I go over ground that you've already talked about out. Oh, no, don't worry. Sorry for tagging you last minute. No worries. Thanks for tagging. It's been great to speak with Connet. And also I just want to bring it back. Well, actually, I'll start off by saying congratulations on getting 30 projects listed this week on Geyser. That's fantastic. That's really great. And just to resonate with what Connett was saying in terms of things get built in a bear market, I think it's fantastic. And you guys are really promoting it. So thank you for everything that you and the Geyser team are doing, helping people, or Bitcoin is build in this bear market. Because for me, for the rest of the team, it's really important that we build foundations now so we're ready as the ball comes out. It's fantastic to see. So for those who don't know about bridge, for those who don't know about bridge to bitcoin, we onboard merchants to accept bitcoin payments. And we received a grant from Geyser early this year. I'm ashamed to say we haven't yet, and it's been on our to do list for weeks, months, to put up a project, a crowdfunding project on Geyser. And we should really do that soon. But, yeah, we'll get that. It's definitely on our to do list. So we hope to do that soon, especially now, as you say, Nick, the ease of putting up a lightning address. And that makes it so easy, as Joe Nakamoto tweeted about earlier this week. So we shall definitely get on to that. But I just want to go back on what I heard Mateo from Orange Pellet talking about, because he dropped off the call now. I think he has. That's a shame. But I really resonate with what he was saying in terms of how. For. Us, onboarding merchants is one of the cornerstones of Bitcoin success, certainly from my perspective, and making the user interface really easy is really important. I sort of resonate with what Mate was saying in that I think most people are currently not fussed about decentralization, they're not fussed about privacy. We as Bitcoin as are, we get it, we've been down the rabbit hole. But most of the society, they want convenience, they want ease. And that's unfortunately why I think CBDCs are going to hit hard, because people won't do their homework, they won't do their research, people are going to welcome it with open arms, unfortunately. So for me, merchant adoption is really important and introducing that in a way that's really easy. So the way we do that for Bridget to Bitcoin, ironically, it's not Bitcoin that we're selling merchants. For us, it's about creating additional revenue for them by saying, oh, hi, guys. Hi, merchants. What we're going to do is we're going to create a new customer base for you called Bitcoinners, and they're going to come and spend their currency for at your shop service and it's going to create additional revenue. And so for me, it's a slow orange bill, because what happens is a lot of these merchants get bitcoin is coming and using their services or buying their products, and we as Bitcoin as we're fantastic customers. We're so enthusiastic. We travel miles, we buy stuff from all over the globe, we get it shipped over, because you as a Bitcoin business, we want to support you. But if you're new to Bitcoin as a merchant, you kind of get overwhelmed quite quickly with how much attention you get by accepting Bitcoin. And it's great, because what that happens, and what we've evidently seen is that those new merchants suddenly get this influx of bitcoiners and it leads them down the rabbit hole without us having to do anything. Because bitcoin is they make an impression because we're such happy people, especially in these economic times where everyone's feeling the pinch, we will go that extra mile, literally, to spend our bitcoin, to spend our SATS, and replace them. And we're happy about it. We're more than happy, we're enthusiastic. We're the best customers you could ever have. That's amazing. For me, it's kind of a cornerstone of how we can it's sort of a Trojan horse. Trojan horse orange pill. So we're going around to regular businesses so who don't even know about bitcoin, and that's what we're planning on next year. We're going to trade shows. We're just to speak to regular people. We've got no idea about bitcoin, and we're going to talk to them about this fantastic payment processing network called the lightning network. And bitcoin normally is quite late on in the conversation, actually, because as everyone, I think, on the call knows, the processing fees on the lightning network are next to zero. They're really cheap compared to what our fiat counterparts are charging. Plus we've got instant settlement, all those fantastic things. So we talk about it's really interesting. We talk about the payment rails. That lightning network is a payment rail and how better than it and eventually we get to the bitcoin piece. But, yeah, for me, it's about making their businesses more profitable, having additional revenue, and it's fantastic because you literally see them fall down the rabbit hole. So we had that recently with a small chain of pubs, just two pubs that we onboarded last month, I think it was last month or the month before. So this landlord, he owned two pubs and he was not a bitcoiner, and he was not interested in bitcoin. But when James, my partner, said, right, we can bring extra customers to your pub, they're called bitcoin as, and they will spend their currency, but it will create additional revenue, he was like, fine, okay, I'm not interested in bitcoin, but I am interested in additional revenue. So if they're going to come and spend their currency and I can give it to my local currency, great, because it's good for my business, I said, fantastic. ",timestamp:"00:51:38-00:58:00",topics:["Bridge2Bitcoin","Bitcoin payments"],type:"twitter_space",weight:35.60085180856705},{boost:0,date:1671735703,description:"Tips for building a bitcoin community",episode_title:"TOXIC HAPPY HOUR! #Bitcoin, Pysh, Booth, BTC Ben & the Plebs! 🍻😂",guests:[{name:"Jeff Booth",profile_picture:"https://pbs.twimg.com/profile_images/1362957991410954241/spiaMAg2_400x400.jpg",ref_id:"f1143bcc-9ab9-4716-8259-0e5b026f8039",twitter_handle:"JeffBooth"},{name:"George Gammon",profile_picture:"https://pbs.twimg.com/profile_images/1246550014450700291/2n_iHigp_400x400.jpg",ref_id:"7ca1bc4f-3a57-4a6a-bedf-ef47a8b37297",twitter_handle:"GeorgeGammon"},{name:"Neil Jacobs",profile_picture:"https://pbs.twimg.com/profile_images/1593645788978102277/UAQCQKeE_400x400.jpg",ref_id:"0bc759e0-b055-4800-a79d-2b950fe5cc53",twitter_handle:"NeilJacobs"},{name:"Preston Pysh",profile_picture:"https://pbs.twimg.com/profile_images/1408783276081299462/f4Ye5n7-_400x400.jpg",ref_id:"01ad2c81-2d0c-44a9-93a1-42c07287aa80",twitter_handle:"PrestonPysh"},{name:"Brian",profile_picture:"https://pbs.twimg.com/profile_images/1589300685182570500/cTffQlpJ_400x400.jpg",ref_id:"b167b1cd-bbce-4839-a03c-194f006f954d",twitter_handle:"BrianTheDrumer"},{name:"BTC Ben",profile_picture:"https://pbs.twimg.com/profile_images/1348015880664473610/S-uDNLlZ_400x400.jpg",ref_id:"2c95b3dd-e3a2-4cf0-a49e-a8915d2bfcd5",twitter_handle:"bensemchee"},{name:"Craig Shipp",profile_picture:"https://pbs.twimg.com/profile_images/1605961563420114945/MWGqR1Gm_400x400.jpg",ref_id:"8d6ca47a-89a2-4331-bae4-2fae18055a95",twitter_handle:"CraigShipp"}],hosts:[{name:"PUBLORD",profile_picture:"https://pbs.twimg.com/profile_images/1480160632360124416/AM_vVRko_400x400.jpg",ref_id:"8126d933-0986-4fd2-a6be-c02581294463",twitter_handle:"publordhodl"},{name:"Anders",profile_picture:"https://pbs.twimg.com/profile_images/1391477993726529545/xqIjHq5w_400x400.jpg",ref_id:"78672de6-3c5f-4d95-8fd9-f2b512fa7a04",twitter_handle:"Anders_"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/0c42d408-e518-4ecf-b282-d864a8c14002.jpg",keyword:!0,link:"https://stakwork-uploads.s3.amazonaws.com/uploads/customers/2707/media_to_local/dbc5dd26-2307-4f64-a377-105e2a277d9c/be3d47a7-2fcd-4de8-8f22-71851953d022.mp3",node_type:"clip",pub_key:"02574d6e8e787372184b6f17c40d6c6fe1777db9015801f95dfd24692784d767cd",ref_id:"d65c7fdb-df02-4bef-a6e6-8d214f6284d4",show_title:"PUBLORD",text:"will be here, too, of course. Yeah. I'm planning on setting up on the Tribe relay. Like when I get up. I'm going to get a laptop next week before I head was just talking about it. Honestly. Brian, DM me a list of like, some of the top speakers you think would be able to explain it because look at us, we're a bunch of regards, as they say, explain it to us like we're five and wear masks in a swimming pool. Like that kind of level. Yeah. Let's talk offline, brother, because I want to hear more about this wearing masks in your cart. All right. Sounds good, Bobby. I'm heading out with Brian as well. Always a blast. I appreciate the invite. I thoroughly enjoyed the Noster talk, to be quite honest with you. BTC sessions. Have a wonderful bonanza tomorrow. Looks awesome. Yellow, I really came here today just to kind of be around you and just love this group. I love you, Preston. Man thanks again for stopping Preston. Good, deep Preston. Happy holidays. Thanks for all you do for the space. Preston. Oh, yeah, man, my pleasure. And I'm honored to be a part of this movement with everybody else. Okay. Let that putt with Preston fish sink in. Preston. Just let it sink in. Oh, wait, yeah. Preston, before you go, because listen, I had an idea for you guys, because, listen, I like to go skiing in Colorado every year. And there's a place there go to Breckenridge or Keystone, but they've got this one little area where they had Lindsey Vaughn do a run, okay? And this for the kids for the most part, even though the adults can't hit it either. But they've got I don't know how many hundreds of meters it is, but they've got to run at a time there, and you get to try to test yourself against a time. So what I'm thinking is pressing you go solo on that course early, all right? You put your score up there, and then anyone who beats it, you get some SAS. Preston puts up the initial score, and you get SAS if you beat it. Just saying. I'm there. On a serious note, I am going to this Jackson Hole event in 1 March to I don't know if it's the second or the 3 March, but I'll be out there for that if anybody's in that area. All right, guys, see you. Thanks for the have a good one, man. Take care. Okay. BTC session. Ben, sorry, one question. Just say one quick thing. Just because BT session is in and probably I wanted to get your support on it as well. I'm trying to start a small bitcoin community in South London. And I'll put in your chat and mentioned earlier, I just wondered if I could get support from you guys because of BT sessions just turned up just now. I just wondered if I could get some maybe some help on some talking points as well, because I'm just trying to build something that's very I wanted to be very simple conversational. It's the first one, but I want to build on it. It's free. And I'm going to get some sponsors from some beer companies so we can do free beer as a kind of a pool. But it's going to be my pub that I run. I put it in a chat. So I just wanted some help, really. It doesn't have to be big. It's not going to be nothing like the Harvey party right now, but I'm planning on being there as well, so maybe I can get some people to come along for that as well. Sounds awesome, man. What kind of people are you expecting? Is there going to be some experienced bitcoiners? Is there going to be a mix of newbies what's the demographic you're looking at first? It's yeah, mix. I mean, I've got an old far who's written about 20 books about my favorite football team, which is Crystal Palace, but he's got a few properties and stuff and he wants to invest in Bitcoin. And I said to him it's exactly the same thing I said. It's like if I tried to explain to you how a car works, the fact that he knows how a car works, you still need to learn how to drive it. I can tell you all the benefits of how good a car is against a horse, but you still need to learn to drive. You wouldn't give a car to a ten year old and all this sort of stuff. There's an education that still needs to be learned. So we got to start small and then build up because he's got property, he writes books and stuff. I've got mathematician coming, a C plus plus, programmer coming, people I know, and obviously there is some shit coinners who want to come along and learn. But obviously you look at the meeting, I put it in the chat, it is Bitcoin. And I've called it Bring the chat. As in BTC. That's the breakdown of BTC. But obviously it's Bitcoin and it's the first one, so it's kind of build from there. But it is a case of break them in gently and I don't want to be fun. It's not about let's overload them with too much tech. But I kind of want to go with if we want to go down the economic rule road, then we'll go down the economic rule if we want to get to understand how Bitcoin works. But it's a case of it will evolve because of I can do as many I could do one a week, I could do one a month. It's about that engagement and just making it fun and free. That's the main thing. I think that's great. What I would say is maybe if you're doing a couple each month, then you could look at it as there's always going to be kind of like a beginner night, and then there will always be like the secondary. One will be maybe more in depth topics that will be of interest to the people that have been there for a while and have leveled up or the ones that are coming in already with a good base knowledge. And then that way you various things, I could actually split it. So we do the first one and then we work out how to split it on the technical to the beginner type side of things. And then I could do alternative nights based on maybe work it that way. Because probably knows that I love these spaces and I love learning myself and I want to share what I learn. And I think the best way to learn is to share your knowledge. The more I want to share it, the more I have to learn myself to make sure that what I'm saying is correct. And that's why I love these spaces so much, because I'm addicted to him. London I would just posit one thing. And this is cool that you're here asking these questions when Ben is here, because if anyone wants to learn anything about Wallace in general, see reviews and learn how to do things, you go to BTC sessions on YouTube, you can learn so much. However, there's a different level when you can do it sort of in person and you see it happening. And Ben. We did Halloween in Charlotte, North Carolina. And what was really cool, and I was mentioning this earlier on the space, and people don't understand, even if you've been here a year, you forget how far advanced you are when it comes to not only understanding Bitcoin and what it means, but the technology behind it. So if you can set up London, just a simple thing where you just show somebody how to download a wallet, either moon wallet, whatever wasabi wallet, and send them some SATS, dude, they are blown away and they'll be new to the space. But I'll tell you what, that changes lives when they see that. When you do that, that is like putting a couple shovels about 3ft down into the ground to start that rabbit hole journey. When they see that you just sent them value outside of the Swiss system, it was pretty cool to see. And yeah, when I saw that, I forgot, man. Sometimes it's like when you used to believe in Santa Claus, man. Used to believe in Santa Claus. Then you got older. But when you see people that do Lightning Network for the first time, you believe in Santa Claus again yourself. You see that spark of joy in their eye. Wait, you don't believe in capitals? What are you talking about? I was going to say Santiago. I think he pulled it back. ",timestamp:"02:14:38-02:24:14",topics:["bitcoin community"],type:"twitter_space",weight:36.0744936342072},{boost:0,date:1671735703,description:"What bitcoin represent vs what Nodster network represent?",episode_title:"TOXIC HAPPY HOUR! #Bitcoin, Pysh, Booth, BTC Ben & the Plebs! 🍻😂",guests:[{name:"Jeff Booth",profile_picture:"https://pbs.twimg.com/profile_images/1362957991410954241/spiaMAg2_400x400.jpg",ref_id:"f1143bcc-9ab9-4716-8259-0e5b026f8039",twitter_handle:"JeffBooth"},{name:"George Gammon",profile_picture:"https://pbs.twimg.com/profile_images/1246550014450700291/2n_iHigp_400x400.jpg",ref_id:"7ca1bc4f-3a57-4a6a-bedf-ef47a8b37297",twitter_handle:"GeorgeGammon"},{name:"Neil Jacobs",profile_picture:"https://pbs.twimg.com/profile_images/1593645788978102277/UAQCQKeE_400x400.jpg",ref_id:"0bc759e0-b055-4800-a79d-2b950fe5cc53",twitter_handle:"NeilJacobs"},{name:"Preston Pysh",profile_picture:"https://pbs.twimg.com/profile_images/1408783276081299462/f4Ye5n7-_400x400.jpg",ref_id:"01ad2c81-2d0c-44a9-93a1-42c07287aa80",twitter_handle:"PrestonPysh"},{name:"Brian",profile_picture:"https://pbs.twimg.com/profile_images/1589300685182570500/cTffQlpJ_400x400.jpg",ref_id:"b167b1cd-bbce-4839-a03c-194f006f954d",twitter_handle:"BrianTheDrumer"},{name:"BTC Ben",profile_picture:"https://pbs.twimg.com/profile_images/1348015880664473610/S-uDNLlZ_400x400.jpg",ref_id:"2c95b3dd-e3a2-4cf0-a49e-a8915d2bfcd5",twitter_handle:"bensemchee"},{name:"Craig Shipp",profile_picture:"https://pbs.twimg.com/profile_images/1605961563420114945/MWGqR1Gm_400x400.jpg",ref_id:"8d6ca47a-89a2-4331-bae4-2fae18055a95",twitter_handle:"CraigShipp"}],hosts:[{name:"PUBLORD",profile_picture:"https://pbs.twimg.com/profile_images/1480160632360124416/AM_vVRko_400x400.jpg",ref_id:"8126d933-0986-4fd2-a6be-c02581294463",twitter_handle:"publordhodl"},{name:"Anders",profile_picture:"https://pbs.twimg.com/profile_images/1391477993726529545/xqIjHq5w_400x400.jpg",ref_id:"78672de6-3c5f-4d95-8fd9-f2b512fa7a04",twitter_handle:"Anders_"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/0c42d408-e518-4ecf-b282-d864a8c14002.jpg",keyword:!0,link:"https://stakwork-uploads.s3.amazonaws.com/uploads/customers/2707/media_to_local/dbc5dd26-2307-4f64-a377-105e2a277d9c/be3d47a7-2fcd-4de8-8f22-71851953d022.mp3",node_type:"clip",pub_key:"02574d6e8e787372184b6f17c40d6c6fe1777db9015801f95dfd24692784d767cd",ref_id:"fbefee4e-b2e3-4635-88ac-800d3482e9f8",show_title:"PUBLORD",text:"on Craig's recommendation. I went to Jack.com. Was not what I thought it was going to be. Thank you, Craig. I had an education. Look, we'll talk about the notes a lot of times. All the fact Preston jumped in, I wanted to just have a few more words. I know he's got a busy schedule, but preston, you're coming to the end of 2022 investor podcast, one of the best ones we have any tweaks to next year. Guests are looking forward to have not really just doing the same thing in reference to the Noster conversation there. The thing that's such a game changer for folks is if you want to run your own relay and host your own data, you can do it. And the barrier to entry to do it is really low. In fact, that's what I've been doing while I'm here talking to you guys is I'm setting up my own relay to host my own data and to make sure fucking go that nobody can mess with it. And so when you look at what this protocol represents, when we look at Bitcoin, it represents it's like equal sign free and open money, free and open markets. When you look at Noster, it's similar to Bitcoin in the regard that equals sign free and open speech around the world. Nobody can shut it down. Right. That's what it represents. Now, we are in the very, very early days of this, and so whether we can pull it off or not at scale, I don't know. It sure seems like we can. When you have guys like Jack Dorsey in there, like every minute of the day working on the protocol and working on I don't know if he's working on clients or if he's just working on the protocol, but he's in there. And that guy wouldn't be in there if he didn't find a whole lot of promise behind the rudimentary building block of an event. That is where it all starts, with this protocol and everybody's just building around it. It's pretty exciting. Hey, Preston, are you able to limit who can see your data that you host by only letting people that you trade public keys with access it or something like that? Is that a concept? Yeah. And Brian, correct me if I'm wrong, because you seem to be pretty well versed in all this, but from what I understand, as I'm literally trying to set this thing up, I'm struggling a lot setting this up because this is not my area of expertise, but I have an appreciation for what it represents. I'm trying to learn along the way. But my understanding is you can host, you can relay whatever accounts you want, as many as you want or as little as you want, and people can connect to it. And you can allow that connection or not allow that connection, but it's creating this web of interaction between these encrypted messages that are of very small size, and they're just being passed around from relay to relay. Jim, are you basically asking, is there a way of blocking people? I guess it's more my thinking was more if you're going to host data, so maybe you want some of it open to anybody so you have a permission set on that data where anybody can just log on with a public key. You don't know if they're a bot or anything else, and they can see your stuff. But then maybe there's other stuff you only want your followers to see or something like that. I don't know. Maybe testify. Just let me know. There's a new version of Domas just got released. Is that relevant? I'm sorry. We ",timestamp:"01:35:32-01:39:29",topics:["Nodster network"],type:"twitter_space",weight:35.643925540367206},{boost:0,date:0,description:"The Genesis crypto lending fraud",episode_title:"The Orange Sun ☀️ #Bitcoin News and Talk",guests:[{name:"Portland Hodl",profile_picture:"https://pbs.twimg.com/profile_images/1562306406526492672/LiqmI9NS_400x400.jpg",ref_id:"530aba21-392f-4156-9e91-4fc5c76fced1",twitter_handle:"PortlandHODL"},{name:"Miykael Woodward",profile_picture:"https://pbs.twimg.com/profile_images/1473433558475689985/CM0o3oWu_400x400.jpg",ref_id:"6fe02a78-4f07-47e7-8e64-b278a3167835",twitter_handle:"MiykaelWoodward"},{name:"Okin Mobi",profile_picture:"https://pbs.twimg.com/profile_images/1518945775685967873/O0wPrIKO_400x400.jpg",ref_id:"bbd18918-7758-4bdb-b9a5-641bf92748a6",twitter_handle:"OKIN_17"},{name:"TK☣️Ph.Ple₿",profile_picture:"https://pbs.twimg.com/profile_images/1505791887415730177/d0YDQ3Xc_400x400.jpg",ref_id:"9e3ffa2c-9410-48e9-a726-8312c0abcd7c",twitter_handle:"ToxiKat27"},{name:"Funsho Jimoh",profile_picture:"https://pbs.twimg.com/profile_images/1600143435775856641/uqgmtT23_400x400.jpg",ref_id:"a237ffb0-792b-484e-b12f-65a2b679eaf1",twitter_handle:"fnicencool"},{name:"prince ogbonna",profile_picture:"https://pbs.twimg.com/profile_images/1595693872637681664/TeWJzTut_400x400.jpg",ref_id:"0b0c70b1-23b1-4d98-b259-6dbb67b7481d",twitter_handle:"princejoj0"},{name:"The Bitcoin Village",profile_picture:"https://pbs.twimg.com/profile_images/1544318244789649410/kQ2G1MCE_400x400.jpg",ref_id:"d894aca4-36f6-4821-a00b-a4e860b19502",twitter_handle:"VillageBitcoin"},{name:"Masterguantai",profile_picture:"https://pbs.twimg.com/profile_images/1521025685078302720/w9dZwehS_400x400.jpg",ref_id:"29baf525-42eb-41a6-98f9-a0d6b4480af0",twitter_handle:"MasterGuantai"}],hosts:[{name:"Jeremy Garcia",profile_picture:"https://pbs.twimg.com/profile_images/1589056396816896001/dslbBQSX_400x400.jpg",ref_id:"e5e68f75-d71a-4477-ae9a-6a891f2d84d0",twitter_handle:"Jerimican5445"},{name:"Satoshi’s Journal",profile_picture:"https://pbs.twimg.com/profile_images/1598641632601047042/qrZMP5Oy_400x400.jpg",ref_id:"d977ed11-09b0-4143-828d-582ecb8b58ca",twitter_handle:"SatoshisJournal"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/9b2e17f2-71c5-4f1e-a3e7-720d06dab810.jpg",keyword:!0,link:"https://s3.amazonaws.com/stakwork-uploads/uploads/customers/2707/media_to_local/a99c4b03-009f-4027-a9c7-3c249a0cf9b7/a99c4b03-009f-4027-a9c7-3c249a0cf9b7.mp3",node_type:"clip",pub_key:"02574d6e8e787372184b6f17c40d6c6fe1777db9015801f95dfd24692784d767cd",ref_id:"663836ff-8d5a-4037-a62f-72568fff46f1",show_title:"Satoshi’s Journal",text:"that's very interesting. But Genesis future is more uncertain because the business is heavily focused on lending out customer crypto and has already engaged restructuring advisers. The crypto lender is part of DCG, the conglomerate controlled by Barry Silbert. SEC officials said the possibility of a DCG or Genesis bankruptcy had no bearing on deciding whether to pursue a charge. It is the latest in a series of recent crypto enforcement actions led by Gensler after the collapse of FTX Bankman Freed's crypto exchange late last year, Genzler was roundly criticized on social media and by lawmakers for the SEC's failure to impose safeguards on the nascent crypto industry. Gentler's SEC and Commodity Futures Trading Commission, chaired by Roston Benham, are the two regulators that oversee crypto activity in the US. Both agencies filed complaints against Bankman Freed, but the SEC has of late revved up the pace and the scope of enforcement actions. The SEC brought a similar action against now bankrupt crypto lender BlockFi and settled last year. Earlier this month, Coinbase settled with New York State regulators over historically inadequate know your customer protocols. Since Bankman Freed was indicted on federal fraud charges in December, the SEC has filed five crypto related enforcement actions. So the SEC is finally getting some stuff done. They have been criticized, and it's really great to see them finally do their job. And hopefully they'll essentially what I see happening is, of course, the Winkleboss twins are pissed because they are like a little cornered animal. And you know what happens when you corner an animal? They'll fight you back, but they're fighting back. And they're in a corner because they're trying to get their customers paid back. But they're having a little war with Barry Sober, and Barry Sobert is not paying them back. So now you got basically a pending, they're probably going to go and sue Barry Sobert and then now you have the SEC charge them with those charges. So once again it's just going to show you this is all inevitable. They should have all known better but I think it just they're not idiots. They should have known better but I think that they do idiotic stuff because there's already been a precedence by which people that do bad stuff, they end up just getting bailed out anyways or they just get out of it with a little slap on their hand. And we saw that many times in our history. And it's sad because basically these crypto exchanges are going to be probably let off with a small little slap on the hand but at the expense of millions and millions of dollars from their customers who they basically took advantage of. They were not good stewards of their customers money and they were using that customer's money to borrow against, to buy more assets and just become over leveraged. So we don't know what the balance sheets of Barry Silbert's DCG company is and we don't know the balance sheets of Gemini but yes, who knows, they may be worse than what we think and this could cause further cascading of crypto in general. The unfortunate part about this is that as we all know, crypto and bitcoin are two separate things. Bitcoin is not competing against any of those cryptocurrencies that are on exchanges of which there's 20,000 plus and that's still defined. But essentially as those cryptocurrencies as they get rug pulled and litigated against, so to speak, bitcoin is going to go down with them. But when it's all said and done, bitcoin just keeps doing what it's supposed to be doing every ten minutes, just block by block verifies transactions, validate transactions and it could give the rats ass about what's happening around it. Nevertheless, the cascading effect of the shit coins caused bitcoin to go down. So who knows, there might be some further damage, so to speak. Damage is not the right word. There can be some further lowering of the price of bitcoin just because of the shit coins getting finally rug pulled by regulation. It was highly necessary and I'm glad that they're finally doing something. It'll be interesting to see what the SEC does as far as new laws and regulation that come out of this. And it will also be interesting to see if the Winklevoss twins have the liquidity to be able to sustain multiple litigations and perhaps even further degradation of the value of what's on their balance sheet. I think another thing that's interesting we all know about Binance, it'd be interesting to see what their balance sheets look like if they're as bad as we think they are. According to Binat's CEO, in a stone cold manner, he told them that they're good to go and they have the liquidity to sustain even a further drop. But that was a huge liquidation. They went under anyways. We're seeing it all. Rugpool and Bitcoin will stand on the end, we all know that. And it'll be interesting just to see if everything pans out. Just another game, theoretically, in bitcoin. ",timestamp:"00:41:05-00:48:14",topics:["crypto lending fraud","DCG","SCC","Winklevoss"],type:"twitter_space",weight:14.263422012329102},{boost:0,date:null,description:"Decentralization of bitcoin and holding ",episode_title:"Café ₿: Thanksgiving Special 🦃 w/ the Café Bitcoin Crew",guests:[{name:"Rob Hamilton",profile_picture:"https://pbs.twimg.com/profile_images/1524033110630969351/wTUr8S36_400x400.jpg",ref_id:"94b18625-4778-4cfe-9c78-823704d1c1b1",twitter_handle:"Rob1Ham"},{name:"Tomer Strolight",profile_picture:"https://pbs.twimg.com/profile_images/1591960241008148481/HtyINxtU_400x400.jpg",ref_id:"3a2bc97d-072c-4ed9-9a59-17ceeb68fe99",twitter_handle:"TomerStrolight"},{name:"DJ Satoshi",profile_picture:"https://pbs.twimg.com/profile_images/915987644043030528/5nh3JQSz_400x400.jpg",ref_id:"02ae35cb-3728-441f-84c5-a8db5d9150b4",twitter_handle:"satoshi__tomiie"},{name:"Lauren",profile_picture:"https://pbs.twimg.com/profile_images/1586022214901501952/U1dRyCxP_400x400.jpg",ref_id:"7f14bbf5-a60b-496b-a361-3663cf120299",twitter_handle:"LaurenJauregui"},{name:"Shaeroden",profile_picture:"https://pbs.twimg.com/profile_images/1560742113410678789/cHZ2tUjU_400x400.jpg",ref_id:"0da06a5c-038f-4737-9af7-17bed3712e68",twitter_handle:"Shaeroden"},{name:"Andres",profile_picture:"https://pbs.twimg.com/profile_images/1401952614795943950/aL2h3Wb4_400x400.jpg",ref_id:"db4abfe9-e3bb-4ffa-9783-ce67f5b20270",twitter_handle:"andresvbr9"},{name:"Peter Ansel",profile_picture:"https://pbs.twimg.com/profile_images/1374726811221954565/R7ttqYMI_400x400.jpg",ref_id:"2d418514-e03c-414d-8ed1-10c894aacb6e",twitter_handle:"peteransell"}],hosts:[{name:"Alex Stanczyk",profile_picture:"https://pbs.twimg.com/profile_images/1539055022364708864/rwErK6x1_400x400.jpg",ref_id:"3126e2a3-bbe4-456b-b298-9714085fa286",twitter_handle:"alexstanczyk"},{name:"Neil Jacobs",profile_picture:"https://pbs.twimg.com/profile_images/1593645788978102277/UAQCQKeE_400x400.jpg",ref_id:"0bc759e0-b055-4800-a79d-2b950fe5cc53",twitter_handle:"NeilJacobs"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/239722cb-4216-414a-a17b-5adf9d52e15a.jpg",keyword:!0,link:"https://stakwork-uploads.s3.amazonaws.com/uploads/customers/2707/media_to_local/c25e3b3c-b5ef-435e-9e7d-9e406089e7b1/572908d4-f2cc-4c7b-980c-8359d2c8000d.mp3",node_type:"clip",pub_key:"02574d6e8e787372184b6f17c40d6c6fe1777db9015801f95dfd24692784d767cd",ref_id:"2acb23ed-c7ca-4f51-abb6-bfcc0a87316a",show_title:"Swan.com",text:"I'm amazed you fell for like well, I don't know if they fell for the Rogers thing, because I think Roger believed what he was saying, but it's like, who's Roger to understand how an exchange works, right? Because I don't know. I was friends with Roger. I was talking to I know, but I was friends with him. I was talking to him all the time back then. I was working with the guy, and even I was like, but I worked a bit instant, so I had to work directly with Mount Cox back then. And it was such a shit show because I had all my funds on Cox, too. But after that experience, I was like, okay, I'm never using Cox again. These guys are a train wreck, dude. You guys got to understand that Brad was raised not only Mormon, but Canadian, which is a double whammy of gullibility. That's true. The truth is right there. Take that with some extra maple syrup today. Wow. Good one. It's amazing you're not a bee catcher, Brad. Well, Brad's also smart. He's just really nice. So he keeps being like, oh, I guess it's true. Maybe Roger does know things I don't. That's the one thing, though, I knew the entire time, was that Bitcoin was the thing to pay attention to, and you always wanted more Bitcoin, and that decentralization was the most important thing about why this asset is valuable in the first place. And sacrificing any form, any sort of decentralization, invalidates the investment case for bitcoin. So if you're going to make the blocks bigger so that people can't run nodes as easier or set a precedent that some centralized cartel of businesses or devs even, can just change the parameters of either the code or the monetary policy, that completely invalidates the sound money properties of the asset. Which is why I never fell for bitcoin cash or ethereum or any of these things, because decentralization is the most important thing. So that also is what I focused on the whole time. It's like, this is only important because of decentralization. And you have to maximize decentralization even at the expense of pumping mentals, as Richard Hart would like to say, or Fomonomics or whatever you want to call it. Like the ethereum people sacrifice their ceremony properties for ponzi. Nomics, they actually made a centralized change in the code with the IP one five nine to try to actually make the stock to flow meme of ethereum better than the stock to flow meme of bitcoin. And it's the stupidest thing, and I'm so glad, is that when they became Brad, is that when they became ultrasound money? Because I have to tell you, I've talked to many ultrasound technicians and none of them are using ethereum. So I don't think it caught on. Hey, Brad, I think the real lesson that I've learned from you, because I love when we get in clubhouse and we just rib you, it's a good time. But I think the real lesson of Brad is you can make some of the dumbest, stupidest fucking mistakes for a decade and you still come out just fine. You have a core bitcoin position. Yeah, it's good. Literally, you have to do this thing where if you're not a conservative person who's able to just safely rationally hold bitcoin and not get distracted, you know, auto diagnosed me with what was it? Activity bias. Auto. Yeah. So this is probably worth going over for anybody in the room, but everyone has activity bias. It's not just Brad. Brad just has maybe more pronounced activity bias than others. Hyperactivity bias. Yeah. So this comes from evolutionary biology, essentially, which is that, like, let's imagine you're a small mammal on the grasslands and the grass blows, but it's above your head, you can't see what's behind it. Nine times out of ten, it's going to be the wind that's moving the grass. One time out of ten, it's going to be something that's going to eat you. And so it behooves you to run away to have a strong bias towards action. Which is why all organisms on earth have a strong bias towards action. Right. Cause one out of ten times you get totally eaten by a predator. So in markets, though, this works against us because you want to have a strong bias against action, and it's very difficult to just sit still like this is the quote I posted from Jesse Livermore's book, which, again, go read reminisces of a stock operator, this bear market. It's a very instructive book. It was written in the early 19 hundreds. And interestingly enough, a lot of what was going on, like pre collapse of 1929, is very similar to what's going on in cryptocurrency today, like the bucket shops and everything. It's really an interesting parallel. But basically you want to have a strong bias against action in investing terms. And so huddling at its most simple basic level is just getting a bitcoin position and then saying no every single day to selling that bitcoin position. That's it. And then if you want to sort of judo your activity bias, right, make it work for you, you go from huddling, which is mainly a passive activity, to stacking SATS, which is an active activity. So what do you do when the price is down? You stack SATS, right? And this is a way that you could actually hijack your own activity bias for something beneficial, but you don't want to use your activity bias to trade chick coins to sell in and out of your position, generate taxable events. You want to sit on your ass and do nothing. And that's the hardest thing to do. I love it. This episode of Cafe Bitcoin has been legendary and epic in that this will be the one remembered as when American hotel compared Brad Mills to a small furry mammal in the grass trying to avoid being eaten by predators. I thought it was the wind. You blow us canadian and not a Mormon. Yeah, not anymore. One of the things that you said, the thing that you just said was great and all, but most of us don't have the ability to control our activity bias. So I think most people, like some less so than others, they're going to come in and they're going to try to trade. They're going to go search YouTube about crypto and they're going to find, like, you know, people who think they're smart, who are actually just drinking koolaid themselves. And there's a lot of people in that category, like, sure, there's bitboy and people like that who are just grifters that are getting paid to show garbage, but then there's like, people who are unbiased, they're not getting paid to show garbage. They actually are good at technical analysis and trend following things like that, but they drink the Kool Aid of Defy and crypto and NFPs and they start giving smart sounding advice to new entrants and then they just create a whole class of people that are going to just go repeat all the mistakes that all the early bitcoiners made with their activity bias. So the thing is I think we really should push the idea of for new market participants and even people in here that maybe got ripped off on Luna or Celsius or FTX or any of these things we've all kind of had those types of experiences in the past. The way you get forward from it. I think honestly if you can't do what Hauddle said and actually control your activity bias and recognize that and just sit patient just buy and hold and dollar cost average and maybe had your risk at the top or something like that is create an internal bitcoin maxi personality like this is what the allship owners should do they should drink the bitcoin Koolaid like Jekyll and Hyde style have a bitcoin maxi personality inside of them. Even if they think bitcoin Maxis are cringe and stupid and boomers and don't understand utility, blah blah blah, every shift corner should have a bitcoin Maxi inside of them. Wait that doesn't sound right. Okay, so every shit corner should have a bitcoin maxi inside of them that controls their bitcoin, the private keys to the bitcoin and that bitcoin maxi personality needs to sign up with Casa or Unchained or somebody to do multi stig to protect the other personality. The FOMO sapien activity bias personality from going out and gambling away all their money. Yolo betting on some ICO buying a JPEG because Gary vee told them it's going to get them into his bedroom or something like that there needs to be like everybody should have a bitcoin max inside them. I'm just calling it that's what they got to do. And let the bitcoin maximize personality. Manage your bitcoin and segregate your portfolio so that you're protecting yourself from your Dgen side and if everybody did that they'd be like me because I made all these mistakes and then I'm still here and bitcoin changed my life. So most people are going to shit coin they should just do it in a way that protects themselves from what inevitably is going to happen. ",timestamp:"01:43:16-01:52:28",topics:["ultrasound money","Ethereum","bitcoin maxi"],type:"twitter_space",weight:13.933148503303528},{boost:0,date:1671644776,description:"Some of the importance of Bitcoin Creator spaces and how it helps Bitcoiners",episode_title:"#Bitcoin Creators Space",guests:[{name:"@DecouvreBitcoin",profile_picture:"https://pbs.twimg.com/profile_images/1362747604044566530/Invedmre_400x400.jpg",ref_id:"0eda190b-4373-41fc-bc28-c3b95af30949",twitter_handle:"DecouvreBitcoin"},{name:"@Bridge2Bitcoin",profile_picture:"https://pbs.twimg.com/profile_images/1533812215198924800/vAAlVRxO_400x400.jpg",ref_id:"1aaf2c24-8d26-4038-b55a-8b94427b20c7",twitter_handle:"Bridge2Bitcoin"},{name:"@orangepillapp",profile_picture:"https://pbs.twimg.com/profile_images/1570918965601505282/SOApRCif_400x400.jpg",ref_id:"ba5b79b4-e2e7-4778-8879-df793b8420a4",twitter_handle:"orangepillapp"},{name:"@knutsvanholm",profile_picture:"https://pbs.twimg.com/profile_images/1586261395833774081/RQ8SYxiM_400x400.jpg",ref_id:"e12ebe66-706b-40d2-804a-861a4c79bbfa",twitter_handle:"knutsvanholm"},{name:"@bcvFoundation",profile_picture:"https://pbs.twimg.com/profile_images/1460813196902633476/edbNgO7y_400x400.jpg",ref_id:"d65bc3c3-cdd7-4539-8cb9-6a8d86f580c8",twitter_handle:"bcvFoundation"},{name:"Christopher",profile_picture:"https://pbs.twimg.com/profile_images/1345072452775370754/cBVFzpkV_400x400.jpg",ref_id:"7dacb545-925d-4201-9b9c-869d992dcdb3",twitter_handle:"Chrissuccess"}],hosts:[{name:"@steliosats",profile_picture:"https://pbs.twimg.com/profile_images/1495784740921786371/a73Qu4HR_400x400.jpg",ref_id:"7eed8e35-f762-4882-adf9-b45ad16c3c54",twitter_handle:"steliosats"},{name:"@geyserfund",profile_picture:"https://pbs.twimg.com/profile_images/1554429112978120706/yr1hXl6R_400x400.jpg",ref_id:"02a48cf4-58d0-4014-803c-9120dedeec52",twitter_handle:"geyserfund"},{name:"UKNOWN",profile_picture:"https://pbs.twimg.com/profile_images/930811252665933826/2cVZF58S_400x400.jpg",ref_id:"bcd18bb0-8224-4f6b-af71-e16120ae4323",twitter_handle:"NodedPodcast"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/c9bb5d58-c781-464d-878a-8b6c469ba198.jpg",keyword:!0,link:"https://stakwork-uploads.s3.amazonaws.com/uploads/customers/2707/media_to_local/885fe09b-bb21-49a5-8667-3c73ed36918f/196dc1e8-c7a4-4dc7-902f-d00107aefb42.mp3",node_type:"clip",pub_key:"0372cd0c8469f2034336a243e018d4d60e07efef8e7d10417807da1173bd5b002f",ref_id:"c80659ad-87eb-488c-be5d-00ac386a2b15",show_title:"Geyser 🌊",text:"Did you get the invite? I'd love to hear about what your features releases are up to. So Builders feature orangeville app. We have Lightning Piggybank, which is essentially an electronic cash piggy bank for children that accepts bitcoin sent over lightning. So this is a pretty small project, but it's a pretty sweet thing, actually. So let me add this to the it's pretty incredible, actually. I need to show you guys. I need to show you this. Imagine a piggy bank, but instead of an actual pig, it's like a cardboard box with a Geyser satoshi. Yes, we did. What's up, mate? I cannot do from the desk, though. You cannot talk? I'm not on desktop. Oh, no. You can't talk from desktop? No, it's got to be mobile. Yeah. It'S painful. Yeah, we got to talk to you. Yeah, exactly. But yeah, just to finish up this thought, there you have this really cool piggy bank which has this, like essentially this counter, this wallet counter of how many Satoshi the project has, which is really cool. And this person is just raising money connecting their Geyser project onto their Lightning Piggy Bank, which is fucking cool. I mean, this looks like a little DIY type of fun project that a father did for his son or something super cool. But let's go back to you, Matteo. Let's talk about orangeville app. Why not? What's up with you? Yeah, for sure. Orange. Bill app is a mobile app. We use Geolocation, which is the only approximate to connect you with nearby users, nearby pledge, and soon we'll let you find events. So meet up, conference, whatever. Actually, it could be anything because the user can create events straight from the App and then put the address. And then you'll be able to invite people there nearby to the event. So it doesn't have to be a meetup. It could be like a soccer game or picnic on the beach or anything. That's pretty cool. Hopefully it comes out January or February. Definitely February. And then we're going to launch the search feature, which will allow you to search for people all over the world. So if you're traveling and you're going to Ghana, you'll be able to look for clubs in the App there in Ghana. And then you can chat them up and say, hey, I'm coming to Ghana next week or next month or whatever, and I'd like to meet with you. I don't know anybody in Ghana. And of course, you can also search by gender for dating, age, profession. Right? We got to do yeah, I'm sure it's going to be like 95% guys, though. It's not can you confirm that? No, it's not. I don't have the number precisely because some users, they don't put a picture. And I know there's one woman that I talk to, obviously I talk to everybody on the app and you wouldn't know she's a woman, but it's a woman. But I think it's about 10% women and 90% men, which it looks it doesn't look good. But Tinder, which is the biggest dating app on planet, the ratio meant to women, it's 97% men, 3% women. No way. I know, it's crazy. Wow. But there's so much there's so many. Better than they are. Yeah, we're doing better than Tinder. Yeah. The point is that when you have, I don't know, hundreds of millions of user, it works even if you have one or 2%. But yeah. So with the search, you'll be able to search, obviously only if the other users have disclosed those information. So age, gender, profession, which is going to I think the profession looking for Profession is going to kickstart the Bitcoin secular economy, right? Because imagining you can look plumber in Oxford and then you can paint that because obviously if it's in the app, it's a bitcoin max. Right. So that's going to be very exciting. The Meetups is really the first iteration of the social movements, right? It's a social network that Bitcoin is creating that you are enabling through the IRL meetups. But that's really the first iteration. Well, the Meetup is every meet up is not necessary. You can search for plumber and connect with the guy or girl, whatever, and then it's like you found the plumber online instead of on the app. And, you know, he's already a player because he's on the app and he's paying to be in the app. So we filed through all that kind of stuff. So Profession, I think, is going to be a big game changer for Bitcoin ecosystem. And then location again, travel, or if you just move to a place or whatever, and then obviously user name. So if you want to connect with some specific plan. So the search yeah, it's going to be amazing. So when's the search coming out? I think we're launching the search on a limited version of Search. We can only search by username probably this week or next week. And then we're going to expand it like, we're going to expand it ideally in January. Right now we're focusing 100% on Android because obviously, especially in some part of the part of the world, most labs have an Android. And so we need to be on Android ASAP, which will come in January. But yeah, searches come in ASAP. I think January, February, like Q One, 2023, we're going to launch pretty much everything. And then after that, we're going to launch the Orange Pages. So Orange Pages, it's in the name, right? We have partnered with oh, nice. Yeah, we partnered with BTC Map, and they have all the merchants that accept bitcoin. We got the API, and so you'll be able to look grocery store or airstalls, whatever you need right through the app on a map. So one place to find all these people, all these merchants and businesses and friends and girlfriend and boyfriend and events and meets up. So it's one stop. For all on Top Shopify. All the Bitcoin connections in real life in the offline. Right. The goal is to foster as many in real life connection as possible because I think that's how you win the battle when we meet him in real life is 100 times more powerful than meeting sending a DM or an email or a zoom call, right? Yeah. Right. So where does Geyser come in here? You guys are launching a project, right? We are. So what's the idea? Like, what's the idea behind the project? Yeah, probably today, maybe tomorrow. We're going to launch the campaign on Geyser. If you get a membership, orange fill up is a membership based up. Why? Because first, we don't want to do advertising. Everybody hates advertising, I think, especially the clubs. Second, we don't want to do any tracking of data, any data monetization, any of that. Third, we don't want spammers and scammers and bots and people that they just don't care about Bitcoin. So the app is membership based. If you go through the app, unfortunately, you have to pay with Fiat because Apple doesn't let us take payment in SATS, but we also have membership in SATS that you can buy on our website, which is Theorangeprop.com. Actually, it's my domain. It's also bitcoin is social. Just put it yesterday and then on Geyser. Nice. Yeah, I know. It was available. That's amazing. $10 on Geyser. That's going to be worth millions ",timestamp:"00:19:42-00:29:28",topics:["Bitcoin Creator space"],type:"twitter_space",weight:33.67529732328345},{boost:0,date:null,description:"Problems with the beef industry in the United States",episode_title:"The Orange Sun 🌞 Let's talk #Bitcoin & Cattle Ranching/Sustainability",guests:[{name:"Texas Slim",profile_picture:"https://pbs.twimg.com/profile_images/1589784780970795011/02jf0fqp_400x400.jpg",ref_id:"b4448c8e-9238-4aba-bd25-efb329ea5a72",twitter_handle:"modernTman"},{name:"Lucas",profile_picture:"https://pbs.twimg.com/profile_images/1596345084966014976/maviSGq3_400x400.jpg",ref_id:"e3adb591-b29f-435b-bd34-210f2dbcedaa",twitter_handle:"impossiblyso"},{name:"Firebust",profile_picture:"https://pbs.twimg.com/profile_images/1517827165198458880/N79Wpx85_400x400.jpg",ref_id:"0fb6c7f3-a673-4fe5-9599-8165800a2ff0",twitter_handle:"FireBursts"},{name:"Hamza Yusuf",profile_picture:"https://pbs.twimg.com/profile_images/1318064165030940672/sakbSOvT_400x400.jpg",ref_id:"03a74669-b653-4c57-8799-a312cb041089",twitter_handle:"Hamzayu28849293"},{name:"Adenekan's Father",profile_picture:"https://pbs.twimg.com/profile_images/1505572078023495683/Wo_pJvTU_400x400.jpg",ref_id:"b8259997-2ef0-4e6e-8d58-a69b5eda550a",twitter_handle:"AdenekanFatai4"},{name:"Adenekan",profile_picture:"https://pbs.twimg.com/profile_images/1505572078023495683/Wo_pJvTU_400x400.jpg",ref_id:"ca6a563e-0e84-4811-be82-a3b3cd12d399",twitter_handle:"AdenekanFatai4"},{name:"Heritage",profile_picture:"https://pbs.twimg.com/profile_images/1510397558652350469/jYOl00tU_400x400.jpg",ref_id:"98a6d9df-3c39-49ec-8a39-074e61af4ece",twitter_handle:"herrytheeagle"},{name:"Enoch",profile_picture:"https://pbs.twimg.com/profile_images/1596235105663533056/5mRUbLm3_400x400.jpg",ref_id:"4f8af040-3d0c-49c1-806e-aef89d8693fb",twitter_handle:"KazEnoch"}],hosts:[{name:"Jeremy Garcia",profile_picture:"https://pbs.twimg.com/profile_images/1589056396816896001/dslbBQSX_400x400.jpg",ref_id:"e5e68f75-d71a-4477-ae9a-6a891f2d84d0",twitter_handle:"Jerimican5445"},{name:"Oluwasegun Kosemani",profile_picture:"https://pbs.twimg.com/profile_images/1538403135101800450/sO-RPI9U_400x400.jpg",ref_id:"25ce4b90-6689-4dd9-84b6-240c7bcbe407",twitter_handle:"MrlamilamiKosch"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/9b2e17f2-71c5-4f1e-a3e7-720d06dab810.jpg",keyword:!0,link:"https://stakwork-uploads.s3.amazonaws.com/uploads/customers/2707/media_to_local/a91f79fd-d85f-4440-b012-4bdafdc83341/f1d1c5b5-b8c9-44ed-a217-f75b398376d5.mp3",node_type:"clip",pub_key:"02574d6e8e787372184b6f17c40d6c6fe1777db9015801f95dfd24692784d767cd",ref_id:"d8a44c3b-6219-49d5-9a35-4b2ca5972d7c",show_title:"Satoshi’s Journal",text:"at this time I wanted to get the perspective of Texas Lim and Dennekin and Hansa, I'm sorry if I'm mispronouncing your name, but Texas Limb, could you just briefly tell us what the problem is with the beef industry in the United States relative to the commercialization thereof? And then I also want to just hear the same thing from Adenikan to see if they have similar problems as we do here in the US. Please go ahead there. Texas Lim. Yeah, you brought up earlier basically the multinational processors in the United States and whenever we say processors, okay, that's the same as, you know, in Nigeria then using the butcher. So let's make sure everybody has that perspective and understanding. We have processors and butchers are basically the same thing. They're the ones that harvest the animal, they're the ones that cut the animal up and in the United States they also control the distribution. What has happened in the United States throughout the my lifetime. Basically. I'll use Texas as an example. We had a processor butcher in every county across the state of Texas. That was 254 butcher processors. They were called microprocessing centers. They're called abortoires butchers, whatever you want to say, but they're the ones that harvest the animal. Well, in my lifetime now, those 254 processing centers are no more. And what we have is for multinational processing, basically corporations, they're not basically housed in the United States. Three of them are from Brazil, South America. And what they do is they control the butchering, the processing of the cows. They also control the distribution. The distribution is a global market in which United States consumers do not have access to. The beef has grown in the United States, the beef is harvested. In the United States, the beef is shipped overseas to the highest bidder. This happens across many different countries. In Australia, they're up against the same thing. A lot of their beef is shipped across seas to the highest bidder. Same thing in Africa. Africa's beef is not basically being consumed by the African people in a way. Or basically the distribution is not controlled by the butcher processors. I'm not for sure exactly on the same level, and it can speak to that. But in the United States, we've always said that we have to feed the world. Well, we never did feed the world. What we did was we created distribution centers across the world to a lot of the highest bidders. And what we did in the United States is we quit feeding our communities. We took the most powerful food sources and we shipped them overseas to where the American people are suffering. And one of the biggest bottlenecks to our basically beef in the United States are these multiprocessing centers, the multinationals JBS Cargill, national and Tyson. And so they have a lot of poll across the globe. Nigerian beef is also sold on that same global brokerage market, same as Australia, same as South America, same as so many small countries that basically do not have access to sound money. And basically all of that energy is stolen and shipped to the highest bidders. Eliminating any form of distribution to local communities. That is what we have to get back to. That's what the Beef Initiative is accomplishing right now. We're building out nodes across the United States where we're back to feeding our communities first, and then we distribute across the nation. And we do it by ourselves. We do not have to have permission from the multinational processing centers. We have our opening up our own processing centers. And therefore we control the distribution. And that's kind of a good long and short of it as far as what we are up against. As I say, the biggest threat to the American rancher at this time is the multinational processing centers, which takes away basically the power to steward the animal to its right age and age and weight and basically how they do that is they do not give access to processing centers in a timely manner. And a lot of times you will have to basically schedule kill dates within the cattle industry in the United States a year and basically 18 months out. That is hard to do as a rancher in the United States, because you quit being a rancher and what you become is basically a babysitter of that cow all the way until it's going to be harvested and the money is made by the distribution in the processor, not the cattle rancher. Whenever you do not have access to that processing center, you lose out probably two thirds of what your margins could be in the United States. And therefore, if you have access to a decentralized processing center, as you do through the beef initiative, let's say you sell a cow, if you're having to use one of the multinational processings, you'll make maybe $400 profit off that cow. If you're able to take that cow all the way to the consumer themselves, in which the beef initiative gives people market access to be able to do that, $400 basically turns into anything between probably 25 and $3,500 margin. So you can understand how much control of the margins profits that the distribution, the multinationals have taken away from the American rancher. I have to say that it's probably the same in a lot of similarities across the globe, because if you control the butchery, the processing, you control the cow in a way that has been taken away from the rancher. And I think that's amazing, the parallel, because the fact that money has been controlled since the advent of money by central authorities so as to have power over the people, it's the same thing. Cattle industry and in farming is the powers that be. If they can control the land and they can basically monopolize the farming and ranching, then they can control the people to a certain extent. That's the reason why we have to get onto a decentralized money and onto decentralized farming. And that's essentially what the beef initiative ",timestamp:"00:53:50-01:00:33",topics:["Beef processing centers","Beef distribution","butchering"],type:"twitter_space",weight:13.423835754394531},{boost:0,date:null,description:"Changing the narrative about Stackchain and Bitcoin",episode_title:"Café ₿: Sovereign Computing w/ Matt & Aiden, Start9",guests:[{name:"Andrew",profile_picture:"https://pbs.twimg.com/profile_images/1465763053014859786/xYFN2czJ_400x400.jpg",ref_id:"ae4b13f8-0ee7-480a-b47a-82b967ad7a79",twitter_handle:"AP_ArchPublic"},{name:"Matt Hill",profile_picture:"https://pbs.twimg.com/profile_images/1347317316057321474/ieMjzK3x_400x400.jpg",ref_id:"3576ad28-a04d-4388-865b-3ec5114c4f9f",twitter_handle:"_MattHill_"},{name:"Lauren",profile_picture:"https://pbs.twimg.com/profile_images/1586022214901501952/U1dRyCxP_400x400.jpg",ref_id:"7f14bbf5-a60b-496b-a361-3663cf120299",twitter_handle:"LaurenJauregui"},{name:"Aiden McClelland",profile_picture:"https://pbs.twimg.com/profile_images/1470160097225498624/0BjKB_2W_400x400.jpg",ref_id:"04ddd9d4-9329-4e6c-aaa3-d65ea4a9342a",twitter_handle:"_dr_bonez"},{name:"Peter",profile_picture:"https://pbs.twimg.com/profile_images/1581695667193643009/EljNY-TH_400x400.jpg",ref_id:"a3384925-e15e-421d-b9f9-6d44e273ed05",twitter_handle:"PeterAnsel9"},{name:"Lisa",profile_picture:"https://pbs.twimg.com/profile_images/1541581547815436288/Li8wORWt_400x400.jpg",ref_id:"e6f0c6e3-3237-4b13-878f-bb740cd32f8d",twitter_handle:"lisa_hough_"},{name:"Isabelle",profile_picture:"https://pbs.twimg.com/profile_images/1466874333410717698/WRQh2-_m_400x400.jpg",ref_id:"c8df253f-47b3-465e-878e-8405c01c090d",twitter_handle:"isabelfoxenduke"},{name:"Tone",profile_picture:"https://pbs.twimg.com/profile_images/1416821178266787844/T1OkI9ZW_400x400.jpg",ref_id:"5729ac07-51d6-4268-b585-62680c846acb",twitter_handle:"ToneVays"}],hosts:[{name:"Alex Stanczyk",profile_picture:"https://pbs.twimg.com/profile_images/1539055022364708864/rwErK6x1_400x400.jpg",ref_id:"3126e2a3-bbe4-456b-b298-9714085fa286",twitter_handle:"alexstanczyk"},{name:"Derek",profile_picture:"https://pbs.twimg.com/profile_images/1598322677827207169/Cw0A3oOP_400x400.jpg",ref_id:"f441b996-7eeb-4210-b24c-fa011161709d",twitter_handle:"derekmross"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/239722cb-4216-414a-a17b-5adf9d52e15a.jpg",keyword:!0,link:"https://stakwork-uploads.s3.amazonaws.com/uploads/customers/2707/media_to_local/0ec4a941-250c-4e1d-8d2a-6c506c3ba4b2/4bd8010d-b2fd-41b4-8041-8a953ef06492.mp3",node_type:"clip",pub_key:"02574d6e8e787372184b6f17c40d6c6fe1777db9015801f95dfd24692784d767cd",ref_id:"d72f67b3-c42f-43cf-8e01-47065fe8e638",show_title:"Swan.com",text:"Good morning. Good morning. Alex is getting him up here, but what's up, Derek? What's up, Hand? Good morning, sir. Morning. I've seen you down on the trenches, Derek, defending the stock chain. Oh, absolutely. There's a lot of defending going on last evening. It was fun though. We made progress. He seems to be changing his stance. Yeah, it was great. It was actually one of our best shows we've done in a while. Tell us a little bit about it. Well, yesterday during Cafe Bitcoin, brad Mills had tweeted out that Stack Chain was a shit coin and then proceeded to run with that narrative throughout the day and different polls and post comments. Whatnot? Peter and Greg Foss and others called him out during the show. But throughout the day he continued to talk about Stack Chain in that way. We thought that it was kind of a lack of information available, right? And we had hoped that once he saw what Stack Chain was, our community project, what it was all about, what we were doing, that he would change his tune. So we invited him to our evening spaces and for 2 hours we talked Stack Chain about basically all of our accomplishments and different things that we've done over the past four months. And he changed his tune. He is not sure about our massive Twitter thread, the actual Stack Chain itself, but he understands and understood every other aspect of our community from lightning nodes to support, to donations across the world, to bitcoin communities, to having fun and stacking stats. It's an interesting progression. What did he not get about the long Twitter thread? He took back his initial statement too because he was talking a lot of crap yesterday. I mean, he got a first hand experience of that Stack Chain energy all day. He was basically calling everyone in Stock Chain shit coin and calling Stack Chain a shit coin and so doing like polls and all kinds of stuff. And so Stack Chainers weren't too happy about that. I'll tell you what though, him talking about it was great for Stack Chain because it spread awareness that a lot of his followers had no clue what Stack Chain was. We had new Stackers come in last night and do stack joins and get new blocks. So. Hey, fudd is great for stack chain. Apparently it spreads awareness. It's like bitcoin. It's funny, it's like the ECB, the more they shit talk bitcoin, the more relevant bitcoin becomes. Absolutely. They don't even talking about bitcoin. What's that like? Yeah, like they're huge. Bitcoin is so small, what are they. Even doing talking about bitcoin? No, that's the point though, if they are talking about it, that means it is relevant regardless of whether they're trying. You see what I'm saying? Oh, I see. All right, I'll be right back, I'm going to grab my coffee. Do what you want. I am pretty surprised that he stayed in there for the whole two and a half hours and just kind of listened to what everyone had to say. I thought that was actually pretty decent of him. Absolutely. Especially in the beginning he was getting attacked a little bit, everyone's defensive of our community, so I think that he had a fixed skin and he stayed around and he learned his final conclusion was basically like oh, Stack Chain similar to the community that I have over on Clubhouse. I was like, well yeah, we're literally just friends buying bitcoin together and having fucking fun. He compared it to the original Pleb movement, which I wasn't really understanding that comparison, but it was an interesting conversation for sure. That poll that he did was pretty funny. Most people are like what is Stock chain, right? And then Lauren's response in that thread was the absolute best. She did another poll. How many of these people voting are shitcoiners or followers or shit winners? Really funny. Yeah, I wasn't triggered at all. Alex. Mowing bare action coming in. No talking about bitcoin at Thanksgiving. Marin yeah. Alex my mom sent me another text yesterday. I don't know what her vendetta is about bitcoin, but I can't talk about it at Thanksgiving now. I have online friends that are bitcoiners that she's coming at and text messages. We added my mom, just as a joke to one of the stack chain, like, back end chats. And it's really funny. She has no idea what's going on in there, so now she has a lot to say about that. So one of two things is either is going to happen, it's either slowly going to sink in that she's maybe a little off base, or she's going to double. Triple down. Yeah, she's tripling down right now. Oh, that's too funny. That's an interesting phenomenon. That was well documented, I thought, in that article was talking about the other day. What was it called? Why people struggle with bitcoin by Nick Beard. You guys should go check that out. I thought it was really well written talks about people who just can't, for whatever reason, they just can't. They tend to double down. Down, triple. I have yet to see somebody who's tripled down, so to speak, come around. Have you guys seen examples of that? A triple down person would be somebody like a Rubini or a chef or a monger or you guys understand what I'm saying? They go from, yeah, I don't think this thing is a thing to just full on attacking it's immoral. It's going to destroy society in the environment, et cetera. Those people are married to their beliefs, and you're not going to change them at least anytime in the near future. So that's like an ideologue, right? It doesn't matter what the facts are. They're going to believe what they're going to believe. And a lot of that, I think, is tied to their survival in some ways. Back to that saying you can't convince somebody of anything if it directly contradicts what they use to make a living or whatever. ",timestamp:"00:04:20-00:11:57",topics:["Stackchain"],type:"twitter_space",weight:13.423835754394531},{boost:0,date:1670706053,description:"Stacks is trying to reinvent the wheel - Bitcoin Maxi",episode_title:"Bear Market Buidl — Major #Bitcoin developments! #Stacks #Sidechains",guests:[{name:"@GriffdenNFT",profile_picture:"https://pbs.twimg.com/profile_images/1604377729062895617/R4pSEdH4_400x400.png",ref_id:"dafdf7ec-28c0-43d3-a0d9-b2d266f38738",twitter_handle:"GriffdenNFT"},{name:"@Chad_333",profile_picture:"https://pbs.twimg.com/profile_images/1592310541732970496/o1tbw9Eo_400x400.jpg",ref_id:"484c7695-6a4e-4141-9585-1109bf23f8cf",twitter_handle:"Chad_333"},{name:"@jackbinswitch",profile_picture:"https://pbs.twimg.com/profile_images/1601214177439260672/O0SpU5B1_400x400.jpg",ref_id:"9685e7f3-3e0c-4b84-9fd9-b8a1d96f6ae9",twitter_handle:"jackbinswitch"},{name:"@jimdotbtc",profile_picture:"https://pbs.twimg.com/profile_images/1593210347825119237/L_SNThWQ_400x400.png",ref_id:"5dcf5545-fad6-44ee-ae56-360c5efe1151",twitter_handle:"jimdotbtc"}],hosts:[{name:"@BigRpic",profile_picture:"https://pbs.twimg.com/profile_images/1604962150388219904/WqiCye-r_400x400.jpg",ref_id:"726f0c95-9d94-4d44-a056-8ad3c9e3ddd5",twitter_handle:"BigRpic"},{name:"@CarlsonDoc",profile_picture:"https://pbs.twimg.com/profile_images/1597382056308350977/1NPexynZ_400x400.png",ref_id:"e34fa2b2-a58e-4461-81a0-d10c1058dfc2",twitter_handle:"CarlsonDoc"},{name:"@STXLDN",profile_picture:"https://pbs.twimg.com/profile_images/1533793338931007488/o3laQDCp_400x400.jpg",ref_id:"5c3bc906-3aed-44f9-851a-94804c6fe5ca",twitter_handle:"STXLDN"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/99046513-2614-4eae-9de4-5781ba4b330a.jpg",keyword:!0,link:"https://stakwork-uploads.s3.amazonaws.com/uploads/customers/2707/media_to_local/fc3bebcb-8271-433e-8d81-84dd06f3b022/aec527bc-539d-4d3b-9bad-db4af9e1a1ba.mp3",node_type:"clip",pub_key:"03c7a7f42d94fdfc7a655515c1421cd1d20db090a1c24150201de0b1dc6a30b0ee",ref_id:"3cced3da-246a-4df7-884c-689661de7d66",show_title:"STX:LDN",text:"conversation in one Twitter spaces where somebody had actually said something about I think their analogy was like, oh, so Stacks is trying to reinvent the wheel and you don't need to reinvent the wheel. Everyone's heard that argument comes from the max before. I mean, I think people repeat what they hear and it's like, ultimately I'm a bitcoin Maxi. What really shocked me when I got to the Bitcoin conference was that it's like, oh, I'm like out. I like, really helped back in 2013, I think 2012, actually, dash and I went to our first bitcoin. I've got a photo on Facebook. We went to a Bitcoin London conference because we'd made our minds that we were going to get this ATM. It took quite a long time to kind of sort it out, but yeah, I think with 2012, we went to the Bitcoin conference and it was just such a small space and then to walk in. I'd never been to the Bitcoin conference in Miami before. I was really lucky enough to get invited by the Stack conference to go and talk. So while I was there, I thought, well, I'll buy a ticket for the Bitcoin conference. It was like $1,000 or something, and I was out of there within an hour. And I was quite depressed because I was like, I'm not part of that gang. And I felt like walking in there being like, hey, look, we've come. And actually it was like, oh, I'm kind of out. And I do think that there's there's just forces at work here, unfortunately, which are kind of corporate forces, which are setting the tone and just slowing things down. But, you know, I know we're all impatient, but ultimately time will tell. And I'm sure that the open source, decentralized nature of Stacks means it will be an unstoppable juggernaut, just as Bitcoin was. But there's literally people trying to slow it down, trying to play the advantage while we're small to keep us silent. And part of that is kind of brainwashing people. There are several things at work, and it's cool that you brought it up, Jim. The first thing is, we're the early adopters. We're the earliest adopters of early adopters on a macro time frame. If you look at how long, if you look at the scope of what's actually happening here, this is a move to it. Like, we talk about the industrial age, you talk about the Bronze Age, you talk about the no, we're at an epoch of time in human history with this information age or whatever you want to call it. And as we are right now, if you were looking at a chart, we're just barely making ripples in this macro time frame. What we do now is going to reverberate for several generations after us. And the thing is, when you were talking about one of the things that Stacks has to address is everybody knows what Bitcoin is. But then the second you hear anything else and you see the three letters, whether it's sol or STX or whatever it is, stacks just gets put in that category of, oh, that's just another coin to address that. You have to assume the audience has a basic understanding of crypto, has a basic understanding of why crypto matters, has all of these different things. So a lot of I think what we're fighting against right now are headwinds that won't exist in 20 years. Getting rid of the crypto element, that's the way it gets important, is once people don't even associate the word crypto with what they're doing. And one of the things that I'm working on, hopefully for next year is we've got a comedy festival in Brighton, and we're working with experts to see if we can come up with an entire ticketing solution in time. This is I think it's in February 2024. And so if we can come up with an X verse wallet that holds a ticket and a kind of process for the stewards, reading those tickets and letting people into the venue. We can onboard 20,000 people. That's a long weekend. It's a Thursday to a Sunday and we have three large venues. We get about 20 to 25,000 people through in those four days and they will all have an expert wallet. That's what we're trying. That's what I'm hoping for. Luckily, my wife is the producer of the festival, so she's witnessed a decade of me going through this stuff. So she's trusting me that I can kind of say, I think I can pull this off now. I've spoken about it for years, obviously since 2015. Like we were talking about, Alice is like, yeah, Straightaway is going right, this is going to replace all tickets. Do it now. Within two weeks, we'll just be all on the blockchain. But here we are several years later. But now it's actually a possibility with stacks and with experts. We had to have mobile. That was the frustration a year ago. We were like, yeah, this is ideal. We were even trying to do a fat boy slim gig where I was asking for guest list for it, which is a big live show he was doing. But I was like, Give me some guest list. I will stand at the gate with my laptop and figure out how to get people through. You don't worry about that. I'll make sure the right people get in because I was just like, let's just at least do something because we can do this. But now that they're on mobile, hopefully we've got a year or more than a year to kind of pull together a solution where suddenly we get 20,000 tickets into people's walls. And what some people don't sometimes appreciate is that the whole beauty of crypto with this pseudonymous network is that a payment network is a communication network. They're the same thing. And so the minute you've got tickets in someone's wallet, well, you can now communicate with them. You've got like a reach to them. You don't know they've not given you any information. You don't know who they are. But you've got a communication channel. So now they've got a ticket. You can now say, okay, well, now your ticket. Maybe we can maybe if we've got time to get there, it's like, now your ticket can be staked after the event. The ticket is an NFT and now you can stake your ticket and that's earning you money off your next year's tickets. And these are all non crypto people. And that, I think, is, I guess, our key because ultimately that's all I found within crypto is just walls. It's amazing to have these bridges. It's amazing that this stuff is going on, but it's still just a real battle. And actually what's going to really change things is when we can get those applications out there that are onboarding masses of non crypto people who just have a phone, and now they have an app on their phone and that app is connected to Stacks, and they don't even need to know about the connection to Stacks. They just have an app on their phone that holds their tickets and gets promotions out to them and they just show it to someone. When they turn up at a venue, it gives them a QR code in the when we get there, I think that's when we can really onboard the message. ",timestamp:"00:48:55-00:55:58",topics:["Bitcoin Maxi"],type:"twitter_space",weight:24.555915094150443},{boost:0,date:1672099200,description:"Controversies about energy sources in the world",episode_title:"Blockware Intelligence Podcast: 2022 Highlights",guests:[{name:"Michael",profile_picture:"https://pbs.twimg.com/profile_images/1558687629599657990/vf-bU14b_400x400.jpg",ref_id:"c7b4faa1-db77-4459-b03f-0e41e15efae7",twitter_handle:"MichaelHawaii"},{name:"Cory Klippsten",profile_picture:"https://pbs.twimg.com/profile_images/1569687200857755648/fxiCeaqc_400x400.jpg",ref_id:"ddfb9b4c-4e6a-4f4c-a01b-e6bb1bc55464",twitter_handle:"coryklippsten"},{name:"Joe Consorti",profile_picture:"https://pbs.twimg.com/profile_images/1596902707511664640/GYGWVDts_400x400.jpg",ref_id:"8d2024b2-03bb-454d-9bd6-bb121904b76a",twitter_handle:"JoeConsorti"},{name:"Jeff Booth",profile_picture:"https://pbs.twimg.com/profile_images/1362957991410954241/spiaMAg2_400x400.jpg",ref_id:"f1143bcc-9ab9-4716-8259-0e5b026f8039",twitter_handle:"JeffBooth"},{name:"James Lavish",profile_picture:"https://pbs.twimg.com/profile_images/1466279082157502464/flD6cWI3_400x400.jpg",ref_id:"cf06ab2d-2ff3-4d7b-bef6-b996ae68517a",twitter_handle:"jameslavish"},{name:"Adam O",profile_picture:"https://pbs.twimg.com/profile_images/1395896857990160391/tJpgS2_p_400x400.jpg",ref_id:"95af0dd3-1e27-41b9-a36b-8a2c44438e85",twitter_handle:"denverbitcoin"},{name:"Jack Mallers",profile_picture:"https://pbs.twimg.com/profile_images/1599778945699909632/O0qc9ykA_400x400.jpg",ref_id:"d2e4aac5-e5e1-42fc-8f08-b3a77c076a64",twitter_handle:"jackmallers"},{name:"Lyn Alden",profile_picture:"https://pbs.twimg.com/profile_images/1521181379677073414/bm4LcJTr_400x400.jpg",ref_id:"903381dd-4b8a-4b59-8ecd-3281ae3ba297",twitter_handle:"LynAldenContact"},{name:"Dylan LeClair",profile_picture:"https://pbs.twimg.com/profile_images/1508157904913899522/3l7ctauV_400x400.jpg",ref_id:"283edea0-55cf-4245-95df-8d6d3dcb1851",twitter_handle:"DylanLeClair_"},{name:"Jeff Ross",profile_picture:"https://pbs.twimg.com/profile_images/1475554600094552064/DSlPG1lx_400x400.jpg",ref_id:"ae6ee2a2-1cf7-41a0-8366-ff6e94a6403c",twitter_handle:"VailshireCap"},{name:"Stacy Herbert",profile_picture:"https://pbs.twimg.com/profile_images/1546484196750905346/5WYPz-bc_400x400.jpg",ref_id:"7477463b-1f3a-4b83-94c3-9d5a63b576c0",twitter_handle:"Stacyherbert"},{name:"Greg Foss",profile_picture:"https://pbs.twimg.com/profile_images/1552599670945464320/3OgqRHNo_400x400.jpg",ref_id:"853d9f80-f6cf-490f-9d1e-f29cdc6acc6f",twitter_handle:"FossGregfoss"},{name:"Preston Pysh",profile_picture:"https://pbs.twimg.com/profile_images/1408783276081299462/f4Ye5n7-_400x400.jpg",ref_id:"01ad2c81-2d0c-44a9-93a1-42c07287aa80",twitter_handle:"PrestonPysh"}],hosts:[{name:"Blockware Intelligence",profile_picture:"https://pbs.twimg.com/profile_images/953108582110781441/irB2GVXn_400x400.jpg",ref_id:"0ff00f04-2450-4699-b6a3-0467e29cddde",twitter_handle:"BlockwareTeam"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/ea2cf2ae-76de-4185-818c-384b3b06228b.jpg",keyword:!0,link:"https://www.youtube.com/watch?v=WxGMeufy8jw",node_type:"clip",pub_key:"02574d6e8e787372184b6f17c40d6c6fe1777db9015801f95dfd24692784d767cd",ref_id:"144eff69-fd7a-48da-b92f-bb5b13e0b4f7",show_title:"Blockware Intelligence",text:"a mismatch between perceptions and reality about where some of the technology is in terms of different energy sources, right? So something, you know, like three quarters of global energy comes from hydrocarbons and then the rest, you know, hydro and nuclear are big chunks, and only something like 5% is wind and solar. But as wind and solar have kind of been pushed to be larger and larger parts of the grid, and there are certainly applications where they're useful, there's very hot and dry regions of the world. Rooftop solar can give you kind of more autonomy from the local grid if you have, say, rooftop solar and a battery backup, for example. But as they've kind of put policies ahead of technology and you kind of like obfuscate the cost, overstate the strengths and get that into the grid, it's kind of caused some issues. There's also a challenge where there's not a lot of investment in the grid itself, right? So, for example, California keeps having their electrical grid parts, electrical grid, face rolling. Brownouts you can imagine if you were to say ten x the number of electrical vehicles that are drawing power from that grid instead of through the gasoline distribution system we have. If that starts going over the grid, that's more stress on the grid. You need more copper, you need more redundancy, you need more cables bringing that around. And so I think the short term way out of this is frankly, there needs to be more supply of hydrocarbons, natural gas, oil and coal because that's what the world is currently short of, especially in certain locations. Longer term, I'd like to see a nuclear renaissance. Combination of smaller reactors and a better regulatory environment could really make nuclear come back. I mean, decades ago, it was actually pretty cheap and quick to build a nuclear plant, as there have been a handful of accidents, which even if you add up all those accidents, even if you take the worst case, scenario of not just immediate death, which is very few, but if you kind of take the high end estimates for environmental damage and what that could have caused kind of in the region, it's like it killed fewer people than coal kills, like every year, for example, through particulates in the air. But nuclear got that kind of increasing regulatory burden and that now makes it almost impossible in many places in the world to build a new nuclear facility. And of course, you want safe operations. So, for example, part of why Chernobyl was so bad is they didn't even have the shield. That now is standard practice among the nuclear facilities. Obviously, there's really bad ways to build a nuclear facility, but the modern ways and back then, even the responsible ways can build safe nuclear. And so I'd like to see that combination of they've developed small modular reactors that's been a bit like a push lately. And if there were kind of easing regulatory environment, I think that nuclear can at least solve a lot of the baseload grid power. And then longer term there's interesting things like ocean thermal energy that I think is under explored. There are other ways to get baseload power, but the general thing you need is that you need to have nature do as much of the storage and concentration as possible because the more that you have to replicate with machines, the less efficient and energy dense that's going to be. And so I think that's the big theme that a lot of people are missing in the energy space. ",timestamp:"00:49:04-00:52:35",topics:["energy sources"],type:"youtube",weight:37.306806397580786},{boost:0,date:1672099200,description:"Institutional adoption lowering Bitcoin's volatility",episode_title:"Blockware Intelligence Podcast: 2022 Highlights",guests:[{name:"Michael",profile_picture:"https://pbs.twimg.com/profile_images/1558687629599657990/vf-bU14b_400x400.jpg",ref_id:"c7b4faa1-db77-4459-b03f-0e41e15efae7",twitter_handle:"MichaelHawaii"},{name:"Cory Klippsten",profile_picture:"https://pbs.twimg.com/profile_images/1569687200857755648/fxiCeaqc_400x400.jpg",ref_id:"ddfb9b4c-4e6a-4f4c-a01b-e6bb1bc55464",twitter_handle:"coryklippsten"},{name:"Joe Consorti",profile_picture:"https://pbs.twimg.com/profile_images/1596902707511664640/GYGWVDts_400x400.jpg",ref_id:"8d2024b2-03bb-454d-9bd6-bb121904b76a",twitter_handle:"JoeConsorti"},{name:"Jeff Booth",profile_picture:"https://pbs.twimg.com/profile_images/1362957991410954241/spiaMAg2_400x400.jpg",ref_id:"f1143bcc-9ab9-4716-8259-0e5b026f8039",twitter_handle:"JeffBooth"},{name:"James Lavish",profile_picture:"https://pbs.twimg.com/profile_images/1466279082157502464/flD6cWI3_400x400.jpg",ref_id:"cf06ab2d-2ff3-4d7b-bef6-b996ae68517a",twitter_handle:"jameslavish"},{name:"Adam O",profile_picture:"https://pbs.twimg.com/profile_images/1395896857990160391/tJpgS2_p_400x400.jpg",ref_id:"95af0dd3-1e27-41b9-a36b-8a2c44438e85",twitter_handle:"denverbitcoin"},{name:"Jack Mallers",profile_picture:"https://pbs.twimg.com/profile_images/1599778945699909632/O0qc9ykA_400x400.jpg",ref_id:"d2e4aac5-e5e1-42fc-8f08-b3a77c076a64",twitter_handle:"jackmallers"},{name:"Lyn Alden",profile_picture:"https://pbs.twimg.com/profile_images/1521181379677073414/bm4LcJTr_400x400.jpg",ref_id:"903381dd-4b8a-4b59-8ecd-3281ae3ba297",twitter_handle:"LynAldenContact"},{name:"Dylan LeClair",profile_picture:"https://pbs.twimg.com/profile_images/1508157904913899522/3l7ctauV_400x400.jpg",ref_id:"283edea0-55cf-4245-95df-8d6d3dcb1851",twitter_handle:"DylanLeClair_"},{name:"Jeff Ross",profile_picture:"https://pbs.twimg.com/profile_images/1475554600094552064/DSlPG1lx_400x400.jpg",ref_id:"ae6ee2a2-1cf7-41a0-8366-ff6e94a6403c",twitter_handle:"VailshireCap"},{name:"Stacy Herbert",profile_picture:"https://pbs.twimg.com/profile_images/1546484196750905346/5WYPz-bc_400x400.jpg",ref_id:"7477463b-1f3a-4b83-94c3-9d5a63b576c0",twitter_handle:"Stacyherbert"},{name:"Greg Foss",profile_picture:"https://pbs.twimg.com/profile_images/1552599670945464320/3OgqRHNo_400x400.jpg",ref_id:"853d9f80-f6cf-490f-9d1e-f29cdc6acc6f",twitter_handle:"FossGregfoss"},{name:"Preston Pysh",profile_picture:"https://pbs.twimg.com/profile_images/1408783276081299462/f4Ye5n7-_400x400.jpg",ref_id:"01ad2c81-2d0c-44a9-93a1-42c07287aa80",twitter_handle:"PrestonPysh"}],hosts:[{name:"Blockware Intelligence",profile_picture:"https://pbs.twimg.com/profile_images/953108582110781441/irB2GVXn_400x400.jpg",ref_id:"0ff00f04-2450-4699-b6a3-0467e29cddde",twitter_handle:"BlockwareTeam"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/ea2cf2ae-76de-4185-818c-384b3b06228b.jpg",keyword:!0,link:"https://www.youtube.com/watch?v=WxGMeufy8jw",node_type:"clip",pub_key:"02574d6e8e787372184b6f17c40d6c6fe1777db9015801f95dfd24692784d767cd",ref_id:"9f9305dd-fff2-4bb3-9e3f-698a55090999",show_title:"Blockware Intelligence",text:"Look, the people who are interested in this space, in the institutions, they're from the technology side. They look at this as technology. The technology analysts are the ones who are the ones who are analyzing it, the ones who understand cryptography and cryptocurrency implications and how it all fits into the space. But once that kind of bleeds over and really moves into the financial world and people start looking at this as digital money, I think that's where it starts to differentiate itself. But the big break will be when people understand that it's a store of value. Now, how do we get there? Right? So the question is, what is it going to take for bitcoin to be, in particular, to be seen as a store of value? And I think it's going to take the asset to have enough market value and liquidity that the volatility dampens and it's going to happen in steps, right? So it's going to take a few very large institutional investors to start buying Bitcoin, right, and not just buying it, but then also announcing that they bought it, right? So you've got what, you've got five firms, we talked about this before, we got five firms that control $30 trillion of investment assets in the world. So if you figure that there's about $700 trillion in total investment assets, $730,000,000,000,000 in investment assets, that's a lot. 30 trillion out of 700, $720. But five of those firms, you got BlackRock, Vanguard, Fidelity, State Street and Morgan Stanley. And if any of those firms start announcing that they've really taken this and considered a separate asset and we know that, we talked about Fidelity, we know that they're doing something. BlackRock, of course, is doing something. But when Vanguard comes out, when Morgan Stanley comes out and says, we are putting this in our portfolios, that's going to be a big deal. And once they do that and they start buying it, then you're going to get a lot of other investment managers that feel like they've got to do this. So it. Takes time, but we'll come back to that in a second. But once they start buying this and they decide they want to have a 1% position in this, well then bitcoin 1% position in all assets, right? So if you look at all portfolios across all asset classes, between bonds, investment bonds, corporate bonds, sovereign bonds, you've got stocks, you've got real estate, you've got art and collectibles, and you've got gold and silver and metals. But if you put all of that in a basket in one big portfolio and you say that 1% of that has to be the separate asset class, well then you're already at $350,000,000 bitcoin. $350,000 bitcoin. Sorry, don't want to get it right. Too excited. But $350,000 bitcoin. Okay. Now you're talking about a $7 trillion asset, right? You get that up to 2% and you're talking about over a $10 trillion, $14 trillion asset. Now you, now you really do have the ability to put money in this and not see that same volatility. It's just not going to move the same way as it does here as such a small asset. I mean, we're not even half a trillion dollars anymore. But once you have that, then I think that it takes off. And I don't know where that breaking point is, but it's somewhere before that store value recognition that it just becomes completely uncorrelated. So maybe somewhere between 100 and $200,000 bitcoin where it just, it rips up and it just complete completely decorates to the rest of the market. ",timestamp:"00:27:01-00:31:15",topics:["Institutional Bitcoin adoption","Bitcoin volatility","bitcoin"],type:"youtube",weight:37.30680637726857},{boost:0,date:null,description:"Discussion on how do you sell the value proposition of Bitcoin to small investors circa late 2022",episode_title:"TOXIC HAPPY HOUR! #Bitcoin is Easy Like Sunday Morning! 🍻😂",guests:[{name:" 2140data",profile_picture:"https://pbs.twimg.com/profile_images/1598330787778232320/ZVFcRtet_400x400.jpg",ref_id:"c8fb52d1-fa69-410d-bf96-8a7559bba863",twitter_handle:"2140data"},{name:"Tomer Strolight",profile_picture:"https://pbs.twimg.com/profile_images/1591960241008148481/HtyINxtU_400x400.jpg",ref_id:"3a2bc97d-072c-4ed9-9a59-17ceeb68fe99",twitter_handle:"TomerStrolight"},{name:" TC",profile_picture:"https://pbs.twimg.com/profile_images/1480160632360124416/AM_vVRko_400x400.jpg",ref_id:"dac0717a-a743-40d4-a89f-7523f071bbb0",twitter_handle:"publordhodl"},{name:" kann b",profile_picture:"https://pbs.twimg.com/profile_images/1480160632360124416/AM_vVRko_400x400.jpg",ref_id:"1170bde7-7f3c-4c4f-a158-5c48a98fe92b",twitter_handle:"publordhodl"},{name:" Dallas Rushing",profile_picture:"https://pbs.twimg.com/profile_images/1602759767029604352/hzuwh5ZB_400x400.jpg",ref_id:"13fed037-77ce-48eb-9544-25e7abff9395",twitter_handle:"dallasirushing"},{name:" Lisa Hough",profile_picture:"https://pbs.twimg.com/profile_images/1541581547815436288/Li8wORWt_400x400.jpg",ref_id:"5e154adf-d8bd-4adf-a23b-47a51c183163",twitter_handle:"lisa_hough_"},{name:" Collectooor of sats",profile_picture:"https://pbs.twimg.com/profile_images/1594362077132587009/cNAE2FU5_400x400.jpg",ref_id:"c84d0e47-7eeb-419b-a36e-5055b96044f0",twitter_handle:"hoardingsats"},{name:" Gold Leader",profile_picture:"https://pbs.twimg.com/profile_images/1594152783011250176/lHMHv3gB_400x400.jpg",ref_id:"96c4f802-25ff-4a81-b91f-cae5562bf4a3",twitter_handle:"GoldLeader89"}],hosts:[{name:"Publordhodl",profile_picture:"https://pbs.twimg.com/profile_images/1480160632360124416/AM_vVRko_400x400.jpg",ref_id:"5e189a7b-56c3-40ae-834e-4e2ccee3a9ad",twitter_handle:"Publordhodl"},{name:" Anders_",profile_picture:"https://pbs.twimg.com/profile_images/1391477993726529545/xqIjHq5w_400x400.jpg",ref_id:"15bdd6b9-bdfd-492d-b7bf-c5a56ecadc50",twitter_handle:"Anders_"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/0c42d408-e518-4ecf-b282-d864a8c14002.jpg",keyword:!0,link:"https://stakwork-uploads.s3.amazonaws.com/uploads/customers/2707/media_to_local/4e00853b-49e3-4b46-bd13-bf7f2aa25905/56f0089c-a7f2-4b1b-8576-a3e4ddb9791f.mp3",node_type:"clip",pub_key:"034248fa888690a85021cf117c168a535c53b92e1fdf3e4f9cefddfe09118d8207",ref_id:"28845fb4-d3b9-4615-af36-f3f3862d93f7",show_title:"PUBLORD",text:"I'm just going to ask a general question here. Again, thanks, guys, for having me up. First of all, so how do you sell to someone? Again, I'm really small investor, like maybe 20 grand that I'm putting in. But how do you sell to anyone at this point who's looking at the price today and going, you know what, I got in at 30. If you did, and it's now at 17, where where do you at all try to convince someone at that point to put any more money in based on on what you see? Again, you can look historically at where it's gone to and where it's gone up to, but I'm constantly trying to talk to people and trying to orange pill them, for lack of a better term. And I cannot at all find the vernacular to try to convince someone because it seems so nefarious in terms of what's happening. Again, this is really common. You guys have or I'll buy at 16 and throw another ten grand in or 20 grand or whatever it is, but when it drops another 50% down to 10,000, how do you hold all the words you hear about, you know, diamond hands and can you hear me? It's so difficult. And again, I'm just a 58 or 52 year old guy who's trying to, you know, take some of his savings and, you know, make some money out of it, but it's anyone to hear me. Yeah, you're good. TC, can you hear TC or no, sorry. Did you hear TC was trying not a great answer for you, but I. Don'T think you can hear me. I put money in in 2020 when COVID hit into an ETF following an index, and I've made more money in that ETF index than I did in any of my Bitcoin. I'll have an answer for you here in a second. I got my own views on this, but TC yeah, you had your hand up. I don't know if you can even hear me, though. Wait, let me check. Conn, can you hear TC right now speaking? No, I can't. I'm going to go out and come back. Okay. If you drop and come back, I. Got a good answer for you. Yeah, jump out and come back. I can go for an hour on this one, but you go first. I know, man. It's a great question. It's an absolute great question. It's the question. And what it is, is it's the portal through this threshold where you leave behind the purely speculative, fiat minded way of analyzing everything, and you start your journey understanding Bitcoin. You heard him say it about the investment part. I was making more money. He's new. We'll talk. Man, I hope he comes back here soon, but Jesus, that is the question. Yeah, you're right. I guess I'll just start off by saying this is the problem with focusing on the price, because the price is actually distracting you and it's giving you bad information. Much like everything in markets today, in the legacy fiat system, the signals are all distorted. They're all warped. And during the bull market, we see everything warped in the overvalued direction. And in the bear market, you see things destroyed. And through a lens of just looking at percentage gains or losses, all you're determining is which direction the market moved. And that doesn't tell you anything when it comes to Bitcoin. As far as what Bitcoin is, the momentum that Bitcoin has in the world, it's one of the things that greases the wheels for all the legacy financial, media and governments to continue to fudge bitcoin because they've got such an easy sell to people when they say, hey, look, this thing's down 70%. How could it possibly be good? How could it possibly be healthy? Elizabeth Warren says, oh, how are you going to let people put themselves at risk owning this kind of horrible asset? It's such a narrow, small minded way to look at the whole thing. When you actually start understanding bitcoin, and you realize that right now, at the depths of the bear market, bitcoin is absolutely alive and kicking, and it has got amazing momentum, and there is so many people building and investing and adopting and adapting to bitcoin. There's major, major industries today. We stopped even, like, making a big deal out of it. You remember back in 2020 where every little insurance company or bank that even sniffed at bitcoin, it was like a huge story. Oh, my god, so and so is looking at it's happening so frequently now. We don't even pay attention to it anymore. The world is plowing towards a bitcoin reality here. And what's beautiful about it is that anybody who really wants to use Bitcoin as a way to preserve their wealth and improve their future, you have such an opportunity, especially during the bear market, to arbitrage the lack of knowledge that people have on average and to see through the fed and realize how healthy and alive and strong and growing stronger bitcoin is. And at that point, you realize how absolutely inaccurate the price is as a signal. And if anything, you're just able to arbitrage that knowledge gap. You realize that you're looking at something that's basically better than it was a year ago when it was 70% higher and it's on sale and you go from there. This is so on point. Look, Ben, this is the journey that everyone takes. Everyone takes a journey for the most part. You come in for number, go up technology, dude, I was there. And in fact, I got to look at the exact date of my first I'm almost at the five year anniversary because it was in mid December, mid December 2017. And yeah, you guys can thank me. I think I got into the market like three weeks before you. Dude, me and you are the exact same era. Bitcoin was at 17 five with my first purchase, not that I was going to buy a whole god amp coin, and it spiked up to almost 20. And you're right, I spent 2018, man. I was catching those knives all the way down. And the more I learned about bitcoin and what it represented, the more I understood it. But I'll tell you what, man. Yeah, go ahead. Sorry, just one more thing I wanted to add is the other thing that really dissuades people or points them in the wrong direction is they think about how many dollars they're putting into bitcoin, and what they need to really realize is how much capital and how much monetary energy they are removing from the fiat legacy system. That is one of the key perspectives that if you don't have that perspective, you don't realize what you're actually doing. You're not investing in bitcoin. You're not speculating on bitcoin's price. You're literally removing your capital and your monetary energy that you've accrued from a system that is so riddled with risk and uncertainty, and you're moving it into a brand new system. It's not controlled by any of these governments or central banks and allows you as a sovereign individual to hold your own wealth and remove it from that giant house of cards. That's I think equally as important a concept to understand. Yeah. And this goes into and con saying, well, what do you tell a friend? Or how do you explain to somebody what this means? And believe it or not, man, it's different things to different people and different cultures, okay? And what I mean is this. If you're in Venezuela or you're in Turkey watching your currency go through hyperinflation, guess where you want some of your life value, all the work that you did, you probably want a little bit in bitcoin. Let's say you're in some war torn country, you're trying to cross borders. Guess what, man? You're going to get jacked up for cash. You're going to be standing at an ATM hoping to get, like, €400 out before you leave, okay? The value in bitcoin is immense. And in the US. Oh, my god. What about in the US. What could you guys possibly see in bitcoin? And I've talked to many people like this. You want to talk about orange filling? There's one guy talking to I just don't get it. What is the use case? I said, well, listen, you're pretty well off this guy's, like, in his 60s, everything. And I just mentioned to him, can you name one thing? Just name one thing that you own that can't be confiscated by the government or bank. Name one thing you own and you can see the wheels turning. He's thinking of the two homes. He's looking at the credit cards that will be shut down, and I'll get back to that in a second. He's looking at the cars, okay? He's got a boat. And he goes, I got nothing. I said, well, that's why bitcoin is something you should at least be interested in. I'm not telling him, sell everything you own and buy bitcoin. I'm saying you just may want to have some exposure to this. And you want to talk about the volatility or the price. We talk about this quite a bit, man. In Canada, some truckers got ten grand in a bank account, and he's got a $10,000 line of credit that was shut down overnight. I'd rather have an asset class that can take can take a hit. Okay? Maybe it goes down 70%, but it's what the best bitcoiners around are. The ones that start at the top and when those prices are dropping, man, I was giddy as a schoolgirl when it went from 20 and we're down under six and then five and then four. I'm realizing, my God, this is what an amazing opportunity just to have this exposure. But TCI, I like what you said, man. It's more about you're not moving fiat. You're gaining. You're transferring the value of your work. You're taking chips off the table. You're removing your chips from the casino. Look, you're talking about insolvency. Jump out there and came back in and heard everything everyone said. Yeah, you were talking about insolvency. Hold on 1 second. Con again, when I hear someone like you guys talk, I'm always assuming that your dollar cost overall price right now is much lower than, let's say, $17,000, right? Pub, you just said that you bought in law. So if you told me right now, if you wanted to, you know what my average cost has been? Like 3000. So you're already that's nothing to do with it, dude. That's nothing to do with it. I don't think you can hear me. For some reason. You can't here. I'm going to leave and come back. Yeah, go ahead, TC. Leave. I'll bring you finish and then I'll just jump. Stay up here, man. Stay up here because we may have some questions for you. Go ahead. I want to be able to be here because, again, what I keep on trying to wrap my head around is, okay, so again, I'm I'm in. I'm down 50, 60%, to be honest, and I'm trying to decide, okay, so that was money that I didn't, you know, I don't need right now, but I have other money that I want to now possibly invest. And as you said, catching the knives on the way down. I got you. If you can hear me, I got you. Dude, can you hear me? I'm not going to get some Black Swan event or some can you hear. TC when he jumps in? Can you hear him? No, I can't. It just says host there. I'm not seeing anything. So again, I'm going to just back out again and come back in and listen, you guys, you're helping. So just let you know that. Let me go. I got a whole another one that's pretty simple to understand, which is basically, man, there are people who are millionaires in Lebanon who, after a bank bail in, it doesn't matter how much you have in the bank, you can't access it. They'll give you $100 and say, come back next week if you want more. We're watching Canada, trying to figure out how they're going to just strengthen their authoritarian ability to wield the banking system to punish people who don't politically align with them. We're seeing in China the use of the banking system to control people's movement. We're seeing the same things happening in Iran where there's a huge protest underway and the government is using the banking system to punish people who are protesting. We have rules coming into place in Europe where you're no longer going to be able to do any cash transaction above, I think, €10,000. There are similar things in the United States where every single transaction above $600, you have to account for and disclose and fill out paperwork. If you don't see what's happening here, you're blind. You're in denial. We're marching towards a world of infinitely more capital controls than what we currently have. And in this context, the price of bitcoin is irrelevant, other than how many stats can you get for every dollar that you're moving out of that other system, period? It has nothing to do with the price, because real bitcoiners are not interested in what the price is going to be tomorrow or next month or next year. I mean, I'm not even tripping what's the price going to be in 2030? I'm looking at a little kid that I intend on handing down most, if not all of it to decades from now. This is about preservation of your ability to have choices, because what happens when crisis hits, whether it's in your own life, your own little personal sphere, or if it's strife in your nation or in the world at large, what matters is what choices you have, and that's what your money and your capital represent. It's your ability to actually do something in a situation that you don't want to be in. Can you acquire food for your family? Can you put a roof over your family's head? Can you acquire transportation to remove your family from a bad situation? I'll tell you, with all these capital controls coming in, the ordinary person on the street is quickly losing. Optionality in the future. The future is becoming more and more certain that you're going to have less choices than you have today. That's what this is about. The price is irrelevant except for how many facts you can get for each dollar you're moving out of that fiat system. That's the point here. DC. Listen, what's nice is we got a good plan, because when they try to make you eat the bugs, I know of a few guys that are still selling stakes for bitcoin. Air Texas Swim. I wish he was around. There's going to be a circular side economy, a black market economy for bitcoin, for sure. This is great, man. Hey, you got, like, anyone whose handle is Fording SAS collector or what's ",timestamp:"01:12:05-01:28:25",topics:["Bitcoin value proposition","New Bitcoin investors","Bitcoin price volatility"],type:"twitter_space",weight:13.165740966796875},{boost:0,date:null,description:"The Nigerian butcher enterprise ",episode_title:"The Orange Sun 🌞 Let's talk #Bitcoin & Cattle Ranching/Sustainability",guests:[{name:"Texas Slim",profile_picture:"https://pbs.twimg.com/profile_images/1589784780970795011/02jf0fqp_400x400.jpg",ref_id:"b4448c8e-9238-4aba-bd25-efb329ea5a72",twitter_handle:"modernTman"},{name:"Lucas",profile_picture:"https://pbs.twimg.com/profile_images/1596345084966014976/maviSGq3_400x400.jpg",ref_id:"e3adb591-b29f-435b-bd34-210f2dbcedaa",twitter_handle:"impossiblyso"},{name:"Firebust",profile_picture:"https://pbs.twimg.com/profile_images/1517827165198458880/N79Wpx85_400x400.jpg",ref_id:"0fb6c7f3-a673-4fe5-9599-8165800a2ff0",twitter_handle:"FireBursts"},{name:"Hamza Yusuf",profile_picture:"https://pbs.twimg.com/profile_images/1318064165030940672/sakbSOvT_400x400.jpg",ref_id:"03a74669-b653-4c57-8799-a312cb041089",twitter_handle:"Hamzayu28849293"},{name:"Adenekan's Father",profile_picture:"https://pbs.twimg.com/profile_images/1505572078023495683/Wo_pJvTU_400x400.jpg",ref_id:"b8259997-2ef0-4e6e-8d58-a69b5eda550a",twitter_handle:"AdenekanFatai4"},{name:"Adenekan",profile_picture:"https://pbs.twimg.com/profile_images/1505572078023495683/Wo_pJvTU_400x400.jpg",ref_id:"ca6a563e-0e84-4811-be82-a3b3cd12d399",twitter_handle:"AdenekanFatai4"},{name:"Heritage",profile_picture:"https://pbs.twimg.com/profile_images/1510397558652350469/jYOl00tU_400x400.jpg",ref_id:"98a6d9df-3c39-49ec-8a39-074e61af4ece",twitter_handle:"herrytheeagle"},{name:"Enoch",profile_picture:"https://pbs.twimg.com/profile_images/1596235105663533056/5mRUbLm3_400x400.jpg",ref_id:"4f8af040-3d0c-49c1-806e-aef89d8693fb",twitter_handle:"KazEnoch"}],hosts:[{name:"Jeremy Garcia",profile_picture:"https://pbs.twimg.com/profile_images/1589056396816896001/dslbBQSX_400x400.jpg",ref_id:"e5e68f75-d71a-4477-ae9a-6a891f2d84d0",twitter_handle:"Jerimican5445"},{name:"Oluwasegun Kosemani",profile_picture:"https://pbs.twimg.com/profile_images/1538403135101800450/sO-RPI9U_400x400.jpg",ref_id:"25ce4b90-6689-4dd9-84b6-240c7bcbe407",twitter_handle:"MrlamilamiKosch"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/9b2e17f2-71c5-4f1e-a3e7-720d06dab810.jpg",keyword:!0,link:"https://stakwork-uploads.s3.amazonaws.com/uploads/customers/2707/media_to_local/a91f79fd-d85f-4440-b012-4bdafdc83341/f1d1c5b5-b8c9-44ed-a217-f75b398376d5.mp3",node_type:"clip",pub_key:"02574d6e8e787372184b6f17c40d6c6fe1777db9015801f95dfd24692784d767cd",ref_id:"da54483f-f9f4-4c4b-9320-6ba317e64b44",show_title:"Satoshi’s Journal",text:"Thank you, Jeremy. I'm so glad to do this. Thank you, Texasleam. That was a fantastic one, OG. Or should I say big omi. I already have multiple questions from what you said because Katie Ranchon is a big business in Nigeria. That's the number one business of the number one man leading the federal republic of Nigeria, the president of the federal Republic of Nigeria. And the person of General Mohammedu Buhari loves caterbranching. We could call him a herdman. He loves cataracting so much that there is a big discussion about re energizing the grazing routes in Nigeria. Whether that's good or bad, it's a tough conversation. This is a conversation that causes opera in Nigeria. Good and bad people die. Machetes are used, guns are used. It's a billion dollar empire in Nigeria. But the stats are not really open because of so many underlying tone. So I don't think this conversation will end here. Looking forward to something bigger, most likely, maybe at a conference, inviting our top executive of the government and so on and so forth. It's something we've been trying to solve. I'm so glad I missed identity here. So let me use the opportunity to say a big welcome to a highly respected man, of course, the father of our regular listener here, Adenica, is the leader of the Nigeria butcher association and the leader of the Paraguay Butcher enterprise. If you understand the butcher's business in Nigeria, you would know that it's not a small game at all. You must have butchers most likely around every market. And if you're not eating beef in Nigeria, you're most likely eating fish. And I think beef is the biggest protein in Nigeria that people really go for, whether it is ram, whether it is cow or cali or whatever it is you want to call it. It's a big business. I eat beef all the time. And I also have beef with the altcoin. Mr. Adelekon, once again, is the Nigeria Butcher's Association leader. One of the leaders and the leader of paracoli butcher's enterprise is also the array, bobani atundda Liquid of Bagura land. Please join us to welcome this respectable Nigerian, Mr. Adeniko. Thank you, Mr. Denikon. You're welcome to the microphone, sir. Eric, bobanizi going to come? Is your daddy going to come as a speaker or you're going to do most of this speaking for him? Yeah, he's going to join as a speaker also because I would like us to just hear from his experience and we should learn a lot. Okay. Please send Mr. Adenikan. Oh, I'm sorry. Okay, I'm biting him now. I'm so sorry. I forgot to bite him up for some reason. I thought it was going to be with Adenikin, but Adenikin, I just invited him Upani. It's a big title. From my understanding. Maybe I'm going to ask him what's that title means. For my understanding, Bob Banigi means elevate the king. Or should I say give the king some worthy respect. Give the king some worthy respect. So when they say you are the Arab, Bobani, you are like the king elevator the king. Should I say positive image? Because anybody that means respect, value, something like that. I read Bobani. That's a fantastic title. I sent your dad an invite, Dennekin, but if it's not working, your dad may have to just request to speak because I don't think the invite to Texas slim worked. So, Mr. Dennekin, if you could kindly click the there you go. No, that's not you. Hansa yusuf bhagudo. That's not him trying to invite him up. Maybe it'll work with you. I've already tried to invite him up several times. So just give us a few seconds, and we'll get Mr. Denikin up here. And in the interim, what I was saying earlier, though, is the similarities between bitcoin and farming and ranchers are uncanny. Farmers and ranchers are such that they are super sovereign. They know the land, they know how to work it. They know how to get it to the point where, on a selfsustainable manner, it could actually regeneratively, produce what it needs to produce, and they use their intellect to get the land to do what it naturally does, and then they use the animals to do what they naturally do. And when you get those two things in synchronization, the land and the animals, you have a beautiful thing. Unfortunately, due to the commercialization of food and the industry around food, that whole cycle has been screwed up. Okay, so there he is. Let me let him know. Jeremy, real quick, before I just accepted Mr. Identical, the Arab bobani of boogeland. But quickly. I also accepted Amaza Yusuf. But I want to ask AMA Yuzu a question before I push him back to a listener mode and maybe bring him back later. Please, quickly, tell me your name, what you do, and why you requested to speak, because your name sounds like you're from the north, and you may be a butcher or you may be into categorization. Real quick. I invited also he's a fellow member, and we are doing something with Texas. So he's a full animal and has been a friend since secondary school days. So you can just let him speak and just introduce himself. Oh, okay. All right. We're going to do that much later. So, first of all, we have in the building we don't need about anymore. Good morning, sir. Can you speak to us so we hear from you? Mr. Dennett, you may have to click on the bottom left hand corner. On your screen, there's a mic button. You have to unmike that. It's a little purple button, because right now you're on mute if you're trying to talk. Yeah. Can you hear me now? Yes, sir. Welcome to the I was happy to be on this platform because there is a lot of challenges in doing category in Nigeria. There's more challenges. I think you have more to make a mistake. I think we have to orientate us about the challenges. It's not easy. I do have a past five years now. I've been in the business so long. So what is coming up that I'm here, and I think it's a kind of opportunity for us to move up. I appreciate it. Thank you very much. Mr. So what Mr. Adele just said clearly is you guys should orientate everybody here. Basically us and the orientation team on, I think maybe how bitcoin can be of value to them. However, there's a lot of challenges that the butcher and khaki ranching industry is going through. But he's very appreciative of the invite and he's been on this Johnny for 35 years and he's glad to be here. Thank you very much. ",timestamp:"00:22:56-00:32:14",topics:["Butchers sovereignty"],type:"twitter_space",weight:13.040050506591797},{boost:0,date:1672099200,description:" Natalie Brunell's thoughs around SBF's unethical fraud",episode_title:"Blockware Intelligence Podcast: 2022 Highlights",guests:[{name:"Michael",profile_picture:"https://pbs.twimg.com/profile_images/1558687629599657990/vf-bU14b_400x400.jpg",ref_id:"c7b4faa1-db77-4459-b03f-0e41e15efae7",twitter_handle:"MichaelHawaii"},{name:"Cory Klippsten",profile_picture:"https://pbs.twimg.com/profile_images/1569687200857755648/fxiCeaqc_400x400.jpg",ref_id:"ddfb9b4c-4e6a-4f4c-a01b-e6bb1bc55464",twitter_handle:"coryklippsten"},{name:"Joe Consorti",profile_picture:"https://pbs.twimg.com/profile_images/1596902707511664640/GYGWVDts_400x400.jpg",ref_id:"8d2024b2-03bb-454d-9bd6-bb121904b76a",twitter_handle:"JoeConsorti"},{name:"Jeff Booth",profile_picture:"https://pbs.twimg.com/profile_images/1362957991410954241/spiaMAg2_400x400.jpg",ref_id:"f1143bcc-9ab9-4716-8259-0e5b026f8039",twitter_handle:"JeffBooth"},{name:"James Lavish",profile_picture:"https://pbs.twimg.com/profile_images/1466279082157502464/flD6cWI3_400x400.jpg",ref_id:"cf06ab2d-2ff3-4d7b-bef6-b996ae68517a",twitter_handle:"jameslavish"},{name:"Adam O",profile_picture:"https://pbs.twimg.com/profile_images/1395896857990160391/tJpgS2_p_400x400.jpg",ref_id:"95af0dd3-1e27-41b9-a36b-8a2c44438e85",twitter_handle:"denverbitcoin"},{name:"Jack Mallers",profile_picture:"https://pbs.twimg.com/profile_images/1599778945699909632/O0qc9ykA_400x400.jpg",ref_id:"d2e4aac5-e5e1-42fc-8f08-b3a77c076a64",twitter_handle:"jackmallers"},{name:"Lyn Alden",profile_picture:"https://pbs.twimg.com/profile_images/1521181379677073414/bm4LcJTr_400x400.jpg",ref_id:"903381dd-4b8a-4b59-8ecd-3281ae3ba297",twitter_handle:"LynAldenContact"},{name:"Dylan LeClair",profile_picture:"https://pbs.twimg.com/profile_images/1508157904913899522/3l7ctauV_400x400.jpg",ref_id:"283edea0-55cf-4245-95df-8d6d3dcb1851",twitter_handle:"DylanLeClair_"},{name:"Jeff Ross",profile_picture:"https://pbs.twimg.com/profile_images/1475554600094552064/DSlPG1lx_400x400.jpg",ref_id:"ae6ee2a2-1cf7-41a0-8366-ff6e94a6403c",twitter_handle:"VailshireCap"},{name:"Stacy Herbert",profile_picture:"https://pbs.twimg.com/profile_images/1546484196750905346/5WYPz-bc_400x400.jpg",ref_id:"7477463b-1f3a-4b83-94c3-9d5a63b576c0",twitter_handle:"Stacyherbert"},{name:"Greg Foss",profile_picture:"https://pbs.twimg.com/profile_images/1552599670945464320/3OgqRHNo_400x400.jpg",ref_id:"853d9f80-f6cf-490f-9d1e-f29cdc6acc6f",twitter_handle:"FossGregfoss"},{name:"Preston Pysh",profile_picture:"https://pbs.twimg.com/profile_images/1408783276081299462/f4Ye5n7-_400x400.jpg",ref_id:"01ad2c81-2d0c-44a9-93a1-42c07287aa80",twitter_handle:"PrestonPysh"}],hosts:[{name:"Blockware Intelligence",profile_picture:"https://pbs.twimg.com/profile_images/953108582110781441/irB2GVXn_400x400.jpg",ref_id:"0ff00f04-2450-4699-b6a3-0467e29cddde",twitter_handle:"BlockwareTeam"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/ea2cf2ae-76de-4185-818c-384b3b06228b.jpg",keyword:!0,link:"https://www.youtube.com/watch?v=WxGMeufy8jw",node_type:"clip",pub_key:"02574d6e8e787372184b6f17c40d6c6fe1777db9015801f95dfd24692784d767cd",ref_id:"d98bc278-4c35-4325-992c-78437ccf3569",show_title:"Blockware Intelligence",text:"I'm curious, what are your thoughts on the whole SBF debacle? Is he just going to be in the Bahamas forever, or do you think he might get arrested at some point? And also, why do you think the media isn't necessarily painting him as this obvious villain? Yeah, I'm really disappointed by everything that's happened with SPF. And it's sad that bitcoin looks bad in this whole thing, especially for people who don't understand the space. But it's neutral. It did nothing wrong. It was just cross collateralized. And people like SBF create these paper versions of Bitcoin, and that's so unethical. So my reaction is, I hope that the DOJ I hope that the SEC, I hope that law enforcement agencies go after him and bring him in and formally charge him. Because in my opinion, what he did was fraudulent. It was a Ponzi scheme. It was to enrich himself. I mean, the fact that he was basically loaning money, using an air token as collateral loaning money to himself, that people affiliated with him, including his parents, may have purchased expensive properties, this is wrong. This is not what this revolution of Bitcoin and removing the power of money from the state. This is not what this is about. It's not about enriching a small group of individuals who think that they have the right decisions on how the future should be created. It's wrong. And he duped so many smart people, which is amazing to me, these massive institutions, from the VCs to these celebrities who had a ton of money. You would think that they would all do their due diligence to make sure that they're not just, like, putting their money into a group of Silicon Valley former Ivy League nerds who are going to basically wash trade it. With themselves to pump up the value and take out loans and to become their own bank and take out credit lines and then trade it and pay off politicians and then lose all the money. I mean, this is ridiculous. And they did it all offshore for a reason because everything that they did is inherently illegal. And so I hope that it's a huge lesson. I hope that in the end, I think it actually strengthens Bitcoin and what bitcoin is all about and bitcoin's value proposition. But in the meantime, I just hope that these policy makers actually hold them accountable and take the time to learn about why this happened and how the fact that he's sort of, as of right now, getting a little bit of a pass, like Representative Maxine Waters, I think, tweeted at him something that was equivalent to, oh, please talk to us, Sam. Thank you for explaining the things that have been going wrong. It's like, no, hold this guy accountable. This is the Bernie Madoff of crypto right now and everybody's just sort of approaching him on eggshells and I don't understand that. So I think that charges will come down. I saw that Caroline Ellison was spotted in New York. I'm sure she's working with an attorney who wants to get her some sort of a plea deal. The only way that that will happen is if she divulges a ton of information. So I think it's going to be a couple of people pitted against each other. Caroline versus SBF, and we're going to learn more in the coming days. And I don't buy any of the crap he's been selling to the media. He knew what he was doing. He just thought he would get away with it, to be able to complete his mission and plan of whatever he wants to do with all that money. But it was wrong. He was using customer funds and he should be in jail, I think. Yeah. I mean, it's pretty insane how it got so big and how so many big names, whether it's like Tom Brady or Sequoia, were just full fledged behind FTX and SPF. It's pretty wild. The ",timestamp:"00:56:24-01:00:18",topics:["Natalie Brunell","SBF"],type:"youtube",weight:36.019356007815745},{boost:0,date:1672207217,description:"Receiving geyser donations directly to your wallet and tipping creators with Mash",episode_title:'The Orange 🌞 Reading/Discussion "The Book of Satoshi" & Bitcoin News',guests:[{name:"CouncilmannJamm",profile_picture:"https://pbs.twimg.com/profile_images/1251040014152024066/dD3b2eA4_400x400.jpg",ref_id:"6c989c2c-d24d-49a2-8eb1-1d2f1c47f347",twitter_handle:"jamm_councilman"},{name:"thotsnplayerz",profile_picture:"https://pbs.twimg.com/profile_images/1608733749663109120/wwYEZgF2_400x400.jpg",ref_id:"66bbe365-9e85-4c34-9d51-39d8b49937b7",twitter_handle:"thotsnplayerz"},{name:"Will Schoellkopf",profile_picture:"https://pbs.twimg.com/profile_images/1487515153302130691/t5sDMzZW_400x400.jpg",ref_id:"461e2245-1672-4fa1-94f5-7aaf1afa531f",twitter_handle:"realBitcoinDog"},{name:"OKIN_17",profile_picture:"https://pbs.twimg.com/profile_images/1518945775685967873/O0wPrIKO_400x400.jpg",ref_id:"dbcdeab8-4824-43f7-aeb8-2b9eda6cbbad",twitter_handle:"OKIN_17"}],hosts:[{name:"SatoshisJournal",profile_picture:"https://pbs.twimg.com/profile_images/1518661993103859712/y_QefqVZ_400x400.jpg",ref_id:"63fac069-bfe9-49ae-b52c-1d1f226b3275",twitter_handle:"SatoshisJournal"},{name:"Jeremy Garcia",profile_picture:"https://pbs.twimg.com/profile_images/1589056396816896001/dslbBQSX_400x400.jpg",ref_id:"e5e68f75-d71a-4477-ae9a-6a891f2d84d0",twitter_handle:"Jerimican5445"},{name:"ToxiKat27",profile_picture:"https://pbs.twimg.com/profile_images/1505791887415730177/d0YDQ3Xc_400x400.jpg",ref_id:"50023cce-8a6f-4974-ad3b-fd7a9c0abf19",twitter_handle:"ToxiKat27"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/9b2e17f2-71c5-4f1e-a3e7-720d06dab810.jpg",keyword:!0,link:"https://stakwork-uploads.s3.amazonaws.com/uploads/customers/2707/media_to_local/ecefba20-39fd-4974-8388-066857965b2a/cf486c39-08f9-4ada-9b72-7a297ad74d74.mp3",node_type:"clip",pub_key:"",ref_id:"b8080ee6-90b2-4f75-8c69-79510c82aa08",show_title:"Satoshi’s Journal",text:"The next little piece in here is to talk about make your Geyser donations flow to your own wallet. So a bit more than a week ago, geyser, for those that don't know who Geyser is or what it is, geyser is a company or website that allows you to earn Satoshi's for whatever you're trying to earn them for. So if you are trying to earn Satoshi's for a book, to write a book, you can put your project on there. There's a vetting system you have to go through. We're probably going to put the Bitcoin village on there. We haven't done it yet, but if anyone wants to donate to the Bitcoin village, that's yet another place they can go to if and when we get onto the Geyser fund. But you can find a bunch of other different donations for different things that are happening in bitcoin. So anyways, this article says a bit more than a week ago, guys are rolled out. A very neat feature that I missed. So here it is. You can now, as a project creator, receive donations directly to your own wallet through a lightning address. This allows you to receive the funds straight to the wallet of your choice, ideally on custodial, without them ever sitting on geyser's node. So that is pretty cool and I didn't know about that until I read this article. The next thing is mash. For those that don't know what Mash is, mash is a company that allows you to integrate their software into your website and allow such things as tips to happen. We just integrated it into our website. So if you go to our website and I have yet to unveil it because I'm trying to come up with a way to best unveil it, but essentially, if you go to our website now, there's a little button on the bottom right? You click it, it'll allow you to create a Mash account. And then once you create a Mash account, you can tip our website and the tips that are on our website are going to go to our content creators. So if people find value with the content of our content creators, they can click the button, they can send a tip of whatever value they want. All those tips accumulate on a wallet that we have associated with our Getmash account and then we will disperse those to our content creators how we deem fit. It's pretty cool feature. So Mash, basically it says here Mash got a small lifting to better suit creators and what they want to do with their content. Mash is a service that allows content creators to monetize what they create in a user friendly way. It just got easier to use with more customization available Ie themes. Mash button placement, push button placement, cherry on top what previously required copy pasting multiple snippets to make the Mash magic work on a custom website now requires only one code snippet. Cool. So that's pretty cool. I didn't set up the Mash on our website, but whoever did probably would relate with this feature. And there's a few more things. Looks like Albie got an extension for developers. Looks like there's some Sat streaming in the Pod verse and a bunch of other things. This is a long article, so I'm not going to read it all, but I highly recommend you check it out on ",timestamp:"00:14:17-00:18:05",topics:["Geyser Fund","crowdfunding","Mash"],type:"twitter_space",weight:37.03219712996155},{boost:0,date:1672207217,description:"Making payments on the Lightning Network",episode_title:'The Orange 🌞 Reading/Discussion "The Book of Satoshi" & Bitcoin News',guests:[{name:"CouncilmannJamm",profile_picture:"https://pbs.twimg.com/profile_images/1251040014152024066/dD3b2eA4_400x400.jpg",ref_id:"6c989c2c-d24d-49a2-8eb1-1d2f1c47f347",twitter_handle:"jamm_councilman"},{name:"thotsnplayerz",profile_picture:"https://pbs.twimg.com/profile_images/1608733749663109120/wwYEZgF2_400x400.jpg",ref_id:"66bbe365-9e85-4c34-9d51-39d8b49937b7",twitter_handle:"thotsnplayerz"},{name:"Will Schoellkopf",profile_picture:"https://pbs.twimg.com/profile_images/1487515153302130691/t5sDMzZW_400x400.jpg",ref_id:"461e2245-1672-4fa1-94f5-7aaf1afa531f",twitter_handle:"realBitcoinDog"},{name:"OKIN_17",profile_picture:"https://pbs.twimg.com/profile_images/1518945775685967873/O0wPrIKO_400x400.jpg",ref_id:"dbcdeab8-4824-43f7-aeb8-2b9eda6cbbad",twitter_handle:"OKIN_17"}],hosts:[{name:"SatoshisJournal",profile_picture:"https://pbs.twimg.com/profile_images/1518661993103859712/y_QefqVZ_400x400.jpg",ref_id:"63fac069-bfe9-49ae-b52c-1d1f226b3275",twitter_handle:"SatoshisJournal"},{name:"Jeremy Garcia",profile_picture:"https://pbs.twimg.com/profile_images/1589056396816896001/dslbBQSX_400x400.jpg",ref_id:"e5e68f75-d71a-4477-ae9a-6a891f2d84d0",twitter_handle:"Jerimican5445"},{name:"ToxiKat27",profile_picture:"https://pbs.twimg.com/profile_images/1505791887415730177/d0YDQ3Xc_400x400.jpg",ref_id:"50023cce-8a6f-4974-ad3b-fd7a9c0abf19",twitter_handle:"ToxiKat27"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/9b2e17f2-71c5-4f1e-a3e7-720d06dab810.jpg",keyword:!0,link:"https://stakwork-uploads.s3.amazonaws.com/uploads/customers/2707/media_to_local/ecefba20-39fd-4974-8388-066857965b2a/cf486c39-08f9-4ada-9b72-7a297ad74d74.mp3",node_type:"clip",pub_key:"",ref_id:"9f2d3be4-e7df-4b86-981c-466bde0d92ad",show_title:"Satoshi’s Journal",text:"Today I found a really good article. It's basically, I've never heard of this, but it's called the Twitter handle is at all end markets. So, like at Lightning network markets, but it's spelled with an all and an end and then markets. And I guess they post a newsletter. And what's cool is that they basically track what's happening in Lightning. So I'm going to really quickly go over some of the things that are happening in Lightning that I didn't know what was happening. So this one covers the week of the 19th to the 25th, and if you want to follow along, you click the article. Second one to the left on the nest. So it looks like some guy, his. Name is Renee Aaron. He's been working on connecting vending machines to Lightning. So that's pretty cool to do. So he designed a small, easily pluggable module that comes with its own screen and can be used by the vending machine to generate a Lightning invoice and display it as a QR code. The product is currently being tested by a bunch of merchants in Europe, but given its plug and playiness and the benefits of using Lightning in this type of machines. I'd say I'm quite bullish on this. That is pretty awesome. I mean, anything that you can plug into, anything that you need to pay, especially Lightning, that just helps with even more people getting used to using everyday things with bitcoin. So in this case, you can go to an arcade room, arcade game place, and there's a Lightning network module that allows you to scan a QR code and pay instead of having to put quarters and then play your game. So someday that will probably be just commonplace. Probably every machine that can have the ability to be have payments will have Lightning network. And for those that are new, lightning network is a second layered on top of bitcoin that allows instant and basically free transactions. And there's a common misconception amongst normies that think that bitcoin is slow, but when they're talking about that, they're talking about the first layer. And because of the first layer, transactions are completed about every ten minutes. That's why people think it's slow. But even relatively speaking, that's faster than a lot of other things in this world that we use for payments. And one thing is credit cards. Although credit cards can be swiped and allow payment to be done instantly, when you go to the store, that payment is still not instant because it hasn't been quote, unquote, validate or verified 30 days. 30 days later. 30 days later you get a credit card statement and then that's quote unquote finality versus in ten minutes on the bitcoin layer, one network, you have finality in ten minutes. Now, when you go on to the second layer with Lightning, you have basically finality in seconds and for free. Another problem, of course, with Visa, Mastercard and other credit cards is the exorbitant fees you have to pay. So it's an amazing thing what's being done, and the rest of the rule hasn't come to their awakening on it. ",timestamp:"00:10:27-00:14:17",topics:["Lightning Network"],type:"twitter_space",weight:37.03219711188569},{boost:0,date:null,description:"Related news and updates on Start9 operating system",episode_title:"Café ₿: Sovereign Computing w/ Matt & Aiden, Start9",guests:[{name:"Andrew",profile_picture:"https://pbs.twimg.com/profile_images/1465763053014859786/xYFN2czJ_400x400.jpg",ref_id:"ae4b13f8-0ee7-480a-b47a-82b967ad7a79",twitter_handle:"AP_ArchPublic"},{name:"Matt Hill",profile_picture:"https://pbs.twimg.com/profile_images/1347317316057321474/ieMjzK3x_400x400.jpg",ref_id:"3576ad28-a04d-4388-865b-3ec5114c4f9f",twitter_handle:"_MattHill_"},{name:"Lauren",profile_picture:"https://pbs.twimg.com/profile_images/1586022214901501952/U1dRyCxP_400x400.jpg",ref_id:"7f14bbf5-a60b-496b-a361-3663cf120299",twitter_handle:"LaurenJauregui"},{name:"Aiden McClelland",profile_picture:"https://pbs.twimg.com/profile_images/1470160097225498624/0BjKB_2W_400x400.jpg",ref_id:"04ddd9d4-9329-4e6c-aaa3-d65ea4a9342a",twitter_handle:"_dr_bonez"},{name:"Peter",profile_picture:"https://pbs.twimg.com/profile_images/1581695667193643009/EljNY-TH_400x400.jpg",ref_id:"a3384925-e15e-421d-b9f9-6d44e273ed05",twitter_handle:"PeterAnsel9"},{name:"Lisa",profile_picture:"https://pbs.twimg.com/profile_images/1541581547815436288/Li8wORWt_400x400.jpg",ref_id:"e6f0c6e3-3237-4b13-878f-bb740cd32f8d",twitter_handle:"lisa_hough_"},{name:"Isabelle",profile_picture:"https://pbs.twimg.com/profile_images/1466874333410717698/WRQh2-_m_400x400.jpg",ref_id:"c8df253f-47b3-465e-878e-8405c01c090d",twitter_handle:"isabelfoxenduke"},{name:"Tone",profile_picture:"https://pbs.twimg.com/profile_images/1416821178266787844/T1OkI9ZW_400x400.jpg",ref_id:"5729ac07-51d6-4268-b585-62680c846acb",twitter_handle:"ToneVays"}],hosts:[{name:"Alex Stanczyk",profile_picture:"https://pbs.twimg.com/profile_images/1539055022364708864/rwErK6x1_400x400.jpg",ref_id:"3126e2a3-bbe4-456b-b298-9714085fa286",twitter_handle:"alexstanczyk"},{name:"Derek",profile_picture:"https://pbs.twimg.com/profile_images/1598322677827207169/Cw0A3oOP_400x400.jpg",ref_id:"f441b996-7eeb-4210-b24c-fa011161709d",twitter_handle:"derekmross"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/239722cb-4216-414a-a17b-5adf9d52e15a.jpg",keyword:!0,link:"https://stakwork-uploads.s3.amazonaws.com/uploads/customers/2707/media_to_local/0ec4a941-250c-4e1d-8d2a-6c506c3ba4b2/4bd8010d-b2fd-41b4-8041-8a953ef06492.mp3",node_type:"clip",pub_key:"02574d6e8e787372184b6f17c40d6c6fe1777db9015801f95dfd24692784d767cd",ref_id:"0fe0af9b-421e-43ab-800d-7354379ea21f",show_title:"Swan.com",text:"Yeah, I should mention the embassy pro. As I said earlier, our business model is selling computers. We just launched a new one. It begins shipping next week. We've been preselling it for months. It required version 00:33 in order to run, which is why it hasn't shipped yet. So 33 is now done, so it will be shipping next week. These are very powerful mini PCs, 32 gigs of Ram. It's got a very powerful processor and two terabyte NVMe drive. So your disk storage is going to be very fast. And when it comes to running Bitcoin and Lightning and Electrs and then anything else under the sun, you might want to self host. It really is nice to have this sort of like device that's not a Raspberry Pi, right? Raspberry Pi is cool, but ultimately if you want to do this right and you want to have a good time doing it and not run into resource ceilings constantly, then you're going to need a more powerful device. So if you don't already have a mini PC or laptop or desktop that is adequately powered from a CPU Ram and storage standpoint and you want to run a server and you want to do it right, you're going to have to buy something. We actually have an incredible deal. Right. So the device that we are selling, if you were to go online and price out an Intel Nook, say, which is like the goto kind of mini PC solution, if you were to go build an Intel Nook to the exact specification that we sell the Embassy Pro, it would be a few hundred dollars more expensive. So we are not like this luxury overpriced product. We are actually undercutting the computer hardware market for a comparable device. So if you do need to buy something, come buy it from us. Because again, we're not gouging the price. In fact we're undercutting the price. And two, this is how we survive and how we're going to continue to build what we're building, which we hope you all can agree is a good purpose. So do business with us if you can. The Embassy Pro is the best headless server on the market for the best price on the market. And now we can get into whatever you want. And you also mentioned a moment earlier about people like the Federation model, about people running servers for their friends. And that's a lot of what we are thinking about as we put together this product, as we put together the Embassy Pro, that we are trying to get a more powerful product so that people can support more users on the device. Uncle Jim. Right. The Uncle Jim model. And we think it is a little. Bit. We have an ideal in our head that everybody on the planet will be running their own servers and connecting peer to peer. But we also know that that's not reality. As you mentioned earlier, it's not how humans work. And so we are acknowledging that. And while we will hold that as an ideal, this strategy for expansion is actually to go after families, organizations, content creators who have followers, to get them on board with the idea of self hosting and then gradually push to the edges. Right? So the Embassy Pro 33 and our entire roadmap for the next couple of years is really oriented around, do you get this, do you understand what's happening? Do you want to protect yourself and those who trust you? This is the best and easiest way that has ever existed for you to do that. We want to be that solution because we know that once, say, I use the church a lot because quite frankly, churches are going to be very quick to adopt this technology. We've actually had multiple conversations with heads of churches who are looking to do this because churches have been sort of under attack recently from this perspective. We know that when the pastor of a church sets up a private server, you know, in the back office and tells everyone in the congregation like, hey, we're not going to use Discord anymore, we're not going to use Telegram anymore, we're going to use our own private chat server. And in order to do that, all you have to do is go to Church of Christ.com, sign in with an email and password and chat with the members of the congregation. As in, there's no difference to what you are accustomed to. It's exactly the same experience from the congregation member perspective. They're having the same experience differences. Now it's just private and there's no intermediary. Scooping all your info churches, but it's a trusted intermediary. Exactly. But now the people in the audience understand this and they're like, wow, I want to do that for my family. So the head of family or whoever the most technical person in the family is, is now going to go get a device, put it in the home and be like, hey family, we're going to have private family talks, we're going to share pictures with each other in. A way that it doesn't in the future. Every tribe and every family is going to have its own CTO. Yeah, but we're trying to make that job really easy. Right? We're trying to take the job of system administrator, which is traditionally very hard job, highly paid job. We're trying to turn it into a Gui, a graphical user interface that a college intern could do. Right. Anybody? You're making the user interface very simple or the experience very simple. Okay, so question, you're basically building an operating system. Yes. That seems like a really hard thing to do. Why not just use Linux or something like that? We do use linux. Linux? Linux is a very unfortunately a very small part of an operating system. The basis of what we've built. We use Linux, we use docker, we use all of these tools that already exist in our open source. We're not shying away from any of the intellectual capital that has been built in the open source community over the many years. But there's a lot that has to be built for the user experience that we want. Okay, so in other words this is like a Linux stack but you guys are designing it in a way so it's super easy for people to use and it's focused on decentralizing stuff. Yes, but almost every Linux distro out there. When you say I'm running Linux, you're running probably one of two desktop environments like Gnome or KDE and we don't have any of that. We had to start pretty low in the stack in order to be able to design the experience towards a server device as opposed to a client device. So a lot of it is different than what you'd expect out of something like Ubuntu or ",timestamp:"01:49:29-01:56:20",topics:["Embassy Pro","Data protection solution","Start9 operating system"],type:"twitter_space",weight:12.334749221801758},{boost:0,date:1668866400,description:"Listener question: Is there counterparty risk to USDC given banks exposure to the stablecoin?",episode_title:"FTX Is Worse Than Enron w/ Lawrence Lepard, Caitlin Long, Dylan LeClair, and Dr. Jeff Ross",guests:[{name:" Jeff Ross",profile_picture:"https://pbs.twimg.com/profile_images/1307109108127019008/rPNj47yJ_400x400.jpg",ref_id:"4f4f53c7-5a3a-46df-b334-9951fe38dc96",twitter_handle:"realjeffreyross"},{name:" Dylan LeClair",profile_picture:"https://pbs.twimg.com/profile_images/1599858581611941922/XxvPPWAt_400x400.jpg",ref_id:"c1d20e9f-7362-47be-a3a0-5b9c004cd58e",twitter_handle:"DylanLeClair_"},{name:"Sam Rule",profile_picture:"https://pbs.twimg.com/profile_images/1522271013026729987/RQZOdzjq_400x400.jpg",ref_id:"09214ea0-d8ff-47cb-84fe-08e8517768e5",twitter_handle:"samjrule"},{name:" Caitlin Long",profile_picture:"https://pbs.twimg.com/profile_images/1362592672150528003/iYZ84uXB_400x400.jpg",ref_id:"c0244641-6347-4b82-b2a9-0ee38b600c08",twitter_handle:"CaitlinLong_"},{name:" Lawrence Lepard",profile_picture:"https://pbs.twimg.com/profile_images/1114275000889032704/mOUsG1XC_400x400.png",ref_id:"bafa8935-8957-4a9f-aaaa-e45fb46615d4",twitter_handle:"LawrenceLepard"}],hosts:[{name:"q_liketheletter",profile_picture:"https://pbs.twimg.com/profile_images/1560683048680665088/4MrHM_UY_400x400.jpg",ref_id:"3303023d-a793-432c-8020-9151bd237523",twitter_handle:"q_liketheletter"},{name:" phjlljp",profile_picture:"https://pbs.twimg.com/profile_images/1601641645572767745/2Obq9UgK_400x400.jpg",ref_id:"2e5ffdd9-fea5-4daf-85e5-27015890442f",twitter_handle:"phjlljp"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/1583c7c4-f4f2-4e52-8f27-a1eaeb6289fd.jpg",keyword:!0,link:"https://traffic.libsyn.com/secure/bitcoinmagazine/22.11.18_FTX_Worse_Than_ENRON_Moon_and_Crowd_Health.mp3?dest-id=1210361",node_type:"clip",pub_key:"034248fa888690a85021cf117c168a535c53b92e1fdf3e4f9cefddfe09118d8207",ref_id:"8b94fbcf-e349-4b2f-8425-66287345b9ae",show_title:"Bitcoin Magazine Podcast",text:"also wonder a little bit with the risk with these banks. Like, yes, a lot of crypto companies use these banks, but these banks also interact with USDC, and USDC interacts with a lot of other counterparties. And so, like, is there some level of counterparty risk or credit risk that USDC faces with some of these financial institutions as well? And what does that mean? And I've also kind of been scratching my head a little bit about why all of these just have stopped processing US. DC. On Salona. And I don't think I've ever seen an example before of a stable coin kind of dying on a specific protocol and what that even means. Either of you have thoughts on that? Yeah, anybody else? Yes? I'm not sure. I think it's more so just like it was more of an FTX thing. I don't know the long history of stable coins. On Salana, but I do know that they were one of the first ones to kind of have like coinbase. You could do each base withdrawals, but FTX had all the rap soul tokens. Maybe it's just like finance and everyone else just kind of sticking a fork in them. I'm not really sure. Well, I guess what I'm asking is I'm guessing that USDC on Solana would follow the same minting and burning processes as USDC on any other protocol and that it's circle at the end of the day that has some process for ensuring that a fraudulent party couldn't just MIT a bunch of USDC and injected into the system. And so whatever the risk is there with Salana, does that also extend to Tron for example, or some of these other parties and I just don't know enough about how these stable coins actually interrupt with the banking system trying to get an understanding of that risk. Yeah, I think the scary thing is and I was listening to that Larry, you were saying something about that Mark guy and he's like a known short seller with the banks. And Caitlyn, your point about firing from the hip on rumors is totally true in finance and crypto. It's no different from the legacy system. But if there is somewhat of just because of the rumors or because of the potential for a fraud case, we don't know. This is more so to speculation than anything. But if there's like, you know, I mean these are fractional reserve banks, right? So if there is a kind of a run right, and like the crypto, native companies don't really have many places to go, but just, you know, I think these things are non zero probability. That could get pretty hairy for an ecosystem that doesn't really have any options. Well, that's what Ryan Selkus has been talking about. Yeah, sorry, go ahead. No, I think that's just one of the things I'm looking at is like, OK, you have not only like the companies, but you have some stable coins on these rails and the Send network and hearing some I got some McBurnie's in my ear and my DMs that are saying like certain counterparties as of yesterday, not too well known, just some very small scale institutional players have alerted their clients that they're no longer accepting sen like Sen Silvergate exchange network wires out of an abundance of caution and stuff like that. Just kind of flares my kind of senses up a little bit, kind of ring some alarm bells when you see like, an institution, say, hey, we're no longer accepting this crypto exchange network wire out of an abundance of caution. And the stock's down 50% month over month and 10% day every day. Are you referring to Falcon act? That was true, yeah, they sent it out to clients. So Falcon X is not small. I mean, Falcon X is one of the biggest institutional custodians. I don't know exactly how they describe their platform, but they're big. Again, I just careful here. Yeah, but that may be rumor, it may be true. But one thing to caution everybody. There are laws in the United States against a bank run. There are actually laws against that. I would just encourage everybody take a deep breath. It may or may not be true. There are so many rumors floating around this sector right now. And maybe this is where those of us who have the proverbial gray hair can think back to the times that we've been through. The various financial crises, the bond market correction, the Long Term Capital Management collapse in 1997, you know, the tech stock bubble bursting in 2001, and then of course, the mortgage bubble bursting. And seven into eight and nine through the great financial crisis, the rumors fly. And it's not until afterwards that you see where the real truth was. The sad thing about this sector is that there's definitely things move fast, right? And so the rumor mill can move things a lot faster than they otherwise might. So I would just caution everybody, especially when it comes to the banks, just definitely ",timestamp:"00:28:12-00:33:48",topics:["counterparty risk of USDC","USDC on Solana","Circle","stablecoins","SEN network","falconx"],type:"podcast",weight:15.743046803788744},{boost:0,date:1672207217,description:"Improvements made to the Bitcoin node",episode_title:'The Orange 🌞 Reading/Discussion "The Book of Satoshi" & Bitcoin News',guests:[{name:"CouncilmannJamm",profile_picture:"https://pbs.twimg.com/profile_images/1251040014152024066/dD3b2eA4_400x400.jpg",ref_id:"6c989c2c-d24d-49a2-8eb1-1d2f1c47f347",twitter_handle:"jamm_councilman"},{name:"thotsnplayerz",profile_picture:"https://pbs.twimg.com/profile_images/1608733749663109120/wwYEZgF2_400x400.jpg",ref_id:"66bbe365-9e85-4c34-9d51-39d8b49937b7",twitter_handle:"thotsnplayerz"},{name:"Will Schoellkopf",profile_picture:"https://pbs.twimg.com/profile_images/1487515153302130691/t5sDMzZW_400x400.jpg",ref_id:"461e2245-1672-4fa1-94f5-7aaf1afa531f",twitter_handle:"realBitcoinDog"},{name:"OKIN_17",profile_picture:"https://pbs.twimg.com/profile_images/1518945775685967873/O0wPrIKO_400x400.jpg",ref_id:"dbcdeab8-4824-43f7-aeb8-2b9eda6cbbad",twitter_handle:"OKIN_17"}],hosts:[{name:"SatoshisJournal",profile_picture:"https://pbs.twimg.com/profile_images/1518661993103859712/y_QefqVZ_400x400.jpg",ref_id:"63fac069-bfe9-49ae-b52c-1d1f226b3275",twitter_handle:"SatoshisJournal"},{name:"Jeremy Garcia",profile_picture:"https://pbs.twimg.com/profile_images/1589056396816896001/dslbBQSX_400x400.jpg",ref_id:"e5e68f75-d71a-4477-ae9a-6a891f2d84d0",twitter_handle:"Jerimican5445"},{name:"ToxiKat27",profile_picture:"https://pbs.twimg.com/profile_images/1505791887415730177/d0YDQ3Xc_400x400.jpg",ref_id:"50023cce-8a6f-4974-ad3b-fd7a9c0abf19",twitter_handle:"ToxiKat27"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/9b2e17f2-71c5-4f1e-a3e7-720d06dab810.jpg",keyword:!0,link:"https://stakwork-uploads.s3.amazonaws.com/uploads/customers/2707/media_to_local/ecefba20-39fd-4974-8388-066857965b2a/cf486c39-08f9-4ada-9b72-7a297ad74d74.mp3",node_type:"clip",pub_key:"",ref_id:"51926635-4d2a-47d0-9e11-62c173898631",show_title:"Satoshi’s Journal",text:"like I said, I've been listening to that bitcoin explained podcast, digging into it lately, just plowing through all of it, because that's what I love about the podcast so far, is that the episodes are only like 30, 40 minutes long. They're all these long two hour, three hour drawing out conversations about bitcoin. They really just get to the point and get to the meat and potatoes, so to speak, of whatever they're talking about. And the most recent episode I listen to was about bitcoin core. Update 21. So this was like two years ago almost already now. And it's cool to see what Satoshi was talking about and what the nodes did then to the improvements that we've made since then and then where the mindset was then, and then where we are now, and the things that we've done with Taproot and everything else. It's really cool to see that transition and be able to look back and see the inner workings. Like I said, these guys go into the real deep nitty gritty how the nodes communicate with one another, why they communicate with one another in certain ways, and how they used to communicate with each other in which there were basically ways for people to attack you, essentially. Or act maliciously against your node because of the way that the original protocol used to work and how they've improved upon it to where those options are no longer viable. And you really get to see that bitcoin core developers really do have an adversarial mindset when it comes to the meticulous choices of what bits they choose, why they choose them, and why they do integrate them overall. Yeah, I think that's one of the most powerful things about bitcoin is it's very slow in its evolution. Well, it's exactly like how evolution is happening on earth. I mean, it doesn't happen overnight and it happens very slowly. And in many ways, it actually requires a consensus of nature to be able to make that evolution. And so, like bitcoin, you're not just going to make a change overnight. When these developers are developing, they first have to do a bit, then that bit has to be talked about by the developers. And then before you can even integrate it, there's a long, drawn out process, vetting process that I'm not even aware of, but they're very meticulous, like Tk said, to implement any changes into bitcoin. And these changes would be like soft forks. That wouldn't be hard forks, they would just be little tiny changes that could be done. And of course, you then have to update those have to get updated, minors have to get updated, and they have to have the consensus to accept those updates. It's just not like an easy process. It's a long, arduous process to finally get to the point where you can actually implement it. That's how I understand it, anyways. And because of that, it's a beautiful thing because bitcoin is like actually think about it this way. One of the oldest creatures on Earth is a crocodile. A crocodile from millions of years ago till now has evolved, but for the most part, it's still the same, but it's become more resilient. And the tiny, small changes that has happened to that crocodile have made it that much more resilient. So that's the same thing with bitcoin. It just gets hardened and hardened and hardened and hardened after many, many years. And so hundreds of years from now. Bitcoin is going to be a hardened freaking crocodile, so to speak. Anyways, that might have been a dumb ",timestamp:"00:32:45-00:36:44",topics:["Bitcoin improvement"],type:"twitter_space",weight:35.70854341455261},{boost:0,date:1670706053,description:"On-chain game for stack",episode_title:"Bear Market Buidl — Major #Bitcoin developments! #Stacks #Sidechains",guests:[{name:"@GriffdenNFT",profile_picture:"https://pbs.twimg.com/profile_images/1604377729062895617/R4pSEdH4_400x400.png",ref_id:"dafdf7ec-28c0-43d3-a0d9-b2d266f38738",twitter_handle:"GriffdenNFT"},{name:"@Chad_333",profile_picture:"https://pbs.twimg.com/profile_images/1592310541732970496/o1tbw9Eo_400x400.jpg",ref_id:"484c7695-6a4e-4141-9585-1109bf23f8cf",twitter_handle:"Chad_333"},{name:"@jackbinswitch",profile_picture:"https://pbs.twimg.com/profile_images/1601214177439260672/O0SpU5B1_400x400.jpg",ref_id:"9685e7f3-3e0c-4b84-9fd9-b8a1d96f6ae9",twitter_handle:"jackbinswitch"},{name:"@jimdotbtc",profile_picture:"https://pbs.twimg.com/profile_images/1593210347825119237/L_SNThWQ_400x400.png",ref_id:"5dcf5545-fad6-44ee-ae56-360c5efe1151",twitter_handle:"jimdotbtc"}],hosts:[{name:"@BigRpic",profile_picture:"https://pbs.twimg.com/profile_images/1604962150388219904/WqiCye-r_400x400.jpg",ref_id:"726f0c95-9d94-4d44-a056-8ad3c9e3ddd5",twitter_handle:"BigRpic"},{name:"@CarlsonDoc",profile_picture:"https://pbs.twimg.com/profile_images/1597382056308350977/1NPexynZ_400x400.png",ref_id:"e34fa2b2-a58e-4461-81a0-d10c1058dfc2",twitter_handle:"CarlsonDoc"},{name:"@STXLDN",profile_picture:"https://pbs.twimg.com/profile_images/1533793338931007488/o3laQDCp_400x400.jpg",ref_id:"5c3bc906-3aed-44f9-851a-94804c6fe5ca",twitter_handle:"STXLDN"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/99046513-2614-4eae-9de4-5781ba4b330a.jpg",keyword:!0,link:"https://stakwork-uploads.s3.amazonaws.com/uploads/customers/2707/media_to_local/fc3bebcb-8271-433e-8d81-84dd06f3b022/aec527bc-539d-4d3b-9bad-db4af9e1a1ba.mp3",node_type:"clip",pub_key:"03c7a7f42d94fdfc7a655515c1421cd1d20db090a1c24150201de0b1dc6a30b0ee",ref_id:"09e8e827-fd7b-4800-8633-9f4fe7416210",show_title:"STX:LDN",text:"I'm just going to pop in and just thank you for those kind words, Jack. You've been an awesome peer alongside everybody else in there. To have a more Stacks native user and a big voice for Stacks is great to have in the group. You have some amazing questions. I've learned a lot just from you being curious and sharing those curiosities with our mentors and I can echo everything you said. I think that it's such a fantastic opportunity, especially for someone like me who has minimal real world business experience, to be able to go in and learn the Lean Startup method from all of our mentors. Did I get rugged? Sorry. No, you're here. I thought I got rugged. Okay, just making sure. Thank you. And for anyone who's interested in building in Stacks and wants to open your network and meet some great people, possibly or some great team members, I could highly recommend the Web three pre accelerator startup Lab. And I'm really excited to see everybody start to get their ideas formed and just this great experience. And of course, being kind of brought into the Sachs community in this way, it gives me a lot of exposure to small, big, all types of people in this community. So I guess I could talk a bit about what we're doing. My team and I have pretty much landed on our idea. We have to speak to a few mentors here soon to make sure we can get some legal clarity before we continue on because it is going to be on chain gambling and that's a really important part, I believe, to build an investment ready startup. We have to have all those things in line before we go forward into the stacks. Accelerator, hopefully. And we're currently just building out one simple game. It's going to be an on chain digital coin flipping game with 50 50 odds playing against the house. We have many ways that we want to expand upon that, but if we see some success with this project and building more on chain games for Stacks, that is our grand vision. And we would love to also open up our platform to other builders or other people who want to build on chain gambling games but might not have the resources, whether it be a dev or the marketing sense. So it's really going to be a bit more than just the fungible flip game. But one thing we learned in the Pre accelerator is go for that one killer feature and shoot for something simple and something that was maybe done on another chain. So I had just remembered this game I had played on Salana about a year ago called Djen Coin Flip and that's where I drew the inspiration for our game from. And yeah, it's looking like it's going to turn out to be a success. The reason I thought this would be a good application for Stacks is I come from the NFT trading world where we're all degenerates mainly, and I look to that as being one of the bigger consumers, consumer groups, I should say, in web three, kind of like the Degenerate Gamblers or Speculators. And I truly haven't seen a ton of degenerate outlets for users on Stacks. So we want to be able to build out some of those fun games or gambling s games for Stacks users. We're mainly shooting for more non traditional gambling games, as I've noticed, that's blown up in the online gambling world over the past couple of years. But we really think that transparency is important when you're online gambling and we're going to be able to provide that through smart contracts on Stacks, of course. ",timestamp:"00:20:15-00:24:50",topics:["On-chain game"],type:"twitter_space",weight:22.50741216002476},{boost:0,date:1633737600,description:"Public mempools versus private mempools ",episode_title:"Understanding Miner Extractable Value On Ethereum",guests:[{name:"Nathan Worsley",profile_picture:"https://pbs.twimg.com/profile_images/1576238702908637186/xzcScTyV_400x400.jpg",ref_id:"20529242-4546-475a-af1a-125b83aedd81",twitter_handle:"NathanWorsley_"},{name:"Robert Miller",profile_picture:"https://pbs.twimg.com/profile_images/1595788538938695680/w6i5Q6s4_400x400.jpg",ref_id:"292cfadd-7e67-4e34-876b-99804d416e20",twitter_handle:"robertjmiller_"},{name:"Jordan Frankfurt",profile_picture:"https://pbs.twimg.com/profile_images/1544902585462788097/bGe0hNIi_400x400.png",ref_id:"149db25a-26b1-4f69-8c9e-ec87e08ab8c8",twitter_handle:"jordanfrankfurt"}],hosts:[{name:"Will Foxley",profile_picture:"https://pbs.twimg.com/profile_images/1580970227193376776/9oQfeExj_400x400.jpg",ref_id:"704b9e82-3e40-40b6-874c-6bb8fadafbef",twitter_handle:"wsfoxley"},{name:"Zack Voell",profile_picture:"https://pbs.twimg.com/profile_images/1595803006737448961/fFrf7VJb_400x400.jpg",ref_id:"e32c7661-c635-4089-a620-ffce509eff0e",twitter_handle:"zackvoell"},{name:"Compass Mining",profile_picture:"https://pbs.twimg.com/profile_images/1425165074373791744/f2CgInvP_400x400.jpg",ref_id:"812e5d37-47fb-4077-915f-df52e2ef84d8",twitter_handle:"compass_mining"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/ae91fac6-a1af-4877-9a92-e793d556ee66.jpg",keyword:!0,link:"https://www.youtube.com/watch?v=6IxaLCPm6_E",node_type:"clip",pub_key:"03c18d0c6c35333f22bc524e21a5fd1d2d9886f5d4d958dc1de95d025de5c84cfc",ref_id:"330a0238-1acc-47fe-b809-48cc986a0b21",show_title:"Compass Mining",text:"I'll rise to the challenge. Jordan, at flush spots, we like to point out the places in which our projects fall short so people can hold us accountable and I hope those of you on the panel do and the community abroad. So I think private mempos could be something that is very centralizing for the network overall. And I think it also turns the network into something more opaque. For better or for worse, the public mempool is that it is public and so everyone can sort of see transactions passing through. They have the same information that it has a level of transparency to it somewhat. There are kind of nuances over there, but you don't know what's going on with your transaction when it goes to flashpots protect you assume that we are a good actor. You assume that we're passing your transaction on without doing anything. And this is a repeated game where you see the game update, right? So you pass a transaction to us, you see the state of the chain, you see if you're a front run or not. You can choose to not use this if you don't want, but there are trust assumptions baked into that and it is a more centralized vector that has less transparency over the outcomes. I think, to be clear for the listeners, I'm not shitting on flashbacks. Protect I think it's a really cool thing. We are planning on integrating it into uniflop. Oh, some alpha. Yeah, we are actively working on utilizing this service. So we're big fans of flashbacks. Maybe I could give a little bit of color to some theoretical problems with having completely private mempools as Robert touched on. I think this is very important. Anyone running a full note or mining doesn't actually have access to the entire MEMP pool. They only have access to a small part of the men pool. The mempool is being shared around everywhere, but each person only can see a small piece of it. And the mempool is like communicating information that traders are using to capture mev. But that's not the only kind of information it's communicating. It's also communicating information about load on the network and it's communicating information about appropriate prices to set the transactions. And if you start to close off all of the menpoles, then that information is no longer being communicated around the network and you have to find other ways of communicating it. And also another point that Robert touched on as well is this issue of censorship. When the mental is open and everything is being shared around the network, you have some assurances about whether you're being censored or not, whether something is happening to your transaction. Maybe it's getting delayed and someone's doing some kind of private statistical extraction that you don't know about. If you have confidence that your transaction is going everywhere around the mempool to all these different nodes, and you can see that, then you can have some proof that that's not happening. That's not to say that I don't like the idea of private MEMP pools, but this is like maybe an argument that you could make sure sorry, go ahead. One thing that just crossed my mind, as you're saying that is a proliferation of private or at least like secondary mental mechanisms or gossip mechanisms would be essentially allowing users more choice in their privacy of the transactions. We see them, like the Quinn, things like Clover and Dandelion as mechanisms for providing users with better safety and defense against Eclipse attacks or whatever their Node. And maybe that's one point in favor of a proliferation of transaction relay mechanisms. ",timestamp:"00:45:01-00:48:33",topics:["Public Mempool","Private Mempool"],type:"youtube",weight:12.134265304355546},{boost:0,date:1670706053,description:"Deep Lake finance: built for stacks",episode_title:"Bear Market Buidl — Major #Bitcoin developments! #Stacks #Sidechains",guests:[{name:"@GriffdenNFT",profile_picture:"https://pbs.twimg.com/profile_images/1604377729062895617/R4pSEdH4_400x400.png",ref_id:"dafdf7ec-28c0-43d3-a0d9-b2d266f38738",twitter_handle:"GriffdenNFT"},{name:"@Chad_333",profile_picture:"https://pbs.twimg.com/profile_images/1592310541732970496/o1tbw9Eo_400x400.jpg",ref_id:"484c7695-6a4e-4141-9585-1109bf23f8cf",twitter_handle:"Chad_333"},{name:"@jackbinswitch",profile_picture:"https://pbs.twimg.com/profile_images/1601214177439260672/O0SpU5B1_400x400.jpg",ref_id:"9685e7f3-3e0c-4b84-9fd9-b8a1d96f6ae9",twitter_handle:"jackbinswitch"},{name:"@jimdotbtc",profile_picture:"https://pbs.twimg.com/profile_images/1593210347825119237/L_SNThWQ_400x400.png",ref_id:"5dcf5545-fad6-44ee-ae56-360c5efe1151",twitter_handle:"jimdotbtc"}],hosts:[{name:"@BigRpic",profile_picture:"https://pbs.twimg.com/profile_images/1604962150388219904/WqiCye-r_400x400.jpg",ref_id:"726f0c95-9d94-4d44-a056-8ad3c9e3ddd5",twitter_handle:"BigRpic"},{name:"@CarlsonDoc",profile_picture:"https://pbs.twimg.com/profile_images/1597382056308350977/1NPexynZ_400x400.png",ref_id:"e34fa2b2-a58e-4461-81a0-d10c1058dfc2",twitter_handle:"CarlsonDoc"},{name:"@STXLDN",profile_picture:"https://pbs.twimg.com/profile_images/1533793338931007488/o3laQDCp_400x400.jpg",ref_id:"5c3bc906-3aed-44f9-851a-94804c6fe5ca",twitter_handle:"STXLDN"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/99046513-2614-4eae-9de4-5781ba4b330a.jpg",keyword:!0,link:"https://stakwork-uploads.s3.amazonaws.com/uploads/customers/2707/media_to_local/fc3bebcb-8271-433e-8d81-84dd06f3b022/aec527bc-539d-4d3b-9bad-db4af9e1a1ba.mp3",node_type:"clip",pub_key:"03c7a7f42d94fdfc7a655515c1421cd1d20db090a1c24150201de0b1dc6a30b0ee",ref_id:"a3fe7197-5948-404f-a8b0-f04bb130db27",show_title:"STX:LDN",text:"can you tell me? I'm friends with Rafa, and as I understand it, he's co founder on Deep Lake. What are they actually doing? How does it work? Well, I can't tell you from a technical standpoint, but I can tell you from a Djen trader standpoint, deep Lake Finances is a way for people to trade perpetual futures instead of using a centralized exchange like BitMEX or what have you. It's a D Five protocol that allows you to do that. Really, the ultimate thing is the way it's being built is whatever kind of liquidity providers you want to have, you'll be able to make these pairs on this platform and trade their futures so the applications go bigger than just Bitcoin and Stacks or whatever. The applications for something like that can be scaled up tremendously, but just that in and of itself. So there's a huge need in the market for such an app. Hey? Well, yeah, I think right now there's a huge need for a lot. Right? I mean, you don't know what you don't know, but something like that. Absolutely. 100%. Just from a trader standpoint, which before I, when I learned about crypto, the next thing I learned was trading crypto from a trader standpoint, a decentralized exchange that I can trade futures on and not have to risk leaving my coins in a centralized exchange, especially status posts, FTX and all of this other nonsense we've watched. That's massive. That's absolutely massive. The audience for that is enormous. Well, that's great. I'm so happy for RAF coming up with this and putting his team together. It's really impressive. I had no idea what it really meant by a perpetual and when you say futures market, well, yeah, I understand that and that's great. That's just great. Yeah, it's awesome. Right? A lot of tech people don't like to think about it this way, but I think about it this way because this is just what I've seen. What's being built in Web Three started on the back of traders period when the news and when everyone in the real world and everyone was just insisting bitcoin itself was a scam and it was tulips and it was this, it was that, and the other traders were out there with their skin in the game, day one. And the liquidity that we've provided to these various chains, sometimes more liquidity than we cared to, but the liquidity we've provided has built this market. And I think that that natural progression is still there because it's still such a young market. Like I said, this is what we're seeing happen right now. The fruits that come to all this labor are going to take generations to ultimately come to fruition. But yeah, traders bring eyeballs, traders bring liquidity. And having apps like that on any chain are really going to bring the investment, bring the capital, bring the interest. It's going to do just like it did with me when I discovered crypto. The giant green candles makes people be like, hey, what's going on over there? I'm going to check this out. Or with NFTs, they come for the pictures and they leave with the understanding of the evils of Fiat. Right? I mean, this is what we're doing. So, yeah, having something like that being built right now, is just huge for Sax. 100%. Yeah. I didn't know what Rafa was trying to put together. And when they published that landing page for Deep Lake, I thought, well, that's interesting. I just didn't know what they meant by perpetuals. And when you talk about futures oh, of course, right. Makes a lot of sense. One thing I do know is I don't believe Rafa is the co founder of Deep Lake, but he is partnering with them for whatever project he is building. Is that right? Rafa is not the co founder of Deep Lake. No. I just dropped an article in a link if you want to check it out. It's a small dive about what they're working on. The guy who started, a guy named Abdel Harass. Really just cool dude, really smart guy. But yeah, there's a little article down there below if you want to check it out. Absolutely amazing tech. Thank you. ",timestamp:"01:02:21-01:08:24",topics:["Deep Lake finance","stacks"],type:"twitter_space",weight:21.730685924323048},{boost:0,date:1671735703,description:"Steps to onboarding a new bitcoiner",episode_title:"TOXIC HAPPY HOUR! #Bitcoin, Pysh, Booth, BTC Ben & the Plebs! 🍻😂",guests:[{name:"Jeff Booth",profile_picture:"https://pbs.twimg.com/profile_images/1362957991410954241/spiaMAg2_400x400.jpg",ref_id:"f1143bcc-9ab9-4716-8259-0e5b026f8039",twitter_handle:"JeffBooth"},{name:"George Gammon",profile_picture:"https://pbs.twimg.com/profile_images/1246550014450700291/2n_iHigp_400x400.jpg",ref_id:"7ca1bc4f-3a57-4a6a-bedf-ef47a8b37297",twitter_handle:"GeorgeGammon"},{name:"Neil Jacobs",profile_picture:"https://pbs.twimg.com/profile_images/1593645788978102277/UAQCQKeE_400x400.jpg",ref_id:"0bc759e0-b055-4800-a79d-2b950fe5cc53",twitter_handle:"NeilJacobs"},{name:"Preston Pysh",profile_picture:"https://pbs.twimg.com/profile_images/1408783276081299462/f4Ye5n7-_400x400.jpg",ref_id:"01ad2c81-2d0c-44a9-93a1-42c07287aa80",twitter_handle:"PrestonPysh"},{name:"Brian",profile_picture:"https://pbs.twimg.com/profile_images/1589300685182570500/cTffQlpJ_400x400.jpg",ref_id:"b167b1cd-bbce-4839-a03c-194f006f954d",twitter_handle:"BrianTheDrumer"},{name:"BTC Ben",profile_picture:"https://pbs.twimg.com/profile_images/1348015880664473610/S-uDNLlZ_400x400.jpg",ref_id:"2c95b3dd-e3a2-4cf0-a49e-a8915d2bfcd5",twitter_handle:"bensemchee"},{name:"Craig Shipp",profile_picture:"https://pbs.twimg.com/profile_images/1605961563420114945/MWGqR1Gm_400x400.jpg",ref_id:"8d6ca47a-89a2-4331-bae4-2fae18055a95",twitter_handle:"CraigShipp"}],hosts:[{name:"PUBLORD",profile_picture:"https://pbs.twimg.com/profile_images/1480160632360124416/AM_vVRko_400x400.jpg",ref_id:"8126d933-0986-4fd2-a6be-c02581294463",twitter_handle:"publordhodl"},{name:"Anders",profile_picture:"https://pbs.twimg.com/profile_images/1391477993726529545/xqIjHq5w_400x400.jpg",ref_id:"78672de6-3c5f-4d95-8fd9-f2b512fa7a04",twitter_handle:"Anders_"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/0c42d408-e518-4ecf-b282-d864a8c14002.jpg",keyword:!0,link:"https://stakwork-uploads.s3.amazonaws.com/uploads/customers/2707/media_to_local/dbc5dd26-2307-4f64-a377-105e2a277d9c/be3d47a7-2fcd-4de8-8f22-71851953d022.mp3",node_type:"clip",pub_key:"02574d6e8e787372184b6f17c40d6c6fe1777db9015801f95dfd24692784d767cd",ref_id:"4491ca29-82ab-4599-8d39-039653b35aa3",show_title:"PUBLORD",text:"No, I just did that last night. I literally sent a text to it. I got this guy that I onboarded this year. A few months ago, he's bought a little bit of Bitcoin. He's got like maybe a couple of $100 worth on cash app. And last night, he was finally asking me, he was asking a question. I was like, oh, shit. I left before I could teach you how to use wallet. So literally, I spent 45 minutes writing this text, basically explaining exactly in detail and taking pictures, like how to download, like, blue wallet, create a wallet, save his keys, told him to write them down, and then how to copy and paste the address and explain private keys. And it took a while, but I sent it. And at the bottom, it's like, congratulations. Like, you now own value that nobody can take for you. And I know that when he finishes that, he's a little older guy and he doesn't really know much about tech, he's going to feel really accomplished when he gets that done. And that's such a good feeling. It's like you do forget like Pablo was saying, you get down the rabbit hole, and you forget there are still people at the Tilt, like, they haven't even crossed in yet. And pulling them across even just a little bit and planting that seed, it's an amazing it's an amazing part. I love hearing all this stuff. You're absolutely right. That feeling of that person kind of having and you just know that there's going to be many more AHA moments throughout their bitcoin journey. But witnessing some of those first ones are pretty incredible. And especially this past month or so, I've had an influx and this gets me so bullish. I've had an influx of people booking me for one on ones saying, I've never self custody before, and now is the time, because this year has scared the hell out of me. So SBF has gifted us with a whole new generation of self sovereign hoddlers that are getting their shit off exchanges. I had a session earlier this week with a dude, probably 20s, early 30s, something like that, and his mom, and they were both taking self custody for the first time, and they were doing it on cold cards. His mom learned how to air gap in a transaction, which is incredible, and she did very well. That's amazing. Yeah. And she understood what was happening. As I was saying, like, oh, well, you just need when I was explaining the SD card, I was like, yeah, you bring it over. All you're doing is you're giving a signature like you would on using your credit card. You're signing the transaction. You're giving permission to send only the transaction that's in front of you. And she's like, okay, that makes sense. And she got it. I've been through a ton of these sessions this month, and it's just every time the people are like, this is really not that bad. Like, once you kind of understand what you're doing, it's just getting over the hurdle of saying, okay, I'm going to spend some time to learn this. But once they do, they're like, oh, my God. I don't know why I was so afraid. It's such an amazing feeling. If I did this where I'm doing on the 18th, would any of you be happy to dial in and answer questions? We kind of did, like, a Twitter space for it, maybe I'd be happy to join the space that you're talking about setting up. Also, I'm a fan of the idea of doing a split night. Like, one more for the beginners and one for the people who are kind of well into their journey and just want to connect on more up to date things. You could have sections to the night I've seen people do where, okay, from this time to this time is beginners, and then from this time to this time is advanced. And then you can also encourage the advanced folks to show up for the beginner section so that you have hands on deck to assist individuals as they set up the first wall. Very good. That's a great idea right there. I'll go one further and you have different sections. You can have, like, an upstairs for advanced, downstairs for beginners. Because I'll tell you what, when I saw BTC session in action, trying to explain Bitcoin from zero to now, you are running your own node in 20 minutes. One of the most impressive things you'll ever see. Let me tell you something. Ben knows his stuff. And it was PowerPoint after PowerPoint after PowerPoint, and my eyes were glazed over. I was learning a lot, man. But then he brought it home, beginning to end. Yeah. You got to break it down in small bites. I think that's exactly what I want to do. I want to try and make it, like, fun. We're going to have a laugh and joke. We can make it really typical, but I don't really want to bamboozle people as well. At the same time, I kind of want to build the community like we do on this space. This is a great thing I love about your space, probably, is that we can talk about some random stuff sometimes, but it's just because we're all on the same wavelength. This is why I love hanging out. You know what I mean? It's just hanging out with mates. Yeah. This is where we sort of begin, man. I've always started with just simple questions between each other. But it's tough, man. I mean, to come into this. First off, you're not going to drag anybody 26 miles to a marathon. So the ones that you try to orange pill that you wish, guess what? They better have a good foundational. Understanding that the money system is broken to begin with after that, that's just the beginning, man. That's just beginning. Going down this rabbit hole. Okay, now you think I understood what? I never heard the term Austrian economics until I found bitcoin. What do you mean, Austrian economics? What the hell is going on here? You don't understand that stuff, man. You just go down there, you start learning about the debatement of currency and the Fed, how this all began. Yeah, that's hard to put into one weekend, let alone one day. The money system is broken. You all we know. And the prophecy is coming true tomorrow. It's like Saturday. Easy. It's easy. Educator, sir. ",timestamp:"02:24:15-02:31:42",topics:["bitcoin self custody","bitcoin education"],type:"twitter_space",weight:28.510520965677095},{boost:0,date:1671735703,description:"Possibility of block mining on the hash rate",episode_title:"TOXIC HAPPY HOUR! #Bitcoin, Pysh, Booth, BTC Ben & the Plebs! 🍻😂",guests:[{name:"Jeff Booth",profile_picture:"https://pbs.twimg.com/profile_images/1362957991410954241/spiaMAg2_400x400.jpg",ref_id:"f1143bcc-9ab9-4716-8259-0e5b026f8039",twitter_handle:"JeffBooth"},{name:"George Gammon",profile_picture:"https://pbs.twimg.com/profile_images/1246550014450700291/2n_iHigp_400x400.jpg",ref_id:"7ca1bc4f-3a57-4a6a-bedf-ef47a8b37297",twitter_handle:"GeorgeGammon"},{name:"Neil Jacobs",profile_picture:"https://pbs.twimg.com/profile_images/1593645788978102277/UAQCQKeE_400x400.jpg",ref_id:"0bc759e0-b055-4800-a79d-2b950fe5cc53",twitter_handle:"NeilJacobs"},{name:"Preston Pysh",profile_picture:"https://pbs.twimg.com/profile_images/1408783276081299462/f4Ye5n7-_400x400.jpg",ref_id:"01ad2c81-2d0c-44a9-93a1-42c07287aa80",twitter_handle:"PrestonPysh"},{name:"Brian",profile_picture:"https://pbs.twimg.com/profile_images/1589300685182570500/cTffQlpJ_400x400.jpg",ref_id:"b167b1cd-bbce-4839-a03c-194f006f954d",twitter_handle:"BrianTheDrumer"},{name:"BTC Ben",profile_picture:"https://pbs.twimg.com/profile_images/1348015880664473610/S-uDNLlZ_400x400.jpg",ref_id:"2c95b3dd-e3a2-4cf0-a49e-a8915d2bfcd5",twitter_handle:"bensemchee"},{name:"Craig Shipp",profile_picture:"https://pbs.twimg.com/profile_images/1605961563420114945/MWGqR1Gm_400x400.jpg",ref_id:"8d6ca47a-89a2-4331-bae4-2fae18055a95",twitter_handle:"CraigShipp"}],hosts:[{name:"PUBLORD",profile_picture:"https://pbs.twimg.com/profile_images/1480160632360124416/AM_vVRko_400x400.jpg",ref_id:"8126d933-0986-4fd2-a6be-c02581294463",twitter_handle:"publordhodl"},{name:"Anders",profile_picture:"https://pbs.twimg.com/profile_images/1391477993726529545/xqIjHq5w_400x400.jpg",ref_id:"78672de6-3c5f-4d95-8fd9-f2b512fa7a04",twitter_handle:"Anders_"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/0c42d408-e518-4ecf-b282-d864a8c14002.jpg",keyword:!0,link:"https://stakwork-uploads.s3.amazonaws.com/uploads/customers/2707/media_to_local/dbc5dd26-2307-4f64-a377-105e2a277d9c/be3d47a7-2fcd-4de8-8f22-71851953d022.mp3",node_type:"clip",pub_key:"02574d6e8e787372184b6f17c40d6c6fe1777db9015801f95dfd24692784d767cd",ref_id:"c09cfdab-f18f-45ad-9542-bd095f3ef52a",show_title:"PUBLORD",text:"Well said, DC. Just real quick, I see bitcoin blue. We respect the hands here. I didn't know if you're going to change topics. Did I ever tell you my Easter egg analogy? Easter egg analogy for that? Yeah, I've heard it. Tell it again, though. I like it. Yeah, so it's pretty cool. At a club here, they had different age groups for an Easter egg hunt, and what they did like kids. They had like five and under in one area. Then they had like kids that were six to eight and then like nine to eleven, but they had three different Easter egg hunts going on. All right, so those little kids, look, they're not going to really surf too deep, so they literally would just leave the eggs open on the ground. I mean literally on the ground next to the tree, whatever, progressively got a little bit harder. So the other kids sort of hit them. You can only see a little bit of the egg. They would find them. And for the older kids, of course, man, you got to stuff very deep. So the difficulty adjusting to me is, guess what? There's a certain number of eggs we got to find every hour. You got little kids looking for hard eggs to find. Guess what, man? It's going to take a while. So what do they do? Difficulty adjustment. We're going to take you guys and we're going to put you we're going to take you from the hard part, and once in a while, we got to shift you back down to where everything is out in the open. We're going to give you some of the easy eggs to find, and over the course of everything, that's going to average out to our ten minute block time. I love it. And it's a great metaphor. It's amazing how something like that is like the missing ingredient to a system that can actually regulate itself over a long period of time. It's like truly mind boggling when you consider the computing power that's on Bitcoin today versus when it started. Satoshi ran that shit for like a week before he found Howl, who started running it, or however long it was, how Hal joined. And now there was two people with computers running this code. And today it's just like, absurd. The number of machines that are just computing as fast as they possibly can. Here's the same issuance timing. Here's some fed. TC what guarantees that the next block will be guessed correctly? Nothing. So essentially, there is a possibility for the block. The next block never gets mine. It's true, but we've never seen that happen so far. And the thing about it is, again, humans don't do so well with big numbers. You look at the total hash rate, and it's like over 200 x a hash overhead. That's over 200 million trillion guesses per second. You're saying I'm thinking of a number and you got a million trillion people no, 200 million trillion people standing in front of you all guessing. Wait a minute. 200 million trillion. Is that the omnibus, the next spending bill for the government? Oh, yeah, definitely no. TC it's amazing the foresight that Satoshi had, because in some of his writings you could see that he was saying that, I know in the future, because of Moore's Law, like, computing power is going to increase and blah, blah, blah, blah, blah. And so he's like, oh, it is necessary for this network, for its longevity, to have a way to, like, self regulate. And it's just the level of fucking, like, genius you have to have in order to foresee all this shit and write the code that makes it work. It's just fucking unbelievable. I was telling my friend that the difficulty adjustment is like, what makes it work? It's one of the things that makes it work. But to me, it's like, if it wasn't there, bitcoin wouldn't function the way it does, right? It wouldn't. It's a perfect balance. And where we saw it, really, the first time I saw it unleashed was when China took all those miners offline. And I forget the percentage that came offline. It was 50%. Oh, man. And it worked. It was just beautiful to watch unfold. Because when that adjusted, guess what, TikTok neck block. There's no stopping bitcoin. You can break it down even more, and it's even more beautiful. It's like the hash rate started to come offline. Blocks start to come in slower. Then no more than two weeks later, this adjustment occurs and re incentivizes whoever's still hashing gives them a bonus. They were sitting on the sideline, an incentive to start doing that activity. Dude, I know this first hand. I FOMOD into mining. Last summer, June, July 21, I saw the hash rate plummet. I realized that the difficulty adjustment had crashed, and it was easier to find blocks today than it was a couple of months ago. Let's fucking go. And that's what's really incredible about it, is the resulting incentives that come from those changes while simultaneously stabilizing a system that's having absolute volatile changes. How do you kill something like that? Where the human incentives are, the greed is just, like, ever present. If the fucking hash rate drops, everyone's going to foAmal into mining. Like the small people, like everybody in their house. And it's just so beautifully. It's so elegant, because in a way, it's harnessing forces and variables that are so hard to human psychologies. Like game theory. Whoever came up with bitcoin, whoever Satoshi is, bro, I'll get on your knees and suck your dick. That's the level of fucking, like, why does this shit keep coming up in this room, man? I swear to God. First breakfast because it sucks. The happy hour, bro. I think the longest I've ever had to wait for a confirm that I knew was going to be next block was like, 84 minutes, and the shortest I've gotten I've gotten them were like, literally by the time I go to check, it's confirmed, like, within, like, 20 seconds. So it's crazy how the variance can be. Yeah, bitcoin is beautiful. I said it. Bitcoin ",timestamp:"00:21:59-00:29:16",topics:["block mining","hash rate"],type:"twitter_space",weight:28.510520950548525},{boost:0,date:0,description:"More thoughts, questions and answers on Nation States and the Information age",episode_title:"The Sovereign Individual - The End of Egalitarian Economics",guests:[{name:"chriskapilla",profile_picture:"https://pbs.twimg.com/profile_images/1362817539135463427/2AXUeFLV_400x400.jpg",ref_id:"9d495790-93f2-4d6c-b770-b2885f66859d",twitter_handle:"chriskapilla"},{name:"remydenton",profile_picture:"",ref_id:"5c5beb0c-c214-4f23-b79a-e71bf9368f2d",twitter_handle:""},{name:"JackRonaldi",profile_picture:"https://pbs.twimg.com/profile_images/1583261828628496384/IazkwYjk_400x400.jpg",ref_id:"01621476-f040-49dd-8160-4035228faf78",twitter_handle:"JackRonaldi"},{name:"AlistairZ80Aftw",profile_picture:"https://pbs.twimg.com/profile_images/1362882489895841795/gH2zix3l_400x400.jpg",ref_id:"3dcba197-47ca-40c0-857d-73cec4325801",twitter_handle:"AlistairZ80Aftw"},{name:"mattonbtc",profile_picture:"https://pbs.twimg.com/profile_images/1549459254280687618/jzdHJou3_400x400.jpg",ref_id:"998167d3-e036-4ef1-9a05-4f062903f0c5",twitter_handle:"mattonbtc"},{name:"wai_wairua",profile_picture:"https://pbs.twimg.com/profile_images/1536570699761848320/T10Owc60_400x400.jpg",ref_id:"c4d4ff36-73fa-4471-91ba-de0f99a49e99",twitter_handle:"wai_wairua"},{name:"UltraSolomon",profile_picture:"https://pbs.twimg.com/profile_images/1468332451055427601/YVgUuUHc_400x400.jpg",ref_id:"6371d519-cc98-4bf4-9f82-be17b1ea532a",twitter_handle:"UltraSolomon"}],hosts:[{name:"BTC_Venetians",profile_picture:"https://pbs.twimg.com/profile_images/1557482467539521537/Kel-eVww_400x400.jpg",ref_id:"a6313ca9-3869-4477-88ad-30172957edcf",twitter_handle:"BTC_Venetians"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/75ec86b1-cb6d-467f-a66e-5e642e5c126a.jpg",keyword:!0,link:"https://stakwork-uploads.s3.amazonaws.com/uploads/customers/2707/media_to_local/c8cc9ec1-061d-4f53-a24b-ee43a56c7715/e650057e-2369-4e75-8119-4975a1fc4cac.mp3",node_type:"clip",pub_key:"03eb026c3e6597055595e42299377a4e164982775cc67f1d2135d9f1cd3a89f526",ref_id:"af7832e4-45e7-44e6-a91c-04652f9ce4fa",show_title:"Bitcoin Venetians Book Club",text:"let's move on to my favorite question that I came up with, which was, let's imagine that the nation state doesn't survive and it's a bunch of small sovereignties. I guess where I'm always confused is, as a bigger entity, you're more powerful. So if we split up into a bunch of smaller ones, like, what's to prevent, like, some Genghis Khan coming around and conquering the small, weaker sovereignties, small sovereignties. I guess part of it is the wealth being unconfiscatable, the wealth being situated online rather than in terms of physical resources, in terms of information, and in terms of Internet native money. I find this very interesting. Like, it's kind of the Jason P. Lowry form of address. And I challenge that. Because if you have one country with nukes or greater violence in one country without, and this is physical violence, not informational violence. And the authors having talked about infrastructure being a key component of wealth, it does strike me that the physical you can't just ignore the physical component and a lot of the debates. The nature of violence is shifting, and it's easier to defend your wealth than ever before and much more costly to attack that wealth. And so therefore, the cost of violence is changing and favoring the individual. And I understand that. But at the same time, I just don't think you can ever discount an army moving onto your front doorstep and taking your culture and your home and your roads and everything else. I think I'd have a very similar critique of Jason Larry, whose name was previously banned in the book club, but we'll let you off as you've been away. But I guess the question is maybe the relevant question isn't if there was a large country with big armies, couldn't they just bulldoze everything? But would such a nation be one of the ones that collapsed? Would it be sustainable if it could no longer use extractive techniques against its own population to fund that war? I sometimes wonder if we'll see, like, I don't know, I got to find the right phrase, like cyber Vikings. I wonder if all of the kind of plundering of, like, other small sovereignties would be technological purely rather than physical. Yeah, I think maybe the violence will go into both domains. And I think we already kind of see that with hackers attacking people, especially, like, in the ethereum and rest of the crypto space where people are a bit more careless and there's a lot of security vulnerabilities you keep seeing like hacks tens of millions of dollars stolen all the time. But I think on the physical versus digital violence, I don't know, I think it'd be a calculus for even if it's a smaller attacker and smaller sovereignty, it would be a calculus. Like, let's say we're all on bitcoin and it's sound money. What if we came off of sound money and we funded a big war effort and we could steal people's maybe not their digital welcome bitcoin because you can't crack that security. But I think money at the end of the day is like a means to an end, not an end itself. And the means that it is the end that it's a means to is in the physical world mostly, at least for the time being. And if you can appropriate all of that wealth physically doesn't really matter in my opinion, or it doesn't matter as much what the ledger of bitcoin says if you have the physical wealth. And I mean, I guess a relevant factor is that is the armies these days are less and less human based and more and more technologically based in terms of drones and remote fighting and things like that. So you don't even have the hearts and minds issue that you may have had in the past in persuading people to go to war and give up their lives for this fictitious entity of the nation. I know we've had this discussion quite a few times. Yeah. And I'm just wondering if you follow the trend of the book and you say I mean, we've seen it already, these hyper wealth concentrations where we've already got single people who are more wealthy than entire nations. Significantly more. In some cases and whether or not they will have private armies and then able to fund those armies to then kind of perhaps do what they want. So there is countercases to be made against this claim that things will be defendable in the informational age. But I'm not wanting to get too dystopian. I still think that it is a powerful force for positive, and it's quite hard to weigh. It's very hard to weigh what force will mean more and how it gets discounted. Talking about a nation state funding its military, how much of that defunding through perhaps bitcoin, how much of that will actually have an effect. It's really hard to quantify. ",timestamp:"01:02:09-01:08:19",topics:["Economies of Scale","Nation States","Information Age"],type:"twitter_space",weight:10.800045251846313},{boost:0,date:null,description:"Hosting family thanksgiving and discussing bitcoin",episode_title:"Café ₿: Thanksgiving Special 🦃 w/ the Café Bitcoin Crew",guests:[{name:"Rob Hamilton",profile_picture:"https://pbs.twimg.com/profile_images/1524033110630969351/wTUr8S36_400x400.jpg",ref_id:"94b18625-4778-4cfe-9c78-823704d1c1b1",twitter_handle:"Rob1Ham"},{name:"Tomer Strolight",profile_picture:"https://pbs.twimg.com/profile_images/1591960241008148481/HtyINxtU_400x400.jpg",ref_id:"3a2bc97d-072c-4ed9-9a59-17ceeb68fe99",twitter_handle:"TomerStrolight"},{name:"DJ Satoshi",profile_picture:"https://pbs.twimg.com/profile_images/915987644043030528/5nh3JQSz_400x400.jpg",ref_id:"02ae35cb-3728-441f-84c5-a8db5d9150b4",twitter_handle:"satoshi__tomiie"},{name:"Lauren",profile_picture:"https://pbs.twimg.com/profile_images/1586022214901501952/U1dRyCxP_400x400.jpg",ref_id:"7f14bbf5-a60b-496b-a361-3663cf120299",twitter_handle:"LaurenJauregui"},{name:"Shaeroden",profile_picture:"https://pbs.twimg.com/profile_images/1560742113410678789/cHZ2tUjU_400x400.jpg",ref_id:"0da06a5c-038f-4737-9af7-17bed3712e68",twitter_handle:"Shaeroden"},{name:"Andres",profile_picture:"https://pbs.twimg.com/profile_images/1401952614795943950/aL2h3Wb4_400x400.jpg",ref_id:"db4abfe9-e3bb-4ffa-9783-ce67f5b20270",twitter_handle:"andresvbr9"},{name:"Peter Ansel",profile_picture:"https://pbs.twimg.com/profile_images/1374726811221954565/R7ttqYMI_400x400.jpg",ref_id:"2d418514-e03c-414d-8ed1-10c894aacb6e",twitter_handle:"peteransell"}],hosts:[{name:"Alex Stanczyk",profile_picture:"https://pbs.twimg.com/profile_images/1539055022364708864/rwErK6x1_400x400.jpg",ref_id:"3126e2a3-bbe4-456b-b298-9714085fa286",twitter_handle:"alexstanczyk"},{name:"Neil Jacobs",profile_picture:"https://pbs.twimg.com/profile_images/1593645788978102277/UAQCQKeE_400x400.jpg",ref_id:"0bc759e0-b055-4800-a79d-2b950fe5cc53",twitter_handle:"NeilJacobs"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/239722cb-4216-414a-a17b-5adf9d52e15a.jpg",keyword:!0,link:"https://stakwork-uploads.s3.amazonaws.com/uploads/customers/2707/media_to_local/c25e3b3c-b5ef-435e-9e7d-9e406089e7b1/572908d4-f2cc-4c7b-980c-8359d2c8000d.mp3",node_type:"clip",pub_key:"02574d6e8e787372184b6f17c40d6c6fe1777db9015801f95dfd24692784d767cd",ref_id:"5faa3765-8f15-41c7-8c8e-6136a0e67b5f",show_title:"Swan.com",text:"Hey, I appreciate what American Huddle said. I don't know if it's a funny story, but it's a few years now that I've been hosting my family's thanksgiving. And I'll tell you that flips everything on its head when you're the host, I tend to find that there's a lot less of that kind of reactionary stuff in your direction. I don't know if people are just minding their manners more because you're serving them a feast, but it goes a little easier. And a couple of days ago, my mother in law rolls into town. Last year, I was talking her up about bitcoin. I sent a small amount to a blue wallet on her phone, got her set up, and first thing she says to me when she shows up, she says, did you see what happened to bitcoin? And that's when last night I thought it was funny. I sat her down in front of YouTube, and I played her this one time, and then it crashed. Video from YouTube, and she kind of had a blank stare after that thing played. I hope you guys know what video I'm talking about. The guy who says, this one time, bitcoin went from way up to $36 and then it crashed down to $20. Yeah. Anyways, find that video if you haven't seen it, but you fill in the blanks. I think that one ended at the cycle that peaked at around 1200. So you kind of fill in the blanks of then it went to 20 and crashed down to three, and then it went to 69 and it crashed down to 15. And you kind of help them fire off a couple of brain cells and put two and two together and realize sort of the bigger picture and the fact that they have the time frame of a mosquito and the way they're thinking about it. So for me, that was gratifying to kind of actually see a little light bulb go off in my mother in law's eyes last night when I was showing her that. So yeah, I don't know, maybe that works for somebody else. I've never actually heard that one. Jacob found it. No, he's going to play it right now. Oh, epic. Right now. Role. This one time bitcoin went from way to it crashed down to another time bitcoin went from way to $29. And then it crashed $3. And then another time bitcoin went all the way to $213. And then it crashed all the way to $70. And then another time bitcoin went all the way to $1,100. And then it crashed all the way to $239. So the moral of the story is don't buy bitcoin because you know it's going to crash again. He did a follow up tweet too. Then like the next bull market, he also said nothing. That video is so priceless because I'm pretty sure he's serious. I keep going back and forth between it's sarcasm or he's actually serious. But either way you got to watch it, Alex, because just the expression on the guys face. And then he's a bitcoin on Twitter. I didn't know his name. What's his name? Let me give his last name. 1 second. Yeah, I mean, I played that for my mother in law last night and then continued it. It went all the way up to 20,000 and it crashed down to 3000. You kind of have to help people because they still don't realize they hear that word crash and all they think is bad, bad, bad. You kind of have to put two and two together for them. But yes. Anyways, maybe that will help anybody with their relatives. You're welcome. That's hilarious. Shout out to Q in the audience. Going to throw you an invite. We need to remove somebody. Jacob, you be the bad guy. Take me off. Take me off. I'm handling my kids. And then also Brad Mills. What we're doing today, guys, is we're just telling funny or interesting thanksgiving or otherwise bitcoin stories. It's been pretty light, pretty chill and fun. I think it's worth noting. I think it's worth noting too, when you're talking with family and bitcoin, especially over. Time because you're going to be right. With time, you're going to be right. The bear markets, people poke funny or whatever, that's fine. But given enough time, you're going to come out looking so smart and so intelligent. I think that's where the stay humble part comes in. And you kind of have to be a little graceful with being right, at least around family, in my opinion. Sometimes when you're on Twitter, it's fun to be like, yeah, what's up, bitch? You were wrong, motherfucker. But like, I don't really say that's, like my aunt or something. The problem is if your family finds your Twitter and then they know how you're thinking anyway, so you can, like, try and be so polite. But then, like, three days before you showed up to Thanksgiving, you were like, bro, when I see these pores, I'm going to be just thinking, fuck you in my head. So just don't tweet stuff like that. You know what I mean? Don't be one to yourself. Maybe share that with your wife. We're all learning here. Hey, Q, tell us some funny or interesting bitcoin stories, man. I told you so. I've gotten this week have been actually kind of hilarious, I will say. Just the overall response and naivety of normaland versus especially those of us who I think very much understand the difference between bitcoin and crypto. The conversations I keep hearing is like, oh, shit, bitcoin is going to go to zero now because Sam is like, not going to be a thing that FTX is going under. It's really funny, at least to me, because at this point, I'm just like, you're right. You're absolutely right. We're not going to make it. And then I love my favorite thing is it's always people who are very bullish on the tech industry as a whole. And so it's just a very simple, how's your SaaS portfolio doing? How's that Facebook stock treating you? Everything's kind of gone to shit. So I don't know. It's pour yourself a nice heavy glass of whiskey, put your legs on the table and just let's see who bled the least, not who made the most, if you will. But I don't know. Painkillers are fun right now. I just wanted to say to the Swan family, thank you very much for everyone who hit me up after Pacific Bitcoin. Like, I am successful surgery and fully recovering right now. My Achilles. That's awesome too. I have this one uncles who will not stop calling bitcoin bitcoin, and they've been calling it bitcoin to my face since 2015. And I'm like, did you guys all miss the part where I became the richest person in the family or no, a ",timestamp:"01:05:22-01:13:51",topics:["family thanksgiving","bitcoin crash","bitcoin discuss"],type:"twitter_space",weight:10.792905569076538},{boost:0,date:1637366400,description:"The narrative around nuclear energy is getting louder and more encouraging for Bitcoin mining communities",episode_title:"Securing Bitcoin With Nuclear Energy",guests:[{name:"Nuclear Bitcoiner",profile_picture:"https://pbs.twimg.com/profile_images/1443185278525579278/_Yl1nao1_400x400.jpg",ref_id:"60f5891f-0864-4ed4-987a-81da4768b3ba",twitter_handle:"nuclearbitcoinr"},{name:"Eric McErlain",profile_picture:"https://pbs.twimg.com/profile_images/1252969137/Screen_shot_2011-02-23_at_10.59.21_PM_400x400.png",ref_id:"4815365d-44d0-4b06-9d9e-32070158d03c",twitter_handle:"atomiceric"},{name:"Puru Goyal",profile_picture:"https://pbs.twimg.com/profile_images/1590742805613203456/QAtYq_C__400x400.jpg",ref_id:"c24af059-b38b-4ce5-9547-9192c9eff579",twitter_handle:"purugyl"}],hosts:[{name:"Zack Voell",profile_picture:"https://pbs.twimg.com/profile_images/1595803006737448961/fFrf7VJb_400x400.jpg",ref_id:"e32c7661-c635-4089-a620-ffce509eff0e",twitter_handle:"zackvoell"},{name:"Compass Mining",profile_picture:"https://pbs.twimg.com/profile_images/1425165074373791744/f2CgInvP_400x400.jpg",ref_id:"812e5d37-47fb-4077-915f-df52e2ef84d8",twitter_handle:"compass_mining"},{name:"Will Foxley",profile_picture:"https://pbs.twimg.com/profile_images/1580970227193376776/9oQfeExj_400x400.jpg",ref_id:"704b9e82-3e40-40b6-874c-6bb8fadafbef",twitter_handle:"wsfoxley"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/ae91fac6-a1af-4877-9a92-e793d556ee66.jpg",keyword:!0,link:"https://www.youtube.com/watch?v=YBaA17NODlA",node_type:"clip",pub_key:"03c18d0c6c35333f22bc524e21a5fd1d2d9886f5d4d958dc1de95d025de5c84cfc",ref_id:"34c231bc-7fcf-4f55-a124-d67b008399a0",show_title:"Compass Mining",text:"to have you continue that train of thought, elaborate more on where nuclear stands now compared to maybe where it did a decade ago. Well, the Fukushima event definitely derailed the deployment of generation four reactors and put that on delay for a while. So it seems like we're finally just starting to get back around to that. But I agree with you. The narrative around nuclear has gone for a complete flip just in the last few months, and it's reinvigorating and very encouraging to see that level of public participation and growth and notoriety growing and getting better and leaning less away from outdated, basically, flood. For nuclear relies on the old technology and basically problems that have been solved or in the process of being solved. My interest has been mostly in the advanced reactors, in the small modular reactors like the little little guys like the 1, because I've gotten really obsessed with the small the SMR action plan here in Canada where we are planning to basically upgrade remote communities from diesel generation to nuclear power. And some of these communities, the electricity prices out there are outrageous. It's pretty lucky for the communities that can get diesel barged in. But some communities that need to get their fuel shipped in, they're paying as much as ninety cents a kilowatt hour, sometimes even more. And that all gets subsidized so that it equalizes with the on grid prices. So that's a lot of money that could be spent for better investments if we could get a more stable long term energy supply in there that doesn't need to be constantly refueled. But the reason that I see Bitcoin mining being a super good amplification for that is that it just completely eliminates the demand risk of making these investments before the current situation is there's a lot of hesitancy to build large generation projects in far remote communities because there isn't a customer base to recoup that investment. But now we can deploy in excess and deploy a customer right alongside the reactor that will scoop up everything and then be perfectly aligned to the generation profile and they can be scaled and adjusted as needed. Depends on how communities grow there's. A lot of this is going to be used for remote conventional mining applications so they can incorporate bitcoin mining as a way to just better economize the reactors that they plan to use for their operations. And this is going to be a complete game changer for these communities that they've been energy impoverished for generations. And some of the stories that you hear about remote communities in Canada, especially indigenous ones, it's hard to hear and you want to come up with a solution to fix it. But the conventional problem has just been throw money at it and all that does is it just seems to just go down a hole and it invites corruption and it never goes to places that it needs to. These people need water resources, they need better food and just fixing the energy will have a cascade effect and resolve all of that. Yeah, no I agree 100% with all of that and it's crazy to watch people sort of in these conversations realize the location independence and almost unlimited demand for energy from bitcoin miners and how that resource can be deployed to very quickly and easily expand like energy infrastructure for nuclear or other energy sources. It's just insane and almost unprecedented. Before we dig into that though, I did want to know if peru if you had anything to add on to that with regards to the inflection point, a flip in public perception, nuclear skills poised for massive growth, like real growth infrastructure wise and popularity growth as well. Yeah, I think that makes sense to me. Also, one more thing I want to point out is a lot of the reactors that we see online today have been built out to 1970s and we haven't seen growth in reactor build out since then. And I think it's important to understand the energy market that we are currently living in to figure out why nuclear hasn't made a push so far. Nuclear accidents have definitely changed the world public perception over time and they do not help for sure because it's such a political thing. But apart from that, if you look at the energy build out that's happened especially in the United States, and if you look at the generations have been brought online then you'll see a period between 2000 and 2005 where there was a massive build out of natural gas power plants all around the United States. I think combined my numbers might be slightly off but I think in those five, six years combined there was around 200 gigawatts of natural gas power plants just built in the United States. And what led from there was just cheap natural gas prices. And nuclear has found really tough and not just nuclear, even coal power plants have found it really difficult to exist in a market environment like this where natural gas is certainly so cheap. So it just depends on like the build up that happens and now, I think the opportunity for special advanced nuclear reactors would come probably, I think, in 2030 to 2040s. That's the time frame where a lot of these existing power plants that we have currently are going to retire, especially, I mean, any predictions on energy markets generally are wrong, but I don't want to say that, but I'm looking at the trends. I think a lot of the existing plans are going to retire in 2030. And that's where I also wrote this on a Twitter thread where I feel that's exactly the opportunity which a lot of these private companies in the advanced nuclear reactor space are trying to fight for. So that's another important factor, aside from the accidents over time which have changed public perception. Got ",timestamp:"00:15:37-00:21:49",topics:["Nuclear Energy Narrative","Bitcoin Mining"],type:"youtube",weight:10.626491553126828},{boost:0,date:1633737600,description:"Miner extractable value on Bitcoin",episode_title:"Understanding Miner Extractable Value On Ethereum",guests:[{name:"Nathan Worsley",profile_picture:"https://pbs.twimg.com/profile_images/1576238702908637186/xzcScTyV_400x400.jpg",ref_id:"20529242-4546-475a-af1a-125b83aedd81",twitter_handle:"NathanWorsley_"},{name:"Robert Miller",profile_picture:"https://pbs.twimg.com/profile_images/1595788538938695680/w6i5Q6s4_400x400.jpg",ref_id:"292cfadd-7e67-4e34-876b-99804d416e20",twitter_handle:"robertjmiller_"},{name:"Jordan Frankfurt",profile_picture:"https://pbs.twimg.com/profile_images/1544902585462788097/bGe0hNIi_400x400.png",ref_id:"149db25a-26b1-4f69-8c9e-ec87e08ab8c8",twitter_handle:"jordanfrankfurt"}],hosts:[{name:"Will Foxley",profile_picture:"https://pbs.twimg.com/profile_images/1580970227193376776/9oQfeExj_400x400.jpg",ref_id:"704b9e82-3e40-40b6-874c-6bb8fadafbef",twitter_handle:"wsfoxley"},{name:"Zack Voell",profile_picture:"https://pbs.twimg.com/profile_images/1595803006737448961/fFrf7VJb_400x400.jpg",ref_id:"e32c7661-c635-4089-a620-ffce509eff0e",twitter_handle:"zackvoell"},{name:"Compass Mining",profile_picture:"https://pbs.twimg.com/profile_images/1425165074373791744/f2CgInvP_400x400.jpg",ref_id:"812e5d37-47fb-4077-915f-df52e2ef84d8",twitter_handle:"compass_mining"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/ae91fac6-a1af-4877-9a92-e793d556ee66.jpg",keyword:!0,link:"https://www.youtube.com/watch?v=6IxaLCPm6_E",node_type:"clip",pub_key:"03c18d0c6c35333f22bc524e21a5fd1d2d9886f5d4d958dc1de95d025de5c84cfc",ref_id:"03c6b2f5-685e-4921-a230-e14e5679f792",show_title:"Compass Mining",text:"on some level the answer is very simple in terms of comparative me v opportunities and strategies and development on Ethereum other chains versus bitcoin. On another level, maybe the answer is a little bit more intricate. But my question is basically in context of everything we've described and explained and understood so far in this conversation about Me V. Like why basically are there this many opportunities and this much development attention to minor and maximum extractable value on the bitcoin chain as opposed to a theorem and other chains? And maybe to add a little bit more interesting content to that answer, like if or when would anything like that change for Bitcoin? Maybe as a preface or to set up some of your answers, I know we're seeing an increasing amount of developer attention paid to covenant contracts, bills for bitcoin and Lightning and if those reach a pretty high level of sophistication there could be some interesting opportunities for MVP on bitcoin. Right now there just really isn't that much. So I'm curious to know your guys'insights on why that is and what, if anything, would sort of be a catalyst to kind of change that situation for bitcoin miners. Nathan, maybe you go first and then everybody else can jump in. Yeah, sure. I think it's just simply a function of the size of D five currently on bitcoin and that if we see that start to change, then we'll see the me the situation starts to change on bitcoin. Really like the incentives and the opportunity from me v not entirely, but mostly being generated by DFI and the DFI economy is just bigger than Ethereum at the moment. We are seeing people starting to make inroads into bitcoin with D five development and as that becomes bigger, I think these problems will become more pertinent bitcoin. I've been philosophically, it takes a very conservative approach to a lot of these issues. So they've pushed off a little bit of the default development down the road a little bit and I guess using Ethereum more as a testing ground to see how these issues have worked out. Yes, for sure. Robert, go ahead. Anybody? I think Nathan hit the spoke to it very well, I think. I would also note that there's more mev on bitcoin than I think bitcoin is like to acknowledge. In particular, there's a lot of griefing vectors that you can make money if you assume that you are a counterparty in a channel and a minor in the lightning network. So you just grief. Your counterparty take a lot of their money and I think most of that payment ends up going into a minor. There's like a bunch of different vectors for that as possible. There's a good article on this by a lightning developer, Lisa Nicole on Twitter. And then I think that there's some mev in bitcoin that just isn't really being exercised by miners right now. And there's some sort of theoretical mev that you could imagine too. So I kind of think of if there's giant arbitrage opportunities between centralized exchanges and you really wanted to be the first person to make a deposit at one centralized exchange, everybody is sold. You need to get new bitcoin on boarded there. You could imagine a minor exercising their control over yeah, this is the one. You could imagine a minor exercising their control over transaction ordering to be the only party that deposits at that centralized exchange and thus is able to capture the arbitrage. Something like that. Yeah, no, that makes sense. I actually forgot about this article at Austin Bit Devs a bit ago. They mentioned this for anyone watching who's interested in lightning and also mud, which I guess the Venn diagram there might be pretty small, but it's a great read. She explains some pretty interesting concepts. Yeah, Jordan, curious to know your insight too. You and I personally offline talk a lot about bitcoin and ethereum compared to ecosystems. MVP on bitcoin pretty small. What, if anything, would change that? Yeah, I think actually, Robert, the clockwork paper that you wrote had there's a section of it that gave me, I think, a decent or a better generalized framework for thinking about MVP opportunities. And it's just that, like, every MVP opportunity is like highly context dependent. And when you have a chain like ethereum where there is more context, like there's more state that can be manipulated, you therefore will have more MEB opportunities. So in the state, or in the case of bitcoin where you're primarily just managing transfers and just etxo's everywhere, there's a much simpler state surface on the chain than there is on ethereum. And ethereum is like orders of magnitude more complex and therefore creative people can find more interesting things to do to manipulate. So that state surface might change. For bitcoin. With ethereum, there's obviously certain changes that are happening with like, channel disputes and we'll see if there are more in the future. I'm sure that people are going to keep building on bitcoin and maybe someday we'll see some cool new opportunities arise. Maybe we should build it. Jordan. I mean, there's already plans, right, for AMM on bitcoin. I think Jack Dorsey said he's going to build it. So, I mean, as soon as that AMM is this, there's instantly mere available on Bitcoin, you can't have the AMM without having mev. It goes back all the way to that FHIR network or something like that back in 2015 that Matt Carello tried to build was that relay network. Those are also I always see them as infrastructure for maintaining mev, so it certainly exists. And James Preswich and Hustle and one other author have a paper back in 2019 talking about bitcoin mev and how that would lead to chain instability, which, Robert, I know you and I had a few Twitter DMs about. That subject like, what would it look like for transaction fees to become such a bounty for miners to start looking at reorganizing that network? Which would be pretty interesting. ",timestamp:"00:21:48-00:27:58",topics:["Bitcoin Miner Extractable Value","Lightning Miner Extractable Value"],type:"youtube",weight:10.626491547282228},{boost:0,date:null,description:"Experimenting with the Raspberry Pi",episode_title:"Reverse Proxy - #Bitcoin Nodes - NGINX is the Answer!🦾",guests:[{name:"Pedro",profile_picture:"https://pbs.twimg.com/profile_images/1395874649876140035/z-IycTAj_400x400.jpg",ref_id:"78acd8b7-3097-40c3-b626-245bc911dc49",twitter_handle:"pedromvpg"},{name:"Machankura",profile_picture:"https://pbs.twimg.com/profile_images/1536075376409059331/0zddZFmE_400x400.jpg",ref_id:"855f2d8f-2230-475d-b5c1-dcaace579de4",twitter_handle:"Machankura8333"},{name:"DJ Satoshi",profile_picture:"https://pbs.twimg.com/profile_images/915987644043030528/5nh3JQSz_400x400.jpg",ref_id:"02ae35cb-3728-441f-84c5-a8db5d9150b4",twitter_handle:"satoshi__tomiie"},{name:"Portland.HODL",profile_picture:"https://pbs.twimg.com/profile_images/1562306406526492672/LiqmI9NS_400x400.jpg",ref_id:"aaa58ce5-7907-4c3a-9881-839cd012c456",twitter_handle:"PortlandHODL"},{name:"anonsats",profile_picture:"https://pbs.twimg.com/profile_images/1601204123818401792/iQ85pwvS_400x400.jpg",ref_id:"f3bf3677-9864-4fe3-a8b0-976a67be45cd",twitter_handle:"anonsats"},{name:"₿rettInThe13%",profile_picture:"https://pbs.twimg.com/profile_images/1593104719311929345/tTSjoS2n_400x400.jpg",ref_id:"0ad02828-02ee-465b-87c6-96e559905ed8",twitter_handle:"brettinthewoods"},{name:"EasySats",profile_picture:"https://pbs.twimg.com/profile_images/1593330030905540618/ZHqVPhTM_400x400.jpg",ref_id:"d6d16cf5-4a9b-4517-897d-5cf98467ed1a",twitter_handle:"EasySats_"}],hosts:[{name:"okin@8333.mobi",profile_picture:"https://pbs.twimg.com/profile_images/1518945775685967873/O0wPrIKO_400x400.jpg",ref_id:"7af60fa9-1611-4029-b691-aa1481f99062",twitter_handle:"OKIN_17"},{name:"Dread",profile_picture:"https://pbs.twimg.com/profile_images/1532557131819491328/vvs1cD-7_400x400.jpg",ref_id:"e61af76b-8fbd-4719-b753-0a70edd22fa8",twitter_handle:"PoleVaultDream"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/30180c4d-27f9-4215-81e0-6a22b16aba43.jpg",keyword:!0,link:"https://stakwork-uploads.s3.amazonaws.com/uploads/customers/2707/media_to_local/e464bf90-24b2-48ec-b50a-e51c45412a19/00d3308d-b0b8-452b-a4bb-6025a731c457.mp3",node_type:"clip",pub_key:"03c18d0c6c35333f22bc524e21a5fd1d2d9886f5d4d958dc1de95d025de5c84cfc",ref_id:"896a10a9-621e-4f5e-a8d7-d4504dffd923",show_title:"okin@8333.mobi ⚡️ 🏰",text:"Dell laptop, right? You can install NGINX on that, and then you can forward traffic through that Dell laptop into a Raspberry Pi that's running another node for you. You can do literally whatever. You can create this mangled net of whatever you want and point anything to anything internally. It typically works. There are a couple of caveats, but overall yeah, you don't even have to have it running on the same machine. Just the traffic has to initially hit NGINX first. That's the only requirement that it goes through NGINX first so that it can get routed. Blessings, blessings. I'm just going to have so much fun. Wow. Do it. Well, the Dell laptop is currently not a laptop anymore. That is an embassy node. As Dread said, once you use the X 86 hardware, it literally you put another OS on it. So it's running. I don't think it has any access to terminal anymore. But I do have my 20, my 2011 2010 MacBook Pro. So that one I'll probably do it. On, and you can still SSH into it and you know, you I mean, you still have root access to your machine, so you could do whatever you want. Yeah, you still do that's true experiment? Yeah. Go for it. Portland. Oh, I was going to say, as a note, we kind of mentioned earlier that Ram was one of the biggest factors as part of the IBD. So the initial block download. So when your device downloads the Bitcoin Core client, then you got to sync it up. My experimentation on specifically the Raspberry Pi is that the Raspberry Pi is not memory limited, it's processing power limited. And that is due to the Secpk basically message the elliptic curve cryptography that is happening, the processor literally cannot handle that amount of processing quickly. Like it takes forever. And I did this by doing the Perf tools in Linux and basically watched for which functions it was calling the most often. And the two of them were basically some square operations for that encryption library and some multiplication operations that were just getting ran again and again and again. And that's why on these Raspberry PiS it makes sense that they typically with the initial block download, it does really good until you kind of hit like 2017 or block right around like 500,000 or so. And then Seguit comes in and you start getting actually like complex transactions in there. And that is because it's spending so much time processing all these encrypted messages and validating that they're all valid. And where that goes is x 86 hardware is so much faster at doing these operations and that's why even installing bitcoin core and downloading these initial block downloads over on these x 86 machines that aren't as small as the raspberry pi. But it's so much more performant is because of the fact that these machines are so much better at handling these kind of operations quickly and efficiently. The Raspberry Pi just sits there and churns and churns and churns. And that's why even towards the very last part of the IBD nowadays, usually like the last like 10%, it is just excruciating while this little pie is just churning numbers all the time. And whether you have 4GB or 8GB, I found does not matter one bit. Both still take a long time. Two to four is a difference, I will note that. But four to eight, there's no difference at all. That's interesting. I had a different result because testing all the embassies we've had to down, I've done like 20 IBDs in the last month, and I have a Raspberry Pi for four gig and a Raspberry Pi for eight gig with the exact same config set up on the embassy. And the four gig took usually between seven to 14 days to finish. To your point, excruciatingly slow for the last 5%, but the eight gig actually did it in 72 hours, sometimes a little bit less in some cases. I'm not sure that's because we cranked up the cores in the bitcoin.com, but it definitely moves faster than the four gig for us. I would like to look into this because my theory was based on one thing as well. So I looked at the memory usage and both for me, this is just bitcoin core. I'm not running a suite on top, right? So I'm just running bitcoin core. Both Raspberry PiS basically tapped out at about 2.7 to 2.8gb of memory usage. So that was kind of like I double checked and that's why I ran the perf tools, is to verify that what's actually going on under the hood here. And I verified same SD card in both of them. So they both have the same transfer speed. The memory isn't being used. So my thought is like, tell me if I'm wrong here, but if it's only using 2.7 gigs and both are taken like you said, it was roughly about two weeks to complete on both the four and the eight gigabyte, and it's not using the extra Ram. That's why the results are roughly the same, I believe, but those are my thoughts there. Even if you get eight, it's not going to touch that amount of memory. Have you measured the memory usage when you're doing these IBDs? Not going to remember. I remember they were both being maxed out on the processing power, but the memory usage, I don't remember if it was using more than 2.7. I didn't check it. But the one thing that I was going to ask you is, did you tinker with the bitcoin.com any at all? Did you try to change any of the settings? There no okay. On my actual production node I do, but on this, for this experiment, no, I did not. And I actually have a nice little write up on my Twitter where I also compared this to the IBD on some X 86 architectures as well as the IBD on different types of devices, HDD, SSDs and 2.5 inch 5400 rpm laptop drives. This was just like a barrage of different tests I was running on these to see, like, okay, where is the Achilles heel in the initial block download? And one thing you noted thread that I think points to my theory being maybe more correct. And again, anybody come up and tell me if there's a reason why this is wrong? You mentioned that the Raspberry Pi processor was at 100%. That's the bottleneck at that point, right? That means the car is floored, it can't go any faster. And those Raspberry PiS between the four and the eight gigabyte are basically the same frequency. So I don't know unless there's some other little bottleneck or something that I could be missing that the limitation at that point is literally how many cycles does it take to complete this total download? And that is if you're running at 100% CPU, which is the case. That's why I experimented with this, is that, yeah, the CPU, it's bound to that. That's as fast as it can go because it's using all of the resources of the brain to do it. Yeah. I would need someone smarter than me to tell you what resources are being used to make it go faster in each case. But what I can tell you is that in the conf, I would tinker if I were you. I tinker with the RPC threads, the threads that are used to handle and also tinker with the work queue to service the RPC calls. I think those two settings and the configuration might boost even though the processing power is maxed out. I'm not sure how it goes faster, but it seems to handle the heavier blocks better. It's almost the same speed for the first four years of IBD. But after that, it seems like if you increase the work beyond the queue, the work queue and the threads, it seems to speed up on the bigger blocks. ",timestamp:"01:47:37-01:55:51",topics:["Raspberry Pi"],type:"twitter_space",weight:10.239102840423584},{boost:0,date:1671735703,description:"What is Difficulty Adjustments?",episode_title:"TOXIC HAPPY HOUR! #Bitcoin, Pysh, Booth, BTC Ben & the Plebs! 🍻😂",guests:[{name:"Jeff Booth",profile_picture:"https://pbs.twimg.com/profile_images/1362957991410954241/spiaMAg2_400x400.jpg",ref_id:"f1143bcc-9ab9-4716-8259-0e5b026f8039",twitter_handle:"JeffBooth"},{name:"George Gammon",profile_picture:"https://pbs.twimg.com/profile_images/1246550014450700291/2n_iHigp_400x400.jpg",ref_id:"7ca1bc4f-3a57-4a6a-bedf-ef47a8b37297",twitter_handle:"GeorgeGammon"},{name:"Neil Jacobs",profile_picture:"https://pbs.twimg.com/profile_images/1593645788978102277/UAQCQKeE_400x400.jpg",ref_id:"0bc759e0-b055-4800-a79d-2b950fe5cc53",twitter_handle:"NeilJacobs"},{name:"Preston Pysh",profile_picture:"https://pbs.twimg.com/profile_images/1408783276081299462/f4Ye5n7-_400x400.jpg",ref_id:"01ad2c81-2d0c-44a9-93a1-42c07287aa80",twitter_handle:"PrestonPysh"},{name:"Brian",profile_picture:"https://pbs.twimg.com/profile_images/1589300685182570500/cTffQlpJ_400x400.jpg",ref_id:"b167b1cd-bbce-4839-a03c-194f006f954d",twitter_handle:"BrianTheDrumer"},{name:"BTC Ben",profile_picture:"https://pbs.twimg.com/profile_images/1348015880664473610/S-uDNLlZ_400x400.jpg",ref_id:"2c95b3dd-e3a2-4cf0-a49e-a8915d2bfcd5",twitter_handle:"bensemchee"},{name:"Craig Shipp",profile_picture:"https://pbs.twimg.com/profile_images/1605961563420114945/MWGqR1Gm_400x400.jpg",ref_id:"8d6ca47a-89a2-4331-bae4-2fae18055a95",twitter_handle:"CraigShipp"}],hosts:[{name:"PUBLORD",profile_picture:"https://pbs.twimg.com/profile_images/1480160632360124416/AM_vVRko_400x400.jpg",ref_id:"8126d933-0986-4fd2-a6be-c02581294463",twitter_handle:"publordhodl"},{name:"Anders",profile_picture:"https://pbs.twimg.com/profile_images/1391477993726529545/xqIjHq5w_400x400.jpg",ref_id:"78672de6-3c5f-4d95-8fd9-f2b512fa7a04",twitter_handle:"Anders_"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/0c42d408-e518-4ecf-b282-d864a8c14002.jpg",keyword:!0,link:"https://stakwork-uploads.s3.amazonaws.com/uploads/customers/2707/media_to_local/dbc5dd26-2307-4f64-a377-105e2a277d9c/be3d47a7-2fcd-4de8-8f22-71851953d022.mp3",node_type:"clip",pub_key:"02574d6e8e787372184b6f17c40d6c6fe1777db9015801f95dfd24692784d767cd",ref_id:"17d338d5-a11d-405f-bbc1-257b4e145723",show_title:"PUBLORD",text:"I tried something new out. I just put out the first little sort of educational thread from the time chain calendar account. It's the last one on the next at the top. It's only four posts really short. It's just a little explanation of the difficulty adjustment. I'm just floating it out there. I want to see if anybody appreciates that, if it's useful to anyone. I want to start basically sort of attempting to describe the most important aspects of bitcoin in these very small bitesized chunks that people can hopefully wrap their head around and then put those things together and have a better understanding of things like city showers. He might appreciate it. He might need to update his mental model of what the difficulty adjustment is. Difficulty adjustments means, for example, instead of just talking bitcoin, like, do something with a bitcoin. I'm just setting up my new hosting service in Europe, which is going to provide self custodonial virtual private servers with the preinstalled BTC pay server, whoever is interested to I'm still not going to announce the official link to the website because I'm working on It hosted service for self custody. So it means like no. Is that not an oxymoron? No, it's no KYC. Because me, as a hosting provider, I'm just dealing with infrastructure. I'm not holding the code. Yeah, but if you're providing the infrastructure, how is it well, that's really stupid of you to say that. If you were like an It guy, you would understand. That's funny. I'm speaking English. It is my native tongue. Try again. City show. Here's the thing, my man. Go ahead, hit the little mute button. I muted you for a second there. You can unmute yourself. Well, that's the thing about custody behavior. Like in these democratic spaces where everyone can vote their opinion, there is always our it's not democratic. We're having a party. We love to talk bitcoin, we love to meet new friends. Same thing. But the warm welcoming from the Pub Lord was like really unnecessary. Whoa. It wasn't Puppy. It was TC. Man, puppy has been quiet. This is TC. I like to mute people when it gets out of hand. Sometimes it's as simple as just something absurd has been said. I haven't said a word yet today, but what's up, Pubby? How are you doing? I'm doing good, man. We're off to another rousing start like we were yesterday. Yeah, goers. I really do want to know truthfully. Please. How is you hosting a service, self custody, for anyone? Because you own the root privileges to that server. So it means you are the only person who is in charge of that instance. So whatever happens with that instance is up to you. I'm not managing how do I know you don't have the root credentials? Well, it means like, if you're running a route and you can check out the ch root group, you can only see that you are the only user in that. Right, but if you set it up, how do I know you don't have the same credentials? I don't have the credentials because when you spin up the template of the OS, for example, Linux instance, or whatsoever, you are the only person who can access the server and manage it on the root level. Wait, so you're creating software that other people host themselves? No, the software has been already created by the community. Of course it's open source. You can check it out. Go on to Btcpaserver.org. I know. BTC pay server. I'm familiar with BTC pay server. Yeah, to promote a bitcoin and to teach people how they can manage their own funds. What part are you hosting? That's the only part I'm trying to understand. I'm just hosting the machine like CPU Ram and the storage space. That's it? Yeah. So how is it self custody? Well, self custody is because you're going to have a ledger wallet being connected with the BTC based server. So you're going to think, no, run away. Anybody that's in public, in the audience, listening, don't do that. That's a bad idea. Why not? Because you're trusting a third party, and that goes against the whole self custody thing that PC is trying to point out. Well, if you're going to host your own BTC based server on your computer, on your home network, if you think that's really smart from the security perspective, I'll go ahead, my friend. Once when you wake up with some Chinese IP address on your Zix or router because your telcos are not updating their boxes and you lose your so I have to trust you. No, you're trusting the tier three data center level of security and their architecture behind. Okay, so I have to trust someone, though. Well, are you not trusting, satoshi Nakamoto, that there is no American government, there are no private keys, like of the majority of the bitcoin network? Maybe the feds? Do you think they have the master key to shah 256? Do you really think that the banks have allowed bitcoin to exist and to convert? Bitcoin needs permission from the bank, okay? I mean, you can swap pictures of a hotel. The banks have to give permission, or the government has to give permission to bitcoin. Is bitcoin asking permission? Well, you can exchange and swap the pictures of hot ladies with your friends. No one forbids them. All right? This guy is not serious. Puppy. I don't know what to say. There it is again. Why is it two days in a row, man? They just come in from everywhere now. Wait, what about here's the advantage of toju you know what the funny thing is? You're treating bitcoin as I treat the IPV four layer, or IPV six, with SSL encryption only. It's a better way to encrypt it, and it's another layer on the network. You're just talking about the network infrastructure, and you make belief like value. Oh, we believe in God. We believe in bitcoin. Well, it's okay now. It's 16 grand bitcoin to the moon. 100,000, 1 million. It's a perceived value. I'm not against it. I'm just saying I'm dealing with bitcoin as a technology. You brought the server, man. Listen, what you're offering up is centralized, dude. I would rather centralize. You said yourself I have to trust the data center provider and their equipment and their good faith, and that is completely against the tenets of bitcoin. Don't you get it? Do we need to draw it up on a little board so you can get it? No. You can take your computer and you can put it in the living room. Or you can take your computer and put it in, like, your basement. Or you can take your computer and put it in your neighbor's house. Or you can take your computer and put it in a cloud or so you could just do either of those and just keep your fucking seat phrase in a place that no one's going to find. The stamped like titanium. And then that's your fucking bitcoin. You don't need to fucking put it anywhere else other than a place where you have it. I'm saying you can run a lightning note and you don't have to use the same bitcoin address to receive the funds, but still, you're going to have to allow the technology and instruments of trade to exist somewhere. I say only that's better if you have a root privileges on your own box. Are you new to bitcoin? Are you an It guy that just found out about Bitcoin, like, a year ago? Don't be ridiculous. Come on. Oh, so you're Satoshi's son. Okay, I get it. No, I'm a Commodore 64 guy and like, Cube Basic, literally before the 90s, so you can speak whatever you want to enter. A piece of shit. You sound like someone that gets very technically well versed, but it has no idea of bitcoin and how it works and the philosophy behind it. I know that only if you want to receive the bitcoin for your services. Downloadable digital products. I'm not saying about the physical goods because it's stupid. ",timestamp:"00:07:11-00:16:55",topics:["Difficulty Adjustments","bitcoin payment"],type:"twitter_space",weight:25.58466473425889},{boost:0,date:null,description:"Governments attack on Bitcoin and anonymity",episode_title:"Café ₿: #Bitcoin News & Trusted P2P Reviews w/ @Apollosats",guests:[{name:"@2140data",profile_picture:"https://pbs.twimg.com/profile_images/1598330787778232320/ZVFcRtet_400x400.jpg",ref_id:"190b5001-a42a-46cc-b0d3-b6f74c625648",twitter_handle:"2140data"},{name:"@FossGregfoss",profile_picture:"https://abs.twimg.com/sticky/default_profile_images/default_profile_400x400.png",ref_id:"09913e9b-38dc-4465-9d4d-ae0c9ba9eeca",twitter_handle:"Fuckkkk"},{name:"@w_s_bitcoin",profile_picture:"https://pbs.twimg.com/profile_images/1594796869233811474/g0_ZRshz_400x400.png",ref_id:"b178b239-3b18-4a16-9d43-c5d15ba6f7f4",twitter_handle:"w_s_bitcoin"},{name:"@NeilJacobs",profile_picture:"https://pbs.twimg.com/profile_images/1599432572727169025/NSoPdchB_400x400.jpg",ref_id:"4b6997e1-ce0b-4a1d-90e7-dbaccef4b783",twitter_handle:"NeilJacobs"},{name:"@brandon_gentile",profile_picture:"https://pbs.twimg.com/profile_images/1561369452284895236/-8WgdwEm_400x400.jpg",ref_id:"f940c5e8-4808-4197-a38f-3f19d311a7ad",twitter_handle:"brandon_gentile"},{name:"@apollosats",profile_picture:"https://pbs.twimg.com/profile_images/1576946734927794176/2ail9FoU_400x400.jpg",ref_id:"74f4280f-5fdb-4bbc-aee2-a2ed32d64372",twitter_handle:"apollosats"},{name:"@StackchainSig",profile_picture:"https://pbs.twimg.com/profile_images/1589791699571802117/n_Y1Qm7J_400x400.jpg",ref_id:"6e652629-38ec-49d8-9f5c-3ba28f80c799",twitter_handle:"StackchainSig"},{name:"@TomerStrolight",profile_picture:"https://pbs.twimg.com/profile_images/1591960241008148481/HtyINxtU_400x400.jpg",ref_id:"7af639f8-8c5c-4ce1-a43b-e8560ed40e2b",twitter_handle:"TomerStrolight"}],hosts:[{name:"@alexstanczyk",profile_picture:"https://pbs.twimg.com/profile_images/1539055022364708864/rwErK6x1_400x400.jpg",ref_id:"6455df34-1abc-4ce8-9bb8-b02d411accec",twitter_handle:"alexstanczyk"},{name:"@pacificbitcoin",profile_picture:"https://pbs.twimg.com/profile_images/1570140686753619970/UFEnzSv5_400x400.jpg",ref_id:"f8268a26-9761-40c1-bdd6-dad9db44d032",twitter_handle:"pacificbitcoin"},{name:"@SwanBitcoin",profile_picture:"https://pbs.twimg.com/profile_images/1491428856858914820/aFlitvha_400x400.jpg",ref_id:"da3f56bf-9763-4389-a9ec-d807049bd0b8",twitter_handle:"SwanBitcoin"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/239722cb-4216-414a-a17b-5adf9d52e15a.jpg",keyword:!0,link:"https://stakwork-uploads.s3.amazonaws.com/uploads/customers/2707/media_to_local/7cf57bdb-c905-46e3-a7e5-4c0bfd4f8d04/71c08fae-cce8-4600-ab9e-758420e78dcf.mp3",node_type:"clip",pub_key:"029099ec31eb33594611dc47d5c93de2c1aa86918e3a36b408c14a500601c8bc9b",ref_id:"75ac478b-3dfa-45a8-9fa0-cebaacccfc05",show_title:"Swan.com",text:"if you're from anywhere in the world, the same logic applies. It's starting in the EU. But don't be surprised when the same type of Draconian laws and the rules that they're trying to implement around Bitcoin spread around the rest of the world. Because the legacy system is losing, right? They've already lost. They just haven't realized it yet. And so once they start to realize it, we all want them to surrender and to adopt this new standard which will bring about peace and prosperity to the entire world. But it's very likely they won't, and they'll go down kicking and screaming, and when they do, they're going to try to claw back as much power as possible that they've lost. And in an attempt to do so, they're going to make it very difficult for you to acquire bitcoin, most likely. So it's kind of now or never. Like, you don't have much longer to build your stack and take it into self custody, at least not to do it easily. It's a exit. Lagarde talked about this, Madame Lazard, where she was like, there can be no exit, basically, because if there's an exit, they can escape or control the lizard people system. It just feels a lot like the Drowning Man, you know, grasping anything they can and that will end up being just keeps feeling like that. What cracks me about this is that a lot of this kind of stuff was basically in the yea zone two years ago. Like, all this was, like total conspiracy tinfoil hat shit. But as it turns out, it's all real. Those conspiracy theorist guys were right. You know, what happens over time is that overturn window shifts little by little. And the stuff that people used to say, wow, that's crazy. You know who says it's crazy? The lizard people. Because they want you to think that the people who are calling them out for their crazy are crazy. That's called gas lighting. Doesn't help when you keep calling them lizard people. But no, I totally agree. I do that on purpose because I know it triggers the fuck out of people, and I don't care. How does Europe get there in the first place? Just what platitudes over principles? First principles? I guess just in the last decade or two of energy policies. I mean, my gosh. Neil Jacobs, you've been very quiet this morning. You have anything? Thoughts? No. Stage camper. Hey, guys. He is there? No, I had to shut my door. I had to shut my door in my office. What's up? What's going on in your world, Neil? Nothing, just listening in, keeping up with all the bitcoin news. I find it really interesting that there was that Reuters story about prosecutors at the Justice Department saying that they have enough evidence to criminally charge Czech. Yeah. So you haven't seen this? I heard a rumor. I didn't see it. Tell us what you tell us. Well, basically, they've been investigating finance since 2018. So this isn't a new thing, just that they violated certain anti money laundering laws. And there's a lot of conspiracies, obviously, on Twitter of why it was leaked. Now, apparently the prosecutors at the Justice Department are kind of split on whether they should file criminal charges or not, and there's prosecutors who think there's plenty of evidence to do so. So maybe there's some disgruntled prosecutors who wanted to get the message out. And there's a Reuters story on it. I could find it and pin it. This is binance us only. Correct? I don't know if it goes back, it doesn't have to be by 2018? I don't think so, because I don't think Finance US existed in 2018. Yeah, that's just it. That's what a lot of people a lot of people may assume that for the US to have jurisdictional authority over an entity, it has to be a United States company. That's not true. As far as the US is concerned, us regulators have been doing this for a while. They basically said, if what you're doing interfaces with US citizens, we have jurisdiction. Right. Even if you're in another country. Now, again, the question becomes, well, how do you enforce extra jurisdictional authority? Well, the US figured out how to do it because they weaponized the US dollar to do it, and that's the reason they were able to get away with nonsense. So when other countries try to do it, can they do it? I don't know. That ultimately comes down to cooperation. Right? So if one country goes to another and says, hey, you have a guy we think is a criminal, hand him over, that's called an extradition agreement. They have to agree to do that where the US has just gotten so used to beating up the whole world with the US dollar stick, you don't comply, we're just going to turn off your US dollar payment rails and then you're screwed. So I pinned the Reuters article at the top if anyone wants to read it, find out a little more details. Yeah, it's fascinating. The question to me becomes, are they going to be able to find him? That's a good point. I just heard a lot of people saying, oh, they're thinking about charging him, why not SBF? It's like this investigation has been going on for four years, so you could say the timing is curious, for sure. I don't know if there's some conspiracy here. I don't know, man. I learned a long time ago, I used to second guess my suspicions. And then I learned from Jim Rickards, there's no such thing as a coincidence. At least that's what they're taught. Like intel officers respect the coincidence. Because if there's a coincidence, there's a chance there's something there. And then the other side of that is growing up in the hood, I suspect everything. Brandon knows what I'm talking about. It's not necessarily a bad thing. It's a crucible, baby. It's crucible 100%. If you put it in the crucible and you love on fire and you burn it and you purify it and it turns out it was bullshit, great. But if it turns out it was something, well, then, hey, sometimes people don't like it. When I talk about stuff that's getting into that yeastone window. I get taddled on. I feel a separate spaces eventually, alex is that what you're saying? No, it's not what I'm saying. Cory gives me pretty wide latitude. I mean, he mentions to me when I get tattled on, but he doesn't tell me to stop talking about what I'm talking about. You do a job threading the needle. Well, okay, so here's where I draw the line. I don't want to hurt Bitcoin and I don't want to hurt Swan. So if there's something that's potentially going to be damaging to bitcoin or Swan, I probably won't go there. But as you well know, there's lots of stuff that in that gray zone. Over the target, sir. See, that's what I'm saying. If it's over the target, then why not? To me, that's fair game. Because this is what I think. This is just my opinion. Some of you may think I'm crazy and not like this, and that's okay. I think the lizard people already look at it like they're at war. It's just we haven't figured that out yet, and they're not playing by the same rules. Until we accept that as reality, we're going to be on the back foot the entire time. Well, you're spot on in my opinion, because Greg touched on this earlier, right? It's we are what the 300 billion market cap. It's a rounding error, and we're that small subset of society. I rate transient minority that's feeling that way and understand that so few people get that. I think we get that. And then, like you said, the lizard people get that. But eventually, as we know, bitcoin changes you. And more and more people, as they come into the space, as we've all seen as bitcoins all changed us, they start thinking more like us. And it's the number responsibility go up technologies, as Vesky says. So people start coming into our thinking and into exactly what you're saying. Alex well, it's not really even our thinking, I don't think being responsible is like a tribal thing. It's just good for humanity, full stop. There's nothing wrong with that. Correct? Rob Salt. And good morning. I suppose you have something to add to this. Yeah, what I was wondering is the conversation seems to constantly get brought up of how anonymous are we on bitcoin and they're going to be coming after it and this and that, and I just think to myself, how many options are there to be anonymous on bitcoin? Is that really even a thing? Because last time I checked this ledger system, it's both a big net positive and a huge net negative as well. So the ledger system, it's almost like the perfect way to be having money of the future that is governed money. It's like being sovereign. It's not going to be the first ten years of adoption in bitcoin. Seems being sovereign is going to be about 50 years down the line when we're in a hyper bikinize world. If that does happen, a game theory out in my mind, it's almost going to be used against bitcoiners, it seems like, in the very beginning. And I think they're starting to realize that that this ledger. So it's like the best thing, if you want to really onboard bitcoin and you want bitcoin to get adopted, the best thing you can do is get rich in a legal way. I'm just being dead point blank serious about it. There's so much I hate, man. I got my .2 bitcoin in cold storage and I got it non KYC. It's like, no, the best way to get this to adopt is to become a multimillionaire, get rich and do it in a legal way and pay your taxes on it, be smart about it. There's ways to build corporations, there's ways to do things in a smart and efficient way, but more bitcoinners need to get filthy fucking rich. And I hate to be like the guy, the bearer of bad news, but that just is what needs to happen for it to get adopted, it seems like. Because this whole non KYC stuff, I don't think it's going to cut it. I think it's going to get used against them. So I don't know, it's kind of what my it might. Sure it might. But the question becomes, how enforceable is it? That's really the argument. I don't think there's a question that there are tools you can use for privacy in bitcoin. It's so what rob said, like, will the privacy be used against people? I don't know. The exchanges that we bought our bitcoin from, I know there's going to be some select few that were in very early from mining and things like that. But for the majority of the exchanges you bought the bitcoin from whether it's cash app, whether it's swan, whether it's coinbase, wherever it's from, if they come to your exchange and they say, hey, we are now legally requiring and they probably already have done this. Someone can correct me if I'm wrong and say we need their Social Security number of every single person that has bought Bitcoin from your exchange. Yeah, sure, Rob, but I mean, that's the beginning of a pathway that potentially leads into the mist and disappears. Like, you're right, KYC exchanges. And you know what? The exchanges have been warned for a long time that eventually they're going to have to give up their customer lists. Right? But when I'm talking about privacy tools in Bitcoin, what I'm saying is there are ways to break all of those links and the question then becomes, if you choose to break those links, what then happens on the other side of that? We could go ahead and then we'll go TC yeah, so a couple of points here I agree with Rob. Like, I think, first of all, if you're trying to come in into Bitcoin in size, non KYC is not an option. I mean, go try and buy a million dollars with a Bitcoin. Non KYC ain't going to happen. And even if you're able to find a buyer, a peer to peer or seller, rather peer to peer seller, you're still trying to leave the legacy system with a million dollars. You don't think they're going to fucking know when you take that million dollars out of the system and then transfer it. That's just crazy talk. And then number two, in terms of privacy, this is something I used to be pretty worried about, but I'm honestly not worried about it at all anymore. I'm very bullish on Fedramps. We have yet to see if they actually play out and work the way that we're being told they're going to work. But if they do, we're talking about fucking perfect privacy. We're talking about us setting up the Cafe Fediment, which we obviously will do, right? I mean, Alex will be a guardian, aunt's going to be a guardian, so we're going to have trusted second parties. These are people that we know we've met in person because we went to Pacific Bitcoin. They're trusted second parties. Guardian setting up a guardian system, multistic system, protecting all of our Bitcoin. And then guess what we can do inside of that mint. We can fucking transact with each other with perfect privacy and nobody can see when we pass SATS back and forth, which, by the way, will be instant and free because you know how we do on Cafe Bitcoin. I'm not worried about the privacy aspect of it at all. I think the tools are going to be coming soon and I'm hopeful that they're going to work as advertised. And anyone who's going to try to track what we're doing are going to find themselves kind of at a loss once these tools come online and we have these second layers that allow us to basically fucking put the big old middle finger up to one. We got about four minutes to finish up on this topic and they're going to be introducing a featured guest here. So let's TC, what are you thinking? Okay, I'll just keep it to the one point. I was going to make two points, but my point is really, I disagree wholeheartedly with what Rob is saying. The public nature of the bitcoin blockchain is an absolute feature and it's not a bug and it's not a problem. Part of the reason that this system actually works for a new global monetary system is the fact that anybody can audit it. The fact that if I do a transaction with you and we don't know each other and you're on the other side of the planet, you have just as much visibility over that as I do. These are absolutely essential, non negotiable features of bitcoin. And that being said, you have to keep in mind, too, that there's a real distinction between the information that's outside of bitcoin and the information that's actually inside bitcoin. There's no names or addresses or phone numbers or email addresses or photos of your face on the bitcoin network. You have to keep in mind that there's a really clear distinction between what's on chain and what's outside of that. And then the last thing I'll say is that just even if somebody knows what you have or what transactions you make, there's a big leap between that and what any potential consequences might be, both from the point of view of laws and regulations and anything you may or may not have done wrong. And then exactly what Alex said, which is the enforceability of all of this. So I think, Rob, you did a great job scaring a bunch of people. I wanted to kind of counter that and remind people that this is not a problem or a bug or something broken. Just to be clear, I said people need to get wealthy in a legal way so they can legally own large amounts of people need to take their money that they earn and they need to save it in the right format so that it actually is theirs and it actually has some purchasing power in the future. This is not about everybody needs to be a millionaire right now. That's not the right message. Yeah, I would like more bitcoinner to be millions. I definitely stand by exactly with what I said. More bitcoinners do need to be millionaires. That'd be a great thing. More bitcoinners do need to own businesses in a legal way. That'd be a great thing. Less bitcoiners need to be sitting there with non KYC bitcoin and being excited about it. Even if bitcoin goes to 10 million, a lot of bitcoinners still won't be rich. And they'll think they're rich in their mind because they have 0.1 bitcoin non KYC fiat. This is such a Fiat mindframe. This is garbage, dude. Where are you talking about? Decent? Okay, let me say it in a nicer way. What are you saying to a person that works hard? Maybe they have two jobs and they're just paying their bills and they're just getting by and they are diligently stacking SATS and saving, and you come to them and say they need to be a millionaire. What does that do for them? What's the actual point there? Okay, you guys are talking past each other. You're both right. Relax. I understand both of your points of view. I get it. There's a place for both of you in the world. You're both correct. Let's leave it at that. There's no point in we don't have time to cage match. Like, if we had another 20 minutes in the show, I'd be like, Go for it. But we need to move on here. We could go yeah, I'm just going to wrap a bow on this. We're all going to be Fiat Millionaires at some point in the future. It's not a matter of if, but when. Right? But the thing is, that million dollars is going to buy you a fucking gallon of milk because it won't matter anymore. You've all seen that cartoon where it's, like, showing the different stages, like, decade over decade of bitcoin, and it's like Fiat Millionaire on the left and then bitcoin on the right. And as each decade progresses, the millionaire gets poorer and poorer until the end, when they're living in a beat down house with broken windows and shit. And then that bitcoin on the right is living in the castle at the end. I mean, that's basically where we're headed. Fiat on the left and bitcoin on the right. With Fiat, a million dollars is constantly getting devalued, debased, and eventually will be worth fucking nothing. So I'm going to be millionaires eventually, I won't get a million bucks and instantly turn it into bitcoin today. Yeah, exactly. I love that. Meme, like, at the end of it, it's like I heard he's a bitcoiner there's another one with a bubble. It's a bubble. It's a bubble. It's a bubble. And in the end, he's like living in a dome with a whole beautiful existence inside. It's a bubble. Yes, it is a bubble. ",timestamp:"01:26:29-01:46:21",topics:["Anonymity"],type:"twitter_space",weight:10.214787483215332},{boost:0,date:1671644776,description:"Thoughts on how Bitcoin may evolve over the coming years and would have a high price",episode_title:"#Bitcoin Creators Space",guests:[{name:"@DecouvreBitcoin",profile_picture:"https://pbs.twimg.com/profile_images/1362747604044566530/Invedmre_400x400.jpg",ref_id:"0eda190b-4373-41fc-bc28-c3b95af30949",twitter_handle:"DecouvreBitcoin"},{name:"@Bridge2Bitcoin",profile_picture:"https://pbs.twimg.com/profile_images/1533812215198924800/vAAlVRxO_400x400.jpg",ref_id:"1aaf2c24-8d26-4038-b55a-8b94427b20c7",twitter_handle:"Bridge2Bitcoin"},{name:"@orangepillapp",profile_picture:"https://pbs.twimg.com/profile_images/1570918965601505282/SOApRCif_400x400.jpg",ref_id:"ba5b79b4-e2e7-4778-8879-df793b8420a4",twitter_handle:"orangepillapp"},{name:"@knutsvanholm",profile_picture:"https://pbs.twimg.com/profile_images/1586261395833774081/RQ8SYxiM_400x400.jpg",ref_id:"e12ebe66-706b-40d2-804a-861a4c79bbfa",twitter_handle:"knutsvanholm"},{name:"@bcvFoundation",profile_picture:"https://pbs.twimg.com/profile_images/1460813196902633476/edbNgO7y_400x400.jpg",ref_id:"d65bc3c3-cdd7-4539-8cb9-6a8d86f580c8",twitter_handle:"bcvFoundation"},{name:"Christopher",profile_picture:"https://pbs.twimg.com/profile_images/1345072452775370754/cBVFzpkV_400x400.jpg",ref_id:"7dacb545-925d-4201-9b9c-869d992dcdb3",twitter_handle:"Chrissuccess"}],hosts:[{name:"@steliosats",profile_picture:"https://pbs.twimg.com/profile_images/1495784740921786371/a73Qu4HR_400x400.jpg",ref_id:"7eed8e35-f762-4882-adf9-b45ad16c3c54",twitter_handle:"steliosats"},{name:"@geyserfund",profile_picture:"https://pbs.twimg.com/profile_images/1554429112978120706/yr1hXl6R_400x400.jpg",ref_id:"02a48cf4-58d0-4014-803c-9120dedeec52",twitter_handle:"geyserfund"},{name:"UKNOWN",profile_picture:"https://pbs.twimg.com/profile_images/930811252665933826/2cVZF58S_400x400.jpg",ref_id:"bcd18bb0-8224-4f6b-af71-e16120ae4323",twitter_handle:"NodedPodcast"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/c9bb5d58-c781-464d-878a-8b6c469ba198.jpg",keyword:!0,link:"https://stakwork-uploads.s3.amazonaws.com/uploads/customers/2707/media_to_local/885fe09b-bb21-49a5-8667-3c73ed36918f/196dc1e8-c7a4-4dc7-902f-d00107aefb42.mp3",node_type:"clip",pub_key:"0372cd0c8469f2034336a243e018d4d60e07efef8e7d10417807da1173bd5b002f",ref_id:"ee9d0400-3d38-46f6-9741-f99864e86ed4",show_title:"Geyser 🌊",text:"is Christopher from bridge to bitcoin. Hi guys. How is everyone this evening? Good to be here. Great to join you guys in your space. So thanks for setting this up. Mick, apologies for joining late. So apologies if I go over ground that you've already talked about out. Oh, no, don't worry. Sorry for tagging you last minute. No worries. Thanks for tagging. It's been great to speak with Connet. And also I just want to bring it back. Well, actually, I'll start off by saying congratulations on getting 30 projects listed this week on Geyser. That's fantastic. That's really great. And just to resonate with what Connett was saying in terms of things get built in a bear market, I think it's fantastic. And you guys are really promoting it. So thank you for everything that you and the Geyser team are doing, helping people, or Bitcoin is build in this bear market. Because for me, for the rest of the team, it's really important that we build foundations now so we're ready as the ball comes out. It's fantastic to see. So for those who don't know about bridge, for those who don't know about bridge to bitcoin, we onboard merchants to accept bitcoin payments. And we received a grant from Geyser early this year. I'm ashamed to say we haven't yet, and it's been on our to do list for weeks, months, to put up a project, a crowdfunding project on Geyser. And we should really do that soon. But, yeah, we'll get that. It's definitely on our to do list. So we hope to do that soon, especially now, as you say, Nick, the ease of putting up a lightning address. And that makes it so easy, as Joe Nakamoto tweeted about earlier this week. So we shall definitely get on to that. But I just want to go back on what I heard Mateo from Orange Pellet talking about, because he dropped off the call now. I think he has. That's a shame. But I really resonate with what he was saying in terms of how. For. Us, onboarding merchants is one of the cornerstones of Bitcoin success, certainly from my perspective, and making the user interface really easy is really important. I sort of resonate with what Mate was saying in that I think most people are currently not fussed about decentralization, they're not fussed about privacy. We as Bitcoin as are, we get it, we've been down the rabbit hole. But most of the society, they want convenience, they want ease. And that's unfortunately why I think CBDCs are going to hit hard, because people won't do their homework, they won't do their research, people are going to welcome it with open arms, unfortunately. So for me, merchant adoption is really important and introducing that in a way that's really easy. So the way we do that for Bridget to Bitcoin, ironically, it's not Bitcoin that we're selling merchants. For us, it's about creating additional revenue for them by saying, oh, hi, guys. Hi, merchants. What we're going to do is we're going to create a new customer base for you called Bitcoinners, and they're going to come and spend their currency for at your shop service and it's going to create additional revenue. And so for me, it's a slow orange bill, because what happens is a lot of these merchants get bitcoin is coming and using their services or buying their products, and we as Bitcoin as we're fantastic customers. We're so enthusiastic. We travel miles, we buy stuff from all over the globe, we get it shipped over, because you as a Bitcoin business, we want to support you. But if you're new to Bitcoin as a merchant, you kind of get overwhelmed quite quickly with how much attention you get by accepting Bitcoin. And it's great, because what that happens, and what we've evidently seen is that those new merchants suddenly get this influx of bitcoiners and it leads them down the rabbit hole without us having to do anything. Because bitcoin is they make an impression because we're such happy people, especially in these economic times where everyone's feeling the pinch, we will go that extra mile, literally, to spend our bitcoin, to spend our SATS, and replace them. And we're happy about it. We're more than happy, we're enthusiastic. We're the best customers you could ever have. That's amazing. For me, it's kind of a cornerstone of how we can it's sort of a Trojan horse. Trojan horse orange pill. So we're going around to regular businesses so who don't even know about bitcoin, and that's what we're planning on next year. We're going to trade shows. We're just to speak to regular people. We've got no idea about bitcoin, and we're going to talk to them about this fantastic payment processing network called the lightning network. And bitcoin normally is quite late on in the conversation, actually, because as everyone, I think, on the call knows, the processing fees on the lightning network are next to zero. They're really cheap compared to what our fiat counterparts are charging. Plus we've got instant settlement, all those fantastic things. So we talk about it's really interesting. We talk about the payment rails. That lightning network is a payment rail and how better than it and eventually we get to the bitcoin piece. But, yeah, for me, it's about making their businesses more profitable, having additional revenue, and it's fantastic because you literally see them fall down the rabbit hole. So we had that recently with a small chain of pubs, just two pubs that we onboarded last month, I think it was last month or the month before. So this landlord, he owned two pubs and he was not a bitcoiner, and he was not interested in bitcoin. But when James, my partner, said, right, we can bring extra customers to your pub, they're called bitcoin as, and they will spend their currency, but it will create additional revenue, he was like, fine, okay, I'm not interested in bitcoin, but I am interested in additional revenue. So if they're going to come and spend their currency and I can give it to my local currency, great, because it's good for my business, I said, fantastic. Do you set them up with the bdcpa server or what is it that you guys do? We look at the plethora of solutions that are currently in the market, depending on how that particular business is structured. Depends on which solution we sign, post them towards. Generally, the smaller the business, the more options they have. As the business gets bigger and more complicated, it sort of narrows it down quite quickly. So as a one man band, as a mum and pop shop, with just maybe one or two employees, you could literally just have a wallet satoshi, especially if you're just a guy who runs a food truck, all you need is a wallet. Satoshi really, isn't it? Just sat that on your phone because it's you. But as the business gets bigger, it gets more complicated, because you might be looking at multiple employees, multistate. You might have a board of directors who want to have multistake and so on. Yeah, I was also thinking for, like, exchanging back from Landing to Fiat, how would you guys recommend they do that? So in the UK and Europe, you can use a service called Coin Corner, and we'll help you get set up with that. Outside of Europe, we're speaking to IBEX, so we love the IBEX team. IBEX are looking at coming over to Europe, so fingers crossed that hopefully they'll have that flipping service, as I call it, hopefully in 2023 at some point. So I think that we'll see more of this, because for us, what our push is, especially when we're going to the likes of Coin Corner and IBACs, what we're saying is it's really important for merchants at the moment, in these early days, that there is this ability for new businesses to flip into their local currency. But having said that, coming back to my story about the pub for this landlord, not interested in Bitcoin at all, and we said, that's fine from my perspective, I don't mind that because they're adding to the liquidity of the lightning network and the liquidity of Bitcoin because they're a new merchant. That's absolutely fine. That's great. Another business that gets bitcoin. That's fantastic. So we set him up in his first pub, put in place his point of sale devices, made sure his admin console was all set up and everything was fine. And then two weeks later, we went to his second pub. And bear in mind, we hadn't spoken to this landlord during those two weeks. So we set him up in his first pub so that all his transactions, all his sales that he was receiving, flipped instantly into the local currency. So he wasn't holding Bitcoin on his books or balance sheet. Not interested in bitcoin. Two weeks later, we go to his second pub to do the same again, put in place the hardware devices, set up his console, make sure he's happy with anything. He came up to us completely unprompted, and he said to myself and my colleague James, he said, Kristen James, at this pub, I'd like to hold the Bitcoin. I don't want to flip it into the local currency. And we said nothing. Bear in mind, two weeks beforehand, not interested in Bitcoin and just wanted Fiat currency. We said nothing to him in those two weeks. For me, that's a really good example of how Bitcoin is coming into the past have set him off on that rabbit hole journey. And for whatever reason, Bitcoin is coming in, as I say, being enthusiastic. He's obviously either spoken to Bitcoinrs or he's read up and he's realized that there's value. And that's why I say it's a really soft orange pill and it's really valuable because we're not having to orange pill individuals. It's almost an organic process and it's quite controversial, but I think that the way we orange pill individuals is wrong in so much. It's really resource heavy and it's quite cultish, isn't it? We come across as cultish very quickly. We meet new coiners or complete newbies, but this merchant adoption is a really soft orange pill Trojan horse. And that's why I say when we speak to the likes of IBEX, what we say is having that ability to flip, to offer that service, is really important to get our foot into the door for merchants currently. And then what we're finding is merchants are going, actually, I get bitcoin now, now I want some bitcoin. And so it's really interesting, I was just leaping that back to what Mate was saying in terms of how we need to make the interface easy and effectively smooth and almost non threatening, because the services we provide run alongside the current systems that merchants have. So at the moment, we're not replacing anything. So we come in and go, this is a bolt on for your service, for your product, for your shop. We literally bolt it on and it provides you additional revenue. And the same for Ecommerce, it's a plug in that just bolts on, you don't have to change anything, swap anything out, it's just an additional service that you can have to create additional revenue for your business. So, yeah, completely agree with Mateo. If we need to get the UX and the UI really smooth, make it really non threatening, really simple. So, yeah, I'd love for more projects to help with that, that would be fantastic. And then hopefully what we're seeing is they fall deeper and deeper down the rabbit hole really quickly and they turn into bitcoin really quickly. But. Yeah. Thanks, Mick. Thanks for everything that guys are doing. I'm loving oh my God, thank you, Chris. I'm loving the building that's going on. And we've also launched another business, actually, me and the team, and we take on a couple of other people and we're probably going to put this on Geyser as well. But we've launched and you've seen that, we've given you a cardmaker, laser Eyes cards. So if anyone on the basis is listening, check out Laserrise cards, send Twitter handle. They're essentially Bolt cards, but they're completely blank in terms of the electronics in them. And you can do what you like with them, so you can link them to your own node and your own wallet, or you can use a custodial service like Coin Corner, but there are risks, of course, because they're an exchange and so on. Get money off exchanges, yada, yada, yada. I won't go on about that. But you can do what you like with them. But the unique selling point is that you can have whatever images you like on your cards. And we've got a gallery on our website and they're called laser eyes cards because we put places on them. And the idea is when you tap on to make your payment, so they contact us, pick on debit cards, NFC cards. When you tap on the point of sale device, your eyes turn to laser. So we literally give you laser eyes. So we hope to be adding that to your crowdfunding project platform on guys as soon because we have a couple more products in the pipeline and we. Think, yeah, ",timestamp:"00:51:49-01:04:53",topics:["Bitcoin evolution"],type:"twitter_space",weight:24.426984779829223},{boost:0,date:1665946635,description:"Hodl, Ben and Evan's review of TABConf",episode_title:"TABConf Mixtape Vol 2: Sound Bites from TABConf",guests:[{name:"Michael",profile_picture:"https://pbs.twimg.com/profile_images/1558687629599657990/vf-bU14b_400x400.jpg",ref_id:"c7b4faa1-db77-4459-b03f-0e41e15efae7",twitter_handle:"MichaelHawaii"},{name:"Ben",profile_picture:"https://pbs.twimg.com/profile_images/1580596905721171969/0NnLeJWA_400x400.jpg",ref_id:"da0132b9-0d19-43e6-bc1a-9c7818c79ba4",twitter_handle:"benshapiro"},{name:"brandon",profile_picture:"https://pbs.twimg.com/profile_images/1575598727812812803/4FkPb0vt_400x400.jpg",ref_id:"8a27da7a-c05c-44da-8247-3c5f68bc3164",twitter_handle:"ThrillerBitcoin"},{name:"shane",profile_picture:"https://pbs.twimg.com/profile_images/1575598727812812803/4FkPb0vt_400x400.jpg",ref_id:"2e5ce678-7d04-4a48-8bd1-281329ea9424",twitter_handle:"ThrillerBitcoin"},{name:"exfrog",profile_picture:"https://pbs.twimg.com/profile_images/1575598727812812803/4FkPb0vt_400x400.jpg",ref_id:"d0dc102c-404e-4753-9290-9a3fe27fe2ee",twitter_handle:"ThrillerBitcoin"},{name:"josh",profile_picture:"https://pbs.twimg.com/profile_images/1575598727812812803/4FkPb0vt_400x400.jpg",ref_id:"34eb29e3-da86-485f-b20a-059f7d41f6ad",twitter_handle:"ThrillerBitcoin"},{name:"autumn",profile_picture:"https://pbs.twimg.com/profile_images/1575598727812812803/4FkPb0vt_400x400.jpg",ref_id:"3224f2ec-3e77-485f-88b8-6930e19f8ac6",twitter_handle:"ThrillerBitcoin"},{name:"buck",profile_picture:"https://pbs.twimg.com/profile_images/1575598727812812803/4FkPb0vt_400x400.jpg",ref_id:"00a55ec0-9b1a-482a-893a-345d350a33a0",twitter_handle:"ThrillerBitcoin"},{name:"stephen",profile_picture:"https://pbs.twimg.com/profile_images/1575598727812812803/4FkPb0vt_400x400.jpg",ref_id:"9dc56711-eacc-4691-821e-fe2a26855ea9",twitter_handle:"ThrillerBitcoin"},{name:"hodl",profile_picture:"https://pbs.twimg.com/profile_images/1575598727812812803/4FkPb0vt_400x400.jpg",ref_id:"b012eda0-b78c-46e7-ab46-6a7139584fc7",twitter_handle:"ThrillerBitcoin"},{name:"evan",profile_picture:"https://pbs.twimg.com/profile_images/1575598727812812803/4FkPb0vt_400x400.jpg",ref_id:"9a8418e9-8976-425c-95ce-ed2fe307e380",twitter_handle:"ThrillerBitcoin"},{name:"muzz",profile_picture:"https://pbs.twimg.com/profile_images/1575598727812812803/4FkPb0vt_400x400.jpg",ref_id:"444b8330-caa1-4bcf-8144-7d9110ae2242",twitter_handle:"ThrillerBitcoin"},{name:"thomas",profile_picture:"https://pbs.twimg.com/profile_images/1575598727812812803/4FkPb0vt_400x400.jpg",ref_id:"e2140e58-314d-4425-bc97-20f52f951866",twitter_handle:"ThrillerBitcoin"},{name:"justin",profile_picture:"https://pbs.twimg.com/profile_images/1575598727812812803/4FkPb0vt_400x400.jpg",ref_id:"2ce04090-b9b1-4e84-a87f-9c9dc9ececec",twitter_handle:"ThrillerBitcoin"},{name:"stakamoto",profile_picture:"https://pbs.twimg.com/profile_images/1575598727812812803/4FkPb0vt_400x400.jpg",ref_id:"8b249d9b-8521-4e0e-bf24-2d8b8721d26b",twitter_handle:"ThrillerBitcoin"}],hosts:[{name:"ThrillerX",profile_picture:"https://pbs.twimg.com/profile_images/1575598727812812803/4FkPb0vt_400x400.jpg",ref_id:"231d171e-06a4-4294-9cf2-6640e27429ea",twitter_handle:"ThrillerBitcoin"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/4240c90e-0086-4ece-bfe5-84a282c5059e.jpg",keyword:!0,link:"https://2.gum.fm/op3.dev/e/pdst.fm/e/dts.podtrac.com/redirect.mp3/media.transistor.fm/82539eb6/c2b4aa1b.mp3",node_type:"clip",pub_key:"",ref_id:"821f7b5c-c6ad-422b-b4e1-ed34f915e4af",show_title:"Thriller Bitcoin",text:"a lot of fun. I very much appreciate you. Anything cool that you've seen here, like as far as the talks, because you're a bitcoin or, you know, all these things, what do you think has been like the most, most memorable thing that you've seen? Well, I mean, that's one of the unfortunate things is because I'm responsible for all five rooms, I only ever get to spend like moments making sure that the room is good before I have to go to the next room. So I got to see a bunch of like a little bit of a bunch of talks that I really wish I could have sat there and engaged in. The coolest thing I've seen so far was probably Andrew Polestra's codex thing, like making a paper computer at the end of yesterday's event in the Socratic village. It's a really neat, complicated thing. There were, like, 20 to 30 people in there with scissors, cutting out these things, putting them together that help you code and decode without a computer. It was really neat and very engaging, and it was like I don't often see events have engaging workshops that actually are well attended, like people who will sit down and focus and learn a thing for 3 hours. That's kind of what sets Tabcomp apart from every other conference I've done is people are actually here to do the thing, not just watch someone talk and then watch someone else talk. Yeah. Do you think there's room for both at the conferences? I think there very much is, and I think that's one of the things that this year at Tabcomp was kind of missing compared to last year is there's no real beginner track if you're not ready to dive into command line stuff. There's not really a whole lot, but the next gen village is doing a good job of getting, like, the younger kids involved and having content for that. I think we have too many conferences that project to the lowest common denominator that have the same speakers come giving kind of the same talks to the same audience a lot. And events like Tabcomp and BTC Plus are kind of not that they're really more about learning and doing and doing it in an environment of your peers and friends. Yeah, that's cool. Thanks for coming on the pod, man. Appreciate it. I appreciate everything you do, by the way. You too. I really love hanging out with you, man. Paul, do you want to be on my podcast? Sure. 40. What do you like about tapcom this year? It's just like last year, but more Tabcomp is, like, getting, like, a semester of Bitcoin education. Four days? Yeah. In four days. Does it feel like every day has gotten better? I feel like every day has gotten relatively better than the day past. It's almost like it's like steps. Yeah, I didn't know about that. I run out of room in my brain, so at some point I'm stopped learning. But, yeah, I've gone to so many good talks and learn so much from so many different angles. There's a really interesting theme this year about how lightning is totally broken. Really? Okay, tell me more. Macarola did a talk on lightning is broken, but we can fix it. And there's a lot of terrible news about problems with lightning. And there are things that these are problems that have been pretty well known that we basically need to work on and improve to make, basically, lightning. Right now, you basically want to trust your channel partner. There are things that your channel partner can do to make your life miserable. There's attacks that we know about that just don't happen a lot. Because it's a small community. But as we become like a big deal, either we're basically only going to have to make channel relationships, business relationships and just formalize that kind of way, or we're going to find more cipher punk ways to do this in kind of a bitcoin ethos because we'd like to be able to open up anonymous channels but it's just a little bit dangerous. So it's kind of this long to do list and it really kind of depends on who you talk to after that talk of how bummed they are versus how kind of exciting. You're kind of bumming me out right now. It's like it's sounding like it's a major thing, but if you think about it from an engineer perspective, right, any engineer, you start out a project, you have 100% problems, nothing works, right? And then you start fixing one problem at a time and you make it a little bit better. And maybe at some point you're 75%, you ship it, and then you keep on fixing problems and maybe new problems you didn't know about come up. You try to fix those. So from an engineering perspective, these are all things that we believe we can find, we hope we can find good solutions for. And everybody I talk to that is working on it is excited to work on these problems and wants to think deeply about them. So it's kind of an exciting talk to like, hey, let's not let's not hide. Let's not pretend like everything's perfect right now. Let's engage with the issues that we have. Like, lightning works really great right now for for what we're doing. It could just it could be a lot better, and we need to be aware of how it could be better and not just pretend that it's perfect right now. Yeah. What's the most memorable thing you've seen? Is it Ben Carmen? I love seeing Ben Carmen. I think Ben Carmen is the most memorable thing I've seen. This is such a beautiful site. I'm actually excited he's going to do, like, live coding. Oh, really? You're going to watch it? Yeah, I've hung out with him a million times, but I've never actually sat there and watched him code before. So he's going to be coding in like an hour. So I'm going to watch that. I actually got to watch Epic Coludus live. Yeah. That was awesome, right? Dude, everybody keeps bringing this up and this recording. Yeah, actually. I didn't know I would like it that much, but something happened to me, like in the middle of yesterday where I was like, maybe my head was starting to fill up with ideas. I was like, I want to sit down and start building something, I think something I'm going to try to talk to the organizers about. There's a lot of after parties. The last talk happens at 05:00 p.m.. People go to dinner. Then there's an after party, then there's another after party, but I'd like to have a quiet room to go after the last talk and just people are there with laptops building stuff because I don't like the idea that I'm still, like, two days away from having my laptop open and really coded. Speaking of Evan, I've been recording everybody for this mix tape that I'm doing, and everybody keeps saying your thing is, like, the most memorable thing here. What do you have to say about that? Well, first, I'm flattered, but I think there's much more epic things I've seen. I got a demo of Stratum V Two that's going to be super impactful, super important for decentralizing mining. So I think that's near the top of the list for me. Also really cool to see tony, Giorgio's, Ellen, spoit. Ellen. Ellen spoit has so much potential. The workshop was awesome. I was able to execute that attack that we saw last week on LNG nodes 15.1 and under. That was pretty awesome to compare. Yeah. Tony walked us through, like, hands on. We could do it on our own laptops. We set up a virtual lightning network, and we would steal funds from one of the nodes on that lightning network. Dude, that was sick. Do you see how many nervous people I saw some BCS in the room. They look nervous. Oh, yeah. I mean, listen, the thing is, we need to be doing these things now. Stuff like the Ellen Depog. We need to get that out of the way now before it becomes, like, a headline on New York Times, Financial Times next time that happens. Right. And, yeah, we need tools like L and Spoid to, like, you know, see how things hold up and find where things break. So I'm looking forward to more exploits being released. I think it's an excellent foundation, and I hope more people try to break Ln and contribute to Ellen spoiled. Do you think Ben's going to break Ln? I'm not breaking. Or is it going to help? I'm helping lightning, making lightning more private. Carmen, how's your tab comp? It's been great. Best tab comp ever. Better than last year, I think. So we got more people here. Workshops have been really good. Talks have been really good. More of my friends are here. You're here. Thank you, Ben. Yeah, it's been really good. I've had a lot of fun. It's got out of the attacking lightning panel. That was phenomenal. So Paul was saying yeah, it was really good. Probably going to have to turn off my lightning note eventually. This is terrifying. Really? Not really, but how do we fix it? Just talk about it? Well, talking doesn't actually do anything. We have to write code. But a lot of it's, like, research as well. It's like, we just know there's problems and we have ideas of solutions, but not like, oh, this is a real fix. It's like, oh, this is an approximation of a fix. So we're just still a lot of research to do by always smart people, hopefully to figure out better mitigations and solutions to these problems. But I'm not going to be able to do it. But smarter people than me are working on it, thankfully. Thank you guys for coming on the pod. I appreciate you all. ",timestamp:"00:50:17-01:00:04",topics:["TABConf","Bitcoin community"],type:"podcast",weight:9.932519761232543},{boost:0,date:null,description:"Introducing the Start9 sovereign computing model",episode_title:"Café ₿: Sovereign Computing w/ Matt & Aiden, Start9",guests:[{name:"Andrew",profile_picture:"https://pbs.twimg.com/profile_images/1465763053014859786/xYFN2czJ_400x400.jpg",ref_id:"ae4b13f8-0ee7-480a-b47a-82b967ad7a79",twitter_handle:"AP_ArchPublic"},{name:"Matt Hill",profile_picture:"https://pbs.twimg.com/profile_images/1347317316057321474/ieMjzK3x_400x400.jpg",ref_id:"3576ad28-a04d-4388-865b-3ec5114c4f9f",twitter_handle:"_MattHill_"},{name:"Lauren",profile_picture:"https://pbs.twimg.com/profile_images/1586022214901501952/U1dRyCxP_400x400.jpg",ref_id:"7f14bbf5-a60b-496b-a361-3663cf120299",twitter_handle:"LaurenJauregui"},{name:"Aiden McClelland",profile_picture:"https://pbs.twimg.com/profile_images/1470160097225498624/0BjKB_2W_400x400.jpg",ref_id:"04ddd9d4-9329-4e6c-aaa3-d65ea4a9342a",twitter_handle:"_dr_bonez"},{name:"Peter",profile_picture:"https://pbs.twimg.com/profile_images/1581695667193643009/EljNY-TH_400x400.jpg",ref_id:"a3384925-e15e-421d-b9f9-6d44e273ed05",twitter_handle:"PeterAnsel9"},{name:"Lisa",profile_picture:"https://pbs.twimg.com/profile_images/1541581547815436288/Li8wORWt_400x400.jpg",ref_id:"e6f0c6e3-3237-4b13-878f-bb740cd32f8d",twitter_handle:"lisa_hough_"},{name:"Isabelle",profile_picture:"https://pbs.twimg.com/profile_images/1466874333410717698/WRQh2-_m_400x400.jpg",ref_id:"c8df253f-47b3-465e-878e-8405c01c090d",twitter_handle:"isabelfoxenduke"},{name:"Tone",profile_picture:"https://pbs.twimg.com/profile_images/1416821178266787844/T1OkI9ZW_400x400.jpg",ref_id:"5729ac07-51d6-4268-b585-62680c846acb",twitter_handle:"ToneVays"}],hosts:[{name:"Alex Stanczyk",profile_picture:"https://pbs.twimg.com/profile_images/1539055022364708864/rwErK6x1_400x400.jpg",ref_id:"3126e2a3-bbe4-456b-b298-9714085fa286",twitter_handle:"alexstanczyk"},{name:"Derek",profile_picture:"https://pbs.twimg.com/profile_images/1598322677827207169/Cw0A3oOP_400x400.jpg",ref_id:"f441b996-7eeb-4210-b24c-fa011161709d",twitter_handle:"derekmross"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/239722cb-4216-414a-a17b-5adf9d52e15a.jpg",keyword:!0,link:"https://stakwork-uploads.s3.amazonaws.com/uploads/customers/2707/media_to_local/0ec4a941-250c-4e1d-8d2a-6c506c3ba4b2/4bd8010d-b2fd-41b4-8041-8a953ef06492.mp3",node_type:"clip",pub_key:"02574d6e8e787372184b6f17c40d6c6fe1777db9015801f95dfd24692784d767cd",ref_id:"700e8ab8-7cc3-476c-87ea-524081f2322c",show_title:"Swan.com",text:"right, Matt. Well, thanks for joining us. Very excited to be talking to you guys about what you're doing. I know there's a bunch of swans who have ordered stuff from you guys, and it's pretty fascinating. So for those people who don't know what Star Nine is, if you don't mind, would you give, like, a five minute summary on what start Nine is, what are you guys doing? Why are you doing it? And then we'll start opening it up to whatever it is you guys are working on, and then we can do some Q and A, if you like. Yeah, sounds good. So we are, in the broadest sense, a computer company. And our goal as a company is to make self hosting software, open source software, accessible to everyone. And that might sound really boring right out of the gate, right? But when you understand what that means, and you understand that in the current model of computing, that basically your cell phone and your laptop, all these things that you call computers or devices, are really functioning as remote controls that are operating somebody else's computer somewhere else. And oftentimes the computer that you're operating most of the time, in fact, is owned and controlled by one of the Big Ten tech giants. Other times, it is just a small cloud computer that is hosted by the app that you happen to be using in that moment. So, for example, there might be a Notetaking app on your phone that is plugging into a server somewhere that is owned by two founders in a room running that server. And so every piece of information that you write in that Notepad, every time you use it, those signals are flowing through their servers. All the data is stored on their servers. And this scales all the way up to whenever you use Twitter, for instance, or Facebook or Google. Every piece of information is flowing through their servers. So all your communications are intermediated. You are never talking to somebody directly. You are always talking to somebody through a messenger. And that messenger very often has full access to everything you're saying, when you're saying it, et cetera. And secondly, all the data that is produced in those interactions, whether it's you storing a photo or you sending a message to somebody, all that data is likewise stored forever on those third party servers. And sort of how it's always been. When I say always, I mean since the second computing revolution, the cloud computing revolution took off about 20 years ago, give or take. This is just how it is and we've gotten very used to it and it's been very convenient of course has led to many conveniences and superpowers that people have to get more done in a day. But I forget who says this definitely Lornal Arcos in Red Rising but I'm sure somebody in the real world has said it as well. The bill comes due at the end of the meal so the bill is coming due. This wasn't free. It comes at enormous unforeseen costs that are just now starting to be felt and will continue to rise. And so we recognize this as a company, as individuals and we set out to kind of do something about it. And our solution to this is the solution to this which is a disintermediated computing paradigm where human beings and their computers are interacting with each other and those computers are interacting with other computers without the involvement of trusted central third parties. That doesn't mean it's PeerToPeer. It just means federation is okay too. Meaning I can run a server and people who trust me, who are close to me in my life can use my server to interact with each other. It's okay to trust people that you know and who have earned it. So we envision a computing paradigm where people are either communicating PeerToPeer or at least utilizing the servers of people that they trust. You know, members of families, the organization that you belong to, whatever it is. And in order to make that possible, for that computing paradigm to be possible at all it requires people to run their own servers. And I don't mean a server sitting in a bunker somewhere that you don't control. I mean a physical server that you have physical access to. It requires that. And secondly it requires you to be able to use that server. So it's not enough to just buy a Raspberry Pi and install Linux. The vast majority of people in the world are incapable or at least don't have the time and energy and patience to use that thing properly and in perpetuity. These things require enormous amounts of technical acumen. They require time, they require ongoing maintenance forever. It's not a set up and forget type of thing. And so what we have set out to do is provide the tools, namely in the form of an operating system that enables a totally non technical individual to set up and administer a physical personal server for the purpose. Of installing and running almost any variety of self hosted open source software under the sun and converting their computing life to a private one that excludes any trusted third parties. And we try to do this without compromise. It's an ongoing series of trade offs but we are really taking a purist approach to this and trying to do without compromise ultimately resulting in you. When you say without compromise what do you mean by that? I mean that to make anything functional. There's always this trade off between user experience, like making something super easy and convenient, and the principle underlying your purpose, which is to enforce privacy censorship resistance. It's the age old issue of security is basically it's the exact opposite of convenience, right? Like you always have this battle going on between the two things where you're trying to protect your stuff, it just makes it less convenient. And finding the balance there is pretty tough. It's a hard it's a hard computer science problem. It is. And under certain paradigms of computing, like once you have accepted the cloud computing paradigm, this intermediated custodial computing paradigm, you're sort of bound to fail at the privacy and censorship resistance principles because it's. Not really you can't do it with that. You can't without an enormous injection of trust and oversight, which itself just raises costs and ultimately corrupts. Right? So the stance is that we got away with this for a while because it was young and new. It's like in a man. I don't know. There are also massive, massive honey pots for hackers, right? Like when you have these centralized databases full of everybody's information. How many times have we heard this story over the last ten years where even huge credit rating agencies that have hundreds of millions of people, hundreds of millions of records on people get hacked and everybody's information gets stolen and it's big problem. Yeah. The four costs that we talk about with the current computing paradigm are privacy, invasion of privacy, censorship, the security vulnerability that you just mentioned, which is that anything that is worth hacking will eventually be hacked. Period. That's an axiom. And lastly is cost because in order to try to preserve the things that consumers want, like privacy and censorship resistance, the costs forever rise because there's more and more middlemen, right? Security is just more and more layers. And so what's happening here is these tech giants and to be honest, some of the smaller software as a service providers as well, like I mentioned, the tiny little note taking app that's on your phone or something, their costs are rising. It is not a good business to be a service provider of information and data. That is a bad thesis. It was the thesis in Silicon Valley for the last few decades. It's what their bread and butter was, was this idea of, you know, give away some free software product and then just become an indispensable middle man, like to sit right in the middle of everyone's stuff and make them totally dependent on you and then eventually, someday we'll figure out how to see them. Which is the problem. It's what the problem we're facing with everything today. You're seeing it used as a method of control over the masses. A great example of this is Apple and the Apple Store, right? They're threatening to remove Twitter from the Apple store. You need their permission. They are the gatekeepers with the power. That is correct. Apple, as Quick Anecdote canceled our original app, right? Originally, we wrote an Android and iOS app that you would use to connect to your embassy. That is how you administered. Your server was through a native app for these platforms. And Apple shut us down. They told us that we can no longer release additional updates. They provided very little information or guidance. We appealed through multiple boards, and eventually they just said, you're out. And our response to that, I wrote up a huge blog post about this and posted it from my Twitter account and from the start, Nine Twitter account a couple of days ago, if anyone wants to read it. But our response was the proper one, which is what you do when any central authority, whether it's Apple or in a nation state, becomes sort of domineering in your life. You can't punch back. That's their game, right? You're not going to win through you're not going to beat politics with politics. You're not going to beat, you know, business through trying to compete with Apple, you have to opt out, right? This is the most powerful tool available to a club. It's the most powerful tool available to all of us is to simply stop feeding the beast, stop using the things that they offer. Don't fight them for better offerings. You don't go to Apple and say, hey, I want better privacy. Just stop using them. And when I say just, that's actually really hard, right? Like, it's not easy to go on strike and to opt out of these highly convenient systems that we've become largely dependent on. But that's our job. That's what we're doing in Star Nines. We are trying to give people the tools that enable them to opt out of these massive big data surveillance systems. And the good news is that it's not all or nothing. You don't have to, like, take the full plunge. It's not like this huge daunting thing. You just need to take that first step and then gradually, over the course of years, even move your digital life on to systems that you control or that someone in your family controls. And by doing this, not only will you be protecting yourself with minimal convenience loss, by the way, because what we have done is not some crazy, esoteric, inconvenient thing. It's for anyone who has and uses an embassy. You'll know, like, it's not that bad, and it's going to get better and better and better by the month. We're moving very fast and making it very convenient. But not only are you protecting yourself with minimal loss of convenience, but you are almost indirectly fighting back, right? It's a consequence. You're doing something that's in your own best selfish interest while simultaneously benefiting the world by starving out the beasts that are suffocating it. And that's a very powerful idea. In fact, we think it's so powerful that it's bound to happen. I do think that there are scenarios where we go through an enormous period of history where something like this does not come about, but so long as we and others and quite frankly, the whole Bitcoin space keeps pushing for these opt out abilities, which is what Bitcoin is, by the way. Bitcoin is this huge opt out technology for opting out of the fiat monetary system and it's a huge one. And we're just taking that same idea and be like, yo, opt out ",timestamp:"01:17:40-01:30:45",topics:["Start9 computing model","Cloud computing revolution","Computing paradigms","Opt-out technology"],type:"twitter_space",weight:9.312597274780273},{boost:0,date:1670878744,description:"Thoughts on Binance and CZ",episode_title:"Escaping $ Debasement With #Bitcoin",guests:[{name:"Joe Consorti",profile_picture:"https://pbs.twimg.com/profile_images/1596902707511664640/GYGWVDts_400x400.jpg",ref_id:"8d2024b2-03bb-454d-9bd6-bb121904b76a",twitter_handle:"JoeConsorti"},{name:"Nik Bhatia",profile_picture:"https://pbs.twimg.com/profile_images/1496241412580397058/s7jy5g3a_400x400.jpg",ref_id:"d76f4499-ccf6-4153-9bc1-257a580aa079",twitter_handle:"timevalueofbtc"},{name:"Sam Callahan",profile_picture:"https://pbs.twimg.com/profile_images/1592532728775409667/0DayEP2Q_400x400.jpg",ref_id:"5a044a91-8dee-421c-86dd-8c734dc9bc32",twitter_handle:"CallahanMusic_"},{name:"Brian De Mint",profile_picture:"https://pbs.twimg.com/profile_images/1546297674512470016/oEVF8rJQ_400x400.jpg",ref_id:"064e04f7-8320-4854-8325-0cc19cd7ff55",twitter_handle:"BrianTheMint"},{name:"Dylan LeClair",profile_picture:"https://pbs.twimg.com/profile_images/1508157904913899522/3l7ctauV_400x400.jpg",ref_id:"283edea0-55cf-4245-95df-8d6d3dcb1851",twitter_handle:"DylanLeClair_"},{name:"@coryklippsten",profile_picture:"https://pbs.twimg.com/profile_images/1569687200857755648/fxiCeaqc_400x400.jpg",ref_id:"21aca21d-9a96-40a9-a8b8-a523ae6591c3",twitter_handle:"coryklippsten"},{name:"Matt C",profile_picture:"",ref_id:"337e3256-0602-4baf-a4b7-ca6d0655c569",twitter_handle:""}],hosts:[{name:"Bitcoin Magazine",profile_picture:"https://pbs.twimg.com/profile_images/1444022922377576453/AzvXYXGr_400x400.jpg",ref_id:"0e7b904e-5161-4aa8-9f0b-65bee6050ddd",twitter_handle:"BitcoinMagazine"},{name:"Chris Alaimo",profile_picture:"https://pbs.twimg.com/profile_images/1579209742370672646/rck7M_MR_400x400.jpg",ref_id:"3a1bd698-9d67-40e4-ba6d-3e2262b385ca",twitter_handle:"ChrisAlaimo6"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/f3a55dda-3dd5-4f62-99c1-bab3a88c27c1.jpg",keyword:!0,link:"https://stakwork-uploads.s3.amazonaws.com/uploads/customers/2707/media_to_local/80ab6951-8961-4aad-a458-a397ed6fd3cf/88c750f6-7569-4f69-947c-d61a398c358c.mp3",node_type:"clip",pub_key:"02814a5050f43a36bb052c7a3f22f0e86700abe037a44d99b45e0cb424d9398cbf",ref_id:"ea039879-1342-42d9-92e1-1fd4b6561488",show_title:"Bitcoin Magazine",text:"You'Ve been all over the scams in 2022 and even before that. But I've posted a little bit today, and some people have said this is valuable. Some people have said you're just a paranoid floodster. But I've been posting a little bit today about finance BNB. If you take a peek at BNB and bitcoin terms to basically add all time highs, ten X in the span of week in 2021, and just for instance, right, like, I like to evaluate things in bitcoin terms in this industry, whether it's private valuations, public valuations, crypto tokens, right? And B. And B is worth 2.8 million bitcoin, which is certainly fascinating, right, given that it's a centralized fork of ethereum that finance spun up from nothing. They've arbitrarily halted the BNB chain multiple times. So thoughts on thoughts on CZ? Obviously, he's the main character now, which we've seen in crypto doesn't usually end well, I guess. Just give me your preliminary thoughts. Yeah, I mean, it won't end well eventually, one way or another. We don't know if it'll be some cataclysm or some kind of like, slow bleed just chipping away at regulation. And at the end of the day, the assets that are trading on this platform, finance aren't worth anything. So the trading infrastructure itself that only trades worthless assets isn't worth anything either. And I think that basically makes crypto trading platforms inherent value pretty much zero, other than whoever is still playing greater fool crypto gambling games on their platforms. So as long as that continues, maybe they can continue to extract value. But I don't think you can actually end up going public or monetizing this thing with some kind of exit through this sort of offshore distributed type thing. It's just easy getting rich basically, as long as you possibly can and trying to keep the window open as long as possible. I 100% agree with you on BNB. Obviously, this is company script. It's you know, he can pause the validators at any time. I think he, you know, if he wants to replace one of these guys on the, on the zoom calls at any moment, he can do it really easily. And there aren't that many of them, and they collude and cooperate, obviously, so nothing decentralized about that. Yeah, it's just weird. People betting on B and B is just kind of being long CZ and jumping on trades that he's also long. Kind of just betting on this guy to be smarter than the other people betting on him to be. The smartest guy in the room. Which is the same trade that 100 crypto funds NVCs have had on Sam bank and Creed for the last couple of years, which is just basically belong anything Sam's involved in. Because Even if it's a total scam and even if it's total bullshit. He's so smart that if you just pile into the same trade and ape him, then you'll probably do well. Right? And that's what so many of these people did. It was kind of like the new version of the GBTC ARB trade, which everybody piled into in 2000 and 22,021 and then got burned and led to this next brainless move of just going along salana and salana ecosystem crap. And, you know, it's just not a lot of independent thought. And nor would you expect there to be much, because when it comes to crypto, folks like these are people that have chosen to spend their life's work on something worthless. So I'm not sure why you would have high expectations for them. So, Matt, I see you have your hand up. Corey, I just want to add one thing to the combo and then would love to hear your thoughts on Matt. I can't confirm this, but heard from an extremely reliable source over the weekend, just kind of on your GBTC thread a little bit and waiting for confirmation on this. Decided. I haven't posted this officially on Twitter, but hearing from the extremely reliable source, heard that Alameda was actually very much involved in the GBTC trade of Genesis. Posted to Genesis, borrow more, lever up long the GBTC discount premium with leverage essentially, apparently, according to the source, who will remain nameless, but definitely very much in the know in terms of all of this happening in the industry. Very connected person. Told me that DCG executives were actually going around and this is in 2000 and 22,021 were actually going around and pitching these three Arrows capital and now meters of the world and everyone else to go do this trade, this leveraged circle jerk with DCG entities of buying the bitcoin or sending dollars to DCG. I can be a source for that. This was active and very heavily promoted. Everybody was doing it back in 2021. Buy a bunch of bitcoin or even just send cash and they would just convert it into bitcoin for you. And then remember, it used to be a one year lock up. And then when they started really wanting to push it, they changed it to a six month lock up. And that's when the flood really came. And this is where all the BlockFi yield was coming from because it doesn't matter what asset it was like, let's say that you could get, you know, essentially like risk free 20 or 30% on this GBTC premium. You can double that out a bunch of different ways. Even if it started to drop a little bit, even if your expectation was six or eight, you could still pay like 10% on stables and consider three or 4% to be like customer acquisition costs, like marketing costs, and still have some left over to pay some yield on that. But at the end of the day, all this is is something that is illegal in traditional finance, which is funding institutional trading and leverage with retail deposits. It's not something that you can do. It's not something you can get away with. So it's funny Sam Bankman Freed even tweeted out in the wake of the Celsius collapse in June that Instow to Instow loans are fine because both are sophisticated, but retail lending to Enstow is shady. Well, at the same time, of course, doing exactly that in a slightly murkier way. Yeah, I think it's interesting to see the pattern. And maybe this is just trying to frame a lot of these industry participants under the same light, and maybe CZ or other actors are more legitimate. But it's interesting, the same kind of like position of strength kind of shoot down on some industry players say this is a poor risk model. It's like position of weakness and act really, really strong. Right? We've seen this happen over and over and over again. And in the reality, none of these guys were all that sophisticated and they were just levered to the tips in various ways and various carry trades that blew up in their face. The other funny thing was this thread that came out yesterday or the day before, and obviously I think it was Rom he's like crypto CFA or something like that, and I retweeted him and tweeted a couple of his things out over the last week. But basically just sniffing out and putting together that Alameda was probably made money at first when the only people on FTX were relatively unsophisticated or small fish, basically. And then when the big guys came, the smarter guys that were way smarter than people with 18 months of junior experience at James Street, or someone who looks and talks like Caroline and everybody on math or whatever, like when real shops came and started trading on FTX, they just started ripping Alameda's face off. And I verified with multiple funds that they were duplicating. The strategy that I tweeted out about, basically just at closing, there was some kind of like rebalancing or refunding of these leverage tokens that existed on FTT. And one guy made 50 X on his money in a year or something like that, and lots of other people were on that trade. I guess at least a few people have pointed to CMS Holdings as having really ripped the face off of Alameda for the last few years, basically doing this, and lots of other people learned how to do it too. It just really wasn't that complicated. So I think that thesis of this guy basically wasn't nearly as smart as people thought. Not some kind of like super genius, obviously just losing money. And the reason that he started getting into retail. As long as people were dumb enough to go along with this theory of FTX equity is valuable and FTT token is valuable. And all this other stuff the move into retail, like sponsoring the arenas and buying blockfolio and sponsoring Pomp and all this other stuff was really just to try to get into a position where they could take fees off of people. Because this is Ben Hunt. Excellent theory. Talking about this a lot too, in the last few days that you want to be in the flows, right? You don't want to be in directional bets at some point. So it's just like this houdini escape attempt to try somehow to get into the retail business where low end people will eat fees and build this big financial institution that's kind of more retail focused since they obviously couldn't make money trading. ",timestamp:"00:08:42-00:19:36",topics:["Binance BNB","Changpeng Zhao","Alameda Research","bnb"],type:"twitter_space",weight:17.912974381160645},{boost:0,date:null,description:"Brad Mills explains his stance that Stackchain is a shitcoin",episode_title:"Café ₿: Bitcoin Lightning ⚡️ Q&A w/ Bobby & Paul From Voltage!",guests:[{name:"Tomer Strolight",profile_picture:"https://pbs.twimg.com/profile_images/1591960241008148481/HtyINxtU_400x400.jpg",ref_id:"3a2bc97d-072c-4ed9-9a59-17ceeb68fe99",twitter_handle:"TomerStrolight"},{name:" Brady Swenson",profile_picture:"https://pbs.twimg.com/profile_images/1502564606836981763/fmqtNrNc_400x400.jpg",ref_id:"560cf9ee-2844-4ced-bbfd-d0ec639b2177",twitter_handle:"CitizenBitcoin"},{name:" Jeff Ross",profile_picture:"https://pbs.twimg.com/profile_images/1307109108127019008/rPNj47yJ_400x400.jpg",ref_id:"4f4f53c7-5a3a-46df-b334-9951fe38dc96",twitter_handle:"realjeffreyross"},{name:" 2140data",profile_picture:"https://pbs.twimg.com/profile_images/1598330787778232320/ZVFcRtet_400x400.jpg",ref_id:"c8fb52d1-fa69-410d-bf96-8a7559bba863",twitter_handle:"2140data"},{name:" q_liketheletter",profile_picture:"https://pbs.twimg.com/profile_images/1560683048680665088/4MrHM_UY_400x400.jpg",ref_id:"d82c0d30-d0d3-4947-a358-d28f1cd5292e",twitter_handle:"q_liketheletter"},{name:" iBobbyShell",profile_picture:"https://pbs.twimg.com/profile_images/1583132979571920896/1Std3_ya_400x400.jpg",ref_id:"2f9bd0a3-1215-4a89-9dc6-d64f170961af",twitter_handle:"iBobbyShell"},{name:" Tone Vays",profile_picture:"https://pbs.twimg.com/profile_images/1416821178266787844/T1OkI9ZW_400x400.jpg",ref_id:"ac43b4f0-9056-4a6b-9d30-4a6250405ade",twitter_handle:"ToneVays"},{name:" sonofsats",profile_picture:"https://pbs.twimg.com/profile_images/1593080311000211456/Dr_NQ9Iw_400x400.jpg",ref_id:"d584f070-a66a-4b53-b15a-8142f8daea66",twitter_handle:"sonofsats"},{name:" futurepaul",profile_picture:"https://pbs.twimg.com/profile_images/1508452962917666821/1QheRD09_400x400.jpg",ref_id:"fcb50ec8-2669-47da-87b9-1702affb30c9",twitter_handle:"futurepaul"},{name:" Greg Foss",profile_picture:"https://pbs.twimg.com/profile_images/1552599670945464320/3OgqRHNo_400x400.jpg",ref_id:"a2ba4e1e-aab7-43b0-90d7-d3c6a9738ad0",twitter_handle:"FossGregfoss"},{name:" Brad Mills",profile_picture:"https://pbs.twimg.com/profile_images/1541955880752750592/XJqwIn2E_400x400.jpg",ref_id:"9a49201c-3b03-4a83-bcb8-d92dbf3d55b6",twitter_handle:"bradmillscan"}],hosts:[{name:"Alex Stanczyk",profile_picture:"https://pbs.twimg.com/profile_images/1539055022364708864/rwErK6x1_400x400.jpg",ref_id:"3126e2a3-bbe4-456b-b298-9714085fa286",twitter_handle:"alexstanczyk"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/239722cb-4216-414a-a17b-5adf9d52e15a.jpg",keyword:!0,link:"https://stakwork-uploads.s3.amazonaws.com/uploads/customers/2707/media_to_local/0ad62f26-289d-4eba-af0b-0da68515cbb6/c5c6ea3d-df5a-464d-9b41-a6bf3a0372a9.mp3",node_type:"clip",pub_key:"034248fa888690a85021cf117c168a535c53b92e1fdf3e4f9cefddfe09118d8207",ref_id:"929def08-6b32-4313-a296-eaa1e5ee8d1b",show_title:"Swan.com",text:"Alex, can I ask Brad a quick question? Of course, go ahead. Hey, Brad. Stack chain is just the gamification of turning Kuckbucks into SATS. And the only reward is people get more SATS. So I'm curious, why did you post that stack chain was a shit coin this morning? Oh, my God. Here we go. Shot fired. Bread went off the stage. He's requesting come back up to defend himself. It should be interesting. The reality is that there are lots of detractors of stock chain. For various reasons. It is something that can. Oh, my God. What's up, Brad? How can you declare it? How come you posted as a shit coin? Do you not understand what we're doing over there? 3 million cookbooks converted hold on. 3 million cookbooks converted in four months by $500. I spent a lot of time in the Djen pits of shitcoinery, and this feels like a shit coiny thing to me. So that's why I said that, because the shit coins do stuff like that. Which means you're buying right now, right? Buying bitcoin. I'm always buying bitcoin. None at all. Good burn, Alex. What? Buying bitcoin? No, I'm not buying can we just back up? What exactly is stock chain? Sorry, I'm sort of be the idiot on the panel. Here we go. Look, this is what it is. It's a bunch of clubs decided we're going to stack some bitcoin and play a fun game on Twitter and post memes and kind of replicate what a blockchain is while they stack bitcoin and compete for blocks in a big long Twitter thread and kind of meme about it. But to me, I was a big fan of like, the Lightning Trust torch and all those things like the state chain torch and things like that. I loved that stuff. I thought that was cool because it served the purpose. It was like a political message. The lightning torch was similar, but the Lightning torch was like almost a political message because we were sending the lightning torch proving to the shit pointers, like to Roger Fur and all the BCRs that lightning wasn't vapourware and that you were sending it across borders. People were kind of like making a political statement. Like somebody received it in Iran and then sent it back over to someone else in another country. And it was kind of like a political statement that I could get behind. But the stock chain culture, I think, to me looks more like a little bit useless and a waste of energy. It looks like we could be doing better things with our time. And as an outsider looking in on it, that isn't part of bitcoin culture. It does look like a bunch of weird people, like, bragging about pumping the price of bitcoin even though they're only buying like, $5. It just feels okay, hold on. Brad, Brad, Brad. It's fasci. OK, as a proud stock chainer, I think you need to do more. Okay? I would happy to talk to you offline because it actually is a very noble cause. Nothing more than a bunch of clubs, but that's exactly what it is. Okay? Okay. And I just want to end with this. I have a proud stock chainer. I think I've done it four times. That being said, it is the total antithesis of shit coinery. Okay? It actually is a disciplined and find the stock chain tip. Sort of teaches you how the blockchain works indirectly. Just my opinion from a 60 year old fuck. Okay, this actually is a cool thing. Because there's at least a dozen swans who are stack chainers, including Corey Clifton and oh, by the way, Michael Sailors. A stack chainer. Everybody's a shit owner now. No, I'm on the other side of it. I think Brad has way too much free time in his hands. I guess he needs to find. It. I didn't get in on the premiere of the Fact chain, so maybe that's why I'm salty. For those of you who missed it, you got to go back and listen to the podcast recording of this show for the Thanksgiving special was so goddamn funny. There was one part where American Hall was comparing Brad Mills to a small furry mammal in the grass. It's great. I'll leave it at that. You got to go check it out. It's hilarious. So, Brad, I think some of your concerns are probably valid. It does look a little odd from the outside, but honestly, it's just a bunch of plebs having fun stacking SATS in the bear market. That's really what it comes down to. Ant is also correct. There probably is our $3 million cuckbuck mark. He said asterisks. And that's probably correct because there are some people who play this game and squash or they create fake receipts or whatever, but they're losers because they didn't get a stack stats by doing that. And then the other thing is that in effect, it actually increases the difficulty adjustment because the block height goes up. There's another dollar added once that happens. So somebody else is purchasing more Sass and it's really just a fun way. To shift the gamification of stacking. That's really what it is. And a way for people to talk shit about each other while doing it, which makes it fun. I don't know something about it. It's all good. I'm a fan of both of yours. I'm a fan. And if we are all thinking alike, then somebody isn't thinking right. Quoting General George Patton. If all bitcoiners are thinking alike, then somebody isn't thinking. So thank you for your input, Brad and everybody, I'm signing off. I'll listen to voltage. Thanks, guys. Don't worry. Normally I'm not aligned with the things that you say, but I think stacking is pretty dumb. I'm just going to take this one. That's for a back ended compliment. Brad. That change. Awesome. Well, I just followed Brad because. Nice. Alright, Brad, I just want to say we all love you, man. Let's keep ",timestamp:"01:23:39-01:30:26",topics:["Brad Mills","Stackchain is a shitcoin","what is a stackchain"],type:"twitter_space",weight:9.22888708114624},{boost:0,date:null,description:"Tone Vays gives his analysis about what is needed for a final Bitcoin capitulation and the return to a bull market",episode_title:"Café ₿: Bitcoin Lightning ⚡️ Q&A w/ Bobby & Paul From Voltage!",guests:[{name:"Tomer Strolight",profile_picture:"https://pbs.twimg.com/profile_images/1591960241008148481/HtyINxtU_400x400.jpg",ref_id:"3a2bc97d-072c-4ed9-9a59-17ceeb68fe99",twitter_handle:"TomerStrolight"},{name:" Brady Swenson",profile_picture:"https://pbs.twimg.com/profile_images/1502564606836981763/fmqtNrNc_400x400.jpg",ref_id:"560cf9ee-2844-4ced-bbfd-d0ec639b2177",twitter_handle:"CitizenBitcoin"},{name:" Jeff Ross",profile_picture:"https://pbs.twimg.com/profile_images/1307109108127019008/rPNj47yJ_400x400.jpg",ref_id:"4f4f53c7-5a3a-46df-b334-9951fe38dc96",twitter_handle:"realjeffreyross"},{name:" 2140data",profile_picture:"https://pbs.twimg.com/profile_images/1598330787778232320/ZVFcRtet_400x400.jpg",ref_id:"c8fb52d1-fa69-410d-bf96-8a7559bba863",twitter_handle:"2140data"},{name:" q_liketheletter",profile_picture:"https://pbs.twimg.com/profile_images/1560683048680665088/4MrHM_UY_400x400.jpg",ref_id:"d82c0d30-d0d3-4947-a358-d28f1cd5292e",twitter_handle:"q_liketheletter"},{name:" iBobbyShell",profile_picture:"https://pbs.twimg.com/profile_images/1583132979571920896/1Std3_ya_400x400.jpg",ref_id:"2f9bd0a3-1215-4a89-9dc6-d64f170961af",twitter_handle:"iBobbyShell"},{name:" Tone Vays",profile_picture:"https://pbs.twimg.com/profile_images/1416821178266787844/T1OkI9ZW_400x400.jpg",ref_id:"ac43b4f0-9056-4a6b-9d30-4a6250405ade",twitter_handle:"ToneVays"},{name:" sonofsats",profile_picture:"https://pbs.twimg.com/profile_images/1593080311000211456/Dr_NQ9Iw_400x400.jpg",ref_id:"d584f070-a66a-4b53-b15a-8142f8daea66",twitter_handle:"sonofsats"},{name:" futurepaul",profile_picture:"https://pbs.twimg.com/profile_images/1508452962917666821/1QheRD09_400x400.jpg",ref_id:"fcb50ec8-2669-47da-87b9-1702affb30c9",twitter_handle:"futurepaul"},{name:" Greg Foss",profile_picture:"https://pbs.twimg.com/profile_images/1552599670945464320/3OgqRHNo_400x400.jpg",ref_id:"a2ba4e1e-aab7-43b0-90d7-d3c6a9738ad0",twitter_handle:"FossGregfoss"},{name:" Brad Mills",profile_picture:"https://pbs.twimg.com/profile_images/1541955880752750592/XJqwIn2E_400x400.jpg",ref_id:"9a49201c-3b03-4a83-bcb8-d92dbf3d55b6",twitter_handle:"bradmillscan"}],hosts:[{name:"Alex Stanczyk",profile_picture:"https://pbs.twimg.com/profile_images/1539055022364708864/rwErK6x1_400x400.jpg",ref_id:"3126e2a3-bbe4-456b-b298-9714085fa286",twitter_handle:"alexstanczyk"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/239722cb-4216-414a-a17b-5adf9d52e15a.jpg",keyword:!0,link:"https://stakwork-uploads.s3.amazonaws.com/uploads/customers/2707/media_to_local/0ad62f26-289d-4eba-af0b-0da68515cbb6/c5c6ea3d-df5a-464d-9b41-a6bf3a0372a9.mp3",node_type:"clip",pub_key:"034248fa888690a85021cf117c168a535c53b92e1fdf3e4f9cefddfe09118d8207",ref_id:"332af4b9-782f-40e4-878c-45bb9d7edcdc",show_title:"Swan.com",text:"Yeah, for sure. Shout out to Tone Vays throwing you an invite to come up. Brady Swenson in the audience throwing you invites. Guys, Tone Vays had a well, there was an article regarding Tone Vays in a strategy session he did on YouTube talking about what we need to see before he's convinced we've got capitulation. We're moving up again. Hey, good morning. How's it going, Tom? Morning, guys. So would you mind just taking two minutes? And when I say two minutes, I'm serious about two minutes. Because sometimes you can go for like a 20 minutes rant. Alright, five minutes. You want to tell us what you're thinking in terms of what we need to see in prices, et cetera, what we need to hold before we know we're back into a bull market. There's a lot of speculation that we're hitting the bottom. There's a lot of market indicators popping up that people are saying mean at the bottom. I don't know if at the bottom. What do you think, Tom? Yes. I have to go and check the price of bitcoin real quick because it just woke up in time for spaces. Lucifer, back up to 16, I'll tell you. 16,370? Yeah. Well, we're back to 16 four after flirting with 1601 more time. So I am one of the view that if you get too many chances to buy the perfect low, it's not the low unless you get so many chances to buy the low that everyone gets bored and thinks bitcoin is never going up again. So at the moment we've had too many chances to buy the perfect low of 1600 or a little bit under. And that makes me so right now I am leaning towards the direction of one more capitulation. How long can it go? Hard to say. 1413, but it's the structure of the capitulation, right? 15 and a half, like we did a few weeks ago. And if we were already at $20,000, I would be full on full market right now. That's it. That was the low. Kind of like what happened with COLVID, but right now it feels more like 2015, where we crashed into the sub 200 low and then we spent like five months, six months flirting between 203 hundred, maybe got to 350. And then once again, like after January we crashed the below 200, and then again in August we crashed to below 200. So now it feels more like 2015 again, like we spent so much time at the low. And it wasn't even the low. So people A, got bored and then B, got hit with one more capitulation. So for me to call a bull market right now, I would need a clean, higher high, which means we go up to 21 22 $23,000 range, and then on the way back, don't go below 19 and reverse at 19 and start to push towards 21 22 again. So that's what it would take for me right now to consider a bull market or, you know, a quick drop to below 14 followed by a swift rebound back to 18. That would also get me super bullish. Got it. That was a great summary. So shout out to Jeff Ross in the audience throwing you an invite. If you want to come up and give us your five minutes on what's going on in the markets, you're welcome too. For those of us who are aggressively stacking this low or this correction, you're telling me that we still have a chance that this might last a little while longer? Yeah, it feels like it. But keep stacking because time wise, this can't last too much longer. I can't see this. I'm already a little bit like, wow, this thing lasted far too long. But I guess as late as March, there is no way we're going to be sitting at these lows with less than twelve months to go to the having. With everyone having their countdown in days when it's less than 365 on their wall, I just can't see it. I love it. Personally. I've been super aggressively stacking this entire time, and I know many others are. There's some new data out from Glass Node that says entities owning less than one bitcoin of collectively accumulated 1.5 billion so added 96,200 bitcoin to their holdings since the FTX collapsed, all time high balance increase. And then entities owning less than ten bitcoin have added over 3 billion worth in the last month. Yeah, those are my two favorite metrics. Wallets that have accumulated over one bitcoin has just crossed 950,000. Let's hope that's 1 million leading into before the having, right? Like in the next three months, by the end of Q one, I would love to see that metric break 1 million wallets that have stacked more than one bitcoin. And the other metric, well, double metric, how many bitcoins are entering the Lightning network and how many bitcoins are entering the liquid network? That one is super small because once bitcoin enters those networks, it doesn't really leave. There's no reason for it to leave. It's better there in both of those networks because it's there because it solves a problem. And that problem requires bitcoin liquidity to come off on shape. Not the solution. I should say not that problem. Yeah. But it's also a way to mark sort of network growth. So we talk about this thing called the Network of Fact where and Lawrence LaPard says that like one of the only things that would concern him is if the bitcoin network started getting weaker, meaning less users, less lightning growth, all that other kind of stuff. That's an interesting point, because as long as bitcoin keeps getting stronger, it's already the super dominant. It's the only proof of work network really worth talking about at this point. And that's exciting because that just means it's just getting stronger all the time, regardless of price. Jeff ",timestamp:"00:16:01-00:22:44",topics:["Tone Vays analysis","Bitcoin capitulation","Bitcoin bull market signals","Lightning and Liquid networks"],type:"twitter_space",weight:9.22888708114624},{boost:0,date:1637366400,description:"Nuclear Reactors are safe - salt cooled reactors with TRISO nuclear fuel particles",episode_title:"Securing Bitcoin With Nuclear Energy",guests:[{name:"Nuclear Bitcoiner",profile_picture:"https://pbs.twimg.com/profile_images/1443185278525579278/_Yl1nao1_400x400.jpg",ref_id:"60f5891f-0864-4ed4-987a-81da4768b3ba",twitter_handle:"nuclearbitcoinr"},{name:"Eric McErlain",profile_picture:"https://pbs.twimg.com/profile_images/1252969137/Screen_shot_2011-02-23_at_10.59.21_PM_400x400.png",ref_id:"4815365d-44d0-4b06-9d9e-32070158d03c",twitter_handle:"atomiceric"},{name:"Puru Goyal",profile_picture:"https://pbs.twimg.com/profile_images/1590742805613203456/QAtYq_C__400x400.jpg",ref_id:"c24af059-b38b-4ce5-9547-9192c9eff579",twitter_handle:"purugyl"}],hosts:[{name:"Zack Voell",profile_picture:"https://pbs.twimg.com/profile_images/1595803006737448961/fFrf7VJb_400x400.jpg",ref_id:"e32c7661-c635-4089-a620-ffce509eff0e",twitter_handle:"zackvoell"},{name:"Compass Mining",profile_picture:"https://pbs.twimg.com/profile_images/1425165074373791744/f2CgInvP_400x400.jpg",ref_id:"812e5d37-47fb-4077-915f-df52e2ef84d8",twitter_handle:"compass_mining"},{name:"Will Foxley",profile_picture:"https://pbs.twimg.com/profile_images/1580970227193376776/9oQfeExj_400x400.jpg",ref_id:"704b9e82-3e40-40b6-874c-6bb8fadafbef",twitter_handle:"wsfoxley"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/ae91fac6-a1af-4877-9a92-e793d556ee66.jpg",keyword:!0,link:"https://www.youtube.com/watch?v=YBaA17NODlA",node_type:"clip",pub_key:"03c18d0c6c35333f22bc524e21a5fd1d2d9886f5d4d958dc1de95d025de5c84cfc",ref_id:"d1295013-33f3-431f-99a0-baa6d83500ad",show_title:"Compass Mining",text:"I think Eric said pretty much everything I had to add. I think apart from the safety case, I think it's a really heavy regulated industry which not a lot of people understand. You can't just make a reactor in your backyard and put it online. It doesn't happen that easily. Right. So there's a lot of regulatory compliance that goes into it. And especially if you work in the industry, you realize, which I had not a huge amount of appreciation for, which I've realized over the last four years that licensing of reactors not super easy now. So that's another drag on the industry which has been happening. But I mean, part of it is required because of just how the technology is. And like Eric was saying, it's like we pay the price for it. But apart from that, I feel like we just have to point out how cool nuclear technology really is. Like, if you are really serious about climate crisis and everything else that you see in the mainstream media and you're not pro nuclear, you're just kidding yourself because the energy mat just doesn't add up. So I feel like apart from validating the safety cases for the advanced reactors specially, which have really improved over the build up that we've seen over the 1970s, which were mostly pressurized like auto reactors. So a lot of the reactors that we are probably going to see over the next decade or so would be sold reactors which will have these trip particle fuels, which if you look at it, I think they're pretty much the most robust fuel on the planet today. So I would ask anyone to go Google tripod fuel and look up what they actually are and realize how cool that technology really is and how badly we need it. Because that small amount of particle which is the size of a golf ball, can produce power as much as a coal plant or natural plant can. So that's just really powerful, right? I mean, nuclear reactors are safe today. Like the build up that we're seeing, we'll probably see in the licensing that I've been part of the technologies out there. It's just a matter of building it. And I think it just depends on the economic incentives. If the incentives are right there, then people are going to go out there and build it. And the opportunity I was talking about is going to show up sometime over the next decade where a lot of these private companies which have been involved in the space for a while now. I kind of like relate this to the space race for these private companies, which was happening in the early 2000s, where companies like SpaceX and Blue Origin were just starting out and not a lot of people had heard about SpaceX for the first ten years, right? Like we just started hearing about when they start launching rockets, but they had a massive amount of failure going into those rocket launches. And I think it's similar with these private nuclear companies of today where they're slowly and privately building out these technology options for us. I think we'll start to hear more of those in the next five years or so and it's just going to happen. And I think the public sentiment will drive from that because people will soon realize that if you want to be serious about climate change, then you have to be on the side of nuclear. I think it's very similar to like even with Bitcoin, I feel like that's just the sentiment. I think there's just the economic incentives are going to be such that it'll just drive adoption naturally. I'm with you there, ",timestamp:"00:35:08-00:38:18",topics:["Nuclear Reactors Technology","TRISO Particle Nuclear Fuel"],type:"youtube",weight:9.170270925405587},{boost:0,date:null,description:"Relationship of Year-on-Year change of Bitcoin Hashrate, the Bitcoin Economy and The Energy Industry",episode_title:"Café ₿: #Bitcoin News & Trusted P2P Reviews w/ @Apollosats",guests:[{name:"@2140data",profile_picture:"https://pbs.twimg.com/profile_images/1598330787778232320/ZVFcRtet_400x400.jpg",ref_id:"190b5001-a42a-46cc-b0d3-b6f74c625648",twitter_handle:"2140data"},{name:"@FossGregfoss",profile_picture:"https://abs.twimg.com/sticky/default_profile_images/default_profile_400x400.png",ref_id:"09913e9b-38dc-4465-9d4d-ae0c9ba9eeca",twitter_handle:"Fuckkkk"},{name:"@w_s_bitcoin",profile_picture:"https://pbs.twimg.com/profile_images/1594796869233811474/g0_ZRshz_400x400.png",ref_id:"b178b239-3b18-4a16-9d43-c5d15ba6f7f4",twitter_handle:"w_s_bitcoin"},{name:"@NeilJacobs",profile_picture:"https://pbs.twimg.com/profile_images/1599432572727169025/NSoPdchB_400x400.jpg",ref_id:"4b6997e1-ce0b-4a1d-90e7-dbaccef4b783",twitter_handle:"NeilJacobs"},{name:"@brandon_gentile",profile_picture:"https://pbs.twimg.com/profile_images/1561369452284895236/-8WgdwEm_400x400.jpg",ref_id:"f940c5e8-4808-4197-a38f-3f19d311a7ad",twitter_handle:"brandon_gentile"},{name:"@apollosats",profile_picture:"https://pbs.twimg.com/profile_images/1576946734927794176/2ail9FoU_400x400.jpg",ref_id:"74f4280f-5fdb-4bbc-aee2-a2ed32d64372",twitter_handle:"apollosats"},{name:"@StackchainSig",profile_picture:"https://pbs.twimg.com/profile_images/1589791699571802117/n_Y1Qm7J_400x400.jpg",ref_id:"6e652629-38ec-49d8-9f5c-3ba28f80c799",twitter_handle:"StackchainSig"},{name:"@TomerStrolight",profile_picture:"https://pbs.twimg.com/profile_images/1591960241008148481/HtyINxtU_400x400.jpg",ref_id:"7af639f8-8c5c-4ce1-a43b-e8560ed40e2b",twitter_handle:"TomerStrolight"}],hosts:[{name:"@alexstanczyk",profile_picture:"https://pbs.twimg.com/profile_images/1539055022364708864/rwErK6x1_400x400.jpg",ref_id:"6455df34-1abc-4ce8-9bb8-b02d411accec",twitter_handle:"alexstanczyk"},{name:"@pacificbitcoin",profile_picture:"https://pbs.twimg.com/profile_images/1570140686753619970/UFEnzSv5_400x400.jpg",ref_id:"f8268a26-9761-40c1-bdd6-dad9db44d032",twitter_handle:"pacificbitcoin"},{name:"@SwanBitcoin",profile_picture:"https://pbs.twimg.com/profile_images/1491428856858914820/aFlitvha_400x400.jpg",ref_id:"da3f56bf-9763-4389-a9ec-d807049bd0b8",twitter_handle:"SwanBitcoin"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/239722cb-4216-414a-a17b-5adf9d52e15a.jpg",keyword:!0,link:"https://stakwork-uploads.s3.amazonaws.com/uploads/customers/2707/media_to_local/7cf57bdb-c905-46e3-a7e5-4c0bfd4f8d04/71c08fae-cce8-4600-ab9e-758420e78dcf.mp3",node_type:"clip",pub_key:"029099ec31eb33594611dc47d5c93de2c1aa86918e3a36b408c14a500601c8bc9b",ref_id:"2b1c8514-7d10-4e83-9006-9974ec31d35a",show_title:"Swan.com",text:"I appreciate it. I wasn't going to do, like, anti who's holding bitcoin rant and who's mining bitcoin rant? Whenever we could ask that question. I wanted to look at these kind of hash rate numbers year over year and just going back to late 2018, and this isn't like exact science. I just basically picked the first dates that I could find in January for that year. So just take it with a grain of salt. But January 8, in 2018, hash rate was around 16 X A hash. January 9, wow. 2019, it was floating around 45 X A hash, which was like 181% increase. I believe January 20 was around 100 X A hash, which would have been like 122% increase over the previous year of 45. And then January 21 was 150 x a hash about which was, you know, about a 50% increase. So where are we going to be in January 2020? Oh, I guess that was 2021. January 2022, I didn't get that one, so I'm missing that one. But January 2023, you know, I don't know where we're going to be for there, but I mean, right now, today, it's 260. The problem is they're not making money, right? So there's an overhashing, arguably, miners bought a lot of rigs last year. They were overfunded, and they thought number would go up, and now they're hashing like, there's no tomorrow and selling every bitcoin. They mine pretty much immediately because they're losing money left and right in the bear market. So you could easily see rigs going offline soon and the hash rate coming down to match the price better. So here's the interesting thing, because I agree with you. I did just go grab January 2022, and it looked like that it was floating around basically, like 175, 190 x A hash. If the year before was like 150, it's like even less as far as is like, the increase. You're going from like 181% to 120% down to 50, and then like, a little bit less. But now it's like up to 260. So I know it's like a lot of numbers. If you're not looking at it, like, I am right here to kind of hear it I hope I'm relaying it correctly for everyone to understand. I feel like we already had a massive correction in the amount of X A hash, and now it feels like it's going back up. Well, exactly. And if you pull this up over like this same time frame, like go back to like I just pulled it up to like 2016 now, and I can see all this hash rate. And you can see it like goes from like this little line there's like this kind of upward, you know, trajectory. And then right around May 2021, you know, of course there was like a big drop. Like it it gets, you know, June, July, July it drops. June, it drops way down to like 87 from and this was in 2021, so May 2021, it had been cranking along. It was like 179 X A hash doing great. Then all of a sudden it dropped huge, down 87 X A hash per second. And then from there you can see it's almost like a bunch of miners turned off. And then here goes a bunch of new ones. Bump bump, bum bum bum bum, boom boom boom. And it goes all the way up. And here we are, 260 something. Yes, I show this article, I've been showing it a lot recently on this show, and I know a lot of you still haven't fucking read it, so I put it up in the nest for those who still haven't checked it out, because it is really fucking interesting. And it's exactly what we talk about every single time we talk about this. It's this bitcoin energy gravity idea that Joe Burnett came up with. But it's a really simple and beautiful idea. It's this idea that when bitcoin is flying high and the prices is surging, it becomes very profitable to mine. So new investors, instead of just aping into bitcoin, what they do instead is they ape into mine. Charts are bullshit. I'm sorry. Because you can't tell what's going on right now when bitcoin dropped from 69 to ten because they're using this log ten bullshit scale. Like, I like the chart idea. It's just that execution is atrocious because they should just show what happens when you go from linearly, what happens when you go from 69 to 17 in terms because I can't tell because it's all gobbled up by this bullshit. Learn how to read log charts and then get back to me. But anyways, what I was saying is like, no, it's bullshit. Log chart. This is exactly what can be used. It's exactly what plan B used to fool everybody into bullshit. I'm sorry, it's bullshit. Get a better chart. The plan B thing is a completely different problem. But yeah, no, all this is saying this is saying something that's fundamental to bitcoin. And honestly, I don't think you can argue against it because this is what happens with capital in the bitcoin ecosystem. At least now that it's been fully capitalized is like when the price is flying high and it's cheaper to mine a bitcoin than to buy it outright, then what you get is you get investment in miners, and that naturally stifles aping into bitcoin. It naturally stifles investment in actual just buying bitcoin spot. And so then you get half rate increase, and then once the price starts falling and it gets to a certain point and it actually becomes more expensive to mine than to buy spot bitcoin, then that flips. And then instead of investing in miners or keeping miners on, you just start buying spot. So it's this dance that goes back and forth. And that's why he's called this bitcoin energy gravity, because it's basically when the price flies too quickly up too high, then there's this natural gravity that brings it back down, which is the flip from investing in spot into cash rate instead, because it becomes cheaper just to set up miners and mine bitcoin than to buy the spot itself. Right? If it costs five grand to mine a bitcoin, you're not going to buy bitcoin. You're going to buy miners and mine in bitcoin for five grand to pop. You know what I'm saying? But if all of a sudden it costs 20 grand to mine a bitcoin and you're not going to invest in miners anymore, you're going to just buy the spot bitcoin instead if you want to invest in bitcoin. So that's kind of like that's the natural back and forth that we see playing out over and over again. So one thing that I think could get us to a peda hash very quickly is if we do get this next run in price, that's like crazy, right? And this is not concerning retail. Retail, they all buy bitcoin spot. This is concerning more like institutional grade investment, which we've been seeing a lot going into mining this past cycle. But I think this will kind of continue this back and forth dynamic between supporting further hash rate and then just buying spot bitcoin. All it comes down to is, what's the cheapest way we can get bitcoin? That's really it. Yeah, I agree with that. It's good evidence for what I think people know from first principles. You have a volatile asset. So when the price goes up and it's cheaper to mine bitcoin instead of buying it, people are going to buy bitcoin. And then because it's volatile and because there's a lot of opium, they're going to overbuy and over invest, and then bitcoin will crash at some point because it's so volatile. And then you're going to overhash and miners will go bankrupt, and then the hash rate comes back down and then go back up. But, yeah, it's good evidence for that. He could have explained it in plain English the way you just did, by the way. I don't know why I'm a big fan of plain English bullshit terms. Doesn't he explain it in the article? Did you click into the article? Are you just reading the tweet? No, I'm just saying, like energy, gravity. BS. He could just say like, when the price goes up, you have overhauling and people over invest when the price goes down. You don't need these kind of terms necessarily. There's a certain segment of the population who's not interested in these things unless it has new terminology because they feel like they're smarter, because they're reading new words. That's true. Fair enough. It's marketing. And gravity is one of these fundamental things that everyone feels like is such an important thing in the universe. And it is. We wouldn't be here without gravity. So, I mean, why not name this? See the meaning, man. It always comes back to the same shit. All these different areas. Terminology, analogies are great because they make it easy for people to understand. But at the end of the day, to me, all I know is these motherfuckers will never stop printing. Ever. They've done it my whole life. I came up with a new term recently. So instead of looking at bitcoin year over year growth, I think we should now start looking at it. Epoch over epoch growth. EOE. There is a tweet from bitcoin magazine. It's a billboard in Kansas City. So there's this huge billboard. It's got a US dollar bill on it that says BTC in the middle. It's really funny, but it says, $1 from 2010 will buy you forty two cents of goods today. Do you know why? I think it's fantastic. Human race needs to wake the fuck up. I don't know who's next. Foster tomer. I've spoken already. Let Greg go. Well, good morning, guys. Greg. I'm doing well, guys. Nice conversation. Can I just interesting conversation. Remember, there are a ton of equity investors who cannot buy spot bitcoin. So they buy bitcoin miners as a proxy for bitcoin spot exposure. So in a perfect world with efficient markets, your argument would make 100% sense. But in the absence of equity buyers who cannot buy bitcoin spot and buy bitcoin for miners for what's called beta exposure, that's why the price of bitcoin miners went up into unrealistic levels on a valuation basis relative to the price of spot bitcoin. Okay? So then think of when investors have unit price bias. Mom and pop retail, oh, I can buy a stock of a bitcoin miner at $4 a share rather than buying bitcoin for 40,000. They don't understand that you can't buy a partial bitcoin. They just have unit price bias. So there's that coming into the equation. And then remember, bitcoin mining is a shit business. Okay? Describe to me any other business where you don't control your energy input costs and you don't control your output revenue. Both are set by markets outside of your control. So you want to be a publicly traded bitcoin miner. That's a shit business. Okay? So any bitcoin miner that does not control the cost of their energy is not a great business. And then back to Alex's comment. You're totally right. You can't stop printing. Why? Because it's pure mathematics. The debt spiral is funded by printing more fiat. Fiat is the error term in the debt spiral. So don't overthink things, but try and explain supply and demand where you have a $350,000,000,000 asset, where the Bitcoin publicly traded bitcoin miners at the top of their market cap at the top of their market caps weren't even measured more than $50 billion. Remember that. I'm curious. Like, got to see your hand. But, Greg, I want to ask you a question. I asked this question, I think, to Tone or somebody else the other day, but okay, for these people who cannot buy Bitcoin, the actual layer, one base layer asset, they have to buy a derivative or a security. Do you think MicroStrategy is a better proxy for bitcoin than any other securitized bitcoin product? So, having spent a dinner with Michael Sailor in La and having owned his MicroStrategy at times over common stock, at times over the past, I believe MicroStrategy today is an exceptional buy. Why? Not because of their bitcoin holdings, but because of Mr. Sailor's vision and where lightning and payment rails are going. But I can't talk too much out of school about that. I will just tell you. The capital structure of MicroStrategy is so hedged and wedged with capital structure arbitrage players convert ARB players, to be exact, where they bought almost zero coupon bonds. Some of them had a nominal coupon on them in order to play the optionality of the MicroStrategy stock, because that's all convert ARB desks do, is get optionality out of a convertible ARB excuse me, a convertible bond and play the ball game and play put Call parody on options markets using a convertible bond. That's what they did there. So that capital structure is a little Bit. It's extremely levered to the convert ARB equity desks and convert ARB desks on Wall Street at a price of under $200. I did the math recently. Yes, I did buy some MicroStrategy stock after having the pleasure of sitting down with the CEO face to face. But I don't own it because it owns Bitcoin. I own it because of a vision of a CEO who I really like. Okay, I'm not going to tell other people how to buy Bitcoin, but I'll just tell you if you're buying Bitcoin using other derivatives rather than buying spot Bitcoin, go and get your fucking investment policy guidelines changed, please. So that you can actually invest efficiently on behalf of your unitholders, rather than with one hand tied behind your back because you're too fancy to buy spot bitcoin, but you're going to buy all these other derivatives that's absolutely atrocious risk management. Oh, guess what? That reflects probably 90% of the pension funds and money managers in America and Canada. You know what? Let's apply Kui bono to that, though. Why are those entities precluded from buying underlying assets? You might ask yourself that question. Because the market is so manipulated. Alex, that's not what I think. I mean, Greg can probably back. No, it's more it takes time, gentlemen and ladies. It takes time to change an investment policy. Why are those policies like that in the first place? Greg, I'll tell you why. Because they are staffed by people that are septogenarians. Like, I know Warren and Charlie Munger aren't septogenarians, they're octogenarians and whatever 90 year old people are. But at the end of the day, they're fucking they're from past times, right? They're trying to COVID their ass. They're all invested in bank stocks and everything that bitcoin is going to disintermediate. So God forbid they should buy the spot. But yeah, we'll buy these Bitcoin buyers. Do you think it has anything to do, anything at all to do with the fact that Wall Street can't make a profit if pension fund is buying an underlying asset versus a Securitized product? Yeah, 100%. Yeah, that's not a bad thing. Greg, have you also in the past talked about how these funds are dumping grounds for crappy wall? That was Max Kaiser. Max Kaiser went on Tucker and completely explained how all that works. That was my true. Yeah. Now don't forget, look, there are structured products that make sense. There are all sorts of things that when you get the alchemist, when I say alchemists, these are the structured product derivatives guys that turn a single B structure into AAA structure like they did on The Big Short and that's bullshit. But there are actually a lot of good structured products that make things more efficient for a large fund. Now, I'm talking a large fund that cannot buy. Remember, if you're a really large fund and you have to own at least 1% of your fund in something in order to justify allocating an analyst time to that particular investment, if you're a trillion dollar fund, 1% of a trillion dollars restricts you to basically large cap everything. Which means you'll never be able to get into small cap anything unless you can do it through a structured product. So understand that there's different ways of skinning that fish, but it's the difference between big money and mom and pop retail money, okay? And you can't apply a blanket solution to everything and then I just want to start by or end by saying this, look, log scale is log scale. Don't confuse it for what it is, but don't say that people are trying to terence, this is not a shout out or a shot at you. It's just saying as long as people understand they're looking at a log scale, they shouldn't call it. It's just a part of mathematics. And log scales mean a ton to the mathematicians. They may not mean a ton to the mom and pop retail crowd. So just, guys, if you break everything down to first principles, mathematics. You break things down into what's a good business and a bad business. I don't know if I'd want to be a bitcoin miner where you have no control over your business, but then you were able to sell stock to the public at an inflated price and feel good about yourself. Look at Argo Blockchain right now. They are living the nightmare of taking capital at the wrong price and deploying it wrongly. And, yes, you're right. There's a lot of hash that will come off of the system. Why? Guys are running rigs because they're trying to generate cash flow. It doesn't mean they're trying to generate a profit. They're trying to generate cash flow. There's a big difference. People understand that difference. Yeah, the thing you said about any business where you can't control your input costs or your price of sale, I had not heard it put quite that way before, but that makes a lot of damn sense. I was like, oh, damn. Yeah, you're kind of right. Which leads me to the next thing. Those businesses might only make sense if they're actually power producers. Amen, brother. Amen. And that's where the world's going. When you see Duke Energy mining bitcoin and stabilizing the grid, you'll understand that bitcoin and its beauty have arrived in capitalist America right now. It was just a precursor and a fucking horror film because it was sold to unsophisticated investors at the wrong price by people that were CEOs of mining companies because they did it in their parents basement. Very simple. Yeah. So when you see announcements like ExxonMobil rolling out this flared gas project where they believe it's going to reduce their greenhouse gas emissions by, like, 63%, they're rolling it out across four countries where they're taking this flared gas. My understanding is they're not actually giving a crap about the bitcoin, just trying to reduce emissions so it looks good on their books. Alexand, respectfully, that's not the energy producers we're thinking about here. We're thinking about the electricity distributors. We're thinking about Shameless promotion of a business I'm involved in. We own peaker plants that are on call. They are not running 95% of the time, but we have capital costs. Don't you think it would be wise for us to figure out how to explain this concept? I've heard the word before, but I'm not sure I understand what it means. It's a peaker plant. Okay. The grid is inherently unstable because the grid and the demand for electricity fluctuates during the day. Right? The biggest electricity draw on a grid is when people get home from work and they turn on their stoves. Electric stoves. They turn up their heat. Electric heat. They turn on their hair dryers because they're going out at night. Anyway, the point is, the grid is set up for maximum demand. But there's not always maximum demand going on in the grid. But it's an ancient technology that needs you to be able to supply that power so that the grid does not black out when everybody goes to maximum demand. So in a given day, if you have 100 megawatt demand or peak demand, 100 megawatt, I'm talking about a micro grid here that's set up for the 06:00 P.m. Draw versus during the day, the true demand from the grid might be half of that, meaning 50 MW. So you have power producers that are primed to provide 100 MW, but only 50 MW is being used during the day or in the middle of the night. So what are you supposed to do with that? You're probably supposed to mine bitcoin to defray your capital costs of building these plants. Now, I talked about a peaker plant. This is a plant that is on call so that when you have a draw because of really exceptionally cold weather or really hot weather in the summertime when everyone's turning on their air conditioners and you have rolling blackouts, that's when the peaker plants come on. But a regular utility is always load balancing during the day just because that's the draw on the grid. So you'll have the Duke energies of the world that are baseload providers, not peakers baseload providers that are going to be mining energy because it helps to stabilize their grid. Why? Because you want demand for when your turbines are turning and no one has demand for it. Well, in Canada, we pay Americans to take that electricity from us. We don't sell it to them cheaply. Alex. We pay you lucky people to take our electricity. How messed up is that versus us mining bitcoin with that excess power capacity, and that is a fact. One of our nuclear generators sells not cells, gives power to the northern peninsula in Michigan, and doesn't just give it to them, we pay them money to take it as well. Well, if that's a good business model, you've rewritten fucking capitalism. Okay? So start mining bitcoin Canada, and get your fucking asses and gear. ",timestamp:"00:35:14-00:58:57",topics:["Bitcoin Hashrate","Bitcoin Economy","Energy Industry"],type:"twitter_space",weight:9.1248779296875},{boost:0,date:null,description:"Discussion on how much information investors and promotors knew about how BlockFi (and others) business's worked",episode_title:"TOXIC HAPPY HOUR! #Bitcoin is Easy Like Sunday Morning! 🍻😂",guests:[{name:" 2140data",profile_picture:"https://pbs.twimg.com/profile_images/1598330787778232320/ZVFcRtet_400x400.jpg",ref_id:"c8fb52d1-fa69-410d-bf96-8a7559bba863",twitter_handle:"2140data"},{name:"Tomer Strolight",profile_picture:"https://pbs.twimg.com/profile_images/1591960241008148481/HtyINxtU_400x400.jpg",ref_id:"3a2bc97d-072c-4ed9-9a59-17ceeb68fe99",twitter_handle:"TomerStrolight"},{name:" TC",profile_picture:"https://pbs.twimg.com/profile_images/1480160632360124416/AM_vVRko_400x400.jpg",ref_id:"dac0717a-a743-40d4-a89f-7523f071bbb0",twitter_handle:"publordhodl"},{name:" kann b",profile_picture:"https://pbs.twimg.com/profile_images/1480160632360124416/AM_vVRko_400x400.jpg",ref_id:"1170bde7-7f3c-4c4f-a158-5c48a98fe92b",twitter_handle:"publordhodl"},{name:" Dallas Rushing",profile_picture:"https://pbs.twimg.com/profile_images/1602759767029604352/hzuwh5ZB_400x400.jpg",ref_id:"13fed037-77ce-48eb-9544-25e7abff9395",twitter_handle:"dallasirushing"},{name:" Lisa Hough",profile_picture:"https://pbs.twimg.com/profile_images/1541581547815436288/Li8wORWt_400x400.jpg",ref_id:"5e154adf-d8bd-4adf-a23b-47a51c183163",twitter_handle:"lisa_hough_"},{name:" Collectooor of sats",profile_picture:"https://pbs.twimg.com/profile_images/1594362077132587009/cNAE2FU5_400x400.jpg",ref_id:"c84d0e47-7eeb-419b-a36e-5055b96044f0",twitter_handle:"hoardingsats"},{name:" Gold Leader",profile_picture:"https://pbs.twimg.com/profile_images/1594152783011250176/lHMHv3gB_400x400.jpg",ref_id:"96c4f802-25ff-4a81-b91f-cae5562bf4a3",twitter_handle:"GoldLeader89"}],hosts:[{name:"Publordhodl",profile_picture:"https://pbs.twimg.com/profile_images/1480160632360124416/AM_vVRko_400x400.jpg",ref_id:"5e189a7b-56c3-40ae-834e-4e2ccee3a9ad",twitter_handle:"Publordhodl"},{name:" Anders_",profile_picture:"https://pbs.twimg.com/profile_images/1391477993726529545/xqIjHq5w_400x400.jpg",ref_id:"15bdd6b9-bdfd-492d-b7bf-c5a56ecadc50",twitter_handle:"Anders_"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/0c42d408-e518-4ecf-b282-d864a8c14002.jpg",keyword:!0,link:"https://stakwork-uploads.s3.amazonaws.com/uploads/customers/2707/media_to_local/4e00853b-49e3-4b46-bd13-bf7f2aa25905/56f0089c-a7f2-4b1b-8576-a3e4ddb9791f.mp3",node_type:"clip",pub_key:"034248fa888690a85021cf117c168a535c53b92e1fdf3e4f9cefddfe09118d8207",ref_id:"c9e43dce-1fac-4545-be91-7aa8594fa7e6",show_title:"PUBLORD",text:"you're good. I was just going to ask DC or Gold I'm definitely familiar with I would take a decent amount of the details with a lot of these centralized earn yield type of products that all blew up. Do you guys know? Two questions would be one, do you think that investors like Pump or you Scope had full access to know all that they were doing to generate yield on those funds? And if that already has come out definitively, then cool. I just haven't been following that super close and because like I mean with them being a US company, like I figured there'd be access into like seeing exactly what they're doing to earn yield on that even by like investors. Maybe not like super tiny investors, but like if you're there from like if you're a seed guy, like you probably have access to know what they were doing to generate all that yield. Is that can you guys confirm if that was the case? Yeah, I'll take this one. Started proof of keys. Not your keys, not your coin. Listen, here's the problem. Even if McCormick would have said to block by, hey listen, I'm not sure what are you guys doing here? I'd like to have you as a sponsor. Thank you for whatever amount of money you're doing or anyone else that promotes it. Here's what goes on man, for proof of reserves. And it reminds me from the movie The Big Short, all right, if you remember, they go down to the rating agencies saying, what the hell is going on here? What is going on with these bonds? These bonds, you know, are just full of dog shit wrapped in cat shit and then layered with some more dog shit. How are they getting these ratings? And they finally get the lead to admit, listen, if we don't give them the rating. They'll just go down the street to Moody's and get the rating they want. This is exactly the same thing. So we can beat these guys up. Okay? But at the end of the day, there's always going to be another grip, another angle. It's going to be someone else that, oh, yeah, let's start a company. Proof of reserves. All right? We'll get proofofreserves.com, and we'll get all these companies to write us checks. And then when they go out and they want to be sponsored by someone, that person is going to call us, hey, you guys are proofofreserves.com. Does BlockFi have all this stuff? Oh, yeah, man. Yeah. So we're cashing checks from BlockFi and it's proof of reserves.com. We're making a mint until the ponzi blows up. It always blows up. James Ma'am real quick, if I could. Just add one thing on that. I think the question, too, is like, that people should ask is, you're like, okay, this exchange is offering me 6% yield on Bitcoin. You're like, well, where exactly is that yield coming from? Who's paying 6% to borrow Bitcoin? And why would somebody do that? And one of the reasons is that people will borrow Bitcoin to short it, and they'll pay a yield for that. But that 6% is still pretty rich. But I think what a lot of these companies were doing was basically like, for a Bit, you could earn 20% on UST. And so there were companies were probably taking dollar loans against an asset like Bitcoin, and maybe they're paying whatever, 8%, even 10% to borrow those dollars and then trying to go earn 20 over on Terra and then make that gap between the two. And they could pay that out as a yield into Bitcoin. But either way, the problem is, like, all of this sort of set on each other, and a lot of them start to go well, each competitor starts to move it further out on the risk curve, and they're like, well, they're doing it. Maybe we can inch a little bit more, a little bit more. And then by the time a couple of months goes by, everybody looks up and everybody is just, like, waist deep and fucking risk and systemic potential bulbs and stuff. And then there's no way to really unwind that correctly without there being shortfalls and you can't liquidate everything in time. So it's unfortunate that, like, a lot of them felt the need to take on more risk to stay competitive, which ultimately is probably the reason why all of the above kind of blew up. Yeah. James go ahead, man. Let's see your hand up. Hey, good morning, guys. Morning, Dallas. Puppy. Yeah, I just wanted to weigh in on some of the comments regarding I mean, there's a lot that's been said, so I'm going to try and synthesize my thoughts. I'll just start with the Exchange avenue because that's obviously who I work for. There is a palpable kind of steering via the capital stack of the ideas and execution of some of these exchanges. Meaning, like, if you're going to continue to ship coin, your cap table may have some influence on that, which is a real problem. So I just wanted to acknowledge the fact that Lisa, who was just in here, and myself, there are a layer of toxic, extremely, extremely toxic individuals who are working within these what we'll call third generation exchanges that are going to come out of this shitstorm and are extremely adamant about, obviously, for pledge to hold your own keys, but also to provide a level of we'll call it proper fiduciary custody, like a traditional bank does, being bitcoin only for institutionals. So I understand that you should never leave your keys on an exchange, but we're also preparing for governance models where they're not allowed to hold their own keys. So there's a really deep balance and I think that what you're hitting on pubby is important because you can only protect yourself so much reputationally wise in this space. Like TC and Gold said earlier, you should be fucking Ostracized. Like, you really need to understand this is not about this other bullshit, it's about Bitcoin. And there's a huge segment of the market that's going to get captured by an exchange, especially a US regulated exchange, that acts like a real fiduciary for the first time in this space. And they do have proof of reserves and they'll most likely be audited either after IPO or they will give out some kind of information to show their liabilities as well. So it's a complete transition. The fraud and the corruption in this space has just shown everything is getting whittled down and we see it on a regular basis and it's just very exciting to kind of help push that extreme toxicity on some pretty high levels of capital inflow into the space. You made some excellent points there and one I want to highlight was anyone that came in, which is, I know the majority of us, you heard about this thing called Mount Cocks, Mount Cox blowing up. Everybody came in in 2017. You start hearing this thing about not your keys, not your coin. Well, guess what, man, that was being preached. But honestly, aside from a couple of small exchanges, it never really sunk in with many people, all right? Until this year. Until this year, when you started seeing everything unwind, from Luna and Celsius and Voyager, now FTX and Blockbuster, now you're seeing it unwind and you understand what that means. Not your keys, not your coin. And this isn't to say, look, if you're new, yes, practically, you need an exchange to buy your bitcoin. For many people, however, anything else, you're going to do all right with your bitcoin, you can leave it there, not a problem. You just better understand the risk. Here's the assumption you're making that one, they bought the bitcoin. They say they did all right, because it's easily just a number on a balance sheet. That's a good feeling. You log into your account and you see that whole coin you bought. That's great. Your assumption is that they have it. Okay? That's your assumption. And two, that they're going to stay solvent. They're going to stay solvent. It's not going to go away. This is the wild rest, man. And there's a reason, all right? The government obviously is fearful, fearful of an asset class that is decentralized, censorship resistant. Anything they can do that will allow anything conflated with the wild west. They don't care. The more people that lose their money, the more people that lose their money is better for them. Most people are going to find bitcoin or people that are going to stay away from it for the longer time. But I think you have some great points here, man. Yeah, I appreciate it. I just want to make one more quick comment. There are varying. Like, we've sat down on regular basis and formed products and offerings for clients that can help alleviate some of the initial transition. Right. We don't want to hold any of your keys. We don't want to hold any of it. It's a risk to us. We get a withdrawal fee on the way out. We're good with that, man. Have a nice day. Here's your keys. But we do have some smaller options. Like, for example, we can give someone an address on the blockchain to see their funds and literally have them. It's kind of like our pleb level, easy access to verify exactly what's there. But I get it. At the end of the day, the private key is the asset itself. So there's a level of extreme balance between acting as a fiduciary, like a bank, which we're happy to have that bank underneath to provide that further security for people coming in, not having to seek yield from other parts of the business like the exchange, because you have a bank underneath. But it's definitely a really intense issue that's going on right now in particularly, and I'm narrowing this to the we'll call it the institutionalization or the financial end of bitcoin. And obviously we're really excited to help miners out and help all the parts of the bitcoin space. And I couldn't be more happy to be in a community of guys like yourself. Pubby, TC, Dallas, everyone, where this isn't a fucking joke. This is truly something important and I'm ready to lose my job every day going in and speaking the truth. Yeah, here's the hard part, man. You just want to have faith in something. If I could just find faith with one institution in this quote unquote industry. I hate using that term, my God. But like you say, man, we got to slow our heroes. Every month it's another company disappointing us. It's another person that you thought was bitcoin only that is rug pulling shit coining. Whatever. That's the disheartening thing. Dear God, why can't there just be an honest damn company? And you're right. Look, I get it. There's got to be a company that can offer some sort of on exchange solution for clients. Well, you know, develop a company where it's an easy multi safe for someone to handle. I don't know. I don't have all those answers. Until then, I'll just always say my assumption is if I have in self custody, it's not mine. It's zero, it's nothing. It's gone into somebody's pocket. It sucks that we have to be like that, because I know then you get, oh, my God, they're so toxic. Well, guess what? We've seen so many people they're targeting. You get people come in, they came into Celsius, they came into Luna, and they're in the space. Oh, my God. Bitcoin is at what, 20, 30, 40,000, whatever it was at that time, they came in, well, I missed a boat. I got to find this next bitcoin. That's a nickel, because that's my ticket out of here. The system is broken outside. My 401K sucks, so I'm going all in on this thing. That's a nickel. It's going to be $30 next year, and I'll be saved. It's a battle that we love to fight, man. It gives me purpose. Gives me a great purpose in life, is to help people understand what both systems are like, but it's disheartening the number of people that are coming into a space that has genuine intentions to help people and just rug pulling them as well. That's all I have to say ",timestamp:"00:55:59-01:08:18",topics:["yield generating products","investor disclosures","influencer marketing"],type:"twitter_space",weight:8.947233200073242},{boost:0,date:null,description:"Current bitcoin mining energy situation in Kenya",episode_title:"#Bitcoin Kenya 🇰🇪 - meet the Kenya Bitcoin community",guests:[{name:"Noelyne Sumba",profile_picture:"https://pbs.twimg.com/profile_images/1585949523901292545/tWf-IwWO_400x400.jpg",ref_id:"44455b1d-76cf-49df-baa0-cd606652885b",twitter_handle:"noelynesumba"},{name:"Okjodom",profile_picture:"https://pbs.twimg.com/profile_images/1577811376487088128/J2Z4nIgI_400x400.jpg",ref_id:"4c9df92d-3bb5-4d08-9a7e-a9ba15f58f03",twitter_handle:"okjodom"},{name:"Master Guantai",profile_picture:"https://pbs.twimg.com/profile_images/1521025685078302720/w9dZwehS_400x400.jpg",ref_id:"64c326c4-d4a9-4e6c-82fe-0c9bac8a7094",twitter_handle:"MasterGuantai"},{name:"Lorraine Marcel",profile_picture:"https://pbs.twimg.com/profile_images/2361719231/German_sheperd_Puppies_400x400.jpg",ref_id:"ab30679d-7931-4921-a4f8-6fee74e412c8",twitter_handle:"lorrainemarcel1"}],hosts:[{name:"Mary Imasuen",profile_picture:"https://pbs.twimg.com/profile_images/1465290507752558596/lZVbU9np_400x400.jpg",ref_id:"2d8ed8ce-5112-4dfa-9aa2-5fa8b874af68",twitter_handle:"mary_imasuen"},{name:"Lukas Poland",profile_picture:"https://pbs.twimg.com/profile_images/1382603302160932865/RgeQnCXM_400x400.jpg",ref_id:"217a2c5a-1cfd-4840-bbff-eec43da8c52f",twitter_handle:"duczko"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/56bbafde-60ef-4e4b-b930-978429c6a635.jpg",keyword:!0,link:"https://stakwork-uploads.s3.amazonaws.com/uploads/customers/2707/media_to_local/9f2ebf6e-a880-4579-986c-ff0c9c517559/2cb59251-775d-4691-9c8f-30fb9d7707b9.mp3",node_type:"clip",pub_key:"02574d6e8e787372184b6f17c40d6c6fe1777db9015801f95dfd24692784d767cd",ref_id:"3dff5b59-31e0-4ce9-8add-c8a2ba564259",show_title:"Global Bitcoin Fest",text:"so much for sharing. That sounds like a lot going on. How many people do you usually get to those meetups? Okay, so we have we it changes from 30 to 50. 30 to 50 people. Whoa, that's a lot. But part of it at our class, like the class and then the others are newbies and then we have the speakers and of course just anybody else in the bitcoin community. Okay, do you get swamped with bitcoin or so you manage to. Yeah, they come. But here's the thing, I am not that kind of a person who blocks people from getting to these meetings because at the end of the day, I want them to see why bitcoin and not shit coin. So I don't like tend to block people from coming to our meetups as long as you understand this is about bitcoin and not sheetcoin. So I find it important for them to learn and understand why we are advocating for bitcoin and not the sheet coins that they are probably participating in. And I have students, I can tell you for a fact, I've had students who are actually participating in shit coins. And they come, they listen, they learn, and they're like, okay, I'm just going to drop these and focus on bitcoin. So, yeah, so that's my approach. That's the female approach. Awesome. I guess most of us have been there, at least for sure. I was the shit corner, and I think that's the past many of us walk through. So I feel sympathy for the people in the shitcoin game. As long as they're not the main shillers, I feel sympathy. Exactly. So, Gridless, I'd like to hear a little bit about what you guys are doing with mining. And yes, could you share a little bit about that? Yes. So what we do is we find mini grid developers who are in rural communities who have overbuilt their mini grid capacity. So they have for instance, I'll just talk real numbers. There's a site in Morgana about two and a half hours outside of Nairobi that has a 50 kilowatt mini grid that was built a couple of years ago. The community only needs 30. It during the day, and then at night, between six and 10:00 p.m., the usage goes up another 10. So what that means is throughout 20 hours of the day, there's 20 kw available for use. And it's not being used, it's just being dissipated as heat. And that means that the developer, the mini grid developer isn't getting the full amount of revenue that they could get. And during those other 4 hours between six and ten, there's still 10 kw that are not being used. So what we did is we went, we walked in and we did a deal with them to buy that extra capacity as a buyer of last resort. It's just stranded electricity. And then what we do is we put in six minors in that case, because each of them takes about just over 3 kw. So we put six miners in that location on site and just started mining. The effects of that are pretty interesting in that, first of all, the sustainability of the business for that mini grid developer increases. It means they have full usage all the time. We can curtail our energy use within minutes and we can do it remotely. So it's automated even. And the plan is that we can continue to grow with other mini grids like this. So some of them will be small, 50 kw, like where we are. Others will be larger. 500 kw is the next site that's actually, we're about a third of the way built out with miners on it this week. And it might get even larger than that at some point. But really we focus on these smaller mini grids that don't have any grid connection back to the main national grid. And so it really helps strengthen them as a business. Sometimes I can't promise this at all, always happen, but at least in this case it has. Because they're getting the returns from us and being able to utilize their energy at full capacity, they can lower the cost of the energy for the people in the community. So in this case it dropped from about 1000 shillings per month per family, so household group to around 400 shillings per month. And so it's a sizable decrease in costs for a rural household. And it means that they can go from just first when families get this, they put on Led lights and then the second thing they do is make sure they can charge their phones. And then after that, if they still have some extra disposable income, they might look at buying a television or refrigerator or something like that. But what they can do is slowly, over time, this usually takes five to ten years. That community increases the amount of power they need. And with our set up and the way we've done, our business relationship with the mini grid provider is that we can just decrease the number of miners that are on site and move into a new location. So the community always comes first for power. That community means both households and local businesses. And then we come third. And then if the community and businesses increase, then we decrease. Is that clear? Does that make sense to everybody? Yeah. This sounds like the perfect model to showcase for all the bitcoin haters and energy use. Haters basically empowering local communities through bitcoin mining. What's the model? Do you buy the energy from them? That's right. We go ahead and structure a deal with the mini grid provider. So obviously we get a wholesale rate because we're coming in and buying the stranded electricity that nobody else can buy. But it is still significant enough because we're utilizing that excess energy 24/7, that it makes a significant impact on their business. Who is we? This is what we as gridless. So I should make sure everybody understands this too, that with hydro and possibly geothermal, but we're not doing that yet, that's 24/7. So it's very efficient power. As we look at the models for mining, however, if we look at solar and wind, it has a lot more variability in that the sun doesn't shine at night and the wind doesn't always blow and we can't just go put storage, battery storage in place for those dead times because that increases the expense significantly to install. So mining in those locations is a little different. You can still do it, but your return on investment goes from, you know, twelve to 15 months to maybe three years and and so you have to think a lot more you know, you have to think a lot more creatively about how you solve for solar and wind, but hydro and geothermal are particularly good for this. And how large is the market? How many minute grids are there in Kenya would you estimate that need this service? Yeah, so our estimate in East Africa, most of this Kenya, is there's about 200 stranded energy, renewable energy. Now, not all of that is going to be super useful because some of it's solar and wind. But even within the hydro mini grid space, there's a significant amount. So one of the things we did, we announced at the Africa Bitcoin Conference this last week was the Green Africa Mining Alliance. You can find out about it by going to just Gamma Africa or on Twitter. It's gamma underscore Africa. And the reason we did that is because there is a few other miners in Africa doing either on a small, very small kind of grassroots scale, like Carbon Coin is doing in Nigeria, or larger, like we see with Sebastian and his crew doing it called Big Block Data Center in the Congo. So there are a couple of people doing it in different stages, and we need more of it. Even as Grid list, we can never do all the mini grids that need this, even in East Africa, much less the rest of Africa. So Gamma is really about trying to get more people mining across Africa and creating a place that they can go to understand it, find help, be connected with good mining resources, including the people who sell it so they don't get scammed on buying the actual miners and then understanding what models work. What I'd like to see as well with Gamma is that we provide a body of knowledge and data, real information from the mining sites that can be helpful for policy and regulatory bodies as they start to make the rules around this across the continent so that they're at least coming from a position of information, of knowledge, not of ignorance. So, yes, what I'd like to do in the future is create a way that people can get real information and start their own mining. That's super awesome. Angola seems to have a fairly thriving mining community. Maybe I don't know if you're in contact with them in orland okay, yeah. Thank you. So I'd like to highlight I got to meet Eric in Ghana. Eric, thank you for the Tshirt. I really loved it. So if anyone saw the video that's the Gamma Tshirt Eric is talking about and maybe I'd just like to highlight the importance of what I saw Griddless is doing in Kenya. And so just recently there was news that came out that our solar electricity distributor is about to start billing people, that is, electricity consumers in dollars, Euros, and other foreign currencies. So this is because of the Depreciating Shilling. And of course, it's a bitching shortage of forex in the domestic market. So with this, we have companies like Gridless giving us a solution for cheap energy. And I think it's going to be a game changer for Kenya. For example, just today, I did not have power for a few hours before this space started. And I was worried, I was like, come on, what's happening? And it's been happening in terms of power shortages. So I think gridlock is doing a wonderful job and if Kenya can be able to receive cheap energy, then yes, I understand it's necessary. Thanks Darwin. What I hope we can do too, speaking to that is let me give you a story. So if you guys remember here in Kenya two weeks ago, we had a nationwide power outage for 5 hours and the people on the mini grid didn't lose power, the people that were on the main grid did. And so there's something interesting that's going on that's counterintuitive about national grid connection versus microgrid or mini grid connection. And I think especially for people in rural parts of the country, it becomes really interesting when you can start pushing electrification to the edges, making it less expensive, more available and more reliable than the national grid. And I think that bitcoin mining is the thing that can actually drive that. It's that silver bullet that was missing from it. Most people don't realize this, but any mini grid operator of any type, whether it's hydro or solar or wind, has had a real fight to be sustainable in this country, sorry, not even just in this country, across East Africa. So bitcoin mining as a buyer of last resort that's geographically agnostic, can go anywhere, I think can solve a lot of those issues and increase the connectivity and electrification that's needed in the country. So, ",timestamp:"01:28:52-01:41:46",topics:["bitcoin mining Kenya","bitcoin energy","Gridless Kenya","Kenya National grid"],type:"twitter_space",weight:8.81690502166748},{boost:0,date:0,description:"What is a speedy trial?",episode_title:"Taproot Activation Q&A with Bitcoin Devs - TABConf 2021",guests:[{name:"Andrew Chow",profile_picture:"https://pbs.twimg.com/profile_images/1452266201770496010/44FHCtZM_400x400.jpg",ref_id:"f96d87ca-5060-4021-aeb9-61db03312027",twitter_handle:"andrewrchow"},{name:"Ben Carman",profile_picture:"https://pbs.twimg.com/profile_images/1550704386007089152/pLwUSeff_400x400.jpg",ref_id:"1d1e95ba-b4af-415f-aafe-85c6dd7571b8",twitter_handle:"benthecarman"},{name:"Matt Corallo",profile_picture:"https://pbs.twimg.com/profile_images/697361498587451394/_rX0-O0W_400x400.png",ref_id:"08cb3c45-c0bc-4a60-ae5b-a1283d352c8b",twitter_handle:"TheBlueMatt"},{name:"Pieter Wuille",profile_picture:"https://pbs.twimg.com/profile_images/1264051937172836353/n7gHdLbB_400x400.jpg",ref_id:"40260d2f-3480-47d6-8515-d2e780901273",twitter_handle:"pwuille"},{name:"Vivek Kasarabada",profile_picture:"",ref_id:"60ed22d0-8cf3-410e-8a7c-9c343ae109ca",twitter_handle:""},{name:"Murch",profile_picture:"https://pbs.twimg.com/profile_images/1269477743525130241/-U843Cmt_400x400.png",ref_id:"3e2c1c73-a057-4475-9782-3bb0d3d8cc62",twitter_handle:"murchandamus"},{name:"Andrew Poelstra",profile_picture:"https://pbs.twimg.com/profile_images/1316562683009921024/FSscAYvJ_400x400.jpg",ref_id:"15fb9c53-c988-4af1-bbf0-4832d71b0a01",twitter_handle:"Blockstream"}],hosts:[{name:" TABConf (The Atlanta Bitcoin Conference)",profile_picture:"https://pbs.twimg.com/profile_images/1596233571521499138/YE8Us_Ml_400x400.jpg",ref_id:"eb1b6016-6223-4b2b-9264-2423ce66304f",twitter_handle:"tabconf"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/e7d2a4ca-6b44-4a45-a94c-6f48987979f7.jpg",keyword:!0,link:"https://www.youtube.com/watch?v=MrxtqAlRI2U",node_type:"clip",pub_key:"029099ec31eb33594611dc47d5c93de2c1aa86918e3a36b408c14a500601c8bc9b",ref_id:"88a4665a-7414-4ccd-96e4-3fb43f93d9bc",show_title:"TABConf (The Atlanta Bitcoin Conference)",text:"For context, maybe we could explain what Speedy Trial is. My understanding is it basically allows you to put a delay between activation and signaling, but there's also a way to back out if things seem to be going wrong. The activation mechanism we have used previously for CSV and SegWit was called Bit nine version bits. Speedy Trial is a modification to this where we have the start time of the first signaling period was really soon after the parameters had been finalized. And this allowed us to then see very quickly if nodes and minors were upgrading and then were starting to signal for Taproom. And one of the other key features in the speedy trial is that we added a minimum activation height. So this allowed us to delay the activation to a height in the future once there was enough signaling and the software cab locked in. So what this allows us to do is we can see whether Taproot would fail really early on and if it would fail, then it would fail quickly and we could try a different deployment method. I'd rather mention the end time. So the end time for the signaling was also fairly short. There was a whole period of about three months, but we activated it in like four weeks. The lock in was after was it. The second or a third signal? It was a third, I think. Anyways, we have a minimum activation height so that in between the the lock in time and the actual activation time, that's when everyone can upgrade. Everyone knows that Tap Rout going to happen and so they can be ready by the time we reach that minimum activation height. And so for Taproot, that minimum activation height is that 709,000, whatever. So here a small call to action. If you're running a full node and you're not running one or 22.0 or a newer version than that, you might want to upgrade when you get home immediately. Go ahead. ",timestamp:"00:05:16-00:07:48",topics:["speedy trial","minimum height activation"],type:"youtube",weight:8.499536991119385},{boost:0,date:1632355200,description:"The overview of the current state of the ASIC Bitcoin mining hardware market",episode_title:"The ASIC Mining Hardware Market",guests:[{name:"Vincent Zhang",profile_picture:"https://pbs.twimg.com/profile_images/1158285609196109825/fuB-e6lm_400x400.jpg",ref_id:"98e7bc98-3a3b-4ddf-9b48-5dcd78973739",twitter_handle:"Whatsminer_MBT"},{name:"Vincent Vuong",profile_picture:"https://pbs.twimg.com/profile_images/1260974518547312640/n47yvbNL_400x400.jpg",ref_id:"8390e230-e36b-4e0d-9f5d-70c6635bf3c2",twitter_handle:"BitcoinVincent"}],hosts:[{name:"Will Foxley",profile_picture:"https://pbs.twimg.com/profile_images/1580970227193376776/9oQfeExj_400x400.jpg",ref_id:"704b9e82-3e40-40b6-874c-6bb8fadafbef",twitter_handle:"wsfoxley"},{name:"Zack Voell",profile_picture:"https://pbs.twimg.com/profile_images/1595803006737448961/fFrf7VJb_400x400.jpg",ref_id:"e32c7661-c635-4089-a620-ffce509eff0e",twitter_handle:"zackvoell"},{name:"Compass Mining",profile_picture:"https://pbs.twimg.com/profile_images/1425165074373791744/f2CgInvP_400x400.jpg",ref_id:"812e5d37-47fb-4077-915f-df52e2ef84d8",twitter_handle:"compass_mining"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/ae91fac6-a1af-4877-9a92-e793d556ee66.jpg",keyword:!0,link:"https://www.youtube.com/watch?v=qKeUCNXa4Uc",node_type:"clip",pub_key:"03c18d0c6c35333f22bc524e21a5fd1d2d9886f5d4d958dc1de95d025de5c84cfc",ref_id:"198dfd3b-7d1b-422c-b118-48520629af43",show_title:"Compass Mining",text:"kind of want to kick off the general ASIC market conversation with us today with just like a general question on an update or an overview of the current state of the market. Like, if you look at price charts for the assets themselves right now, you see a little bit of selling activity over the past couple of days, maybe a little bit of fear, some dicey news coming from different regulators around the world. But if we focus on the hardware market, like if you were to give sort of a concise update on the state of Bitcoin mining hardware right now, what does the market look like? What are some key data points or movers and shakers jostling for leadership positions? And whatnot in this slice of the market? What things sort of stand out to you? Vincent from Compass I'll toss it back to you and then vincent from what's? Minor also, for sure. I appreciate that. I personally see that. I think in July we saw a lot of people had excess inventory, but we slowly starting to see markets pick back up again, especially with the coin wrapping up. Even with that slight dip down to 42K ish, we haven't seen too much selling and too much decreases in hardware. Typically. I spoke about this on an article with Coin desk where the asics generally don't go down in value as quickly as they go up in value. And we're starting to see that a bunch of public companies are making large announcements about picking up machines for Q two, Q three, Q four of next year. And for me, I think that it's extremely bullish because there's a lot of equipment that is on the secondary markets that these publicly traded companies can't touch. And so that's why it's going to be an interesting little bit. They're basically just purchasing from the manufacturer when sometimes specifically in July and August, the secondary market was cheaper than what was on the threat from the manufacturer. And I think that once people realize that and they realize they need to take advantage of all these areas, it's going to change how people procure their asics. That is interesting. Yeah, we saw a lot of heat on secondary markets there. Vincent, from what's minor? Same question to you. When you look at the ASIC market in general right now, what's the status of the market? What are key things that you see that stand out to you? Yeah, so market so in this year actually changed a lot. So we have to say change a lot. And the first change, so what I can see is actually this change happened since last year, not only this year, but this year, the trend was enhanced. So what I observed is the capital from North America and Europe. So they invested huge since the year 2020. So the big players, they sign agreement, longterm agreement, either with us or with Bitmen, and the procurement plan and quantity is really huge. And so the trend was changed, even enhanced this year, because this year, the investors in China, they were not able to put the Arctic minus in China mining further. So some small players doing mining in China, however, the large data center, all of them are almost closed and the regulation and the policies becoming more strict. So the investors from China, they reduce procurement quantity in big quantity. So we have to say more miners are moving outside of China and we can see that. So more miners are actually purchased by the investors outside of China. This is number one. Number two is that right now the big players, they prefer purchase the minus in advance. For example, as Vincent said just now, big players, they even purchase the supply of the in the year to some 22. Okay. Q. Two. Q two. Q three. Q four. They have the contract with us or with some other purchasers. So they prefer purchase even more than half year earlier than the supply time. And so, however, we are not saying the minus in stock are not able to be sold out. So some small and medium investors, they are trying to access to the minus available immediately. And this is not a small portion. So also big quantity can be traded. And also the Easter miner. So in the month of May and June, so the Easter miner becomes really cheap due to the regulations published in China. However, it's recovered very fast. But what I can see is probably from October, November onwards. So if bitcoin price will not have a significant increase or growth, I think the price of the miners may drop down. And another point is, so right now we can say the vendors like us, ask hardware providers like us. So we will prefer have long term cooperation with big players and investors. Okay, so you can see that right now, the sales policy from asik provider vendors also change a lot comparing with a few years back. It is totally changed and slowly it is not becoming the vendor market. So also it is well balanced right now between the vendor market and the purchase market. Okay, so these are the observations I can share. ",timestamp:"00:07:45-00:15:02",topics:["ASIC","Bitcoin Mining Hardware Market","markets"],type:"youtube",weight:8.467833996035228},{boost:0,date:1671029781,description:"Aftermath of the crypto market crash: Financial standings of DCG and Genesis",episode_title:"Café ₿: GBTC was the Genesis of the Crypto Contagion w/ @samcallah",guests:[{name:"@StackchainSig",profile_picture:"https://pbs.twimg.com/profile_images/1589791699571802117/n_Y1Qm7J_400x400.jpg",ref_id:"6e652629-38ec-49d8-9f5c-3ba28f80c799",twitter_handle:"StackchainSig"},{name:"@Meditation_Man",profile_picture:"https://pbs.twimg.com/profile_images/1597303881339314176/kFqDWvq0_400x400.jpg",ref_id:"cf7119ec-50a5-4ba2-a9a6-4a24835f3364",twitter_handle:"Meditation_Man"},{name:"@TomerStrolight",profile_picture:"https://pbs.twimg.com/profile_images/1591960241008148481/HtyINxtU_400x400.jpg",ref_id:"7af639f8-8c5c-4ce1-a43b-e8560ed40e2b",twitter_handle:"TomerStrolight"},{name:"@2140data",profile_picture:"https://pbs.twimg.com/profile_images/1598330787778232320/ZVFcRtet_400x400.jpg",ref_id:"190b5001-a42a-46cc-b0d3-b6f74c625648",twitter_handle:"2140data"},{name:" @samcallah",profile_picture:"https://pbs.twimg.com/profile_images/1502454836981166082/cQG0YQxc_400x400.jpg",ref_id:"ee5d0119-780d-4539-9b84-83025e95c03f",twitter_handle:"samcallah"},{name:"@sonofsats",profile_picture:"https://pbs.twimg.com/profile_images/1593080311000211456/Dr_NQ9Iw_400x400.jpg",ref_id:"07f15eea-1f9a-41bc-b974-ffd370885708",twitter_handle:"sonofsats"}],hosts:[{name:"@alexstanczyk",profile_picture:"https://pbs.twimg.com/profile_images/1539055022364708864/rwErK6x1_400x400.jpg",ref_id:"6455df34-1abc-4ce8-9bb8-b02d411accec",twitter_handle:"alexstanczyk"},{name:"@SwanBitcoin",profile_picture:"https://pbs.twimg.com/profile_images/1491428856858914820/aFlitvha_400x400.jpg",ref_id:"da3f56bf-9763-4389-a9ec-d807049bd0b8",twitter_handle:"SwanBitcoin"},{name:"@pacificbitcoin",profile_picture:"https://pbs.twimg.com/profile_images/1570140686753619970/UFEnzSv5_400x400.jpg",ref_id:"f8268a26-9761-40c1-bdd6-dad9db44d032",twitter_handle:"pacificbitcoin"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/239722cb-4216-414a-a17b-5adf9d52e15a.jpg",keyword:!0,link:"https://stakwork-uploads.s3.amazonaws.com/uploads/customers/2707/media_to_local/75d674de-3859-49f5-abcd-927017e3a24f/b763dc91-acba-4530-9c22-88fea8193185.mp3",node_type:"clip",pub_key:"029099ec31eb33594611dc47d5c93de2c1aa86918e3a36b408c14a500601c8bc9b",ref_id:"7b90a2ff-ac29-43a9-9911-0eec916e3088",show_title:"Swan.com",text:"happens to DCG? What happens now? Are these guys in trouble? What do you think? DCG and Genesis are definitely in a tough spot right now because basically they basically have huge holes in their balance sheets from having exposure to all these blow ups. Genesis had exposure to three AC. Like I just said, they also had maybe the worst trade in history when they traded $1 billion worth of Bitcoin for $1 billion worth of UST with the Luna Foundation, which basically went to zero. So they gave, like, the hardest money in the world for an Elgo stable coin. And so they got crushed on that. They got crushed on three AC, and then they had 175,000,000 trapped on FTX when that collapsed. And so Genesis has a huge hole in its balance sheet as well as DCG, because DCG actually bailed out Genesis after they blew up from three AC. And then DCG has been kind of they have a ton of debt on their balance sheet now after they did that. So essentially, they took on that Three Arrows Capital loan, that $1.1 billion hole on Genesis. They basically just assumed it on their balance sheet. And then they also took out a $575,000,000 loan with Genesis to basically try to buy more GBTC shares themselves to try to prop it up. And if you look at, like, their buys, you can just look at their SEC filings. And when they bought the GBTC shares, they're down about 77% on those GBTC purchases themselves. Basically, the problem is liquidity here, where Genesis needs liquidity to fund withdrawals and pay its creditors. But they don't. They have all these, like, long term investments on their balance sheet. They basically have a ten year loan to DCG. So that's not like a short term that's not liquid. And they also have a lot of GBTC shares which aren't really liquid for Genesis or DCG, because there's a rule where if you are the issuer of a security like Genesis or DCG, you can't sell more than 1% of the outstanding shares for every quarter. And so right now, DCG owns 66 million shares of GBTC. But according to that rule, they can only sell about 6 million or 7 million shares a quarter. And so that's why it's extremely ill liquid right now that they have all this GBTC on their balance sheets. And so basically, they're desperate for cash. And DCG owes Genesis $1.7 billion, and they're both trying to fill that hole. And so, yeah, the question becomes, what happens to DCG? What options do they have? What does it mean for GBTC holders and what does it mean for the price of bitcoin? And there's a lot of options they have. They can sell GBTC shares. But it's like I said, there's a rule about it. And I think they are doing that right now. I think that's why you're seeing the discount widen right now. You're seeing Genesis and DCG probably selling what they can, according to that rule, to try to raise cash. But again, that's not even close to the $1.7 billion hole that's in their balance sheet or just that they owe to Genesis in terms of DCG. And so that's not enough. So what else could they do? Well, DCG could raise funds. It was previously valued at $10 billion. It'd probably be a fraction of that today because that was at the top of the bull market. And so there's still value in DCG. They have a giant venture portfolio, and they can kind of leverage Grayscale itself. So Grayscale still brings in $300 million in fees a year. And so they can leverage that annual revenue to try to raise funds, to try to raise cash, essentially, so they can leverage those future cash flows. And then they have assets like CoinDesk and Foundry. They have those GBTC shares. That's about 10% of the total supply right now. They have those. They can leverage those to raise money. They also have bankruptcy claims at three AC and FTX and elementary Research. You don't know what's in that value there, but there's probably some residual value in those bankruptcy claims. And so they can leverage all those assets to raise capital. But again, that's probably not enough. And then the next thing they could do is they could sell the assets themselves. So there's a rumor that they could sell Coin for $300 million because they have consensus conference, and they actually make like 50 million in annual revenue at Coin. So they can sell that asset. They could sell Grayscale itself to another sponsor, and that would probably bring in like 400 to 500 million. But again, it's still probably not enough for them to fill the hole. And why would they sell Grayscale the trust? Because it would basically put them out of business because that's their big cash cow. And so they would basically sell the trust to raise all this money to try to stay alive. But then why even stay alive? Because you just sold your main cash cow. The next thing they could do is they could restructure the loans. And so they have a bunch of loans with Genesis and you could restructure the loan so that both parties could have more runway. And so it's the best interest, kind of, of both parties to negotiate a deal to allow both parties to avoid bankruptcy. And so you can do a lot of different things. It could raise a little bit of money for the reasons that I just said, and they could give some of that to Genesis to kind of help them pay off their withdrawals and stay alive a little bit. The Genesis creditors could roll their debt into DCG warrants so they can have a senior claim on the cash flow from GBTC. There's a lot of different ways they could kind of negotiate their debts to try to keep themselves alive. And I think that's probably what's happening right now. It's probably quiet. They're trying to figure out how they can kind of manage this and all of these things, like selling off the trust to a different sponsor, that wouldn't affect GBTC holders at all. I mean, that would just change the sponsor and none of that would affect GBTC shareholders. Now, what would affect GBTC shareholders if they seek something called Reg M exemption? And so if the SEC approved this, grayscale would have to apply for Reg M relief, which would allow GBTC shareholders to redeem their shares for the underlying assets at a one to one ratio. And so it basically eliminate the discount to NAV overnight. And so that 45% would disappear. GBTC shareholders would be able to wait. Let me see if I understand this right. You're saying that under Reg M, they would redeem in kind, meaning shareholders would get the bitcoin. Yeah, if the Sac allowed that, they would have to basically approve in kind redemption for shareholders to take custody of the underlying bitcoin. But this would pose a lot of challenges for GBTC shareholders because a lot of it is in those retirement accounts that aren't legally allowed to hold spot bitcoin. But they could redeem at one to one in cash, too. So it wouldn't be the worst thing for them either. They would just get cash, but it wouldn't be a 45% discount. Then it would be a wow, that. Actually seems like a pretty reasonable solution. Yeah, no, it is. It would be the best solution if you're a GBDC shareholder. Right? Yeah, I would definitely say that. I just don't think it's going to happen because Reg M exemption and an ETF approval are pretty much the same thing. I mean, you're basically giving Grayscale the ability to create and redeem shares simultaneously. And so it becomes political, where the SEC would be seen as supportive for the cryptocurrency industry in the wake of the FTX collapse. In other words, screw the TBDC shareholders. Like, screw all you guys. This is important to us politically, so you're just going to have to suck it up. That's messed up. Yeah, exactly. Yeah, that's exactly what's happening. And so they could do that. I just don't think it's going to happen. Now, here's where it gets interesting, is because there's no reason why Grayscale can't offer redemptions today. And if they actually cared about GBTC shareholders, they would allow that. When you say offer redemptions, what do you mean by that? Like, redemptions in kind or what are you talking about? I'm talking about redemptions in kind. So back in 2014, actually, the trust was doing this. So it was allowing the issuance of shares and the redemption of the underlying bitcoin. But then they got a cease and desist letter from the SEC, and this was kind of finished in 2014, where they had to stop doing that. Ever since then, they haven't allowed redemptions because they got a cease and desist. They're like, hey, you're not need cap. You're violating reg. M. You can't do that. And and Grayscale was like, okay, but the key point here is that it's only a violation of Reg M if Grayscale is issuing and redeeming shares at the exact same time. Now, when the premium was there, they were issuing shares like crazy because all these institutional investors were putting on this trade. And Grayscow, can you unpack that? I'm sorry to interrupt you there, but what does that mean at the exact same time? It doesn't make sense to me. What does that mean? So, like I said, an ETF can issue and redeem shares at the same time to keep the trust in NAV. That's what I mean. Right? So that's what I mean by at the same time. They can basically fluctuate and redeem and issue it at the same time. Right. And so after they were doing they got the cease and dislike from the SEC, they were essentially only issuing shares. They weren't redeeming the shares anymore. Hey, Sam. Sam, why does the SEC zero in on that particular issue? To determine that something is an ETF versus not. That's just a rule from the Exchange Act, where it's just only certain securities can do Reg M, essentially, where they issue a redeem. Usually it's like Treasuries and money market funds and things like that. It's just in the laws since the 40s or something. 30s or 40s. What we're trying to zero in on is why. I don't understand that part. We don't have to get yes, it. Doesn'T honestly, yeah, it doesn't seem important. Let's move on. They were issuing shares like crazy when they were putting on a premium trade. So they created 422,000,000 shares from January 2020 to March 2021. Now, once the premium trade disappeared, they haven't issued or created any new shares, so it's stuck at 692,000,000 shares. And so since they aren't issuing shares, they can allow redemptions right now legally. And this would close the NAV to discount almost overnight, because all of these GBTC shareholders, the accredited investors, would be able to basically have a reverse arbitrage where they could sell GBTC or redeem GBTC shares for spot bitcoin underlying in the trust and take that bitcoin and then sell it for dollars and collect the difference in the discount. And so you would see that discount get armed away extremely quickly if DCG or Grayscale just allowed redemptions. And they could do it legally. There's literally it's kind of an administrative thing, basically. If I understand right, they would have to make a filing with the SEC and say, we're no longer issuing shares, we're now redeeming shares. And at that point, they can just go ahead and do it. Yeah, exactly. Honestly, the negative to the sponsor would be that they can't collect the 2% on the value of the underlying asset. It starts to erode their assets under management, so to speak. That's exactly right. That's why they're not doing it, is because as people would redeem the bitcoin, it would be less bitcoin in the trust and that would lower their fee and that's their cash cow. And so the premium trade added bitcoin to the trust and it also added a ton of buy pressure to spot bitcoin, because people would put on this trade and the bitcoin would go in the trust and it would never get sold, it would just sit there. But if they allow it to happen. So they're trying to figure out right now, how do we stay alive without losing the assets under management, which is bitcoin? It's ideal for them to keep the bitcoin in the trust, basically, because, by the way, 2% is a gigantic amount on these assets. Oh, yeah. That's another reason why you can be critical of DCG, because the Toronto ETF is a 1% fee, and then there's another similar Osprey bitcoin trust, that's zero point 49% fee, and there's no reason to have a huge management fee for these trusts. I mean, it's a gigantic cash cow. It's unbelievable in the gold world. If you were to compare it to the largest ETF in the gold world, which is GLD, I think the sponsor collects 15 basis points or something like it's some really small amount. But the point is that if it's worth tens of billions of dollars and it starts to turn into some real. Money yeah, it costs, like, less than $1,000 to set up a trust. And basically all they have to do is collect the bitcoin, but then they just, like, give it to coinbase. So they don't really do anything. They literally just sit there and collect the 2%. Yeah. Depending upon how you manage it, the operational cost of administering one of these things could be like 100 grand plus a month. But, I mean, that's a drop in the well compared to the well collecting. It's unbelievable. Yeah, but you have to understand, like, redemptions. If they allowed redemptions, it would be good for GBTC shareholders, it would be bad for spot bitcoin holders, because, like, I said they would put on this trade where they would redeem GBTC shares for spot bitcoin and then sell the spot bitcoin to collect the difference. Where's the premium pressure in the market right away, basically. Yeah, exactly. They would meet in the middle, so the premium would meet in the middle and the spot would go down. Meet somewhere in the middle, right? Yeah. I mean, the discount would go to NAV, so GBCC holders would love it. But the reason that's happening is because the bitcoin is leaving the trust and theoretically, those institutional credit investors would sell that bitcoin to collect the discount that currently exists. So whereas the premium trade added a ton of buy pressure to spot bitcoin, if they added redemptions, it would actually add a lot of sell pressure to spot bitcoin. That's assuming that they want to hold dollars in the end, though, right? Yeah. That is assuming as the discount. There'S going to be an arbitrage. The bottom line is, if somebody can arbit and collect a spread, they're going to. Right? I mean, that's just going to happen. What is the fiduciary responsibility of the trust? I guess my question is, is there any conflicting fiduciary kinds of responsibilities at this point during whatever this process that you're talking about is going to happen? Yes. I mean, this is why there's been a recent lawsuit that just got filed by Firtree saying that Grayscale basically breached the trust agreement by not allowing shareholders to review relevant documents, as well as not allowing a redemption when there's no legal reason for them not to allow it. And so I'm not a lawyer, but they're getting sued for potential mismanagement or wrongdoing of the trust because they're basically hiding behind this idea that they're going to get approval for BTF, because that would allow the discount to disappear, but then it would also allow the bitcoin not to leave the trust. And so it's their best option. Right. It's the best option for GBC shareholders, but it's also the best option for Grayscale because they would get to keep their AUM, but they keep getting rejected. Right. And the SEC just had a response on December 9 that basically was very like they were just like, this isn't happening, is how I would summarize it. And so Firtree, in that lawsuit, they're saying they keep hiding behind this idea that they're going to get approved from an ETF and that's why they're not allowing redemptions right now, but it's not going well and GBTC shareholders getting hurt for it. Yeah, that seems like a pretty bullshit excuse because we're going to become an ETF, therefore we're not going to I mean, that's pretty bullshit, obviously, to me anyway. And the way they kind of change the trust charter over the years, that's another thing they have a problem with, because shareholders used to have kind of ways they could vote greater than 75% to avoid any kind of, like, liquidation. They. Had some rights before, but as of 2017, Grace Kell basically removed that in the trust. And now it's basically all in their court in terms of what they can do. And so there's a lot of issues around how they change the trust charter and basically give all the power to Grayscale and not to any power to the shareholders. And that's kind of all in this lawsuit that just came out, like, last week. But it's been an ongoing thing for years now. ",timestamp:"01:24:54-01:44:01",topics:["DCG","Genesis"],type:"twitter_space",weight:16.40026499856909},{boost:0,date:1677582e3,description:"The goal of Blockchain Boy",episode_title:"Ep. 514 The Future of Crypto in the Media with Blockchain Boy",guests:[{name:"Lucas Dimos",profile_picture:"https://pbs.twimg.com/profile_images/1092408696838197250/n0-St2nZ_400x400.jpg",ref_id:"9ac17e2f-49bd-4fc5-bfe5-2f380ca63574",twitter_handle:"lucasdimos"},{name:"Blockchain Boy",profile_picture:"https://pbs.twimg.com/profile_images/1602154101642592256/A0OX97CT_400x400.jpg",ref_id:"4b070a6f-bcc8-4708-abaf-cc830709600f",twitter_handle:"BlockchainBoyy"}],hosts:[{name:"Aaron Malone",profile_picture:"https://pbs.twimg.com/profile_images/1521495204196503553/abk-5S0m_400x400.jpg",ref_id:"bd103540-8c0a-4ab3-b5cd-24a3f2c43ab2",twitter_handle:"pizzamind"},{name:"Bryce Paul",profile_picture:"https://pbs.twimg.com/profile_images/1182725652794892288/QbDOKHcP_400x400.jpg",ref_id:"0d670dbf-f434-43b6-b454-8e5345d7ee51",twitter_handle:"BrycePaul101"},{name:"Pizza Mind",profile_picture:"https://pbs.twimg.com/profile_images/1521495204196503553/abk-5S0m_400x400.jpg",ref_id:"16cb01cf-9f04-45db-a440-47259b02b86a",twitter_handle:"pizzamind"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/93a6fe5b-364c-43f4-9f38-7da3e811460b.jpg",keyword:!0,link:"https://audio1.redcircle.com/episodes/68f31cee-f404-40fe-85d7-a406019e916f/stream.mp3",node_type:"clip",pub_key:"037f7331a5bef6c6f880246747befcc3767f3bb9730bc5e6f7c3770f4184ed0bff",ref_id:"2485d5dc-6159-4638-aef1-e645f226a8a1",show_title:"CRYPTO 101",text:"gamble to bet on them. Like anything is. Same thing with Raddix, like I mentioned before. Although anything but salon or cardano I'll just say. That interesting take. All right, yeah. Could you expand on that last point? Anything but solana and cardano. What's the reason? That's half a joke. I don't mind cardano, but I think Salona is pretty centralized. VC garbage. I've been calling it Mid forever, and I felt very vindicated when it finally shit the bed. Fair enough. Well, you are only a couple of years away from really being able to do whatever you want in life, and I mean whatever you want. Your businesses are going to be able to be ran on autopilot. You're going to have more money than you can count in a multitude of different currencies with the way things are. Headed to be able to rent a car in the States. Yeah, well, you can't do that yet. But the point I'm getting at is what are your real dreams and goals? Like, when you're fully empowered to do literally anything you want in this world, what do you want your impact and your legacy to be? That's a great question, and I'm still figuring out what I really want to do with the rest of my life. I just know that I really like building cool things with cool people, and I think I'm always going to do that, no matter whether it's big or small. I think it's just I have to do something. I'm like a shark. Sharks have to keep swimming or they sink. Right? And so it's very similar with me. Maybe I'll have some more time to go live in the country and be away from people for times. But no, I really like empowering people to be their best selves. That's really what makes me the happiest, is, like, I'm a very loving and caring person, and I love to see people do good things and succeed. So I would really love to get into sort of micro loans and sort of entrepreneurship guidance and maybe even ethical VCs, because I don't think a lot of VCs are very ethical. And so I'd love to do something along the lines of that to empower more entrepreneurs to have an effect in their community and environment outside of Web Three, too. I've been doing micro loans on the platform called Kiva for many years, and I think it's super cool and needs a Web Three version. Yeah, I've actually never heard of Kiva. Tell us a little bit more about what micro loans are. And has that been a way that you could generate passive income or anything? No, it's just mostly a tax write off for really rich people. It's not like super well known, but you get to actually empower entrepreneurs in other countries. Oh, there's Jonah. Jonah. I'm on a podcast. Oh, he's bringing stuff. Jonah. What's up, brother? Thanks, bro. No, he's one of my fantastic team members over here. Thanks, bro. I wish I got a coffee delivery in the middle of podcast. That was sick, wasn't it? Look at that. Yeah, look at that. Dude, he hooked me up. I bet there's even an espresso shot in there. That's crazy, man. Fantastic. So where was I? Oh, yeah. So you can empower entrepreneurs from other places around the world who need maybe an $800 loan to get more fertilizer for their crops, to double their yield, or who are opening a small store in their community. And it's a way because charities actually can be actually very damaging ",timestamp:"00:21:17-00:24:30",topics:["Blockchain Boy"],type:"podcast",weight:79.08077270705402},{boost:0,date:1642464e3,description:"Channels jamming and Lightning invoice on the Lightning network",episode_title:"Lightning for Plebs - TABConf 2021",guests:[{name:"ketominer",profile_picture:"https://pbs.twimg.com/profile_images/1245972079528329218/YDUD9N2Q_400x400.jpg",ref_id:"2f8b0b59-6f23-4c89-973c-668cc7666998",twitter_handle:"ketominer"},{name:"Ryan Gentry",profile_picture:"https://pbs.twimg.com/profile_images/1362751223217160203/ekMa_yY-_400x400.jpg",ref_id:"8fe78b55-bc38-40df-9cb5-ffd5c84166a2",twitter_handle:"RyanTheGentry"},{name:"Dread",profile_picture:"https://pbs.twimg.com/profile_images/1532557131819491328/vvs1cD-7_400x400.jpg",ref_id:"e61af76b-8fbd-4719-b753-0a70edd22fa8",twitter_handle:"PoleVaultDream"},{name:"Andre Neves",profile_picture:"https://pbs.twimg.com/profile_images/1604172627550969856/bYCGb7Ev_400x400.jpg",ref_id:"227e071d-f8a6-4137-8078-729fa9eb3a13",twitter_handle:"andreneves"},{name:"Nate G",profile_picture:"https://pbs.twimg.com/profile_images/1542983032507858944/9w_UUx5Z_400x400.jpg",ref_id:"bda29551-f17f-452c-9204-4d6cafdf4f3b",twitter_handle:"natecgriffin"}],hosts:[{name:"TABConf ",profile_picture:"https://pbs.twimg.com/profile_images/1596233571521499138/YE8Us_Ml_400x400.jpg",ref_id:"d2f50d77-ec8d-4554-bc40-387ababbb536",twitter_handle:"tabconf"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/e7d2a4ca-6b44-4a45-a94c-6f48987979f7.jpg",keyword:!0,link:"https://www.youtube.com/watch?v=mQOBuXsGZt0",node_type:"clip",pub_key:"02574d6e8e787372184b6f17c40d6c6fe1777db9015801f95dfd24692784d767cd",ref_id:"cd29b1a1-f94b-4eee-84ce-ddf8a4fcb0c5",show_title:"TABConf (The Atlanta Bitcoin Conference)",text:"let's theorize a little bit. You know, I know, like, one that always, you know, the the Dodge's always point out is the flood and loop attack, right? Which I think is like mostly mitigated by anchor channels. But what are some things that, you know, like, for instance, somebody a country that really doesn't like Bukle and El Salvador. Like, what are some things that you think they could do to try and mess with their infrastructure? What were some things you'd watch out for? Jam all the channels. All of them. Just jam them all. Okay. It's a real thing. Channels have limits in HLCs and in flights. And also there are a couple of ways where you can essentially deploy very small sorry, very small value payments in terms of let me rephrase large volume of payments with very small amounts. And then you can also lock up liquidity on routes by using small number of payments with large amounts. So for making a payment through Ryan and Ryan's node goes offline after the HLC sent, I now have liquidity stuck on one side and I can't do anything until it settles, right, until it cancels or airs out. So imagine someone spending an attacker, spending up hundreds of nodes, deploying some capital to the network, and then using some form of scripting to jam a lot of channels. All of a sudden in El Salvador, you can't make a payment through open node to buy your McDonald's, right. Because channels are jammed or liquidity is not unavailable. So channel jamming is one. I guess spamming and probing is a big one as well. On our nodes at least, we're seeing the numbers vary, but any given month is like 50%, 60% are probing, probing payments and probes are essentially I'm trying to get an estimate of whether this payment will clear and I'm trying to get an estimate of the fee that will cost me. So a lot of wallets do this probing mechanism to find out for users. And so, hey, your payment is 1000 SATS. It's going to cost you ten stats to make this payment and you send that fake payment across once the returns failed back, you now have a very discreet estimate. We're seeing lots of spam in the network, but again, it's in its infancy. What happens if someone is actively trying to spam it? Twenty four seven? I think we have yet to see what it's like. And there's also a vulnerability in the invoices, right? Like if you give an invoice out, like let's say you're asking for tips on Twitter, or you put an invoice out on a post, you're showing your information, right? Like they can see your note at that point. So I feel like, what is it, about twelve that might solve that, but things like that, maybe not. Things that provide more privacy for us. Would be good to be able to remain anonymous as possible while still conducting your transactions. Rendezvous routing. Let's go from your lips to God's ears, man. Yeah, right now a regular lightning invoice can be decoded and you can see. Imagine that I give you an invoice, you pay it and you could decode the invoice and says, that is actually going to me. Right? But if I can give you an invoice where you don't see where the final destination is, that protects your nodes privacy, but you still get paid for it. So that's something that hopefully in the future we can get going. Is rendezvous the same as trampoline? No. Yeah, you give me that. Fight for it. You're going to get in trouble asking that. I think conceptually, high level, they're the same. But this is the type of thing where it's like the differences are so small, but so important that Tbast and Connor would like get into a fistfight or something. Hilarious. Yeah, I think all of those attacks are. The thing that I love about the Bitcoin community is that we're very honest about this type of stuff and we're continually critically thinking about what are the ways in which this could fail, what are the ways and thinking about what are the ways that we can protect ourselves against these adversarial environments. Because absolutely, I know it's like the protocol developers a lot of the time are kind of like, this is ridiculous that you guys are having fun and making friendship channels and stuff. Like, you know, this is going to be an adversarial environment. And I think we are aware, but it just hasn't been the case just yet. And so I think kind of to close here again, this has all been about lighting for Plebs. I'm curious. The Plebnet now, I think is it like 1000 registered nodes. 5000 registered nodes. Holy shit. Thousand nodes. Okay, 1000 registered nodes, 5000 users, which is incredible. ",timestamp:"00:24:02-00:28:52",topics:["Lightning Liquidity","Lightning invoice","Lightning channels jamming"],type:"youtube",weight:8.078713541988659},{boost:0,date:1637366400,description:"Education efforts and safety regulations in the nuclear energy sector",episode_title:"Securing Bitcoin With Nuclear Energy",guests:[{name:"Nuclear Bitcoiner",profile_picture:"https://pbs.twimg.com/profile_images/1443185278525579278/_Yl1nao1_400x400.jpg",ref_id:"60f5891f-0864-4ed4-987a-81da4768b3ba",twitter_handle:"nuclearbitcoinr"},{name:"Eric McErlain",profile_picture:"https://pbs.twimg.com/profile_images/1252969137/Screen_shot_2011-02-23_at_10.59.21_PM_400x400.png",ref_id:"4815365d-44d0-4b06-9d9e-32070158d03c",twitter_handle:"atomiceric"},{name:"Puru Goyal",profile_picture:"https://pbs.twimg.com/profile_images/1590742805613203456/QAtYq_C__400x400.jpg",ref_id:"c24af059-b38b-4ce5-9547-9192c9eff579",twitter_handle:"purugyl"}],hosts:[{name:"Zack Voell",profile_picture:"https://pbs.twimg.com/profile_images/1595803006737448961/fFrf7VJb_400x400.jpg",ref_id:"e32c7661-c635-4089-a620-ffce509eff0e",twitter_handle:"zackvoell"},{name:"Compass Mining",profile_picture:"https://pbs.twimg.com/profile_images/1425165074373791744/f2CgInvP_400x400.jpg",ref_id:"812e5d37-47fb-4077-915f-df52e2ef84d8",twitter_handle:"compass_mining"},{name:"Will Foxley",profile_picture:"https://pbs.twimg.com/profile_images/1580970227193376776/9oQfeExj_400x400.jpg",ref_id:"704b9e82-3e40-40b6-874c-6bb8fadafbef",twitter_handle:"wsfoxley"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/ae91fac6-a1af-4877-9a92-e793d556ee66.jpg",keyword:!0,link:"https://www.youtube.com/watch?v=YBaA17NODlA",node_type:"clip",pub_key:"03c18d0c6c35333f22bc524e21a5fd1d2d9886f5d4d958dc1de95d025de5c84cfc",ref_id:"475acbce-5a5c-4881-a93d-7d41edf1ae84",show_title:"Compass Mining",text:"Eric, I wanted to pick up on that note a hint to you next exactly for the reason that I know you work in a lot of the education efforts and dialogue and conversation. And as I'm sure we're all familiar, facts and data don't always win the day, and bitcoin people know that as well as any other industry. I'm just curious if you have any extra color to add on how those conversations are going in terms of education and presenting the tech as it stands, reliability, safety and just general promise. How are those conversations going? Well, I think you're exactly right. A lot of times in our industry, we argue with facts and data in the face of emotion, and it doesn't always work. I think what's important, and I take this line from one of my colleagues in the industry it's no more and fearless. And the more that we talk about what our real record is. And I think we've got a record to be proud of, especially here in the United States, since Three Mile Island, where we've not only done tremendous work in upgrading safety standards and operational standards here in the United States, but we've also done a lot of really important work in terms of regulating ourselves. Coming out of Three Mile Island. We established the Nuclear Regulatory Commission. We used to have the Atomic Energy Commission, which had the dual mission of promoting the industry and guaranteeing its safety. And it was decided by President Carter and Congress that those two missions were incompatible. We needed to break this apart. So we created the Nuclear Regulatory Commission, the Department of Energy to it on the promotional aspect of that. So that was one thing was great. We have a very, very tough regulator. There are two resident inspectors at every plant in the United States. And those guys and women and women have the ability to shut those plants down if they're operating unsafely. It's never happened, but they do have the authority to do so, and people need to know that. It's something that's very important to know. The other thing that's important to know is that also growing out at Three Mile Island, we established something called the Institution of Nuclear Power Operations, which was an internal industry peerreview group where we would all evaluate each other's operational safety together and decide and rank our plants according to how well they matched up against our standards. Column one through column four. And the fact is that within our business, you're known, I mean, number one is the best and number four is the lowest. And if you're a plant manager. You're running a plant. You following the info column force into your career. We do not tolerate that kind of operational pace in our industry and we got to get people up at the very top because the fact of it is that we're held to a different standard than other industries and we're not afraid of that. We've been held to different standards now for a very long time. We're not afraid of that. And we need to tell that story. We need to be very out front about that. A lot of really talented social scientists who look at our industry did some research a couple of years ago and they found that a lot of the public still has what they call existential threat about nuclear power. It's born out of the fact that we're born out of a weapons program. Even the first commercial reactor in the United States was built by the United States Navy under the supervision of Hymen Rica Over. You pile that on top of you can't see radiation. You can't smell it, you can't taste it. It feels like a risk that you can't mitigate when in fact, we know what we can do and we can what we need to do is we need to meet people where they live and we need to address their fears and let them ask any question that they like. We want to let them know that we have safety systems on top of safety systems that guarantee the operations of our plants. We've got to talk about things like the people who seem to support us most in the world or the communities that are closest to our plants. They know the people who work in them. They know how much their communities mean to them and when they go to work every day. They know that they're guaranteeing not only the safety operations of the plant, they're also guaranteeing the continued operation of economic engine for the community that they live in. These plants throw off tens of millions of dollars in property taxes. They provide direct support for education and first responders, public safety, public libraries. I mean, they're really, really very important to the communities that they're based in. So I believe as long as we're upfront about who we are, what we're doing, meeting people where they are and addressing their fears directly, I think we're in a much better place than we were, let's say, 30, 40 years ago. And I was very small and still remember my father telling me about his tour of TMI back in the ",timestamp:"00:24:37-00:29:38",topics:["Nuclear Energy Education","Nuclear Energy Regulations"],type:"youtube",weight:8.023174886839682},{boost:0,date:1596686400,description:"Environmental Issues in Planet",episode_title:"Chat 45 - Bitcoin an Energy Revolution A panel at the VOB Conf",guests:[{name:"Tone Vays",profile_picture:"https://pbs.twimg.com/profile_images/1416821178266787844/T1OkI9ZW_400x400.jpg",ref_id:"da6fc991-7080-461c-86e3-4ac18c2f413d",twitter_handle:"tonevays"},{name:"Phillip Sandner",profile_picture:"https://pbs.twimg.com/profile_images/1043824764161335296/2SW3duCV_400x400.jpg",ref_id:"e1996e82-0354-421c-85d5-f18eebec9506",twitter_handle:"philippsandner"},{name:"Jesse Peltan",profile_picture:"https://pbs.twimg.com/profile_images/1123954968636088326/EAjHUGDE_400x400.png",ref_id:"96309505-caeb-47bb-a1ba-712b97292675",twitter_handle:"JessePeltan"},{name:"Christopher Bendikson",profile_picture:"",ref_id:"d72ead54-7bff-4874-870f-123e665fddfd",twitter_handle:""},{name:"Christian Stoll",profile_picture:"https://pbs.twimg.com/profile_images/3296579573/69ebedb479a9bdb9d536fe887e2d3113_400x400.jpeg",ref_id:"ff74d59c-f846-4b16-a5e5-771fb8139f18",twitter_handle:"Granddragon14"}],hosts:[],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/9e7e229f-2631-4542-b5d7-7fcd502798dc.jpg",keyword:!0,link:"https://traffic.megaphone.fm/CSN6935967461.mp3?updated=1627959014",node_type:"clip",pub_key:"",ref_id:"4fdf8ab1-a3e8-4390-b618-a8a915fa3f68",show_title:"Bitcoin Audible",text:"issues that we have on the planet. Today are how is steel produced, how are metals produced, how is concrete produced, how is electricity produced and how it's farming done. Everything else makes almost no difference. Those are the big issues. If our ground is in any way. It doesn't matter how much energy we use. If our mining and our metal production is done in a clean way, it doesn't matter how many metals we use. The earth is completely full. The cost of the earth is just materials. So if we're looking at the long term sustainability, it's a question of how these couple of processes are done. And so the question of bitcoin's impact on that gets such a small percentage of consumption. The question is more of which way does it incentivize production? Because if you see even a small swing in the way that if bitcoin for example, is able to balance grids and enable them to use higher percentage renewables, then you'll see a higher renewable penetration and you'll see overall lower utilization of fossil fuels than you would in a situation without bitcoin. ",timestamp:"00:29:09-00:30:22",topics:[],type:"podcast",weight:7.965680956840515},{boost:0,date:1672207217,description:"Satoshi Nakamoto on Double Spin, Proof of Work and transaction fees",episode_title:'The Orange 🌞 Reading/Discussion "The Book of Satoshi" & Bitcoin News',guests:[{name:"CouncilmannJamm",profile_picture:"https://pbs.twimg.com/profile_images/1251040014152024066/dD3b2eA4_400x400.jpg",ref_id:"6c989c2c-d24d-49a2-8eb1-1d2f1c47f347",twitter_handle:"jamm_councilman"},{name:"thotsnplayerz",profile_picture:"https://pbs.twimg.com/profile_images/1608733749663109120/wwYEZgF2_400x400.jpg",ref_id:"66bbe365-9e85-4c34-9d51-39d8b49937b7",twitter_handle:"thotsnplayerz"},{name:"Will Schoellkopf",profile_picture:"https://pbs.twimg.com/profile_images/1487515153302130691/t5sDMzZW_400x400.jpg",ref_id:"461e2245-1672-4fa1-94f5-7aaf1afa531f",twitter_handle:"realBitcoinDog"},{name:"OKIN_17",profile_picture:"https://pbs.twimg.com/profile_images/1518945775685967873/O0wPrIKO_400x400.jpg",ref_id:"dbcdeab8-4824-43f7-aeb8-2b9eda6cbbad",twitter_handle:"OKIN_17"}],hosts:[{name:"SatoshisJournal",profile_picture:"https://pbs.twimg.com/profile_images/1518661993103859712/y_QefqVZ_400x400.jpg",ref_id:"63fac069-bfe9-49ae-b52c-1d1f226b3275",twitter_handle:"SatoshisJournal"},{name:"Jeremy Garcia",profile_picture:"https://pbs.twimg.com/profile_images/1589056396816896001/dslbBQSX_400x400.jpg",ref_id:"e5e68f75-d71a-4477-ae9a-6a891f2d84d0",twitter_handle:"Jerimican5445"},{name:"ToxiKat27",profile_picture:"https://pbs.twimg.com/profile_images/1505791887415730177/d0YDQ3Xc_400x400.jpg",ref_id:"50023cce-8a6f-4974-ad3b-fd7a9c0abf19",twitter_handle:"ToxiKat27"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/9b2e17f2-71c5-4f1e-a3e7-720d06dab810.jpg",keyword:!0,link:"https://stakwork-uploads.s3.amazonaws.com/uploads/customers/2707/media_to_local/ecefba20-39fd-4974-8388-066857965b2a/cf486c39-08f9-4ada-9b72-7a297ad74d74.mp3",node_type:"clip",pub_key:"",ref_id:"bd8acc65-31a6-4d6c-93e2-cb91d3909825",show_title:"Satoshi’s Journal",text:"15. It's entitled more on double spend proof of work and transaction fees. In this exchange, Satoshi provides several clarifications and discusses compensation of miners, ie. Nodes via transaction fees once the entire supply of Bitcoin has been created. So once again, he's asked about that. On Monday, November 7 17th, 2008, at 904, Satoshi Nakamoto wrote I'll try and hurry up and release the source code as soon as possible to serve as a reference to help clear up all these implementation questions. Ray Dillinger, who goes by I Guess Bear, wrote when a coin is spent, the buyer and seller digitally signed a blinded transaction record. Satoshi Nakamoto replies only the buyer signs and there's no blinding. If someone doublespends, then the transaction record can be unblinded, revealing the identity of the cheater. Identities are not used and there is no reliance on recourse. It's all prevention. This is done via a fairly standard cut and choose algorithm where the buyer responds to several challenges with secret shares. Okay, so I'm trying to remember who this person was. I think this is Ray Dillinger that said that. So Ray says this is done via a fairly standard cut and choose algorithm where the buyer responds to several challenges with secret shares. Satoshi says no challenges or secret shares. A basic transaction is just what you see in the figure in section two. A signature of the buyer, satisfying the public key of the previous transaction and a new public key of the seller that must be satisfied to spend the next time. Then Ray Dillinger says they may also. Receive chains as long as the one they're trying to extend while they work, in which the last few links are links that are not common with the chain on which they are working. These they ignore. Satoshi says. Right. If it's equal in length, ties are broken by keeping the earliest one received, and then Ray says, if it contains a double spend, then they create a transaction which is proof of double spending, add it to their Pool A, broadcast it, and continue work. Satoshi responds, there's no need for reporting of proof of double spending like that. If the same chain contains both spends, then the block is invalid and rejected. Same. If a block didn't have enough proof of work, that block is invalid and rejected. There's no need to circulate a report about it. Every node could see that and reject it before laying it. If there are two competing chains, each containing a different version of the same transaction, with one trying to give money to the one person and the other trying to give the same money to someone else, resolving which of the spends is valid is what the whole proof of work chain is about. We're not, quote unquote, on the lookout for double spends to sound the alarm and cast a cheater. We merely adjudicate which one of the spends is valid. Receivers of transactions must wait a few blocks to make sure that resolution has had time to complete. Wouldbe cheaters can try and simultaneously double spend all they want, and all they accomplish is that within a few blocks, one of the spends becomes valid and the other becomes invalid. Any later double spends are immediately rejected once there's already a spend in the main chain. Even if an earlier spend wasn't in the chain yet, if it was already in all the other nodes pools, then the second spend would be turned away by all those nodes that already have the first spend. Then Ray says. If the new chain. Is accepted, then they give up on adding their current link, dump all the transactions from pool l back into pool A along with transactions they've received or created since starting work. Eliminate from pool A those transaction records which are already part of the link in the new chain, and start working again trying to extend the new chain. Satoshi says. Right, they also refresh whenever a new transaction comes in, so Al pretty much contains everything in A all the time. Ray comments CPU intensive digital signature algorithm to sign the chain, including the new block Al. Satoshi responds It's a hash cache style shaw 256 proof of work partial preimage of zero, not a signature. Ray says, Is there a mechanism to make sure that the chain does not consist solely of links added by just three or four fastest nodes? Cause a broadcast transaction record could easily miss those three or four nodes. And if it does, and those nodes continue to dominate the chain, the transaction might never get added. And Satoshi responds, if you're thinking of it as a CPU intensive digital signing, then you may be thinking of a race to finish a long operation first and the fastest always winning. The proof of work is a hash cast style two shot, 256 collision finding. It's a memoryless process where you do millions of hashes a second with a small chance of finding one each time. The three or four fastest nodes dominance would only be proportional to their share of the total CPU power. Anyone's chance of finding a solution at any time is proportional to their CPU power. There will be transaction fees, so nodes will be an incentive to receive and include all the transactions they can. Nodes will eventually be compensated by transaction fees alone when the total coins created hits the predetermined ceiling. So they continue. Ray Dillinger then says, also the work requirement for adding a link to the chain should vary with the numbers of links adding to that chain in the previous week, causing the rate of the coin generation to be strictly controlled. Satoshi says right. Ray says you need coin aggregation for this to scale. There needs to be a provable transaction where someone retires ten single coins and creates a new coin with denomination ten, et cetera. Satoshi says every transaction is one of these section nine combining and splitting value. So I guess he just referred to him a section. So yeah, in that. Exchange they use the word note a lot, but in the context of that it's synonymous with miners, just to make that clear. So a miner of course, is a computer that is specifically used to mine Bitcoin. That's all it can do. And it validates transactions and the node is what? Verifies transactions. So, like on the Bitcoin blockchain, for you to be truly certain that your transaction has gone through a minimum of six, validations is required, meaning that six other nodes have looked at your transaction and deemed it verifiable. And once it's verifiable, you can essentially be confident that you have achieved, not consensus you've achieved, yeah, consensus, your transaction is good to go. And so Portland asked me a trick question the other day. He said, if there are five blocks that have been mined, how many times has your transaction been verified? And it just stumped me, I don't know why, because the thing that came to my head was that minimum six validations, I just was stumped. And he asked me like three times, and I said, I don't know the answer. And he says five. And anyway, so the answer was right in front of me. So every block is basically mined approximately every ten minutes, and in five blocks you can basically equivocate that to five validations of your transaction. The more validations of your transaction, the more set in stone, so to speak. That transaction is. So it's just like if you solve a problem, if I give you a sheet of paper and it says has an equation ten times ten and I give it to you and you have to write the answer on the paper while you put 100. And then I tell you to give that to six other people to make sure that your calculations are right. Those six people check, and they do indeed concur that ten times ten is 100. And since I made the rule, when I get those six confirmations from those six people that you did your math correctly, then that gives me confidence that the calculation is done is correct. And so that's what basically the nodes are doing. When you broadcast a transaction, the nodes are all looking at it, and it takes a minimum of six to basically solidify that into the bitcoin blockchain forever. That'll give you full insurance, full confidence that your transaction is good to go. And all that happens in basically six blocks, which is 60 minutes. And the beautiful thing about that is the fact that that's all being done with computers and no intermediary. Whereas if you were to go and swipe your card at McDonald's to make a transaction, you're doing that first through essential authority, and the verifiability of that transaction doesn't happen. And the finalization of it doesn't happen until basically 30 days when you get your bank statement, and it shows that you have a charge for $10 at McDonald's. So, relatively speaking, bitcoin is way faster than legacy systems. Although you can swipe your credit card fast and think that you have paid for what you think you paid for, there could be an error in the system, and maybe you could get charged falsely for something, or someone could go and double pay for something, or someone could steal your credit card and pay for other things. So that's the problem with legacy system, is there's just so many damn intermediaries, whereas bitcoin, you just freaking do your lightning transaction or your bitcoin on chain transaction, and there's no one in the middle. So it's pretty profound. ",timestamp:"01:07:07-01:19:03",topics:["Satoshi Nakamoto","Double Spin","Proof of Work","transaction fees"],type:"twitter_space",weight:23.245500377568373},{boost:0,date:1672167683,description:"Bitcoin as a superior savings system",episode_title:"TOXIC HAPPY HOUR! #Bitcoin, Beer and Plebs! 🍻😂🤌🏻",guests:[{name:"Dr. Jeff Ross",profile_picture:"https://pbs.twimg.com/profile_images/1475554600094552064/DSlPG1lx_400x400.jpg",ref_id:"51a969bb-dbf7-4d20-b128-74dcc5f560f6",twitter_handle:"VailshireCap"},{name:"Tomer Strolight",profile_picture:"https://pbs.twimg.com/profile_images/1591960241008148481/HtyINxtU_400x400.jpg",ref_id:"3a2bc97d-072c-4ed9-9a59-17ceeb68fe99",twitter_handle:"TomerStrolight"},{name:"Laura Shin",profile_picture:"https://pbs.twimg.com/profile_images/1539462748173746176/hxR80FYT_400x400.png",ref_id:"a56a7b4d-edca-41d5-9d51-33396aa05b96",twitter_handle:"laurashin"}],hosts:[{name:"PUBLORD",profile_picture:"https://pbs.twimg.com/profile_images/1480160632360124416/AM_vVRko_400x400.jpg",ref_id:"8126d933-0986-4fd2-a6be-c02581294463",twitter_handle:"publordhodl"},{name:"Anders Jensen",profile_picture:"https://pbs.twimg.com/profile_images/1382039124991954947/Wb9kT7MO_400x400.jpg",ref_id:"af45195e-77a6-463f-ba64-29c6b0437d9c",twitter_handle:"andersjensenorg"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/2a1450bc-0649-4dc5-8ec9-1474af1ea1c3.jpg",keyword:!0,link:"https://stakwork-uploads.s3.amazonaws.com/uploads/customers/2707/media_to_local/f7b6cfcb-7cd4-4401-a3fb-7735bb570c07/2ae49fca-a048-4a34-93b9-247513af5699.mp3",node_type:"clip",pub_key:"",ref_id:"433eb4ba-ba64-468f-9e3c-130fbc948adf",show_title:"Anders_🍆",text:"what. Do you do in your IRA? What can you put your money in that's going to be better? Well, the one I have doesn't have it's limited to some of the access. In fact, once I found bitcoin, those contributions stopped, to be honest with you. And, yeah, whatever they're in, they're in, but they're limited in where they can go, you see? So I'm letting that one ride out. Just another hedge, but everything else now, man, is straight. Bitcoin, brother. What's going on, Clark? Just chilling, man. Putting up some overhead storage in the garage. Take a couple of weeks off at the end of every year to recoup. Kind of feel blessed that I was able to work 50 weeks out of the year. So take these last two off. Yeah, on stage, Craig. Well, Jeff Ben, I don't know who else is going to Miami. ANZ and I, we're starting to spread our wings a little bit this year. We made it up to Charlotte for Halloween. Anderson pacific bitcoin. Now we're rolling into Bitcoin Day in Naples. It's been really cool to see all these other conferences and meetups start and look, I don't even care how small they are to get their foot in the door, but hey, we may have a dinner date with Fosse and Lawrence LaPard. They're going to be down there, man. So we'll hook up with them. And I think we're trying to get James Lavish to go. So when you get some of those quality folks showing up at a smaller type venue, it's really cool, man. You get to just hang out. You meet them offline, just the nicest people in the world. So if you're in the central, southeastern, southwestern Florida area and can make it over to Naples, yeah, we'll be there. Hey, shoot, I'm coming all the way from that west coast. If you're anywhere in the United States or anywhere in this universe, you should be at bitcoin day. It'll be fun. So the problem is, puppy. I think the reason why I haven't been given a feeling of 100% confirmation of our little gig there is probably because, as you said, they're trying to get James Lavish. If he's coming, I don't think there's any room left for us, bro. He'll be on stage with us if we do it. That's right. That's what we'll do. Just like Dr. Jeff came on. Toxic happier in Swan Dome, pacific bitcoin. But he was big timing us after 15 minutes. He just left. He just walked out. And you know why? Because he is part of a documentary. When is that coming out, Dr. Jeff? Well, first of all, I left because you always got to leave early to keep the people wanting for more, right? You can't overstay your welcome. So that's number one. That's the number one. Rule two, that documentary, I don't know when it's coming out. They're doing a good job with it, though. It's pretty sweet, but we'll see. So I think they interviewed a bunch of people at the conference, and I think they're going to try to get it out as a Netflix kind of movie. And I can't remember what they're calling it. It's like, God bless bitcoin or something like that. And just basically what bitcoin is. And I like to talk about sort of the social justice side of bitcoin and how it's meant for the plebs, not for the institutional elites and things like that. I don't know when it's coming out, but I'm guessing sometime maybe this year. I love it. Just like casually. So this documentary about me is going on the biggest network in the world ever called Netflix. No, we're just happy for you, Jeff. I'm looking forward to see it. I know if you're in it, it's going to be high quality work. So a quick shout out on that note to JD down there is Bitcoin Bacon. He does documentaries as well, and he's going to do one on toxicity. I'm honored and looking forward to play a small role in that. And yeah, that's it, I guess. But when it comes to bitcoin, really, the way I look at it is it's my love. If there's anything, bitcoin is love. And ",timestamp:"01:12:02-01:16:37",topics:["Bitcoin Hodling","Pacific Bitcoin Conference"],type:"twitter_space",weight:22.774441499003483},{boost:0,date:null,description:"Bitcoin Timechain: How Difficulty adjustment factors into the Timechain",episode_title:"Café ₿: Bitcoin News, Bitcoin Timechain ⛓Day w/ Ant & TC",guests:[{name:"@2140data",profile_picture:"https://pbs.twimg.com/profile_images/1598330787778232320/ZVFcRtet_400x400.jpg",ref_id:"190b5001-a42a-46cc-b0d3-b6f74c625648",twitter_handle:"2140data"},{name:"@Meditation_Man",profile_picture:"https://pbs.twimg.com/profile_images/1597303881339314176/kFqDWvq0_400x400.jpg",ref_id:"cf7119ec-50a5-4ba2-a9a6-4a24835f3364",twitter_handle:"Meditation_Man"},{name:"@TimechainStats",profile_picture:"https://pbs.twimg.com/profile_images/1316207411741569028/LpDkqBMv_400x400.png",ref_id:"48e0e34d-8e04-47c0-972c-96cda708a719",twitter_handle:"TimechainStats"},{name:"@TimechainCaL",profile_picture:"https://pbs.twimg.com/profile_images/1589772501638184961/0qP3C4Wk_400x400.jpg",ref_id:"72d94cc5-b62e-4fe2-8275-837eab35a74a",twitter_handle:"TimechainCaL"}],hosts:[{name:"@SwanBitcoin",profile_picture:"https://pbs.twimg.com/profile_images/1491428856858914820/aFlitvha_400x400.jpg",ref_id:"da3f56bf-9763-4389-a9ec-d807049bd0b8",twitter_handle:"SwanBitcoin"},{name:"@alexstanczyk",profile_picture:"https://pbs.twimg.com/profile_images/1539055022364708864/rwErK6x1_400x400.jpg",ref_id:"6455df34-1abc-4ce8-9bb8-b02d411accec",twitter_handle:"alexstanczyk"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/239722cb-4216-414a-a17b-5adf9d52e15a.jpg",keyword:!0,link:"https://stakwork-uploads.s3.amazonaws.com/uploads/customers/2707/media_to_local/678e39f2-a92a-4745-b875-02645e38e747/9499bd7b-c204-4ad2-aa5b-d046f95f5a09.mp3",node_type:"clip",pub_key:"029099ec31eb33594611dc47d5c93de2c1aa86918e3a36b408c14a500601c8bc9b",ref_id:"49fe88a8-79ec-423c-a550-a32eb875f090",show_title:"Swan.com",text:"And so I think the difficulty adjustment is a huge part of this, right? And so I don't know if either one of you guys can extrapolate on how the difficulty adjustment plays into this. Anybody could jump on that. I can comment. We could go for it. Yeah. So basically, depending on how quickly the blocks are coming in or how slowly the issuance of bitcoin is set in stone, or the targeted issuance is set in stone, so we know how many bitcoin should be mined in a given span of time. And so if blocks are coming in too quickly, in other words, if the timestamps are coming in closer than ten minutes, on average than every 2016 blocks, which is roughly two weeks, if they're coming in the way they should be. But if they're coming in quicker than the difficulty goes up, and it gets harder to mine. And the reason why they were coming in quicker in the first place is very likely because there were more miners on the network mining than there were the previous two weeks. And so they were hitting those blocks a little bit faster than they were before. So when the difficulty goes up, then all those new miners that just joined have to compete in a little bit harder fashion to bring in new blocks and you get the issuance back on track. And that's part of I think this is also like a very key point of what makes bitcoin hard money as well, right? Like the fact that we can predict how much bitcoin is going to be mined far, far into the future. We know with a pretty high degree of certainty that on average, for the next year and a half, 900 bitcoin are going to be mined a day, right? It might be like a few bitcoin more, a few bitcoin less, but in terms of any monetary system that we've ever had as humans, I mean, we've never had even anything close to this degree of certainty, right? I mean, it is fucking insane how crazy that is. Right. We have a totally automated system that handles the issuance of Bitcoin and there's really nothing else like it. It's one of the most exquisite engineering solutions ever in my mind. And the fact that it's such small lines of code, it's a beautiful system and once you fully understand or start to understand the way that it works, you'll lose a lot. It smashes a lot of the fudge out of your mind, like minor death spiral, stuff like that. Whenever you start hearing these headlines about price being a certain point and like, miners are going to go off the network and oh my gosh, Bitcoin is going to fail and die, they're not thinking about the difficulty adjustment when they write those types of headlines. Well, maybe they are, but they don't. Yeah. And the other thing that is important to remember is despite few lines of code, there's the whole fact that the code meets the real world through difficulty adjusted proof of work. So it's not just the fact that those in the mining portion of the architecture are having to expend real world energy at a real cost, and that this difficulty adjustment kicks in every two weeks to ensure a balancing effect. No matter how many or how few participants are mining in order to target ten minute average block times. This is where the rubber meets the road. It's code, it's real world participants, it's the boundaries and limitations of the expenditure of real cost and real energy. All these things coming together. And this is why this thing, I think, is so challenging for people who are on the outside just peering at the price and trying to understand what the hell is going on, let alone the whole fog and cloud of crypto and shit coins that just distracts and confuses. This thing is truly, truly special. ",timestamp:"01:14:46-01:19:27",topics:["Bitcoin Timechain","Difficulty adjustment"],type:"twitter_space",weight:7.870050430297852},{boost:0,date:1596671100,description:"Unfair ways Bitcoin mining is assessed;Electricity consumption",episode_title:"Chat_45 - Bitcoin & an Energy Revolution, A panel at the VOB Conf",guests:[{name:"Christian Stoll",profile_picture:"https://pbs.twimg.com/profile_images/3296579573/69ebedb479a9bdb9d536fe887e2d3113_400x400.jpeg",ref_id:"ff74d59c-f846-4b16-a5e5-771fb8139f18",twitter_handle:"Granddragon14"},{name:"Jesse Peltan",profile_picture:"https://pbs.twimg.com/profile_images/1123954968636088326/EAjHUGDE_400x400.png",ref_id:"96309505-caeb-47bb-a1ba-712b97292675",twitter_handle:"JessePeltan"},{name:"Phillip Sandner",profile_picture:"https://pbs.twimg.com/profile_images/1043824764161335296/2SW3duCV_400x400.jpg",ref_id:"e1996e82-0354-421c-85d5-f18eebec9506",twitter_handle:"philippsandner"},{name:"Tone Vays",profile_picture:"https://pbs.twimg.com/profile_images/1416821178266787844/T1OkI9ZW_400x400.jpg",ref_id:"da6fc991-7080-461c-86e3-4ac18c2f413d",twitter_handle:"tonevays"},{name:"Christopher Bendiksen",profile_picture:"https://pbs.twimg.com/profile_images/1362772558882484233/3nS-l35s_400x400.jpg",ref_id:"d99d354e-41d4-4117-9b70-05955a85f9da",twitter_handle:"C_Bendiksen"}],hosts:[{name:"Guy Swann",profile_picture:"https://pbs.twimg.com/profile_images/1401969630634196995/DqOuszMi_400x400.jpg",ref_id:"39c31930-d799-40a0-9a46-193117d03418",twitter_handle:"TheGuySwann"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/9e7e229f-2631-4542-b5d7-7fcd502798dc.jpg",keyword:!0,link:"https://traffic.megaphone.fm/CSN6935967461.mp3?updated=1627959014",node_type:"clip",pub_key:"",ref_id:"2b8ef20b-4134-4d6a-bb2f-ee72a42468d2",show_title:"Bitcoin Audible",text:"And I have to interject there too, that there is something important to keep in mind. When you look at different people comparing energy consumption, they very often talk about electricity consumption on a national scale. But that's not energy consumption. The electricity consumption of the country is only a small part of their primary energy consumption. So electricity is only, I think, a small double digit percentage of the total energy that we go through as a species. Sorry, go ahead. But I was going to say, in addition to that, not only is electricity a smaller percentage, electricity is a sizable percentage of total consumption, but for a given country, a huge percentage of most countries, energy use is outsourced. So if you're not a country like the US or China that's manufacturing for the world and you're a country that's importing, you are artificially reporting lower energy consumption numbers because all the products that made that everybody uses those emissions are reported under China or they're reported under the US. But in reality that's still energy consumption. So it's not really a fair comparison to say like bitcoin uses x amount of energy, like electricity versus x whatever small country, when you're only looking at the direct energy consumption in that country and not looking at the fact that they're getting all the resources from other countries that are consuming it elsewhere. Not only that, but you can flip that entire narrative on its head and say like when bitcoin uses more electricity than Chile, that means that even if Chile flipped their entire electricity infrastructure to try to mess with the bitcoin blockchain, they couldn't. Yeah, I mean, energy consumption is a good thing. It's just a matter of how it's consumed and how we produce that. Let me add one more thing. Everybody knows the market cap of gold, right? That's around 9 trillion. And that's 50 times more than bitcoin. And we know it from bitcoin. That by theory, if the bitcoin price is 9000 ethnic and by theory the production foster formed by bitcoin should also be 9000. It's not the case, I know, but by theory it should be the case. So now take gold. Honestly, nobody discusses gold. If gold, if the market is having a market cap of 9 billion and times 50 times more than bitcoin, then in case gold is produced, then what is in theory the production price of gold. That's the market cap of today. So 50 times more resources are being spent second by second, day by day, to somehow get gold out of good to ground. But this is not electricity. That's equipment and machinery and that's kind of, I don't know, all kinds of things which are working in some kind of gold mine. But isn't this also wasted resources to some degree? Nobody discusses this and it's 50 times higher at this point. I remember I remember a paper from Cruze Tomato that are exactly comparing metal mining with crypto mining. Oh, interesting. Okay. It was Nature Sustainability 2018. Bitcoin mining waste, ridiculously dangerous to the environment, like the cyanide that is used to extract the gold. And then if you just go through all of the environmental damage that gold mining does, bitcoin is like a space compared to what goes on in order to get gold out of the ground. And it was funny when gaming was brought up, I was speaking a concert, I think it was decentralized, in Athens Beach back in November and there were a lot of people there that is a stake and other nonsense. And I got into this big argument with someone that kept saying how bitcoin is so bad for the environment and mining can't continue to happen and how proof of stake of currency is the future. So it was a lot younger than me. And I asked him, do you play video games? I haven't played video games since I was about 21, 22. And I asked them do you play video games? And you said yes. And I said, well, how much electricity are you wasting by playing video games? Where is the productivity in that? So if you take all the gaming in the world, everyone that ever plays video games, you combine all that, how much electricity that is using, and please make an argument that that is more productive use of electricity than bitcoin, that is trying to give everyone politically neutral government free money. This is why this entire line of discussion is kind of like a bit of a red herring because the problem is that we don't have a good way to price externalities and if we did, then the price mechanism would take care of the rep. So I think it's partially done and it's partially I agree. I think a lot of it is a red herring and kind of missing the major point, which is the real environmental issues that we have on the planet today are how is steel produced, how are metals produced, how is concrete produced, how is electricity produced and how is farming done? Everything else makes almost no difference. Like those are the big issues. If our farms produce any way, it doesn't matter how much energy we use. If our mining and our metal production is done in a clean way, it doesn't matter how many metals we use. The earth is completely full. Like the cost of the earth is just materials. So if we're looking at the long term sustainability, it's a question of how these couple of processes are done and so the question of bitcoin's impact on that. It's such a small percentage of consumption. The question is more of which way does it incentivize production? Because if you see even a small swing in the way that if bitcoin, for example, is able to balance grids and enable them to use higher percentage renewables, then you'll see a higher renewable penetration and you'll see overall lower utilization of fossil fuels than you would in a situation without bitcoin. ",timestamp:"00:23:49-00:30:20",topics:["Bitcoin mining"],type:"podcast",weight:7.813010811805725},{boost:0,date:1637366400,description:"Bitcoin can act as a baseload for energy, including nuclear energy",episode_title:"Securing Bitcoin With Nuclear Energy",guests:[{name:"Nuclear Bitcoiner",profile_picture:"https://pbs.twimg.com/profile_images/1443185278525579278/_Yl1nao1_400x400.jpg",ref_id:"60f5891f-0864-4ed4-987a-81da4768b3ba",twitter_handle:"nuclearbitcoinr"},{name:"Eric McErlain",profile_picture:"https://pbs.twimg.com/profile_images/1252969137/Screen_shot_2011-02-23_at_10.59.21_PM_400x400.png",ref_id:"4815365d-44d0-4b06-9d9e-32070158d03c",twitter_handle:"atomiceric"},{name:"Puru Goyal",profile_picture:"https://pbs.twimg.com/profile_images/1590742805613203456/QAtYq_C__400x400.jpg",ref_id:"c24af059-b38b-4ce5-9547-9192c9eff579",twitter_handle:"purugyl"}],hosts:[{name:"Zack Voell",profile_picture:"https://pbs.twimg.com/profile_images/1595803006737448961/fFrf7VJb_400x400.jpg",ref_id:"e32c7661-c635-4089-a620-ffce509eff0e",twitter_handle:"zackvoell"},{name:"Compass Mining",profile_picture:"https://pbs.twimg.com/profile_images/1425165074373791744/f2CgInvP_400x400.jpg",ref_id:"812e5d37-47fb-4077-915f-df52e2ef84d8",twitter_handle:"compass_mining"},{name:"Will Foxley",profile_picture:"https://pbs.twimg.com/profile_images/1580970227193376776/9oQfeExj_400x400.jpg",ref_id:"704b9e82-3e40-40b6-874c-6bb8fadafbef",twitter_handle:"wsfoxley"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/ae91fac6-a1af-4877-9a92-e793d556ee66.jpg",keyword:!0,link:"https://www.youtube.com/watch?v=YBaA17NODlA",node_type:"clip",pub_key:"03c18d0c6c35333f22bc524e21a5fd1d2d9886f5d4d958dc1de95d025de5c84cfc",ref_id:"42296529-2820-4c4f-be26-e12104e2b723",show_title:"Compass Mining",text:"it's about, like, the base load status of bitcoin mining and how the industry kind of use bitcoin itself. I'm assuming that it's not understood among most nuclear engineers or people working on these plans that bitcoin can act as a base load for energy. I mean, it's becoming a more prevalent talking point in a lot of different industries, especially natural gas. Is there an education initiative that's needed to that process, or do you guys see that it's already happening, that these plants are all across the US. All across canada and elsewhere, are already doing bitcoin as a buyer of last resort for energy? Back to you. Actually, yeah, definitely need some educational input there, I think, from other communities, because I think, like, one thing we need to understand, like, very few people today believe in bitcoin and bitcoin mining, and equally, very few people out there believe in nuclear, and there's a very fine nexus of people who believe in both. Right. So there's a big gap of knowledge in either industries about each other, and I think there's a lot of gaps to be filled there. One last thing I'll add to that point is this is something I've been thinking about for a while. I think sean connell tweeted this out too is like, I think bitcoin mining will serve as a global energy floor because suddenly you have a source, like a demand source, which will take up any energy above a certain price, and it'll just mine until it's profitable. I think it's going to have a massive impact on the energy markets, which people are authorizing right now, where a lot of these commodity prices are going to converge together because suddenly you'll realize that today, if I'm running a power plant and I'm selling my electricity to the grid, why am I doing it? Why don't I just mine bitcoin with it? Why sell it to the grid? Because I'm ten times more profitable just mining bitcoin rather than selling it to the grid. So if you believe in free markets out there and you believe in the economic incentives, then it just makes so much sense to these power providers. Just mine bitcoin because you don't even have to go anywhere. You can just colocate these in your own facilities and the footprint is so small, they're traveling in these mini huts where you can stack up these miners together and just mine on site and that you have a demand for there. So that's why I'm saying I think the grid will have to pay up a premium on top of the bitcoin mining for them to be incentivised to sell to the grid. And that's going to have massive ramifications for the energy market, which will completely change the game, I think, especially for all these advanced new technologies or other renewable technologies in the future. Yeah, peru is exactly right. We already have one example. Talent energy is building 150 megawatt mine as a joint venture with terror at Susquehanna nuclear generating station in Pennsylvania. That's going to be electricity that's flowing directly to their bottom line as bitcoin. When that announcement was made in July, after like a preliminary sort of heads up in an investor call in March, I was shocked that it happened that quickly. I mean, I'd been doing a lot of thinking about that and I didn't think it would happen as quickly as it did. Now that it has, now that they've broken the seal and, you know, as operators get their heads around this and understand that there are a variety of different models that they could use, they can do a straight power purchase agreement, they could do a joint venture. Maybe they do something as simple as taking some of the ample real estate they have inside the wire at these plants and just leasing it back to the mining company and maybe granting them access to office space for them to base. The employees are going to service that site and you can rely on the industry best security in nuclear. Physical security is credible on our planet. I think you're going to see more and more of these again. I talked to an industry executive just a couple of hours ago. He said he's up to his elbows and bitcoin miners coming to him. Okay, so it's happening. I'm doing my best to educate my members. I've held three webinars this year on the opportunity in bitcoin. I've been asked to establish a bitcoin cryptocurrency task force within NEI. We're going to be doing more events like this. So yeah, we understand what the. Opportunity is we're moving as quickly as we can and we're trying to get our people as comfortable as possible with it because we think there's a great future in it. That's insane. It's insanely awesome to hear all of that, especially, you know, building a task force internally to focus on this sort of stuff. Whoever that executives up to his elbows, he'll be, I'm sure, up to his eyeballs before too long or too much longer. But we're sort of at the top of the hour here and we want to wrap up relatively shortly. I wish we had time this conversation to go on for at least a couple more hours. This has been insanely bullish and insightful and like, just hearing you guys, you know, working full time in the nuclear industry, echoing a lot of the same things we talk about in our own niche, twitter circles and communities, we are speaking the same language and thinking along the same lines and it's incredibly, incredibly bullish. ",timestamp:"00:54:47-01:00:12",topics:["Bitcoin Energy Baseload","Bitcoin Mining","Bitcoin Education"],type:"youtube",weight:7.779880290018898},{boost:0,date:1596686400,description:"Impact of [[Electricity Consumption]]",episode_title:"Chat 45 - Bitcoin an Energy Revolution A panel at the VOB Conf",guests:[{name:"Tone Vays",profile_picture:"https://pbs.twimg.com/profile_images/1416821178266787844/T1OkI9ZW_400x400.jpg",ref_id:"da6fc991-7080-461c-86e3-4ac18c2f413d",twitter_handle:"tonevays"},{name:"Phillip Sandner",profile_picture:"https://pbs.twimg.com/profile_images/1043824764161335296/2SW3duCV_400x400.jpg",ref_id:"e1996e82-0354-421c-85d5-f18eebec9506",twitter_handle:"philippsandner"},{name:"Jesse Peltan",profile_picture:"https://pbs.twimg.com/profile_images/1123954968636088326/EAjHUGDE_400x400.png",ref_id:"96309505-caeb-47bb-a1ba-712b97292675",twitter_handle:"JessePeltan"},{name:"Christopher Bendikson",profile_picture:"",ref_id:"d72ead54-7bff-4874-870f-123e665fddfd",twitter_handle:""},{name:"Christian Stoll",profile_picture:"https://pbs.twimg.com/profile_images/3296579573/69ebedb479a9bdb9d536fe887e2d3113_400x400.jpeg",ref_id:"ff74d59c-f846-4b16-a5e5-771fb8139f18",twitter_handle:"Granddragon14"}],hosts:[],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/9e7e229f-2631-4542-b5d7-7fcd502798dc.jpg",keyword:!0,link:"https://traffic.megaphone.fm/CSN6935967461.mp3?updated=1627959014",node_type:"clip",pub_key:"",ref_id:"30641d73-c61d-47f4-bf37-f78566574dc8",show_title:"Bitcoin Audible",text:"kind of an inherent moral question there as well, is that do we get to subjectively put our values on to them? Like in making judgments over whether or not they can make that choice as to whether or not it is their value or not? And obviously, in a decentralized system, where are you going to do to stop it anyway? It's inherently an incredibly difficult thing to control or alter. Yeah, this gets to a very steep level of freedom versus coercion. Domini, to say that you watching a Netflix show is a waste of our common resources. I mean, that's not my difference. Did anybody compute how much electricity costs to watch 90 minutes Netflix movie? Honestly, there's research out there looking into data centers which is directly linked to subjectivity. So I have one student that looks into Amazon currently for the comfort print of Amazon, where you exactly have streaming as one source of electricity consumption. I made an estimate, I think two years ago of the electricity draw just gaming console Iceland in the United States, and it's on the level of 50 kilowatt hours. I like to make a couple of points here. I think that one of the important points to note is that electricity consumption is not in itself a bad thing. So electricity production and consumption is good, that provides value. The negative side is when there are externalities associated with how that is produced. So if we enable more renewables, more sustainable energy sources through bitcoin mining, then it's a net positive. I think the other part that is important to note here is that in the total scale of human energy consumption, bitcoin is nothing. It is completely dwarfed by any industrial process. Aluminum smelting, like concrete production, steel production. Bitcoin is such a small drop in the bucket compared to any of that, that any effects that bitcoin has on a more financial level, like if there's restructuring in the way that business is done, that will be far more significant than any effect of the direct energy consumption of bitcoin. And I have to interject there too, that there is something important to keep in mind. When you look at different people comparing energy consumption, they very often talk about electricity consumption on a national scale. But that's not energy consumption. The electricity consumption of the country is only a small part of their primary energy consumption. So electricity is only, I think, a small double digit percent of the total energy that we go through as a species. Sorry, go ahead. But I was going to say, in addition to that, not only is electricity a smaller percentage, electricity is a sizable percentage of total consumption, but for a given country, a huge percentage of energy use. Of most countries, energy use is outsourced. So if you're not a country like the US. Or China that's manufacturing for the world, and you're a country that's importing, you are artificially reporting lower energy consumption numbers. Because all those products that made that everybody uses, those emissions are reported under China or they're reported under the US. But in reality that's still energy consumption. So it's not ",timestamp:"00:21:14-00:25:05",topics:["electricity consumption"],type:"podcast",weight:7.691150903701782},{boost:0,date:1632355200,description:"Accessibility and the price of manufacturing potential ASIC home miners ",episode_title:"The ASIC Mining Hardware Market",guests:[{name:"Vincent Zhang",profile_picture:"https://pbs.twimg.com/profile_images/1158285609196109825/fuB-e6lm_400x400.jpg",ref_id:"98e7bc98-3a3b-4ddf-9b48-5dcd78973739",twitter_handle:"Whatsminer_MBT"},{name:"Vincent Vuong",profile_picture:"https://pbs.twimg.com/profile_images/1260974518547312640/n47yvbNL_400x400.jpg",ref_id:"8390e230-e36b-4e0d-9f5d-70c6635bf3c2",twitter_handle:"BitcoinVincent"}],hosts:[{name:"Will Foxley",profile_picture:"https://pbs.twimg.com/profile_images/1580970227193376776/9oQfeExj_400x400.jpg",ref_id:"704b9e82-3e40-40b6-874c-6bb8fadafbef",twitter_handle:"wsfoxley"},{name:"Zack Voell",profile_picture:"https://pbs.twimg.com/profile_images/1595803006737448961/fFrf7VJb_400x400.jpg",ref_id:"e32c7661-c635-4089-a620-ffce509eff0e",twitter_handle:"zackvoell"},{name:"Compass Mining",profile_picture:"https://pbs.twimg.com/profile_images/1425165074373791744/f2CgInvP_400x400.jpg",ref_id:"812e5d37-47fb-4077-915f-df52e2ef84d8",twitter_handle:"compass_mining"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/ae91fac6-a1af-4877-9a92-e793d556ee66.jpg",keyword:!0,link:"https://www.youtube.com/watch?v=qKeUCNXa4Uc",node_type:"clip",pub_key:"03c18d0c6c35333f22bc524e21a5fd1d2d9886f5d4d958dc1de95d025de5c84cfc",ref_id:"8dbb367b-5cba-4f05-a1db-104d0c66b579",show_title:"Compass Mining",text:"shift this exact same conversation into the accessibility and the price of manufacturing of hardware with a slant towards retail or home miners or hosted miners. If Damien doesn't mind throwing up my screen one more time here, I'll share it for you. In the market multiple times over the past, over previous market cycles, we've seen sort of small gimmicky devices that try and make it easier for people to mine at home. This one you see here, featured in a CNBC article with a variety of inputs there on some little plastic power strip is the latest version. We've also seen companies like Coin Mine try and offer products like this. How viable, long term or at all are these types of hardware devices when you're looking at a market filled with like top tier leading hardware, like what's miners manufacturing? And will this ever have sort of any place in the hardware market or are they mostly cyclical gimmicks that catch headlines, maybe sell a few units, but don't really have any profitability or long term lifespan? Curious to know both of your thoughts on these little devices we see popping up all the time. Vincent from what's minor? I'll toss it back to you and then Vincent from Compass, I want to hear your thoughts too. Yeah, so what we can see is in the year 20, 17, 20, 18, so people can easily mine at home because at that point of time the power consumption of the minus is lower and so the current brought by the minus is not so high. However, since 2019, so almost all the minus switched to more than 3000 watts. Okay, like our minus is 3400, 500 watts. So based on the 220 watts power, so the currency of the minor goes to 16 amp. So it is higher than the staff at home appliance at home. So we can see that some investors or some individuals, they have interest to invest because they might have some capital available, cash flow available, they just want to buy some minors and put it at home for mining bitcoin. So no matter this is interest or is kind of the investment, however, there are a lot of people try to do that. So from our point of view, this will not become the mainstream. Okay. Because right now you can see that the mining facility data center are becoming bigger and bigger. So earlier you hardly can see hundred megawatts mining farms. Right now you can see even one gigawatts mining data centers. So all those data centers are hosting the miners, most likely from the big investors. So this will consume, you can say 99% or 95% at least the supply capacity from our site. So the strength of our R and D will not be put to the 5% market. However, right now what we are trying to do is for mining business, one of the most important factor is that the power cost should be lower as much as possible. As lower as possible. So what we are trying to look into is how to reutilize the heat generated by the minus. So if we can reuse those heat generated by the minus, which means, for example, if we can share those hit at the power cost that we paid, which means you reduce the power cost to 20%, right now you have. So that's why we are looking into those areas. So how we can reduce the operation cost of the investors as much as possible. So that's why we spend a lot of time and they invested a lot into water cooling minus and the immersive mining minus. Okay. Because by concentrating more hardware together, so the heat generated by the miners may be reutilized in some of the cases, so it will reduce the cost of the mining. Okay, so this is the area where we are trying to work, because what we can see, at least from my side, I can see that the power cost of individual at home, actually it is not competitive. Okay. This will require the individual. Investors always should upgrade their or minus with the latest power efficiency ones. So otherwise it may not have the good profit level as they expected when the time goes. This is the share from my side. Yeah, it's interesting to see all sorts of creative solutions that homeowners try and make. And over the past year or two, or maybe a little bit more, we've seen, like you mentioned across the board, a crazy push to expand immersion mining tools and heat reuse tools for all sorts of novel and creative use cases. Again, to sort of maximize the amount of utility we can get out of a mining operation and sort of trim costs as well. Vincent, same question to you. Like what sort of utility or place in the market, if any of these sort of, not to be too critical, but kind of gimmicky small machines have when people are trying to look for cheap, affordable ways to start mining? Yeah, for sure. For me, I think that these smaller miners are like, especially retail miners. They're not 100% profit driven, so a lot of them are. They need to find alternative use cases. So a lot of people will run a minor instead of running a heater. Same thing, a little bit louder, but you still can heat your entire force. So by doing that, you kind of get two and one, and you're also mining some big one at the same time. And there's also people that are also interested in doing lottery mining. Lottery mining is basically solo mining with one machine where you have one in a million chance of getting it. But that's way better than winning it's, better odds than winning the lottery at least, right? So there's people that will do that and run their machines at Lost. And then there's people that just want to support the network as well, right? So people that want to just support the network, run a machine and kind of like put their vote in, cast their vote in, and that's totally fine. Not everything in the world is entirely profit driven. And then there's also use cases where sometimes when people have a solar set up in their house, right, the solar curve kind of goes up like this over time, where the peak happens in the middle of the day. In the middle of day is when people aren't at home. And so what you can do is you can start utilizing miners to kind of use that power when it's peaked, when you're not using anything else. And so there are a lot of alternative uses for these kind of small giving miners that allow retail to kind of keep themselves competitive. I think that's the best thing about retail miners is they can take advantage of these, whereas for the large institutional players, it's a lot harder to kind of push that kind of stuff through because there's a lot more involved with regards to the decision making and everything. For me, I think the simplest solution is like a retail investor, and I'm not trying to be a shield or anything, but it would be to purchase from Compass. The whole solution is very simple. Like, you don't have to invest in infrastructure, you don't have to invest in upgrading electrical, and you have to deal with the heat, the noise, the screen. It becomes a lot more simple like that. But there is definitely a larger subclass of people that want to get their hands on a minor and get dirty with it and try to find use cases for it. And I think there is a time and place and everybody in retail has the opportunity to do that, especially right now, when it's profitable for everybody. You can't guarantee that for the future, but as long as you find an alternative view sport, it's doable. ",timestamp:"00:25:59-00:36:02",topics:["ASIC Home Miners"],type:"youtube",weight:7.590939760401884},{boost:0,date:1639872e3,description:"Big States and Small States",episode_title:"PFP016 Remigijus Šimašius, Bullies as Neighbors-on the Foreign Policy of Small Countries (PFS 2008)",guests:[],hosts:[],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/624262ef-b30f-4114-8061-e310187e6bb4.jpg",keyword:!0,link:"https://www.youtube.com/watch?v=0WAituFO614",node_type:"clip",pub_key:"02574d6e8e787372184b6f17c40d6c6fe1777db9015801f95dfd24692784d767cd",ref_id:"4369ba7b-c9c8-4bf8-906a-1d8e27b1558b",show_title:"Property and Freedom Society",text:"private privilege for people those days to discuss about imperialism and because it is usually not small stages who act such first ones it's usually big stages who start some kind of ongoing work to what you say when people try to draft the practical institution practically is when we discuss theoretical aspects of prior traditional defense but we see that our reality and general public do not allow is never to defend a country because ",timestamp:"00:01:04-00:06:14",topics:["Big States","Small States","imperialism"],type:"youtube",weight:7.585623406215426},{boost:0,date:null,description:"Bitcoin non-profitable projects and Bitcoin tipping",episode_title:"The Orange Sun 🌞 VISA, MasterCard & #Bitcoin #BOLT12",guests:[{name:"Oluwasegun Kosemani",profile_picture:"https://pbs.twimg.com/profile_images/1538403135101800450/sO-RPI9U_400x400.jpg",ref_id:"25ce4b90-6689-4dd9-84b6-240c7bcbe407",twitter_handle:"MrlamilamiKosch"},{name:"~₿ Maxi~",profile_picture:"https://pbs.twimg.com/profile_images/1446241859651637250/i67F3y9p_400x400.jpg",ref_id:"ad997ae7-0726-431a-9f72-82da091c0658",twitter_handle:"fede0891"},{name:"TK☣️Ph.Ple₿",profile_picture:"https://pbs.twimg.com/profile_images/1505791887415730177/d0YDQ3Xc_400x400.jpg",ref_id:"9e3ffa2c-9410-48e9-a726-8312c0abcd7c",twitter_handle:"ToxiKat27"},{name:"FireBurs†s",profile_picture:"https://pbs.twimg.com/profile_images/1517827165198458880/N79Wpx85_400x400.jpg",ref_id:"cda1d3ad-dd80-458b-a5fb-a28861df10a7",twitter_handle:"FireBursts"},{name:"Nikolai Tjongarero",profile_picture:"https://pbs.twimg.com/profile_images/1578458155964682274/_SzDxkAJ_400x400.jpg",ref_id:"821ee040-2267-454e-a59a-92da51568afa",twitter_handle:"BitcoinNaijaShw"},{name:"ブランドン",profile_picture:"https://pbs.twimg.com/profile_images/834861311762649090/N0KAP4zH_400x400.jpg",ref_id:"3d41531d-6a59-4771-81f9-0924b4c02561",twitter_handle:"blario"}],hosts:[{name:"Satoshi’s Journal",profile_picture:"https://pbs.twimg.com/profile_images/1598641632601047042/qrZMP5Oy_400x400.jpg",ref_id:"d977ed11-09b0-4143-828d-582ecb8b58ca",twitter_handle:"SatoshisJournal"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/9b2e17f2-71c5-4f1e-a3e7-720d06dab810.jpg",keyword:!0,link:"https://stakwork-uploads.s3.amazonaws.com/uploads/customers/2707/media_to_local/94a86a32-91c2-4717-b5cb-b36cef925776/38decc02-c922-4c1d-a605-7cd54c91a01d.mp3",node_type:"clip",pub_key:"03c18d0c6c35333f22bc524e21a5fd1d2d9886f5d4d958dc1de95d025de5c84cfc",ref_id:"5e6d5d88-bdb0-4350-8c03-13b0a24d3050",show_title:"Satoshi’s Journal",text:"else was I going to go over? Did I forget anything on charitable stuff that we're working on? Oh, master Gaunte is going to be coming out with a video. I'll give you guys a sneak peek. So we came upon a project, eva Kamani. She came to our space. She's actually going to be working with us out of Kenya. And she brought to my knowledge, a children's. I don't know what they call it, actually. It's not a school. It's like a kid house or children house where they take care of children by providing them food and water and maybe some education. And it's been a while since I read up exactly what they do, but she bought it to my attention. The guy that runs it has been running it for years. I think he has like 30 kids that he takes care of. And when I heard about it, I told her, hey, I want to help them. Master Gaunte is going to go and do a documentary and orange pill them. So we're not just going to give him satoshi orange pill them. So that's an up and coming video. That's the sneak peek. So someday you guys will see a pretty cool video of us orange peeling. And then at the same time, if we can get them to the point where they understand what bitcoin is, this children's home actually could be the first children's home that accepts bitcoin, and they could actually end up making a bunch of more children home. We all know that the value of bitcoin is going to go up. So those first few businesses that start, whether they're a nonprofit or not, the compounding effects of bitcoin over time is such that this one children's home could actually unfold and fund a bunch of others if they use the bitcoin that we donate to them wisely. So that's one of the biggest reasons why if you have a chance and you're so inclined, you can send a few sets. I think the best thing about bitcoin is you can send freaking one satoshi, ten satoshi, 100 satoshi. Anyone can afford to send one satoshi is $0.04, last I checked. I think it's less now. Anyone has the capacity with the lightning wallet to send ten satoshi's, and every satoshi counts. And you can't do that with dollars. You can't send half of a penny to somebody with not even visa. It's not like you can physically get a penny and cut it into multiple pieces. With bitcoin, you can send freaking increments of a penny and increments of a satoshi. I've never sent microsets. Have you ever sent microsets, olu or tk? I've never done it. But my understanding is one satoshi can be actually denominator. You can actually send parts of a satoshi. So from a charitable standpoint, there's no excuse, so to speak, because there's no room for someone saying, well, I can't afford one satoshi, I can't afford a fraction of a satoshi. Every satoshi counts. And in the end, when we get the dollar SAP parity dollar SAP parity, meaning that one bitcoin will someday be worth that 100 million, I think. So that's why literally every set counts. If you can send satoshi to somebody in central South Africa, central America, anywhere, get them orange filled, support them, send them the stats, tell them the importance of saving those stats. I'll tell you an example. It was actually Alexander the Great. Oh, so go ahead, be maxi, because I've been talking long time. Go ahead, it's fine. I was just curious because the first time I heard about what's like a micro, as you said, like micro. My understanding, simple understanding, is that once the toshi can be, you can send transactions via lightning in such a manner where you can send parts of a satoshi. So a satoshi can be divisible into. What they're called, and they're actually not defended by your actual node. That's what makes it so hard to actually defend using such a thing, because the milestones that are in between you and your channel partner within the lightning network, the nodes don't defend those. It's like a weird tracking system they have for the like it's almost like dust limit type stuff. If your partner channel closes it, and for close to your channel, those milliseconds are lost. There's nothing guaranteeing that you get those milliseats back from that other person, from your counterparty, because they really don't like it's, not really. They don't really exist. So this is how we get into this argument of all bitcoin is divisible infinitely. And that's not how it works. You can't just keep dividing bitcoin forever. What ends up happening is you end up just multiplying the supply because then you'll have a smaller denominated unit that's actually going to be worth more because it's smaller and more divisible. Therefore it would be a secondary monetary asset on the network itself. It's a very nuanced topic, but once you get down to integrity of it. So is it more like, let's say sorry, is it more like a theory, some sort like conspiracy theory that some people believe you can, like, you know, create? Like Microsoft like today is very small unit of a sad essentially. Essentially that's what it is. Because bitcoin itself only recognizes the units individually, which is 2.1 quadrillion satoshis. That's all there ever is. Well, with lightning, we have the ability to send fractions of those satoshis which are denominated as millisats. The only thing is when you settle those millisets, that those millisets can't get settled on chain because they don't exist. So you see where we have this dichotomy of when you lose a channel partner. Those milliseconds are just dumb. That's why if your balance is that small at closing time of the deal on the chain, you won't see your balance because there are many sites. They. Only exist within the lightning network. And that's it. They don't exist anywhere else. Yeah, that's what lightning network is going to take over everywhere. Because if your balance is that small, this is very, very small. But of course can be broken in lightning. It's long. You will get any transaction that you do. But with lightning, you can actually still have something still smaller than the smallest partnership. Actually, you can have something so smaller than that. And I think everything will be repricing bitcoin, because everything will not be valuable if one start can be equal to one dollars. Jesus Christ. So if you just have 100 and you have $100, and imagine the inflation that would have messed up with the dollar. In fact, all bitcoin has to be the richest in the world. And that's why it's just 21 million. Try and get some guys, please. Yeah. And I'm sure in the future will get to the point where these millisets won't be as theoretical per se. There's not a conspiracy or anything behind it's possible using lightning and the possibilities of lightning are as much as a developer can develop and make things more possible. So we're seeing developments in lightning all the time. I mean, I just talked about eight companies that are contenders for the I think it's a both for fun competition. Yeah, that one, I bought it like yesterday for the first time. The both twelve that you can they're trying to integrate the onion, like anonymous chat where if a buyer wants to shout and tell them how I'm here or whatever. But I don't know what the issue is because I was listening to someone and they said it was really hard to integrate the bolt twelve. Yeah, no, that twelve is going to be awesome because it allows you to have a static QR code that you don't have to. So right now when you use lightning invoices, they expire and bolt twelve will allow a lightning invoice to be used into perpetuity is how I understand it. And bolt twelve will be we're going to try to get that integrated as soon as possible. It's just a matter of I'm sure some developer has already got it to the point where they're using it and it just hasn't proliferated. But as soon as it becomes basically unleashed in full, then everyone's going to have the ability just to real quickly create a lightning address and post it at their business and that lightning address will last forever. The implications of that are awesome. I mean, that's just one innovation that's happening of many in the future. We don't even know what's going to happen in the future. Open source. So like you can put that on basically any lightning network apps. Yeah, I mean, that's the cool thing about lightning is anybody that develops on lightning, because lightning is an open protocol, anything developed is complimentary of anything else that's developed. So whether you're building an exchange or you're building whatever you want to build on bitcoin or lightning, the open source part of it allows the system or everything on top of it just to get better and be complimentary. So it's freaking awesome, man. I think almost every day I hear something new that's happening. Portland Hodl, he does a space every week and he talks about the bitcoin improvement plan. Yeah, bitcoin improvement proposals. And every week he talks about a new BIP and he explains what that BIP is. So these bitcoinners that are developing on top of bitcoin, they come to the table with a proposal and whether it's implemented or not is a whole different story. But they at least come to the table and they say, hey, we would like to implement this proposal and that's on bitcoin. I don't know if they have a similar thing for lightning. Do they have like a thing for lightning that's like a lightning improvement? They do. I think it is called bulk. I think that's why the bitcoin. Is what you have said. The fact that you can reuse the QR code and look at how interesting that is going to be. I think Bmax was talking about lightning apps, but what about other things like billboard, like your shirts. If you are a walking billboard for Satoshi John, there is a cure code. Boom. Just imagine. Or for any business at all, especially road fines, billboard, books, souvenirs tea cups, frames, just imagine on posters, on stickers, initially on both eleven, we could not use more than one invoice for one transaction. If you try to reuse it, you may be in trouble, you may find yourself in trouble. So that's what is making both twelve very more interesting. Everything that both level does is what both twelve can do and do better. But now you can actually use one QR code on lightning. You don't have to be changing it. You can put it on anything. You can put it on a tattoo. Wow. That'S a really good point. If you were actually to use these static QR codes from both twelve and put them on billboards, put them on shirts. If you're a businessman or woman, you just prominently display them everywhere. People could just literally scan the QR code off the side of your car, off of bill billboard, off the side of your hat. If you do get a tattooed on your shirt, on your skin, I mean jeez, the implications are amazing because people can just send payments to each other using the bolt twelve wherever they put it. ",timestamp:"01:10:47-01:25:10",topics:["Bitcoin Charity","Bitcoin Ttipping"],type:"twitter_space",weight:7.444137096405029},{boost:0,date:1677582e3,description:"What Micro Loans are and the motivation behind them",episode_title:"Ep. 514 The Future of Crypto in the Media with Blockchain Boy",guests:[{name:"Lucas Dimos",profile_picture:"https://pbs.twimg.com/profile_images/1092408696838197250/n0-St2nZ_400x400.jpg",ref_id:"9ac17e2f-49bd-4fc5-bfe5-2f380ca63574",twitter_handle:"lucasdimos"},{name:"Blockchain Boy",profile_picture:"https://pbs.twimg.com/profile_images/1602154101642592256/A0OX97CT_400x400.jpg",ref_id:"4b070a6f-bcc8-4708-abaf-cc830709600f",twitter_handle:"BlockchainBoyy"}],hosts:[{name:"Aaron Malone",profile_picture:"https://pbs.twimg.com/profile_images/1521495204196503553/abk-5S0m_400x400.jpg",ref_id:"bd103540-8c0a-4ab3-b5cd-24a3f2c43ab2",twitter_handle:"pizzamind"},{name:"Bryce Paul",profile_picture:"https://pbs.twimg.com/profile_images/1182725652794892288/QbDOKHcP_400x400.jpg",ref_id:"0d670dbf-f434-43b6-b454-8e5345d7ee51",twitter_handle:"BrycePaul101"},{name:"Pizza Mind",profile_picture:"https://pbs.twimg.com/profile_images/1521495204196503553/abk-5S0m_400x400.jpg",ref_id:"16cb01cf-9f04-45db-a440-47259b02b86a",twitter_handle:"pizzamind"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/93a6fe5b-364c-43f4-9f38-7da3e811460b.jpg",keyword:!0,link:"https://chrt.fm/track/DD9393/audio1.redcircle.com/episodes/68f31cee-f404-40fe-85d7-a406019e916f/stream.mp3",node_type:"clip",pub_key:"03eb026c3e6597055595e42299377a4e164982775cc67f1d2135d9f1cd3a89f526",ref_id:"e2a347d3-a7ce-4200-836e-0c3df94980ce",show_title:"CRYPTO 101",text:"Look at that. Yeah, look at that. Dude, he hooked me up. I bet there's even an espresso shot in there. That's crazy, man. Fantastic. So where was I? Oh, yeah. So you can empower entrepreneurs from other places around the world who need maybe an $800 loan to get more fertilizer for their crops, to double their yield, or who are opening a small store in their community. And it's a way because charities actually can be actually very damaging for local communities. Like with those Tom shoes. You buy a pair of shoes, they ship a pair to somebody who needs them in Africa or whatever, you're putting the shoemaker out of business. It's ridiculous. And you're hurting the local economy by making them dependent on foreign aid. And I don't believe in that. I don't want to give people what they need. I want to give them the tools to get them where they need to be by themselves. And I think that's really what makes me happiest. And so I want to find ways of doing that, and that's just one way of doing that. Yeah, no, I love it, man. So I kind of want to talk back to Tik tok I was just thinking, I saw the other day there was a potential ban on TikTok that, like, lawmakers are out. What's your take on that? You have a quick take? Well, we can choose who we want to sell our data to, but it's going to be sold anyways, and they just want American companies to own our data and not China. But I mean, they just let that weather balloon get across the entire continent in the United States before shooting it down. So ",timestamp:"00:24:04-00:25:29",topics:["Micro Loans"],type:"podcast",weight:72.76897614568216},{boost:0,date:1637366400,description:"Anticipated Bitcoin mining industry and nuclear energy industry intersections in the near future",episode_title:"Securing Bitcoin With Nuclear Energy",guests:[{name:"Nuclear Bitcoiner",profile_picture:"https://pbs.twimg.com/profile_images/1443185278525579278/_Yl1nao1_400x400.jpg",ref_id:"60f5891f-0864-4ed4-987a-81da4768b3ba",twitter_handle:"nuclearbitcoinr"},{name:"Eric McErlain",profile_picture:"https://pbs.twimg.com/profile_images/1252969137/Screen_shot_2011-02-23_at_10.59.21_PM_400x400.png",ref_id:"4815365d-44d0-4b06-9d9e-32070158d03c",twitter_handle:"atomiceric"},{name:"Puru Goyal",profile_picture:"https://pbs.twimg.com/profile_images/1590742805613203456/QAtYq_C__400x400.jpg",ref_id:"c24af059-b38b-4ce5-9547-9192c9eff579",twitter_handle:"purugyl"}],hosts:[{name:"Zack Voell",profile_picture:"https://pbs.twimg.com/profile_images/1595803006737448961/fFrf7VJb_400x400.jpg",ref_id:"e32c7661-c635-4089-a620-ffce509eff0e",twitter_handle:"zackvoell"},{name:"Compass Mining",profile_picture:"https://pbs.twimg.com/profile_images/1425165074373791744/f2CgInvP_400x400.jpg",ref_id:"812e5d37-47fb-4077-915f-df52e2ef84d8",twitter_handle:"compass_mining"},{name:"Will Foxley",profile_picture:"https://pbs.twimg.com/profile_images/1580970227193376776/9oQfeExj_400x400.jpg",ref_id:"704b9e82-3e40-40b6-874c-6bb8fadafbef",twitter_handle:"wsfoxley"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/ae91fac6-a1af-4877-9a92-e793d556ee66.jpg",keyword:!0,link:"https://www.youtube.com/watch?v=YBaA17NODlA",node_type:"clip",pub_key:"03c18d0c6c35333f22bc524e21a5fd1d2d9886f5d4d958dc1de95d025de5c84cfc",ref_id:"27290854-e30c-4f09-aee9-c6ee23a4854d",show_title:"Compass Mining",text:"thing I would want to wrap up with is a little bit of an open ended, forward looking question. Like we've talked about a lot of the dynamics for bitcoin miners and nuclear power producers to work together, a lot of the mainstream perceptions on both of these sectors. If you had to, I guess, pick one or two things in the very near term future that you're expecting to see. I know a couple of you guys have mentioned that some of the recent developments have surprised you or been larger and faster than maybe you expected. Looking forward to the next two years? What's something at the intersection of bitcoin mining and nuclear energy that you are expecting to see you're looking forward to? Whether it's one particular company or maybe a broader trend in adoption, I'm not really sure. I'll leave that up to you, but yeah. Any expectations, Ryan? I'll hand it back to you. Well, in the next few years, I would love to see bitcoin mining be applied in such a way that we could save the Pickering reactor from being shut down, because that is a travesty. That we're going to lose. That and nuclear power in Ontario is one of the biggest reasons why we were able to eliminate a lot of our coal power. And if we lose a reactor, it's going to just go back in the wrong direction because we've got the refurbishing, the Bruce reactor and the Darlington reactor right now, there's no reason why they couldn't go ahead and do the Pickering as well. But I think one of the big concerns is those demand risks. With more renewables coming online and there are intermittent seats, it causes too many surplus generation events and then it creates massive economic liabilities on the reactors and then they get deemed economical and then they get shut down. And so we now have an opportunity to kind of reverse that trend in a way. And make a big gains in the saving reactors and refurbishing them because we could keep it going for another 40 years easily if we just put the time and money into it. Interesting. That's actually fascinating. Peru, I want to ask you to same question. Anything in particular you're expecting over the next short term? Two, three years? Yeah, not two three years, but I feel like by mid 20s what you'll see there's a lot of these small modular reactors that Ryan been talking about for a while too. I think those are going to come online, either demonstration plans or companies are going to start making them because the life cycle of making constructing these plants is much shorter compared to the full scale plants that we've seen in the past and companies are already developing it. And I think, like I talked about, I think it makes so much economic sense to just mine bitcoin with them until the grid providers are offering you prices which are comparable or a premium on top of the bitcoin mining price. Like if I'm running a nuclear advanced technology company today and I understand bitcoin mining and I'm just like trying to get these reactors online as soon as possible and colocating a mid bitcoin mining rig at the same site. And just mining with bitcoin with it until the grid prices reflect a premium which I'm willing to take and provide my power to the grid. I don't want to bet on the timing of this, but I think we'll definitely see this over the deck and I think it's going to be great to see. I think bitcoin mining industry will also evolve over the next few years for sure, based on just how much hash power is going to come online over the next couple of years. I think both industries are going to benefit from this. That's awesome. Eric? Yeah. Same question. You just wrap up on anything you're expecting, I guess. Well, I mean, when you ask me what's going to happen in nuclear next two, three years, I have to remind you we plan 510, 15 and 25 year increments. So that could be tough. So I'm going to say more of the same. I mean, we had those three announcements in July, talent and Terrawolf energy, harbor and Standard power, and then of course Oklahoma and Compass within like ten days of one another. Bang, bang, bang. It just completely changed the way we look at the world. And I think we're going to see more of that. We're going to see more of that. We're going to see it happen more rapidly. From any eyes perspective, we're hoping that one of the introductions that we've brokered will turn into an actual deal. Whether it's a straight power purchase agreement or something more profound like a joint venture between a minor and an operating plant site. We're crossing our fingers that we'll be able to say we helped something like that happen sometime soon, but I would say more of the same. The one thing that I will think that I'm going to project may happen in five to seven years and it builds up something. Peru said. I think you may very well see an announcement about new build for An SMR where the miner is twinned with the construction of the reactor. That they will happen at the same time, or roughly at the same time. So when the reactor goes critical, that miner will be able to take that power immediately. I think that we're going to see that kind of coordination. I would like to see that kind of coordination between advanced reactor manufacturers and mine. How's that? That's awesome. That's perfect. To seeing some agreement from the other gentleman here on the panel with regards to that. That would be beautiful to see. Getting more conversation in the chat. We're a little bit over time now, so unfortunately we do have to wrap up. But I will say for everyone watching, all three of these guys are on Twitter. Relatively active, but definitely must follows. You can find their handles in the description below this video. It's all three of you. Thank you again so much for coming on the stream, chatting with Will and me. It's been a super fun, informative, insightful conversation. Super glad we found time to do this and that's a route for us here at the Compass Livestream. Appreciate y'all watching. Be sure to like and subscribe if you enjoyed the conversation. Helps other miners find this content. This conversation in particular was just outstanding. So, again, thanks to all three of you. Appreciate your time. And that's a wrap. ",timestamp:"01:00:13-01:06:32",topics:["Bitcoin Mining Industry","Nuclear Energy Industry"],type:"youtube",weight:7.335028414441784},{boost:0,date:1670706053,description:"Understanding stacks",episode_title:"Bear Market Buidl — Major #Bitcoin developments! #Stacks #Sidechains",guests:[{name:"@GriffdenNFT",profile_picture:"https://pbs.twimg.com/profile_images/1604377729062895617/R4pSEdH4_400x400.png",ref_id:"dafdf7ec-28c0-43d3-a0d9-b2d266f38738",twitter_handle:"GriffdenNFT"},{name:"@Chad_333",profile_picture:"https://pbs.twimg.com/profile_images/1592310541732970496/o1tbw9Eo_400x400.jpg",ref_id:"484c7695-6a4e-4141-9585-1109bf23f8cf",twitter_handle:"Chad_333"},{name:"@jackbinswitch",profile_picture:"https://pbs.twimg.com/profile_images/1601214177439260672/O0SpU5B1_400x400.jpg",ref_id:"9685e7f3-3e0c-4b84-9fd9-b8a1d96f6ae9",twitter_handle:"jackbinswitch"},{name:"@jimdotbtc",profile_picture:"https://pbs.twimg.com/profile_images/1593210347825119237/L_SNThWQ_400x400.png",ref_id:"5dcf5545-fad6-44ee-ae56-360c5efe1151",twitter_handle:"jimdotbtc"}],hosts:[{name:"@BigRpic",profile_picture:"https://pbs.twimg.com/profile_images/1604962150388219904/WqiCye-r_400x400.jpg",ref_id:"726f0c95-9d94-4d44-a056-8ad3c9e3ddd5",twitter_handle:"BigRpic"},{name:"@CarlsonDoc",profile_picture:"https://pbs.twimg.com/profile_images/1597382056308350977/1NPexynZ_400x400.png",ref_id:"e34fa2b2-a58e-4461-81a0-d10c1058dfc2",twitter_handle:"CarlsonDoc"},{name:"@STXLDN",profile_picture:"https://pbs.twimg.com/profile_images/1533793338931007488/o3laQDCp_400x400.jpg",ref_id:"5c3bc906-3aed-44f9-851a-94804c6fe5ca",twitter_handle:"STXLDN"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/99046513-2614-4eae-9de4-5781ba4b330a.jpg",keyword:!0,link:"https://stakwork-uploads.s3.amazonaws.com/uploads/customers/2707/media_to_local/fc3bebcb-8271-433e-8d81-84dd06f3b022/aec527bc-539d-4d3b-9bad-db4af9e1a1ba.mp3",node_type:"clip",pub_key:"03c7a7f42d94fdfc7a655515c1421cd1d20db090a1c24150201de0b1dc6a30b0ee",ref_id:"3008a0a4-d3c8-4d33-aa67-f39e4ce1a87c",show_title:"STX:LDN",text:"Yeah, that's awesome. I definitely agree with the degenerate part, for sure, but no, I'm looking forward to it. Thank you. Yeah, I appreciate that. It sounds really good. Thanks, Chad. Yeah, it's not really what our mentors are maybe pushing us to kind of do, which is more build infrastructure for Stacks, but that's where we can hopefully turn this into a more dev tool for users or creators, I should say builders that want to build on chain gambling games. And yeah, we're really excited about it. Thank you, guys. Yeah, I personally think the more user ability there is like, things to do based on chain I find more appealing than I guess, like, the super techy stuff because hold on 1 second. My daughter just pulled food out the fridge and I'm not even ready to start dinner yet. Yeah. Griffin, you were more of an Ethereal native before you came to Stacks. Kind of like myself, I think it'd be interesting to talk to you about the most striking thing that you notice switching from Eve to kind of get an exposure to this ecosystem, which I find to be completely unique in the crypto space. I hadn't found anything like it thus far. Right. And so when I came here, I'm like, oh, yeah, I'm home. This is where I'm supposed to be. So I think you probably also have some really good perspective where that's concerned. Yeah, I'd love to touch on that. That's a great point, and I'd love to make that clear to you. I missed our conversation the other day. I don't know if you saw my DM on Zoom, but I'd love to catch up one on one sometime too. But coming from Aetherium, I first tried out Stacks maybe three or four months ago, and I guess I truly didn't understand the awesome tech behind it. And as someone who is used to my transactions completing about 30 seconds to a minute, I wasn't super excited to use Stacks. But once I understood that they at the foundation and a hero all understand that's one of the biggest issues users have with Stacks and that they're working on Scaling, then I really realize that this is going to be a viable competitor to the other smart contract blockchains one day. And I'm just happy to be here. Like Trevor had mentioned before, all the noise happens and it's a smaller community. So you guys obviously are a bit more tight knit and respecting to community members, which is something that has dropped significantly in the Ethereum community as it grew. So I really hope that Stacks can find a way to carry on that great culture that it's got right now and be that inviting blockchain that Ethereum and Solana have failed to be as they grew. It's that, like, feels at home type feel. I know exactly what you're saying. Yeah. I mean web three. A big part of web three is community. Right. That's one of the underlying pillars of what it is. And I have faith that this community will be able to grow and maintain its character. I think it's one of the benefits of Stacks, being a community that has been slow to grow. You have guys like Jim and Dash who were here at the very beginning. Right. And so they have such interesting perspective to see how it's shaped so far. Yeah, I think that you cannot have where we're going with being disjointed and just kind of when someone new comes in, they just feel like a mark being ready to be ripped off, right? You need cohesiveness and you need good people trying to go towards a common vision. And the common vision here is having a user owned internet built on Bitcoin, right? That's really what it's all about. And I think that we're off to a damn good start. So I'm excited. I don't worry about us losing our character. I think that the fact that this thing has just been building slowly over the past few years only reinforces the foundation. And that's the thing as well, jack I say this to a lot of people about the build up lap. Because the build up here, if we actually look at things and I know you guys, that Dash and Jim have been here for a lot longer than me, but even I had heard of blockstep when it first came out, and not first came out, I'd say probably a bit later on towards the ICO or the token. So, shall we say. So I'd heard about it and I was a bit dubious because it was kind of like, okay, it's bitcoin not on bitcoin, it's a bit weird. Sounds a bit weird to do another chain. I suppose at that time, maybe I wasn't as experienced. I was just starting out professionally in crypto, so maybe I wasn't that experienced as I am now. But when I first kind of started researching back into it and I've seen stacks and then I started researching and I realized it was block stack, it was like, wow, so this has been here for a long time because I remembered that block stack had been around since even a few years prior to the whole token. So going back and looking at the whole kind of long history of block stack in the game and stacks in its current form, it's been around a lot longer than a lot of stuff, like a hell of a lot of stuff. It actually borders on being around a lot longer than even Ethereum itself. Do you understand what I'm trying to say? It borders on being around longer than the theorem itself. So it's like yeah, I think it's just great to see that at this moment in time with obviously the Stack 2.0 upgrade, we've got 2.1 coming and all of the hard work that the builders that were here before us have done. It just really just seems like it is the right time for this to be out there in the world. And as what Trevor said to Grifton, it's like before the noise comes, isn't it? Like you said, you've got the tight knit community and you've got everybody just building. And because everybody has that focus, as you said, Jack, of the user user on Internet, on bitcoin, nobody's like there's not a million other 29 880,000 different coins and tokens that we're all talking about. I suppose that's one of the key or some of the key elements, but yeah, sorry, Jim, go ahead. I was just going to say, well, thanks for doing this call. It's really been interesting hearing you guys, and thanks for all the big intros, jack it's actually really interesting just even listening to this call and taking myself back to the same sort of point in the last cycle, because I think Dash and I were kind of working with Stacks probably around 2017, possibly a little earlier. I think it was interesting as we we imported one of the we imported the first two way bitcoin ATM into the UK in 2014, and it was just a big, you know, it was a big bet on bitcoin. And, you know, we were, we were thinking about remittance and, you know, the difference it was going to make for, you know, the world's unbanked. That was kind of the initial reason we got into it. And so we met quite a few really interesting people, not being not crypto people prior to that. So we were actually musicians working in the music industry, so it was a steep learning curve. But we met this guy, Mike Cohen, who's one of the core developers on Stacks now. I remember him coming into where we had the ATM, possibly around 2015, and saying he was like, oh, have you heard of ethereum? There's a big thing coming along, it's going to be really exciting. It's got the security of bitcoin in a way, but it operates really quickly, so you can have these things called smart contracts. And, of course, I'm going into my old work in music and thinking how we could set up all these amazing payment mechanisms where a stage manager presses a button to say that the band has finished the gig, and then there's this whole domino effect of payments. And then by the time you get on the bus, you've been paid. That sort of got us thinking. So I really got into a theory briefly, but Mike had already said, this is what we're kind of working on is doing on bitcoin. You know, it can be done on bitcoin, right? And this is just vitalics kind of jump the gun. It's really, really cool, but it should be done properly, it should be done in a different way, and it will happen. And I think he was already involved with Blocksack, and then, yes, probably a year or two later, we started doing this stuff, this at Mining, which didn't really work too well. I think it was a bit of a scrum for just lots of people with lots of ideas and no real central. It just didn't feel like it was really working. And then I think that was running up to the beginning of sort of 20 end of 2020, beginning of 2021, when it felt bit similar like this. You know, things were just about to sort of certainly with Stacks, the main net was about to launch, but there was no one really there. But there were people coming in. It was a really exciting vibe. Lots and lots of community, really great sense of just a handful of you sort of doing this really exciting stuff. And I was just buzzing because for years I've been thinking, this is coming and suddenly it's here and we can make NFTs. And so I'm like, we got to go big. And then dash. And I like, let's get fat, boy slim. It struck me, the last big Whiff and Brighton fat Boy Slim was the last big sort of global superstar that came out of Brighton, which was why Thoughts instantly went to go, let's get Fat Boy Slim on board. But it was just such a funny environment because we started with all these huge names. Fatboy Slim, Cara Delevingne, Orbital, Dave Stewart from the Arithmetic and Chemical X got them all together, all through various we're friends with a lot of people through music anyway, and Chemical let's very good friends with Kara Delevingne. And so we then march these guys into this empty network and it was a hell of a sales pitch, I tell you, because we were saying, this isn't going to be the hype that you're expecting. If you go and do this in a theorem, yes, it will be worth you probably make millions out of it, but this is bitcoin and in ten years time you're going to be revered as Legends for being so ahead of the game for doing this. So we did manage somehow to get them in, but then it was funny because there just was no one there. We were lucky that we sold, I think the Car One sold for 20 or $30,000 worth of stacks, which she gave to her charity. So that was really successful in that. We got some noise out there, but I guess I was thinking things would move a bit quicker. I got kicked out of so many reddit and different groups for going in there and trying to say, hey, this is it. This is the thing everyone's been waiting for. And everyone's just like, shit coin, shit coin to get out. I mean, I just got kicked out so many forums and just everywhere I went, the moderators just kicked me. And I mean, I can't necessarily blame them because at the end of the day, as we've said, there's this huge number of pointless coins and you know, 99.9% of them are just scams. And so you can't blame someone's defense mechanism for that. It's operating correctly, ultimately, to call me a shit coin, but I'm just in there trying to say, research, look into this. This is the way that Vitalics should have done. It kind of unfortunate. They probably had this minibus idea was at the same time or around the same time, but he just wanted to do it properly, which was another thing I was especially at the time, back in 2018, 2017, the Tether thing had been massive. There. Was this whole security thing was just flying around, and it was like, this is the right way to do it. But at the same time, the whole time that Stacks was trying to decentralize to the point where it could start bringing in the audiences, the ethereum mess was just growing. The off bitcoin, blockchain, unmined kind of mess was just growing at a rate of knots. And it's just kind of sad that didn't kind of just have that leap of instead of burning, because they always knew burning was bad, and that's for people who don't know. That's how theorem kind of started. You had to get value in there for people to stake, and mine and all the rest of it, it was burning bitcoin. And so the quicker they got that value locked into ethereum, then they got people going, okay, we've got a network here, and we're all supporting it, we're all invested. And if only you'd had the thought to just do proof of transfer, because we wouldn't have this whole mess, we wouldn't be here now. We'd all just be in that. I don't know what it would have been like, but it'd be a very different world if everything had just had just started from here. But here we are trying to do it. But yes, it feels like a really big battle now, because it was really interesting when we had that Sappy Seals thing a few couple of months ago. I think that was really interesting. It was someone with an enormous following on a theorem doing kind of follower farming or something, just trying to go out and get people to follow on Twitter, and just said, I'm thinking of moving to Stacks and everything. Everyone on Stacks flipped out and go, quick, I'll post on this guy's thing. He's got 100,000 followers a day. But what was really interesting was that was what triggered the BNS rush, because all these people that kind of I've been trying to get my voice into their forums, they suddenly just got introduced by a person who wasn't going to get shut down, and he was even trolling in a way. But suddenly these people, all it took was someone to say, there's something you can do with bitcoin. And then the cleverer of those lot looked into it and then went, holy shit, this is a really cool idea. And then it was a really amazing event, and it does fill me with confidence that we're in the right place, we're doing the right thing. But it is quite a battle going through this and actually getting everyone to kind of get on board. I was shocked by the bitcoin conference when I went out to Miami, went down to the conference on the Friday I was with Drew Falkman, and we went in and we were just instantly taken by just a funny vibe. And we'd been talking about I was going out there with a special work of art that I really wanted to get into the conference and went down there and they were just like, no stacks there's. No stacks. NFTs are allowed in here. But in the center of the conference was a huge array of screens selling Ethereum NFTs. And I was quite shocked, I was quite shocked that it was preferred to put Ethereum NFTs on screens in there and somehow put it under an umbrella of being valid at the Bitcoin event. But that was shut out. And then I got a photo, I think, of which one was it, Miami Coin or New York Coin? It was the closest we got to that conference was about three blocks away and I've got a photo of this truck with just a flatbed lorry with a Miami Coin sign on. And I kind of felt at the time that there was a bit of a bit of a there's like a kind of old boys club already in Bitcoin with these guys from I guess from Block Stream that started all this stuff with side chains and they kind of create they were kind of, in a way, the original Bitcoin accelerator, I guess. But they were going down a route of everything being federated and centralized and so now we've sort of got it from both sides. We've got established businesses who have an inferior way of operating, basically, and a business model that was always going to get swamped by decentralization eventually. Maybe they thought they'd have a bigger head start, I don't know, but now they're definitely not happy about stacks and doing it on. There was a big thing with Adam back and maneuver on Twitter. Manev was being very reasonable and Adam pack just kept going back to pre mine, pre mine and lack of Bitcoin miners, which I couldn't actually disagree with him with the bitcoin mining thing, which sounds like this new upgrade is going to allow decentralized mining, which could in the perfect world, you've got everyone in Bitcoin. Like, again, if I think go back to Vitalic, if he had done what Mane did, I think at that point the small Bitcoin community would have said, it's our job now to mine this smart contract network. So while it's just automatically assigned 1% of what you're holding to mine, we'd just be in this amazing world where this smart network is just accepted as being a good thing, but instead we kind of got to fight for that. But decentralized mining is a massive step towards that because that does allow people, hopefully to mine with very small amounts, which will be that's a game changer because that's when we can just start getting people. That argument then falls away once you've got the centralized mining, that argument goes. The other arguments were just, in my opinion, bullshit, because the whole pre mining thing, it's like, I mean, look at Bitcoin, look at him. And every successful network kind of started that's the process of decentralizing who mines it. In the beginning, it's just kind of got to be done. And it sounded like an argument of a corporation fighting against something that they know is good and know is competitive and know is worthwhile, but they're going to argue it till they're ready in the face that they're going to find some some issues with it. So anyway, yeah, it's been a long journey, but it's really nice hearing you guys tonight and seeing some new people coming on. It does feel like we're just getting into that bit where the markets have kind of got close enough to the bottom that people start kind of moving again and then some people are looking for other change while things are down, they're looking around and some people are coming here and finding this amazing network. And thanks for letting me go on, Jim. Totally, totally. Respect goes out to you, my brother. And it's funny hearing your story as well, especially yourself being from the UK. Because part of the reason why we started up Stacks London, we kind of just started off out of the blue because I've been around in the space for a minute and I've not really seen anybody talking about Stacks since, you know, the old block stack days. So when I, when I really dove in in 2020, I was like, you know, after a couple of months, I was like, well, what's going on? And I'm going to all these events and speaking to all, you know, same people and same networks, and it's like, nobody's talking about Stacks and talk to people about Stacks, they're like, you know what, Stacks? And then now go block stack. And they're like, oh yeah, block stack. You know, we remember block Stack, like. What'S going on over there right now? So it's really weird. And then there's a lot of synonymity as well, with your early story as well, because, I mean, my first real kind of, I would say, dive into learning about bitcoin was around 2013, 2014, and then when I first kind of discovered, let's say, all right, blockchain and what blockchains are and how blockchain operates wasn't until like, a year later and again, coming from a music background, my first thing was, okay, so when you said that bit about people getting paid, I swear that we literally had that same we was in the studio having that same conversation. I think everyone who got in at that time immediately, if your mind operates quite quickly, like a lot of, I think, builders minds do, you do tend to jump instantly to the ultimate solution, which is like, oh, look, here we go. Everyone in the world who has a phone now can transact with anyone else in the world. Great poverty is kind of on its way out, but now later on, you're like, yeah, we're ten years into this game now and it still feels a long way away. Even in terms of just that kind of accessibility for people. That focus really isn't on remittance, I guess it's more on certainly now it's like on people sort of surviving and building businesses and making money. But it would be great once that kind of rush gets in the same way. Like the.com bubble, it's like this massive rush and then afterwards the really useful shit sort of starts happening and hopefully we'll sort of get to that point soon when the real thing that bitcoin has to give humanity can really start working for people. Yeah, definitely. I think that's part of a lot of people's entrance into Stacks as it being stacked rather than Block Stack is that kind of frustration. I think that's where it definitely sits for me, having that frustration that you're watching this thing play out all over again and everybody's heads just in the clouds and you've got all of these new people coming in. Nobody wants to let people or teach people the actual core fundamentals. They just want to, I feel like, a feeling of they want to sell their particular idea. So I feel that a lot of projects have just completely run away with that. And again, not to say that there's not a lot of other great projects out there, let's say Blockchains and the technology and cryptocurrencies themselves do kind of provide that open medium for people to create these ideas and do these things. So that kind of what you said about walking in the room and everybody's like, we don't want to do anything different. That kind of Maxi rooms where we just want to stick with just this. That is an absolute ludicrous idea. I've said this in plenty of Maxi spaces, so if any Maxis decided to jump in there, it's no different than what I say in their spaces. At the end of the day, ",timestamp:"00:24:51-00:48:54",topics:["Stacks","Web 3"],type:"twitter_space",weight:13.500243841282398},{boost:0,date:1632355200,description:"Vincent Zhang and WhatsMiner introduction",episode_title:"The ASIC Mining Hardware Market",guests:[{name:"Vincent Zhang",profile_picture:"https://pbs.twimg.com/profile_images/1158285609196109825/fuB-e6lm_400x400.jpg",ref_id:"98e7bc98-3a3b-4ddf-9b48-5dcd78973739",twitter_handle:"Whatsminer_MBT"},{name:"Vincent Vuong",profile_picture:"https://pbs.twimg.com/profile_images/1260974518547312640/n47yvbNL_400x400.jpg",ref_id:"8390e230-e36b-4e0d-9f5d-70c6635bf3c2",twitter_handle:"BitcoinVincent"}],hosts:[{name:"Will Foxley",profile_picture:"https://pbs.twimg.com/profile_images/1580970227193376776/9oQfeExj_400x400.jpg",ref_id:"704b9e82-3e40-40b6-874c-6bb8fadafbef",twitter_handle:"wsfoxley"},{name:"Zack Voell",profile_picture:"https://pbs.twimg.com/profile_images/1595803006737448961/fFrf7VJb_400x400.jpg",ref_id:"e32c7661-c635-4089-a620-ffce509eff0e",twitter_handle:"zackvoell"},{name:"Compass Mining",profile_picture:"https://pbs.twimg.com/profile_images/1425165074373791744/f2CgInvP_400x400.jpg",ref_id:"812e5d37-47fb-4077-915f-df52e2ef84d8",twitter_handle:"compass_mining"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/ae91fac6-a1af-4877-9a92-e793d556ee66.jpg",keyword:!0,link:"https://www.youtube.com/watch?v=qKeUCNXa4Uc",node_type:"clip",pub_key:"03c18d0c6c35333f22bc524e21a5fd1d2d9886f5d4d958dc1de95d025de5c84cfc",ref_id:"3cb5fd13-1b10-4dc0-b8e3-f2fc0f1ec406",show_title:"Compass Mining",text:"the two Vincents are going to unload a lot of information, insights and some fun opinions on us. This conversation, I want to give you both a chance to introduce yourselves, give us a little background on sort of how you got into the mining industry and your focus on the ASIC markets. Vincent, from What's Minor, do you mind just introducing yourself and giving us maybe a brief history of What's Minor and what led up to where you are today? Yeah. So I should say good morning. So here it's midnight in China. My name is Vincent. Right now I serve in as a sales director in Watts Minor. So actually there's a small story for myself being in this industry. So before I joined What's Minor, I was working in telecommunication industry. So I worked in DT Corporation for 14 years. I sold a lot of telecommunication equipment to India. However, in the year 2018, I just quit the job, my previous job, and by chance I got joined in What's Minor. And so when I joined what's? Minor? So actually the situation of Microbity What's Minor is not as good as right now we are because though we released the most efficient minus based on 16 nanometer from TSMC, however, we were not able to get a sufficient supply capacity in the year 2018. And of course, everybody knows that the mining profit in the year 2018 is not so good. So due to these reasons, the situation of What's Minor in the year 2018 is not so good. So however, this situation get changed in the year 2019. And so myself is very pleased to join work with Microbity as Sales Director because starting from the year 2019, so we export more business chances outside of China. So we can say after I joined what's minus, our overseas market enhance a lot, probably later via the conversation, so we can share more information about What's Minor and myself. But I'm already in this industry for three years. ",timestamp:"00:01:34-00:05:06",topics:["Vincent Zhang","WhatsMiner","minor"],type:"youtube",weight:7.285317421145426},{boost:0,date:1677582e3,description:"Lucas' real dreams and goals in life",episode_title:"Ep. 514 The Future of Crypto in the Media with Blockchain Boy",guests:[{name:"Lucas Dimos",profile_picture:"https://pbs.twimg.com/profile_images/1092408696838197250/n0-St2nZ_400x400.jpg",ref_id:"9ac17e2f-49bd-4fc5-bfe5-2f380ca63574",twitter_handle:"lucasdimos"},{name:"Blockchain Boy",profile_picture:"https://pbs.twimg.com/profile_images/1602154101642592256/A0OX97CT_400x400.jpg",ref_id:"4b070a6f-bcc8-4708-abaf-cc830709600f",twitter_handle:"BlockchainBoyy"}],hosts:[{name:"Aaron Malone",profile_picture:"https://pbs.twimg.com/profile_images/1521495204196503553/abk-5S0m_400x400.jpg",ref_id:"bd103540-8c0a-4ab3-b5cd-24a3f2c43ab2",twitter_handle:"pizzamind"},{name:"Bryce Paul",profile_picture:"https://pbs.twimg.com/profile_images/1182725652794892288/QbDOKHcP_400x400.jpg",ref_id:"0d670dbf-f434-43b6-b454-8e5345d7ee51",twitter_handle:"BrycePaul101"},{name:"Pizza Mind",profile_picture:"https://pbs.twimg.com/profile_images/1521495204196503553/abk-5S0m_400x400.jpg",ref_id:"16cb01cf-9f04-45db-a440-47259b02b86a",twitter_handle:"pizzamind"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/93a6fe5b-364c-43f4-9f38-7da3e811460b.jpg",keyword:!0,link:"https://chrt.fm/track/DD9393/audio1.redcircle.com/episodes/68f31cee-f404-40fe-85d7-a406019e916f/stream.mp3",node_type:"clip",pub_key:"03eb026c3e6597055595e42299377a4e164982775cc67f1d2135d9f1cd3a89f526",ref_id:"d266ac59-706d-4b4c-b0ca-d9ea3ae4fc34",show_title:"CRYPTO 101",text:"to be? That's a great question, and I'm still figuring out what I really want to do with the rest of my life. I just know that I really like building cool things with cool people, and I think I'm always going to do that, no matter whether it's big or small. I think it's just I have to do something. I'm like a shark. Sharks have to keep swimming or they sink. Right? And so it's very similar with me. Maybe I'll have some more time to go live in the country and be away from people for times. But no, I really like empowering people to be their best selves. That's really what makes me the happiest, is, like, I'm a very loving and caring person, and I love to see people do good things and succeed. So I would really love to get into sort of micro loans and sort of entrepreneurship guidance and maybe even ethical VCs, because I don't think a lot of VCs are very ethical. And so I'd love to do something along the lines of that to empower more entrepreneurs to have an effect in their community and environment outside of Web Three, too. I've been doing micro loans on the platform called Kiva for many years, and I think it's super cool and needs a Web Three version. Yeah, I've actually never heard of Kiva. Tell us a little bit more about what micro loans are. And has that been a way that you could generate passive income or anything? No, it's just mostly a tax write off for really rich people. It's not like super well known, but you get to actually empower entrepreneurs in other countries. Oh, there's Jonah. Jonah. I'm on a podcast. Oh, he's bringing stuff. Jonah. What's up, brother? Thanks, bro. No, he's one of my fantastic team members over here. Thanks, bro. I wish I got ",timestamp:"00:22:22-00:24:01",topics:["Lucas Dimos"],type:"podcast",weight:71.21921050996978},{boost:0,date:1625958277,description:"How Bitcoin helps increase business competitiveness and change business model",episode_title:"WHY ARE WE BULLISH? Brandon Quittem, Timothy Kim, Shinobi, Steve Barbour ep185",guests:[{name:"Brandon Quittem",profile_picture:"https://pbs.twimg.com/profile_images/1502403738861940736/9J5VuTye_400x400.jpg",ref_id:"65512044-7810-4ece-8156-5519e072cb66",twitter_handle:"Bquittem"},{name:"Shinobi",profile_picture:"https://pbs.twimg.com/profile_images/1526590501742428160/0Y5H2uJK_400x400.jpg",ref_id:"a05dface-33a7-400d-a749-99efe0d96118",twitter_handle:"shinobi602"},{name:"Steve Barbour",profile_picture:"https://pbs.twimg.com/profile_images/1592714173469065216/q8kXPyQI_400x400.jpg",ref_id:"63a731b8-4759-4360-9e9d-d66f884e12d8",twitter_handle:"SGBarbour"},{name:"Timothy Kim",profile_picture:"https://pbs.twimg.com/profile_images/1569681307029934081/2s_nWYo__400x400.jpg",ref_id:"e0323798-c70f-4cc3-96ff-87bab50c2313",twitter_handle:"realtimothykim"}],hosts:[{name:"Ben Perrin",profile_picture:"https://pbs.twimg.com/profile_images/1181715113226596352/ipGVEcYH_400x400.jpg",ref_id:"e6b013ef-178b-4b41-95ee-423148a3dc3a",twitter_handle:"profbenperrin"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/419512c2-e309-4b25-bfe2-cd481d53f66d.jpg",keyword:!0,link:"https://anchor.fm/s/11e95d20/podcast/play/37027401/https%253A%252F%252Fd3ctxlq1ktw2nl.cloudfront.net%252Fstaging%252F2021-6-10%252Ffb6d5638-4579-5707-9740-0e586c980ba7.mp3",node_type:"clip",pub_key:"037f7331a5bef6c6f880246747befcc3767f3bb9730bc5e6f7c3770f4184ed0bff",ref_id:"fe680ae3-835d-492f-b664-7d645d02a99f",show_title:"BTC Sessions",text:"Can I pivot into why I think why I'm bullish on this episode? Yeah, man, let's do it. As I'm on my fourth shot of Ryan, I'm about to lose any coherency on the same topic. I just love seeing any startups, especially any Bitcoin related, like pro bitcoin related startups do well. One of my favorite follows on Twitter is like, Tahini's Restaurant. Like a little franchise that's like big into bitcoin and you know they're going to kill it because just having bitcoin in your treasury, it makes it so difficult for any other competitor, to any other competitor, they're a restaurant business. Any other competitor that's in a restaurant, that's a tough freaking market to be in. Like the restaurant business, maybe bitcoin mining is like the only harder market because it's so easy to get into. But like, restauranting, it's an easy business. The low barrier to entry, tough margins. But Tahini, I don't know who else who's a direct competitor in their area. I think they're based in Ontario. It's probably a million Sharma places that do like what Tahini does. He's going to fucking kill those guys. They're going to kill all their competition because they might have the exact same profit margin. They might have at the end of the year, 10% profit, just like every other competitor in the area. Sort of like plus or minus a few percent. Some guys in the negative, whatnot, the team is going to kill them. They're going to kill them because they're going to have this bitcoin treasury. And I was saying that locally on a local podcast. And Lloyd, I got this small wheel field business we're getting into motors and stuff. Aside from the bitcoin mining focus that we have, what we're doing is actually not that different than what a lot of oil service companies do. And I said on this podcast locally, I'm like, my competition will have no chance to compete with me if they don't adopt a bitcoin treasury. And they don't even have to build bitcoin mines. All you have to do as any small business owner is convert a little bit of your treasury and your profits into bitcoin and to hoddle it and to speculate properly on it. And you're going to crush your competition, like your feet of competition. So my bullishness that I wanted to bring to this episode is like. I think that small businesses and true entrepreneurs. Not Fiat entrepreneurs. Not the guys just going out and trying to get raising money from these VCs and not really building anything. But actually true entrepreneurs. People going out and starting small businesses. I think we're going to see finally a true economic boom in small businesses that we've seen suppression over for over 100 years. Like over 50 years for sure. Ever since. Like the full on 1971 Fiat standard. But when I showed up on the show, I was driving. I do a lot of driving around Alberta, Saskatchewan, you know, Alberta, well, Sessions, we go through all these small towns. Every small town is fucking same. And I think about it from like, the bitcoin perspective. All these small towns are identical. They have the same franchises. They got the Mr. Lube. They got, like, the petro Canada. They got gas station. They all got franchises. There's no fucking small businesses anywhere. They're all dead. They're dead. Everything's a franchise now, right? Which in and of itself isn't a problem. But the fact is, these people are just licensees of a business model. They're not finding their own supply chains and building a small business. They're going out and becoming a licensee of a big Fiat, like a big corporation that ends up benefiting from the Fiat. ",timestamp:"01:23:33-01:27:13",topics:["business model"],type:"podcast",weight:7.273831367495893},{boost:0,date:null,description:"The future of payments on Bitcoin and on the Lightning Network",episode_title:"The Orange Sun 🌞 VISA, MasterCard & #Bitcoin #BOLT12",guests:[{name:"Oluwasegun Kosemani",profile_picture:"https://pbs.twimg.com/profile_images/1538403135101800450/sO-RPI9U_400x400.jpg",ref_id:"25ce4b90-6689-4dd9-84b6-240c7bcbe407",twitter_handle:"MrlamilamiKosch"},{name:"~₿ Maxi~",profile_picture:"https://pbs.twimg.com/profile_images/1446241859651637250/i67F3y9p_400x400.jpg",ref_id:"ad997ae7-0726-431a-9f72-82da091c0658",twitter_handle:"fede0891"},{name:"TK☣️Ph.Ple₿",profile_picture:"https://pbs.twimg.com/profile_images/1505791887415730177/d0YDQ3Xc_400x400.jpg",ref_id:"9e3ffa2c-9410-48e9-a726-8312c0abcd7c",twitter_handle:"ToxiKat27"},{name:"FireBurs†s",profile_picture:"https://pbs.twimg.com/profile_images/1517827165198458880/N79Wpx85_400x400.jpg",ref_id:"cda1d3ad-dd80-458b-a5fb-a28861df10a7",twitter_handle:"FireBursts"},{name:"Nikolai Tjongarero",profile_picture:"https://pbs.twimg.com/profile_images/1578458155964682274/_SzDxkAJ_400x400.jpg",ref_id:"821ee040-2267-454e-a59a-92da51568afa",twitter_handle:"BitcoinNaijaShw"},{name:"ブランドン",profile_picture:"https://pbs.twimg.com/profile_images/834861311762649090/N0KAP4zH_400x400.jpg",ref_id:"3d41531d-6a59-4771-81f9-0924b4c02561",twitter_handle:"blario"}],hosts:[{name:"Satoshi’s Journal",profile_picture:"https://pbs.twimg.com/profile_images/1598641632601047042/qrZMP5Oy_400x400.jpg",ref_id:"d977ed11-09b0-4143-828d-582ecb8b58ca",twitter_handle:"SatoshisJournal"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/9b2e17f2-71c5-4f1e-a3e7-720d06dab810.jpg",keyword:!0,link:"https://stakwork-uploads.s3.amazonaws.com/uploads/customers/2707/media_to_local/94a86a32-91c2-4717-b5cb-b36cef925776/38decc02-c922-4c1d-a605-7cd54c91a01d.mp3",node_type:"clip",pub_key:"03c18d0c6c35333f22bc524e21a5fd1d2d9886f5d4d958dc1de95d025de5c84cfc",ref_id:"1984e7b9-23f1-4ef0-8fcb-deac4ef23cc7",show_title:"Satoshi’s Journal",text:"Yeah, and that's one of the tools we're working at Satoshi Journalist. We've always paid our writers in Satoshi's, but once these QR codes become static through both twelve, we'll have the ability for all content creators to be have their associated lighting address prominently displayed next to their profile. And people want to tip them. They can be tipped. I mean, that's what basically the future is going to be. And of course Twitter is going to do the same thing. I listened to a long interview with Elon Musk when he acquired Twitter and he mentioned that he's going to allow content creators to be paid. And so I bet you he'll probably integrate the Volt twelve static QR code in such a manner where all content creators will have their respective QR code. And if they have good content, then you can send them tips, or if they don't, then you don't send them tips. And then what Olu said, it's going to catch fire because as soon as Mastercard and Visa are undermined by the fact that people can simply send Satoshis to other people instantly and basically for free via a static QR code, you don't need to freaking swipe cards no more. You don't need to freaking do all this stupid legacy system, fiat minded crap. You just get the QR code, have it into perpetuity as long as you want it, and boom, boom, boom. So the implications are huge from a game theory standpoint, although it might not happen right away if Visa and Mastercard aren't watching their back, so to speak, they're going to be like Blockbuster. And then you have a block stream, of course, is working on it. Another interesting angle is just imagine all these card issues, right? They integrate with Lightning because they want to catch up with technology. Don't forget, technology is always ahead of regulation. Regulation will have to catch up to technology. And these other companies that would actually make interoperability with Lightning even more accessible and easy with what they already have in their system, will be the one to accelerate this adoption. But this is how the game theory may even play out more interestingly, once they integrate with both twelve, because of the technology and the potential risk to them not integrating with it, they begin to see more adoption, right? And usually they are used to texting their people, their users. They have so much user base, they have so much merchants, so they just apply a little more fees. That's how to generate revenue on the cards. And now they've given many financial institutions the opportunity to print their own cards, right? So you go to the bank, the bank prints instant card for you. You just take the card and you start swiping once you leave the banking off. Or you just go to the nearest ATM, even, right at the banking.org, and you start swiping. That's my diamond. My daughter, she's just purchasing. My point, she's a bitcoin, a little bitcoin. And the card issuers, their competition will start from the people that can just begin an SME and start to create cards that you can spend lightning on. You do not need Mastercard, Visa card integration. That's where the competition will start from. The competition will not be a bigger company. It will be small companies. You can't you see all these bitcoin companies, they're going to come in droves and just small, small companies. SMEs everywhere will now have the ability to make cars that we just QR code you can actually tap and go. I think it's going to be fantastic. If you can use a platform that will charge you ten times lesser than what Mastercard and Visa is charging you right now, you save a lot of money in one year. And in Nigeria, it will cash fire ease in Africa. It will catch fire ease once people realize, because we are the experiment for the west, for Swift, for Mastercard, for Visa. Go and check their database. Africa is where the number is. Nigeria is number one. South Africa, Kenya. So the market of many of these companies is in Africa. 1.5 billion people will be 3 billion people in the shop field for 30 years. And you have 500 million people. Internet penetration is already more than 100 million people as we speak. You can access Internet with USA. So it's a fantastic thing to have the opportunity to do. Charitable effort. Just imagine the air drop you can do with lightning, static curl code to the entire nation, and you're not even spending much, but you're on boarding lots of people at once, and you're not curing too much fees. You can't do that on chain. You're going to cure too much crazy fees. I've tried it over and over again. But on Lightning, you're giving it away. You can give out a hundred thousand satoshi to 100,000 people. Wow. And you probably wouldn't have spent nothing with one QR code. And repeatedly you can keep paying it. You can do a minus A toshi. This gonna be fantastic, dude. I mean, more and more you talk about it, I get more and more excited. But one thing that's kind of interesting is once Visa Master become obsolete from Bitcoin and lightning, nevertheless, there'll probably be some iterations of the legacy system around. But once we get to the point where those individuals or sorry, those companies go obsolete, since you're in the payment sector, you know, the answer is this probably better than most is. I mean, for them to make money in the future, they'll probably end up running their own lightning node kind of deal and trying to make money through running transactions to their node because they would provide liquidity to the network and that would be one method by which they could make money. There are going to be other ways, but do you foresee them maybe becoming lightning node operators and taking I mean, I don't know how profitable that is, but what do you think about that? I'm not very active in this area. Portland is working right now, so I don't think he can talk. I would have suggested maybe a king can take this part, but I think it's very technical. I may be able to say some terrible part of it. Like I've already said, it's just going to be interesting when I talk, but people may not be able to see it insightfully from the length of somebody who puts together the code and understand how the pipe is supposed to look. I feel that the decentralization of nodes in general will create pipes of money. Our partner used the word pipe the other day when we're having a conversation and I could get it instantly because that was a very glaring example. So the bigger the pipe, the bigger the transactions I can pass through that pipe. I think it would be more interesting here because bitcoin is already everything. There will be proof of stake to a level, but it cannot have power over proof of work. It's just going to be proof of stake basically in the area of, oh, I got a bigger pipe, so bigger transactions come my way. And you can't query that because you don't have that. You know how I mean? I think people will run lightning nodes, but you're going to still have to have enough bitcoin to be able to do that. If you don't, then your transaction capacity will not be as much. Banks will run nodes, community microfinances will run notes. I mean, I think this is going to basically change regulation general, because it's an opportunity for revenue generation for the government. If I look at it from a public private partnership perspective, what I see is many opportunities for taxation for the government. So if the government is wise, you can't you shouldn't bitcoin it gets on now the quicker you can start to accumulate SATS and maybe some bitcoin in some very rare cases, you give people international money transfer patrol license to do legitimate bitcoin transaction in your country. You know how I mean? Because whether you give them or not, it's already happening. It's under your radar, but you can't stop it. Why don't you allow people run nodes? Why don't you expand that economy in general so you can see it, let it be transparent, but it's already decentralized. People would do it with or without you. So a lot of people would be able to run a node, but you know, the space needed for that purpose becomes larger. So I don't know, I think it's going to get like five terabytes in some decades and I don't know if it's going to be cheaper to get the necessary tools you need for that or it's going to be more affordable. Depends on how the world is. But in an imagine world, I want to believe that things will get cheaper because bitcoin will price stuff and in fact, once you have some, you can actually confidently spend and acquire what you want even more better than operating on the fiat monetary experience where things are very difficult. Even when you put the proof of work and you don't get to be paid what you deserve, you get cheated and somebody to come and tax you. They come and tax you for the services they don't offer you. So yeah, a lot of people want to know it depends on how cheaper it is in the future or affordable. But I think I kind of answered it to the best of my knowledge, jeremy, if I didn't. Yeah, no problem. Hey. Good morning, Oakland. ",timestamp:"01:42:06-01:53:40",topics:["Bitcoin Payment","Lightning Network Payment"],type:"twitter_space",weight:7.166842460632324},{boost:0,date:null,description:"The sovereign individual's role in Bitcoin and vice versa",episode_title:"Bitcoin Charlotte Book Club - Sovereign Individual Ch 1-7",guests:[{name:"Bolt",profile_picture:"https://pbs.twimg.com/profile_images/1352721439879786496/wfevZ8bG_400x400.jpg",ref_id:"b165e497-f255-4ce5-9762-30c90dcf776d",twitter_handle:"Bitcoin_CLT"},{name:"Victor",profile_picture:"https://pbs.twimg.com/profile_images/1519726025013350400/GHxSzgA3_400x400.jpg",ref_id:"d91fff8d-e4c6-4aeb-9f32-021e4a4ff9a6",twitter_handle:"victorwong"},{name:"George",profile_picture:"https://pbs.twimg.com/profile_images/1173474608856608768/vEBnPUdm_400x400.jpg",ref_id:"5946bdf6-8feb-43aa-b2ca-46b2944b0572",twitter_handle:"GeorgeNotFound"},{name:"Mark",profile_picture:"https://pbs.twimg.com/profile_images/1511102924310544387/j6E29xq6_400x400.jpg",ref_id:"c8cd0c95-c105-41c4-8fae-9dbfa76d84f2",twitter_handle:"markiplier"}],hosts:[{name:"Jacob Parrish",profile_picture:"https://pbs.twimg.com/profile_images/1552345395195412481/bgjme0Jh_400x400.jpg",ref_id:"476161bc-6773-4695-845f-15fe87affd67",twitter_handle:"Jacobp102"},{name:"Liz",profile_picture:"https://pbs.twimg.com/profile_images/1256650517549211648/cHwvj5o9_400x400.jpg",ref_id:"6538f07d-01e3-43c7-9068-55f3ec737d65",twitter_handle:"LIZ_Y2K"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/fe6bdbce-e91d-43cf-ab33-0e98bffabecc.jpg",keyword:!0,link:"https://stakwork-uploads.s3.amazonaws.com/uploads/customers/2707/media_to_local/3a4d250d-90a6-417a-a6b4-0f701bdd9e2e/daa90ea7-aa7e-41f5-9fec-7e513ca75667.mp3",node_type:"clip",pub_key:"02574d6e8e787372184b6f17c40d6c6fe1777db9015801f95dfd24692784d767cd",ref_id:"5efbc2c3-e67a-4b16-9c9d-285bdd37e906",show_title:"Bitcoin Charlotte",text:"One of the things that I thought was really cool, which I never thought about with Bitcoin, this kind of goes into violence as well as he or she will even be able to act after death. For the first time, an individual will be capable of carrying on elaborate tasks even if he is biologically dead. It will no longer be possible for either an enemy at war or criminal to completely extinguish the capability of an individual to retaliate by killing him. This is one of the more revolutionary innovations in the logic of violence in the whole history. And so that really gets you to start thinking, what if someone came to get your money and you go, don't kill me, because if you kill me, I have money that will be paid to other people to come find you or your family. That would be pretty scary. Would you come after me then? Let's see. I'm not the best to have in dialogue with myself, so I'm going to just keep on looking around. So I got to page around a page 186, I think. So I had about 40 pages left to reach the desired area, which goes to the chapter eight, which starts with the end of egalitarian economics. But yeah, I think the book really starts to just get exciting for me. So I'm excited to move forward at this point, but it is a tricky one to get through if you're not an avid reader. But I'm getting better at it. Trying to think of some other really good points that I liked about this book. Unions. That was the word I was thinking of before. Unions were a really interesting topic in this book, and I want to find these quotes on some of it that were really cool. But the working so the idea with unions in this was they could use violence to get what they wanted. And that's one of the big turning points, too. It doesn't make much sense for unions to form anymore because companies do not have to be in a central location where they have all this manufacturing going on, and there's a lot of valuable stuff there that they know how to use. The worker simply sees the factories and ransom them back to the owners. The tactic of great simplicity, and one that in most cases, was profitable and fun for those participating. One sit down striker wrote, I'm having a great time. Something new, something different. Lots of grub and music. Maybe someone requested we got bro. So I was listening to the prior unions today, and so they were saying that those don't really exist anymore. Correct, because when I was working my government job, I was part of a union, really, and people would definitely abuse it. You could say something happened, and then the union would come and support you, basically, and you would kind of get whatever you wanted. How did the union have their power? What do you mean? How are they able to demand things? Well, you had someone from the union come and support you if you said this was like this one lady I worked with. She said she was getting harassed at work in our signal shop. So then the union came and like, an attorney, almost like it was an attorney, but someone had the union to take it her side of the story. And then it was kind of funny because we were all in the union. So then they had to get all of our other sides of the story, but they had to support us, too, like any people she was complaining about. I got you. Where was the union from? It was a union. You work for the DLP. I should know that, but I don't remember that's. Okay. How's it been going? Oh, we're just kind of monologuing over here, and I can't remember much of the book. How about you? How's it going? It's all right. Just cooking some steaks and pizza. The union is UFCW local 1994 Montgomery County Employee Union. That is a voice for working America. I'm not familiar. Mark, did the sovereign individual talk about unions? Yeah, quite a bit. We're talking about how violence, the use of violence or union is basically saying, hey, we're not working and we can also run the factory. We run the factory, we know how to do it, and they can hold the factory hostage. But that's basically dying away because things are getting more decentralized with the information age. Right, that makes sense. I listened to the book, actually, and I did it a while ago. I don't exactly what you guys discussed. I found it to be really good. I definitely didn't capture near as much of it as you do when you read it because you get through it a lot faster. The time you're committing to the book is a lot less. But yeah, it's so much to tackle. I mean, you could have long conversations about any small parts if you really dive deep into them. So I don't know if there's any particular subject you guys are talking about, but we have many people in here. But if there's anything interesting anybody wants to talk about. ",timestamp:"00:21:00-00:27:56",topics:["Sovereign individual's role"],type:"twitter_space",weight:7.131711006164551},{boost:0,date:1671720944,description:"@mattyicesensei and @johnmichaeldrew's opinions on Web3",episode_title:"Café ₿: #Bitcoin News & Bitcoin Day w/ @Bitcoindayio",guests:[{name:"@johnmichaeldrew",profile_picture:"https://pbs.twimg.com/profile_images/1512897699942744064/PuRU3K8P_400x400.jpg",ref_id:"6b72ee7f-52ef-4847-96ed-78ea09e3f19b",twitter_handle:"johnmichaeldrew"},{name:"@mattyicesensei",profile_picture:"https://pbs.twimg.com/profile_images/1607138483579101186/0qm0xaCF_400x400.jpg",ref_id:"286abd3b-cecc-4ec5-bf88-2a9fd5393083",twitter_handle:"mattyicesensei"},{name:"@Bitcoindayio",profile_picture:"https://pbs.twimg.com/profile_images/1493098733608837121/tLI-XTwl_400x400.jpg",ref_id:"6a87699e-7a27-4928-89e8-d884f1458bf9",twitter_handle:"Bitcoindayio"}],hosts:[{name:"@alexstanczyk",profile_picture:"https://pbs.twimg.com/profile_images/1539055022364708864/rwErK6x1_400x400.jpg",ref_id:"6455df34-1abc-4ce8-9bb8-b02d411accec",twitter_handle:"alexstanczyk"},{name:"@SwanBitcoin",profile_picture:"https://pbs.twimg.com/profile_images/1491428856858914820/aFlitvha_400x400.jpg",ref_id:"da3f56bf-9763-4389-a9ec-d807049bd0b8",twitter_handle:"SwanBitcoin"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/239722cb-4216-414a-a17b-5adf9d52e15a.jpg",keyword:!0,link:"https://stakwork-uploads.s3.amazonaws.com/uploads/customers/2707/media_to_local/83744e68-b563-4004-b52a-cfdfff89748f/12c9b9f2-fbce-4784-9404-88a574baa762.mp3",node_type:"clip",pub_key:"",ref_id:"f80dd079-1a9d-4bda-b8dd-81c05d203533",show_title:"Swan.com",text:"Thank you, John. Maddie, I was just wondering, I'm just kind of looking through your stuff, recent stuff. Can you tell me your opinions on web three and products like step in, for example, and just where are you on ethereum? Where are you on crypto? Bitcoin? What do you think about web three in its future? This can be for either of you, actually. Alex, are you going to allow that on this? I was going to ask him. Maddie's very knowledgeable. Maddie's knowledgeable. I'm sure he can answer. But you want us to answer that, Alex? Yeah, we do this thing called the crucible on this show sometimes where sometimes there's hard questions. So I don't mind. Go ahead. Sure. Let me take it from here then. Me personally, I use different platforms, different things. I like to gamble. I like to do different things. So where I'm at with web three, I'm fully bullish web three, I'm fully bullish bitcoin. Bitcoin is my savings. It's where I store most of my wealth. When I like to gamble, I use stuff on ethereum. I play different metaverse games. I do all sorts of stuff. So for me, there's a use case, there's a value there. It's not anywhere near the same value as bitcoin. But, yeah, I have fun with all sorts of stuff. I like to gamble. I like to go to the casino. I like to do all sorts of stuff. So with a small portion of my wealth, I gamble and do that kind of stuff. Does that answer your question? When you say gamble, do you mean literally gaming, or are you talking about purchasing shit coins and then gambling on return? Oh, all of the above. So quite literally, I go, like, for example, if you use a theorem, if you've ever heard of the metaverse, if you go into, say you go into central land, you can literally go to a casino into central land and gamble. So I like to do stuff like that. There's all sorts of different things you can do gamble for returns. But for the most of my wealth, I'm just dollar cost. Averaging and stacking stats, but there's a lot of different fun things you can do out there. Most of it, probably 90% of all of it is scams, ponzi schemes, all sorts of different stuff. But there's definitely things that I find value and personally, aside from bitcoin, although I just think they're different things. Right. You don't store all your wealth and Bakarat casino chips, but you might like to go play and gamble and do different things. So that's the way I like to look at it, if that makes sense. ",timestamp:"01:56:23-01:59:20",topics:["Web3"],type:"twitter_space",weight:16.6951974581924},{boost:0,date:1667347200,description:"The business model of Amboss",episode_title:"Meet the Makers: Anthony & Dolu",guests:[{name:"Anthony Potdevin",profile_picture:"https://pbs.twimg.com/profile_images/1252630766909079555/qf-qI5EZ_400x400.jpg",ref_id:"da0a9fdc-eda1-4e07-8341-2100428065d1",twitter_handle:"thunderhubio"},{name:"Dolu Zerologin",profile_picture:"https://pbs.twimg.com/profile_images/1577320325158682626/igGerO9A_400x400.jpg",ref_id:"4c228a2d-4f9c-4bbd-bf49-d2be3159c6a4",twitter_handle:"Dolu_Web"}],hosts:[{name:"Zapp Ed",profile_picture:"https://pbs.twimg.com/profile_images/1519990234070540288/adGqlFoj_400x400.jpg",ref_id:"bbe7cf1d-cd8d-4d36-926d-76f41b775fbb",twitter_handle:"zapp_ed"},{name:"Moritz",profile_picture:"https://pbs.twimg.com/profile_images/1452933125743460360/5xkRoFj7_400x400.jpg",ref_id:"e23e282d-82b3-4c9d-859c-c1c7f41eef84",twitter_handle:"getAlby"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/965489b4-a414-4fd0-ab8c-55911b1596aa.jpg",keyword:!0,link:"https://www.youtube.com/watch?v=wiIzexAc2gs",node_type:"clip",pub_key:"02574d6e8e787372184b6f17c40d6c6fe1777db9015801f95dfd24692784d767cd",ref_id:"7ef24d02-66fe-4872-b1f1-ea144bfcaf5c",show_title:"BOLT FUN",text:"model of Ambulance today? Yeah, so this is a very interesting point because a lot of feedback that we get is like you're in this growth phase, don't charge anything. Just try to get as much users as possible. And while I think it is in a way correct, like we should be looking to get as much users and as much feedback as possible for our products having a price for the different products, which at this point the price is very minimal. The space is very small. Like the lightning. Space is very small. And what we charge for our product is also very small. So overall revenue still is very small. So it's more of like a symbolic thing. But what it helps us is see where there is interest or where there is value that people are willing to pay for some services, right? For example, if we were to do a magma our marketplace and have everything free. We wouldn't really know if people are using it because it's useful to them or just because it's free. People love free stuff. If it's free, they will use it even if they don't really need it. If you see enlightening with rebalancing, people rebalance all the time and if it costs them almost nothing, then they just do it because they want to, not really, because it could be something that is useful to them. Right? So adding this price point on top does help us see like, okay, there's interest from the community to further expand this service. They do see value in it. Let's maybe put more focus towards that part. And in terms of business model right now for us, we have ads on our home page. We focus on Bitcoin and Lightning ads and then we have subscriptions that you get some additional perks you can personalize further your node page you can add like a node and then for the more analytics interested people there is time series that they can access like further get further insights into what is happening around nodes or around the Lightning space. In general, for us, it's really about experimenting. So we're trying out all these different revenue models, like figuring out where people see value, where they're willing to give us some stats to improve their experience or have something nicer or more data or something that gets improved for them. Yeah, thanks a lot for sharing this. I think it's very, very encouraging also for new developers in this space to learn from you. And I think people should take the time to experiment and learn as much as possible. And I'm also curious to learn from you Dulo, what experiments or what experience also led to the most recent project zero lock in. Can you share some history on that? ",timestamp:"00:16:35-00:19:57",topics:["Amboss","Lightning ads"],type:"youtube",weight:7.334451631469231},{boost:0,date:null,description:"Bitcoin News for December 20th, 2022",episode_title:"The Orange Sun 🌞 Interview with Nzonda Fotsing Sr. #Bitcoin",guests:[{name:"TK☣️Ph.Ple₿",profile_picture:"https://pbs.twimg.com/profile_images/1505791887415730177/d0YDQ3Xc_400x400.jpg",ref_id:"9e3ffa2c-9410-48e9-a726-8312c0abcd7c",twitter_handle:"ToxiKat27"},{name:"Funsho Jimoh",profile_picture:"https://pbs.twimg.com/profile_images/1600143435775856641/uqgmtT23_400x400.jpg",ref_id:"a237ffb0-792b-484e-b12f-65a2b679eaf1",twitter_handle:"fnicencool"},{name:"Heritage Falodun",profile_picture:"https://pbs.twimg.com/profile_images/1510397558652350469/jYOl00tU_400x400.jpg",ref_id:"b2bcc65a-b060-4dbe-b9ac-a7d64a11d2ac",twitter_handle:"herrytheeagle"},{name:"Nzonda Fotsing Sr",profile_picture:"https://pbs.twimg.com/profile_images/1458565804291670016/XaLi8e6a_400x400.jpg",ref_id:"53fe4486-5ef3-4988-8ada-47c3cb1c2d51",twitter_handle:"BitcoinSophist"},{name:"ROB",profile_picture:"https://pbs.twimg.com/profile_images/1605484577669074946/CkYjFUxH_400x400.jpg",ref_id:"25c5f080-fd07-4b37-9014-7fc05419edce",twitter_handle:"robertlamonta15"}],hosts:[{name:"Satoshi’s Journal",profile_picture:"https://pbs.twimg.com/profile_images/1598641632601047042/qrZMP5Oy_400x400.jpg",ref_id:"d977ed11-09b0-4143-828d-582ecb8b58ca",twitter_handle:"SatoshisJournal"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/9b2e17f2-71c5-4f1e-a3e7-720d06dab810.jpg",keyword:!0,link:"https://stakwork-uploads.s3.amazonaws.com/uploads/customers/2707/media_to_local/e4a700c7-f311-4270-be71-e2783252be6c/d4cb7ccf-f7e8-4071-a74b-943cc09fd967.mp3",node_type:"clip",pub_key:"03c18d0c6c35333f22bc524e21a5fd1d2d9886f5d4d958dc1de95d025de5c84cfc",ref_id:"ed128fbb-3ad8-4d26-921c-495edfda3cbd",show_title:"Satoshi’s Journal",text:"So as soon as she comes up, I will put the focus and landlight on him. But the first thing I have in the nest is I try to let you up top. Tiki. I'm not sure what happened. I'll send you an invite. So, bitcoin sapiens, he's been on a roll these last few weeks. You could tell he's taking some time to think out some really good quotes. And this quote he says, I think I'm here. Yeah. Okay, I'm up. Hey, what's up, tk? Yeah, it's showing on my end. Like, you know how it gets louder when you come to speaker? It got louder. So I assumed that I bumped up to speaker, but then I look and I'm still listening and I have mike. I'm like, what the heck? That was weird. Yeah, I don't know. That is weird. I'm going to share the nest or share the space now. Okay. So bitcoin sapien says, a common misconception is thinking bitcoin is the first iteration of a new tech, when in truth, bitcoin is the final iteration of a dream that took decades to achieve and includes the hard work of incredibly smart people from all around the world. And that's a very good point to make because a lot of people think that bitcoin was the first cryptocurrency and it was the first iteration of an innovation. But bitcoin came upon the hard work of many cryptographers, engineers, scientists, mathematicians, just people in general trying to study how to get a digital money that was totally out of the hands of government. And so up until bitcoin, many people tried many different things. And finally, satoshi nakamoto was able to put together an iteration of all the things that had been done before him or her or them and come up with bitcoin. So I like that quote from bitcoin sapiens. It's a good one. The next thing I have up here was another quote, this one by Jeff Booth. He says, trying to measure a non linear system. The economy, like a linear system, ensures you miss small changes in conditions that lead to critical states, which also means that you might dramatically underestimate the risk. Of said system bitcoin. Yeah, I think a lot of people try to think that economy is a linear system. And they use these linear metrics to try to measure a system that you can't measure on a linear basis. One thing like the CPI, we all know that's also known as the CPI, the Consumer Price Index, is a basket of weighted goods and services that people, that the economists use as a means to try to gauge what inflation is. But that's their linear way of trying to measure something that's not linear. And that's just one metric of many that economists try to use to measure an economy. I mean, it's almost like it's using the wrong tool, basically. If you have a system that has so many variables and it's really what it comes down to. It's such a complex system. How do you measure such a complex system? How do you try to think just in your human body right now? How do you measure all of the complexities that are happening in your body? How are you to measure every freaking neuron that's going in your head right now? Just back and forth, back and forth, exploding, firing off information, the blood going through your veins? How do you measure that? The pumping of your heart, the treble of your voice? You can't measure the human body with linear metrics. The human body is a complex organism. And I implore anybody to try to measure the human body using a linear metric. So that's basically what Jeff Booth is saying. The economy is a living organism that has so many variables, and if you're trying to measure it with a linear system, then you're going to miss a lot of he says, small changes and conditions. I'm thinking you miss big changes. Anyways, that was a cool quote. I liked it. The next thing I got up here is, ",timestamp:"00:05:39-00:11:10",topics:["Bitcoin News"],type:"twitter_space",weight:6.58552348613739},{boost:0,date:null,description:"Interesting predictions from the Sovereign Individual",episode_title:"Bitcoin Charlotte Book Club - Sovereign Individual Ch 1-7",guests:[{name:"Bolt",profile_picture:"https://pbs.twimg.com/profile_images/1352721439879786496/wfevZ8bG_400x400.jpg",ref_id:"b165e497-f255-4ce5-9762-30c90dcf776d",twitter_handle:"Bitcoin_CLT"},{name:"Victor",profile_picture:"https://pbs.twimg.com/profile_images/1519726025013350400/GHxSzgA3_400x400.jpg",ref_id:"d91fff8d-e4c6-4aeb-9f32-021e4a4ff9a6",twitter_handle:"victorwong"},{name:"George",profile_picture:"https://pbs.twimg.com/profile_images/1173474608856608768/vEBnPUdm_400x400.jpg",ref_id:"5946bdf6-8feb-43aa-b2ca-46b2944b0572",twitter_handle:"GeorgeNotFound"},{name:"Mark",profile_picture:"https://pbs.twimg.com/profile_images/1511102924310544387/j6E29xq6_400x400.jpg",ref_id:"c8cd0c95-c105-41c4-8fae-9dbfa76d84f2",twitter_handle:"markiplier"}],hosts:[{name:"Jacob Parrish",profile_picture:"https://pbs.twimg.com/profile_images/1552345395195412481/bgjme0Jh_400x400.jpg",ref_id:"476161bc-6773-4695-845f-15fe87affd67",twitter_handle:"Jacobp102"},{name:"Liz",profile_picture:"https://pbs.twimg.com/profile_images/1256650517549211648/cHwvj5o9_400x400.jpg",ref_id:"6538f07d-01e3-43c7-9068-55f3ec737d65",twitter_handle:"LIZ_Y2K"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/fe6bdbce-e91d-43cf-ab33-0e98bffabecc.jpg",keyword:!0,link:"https://stakwork-uploads.s3.amazonaws.com/uploads/customers/2707/media_to_local/3a4d250d-90a6-417a-a6b4-0f701bdd9e2e/daa90ea7-aa7e-41f5-9fec-7e513ca75667.mp3",node_type:"clip",pub_key:"02574d6e8e787372184b6f17c40d6c6fe1777db9015801f95dfd24692784d767cd",ref_id:"1ba72c1d-ff22-4572-ad24-8171bfce9de3",show_title:"Bitcoin Charlotte",text:"I guess that is hard for me to get through. But when they talk about what they predicted happened in 2000, I mean, they weren't right on that, correct? Yeah, I think the reality of that is there were some really interesting predictions that were right or close to right. There's plenty of things that weren't right, but anytime you're predicting the future, if you're right at all, it's usually pretty impressive, especially with the way technology is and how things change, it's hard to predict about anything. So I think they made some pretty bold claims that were shown to be pretty true. And I think that's what people get attracted to when you kind of look back on it and say, wow, they're actually right on some of these things, whether it's digital currency or they even reference pandemic and how the state will control people. And there's just so much overlap with the reality we're living through. I definitely find that stuff interesting. I already knew all that stuff before I read it, though, because I've been talking about so much on podcast and things. You're just so smart, bro. Well, a lot of people talk about especially Robert Breedlove. He references the sovereign individual a lot, so if you're listening to his podcast, you're going to know a lot of that stuff. These authors take in a ton of information and I do kind of like how they seem to make the best logical conclusion from the information. There's bias here, of course, but they really analyze all these things. They take in a lot of different authors and they look at what they wrote and what they think is wrong about what other authors wrote and they cite all those things and kind of go through that and a journey with all this. And it is I do like that part of it. It just seems like it takes quite a while to get through some of those points. But mark so what we started with was the gist that I got from this book was those in control of violence. Where violence is incentivized is basically how you can predict what's going to happen in the future and who's going to be in control. Whoever has the best leverage on violence. So they're reading part of the book. They're talking about the state didn't have any really control because there were nights. And the nights because of some of the metal workers and stuff, made certain improvements to the horses and forget about the stirrups and something else to make them just badass soldiers. And one night can take out like 20 guys or something. And so if you had a group of that, you can basically go in, pillage and go anywhere you wanted and do what you wanted and no one else could stop you, not even a state. But they kind of lead you through that, through all those things. And I was wondering if you got that from listening it from it, if it was like they seem to be the theme. The people control it. I'm saying that monopoly on force or something like that. Yeah, I think are you talking about just how technology brings a lot of it continues to show that that monopoly gets weakened and the power to individuals get strengthened. It can go both ways because technology can be used in either direction. I know they talk about that quite a bit. I guess I'm talking about the incentive for violence. So before agriculture, there was all these groups and every day they had to go out and find food and bring it home. They're very busy dealing with that and they couldn't store food for that long. So the incentive to go and take out some other village wasn't that great because they didn't have a lot of stuff and they had to keep themselves alive anyway. So once agriculture wasn't developed, all of a sudden a lot of wealth started to become available, which then made it so there was something to steal. So then you could go then it made sense. Oh, if I become a violent person here, I can get a lot of riches or a lot of food or a lot of whatever. That kind of leads all the way into the nation state to where we're at now, where violence can be incentivized because you can actually take over a lot of stuff. That's what I'm getting at. Which leads to Bitcoin, where we talk about this a lot, where storing your money the proper way with Bitcoin, with cold storage or multisig makes the incentive for someone to come steal it very small because you got to go through so many hoops to make that actually happen. Yeah, I 100% agree with you. The incentives in a fiat based system and basically throughout all of history, except for a few periods of time when gold worked pretty well, of course you could still steal it and you could confiscate it, but at a different time with different ways of doing, forcing people to give things up and stuff. You could secure something physical like that pretty good and that provided people some way to store value and protect their property rights, really, and their wealth. But it obviously has major issues and failures, just the physical realm. And then bitcoin solves that by creating an uncomplicated property. And it seems that they definitely dialed into that some in the sovereign individual that will be a natural evolution of humanity because they've recognized this problem with the incentives, which is basically what you were saying. It's inevitable that those things are going to happen because humans were incentivized to gain that power and to control people either through what they thought was best for the people morally or immorally and then eventually they would abuse that power and that brought us to where we are. I think that makes a lot of sense. I think another thing where they just use their philosophy and all their research and hard work to really dial into some things that are really important that a lot of people don't understand on just human nature. ",timestamp:"00:27:58-00:34:52",topics:["The Sovereign Individual predictions"],type:"twitter_space",weight:6.520025253295898},{boost:0,date:1647576e3,description:"Introduction - How [[Bitcoin UASF]] went down, [[taproot]] lot=true, speedy trial, [[small blocks]]",episode_title:"How Bitcoin UASF went down taproot lot true speedy trial small blocks",guests:[{name:"Luke Dashjr",profile_picture:"",ref_id:"c3b2367f-2863-421b-8b2c-c093423f0eaa",twitter_handle:""}],hosts:[],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/b79a3eb8-bcd0-4338-b979-d32aef360785.jpg",keyword:!1,link:"https://www.youtube.com/watch?v=rspXF6Gp3-g",node_type:"clip",pub_key:"",ref_id:"b1eabcd8-8d00-4950-b264-f4f2741ca3a7",show_title:"Stephan Livera Podcast",text:"",timestamp:"00:00:00-00:03:40",topics:["bitcoin uasf","taproot","small blocks"],type:"youtube",weight:6.440371671951619},{boost:0,date:1647576e3,description:"[[Small blocks]]",episode_title:"How Bitcoin UASF went down taproot lot true speedy trial small blocks",guests:[{name:"Luke Dashjr",profile_picture:"",ref_id:"c3b2367f-2863-421b-8b2c-c093423f0eaa",twitter_handle:""}],hosts:[],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/b79a3eb8-bcd0-4338-b979-d32aef360785.jpg",keyword:!1,link:"https://www.youtube.com/watch?v=rspXF6Gp3-g",node_type:"clip",pub_key:"",ref_id:"a61c7685-556b-4886-8908-fd0ead4dc1f2",show_title:"Stephan Livera Podcast",text:"",timestamp:"00:43:55-00:00:00",topics:["small blocks"],type:"youtube",weight:6.440371671951619},{boost:0,date:null,description:"Cory Klippsten and John Ely's words on the Bold Bitcoin credit card and Bitcoin space",episode_title:"Café ₿: Bitcoin Credit Card w/ @BoldBitcoin @John_ely_21m",guests:[{name:"Cory Klippsten",profile_picture:"https://pbs.twimg.com/profile_images/1569687200857755648/fxiCeaqc_400x400.jpg",ref_id:"ddfb9b4c-4e6a-4f4c-a01b-e6bb1bc55464",twitter_handle:"coryklippsten"},{name:"Greg Foss",profile_picture:"https://pbs.twimg.com/profile_images/1552599670945464320/3OgqRHNo_400x400.jpg",ref_id:"853d9f80-f6cf-490f-9d1e-f29cdc6acc6f",twitter_handle:"FossGregfoss"},{name:"Wicked",profile_picture:"",ref_id:"fee44016-b05f-4961-a6d8-7dac655cd931",twitter_handle:""},{name:"@BoldBitcoin",profile_picture:"https://pbs.twimg.com/profile_images/1559592705231044609/iJrNKxF9_400x400.png",ref_id:"dd4e1c4c-d111-4f01-ad95-18200d50cdb8",twitter_handle:"BoldBitcoin"},{name:"@John_ely_21m",profile_picture:"https://pbs.twimg.com/profile_images/1560444673046585346/VN8n2LtM_400x400.jpg",ref_id:"a24436b1-5992-4711-a4a5-0770546ea80a",twitter_handle:"John_Ely_21m"}],hosts:[{name:"Alex Stanczyk",profile_picture:"https://pbs.twimg.com/profile_images/1539055022364708864/rwErK6x1_400x400.jpg",ref_id:"3126e2a3-bbe4-456b-b298-9714085fa286",twitter_handle:"alexstanczyk"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/239722cb-4216-414a-a17b-5adf9d52e15a.jpg",keyword:!0,link:"https://stakwork-uploads.s3.amazonaws.com/uploads/customers/2707/media_to_local/7061be6d-b144-4a81-a13b-3d125e3e2812/edf29ab4-2b4b-4fdf-9998-8a9b8e9437c8.mp3",node_type:"clip",pub_key:"02574d6e8e787372184b6f17c40d6c6fe1777db9015801f95dfd24692784d767cd",ref_id:"7fea625e-c79b-402b-bce5-66e4e97d9598",show_title:"Swan.com",text:"going to give you a couple of moments to make some closing comments, but before we do that, I want to welcome up Corey Clips and CEO Swan Bitcoin. Corey, do you have something you want to add? Absolutely, yeah. I just wanted to just give the backstory of how we connected with Bold in the first place. I think it'll be kind of fun for people to hear. I don't know if John even knows the story from Zach, but from like November through February of this year, so this was probably three or four months, we were deeply exploring, mostly me and Jeremy show. Walter had a product who was new to the company. We were really exploring whether to launch a Swan card and what that might look like and what we can do. And we were talking to all the providers and the program managers and digging the interchange fees and all this kind of stuff and basically netted out saying, that's a whole company. It's just way too complicated to do just with, like, a small team inside of a small but growing company like Swan. And so basically it was kind of wanting to kill it, but was still keeping the consideration open. And then I think Zach just reached out and I was like, oh, yeah, that's it. You need a team that's just doing this literally every day. And I'd rather partner with these guys in the future or something like that, but just see a team just go hard after that specific problem and nail it. So then we invested out of both Bitcoin or Ventures and Elzonte Capital and obviously have been rolling out the red carpet for them at our events and things like that. So really psyched to have you guys in the space. And this was illuminating the parts I heard and want to thank you for coming and sharing. That's awesome. Thank you, Corey. Yeah, it was great meeting you in La. You know how to throw a good party. A great party. I'll be there for the festival next year for sure. That's awesome. Just to wrap up. I know Alex wants me to wrap up. So appreciative you guys having me. We're excited at Bold to launch in the US next year. We're an amazing team of bitcoiners building an innovative product to help other bitcoiners and also to attract precoiners to make the Bold move to live on a bitcoin standard. You can follow us at bold bitcoin on Twitter. You can take the 30 seconds to go to get Bold IO to sign up for our waitlist. We certainly got some fun things in store for you. Before we launch, we'll be giving you a few ways to earn some stats and have some fun. And thanks again. My DMs are open. Love to hear what you guys all think. Awesome. John, thanks so much for being here. Very excited about what you guys are doing. I wish you the best. Hope it works out great. We'll probably have you back from time to time, check out where your progress is at and how things are going. Go ahead, Corey. So, I don't know if anybody switched over for a minute, but I just went and toured into the CoinDesk space doing their rundown of the top 40 most influential people in crypto for 2022. And they let me up on stage, and you'll probably hear about it on Twitter later today. That was pretty fun. Oh, God. Here's Tom. Tory. I honestly was really trying to pull punches and not be mean. I mean, these reporters hosting a space about this, they have no idea, but it's like you had literally zero bitcoiners out of 40. The only person that writes about bitcoin that got honored was Nick Carter, and he was honored for attacking toxic bitcoin maximus, and that's why he made the list. So, yeah, it's pretty funny, I bet. I hope it's recorded okay. I think it was recorded, yeah. So it would be toward the end, probably 15 minutes before the end of their space or before, whatever, 09:00 a.m. Pacific was, I think a space spun up already right now talking about it. So I'm going to see if I can find that good stuff. ",timestamp:"02:03:53-02:08:08",topics:["Cory Klippsten","John Ely","Bold Bitcoin credit card"],type:"twitter_space",weight:6.436822414398193},{boost:0,date:1587380431,description:"The availability of foods and other supplies during the covid 19 pandemic",episode_title:"Life in Interesting Times - Part 1",guests:[{name:"Matt Murray",profile_picture:"https://pbs.twimg.com/profile_images/1273726156236140544/SJjI1WD7_400x400.jpg",ref_id:"72ce0a76-8593-4898-9369-f39b4bc3d2d3",twitter_handle:"MattMurray28"},{name:"Louise Reynolds",profile_picture:"https://pbs.twimg.com/profile_images/602592582754050048/RbAMd-Re_400x400.jpg",ref_id:"b4c2b12b-96a1-4d37-ae74-5be0883f3091",twitter_handle:"reynoldslouise"},{name:"Jon Slaughter",profile_picture:"https://pbs.twimg.com/profile_images/1336713360/samantha_test_090_400x400.jpg",ref_id:"a295820c-0098-433a-8cc3-cc13085b85c8",twitter_handle:"jonslaughtermd"}],hosts:[{name:"Kim Howerton",profile_picture:"https://pbs.twimg.com/profile_images/858822375457964032/Of4fbmsT_400x400.jpg",ref_id:"49ab70ff-a8e5-4e0f-855a-49abe8a5b645",twitter_handle:"theketonist"},{name:"Daisy Brackenhall ",profile_picture:"https://pbs.twimg.com/profile_images/858822375457964032/Of4fbmsT_400x400.jpg",ref_id:"d68ff5aa-c521-4199-9a6d-bf2cf077ccaa",twitter_handle:"theketonist"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/a8e3517b-b44d-4270-adaa-57587896b1e7.jpg",keyword:!0,link:"https://traffic.libsyn.com/secure/ketolifesupport/ketolifesupport-0031-life-in-interesting-times_tc.mp3?dest-id=2479037",node_type:"clip",pub_key:"032318b5d36e680f7ce77f01e1e5e848da79bbd8c86018513c77b32a869e080e90",ref_id:"51ef662a-201f-4c3c-b60d-bbc627c74e8e",show_title:"Keto Life Support",text:"You've got a huge apartment. We can see it. We're looking at each other on Zoom. Kim, you have a very small apartment. Don't you have a partner that you have to share it with all the time? How's that going? Yeah, it's very small here and we don't have really any outdoor space, which is kind of a bummer. And, like, it's in some ways awesome. We're getting along super well and everything's really, like, great. And at the same time, like, there's no space. So working from home is more challenging because you don't want to bother the other person and, like, you know, you're like, talking about this whatever topic and, like, I'm sure they could care less. So I think it's trying to be respectful of more of the ears space than anything else, but everything's, you know, I think there's just a certain amount of surrender that has to happen. This is what is and this is what's going on in terms of what you can and can't do. I mean, I realized all of my hobbies involved shopping, things like that, but in terms of availability here, the first week was rough. In terms of shopping, like, meat was sold out in a lot of stores for when I would go in, but within a couple of days to a week, that seemed to shake out. And now the only thing you can't find here are paper towels and toilet paper. You have to get in line before the store opens to be able to get those but everything else, there's a vegetable. There's like a call Monterey Market. There's a market a block away from me. It's like if you put an incredible farmers market in a building, like they get all the produce from all the local farms and things. It's just a couple of blocks, like a block away from me. And that is like superstar. I shouldn't tell people if you're in the Bay Area. No, it's super stocked and full. But they're only letting like a quarter of the people in that their usual occupancy is. So you have to stand in line outside and you can only go in when somebody comes out. And so that's pretty much what's going on here with the social distinguish thing, is causing things to go at a slightly slower pace, but you just kind of put your earbuds in and listen to some music and just wait in line for an hour and you're fine. And so food seems really well handled here in the Bay Area in terms of being able to access we want we don't have any limits. I don't know how I would do with a family of five to only be able to buy like £2 of meat. You'd have to go to the store like every day, which seems to be kind of counter to what you want to do. I'm trying to limit my trips maybe once a week. So there are no limits. It's very state to state here, though, because I hear from a lot of people, like a lot of clients in their state, they're having a lot of supply issues. But you can get your deliveries. I can't. You can still get Whole Foods and you can still get your Amazon deliveries to you. Yes, but so many people are having so much stuff delivered that everything is booked way out. And so, like, you might place an Instacart or Amazon order and instead of coming in a day or two days or whatever day, whatever the appropriate amount of time, it might be weeks. Instacart is supposed to come the same day, but it's like Instacart is a program. You can shop for groceries and they deliver them. There are other similar programs. It used to be you book it in the morning, you get it in the midday. Now you book it in the morning, you get it four days later. And so they're trying to hire staff to catch that up. I just got a notification that a local Whole Foods is actually closing at 01:00 in the afternoon. So all afternoon they can just do deliveries. And so I think that people are shaking out how to make this work. I think that a lot of it is people hoarding buy more than that they need, which is understandable because no one wants to go out. Kim, if you need toilet paper, I didn't hoard, but buying one pack at one of those box stores will last me an entire year. So I can always send you some. We are fine. Because I actually did get up very early the other day and go to get in line at Target before they opened and it worked and we were fine on toilet paper. The bigger issue was paper towels. Those things hardly. I use a lot of paper towels when I cook because especially with chicken or something, I wash my hands. I use paper towels instead of a dish towel because that way I'm just throwing it away, drying off meat. I use paper towels. I use paper towels a lot. I find this toilet paper thing is weird. I can almost understand the initial rush, but why is it still out of people can't still be I said the same thing. I was like the hoarders have hoarded. What is happening? Well, I actually heard that because nobody's going to work. Exactly. Well, they make those gigantic rolls of single ply garbage toilet paper that are at work, but no one's using that toilet paper. Everybody needs residential size roles and they're not told to make that many. So they've got a shift from making commercial grade toilet paper to residential grade toilet paper and plus the panic buying. So there is a shortage of supply. But human nature it's a weird thing to grasp on to, but I think it's just a control issue. Yeah, I think it's something people can control in an uncontrollable environment. And luckily for me, as I said, I'm not a hoarder, but I do keep meat in the freezer and stuff. So at the end of February, we went to Pipers play. Matt's daughter had a play and we had some friends that came into town and we cooked ribs, baby back ribs and wings before we all went to the play. So the very next day I was going to the box store and I got replacement ribs and replacement wings. And this was just at the start of the spread of the disease as well here in the US. So I had those things in the freezer to begin with and restock them when I use them. Yeah, I think there are a lot of services like butcher box and where you can get meat delivered. And I guess so many people started doing that. They are now have a waitlist. But one of the things that is coming out of this time, in the United States anyway, is a lot of people are getting more interested in their food supply chain. And so in California, I'm in Northern California, but even north of me, about 4 hours up towards Oregon, california is really a big state for anybody that doesn't know. So about 4 hours above me there are a bunch of farms and like one of them is called Five Mary's Farm and they sell direct to the public. They said their number of orders to the public have tripled. So people placing orders to be shipped or to be picked up. And a lot of the restaurant supply farms, a lot of farms just are like connected to a farm to table restaurant. And so with the restaurants closing down, a lot of the restaurants have started supplying to homes. And so, you know, one of the silver linings is I think a lot of people might get a lot more intimately acquainted with where their food comes from, start to form relationships with food producers. And so I'm actually going to do a blog post about it this week where you can find in your area or as close to your area as I know about a local food producer who you can order directly from. Kim ",timestamp:"00:36:39-00:44:02",topics:["Covid 19 pandemic","toilet paper","food supplies"],type:"podcast",weight:6.419591903686523},{boost:0,date:1672772445,description:"Bitcoin mining and malicious attacks",episode_title:"TOXIC HAPPY HOUR! #Bitcoin, Foss, Max Keiser & the Plebs! 🍻😂",guests:[{name:"Greg Foss",profile_picture:"https://pbs.twimg.com/profile_images/1552599670945464320/3OgqRHNo_400x400.jpg",ref_id:"853d9f80-f6cf-490f-9d1e-f29cdc6acc6f",twitter_handle:"FossGregfoss"},{name:"Jeff Ross",profile_picture:"https://pbs.twimg.com/profile_images/1475554600094552064/DSlPG1lx_400x400.jpg",ref_id:"ae6ee2a2-1cf7-41a0-8366-ff6e94a6403c",twitter_handle:"VailshireCap"},{name:"Craig Shipp",profile_picture:"https://pbs.twimg.com/profile_images/1605961563420114945/MWGqR1Gm_400x400.jpg",ref_id:"8d6ca47a-89a2-4331-bae4-2fae18055a95",twitter_handle:"CraigShipp"},{name:"Oluwasegun Kosemani",profile_picture:"https://pbs.twimg.com/profile_images/1538403135101800450/sO-RPI9U_400x400.jpg",ref_id:"25ce4b90-6689-4dd9-84b6-240c7bcbe407",twitter_handle:"MrlamilamiKosch"},{name:"Max Keiser",profile_picture:"https://pbs.twimg.com/profile_images/1361873587582472195/y57DiTYX_400x400.jpg",ref_id:"743efd07-d194-4c74-8663-45c3b8646b8e",twitter_handle:"Maxkeiser"},{name:"Isabel Foxen Duke",profile_picture:"https://pbs.twimg.com/profile_images/1466874333410717698/WRQh2-_m_400x400.jpg",ref_id:"58989d4a-4a96-4ffc-8cbe-f233ffb10420",twitter_handle:"isabelfoxenduke"}],hosts:[{name:"Publord",profile_picture:"https://pbs.twimg.com/profile_images/1480160632360124416/AM_vVRko_400x400.jpg",ref_id:"5b7b7e22-fe55-4e1c-933d-6544f6600351",twitter_handle:"publordhodl"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/0c42d408-e518-4ecf-b282-d864a8c14002.jpg",keyword:!0,link:"https://stakwork-uploads.s3.amazonaws.com/uploads/customers/2707/media_to_local/7de8e4aa-50a6-4f57-a8ff-6ca16a4f0ae4/76c3395a-4fe5-4802-8d2a-92cca1f1ea0b.mp3",node_type:"clip",pub_key:"02574d6e8e787372184b6f17c40d6c6fe1777db9015801f95dfd24692784d767cd",ref_id:"e4520df5-b812-4247-bd2d-7db10bc5b51f",show_title:"PUBLORD",text:"Brandon gentley here. I don't know how far down the road you guys are going with this, but I just was reading a bunch of stuff over the Christmas holiday just on grid attacks and just stuff that I was only somewhat aware of over the last ten years and seeing some little more high profile ones. But there's a lot more than I had ever thought. There were just minor attacks, thousands of people losing power, things like that, all over America, et cetera. How does bitcoin mining does it, can it? Will it? How does it kind of stabilize just from more malicious attacks? Damn, that's a great question. Cyber warfare? I'm not an expert there, Brennan, so I can't help you with that. I'll just tell you, it's pretty easy to knock out the North American power grid, okay, with some sort of carbon bomb that sprinkles carbon all over the transformers of every single major US. City. I'm not telling you how to do it, and maybe I've got my facts wrong, but I don't know how bitcoin mining helps with that, except to say the following there will be lots of bitcoin miners that are still spinning even if a major North American grid goes down. And that's the beauty of the bitcoin mining network. How could it help, actually, in a pure capitalist way? Well, if you get utilities creating more revenue streams and therefore getting increased revenues and using what's called operating leverage, meaning every single cent of electricity that they get demand for, over and above their fixed cost base creates enormous profits. Well, then the bitcoin miners can increase the revenues of the utilities, which allow them to be able to spend more money to defend their grid against cyber attack. Does that make any sense? Yeah, it does. Greg, I appreciate it. And I'm sure that there's whether it's the Jason Lowry of the world who you've mentioned numerous times kind of going down this type of road thinking about things like that, and then that's just one of those things where I was shocked. I was really blown away, actually, at how much it was happening. And it seems to be happening at the small level where no one notices. And I would imagine that there are some type of, like you said, some capitalistic approaches that either are being done or will be done eventually and just kind of figure out as it's kind of become more prominent, which, like you said, cyber warfare. The biowarfare aspects we know are going to be more of the future and not so much the kinetic side. So yeah. Thanks, Greg. So you're welcome. And you know, what makes me happy is like, smart kids like you are asking these questions. This is what gives me for those of you who don't know, I've met Brandon in in La. And he and Larry LaPard and I, you know, talked about these things. And the world's in good shape when young kids and when I say kids, I mean anyone younger than 35 when young kids are asking these questions and planning for the future. Not everyone's a fan of Jason Lowry. I'm going to see him in Boston in a couple of weeks. I've met him before. Look, the kid has ideas that turn some people off and that's fine. No one else. We can't be groupthink. If everyone's thinking alike, then somebody isn't thinking according to General George Patton, right? So let's keep the lines of communication open for people that might have different ideas or ideology than you have. So the world is in good shape when the kids are asking these questions and not the old men like Max and myself. I don't know the fucking answer. All I know is I want the kids to ask these questions so that when they are my age, they will have solved a lot of the problems that we're now dealing with. Right, Max? Hey, Greg. Yeah, we're going to solve them all. I'm curious your opinion. You have a lot of experience. You're gaining new knowledge over time, like we all are. I personally see a time where no matter what the cost of electricity, individuals randomly all over the world are going to be willing to run miners, especially when they're configured to produce heat for a home if you're going to have to buy heat anyway. And you could run a minor to heat your home and generate SATS for doing it. I even believe some people would be willing to lose money to accumulate SAS. Do you feel similar about the overall worldwide market for mining because of the pools that are out there? The ability for anybody to mine even with just one machine and still gain some SAS, I feel like it's a great opportunity that's never going to go away. Potentially just about your no. Let's take it to one of our power plants in northern Ontario. We are considering adding a greenhouse right next door that will create leafy greens for the indigenous community. So the indigenous communities in Canada have some of the highest tuberculosis rates because they don't get enough sunlight. And if you had a 35 megawatt mining facility, which we do, it's operated by Hut Eight, a publicly traded bitcoin miner. If the heat from that bitcoin mining facility was vented into a greenhouse and used to grow leafy greens for the indigenous communities, do you think that would be a benefit? And so that's just one extension on an industrial size project from exactly what you're saying. Okay, these are secondary and tertiary benefits from the efficient use of energy and its byproducts, which are heat in terms of making life better for various communities around you. So whether it's heating your home or heating a greenhouse to grow leafy greens to allow to combat tuberculosis, lots of these indigenous communities in northern Ontario, there's less than 100 people living in these communities. And if you could put an entire ecosystem to work around a bitcoin mining facility, I'm not going to. I'm not indigenous, and I really don't want to offend any of them if I'm pining on something. But I do think it would make sense to take that heat and heat the school, heat the greenhouse, heat the local tribunal. Every single indigenous community is set up in a similar way. So this is really good stuff as far as I'm concerned. I got to make sure I don't get between the wall and the wallpaper, because I don't know this stuff inside out. But there are people that are studying these projects for the benefit of remote communities everywhere in the world, not just in Canada, but remote communities in Africa, et cetera. So your idea on a home basis, Jim, can be taken to a village in Africa or a remote community in northern Canada for the benefit of all the less privileged. And I got to be careful, not less privileged, just less electricity centric populations. In the case of northern Canada, all of these communities run off of diesel reciprocating engines, diesel fuel, rather than having some sort of electricity solution that incorporates bitcoin mining. So you guys have seen ice road truckers and you've seen their trucking, diesel fuel to northern remote communities. Don't you think the environment would benefit by having a bitcoin mining solution that allowed for an electrification of a remote community running on, let's say, liquefied natural gas rather than diesel fuel? All of these things are possible with bitcoin mining. You never hear any of this from the politicians because, well, first of all, they're not smart enough to think this way. And secondly, they're biased because, you know, oh my God, bitcoin mining is bad. So peel away a layer of the onion and you'll see all the different ways that Bitcoin mining can help remote communities, whether it's your own house or a small village in northern Canada. ",timestamp:"01:07:37-01:16:31",topics:["bitcoin mining attacks","bitcoin mining facility"],type:"twitter_space",weight:22.711352085784924},{boost:0,date:1629691200,description:"[[Bitcoiners]] seeing the signals of the depreciation of [[fiat money]]",episode_title:"WHY ARE WE BULLISH Bitcoin Meme Hub Jan Capek Bitcoin Mechanic Max Hillebrand ep195",guests:[{name:"Max Hillebrand",profile_picture:"https://pbs.twimg.com/profile_images/1311357499514269696/-HQFwyFH_400x400.jpg",ref_id:"9a86cc59-ed01-4757-88f6-e9d9d63067b9",twitter_handle:"HillebrandMax"},{name:"Bitcoin Mechanic",profile_picture:"",ref_id:"faae3a37-0115-4074-af21-7d79c429c7cb",twitter_handle:""},{name:"Jan Capek",profile_picture:"",ref_id:"ec6f8b14-6c4b-42e9-8e86-9aa902c0906d",twitter_handle:""},{name:"Bitcoin Meme Hub",profile_picture:"",ref_id:"dcd5a590-2018-4707-a49b-8142d7b14e33",twitter_handle:""}],hosts:[],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/419512c2-e309-4b25-bfe2-cd481d53f66d.jpg",keyword:!0,link:"https://anchor.fm/s/11e95d20/podcast/play/39201536/https%3A%2F%2Fd3ctxlq1ktw2nl.cloudfront.net%2Fstaging%2F2021-7-23%2F214267789-44100-2-17e9fbafdf841.m4a",node_type:"clip",pub_key:"",ref_id:"b03519b0-5139-4ad4-910a-40f40e332352",show_title:"BTC Sessions",text:"I was like six years old, my parents had we still have a house, small cottage in the mountains and when you bought it, it was actually an old house with all these relics from the beginning of the century. And what I actually discovered there was like a small envelope. When I opened it, there were like the German marks, but these were already the million banknotes. And at that time I was like, wow, this is a lot of money. And then I had this discussion with my dad explaining me that, well actually this was not worth even like you should put it into a stove. They used it for heating because you couldn't buy a bread with that recently. I'm kind of afraid that you just exhausted my reasoning as well with this, but let's wait with them. Back in 2019, I got the purse made from the Venezuelan Bolivars. It was being sold at some conference and I even bought a small backpack for my daughter. So this is really a topic that not too many people realize and I think we are in our own bubble as Bitcoin is that we do like watch for all these things and we're like seeing, I don't think we're seeing like Bitcoin appreciation, but this is the depreciation of all the paper toy money. And then I think Max already hit a few points basically saying that the merchants are greedy and they're like increasing the prices. But the problem is that the merchants also have info. They have to pay whatever transportation for the goods they have to buy, the raw materials if they're actually manufacturing and directly to selling. It all adds up. And I actually had a talk with a friend of mine who has a big machining shop and he produces parts and thousands of pieces on CNC lights. And he said, well, the iron material, which used to be like the cheapest material being used, went up 100% in last month. And when you look at the development of iron ore now, it dropped actually at the end of July. But this is a strong signal that something is already going on and it will be projected into the economy eventually because these are the initial parts of the whole economical chain, the people who are actually manufacturing something. And at the end you have the merchants selling you your airports or whatever. So we are going to see something interesting in a couple of months or years. So I'm kind of scared of that. It ",timestamp:"00:16:17-00:18:55",topics:["bitcoiners","fiat money"],type:"podcast",weight:6.382523059875072},{boost:0,date:1669766400,description:"Konstantin Wünscher narrates how he founded Kollider",episode_title:"Meet the Makers: Konstantin & Arvin",guests:[{name:"Konstantin Wünscher",profile_picture:"https://pbs.twimg.com/profile_images/917464868663582720/PMFCqusG_400x400.jpg",ref_id:"5f027fce-7775-4824-b941-d2f4120d2d0f",twitter_handle:"krychtiukmd"},{name:"Arvin Galoy",profile_picture:"https://pbs.twimg.com/profile_images/1429792764464611329/4VQqlZiM_400x400.jpg",ref_id:"e0eb434a-9219-4c57-b9e4-da6ceeaec040",twitter_handle:"GaloyMoney"}],hosts:[{name:"Zapp Ed",profile_picture:"https://pbs.twimg.com/profile_images/1519990234070540288/adGqlFoj_400x400.jpg",ref_id:"bbe7cf1d-cd8d-4d36-926d-76f41b775fbb",twitter_handle:"zapp_ed"},{name:"Moritz Alby",profile_picture:"https://pbs.twimg.com/profile_images/859727763292512258/kiFpZ2vO_400x400.jpg",ref_id:"e88efbf8-3809-4508-a86a-d7bf9effb574",twitter_handle:"MoritzKaminski"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/965489b4-a414-4fd0-ab8c-55911b1596aa.jpg",keyword:!0,link:"https://www.youtube.com/watch?v=CjwjScc0TYg",node_type:"clip",pub_key:"02574d6e8e787372184b6f17c40d6c6fe1777db9015801f95dfd24692784d767cd",ref_id:"caca294d-8661-49a2-80a9-32e4e8452c03",show_title:"BOLT FUN",text:"content. What about you? Did you immediately start with Collider or was there also some experimentation in between? Yeah, there was a lot of experimentation. Actually, I remember our first product that we build had nothing to do with trading. It was actually a data labeling service that used Lightning to pay people to label images. Because my background is machine learning and AI, that's what I studied. So even though I came out of this finance job, I thought I got, well, payments, that's pretty cool. Maybe start with customer facing product rather than having to deal with other big trading firms. So basically what we're trying to test is whether people are into micro payments of this. Because the idea was just like this labeling model that was pretty state of the art back then, which basically enabled you to make some sort of very rough outline and then we'll do the rest for you. In terms of labeling was sort of an unsupervised learning technique. But anyway, so we were paying people for like every time they made a label, they would get some SATS and we were just thinking, would people do that? And we kind of realized quite quickly is that these were really very neat things combined. Like people that would label data, they probably wouldn't know about Lightning or it would be not usable to them. And also it was just like people didn't really care about very small amounts. So basically we're just testing whether Michael payments are so popular. I don't know. We did test it and we didn't get any of this. So we kind of scrapped that idea, although I thought it was a cool product. And then we started basically focusing on something that we know more about, which was obviously finance trading and stuff. And then we built a very simple spread betting interface, which was not like an exchange, was just like, you can make it back with someone else about price. And yeah, we did that. And then I don't know why, I think we sort of realized that the problem this is, again, people don't necessarily need to want to do that in a very small again, basically, again, it was focused on very small payments, and people didn't care about very small amounts that much for that application as well, like trading. So if they want to trade, they want to trade size. We kind of come to terms like, in order for this to work, we actually have to build a proper exchange where people can basically trade whatever amounts they want and make it very similar to what already exists in order to kind of ease in the users into this new idea of using lightning rather than just throwing something completely different at him. It was sort of the journey that we went down. But yeah, compared to Arman, it was very like product driven. We were only thinking about products most of the time. We were thinking, how do we get this technology into as many hands as possible? And again, trading is probably one of the most popular things to do in crypto. If there's any application, it's like used very like a lot and then trading. And so we thought, well, that's a good starting point, let's just try to create what already exists. But with Lightning kind of derisk, that's what we narrowed down on and that's how we then build. And yeah, I think this is sort of it. And now we obviously made branch out a little bit away from just trading. I was thinking about more payments and more of the stuff that is probably like what Alan mentioned. Actual sort of problems that you could solve with this technology because trading is obviously it's needed as a backbone but the things that that enables is not necessarily very obvious to people but it can enable other financial sort of instruments or abilities for people. But yeah, so this is what was the journey, very product driven, quite a bit of experimentation with different ideas. ",timestamp:"00:10:10-00:15:01",topics:["Konstantin Wünscher","Kollider"],type:"youtube",weight:9.398438332070137},{boost:0,date:null,description:"Solution for the massive debt growth in third world countries",episode_title:"Gladstein & Sam Callahan - World Bank / IMF & #Bitcoin",guests:[{name:"Sam Callahan",profile_picture:"https://pbs.twimg.com/profile_images/1592532728775409667/0DayEP2Q_400x400.jpg",ref_id:"5a044a91-8dee-421c-86dd-8c734dc9bc32",twitter_handle:"CallahanMusic_"},{name:"Alex Gladstein",profile_picture:"https://pbs.twimg.com/profile_images/1382371620669452292/VOPKOc8w_400x400.jpg",ref_id:"49445c1c-7c66-4b73-9eec-09a337befbec",twitter_handle:"gladstein"},{name:"Brady",profile_picture:"https://pbs.twimg.com/profile_images/1502564606836981763/fmqtNrNc_400x400.jpg",ref_id:"45bbbb01-6163-4b3b-905a-fc67174893d9",twitter_handle:"CitizenBitcoin"}],hosts:[{name:"Neil Jacobs",profile_picture:"https://pbs.twimg.com/profile_images/1593645788978102277/UAQCQKeE_400x400.jpg",ref_id:"0bc759e0-b055-4800-a79d-2b950fe5cc53",twitter_handle:"NeilJacobs"},{name:"Alex Stanczyk",profile_picture:"https://pbs.twimg.com/profile_images/1539055022364708864/rwErK6x1_400x400.jpg",ref_id:"3126e2a3-bbe4-456b-b298-9714085fa286",twitter_handle:"alexstanczyk"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/239722cb-4216-414a-a17b-5adf9d52e15a.jpg",keyword:!0,link:"https://stakwork-uploads.s3.amazonaws.com/uploads/customers/2707/media_to_local/f8be7c60-94a5-41d0-972c-6301cd4ad7f0/4e5bf86b-6193-4f6e-8fa3-933344b2053e.mp3",node_type:"clip",pub_key:"02574d6e8e787372184b6f17c40d6c6fe1777db9015801f95dfd24692784d767cd",ref_id:"f76300e2-dc0d-4960-a1cf-6c7b90ad4cfa",show_title:"Swan.com",text:"Yeah. So it creates these dependence on these international financial institutions. And when these poor countries get into debt, usually they just need to get in more debt. And, you know, the IMF mission statement is to achieve sustainable growth and prosperity for all of its 190 member countries. And the World Bank's mission statement is to, is to reduce poverty and improve living standards by promoting sustainable growth and investment in people. Now, when these poor countries need money, there's really not many places to go. The IMF and World Bank are some of their only options. And if you look at the data, Alex, I'd love, if you just go over, have they achieved their mission, would you say? And can you talk about the amount of growth that's happened in the debt over the last, say, four or five decades for these third world countries? Because it's just insane to me. Yeah, a country I looked at, Bangladesh, had a couple of hundred million dollars in external debt in the early seventy s and now has $100 billion today, for example. So the whole machine has basically made it so that these countries have more debt than they could ever possibly pay back. And again, the debt is denominated in a currency that they cannot print. So the whole system just needs to be disrupted and broken. I think that in the future that if we do end up having a bitcoin standard, that the system would be disrupted and broken, because then you wouldn't have certain countries that could issue with paperwork, the reserve currency. All countries would be on the same standard, and every country would be able to, if it wanted to without needing permission from a great power, they could convert their energy into this reserve currency through mining. And maybe that's not sufficient. Right? And I'm not suggesting that all countries will become equal. You're still going to have huge inequities that result from labor productivity and all kinds of other things. But the point being that even small countries, they won't necessarily have to shape their economy to suit the needs of foreign powers to get foreign hard currency. They could, for example, invest in local electricity production, which is good for the local population anyway, and then use that to mine Bitcoin or to power the local economy. And I think that's a much better kind of choice than selling stuff for other countries that is just going to go to paying it back more debt. So I think there's like a light at the end of the tunnel. Maybe there's a way out. And that's something that I try to be pretty hopeful about. Certainly a lot of people at the African Bitcoin conference think this, and I think it just starts to make sense once you talk to enough people. We should all speak the same monetary language. There should be one standard. It is completely ridiculous that there's 41 central banks in Africa. Each one is its own lording over everybody else. And then there's also the French, who still control a huge chunk of Africa. So in a Bitcoin standard, the power of these institutions to repress people is dramatically diminished. It's not eliminated at all, but it's certainly diminished by a lot. So that keeps me optimistic about the future. Yeah, absolutely. Bitcoin is a light at the end of the tunnel because it's hard to see another way for this to get disrupted, in ",timestamp:"00:59:02-01:02:59",topics:["Debt growth solution"],type:"twitter_space",weight:6.3401312828063965},{boost:0,date:0,description:"Implications of Taproot activation on the protocol",episode_title:"Taproot Activation Q&A with Bitcoin Devs - TABConf 2021",guests:[{name:"Andrew Chow",profile_picture:"https://pbs.twimg.com/profile_images/1452266201770496010/44FHCtZM_400x400.jpg",ref_id:"f96d87ca-5060-4021-aeb9-61db03312027",twitter_handle:"andrewrchow"},{name:"Ben Carman",profile_picture:"https://pbs.twimg.com/profile_images/1550704386007089152/pLwUSeff_400x400.jpg",ref_id:"1d1e95ba-b4af-415f-aafe-85c6dd7571b8",twitter_handle:"benthecarman"},{name:"Matt Corallo",profile_picture:"https://pbs.twimg.com/profile_images/697361498587451394/_rX0-O0W_400x400.png",ref_id:"08cb3c45-c0bc-4a60-ae5b-a1283d352c8b",twitter_handle:"TheBlueMatt"},{name:"Pieter Wuille",profile_picture:"https://pbs.twimg.com/profile_images/1264051937172836353/n7gHdLbB_400x400.jpg",ref_id:"40260d2f-3480-47d6-8515-d2e780901273",twitter_handle:"pwuille"},{name:"Vivek Kasarabada",profile_picture:"",ref_id:"60ed22d0-8cf3-410e-8a7c-9c343ae109ca",twitter_handle:""},{name:"Murch",profile_picture:"https://pbs.twimg.com/profile_images/1269477743525130241/-U843Cmt_400x400.png",ref_id:"3e2c1c73-a057-4475-9782-3bb0d3d8cc62",twitter_handle:"murchandamus"},{name:"Andrew Poelstra",profile_picture:"https://pbs.twimg.com/profile_images/1316562683009921024/FSscAYvJ_400x400.jpg",ref_id:"15fb9c53-c988-4af1-bbf0-4832d71b0a01",twitter_handle:"Blockstream"}],hosts:[{name:" TABConf (The Atlanta Bitcoin Conference)",profile_picture:"https://pbs.twimg.com/profile_images/1596233571521499138/YE8Us_Ml_400x400.jpg",ref_id:"eb1b6016-6223-4b2b-9264-2423ce66304f",twitter_handle:"tabconf"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/e7d2a4ca-6b44-4a45-a94c-6f48987979f7.jpg",keyword:!0,link:"https://www.youtube.com/watch?v=MrxtqAlRI2U",node_type:"clip",pub_key:"029099ec31eb33594611dc47d5c93de2c1aa86918e3a36b408c14a500601c8bc9b",ref_id:"f9d1d228-19db-4a2d-bfb3-7853fd745ea0",show_title:"TABConf (The Atlanta Bitcoin Conference)",text:"implications does it have for the protocol? What are some things that will be possible day one on activation? And also what are some things that you guys see coming in the future that will take advantage of these changes that aren't really being built yet? It all depends on your wallet. If your question is from the perspective of a wallet developer, well, as soon as Tap root activates, they will be able to make use of the features that Taproot introduces. If you're just using a wallet, well, you are restricted to whatever your wallet can do. So there is no impact as a wallet user. There is no impact on you unless you update to a wallet that can. Make use of these features more generally. So first you'll see transactions that make use of Schneider's signatures. Schneider signatures are slightly smaller than the current ECDSA signatures. So there is a small savings there for the inputs if you are involved in multisig multisig that uses K of K keys. So two of two or three of three can be expressed as a Tweak in the keypath. So when people implement a signature or sorry, a public key aggregation method like for example, music, they'll be able to do keypath spins and multisig wallets will be able to look the same as single SIG underwire. And I know for a fact that a few companies are working on this already because it will be huge savings compared to having an actual multisig script in the transaction to just have a keypad spend. Yeah, go ahead. Good. We'll move on to lightning at the end. Okay. So more generally, I mean, this is the design goal of Taproot that it introduces a new address type that can be used for everything. So before we had separate output types, separate addresses for the simple pay to pubkey pay to pubkey hash style things. And on the one hand and on the other hand, p to SHP to WSH for the more complicated script things Taproot produces allows it to produce a single address that is different from all of the ones before. But it can be used by everything and even better at spending time. In many cases, you cannot distinguish what it was. So this is both an efficiency saving because it's cheaper, it's also privacy saving because you're not revealing to the world what kind of wallet construction you are using. So, for example, right now you can detect like, there's some fairly large multi sigs that are basically only used by one entity. And so you can very trivially detect like, oh, all of these, I don't know, what's the liquid policy now? Like nine of 15, like all of the nine of 15s are liquid, basically. Okay, well, whatever. And so you could hide some of that policy, so you wouldn't necessarily reveal that when you spend the transaction. Another thing that's a little bit down the line, but a cool crypto trick you can do with Taproot is you can produce a ring signature over all. Of the Taproot outputs or all of. Your Taproot outputs above a certain threshold and prove that you are holding a coin of a certain value without revealing which one. Other than that one of the tapered ones. Yeah. So it's generally that kind of fits into a broader category, like Schnorzigs are much simpler mathematically. And so there's a lot of cool tricks you can do like that and other stuff like the signature aggregation and whatnot. And then also with lightning, this is also something that's kind of further down the line. And there's no real concrete I guess AJ has one concrete proposal for it, but eventually we're going to get PTLCs instead of HTLCs. So instead of using a hash, we can use public keys and revealing the private key for it, or revealing a signature, an adapter signature for it. And that allows us to decorate payments across hops, right? So right now, if you go to send an HTLC or you go to send a payment enlightening, it goes through four hops. And all of those four hops see it's payment hash, you know, ABC, and they all see the same payment hash. And so later they could, you know, get together and correlate and say like, hey, I saw a payment hash ABC. It's like, yeah, I saw that too. And you can correlate and tell where that payment maybe came from, where it went to. And with PTLCs, there's an additional blinding factor added at each hop, so they won't see the same data and only kind of their immediate peers will see the same ID. So if you're missing a hop, you won't necessarily be as able to correlate that. So it's one fewer correlation metric. There's obviously other time based correlation metrics that are problematic, but like the on chain stuff, it's one fewer correlation metric where you can group certain types of transactions. There are other issues, but remove one at a time. I'd say the explain like I'm five, is just like standard user wallet is basically the same, and then all the fancy stuff gets cheaper once actually people build up stuff. I think that's a good summary. What will change on activation time for a normal wallet user is absolutely nothing until their wallet starts making use of it. ",timestamp:"00:12:40-00:18:29",topics:["Taproot","Taproot activation"],type:"youtube",weight:6.240247130393982},{boost:0,date:1671634578,description:"How Bitcoin mining will open up more markets",episode_title:"Café ₿: 23’ Macro Outlook w/ Joe Burnett & Mitch from Blockware",guests:[{name:"Cory Klippsten",profile_picture:"https://pbs.twimg.com/profile_images/1569687200857755648/fxiCeaqc_400x400.jpg",ref_id:"ddfb9b4c-4e6a-4f4c-a01b-e6bb1bc55464",twitter_handle:"coryklippsten"},{name:"Tomer Strolight",profile_picture:"https://pbs.twimg.com/profile_images/1591960241008148481/HtyINxtU_400x400.jpg",ref_id:"3a2bc97d-072c-4ed9-9a59-17ceeb68fe99",twitter_handle:"TomerStrolight"},{name:"Joe Burnnet",profile_picture:"https://pbs.twimg.com/profile_images/1601649626754564105/9TubQjRd_400x400.jpg",ref_id:"1c849151-1cca-44db-9a69-665fac5dc6f6",twitter_handle:"IIICapital"},{name:"Mitchell Askew",profile_picture:"https://pbs.twimg.com/profile_images/435841191524204544/mzKR9KCX_400x400.jpeg",ref_id:"fc4ba3ae-eacc-489d-a888-397ba6b1f842",twitter_handle:"mitchell_askew"}],hosts:[{name:"Alex Stanczyk",profile_picture:"https://pbs.twimg.com/profile_images/1539055022364708864/rwErK6x1_400x400.jpg",ref_id:"3126e2a3-bbe4-456b-b298-9714085fa286",twitter_handle:"alexstanczyk"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/239722cb-4216-414a-a17b-5adf9d52e15a.jpg",keyword:!0,link:"https://stakwork-uploads.s3.amazonaws.com/uploads/customers/2707/media_to_local/601898b8-8964-48ba-aa92-ab3f1c4ad0bb/75f49b1a-9dce-41fd-8517-77b607c9c154.mp3",node_type:"clip",pub_key:"",ref_id:"6c3edea1-97d0-41d4-a015-0f16417f2ee7",show_title:"Swan.com",text:"Why couldn't it work? I think it's fascinating because if you think about power generation, the power generation and distribution has been hand in hand at the absolute key to prosperity globally ever since we figured out how to leverage rubbing two sticks together and making a fire in a cave. And the fact that they're bringing on six new nuclear reactors, they're embracing Bitcoin mining, and they have these alliances in the chip industry. Wow, man, that's a freaking power move. I mean, more in terms of sorry, go ahead, nuclear, my bad. Well, this isn't just that building new nuclear reactors. There is intention to do that. This is restarting their existing fleet. They've got 30 gigawatts sitting on the sideline right now just waiting to be put back into action. And then on top of that, they do want to get into the small modular reactor game and also build new nuclear assets, nuclear in Japan. And Bitcoin mining is going to be very interesting. What I was getting at, Alex, when I said I don't know if it could work, what I meant is literally backing their currency with the Bitcoin that they're mining. So keeping the Bitcoin and then somehow backing their currency with it. I just don't know how those dynamics work. I mean, they have so much debt that would they technically have to default on that before they make the switch over to a Bitcoin backed currency. Or like I don't even know how that would work because obviously they can't back their currency with Bitcoin and then still expect to be able to pay off their debts if their currency is backed in Bitcoin at that point because you can't print more of it anymore. To me, the simplest way would just be to hyperinflate the currency, switch the currency to a new Bitcoin backed currency and then get to hit the reset switch. So all the debts basically go to zero in real purchasing terms and they can reset the whole currency. This is the idea behind gold. You know, the funny thing about central bankers and gold is if you watch what they say, when they're no longer in charge of the central bank, many of them will admit candidly in interviews that the reason that they hold gold is that it's the emergency reset switch. If the currency ever blows up and collapses, they can use gold to basically declare that currency the old one and this is the new one. And gold is the reset switch. You have to have some trustable reset switch. I'm not saying it needs to be gold, but I can see how it would be a pretty I'm not going to say seamless, but it seems to make a lot of sense to me. Like, okay, you know what's super interesting? Wiremart hyperinflation. I know you guys are probably sick of hearing me talk about wire, but it's fascinating. Do you know how they reset the currency? One dude came along and he introduced a new money, and guess what? The money had as its primary attribute. He said there was a limited quantity. We will never print more than this amount. And instantly the people accepted it. And then what did they do a few years later? Well, yeah, obviously they can renege on those promises, but my point is that confidence is the key to all currency systems, and in context of Japan, I think that would work. Yeah. There's no easier way to convince a populace of a better currency when your current currency is collapsing and failing. So when you are kind of under that pressure and you're getting squeezed from every angle, it's easy to get out by saying, hey, well, look at this new one we have. It's backed by this underlying thing called Bitcoin that can't be printed more of, so we won't print more of it either. And, I mean, who knows if they'll keep that promise, but at least it'll be better than what they have now. And I don't know. Again, looking my only exposure to kind of where the Japanese yen is in terms of its purchasing power is what the price of Bitcoin is in terms of yen. And it doesn't look like it's inflating that much, at least relative to its exchange rate for Bitcoin. So, like, I don't know if they're being squeezed that much at the moment, but obviously it's only a matter of time before all fiats have to squeeze, as we always talk about here, right? Yeah, I don't know. Interesting times ahead, for sure. Nuclear, what's the latest in regard to small modular reactors? SMRs people who don't take two minutes and explain what the heck they are and then tell us what's going on in that space. Yeah, so small modular reactors are basically just smaller versions of a nuclear reactor. Anything less than 300 MW is what fits into this small modular category. There's many different designs. I think 70 are being proposed right now globally. About half of them are just smaller versions of the existing boiled water reactors that most of the global reactor fleet is designed by, based on. But some of them are going to be using new cooling technologies like high temperature gas and liquid metal cooling and solid state cooling, various technologies that have been proven in the past but put on a shelf as they only stuck with one design and just built many of those. But right now in Canada, there are several projects ongoing. There's a 300 megawatt BWRX reactor by GE attachee that just got nearly a billion dollars in financing from the federal government and the province. So there's a lot of money being funneled into these projects. The Go dates are still looking 2027 28 to have these demonstration units operated. And I'm just actively trying to connect the dots and see how we can integrate bitcoin mining into this new future that nuclear power is getting into, because I think it'll be greatly beneficial and open up even more markets than the small modular reactors would be capable of. Because now we can essentially play out the pioneer species idea and drop a nuclear reactor wherever we want, monetize it immediately, and then just start building around it. So it's going to be very exciting. Lots of countries are pursuing different versions of the SMRs. I just happen to be most familiar with what's going on in Canada. It's looking like Argentina might actually be the first country to have a deployable commercial scale SMR outside of besides China, obviously. But that's going to be a very interesting future for Nuclear. And we'll keep you guys updated as things go along. Awesome, obviously. Happy to have you back. Anytime, nuclear, you've got some great stuff, and I'm super fascinated by the SMR industry. ",timestamp:"00:54:19-01:01:51",topics:["Bitcoin mining","Currency hyperinflation"],type:"twitter_space",weight:14.955047728896634},{boost:0,date:1666137600,description:"Tools for managing Lightning nodes",episode_title:"Meet the Makers: Alan & Kwinten",guests:[{name:"Alan Plus",profile_picture:"https://pbs.twimg.com/profile_images/1565235279451103233/XD8pJuIo_400x400.jpg",ref_id:"e362fed6-ec06-4d8a-a052-3137b24f213f",twitter_handle:"alnboltn"},{name:"Kwinten De Backe",profile_picture:"https://pbs.twimg.com/profile_images/917859380699320320/p_v-fjmh_400x400.jpg",ref_id:"be68f240-1f4c-4b27-b4bb-752c90cbe0c3",twitter_handle:"QuintenDeBacke1"}],hosts:[{name:"Moritz Alby",profile_picture:"https://pbs.twimg.com/profile_images/859727763292512258/kiFpZ2vO_400x400.jpg",ref_id:"e88efbf8-3809-4508-a86a-d7bf9effb574",twitter_handle:"MoritzKaminski"},{name:"Zapp Ed",profile_picture:"https://pbs.twimg.com/profile_images/1519990234070540288/adGqlFoj_400x400.jpg",ref_id:"bbe7cf1d-cd8d-4d36-926d-76f41b775fbb",twitter_handle:"zapp_ed"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/965489b4-a414-4fd0-ab8c-55911b1596aa.jpg",keyword:!0,link:"https://www.youtube.com/watch?v=GyA8tHNKmig",node_type:"clip",pub_key:"02574d6e8e787372184b6f17c40d6c6fe1777db9015801f95dfd24692784d767cd",ref_id:"7e996fc8-37c7-447f-b0e5-c6dbf58015fe",show_title:"BOLT FUN",text:"Now, as we have now, both of you come from the field of node operations. Can you share a bit like the tools that you use and why you use these tools to manage Lightning nodes? Alan, if you want to go first. Well, actually I don't actively manage my node at all, so I manually go in every day and do things, but I don't use any tools. And the reason is because I don't want to compete with other node operators, so I don't want to outcompete them. So my role is really to make sure that everyone else is successful and making money and make sure that the network is decentralized as much as we can do it and everyone has capacity both ways and stuff like that. So I don't want to be like a routing node, so I'm kind of supporting smaller nodes while still growing and stuff like that and for that I don't need automated tools. Can you tell us a bit more? You mentioned just the purpose you want to help smaller nodes, but do you do that under like the Lightning network plus node or how does it work and how do I get support from you if I am a small node operator? So one way I do it is, for example, if there is a swap that is open between smaller nodes and it's failing because somebody fell out of the swap, these liquidity swaps and let's say there are three people and one node is just out because something happened, then I take their place. This happens quite often and my node is quite big. So those other two node operators are typically satisfied with me taking the place because they get more connectivity. And the other thing is I allow anybody to open a channel to us if they want to, even small channels like 50K sets or something like that, which is typically not possible to other big nodes because they don't want small channels. The minimum is usually a million or 2 million nowadays, which could be a bit too much for a beginner because they don't want to risk that much money. And sometimes I do open to people that I chat with and so these are the ways basically I just create liquidity for people or help them organize their own little swaps and stuff. And you do that all really manually or rely on standard tools that are out there? Yes, mostly like 90% of the time. I did try a couple of tools because I wanted to learn. So there are some situations where I use some automation. I also wrote some scripts of my own for setting fees. For example, I experimented with all kinds of different fee structures. Zero fee, very low fee, higher fees, optimal fees, all kinds. And I found that all of those strategies have an advantage and a disadvantage. So there's no optimal perfect strategy. You can make money in different ways really. You just have to find your own niche. And I also found that being a completely zero fee node is not beneficial for other nodes. So unless I want to be like zero fee routing who makes money on being super well connected and selling channels? That's a different story. But I don't want to be a zero fee routing because that's too much competition to other nodes. So setting some small reasonable fee is probably the best way how I can stay out of other people's business. But at the same time it's kind of like the best of two worlds. Like trying to be a good router for others but also not taking their profits. And where do you see does this go to in the future? So it seems for me like you are very much supporting the operations of your platform basically right when someone needs a replacement also then you jump in and help out to create one of these swaps or to complete them. But where does this go to? Do you always think, okay, this is where you want to stay or do you have some ideas where this could lead to? Yeah, I have ideas and I think the future is going to be more and more automation in this swap creation. So for example, I have this idea where I could have a wallet, a brand new wallet that I create or maybe join some existing wallet. Basically when a new user wants to open a channel they would open it through a swap immediately. So they would have two channels immediately on the at the beginning, one incoming, one outgoing. So it would be all the swap creation would be done through an API and transparently for the users. Because this way you don't have to go to a website and you don't have to log in and do all of those things. It's just all done in the background. So yes, this is I think is the future where this is going to be one of the ways how you get incoming liquidity? Yes, I think that's a very interesting topic. We should come to that in a second. ",timestamp:"00:16:30-00:23:25",topics:["Lightning nodes","nodes operators"],type:"youtube",weight:6.396489111901376},{boost:0,date:null,description:"The Bitcoin Village project in Nigeria",episode_title:"The Orange Sun ☀️ #Bitcoin News and Talk",guests:[{name:"Portland Hodl",profile_picture:"https://pbs.twimg.com/profile_images/1562306406526492672/LiqmI9NS_400x400.jpg",ref_id:"530aba21-392f-4156-9e91-4fc5c76fced1",twitter_handle:"PortlandHODL"},{name:"Miykael Woodward",profile_picture:"https://pbs.twimg.com/profile_images/1473433558475689985/CM0o3oWu_400x400.jpg",ref_id:"6fe02a78-4f07-47e7-8e64-b278a3167835",twitter_handle:"MiykaelWoodward"},{name:"Okin Mobi",profile_picture:"https://pbs.twimg.com/profile_images/1518945775685967873/O0wPrIKO_400x400.jpg",ref_id:"bbd18918-7758-4bdb-b9a5-641bf92748a6",twitter_handle:"OKIN_17"},{name:"TK☣️Ph.Ple₿",profile_picture:"https://pbs.twimg.com/profile_images/1505791887415730177/d0YDQ3Xc_400x400.jpg",ref_id:"9e3ffa2c-9410-48e9-a726-8312c0abcd7c",twitter_handle:"ToxiKat27"},{name:"Funsho Jimoh",profile_picture:"https://pbs.twimg.com/profile_images/1600143435775856641/uqgmtT23_400x400.jpg",ref_id:"a237ffb0-792b-484e-b12f-65a2b679eaf1",twitter_handle:"fnicencool"},{name:"prince ogbonna",profile_picture:"https://pbs.twimg.com/profile_images/1595693872637681664/TeWJzTut_400x400.jpg",ref_id:"0b0c70b1-23b1-4d98-b259-6dbb67b7481d",twitter_handle:"princejoj0"},{name:"The Bitcoin Village",profile_picture:"https://pbs.twimg.com/profile_images/1544318244789649410/kQ2G1MCE_400x400.jpg",ref_id:"d894aca4-36f6-4821-a00b-a4e860b19502",twitter_handle:"VillageBitcoin"},{name:"Masterguantai",profile_picture:"https://pbs.twimg.com/profile_images/1521025685078302720/w9dZwehS_400x400.jpg",ref_id:"29baf525-42eb-41a6-98f9-a0d6b4480af0",twitter_handle:"MasterGuantai"}],hosts:[{name:"Jeremy Garcia",profile_picture:"https://pbs.twimg.com/profile_images/1589056396816896001/dslbBQSX_400x400.jpg",ref_id:"e5e68f75-d71a-4477-ae9a-6a891f2d84d0",twitter_handle:"Jerimican5445"},{name:"Satoshi’s Journal",profile_picture:"https://pbs.twimg.com/profile_images/1598641632601047042/qrZMP5Oy_400x400.jpg",ref_id:"d977ed11-09b0-4143-828d-582ecb8b58ca",twitter_handle:"SatoshisJournal"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/9b2e17f2-71c5-4f1e-a3e7-720d06dab810.jpg",keyword:!0,link:"https://stakwork-uploads.s3.amazonaws.com/uploads/customers/2707/media_to_local/bef977d0-8a6a-441b-a8cb-58baebe2bfd7/b9ec2918-1059-48ac-b5ee-69018c42a07c.mp3",node_type:"clip",pub_key:"03c18d0c6c35333f22bc524e21a5fd1d2d9886f5d4d958dc1de95d025de5c84cfc",ref_id:"63cc2dff-cc56-40e2-8c22-93153e7d3255",show_title:"Satoshi’s Journal",text:"It looks like Olu finally got up here. I know he's having some issues. I think he's at the Bitcoin village, so connection is not very good, so give him a chance. Olu, if you can hear me, how's everything going at the Bitcoin village? Yes. I have to hide myself in the heart to be able to talk. Can you guys hear me? I'm in a whole place. Can you hear me? What did you say? You're hiding in, like, a heart, like a small bamboo and tree kind of thing we put together so we can hide our head here when the sun is very construction site. Hello, everybody. Top of the morning. It's been crazy. Bad network, but still we have some level of internet. Anyway, thank you. Jeremy Tk. Towel. Prince Blanca out there. I see Janet. I see amica. Extremely. Daniel, lots of you. Big respect. Thank you. Thank you so much. I'm freaking excited. We're getting donations. $1,500. We're getting donations. It's crazy. Yeah. No, it is, man. Yeah. I can hear you. We can hear you, Olivia. Oh, yeah. Okay. It's so amazing that you have to look. Things happen, right? Nigeria's name is known for multiple things. Apart from our musicians painting the country in a positive color by winning Grammy awards, BT awards, and whiskey. David Bernarboy doing well. Our politicians are denting our name with their corruption and some fraud. Stars are also messing up the name of the country with scam. But bitcoiners are lifting the name of the country up. In many cases, when people do stuff, they associate Nigeria with scam. Unfortunately, it's not about that. The major percentage of people in Nigeria are very good people. And the base coin village is a big example of one of those good projects. Although I have seen and heard people say one or two negative things on Twitter, I smile. I will come here, and I can see the progress. And very soon, they're going to start seeing pictures, and they will see and they will come here. The people who don't have the opportunity, capacity, or one or two things are the people that will miss out. But because it's a monumental structure, you will come here. Maybe if you can't make it in 23, you can make it in 24, 25. The building will be there forever. When we leave this face of earth, when I am no more, when myself and Jeremy are no more, maybe 70 years from now, hopefully we'll leave longer. Because I would like to leave to, like, 100 years when I have teeth no more. And I can just I don't have to be able to pronounce it. I can actually picture that with you notice saying that. Can you say it again how you would be saying that? There are people called land grabbers. Land grabbers. Right. They take money from you every time you're doing construction. They table people. The government has dealt with them, but still that's what they do. So they were at the site yesterday with machetes and everything and sticks and they went to disturb the construction workers. So they called me. I couldn't get to them for a long time. They couldn't get to me for a long time. So when it got to me this morning, I had to step in to the CABAC, which is the paramount ruler, and of course some of the leaders. And we went to the site and we've been waiting for them to show up. They didn't show up because I already got military people on standby to make sure they don't disturb the progress of the work. It's not like they didn't vandalize anything, but they scared the workers away from the site. Anybody that knows Nigeria know this is how these land grabbers come, all because they want to get money. But I stack their money today. I'm ready to give to them. But I'm going to give them a serious warning. The next time they come and do such thing, you're going to be in trouble. So that has been the stress for today. They take money when you're about to do your after your. So what is trying to do is take money. They take money for digging. They take money digging, which is excavation. They take money for your DPC down proof cost. They take money for the first level of blocks. When you get to your decking. They take money when you roof. They take money. Once you put the gates. They take money until you're done with construction. They take money about five times. So if you don't know how to operate with them strategically, they can stress you. And they demand for crazy amount of money. They are called, or more, only length. The Nigerians here can attest taste to that. It's terrible. But I thank God I've been able to douse the tension. And they're requesting for $1,000. I told them that's crazy, I'm going to give you guys $500. So I told them you have to write an undertaking, blah, blah, blah. They refused to say never, blah, blah, blah. I put my phone number, I said I was going to record them, blah, blah, blah. At the end of the day, I gave them $200 first. I said, I'll give you 250. When these guys completely stopped the job today, finished their job today. So at the end of today's work, I'll give you 250. And I said, so let me take pictures with you. Stupidly. They took pictures with me and I recorded them when I was giving them money. Why did I do that? So that when they come another time or when another set comes. Because what they usually do is they come in different sets. So once you give them money, they tell other people, oh, he gave us money. So you can go and act like you didn't know anything about it. So those are the challenges of construction in Nigeria. And I think it's because the Bitcoin village, Nielsen, is already online. So some of them can go online and they can see, okay, this is a big project. As a matter of fact, whether it's big or not, anytime they are doing construction, they look for construction sites and they come and say, oh, we are the community people. And really the community don't like them. They are the thugs on its uneducated parts of the community that's full of disturbance. But the paramount king has given an order and set up like a vigilante group to protect the construction site workers. So that's just an update. There's a lot of work right there. So I wanted to update you all. That's what I went through in case somebody saw me and he took my pictures while I was Qurin. I said, get out of here, get out of here. It's just me trying to let our work be smooth, because they can delay work for like a week if you don't pay them. Like they delayed us yesterday. And every day counts because we need to launch this next year, especially during the conference. That aside, I can't wait to release pictures of updates for you guys. Most likely by I'm looking at next weekend, substantial progress would have been made. And I just want to thank the stock chain as they've been very nice. It's more like the stock chain as they are competing with each other. Somebody puts 100. Somebody puts 500, somebody put 1005. So, Jeremy, what we're going to do is what we have said before, after the orange song, we're going to have our meeting maybe today or much later or maybe by the next meeting, so we can put together a necessary document that is faction as we need and anybody that would need it. Maybe we're going to put it up on the official Twitter of the Bitcoin village and or invite people to private meetings. I don't know where we're going to put that up. Maybe it's a torture on the website so people can see some of the documents that we have all approved by the legacy government, and they can see the quotation from the QS, and they can see how transparent and the amount that the construction is going to cost you. And I know the quotation by the quantity surveyor. So we're going to put up the architectural drawing, the mechanical information, the electrical information, the soil test, the approved building plan from the government. All documents will be put up there with biweekly progress pictures and videos so that this donation can keep coming in, and not just for the donation's sake. Anyway, that's what we have said when it was just you and I working on this. Why do we have to be transparent? I've never, ever taken donations in my life. Public donations like this. And it's amazing. It's really amazing. The budget we had initially shut up tremendously because of inflation. Things are getting expensive day by day. There is blocks, cements and all that. And we really need to let people know we are building this for bitcoinners and even non bitcoinrs that will become bitcoinners. Who wants a bitcoin village and bitcoin development center that people will walk into and be very happy and befitting place that whatever certificates you get out of here would be valid for you and you'll be proud that you came here. Even if it is a developing community, in five years this place is going to be a city because of the fort mainland bridge. If they finish the fort mainland bridge by 2027, which is five years from now, I want to say five years because I know that the government can be very terrible and it might even take seven years. It's going to open up. And the value of properties here might shoot up to as much as $500,000 per plus. So we are properly positioned and we must do things rightly. I'm just so glad that the statuers have turned up for us. Even jeff boots and so many people have commended positively about what we are doing. This is what we plan between ourselves and look at the world embracing us. Even corey of swan give us a light by retreating. I know retreat is not necessary endorsements, but retreating on your timeline is some level of association and we appreciate that. So all bitcoiners follow bitcoin village, advillage bitcoin and trade at this particular and spread the word this that we're doing this on a private property so the governments don't have power over what we're doing. So care less about the naysayers and we will continue to be as transparent as possible. It's been myself and Jeremy putting our heart and money to this all the time and myself on the ground doing the work. But now we have you guys bitcoin as a family and I really want to thank phil for making this possible. Our teammates will involve the stock chainers and anthony of stock chain. Great guy. And all the stock chains and tao will give us more like an open attestation. Tao attested to our proof of work openly, without an iota of doubt. And I've never heard tao say such about any construction project around this bitcoin ecosystem, although maybe I've not featured in the space where it must have done that. But tao really talks in spaces. When he's talking, it's either educating or not. Now, this is not simply jeremy and all my team members know me. I don't care. I don't think I have sleep on my shoulders because I know how people look at me as a black man, and of course because I'm from africa, nigeria. So I protect my image, I get my money and I respect myself. But when people say something great about what we are doing here, far away, here in Nigeria. I have to give Kudos to what Kudos is due. So you can do your check and balances. You can verify as much as you want. The address is open with or without me. You can go to the village, you can ask village questions. You can go to the site if you want. Very soon we're going to put a big sign at the waterway so anybody that is on the boats can actually see the sign, verify. You don't have to know me and put the word out. Let them know we are building a bitcoin village. Some people, my colleagues, come if they like it's, to their own pocket. But when we start to give lectures and we start to graduate bitcoin and lightning developers, then you will go and ask those people that will be changing the world if it still is come, or you yourself is the person that is bipolar and have issues in your life. And I'm sorry, it's not to be condescending to anybody, but it's just how I feel. So thank you all. I'm sorry I came in here late. I've been trying to come online, but it's been terrible network issue. And of course, because I've been around putting in work, so I have to hit the road again. I may not be able to talk too much, but thank you, big thank you to stock chain US for donating their money. And because of that, we're going to make the budget transparent. From the engineer to every necessary person on the team will come on spaces at different times, so you can have a talk with them and all of that. This project is going to cost way over. Way over. The last time we checked in Nigeria, money for just one building is about 104,000,000 there. You can calculate that in dollars for whatever it is it's going to cost, whether black market rate or CBN rate. So you can see it's not a child's place. You see the type of building we are trying to do. It's something we could have put together a bongalu. And let's say we start to finish the bongalu in three weeks, but of what use would it be? Because it would be the same size of building and the same look with every other building in the village, we have to do something that the villagers will look and say, wow, okay, this is monumental. If this can come to our community, then we must take our life seriously. Like I told the young men that came to distract the place yesterday, I told them today, I said, look, you are only marking yourself negatively. Because when other people in this community will be learning and will be graduating and some of them might get employed by bigcoin companies internationally, you would regret your actions today instead of you supporting the progress of this building. Because with or without you, this will rise. You just take your money and you go on the day of lunch or by three years when this monumental structure is already manifesting lots of greatness, you'll be regretting. So you better go and change your ways and think of how you can come and learn. Maybe this is your go to opportunity to break through from the poverty that you have been entrenched in. Two of them came to me later and apologized and say, you will never see us here again. Please, I would like to learn bitcoin and I was very glad to them. So, yeah, what we're doing, the blockers here and there, but we are overcoming challenges and we are moving at a very unprecedented pace, even though there are delays. But I'm very glad. I thank you all. Sorry for taking your time. You can ask questions and hopefully you guys are preparing dusting your passport so we can all marry Gada as friends, as brothers, as one bitcoin is in Nigeria come March 2023. God bless you all. Hey, can you just give us an update as to what is going on exactly at the village? Of course. They started the foundation. So are they starting the first level of the blocks or exactly where are they at? Because I haven't talked to you to get an update on it. When you talk and you have Indians like this. So if I say today we're going to show you the level where we are at and we have some blockers and we don't make it today, it's going to look like, what's up? So look at the Nigerian bitcoin conference. It was supposed to be 24th and 25 February, but Nigerian government already splitted the presidential election for the 25 February and the entire week before 25th is going to be security, heavy security all over the country. So we had to move our conference a month after. Look at the radio show, which is supposed to start on the 11 December, which is two days from now, all paid up. We have to move the radio show just because we don't want our airtime to be exhausted and we can capitalize on the airtime for promotion of the Bitcoin nigerian Bitcoin Conference on the Bitcoin Village construction, of course, adoption, education, work. So I want to talk less and let videos and pictures do the talking and then we can have a proper space and title it Bitcoin Village Updates. Whether we can come ask questions thereabout. Yeah, that makes sense. No problem. The thing that you mentioned that was interesting to me that I would never have imagined happening. I've been in construction for over 15 years and I never would have imagined the fact that you have people coming to work on a construction project and then the next day another group comes and then the next day another group comes for the mere intense. Grab us or Lilac. Any Nigerian come up? You cannot whether you are building, whether you are the richest man on earth building anything in Nigeria, the size of their construction work is how they will mobilize. They will mobilize so much, and they will give you a bill. And the worst the government can do is just to come and chase them. You're going to call security for them, and they would get off the land. And the crazy thing is, they start stressing your construction workers. They start stressing them, stressing them, stressing them. They might relay them before you get there. And you don't want a situation whereby you're going to be involved in the police all the time in a community whereby you have been accepted. The paramount king is in support. All the chieftains I support, 9% of the people I support. So if you bad eggs are only out to get their little unwarranted illegal money. But we're in Nigeria. It's crazy. Even though government have issued an anti land grabbers law, if it's supposed to be effective, but these motherfuckers are the ones encouraging it the most. The richest people in Nigeria, in Nigeria are the people that make use of these thugs. They use them for disruptions. So these thugs have contacts. At the end of the day, you, you, you call cops on them. The next you park jet, they go by car, you're not there or something. You know, you don't want all of that. You don't want to show because of you. And it's funny, they came out outside the community and they start to say, oh, my father had a house here 35 years ago. So it's not a bad news. It's just me being 100% transferring. So that, you know that that can be an entrance for one day, two days. If you don't manage it well, it can extend to one week, two weeks. It happens to almost every construction site, except you want to man a military base. And when I say military base, like two, three military guys, the Nigerian policies are much strong enough to stop them. You have to pay us the right pay them the day times four or five what the government is paying them to scare the land grabbers away. Yeah, that's very interesting, and yet one of many obstacles and challenges that you're facing. So for you guys that don't know, olu and I, we hired a surveyor and a project engineer. And if I could be there, I'd be overseeing the construction myself. But Olu is there, and he's the one on the ground doing all the work. As far as yes, we have the engineer and we have the surveyor, and they're doing their respective jobs. And what their positions? As in the construction project, those positions are very important, but it's very important to have someone on the ground to inspect the work. That's basically what you call quality assurance. And so Olu is doing a lot of things already. I mean, he's the CEO of bought me cash, and he's helping with Satoshi's journal, and now he's on the ground in the village. So I've told him many times in the conversation how thankful I am to have a partner that's doing this, because it's a lot of work. I mean, I've done construction for many years, and I've been the inspector, I've been the engineer, the surveyor, the designer, the quality assurance, I've been all of it. So I understand how intense construction is. And when you have to deal with shenanigans like what olu is talking about, additional to all of the other responsibilities on the construction site, that is a very stressful deal. So thank you, Olu, for the update. I look forward to the pictures. Already we have some pictures, but I think that it's going to be really cool to see everything come together and look forward to the videos as ",timestamp:"01:56:17-02:20:03",topics:["The Bitcoin Village","Nigeria","Bitcoin Adoption"],type:"twitter_space",weight:6.083251953125},{boost:0,date:0,description:"Michael Atwood talks about OshiApp",episode_title:"Cool Apps Built on Lightning - March 16, 2022 - Voltage Twitter Spaces",guests:[{name:"Chad Atkins",profile_picture:"https://pbs.twimg.com/profile_images/1200611447979544576/W9ocRJTb_400x400.jpg",ref_id:"62da3c50-0a46-400b-81a3-5f482f5b8fee",twitter_handle:"Chemchad"},{name:"Michael Atwood",profile_picture:"https://pbs.twimg.com/profile_images/1362207977470521345/Jy2_Ge60_400x400.jpg",ref_id:"16359ade-afb9-4a37-be0b-0844a6134327",twitter_handle:"Dooowta"}],hosts:[{name:"Nate Glasky",profile_picture:"",ref_id:"0662789d-b39e-4aed-ad6f-44257695b6af",twitter_handle:""},{name:" Bobby Watts",profile_picture:"",ref_id:"ae2685c6-1307-473a-95b0-87c234e50483",twitter_handle:""}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/2ec62250-4755-4616-8342-096a2cfab95f.jpg",keyword:!0,link:"https://www.youtube.com/watch?v=4EJrnxYOShY",node_type:"clip",pub_key:"",ref_id:"9f69933d-69fe-47a0-af4d-9d80726e60aa",show_title:"Voltage",text:"All right, it looks like Michael is here from Oshie app. I want to invite him up because I know he's got some cool game plan and stuff just going on, like from Miami, like getting Oshi app utilized down there. And he's got some traction in Texas, I think I saw Marty using Oshie app or something, like buying some local beef. And there's been some block parties using. So if you are available to chat, Michael, feel free to hop up. It's funny because actually that's one app that I am absolutely a fanboy over and I totally did not put it on my list for some reason. But yeah, dude, Mike. I see Mike all the time in Austin. So if you want to tell us about Oshi, Mike, feel free to raise your hand. Or we'll send you an invite or I can just explain it, but I'd. Rather you do it. Yeah, I can chat a little bit about it, I guess, until it comes up. But anyone who's not using Oshi, it's pretty sweet. Like, as a consumer, you can download the app and then just check locally what deals around you, what small businesses around you are willing to give you bitcoin back for coming in and shopping. And it's as simple as you get a gift card, essentially, like just a deal to that business, and you can go in and make that purchase and the business will say, hey, you get this percent sat back. And what's really cool from a consumer perspective that I like because I love whenever applications are gamified, kind of like fold. Like if you referred people to fold now that they have this every time someone swipes their fold card, I get paid. Like, in the last week, I've made 1300 stats just by referring people two years ago to fold. And Oshi is kind of the same way, but it's a little better where you as a consumer, if you refer businesses onto Oshi app, you can earn like a very small fraction passively on all the purchases done at that business. And there's like an incentive model that if you're an advocate for the brand and for those businesses, you can earn a little bit, too. But it's pretty great. What I would really love to see happen is, like, everyone's going to Miami 35,000 people next month, right? Like, if we could get ten to 20 businesses around the conference or onboarded to Oshi, you could just flip open the app, see what businesses around there want to support Bitcoiners. And it's like, yo, come grab a burger, get 15% back in SATS. And it just gets Bitcoin back to everyone who shops. And the thing that's really great about this is, if you've noticed, like, Lolly and Fold, they're really focused on bigger companies, bigger providers. And there's a lot of organizations, there's like three providers out there that give you access to these gift card networks. So if anyone wanted to spin up their own fold or Lolly or things like that, there's partners you can partner with that give you access to that. So there's tooling out there for big businesses, but there's not one out there for B to C. Like getting small businesses on board. It's something that's literally never been done. So it's pretty cutting edge and it's a big problem that could be solved. But I'm personally passionate about this because at my last job, I've managed marketing for small businesses for like ten years. And 60, 70% of businesses in America are small businesses. It creates most of the jobs in our communities. And whenever you can have a Bitcoin circular economy at a very local level, you're keeping money in your community. You're not exporting money to Walmart, who's then sending it to China. You're not sending money directly to Visa and Mastercard. You're keeping it on a local level, empowering small businesses and rewarding consumers for being a part of that Bitcoin circular economy. So if there was an application that was one that really gave back to local communities, it's definitely Oshi in my mind. Yeah, I think when I talked to Mike about Oshio a while ago, it was like what really kind of blew my mind was, up until this point, I always envision sort of brick and mortar lightning commerce to have the merchant generating the invoice from somehow. But with Oshi, the customer generates the invoice and pays it on their own phone and then just shows the merchant, basically, and the merchant scans it or whatever and says, okay, cool, you got it. And I just think that's super cool. And it takes away so much friction from the merchant, especially a merchant that might not be well, that might be like, Bitcoin curious, but doesn't want to have to run a note or BTTP server, something crazy like that. I just think that's really cool. And there was a Bitcoin block party, I think, a month or two ago in Austin, which where the Bitcoiners got a bunch of restaurants and bars to use Oshi, and there was a huge sort of get together around it, which was pretty cool. I hope they throw another one of those because sounds like a lot of fun. A lot of stuff is happening in Austin. Not going to lie. I'm going to invite Kyle Murphy up if he's available. I know you might be passively listening like Michael, but there was the hackathon this weekend at Pleb lab, the SATS by Southwest Hackathon. And I'd be really interested to maybe hear at a high level what were some of the projects, maybe that really had legs, that based on what you heard on the ground floor, like maybe people are going to pursue a bit further that could really come to life. I'm sorry, were you talking to me? It kind of muted as I accepted the speaking thought. Yeah. What'S going on? This past weekend we threw a hackathon. As far as some of the projects that had legs, I would say. I. Don'T have a lot of hackathon. I have zero hackathon experience to kind of counter it too. I've never been to a hackathon or hosted a hackathon before this weekend, but just from some of the things I heard from some of the devs who obviously have a bit more experience with hackathons than myself, it was really quite unbelievable. The amounts of high level projects that actually came out of this past weekend. I think we had ten projects that actually presented and a handful more that were built but did not present. Of the ten that we saw presented, there were seven or eight that I think really I'm not sure people will have the time to kind of really push forward with, but if they did, I would be bullish on seeing all seven or eight of them kind of push forward as a potential bitcoin company. The winner of the hackathon was a project called Pleb FM, which was like a live streaming stats kind of update for pushing music on, like a jukebox style kind of thing, where it was like you could basically pick a number of stats. You could get your song pushed to the top of the queue and you would see, like, a live leaderboard for music being played and streamed over the Lightning Network, which was really freaking cool. Nice, that's exciting. We saw some good business stuff. I know Nifty Nye and someone else were working on Lightning, like a dashboard for kind of merchant services, which I think for things like Ocean and a handful of other businesses are going to be really powerful. One of the things that's kind of really lacking for business integration is the company's ability to really trap and pay attention to what's going on in their finances. So the kind of Lightning dashboard that really showed like where money went, where money came from, kind of open channels and a whole host of other things in real time in a really easy to read manner was also pretty cool. And that was Lisa from Block Streams project. She's been working on that accounting stuff for a while, so that's pretty cool to see. Yeah, she kicked it into high gear this weekend. It was pretty cool to see. I believe she's actually sitting at Club Lab right now, kind of continuing to work on it. So as far as projects that are pushing along forward after the hackathon, that seems to be one of them. When you're in the groove, you're in the groove. Absolutely. Sounds like a good time. Yeah, it looks like we're almost to an hour. Austin bit devs is tomorrow. I will be there if anyone wants to say hi. I'm sure Kyle will be there. ",timestamp:"00:44:28-00:53:59",topics:["Michael Atwood"],type:"youtube",weight:6.080077648162842},{boost:0,date:1590465600,description:"How does Bitcoin is the next level of protest?",episode_title:"Chat 39 - Bitcoin Renaissance - with Marty Bent John Vallis Alex Gladstein Elizabeth Prefontaine Brady Swenson",guests:[{name:"Alex Gladstein",profile_picture:"https://pbs.twimg.com/profile_images/1382371620669452292/VOPKOc8w_400x400.jpg",ref_id:"49445c1c-7c66-4b73-9eec-09a337befbec",twitter_handle:"gladstein"},{name:"Marty Bent",profile_picture:"https://pbs.twimg.com/profile_images/1362747135981199370/mSy97J12_400x400.jpg",ref_id:"655bdcb1-21c3-411c-aa24-fe7e4c7a248c",twitter_handle:"MartyBent"},{name:"John Vallis",profile_picture:"https://pbs.twimg.com/profile_images/1568743166035070976/4MyKww8A_400x400.jpg",ref_id:"c3a9fe29-3b78-4665-af54-e293e9d68962",twitter_handle:"johnkvallis"},{name:"& Brady Swenson",profile_picture:"",ref_id:"0b68a085-0680-44b8-891c-6e1e84ac4eb1",twitter_handle:""},{name:"Elizabeth Prefontaine",profile_picture:"https://pbs.twimg.com/profile_images/1382790711427354625/D09LMToL_400x400.jpg",ref_id:"4506df72-5de4-4144-abc4-011408b6b496",twitter_handle:"Eprefon"}],hosts:[],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/9e7e229f-2631-4542-b5d7-7fcd502798dc.jpg",keyword:!0,link:"https://traffic.megaphone.fm/CSN4002307424.mp3?updated=1627951379",node_type:"clip",pub_key:"",ref_id:"67236e2a-900b-4cf6-bc6c-165c0f7e3219",show_title:"Bitcoin Audible",text:"do think eventually the impact of Bitcoin will be as kind of like this protest tool that can be wielded nonviolently in a really compelling way. And it's really tough to defeat governments when they have a monopoly of violence. You can do it. And in fact, nonviolent protests, if we're going to try to be optimistic here for Bitcoin, nonviolent protests are way more successful in history than violent ones by, like, an order of magnitude. I think it's something like 35% of all nonviolent movements, ranging from Gandhi to MLK or whatever, have ultimately been successful in the last 100 years. And only like, less than 10% of the violent ones have done what the violent people wanted to do. Right. For obvious reasons. Usually it's like a small group of male people willing to have guns who are willing to fight in these violent ones, whereas everybody can participate in the nonviolent revolutions. And these are usually like people power protests where you have to go in the street and try to convince the police in the military to join you, and then the dictator has no more people to support him and he's overthrown. This has happened quite a few times in the world. So bitcoin is like the next level of that kind of protest where we all start opting out to this other financial system. And I do think people it is inevitable that they're going to realize that and they're going to know that. But we're so early. I mean, we might be decades away from that being a reality. We're just so early. Less than 1% of humans have used Bitcoin. Far fewer than that. Understand Bitcoin, maybe 1000 of that or fewer. So I don't think that Coin needs our help, but I think bitcoin will be a tool that humans end up using to really erode some of these more arbitrary power structures. Yeah, one of the things I've noticed during the crisis is because I looked out and I asked myself, ",timestamp:"00:18:14-00:20:02",topics:[],type:"podcast",weight:6.0710978507995605},{boost:0,date:1625958277,description:"How the franchise model access the cheap capital from fiat money destroy small businesses",episode_title:"WHY ARE WE BULLISH? Brandon Quittem, Timothy Kim, Shinobi, Steve Barbour ep185",guests:[{name:"Brandon Quittem",profile_picture:"https://pbs.twimg.com/profile_images/1502403738861940736/9J5VuTye_400x400.jpg",ref_id:"65512044-7810-4ece-8156-5519e072cb66",twitter_handle:"Bquittem"},{name:"Shinobi",profile_picture:"https://pbs.twimg.com/profile_images/1526590501742428160/0Y5H2uJK_400x400.jpg",ref_id:"a05dface-33a7-400d-a749-99efe0d96118",twitter_handle:"shinobi602"},{name:"Steve Barbour",profile_picture:"https://pbs.twimg.com/profile_images/1592714173469065216/q8kXPyQI_400x400.jpg",ref_id:"63a731b8-4759-4360-9e9d-d66f884e12d8",twitter_handle:"SGBarbour"},{name:"Timothy Kim",profile_picture:"https://pbs.twimg.com/profile_images/1569681307029934081/2s_nWYo__400x400.jpg",ref_id:"e0323798-c70f-4cc3-96ff-87bab50c2313",twitter_handle:"realtimothykim"}],hosts:[{name:"Ben Perrin",profile_picture:"https://pbs.twimg.com/profile_images/1181715113226596352/ipGVEcYH_400x400.jpg",ref_id:"e6b013ef-178b-4b41-95ee-423148a3dc3a",twitter_handle:"profbenperrin"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/419512c2-e309-4b25-bfe2-cd481d53f66d.jpg",keyword:!0,link:"https://anchor.fm/s/11e95d20/podcast/play/37027401/https%253A%252F%252Fd3ctxlq1ktw2nl.cloudfront.net%252Fstaging%252F2021-6-10%252Ffb6d5638-4579-5707-9740-0e586c980ba7.mp3",node_type:"clip",pub_key:"037f7331a5bef6c6f880246747befcc3767f3bb9730bc5e6f7c3770f4184ed0bff",ref_id:"07ab82b4-2fe7-42f9-9018-bb8f4188eb3b",show_title:"BTC Sessions",text:"Can I just go down a random rabbit hole that I have thought about a month that you just completely unlocked? So I get really high a lot, and I do really silly things with my time me too. That I'm going to make a bunch of different hamburger recipes. And so when I do stuff like that, sometimes I have funnier ideas. Like, what if we open source the franchise model where I specifically lay out the exact process of something, like how it's supposed to be done, like how you're supposed to cook this food and I opensource it and anybody can do that. But if I catch you fucking up, if I catch you deviating from that brand, I get to sue the shit out of you and take a bunch of money from you. But if you follow everything to the tee, everything is yours. I was actually thinking of something like that. I don't know. I'm really open with what we do in our business. And I've always tried to help people and educate people in the oil field space about bitcoin mining. And I was thinking like, okay, we did a lot of work on building these designs for bitcoin mines, and I want bitcoiners to go out and be successful, whether they're like oil companies, whether they're like semi competitors or not. I'm like, maybe I should open source all my designs open source so that we're not going to legally do anything against anyone that builds exactly what I build. I'll give them all the spec, all the anything like suppliers. Because there's a lot more to business than just, like, how you build something. You guys still do well. And part of my idea was like, maybe I'll just go do this. A rising tide ends up lifting all boats anyway. It's going to make more credibility around what we do in our little niche market. And in the end, I'm going to get more business anyway and sort of what you're thinking. As long as they don't, I don't know, try to bring in their own legal, say, like patent something and try to bring in their own little legal monopoly around what they're doing based off our designs, then it's totally open market. I don't know. I think that's like a very interesting idea, something I've actually been thinking about a lot because I'd like to sort of maybe open source all the stuff that we designed in house that right now we would probably like certainly if it wasn't me at the helm, it was just like a regular Fiat Maxi. At Helm, we would go after anyone that copied it. But right now we're sort of cool with what goes on. But I didn't mean to interrupt you. You can keep going, but the liquor is starting to hit me hard. I know. I'm happy to hear that I'm not the only one thinking along those lines because I am exactly on the same point with you. Like, all of these small businesses dying and being cannibalized by these massive franchises. It's sickening. When I was a kid, I used to go around places and every place I want is the new unique thing for that area and that locality. And let's go find those things and experience them. And they're all fucking gone back not that long ago, I come from Newfoundland. There was a lot of and this would be the same anywhere, but I'm just speaking from my own experience, like my family history. There was always like, in this small town in Newfoundland where my people come from, there's always mom and pops. It was like father and son shops back in the day. Maybe mostly men doing a lot of the business stuff. But it was always like, this guy and sons or these brothers and like, you know, like, doing all that stuff. And the theory the Fiat sort of kinesium thinking on this is like, well, the Walmart models, like, push them all out and stuff. Like, no, it's not the Walmart model or the Amazon model that killed small businesses. It's fucking Fiat money printing that kills small businesses. It's not the fact that these guys made these big distribution change. It's the fact that they how do. Those get paid for it's the fact. That their access to capital, like, their cost of capital is less than everyone else. That's why kill small businesses. Fuck. I remember when I started my business and I was like, just trying to try to get sales. I would go to these, like, clean tech conferences, like in Alberta, like emissions reduction. Like, we do massive emissions reduction stuff. So I went to these emissions reduction, like, clean tech conferences and I'm looking around at what people are selling and I would do like a little pitch event, like a little pitch contest to see if I could get interest in our business and stuff. And I'm not a great pitcher, really, but there are these really polished people, like, pitching their products. But I look at their products and they stink. They're terrible. They're the worst. Like, they're not scalable in any rational world, but these people are just running around like these circuits of, like, emissions reduction conference, clean tech. And it's the same with all the buzzwords, like AI blockchain conferences, all that shit we dealt with in 2017. It's like all these non scalable crap products with these entrepreneurs raising money, but not actually getting customers. Raising money is the metric for success, but not getting customers. It's like customers is all that matters. Sales, customers, product, service. Sorry, we work. That's like one of the biggest Fiat Maxi disasters ever. Everyone's about raising money. I'm just, like, ranting at this point because I'm like, buzzing. But like, you go on, like LinkedIn, everyone's congratulating, patting each other on the back for raising money. It's like, why don't you talk about the sales you made, like, the customers you acquired? Because that's what's fucking important in real life. But it's just look at all the money we raised at this valuation. That's all it is on there. And like, all society is that way now. And then you see all these shows. You got like, Shark Tank, Dragons, Dan in Canada's version of Shark Tank, and all these entrepreneurial shows, like startups mostly. Not really a lot of people not really bringing much to market. But just like it's just like this VC hype scene, which is a whole nother rabbit hole, which triggers me is like the VC aspect of Twitter, which is like all these VCs on Twitter that are like, look, man, a VC is like a Fiat Maxi. There's no way around it. And all these people clinging on to bitcoin, it's like bitcoin is going to destroy your core business model in the long run. It's just like this weird juxtaposition where all the Fiat Maxis are, like, pumping into bitcoin. But I guess it's just people doing it what's in their own best interests. But the business models are incompatible with bitcoin, but it's just people doing what's in their own best interests and profiting in the short term. But it's like a weird it's like this weird phenomenon in the future, when bitcoin and sound money returns, there's not going to be this VC culture we're seeing right now, which are basically the dependence of the money printing hierarchy, right? It goes down to the VCs. And I don't know, I was just, like, getting there. Yeah, I bullish on small businesses, man. I think small businesses are going to be insane. Like, I can't wait for the bitcoin standard. And I really promote, like, I'm straight up promoting my own competitors in our locality, like the Lloyd Alberta, Saskatchewan area, guys accept bitcoin as payment, or if no one wants to pay in bitcoin, which is still hard to do. I have a lot of customers paying me in bitcoin because they're minors, so they have bitcoin. But like, you guys are selling motors. You're my competitor. I don't give a shit. Sell your motors, convert your profit to bitcoin and stay in business because that is how you're going to win as a small business right now. Yeah, Steve, to your point there, I think you identified a ton of issues that we're having right now. And they all stem from the fact that money is easy, right? And what that leads to is a cascading effect of the bigger you are, the closer you are, the more access to capital you have, et cetera. That's what drives our behavior. So until we change incentives, we're not going to see anything change in the real world. I have a slightly more charitable view of venture capital. I think what we have now is obviously an extreme overgrowth of that and it's way too much money sloshing around there. And you can see portfolios in VC land or directly correlated to how easy the money is during that during the period of their fund. No surprise. And so I think what we need is a bitcoinized world in order to change these things. We'll see a mass definacialization, which I think is a huge net positive for normal people. Right? I think it's demons. They're devil people. Okay, let's talk about this for a second. I think the caricature of these that we see today I would agree with, but I would argue that there is a place, and I want to hear you guys opinion. I think there's a place for people who place longterm bets on very risky type businesses. Right? I think the model makes sense. 100 failed and one of them changes the world. I just think that right now they have too much money, they're able to raise too much because everyone needs yield. So everyone's going through so hard to find right now. It's so hard to find. That's kind of the problem though is so much money flashing around is what makes them devil people. Because I agree that money printer is distortionary. They're like a secondary distortionary effect, throwing it around at crazy things wildly instead of thinking about who actually can make a solid plan in an argument to us, who do we know and trust and actually being scrutinizing and skeptical in where they put their money, the money printer distorts things and they wind up with a pile of money. And so they go on and distort things again because they just see it as a gambling casino. It's not the role, it's what our perverted monetary system, the mechanism converted the role into. Yeah, I have no ill will towards any VC or anyone that works in any of those. I just call it the cantillon ladder, right? Center banking down to the pleb. Like anyone hide the letter, it's no problem, you're doing what's in your own best interest and all that. But we're all working to reverse, just flip the mechanism of how money is created through mining and distribution, through sound bitcoin mechanisms instead of like the top down fiat mechanism. But it's just a commentary on like it's just this funny like, it's funny that some of the most prominent and influential people in the bitcoin space are like people that are in position. Like they're higher up the Cantillan ladder. Like they're benefiting from fiat. They didn't scrap and grow a small business into something amazing. They went to school. And this is not a knock on. These people individually, but it's just the system. Like, they go to school, they work for this fund, and they benefit immensely. But because they're like us, like the big bitcoinners, they go out and crush it. They want the sound money standard, too. It's just ironic to me. It's almost like coinbase. Like coinbase is an exchange. The more bitcoin succeeds, the less relevant they become. It's like you're putting yourself out of work in a sense. But, yeah, certainly it's never a hate against the player. It's just like the system is such a fucked up mess. There's all this irony and hypocrisy in this whole space that's funny to comment on because. It perverts everybody's actions. Right. The problem is I posted that what I was talking about at the beginning of the show. I took a screenshot of that CNBC upside of inflation, increased wages, and one of my friends commented on it, who's like an intelligent person, and he's like, well off and has a good job and everything. He commented, he's like, well, yeah, but the upside of that is that my debt gradually gets willed down and gone away. But when you think of what induced that debt in the first place is asset inflation. You can't just save money for a house nowadays and then buy your house or only have like, a short mortgage. You can't just for the most part, you can't just save money for a new car nowadays. You have to then you have to, like, get a payment plan and pay it off over 5678 year terms. Now people are looking at it from a perspective of, oh, well, maybe it's okay in this context because it fixes the problem that the problem itself caused. The very base layer of all of this perverts all of our incentives to drive us to do things that we wouldn't normally do in a system that is just a money that actually functions. In a free market. Yeah, well, speak for yourself, but I'm perfect and I always do the right thing. I just want to take it aside. We haven't heard from our friend tim, are you alive? Is the water working? How's the water? I think he's got a how are you doing, Tim? ",timestamp:"01:27:13-01:41:29",topics:["fiat money","franchise model"],type:"podcast",weight:6.056178092959222},{boost:0,date:0,description:"Will the Nation States survive the information age?",episode_title:"The Sovereign Individual - The End of Egalitarian Economics",guests:[{name:"chriskapilla",profile_picture:"https://pbs.twimg.com/profile_images/1362817539135463427/2AXUeFLV_400x400.jpg",ref_id:"9d495790-93f2-4d6c-b770-b2885f66859d",twitter_handle:"chriskapilla"},{name:"remydenton",profile_picture:"",ref_id:"5c5beb0c-c214-4f23-b79a-e71bf9368f2d",twitter_handle:""},{name:"JackRonaldi",profile_picture:"https://pbs.twimg.com/profile_images/1583261828628496384/IazkwYjk_400x400.jpg",ref_id:"01621476-f040-49dd-8160-4035228faf78",twitter_handle:"JackRonaldi"},{name:"AlistairZ80Aftw",profile_picture:"https://pbs.twimg.com/profile_images/1362882489895841795/gH2zix3l_400x400.jpg",ref_id:"3dcba197-47ca-40c0-857d-73cec4325801",twitter_handle:"AlistairZ80Aftw"},{name:"mattonbtc",profile_picture:"https://pbs.twimg.com/profile_images/1549459254280687618/jzdHJou3_400x400.jpg",ref_id:"998167d3-e036-4ef1-9a05-4f062903f0c5",twitter_handle:"mattonbtc"},{name:"wai_wairua",profile_picture:"https://pbs.twimg.com/profile_images/1536570699761848320/T10Owc60_400x400.jpg",ref_id:"c4d4ff36-73fa-4471-91ba-de0f99a49e99",twitter_handle:"wai_wairua"},{name:"UltraSolomon",profile_picture:"https://pbs.twimg.com/profile_images/1468332451055427601/YVgUuUHc_400x400.jpg",ref_id:"6371d519-cc98-4bf4-9f82-be17b1ea532a",twitter_handle:"UltraSolomon"}],hosts:[{name:"BTC_Venetians",profile_picture:"https://pbs.twimg.com/profile_images/1557482467539521537/Kel-eVww_400x400.jpg",ref_id:"a6313ca9-3869-4477-88ad-30172957edcf",twitter_handle:"BTC_Venetians"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/75ec86b1-cb6d-467f-a66e-5e642e5c126a.jpg",keyword:!0,link:"https://stakwork-uploads.s3.amazonaws.com/uploads/customers/2707/media_to_local/c8cc9ec1-061d-4f53-a24b-ee43a56c7715/e650057e-2369-4e75-8119-4975a1fc4cac.mp3",node_type:"clip",pub_key:"03eb026c3e6597055595e42299377a4e164982775cc67f1d2135d9f1cd3a89f526",ref_id:"e96970d0-30a7-4f86-8f81-996ba87a088c",show_title:"Bitcoin Venetians Book Club",text:"Kind of behind on questions here. So let's move on to the next one, which is, do you all think the nation state will survive? The information Age. Going to say, yeah, the big ones will, but in reduced form. What do you mean? America will, for instance. United Kingdom will. For instance. The smaller nations like China, and I don't mean physically, they're just more small in Fragility, if you like, will struggle to keep things going. Argentina will struggle to keep things going. I have the opposite opinion of this in some respects. I think as long as humans are, as long as we remain biological, we're very tribal creatures and we like to have identity. You just look at the soccer World Cup and during covered things were really heated in my community and became so tribal almost overnight between different camps of beliefs. And I think that during times of strife, we look for our colors and our team, and very few people are able to remain unbiased. And so I'm wondering if we'll ever truly be without that kind of place and home. Now I wonder whether if you're in New Zealand, you've got a much closer relationship to the Maori's over there, whether that color is what you said. We have nothing like it in England. Yeah, it might influence my views. Yeah, for sure. These things are different here. Can you speak to how much autonomy the Maori's have? Whether they want more, whether they would get more? Under what circumstances? Well, in the circumstances with the end of the welfare state, with the government finding it harder and harder to hand out free money, would New Zealand survive as a single entity like that? Or would the Maoris and the non Maori want to go their separate ways, much like Americans do with the Indian reservations tend to be autonomous in a way. That is what I'm trying to get at. Do the Maori's have that kind of autonomy that the engines in America and the First Nations do? Yeah, many are fiercely independent and we do have a treaty. But you can't ignore economies and their wealth was taken as an act of war and they were tricked and the usual kind of colonial game. And I don't know if you can unwind that damage. If the world were to change into an information age, if that loss of identity and loss of skill and loss of all that would actually kind of unravel, I think that the damages is probably a little bit too late. Thank you. And the situation over there is beyond my can. So thank you for explaining that. And then just to also challenge kind of what you were saying or at least my interpretation of it. So, like in the US. For example, or even in Canada, it just seems like there's a lot of divisions and some people have certain views and other people have different views, and it doesn't seem like they can reconcile on those. So I often wonder if you set aside military strength, which is where it's good to be united as one big country for all other intents and purposes. It seems like there's a lot of different views in the states. And should they all be forced to kind of share one set of laws and one set of beliefs and ideologies? And it seems like they just kind of rotate. Like one party is in power and they kind of screw over the rest of the people and then another party's in power and they screw over the rest of the people. So I don't know, it seems like that's not very stable unless what you're talking about, it survives. But maybe the states get more independence and people can move around and find things that work for them better than other places. So just looking at the chapter here and thinking about which nation states might collapse, first it says devolutionary pressures will tend to be most intense in large political entities where incomes for most of the population are stagnant or falling. Jurisdictions in Latin America and Asia, where per capita income is rising rapidly, may endure for generations or until lifetime income prospects there equate with those in the formerly rich industrial countries. And then it says, later on, another spur to devolution will be high indebtedness of the central government. So national debts would succeed 100% of GDP. That's just about everywhere by now, isn't it? Pretty much. Yeah. It's kind of like when a marriage is facing financial difficulties. It only compounds the problems. Same thing, maybe, with a nation state. When it's facing financial difficulties, people start pointing fingers and running into problems. Jeff, I think my base case for this is like some kind of world war. And once again, I think the authors might just be early and post that war. Then you have more of a dissolution into this kind of smaller states, not the huge nation states like I just watched in Japan, which is the quote earlier kind of huge debt, declining population, and they've just reactivated their military. And I think that's a very interesting. Trend, not a civil war. Being out of the states and everything else like that. It's so different there. It's very different. Perhaps you could comment on that. I don't know. Like, January 6, it seemed like they came pretty close, and I worry about what will happen in the next one, especially if Trump runs again. And whichever side wins, blames the other side for cheating. ",timestamp:"00:54:35-01:01:52",topics:["Economies of Scale","Nation States","Information Age"],type:"twitter_space",weight:6.051017999649048},{boost:0,date:1642222800,description:"[[Global Bitcoin Festival]]",episode_title:"WHY ARE WE BULLISH Duczko Thomas Jestopher Morgen Rochard Rick Vanderhulst ep229",guests:[{name:"Rick Vanderhulst",profile_picture:"",ref_id:"4c184180-b77d-4e25-ac7c-4d2e86cdde85",twitter_handle:""},{name:"Morgen Rochard",profile_picture:"https://pbs.twimg.com/profile_images/1362921386256211972/IpIK8cwI_400x400.jpg",ref_id:"c29b26e9-82c8-4c0a-8130-aa083d33ec48",twitter_handle:"MorgenRochard"},{name:"Thomas Jestopher",profile_picture:"https://pbs.twimg.com/profile_images/1607521016368201730/6GSHGkGX_400x400.jpg",ref_id:"50388de7-3ec7-401b-8349-5ee1d8a004c0",twitter_handle:"Jestopher_BTC"},{name:"Duczko",profile_picture:"",ref_id:"2b6de75e-0cf5-4fec-b458-d1b8ee3f86df",twitter_handle:""}],hosts:[],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/b87feb17-6926-4295-b2c2-d1c2e9d49ca8.jpg",keyword:!0,link:"https://anchor.fm/s/11e95d20/podcast/play/46171740/https%3A%2F%2Fd3ctxlq1ktw2nl.cloudfront.net%2Fstaging%2F2022-0-15%2F68b825e2-6752-7447-34ca-b27f0ea69256.mp3",node_type:"clip",pub_key:"",ref_id:"5bf12d7b-3c9b-4019-bca9-88899aaa4b35",show_title:"BTC Sessions",text:"I didn't say what I do now. So this is connected to what I've been doing for the past few months where I'm involved with a project called Global Bitcoin Fest. And we're a group of people that just enjoy listening to local communities tell their stories. What's happening in their community, what's the history, what's the setting in Argentina, Venezuela, Cuba, Ethiopia, wherever. We did this back on September 7, we did the first thing together. So we started back when neighbor made his announcement, 7 June. Okay, let's do a legal tender here. So we started having Twitter spaces where we were giving away sats in Latin America, Cuba, Venezuela, Sabato, and Mexico. So we formed a small group of people and chatting in a Twitter chat. And then one guy had this idea, okay, let's do a Twitter space 24 hours on the day. On the 7 September, let's do a nonstop 24 hours space. So we decided to separate out 24 sections and have communities join in from all over the world, 1 hour slots each, and talk about their community and kind of celebrate together the adoption of Bitcoin. What I was really taken back by was how powerful this idea was. There were so many people that just joined in and like, yeah, let's do this. We organized this literally in six days. And we had Japan, Australia, Tonga, and greater Polynesia, Vietnam, Hong Kong, Nigeria, Sudan, Ethiopia, Greece, Venezuela, Cuba, El Salvador, Argentina. Communities from all over the world were taking these slots, and we didn't have much time to assess what the actual quality would be of these spaces. And then we did 24 hours non stop. Just awesome content was just one space that was kind of like not really Maxy. But everybody else was really knowledgeable communities that have been really diving deep into this. And we got so inspired that. Okay, let's keep doing this on a weekly basis with one new country every week. So on Sunday, we're actually going to do Argentina was just announced last week. We did Guatemala, the week before that, we did Indonesia, before that, Japan, before that, Costa Rica. And there's an emerging pattern where people seem to have been these dormant cells. People have been kind of doing their own thing. They didn't kind of know what they could contribute or do. And then they've been building up all this knowledge by themselves and kind of Orange Pilling friends here and there. And now they're emboldened by everything that's happening. So, for example, I talked to Bitcoin, a Casi in South Africa, and he was like, look, I didn't know how to apply my knowledge, but now I got so inspired by Bitcoin Beach in Alzheimer. So I started this with my surf kids that I'm kind of supporting. There's 40 kids that I'm trying to impoverish communities. I'm trying to help. So now I'm bringing in Bitcoin as part of their education and making it part of my project and making like a small Bitcoin Beach here in South Africa. And there's all these small stories where all these community builders have built up knowledge for so many years. When I first drove into Bitcoin in 2017, there was so little. I felt it was so hard to find good quality knowledge. I found Andreas Antonopoulos, and that was kind of it when I was trying to Google it. So I got all fooled by the shit coin stories and everything, and I just went all in on shit coins, and then I lost 98%. Now, I really believe that ",timestamp:"00:19:46-00:24:39",topics:["global bitcoin festival"],type:"podcast",weight:6.044204792136057},{boost:0,date:1596671100,description:"Bitcoin mining;User's choice in defining value",episode_title:"Chat_45 - Bitcoin & an Energy Revolution, A panel at the VOB Conf",guests:[{name:"Christian Stoll",profile_picture:"https://pbs.twimg.com/profile_images/3296579573/69ebedb479a9bdb9d536fe887e2d3113_400x400.jpeg",ref_id:"ff74d59c-f846-4b16-a5e5-771fb8139f18",twitter_handle:"Granddragon14"},{name:"Jesse Peltan",profile_picture:"https://pbs.twimg.com/profile_images/1123954968636088326/EAjHUGDE_400x400.png",ref_id:"96309505-caeb-47bb-a1ba-712b97292675",twitter_handle:"JessePeltan"},{name:"Phillip Sandner",profile_picture:"https://pbs.twimg.com/profile_images/1043824764161335296/2SW3duCV_400x400.jpg",ref_id:"e1996e82-0354-421c-85d5-f18eebec9506",twitter_handle:"philippsandner"},{name:"Tone Vays",profile_picture:"https://pbs.twimg.com/profile_images/1416821178266787844/T1OkI9ZW_400x400.jpg",ref_id:"da6fc991-7080-461c-86e3-4ac18c2f413d",twitter_handle:"tonevays"},{name:"Christopher Bendiksen",profile_picture:"https://pbs.twimg.com/profile_images/1362772558882484233/3nS-l35s_400x400.jpg",ref_id:"d99d354e-41d4-4117-9b70-05955a85f9da",twitter_handle:"C_Bendiksen"}],hosts:[{name:"Guy Swann",profile_picture:"https://pbs.twimg.com/profile_images/1401969630634196995/DqOuszMi_400x400.jpg",ref_id:"39c31930-d799-40a0-9a46-193117d03418",twitter_handle:"TheGuySwann"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/9e7e229f-2631-4542-b5d7-7fcd502798dc.jpg",keyword:!0,link:"https://traffic.megaphone.fm/CSN6935967461.mp3?updated=1627959014",node_type:"clip",pub_key:"",ref_id:"4636725f-ae47-4777-bd41-f78a4694ba05",show_title:"Bitcoin Audible",text:"Yeah. And there's kind of an inherent moral question there as well, is that do we get to subjectively put our values on to them? Like in making judgments over whether or not they can make that choice as to whether or not it is their value or not? And obviously, in a decentralized system, what are you going to do to stop it anyway? It's inherently an incredibly difficult thing to control or alter. Yeah, this gets to a very deep level of freedom versus coercion. Who am I to say that you're watching a Netflix show is a waste of our common resources? I mean, that's not my tournament to make, of course. Did anybody compute how much electricity costs to watch 90 minutes electricity. Honestly, there's research out there looking into data centers which is directly linked to such activities. I have one student that looked into Amazon, currently the comfort print of Amazon, where you actually have streaming as one source of electricity consumption. I made an estimate, I think two years ago of the electricity draw, just gaming console Iceland in the United States and it's on the level of something like 50 kilowatt hours. Wow. I like to make a couple of points here. So I think that one of the important points to note is that electricity consumption is not in itself a bad thing. So electricity consumption, like electricity production and consumption is good like that is that provides value. The negative side is when there are externalities associated with how that is produced. So if we enable more renewables, more sustainable energy sources through bitcoin mining, then it's a net positive. I think the other part that is important to note here is that in the total scale of human energy consumption, bitcoin is nothing like it is completely dwarfed by any industrial process, aluminum smelting, like concrete production, scale production. Bitcoin is such a small drop in the bucket compared to any of that, that any effects that bitcoin has on a more financial level, like if there's restructuring in the way that business is done, that will be far more significant than any effect of the direct energy consumption ",timestamp:"00:21:12-00:23:48",topics:["Bitcoin mining"],type:"podcast",weight:5.944497585296631},{boost:0,date:1670547229,description:"Thoughts on the gridless mining operation that started in Africa and how the progress has been",episode_title:"Rabbit Hole Recap #230: Building in the Bear Party Rip",guests:[{name:"Jason",profile_picture:"https://pbs.twimg.com/profile_images/1458137423716622342/ctyc_MTX_400x400.jpg",ref_id:"ca893631-4be5-42c4-bff1-92cc2f6e43fe",twitter_handle:"JasonWrich"},{name:" Texas Slim",profile_picture:"https://pbs.twimg.com/profile_images/1589784780970795011/02jf0fqp_400x400.jpg",ref_id:"add0c8be-0524-43e1-a3a3-aea1058057d4",twitter_handle:"modernTman"}],hosts:[{name:" Marty Bent",profile_picture:"https://pbs.twimg.com/profile_images/1362747135981199370/mSy97J12_400x400.jpg",ref_id:"0b8ba673-da17-4371-a6e1-dd112d173b14",twitter_handle:"MartyBent"},{name:"ODELL",profile_picture:"https://pbs.twimg.com/profile_images/1421584695746338819/Z_7ZfAeP_400x400.jpg",ref_id:"6981a34b-301a-45f1-8299-59a3f719f6e2",twitter_handle:"ODELL"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/da64b29e-c2c0-41a6-ba29-acbaa2d022e8.jpg",keyword:!0,link:"https://anchor.fm/s/91b8fbc8/podcast/play/61912544/https%253A%252F%252Fd3ctxlq1ktw2nl.cloudfront.net%252Fstaging%252F2022-11-9%252F301977145-44100-2-474e79172e2da.mp3",node_type:"clip",pub_key:"0372cd0c8469f2034336a243e018d4d60e07efef8e7d10417807da1173bd5b002f",ref_id:"f66a9f05-a885-44f3-9673-f910c78d6360",show_title:"Rabbit Hole Recap",text:"This was cool. We were talking about this earlier, block and Stillmark, right? Yes, Stillmark and Block led a $2 million funding around for a bitcoin mining company in East Africa. You guys may have seen it's called Grades. You may have seen videos of bitcoinners. I believe Nick from Luxor, Marshall Long from Rhodium, and a couple of others took a trip to Africa a few months ago. And the common video they were sharing was like a mining operation working off a small hydro facility in some rural place. Micro hydro? Yeah. In Africa. That's what Grid list is doing. And the way I understand it, these Grid List has basically got a problem where they can spin up these micro hydro turbines that produce electricity, basically have. A pipe that running water runs, and they throw turbine in there. Yes, but it's such a rural area, they don't have that many customers, and so they have to sell the electricity at a relatively high cost. What bitcoin mining is uniquely suited to do is come in and consume a lot of that electricity or use a lot of electricity to produce revenue. They have small rural villages that have no electricity. They come in, they put a new electricity project in. They subsidize with bitcoin mining. Yes, exactly. I think it drives the price from like seventeen cents kilowatt hour down to four, three or $0.04. They have pictures of some of the operations. It's like super bootstrappy and just really a lot of just like creative engineering that's going on there. Yeah. So shout out to the team. I feel like there's a lot of overlap there with the ranching community. I would like to see all these small producers have little micro mining operations. And that's the cool thing, is we have so much of our irrigation water is in pipe, so it's very seasonal when it runs. But as long as you have enough fall, you could put micro hydro in any of those pipes and utilize it to make electricity and mine bitcoin, whatever your season run long is. And in Tennessee, you see a lot of natural gas wells on these properties, too. Yeah, I mean, that's the first hashtag that we put down. You may have seen the video on Twitter, but it's literally our hash shut. There's a fence and there's grazing cattle right on the I love that picture. Yeah. And that's the cool thing. In Texas, you have all those non productive wells just waiting for the opportunity. All up and down the Texas Panhandle. I can't remember his name. His name was Bill. He came out to Colorado. He was West Texas. He's outside of Parritten. But he was fascinated because all the stranded gas wells in the Texas Panhandle, I mean, you can smell it. It's so untapped at this point. Well, we've talked about me and you have talked about and I know Matt, we've talked about too. But if you want to think about a significantly robust circular economy, you talk about a ranch with excess natural gas or excess hydro. That's mining bitcoin. You're tending to the land, producing cattle, and then you're producing money with your excess natural gas, hydro, whatever it is. You want to talk about yielding revenue per acre on a farm. Bitcoin mining really allows you to supercharge the value you're getting out of your land. And it battles all the droughts, all the manipulation in the commodity markets, hyperinflation, extended cut dates where you can't harvest a cow. I mean, talk about saving the rancher. That is the circle of energy that we talk about. And if you're using an electric heater to heat a barn or a well house or a spring house anyways, you're going to be burning electricity. You might as well mine bitcoin, use that miner as your heater and put that stuff in cold storage for whatever it is that happens to go sideways when you need it. It's pretty cool seeing all the club engineering around using S nine as heaters. Yeah. The 3D printed parts and different ducts. If you're a rancher out there renaissance lately on Twitter. Yeah. And if you're a rancher out there who's got excess hydro, excess gas in your land, but you don't have the capital to invest in a mining operation, reach out to bitcoin miners. You can go borrow it for Barry. No. Or you just broker a deal with a miner. You say, hey, I'll give you this electricity as a pastor, I won't charge you for it, just give me a repair on the bitcoin mine. And there is like a percentage gas or hydro sitting there anyway. You're not making any money off of it. You can make 5% satisfy stream from. A minor yet if they're flaring it anyways. Yeah. I mean, that's insane. I see how much they flare. That blows my mind. Talk about wasted money. Yeah. We're doing that here in Tennessee, tom and I at Standard Bitcoin up north, northern Tennessee. There's a ton of farmland with these wells on it like the one we're using with the cattle grazing next to we just go to landowner, say, hey, we'll pay your land lease for the year. Just let us find bitcoin with your gas. So you're not using. I'm more than happy to do it. Well, I think a lot of especially in Texas where I come from, we have to funnel that information. There's people out there that's going to be extremely interested. That was one thing that we found out during the summit this year. Those type of possibilities. In the beginning, I said, one of these days, ranchers are going to innovate further into bitcoin than any of us right here, because they have all the resources and once they understand it and they get that good education, it's going to be fascinating. We're at Jason's ranch, but during the mining conversation, we had all their eyes lit up. That was a damn good presentation. Meeting the pumps and stuff, too. They all right away and immediately obvious when one of us said just like, make sure you hire a licensed electrician, or it's like dangerous or whatever, they're like, honey, this is not dangerous. Exactly. But that was so classic. They're talking about doing this and doing that. As an underground coal miner that's dealing with 12,470 volts household power is no big deal. Then if you're a bit wider and you really care about the robustness and distribution of the network, there's nothing better than getting small modular mining farms or mining data centers spread throughout rural farmland. There's nobody better to protect a bitcoin mining operation than a rancher a mennonite rural Nigerian villages. Yeah, don't, come on, bring us happening. Yes, it is. Moving on from ",timestamp:"01:18:12-01:25:21",topics:["Africa Bitcoin MIning"],type:"podcast",weight:10.341832935773114},{boost:0,date:null,description:"Kenya background, culture and tribes",episode_title:"#Bitcoin Kenya 🇰🇪 - meet the Kenya Bitcoin community",guests:[{name:"Noelyne Sumba",profile_picture:"https://pbs.twimg.com/profile_images/1585949523901292545/tWf-IwWO_400x400.jpg",ref_id:"44455b1d-76cf-49df-baa0-cd606652885b",twitter_handle:"noelynesumba"},{name:"Okjodom",profile_picture:"https://pbs.twimg.com/profile_images/1577811376487088128/J2Z4nIgI_400x400.jpg",ref_id:"4c9df92d-3bb5-4d08-9a7e-a9ba15f58f03",twitter_handle:"okjodom"},{name:"Master Guantai",profile_picture:"https://pbs.twimg.com/profile_images/1521025685078302720/w9dZwehS_400x400.jpg",ref_id:"64c326c4-d4a9-4e6c-82fe-0c9bac8a7094",twitter_handle:"MasterGuantai"},{name:"Lorraine Marcel",profile_picture:"https://pbs.twimg.com/profile_images/2361719231/German_sheperd_Puppies_400x400.jpg",ref_id:"ab30679d-7931-4921-a4f8-6fee74e412c8",twitter_handle:"lorrainemarcel1"}],hosts:[{name:"Mary Imasuen",profile_picture:"https://pbs.twimg.com/profile_images/1465290507752558596/lZVbU9np_400x400.jpg",ref_id:"2d8ed8ce-5112-4dfa-9aa2-5fa8b874af68",twitter_handle:"mary_imasuen"},{name:"Lukas Poland",profile_picture:"https://pbs.twimg.com/profile_images/1382603302160932865/RgeQnCXM_400x400.jpg",ref_id:"217a2c5a-1cfd-4840-bbff-eec43da8c52f",twitter_handle:"duczko"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/56bbafde-60ef-4e4b-b930-978429c6a635.jpg",keyword:!0,link:"https://stakwork-uploads.s3.amazonaws.com/uploads/customers/2707/media_to_local/9f2ebf6e-a880-4579-986c-ff0c9c517559/2cb59251-775d-4691-9c8f-30fb9d7707b9.mp3",node_type:"clip",pub_key:"02574d6e8e787372184b6f17c40d6c6fe1777db9015801f95dfd24692784d767cd",ref_id:"0bb19102-ebb2-4519-ac7a-e6e69593a091",show_title:"Global Bitcoin Fest",text:"let's get started. We have the Kenya community here and let's talk about Kenya. Let's talk about what's happening in the country today, the economic situation, a little bit about the culture. But maybe if we could start first about the history of Kenya. Is there anyone that you must agree, Guantai, think would be the right person to start? I'll put Nilen on the spot, maybe to give a history of Kenya and that Bitcoin background in Kenya. Is that okay, Nileen? Yeah, it's okay. So when we talk about Kenya, it's a very famous country. Lots of people have heard about it. Kenya is a very beautiful country. I have to get it that it's located in Eastern Africa bordered by the Indian Ocean. We have the lake in the western region. We have a mountain in the central region. And most of you have heard about the Masai. Mara has very beautiful wildlife. And Kenya, what can I say? Population 56 million. So we have very many Kenyans. Kenya is a country itself is divided into 47 counties. And in the 47 counties we have almost 44 ethnic groups. So we're divided into tribes, 44 tribes. And I can say Kenya is more of a family and community oriented culture. Of course, this being influenced by the African traditions and what we experienced during the colonial period. And so far, I believe Kenya is a very innovative country, very driven country. And yeah, that's maybe in terms of the culture, in terms of the monetary history of Kenya, I can say Kenya became a colony in the 1920s and in the 1920s. We used to use the Indian rupee back then. And it was before that it was abolished and we started using the East Africa currency. So this was used between Kenya, Uganda and Tanzania. Back then it was known as Tanganika. So we've come along with, in terms of our currency as Kenyans eastern Africa currency was used for a while. Then came 1966. So we gained our independence at around 1960, 319 66. The central bank of Kenya was established. And with that, they started issuing currencies from five cents, ten cents, twenty five cents. Yeah. That was around the 1960s. If you look at history books, it says during that time, up to the 70s, kenya's economy was flourishing. So we were doing quite well until the 1980s. Usually talk about what the hell happened in 1971. So it really affected Kenya. And so the 1980s had lots of deterioration of the coffee industry, tea industry, which Kenya is very well known for exporting, if you've heard about Kenyan tea. So we had financial deficits in our balance of payments. There was a shortage of forex, very bad shortage of forex in the 1980s in Kenya. And with that, we, the government obviously turned to the World Bank and the IMF and it suffered the conditions that came with that through the structural adjustment programs. And so far, fast forward in the 1990s, we had the effects of the structural adjustment program. So in this, you found that the conditions were privatization of the public sector and also in terms of agricultural production, the government was really onto it. And the consumer policies, they were work 2021, we still are undergoing some structural adjustment programs 20 years later through stuff like the extended Fund facility from the IMF. And of course, it comes with its own effects. We have wage bill being frozen for the sector and for the health sector, for example, that led to the firing of lots of Nazis. So you find that our health sector, the key areas that are important to people, end up suffering first and the health sector amongst them. So, yeah, I can say in terms of our history, we've come a long way as Kenya, but we are still persevering. Thanks. Hello. Is anyone with me? Yes. I was just waiting if somebody else wanted to jump in to share about Kenya. Yeah, only Lorraine can do the culture for us. Lorraine. I just arrived from Ghana. I was with Lorraine in Ghana. She's a fantastic lady. I got to meet her for the very first time, and that felt really good. So, Lorraine, if you can tell us what do you think about the culture of Kenya? Okay, thank you for that. Nolene, it was also a pleasure just meeting you. Noline has mentioned we have 44 tribes. Different tribes. Right. The funny thing or the interesting part about Ken we don't have one major culture that defines us all. We have different tribes, have different distinct cultures. And this is interesting because as we meet, we get to chandler about each other. I'll talk about having different groups. We have three distinct groups. I think there's a fourth one. But I'll talk about the banter. I'll talk about the nylons and the Cush outs. So within these three groups, you also have now we have the tribes in them, right? And the Banter is actually the major one. We have the Luas, the Kikuyu. The canvas all in the bantu's. And I think Gwentai and Nolin at our bantu. And then there's us, the nylon, the Lewis, the massage, the Kaleen jeans. And then we have the Kushites and so much more. Right? I believe Kenyans are pretty enterprise. They are hustlers mode. Of course, not as much as Nigerians, but we are very entrepreneurial. We like to do business, we like to get things done. We are very friendly. By the way, Kenya is a very welcoming country. That's why you see, like most investors actually just like to come to Kenya and have their business here. Invest in us, invest in our structure. Right? What else can I say? When it comes in terms of religion, it's an open thing. We have freedom of religion. You can be a Christian, though. Majority are Christians. And then you have 10% being Muslim. And then there's a small section, the Hindus and the Sikhs, minorities. But it's an open space. You can worship. You can worship or just pray to whoever, anything that you want. What else can I say about our culture? I think that is what I would say about culture. I'd also talk about as Kenyans, we can boost about the natural resources that we have. We have the wildlife, we have the mountains, we have the lakes, we also have the oceans. It's really a beautiful for people who are thinking about coming to Kenya, it's a beautiful place that you can come to. You won't necessarily miss a thing to do here in Kenya. You can visit the Maasai Mara as Nolene mentioned. You can visit the Indian Ocean. You can even just chill in the bushes with the lions and the giraffes and all that. So about language, I think that is part of our culture. We actually speak to Ahili and English as the main languages here. And so Healy was brought about by the Arabic and then east people. This was to facilitate the trades back then, the East Africa, we have Tanzanians, Ugandans, also speak Swahili. What else? I think that's about it. When it comes to our culture, I'll just call you, okay? Because I can't pronounce your name. Would you want to add something on that? Just mention the favorite food. Kenyans love their Galilee and you can take it. The number. I was in Ghana and I think I told noline. I miss Susan. I want to go back home and eat Susan. So it's true. Absolutely. Yeah. So you have to try that. It's made of khan. So khan pairs very well with things like fish. And there is also another highlight, which is Namatoma in Sahil that is roast or grilled beef. Could be beef. Could be good. Very good. If you're out there taking a bit of a drive, experiencing game drive, you're experiencing maybe the beach. If you ever visit Kenya and go to the cross part of it. So there's a bunch of things to see. It's a lively culture, very welcoming, but that is objective from this side. So you have to experience it for yourself. You're welcome. ",timestamp:"00:37:27-00:47:45",topics:["Kenya structural adjustment","Kenya cultures","kenya"],type:"twitter_space",weight:5.850915908813477},{boost:0,date:null,description:"Bitcoin is the only asset that don't have counterparty risk",episode_title:"Bitcoin Backed Stablecoin’s",guests:[{name:"Andrew Begin",profile_picture:"https://pbs.twimg.com/profile_images/1461826323102449665/spEoEcpR_400x400.jpg",ref_id:"28db7b9d-1c71-4981-8044-baf001e58b94",twitter_handle:"agbegin"},{name:"Yago",profile_picture:"https://pbs.twimg.com/profile_images/1369335486456684546/AIJdrQ5l_400x400.jpg",ref_id:"0819a9d1-c085-42d5-8b3b-bc3ce79ff1ea",twitter_handle:"EdanYago"},{name:"Sovereign Horizon",profile_picture:"https://pbs.twimg.com/profile_images/1604168916300873731/mLszGVm6_400x400.jpg",ref_id:"6c159904-fe63-437e-91b5-5c444bbd11fa",twitter_handle:"SovereignHRZN"},{name:"Art of Thomas",profile_picture:"https://pbs.twimg.com/profile_images/1547047357371797504/avnHBa2W_400x400.jpg",ref_id:"2c312138-9a5f-4a75-9c19-513d5703d5ce",twitter_handle:"TheArtOfTomas"},{name:"Maximiliano Carjuzaa",profile_picture:"https://pbs.twimg.com/profile_images/1566622024662917120/B6uyn9QR_400x400.jpg",ref_id:"a5273c83-28f1-4df3-b8c6-d3b081f55b31",twitter_handle:"maxcarjuzaa"}],hosts:[{name:"Alexandria The Great",profile_picture:"https://pbs.twimg.com/profile_images/1575525599493427203/XubWEoDX_400x400.jpg",ref_id:"0c977f79-ed3c-46e9-8363-6c6c519d014a",twitter_handle:"alesander97"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/046c6869-0627-4825-8ecf-45ff0aed97b6.jpg",keyword:!0,link:"https://stakwork-uploads.s3.amazonaws.com/uploads/customers/2707/media_to_local/5e4a506b-0534-4217-b682-b568f6212b73/2b4c8ed5-a7cc-43df-95f1-0d75e2c886ab.mp3",node_type:"clip",pub_key:"",ref_id:"3ff527f0-04a4-4bb5-9279-87f48ac98da0",show_title:"Alexandria The Great 🌋⛏🇿🇼",text:"Yeah, I love that explanation. I think we can't really get rid of counterparty risk. But I do think that there are ways of minimizing it as much as possible. And when I look at all stable coins, I think the one stable coin that really stood out to me was dollar and chain for how it minimized the labor of counterparty risk by firstly making sure that everything was done by small contract or funds. Like Yoga said that everything can be you can look at all the amount of bitcoin that's backed on the exposure so you can verify everything. And then also the fact that it's backed by for 169, for example. Even. Though there's a dispute about how much that's relevant. But if you look at most of these other like you talked about Taylor for example where you first had counterparty risk when it comes to just who is keeping the funds with the UST where you don't know whether how much these guys have in the bank? The audit. The auditing and all that stuff. I see. So when you have a question, maybe you can dispute about what I'm saying. No, not at all. No, it's not related. I can go after it. You can go now. Sorry. I guess it is kind of related because with the dollar backstable coin there will always be risks. But when I'm using USBC, okay, it's very centralized. And yes, the risk is that my money could be frozen by the US government if they were to enforce that, which I believe they do in some cases, or at least on Tether. I'm not sure about USBC, but the point is that they could. But at least I know that there are dollars in a bank account. Or at least it's supposed to be. But with USDC, I believe it's more transparent. Right. I don't know, Max. I think maybe just when I read about the money on Shane, I was a little bit scary because there's so many tokens involved or maybe I don't understand it yet, but maybe there's something I'm missing and I'm hoping to learn. Yeah, I just wanted to agree with what you were saying, Alex, and at. That point, ",timestamp:"01:12:39-01:15:04",topics:["Bitcoin asset"],type:"twitter_space",weight:5.823068022727966},{boost:0,date:1675801804,description:"Hacker space opening in Italy similar to Bitcoin Park",episode_title:"CD87: Bitcoin Dev Kit with Steve, Daniela, Alekos, and ThunderBiscuit",guests:[{name:"ThunderBiscuit",profile_picture:"https://pbs.twimg.com/profile_images/1004180692794839040/qvYqY796_400x400.jpg",ref_id:"2932056a-dad7-4618-9c8d-d275b9f150d5",twitter_handle:"thunderB__"},{name:"Steve",profile_picture:"",ref_id:"8602c01d-a34f-426d-b143-581f25d3d3c8",twitter_handle:""},{name:"Daniela",profile_picture:"",ref_id:"7d011916-5300-4d32-a08b-fe4731bff5f2",twitter_handle:""},{name:"Alekos",profile_picture:"",ref_id:"9b7499d2-4c12-48c9-b8ed-614d09f0fdf2",twitter_handle:""}],hosts:[{name:"Matt Odell",profile_picture:"https://pbs.twimg.com/profile_images/1421584695746338819/Z_7ZfAeP_400x400.jpg",ref_id:"4f2825ff-3b88-4595-84d4-36e81544b79a",twitter_handle:"ODELL"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/a09a2c49-84f1-4d0b-b150-6e6103f4ee41.jpg",keyword:!0,link:"https://anchor.fm/s/45563e80/podcast/play/64675885/https%253A%252F%252Fd3ctxlq1ktw2nl.cloudfront.net%252Fstaging%252F2023-1-7%252F311592986-44100-2-a038b9bfbe62c.mp3",node_type:"clip",pub_key:"037f7331a5bef6c6f880246747befcc3767f3bb9730bc5e6f7c3770f4184ed0bff",ref_id:"5458df9b-3a25-4e1e-b7a0-e14daaa8d66d",show_title:"Citadel Dispatch",text:"Speaking of communities, I'm going to self promote our dealers doing so. Daniel and I, we believe in Italy. We live in a small town Canon, near Milan called Brexit. Probably nobody has ever heard of it. We are bored when we're there. We just don't know what to do. So we decided to open kind of a bitcoin acrospace. Awesome. It's going to be super small compared to this. It's nothing compared to Bitcoin Park, but yeah, you got to start mall, I guess. Good goals to have that. So is it open yet? No. Right before leaving, we signed rent. Oh, congratulations. Yeah. So we found a spot in the city center. So cool. Like Italian. How far is it out of Milan? It's 1 hour by car. That's awesome. With trains, it's like 35 minutes. I love Milan. Milan is a great city. Yeah, I mean, yeah, we used to live there. It's it's good. It's also bad. Well, I'm a former New Yorker, so Milan feels like Italy meets New York. Yeah. Yeah. It's like it was very familiar to me. It wasn't like a tourist city. It was actually like I was there and people were going to work and things. Yeah. It was a big financial center of Italy, I guess. So, yeah. We're doing this thing hopefully in a couple of months, it's going to be ready and fully open. So if you come by Italy and. Europe, how do we find more information about it? Do you have a site or anything? Yeah, we have a website. The website is BS. It the place is called AK BS because BS is like the shortened version of Brexit of our city. Cool. Actually ACS, maybe I shouldn't say this because some listeners will come in and steal the domain for us, but Act PS is a valid DNS like domain. It's a Bahamas domain, but it costs like $500. So we can't afford it right now. Someone buy the domain for them. Yeah. And give it to us, please. So we have the Aces it domain, which was much cheaper. Yeah. We have a Twitter profile which is ACBS with the four in place of the year. Is that ACK. Like a meaning like acre? Because it's an accurate space. Yeah. And I think it's going to be where we want it to be. A bitcoin like physical place. Probably going to be more of a cipher punk. So we're trying to open it a little bit more. Yeah, not the sheet coins, obviously. Greater open source. But yeah, greater open source kind of environment. Because in that small town, there are not that many bitcoin. So if you just open a bitcoin space, I think what is going to come instead if we open a space, which is more of a basically where we teach about privacy, about freedom, about technology. Kind of like a CPB. Exactly. That's one of the big that's one of the big inspiration. 3D printing. Yeah. We're going to have a lot of non software stuff. So I want to have like 3D printers, CNC machines. That's awesome. But also like art and things like that. I didn't know. Yeah, that would be great. There's only one designer and we don't have any two of them. One of the things, we're not artists. We have art all over because you empower the local artists. We have walls. Yeah, that's what we want to do. Apparently policy is full of awesome art because I think at some point they managed to onboard the artist. So I hope we're going to be able to do that as well. To onboard people that are more of an artistic style than us. And they'll make paintings for us. You're first thing to go up on the wall, which is from here in Nashville. The Spiral guys took us out on a little team building exercise. We went shooting. Shooting automatic weapons and handguns. Love it. And sniper rifle. In an old movie theater. In an old movie theater. So anybody in Nashville here? I recommend going checking it out, but they let us keep the target from one of the from the sniper rifle stuff. So we got yeah, that's going to. Be the first part for that. Because in Italy, guns are like, I don't know, maybe for American people listening to these, they think, oh, California, nobody can get a gun in Italy is like worse than that. Nobody really? California is very easy to get a gun in comparison to Italy. Yeah, it's like in Europe in general, probably nobody has ever seen a gun. Basically. I'm glad you got to experience our local pastime. Yeah, I know. That's great. Super fun. You can train us in building Bitcoin wallets and we'll train you how to use them. Yeah, I know. It's super useful skill, actually. I mean, it's fun. But it was also interesting for me because I'm like, maybe in the future I'll need to shoot a gun. So it's a useful skill to have to defend yourself. And going back to the hackers conversation about yeah, not talking about people not taking personal feelings, that big thing. People don't have guns because they don't take responsibility for their own life, basically. And you're saying, too, it's a whole other technical rabbit hole to fall down, too, like how the guns work, how to maintain them. We didn't do that this week. But it's another protect. People know about those other things too. But to the hacker space, I mean, that is awesome. And I love seeing all the different spaces, physical spaces opening up. And one of the cool things with Bitcoin Park is like, a lot of people come here and then go back home and then they launch something back home. Everyone's just like, how do I do this in my city? Well, at the scale of Bitcoin Park, you do it by losing a ton of money. So I don't suggest that, but start small. Physical spaces are really important. And I'm happy if you guys need any feedback or anything like that, we're happy to help. And we're already talking about like I said, he was kind of helping us look at the coffee machine yesterday. Just but technological trading back and forth too. Like, alicos has a bunch of great ideas and Danielle like great ideas for hackerspace stuff that, hey, maybe that's kind of stuff we want to do here at Bitcoin Park. And some of the ways we've got some of the things we've set up here, the art and all those things, it might be taken back home. So, yeah, I feel like there's not so much of the practical side of building things. This is like a great off if they don't have 3D printers and stuff like that, which is something we really want to have tools. And you can I would love to. Have 3D printers here too. There's going to be a lot of cross pollination between all 100% oriented community. And it's very grassroots. It's very like bitcoin. It's inherently distributed. It's not like one group is doing it. You go back where you live and then you open one. I think for us, yeah, the main inspiration was parallel in palace because it's super cool. And again, also the same with us. Here was parallel palace. Yeah. We just made it easier to pronounce. Other places. Great. So, again, we're going to be like nothing compared to them. But that's, I guess, how you start. You can go up. At some point, we'll be reaching out to get a proper place. I'm already so hyped because we've done like a notion page with all the events we want to do and all the projects we want to work on. And there's just so much stuff. We're just like we're going to have game night and bitcoin night and movie night, where we show The Matrix and other films that might help people to just understand the, I don't know, like, psychopath point of view. And then we have so many projects we want to work on, like, I don't know, fridge, which you can be with Lightning and then you open it and you take whatever you want it to buy. Like a self service bar. Exactly, yeah. Because, again, I think the problem for us is going to be there are not that many bitcoins, so we have to be open to tech people in general, to people who build this. But it also will click to them. It'll click to them if they make their first bitcoin payment, actually just using bitcoin, even if it's the shittiest wallet. Buying a beer at your little bar with Lightning or with bitcoin. There's so many people that come here. It's the first time ever using bitcoin and maybe they've been in the space for like four years, three years, and they just never actually used it to buy something. They have this thing called the Blessed One One, which is an ATM, like a really small one, which accepts coin. So basically, people just I don't know, they take out their coins that's good pockets and they just buy one. Europe change. You put it in and you get SAS and Lightning and then you can. Buy them how to set up a wallet. Yeah. Great workshops. A thing. You guys did mention it before, but they do if anybody wants to support what's going on there. In Russia, they've got a BBDC Pay server where you can how do we get there? Donation page. Yeah, on the website. And it should be like a donation. On the front page, I think a link to it. Yeah. In the menu, I think, above. Great website. We're also on Geyser. That's fun. Yeah, but we don't have our own license. Yeah, we do have only address. Sorry, so what are you using, like a Lightning address with them? I didn't know they set up something for us. But they take a fee because we don't have L and D notes and they just pay service. Best approach? I'm looking at it. It looks great. 10,000 euro soft cap goal. Yeah. I mean, that's kind of a random goal. We're going to open the place anyway, so it's not like we need to reach a goal to open it. We're going to open it anyway. And we're going to start super small. Right now we're looking for a used furniture. Like we're looking for a desk that we can get it for $20 or something like that. Yeah, if you're going to buy chairs, we're going to buy used chairs because yeah, absolutely. Yeah. We don't have a specific goal in mind, but whatever we can get, obviously it's going to go towards ",timestamp:"01:06:35-01:16:24",topics:["Bitcoin Park"],type:"podcast",weight:46.10662364780383},{boost:0,date:null,description:"Bitcoin Standard is encouraging value for value system",episode_title:"The Orange Sun 🌞 VISA, MasterCard & #Bitcoin #BOLT12",guests:[{name:"Oluwasegun Kosemani",profile_picture:"https://pbs.twimg.com/profile_images/1538403135101800450/sO-RPI9U_400x400.jpg",ref_id:"25ce4b90-6689-4dd9-84b6-240c7bcbe407",twitter_handle:"MrlamilamiKosch"},{name:"~₿ Maxi~",profile_picture:"https://pbs.twimg.com/profile_images/1446241859651637250/i67F3y9p_400x400.jpg",ref_id:"ad997ae7-0726-431a-9f72-82da091c0658",twitter_handle:"fede0891"},{name:"TK☣️Ph.Ple₿",profile_picture:"https://pbs.twimg.com/profile_images/1505791887415730177/d0YDQ3Xc_400x400.jpg",ref_id:"9e3ffa2c-9410-48e9-a726-8312c0abcd7c",twitter_handle:"ToxiKat27"},{name:"FireBurs†s",profile_picture:"https://pbs.twimg.com/profile_images/1517827165198458880/N79Wpx85_400x400.jpg",ref_id:"cda1d3ad-dd80-458b-a5fb-a28861df10a7",twitter_handle:"FireBursts"},{name:"Nikolai Tjongarero",profile_picture:"https://pbs.twimg.com/profile_images/1578458155964682274/_SzDxkAJ_400x400.jpg",ref_id:"821ee040-2267-454e-a59a-92da51568afa",twitter_handle:"BitcoinNaijaShw"},{name:"ブランドン",profile_picture:"https://pbs.twimg.com/profile_images/834861311762649090/N0KAP4zH_400x400.jpg",ref_id:"3d41531d-6a59-4771-81f9-0924b4c02561",twitter_handle:"blario"}],hosts:[{name:"Satoshi’s Journal",profile_picture:"https://pbs.twimg.com/profile_images/1598641632601047042/qrZMP5Oy_400x400.jpg",ref_id:"d977ed11-09b0-4143-828d-582ecb8b58ca",twitter_handle:"SatoshisJournal"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/9b2e17f2-71c5-4f1e-a3e7-720d06dab810.jpg",keyword:!0,link:"https://stakwork-uploads.s3.amazonaws.com/uploads/customers/2707/media_to_local/94a86a32-91c2-4717-b5cb-b36cef925776/38decc02-c922-4c1d-a605-7cd54c91a01d.mp3",node_type:"clip",pub_key:"03c18d0c6c35333f22bc524e21a5fd1d2d9886f5d4d958dc1de95d025de5c84cfc",ref_id:"5483d49e-fa1a-430c-9d2a-ed11e3a6beec",show_title:"Satoshi’s Journal",text:"I implore you to check out and have this website on your desktop or on your phone. I literally have it on my phone and I click them every morning for the show. Super helpful. They're free. TC is going to be making it open source, so we think it's good now, but there's going to be a lot of people that can make it better once he makes it open source. Timechainstats.com, I don't think is open source, that is Aunt's Baby. So he just updates it as plebs, give him inspiration or constructive criticism. He makes it better. So check out both of those soon to be on our website. And then lastly, most importantly, the subject today inspired by Master Guanti was just bitcoinners are charitable. We could probably talk about this for many, many more hours in 2 hours, but I think that the biggest thing that I've seen in the bitcoin space with bitcoinners is I haven't met one bitcoin that's not charitable. They want to help people, they're selfless. And I think bitcoin is a reflection of what the future is going to be. Because when your time is denominated by a money that is actually representative of your value, I think you'll be more happier. You'd be happier. Sorry. And you'll actually be able to help people because you'll have money that is not inflating away faster than you can create it or you can make it. And so I think right now we're seeing a small iteration of living under a bitcoin standard. So bitcoinners are trying to help each other everyday on spaces, even just taking time out of their day just to create a new tool. Like we just talked about timechainstats.com and timechain. Sorry. Timechainstats.com and timechaincollender.com. Those two tools were created by two individuals. Timechainstattsk.com has been in the works for over two years if I'm not mistaken. I think when I first got spaces, Ant was working on it and he's still been working on it and revamping it and making it that much better. I mean, he's not getting paid to do that, he's just providing a tool and it's a very helpful tool. And now you got time train calendar, same thing. TC is not getting paid for it, but he's created it. So I know that TC has a donate button, so if you have a chance to send him some stats, please do. I'm trying to find it now, actually. So if you go to the app, I think it's under, let's see, where is it? Oh, so if you click the settings button and then you go to contact, you can find it. It says, donate me a beer or cup of coffee. Cheers. So I clicked his donate button and while I'm here, I'll just send him $10 here. Okay, copy. And just go to Strike and $10. All right, so, yeah, you can simply do that. It took me just a few seconds, but at North, TC expect tips. No bitcoin, really expects tips. They give the option of tips, but, I mean, it's like freaking twisting a Bitcoinner's arm to be able to send them tips. Like, no one wants to get tipped. I mean, they do, but they don't like they feel like they're what's it called? They don't want to bother people. So, yeah, just tip those people that you respect their time and the value that they bring on a value to value basis. I think that's the future. It's funny because we should have already been living a value for value basis, where you provide value and you get whatever your value is in return. But Fiat has broken that system, but now we're living it. We're seeing it through our fellow pubs. They provide value and we provide. So, for instance, the videos that we've been doing with Wicked, those aren't free. He charges us a certain amount and I'm willing to pay him that amount because the value that his videos provide you all and me, obviously, is a function of how many views we get. So one video got 570,000 views. Apparently that was valuable. The current one is 15,700 views. Apparently that's valuable. So I will continue to provide monetary money to those people that provide value to me and vice versa. So that's just the way it should work, and that's how the future is going to be. ",timestamp:"00:29:58-00:35:57",topics:["Bitcoin Standard","Bitcoin Tools"],type:"twitter_space",weight:5.705638647079468},{boost:0,date:null,description:"Seed phrase metal backups - seed phrase stamping systems",episode_title:"#Bitcoin Self Custody Q&A Episode 15",guests:[{name:"@ToxiKat27",profile_picture:"https://pbs.twimg.com/profile_images/1505791887415730177/d0YDQ3Xc_400x400.jpg",ref_id:"29e1a1c3-1dbe-4ab2-955d-8a7a7476996b",twitter_handle:"ToxiKat27"},{name:"@Lil_WhiTe_Boi19",profile_picture:"https://pbs.twimg.com/profile_images/1594796869233811474/g0_ZRshz_400x400.png",ref_id:"c737d37a-be78-4bd1-823a-04d569aefcfe",twitter_handle:"w_s_bitcoin"},{name:"@Tarek_Z_Saad",profile_picture:"https://pbs.twimg.com/profile_images/1598082570931130374/aiUPJ1HC_400x400.jpg",ref_id:"16091cbf-d110-4299-af6e-84ecd0429d59",twitter_handle:"Tarek_Z_Saad"},{name:"@BeyondBlu3",profile_picture:"https://pbs.twimg.com/profile_images/1577513247107842050/JCDgPikZ_400x400.jpg",ref_id:"0be89e9a-6e96-4241-8ee8-cdebf9b134b1",twitter_handle:"BeyondBlu3"},{name:"@life2_one",profile_picture:"",ref_id:"d2a45191-e863-4e56-8a05-08afdff7f421",twitter_handle:""},{name:"@KahnsMichel",profile_picture:"",ref_id:"937fcaa9-4b73-4fbe-ada4-b40720644a1d",twitter_handle:"kahnsmichel"},{name:"@Jimmy14624",profile_picture:"https://pbs.twimg.com/profile_images/1594796869233811474/g0_ZRshz_400x400.png",ref_id:"73c17ab8-ce99-4c87-ba45-3334c255c97b",twitter_handle:"w_s_bitcoin"},{name:"@SovereignHRZN",profile_picture:"https://pbs.twimg.com/profile_images/1604168916300873731/mLszGVm6_400x400.jpg",ref_id:"2811a110-d1cc-4a2d-bead-59b4e1805817",twitter_handle:"SovereignHRZN"},{name:"@XpatSantiago",profile_picture:"https://pbs.twimg.com/profile_images/1599096281493778433/qeSvcIuj_400x400.jpg",ref_id:"bca4859c-3c8b-42c2-a0ee-86eb581f4078",twitter_handle:"XpatSantiago"},{name:"@MrHodl",profile_picture:"https://pbs.twimg.com/profile_images/1570497262735728640/q5ZDJFKz_400x400.jpg",ref_id:"8abfce7f-a49d-49f9-8bab-6861e41910d5",twitter_handle:"MrHodl"},{name:"@bankhatin",profile_picture:"https://pbs.twimg.com/profile_images/1596672372744019969/prxTKz_7_400x400.jpg",ref_id:"c4af2875-19ec-4439-85da-4ff34ae397fe",twitter_handle:"bankhatin"}],hosts:[{name:"Wicked Smart Bitcoin",profile_picture:"https://pbs.twimg.com/profile_images/1594796869233811474/g0_ZRshz_400x400.png",ref_id:"6bbf5f18-35e4-4ad0-aade-dbd493b1f4eb",twitter_handle:"w_s_bitcoin"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/4127f08c-505a-4a7d-935f-e93e87204089.jpg",keyword:!0,link:"https://stakwork-uploads.s3.amazonaws.com/uploads/customers/2707/media_to_local/58879b11-db25-4b12-b182-960933e015e9/df9bdaae-4143-4873-baa6-dd7e56407c6f.mp3",node_type:"clip",pub_key:"02814a5050f43a36bb052c7a3f22f0e86700abe037a44d99b45e0cb424d9398cbf",ref_id:"d9edac8b-8349-4e52-b61e-a22ef687f4f3",show_title:"Wicked Smart Bitcoin ∞/21M",text:"Hey, guys, I just had a quick thing. Ed, you were talking about stamping it in metal, and I bought a buddy of mine's house burned down and he left his chain in there and it was just a pile of melted. So the titanium thing is definitely for the heat, you know what I mean? I don't know what temperatures the other metals go out at, but there was some left of the metal. Yeah, there was a pile. Has a video of all the hardware, all the metal devices with. He went through, he stressed us. He took molten, basically fire. He was shot at with the AK 47. He did all sorts of tests and I'm not sure, I don't remember the exact results for each one of those titanium plates, but it's there. So if you go on Twitter and you look up Loft and you look up some of these metal backups, there's a video out there with him doing all these tests. And yeah, they're not all created equal 100%. Yeah, I think it's changed. Mostly made out of copper, I don't even know. Or nickel. Those are metals that have a much lower melting point than steel and titanium, obviously. Titanium has probably one of the highest ones, right? Titanium. You can literally drop it in a volcano and it won't melt in the lava. Not that it matters, but like yeah, in a house fire, I think as long as you have it stamped in steel or titanium, like, it will survive the fire, right? Whether it will survive a shot from AK 47, that's another question. I'm not that paranoid. I'm not getting shot at enough to really care about that. Fire gets hot, man. It made a Toyota into a pile of metal also, you know what I mean? So it's hot. I'd stick with titanium if I was going to stamp anything on, anything. But yeah, I will say I myself use titanium plates, as I said before. And there are some benefits to that one is that it's a lighter metal, so it's easier to just fucking store. You have a big pile of them. It's not going to be heavy. That doesn't really matter too much to most people. That's one, though, it's kind of nice. And then it's also stronger. So like, it doesn't bend as easy if you've got a thin sheet of it. Because the ones I use are like pretty thin little cards. They don't bend. But if you're using kind of a thin version made out of steel, it would start to bend and warp. That can be a little bit more of a concern if you're worried about the plate, like bending in a way that could fuck up the lettering or something. And then of course, the biggest benefit in my mind is like, it's just got a higher melting point. But all that being said, it is harder to stamp into. So you have to really put some fucking muscle into it when you're stamping these things, right? And I've posted videos of like not videos, but pictures of the hammer I use when I stamp these things. It's probably not the best hammer for doing it, honestly, because it's like a jewelry hammer made out of copper. But man, this thing is fucked. It's just totally warped where I actually hit it because you have to hit it really hard to imprint the lettering in titanium. So definitely it requires some proof of work if you want to use titanium plates, you know what I'm saying? Yeah, one more thing I just wanted to add real quick and I'm done. You guys say don't use your names in your seed freeze. Is that even common names in your past phrase in your past race? Okay, I thought it wouldn't generate a name, right? No. If you're curious about what words are in the seed phrase, you can look up bit 39 word list and you'll see it's a list of 2048 words. Each one has a unique starting four letters, right? So you only need the first four letters of each word. That's a little known secret, but like if you're stamping them in titanium, you're going to save yourself a lot of effort and a lot of time if you just stamp the first four letters because that's all you need. There's a little bit of alpha. And then in terms of your passphrase, that can be anything you want. So that can be any characters, upper, lower case numbers, spaces, literally anything you want can be that passphrase. Now, of course, the more crazy and complicated you make it, the more responsible you have to be when you are backing it up or writing it down or memorizing it or whatever. Right? So there's a trade off there. The trade off is you can make it really complicated, just like how you can make a password on your bank account really complicated. But if you forget it, then you lose all your bitcoin. So you just have to make sure your backups of it are done really well. Don't fuck that shit up because it's really hard to recover your funds once you forget your passphrase or are uncertain if like, oh, did I make all these characters some of these capitalized, or did I put a space there? Or did I use an underscore or that these types of things, just like a password. It gets really fucking risky once you start throwing in a bunch of random shit, and then you just have to make sure that he backed it up really good. You know what I'm saying? Yes. All right, let's go to whoever had their hand up first, wasn't paying attention. I just want to tell everybody, if you need something like this, I mean, steel crypto, you can just look, I'm sorry. It's written Sierra, Echo, Echo, Delta, October, Romeo. And they also got pretty cool videos on YouTube. And it's very small, and you can hide it in the door, or you can make a hole in the wall and hide it there. It's pretty cool. And it's about $150, and it's with hammer and stems, and it's made in Germany, stainless steel. I just want to let you know it's pretty good because it's not so big like a card. That's the difference. Because if you want to go out with it, I think a card can be pretty hard in your pocket, and it's just like a roll. It's like coins you stem. Yeah. So there's a bunch of options. There's a bunch of companies who are now starting to make different options for this, and there's a bunch of good options for me, myself. A lot of these options are getting pretty expensive, right? $150 for, like, a metal backup is in my mind, that's too expensive. I'm not going to spend that kind of money, especially since one thing I'm doing is I'm helping a lot of my friends and family kind of get their seed phrases stamped, whether I'm doing it for them or whether I help them do it. Obviously, if I do it for them, they have to trust me. But it's better than them fucking keeping their bitcoin on exchanges. So I do what I got to do. And because I'm doing kind of a lot, I'm like dozens or whatever, I've kind of made my own DIY system, stamping system, and each of the titanium honestly, each of my titanium plates runs me about $2.50 a pop. I've got it down. I've got my price down per se stamp. So I can't imagine paying, like, $100 just for one or two set ups, you know what I'm saying? I'm sure it's nice if you have. A good passphrase, you can make many backups, and you can spread them out. Seat race. A metal plate is nice if your house gets burned. But if you have a backup of your seed in your mother in law's house and your grandmother's house and your cousin's house, and in a bank account or in safety deposit box, if your house burns down and your seed burns down with it, well, you have four or five other backups in different locations. And as long as your password is good, that's the main thing. I try to, like, hammer home is that your passphrase has to be as long as your seat. Those first four letters of those words, that's how long it has to be for it to be as secure as the seat itself. So I personally have yeah, I have it. I bought Crypto Stealing a long time ago. I don't really think I ever used it because I just have so many backups laying around different locations. So I don't have that signal point of failure. So, yeah, it really depends on how you're set up. Also, if you're mostly safe then you don't really have to worry about any of them. Yeah, that's a whole nother can of worms, which always gets brought up. And I love talking about multi saga as well. I think it's pretty interesting setup configuration. The other one that a lot of people use is like you can 3D print or buy for like 510 bucks the the stamping guide for stamping steel washers, you know, and that's one that a lot of people use too. You just get yourself a bunch of cheap stainless steel washers. You stamp the first four letters in each one and then you bolt them all together. Make sure you bolt them in the right order, of course, but that's like a good economical way of doing things too. If you're trying to back things up a little bit cheaper. You don't want to break the bank for a dopeass stamping system. I will say, man, like the fucking what was that company that made the titanium ones, like the Thor, whatever comes with the hammer and it's like $300. I was envious of that stamping system and that's ultimately what got me to just do the DIY myself. Because if you look at my setup, I designed and 3D printed my own stamping guide. And if you look at it, it's like kind of pretty similar to what they had. But yeah, I mean, peach their own. Anyway, the whole point is back up your fucking seafarers. Don't rely on don't rely on your device holding that for you. Whether you're holding it on a hot wallet in your phone or whether you're holding it on a signing device, you got to have backups because there's no guarantee that your phone's going to be with you forever. You might lose it, the app might stop working, your signing device might break, you might burn in a fire. You guys have to have these things backed up. So either back them up on a piece of metal and store that somewhere safe or back it up in multiple places with a pass raise on top for that extra security. There's many different options, but you just have to make sure that whatever option you choose works for you and is secure. Go ahead, Sovereign. Yeah, I just want to comment on the price point of steel plates. I have been looking around a little bit. It looks like to me the best bang for your buck if you're going to go with steel is keystone. It's like exactly the same as biddle fabulous. And it's $49 and they also have $39 option and it's yeah, like using $100 or more for steel plate is just ridiculous. I know everybody loves to kill the bill fuddle, but come on man, it's not worth that price. So yeah, that's what I would recommend. Check out keystone. I know, I'm getting a couple of those from myself. Yeah, there's options for everyone at every price point I think. Yeah, I've got some poor friends and I'm just like buy some fucking washers and just get yourself a cheap stamping system off Amazon for like $20 or whatever and go wild. Because the other thing about these seed phrase stamping systems is you're not going to keep that seed phrase for your whole life, let's be honest. Most likely, most likely you're going to cycle through a few kind of throughout your time in Bitcoin, right? You're going to figure out a new way to set it up or you're going to want to just kind of make a new one just to make sure you're up to speed on everything. Maybe you will keep the same one your whole fucking life, I don't know. But in my experience I haven't. I kind of cycle through them every once in a while just to kind of keep things fresh. And so if you're spending fifty dollars to one hundred dollars on a brand new seed plate backup every single time you create a new seed phrase, I can get expensive real quick. So finding yourself an economical way of doing that might help out the other thing with these keystone. So here I'm looking at the link that you just sent in the nest. One thing I don't like about these things, these keystone tablets is if they ever get damaged, if they get warped and then those little letters pop out, then you're fucked. Right? Yeah. That's why they made the plus one because the cheaper one for 39, they had one slot for four letters but now they've updated it to the plus, which is like 49 instead of 39. And now they actually have one individual slot per letter and also like 20 more screws or something. So it should be better. But yeah, they can be worse. But for a multi sake set up, I wouldn't be worried. Okay, got it. Okay, I see here. It looks cool for sure. I've just seen some reviews. Like I haven't tried it myself yet, but it looks for the price point, I would rather get two of these than a bill model to be honest. Yeah, cool. Yeah, good stuff. All right. Well yeah, I think we kind of beat that to death. I just want to show you because I think not everybody got the knowledge as you post. I just want to make it everybody as easy as possible. So I just want to think to everybody, you know what I mean? I mean somebody get, I don't know, thirty k a month so he don't give a fuck about the cost. So that's a fiat world. It's so crazy and insane. ",timestamp:"01:23:06-01:39:40",topics:["Titanium seed phrase plates","Seedor","keystone","titanium"],type:"twitter_space",weight:5.703676700592041},{boost:0,date:1676083645,description:"Lessons from previous Bitcoin soft forks on Bitcoin",episode_title:"BR023 - OP_VAULT for Bitcoin Covenants Panel ft. James O'Beirne, Rijndael, Antoine Poinsot & Carman",guests:[{name:"Carman",profile_picture:"https://pbs.twimg.com/profile_images/1609775498971725824/5vyAafE3_400x400.jpg",ref_id:"09405d70-6fa6-4f2c-92f1-a2951ad56447",twitter_handle:"benthecarman"},{name:"Antoine Poinsot",profile_picture:"https://pbs.twimg.com/profile_images/1108377445936316423/ArRDGbr5_400x400.jpg",ref_id:"1ba10809-b3e6-4e37-a906-697a0368b814",twitter_handle:"darosior"},{name:"Rijndael",profile_picture:"https://pbs.twimg.com/profile_images/1542705395873058817/0zsy4Yur_400x400.jpg",ref_id:"861d5324-8ede-4059-826f-f29abca5d7e6",twitter_handle:"rot13maxi"},{name:"James O'Beirne",profile_picture:"https://pbs.twimg.com/profile_images/1542173995650408450/iDxrdmuj_400x400.jpg",ref_id:"e8e48fcf-9e54-4c66-9b20-aacf5c5b504e",twitter_handle:"jamesob"}],hosts:[{name:"NVK",profile_picture:"https://pbs.twimg.com/profile_images/608402052247658497/ENDv0BNd_400x400.png",ref_id:"d754e29b-2d3e-4280-8d72-f41d2a465a78",twitter_handle:"Coinkite"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/f1879df9-9bc6-4a76-951f-24548da768ef.jpg",keyword:!0,link:"https://anchor.fm/s/9500fad8/podcast/play/64850866/https%253A%252F%252Fd3ctxlq1ktw2nl.cloudfront.net%252Fstaging%252F2023-1-11%252Fc53436f3-e1a6-2cae-eecb-fb61b06f804d.mp3",node_type:"clip",pub_key:"037f7331a5bef6c6f880246747befcc3767f3bb9730bc5e6f7c3770f4184ed0bff",ref_id:"1510e150-aee2-42cb-ac57-79b4997bb6cb",show_title:"Bitcoin.Review Podcast with NVK & Guests",text:"Well, another thing that is a relatively recent development is I think AJ set up Bitcoin inquisition, which is let's proactively merge different software proposals into a Cignet so that people can play with them on a shared network. And so, unlike some of the more ambiguous ambitious big change proposals, because Op Vault is really targeted at a very specific shape of use cases, maybe there's an easier path here of it ends up on something like Bitcoin acquisition. People can build little dummy wallets and normal users can get a little bit of stick time playing with okay, what would custody in a post Op Vault world look like? And demonstrate that this is better. And so even if you don't know whether or not the mechanic is trying to screw you, you can at least kind of take it for a test drive first. There might be some stuff like that where it's less about how do we go and win the rhetorical fight on reddit and it's more about what can we do to incrementally derisk the proposal so that the community understands what they're signing up for. I mean, there was a lot of that at Tap Root, right? There was a lot of sort of working groups and things like that, but Tap Root still felt pretty rammed through. Optech did a workshop on tap root, I think, two years before activation. So you could write code and watch videos about tapirt, but people still felt like it was sprung on them. Tap root is just so hard. It's so hard to get. Until very recently, didn't I feel like, fully understand Tap root for this proposal? I had to write a bunch of tests. It's all in taproot. And there were things that I just kind of didn't understand and I found it pretty difficult to get sort of valid taproot constructions. And I basically relied on sort of the example code that other people are written. So, again, I'm massively positive on taproot. I think it's awesome, but it was like, so difficult to get your arms around. Even as a deeply technical person, I. Wanted to address as well. You said that it was a small group of people, but why it's true is that it was a small group of people that cut it for tapris. I found that there was a lot of demand and the defense had a high bar. Well, there was a lot of demand, a decade of research. When did we start discussing milk rice scrapes? In 2012 or something? With raspberry? Yeah, yeah, years ago. So, yeah, a decade of research, a lot of involvement, and a lot of people in the community with the workshops, a lot of involvement with the activation. And maybe that's why as well, people are not happy with it because they were actually involved. I think Teprit did put a very not high bar, but reasonable community involvement and normal user involvement. Schneider is a similar thing. Like, people have been wanting schnor and bitcoin for years. See, like, the Schneider is funny that he brought that up. It's always been a concern of mine that what if acdsa is back door, right? And it's not revealed for a long time and there is no proof for acdsa. So the idea of, like and again, this is a fundamental change to bitcoin, right? Adding another crypto primitive is like crazy different, but just having a secondary fallback crypto primitive in bitcoin before we're big enough that state actors are going to that extent, right? It's pretty cool. Thanks. Antoine is stepping out. Appreciate it. But now we have this sort of like the fights have always been hard. Up return limit back in 2009, 2010 because people are concerned about the worst part of Dick butts and then you had say P two Sh was also a huge fight. The original block size changed from 32 megabytes to 1 know SegWit was a bamboozle of most people. People did not understand that the block size increased. I don't know, I just hope that this one is not part of the contention. Like we can find a path where like this is the gardening sale, not the construction sale. I think the point Ryan Dow made is so good. And what I love about the idea of people taking this for a test drive en masse with inquisition is like that gives technical people who maybe don't want to work on Core or don't have time to work on Core can't they can write tooling to kind of make this an easier process to be able to experiment with this stuff more easily. So I just love that idea. I think something keep in mind too, like MVK, you just went through all those different software from the original block size decrease to like stuff like segment tapri like you didn't mention like CLTV or CSV or like BIP 66 I think, or 68. Like there's tons of bits that are like we're soft fork that just like are just normal things that happened and no one cares because they're like simple small upgrades that are ",timestamp:"01:37:06-01:42:14",topics:["soft forks"],type:"podcast",weight:47.136215082032344},{boost:0,date:1601200800,description:"Politicians defunding the police which resulted in an increase in the rate of crime in Manhattan ",episode_title:"Orange Pill [OP7] - Bitcoin is Love",guests:[{name:" Abe Cambridge",profile_picture:"https://pbs.twimg.com/profile_images/1368910908282572802/MTMBCPZU_400x400.jpg",ref_id:"5eed11cc-94e5-4e17-b923-95183699f193",twitter_handle:"abecambridge"},{name:"Mitch Feierstein",profile_picture:"https://pbs.twimg.com/profile_images/2625988157/vky9cedsgb0mf3usbh3x_400x400.jpeg",ref_id:"f9a70e2b-f905-4c70-afcf-3ef7004b7cab",twitter_handle:"PlanetPonzi"},{name:" Alakanani Itireleng",profile_picture:"https://pbs.twimg.com/profile_images/1512849723283185673/MzgEELWq_400x400.jpg",ref_id:"bda1bc91-3acc-4dc7-82eb-03c70f63525f",twitter_handle:"bitcoinlady"}],hosts:[{name:"Max Keiser",profile_picture:"https://pbs.twimg.com/profile_images/1361873587582472195/y57DiTYX_400x400.jpg",ref_id:"743efd07-d194-4c74-8663-45c3b8646b8e",twitter_handle:"Maxkeiser"},{name:" Stacy Herbert",profile_picture:"https://pbs.twimg.com/profile_images/1546484196750905346/5WYPz-bc_400x400.jpg",ref_id:"4b6f90a8-8e0b-4f51-8995-431a30cf87f4",twitter_handle:"stacyherbert"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/afa24463-19f7-4875-b6f4-b261d1d6c648.jpg",keyword:!0,link:"https://www.buzzsprout.com/1263314/5617321-orange-pill-op7-bitcoin-is-love.mp3",node_type:"clip",pub_key:"02574d6e8e787372184b6f17c40d6c6fe1777db9015801f95dfd24692784d767cd",ref_id:"5216f100-c7ac-4b62-91d8-e394f5a0d531",show_title:"Orange Pill Podcast",text:"kind of back to the 70s when I grew up here. But the crime is worse now. So it's a reflection of just complete lawlessness throughout. The police, obviously, have been defunded. So even if you wanted to, you know, the politicians said, defund the police if you don't defund the police. So they've taken away, what, half a billion dollars from their budget. And so the police aren't motivated to do anything. So the crime has skyrocketed here in Manhattan. It's very dangerous to walk around here. Is this a Larry David kind of is really dangerous. Oh, my God. Because I remember a little bit of the I'm sure Max remembers the 3000 murdered a year. Well, Mitch, you're saying that the streets are empty and I saw the videos and it looks really eerie, for sure. Only very occasionally are the streets that empty, so that's freaky. That's very freaky to have that day after day. So the crime where's the crime coming from? I've read some stories about it. So you have a lot more burglaries, I guess now. So people in the Upper East Side are complaining. So there's home invasions, there's burglaries. Is there a lot of crime with guns and knives, or is it mostly burglaries and muggings? Well, I think I think you have the whole gambit that you run. I mean, the murder rate is up close to 300%. Look, I was walking down the street and I was accosted. People tried to take my money. So I've been in the city my entire life when I was little, and I went in the wrong neighborhood. Not little, but younger. Still. Spiked the kids. Oh, my God. Yeah. I mean, I used to get beat up regularly, so I can tell when something bad is about to happen and when there are four guys that ask you for money and there's two in front of you and two behind you in the middle of the day in Midtown, there's nobody around. Something bad is going to happen. All right, so you're getting mugs, basically. There's a lot of muggings. You could get mugged any day now. Broad daylight. That's the new normal. It's the new normal. But I ran into the middle of the street because I'd rather take my chances of getting hit by a car or if one of them had a weapon or getting bashed in the skull. So I didn't get hit by a car, but a couple of cars jammed the brakes on, and the guys didn't chase me into the road, so I. Just took off meeting here on orange pill. One pill makes you smaller, and one pill makes you large. So you used to be a small person back in the walking around. Maybe that's why. Or maybe you're small now, and it feels like, you know how when you're tiny, everything feels bigger, but maybe the problem feels bigger because to me it seems like when I go to New York and I haven't been there in six months, but that it feels very sort of Disney compared to how it used to be. There was a kind of niceness about all the freaks and crazy people in New York City in the it's kind of lost that touch and maybe you need some more body slow. I mean, I remember Max's face like he hadn't been back to New York City in 1520 years and then seeing some people jet ski down the East River, like, how many corpses there's a. Lot of dead bodies in there. Why would you have a jet ski? Yeah, it's nuts now, though. But look, the police told me not to go out. I've got friends who work for the city, and they said, don't go out here at night. And I said, okay, great. But 11:00 at night four nights ago. I needed some ice cream bad. I was having an ice cream emergency. So what does one do? You walk to, of course, the CVS or the Dwayne Reid or whatever it is because they're open 24 hours and they sell ice cream. I walked in and the ice cream cabinet had locks across it. Have you ever gone in so far? And it said, Please ring the bell? I hit the bell and some guy comes like five minutes later and I said, You've got to be kidding me. You're locking up your ice cream? Are things that bad? He goes, oh, yes, they steal the ice cream regularly. They come and clean it out. I said, but isn't there anybody that sees it happening? He goes, no, we don't see it. And I said to him, I said, but the beer and the wine doesn't seem to be locked up. Wouldn't they steal that first? He goes, no, they steal the ice cream. I don't get it. That is definitely old school, where they had the plexiglass everywhere, at the bodega or at the grocery store. This was before you had big change like CVS coming in there. And of course, taxi drivers put up that plexiglass during the because of all the muggings that were going on. The subway system. We remember in the 70s as being all graffiti, all dilapidated crimes, boo, boxes. Have you been down the subway at all? Has it gone back to this state? I did try to take the subway during the day because I had a meeting down on Wall Street and it was empty. I took it and there was nobody on it. So it was fairly safe, fairly quick and painless, but nobody was on it. No graffiti going back to the 1970s. You know Tompkins Square Park in the East Village? It became an encampment. People were living there for months on end, became a nogo zone for police, and it was a drug open drug bazaar. Have we gotten to that stage? I don't think there's anybody here to participate in that. I think that if you look around on the street, it's like filled with homeless people and the people Bill de Blasio decided to let out of the prisons. So, I mean, that's the problem. I think he's let thousands of people out because of COVID, so coughing around, or they're out on the streets looking for somebody to rip off because they're convicted felons now that have been given a chance to come in and repopulate the city. That's why most of the people who live in Manhattan have left. I mean, most of the people who are here are gone. I went into my dry cleaner and he told me that the business is down 70% 70%. He goes, this is bad. And if you look, a lot of the shops are closed and they're never coming back. So if you think about that little video of Grand Central that I sent you and all the new buildings that have gone up, the real estate loans that are astronomic, there's so much space. They better get those printing presses on high here, I'm telling you. We kind of lost you a few times there, but I think everybody kind of gets the gist of it. But before we wrap this up, Mitch, I want to ask you one thing, of course, that we saw in the, as Max mentioned, Taxi Driver, the famous film, and the Times Square was the Deuce that was like the home of open air prostitution and drug dealing and all sorts of stuff like that. But we also had one thing we're missing in our economy these days, is the serial killer. I think most serial killers now, they used to be like in their thirty s and forty s. Most of them do school shootings and mass shootings at 20. Now, I think those same guys might have, you know, become serial killers back in the day. Do you think we might see the return of the serial killer to Manhattan? Because that's missing and we lost him. Well, it says my Internet is unstable. Did you get me back? You have me? Yeah, I see you. You're there? Oh, no, it's very unstable. You're a very stable genius, though. Mitch, what do you think about the serial killer missing from Manhattan? Are they going to return? I think that they are, but I think they've been reincarnated. I think there were 86 people arrested in Times Square last weekend with their peaceful protests. I guess that turned not so peaceful. So you're saying that serial killers have now become peaceful protesters? They've played antifa. Oh, my God. What about the squeegee man? Back in the 70s, everywhere you go, there's guys with squeegees who do your windshield for a dollar. Have you seen that come back yet? No, I haven't seen the squeegee men come back yet because I think people are too afraid with covet to open their windows. I mean, everybody here. This is the other thing here, petrified. And they've become a bunch of mask Nazis. It's like you have a mask on. What? You know, and they'll start screaming in the streets. If they catch people with no mask on, it's like, oh, my God, this is like the end of the world. Even if you're drinking some substance while walking down the street, you must have a mask on. So they got to figure out how to make the masks more permeable. Well, Mitch, I'm not totally convinced that you're not an alternative universe. Larry David, who stayed in New York and didn't go to Beverly Hills, there's a similarity between the two of you. I can imagine Larry David also getting in trouble with the mask Nazis, as you say. There you go. Well, I hope not. And look, I hope the city turns around but I don't see it happening, especially not with Mayor de Blasio in office. I mean, everybody's complaining about him. I don't think he's got one ally left in New York. I think he's alienated everybody. But I don't know if that's his plan, but I think he got to give New York City miss from now. On until I saw a statistic, something like 15,000 empty apartments. Is that number going to go up? Absolutely. There's plenty of stock out there that's empty. And who wants to rent a two bedroom apartment for $9,000 that you're going to have all the creature comforts and be able to have your meetings on Zoom. And no business is really transacted here. So all the apartments are pretty much cleared out. So I think they're going to have a problem, especially with the massive amount of new builds that they put up here that I've been railing about for years. There's not enough revenues to support that. And the tax revenues in the city have absolutely collapsed and they've cratered. So I don't know. We're going to have to have an economic reset or the planet Ponzi Ponzi scheme has finally exploded. But we're surviving on the fumes of Jerome Powell's quantitative easing. Infinity. But remember, you can never, ever Ponzi. Scheme, and that's a good place to end. And of course, do not worry about Manhattan real estate, because in the 70s, when they went bankrupt, not only did Donald Trump come to the rescue, because the federal government said what was the famous thing they said to Ford, said to Manhattan, shop dead. Well, don't worry, jerome Powell's got your back. And he's going to be buying up all those apartments in Manhattan and it's going to be fine because you can't taper a Ponzi. You can't taper a ponzi. Come on, dance. Boats on a Ponzi scheme. Everybody's getting ready. The boat's floating on Powell's ocean of money and we're all wearing Lays and all you can eat buffet at the FIA Ponzi scheme. Mitch yeah, all you can eat at the Warren Buffet. Yeah. Well, thanks a lot for joining us on Orangeville. Thanks for having me, guys. And be well. And I'll see you from London next time. Yeah, right. That'll ever happen? Is that the Curb Your Enthusiasm team music? It sounds like Barnum and Bailey circus on track. Oh, I don't know. Well, I don't know why, but every time we meet Mitch or whatever it is, say we go to dinner with him in Manhattan, it's like going to dinner with Larry David. Like chaos ensues. Right. Because there's always something that's wrong. Yeah. It's totally chaotic. Every time you're with them, suddenly the whole place is erupted in mad, chaotic scenes, for sure. Well, actually, I've got a New York City headline, and it does factor into this video, this viral video that we saw you of Max and Stacey, the twinning couple, responding and reacting to Jerome Powell's speech this past week. Well, there's the whole money printer go. The fact is you can't taper ponzi. But what's happened over the past few weeks and months is Jerome Powell has been trying to psych everybody out. Right? So in the spring, like April, May, they said they were going to buy all these junk bonds. And what happened? Junk bonds went soared, right? Like people went ballistic by piling in ordinary Robin Hoodters trying to buy junk bonds because they thought they were going to be like the hedge funds and frontrun the Fed. But no real hedge funds or private equity who have a private line to Jerome Powell did it because they knew Jerome Powell was going to step away from the market. And he did. But also, we see that the heart of the financial center of America, when they're just being sprayed with money and no real economic activity, we see just a total collapse happening in the real estate markets in America. And that's going to be, I guarantee you, within six to nine months, the taxpayer is going to start bailing out all of these REITs. This chart shows the number of turnstile entries, seated dining reservations, and how a popular New York City REIT is performing is, as far as I can tell, a darn good proxy of where New York City is heading. So we could just be mocking our friend Mitch Ferstein, who might, after he sees our reaction, like, not be our friend anymore. But the fact is he could be right? Because this is a collapse in all those, like, no activity on the New York subway, no activity at the restaurants, and the REITs are collapsing. This confirms what Mitch was reporting on his man on the street journalism citizen journalist. Mitch, this confirms what he was saying. Turnstyle entries. Right. This is a REIT. Right? Now, am I looking at this? Yeah, three lines there, and it's REIT turn style entries and food. You know, people sitting down for reservations at restaurants. Right. The ten day moving average. So it's up off the bottom, but it's still kind of scuttling around the bottom there so you can't sustain the economy. There's no V shape there. There's no V shape. It's an l. It's an L shape. And it's kind of an L heading, like an L heading slightly with a positive angular bias. But it's more L than anything else, which an L is for losing. Well, yeah, and part of the problem is you have the pandemic and the shutdown, which is restricting movement of humans around the earth. But you have things like this story out this past week with Finsen leaks, and New York City is one of the prime locations to launder your money. Right? So now Finn Send has to pretend to actually look at these SARS. What are the suspicious activity reports that they have to file? All bankers do it and to avoid any them getting fines or in trouble. So what. They do is they flood, like with all this paper money all over the place. They flood the Finsen, which is part of the treasury. The regulator is looking at money laundering. They flood them with these SARS. So they're looking at these suspicious activity reports and there's like tens of millions sent to the US treasury. And of course, what do they do? They've flooded with all of this money, these paper like reports, and nobody looks at them. It's just this vast, you know, kascis bureaucracy, because they just the banks just flood them like $10,000. That number was set, by the way, back in the 80s, so it's not that much money. And by the way, money launderers know you're doing that, right? So they instead buy Manhattan real estate or something like that. So we've had this situation now where the treasury and the regulators are overloaded with these pointless reports that just financially survey ordinary citizens and small business people and suppress commerce. Like they raise the cost of any commerce, right. It's more bureaucracy. Right. So bureaucracy gets in the way of commerce and it doesn't help anybody really stop the money laundering. Well, according to the Fence end report, no, the people who were now caught laundering and terrorist funding and the trillions, that didn't stop them whatsoever. Yeah. Well. Partly because what happens is if you have $5 billion that you've looted from an Eastern European nation. Right. What happens you go to your bank. One of these big major banks who. By the way. Helped write the money laundering laws so their lawyers can tell you exactly. For a fee of the 5 billion. We'll take a billion of your 5 billion and we'll launder it for you. And that's like a perfectly fine vig to pay, right? Anybody who wants to steal 5 billion, they're happy to give a billion of it over to somebody if they get away with 4 billion. These banks wrote the laws and they know exactly what they left out for their own clients, right? It's regulatory capture and it's gaming of the system. And there's a lot of humans involved. As I've explained on Wall Street before, the people who are responsible for regulation in the various offices are open to bribes. And that's true in every single layer of the financial stack that governs the American economy. ",timestamp:"00:16:08-00:34:28",topics:["Larry David"],type:"podcast",weight:5.601966619491577},{boost:0,date:1647061200,description:"[[Bitcoin Mining Incentives]]",episode_title:"WHY ARE WE BULLISH Kal Kassa Pierre Corbin Chris Smith Ben Gagnon ep243",guests:[{name:"Chris Smith",profile_picture:"https://pbs.twimg.com/profile_images/1248417464825724928/BjsozM7k_400x400.jpg",ref_id:"488a0f68-f24b-4d0b-9835-4b38a59f149e",twitter_handle:"chrissmithonair"},{name:"Ben Gagnon",profile_picture:"",ref_id:"d86128cb-056a-4233-bd95-cda98867f61c",twitter_handle:""},{name:"Pierre Corbin",profile_picture:"",ref_id:"a0a46e2e-1b24-4ce5-b34c-ca322067930a",twitter_handle:""},{name:"Kal Kassa",profile_picture:"https://pbs.twimg.com/profile_images/1515885093893681156/cpZcX_2q_400x400.jpg",ref_id:"5cf2cf3e-5cde-4426-b71f-f357195d40be",twitter_handle:"KalKassa"}],hosts:[],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/bbf0a536-990b-49b4-a9c3-a2a40fa38f88.jpg",keyword:!0,link:"https://anchor.fm/s/11e95d20/podcast/play/48924119/https%3A%2F%2Fd3ctxlq1ktw2nl.cloudfront.net%2Fstaging%2F2022-2-12%2F253272604-44100-2-dac52f14aaffa.mp3",node_type:"clip",pub_key:"",ref_id:"f5449a66-a156-4b0a-abeb-6ff5e28434ac",show_title:"BTC Sessions",text:"sure. So what I find very interesting about mining and house developing is just the incentives that are there for miners. Right. So it incentivizes the whole energy market to just become more green. Right. So it will put big miners at the center of this energy shift that governments have been supposedly pushing for years and also put them down the road at the center of the money creation. Right. Because we, of course, believe in a world where Bitcoin will be in the middle. And that's, in fact, maybe a question to you, Ben, is it already happening and to what point or when do you think could happen? The shift of rather than miners looking for the cheap energy and contacting energy producers, turning to energy producers, contacting miners in order to stabilize the grid and be able to leverage this cheaper energy themselves. Is there already this shift happening? Is bid farms being contacted already, or when do you see this really growing? Because I think this is when the hash rates will potentially increase even more. Right. Once these big players themselves get into this. Yeah, it's a great point. The vertical integration with the energy industry is really key. If you're thinking long term about Bitcoin mining economics and reward having every four years, obviously, unless the price continues to outpace the network by a considerable amount, you're going to have compressed margins. Right. And margins that get continuously smaller over time. So you're going to need cheaper and cheaper sources of power. And that can only really come from monetizing that energy that nobody else is using. So the vertical integration is here. We've been curtailing at some of our farms in Quebec since I think 2018, maybe even 2017. And at the beginning of this year, the program was so successful over the past couple of years, it was implemented across the entire province at every single mine. Texas is doing the same things. They have all sorts of curtailment programs for Bitcoin miners. And so it's really starting to enter into the mainstream space. You'd be surprised how many oil and gas companies and energy companies, power plant companies are doing their own small mining projects and pilot projects. These are massive companies. They don't need to press release something so small. They can do this under the radar. They can get comfortable with it. And I think what they're all learning or have already learned is that Bitcoin mining should be seen as like a buyer of energy or a buyer of last resort for your energy. And so energy is very interesting market energy is very easily stored, but electricity is not. And so once you've converted it into electricity, it's the flow of electrons. You can't really put that Genie back in the bottle. So cost effectively. And Bitcoin mining is a way to maximize utility and get all that full financial value out of it, which is a boon for everybody. It will reduce our costs, it will increase their profitability. It will incentivize more production, more development, more power generation, which should lead to increasing levels of human flourishing all over the world. Every time there's increases in power development and energy utilization, you have huge increases in human flourishing. I think this is what Bitcoin mining is really incentivizing. That's awesome. I wanted to share ",timestamp:"01:04:37-01:08:18",topics:["bitcoin mining incentives"],type:"podcast",weight:5.523631239085138},{boost:0,date:1589889600,description:"Small business and the Fresh Start Commission",episode_title:"How to Address Regulations Suspended During the COVID-19 Crisis",guests:[],hosts:[],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/da1bbdc0-4d0a-43ed-8345-ee43102db244.jpg",keyword:!0,link:"https://traffic.libsyn.com/secure/mercatuspolicydownload/MPD-038-PPIMCWebinar-v1.mp3?dest-id=655459",node_type:"clip",pub_key:"",ref_id:"55e562c3-41d2-4bfb-94d5-26ac7098ba2f",show_title:"Mercatus Policy Download",text:"All right, very good. Look, another question here. As we all know, small businesses have likely suffered disproportionately during this public health crisis. Are there specific actions governments could take through this commission to help them recover faster. Elliot, I'm going to send that to you first. Yeah. One that Michael and I have been discussing and talking about is business licensing. For instance, if a business's license expired during this coronavirus pandemic during the month that we've all been working from home, do they have to re register? Do they have to re up? Should governments deem them granted for a certain time after to allow them enough time to re register or lift the burden to allow them to reopen faster? Another one is digitizing government. A lot of how you create a business and how you file your taxes is still largely done by paper. One area where governments can improve that is by digitizing government moving that online to catch up in the digital age. All right, excellent. Does anybody else want to comment on that in the small businesses? But the whole point of this is actually to help small businesses by making sure that, as she states, localities and the federal government have the right attitude going forward, that they try to encourage the rebound and encourage the growth without actually getting in the way. Okay, very good. Our next question. Can I just add on one thing? I'm not sure I would quite agree that the whole point is to help small businesses. I think that's the effect, though. I think regulation inadvertently disproportionately harm small businesses. So to whatever degree they can be cut back when unnecessary, that's going to similarly disproportionately help small businesses. And you could target that. There's no reason not to think that a commission could focus on regulations that are harming small businesses more. For example, regulations that came out of DoddFrank. I think the intent of DoddFrank was to target larger financial operators, financial service providers, but a lot of smaller banks, a lot of smaller businesses got caught up as sort of collateral damage. ",timestamp:"00:20:54-00:23:11",topics:["small business","Fresh Start Commission"],type:"podcast",weight:5.479238152503967},{boost:0,date:null,description:"How to recover lost Bitcoin wallet",episode_title:"Café ₿: #Bitcoin Beginner Q&A",guests:[{name:"Peter",profile_picture:"https://pbs.twimg.com/profile_images/1581695667193643009/EljNY-TH_400x400.jpg",ref_id:"a3384925-e15e-421d-b9f9-6d44e273ed05",twitter_handle:"PeterAnsel9"},{name:"Stephan Livera",profile_picture:"https://pbs.twimg.com/profile_images/1362551718110580740/v-W5Q2uo_400x400.jpg",ref_id:"72f57157-c96e-4466-8bf1-290cfe1f8a0b",twitter_handle:"stephanlivera"},{name:"Thomas J Lake",profile_picture:"https://pbs.twimg.com/profile_images/1529168328534769670/5cl2Y_k-_400x400.jpg",ref_id:"21541a47-0601-447c-99c2-312d1a63c19f",twitter_handle:"thomaslake"},{name:"Goodguy",profile_picture:"https://pbs.twimg.com/profile_images/1363216959576285185/unulY4yd_400x400.jpg",ref_id:"0c3fec75-9cc2-4c0f-8dbe-db7fae2b585b",twitter_handle:"goodguybiker"}],hosts:[{name:"Brady Swenson",profile_picture:"https://pbs.twimg.com/profile_images/1502564606836981763/fmqtNrNc_400x400.jpg",ref_id:"49966553-d55b-44c9-94ec-8fee09eee5c2",twitter_handle:"CitizenBitcoin"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/239722cb-4216-414a-a17b-5adf9d52e15a.jpg",keyword:!0,link:"https://stakwork-uploads.s3.amazonaws.com/uploads/customers/2707/media_to_local/35b20273-49f2-45ea-a9f4-dc479d86573c/7ae5315f-beb2-41e2-b672-65dd1f102017.mp3",node_type:"clip",pub_key:"",ref_id:"df4ad67d-6316-4762-a7c5-884c162dd8a9",show_title:"Swan.com",text:"very short. Point and then something about this afternoon switch spaces. So you hear the expression programmable money. And someone once said it about bitcoin. Many people said bitcoin is programmable money. And now you hear about central bank digital currencies and you hear programmable money. What's the difference? The difference is bitcoin is money that's programmable by you for your purposes, to the extent that it's programmable CBDC is money that's not programmable by you but is programmable by the government so they can make it disappear from your wallet, they can make it expire, they can make it not able to purchase certain goods. Bitcoin, to the extent that it's programmable for you, is like you can spend it however you want, you can put whatever constraints you want on it being spent. So it's a difference of who's in charge. It makes a really big difference. The other point I want to make is if you can get that afternoon thing with Brady, Sam and Alex, I'm sure it's going to be amazing. They got really awesome topics on there which are going to talk about freedom, I'm sure. So if you can make time for it, do I unfortunately can't, but I'll be listening to the replay. All right, let's keep rolling with the questions we have up here. Chad d Wagner. Good morning. Hey, good morning, everybody. This is kind of a newbie question. I've been working on getting my coins off the exchanges and getting it into some hardware wallets. The question I've been kind of struggling with is, let's say I'm using the Moon wallet and for some reason Moon. Goes out of business or is taken. Off the app store, something like that. So am I able to take my. Keys and apply those to a different. App or a different wallet and recover. Those funds or how does that work? Yes. So the short answer is moon wallet. Even if Moon were to disappear tomorrow, there is a recovery tool, and that's publicly available on their GitHub. Now, Moon is a special case, just to be clear. So for listeners out there, most bitcoin wallets are operating on what's known as a typical seed word, the recovery phrase. Twelve or 24 words basis. That's what most wallets are working on. Moon is a special case because they use a descriptor wallet. Basically, it's a bit of a technical term, but they use a set up where it requires a little bit of a special way to recover if Moon were to go down. So what you would need is your written down, back up, and also the recovery kit. So in the middle button on the bottom on your Moon wallet, you'll see a tab called security. You click that in that backup, you'll see there's a three step process. The first step is the username and password, but you don't have to do that in this case, we're talking about if Moon wallet disappeared. And so that second and third step, that second step is you're writing down kind of like a passcode for a descriptor. And then that third piece is the recovery kit PDF. You would have to combine those two in order to be able to recover your coins. Now, Moon wallet have a recovery tool that you can run. And what you would do is you would create another wallet, generate a receive address, then run this Moon Wallet recovery process and input as part of that, the address that you want to receive all of your Moon Wallet coins into. I know it sounds a little bit complicated, but what we're talking about here is if Moon wallet were to totally disappear, the other case is if, let's say, you just lost this phone and you needed to recover it into another phone, then it's a simpler process, you could just basically use Moon and import an existing wallet. Are you following me there? Absolutely, yes. That would go for any of the apps or hardware wallets. As long as we have our keys, we can recover it somehow. Correct? But yeah, just note that there's a difference in Moon and most of the typical other wallets. That's just the key differences for you to understand. So, Chad, one of the important things I think to understand here is that when you're creating a wallet on a phone, you're using a persistently connected Internet device. So I would always consider apps that you make on a desktop, on a website, in a browser, or on a phone, what we call a hot wallet. And there's all sorts of terms we hear industry use warm wallets and secure wallets and all sorts of funny things. But if it's made on a website, in a plugin, in a browser, on your desktop, or in a phone, it's a hot wallet. And so what that means is there's potential that your private keys, when you're creating those 24 words, that information may have been accessed by no click malware that we know now exists, like Pegasus from the NSO group and all these other types of persistent issues, zero days that exist in a lot of the browsers right now. These attack surfaces that people are using to take that private information from people's plugins. So if you're looking to store your bitcoin for a long period of time, I would always encourage people to learn about and use something like a nano ledger or a cold card. These are physical devices that have something called a secure enclave. They have a special chip that does that 24 word creation offline and then hashes that information and sends it back out to the computer. So these are a superior way of doing this. We used to have to sync the bitcoin, blockchain up, and then disconnect from the Internet and create the wallets. And we had hundreds of different addresses. The benefit of using that stick is you can make hundreds of different bitcoin addresses and they can all be backed up by those same 24 words in a really easy to use, standardized way that you could put in any other hardware wallet. And lastly, I would encourage people not to digitize their 24 words, their twelve words. Anytime you can keep those things in written format, you can etch them into things like metal for redundancy from floods and fire. I think that's a much safer way. I would never store those things in a cloud or take photos of those things or print those things off again, because that takes a cold wallet created in an offline situation and it introduces online or potentially online devices to it. So even if your printer is not connected to the WiFi network, right, I would be wary of using that due to exploits and things like that. So writing these things down by hand and keeping them in multiple safe, redundant places I think is really important too. The Moon Wallet is great as a mobile wallet, like for taking money around, but I wouldn't leave money in it as a store value. Yes. Thank you. I've been experimenting with the Sparrow on. The computer side and then I got the Cold card. So I've just been playing around with everything and really enjoying it. Very cool. Yeah, that's great. So definitely once you're ready, get the Cold card set up. And what you can do is just as an example, test it out with a small amount and then practice, like as an example, spin up your Cold card, initialize it, and then if you're able to do the Micro SD card with Sparrow Wallet or Specter, then that's great. If not, if you're a beginner, just plug it in and you can use it just like that. And then you can practice sending a small amount of Bitcoin and you can even practice like, wiping the seed out of the Cold card and then recovering your twelve or 24 words by using the import existing feature on your Cold card. And so that can sort of help you prove it to yourself that, wow. Yes. With these twelve or 24 words, I can actually recover my coins. But if you want to do that, just obviously practice with a small amount, like $20, $50, something small. And then see, prove it to yourself in that way. Oh, wow. These same twelve words, it deterministically creates that same ",timestamp:"01:12:50-01:20:37",topics:["Programmable money","CBDC","Moonwallet","Bitcoin recovery","bitcoin"],type:"twitter_space",weight:5.435932159423828},{boost:0,date:1588968217,description:"Small intestinal bacterial overgrowth (SIBO)",episode_title:"Q&A: Kim & Dr Ken Berry",guests:[],hosts:[],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/a8e3517b-b44d-4270-adaa-57587896b1e7.jpg",keyword:!0,link:"https://traffic.libsyn.com/secure/ketolifesupport/ketolifesupport-0033-q-and-a-with-dr-b_tc.mp3?dest-id=2479037",node_type:"clip",pub_key:"032d7609ff3f4a5232e4d60967971e23bc671dfb68020845a59bab5dc1f3b93b87",ref_id:"2bf2f8fe-9d2f-4d41-838d-787f2ca9734e",show_title:"Keto Life Support",text:"SIBO, small intestinal bacterial overgrowth. What do you think about this? Some people make a huge deal out of this and they want you to buy all kinds of supplements and prebiotic fiber. Honestly, in my experience, eating a real whole food ketogenic diet, you repopulate your small intestine with the bacteria that should be there, because even the name of it implies that there shouldn't be any bacteria in your small intestine, which is absolutely not true whatsoever. But what you do want is you want very docile, tame, nice bacteria to be in your small bowel and eating the proper human diet, whether it's carnivore or fatty meat, heavy keto is going to repopulate your entire body, your skin, under your arms, your growing, all your spots that might have an odor or have gas or have bloating. All that stuff is just going to get better when you stop feeding and promoting the bad bacteria. My understanding is SIBO is when because your lower intestine is supposed to have a lot more bacteria, a lot more aggressive bacteria, but SIBO is when it switches it up and somehow the angry lower intestinal bacteria get your small intestine and vice versa. Is that right? That's the theory, but I'm not sure if I agree with that 100%. I don't know that that's ever been proven. It's very hard to get a scope into the latter part of the small intestine. We can get an EGD down through the stomach into the first part of the duodenum, but you have to swallow the camera capsule to photograph the rest of the small intestine. But you can't get a scope there to take a biopsy. The only way to get a biopsy of like, your jazzunum or your ilium is to do surgery. There's literally no other way to do it yet. And so even if you do a colonoscopy, you can only go to the sea, come and see the ileocecal valve. You can't get into the ilium any length at all. So when you start talking definitively about the bacteria in the small intestine, my first question would be, how do you know what bacteria is there? Because if you haven't had abdominal surgery, then there's no way to know what bacteria is in your small intestine. So one thing that just my common sense nondoctor self seems to know, though, is a lot of people who identify with having SIBO, they eat fermentable foods and they suddenly look nine months pregnant. Yes, that bloating, I think probably is the most common complaint of SIBO and whether that's coming from inflammation or whether that's coming from and this would technically be an infection, because you're saying that bacteria from the large colon is invading the small colon and that would technically be an infection, whether it's either one keto or carnivore is going to fix that. And you know, Kim, we have multiple friends who are carnivores who have actually had their gut bacteria or their colon bacteria checked and they have a beautiful distribution of the proper bacteria in their colon. And therefore, if you have good bacteria in your colon, there's no bad bacteria going to get to your small bag. Right? So people are asking, how long will this take to resolve? And the good news is, carnivore are more of a lifestyle, so you have plenty of time, but I think they would like to discomfort sooner. So, do you have any tips? Yeah, so my experience in the clinic has been six to eight weeks of fatty meat, heavy keto or carnivore and you're going to be pretty much symptom free. And you got to remember, and so for some very few people, it's coffee. Coffee is what's causing the inflammation in the gut. Tea can do it as well. And so when I say beef, butter, eggs and bacon and water, that's what I mean, because if you do that and you're still drinking coffee and tea, then you don't know, especially if your symptoms get no better, then don't come at me and say, hey, I tried your diet and it didn't work because you're still drinking coffee and tea. And I love coffee and tea. I know that would suck. But at the same time, it also sucks to have these conditions we're talking about. And so each and every one of us gets to decide, do I want to do that or not. And so I'm just saying this is a viable logical option to try. And if you don't want to do it, then eat whatever and suffer the consequences. But if I have one of these conditions, I would think that I would do that. Now, one thing I have noticed is there do seem to be of the issues that people might have. Some people do have a sensitivity to eggs or especially egg whites. Do you think it might be worthwhile. To leave those also very rare. Not really. It's very rare. And so if you've done three to six weeks of the beef, butter, eggs and bacon and you're still having problems, then I would say let's leave out the egg whites and just eat the yolks and see what that does. But yeah, that would be about the only thing on that diet that could potentially cause a problem. And I'll tell you, Kim, I would predict if you had removed all those foods, even if you were in the past sensitive to egg whites, you would no longer be sensitive to the egg whites. So many people think that these food sensitivities are permanent and they're not permanent. They're not necessarily permanent. When your immune system calms down and stops being pissed off at the world, it tends to stop reacting to things that it used to react to. For example, back when I was eating crap, if I got within 100 yards of ragweed or cat dander, I would be this for two weeks, right? And now I could lay in a field of ragweed and pet dirty cats all day long and I might sneeze one time. So what happened there? Why am I no longer allergic to these things that literally used to put me in the bed? I had such an allergic reaction, my eyes would swell up. It's because my immune system is now able to discern me from nonme. And I think so many times when people are allergic to tree nuts, when they're allergic to things that are like completely ancestral, that's usually what's going on. And once they get all the inflammatory crap out of their diet, their immune system over the course of a month to three months will calm down and they can reintroduce those foods and they no longer are troubled with that. Got it. Someone asked ",timestamp:"00:19:40-00:26:23",topics:["SIBO","small intestine"],type:"podcast",weight:5.423373699188232},{boost:0,date:0,description:"Thoughts on the over all chapter and some favorite quotes",episode_title:"The Sovereign Individual - The End of Egalitarian Economics",guests:[{name:"chriskapilla",profile_picture:"https://pbs.twimg.com/profile_images/1362817539135463427/2AXUeFLV_400x400.jpg",ref_id:"9d495790-93f2-4d6c-b770-b2885f66859d",twitter_handle:"chriskapilla"},{name:"remydenton",profile_picture:"",ref_id:"5c5beb0c-c214-4f23-b79a-e71bf9368f2d",twitter_handle:""},{name:"JackRonaldi",profile_picture:"https://pbs.twimg.com/profile_images/1583261828628496384/IazkwYjk_400x400.jpg",ref_id:"01621476-f040-49dd-8160-4035228faf78",twitter_handle:"JackRonaldi"},{name:"AlistairZ80Aftw",profile_picture:"https://pbs.twimg.com/profile_images/1362882489895841795/gH2zix3l_400x400.jpg",ref_id:"3dcba197-47ca-40c0-857d-73cec4325801",twitter_handle:"AlistairZ80Aftw"},{name:"mattonbtc",profile_picture:"https://pbs.twimg.com/profile_images/1549459254280687618/jzdHJou3_400x400.jpg",ref_id:"998167d3-e036-4ef1-9a05-4f062903f0c5",twitter_handle:"mattonbtc"},{name:"wai_wairua",profile_picture:"https://pbs.twimg.com/profile_images/1536570699761848320/T10Owc60_400x400.jpg",ref_id:"c4d4ff36-73fa-4471-91ba-de0f99a49e99",twitter_handle:"wai_wairua"},{name:"UltraSolomon",profile_picture:"https://pbs.twimg.com/profile_images/1468332451055427601/YVgUuUHc_400x400.jpg",ref_id:"6371d519-cc98-4bf4-9f82-be17b1ea532a",twitter_handle:"UltraSolomon"}],hosts:[{name:"BTC_Venetians",profile_picture:"https://pbs.twimg.com/profile_images/1557482467539521537/Kel-eVww_400x400.jpg",ref_id:"a6313ca9-3869-4477-88ad-30172957edcf",twitter_handle:"BTC_Venetians"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/75ec86b1-cb6d-467f-a66e-5e642e5c126a.jpg",keyword:!0,link:"https://stakwork-uploads.s3.amazonaws.com/uploads/customers/2707/media_to_local/c8cc9ec1-061d-4f53-a24b-ee43a56c7715/e650057e-2369-4e75-8119-4975a1fc4cac.mp3",node_type:"clip",pub_key:"03eb026c3e6597055595e42299377a4e164982775cc67f1d2135d9f1cd3a89f526",ref_id:"946f1308-fffb-4aeb-89b2-68b043873ae2",show_title:"Bitcoin Venetians Book Club",text:"right, let's kick off with the first question. What did you think of the chapter overall and any favorite quotes? I think my first one first favorite quote was headline in there. The higher returns in poor areas on, well, 242 somewhere around there. Bitcoin City makes me think of that. El Salvador makes me think of that. This isn't a quote, but just as an idea. I love their little section about how Hollywood production companies work, being a template for future companies. That really made it more concrete what they were talking about. Yeah, I thought that was interesting, especially with the benefit of hindsight how we've seen simultaneously, like, megacorporations arise, but also the Internet has enabled the scale of business to be really small. All over Twitter, I see like Solopreneurs that are bringing in like tens of thousands, if not hundreds of thousands per month. And like they're just using all these different, like, lowtext tax all over the Internet to do their thing and by one person can just like, make a decent living that way. But then there's also a lot of other people that are just kind of stuck as wage slaves or whatever in the big corporations. Another quote I've got there is the genuine upsurgeon opportunity is almost inevitably accompanied by at least a brief surgeon inequality. And that seems to speak to people here. Dr. McCall would like that one, I think, but I don't see her here also regulations having a positive rather than negative market value. Or if Peter McCormack was here, he'd probably agree with that too. Well, I think that's quite interesting because it talks about sort of a marketplace for regulation so you can actually find out in an experimental sense which regulations are important for a good functioning society rather than just being as a means of extraction and coercion the regulations that you opt in if you're far more mobile globally. I actually saw an interesting post about this recently and it was kind of along the ideas of having a sunset clause for new laws saying that a new law should perhaps have a start and an end date, but also saying that similar to a scientific hypothesis or theory, that you make a new law and it says it's going to achieve XYZ and you measure against that and within a specific three year time frame or whatever is necessary. If it hasn't achieved that, then the law is revoked. And I thought that would be a very interesting way to do things. It's quite competitive if a few different countries were doing that against each other. Yeah, I love that. That's kind of like how product management works and startups. You make sure you have metrics that you're collecting to check what's the response to whatever you're trying to do and if the response is not what you want or what do you expect, you kind of pivot. You try something else. Which I think would be great if we can bring something like that to politics and lawmaking, you can just imagine. Sorry, go ahead. Sure. I was just going to say one of the really interesting parts of this chapter is talking about how there will be competition between jurisdictions in a way that there's not or there hasn't been previously and that that alone will sort of create this incentive to be more efficient in whatever format that takes. So jurisdictions can operate a little bit more like companies do today and less like just total monopolists as they are currently. Here is one quote that I did like. In the post industrial period jobs will be tasked to do, not something you have. Could you read that one more time? Sorry, yes. In the post industrial period, jobs will be tasks that you do, not something that you have. Do you think that's similar to how you have like bounties for coders? Do you think that's what the quote is getting at? I think that's exactly it, yes. I took from that that people won't have careers. Well, it depends on how you define career. I guess if a career was a succession of tasks that were related then it could still be a career but they wouldn't have permanent lifetime jobs. Yes, a career was a succession of tasks for a single wall employer or within the same part of an industry. Whereas the succession of tasks sounded a lot more like piece work or gig work in the modern part. Yeah, I think gig work is probably close. Yeah, I think we'd probably find out where it makes sense for something to be a salaried position where the benefits from that obviously they make the relationships, they have all that continuous local knowledge where that makes sense from an economic perspective and where actually it's just labor laws which are making that the case at the moment. And actually it would be far more efficient to farm it out on a piecemeal basis. I think that's an important point. I think the book maybe to keep it shorter doesn't go into the opposing argument as much, but I think anything where you're facing with people, it's probably useful to have kind of the same person in the role. But also like even I'm not a coder, but I would imagine that having the same person work on the same code base would be useful over a long period of time because they kind of know what's going on rather than having multiple people kind of going in there and doing piecework. As somebody who is a coder, I can completely agree with that. There's kind of this fallacy, I think that you can just replace one programmer with another when in reality it's not about the writing of the code, it's about the understanding of what's going on in the code which takes a lot of time to acquire and also kind of this ownership over what the code does. So, long story short, I agree that there are multiple industries and types of jobs where replacing people just willy nilly is probably not the best idea. I think I'll little bit on that with Remy because I'm also a coder. But open source, generally somebody in a corporate environment, it should be the same coder all the time or the same pair because that's where the corporate knowledge resides. But in open source you have so many different people looking at the same set of code, they do become a bit interchangeable and you do end up with documentation about how new people should approach a project. So it depends like most things. Yeah, great point. Did anyone get the sense that I don't know much about the authors, but they seem like they have libertarian tendencies. And it seems like that kind of comes out in the book to me, because some of the stuff that they talk about how the idea and the pursuit of equality as a goal is going to go away in this digital age. And I wonder how much of that is like they've come at that logically and how much of that is what they want because of a certain view of how things should work. A few episodes ago there was one of our number who posted a BBC interview on James Dell Davidson and Reese Mogg. I don't know if you heard that, but it gives you an awful lot of background. Very libertarian tendencies. Very libertarian tendencies. ",timestamp:"00:09:33-00:19:19",topics:["The Sovereign Individual - The End of Egalitarian Economics"],type:"twitter_space",weight:5.396452784538269},{boost:0,date:1636866e3,description:"[[Lightning]] and [[Bitcoin]] Have Actual Use Cases",episode_title:"WHY ARE WE BULLISH JoeyTweets Mario Gibney Bobby Shell Len ep215",guests:[{name:"Bobby Shell",profile_picture:"https://pbs.twimg.com/profile_images/1090426395979890690/uUdaFXo__400x400.jpg",ref_id:"438f8067-3fed-49d2-91d9-5018cb043aac",twitter_handle:"BobbyShell2"},{name:"Len",profile_picture:"",ref_id:"1fc627d9-a446-4e48-b960-ad97fcdbcaa0",twitter_handle:""},{name:"Mario Gibney",profile_picture:"",ref_id:"1a3f05f5-5c4a-455f-b4ec-f682080a5518",twitter_handle:""},{name:"JoeyTweets",profile_picture:"",ref_id:"e6ada141-9c3c-4e1b-b8ab-2389c94f4130",twitter_handle:""}],hosts:[],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/f3b67780-d9c2-4a20-ab5c-115032a05b3a.jpg",keyword:!0,link:"https://anchor.fm/s/11e95d20/podcast/play/43334718/https%3A%2F%2Fd3ctxlq1ktw2nl.cloudfront.net%2Fstaging%2F2021-10-14%2F0bfc842d-3fe7-98e0-1a25-43385ac48a7d.mp3",node_type:"clip",pub_key:"",ref_id:"3242aa43-f999-485b-9c94-8457526d6dbd",show_title:"BTC Sessions",text:"run a Lightning note and I too am hugely bullish on Lightning. I can see the potential in using it for quick and cheap settlements and having somebody like Jack Dorsey also on board too, and implementing it on Twitter. That's a freaking amazing idea where you could tip people for ideas for tweets or whatever. And it just goes to show you that Lightning or Bitcoin itself. There's an actual case, use. It's not just strictly an asset where you park your money. It's also a currency you can use to spend. And Lightning is the way that you could easily spend Bitcoin. One thing that's really interesting to me, too is like, you buy Bitcoin and it appreciates in value. But to us, one Bitcoin is one Bitcoin, right? Like, what if you never actually spend it and you just use it for data transmission? Do you really owe taxes? You didn't buy anything with it. You're just using it as a data tool. I think that's going to become a conversation later, but it's way too premature to really talk about that. How much Bitcoin would you really need to have to utilize that? Right? I don't know. It's tough because I don't know exactly how they're utilizing these rails for this infrastructure that they're building with, like, impervious and a lot of these concepts. So I don't know. I couldn't really comment to that point. But it is one thing, again, from the content creator perspective and to the point about Twitter, it kind of. Sets. Itself in the middle of those intermediaries that were typically taking a cut of any type of revenue that you used to get. In particular, I'm looking at your YouTube that we're on right now, that ad revenue is what keeps a lot of people afloat. And all of a sudden you can introduce revenue sources that are very easy to utilize and kind of almost like bypasses what YouTube is trying to do in taking their massive cut of everything. So I find that to be interesting. They very much try to get you using super chats and stuff like that. But when there's a simple way of like, oh, I can just drop a tip here, and that begins to proliferate through lots of other alternative platforms, at what point do enough people say, well, I'm going to go through this method of this method. At what point do some of the bigger players start saying, Well, I guess we better put this in here because there's a huge demand for it and albeit small at first, we're losing some market share because of that. I don't know how that affects that moving forward. No, it would definitely be groundbreaking in that regards. And it would certainly shake like the YouTube to the world, et cetera, not just to change gears, but there's another application that Lightning would truly thrive in, and it's the world of restaurants right now, a lot of transactions that are done in restaurants are done through Visa, Mastercard, and they take their slice of the pie one, two, three, 4% every time the card is swiped. And from what I understand, restaurants, they have a very thin margin for profit. And if you're able to increase the profit by taking away that one 4% that Mastercard and Visa do, then you can make businesses way more profitable. And it's just simply just implementing Lightning on the current system, it's easier said than done. But once it's able to be implemented in restaurants and you're able to pay for your meals with Lightning, it's going to make profits just shoot through the roof for a lot of these small businesses. Did you see? I think it was Ben Ark. ",timestamp:"00:51:21-00:55:28",topics:["lightning","bitcoin","bitcoin","lightning"],type:"podcast",weight:5.393006804006006},{boost:0,date:1640926800,description:"What Kind of Wallet Am I Going to Use?",episode_title:"WHY ARE WE BULLISH Tone Vays Jaime Garcia Trent Dudenhoeffer KC Hodl ep225",guests:[{name:"Tone Vays",profile_picture:"https://pbs.twimg.com/profile_images/1416821178266787844/T1OkI9ZW_400x400.jpg",ref_id:"da6fc991-7080-461c-86e3-4ac18c2f413d",twitter_handle:"tonevays"},{name:"KC Hodl",profile_picture:"https://pbs.twimg.com/profile_images/1506986051683950592/MMMse9gr_400x400.jpg",ref_id:"b2264dd3-e587-403e-9447-9e99afc1910d",twitter_handle:"kc_hodl"},{name:"Trent Dudenhoeffer",profile_picture:"",ref_id:"3b466176-3bbc-481d-9634-e127a9232404",twitter_handle:""},{name:"Jaime Garcia",profile_picture:"https://pbs.twimg.com/profile_images/953009048642715648/PKaQy5UD_400x400.jpg",ref_id:"f259c6b5-71d6-4c5c-897c-3cfbe80cccc2",twitter_handle:"jaimegarciag"}],hosts:[],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/c8ae0def-c33c-4d17-af4e-31ddaeedaf8a.jpg",keyword:!0,link:"https://anchor.fm/s/11e95d20/podcast/play/45510131/https%3A%2F%2Fd3ctxlq1ktw2nl.cloudfront.net%2Fstaging%2F2021-11-31%2Fc821a6ba-7ef1-35ba-b24e-b96e84186843.mp3",node_type:"clip",pub_key:"",ref_id:"d9b2af2b-2bf8-477f-9cde-dd27660ddde7",show_title:"BTC Sessions",text:"am I going to use? Things like that. What are you seeing there? Definitely, yeah. Usually the first thing is which kind of mobile wallet should I use first for a small amount. And now there's so many great options over the last year, especially with the Lightning wallets coming out. Blue wallet, moon, so many great options. Usually people like to play around there, kind of get their comfortability up and then go to an actual hardware wallet of some kind. So, yeah, it's always fun to talk about the benefits and disadvantages of each wallet, whether it be a treasure, a ledger, a cold card, so many different ones. And I think a lot of times people just order kind of whatever's cheapest usually has been kind of what I've noticed and try it out and then kind of figure out what they like and don't like about it. And then when they get ready to go to the next step, they kind of have a little bit of familiarity with the different options. So I've got ",timestamp:"00:16:43-00:17:37",topics:[],type:"podcast",weight:5.371685059434086},{boost:0,date:1640066400,description:"What types of small shift in characteristic can make major changes",episode_title:"Diana Jones: The New Management Model — Guarding Group Relationships",guests:[],hosts:[],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/f2b2a2b2-8869-4256-94b9-a91c91c1ce7e.jpg",keyword:!0,link:"https://dts.podtrac.com/redirect.mp3/cdn.mises.org/148_e4b_diana-jones.mp3",node_type:"clip",pub_key:"",ref_id:"10cc2a43-918c-477f-a29c-de6fa5ddc79e",show_title:"Economics For Business",text:"That's one of the challenges, I think, with systems thinking that you get confused about causality. Maybe there is no causality, it's just a lot of things interacting together and the outcome emerges. But you do say that small shifts can generate major change. If we've done everything else right, you qualify it. But are these small shifts like reading people better? Is that the kind of small shift that can generate a major change in the system? I do think that there's several things I think becoming more skilled and understanding how groups work. And if you read my book, it's a complete handbook on how groups work for leaders. And the thing when you read any book is to take several things from the book and practice them and then notice the impact and you'll see things rapidly. But the small things are like the shift for leaders to move from being meeting managers where they're focused on their content and like getting on with stuff, to actually being guardians of group development, particularly in the first four minutes. That the second is for probably everyone to shift from being so focused on content to being very mindful of what is the purpose of the interaction or any meeting and what is the outcome you want. So many people just don't know why they're at meetings, they don't know why they're talking about stuff because the purpose and the outcome has just been lost, gone, forgotten. And it's such an opportunity for leaders to tune into if we have this conversation, the dramatic impact out here is going to be A, B and C and that's what we want. So shifting from content to purpose and outcome, which means the conversations shift from explaining and describing stuff to enabling people to participate in bringing expertise and experience from the group. So those are the things I'm talking about. And on my website, under Leadership levers, I've got two complimentary downloads that people can just they don't need to put their email in, they can just take them around the shift for the first four minutes of any meeting if you want to really generate engagement and participation. So those kinds of shifts, and it's mostly leaders shifting away from being focused on their own content and expertise and drawing that out from others. That's the basis of it. It's easy for me to say, but it does require people to give up some things, give up being the know it all expert or knowing when to use it, but not that to be the main orientation. I find when trying to apply systems thinking in business, one of the steps is you've got to discard a lot of things that you used to know, used to do, like hierarchy and command and control and things like that. You can actively discard those in order to be able to get into the new place. ",timestamp:"00:44:48-00:48:09",topics:["small shift"],type:"podcast",weight:5.31725980650619},{boost:0,date:1675274375,description:"The importance of education about taxation and small government ",episode_title:"Is Sound Money the Answer? with George Gammon (WiM268)",guests:[{name:"George Gammon",profile_picture:"https://pbs.twimg.com/profile_images/1246550014450700291/2n_iHigp_400x400.jpg",ref_id:"7ca1bc4f-3a57-4a6a-bedf-ef47a8b37297",twitter_handle:"GeorgeGammon"}],hosts:[{name:"Robert Breedlove",profile_picture:"https://pbs.twimg.com/profile_images/1592020087044591616/46enYwAc_400x400.jpg",ref_id:"0ed69c56-241c-4b63-87a5-8f2157fe51a5",twitter_handle:"Breedlove22"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/ca3ab815-dc2e-408a-a0c5-8bbe50270a97.jpg",keyword:!0,link:"https://cdn.simplecast.com/audio/2effec98-bec5-4728-ba08-7a86d776e682/episodes/d6e8f010-e2d5-4489-bb8e-9b7446a4795b/audio/0ad4fb89-2eda-4ad7-8432-b6be08c8ce10/default_tc.mp3?aid=rss_feed&feed=MLdpYXYI",node_type:"clip",pub_key:"03a3451db4748e483d2e1ee5d0b3a6872253253b57edf4b084a56952b432a224b3",ref_id:"d8d7f0d9-d40b-4431-8f02-f8bf15823175",show_title:'The "What is Money?" Show',text:"And so then that's what kind of leads me to the conclusion that, wait a minute here. Sound money is definitely desirable, but if we're putting 100% of our energy on this as though that's a panacea, that's a big mistake. And if I have to allocate 100% of my if I've got 24 hours in a day, and so I've got 100% of my mental bandwidth, you know, if I really want to move the needle. As far as our shared objectives, for me, I come to the conclusion that that it it's more beneficial for me to allocate 90% of my time and energy to trying to persuade people that we need small governments, we need low taxation. And then 10% saying that, hey, sound money is definitely beneficial, definitely desirable, as opposed to what a lot of people would do is they allocate 90% of their time and energy saying, well, sound money, sound money, sound money, sound money, sound money. Because we get sound money, then everything else just falls into place. And again, especially when you look at the amount of government spending that we have today just as a result of taxation, just to forget the deficits, forget the deficits just as a result of taxation. I think you've got to come to the conclusion that a society, even with a fixed base layer, if they favor big government, you're going to get big government because people just vote free stuff. And I think that the overriding theme in what I see when I study history is it's just the same thing. It's like this cycle that we can't get out of as human beings where hard times create strong men and strong men create good times, good times create weak men and weak men create hard times. It's just over and over and over and over again. And so I truly believe that right now we're in a period of kind of weak men, if you will, but I think that we now have the internet and we now have a lot of tools that we didn't have before. And I can either sit here and just wave the white flag and say, oh, we're all doomed and we're just going to have to go through this cycle. Fourth, turning, whatever you want to call it, or I can get out there and try to pound the table for small governments with the help of the Internet and allocate as much of my mental bandwidth as I can towards that to try to impact positive change. But that's really my message, you know, is that I think that as a collective group, we're going to be a lot more successful in achieving our objectives if we allocate 90% of our time to persuading people the benefits. Of small government instead of trying to persuade them that sound money is the way to get to that small government type of environment that we're trying to strive for. I think that's kind of we can rip on that. But that's kind of my main message. Yeah, no, that's really well said. And again, to reiterate, we're basically saying we have the same ends in mind. The end, absolutely. Smaller government, less government interference in the market process. In the market process. Lower consumer prices as a result of economic productivity. Yes, exactly. So the more uninhibited the market process is, the more consumer price deflation it will create, right. Through trade, innovation, just trade and innovation basically more high intensity, higher intensity trade, more innovation, gives you lower prices. Government intervention is opposite to that. Right. That's actually interfering with the market process tends to create consumer price inflation. So the end in mind is to minimize government interference in the market process as much as possible. Where we're, I guess, exploring is what's the appropriate allocation of mental energy towards the means to achieve that end, right? Is it all sound money? Is it all advocating for education or persuasion, let's say, in the minds of people about small government, or is it a mix and to ",timestamp:"00:24:27-00:29:24",topics:["Tax education","sound money","small government"],type:"podcast",weight:38.492371921380055},{boost:0,date:1673685e3,description:"What's required to force Genesis into bankruptcy  ",episode_title:"The Chopping Block: Why Gemini Users Are Mad at Genesis and DCG - Ep. 443",guests:[],hosts:[{name:"Tarun Chitra",profile_picture:"https://pbs.twimg.com/profile_images/1587539091444432897/Z6_nmrCB_400x400.jpg",ref_id:"dfad4b23-92ff-4aa1-9aa4-abc1d54cd6d3",twitter_handle:"tarunchitra"},{name:"Haseeb Qureshi",profile_picture:"https://pbs.twimg.com/profile_images/1581025415551889408/thQwG4lb_400x400.jpg",ref_id:"790e4217-dd9f-416f-b9f8-ed596937f5b5",twitter_handle:"hosseeb"},{name:"Tom Schmidt",profile_picture:"https://pbs.twimg.com/profile_images/1563232354277085189/xQL92DR4_400x400.jpg",ref_id:"bc9d3bfd-36b0-4cbc-a491-9370decf4c99",twitter_handle:"tomhschmidt"},{name:"Robert Leshner",profile_picture:"https://pbs.twimg.com/profile_images/1587956987786104833/1SiKVj-s_400x400.jpg",ref_id:"ebaa2166-7982-423d-9f43-add89e7d47f9",twitter_handle:"rleshner"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/7de0d293-8ae3-4362-8500-8f7300f3fe41.jpg",keyword:!0,link:"https://traffic.megaphone.fm/LSHML4726349989.mp3?updated=1673643857",node_type:"clip",pub_key:"02545c14cbb18a61f20dd45f5e3dcbd9acae3de282369501040adce32a75311309",ref_id:"a24f0efb-66be-40a2-afa2-bf29f370b10d",show_title:"Unchained",text:"a mutually yeah. You could almost perform like a bribery attack where you're like, hey, if you got if the rest of the creditors don't give us the money, like me and two of my friends who are like small fry creditors are going to go push Genesis into bankruptcy and screw everyone else over. It does seem like an unstable it does seem like an unstable equilibrium. Well, I think the reason why it's more stable than that and this is I'm not, you know, an expert in restructuring law or any of that, but what I think makes it a more stable situation that prevents that is that any resolution has to be done equally amongst the various creditors. So you can't have like three creditors who like threaten them with some ultimatum and say, give us all our money. Back or read oh no, I'm not saying threaten the company, I'm saying threaten the other shareholders. That might be legal. I'm pretty sure that's extortion, but you know, there's maybe some way you can structure it. Yeah, but anything has to hold up, right? ",timestamp:"00:12:38-00:13:43",topics:["Genesis","bankruptcy"],type:"podcast",weight:25.351043899322917},{boost:0,date:1533945600,description:"Government subsidies and small business",episode_title:"Government and Big Business | Peter G. Klein",guests:[],hosts:[],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/58189b3c-aa25-408d-8c5e-76f97c9501da.jpg",keyword:!0,link:"http://www.podtrac.com/pts/redirect.mp3/feeds.soundcloud.com/stream/335241913-misesmedia-government-and-big-business-peter-g-klein-1.mp3",node_type:"clip",pub_key:"",ref_id:"58c66464-fdd6-4f04-848b-f98021c4089c",show_title:"Mises University 2017",text:"are direct subsidies for small companies, especially in the tech sector. Governments build science parks and fund Incubators. And the SBIR program, which gives cash to tech startups, you have lots of indirect subsidies as well. So if we're going to say that subsidized interstate highways constitute gives sort of an unfair advantage to Walmart and Amazon, then we would have to say that subsidized electricity, subsidized telecommunication services give an advantage to small firms that are able to be in some small town, right? If it weren't for electricity subsidies, maybe you couldn't afford to live in Auburn, Alabama. You'd have to live in a big city that has a big nuclear plant. Okay? And the only reason a little startup company can be in Auburn, Alabama, or wherever is because they have access to the Internet and they have access to they can make phone calls, they can get electricity off the grid. All of those things are subsidized by the state just as much as the road system. So it's not clear that the kind of Kevin Carson argument makes any sense specifically favoring one type of firm over another. Okay? More generally, think of what the government does to the economy, to society, right? I mean, restricting trade and starting wars and controlling the education system and so forth makes us all much poorer than we otherwise would be. And the massive scale of government intervention around the world, it requires the international division of labor, reduces stocks of human capital, if you want to use that language. It makes us all dumber than we otherwise would be if we didn't have state control of education. Reduces the marginal product of labor in many contexts, right? So, I mean, all of these things it might be that if we had a free society and we had better education systems, better transportation communication systems, maybe the economies of scale and scope and production would be even larger than they are now. Maybe we'd see bigger firms than we see now if we were to get rid of the state and all of its harms. So ",timestamp:"00:37:00-00:39:18",topics:["government subsidies","small business","subsidies"],type:"podcast",weight:5.2884098291397095},{boost:0,date:1665118800,description:"Smaller states offer more opportunities and promote decentralization",episode_title:"Breaking Away: On Secession and Small States",guests:[],hosts:[],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/6ec51741-3d93-4116-a619-d62a7cee1feb.jpg",keyword:!0,link:"https://dts.podtrac.com/redirect.mp3/cdn.mises.org/102-radiorothbard-20221007.mp3",node_type:"clip",pub_key:"",ref_id:"56ded69f-9178-41fb-a466-b3f270175343",show_title:"Radio Rothbard",text:"Rockwell summed up this principle in a 2005 article called What We Mean by Decentralization. Rockwell writes under decentralization jurisdictions must compete for residence and capital which provide some incentive for greater degrees of freedom, if only because local despotism is neither popular nor productive. If despots insist on ruling anyway, people and capital will find a way to leave. This is most fully realized, of course, by the type of decentralization that results from fullblown secession. As Rothbard put it in 1977, secession means greater competition between governments of different geographical areas, enabling people of one state to zip across the border to relatively greater freedom more easily. Now, of course, the idea would be you wouldn't have to physically relocate to escape despotism. But we don't live in that ideal world. We have to work with what we have. And the fact is, governments like to abuse rights. So the question is do we want governments that are huge and control vast swaths of land that require us to move thousands of miles to escape them? Or do we want something smaller where exit is much easier, albeit still not without cost? And of course, keep in mind that in a world with only one state and no secession, there is no escape at all, ever, anywhere. We've seen this issue of exit in the modern world. Of course it's true in countless refugee situations where the most oppressed people are only able to save their own lives by fleeing across an international border. We saw it in Venezuela over the past decade when Venezuelans, desperate for food, had to escape across an international border just to get basic necessities. Thank goodness that border was there and limited the reach of the Venezuelan regime. Exit was possible if only the Venezuelan state was even smaller and the people of that region had even more options for bordering states into which they might exit and escape. Historically as well, we know the concept of exit has been an absolutely key factor in how the west roast to achieve the highest standards of living in the world has ever known. As historian Ralph Reyko has noted in his essay The European Miracle, the fact that Europe has been so decentralized throughout its post Roman history, in contrast to the huge empires of the east, meant that entrepreneurs and capital could indeed escape across Western Europe's countless borders in a highly decentralized Christendom. This was especially the case in Europe's Middle Ages. And as historians Nathan Rosenberg and Ellie Birds will note in their book how the West Grew Rich, it was in these highly decentralized Middle Ages that the institutional groundwork was laid for Europe's economic miracle. Similarly, historian Jean Bay Schuler showed this in his research and he concluded the first condition for the maximization of economic efficiency is the liberation of civil society with respect to the state. But how did this liberation occur which led to the success of markets in Europe? Bayflair tells us the expansion of capitalism in Europe owes its origins to political anarchy unquote, that is, to the existence of a large number of small states without any overriding imperial or state power. Not since Rome has Europe been unified under a single government. And that has meant more freedom and more economic growth. One reason this works is that a region of the world or region or world of small states is more difficult to even. It's even difficult to even attempt autophy. So for a private entrepreneur, moving one's capital from one place to another does not cut off one's access to markets outside the borders of a small jurisdiction. Small states and principalities have always experienced big incentives toward doing business with surrounding states. This means more trade. It means more efficient markets. Opponents of secession and breaking up states are often opposed, however, on the grounds that smaller states will throw up trade barriers and be more inclined to violate rights. The reasons for this assumption aren't actually clear, but they are common objections. On the contrary, small states want to attract capital, and it shows. This is why efforts to impose a single global minimum tax tend to meet the most resistance from smaller countries like Ireland and Hungary. As is the case nowadays, having lower taxes is a major way that small states attract wealth. Moreover, in modern times, the empirical evidence supports the idea that small states tend to be more open to free trade, more open to a free flow of labor, more open to lower taxes. For example, Sergio Costello and Truatomozawa conclude in their study on small states that in a world of specialized and growing trade, quote small economies naturally grow more trade oriented in both exports and imports. Ceteris paribus small nations thus become more trade focused than large ones. Unquote economist Gary Becker in 1998 noted, quote since 1950, real per capita GDP has risen somewhat faster in smaller nations than it has in bigger ones. Becker concluded that the statistics on actual performance show that dire warnings about the economic price suffered by small nations are not all warranted. Smallness can be an asset in the division of labor in the modern world, where economies are linked through international transactions. Of the 14 countries with populations over 100 million, only the US. And Japan are wealthy. William Easterly and An Ard Cray conclude from their own study on small states controlling for location, smaller states are actually richer than other states in per capita GDP. Microstates have, on average, higher income and productivity levels than small states and grow no more slowly than large states. So it turns out Rothbard was right when he suggested that small states are more likely to embrace free trade. As he wrote in the 1990s. This was due also to sociological reasons. Rothbard says the greater the number of new nations and the smaller the size of each, the better, for it would be far more difficult to sow the illusion of selfsufficiency if the slogan were by North Dakota or even by 56th street than it is now to convince the public to buy American. Similarly, down with South Dakota or down with 55th street would be a more difficult sell than spreading fear or hatred of the Japanese or whatever foreign boogeyman we currently hate. In other words, bigness brings delusions of selfsufficiency, and it is actually large states that more often turn to protectionism and economic nationalism and control. A second benefit of small states is that they prefer a offer, a solution. When constitutions and democracy fail ",timestamp:"00:09:41-00:16:21",topics:["Smaller states","Decentralization"],type:"podcast",weight:5.421848896549872},{boost:0,date:1629691200,description:"[[Bolt 12]] is the next [[payment negotiation UX]]",episode_title:"WHY ARE WE BULLISH Bitcoin Meme Hub Jan Capek Bitcoin Mechanic Max Hillebrand ep195",guests:[{name:"Max Hillebrand",profile_picture:"https://pbs.twimg.com/profile_images/1311357499514269696/-HQFwyFH_400x400.jpg",ref_id:"9a86cc59-ed01-4757-88f6-e9d9d63067b9",twitter_handle:"HillebrandMax"},{name:"Bitcoin Mechanic",profile_picture:"",ref_id:"faae3a37-0115-4074-af21-7d79c429c7cb",twitter_handle:""},{name:"Jan Capek",profile_picture:"",ref_id:"ec6f8b14-6c4b-42e9-8e86-9aa902c0906d",twitter_handle:""},{name:"Bitcoin Meme Hub",profile_picture:"",ref_id:"dcd5a590-2018-4707-a49b-8142d7b14e33",twitter_handle:""}],hosts:[],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/419512c2-e309-4b25-bfe2-cd481d53f66d.jpg",keyword:!0,link:"https://anchor.fm/s/11e95d20/podcast/play/39201536/https%3A%2F%2Fd3ctxlq1ktw2nl.cloudfront.net%2Fstaging%2F2021-7-23%2F214267789-44100-2-17e9fbafdf841.m4a",node_type:"clip",pub_key:"",ref_id:"1f486e9a-51aa-476a-8430-b149c88817f4",show_title:"BTC Sessions",text:"learn and test out wallets and see what's up because it's a lot of fun to play with if you haven't if you haven't tried already. Max, you are up. Dude. Please let us know what has you feeling bullish this week. Oh, this week specifically it was Bolt Twelve to stay with the Lightning network. That's the next generation payment negotiation. Ux flow and it's really magical and super useful. So far. A Lightning network invoice both Eleven is a one time payment secret basically. And it's the string that you should only use once to request a payment and that makes things a bit awkward. Main thing is that you cannot get a tattoo of your Lightning invoice because that would be a very shortlift fun and that we got to solve. Of course, right. There are current nice hacks around this, mainly LN-URL which is kind of a separate server that you need to set up and that then you have a small domain link, btcsessions. Compayme and all of a sudden you can toss Ben some sense, right? That's possible with this add on service. But what both Twelve is doing now is to do kind of a similar thing, but inside the Lightning network directly, running completely inside your Lightning node and communicating only inside the Lightning network. So you don't need to have a separate server, you don't need to run any separate software, you don't need to have a domain and all of these things are taken care of. It's all just Lightning pop keys at that point. And the cool things that you can do is static invoices or the static offers, right. So you actually can get a tattoo right on your forehead. People can scan all the time and continue sending you one set as you deserve, obviously for the heroic act, but it also allows for automatic recurring payments. So you can say hey, scan this QR code and you will pay me forever. One set every minute. That's great. And there's also nice messaging involved here directly. So sender and merchant can communicate and send messages back and forth about details of the payment, which is fascinating as well. Well, because there is some difference between the time where this offer was created and you print the QR code and when then someone actually pays the QR code. You can also do, for example some trickery with the exchange rate. You can print the QR code with an offer that says pay me $5 in dollars and a week later, of course, the stat price is much different as the shake coin continues to hyperinflate. Right. So you are going to get less shake coins for those five stats. Five Bitcoin. Sorry, you get less stats for those five bitcoins. Exactly. And this can also be negotiated again at the time where you actually make that payment. So small things like this that really show in hindsight how bad Lightning was and how much of a hack it was in the beginning and as a miracle that it actually worked. But now that we have well over four years under our belt of actually implementing this craziness, we've learned a thing or two, and that is all kind of cohesively packaged under Bolt Twelve Lightning offers by Rusty Russell So Bolt twelve.org as a really useful resource that shows you all the fabulous things. It's still very early so far only implemented by C-Lightning, and one other full Lightning note implementation will need to implement it before it's considered no longer a draft in the spec. But I'm bullish as fuck, especially as a podcaster and content creator. I've been showing Bitcoin on chain QR codes on YouTube videos for way too long, and Lightning made that terribly worse because every QR code that you show, only the first listener can pay it and nobody else can. So getting Lightning back to the beautiful days of sending stats for watching cat videos on YouTube, which obviously is the highest achievement of humankind in this regard, we're on a good path, so that makes me even more bullish. That's the main ",timestamp:"01:21:28-01:25:47",topics:["bolt 12","payment negotiation ux"],type:"podcast",weight:5.268418788934759},{boost:0,date:1633752e3,description:"The Domino Effects of [[El Salvador]] Making [[Bitcoin Legal Tender]], Citizens are now using [[Chivo Wallet]]",episode_title:"WHY ARE WE BULLISH Haley Berkoe Tip Jamie Stuckert Colin Aulds ep206",guests:[{name:"Jamie Stuckert",profile_picture:"https://pbs.twimg.com/profile_images/1481004564090433537/ZAj3C3Kv_400x400.jpg",ref_id:"ee047505-97c1-4086-a01c-3d18bd40b2d2",twitter_handle:"JamiaStuckert"},{name:"Colin Aulds",profile_picture:"https://pbs.twimg.com/profile_images/1151579149091262464/uNkb8aat_400x400.jpg",ref_id:"7b6066e2-2ef5-4e90-9d93-dedb1d289118",twitter_handle:"Colin_Aulds"},{name:"Tip",profile_picture:"https://pbs.twimg.com/profile_images/1598405188343468032/yL-obWRx_400x400.jpg",ref_id:"72362a7b-2a0a-44ae-beb4-bb0f36a485fc",twitter_handle:"tip_nz"},{name:"Haley Berkoe",profile_picture:"",ref_id:"b62ba399-282a-4628-811c-25e280541c99",twitter_handle:""}],hosts:[],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/2e84c98a-d7d8-4341-a129-3f4eaebe1e3e.jpg",keyword:!0,link:"https://anchor.fm/s/11e95d20/podcast/play/41540590/https%3A%2F%2Fd3ctxlq1ktw2nl.cloudfront.net%2Fstaging%2F2021-9-9%2Fd7420ef4-f713-f016-1ad9-b5411c2f99ee.mp3",node_type:"clip",pub_key:"",ref_id:"54d58e3e-b828-4a9e-92c3-f761826c0319",show_title:"BTC Sessions",text:"would say so many things I'm just bullish every day. But more specifically, what's going on in El Salvador. So just yesterday was one month since they made Bitcoin legal tender, and since then, like, half the nation has already downloaded the Chival app. That's 3 million people is the population 6 million. Yeah. Just right around that, right. Yeah. So that's like a pretty big number. And then I saw this other statistic that 2.5 million Salvadorans living in the United States will eventually be sending remittances through cheevo. That is a significant number. And it's just extremely powerful because all of Latin America is going to watch how they implemented this and they're going to start doing it, too. So imagine I'm just ready. I think we're all ready for the dominoes to fall. It would be crucial for Bitcoin to get into these other countries. And also what you mentioned earlier over in Africa, the whole world really needs it. But what's going on in El Salvador is just fascinating. I think it's a little bit soon to try and really make judgment calls on the situation because it's really tough. The education component is really tough. Like I was telling Chimberra in Bitcoin Beach this the other day, I'm like if there were teams of hundreds of people going into El Salvador to train everybody, it would be a little different. But you have to have a lot of resources for that, right? So it's a process. It takes time, and hopefully more people will get educated. Read more. The Spanish community is now doing podcasts and they're sharing more stories. I'm super excited. I think it's going to go well eventually. And I'm excited for the rest of the world to fall behind them. Yeah. It's unique in El Salvador because it's coming from two ends of the spectrum, too. You've got this initial grassroots movement with Bitcoin Beach, where it's just a small community kind of bubbling up in El Zonte. And then you've got now coming from a more top down approach where obviously the government is like, hey, this is legal tender and some Bitcoin is kind of pushed against the enforcement type measures around that. Now, granted, as an individual or a business owner, you don't have to hold Bitcoin. It's an effort for people to accept Bitcoin and choose to swap it to US dollars immediately if they want to. But Bitcoin is a very averse to any sort of use of force in a lot of instances. But that said, the world is kind of watching here, and I guess we'll see how it continues to play out. I love that it was started as a grassroots thing in small communities. I like seeing that around the world. And I'm moderately curious as to one how this plays out down there. If we see another kind of cycle, as we've seen in past, where it's huge boom followed by a bust, because that could look spectacularly bad if it's massive boom for the end of the year, and then it's like a two year bear market after that, that may not look great on the world stage. So hopefully that's not the case. But also, I'm really curious as to because they're not going to be the last country to do this. And I'm really about what's next. You hear rumblings in other locales, but a lot of it seems to just be like, oh, we're just going to kind of give our stamp of this exists and it's official that you're allowed to own it and some sort of regulatory clarity. But I'm curious about the next country to say this is legal tender, and I don't know where that'll be or how long it'll take, but I don't know. Colin Haley, Tip, what do you feel about what Jamie is talking about in El Salvadora? What are you interested in? What are you worried about? ",timestamp:"00:46:11-00:50:54",topics:["el salvador","bitcoin legal tender","chivo wallet"],type:"podcast",weight:5.268418789235816},{boost:0,date:1472358600,description:"Getting funding as a small business ",episode_title:"TheMacroView Episode 4: Access to Capital",guests:[],hosts:[],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/8e52e9c4-52e8-4dea-8ed9-8c6a7fcef25a.jpg",keyword:!0,link:"https://www.blogtalkradio.com/themacroview/2016/08/28/themacroview-episode-4-access-to-capital.mp3",node_type:"clip",pub_key:"",ref_id:"9ac59d0a-2e8d-430b-87e4-493026d9cbe3",show_title:"The Macro View",text:"underwritten by a bank and they've got a whole process behind it. But originally the idea was kind of skipping the bureaucratic process that goes on behind the scenes of a CD that costs interest and just deciding which loans you're going to make and kind of having the underwriting of a bank. Now there's risk involved, which there's not. With CD you get at the IC, that's why you get a lower rate. But in a yield starved world, for some people it was a really good option to start investing in these peer to peer loans and we'll see how it ends up working out over the next five to ten years. But being able to kind of cut out the middle man and get capital right into the hands of people that need it, I think that that's a very interesting innovation and the ability to document those loans. And I know there was a scandal recently with Lending Club, but for the most part you're able to document that stuff very well. It's not that hard with modern day technology to have a really strong and secure database to be able to document these securities very well and make sure that they're not getting lost or being overly diluted. And you can have rules surrounding small businesses in regards to how often the liquidity can be offered by the investors. Maybe they do have to hold it for six months. So you don't just get a plumbing in the price a little bit after it goes up on the market and you have a plugin to where, if you're an investor, get a quick and easy report on what's going on behind the scenes of that business and where that capital is actually being used. All that's possible with today's technology. All that's possible with today's technology. And we're operating in a financial services world that is based on 1940 laws and 1933 laws. The entire infrastructure, the legal infrastructure and regulatory infrastructure up until basically DoddFrank and you've had Tweaks here and there, you had Glass Eagle and then it got repealed and you kind of had the merger of lending banks and investment banks or commercial banks and investment banks. You had kind of the merger and consolidation amongst that after the repeal of Glass Steagall, which set up a firewall and then the Volcker rule kind of did that and moved closer towards that. And that was part of Don Frank. And frankly, I think disclosure is the most important part of that. And yes, because we have an insured financial system, when it comes to just everyday consumer deposits, it's very hard to have that moral hazard of allowing prop trading desks that can take almost unlimited leverage with individual depositors that have financial insurance for their deposits because those prop traders kind of know in the back of their minds, hey, we're not really losing anybody's money. So as long as you have that moral hazard. It's very hard to have a commercial banking system that's merged with an investment banking system because you basically have customer deposits that are insured being put up as collateral to trade risky assets and to do it via risky strategies if it was fully disclosed and people knew the risks that they were taking with their deposits and there was an insurance. Which if there was an insurance. Banks wouldn't really take that risk because nobody would let their money be that kind of risk taking with it. With their savings and with their checking account that they use to buy food every day. It just wouldn't happen. But if you had a system like that, then you wouldn't really necessarily need the separation. The system that we do have with the insurance, you do need the separation. So it's an interesting framework that we have because the way that businesses gain access to capital today is really based on a world that was way before the current information. And I know in the 80s things got a little bit stricter in the because you had the pink slip pushers, the pink sheets pushers, and the penny stock brokers that were kind of running rampant and your wolves of Wall Street type characters that were ripping off old ladies and selling them a bunch of junk. And that's not what I'm advocating. What I'm advocating is having a legitimate market that has really strong accountability built into the technological infrastructure of it. You have a fast registration process. You have standardized types of offerings. You have auctions that are available, and you farm that exchange API out to every brokerage firm. And you hold brokerage firms accountable for keeping documentation and backup documentation on it. And you set up rules to where the brokerage firms aren't going to get sued for recommending it as a small part of somebody's portfolio, and aren't going to get sued if somebody without getting any recommendation or professional financial advice goes off and buys a bunch on their own and take that risk. Because casinos don't get sued when somebody walks in with $10,000 and puts it on the table, that was that guy's life savings and you just let him blow it. They're kind of in a world where they understand, look, people are going to come in and take bad risks and make bad decisions. And to a certain extent, while it's sad that's the world of investments too, people have to learn that you can't just make willynilly bad investments. You got to diversify. You got to play it long. You got to think about the long term. You got to build a good, strong portfolio that isn't dependent on one or two things working out that's basically going to follow the overall economy. But maybe you can outperform a little bit on the upside and maybe you could protect a little bit of risk on the downside. If you have a really good financial adviser, you're your own professional financial adviser and you know what you're doing and you know how to manage that risk, there are ways to do that. There are ways to use the markets that we have to get a good return. I think this would be a way that would increase that. I also think that it would open up structured products that would allow a lot of capital to flow from institutions to these small businesses and that would really open up the market for entrepreneurs to gain access to capital. If you had strong structured products that were based on pools of strong interest rate loans to small startup businesses that also had a tax incentive built in, you'd have institutions all over the place trying to buy into this. And you'd also have it as if you structured it properly to where you have the right risk management protocols in place. You'd also have a lot of retirees who might be able to clip a little bit better of a coupon, do it in a safe manner, and while helping to build the next generation of businesses. So there's a lot of things you can do. I'm not saying it would be their entire portfolio, maybe five, six, 7%. You can index annuities to these pools there's all sorts of interesting things you could do with structured products if you had a more vibrant market where investors of all sizes could come and gain access to startup and small business debt and equity offerings in a way that was accountable and in a way that was efficient and in a way that maybe offered a little bit of liquidity. But you understood these are small businesses that are trying to grow that liquidity three, five years down the road. If you actually had a world that preached truth that didn't say one out of every three businesses goes out of business, only one out of every three businesses is still in business after the first year. Only one out of every ten is in business after the third year. All these little cliches that just simply aren't true. About 68% of businesses three years in are still alive. So yeah, you've got one out of three that after three years go out of business and by five years 50%, a little over 50% are still alive. You have pretty close to 50%. Five out of ten. Let's use real numbers and let's plan risks around those real numbers and let's understand that yes, there's tail events but the more vibrant of a market we have, the more of an opportunity there is for people to find ways to manage the risk around that market. And when you have ways to manage the risk around that market, three standard deviation market events that put 75% of small businesses that started that year out of business and a lot of people lose money on that, you have ways to manage that risk and you have way to cost efficiently prevent yourself from losing big time on one of those events. So I think that what we really need is a combination of public policy that provides a tax incentive for the private redistribution of wealth that is wealthy people and people of all sorts taking minority stakes in small businesses and startup businesses, getting a tax incentive to do so. And as that business grows, obviously there's going to be tax base that grows and it pays way more than the taxes that are credited or deducted. By making this investment, by giving people these deductions and credits to make these investments, you're going to have much more taxes that come in a couple of years down the road. But not only are you going to have that. You're also going to have a more vibrant market for it and you're going to have incentives for entrepreneurs to go and create a very accountable market where small and startup businesses come in and properly have the standardized paperwork to make the offering to register quickly. Make it not very expensive and be able to attach that tax credit to it. Be able to attach that tax deduction to it very easily. Raise the capital. Put the capital to work. Hire people. Go on with their idea as they grow their business. You already have strong accountability. It will be easier for them to go back to the market. Maybe the first row is a convertible debt, maybe the second round is convertible preferred. Maybe the third round is a pure common equity. And that's the conversion point for the other two. And those are a year apart. Each they're done on the same exchange. The exchange, the brokerages, they make a little bit of money off of it, people get their tax credit for it, they get to invest in the next generation of businesses. Those businesses raise the capital, they put the capital to work. The economy grows and flourishes and it's going to be well worth having this market when you've got an economy that's growing at 4% as opposed to the measly 1.1% that we got. In order to do this, we've got to make it fair to the people that are participating in the market, that are providing this profession where they're not going to get sued all the time because the business goes out of business. Look, businesses do go out of business. Some succeed, some fail. It's not as outrageous a number that fail as society likes to preach, as we showed you here on slide 13 in tonight's podcast. It's nowhere near those outrageous numbers, but some do. Some businesses succeed, some fail. And when you take the risk of investing in a small business, you have to understand that why you should diversify. But when you're taking that risk at an early stage yet it should be a small part of your portfolio, you're able to get a lot of upside down in the future, you're able to get a lot of upside down in the future. And that's the benefit because you're starting out, you're getting a lower valuation before that company enters into the hyper growth stage. The other thing is. If you open this market up to a credit. Not just accredited investors. And if you had a vibrant market for these types of opportunities. You'd have financial professionals that whether they specialize in that or at least they make it a part of their repertoire and put it as a part of their model and take the time to really start to understand that market. Financial professionals will help their clients make those right decisions. They will. Financial professionals already have fiduciary responsibility. And if they might say, look, you should look at doing this as part of a tax plan and understand you might lose some money on it if you have this tax credit tax deduction, they also might look at it and say, look, if you have ten companies, five are going to succeed, five might go out of business. And the five that you have a finite amount of risk, the five that succeed, out of the five that succeed, three of them you're going to get a two X return and one of them you're going to get a three X return or whatever. You can show different models. You can model it out, and you can say, this is what we're expecting out of it. There is risk involved in this, as there is with everything. That's why it's only a small part of your portfolio. We're diversified, but this is something that we got to get happening. Everybody's complaining about the inequality. Inequality, wealth inequality, income inequality. The reason there's a lot of inequality is because there's absolutely no incentive for a wealthy person to take risk investing in a small business that's just starting out. When you can vary, it's very difficult. There's no vibrant market. It's hard to keep them accountable. People live around the world. If you're an entrepreneur, you've got to go out and find the wealthy person. You got to court the wealthy people, and you got to court many wealthy people in order to find the one that likes your idea. Well, that's not cheap, and that's not easy. And if you're just an average dude or you're an average gal looking to start a business. You come from middle class America or you come from even poor neighborhood in America. But you worked your ass off. And you got a little bit saved up. And you had enough to be able to go off on your own and not have to worry about a salary for a little bit. Now you got to find a wealthy person. Then you can use the Internet all you want, but when it comes down to at the end of the day, wealthy people want to know you can go out and have a drink with them. They want to know that they can trust you, that they can look you in your eyes. They want to shake your hand. It's not an easy thing to do. If you don't come from a lot of money, and it costs a lot of money to get there, you got to constantly be going around and trying to meet with these wealthy people and hope one finds a job. You got to figure out ways to hang out where wealthy people are. Guess what? Wealthy people don't hang out where it's cheap. They hang out places where it's pretty expensive for the most part, and at least pretty expensive for a young entrepreneur that's just starting out. So if banks aren't going to do that job anymore, we've got to figure out a way to incentivize those wealthy people to seek out good ideas. And we got to have a vibrant marketplace for that to be done. And we've got to institutionalize that marketplace in a way to where the offering documents are standardized. People know what they're getting into. They know what they're doing. And there is an incentive, a financial incentive, a tax incentive to do so that will get this economy bumping again, that will get this economy moving really fast. You'll have a velocity of money. You'll have to start kicking up interest rates and then you know what you're going to have? You're going to have banks all over starting platforms for this. They're going to start brokerage houses that will really advise, look 3% help get this tax deduction out there. And maybe the political way to do it is to not make a permanent tax deduction. Make it five to seven years. Seek out some best practices, emulate those best practices, be able to find ways to get more resources to the small business owners so that you have lower failure rates. There are other ways to do this and in a competitive world you're probably going to actually see failure rates at the beginning increase a little bit. And then what you're going to see is you're going to see profits and diminishing returns. The law of diminishing returns. As you have more people participating in the same industry, competing for the same customers, they're going to start to have the price compete. And when they start to price compete, they'll also compete with innovation and new products and new services. But when they start to price compete, you're also going to have lower margins. You're going to have smaller profits. And then capital is going to be diverted away from that. It's going to be put towards even newer businesses. And if you have this perpetual cycle of new innovation, new innovation, new disruption, lower prices, more goods, more services, more abundance for people, more jobs available, more people consuming, more people having jobs, more people getting wage increases, guess what? That also means we can start to pay down our debt. That means we no longer have to have budget deficits every single year. We can have balance budgets. We can have budget surpluses. We have large budget surpluses and windfalls where we can pay whole chunks of our debt down and prepay whole chunks of our debt and we won't have to refinance it. The other ",timestamp:"00:35:52-00:52:23",topics:["Small business","funding","merger","lending"],type:"podcast",weight:5.265220403671265},{boost:0,date:1623733200,description:"The Goals of Small Business",episode_title:"Andrew Frazier on Running Your Business",guests:[],hosts:[],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/f2b2a2b2-8869-4256-94b9-a91c91c1ce7e.jpg",keyword:!0,link:"https://dts.podtrac.com/redirect.mp3/cdn.mises.org/122_e4b_andrew-frazier.mp3",node_type:"clip",pub_key:"",ref_id:"bda964fc-b276-490e-98b6-3009769f941e",show_title:"Economics For Business",text:"and be profitable. Right. So you have a few techniques. You talk about standardized methods and processes. One of the elements I picked out of the book that I loved was you're thinking about goals. You call them smart goals. That's an acronym, smart. You might walk us through some elements of that, but tell us about goal setting for small businesses. Okay, well, a lot of times you have so many things going on within your business that you have to do that sometimes you forget about planning and doing the things that are important but not urgent. And that's really what goals are. They're very important, but sometimes they're missed. But by having goals and focusing on them, it allows you to move forward and many times move forward even faster and better than you would have. So the Smart Goal effect, which is commonly known to include specific measurable achievable, relevant and time based, where the specificness gives you a chance to get clarity around the goal. And that's generally qualitative and quantitative. You have to have it measurable because you can't improve anything that you can't measure. It has to be attainable. So you need to analyze what it will take to achieve the goal and then it has to be relevant, does it contribute to your business strategy and your profitability, and then you got to achieve it within a certain time. So time bound and have reasonable delivery targets and ways to gauge your progress. So really by developing smart goals, it's a way to plan for your business and it's a way to measure how you're doing and continually make improvements. So Andrew, given that given those set of smart goals, you say that every business from the outset should have detailed, standardized methods and processes. Besides the smart goals, what are the detailed methods and processes that we should be building? Well, it's important to be able to have consistency, and by setting out processes and procedures, it allows you to do that. It's also very hard to manage people, but it's very easy to manage systems. So by having a system or process that helps, you be able to manage more effectively and make sure your business is running the way that you want it to. Michael Gerber, who wrote the email, really talks about the key to running a successful small business is really about running it like a franchise. So that the same way a franchise has processes, procedures, and clear ways of doing business, you should be working towards that with your small business ",timestamp:"00:15:38-00:18:45",topics:["Small Business"],type:"podcast",weight:5.25807249546108},{boost:0,date:1642222800,description:"[[Bitcoin]] Versus Banks in [[Australia]]",episode_title:"WHY ARE WE BULLISH Duczko Thomas Jestopher Morgen Rochard Rick Vanderhulst ep229",guests:[{name:"Rick Vanderhulst",profile_picture:"",ref_id:"4c184180-b77d-4e25-ac7c-4d2e86cdde85",twitter_handle:""},{name:"Morgen Rochard",profile_picture:"https://pbs.twimg.com/profile_images/1362921386256211972/IpIK8cwI_400x400.jpg",ref_id:"c29b26e9-82c8-4c0a-8130-aa083d33ec48",twitter_handle:"MorgenRochard"},{name:"Thomas Jestopher",profile_picture:"https://pbs.twimg.com/profile_images/1607521016368201730/6GSHGkGX_400x400.jpg",ref_id:"50388de7-3ec7-401b-8349-5ee1d8a004c0",twitter_handle:"Jestopher_BTC"},{name:"Duczko",profile_picture:"",ref_id:"2b6de75e-0cf5-4fec-b458-d1b8ee3f86df",twitter_handle:""}],hosts:[],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/b87feb17-6926-4295-b2c2-d1c2e9d49ca8.jpg",keyword:!0,link:"https://anchor.fm/s/11e95d20/podcast/play/46171740/https%3A%2F%2Fd3ctxlq1ktw2nl.cloudfront.net%2Fstaging%2F2022-0-15%2F68b825e2-6752-7447-34ca-b27f0ea69256.mp3",node_type:"clip",pub_key:"",ref_id:"c2dff822-95ca-45fd-bf30-61ed21ecc3b1",show_title:"BTC Sessions",text:"this is actually fact in Australia. So there was a case Bitcoin versus banks, a guy that was dancing with his small Bitcoin exchange. He was just doing transactions on one of the peer to peer exchanges, helping people. And several of the big banks in Australia, they've actually invested in one or several exchanges at the same time. They're not allowing these other exchanges to bank. So clearly there is something going on with their own incentives. Yeah. It's unfortunate. Jess, I don't know if you have anything that you wanted to add in. I haven't let you chat much yet. Sure. Let's see the experience in Turkey. I think, Rick, you mentioned that. They'Ll. Just pass along a check that is the asset and write the new information on it and just pass it around. You'll have like ten different names on there. And it's just sort of this delayed settlement because no one has the money because all of that inflation. And it was just like, wow, that's the Fiat system. And here in the US, the financial center of the world, on a sunny day, it's still one to seven business days. Everything is going perfect. I just had my first experience ",timestamp:"01:06:17-01:07:52",topics:["bitcoin","australia"],type:"podcast",weight:5.248069832838849},{boost:0,date:null,description:"Bitcoin backed stablecoins as a solution and how it works in emerging markets",episode_title:"#Bitcoin solutions for Emerging Economies",guests:[{name:"@RSK",profile_picture:"https://pbs.twimg.com/profile_images/1592915327343624195/HPPSuVx3_400x400.jpg",ref_id:"b326a250-3fc1-46da-a64c-2659a4de0e3a",twitter_handle:"RSKsmart"},{name:"Femi Longe",profile_picture:"https://pbs.twimg.com/profile_images/1547047357371797504/avnHBa2W_400x400.jpg",ref_id:"7a5a41f1-6d1e-46c9-b97f-20ae03eafdd1",twitter_handle:"TheArtOfTomas"},{name:"@Alexandria The Great",profile_picture:"https://pbs.twimg.com/profile_images/1575525599493427203/XubWEoDX_400x400.jpg",ref_id:"1c95e8b2-3a98-46ce-933f-ef9f50c518c5",twitter_handle:"alesander97"}],hosts:[{name:"Tomas Villalonga",profile_picture:"https://abs.twimg.com/sticky/default_profile_images/default_profile_400x400.png",ref_id:"4f1cff71-07e0-4d7a-8992-d4b0609ca0b1",twitter_handle:"TomasVillalonga"},{name:"Brian De Mint",profile_picture:"https://pbs.twimg.com/profile_images/1546297674512470016/oEVF8rJQ_400x400.jpg",ref_id:"064e04f7-8320-4854-8325-0cc19cd7ff55",twitter_handle:"BrianTheMint"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/b2dd8be4-74b5-47b2-b470-e568657f3a0d.jpg",keyword:!0,link:"https://stakwork-uploads.s3.amazonaws.com/uploads/customers/2707/media_to_local/1ced1636-bd02-426f-a451-f1ebcd2108d1/f1d75b7e-a877-4052-acdd-23958f6207d6.mp3",node_type:"clip",pub_key:"",ref_id:"41015fe4-63fd-46d7-8dde-f065457f2af6",show_title:"Art of Tomas",text:"Yeah, I think so. As a bitcoin, I wish I could just tell people, just buy bitcoin and it fixes everything. I wish it was so easy. But for most people, unfortunately, bitcoin volatile, it's too much. So I think looking for like I put on the title bitcoinsolutions, and I think things like a bitcoin backed stablecoin for a lot of people in the world make a lot of sense. And if you could do it in a way that also benefits bitcoin, which is what rootstock is doing and why I like it so much, I think that is the best way forward. Alex, please. Yeah, definitely. I think one of the things that we actually started working on with our skill and metamorphosis in the space was that what we wanted to do was we wanted to look at how can we achieve market penetration. One of the problems that we have in emerging markets, or I can't say Zimbabwe's, emerging market in undeveloped markets like Zimbabwe for example, is because we face sanctions and of disadvantage we can't have what sort of central exchanges. So the thing about central exchanges, especially like what we saw with FTX was these exchanges often don't hold any bitcoin, they just come up with the own kind of altcoins and then they promote them and then they just dump them on retailers, for example. Right, but the thing about these exchanges is that you have these new types of what you call it, stable coins like USCC or UST that can pay these guys massive amount of startup capital. And then these individuals, these exchanges now have incentive to register these debt coins only and promote them regardless of whether they're beneficial to the end user, right? So there's kind of an unfair advantage when it comes to bitcoin versus these other cryptocurrencies at the end of the day. So what we saw was that because we don't have exchanges that can propagate the only agendas involved with, we can now we kind of have an advantage. And this advantage now comes with to access bitcoin which is highly demanded as well, where comes at a cost at 10% premium because first there's a cost of getting the capital outside of Zubay to buy this bitcoin and then coming back to Salad here, which is on 2% depending on the level of liquidity that you have and that you're transporting. The second challenge is that the second premium is that it comes from individuals wanting to make a profit. Now, if you are passionate bitcoin like myself and Metamorphosis, what you can do is say let's forgo the profits today. But also depending that we have a job with our so it's really nice that we've been able to get a company like I was K for example, that actually pays us to grow these communities to improve risk on adoption in Zimbabwe. Anyway, what is happening is that you can basically forgo the profit and then bring the trees down to about 2% 3% and then what happens is that you now can sell bitcoin cheaper than most of these stable coins like US CC UCC. And then also you can also undercut the current legacy system which is also charging around ten to 15% premium. And then people can now start seeing what should the financial benefits of using bitcoin. Once again, the problem is that Bitcoin's financial benefits was taken away when exchanges went away. But now we're saying, okay, maybe that's actually an advantage and something that we can use against these individuals to ensure that we can push Bitcoin because backstabbing like Donald Chain, for example, at a very low fee. If you guys can do that, that is brilliant, because that gives you an advantage. I wanted to ask you, we're going. To be working on that. We believe that stable coins are kind of the short term solution for a lot of people. Like you said Thomas, a lot of people cannot afford the volatility of bitcoin, but they can use for sure unstable coin that is backed by bitcoin and that all the fees that you pay go back to the miners and to the bigger ecosystem. And I think it's a certain solution for a lot of people. And we believe that a lot of people are going to embrace crypto through a single point that is backed by bitcoin. They are going to see how bitcoin can add value to their life, and then they're going to understand bitcoin after that. So I think what Alexandria is proposing, I think is key, and I believe it's a great strategy because it's going to be for them, like, seven to 8% cheaper than buying USDT and more secure even for them. So, yeah, I think it's a great strategy and I hope we can make this happen and it's going to help a lot of people there. Yes, absolutely. Absolutely. For me, a bitcoin backstop solves many, many things. At the same time, it allows for millions of users that cannot use bitcoin to benefit from bitcoin, to benefit from the growth of the network, the security from the network. And also because all the fees go to the bitcoin miners, all those new users, they are also making the bitcoin network stronger. So it combines a lot of things that it surprises me that a lot of bitcoiners have such a hard time understanding this. And that's why I wanted to have your perspective, Brian, in all of these. Because in your book, bitcoin evangelism, you do a great job explaining everything of how bitcoin is, how it works, what it means. And he also described when you talk about altcoins, that a lot of the altcoin services would be built on big coin eventually. So I wanted to ask you if you have tried any of the VidCon layer two solutions or these big compact stable coins, or if you have any questions or anything in that regard. Yeah, that's actually part of why I really like jumping on with you guys. I see this as a really good opportunity for me to learn. The only layer, too, I really have any familiarity with is lightning. I mean, I really want to learn more about rootstock. I want to learn more about bitcoin backstable coins. If you wouldn't mind, can you break down how a bitcoin backed stablecoin works? Like, how did the bitcoin reserves work and that sort of thing? Because this is very much I mean, it's pretty funny. Bitcoin is such a new space, right? I mean, I've been in it for ten years, and it's evolving at such a light speed that even the quote unquote experts, nobody's an expert at every element of it. Nobody's a doctor in bitcoin at this point, right? So I'm really here in, like, a learning capacity for these particular things. So if you want to mind just breaking that down, because I feel like that's part of my bitcoin, evangelism is to help people understand some of these emerging concepts, because, yes, I think the concept of a bitcoin backed stablecoin has a lot of allure of people that I talk to that particularly talk about the volatility. Like you mentioned earlier, a bitcoin where I lean into the volatility of bitcoin. I actually don't shy away from that, but I go the one bitcoin is one bitcoin and that sort of thing. And that doesn't appeal to everybody. And I understand why, if you wouldn't mind just illuminating this idea of bitcoin back stablecoins a little bit more for me. I mean, you guys are talking about it in a very practical sense, so I get it in that regard, the need for it and why it works. But if you can maybe even explain some of the technical side of it, not on like a computer science standpoint, but just maybe how the reserves work, how do the fees go to the miners and those types of things. Right, yeah, I can do that. I wouldn't be able to explain it technically, even if you wanted me to. But basically, the bitcoin network would stand as, like, the base layer, and on top of it, you have different layers, too. Like lighting is one, liquid is another one, and you have Rootstock. Some of the key characteristics that I love about Rootstock is that the main currency is pegged one to one to BTC. So it's our BTC, and you have the bridge that you can go back and forth. And one of the platforms that are running now on Rootstock is called Money on chain. And I created the first bitcoin backed stale coin. Before. Sorry, I skipped this very important point is that root stock is merged mine by the bitcoin miners. So if you're a bitcoin miner, you can mine both chains at the same time with no extra cost, and you earn more bitcoin if you do. So Roots talk at the same time, make the bitcoin miners earn more money, which most like now is quite important. So you earn so that the revenue would be the mining reward plus the bitcoin fee from the block and then whatever fee reward from the root stock block. Okay. And you get that in bitcoin. Right. And then we have the main chain, which is money on Chain. Actually, before we go into money on chain, to me, the fact that Rootstock has bitcoin as its native currency and the fees go to the bitcoin miners makes it very much aligned with bitcoin because it means that all the value from Rootstock is going to accrue to bitcoin, the asset. And all the extra financial movement that happens on Rootstock goes to the bitcoin miners to make the bitcoin network stronger. So they're very much aligned in that sense. Sure. Yeah, I want to add on I just want to add a few other points. The first thing is, as soon as you buy your bitcoin, basically what you do is you plug into a permissionless, peg into small bitcoin. So you have a small contract plus your bitcoin. And then this allows you to basically now mint a dollar and chain. So dollar and chain is basically now a bitcoin has backed eight to one. So for every $1 of bitcoin, so dollars of bitcoin, you have $8 of bitcoin basically backing it, basically. And then I think what autonomous is saying is that whenever the individuals that are mining bitcoin, these individuals with a slight switch can also use a place that's called neo merge mining, which allows them to also mine the restock network, basically, which is the second layer towards that. So right now we're saying about kind of varies from 40% to about 60% of breakcoin hashing power. And like what you said, basically all of the cryptographic hashes from the restock network is actually added onto bitcoins. They're one's block, basically. So this means it's very beneficial to the bigger ecosystem because every dollar that individuals buy basically just adds value to bitcoin itself. But I think also the one thing that I think was important was I can't sell bitcoin at extremely low premium at 3%. For example, in because of the volatility, we can see bitcoin moving from 5% to 2% on a daily basis, which is good if you're just someone who wants to buy and hold it for a day to day basis. But now if I want to pennies with the market and offer extremely low fees, for example, so that bitcoin adoption can occur much rapidly, it's not really possible because of monetility. But what I can do is I can use the same that uses bitcoin as a net currency and basically start selling that at about 3%, where the only thing that I'm charging is the cost of transportation to go to a country that has exchanged, buy the bitcoin, come back to Zimbabwe and sell it to individuals. So that individuals can now use this as a form of remittances. Because the one thing I'm noticing is that everyone wants to use big kind of remittance, but the cost of fees is what's really kind of interesting sometimes. I remember I wanted to do a geo transaction when I was in Boswana with my father who's in Zim. As soon as you heard the fees, you're so shocked that we were paying this much in Zimbabwe. And that's something that I've always kind of disliked and I think I want to try changing, but it's only possible because I can use auto and chain, which has no volatility and stuff. ",timestamp:"00:22:42-00:37:24",topics:["Bitcoin-backed stablecoins","Bitcoin exchanges","Brian De Mint","Rootstock blockchain"],type:"twitter_space",weight:5.239642381668091},{boost:0,date:1472358600,description:"Growing small business to increase the economy",episode_title:"TheMacroView Episode 4: Access to Capital",guests:[],hosts:[],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/8e52e9c4-52e8-4dea-8ed9-8c6a7fcef25a.jpg",keyword:!0,link:"https://www.blogtalkradio.com/themacroview/2016/08/28/themacroview-episode-4-access-to-capital.mp3",node_type:"clip",pub_key:"",ref_id:"7eca97d5-7a23-4e41-8e04-cfffdef85f06",show_title:"The Macro View",text:"can start to really fund our Social Security liabilities and our entitlements and we're going to talk about that in another episode. But one of the things we got to do to be able to do any of this, we got to get the economy moving again. And the way you get the economy moving again is you do what we had throughout the early 90s, which is just flourishing small businesses that were able to access capital. And yeah, you had scams that went on with the pink sheets pushers and the people robbing old granny. Yeah, it's sad and it sucks. And a lot of these regulations exist but most business owners aren't like that. And honestly anymore. I don't know if it was just totally I'm too young to know and I didn't work there. I don't know if Wall Street was just really a bad place back then. Maybe it was. But I'm in the financial industry and I know a bunch of financial advisors and guess what? They're not bad people. They're not bad people, they're good people. They want to do best by their clients. They want to do best by their clients and they're not going to go and rip their clients off. But if you had a vibrant market where they could get good information, they knew that these securities were legitimate, that they had been vetted, that they were on a market where there's transparency into the businesses. Maybe you don't require quarterlies for small businesses because that's too expensive, but maybe you require an annual or maybe like I said, you have some sort of financial portal where shareholders can at least gain that next level of insight into what's going on in the business at that early stage of a small business. But we need a vibrant market. We need a vibrant market where wealthy people and nonwealthy people can go and find strong early stage business deals. Investment opportunities and ventures that are early stage and start up and where they can put capital at risk in a way that feels safe and secure on a market. That they vet them and make the registration process cheap and easy and the securities that are offered are somewhat standardized and you have some insight into that. Business people will do it. And then you slap a tax credit for pre revenue and a tax deduction for post revenue and that accounts for the risk. And maybe what you do is for those pre revenue businesses, the only type of security they can offer is a convertible that pays a coupon. So you're lowering the risk profile. I wouldn't be a fan of that. But hey, it's a step in the right direction. I'd rather prefer where investors and businesses, businesses offer the type of security that investors want to buy and where as long as that capital is flowing to a small business or startup that is taking that capital, putting it to work and hiring new people, what I want to see is I want to see new businesses come out with new technologies, with new products, with new services. I want to see them compete against the old ones. I want to see them hire new people. I want to see them drive the cost of goods down. I want to see them drive wages up by competing for the best talent. And the way that you do that is you get entrepreneurs who are out there. There are entrepreneurs out there who want capital to put to work, who they know with the right amount. They just overcame the barriers to entry that we all set upon them with our really high regulatory costs and ridiculous regulations. If we just overcame that as an entrepreneur, we would be successful. And what we need to get there is a little bit more capital than what we foresaw because we didn't realize all these regulations were coming out. We started three or four years ago and wham, we got slapped with tons of. Uncertainty and we have no clue when it's going to be implemented when or what's going to be implemented when and it's a total mess if you're an early stage entrepreneur especially in a highly regulated industry. And that's my weekly rant for today. I hope you guys enjoyed the show. We're going to be wrapping up here in just a second. Got about four minutes left. I apologize for the technical error earlier on. Had a little bit of trouble with my microphone when I tried to dial in it's just a ton of static in my headphones. So we had the show scheduled earlier and unfortunately I was in it. Had a lot of static going on had to unplug my microphone and try to figure out what was going on so I just had to end up recreating the episode. Sorry about that for all those that listened to the first one I had posted and are now going to check back in a little bit later. So to wrap up I wanted to talk about something that I saw the other day that I thought was really funny. I thought it was very creative and expertly put together and what it's called is Lovegov and you could just YouTube search YouTube lovegov and it's a series about six short videos about five minutes each and it is a sort of a satirical show where a girl falls in love with a guy named Gov and Gov is sort of for all intents and purposes a government regulator but kind of is the allencompassing federal regulator. He comes and points out every little thing and it's just her life through college and government encouraging her to do this with certain incentives or Gov not government but Gov is encouraging her to do this with certain incentives or encouraging her to do that with certain incentives like in college and going abroad and taking on all this debt and then when she gets out starting a business oh yeah I love small business. Not as much as big business but I like small business too and here I've got your ocean safety regulations and I'm not doing it justice at all. You got it. And maybe on the next episode I'll play a little clip for man might try to reach out and get permission to do that. I think it's done by the Independence Institute but if you go on YouTube just type in Lovspace G-O-V Lovegov and you'll find it and I think that you'll really enjoy it. I think it's really well put together. It's the type of thing that we need more of. We need more satirical comical culture winning culture winning media that's funny. That's light but there really does nail the point across and I think that this little short series of videos really dead it was really good. Had me laughing but at the same time was a serious point that got across and got made and I think it's very relatable and would be very relatable to a lot of people of all political ideologies to show how government gets involved in the market and really destroys a lot of the market incentives and makes it to where people have a much harder time going about chasing their dreams and pursuing what it is that they really want to do and what they thought was their version of the American Dream. Not some Washington bureaucrats version of it. Again, this is Andrew Smith coming to you live from downtown La. This was the macro view. Hope you guys enjoyed it. Tonight's episode is all about access to capital, how we're going to get it, why it's so important, and talk a little bit about why we don't have it right now. If you're just tuning in now, go back and listen to the episode in full in about ten minutes and we're going to wrap up here. Hope you guys have a wonderful weekend. Take care. Again, this is The Macro View, coming to you live from downtown La. ",timestamp:"00:52:24-01:00:00",topics:["Small business","investment","new business","capital access","entrepreneur","government regulations"],type:"podcast",weight:5.209966659545898},{boost:0,date:1671321600,description:"How big data center miners help enable self sovereignty for individuals",episode_title:"#Bitcoin Mining Saves the World - Brought to you by Marathon",guests:[{name:"Steve Barbour",profile_picture:"https://pbs.twimg.com/profile_images/1592714173469065216/q8kXPyQI_400x400.jpg",ref_id:"63a731b8-4759-4360-9e9d-d66f884e12d8",twitter_handle:"SGBarbour"},{name:"Nathaniel Harmon",profile_picture:"https://pbs.twimg.com/profile_images/1578090357102780416/etXW-RA9_400x400.jpg",ref_id:"9105fb4e-4150-4c25-90f1-8ea770585749",twitter_handle:"NateHawaii"},{name:"Taylor Monnig",profile_picture:"https://pbs.twimg.com/profile_images/1599563776621219840/mvb8y3zY_400x400.jpg",ref_id:"b8513b01-ff94-4d7f-944f-5c92e1126885",twitter_handle:"taylorbmonnig"},{name:"Harry Suddock",profile_picture:"",ref_id:"6440ea0f-c982-4b76-b7c2-9c6bf7e9a4a9",twitter_handle:""}],hosts:[{name:"George Kaloudis",profile_picture:"https://pbs.twimg.com/profile_images/1545498090118950913/aGCJaGqF_400x400.jpg",ref_id:"4ae2c311-16fd-4586-b65d-f046b1feb9ce",twitter_handle:"gckaloudis"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/492cbcce-3744-4d8b-b2ca-3a7f063e798a.jpg",keyword:!0,link:"https://www.youtube.com/watch?v=Tk8oChjgVhw",node_type:"clip",pub_key:"029099ec31eb33594611dc47d5c93de2c1aa86918e3a36b408c14a500601c8bc9b",ref_id:"6e890ef3-7358-40d6-a01f-44f444dbabfc",show_title:"Swan Bitcoin",text:"Taylor, we're talking about the little guy a lot over here. And you work at a big public mining company. So how exactly are you big data center public miner helping enable self sovereignty for the little guy? So I guess I'll take it from a society perspective, our last two acquisitions are good examples of this. These are sites that are in, you know, rural Georgia, have a ton of excess power that was simply just going to waste. We've been able to go in there, utilize over 100 power, provide over, you know, 50 jobs, and introduce bitcoin into the daily lives of all these people, along with millions of dollars of revenue for these small cities. So from a self sovereignty perspective, it might be a little bit difficult. But from a societal perspective, we're making a huge impact with mining all across rural Georgia by building these data centers. Cool. Let's talk about energy. I think people want to hear us talk about energy anyway. So Harry you touched on it. Per capita energy production is a good thing. Energy go up, bad things go down. I read something recently from Lyn Alden where basically we're just trying to capture the sun in some capacity, as much concentrate as sun as we can. That's ",timestamp:"00:09:38-00:10:45",topics:["Self sovereignty","Bitcoin mining"],type:"youtube",weight:11.383676517140954},{boost:0,date:1623733200,description:"The Processes and Procedures in Small Business",episode_title:"Andrew Frazier on Running Your Business",guests:[],hosts:[],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/f2b2a2b2-8869-4256-94b9-a91c91c1ce7e.jpg",keyword:!0,link:"https://dts.podtrac.com/redirect.mp3/cdn.mises.org/122_e4b_andrew-frazier.mp3",node_type:"clip",pub_key:"",ref_id:"3dacb7c8-34d2-4e73-8064-5d53c6857239",show_title:"Economics For Business",text:"to our interview. When I was in the big business world, Andrew, we used to build what we call process maps, which are every step in the process, every handoff who's involved, what the output is, what the input is to the next step. Is that what you're advocating, that kind of detailed process mapping our step by step outline of activity? I'm advocating that, of course, in small business, you have a lot less resources and manpower, so it's a process. And early on, when you're working in your business, you're working and sort of developing them as you go. But to move forward and grow, you have to become a supervisor and a manager. And at those levels, you develop the process and procedures so that you can build your organization and continue to do business the way that you want to do business and in the way that has made your business successful previously. Yeah, we used to have a thing called the Procedures Book that catches all of those processes. Do you recommend that small businesses have something like that? They accumulate these processes over time? I think you do the keys to really going from working in your business to working on your business. That's where you develop your processes and procedures and you optimize your business. So that's really what working on your business is. And by doing that, you also increase capacity. So you're working in the business, you're working on developing your products, your services, finding the right target market for that. Once you do that, then you should pivot to working on your business, which is really when you're putting processes and procedures into place, you're optimizing your business plan and your strategy, and then you're building capacity and then working on the future of your business, you're really developing your strategic growth plan ",timestamp:"00:19:37-00:21:44",topics:["Small Business"],type:"podcast",weight:5.171255588532055},{boost:0,date:1613511331,description:"The Bitcoin education",episode_title:"WHY ARE WE BULLISH? Bitcoin Buying Tsunami Swells in All Waters ep147",guests:[{name:" Away Slice",profile_picture:"https://pbs.twimg.com/profile_images/1493953883370053632/rvtEfkr-_400x400.jpg",ref_id:"ff304d54-ca39-45eb-98ef-483460548c9a",twitter_handle:"add_slice"},{name:"Littlest Hodler",profile_picture:"https://pbs.twimg.com/profile_images/1396223393322749952/uzavXUxh_400x400.jpg",ref_id:"5eaa1126-c920-4860-89a0-459e64be2af5",twitter_handle:"littlesthodler"},{name:" and Colin Aulds",profile_picture:"https://pbs.twimg.com/profile_images/1151579149091262464/uNkb8aat_400x400.jpg",ref_id:"fbd7719d-1c4a-497d-96a8-1d34e2e91702",twitter_handle:"Colin_Aulds"},{name:" Mark Moss",profile_picture:"https://pbs.twimg.com/profile_images/1501276126823346177/6grHYzO4_400x400.jpg",ref_id:"5a1cc110-3363-4dd1-a568-e80f70a51925",twitter_handle:"1MarkMoss"}],hosts:[{name:"Ben Perrin",profile_picture:"https://pbs.twimg.com/profile_images/1181715113226596352/ipGVEcYH_400x400.jpg",ref_id:"e6b013ef-178b-4b41-95ee-423148a3dc3a",twitter_handle:"profbenperrin"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/419512c2-e309-4b25-bfe2-cd481d53f66d.jpg",keyword:!0,link:"https://anchor.fm/s/11e95d20/podcast/play/26808829/https%253A%252F%252Fd3ctxlq1ktw2nl.cloudfront.net%252Fstaging%252F2021-1-16%252F91cb3e87-a549-79e0-bed0-3b2785b9eed4.mp3",node_type:"clip",pub_key:"02c431e64078b10925584d64824c9d1d12eca05e2c56660ffa5ac84aa6946adfe5",ref_id:"1376395c-9c36-4f82-bdde-86ce6cf7ba26",show_title:"BTC Sessions",text:"most of the time, spent some time with a small company. Now I'm back with the big guys and account management. So I'm not doing as much face to face anymore. But in sales we talk about 90% of sales is listening. So to Mark's point earlier, you don't just say, you know, I've got this widget and it solves 86 problems. Nobody cares about that. If they only care about the one, maybe two problems that it solves for them that's specific to their use case, right? So I have a personal rule with friends. I'm from a very small town. I don't have a lot of friends that are in a bitcoin. I have had two people this week alone come to me. Usually starts on like, Facebook messenger or something, and then we meet up for a beer and chat about it, but I never bring it up. I'm involved a little bit with the Bitcoin runners fitness club over in Europe, so I have a couple of t shirts and stuff, so I wear them to the gym so people know, but I never bring it up. I let people come to me, and then they bring up, listen, I'm worried about how much my grocery bill is going to be next year. I'm worried about bank of Canada borrowing all this money on Canada too. So it's like they say, we're borrowing money from the bank of Canada, but what they really mean is that we're just printing it, and it's impoverishing all our children and grandchildren, right? So I wait for those kind of conversations, and then usually I'll sit down with them with a beer and say, what do you want to do? Do you want to get in? I don't want to show anybody while I'm here, but I do tend to point people to shake pay. I find it's an incredibly simple user interface. If you can send an e transfer, you can use shakepay, share it to Ben. Because you pointed me to blue wallet when I was kind of onboarding my wife a few months ago. I've been doing the hardware thing for a little while and was kind of out of the loop as far as digital wallet goes outside of lightning, so I asked for you for some recommendation. Blue is great because it's got some very basic features. It's easy to learn, and then you can kind of scale up from there as you need. But I think I have an onboarding a lot of people. That's not my goal here, but that's my system for doing so when it arises, right, is that I wait for people to come to me, and I wait for their specific problem, and then I say, well, I can help you out. And this is the underlying technology behind bitcoin that may help alleviate your fears or put you on the right path to whatever decision is right for you. And sometimes that means they spend. I had a buddy the other day that cashed in $50 on his wealthsimple account after doing some stock trading just to see what it was like. And maybe he comes back to me. Maybe that's as far as he goes, right? But I've had other guys that I've helped out that I know are a little bit deep for average, regular middle class people. So that's my strategy for onboarding. It's not something I actively seek out, but I'm always happy to talk about it when it comes out. That's awesome. Tons of noobs coming in these days, and it's only just beginning. I feel like all of us are probably starting to get those friends and family members or even just random DMs from people on all kinds of different platforms. So exciting to see. But we've got our work cut out for us, that's for damn sure. So what I want to do, obviously, again, there's almost 140 people watching smash like button. Give this a share. Let's get a few more people watching it here. We're going to jump to Mark. Mark, dude, let's do a refresh here. What has you feeling bullish this week? Yes, I mean there's so much to be bullish for, right? But I guess today I was digging through some data, looking at working on my next video. Some of the data I was looking at today ",timestamp:"00:47:46-00:51:21",topics:["Bitcoin education"],type:"podcast",weight:5.149457931518555},{boost:0,date:1571767106,description:"Is the device able to verify bitcoin transactions? ",episode_title:"BUC Live: Lightning Hardware and Nodes Panel from The Lightning Conference Berlin",guests:[{name:"ketominer",profile_picture:"https://pbs.twimg.com/profile_images/1245972079528329218/YDUD9N2Q_400x400.jpg",ref_id:"2f8b0b59-6f23-4c89-973c-668cc7666998",twitter_handle:"ketominer"},{name:"Stacie Waleyco",profile_picture:"https://pbs.twimg.com/profile_images/1490885395390861317/MOzYmFOn_400x400.jpg",ref_id:"d4292662-08f9-4b16-a889-b61a401edcc2",twitter_handle:"satsie"},{name:"Christian Rotzoll",profile_picture:"https://pbs.twimg.com/profile_images/1593996559162773504/qKZTYL0I_400x400.jpg",ref_id:"8c13f2e9-d81a-4116-9ad7-d14a66d5f899",twitter_handle:"rtzll"},{name:"Sebastian Küng",profile_picture:"https://abs.twimg.com/sticky/default_profile_images/default_profile_400x400.png",ref_id:"04448652-5b1f-480c-a573-17c7de956e2c",twitter_handle:"sebastiankueng"}],hosts:[{name:"Anita Posch",profile_picture:"https://pbs.twimg.com/profile_images/1491071678725644288/yehGegWl_400x400.jpg",ref_id:"b60af304-7a57-4a2a-b988-92b960a6b0a1",twitter_handle:"AnitaPosch"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/357dc2db-2643-49f0-9393-5a20ed21d0fe.jpg",keyword:!0,link:"https://bitcoinundco.com/en/podlove/file/533/s/feed/c/mp3/029-en.mp3",node_type:"clip",pub_key:"03abd9980b0c94ddbce7bde91affd5894ca40aaeda0ee0a33503e0c9bb55307274",ref_id:"f6e48088-be00-4596-8731-433c94a02ddb",show_title:"The Anita Posch Show: A Bitcoin only podcast",text:"When I think about buying a Bitcoin node or Lightning node, I'm mostly interested in verifying my own Bitcoin transactions because I don't want the hassle to install a full note on my laptop and stuff. Do your products verify Bitcoin transactions? I mean, can I verify my own? I think I can speak for everyone here. That's the main goal of having the hardware for loans. Okay, I just heard that not all devices do that. So that's why I'm asking. I don't know, maybe this is a misinformation. Yeah. So those boxes, I think everybody has started with very small hardware. So I think the castle box also in the beginning. Raspberry Pi three. Raspberry. Also had the raspberry pi three in the past. Now also offering or being able to use the Raspberry Pi four and with the response such a low powered hardware, then you would need maybe to get the whole blockchain, you were not able to verify it yourself, so you had to rely on some kind of downloaded blockchain, whatever. That was not a good approach. But now with the recipe by four and I think even also all the other boxes are using now power full enough hardware to really verify the whole complete blockchain yourself and have the whole copy of the blockchain then at your service. And then you can do everything with your node and verify everything on your side without relying on any third ",timestamp:"00:07:06-00:08:37",topics:["Bitcoin","BTC Node"],type:"podcast",weight:5.1300153732299805},{boost:0,date:1266645600,description:"Big business Vs Small Business in the Free Market",episode_title:"13. Monopoly and Competition",guests:[],hosts:[],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/ef62c7ab-ef09-47b7-9af4-2ebe2384a72f.jpg",keyword:!0,link:"https://dts.podtrac.com/redirect.mp3/cdn.mises.org/13_AustrianEcon_Rothbard_1972.mp3",node_type:"clip",pub_key:"",ref_id:"cd0d29e6-af1f-4a94-8fc9-cc38a719807b",show_title:"Austrian Economics: An Introductory Course",text:"thing about big business versus small business. It's not always true that big business can out compete small business on the free market. When Standard Oil, for example, had achieved something like 90% of the oil refinery business by 1900, they began to slip. After that, before the anti trust action against Santa world. They began to slip because they weren't the company gets too big on the market, they began to get sluggish bureaucratic. They don't look for new things, new inventions and new processes. Santa role was the last major company to get into the involved. Santa Claus always been based on Cleveland western Pennsylvania oil fields. And so they're the last major company that began interest in Texas and Oklahoma oil fields. This is the wave of the future. And so then Golf comes in as a new company in Texas and they begin to outdo being to take an increasing share of the business away from San Oil company. And the same thing happened all across the board. US steel, for example, gets formed with something like an attempt to monopolize. The whole steel industry gets form as 80% of the share of the market or something like that. It's now something like 20% slipping all the time. Every year USD sinks deeper and deeper into slots. They were too big, they were outcompeted. USD was the last corporation in the world, practically. They adopted the basic oxygen process, which is the latest improvement in the method of producing steel. And this is through many areas across the board. One of my favorite examples of this is the heroic small business which is always able to outcompete big business or larger business is therefore always put out of business by government. These are the heroic small pushcard peddlers. If you remember back to the push car pedaling masses. The push car peddlers, they have almost no capital. You can't get much smaller than a push card cover. The capital has push cart and as they supply apples or whatever, and that's it. Sometime before the push cart, the push car pedal was sort of the aristocrat of a pedaling business. Before you got to be wealthy enough to be a push car pedal, you just had a box or a case or the lease or something, that was it. Anyway, the push car peddler doesn't have any capital. It doesn't have nearly as much capital as retail stores or department stores, et cetera. And yeah, he has a great advantage. He's mobile when it's raining out, he packs up shop, he doesn't have to pay rent, he zips around, he can get to the best corner, he can get to the rush hour corner, 42nd street or whatever. And therefore he's usually able to do very well in competition to such an extent that in city after city, in town after town, the United States, the retail interests, the retail stores were able to put political pressure on the government to outlaw the pushback, either by charging a license to them, which is prohibitive, or by just putting out of business altogether. Usually on the grounds, of course, the government can't say, municipal government can't say we're doing this because we want to privilege the retail stores. That would be a little too hairy. So they say it is unaesthetic. New York is so beautiful, for example, and the streets are so beautiful, we can't allow the ice to push guard pepper. So you can imagine how much ice that cuts. And the retail business, by the way, the whole history of the retail business in the United States is a whole history, a whole record of humbling, the competition of new people coming up and delaying a competitive process by the use of government. First, it was a traveling salesman. As you all might know, traveling salesman jokes were sort of the big dirty joke thing years ago. And the reason is the traveling sales were illegal most of the time, 50 to about 18 months. The institution of traveling sales when it first comes in about 1850. Before that, there are only six stores, and you buy from somebody in New York, in Detroit. Traveling sales is a great new invention in the retailing industry. And for about 25 years, I put out a business because the existing stores are competing in the traveling sales. And then, like the fact traveling sales, when mobile flexibility zip around, they sell on a personal basis and all that. And so town after town, all over the United States, past ordinances either outlawing traveling sales altogether, ultimately placing very high license taxes in order to get into beach for Wyoming, have to pay $100 a year or something. So if the traveling sales going to pay all the license fees, you would have to pay $20,000 a year or something out of business. As a result of traveling sales was always in a state of illegality. He was constantly on the lamb from the cops, one panel to the other. Therefore had a sort of disreputable. The whole profession was disreputable. Something like bookies today, I guess. And so he had a family salesman joke because of the disreputable profession. Finally, after 25, 30 years of being a state of outlaw, they finally did so well, they finally pushed their way through, and they finally allowed to exist. It became accepted in the retail industry, and most firms then began to operate employee traveling. So they sort of joined them if they couldn't lick them no sooner. That happened in late 19th century. Things are doing pretty well, and all of a sudden, that vicious new monopolistic thing comes in horizon terrible thing, the apartment store. An apartment store first comes in. I said, oh, my god, it's awful. Awful thing. Instead of having one store sell, one product has this terrible monopoly store like Macy's that's selling everything. That's obviously an evil monopoly. You have to smash it. And so the government starts putting on department store, special department store taxes and special restrictions. And that took about 20 years before the department stores worked themselves out of that. Finally, the department store is just about accepted, and the hobbling of the apartment store is eliminated. We got a new terrible thing. The chain store. Amp the first big chain store. And I still remember I'm moving up to remember the days and amp an evil monopoly and you have to smash it and break it up because the mom and pop stores are going to be put out of business. And that's where they had spaceway. And all these others coming out competed amp and nobody talks anymore about breaking up amp. Amp is pretty cruddy shape in comparison with the newer and more efficient stores. ",timestamp:"01:13:30-01:19:27",topics:["Big business","Small Business","Free Market"],type:"podcast",weight:5.126088380813599},{boost:0,date:1471930200,description:"Survival rate of small business and startups ",episode_title:"TheMacroView Episode #3: Financial Entanglement",guests:[],hosts:[],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/8e52e9c4-52e8-4dea-8ed9-8c6a7fcef25a.jpg",keyword:!0,link:"https://www.blogtalkradio.com/themacroview/2016/08/23/themacroview-episode-3-financial-entanglement.mp3",node_type:"clip",pub_key:"",ref_id:"bdc4757d-1e87-4fa3-b293-6f375af8490f",show_title:"The Macro View",text:"scatter plot chart and it kind of shows from the first year through the 10th year, we have a little bit more data than that, but this was a more complete data set and more recent as well. This is slide number 13 on episode four slideshow. And basically what this shows is that look, after year two, about 79% of businesses are still alive. Tier three, about 67%. This notion, which we hear, it's a cliche that we hear a lot throughout our lifetimes, that within three years, 90% businesses or nine out of every ten businesses go bankrupt, it's actually not true. About one out of every three goes bankrupt. Two out of every three are still alive after three years. Now, after four years, it goes down slightly under 60%, just 60%. After five years, just under 55%, about 53%. After six years, about 48%. After seven, about 44. After eight, about 41. After nine, about 38%. And by year ten, about 36% of the businesses are still alive. Essentially, after three years, you got one out of every three that's gone bankrupt. After ten years, you got two out of every three that's gone bankrupt. So is it that risky? What we're not showing here in this slide, and I may add a slide trying to show this, is what the upside is not every business is a grand slam, not every business is a grand slam. And you could still lose money as an investor through dilution and have a restructuring and whatnot, but the business still be alive. That is the case. I'm not going to deny that is the case. But if businesses are generally surviving far longer than what we expect, should there be this much fear built around this idea of businesses going out of business really quickly and not being able to lend to businesses? If you're a private individual who's not necessarily in a credit investor, not really even having a market for it, not really having exchanges for it, making it highly restrictive on banks and offering incentives to banks to only lend in certain ways to these small businesses, ie. SBA loans that are guaranteed 75% are guaranteed by Small Business Administration of the government, and in some cases, higher than 75% are guaranteed. So why would a bank lend to any other small business other than through an SBA loan? So you've got misalignment of incentives, you've got a number of other issues on the banking side, and then on the private individual side, you have literal laws that make it more difficult. The lower the amount of capital available to people the lower the amount of capital available to people that are trying to start a business and restrict mechanisms for delivering capital from an individual with capital to provide any business that needs capital to put to work, and then being able to come to a transaction that makes sense, a value that makes sense to both of them. And to do this on a mass scale with thousands of people. As opposed to trying to find one or two or three wealthy individuals and have it set up in the right way with technology. You can do it really. Really quickly and really. Really easily. And you can be fully accountable and you can have the bookkeeping and records keeping. You could do based annual reports that provide enough information to shareholders and most good business owners are going to do that anyways. But the idea that we don't have this mechanism in place and that it's actually illegal to raise money from somebody who's not an accredited investor from the general public if you're not a publicly traded company. And I-E-A large company because a lot of the exchanges have rules where you have to be over a certain size in order to list on those exchanges. Now, there's the over the counter exchanges that don't, but a lot of those are looked at very poorly by mainstream America, and there are no mechanisms offered by the big retail brokers for equity or debt crowdfunding for small businesses to be able to access those markets. And quite frankly, I don't blame them for it yet because the rules are not really clear on where that's going to go. The jobs that tried to clear that up, and now you get the SEC trying to really write the rules, and it's not really much is changing. They can do well. If you're worth 50 million, want to raise capital from the general public and not go public, then you can kind of do that. But you got to be big already. 50 million is not a huge business, but that's not the size I'm talking about, okay? The size I'm talking about are startups to three or $4 million, maybe $5 million in revenue, or if it's a very low margin business, maybe two or 3 million to $5 million in profits. That's the size business that I'm talking about that has difficulty gaining access to capital. And we need to figure out a way to match people who have capital to lend or invest with businesses that are of that size. That have capital. That have a need for capital to be able to put it to work and put it to work quickly. That will hire people that have good business models. That they could scale them. Will become profitable. And all they need is access to capital to get there. That's what the next show is going to be about. I hope you guys enjoyed this little pop up show that I did tonight, talking about the cost of the regulatory environment. Remember, it's about 11% of GDP. That's the hidden cost. That's the hidden cost that affects people's wages, that affects the amount of money that you pay at stores for goods. That affects every aspect of your life. It affects the cost of the house you buy or the home that you rent. Whatever the case is, whatever you're thinking about, why is this so difficult? This is a big reason why these regulatory costs $1.8 trillion in regulatory costs, the hidden regulatory costs, which are more than the federal tax base, excluding capital gains and some excess taxes and things like that. But if you're just to account for corporate and individual income taxes, the regulatory costs are bigger than that income tax base. That's insane. Those are hidden costs that we're all feeling right now. We're wondering why. And some people are saying it's Mexican immigration. Some people are saying it's free trade agreement. Some people are saying other outlandish things that have no basis in reality or tried and true economic theory. We do need to simplify the tax code even if we leave rates the same, we got to simplify it. We got to flatten it. We got to flatten it for people. We got to make it a lot easier for them to comply. It's got to be able to be filled out in a matter of a day. And same thing for small businesses and really for all businesses so that they can keep more of that money and they're not having to pay auditors and accountants to prepare it. And we've got to go to a system where we adopt somewhat of a no harm, no foul rule for business owners where so long as we got to get rid of all this idea, we got to regulate best practices. Best practices regulate themselves. If you're not providing best practices as a business owner, you will have a competitor who will and will steal your market share, will steal your employees and we'll put you out of business. That's what happens. That's how competition works. That's how the market works. So we've got to get rid of rules and regulations that serve no purpose other than to say hey, we know better than you and if you don't do it our way, we're going to impose fines on you. All those do is set up barriers to entry and really do disincentivize the wealthy people who would invest under the current system from investing and would disincentivize the nonwealthy people who they're just not able to invest in these companies from investing if they understood those situations as well. Because it's very risky if your business could be put out of business by the government because you lost a sheet of paper or because you happen to run a factory and you have to have a stop button for the assembly line. But the assembly line is set up in a way to where it doesn't really work that way in your factory, which is a real case. I can't remember the name of it, but I'll post on the website when we eventually get the website up and going. But this was an actual case where essentially OSHA came in and said you have to have this and that. If they had actually understood the business circumstantially, not just broadly, these are the rules, these are the regulations, you have to do this. They don't understand why they really didn't need that. And there's a lot of those cases all throughout every single industry. No matter what industry you're talking about, you have tons of regulatory costs that are related to things that don't matter at all, that barely ever happen. And if they do happen, they're more of a tragedy that wouldn't be prevented by that regulation. And the reason that regulation exists is primarily because some expert who either worked for or used to work for a big major corporation, walked into a congressional hearing and publicly gave guidance to the regulatory bureaucracy that was writing the rules that Congress delegated the right to write and this expert is guiding them. This expert basically works for one of the big companies in that industry. That's how these things work. They don't come to small five person shop say hey, how do we do this? No, they go to a quote unquote expert from a major corporation and that quote unquote expert from a major corporation has their own interests and they're going to guide what they want to guide. At the end of the day. You end up with massive regulatory costs that don't really solve the problems that people cried out for regulation to solve because those problems are best solved by competition and regulatory bureaucracies prevent competition and by preventing competition they prevent the end goal that they've stated to try to achieve. Which is to create more equality in these markets and more fairness in these markets and a better distributive share of whatever and to have less negative incentives in the market for people to go out and commit crimes. Financial crimes. And to rip people off to make it harder for people to do that. Well the way you make it harder for people to do that is you have tons of competition. That's the way that you do that. And by having all this regulatory cost you reduce the competition and therefore reduce the amount of natural regulation that occurs from it. Well everybody, I hope you enjoyed tonight's pop up episode. I'm going to call tonight for there again this ",timestamp:"00:44:04-00:55:36",topics:["Small business","entrepreneurship","startup","regulatory cost","income tax"],type:"podcast",weight:5.105514287948608},{boost:0,date:1596686400,description:"[[Bitcoin Energy Consumption]]",episode_title:"Chat 45 - Bitcoin an Energy Revolution A panel at the VOB Conf",guests:[{name:"Tone Vays",profile_picture:"https://pbs.twimg.com/profile_images/1416821178266787844/T1OkI9ZW_400x400.jpg",ref_id:"da6fc991-7080-461c-86e3-4ac18c2f413d",twitter_handle:"tonevays"},{name:"Phillip Sandner",profile_picture:"https://pbs.twimg.com/profile_images/1043824764161335296/2SW3duCV_400x400.jpg",ref_id:"e1996e82-0354-421c-85d5-f18eebec9506",twitter_handle:"philippsandner"},{name:"Jesse Peltan",profile_picture:"https://pbs.twimg.com/profile_images/1123954968636088326/EAjHUGDE_400x400.png",ref_id:"96309505-caeb-47bb-a1ba-712b97292675",twitter_handle:"JessePeltan"},{name:"Christopher Bendikson",profile_picture:"",ref_id:"d72ead54-7bff-4874-870f-123e665fddfd",twitter_handle:""},{name:"Christian Stoll",profile_picture:"https://pbs.twimg.com/profile_images/3296579573/69ebedb479a9bdb9d536fe887e2d3113_400x400.jpeg",ref_id:"ff74d59c-f846-4b16-a5e5-771fb8139f18",twitter_handle:"Granddragon14"}],hosts:[],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/9e7e229f-2631-4542-b5d7-7fcd502798dc.jpg",keyword:!0,link:"https://traffic.megaphone.fm/CSN6935967461.mp3?updated=1627959014",node_type:"clip",pub_key:"",ref_id:"8ab125e2-e555-4adc-817a-bbf5bb93bf40",show_title:"Bitcoin Audible",text:"really a fair comparison to say, like bitcoin uses x amount of energy, like electricity versus x whatever small country, when you're only looking at the direct energy consumption in that country and not looking at the fact that they're getting all the resources from other countries that are consuming that elsewhere. Not only that, but you can flip that entire narrative on its head and say when bitcoin uses more electricity than Chile, that means that even if Chile flipped their entire electricity infrastructure to try to mess with the bitcoin blockchain, they couldn't. Energy consumption is a good thing, it's just a matter of how it's consumed and how we produce that. Let me add one more thing. Everybody knows the market cap off gold, right? That's around 9 trillion. And that's 50 times more than bitcoin. And we know it from bitcoin. That like by theory, if the bitcoin price is, say, 9000, by theory the production cost of bondoid bitcoin should also be 9000. It's not the case, I know, but by theory it should be the case. So now take gold. Honestly, nobody discusses gold. If gold, if the market is having a market cap of 9 trillion and times 50 times more than bitcoin, then in case gold is produced, then what? If by theory the production price of gold that's the market cap of today, 50 times more resources are being spent second by second, day by day to somehow get gold out of the ground. But this is not electricity, that's equipment and machinery and that's kind of, I don't know, all kinds of things which are working in some kind of gold mine. But isn't this also wasted resources to some degree? Nobody discusses this and it's 50 times higher at this point. I remember a paper from cruises to my loan that are exactly comparing metal mining with crypto mining. Oh, interesting. Okay, so it wasn't nature sustainability in 2018. It's just so much more dangerous to the environment like the cyanide that is used to extract the gold. And then if you just go through all of the environmental damage that gold mining does, bitcoin is like a space compared to what goes on in order to get sold out of the ground. And it was funny when gaming was brought up, I was speaking a conference, I think it was decentralized in Athens Green back in November. And there were a lot of people there that into cookie and other nonsense. And I got into this big argument with someone that kept saying how bitcoin is so bad for the environment and mining can continue to happen and how proof of stake of currency is the future. And he was a lot younger than me. And I asked him, do you play video games? I haven't played video games since I was about 21, 22. And I asked him do you play video games? And he said yes. And I said, well, how much electricity are you wasting by playing video games? Where is the productivity in that? So if you take all the gaming in the world, everyone that ever plays video games, you combine all that, how much electricity that is using and please make an argument that is more productive use of electricity than bitcoin that is trying to give everyone politically neutral, government free money. This is why this entire line of discussion is kind of like a bit of a red herring. Because the problem is that we don't have a good way to price externality and if we did, then the price mechanism would take care of the rep. I think it's partially done and I agree. I think a lot of it is a red herring and kind of missing the major point, which is the real environmental ",timestamp:"00:25:05-00:29:09",topics:["bitcoin energy consumption"],type:"podcast",weight:5.094594955444336},{boost:0,date:1665118800,description:"The Macro tyranny ",episode_title:"Breaking Away: On Secession and Small States",guests:[],hosts:[],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/6ec51741-3d93-4116-a619-d62a7cee1feb.jpg",keyword:!0,link:"https://dts.podtrac.com/redirect.mp3/cdn.mises.org/102-radiorothbard-20221007.mp3",node_type:"clip",pub_key:"",ref_id:"8d9636c6-d564-47e0-89b6-5b9f87b27a34",show_title:"Radio Rothbard",text:"damage to the same extent that macro tyranny maximizes it. If Hitler had ruled only Berlin and Stalin only Moscow, the history of the world may have been considerably less bloody. Large states are playgrounds for despots and dictators, while small states provide far fewer opportunities for ambitious politicians to spread their mayhem beyond their local communities. But we don't have to take lose word for it. The highly influential political scientist Hannah Arrest has discussed how only larger states can hope to be truly totalitarian. Even she notes that a number of states in Europe in the 1930s had pushed totalitarian ideas and as their ideal, but outside the Soviet Union, none managed to actually achieve the goal. And here's a long quote, but it helps us, so we'll quote it at length although totalitarian ideology had served well enough to organize the masses until the movement seized power, the absolute size of the country then forced the wouldbe totalitarian rulers of masses into the more familiar patterns of class or party dictatorship. The truth is that these countries simply did not control enough human material to allow for total domination and its inherent great losses in population. Without much hope for the conquest of more heavily populated territories, the tyrants in these small countries were forced into a certain old fashioned moderation, lest they lose whatever people they had to rule. This is also why Nazism, up to the outbreak of the war and its expansion over Europe, lags so far behind its Russian counterparts in consistency and ruthlessness. Even the German people were not numerous enough to allow for the full development of this newest form of government that is totalitarianism. Only if Germany had won the war would she have known a fully developed totalitarian rulership. So rents a Holocaust survivor, hardly a defender of the Nazis, but even she concluded that yeah, they wanted to be totalitarians, but not even Germany was big enough to bring that about. So they're smaller is better in this case, especially when it comes to the worst case scenarios as well. But what about that middle ground, right? We're not necessarily just always talking about avoiding full blown totalitarianism, but we do find some of these previous examples. You want more free trade, you want more freedom, you want the ability to escape despotism smaller states are generally your answer. Now, as a final issue though, we have to cover, as the book does, the issue of international relations and war, because we see these advantages all for the domestic population, right? But anytime you bring up this topic, you're going to hear that breaking up states into smaller pieces, this is bad, because if we reduce the power of the US government or any other western states, then China will step in and conquer the entire planet the next day. So this is a difficult topic and so I try to provide as much of a treatment as I can in the book. Certainly it's not exhaustive and we do need more people really exploring these issues. And with all international relations it requires a certain amount of speculation. But some good research has been done looking at the issue of how do small states fare against these larger states. And so there are a few things we can note when talking about this. For example, the assumption that large states will always dominate in international relations is based on mistaken notion that larger states in terms of GDP access and access to military resources currently are necessarily the more powerful states. More accurately, however, it is wealthier states and blocks of states, not necessarily the larger states, that tend to have an advantage in terms of military deterrence and innovative research by China expert Michael Beckley, for example, he notes that the biggest variable here is actually GDP per capita, not overall GDP. And this helps explain why we can find many cases of smaller states successfully deterring and defeating larger ones. During the 19th and early 20th centuries, for example, both Japan and the United Kingdom repeatedly defeated and humiliated the much larger China. At the time, a reliance on GDP and military manufacturing statistics would also suggested the Soviet Union three times the geographic size of the US. And with an immense weapons industry, should have outlasted the United States. The GDP measure also suggests that Israel is the weakest military power in the Middle East. Clearly, none of these things were true are true. These really case is instructive because it shows us that small states, rather than having to become big themselves, can simply freeride off larger states as the State of Israel has managed to long exploit American wealth and taxpayer revenues without actually giving up its own independence. Moreover, the possibility of nuclear deterrence diminishes the need for immense and expensive conventional forces, as again demonstrated by the State of Israel. Deterrent defense capability can thus be obtained even by Switzerland sized states. And then of course, there's no reason why a group of small wealthy states cannot very effectively form an alliance of their own among themselves without having internal control mechanisms, as has been done throughout history. You don't necessarily have to have small states form a state of their own in order to carry out effective defense measures. So for example, for the United States to break up into smaller pieces and there's no reason to assume the new, smaller, successful states would be at the mercy of larger ones, there is every reason to assume the new smaller American states would be just as unified on foreign policy as they are now, which is to say, virtually in lockstep. Unfortunately, no matter what might be said about small states and international relations, many will cling to the idea that because of alleged foreign threats, virtually nothing, nothing could justify secession ever. There is, of course, nothing new about this attitude. For centuries states have justified their bigness and their taxes on the claims that you need us to defend us against foreigners. And of course in the United States we've seen this in many cases where you're just supposed to accept whatever the government wants to do in the name of national defense. And this was, I mean, the conservative movement standard bearer back in the 50s. William Buckley said this in the early 50s we have to accept big government for the duration, for neither an offensive nor a defensive war can be waged given our current government skills, except through the instrument of a totalitarian bureaucracy within our shores. We must accept large armies and air force's, atomic energy, central intelligence, war production boards and the attendance centralization of power in Washington. So yes, freedom is all right, but I mean, come on, you're just going to have to have the CIA and you're just going to have to surrender those freedoms until we defeat all the bad guys in the whole world. If that takes 300 years, thens the breaks. So the real world experience suggests that fortune actually favors the decentralized in terms of wealth, freedom, economic development and more. And is for these reasons that Rothbard supported what he called universal rights. Locally enforced as an adherent of national rights, Rothbard believed rights are certainly universal, yet he also understood that their enforcement ",timestamp:"00:23:17-00:30:41",topics:["Macro Tyranny"],type:"podcast",weight:5.224080560699853},{boost:0,date:1656979200,description:"How Lightning can improve the feedback process on music platforms",episode_title:"Lightning Networks Impact on Music w/ Michael Rhee, Founder of Wavlake - Voltage Twitter Spaces",guests:[{name:"Michael Rhee",profile_picture:"https://pbs.twimg.com/profile_images/1348612450/IMG_0298_400x400.JPG",ref_id:"91302fb9-2d08-400e-bd1f-2d52e0af5508",twitter_handle:"rheedio"},{name:"@rheedio",profile_picture:"https://pbs.twimg.com/profile_images/1348612450/IMG_0298_400x400.JPG",ref_id:"a20f5e1f-5969-47a6-b986-faf29c0c4da0",twitter_handle:"rheedio"}],hosts:[{name:"@voltage_cloud",profile_picture:"https://pbs.twimg.com/profile_images/1508657900486422529/Lfa70poj_400x400.png",ref_id:"3b622187-60ce-43c2-a21f-ae749c2d961a",twitter_handle:"voltage_cloud"},{name:"Bobby Shell",profile_picture:"https://pbs.twimg.com/profile_images/1090426395979890690/uUdaFXo__400x400.jpg",ref_id:"438f8067-3fed-49d2-91d9-5018cb043aac",twitter_handle:"BobbyShell2"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/2ec62250-4755-4616-8342-096a2cfab95f.jpg",keyword:!0,link:"https://www.youtube.com/watch?v=aZt44KjXHh0",node_type:"clip",pub_key:"",ref_id:"3db5f375-817e-4275-980c-6475803c430b",show_title:"Voltage",text:"this, we chatted a little bit about two things I had brought up to you about how independent artists, whenever I launched my first song on Spotify, I had to go through CD Baby or one of these groups that helped push your music to these platforms. And the thing that was discouraging was it said, hey, when you hit $25, you can claim your first cash out. And I was just like, that's going to take forever with how many plays you need to get. So that got me excited. And you actually brought up an even more important point, was this feedback loop that it creates for young artists because you can be motivated and see these amounts and stats come in that are much lower denominated. And that's actually a pretty impactful thing for a young entrepreneur. Let's dig into that a little bit and just what that can actually do for creatives. Yeah. So, Bobby, just using yourself as an example, you publish your music, it went up on Spotify and maybe a dozen other streaming platforms. How long did it take for you to figure out how many listens or streams or dollars you earned from those platforms? Like from the time of track was played to the time you got some sort of feedback about that? Do you know what the lag was like? So it was actually pretty challenging to hear and kind of find out because there was obviously on Spotify you can see the plays you have, but like in some of these other platforms, it was actually pretty hard to see that data, like being a new artist. Yeah. Because it's all opaque. And I think this is one of the interesting things or interesting aspects and features of the value for value model that podcast and 20 is built on. And then also experiments like Wavelake where you have users who are tipping SATS to artists for their tracks. And I think one of the, I guess, challenges as a new artist, when you're deploying your music and distributing it via some music distributor and blanketing all these different streaming platforms with your music, you're essentially throwing your music into a black box. It's virtually a black box, and you might get some sense of the kind of traction you're getting on the platforms over the course of a few months. So there could be a lag time of two to three months where the streaming platform has gathered some sort of statistics on how many plays you've gotten, and then that translates into some kind of a royalty payment that is obviously calculated from some kind of internal algorithm, and then it's spit back to the artist in the form of some number. Let's say it's $30 for a bunch of plays that happened three months ago. So there's a pretty long lag time between when someone was engaging with your music versus when you find out about it and see some kind of a reward for that work that you put in. And what's been really cool to see is with some of the artists on Wave Lake, they're receiving these like, small tips. It's nothing to write home about, but at the same time, as you said, if you're a newer artist and you're just working on honing your craft and finding your voice, those small monetary donations, those little tips operate as a really strong encouragement mechanism. And it's also an instantaneous feedback loop. So you could post a song on Wavelake, for example, and that day, like that hour, someone could hear it, love it, tip you, and you'll see that show up in your wallet, you'll see that 21 stats or whatever the user wants to tip you, you'll see it show up in your wallet near almost immediately. And so I think that can act as a really strong feedback mechanism for someone who especially if I speak about myself a little bit like making music. As a teenager in my bedroom, I was just recording kind of lame demos on a fortrack just over and over. And then years later, MySpace came along and you put those up and see how many plays you get. And I think we're at a point now where we have this really novel monetary network that's open and it's completely borderless and anyone can use it. And then on the other hand, you have the ability to pay and support artists that you love. And as a creator, you can not only benefit from that monetarily, but that can be a lot of encouragement that a particular song or some sort of direction you're going in artistically is resonating with someone out there in the world or a group of people in the world. And that kind of motivation means a lot, I think, when you're just starting out and you're finding your voice. And you could have other ways of using this kind of feedback loop as well. For example, if you have a demo or a couple of lines of a verse or a melody, and you want to share that with a group of fans or potential listeners, and you can say, like, hey, if you like this, what do you think of this? And then people start tipping because they want to see more of that, or they want you to flesh that out into a complete song. I mean, the possibilities kind of again, they go as far as we can imagine at this point. And I think that is a much different model. It's a very different model from what exists today in these very sort of monolithic corporate streaming platforms, where you're essentially like, you're forced to throw your work into this giant pool, and you're out there competing with heavily marketed acts and figuring out how you can show up in the midst of all that is pretty difficult. And even when you do get some engagement, you won't find out about it for months. And so I think there's a lot of potential not only to create a better royalty mechanic for artists, but it's also a way to encourage art. Yeah, absolutely. So the feedback loop portion, one thing about that that I love is, like we discussed before, is imagine you're a young artist and you put music online and you just see like, five SATS come in, ten stats. Of course, you could obviously see a million SATS come in, but that's fairly uncommon. But to have these kind of small affirmations towards the art you're doing or the content you're creating, or just these positive reinforcements, one of the biggest things I know for anyone pursuing anything psychologically in the world, like when we talk about just the psychology of it, is it's hard to get affirmation. We're a digital world. There's a lot of working from home. And one thing I love about lightning is there's this positive and encouraging reinforcement where we can reward each other in minimal ways, but whenever you see that come through, it kind of helps you push through. And I have a friend who struggles with being creative due to not having kind of the reinforcement he needs. And he's one of the most talented people I know. And I just really wish that was there. And I could see that being really transformative. We've heard safety and talk about fiat art and things that are not fiat art, et cetera, and to see true talent be rewarded and have this really kind of grassroots incentive mechanism I think is really important. And it does kind of segue into what I was talking to you about before. As far as content creators just being on the web, people have the opportunity to do anything they want and even leverage music in different ways. And there's obviously a lot of opportunity for people who are musicians to create reach. But there's even ways that people who create content, they could even leverage these creative, independent songs in really unique ways to, you know, further their art. So it's ",timestamp:"00:05:55-00:15:37",topics:["Lightning Network"],type:"youtube",weight:5.061400574481365},{boost:0,date:1624507200,description:"Intro",episode_title:"Bitcoin Fixes This 48 Small Business with Ali",guests:[{name:"Ali",profile_picture:"",ref_id:"1169edf2-a89f-4d89-94a4-1be1a7b9aef0",twitter_handle:""}],hosts:[],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/2536a974-d668-4ac2-8613-0b37aa0ca08c.jpg",keyword:!0,link:"https://anchor.fm/s/2a4e8034/podcast/play/36003846/https%3A%2F%2Fd3ctxlq1ktw2nl.cloudfront.net%2Fstaging%2F2021-5-23%2F969a4306-e9eb-95c5-0e15-42d37c0e61e8.mp3",node_type:"clip",pub_key:"",ref_id:"01dc5a33-88e1-49ef-abb3-c5744cf8a046",show_title:"Bitcoin Fixes This",text:"Welcome to Bitcoin Fixes this, where we explore the impact that Bitcoin will have in all aspects of society. Today's guest is Ali, owner of Tahini's Restaurants and Bitcoin Enthusiast. He is a small business owner who's been through a lot of different ups and downs in the business. In this episode, he talks about what it takes to make it in the world of small business, why he decided to put the Treasuries of his company into Bitcoin, and why Fiat money is so destructive. To say Ali is a Bitcoin enthusiast would be an understatement. He's been cheerleading Bitcoin and explaining how Bitcoin is great for small businesses since his discovery of it more than a year ago. I loved learning about the hustle, the unfair advantages of the large government subsidized companies, and why companies like his have a fighting chance with Bitcoin. This is the future of businesses built using Bitcoin savings technology. I hope you learned something. Ali Tahini, how's everything going, man? Good. Jimmy. How are you? It's an honor to finally be at your show. I'm a big fan. I've been looking for a while now. Oh, well, that's awesome. Yeah. It's always interesting to get, like, different perspectives and stuff. And you certainly have an interesting perspective because they're running a small business for a while. And obviously you have decided to put some ",timestamp:"00:00:00-00:01:25",topics:[],type:"podcast",weight:5.0513938665398985},{boost:0,date:1658322407,description:"Many causes of diarrhea such as fat malabsorption and bile acid malabsorption (1/3 of IBS diarrhea cases)",episode_title:"Dr. Norm Robillard - SIBO, Digestion, and Gut Health on Carnivore/Keto",guests:[],hosts:[],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/5e0220b3-7c70-4423-bb76-3b75bc132fad.jpg",keyword:!0,link:"https://traffic.libsyn.com/secure/carnivorecast/Carnivore_Cast_207_Dr_Norm_Robillard.mp3?dest-id=775699",node_type:"clip",pub_key:"",ref_id:"167a7be2-f14b-455a-9c20-95057af5ea7d",show_title:"Carnivore Cast",text:"was interesting on a carnivore diet, it kind of flipped that around. And then also when I work with people that have diarrhea or constipation, we look at it mechanistically. So with diarrhea, it can be fat malabsorption, it can be bile acid malabsorption. Right. Most of 95% or more of the bile that improves that helps solubilize the fat so the lightbased can digest them. It's reabsorbed in the terminal small intestine before it hits the lodge ball, goes back to the liver, saves a lot of energy because cholesterol is an expensive molecule and that's kind of what bile is made up. So if more than just a couple of percent of the bio is malabsorbed, it leads to diarrhea. And it's believed that about a third of the IBS diarrhea cases of BIOACID malabsorption. ",timestamp:"00:21:47-00:22:41",topics:["bile acid reabsorption","diarrhea","small intestine","liver","cholesterol","fat malabsorption","bile"],type:"podcast",weight:5.039563265710219},{boost:0,date:1672772445,description:"Bitcoin miners and retail customers",episode_title:"TOXIC HAPPY HOUR! #Bitcoin, Foss, Max Keiser & the Plebs! 🍻😂",guests:[{name:"Greg Foss",profile_picture:"https://pbs.twimg.com/profile_images/1552599670945464320/3OgqRHNo_400x400.jpg",ref_id:"853d9f80-f6cf-490f-9d1e-f29cdc6acc6f",twitter_handle:"FossGregfoss"},{name:"Jeff Ross",profile_picture:"https://pbs.twimg.com/profile_images/1475554600094552064/DSlPG1lx_400x400.jpg",ref_id:"ae6ee2a2-1cf7-41a0-8366-ff6e94a6403c",twitter_handle:"VailshireCap"},{name:"Craig Shipp",profile_picture:"https://pbs.twimg.com/profile_images/1605961563420114945/MWGqR1Gm_400x400.jpg",ref_id:"8d6ca47a-89a2-4331-bae4-2fae18055a95",twitter_handle:"CraigShipp"},{name:"Oluwasegun Kosemani",profile_picture:"https://pbs.twimg.com/profile_images/1538403135101800450/sO-RPI9U_400x400.jpg",ref_id:"25ce4b90-6689-4dd9-84b6-240c7bcbe407",twitter_handle:"MrlamilamiKosch"},{name:"Max Keiser",profile_picture:"https://pbs.twimg.com/profile_images/1361873587582472195/y57DiTYX_400x400.jpg",ref_id:"743efd07-d194-4c74-8663-45c3b8646b8e",twitter_handle:"Maxkeiser"},{name:"Isabel Foxen Duke",profile_picture:"https://pbs.twimg.com/profile_images/1466874333410717698/WRQh2-_m_400x400.jpg",ref_id:"58989d4a-4a96-4ffc-8cbe-f233ffb10420",twitter_handle:"isabelfoxenduke"}],hosts:[{name:"Publord",profile_picture:"https://pbs.twimg.com/profile_images/1480160632360124416/AM_vVRko_400x400.jpg",ref_id:"5b7b7e22-fe55-4e1c-933d-6544f6600351",twitter_handle:"publordhodl"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/0c42d408-e518-4ecf-b282-d864a8c14002.jpg",keyword:!0,link:"https://stakwork-uploads.s3.amazonaws.com/uploads/customers/2707/media_to_local/7de8e4aa-50a6-4f57-a8ff-6ca16a4f0ae4/76c3395a-4fe5-4802-8d2a-92cca1f1ea0b.mp3",node_type:"clip",pub_key:"02574d6e8e787372184b6f17c40d6c6fe1777db9015801f95dfd24692784d767cd",ref_id:"7eea8bdf-2873-4759-b53b-a207aa8bcdcf",show_title:"PUBLORD",text:"So circling back real quick to the movie Generational Wealth, I think Tomer put it together. I think he had a partner in it. That's a fantastic movie on YouTube. And my take on the question that Jim asked about the utility company using all the power to mine bitcoin and not giving it to retail customers. Retail customers are always going to be willing to pay more than what a miner would pay for electricity. Because the miners are so distributed around the world, it's so competitive, they have to get really cheap electricity or use stranded electricity, right, that they have no customers for. So I think it would always be a situation where retail customers would come first in the pecking order. The utility company would much rather sell to them at a higher price than using that energy for mining. I would say assuming wait a minute, wouldn't you have to account for, let's say, governments preventing utility companies from raising the rate so high to make it profitable, to sell it to the retail customers over the mining? Because if they are the only ones that know their profitability for the use of that electricity in either direction, and they are the ones making the electricity, so they have the purest cost, the cost of getting it out of the ground and processing it, and then it's free to send any direction. But if they control one of the directions and it makes them profits, I feel like there's a potential economic conflict in there that could be created if you have enough other situation, enough other characteristics. Like a type of power company that has a monopoly kind of situation where it's the only company in a region and nobody else can't go anywhere else. Utility companies are regulated by governments already. I'm not a fan of government at any level, but I am a fan of people creating rules and holding other people accountable to them so that you can get along in a society. So I would hope that a utility company is going to do the right thing is the best way I could say it. Making sure that, look, they were built to make money selling to customers and they figured out a way for most people to be satisfied at that level. Now they find a revenue stream that comes into existence that wasn't there when these things were invented, these grids and the idea of giving, producing electricity for people, all of a sudden there's something that changes the game and it literally changes incentives, it feels like. And I just worry that it could. Turn into something they lose money doing that. Only if they can sell the electricity to retail more for more than what they can use it for for bitcoin mining if they had rate. Yes. I don't know that you can make that statement without knowing, without using an example of a potential price for bitcoin, which maybe we're not at it now because the value of bitcoin is too low. But if the value of bitcoin was ten times what it is now, it's way more profitable for everybody to mine bitcoin, even at a very small amount of hash rate. And so there could be a tipping point. Am I thinking correctly on this or not? Yes and no. Okay, thank you. The grid is designed for peak power, okay? It's designed for the 06:00 p.m. When everyone gets home from work, draw on the grid. And the reality is, most of the time the grid is not using or there's more supply than there is demand. So that's when you need the offtakers, which could be bitcoin miners, that will benefit from now from a source of energy that is not set by a regulator. Don't forget, the regulator sets the cost of electricity based on things like peak power demand, as well as global adjustments on their stupid wind farms and solar projects that are heretofore unprofitable. But you got to put the ESG narrative on it. So the reality of in Ontario is because seventeen cents of that is absolute government waste. That is waste that goes to producing wind farms and solar farms that have no economic benefit to the grid whatsoever, but because of their ESG narrative. So the reality is five cent kilowatt hour power, 22 cent kilowatt hour retail prices, that's all set by the regulator at the wrong price because of all their waste in their projects. The beautiful thing about bitcoin is that it takes demand from the grid when the solar panels are producing electricity, but there's no one there to take it. Right? That's the stupid thing about solar panels. The sun doesn't shine at 06:00 p.m. At night, and the wind generally doesn't blow at 06:00 p.m. At night. So these are the demands for bitcoin that will allow the regulated utilities to actually capitalize on the capital expenditures in their wasted products or projects, rather solar and wind. The most efficient power is nuclear, but the reality is building a nuclear power plant requires basically a 20 to 30 year payoff period because it is so capital intensive at the outset. Well, bitcoin mining will shorten the ROI on a nuclear reactor materially because it creates an additional revenue stream that otherwise wasn't there calculated in the cash flows. So lots of good things, jim, you're right. But the reality is the regulator sets the marginal price of power based on peak demand in the system, and that peak demand is so far in excess of what global bitcoin miners can mine at that I don't see a time when a utility would only be bitcoin mining. That just doesn't make sense to me. However, never say never. It's not a zero chance probability. It's just unlikely, in my opinion. ",timestamp:"00:47:21-00:53:52",topics:["mining energy","bitcoin miners"],type:"twitter_space",weight:17.809161091592113},{boost:0,date:1672772445,description:"Michael Saylor and integration of Microstrategy with the Lightning Network",episode_title:"TOXIC HAPPY HOUR! #Bitcoin, Foss, Max Keiser & the Plebs! 🍻😂",guests:[{name:"Greg Foss",profile_picture:"https://pbs.twimg.com/profile_images/1552599670945464320/3OgqRHNo_400x400.jpg",ref_id:"853d9f80-f6cf-490f-9d1e-f29cdc6acc6f",twitter_handle:"FossGregfoss"},{name:"Jeff Ross",profile_picture:"https://pbs.twimg.com/profile_images/1475554600094552064/DSlPG1lx_400x400.jpg",ref_id:"ae6ee2a2-1cf7-41a0-8366-ff6e94a6403c",twitter_handle:"VailshireCap"},{name:"Craig Shipp",profile_picture:"https://pbs.twimg.com/profile_images/1605961563420114945/MWGqR1Gm_400x400.jpg",ref_id:"8d6ca47a-89a2-4331-bae4-2fae18055a95",twitter_handle:"CraigShipp"},{name:"Oluwasegun Kosemani",profile_picture:"https://pbs.twimg.com/profile_images/1538403135101800450/sO-RPI9U_400x400.jpg",ref_id:"25ce4b90-6689-4dd9-84b6-240c7bcbe407",twitter_handle:"MrlamilamiKosch"},{name:"Max Keiser",profile_picture:"https://pbs.twimg.com/profile_images/1361873587582472195/y57DiTYX_400x400.jpg",ref_id:"743efd07-d194-4c74-8663-45c3b8646b8e",twitter_handle:"Maxkeiser"},{name:"Isabel Foxen Duke",profile_picture:"https://pbs.twimg.com/profile_images/1466874333410717698/WRQh2-_m_400x400.jpg",ref_id:"58989d4a-4a96-4ffc-8cbe-f233ffb10420",twitter_handle:"isabelfoxenduke"}],hosts:[{name:"Publord",profile_picture:"https://pbs.twimg.com/profile_images/1480160632360124416/AM_vVRko_400x400.jpg",ref_id:"5b7b7e22-fe55-4e1c-933d-6544f6600351",twitter_handle:"publordhodl"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/0c42d408-e518-4ecf-b282-d864a8c14002.jpg",keyword:!0,link:"https://stakwork-uploads.s3.amazonaws.com/uploads/customers/2707/media_to_local/7de8e4aa-50a6-4f57-a8ff-6ca16a4f0ae4/76c3395a-4fe5-4802-8d2a-92cca1f1ea0b.mp3",node_type:"clip",pub_key:"02574d6e8e787372184b6f17c40d6c6fe1777db9015801f95dfd24692784d767cd",ref_id:"4f0b1fbc-47f6-49c7-afe1-4978eabe5c4a",show_title:"PUBLORD",text:"Dude, it always helps when you explain things. I appreciate it. I will be paying attention. Keep my eye on it. But I take the simple route. Just accumulate as many SATS as I can and let the rest of the world fall apart around me. Can anyone up on the stage comment on Michael Sailor's comments about what he's going to be doing with Lightning with his team at MicroStrategy? Does anybody have any insight? Can I comment? Craig and I know I talk too much. He needs to buy IBEX mercado. And I told Mr. Sailor that at dinner in La. At the Pacific Bitcoin Conference. Now, Michael is not going to ever take advice from Foss. Well, maybe he will, but at the end of the day and Max Kaiser maybe can chime in on this, I was really excited to hear what Sailors shared those comments with us privately. So now that it's public yeah, he's trying to incorporate the Lightning protocol into his business. He's a very smart guy when it comes to that stuff. So I'm pretty excited. And I say tongue in cheek, he should just go out and buy IBEX Mercado. It's a company that had their origins in El Salvador and Guatemala that I'm pretty tight with. I say that because IBEX Mercado has some of the top Lightning engineers in the world. And Mr. Sailor was saying that it's very tough, and it is true, it's very tough to find Lightning engineers. So I think it's going to be great for what he does, because it's going to just further the development of the Lightning Network. And I actually think I hate to say this, but there would be a role for MicroStrategy stock within the portfolio of the Bitcoin Opportunities Fund. Why is that? Well, because for the first time in a while, it's looking awfully cheap to me compared to outright Bitcoin exposure, too. So Sailor is a very smart guy. In fact, he's too smart by a half sometimes. But I really hope he does continue this, because with him and Jack Dorsey pitching the Lightning Network, these are two brilliant people that have some big following and some big brains. So I'm not sure what Max thinks, but there's my two cent. Thanks. Right. Well, I guess the speculation was which way would MicroStrategy go to expand their bitcoin presence. I guess one idea was they would get more into mining, and then the other one was lightning networks. And Sailor has explained why he's not really interested in getting into the mining side of things. He's given a couple of times. He's explained that he just doesn't like the economics of mining. Plus, I think that he sees lightning as a gateway to massive global adoption, which would have the effect of increasing the bitcoin price, which he has a lot of bitcoin. So anything that's going to help that boost that price up, he's going to be interested in, for sure. So with Lightning, you've got that ability to really reach the billions of people that he likes to talk about that can be part of this unconfiscatable distributed wealth network of property. So I can see it makes sense. IBEX mercado is yeah, it's a company down here. It's an excellent company. He should definitely look at it and at the very minimum, he should take a position. I know we just invested in the company. We took a small position in their latest round for easy capital. And so it's looking good. Hey, that's awesome, Max, because I'm also an investor. I'm not sure if you knew that I was one of the seed investors in iVEX Mercado. So I love Jose. I love his team. A bunch of real smart South American or Central American programmers doing a great thing, doing merchant adoption. So onboarding the city of Miami. So there's obviously, you know, if you're onboarding the city of Miami and that's where Sailor lives, it's sort of cool. And then, to be clear, I hate bitcoin mining as a standalone business as well. The future for bitcoin mining is going to be the energy companies that own their own assets that mine bitcoin to balance the grid. So that is the key for Mr. Sailor. Don't get involved in a bitcoin mining company that does not own its own energy assets in the future. It'll be the Duke energy of the world. It will be the Tepcos, that's the big Japanese utility that's starting to mine bitcoin itself in order to load balance its grid. So there will be a time to own bitcoin miners, but it won't be a bitcoin miner that doesn't own its own energy source. It will be a bitcoin miner that is perhaps part utility and part bitcoin miner. That's balancing of grid for the benefit of all its contributors, which include users. It includes the different sources of electricity, whether it would be natural gas, wind, solar, nuclear, you know, all the mixing pot. And balancing the grid is a very difficult thing. So when you have a bitcoin miner that can power up and down with the flick of a switch, that's the type of bitcoin mining that makes sense, not the type that. Buys its electricity from ERCOT and then becomes hostage to the PPA, the Power Producer Agreement with ERCOT. They can be interrupted at any time. So the world is changing. Sailor is a smart dude. I think there's going to be a lot of really cool opportunities in the Bitcoin mining square, and that'll be with companies again, that are not your run of the mill Bitcoin miners, but have names like Exxon and Duke. Energy and TEPCO and all of these big utilities that are going to learn that bitcoin actually is a super useful tool to help them increase revenues and also balance their grid or balance their load base. So, yeah, some really cool stuff happening. Sailor is a genius. I'm not. So let's just see where life goes. ",timestamp:"00:27:47-00:34:12",topics:["Michael Saylor","Microstrategy","","Lightning Network","bitcoin miners"],type:"twitter_space",weight:17.809161086484142},{boost:0,date:1673549347,description:"Some common ways people lose bitcoin",episode_title:"BR019 - Proof of Keys Day Twitter Space ft. Lopp, Craig Raw, Lazy Ninja, mshodl, Rijndael & guests",guests:[],hosts:[{name:" Jameson Lopp",profile_picture:"https://pbs.twimg.com/profile_images/1594137153625276416/t1RUP3yP_400x400.jpg",ref_id:"062ec6c8-0fa2-4bf6-9aa1-7ab347df2530",twitter_handle:"lopp"},{name:" Craig Raw",profile_picture:"https://pbs.twimg.com/profile_images/1362841242665631745/UtA3FBQU_400x400.jpg",ref_id:"f2d1f5f0-2e1c-4d16-937d-4d48627cb955",twitter_handle:"craigraw"},{name:" Lazy Ninja and Rijndael",profile_picture:"https://pbs.twimg.com/profile_images/1362843002318721028/PNKWuu0-_400x400.jpg",ref_id:"23edbd50-9b0b-4e9a-aa56-57c2af074173",twitter_handle:"FreedomIsntSafe"},{name:"Justine Harper",profile_picture:"https://pbs.twimg.com/profile_images/1559710083734540289/HXTH4kqO_400x400.jpg",ref_id:"7b5a8957-1c4b-474f-bc38-291b382a13e6",twitter_handle:"mshodl"},{name:" Dee",profile_picture:"https://pbs.twimg.com/profile_images/1600155411868434433/9k1KQ8i5_400x400.jpg",ref_id:"ad33288b-28d4-4f15-9492-f64bce891613",twitter_handle:"HodlDee"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/f1879df9-9bc6-4a76-951f-24548da768ef.jpg",keyword:!0,link:"https://anchor.fm/s/9500fad8/podcast/play/63399670/https%253A%252F%252Fd3ctxlq1ktw2nl.cloudfront.net%252Fstaging%252F2023-0-12%252F0a789f60-2c9a-6bbb-945a-79f3dd937cee.mp3",node_type:"clip",pub_key:"032d7609ff3f4a5232e4d60967971e23bc671dfb68020845a59bab5dc1f3b93b87",ref_id:"1958362b-b149-4466-b873-4d22a36d67d8",show_title:"Bitcoin.Review Podcast with NVK & Guests",text:"In terms of people losing their funds. Why don't we kick off with maybe talking about what are the most common ways people lose bitcoin? I'll start with one example, and maybe we go around the panel sort of like going through it. But one of the most common examples I see is people bamboozling themselves. People will screw themselves or their coins before they ever get hacked. So people will go out there, they'll hear an example from somebody that's either extremely smart or extremely dumb and sounds extremely smart, and they would have like, a super complicated setup, and you require many computers, and they would do a super complex multisig, and then the person can get the money out. A very good example of this in the way back in the day was bitcoin armory. There's probably a lot of people on this call that have lost money in bitcoin armory. It was fantastically safe. So safe that many people never managed to get their money out. So what other stories do you guys see as very common ways people lose bitcoin? Yeah, I'll go second here. When I first started, I was forex trading like an idiot, and someone was like, hey, I have a trading platform. Buy some, give me some money, and I'll double your money. The classic. And they were only taking bitcoin. So I was like, you know, what the heck is that? Never heard of it. Well, I've heard of it, but never bought it. How does it work? And they said, oh, you know, go on this exchange, buy some, and then send it over and I'll send you some back. And they were pretty smart. I started off with a small amount and a few hundred dollars and gave them it. And surprisingly, they actually did double my money. And then that convinced me to give them a lot more money, and that's where I felt a culprit of what they did. But I realized at that time that bitcoin was immutable, and there's no way that I could get back my money. And it kind of hit me hard, and I was really frustrated, obviously. But it was a user error, right? It was me being an idiot, being greedy, and wanting more money at the time. So I think people need to take a little bit of responsibility sometimes when they're handling their money. Obviously, I'm still a young guy and had lots to learn, and that sent me down the Bitcoin rabbit hole. And here I am, right, learning how to store my keys. A lot more safe than I did on an exchange. Right. So that's kind of my sob story. But it comes like some real pain to learn. Yeah, absolutely right. I think a lot of people, when they lose money, they get mad and they try and put someone else, blame someone else. But if you really learn about these things and store things properly and understand, then hopefully you don't have anything to worry about. Yeah. Thanks for that, Justine. Hey, I think you guys are on point. I generally think the majority of Bitcoin is lost by user error at unchained. And in personal experience, we deal with a lot of either newcomers to self custody or people have been dealing with single SIG, and this is kind of their first interaction with multisig. And what I found is there's just so much to learn about Bitcoin, right? This is kind of the first time in history that we can truly own our assets and we can truly own our money. And that takes personal responsibility just like anything else. If you want to grow your own food, if you want to protect your home, there are skills that you have to learn. And I think Bitcoin is the same way, but it's new. It's a new thing that people have to do. They're used to being able to just call the bank, right? The bank is going to handle it for you. So I think there's a learning curve. The problem is, in my opinion, that we sort of as a community, I use the word community loosely here as Bitcoin. Twitter, we sort of have this, like, all or nothing mentality, and I don't think we speak enough about like, there's all of these things that you can do, and each individual has to sort of look at their own attack factors and their skill set and what they're capable of, and it's okay to take steps, right? So in my experience, it's over complicating things. It's doing something because they saw on Twitter that was the only way they could do it, right? And maybe it was way beyond their skill set. The worst thing I've ever seen is multiple times past phrases. I have a love hate relationship with passphrases because I've seen people mess them up. Miss one letter, forget that you capitalize something, think that you could memorize it and you don't. And then all of a sudden you've lost access. So user error, over complicating things or making it so complicated that you then don't distribute your keys. So you've got this really over complicated system, but everything sitting in one drawer. So I just think that over complicating things, user error is sort of the biggest threat, even though obviously outside vectors are something that we need to consider as well. But I think that, yes, user error over complication and pass phrases in ways that are maybe too complicated for the user at hand. That seems like there's a trend there. So Lock has this fantastic list of people who have been physically attacked over their bitcoins. James, do you want to give people a little bit of a primer on that list and where they can find it? Yeah, sure. Well, it's linked directly from my main page@lop.net. It's the physical bitcoin attacks GitHub repository and like a lot of other things that we talk about with security in this space, I think it can be easy for people to blow it out of proportion. Now, I think last I checked, I've got nearly 150 different attacks that I've managed to come across and archive over the years. And this is actually a very, very small number. You know, in the grand scheme of things, it's probably one of the rarest forms of loss in the bitcoin space. But there are definitely some patterns and things that we can learn from that, one of which is that the most common event that causes this is people who are doing high value, face to face cash and bitcoin trades. So that like face to face OTC stuff. It's definitely risky because your counterparty may be a criminal and they may assault you and take all of your money. So there are things that we can learn from that. Also, a number of people who have experienced home invasions in this space, it generally happens because they're well known, and usually they're well known because they're being flashy and flaunting their wealth on social media. So you can definitely learn a lot about how important operational security and privacy is when it comes to protecting yourself physically. But kind of getting back to the original question, I think one of the most common forms of loss is when you're not holding your own bitcoin, you're keeping them with a third party. And that opens you up to just a multitude of forms of different loss, whether it's the third party having an insider attack, the third party being hacked, or in many cases, just the security system to access that third party account being compromised, usually through SIM swapping or password leaks or whatever. The best way I can describe it is that when you have your bitcoin with a trusted third party, you're still vulnerable to all of the same risks as you are with self custody, plus a whole lot more because of all of the things that can go wrong with the various third party actors who are controlling access to those keys. Yeah, not your keys, not your coins. Right. I mean, it's that simple. When it comes to third parties, it's so amazing to me that after Gox, I think a lot of the people who are new haven't experienced and maybe was forgotten. It was quite a long time ago now. And before that we had my wallet, which was, I think I can't remember, it was a lot of coin on that one as well. And then we had big Ver with crops. We had FCX in Alameda, which were like the recent high profile ones, celsius, all this stuff. Right. It's very unfortunate what happened to look, because now you have guys like Woody or Susan sort of fighting self custody, saying as if with third parties, you were safer if they offered some form of insurance. I would take their suggestions more face value instead of just being bullshit. But they're not liable for those losses in the way that people think they are. You just become an unsecured creditor and good luck to yourself. So, Rendell, you've been working in Bitcoin quite a bit, and you probably know some interesting ",timestamp:"00:07:44-00:17:21",topics:["Bitcoin Losses","Bitcoin trading"],type:"podcast",weight:22.766568059128208},{boost:0,date:1628150829,description:"The Regulatory on Small Scale",episode_title:" #14: Julia Reinhardt - What do GDPR and AI regulations mean for Silicon Valley?",guests:[],hosts:[],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/3ab6c599-bbcd-4c8f-beef-bcf509ed4afa.jpg",keyword:!0,link:"https://anchor.fm/s/1a9df3e0/podcast/play/38326682/https%253A%252F%252Fd3ctxlq1ktw2nl.cloudfront.net%252Fstaging%252F2021-7-5%252F1c697b61-ec63-9b13-21c8-20beb6d5ca8d.mp3",node_type:"clip",pub_key:"",ref_id:"d67cf7af-79a8-457e-b65b-293fb279dcfe",show_title:"Voices of the Data Economy",text:"early on. Yeah, I just sort of picked up your line that they do it out of marketing because I think this is also something we discussed in a podcast with Safia Noble, the author of Algorithms of Oppression. And I'm not sure if there is a word called like privacy washing, like you have green washing, but probably it has become like a marketing gig to talk about your customer data and how safe it is and having discussions around that. So yeah, just a comment, not a question, but okay, so first we had GDPR and now we have the proposed AI regulations in Europe and we have never really spoken about it in this podcast. I would say that even me or particularly the audience are pretty new to this and you seem to be very deeply involved in this. So if you could take us through what are actually these AI regulations that have been proposed in Europe and what are their challenges, and then probably we can go deeper into it. Yeah, sure. So, yeah, the upcoming AI regulation that has been tabled by the Commission, but is only on the negotiation table now for member States and the European Parliament is actually the core thing I'm working on in my fellowship. And my intention is really to make sure that this upcoming regulation again from Europe does not again cause that lagging behind the small players. Because in the field of AI, as you all know, size clearly matters. The more data you can gather, the better your AI system works. And we're already pretty far down the road to Monetization because players in the market have access to an impressive range of data, and they can also afford gathering high quality data, which then enables them to build better performing AI. And for small scale providers, what's most important is the clarity of the guidance. I mean, that sounds phenomenal. Who wouldn't say that? But if you follow advice, you set up an internal team analyzing those rules for your in house implementation adapted to your AI system, you get much better at estimating necessary additional processes to say why. I work on that. And again, this link to the small scale providers of AI in general, the regulatory draft that the European commissioned, and it was tabled on April 21, so that's not very long ago. And in Brussels, things take time, comedies are formed. But the draft that the European Commission tabled also has been very long time in the making funded line. The Commission president announced something like it already at the beginning of her presidency, and then it came up this year. It's the most ambitious and the most comprehensive attempt at reining in the risks linked to the deployment of AI that we have seen so far across the globe. So it's a bold new step before the big focus of the past years were always just principles. I'm saying just. But I mean, of course you start with principles on an international level. The OECD principles on AI that were adopted in May 2019. OECD. Most European countries and the US are members of the Organization for Economic Cooperation and Development. So they're already promoted uses of AI that are innovative but also trustworthy, that respect human rights and democratic values. And I think now, in 2021, really, we're at the stage of how do you transform these principles into practical rules and regulations. So the rules that the European Commission proposed wouldn't cover all AI systems. They do cover systems that are deemed to pose a significant risk to the safety and fundamental rights of people living in Europe. You know, it's the geographical scope of people living in Europe. So it's a risk based approach. It has several layers, and those layers have different rules for different classes of AI systems. There are some that are prohibited. There are some that are considered high risk and have follow certain rules, and then others where they just say, you have to be more transparent. Do you want me to go more into details of what those rules are? Yes. I mean, broadly, if you could point it out. One, two, three. I don't know if it can be done that way. Absolutely. Sometimes it's confusing because it's really so much risk. You have to know in which category your AI system falls. And that's really on the developers, kind of to understand the categories. And in the end, it's actually pretty clear that not many AI systems actually fall under that rule. So definitely something to understand. So for some users of AI, the Commission proposes an outright ban. That's a use where the Commission says it's an unacceptable threat to citizens. That, for example, an AI system that likely causes physical or psychological harm by manipulating a person's behavior. That's a question of definition. Or by exploiting their vulnerabilities like age or disability. Then also something like social scoring systems where people collect points and also minuses, like those we know in China, and facial recognition in public spaces by law enforcement authorities. So not all facial recognition, but just, you know, those used by police and public spaces, essentially. Although even there, you have exceptions, and I think too many of them. So that's, you know, the systems that the Commission proposals should be banned in Europe. But most of the regulatory draft actually focuses on AI that is considered high risk. And what is high risk is, of course, defined in the regulatory draft. So that's kind of problematic uses in the recruiting field, in the employment admissions context, determining a person's creditworthiness or eligibility for public services and benefits, and also some applications used in law enforcement and security and judiciary. And for those, these systems have to meet different requirements and undergo kind of a conformity assessment. So, of course, before they can be placed in the European market. So in a way, that's kind of FDA, as we call it in the US. Like clinical testing, not for drugs or for vaccines, but for algorithms, it's to make sure that an AI system complies with several requirements around serious risk management. It has to use data sets and training, validation, and testing that are relevant, representative, free of errors, complete. That's a super tall order. Of course, then documentation about a high risk AI system must be really extensive and very precise. Why you chose certain designs, why you designed it in a specific way, and also to show that the developers really check all these factors diligently. The keyword is always human oversight. So high risk AI systems must be designed in a way that allows people to understand the capabilities and the limitations of a system and to counter socalled, automation, bias, and also, if necessary, reverse or override the output. And then, of course, accuracy, robustness, security, and transparency. So this is kind of this clinical testing for algorithm. ",timestamp:"00:20:36-00:29:57",topics:["Small Scale"],type:"podcast",weight:4.966172337540865},{boost:0,date:1627704e3,description:"[[Jurisdictional arbitrage]] moves people when [[prohibitive tax regime]] is implemented",episode_title:"WHY ARE WE BULLISH Natalie Brunell Aaron Segal Lauren Sieckmann Dan Held ep191",guests:[{name:"Dan Held",profile_picture:"https://pbs.twimg.com/profile_images/1522608646043181060/QQRjVYhi_400x400.jpg",ref_id:"3e22facc-9310-4346-82ac-3e183b88fa51",twitter_handle:"Ledger"},{name:"Lauren Sieckmann",profile_picture:"",ref_id:"427bb439-f251-4c7e-89fb-b53ecd8c9a82",twitter_handle:""},{name:"Aaron Segal",profile_picture:"https://pbs.twimg.com/profile_images/884309028125294592/sLDGwzDO_400x400.jpg",ref_id:"f7483c61-ba76-4a19-8d8d-992966e1f79e",twitter_handle:"AaronSegalActor"},{name:"Natalie Brunell",profile_picture:"",ref_id:"a09e8874-abbe-4a85-b19d-08cac1c8afde",twitter_handle:""}],hosts:[],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/419512c2-e309-4b25-bfe2-cd481d53f66d.jpg",keyword:!0,link:"https://anchor.fm/s/11e95d20/podcast/play/38086440/https%3A%2F%2Fd3ctxlq1ktw2nl.cloudfront.net%2Fstaging%2F2021-6-31%2F116ac8f3-ce82-01e5-2865-da5c486c8330.mp3",node_type:"clip",pub_key:"",ref_id:"ea5f251b-6174-4663-b1c8-176375396b6e",show_title:"BTC Sessions",text:"don't know. What are your feelings on kind of this? How bad would it have to get for people to actually think about jurisdictional arbitrage? Oh, you're muted. Probably a prohibitive tax regime if you start to get really prohibitive like 70%, 80% taxes. I think people start to look at moving. I think about it in this function of like you got 100% tax rate of slavery. And so we all exist in the semislavery state of our output is taxed, usually without our permission. And so you either pay that or go to prison. So it's literally sort of a mob feeling there. At what point do people break? I think that's totally subjective for any type of person. Like, a lot of people have already kind of broken and moved to different countries, like renounce their US citizenship or they moved to Puerto Rico. I've moved to Austin from California, which is a small amount of sort of that arbitrage because Texas is a much more open society when it comes to earning money and keeping it. Now I can escape federal. If you want to escape federal, you go to Puerto Rico. If you want to escape all of that, then you go renounce your citizenship. So I made the decision at a certain point that paying California taxes plus federal taxes was too much. I couldn't bear it anymore. And we're seeing a lot of other people make that decision as well. But at what rate will federal start to push people? Ultimately, people vote with their pocketbook. If you make it really cost prohibitive in terms of taxation, I think that's what really moves people. ",timestamp:"00:18:02-00:19:39",topics:["jurisdictional arbitrage","prohibitive tax regime"],type:"podcast",weight:4.962566375739069},{boost:0,date:1642827600,description:"[[Tonga]]'s Interest in Following [[El Salvador]]'s Footsteps",episode_title:"WHY ARE WE BULLISH Mario Gibney Mauricio Di Bartolomeo Josias Carbon Bang Bitcoin",guests:[{name:"Bang Bitcoin ",profile_picture:"",ref_id:"ac7edd0f-886d-449a-ba1a-06033ad12695",twitter_handle:""},{name:"Josias Carbon",profile_picture:"",ref_id:"f3c2c48b-c174-43cc-acfc-2151634b7c77",twitter_handle:""},{name:"Mauricio Di Bartolomeo",profile_picture:"",ref_id:"10c70dfd-93fb-4e95-99d4-2bebf561e737",twitter_handle:""},{name:"Mario Gibney",profile_picture:"",ref_id:"1a3f05f5-5c4a-455f-b4ec-f682080a5518",twitter_handle:""}],hosts:[],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/f29a41a4-6764-439e-9fcf-74fefaffc681.jpg",keyword:!0,link:"https://anchor.fm/s/11e95d20/podcast/play/46497075/https%3A%2F%2Fd3ctxlq1ktw2nl.cloudfront.net%2Fstaging%2F2022-0-22%2F243683259-44100-2-0108d40b0f999.mp3",node_type:"clip",pub_key:"",ref_id:"80462fda-0ec7-4677-bd1b-cd7741154f39",show_title:"BTC Sessions",text:"Look at Tonga, too. Super unfortunate what just happened with the tsunami there. But Lord FA Sitsua has been pushing hard and is looking like they're going to attempt to basically mirror what El Salvador has done. Later this year. They're putting forth more or less the same bill with some slight changes. Again, we got to wait till the fall to see what that actually looks like. But I'll be Frank here, I didn't know of Tonga before this and all of a sudden there's starting to be some recognition before the disaster that just happened. But up alongside El Salvador, you see mentions of this island nation that probably not a lot of people were aware of prior to kind of this human interest piece in and around El Salvador. And so I think we might see more of that over time. Of course, the Volatility lets the Naysayers have their temporary wins here and there. But I mean, it's like Peter Schiff tweets, right? You can always go back in a long enough time frame and highlightership yeah, you can always highlight some amazing Peter Schiff tweets and say, man, if you had just dollar cost average every time this man tweeted about Bitcoin, you would be sitting pretty. And it's very, very true of a lot of this where again, people again, even in the chat, look at what it's done in the past three months. Three months. How short is your time frame? Do you plan for the future at all with that kind of a small window of which you frame things? I would guess not. Bitcoin is boiling the legacy financial system slowly. Just a frog just boiling it slowly. Yeah, absolutely. And that's ",timestamp:"01:05:32-01:07:59",topics:["tonga","el salvador","tonga","tonga"],type:"podcast",weight:4.962566472366181},{boost:0,date:null,description:"Important things every new Bitcoiner should know",episode_title:"Café ₿: #Bitcoin Beginner Q&A",guests:[{name:"Peter",profile_picture:"https://pbs.twimg.com/profile_images/1581695667193643009/EljNY-TH_400x400.jpg",ref_id:"a3384925-e15e-421d-b9f9-6d44e273ed05",twitter_handle:"PeterAnsel9"},{name:"Stephan Livera",profile_picture:"https://pbs.twimg.com/profile_images/1362551718110580740/v-W5Q2uo_400x400.jpg",ref_id:"72f57157-c96e-4466-8bf1-290cfe1f8a0b",twitter_handle:"stephanlivera"},{name:"Thomas J Lake",profile_picture:"https://pbs.twimg.com/profile_images/1529168328534769670/5cl2Y_k-_400x400.jpg",ref_id:"21541a47-0601-447c-99c2-312d1a63c19f",twitter_handle:"thomaslake"},{name:"Goodguy",profile_picture:"https://pbs.twimg.com/profile_images/1363216959576285185/unulY4yd_400x400.jpg",ref_id:"0c3fec75-9cc2-4c0f-8dbe-db7fae2b585b",twitter_handle:"goodguybiker"}],hosts:[{name:"Brady Swenson",profile_picture:"https://pbs.twimg.com/profile_images/1502564606836981763/fmqtNrNc_400x400.jpg",ref_id:"49966553-d55b-44c9-94ec-8fee09eee5c2",twitter_handle:"CitizenBitcoin"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/239722cb-4216-414a-a17b-5adf9d52e15a.jpg",keyword:!0,link:"https://stakwork-uploads.s3.amazonaws.com/uploads/customers/2707/media_to_local/35b20273-49f2-45ea-a9f4-dc479d86573c/7ae5315f-beb2-41e2-b672-65dd1f102017.mp3",node_type:"clip",pub_key:"",ref_id:"3d112a9e-f3a1-4edb-96b0-c3a8c63b0c4a",show_title:"Swan.com",text:"would be the top three things. You think it would be important for a new person to know and then we can kind of go around and get the same thoughts from Tomer and maybe Peter and really anybody else who wants to go. A good guy. Yeah, sure. So I think there's a few obviously key resources that are important. I think getting motivated and understanding, like having a good sense of what bitcoin is matters, and so getting, I think, the right jumping off point matters. Obviously, stacking stats and accumulating some stats is important, not your keys is an important thing. But for example, reading as an example, the Bullish Case for Bitcoin by VJ. Boyer party, right? So I think that's a good example of a short, intro, long essay or booklet length thing that you can read and. It will give you some sense of the motivation here and some sense of the problem and the challenge. So I think that is an important starting point. Of course, our CTO yarn pritzker, co founder of swan, has written inventing bitcoin that's also a fantastic starting point in terms of understanding some of the technicals of bitcoin without getting into the actual, like having to read code or technical aspects of it. I think it's a fantastic intro book. So I often recommend that as a starter book. I think those are some really good places to start. And then from there, and I mean, even harkening back to Greg Foster's comments earlier, right, this whole idea of skin in the game, put your money where your mouth is. I think it's a similar thing with bitcoin. What you'll find is you can lecture to people all day, but until they have some actual skin in the game, what's the chances that they are going to really take it seriously and spend some time learning? I think one other tip I would give for new people is actually use the technology, right? Send an on chain transaction, right? Use a bitcoin wallet, receive some bitcoin, like withdraw some coin and practice spending some bitcoin on chain, even if it's to yourself into another wallet that you control. In some sense, it's moving money out of your left pocket, into your right pocket, but actually using the thing. Then what happens is you'll start to ask yourself more questions because then you'll start thinking, oh, hey, wow, okay, I just sent a transaction. Oh, look, let me look up the transaction ID. And let me look that up in a block explorer like mentor space or block stream info as some examples, or OXT me or some of the kycp.org, like these different explorers out there. And they can give you some things to think about and understand. Okay, what was the fee rate for this? What are these inputs and outputs? What's going on there? All of these aspects. And I understand at the start that sounds like jargon, it sounds like engineering, it sounds like, whoa, that's like but what happens over time is as you get into bitcoin, you just, you start to once you have that right, motivation, then you just you can't stop going further down the rabbit hole. All right, tomorrow, if you had to pick three things, what are the most important things you think a new person would be valuable for a new person to understand about bitcoin? Yeah. So the first thing is use bitcoin the way it was designed to be used, and tune out all the rest. Tune out people promising yield, people talking about altcoins, people talking about yield, people talking about staking, people talking about everything else. Just go back to the very beginning. Bitcoin was the granddaddy. It came out as software that you can run where you can take custody of these things called bitcoin. And you could send them and spend them. So start there. Start at the very beginning. And it's like learning to drive a car. Do it with a small amount of money, as you would drive a car in an empty parking lot at the beginning. So use a small amount of money. Practice. I'm preaching the same things, just with different words than what Stefan said. So get those two things going and then let your curiosity lead you through the various aspects of the rabbit hole and many others. You may be a reader, you may be a tinkerer. You may be someone who prefers to learn from videos. You may be someone who likes to listen to spaces, all these sorts of things. There is no one right path, which is beautiful because there's many right paths. There are also wrong paths that lead you to the right path. You may get wrecked or burned by trying to be greedy or something else. And those are lessons. Again, you may learn them at someone else's expense by watching someone else make mistakes, or you may have to learn these lessons personally. But I think that, for me, is the thing. Go back to basics. Practice with a safe amount and follow your curiosity. ",timestamp:"00:30:18-00:35:03",topics:["Bitcoin education"],type:"twitter_space",weight:4.926955223083496},{boost:0,date:1633363603,description:"Innovation and scams",episode_title:" The Bitcoin v Crypto War with Udi Wertheimer, Crypto Cobain, Alex Gladstein & Allen Farrington",guests:[{name:"Crypto Cobain",profile_picture:"https://pbs.twimg.com/profile_images/1601273673041776641/7FrXDRv6_400x400.jpg",ref_id:"8fa5fec2-f714-433e-a8c9-ee5e76dabaf0",twitter_handle:"cobie"},{name:"Allen Farrington",profile_picture:"https://pbs.twimg.com/profile_images/1414147363560730624/EXMx91D6_400x400.jpg",ref_id:"8660a251-950b-4888-adbf-21f790210cf6",twitter_handle:"allenf32"},{name:"Udi Wertheimer",profile_picture:"https://pbs.twimg.com/profile_images/1600897375001874432/8pdVDKUz_400x400.jpg",ref_id:"483291b7-2101-4c28-a065-93b1524d0552",twitter_handle:"udiWertheimer"},{name:"Alex Gladstein",profile_picture:"https://pbs.twimg.com/profile_images/1382371620669452292/VOPKOc8w_400x400.jpg",ref_id:"49445c1c-7c66-4b73-9eec-09a337befbec",twitter_handle:"gladstein"}],hosts:[{name:"Peter McCormack",profile_picture:"https://pbs.twimg.com/profile_images/1524287442307723265/_59ITDbJ_400x400.jpg",ref_id:"887a65a7-a2d8-4371-887e-bc7a6ca6ff17",twitter_handle:"PeterMcCormack"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/4e607036-8fde-48ef-ab76-9c2ac4bab031.jpg",keyword:!0,link:"https://chtbl.com/track/282487/traffic.libsyn.com/secure/whatbitcoindid/WBD405_-_Cobie_Udi_Alex__Allen.mp3",node_type:"clip",pub_key:"",ref_id:"1f39afe1-2026-44ca-a0b5-80aea9a8cc83",show_title:"What Bitcoin Did with Peter McCormack",text:"Push back there. That's a lot. Great stuff. Let me go one by one. The first thing you said ethereum. If we're talking about ethereum desension, we have to talk about the monetary policy. We have to talk about the hardforks. I mean, nobody knows how much ETH is going to be minted in 2023. 2024. A small group of people will decide. And I think it's really dishonest, actually, to not mention that. And that's why I think it's centralized. So that's my point. My perspective. Second thing is on innovation. But as I mentioned, everyone knows it. I had to go dig in interview at EF Engineers to find out how much if they thought would be minted in the night. Like, nobody knows, literally nobody whose job. Is to mention it to you. Like people talk about it all the time. Who's the dishonest actor who's supposed to represent those facts? Anyone who's saying it's decentralized when clearly a small group of people is going to determine the monetary policy and not the public. Do you mean cosmic EIP? And there's an EIP 1559. So that economic activity on chain impacts the future. Yeah, it's a hard fork. And the people, the users don't get to decide, they just get hard forked out. This to me is quite clear. But again, we can debate and then just to do a couple of other things and we keep going on the innovation. Why are we all here? The innovation is to escape regulation. Bitcoin is money beyond regulation. NFTs are trading Art beyond regulation. Unitswap is trading assets beyond regulation. ETH is supposed to be running contracts beyond regulation. So it's all about can you evade regulation or not? So I do think that's the important thing with regard to crypto and being nice to people and this idea of are these toxic people bad for Bitcoin? I agree with you, Udi. Bitcoin is going to be fine. Like, Bitcoin is going to, I think, complete its mission over time. It's the people that aren't going to be fine, right? The people that are going to miss this project, the people who've been gaslit for a decade by the mainstream media about Bitcoin, who've been told not to buy Bitcoin because it's dangerous, because it's scary. A lot of people have really lost a huge opportunity, especially in emerging markets, because of what their government and the media have told them to stay away from Bitcoin. When it comes to these crypto projects, I think it's the opposite. I think we need to be more outspoken. Otherwise what happens is that Ripple is in Bloomberg today, and you have smart people who don't know a lot about the space thinking that Bhutan is going to adopt Ripple as their currency. Like that's in fucking Bloomberg today, okay? And you have Carnegie Mellon, a very prestigious institution, by the way, which is a very important institution in America, taking all this money from Hopkinson and promoting Cardano. This is what happens when we don't speak out. People get scammed. So I think it's actually the opposite. We should be talking more about these things because bitcoin is going to be fine. People need our help. And look, if you've got all the time in the world and you're a talented trader, you're going to be fine. Like you're going to clean up in the coming years as we go through these different kinds of crypto bull markets. But the average person is going to be confused. They're not going to know what's going on. And it's not like the average person bought a bunch of salana last Thanksgiving. They bought it in the last couple of months. Like the people who created Solona made the most money. These are the things on my mind. That's a really interesting point because if you listen to Charles Hutchinson's interview on Lex Friedman, I think everyone can agree he's a complete dishonest prick when he talks about Bitcoin. And his job there is to convince the listeners of Lexus show and perhaps Lex, that Cardano is something they should consider. And what's really interesting is I moderate all the comments on my YouTube because there's so many scammers, and when I talk about scammers, it's like, join my Telegram group. If you go on any Vice video at the moment, you can see what we're dealing with. I have to delete hundreds a day. But in there, what we also have is there is consistent chilling from people saying, but you need to consider cardano, why aren't you considering Hex? And it's always the same projects, so I'm going to throw this over to Kobe. How much do people actually pay? Look, you mix in the trading community. There's a lot of people out there trading. And the way I explained it recently to somebody, I don't buy anything apart from Bitcoin. But I almost feel like I'm sat in a conference room in Vegas with Alex Gladstein discussing human rights and through the window and seeing all my friends on the roulette table and having fun. And whilst I know they're gambling, I see all this ",timestamp:"00:46:09-00:50:44",topics:["Crypto scams","Carnegie Mellon","Charles Hutchison"],type:"podcast",weight:4.92695522332177},{boost:0,date:1672167683,description:"Does Bitcoin mining price determine Bitcoin price?",episode_title:"TOXIC HAPPY HOUR! #Bitcoin, Beer and Plebs! 🍻😂🤌🏻",guests:[{name:"Dr. Jeff Ross",profile_picture:"https://pbs.twimg.com/profile_images/1475554600094552064/DSlPG1lx_400x400.jpg",ref_id:"51a969bb-dbf7-4d20-b128-74dcc5f560f6",twitter_handle:"VailshireCap"},{name:"Tomer Strolight",profile_picture:"https://pbs.twimg.com/profile_images/1591960241008148481/HtyINxtU_400x400.jpg",ref_id:"3a2bc97d-072c-4ed9-9a59-17ceeb68fe99",twitter_handle:"TomerStrolight"},{name:"Laura Shin",profile_picture:"https://pbs.twimg.com/profile_images/1539462748173746176/hxR80FYT_400x400.png",ref_id:"a56a7b4d-edca-41d5-9d51-33396aa05b96",twitter_handle:"laurashin"}],hosts:[{name:"PUBLORD",profile_picture:"https://pbs.twimg.com/profile_images/1480160632360124416/AM_vVRko_400x400.jpg",ref_id:"8126d933-0986-4fd2-a6be-c02581294463",twitter_handle:"publordhodl"},{name:"Anders Jensen",profile_picture:"https://pbs.twimg.com/profile_images/1382039124991954947/Wb9kT7MO_400x400.jpg",ref_id:"af45195e-77a6-463f-ba64-29c6b0437d9c",twitter_handle:"andersjensenorg"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/2a1450bc-0649-4dc5-8ec9-1474af1ea1c3.jpg",keyword:!0,link:"https://stakwork-uploads.s3.amazonaws.com/uploads/customers/2707/media_to_local/f7b6cfcb-7cd4-4401-a3fb-7735bb570c07/2ae49fca-a048-4a34-93b9-247513af5699.mp3",node_type:"clip",pub_key:"",ref_id:"2656d145-191a-4e86-8261-04c88a9a6562",show_title:"Anders_🍆",text:"Sack, welcome to the stage. How's it going? Merry Christmas, police. Navidat. Hey. Merry Christmas, everybody. Good to be here. And I just had a quick question. I thought I'd throw it out there. It's not heavy heavy, but I just got caught up on some of the Miting concerns, and I just thought I'd ask if anybody can share with me. Their thoughts on how bad is what. Does it actually mean to the price. Of bitcoin that all of these miners under? I think there's a lot of questions. See if there was any feedback that's a lot of people sorry if I'll keep quiet. If you have further, I'll let you finish. Okay. So I think that's a it's been a discussion going on for years whether mining drives the price of bitcoin or the price of bitcoin drives mining. I guess there's a feedback loop there, but definitely the higher the price of bitcoin, the more incentive to mine it, for sure. But it also seems to sometimes on shorter term lead the price of bitcoin. Because either people see it as a confirmation that there is belief in it and it's getting more secure as hashing rate goes up, or like we saw when china quote unquote, well, actually did ban bitcoin mining back in was that I can't even remember. Was it may this year? I think it was 2021 around that time, and the hash rate dropped to half and a lot of people got spooked and the price of bitcoin collapsed. I'd say a little bit of both, but tomar, you are well worse. Go ahead. Yeah, I think maybe I'd say two things. One, over the history of bitcoin mining has been incredibly volatile. Up and down, back and forth. When the first asics came in, there was only one company making asics. Then a few others came in, that one company disappeared. It wasn't even a real company. And then many of those went out of business. And of course, bitcoin survives through it all. The most important innovation in bitcoin that people talk about is this difficulty adjustment thing which relates to the mining. And so if miners go out of business, then it gets easier to mine bitcoin. And that means that bitcoin continues to operate flawlessly. It also means that it gets cheaper to mine bitcoin, so more people are attracted to mining it if it becomes profitable again. And so what I've noticed in my ten years in bitcoin now is mining is like if the bitcoin price is like a sign curve up and down, but skewed up and to the right. The bitcoin mining is like a scaled up version of it. When the price goes up, you get way more mining, and when the price goes down, you end up getting way less mining and it lags behind. So they run ahead and they run behind. I don't think it's any fundamental what I'm getting to is I don't think it's any fundamental concern to bitcoin's ongoing steadiness or its security or anything of that nature. It's simply a reflection of what the economics are to mine bitcoin at any given point in time. And when the price was high and energy was cheap and money was cheap, people were borrowing money to pay for miners and energy on credit to mine expensive bitcoin. And now that it isn't. They aren't. So it's just rational. But the same number of bitcoin are being produced as would have been the case if the price had been high or if the price had been $1, than just kind of that's a promise that no amount of added or subtracted mining can break the supply. And its issuance schedule and the rate of development of the blocks is essentially exactly as described in the white paper. And when I say essentially, I don't even need that, it is exactly as described in the white paper and will continue to be. So. I think those are awesome points that Tomer made. And I'll throw just a little side tangent on this because I think in terms of investments for almost everything regarding the bitcoin miners, right now, there's a perfect trifecta going against minors. I like to think in terms of three trifectas. What's the trifecta? Low bitcoin price, high energy prices and then a high hash rate. Right now, those three things combine to make it really difficult to survive as a public bitcoin miner or even a private bitcoin miner. And so I get asked all the time by people like, should they invest in this minor because it looks stronger, this minor? I would say I would still avoid all of them. I think they're still dangerous and I still think we're going to see more of a minor capitulation before this is over. To Tomer's point, and this is critically important to understand, that doesn't affect bitcoin. At the very least, the network is still super strong. It will still continue to do what it's designed to do. But bitcoin miners, they offer beta to the price of bitcoin. And so in bull markets they can outperform for a season, and then in bear markets they tend to drastically underperform. I would just be super careful. We were talking before Tomer, you got up here, we were talking about bitcoin proxies, talking about GBTC and MicroStrategy. I would include minors in that list as well. A lot of people invest in miners in their IRAs and their 401 KS because they can invest in bitcoin itself. If you are you've had a tough year and I think it's going to get worse before it gets better. I still think we're going to see many miners, like flat out capitulate actually go bankrupt. Some will survive, a small handful will survive all of that. What that does is it drags the price of bitcoin down a little bit further. It drives the price of asics down a little bit further. I like it, though. This is capitalism. It's called creative destruction, right? So basically the people who have been smart and who have been ready for tough times, they're going to get rewarded, they're going to get cheap. Minors, individuals who have been saying giving up, and who have been smart and they've had their head downs, they've stayed humble, they've been stacking SATS and putting some cash. Away, they're going to be able to buy asics for super cheap and they're going to be mining in the next cycle. And that's awesome. That's the way it should be. Bitcoin itself, it naturally decentralizes. Over time, it gets more and more decentralized, unlike cryptos, which get more centralized over time. So I think it's beautiful. It's sad if you're an owner of one of those companies because they're going to get smoked, but it's great if you're everybody else in the bitcoin ",timestamp:"01:36:47-01:43:20",topics:["Bitcoin mining","Bitcoin hashrate","Bitcoin network"],type:"twitter_space",weight:14.092456989642082},{boost:0,date:null,description:"How Bitcoin has performed as a tool for freedom in the year 2022 ",episode_title:"Gladstein & Sam Callahan - World Bank / IMF & #Bitcoin",guests:[{name:"Sam Callahan",profile_picture:"https://pbs.twimg.com/profile_images/1592532728775409667/0DayEP2Q_400x400.jpg",ref_id:"5a044a91-8dee-421c-86dd-8c734dc9bc32",twitter_handle:"CallahanMusic_"},{name:"Alex Gladstein",profile_picture:"https://pbs.twimg.com/profile_images/1382371620669452292/VOPKOc8w_400x400.jpg",ref_id:"49445c1c-7c66-4b73-9eec-09a337befbec",twitter_handle:"gladstein"},{name:"Brady",profile_picture:"https://pbs.twimg.com/profile_images/1502564606836981763/fmqtNrNc_400x400.jpg",ref_id:"45bbbb01-6163-4b3b-905a-fc67174893d9",twitter_handle:"CitizenBitcoin"}],hosts:[{name:"Neil Jacobs",profile_picture:"https://pbs.twimg.com/profile_images/1593645788978102277/UAQCQKeE_400x400.jpg",ref_id:"0bc759e0-b055-4800-a79d-2b950fe5cc53",twitter_handle:"NeilJacobs"},{name:"Alex Stanczyk",profile_picture:"https://pbs.twimg.com/profile_images/1539055022364708864/rwErK6x1_400x400.jpg",ref_id:"3126e2a3-bbe4-456b-b298-9714085fa286",twitter_handle:"alexstanczyk"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/239722cb-4216-414a-a17b-5adf9d52e15a.jpg",keyword:!0,link:"https://stakwork-uploads.s3.amazonaws.com/uploads/customers/2707/media_to_local/f8be7c60-94a5-41d0-972c-6301cd4ad7f0/4e5bf86b-6193-4f6e-8fa3-933344b2053e.mp3",node_type:"clip",pub_key:"02574d6e8e787372184b6f17c40d6c6fe1777db9015801f95dfd24692784d767cd",ref_id:"888c6962-f33f-4e88-a1cb-6819baabe35f",show_title:"Swan.com",text:"We can pivot a little bit from Africa and just talk about maybe 2022 more broadly. We're coming up on the year end. I feel like you have a unique perspective, given your position at the Human Rights Foundation and your work specifically around Bitcoin being used as a tool for freedom. And I was wondering, if you just think back in 2022, how have we done? How is Bitcoin done to be a tool for freedom? In your mind? What got you excited this year in that kind of purpose for Bitcoin? Bitcoin is doing what it was created to do, which has become a parallel economy for people that don't want to deal with the state. I think that in doing so, it is also kind of finding its way through the existing financial system. So I think that there are things that pop up as Bitcoin adopts that you couldn't have predicted. Some of them are temporary and some of them are permanent. Who knows? We know that we don't know what Satoshi or Hal or any of the early Bitcoinners thought would happen. But it seems pretty obvious that Bitcoin's ability to monetize stranded energy was not really at the top of their list when they were designing the white paper, right? Or when Satoshi was designing the white paper. That was not very clearly not something they realized would happen, or at least was maybe a peripheral thought. So you get a lot of these things along the way towards separating money from state, and one of them happens to be improving Fiat services, which I know Bitcoinrs are divided on. But the reality is, it's true. On our way to the Bitcoin standard, we live in the Fiat standard. It is what it is. And it's really interesting how Bitcoin can connect Fiat companies in ways that Fiat companies cannot use Fiat rails to connect to Fiat companies. Like, this is kind of a powerful thing, and it'll end up in the end with Bitcoin companies connecting with Bitcoin companies. But for now and I guess being in Africa really brings us into focus, but you realize how financially disconnected the world is, and that's not again, it was designed that way. It was designed by companies and services who found a business model and being able to connect people and be able to extract rent from them, moving money on a particular rail or service. So I think, for me, this year has been a big reflection on, like, capitalism more generally, or what we would refer to capitalism. Like, I'm kind of with Alan Farrington. He wrote a great piece called this Is Not Capitalism. I would encourage everybody to read it. Makes for a great holiday read. It's also part of his awesome book called Bitcoin is Venice, which you should read. But basically he's describing how, like, the post 71 Fiat political economy, which essentially is like an operation where the state can be the lender blast resort for all parts of what would normally be a free market economy, obviously not capitalism. And I think that's true for a lot of things in the world. But on the other hand, it is what it is. It's kind of like a cop out to say that it's not capitalism. In a way it's not communism, you know what I mean? It is the American model of economic growth and development. And if you want to say that that's not capitalism, fine, but you got to call it something else. But that's what kind of like leftist critics would describe as capitalism. That's like what they don't like, right? It's like American multinational companies, right? So if we're going to sit here and say that's not capitalist, okay, fine, and I'm sympathetic to that. But the idea is that in the reality is we have a business industry globally that is known as capitalist, at least to most people, and won the cold War or whatever and has developed since then. And I think it has the wrong incentives inside of it, right? So if your incentives in, quote unquote, capitalism, let's say 1.0 or whatever this is that we have fiat capitalism or whatever you want to call it, the incentives are wrong. The incentives are for companies to come in and split people apart, to make money off of them and to attract rent. So I think whatever bitcoin brings to the table, bitcoinism or capitalism 20 or whatever you'd want to call it, is really interesting because it's open. So and I'm who knows how this thought process will develop over the coming decade, but it seems at least plausible that over time, like bitcoinism would result in costs like going down or rather deflating because of the open competition that results from bitcoin economies. Whereas in the capitalist 1.0 model you have a lot of these systems that are set up to become Indian monopolies which end up doing a lot of rent seeking and kind of like unusual things that put money in the hands of a very small percentage of the population and extract resources from others. I think this goes all the way to the macro level of global trade and commerce, all the way down to the micro level of daily payments. And I think that I'm very optimistic about a bitcoin like a different system being built on bitcoin where the incentives are just different. And you would start to see that in Africa, let's say, when you're thinking about how broken the continent is and how broken apart it is rather by both local corrupt leaders and by foreign powers and how Bitcoin would just unite and we create one simple monetary language for the continent. I just think the incentives are very different. I think companies are incentivized to cooperate, cooperate with people as opposed to exclude them or exploit them. And I know this is overly simplistic and clearly, like you could steal man it, but you can just kind of feel this it's very palpable when you're talking to the entrepreneurs in the space. Yeah, that's one of the big things I'm ruminating on as we close out 2022 ",timestamp:"00:35:28-00:42:23",topics:["Bitcoin 2022","Bitcoin freedom"],type:"twitter_space",weight:4.890018939971924},{boost:0,date:1671720944,description:"What to expect on Bitcoin Day Naples?",episode_title:"Café ₿: #Bitcoin News & Bitcoin Day w/ @Bitcoindayio",guests:[{name:"@johnmichaeldrew",profile_picture:"https://pbs.twimg.com/profile_images/1512897699942744064/PuRU3K8P_400x400.jpg",ref_id:"6b72ee7f-52ef-4847-96ed-78ea09e3f19b",twitter_handle:"johnmichaeldrew"},{name:"@mattyicesensei",profile_picture:"https://pbs.twimg.com/profile_images/1607138483579101186/0qm0xaCF_400x400.jpg",ref_id:"286abd3b-cecc-4ec5-bf88-2a9fd5393083",twitter_handle:"mattyicesensei"},{name:"@Bitcoindayio",profile_picture:"https://pbs.twimg.com/profile_images/1493098733608837121/tLI-XTwl_400x400.jpg",ref_id:"6a87699e-7a27-4928-89e8-d884f1458bf9",twitter_handle:"Bitcoindayio"}],hosts:[{name:"@alexstanczyk",profile_picture:"https://pbs.twimg.com/profile_images/1539055022364708864/rwErK6x1_400x400.jpg",ref_id:"6455df34-1abc-4ce8-9bb8-b02d411accec",twitter_handle:"alexstanczyk"},{name:"@SwanBitcoin",profile_picture:"https://pbs.twimg.com/profile_images/1491428856858914820/aFlitvha_400x400.jpg",ref_id:"da3f56bf-9763-4389-a9ec-d807049bd0b8",twitter_handle:"SwanBitcoin"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/239722cb-4216-414a-a17b-5adf9d52e15a.jpg",keyword:!0,link:"https://stakwork-uploads.s3.amazonaws.com/uploads/customers/2707/media_to_local/83744e68-b563-4004-b52a-cfdfff89748f/12c9b9f2-fbce-4784-9404-88a574baa762.mp3",node_type:"clip",pub_key:"",ref_id:"6f72249d-ab08-4a9e-ac54-545f618c29d2",show_title:"Swan.com",text:"another speaker we don't have up there yet because we're announcing it just now, but I sneak preview that we're also luke Jr. Actually is down there, so he's going to be coming as well. We're going to get him on the schedule, but we're trying to get all the bit devs going to come in from the ones that are nearby, at least Miami and Tampa and those guys. But we're going to have a bit devs, kind of a day long. I don't know if they're going to kind of just have a 1 hour thing, but we're going to have bit devs as well from all over Florida come together, which is probably the first time they've ever done that. And then also Mike Yarmou's Muzz, he's going to have one of his bitcoin blitz chess tournaments as well. Well, that's brand new. I don't even know that. Thanks, Edward. That's cool. Let's turn it and then yeah, we got the bitcoin or the toxic happy hour, guys. So you want to talk about that? Is he still on? Yeah, I'm here, man. All right. I know Anders, I think, had reached out to you, and it's pretty cool because we had just gone up to Charlotte, and when your first conference is the bitcoin conference, you think like most conferences are like this. Of course, there's bit block boom and Pacific. Bitcoin now are the larger. But it was great, man. Yeah, they invited us up just to hang out, man, basically. And the great thing I'm working my travel schedule, and if I'm here, I'm coming down there, man. I know Anders will be there. What was great is and it takes you back to your roots because the people you have coming in, what you don't realize is how much you know. So people that have been here for a couple of years, you don't realize how much you've learned. And when you go to these conferences and you meet people that were in your shoes three, four, five years ago, it's just really cool because really you're helping somebody. You're really helping somebody to learn and understand. And that's my favorite part of it. It's not there just to see and be seen. It's there because there are absolute no corners that come to these. And I'm up in Charlotte for Halloween. What was cool is you had some rooms going on everywhere, and one was simply showing them, hey, how do I download a lightning wallet? And to see their faces. When you send them a few stats, they start to get it like, my God, I've got value outside the system here. This is the coolest thing ever. So yes, man. Yes. Dr. Kapir we'll come down there. I see fossils on stage. He and Larry's there. So hopefully we'll meet up with them as well, because, man, at the end of the day, bitcoin is about humanity, about the friendships you meet here. Fantastic. Hey, Greg. How's it going? Hi, guys. Were you talking to Foss? Yeah. Nice to talk to you guys. Nice to talk to you. I'm getting some feedback here. If you're up here and if you're not talking, mute yourself, please, because it causes the feedback. Alex, how are you, buddy? I actually have to be up and then jump. I saw this thing come across. I'm actually going on a lead lag report spaces at noon, so I have to prepare for that a little bit. But I think I know why we're here. We're talking about the Naples bitcoin. Naples day. There'll be the second or third one I've been to. This will be number three. It's a great spot. It's a great group of people. Larry LaPard is going to be there, I think. I'm trying to get James Lavish to come. I know Maddie Ice is going to be there. I hope Steve Luka is going to be there again because he put on a great show the last time. So looking forward to seeing everybody at Bitcoin Naples. It won't be a disappointment, I promise you that. And Puppy lives in the vicinity, I think Tampa Bays within a couple of hours drive, right. So let's hope to see everybody there. And if I don't talk to you before the Christmas break, happy holidays to everybody. 2023 is going to be an exciting year. So let's get ready. Thanks, guys. Thanks, Greg. Talk to you later. Have a merry Christmas. Thanks, robin hobro. Yeah, we hope that so. Yeah. Hopefully people come down from Tampa. Angel is coming down. He's like in Jacksonville or something. He's up north a little ways but talked to quite a few people coming from Miami, too. So few caravans hopefully, coming from Miami. So I think it is even if you've been to bitcoin 22 or whatever, I think it is certainly a different vibe. Like I said, smaller and little less glitzy maybe. But hopefully we get people from both. I like the smaller venues. There's less people. The people to speaker ratio is a lot lower and it's more intimate. You can spend more time talking to them. And I like those environments a lot better, personally. It's. One of the reasons why Pacific Bitcoin did so well is it was smaller we're having at the college down there, and I think that I'm hoping we'll get some students from the college if we can get the word out to them. And then also wanting to make it like I really like the Bitcoin summer model where they were doing development with students that's kind of working with colleges, that's kind of the model or the vibe that I'm looking to recreate is get some students orange pills or help them get into this space more. Very cool. Very cool. Yeah. So we're at Florida southwestern state college, which is its main campus, is up in Fort Myers. But they do have a campus down in Naples. It's named after the county, so it's the Collier campus where Naples is in Collier County. And it's a beautiful small little campus. It's got about maybe eight or ten buildings on the campus. And we've got a nice room, a large room in one of the buildings and then a smaller classroom on the side for some networking events. And probably that chess event will take place in that room. A beautiful little setting. And I know we've been talking about Florida people, but Naples is a beautiful vacation destination. So in January, the weather is absolutely beautiful. The beaches are awesome. You can come down for a long weekend, stay in a nice hotel, spend Friday on the beach, saturday at bitcoin day and Sunday on the beach and head back to wherever you're coming from and be totally relaxed. ",timestamp:"01:48:15-01:55:45",topics:["BitcoinDay.io"],type:"twitter_space",weight:12.160706504077877},{boost:0,date:null,description:"Alex Gladstein's recap of his African Bitcoin Conference experience",episode_title:"Gladstein & Sam Callahan - World Bank / IMF & #Bitcoin",guests:[{name:"Sam Callahan",profile_picture:"https://pbs.twimg.com/profile_images/1592532728775409667/0DayEP2Q_400x400.jpg",ref_id:"5a044a91-8dee-421c-86dd-8c734dc9bc32",twitter_handle:"CallahanMusic_"},{name:"Alex Gladstein",profile_picture:"https://pbs.twimg.com/profile_images/1382371620669452292/VOPKOc8w_400x400.jpg",ref_id:"49445c1c-7c66-4b73-9eec-09a337befbec",twitter_handle:"gladstein"},{name:"Brady",profile_picture:"https://pbs.twimg.com/profile_images/1502564606836981763/fmqtNrNc_400x400.jpg",ref_id:"45bbbb01-6163-4b3b-905a-fc67174893d9",twitter_handle:"CitizenBitcoin"}],hosts:[{name:"Neil Jacobs",profile_picture:"https://pbs.twimg.com/profile_images/1593645788978102277/UAQCQKeE_400x400.jpg",ref_id:"0bc759e0-b055-4800-a79d-2b950fe5cc53",twitter_handle:"NeilJacobs"},{name:"Alex Stanczyk",profile_picture:"https://pbs.twimg.com/profile_images/1539055022364708864/rwErK6x1_400x400.jpg",ref_id:"3126e2a3-bbe4-456b-b298-9714085fa286",twitter_handle:"alexstanczyk"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/239722cb-4216-414a-a17b-5adf9d52e15a.jpg",keyword:!0,link:"https://stakwork-uploads.s3.amazonaws.com/uploads/customers/2707/media_to_local/f8be7c60-94a5-41d0-972c-6301cd4ad7f0/4e5bf86b-6193-4f6e-8fa3-933344b2053e.mp3",node_type:"clip",pub_key:"02574d6e8e787372184b6f17c40d6c6fe1777db9015801f95dfd24692784d767cd",ref_id:"f84d9798-f31e-480e-9da6-9be8dc74f6be",show_title:"Swan.com",text:"can rerehearse. No, it's interesting because I saw Sam clapping, so I thought that it was working, but apparently not. It was. I think we probably heard more than we heard a lot of it. Man did you hear me talking about the mining? Mining? No. Okay, so we didn't hear the mining. So maybe start there. Okay, so to recap awesome event. No one tried to sell me a token. You learned a lot about how the main use case for a lot of Africa today is receiving bitcoin from abroad, because crossborder payments suck, and a lot of entrepreneurs have found ways to be the off ramp for their families and communities in different countries. Like, I met a guy who was doing this in Somalia. Like, lives in Mogadishu, has 30,000 clients in Somalia. He receives the bitcoin or stable coins from abroad, and then he's the off ramp, and that's what he gets paid for to do. There's tons of businesses like this in Africa today, and you get enough businesses like that, and then you also probably start to start to get a little bit of a circular economy going as well. So that's why we started seeing, I think, a bunch of other people pop up at the conference who are doing merchant services and then mining. So I guess what I was trying to say about mining is that I think it's going to have a huge decade in Africa. It's going to be transformative. I met a kid I say a kid not to be diminutive, because he was, like, 19 years old, and he's from northern Nigeria, and he learned everything on YouTube about how to mind you guys can hear me fine, right? We're good? Brady yeah, we're good. Okay. So he learned how to mine on YouTube, and I guess in the delta region of Nigeria, there's an enormous amount of flared gas at night. I spoke to people who grew up there. You can just see it like the fire in the sky at night, and obviously represents an enormous opportunity to turn that into money and economic activity through the bitcoin network. I talked to him a little bit, and he's planning to go down there and capture some of that flared gas with a container operation this year. So I'm sure security will be, like, a high budget item for him, but that's the kind of gritty entrepreneur that you meet out there. I also just was shocked at the number of developers. I hosted a workshop about bitcoin for nonprofits. Maybe there were 35 people there. 20 of 20 of them were bitcoin lightning engineers from Nigeria. So they came to the workshop because they have local causes. They want to support and they want to be like the Uncle Jim type person. But I'm sitting there in this room and I'm like, wait a second, there's got to be more bitcoin engineers in Lagos than in San Francisco at this point. It's pretty amazing. And I think that's going to just explode in the coming two years. So, Kala is a program started by Carla Kirk Cohen and Bernard Para and a bunch of other African bitcoiners. And it helps programmers and coders become bitcoin programmers and coders. It's an incredible initiative. Qala is what it's called. So Ahref is proud to support Kala and they're going to be churning out a couple, at least a dozen, if not more bitcoin ecosystem contributors every year. And apparently they got in their first cohort, which is just sort of wrapping up. 100% of the graduates got placed with jobs in bitcoin companies, which is incredible. So that's something that's really cool. So I think that's another huge area that you start to see is that there's going to be this huge explosion of growth of contributors to the bitcoin ecosystem. From countries there, I learned about a bunch of other projects. One of them was the fact that a lot of people in Africa, in sub Saharan Africa, have feature phones, but they can't necessarily pay for. Internet is very expensive in a lot of countries. So you might have like an Android or whatever, but not be able to actually have data unless you're at a cafe with WiFi or something. So that's why it's very important to figure out how to use what's called USSD to interact with the bitcoin network. So USSD is like, you can use it on a candy bar phone. It's like a way to use text message protocol to run small apps. So it's sort of how it sort of impacts the type of thing. But the idea is you can send a text message and then get a series of commands back to your phone without Internet that allow you to send a receive bitcoin, which is pretty freaking amazing. And it's done by a team that was speaking at the African Bitcoin Conference and is growing and fundraising. So, yeah, I just got my mind blown like three times a day by stuff I was learning. I met this woman who launched this educational initiative in Nigeria to help girls and boys and teenage girls and boys, Muslims and Christians learn how to use bitcoin. That blew my mind when she told me about how it all works. So, yeah, I consider a pilgrimage to the Africa bitcoin Conference to be at the same level as going to, again, a place like Elsante or one of the other bitcoin circular communities. So, bucket list item for all of you for next year. So anyway, yeah, really fun. Yeah, I remember reading about that. I think it's machakura. I don't know if I'm right, but basically sending bitcoin over text messages. So it's tools like that that get me inspired, because trying to get it. Gives you like a menu and it's like, do you want to send? Do you want to receive? And of course, it's custodial there's issues, but it's like a way for people to send and receive and do activity over the lightning network using text message. And you can easily just withdraw. You can, like, withdraw funds to your own control as well at any point. So I think you start seeing people use some of these kind of systems as kind of spending wallets. Like, you might have some bitcoin in the same way that you might use like a wallet of satoshi or maybe someday soon a fetishment to do spending because it gives you something like privacy that you want. Well, in Africa, people might also have their cold storage or whatever, their savings, and then they might have a little bit of bitcoin in, for example, an account that allows them to get out there and use it and spend it without internet access, which is pretty amazing, actually. So anyway. Yeah, it's incredible just giving them the tools they need. ",timestamp:"00:15:52-00:23:31",topics:["African Bitcoin Conference"],type:"twitter_space",weight:4.890018939971924},{boost:0,date:1635566400,description:"[[John Vallis]] Intro",episode_title:"WHY ARE WE BULLISH Adam Curry Untapped Growth John Vallis Guy Swann ep211",guests:[{name:"Adam Curry",profile_picture:"https://pbs.twimg.com/profile_images/1401922551161442307/XjN2DdFD_400x400.jpg",ref_id:"c304fffc-7fe0-49a1-86b8-d3278f5c89dc",twitter_handle:"adamcurry"},{name:"John Vallis",profile_picture:"https://pbs.twimg.com/profile_images/1568743166035070976/4MyKww8A_400x400.jpg",ref_id:"c3a9fe29-3b78-4665-af54-e293e9d68962",twitter_handle:"johnkvallis"},{name:"Guy Swann",profile_picture:"https://pbs.twimg.com/profile_images/1401969630634196995/DqOuszMi_400x400.jpg",ref_id:"39c31930-d799-40a0-9a46-193117d03418",twitter_handle:"TheGuySwann"},{name:"Untapped Growth",profile_picture:"",ref_id:"79de7f8f-4f00-48c4-897a-57aa2a5fb7da",twitter_handle:""}],hosts:[],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/6b8fbd46-fa4a-4d07-a142-9aeb242d249f.jpg",keyword:!0,link:"https://anchor.fm/s/11e95d20/podcast/play/42550048/https%3A%2F%2Fd3ctxlq1ktw2nl.cloudfront.net%2Fstaging%2F2021-9-30%2F442bcfea-951a-39d6-a1ce-0bbc6c7b43c3.mp3",node_type:"clip",pub_key:"",ref_id:"5b032ecb-09f5-4581-a1a8-cd0865de6076",show_title:"BTC Sessions",text:"you, brother. It's always a pleasure. Yeah. I host a podcast or two podcasts now, I guess one called Bitcoin Rapid Fire and that's my own. And the other is closing the loop. And that's for CT, a subsidiary Bitcoin company of a larger energy group in Norway. And mine. I just started because I became obsessed with Bitcoin and in 2019, it kind of bubbled over and I couldn't not talk about it. And I needed some excuse to hit up these people in the space to have these conversations. And I guess since then, it's morphed into I don't get too deep into the technical aspect of things. I really like to discuss what's happening on the personal side of this phenomenon and how engaging with this thing and adopting it and using it as your kind of lens for many different aspects of reality influences people on a very personal and deep level and what kind of impacts that's having on culture and such. So, yeah, that's what I like to investigate. And I can't wait to chat with you guys. You also like to Orange pill people like Peterson, so that's a plus, too. I love watching him dive down that rabbit hole and start bringing in his circle into it. So I know that was a while back, but once again, kudos on that. So glad to have you. Thank you. Yeah, it's inevitable that Peterson takes the Orange pill and really goes down the rabbit hole. So it's nice to participate in some small way in that. Yeah. Peterson totally was on the same foundation of the principles to grasp it from and just started running with it. It's just great. So much of the bullshit in a matter of like 20 minutes. It was pretty amazing. Yeah, it was. God, why don't you take it away, let people know who you are and what you do as well. I'm the guy ",timestamp:"00:08:28-00:10:23",topics:["john vallis"],type:"podcast",weight:4.856878281588437},{boost:0,date:1632628800,description:"The Analogy of [[Automobile Innovation]] for Mass Production and the Development of Related Industries to [[Bitcoin]] and [[Lightning]] Development",episode_title:"WHY ARE WE BULLISH Denver Bitcoin CryptoMags Lord Fusitua Jim Crider ep203",guests:[{name:"Jim Crider",profile_picture:"",ref_id:"acb937b5-97e9-4881-a45e-0e9511382019",twitter_handle:""},{name:"Lord Fusitua",profile_picture:"https://pbs.twimg.com/profile_images/1511890587586560000/xGb_Dq_D_400x400.jpg",ref_id:"45559c92-d4f0-42a5-8dc4-a8cce65e95a1",twitter_handle:"LordFusitua"},{name:"CryptoMags",profile_picture:"",ref_id:"79cd9104-fa2c-4996-a179-8acb75642acd",twitter_handle:""},{name:"Denver Bitcoin",profile_picture:"",ref_id:"5ab53f2f-797f-4e1b-90d8-f2ca90e88af4",twitter_handle:""}],hosts:[],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/638c47da-8592-4d7b-aa1a-20e28fa0499f.jpg",keyword:!0,link:"https://anchor.fm/s/11e95d20/podcast/play/40846589/https%3A%2F%2Fd3ctxlq1ktw2nl.cloudfront.net%2Fstaging%2F2021-8-25%2F381320f0-9d1f-9ee7-893f-57af427aca69.mp3",node_type:"clip",pub_key:"",ref_id:"6f3620f8-fd11-4b37-b8c1-7b8bd991420c",show_title:"BTC Sessions",text:"Think about when the car became much more accessible to normal people. That changed. Not only that changed the perception of the value of a car, that changed industries for production, and that also changed gosh, the way that cities were constructed. And we could have looked at that and said, Henry Ford, this is trash. You're making crap cars on a line. But the iteration there of, hey, let's get this to the masses. And then later on we're going to have these Supercars. But right now it's about getting it to the masses and allowing for an infrastructure to be built that we can continue to progress and build on from here. And allowing that to be shared. Yes, Henry Ford did some pretty crappy stuff, I guess. But the infrastructure that was built based off of that being accessible to the masses allowed for other people who weren't related. They weren't benefiting directly from Ford or company stock or whatever it was. This network of, hey, we're going to build roads, we're going to build gas stations, we're going to make tires. And right then it opened up a place of progress in a whole industry and the creation of something that had been thought of before just because it became accessible to more people. And that's what's happening right now. It's no longer this small thing that's for cyberpunks or something. It's the masses. And hey, how can this fit with my life? Ford effectively created the context for the word infrastructure. Infrastructure didn't mean anything before there was an automobile because all those roads, those highways, everything that infrastructure came from having an automobile. And that's exactly like you're saying. The entire infrastructure of what Bitcoin and Lightning will be used by will change the way people live, the way people consume music, food, how they store value. It will have ramifications right across the human experience. And just quickly, I just realized I completely did not answer Magg's question at all. Sorry. We've ",timestamp:"01:19:31-01:21:40",topics:["automobile innovation","bitcoin","lightning"],type:"podcast",weight:4.856878280787084},{boost:0,date:1676393011,description:"The small time deposits component of M2 money",episode_title:"#24 Decoding M2 (Non-M1): Money supply USA",guests:[],hosts:[{name:"Matthew Mezinskis",profile_picture:"https://pbs.twimg.com/profile_images/1497857369455398914/un-TpS6g_400x400.jpg",ref_id:"0dc3360c-5243-43f0-a2f4-19f8a171550d",twitter_handle:"crypto_voices"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/3325efce-80a8-490c-8645-cad1b9a22d94.jpg",keyword:!0,link:"https://anchor.fm/s/d8decf3c/podcast/play/65039444/https%253A%252F%252Fd3ctxlq1ktw2nl.cloudfront.net%252Fstaging%252F2023-1-14%252F312793741-44100-2-d61bc3a08476d.mp3",node_type:"clip",pub_key:"02574d6e8e787372184b6f17c40d6c6fe1777db9015801f95dfd24692784d767cd",ref_id:"3bfbecac-2ad1-4983-9ed0-f1e48f1f0149",show_title:"Crypto Voices",text:"let's put savings back on. We have savings deposits, the vast majority of non M One, M Two retail money market funds. And now let's add the final component of M Two that we haven't looked at yet, and that is small time deposits. Now this is actually back to a bank. Typically. Typically this can be found in a bank, small time deposits. And let's take off savings and retail just to see this one now you see this one's a little bit more jumpy and way down compared to where it's been around the global financial crisis. It was a little bit more than retail money market funds. 1.4 trillion on the eve of the global financial crisis. And then you see that it fell steadily, steadily all the way until basically today where it's $357,000,000,000 of a small time deposit money supply for retail investors in the United States. There is at the zoom here again to comment on the retail nature of what M two is supposed to be. It's supposed to be more retail liquid monetary assets. Of course that's not always the case with small time deposits. They could be small companies that hold time deposits. Nonetheless, this is just how the Federal Reserve counts it out. I believe it's under $100,000 is a small time deposit. And so what is a time deposit? Similar instruments like a money market fund actually or even a savings deposit, which I didn't perhaps give a full definition either. This is again, when you want to hold your money, you want to hold a balance with a bank. And as we learned in prior videos, that does not mean that there's just physical banknotes and coins sitting in a big vault waiting for you to retrieve. No, that's not how the system works. It's a fiduciary system. It's a fractional reserve banking system and basically nearly all of the money always is lent out by banks in the effort to pursue interest, to pursue profit. And it's a highly regulated industry. They claim that the regulations stop prior bank runs and prior crises. That's very, very debatable, very very arguable. I personally don't believe that at all. But nonetheless that's what they claim. So a time deposit is a very unique type of deposit where unlike a demand deposit and unlike even a savings deposit, which now after regulation do changed, basically has no difference than checking accounts. As I mentioned, a time deposit is basically where you know that you are depositing this money with the bank in return explicitly for interest and you won't be able to take the money out until the term ends. So the deposit might be a month, it might be three months, it might be six months, it might be a year, it might be well over a year. But it is a strictly defined term by the bank where it is very very clear that you are loaning your money to the bank. You can't take the money out of the deposit, the time deposit before term comes due. And if you do, there will be a penalty for you to pay, not the bank. And in return for this time deposit account, which what is in it for you if you offer this to the bank, if you deposit your money in the bank into a time deposit account you should receive higher interest payments than you would in a savings account or a checking account. Sometimes checking accounts pay interest, sometimes not. Sometimes they're just free. But that's how it works. So again, not a huge number and even a smaller number than retail money market funds as of today. But this is an account that you will typically find back in the bank. And again it's just defined by the Federal Reserve as a small number, meaning under 100,000 denomination time deposits. So typically retail, but it certainly could be small companies as well using small time ",timestamp:"00:15:42-00:19:51",topics:["Small time deposits","Time deposit","M2 money supply"],type:"podcast",weight:42.29542842100859},{boost:0,date:1624507200,description:"Small business regulations and [[problems with employment]]",episode_title:"Bitcoin Fixes This 48 Small Business with Ali",guests:[{name:"Ali",profile_picture:"",ref_id:"1169edf2-a89f-4d89-94a4-1be1a7b9aef0",twitter_handle:""}],hosts:[],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/2536a974-d668-4ac2-8613-0b37aa0ca08c.jpg",keyword:!0,link:"https://anchor.fm/s/2a4e8034/podcast/play/36003846/https%3A%2F%2Fd3ctxlq1ktw2nl.cloudfront.net%2Fstaging%2F2021-5-23%2F969a4306-e9eb-95c5-0e15-42d37c0e61e8.mp3",node_type:"clip",pub_key:"",ref_id:"b1b5acae-0bc8-4117-8d1b-b61e79bea99f",show_title:"Bitcoin Fixes This",text:"up in the morning. I had a question about your being a small business. What sort of regulations have you seen over the past year and a half with chronovirus and everything? I imagine that couldn't have been easy. And to some degree, I imagine it's still very difficult. What has that been like? Yeah, it's been tough, Jimmy. We were forced to close down our dine in area, but we're already operating most of our business with deliveries, online delivery platforms like Uber Eats and get the dishes and all these door dash and all these things and then take out like, people just come in and pick up two or three Sharmas and take it to their families. And our business has to adapt to this shift in the way people order food. Luckily, we were already there. We were integrated with all the online platforms and we were able to make that transition quite easily. But, yeah, for the first month, I remember the first March of 2020, within one week, our sales dropped like 80% in a week. And it's quite devastating because we didn't know how long things going to last or anything. We laid off people, we tried to get them back, but they said, no, we're getting free money from the government. And that's part of also the reason why we felt like something was messed up with the financial economy and we felt like there was too much money flying around and it was being worth less as time goes by. So, yeah, we just hustle through it, Jimmy, like we did what any business owner would do. You just hustle through it. Something like that Bitcoin wouldn't save you from a situation like this. You need to just make your business work. And if it works and you've done the Bitcoin decision now, you have a successful business and you're in a position of strength to expand your business however you want or to do all the things that you want to do with your business. So it has been challenging, it has been tough, but you got to fight through it. That's the best advice I can give to people. And it sounds like you had some labor problems, maybe even some regulatory problems and things like that. How do you deal with the fact that people are getting paid more to not work, and how do you hire people in that sort of weird incentive environment? Yeah, it was backwards, Jimmy. We tried to get people hired after business started picking back up in 2020. And then they were just like, no, we're good. We're getting free money at home. We were like, okay, for a while there, we had to raise our pay just to attract the people staying at home. So we had to basically compete with the government and paying employees. So, yeah, we did that. But then at one point we said, you know what? We don't want to come back school, you guys. We're just going to hire a whole new crew of people and train them from scratch. And we did that, and it worked out fine in our industry. I feel like there's always some people that are willing to work. You just have to really look for them, but they're not easy to find, but you end up finding good people eventually. Yeah, I've noticed that about small businesses, even here in Austin and everywhere else, you see Help Wanted signs just absolutely everywhere. And the reason is because no one really has to work. So they get paid maybe 20% more for working versus sitting at home and doing nothing. And they'd rather just sit at home. It feels very off. And I can't imagine how difficult it must be for a small business owner to have to kind of deal with all of that. It's really hard, Jimmy. Like, I have my sister and her husband. They're dentists. They have a few clinics here in London, Ontario. They have it even worse because most of their employees are like female hygienists and dental assistants. And they have their kids staying at home and not going to school. And it's even harder to get them to come back to work because they say, oh, we can't leave our kids at home by themselves. We're just going to stay at home, get paid, and you go figure it out. We can't come yeah, it's tough on medium and small businesses. And it's just the reality. It's the backward reality that we have to deal with right now. It's insane to me. Well, does the Canadian government sort of, like, subsidize you for at least some of the hardship that you're going through, or do you kind of just have to deal with it as a small business and sort of not have that many workers or shorten your hours. What are your options? Here's a cherry on top, Jimmy. If your business does well or improves from the previous year, improved, like its sales and its revenue, then you don't qualify as a business for any government assistance. Right. So we have been able to be in that situation where actually our business improved from last year. But because we hustled and got our business going and our revenues increased, we get left out from all the government grants and the rent subsidies and all of that that is given to everybody else that basically just locked their doors and didn't bother to try. I'm fair, but I'd rather be in this position where we don't need help than in a position where we're handing out a hand to the government and asking them for grants and whatnot. So I'm happy this way. Well, are your competitors that kept the prices the same? Are those ones that got, like, government assistance, or are they hustling just like you? Well, yeah. I'll give you an example. Like one of our stores we have like a neighbor, that restaurant, it's like a pizza store. And they've been basically they shut their doors since this whole thing started and they've been able to get enough grants to pay off themselves, their landlords, everyone, and not basically not do a thing, just have the door shut. So from this perspective, it kind of feels unfair. It feels right that if you're not able to adapt in this environment, then you should be kind of liquidated and other entrepreneurs can take up that space and make a model that works better in this environment and so on. But that's just not the way it's working right now. And in that sense, it's kind of unfair. But who cares? You got to pick up our sleeves and that's Bitcoin so they can do whatever they want. ",timestamp:"00:18:56-00:27:00",topics:["problems with employment"],type:"podcast",weight:4.846990585328009},{boost:0,date:1266645600,description:"Power of small stock holder",episode_title:"5. The Profit Motive",guests:[],hosts:[],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/ef62c7ab-ef09-47b7-9af4-2ebe2384a72f.jpg",keyword:!0,link:"https://dts.podtrac.com/redirect.mp3/cdn.mises.org/05_AustrianEcon_Rothbard_1972.mp3",node_type:"clip",pub_key:"",ref_id:"99fc3f47-1cb2-449e-bd46-97a597fce97a",show_title:"Austrian Economics: An Introductory Course",text:"Well, how about the stock solar manager? This junction the first place. Nobody said it's either way, there's usually a store manager developed here. The story goes. Well, after all the stockholder sitting there. He's got no control. He's just having a dividend. Well, it's true. If I have one share of General Motors stock I'm not going to have a very powerful influence on the decision making process of General Motors. No reason why I should. Nobody expects to. But nobody ever claimed that no New York classical economics with an IQ over 20 has ever maintained that the small stockholder has much power. The point is that the large stockholders have the power. And if you get the large stockholders together on issues then they become dominant. The small stockholders stockholders already do have power. Another way it's very important, a small stockholder if he doesn't like the way things are going if he doesn't like the profit record usually as a corporation he has stock in, what does he do? He sells it. I don't like General Motors this year. Profits are falling, I'm selling a stock. If people start selling the stock small, they are, this means the price of the stock declines and the big guys are holding a lot of stock at a very worried because the value of their assets goes down this way by voting with their feet, so to speak. The small stockholder does it decision, even though not directly not by voting, but by voting in the market, just since it's more powerful. So that's one thing. Also a person currently should contrast this the power the small stockholders have by voting with their feet and the corporations contrast this is so called publicly owned and we'll get back again later, because the government ownership, so called publicly owned operation, where every citizen, by virtue of being a citizen, for example, owns a post office. Well, can we sell our shares in the post office? I don't like the way the post office is being run. I want to sell my share, where do I go to sell it? Obviously we can't go anywhere talking, we ain't got no shares. It's really government owned and the public ownership is a pure mythology by which the government closest operation so we have the power in a private corporation to sell a share if we don't like it, we don't have the power in a so called publicly owned government operation you can't sell the shares of the public school, for example. Okay, let's ",timestamp:"00:07:39-00:10:00",topics:["Small stock holder","stockholder"],type:"podcast",weight:4.837404131889343},{boost:0,date:0,description:"Talk about Value to Value Apps and Brian Murray' Project",episode_title:"Cool Apps Built on Lightning - March 16, 2022 - Voltage Twitter Spaces",guests:[{name:"Chad Atkins",profile_picture:"https://pbs.twimg.com/profile_images/1200611447979544576/W9ocRJTb_400x400.jpg",ref_id:"62da3c50-0a46-400b-81a3-5f482f5b8fee",twitter_handle:"Chemchad"},{name:"Michael Atwood",profile_picture:"https://pbs.twimg.com/profile_images/1362207977470521345/Jy2_Ge60_400x400.jpg",ref_id:"16359ade-afb9-4a37-be0b-0844a6134327",twitter_handle:"Dooowta"}],hosts:[{name:"Nate Glasky",profile_picture:"",ref_id:"0662789d-b39e-4aed-ad6f-44257695b6af",twitter_handle:""},{name:" Bobby Watts",profile_picture:"",ref_id:"ae2685c6-1307-473a-95b0-87c234e50483",twitter_handle:""}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/2ec62250-4755-4616-8342-096a2cfab95f.jpg",keyword:!0,link:"https://www.youtube.com/watch?v=4EJrnxYOShY",node_type:"clip",pub_key:"",ref_id:"addee850-119f-472c-87c2-05fc0642abeb",show_title:"Voltage",text:"guess until someone raises their hand, there's one. I don't have a list maybe like you do, but one of the things that's on my mind is I've been playing a bit more with some of these value for value apps where basically whenever you find something good, you can tip or just get someone sat. Like what I've been mainly playing with and enjoying is Fountain and Stacker News. I just think it's super fascinating and I can see in the future how there could be like a Wikipedia that's Lightning based where you get tips for creating good content and I can just see how that could really take off. But I've been really having a good time with Fountain, using that app and just onboarding a lot of friends, and I know they're doing a ton of things behind the scenes that are going to be rolling out over the next couple of months, which is exciting. Yeah. Fountain is really slick because it's sort of like an overlay, over spotify if you want it to be. Right. I had a little bit of time playing with it recently, but it's really cool. I recommend anyone to try out Fountain if you listen to podcasts. Yeah, and I just heard, someone told me today that whenever they logged in, fountain gave them like 1000 free stats or something and you can use it to kick start streaming stats to people and paying content creators, but pretty sweet. What's up, Brian? Hey, welcome up, man. A fellow shadowy supercoder, I believe. Yeah. Brian of London. What's up, man? You're muted right now. Did you want to share something. That'S unmute? I'm in a car, so if it sounds terrible, I'll duck off again. Yeah, I joined Voltage today. I've been building stuff all to do with Podcasting 2.0 for a few months now and interfacing with Hive. I know, don't worry, it's another blockchain thing. But this whole business of value for value is absolutely critical. And Lightning is very important because of the low fees and other than the hassles I've been having with nodes and hardware braking, which is why I just started up a voltage node tonight because I spent the whole day messing about with an umbrella and broken SD cards and stuff. So I'm really hoping that Voltage is going to be better for me to build something kind of that I can really share. But yeah, looking forward to getting that going. And what I'm actually doing is converting from Hive into Lightning and lightning into hive because there's about four, four or 5000 Lightning enabled podcasts on the value for value system right now. But the little secret behind that is that about two and a half or 3000 of those I put there because they're all video channels on something called Three Speak and I handle the stats for those. So, yeah, there's a lot coming. A lot coming. I love the vision. That's awesome. Having the ability to send not just quick payments, but small, instant free ones, relatively free, is just incredible. Like, worldwide, the amount of things that you could build is incredible. So that's really cool, Brian. Yes. Anyway, thanks. A lot of stuff to build. I hope that Voltage helps smooth some of those corners for what you're building. Well, yeah, I mean, I was building something and I've been building it all sort of within my home, basically. And I just got to the point where I'm sharing. I've got a method to expose invoices out into the world, but I don't like how I'm doing it. And I have to have a node that's public. Lightning is a bit of a fiddle, I've got to say. I develop on two things because I'm developing on the Hive blockchain, which is super easy because it's got no fees and very quick and it's got an easy developer and I don't have to think about all these channels and stuff. But what Lightning brings is this ability to have these wallets all over the place. That the way Lightning works for small wallets on phones, inside apps like Fountain and stuff. There's nothing else like it that I've seen. So there is a combination, which is what I'm combining two different things because I think on the receiving side for podcasters, actually receiving SATS on their own node is beyond most people keeping a node running with the channels, with the liquidity in the right places and all of that stuff. I don't think that's going to be a mass market thing. Yeah, I think over time that should be softened around the corners, automated a little bit, hopefully. But yeah, we're still definitely early days where it's nice and tough, so to speak. Yeah, it's a struggle learning. I've been on this for like nine months now, learning how to open channels at the right time so you don't get whacked with too much fees and who to open channels to and the sort of the dark art of channel fee pricing and all that stuff. So you open a channel and go to bed and then in the morning the SATS that you thought that you would have for outbound have all snuck off somewhere because somebody rooted a million SATS for you and you didn't change your fees, that kind of stuff. Anyway, it's all learning. Very cool. All right, thanks for having me on. I'm going to mute. Bye bye. Thank ",timestamp:"00:02:18-00:08:42",topics:["Brian Murray"],type:"youtube",weight:4.822762489318848},{boost:0,date:null,description:"Bitcoin price indicators and how Bitcoin pricing might stabilize ",episode_title:"Café ₿: #Bitcoin Beginner Q&A",guests:[{name:"Peter",profile_picture:"https://pbs.twimg.com/profile_images/1581695667193643009/EljNY-TH_400x400.jpg",ref_id:"a3384925-e15e-421d-b9f9-6d44e273ed05",twitter_handle:"PeterAnsel9"},{name:"Stephan Livera",profile_picture:"https://pbs.twimg.com/profile_images/1362551718110580740/v-W5Q2uo_400x400.jpg",ref_id:"72f57157-c96e-4466-8bf1-290cfe1f8a0b",twitter_handle:"stephanlivera"},{name:"Thomas J Lake",profile_picture:"https://pbs.twimg.com/profile_images/1529168328534769670/5cl2Y_k-_400x400.jpg",ref_id:"21541a47-0601-447c-99c2-312d1a63c19f",twitter_handle:"thomaslake"},{name:"Goodguy",profile_picture:"https://pbs.twimg.com/profile_images/1363216959576285185/unulY4yd_400x400.jpg",ref_id:"0c3fec75-9cc2-4c0f-8dbe-db7fae2b585b",twitter_handle:"goodguybiker"}],hosts:[{name:"Brady Swenson",profile_picture:"https://pbs.twimg.com/profile_images/1502564606836981763/fmqtNrNc_400x400.jpg",ref_id:"49966553-d55b-44c9-94ec-8fee09eee5c2",twitter_handle:"CitizenBitcoin"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/239722cb-4216-414a-a17b-5adf9d52e15a.jpg",keyword:!0,link:"https://stakwork-uploads.s3.amazonaws.com/uploads/customers/2707/media_to_local/35b20273-49f2-45ea-a9f4-dc479d86573c/7ae5315f-beb2-41e2-b672-65dd1f102017.mp3",node_type:"clip",pub_key:"",ref_id:"dbc2c8f6-e85d-449c-a431-e52f6e7594e2",show_title:"Swan.com",text:"We're going to continue to do these, I think. I've been talking to Jacob about this, doing this maybe once a week, doing a beginner Q and A, getting back to our roots. And if you guys want to participate in that, we'll talk about it and see if we can do this on a more regular thing. Let's do one more quick question, and then we will make some closing comments and wrap the show. Zoom out. Do you have a beginner question? Welcome. Hi. Thanks. It was a little more advanced, and it was specific to you guys talking about the pricing and the measurement of pricing. So it's not a simple one. Sorry. But I was very fascinated to understand how the price might stabilize over time and what the indicators are there. In. Terms of pricing everything in Bitcoin. I'm going to I'll give a quick answer to that, and we'll move whether my answer suffices or not. Okay. So basically, I think there's an opportunity first of all, there's an opportunity cost, and also, there's not enough monetary energy in it yet for it to be more stable in my iceberg versus ice cube example. But the other thing is, is that it's not quite being used as a medium of exchange yet, which will also help stabilize. And the reason it's not, in my opinion, is that we're still in the value accrual phase. There's an opportunity cost. Many of the people holding it don't want to use it or sell it because we believe it's going to gain in value. I mean, we'll use it on a small scale. I'm using it on a small scale. But, you know, if if a if you look at the the coins that are held today, I think something like 60% or more of the supply has not moved in more than a year. And what that tells me is that the people that are holding it think that there's an opportunity costing it and that's why it's not moving. And until that's arbitraged away, you're not going to see it fully employed as a medium of exchange. Without that, there's still going to be that level of volatility there. Go ahead soon. Yeah, thanks. I guess there's a bit of reading to do that on economics, but it's fascinating to see how the globe or the whole world might start to equalize and synchronize in terms of how they measure and value everything around the world. On top of that, I just wanted to add maybe to some of the newbies. I've been in this space for a couple of years and thought I had a good understanding. And then I listened to Lynn Olden over the weekend and she described bitcoin as being unique in that it solves this abstraction of the money. And my head exploded because I realized somehow that actually there's a coupling of the transaction itself and the record of that transaction. And it just completely blew my mind because I for some reason couldn't see that until she described it and it solves the abstraction. I think that's the double spend issue. By Zenfine general's one, but it was. Her description specifically on simply bitcoin of it being married. Awesome. Yeah, it takes all sorts. Every one of us who explains bitcoin will reach different people. And that's the reason why it's great to have such a great spectrum of personalities that are doing it. Let's get to some closing comments and we'll wrap. Thanks for coming. Zoom tomer. Do you want to make closing comments and we'll let Stefan go and then we'll move to wrap. Closing comments. Bitcoin is not that hard. It's a very simple thing that you can take custody of. Use it the way it was originally intended to be used because it's kept all those promises. There's a lot of charlatans in the space. Beware of people promising easy returns, safe returns, quick returns. They're all out to get your bitcoin from you and they're selling you something different. I just hope you can learn the lesson at the expense of others rather than at your own expense. The direction that it's going in is you will likely eventually own bitcoin. So start figuring out how to own it sooner rather than later. Awesome point out. Before we go to you, Stefan, I just want to say thanks to Good Guy and Neil and everybody who comes up here on the regular, we're really out of time. Otherwise I do closing comments with all you guys. We love you guys, we appreciate you guys coming. Stefan, closing comments and then we'll wrap. Yeah, look, I would just say don't feel overwhelmed. It's very simple. Like once you've withdrawn and then actually practiced doing a transaction, you'll find it's actually a lot simpler than what was thought. So I think it's a common thing where people are maybe they're a little worried the first time they've ever done it. But then after that, I promise you, it's a magical feeling. Doing your first bitcoin transaction, doing your first lightning transaction. I think most of us can remember our first bitcoin and our first lightning transaction, so definitely get out there and give it a go, if you haven't already. We do have some regular webinars that we're running, so make sure you get on with our swan email list and you'll find out about those because we're hosting some webinars ",timestamp:"02:01:53-02:07:04",topics:["Bitcoin volatility","pricing"],type:"twitter_space",weight:4.822762489318848},{boost:0,date:null,description:"Is there a minimum withdrawal amount in Tweetoshi?",episode_title:"Café ₿: Bitcoin News & Using Bitcoin w/ Twitter, @tweetoshiapp",guests:[{name:"@TweetoshiApp",profile_picture:"https://pbs.twimg.com/profile_images/1532819967133028352/frxdtSHX_400x400.jpg",ref_id:"97e59475-beaf-44fe-b1b0-ea2a63d335b6",twitter_handle:"TweetoshiApp"}],hosts:[{name:"@alexstanczyk",profile_picture:"https://pbs.twimg.com/profile_images/1539055022364708864/rwErK6x1_400x400.jpg",ref_id:"6455df34-1abc-4ce8-9bb8-b02d411accec",twitter_handle:"alexstanczyk"},{name:"@pacificbitcoin",profile_picture:"https://pbs.twimg.com/profile_images/1570140686753619970/UFEnzSv5_400x400.jpg",ref_id:"f8268a26-9761-40c1-bdd6-dad9db44d032",twitter_handle:"pacificbitcoin"},{name:"@SwanBitcoin",profile_picture:"https://pbs.twimg.com/profile_images/1491428856858914820/aFlitvha_400x400.jpg",ref_id:"da3f56bf-9763-4389-a9ec-d807049bd0b8",twitter_handle:"SwanBitcoin"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/239722cb-4216-414a-a17b-5adf9d52e15a.jpg",keyword:!0,link:"https://stakwork-uploads.s3.amazonaws.com/uploads/customers/2707/media_to_local/25fad353-f7a7-43cb-9197-beef1e783983/e2ec31c3-43e5-4e81-af3a-b153b8c219ca.mp3",node_type:"clip",pub_key:"",ref_id:"fc9b5e45-fc94-42dd-a722-bde164f8c24b",show_title:"Swan.com",text:"a maximum is there a minimum limit in terms of what you can withdraw or can you withdraw like a single satoshi? Yes, for now there is like a super small minimum limit of 100 satoshi. We would like to get it down to one satoshi in the future, just like for the for the, like, let's say a meme. So we can withdraw literally anything, but for now, there is 100 satoshi limit. Cool, thanks. Would one satoshi even be possible? Because you still have to pay the unchanged transaction fee. Now you can withdraw one satoshi from Thunder Games, for example. So it's possible. Yeah, but what does that mean? Are they paying the transaction fee? I'm assuming that there is no routing fee for that small of the transfer. Like if you're doing one satoshi from Thunders custodial wallet to Moon or to whatever, they have it set up in such a way that it works. Either they eat the fee or their channel is set to zero fee. Because if your channel is set to zero fee, it's lighting ",timestamp:"01:52:34-01:53:48",topics:["Tweetoshi App"],type:"twitter_space",weight:4.8130316734313965},{boost:0,date:1599305976,description:"How US debt affects the economy ",episode_title:"Borrowing - where is the money going? Corporate, Small Business, Government",guests:[],hosts:[],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/abd94520-1490-42aa-b349-9e861494a654.jpg",keyword:!0,link:"https://anchor.fm/s/138410f8/podcast/play/19113751/https%253A%252F%252Fd3ctxlq1ktw2nl.cloudfront.net%252Fstaging%252F2020-09-05%252Ff840233e9317a45e95724ebf5de7e057.m4a",node_type:"clip",pub_key:"",ref_id:"e97927cd-526b-46ef-bde2-7e60339fd4a5",show_title:"Economy Guy",text:"small businesses doing regarding borrowing money? Well, they go to a bank and they borrow money. And typically the bank, they go to an SBA bank. That's a Small Business Administration bank. That's a bank that does Small Business Administration loans. So what is one of those loans? Sounds interesting. What is that loan? Well, the SBA, the Small Business Administration, which is a government agency, guarantees someplace between 50% and 85% of that loan. In case of default, the government will back it. So that reduces that much risk of the loan to the bank that's doing the borrowing. So that really lowers the risk to the bank. That's pretty good for the bank, right? In spite of that, the SBA banks are not lending right now. You say what? Huh? Why? Well, you see, the SBA banks are going back to the Small Business Administration and saying, hey, you know, that amount that you guarantee, we'd like you to increase it to 90%, even 100%. Splendid. Fully guaranteed. So you see, the banks don't want to take any risk or truly minimal risk. That's where they're coming from. Now, do we have a measure of how much? When I say SBA lending is stopped because small businesses is the heart of the US economy. Small businesses are the things that create employment, big employment. Most people work for small businesses, not the big corporations. So encouraging small businesses to borrow money and then using it as a good loan and creating jobs, creating profit, creating their own business, growing their own business is a good thing for the US. I mean that would create a boom in the US GDP. But the lending has basically stopped. And I have one measure of a group of banks. So it's not all lending, but a group of banks. Their measure is that since April of this year, 99% of the loans have stopped. Only 1% of loans equivalent to the last year have gone through 99%. That's effectively all lending to small businesses have stopped. And why? How big are the loans? I mean, the loans we're talking about are 5 million to $10 million, no more than 5 million. SBA loan can't be more than $5 million, but the Cares Act increased it to 10 million. Well, that didn't mean anything because nobody's lending money. So who Cares Act did not affect anything. What are the banks doing? They don't want to have any risk. What they're saying is to companies that are surviving through this pandemic, they're saying, well, I don't know if you're going to make it when we recover. I mean, you may only be growing because of the pandemic. When you may be gone, your bone could be bad. And they're saying to the people who are really hurting that need their money, we don't know if you're going to make it when the pandemic is done because you may run out of money before it's done. So in both cases, a good company and a bad company is not lending because it's all about risk. That's kind of interesting when it comes to small businesses. And the result there is without lending in that particular sector, we're not going to have a fast recovery or as fast as possible. So one thing for you, the listener, to listen watch for is lending to small businesses. Is there something that could happen in the future that you will hear in the news that is freeing up money? If so, that will be good for the economy. If not, it's going to be a slow growth. And now for the last area who are borrowing money? That's the government or the US. Treasury. In the case of the United States, people who are lending money are throwing money at the US Treasury. That's big bucks. The big bucks are going to the US Treasury. That's where the money is ending up. And how big is big? Well, this calendar year for 2020, the big bucks, it looks like the US Treasury is going to borrow about $5.4 trillion. That's so big, it's unimaginable. How big? In the good old days, when we were borrowing too much, it was $1 trillion a year. This year it's going to be $5.4 trillion. That puts it into perspective. Horrible, horrible, horrible. And that doesn't count if there's a new stimulus package passed by Congress this year, which I doubt will happen, my personal opinion is that Congress is at loggerheads. The two parties aren't about to agree on anything since we're so close to an election. So I don't think a new stimulus package would happen. But if it did, it would be even more borrowing. That's as simple as that. We don't have the money. Otherwise. The only way to get it is to borrow it. So the US government is the perfect example of bad borrowing. They borrow money. It is not productive. It does not pay back anything. They're not building roads and bridges that can pay back the money or contribute to productivity or all those good things that you can do with money. No. So what happens with all of the debt, which incidentally, is going to be 100% of GDP this year? That's supposed to be a magic number. It shouldn't happen. It should cause comets to fall out of the sky or something. But that's what's happening to the US economy this year. It's massive debt. But what happens every year as they bring in taxes? Where does the money go? Well, part of that money goes to paying the interest on the debt. And the bigger the debt, the bigger the interest. Now, that interest is not productive. It just goes to pay back the people who lent the money. It's not going to building roads or building factories or buying things that are important to buy. It's not helping the economy one little bit. So I say to you, ignore that. It's not good US Treasury, even though that's where the money is being thrown, it's not good debt. So there is my positive message for the day. I hope you liked it. That's where we stand. Corporate debt is they're in good shape. They have too much money. They don't know what they're going to do with it. They'll probably do something foolish with it. They have in the past. Small businesses can't get a loan so we can't grow. Because of that, the treasury has more money than they can use. Anytime they want money, they just say, please give me, and people give me it. So that's happening. That's the world of debt in the United States today. That'll change, of course. But be aware that all of those are not good things for our future and are not rosy rosie, I'm sorry to say that I do want some a lot more Rosies. So ",timestamp:"00:12:05-00:19:41",topics:["US debt"],type:"podcast",weight:4.810045599937439},{boost:0,date:1673549347,description:"How different people use different methods to safekeep their assets",episode_title:"BR019 - Proof of Keys Day Twitter Space ft. Lopp, Craig Raw, Lazy Ninja, mshodl, Rijndael & guests",guests:[],hosts:[{name:" Jameson Lopp",profile_picture:"https://pbs.twimg.com/profile_images/1594137153625276416/t1RUP3yP_400x400.jpg",ref_id:"062ec6c8-0fa2-4bf6-9aa1-7ab347df2530",twitter_handle:"lopp"},{name:" Craig Raw",profile_picture:"https://pbs.twimg.com/profile_images/1362841242665631745/UtA3FBQU_400x400.jpg",ref_id:"f2d1f5f0-2e1c-4d16-937d-4d48627cb955",twitter_handle:"craigraw"},{name:" Lazy Ninja and Rijndael",profile_picture:"https://pbs.twimg.com/profile_images/1362843002318721028/PNKWuu0-_400x400.jpg",ref_id:"23edbd50-9b0b-4e9a-aa56-57c2af074173",twitter_handle:"FreedomIsntSafe"},{name:"Justine Harper",profile_picture:"https://pbs.twimg.com/profile_images/1559710083734540289/HXTH4kqO_400x400.jpg",ref_id:"7b5a8957-1c4b-474f-bc38-291b382a13e6",twitter_handle:"mshodl"},{name:" Dee",profile_picture:"https://pbs.twimg.com/profile_images/1600155411868434433/9k1KQ8i5_400x400.jpg",ref_id:"ad33288b-28d4-4f15-9492-f64bce891613",twitter_handle:"HodlDee"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/f1879df9-9bc6-4a76-951f-24548da768ef.jpg",keyword:!0,link:"https://anchor.fm/s/9500fad8/podcast/play/63399670/https%253A%252F%252Fd3ctxlq1ktw2nl.cloudfront.net%252Fstaging%252F2023-0-12%252F0a789f60-2c9a-6bbb-945a-79f3dd937cee.mp3",node_type:"clip",pub_key:"032d7609ff3f4a5232e4d60967971e23bc671dfb68020845a59bab5dc1f3b93b87",ref_id:"08600eb8-a8b1-4be4-b505-3adc409da2f8",show_title:"Bitcoin.Review Podcast with NVK & Guests",text:"holes, but just before I go there, I just kind of like want to recap. So I think we all agree that different people, different needs, different solutions. Even the same people might need different solutions, right? You want your spending wallet, you want your lightning wallet, you want maybe a warm wallet. I think we all agree that keys should never be on a computer or touch a computer. I think we all agree that harder wallets work great. I think we all agree that multisig solves a lot of problems. We don't all agree that single SIG plus passphrase is great, but we do have some agreement on where the faults lie. We can recap that if you guys want to pick at anything I said, so don't feel like I am putting your foot down here. So I guess the main thing is that I want people to take out of this sort of like, simpler, more new part of the conversation is don't get overwhelmed with solutions out there. You have time, you can test things, you can experiment with different services, you can experiment with different wallets. Most of the solutions are free. And then if you want to get into harder wallets and you can even build your own solutions out there, I think it's important that people don't roll their own solutions, especially not their own cryptography. I don't think that's a concern anymore, but it used to be back in the day, and then sort of like we can start getting to the weeds of some of the FUD that confuses people around different solutions and go from there. Do you guys have any sort of like short comments about the previous sort of like noob conversation that you want to before we move on? Yeah, I mean, like, we said it earlier, but just to really drive it home. If you got $50 or $100 on coinbase or Gemini, just go install moon wallet or blue wallet on your phone and get it off and start playing with it. Like, you don't have to go straight to seed plate buried behind the third oak tree. If you've got $50 on coinbase, you can really start small. So you just said it, but it's worth saying over and over and over again. I mean, that question does come up every single time I do spaces somewhere or back in the clubhouse thing. It's amazing to me how much people don't understand that they don't need to do like twelve out of twelve DVDs for $100 worth of Bitcoin. And that is how you should be experimenting with Bitcoin. Don't go buy an asset with all your life savings until you understand how the heck that asset works. Well, a lot of people I've heard the same thing, like clubhouse or friends will say, well, I only have $100 worth of Bitcoin. I don't really want to go buy this hardware wallet. That's a certain amount of money. It seems kind of crazy for the amount. It's like, well, you don't have to. There's free mobile wallets. That could be your first step. So I think the biggest takeaway from this space is it's not all or nothing. Like take the steps and we're kind of walking through the steps specifically. But you don't have to spend money on an assigning device or hardware wallet. You can just download a mobile wallet. That's the first step. And then even when you start getting more sophisticated, you also don't have to have one wallet, right? I have Blue wallet on my phone. I also have several multi six set up, right? And you can think about partitioning your money where you have a really small bucket of money that's super easy to get to and very easy to spend. And then you have a bigger bucket of money that's harder to get to and harder to spend. And those things can change as your life does. Just like we're not walking around with our life saving in our pocket, right? We take what we need to spend when we go get coffee or whatnot and the other is secured somewhere. So, yeah, the multiple wallets, depending on your needs is totally good. You know it's a segregation, right? It's like hygiene in that sense. You're going to have your savings account, you're going to have your checking account, you're going to have your credit card. You do segregate fiat in all these buckets in your life, right? So why not do the same with Bitcoin? You don't want to be buying coffee of all your wealth. I think there is something interesting to be said about diversity and how to apply diversity from a security mindset. For example, one really common trope that we see is people coming to us who they have, for their safety, diversified their funds across five or ten different wallets. And some of these may be self custody, some may be custodians, but their whole idea is don't put all of your eggs in one basket. And my push back against that is that yes, that type of diversity does of course reduce the chance that a single catastrophe will completely wipe you out and cause you to lose everything. But it can also be increasing the chance that you will have a partial loss in one or more of those setups will fail. So one interesting aspect of multisig is that the diversity that you can add to the setup by having keys on different hardware manufacturer devices in different physical locations and basically different security properties around each of the keys in that setup is that that security is actually additive. It creates a stronger and stronger setup because it's essentially eliminating these single points of failure. If an attacker, for example, compromises supply chain of popular hardware manufacturer. If your multisig setup is not using all the same hardware manufacturer, you're protected from that. That's just one example. So, point being, diversity can be good, but applied the wrong way, it can actually be harmful. It's kind of fascinating and it really goes to show like why there is no sort of fix all solution. Each set up is going to have different sets of trade offs. And the complexity also does increase some issues there too. So you could argue on one side, it's like you want to have some diversity in your harder wallets because if one vendor is evil or really like, realistically speaking, it's going to be a targeted attack against you that it's going to maybe replace Harder or something like that. You could be fault to that, but at the same time you could have multiple Harder Wallets and say, the software update on some of them break the multisig setup, it's unlikely to have full loss of funds, but it could be quite the issue to sort of go back to you being functional. And then each vendor is going to offer sort of like different thresholds and some vendors out there offer simply either no security or illusion of security or like really crappy hardware. There's like hundreds of hardware wallets. I'd say probably out of 195 of them are absolute garbage and should never be used. And the guys from Ledger actually do a great job breaking Harder Wallets. You should check out their Don John blog where they have broken Harder Wallets and how long it takes to break them and how much money does it cost to break them. There's Harder Wallets that cost like $10 to break. There's Harder Wallets that cost half a million dollars to break. Not all things are equal just because they're the same category. So I guess this is a good segue to move to more sort of like rabbit holes of security and things of sorts. So why don't I bring up maybe lazy ninja who is a security researcher for hardware. He has helped us find problems. We have a good guy as well. He's a fantastic security researcher here too. We have what else do we have here that is of the category for the beginner stuff? While we're on the topic, I know Sparrow has a great thing called Master Fingerprint ID. You know, we as well have something called Master Fingerprint ID that you can check on the cold card itself. So if you're you know, you're dealing with a single SIG wallet and you know, you don't know if in your if you're in your passphrase wallet or you're in your BIP 85 wallet or whatever you want, you can go to Advanced Tools and go to View Identity and then it will give you a string of eight letters and numbers. And that's basically the first four bytes of your public key. So it's just a great way to know. It's kind of like a username or something like that, right? It's just a way to identify what wallet you're in without having to try and sign a transaction and get that error. So it's just a good thing for beginners to know about and I find it very useful. Thanks. Dee. I think we're going to be attacking a lot of those little issues. Justine and Jameson, thank you so much for joining me. Like, I love if you guys stay, but if anybody needs to go, totally. I don't want to take up your time, but you guys have a lot of knowledge to push out, so please do stay if you can. And with the first part of the space is gone. Let's improvise on the second part, which I think will be really cool to sort of talk about some of the fun around solutions and some of the ways the products in the market do address them. Hopefully, we can clear a few of those, because that's, in my view, one of the things that keep people from using good solutions is just this fear of the nearly impossible attacks, or actually attacks that are completely alive. So why don't we start with can ",timestamp:"01:09:32-01:19:34",topics:["Hardware wallet","multiple crypto wallet"],type:"podcast",weight:21.998553860382764},{boost:0,date:1665687900,description:"Small Towns Only Have Terrible Food Choices - Socioeconomic Problem? It’s A Govt Subsidy Problem - Flipped Food Pyramid ",episode_title:"#1104 Dr. Philip Ovadia - Heart Surgeon Explains What To Eat To Save Your Life",guests:[],hosts:[],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/7934bd86-9344-4f1a-9c36-ea5f63ae418e.jpg",keyword:!0,link:"https://anchor.fm/s/b4841110/podcast/play/58963723/https%253A%252F%252Fd3ctxlq1ktw2nl.cloudfront.net%252Fstaging%252F2022-9-12%252F290744275-44100-2-e4f30b61276f1.mp3",node_type:"clip",pub_key:"032ff32727b06d20a13a0a8d8dfe09d39659c16deeaffbf94d6d21ec6bb28850b6",ref_id:"50cf9922-5d13-4a4b-8621-e934b422aebf",show_title:"The Pomp Podcast",text:"town in North Carolina my wife and I were driving through at one point, and it's kind of one of these streets where there's three, four, five stop lights, but it's a one way or a kind of straight shot that you can look down. And for whatever reason, I said to her, oh, my God, look at all the signs. And it was Wendy's McDonald's. Bojangles chickfila. It was just like all of it, right? And it was almost like a shot you would see on the Internet that kind of goes by when we were like, wow, America is so stupid. And as we looked, what I think shocked me was in that small town, I don't know if you could have an average salary and eat healthy, right? Because everything that was thrown in your face was cheap and unhealthy. And so how much of the obesity epidemic or kind of the rise in the unhealthy American is a socioeconomic and like a poverty problem or a money problem versus people have the money to go and eat healthy. It's just they aren't educated or they're lazy, and they don't want to do the work to actually do that. Yeah. So I do think that both play into it. When you look at why is processed food so inexpensive? You start to look at government incentives around the crops that get subsidized versus why aren't those subsidies going to the ranchers who are raising cattle? So you have to ask, why is that food the inexpensive food? I mean, the reality is it doesn't need to be that way. We could very easily shift what becomes the inexpensive food for people. And then there certainly is the educational piece of it. And quite frankly, we start to get into the miss educational piece of this because, you know, the predominant messaging around healthy food here in the United States for the past 50 years has been the food pyramid. That whole grains are the healthiest thing you should be eating and cereals and wheat and all of this. That's insane. That is literally insane. We have more than enough evidence at this point to know that that shouldn't be the case. The food pyramid should essentially be flipped upside down. So then you start asking those questions because it's like, okay, not only have we gotten this wrong, but we got it so wrong that it almost has to be intentional. You can't mess things up this badly without there being some intentionality to it. Okay, so ",timestamp:"00:12:30-00:15:19",topics:["Small Towns","Socioeconomic Problem","Govt Subsidy Problem","Flipped Food Pyramid"],type:"podcast",weight:4.9863560048368285},{boost:0,date:1676681753,description:"The possible applications of Cashu Chaumian Ecash",episode_title:"WHY ARE WE BULLISH? Ant, Bitcoin Island, Decentra Suze ep324",guests:[{name:"Decentra Suze",profile_picture:"https://pbs.twimg.com/profile_images/1614189317345214464/Z4BZBBbb_400x400.jpg",ref_id:"da307464-4ac8-449a-81f0-74ea9749dd1b",twitter_handle:"DecentraSuze"},{name:"Ant",profile_picture:"https://pbs.twimg.com/profile_images/1617275233831886853/RlWpn1qQ_400x400.jpg",ref_id:"9575e6e8-cd06-48f0-b548-801f7d2357a5",twitter_handle:"2140data"},{name:"Bitcoin Island",profile_picture:"",ref_id:"9b88c77a-65c9-4ae6-a30c-890937636d7f",twitter_handle:"BitcoinIslandPH"}],hosts:[{name:"Ben Perrin",profile_picture:"https://pbs.twimg.com/profile_images/1181715113226596352/ipGVEcYH_400x400.jpg",ref_id:"e6b013ef-178b-4b41-95ee-423148a3dc3a",twitter_handle:"profbenperrin"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/419512c2-e309-4b25-bfe2-cd481d53f66d.jpg",keyword:!0,link:"https://anchor.fm/s/11e95d20/podcast/play/65227742/https%253A%252F%252Fd3ctxlq1ktw2nl.cloudfront.net%252Fstaging%252F2023-1-18%252F313420179-44100-2-8fb4b50d66df8.mp3",node_type:"clip",pub_key:"02545c14cbb18a61f20dd45f5e3dcbd9acae3de282369501040adce32a75311309",ref_id:"784b1ee8-56e7-403c-b813-24713fd3a29c",show_title:"BTC Sessions",text:"first of all, has anybody here either heard of or used Ecash via lightning? Bill, you have? I'll just ask, what has your experience been? I haven't been able to use it. I've only heard about it, but here on the island we have a fairly small community, like I said, 250 different businesses. And I'd like to see them being able to save on chain through something like this. I've just not really understood it. I end up going to talk to people and show them how to save bond chain and I think they understand it. I need to go back and check on them in a month to make sure. But if there was an Uncle Jim on the island so they could be self sufficient on this and know that they're saving, that would be a pretty great solution. Yeah, I love the kind of in between again, helping people like Uncle Jimming for somebody when you know, and it doesn't even have to be a permanent thing, but being like an interim Uncle Jim for people and helping them along their Bitcoin journey, I think that's a valuable thing to provide. And then some people will move beyond that and move into self custody for themselves and then other people that maybe that ends up being their last stop along the journey. But at least it's better than just full leave your money with a single entity that you then have to trust. At least you can kind of remove single points of failure with a mechanism like this. And I'm curious, your thoughts on this stuff. Are you for are you for it? Do you have reservations about it? What are you thinking? Thanks. Yeah. I believe that you should have an adversarial stance in all things in Bitcoin, everything that comes up until you fully understand it and then maybe try to understand it even more. Right now I really like it a lot from what I've read, and I don't fully understand it as well as I can, as well as I should or could right now. But it is exciting. I think that I'm from Texas. There's a lot of farms around here and like small communities and that's where I see a lot of potential here for something like this, where people don't really think about it a lot. But in small, like little ranching communities, they all know each other, but their access to the legacy financial system, it can be difficult or even nonexistent sometimes, or even predatory in some ways. And seeing something like this, the right platform with the right user experience, I think could be really major for the local ranching communities and just other communities small around the world, obviously. But that's what I think right now. Close to home. Yeah, absolutely. And I'll jump to susie as well. Again, I don't know your experience with this kind of stuff, but just from kind of seeing that there, do you have initial impressions? Where are you at with this kind of stuff? The first thing that popped into my mind was whether or not it would be able to give you some non. KYC Bitcoin oh, yeah, you could easily be able to clean it up. Yeah, you could easily be able to clean it. I mean, you could have peer to peer markets with this type of stuff. Very simply, again, there's a lot of already kind of peer to peer non KYC solutions to be able to buy bitcoin. Like I mentioned, hoddle Hall off the top of the show, but there's robo sas, there's bisc, there's even just like obviously directly in person. But you could easily integrate like a chow mein ecache version or have that as an option on one of those markets and be able to exchange whatever other value for Chow me and Ecash SATS or Lightning or on Chain or whatever else people want. But yeah, obviously the interface right now is not going to be the simplest for people, but I just saw the old mate, ",timestamp:"00:16:30-00:21:14",topics:["Cashu","Chaumian Ecash"],type:"podcast",weight:42.912927374554435},{boost:0,date:1664323200,description:"Beacon for community of bitcoiners & benefits for ermployees",episode_title:"TRUBIT bringing Digital Loyalty Assets to Bitcoin - Voltage Twitter Spaces",guests:[{name:"@0xLinden",profile_picture:"https://pbs.twimg.com/profile_images/1439365331202437125/JBiXogun_400x400.jpg",ref_id:"b8bb4402-8f86-4220-9dee-0fa28ff8de72",twitter_handle:"0xLinden"},{name:"Stephen Doge",profile_picture:"https://pbs.twimg.com/profile_images/1215979900387184641/nZXkhgoP_400x400.jpg",ref_id:"076972a2-cdab-4766-8c66-618472b80772",twitter_handle:"StephenDodge20"},{name:"@617a7a",profile_picture:"https://pbs.twimg.com/profile_images/1548336437308715016/FUZFJf9k_400x400.jpg",ref_id:"148d77a5-6e95-4855-9e17-19e68f648898",twitter_handle:"617a7a"},{name:"@ian__major",profile_picture:"https://pbs.twimg.com/profile_images/1427414299169984517/Hw0ux6ie_400x400.jpg",ref_id:"7ed41a74-21a4-43a4-9a05-e977c981b6d3",twitter_handle:"ian__major"}],hosts:[{name:"@voltage_cloud",profile_picture:"https://pbs.twimg.com/profile_images/1508657900486422529/Lfa70poj_400x400.png",ref_id:"3b622187-60ce-43c2-a21f-ae749c2d961a",twitter_handle:"voltage_cloud"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/2ec62250-4755-4616-8342-096a2cfab95f.jpg",keyword:!0,link:"https://www.youtube.com/watch?v=1Cn7F1Oo_6Q",node_type:"clip",pub_key:"03c7a7f42d94fdfc7a655515c1421cd1d20db090a1c24150201de0b1dc6a30b0ee",ref_id:"f10270d7-1cdc-4922-853a-1f8247750382",show_title:"Voltage",text:"Bitcoin meetups are big. But even just acknowledging that there's a lot of crypto ones and blockchain ones, and if we can kind of just show that, hey, these brands are seeing these kind of groups come to them and host events or do things at their locations that's just, again, another selling point for them. Like, hey, this is growing. Hey, this is not a fad, it's not going away. You should probably start doing something to kind of cater to again this consumer segment that's growing and you're now actively engaging with, we plan to do more of that. Yeah, I think that's one of the things that has me most excited about what you guys are offering is giving the community something to use to expand. By landing a business, you've provided a beacon for the community of Bitcoin to support them and now that business is like, okay, I see there's an asset and the rewards are a thing. It's getting some interest. Oh, I guess there's a network where I can actually transact on and then layer three, if you will, right. The community of people and how it's expanding or what kind of people it's bringing into the business. I think you get a lot of compounding effects there. So, yeah, just super excited for it. And it's kind of funny too. Just like one quick note on that. We've kind of seen a little bit and kind of didn't mean to discover it, but talking with brands was even just not only from the consumer perspective, but employees like benefits to the employees themselves for small mom and pop mid size bigger. But that's actually a pretty attractive offer for brands to attract employees and reward them. I'm sure many people are aware of internal rewards programs for doing certain things or hitting certain milestones, stuff like that, but it is kind of something we have more recently heard and seen from things as far as just employee benefits, health benefits, things like that. So kind of something we're keeping a tabs on. ",timestamp:"00:41:08-00:43:30",topics:["bitcoiner community"],type:"youtube",weight:4.831891866310001},{boost:0,date:null,description:"How to store your Bitcoin",episode_title:"Café ₿: #Bitcoin Beginner Q&A",guests:[{name:"Peter",profile_picture:"https://pbs.twimg.com/profile_images/1581695667193643009/EljNY-TH_400x400.jpg",ref_id:"a3384925-e15e-421d-b9f9-6d44e273ed05",twitter_handle:"PeterAnsel9"},{name:"Stephan Livera",profile_picture:"https://pbs.twimg.com/profile_images/1362551718110580740/v-W5Q2uo_400x400.jpg",ref_id:"72f57157-c96e-4466-8bf1-290cfe1f8a0b",twitter_handle:"stephanlivera"},{name:"Thomas J Lake",profile_picture:"https://pbs.twimg.com/profile_images/1529168328534769670/5cl2Y_k-_400x400.jpg",ref_id:"21541a47-0601-447c-99c2-312d1a63c19f",twitter_handle:"thomaslake"},{name:"Goodguy",profile_picture:"https://pbs.twimg.com/profile_images/1363216959576285185/unulY4yd_400x400.jpg",ref_id:"0c3fec75-9cc2-4c0f-8dbe-db7fae2b585b",twitter_handle:"goodguybiker"}],hosts:[{name:"Brady Swenson",profile_picture:"https://pbs.twimg.com/profile_images/1502564606836981763/fmqtNrNc_400x400.jpg",ref_id:"49966553-d55b-44c9-94ec-8fee09eee5c2",twitter_handle:"CitizenBitcoin"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/239722cb-4216-414a-a17b-5adf9d52e15a.jpg",keyword:!0,link:"https://stakwork-uploads.s3.amazonaws.com/uploads/customers/2707/media_to_local/35b20273-49f2-45ea-a9f4-dc479d86573c/7ae5315f-beb2-41e2-b672-65dd1f102017.mp3",node_type:"clip",pub_key:"",ref_id:"6faac813-7f72-4208-a6ea-a8f330da5d1e",show_title:"Swan.com",text:"one other thing real quick. The documentation that Sparrow has, in particular with Cold card, this is again from a boomer perspective, it is super easy to follow and it's almost conversational and step by step. And it was really easy for me to follow the Sparrow documentation when it came to integrating it with the Cold cart and spinning up the Cold card. Super easy. Can I make one small fun fact addition to this? You're not storing your Bitcoin in your hardware wallet. Your Bitcoin are safely stored in every copy of the blockchain everywhere in the world. I've got a couple of backups for you over here. What you're able to store is the private keys that nobody can recreate, that allow only the holder of the private key to spend the Bitcoin according to its rules. And what makes this kind of unique versus any other form of property that ever existed before is not only can you take custody of it, but you can back it up. So, like, if you were a gold investor and you took custody of some gold, you'd have to put it in some location. And if that location became inaccessible to you, you can't get at that gold. And it can only be in one location. You can put half of it one place half the other, but you lose half of it if that location disappears. The fact that you can back up your keys because they're just information means that you can have this self custody asset that's yours. It's not the banks, it's yours. And if you lose access to one location, you can recover it from another location or multiple locations. And that's one of the most extraordinary aspects of Bitcoin, and it's a fun fact. So I thought I'd add it because it's related to this question. Now that you're working on taking self custody, the beauty of it is you can back it up. You want to make sure nobody else gets their hands on any of your backups, but that's something you'll figure out what works best for you over time. ",timestamp:"01:20:45-01:22:43",topics:["Bitcoin hardware wallet","Bitcoin self-custody"],type:"twitter_space",weight:4.755598068237305},{boost:0,date:1671084129,description:"A quick reminder and some news on the Bitcoin Beach Show with DJSatoshi",episode_title:"The Orange Sun 🌞 Does Price = Value? #Bitcoin",guests:[{name:"ToxiKat27",profile_picture:"https://pbs.twimg.com/profile_images/1505791887415730177/d0YDQ3Xc_400x400.jpg",ref_id:"50023cce-8a6f-4974-ad3b-fd7a9c0abf19",twitter_handle:"ToxiKat27"},{name:"AnuragSaikia",profile_picture:"https://pbs.twimg.com/profile_images/1016367353762852864/gDL5h8jh_400x400.jpg",ref_id:"0bb60736-56c5-4964-a9c3-e881b0b313b6",twitter_handle:"AnuragSaikia"},{name:"fnicencool",profile_picture:"https://pbs.twimg.com/profile_images/1600143435775856641/uqgmtT23_400x400.jpg",ref_id:"bfef6a55-2d08-407e-b147-e04d68af7dd6",twitter_handle:"fnicencool"},{name:"MrlamilamiKosch",profile_picture:"https://pbs.twimg.com/profile_images/1538403135101800450/sO-RPI9U_400x400.jpg",ref_id:"f8c8f97a-f79a-4950-8e3d-d2e94d27b3c8",twitter_handle:"MrlamilamiKosch"}],hosts:[{name:"SatoshisJournal",profile_picture:"https://pbs.twimg.com/profile_images/1518661993103859712/y_QefqVZ_400x400.jpg",ref_id:"63fac069-bfe9-49ae-b52c-1d1f226b3275",twitter_handle:"SatoshisJournal"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/9b2e17f2-71c5-4f1e-a3e7-720d06dab810.jpg",keyword:!0,link:"https://stakwork-uploads.s3.amazonaws.com/uploads/customers/2707/media_to_local/19874ad0-9c3f-451c-b82d-ac41de6aa3a3/62af50e6-2127-4e0d-804c-a3cec392fd0b.mp3",node_type:"clip",pub_key:"03eb026c3e6597055595e42299377a4e164982775cc67f1d2135d9f1cd3a89f526",ref_id:"1aec7881-31ab-4c1c-9f79-800cb8379ca1",show_title:"Satoshi’s Journal",text:"Okay. The next so I just remind you guys of the bitcoin beat show that Phil, my teammate and DJ satoshi have monday through Friday at 03:00 p.m., which is 03:00 p.m. Mountain standard time. And that would be 10:00 P.m. African time. And the intent of this show is pretty fun, actually. They play some bitcoin music, literally bitcoin music. There's some awesome bitcoin music artists that have done raps and parodies and just cool songs and they all revolve around bitcoin. So today, Phil actually had a lady come on, what was her name? Tips in the ships from music. She was awesome. She came on the show and she was talking to us and then we listened to her music, her bitcoin music. So if you guys remember, monday through Friday, 03:00 p.m. Mountain standard, 10:00 p.m. Nigerian time, you can go and listen to music. And then also, what's cool about the show is it's very random. Like you don't know what you're going to listen to because basically Phil will randomly choose small snippets of bitcoin education, whether that is from Andreas Antonopoulos, Robert Breedlove, Marty Benz, you name it. You'll hear something and it'll be so random and it will catch you by surprise, but it's really cool because you just get to hear Andrea Santanopolis in 2012 or whenever it was just talking to people about bitcoin or Robert Briel, a little snippet of him talking about whatever he talked about in his podcast about bitcoin. So, yeah, you guys can check it out. Today was a pretty cool show. I think today was the third day of the show. So he'll have it Monday through Friday and it lasts. I think he's going to run it for an hour. But today's session went for like freaking oh, jeez, almost 4 hours. 3 hours and 43 minutes. But they had a good time. There was a lot of people that came in and we're talking. I saw yellow on there, I saw Tomer, I saw the Kingo, I saw Oakland, and it was pretty cool. They had a good time. ",timestamp:"00:51:49-00:54:24",topics:["Bitcoin Beach Show"],type:"twitter_space",weight:9.72359306380532},{boost:0,date:1639803600,description:"[[Bitcoin]] Shorted as a [[Hedge Fund]] Against [[Traditional Market Equity Positions]]",episode_title:"WHY ARE WE BULLISH Michael Schmidt Jeff Ross Joseph Brown Greg Foss ep224",guests:[{name:"Greg Foss",profile_picture:"https://pbs.twimg.com/profile_images/1552599670945464320/3OgqRHNo_400x400.jpg",ref_id:"853d9f80-f6cf-490f-9d1e-f29cdc6acc6f",twitter_handle:"FossGregfoss"},{name:"Jeff Ross",profile_picture:"https://pbs.twimg.com/profile_images/1475554600094552064/DSlPG1lx_400x400.jpg",ref_id:"ae6ee2a2-1cf7-41a0-8366-ff6e94a6403c",twitter_handle:"VailshireCap"},{name:"Joseph Brown",profile_picture:"",ref_id:"803206b6-7b9f-48e0-a5d5-7348f6842cca",twitter_handle:""},{name:"Michael Schmidt",profile_picture:"",ref_id:"e94a106d-cbea-4b30-b0cb-3825979179ca",twitter_handle:""}],hosts:[],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/728d91e9-025d-43a7-8467-2c8d264ddf59.jpg",keyword:!0,link:"https://anchor.fm/s/11e95d20/podcast/play/45019495/https%3A%2F%2Fd3ctxlq1ktw2nl.cloudfront.net%2Fstaging%2F2021-11-18%2Fe04d11e7-ede5-a987-e943-f3fc2482fe80.mp3",node_type:"clip",pub_key:"",ref_id:"46c0e9e5-6d49-4830-b405-6021fd365979",show_title:"BTC Sessions",text:"traditional equity markets are sick, okay? I need people to understand how sick the traditional equity markets are. Jeff Ross probably understands this better as well as anyone. The breadth or the average stock in the Nasdaq, the small cap Nasdaq stocks have given it up by 66%. Ok? This year, if you look at Jim Cramer's list of have to own stocks, they're like, it's a piece of garbage. And yet Bitcoin is hung in there in the face of futures product that all the knuckleheads in the world are shorting Bitcoin as a hedge against their equity positions. Okay? How do I know? Because I just know how much stupid money there is out there. And I know they need to short something because they're long all this other garbage that they say, Well, I can't sell my other garbage. So I might as well short something and pretend it's a hedge. Let me tell you something. Bitcoin is a long, volatility asset. And most of the fucking world has no clue what that even means. Except I'm going to tell you, it means if you are hedging short ball assets, which are equities and credit, high yield bonds, investment grade bonds, and you're hedging those short ball assets by selling along or shorting a long ball asset. You're inverted, buddy, and you're going to get crushed on the way in and crushed on the way out. And that's what the dumb money is doing in this market, because they are absolutely. They're hedged and wedged, okay? They're in a fucking shit trade, and they're trying to make that trade better by shorting something because there's an instrument out there called Bitcoin futures that they think is overpriced. They need to do some mathematics. They need to understand that they're shorting a rounding error. And by the way, they're also shorting a long ball asset. Over time, Bitcoin will become to be appreciated as insurance. And what is insurance? It's long volatility, it's short credit. The two things are exactly synonymous. So Seb, Bunny and I wrote an article that we submitted to Bitcoin magazine this week, and it's gotten some really good feedback on ",timestamp:"00:25:57-00:28:10",topics:["bitcoin","hedge fund","traditional market equity positions"],type:"podcast",weight:4.755598081860736},{boost:0,date:null,description:"Revenue stream source, business competition and model of the Bold Bitcoin credit card",episode_title:"Café ₿: Bitcoin Credit Card w/ @BoldBitcoin @John_ely_21m",guests:[{name:"Cory Klippsten",profile_picture:"https://pbs.twimg.com/profile_images/1569687200857755648/fxiCeaqc_400x400.jpg",ref_id:"ddfb9b4c-4e6a-4f4c-a01b-e6bb1bc55464",twitter_handle:"coryklippsten"},{name:"Greg Foss",profile_picture:"https://pbs.twimg.com/profile_images/1552599670945464320/3OgqRHNo_400x400.jpg",ref_id:"853d9f80-f6cf-490f-9d1e-f29cdc6acc6f",twitter_handle:"FossGregfoss"},{name:"Wicked",profile_picture:"",ref_id:"fee44016-b05f-4961-a6d8-7dac655cd931",twitter_handle:""},{name:"@BoldBitcoin",profile_picture:"https://pbs.twimg.com/profile_images/1559592705231044609/iJrNKxF9_400x400.png",ref_id:"dd4e1c4c-d111-4f01-ad95-18200d50cdb8",twitter_handle:"BoldBitcoin"},{name:"@John_ely_21m",profile_picture:"https://pbs.twimg.com/profile_images/1560444673046585346/VN8n2LtM_400x400.jpg",ref_id:"a24436b1-5992-4711-a4a5-0770546ea80a",twitter_handle:"John_Ely_21m"}],hosts:[{name:"Alex Stanczyk",profile_picture:"https://pbs.twimg.com/profile_images/1539055022364708864/rwErK6x1_400x400.jpg",ref_id:"3126e2a3-bbe4-456b-b298-9714085fa286",twitter_handle:"alexstanczyk"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/239722cb-4216-414a-a17b-5adf9d52e15a.jpg",keyword:!0,link:"https://stakwork-uploads.s3.amazonaws.com/uploads/customers/2707/media_to_local/7061be6d-b144-4a81-a13b-3d125e3e2812/edf29ab4-2b4b-4fdf-9998-8a9b8e9437c8.mp3",node_type:"clip",pub_key:"02574d6e8e787372184b6f17c40d6c6fe1777db9015801f95dfd24692784d767cd",ref_id:"3b4b6a17-9995-4f90-88d0-15cfd0b53be6",show_title:"Swan.com",text:"I was wondering a couple of things. One, I may have missed it. I was wondering where your revenue streams are coming from in this process and also who you see as your competition in this industry. Yeah, thanks. The business model is pretty simple. We're not lending out your bitcoin and trying to earn a yield on that stuff. Your bitcoin is sitting on the blockchain. So the way we make money is just like a regular credit card company. We make money on your purchases, the transaction fees that go through, we get a small percentage of the transaction fees. And then also, if you do choose to carry a balance month to month and there's interest accruing on that, then we would make money off of that. But if you do pay off your credit card statement every month, there's no interest and we're not making revenue that way. So, again, one of the things I love about this company is that they've got a vision for long term, and I think that that's sort of the business model that will get us there. So, quick follow up question. Are you going to set up a system or processes where it encourages people to pay off their balance monthly, or is that just something you're leaving up to the user? Right, yeah, I think it'll be similar to a typical credit card monthly statement with an option to pay in bitcoin or pay in US dollars. The idea is we want to encourage responsible use of credit and so we want people to pay off their balances and protect their bitcoin. So, yeah, it would be sort of a monthly statement sort of scenario. Hey, John, good to see you and thanks for coming to our party in Los Angeles. And quick shout out, Alex, to you and the whole swan team on that, the Pacific Bitcoin Conference. Honestly, best days of my life. Absolutely loved that you guys killed. It unbelievable that this was your first conference ever because that was to the T. It was so professional, so onto the topic here. John, my question for you. At what point do you margin call the client? So, let's say you have $10,000 worth of bitcoin, you spent three and a half thousand, and then the price of bitcoin drops. At what point do people have to post collateral to avoid their bitcoin being? Is that called rehypothecated or? I don't know. You know what I mean? Yeah, I know what you mean. Yeah, not rehypothecated, but yeah. When do you get a margin call? So, yeah, you've got a credit limit based on the value of your bitcoin, and if you get to 80% of your credit limit, you're going to start to get margin called. Again, we are coming up with any innovative ways we can to make sure that you keep as much of your bitcoin as you possibly can. But then, yes, we do have the ability to liquidate when you get over 100% of your credit limit, and obviously we're very upfront that the price of bitcoin can drop. So you have to be careful about your spending balances. And I appreciate the question, Anders, and yes, that party was off the hook. Thank you. Thank you. Actually, just there was one question I forgot to ask you. Like, so how long time would people have to replenish with new bitcoin all paid off with Fiat? Or is that basically what you're warning as you get near that 80% loan to value and then by the time it hits that you will take the collateral, which is totally understandable, just trying to understand the product. Yes, for sure. I mean, so we're still working at details, but you can expect to have something like a two day window to deposit your bitcoin to increase your collateral so that you're not underwater. And again, I don't have any specific details, but me and the guys, we're thinking up anyways we can to make sure that this doesn't happen. Right. Again, our business model is for you to save your bitcoin, spend Fiat dollars. So we're going to make sure you guys are happy and we don't want to take your bitcoin. Right? Thank you so much, John. Thank you, Anders. And looking forward to the party in Miami and straight. Thank you. Of course, we're going bigger and better all the time, for sure. ",timestamp:"01:42:54-01:48:38",topics:["Bold Bitcoin credit card"],type:"twitter_space",weight:4.754698872566223},{boost:0,date:1590465600,description:"What is the [[geopolitics sphere]] of Bitcoin?",episode_title:"Chat 39 - Bitcoin Renaissance - with Marty Bent John Vallis Alex Gladstein Elizabeth Prefontaine Brady Swenson",guests:[{name:"Alex Gladstein",profile_picture:"https://pbs.twimg.com/profile_images/1382371620669452292/VOPKOc8w_400x400.jpg",ref_id:"49445c1c-7c66-4b73-9eec-09a337befbec",twitter_handle:"gladstein"},{name:"Marty Bent",profile_picture:"https://pbs.twimg.com/profile_images/1362747135981199370/mSy97J12_400x400.jpg",ref_id:"655bdcb1-21c3-411c-aa24-fe7e4c7a248c",twitter_handle:"MartyBent"},{name:"John Vallis",profile_picture:"https://pbs.twimg.com/profile_images/1568743166035070976/4MyKww8A_400x400.jpg",ref_id:"c3a9fe29-3b78-4665-af54-e293e9d68962",twitter_handle:"johnkvallis"},{name:"& Brady Swenson",profile_picture:"",ref_id:"0b68a085-0680-44b8-891c-6e1e84ac4eb1",twitter_handle:""},{name:"Elizabeth Prefontaine",profile_picture:"https://pbs.twimg.com/profile_images/1382790711427354625/D09LMToL_400x400.jpg",ref_id:"4506df72-5de4-4144-abc4-011408b6b496",twitter_handle:"Eprefon"}],hosts:[],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/9e7e229f-2631-4542-b5d7-7fcd502798dc.jpg",keyword:!0,link:"https://traffic.megaphone.fm/CSN4002307424.mp3?updated=1627951379",node_type:"clip",pub_key:"",ref_id:"b241a91d-07ff-4169-9df8-16783be79ed1",show_title:"Bitcoin Audible",text:"The geopolitics also are really interesting because you would think that as we move forward let's say a decade, bitcoin continues to, I think, increase in value against fiat currencies governments are going to want to start to monopolize the mining businesses in their countries. It's just what they're going to try and do because they're going to have that power. Most of them, especially these dictatorships, have total monopoly over natural resources. So this will just inevitably contribute to this planetary decentralization because you're going to have all these different governments that don't agree with each other and are essentially in a cold conflict with each other, competing in a rivalry environment to mine so that they can get more bitcoin. And that could shake out where in 40 years from now, you have a very competitive framework of many different governments all sort of competing against each other. And that just kind of continues to build on bitcoin, censorship, resistance and uptime and strength. And it's just this brilliant way that I believe it will kind of unfold. It kind of takes our base worst flaws and somebody talking about with the. Rally bitcoin crew like a week ago or so. That when governments get involved. Like the more antagonistic governments are in trying to exert control over bitcoin. The stronger bitcoin becomes because you have more powerful invested interests that specifically want to either make sure they have the upper hand or make sure they have enough power to defend against the upper hand of someone else in order to play the game of the global value system. And I thought that was so crazy. Yeah, and there's going to be governments that have Manhattan Project style initiatives to get the cheapest energy possible. And who knows, a lot of it might be whether it's fission fusion, or if you just track the price of some of these renewable techs over the last 30 years, it's pretty expensive by the decade. So I agree with Marty. It's a very exciting part of bitcoin that I think will become more popular to discuss in the near future is the sort of energy geopolitics side of it. Yeah. Again, I don't know if Satoshi could receive this either, but luckily for us, like, the supply schedule so intensive in the beginning, that most bitcoins in the hands of individuals and corporations and state will be fighting over less and less bitcoin and have less economic yeah, that's. The crazy thing I always think about. They missed the boat. If governments had wanted to, they could have accumulated literally all the bitcoin and killed it early, but they didn't. And now you've got whatever it is. I think Nick Carter has some data on this, but some absurd percentage of bitcoin is not even held by regulated entities. It's in the hands of people. Some of them might be government officials or corporate leaders, but they're individually held and there's only so much more bitcoin to fight over. So there's like a couple of million bitcoin left to be mined and governments are going to fight really intensely over that remaining bitcoin. It's serious. So exciting. Marty, I love it when you recently been bringing people on to talk about this space and all the activity and following it very closely. Guys, go ahead. Again, the opportunity is massive. It's almost hard to fathom just here in North America, and it's such an easy sell. In practice, it may be harder because you got to sell people on bitcoin simultaneously. But just from an economics point of view, it seems like it would be an easy sell. It helps you meet your regulatory requirements. It reduces your cleanup cost, it subsidizes this and that. Has it been for you guys selling? Yeah, I mean, it's getting easier with the conditions of the market and the oil market specifically, people are sort of desperate to find alternative streams of revenue. Yeah, I think more people are coming around a bitcoin just naturally as it gets older. The natural gas sector, the stranded natural gas sector is really starting to come around to this. It's sort of different than what we're doing on the oil and gas fields. There's a lot of stranded natural gas reserves that are not being utilized at all that could really, with small minimal capital investments, could get bitcoin mining operations set up and start being turning into productive assets. Ever since we've sort of come publicly, we've had a bunch of people reach out to us. Guys, this is the last question, and I'm going to pose it to each of you, but I'm ",timestamp:"01:18:10-01:23:22",topics:["geopolitics sphere"],type:"podcast",weight:4.754698872566223},{boost:0,date:1675472948,description:"How Bitcoin empowers individuals",episode_title:"WHY ARE WE BULLISH? Mickey Koss, Nozomi Hayase, The Bitcoin Explorers ep320",guests:[{name:"Nozomi Hayase",profile_picture:"https://pbs.twimg.com/profile_images/1362950252823597060/i-UISQoY_400x400.jpg",ref_id:"f82d9145-3308-493d-aa13-1fc3e21b7dd4",twitter_handle:"nozomimagine"},{name:"The Bitcoin Explorers",profile_picture:"https://pbs.twimg.com/profile_images/1380933164596625408/vDK0Tf2r_400x400.jpg",ref_id:"a81905a1-3698-4c2d-b9d3-205e4b91a08f",twitter_handle:"BitcoinExplorer"},{name:"Mickey Koss",profile_picture:"https://abs.twimg.com/sticky/default_profile_images/default_profile_400x400.png",ref_id:"47e8b134-431a-40a8-8f56-21778cf6f927",twitter_handle:"MickeyKoss"}],hosts:[{name:"Ben Perrin",profile_picture:"https://pbs.twimg.com/profile_images/1181715113226596352/ipGVEcYH_400x400.jpg",ref_id:"e6b013ef-178b-4b41-95ee-423148a3dc3a",twitter_handle:"profbenperrin"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/419512c2-e309-4b25-bfe2-cd481d53f66d.jpg",keyword:!0,link:"https://anchor.fm/s/11e95d20/podcast/play/64479948/https%253A%252F%252Fd3ctxlq1ktw2nl.cloudfront.net%252Fstaging%252F2023-1-4%252F310976616-44100-2-e34c125fc6cf3.mp3",node_type:"clip",pub_key:"02545c14cbb18a61f20dd45f5e3dcbd9acae3de282369501040adce32a75311309",ref_id:"d865c803-93a1-47ae-b851-5bd6a683eda5",show_title:"BTC Sessions",text:"if you have thoughts, and then we'll go to the zombie. Yeah. So I think a lot of that story is kind of like how bitcoin empowers individual and small communities to kind of lift them up. Right? And so on the other side of that coin, the similar theme is how bitcoin lifts up societies. Right? And so I see a lot of this playing out with Brandon Quidom's pioneer species thesis. And so your story was like, business and all that, and I'm kind of thinking towards the integration of bitcoin mining and energy production, especially in Africa. Super bullish on Africa. And then we just had, I think it was the first small modular reactor in Canada. Right. And so that's kind of the new hotness in the energy space right now I see kind of this integration between bitcoin mining and energy lifting up societies in places like Africa, and then potentially even reinvigorating like the American Midwest. People call it the rust belt because they used to have so much manufacturing. If we can bring cheap and abundant energy to the world, that's a huge opportunity for everyone in society. Right. And that's what I'm really kind of excited about, in addition to, obviously the individuals and the businesses. ",timestamp:"01:06:00-01:07:22",topics:["individualism"],type:"podcast",weight:35.74698741708972},{boost:0,date:1675274375,description:"The value of a small government and Bitcoin ",episode_title:"Is Sound Money the Answer? with George Gammon (WiM268)",guests:[{name:"George Gammon",profile_picture:"https://pbs.twimg.com/profile_images/1246550014450700291/2n_iHigp_400x400.jpg",ref_id:"7ca1bc4f-3a57-4a6a-bedf-ef47a8b37297",twitter_handle:"GeorgeGammon"}],hosts:[{name:"Robert Breedlove",profile_picture:"https://pbs.twimg.com/profile_images/1592020087044591616/46enYwAc_400x400.jpg",ref_id:"0ed69c56-241c-4b63-87a5-8f2157fe51a5",twitter_handle:"Breedlove22"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/ca3ab815-dc2e-408a-a0c5-8bbe50270a97.jpg",keyword:!0,link:"https://cdn.simplecast.com/audio/2effec98-bec5-4728-ba08-7a86d776e682/episodes/d6e8f010-e2d5-4489-bb8e-9b7446a4795b/audio/0ad4fb89-2eda-4ad7-8432-b6be08c8ce10/default_tc.mp3?aid=rss_feed&feed=MLdpYXYI",node_type:"clip",pub_key:"03a3451db4748e483d2e1ee5d0b3a6872253253b57edf4b084a56952b432a224b3",ref_id:"61f104e1-77d8-48c4-9def-92d74cbf0d64",show_title:'The "What is Money?" Show',text:"of time left here, but I think we have enough time to go through at least one more point here, I guess. Part core, even to your argument, I think, correct me if I'm wrong, is that we should be spending the right proportion of time on educating people about the value of small government, competing in the court of public opinion, if you will, to shrink government and the right. Because it's not a panacea. Yes, and some proportion to sound money as well, which is obviously important to some extent, depending on context, et cetera, et cetera. And I agree with you there. But a thought experiment I would like to advance is that the existence of fiat currency is actually a distortion of the voting mechanism which we traditionally depend upon in a democracy to express our political preferences. Now, this example, there's a book called The Ethics of Money Production by an author named Holzman, and this is where I get this example, and he's basically making the argument that the market economy could be understood as a system that's basically catering to the needs of consumers as expressed in money payments. So the example I always like to give is if I go into the market and I buy a car, I'm actually signaling to the market economy to produce more cars, right? I'm casting a vote to specifically the car that I buy, right? If I buy a 2020 Tesla, that's what I'm telling the market to make more of. And the inverse is also true. You go and sell a house, right? You're actually signaling to the market economy to produce less houses. So it's this, it's a real kind of grassroots democratic process taking place where one unit of currency or one unit of money is equal to one vote, if you will. And when you look at the market economy through that lens, and then you consider that there's a central bank sitting in the middle of every modern market economy, that it's effectively an institution that can create its own votes. It is able to expand currency supplies and manipulate that process of consumers expressing their preferences in the marketplace and creating all the distortions that we've described today. So when you ask that question earlier, right, would you rather live in a society that believed in small government but was run on fiat currency, or live in a society that believed in big government but was run on sound money? I feel like in a society running on fiat currency, it almost doesn't matter what the democratic collective wishes are or preferences are of the majority because they can't be adequately expressed through a democratic mechanism, when in fact it's the central bank. Or I'll put in the commercial banking system that surrounds the central bank as part of this as well, they get a disproportionate amount of influence because they're effectively creating these new votes called currency units out of nothing. Or to the extent that they are creating them out of nothing, they're able to disproportionately sway the vote of the market process, let's say. So how would you wrestle with that? Because this is a bit of a rabbit hole, because if you draw this conclusion to the end, you're like, oh, well, democracy is kind of a scam. It's really about the money that creates the votes and movements in society. Democracy maybe has at least a limited effect. But I'd love to just hear what you think about that in general. Well, first I think you have to compartmentalize the Fed in the commercial banking system, because what you just described again assumes that the Fed has control, or a significant amount of control over the amount of currency units that is contributing to those votes, as you said. So if we assume for a moment that the Fed really doesn't control the amount of M two, then the Fed isn't really impacting the voting system. So then it would be the commercial banks. Right. But if the commercial banks, then assuming that they don't have a perverse incentive, which is the bill, right, there you go. Like free banking, they would lend for productive means and they would lend to businesses that would produce more goods and services because those are the entities that have the highest probability of paying them back. And so although, yes, the banking system is controlling the amount of m two amount of currency units, I think if you could eliminate or reduce the size of government, then you would have a system where that additional increase might not be optimal. But I think that's debatable. But at least it's not a massive anchor. At least it isn't extremely detrimental. And another fun thought experiment is I get the people that say, well, listen, we want a fixed M two supply, full reserve banking because we want a consistent unit of measurement. We always want to have twelve inches in a foot as an example. You hear that all the time. But I don't know that if we have 5% deflation, you're still changing the amount of inches in the foot, just like 5% inflation. I would push back on that one again a bitcoin, or would again disentangle monetary inflation from price inflation in that case. So they're advocating for integrity of the money supply, not necessarily integrity of price consistency. Right. But the initial argument is that the economy is going to function better if you always have twelve inches in a foot. Meaning that if the value of that currency unit relative to goods and services. Remains constant that's where I'm disagreeing. I don't think it's about the constancy of the relationship between the currency unit and goods and services. It's just the integrity of the money supply itself. So the less the money supply changes, the more it adequately reflects changes in the productive economy. But if you get supply that changes, obviously price changes become distorted. You don't know if it's policy or supply and demand fundamentals. Right, okay, got it. So then the argument there is that if prices are going down by 5%, even though that may be an inconsistent amount of value currency relative to goods and services, that would be optimal because that's what the free market is producing. Because that's a result of the free market and the decisions that are being made by the individuals pursuing their own self interest. I think you could summarize the argument as the money supply that changes least is best. So an ideal money supply in a bitcoin or world is a fixed money supply, so the pricing signals that money, this would be everything. The other weird thing, in a bitcoin world, there is no difference between base money and broad, all right? You could say there's lending on top of it. If you introduce full reserve with a bitcoin base layer, right? Then there could be if there's IOUs that are produced by the fiduciary correct. Or the underlying base layer, then theoretically you could have an additional amount of broad relative to base, although that base could be used as broad. Very similar to the way gold was. Yes. And the theory there is that because bitcoin is more portable, because it's sound money, you're obviously dissuaded from taking on debt because it tends to increase in purchasing power over time, and because it's hyper portable, you don't need to centralize the custody and borrow currency units on top of it, necessarily. So I think there's less of an incentive for there to be a higher proportion of broad money to base money in a bitcoin world. Like another way of saying global debt to GDP would contract ten X, perhaps from what do we have? 20 or 30%? This is what I really wanted to discuss with you as well, because I think that we've really discussed the sound money component of it, but that doesn't necessarily mean that we've discussed the bitcoin standard component of it, because there is a difference between gold being old money. And bitcoin sound money. For sure. You got it. I don't think we should crack that can of worms right now, though, because if I'm going to get you off in 2 hours, we only got about five minutes. That one will definitely ",timestamp:"01:50:29-02:00:37",topics:["Small government","Bitcoin value"],type:"podcast",weight:34.26857319961412},{boost:0,date:1663767761,description:"what is Small modular reactors ?",episode_title:"Mining Bitcoin with Nuclear Energy with Ryan MacLeod",guests:[{name:"Ryan MacLeod",profile_picture:"https://pbs.twimg.com/profile_images/1443185278525579278/_Yl1nao1_400x400.jpg",ref_id:"20a72757-923c-4a01-ad4f-7ccdc2a83e03",twitter_handle:"NuclearBitcoinr"}],hosts:[{name:"Peter McCormack",profile_picture:"https://pbs.twimg.com/profile_images/1524287442307723265/_59ITDbJ_400x400.jpg",ref_id:"887a65a7-a2d8-4371-887e-bc7a6ca6ff17",twitter_handle:"PeterMcCormack"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/4e607036-8fde-48ef-ab76-9c2ac4bab031.jpg",keyword:!0,link:"https://chtbl.com/track/282487/traffic.libsyn.com/secure/whatbitcoindid/WBD557_-_Ryan_Macleod.mp3",node_type:"clip",pub_key:"032ff32727b06d20a13a0a8d8dfe09d39659c16deeaffbf94d6d21ec6bb28850b6",ref_id:"ccac3748-afc5-4404-8497-1710f501f49f",show_title:"What Bitcoin Did with Peter McCormack",text:"the SMR modules, when they're created and they're approved, will that wipe out any need to build these larger reactors? Is that the death of those? Is the desired just to only have SMRs? Not necessarily. There's potentially room for all the different types. There's still, like, the UAE's just built a few large reactors. The hinkley point C's. Almost finished in the UK. I think there's the reactors in Georgia that have been taking a while, but they're almost finished taking a while, 15 years. When you say the small reactors, what is the scale compared to, like, a normal nuclear reactor? The term Small modular reactor applies to reactors that are less than 300. Conventional reactors are in like 600, 700 megawatt units, and they benefit from the economies of scale so they can have a wider customer base to share the risk of the costs with I have. No idea what that amount of power, how many people that services. So if you had one of these SMRs, how many would we need in the UK to serve 70 million people? Well, it depends because it will be locally dependent. The difference is you can build one large reactor and then all the transmission infrastructure to get it to the customers, or you can build the SMRs in hyperlocal grids too. Do you have a look at how much grid the UK grid uses? I'd love to. I guess you might have an idea of what the Canada grid uses. Is Canada have a single grid? Because it's quite it's pretty spread out. Yeah, as soon as you start getting further north, it gets pretty remote and there's a lot of off grid that depends on diesel. That's the goal of the SMR action plan for off grid, is to get remote communities off of diesel, upgrade them to nuclear with these small modular reactors. OK, but I can't imagine the construction of a small modular modular reactor is going to be cheap. But they must be like the estimated cars. The first of a kind reactors are going to be in the orders of several hundreds of millions, a few billion. But the expected cost, once the technology is mature, the cost will be cut in half because once the manufacturing facilities are built and all of the supply chains are developed and the expertise is aligned, that will significantly drive the cost down as more reactors are deployed. But yeah, getting it over those initial hurdles is going to be quite costly and require like, public private risk sharing and capital investment. So it says Greater London uses just under 40,000 gigawatt hours and it says it could be supplied by two or so, like, large nuclear power plants. Okay, so that'd be like four SMRs? Depends on the type of SMR. If you're going with a 300 megawatt unit, then yeah, but if you want to apply it to like, a small community that only needs 15 to 20 MW, you can build either a few of the really small reactors that are going to be in the ten megawatt range. Oh, you can build like tiny versions of these? Yeah, that's the thing, because we want to build some that are in the one to ten megawatt range, in the 50 to 150 megawatt range, and then like the 200 to 300 megawatt range. So we'll have a wide variety of applications that these reactors can be applied to. So the smaller ones, one to 10 MW, what kind of size geography do they need? Like a track field hockey arena. Oh, wow. Yeah, not much. Okay. And do they know the construction time or something like that? They're expecting the smaller ones to be in the orders of like one to two years and then the larger ones being like, the five years ballpark so. It'S really important to get through that regulatory process then. Absolutely, yeah. And are there enough people out there who are available to be able to work to construct these, to work at these? Is that another thing that has to be worked on to train people up? Yeah. In many jurisdictions that is the case. That's why it is being so costly to build the Hinkley reactor in the Vocal reactor in Georgia for the UK and the US markets, because they let their supply chain atrophy by not building or refurbishing any of the reactors for decades. Whereas in Canada, we are actively refurbishing our reactors right now. The Darlington has undergone refurbishment. The point, Lapro. Reactor has undergone refurbishment. Bruce reactor is currently under refurbishment. So this will extend the life of those reactors for at least another four decades. What's involved in refurbishing it is essentially using the site to put in new technology. Yeah. A lot of the parts in these reactors are interchangeable. They can just be replaced with new parts, and the pressure tubes just get replaced with fresh zirconium pressure tubes, and they replace the turbines if they need to. Just anything that's starting to show its age just gets replaced. But the core of the reactor pretty much remains unchanged. And how much time goes into refurbing a reactor, as opposed to by building one from scratch? Each reactor probably takes, like, two to three years to refurb. Yeah. Okay. And that has the advantage of sustaining our supply chain and our workforce and making sure that the industry remains robust and doesn't lose our expertise. So ",timestamp:"00:20:06-00:25:51",topics:["Small modular reactors"],type:"podcast",weight:4.754855089440576},{boost:0,date:1673187067,description:"How do micro reactors contribute to the decentralization of the energy industry?",episode_title:"@NuclearBitcoinr - Mining #bitcoin With Small Modular Nuclear Reactors. #313",guests:[{name:"Nuclear Bitcoiner",profile_picture:"https://pbs.twimg.com/profile_images/1443185278525579278/_Yl1nao1_400x400.jpg",ref_id:"60f5891f-0864-4ed4-987a-81da4768b3ba",twitter_handle:"nuclearbitcoinr"}],hosts:[{name:"Daniel Prince",profile_picture:"https://pbs.twimg.com/profile_images/1589940494364205056/rnHs5gI3_400x400.jpg",ref_id:"df2d4d35-3e96-44ed-b1cc-cb8a714bbe30",twitter_handle:"PrinceySOV"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/e1eca67b-d372-4031-bf1f-8f0ff7fe6092.jpg",keyword:!0,link:"https://anchor.fm/s/1346f9e8/podcast/play/63208295/https%253A%252F%252Fd3ctxlq1ktw2nl.cloudfront.net%252Fstaging%252F2023-0-8%252F4a07b2fe-eb1d-2c82-677e-8f2808a09536.mp3",node_type:"clip",pub_key:"02545c14cbb18a61f20dd45f5e3dcbd9acae3de282369501040adce32a75311309",ref_id:"58d095b5-4c46-4586-888c-8b56a9afd883",show_title:`Once Bitten! + .checkbox { + width: 20px; + height: 20px; + border-radius: 4px; + border: 2px solid ${colors.lightBlue400}; + margin-left: 16px; + font-size: 12px; + display: flex; + align-items: center; + justify-content: center; + cursor: pointer; + background: transparent; + padding: 0; + } +`, + message$2 = + 'Submit a topic that you would like to monitor (for example, “inflation”, “bitcoin”, etc). We will continuously fetch the latest content associated with your topic and add them to your graph.', + Topic$1 = () => + jsxRuntimeExports.jsx(Flex, { + children: jsxRuntimeExports.jsx(TextInput, { + id: 'cy-topic-id', + label: 'Topic', + maxLength: 50, + message: message$2, + name: 'source', + placeholder: 'Type your topic here...', + rules: { ...requiredRule$1 }, + }), + }), + TwitId = ({ setValue: tt }) => + jsxRuntimeExports.jsxs(Flex, { + children: [ + jsxRuntimeExports.jsx(TextInput, { + id: 'tweet-id', + label: 'Tweet id', + message: 'Paste a valid tweet url or tweet id.', + name: 'tweet', + placeholder: 'Paste your link or id here...', + rules: { ...requiredRule$1 }, + }), + jsxRuntimeExports.jsx(Location, { setValue: tt }), + ], + }), + TwitterHandle$2 = () => + jsxRuntimeExports.jsx(Flex, { + children: jsxRuntimeExports.jsx(TextInput, { + id: 'twitter-handle', + label: 'Twitter Handle', + mask: '@***********************************', + maxLength: 16, + message: 'Paste a valid twitter handle.', + name: 'source', + placeholder: 'Paste your id here...', + rules: { ...requiredRule$1 }, + showMask: !1, + }), + }), + message$1 = + 'Submit a valid webpage url. If you find a webpage with great text content you’d like to add to the graph, use this option (e.g. A news article, a wiki page, etc). This is NOT for audio or video content.', + urlRegex = /^(?:(?:https?|ftp):\/\/)?(?:www\.)?[a-zA-Z0-9_-]+(?:\.[a-zA-Z0-9_-]+)*\.[a-zA-Z]{2,10}(?:\/[^\s]*)?$/, + WebPage = () => + jsxRuntimeExports.jsx(Flex, { + children: jsxRuntimeExports.jsx(TextInput, { + id: 'tweet-id', + label: 'Web page url', + message: message$1, + name: 'web_page', + placeholder: 'Paste your url here...', + rules: { ...requiredRule$1, pattern: { message: 'You must enter a valid webpage url', value: urlRegex } }, + }), + }), + message = 'Submit youtube channel', + YoutubeChannel = () => + jsxRuntimeExports.jsx(Flex, { + children: jsxRuntimeExports.jsx(TextInput, { + id: 'cy-youtube-channel-id', + label: 'Youtube channel', + maxLength: 50, + message, + name: 'source', + placeholder: 'Type youtube channel here...', + rules: { ...requiredRule$1 }, + }), + }), + requiredRule$1 = { required: { message: 'The field is required', value: !0 } }, + infoMessageContent = `Come across an interesting or useful part of a video or audio you'd like to share? You can add it to the knowledge graph here! -A Bitcoin Podcast. -`,text:"So I think it's all going to all going to fit together and like, the small modular reactors have so much potential. When you say small, how small are we talking? Small encompasses anything less than 300 MW. So, like, your typical nuclear reactor that we have out there is, depending on how old they are, 700, 800 MW. Like the new ones that are just being built in the UAE, they're like 1.4 gigawatts per unit. These reactors that are being built now are huge, but they have a narrow market that they can be built in once they're built. And if the market is there, that's great. But there's communities throughout Africa that could be better served by a reactor that generates just 5 MW instead of 500. So there's going to be a lot more applicability. And then the range goes from the micro reactors are anything less than 10 MW. Small is anything less than 300. And then there's the micro ones that they have, they're even smaller. And the micro ones are basically going to be able to fit a nearly complete reactor on the back of a transport trailer and just ship it to site and assemble the final components. Because the idea is that they're going to be mass produced in a factory type of setting on an assembly line so that they can take advantage of repeat construction and learning techniques to improve the construction process and get a lot of more standardized practices in the material and the supply chains that they use. So that's going to be going to reduce the costs dramatically. But then the problem is I'm trying to picture this in my mind. As. We all decentralize, this helps us get out of the cities, right? We don't need to be in cities anymore. And we could go out to areas of natural beauty and build communities around a micro reactor. Am I using the right words here? Yes. And that thing could be about the size of a shipping container or a little bit larger. Well, the main components would be in the shipping container. There would have to be a building built around it to house it. But even then it wouldn't be that size of maybe like a public school or like a hockey arena, something. So it would just be like a building because it would be built and it would be running and whatever else, but it wouldn't be like one of these massive eyesores. It's going to be pretty small. Oh, yeah. They'll be able to build them in a way that you wouldn't even know what it was unless you actually knew what it was. They'll just be a nondescript building that's just over there with a bunch of power lines coming out of it. And then the cool thing about the modularity is, say you've got a five megawatt reactor, but your community needs like 13 MW. You can build three of these units in tandem and then couple them all together. And then you can have just say, one central control room, or you can have one central turbine building. And then each of the the generator modules would be on their own. So instead of having three of each, you can kind of streamline that a bit. And then where I see a lot of, like, the bitcoin mining come in is like, perhaps you see that in the future. This community has the potential to develop up to 30 MW, but they're only consuming about 13 now. You can just build the full 30, fill that space with the bitcoin miners, and then as the community grows into its new energy profile, you can just peel off miners and deploy them somewhere else where it will make more sense to them. And then the locations where I'm talking about in northern Canada, we also have the added benefit that these little guys are space heaters if configured in the right way. And then like, on top of that, like Troy Cross was talking with, McCormick recently, threw out some interesting ideas about one being like, a lot of the carbon capture technology is basically just drawing air through a fan and through a medium that absorbs the carbon. And then out the other side, it's like, well, just run your miners through and then you can, you can take the fans to blow the air through the carbon capture, and then you can probably capture the heat and go send that off into a greenhouse or something nearby. Or you can take that carbon and you can distribute that into the greenhouse. There's so many different ways that this can be configured. And the ideas that I'm seeing with the modeling is very complex and convoluted with how they're trying to be like, oh, well, you can ramp up and down the reactors. That's a cool capability. But then you're either losing out on potential economic benefit or when you do ramp up and down your core, like any generator, even like a natural gas generator, that puts unnecessary wear and stress on the equipment and the lifetime of your generation station. So if you can just leave your reactor running at 100% all the time, regardless of what your local demand. Looks like that's going to have a significant improvement on the lifetime of your reactor. For one of these microreactors, sorry to jump in on my mind is racing one of these microreactors that you take and you build a community around. If I remember rightly, about half an hour ago, we were talking about the shelf life of the fuel rods. It's like one and a half or three years you might only need to take out before they get switched out. Is that correct? Yeah, that's typically like the lightwater reactors that we're familiar with, the traditional type, the one that we're going to be building at CNL or demonstrating, that's going to be the one we anticipate to deploy to remote off grid communities. It's going to have a 20 year fuel cycle. So basically so you don't even need to go to a uranium rich plane. You just turn up with your module, it gets built, the fuel cells turn up, and then you just need another delivery in 20 years and you're good to go. Pretty much, yeah. Or yeah, or you could just keep keep a second fuel pod just on hand. Right. And then yeah, then you've got 40 years worth of fuel available on site, and you're basically limited to how well you maintain your reactor and do your preventative maintenance. There are some parts that are going to wear over time, like anything like maintaining a classic car. There's some parts that you're going to need to swap out over time, but for the most part, you can keep the main components in good enough shape that you can push them 40, 60, 80 years. It's like the complete opposite of what happened in the Gold Rush. Instead of risking life and limb to cross mountain ranges and blizzards and people that wanted to basically kill you to get to the other side to hopefully find gold, you're taking all that shit with you already and just plugging in and building a community around it and civilization, immediate civilization. That's the idea. Sounds like the pioneer species idea in a nutshell. We go to where the power is, and now we have the ability to put the power wherever we want. Like there's going to be within reason, like there's going to be some limitations, but like, even some of these reactors are going to be designed in such a way that they're like, seismically stable so that even a strong earthquake is not even going to bother them. And I remember Ross Stevens talking about this in his interview with Michael Sailor. Did you watch that one when they did the MicroStrategy World Day start of 2021? With all the content that I consume? Yeah. I'm surprised I haven't gotten that one because those are two, two big brains for sure. Taylor interviewed Ross and it was the first time I'd ever even heard about Ross. He had never been on any podcast or appeared anywhere at all. In a bitcoin space. And that was the opening interview. And at some point in that interview, Ross did basically say bitcoin is going to communities give us the ability to move decentralize ourselves to areas of natural beauty where we can now build up around he used the example of a waterfall for a great example, because now you can mine bitcoin, but you guys are taking one step further, like yeah, no, just load up the truck guys. Let's go. Because we got the mini nuclear reactor and we're solid for 40 years. Yeah, it blows my mind. Oh, I know. When I started really digging into it, I was just trying to do the good kind of scientist thing where you're just like, well, how can this not work? And trying to come up and conceive of all the ways that it doesn't. But every pathway that I've gone down leads me to just like, this is the way forward. But it takes a lot of education for people to not only get nuclear power and bitcoin and how electricity systems work. These are things that a small fraction of the world understands, even one of the three of them. But putting all three of them together, I'm still pretty neophyte in my understanding of nuclear power. I'm not a nuclear engineer or anything. I work with tons of them, and I can pick their brains whenever I need to. ",timestamp:"01:07:09-01:17:31",topics:["micro reactors","reactors"],type:"podcast",weight:19.120022996014775},{boost:0,date:1528156800,description:"Store value of Bitcoin in a volatile market and its mass adoption barrier ",episode_title:"Cryptocurrency Price Volatility and Bitcoin Store-of-value",guests:[],hosts:[{name:"Andreas M. Antonopoulos",profile_picture:"https://pbs.twimg.com/profile_images/1362967502247129090/Q2ypSr9W_400x400.jpg",ref_id:"132bc4d2-c16e-466e-8ab2-6f8a9a9a6568",twitter_handle:"aantonop"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/1c3fe064-f637-41ea-8a4b-a533ef5985b1.jpg",keyword:!0,link:"https://www.youtube.com/watch?v=wzzZT95ijTo",node_type:"clip",pub_key:"02574d6e8e787372184b6f17c40d6c6fe1777db9015801f95dfd24692784d767cd",ref_id:"1806f209-3cd6-496a-baf3-0351b7f432aa",show_title:"aantonop",text:"James asks store value in a volatile market. My smart friend says that the biggest barrier to mass adoption is price volatility, which limits Bitcoin's use as a store. Store value. Its most convincing use case to date. It's a lousy story value if the price keeps changing. Is this right? Are there other obstacles to mass adoption? What are they, in your opinion? James, your friend may be smart, but I don't think they understand some of the basic economics at play here. So, first of all, I don't think price volatility really affects bitcoin's use as a store of value. Store value is definitely a longterm perspective. It certainly affects Bitcoin's use as a medium of exchange, but as a store of value. If you are buying and investing in bitcoin and using it as a store of value, then you have a long term perspective. Certainly more than a year. How is Bitcoin doing? In the last year. It's up about 600%. Sounds like a pretty good store of value to me. Over the last three years. Definitely pretty good store value. If you look at it over three months, it's probably not a good store of value. But that's not what store value means. Store value is definitely a long term perspective. The other thing about this is that it's a bit of a circular argument because volatility really is an expression of size. For example, in a follow up question, James said, we tend to harbor an expectation that this volatility, a key obstacle to bitcoin's wider success, will eventually calm down. But bitcoin's resistance to regulation is a feature, not a bug. So where will the stability come from? Absent of mass adoption and absent of regulation. I think there's a broad misunderstanding about how volatility is dealt with in capital markets and currency markets. The idea that regulators control volatility in the currency, I think is an illusion. Regulation doesn't control volatility. If anything, regulated markets that don't have enough flexibility and liquidity are more volatile. I would say the biggest contributor to volatility is the small size of a currency. And you've got to understand that Bitcoin is currently traded on a global basis. Unlike most other national currencies that have primarily domestic markets, bitcoin is a global market. And for a global market, it's tiny. It really is absolutely tiny. $100 billion is nothing in currencies, even for a currency that's only domestic, let alone for a currency that's traded globally. So this kind of sounds like a circular argument, basically saying the biggest barrier to mass adoption is the lack of mass adoption. And if only there was more mass adoption, then there'd be more mass adoption. The biggest barrier to bitcoin being big is that bitcoin is small. And if only bitcoin was bigger than it could be bigger, because that's what price volatility is. It's that this currency is small. And so if the fact that it's small is a barrier to it becoming big, that's kind of circular logic. As bitcoin gets bigger, volatility goes down. As the market becomes more liquid, as it is traded more and used for different purposes and not just speculation, I think that reduces volatility. The more companies depend on bitcoin as an input, or use it for payments to contractors or providers, or hold inventory and purchase things based on bitcoin, or sell things based on bitcoin, the more the price of volatility is reduced. Right now, it's mostly used for speculation, it's mostly dealt with as a short term basis. It's traded globally in a wide open market, and as a result, it's quite volatile. So yes, bitcoin will become less volatile as it grows, or at least I certainly hope it will. I think the economics ",timestamp:"00:00:00-00:04:24",topics:["Price volatility","Regulation resistance","Small size currency","Market liquidity"],type:"youtube",weight:4.673567056655884},{boost:0,date:1670943361,description:"Discussion on the percentage of Bitcoiners who self custody and the limitations of Layer 1s",episode_title:"Café ₿: SBF Arrested 🚨 🚨 #Bitcoin Not Crypto",guests:[{name:" Tone Vays",profile_picture:"https://pbs.twimg.com/profile_images/1416821178266787844/T1OkI9ZW_400x400.jpg",ref_id:"ac43b4f0-9056-4a6b-9d30-4a6250405ade",twitter_handle:"ToneVays"},{name:" 2140data",profile_picture:"https://pbs.twimg.com/profile_images/1598330787778232320/ZVFcRtet_400x400.jpg",ref_id:"c8fb52d1-fa69-410d-bf96-8a7559bba863",twitter_handle:"2140data"},{name:" BITVOLT7",profile_picture:"https://pbs.twimg.com/profile_images/1532194001511714818/O8nSTKcx_400x400.png",ref_id:"2b9913b7-393c-4125-9aeb-4a8bf32bfa44",twitter_handle:"BITVOLT7"},{name:" Tomer Strolight",profile_picture:"https://pbs.twimg.com/profile_images/1591960241008148481/HtyINxtU_400x400.jpg",ref_id:"4e0b6941-6d5c-439c-9d30-7c5691828930",twitter_handle:"TomerStrolight"},{name:"Neil Jacobs",profile_picture:"https://pbs.twimg.com/profile_images/1593645788978102277/UAQCQKeE_400x400.jpg",ref_id:"0bc759e0-b055-4800-a79d-2b950fe5cc53",twitter_handle:"NeilJacobs"},{name:" StackchainSig",profile_picture:"https://pbs.twimg.com/profile_images/1589791699571802117/n_Y1Qm7J_400x400.jpg",ref_id:"c000ebd6-1c05-4c6a-ad07-5e5c10cc3fb3",twitter_handle:"StackchainSig"},{name:" Joe Carlasare",profile_picture:"https://pbs.twimg.com/profile_images/1567374701667794944/2ghrkDx7_400x400.jpg",ref_id:"75b3a3fa-f118-4ea0-9477-25832844c900",twitter_handle:"JoeCarlasare"},{name:" w_s_bitcoin",profile_picture:"https://pbs.twimg.com/profile_images/1594796869233811474/g0_ZRshz_400x400.png",ref_id:"268a731a-0e21-4cb1-ad73-d8d21f433393",twitter_handle:"w_s_bitcoin"},{name:" TYonClubhouse",profile_picture:"https://pbs.twimg.com/profile_images/1575442322531274756/-ZdL-K9S_400x400.jpg",ref_id:"519d68be-1a96-4394-8bab-48f570f1a6cd",twitter_handle:"TYonClubhouse"}],hosts:[{name:"Alex Stanczyk",profile_picture:"https://pbs.twimg.com/profile_images/1539055022364708864/rwErK6x1_400x400.jpg",ref_id:"3126e2a3-bbe4-456b-b298-9714085fa286",twitter_handle:"alexstanczyk"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/239722cb-4216-414a-a17b-5adf9d52e15a.jpg",keyword:!0,link:"https://stakwork-uploads.s3.amazonaws.com/uploads/customers/2707/media_to_local/ee6b20fb-2dd2-467b-8e0e-0c2301d9ff68/3f03e525-44df-4eeb-ad79-f6e66ccca86d.mp3",node_type:"clip",pub_key:"034248fa888690a85021cf117c168a535c53b92e1fdf3e4f9cefddfe09118d8207",ref_id:"b8d90bd0-45fb-40d9-87db-b9a908a8684a",show_title:"Swan.com",text:"I have a quick question, and it kind of just got sparked by what Nico said and what we've been talking about in general with the importance of self custody and the spreading of this message. But in its current form, right now, as it is, the protocol, what percentage of the world do we honestly think can actually self custody on the base layer? Like, realistically, do we know that number? Like 1-2-I don't know. That's a really good question. I mean, you could surmise from the glass node data about the number of bitcoin addresses with one bitcoin or more. I don't know what percentage, because that doesn't necessarily represent that one bitcoin is for each individual. Right, but I mean, you could surmise that a percentage of that is definitely individuals taking self custody. I think you could make a pretty good bet that there's definitely a record amount of individuals taking bitcoin into self custody. And every time one of these blow ups happen, which I believe is really the silver lining of this whole FTX disaster, is a lot of people burn their fingers on the stove and they realize, oh crap, not your keys, not your bitcoin. And it's interesting because it just came out that CZ sorry, that Binance is seeing record amount of outflows as well. Now, if you've been here for a while, this was before my time in Bitcoin malgax blew up, and that was one of the only exchanges at that time. And I guess a lot of people learned their lesson. So what I'm trying to say is that every wave of these disasters, I think a small percentage of people realize not your keys, not your Bitcoin. It's just unfortunate that these things need to happen in order for individuals to learn those types of lessons. Because I know a lot of like, there was this fund, it was like Travis Kling or something, the Coggy fund wrecked, totally gone. He had most of the funds on FTX. And there's been horror stories that I've read of people's, mothers, individuals, that just for some reason or the other, they left their wealth on FTX. And it's unfortunate that that's the price that had to be paid for people to realize the truth. I also want to give a shout out to Corey because he did great work and he got a ton of crap for it, for basically beating the battle drum about celsius about FTX and getting individuals to take self custody. It's just crazy how effective the shitcoiners are at just drowning out that. It's like, oh, these Bitcoin maxis, they're radicals, they're crazy. They call you all these names. But the bear market is kind of bittersweet. We get vindicated, but at the same time, a lot of people lose their life savings. And I think that's really tragic. Man yeah, I think kind of where I was getting at is I personally believe self custody is incredibly important and probably one of the key, if not the most important feature of Bitcoin. Without enough users controlling their bitcoin and having it in self custody and using it right, kind of growing the network in terms of its peer to peer connections, there's no Bitcoin failed. We need to have as many peer to peer connections as possible. Right? That's the whole fucking point of Bitcoin. But I guess what I was getting at is like, I don't want to oversell the technology either, though, and make it seem like everyone can do this, because that's just not true, at least in its current form. And maybe we'll make updates in the future that will make it that way, will make it possible for everyone to but it's actually I mean, in my opinion, it's very likely that we also may not, right? We may kind of choose to keep the base layer in a way where it's a settlement layer and the vast majority of people having their bitcoin on layers on top and they don't necessarily have their own private keys or they have kind of these other ways of having custodial relationships like fettiments or custodial lightning wallets or things like this. So it's like while I see the importance, at least especially in this moment when we are so early and everyone can at this very moment, who knows about Bitcoin and has Bitcoin, everyone who has it now, they really can take self custody, right? It's a few pennies. I don't say everyone, but a lot of people can take self custody. It only costs a few pennies of on chain fees and the block chain is not congested. The mempool is clearing regularly. But at a certain point we do have to like realize that it becomes difficult to onboard everyone. And so I don't want to oversell the technology when it's not really there yet. And it may never be. You see what I'm saying? I think that's a dangerous thing too, because then you have a bunch of people who are like, well, fuck, what am I going to do now? Right? Once we get to that point where it's like, well, sorry, train is full, I think you can hide a lot of the complexity of self custody behind a slick user interface and just kind of remove that's not what I'm talking about though, Nico. I'm talking about the literal limitations of the technology itself. There's only so much block space and right now we don't have good enough ways to batch transactions, which we might in the future, but at least now we don't on main chain. I don't even understand why this is an issue. Because you can't take self custody without taking self custody on the main chain. We're talking about man self custody. No, I guess that's a fair point. But I guess that also makes the assumption that all of these transactions are trying to not happen on layers above. I'm talking about what you're saying, storing their wealth in Bitcoin and then us banging the table saying it's not your Bitcoin unless you take self custody. But then when the rest of the world wakes up, they realize that they're too late. Do federations help with this at all? That's what I'm saying, is like I think that's why I'm saying it's kind of dangerous to be going down this narrative path of not your keys, not your coins, and that's the only option. But we're not there yet. Wicked. In the interim, we're not at the point where billions of people are trying to crowd into Bitcoin and everybody's trying to take self custody and it's the man. The pools got 3 billion transactions, though, and influential. And so I don't want people to come back and be like, man, those fucking early as bitches just didn't we weren't considering the realistic situation here, which is that the vast majority of people probably will never hold their own keys. At least in our current technological stack of Bitcoin. Things may change on the basis we're worried about that. I feel like you're over worried about something like who cares we don't know what I care. Look, calm down. Because about people being in control of their money. That's the whole fucking point. That's not what I'm saying. You just said you don't want people in the future to go back and listen to these and be like, hey, they said a bunch of stupid shit. It's like, look, nobody knows the future, man. I don't have a crystal. Like, my membership expired to the Seance network. I no longer have access to the ability to predict the future. So just don't even worry about it. We go one step at a time here. Okay? But we're talking about a future where everyone uses Bitcoin and we're saying that everyone needs to take self custody. But those two ideas do not jive. That's all I'm saying. Wicked. Wicked. Are you really worried that Kevin O'Leary, Peter Schiff, Charlie Munger are not going to be able to have self custody? Those motherfuckers will, man. They're going to be on the base layer settlement just like the rest of us because we're so early. It won't matter for us to pay the equivalent of $5,000 to settle a transaction on chain when it's wicked expensive. But everyone else in the fucking world is going to have to use Fetty Mint's and other custodial solutions to use bitcoin. And I think it's greatest be realistic about that in human history. It's going to happen. I agree with that. Yeah. But 80% of the people who are fucking poor and in developing nations who don't have the chance to get in on this transfer of wealth or are doing it in a way where they have a little bit of bitcoin, but it's in a custodial lightning wallet, so maybe they get fucked along the way anyways, you know what I'm saying? All I'm saying is we just have to be careful with how we word things and the expectations we set. I would push back against that man a little bit. Look, at this moment in time, I think the more individuals taking self custody of their Bitcoin, the better, and I think that perhaps in the future, those we agree on that and the circumstances will arise. Maybe, I have no idea. But right now, that isn't the case. Right now it's incredibly easy, incredibly cheap. Of course, I don't think it's very difficult because I've been doing it for a while. But the steps I don't think are very difficult. I don't think setting up a ledger or a treasure or a jade or a cold card, I don't think it's that hard, man. And I think that you can get a percentage of the population, specifically the people that have spent less time in the Fiat Matrix. I think you can get them accustomed to it, man. It's what I do, bro. I literally have a cabinet full of hardware wallets and I hand them out like candy bars. Yeah, man. I'm running out custody every single weekday morning this is what I thank you for doing that, by the way, we're planning on doing for a very long time moving forward. I think it's really important to spread this message. I'm not saying don't usually custody. I'm just saying we're going to reach a saturation point at some point, and it might be there. Well, we're not there yet, but it might come. Deep breath. It might sneak up on us. Angry Apple, take a deep breath. I can just see Nico at Halloween. And here's a treasure for you. And here's a ledger for you. I literally subsidize it, bro. So hold on, I have to tell you guys the story because it's a good story. So before I dropped out of college, this was 2016, by the way. My last class was public speaking, and they're like, what are you going to do your presentation on? So I did my presentation on bitcoin. At the very end, I said, guys, if you download a bitcoin wallet or something like that, I will literally give you $10 worth of bitcoin. Mind you, this was 2016. There was a class of 29 people. Only three people took up that offer like mad. Wow. Yeah, dude, it's interesting. But hey, ngu, I think, fixes a lot of this. Tommer has had his hand up for a long time. Let's go with Tomer, and then I have a question for the panel. Okay, I have a point to make, but just to weigh in on the last conversation, I think by the time this becomes what wicked's concern comes up, there will be good solutions for it. There'll be other things, but I don't want to really belabor that point. I shared another tweet that I made last night at the top of the nest, which I think for me at least, is an attempt to condense a lot of this conversation, which is, I said the most important feature of bitcoin is auditability. It's not that I'm just trying to make a case where it's not that there's 21 million coins or that even that this is a finite number of coins. It's that you can actually see where every coin is, including, most importantly, yours. And so you know that you've got what you've got. And that certainty is the invention that we've never seen before. We've never had that ability for you to have, knowingly what you have in a financial system, in a digital asset that is invulnerable to attack. I feel like I'm just kind of going over and over some of these things, but it's a different lens because everybody tends to focus at different times on different features of this thing. And now with all these custodial blow ups that we've seen, and we remember, why not your keys? Not your coins. And the reason your keys are so important is you can see what's on there, so can everyone else. And so all these games of, well, how many bitcoins actually exist in. The paper world. Nobody knows how many exist on chain. Everybody knows which coins are yours in custody. Nobody knows which coins are yours in self custody, you know, and everybody else knows. And so it's a night and day difference. It's incredibly stark contrast to what existed before. Even with things like gold that you can take self custody of, you don't know how much gold there is out there. You can't audit the global supply of gold. You can't actually verify for yourself that the thing that you hold in your hand that you think is gold is gold, but you can verify all of that easily trivially, inexpensively, instantly, continuously with Bitcoin. That's the that's a great point. Great point. How many diamonds are there out there? Does anybody know? Infinite. You can make diamonds out of carbon. So take your pencil that and squeeze it really hard. You get a diamond. There's a lot off the coast of South Africa, that's for sure. Angry Apple makes his own diamonds. He just grabs the carbon and crushes it in its vest until it becomes a diamond. That's right. And these man made diamonds are better than those shitty ones you find in the Earth crust anyway, so they're more perfect. ",timestamp:"01:22:31-01:37:39",topics:["Bitcoin self-custody","limitations of Layer 1s"],type:"twitter_space",weight:9.165734869028597},{boost:0,date:1624507200,description:"[[Ali]] background",episode_title:"Bitcoin Fixes This 48 Small Business with Ali",guests:[{name:"Ali",profile_picture:"",ref_id:"1169edf2-a89f-4d89-94a4-1be1a7b9aef0",twitter_handle:""}],hosts:[],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/2536a974-d668-4ac2-8613-0b37aa0ca08c.jpg",keyword:!0,link:"https://anchor.fm/s/2a4e8034/podcast/play/36003846/https%3A%2F%2Fd3ctxlq1ktw2nl.cloudfront.net%2Fstaging%2F2021-5-23%2F969a4306-e9eb-95c5-0e15-42d37c0e61e8.mp3",node_type:"clip",pub_key:"",ref_id:"533a527d-5146-4c10-8091-329cbc8bf06a",show_title:"Bitcoin Fixes This",text:"of your Treasuries into Bitcoin. But before we get into all of that, can you tell us for my audience, just like how you got started and how you got into the business that you're in? Yeah, for sure. So I came to Canada from Egypt back in 2011. We were already Canadian citizens at that point. But I came with my brother to kind of start our careers here. And we came here. We were looking for a business to kind of buy outright or art together. And we found this cool restaurant in London, Ontario, that was doing pretty well. So we decided, you know what? Let's get into the restaurant industry. And we just bought that restaurant outright and we started from there. And then we grew that restaurant from small, like, little local place to a franchise. We now have over six locations in Ontario, and we're non stop growing the business. And ",timestamp:"00:01:25-00:02:30",topics:["ali"],type:"podcast",weight:4.660259485245579},{boost:0,date:1666137600,description:"Fastest way to grow connectivity for nodes?",episode_title:"Meet the Makers: Alan & Kwinten",guests:[{name:"Alan Plus",profile_picture:"https://pbs.twimg.com/profile_images/1565235279451103233/XD8pJuIo_400x400.jpg",ref_id:"e362fed6-ec06-4d8a-a052-3137b24f213f",twitter_handle:"alnboltn"},{name:"Kwinten De Backe",profile_picture:"https://pbs.twimg.com/profile_images/917859380699320320/p_v-fjmh_400x400.jpg",ref_id:"be68f240-1f4c-4b27-b4bb-752c90cbe0c3",twitter_handle:"QuintenDeBacke1"}],hosts:[{name:"Moritz Alby",profile_picture:"https://pbs.twimg.com/profile_images/859727763292512258/kiFpZ2vO_400x400.jpg",ref_id:"e88efbf8-3809-4508-a86a-d7bf9effb574",twitter_handle:"MoritzKaminski"},{name:"Zapp Ed",profile_picture:"https://pbs.twimg.com/profile_images/1519990234070540288/adGqlFoj_400x400.jpg",ref_id:"bbe7cf1d-cd8d-4d36-926d-76f41b775fbb",twitter_handle:"zapp_ed"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/965489b4-a414-4fd0-ab8c-55911b1596aa.jpg",keyword:!0,link:"https://www.youtube.com/watch?v=GyA8tHNKmig",node_type:"clip",pub_key:"02574d6e8e787372184b6f17c40d6c6fe1777db9015801f95dfd24692784d767cd",ref_id:"c9e0fbb2-302b-44c3-b69c-dfac38c97f98",show_title:"BOLT FUN",text:"could also take this question right now actually. What's the fastest way to grow connectivity capacity for your node? Is it better to open a few big channels or lots of small ones. I don't have all the data from all the node operators, but based on what I heard, what I've seen, there is no single strategy that is a winning strategy. So as I mentioned before, you could be a zero fee router and still make money by selling channels, or you could never sell channels and just make money on routing and have very high fees. But the same way as the question implied, you could have a lot of smaller channels, like 1 million set channels and to a bunch of nodes. So you connect a lot of different areas of the Lightning network, all kinds of services for micro payments. Or you could just decide that you're going to have ten channels, but they are very big between high capacity nodes. So all of these in my opinion and in my experience work, and you just have to find the right nodes to connect to. And this is a dynamic system, so there's no like one solution, it just changes and as soon as a new node enters the scene, it changes the whole dynamic. So it's a moving target. And if you find your sweet spot, you have to like continuously change that sweet spot a little bit. But it's there is a possibility to make money. There are some people who make serious money, I can tell you that. But yeah, just to answer directly the question, the fastest way really to grow your node is that two ways. One is you use a service like Lightningnetworkplus where you have, where you get two channels for every channel open. Technically, this is you doubling the speed of your growth. The other way is you can open channels to whoever you want to and whoever accepts your channels and then you empty those channels through an exchange or through loop. I mean, that is possible. It's expensive, but you can do this, you can buy channels if you have the capacity to do this. That's also a very fast way because you just keep opening chance you could build your node in a day technically if you have the money. ",timestamp:"00:23:26-00:26:32",topics:["Lightning nodes"],type:"youtube",weight:4.8936503202747375},{boost:0,date:1658548800,description:"Managing [[privacy keys]] is difficult",episode_title:"WHY ARE WE BULLISH Lisa Hough JC Crown Brandon Quittem ep274",guests:[{name:"Brandon Quittem",profile_picture:"https://pbs.twimg.com/profile_images/1502403738861940736/9J5VuTye_400x400.jpg",ref_id:"65512044-7810-4ece-8156-5519e072cb66",twitter_handle:"Bquittem"},{name:"JC Crown",profile_picture:"",ref_id:"79ae57b7-59d1-416a-961e-9e584ced2dfa",twitter_handle:""},{name:"Lisa Hough",profile_picture:"",ref_id:"a65a3362-03a6-4a6d-a901-3067f8b5dc81",twitter_handle:""}],hosts:[],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/419512c2-e309-4b25-bfe2-cd481d53f66d.jpg",keyword:!0,link:"https://anchor.fm/s/11e95d20/podcast/play/55198112/https%3A%2F%2Fd3ctxlq1ktw2nl.cloudfront.net%2Fstaging%2F2022-6-22%2F277659593-44100-2-f891dab224966.mp3",node_type:"clip",pub_key:"",ref_id:"5992b639-b05a-4e6d-bd94-4c1b6907bda3",show_title:"BTC Sessions",text:"other thing is that managing private keys are hard and humans have no relationship to protecting information. And a Bitcoin that I'm sure everyone on this call is familiar with. Gigi, he explained it really well with the map is the territory meaning the information, your private keys or twelve word seats, that is your Bitcoin. And we have a lot of history and practice storing physical things we know to bury gold or put money under a mattress or in a bank fault. But we're not really good at information and so anything that makes that process easier is really important. And of course the reason is if the supply is held in individuals custody, it acts as a deterrent for any would be state level actor or other nefarious actor. Essentially says, good luck attacking us because it's going to be very hard and as long as you increase the cost of tyranny, I predict that that will repel the attacks because it's going to be really obvious how hard the attack would be to make. And so I don't know enough about the protocol to save it the finer details, but that's my sense. Yeah, I like that. And I like your Nigerian example. I think there'll probably be instances of even rather than even just countries, like even small tightening groups, small towns or something, having a sediment or whatever it may be, or in the future a FedRAMP for a citadel perhaps. We'll see how it goes. But yeah, no, I love that idea. JC. ",timestamp:"00:17:24-00:19:05",topics:["privacy keys"],type:"podcast",weight:4.651410079704728},{boost:0,date:1641859200,description:"About the Network mining simulator",episode_title:"Brink Projects: Research and Improvements for Bitcoin - TABConf 2021",guests:[{name:"Gloria Zhao",profile_picture:"https://pbs.twimg.com/profile_images/1144496084330266631/aPKPfoX3_400x400.png",ref_id:"cebd71c3-4ccf-452d-8ba7-4982f49fd060",twitter_handle:"GloriaHuiZhao"},{name:"Mike Schmidt",profile_picture:"https://pbs.twimg.com/profile_images/1320935020589158400/gFovyRlj_400x400.jpg",ref_id:"d503db9b-a7b1-49e1-8ef6-7541df3c2473",twitter_handle:"nytmike"},{name:"Jesse Posner",profile_picture:"https://pbs.twimg.com/profile_images/1467067234484830213/T6PtLZq1_400x400.jpg",ref_id:"bb55767f-dfbb-4182-8dd8-e1b08e0c6ad6",twitter_handle:"jesseposner"},{name:"Larry Ruane",profile_picture:"https://pbs.twimg.com/profile_images/1226076521/bike_crop_400x400.JPG",ref_id:"ce38f2dd-d41f-4957-ad83-671c3dc29cc5",twitter_handle:"larryruane"}],hosts:[{name:"TABConf (The Atlanta Bitcoin Conference)",profile_picture:"https://pbs.twimg.com/profile_images/1596233571521499138/YE8Us_Ml_400x400.jpg",ref_id:"e46f0c05-8cc5-4264-9c40-83b13f4edd0a",twitter_handle:"tabconf"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/e7d2a4ca-6b44-4a45-a94c-6f48987979f7.jpg",keyword:!0,link:"https://www.youtube.com/watch?v=UFro74sS8q0",node_type:"clip",pub_key:"02574d6e8e787372184b6f17c40d6c6fe1777db9015801f95dfd24692784d767cd",ref_id:"6731ba0c-c57b-4fb1-a2f6-6e1ec641e830",show_title:"TABConf (The Atlanta Bitcoin Conference)",text:"rulane. I'm a part time Brink Grantee, so I hope to go full time someday. Most of what I do is PR review, but I thought it would be more interesting than just saying I do PR review and then go sit down. I thought I would present a project I started a couple of years ago, and that some of my break time. I've used to improve this little project and thought it might be interesting to present here. And it's something I call a network mining simulator. And there's a link to the repo here. And what does this simulator do? It can produce a million blocks in 10 seconds. Okay, so that's actually a higher block rate than many altcoins, believe it or not. So not really it's not creating real blocks, it's creating simulated blocks. So what the simulator does is it's what it is, is it's a command line program written and go. It's pretty small. It's like 400 lines of code. So it's very limited there. It's very simple. And I consider it a good tool for learning and actually chain code seminar. They're using this as part of their curriculum to bring in new developers and teach them some of these concepts. So it's really for learning and intuition building. And so what the level of the simulation is, is very, very basic. It's just a set of mining nodes, and there's only mining nodes, and each of them is creating blocks, generating blocks, according to Hassan distribution, which is like real bitcoin that we're all familiar with. And then these blocks are relayed across a simulated network and the network has latency. So each branch of the edge of the network has latency. The network is not fully connected necessarily. So what these nodes do is it's just like in real bitcoin, they generate new blocks, and as soon as they generate a new block, they forward it out. Or if they receive a block that is better than the one that they already know about, then they relay that to their peers. And then there's logic in there to make sure that we don't have infinite loops of forwarding. And then just like in the real bitcoin network, this kind of set up generates these temporary chain splits. And I'm not talking about hard forks or soft forks here, but just temporary chain splits due to timing. And then there ends up being these reorgs when mining nodes find out about a better chain, and that creates stale blocks. So this simulator is really to get at that aspect of bitcoin where we have these small reords that happen, they happen today in real life. And I said before, this is really mainly for learning, but this could be useful. I'm not really sure, but it could be useful for resisting harmful protocol modifications. I mean, there's people that are proposing all the time we had the block size war, right, in 2015 through 2017, and that's kind of settled down, but it's possible in the future you could have something like that where people are proposing larger blocks or more complex block validation. That's kind of analogous to slower block propagation if the blocks take a long time to validate. Or sometimes I haven't really heard this too much, but if people propose like a shorter block interval, then that will change the dynamics of these mining, these chain splits that I mentioned. So these are some of the results of these bad ideas if they were to be implemented. Higher scale block rate which represents a loss of security because miners will not make as much revenue and they're not going to be willing to put in as much ash rate. Also it will encourage the formation of specialized block relay networks. We actually had that a few years ago, but I think it's not being used anymore. But a specialized block relay network is easier to attack. There's also some of these bad ideas can cause greater incentive for geographic centralization. Now there's always a little bit of an incentive to do that, but if we make certain changes, larger blocks and smaller block interval and things like that, that increases the incentive for geographical centralization that's also easier to attack for especially state level attack. So the simulator runs off of a configuration. It's just a file that has a static set of mining nodes, each of which has a static hash rate. So like I said, it's very simple. And then there's a static network topology and each network connection has a static network latency. So time is a big thing in the simulator. There's also a block interval parameter so you can specify. So default is of course 600 seconds bitcoin. But you could play with that and change the block interval. So here's a quick example, like a really simple this took me five minutes to think of. It's a simple example of a configuration file for the simulators. There's only five minors here and each row or each line is a mining node. It has the name of the minor, then the then the hash rate and then, and then to the right of that is are the peers. So this is not a fully connected network with a delay. So for each configuration or each peer has a delay network delay. And so you run that, if you ran that configuration, it takes about 10 seconds. And then you can see like a bunch of statistics that prints out a summary at the end. And like one of the most interesting things is probably the stale block rate. So we see like 1% stale blocks in that with that configuration. And then you can see the per nodes have different stale block rates because depending on where they are in the network and then you can change the parameters of this. So here I increased a couple of the delays, network delays and then the stale rate went up. It more than doubled stale rate here with that change. And then this next one, I decreased the block size to two minutes from ten minutes to two minutes. And then the sale rate went crazy as a 10% sale rate. So this will show that's very bad for the network. You can also turn on detailed tracing mode T option on this, and then it'll print a line for everything that happens in the simulator so you can analyze exactly how the reords happen. It's kind of cool to study when those happen. It does print a line too, for reords, and I have some future improvements. And actually, that's it. That's all I have to COVID. ",timestamp:"00:23:07-00:30:34",topics:["Network mining simulator","mining nodes"],type:"youtube",weight:4.627060462133696},{boost:0,date:1676449800,description:"The ramifications of the Paxos BUSD stablecoin situation for all of crypto",episode_title:"The Chopping Block: The SEC Is Attacking Crypto – Will Gary Gensler Succeed? - Ep. 456",guests:[{name:"Marc Boiron",profile_picture:"https://pbs.twimg.com/profile_images/1486397784844496897/ZyNlahT2_400x400.jpg",ref_id:"3f27d12e-0a50-42c0-8b76-b3bb15fa1ce6",twitter_handle:"boironattorney"}],hosts:[{name:"Tarun Chitra",profile_picture:"https://pbs.twimg.com/profile_images/1587539091444432897/Z6_nmrCB_400x400.jpg",ref_id:"dfad4b23-92ff-4aa1-9aa4-abc1d54cd6d3",twitter_handle:"tarunchitra"},{name:"Tom Schmidt",profile_picture:"https://pbs.twimg.com/profile_images/1563232354277085189/xQL92DR4_400x400.jpg",ref_id:"bc9d3bfd-36b0-4cbc-a491-9370decf4c99",twitter_handle:"tomhschmidt"},{name:"Robert Leshner",profile_picture:"https://pbs.twimg.com/profile_images/1587956987786104833/1SiKVj-s_400x400.jpg",ref_id:"ebaa2166-7982-423d-9f43-add89e7d47f9",twitter_handle:"rleshner"},{name:"Haseeb Qureshi",profile_picture:"https://pbs.twimg.com/profile_images/1581025415551889408/thQwG4lb_400x400.jpg",ref_id:"790e4217-dd9f-416f-b9f8-ed596937f5b5",twitter_handle:"hosseeb"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/7de0d293-8ae3-4362-8500-8f7300f3fe41.jpg",keyword:!0,link:"https://pdrl.fm/98e0b1/traffic.megaphone.fm/LSHML5322156529.mp3?updated=1676422435",node_type:"clip",pub_key:"037f7331a5bef6c6f880246747befcc3767f3bb9730bc5e6f7c3770f4184ed0bff",ref_id:"a3fd38b6-998f-4c62-ab60-554ef9275993",show_title:"Unchained",text:"Well, I think the worst case scenario that plays out is that Paxos is a smaller issuer than someone like center consortium that creates USD coin and that this creates some sort of precedent that gets used to attack other stablecoin issuers. $14 billion be USD is a lot, but it's the third largest stable coin. I think the bigger risk comes if there's precedent that gets used and established against other stable coins, USD coin and tether. And I think that's the sort of doomsday scenario in my mind, which is stable coins are like the primary on and off ramp and bridge between traditional markets and crypto. And however effective this attack on crypto is right now, by targeting banks and getting them to debank large crypto players. There's a lot of articles about this recently. I think by taking out stable coins, they're going to take out an even bigger on and offram for the majority of consumers and investors. And I think if it's successful, it draws into question how are people supposed to use this stuff? And fundamentally, I think this will take a long time to play out, especially if Paxos is going to take this through the legal system and defend themselves. I think it might be years, but it has the potential to put a shadow over stable coins for the two years that this takes to play out, potentially. And I think to the average user, I think this will be generally invisible. But I think the larger ramification is going to be the people that are saying, like, hey, I'm a traditional financial institution. Should I interact with stable coins? Or hey, I'm a bank, or hey, I'm a hedge fund. Should I interact with stable coins? And they're going to say, you know what, the last headline I saw on this was there's active litigation about the security nature of a stable coin and they're going to shy away from it. It just it creates a chilling effect for what I perceive to be the most important asset class in crypto. I think going after stable coins is impactful in a way that going after any individual company is not right. If Celsius is shuttered or if Kraken has a piece of its business shuttered, it doesn't really have a permanent effect on the rest of the ecosystem. But I think stable coins have an outsized impact on the rest of the ecosystem when they come under attack. And so I'm quite nervous, frankly, about this action against Paxos because of the ramifications and the knock on effects it'll have elsewhere. Well, I'm hoping that once we learn more about the nature of this lawsuit, that we see that there's some more explicit rationale that's not okay stable coin equal security, and it's something more idiosyncratic to what USD was doing or what finance was doing or something like that. That I think, is our best hope at the moment. If in fact, Gensler is going to say stable coins are securities. Bar none, unless Congress tells me otherwise. That's the way it is. Then the other counterside to that is that of course there does seem to be a lot of legislative energy behind having some kind of stable Coin legislative framework. And maybe that will be accelerated if in fact there is some regulatory action and public outcry and more attention on this question. Because the net effect of this, like I said, is going to be pushing stable coins overseas, right? If ultimately Circle can't issue it and Paxo can't issue it, well, Tether is not going to stop. And Tether, it's much harder to go after Tether, obviously, than it is to go after domestic US. Companies. That being said, BSD are any Americans using BOST? One, obviously Americans by and large don't need stable coins because they already have dollars. And then second, of course, Binance USD, binance is a small player in the US. They have very small market share with Binance US. And then of course in the US. USCC is by far the most well known stablecoin behind Tether. So it does feel like a weird target to choose. And I have to assume by the nature of that, that it's really a backdoor way of getting at finance than it is something more specific to stablecoin in general or even about Paxos. It's actually really unfortunate on the stablecoin legislation because that's just such a good point, that nothing's happened on that front. And unfortunately, right in the current Congress, it's just hard to see anything happening. But it is like the lowest hanging fruit possible. It's really easy legislation, honestly, when you think about what do we want to know? We want to know that you're holding assets that aren't just going to disappear and we want to know that you're actually holding them, basically, period. It's not that hard. And so it's just unfortunate that we're likely not going to see that anytime soon only because of the makeup of Congress, even though I think we've got a lot of folks in the House and Senate who frankly are really thoughtful on this issue and could deal with it quite easily. Yeah, it's a big hit to B and B as well, because again, speculation at the moment, but I think it seems to cast a bit of a specter that Gensler is going to be coming after Binance and especially with the affiliation with FTX. Again, I think this is kind of bullshit, but the narrative that propagated in the US by some parties that the downfall of FTX was caused by Binance or caused by CZ in some way makes him an easy target. And certainly, you know, now that he's consolidated market share and he's, you know, the the guy and the big guy on the block and the biggest overseas unregulated exchange or sort of underregulated, let's say, exchange, I think it's it's very clear that there's a lot of he's, he's he's the biggest game that there is to hunt in this industry. And I think Denzel is going to be going after him however he can, even if it causes some collateral damage along the way. When this news came out, was there any celebrating at Polygon that BNB was taking a hit? We never celebrate the failures of others more seriously. Honestly, it's not good for anyone in the industry. I mean, all L ones, all L two S do well with this industry growing. It sounds so typical, but it's just true. There's so much more to grow, and as you guys already know, plug and we're focused on a way bigger market. So the desire for anyone to go down is not big at all. It's really we just want to see the market grow, and this does not help that at all. ",timestamp:"00:22:50-00:29:30",topics:["stablecoins","BUSD","Paxos"],type:"podcast",weight:40.60979587666329},{boost:0,date:1672159829,description:"What is signature aggregation? How can it be done interactively and non-interactively?",episode_title:"Pieter Wuille and Tim Ruffing - Nesting, ROAST, Half-Aggregation, Adaptor Signatures (part 2)",guests:[{name:"Tim Ruffing",profile_picture:"https://pbs.twimg.com/profile_images/925128264502439936/XcmMIk8k_400x400.jpg",ref_id:"222f7374-6d68-4934-81ed-37567c515b59",twitter_handle:"real_or_random"},{name:"Pieter Wuille",profile_picture:"https://pbs.twimg.com/profile_images/1264051937172836353/n7gHdLbB_400x400.jpg",ref_id:"40260d2f-3480-47d6-8515-d2e780901273",twitter_handle:"pwuille"}],hosts:[{name:"John Newbery",profile_picture:"https://pbs.twimg.com/profile_images/1249773577659977728/T2e7Cy2W_400x400.jpg",ref_id:"76e8955c-952a-4700-a00c-ed0b1eecde92",twitter_handle:"jfnewbery"},{name:"Adam Jonas",profile_picture:"https://pbs.twimg.com/profile_images/672878026930032640/QKhWiMi3_400x400.jpg",ref_id:"6b623811-3131-4a29-8070-eb52a3fff63b",twitter_handle:"adamjonas"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/24a144b0-7ca3-40e9-9c42-86b9fce0b662.jpg",keyword:!0,link:"https://anchor.fm/s/12fe0620/podcast/play/62357551/https%253A%252F%252Fd3ctxlq1ktw2nl.cloudfront.net%252Fstaging%252F2022-11-18%252F1e2ca48f-a779-0eda-2bbd-357c9a24e294.mp3",node_type:"clip",pub_key:"02574d6e8e787372184b6f17c40d6c6fe1777db9015801f95dfd24692784d767cd",ref_id:"c13cad10-b242-4812-ad19-3bce525dfeb0",show_title:"The Chaincode Podcast",text:"So Peter, you have mentioned cross input aggregation as the inspiration for a lot of the work that actually has been done to date. Let's talk about signature aggregation. Maybe start with interactive flow aggregation and sort of a cross input aggregation history and then we'll explore let's first say. What signature aggregation is. It's very closely related to a multisignature, but the difference is really think of a multisignature with multiple participants each signing, but they can all be signing a different message rather than signing all different. Allow all messages to be different rather than the same. Now, signature aggregation can be done interactively or non interactively, which refers to the rounds of interaction at signing time. Is it possible for them to just create their partial signature now once their individual one, and can a third party aggregate them? Or do they really need to collaborate in order to produce that signature? Now, if we're restricting ourselves to interactive ones, which is certainly the easier thing to build, there is a trivial way of turning any multisignature scheme into an aggregated signature scheme. Namely, everyone just signs everybody's message because it's interactive. They're talking anyway. Effectively the message could be like, here are all the messages and all the. Designers take all the individual messages, concatenate them these forms to message you or like put into the multi signature. Or you say the message is key one signs message this, key two signs message that, key three signs message that, and everybody signs that. That makes an interactive aggregated signature scheme. Just take a multi signature scheme and turn into that and you're there. That is modulus some subtle details. Yeah, let's not go into that, but just as a warning. So don't do this at home. Yes, of course. Still have your friendly neighborhood cryptographer have a look at it before you move on. That's just because of being able to actually tease out private keys based on reuse nonsense or what is the actual issue that you'd be most concerned if I did that? What would be the first mistake I would make? In the music paper, I remember Russell O'Connor came up with this fairly far fetched attack of like if you just do that what I just said and try to use that specifically in the context of Bitcoin transactions with one signature, there was a problem, I don't remember. There could be a problem. If you're a single party and you have multiple messages that you want to. Sign, you can be tricked into and you participate multiple times, you can be tricked into signing the same one instead of different one. Right? It's like you could be tricked into, I think, signing your message twice instead of only once. And it's not even clear if that is a problem. But I really may not remember the details. And if you're interested, look at the Music One paper. There's an appendix that exactly specifies the attack and then the problems. But yeah, because this was sort of. Full Glorial knowledge of like you can build an IAS out of a multi signature scheme. Here's a way of doing that. And that paper is like maybe don't do just that. Because apparently if you have a simple idea and it looks obviously correct and you try to insecure and you try to really prove it secure, it can turn out that there are actually subtle problems with it. Interactive aggregate signature scheme. We now know how to do that. So we can take music one, music two. Those can be turned into an aggregate signature scheme if needed. And so that is something that could be used for, say, cross inputs aggregation, but only under the condition that all the input signers are collaborating, right? And usually that is the case. Usually there's just one party involved. But say in a coin join transaction there are multiple participants. So if such a scheme were to be deployed and you have a coin join, then of course coin joins are at the same time the strongest motivation for wanting something like cross input signature aggregation, I think. Because think about it this way, every input in a bitcoin transaction today has one signature. In sort of a music taproot world, they will in fact all have exactly one signature. That signature takes up some block space. But if we were to be using a cross input signature aggregation scheme, there would just be one signature for the whole transaction. So that's a cost savings. And it is a cost savings that you shouldn't call it a coin join. But like a pay joint where A wants to pay B and C wants to pay D, they can join these two transactions into A and C pay B and D. And interestingly, in a cross input signature aggregation world, this aggregate transaction would be smaller than the sum of the individual ones because there's only one signature rather than two. So there's this economic motivation. Now that economic motivation is small. It's partially due to the fact that Seguid introduced a discount for witnesses. So those signature are already relatively inexpensive. They also have a relatively low cost on the ecosystem, but this makes the differential between the two fairly small. So it isn't like, wow, this is going to incentivize everyone to start merging their transactions. But it is a nice thing in the sense of like it gives a potential justification like, hi, I regulator, why are you merging your transactions? Being able to say, well, it's cheaper is a much better justification than like. Makes sense. So that's interactive aggregation, it has complications. All aggregate signature schemes that we want to do across more than individual inputs, like need consensus rules to work with them. In the same sense that, like, as explained, like, in a way, there's a relation with batch validation, where in batch validation we're thinking of, well, you first run all the scripts, pretend all the signatures succeed, but keep a list of all signature checks that have to be done and now do all those signature checks at the end. In a cross input signature aggregation world, it would be exactly the same, except there is now just a single signature provided rather than multiple signatures. And even technically these schemes are very similar. So that the math that's used for both is comparable. Except of course, in one case you have multiple signatures that need to be merged together versus just one. So another reason to see why this requires a consensus change is really like what consensus supports now is no signature verification. This is really like an algorithm that takes a single public key, a single message transaction and ",timestamp:"00:18:49-00:26:42",topics:["Signature aggregation scheme","signatures"],type:"podcast",weight:13.299509345139551},{boost:0,date:1669105800,description:"Statements of newly appointed FTX CEO John Ray in the first day declaration",episode_title:"The Chopping Block on FTX/Alameda: Is Sam Bankman-Fried 'Crypto Kanye'? - Ep. 424",guests:[{name:"N/A",profile_picture:"https://pbs.twimg.com/profile_images/1478260779522658306/rm6XqGZx_400x400.jpg",ref_id:"9862384f-b99b-4777-aa71-538d41591686",twitter_handle:"unchained_pod"}],hosts:[{name:"Haseeb Qureshi",profile_picture:"https://pbs.twimg.com/profile_images/1581025415551889408/thQwG4lb_400x400.jpg",ref_id:"790e4217-dd9f-416f-b9f8-ed596937f5b5",twitter_handle:"hosseeb"},{name:" Robert Leshner",profile_picture:"https://pbs.twimg.com/profile_images/1587956987786104833/1SiKVj-s_400x400.jpg",ref_id:"08f19db5-dbb2-4ca7-886a-d4aaa9de1e0d",twitter_handle:"rleshner"},{name:" Tom Schmidt",profile_picture:"https://pbs.twimg.com/profile_images/1563232354277085189/xQL92DR4_400x400.jpg",ref_id:"1c211a97-8535-426b-9091-9d23ae0fbc11",twitter_handle:"tomhschmidt"},{name:" Tarun Chitra",profile_picture:"https://pbs.twimg.com/profile_images/1587539091444432897/Z6_nmrCB_400x400.jpg",ref_id:"8d941896-7865-49b9-9505-cf91882986bb",twitter_handle:"tarunchitra"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/7de0d293-8ae3-4362-8500-8f7300f3fe41.jpg",keyword:!0,link:"https://traffic.megaphone.fm/LSHML8128135235.mp3?updated=1669122227",node_type:"clip",pub_key:"0201497bb9e66239cdf8fe218ee3e3c7c5b1bea880787ccdd433e7af55f88b53ed",ref_id:"51ecdc95-4e1d-448b-923c-5a7e1822f131",show_title:"Unchained",text:"you guys are at a brick wall. I take it you guys are trying to hide your location. They're in the same elementary school gymnasium. That's where they go and live from right now. This is a metaphor about the state of the industry, is what it is. That is true. It's been a pretty dark and depressing couple of weeks. Normally we run the show every couple of weeks. We're doing another show on basically one week after we did our previous show. Just because the amount of news and craziness was going on with this FTX fallout has been just absolutely incredible. I'm going to go to and get into it and kind of walk through what's happened since last Monday. If you recall, last Monday, FTX had already entered the bankruptcy proceedings on that Friday night before last week. Friday before last, there was this midnight massacre when FTX got hacked. And we've learned much more about each of these things to understand exactly what took place in this quote, unquote, unauthorized access to FTX accounts. So the first and most important thing that happened was that there was an affidavit released by the new CEO, John Ray, who is basically the liquidator who liquidated Enron. And he essentially described the absolute pandemonium that was the books and records and corporate controls at FTX. And so what he stated in the filing and it's absolutely incredible, incredible filing. I recommend you read it. It's pretty light reading if you can skim through like kind of the perfunctory stuff. But there's a choice. Quote, at the beginning of this filing, he says, Never in my career have I seen such a complete failure of corporate controls and such a complete absence of trustworthy financial information has occurred here. From compromised systems integrity and faulty regulatory oversight abroad to the concentration of control in the hands of a very small group of inexperienced, unsophisticated, and potentially compromised individuals, this situation is unprecedented. So there's all these revelations that we're now getting of just how horribly managed and horribly run FTX was to having all of the private keys in one shared Google spreadsheet that apparently everybody in the core team had access to private loans being given from the company to Sam personally, as well as to buy Bahamian property for employees. Almost negative accounting, just absolutely incredible oversights and just understanding where the money was going and keeping things running. Of course, I think we alluded last time to the Mickey Mouse accounting firm that actually did their audits for 2021 and John Ray basically stated in the affidavit, look, I do not believe that these audits should be considered to be reliable because these auditors are just not serious people. The way he called them out was pretty hilarious. He's like, FTX US was audited by Armanino, a firm I have heard of. FTX International was audited by whatever the name of the firm was, a firm I've never heard of, and whose only claim to fame is to have opened the first CPA in the Metaverse. That was like, amazing. There were so many Zingers that were like, I've read some pretty staid and boring bankruptcy filings, but that one has a lot of character in it. And bankruptcy filings aren't exactly where you're like, wow, the great American novel was written, but that one actually could be. There's a lot more in there as well. So beyond the selfdealing that was taking place on the balance sheet of FTX, it was also revealed in there that Alameda was explicitly exempted from liquidations within their risk engine. So confirming what many people had suspected, that there was an enshrined special relationship between Element and FDX. And now, again, we don't know the extent of it, but at the very least they had a different status in the risk engine compared to any other marketing. All I have to say is if you followed any Djen and on trading account since 2019, you would have already known that there was tons of evidence and analysis. I don't know how investors who invested in it did not look into that because that was like pretty public knowledge. In fact, actually, Alex PAX work with you actually talked about his experience investing in or not investing in Almata in 2019. And I feel like a lot of the stuff there should have been stood out as diligence for any future investor, but somehow everyone just kind of ignored it. Well, so my assumption was that that was obviously true in the early days, right? I mean, it was explicitly part of the strategy of FTX in the early days, was that Alameda was going to be the kind of point market maker, but the idea was that they cleaned up their act over time, right? If guinea was on Odlots, the founder of Winchmemt, and he said explicitly, like, yeah, we kind of assumed that they'd clean things up. Same thing that Kyle Davis said, the reason why Three Arrows was trading on FDX, that they assumed that there were just corporate controls in place that prevented this after they went big. So it's one thing to have this as a bootstrapping mechanism when you're a small Hong Kong exchange and you're kind of trying to get something up and running. It's another thing when you're a $40 billion company. You've got all these stall words investing on the captable. I would not be surprised if there were, again, misrepresentations that were made to investors about this because almost certainly it's one of the most obvious things investors would have asked for. And it's also almost certainly the case that they did not turn over source code to investors for Diligence. You can tell from all the stuff that we're hearing now about how Diligence went that it was gun to the head. It was very like, look, you've got to commit now, you've got to put money in now. These audits and this data room is all you're getting. And if you're not in, then we're going to go to the next guy, and there's many next guys that are lined up ready to put checks ",timestamp:"00:01:11-00:06:44",topics:["FTX","John Ray"],type:"podcast",weight:6.117964948082447},{boost:0,date:1632355200,description:"What parts of ASIC miners are the most difficult to obtain?",episode_title:"The ASIC Mining Hardware Market",guests:[{name:"Vincent Zhang",profile_picture:"https://pbs.twimg.com/profile_images/1158285609196109825/fuB-e6lm_400x400.jpg",ref_id:"98e7bc98-3a3b-4ddf-9b48-5dcd78973739",twitter_handle:"Whatsminer_MBT"},{name:"Vincent Vuong",profile_picture:"https://pbs.twimg.com/profile_images/1260974518547312640/n47yvbNL_400x400.jpg",ref_id:"8390e230-e36b-4e0d-9f5d-70c6635bf3c2",twitter_handle:"BitcoinVincent"}],hosts:[{name:"Will Foxley",profile_picture:"https://pbs.twimg.com/profile_images/1580970227193376776/9oQfeExj_400x400.jpg",ref_id:"704b9e82-3e40-40b6-874c-6bb8fadafbef",twitter_handle:"wsfoxley"},{name:"Zack Voell",profile_picture:"https://pbs.twimg.com/profile_images/1595803006737448961/fFrf7VJb_400x400.jpg",ref_id:"e32c7661-c635-4089-a620-ffce509eff0e",twitter_handle:"zackvoell"},{name:"Compass Mining",profile_picture:"https://pbs.twimg.com/profile_images/1425165074373791744/f2CgInvP_400x400.jpg",ref_id:"812e5d37-47fb-4077-915f-df52e2ef84d8",twitter_handle:"compass_mining"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/ae91fac6-a1af-4877-9a92-e793d556ee66.jpg",keyword:!0,link:"https://www.youtube.com/watch?v=qKeUCNXa4Uc",node_type:"clip",pub_key:"03c18d0c6c35333f22bc524e21a5fd1d2d9886f5d4d958dc1de95d025de5c84cfc",ref_id:"d2273e47-dfdb-4847-8690-ef58fe22d5c0",show_title:"Compass Mining",text:"Totally. So I want to move back to an earlier question or earlier thought that you had. Vincent from compass. Damien, if you could share my screen really quickly, looking at just like ASIC parts in general, interested in knowing your thoughts on what parts of an ASIC are the most difficult to come by. So I'm not sure if you guys can see my screen currently, but if you guys can't see my screen right now but let me get a link over to Damon, he can throw this up. But basically, when you look inside an ASIC, there's a million different parts, right? And all those parts are kind of hard to come by. Some parts are harder than others. And I'm wondering, from your perspective in the procurement area, what parts inside an ASIC right now are so hard to come by that it might be causing a bottleneck? Like, we talk about the hash boards a lot and like the Wafer chips, but there's other parts inside of ASIC, like the PSU even, like going inside that. There's different parts inside that that are difficult to come by. So, Vincent, from what's fine, actually, I'll start with you since you are more on the development side of these machines. But yeah, if you could scroll down maybe a little bit more. Damian, we could take a look at some of the parts inside of an ASIC. Vince, I'll give you the floor. Yeah. So I can see that. Yes. Is there any part inside an ASIC minor that is particularly tough to come by with sanding? Of course, the hashboards themselves can be difficult to procure from chip manufacturers. Is there anything else others should be aware of given that there's a lot of demand right now to fix minors as well, and people are trying to find locations where they can be fixed? Okay, so this is a good question. So for the minus from our site, follow impulse can be used for all this. The fan is uniformed for all the minus. But yes, there's different for M 30 series and M 20 series. So the fence, the difference is M 20 series is four pin fence and six pin fence. And now we are supplying the four pin fence. In terms of Om 30 series, it can be used. All the models are used the same fence, and the control card and adapter card can be uniformed. However, as you said, the hashboard cannot be mixed with each other in case only when the hashboard are being produced with the same bin of the chips. So for example, M 30s plus may be produced with bin one, bin two, when the users want to replace the mix the hashboard from different miners. So what he needs to do is he need to make sure the model of the miners are same and the bin of those hashboard are the same due to the hashboard of the different miners may be different because, for example, some of the chips need to have 14 watts power to make them work. So if we put twelve watts power supply units on those miners, on those chips, it won't work. Right now, the power models, we have two types. One type is twelve. Watts and another type is 14 watts. Okay. You cannot mix use the twelve watts power supply unit to the minus. Need 14 watts power supply unit. Okay, so this is the difference why we cannot just make it simple just because the chips we can get, they are not as beautiful as just like one. Okay, so different chips from the same wafer, okay, so they have different performance and characters. So we have to make the minus based on the research on the chips we can get. So that's why all the minors, they are different. Okay. Only the same model of the minus. So we have a different version number for people can see M 30s plus, but the M 30s plus maybe have version one. Version two. Okay, so only version one the same version of the hardware so they can mix with the hashboard. So even with the same model of the minus, still we need to check the hashboard. So whether they are from the same bin or not from same bin of the chips, so we actually have the training and the documents to present. That awesome. Vincent, same question to you. Maybe like when you're looking at an ASIC and you're looking at the hardware market, North America, what are the hardest parts to come by currently inside of ASIC? The good thing about brand new Asics is they don't break that much, I hope. But it's really hard for us and a lot of people in the secondary markets to procure hash boards, control boards, and then just the general PS use. So the PSU is a the biggest failure point, mainly for bidding units, less so on the MicroBT units, thank God. But yeah, it's hard now because for MicroBT, just like Vincent said, there are multiple types of miners, right? And so each one, I think they had to create different power supplies for each different one. And so it's harder to mix and match and find the exact power supply that you need. Especially because some used to accept 277 involved and now they don't accept that anymore. And so those are the type of equipment that's what I'm usually looking at. And for the older machines, it's much easier to zombify them. So like the S nine S, you could interchange hashboards relatively simply, you can interchange every piece of equipment. Now it's becoming a lot harder to do that and I'm not sure if that's from a manufacturer's design point of view or they just want to limit it and reduce the amount of like interchanging and swapping of parts between miners. Yeah, no, that makes sense. Maybe Compass can become a spare part center in North America so you could change some power supply unit can joke and keep it there in North America. Exactly. Right now we already have multiple services center in North America, so we have two services center in Canada and so we should have two services center right now in united States, also one in Canada. So bit forms and heart rate, they are our repair centers. And in United States, one is HM. Tech. Okay. And I do not remember the name, but they should have some small quantity of the spares available. But recently the demand of the spills become huge. So specifically for power supply unit and the control board. Yeah, and I think that's also in part due to when you guys start dealing with more institutional clients. And a lot what they're trying to do is they want to stock up on these parts and then have repair technicians on site that can quickly repair them versus once the machine goes down, they order the part. And this is just so they can minimize the amount of downtime, because everybody wants to take advantage of this period of extremely high probability. And having even one machine down is a lot for even a couple of days, right? Yeah, for sure. Definitely. We can't make predictions necessarily too far in the future, but it's one of the most profitable times to be mining at all. That makes perfect sense. We know that miners are boarding Asics themselves, not only just spare parts, but it makes perfect sense to see the pattern repeat with spare parts. ",timestamp:"00:36:03-00:45:52",topics:["ASIC Miner Parts"],type:"youtube",weight:4.625530958293724},{boost:0,date:1624507200,description:"How [[Ali]] got into [[Bitcoin]]",episode_title:"Bitcoin Fixes This 48 Small Business with Ali",guests:[{name:"Ali",profile_picture:"",ref_id:"1169edf2-a89f-4d89-94a4-1be1a7b9aef0",twitter_handle:""}],hosts:[],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/2536a974-d668-4ac2-8613-0b37aa0ca08c.jpg",keyword:!0,link:"https://anchor.fm/s/2a4e8034/podcast/play/36003846/https%3A%2F%2Fd3ctxlq1ktw2nl.cloudfront.net%2Fstaging%2F2021-5-23%2F969a4306-e9eb-95c5-0e15-42d37c0e61e8.mp3",node_type:"clip",pub_key:"",ref_id:"6565a1d2-53e0-48a8-bd22-9ea1080c4364",show_title:"Bitcoin Fixes This",text:"That's awesome. So how did you get into sort of Bitcoin in the first place? It didn't come out of nowhere. And how did you start putting some of your corporate treasures into Bitcoin? What's the story behind that? Yeah, so it started in 2020. We were a class of 2020. We're pretty new to this space. And after March of 2020, I had this feeling that there's something really messed up with the financial situation and that I needed to find a solution for my personal wealth. So I kind of went on this quest in search of a solution. And then I bumped into the Number Zero and Bitcoin by Robert Breedlove. And I bumped into Preston Pitch and say Fiden's book. And so I kept reading and learning. The more I learned, the more I buy Bitcoin. And then I bumped into Jeff Booth's book. I said, Tomorrow devoured that in like three days, and then bought more Bitcoin. And I just kept buying it more personally. And then I kept dragging my partners in with me and I felt like I found a solution and it grew from this cool investment idea to the best investment idea to a way of life where I need to incorporate my business into it, I need to incorporate my kids into it, I need to incorporate my family, everyone. Right? So it kind of consumed me personally. And then my partners. And then we were sitting and talking for two times, I believe, about putting the companies treasury into Bitcoin, but we didn't really pull the trigger on it. And as soon as we heard the MicroStrategy that first time buy that they ever did, it was like 250,000,000. I believe that's when it was like, that's what pushed us over the cliff. And we said, you know what? This is a race of accumulation. Everybody is going to want to own Bitcoin. Every Corporation is going to want to buy it eventually will. So we got to go all in and we did that. And then here we are. And you still haven't had to sell any Bitcoin, which is rather remarkable. How have you managed to do that? Well, good question, actually, Jimmy, because a lot of people are asking me about how do we take Bitcoin payments and all that. And the reason why we never have to sell any Bitcoin is because we never used it as a payment method. We just used it as a savings technology. So we operate 100% of Fiat. We pay our employees, our suppliers, our rent or electricity, and then whatever is left, whatever profits left, we just take that and we just convert it into Bitcoin. And that profit we never had to sell to this day to expand. The way we're able to do any of our expansions is we just finance it and then we just put it as an expense, we put those payments as an expense, and that's how we never sold any Bitcoin. It's a simple strategy, but not a lot of people realize that they can do it with their business, but it's very effective. It's very helpful for your business. I think any business right now is going to struggle with inflation and with monopolies of their industries. And you need some sort of edge. You need to have a balance sheet strategy. Otherwise you're just going to fall behind year after year and you're going to wake up five years down the road with your money being worthless. And you're going to say, Man, I wish I figured out this Bitcoin thing earlier and that's why we're promoting it here. We love it when small businesses get into Bitcoin. Yes, of course. It's nice when you hear the big Corporation announce their billion dollar buys or whatever. But for me, I get really pumped up when a small business DMs me and asks me about, hey, we're going to do the same thing, what you guys are doing, and we want to know how to do this or how to do that. And this is what keeps us going. This is why we promote human freedom and this is what gets us ",timestamp:"00:14:04-00:18:56",topics:["ali","bitcoin","bitcoin","bitcoin"],type:"podcast",weight:4.618438363076077},{boost:0,date:1610901076,description:"Moving away from the principles of America which is small government",episode_title:"Quoth the Raven #237 - Jake Ducey",guests:[],hosts:[],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/710ac70a-11fc-40ec-a2a2-01b92fb8015e.jpg",keyword:!0,link:"https://mcdn.podbean.com/mf/web/6kaqr2/ducey.mp3",node_type:"clip",pub_key:"",ref_id:"7b4a8ab4-5254-4195-8546-183e6a078a7a",show_title:"Quoth the Raven",text:"I guess it's true. We're moving away from the principles of what America was about, which was small government, and we're electing psychopaths, and we're giving them free rein to bring as many psychopaths in as they want. And we have such a docile population that nobody's critical thinking, nobody's looking at the ramifications of this, and nobody's looking at all. They just do whatever they say. I hadn't thought of it like that, but I mean, it's hard to argue against that point. But we live in a representative republic, so these are the representatives we've chosen to represent us. And, I mean, we're reaping what we so to some degree. I think what you just said makes a lot of sense, though, because I said the exact same thing yesterday in a conversation, which is people are just doing what they're told. That's it. There's no pushback. There's no questions. There's no nothing. If Gavin Newsom told you to do your laundry on Tuesdays only do you do it? Most people would do it. Yeah, right. And he said the reason was because of global warming. And so only on Tuesdays. Yeah, I mean, if he said that, there would be scores of people lined up thinking like, all right, well, there must have been some committee, some task force, some focus group that got together to arrive at that conclusion. And the truth is, as you know and I know, they're really just kind of pulling things out of the sky. Yes. And it's not just with political rule, but that manifests itself in our world. I mean, most people have terrible health, terrible finances, and they, in general, have a very subpar life. And I think it's because we've been conditioned in our society to not think for ourselves. And I think, personally, that it's a long standing social programming that's been designed to ultimately get total control over the population. Isn't it weird when you kind of step back I was talking to somebody the other day about preventative medicine and two different types of medicine. One, where you are trying to address things before they occur, and the other one where traditional medicine where something goes wrong, and then you try to deal with it then. And when you step back and you look at the way that we live, not just we talk about macro all the time, which is this incessant and constant need to be spending and that that is the virtue of the economy, supposedly, as these people tell us. But also, you look at things like you're talking about you look at things like mental health, like physical health, exercise, diet. We've just been conditioned to make the worst possible choices when it comes to all of those things. Yeah, we have. I mean, I'm more sinister. I think it's all on purpose, and I think that there's very evil people in the world that want total control over the world. But yeah, I mean, my rule of thumb started when I was 19 in college, you know, when I started everything I was doing, and I raised my hand in economics class and asked my teacher why we couldn't audit the Federal Reserve as a freshman in college. It was 2011, I think maybe I think 2011. And he told me to shut up and memorize the textbook. So I dropped out. And my Mo has always been, never believe anything the government tells you, and basically, never do anything anyone else tells you, too. People don't tell you to start a business or any of that. And that's kind of always been my Mo. I don't advise it for everyone. It's worked out pretty good for me. Yeah, well, you're letting the market decide what your value is. You're not letting an econ professor put a dollar amount on it. You're not letting a degree put a dollar amount on it. Right? You went out and you started doing your own thing. And what the hell is your own thing, by the way? Because one of the things I wanted to talk to you about, we didn't talk about on your podcast. You have another podcast channel called I love Prosperity? And that's the one where me and you were chatting, but your main YouTube account is just called Jake Dosey. You got 600,000 subscribers. What the fuck is going on on this channel that you have 600,000 subscribers? What is Jake do see up to? ",timestamp:"00:14:09-00:18:47",topics:["America","Small government"],type:"podcast",weight:4.613381505012512},{boost:0,date:1590692100,description:"Concrete ways for companies to tap into blockchains",episode_title:"Episode 5: The Future of Corporations in the Age of Blockchains",guests:[{name:"Jason Potts",profile_picture:"https://pbs.twimg.com/profile_images/1444448536947396612/MWoMpiut_400x400.jpg",ref_id:"83de5ad8-399d-4d5e-beb6-036bc73f2e60",twitter_handle:"profjasonpotts"},{name:"Aaron Wright",profile_picture:"https://pbs.twimg.com/profile_images/1467700275209195530/MuLAUZ7l_400x400.jpg",ref_id:"926d7ff6-0327-49a0-811e-3f2e2db2fc5c",twitter_handle:"awrigh01"},{name:"Luis Cuende",profile_picture:"https://pbs.twimg.com/profile_images/1590314672640630784/SniHt1kT_400x400.jpg",ref_id:"bf8c4b16-8bdb-4249-8e34-9c4458808890",twitter_handle:"licuende"}],hosts:[{name:"Jeremy Allaire",profile_picture:"https://pbs.twimg.com/profile_images/1501707897641779208/cpB2Dk9__400x400.jpg",ref_id:"df622380-4129-458c-8e10-8088f172f002",twitter_handle:"jerallaire"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/99d17d22-4448-4267-9065-f55b341f43d2.jpg",keyword:!0,link:"https://mcdn.podbean.com/mf/web/2jwy9x/secure_money-movement_episode-5.mp3",node_type:"clip",pub_key:"",ref_id:"4b80af11-a773-43bb-8ada-b5771e2cf481",show_title:"The Money Movement",text:"last item, which is for projects in the world today or companies in the world today, what are some concrete ways that they could begin tapping into this and using it? And if you want to share an example too, that'd be awesome. Yeah, definitely. I think murder like companies it's communities, I think I mean, companies can also use DAOs. Like we ourselves use dio. But communities are super interesting. For example, there's this virtual world in VR called the Central Anti, owned by its users, and they have this do that they use. So users absolutely govern everything in the platform. So it's extremely helpful. One thing that I've been also involved with is called Help out. And the idea is to allow for people to create, like, very small, localized health clubs or volunteers and supervisors who are able to donate funds and also receive donations all over the Internet and then give those donations to people in need. So the idea is that you don't need to wait for this big, kind of slow moving nonprofits to actually take action. You can make a thousand, like, decentralized organizations bloom that actually tackle these problems in a very small scale. So, yeah, I think online communities are wonderful, and I think we're moving towards a world where there's going to be more and more communities. With the employment we have right now and the need for meaning as a civilization, I think communities are the way to go. I love it. It's so exciting. Luis, really appreciate you joining us to share your vision and share where you guys are at. And we'll be tracking it really closely and wish you really continued success and we'll talk really soon. Louise, thank you so much. Thank you. ",timestamp:"00:25:49-00:27:22",topics:["Help squads","Luis Cuende","nonprofits"],type:"podcast",weight:4.587138891220093},{boost:0,date:1519171200,description:"The anti-vaccination movement in the 19th century",episode_title:"PFP063 | Anthony Daniels (Theodore Dalrymple) | “Public Health” as a Lever for Tyranny (PFS 2010)",guests:[],hosts:[],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/624262ef-b30f-4114-8061-e310187e6bb4.jpg",keyword:!0,link:"https://www.youtube.com/watch?v=-KZBCni4Mik",node_type:"clip",pub_key:"02574d6e8e787372184b6f17c40d6c6fe1777db9015801f95dfd24692784d767cd",ref_id:"04e7ce48-3c54-41ef-a7d5-59f923b85354",show_title:"Property and Freedom Society",text:"another very important example struggle over smallpox vaccination in England and Wales during the 19th century. In the first two or three decades of the 20th century, it probably come as a surprise to you to know that the anti vaccination movement was one of the strongest and most durable social movements of the 19th century, and it published mass circulation journals continuously for 50 or 60 years. In response to the British government's attempt in the 1850s to make the vaccination of children compulsory and instituted fines for those parents who did not have their children vaccinated. That compulsion and vaccination in the United States is still quite common. The arguments of antivaccinators were composed of two main strands. I have quite a large collection of anti vaccination literature. The first of these was that vaccination was, as a matter of empirical fact, either useless or harmful, responsible for spreading such diseases as syphilis and even leprosy, and also that it was ineffective against small bonds. Well, this is not a strand that I'm interested in here. There was a second strand according to which, even if compulsory retination were effective against smallpox, it would still not be justified because it would make the state, and not the parents of children the arbiter as to how they the children should be best looked after, and that this was the beginning of a slippery slope. Interestingly, this was a movement that was predominantly working class. Working class was asking for protection from the state, not protection of the state. And I'll quote just one ditty from here the flavor of England state. Men of England, claim your freedom, make the noble stand. Sweep the unjust law of tyrants from your native land. Strike the blows of vaccination, claim your liberty. Sound the echo through the nation. Britains shall be free. Well, in the event something like a compromise was reached in 1898, according to which parents could opt out of having their children vaccinated if they could persuade a magistrate that they were conscientious objectors to vaccination. The model for conscientious vaccination that conscientious objection during the first world war. In any case, as it happened, smallpox declined as a serious health threat in western countries for a variety of reasons. Only one of them vaccination and the passion they went out of the promises. Well, immunization against contagious disease is an interesting case because for no such diseases, somewhere between 80 and 90% of the population must be immune in order for there to develop what is called herd immunity. That is to say that the nonminis are protected against infection because an epidemic cannot take hold in the population. Well, the success of immunization campaign is in eradicating or controlling various contagious disease, as in my view encouraged the epidemiologists and the public health doctors and governments ever since. And of course the discovery of the damaging effect of smoking autoimcountry. And they hope to repeat these trials for the common diseases which are currently great significance both in terms of mobility and economically in western populations. Diseases such as hypertension, coronary artery disease, stroke, type two diabetes, osteoporosis and various forms of cancer which seem to be related to lifestyle. In most such cases, of course, causation is rather less tearcut or well established than it was for infectious diseases or even the connection between smoking and various kinds of disease. But nevertheless, measures of varying degrees of coerciveness are proposed to reduce the burdens of these conditions from the contents of food to denial of medical treatment to those whose lifestyle has brought on their own conditions. Well, the lockers stand out. Public health authorities to interfere in the lives of individuals of the general public derives in large part from the fact that while the risks are taken by the individuals, the costs of consequent illness, when it develops, are borne by others in the form of idle insurance or of course in Britain, by the state medical system. In other words, I smoke, but you pay for the treatment of my cancer. And the hope of many people on Britain, I think, is that eventually they'll have an extremely expensive procedure which will more than pay back the amount of taxes that they have paid. But of course, it's not possible for everyone to get more out of the system. Nevertheless, that is the hope. Now, it's again obvious that people who pay the taxation cannot be the administrators or controllers of it and a class of bureaucrats charged with reducing costs or sometimes making profits charged with the administration. And incidentally, they are likely to transfer as much as possible of the money raised by taxation or insurance into their own personal funds. And this is not a negligible thing. ",timestamp:"00:17:44-00:24:10",topics:["anti-vaccination movement","Small pox","vaccination"],type:"youtube",weight:4.582683563232422},{boost:0,date:1674635400,description:"The large percentage of vested Solana in FTX bankruptcy",episode_title:"The Chopping Block: Here's Why Gemini Could End Up Filing for Bankruptcy - Ep. 447",guests:[],hosts:[{name:"Haseeb Qureshi",profile_picture:"https://pbs.twimg.com/profile_images/1581025415551889408/thQwG4lb_400x400.jpg",ref_id:"790e4217-dd9f-416f-b9f8-ed596937f5b5",twitter_handle:"hosseeb"},{name:"Robert Leshner",profile_picture:"https://pbs.twimg.com/profile_images/1587956987786104833/1SiKVj-s_400x400.jpg",ref_id:"ebaa2166-7982-423d-9f43-add89e7d47f9",twitter_handle:"rleshner"},{name:"Tom Schmidt",profile_picture:"https://pbs.twimg.com/profile_images/1563232354277085189/xQL92DR4_400x400.jpg",ref_id:"bc9d3bfd-36b0-4cbc-a491-9370decf4c99",twitter_handle:"tomhschmidt"},{name:"Tarun Chitra",profile_picture:"https://pbs.twimg.com/profile_images/1587539091444432897/Z6_nmrCB_400x400.jpg",ref_id:"dfad4b23-92ff-4aa1-9aa4-abc1d54cd6d3",twitter_handle:"tarunchitra"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/7de0d293-8ae3-4362-8500-8f7300f3fe41.jpg",keyword:!0,link:"https://traffic.megaphone.fm/LSHML8027241616.mp3?updated=1674608143",node_type:"clip",pub_key:"037f7331a5bef6c6f880246747befcc3767f3bb9730bc5e6f7c3770f4184ed0bff",ref_id:"ecaaa46f-b7ad-49b7-aae3-402befc21ab6",show_title:"Unchained",text:"who come in the door. I agree with this. I think what is interesting is how many people are clamoring for FTX to be restarted. Like even after FTX declared bankruptcy, it's sort of mildly related where people feel like there is some gap in the market because they're like, look, I loved the FTX, UX, I loved the cross margining, and yet now it's gone and nothing is really replacing it. And now even John J. Ray was discussing this week the possibility of restarting FTX. So it's like, I agree with respect to like, hey, this is sort of a small moment in time market for these bankruptcy claims, but there is a question of like, who's going to sort of come fill that gap or our binance and the other big exchange is going to develop their own sort of similar products. By the way, I just looked it up. So the FTX Almita combined had 50.5 million sole, which is over a billion now, and it completely vests in 2028. So I think the vast majority of it is actually because they did those crazy seven year vests even with their soul. What? Yes, there's a lot of ecosystem sales. Those were seven year vests, I guess. So you're talking about serum. I'm not talking about salana. No, I'm talking about salana. That's like the crazy part. They agreed to a longer vest than the default. What? That's insane. That's so insane crazy. Yeah, there's a Salana Foundation blog post talking about the 50.5 million so 54.5 million soul. You could definitely bootstrap a prediction market on betting on how that gets distributed. Well, I think that's enough. That's enough money. But it also means you need, like, a trustee for seven years to, like, manage the liquidation of this soul, you. Know, Make Madoff was much longer than that, so it's not that crazy. Yeah, I do think the whole wind down process has dust that they just continue to collect and report on for years and years and years. Yeah, it's going to be painful. Well, with respect to FTX, we did get a story that the liquidators identified 5.5 billion in liquid assets for the FTX total estate. We still don't have a good number on the liabilities, so we don't know what that represents in terms of a percentage recovery, but it's at least better than some people were originally ",timestamp:"00:40:52-00:43:17",topics:["Solana","FTX"],type:"podcast",weight:28.556055558933764},{boost:0,date:1632628800,description:"[[Bitcoin]] is a Money that Reflects Human Time Effort and Efficiency is Tied to [[Energy]]",episode_title:"WHY ARE WE BULLISH Denver Bitcoin CryptoMags Lord Fusitua Jim Crider ep203",guests:[{name:"Jim Crider",profile_picture:"",ref_id:"acb937b5-97e9-4881-a45e-0e9511382019",twitter_handle:""},{name:"Lord Fusitua",profile_picture:"https://pbs.twimg.com/profile_images/1511890587586560000/xGb_Dq_D_400x400.jpg",ref_id:"45559c92-d4f0-42a5-8dc4-a8cce65e95a1",twitter_handle:"LordFusitua"},{name:"CryptoMags",profile_picture:"",ref_id:"79cd9104-fa2c-4996-a179-8acb75642acd",twitter_handle:""},{name:"Denver Bitcoin",profile_picture:"",ref_id:"5ab53f2f-797f-4e1b-90d8-f2ca90e88af4",twitter_handle:""}],hosts:[],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/638c47da-8592-4d7b-aa1a-20e28fa0499f.jpg",keyword:!0,link:"https://anchor.fm/s/11e95d20/podcast/play/40846589/https%3A%2F%2Fd3ctxlq1ktw2nl.cloudfront.net%2Fstaging%2F2021-8-25%2F381320f0-9d1f-9ee7-893f-57af427aca69.mp3",node_type:"clip",pub_key:"",ref_id:"1ac39cf4-fc11-47e7-8972-113c674860b2",show_title:"BTC Sessions",text:"go back three years, 2018. I remember watching Steve doing presentations in Edmonton like 3 hours north of where I am, and it was still small and it was like it was a struggle to get interest still. Oh, no, they laughed in the industry was really laughing at this. Yeah, it was crazy. And to see the inevitable success of what him and you have been talking about over these past years is fantastic. We have a money that actually reflects human time, effort and efficiency. Well, of course it's going to be tied to energy. Of course it was going to. And the people that made those connections early are the ones that I think will be incredibly successful. And apparently with my Freudian sleep and slip. Sexy. Well, successful. Well, no, you're right. But you make a good point. Point. It's one of those things where I think gold for the age of time was a representation because of its proof of work. Gold is scarce to a very high degree just because of its natural occurrence in the Earth's crust. And it's difficult to find and it's certainly difficult to refine and Polish and get into any kind of a jewelry and such. There's always been proof of work throughout the history. And there's a recent documentary Mags was mentioned in it, and I was as well featured in a recent documentary, what's it called? This machine Greens, I think. Yeah. Definitely check out that documentary, if anybody that's in the audience hasn't seen it yet, in my opinion, there's like a little bit of kind of green washing in there a Bitcoin. And I don't think Bitcoin we don't need to greenwash it. It's great. Bitcoin is great as it is, but it really into the history of how energy interacts with money. And obviously how Bitcoin is what I would call the most precise, most accurate representation of proof of work, the most accurate representation of energy input, because it truly comes down to the kilowatt hour. Right. What it takes to produce a kilowatt hour like Henry Ford predicted. Right. We have now a decentralized currency that is tied to kilowatt hours. I love it. I don't know if you were going to add in there, but feel free to if you had any thoughts on what Adam was saying, many thoughts. Which one would you like now? All of them just throw it at us. Mag. Well, ",timestamp:"00:33:52-00:36:48",topics:["bitcoin","energy"],type:"podcast",weight:4.565201282639802},{boost:0,date:1669389148,description:"Podcasting 2.0 would incentivize value signal instead of attention signal",episode_title:"BR011 - Podcasting 2.0 & Value-4-Value Experts Roundtable ft. Adam Curry, Oscar Merry, Gigi & Odell",guests:[{name:"Oscar Merry",profile_picture:"https://pbs.twimg.com/profile_images/1385168885071089664/3VHhMawv_400x400.jpg",ref_id:"485b9165-ae61-4698-8244-16ae10f4ccbc",twitter_handle:"MerryOscar"},{name:"Gigi",profile_picture:"https://pbs.twimg.com/profile_images/1566370176446119943/UeuACt-4_400x400.jpg",ref_id:"9d8917ab-730b-4b1a-8321-49fb00907644",twitter_handle:"dergigi"},{name:"Matt Odell",profile_picture:"https://pbs.twimg.com/profile_images/1421584695746338819/Z_7ZfAeP_400x400.jpg",ref_id:"4f2825ff-3b88-4595-84d4-36e81544b79a",twitter_handle:"ODELL"},{name:"Adam Curry",profile_picture:"https://pbs.twimg.com/profile_images/1401922551161442307/XjN2DdFD_400x400.jpg",ref_id:"c304fffc-7fe0-49a1-86b8-d3278f5c89dc",twitter_handle:"adamcurry"}],hosts:[{name:"NVK",profile_picture:"https://pbs.twimg.com/profile_images/608402052247658497/ENDv0BNd_400x400.png",ref_id:"d754e29b-2d3e-4280-8d72-f41d2a465a78",twitter_handle:"Coinkite"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/cd6b8d64-bd52-4f1e-86b3-ca8ba2eb169f.jpg",keyword:!0,link:"https://anchor.fm/s/9500fad8/podcast/play/61194167/https%253A%252F%252Fd3ctxlq1ktw2nl.cloudfront.net%252Fstaging%252F2022-10-25%252F7ed25489-c7da-b1a0-f01e-659dc80098be.mp3",node_type:"clip",pub_key:"037f7331a5bef6c6f880246747befcc3767f3bb9730bc5e6f7c3770f4184ed0bff",ref_id:"eba87a50-4628-4106-94ae-5aee0e5f3584",show_title:"Bitcoin.Review",text:"Think there's another point here which is often missed in the discussion, especially as the volumes of SATS that are being streamed are still quite low. It's definitely still early, I think. And it goes back to what Gigi and Adam were both saying about the incentives here and right now, if you're a content creator, the thing that you're incentivized to do is maximize your audience attention and that has terrible negative incentives for media consumption on the internet. It means that as a creator, you will say shocking things just to pull people's attention in. You will frame your content around a clickbait headline and also you will create content when there doesn't necessarily need to be content because you're stuck in the YouTube algorithm and you need to make a video every week just to kind of get paid because you get paid for every minute of attention that your audience give you. That is really messed up. And what we can actually do with value for value and streaming stats is flip the incentives so that it's based on a value signal rather than an attention signal. And that is a fundamentally different thing. And so especially when it's so early, especially when the onboarding for your mainstream audience who don't care about bitcoin is still quite challenging. Yes, the volumes are going to be small, but in the long term what this is going to allow is content creators to actually focus on just one thing, which is the value that they are providing to their audience, which is an amazing shift. If you look at every single big tech platform, it's all driven by that attention signal and look at all the problems we have. If we can change it to a value signal, we can create a much better internet. And it's going to take time to get there. But ultimately every now and again on YouTube is a great example because everybody knows it. Every now and again on YouTube you will find a hidden gem that provides you with so much value. And the reason that you don't discover those more often is because instead the YouTube algorithm will serve you up with a clickbait headline of some video that was created yesterday about the latest shocking news event and you don't get the. News to the 10 minutes in. Exactly. So this is so much bigger than just replacing the advertising income for creators on a weekly basis. So Oscar, it's fixing ",timestamp:"00:29:07-00:31:26",topics:["Podcasting 2.0"],type:"podcast",weight:6.314446555932114},{boost:0,date:1629172800,description:"People earning money by working for Bitcoin",episode_title:"WHY ARE WE BULLISH Tomer Walton Obi Gigi ep194",guests:[{name:"Walton",profile_picture:"https://pbs.twimg.com/profile_images/1579938510538153994/EYbT5PEr_400x400.jpg",ref_id:"ec8c8747-a001-42ba-ae87-bfdef751b781",twitter_handle:"beeforbacon1"},{name:"Gigi",profile_picture:"https://pbs.twimg.com/profile_images/1566370176446119943/UeuACt-4_400x400.jpg",ref_id:"9d8917ab-730b-4b1a-8321-49fb00907644",twitter_handle:"dergigi"},{name:"Obi",profile_picture:"",ref_id:"f5ce3cb3-d943-483c-a619-c60936181c0a",twitter_handle:""},{name:"Tomer",profile_picture:"",ref_id:"9dfdecd6-c851-4766-ac32-4c1818ef5a9a",twitter_handle:""}],hosts:[],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/419512c2-e309-4b25-bfe2-cd481d53f66d.jpg",keyword:!0,link:"https://anchor.fm/s/11e95d20/podcast/play/38875088/https%3A%2F%2Fd3ctxlq1ktw2nl.cloudfront.net%2Fstaging%2F2021-7-16%2F212938750-44100-2-a8edaa1664f71.m4a",node_type:"clip",pub_key:"",ref_id:"315fbf52-eab1-4f1b-b3c7-e4e418498664",show_title:"BTC Sessions",text:"Obi, any thoughts on the creativity of Bitcoinners? Yeah, it was beautiful the way you recited it. Walton kind of doing this litany or this inventory of the different types of creativity that the community keeps growing into. And it is like a branching tree which keeps branching and branching and branching and welcoming more and more people with more and more skills. It's geographically decentralized, totally society. New society. Yeah, it's a new society. That all you have to do to enter the society. You can be anywhere in the world is to be honest and put in work, and it's honest work. This is the moral code of Bitcoin. Good, honest work and more and more people. And I think we're kind of at the stage because I've wanted to work in Bitcoin since I first heard about it and fell down the rabbit hole and the only opportunities were to work at exchanges. It also sold shit coins and I felt I wouldn't do it because I'd be working against Bitcoin if I was doing that. And now things have gotten to the point where I can say I'm going to write and there's going to be somebody who might pay me some time for writing. But the work is good, honest work and I appreciate it. And I get together at Bitcoin Meetups and more and more of the people are finding work opportunities at companies that do something that support Bitcoin and Bitcoin only some are Fiat miners, right? They run a restaurant, they do something else, they collect Fiat and they turn it into Bitcoin, which is perfectly moral as well. But it's also really exciting to see. I won't list off all the companies, but I was at a small Bitcoin meetup the other day and there were people there who are working at Casa, this was in Canada, so there were people there working at Bull, Bitcoin at hotel, hotel at Lydon. And it was just really nice to see that people are finding a way to work within the ecosystem, providing more and more value. And so this is a frontier that's being developed and there's more and more stores, if you will, in this new frontier. So I think it really is glorious and we watch it grow exponentially. Right. The fact that I'm actually getting together with people and everybody is getting an opportunity to earn money by working for Bitcoin is really profound. Obi, go ",timestamp:"01:14:25-01:16:48",topics:[],type:"podcast",weight:4.565201282516726},{boost:0,date:1642222800,description:"[[Sweden]] Banks Blocks Money Transfers Outside of [[EU]]",episode_title:"WHY ARE WE BULLISH Duczko Thomas Jestopher Morgen Rochard Rick Vanderhulst ep229",guests:[{name:"Rick Vanderhulst",profile_picture:"",ref_id:"4c184180-b77d-4e25-ac7c-4d2e86cdde85",twitter_handle:""},{name:"Morgen Rochard",profile_picture:"https://pbs.twimg.com/profile_images/1362921386256211972/IpIK8cwI_400x400.jpg",ref_id:"c29b26e9-82c8-4c0a-8130-aa083d33ec48",twitter_handle:"MorgenRochard"},{name:"Thomas Jestopher",profile_picture:"https://pbs.twimg.com/profile_images/1607521016368201730/6GSHGkGX_400x400.jpg",ref_id:"50388de7-3ec7-401b-8349-5ee1d8a004c0",twitter_handle:"Jestopher_BTC"},{name:"Duczko",profile_picture:"",ref_id:"2b6de75e-0cf5-4fec-b458-d1b8ee3f86df",twitter_handle:""}],hosts:[],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/b87feb17-6926-4295-b2c2-d1c2e9d49ca8.jpg",keyword:!0,link:"https://anchor.fm/s/11e95d20/podcast/play/46171740/https%3A%2F%2Fd3ctxlq1ktw2nl.cloudfront.net%2Fstaging%2F2022-0-15%2F68b825e2-6752-7447-34ca-b27f0ea69256.mp3",node_type:"clip",pub_key:"",ref_id:"ef84d742-b332-4b77-8242-948a3737f91f",show_title:"BTC Sessions",text:"I predict Sweden is going to be the first country in the world after China to adopt a CBDC because we have, like, over 99% of all transactions are digital. Over 98% of all the population have a digital ID. And we are used to total control and we like it. So what's happening in Sweden right now is basically the banks have said you can't transfer money out of the EU. Several banks. Recently, I had an old investor of mine called me and like, Lucas, you live in Vietnam. I need to make a deposit to Vietnamese company. Okay. Or to Vietnamese account. I'm like, So why don't you do that yourself? He's like, Because you obviously have the money. He's like, yeah, but all the questions I'm getting from the bank, it's so freaky. I just don't want to deal with it. Yes, Bitcoin peace of mind in international transactions. Even the people that have the money just really don't want to deal with the banks at this point because it's so creepy. At one point, my cousin, who lives in Brussels, was transferring money to Sweden. Eventually, after two weeks of DD, he sent an email directly to the bank and like, do you want, do you want make a blood sample or P sample? Check if my urine is clean. What's up? It becomes invasive. It's just such a pain in the ass. I don't know if any of you recently have had to actually just go into a bank. Oh, my God. Oh, my God. Just standing in that lineup and you're like, this is still how people do things. Like, people still haven't experienced this. Oh, you need some money on the other side of the globe. Cool. It's there. Now that's as simple as it is. It's insane. And then just stand in line and have these long transfer times. And I don't know how it is in the US. I'm not familiar with exactly how ACH works and how quick it is. At least in Canada, we've got e transfers, which are pretty fast. So the small amount of dollars that I do get paid, I typically send over to like, a sats back Visa card so I can then make purchases. But when I want to fund that, it's like, I send it and it lands in like a minute. So that's nice. But that's local within Canada. What's ACH ",timestamp:"00:57:19-01:00:16",topics:["sweden","eu","sweden"],type:"podcast",weight:4.565201343093071},{boost:0,date:1673187067,description:"How Nuclear Bitcoiner got into Bitcoin and Bitcoin mining?",episode_title:"@NuclearBitcoinr - Mining #bitcoin With Small Modular Nuclear Reactors. #313",guests:[{name:"Nuclear Bitcoiner",profile_picture:"https://pbs.twimg.com/profile_images/1443185278525579278/_Yl1nao1_400x400.jpg",ref_id:"60f5891f-0864-4ed4-987a-81da4768b3ba",twitter_handle:"nuclearbitcoinr"}],hosts:[{name:"Daniel Prince",profile_picture:"https://pbs.twimg.com/profile_images/1589940494364205056/rnHs5gI3_400x400.jpg",ref_id:"df2d4d35-3e96-44ed-b1cc-cb8a714bbe30",twitter_handle:"PrinceySOV"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/e1eca67b-d372-4031-bf1f-8f0ff7fe6092.jpg",keyword:!0,link:"https://anchor.fm/s/1346f9e8/podcast/play/63208295/https%253A%252F%252Fd3ctxlq1ktw2nl.cloudfront.net%252Fstaging%252F2023-0-8%252F4a07b2fe-eb1d-2c82-677e-8f2808a09536.mp3",node_type:"clip",pub_key:"02545c14cbb18a61f20dd45f5e3dcbd9acae3de282369501040adce32a75311309",ref_id:"50e012ee-2ed3-4fbe-9703-2b4b2695f5ef",show_title:`Once Bitten! +Enter a valid link to the YouTube video or Twitter Space you were watching, choose a start and end timestamp to encompass the segment you found interesting or useful, provide a brief description of what the segment is about, and add topic tags that are relevant to the segment. Hit "Add node", and your clip will be added to the graph shortly. -A Bitcoin Podcast. -`,text:"nuclear energy, you're obsessed with bitcoin, and this has all come together for you in the perfect fishing, I suppose, to use the analogy. Talk us through it. What happened? How did bitcoin enter your life? And how did you kind of realize, oh, damn, there's two fixes here? Yeah, it clicked with me at the right place at the right time. It's the shortest way to put it. But I had been aware of bitcoin since fairly early on, probably like 1112. I had gone through down the rabbit hole of what is money from the zeitgeist documentaries and then falling along with Ron Paul and all that and the fed, that sort of thing. And then there was some content that I had consumed where max kaiser would pop up every once in a while, and he was doing his evangelizing thing while bitcoin was still worth pennies. And he had found the solution to all of the things he's been complaining about for many decades. And then life moved on. I got more attentive to other topics and, like, started like like listening to things like like Joe Rogan and Jordan Peterson cultural, cultural stuff that was going on. And then it would have been 1718. I cashed out of a poker site, like, a few hundred dollars, and they had it available to cash out as Bitcoin. So I spun up a wallet on my tablet and cashed out. And then I just left it there and forgot about it and never really took the deep dive. And then when it was the big run up in the Bull Run in early 21, attracted me to be like, yeah, what is this thing? Because now my few hundred dollars is now worth a few thousand dollars. And I started to actually take it seriously. I dove right off the deep end because Max being my first touch point, I went right into the Orange Pill podcast. And then before long, yeah, my whole podcast list is frigging like breed love and phallus and you and bitcoin audible and VTC sessions. Everything flipped to very laser eyed Orange Pill. And then it was when I heard two podcasts in short succession with Adamo and Steve Barber talking about what they're doing with upstream data. And it's like, very excitedly telling my wife about all this stuff. And she's like, oh, yeah, that's cool. The Internet money in it and it's consuming clear gas. That's pretty cool. And maybe the environmentalists will back off. But no, you try to point that out to them and they're just like, I don't care. That's stupid. We're solving the problem that you complain about. And it's like, well, it's a stupid way to solve it. Do you just like complaining about things then? Clearly. And then it was the time when Elon Musk went on his little tirade about, oh, Bitcoin's energy use is bad. And then the market dumped. I was having a conversation with my wife, who was she was just reading the article and she was like, oh, this is stupid. And she works in the industry as well. She's like, well, we're going to start building small modular reactors, so why don't we mine Bitcoin with small modular reactors? She reacted to that as if it's like, well, that's a given. It just makes sense. Like, if you're saying what you're saying is true, then that just makes sense. And I just got lost in my mind for a long period of time. There just processing, like, yes, this is actually a very good idea, especially with how we intend to deploy these small modular reactors to off grid communities where they don't have the consumption capacity to justify the investment to build a large power asset. Now we can deploy them with built in customers. And then I just started consuming everything I could along those lines. Like, I read that long essay by the Drew Armstrong and AJ. Scalia, the guys from Cathedral bitcoin in the case for more energy, I was consuming, like anything that Nick Carter was putting out or Linnaldon. I loved the pioneer species idea that Brandon Quinn put out there, and that's exactly it. We're going to drop nuclear reactors in the middle of nowhere, and the bitcoin mining is going to act as the catalyst to grow that seed. It was perfect. And the more I learn about the reactors, that is one of their biggest problems. After you get through the concerns about the waste and the mining and the material and the labor, the economics is one of the large sticking points that needs to be overcome. And if we can have a guaranteed customer, no matter where we build a nuclear reactor, we open up a lot more opportunities to build nuclear reactors where it would not have made sense before. And because they're smaller, they have a lot more applications that they can be applied to, whereas typically the big reactors have to be at least relatively close to a large consumption load, like a large city or industrial park or what have you. So I was deeply on that rabbit ",timestamp:"00:55:50-01:01:06",topics:["Nuclear Bitcoiner"],type:"podcast",weight:18.56063246999693},{boost:0,date:1624507200,description:"How difficult business is without [[Bitcoin]] and how it helped",episode_title:"Bitcoin Fixes This 48 Small Business with Ali",guests:[{name:"Ali",profile_picture:"",ref_id:"1169edf2-a89f-4d89-94a4-1be1a7b9aef0",twitter_handle:""}],hosts:[],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/2536a974-d668-4ac2-8613-0b37aa0ca08c.jpg",keyword:!0,link:"https://anchor.fm/s/2a4e8034/podcast/play/36003846/https%3A%2F%2Fd3ctxlq1ktw2nl.cloudfront.net%2Fstaging%2F2021-5-23%2F969a4306-e9eb-95c5-0e15-42d37c0e61e8.mp3",node_type:"clip",pub_key:"",ref_id:"181df76a-5789-48c8-8153-57f0be3ec7f8",show_title:"Bitcoin Fixes This",text:"keeping your Treasuries in Bitcoin. If you didn't have Bitcoin, what would your business be like? And how difficult would things be without having sort of that savings available to you? Yeah. Like I said, Jimmy, we would be like, Bitcoin just put us in a position of strength. We can see the world. We feel like we can see the world more clearly now, and we can see what's going on with our competitors, even these small dynamics of monopolies and food costs and inflation and stuff like that. Bitcoin kind of opened our eyes to a whole side of the financial system that we had no idea was important until today. And it's been a blessing. And it's made us better business people. It makes us know the value of real money. Like all the money that we have is all debt, everything. Right. And Bitcoin is the only thing one of the few things that's in our financial system that's actually real and it's not debt. And that's something that's pretty big in our culture, even in our religion. And that's something maybe we can touch on. Jimmy, I was talking about this with Dave over the Miami conference, and we were talking about how there's 2 billion Muslims in the world that have no idea how their money works. And if they knew how it works, they would all go running towards Bitcoin. And the reason for that is, Jimmy, is that in the Muslim faith, we're forbidden to use interest. Right. We have something called like halal. And then Haram. Halal is permissible. Just like with the chicken meat. You'll find like halal meats. That just means permissible. And then the opposite of it is Haram. And so what's halal in our money is supposed to be anything that has no interest. Anything that has interest is Haram. And then what you realize is that the whole world economy is running on debt and everything in your life and has interest touching it from mortgage on your house to your car to your business to everything. Right. And you realize that your whole world is kind of Harold. And the only thing that's actually halal is Bitcoin. And it's kind of blasphemous to say because a lot of Muslims will disagree with me. And they'll just say I'm crazy. And I'll say, what do you know about hello? And they would skewer me for things. But if you think about it from first principles, this is actually what's going on. And we've just been dancing around this fact just because we're deeply entrenched into the debt economy and the debt the debt financial system. But if people actually knew what was going on, you'd find 2 billion Muslims around the world just running towards Bitcoin. And that would be a good message to kind of get out there. I would get skewered for it for just talking about this. After talking to John Vallas, he kind of called me. You know what, Ali? People are dying on this. Hell. This is a good message. If you want to talk about it, you should just go for it. Yeah, here I am. Well, it's interesting because you're talking about how the whole system is built on that. A lot of businesses, a lot of small businesses are built on that, and they are extremely fragile, which is why they need all these crazy government bailouts and so on. But your business because you've built it on Bitcoin and you have the savings and so on, you're a lot less fragile and you're able to overcome a lot of the problems that you're encountering, and you can sort of thrive through this environment. And that seems to me the direction you want businesses to go in is to be a lot more resilient to sort of like economic shocks and so on, whereas that hasn't been the case. Most businesses these days are built on that. And this Haram halal thing that you're talking about seems to be like a very good suggestion as a way to build better, more stronger businesses that can sort of withstand shock events like we're seeing. Yeah, it's exactly like you describe it, Jimmy. It makes you more antifragile. And being in debt, especially being in debt in a tough time, is one of the weakest points you can ever be in your life. We do have some debt just because we're in the whole world run on a debt economy. Right. But we have Bitcoin. We have the option to pay all of our debt off in an instant and not bend the need to anyone, anywhere. Right. And that's where the anti fragility comes from. Like I said, we're always in a position of power. We're always in a position where we love what we're working on. We're not working because we're trying to catch up. We're working because we are passionate about this business. Right. It's a subtle but big difference, Jimmy, in your mindset and in your business decisions, when you're just working because you love what you do and you're in a position of strength, it just makes your life so much happier and it makes you just a happier person. But when you're in a lot of debt and you're just working to catch up and just try to catch the inflation rug pull that's happening. You're not in a good position mentally, physically. You're just trying to do everything you can so that you can catch up to all these things that are going up in price. And the house that you want to get is running away from you year after year and you're trying to catch up. It's just a demoralizing, depressing feeling. But when Bitcoin is your unit of account, everything is getting cheaper. Over time, everything is getting cheaper. And that just changes your philosophy on life and your ethics and your food at work. It changes everything. And people make fun of Bitcoin, or sometimes they say, oh, you guys say, like, Bitcoin fixes everything. It fixes a lot of things. And I didn't realize this until I was fully entrenched with my life and my business and my kids, but it really does change everything. And before Bitcoin, I wanted to have three kids. After finding Bitcoin, I want to have five kids, six kids. I'm more optimistic about the future. I'm rationally optimistic about the future. I'm looking forward to it. I think my family is going to thrive, and that's a big paradigm shift to what most people think right now. So it's a beautiful thing, and I'm here for it. I'm here to promote it. I'm here to do whatever that restaurant chain can do to help in this economic revolution that's going on. And I'm happy to be a part of it. Yeah. It sounds to me like a real you're getting real satisfaction out of running your business because you're actually providing value and you're not having to rely on debt or government subsidies or anything like that. Instead, what you're doing is actually providing value to your customers. And instead of having to service that and all this other stuff, you're able to say, okay, well, I'm providing value. I'm clearly doing something that other people find valuable. And that seems to me much more satisfying for you than, say, being in debt and having to constantly worry about that aspect of it, which unfortunately, is the reality of a lot of small businesses you seem to have found, like, an alternate path that's a lot more satisfying and gives you a lot more of a positive feel going forward and to the point where you want five kids and not three, which is great. It sort of reflects an optimism for the future that many people that are in debt don't have. Yeah, that's true. That's what Bitcoin is, Jimmy. And it's a wonderful thing. And it's a wonderful thing to be able to think like this in this world that we're living in right now, because everybody around me is thinking the opposite. Everyone around me is thinking that their dream house is running away from them. They won't be able to afford education for their kids. So they're hoping that their parents can leave them enough money in their inheritance so that they can pay for their kids education. And this is what people around are really concerned about and for us, for my family, for my partner's family, for everyone that I got involved into Bitcoin, we stopped thinking like that, and we started taking responsibility for ourselves. And we feel secure about the future for kids, the education of our kids and the future of our business, the ability of us to secure homes. It's been a super, life changing year. All of this happened to me, like, for us in 2021, ",timestamp:"00:33:39-00:44:50",topics:["bitcoin","bitcoin"],type:"podcast",weight:4.530133247376293},{boost:0,date:1671534e3,description:"The keys of dYdX success in DeFi",episode_title:"Ep. 494 The Facts About Using Leverage when Trading Crypto",guests:[{name:"Antonio Juliano",profile_picture:"https://pbs.twimg.com/profile_images/1486890878694133761/85ev-DD6_400x400.jpg",ref_id:"025d2715-f5e7-4ba1-884c-45ba1e7770c5",twitter_handle:"antoniomjuliano"}],hosts:[{name:"Aaron Malone",profile_picture:"https://pbs.twimg.com/profile_images/1521495204196503553/abk-5S0m_400x400.jpg",ref_id:"bd103540-8c0a-4ab3-b5cd-24a3f2c43ab2",twitter_handle:"pizzamind"},{name:"Pizza Mind",profile_picture:"https://pbs.twimg.com/profile_images/1521495204196503553/abk-5S0m_400x400.jpg",ref_id:"16cb01cf-9f04-45db-a440-47259b02b86a",twitter_handle:"pizzamind"},{name:"Bryce Paul",profile_picture:"https://pbs.twimg.com/profile_images/1182725652794892288/QbDOKHcP_400x400.jpg",ref_id:"0d670dbf-f434-43b6-b454-8e5345d7ee51",twitter_handle:"BrycePaul101"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/93a6fe5b-364c-43f4-9f38-7da3e811460b.jpg",keyword:!0,link:"https://audio1.redcircle.com/episodes/0270c2f2-f726-498b-9a8d-0f907aa5736a/stream.mp3",node_type:"clip",pub_key:"02545c14cbb18a61f20dd45f5e3dcbd9acae3de282369501040adce32a75311309",ref_id:"22add7db-9562-44a4-a883-52f4d87d48f5",show_title:"CRYPTO 101",text:"of the time, I don't even realize that I have ExpressVPN on. It just kind of runs in the background seamlessly, and it's really easy to use. It just stays on all the time. And you just tap one button, and then you're protected, okay? You tap one button, then it goes off, and you're unprotected. Pretty easy. Now, ExpressVPN, it's totally available on all your devices, phones, computers, smart TVs, even iPads, all that stuff. So there's no excuse for you guys to be using it. Now, I want everybody who's listening to Crypto 101 today to protect your online activity today, okay? And you got to use the VPN that's rated number one by Business Insider. So visit my exclusive link, ExpressVPN. Comcrypto 101, and you could get a three month extra freebie for a one year package, okay? So that's ExpressVPN Comcrypto 101, Expressvpn.com Crypto 101 to learn more. And again, you could get an extra three free months on a one year package. All right, now on to our guest. Hey, are you ready? The Christmas Countdown is on at JCPenney through Saturday. Use your coupon and dash away with very merry savings on last minute gifts across the store, like fine jewelry. Stocking stuffers up to 70% off after coupons and save up to 50% on Comfy stylish outerwear for the whole FAM. Add curbside pickup to make your trip extra quick. We got your holiday. JCPenney offers good on select items through 1224 exclusions. Apply CSTORE or Jcp.com for details. If you run a small business, you need the most from every investment. That's why Comcast Business gives you more like our new gigspeed WiFi plus unlimited data, all on the largest, fastest, reliable network for small businesses. Comcast business powering possibilities. Don't miss our special holiday offer and ask how to get up to a $750 prepaid card with a qualifying bundle call today ends twelve four 2022 restrictions apply. Requires gigabit extra bundle with two year ",timestamp:"00:16:46-00:18:53",topics:["dYdX","vpn"],type:"podcast",weight:10.605576747712993},{boost:0,date:1593259200,description:"Comparing modern human stomach to other primates ",episode_title:"Episode 112: Mental Health And Metabolism: Autism, Depression And Your Small Intestine",guests:[],hosts:[],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/e8ad867b-9cbe-4126-9f37-313b4d2329a5.jpg",keyword:!0,link:"https://www.buzzsprout.com/482971/4336655-episode-112-mental-health-and-metabolism-autism-depression-and-your-small-intestine.mp3",node_type:"clip",pub_key:"032d7609ff3f4a5232e4d60967971e23bc671dfb68020845a59bab5dc1f3b93b87",ref_id:"fff2f38f-b219-4c96-bf6c-c8b7b48d55af",show_title:"Dr Karl Goldkamp - Keto Naturopath",text:"primates. So when we compare our gut, or if you want to be more specific, if we can compare our belly. And we're not talking about obese to obese, we're talking about a healthy human to a healthy ape, a human to a healthy chimpanzee, that we have differences. So the thing is that the normal belly of a man or woman human is flat. It is obviously not meant to be obese, but it's certainly not meant to be bulgy like an ape. So an ape, if you've seen it, has a big Ponchy belly and it's not because the ape is unhealthy. And I'm going to give you a comparison in a little second when I get to that graph. Actually, it's coming out one of the big differences. So when you compare various apes, a given versus a RangATang versus a gorilla versus a chimpanzee versus a human, and another one called simiang, call it another ape, that their stomachs. All stomachs, including humans and chimpanzees, are pretty much the same. Pretty much the same within a small difference. So the smallest stomach would be the orangutan. But other than that, we're pretty much spot on to be about this. And it's not that different by much. Okay, now we go to the small intestine. So the shortest small intestine is by the shortest small intestine is by the gorilla. The longest small intestine is by humans. In fact the intestinal length, which is in humans about 20ft is about over four times longer than an Agrilla. So where do the rest fall? So if you go to Gibbon orangutang pretty much all of them chimpanzees live on the short side, pretty close to a chimpanzee is pretty similar to us. So they're all short. So the longest short intestine is humans by a long shot, a lot longer than chimpanzees as well. Okay, what about the colon? So the colon is you can also call the colon your large intestine. So the colon, the shortest colon is humans. And so that's about 25. It's about a quarter of the length of everybody else's. So you go, that's interesting. So you could say that the one striking difference in this comparison is wicked long small intestine and very short large intestine. We say large intestine is kind of the width, right, as opposed to the length. And so what does that mean? What does that cares other than length? What else can I tell you here is that we have let's open up the mammalian comparison here. So in terms of we're going to say in terms of the colon. So the last part is large intestine, colon and rectum. Man, cat and dog actually goes man and cat are almost exactly the same. Dog is a little shorter. And so as being a relatively short short by, it's a quarter of what everybody else is in terms of cattle, very long sheep, very long horse, very long pig, long like three or four times as long as humans, but not as long as cattle and sheep. I won't keep going. You're probably not interested in rat or human or guinea pig. Okay. But man, cat and dog are almost identically, the same, whereas cattle, sheep and horses are hugely different. So let's think of that. Cattle, sheep, horse, pig, not so much pig. Let's go horse, chap, sheep and cattle, what do they eat? They're ungulates. Ungulates, meaning they chew and they chew and they chew and so they chew their cut, right? The cattle has four different parts of the stomach and it actually does, and it actually turns the carbohydrates into saturated fats. That's what happens in the stomach. And the reason they need a large colon, they need a long large intestine is because that's where the final degrading or digestion of veggies and fiber get fermented and so on and so forth. Humans really can't do that. We really can't ferment much fiber. We can't extract it, we can't break down the cell walls. All these other guys can break down the cell walls by their long, their big stomachs, their long colons, and they can extract a lot more out of it. Okay then. So what about stomach comparisons? Man and dog and pig all look pretty similar, actually about the same size, about the same shape. And you can bet that the ox I don't have a cow in front of me. The ox will stand in are much different. As we just said, OK? Humans can digest meat easily. They have a stomach PH acidity. To be able to do that one to one and a half in terms of a PH. D, you realize a PH of one to one and a half if you could extract that. And that can burn through metal, certain metals, I should say. So it's hugely acidic. So water, as you know, is PH around seven, arguably. A little bit more alkaline, a little bit more acidic, depending on where you get your water and what's in it. But we're going to call it seven. Okay. Whereas the small intestine manages low residue, low fiber diet. So why did I say that? Because man had a very big, humans had a very big, long, four times as long small intestine. It doesn't do well. It needs a low fiber diet. It doesn't do well with fiber. High fiber diets mean big large intestine, long large intestine. We don't have that. So it's a mismatch. So by looking at our guts, we line up with what carnivores had. We have a larger large intestine. We have a smaller colon or a colon. It's the same size as carnivores, okay? ",timestamp:"00:17:52-00:24:44",topics:["Human stocmach","primate stomach","gastric acid level"],type:"podcast",weight:4.4907612800598145},{boost:0,date:1599305976,description:"Buying bonds ",episode_title:"Borrowing - where is the money going? Corporate, Small Business, Government",guests:[],hosts:[],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/abd94520-1490-42aa-b349-9e861494a654.jpg",keyword:!0,link:"https://anchor.fm/s/138410f8/podcast/play/19113751/https%253A%252F%252Fd3ctxlq1ktw2nl.cloudfront.net%252Fstaging%252F2020-09-05%252Ff840233e9317a45e95724ebf5de7e057.m4a",node_type:"clip",pub_key:"",ref_id:"139f6af7-950d-44cd-a3fc-86cae3f86d65",show_title:"Economy Guy",text:"I talk about three areas of people who are loan borrowing money. Big corporations are borrowing money, small businesses are borrowing money and governments are borrowing money. Those three categories, they're all borrowing money. So let's hit them in order and try to understand them. One at a time. Let's start with big corporations. Big companies, great big companies are selling bonds right now. They do not need the money in general. They don't have a good productive use for the money. They're just selling it because interest rates are so cheap, are so low that they have to pay very small amount of interest. And then they have all this big bundle of money that they can put in the bank or by other companies with or whatever they want to do with. They become very rich because they have borrowed this money through the issuance of corporate bonds. Now interesting, who's going to buy those bonds? Well, the answer is there are a huge number of funds out there that are buying bonds. Why are they doing that? Aren't they worried about the risk of bonds? You know how a bond works. The value goes down when interest rates go up, or the value goes up when interest rates go down. Well, interest rates are so low they can't go down too much more. They could, but it doesn't look like it. I don't think it's the Fed's goal. I think the Fed's goal is to keep interest rates level right now. But in a crisis, if interest rates were pushed up, the value of those bonds that people are buying would go down. So that's risk, big risk. But they're not doing that. And the big because is because the Fed itself is buying big corporate bonds. That's basically saying, hey, there's a government guarantee. It's not the same as a guarantee, but it's like having a government guarantee that if you buy those same bonds you'll be safe because the government's not going to screw themselves over by raising interest rates. So that's the thinking. It's a low risk bet. And when you borrow or lend, actually lend money, risk is what's the name of the game. That's what it's all about. ",timestamp:"00:06:20-00:08:37",topics:["Bonds","borrowing"],type:"podcast",weight:4.4870123863220215},{boost:0,date:1485660600,description:"How useful is the Small Business Administration",episode_title:"TheMacroView Episode 32: Understanding Financial Markets Part 5 of 5",guests:[],hosts:[],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/8e52e9c4-52e8-4dea-8ed9-8c6a7fcef25a.jpg",keyword:!0,link:"https://www.blogtalkradio.com/themacroview/2017/01/29/themacroview-episode-32-understanding-financial-markets-part-5-of-5.mp3",node_type:"clip",pub_key:"",ref_id:"7ace464e-d855-496a-a80a-b6e7ccb0f12e",show_title:"The Macro View",text:"So next is the SBA. The SBA, don't get it wrong, is a fully politicized organization. It sounds like a good idea to a lot of people. You guarantee a portion of bank loans to businesses that otherwise wouldn't qualify, and you could stimulate more business investment, you could stimulate more startups and create more jobs. Right? But there are two major issues with it. There's both inherently two major issues with it, and then there's also an explicitly major issue due to the government's direction of the SBA. That's the third issue. That's just as bad, honestly. So the first problem in error with the SBA is that it only exists as a result of government guaranteeing bank loans for housing and real estate projects, which, once the government started doing, sucked up a larger and larger portion of a bank's finite capital. So this meant less capital available for business loans, and small businesses were being neglected by banks as a result of government guaranteeing housing loans. The second problem is that even absent government guarantees of housing loans, it would push banks to make loans to businesses that otherwise wouldn't qualify due to their risk profile. This means necessarily that it would divert capital away from businesses that could qualify for such loans, businesses that serve more urgent consumer demands and have less risky business models. The last issue with the SBA, which is an issue that is likely to change under the Trump administration, at least slightly, though it will probably just be more of a redirection under the Trump administration, is that the SBA under the Obama administration became an affirmative action lender almost exclusively. So the business model, the risk inherent, the owner experience, collateral, posted, all of that no longer mattered. The SBA was directed by the Obama administration to focus on guaranteeing loans of racial, gender, or sexual preference minority groups, as well as towards disabled small business owners. This is just an absurd idea. Lending is not about creating so called social justice or cosmic justice. Lending is about earning a reasonable rate of return while assuming as little risk as possible. The race, gender or sexual preference, or the physical ability of the borrower should have absolutely nothing to do with the lending process. Once again, all this does is shift the bank's limited capital from businesses that would qualify for a loan to our identity groups, with the quality of the loan being meaningless, the quality of the business being meaningless. The SBA also became an environmental activist lender. The SBA was also directed at the behest of the Obama administration to dramatically increase the number of green, quote unquote, so called green business loans that it made so disregard cost, disregard viability. If the business was supposedly doing something that could even potentially help reduce CO2 emissions, it was now extra qualified for the SBA programs. ",timestamp:"00:20:25-00:23:45",topics:["Small Business Administration","SBA"],type:"podcast",weight:4.480609655380249},{boost:0,date:1671827663,description:"What are BOLT 11 and BOLT 12?",episode_title:"BR015 - Lightning Experts Roundtable ft. Calle, Roy, Rijndael & t-bast",guests:[{name:"Roy",profile_picture:"https://pbs.twimg.com/profile_images/1518195698323398656/v6d0knBt_400x400.jpg",ref_id:"528205f8-c65b-4b81-8e90-64a89737acd3",twitter_handle:"RoyNemer"},{name:"Calle",profile_picture:"https://pbs.twimg.com/profile_images/1514769710432219142/CIKDCEbq_400x400.jpg",ref_id:"c467552d-e3ae-4c55-a695-8369a63960bb",twitter_handle:"danielaacallee"},{name:"Rijndael",profile_picture:"https://pbs.twimg.com/profile_images/1542705395873058817/0zsy4Yur_400x400.jpg",ref_id:"861d5324-8ede-4059-826f-f29abca5d7e6",twitter_handle:"rot13maxi"},{name:"t-bast",profile_picture:"https://pbs.twimg.com/profile_images/1103941624843788289/Pg2rEZph_400x400.jpg",ref_id:"d3eacec2-0bdc-49cd-8bef-e99fa2776d3b",twitter_handle:"realtbast"}],hosts:[{name:"NVK",profile_picture:"https://pbs.twimg.com/profile_images/608402052247658497/ENDv0BNd_400x400.png",ref_id:"d754e29b-2d3e-4280-8d72-f41d2a465a78",twitter_handle:"Coinkite"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/cd6b8d64-bd52-4f1e-86b3-ca8ba2eb169f.jpg",keyword:!0,link:"https://anchor.fm/s/9500fad8/podcast/play/62615840/https%253A%252F%252Fd3ctxlq1ktw2nl.cloudfront.net%252Fstaging%252F2022-11-23%252Ff9ece2e5-a873-2d6a-d49f-602887e5b810.mp3",node_type:"clip",pub_key:"039c26c7a2f03083901b6c9ef94c3d9f12f88f348965dddd5ab54635993728007c",ref_id:"87aa1d63-e44d-43f4-8b02-dfbd1fab476a",show_title:"Bitcoin.Review",text:"So just for people sort of understand, because I'm guilty myself, we all sort of like drop like BIP, while enlightening is bolt numbers. So who wants to explain what Bolt Eleven bolts Twelve and Bolt 15 are? Just sort of like a high level. What is Bolt 18? I don't even know. Bolt 15 is it bolt 15? NBK just made it up. It's a secret project. That a new one. Yeah. I had no idea this existed. So Bolt Eleven is the standard way that you do a Lightning invoice. Right. So Lightning is very different from on chain bitcoin because there aren't really static addresses. You have to encode a hash that the preimage to which gets revealed to make the payment atomic and lightning. There might be some other routing information. There's an amount all that needs to be encoded into an invoice, and that format and the payment flow there is all in Bolt Eleven. Bolt Twelve is a way of doing reasonable payment codes all over the Lightning network. So there's been a lot of excitement and development around things like Lightning addresses and Ln URL that's kind of similar. It's the same problem that Bolt twelve tries to addresses, but it addresses it by having you host a web server that can resolve, that can render out a Bolt Eleven invoice, whereas Bolt twelve just goes over. Gossip Kelly, I think you wanted to say something. Yeah. If I may add, so Bolt Eleven is mainly focuses on the invoice format and how we make a single payment. But Bolt Twelve itself is a whole package of features, so to speak. So you have all sorts of things in there, starting with offers, what you were alluding to. So these are static payment identifiers, basically, but it goes on with rock, blinding, onion messaging, merkel trees, schnor signatures, all these kind of things that are like I think the idea is to have a big package of many features that everyone can implement at the same time, so we can upgrade the network in a fairly global way. But what we're seeing already is that people are picking parts out of that proposal and implementing them one by one into their nodes, basically choosing what they need and whatnot there's also room for discussion there if that was the best approach or not. So having one big package and then seeing it fragmented again across the network, or if it would be better to really keep things atomic small so that we can really measure the synchronicity of the entire network, basically upgrading to ",timestamp:"00:08:06-00:11:03",topics:["BOLT 11","BOLT 12"],type:"podcast",weight:11.522468360169754},{boost:0,date:1669389148,description:"Challenges with Lightning network and micropayments for Podcasting 2.0",episode_title:"BR011 - Podcasting 2.0 & Value-4-Value Experts Roundtable ft. Adam Curry, Oscar Merry, Gigi & Odell",guests:[{name:"Oscar Merry",profile_picture:"https://pbs.twimg.com/profile_images/1385168885071089664/3VHhMawv_400x400.jpg",ref_id:"485b9165-ae61-4698-8244-16ae10f4ccbc",twitter_handle:"MerryOscar"},{name:"Gigi",profile_picture:"https://pbs.twimg.com/profile_images/1566370176446119943/UeuACt-4_400x400.jpg",ref_id:"9d8917ab-730b-4b1a-8321-49fb00907644",twitter_handle:"dergigi"},{name:"Matt Odell",profile_picture:"https://pbs.twimg.com/profile_images/1421584695746338819/Z_7ZfAeP_400x400.jpg",ref_id:"4f2825ff-3b88-4595-84d4-36e81544b79a",twitter_handle:"ODELL"},{name:"Adam Curry",profile_picture:"https://pbs.twimg.com/profile_images/1401922551161442307/XjN2DdFD_400x400.jpg",ref_id:"c304fffc-7fe0-49a1-86b8-d3278f5c89dc",twitter_handle:"adamcurry"}],hosts:[{name:"NVK",profile_picture:"https://pbs.twimg.com/profile_images/608402052247658497/ENDv0BNd_400x400.png",ref_id:"d754e29b-2d3e-4280-8d72-f41d2a465a78",twitter_handle:"Coinkite"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/cd6b8d64-bd52-4f1e-86b3-ca8ba2eb169f.jpg",keyword:!0,link:"https://anchor.fm/s/9500fad8/podcast/play/61194167/https%253A%252F%252Fd3ctxlq1ktw2nl.cloudfront.net%252Fstaging%252F2022-10-25%252F7ed25489-c7da-b1a0-f01e-659dc80098be.mp3",node_type:"clip",pub_key:"037f7331a5bef6c6f880246747befcc3767f3bb9730bc5e6f7c3770f4184ed0bff",ref_id:"5d6441cb-9fb5-465e-b297-0a66ccc5823f",show_title:"Bitcoin.Review",text:"Okay, so there are a couple of things. First of all, I want to point out, for ten years, I wasn't really aware of it, but for ten years, the podcasting industry kept saying to each other, we can't make podcasting for effect. I'm going to, from time to time, just let you hear one of the booths come in. We can't change podcasting. We can't upgrade it. We can't do anything because Apple won't do it or Spotify won't do it, and they actually got to groveling and please Apple, will you listen to us? And it was just horrendous, and it was impossible. They had boards and steering committees for ten years, meetings meetups. How do we move podcasting forward? How do we get more features in? You know what? Because people are just talkers. Most people are not builders, and we just sat down and built it. And then it came together because everyone really wanted it. But people like to yap a lot. So this is the same thing with the Lightning infrastructure. I'm really disappointed with Lightning infrastructure in general. I'm disappointed with the thinking, with the attitude of some of the developers. Bolt twelve, which would be fantastic for what we're doing here, is now a punchline. It's just a fucking punchline. It's like oh yeah, bolt twelve. If Claire doesn't do it, they don't do it, whatever. But the most disappointing thing is that the Lightning network was not even really architected to do micropayments. And when I raised this early on in one of the meetings with Lightning Labs, I said we're having a real problem the way it's set up. And we're basically having to act as a go between, a guaranteed liquidity provider for very small amounts, you know, so when someone sends two SATS or one Sat as a part of a split, we'd like it to arrive and we know there's going to arrive with. So we have to do things like stack them up to reduce fees and there's all kinds of things that people are doing. But the answer from Lightning Labs was we'll just have people send bigger amounts. So just so you know, the beauty of what we're talking about here is not what the industry is building, they're doing something else. It's about incentives, right? A lot of these entities are trying to sort of like be visa replacements or whatever because that's where the big money is. So they are focusing their development in sort of essentially being the middleman. Because middleman is a business approval model, right? But they talk a big game and I'm sick of that shit. You're not building it for micro payments, we're doing it for micro payments. Now. ",timestamp:"01:37:54-01:40:42",topics:["Podcasting 2.0","Lightning network","micropayments"],type:"podcast",weight:6.190523690607058},{boost:0,date:1648771200,description:"Obstacles and barriers faced in bootstrapping a lightning network and how to overcome them",episode_title:"Synonym Spaces Lightning Tokens",guests:[{name:"Paolo Ardoino",profile_picture:"https://pbs.twimg.com/profile_images/1583467513198923781/nCWMWFIn_400x400.jpg",ref_id:"9bb3e215-6065-4fe2-aac5-2b1d5545d48c",twitter_handle:"paoloardoino"},{name:"John Carvalho",profile_picture:"https://pbs.twimg.com/profile_images/1601964735016177676/c1mAfspt_400x400.jpg",ref_id:"f28f037f-a3af-48af-bdd3-28023219b524",twitter_handle:"BitcoinErrorLog"},{name:"Reza Bandegi",profile_picture:"https://pbs.twimg.com/profile_images/1446675390370500614/4LGHNSkl_400x400.jpg",ref_id:"ead50c13-2f13-4ffc-86b5-5a3eb49a5804",twitter_handle:"r32a_"}],hosts:[{name:"Synonym",profile_picture:"https://pbs.twimg.com/profile_images/1509611612692484098/21wQpOvO_400x400.jpg",ref_id:"7bc90c93-e6e6-4596-8ec5-e77fe735cf05",twitter_handle:"Synonym_to"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/63e0cbc0-731d-4ea0-9dd2-2b8b841eb28a.jpg",keyword:!0,link:"https://www.youtube.com/watch?v=QflalrGaIvw",node_type:"clip",pub_key:"",ref_id:"b9fd54d3-49e8-44e1-a208-7780d50a3b3a",show_title:"Synonym",text:"are some of the obstacles and barriers that you kind of see besides kind of like bootstrapping a network and so on? And how do you plan to overcome them or kind of help various partners, businesses to kind of overcome them and launch more tokens on Lightning. As Pablo mentioned, I think that making sure it's safe is probably the shortest term and most important that we have. We recently had audits done on the stack and we'll have no audits done after these updates. And so we just want to make sure that everything in the stack is really safe and reliable before we go trying to convince people to buy these channels, own tether that's within Lightning, add this to their apps and add this to their platforms and integrate it. We want to make sure that we're confident and we want to demonstrate that we're confident enough to run it ourselves in these notable platforms before we start convincing others that it's safe to do so. Yeah, I would say that audit is probably one thing. There are some other obvious things like figuring out the user experience for this inside of a wallet. It's kind of a new challenge. It's a novel thing to convey to a user. And then the rest, I guess, is just business development. Just going out there and educating different apps and platforms and businesses about this technology and helping assist them with integrating it and adding it into their products. Yeah, I'd like to add that. So the team that works on Omni Gold is quite small, and the number of people that you know how this stuff works is very small. So development is not as fast as I'd like it to be. So getting more people to contribute and look at this is a challenge. There's so many cool projects out there to work on, and sticking out of the rest of the projects out there and getting the attention of developers is definitely a challenge. So if anybody out there thinks this is a cool project and they like to contribute, you should check it ",timestamp:"00:18:06-00:20:12",topics:["Bostrapping lightning networks","lightning network barriers"],type:"youtube",weight:4.467333025674428},{boost:0,date:1644642e3,description:"Discussions of the Nuclear Industry on [[Bitcoin]]",episode_title:"WHY ARE WE BULLISH Brian Harrington Jim Crider Nuclear Bitcoiner ep237",guests:[{name:"Nuclear Bitcoiner",profile_picture:"https://pbs.twimg.com/profile_images/1443185278525579278/_Yl1nao1_400x400.jpg",ref_id:"60f5891f-0864-4ed4-987a-81da4768b3ba",twitter_handle:"nuclearbitcoinr"},{name:"Jim Crider",profile_picture:"",ref_id:"acb937b5-97e9-4881-a45e-0e9511382019",twitter_handle:""},{name:"Brian Harrington",profile_picture:"",ref_id:"82840fe2-b87e-433c-8f54-e4d1aa4f3dbf",twitter_handle:""}],hosts:[],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/9523aa00-daf4-42af-b25b-75d9682bc5a6.jpg",keyword:!0,link:"https://anchor.fm/s/11e95d20/podcast/play/47542056/https%3A%2F%2Fd3ctxlq1ktw2nl.cloudfront.net%2Fstaging%2F2022-1-12%2F247506637-44100-2-21f5120cfb677.mp3",node_type:"clip",pub_key:"",ref_id:"287d232d-d28d-400c-b4dd-c0026022fce4",show_title:"BTC Sessions",text:"now about the state of the nuclear industry. There's been some delays and problems recently, but if Bitcoin's are familiar with flood, the nuclear industry has been dealing with FUD for decades and it finally seems like we've public perception wise. There's been a great breakthrough. It seems to have taken an energy crisis to finally get us there, but it's finally being given the serious discussion that it really deserves. Yeah. I loved watching all the developments with the Bitcoin mining space like the Oaklo Compass team up, whatever the talent energy plan for the Sasquatch reactor in Pennsylvania and one of the other interesting ones that doesn't get a lot of attention. But Ukraine is an interesting use case for Bitcoin mining. They had announced unless anything has changed since I saw the announcement, they are planning on building several hundred megawatts worth of capacity attached to a few of their nuclear reactors. And the story of how it started is actually kind of funny because there was some operators that were running a few Asics at the reactor on the slide, and then they got caught and then the authorities, instead of throwing them out, figured, hey, we can just do this for ourselves. And now they've announced that within two years or so they're going to have some pretty big operations going on there. And I have no doubt that Russia is considering this angle with the way that they've been talking lately. They are big nuclear power. They've got lots of stranded Hydro. They are definitely considering leveraging their Bitcoin mining opportunities there. Canada also has these very similar opportunities. We have a robust nuclear industry. We have tons of Hydro, lots of it's stranded in Northern communities that don't have the industries that they used to to support that electricity capacity. And then we're also Canada is going full speed with the SMR action plan, where we're hoping to have six or so new Gen, four small modular reactors demonstrated in the country at various already certified nuclear sites like Canadian Nuclear Labs and Ontario Power Generation. And I saw that First Nations Power Authority has cut a deal with X Energy and terrestrial energy to nuclear reactor manufacturers. So there's plans to drop these small modular reactors all throughout remote communities in Northern Canada to upgrade them off of diesel. And I've been starting to think about it after Brandon quitams the Pioneer Species essay that he wrote. It fits in perfectly to the idea that I'm promoting within the nuclear industry. We can take a power source, whatever it is, but now we can take a small modular reactor anywhere we're not geographically limited, and we can have a complimentary set of Bitcoin mining to go along with it as basically a seed that then turns an energy desert into a flourishing ecosystem, because within a short time it will start inviting more complex second order industries like the hydrogen production facilities or desalination or definitely going to have different mining operations attached to these things. But it will be the seed that grows into the mighty Oak level communities. And we can start planting those seeds all over Northern Canada, because the way I see it is if global warming and climate change goes the way that the most far end predictions go, Northern Canada is probably going to be a lot more habitable in the not too distant future. So why not start preparing now? And it's also a great opportunity to help out and build partnerships and collaborations with Indigenous communities that have been energy impoverished for generations and been promised by consecutive governments every cycle that they're going to do something to help, but it ends up just kind of falling flat. I thought that happens. I thought that Trudeau had a perfect opportunity. He promised two major things. He was going to legalize cannabis and he was going to bring water to Indigenous communities. He could have used one to fund the other, but I don't know. Yeah, but the budget balances itself, man, so it's fine. We don't pay attention to monetary policy and finances. Yeah. I've got a question for you in around the nuclear stuff, ",timestamp:"00:47:20-00:51:54",topics:["bitcoin"],type:"podcast",weight:4.454448139404517},{boost:0,date:1662010885,description:"SD card vs USB connection for hardware wallets",episode_title:"BR005 - Bitcoin Wallet Experts Roundtable ft. Odell, Bitstein & Pierre Rochard",guests:[{name:"Charles Guillemet",profile_picture:"https://pbs.twimg.com/profile_images/1363770113162379265/7S1mRttg_400x400.jpg",ref_id:"c726ddde-836d-4f6c-9b6e-bb9e4d9365a7",twitter_handle:"P3b7_"},{name:"Matt Odell",profile_picture:"https://pbs.twimg.com/profile_images/1421584695746338819/Z_7ZfAeP_400x400.jpg",ref_id:"4f2825ff-3b88-4595-84d4-36e81544b79a",twitter_handle:"ODELL"},{name:"Graig Raw",profile_picture:"https://pbs.twimg.com/profile_images/1362841242665631745/UtA3FBQU_400x400.jpg",ref_id:"66fade84-61db-4cb1-b4a9-b759e285eb82",twitter_handle:"craigraw"},{name:"Lazy Ninja",profile_picture:"https://pbs.twimg.com/profile_images/1362843002318721028/PNKWuu0-_400x400.jpg",ref_id:"f855515d-75c4-4287-9a3d-e45d7ac25ddf",twitter_handle:"FreedomIsntSafe"}],hosts:[{name:"NVK",profile_picture:"https://pbs.twimg.com/profile_images/608402052247658497/ENDv0BNd_400x400.png",ref_id:"d754e29b-2d3e-4280-8d72-f41d2a465a78",twitter_handle:"Coinkite"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/cd6b8d64-bd52-4f1e-86b3-ca8ba2eb169f.jpg",keyword:!0,link:"https://anchor.fm/s/9500fad8/podcast/play/56934513/https%253A%252F%252Fd3ctxlq1ktw2nl.cloudfront.net%252Fstaging%252F2022-8-1%252Fba1b9425-ee1c-d0fd-3048-f50bdcc17c14.mp3",node_type:"clip",pub_key:"02545c14cbb18a61f20dd45f5e3dcbd9acae3de282369501040adce32a75311309",ref_id:"3e106ab0-ad0d-4aa4-8ea1-0bbeb122ae78",show_title:"Bitcoin.Review",text:"Do you guys want to do the air gap a little bit more? I want to get you and Charles in a fight here because I do. Have a go for it. Some thoughts on SD card versus USB connection, which I think is sort of interesting. I'll give you sort of my you've heard this before, rebel, but the benefit of the cold card, right, is you can do USB less, right? You can just do SD cards to physically transport the PSBTs across the air gap, right? And then you mentioned the attacker synchronicity, right? He maybe can modify the PSPT, but it's physically transported over that barrier by a human. Now, I do have one thing there that I brought up before, is SD cards aren't just physical media, they are actually microcontrollers. So the hacker can actually insert software on the SD card. And when you plug the software, when you plug that SD card into the cold card, it can do stuff, right? It could do things like you could maybe drop a file on it on the computer. But when it gets plugged into the cold card, it shows the cold card different files. Now, obviously, the user can verify addresses and catch it there, but there's other things it could do. It could try to exploit protocol errors in the SD card interface with the thing. Right? So the attacker has a small microcontroller that he can attack with. Yeah, I completely agree with you there, because essentially nothing is fail proof given enough resources, enough time, right? That's how we think about this stuff. So on a computer, the way a computer reads a drive is much different than the way codecard reads the drive. The way codecard is looking at micro SD, it is a substantially smaller surface and purpose, right? So we can audit that. We can look at that and try to find paths in which attackers could try to exploit that. The amount of people out there that can insert malicious firmware on a micro C is much smaller than the people who can do malicious things with USB, right? I mean, USB is an absolute clusterfuck. It's huge attack surface. What's nice about what Ledger does is that ledger is using a secure element that is designed to handle things in a very narrow way too, right? You guys are probably using SIBO or something like that to talk back. So the thing is but you're still connected, and that connection matters because if you were trying to do a remote attack, you want feedback, right? Like, is this working? Try this other thing. Is this working? Try this other thing. Oh, did you get something? Oh, you need to go there to get it. Now. You need this other bug to happen in order to extract, right? So there is a very long list of things you're going to probably need to do to pen test it. Now, if you're not USB, technically you could have the software trying to do that and then there is the bugs, right? You could have a bug that has a hole on it and then boom, gone. Yeah, I'm really curious to hear Charles thoughts on this before he goes, because I'm really interested. Yeah, sure. When you have to sign a transaction, at some point you need to communicate with the blockchain. There was nothing like those walls are completely separated. You need to bring some data from the blockchain to your sign and sign it and then bring back this signed payload to the blockchain. So when we say I got or something, it's just a matter of channel. What does your channel look like? Is it complete? Is it SD? Card? Is it USB? And then we can discuss then. This is about attachment face. So your thesis is to say like the SD card, attach your face is simpler than USB. It can be debated. I don't know. USB is a large standard. I agree with you, this is our standard. And if you try to implement the standard overall, there is some area to do mistakes. So what we do is to implement a very small subset of this tunnel and when we implement USB, it's implemented on another microchip, it's not implemented in the secure limit, so that you have like another layer of another layer to do this communication. And the attic surface of the securement itself is not bigger because of USB. But again, what I want to say, there is no perfect solution. There's plenty of trade off and when you choose SD card versus USB in terms of UX, it's clearly less convenient and the US is better with USB. Does USB have a larger article surface? Maybe you're comfortable with that. But I think the trade off is better in terms of UX and this is the one we choose. But yeah, I agree with you. When you implement USB, you have to be very careful. You have to limit what kind of USB style you implement and then you have to do penetration testing, verify how it works and so on. What's nice about this new standard for PSBT is that we no longer need to take arbitrary data in or arbitrary formats in to operate with. Right? So you can be very, very picky about which data bytes really you're picking in and you're letting in to sign. Right? It's not like we're executing stuff from a microSD card too. Right, so you do reduce their death. Reminds me way back then there was a power differential analysis attack on a treasure and they were able to read the treasure calculating keys and able to leak out the keys. So, you know, it just goes to show, right, I mean, like the stakes are very high, right? So like how you find the straight offs and how we derisk each solution. Really is really is the challenge there of finding a good security sort of set for people. I would have to jump now. Yeah, you need to go, right? Yeah. That was a great discussion. Thank you. Thank you very much for having me. And maybe we can continue the discussion in the next episode. Thank you again. It was a pleasure. Appreciate you, Charles. Thanks. Bye. I really appreciate you guys coming, and we'll do this again, Charles, don't worry. Yeah, cool. I'll let you thank you guys. And then if you guys are still game, we can keep on going. I can keep going. Yeah, sure. Happy to. Cool. I have a few more minutes, but not forever. Okay. Yeah. I just love the fact that we can have a bunch of different people from the industry in a non contentious sort of environment to sort of, like, just talk shop and sort of discuss the challenges and things we have and sort of where we can go. I don't see a lot of that out there. So thanks for being here. Okay, ",timestamp:"01:40:27-01:48:26",topics:["hardware wallets"],type:"podcast",weight:4.463118593191631},{boost:0,date:1667347200,description:"How Anthony Potdevin discovered the Lightning network",episode_title:"Meet the Makers: Anthony & Dolu",guests:[{name:"Anthony Potdevin",profile_picture:"https://pbs.twimg.com/profile_images/1252630766909079555/qf-qI5EZ_400x400.jpg",ref_id:"da0a9fdc-eda1-4e07-8341-2100428065d1",twitter_handle:"thunderhubio"},{name:"Dolu Zerologin",profile_picture:"https://pbs.twimg.com/profile_images/1577320325158682626/igGerO9A_400x400.jpg",ref_id:"4c228a2d-4f9c-4bbd-bf49-d2be3159c6a4",twitter_handle:"Dolu_Web"}],hosts:[{name:"Zapp Ed",profile_picture:"https://pbs.twimg.com/profile_images/1519990234070540288/adGqlFoj_400x400.jpg",ref_id:"bbe7cf1d-cd8d-4d36-926d-76f41b775fbb",twitter_handle:"zapp_ed"},{name:"Moritz",profile_picture:"https://pbs.twimg.com/profile_images/1452933125743460360/5xkRoFj7_400x400.jpg",ref_id:"e23e282d-82b3-4c9d-859c-c1c7f41eef84",twitter_handle:"getAlby"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/965489b4-a414-4fd0-ab8c-55911b1596aa.jpg",keyword:!0,link:"https://www.youtube.com/watch?v=wiIzexAc2gs",node_type:"clip",pub_key:"02574d6e8e787372184b6f17c40d6c6fe1777db9015801f95dfd24692784d767cd",ref_id:"1b0f7188-cbe0-4fdc-ae0e-a5f3b8d6ea2c",show_title:"BOLT FUN",text:"think we should come back to that later on. Over to you, Anthony. Can you tell us a bit about your background and your first touch point when it comes to Lightning? I think first touch point was similar to Daly's time, like 2018, and I believe the first interaction I had with it online was with Polio Feed and with I think it was Lightning Spin. I think it was like one of the OGS from Rui Gomez that it was like, pay 100 SATS, and then you get to 1000 SATS, and then you get to spin a Roulette, and the Roulette is like, times two or times four. So it was the classic, like, give me 100 SATS, I'll give you 200 back. That type of functionality. I think this was my first interaction with Lightning. Seeing these micro payments go online without knowing who was behind these projects or where they were based, or if it was a company or where I was based, didn't really matter. It was just like a website and through pur codes, like being able to send back and forth, it just seemed amazing to me. And was it also that what fascinates you most about the Lightning network, the possibility of these super fast transactions no matter where you are. So, for me, the front facing part that's really interesting is being able to move value across the Internet with very little friction. And if you want to send one sat anywhere in the world, you can do it. And I think that breaks a huge boundary, or sort of breaks, like, the borders in the world for very small transactions. The backside part or more on the developer side is that since you're able to play with these very small amounts and do it very quickly, it just becomes very fun. And you get to experiment a lot and you get to try to break stuff and figure out what went wrong and not risk too much funds in the process of just playing around with it. Can you describe a bit like your journey as a Lightning developer? What experiments have you done so far? And maybe also, like, successful ones unsuccessful ones. Yeah. Since first interaction was with, say, a Lightning spin app, I wanted to try something similar in which the main functionality with Lightning was receiving and sending out payments. So I built this Lightning Roulette, like a mini Lightning Roulette website in which there was a Roulette like this casino game that you can send some SATS and then you can put it on a color or on numbers and then spend the Roulette and you get like some earnings based on it. This was like my very first experiment. Never went live with it or anything. I didn't really want any legal issues of having like a gambling site. And from here I moved over to ThunderHub was the next one. That is an LD note manager for me. It started off just as like a learning experience. I had previously just tried out the sending and the receiving functionality of a node. Like, get some stats and send out some stats. And I wanted to see the full API. What else was there offered in regards to channels, in regards to forwarding payments, in regards to signing messages? There's a full API that L and D covers that unless you have a very specific use case for each of these APIs, you never really go deep into it. So my thinking was, if I build a UI that can do everything, where you can do everything for your node, you sort of have to learn every single API endpoint that there is in an L and D. So it started off like that, just trying to build this UI that would have the most complete feature set connecting to L and D. That way I would be able to learn what were all the possibilities and what was everything that could be built on LNG. From here I met Jesse, my co founder for Ambassador. He was like, helping out with ThunderHub and getting feedback and answering questions and doing documentation and blog posts regarding it. So it was quite interesting to see also his passion. And here we met up and we were like, yeah, let's maybe build out another tool or something more professional. And we started off ambox with the idea of doing like a professional ThunderHub or like a more beefed up ThunderHub version. So with caching and database possibilities and really taking it to the next level, we built that for some months and we were very close to releasing it. And we realized there wasn't really a market for it and it wasn't really something that people needed. Our thinking was that this would be maybe interesting for companies or bigger players in the space. And what we didn't realize is that a lot of these bigger players, since a node is handling money, it has value. A lot of these companies sort of prefer to build everything in house and trust the least amount of outsource programs as possible, just to keep everything tight and secure. So we realized there wasn't really a market for it. And around the same time that we were realizing that, we saw that one ML was still the only explorer that was decent and used in the Lightning Space. And he said, just let's have the side idea, let's do this explorer and see how it goes. Maybe people find it interesting. And I think since the first week that we released amboss Space had a lot of feedback, a lot of good feedback. Like people really interested, thank God I don't have to go to One ML again type of situation. So we were like, okay, this is interesting. We're getting a lot of community feedback. Seems to be something that people were looking for. So we kept on that path ever since we started building out this Explorer, continued on it and building more features and yeah, that's like main focus right now. Yeah, super cool. The UI of Amber Space is definitely quite an improvement compared to what we have had in the ecosystem just one year ago. That's amazing to see that. And also very interesting, also your journey, because somehow it started off with experimenting, like for yourself, building an I own app with this Roulette app I think you mentioned, and then as an open source project, but maybe more or less mainly for learning things yourself, right. With the different data points in an LNG node. But it also then quickly developed to acquire known open source tool for node runners, I think ThunderHub. And now also with Amber Space, there comes also the whole commercial side and business perspective into it. But what I also liked regarding Amber Space, you also quickly thought about different ways of monetizing your service. At least that's what I remember. You tried out rather quickly to charge users, even if it was just some little sudden amount. But this also then gives you some first feeling, okay, where is the real value that you guys can deliver and that might end up in a proper product at the end? And ",timestamp:"00:07:03-00:16:34",topics:["Anthony Potdevin","Lightning developer"],type:"youtube",weight:4.92705722391535},{boost:0,date:1670056200,description:"Gemini earning & Genesis negotiation: How the banking industry works",episode_title:"The Chopping Block: SBF Wants to Win in the Court of Public Opinion. Will He? - Ep. 428",guests:[],hosts:[{name:"Tom Schmidt",profile_picture:"https://pbs.twimg.com/profile_images/1563232354277085189/xQL92DR4_400x400.jpg",ref_id:"bc9d3bfd-36b0-4cbc-a491-9370decf4c99",twitter_handle:"tomhschmidt"},{name:"Haseeb Qureshi",profile_picture:"https://pbs.twimg.com/profile_images/1581025415551889408/thQwG4lb_400x400.jpg",ref_id:"790e4217-dd9f-416f-b9f8-ed596937f5b5",twitter_handle:"hosseeb"},{name:"Robert Leshner",profile_picture:"https://pbs.twimg.com/profile_images/1587956987786104833/1SiKVj-s_400x400.jpg",ref_id:"ebaa2166-7982-423d-9f43-add89e7d47f9",twitter_handle:"rleshner"},{name:"Tarun Chitra",profile_picture:"https://pbs.twimg.com/profile_images/1587539091444432897/Z6_nmrCB_400x400.jpg",ref_id:"dfad4b23-92ff-4aa1-9aa4-abc1d54cd6d3",twitter_handle:"tarunchitra"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/7de0d293-8ae3-4362-8500-8f7300f3fe41.jpg",keyword:!0,link:"https://traffic.megaphone.fm/LSHML5256608163.mp3?updated=1670080150",node_type:"clip",pub_key:"03c7a7f42d94fdfc7a655515c1421cd1d20db090a1c24150201de0b1dc6a30b0ee",ref_id:"6681918f-0067-45b2-b7ad-0f79d9ce724d",show_title:"Unchained",text:"much did you put into Gemini Earn? And isn't Gemini Earn Genesis? Yeah, so they wrote it off completely and just paying it and die back to the it was about $2 million. It was almost the same. They were just starting this program. It was like dripping into Genesis. Yeah, that's great that they I mean, it's not luck, right? Like they did the slow rollout. That's great. Good for them. Well, it's not just there is some luck in that the timing of when this happened could have been totally different. But my point is both protocols had these events, they were relatively small communities, responded pretty quickly. So I would just like to say that and you can see how the debt is and people are all fighting about it versus like, I don't know how the Genesis get like billions of dollars of debt and not liquidate anyone. Good question. Because the humans didn't want to liquidate their best customers. Yes, that is definitely true. I think for Genesis and for Gemini earn specifically, my understanding is like, that's actually a large bulk of sort of the debt. It's like almost a billion dollars it's coming from Gemini earned. And I think it is inherently this weird issue, which I don't know why these programs were set up this way where you said inherent, like duration mismatch matches, right. Where you sell these sort of yield services to retail customers with the idea you can always deposit, you can always withdraw like a bank. But then on the back side you're making fixed term loans to market makers. And so even if the loans are fine, you're setting yourself up for a bankrupt because inherently there's no way to sort of and these aren't very liquid assets. It's not like you can go to the Fed and borrow against them or sell them easily. It's like these are sort of weird bespoke lending agreements. And so it's almost as if you raise a few million dollars and you told all the Jim and I are depositors to go on a vacation for six months when these loans are supposed to expire and they get their loans back. That is almost like an easier solution rather than trying to get everyone immediate liquidity for a product that just isn't designed to have immediate liquidity. Yeah, I mean, that's true, but what you're describing as banking and that's what Genesis is. Genesis is a bank. Right. I guess my question is why did Gemini not sort of bake that into the SLAs? The idea that in certain market conditions it's not guaranteed you're going to be able to withdraw one to one or some limitations on that or something better. I mean, you're right that I guess this is just banking, but it's weird to me that they're not presented more clearly upfront. Yeah. Gemini is one of the biggest creditors and I think that's who Genesis is negotiating with right now. Because if Gemini pushes them to bankruptcy, then it's all going to be a gigantic mess. And I think it's pretty clear that's not good for Gemini or for Gemini customers. But yeah, I think the answer, unfortunately is that that's what banking is. And banking is basically the business of duration mismatch and trying to manage that duration mismatch so that it doesn't explode in your face. And that's why eventually we invented central banks, is because managing those duration mismatches in times of real trial generally requires a bigger, stronger bank to come and save you. And if you recall, that's what we thought CZ was doing when we thought it was still a duration mismatch thing. Now we know it's not a duration mismatch thing, but that was presumably what the story was about how finance was going to save FTX. That was basically a pseudo central bank stepping in to help a weaker bank. Yeah, I mean, in all these cases you have entities in the case of FTX, it was essentially running out, making venture investments and buying up all these things with FTX customer money. In Genesis case, it's having like longer term assets, longer term loans against really short term gemini earn customer money that wants to withdraw every time bad things happen. In all these cases, it's investing for the long term with liabilities that can be demanded on a moment's notice. Yes, it's true. And I think look, I agree with you, Robert, that DFI shows us a much better way to resolve these problems. It's much better to have everything out in the open and have smart people thinking about this and not just a management team that's pushed into a corner and has to make up stuff to defend itself. We've seen the same behavior basically from FTX as from Genesis, which is that they just say whatever they need to to keep deposits on platform, and as the deposits leave, then all of a sudden everybody just goes quiet. So as a result of this attack, which to be clear, we're actually not sure whether Avi made money from this attack because presumably he was shorting it on the central exchange. So we don't know how the positions ended out. We do know the open interest and it was not very high on any of those. I was going to say there's only like 70 million and open interest on Curve perp. So I think he just evaporated 40 mil unless he had maybe some long exposure. But I don't know if there's like a gigabyte move for the Curve short. I see. So we think it was like a lost one. Do you think someone like that wouldn't be bragging about it if they even broke even? That's fair. I think specifically he was, like, building up this short because he was trying to reach so Michael, the Curve founder, has like, I think, a few hundred mill in curve as collateral and so trying to hit his liquidation threshold, which was like they hoped that that would cause us to sort of massive dump and unfortunately got discovered and squeezed. Right? Yeah. And then Curve released their white paper for their stable coin in the middle of this thing, which was emergency pocket white paper. Exactly. A great move to have in your utility belt when you need it. My one criticism, I mean, there's maybe some benefits and merits to put in that's very unspecified, but I will say my one criticism is I don't think any defy mechanism needs to use the word adiabatic because it has been to do with crypto, and that paper has. It six times seeing it to run. Yeah. Okay, so the consequence of this is that obviously there was some bad debt on Ave. Ave is going to pay that back. So I think, obviously. Fine. It's a relatively small amount of debt for Ave as well as for maker. And then Ave paused lending markets for 17 of their tokens compound, then went and did the same thing, which is, I think, a different set of like, ten tokens. Doesn'T have there's no, like, debt ceiling. Aviv three ",timestamp:"00:39:42-00:46:23",topics:["Gemini","Genesis"],type:"podcast",weight:6.995534682333783},{boost:0,date:0,description:"Building on Lightning: Chad Atkins's Lightning App",episode_title:"Cool Apps Built on Lightning - March 16, 2022 - Voltage Twitter Spaces",guests:[{name:"Chad Atkins",profile_picture:"https://pbs.twimg.com/profile_images/1200611447979544576/W9ocRJTb_400x400.jpg",ref_id:"62da3c50-0a46-400b-81a3-5f482f5b8fee",twitter_handle:"Chemchad"},{name:"Michael Atwood",profile_picture:"https://pbs.twimg.com/profile_images/1362207977470521345/Jy2_Ge60_400x400.jpg",ref_id:"16359ade-afb9-4a37-be0b-0844a6134327",twitter_handle:"Dooowta"}],hosts:[{name:"Nate Glasky",profile_picture:"",ref_id:"0662789d-b39e-4aed-ad6f-44257695b6af",twitter_handle:""},{name:" Bobby Watts",profile_picture:"",ref_id:"ae2685c6-1307-473a-95b0-87c234e50483",twitter_handle:""}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/2ec62250-4755-4616-8342-096a2cfab95f.jpg",keyword:!0,link:"https://www.youtube.com/watch?v=4EJrnxYOShY",node_type:"clip",pub_key:"",ref_id:"f507641d-2514-41d3-a4f3-9b218136fa98",show_title:"Voltage",text:"you. Talk to you later. Cool. And on that note, before you kind of dive into your list and you've got a pretty extensive listening, one of the things that I think is going to start coming to these apps in the future that I'm eager to be built out, I know it's early is Imagine on the podcasting app. If you're someone who's an avid listener, a podcast, and you have a good reputation and track history of sharing very key clips, you might be able to receive value even as a consumer because you refer new listeners to, let's say, a small podcast, right? Like I refer someone to Marty Ben's podcast and my audience is a bunch of legacy finance dudes and they like it and it leads to more listeners and subscriptions for Marty. Marty could say, hey, out of my 43% that I make in Fountain, which is what his percentage is right now, and he dives the rest across his team. I'm willing to give Bobby Zero 1% of that or 1% of that 43%. And it creates like a waterfall incentive structure where people can actually earn for doing good things and being a good consumer. So Michael Sailor says you can pay to reduce spam and make everything a Lightning invoice, but you don't necessarily need to do that you could just kind of like Breeze and Fountain does. You can't necessarily stream one Sat. Anyone who uses the apps, they send it in like 100 sat batches. You could do the same thing where if you refer enough people over every week, you might get a small deposit of SATS into your account because you're actually a good economic actor in sharing value and passing it forward to an audience that may not hear it. So I'm pretty bullish on the idea of that. I was thinking about this the other day. I don't know how this would work, but I'm just going to say it anyway. It only takes a second. What if there was a sort of like a router firmware built with Lightning so other people can connect to your WiFi or whatever and stream Sat for the WiFi connection and you can hook up your neighborhood to that or something? I don't know. I think that would be pretty cool. Yeah, that's interesting. I know we have a lot of new people here. This is an open discussion. We're just talking about everything being built on Lightning. What cool apps are out there right now, what's coming in the future. And if you're building something, feel free to raise your hand. I see Chad in the audience. I know he is building something, so if he doesn't mind, I'm going to invite him up. We will see. I'm going to give him a second here. If not, I'm going to talk about it anyway. When he comes up, he can take over. So Chad has built this interesting sort of Lightning app called satbox, satbox TV. It's essentially a Lightning enabled jukebox powered by YouTube and Twitch, where you basically just paste in a YouTube link and specify how many stats you want to pay to play it. And depending on how much stats you pay, you could jump over people that are on the playlist. So if there's like three videos in queue for like 500 stats each, and you link a YouTube video and pay 600 stats, you will go above them and it plays the YouTube video up to five minutes and then it cuts you off. So he posted a couple of weeks ago about it and we actually had some pretty some people didn't do just music. Some of them are pretty funny. But I think it's a really cool idea and I'd be interested to see more of that sort of music on Lightning sort of get developed. So Chad, if you're out there, let me know. We'll pull you up if you want to talk about it. That's super interesting. That could create even like a bidding or auction service for marketing and advertisements during online shows. You could see the live bidding, which would create a more transparent structure of advertising. But I'll let Chad speak. Can you guys hear me? Yes, sir. Sorry about that. I was on my laptop, so I had to open it up on my phone. Yeah. So I missed what you were just saying, but I guess I could just start from the beginning. Yeah, man, go for it. My name is Chad. I've been building something not so serious, mostly for fun. It's my first lightning app called satbox TV. Yeah. How I originally announced it and described it to people was simply just as a lightning powered jukebox. But more generally, it's just a live stream that plays a viewer chosen content. So right now it broadcasts the livestream to Twitch TV and the content is just YouTube videos. The way it works is the viewers can just add a YouTube video to a queue by attaching some SATS to it and making a lightning payment. And the video in the queue with the highest amount of SATS attached to it is played next on the live stream for like five minutes. So, yeah, it's pretty simple. It's all automated and it can be kind of fun if there's enough people in there because it's kind of gamified. If you want to mess around with people, you can just snipe like a meme video in there or something. And since it's on Twitch, it's integrated with the chat room so you can respond and see what people think of the videos you're playing, whether it's a song or something funny. But yeah, it's pretty simple. That's mostly it. Yeah, it was pretty funny when we had a few people in there doing it a couple of weeks ago. People are playing the first five minutes of like, the Honey Badger documentary. I was enjoying watching it on the side, just people posting stuff. It was pretty good, but I think the sort of projects are really cool and I hope people kind of try it out more. Yeah, thanks. There's a couple more things I want to do to it right now. I've been running the stream, like Live 24/7, so I think I'm going to cut it down and maybe build it around a schedule to try and get more people in there at specific times and just trying to make it fun and maybe have something for. No, I. Was just going to say yes. If you have a thing where it's like Thursday is satbox night or something like that, I would totally like yeah, spread the word and participate. Like, that'd be great. Exactly. So I'm thinking of doing some stuff like that and just figuring out some more ways to make it fun and try to onboard some gamers into bitcoin. That's the goal. I love it. Nice. ",timestamp:"00:08:42-00:16:20",topics:["Lightning","Chad Atkins","podcasting"],type:"youtube",weight:4.446621894836426},{boost:0,date:1638594e3,description:"Small Countries Monetizing their Native Energy Resource for [[Bitcoin]]",episode_title:"WHY ARE WE BULLISH Max Keiser Meditation Man Stephan Livera ep221",guests:[{name:"Max Keiser",profile_picture:"https://pbs.twimg.com/profile_images/1361873587582472195/y57DiTYX_400x400.jpg",ref_id:"743efd07-d194-4c74-8663-45c3b8646b8e",twitter_handle:"Maxkeiser"},{name:"Stephan Livera",profile_picture:"https://pbs.twimg.com/profile_images/1362551718110580740/v-W5Q2uo_400x400.jpg",ref_id:"72f57157-c96e-4466-8bf1-290cfe1f8a0b",twitter_handle:"stephanlivera"},{name:"Meditation Man",profile_picture:"",ref_id:"6cf1c2b8-8a28-4840-9132-3c2631d6ea58",twitter_handle:""}],hosts:[],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/7070839d-051e-48e4-bd9a-95c09b310db2.jpg",keyword:!0,link:"https://anchor.fm/s/11e95d20/podcast/play/44361406/https%3A%2F%2Fd3ctxlq1ktw2nl.cloudfront.net%2Fstaging%2F2021-11-4%2Fbe464ffe-83aa-f709-63c9-c1fc5961e7f2.mp3",node_type:"clip",pub_key:"",ref_id:"97fe1ee4-8b91-403e-8a64-d8f839be5b52",show_title:"BTC Sessions",text:"absolutely. I think El Salvador is such an incredible place for this to start. I've thought for a long time that being in the United States and trying to Orange pill so many different people, talking to so many people who are just not receptive to even opening their minds enough to start understanding Bitcoin, it's no surprise that it's in the more like the developing nations, the smaller nations, where you're going to see this kind of embrace of Bitcoin happen. And if you just look at El Salvador as the first they're dollarized, they're under the thumb of all those global institutions, IMF, et cetera, and they don't have sort of their destiny in their own hands in so many ways. So with Bitcoin comes this incredible monetary sort of Renaissance there that can give them sovereignty in ways they've never had before. It's incredible to me. They're tying this all into volcano energy. What an incredible thing to actually have a buyer in Bitcoin for their native sovereign energy source that otherwise they wouldn't really be able to bring to market. So it's a really incredible synergy of those forces of having the ability to cancel out their debt and be whole and sovereign in a monetary fashion, but also to actually be able to monetize their native energy resource. And you just start looking around the world. How many small countries are out there with broken currencies or dollarized or just completely not in control monetarily, but they have some kind of energy resource. They've just never been in a position to be able to actually bring it to market or even just adopting Bitcoin and gaining that sort of nation state sovereignty against the sort of world economy. And then that just leads right into the geopolitics and the dynamics there. So it's an incredible development. And I predict, should everything go well, we're going to just see an absolute domino effect of small countries, and that's where it's going to start. It's going to start on the edges. Big countries like the United States are going to be one of the last, if not the last, to adopt this fully. And so I'm really excited to see what happens next. I like early ",timestamp:"00:35:17-00:37:56",topics:["bitcoin"],type:"podcast",weight:4.4097411691227},{boost:0,date:1616679600,description:"Debate on bitcoin vs dollar's supremacy",episode_title:"Debating Professor Hanke on Bitcoin's value",guests:[{name:"Hong Fang",profile_picture:"https://pbs.twimg.com/profile_images/1554126711502999553/EkTARSpF_400x400.jpg",ref_id:"9adabc40-bbc7-44aa-8a11-c139f3697f80",twitter_handle:"hfangca"},{name:"Saifedean Ammous",profile_picture:"https://pbs.twimg.com/profile_images/1362635264158552067/CSsOKrBd_400x400.jpg",ref_id:"a61d4df9-1db4-4bdc-a7e9-a4c99268e59b",twitter_handle:"saifedean"},{name:"Professor Steve Hanke",profile_picture:"https://pbs.twimg.com/profile_images/915395033871867905/3zbE7bAT_400x400.jpg",ref_id:"4a754eea-7f67-46d0-b4d2-f0aa58aba36e",twitter_handle:"steve_hanke"}],hosts:[{name:"David Lin",profile_picture:"https://pbs.twimg.com/profile_images/1494034862688411662/PnegVyJF_400x400.jpg",ref_id:"4aa21d3b-afe2-434b-a77c-79dba268a23d",twitter_handle:"davidlin_TV"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/5cdd0aef-f1a7-4d3b-8336-7f81c2db4a40.jpg",keyword:!0,link:"https://www.buzzsprout.com/1849151/9671311-debating-professor-hanke-on-bitcoin-s-value.mp3",node_type:"clip",pub_key:"",ref_id:"9020a99f-62d8-462a-81aa-515e31bb5536",show_title:"The Bitcoin Standard Podcast",text:"Must be a price at which you would have to if you think it's small, and you have to be able to name a price at which you would admit that it's no longer small, it's no longer a footnote, because it is much bigger than it was last year in Lebanon. It's not as big as the dollar yet, but it's much bigger than what it was last year. So if the trend continues, at what level would you admit that this is just something that people can use? It works. It does what it says on the tin. You can send it across the world, and it maintains its supply. It takes time. When Elon Musk first started to invent electricity cards, people in the traditional auto industry think that was just a joke, a footnote. But now Tesla is the most valuable auto company in the world. So it takes time. And when the paradigm shifts, it comes slowly and then suddenly. But I'd like to ask professor Hanky to specify a price at which bitcoin becomes big enough for him to stop saying it has a fundamental you just. Measure the measurements that I've given you, the dimensions that I've given you. In other words, how many commodities? When are we going to start pricing oil and bitcoin? When are we pricing corn? When are we pricing wheat? Okay, that's a commodities. When are we going to start pricing cars and manufactured goods and bitcoin? You're talking about the speculative aggregate moving this thing around. I'm talking about the uses of it in transactions. It is actually being used in transactions. Dr. Hank it's probably just not as visible to us, in us, than to other people living in different regimes where inflation is super, is taking away their health for example, in Latin America, there are a lot of actually commercial entities in their export business. For example, with Asia, they're selling commodities to Asia. They transact in bitcoin. This is an academic footnote. The dollar dominates all of these transactions. Yeah, but the British found dominated at some point, and it doesn't anymore, just because it does. That's exactly my point about entry of a competitor, a superior competitor. And the US dollar became superior after World War One and drove the British pound sterling to the sidelines. ",timestamp:"00:28:15-00:30:59",topics:["Transactional currency","dollar supremacy"],type:"podcast",weight:4.409741163253792},{boost:0,date:1627704e3,description:"[[Bitcoin narrative shift]] in the [[Film industry]]",episode_title:"WHY ARE WE BULLISH Natalie Brunell Aaron Segal Lauren Sieckmann Dan Held ep191",guests:[{name:"Dan Held",profile_picture:"https://pbs.twimg.com/profile_images/1522608646043181060/QQRjVYhi_400x400.jpg",ref_id:"3e22facc-9310-4346-82ac-3e183b88fa51",twitter_handle:"Ledger"},{name:"Lauren Sieckmann",profile_picture:"",ref_id:"427bb439-f251-4c7e-89fb-b53ecd8c9a82",twitter_handle:""},{name:"Aaron Segal",profile_picture:"https://pbs.twimg.com/profile_images/884309028125294592/sLDGwzDO_400x400.jpg",ref_id:"f7483c61-ba76-4a19-8d8d-992966e1f79e",twitter_handle:"AaronSegalActor"},{name:"Natalie Brunell",profile_picture:"",ref_id:"a09e8874-abbe-4a85-b19d-08cac1c8afde",twitter_handle:""}],hosts:[],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/419512c2-e309-4b25-bfe2-cd481d53f66d.jpg",keyword:!0,link:"https://anchor.fm/s/11e95d20/podcast/play/38086440/https%3A%2F%2Fd3ctxlq1ktw2nl.cloudfront.net%2Fstaging%2F2021-6-31%2F116ac8f3-ce82-01e5-2865-da5c486c8330.mp3",node_type:"clip",pub_key:"",ref_id:"c9a7d4e3-bdca-4b73-8209-0eefae9248cb",show_title:"BTC Sessions",text:"keep it rolling. And Lauren, since we're just with you, we're going to keep rolling with your reason for being bullish. Meanwhile, if people are in the chat, of course, keep those chat messages coming. I'll bring them up as they come up and are relevant to the conversation. And, of course, smash that like, button. Give it a share. And Lauren, what has you feeling bullish this week? All right. So I guess my reason for being bullish is, I guess, a big narrative shift around Bitcoin that I've seen in the film industry. So as I mentioned, I was writing a screenplay about Bitcoin. And eventually I came to the conclusion that a documentary would be more appropriate for the time. You can produce a documentary a lot quicker than you can a feature film. So I started pitching this idea, this concept that I wrote out to a bunch of producers. And so the first responses I got were, there's no way anybody is going to make a Bitcoin documentary with you. The target audience will be a small group of nerds. Everybody knows that this is stupid. So I just kept pitching it. And I have a friend that I taught his daughter volleyball, and he's a really good documentary producer. I stood on with him for probably five months. I kept pitching it to him and I kept saying, I'm telling you, this is brilliant. We have to make this documentary. So eventually, around March this year, he came around and we're producing this documentary together, and we've been working on it. So that was huge. And I'm really bullish about this documentary. But I guess in the past month, throughout this process of making this documentary, I've spoken with a lot of people in Hollywood, and when I tell them I'm making a Bitcoin documentary now, the response has changed and their eyes light up. They're like Bitcoin. I've been trying to get into it, but I don't know where to start. And so I've been telling them what books to read and what podcast listen to. So I think it's awesome that I feel like there's a really big narrative shift and people are really starting to see the value and they want to learn, and it is just a matter of people are overwhelmed and they don't know where to start. And I was in that same boat a year and a half ago. I had no idea where to start. It's overwhelming when you first look into it. And I think that's why a lot of people, they take the easier route because they don't want to put in the work and they'll judge it, and they'll call it a group of shadowy figures, and they'll make up things like that. That's where the fun comes. I don't want to put in the work to learn. But yeah, I've seen a huge narrative shift. I think it's really bullish. I love it ",timestamp:"00:44:17-00:46:40",topics:["bitcoin narrative shift","film industry"],type:"podcast",weight:4.389463424688496},{boost:0,date:1632355200,description:"How do supply issues affect the Bitcoin ASIC market in general?",episode_title:"The ASIC Mining Hardware Market",guests:[{name:"Vincent Zhang",profile_picture:"https://pbs.twimg.com/profile_images/1158285609196109825/fuB-e6lm_400x400.jpg",ref_id:"98e7bc98-3a3b-4ddf-9b48-5dcd78973739",twitter_handle:"Whatsminer_MBT"},{name:"Vincent Vuong",profile_picture:"https://pbs.twimg.com/profile_images/1260974518547312640/n47yvbNL_400x400.jpg",ref_id:"8390e230-e36b-4e0d-9f5d-70c6635bf3c2",twitter_handle:"BitcoinVincent"}],hosts:[{name:"Will Foxley",profile_picture:"https://pbs.twimg.com/profile_images/1580970227193376776/9oQfeExj_400x400.jpg",ref_id:"704b9e82-3e40-40b6-874c-6bb8fadafbef",twitter_handle:"wsfoxley"},{name:"Zack Voell",profile_picture:"https://pbs.twimg.com/profile_images/1595803006737448961/fFrf7VJb_400x400.jpg",ref_id:"e32c7661-c635-4089-a620-ffce509eff0e",twitter_handle:"zackvoell"},{name:"Compass Mining",profile_picture:"https://pbs.twimg.com/profile_images/1425165074373791744/f2CgInvP_400x400.jpg",ref_id:"812e5d37-47fb-4077-915f-df52e2ef84d8",twitter_handle:"compass_mining"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/ae91fac6-a1af-4877-9a92-e793d556ee66.jpg",keyword:!0,link:"https://www.youtube.com/watch?v=qKeUCNXa4Uc",node_type:"clip",pub_key:"03c18d0c6c35333f22bc524e21a5fd1d2d9886f5d4d958dc1de95d025de5c84cfc",ref_id:"05fee350-6926-4873-885a-76fd23008692",show_title:"Compass Mining",text:"those insights. So Damon is actually going to throw up a video here in a second. So this is Los Angeles Bay and Long Beach Bay, which of course is one of the larger inbound places for bringing in shipping containers from Asia. This is like one of the key places for dropping off stuff to go to market in the US. From the Pacific Rim. And it is totally backed up. I saw Tweet earlier today and I don't know if the number is quite on basis, but apparently 16% of all shipping containers in the world are stuck in this bay right now. And that includes like a lot of necessary parts for bitcoin mining. So this kind of speaks to, in a visual sense, to the way that there's been a supply crunch all across the world on all markets and it's been extending for almost two years now. You first saw these images in April 2020. Here we are coming up on April 2022 in six months or so and we saw the same images in the same bay. So Vincent from Compass, I'll throw it to you, the supply chain issues run deep in every single market right now. How is it affecting the bitcoin ASIC market in general since we have all these different computer parts that are not necessary for Asics, we have all these people demanding to buy Asics to take advantage of the increased bitcoin price right now. Yeah, this is a really interesting question. I actually wanted to ask Vincent for MicroBT a question about this too. Generally a lot of people think that I guess he dropped off for a. Little bit kill me back. But for us right now, I have a feeling that there's a higher bare minimum cost that the manufacturers are producing the asics at just because one of the supply crunch of the wafers, generally the cryptocurrency industry consumes less than 1% of the overall capacity of the semiconductor companies like TSMC or Samsung. So we're not in the grand scheme of things, we are not that big of a player compared to like the cars and Apple and everything. We get second tier treatment compared to them just based on the number that they produce. So I think that there's an overall higher bare minimum cost that the manufacturer is producing at and that is getting passed on to the clients as well. So a lot of people think that producing is cheap. They aren't really realizing that all the parts and components of an ASIC are slowly decreasing in price as well. And that brings me to a question that I wanted to ask Vincent from what's minor? So generally the price of ASIC materials remains relatively stable even when the bitcoin price increases or decreases. But have you guys started to see an increase in your cost to produce a machine based on the amount of wafers that you guys are getting from the foundry? Obviously, if there's details you can't share, then don't worry about it. Yeah, so what we can see is in past one and a half years so everything become shortage. Okay? So no matter it is the ASIC chips we took from, we take from Fondue factory or the chips for power supply unit or the components for power supply unit and hashboard and other parts. So what we can see is this of course have serious impact on the cost of the minor and the lead time of the miners. Right now the situation is not only the cost increased, but also the lead time also becoming longer. So recently you might have read the news that both TSMC and Samsung increased the cost of the waivers. The reason they give is given is because right now the mind from various kinds of the waivers of the chips are huge. For example, we are working with Samsung. Samsung. Normally, they have clients like Qualcomm and Samsung Electronics and Media. Okay. So because everyone won't get more supply of the waivers. So for example, my actual requirement is hundred, but I may put 120 or 150 to Samsung phones refreshed because I know that I put 180 or something. So definitely my demand may be cut in some percentage. So to try to get more waiver supply capacity from either TSMC or from Samsung. So the purchase of the waivers may increase the demand from themselves. So which means, you know, both pharmacy and the TSMC may receive double of the real demand. So they try to increase the cost of the Wafers to prevent the purchase of the waiver unnecessary, put more demand of the waivers. This is the reason they give to us. Definitely you will understand that for the ASIC hardware the most cost is from the chips, okay? And also recently some of the components which is very important for making the minus, also the cost increase a lot. I just give you one example. There is one chip which is power management chips to making the power supply unit earlier we can acquire this chips at you can say half dollar, okay? So now you are not able to get sufficient quantity even at $5 per chip. So the cost increase ten times. However, though it has a little impact on the cost because this is not a major cost of the hardware. So however, definitely the cost increase and then the problem is the lead time is too long. Okay? So comparing with the previous situation, of course this is the impact on the hardware side. And so for logistics also we can see in one month. So once in a year the real house in United States or in different countries totally get contested. So there's no work to petitize the cargo and the container cannot be returned back and the flight, you cannot get execution space. So all this not only impact the cost of the waivers but also the supply efficiency of the hardware rigs. And of course it also has a small impact due to copyright 19 situation in China and in the factory outside of China, for example in Pasta in the month of August. So Malaysia and Thailand factory almost closed because of COVID-19 situation becoming worse. So all these factors actually have the impact on the supply of the minus and the cost of the minus. Yeah, there's a great question from Vincent, a great answer actually also from Vincent. But there's so many different factors that go into that. I guess a followup question to all of that is like how long do you foresee all of these different exogenous factors persisting that lead to a tenx increase in price and these crazy long lead times, some of which you said is related to the COVID-19 situation but also just other unrelated manufacturing and supply chain complications? Do you see this problem persisting maybe only for a year or two at most? Or is it just the new state of the market when you're manufacturing bitcoin. Asics back to you visit from Westminster. From the situation right now we can see is that the situation may be becoming better from Q Three to some 22 because earlier Samsung will give you the answer no, definitely no. Okay, so I do not have more supply capacity, but right now what we can see is we might be able to get some more supply capacity in Q Two and Q Four, however, and the answer is not solid right now. So what we are expecting is maybe from Q 423. So the supply situation of the wafers and chips shall becoming better. Got you. That makes sense. It's a little ways off, but not too far. ",timestamp:"00:15:03-00:25:58",topics:["Bitcoin ASIC Market"],type:"youtube",weight:4.388186931722114},{boost:0,date:1677681754,description:"Why KYC anti-money laundering measures are not effective and how to use Bitcoin to overcome KYC/AML",episode_title:"Freedom Money w/ Jeanine, Abubakar, Mills and Matt Odell",guests:[{name:" Jeanine",profile_picture:"https://pbs.twimg.com/profile_images/850023968484368386/jBcIv7W1_400x400.jpg",ref_id:"dd36be1a-acf4-4bcf-a085-d713f49c4494",twitter_handle:"JudgeJeanine"},{name:"Abubakar Nur Khalil",profile_picture:"https://pbs.twimg.com/profile_images/1570024329512992768/D42LDEjI_400x400.jpg",ref_id:"ee2cd308-168e-4ffc-9332-2957981b5acc",twitter_handle:"ihate1999"},{name:"Matt Odell",profile_picture:"https://pbs.twimg.com/profile_images/1421584695746338819/Z_7ZfAeP_400x400.jpg",ref_id:"4f2825ff-3b88-4595-84d4-36e81544b79a",twitter_handle:"ODELL"}],hosts:[{name:"CK",profile_picture:"https://pbs.twimg.com/profile_images/1575940779746394133/xMNVsyxY_400x400.jpg",ref_id:"1f90d285-6fad-4812-8d2e-69b8a52a59b2",twitter_handle:"ck_SNARKs"},{name:"Mills",profile_picture:"https://pbs.twimg.com/profile_images/1574338066231304193/3SBMUkej_400x400.jpg",ref_id:"b88d7a57-b9a6-4cdb-95d8-1be4d118eeeb",twitter_handle:"SpecificMills"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/1583c7c4-f4f2-4e52-8f27-a1eaeb6289fd.jpg",keyword:!0,link:"https://anchor.fm/s/cefa18a0/podcast/play/65803306/https%253A%252F%252Fd3ctxlq1ktw2nl.cloudfront.net%252Fstaging%252F2023-2-1%252F315488876-44100-2-69f740e2360ea.m4a",node_type:"clip",pub_key:"037f7331a5bef6c6f880246747befcc3767f3bb9730bc5e6f7c3770f4184ed0bff",ref_id:"77ce133d-2bdb-490c-9638-88cc560062dc",show_title:"Bitcoin Magazine Podcast",text:"that. Awesome. Yeah. It seems like it's important to understand cost benefit analysis. Understanding your risk is like a really good first step, and then you can decide what you're willing to undertake to mitigate that. So that makes a lot of sense just from a practicality standpoint and to kind of segue this a little bit more onto the Bitcoin side of things. I know you and Matt talked about anti money laundering laws as they relate to financial surveillance, and I would just be curious your thoughts on how you see Bitcoin fitting into that. Obviously in the Bitcoin community we talk a lot about individual freedom, self determination, but it seems that obviously there's many people that participate in seed exchanges. They don't necessarily have privacy measures for when they're sending their Bitcoin. So I would be curious how you approach that perhaps in your life, for what tools and capabilities you would point people towards if they want to try and understand to what degree they are exposed and then how they can go about mitigating. Yeah, so my opinion on anti money laundering policies are generally, I mean, this isn't even my opinion. This is based on research that I've done for my newsletter. I've cited studies regarding the effectiveness of anti money laundering, including from the United Nations. I think it I think I cited it in the interview. There was a United Nations paper or report about the effectiveness of AML back in 2011, and their conclusion was that strangely compared to, for example, the policies that cut down on drug trafficking, the amount of laundered money that is captured by any of those policies is less than 1%. And that's significantly less than the effectiveness of anti drug trafficking. And so their question was, well wait a second, are the drug traffickers just so much smarter than the money launderers? What's going on here? And my guess would be that, well, I have a lot of guesses of why it's not effective, but the point is that it's not effective for whatever reason, and that's in a system where we don't really have non KYC for bank accounts anymore. I mean, if you have significant wealth, then you can get that. But that's a small number of people. And maybe that's part of the problem is that the only people who end up getting privacy are the people who have a ton of money and engage in the most corruption. But yeah, so even when you have mostly to fully KYC system, apparently the anti money laundering rules are not really working. Most of the people saying that they're fighting this say, oh, it's cash's fault. And that hasn't really borne out either because cash has a number of benefits that are outweighed by any cost like that. And so the problem with when AML gets applied to things like Bitcoin is that the people doing the investigations think that they've got the golden goose because they have a database that anyone, a record of all these financial transactions that anyone can download and sift through. And they think that because they have that, that they'll eventually just find all the answers and they'll be able to track money flows perfectly. The problem with that is, as I've talked about a number of times, especially most recently in Prague with my blockchain surveillance talk, a lot of the work that they do, like most of the overwhelming majority of the work, they do. If they have any certainty at all about where coins came from or who owns which coins currently that information is usually tied to, they have very clear evidence that this is an exchange address because the exchange has published it. For example, that's one of the rare instances where they can say with relative certainty, like these coins at least come from this entity. That doesn't tell them necessarily which customer owned the coins or if they're just owned by the exchange or whatever. But that's like the most amount of certainty I've seen that they can get. Everything else is just guesswork. They're making guesses about why money moves, they're making guesses about who controls which coins at any given time. And given that all of this stuff can be moved in ten minutes or less, every ten minutes or less, it's quite complicated to actually get any concrete evidence of what is happening on the blockchain. And they like to claim otherwise. They like to market themselves as they can solve investigations. Their software gets bought by all of these governments and investigators, but at the end of the day, and actually sometimes they are honest about this, including coin bases. Investigators in particular. They wrote a series of blog posts where they said blockchain analysis is more art than science, which I find to be an infuriating statement that they're trying to put people in jail with art. That doesn't seem like such a great idea. So the thing people have to understand is that when AML gets applied to Bitcoin, it's getting applied to a system where people make the assumption that because they have the data, they have the answers. The problem is, there's a lot of interpretation that goes into figuring out what that data means. And in a lot of cases, there is not enough information. And that's by design. Bitcoin was designed, as it says in the white paper, to basically give a very limited amount of information, just the basic necessary details for the transfer to be validated. And that's it. There are some guesses you can make. Obviously, given that I focus on Bitcoin privacy, there's a number of things that you can give away and give hints that a certain transfer is for a certain purpose or that it may belong to a certain person, and that's still important. But at the end of the day, a lot of the work that the people that you're fighting against are doing is guesswork. And it should scare people that people could potentially be put in jail based on guesswork that they even themselves call art and not science. Like, at the bare minimum, if their standard does not reach the level of science, then I don't think they should have any authority whatsoever to be putting people in jail. But there's also certain times where it's pretty cut and dry, and then they do throw people in jail, which I feel like is important to mention. We had a situation where the Volunteers team, the main opposition leader in Russia, was accepting donations using Bitcoin, and they kept using the same reused address. So any payments that go to that address are obviously going to the volunteers donation fund. So the Putin regime went to Finance and said to Finance, we want to know the identities of every single person on Finance who sent money to this donation fund, and Finance just handed it right over in that situation. That's just very obvious on chain, what happened there mixed with KYC data. Yeah. So in that instance, that's, like I said, where an entity is publicly associating themselves and their identity with an address, they're not using fresh addresses for each donation. They're not offering a way to do donations more privately, for example, with reasonable payment codes. One of the tools and yeah, the other thing people have to remember is that because of these AML policies, which go back way before Bitcoin, but especially with these exchanges, these banks, these crypto banks, are not your friend by law. The AML rules make the banks basically in an adversarial relationship with you as a customer because their job is well, the job that the compliance people have is to try to make sure as much as possible to prevent little people. Not so much the big people, but little people with less money from doing anything that might get the bank in trouble with the government. So anytime you're using exchange, if there is any reason whatsoever that somebody could use your financial data against you, do not think that the exchange will protect you. Maybe you'll get lucky and maybe some of them will stand up for you if your case has enough marketable public relations value to them in fighting the case. But do not count on that. You should not consider any exchange to be your friend. ",timestamp:"00:12:37-00:20:36",topics:["KYC","anti-money laundering"],type:"podcast",weight:43.188702609415806},{boost:0,date:null,description:"What would happen if Starlink were to integrate BOLT 12 static QR codes?",episode_title:"The Orange Sun 🌞 VISA, MasterCard & #Bitcoin #BOLT12",guests:[{name:"Oluwasegun Kosemani",profile_picture:"https://pbs.twimg.com/profile_images/1538403135101800450/sO-RPI9U_400x400.jpg",ref_id:"25ce4b90-6689-4dd9-84b6-240c7bcbe407",twitter_handle:"MrlamilamiKosch"},{name:"~₿ Maxi~",profile_picture:"https://pbs.twimg.com/profile_images/1446241859651637250/i67F3y9p_400x400.jpg",ref_id:"ad997ae7-0726-431a-9f72-82da091c0658",twitter_handle:"fede0891"},{name:"TK☣️Ph.Ple₿",profile_picture:"https://pbs.twimg.com/profile_images/1505791887415730177/d0YDQ3Xc_400x400.jpg",ref_id:"9e3ffa2c-9410-48e9-a726-8312c0abcd7c",twitter_handle:"ToxiKat27"},{name:"FireBurs†s",profile_picture:"https://pbs.twimg.com/profile_images/1517827165198458880/N79Wpx85_400x400.jpg",ref_id:"cda1d3ad-dd80-458b-a5fb-a28861df10a7",twitter_handle:"FireBursts"},{name:"Nikolai Tjongarero",profile_picture:"https://pbs.twimg.com/profile_images/1578458155964682274/_SzDxkAJ_400x400.jpg",ref_id:"821ee040-2267-454e-a59a-92da51568afa",twitter_handle:"BitcoinNaijaShw"},{name:"ブランドン",profile_picture:"https://pbs.twimg.com/profile_images/834861311762649090/N0KAP4zH_400x400.jpg",ref_id:"3d41531d-6a59-4771-81f9-0924b4c02561",twitter_handle:"blario"}],hosts:[{name:"Satoshi’s Journal",profile_picture:"https://pbs.twimg.com/profile_images/1598641632601047042/qrZMP5Oy_400x400.jpg",ref_id:"d977ed11-09b0-4143-828d-582ecb8b58ca",twitter_handle:"SatoshisJournal"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/9b2e17f2-71c5-4f1e-a3e7-720d06dab810.jpg",keyword:!0,link:"https://stakwork-uploads.s3.amazonaws.com/uploads/customers/2707/media_to_local/94a86a32-91c2-4717-b5cb-b36cef925776/38decc02-c922-4c1d-a605-7cd54c91a01d.mp3",node_type:"clip",pub_key:"03c18d0c6c35333f22bc524e21a5fd1d2d9886f5d4d958dc1de95d025de5c84cfc",ref_id:"7a7c8427-a11e-438b-ac49-345882ca9a3f",show_title:"Satoshi’s Journal",text:"but I think I'm on to something. So you guys tell me. So if Starlink, let's just say that their base model cost about $500. If they were to integrate these static QR codes, bolt twelve lightning codes, because they're going to provide, they're going to actually charge a monthly subscription, we know that. But if they could actually basically integrate these bolt twelve QR codes on their units or within a location, and if they do this on a communal basis, people can just scan those Lightning QR codes and then send in Satoshis somehow, some way for the data they're using. Whatever data they use, that's what they pay and they don't have to pay anymore. So like if they were to use that and that's the future with just content creators as well. So like in the future you probably pay for public utilities and you pay for internet. That way you pay as you go kind of deal. That's the beauty of lightning is you can simply send the corresponding satoshis that relate to the amount of energy you expend or data you use. In Africa, you can speak to us and maybe the Ramifications, I understand you guys have to buy certain data for your internet and all, so if you can pay as you go through satoshis, I think you guys kind of have an iteration of that now, but it's like more fiat. So do you foresee us? You guys kind of doing that with lightning? Oh, you're on mute. If you're trying to talk, or maybe. You can't talk, you will have to rephrase that question. That question is very white. Okay, let's summarize the question again. Yeah, no, that's right. So right now there's the ability for people to listen to podcasts and only pay for the part that they listen to. And if they find value in the first minute and they just want to pay for the first minute, then they just send satoshis and they don't have to listen to the whole thing. So from a standpoint of utilities and maybe Starlink, when you pay on a monthly basis for the amount of energy you expend, whether it's natural gas or propane, whatever, or you have to send Satoshis for data usage, whether it's cell phone data or WiFi, whatever, do you think that maybe in Africa you guys might be the first to institute that? On the basis of, for instance, internet, you just pay as you go, and so if you need ten megabits megabytes of data for one month or whatever, you don't necessarily need to pay for that ten megabytes right away, you just use it, and then you're constantly streaming stats as you need it to them. Does that make sense? That was a long question, sorry. Yes, it does make sense. In simple response, which is in support of what you've said. In support of what you said. It means you can now monetize second, you can ordinarily monetize airtime. But how do you do that? Clearly on YouTube, it's not very transparent. How do they do their calculations? But now you know what, you want to pay ahead, because you can tell and say with five satoshis, I can watch as much as 20 seconds. So if the content is not interesting, I can quickly withdraw it's. Fantastic. And I somewhat agree again, because if you look at it, you would realize that you need to actually pay for the content you consume because somebody put together that creativity, they put part into it, they maybe wrote it down, they got props for it. Props can be expensive, but then you just see it on the platter and you don't pay for it. You haven't encouraged that person. In many case, people still plagiarize content of people that they didn't pay. Yes, it's all over the world. Somebody will create a content and because they don't have a big audience, a bigger influencer, so to say, would come across that content and blow it up in their own way. And that other person would have been plagiarized and may never, ever, ever get that support or that voice that will redirect the ownership of that content to that person. So if you will consume anybody's content at all there must be that upfront agreement. That's how I'm saying it. From a business case angle, there must be that upfront agreement whereby you don't have to read the terms and conditions. Maybe something you already signed up to get it into the platform or something you can just click over there and you pay for SATS just to preview. You can preview 5 seconds that we have right now on YouTube and you practically won't even feel it that you're paying for it. You can just pay, say, like we're saying military, but you know, when the millisecond is too much, you start to accumulate. Then you will realize that you're paying money. But I think it can be very interesting. And that is possible. Enlightenment. Both twelve. Starlink it doesn't have to be that major. I think somebody else can integrate both twelve and they can catch on for a particular region. Yeah, it really can't. Just imagine just imagine church and a church house may be redeemed Christian Church of God decided to check them out the Redeemed Christian Church of God is a big Christian community in Nigeria we have millions of followers and not online followers. I mean real life. If the church wants to raise a billion dollars a day just by taking offering all around a few branches. Thousands of branches. And they are well organized just imagine a QR code. That you don't have to replace. So all the goodies of both eleven. All the goodies. Everything that cure code can do. And now you can reuse it. That's renewable energy at its finest. At its finest. You don't have to expend any more energy. You just have it one time and inbox you can always get paid. So nice, so nice. Once it catches on is going to be fine for any other technology because you don't have to just imagine the integration of Mastercard, Visa card I think this is how Block Street is thinking. If they're not thinking like that, then they might be sleeping on a bicycle. But I believe they have fantastic people over there. They have fantastic people over there. Because this is the game over for mastercard and visa and quickly. This is how they would destroy their own future. But it will help them make some kick out of it. They will integrate first of all that's the bait bitcoin game theory if you will run to it mastercard and Visa will integrate quickly with both twelve. Maybe they have done with both eleven they already can see. So I think like what we said about portnaut earlier, the VIPs for Bitcoin chain, I think both such is represented in enlightenment. Maybe ports, I can tell us what's better, but I think this is the final game changer. And once Mastercard, Visa, card, American Express, Discovery, Union, Pay from China, all these guys finish their integration, the adoption will spread so much and people will see that, okay, your charges are too high. I think I want to go to the service that the charges are no longer high. And in a short period of time, new companies will step up to Mastercard and have 50 million users, 170,000,000 users, just like that. Because you can minimally charge people with just one QR code. You can go everywhere. I can just have my QR code with you for life. If you want to pay me, keep paying me forever and ever for whatsoever service. It's awesome. It's fantastic. I love it. And I agree, any organization, whether it is styling and both twelve block stream, it could be any small organization. It's a fair play. It's a fair play. Africa is a battleground overall for adoption. So let's see how we play that. We are right here. We are already taking our own market share. They will meet us here. ",timestamp:"01:31:12-01:42:05",topics:["Starlink","BOLT 12"],type:"twitter_space",weight:4.388186931610107},{boost:0,date:1663791655,description:"Nunchuk implements Bip21 ",episode_title:"BR006 - BestBuy stocks HW, Podcasting 2.0, COLDCARD, ETH Merge, ATEC608A, Mullvad VPN hardware & MORE ft. Odell, Bitsten & Pierre Rochard",guests:[{name:"Pierre Rochard",profile_picture:"https://pbs.twimg.com/profile_images/1567258180861792256/EEEBkvQR_400x400.jpg",ref_id:"426b30ba-7c24-4558-b926-ec307756a876",twitter_handle:"BitcoinPierre"},{name:"Matt Odell",profile_picture:"https://pbs.twimg.com/profile_images/1421584695746338819/Z_7ZfAeP_400x400.jpg",ref_id:"4f2825ff-3b88-4595-84d4-36e81544b79a",twitter_handle:"ODELL"},{name:"Micheal Goldstein",profile_picture:"https://pbs.twimg.com/profile_images/1362578436665995266/yssI-4C__400x400.jpg",ref_id:"1d5697ef-ac55-4685-9ee1-80d8d7c6c501",twitter_handle:"bitstein"}],hosts:[{name:"NVK",profile_picture:"https://pbs.twimg.com/profile_images/608402052247658497/ENDv0BNd_400x400.png",ref_id:"d754e29b-2d3e-4280-8d72-f41d2a465a78",twitter_handle:"Coinkite"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/cd6b8d64-bd52-4f1e-86b3-ca8ba2eb169f.jpg",keyword:!0,link:"https://anchor.fm/s/9500fad8/podcast/play/57914686/https%253A%252F%252Fd3ctxlq1ktw2nl.cloudfront.net%252Fstaging%252F2022-8-22%252F6271b859-79c4-08f7-d185-5b9264f98cfe.mp3",node_type:"clip",pub_key:"",ref_id:"67e86e10-e641-4eb7-a81f-0b7b2d204f4b",show_title:"Bitcoin.Review",text:"let me just find here for Nonchuck, I have a small update here, but that's not a release. So they implemented BIP 21. Let me see if I can find their releases. I can't remember where they are. Oh, anyway, so they implemented BIP 31 21, I think. There is no recent software release yet, so wait for the next show to hear more about Nunchuck. ",timestamp:"00:39:24-00:39:57",topics:["Nunchuk","Bip21","nonchuck"],type:"podcast",weight:4.412737994407362},{boost:0,date:1652745600,description:"Peter Lynch advices on value investment",episode_title:"Classic 14: One Up on Wall Street",guests:[],hosts:[],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/4bb9069b-a373-4b1c-9cda-024b2bf4dc84.jpg",keyword:!0,link:"https://chrt.fm/track/E9BCD5/pdst.fm/e/mgln.ai/track/rss.art19.com/episodes/aa2cdb4f-7255-40fa-9c59-b21965561b76.mp3?rss_browser=BAhJIglSdWJ5BjoGRVQ%253D--b5256dfb3e291f0e61e613b6a95f6f144da168ba",node_type:"clip",pub_key:"",ref_id:"a2b5f8c4-37aa-4931-951e-87416315eeab",show_title:"We Study Billionaires - The Investor’s Podcast Network",text:"The first section is preparing to invest. So Steve is going to highlight a couple of things here with this. So one of the first things that Peter Lynch talks about in this section is that professional needs to follow rules and amateur doesn't. And this is actually a big advantage for amateurs. So let's talk about some of the constraints that professionals have. They can't necessarily buy what they like. And the thing is that most institutional investors, they buy big brand names. They're doing in partly because they have so much money that they need to employ. They can only buy Kali SMP 500. That's one reason. But also because being in asset management is also about not looking bad. And it's really easy to look bad if you're buying, for instance, small cap stocks. And he's actually talking about this saying apparently that was going on in the 90s on Wall Street saying you can never get fired buying IBM. And I just thought that was a really fun quote. I mean, this is true though. This is something that you see on the professional side, that so many of these guys just take this safe path that if they're wrong, but all their buddies are wrong as well, then it doesn't look nearly as bad. But if you go out and you do something that's just really off the beaten path and it fails, I mean, you're going to get slaughtered in this business. So that's a really interesting highlight. One thing that he says to cope with that as an amateur investor is to buy small cap stocks. And I think it's really interesting approach that he's having. I think it's both correct and also think it's wrong. So I think it's correct in the sense that you can definitely find many small cap stocks that might be interesting. They are not really analyzed by analysts, so you can find a lot of great value. But another thing is that we just talked to you too about before, that the way that this book is created is created as a beginner's book, like how do you find your first stock? And I would say that the worst thing you can probably do, trying to pick the first stock is probably to find a small cap business. So I can't feel that counterintuitive well. So expound on that stick. Tell us why you think that that's bad. Well, there are actually multiple reasons. One reason is that small cap stocks, there are less information out there. Another thing is that smaller companies tend to be more volatile. And if you haven't tried to invest before, you don't necessarily know what happens when your stock lose. Just say 5% and you definitely don't know what you're going to do if that stock drops. Call it 50%. And one more thing, which is really investor bias, is that people usually invest too much in a single stock the first time that they're investing. I can definitely testify to that. I think it would probably not be uncommon for someone to invest as much as 20% in just one stock. And that might be okay if you Warren Buffett. But if you're a new investor, this is the first stock you found this great small cap company because you read this book, invested 20% of that. I think it can be really dangerous for you to do so. Yeah, I want to add a comment to this as well. As far as I think that something that I think a lot of people need to think about is when you get into some of these smaller companies, they don't nearly have as much of a competitive advantage and enduring competitive advantage as some of the mid or large cap companies. That can be eroded rapidly, especially if you're in a company that's a tech company that's moving pretty fast paced, somebody could come along and just quickly erode whatever competitive advantage that the company has. And that's something that I think a lot of new investors aren't thinking about and don't necessarily understand the ramifications of how badly that could destroy the price that you paid in a really fast and rapid way. And another thing, and clearly this might also be case for bigger companies, but smaller companies typically don't have the same credit ratings, which means that they are more vulnerable, for instance, to interest rate risk. So there's a lot of things that you might not be able to see when you just read through the financial statements. But as you get more experience and you actually get to work with a lot of stocks, a lot of these things would appear more logic to you. So definitely not start up with small cap companies. This is how I'd like to summarize the small cap part, is, yes, there's more opportunity in small cap because you don't have the big players kind of necessarily operating down in them because they've got to move much larger sums of money. So there are potential opportunities there in the value, but it's kind of harder to play in that space if you don't know what in the world you're doing. So that's how I kind of balance the argument, is, yeah, you could have some upside there, but you really got to know what you're doing. Let's take a quick break and hear from today's sponsors. All those points and miles can feel pretty pointless if they expire or go unused every year. It's time to reboot your credit card with Apple Card. Apple Card gives you unlimited cashback every day on every purchase. It's real cash you can spend right away, however you want. No need to wait and wait to use. Apply now in the Wallet app on iPhone and start using it right away, subject to credit approval. Daily cash is available via an Apple Cash card or as a statement credit. See Apple Card customer agreement for terms and conditions. Apple Cash card is issued by Green Bank member FDIC. As inflation surpasses highs not seen in 40 years, the dollar's value decreases with every passing day. You're paying more at the pump, the grocery store, cars, and housing. Face it, your paper money is worth less. That's why I'm excited to tell you about my partnership with Boolean Max. Bullying Max will ship gold and silver directly to your door for you to hold at your home and your own safe. Buy direct from Bullying MAX.com without talking to a salesperson and your shipment insured precious metals order is shipped directly to your home. It's fast. It's easy. To help you get started, I worked out a special offer with them just for you. Get bullying max's Gold Investor kit Just go to bullying Maxcom. WSB. This kit includes 3oz of the world's most desirable gold coins, including the Gold, American Eagle, and Canadian Maple Leaf. This offer is limited to only one per household, so get yours now. Go to Bullyingmax.com wsbtoday. Podcasts can sometimes seem like it's just two people getting together and talking over a cup of coffee, but I can assure you there is a lot happening behind the scenes. To keep this show running smoothly, our head of operations imported all of our Disjointed work from different sheets and docks into Monday.com and provided our team total visibility. Monday.com is an intuitive platform that enables us to manage everything from advertising budgets to podcast, scheduling, and inventory, all in one place. To become a billionaire, you have to incorporate systems. That's why we use Mondaycom. It's the best place to make a customized system that works for you. Teams of any size in any industry can use Monday.com to build, run, and scale all of their workflows. With Monday.com, there's nothing your team can't do. Sign up for your free two week trial at monday. Compodcast. That's monday. Compodcast. All right, back to the show. It also seems like whenever you ring through this, that it seems like since the institutional investors can only invest in bigger companies, they seem to be more efficient. But that's actually not true either, because the interesting thing is that the big institutional funds can actually just pick and choose among the SP 500. They're actually restricted in a lot of ways. So some of them might be restricted in terms of waiting, in terms of the market capitalization. So, in other words, even though that some of the smaller, bigger companies might seem appealing, they might not be able to invest more in that, and nothing is even if they have the freedom to do so, they might not be allowed to, say, have more than 1% or 2% in any of the SP five or 100 stock. So even though it might seem like, oh, we're heavily tilted into a small SP 500, stock that's only way called it zero 5%. They're still constrained in many ways. So basically my point is that SMP 500 is not, as it might appear, a more efficient index just because they're big and just because everyone has access to the information. Everyone, even the big players, and especially the big players, are constrained a lot. So there's a lot of efficiency in that index as well. I know that clearly couldn't include everything in the first few chapters, but I think that's something that's extremely important for anyone starting to invest in both indexes and individual stock picks. So one final thing that I want to add to this section that I really like about Peter Lynch's writing is he says that stock picking is both an art and a science. And we've mentioned this on the show before, but I really like how he spells this out. He says that too much of either is a dangerous thing. A person infatuated with measurement who has his head stuck in the sands of the balance sheet is not likely to succeed. And if you could tell the future from a balance sheet, then the mathematicians and accountants would be the richest people in the world by now. And what he's really getting out here and this is what I like about his writing style and the book, the way he writes it. He talks about this qualitative feel of going out and walking through, testing out these different companies that he had personal experiences with that kind of gave him a tip off. But then he does get into the math and he talks about different multiples that he finds are appropriate to pay and at what times in cyclical stocks versus financial stocks or whatever. He gets into that and he talks about being originally tipped off through a qualitative means. And then he backed it up with quantitative research. All right, so now we're into the meat of the book. We're going to go into the second part, and this is called Picking Winners, which I'm sure everyone wants to hear about. So let's talk about this section. I thoroughly enjoyed this section and for me, this was the most interesting section also because he introduced the concept of ten bagger. And for anyone that's not familiar with the term ten bagger, that means that you will invest in a stock that you'll get ten X on, basically. And he guides people in terms of how do you find these companies, which is a very interesting discussion. One of the things that I would like to highlight here and also goes hand in hand with some of the things that Preston talked about the introduction is that he's basically saying here, literally, that the best place to look is close to home. And his thesis here is that where you are an expert, you can probably make the best qualities analysis. And I completely agree with that. I just think that it's very important that you don't confuse familiarity with expertise. And I just want to come up with an example here. If people are thinking about who is the best person to value my home, who is the best person to do that? I think a lot of them would say that's probably myself. Now, there have been a lot of studies about this, and it actually turns out that the worst person you can think of to value your own home, that yourself, because you have so much bias every time you look at your own home, that is very difficult for you to do. So and I think this really underlines the difference between expertise, which is actually what Peter Lynch is talking about, and then familiarity. He's basically saying here, if you're familiar with a product that you really like, then that is your cue to start your analysis. It's not your cue to actually invest in that company. So I think that's a good point. And in continuation of this, he comes up with this example. He's saying that he realized the huge success of Pampers, and he was saying that, okay, so I saw everyone buying Pembers. It was a great product. It has a wide mode. Should you buy that stock? Well, actually, Hampers was not really a stock because it was owned by Procter and Gamble. And if you look at even though it was a huge success, it was still less than 1% of the revenue of that company. So you probably shouldn't go in and buy that, at least not for that argument. It's the same thing you see here with Nintendo right now and with all. Those the Pokemon Go. Pokemon Go, yes. Thank you, Preston. You clearly have young kids. No, I saw you look up, and I was like, he can't remember the name of it exactly. It's the same thing because Nintendo had, like, soaring stock price whenever Pokemon Ghost came out, and they were, like, literally making no money of that product that time, which was a lot of fun. So I just think that's another example of if you have a really good story, it's not the same as you actually have a huge potential for monetizing it. So I guess my thing I want to ask you, how many times have you seen a person that you just get in a random conversation and the person says, oh, my, I got to go and buy, like, your example, Nintendo, this Pokemon Go thing, everybody in the world is playing it. And that was literally their start and the end of their analysis for buying a company, and that was it. There was nothing else discussed. Not only did they not look at the earnings and all the other pieces that would drive a potential price that you would pay. But they're not talking about that second point either of like. Okay. So that's one product in the whole product mix of the company that might make up like your diaper example. Less than 1% of the total revenues of the company. And the person literally just purchased the stock around that one idea that had less than 1% of the overall revenue. I guess for me, I've talked to enough people through the years to learn that most people are not big picture thinkers. And I think that when you see a guy like Peter Lynch, these guys can start with this really big idea, like, hey, this might be a great company. Then when they go and they assess the company, they start with the big picture. Okay, so how much money is this company bringing in a year? Okay, they're making $100 million. Okay, they're making $100 million. The product that I was first introduced to that kind of gave me the idea of looking at this company only makes up 10% of the revenue. So that's $10 million. Of the 100 million that they're bringing in, the margin on that thing that I'm looking at is 3%. So how much am I willing to pay for? They're picking it apart from big picture to small picture, and they're then saying, well, how much is that worth to me to pay to own that in a per share basis? And then they're making a very intelligent and thoughtful decision to own it or not own it. And I think another argument consideration of this person is that Lincoln in this section go through the traits of a really good stock. And like Warren Buffett, I think we probably mentioned this a few times on the podcast he's saying that the simpler, the better. And I don't want to brand myself as a big Nintendo Pokemon fan. It's not what I'm saying, but I'm just thinking something like that computer game, I guess you would need to reinvent yourself in a year, too. I don't know how long the computer gaming cycle is, but it's something to consider compared to, say, the Dunkin Donuts example. He came up with Dunkin Donuts. It's in a convenient location, at least according to Pilot Lynch. They make great coffee. They don't need to reinvent how to make a good cup of coffee. They don't need to reinvent a good donut. It's just not how that works. And it's something that you would do every day. It's something that drinking coffee has done for so many years and continues to for so many years. I'm not saying Nintendo is a bad company. I'm just saying that they probably need to come up with a new computer game, continue the success, basically. And this actually also takes me to the list of some of the traits of the perfect stock, which I found really funny and interesting. The first one was actually a boring name. I found that discussion pretty funny. I think there's actually also been studies about that, that if you have a really boring name because people don't want to tell that they own boring stocks, they usually do good. The boring stocks, spin offs, that's typically also something that's doing well. So on this idea, I want to read something. The greatest companies in lousy industry share certain characteristics. They are lowcost operators and penny pinchers and executive suites. They avoid going into debt. They reject the corporate cash system. Their workers are well paid and have a stake in the company's future. They grow fast and faster than many companies in the fashionable fast growth industries. Pompous boardrooms overblown executive salaries, demoralized rank and file, executive indebtedness and mediocre performance go hand in hand. This also works in reversed modest boardrooms. Reasonable executive salaries and a motivated rank and file. And small debts equals superior performance most of the time. And he really says a lot of the ideas that we see the Warren Buffets of the world and other really successful business owners and investors say is almost a common thread through all these books. So I wanted to throw that one in there because it totally relates to what sticks getting out here. Another interesting trade that Pelinda is talking about is he's looking at no growth industries. And I'll simply love this concept because every time you hear like a stock pitch or read an analysis, you'll be like, oh, this nanotechnology is growing by 50% or 3D printers are growing by 200% a year or whatever it is. And he's saying that that is not where he's looking. He is looking at industries where there are no disruptors because when there is no disruptors, there are very little competition and you have fewer expenses, basically, and you have higher margins. I just want to come up with one example. This was actually a type of investment I was looking into months ago that didn't pan out for one reason or the other, but the concept is still the same. I was looking at a landfill and you might be thinking, a landfill? That sounds like the most boring thing they ever heard about. But the thesis about this landfill out in the rural area in North America was that it has a lot of pricing power, it has a lot of monopoly power because who is going to build a landfill right next to a landfill? It really doesn't make any sense. Another thing is that if you have the chance to drive called 50 miles, 100 miles to the landfill is actually even though you can find a cheaper landfill called 500 miles away, it's still going to be very expensive for you because you have to pay for the gas to get there. So you have a lot of pricing power in that area because you have monopoly power. And believe me, there are no disruptors in this industry. If you have a landfill in the middle of a rural area, it's really, really hard to compete with that company. So I'm not saying that everyone should go out and buy a landfill. That's definitely what I'm saying. But I'm. Saying that's the way that Peter Lynch is thinking about it. I just wanted to bring up that example so perhaps everyone could get a better grasp of what he might have meant by that. So if you feel like you're ready to fall asleep because maybe you're talking about landfills or whatever with a boring. Name, preston, could you come up with an interesting name for the landfill? No. Right. It's bad and bad. If you're ready to fall asleep talking about the pick, you're probably starting in the right location. So now we talked about some trades of the perfect stocks and he also has some interesting trades in terms of the stocks to avoid. So one thing is that you should always dig into financial statements and see how they make the revenue and how that's divided into the different customers. And he's saying that he has a strict color of point with 25%. I mean, basically he doesn't want one customer to have more than 10%, but if it's more than 25%, it's usually a big nono. And I think you see that with a lot of companies, especially those companies that are heavily tied into the public sector. And you might think, well, it's public sector, it's stable, but guess what? Whenever there are new legislation and the public sector might be 80% of your revenue, like, we've seen multiple examples of this, you're just heading for big trouble. And I think that was a really good example that he came up with. And basically, I think that it's very clear whenever you're reading the book that Peter Lynch's foundation is really into value investing. Even though he talks a lot about ten baggers and he talks about grow stocks, he is really like it's a very core value investor. And he also has a really interesting section about hot stocks and new issues and why you should avoid that. So I think when you hear the term ten backer, it's not necessarily, how do I find the next silicon silicon Valley style up? That's definitely not what he's saying. He's actually saying you can get ten X if you buy undervalued great companies. Let's take a quick break and hear from today's sponsors. It's 04:30 P.m. In New York City and Wall Street's closing. Bell Rings you know what that means? Your portfolio has probably sunk a little bit deeper into the red, which means a few more sleepless nights and gray hairs. The data shows that this has been the worst start in 50 years. And Goldman Sachs warns that the best case is a flat lining portfolio. If you line up today's SMP chart with 2008, it's a mirror image. Except now we're dealing with 40 year high inflation and chaotic supply chains. So how can investors combat this mess? Well, I'm doing it with a safe haven asset, one that was available only to the billionaire class back in 2008. Contemporary art in 2008, the day after Lehman Brothers collapsed, the art market saw a record breaking auction to the tune of $111,000,000, showing that art still sells. And it's not just 2008. Contemporary art has outpaced the SP by more than double over the last 25 years. That's why I've been investing with my friends at Masterworks for the last year. They're offering fractionalized investments in the top of the contemporary art world, delivering an astounding 29% average net returns from the sale of just six paintings. But here's where it gets really good. When you sign up to masterworks. Comillionaires, you'll be entered to win a Rolex wristwatch. That's right, a Rolex could be yours for free just by signing up at Masterworks Combillionaires. See importantregulation a disclosures at masterworks. COMCD that's Masterworks combillionaires to enter to win a Rolex. Hey. So if you're like me protecting your identity and your information, these things are not top of mind very often. So you might be interested in something that's sort of an all in one encompassing platform, and that is a Vast. And they're new. A Vast One feature has everything you need antivirus data breach, monitoring, firewall protection, ransomware protection, PC speed up, smart scan, you name it. It's all there on one thing. So you don't have to have multiple platforms running on your computer at all times. And for someone like me, that is exactly what I want. Good news is that there's a free option to try out and get started, but there's also a premium version that has more advanced protection and allows you to protect multiple devices. My favorite part about a Vast One is the ransomware protection, which secures your personal photos, documents, and other files from being modified, deleted, or encrypted by ransomware attacks. So now you can confidently take control of your online world with A Vast One. It helps you stay safe from viruses, phishing attacks, ransomware hacking attempts, and other cybercrimes. Learn more about Avast. One at a Vastcom. All those points and miles can feel pretty pointless if they expire or go unused every year. It's time to reboot your credit card with Apple Card. Apple Card gives you unlimited cash back every day on every purchase. It's real cash you can spend right away, however you want. No need to wait and wait to use Apply Now in the Wallet app on iPhone and start using it right away. Subject to credit approval, daily cash is available via Apple Cash Card or as a statement credit. See Apple Card customer agreement for terms and conditions. Apple Cash card is issued by Green Bank member FDIC. All right, back to the show. So I want to kind of piggyback on that comment, because the thing that I find interesting about Peter Lynch is he will buy a growth company, or what we would refer to as a growth company, but he will buy it at the right price. That's an appropriate premium to pay for the growth that's occurring. So I want to read a short section here. Any growth stock that sells for 40 times its earnings for the upcoming year is dangerously high priced and in most cases, extravagant. As a rule of thumb, a stock should sell at or below its growth rate. That is, the rate at which it increases its earnings every year. Even the fastest growing companies can rarely achieve more than a 25% growth rate, and a 40% growth rate is a rarity. At the time I was researching this company, the PE ratio of the entire S and P 500 was 23 and Coca Cola had a PE of 30. So you can obviously tell this was written a long time ago. If it came down to a choice between owning Coca Cola, a 15% grower selling at 30 times earnings, and the Body Shop, a 30% grower selling at 40 times earning, I would actually prefer the ladder. And the reason that he would prefer the latter is because there's less of a margin between the growth rate of The Body Shop and the premium that was being paid at 40 times earnings. So I really like this example because he's getting into he's talking about growth picks for people out there that are growth investors digging. I really aren't. But for people that are and are interested in some of these ideas, I think the key point here is if you are going to pay for a premium, that thing better be growing like crazy in order to actually justify that expensive price that you're paying. And I think that's a really great highlight that he puts in his book. All right, so the final section we're going to cover is called The Long Term View. And this is some other great conversations for anybody that's just trying to get a good foundation for their investing approach. In this section there's a really fun chapter that's called The Twelve Silliest and Most Dangerous Things People Say about stock Prices. So we're just going to throw a couple of these out here and maybe add some commentary to some of his comments. So one that I really liked is if it's gone down this much already, it can't go much lower. And boy, I'll tell you, I've hung on to some pics that have taught me that lesson a lot of times over. So if you ever hear that phrase or you catch yourself saying that phrase, try to remember this from Peter Lynch's book, because it's a doozy. And whether it's higher or lower, it's all about understanding why is it going high, why is it going long, and what is the price compared to the value? And I think another argument here is that if you had invested in Peter Lenses fund with the day he took over, as we talked about in the very beginning of this episode, your $10,000 would have turned into $280,000. So a way to be thinking about this is that, well, I should probably hold on to this mutual fund for 13 years because my initial investment was $10,000. Well, you can lose it like that, but remember, you also took a conscious decision to stay in that mutual fund whenever that 10,000 turned into 50,000 or whenever it turned into 100,000 and so on. And the thing is a really interesting perception to have, because it actually goes the same way as if you're looking at a stock that can't fall any further and you're like, well, this stock used to be $10, but now it's $1. I'm only risking one dollars per stock. But, I mean, if you're buying for $10,000 and you're buying 10,000 stocks, it's the same thing. And I know from myself that it's very easy to get anchored on a stock price and not so much on your position for how many times I've. Heard people say, well, you know, it's a really cheap stock. I can buy more shares because it's a cheap stock. I have heard that so many times from people to the point where I don't even want to say anything because I feel like I'm going to hurt feelings or something like that with some people. I think as a person becomes more educated in investing and they hear that, it really tells you how little the person really understands what they're doing. Because whether a stock is $0.50 or, like Berkshire Hathaway, $200,000 a share, there is no difference in the fundamental assets that are beneath or that represent that share of ownership in the equity. So I know we're poking a little bit of fun, but it is serious. I would argue that a majority of people actually believe that and don't understand how wrong that statement is. And that's one of the points that Peter Lynch has here. The quote he has is, it's only $3 a share. What can I lose? Is the way he has it phrased. Well, I like this one because you hear this one a lot, too. When it rebounds to $10, I'll sell. And the person has already convinced himself from a psychological standpoint that they're selling when it gets to ten. There's really no reason why they're selling when it gets to ten other than it got to ten, which was a nice round number. Again, they're not digging into the fundamentals behind what represents $10 a share. Why would you sell when the market cap hits that? Is there something that hit a PE of 40 times earnings? Well, if that's your reasoning, then maybe that makes some sense. But if there's no analysis behind why you came up with that figure, that's kind of tied to a return, a percent of a return compared to where the market is at. I would argue you're making some really bad decisions on the way that you're buying and selling. Yeah, it really comes back to the financial behavior that you have in terms of anchoring. At least that's what they call it, anchoring. So if you bought a stock call it $10. That is the average price, or that is like the anchor price you have in your head. And you don't necessarily think about this person said, Why does it really happen? Why is it not $10 anymore? So that's why it's so easy to say, okay, when it rebounds, to call it $10 or whatever price I bought it for. If that's the case, then I'll sell. And then we just tend to forget the opportunity cost that I want with this, that you could probably invest in something that you might get a better return of. But it's like we put everything into small mental boxes, and it's really hard to say stock ABC was a really bad investment because I lost money. It's better to say I broke even, even though you haven't broke even, because it took you ten years to break even or whatever how long it took. So I want to put this in context. So let's say that in your local town, there's a hardware store that you want to buy, and let's say you have enough money to just buy it outright, and the hardware store makes $100,000 a year after all the employees are paid. That's how much money you would be able to keep as the owner. So a reasonable price to maybe buy would be a million dollars, because you get a 10% return on your money. So when you say, that a stock, I'm going to sell it when it gets to $10. That'd be like buying this million dollar hardware store. And then some random person comes into your store and says, I'd like to buy your store for $1.1 million. And you had told yourself in advance, if somebody comes along and offers me $1.1 million, I'm selling it. There's no analysis behind why you'd be willing to sell at 1.1 other than you told yourself you would sell at 1.1. Maybe your earnings are in $100,000 anymore. Maybe your earnings are $200,000, which means you might be able to sell it for $2 million. That's how you need to think when you're looking at one share of stock, is what's the earnings what did the earnings just go up to as the price went up? Maybe I can even make more money because the market is undervaluing it at $10. That's how a person needs to think. They always need to look at the profit versus the price versus the risk that's associated with it and treat it as if it's an entire business. One share is the same thing as an entire business. And that is so fundamental. To be successful in the markets is to always look at things that way. All right, so that concludes our comments for the book. We really like this book, and there's so much more that we could cover. Peter lynch is a fantastic writer. He keeps a qualitative and quantitative at the same time, and it's entertaining, which is a rarity when you get into investing books. So if you're a new investor and you're really trying to understand things and you're just starting out, I would tell you, go out and get one of his books and read it. You'll really enjoy it. There's Beating the street and then there's also one up on Wall Street. And both are really great books. So at this point in the show, we're going to take a question from the audience, and this question comes from Jordan Lee Smith. Hi there, Preston and Stick. Jordan Lee speaking from Birmingham, United Kingdom. Warren Buffett has said many times that when he was in his early days as an investor, he would bind to companies and stocks that were fair companies at wonderful prices, or cigar books, as he calls them. However, today, he now establishes that this approach was bad and instead invest in wonderful companies at fair prices. My question is, for an investor starting today, would it still be wise to follow Buffett's old methods of buying into ",timestamp:"00:08:15-00:41:14",topics:["Peter Lynch","investment","small-cap stocks"],type:"podcast",weight:4.3581032986492785},{boost:0,date:1653624e3,description:"[[Bitcoiners]] Defends Against Critiques ",episode_title:"WHY ARE WE BULLISH SeedSigner MMA Fighter Kenny Florian Bitrefill CEO Sergej Kotliar ep259",guests:[{name:"Bitrefill CEO Sergej Kotliar",profile_picture:"",ref_id:"62f3aab5-0adf-4268-85f4-58cd53d85e6b",twitter_handle:""},{name:"MMA Fighter Kenny Florian",profile_picture:"",ref_id:"f272bf4f-6d43-461e-b053-7f680568db5d",twitter_handle:""},{name:"SeedSigner",profile_picture:"https://pbs.twimg.com/profile_images/1571221494927134721/FieppCOA_400x400.jpg",ref_id:"31ac465a-d2db-4255-b52d-50a10937f80d",twitter_handle:"Seedsigner"}],hosts:[],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/87cd8227-9464-45ed-8512-4e545d3812c2.jpg",keyword:!0,link:"https://anchor.fm/s/11e95d20/podcast/play/52675132/https%3A%2F%2Fd3ctxlq1ktw2nl.cloudfront.net%2Fstaging%2F2022-4-27%2F268355760-44100-2-56b5b1e41dcf9.mp3",node_type:"clip",pub_key:"",ref_id:"4167618b-6ac6-403f-adcc-09716938e08e",show_title:"BTC Sessions",text:"that are to some small extent. Right. They can raise it can be used for bad things. It can be used for crime, or it's a glorified Wall Street pet type investment that just gets people rich and so on. Or it kills the planets with the energy consumption and so on. I very often feel like Bitcoin is very often end up on the defensive. Like, oh, you know, it's not so bad with the planet. Some of it's renewable. Right. Analysis said that it was 99% last time. That's great. But I really feel like there are so many things that this thing of ours achieves. The same way that if you accidentally offend someone, if you start apologizing, it's just going to keep coming at you. Right. It kind of got me thinking a lot that we should really push Bitcoin not in a defensive. No, it's not so bad, but push it in an offensive and aggressive way. Look, here's the things that it gets done, and not just from the pushing narrative. I actually feel like we're the number seven largest currency in the world. We're not even the size of a small country. We're the size of a medium country. All right. Also Freedom Forum where there's people that are talking about things that are like very objectively good. Right. Undisputably. There's like nobody, no sensible person that's going to disagree with any of it. Hey, people in this and that country want democracy. Yes. I really think this is a big opportunity if we all sort of make an effort for it to really push, to make Bitcoin be a force, not just a tool. Right. It is already a tool. And that's great, but an actual force of making the changes in the outside world just by the wealth and power and utility that we've amassed in this community. If we figure out how to channel this really powerfully, I think that is the way forward. Not apologizing for things that are trade offs and explaining cost benefit and whatever. But look, it has certain costs. Here's what we achieved. Here's why it's worth it. The one who disagrees. They can do the weighing of the cost of benefits. I don't know. I have a lot of half baked ideas in my head, but I figured out this one here as well. I mean, currently the US of A is, I think, the most internationally generous country. But maybe it should be Bitcoin. I like the road you're going down here with the topic. You're right. ",timestamp:"00:49:52-00:53:32",topics:["bitcoiners"],type:"podcast",weight:4.353698041567212},{boost:0,date:1616679600,description:"Saifedean Ammous discusses gold stability and bitcoin's future",episode_title:"Debating Professor Hanke on Bitcoin's value",guests:[{name:"Hong Fang",profile_picture:"https://pbs.twimg.com/profile_images/1554126711502999553/EkTARSpF_400x400.jpg",ref_id:"9adabc40-bbc7-44aa-8a11-c139f3697f80",twitter_handle:"hfangca"},{name:"Saifedean Ammous",profile_picture:"https://pbs.twimg.com/profile_images/1362635264158552067/CSsOKrBd_400x400.jpg",ref_id:"a61d4df9-1db4-4bdc-a7e9-a4c99268e59b",twitter_handle:"saifedean"},{name:"Professor Steve Hanke",profile_picture:"https://pbs.twimg.com/profile_images/915395033871867905/3zbE7bAT_400x400.jpg",ref_id:"4a754eea-7f67-46d0-b4d2-f0aa58aba36e",twitter_handle:"steve_hanke"}],hosts:[{name:"David Lin",profile_picture:"https://pbs.twimg.com/profile_images/1494034862688411662/PnegVyJF_400x400.jpg",ref_id:"4aa21d3b-afe2-434b-a77c-79dba268a23d",twitter_handle:"davidlin_TV"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/5cdd0aef-f1a7-4d3b-8336-7f81c2db4a40.jpg",keyword:!0,link:"https://www.buzzsprout.com/1849151/9671311-debating-professor-hanke-on-bitcoin-s-value.mp3",node_type:"clip",pub_key:"",ref_id:"5e1c63cb-adb2-4e52-a529-324dcb9d6632",show_title:"The Bitcoin Standard Podcast",text:"have one final topic that I like to address. I just need to make one small answer. Move on. Jastrum's book, the golden constant. Gold developed the most constant value over time, and did that for centuries as discussing that book. But you look at gold's supply, it also didn't have a currency board. It also didn't have a monetary policy where somebody was practicing monetary supply in order to stabilize the price of gold. In fact, what gave gold that stability was the fact that it had the lowest least elasticity of supply response to demand. Gold is the one good whose supply increases the least every year because it doesn't corrode. So gold that has been produced over thousands of years is accumulating. And so marginal production is always very tiny, because marginal new production is always tiny compared to the stockpile. That's what gave gold its stability, because its market is predominantly a monetary market and very little demand for industry and very little impact of mining. So bitcoin actually improves on that because it has a terminal growth rate of zero. So it should actually, in time, become better gold than gold in this regard. And I think volatility is going to be with us for a while because bitcoin is still very small, and it's going to grow. But I think before we get to the point where we can use bitcoin to buy our coffee, we need there's an enormous stage to cross first, which is people need to build cash balances in bitcoin so that they can trade other goods with bitcoin. But we're nowhere near that. The total amount of cash balances in bitcoin are less than 1% of total cash balances in the world. But as it grows, I think we're going to see more of that. So I think from now on to the point where you can buy your coffee with bitcoin, there is an enormous, enormous opportunity of essentially a new asset monetizing that could eat up bonds and could eat up all kinds of other stores of value that people are using. So you'll get your stability to buy coffee at a price of bitcoin, maybe $1 million or $5 million. So you're welcome to sit it out and wait out until then, or you can buy bitcoins. Now, speculating on the fact that this is going to happen, and if you are correct, it will be massively rewarding ",timestamp:"00:43:56-00:46:16",topics:["Gold stability","bitcoin stability"],type:"podcast",weight:4.35361862182618},{boost:0,date:1649206290,description:"How Bitcoin affects small business owners and migration?",episode_title:"E34: Cory Klippsten on Building Swan Bitcoin, Angel Investing, and the Lightning Network",guests:[],hosts:[],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/b6c52903-5124-43f4-8632-bc9aeb941f2e.jpg",keyword:!0,link:"https://anchor.fm/s/71a8cc78/podcast/play/50175964/https%253A%252F%252Fd3ctxlq1ktw2nl.cloudfront.net%252Fstaging%252F2022-3-6%252Fcbaa049f-6ea6-b67f-24ed-63b1a824b7b2.mp3",node_type:"clip",pub_key:"",ref_id:"1df5002c-3c8a-42db-960a-2a35a6596b63",show_title:"The Kevin Rooke Show",text:"Do you think now that we have what seems like more freedom to move around and I guess lower switching costs for workers. You can kind of like move between cities and states more freely as work kind of transition online. Do you think that is a catalyst that these governments can use to introduce new experiments and new business zones and new tax cuts and add in Bitcoin as a balance sheet to strengthen their balance sheet? Yeah. First of all, being able to have health care without an employer. Say what you like or don't like philosophically about single payer health care or what is it, the ACA that Obama administration pushed through. But that's been dramatically good for small businesses and small business owners and entrepreneurs. Being able to still have health care without having to be an employee. I think we're still seeing an unlock of productivity and creativity and entrepreneurship just because people can get insurance and you can have a wife with cancer and still be able to get insurance like that. I think say what you like about wanting health care to be a free market, but the good thing is that people can take on a lot more risk because they're not just hamstrung by employer provided health care. And then you've got this remote work thing where people don't need to meet in person anymore. People are so used to closing big deals and signing up for services online now without having to meet somebody in person. That means you really can just pick up and live in Coeur d'alene or Lake Country up in Minnesota or maybe you just love the Florida Keys and want to be in Margaritaville every night, but you can roll out your laptop during the day just enough to get some design work done. Like you can do that. It's just fascinating. It's a great time for that. I was just actually talking this morning. One of my wife's best friends out here is an actor and she has, thank God, switched over from retail as the way that she supports and kind of gets to auditions and does that whole thing to working and marketing from her laptop. She works for companies in San Diego and Orange County and she can do it on her own time. She can miss 6 hours from twelve to six to go to a couple of auditions and then work from 06:00 p.m. To midnight. And that's totally normal now. And she can get paid like a normal middle management, senior management type salary while still being flexible enough to continue pursuing her acting. And that's true of so many people that want to pursue coaching basketball. We've got somebody on our customer service team who's like a high school coach in a Midwestern state and he does customer service stuff in the morning and then after he gets his kids to bed, he does like a couple more hours of cleanup at night. But the whole middle of his day is doing his passion love it. Do you think that we're going to see we've already seen in the last couple of years a decent amount of migration within the US between different cities, also outside of the US. Internationally? Do you think we see more migration in the coming couple of years than the last two, or do you think we kind of like revert towards the mean and get back to a normal. Yeah, I think we're at mean reversion time, probably. Yeah. Interesting. Yeah. I mean, I think if you moved to Austin after 2019, you bought the top. It's not that much different. San Francisco. There's plenty of bombs in the traffic stocks. It is awesome that there's a high density of bitcoiners, though, so that is a huge bonus. And I got a lot of friends out there. But, yeah, I think, again, you just got to go, like, where you're comfortable. We've got people in Idaho and Montana, but we got people in Manhattan. And I live in the burbs of Los Angeles because I like the weather. It's the only warm, dry coastline in the history of the most powerful nation in history. Maybe it's worth the sunshine tax. I could go without some of the policies around here, but it's sunny right now. I like it. ",timestamp:"00:40:38-00:45:17",topics:["small business owners","migration","migration"],type:"podcast",weight:4.352794708248209},{boost:0,date:1586303100,description:"Guy's Take: Discussion on why smaller blocksizes force creative thinking around privacy and the need for Layer 2 solutions",episode_title:"Read_375 - A Match Made in the Whitepaper - Treatise on Bitcoin & Privacy, Part 1 [Giacomo Zucco]",guests:[],hosts:[{name:"Guy Swann",profile_picture:"https://pbs.twimg.com/profile_images/1401969630634196995/DqOuszMi_400x400.jpg",ref_id:"39c31930-d799-40a0-9a46-193117d03418",twitter_handle:"TheGuySwann"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/9e7e229f-2631-4542-b5d7-7fcd502798dc.jpg",keyword:!0,link:"https://traffic.megaphone.fm/CSN5990505715.mp3?updated=1627942852",node_type:"clip",pub_key:"034248fa888690a85021cf117c168a535c53b92e1fdf3e4f9cefddfe09118d8207",ref_id:"7ef1c3a7-3028-4a9d-a012-82a61645ecb4",show_title:"Bitcoin Audible",text:"point for this was that making the block size small actually forces us to aggregate as much information as possible to take data off of the chain, which is the current way to best de anonymize someone's history or someone's transactions and of course connect it to the rest of their transactions, the rest of their history. And that is one thing that I've talked about numerous times on this show, but that always keeps coming back, is that the layer two technologies may very well be just by the nature of how they scale, how they have to scale. They provide scalability by removing data from the time chain, by not having to put data on the chain. In doing so, you necessarily get privacy from the typical vulnerabilities of observing the time chain, of observing the bitcoin system, and it trades chain analysis, chain analysis with network analysis, which is much harder, much more obscure, much less the specifics are very very hard to pinpoint. And because Lightning network, just as the example of our layer two that's already working pretty amazingly is that everything is onion routed by default. So inherent to the system is a huge degree of privacy that's a benefit over the time chain, over the base layer. And I think that's going to be a massively, massively undervalued benefit to the lightning network that people are just not properly accounting for or realizing, I think. ",timestamp:"00:42:35-00:44:29",topics:["small block size","take data off chain","layer 2 scalability"],type:"podcast",weight:4.347929239273071},{boost:0,date:1653436800,description:"Michael Atwood on the future of payments in terms of bitcoin over the next year",episode_title:"Small Businesses Embracing Bitcoin w/ Michael from Oshi App - Voltage Twitter Spaces",guests:[{name:"Michael Atwood",profile_picture:"https://pbs.twimg.com/profile_images/1362207977470521345/Jy2_Ge60_400x400.jpg",ref_id:"16359ade-afb9-4a37-be0b-0844a6134327",twitter_handle:"Dooowta"}],hosts:[{name:"@voltage_cloud",profile_picture:"https://pbs.twimg.com/profile_images/1508657900486422529/Lfa70poj_400x400.png",ref_id:"3b622187-60ce-43c2-a21f-ae749c2d961a",twitter_handle:"voltage_cloud"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/2ec62250-4755-4616-8342-096a2cfab95f.jpg",keyword:!0,link:"https://www.youtube.com/watch?v=kMDSsyAEvd8",node_type:"clip",pub_key:"",ref_id:"3d451e38-8616-43bc-8269-c3b8ce7d9b15",show_title:"Voltage",text:"if there's any small business owners in the audience maybe that are not in the know on bitcoin, I'm sure most of you are throwing emoji up. I would love to see if there's anyone here kind of learning about bitcoin for the first time in some farms. We're going to be inviting some people up here at the end for some questions. So I'll leave that request pending here and we'll pull you up. But Michael, where do you see, I guess just moving forward, where do you see payments going in terms of bitcoin over the next year? There's obviously a lot of these altcoins scams and things happening. Like the tether is losing value apparently this week I haven't read too much into that. The Luna and Terra blow up, rehypothecation rates going down in D five. There just seems to be all these problems. Is that impacting and creating confusion for small business owners and these newly bitcoin adopters or what do you think on that? How is that impacting the market. In terms of the downturn in the market and that implosion of Terra and all that stuff? Most business owners have no clue that it's even going on. I haven't really noticed any change in that whatsoever, which is funny. It just goes to show, like they're busy running their business. They're not sitting here paying attention to all this stuff like we are because we're enamored by it and we're in the ecosystem. They're just trying to run their business. I don't know what the second part of the question was. Yeah, just in general, some of that has made like local news headlines in Denver and my wife's, mom and dad are asking and other people just kind of say, like, what is this? How does this affect me? But that's good. Yeah, I think small business owners are typically working more hours than just a w two worker. They have a lot more on their shoulders they're having to manage. So they're probably less tuned into some of that stuff. Yeah, for sure. It's really difficult, even though it takes just a few minutes to get businesses set up and ready to go, even, like to train our staff, it doesn't take long just for them to find some time to do it because it's not exactly on the top of their list of priorities. Right. And so tomorrow, or, sorry, Saturday in Rockdale, which is home to the biggest bitcoin mining farm in North America, to my knowledge, there's a guy named Brett, he owns Brett's Backyard Barbecue. So I'll be going there tomorrow to get him set up to accept bitcoin because on Saturday they're having like a big event there and everyone's going to be able to pay with bitcoin. And it's only going to take me a few minutes to get him set up. But he's a busy guy. He's one of one of the best barbecue joints in Texas. He's the soon to be mayor of Rocktail, Texas, and he's going to be the first legitimate bitcoin mayor. That's pretty cool. That's ",timestamp:"00:06:37-00:09:44",topics:["Bitcoin transactions"],type:"youtube",weight:4.330187141144266},{boost:0,date:1665118800,description:"What is the correct size of a State",episode_title:"Breaking Away: On Secession and Small States",guests:[],hosts:[],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/6ec51741-3d93-4116-a619-d62a7cee1feb.jpg",keyword:!0,link:"https://dts.podtrac.com/redirect.mp3/cdn.mises.org/102-radiorothbard-20221007.mp3",node_type:"clip",pub_key:"",ref_id:"be782fc1-f095-4012-8711-f27a9cbb4e8b",show_title:"Radio Rothbard",text:"you don't have to remind me afterwards that the correct size of state is zero and it's nothing that we're against it. I agree that's the end goal. But and moreover, these political entities, communities, policies, don't even have to be organized as states, right? Historically we have political communities that aren't states at all. But that's all topics that I've covered in other talks or will in the future. So for now, let's just stick to talking about states, the status quo situation where we're just trying to move away from. We're trying to take the next step and really just find ways to break down the power of the ruling state elites by removing some territory, some populations from their iron grip. And the reason we have to address the issue of the size of states is because many people do believe, in fact, that bigger is better. They like big states and want to keep them that way. They believe that larger states are essential for economic success, for peace, for trade. And then there's another group of people who think that size doesn't matter at all, that they think that every problem of conflict within a political jurisdiction can be dealt with by democracy. Just let people vote. And there is no need for people to have any sort of political independence or a policy of their own at all. They'll have elections and everything will just work itself out. People who believe that they're going to be difficult to convince on secession and of course, the states themselves, they're agents. They oppose secession because states want to be big. Being big and getting bigger is an important goal of every state. It's part of state building. They want to consolidate power and exercise, increase their taxable population. What we want is the opposite of that. We don't want state building, we want state unbuilding, we want state demolition. And so this is a process that we can, I think, use. And for many people in the public, the idea that bigger is good, or at least that size doesn't matter, does in fact, have its limits. For example, most people already have in their minds some upper limits as to the correct size of states. To see this, simply ask a person if he or she wants to live under a single global state. Most people not all, but most. I would suggest a sizable majority of people in the world would be opposed to this. Most people, just from casually observing the world, have a sense that putting global governing power in the hands of some distant elite from a different culture on a different continent, that speaks a different language, might not produce optimal results. On the instinctive level, then, many people recognize that something more local is necessary partly because of this instinct. Radical decentralization in the form of many diverse states historically has been the norm throughout human history. Even in the days of the Roman Empire, which viewed itself as having universal jurisdiction, the Romans never subjugated the Persians. The tribes of northern Europe, the kingdoms of sub Saharan Africa. They didn't even know about the Americas. So even in the age of huge empires the world was still decentralized. It's never been ruled from a single place. Yet ignoring all this, many people continue to insist that adding a new country or a large group of new small states to our already existing large number of countries would bring anarchy. Everyone who's read a serious book on international relations already knows that the world is already in a state of anarchy. Though it's already accepted fact that the international system is anarchic. There is no final arbiter of law or policy internationally. There's no global monopolist. And so creating anarchy is hardly a danger. It's already here. We already live in the system. The question is what are the size of the subunits in? It ideally down to super local level but it's obviously not at the global level right now. So how many independent policies should there be? How big should they be? That's probably the harder question that you can have to endure because a lot of people choose larger. But I'm going to suggest to you here that smaller is in fact better in most cases. After all, thanks to status quo bias, many people seem to believe that we've somehow magically arrived right now at exactly the correct number of states and they're all currently the right size. Also, the UN has explicitly said as much among the international lease it's basically been dogma since 45 that the world's existing borders as they have currently been drawn shall never be moved or changed. The doctrine of territorial integrity basically dictates this. And so the international community likes to preserve borders as they are and forever. There are exceptions but approved secession, as in the case of Kosovo's de facto secession, right? That sort of thing is only encouraged by the establishment when that sort of secession serves the interests of certain great powers and their allies. So for the most part it's very much frowned upon. So if we're in the thankless job of promoting secession, we have to make the case that smaller and more numerous states are in fact better for the world. From the perspective of enhancing freedom and free markets we can see three key ways that smaller and more numerous states are better and we can also look at some of the empirical evidence and the actual historical experience while we're at it. So number one the first reason that smaller states are beneficial is that they offer more opportunities for exit. This in turn makes states more inclined to respect property rights whether they ",timestamp:"00:03:16-00:09:38",topics:["State"],type:"podcast",weight:4.443824941783508},{boost:0,date:1675982745,description:"The 300 kb limit for Bitcoin blocks",episode_title:"CD89: Open Source Week Party Rip at Bitcoin Park with NVK, Vivek, Paul, Tony, and the Bens",guests:[{name:"NVK",profile_picture:"https://pbs.twimg.com/profile_images/608402052247658497/ENDv0BNd_400x400.png",ref_id:"d754e29b-2d3e-4280-8d72-f41d2a465a78",twitter_handle:"Coinkite"},{name:"Vivek",profile_picture:"https://pbs.twimg.com/profile_images/1386020558069026816/GvPjQySx_400x400.jpg",ref_id:"742d5011-6af1-4004-b4e8-57959614b4b5",twitter_handle:"citadeldispatch"},{name:"the Bens",profile_picture:"https://pbs.twimg.com/profile_images/1386020558069026816/GvPjQySx_400x400.jpg",ref_id:"55580f1d-310f-47c4-9a07-2c0a4ec19ca7",twitter_handle:"citadeldispatch"},{name:"Paul",profile_picture:"https://pbs.twimg.com/profile_images/1386020558069026816/GvPjQySx_400x400.jpg",ref_id:"b150b9d0-c3c3-435d-b457-a86c335c2586",twitter_handle:"citadeldispatch"},{name:"Tony",profile_picture:"https://pbs.twimg.com/profile_images/1386020558069026816/GvPjQySx_400x400.jpg",ref_id:"8293895d-c43c-4777-a282-d873de069fd1",twitter_handle:"citadeldispatch"}],hosts:[{name:"ODELL",profile_picture:"https://pbs.twimg.com/profile_images/1421584695746338819/Z_7ZfAeP_400x400.jpg",ref_id:"6981a34b-301a-45f1-8299-59a3f719f6e2",twitter_handle:"ODELL"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/a09a2c49-84f1-4d0b-b150-6e6103f4ee41.jpg",keyword:!0,link:"https://anchor.fm/s/45563e80/podcast/play/64795761/https%253A%252F%252Fd3ctxlq1ktw2nl.cloudfront.net%252Fstaging%252F2023-1-9%252F311995738-44100-2-29ea6a9620c7d.mp3",node_type:"clip",pub_key:"03a3451db4748e483d2e1ee5d0b3a6872253253b57edf4b084a56952b432a224b3",ref_id:"e7094410-4a3e-43ce-8454-3eee9565878e",show_title:"Citadel Dispatch",text:"So where do we want to start? What do we want to talk about? This goes straight to 300 kilobyte blocks. You want to talk about 300 kilobyte blocks? It's never going to happen. We are starting UASF tomorrow. We have hats. What's the compelling argument for it? I know what the compelling argument is, but you want to give yeah, you can. An overview and the Em radio kind of thing shortwave. Well, no, I mean, I think the real argument is they're small. The real argument is when we increase the block size to essentially four megs, we should have been operating under the assumption that blocks would always be full. That's the only safe assumption. Of course they're going to be full, but instead, in the meantime, we've just had relatively empty blocks consistently. And now that they're full, everyone's like, that's crazy. That's too much of a burden on my node. But the real question should have been when we increased it in the first place, would it be a burden on nodes or would it not be a burden on notes? Right. When they changed it? Right? Yeah. Big blockers were all like, where's the block? Exactly. That's what I'm saying. So the argument for 300 KB is like, if you don't like big blocks, then let's make them smaller. Right? Yeah. Well, full blocks. Well, they'll always be full if it's. At 332 megabyte blocks and then satoshi. Down into 1 original sin. The original if you talk to the. Big blockers, thank God we don't have 32 meg blocks. That'd be fine. Well, one plus side of that is that the Raspberry Pi Fetish would have never happened. No, not in a box. How do you feel about Raspies. Razor. Is as the supply chain restored and. They have the most close source, most awful company as a chipmaker. If you have 32 megabyte blocks and then you have this set up with Segwood or Taproot, then you'd have like 128 megabyte blocks, right? Well, yeah, it depends on how you're going to look at it. But if you did all this V by Shenanigans yeah. That would be for normal. Well, provided the discount would be the same. Right, because maybe we use a different discount formally. Yeah. But if we used all the same. Yeah, it would be just 120 minus the coinbase witness and all that stuff. 32 bytes or something. I don't know. Ben is the one that should know this thing. That's too dead. Right. I think that people weren't expecting actual four megabyte blocks. It was always like, well, in theory, if somehow we had only witnessed data in the block, it would be four megs, but no one thought that would happen. I mean, thankfully, now we have Dick. Butts filling the blocks. It fixes all the FUD. About threeway missions, full security budget. We're going to be secured by monkeys. Now, more than the storage stuff, though, the stuff I personally cared about even back then was IBD. That was like the big issue. But bandwidth isn't like the biggest restriction on IBD. Normally it's like validating everything, which is CPU. True. Unless you're going through Tor and then thinking that. How much drive space do you need for one year of four megabyte blocks? Somebody did the math. Like just average. Four times 144. Drive space is definitely not the issue. Well, there's one issue, which is like, there is a threshold of price change on SSD drives. Right? So I think right now the commodity sort of like SPAC that China puts out is 1 TB drives. Sorry, actually the Philippines does those drives anyways. And once you go to two or four terabyte drives, the price is completely different. It's not just like double the price kind of thing. I can't remember which one is the one that's the standard right now. I think I saw a tweet from Stephan Livera that said it went from twenty eight cents per gig or something like that to now $0.03, something like that. Yeah, but that's only for the main size that you get with all the shit books. Hold the mic closer to your math. Yeah. Like that. So whatever is the drive that is the standard for most things, that's going to be the drive that has that price. As soon as you deviate from that one specific model that everybody gets. He was talking about just a Samsung like typical whatever model, like 870 Evo. It's probably like 1 TB. Exactly. Yeah. But then 1 TB is probably not enough anymore, right? Yeah. So now you have to go to two terabytes. That's going to suck for everyone's. Raspberry Pi's right now, that's going to suck for a lot of people once we hit that threshold. Good. It's just a reality. Well, we can soft fork the size down. It's very easy. Or just let them have Prune nose. How far are we from 1 TB? You just randomly talk to that. Are we like 700gb already? No, it's like 600, I think. Okay, that's going to change very fast. How much was TX index, the inventory fact filters, all that? Like where we at with all the good shit? I don't know. I mean, technically you only need about 300 blocks to be safe. Yeah, that's the math. Well, no, you should have 216 or 2016, like the difficulty adjustment period. I just did the math. It's 210gb a year. If you have four megabyte blocks all year. Okay, the block ",timestamp:"00:06:35-00:12:39",topics:["Bitcoin","300kb block size"],type:"podcast",weight:35.542531998953606},{boost:0,date:1667658156,description:"Bullish about merchant adoption through Lightning network and The Bolt Card",episode_title:"WHY ARE WE BULLISH? HodlSolo, James Dewar, Christopher Gordon, Peter Rounce ep302",guests:[{name:"Peter Rounce",profile_picture:"",ref_id:"0f59ce14-c4c9-49a3-9ff1-2d4051931a19",twitter_handle:""},{name:"Christopher Gordon",profile_picture:"",ref_id:"b4b8fac7-00ae-423d-b22e-e1ecf079bb5d",twitter_handle:""},{name:"James Dewar",profile_picture:"https://pbs.twimg.com/profile_images/1092486738814078978/WxYQsqYo_400x400.jpg",ref_id:"960d2bf1-17e6-4821-a041-4a1283ef0bce",twitter_handle:"IndigoFast"},{name:"HodlSolo",profile_picture:"https://pbs.twimg.com/profile_images/1526883855742943233/WE19hgdQ_400x400.jpg",ref_id:"93734db0-ad98-41ef-8548-5b3868edc23f",twitter_handle:"HodlSolo"}],hosts:[{name:"Ben Perrin",profile_picture:"https://pbs.twimg.com/profile_images/1181715113226596352/ipGVEcYH_400x400.jpg",ref_id:"e6b013ef-178b-4b41-95ee-423148a3dc3a",twitter_handle:"profbenperrin"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/419512c2-e309-4b25-bfe2-cd481d53f66d.jpg",keyword:!0,link:"https://anchor.fm/s/11e95d20/podcast/play/60115562/https%253A%252F%252Fd3ctxlq1ktw2nl.cloudfront.net%252Fstaging%252F2022-10-5%252F295093647-44100-2-15ee570c17e32.mp3",node_type:"clip",pub_key:"02545c14cbb18a61f20dd45f5e3dcbd9acae3de282369501040adce32a75311309",ref_id:"98a90a75-7ec6-412a-b5a0-dca009985290",show_title:"BTC Sessions",text:"everything. Guys to the moon. Exactly. But we're super bullish about merchant adoption. As I say, for those who don't know who we are and what we do, we're bridged a bitcoin and we onboard merchants to accept bitcoin payments in the UK, although we're looking at seeing what we can do internationally to help people to help our bitcoin brothers and sisters abroad. But we're mainly based in the UK at the moment. And why are we bullish? Well, I'll take you on a little journey through the bitcoin space, sort of my little journey as to why I'm bullish. So most of us on the call hopefully know about bitcoin if you're not you'll know soon. It's the hardest sound money there is. And when I heard about it, I was like, wow, this is amazing, this is great, this is fantastic. But I can't buy coffee with it. This is a shit. Yeah, it's great if I want to move large amounts abroad and stuff, but it's supposed to be a peer to peer digital cash and other than send large quantities abroad, I can't go down the shops and spend it. That wasn't so great initially, but there was a turning point, and for me, the first turning point was the Lightning Network. So I think it was in 2015, the Lightning Network paper was written and first transaction was 2017. And then we had the Lightning Torch in 2019 and that's when things started taking off. And for me, that was the first turning point, the Lightning Network and the development of the Lightning Network. So, for those who aren't familiar with the Lightning Network, because there appear to be quite a few bitcoiners who don't know about the lining network, what the Lightning Network does is you can transact or you can send bitcoin on the Lightning Network, which is a second layer. We think of bitcoin as the first layer. The Lightning Network is a second layer built on top of bitcoin, and you can transfer bitcoin on the second layer at near zero transaction fees. So if you're moving small amounts, it's great. There are fees that hike up the larger the amount you transact. But if you're doing small transactions, like buying a coffee the fees are tiny, they are negligible. And on top of that, with the Lightning network, it's a near instant settlement. So for those who don't work in the retail sector, if you are a merchant, when you accept a payment system through traditional payment rails, that payment is not settled normally for a few days. The final settlement might not happen for two or three days. Visa or Mastercard might not clear that payment for two or three days. So within that period, they might turn around to you and say, actually, that was a fraudulent transaction because that card or whatever, that was a stolen card. So we're going to charge that back to you. So sorry, you gave away whatever it was. You sold that helmet for $100 and you're not going to get it. You've lost the helmet. So speak to your insurance company. With the Lightning network, it's near instant settlement. And I say near instant because it might take a few seconds, but it's final. Near instant and final, so you have no chargeback. So just those two things on their own are fantastic. So that was a real turning point for me. Now, the second turning point for me and for us was earlier this year when we formed Ridged a Bitcoin with James and Simon. And that's what Coin Corner and to a certain extent what Jack Mallards would strike are doing. But certainly for us, it was Coin Corner. Now, they released what they call the bulk cards. And that's a contactless bitcoin debit card and a there's big sort of for all about it. And I was like, oh, this is amazing. This is great. Now I can tap and pay. And if I'm honest, I was a. Bit poop poohy about it. It was just like, we've got that technology about it. Bitcoin is supposed to be cutting edge, but we're using technology accessory. I don't get it. We're using QR codes now, that's new. So I was just like, I don't get it. I don't know why everyone is so excited. But what got me excited was the merchant app that they released to go with the bulk car. So for those who aren't familiar with Corn Corner do is they allow customers to pay with Bitcoin and the merchant can choose to accept that bitcoin or at point of sale, they can flip it straight into the local currency, bit euros or pound sterlings and hopefully other currencies, as hopefully they extend into other countries soont. A small request. Coin corner. Danny mommy. So that's fantastic because now businesses, if they don't want to have bitcoin on the books or the balance sheets, they don't have to they don't have to hold onto it. Let me put it this way. Some merchants don't want to have the volatility. They don't want to experience that. So that suddenly, for me, opened the doors to a whole load of merchants. So from our perspective, when we now go to businesses or business comes to us. The conversation piece is not the initial conversation piece is not about bitcoin, it's about this fantastic new payment rail that they can start using because they don't have to hold bitcoin on the books or the balance sheets. Now, if you're a toxic maxi, you might turn around and just go, what the hell are you doing? They're not real bitcoin and so they're not holding the bitcoin. But for me, that is the start of their journey and they're adding to the liquidity of bitcoin and the lightning network, and that's really important. They're contributing to the space and it's an interesting journey. So we had an interesting so we've onboarded one of the pubs that we're mainly James, thank you very much. James onboarded a pub in London called the Georgian Dunsha. Head down that's in by the river, anyone in London, and the owner has two pubs, and we set him up the first pub just outside of Renting, and he said to James, right, I want to flip the bitcoin I receive into pound sterling. Yes, no problem, that's great. And then James and I went along to his pub in London a little while later and we set him up with all the point of sale devices and made sure it was all up and running. And without prompting, he turned around to us and he said, this bub, I want to hold the bitcoin, I don't want to flip it. And as I say, that was without prompting. And that sort of illustrates the sort of soft power of opening the door to merchants for me, just like, gives them an option and they go away, they read about it. And for me, it's an interesting I quite like the fact that merchants might start off flipping it because it's a soft sell of bitcoin, if you like. So for me, maybe this is a harsh way of putting it, but I think we've been selling bitcoin wrong, as in we've been selling bitcoin, we're trying to orange pill individuals and that's a really resource, heavy way of winning people over with bitcoin. And it's quite threatening and toxic and can be quite aggressive and cultish because we're effectively saying to people, you're doing it wrong, your money is wrong, you've got it all wrong. We're right, we're going to be rich, have fun staying, pool, all of that shit. But by onboarding merchants this way, what we're doing is they're getting bitcoin is coming to their shop or their restaurant or their pub, whatever it is. And if they're flipping into euros or Great British pounds and they're not holding the bitcoin, they'll still get bitcoin has come in, and those bitcoin is will come in through their doors. And bitcoin is, we're a crazy bunch, we will travel miles to spend on bitcoin. The catchment area for bitcoin is the catchment area for other businesses. For those bitcoin is much larger than your normal customer and those bitcoin is will come and when they get there, they will be the most enthusiastic customers you have ever seen. They will record themselves spending their currency and post it on social media. It's mental. You don't get that with the US dollar. You don't get someone coming into a coffee shop and going, hey, guys, I just bought a five dollar coffee. This is amazing. You only get it with bitcoin. We post on social media, we love it. We want to spend our bitcoin and we love it so much, we post on social media and we rave about how good and easy it is. Get the owner out here. Let's give him a congratulations round of applause for accepting bitcoin. Everything exactly. So what you're getting is you're getting loads of happy people turn up who want to spend their money. That's not like your regular customer. So for me, that's part of their orange pilling there's. All these happy bitcoin is turning up and it's going to make them think, they're going to think, hold on, we're going through some pretty shit economic types. Yeah, these guys, they travel fucking far to get here and then they're really happy to spend their currency and they're thanking me. But there must be something to this bitcoin. So it starts and thinking it sows the seed, if you like. I just want to say, what's the name of that part? Because maybe I should go there and tell them specifically that I flew from Canada. To come to the point, it's the Georgian Devonshire in London, in West London, if anyone's listening. So, yeah, it starts their orange pinning journey. And yes, it's a much softer power. So, as I say, the pitch when we go in, the pitch is not initially about bitcoin. The pitch starts off with, do you want to use do you want additional revenue, essentially, because we're going to open up your business to these customers that aren't coming to you. So it's additional revenue. That's the starting conversation. Do you want additional revenue and do you want to use a cheaper payment rail? And it's not replacing anything yet, it's running alongside. So there's no we're not asking you to change anything, we're just giving you something extra that runs alongside and complements runs in parallel with the system that a business currently uses. So, in other words, there's very little downside. I would actually say there's only upside. Either you get more business, which is more likely, you get more revenue or you don't, at no cost, because at the moment, there are companies and we will help the small businesses with the initial set up. So you either get more revenue or you don't. And the evidence is coming. So it's a long story. We help with the marketing as well. So we will put it out to our bitcoin and to all the local meetup groups, locals, business, and so we will make sure that they know that there's this business. So that's part of the package that we offer. And the evidence is that this is really working. So we're seeing so the George and Devonshire who opened their doors to bitcoin, is it last week? I think it was last week, yeah, last Friday, instantly. As soon as we posted on Twitter. They had people that afternoon coming and all weekend there were bitcoin as a rolling through the doors, literally posting videos on social media. And all this week, because I was in the sister pub this evening for the park meet up and the manager there said that the owner had been saying every day this week he's had customers who wouldn't have had otherwise. Yeah, I love to hear that. This is very sorry to interject, but this is very parallel to there's a guy in Miami Beach and he runs a taco place called Takisa Tacos. And I was in Miami in 2021. Gladstone was putting on the Oswald Freedom Forum. There was involved in organizing it. So I was speaking there and I said I was going to be in town. I tweeted out, hey, I'm in town. What big corners are around? And John, the owner of Takisa Tacos in Miami Beach, said, hey, I own a taco joint. This is where we're at. Come to Tokyo. Tacos. We'll set you up. So bring some bitcoiners, bring some clubs down and we'll see what we can do. We accept bitcoin here, lightning, we accept all of that. Sweet. So I get it's, like, me, guy, Swanseafon, Lavara, and then like ten or twelve other plebs, we show up. Dude is like, great, come on, there's a table in the back. And he fed us all tacos. He gave us all tacos the whole night for free. Then, I mean, we tipped we tip the shit out of the shop, obviously, like, more than we would have paid for the tacos, for sure, but nonetheless, like, the gesture was and then flash forward a year later to the Bitcoin 2022 conference. His taco joint was packed every night, every bitcoin. I think Unchained Capital had their staff party there. There was all like, bitcoin and my airbnb was above the taco joint department there. It was amazing. And so I'm so happy because you're so right. It attracts people and they will move the earth just to get a taco right. And pancakes. It's beautiful. It's fantastic. And we've got hard data to show that as well. I'm bullish about merchant adoption. We're getting loads more merchants on the map. And actually I've got a map to share, hopefully. We had a little trial run early and I kind of messed it up. Let's see if I can bring it up to share with. Let's see. Can I do that? I'll tell you when I see it. Let's just share my screen. Apologies, everyone. So let's share screen. And don't worry, if you accidentally show the stream screen, we'll get a little bit of stream section and people can see backstage. Cool. Yeah. I'll bring up the private chat. So that private conversations. Of all the travelers. I'm probably the least technical person. So present share screen and is that cool? So that's the screen I wanted to show you guys. Try it again. Present share screen. Click on the one that you want and then hit Share. Oh, I see it's taking me through. I'm at least technically minded person. Okay, here we go. There's three sections. There we go. This is our backstage, just so you know. Cool. There we go. So this is apologies, guys. And you got to put in the right tab. Or did you pick the wrong window? Might be. What can you see? I see the BTC sessions. Backstage screen. I think the wrong window. I think Pete the guy building all the apps is going to have to help me, is going to have to. Do it for me. Gone, Pete. What am I doing wrong? This is kind of killed my flow. Gone, Pete. I'm enjoying this. I'll let Pete do it and then I'll explain why the technical people build application. Yes, I am probably one of the least technical people that exist in the bitcoin space. It's quite embarrassing. So as you watch Pete Masters way through this process, he is the one that's building many of the fantastic applications and websites that you use with bitcoin. And so you'll be able to appreciate that. What about micelike? He's putting up his lights. He doesn't care. He's hung me up to dry. He's just putting his slides up. Tell you what, I'm going to quit while I'm ahead and just say I've got a slide. I've got a slide that shows the number of merchants in the last four months has almost doubled in the UK. So we've gone from, I think it's 51 merchants except in bitcoin to 91 in the space of four months. And it's a better graphic. It doesn't sound like very much because we're a small country, but the graphic is pretty cool because we've got a map with all the bitcoin logos with all the merchants that accept it. And it looks fantastic. So, yeah, I'm super bullish about merchant adoption. Prince another podcaster, Daniel Prince, he gave us the phrase, accept it and they will come. And that seems to be true because it happens there's. The Suffolk Jungle Rooms, and they often have meetups there. And they get people from all over the place coming. And ideally, I'd like to see a bitcoin accepted here, sticker on every high street. And I think we're not too far off. And I think we do this strange thing in bitcoin. We evangelize bitcoin, don't we? It's like this thing that's going to it will fix everything. But we do evangelize a lot. But actually, what I think would be good is if we normalize it. That's one of my tags. Let's normalize bitcoin don't evangelize it. That just scares people off. Who are these crazy culty people? We just want it in society. It's a PeerToPeer digital cash system. So, yeah, we're almost seeing a new business every day. So gradually, even suddenly, I think it's happening. I love that you brought up Daniel Prince because this is how I'm going to segue into getting Peter on his merchant side stuff here. But the quote that Prince, he gave you, accept it and they will come. He uttered those words to me as we made our way through a town in Spain. Following the conference in France, which was surfing bitcoin, we went across the border into I can't remember the name of the town now. We were in Beeritz San, I can't remember. Nonetheless, there was one guy who served coffee and like falafel or something like that, something in somewhere in the Spanish town that accepted bitcoin. And we met him at the conference and Dan was on a mission to find his shop and make sure that we went and we bought anything from him. And so it was me, Daniel Prince, his wife and all of his children, of which there are many. It's like wandering through the old town to find this one shop of this dude who actually is from Canada, who moved to Spain and opened up his shop and to hunt it down before it closed for the siesta in the afternoon. And we found it, we got there, we met up with them, we took pictures again, like did a stream or did pictures of us spending our money with this bitcoiner in Spain on a coastal town. And it was beautiful. And like, in what other instance would you get that? And I think the time is ripe for merchant adoption. I think it was too early in 20 14, 20 15, because the inevitability of scaling and having to introduce second layers was there. Well, the time has come and passed for that. And now we do have the lightning network and it's here you can do on chain, but Lightning is kind of the way to go to future proof yourself. And so with that, I want to kind of jump to Peter and talk about your experience in and around merchant adoption from the perspective of the person actually making the purchases. Yeah, sure. Well, I'm from class of 2012, I suppose, so I remember 20 13, 20 14 when we were excited about the technology, we knew it was a zero to one moment digital scarcity. And we. Knew that it worked. I think for the first time, it was decentralized and it worked. So that excitement led to going out and demonstrating it to people. And when you demonstrated it in 2013, 2014, you would get someone to install a wallet, you'd send them some bitcoin and then you'd wait 20 minutes for a block or two, you know, and that's kind of where it failed in terms. Of a demonstration. Obviously, technically, it didn't fail at all, but it required a lot of explanation if someone didn't sort of get it immediately, maybe didn't understand the cryptography or whatever. So I would say there's a big difference, as you say, with the Lightning network and where we are now with things like the Bolt card, that's made it so much easier. The user experience, the customer experience is completely different. It's reached the state of the legacy financial systems in. And I would say it's going past it now, which is, of course, the whole plan, really. We're not going to take them on, we're going to build around them with things like the Bolt card, for example. The Bolt card is actually a very simple idea. It's purely an NFC card, which gives a different reading each time. And this is based on some clever technology by an XP. When a customer comes to use it, though, they're simply going up to a point of sale terminal at the merchant, looking at how much it is and tapping to pay, just like you would. I looked it up earlier. So in the UK, we've had tap to pay for since 2007, is that right? 2007? I have to check. Yes, 2007. In the US, I think it's been a bit more recent, 2017. And so you see a different response with UK and US customers. In the UK, everyone's used to tapping to pay. It started off as £10 and then it was 20, then it was 40 and there wasn't a problem. This problem where you think someone's going to come past you and tap your card in your pocket, it just never really happened. The reason I'm laughing, Pete, I'm not laughing at you, I'm laughing at the Chat drop. Water all over his crops, freezing cold. Apologies for wondering why I'm giggling beside you. Sorry, I have to let that out. Sorry. I'm equally intrigued by the bold card and the point of sale, but also, I did just drop melted ice all over my crotch. Sorry, Paul, sorry, I was about to burst out. Nonetheless, continue. I'm going to interject while my nuts are on the table here. ",timestamp:"00:42:00-01:07:06",topics:["merchant adoption","Lightning network","The Bolt Card"],type:"podcast",weight:4.878220435474277},{boost:0,date:1676083645,description:"The main benefits of OP_VAULT",episode_title:"BR023 - OP_VAULT for Bitcoin Covenants Panel ft. James O'Beirne, Rijndael, Antoine Poinsot & Carman",guests:[{name:"Carman",profile_picture:"https://pbs.twimg.com/profile_images/1609775498971725824/5vyAafE3_400x400.jpg",ref_id:"09405d70-6fa6-4f2c-92f1-a2951ad56447",twitter_handle:"benthecarman"},{name:"Antoine Poinsot",profile_picture:"https://pbs.twimg.com/profile_images/1108377445936316423/ArRDGbr5_400x400.jpg",ref_id:"1ba10809-b3e6-4e37-a906-697a0368b814",twitter_handle:"darosior"},{name:"Rijndael",profile_picture:"https://pbs.twimg.com/profile_images/1542705395873058817/0zsy4Yur_400x400.jpg",ref_id:"861d5324-8ede-4059-826f-f29abca5d7e6",twitter_handle:"rot13maxi"},{name:"James O'Beirne",profile_picture:"https://pbs.twimg.com/profile_images/1542173995650408450/iDxrdmuj_400x400.jpg",ref_id:"e8e48fcf-9e54-4c66-9b20-aacf5c5b504e",twitter_handle:"jamesob"}],hosts:[{name:"NVK",profile_picture:"https://pbs.twimg.com/profile_images/608402052247658497/ENDv0BNd_400x400.png",ref_id:"d754e29b-2d3e-4280-8d72-f41d2a465a78",twitter_handle:"Coinkite"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/f1879df9-9bc6-4a76-951f-24548da768ef.jpg",keyword:!0,link:"https://anchor.fm/s/9500fad8/podcast/play/64850866/https%253A%252F%252Fd3ctxlq1ktw2nl.cloudfront.net%252Fstaging%252F2023-1-11%252Fc53436f3-e1a6-2cae-eecb-fb61b06f804d.mp3",node_type:"clip",pub_key:"037f7331a5bef6c6f880246747befcc3767f3bb9730bc5e6f7c3770f4184ed0bff",ref_id:"9abcd65c-f311-4a4a-ae65-bbef89f36fc7",show_title:"Bitcoin.Review Podcast with NVK & Guests",text:"we had to just, like, sort of, like, wrap up the benefits, right, like, of this for, like, your average user, right, like, out there who is going to be engaging in hats and other means of getting things into bitcoin dramatically or undramatically. What would you say are like the ten main sort of one liners that like, okay, we activate this today. You gain this set of lists nearly immediately. Right. Like assuming of course there's a UI to use it and stuff, but it's like very achievable, very simple, very safe. You get it? Yeah. So my tagline has kind of been you get the operational complexity of single SIG with multisig security, multisig safety. And personally, if I could do this for my own funds, I would sleep a lot better at night. Because I could have coins in cold storage and I could be alerted if if somehow, in any number of a million different ways, you know, my infrastructure got compromised, my, you know, rodolfo backdoor, my, my cold card, you know, there's just a million different ways you can get popped. And I don't want to rely on having built the perfect fortress and pre anticipated everything. And so I want to be able to have reactive security. And I think offalt is to date, kind of the most straightforward, easiest to use way to do that. So essentially you get end user sort of like amazing security. You can build some fairly safe, straightforward scripts that sort of like handle normal people's money problems. You can have institutional problems resolved. You can create there's probably also like. A middle thing in there too, right? There's been a lot of discussion about things like Ecashements like cashew or Fetty Mint. And this would also be an upgrade for their set up because what those systems are is they're basically just smaller custodians, right? And so if you want to Uncle Jim funds for your family, your friends, your community, your school, whatever, and give them like a very private lightning wallet via Chami and Ecash, it would be great if you could upgrade your security setup without dramatically increasing operational complexity. Yeah, so you get the DLCs, right? So we can finally have some interesting dynamic stable coins or any other kinds of dynamic contracts really being represented in the actual chain or protected by the chain. And we get some simplicity upvault. It's a small patch compared to other things that do covenants. This is like my new school, totally. At least I have not bumped into very reasonable, very strong opposition from anybody who understands this stuff. So I don't know, it feels like a very sort of sane next feature for when everybody is sort of in the mood of getting next feature and you resolve the fee problem, which is kind of a huge deal. I think that the rest of the unresolved things are more practical, like how to handle the keys and how to sort of do things in the UI, sort of like the implementation, real sort of like issues. But those things are true for ",timestamp:"01:01:55-01:05:30",topics:["OP_VAULT"],type:"podcast",weight:35.95881198075342},{boost:0,date:1671663632,description:"Factors affecting BTC miner profitability",episode_title:"#Bitcoin and Macro Jam Session 🎸🔥",guests:[],hosts:[{name:"Joe Bonet",profile_picture:"https://pbs.twimg.com/profile_images/1285967527848353824/bwKVva55_400x400.jpg",ref_id:"207abdda-54a5-4eab-980a-ac936c7298e1",twitter_handle:"Joebonnet"},{name:"Danny Condon",profile_picture:"https://pbs.twimg.com/profile_images/1449366565074440194/B_iLnyPw_400x400.jpg",ref_id:"0e671cc8-0dd8-46b1-90be-451b23932fae",twitter_handle:"DannyCondon1989"},{name:"Blake Davis",profile_picture:"https://pbs.twimg.com/profile_images/1532456877602349056/yg52j806_400x400.jpg",ref_id:"ce01300a-c603-4a32-9c98-8b05160a1959",twitter_handle:"BlakeDavis50"},{name:"Mitchelle Askew",profile_picture:"https://pbs.twimg.com/profile_images/435841191524204544/mzKR9KCX_400x400.jpeg",ref_id:"5f69ba8e-c266-4b31-bc1c-10de71e6ff79",twitter_handle:"Mitchell_Askew"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/7c53ad3c-1ce2-4661-8896-4c40dcc23b4d.jpg",keyword:!0,link:"https://stakwork-uploads.s3.amazonaws.com/uploads/customers/2707/media_to_local/81882712-0c04-4852-b4d7-308376f102b3/c0c2c28c-b1f6-4568-8754-c3b7a4faa285.mp3",node_type:"clip",pub_key:"03a3451db4748e483d2e1ee5d0b3a6872253253b57edf4b084a56952b432a224b3",ref_id:"a659e54a-bb90-4f6c-9179-a9e05224c988",show_title:"Blockware Solutions",text:"Are you seeing this is a little bit more of a kind of right to the point question, but difficulty we got a pretty material negative difficulty adjustment. Two difficulties back. We came back up about 3% currently. I admit I have not checked today, but yesterday I think it was a double digit, which usually kind of washes out a bit over the two week period. But looking at potentially at another materially negative difficulty adjustment. What do you think? As far as and this is feeding on the back of a lot of the points you've been talking about, about these long term investments difficulty almost being a laggard indicators of sort of well, in Arrears investments, what do you see for difficulty for like, 2023 and for even, maybe even the next couple of years? And even so, like hash price right. I mean the spread is small right now. Survival is the name of the game. Not all are surviving as is clearly evident. Right. What do you think from a difficulty perspective as we can look forward? Yeah, totally. Yeah right now I just looked we're projected to go down about 4% which will put us below the previous low that we just made in difficulty. So yeah, it's interesting and it'll be interesting to see how that plays out over the next two weeks before it happens. But yeah, I think there's a few factors that are going to affect difficulty in the short term and in the long term. One thing that I think is interesting about difficulty potentially in the short term is we saw this bitmain, just released this new firmware for S 19 J Pros and other Pro series machines and it basically came out with this firmware that enables those machines to become more efficient. But they have to reduce their hash rate by about 20%. And there's no guarantee at all that a majority of miners are going to implement this new firmware like tomorrow. But over time, if they do, that's a material drop in hash rate that we might see which might lead to even lower difficulty. So not only miners adopting this new firmware would increase their operating profitability of their machine but enough miners doing this and running this new firmware could actually lower the total network difficulty for everybody and actually make everyone more profitable. So it's in a weird way that potentially every miner could win by implementing this new efficiency gain at least in the short term. Yeah, I think it's like a cool it's a relevant and moderately creative bear market opportunity if you will. Right. Because you go back a year it's just about getting as much hash rate as possible and now it's about basically mitigating cost like paying eighty nine cents per kilowatt hour a year ago relative to the market there were cheaper options because energy was cheaper but that was tenable. Now it's like you're underwater. And an interesting ",timestamp:"00:39:57-00:43:25",topics:["Bitcoin mining"],type:"twitter_space",weight:10.51428035061009},{boost:0,date:1641168e3,description:"Multiple aspects of scalability",episode_title:"Scaling Bitcoin On-Chain - TABConf 2021",guests:[{name:"Andrew Chow",profile_picture:"https://pbs.twimg.com/profile_images/1452266201770496010/44FHCtZM_400x400.jpg",ref_id:"f96d87ca-5060-4021-aeb9-61db03312027",twitter_handle:"andrewrchow"},{name:"Mark Erhardt Murch",profile_picture:"https://pbs.twimg.com/profile_images/1269477743525130241/-U843Cmt_400x400.png",ref_id:"ef2f2f68-ae16-4e78-80cb-0be9bd156988",twitter_handle:"Murchandamus"},{name:"Andrew Poelstra",profile_picture:"https://pbs.twimg.com/profile_images/1316562683009921024/FSscAYvJ_400x400.jpg",ref_id:"15fb9c53-c988-4af1-bbf0-4832d71b0a01",twitter_handle:"Blockstream"},{name:"Peter Wuille",profile_picture:"https://pbs.twimg.com/profile_images/1264051937172836353/n7gHdLbB_400x400.jpg",ref_id:"fb836ce4-a933-4419-99d8-932fe65219a1",twitter_handle:"pwuille"}],hosts:[{name:"Stephan Liverra",profile_picture:"https://pbs.twimg.com/profile_images/1362551718110580740/v-W5Q2uo_400x400.jpg",ref_id:"551f3a72-9f09-4bcc-bc3b-80ec5605e30f",twitter_handle:"stephanlivera"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/e7d2a4ca-6b44-4a45-a94c-6f48987979f7.jpg",keyword:!0,link:"https://www.youtube.com/watch?v=GbhXJ43e2Bc",node_type:"clip",pub_key:"",ref_id:"d96fca70-c1c7-4b71-9d35-9aadf2820909",show_title:"TABConf (The Atlanta Bitcoin Conference)",text:"We've been talking about signature aggregation where we're getting rid of some of the signatures that go on chain. But there are multiple aspects to scalability and on chain space is only one of them, CPU consumption is another. And it turns out you can sort of get something similar to signature aggregation without actually doing it. And that is you still have multiple keys on chain and you still have multiple signature completely created independently on chain. But you sort of aggregate them at validation time together and then validate them all at once. And it turns out you can do this somewhat more efficiently than validating multiple them. And this is something that isn't so much being done in. This is a known technique. There are papers going back 1015 years explaining how batch validation improves things, but in most settings it isn't all that interesting. In our case it very much is, because if we have a block with thousands of signatures in it, we really only care if all of them are valid or not. It's not like we care if one fails which one it is. The block is invalid, throw it away. So that's really the use case for batch validation and Taproot and the Schnour signature scheme it introduced have been specifically designed to permit batch validation. It's not implemented, but it was a design criterion in BIP 340 and 341 342 that nothing in there would interfere with the ability to batch validate, which is the rationale for some of the maybe more unexpected changes. For example, the Taproot script logic doesn't have a check multisig anymore, specifically because the check multisig has existed before, isn't compatible with batch validation. Sorry, go on. I was just to add to that the ECDSA signatures that we were using before Schnorr signatures were not compatible with batch validation either. Although maybe in retrospect there were some small tweaks I guess Satoshi could have done that would have made it possible, but they weren't. And we thought about that when defining the Schnor signatures for Taproom. And so, as I understand you then, would that be mostly a CPU saving. Or what would be purely CPU saving? That would decrease the sync time so. You could spin up your bitcoin full node faster in a batch validation world? Theoretically. Well, only for the batch validation signatures. Not the fast stuff, obviously, because that would still be. We'Re not in a rush about that, because it only becomes relevant once taproot signatures are really commonly being used. Right. But then of course, once you implement it, it would still apply to all transactions from that point onward compatible. So once Tap root rolls out and there is Schnorr signatures in the blocks, if you later then do the batch validation, you get all the savings. And it is not restricted to initial synchronization, of course. Right. It also helps with a new block that comes in, or a new transaction that comes in. Mostly new transaction, because we cache the result of signature validation and we don't do it again. ",timestamp:"00:40:19-00:43:50",topics:["Multiple Bitcoin keys on-chain","Bitcoin signature validation"],type:"youtube",weight:4.30657198974179},{boost:0,date:1673685e3,description:"The reasons for Cameron Winklevoss to ask Barry Silbert to resign as CEO of DCG",episode_title:"The Chopping Block: Why Gemini Users Are Mad at Genesis and DCG - Ep. 443",guests:[],hosts:[{name:"Tarun Chitra",profile_picture:"https://pbs.twimg.com/profile_images/1587539091444432897/Z6_nmrCB_400x400.jpg",ref_id:"dfad4b23-92ff-4aa1-9aa4-abc1d54cd6d3",twitter_handle:"tarunchitra"},{name:"Haseeb Qureshi",profile_picture:"https://pbs.twimg.com/profile_images/1581025415551889408/thQwG4lb_400x400.jpg",ref_id:"790e4217-dd9f-416f-b9f8-ed596937f5b5",twitter_handle:"hosseeb"},{name:"Tom Schmidt",profile_picture:"https://pbs.twimg.com/profile_images/1563232354277085189/xQL92DR4_400x400.jpg",ref_id:"bc9d3bfd-36b0-4cbc-a491-9370decf4c99",twitter_handle:"tomhschmidt"},{name:"Robert Leshner",profile_picture:"https://pbs.twimg.com/profile_images/1587956987786104833/1SiKVj-s_400x400.jpg",ref_id:"ebaa2166-7982-423d-9f43-add89e7d47f9",twitter_handle:"rleshner"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/7de0d293-8ae3-4362-8500-8f7300f3fe41.jpg",keyword:!0,link:"https://traffic.megaphone.fm/LSHML4726349989.mp3?updated=1673643857",node_type:"clip",pub_key:"02545c14cbb18a61f20dd45f5e3dcbd9acae3de282369501040adce32a75311309",ref_id:"0329d1cb-7a66-4de5-a67d-36f28fce092f",show_title:"Unchained",text:"The interesting thing is that when Cameron is cameron was accusing DCG Genesis of fraud, a specific request, clearly look, whether or not they're performing fraud, you still want to get your users paid back, right? So one way or another you want to find a peaceful resolution that's still outside of bankruptcy. And so the remedy that Cameron proposes to make him feel okay about the resolution here is for Barry to step down. Which is a very interesting thing to ask for because one, of course, Barry is not the CEO of Genesis, right? So Barry is not involved in Genesis except as a sort of distant owner, like an owner of the parent company. But then second, Barry kind of is DCG. It's like asking Elon to step down from Tesla or from SpaceX. Right. He's so deeply intertwined with that company and he owns obviously the vast majority of it. So I'm not really certain what Cameron is thinking and asking for Barry to step down. It could be that Barry has just been so ostensibly, what he's claiming is that Barry has been so difficult to work with, he's been dodging requests, he's been unresponsive, and that really it just looked this guy stonewalling me. And literally, if you don't put someone there who's not going to stonewall me, I am going to push you into bankruptcy. Because otherwise I have a choice. That could be the essence of what he's asking for. It could also just be a way of kind of grandstanding for earn users and show like, look, I'm doing something, I'm asking for this big kind of loud request. I don't know. Yeah, that I think is actually kind of like the genius stroke here, which is basically Cameron getting in front of the story and deflecting blame on Gemini towards DCG. And that's kind of what I've been seeing on Twitter is like, Earn users are not pissed at Gemini, they're actually pissed at Genesis. If you think about it, that doesn't really make sense, right? Like, if you deposit money into a bank and then your bank makes a bunch of bad loans and has a bunch of defaults or liquidity crunch, you don't get mad at your bank's counterparty, you get mad at the bank. And yet Gemini has been able to basically get all of their users to be mad at Genesis themselves. Well, one small clarification there. The Gemini Earn users are in lending agreements directly with Genesis. So they're not lending money to Gemini who lends money to Genesis when they sign the PDF. That's like the terms of service or whatever. It's like an agreement between Genesis and the customer directly. And so they're directly providing the money to Genesis, not to Gemini in the middle. So that's the weird nuance there. And this has been front and center that Gemini Earn. It's not like Gemini is going out and managing like a portfolio to generate a return. It's gemini Earn is a funnel into Genesis. Yeah, that makes sense. ",timestamp:"00:13:43-00:16:36",topics:["DCG","Genesis","Gemini","Barry Silbert"],type:"podcast",weight:20.563728973264343},{boost:0,date:1666137600,description:"Focus areas on node management",episode_title:"Meet the Makers: Alan & Kwinten",guests:[{name:"Alan Plus",profile_picture:"https://pbs.twimg.com/profile_images/1565235279451103233/XD8pJuIo_400x400.jpg",ref_id:"e362fed6-ec06-4d8a-a052-3137b24f213f",twitter_handle:"alnboltn"},{name:"Kwinten De Backe",profile_picture:"https://pbs.twimg.com/profile_images/917859380699320320/p_v-fjmh_400x400.jpg",ref_id:"be68f240-1f4c-4b27-b4bb-752c90cbe0c3",twitter_handle:"QuintenDeBacke1"}],hosts:[{name:"Moritz Alby",profile_picture:"https://pbs.twimg.com/profile_images/859727763292512258/kiFpZ2vO_400x400.jpg",ref_id:"e88efbf8-3809-4508-a86a-d7bf9effb574",twitter_handle:"MoritzKaminski"},{name:"Zapp Ed",profile_picture:"https://pbs.twimg.com/profile_images/1519990234070540288/adGqlFoj_400x400.jpg",ref_id:"bbe7cf1d-cd8d-4d36-926d-76f41b775fbb",twitter_handle:"zapp_ed"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/965489b4-a414-4fd0-ab8c-55911b1596aa.jpg",keyword:!0,link:"https://www.youtube.com/watch?v=GyA8tHNKmig",node_type:"clip",pub_key:"02574d6e8e787372184b6f17c40d6c6fe1777db9015801f95dfd24692784d767cd",ref_id:"2ff6b481-d06c-42e3-9ad5-9fa7a84dbd96",show_title:"BOLT FUN",text:"quite some minutes into this session. I think we can also take questions any time. So also to the audience, to the listeners, feel free to ask anything. Is there a unique chance to have here two professional note operators that you can ask? I'm curious. So there is quite a lot of happening regarding new standards or the protocols or even new tools. What are you most excited about that has been released recently or is being worked on right now. In the area of node management? Yeah, I think so. Another sneak peek maybe that we are working on commando connector. So to connect to your C lightning node through the Albi extension, through the commando plugin. And I think this will be something which will get more people into running a C lightning node. Because right now there is not really a good UI for that. Or there are some, but not that great. But if we can get it to Albi, then this will open up a whole new area of people running C Lightning nodes and you will be able to have the entire command of your C Lightning node, everything that you want to do, all plugin commands that you want to run. And this can all through the web ALM protocol. This will all be able to happen in the browser or even if the website integrates Commando, then they can directly talk to the node. That's also possible. So that's something that we're currently working on at Albi, but it's not ready yet, of course. But that's something that I'm quite excited about. I heard about a start up, but I can't really talk about details. But there is something coming up which is very exciting. It's a web based tool that will allow node operators to just set them forget, but we will see how well it will work. But that seems to be coming soon. I can tell you. I don't know. I mean, that's the promise. We'll see how it goes. It should come out within a few weeks if all goes well. But I'm not associated with that project, so I can talk about it. But aside from node management, I think I'm most excited about RGB and Tarot because I think those two things will open possibilities for node operators to earn more money by not just being routers and channel providers, but also to provide liquidity to exchange tokens, like mostly probably fiat tokens to Bitcoin and so on. So that could be a good revenue source and brand new revenue source, a brand new way to make money on the Lightning network. I'm not sure if this is going to take off in a big way, but I think even if it's just for a few years, even if it's just a small way, it's still a good extra income. So that's going to make sure that current node operators stay in business and more people join and the network just keeps growing. And that's what we need, I guess. ",timestamp:"00:41:19-00:45:36",topics:["RGB","Node routers","node management"],type:"youtube",weight:4.524002028228006},{boost:0,date:1669105800,description:"Whether the Bahamian government was the ‘FTX’ hacker",episode_title:"The Chopping Block on FTX/Alameda: Is Sam Bankman-Fried 'Crypto Kanye'? - Ep. 424",guests:[{name:"N/A",profile_picture:"https://pbs.twimg.com/profile_images/1478260779522658306/rm6XqGZx_400x400.jpg",ref_id:"9862384f-b99b-4777-aa71-538d41591686",twitter_handle:"unchained_pod"}],hosts:[{name:"Haseeb Qureshi",profile_picture:"https://pbs.twimg.com/profile_images/1581025415551889408/thQwG4lb_400x400.jpg",ref_id:"790e4217-dd9f-416f-b9f8-ed596937f5b5",twitter_handle:"hosseeb"},{name:" Robert Leshner",profile_picture:"https://pbs.twimg.com/profile_images/1587956987786104833/1SiKVj-s_400x400.jpg",ref_id:"08f19db5-dbb2-4ca7-886a-d4aaa9de1e0d",twitter_handle:"rleshner"},{name:" Tom Schmidt",profile_picture:"https://pbs.twimg.com/profile_images/1563232354277085189/xQL92DR4_400x400.jpg",ref_id:"1c211a97-8535-426b-9091-9d23ae0fbc11",twitter_handle:"tomhschmidt"},{name:" Tarun Chitra",profile_picture:"https://pbs.twimg.com/profile_images/1587539091444432897/Z6_nmrCB_400x400.jpg",ref_id:"8d941896-7865-49b9-9505-cf91882986bb",twitter_handle:"tarunchitra"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/7de0d293-8ae3-4362-8500-8f7300f3fe41.jpg",keyword:!0,link:"https://traffic.megaphone.fm/LSHML8128135235.mp3?updated=1669122227",node_type:"clip",pub_key:"0201497bb9e66239cdf8fe218ee3e3c7c5b1bea880787ccdd433e7af55f88b53ed",ref_id:"9f78ecd6-03f5-4f0e-ba8b-1dbb60b09052",show_title:"Unchained",text:"the other thing that's going on that's also very strange is that there's this jurisdictional battle between the Bahamas and the US. So John Ray, he originally filed for bankruptcy in the US. And the Bahamas. The Bahamas. SEC basically fired back and said, hey, this entity is in the Bahamas, therefore this is subject to Bahamas bankruptcy. And later it was revealed that supposedly, and again, this is still very unclear exactly what happened, but supposedly the Bahamas government instructed Sam to actually take the digital assets left in FTX and move them under Bahaman custody for the Bahamas government for some reason, and it's all very vague. Exactly. Did this actually happen? How did this happen? Is that the FTX unauthorized access FTX hacker that we were talking about on Friday night? If so, like, what the hell were they doing? Why were they selling off all the all coins to get access to put everything into eat and die? It's a very strange pattern of behavior. Well, they were also doing it on one end, curve. Right, exactly. And regulators actually know how to use curve. The suggestion is that they instructed Sam to do this. And so it was Sam who was actually going on chain and dumping these assets. The story at least makes sense. Like the pattern of behavior does look like, okay, this is something somebody's sophisticated about DeFi who's doing a lot of this liquidating. Yes, I think I've kind of come around on this. I think there's something else going on. I agree. If it's just a matter of moving the assets into their custody like that, that's one thing. But we also saw them basically eating a bunch of slippage on these, like on chain swaps, and then moving them into censorship resistant assets. And then I think recently they like cashed out some of their rent VTC for BTC. And so they'll probably shove that through a mixer and so I think this might actually just be a vanilla hack, and maybe the Bahamian jurisdictional battle and custody battle is like a different thing that we haven't yet seen. But I think the hack was maybe just an actual hack. And that seems to be what Sam was implying in his DMs with Kelsey Piper, which is that this was either a straight up hack or it was a disgruntled employee who I guess had access to the Google sheet when they had all the private keys. So, yeah, it's hard to tell at this point. It's crazy that they did everything in Google like shared good Gmail account. Yeah, it's such bad OpSec for like how did it right for managing a small amount of money, let alone a large amount of money. It's just preposterous. No one in crypto is that dumb. Besides yes, everything that we're learning about what was happening inside of FTX, it just belies so much amateurishness. Everyone listening to this stream right now is smarter than that. That is so stupid. ",timestamp:"00:17:46-00:20:42",topics:["FTX","Bahamian government","Bahamas"],type:"podcast",weight:5.694210546365008},{boost:0,date:1659484800,description:"Important UX design processes that needs to be solved for promoting Bitcoin adoption ",episode_title:"Austin Bitcoin Design Club Interview w/ Sahil, FuturePaul, and Car",guests:[{name:"Car Gonzalez",profile_picture:"https://pbs.twimg.com/profile_images/1541855444720836608/F4v02BuD_400x400.jpg",ref_id:"b554604d-47eb-4c7c-b6c9-87a062e6a844",twitter_handle:"Car_mdq_2010"},{name:"Sahil Chaturvedi",profile_picture:"https://pbs.twimg.com/profile_images/1362511727066107904/yP4o43cz_400x400.jpg",ref_id:"8b56eaa4-c9d6-46e8-a313-fbccd0ee86b5",twitter_handle:"SahilC0"},{name:"Future Paul",profile_picture:"https://pbs.twimg.com/profile_images/1508452962917666821/1QheRD09_400x400.jpg",ref_id:"ec933e22-f395-4817-b608-4337eaaf60a4",twitter_handle:"futurepaul"}],hosts:[{name:"Paul Miller",profile_picture:"https://pbs.twimg.com/profile_images/1508452962917666821/1QheRD09_400x400.jpg",ref_id:"825ccf41-8cae-43c9-81e9-a8868e07768e",twitter_handle:"futurepaul"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/2ec62250-4755-4616-8342-096a2cfab95f.jpg",keyword:!0,link:"https://www.youtube.com/watch?v=k_I5EiOyolM",node_type:"clip",pub_key:"",ref_id:"e9443306-25af-42d3-830d-ed6a26721103",show_title:"Voltage",text:"What's the most important thing that can be solved, you think, in bitcoin design? Just over whatever point of time you would like to define. I hate to say one year, five years, because it's going to change quite a bit, but what's the most important UX piece that needs to be solved for where we are today in bitcoin, in your guy's opinion? Do you have any idea? Yeah, I can start because it is something I'm biased, obviously, and I think about this every freaking day, but I think a lot about businesses adopting bitcoin and it's kind of scary to think a lot of businesses jump into custodial bitcoin and there's a lot of reasons why. So I think a lot about how do we build the use cases for small businesses, but also big businesses like MicroStrategy. What do they need? I don't know. That's part of the UX research process is, hey, what does Sailor need to be able to hold his own keys? Is it a bigger multisig quorum? Is it like fine grained financial controls? I don't know. But I think that to me is super, super predicting because there's a lot of people working on single SIG wallets and Lightning wallets and all that stuff is really great. But I think it's a very underserved market for larger businesses with many stakeholders thinking about how do they control their own keys. Yeah, a couple of other things that pop to my mind is right now, bitcoinners are pretty familiar with a lightning and on chain distinction. And I think we have to figure out how we hide that. Do we hide that? What is exposed to a user when they're spending Bitcoin, how much do they need to know about the layer two? And that kind of comes back to like, well, what trade offs is the layer two making? We don't want to lie to the user that there aren't trade offs, but at the same time, we do want to give people an easy path and then kind of like what Sahil is saying. I think there are a lot of things right now in Bitcoin where you have to go all the way, step one. And so it'd be really nice for a lot of these where if you onboarded someone to some Bitcoin experience, that they could gradually level up so that they're taking on more responsibility over time. The comparison I always use a bitcoin is like a marriage or working out. There are certain things that you can't have done for you. They're going to take work, but like those, theoretically, you can start out small and work your way up to more responsibility. Absolutely. ",timestamp:"00:11:25-00:14:31",topics:["Bitcoin design","Custodial Bitcoin"],type:"youtube",weight:4.302124736522732},{boost:0,date:1671534e3,description:"Antonio Juliano's advice for new bitcoiners ",episode_title:"Ep. 494 The Facts About Using Leverage when Trading Crypto",guests:[{name:"Antonio Juliano",profile_picture:"https://pbs.twimg.com/profile_images/1486890878694133761/85ev-DD6_400x400.jpg",ref_id:"025d2715-f5e7-4ba1-884c-45ba1e7770c5",twitter_handle:"antoniomjuliano"}],hosts:[{name:"Aaron Malone",profile_picture:"https://pbs.twimg.com/profile_images/1521495204196503553/abk-5S0m_400x400.jpg",ref_id:"bd103540-8c0a-4ab3-b5cd-24a3f2c43ab2",twitter_handle:"pizzamind"},{name:"Pizza Mind",profile_picture:"https://pbs.twimg.com/profile_images/1521495204196503553/abk-5S0m_400x400.jpg",ref_id:"16cb01cf-9f04-45db-a440-47259b02b86a",twitter_handle:"pizzamind"},{name:"Bryce Paul",profile_picture:"https://pbs.twimg.com/profile_images/1182725652794892288/QbDOKHcP_400x400.jpg",ref_id:"0d670dbf-f434-43b6-b454-8e5345d7ee51",twitter_handle:"BrycePaul101"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/93a6fe5b-364c-43f4-9f38-7da3e811460b.jpg",keyword:!0,link:"https://stream.redcircle.com/episodes/0270c2f2-f726-498b-9a8d-0f907aa5736a/stream.mp3",node_type:"clip",pub_key:"027be063cca62a6c08fbe2e8eba0aae10ad27a8896d04ee347a90fea2bce5e85ac",ref_id:"7fb2989d-f3f8-4e89-b1bb-66e08ed2f294",show_title:"CRYPTO 101",text:"I love it, man. I'm excited for V four. We're going to be hopefully being able to bring you back onto the podcast to tell us about how the rollout went and what we can continue to keep tabs on with dYdX. But for now, we've got a final closing question and this is a lay up, this whole softball, but it's really for a lot of our listeners who this might be the first time they've ever heard about crypto and they just decide, oh, Crypto 101, and they found you. So what would you tell somebody who's just now entering into the crypto space, they're about to buy their first bitcoin? Well, first of all, congratulations. You've decided to enter the crypto space after the collapse of FTX, which I think maybe you'll get an NFP for that or something someday. But seriously, I am really excited about what we're building at Tydx and more broadly, a lot of the stuff that's going on in crypto in general. I think crypto has a ton of promise, right? We can really build this financial system that's powered by code and not humans. And just once you wrap your head around that fundamental paradigm shift just even that it's possible to do that. Not that we've done that yet, that it's possible to do that. I think that's something to be excited about. I think a lot of people get disillusioned in crypto because they can't wrap their head around the timing of crypto. I think a lot of people understand the promise. It's like oh, yeah. Okay. Like Metallic. And everybody else has been out here saying, there's this fundamentally new technology, but come on, guys, what have we actually built? Sure, there's things like dYdX and Uniswap that have some real volume. A billion dollars a day is something for sure, but that are an overall small part of the crypto market. And even if we zoom out farther or super small part of the overall finance market, but if we really zoom out and think about, well, what's fundamentally newly possible with this technology on a really long time horizon, like ten years, 1020 years, plus. I think there's a huge amount of reason to be optimistic about that. We're really at the forefront of building towards that at dYdX, and I think there's a lot to be excited about. Man antonio, what a positive note to end things on. And I couldn't agree more. Zoom out. Zoom out. Don't stay too zoomed into the price charts and looking at 1 minute candles. That's how you're going to drive yourself crazy. Thank you so much for joining us, and we're excited to stay informed. ",timestamp:"00:41:55-00:44:28",topics:["Antonio Juliano","crypto"],type:"podcast",weight:10.07245675720714},{boost:0,date:1623733200,description:"The Flexibility in Small Business",episode_title:"Andrew Frazier on Running Your Business",guests:[],hosts:[],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/f2b2a2b2-8869-4256-94b9-a91c91c1ce7e.jpg",keyword:!0,link:"https://dts.podtrac.com/redirect.mp3/cdn.mises.org/122_e4b_andrew-frazier.mp3",node_type:"clip",pub_key:"",ref_id:"6537e3ab-da86-41c5-acac-2e513ce23634",show_title:"Economics For Business",text:"look to potentially get external financing. Yeah. Another aspect that comes up when we talk about this, Andrew, is the issue of flexibility. So we said right at the beginning that small businesses are more flexible in the way they can adapt and be agile in the marketplace. But sometimes financing, especially debt financing, can limit your flexibility. You've got covenants, you've got reporting dates, you got payback dates and that kind of thing. How do you manage that balance between retaining flexibility and giving up some of it to someone who's giving you a loan? Well, there's always a lot of trade offs, especially in small business, and sometimes you need the capital to grow. But you can still be very flexible as a small business in terms of the way you work with your clients, being able to provide additional things quickly and easily that they may need, and being able to understand them better so that you can craft your products and services to even meet their needs better. So yes, financing can take away some flexibility, but at the end of the day, a lot of small business flexibility is non financing related. You have to meet the covenants and you have to do a certain amount of business. So it's going to require you to make sure you're doing a certain amount in a period of time, but that's not necessarily going to keep you from being flexible in most situations. Yeah. Okay. So now with your coaching, I've grown my business. I've got procedures and processes in place, I got some financing, maybe things are going well. I'm starting to add people. I need to hire some people. And you say that changes the character of the business more than anything else. Tell us about that change and what happens to the business owner when you start hiring people? Well, hiring people, unfortunately, you can't just hire yourself. So whoever comes into your organization is going to have an impact on whoever's there. They're going to bring their personality, they're going to bring their work ethic, they're going to bring their skills and expertise, they're going to bring their historical work experience. All those things can affect your culture either positively or negatively. And one of the things I talked to a lot of business owners, especially when they're looking to grow, is you have to manage your culture, which is really how we do things here. So if you don't create and manage your culture, it's going to create itself, and that's not necessarily a good thing. So understanding that there is a certain culture. That you have to manage it to be able to grow your business without it changing too much. It's important to not hire too many people at the same time because you really want to bring people in and help them to understand the culture. How you do things. So that you have consistency ",timestamp:"00:35:23-00:39:02",topics:["Flexibility in Small Business"],type:"podcast",weight:4.290586471558082},{boost:0,date:1677054600,description:"Royalty issues in the NFT communities",episode_title:"The Chopping Block: The Inside Story of How Blur Toppled NFT Giant OpenSea - Ep. 459",guests:[{name:"Pacman Blur",profile_picture:"https://pbs.twimg.com/profile_images/1499571704753901569/wLAcCdsu_400x400.jpg",ref_id:"c042615e-905a-49af-8761-fa6fb1be4b8a",twitter_handle:"PacmanBlur"}],hosts:[{name:"Tarun Chitra",profile_picture:"https://pbs.twimg.com/profile_images/1587539091444432897/Z6_nmrCB_400x400.jpg",ref_id:"dfad4b23-92ff-4aa1-9aa4-abc1d54cd6d3",twitter_handle:"tarunchitra"},{name:"Haseeb Qureshi",profile_picture:"https://pbs.twimg.com/profile_images/1581025415551889408/thQwG4lb_400x400.jpg",ref_id:"790e4217-dd9f-416f-b9f8-ed596937f5b5",twitter_handle:"hosseeb"},{name:"Tom Schmidt",profile_picture:"https://pbs.twimg.com/profile_images/1563232354277085189/xQL92DR4_400x400.jpg",ref_id:"bc9d3bfd-36b0-4cbc-a491-9370decf4c99",twitter_handle:"tomhschmidt"},{name:"Robert Leshner",profile_picture:"https://pbs.twimg.com/profile_images/1587956987786104833/1SiKVj-s_400x400.jpg",ref_id:"ebaa2166-7982-423d-9f43-add89e7d47f9",twitter_handle:"rleshner"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/7de0d293-8ae3-4362-8500-8f7300f3fe41.jpg",keyword:!0,link:"https://pdrl.fm/98e0b1/traffic.megaphone.fm/LSHML7945807763.mp3?updated=1677011996",node_type:"clip",pub_key:"",ref_id:"6825363e-4733-4d3b-be8f-ef3a90b3549b",show_title:"Unchained",text:"even though you guys are trying to play nice, they're like, no, screw Blur, we're not going to take them off. I think a lot of people who are listening to this conversation, who are not very deep in NFTs, might be confused about why we keep talking about royalties. Royalties, royalties, royalties. It seems like royalties is like, at the heart of this big conflict between all the big marketplaces in NFTs. Maybe just to kind of build the intuition, why are royalties so fraud? Why are they so important? Why are people arguing about them? Because we're not talking about fees. Right? Fees are also another element of it, which is that OpenSea has the highest take rate of any of the NFT exchanges. But the big fight has been over royalties. Why do you think it is that royalties are this giant battleground? Yeah, I think a lot of it is path dependency, to be honest. The way the NFT culture started was PFPs, like larger collections. They weren't the norm. It was initially like one of one art, like small batch collections, and for like, one of one artists. This whole concept of royalties made a lot of sense because collectors of those collections, they have a very personal relationship with the art, and they have a personal relationship with the artists, and they'll oftentimes want to pay the royalty because they want to honor the artists and help sustain them. It's a really beautiful thing. PFP collections, as they got big, it kind of became the norm to still have the royalties, and it kind of became like the default way that a lot of these collections would monetize, not from like, a total monetary perspective, but from like, a cultural perspective. So, you know, if you look like yuga labs, for example, like, they make most of their money off of the mints, and actually a very small proportion of the money that they've made has been off of the royalties. But I think it just kind of became the norm for everyone to expect. When we looked at the market. It seemed rather suboptimal from from a value capture perspective for the collection creators, to be honest, because, you know, in in any sort of financial market, any increase in take rates results in a nonlinear decrease in trading volume. If you decrease the take rates, we can have significantly more trading volume. You can have tighter spreads, more liquidity. There's a lot of things, and then there's a lot of things that can only happen once you have more liquidity. And it felt to us like the space was kind of being held back by this norm that wasn't actually long term optimal, but it was the norm, because that's kind of how the space started effectively. That makes sense. Okay, so there's a lot of kind of cultural path dependence to how royalties played out and how they became such an important battleground, both symbolically, financially, and even emotionally, for why all these exchanges were fighting with each other over this concept of royalties and trying to enforce them on chain through blacklisting each other and doing all this other complicated stuff. You could argue that royalties were sort of like liquidity mining for artists, and that it attracted artists at a certain time in 2021 where you're basically arguing that they got this annuity that would be there perpetually, and that's why you should put your art in an NFT. And I think there's just some point at which it became an unreasonable subsidy relative to market friction. Also, by the way, has steve we all know this episode is your victory lap episode. We'll get to that. We'll get to that. Sorry. Go ahead, Tom. No, I totally agree. I think from my conversations with artists and galleries, a lot of them initially viewed digital art has been around for a while, but a lot of them viewed the attraction of NFPs as a reaching a bigger market, but also getting access to the secondaries. It was kind of sort of a very like semifamous moment where, like, not an artist, but Mark Cuban was talking about tokenizing, you know, cavs tickets and letting them trade on like an NFP exchange. Then someone was like, no, like, you don't you know, you can't enforce the royalties on chain. He's like, wait, what's the point of the tokenization then, if I don't get the secondary speed? And so it's like even somewhat sophisticated people sort of, sort of missed this point. Wait, we're recalling Mark Cuban who lost a lot of his money in iron finance. The sophisticated person here. Just checking. I'm trying to be kind. I'm trying to be kind on the pod today. So the other thing that always struck me as strange about this story about royalties, and again, I'm trying not to take too much of a victory laugh, because I did predict that this would happen. But the thing that also struck me as strange is that crypto in crypto, we find a way to tokenize almost everything. Pretty much anything that can be on chain, we find some way to break it down into tokens and trade it. But for some reason, people never did that to royalties. They never tokenized their royalty stream and then sold it to third parties. There were a few projects that did this here and there, but it wasn't widespread, it wasn't common. But this seems like the obvious way to understand what royalties are. When an artist ends up working with a music label, what they do is they end up basically selling off vast majority of their royalties to the label in order to basically get an upfront payment to allow them to go create art or whatever, and also take away most of their risk. If NFT artists had done this, what they would find is that actually, you can just sell this off for a lump sum payment and basically sell it. You could have sold it to the exchange in the first place. So there's nothing about even the nature of royalties that guarantees that they're structured as an annuity. If you just sold it off upfront, which you could in principle, then I think the norms would have been very different if, in fact, when royalties were created, that they were initially tokenized and most people would just sold them alongside the initial NFP mint. Yeah, I think it's very interesting. Ultimately, I think, especially on Twitter, what ends up happening is there's no nuance that's allowed in any of these conversations. And there's nuance at multiple levels. There's nuance in the types of NFPs, right? So like large PFPs like Azuki or Yuga, those are like venture backed companies, those are startups. And that's a very different beast than like a one of one artist that sells super rare and collector that's buying a bunch of art is very different than a retail user who is a newcomer, is very different than a trader who is going to be very price sensitive, is different than like a market maker. And now after our token launch, there are a lot more market makers in the space than there were before, which is something that's quite interesting, which is what we were hoping for ultimately. But basically there are all these different demographics and use cases and the conversation has only ever been a binary. Will you fully enforce royalties or not fully enforced royalties? And it's like the market has tried to apply a one size fits all solution to a market that is actually very segmented. So it was just very surprised. Not surprising, I think I'm not surprised anymore, but it was more so just, it was like, okay, this is going to be a short term noise effectively because the market will do what the market is going to do. This conversation can prevent it for a little bit, but the market is ultimately what's going to win out at the end of the day and you can't really stop the market forces. So it just seemed kind of like an inevitability, but it was a conversation that lasted for a lot longer than I think it needed to. And we could have focused on more productive conversations, but it wasn't able to just because of the lack of nuance. 100%. ",timestamp:"00:13:20-00:20:35",topics:["NFT Royalties","NFT collections"],type:"podcast",weight:40.09700499339939},{boost:0,date:1676083645,description:"The risk of Bitcoin's early ossification leading to challenges with self-custody in the future",episode_title:"BR023 - OP_VAULT for Bitcoin Covenants Panel ft. James O'Beirne, Rijndael, Antoine Poinsot & Carman",guests:[{name:"Carman",profile_picture:"https://pbs.twimg.com/profile_images/1609775498971725824/5vyAafE3_400x400.jpg",ref_id:"09405d70-6fa6-4f2c-92f1-a2951ad56447",twitter_handle:"benthecarman"},{name:"Antoine Poinsot",profile_picture:"https://pbs.twimg.com/profile_images/1108377445936316423/ArRDGbr5_400x400.jpg",ref_id:"1ba10809-b3e6-4e37-a906-697a0368b814",twitter_handle:"darosior"},{name:"Rijndael",profile_picture:"https://pbs.twimg.com/profile_images/1542705395873058817/0zsy4Yur_400x400.jpg",ref_id:"861d5324-8ede-4059-826f-f29abca5d7e6",twitter_handle:"rot13maxi"},{name:"James O'Beirne",profile_picture:"https://pbs.twimg.com/profile_images/1542173995650408450/iDxrdmuj_400x400.jpg",ref_id:"e8e48fcf-9e54-4c66-9b20-aacf5c5b504e",twitter_handle:"jamesob"}],hosts:[{name:"NVK",profile_picture:"https://pbs.twimg.com/profile_images/608402052247658497/ENDv0BNd_400x400.png",ref_id:"d754e29b-2d3e-4280-8d72-f41d2a465a78",twitter_handle:"Coinkite"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/f1879df9-9bc6-4a76-951f-24548da768ef.jpg",keyword:!0,link:"https://anchor.fm/s/9500fad8/podcast/play/64850866/https%253A%252F%252Fd3ctxlq1ktw2nl.cloudfront.net%252Fstaging%252F2023-1-11%252Fc53436f3-e1a6-2cae-eecb-fb61b06f804d.mp3",node_type:"clip",pub_key:"037f7331a5bef6c6f880246747befcc3767f3bb9730bc5e6f7c3770f4184ed0bff",ref_id:"2a01dc8c-19f7-47a8-bfa8-92645a7314c0",show_title:"Bitcoin.Review Podcast with NVK & Guests",text:"super effective. But see, here's the thing. As bitcoin grows, right, and we have more people with their bags depending on it, the more you're going to have screech, that's a feature, right? You want this to be progressively become more immutable even as a feature set. So I think we're still in a place where a few things could get in. But I don't think we're far from a true ossification of new features. Unless people come up with some more clever way of testing them out on main chain, I don't see how this gets much easier. I just think it's just to spice up the conversation and throw in some opposition. I think the counterpoint to that is that I'm really worried about some future where Bitcoin the scale of Bitcoin is limited to what we have today and it becomes this gold like asset where as a regular person, as a non institution, you can't actually take custody of your bitcoin. I just think that's a failure mode because at that point it's just like maybe a slightly better gold that develops a paper market, gets captured by governments to some extent rehypothecated all that stuff. Yeah, I mean, can we just recognize that gold lost it had to have 5000 year run, right? And it's an element, it is a fucking universe element. It conducts electricity really well. I mean just like this thing lost an element lost, right to human ingenuity. Right? The MMT guys are smart as fuck, right? And they will find a way to try to gain bitcoin. FTX was a Fiat maxi attack on bitcoin. They inflated the bitcoin supply by what, 20% for the epoch. It's crazy. It's absolutely crazy. And bitcoin not inflating is the whole fucking point. We're going to have to create defenses against Fiat attacks. It's not going to be the guy using the back door or an ECDSA. Extremely unlikely, right? Like it's going to be like how they, they capture, you know, 60% of the bitcoin custody and coinbase and then they start inflating that. Exactly. Because, look, changes that happen to bitcoin consensus are in the open. You can look at the code and you can judge it for yourself. So if someone comes along and tries to change the supply schedule or the inflation rate, that's obvious. And that's not going to be a very effective attack on bitcoin for that reason. It's going to be exactly what you're describing. It's going to be on these higher layers on the Fiat, on and off ramps. If they want to antagonize bitcoin, hiring an open source developer to go and try and sneak some change in is going to be totally effective. Operation Orchestra is in full effect. Right, let's waste everybody's time with stupid shit, but think about the whole game that just happened against bitcoin, right? Total price Suppression coordinated or uncoordinated. So you have the Fiat Max is doing and come on state backed like FTX, right, like inflating the supply. And then you have CME adding all the possible ways for you to short bitcoin and then they don't give us a Spot ETF to call his motherfuckers up. Right. And bitcoin is extremely illiquid, right? You have Spot, you have 10% of all bitcoin supply available on Spot. So you can't call their bullshit. If you just think about that for a second, it's like, holy shit. And this is not even how far these guys can go. This is a Sunday play for them. Right? Absolutely. It's also today, it's something like only 10% of all bitcoin is custody done on these institutions. It gets worse without Ball, so you can't reasonably custody lots of bitcoin safely. It's going to move more and more and more on the coin base and it becomes like an even easier attack. And what's the natural market response like, oh, well, I can't actually move my bitcoin because it's too expensive, because it's like locked up with 50 HSMs. So instead what I'm going to do is I'm going to transfer a paper claim on my bitcoin, which is custody at this institutional custody solution. And then you just start rehypothecating bitcoin. Well, that's exactly what happened to Gold. Bingo. But MVK, to go back to your point, it is vitally important that we maintain this culture of not changing the premises of bitcoin, not changing the property rights. And so people have to develop the ability to distinguish changes that are even remotely close to challenging that versus these gardening changes, where it's like, yeah, you can completely understand this feature. It's not going anywhere near the viability of the system or the premises. Bitcoin is like America, and America relies on the founding documents, the frameworks that are tangible, but it also relies on the cultural ethos of pushing back on ambiguous situations that challenge the premises of the system. So I totally believe we need people out there who are skeptical, but you need to have the wisdom to be able to differentiate between things that are going to help the system versus things that challenge its premises. Yeah. I mean, one of the longest running debates in Bitcoin, which is like I think one of the juicier debates is, should bitcoin be money or should it be smart contract fuel? Right? And I think that anytime somebody tries to introduce a change that allows for more expressibility of script or allows for more novel pagan mechanisms or whatever, one of the pushbacks is, okay, well, Bitcoin isn't for arbitrary program execution. It's for money. Hopefully, the thing that people can distinguish is that a vault or something like it is doubling down on custody. Right. It's making the money part better. Right? Yeah. My rule of thumb for Bitcoin sort of like very grug brain sort of framework is every single Bitcoin feature serves at the store of value. Pleasure. That's the king. Right? Anything else you add in Bitcoin is for that bitcoin having uncensored transactions. It's because we doubt that you don't have a store of value, right, because somebody can just make you not spend or take it from you or block you. So some privacy is for that, so that you have the privacy to transact your store of value, so you protect the store of value. Right? So every single change and every single thing that I see people trying to add to it, does it really fit that box? And it's a small box. I think that was one of the original sins of the CTV sort of frame narrative. It was, like, sort of unleashing this galaxy brain into sort of like, look at all the cliches they can do. Oh, my God, this is amazing. Right? That doesn't really help with store of value, so go fuck yourself kind of thing, right? And I think that if we can just help people who may be on the fence or who may be against this proposal, for example, just understand that this does fit that small box. It's in the name, and this thing is to help you hold your coins and have property over your coins and not be capturable. Right? I think this would move sort of, like fairly fast and fairly straightforward. And if we have more criticism, that is, like, completely stupid and retarded addressed is even better, too, right? We need to get things that are completely absurd addressed and raised, even by us. It's like, oh, what if shot 256 is broken. Well, I mean, airplanes fall from the sky. Everybody can understand that. So 51% attack every all time high, it comes back to bitcoin, right? It's not like that. You have to have this sort of very attainable china. You have to have this very attainable, very drug brain explanations of things, because my pocket doesn't care about how complex and cool bitcoin is. I don't want to have to think too deeply about these concerns with my money. And I feel like you've been doing a very good job. From the things I've read and sort of seen about up vault, I guess that's where I wanted to do with this episode. It's, like, sort of like address it, see if we can pursue some paths here, reflect ",timestamp:"01:42:14-01:50:45",topics:["Bitcoin ossification"],type:"podcast",weight:35.73467097580786},{boost:0,date:1663791655,description:"Software update: Blockclock",episode_title:"BR006 - BestBuy stocks HW, Podcasting 2.0, COLDCARD, ETH Merge, ATEC608A, Mullvad VPN hardware & MORE ft. Odell, Bitsten & Pierre Rochard",guests:[{name:"Pierre Rochard",profile_picture:"https://pbs.twimg.com/profile_images/1567258180861792256/EEEBkvQR_400x400.jpg",ref_id:"426b30ba-7c24-4558-b926-ec307756a876",twitter_handle:"BitcoinPierre"},{name:"Matt Odell",profile_picture:"https://pbs.twimg.com/profile_images/1421584695746338819/Z_7ZfAeP_400x400.jpg",ref_id:"4f2825ff-3b88-4595-84d4-36e81544b79a",twitter_handle:"ODELL"},{name:"Micheal Goldstein",profile_picture:"https://pbs.twimg.com/profile_images/1362578436665995266/yssI-4C__400x400.jpg",ref_id:"1d5697ef-ac55-4685-9ee1-80d8d7c6c501",twitter_handle:"bitstein"}],hosts:[{name:"NVK",profile_picture:"https://pbs.twimg.com/profile_images/608402052247658497/ENDv0BNd_400x400.png",ref_id:"d754e29b-2d3e-4280-8d72-f41d2a465a78",twitter_handle:"Coinkite"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/cd6b8d64-bd52-4f1e-86b3-ca8ba2eb169f.jpg",keyword:!0,link:"https://anchor.fm/s/9500fad8/podcast/play/57914686/https%253A%252F%252Fd3ctxlq1ktw2nl.cloudfront.net%252Fstaging%252F2022-8-22%252F6271b859-79c4-08f7-d185-5b9264f98cfe.mp3",node_type:"clip",pub_key:"",ref_id:"6f6860cf-08b2-4c3c-96e8-dc9ef8474b37",show_title:"Bitcoin.Review",text:"All right, next block clock 1.2.0 was released yesterday. It's a small release now, the micro, it's the same binary for both, which is kind of cool. So we now support the block lock micro. And there is a new version for the mini. Wait, let's see that again. It's fucking tiny. Yeah, it's just like the bitcoin price right now. Fucking tiny. You don't need to update your block lock mini. This update is kind of optional. Not much for it. It just wanted to consolidate to a single binary so there is less stuff to be reviewed. ",timestamp:"00:12:43-00:13:27",topics:["Blockclock"],type:"podcast",weight:4.302981214595846},{boost:0,date:1673187067,description:"Nuclear Bitcoiner's background and his work in Canadian Nuclear Labs",episode_title:"@NuclearBitcoinr - Mining #bitcoin With Small Modular Nuclear Reactors. #313",guests:[{name:"Nuclear Bitcoiner",profile_picture:"https://pbs.twimg.com/profile_images/1443185278525579278/_Yl1nao1_400x400.jpg",ref_id:"60f5891f-0864-4ed4-987a-81da4768b3ba",twitter_handle:"nuclearbitcoinr"}],hosts:[{name:"Daniel Prince",profile_picture:"https://pbs.twimg.com/profile_images/1589940494364205056/rnHs5gI3_400x400.jpg",ref_id:"df2d4d35-3e96-44ed-b1cc-cb8a714bbe30",twitter_handle:"PrinceySOV"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/e1eca67b-d372-4031-bf1f-8f0ff7fe6092.jpg",keyword:!0,link:"https://anchor.fm/s/1346f9e8/podcast/play/63208295/https%253A%252F%252Fd3ctxlq1ktw2nl.cloudfront.net%252Fstaging%252F2023-0-8%252F4a07b2fe-eb1d-2c82-677e-8f2808a09536.mp3",node_type:"clip",pub_key:"02545c14cbb18a61f20dd45f5e3dcbd9acae3de282369501040adce32a75311309",ref_id:"a1ba314f-1a9e-432e-9350-d3b085c5c4d6",show_title:`Once Bitten! +Your pubkey will be submitted with your clip, and any boosts your clip receives will go to you!`, + infoMessageSource = + 'If you come across a source that produces ongoing content (e.g. a twitter account, youtube channel, etc). You can add it to the source table for your graph. Once the source is added to the table we will gather new content produced by that source, process it, and add it to your graph.', + notify$1 = (tt) => { + toast(jsxRuntimeExports.jsx(ToastMessage, { message: tt }), { + icon: + tt === NODE_ADD_SUCCESS + ? jsxRuntimeExports.jsx(MdCheckCircle, { color: colors.primaryGreen }) + : jsxRuntimeExports.jsx(MdWarning, { color: colors.primaryRed }), + position: toast.POSITION.BOTTOM_CENTER, + type: tt === NODE_ADD_SUCCESS ? 'success' : 'error', + }) + }, + handleSubmit = async (tt, et, nt, rt, it) => { + var lt + const ot = {} + if (nt === LINK) + (ot.media_url = tt.link), + tt.withTimeStamps + ? ((ot.content_type = 'clip'), + (ot.job_response = { + tags: [ + { + description: tt.description, + 'end-time': timeToMilliseconds(tt.endTime), + 'start-time': timeToMilliseconds(tt.startTime), + tag: (lt = tt.tags) == null ? void 0 : lt.join(', '), + }, + ], + })) + : tt.withLocation + ? ((ot.latitude = tt.latitude), (ot.longitude = tt.longitude)) + : ot.content_type + else if (nt === TWITTER_SOURCE) { + const ct = /(?:https?:\/\/)?(?:www\.)?twitter\.com\/\w+\/status\/\d+/, + ut = /^[0-9]{16,}$/ + if (ct.test(tt.tweet)) { + const ht = /\/status\/(\d+)/, + dt = tt.tweet.match(ht) + if (dt != null && dt[1]) { + const [, pt] = dt + ot.tweet_id = pt + } + } else ot.tweet_id = tt.tweet + if (!ut.test(ot.tweet_id)) return + tt.withLocation && ((ot.latitude = tt.latitude), (ot.longitude = tt.longitude)), (ot.content_type = 'tweet') + } else + nt === WEB_PAGE + ? ((ot.content_type = 'webpage'), (ot.web_page = tt.web_page)) + : nt === DOCUMENT + ? ((ot.content_type = 'document'), (ot.text = tt.document)) + : ((ot.source_type = nt), + nt === TWITTER_HANDLE ? (ot.source = (tt.source || '').replace(/[@]/g, '')) : (ot.source = tt.source)) + let at = '' + await executeIfProd(async () => { + const ct = await distExports$1.enable() + ;(ot.pubkey = ct == null ? void 0 : ct.pubkey), (at = await getLSat()) + }) + const st = CONTENT_TYPES.includes(nt) ? 'add_node' : 'radar' + try { + const ct = await api.post(`/${st}`, JSON.stringify(ot), { Authorization: at }) + if (ct.error) { + const { message: ut } = ct.error + throw new Error(ut) + } + st === 'radar' && (await rt()), notify$1(NODE_ADD_SUCCESS), et() + } catch (ct) { + if (ct.status === 402) { + const ut = distExports.Lsat.fromHeader(ct.headers.get('www-authenticate')) + await payLsat(ut), await updateBudget(it), await handleSubmit(tt, et, nt, rt, it) + } + ct instanceof Error && (notify$1(NODE_ADD_ERROR), et()) + } + }, + CONTENT_TYPE_OPTIONS = { + content: { + [LINK]: { component: SourceUrl, label: 'Youtube / Twitter space / Mp3' }, + [TWITTER_SOURCE]: { component: TwitId, label: 'Tweet' }, + [WEB_PAGE]: { component: WebPage, label: 'Webpage (Text)' }, + [DOCUMENT]: { component: Document, label: 'Document' }, + }, + source: { + [GITHUB_REPOSITORY]: { component: GithubRepository, label: 'Github repository' }, + [RSS]: { component: RSSFeed, label: 'RSS feed' }, + [TOPIC]: { component: Topic$1, label: 'Topic' }, + [TWITTER_HANDLE]: { component: TwitterHandle$2, label: 'Twitter handle' }, + [YOUTUBE_CHANNEL]: { component: YoutubeChannel, label: 'Youtube channel' }, + }, + }, + CONTENT_TYPES = Object.keys(CONTENT_TYPE_OPTIONS.content), + AddNodeModal = () => { + const { close: tt, addNodeModalData: et } = useModal('addNode'), + [nt, rt] = reactExports.useState(''), + it = useDataStore((St) => St.setSources), + [ot] = useUserStore((St) => [St.setBudget]), + at = et ? CONTENT_TYPE_OPTIONS[et] : null, + st = et === 'source' ? infoMessageSource : infoMessageContent, + lt = useForm({ mode: 'onSubmit' }), + { reset: ct, watch: ut, setValue: ht } = lt, + { isSubmitting: dt } = lt.formState, + pt = () => { + rt(''), ct(), tt() + }, + mt = async () => { + if ([TWITTER_HANDLE, TOPIC].includes(nt)) + try { + const St = await getRadarData() + it(St.data) + } catch (St) { + console.warn(St) + } + }, + gt = lt.handleSubmit(async (St) => { + await handleSubmit(St, pt, nt, mt, ot) + }), + yt = at ? Object.keys(at).map((St) => ({ label: at[St].label, value: St })) : [], + bt = nt ? [{ label: nt, value: nt }] : [], + vt = ut('startTime'), + xt = nt && at ? at[nt].component : () => null, + kt = { setValue: ht, startTime: vt } + return ( + at && + jsxRuntimeExports.jsx(BaseModal, { + id: 'addNode', + preventOutsideClose: !0, + children: jsxRuntimeExports.jsx(FormProvider, { + ...lt, + children: jsxRuntimeExports.jsx('form', { + id: 'add-node-form', + onSubmit: gt, + children: jsxRuntimeExports.jsxs(Wrapper$o, { + children: [ + jsxRuntimeExports.jsxs(Flex, { + align: 'center', + direction: 'row', + justify: 'space-between', + pb: 32, + children: [ + jsxRuntimeExports.jsxs(Flex, { + align: 'center', + direction: 'row', + children: [ + jsxRuntimeExports.jsxs(Flex, { + align: 'center', + direction: 'row', + children: [ + nt && + jsxRuntimeExports.jsx(BackButton, { + onClick: () => rt(''), + children: jsxRuntimeExports.jsx(MdKeyboardBackspace, { + color: colors.white, + size: 24, + }), + }), + jsxRuntimeExports.jsxs(Text$3, { kind: 'bigHeadingBold', children: ['Add ', et] }), + ], + }), + jsxRuntimeExports.jsxs(InfoIcon, { + role: 'tooltip', + tabIndex: 0, + children: [ + jsxRuntimeExports.jsx(MdInfo, {}), + jsxRuntimeExports.jsx('div', { className: 'tooltip', children: st }), + ], + }), + ], + }), + jsxRuntimeExports.jsx(CloseButton$5, { + id: 'add-node-close-button', + onClick: pt, + onKeyDown: (St) => { + ;(St.key === 'Enter' || St.key === 'Space') && pt() + }, + role: 'button', + tabIndex: 0, + children: jsxRuntimeExports.jsx(MdClose, { color: 'white' }), + }), + ], + }), + nt + ? jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { + children: [ + jsxRuntimeExports.jsx(Flex, { children: jsxRuntimeExports.jsx(xt, { ...kt }) }), + jsxRuntimeExports.jsx(Flex, { + pt: 16, + px: 4, + tabIndex: 0, + children: jsxRuntimeExports.jsx(Text$3, { + color: 'lightGray', + kind: 'tinyBold', + children: + 'Your pubkey will be submitted with your input, so you can receive sats that your content earns.', + }), + }), + jsxRuntimeExports.jsx(Flex, { + pt: 8, + children: dt + ? jsxRuntimeExports.jsx(SubmitLoader$1, { + children: jsxRuntimeExports.jsx(ClipLoader$2, { color: colors.white, size: 20 }), + }) + : jsxRuntimeExports.jsx(Button, { + disabled: dt, + id: 'add-node-submit-cta', + kind: 'big', + type: 'submit', + children: `Add ${et}`, + }), + }), + ], + }) + : jsxRuntimeExports.jsxs(Stack$5, { + alignItems: { xs: 'stretch', sm: 'flex-start', minHeight: '160px' }, + component: 'div', + direction: { xs: 'column', sm: 'row' }, + justifyContent: 'space-between', + spacing: 2, + children: [ + jsxRuntimeExports.jsx(Flex, { + children: jsxRuntimeExports.jsx(Text$3, { + kind: 'mediumBold', + children: 'What do you want to add?', + }), + }), + jsxRuntimeExports.jsx(Flex, { + grow: 1, + children: jsxRuntimeExports.jsx(StyledSelect$1, { + className: clsx$1(bt.length && 'hasSelected', 'cy-select-content-type'), + clearable: !0, + onChange: (St) => { + rt(St.length ? St[0].value : '') + }, + options: yt, + placeholder: `Select ${et} type`, + searchable: !1, + values: bt, + }), + }), + ], + }), + ], + }), + }), + }), + }) + ) + }, + CloseButton$5 = styled$4(Flex)` + cursor: pointer; -A Bitcoin Podcast. -`,text:"how did that kind of come to be? Was that just following your nose when you were going through the education system? Like, I enjoy being in the lab and want to carry on this kind of field of investigative kind of scientific work. Well, basically I played into my strengths in high school was math, chemistry, physics. And then I probably had the intellect that I could have gone on and done something like a full on engineering, but I was not mature enough at the time to pursue that and would have, may or may not have been successful. So I went into the college technical trade route and became a chemical technologist. Basically, I learned how to do lots of just laboratory technical stuff and operate instruments that do the heavy lifting. And then I had a few jobs in the industry in Ontario. And then ultimately, after my most recent layoff, before I started working at Canadian Nuclear Labs, I had a year long period where I was unemployed. And then I just kept throwing resumes out to everywhere that had good work prospects for chemical technologists. And getting into the nuclear field is a pretty good space to see the wider landscape of just like the whole energy systems as a whole, because here we do a lot more than just, like, nuclear research. We do energy storage research, hydrogen research, electrical engineering type of stuff. So there's a pretty wide spectrum. And now we're even getting in on fusion, which was announced that CNL is collaborating with Fusion company before that big announcement, what was it, yesterday or two days ago, that some fusion company in the United States had just successfully created more power from a fusion reaction than they had previously. So that's another project that's being collaborated on here at Canadian Nuclear Labs. Lots of cool stuff Canadian Nuclear labs do. What exactly? What's the kind of remit you have there? It's essentially like the equivalent of the national laboratories. Like the United States has, like the Argonne National Labs. And what is it? The Idaho National Lab. There's six or seven in the United States, but this is Canada's equivalent, where we do the big research and it supports the wider industry. And we're also going to be building what is likely going to be the first small modular reactor in Canada. It's going to be the first demonstration unit for this type of reactor. Well, then there's several other ones that are going to be built at various other sites. And that's a project that Canada is very excited to move forward on with leveraging our existing nuclear power infrastructure, like right from mining to fuel fabrication and reactor design and construction. We've got everything from mining to the decommissioning and waste processing. All right, okay. ",timestamp:"00:10:29-00:13:41",topics:["Nuclear Bitcoiner","technologists"],type:"podcast",weight:17.283954599942344},{boost:0,date:0,description:"What might the information age do to income distribution?",episode_title:"The Sovereign Individual - The End of Egalitarian Economics",guests:[{name:"chriskapilla",profile_picture:"https://pbs.twimg.com/profile_images/1362817539135463427/2AXUeFLV_400x400.jpg",ref_id:"9d495790-93f2-4d6c-b770-b2885f66859d",twitter_handle:"chriskapilla"},{name:"remydenton",profile_picture:"",ref_id:"5c5beb0c-c214-4f23-b79a-e71bf9368f2d",twitter_handle:""},{name:"JackRonaldi",profile_picture:"https://pbs.twimg.com/profile_images/1583261828628496384/IazkwYjk_400x400.jpg",ref_id:"01621476-f040-49dd-8160-4035228faf78",twitter_handle:"JackRonaldi"},{name:"AlistairZ80Aftw",profile_picture:"https://pbs.twimg.com/profile_images/1362882489895841795/gH2zix3l_400x400.jpg",ref_id:"3dcba197-47ca-40c0-857d-73cec4325801",twitter_handle:"AlistairZ80Aftw"},{name:"mattonbtc",profile_picture:"https://pbs.twimg.com/profile_images/1549459254280687618/jzdHJou3_400x400.jpg",ref_id:"998167d3-e036-4ef1-9a05-4f062903f0c5",twitter_handle:"mattonbtc"},{name:"wai_wairua",profile_picture:"https://pbs.twimg.com/profile_images/1536570699761848320/T10Owc60_400x400.jpg",ref_id:"c4d4ff36-73fa-4471-91ba-de0f99a49e99",twitter_handle:"wai_wairua"},{name:"UltraSolomon",profile_picture:"https://pbs.twimg.com/profile_images/1468332451055427601/YVgUuUHc_400x400.jpg",ref_id:"6371d519-cc98-4bf4-9f82-be17b1ea532a",twitter_handle:"UltraSolomon"}],hosts:[{name:"BTC_Venetians",profile_picture:"https://pbs.twimg.com/profile_images/1557482467539521537/Kel-eVww_400x400.jpg",ref_id:"a6313ca9-3869-4477-88ad-30172957edcf",twitter_handle:"BTC_Venetians"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/75ec86b1-cb6d-467f-a66e-5e642e5c126a.jpg",keyword:!0,link:"https://stakwork-uploads.s3.amazonaws.com/uploads/customers/2707/media_to_local/c8cc9ec1-061d-4f53-a24b-ee43a56c7715/e650057e-2369-4e75-8119-4975a1fc4cac.mp3",node_type:"clip",pub_key:"03eb026c3e6597055595e42299377a4e164982775cc67f1d2135d9f1cd3a89f526",ref_id:"c7542511-7354-423c-b6e0-8c0349d5a511",show_title:"Bitcoin Venetians Book Club",text:"so next question is what might the information age do to income distribution? I was wondering on this, I haven't really thought it through properly, and some people might have more experience in reality on this. Can somebody in the Congo really fire up a laptop and get the same way to someone in Silicon Valley? Is that currently possible or does the market arbitrage that fact? And because you're putting it to a broad swath, it's more competitive and actually has a downward pressure on that bouncy or that price that might be paid. If he's working remotely, he'll be able to save money because it doesn't matter where he is except if he's a gamer. If he's a gamer, he needs low latency and the Congo will be no good for it. There's also a funny part of this, which is that currently somebody who can potentially do the exact same job in the Congo or even Eastern Europe, for example, will earn less money than somebody who's doing that job in Western Europe or the US. Some extent, I think part of that could be there are sort of cultural soft skills that go into a job that are important, but it also might be just a timeline thing like that. It takes enough time and enough progress on this sort of technical evolution of having these geographic walls broken down for that to play out, and for a software developer in the middle of the Congo to be exactly equal to a software developer in Silicon Valley. I don't think that I think, in. Terms of the book, the guy in the Congo is not necessarily a local. He's one of our locals, if you like. He's on holiday or a protracted holiday, or maybe he's moved there. I don't think that setting up equal payment is really that relevant at this point. The big change was there was some capability at all. I remember back in the Ox working as a consultant and then looking into subcontracting out to people in Asia. They'd be getting much less than I would be, but they'd be getting something, and it'd be so much more than they could get any other way, that it was a big step up for them. And maybe over time, you've got an algorithmic coming together of the two different prices, but initially there's going to be a gap. But I don't think that gap really matters to those people because of such a greater opportunity than it was before. You know what I thought of, actually this question was, even within the US, in, say, the same company, they will offer a different salary. If you live in Silicon Valley versus, I don't know, Montana or something, doing the exact same job, if you were to move from one of those cities or locations to another within the same country, they would change the amount of money they're paying you, which is kind of hilarious, but I'm not sure what clearly, there's some force going on there. I don't know if it's just like, habit or go ahead, Chris. London waiting has been around at least the last 30 years. Whatever job you did, if you did it in London, you would get paid more for being in London than you would if you were doing the same job elsewhere in England. I think the Silicon Valley thing, as much as it seems ridiculous, isn't really ridiculous just because the living expenses being there requires a higher salary. Right. So it makes sense from the employee's perspective, but from the company's perspective, shouldn't. They. For the exact same amount of skills? If you can pay somebody less, why would you not do that? Well, from a company point of view, you're probably paying more, so you can bring them in and dress them down when they do wrong. That's a good point. I think companies are as a result of the pandemic and working from home, companies are more much more comfortable than with people working. Twitter has required everybody to go into the office, haven't they? So I wonder whether there's something to be said there that their wage bill is going to go up, even though they've got rid of loads of people. Michael Sailor said once, I think it might have been with some podcast, he was saying at MicroStrategy, he told people that if they didn't come into the office, they're gone. But then he learned through the pandemic that that was actually kind of stupid and he changed his policy. I suppose the discussions kind of seem to be around whether there's intrinsic value to an employer having the employee there or not. And I think that's currently playing out in real time because everyone was talking about the new way of working. But I know in my own circles, my own business circles, everyone who could recall employees since has. So I don't know if that's got to do with Micromanagement or anything, or perhaps some business models are better having people there than not. It's probably one of those kind of middle ground things. But, yeah, even in New Zealand, like in our major city, Auckland, people will get paid significantly more to work there. And part of that is because it's factored into it's so much more expensive to live there. It's an interesting question. Got a new speaker, it looks like. Solomon, do you want to share your thoughts? Yeah, I just wanted to share my thoughts on the London situation. So I live and work in London, and in the business that I work in, I get paid a lot more money to be in London than I would be if I was in another city like Manchester or Birmingham or anything. And to my understanding, the way all works out is it all balances out in the end, because in London, they get so much more business. Like the company I work for, most of the people come from the Middle East and you just wouldn't get that business anywhere else at that level of volume as well. So it all balances out, it's just levels, isn't it? Like if you're in a small town, there's less customers. Yes, the cost of living is lower, but everything is the same in terms of percentages of ratios. Do you get what I'm saying? So that's how I look at it. They worked out salaries and costs to get there. Wherever you are in the country, the two end up being the same. So you can live in York, but you're going to pay the same as because you're traveling all the way down to London. Absolutely right. Nobody wants to leave London to go Birmingham or Exeter or somewhere to do work. So, Solomon, in your industry, maybe you can tell us what that is. Is there still a distinct advantage to in person, face to face sort of physical meetings, rather than, could the whole thing just be done online? In which case it would make more sense for people to live in cheaper areas and get paid less? You could never do it online. The business that I'm in, maybe some of the KYC stuff, maybe, but not the whole business. The whole business has to be face to face and the staff have to come in. Yeah, like in my own experience sorry, go ahead. I was just going to ask in some far off future, if you could put on a VR headset and there's a robot in London and you're outside of it and you could just using our imaginations, do the same job, is there still an intrinsic arbitrage there or not? In terms of salary? That's a question for you, Sullivan. Was that question for me? What was the question? It was quite yeah. Let's just say that in the future, using our imaginations, we find a way around you needing to be physically in your job in London and you moved outside. I don't know if it's VR sets in, the robot, just to say we found a way around it. Do you still think that there would be a difference in the wage or not? Actually I've actually said something similar, but I've always said that the transportation system across the UK needs to be better so that people can come from, let's say, Manchester or Wolverhampton to London in a very short period of time with like some super high speed rail and that kind of allows people to live outside of London. It also gets rid of the crowding at the same time. It might make the house prices go up across the country, but it all averages out so that you don't have like, what is it, 9 million people in one sea? That's what I think is advantageous. As for using VR and headsets and stuff and alternative reality, I can't even get my head around that. I think it's all about transportation, making sure that you can get across England really quickly and that will be amazing. But I don't think the transportation system is incentivized to do that because it seems to be quite unionized. That's my understanding. Maybe people can correct me on that. That's an interesting point because what I was going to say is during COVID I started a new job during COVID and I hadn't met my coworkers until maybe like a year and a half in. And while we got along meeting virtually or video, it wasn't really until we got to meet in person that we became kind of like we started clicking, I would say, as a team and Gelling and I think it's like human interactions. You do need to be kind of face to face to build those relationships and to build that trust. It's much harder when there's like a screen in between and I don't know, maybe at some point in the future VR can kind of mimic that somehow, but I don't really see that on the horizon anytime soon. To your point, Solomon, it seems like transportation being quick would be the best way to overcome that because like let's say people do want to live in different places and be a dispersed population. Like, if you could I think the hyperloop I believe it was something like you could go from New York to Hong Kong in 90 minutes. If you could do that kind of commute halfway around the world that quickly, then people could live anywhere and they could kind of just come in and meet when they need to and work from home the rest of the time. Yeah, that would be an absolute dream if that happened. That would be an absolute dream. One of the things I missed for not living in London now that I'm living far out on the east coast is that when the nights draw in, which is early. If you want a bus and it turns out once an hour, you've got to use a torch to wave it down. You can't just stand there with your arm. ",timestamp:"00:42:09-00:54:26",topics:["Income Distribution","Information Age"],type:"twitter_space",weight:4.247717380523682},{boost:0,date:1639803600,description:"[[Bitcoin [[Bull Market]] Prediction",episode_title:"WHY ARE WE BULLISH Michael Schmidt Jeff Ross Joseph Brown Greg Foss ep224",guests:[{name:"Greg Foss",profile_picture:"https://pbs.twimg.com/profile_images/1552599670945464320/3OgqRHNo_400x400.jpg",ref_id:"853d9f80-f6cf-490f-9d1e-f29cdc6acc6f",twitter_handle:"FossGregfoss"},{name:"Jeff Ross",profile_picture:"https://pbs.twimg.com/profile_images/1475554600094552064/DSlPG1lx_400x400.jpg",ref_id:"ae6ee2a2-1cf7-41a0-8366-ff6e94a6403c",twitter_handle:"VailshireCap"},{name:"Joseph Brown",profile_picture:"",ref_id:"803206b6-7b9f-48e0-a5d5-7348f6842cca",twitter_handle:""},{name:"Michael Schmidt",profile_picture:"",ref_id:"e94a106d-cbea-4b30-b0cb-3825979179ca",twitter_handle:""}],hosts:[],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/728d91e9-025d-43a7-8467-2c8d264ddf59.jpg",keyword:!0,link:"https://anchor.fm/s/11e95d20/podcast/play/45019495/https%3A%2F%2Fd3ctxlq1ktw2nl.cloudfront.net%2Fstaging%2F2021-11-18%2Fe04d11e7-ede5-a987-e943-f3fc2482fe80.mp3",node_type:"clip",pub_key:"",ref_id:"a03e4374-8b17-4875-93ff-3410295eaae1",show_title:"BTC Sessions",text:"It's interesting because there were so many people that thought before the end of the calendar year, we were going to get that parabola that blow off top. And historically, we've only got 2013 and 2017 to look for. So November and then December to have a Bull market run into a second calendar year would be the most Bitcoin fuck you thing ever, because it's like the opposite of what the majority like right now. You have like, obviously there's like the whole Plan B stock to flow thing, and everybody that hated that idea, like, dancing on its grave and all that kind of stuff. And I'm not vouching for stock flow or anything, but I'm just saying that the sentiment that I've seen other than, like, hardcore Bitcoin is pretty muted to bearish at the end of a bold year. And historically, we haven't really seen that yet. So it would be just so poetically Bitcoin to see like a blow off top in, like, spring. It would be hilarious. Yeah. I basically projected out to some time at the beginning, like very, very late February to very, very early April for this market cycle. And here if we do start to resume upward 70 $80,000 and higher, you're going to hear the drumbeat of the super cycle really starting to take hold, especially in people who are very new to Bitcoin. And I don't buy into the service cycle yet. Let's say you're right. Let's say that we're getting longer Bull runs and then shorter bear markets. But like equally violent, the super cycle happens when the length of the bear run extends beyond the four you're having. Right. Like that's the true supercycle, I imagine. Yeah. So eventually those so if you draw a line through the Bull market tops in terms of blocks and the bear market bottoms, you actually get lines that are both going to the right. But the bear market is going to the right slower than the one than the Bull market. So those do eventually converge, which I mean, before that, you probably just get such small differences between Bull and bear markets that you don't really get much at all, especially as the market starts to price that in. Yeah. And then I was also tripped up a little bit because the central bank expanded their balance sheet like crazy after the repo market blew up. But only half of the money actually has made its way into the economy yet. Right. I don't think people can really even conceptualize that. Well, what that even means because that means like another 25% up in stocks in like half a year. I don't know if you guys have seen Joseph Wang, the Fed guy, he put a chart out basically showing how the money flowed into the real economy. Half of it went into the real economy from the Fed, but the other half went into the TGA and then into the reverse repo and is now, I would assume, going to make its way into the real economy. Damn. Okay. Well, I'll open it up to Jeff. Joe, thoughts, do you prescribe to anything around, like having impact on price? Are you cynical of that kind of thing? What's your general thoughts on what we're talking about here? I'll ",timestamp:"01:07:54-01:12:11",topics:["bull market"],type:"podcast",weight:4.226754200646043},{boost:0,date:1662010885,description:"How Sparrow wallet improving UX for Bitcoin client software",episode_title:"BR005 - Bitcoin Wallet Experts Roundtable ft. Odell, Bitstein & Pierre Rochard",guests:[{name:"Charles Guillemet",profile_picture:"https://pbs.twimg.com/profile_images/1363770113162379265/7S1mRttg_400x400.jpg",ref_id:"c726ddde-836d-4f6c-9b6e-bb9e4d9365a7",twitter_handle:"P3b7_"},{name:"Matt Odell",profile_picture:"https://pbs.twimg.com/profile_images/1421584695746338819/Z_7ZfAeP_400x400.jpg",ref_id:"4f2825ff-3b88-4595-84d4-36e81544b79a",twitter_handle:"ODELL"},{name:"Graig Raw",profile_picture:"https://pbs.twimg.com/profile_images/1362841242665631745/UtA3FBQU_400x400.jpg",ref_id:"66fade84-61db-4cb1-b4a9-b759e285eb82",twitter_handle:"craigraw"},{name:"Lazy Ninja",profile_picture:"https://pbs.twimg.com/profile_images/1362843002318721028/PNKWuu0-_400x400.jpg",ref_id:"f855515d-75c4-4287-9a3d-e45d7ac25ddf",twitter_handle:"FreedomIsntSafe"}],hosts:[{name:"NVK",profile_picture:"https://pbs.twimg.com/profile_images/608402052247658497/ENDv0BNd_400x400.png",ref_id:"d754e29b-2d3e-4280-8d72-f41d2a465a78",twitter_handle:"Coinkite"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/cd6b8d64-bd52-4f1e-86b3-ca8ba2eb169f.jpg",keyword:!0,link:"https://anchor.fm/s/9500fad8/podcast/play/56934513/https%253A%252F%252Fd3ctxlq1ktw2nl.cloudfront.net%252Fstaging%252F2022-8-1%252Fba1b9425-ee1c-d0fd-3048-f50bdcc17c14.mp3",node_type:"clip",pub_key:"02545c14cbb18a61f20dd45f5e3dcbd9acae3de282369501040adce32a75311309",ref_id:"f779d2b8-6e89-4ddd-ae99-6d1223615400",show_title:"Bitcoin.Review",text:"and that sort of like, brings Craig in because Craig did a very incredible, in my view, upgrade in UX from a similar model to Electrum. Right. It's an SPV wallet, it's a desktop wallet and it's sort of like he does multi SIG, it does a lot of the advanced features, but like, it's a much more sane UI and UX. So Craig, like, what brought you to develop Sparrow and like, some of the reasons why you made those UX decisions? Yeah. If we zoom out a little bit here and we look at where we have come from and where we're going and what people view as important in the space, I think that most of the kind of opinions and the views that you see all have a very natural and human flaws that they fail to kind of take into account the kind of span of time. They all have quite a recency bias to them. And for me, designing Sparrow, it's not dissimilar really. I was just trying to improve and take what I think is ultimately going to be seen as a fairly small, incremental step in terms of the UX of wallets taking at least the UX of sort of more advanced, more capable wallets, perhaps more difficult for nobs, but certainly you're able to do more with them. My intent was to really take what Electrum was offering at the time, which I thought was a good concept and a good kind of model. This idea of a light client which they really pioneered and really just put it into a different package with better UX, with a more sane kind of data model and UI model. You know, that was really my intent. Where we are going next, it's hard to say, right. If I knew the answer to that, I would be trying to build it, perhaps, but it's really hard to say. And that's, I guess one of the great things we all get to experience on this journey is the ability to see whatever is next and kind of be part of that. But yeah, that's really what I was trying to do. I kind of built Sparrow for myself. That's already the case. Whenever I come to a decision point and I don't know what to do, I kind of have to go back and say, well, what would I like to use here? And that kind of defines it for me. I have the advantage that I didn't set this thing up to be a business like you guys. We didn't start it as a business for gold card either. It's just kind of funny. We did it because there was no alternative that we were sort of happy with. Yeah, I mean, sure, so often it begins there, but now it's become something else, right. And I think that's always a challenge, right. That kind of trying to maintain the balance of who are you building those things for? Because if you're building it for somebody that isn't you, that immediately creates a bit more of a challenge. Right now you're trying to imagine yourself as someone else and what would this person ",timestamp:"00:07:41-00:11:10",topics:["Bitcoin UX","Sparrow wallet"],type:"podcast",weight:4.24243519079696},{boost:0,date:1664928e3,description:"kotty Auditore's suggestion for BOLT FUN",episode_title:"Meet the Makers: René & Koty",guests:[{name:"kotty Auditore",profile_picture:"https://pbs.twimg.com/profile_images/1608131189289746432/DP7GXDLw_400x400.jpg",ref_id:"8d04ee18-3cc1-4a73-8510-05e70dbdb661",twitter_handle:"koty_auditore"},{name:"Rene Aaron",profile_picture:"https://pbs.twimg.com/profile_images/1499715029834375172/g8uCieYv_400x400.jpg",ref_id:"0ed58288-3a54-46e4-8734-8a133ffcdbb3",twitter_handle:"_reneaaron"}],hosts:[{name:"Ed Pratt",profile_picture:"https://pbs.twimg.com/profile_images/1093488670567473153/MNg7qh0q_400x400.jpg",ref_id:"6c9444a7-3133-4cf2-b078-96a5e5af4b93",twitter_handle:"MrEdPratt"},{name:"Moritz Kaminski",profile_picture:"https://pbs.twimg.com/profile_images/859727763292512258/kiFpZ2vO_400x400.jpg",ref_id:"2e185741-dd90-4772-a554-5f4d28e11650",twitter_handle:"MoritzKaminski"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/965489b4-a414-4fd0-ab8c-55911b1596aa.jpg",keyword:!0,link:"https://www.youtube.com/watch?v=5XQKuhLnhjg",node_type:"clip",pub_key:"",ref_id:"fd20d403-6fec-401f-9503-d20e298912b6",show_title:"BOLT FUN",text:"I said before I had a suggestion for Bug fund. It's just like this is an idea I want to share with you and then you play with it. I love we have this hackathon. I love the way it went through. It was so smooth. Ed is amazing. The judges were really nice but now that it's called we are Makers like when you're presenting you're a maker, either you are a developer or a designer or any role, you are, let's say, in a team, why also not include like, projects to be granted or have a price, projects that involve businesses? Because one of the things that I noticed about the whole event is that what's kind of like a cool shark tank. Not a shark tank like with Mark Cuban very asking for loans and so on. This was more like grants, but it was kind of the same way because what's the value of it? How does it work? You have to present it and you're being judged. So it felt kind of, as I said, again, nice shark tank one. So why not having something like that as well and have like a section you might start with something like maybe small prices or a section of people who think of a business using Weber land, using Lightning in general in their communities and they present and you have Geyser. Yes, of course. But Geyser is more open to crowd funds. You can have a non governmental project. I'm talking about a business, let's say someone who says, I'm going to open, I don't know, or a juice stand and I'm going to charge Enlightening and then okay, it might sound simple, but it's like how are you going to do it? How are you going to charge people? How are you going to be sure that people will pay you in Bitcoin? Are you going to teach them so they will present like a whole project of what they're going to do to have a business that works with Bitcoin? Because I think that's something that we all want to see in the end. We need Bitcoin to be used in businesses and people creating business and jobs for people around the globe. So something like that would be like, let's say in a very extreme scenario, someone don't have the funds to start something, but maybe the price is enough to at least buy a new phone and buy a stand, let's say for these hypothetical orange juice stands, just to say something and he can kick off from there. Or she. The idea is that bigger teams can present something in front of a jury and they get also a bit of a bit more funding so that they can really start off product development process and have an MVP as an outcome and contest it. Yes. I would love when I was presenting this to all of you guys, I was like in the back of my mind I was having this. Imagine if this is not only a project for a feature or an application, but also to take these applications that are presented in the hackathon. Imagine that someone takes one of the projects in the hackathon and they make it like they're going to use it for their business. That would be sick. That would be really nice to see happening. ",timestamp:"00:30:27-00:34:59",topics:["kotty Auditore","BOLT FUN"],type:"youtube",weight:4.326165081267448},{boost:0,date:1636993919,description:"What is CPU consumption",episode_title:"SLP321 On chain scaling with Bitcoin Core Developers Pieter Wuille, Andrew Poelstra, Andrew Chow & Murch",guests:[{name:"Pieter Wuille",profile_picture:"https://pbs.twimg.com/profile_images/1264051937172836353/n7gHdLbB_400x400.jpg",ref_id:"40260d2f-3480-47d6-8515-d2e780901273",twitter_handle:"pwuille"},{name:"Andrew Chow",profile_picture:"https://pbs.twimg.com/profile_images/1452266201770496010/44FHCtZM_400x400.jpg",ref_id:"f96d87ca-5060-4021-aeb9-61db03312027",twitter_handle:"andrewrchow"},{name:"Andrew Poelstra",profile_picture:"https://pbs.twimg.com/profile_images/1316562683009921024/FSscAYvJ_400x400.jpg",ref_id:"15fb9c53-c988-4af1-bbf0-4832d71b0a01",twitter_handle:"Blockstream"},{name:"Murch",profile_picture:"https://pbs.twimg.com/profile_images/1269477743525130241/-U843Cmt_400x400.png",ref_id:"3e2c1c73-a057-4475-9782-3bb0d3d8cc62",twitter_handle:"murchandamus"}],hosts:[{name:"Stephan Livera",profile_picture:"https://pbs.twimg.com/profile_images/1362551718110580740/v-W5Q2uo_400x400.jpg",ref_id:"72f57157-c96e-4466-8bf1-290cfe1f8a0b",twitter_handle:"stephanlivera"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/b79a3eb8-bcd0-4338-b979-d32aef360785.jpg",keyword:!0,link:"https://anchor.fm/s/7d083a4/podcast/play/43381293/https%253A%252F%252Fd3ctxlq1ktw2nl.cloudfront.net%252Fstaging%252F2021-10-15%252F4872859a-d95f-b966-4c6d-df50c0d78454.mp3",node_type:"clip",pub_key:"027be063cca62a6c08fbe2e8eba0aae10ad27a8896d04ee347a90fea2bce5e85ac",ref_id:"c6a74c1e-d942-46d9-85e0-b7f33bb41078",show_title:"Stephan Livera Podcast",text:"one way to think about it. Are there any other big ideas or any other kind of key topics that you think we should touch on in terms of on chain scaling, batch validation? We've been talking about signature aggregation where we're getting rid of some of the signatures that go on chain, but there are multiple aspects to scalability and on chain space is only one of them, CPU consumption is another. And it turns out you can sort of get something similar to signature aggregation without actually doing it. And that is you still have multiple keys on chain, and you still have multiple signature completely created independently on chain, but you sort of aggregate them at validation time together and then validate them all at once. And it turns out you can do it somewhat more efficiently than validating multiple. And this is something that isn't so much being done in. This is a known technique. Like there are papers going back 1015 years explaining how batch validation improves things, but in most settings it isn't all that interesting. In our case, it very much is, because if we have a block with thousands of signatures in it, we really only care if all of them are valid or not. It's not like we care if one fails which one it is. The block is invalid, throw it away. So that's really the use case for batch validation and tap root and the Schnorr signature scheme it introduced have been specifically designed to permit batch validation. It's not implemented, but it was a design criterion in 342 that nothing in there would interfere with the ability to batch validate, which is the rationale for some of the maybe more unexpected changes. For example, the tap root script logic doesn't have a check multisig anymore, specifically because the check multisig as it existed before isn't compatible with batch validation. And so, I'm sorry, go on. To add to that, the ECDSA signatures that you were using before schnor signatures were not compatible with batch validation either. Although maybe in retrospect there were some small tweaks I guess Satoshi could have done that would have made it possible, but they weren't. And we thought about that when defining the Schnoar signatures for Tappery. And so, as I understand you then, would that be mostly a CPU saving. Or what would be purely CPU savings? That would decrease the sync time. Yeah. So you could spin up your bitcoin full node faster in a batch validation world? Theoretically. Well, only for the batch validation signatures. Yeah. Not the fast off, obviously, because that would still be. We'Re not in a rush about that, because it only becomes relevant once tap root signatures are really commonly being used. Right. But then, of course, once you implement it, it would still apply to all transactions from that point onward, compatible. So once tap root rolls out and there is Schnor signatures in the blocks, if you later then do the batch validation, you get all that. And it is not restricted to initial synchronization, of course. Right. It also helps with a new block that comes in or a new transaction that comes in. Mostly new transaction, because we cache the result of signature validation and we don't do it again. I think I'd have another ",timestamp:"00:39:51-00:43:14",topics:["CPU consumption"],type:"podcast",weight:4.2267541905781005},{boost:0,date:1646456400,description:"Decentralization Aspect on [[Microliquidity Pools]]",episode_title:"WHY ARE WE BULLISH Troy Cross GoodGuy Biker Jesse Berger ep241",guests:[{name:"Jesse Berger",profile_picture:"https://pbs.twimg.com/profile_images/1552386182868307971/5ApLS7LH_400x400.jpg",ref_id:"5b38df61-d11d-4958-8aaf-80b2bcbdd175",twitter_handle:"jayberjay"},{name:"GoodGuy Biker",profile_picture:"",ref_id:"bca843d2-d773-4261-bac4-1402812c7131",twitter_handle:""},{name:"Troy Cross",profile_picture:"https://pbs.twimg.com/profile_images/1561364830774124544/cKmEpj_m_400x400.jpg",ref_id:"ea01fb42-72e2-417f-bb3e-a45d18feeed8",twitter_handle:"thetrocro"}],hosts:[],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/0ade0cc4-6303-4e28-8b00-6b3e659c1e3a.jpg",keyword:!0,link:"https://anchor.fm/s/11e95d20/podcast/play/48587749/https%3A%2F%2Fd3ctxlq1ktw2nl.cloudfront.net%2Fstaging%2F2022-2-5%2F251962996-44100-2-951ca965b13a5.mp3",node_type:"clip",pub_key:"",ref_id:"ee97306e-085f-4232-b84f-05350bd383c4",show_title:"BTC Sessions",text:"Micro Liquidity Pools I want you to think of the future of Bitcoin. Like lots of little Islands of micro liquidity. The decentralization aspect is going to basically cause people to leave the main island, the main chain, go to small, trusted Islands where the rules are different, allowing them to party and do whatever they want with people that they trust, people that they love, and then they're going to get back on their main boat and drive back that main chain. So we're all going to take our cruise ships to party Islands and we're going to live the best Bitcoin life on top of those layers. So that's really cool too. ",timestamp:"02:02:03-02:02:33",topics:["microliquidity pools"],type:"podcast",weight:4.201971989276868},{boost:0,date:1641254400,description:"How does the Liquidity advertisement works?",episode_title:"Scaling Bitcoin Off-Chain - TABConf 2021",guests:[{name:"Graham Krizek",profile_picture:"https://pbs.twimg.com/profile_images/1600169182347288582/yNztRz0g_400x400.jpg",ref_id:"186974f3-37dd-4d62-9d88-1b7fa88c6cce",twitter_handle:"gkrizek"},{name:"Stephen Livera",profile_picture:"https://pbs.twimg.com/profile_images/1362551718110580740/v-W5Q2uo_400x400.jpg",ref_id:"9c9974bd-6a59-480f-8d5a-12b634b15b39",twitter_handle:"stephanlivera"},{name:"Alex Bosworth",profile_picture:"https://pbs.twimg.com/profile_images/1364274244960481281/G5gNi3di_400x400.jpg",ref_id:"2389663a-f7f8-42a7-99da-551089a9ea6a",twitter_handle:"alexbosworth"},{name:"Matt Corallo",profile_picture:"https://pbs.twimg.com/profile_images/697361498587451394/_rX0-O0W_400x400.png",ref_id:"08cb3c45-c0bc-4a60-ae5b-a1283d352c8b",twitter_handle:"TheBlueMatt"},{name:"Niftynei",profile_picture:"https://pbs.twimg.com/profile_images/1594756549162975240/J-4dbH6W_400x400.jpg",ref_id:"5e9f617b-cc12-4e3d-9fb5-ad058f14b171",twitter_handle:"niftynei"}],hosts:[{name:"TABConf (The Atlanta Bitcoin Conference)",profile_picture:"https://pbs.twimg.com/profile_images/1596233571521499138/YE8Us_Ml_400x400.jpg",ref_id:"e46f0c05-8cc5-4264-9c40-83b13f4edd0a",twitter_handle:"tabconf"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/e7d2a4ca-6b44-4a45-a94c-6f48987979f7.jpg",keyword:!0,link:"https://www.youtube.com/watch?v=984L-GQkfgk",node_type:"clip",pub_key:"02574d6e8e787372184b6f17c40d6c6fe1777db9015801f95dfd24692784d767cd",ref_id:"acdb65ab-789f-480c-9f88-414599d19a43",show_title:"TABConf (The Atlanta Bitcoin Conference)",text:"you with the Sea Lightning and Block Stream approach. Could you tell us a little bit about Liquidity Adversements? Like, what are they, how do they work? Yeah, liquidity advertisements. So this is kind of in the theme of there's only going to be so much bitcoin available, and of all the bitcoin available, only so much of it is going to be interested in making itself available to a lightning capacity, so to speak. So given this assumption that there's like a subset of bitcoin that wants to be deployed to the Lightning network but needs help figuring out where to deploy itself to the idea, with Liquidity Ads, it's a Lightning spec proposal. So our hope is that it'll get adopted by other implementations and then be part of the Lightning spec. So anyone who runs a Lightning node will have access to it. But what it does generally is it allows for anyone who runs a node to advertise that they have bitcoin on their node, that they're willing to allocate to channels with other nodes. So if you start up a new node, you can basically start gossiping with the other peers. You collect all these liquidity advertisements that any other node on the network is advertising. You can see who's advertising it. You can maybe talk to some data providers about, hey, tell me about this node, what's this reputation like, how much should I value as a node in the network with my inbound liquidity needs? How much should I value what they're offering me? And then decide basically, you pay them for the service of them giving you inbound liquidity. And for those of you who are like, inbound liquidity, for those of you who aren't really familiar with Lightning terminology basically is the ability to receive payments. So this is when you open a channel, the other side of the channel needs to have funds on it so that whenever you receive a payment, those funds can be pushed to you. So basically this gives you a way to source from any node on the network. Currently only nodes that are running C Lightning and have the stuff set up exactly correctly. But hopefully in the future any node in Lightning network that wants to be able to advertise liquidity will be able to and any node that wants to be able to purchase some inbound liquidity from them will be able to do it. So it's very decentralized. There's no centralized market. You kind of have to decide how much you want to price your liquidity at on your own. We don't really have a lot of help for that. But it is like super decentralized. And hopefully it allows people in the market who have liquidity the ability to kind of set up a signal such that people who are looking for inbound liquidity. If they're willing to pay for it, we hope that that means that they're going to make good use of it. Right. Because clearly they have a use for it. So this is kind of a way of kind of decentralized matching via billboard system who has liquidity that they want to deploy and people who would like to make use of that, I think. But I'll be giving a talk on it tomorrow morning if you want to learn more about how they work. Excellent. Maybe a little bit out there as well. Like with, as an example with El Salvador, there's 6 million people who are coming onto the Lightning network. You guys are all working on the Lightning network in some way, shape or form. Do you have any thoughts on that? Does that represent like a stress test of lightning or do you think it's early days and there's essentially still a lot of on chain usage. They're not really using as much lightning yet. It is a good stress test just to just get more people using it. I mean, you're going to find where the needs are of the people and what needs to be fixed and all those things. So it is a good stress test, but I think a large amount of the like El Salvador stuff is custodial right now. So it's not necessarily stressing the lower level, like the network itself a lot. But it's really, I mean, helping a lot of people that are starting to use nodes in a much more serious way. I guess instead of just having these small nodes that do a few payments a day or something, they're actually doing like substantial payments. So I think that it's a good stress test. Any usage is good right now. I think it's more testing the implementations themselves than the network itself right. Now, which is good. I think that's a natural step in evolving the network is helping us figure out where the gaps are in these implementations and then also in the tooling, all of these things. Right? I mean, we're still obscenely early in Lightning's lifetime. I mean, certainly volume of payments wise and also people saw the CVE's that came through a few weeks ago, which can kind of best be described as like prior to a few weeks ago, the security model of lightning included you shall not open a lightning channel with any bitcoin miners. And even today, depending on the exact channel type, that's maybe a little true, right? So the security model of Lightning still has a long way to go, and we're still tightening a lot of issues up, which kind of the point about custodial wallets to some extent today with lightning, if you want to open a reasonably large amount of funds into a channel that you want those funds back. You probably kind of want to know your counterparty. Or at least know that your counterparty is not actively malicious. You're not going to put in some amount of work to steal your funds like this. We're getting there. We're getting there quickly, but we're still getting there at least make sure they're not a minor. ",timestamp:"00:22:50-00:28:15",topics:["Liquidity advertisement","Lightning network"],type:"youtube",weight:4.194948703387623},{boost:0,date:1673187067,description:"Nuclear Bitcoiner sharing his experience in El Salvador and meeting other Bitcoiners around the world",episode_title:"@NuclearBitcoinr - Mining #bitcoin With Small Modular Nuclear Reactors. #313",guests:[{name:"Nuclear Bitcoiner",profile_picture:"https://pbs.twimg.com/profile_images/1443185278525579278/_Yl1nao1_400x400.jpg",ref_id:"60f5891f-0864-4ed4-987a-81da4768b3ba",twitter_handle:"nuclearbitcoinr"}],hosts:[{name:"Daniel Prince",profile_picture:"https://pbs.twimg.com/profile_images/1589940494364205056/rnHs5gI3_400x400.jpg",ref_id:"df2d4d35-3e96-44ed-b1cc-cb8a714bbe30",twitter_handle:"PrinceySOV"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/e1eca67b-d372-4031-bf1f-8f0ff7fe6092.jpg",keyword:!0,link:"https://anchor.fm/s/1346f9e8/podcast/play/63208295/https%253A%252F%252Fd3ctxlq1ktw2nl.cloudfront.net%252Fstaging%252F2023-0-8%252F4a07b2fe-eb1d-2c82-677e-8f2808a09536.mp3",node_type:"clip",pub_key:"02545c14cbb18a61f20dd45f5e3dcbd9acae3de282369501040adce32a75311309",ref_id:"ba64a3e2-dd25-459b-8968-154f986c42f8",show_title:`Once Bitten! + svg { + font-size: 24px; + color: ${colors.white}; + } +`, + BackButton = styled$4(Flex)` + cursor: pointer; + margin-right: 8px; +`, + InfoIcon = styled$4(Flex)` + cursor: default; + padding: 8px; + position: relative; -A Bitcoin Podcast. -`,text:"crossed. Adopting Bitcoin, give us some stories. What was going on. How was it? El Salvador? That was wild. So I took my wife. We were initially going to bring the whole family, but I wanted to just take her with us and then we can pay attention to the conference and not have to worry about the kids. Maybe next time. Or we'll go when there isn't a conference and they can enjoy the atmosphere. First we landed from Canada, so I'm still wearing my winter jacket because it was snowing in Canada when I left. And then it wasn't so bad in the airport where there's air conditioning, but as soon as you walk out of that door, you just get hit by just a wave of humidity, 30 deg, 70% humidity. And then that was definitely a change. And we had rented a car. So then we're off to like, okay, let's go find our hotel. And we didn't get a place in the city. We were off in the coast in what is it? El Tunco. Yeah, somewhere along there, about 15 minutes from Elzante. So we were driving back and forth to the city to get to the conference. So that first night was wild because we're driving in the dark in a foreign country and there's dogs all over the place. I'm used to where we are outside at night, everyone's got reflective gear, so you can see them coming from a mile away. You're driving these streets in El Salvador, and there's tight streets and the trees come hanging right over the roads. And then all of a sudden, oh, there's a person on the side of the road. Shit. Careful. So you have to be a lot more attentive because it's very dark along those roads. And then we get to our hotel. It was a really nice hotel, but the road, like the little side road that we had to take to get up there was the equivalent of the backwoods hunting road that we went to like the weekend before. It was pretty surprising. And then the armed guard led us into the compound where we were. They opened the gate for us, and he was very friendly, chat, and then starting to get into More where the language barrier was very interesting. And we live fairly close to Quebec and we get lots of French classes, so we found ourselves quite often there's, close enough similarities that we would start dropping, like, French terms and then be really confused when they look at you. No, not here. But we got checked in, and that was fun. And then we woke up and went to the conference the next day, met with a few people. Like I had been speaking with Jason Martinez and Joshua Lopez from down there in advance of the conference because we shared a panel together just talking about different ideas of how we can use bitcoin mining and potentially nuclear power and possibly even fusion in El Salvador. And then I was just running around taking in all the talks. A lot of it was very lightning and technical focused. But then there was a few other ones that were a little bit more like growing adoption in rural remote areas. And Austin Hill gave a presentation on what they're doing with Sonoda. I caught the one to talk about the Thunder games and the way that they've gotten everyone addicted to solitaire again, because now you can earn SATS playing solitaire. There was a good party atmosphere, very jovial. I met yeah, met Walker and Carla. Greg Foss was there. Met taco. Then at the end of the first day, they had a showing of the DAREDE Dream documentary that Valice did with a bunch of others. So we walked in, and then I sat down right behind a guy. I didn't get a good look at his face, but it looked like it was valid, so I just stayed quiet. And then I heard him talking to someone in front of me. I was like, oh, yeah, that's definitely it. But I didn't want to bother him while the movie was playing. But I could see when he first came on the screen, there was another guy a few seats over. He's, like, looking at us. He's like, Is that the guy? Yeah, that's the guy that's on the screen right now. And then I met a few of the others that were in the video. I met Mike Peterson briefly when we were down at the beach. And I met Chimbera, one of the guys that's doing the work down there. So we had a good conversation with just him and my wife when we were on the beach on our own the day after, because they did the first two days were conference at the hotel. And then the third day was everyone went and did the tour to Bitcoin Beach. And it was pretty packed. I'm sure they did very well financially for those few days and then because we had such a great time, we came back the day after on the Friday and I took a few surfing lessons and we just wandered around and checked out the place where it was a little quieter and enjoyed the sunset. And then on the Thursday night they had arranged to do like a turtle release where they let all the baby turtles go and run down to the ocean. So that was a lot of fun. Just really chill atmosphere. It was a really cool place and met a ton of cool people. Definitely your first time? First time around like that many bitcoiners in real life? Yes. I had been to a small Ish meet up in Toronto, would have been last July, I believe. I had met Fox in person there and the Canadian bitcoin or guys were there, a few of my other internet friends. But it is funny just going and meeting these people that you're used to just hearing their voice in your head and you feel like you are all part of this community but now they're real people standing in front of you like Paco and Prince Philip and meeting tons of cool people. But yeah, the one regret I had was I wanted to chase down Samson and talk to him a little bit more. But we'll get there. And then there was the nuclear conference. I was in Canada for four days and then I got on a plane to go to Japan. I went from very little travel at all to going to McCormick. Brought me to London to Bedford in the summer as well. So there was that. So I went from nothing. I had never left Canada outside of. Like, cross nights of Bedford. I stole the show for you. Oh, it was great. I'm sure I'll find more opportunities to do a little bit more touristy stuff. Where you put up in the Swan Hotel. Is that the name of it? Right there on the canal in Bedford? It wasn't right on the canal, it was nearby. It was only about a two block walk. I walked around downtown and along the canal and all that, checked it out, took a whole bunch of pictures, show. Everyone back home where Best in Japan did you go? Where was that conference? Cory Yama, which was on the Bullet train. It was about 2 hours north of Tokyo. I have no idea physical distance in kilometers because that train was crazy fast. Are people still going crazy covered over there and masked up on all transportation? What's the word there didn't seem like there was a lot of enforcement of it. There was. It was heavily suggested that you wear masks in crowded areas and that you're just kind of polite about it, but it didn't seem like there was any aggressive enforcement. But they're already kind of accustomed to that in their culture. So it wasn't much of a surprise to see more masks in Japan than I have been in Canada since they dropped the requirements to do so here. It wasn't bad. Nice. Good to hear. Yeah, man, Japan, what a crazy world. What a crazy, crazy world. It's an amazing place to visit. Incredible culture. Tokyo itself blows you away. And the food, obviously is just amazing. Yeah. We had a few hours in Tokyo before we had to catch our flights. We went and walked around the what is it, the Rapungi what was the, the Palace Gardens. Oh, right, yes. Yeah, like that that whole place. The walls of that place could fit my tiny little small town in northern Ontario inside of it, probably. It was very impressive architecture and building and then beautiful gardens. Did the souvenir collecting make sure that everybody got something for Christmas? But yeah, the idea was very well received. Even though we didn't win the contest. Everybody I talked to, there was one fellow that didn't seem to grasp the, well, my banking system works, so why do I need something like this? Well, you're not thinking broad enough. That's your problem. ",timestamp:"01:23:58-01:33:27",topics:["Nuclear Bitcoiner"],type:"podcast",weight:17.01499311138621},{boost:0,date:1651896e3,description:"Discussion About Covenants and CTV",episode_title:"WHY ARE WE BULLISH Evan Kaloudis Q Bob Burnett ep256",guests:[{name:"Q",profile_picture:"https://pbs.twimg.com/profile_images/1560683048680665088/4MrHM_UY_400x400.jpg",ref_id:"b0f3fa4c-eb2a-4888-be23-6bb0a529fc26",twitter_handle:"q_liketheletter"},{name:"Bob Burnett",profile_picture:"",ref_id:"cb1f53fa-5573-428d-b220-3e0c56f07588",twitter_handle:""},{name:"Evan Kaloudis",profile_picture:"https://pbs.twimg.com/profile_images/1596923848997445633/DqxrGpkW_400x400.jpg",ref_id:"420172fa-9431-4ba4-965c-adab17648d1b",twitter_handle:"evankaloudis"}],hosts:[],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/2f714adf-e499-4c1f-9864-016a00737153.jpg",keyword:!0,link:"https://anchor.fm/s/11e95d20/podcast/play/51637933/https%3A%2F%2Fd3ctxlq1ktw2nl.cloudfront.net%2Fstaging%2F2022-4-7%2F264028787-44100-2-16d4702c9083f.mp3",node_type:"clip",pub_key:"",ref_id:"8b91e81a-82c0-4174-b2f5-f0f665c94fa9",show_title:"BTC Sessions",text:"I'll talk about very briefly because it's very convoluted and there's a lot of nuance to it is Jeff been very bullish about all the discussion about Covenants, about CTV and the small discussions around any prevail, which I'm personally very bullish about because of the enhancements it's going to make for the Lightning network through the L two spec. So there's a lot going on. Anyone who says that Bitcoin development has stagnated does not know what the hell they're talking about is misinformed and sharing their own bags. So we've got the greatest minds in the world working on this machine and it gets a little bit better every year. Damn. Okay, hold on. I maybe wanted to touch on Tarot. ",timestamp:"00:33:31-00:34:21",topics:[],type:"podcast",weight:4.176346512567695},{boost:0,date:1671646019,description:"David Zell discusses what Bitcoin Policy Institute and how it helps Bitcoiners",episode_title:"#Bitcoin in DC",guests:[{name:" Matthew Pines",profile_picture:"https://pbs.twimg.com/profile_images/1518262325949734915/a5SFNpxO_400x400.jpg",ref_id:"6243401a-eb27-494a-b393-f2ecb02e02a7",twitter_handle:"matthew_pines"},{name:" Zack Shapiro",profile_picture:"https://pbs.twimg.com/profile_images/1602521378695118850/I5eXxQN5_400x400.jpg",ref_id:"736f0806-a6f5-41ea-84f8-d8e5cbd832c9",twitter_handle:"coinlawyer_"},{name:" Jason Brett",profile_picture:"https://pbs.twimg.com/profile_images/1591476397847060482/bNapBM4Y_400x400.jpg",ref_id:"7b8919ad-3196-46d5-9423-80eddf653e9f",twitter_handle:"RegulatoryJason"},{name:"Grant McCarty",profile_picture:"https://pbs.twimg.com/profile_images/1587887156797792261/6w4ewhwj_400x400.jpg",ref_id:"0bbb9ce6-25d3-4626-b3c2-96007355664f",twitter_handle:"grant_mccarty"},{name:" Stephen Pollock",profile_picture:"https://pbs.twimg.com/profile_images/1591160404293521408/pUvBZfsR_400x400.jpg",ref_id:"0c6704ac-558d-4de9-95f0-f96ee59657c8",twitter_handle:"spollockbtc"},{name:" David Zell",profile_picture:"https://pbs.twimg.com/profile_images/1574417496962105344/CcIm-voF_400x400.jpg",ref_id:"79345f31-415f-4859-9d10-2684e7006305",twitter_handle:"DavidZell_"}],hosts:[{name:"Chris Alaimo",profile_picture:"https://pbs.twimg.com/profile_images/1579209742370672646/rck7M_MR_400x400.jpg",ref_id:"3a1bd698-9d67-40e4-ba6d-3e2262b385ca",twitter_handle:"ChrisAlaimo6"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/f3a55dda-3dd5-4f62-99c1-bab3a88c27c1.jpg",keyword:!0,link:"https://stakwork-uploads.s3.amazonaws.com/uploads/customers/2707/media_to_local/db9d2590-44dc-4060-bb5b-224a803cc8f7/d068deeb-6e2d-4cae-87c9-eaead4be4316.mp3",node_type:"clip",pub_key:"034248fa888690a85021cf117c168a535c53b92e1fdf3e4f9cefddfe09118d8207",ref_id:"ab983731-f12f-41d4-8921-6388b9c064b6",show_title:"Bitcoin Magazine",text:"to keep going here David Zell, our co founder, coming from the BPI account. David, I just want to kick over to you, and we've talked about a lot so far. We've really went down the rabbit hole on a lot of these items, which is awesome, even more than we expect to be able to do, primarily because some of our fellows and friends have hopped on and contributed to the conversation. So thanks for doing that, David, to those sort of listening thinking, all right, this all sounds good. I kind of have a pretty broad understanding of the status quo in DC. And where things are and maybe where they could go one way or the other or a few different directions. Could you tell us just a little bit about what BPI and other advocacy organizations like us are working on and what people are listening are like, I want to get involved. I want to call my mayor or whatever they need to do to sort of be a part of the solution here or be a part of the efforts that we're talking about. What would you have to say? What do you recommend? Yeah, well, there's sort of a host of lobbying organizations, trade associations, nonprofits that are doing similar work. We are a 501 public charity, so we're not lobbyists. We sort of focus entirely on education and advocacy. BPI is a think tank that we started a year ago. The way that we work is primarily by awarding fellowships to academics and other researchers who are thinking about similar questions as US. Right? Like, what is the future of Bitcoin and the United States, and how can the US. And other open societies leverage these monetary networks toward beneficial ends? Our sort of thesis in doing this is that unlike really any other mainline political issue or political debate, rather, that which is being debated is not totally set in stone. The terms are a little undefined. So take another issue like, I don't know, gun control or marijuana legalization or whatever it is. These policy debates happen within a pretty bounded, like, shared understanding and meaning. Like, no one is debating what a gun is. No one is debating what marijuana is. People aren't really sure all the time what Bitcoin is. And so. To have a conversation about the policy implications of x, you need to know what x is. And so we viewed BPI as a way to kind of educate and to address that issue, right, to help define that which is being discussed. The other sort of reason for this strategic approach is that if you don't believe that bitcoin is good, like if your sort of prior is that this is bad, it's going to be really hard to like, lobby someone if that's their view. Like if you go tell them, like, for example, you know, Zach wrote this great article for us explaining why Warren and Marshall's bill would effectively neuter the industry overall. But if your view is that the industry is bad, then who cares? And if you were knocking down doors trying to explain to someone why certain policies wouldn't be good for bitcoin, if you don't believe bitcoin is good, if they don't believe bitcoin is good, you're not going to get very far. So I'd say the main thing we do at BPI is sort of produce research that advances a worldview, that net bitcoin is good for the world, and in particular is good for democracies like the United States. So I guess into the kind of nitty gritty of what we do, you can kind of bucket it, I guess, broadly in three ways. I mean, we sort of publish research everything ranging from long form white papers and policy memos all the way down to sort of like basic educational materials, like one pagers on bitcoin and other various and other sort of important topics, right? So bitcoin and energy, bitcoin and national security, bitcoin and financial inclusion, bitcoin and CBDCs, all of this stuff. And disseminate that research mostly at the federal level to staffers on the Hill. The second is sort of education and advocacy. So Grant and I are in DC pretty often. Grant especially is up there a week or two out of every month, just building relationships, being a resource, taking questions, taking meetings, and sort of funneling the really awesome research that our fellows do to decision makers in the government. We also host events in DC. Cocktail hours, dinners, luncheon, learns, et cetera, and just try to provide some touch point to people who thought deeply about these issues and have views that run contrary to some of the sort of apocalyptic visions of bitcoin that some in DC have. And then third is sort of on the media side. So placing op eds about bitcoin in mainstream outlets being a resource for journalists and reporters, all sort of toward this end of having a kind of serious dialogue about the benefits and risks that bitcoin brings to the United States, but ultimately advancing this vision that we have of an America strengthened by bitcoin. So that's sort of what we do. Another really awesome group that's been around for a long time is Coin Center. They're also a think tank, but they're a 501. And so they do sort of direct lobbying. And so when bills have some probability of passing and there's language that needs to be changed, coin center is one of the sort of forces that's always there, pushing back. So that's a little bit about who we are and what we do. You can go on our website just by searching Bitcoin Policy Institute or by going to Btcpolicy.org. You can read some of the research that's been discussed today, like Zack's article, like Math White paper. But to the second part of your question, which was what can everyday people and bitcoinners do? I think first is making your voice heard. There are, even though it sounds corny, like real benefits to making sure that your elected officials know how you feel about issues. And usually it's not that hard right now, you don't want to necessarily flood a random office with an email every day about why you love Satoshi and why Bitcoin is the best thing since sliced bread. But making it clear, especially when sort of key legislation is on the table, making your voice and your opinion heard does actually matter. An example, I guess, that might help make that sound a little less naive and utopian, would be, for example, gun control, where you pull Americans and say, do you support universal background checks? It's like 90% of Americans will say yes, depending on how you phrase the poll. And even if your focus group is just card carrying NRA members, that number is still hovering around the low 80%. So if you were to kind of look at that without any other context and say, well, we live in a democracy, and the overwhelming majority of Americans support universal background checks on private sales and transfers of firearms, you would expect maybe that policy would be passed. But it hasn't been. And this isn't really a political commentary on whether it should be, but it's more to make the observation that when you kind of peel back the curtain, the amount of phone calls that politicians receive over universal background checks are seven to one against. So you got 90% of the country that supports this thing, you've got 80% of card carrying NRA members that support this thing. But the most passionate people who are sort of single issue voters on this topic are sort of by far and away the loudest voice. And so the point is just to say that a small share of the population for whom a certain issue is their most important can really wield a disproportionate or outsized impact on the conversation in DC. So I think making it clear to your elected official how you feel about these issues is important. Staying kind of aware of what's going on is kind of necessary for that. And the other big thing people can do is to donate to the people that are doing work like us. No one is sort of making money educating Washington. And so if you've got the means, donating to organizations like ours or to coin center is a really tangible and great way to participate in this effort and to support education on bitcoin. So that's a little bit about who we are, what we do, and some of the ways that I think it's best for someone to get involved. ",timestamp:"01:02:41-01:13:19",topics:["David Zell","Bitcoin Policy Institute"],type:"twitter_space",weight:10.133384334462765},{boost:0,date:1672167683,description:"Benefits of owning Bitcoin",episode_title:"TOXIC HAPPY HOUR! #Bitcoin, Beer and Plebs! 🍻😂🤌🏻",guests:[{name:"Dr. Jeff Ross",profile_picture:"https://pbs.twimg.com/profile_images/1475554600094552064/DSlPG1lx_400x400.jpg",ref_id:"51a969bb-dbf7-4d20-b128-74dcc5f560f6",twitter_handle:"VailshireCap"},{name:"Tomer Strolight",profile_picture:"https://pbs.twimg.com/profile_images/1591960241008148481/HtyINxtU_400x400.jpg",ref_id:"3a2bc97d-072c-4ed9-9a59-17ceeb68fe99",twitter_handle:"TomerStrolight"},{name:"Laura Shin",profile_picture:"https://pbs.twimg.com/profile_images/1539462748173746176/hxR80FYT_400x400.png",ref_id:"a56a7b4d-edca-41d5-9d51-33396aa05b96",twitter_handle:"laurashin"}],hosts:[{name:"PUBLORD",profile_picture:"https://pbs.twimg.com/profile_images/1480160632360124416/AM_vVRko_400x400.jpg",ref_id:"8126d933-0986-4fd2-a6be-c02581294463",twitter_handle:"publordhodl"},{name:"Anders Jensen",profile_picture:"https://pbs.twimg.com/profile_images/1382039124991954947/Wb9kT7MO_400x400.jpg",ref_id:"af45195e-77a6-463f-ba64-29c6b0437d9c",twitter_handle:"andersjensenorg"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/2a1450bc-0649-4dc5-8ec9-1474af1ea1c3.jpg",keyword:!0,link:"https://stakwork-uploads.s3.amazonaws.com/uploads/customers/2707/media_to_local/f7b6cfcb-7cd4-4401-a3fb-7735bb570c07/2ae49fca-a048-4a34-93b9-247513af5699.mp3",node_type:"clip",pub_key:"",ref_id:"b8945614-0c02-4427-8749-f760691a4bea",show_title:"Anders_🍆",text:"Swiss bank account in your pocket or Swiss bank account in your head. Even better. Make sure you always have a backup of that Swiss bank account, though, in your head, because some things do happen. Strokes hit your head, memory loss, whatever. I'm serious. brainwallets are a super dangerous way to carry bitcoin, so always make sure you have a backup of your seat. I could never memorize 24 words anyway, so it's not an option for me. No. Okay, Craig, real quick, though, I think you could. I genuinely think most people can with enough time. Like, in my own experience, a long time ago, you can probably do twelve in about a day. The main thing is, if you're going to try to remember the words, don't say them out loud, especially around devices like cell phones, et cetera. But, yeah, just there are trade offs with everything self custody related. If you suddenly start carrying words in your head, you suddenly become very valuable, very quick. So, yeah, brainwall, make a song about it. You strike me as a kind of a guy who it's actually quite incredible. That many people are in the bitcoin. Because Mike, I think you can hear Tomar speaking. I'll come back tomorrow. Yeah, sorry, Craig, I was saying, you strike me as the kind of guy who might once have known dozens of phone numbers off by heart. Dozens of, like, seven digit phone numbers off by heart. So I bet you could do the twelve word thing. If I lose my phone, I wouldn't be able to call anybody. I don't know anybody to know. Now you lose, now you don't. But I bet in the 1980s and you did. Yeah, but that was a long time ago. It's just a matter of necessity, right? If you think you need to do it, you do it, and if you don't think you need to do it, you don't. I mean, that's what it comes. Down to the perfect example of this. Is the memorization of street names. If you ask my parents what's the name of every street in their city, they'll know them all. If you ask me, I literally probably know three to five going back. It's actually kind of incredible that less people appreciate bitcoin because there's all positive all the way around, right? Like, pretty much everybody cares about poor people, whether in their own country, in other countries, they can empathize and want them to have a better life. And if they can help them, they would do it. Right. And obviously moving to Bitcoin, buying and holding, I mean, you're doing that. And then there's also, like the personal gain, the, like, purchasing power. You could really save your time and be paid handsomely for it in the future. The incentive and the incentives are all there. It just speaks to how indoctrinated people are. Like, growing up in a system where you think that this is just reality and also education. Like, this is how economics work. And then also just like, I guess the complexity, the technicality of bitcoin. But if you just looked at the positives, right, and the incentives, it's actually kind of mind blowing that not more people are on it. And like the point Puppy makes about the insurance policy, I mean, just the peace of mind. Remember one of the insurance companies used to advertise peace of mind. Just the peace of mind of knowing that a good chunk of your net worth is safe and sound and nobody can get to it and take it away from you. That is just mind boggling. I've never had that before. I've always worried about various investments and so on and so forth. And who's going to come take the money? Who's going to sue me? And what's my attack surface all this stuff, right? With bitcoin, just sit back and relax, don't worry about it. Right? So they have to understand that it's inevitable, right? And they have to understand that it's uncensorious and uncomplicated. So, yeah, you have to whatever steps you have to go through to make them understand that. Otherwise, like, someone else, I don't know if it was Clark or somebody else here was asking about the hash rate. Hey, the hash rates going down. Like, what do you guys think? Okay, I just wanted to check if I'm getting a little nervous. Like we just went all in. I think his question is more like, is this shit still going to survive? So I think you need to get once people understand that, then they can appreciate what you're saying. Craig. The first bear market, right? Everybody has that worry. Is everybody else right out there that says it's going to zero? And yeah, it's painful that first time that you go through that whole thing. But he'll get through it. He'll be good. Orland oh, yeah, I was going to say that in regard to the hash rate, it doesn't matter because bitcoin dynamically scales with the difficulty number. So even if we lose a bunch of hash rate, you'll have a small period of pain where blocks come in slightly slower, but after two weeks it will adjust. And that's the beauty of it. There is so much work being done for you as a hoddler just by these miners and node runners. You don't really have to do anything. You can just buy it, send it to friends, do whatever. And the incentive structure is that people want to run nodes to operate businesses or whatnot, or validate their funds exist. And the miners are out there just trying to collect bitcoin from fees and the coin based transactions. And I think it's just so beautiful that it all works harmoniously and continues just tick to the next block. Yeah, as long as it can withstand a nation state attack, then it's doing what it needs to do. Most minors also run nodes, isn't that the case? That is correct. Every minor is a node at some point. So for example, if you have one thousand s nineteen minors in a warehouse, those S 19s need to know which transactions to put in the block, what is the height of the next block, what was the previous block's hash. And so basically what the node is, it has a function called get block template. And then it will kind of tell node operating software that runs on these machines or some computer that sends work out to these machines. It'll send out all of the work that these machines do. These machines do their work and they report back. That's all they do. But at the end of the day, the node is needed to get the work for the miners. And then also the other side of it is once that block has been mined, like let's say Craig, you have your thousand S 19, so you find your block, how do you get it back to the bitcoin network? The minor machines don't do that. They send it to the node and the node does a broadcast. So yeah, every miner is a node at some point. We're talking earlier about that. And one of my favorite, if not favorite, is that difficulty adjustment. And I told the story of TC. I'll tell you guys again if you're new here and trying to understand what is this are talking about, all right? And basically I equate it to an Easter egg hunt. And guess what? When every place go up, there's not as many minors. Like when all the minors get offline to keep everything humming along, humming along, you got to make it easier. So my daughter had a place that they would go and do Easter egg hunt at this club, but they had different age levels. So you can imagine, look, anyone under age of five, they basically just had those eggs, like out in the open, plastic eggs, so the kids just around pick them up for the next age group up. They're sort of hidden a little bit, peeking out. And then for the older kids, man, they got those things buried sure enough. Yeah, those older kids, guess what? Sometimes if it gets too hard, we're going to put you in this other field. We're going to find some easier eggs for you. And it's absolutely just beautiful to watch it in action every two weeks. Well, 21 40 blocks, I believe, but it's such a cool feature that hasn't been broken yet, man, it just comes along ",timestamp:"02:11:25-02:19:32",topics:["Bitcoin self-custody","Bitcoin hashrate","bear market"],type:"twitter_space",weight:12.02900368436996},{boost:0,date:1671720944,description:"The problems with the US financial system",episode_title:"Café ₿: #Bitcoin News & Bitcoin Day w/ @Bitcoindayio",guests:[{name:"@johnmichaeldrew",profile_picture:"https://pbs.twimg.com/profile_images/1512897699942744064/PuRU3K8P_400x400.jpg",ref_id:"6b72ee7f-52ef-4847-96ed-78ea09e3f19b",twitter_handle:"johnmichaeldrew"},{name:"@mattyicesensei",profile_picture:"https://pbs.twimg.com/profile_images/1607138483579101186/0qm0xaCF_400x400.jpg",ref_id:"286abd3b-cecc-4ec5-bf88-2a9fd5393083",twitter_handle:"mattyicesensei"},{name:"@Bitcoindayio",profile_picture:"https://pbs.twimg.com/profile_images/1493098733608837121/tLI-XTwl_400x400.jpg",ref_id:"6a87699e-7a27-4928-89e8-d884f1458bf9",twitter_handle:"Bitcoindayio"}],hosts:[{name:"@alexstanczyk",profile_picture:"https://pbs.twimg.com/profile_images/1539055022364708864/rwErK6x1_400x400.jpg",ref_id:"6455df34-1abc-4ce8-9bb8-b02d411accec",twitter_handle:"alexstanczyk"},{name:"@SwanBitcoin",profile_picture:"https://pbs.twimg.com/profile_images/1491428856858914820/aFlitvha_400x400.jpg",ref_id:"da3f56bf-9763-4389-a9ec-d807049bd0b8",twitter_handle:"SwanBitcoin"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/239722cb-4216-414a-a17b-5adf9d52e15a.jpg",keyword:!0,link:"https://stakwork-uploads.s3.amazonaws.com/uploads/customers/2707/media_to_local/83744e68-b563-4004-b52a-cfdfff89748f/12c9b9f2-fbce-4784-9404-88a574baa762.mp3",node_type:"clip",pub_key:"",ref_id:"ebecb620-735b-490e-bc9d-b4033f11144a",show_title:"Swan.com",text:"not everybody up here is from the United States, but from those you who are I mean, do you feel like your tax dollars are being well spent? Fuck no. Really? Okay. No, look, not very well up here in Canada. First of all, why are we being taxed, Alex? Okay, that go back one more step and say, I mean, this isn't our tax dollars. They're your tax dollars, but they've been handed over to this other entity and they're spending it however they want. It's not our money anymore. Hold on. Can we talk about we talk about Taxing and Swan because you can make it so that you don't actually have to pay taxes. That's how this world works. Okay? That's not true. That's not the way it works. Okay, you have two days left because Swan is going to skeleton Crew next week. If you want to get it done, you need to talk to us quickly. But wait, there's more. There's $65 million earmarked, a good chunk of which is going to be used to build a federal building named after Nancy Pelosi to house more administrators that we don't need to pay. Oh, but that's right. This is how you get rid of inflation, right? Can we at least make, like, a gold statue at this point? The corruption is just so rampant that it's disgusting. The state is rotting. Criminals are looting your tax dollars, and, like, someone alluded to it's. Not even tax dollars at this point, right? They're generating funds out of, like, the Treasury, Federal Reserve, like, nasty cycle. And so they're looting your tax dollars and your currency while the empire burns and really opting out with Bitcoin. The only option I see, it's not even current tax dollars either, Tyler. It's future tax dollars that you haven't even paid yet. It's gross. Yeah, it's like generational slavery. We're serfs. That's what we are. Not just United States citizens. The world is paying for this. The entire world. People who have no say. It's taxation without representation for the rest of the world. Okay, forget what I said. I want to see this Pelosi statue. I need to see it. She's building a whole damn building. As long as it looks as good as Cristiano Ronaldo's statue that they unveiled in Portugal, I'm good with it. Have you guys seen I'm going to share in the neck. I'll put it in there when I stop driving it's from, like, the 40s. It's one of the New York fed. Fed head. And he talks in the article. It's like an American affairs, and it just says, Taxes for whatever government taxes are obsolete. Like taxes are obsolete. And he goes in there and explains the four reasons why we have taxes. Basically, long story short, it's just for coercion, distributing wealth, whatever. So he admits in the 40s why we have taxes, because as you guys, we all know, just printing of currency, we don't need taxes. It's just straight theft at the end of the day and they admit it in this paper. So I'll share in the next in a little bit, actually, from Americans. I'm not 100% against taxes. I think there are some good things that need to be done. But at the end of the day, if they're printing far, far more money and spending it on crazy stuff than they're actually taking it in taxes, that's just fiscal irresponsibility and it's destructive for the currency and it's not good for the future. So in general, it's also a good example, Alex, of like, how, like, the systems that we've had established since, like, really since the formation of this country. If you have if you allow for human control of the money printer, it is impossible to maintain its disconnection from the political sphere. Like, it is absolutely impossible, especially the executive sphere, because, like, both of those separate spheres are incentivized to gain more and more influence and power and sway over the money printer and eventually it just gets subsumed by the entire system. Yeah, history has shown that this is the case. Could someone explain to me how America existed before 1913, before they started, like, the US. Government started taking income tax, like personal income tax, like, how were the roads and schools and everything, subways, the army, the navy, like, how do they, how did the US. Fund all this stuff? Like almost 150 years, right? Well, since, since the the American revolution, there was also this is stuff that I learned, particularly this past year that I was not aware of. The US. From my understanding, has experienced multiple bubbles of runaway like paper printing and inflation because we were trying to figure out how to actually make a money that would work. Well, they always knew that it's enshrined in the constitution, right, that gold and silver are the only things that are legal as tender. But there's been multiple hyperinflation events through the history of the US. As they were funding, like, big federal military build ups. So the continental was the currency that was like hyperinflated to pay for the revolutionary war. And then the greenbacks were the currency that was hyperinflated to pay for the Civil war. These were not redeemable, by the way. That's the important part. They weren't actually there was no discipline on the monetary supply because they were able to just print it. Well, for those folks who are still gold bugs, I was a gold bug for many years. And my one thing to you I'm not going to hammer this point, but my one thing to you is that gold's greatest weakness is subject to the whims of mankind. Like, if one dude with a pen can basically remove gold redeem ability and close the gold wind 1971, that right there proves to you that gold cannot act as a check on unlimited money printing, as much as we might want it to be. The simple fact is it's not and bitcoin is very different than that because nobody can control the supply issuance of bitcoin. It's fixed and it will never change. Not to mention, Alex, the monetization of gold destroys the actual value of the material or the mineral or whatever you want the metal. When we have such great industrial uses of gold, especially in electronics, and then we have so much of it just locked up in vaults, sitting around, you want to talk about how Keynesians are like, oh, we need to push the dollars through the system to get as much velocity or whatever? Let's talk about all the gold coffers that could be used to power much better electronics and help get areas like Africa and Central America and South America up to par. As far as the modernization goes, I don't know if that's even a thing, really, Mike. I mean, the amount of gold that's used is the amount of gold that industry is demanding. And that's it it's a small portion, actually, each year. Yeah, but you can't tell me that if gold wasn't monetized and was actually, as far as a price point, cheaper, the electronics wouldn't improve. That sounds kind of speculative, but that's all right. If it was cheaper to use gold and electronics, which is a very useful metal to use electronics than electronics would improve. I mean, what's hard to understand about that? So I looked up how the US used to function. The federal government, after it was created, we just had excise taxes, so they would just charge goods and services instead of income tax. And I believe in that because we get quadruple taxed in our current system just to keep it essentially performance based. Right. If the government that we want to do this particular thing, and we're going to ask the people for the money, the people have to give the money to the government, versus it being a law that you give the money to the government, they can do whatever they want with it. Those are two different things. Yeah. And as I was alluding to earlier, the wealthiest seem to manage to avoid that because of the byzantine rules and loopholes that exist in the tax structure. Is there more ridiculous bill? Yeah, I didn't realize that. There must be a lag on my end. I'll reset. No, we're kind of both doing it to each other. That's all right. ",timestamp:"00:50:07-00:58:49",topics:["US finance","US commerce"],type:"twitter_space",weight:10.380105016289042},{boost:0,date:1579649999,description:"Insight about Bitcoin Notes",episode_title:"Bitcoin TA, Bitcoins Future, & Bitcoin Explained by Tone Vays @ Brisbane Bitcoin Meetup",guests:[{name:"Willy Woo",profile_picture:"https://pbs.twimg.com/profile_images/1600775715892432896/c1rFKYSz_400x400.jpg",ref_id:"b0d7c243-e94d-40d6-a844-f0da905c4356",twitter_handle:"woonomic"},{name:"Tyler Jenks",profile_picture:"https://abs.twimg.com/sticky/default_profile_images/default_profile_400x400.png",ref_id:"5b920cbf-7be2-4380-9c3c-87e99d8b7612",twitter_handle:"Tylerjenks"},{name:"Tai Zen",profile_picture:"https://pbs.twimg.com/profile_images/712935760085659648/0_mfEI59_400x400.jpg",ref_id:"f0e33df4-8524-460a-88a5-e4ebf6f5149e",twitter_handle:"Taizen"}],hosts:[{name:"Tony Vays",profile_picture:"https://pbs.twimg.com/profile_images/1416821178266787844/T1OkI9ZW_400x400.jpg",ref_id:"504da881-f363-4d95-b1fd-fa7b6986639f",twitter_handle:"ToneVays"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/4ae5cf53-106f-4ba8-9a77-3ef1de3b44b6.jpg",keyword:!0,link:"https://dts.podtrac.com/redirect.mp3/api.spreaker.com/download/episode/21932193/bitcoin_ta_bitcoins_future_bitcoin_explained_by_tone_vays_brisbane_bitcoin_meetup.mp3",node_type:"clip",pub_key:"",ref_id:"22824927-75e2-4592-9876-6f271258bf9c",show_title:"Trading Bitcoin: The Tone Vays Podcast",text:"more work for that many people, quantum computers, it's a lot of work and a lot of energy to be used for. Again, something I'm not scared of, but a lot of people are already blown out of proportion. Good answers. So in 50 or 100 or however many years it will hypothetically take for a Bitcoin denominated society, do you guys actually see the majority of people running their own foremost or do you think it will be mainly custodial? I think it will be mainly custodial. I don't think everybody will be running their own full nodes. Everyone probably shouldn't be running their own full nodes. People that understand full nodes, people that would be able to upgrade those nodes when needed, should be running them. And not everybody, but everybody will be running their lightning nodes. I don't like calling a lightning nodes. I would love to call something else other than a node because it makes it sound a lot like a Bitcoin node. So I think not very few more than today. Today we only have about 10,000 notes. So I think it will be more. Yes, if a million people actively use Bitcoin, maybe 50,000 nodes will have if 50 or 100,000 nodes, that's enough. So I'm not expecting that, but everyone will have their lightning node in their pocket on their cell phone. I think like the question should include it's not just the fact that people will be able to run note, but will the cost of running note stay low. Because it's very important for a network to be sort of easily accessible by more people. It's so I don't spend like $10,000 in order to spin a note or it will become high and high and essentially become just two notes talking to each other. It becomes PayPal. Right? So cost of running a note, it has to be kept very low. Barry I think Bitcoin achieved that and given that its size has a little bit that much compared to eleven years, compared to all coins in a shorter period of time, the decisions that Bitcoin developers and Bitcoin hasn't made, it sort of like a trade off that hasn't made to maintain this has to continue over to hyperlink organization to keep the barriers from slow. I think custodial services will always be useful because honestly, some people don't want to manage their own money, they'd rather pay an expert to do it for them. And that's a sensible choice in many cases. But it will be different to the current situation where only banks have access to the banking system. Everyone will be able to get access if they want to and I think a lot more businesses will run nodes and get direct access to those payment rails. Awesome. So I want to give credit to John from Bitcoin rapidly for this question, but it's a really good one. I think it has to be added in. When do you think the first central bank will have Bitcoin towards reserves or do you think they even have a will? I think it's more likely that some Caribbean island central bank already has. No central bank ever will. I think they will. It's possible that some already kind of have, if not people at those banks already have. So it's a matter of time before it happens. How long before the end of this decade? I think we will definitely hear some countries maybe being even public about it. But you don't really want to be public about it. You kind of may just want to do it and have it as a backup. It will more likely happen in a country that isn't as transparent in their finances like Australia or US or some of the others, but a couple of the other countries that don't have to be as transparent with what their central banks have their money in, they are way more likely to do it earlier than the fully transparent ones, which is going to be very interesting. Yes, I would be surprised if there's not any small countries or small governments that's been stashing Bitcoin side. That is to say like the primary beta thing that central banks who started up in Bitcoin will be those that has the most to those have the most to lose in the rate of the bottom monitoring central bankruptcy, which aka is less smaller governments that are struggling to do the bigger scheme of things. Because if you look at the alternative, the ECB actually says this bitcoin could be a negative perception risk to the central banking system because it exposes something that's not doing very well. So you can see that the people that want to keep their status quo do a lot of fight against that. But the flip side things is that smaller central banks and smaller countries would actually say hey. We're going to compete for big boys. Let's maybe put out a little bit of folks here and when Bitcoin prices goes up. That sort of whatever. 510 percent of location could become 10% 20% of the irresistant asset and the next wave small country will say look. We would copy it and it becomes a circular positive effect and sooner or later the big boys have to kind of like chip in and say. Okay. Become like this. Let's be part of it. But that will take a long time. Central banking is fascinating. It's very conservative in some ways. From what I could find out, there's only three central banks at the moment that even buy shares directly. That's Japan, Switzerland and Norway. So they're very traditional just by government bonds and stuff like that. But in other ways they ",timestamp:"00:40:15-00:46:33",topics:["Bitcoin Notes"],type:"podcast",weight:4.165180206298828},{boost:0,date:1653436800,description:"The response from small business owners after their bitcoin adoption",episode_title:"Small Businesses Embracing Bitcoin w/ Michael from Oshi App - Voltage Twitter Spaces",guests:[{name:"Michael Atwood",profile_picture:"https://pbs.twimg.com/profile_images/1362207977470521345/Jy2_Ge60_400x400.jpg",ref_id:"16359ade-afb9-4a37-be0b-0844a6134327",twitter_handle:"Dooowta"}],hosts:[{name:"@voltage_cloud",profile_picture:"https://pbs.twimg.com/profile_images/1508657900486422529/Lfa70poj_400x400.png",ref_id:"3b622187-60ce-43c2-a21f-ae749c2d961a",twitter_handle:"voltage_cloud"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/2ec62250-4755-4616-8342-096a2cfab95f.jpg",keyword:!0,link:"https://www.youtube.com/watch?v=kMDSsyAEvd8",node_type:"clip",pub_key:"",ref_id:"4310fd96-1c4f-42a7-b72f-60fc5968c75d",show_title:"Voltage",text:"Now what's the like? So a lot of businesses, you know, they're interested in accepting bitcoin payments. Maybe they get it, maybe they don't. It's about 50 50. What's the response from a small business owner after they're accepting bitcoin? Is it kind of like one person a day, a couple of people a month? Are they noticing anything, material change? Or are they just glad that they're kind of keeping up with the times and maybe they have a bitcoin sticker on the front of their building and it creates conversation. What is that like? I would say in general, a lot of them are kind of indifferent about it. I do think they like the fact that they can kind of say, yeah, like, hey, we accept bitcoin. And if they do happen to be more into the idea of bitcoin, then they are fairly enthusiastic about it. I've seen business owners in the past that are like, literally customers come up and they're like, we accept bitcoin. And the customer is like, what? That is not what I was expecting. But yeah, it really just depends. There's a lot of indifference. I wouldn't say that. Maybe they'll have a few cups of coffee sold per week in bitcoin from just the people who are aware that this business even accepts bitcoin. Right? And that's kind of where Oshi tries to come in with the incentives and the map and everything. But yeah, business though, who are accepting bitcoin. Unless there's some sort of special event, like a bitcoin business warming party, they're not accepting heaps of bitcoin right now. Most people are still completely unaware that cash app, even you can send bitcoin payments over cash app. It kind of blows my mind. Like I said, I just had a meeting with a Texas reporter and awesome guy. He asked really great questions, but literally had no clue about bitcoin. Not a clue. And he's reporting on it. So this is the state that we're in right now. This is kind of the state of affairs. But I really like to talk about how small business owners in my experience, what I have seen is they're pretty eager to like, tell their customers about it, depending on the owner. So that's what's not really factored in, I think whenever a lot of people start talking about a consumer paying with bitcoin, but what is that business? And how are they going to train their staff? Whenever a customer comes up and wants to buy like a $3 cup of coffee and swipe their card and that's going to cost that business 5.6% if they're using something like square or toast whenever, they could just use bitcoin and save like 5% or more depending on what they're using. So then you're going to have business owners actually training their staff to say, hey, this customer comes in, tell them we accept bitcoin so that we can save money on these sales. Maybe we can increase our profit margins a substantial amount, or maybe we can actually give the customer back, like some bitcoin rewards or bitcoin cash back with that arbitrage between lightning and the traditional legacy payment processors. Absolutely. ",timestamp:"00:09:45-00:12:57",topics:["Michael Atwood","Bitcoin transactions"],type:"youtube",weight:4.158902193931075},{boost:0,date:1591295582,description:"Increased Stablecoin adoption and volume post-COVID",episode_title:"Episode 6: International Payments with Stablecoins",guests:[{name:"Fabricio Tota",profile_picture:"https://pbs.twimg.com/profile_images/1593923295660986368/PetsVmSs_400x400.jpg",ref_id:"d2b39da6-93a0-4511-98b3-3a57c9cf6491",twitter_handle:"ftota"},{name:"Sebastian Serrano",profile_picture:"https://pbs.twimg.com/profile_images/1586767206628605954/sAcHMD2y_400x400.jpg",ref_id:"22b37ca6-24f3-4f1e-ac19-b5c6f150499f",twitter_handle:"sserrano44"},{name:" Darius Sit",profile_picture:"https://pbs.twimg.com/profile_images/1407598510350819328/EGiy4zAh_400x400.jpg",ref_id:"cc4c1681-7fdf-4404-96a5-7e7fbed467cd",twitter_handle:"dariussitzl"}],hosts:[{name:"Jeremy Allaire",profile_picture:"https://pbs.twimg.com/profile_images/1501707897641779208/cpB2Dk9__400x400.jpg",ref_id:"df622380-4129-458c-8e10-8088f172f002",twitter_handle:"jerallaire"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/99d17d22-4448-4267-9065-f55b341f43d2.jpg",keyword:!0,link:"https://mcdn.podbean.com/mf/web/tr7dhp/episode-6.mp3",node_type:"clip",pub_key:"",ref_id:"7434dc95-111e-4fa4-81bd-6019a1249950",show_title:"The Money Movement",text:"in the post COVID world this dramatic increase in circulation of stable coins and on chain transactions have been growing super fast. It's now like, definitely the killer app of blockchains. But are you seeing that as well? Just like more and more diverse kind of counterparties that are looking to adopt this now. Exactly. This, of course, the traders, as usual. But we're to going see guys like furniture distributors, alcohol distributors, guys on the street who are just buying and selling wholesale, closing ecommerce guys. It makes complete sense for them to do it this way. So the local currency, no problem. They can use the Internet system, anything. Dollars is stable coin. And inside this has been happening in huge sizes as well. So it's become very corporate, in fact. Yeah. So this is, I think, a major shift that people have been sort of looking for, waiting for, which is all of a sudden you've got corporates from small to medium to even some large who are just like, this is just a better way to settle and a better way to move value. And they're just adopting it organically, they're figuring it out. Obviously, it's benefiting firms like you that are kind of key liquidity enablers in the entire region. And it's obviously very exciting. So if you had to fast forward two years, I don't want to say five years, let's just say two years, three years, is this going to be ten x what it is today? Where do you see the volumes? Where do you see the adoption? I think the sky's the limit. The fact is this, china has already launched it. The big banks in China, the Chinese banks have built infrastructure for it. So everyone was thinking this is adoption technology. Everyone's going to take some time, structure, know China, the big banks have already adopted it, build infrastructure. They are paying civil servants in the digital currency. And I think it's a fact that when China adopts something, the rest of Asia will follow very quickly. So we're getting requests and engagement from the rest of the Southwest Asian Central banks to start looking to this again. Like I said, people don't realize that there are two sets behind. And I think the adoption will happen very, very quickly because it's already a reality in China. I think most people don't know how real the adoption is. There seems like a real tipping point moment. I think so, yes. Awesome. Darius, so wonderful to have you on the program. Share your perspective from me, really exciting what's happening, and look forward to seeing you very, very soon. Have a great night. Thank you. Thank you. You too. Thank you. Excellent. So obviously a lot of very interesting things happening here. The demand for dollars, the demand for high speed, efficient, secure transactions, the speed and utility of the internet, these are all really powerful forces that are driving stable point payments internationally. And just to echo what we're hearing, like, this isn't just traders. This is now corporations of all types, even small merchants that are figuring out that this is just a better way to do business. So very, very exciting. I want to turn now to another part of the world, to Latin America, and welcome our first of two guests from the region. The first, Fabricio Toda, is director at Mercado Bitcoin, the leading digital currency exchange in Brazil. ",timestamp:"00:09:23-00:13:06",topics:["Stablecoin adoption"],type:"podcast",weight:4.142722249031067},{boost:0,date:1667002494,description:"Reason for being bullish: Adoption markers for Bitcoins",episode_title:"WHY ARE WE BULLISH? Brady Swenson, Kristin Thompson, Alex Stanczyk, Jon Chernot ep300",guests:[{name:"Brady Swenson",profile_picture:"https://pbs.twimg.com/profile_images/1502564606836981763/fmqtNrNc_400x400.jpg",ref_id:"49966553-d55b-44c9-94ec-8fee09eee5c2",twitter_handle:"CitizenBitcoin"},{name:"Alex Stanczyk",profile_picture:"https://pbs.twimg.com/profile_images/1539055022364708864/rwErK6x1_400x400.jpg",ref_id:"3126e2a3-bbe4-456b-b298-9714085fa286",twitter_handle:"alexstanczyk"},{name:"Jon Chernot ",profile_picture:"https://pbs.twimg.com/profile_images/1557153813122859008/VlOtu_p4_400x400.jpg",ref_id:"9e92acc2-17ad-4e7b-89d9-98a43fd12a6f",twitter_handle:"jonchenot"},{name:"Kristin Thompson",profile_picture:"https://pbs.twimg.com/profile_images/1517531647956033536/lf6DvsQm_400x400.jpg",ref_id:"29ff14ed-7fa9-4c27-a972-0d708f7f78b7",twitter_handle:"SpeakServeGrow"}],hosts:[{name:"Benjamin Tyler Perrin",profile_picture:"https://pbs.twimg.com/profile_images/1602307254937866240/CKiRrFui_400x400.jpg",ref_id:"3ea64cca-4564-4e24-b3a4-2c3f93ba3e7f",twitter_handle:"BTCsessions"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/419512c2-e309-4b25-bfe2-cd481d53f66d.jpg",keyword:!0,link:"https://anchor.fm/s/11e95d20/podcast/play/59744982/https%253A%252F%252Fd3ctxlq1ktw2nl.cloudfront.net%252Fstaging%252F2022-9-29%252F293755446-44100-2-5ef66a75db649.mp3",node_type:"clip",pub_key:"",ref_id:"b6fe310d-bfa4-48aa-bfc2-d36ed303d024",show_title:"BTC Sessions",text:"we're going to give it a rotation and I'm going to toss it to the cricket man himself. Brady, I would love to know. Why. Are the crickets bullish? Let me know. All right. I'm going to give Ben here a worldwide exclusive on why are we bullish, and I'm also going to create a little side chain of why we bullish and we're going to reason, riff and rotate on this as well. I guess we're already going to anyway, never mind change. All right, so I'm going to present here for a second, if you don't mind, sir. Yeah, I'll pull it. Let me see. Is it a browser? Here we go. Okay. You see anything? No, not yet. So hit present, hit share screen, and then it will let you choose something yup. And then you got to hit share. Yeah, something goofing up, unfortunately. So I may not be able to give actually, shoot me the link in. The private chat and I'll bring it up. I'll shoot you the file. Yeah. And if somebody else wants to go in the meantime, because this might take 90 seconds, I don't want to do 90 seconds of dead air. Then we can come back to mine. All good. Well, who shall I pick on? Maybe Alex. Alex? Maybe let's do a whirlwind of wider alphabetical. Yeah. All right. So I like to pay attention to adoption markers. I think the price is not very revealing of adoption. So some adoptions markers I look at is like strength of the network, cash, power, how much money is moving on the network, number of wallets, the amount of bitcoin that's allocated to channels and committed, number of nodes, all those kind of things. So some of the adoption markers that have been interesting to me as of late is, number one, we've passed $14 trillion worth of USD value transferred on the bitcoin network. As of now, we still have two months ago, last year was 13.1 trillion. So we've already surpassed that. We're already growing in that regard, the institutional, or I should say the legacy sort of system. Adoption markers are pretty strong for 2022. You've got KPMG canada in bitcoin, bank of New York mellon in bitcoin, forbes saying that the use case strengthens for bitcoin, bloomberg referring to bitcoin as a safe haven, bill gross in bitcoin, ken Griffin in bitcoin, state street in bitcoin, morgan Stanley asset management in bitcoin, critic Smith saying that bitcoin is going to benefit from all this crazy monetary stuff that's going on in the world. Goonblock in bitcoin. Russia announced it's going to take payment for energy and rubles or gold or bitcoin bridgewater backs a crypto fund. BlackRock starting to respond to client demand in bitcoin, on and on and on. There's a ton of these. I'm not going to read them all. There's a ton of these. And then finally, we just hit an all time record for the number of addresses that have held bitcoin for longer than three months. Yeah, that's huge. That is, to me is mind blowing, because what it really means is the people that are holding for more than three months, they're not short term in and out sellers, which is most of the people that came in and over the last six months, a lot of that selling pressure was coming from people who are newer. So everybody who's holding right now have figured out they're not selling. That, to me, is incredibly freaking bullish. I don't know if that's a bottom marker, but damn, let's go send it. It's great because you realize how much of the price is effectively calculated at the fringe right there's x amount of liquid bitcoin. But there's so much of it that is basically just sitting, held away and that the conviction of those people is continuously growing. And to see that much being held on chain and a singular address for an individual for longer and longer, it denotes that there's a small liquid market and during the bear market, there happens to be more sellers in that small liquid market. But it takes very little movement to change that trajectory and it can really rip. I think that we've got an interesting decade ahead of us that a lot of people are underestimating what can happen. So it's going to be a good time to be a good time. John and Kristen, do either of you want to jump in, comment on Alex's topic before we rotate to Brady's? I mean, I think one of the things that I learned really early on from bitcoin errs is watch what they do, not what they say. And so when we hear headlines like that, and here at Swan, when we're watching the market and I'm clipping little headlines, we see people changing their tune, whether it's JPMorgan or, you know, it's just the list is really long of people who have tried to vilify bitcoin while secretly stacking in the meantime or putting up the channels to be doing business in bitcoin. And so I think that's just a great lesson that I learned from bitcoiners, which has just played true over and over again. And then the other thing that I was really cluing in on that Alex was sharing was about the number of bitcoin is really holding. And so if we think back to, let's say, four years ago, or the last bottom was maybe, let's say 3000, right when the last bear market. And so just imagining now that the floor has raised up to, let's just say around the $20,000 mark in that time period. And that's really interesting and I think it's not my reason, but it could be a reason to be bullish to really think about the lower end is so much higher than it was four years ago and then four years before that. And that trend continuing is one great reason why it's such a great store value. Yeah, there's just a little side note here. There's a really cool graph I had a bunch of unchained guys on last week and Phil Geiger brought up this chart, the Hoddle waves over at Unchained. And it's really cool because you can actually see up along the top, this is like the UTXO age distribution, meaning how long has a particular coin been sitting in an address and not moved. And so, like, the scale goes anywhere from 24 hours to ten plus years. And you can see some of the. Widening on some of these longer time frames. Right. Some of the tenure stuff, obviously there's not a lot there. It's starting to get to the point where it's pretty constant, but you can see particularly like five to seven years, it's starting to widen. Three to five years is much wider than it was back in 2018. Two to three years, the one to two year is getting really wide quite a bit. You saw it start to move quite a bit and tighten, meaning lots of people were moving their coins around as we had a bull market. But now there's a lot of coins that have been sitting in a singular address, something like that. 23% of all coins have been sitting in a singular address for between one and two years. So those people are just sitting on it. And that's on top of all of the other, like 15%, three to five years, seven and a half percent, two to three years, even another 13, 14%, six months to twelve months sitting in a singular address. Right. You're not getting a lot of movement out of like half to 60% of the bitcoin stack. And that's pretty impressive. I like that. But nonetheless, I'll get John's thought on this and then we'll do a rotation. So, John, any thoughts on Alex's topics, on some of the metrics that he's been measuring and excited about? How bullshit is. Not just really just affirming that thesis of people more as people value this thing, the more they the more they want to hold on to it and they want to acquire. And it's that natural progression as a bitcoin or like you want to understand it. So it just shows the more that the deeper you go down the rabbit hole, the more you want to acquire, the more you want to hold on to, and really why we're all here and that's why numbers go up, is such a powerful thing. And yeah, I'm excited. It's great. Awesome, man, awesome. I love it. All right, well, let's round up this topic. There are so many interesting metrics that you can track, and again, those hoddle waves are really cool, but a lot of the stuff Alex mentioned, it's so unique to a money to be able to even be aware of those things. And this is part of, again, fix the money, fix the world. If you know how it functions, you can better calculate and decide on your economic action. ",timestamp:"00:25:06-00:35:12",topics:[],type:"podcast",weight:4.483882345180122},{boost:0,date:1671827663,description:"Generating money in Lightning Network is discussed",episode_title:"BR015 - Lightning Experts Roundtable ft. Calle, Roy, Rijndael & t-bast",guests:[{name:"Roy",profile_picture:"https://pbs.twimg.com/profile_images/1518195698323398656/v6d0knBt_400x400.jpg",ref_id:"528205f8-c65b-4b81-8e90-64a89737acd3",twitter_handle:"RoyNemer"},{name:"Calle",profile_picture:"https://pbs.twimg.com/profile_images/1514769710432219142/CIKDCEbq_400x400.jpg",ref_id:"c467552d-e3ae-4c55-a695-8369a63960bb",twitter_handle:"danielaacallee"},{name:"Rijndael",profile_picture:"https://pbs.twimg.com/profile_images/1542705395873058817/0zsy4Yur_400x400.jpg",ref_id:"861d5324-8ede-4059-826f-f29abca5d7e6",twitter_handle:"rot13maxi"},{name:"t-bast",profile_picture:"https://pbs.twimg.com/profile_images/1103941624843788289/Pg2rEZph_400x400.jpg",ref_id:"d3eacec2-0bdc-49cd-8bef-e99fa2776d3b",twitter_handle:"realtbast"}],hosts:[{name:"NVK",profile_picture:"https://pbs.twimg.com/profile_images/608402052247658497/ENDv0BNd_400x400.png",ref_id:"d754e29b-2d3e-4280-8d72-f41d2a465a78",twitter_handle:"Coinkite"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/cd6b8d64-bd52-4f1e-86b3-ca8ba2eb169f.jpg",keyword:!0,link:"https://anchor.fm/s/9500fad8/podcast/play/62615840/https%253A%252F%252Fd3ctxlq1ktw2nl.cloudfront.net%252Fstaging%252F2022-11-23%252Ff9ece2e5-a873-2d6a-d49f-602887e5b810.mp3",node_type:"clip",pub_key:"039c26c7a2f03083901b6c9ef94c3d9f12f88f348965dddd5ab54635993728007c",ref_id:"5d13b0d2-3755-4363-9361-4b431f57b9c6",show_title:"Bitcoin.Review",text:"money. This is one of the reasons why as much as morally and sort of like personally I don't like, I'm a big believer that 70% to 80% of the world's population is going to use custodial, right? Because in Custodial you don't have any of these issues. You can still have more ethically aligned custodials where they're not fractioning and they're not screen users. But no, you can't an IOU is free to move. Sorry, what did you say? Right. No, you can't. That's the problem with custodial. Whenever you give an hour to do. Because there's cost of capital, right, there is always an opportunity cost on the capital. I mean, you see this with bitcoin back loans, right, and chain. It's not their coins and they cannot move the coins without you seeing it. So they're going to charge you 14% interest on it. While other lending platforms that may not be like, they're not like evil or anything, they're just sort of like using a different business model, right, to be able to offer you say six, seven, eight, 9% interest, they have to lend out that coin because they have to find money somewhere else. These are always the challenges when it comes to this stuff. But again, because at least in my view, the amount of at least for the foreseeable sort of future, the transaction economic transaction size for Lightning, for mobile operation, right, we're going to probably talk about a person will be using like the equivalent of a low sheety credit card. So like say five hundred dollars to one thousand dollars a month, that's their economic capacity for a month, right. So those transactions are still reasonably okay. So if you have a billion people, that's a trillion dollars that you need of economic capital stuck in this Lightning sort of like liquidity providers, it's not that much money. It sounds like a lot of money to us, but like it's not a lot of money when you're talking about payments and other value adds that you may pull money from. Because Lightning still benefits from being essentially a business in the middle, right. You still can nick one dime people, and I mean this in the nice way of describing it, but you have means of taking a cut of things of asking for a set here and there, for that specific feature, for going faster, for this and that. Right. While in Bayeslayer there is no way of making money as a business in the middle. That's why I sell hardware and I sell it once people get their code card. They pay me once and that's it. The customer is gone. I could technically make a feature in the wallet that sort of sends one output to us, but nobody's going to use that and they're going to just change the software and flash the firmware and then it's gone. So I do find this very interesting. The Lightning since the beginning is that there is a path to monetization and when there is monetization, there's features, there's interesting things that you can do because there's money. And it seems like everybody is trying to create models where they do make money. That to me is the best part of Lightning. Really. Sorry colleague, go ahead. I just want to bring a little bit nuance to what you just said because I think it's very interesting, especially enlightening if you look at funds locked up in a Lightning channel that can generate some sort of yield which is directly tied to the usage of the funds. So it's a utility basically that pays you as a node operator and we are seeing many, many people on the internet trying to make a buck from forwarding payments. So the thing that I want to add though is that I think we are suffering a little bit from a fiat mind here, which is that you have a clear separation between institutions holding your money and the users moving that money or a ledger entry on a database of that institution. So we tend to think in this binary way that you have a big corporation handling the money business and the little user shoveling it around. And I think that's where I see Bitcoin, Shine and Lightning as well, basically where we have these different layers of responsibility that could be the on chain wallet and then a Lightning note on top and then a custodial wallet on top of that. Because now for the first time, you can become the custodian of your community as well. Say you have a school, say you have 1000 students there, right? So on a piece of paper you can calculate we won't be able to open channels for everyone in the near future. So obviously that makes things custodial solutions kind of a necessity if you want to scale too fast or faster than possible. But now, for the first time with Bitcoin, the school can become the custodian of the students, right? And this wasn't possible before. You cannot create a credit card on behalf of the school, give them to the students to use that right? And especially having money on that credit card that they can use to buy other stuff as well in the grocery store or whatever. So I think the spectrum of custody ranging from one chain up to completely no control except for database entry, is much broader than it actually looks. If you look at only the banking world and how we handle money in. The fiat world yeah, for sure. When I mean like a business in the middle, it's more like a value add and the size of the business because that's where the business logic lives. It can be as a single user, right? Just helping say you're the dad and you just run the nodes for the house and you want to take a cut from your kids. Kind of joking. But it could be the Uncle Jim in the neighborhood. This scales from a unit all the way to Visa size. It's really cool in that sense. Of course they will have different challenges and different sort of requirements and stuff, but the dynamic is very similar. You do expand into this sort of like pay to play in a way, right. The person offering you the value add has a way to receive money now and that was not possible before, right? It's like the Podcasting 2.0 stuff. There is a way for you to collect value either by the dynamics of the network because you're providing an actual service to that specific transaction or you're just like an auxiliary to it providing some other form of value add. Right. Because again, you can transport 10,000 of a dollar right now, economically speaking, right. That is a reality right now. That was just never possible before. Even with IOUs in a bank, they were never able to go that low. Right. Because we're talking about mainframes in like 1950s, 1960s here, right, where a dollar was like a lot of money and if they were able to have that dollar broken down all the way to 10,000 of a dollar in those days was actually economically meaningful transaction in aggregate, right? Or they weren't or maybe that was not fought. So it's just really cool to have this total dynamic change now because when you're talking about 10,000 of a dollar fee on something that's palatable, right? And when you're talking about like 8 billion people transacting, that's also real money. It may not be the kind of money that Visa used to make, but it is a lot of money for a lot of small companies that are providing value to a lot of people. Right? It's just so cool how this dynamic changes. A lot of times the reason why you see pricing models not tied very closely to value, a lot of times it comes down to metering, right? So because in Lightning, the atomic unit of movement is a payment, you can meter at the individual payment. So you can charge a 10,000th of a cent per payment. And if you have an application that uses payments as like atomic user interactions, like you're doing Podcasting 2.0 and every minute there's a payment, you can meter your value add at that level and not have to do something like a monthly subscription, or not have to do something where users feel like they're paying too much for not enough service. And I was referring to 10,000 of a cent dollar meaning something that's still sort of economically interesting to two parties right now, but we can do 100 million. It's just crazy how small this gets, right? So we have a lot of runaway as a unit bitcoin versus dollar increases in price. Anyways, ",timestamp:"00:39:06-00:48:42",topics:["Lightning Network"],type:"podcast",weight:10.619592564456063},{boost:0,date:1639872e3,description:"Big States Bullies",episode_title:"PFP016 Remigijus Šimašius, Bullies as Neighbors-on the Foreign Policy of Small Countries (PFS 2008)",guests:[],hosts:[],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/624262ef-b30f-4114-8061-e310187e6bb4.jpg",keyword:!0,link:"https://www.youtube.com/watch?v=0WAituFO614",node_type:"clip",pub_key:"02574d6e8e787372184b6f17c40d6c6fe1777db9015801f95dfd24692784d767cd",ref_id:"c5d2ef78-9d30-45ab-8d1a-edef9b356569",show_title:"Property and Freedom Society",text:"of how to deal with putting but before going to details let me see about some challenges but in fact it's not true and then publicist we are also included studying the fact that all big nations were small nations and the fact that world wars small nations do we survive and actually as political mission points out there is usually help coming from abroad for small occupied reasons because there's no army pieces like this table and this country opposite arguments historical arguments and you may have very different issues and in fact historian travel studio said when words do occur and he said that essentials money would and of course really sometimes it's a good structure. And one more interesting thing is that historical numbers also show abroad industry in genesis of states and wars and wars it made the operation which is like capital and then the strongest one capital press which actually finances some Buddhists in order to period afterwards it was about one circle and economically and looking from the other hand but actually there were strategies with wishburg was very intensive which was even more intensive between them and there was again some accents which created an atmosphere of an image that is very unsafe for stormers was fighting against Russian fascia especially in the right part of the World War II. And then another stress it was cooperation of the Zealand because the participation of the unions in Communist Party was much much higher than the traditional and it meant that they have stronger power how dealing in such a difficult situation of course there is in order to keep the conflicts between and Poland alive because they didn't want Poland between Alaska and Soviet to make an alliance against possible threats from Russia. If we had this kind of alliance quite different of course obeyable is again quite a sense. And just like this was quite example in ancient times. And for example all the actions of citizens who actually were choosing Decembers very often. So anyway this is twice and very much ",timestamp:"00:11:14-00:25:56",topics:["Sanctions","Russia","World War II","Soviet Union"],type:"youtube",weight:4.108680856598606},{boost:0,date:1665446400,description:"What are users behaviours on the Lightning apps",episode_title:"Austin Bitcoin Club: August - Value for Value Panel",guests:[{name:"Justin Rezvani",profile_picture:"https://pbs.twimg.com/profile_images/1574666257781104641/hWG0vkSQ_400x400.jpg",ref_id:"b00877d0-ccbe-4c77-9c8c-88ab15063150",twitter_handle:"justin_rezvani"},{name:"Lyle Pratt",profile_picture:"https://pbs.twimg.com/profile_images/1477702801962721285/KqnrA7oU_400x400.jpg",ref_id:"ab752a01-84bb-4260-a683-2eb5798b1dce",twitter_handle:"lylepratt"},{name:"Keyan Kousha",profile_picture:"https://pbs.twimg.com/profile_images/1403763601391951878/ybuppfHt_400x400.jpg",ref_id:"7ef39c9b-63ba-4dd0-989e-2230afb45129",twitter_handle:"k00bideh"}],hosts:[{name:"Kevin Rooke",profile_picture:"https://pbs.twimg.com/profile_images/1090667005055627264/67EgQy25_400x400.jpg",ref_id:"ff98589a-b761-4996-80ca-786d04e30060",twitter_handle:"kerooke"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/b29c81c8-cccd-4a6b-b78f-3c1591a54d27.jpg",keyword:!0,link:"https://www.youtube.com/watch?v=Kjt4ggwFTfo",node_type:"clip",pub_key:"02574d6e8e787372184b6f17c40d6c6fe1777db9015801f95dfd24692784d767cd",ref_id:"876e20ef-be1b-44e6-a77d-4af5beb33ad4",show_title:"Austin Bitcoin Club",text:"It's like the instant settlement and also then the small the ability to do these super small transaction sizes that you couldn't can't be supported on credit cards or other fiat networks. I think one really interesting thing to think about is that today we may have a very small number of people using Lightning, but we have about 100 million people in the world with access to Lightning on the apps already on their phone. The biggest source of that being cache app with 70 plus million users. But we got Paxful and Cracky and a bunch of others, Robin Hood's planning to integrate it. So it does kind of feel like we're waiting for the killer app to show up, and when it does, it's like we have all the tinder ready to go, we're pouring oil on the fire, and we get one match. I think there's a real case to be made for, like, an app that quickly gets up to 10 million users, because we have all these people who have lightning access, haven't realized it yet, don't really care about it yet, but in the right context, it might be really easy for them to switch over and go, oh, this makes sense. I want to ask you guys all about the way users are using your apps today. What has surprised you guys the most? Maybe we could go through start with you, Justin. The number of communities people want to start. That was very surprising. Like, we had, you know, with only about 2700 creators, they created over 1400 communities. So that was a big surprise. Like, I didn't think that people actually wanted to create their own destinations on the web. I thought they just wanted to follow the most influential people. That was a big surprise. And then just transaction volume. We did 120,000 transactions in the first six months of the business. I didn't even think people wanted to give each other stats. I didn't know I didn't think it was going to be a thing. It's a thing. People want to do it. So the question becomes, in our next version that we're trying to launch in. October? How can we accelerate that transaction volume? How can we build a system that makes it much faster to transact and send money quicker with just user actions inside the UI UX? Those are two things that surprised me. What was the most surprising thing for you? Loud. Honestly, I think it's been the amount of sort of business development messaging traffic. Sending messages has been by far and away the most popular thing so far. Not so many video calls, a good amount of streams. I FaceTime you once, I was like. On a run, it was like 10 seconds a minute. What are we doing here? It's great, but it's kind of surprising. Like, I'll see messaging traffic and look at user stats that have received messages and just reach out to them. They're like, what are people messaging you about? And a lot of times it's like, oh, well, they work in Bitcoin, and I wanted to see if I could set up a call with them to talk to them about XYZ. It's a totally reasonable use case for monetizing your time, and it seems to be what people want to do. So do you think this is going to be big for, like, consultants and people paid by the hour? Is that going to be yeah, I mean, you know, imagine like, you're some dude that works in some software enterprise, like, you know, let's say Cisco, and you're like a mid level exec and you get people trying to sell you shit all the time, right? 24/7. You're getting emails, you're getting phone calls, you're getting all this stuff. And I sell software, and I'm trying to target this person in Cisco with my software so that he'll buy my software. So what are my options? I can try to get his email address and target him with LinkedIn ads and spend maybe 2000, $3,000 and maybe he clicks them and reaches out. I can do the same thing on Facebook. I can cold call them and annoy him. Or if he's got a Vida account and he's set a price for his time, maybe it's $500 an hour to talk on the phone, but somebody can call him immediately and get his attention with 100% certainty and know for sure if he's going to buy the product or not. And it's way more efficient than hoping that somebody clicks an ad question on that. Does the company get the $500 or. Does he personally in this case, he personally, but we have had quite a few people that said, well, what if I wanted to set up a company account where my employees have Vita accounts and then they're getting a split and the company is getting a split or something like that? So it's an idea we're exploring. Kind of like split payments on the Fountain app, honestly. Right. Kean, what's been the most surprising thing for you? Seeing stacker. News grow. I think that there isn't a lot of resistance to as much resistance to spending when people are earning. I mean, this isn't like a huge economic insight, I guess, because it's exactly how most B to B companies make money. They allow people to make more money using their product than they would if they hadn't, so they can charge that margin. Yeah. And so I think that's kind of it, that these are micro economies, they're still economies, all the incentives are the same, they're just tinier, or at least stacker news is tinier, and so the same rules kind of apply. That makes sense. Yeah. It's kind of like if you spend a couple of years printing a lot of money and air dropping it to everyone in the world, they're going to spend it. Right. If you give people money, they'll figure out a way to use it, for sure. ",timestamp:"00:27:43-00:33:30",topics:["Lightning apps"],type:"youtube",weight:4.232409343387016},{boost:0,date:1626724415,description:"Final thoughts and guests contact info",episode_title:"WHY ARE WE BULLISH? Jeff Booth, Alyse Killeen, Marty Bent, Vijay Boyapati ep187",guests:[{name:"Jeff Booth",profile_picture:"https://pbs.twimg.com/profile_images/1362957991410954241/spiaMAg2_400x400.jpg",ref_id:"f1143bcc-9ab9-4716-8259-0e5b026f8039",twitter_handle:"JeffBooth"},{name:"Alyse Killeen",profile_picture:"https://pbs.twimg.com/profile_images/1469812274223194115/nynN-53X_400x400.jpg",ref_id:"4612f685-03a9-4ff7-8dbd-153db478effc",twitter_handle:"AlyseKilleen"},{name:"Marty Bent",profile_picture:"https://pbs.twimg.com/profile_images/1362747135981199370/mSy97J12_400x400.jpg",ref_id:"655bdcb1-21c3-411c-aa24-fe7e4c7a248c",twitter_handle:"MartyBent"},{name:"Vijay Boyapati ",profile_picture:"https://pbs.twimg.com/profile_images/1383215714056605700/49XT3cEZ_400x400.jpg",ref_id:"0e976bc7-e7d6-4666-85f3-6b7c19be3b2f",twitter_handle:"real_vijay"}],hosts:[{name:"Benjamin Tyler Perin",profile_picture:"https://pbs.twimg.com/profile_images/1602307254937866240/CKiRrFui_400x400.jpg",ref_id:"b3ebb661-634f-48db-b063-1a277fdc2f82",twitter_handle:"BTCsessions"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/419512c2-e309-4b25-bfe2-cd481d53f66d.jpg",keyword:!0,link:"https://anchor.fm/s/11e95d20/podcast/play/37508074/https%253A%252F%252Fd3ctxlq1ktw2nl.cloudfront.net%252Fstaging%252F2021-6-19%252Fb68e9969-564d-3bd0-e65a-629ff8e395df.mp3",node_type:"clip",pub_key:"",ref_id:"310c587e-f3a7-4fbe-aacb-e9b0e73726d1",show_title:"BTC Sessions",text:"it down the line one last time just to get you guys to once again remind people where they can find you and any final thoughts you may have. So, Marty, why don't you leave us up, let people know where they can find you and any final thoughts you might have. Hang on. Twitter allow you find me at Marty Bent. I just like to echo what Jeff said there at the end. Lean into conspicuous consumption, really does a lot of damage to the environment and makes us consume more. Whereas arguably, if we had a sound money standard via bitcoin, the opportunity cost that consumption rises. So you're forced to be more efficient, which would help the environment. Absolutely. How about you, Elise? Where can people find you and any final thoughts? Well, there's a link for founders on Stillmark.com to reach out. I have open DMs on Twitter. Maybe a mistake and, yeah, it was a lovely way to spend a Friday, guys. Thanks for having me. Thank you. And Jeff, one last time, where can people find you and any final thought you may have? I'm with Marty. Best places on Twitter at Jeff booth and Marty, at least. Ben, this was awesome. Thanks a lot for having me. Yeah, it's been a pleasure. Thanks for putting this together. Ben, Lisa, pleasure to meet you finally. Awesome, guys. Thank you. Thank you, guys. All, I'm going to cut your audio video and do my intro here, but all of you are welcome back anytime. Thank you all and everybody watching here, thank you so much for being here. Now, I was talking earlier and I was talking about a block block and I was trying to think of the best way to do this. I was talking about all the comments in here and I'm just kind of seeing who stuck it out. We still got 280 people in here. I've got to say, there was one moment during the show, there was a comment that gave me a good giggle and I hope that the person is still here, the accountant, the bitcoin corporation, when he said print the crap out of everything and that gave me that gave me a good laugh. It was perfectly timed with what Jeff was saying. So, dude, if you trust me enough with your information to send you a block clock, yeah, you were very quiet during the show with nonstop caps locks. Dude, if you trust me with your information to ship a block clock to you. I can do that. What I need you to do is just shoot me a quick email and I'm going to have to verify in some way, shape or form who you are, the best way to do that. Or you can add me on Twitter. My Twitter handle is just BTC Sessions, or the email is BTC sessions@gmail.com, and I will do my due diligence to make sure this is the right person. But just let me know that you're on the show and we'll chat and we'll figure some stuff. Yes, small caps are broken, I'm sure, man. Anyways, guys, the accountant, the Bitcoin corporation, reach out to me. We'll get chatting and I'll make sure that, yeah, via Twitter. Cool. What's your Twitter handle? Put your Twitter handle in the chat right now and I'll make sure that I have the right person and, yeah, everybody else that's watching, of course, thank you so much for being here. As always, make sure you hit like, Sub, Share, all those things help so much. They get this in front of more eyeballs. And I always love having you all here. ",timestamp:"01:26:07-01:29:59",topics:[],type:"podcast",weight:4.075675964358401},{boost:0,date:1673991804,description:"Introducing Schmidty and his work at Bitcoin Optech",episode_title:"BR020 - Zeus, Alby, Bitcoin Knots Keys Leaked +MORE ft. Sjors, Schmidty, Evan Kaloudis & Justin Moon",guests:[{name:"Sjors",profile_picture:"",ref_id:"fa5c587a-09ef-4cbd-b470-cfc78163f749",twitter_handle:""},{name:"Evan Kaloudis",profile_picture:"https://pbs.twimg.com/profile_images/1596923848997445633/DqxrGpkW_400x400.jpg",ref_id:"420172fa-9431-4ba4-965c-adab17648d1b",twitter_handle:"evankaloudis"},{name:"Schmidty",profile_picture:"https://pbs.twimg.com/profile_images/1334879848280494083/A6ssSEfV_400x400.jpg",ref_id:"28f55137-e733-4f5b-b988-7cb60ef0d330",twitter_handle:"bitschmidty"},{name:"Justin Moon",profile_picture:"https://pbs.twimg.com/profile_images/1512674225651335169/iYHDJQcy_400x400.jpg",ref_id:"1d2cdf64-358f-4b00-8f2b-0c94f798dc2c",twitter_handle:"_JustinMoon_"}],hosts:[{name:"NVK",profile_picture:"https://pbs.twimg.com/profile_images/608402052247658497/ENDv0BNd_400x400.png",ref_id:"d754e29b-2d3e-4280-8d72-f41d2a465a78",twitter_handle:"Coinkite"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/f1879df9-9bc6-4a76-951f-24548da768ef.jpg",keyword:!0,link:"https://anchor.fm/s/9500fad8/podcast/play/63636824/https%253A%252F%252Fd3ctxlq1ktw2nl.cloudfront.net%252Fstaging%252F2023-0-17%252Fa8844ef8-32a4-a7cb-a945-627aad9505c1.mp3",node_type:"clip",pub_key:"02545c14cbb18a61f20dd45f5e3dcbd9acae3de282369501040adce32a75311309",ref_id:"62034201-203b-42ff-9884-a850d6298caf",show_title:"Bitcoin.Review Podcast with NVK & Guests",text:"Very cool. So Mike, why don't you don't you give us a little intro about yourself at bitcoin op tech? I think a lot of people don't know much about it. Yeah, I think we, we do a good job, but we don't do strong on the marketing front, which is maybe common for a lot of the tech folks in this space. So, Mike Schmidt I have two different roles in the bitcoin ecosystem. The first one is executive director at Brink and Brink is a 501 charity in the US. That our mission is solely to support open source development in the bitcoin ecosystem with a particular focus on bitcoin core developers and getting them funded. And we've been around two years sponsoring eleven different developers and a bunch of those are in London in an office working together on bitcoin core. And then the second part of my work in the bitcoin ecosystem is a contributor at bitcoin Optech. So there's a few of us that get together. We're most known for our technical newsletter that covers weekly updates in bitcoin open source work. So bitcoin core, the lightning implementations and some other projects that we cover as well as any news from the mailing list. And so if there's anybody who's interested in bitcoin review and is a subscriber here, should obviously also subscribe to the aptech newsletter. It's a good way to stay up to speed without having to go through IRC meetings and mailing list posts and things like that. And we also have done workshops in the past. What's that choice? It's a great mailing list. I was going to find things that got merged in bitcoin core through the mailing list, not always through the notifications. What I was going to say is that if you have nearly unsubscribed or muted the mailing list due to the RBF discussions and everything else like I did, bitcoin optic is a fantastic way of keeping up to date. They also review some of the stuff so they'll put like pertinent commentary on the topics and on things that you would likely miss because bitcoin core does get the fake news rhetoric about not much is going on, but it is an absolute cluster of amount of stuff that gets worked on. If you ever done anything on bitcoin core, you're going to very much understand what rebates means to that point. In the last month, at the end of the year in December, optic put out our annual Year in Review, which summarizes everything that OPEC has covered and that has happened in the ecosystem for that last year. And one of our little statistics that came out of that is people say nothing's happening in bitcoin. There's no innovations, there's no interesting discussions going on. And we published just our little publication put out the equivalent of a 200 page book on the development and discussions that are happening in the bitcoin ecosystem. I believe it. Yeah. I mean, I know this from my own book. It's like 200 plus pages, but if I had transcript every episode, it would have been just ginormous. And the episodes cover only a small part of what bitcoin is working on. So, yeah, there's plenty out there. It's just less marketing department and some of the things sound less cool than Sharding and to the Chess and NFTs. Hey, you're not looking for a 5.4% yield on Staking. Ethereum? No, I thought it was up to. Seven and a half. You just don't get your coins right. I don't know, man. Yeah, that's right. They're locked forever. ",timestamp:"00:03:40-00:07:24",topics:["Schmidty"],type:"podcast",weight:21.362822151492544},{boost:0,date:1668116851,description:"Challenges of orange pilling the family ",episode_title:"UFC @NicolauMatheus - @LuPinheiroMMA - Fighting for #bitcoin! #296",guests:[{name:"Matheus Nicolau",profile_picture:"https://pbs.twimg.com/profile_images/1600020909946912768/LlhR_2HX_400x400.jpg",ref_id:"be94e55e-4b46-4b37-92bb-431496b067de",twitter_handle:"NicolauMatheus"},{name:"Luana Pinheiro",profile_picture:"https://pbs.twimg.com/profile_images/1461887787406221317/EFrMNheP_400x400.jpg",ref_id:"219d8df1-3a60-41ff-8aa4-d08992f49148",twitter_handle:"LuPinheiroMMA"}],hosts:[{name:"Lauren",profile_picture:"https://pbs.twimg.com/profile_images/1586022214901501952/U1dRyCxP_400x400.jpg",ref_id:"7f14bbf5-a60b-496b-a361-3663cf120299",twitter_handle:"LaurenJauregui"},{name:"Daniel Prince",profile_picture:"https://pbs.twimg.com/profile_images/1589940494364205056/rnHs5gI3_400x400.jpg",ref_id:"df2d4d35-3e96-44ed-b1cc-cb8a714bbe30",twitter_handle:"PrinceySOV"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/e1eca67b-d372-4031-bf1f-8f0ff7fe6092.jpg",keyword:!0,link:"https://anchor.fm/s/1346f9e8/podcast/play/60430338/https%253A%252F%252Fd3ctxlq1ktw2nl.cloudfront.net%252Fstaging%252F2022-10-10%252F62ad9fbe-64bf-f20b-66a5-c8e493cfe60f.mp3",node_type:"clip",pub_key:"",ref_id:"ccc45d70-f16e-498f-9f66-12cf8a221337",show_title:`Once Bitten! + svg { + font-size: 22px; + color: ${colors.secondaryText4}; + } -A Bitcoin Podcast. -`,text:"do you try and explain it to your parents? Has Luana tried to explain it to parents, brothers, sisters? She said that for her parents was kind of difficult to explain because they're kind of old school, they are older and they didn't know much about the technology and everything around technology and computer, they don't know much about it. But some of her brothers already have cryptos and know a lot of not a lot, but they know about cryptos and Bitchcoin and everything. So they support her since the beginning. That's good to hear. What's not good to hear, I suppose, are the other cryptos. We try to steer clear of those. Have you both kind of come to that conclusion yourselves, that there is Bitcoin which is safe and stable and sound money and there's others? I'll start from me, since the beginning, from few years ago, before, even way before I was starting to receive in Bitchcoin, I already knew and heard about Bitchcoin. I knew a little bit about crypto, what's going to be the technology, something new, but I knew at this I heard that the Bitcoin was like the most powerful, the most trustful crypto. And for me, and for one, I think as well, for now, we are just receiving in Bitcoin because I don't want to be doing like trades and stuff like that. So like I said, I put just a small amount in Bitcoin. All the market right now is down the price of Bitcoin. I really believe that we're still going up in the near future. So we're putting all our money for now in Bitcoin because for me it's the safest way for keeping our money. And does Luana feel the same way? She's seen the other cryptos. She said that at the moment the only thing that is in her mind is the Bitcoin. She doesn't feel safe to put her money in other cryptos right now and it's not her idea. Perfect, wonderful. Stay like that because there are a lot of people out there that are going to try and contact you, especially because you are in the public eye, because you are fighters. It's a dangerous world because people will come and try and sell you things that are not good for you or your family. She said that when she announced that she was receiving Bitcoin, she received a lot of message telling her to be careful with some crypto and telling the cryptos like, oh, you received it in Bitcoin, but be careful with that and that and that crypto because it's not good and stuff like that. So I think that's why she also stay only in Bitcoin. It's very difficult for people in your position when you have this fan base that other people can use you to sell to them. So I would certainly be wary of people coming to you offering you money just to say, we have now decided to buy X-Y-Z cryptocurrency because you could end up in a lot of trouble. Like Kim Kardashian. What happened with Kim Kardashian? She was receiving. She put a lot of money, specifically. Crypto, and she was paid by another cryptocurrency to say something about that cryptocurrency on social media. And she was paid a lot of money, but she then didn't report the money that she had been paid. And so she faced a criminal charge from the securities and Exchange Commissions in the United States. So just by aligning yourselves with these other projects could really end in a lot of trouble for that influencer. Got it? Yeah. So just stick to Bitcoin because there is no CEO, there is no marketing department. You know all of this already, so ",timestamp:"00:13:34-00:20:33",topics:["Bitcoin price","Orangepilling challenges","crypto"],type:"podcast",weight:4.788048102306679},{boost:0,date:1629691200,description:"[[Lightning]] is chain agnostic",episode_title:"WHY ARE WE BULLISH Bitcoin Meme Hub Jan Capek Bitcoin Mechanic Max Hillebrand ep195",guests:[{name:"Max Hillebrand",profile_picture:"https://pbs.twimg.com/profile_images/1311357499514269696/-HQFwyFH_400x400.jpg",ref_id:"9a86cc59-ed01-4757-88f6-e9d9d63067b9",twitter_handle:"HillebrandMax"},{name:"Bitcoin Mechanic",profile_picture:"",ref_id:"faae3a37-0115-4074-af21-7d79c429c7cb",twitter_handle:""},{name:"Jan Capek",profile_picture:"",ref_id:"ec6f8b14-6c4b-42e9-8e86-9aa902c0906d",twitter_handle:""},{name:"Bitcoin Meme Hub",profile_picture:"",ref_id:"dcd5a590-2018-4707-a49b-8142d7b14e33",twitter_handle:""}],hosts:[],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/419512c2-e309-4b25-bfe2-cd481d53f66d.jpg",keyword:!0,link:"https://anchor.fm/s/11e95d20/podcast/play/39201536/https%3A%2F%2Fd3ctxlq1ktw2nl.cloudfront.net%2Fstaging%2F2021-7-23%2F214267789-44100-2-17e9fbafdf841.m4a",node_type:"clip",pub_key:"",ref_id:"ba7bc3fe-38e0-47e1-b917-f9e4c005a972",show_title:"BTC Sessions",text:"It doesn't solve every problem. And it's not the only layer two thing that Bitcoin has. And it's also chain agnostic, too. Right? So you can have Lightning on anything else as well, if you want it. So it's not strictly technically, strictly a Bitcoin only project. But let's be honest, all of the Lightning devs. Their requirement for contributing, at least to LND is you got to understand Bitcoin. They're not like, oh, and you also need a firm understanding of BSV or F or one of these shit coins. So I think it's an exciting and good project. It's definitely a reason to be bullish. It's incredibly cool software, but as we all would say, it's early on, it's experimental. Be careful with what you do in Lightning, but at the same time, that's kind of all right, because no one would ever tell you to send tens of thousands of dollars using Lightning anyway. It's not really designed for that. It is designed for small, very rapid payments. It's not designed for big final settlement stuff. And now, just to finish up, now is a good time to open channels on the Lightning network. If you want to get something like an embassy OS or just something far more custom than that, because you want to be online all the time with Lightning, that's one thing to remember if you want to do something like that. The blocks are basically empty at the moment, not empty, but there's a lot of space in the blocks. So it's a good time to open channels and play around. And there's always test. Net as well, if you really don't want to use any sets. So, yeah, that's my piece. But testing things on mainnet makes mistakes very memorable. Can confirm what's your experience of Lightning Dove in a lot. Well, actually, back in 2017, that was still before Lightning being officially usable on maintenance. I did a presentation in Parole New Police, which is a place where the Bitcoinners used to get together and still get together in truck. And I was demonstrating real life Lightning running over, I think, a Litecoin and Bitcoin test nets and did a transaction on there. And by that time, I actually deeply studied all the mechanics. And what just made me super exciting is that when you look at the mechanics of the crypto behind it, essentially the thing that it's trust less is when you look at it, it's super simple in a way. Once you understand it, then you'll be, well, this is a great idea, and you would be wondering why this hasn't come much earlier. But things evolved. So that was back then, and I've been following it ever since then. Now I'm Super excited that we have fine Lashner in place, so that's going to make a few things a little bit more smooth within the Latin network. So I think this is the layer that the smart contracts are going to be running on. I can't think of anything else. In terms of practice, we as a pool, we don't have a really good business case. But I think a year ago when there was the Lightning torch going, that experiment, we were one of the ones holding the torch at like $200. So that Bitcoin that needed to be transferred with the next step was like $200. And that was already a little difficult, but we managed and it was really exciting. So this is my experience. If there is anything that people call the DeFi, this is going to be the place where it's going to be happening. Yeah. ",timestamp:"01:08:24-01:12:14",topics:["lightning","lightning"],type:"podcast",weight:4.075675964374691},{boost:0,date:1669766400,description:"How Konstantin Wünscher came in contact with Lightning network",episode_title:"Meet the Makers: Konstantin & Arvin",guests:[{name:"Konstantin Wünscher",profile_picture:"https://pbs.twimg.com/profile_images/917464868663582720/PMFCqusG_400x400.jpg",ref_id:"5f027fce-7775-4824-b941-d2f4120d2d0f",twitter_handle:"krychtiukmd"},{name:"Arvin Galoy",profile_picture:"https://pbs.twimg.com/profile_images/1429792764464611329/4VQqlZiM_400x400.jpg",ref_id:"e0eb434a-9219-4c57-b9e4-da6ceeaec040",twitter_handle:"GaloyMoney"}],hosts:[{name:"Zapp Ed",profile_picture:"https://pbs.twimg.com/profile_images/1519990234070540288/adGqlFoj_400x400.jpg",ref_id:"bbe7cf1d-cd8d-4d36-926d-76f41b775fbb",twitter_handle:"zapp_ed"},{name:"Moritz Alby",profile_picture:"https://pbs.twimg.com/profile_images/859727763292512258/kiFpZ2vO_400x400.jpg",ref_id:"e88efbf8-3809-4508-a86a-d7bf9effb574",twitter_handle:"MoritzKaminski"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/965489b4-a414-4fd0-ab8c-55911b1596aa.jpg",keyword:!0,link:"https://www.youtube.com/watch?v=CjwjScc0TYg",node_type:"clip",pub_key:"02574d6e8e787372184b6f17c40d6c6fe1777db9015801f95dfd24692784d767cd",ref_id:"abb2867c-0c1e-4cc2-8f60-35322740d3f2",show_title:"BOLT FUN",text:"to you, Constantine. Can you tell us a bit about your background and the first touch point in lightning? Yeah, absolutely. So I guess I touched crypto before I touched lightning, so I didn't come into the space immediately into lightning, right out of the gates. When I finished my degree, I started working in a cryptocurrency firm and they were just making markets across pretty much any sort of exchange and cryptocurrency. And back then I was more interested in the trading part, to be honest. So that excited me. But quite quickly I sort of realized what was wrong with just general, like traditional finance and also bit of crypto. Because basically we are touching both you're moving Fiat and we are moving crypto. And like large scales just realized it's just inefficient. It doesn't work very well. On the feared side, you had like capital controls. You weren't able to move money in amounts and the speed that you wanted to across countries on an institutional level. On the crypto side, it was just like super slow moving bitcoin took free. Confirmation was that like an hour and some exchange also had some sort of like they only moved to once a day and that probably was just because it was just really clunky to use and it was just like on both ends, it was a really bad experience. And so that sort of made me realize in order for this to actually take off, there needs to be, one, improved user experience on this and two, it needs to be much faster. Even crypto needs to be these transactions that they did, they needed to be much faster. And the reason I sort of went down on bitcoin is because bitcoin was pretty much the best or most adopted asset then, institutional wise. Like, people were trading that on large scale, and now I think it's pretty much the most traded asset out there and probably the most stable one as well. It was very sort of practical thinking. And I was thinking, is there anything that makes crypto, like bitcoin faster? And then back then, they just actually just, I don't know how long line that was around, but it was very small then and realized that's around and actually that can improve this whole payment speed quite dramatically. And I think then it was sort of like, yeah, this is pretty much the way to go. This would pretty much solve the problems all that this firm I was working for had in terms of capital efficiency. So I thought I might as well spend my time building some infrastructure for companies like that and start exploring that. Now I'm here. That's pretty much it. Obviously, it had to happen. Like, a lot of things happen in the meantime. In terms of the problems I sort of hit along the way. This was very, like, on the capital markets. First world problem kind of ends. Obviously there's a lot of other problems that it solves, but I guess this was my initial sort of spark where I thought, like, yeah, I mean, there's purpose that needs, like, work in order for finance to progress. But yeah, so this is how I got started. So it was very practical thinking from like, okay, there was a problem, how can I solve it? What's the technologies out there? What's a technology that's probably very likely to continue to exist in the future? And so that was bitcoin and lightning. So it just made sense to me, and that's how it went. Yeah, now I'm here. ",timestamp:"00:01:46-00:05:42",topics:["Konstantin Wünscher","Lightning network"],type:"youtube",weight:6.038835757849391},{boost:0,date:1640926800,description:"[[El Salvador]]'s Government Wallet, [[Chivo]]",episode_title:"WHY ARE WE BULLISH Tone Vays Jaime Garcia Trent Dudenhoeffer KC Hodl ep225",guests:[{name:"Tone Vays",profile_picture:"https://pbs.twimg.com/profile_images/1416821178266787844/T1OkI9ZW_400x400.jpg",ref_id:"da6fc991-7080-461c-86e3-4ac18c2f413d",twitter_handle:"tonevays"},{name:"KC Hodl",profile_picture:"https://pbs.twimg.com/profile_images/1506986051683950592/MMMse9gr_400x400.jpg",ref_id:"b2264dd3-e587-403e-9447-9e99afc1910d",twitter_handle:"kc_hodl"},{name:"Trent Dudenhoeffer",profile_picture:"",ref_id:"3b466176-3bbc-481d-9634-e127a9232404",twitter_handle:""},{name:"Jaime Garcia",profile_picture:"https://pbs.twimg.com/profile_images/953009048642715648/PKaQy5UD_400x400.jpg",ref_id:"f259c6b5-71d6-4c5c-897c-3cfbe80cccc2",twitter_handle:"jaimegarciag"}],hosts:[],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/c8ae0def-c33c-4d17-af4e-31ddaeedaf8a.jpg",keyword:!0,link:"https://anchor.fm/s/11e95d20/podcast/play/45510131/https%3A%2F%2Fd3ctxlq1ktw2nl.cloudfront.net%2Fstaging%2F2021-11-31%2Fc821a6ba-7ef1-35ba-b24e-b96e84186843.mp3",node_type:"clip",pub_key:"",ref_id:"450d6337-33ea-43a4-97f0-928b9d4174eb",show_title:"BTC Sessions",text:"a question regarding El Salvador. I'm wondering there's Shiva Shiva is the government wallet, if I'm not mistaken, on chain, it's not Lightning enabled, is that correct? Yes. Tivo is a funny animal, because I wouldn't really refer to it as a wallet at all. I think it's an app. It's basically like a government bank which facilitates transactions within the Cheebo ecosystem. And in that sense, it works very well. It does have the capability of Lightning, and they have recently upgraded their app so that it functions a little bit better. One of the things that people experience when they went down to the conferences was a bit of a pain point between the traditional Lightning wallets and cheeble. A lot of transactions we had stuck. And so it seemed like the Unchained transactions were a little bit better. But of course, with on chain transactions, we know that there's a bit of a wait and it just sort of defeats the purpose of having a Lightning fast transactions. Right. Yeah, it's a bit of a different animal. And I have been encouraging folks down in El Salvador to sure use Cheebo for some things, but definitely not store a whole lot of their savings on it. And looking back at some of your tutorials and some of the referencing a lot of what you've done in order to get people to use some alternative wallets. Right. But, yeah, definitely when it comes to chival, it's a different animal. I think we could talk about this the whole time we're here. So I won't monopolize any more of it and just throw in that some of the things that I have been on and that normally asked me usually is things like, what does it mean to mine? How do you get Bitcoin things like that? But then after a lot of them just get hung up on that. But after that, it's like, how do I get a wallet? Which wallet should I use? And then I've been working with some actually in the audience there's Daxosa from El Salvador. If it's not the first node in El Salvador, it's like one of the first. And we use your video on how to set up a node for him to set up a node in El Salvador. That's actually so exciting for me. And like he just said, like Greetings from El Salvador in the comments. So shout out. One of the things that he's doing, he's actually because we know that the Chival Point of Sale system was having a lot of issues, even more than the personal wallet. He's working with folks like usually small merchants to set up BTC pay server solutions using his node as kind of like the point. And he's encouraging well, he's not also learning, but he's encouraging other people to set up their own notes and their own Lightning channels in order to set their own POS system so that they don't have to depend on these centralized options that I guess they were necessary evil to have, like that opening mass adoption. But I think that we can all agree that it's something that is almost the entirety. This is a Bitcoin right? Yeah, absolutely. And it almost sounds like the chival wallet was having liquidity issues with the connectivity of their Lightning portion of it. Like if they were having trouble getting Lightning transactions to go through, I imagine it's difficult to onboard millions of people and have a reliable set of inbound liquidity for millions of people right out the gate. But regardless, I highly advocate that people go to nongovernmental wallets if possible have self custody tone, ",timestamp:"00:17:37-00:22:42",topics:["el salvador","chivo"],type:"podcast",weight:4.07567598814776},{boost:0,date:1671663632,description:"How profitable is Antminer S19 Pro?",episode_title:"#Bitcoin and Macro Jam Session 🎸🔥",guests:[],hosts:[{name:"Joe Bonet",profile_picture:"https://pbs.twimg.com/profile_images/1285967527848353824/bwKVva55_400x400.jpg",ref_id:"207abdda-54a5-4eab-980a-ac936c7298e1",twitter_handle:"Joebonnet"},{name:"Danny Condon",profile_picture:"https://pbs.twimg.com/profile_images/1449366565074440194/B_iLnyPw_400x400.jpg",ref_id:"0e671cc8-0dd8-46b1-90be-451b23932fae",twitter_handle:"DannyCondon1989"},{name:"Blake Davis",profile_picture:"https://pbs.twimg.com/profile_images/1532456877602349056/yg52j806_400x400.jpg",ref_id:"ce01300a-c603-4a32-9c98-8b05160a1959",twitter_handle:"BlakeDavis50"},{name:"Mitchelle Askew",profile_picture:"https://pbs.twimg.com/profile_images/435841191524204544/mzKR9KCX_400x400.jpeg",ref_id:"5f69ba8e-c266-4b31-bc1c-10de71e6ff79",twitter_handle:"Mitchell_Askew"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/7c53ad3c-1ce2-4661-8896-4c40dcc23b4d.jpg",keyword:!0,link:"https://stakwork-uploads.s3.amazonaws.com/uploads/customers/2707/media_to_local/81882712-0c04-4852-b4d7-308376f102b3/c0c2c28c-b1f6-4568-8754-c3b7a4faa285.mp3",node_type:"clip",pub_key:"03a3451db4748e483d2e1ee5d0b3a6872253253b57edf4b084a56952b432a224b3",ref_id:"3138e8b2-0b4d-4ddf-876c-b5448436273e",show_title:"Blockware Solutions",text:"sure man. I think like one other point, I'll light on that and then we'll wrap it up here pretty shortly is let's assume that demand for mining is a total demand is a constant, right? And you've got this interesting factor where XPS, you know, it's kind of let's think bitcoin, let's put our bitcoin hats on. Like XPS are relatively scarce. They've only been in delivery for approximately four months. So there's less XPS in circulation than J Pros. Right? And in this, so you've got this scarce asset of sorts to begin with and then as you look at basically Pros being right around breakeven, I think like eight cents, eight point two cents, something like that, is probably the breakeven on J Pros. Right now. That demand, which is a constant over the whole market, is shifting to XPS, which places that incremental premium. So in theory, right, if we get some price recovery, we get a material negative difficulty adjustment and S 19 J Pros become get back in the money, so to speak, right? And for a little bit more of a perceived elongated time period, it's logical to think that if this disproportionate premium still exists that some of that demand will then shift back to the S 19 J Pros. Right. And then in which case, that could be a catalyst for XP price reduction, which would probably coincide with S 19 J Pro. Price appreciation, which is something that we talk about all the time, is central to the point that bitcoin miners are not just yield machines, they're more like dividend paying assets and that asset has a value. So right now, if I'm thinking about, like, buying miners, I'm looking at S 19 J Pros as a probably slightly higher risk yield play. This is not financial advice, right, but just kind of skip on here, but potentially most likely a more lucrative opportunity for asset side appreciation. It's not incredibly difficult for S 19 J Pros to go from 2000 to 4000 in price, but it's more challenging for XPS to go from 6000 to 12,000. And if you're allocating a certain amount of fixed capital towards either of those, your likelihood of getting a more material asset side appreciation on an upside play out is more likely on pros. But the risk there is that you're going to be carrying an asset that might have a very small and potentially negative yield. So I'm kind of down in the weeds here, but that's the way I've been thinking about this lately, so I figured I'd share those insights. Yeah, totally agree. And I think a historical example of kind of what you're talking about, an extreme historical example is kind of looking back at the S Nine, how it behaved during the bear market of 2020. And then up until mid 2021, these rigs were basically like scrap scrap metal. You could buy it for $40 and the rig itself, just holding it actually outperformed bitcoin fairly significantly from the bottom of the 2020 bear market up to the top of the 2021 bull market. So, yeah, that's an extreme example. But yes, if you buy the less efficient machine, you definitely have potentially more upside appreciation. If the price of bitcoin runs on the machine itself, obviously your cash flows are going to soar as well. But you carry that short term risk of, hey, this machine might not be spinning off positive cash flows if the price of bitcoin goes down further. Yeah, spot on, man. Love it. ",timestamp:"00:47:14-00:51:30",topics:["Antminer S19 Pro"],type:"twitter_space",weight:9.950559236875215},{boost:0,date:1672012800,description:"Learning From Bitcoin History and the Importance of History",episode_title:"A Christmas Trip! | EP 20",guests:[{name:"Erik Cason",profile_picture:"https://pbs.twimg.com/profile_images/1528431738145361921/roDCkAUy_400x400.jpg",ref_id:"345e1da8-42ed-442b-8b90-ecb44bab61a1",twitter_handle:"Erikcason"},{name:"FractalEncrypt",profile_picture:"https://pbs.twimg.com/profile_images/1588218887807680512/lFJArP4n_400x400.jpg",ref_id:"888ea071-8312-4aca-b229-7447217e59f0",twitter_handle:"FractalEncrypt"}],hosts:[{name:"Coinicarus",profile_picture:"https://pbs.twimg.com/profile_images/1576751322388373506/Uc4PKada_400x400.jpg",ref_id:"d2cf5b2b-ae0e-439a-a461-9c3e964b4619",twitter_handle:"Coinicarus"},{name:"Walton",profile_picture:"https://pbs.twimg.com/profile_images/1579938510538153994/EYbT5PEr_400x400.jpg",ref_id:"ec8c8747-a001-42ba-ae87-bfdef751b781",twitter_handle:"beeforbacon1"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/e79b1a57-ecd0-4df3-b8ec-1a1a55d047e7.jpg",keyword:!0,link:"https://www.youtube.com/watch?v=MvM9x7_Je0s",node_type:"clip",pub_key:"",ref_id:"87520be0-ad60-48d0-aba6-44aec1452a09",show_title:"Pleb UnderGround",text:"They still believe that their government and their secret services are the good guys. Essentially like Carl Sagan. Their government is their god for many people essentially in the western world. Whether they're wrecked that education system they're training you be a patriot. It's part of this whole thing. Where are you getting your history from? It's from this well of this free public education system. So yeah, I think fully they're doing this in a purposeful way and also I really love to think about what Eric was talking about. The history that we get. You don't think about it too much but it's actually like there's so many holes in history. We actually only have a very small fraction of human history that we understand because it's really history is written by the winners and it's a series of winners. So everybody that's winning, you're kind of getting their version of the story and you're just kind of sweeping away the losers. And every winner is always the good guy. Like Eric wasania like, hey, these are the good guys. Mistakes were made. I just died over here. That was so funny. Like yeah, mistakes are made, we're all good but sometimes we just make mistakes. Like no, all history is a matter of you're getting the story from somebody who's basically feeding it to you and they're at the top of it and basically they're the good guys. So all history is suspect. Which brings us back to Bitcoin which has the one true history that we can all agree on. So I just love that we now have a countermeasure that is widely distributed and that individuals can utilize and leverage for their own self sovereign needs and tools and stuff. So I think that we've always had this history fed down in a I don't know if it's top down way in essence, like you're getting fed history from a higher source. But now it's like, no, the history is widely distributed and if you try to feed me some bullshit, my note is going to reject that as invalid. And we haven't had this before. This is an awesome history actually is. It is fundamentally a proof of stake where they're like hey here's our story, take that on. And when you start to actually do the proof of work in history you find all of those holes and you realize that the blockchain of history doesn't actually sink up in any meaningful way. And that's why it's so important that we now have this time chain because it turns out that the control of wealth is the most important thing that has ever happened. In addition to the fact of that, there has been a constant century long propaganda war against people to understand the importance of that history, not only in terms of the actual historicism of events that have happened, but also the historicism of the actual accounting of how the general monetary system works. Because if you actually understand how the Brenton Wood system came about, it's truly horrifying to realize that we essentially played the shell game where we're like, yeah, we're going to get everybody back to a gold standard. But in the meantime, you guys should all take these dollars that will totally exchange for gold whenever you guys want. We absolutely will not inflate the shit out of it. And this, like, former Nazi bank that we said that we would suspend, let's make that into the bank of International Settlements, because gold from the teeth of millions of dead Jews. That's like a great base to start an international monetary system. To me, that's one of the ones that's so horrifying is realizing that the bank of International Settlements was literally the SS gold laundering bank in Switzerland, and they decided to make that into the world's largest financial institution. What the hell? ",timestamp:"00:24:36-00:28:32",topics:["Bitcoin History"],type:"youtube",weight:11.15302576837389},{boost:0,date:1656979200,description:"Making content royalties accessible through the Lightning Network",episode_title:"Lightning Networks Impact on Music w/ Michael Rhee, Founder of Wavlake - Voltage Twitter Spaces",guests:[{name:"Michael Rhee",profile_picture:"https://pbs.twimg.com/profile_images/1348612450/IMG_0298_400x400.JPG",ref_id:"91302fb9-2d08-400e-bd1f-2d52e0af5508",twitter_handle:"rheedio"},{name:"@rheedio",profile_picture:"https://pbs.twimg.com/profile_images/1348612450/IMG_0298_400x400.JPG",ref_id:"a20f5e1f-5969-47a6-b986-faf29c0c4da0",twitter_handle:"rheedio"}],hosts:[{name:"@voltage_cloud",profile_picture:"https://pbs.twimg.com/profile_images/1508657900486422529/Lfa70poj_400x400.png",ref_id:"3b622187-60ce-43c2-a21f-ae749c2d961a",twitter_handle:"voltage_cloud"},{name:"Bobby Shell",profile_picture:"https://pbs.twimg.com/profile_images/1090426395979890690/uUdaFXo__400x400.jpg",ref_id:"438f8067-3fed-49d2-91d9-5018cb043aac",twitter_handle:"BobbyShell2"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/2ec62250-4755-4616-8342-096a2cfab95f.jpg",keyword:!0,link:"https://www.youtube.com/watch?v=aZt44KjXHh0",node_type:"clip",pub_key:"",ref_id:"c7beffcd-bb44-4cf9-a04a-a26f6439114c",show_title:"Voltage",text:"final, like eight to ten minutes, I want to open the floor because I know I think there's a lot of musicians here. Everyone loves music, and I feel like we all have opinions and it'd be cool to pick your mind and others. But on Friday, and I mentioned this to you before, I'm dropping a little article. It's like a 1 minute read on how I think Lightning could help just content creators who are not musicians. And even though I am a musician, I wanted to make a video file documenting my son's life. I tried to use a song that was copywritten. I knew I couldn't use it on YouTube because I get the internet. And when I tried to post it, it was flagged immediately. And I was just like, cool. At least I tried, but I was just like, how cool would it be if I could pay via Lightning? If I wanted to use this audio file, an artist could say, I'm going to charge this many SATS per listen. And it can almost be fragmented to where if someone watches 1% of the video, 10%, 20%, I want to be able to pay a small fee to allow people to watch it. And the thing for me is I only have family members listening. I might have 30 views in like a one year time frame, but I want my mom and dad to hear what I'm creating. And this obviously could scale to an infinite amount. But the thing is, it removes middlemen. You brought up some points where people could sample music. There's even bigger ways that can be used. But I just feel like that is transformative to the industry and it just gives people access to things they didn't have before. To create movie scenes that are more compelling, to create music that is more sonically beautiful, and to just reshape history in a way. And I think, like Steve Jobs said, what no idea is original, everything's stolen, or whatever. And it's just like hip hop was based off samples. When you look at the most popular music, it is hip hop and rap music. And to think about how things in the past can be repurposed for future innovation, it's abundantly clear that that's necessary. If I can just add one more thought to that. I think to everyone's detriment, I think we've been conditioned into thinking that the copyright for content I think we've been conditioned into thinking that all content should be locked down in this really severe and restrictive way. And that's the best way for artists and creators to be recuperated for their work. And I think that's a fallacy. I think this idea that we have to lock everything behind paywalls is not necessarily beneficial to the creators. If anything, what we've seen is that these very large platforms have been able to derive enormous profit off of this model. And just because content is available online doesn't necessarily mean you lose the copyright to it or the rights to it at all. Gigi has written really interesting stories about this, about this value economy and this idea that content online, it's incredibly trivial to make a copy of an MP3 or a video file or any other media for that matter, on the Internet. And so with that in mind, does it make sense for us to create all of these barriers to entry and barriers to sharing? I think that's a big question that we're going to be exploring with wavelength over the next couple of years. Is challenging that concept and also challenging the idea that artists are benefiting from the current regime? ",timestamp:"00:29:28-00:33:28",topics:["Lightning Network"],type:"youtube",weight:4.076299375088045},{boost:0,date:1640926800,description:"Adopting to [[Bitcoin and Mining]]",episode_title:"WHY ARE WE BULLISH Tone Vays Jaime Garcia Trent Dudenhoeffer KC Hodl ep225",guests:[{name:"Tone Vays",profile_picture:"https://pbs.twimg.com/profile_images/1416821178266787844/T1OkI9ZW_400x400.jpg",ref_id:"da6fc991-7080-461c-86e3-4ac18c2f413d",twitter_handle:"tonevays"},{name:"KC Hodl",profile_picture:"https://pbs.twimg.com/profile_images/1506986051683950592/MMMse9gr_400x400.jpg",ref_id:"b2264dd3-e587-403e-9447-9e99afc1910d",twitter_handle:"kc_hodl"},{name:"Trent Dudenhoeffer",profile_picture:"",ref_id:"3b466176-3bbc-481d-9634-e127a9232404",twitter_handle:""},{name:"Jaime Garcia",profile_picture:"https://pbs.twimg.com/profile_images/953009048642715648/PKaQy5UD_400x400.jpg",ref_id:"f259c6b5-71d6-4c5c-897c-3cfbe80cccc2",twitter_handle:"jaimegarciag"}],hosts:[],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/c8ae0def-c33c-4d17-af4e-31ddaeedaf8a.jpg",keyword:!0,link:"https://anchor.fm/s/11e95d20/podcast/play/45510131/https%3A%2F%2Fd3ctxlq1ktw2nl.cloudfront.net%2Fstaging%2F2021-11-31%2Fc821a6ba-7ef1-35ba-b24e-b96e84186843.mp3",node_type:"clip",pub_key:"",ref_id:"193f741e-2e1e-472f-a152-4514cb6d6372",show_title:"BTC Sessions",text:"the media, probably because of its energy output, and people will think, okay, well, if I'm buying Bitcoin, I might as well mine it. Right? That sounds like the best way to go about it. And at that point I'm like, all right, pump breaks a little bit. All you really have to do is download Swan, get a recurring by going every single day or every week at the very least, and then download this blue wallet here. And then when you feel comfortable, like write down your seed phrase, send it over to blue Wallet, and then you'll be holding your own keys. So, yeah, a lot of people go for that mining right off the bat, but it really doesn't take much to be sovereign with Bitcoin. And that's like the beautiful thing about it. So it's just those baby steps. But I think that getting them on the right exchange is arguably the most important. I used to send everybody to Coinbase. That's how I started to. And now Coinbase is the coin casino, as a lot of people would say. I can only talk so bad about them because that's how I started buying Bitcoin in the first place. But with other options like Swan or river that only have Bitcoin, I think that that's a great way to kind of mold a new coiner into only buying Bitcoin and staying away from unregulated securities. Two things about what you said there that really stood out to me. Number one is the baby steps, right? You can throw everything in the kitchen to sink at somebody when they first walk in the door, but they're going to turn right back around and leave. And so getting those small attainable goals that they can just reach out and grab and then move on to the next, I think is very, very important. Something as simple as get off zero. And like you said, set a recurring buy. And then the next step is just some self custody, like learn how to use a wallet and then you can hit the ground running. But the exchange is important piece of it. And you're right. If you throw somebody into a situation where the first thing they're greeted with is 100 other coins that are treated with the same amount of, what's the word I'm looking for? That they're equally as viable as Bitcoin. It's setting somebody up for failure. They're promoted as equally viable. They're not, but they are promoted as such. And Coinbase is one of the big promoters of everything, basically. Yeah. They have all the courses until the SEC goes after for security and then Ripple gets removed from Coinbase over there. Yeah, absolutely. I'm wondering when that's going to. I mean, obviously regulators are slow to act and I'm not like a huge I err on the side of people making their own mistakes. But at the same time, regulator is going to regulate, it's going to happen. It puts us in a tough space. I was one of the first to drive that bus on YouTube, warning people that these are all unlicensed and registered security, starting with Etherium back in 20, 16, 17 days. And it puts us in a tough place because on the one hand, we are pretty libertarian and we don't want the SEC to exist. But on the other hand, they weren't created for a reason with a job to do. They're not very good at their job. But I don't understand how people think that a world of a billion tokens, the better world. I just don't get it. That's just me. Yeah. So ",timestamp:"00:27:24-00:31:23",topics:["bitcoin and mining"],type:"podcast",weight:4.07567598814776},{boost:0,date:1593259200,description:"How human stomach process plants and carbohydrates ",episode_title:"Episode 112: Mental Health And Metabolism: Autism, Depression And Your Small Intestine",guests:[],hosts:[],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/e8ad867b-9cbe-4126-9f37-313b4d2329a5.jpg",keyword:!0,link:"https://www.buzzsprout.com/482971/4336655-episode-112-mental-health-and-metabolism-autism-depression-and-your-small-intestine.mp3",node_type:"clip",pub_key:"032d7609ff3f4a5232e4d60967971e23bc671dfb68020845a59bab5dc1f3b93b87",ref_id:"d013b6c4-0962-464c-96e8-4070946d99a5",show_title:"Dr Karl Goldkamp - Keto Naturopath",text:"We don't digest plants well. We can't break down cell walls and so we can't be chewing a gut and extract. There's no way we can make saturated fats from fermenting plants to break down their cell wall. So that's just not a possibility. So consequently, when you think of not only is breakfast time, meal time a carbohydrate based meal and it's a carbohydrate is a refined carbohydrate based meal. And it's been that way for the last 50 years. So if I grew up on, what did I grew up on? I grew up on wheaties and before that, Cheerios. And so then towards the end, it got even worse. Then there was Captain Crunch. And you think about, how do my folks ever agree to having their kids have this, you know, haven't gotten to dare yet, but that's coming up. So anyway, consequently, when you see these, there's a cereal now that's called colon blow. Colon blow incredibly high in fiber. So this is exactly what we're not suited to. So apart from the fact that it's a processed food, so it's not even, you know, you can't find this concentrated kind of fiber at all in the world in nature, but it has to be manmade. So it's very processed and it's in the wrong direction. If they were trying to improve carbs, okay, so in order to break down plant cellulose for humans, that is, they need to ferment it. That's why things get pickled, right? But if you just keep a mouthful of pickle juice for a while, you know, that's acidic, you'll actually start taking off the enamel of your teeth. So it wasn't something we were meant to do, but that's the only way you can break down plants is by fermenting them and pickling them. So you could say, well, gosh, I heard fermented foods are good for our small intestine. Now, just think of that. I just told you the small intestine was only for low fiber, low residue diets, I e. Carnivore, meat, things like this, meat, fish, chicken. So now we're saying, well, yeah, they can eat fermented foods. So you have the NATO, which is kind of a tempe, comes from soy, or you have sauerkraut. They're famous for these stories. And yes, they do bring in lactic acid. They do bring in all sorts of other bacteria that do help us digest something we were not meant to digest in the first place. So, yes, you can say there's a truth in that based on inappropriate, inappropriate diet recommendation. Okay, you can cook your veggies, right, senium, raw, you can Purpure them, you can breed vegetables to be more tender. You can chew for a very long time. But basically, the bottom line is we weren't meant to eat them. And this isn't my prejudice now. So what else can I tell you about this OK plant Technologies artificial selection. We've now bread, cauliflower, broccoli, and all these things which we consider really healthy. I went to school and I know I was really healthy. Well, they're nothing like they were. So it's not so much what we're having now is really healthy. It's probably back in the day where they looked pretty much just like weeds. They were much more concentrated with those things. So forapanese if you want to say, okay, so now when you go back up to the Eskimos sorry, the Inuits, and they're out there during the night or during the day of their day fishing, where do they get their vitamin D and so on? Well, they have the organs of the animals they eat. I'm sure every so often there's a polar bear. But polar bear liver can actually be toxic in vitamin A. So a little bit is good, and I don't know how much they know, but certainly they have some of you may remember cod liver oil. There's a whole generation that grew up on that, and they can have terrible memories of it, but that was high in vitamin A and vitamin D. So they get their vitamin D from the food that they're eating. And when you're a carnivore, your need for vitamin C is a lot less. I haven't taken vitamin C outside of a few COVID supplementation times in the last couple of years, and I'm quite fine. Whereas when I was having carbs, our garden and so on and so forth, and medical school, I had cancer stores periodically. Interesting ",timestamp:"00:24:45-00:29:24",topics:["Digestive track","carbohydrates digestion","Inuit diet"],type:"podcast",weight:4.065291881561279},{boost:0,date:1653436800,description:"Are businesses going on-chain route or Lightning Network quick to adopt with respect to payments on a local level?",episode_title:"Small Businesses Embracing Bitcoin w/ Michael from Oshi App - Voltage Twitter Spaces",guests:[{name:"Michael Atwood",profile_picture:"https://pbs.twimg.com/profile_images/1362207977470521345/Jy2_Ge60_400x400.jpg",ref_id:"16359ade-afb9-4a37-be0b-0844a6134327",twitter_handle:"Dooowta"}],hosts:[{name:"@voltage_cloud",profile_picture:"https://pbs.twimg.com/profile_images/1508657900486422529/Lfa70poj_400x400.png",ref_id:"3b622187-60ce-43c2-a21f-ae749c2d961a",twitter_handle:"voltage_cloud"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/2ec62250-4755-4616-8342-096a2cfab95f.jpg",keyword:!0,link:"https://www.youtube.com/watch?v=kMDSsyAEvd8",node_type:"clip",pub_key:"",ref_id:"ca89bac3-188b-4e90-8d0b-fe42d0abf067",show_title:"Voltage",text:"And as far as payments, like on a local level, are a lot of businesses going the on chain route or is Lightning pretty quick to adopt? I know with layer two and just trying to understand bitcoin, are people fast tracking the lightning and it's easier and makes more sense, or is that kind of a hurdle where they're just starting with on chain payments? No, I mean, typically I just get them set up straight for lightning. I think we're at the moment now where you're already starting to see something too. It's like, should we even be separating like, bitcoin and lightning or should we just be saying, like, bitcoin? It's bitcoin. You want to accept bitcoin? Well, yeah, like if you want to accept bitcoin, then you're going to be using something called lightning. But the different wallets, whether it's a centralized sort of wallet or whether it's something like Mood where you can just scan any invoice and it's just going to pay on chain or lightning, those are pretty fantastic tools. And I get businesses set up. If I had to pick between on chain or lightning, I would go with lightning. Every single time because most of the businesses I'm getting set up are just selling small ticket items. It's fast casual restaurants or services where they don't have time to wait for the confirmation. That also adds another kind of confusing hurdle for employees. So I just go straight, straight to lighting. ",timestamp:"00:05:06-00:06:36",topics:["Lightning Network","On-chain transactions"],type:"youtube",weight:4.046232331137288},{boost:0,date:1666640962,description:"Bitcoin as a currency is discussed",episode_title:"S12 E6: Talking Politics with Ben de Waal, Alexandra Moxin & Karo Zagorus",guests:[{name:"Ben de Waal",profile_picture:"https://pbs.twimg.com/profile_images/1590206971818512384/18qb3LEl_400x400.jpg",ref_id:"d8679601-a65f-41ea-9b55-c1a7791b39c3",twitter_handle:"Ben_deWaal"},{name:"Karo Zagorus",profile_picture:"https://pbs.twimg.com/profile_images/1601691364260978689/i38u9RRt_400x400.jpg",ref_id:"358c2fe3-3615-4c90-bb6a-d4176b893b5e",twitter_handle:"btcdragonlord"},{name:"Alexandra Moxin",profile_picture:"https://pbs.twimg.com/profile_images/1566131791916040192/8Nqn-lqU_400x400.jpg",ref_id:"be708104-b97c-4ef1-bbfd-054260b868d3",twitter_handle:"Alexandra933"}],hosts:[{name:"Vlad Costea",profile_picture:"https://pbs.twimg.com/profile_images/1508539000499355652/ykhgt9iH_400x400.jpg",ref_id:"2bd8a174-9fb5-4415-ba49-d10a3796859f",twitter_handle:"TheVladCostea"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/5fc9c8b0-687f-487e-bde3-bea15e155e3e.jpg",keyword:!0,link:"https://bitcoin-takeover.com/audio/media/2022-10-24_s12_e6_talking_politics_with_ben_de_waal__alexandra_moxin__karo_zagorus.mp3",node_type:"clip",pub_key:"039c26c7a2f03083901b6c9ef94c3d9f12f88f348965dddd5ab54635993728007c",ref_id:"746c6d41-2f19-4b40-bca5-215942de62cc",show_title:"Bitcoin Takeover Podcast",text:"See? And people say, maxis are so harsh. We're we're not we're quite reasonable. I've always been well, not always, but since 20, 19 20 18, 20 19 I've been a maxi hat I'm wearing is bull bitcoin. Bull bitcoin's mission. And it's their new mission. It's a small, select group of us. And do I want to say what the actual mission is? No, but I'm here to spread awareness about self sovereignty and privacy and the importance of privacy and the importance of having a currency that is valuable. Is bitcoin going to replace all of the currencies around all of the world? Probably not. And I think that that's actually a good thing, because we still need small, localized groups of currency. Not everything needs to be on the bitcoin main chain. We can use lightning networks, we can use rings of fire. We can use many other ways and methods, but we need to have local currencies. I really think that there's a few countries that will probably be the central reserve standard going forward once it's out of the reins of the central banks, which I think should happen as soon as possible. And that puts me in extreme danger saying that. But I mean, look, if you're going to set the rules, you've got to play by them. And where does all of the money laundering happen? Right? Ask those questions. Start looking into it and ask, why do we have these predatory lending systems? Why are we harming individuals so that the very, very few at the top can benefit? Money should be about its usefulness, right? And it should be something that it's not meant to be in the hands of a few. It's a tool. Money is simply a tool. It's meant to unlock whatever it is that you're working on, and it's meant to extend it and make it broader. And it's a tool to unlock what you're working on so that you can share it with the world. So the minute we're censored, when we have censorship in our money, it's so harmful. And, like, you look at the history of the federal reserve system and how predatory they are with the loans, the way the IMF operates, and how reactive they've been toward el Salvador, the first country to take bitcoin as make it currency. It's been over a year now, and I really applaud their effort. It just takes one, and that one has been going for a little bit longer than a year. And I'm really looking forward to some of the efforts around the globe to make bitcoin a standard. And I think in the next, if I were to estimate I don't know which countries, but countries that are really looking at the financial landscape and looking at the money printer and how what's the US. Debt clock at? Like, what, 13 trillion or something? Ridiculous. You look in Canada, every single person is responsible for about $70,000 worth of the national debt. You can't pay it off in your lifetime and still buy a house. It's so predatory. Is the solution burning it down? No. Is the solution, replacing it? Maybe eventually, but in the interim, we've got to kind of work together and I think I highly implore. If any countries are listening out there, consider, please, for the love of God, consider taking Bitcoin as currency because it exists now as a standard. You can utilize the El Salvador example. There's many different resources and yeah, you should give it a shot. Why not? You also sounded like a politician, ",timestamp:"00:18:52-00:22:47",topics:["Bitcoin Currency"],type:"podcast",weight:4.325172448353293},{boost:0,date:1673187067,description:"The ideas to improve the use of nuclear power",episode_title:"@NuclearBitcoinr - Mining #bitcoin With Small Modular Nuclear Reactors. #313",guests:[{name:"Nuclear Bitcoiner",profile_picture:"https://pbs.twimg.com/profile_images/1443185278525579278/_Yl1nao1_400x400.jpg",ref_id:"60f5891f-0864-4ed4-987a-81da4768b3ba",twitter_handle:"nuclearbitcoinr"}],hosts:[{name:"Daniel Prince",profile_picture:"https://pbs.twimg.com/profile_images/1589940494364205056/rnHs5gI3_400x400.jpg",ref_id:"df2d4d35-3e96-44ed-b1cc-cb8a714bbe30",twitter_handle:"PrinceySOV"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/e1eca67b-d372-4031-bf1f-8f0ff7fe6092.jpg",keyword:!0,link:"https://anchor.fm/s/1346f9e8/podcast/play/63208295/https%253A%252F%252Fd3ctxlq1ktw2nl.cloudfront.net%252Fstaging%252F2023-0-8%252F4a07b2fe-eb1d-2c82-677e-8f2808a09536.mp3",node_type:"clip",pub_key:"02545c14cbb18a61f20dd45f5e3dcbd9acae3de282369501040adce32a75311309",ref_id:"e8539d75-fa8f-494a-bace-cf2e9997ba6c",show_title:`Once Bitten! + .tooltip { + position: absolute; + background-color: ${colors.dashboardHeader}; + border: 1px solid ${colors.secondaryText4}; + border-radius: 4px; + color: ${colors.white}; + top: 40px; + left: -142px; + padding: 4px 8px; + font-size: 13px; + visibility: hidden; + width: 470px; + white-space: pre-wrap; + z-index: 1; + } -A Bitcoin Podcast. -`,text:"What were the other ideas being pitched then? What was the winning idea? The winning team was pitching an idea of how to retrofit ports in order to be able to support nuclear powered freighters. So they had some pretty cool ideas of how they're going to do that. It's going to take a lot of harmonization across regulatory and licensing bodies that manage that sort of thing. But they had these cool ideas. One of the judges actually brought up just like, well, what are you going to do when you're parked in port and not using your generators or if you're just going through a canal or something? She threw out the idea. Well, could you mind bitcoin with it? And I'm sitting there in the corner just like, yeah, you could. You just fill one of those containers with a few asics and away you go. When you're not using your full capacity. But they were actually prepared. They had another slide where it's just like, oh yeah, we're going to retrofit transformers on the port. So you can basically just plug in and you can distribute that electricity into whatever local grid you have access to. That seems to solve for tidal waves, though. No, but there's definitely interesting security and safety risks. What else? Give us another give us another example. There must have been a bunch of shakes. Yeah, there was six ideas in the contest altogether. One of them was the young guy that I had already told you about that's doing the education and advocacy. He's got a small team of like three or four people with him that are just trying to and they had really good metrics that they were following for they were showing like this, this is how many people thought favorably of nuclear power before we talked to them. And then, then we then we gave them a pitch and then came back three months later. And then, oh, there's like a 20% increase in interest in these ideas and technology. So they were really good at showing that they were having success on the ground in their education efforts. And then there was another one. There was two that were robot related. One was a robot that was designed to go into, like, highly active areas and pick up any radioactive debris that you may want to collect and analyze or clean or examine various ways. And then the other one was a submersible robot that would be wirelessly and autonomously controlled in the fuel bay rods, which is where the fuel rods go after they immediately get taken out of the reactor. They're basically kept in a pool for three, four or five years before they can be put into the dry storage. So he was proposing an interesting idea of some autonomous robots that can be used to do actions in the pool without having to pull the rods out to do anything related to them. And then the final idea was an idea to instead of the typical way that we capture energy from nuclear fission is that we heat up a medium, whether it's a gas or liquid or a salt, and then we run that through heat exchanger, collect that heat, and then run it through a turbine. But what they were proposing was something that would collect the decay, because when nuclear fissile material decays, it will emit particles, so an electron will just fly off of it, and that's part of the decay process. So they were proposing something similar to how photovoltaic cells collect photons, but designing it to collect the material and the electrons and various other little nuclear material that comes out during the nuclear fission process. Those were the six. And then ours was, yeah, we're going to fix the economics of nuclear reactors by mining bitcoin. Love it. Love the fact you got that done, man. That's so awesome. Well, now I've got a taste of it. So I think I'm going to start applying to just speak at various other conferences. I did the El Salvador conference this time. Maybe I'd like to do the African one next time. And then with the nuclear conferences, they have various different ones for different niches in the industry. So I might start applying to just do general technical talks at some of those conferences and just get me in the room with these people. We got a big one coming up in Europe, in Prague in June. So if you want, I'd happily put you in touch with the organizers. Be the 8th, 10 June. I don't know what year. Someone's shaping up well, that coincides a bit too close with the Canada bitcoin conference. It's going to be the weekend after. I can only travel so much. I have limited vacation time. These trips, aside from like, until bitcoin pumps and then. You can do whatever the hell you like, right? Yeah, I got to fill my bags as much as I can right now while we got this fire sale going on, but who knows if another one of these exchanges bites the dust and then drags us down a little bit more? But ultimately, short term pain for long term gain. That is what it is. Back under ten k, and then we can all start tweeting back at Hoglernaut. ",timestamp:"01:33:27-01:39:03",topics:["nuclear power"],type:"podcast",weight:16.44662687615222},{boost:0,date:1670604293,description:"US Dollar charts from FX is discussed",episode_title:"$80 Trillion in Shadow Banking - FedWatch 122",guests:[],hosts:[{name:"Christian Keroles",profile_picture:"https://pbs.twimg.com/profile_images/1575940779746394133/xMNVsyxY_400x400.jpg",ref_id:"36a8028f-cd0c-4deb-99d3-6f39a70141e5",twitter_handle:"ck_SNARKs"},{name:"Nolan Bauerle",profile_picture:"",ref_id:"7a85907c-0bec-464f-b287-21d68203a74d",twitter_handle:"writenolan"},{name:"Ansel Lindner",profile_picture:"https://pbs.twimg.com/profile_images/815670919460859904/N7_JQzOU_400x400.jpg",ref_id:"8dd6dc43-3492-49f3-b754-6bd5c6729b1d",twitter_handle:"AnselLindner"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/1583c7c4-f4f2-4e52-8f27-a1eaeb6289fd.jpg",keyword:!0,link:"https://anchor.fm/s/cefa18a0/podcast/play/61945665/https%253A%252F%252Fd3ctxlq1ktw2nl.cloudfront.net%252Fstaging%252F2022-11-9%252F302105926-44100-2-9a02866644933.m4a",node_type:"clip",pub_key:"039c26c7a2f03083901b6c9ef94c3d9f12f88f348965dddd5ab54635993728007c",ref_id:"9c870970-e48f-49e1-8781-3c25f4fd58c6",show_title:"Bitcoin Magazine Podcast",text:"supply. But I have one of this slide that has images on it. Can you bring that up? Chris number 13. So these are some charts to show what they found here in FX. And on the leftmost chart, the green line is US dollar denominated and the orange line is total. And they estimate that about 88% to 90% of all of this off balance sheet stuff is in US dollars. So that shows the dollar is king. The dollar is what the global financial system is, a dollar based system. And I will also say that these other currencies, like the Euro or the yen that might have a small sliver, they're based on the US dollar too because they hold US dollars in their reserves. The middle chart is showing kind of by maturity. So the large pink section is less than one year. And like I said, about 30% is overnight and about 70% I believe is less than a week. So that's pretty crazy. Okay, ",timestamp:"00:47:26-00:48:35",topics:["US Dollar chart","currencies"],type:"podcast",weight:7.221315227189421},{boost:0,date:1673187067,description:"What role does Bitcoin mining play in the the nuclear power sector?",episode_title:"@NuclearBitcoinr - Mining #bitcoin With Small Modular Nuclear Reactors. #313",guests:[{name:"Nuclear Bitcoiner",profile_picture:"https://pbs.twimg.com/profile_images/1443185278525579278/_Yl1nao1_400x400.jpg",ref_id:"60f5891f-0864-4ed4-987a-81da4768b3ba",twitter_handle:"nuclearbitcoinr"}],hosts:[{name:"Daniel Prince",profile_picture:"https://pbs.twimg.com/profile_images/1589940494364205056/rnHs5gI3_400x400.jpg",ref_id:"df2d4d35-3e96-44ed-b1cc-cb8a714bbe30",twitter_handle:"PrinceySOV"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/e1eca67b-d372-4031-bf1f-8f0ff7fe6092.jpg",keyword:!0,link:"https://anchor.fm/s/1346f9e8/podcast/play/63208295/https%253A%252F%252Fd3ctxlq1ktw2nl.cloudfront.net%252Fstaging%252F2023-0-8%252F4a07b2fe-eb1d-2c82-677e-8f2808a09536.mp3",node_type:"clip",pub_key:"02545c14cbb18a61f20dd45f5e3dcbd9acae3de282369501040adce32a75311309",ref_id:"39b8ddc0-5c0b-4fd0-9d71-6fee6f556a98",show_title:`Once Bitten! + span:hover + .tooltip { + visibility: visible; + } -A Bitcoin Podcast. -`,text:"hole. And then in July of 21, an organization that I belonged to called North American Young Generation and Nuclear was hosting this contest called Innovation for Nuclear, and it was how to come up with innovative ideas for the nuclear power industry to tackle the UN Sustainable Development Goals. Everyone's like, oh yeah. The UN Sustainable Development Goals. Yeah, I know the feelings that many in the bitcoin space have towards us. But you read the goals on their face value, it's like ending poverty, improving health, improving infrastructure on their face value, they're all good things, but the shadiness is what happens behind the scenes. So it's like, all right, well, being able to deploy nuclear reactors anywhere tackles pretty much all of those goals. But then if you can accelerate and amplify their capability of doing that, it just does it even better. And then it opens up all kinds of opportunities for education, for entrepreneurial enterprises in places where that have basically been in cycles of poverty for generations. I'm sure you've spoken with the guys that are doing a lot of the humanitarian outreach. On the bitcoin side. There's a lot of places that could use some reliable, affordable electricity where we're applying these small modular reactors in northern Canada. They've been running on diesel generators for decades, and getting diesel into remote northern communities on trucks and on planes takes the already exorbitantly expensive diesel and doubles it, triples it in some cases. The cost of electricity in these communities is incredibly high. The Ifor end contest with the UN Sustainable Development Goals. We submitted an idea. So I assembled a team that consisted of myself and myself, my wife and two others, and we submitted it. And then we won the first phase which was just basically just a short, like, little three minute pitch and a five page paper. And we won that. And then we went head to head with another team for the full North American contest. And then we ended up winning that one. And basically all I'm doing is I'm just pitching, like Bitcoin mining. It's the perfect demand response. It has these seven properties that make it the perfect consumer of electricity. I didn't really get too elaborate because we only had so much space to work within and we wanted to focus on the UN goals and how it applies to those. And then we won. And the third phase of the contest was supposed to be hosted at the IYNC Conference in Russia, in Sochi, Russia, in May. But that kind of got kiboshed by events in Ukraine. So they very quickly rushed and found a new venue in Koreana Japan. And then we did our final pitch of the idea there. We did not win, but there was pretty solid competition. So I'm doesn't bother me at all like this. Just going to this conference was an opportunity for me to get gauged the space and from like the younger perspective and also orange pill everybody that was willing to have a conversation with me. So I had some pretty good ones. And being a bit of an introvert, I could have done more, but I think I did pretty good for my personality and the way that I am. So I'm very happy with how it went and I think I have a lot more confidence to go and be even more aggressive next time. But we'll see. But even for being in a bear market, the people that I was talking to, the idea clicked with them. There was definitely some discussion of like, oh, well, what about that FTX stuff? And what about the price of the hardware? And these are variables that you have to play with. It's a game trying to maximize the variables in their favor. If you play with leverage at the top, like core scientific, taking out debt against your Bitcoin holdings and your hardware right at the top of the market, and then it takes a dump, you're going to be in a tough spot. But then if you're more like the guys at Clean Spark, where they've stayed well capitalized, now they're in an advantageous position to scoop up all of this cheap hardware. And I hear that a lot of their facilities are based out of Georgia, which Georgia is going to be turning on a new nuclear reactor very soon. So I'm very curious to see how that affects the Bitcoin mining in Georgia. And then another interesting one is in Pennsylvania, there's a project to connect a Bitcoin data mining center to one of their reactors. There's definitely some interesting stuff going on in Ohio. I don't know if you're familiar with Austin Hill and the Sonoda you haven't heard about. That one yet. They're developing basically an application where you will be able to stream SATS in real time as you're consuming electricity to pay for your utility bill. Just basically like we do with Fountain app when I get streamed to you while listening to your podcasts. Like they're setting something up so that you can do that with your utility bill in real time as your meter is ticking. That's awesome. Because the way that he was explaining it is like when you're buying using that electricity and not paying for it two months, that's a credit risk on the utility. Of course, that's gone. And then they can offer you lower prices because that takes a huge liability off of their balance sheets. ",timestamp:"01:01:06-01:07:09",topics:["Bitcoin mining","nuclear power"],type:"podcast",weight:16.336694690582807},{boost:0,date:1673187067,description:"What is Uranium, and why U-235 being used as fuel in nuclear reactors",episode_title:"@NuclearBitcoinr - Mining #bitcoin With Small Modular Nuclear Reactors. #313",guests:[{name:"Nuclear Bitcoiner",profile_picture:"https://pbs.twimg.com/profile_images/1443185278525579278/_Yl1nao1_400x400.jpg",ref_id:"60f5891f-0864-4ed4-987a-81da4768b3ba",twitter_handle:"nuclearbitcoinr"}],hosts:[{name:"Daniel Prince",profile_picture:"https://pbs.twimg.com/profile_images/1589940494364205056/rnHs5gI3_400x400.jpg",ref_id:"df2d4d35-3e96-44ed-b1cc-cb8a714bbe30",twitter_handle:"PrinceySOV"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/e1eca67b-d372-4031-bf1f-8f0ff7fe6092.jpg",keyword:!0,link:"https://anchor.fm/s/1346f9e8/podcast/play/63208295/https%253A%252F%252Fd3ctxlq1ktw2nl.cloudfront.net%252Fstaging%252F2023-0-8%252F4a07b2fe-eb1d-2c82-677e-8f2808a09536.mp3",node_type:"clip",pub_key:"02545c14cbb18a61f20dd45f5e3dcbd9acae3de282369501040adce32a75311309",ref_id:"313705da-96e5-4cd4-aee7-48ca03a80b42",show_title:`Once Bitten! + &:focus .tooltip { + visibility: visible; + } +`, + SubmitLoader$1 = styled$4(Flex).attrs({ + align: 'center', + background: 'primaryButton', + borderRadius: 8, + justify: 'center', + })` + padding: 16px 24px; + opacity: 0.5; +`, + Wrapper$o = styled$4(Flex)` + min-height: 600px; +`, + defaultData$6 = { + currentSearch: null, + flagErrorIsOpen: !1, + hasBudgetExplanationModalBeSeen: !1, + relevanceIsSelected: !1, + secondarySidebarActiveTab: '', + sidebarIsOpen: !0, + theme: 'light', + transcriptIsOpen: !1, + }, + useAppStore = react((tt, et) => ({ + ...defaultData$6, + clearSearch: () => tt({ currentSearch: null }), + setCurrentSearch: (nt) => tt({ currentSearch: nt }), + setFlagErrorOpen: (nt) => tt({ flagErrorIsOpen: nt }), + setRelevanceSelected: (nt) => tt({ relevanceIsSelected: nt }), + setSecondarySidebarActiveTab: (nt) => tt({ secondarySidebarActiveTab: nt }), + setSidebarOpen: (nt) => tt({ sidebarIsOpen: nt, transcriptIsOpen: nt ? et().transcriptIsOpen : !1 }), + setTranscriptOpen: (nt) => tt({ transcriptIsOpen: nt }), + })), + CloseButton$4 = styled$4(Flex)` + cursor: pointer; +`, + ButtonWrap = styled$4(Flex)` + margin: 0 auto; +`, + AuthorizeHeader = styled$4(Text$3).attrs({ color: 'modalAuth', kind: 'bigHeading' })` + font-size: 32px; +`, + BudgetExplanationModal = () => { + const { close: tt } = useModal('budgetExplanation'), + et = reactExports.useCallback(() => { + useAppStore.setState({ hasBudgetExplanationModalBeSeen: !0 }), tt() + }, [tt]) + return jsxRuntimeExports.jsxs(BaseModal, { + background: 'budgetExplanationModalBg', + id: 'budgetExplanation', + kind: 'small', + children: [ + jsxRuntimeExports.jsx(Flex, { + align: 'flex-end', + pb: 14, + children: jsxRuntimeExports.jsx(CloseButton$4, { + onClick: tt, + children: jsxRuntimeExports.jsx(MdClose, { color: colors.primaryRed, fontSize: 18 }), + }), + }), + jsxRuntimeExports.jsxs(Flex, { + align: 'center', + children: [ + jsxRuntimeExports.jsx(Flex, { + children: jsxRuntimeExports.jsx(MdVerifiedUser, { color: colors.modalShield, fontSize: 18 }), + }), + jsxRuntimeExports.jsx(Flex, { + pb: 10, + pt: 12, + children: jsxRuntimeExports.jsx(AuthorizeHeader, { children: 'Authorize' }), + }), + ], + }), + jsxRuntimeExports.jsx(Flex, { + px: 4, + py: 32, + children: jsxRuntimeExports.jsx(Text$3, { + color: 'white', + kind: 'regularBold', + children: + 'Each search of the graph costs 10 sats. Please enter a budget to buy an L402 which will allow you to search up until your budget runs out. You will be able to set a new budget when that happens.', + }), + }), + jsxRuntimeExports.jsx(ButtonWrap, { + children: jsxRuntimeExports.jsx(Button, { kind: 'small', onClick: et, children: 'Next' }), + }), + jsxRuntimeExports.jsx(Flex, { pt: 94 }), + ], + }) + }, + DataRetriever = ({ children: tt, loader: et }) => { + const [nt, rt] = [useDataStore((at) => at.data), useDataStore((at) => at.fetchData)], + [it, ot] = reactExports.useState(!1) + return ( + reactExports.useEffect(() => { + rt() + }, [rt]), + reactExports.useEffect(() => { + ot(!0), + setTimeout(() => { + ot(!1) + }, 3e3) + }, []), + nt === null && et + ? jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: et }) + : nt === null + ? null + : jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: it ? et : tt }) + ) + }, + useGraphData = () => { + const tt = useDataStore((et) => et.data) + return invariant$2(tt !== null, 'This hook is meant to be used inside a DataRetriever component'), tt + }, + GlobalStyle = $e` + html { + box-sizing: border-box; + } + *, *:before, *:after { + box-sizing: inherit; + } + html, body, div, span, applet, object, iframe, + h1, h2, h3, h4, h5, h6, p, blockquote, pre, + a, abbr, acronym, address, big, cite, code, + del, dfn, em, img, ins, kbd, q, s, samp, + small, strike, strong, sub, sup, tt, var, + b, u, i, center, + dl, dt, dd, ol, ul, li, + fieldset, form, label, legend, + table, caption, tbody, tfoot, thead, tr, th, td, + article, aside, canvas, details, embed, + figure, figcaption, footer, header, hgroup, + menu, nav, output, ruby, section, summary, + time, mark, audio, video { + -moz-osx-font-smoothing: grayscale; + -webkit-font-smoothing: antialiased; + -webkit-tap-highlight-color: transparent; + border: 0; + font-size: 100%; + margin: 0; + padding: 0; + text-rendering: optimizeLegibility; + vertical-align: baseline; + } + a { + cursor: pointer; + text-decoration: none; + } + body { -A Bitcoin Podcast. -`,text:"You answer a really basic question, because I was talking to the kids before I came down to do this interview, and I was asking them, just pitching them basic questions. Like it was with Lauren at the beginning of this, and my 15 year old daughter said, oh, yeah, well, nuclear comes from nuclear power comes from uranium. Okay. Pretty good one way. Yeah. What's uranium? And then there was silence. And it's like we just use these words. We don't know. I don't know. Can you explain to us exactly what uranium is? I don't have a periodic table on the walls around me, but uranium is a heavy element. It fits in that section. If you do look at the periodic table, that segment, that kind of fits beneath everything else. It's referred to as an actinide. Yeah, an actinide. And then there's the Lanthanides, and it fits in the same section as, like, plutonium and neptunium europium. There's a few other ones. But essentially what it is is the makeup of the protons and the neutrons in certain types of uranium. Because that's another thing you get into. It's not just uranium. There's uranium 238, there's uranium 235, there's uranium 233. But in its natural form, the proportions are 98 ish percent uranium 238. And only a small fragment of that is U 235 and then U 233. So then U 238 isn't fissile in its current form. It can be bred into plutonium 239 and then uses fuel. Yeah, they call like that's what they use. The the breeder reactors is what they're called. It puts material that can be made into fissile material into a state where they can process it into something fissile. But the naturally occurring U 235 is what they're after for creating the fissile reaction. So the refining and enrichment process will separate out the U 238 and make it a higher concentration of U 235. So most reactors use about 5% U 235, and then there's some types that use as much as 20. And then, like, weapons grade enriched uranium is, like, 90% U 235. So there's there's a very significant difference in the processing techniques for for getting these different grades of uranium to be usable in the different applications that they're used for, and then to create the energy with it. Once you start the chain reaction by releasing a neutron, it will make contact with the nucleus of that uranium atom, which is already unstable. And so then it will break apart because it's even more unstable when that neutron sticks to it and it will break into two smaller elements and then it releases a little bit of energy, or actually a lot of bit of energy and several other neutrons. So the way that they maintain the chain reaction is that they will have absorbers in the reactor that will absorb two of those nutrients and then one of them will continue on to cascade into another uranium atom and then continue just cycling that process. And if it gets going too fast, that's what the control rods are for. They'll put the control rods in to absorb more neutrons and slow the reaction down. Or if they want to speed the reaction up, they can pull out the control rods and allow for more neutrons to form inside the reactor, creating more chain reactions and then the energy that's released from that is collected. Most reactors these days use water or a pressurized water type of system. And then that water collects that energy and it heats up and then through a system of heat exchangers and condensers and turbines, that gets converted into electrical energy. So how do we get uranium? We mine it. It's in the ground. It's all over the place. Like northern Saskatchewan in Canada is where our main reserves are. There's lots of uranium reserves throughout Africa, throughout South America, throughout Russia and Kazakhstan. Like Australia. Although they don't have any nuclear power, they have a massive uranium mining industry that they support, I think somewhere about 10% of the world's supply of uranium. And then on top of that, uranium is just the primary one that we use. Eventually there will be reactors that are capable of using thorium as their fuel, but that has to go through a similar process, like I described with the breeder reactors, that it needs to be made into a slightly different nuclei of thorium in order to be used as fuel. So it's a slightly more complicated process to use it than uranium because it can just be some reactors, like the Cando reactors can take fresh uranium basically straight out of the ground. It just needs to be processed into the right geometry and fuel rod shape, but it doesn't need any enrichment beyond the natural 2% amount that we need. But you can only get so much energy out of these with the conventional reactors. So that's why there's now efforts to reprocess and recycle a lot of this fuel to get more out of it than we previously have been able to with the traditional fleet of reactors. So that's where a lot of the advanced reactor and generation four types are going to come in, where where instead of using water as their main medium, they're going to use either like a molten salt or a high temperature gas or liquid sodium is one of them. And then there's graphite cooled type of reactor. I'm probably missing a few. But there's a lot of new designs that are being proposed to be commercialized and like most of them have already been proven throughout the decades. But just the way that it was easier to just choose one design and build lots of that similar design made more economic sense at the time. So they just kind of stuck with that. And a lot of these new designs that are being proposed now were just sitting on a shelf for decades and now they're just being brushed off and having new safety features applied to them. And we're going to start demonstrating and deploying them probably before the end of the decade. ",timestamp:"00:21:13-00:28:01",topics:["Uranium","uranium"],type:"podcast",weight:16.23323383988826},{boost:0,date:1653436800,description:"Michael Atwood on Bitcoin awareness for small businesses",episode_title:"Small Businesses Embracing Bitcoin w/ Michael from Oshi App - Voltage Twitter Spaces",guests:[{name:"Michael Atwood",profile_picture:"https://pbs.twimg.com/profile_images/1362207977470521345/Jy2_Ge60_400x400.jpg",ref_id:"16359ade-afb9-4a37-be0b-0844a6134327",twitter_handle:"Dooowta"}],hosts:[{name:"@voltage_cloud",profile_picture:"https://pbs.twimg.com/profile_images/1508657900486422529/Lfa70poj_400x400.png",ref_id:"3b622187-60ce-43c2-a21f-ae749c2d961a",twitter_handle:"voltage_cloud"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/2ec62250-4755-4616-8342-096a2cfab95f.jpg",keyword:!0,link:"https://www.youtube.com/watch?v=kMDSsyAEvd8",node_type:"clip",pub_key:"",ref_id:"076eecc3-0553-4bb7-8fe2-9f43a6d54f79",show_title:"Voltage",text:"we dive into talking a little bit about Oshi and how you solve some of these problems and create the incentives that really encourage people to interact and use bitcoin, what are you thinking about on a local level people could do if they're not aware of oshi? My mind goes to you. Could chromebooks hang up a little sheet of paper and tell people, hey, you can download a bitcoin wallet here or use, let's say, cash app, we have a wallet, you can pay us immediately and we'll give you a three or 4% discount. And the business owner knows less than 1% of people are going to do it, but they're kind of creating that conversation. Do you see bitcoiners who are business owners getting creative and maybe doing that if they're not leveraging Oshi? Or a lot of these business owners really just kind of coming to you without getting too creative on their own, like trying to create a solution and educate? Yeah, there's definitely a lot of handholding. Let's talk about a business that doesn't really understand much about bitcoin and really doesn't even understand much about, say, like the rewards and incentives. Like maybe they signed up with square or Toast for this really cookie cutter like reward system. I talk to businesses all the time and I was like, hey, do you run any specials or promotions? And they're like, no. And I'm like, you have a happy hour special? Oh, yeah, happy hour specials. Like how about 30% back, 30% off? You give like 30% back in bitcoin and it totally changes the game, right? It changes brain cells. But then there are also business owners that are really into bitcoin and they're like, yo, I want your bitcoin, I want KYC free SATS. I am willing to give you a discount if you pay me in bitcoin, not only because it's going to save me maybe a few percentage points in processing fees, but also because I just want it. And business owners again, the ones that really understand this and their company is in a position in which they can hold bitcoin on the balance sheet without having to convert the bitcoin they receive to dollars, which, in general considering it's a very small percentage of sales right now, most businesses can do this, but if they hold on, say they do a 10% pay with bitcoin discount and they hold on to that bitcoin over the course of years or whether it's six months or a year, two years, whatever do they think that the price of bitcoin is going to appreciate or the purchasing power of bitcoin is going to appreciate? At least 10%, right, within a year's time? If that's the case, and that 10% discount that they gave to a customer, whether it's a 10% pay with bitcoin discount or it's a 10% SATS back, that's a free discount. It's a free discount. And if we ever get into a scenario or I would say when we get into a scenario in which more and more businesses are wanting their customers to pay with bitcoin whether because the dollar just continues to fly. Away into oblivion, which is highly likely, then they're maybe going to have to compete amongst one another to incentivize customers to pay with bitcoin, which could create a crazy flywheel effect, in which case, like, the business will give you, like, 20% off if you pay us in bitcoin, because we know in a year's time that's free for us. It gets pretty crazy with the game theory on that. I love it. Yeah. I've been a small business owner in the past and I've always found really creative ways to create language that encourage people to come in or give their eyes attention to me. And I would be doing that saying, save up to 30% and they come in and you have some way in which you can get them set up by using bitcoin in less than two to three minutes. And they would be grateful for that. And then they might become a regular just for that one value they create in their life. So that's cool. Yeah, it's getting super easy too. I imagine something in the near future where these businesses might have partners. They have their strike ref link. Maybe they're selling like stechco vouchers, maybe they're using bit ramp. They're selling bitcoin on the spot so they have a way to actually load their customers wallet with bitcoin on lightning network. Maybe they have a way to refer their customers to strike and they'll get like $10 in bitcoin for every referral they get. And then their customer will get ten free bucks as well. Right. Because it's all about the incentives. Without the incentives, like, a business starts accepting bitcoin and you're not a bitcoiner, and even if you are, maybe you're over the whole novelty of bitcoin, or maybe you're not ideological enough to make every single transaction a bitcoin payment. Like just because you want to support the businesses, which that's not something we can rely on now or even into the future. It's all about the incentives. So how are these businesses going to incentivize consumers to pay with bitcoin? And where are they going to get maybe the money to incentivize them? So, yeah, I find it pretty fascinating where you could have like something near the register where you say, hey, download this app, get set up with bitcoin, come back next time, and we'll give you 20% off your coffee. Or give you 20% sets back off your coffee. The business gets $10. There's a strike rep fleet. The customer gets $10, whatever the case may be. So it's pretty exciting. Thank you. ",timestamp:"00:12:58-00:18:15",topics:["Oshi app","Michael Atwood","Bitcoin awareness"],type:"youtube",weight:3.983682561160926},{boost:0,date:1647061200,description:"Experiences on Interacting With Other [[Bitcoiners]]",episode_title:"WHY ARE WE BULLISH Kal Kassa Pierre Corbin Chris Smith Ben Gagnon ep243",guests:[{name:"Chris Smith",profile_picture:"https://pbs.twimg.com/profile_images/1248417464825724928/BjsozM7k_400x400.jpg",ref_id:"488a0f68-f24b-4d0b-9835-4b38a59f149e",twitter_handle:"chrissmithonair"},{name:"Ben Gagnon",profile_picture:"",ref_id:"d86128cb-056a-4233-bd95-cda98867f61c",twitter_handle:""},{name:"Pierre Corbin",profile_picture:"",ref_id:"a0a46e2e-1b24-4ce5-b34c-ca322067930a",twitter_handle:""},{name:"Kal Kassa",profile_picture:"https://pbs.twimg.com/profile_images/1515885093893681156/cpZcX_2q_400x400.jpg",ref_id:"5cf2cf3e-5cde-4426-b71f-f357195d40be",twitter_handle:"KalKassa"}],hosts:[],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/bbf0a536-990b-49b4-a9c3-a2a40fa38f88.jpg",keyword:!0,link:"https://anchor.fm/s/11e95d20/podcast/play/48924119/https%3A%2F%2Fd3ctxlq1ktw2nl.cloudfront.net%2Fstaging%2F2022-2-12%2F253272604-44100-2-dac52f14aaffa.mp3",node_type:"clip",pub_key:"",ref_id:"345a7d30-5d4b-483c-8d3d-fd1999f7e34c",show_title:"BTC Sessions",text:"rather than just kind of leave it wide open, I'm kind of curious to get some of your take on experiences. You guys have had either meeting Bitcoiners from different parts of the world and what that experience is like, or if you so please maybe tell me about the first time you ever got to speak to another Bitcoin or in person and what that was like. So I'll open it up to whoever wants to jump in first. But one of those two avenues that you want to take, feel free. To. Let'S do Chris, and then we'll do call. Okay, cool. Yeah. I would love to jump in here. I'm going to tell this story because I love this story. It was the first time that I walked into the Bitcoin magazine office and we were actually talking about that the other day and how working in Bitcoin is really a peace of mind. And it's not only monetary freedom, it's freedom for your mind. And the first time you work in Bitcoin, the first time you work surrounding that common goal. Being around an environment where everyone is like minded is truly something that is very bullish in my opinion, because not only are people working for revenue, people working for profit, obviously everybody has to make money, but there's a bigger goal in mind. And being in an environment where that resonates to every single person who you work with, you can always get grounded in that fact. Back to when I first walked into the office, it was like no environment I had ever been in before. And I would go to say, like, Bitcoin meetups are that way as well. I don't know if you all have a Bitcoin meetup that you go to, but if you don't, I highly suggest you find one. Or if you can't find one, you start one yourself because it is so awesome to just put yourself in an environment with those like minded individuals where you can truly find peace of mind. Yeah, I 100% agree. And I agree with your point about if there's no meetup near you, just start one. Even if there's like one person that shows up the first time, it's well worth it. So, yeah, absolutely. Cal, you were about to say something as well. Feel free to jump in. Yeah, sure. So I fell down the rabbit hole in early 2020. And I guess because of that, I didn't really have any in life, kind of in real life friends or anyone to kind of chat with. So it wasn't until probably early 2021 when I happened to be in Austin, Texas. Unchained capital at the time was holding Bit debts. Still is, I think, in a new location. So that walking into that their office on I think it's Fifth Street, and it's a large office. But because there are so many Bitcoin years, it just looked so small, right? It felt so small. And just walking in and having access to Parker Lewis and Jimmy's song, and I was kind of in the midst of my heroes. Right. So it was a pretty great experience to have, and it kind of helped me kind of tie myself into the community. So now when I travel around or I'm in Ethiopia, I always have a good reference point. I always have good kind of sources and citations. So I was really kind of blessed to have that opportunity. Awesome. And you bring up a good point of being surrounded by some of the people that you may have kind of watched or listened to prior Bitcoin, especially ones that have been around the block, are incredibly accessible. So surprisingly to me, I think my first time I met Adam back at Bitcoin 2019. And I'm like, here's the guy that was cited in the white paper that has basically been part of the Cyberpunk movement has built a large portion of the backbone of what Bitcoin was based on. And I just walked up to him and started chatting. And if you can read social cues, if you're in a conversation with somebody often, if they don't know, you get that where the body is kind of tilted and the feet are facing away, and they might feel like they're basically signaling like, okay, well, I'm ready to exit the conversation and go chat to other people. Adam back, as a guy who's been around the block, everybody wants to chat with him, and he definitely has more important people to talk to than me. But no, I walked up to him and it was just straight attention, focus. He sat there and talked to me for like 20 minutes, half an hour, with no indication that he had anywhere else he would rather be. And it was astounding to me, like, how generous Bitcoin is with their time. And there's been many other examples of that, but it definitely strikes me. So I'll pass it to our other two panelists to comment. Maybe if it's okay, I'll do Pierre first and then Ben. But Pierre, do you want to comment either on your first chat with another Bitcoin or how it's been meeting Bitcoinners abroad? Yeah. So I've been traveling a lot the past year. Basically, you don't have a home anymore. I just travel. And so I've met a few on the way. But very interesting is meeting them here in El Salvador because I'm just around the corner from the original Bitcoin peach. So you can just head there and talk Bitcoin whenever you want. They're very open people and just with anyone that you meet because everyone that is here is also just a bunch of travelers. Everyone goes for drinks and just wants to meet others. So there's a lot of meeting people and there's a lot of Bitcoiners, obviously. And it's really great the interactions you can have. And I was having a conversation with a guy called Dave that is from Canada, in fact, that lives in the US, and he's in his late 40s or so. He's just invested and very interested in Bitcoin and he was saying how this is the place where he had to come visit and has to come back because it's just like attending Woodstock or any kind of major events that happen. It's the source of nation state adoption. And there's just a lot of passion, even in someone that doesn't necessarily work in Bitcoin. So we have just all around great interactions with people here. Awesome. And I'll toss it to Ben Last. Any comments on any of this that you'd like to throw in? Yeah, of course. I always think Bitcoin is just such a great filter for people. If you meet somebody and they're a Bitcoin or they're into Bitcoin, you know that they just get it right. Most of the people that you meet in the world, chances are they don't get it or haven't gotten it yet. And I'd say it's only true for bitcoiners. It's not true for crypto in general. But when you meet another Bitcoin or you're all on the same page and it's a big club and we're all in it and it's permissionless. You're right. It's very accessible. Every time. When I was getting started in this industry and I've been all over the world meeting people, building mining facilities and striking strategic relationships and all this stuff, I'm always surprised every time when I walk up to somebody and I start talking and it's okay. This is the head of this company, this is the founder of this thing, and everybody's all in this together. Pretty amazing thing to find those like minded people. It's like having a Tinder app and you can just filter out 99% of people that you don't want to talk to without doing any swiping. So it's just a great filter. Yeah. Bitcoin meetups are the ultimate swipe. Right. I would like to say you're right. No swiping required. And you know what? I will say that while it's great meeting Bitcoin is in person, one person I really want to meet. My favorite no Coiner is David Wong, and he is back again this week. And he's my favorite person. He never misses a show. He hates Bitcoin, but he's here every Friday. So, David, it's really good to see you. Thank you. David would like everybody to know that Bitcoin is a cult. They smile, they talk of nice things. They appeared to be in apartments and use cheap mining heat. So thank you, David. Love you, man. Glad you made it. But with that we'll wrap up that topic. Everybody in the chat, welcome. I see Yellow. Yellow has joined us. Yellow, good to see you. We can relax now. You're here. Thank you. And good to see the Canadian Bitcoinners in here. Canadian Bitcoinners had some nice things to say about Ben. Danielle. They're saying that you're one of the smartest minds in Bitcoin mining and Big Pharma is very lucky to have you on staff. So shout out to LAN and Joey over at Canadian Bitcoins. You guys are awesome. And I'm having you guys on again sometime soon in the coming weeks. So excited to see you guys again. But with that, let's change gears. Let's jump to our next topic. Pierre, you're next on my screen. I hope I'm not throwing you under the bus or cat mail guard here, but I'm going to toss it to you. What are you excited about this week, man? What are you bullish about? So I'd say ",timestamp:"00:13:42-00:24:08",topics:["bitcoiners"],type:"podcast",weight:3.9809007065510573},{boost:0,date:1662010885,description:"Explaining the seedless multisig setups",episode_title:"BR005 - Bitcoin Wallet Experts Roundtable ft. Odell, Bitstein & Pierre Rochard",guests:[{name:"Charles Guillemet",profile_picture:"https://pbs.twimg.com/profile_images/1363770113162379265/7S1mRttg_400x400.jpg",ref_id:"c726ddde-836d-4f6c-9b6e-bb9e4d9365a7",twitter_handle:"P3b7_"},{name:"Matt Odell",profile_picture:"https://pbs.twimg.com/profile_images/1421584695746338819/Z_7ZfAeP_400x400.jpg",ref_id:"4f2825ff-3b88-4595-84d4-36e81544b79a",twitter_handle:"ODELL"},{name:"Graig Raw",profile_picture:"https://pbs.twimg.com/profile_images/1362841242665631745/UtA3FBQU_400x400.jpg",ref_id:"66fade84-61db-4cb1-b4a9-b759e285eb82",twitter_handle:"craigraw"},{name:"Lazy Ninja",profile_picture:"https://pbs.twimg.com/profile_images/1362843002318721028/PNKWuu0-_400x400.jpg",ref_id:"f855515d-75c4-4287-9a3d-e45d7ac25ddf",twitter_handle:"FreedomIsntSafe"}],hosts:[{name:"NVK",profile_picture:"https://pbs.twimg.com/profile_images/608402052247658497/ENDv0BNd_400x400.png",ref_id:"d754e29b-2d3e-4280-8d72-f41d2a465a78",twitter_handle:"Coinkite"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/cd6b8d64-bd52-4f1e-86b3-ca8ba2eb169f.jpg",keyword:!0,link:"https://anchor.fm/s/9500fad8/podcast/play/56934513/https%253A%252F%252Fd3ctxlq1ktw2nl.cloudfront.net%252Fstaging%252F2022-8-1%252Fba1b9425-ee1c-d0fd-3048-f50bdcc17c14.mp3",node_type:"clip",pub_key:"02545c14cbb18a61f20dd45f5e3dcbd9acae3de282369501040adce32a75311309",ref_id:"18d862c2-f8bc-41c8-bea3-9b934701f0a8",show_title:"Bitcoin.Review",text:"exactly it. I mean, humans have been doing physical custody forever since humans were around, right? Like I was there screaming in the forest, running after animals to eat and I was probably custodying whatever I killed. Right? So it is a very natural thing for people to do, which is really cool. People understand that natively, they don't have to sort of like get schooled on how to keep something secret physically. So that's like a nice first step. So that when they go to the next round and sort of like the next upgrade in security and do, I don't know, multi SIG or passphrase or whatever, they will instinctively understand that. Now, maybe they have two secrets as opposed to one, and they should put it in two separate places, right? Yeah. I am not a fan of the seedless designs and I think will lead to a lot of grief. And BK, what are your thoughts on seedless multi SIG setups? So, like top signer is seedless, right? That essentially negates all my rents that I just had because, you know, really like we have to try stuff to see if we can come up with the next thing. Right? Because seeds are not perfect. They are amazing, but they're not perfect. So how do we go to the next thing? And there is also tap route, which does change the security trade offs as well when it comes to multi SIG and any signer sort of derisking them and stuff. So tap signer is our attempt at doing seedless by still making the user ideally back up on their phone an encrypted key where the encryption of the key is laser etched on the card so the phone cannot see that private key. Now, we are very clear that the trade offs that we made on that product are not for you to put your life savings in single SIG, right? But it could work for you to have your life savings in multisig. Because, see, you can have a tap signer as just one of your signers, one that is high availability to you, so the keys are not on the phone. And the other signer could be a cold card that's deep buried somewhere where you do have a backup. And maybe the third one is a service or is another cold card or something, right? So you could derisk the lack of that seedless signer of that multisig. We essentially get back to seeds even though you're functioning on a daily basis. Seedless, I think it's an interesting proposition and as Charles and Lazy would be very familiar with, this is java cards are a very old and resilient technology, right? So the chances of that device breaking beyond recoverability are very low. So that also gives me a bit more comfort. And those devices are essentially fully sealed, right? Because they are NFC sort of essentially baked into plastic. And on Charles case I think you guys put epoxy over the se, right? Or no, I can't remember. But the package is resilient enough. You should be able to at least recover in a lab in case you need to provide that you have the pin and all that good stuff on your case. But anyways, I think two things are important. One is we need to recognize that seeds are an incredible achievement. We should push people towards them, but we should not stop attempting to come up with alternatives that may resolve some of the UX challenges, at least for the daily operational part of your life. That's sort of like my view on this. I'm kind of curious on Lazy's view on this. So I'm a single SIG maximalist for personal savings. I think there may be a seeless multi SIG for an intermediate value of spending or something like that. Like your normal bank account, not your life savings account might work, but I've just been really against what bothers me with multi SIG is when you have sort of the two of three, like a two of two multi sigma much more comfortable with. But when you start having two of three, I think it starts really leaving room for people to mess up because they don't realize that they need three of three public keys backed up and the redundancy in their backup setup of all those. So I'm really two or two maybe multi SIG but I'm really just a single SIG passphrase guy. That's all I ever recommend right now. I am 100% with you there. I don't think people appreciate the complexity and the room to screw yourself out of your money by using multi SIG. It's a ginormous complexity increase, right? It's literally exponential. People think it's small though. Like it seems like it doesn't seem like a lot, but there's so many things that just go like I look at some of the dumb things. Well, I don't want to describe what I did specifically, but I did something with my backup so I could have it sort of more available. So there was some superficial protection and not superficial, some strong protection. I get somebody just casually finding it outside the passphrase and I had sort of done it a couple times and tested it. And then I tested at one time and I realized I had duplicated one of the things on there in a way that I could figure it out. But I'm like, I did this like three times and I didn't catch this simple mistake. And this is just sort of a simple single fig type of thing. I'm like, Holy cow. Adding small things just create a lot more additional complexity than people appreciate. Going back to that support question early in the conversation, it's like one support question we used to get back in the day was people have programmer husbands and then the husband dies and then he left a super complex multi SIG setup that is incredible. It's so secure that the wife can't figure out. Nobody can. I am a staunch believer that multi SIG should be done managed, right? So you're going to have a wallet like Nunchuck that will sort of like help you set up the multi SIG in very specific use. Case or Craig solution is going to use a similar solution, ideally, like on Sparrow. Like, I understand you want to let people be grownups and set up all the stuff however they want, but people make mistakes and they don't back up things the right way, so they do end up screaming themselves over. And I think a lot of the hate for single SIG come from people doing FUDding harder wallets. Really. There are some actors in the space that the paranoia they have against Hart or wallets is completely uncalled for because it's provably wrong, right? It can be provably wrong, right? If you do your diet, you do all the stuff and you could resolve that the paranoia, instead of pushing noobs to do multi Sigma 50 CDs. There's an interesting aspect that I just want to touch on there, which is essentially inheritance planning, which is what you just mentioned. If you have a really complicated multisig and you pass away and whoever you want to receive your bitcoin isn't able to access it, that is not unique to multi SIG. I've gotten messages at midnight from a friend. I'm going into surgery tomorrow. My wife knows where my seat and my passport is, but I told her to call you. If something bad happens, it's free to recover it. And like, obviously that's not a great situation because she has, you know, whoever your heir is has the whole kid and caboodle. Now, if you have a welloiled, multisig UX, then if you're already trusting me for the recovery process, I could have one of those keys. She could still call me in that situation. I could still walk her through the set up, but I can't spend it on my own. She can't spend it on her own. Maybe you involve some other third party in there so that I'm not trusted, right? So, like, all of a sudden that inheritance issue could be mitigated to a degree and made more safer in a multisite setup. Multisick does offer some advantages in that inheritance situation. The challenge now is that if you have access to the quorum set up information, the script and the Xbox, you can find out the amount and you don't want to share that amount with friends or family, right? You want to be blinded but you want them to be part of the recovery set up later. I think that's where tap root is going to really shine later on once we have, like, a proper mousse back and sort of because then you can lower the threshold of those keys and you can come up with much more clever ways of blinding those amounts to essentially the Saving Grace keys that are out there, the emergency keys. Until then, you know, every time you do multiseg with a third party, you're essentially doxing your coins to the third party, which is a much worse attack surface than the security of the single SIG, right? Because say we're friends now, or say for example you're a non bitcoiner and let's say some bad guys assume that you do have knowledge over other people's money, you're now at risk and they could try to coerce you even though you don't have that, to try to get that information on other bitcoiners, right? This attack surface is terrible. I pressed up by accident, to be honest. ",timestamp:"01:11:32-01:21:48",topics:["multisig wallet"],type:"podcast",weight:3.9956684686900736},{boost:0,date:null,description:"Top 3 reasons to embrace Bitcoin adoption",episode_title:"Café ₿: #Bitcoin Beginner Q&A",guests:[{name:"Peter",profile_picture:"https://pbs.twimg.com/profile_images/1581695667193643009/EljNY-TH_400x400.jpg",ref_id:"a3384925-e15e-421d-b9f9-6d44e273ed05",twitter_handle:"PeterAnsel9"},{name:"Stephan Livera",profile_picture:"https://pbs.twimg.com/profile_images/1362551718110580740/v-W5Q2uo_400x400.jpg",ref_id:"72f57157-c96e-4466-8bf1-290cfe1f8a0b",twitter_handle:"stephanlivera"},{name:"Thomas J Lake",profile_picture:"https://pbs.twimg.com/profile_images/1529168328534769670/5cl2Y_k-_400x400.jpg",ref_id:"21541a47-0601-447c-99c2-312d1a63c19f",twitter_handle:"thomaslake"},{name:"Goodguy",profile_picture:"https://pbs.twimg.com/profile_images/1363216959576285185/unulY4yd_400x400.jpg",ref_id:"0c3fec75-9cc2-4c0f-8dbe-db7fae2b585b",twitter_handle:"goodguybiker"}],hosts:[{name:"Brady Swenson",profile_picture:"https://pbs.twimg.com/profile_images/1502564606836981763/fmqtNrNc_400x400.jpg",ref_id:"49966553-d55b-44c9-94ec-8fee09eee5c2",twitter_handle:"CitizenBitcoin"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/239722cb-4216-414a-a17b-5adf9d52e15a.jpg",keyword:!0,link:"https://stakwork-uploads.s3.amazonaws.com/uploads/customers/2707/media_to_local/35b20273-49f2-45ea-a9f4-dc479d86573c/7ae5315f-beb2-41e2-b672-65dd1f102017.mp3",node_type:"clip",pub_key:"",ref_id:"124cbc47-3581-4bd6-add0-fe0855bc9ac3",show_title:"Swan.com",text:"All right, as we move to Peter and Good Guy, I want to rephrase the question, why should somebody even care? Why should somebody care to learn about Bitcoin, use Bitcoin, et cetera? Why does it even matter? Peter, top three things, I think the. Top three things for me are one, you need to understand that you've been infected by a Fiat Virus. All you know currently, financially, for most people is this Fiat system. And this is outside of that, it's different. I think that's really critical. Once you say, okay, I've been infected by this, how can I frame this? To look at this a little differently? Don't be afraid of the responsibility of holding your own wealth. The technology works, and you can trust this technology. This is one of the first times in human history where the technology, because of its properties, allows for it to be trusted and there's no third party trust involved. And then the last thing is for me, once again, was this took a long time for me to do, but it's something that I think that I was encouraged to do and didn't really quite understand until later on in my journey. And that's try to create a visual of a flow chart of how the data moves around. This is just data moving around. In. A digital world, basically. And if you can kind of build yourself a flowchart of how this stuff is moving around, it makes the psychology of the responsibility of holding your own wealth much more palatable. All right, cool. And thanks, by the way, to all of you guys, stefan, Tomer, Peter and Good Guy. And Stefan, we're going to go back to you in a minute. And see if there's anything else major you want to COVID And then I would suggest we just start hitting questions. Q and a. I suspect we could do q and a for another hour easy. Yeah, I think q and a bad idea. Okay, awesome. Good guy. Same question to you. Why should anybody care? Why does learning about bitcoin even matter? Well, I'll put it simply, and I'll give you three reasons. First off, it's been life changing for me and so many people around me. I've watched many people around me go from struggling to make rent payments to buying homes for their family and benefiting their extended family, spending all of their time now working in charitable ways. And it's amazing to see people making solutions to the problems in their own lives. And a lot of times bitcoin has been a big part of that. So you hold bitcoin for any amount of time, and that could be life changing for you. First off, life practice DCA dollar cost averaging. And it doesn't just have to be into bitcoin necessarily. If you're investing into your child benefits or your tax free savings accounts and your bitcoin, I think dollar cost average is a life changing practice. A lot of us get moments when we can save, but if we come up with regular intervals where we hold ourselves accountable to investing, that compounds incredible over time. And you end up with huge amounts of money later by investing small amounts of money regularly. I think that's a very powerful practice. It's hard because cash flow can be waning, but I think it's an important practice. Secondly is the sovereignty aspect. Bitcoin, why does it matter? It allows you to hold your money in a way that it can't be taken from you. Once you have that knowledge and that understanding and a little bit of knowledge in the bitcoin space provides you a ton of value to people outside of it. And so I would encourage everybody to get hardware, wallets, something like a nano ledger or the cold card. These are really great ways to hold your bitcoin in a way that's in your own possession and it's safe from all these things we see like FTX and three arrows and all of these shit coins, all of these platforms devaluing. And then lastly is just a warning for people. We're seeing a lot of romance. Spencer and I work in the space and we try to assist a lot of people with these types of things. And we're seeing a lot of romance scams and something specifically called pig butchering. And so I would encourage everybody who's new and in the space to learn about some of these common scams that used to happen in traditional sense with money and calling cards and gift cards. Now they try to convince people to basically invest money into websites. They get you to buy cryptocurrency. They get you to buy bitcoin and send it to some kind of website and your money is gone. And so it's often these are romance scams. These are people that can come into your life. We have individuals here that have been dating people for as many as seven months. And this 68 year old woman lost her life savings, $260,000, by investing into a website. She was unable to get it back. This person disappeared the day she did it. They also deal with young people that are interacting with people on the Internet in the same way. It's often pictures of their meals and it's lifestyle making fun of small investments. And eventually they get you to send some money or cryptocurrency to a website. So instead of sending your money or leaving your money on any website, use really good on and off ramps like Swan. These are legitimate, these are safe. Buy your bitcoin and put in something like a hardware wallet and you can avoid all that stuff together. So, yeah, dollar cost average. Be sovereign and avoid the scams. Awesome. I'm going to add one comment here and then we'll go back to Stefan. In the vein of why anybody should care, and this is directed really to somebody who's really, really brand new trying to figure all this out. I would suggest that the reason that you should care is the most valuable asset any of us have is our time. Every second, every minute, every hour of the day that ticks by goes away. You will never see those again, ever. And what people do is we invest so much of our time running on this hamster wheel, trying to earn these little fiat pieces of paper. Well, to be fair, they're not paper anymore. They're mostly represented in digital format now. But the problem with these fiat units of currencies is that they're always losing value because they keep making more and more and more of them. And whether you're young or old, if you're confused by this concept of running on this hamster wheel and you get up and you run, run, run, run every day, and then you do it again the next day, you do it again the next day. And no matter how fast you run, no matter how hard you work, the prices of things are keep running away from you. If you feel like you're getting to the point where there's like, what is the point of all this? Why are we even doing it? You need to understand, you have to figure out a way to leverage all of that. And I would suggest to you, and this is a deep discussion, so I can't explain it all just in two minutes. So I'm just going to give you the summary bitcoin, is going to allow you to leverage that in a way that the human race has never seen ever in the history of mankind. And we can unpack that if you guys want, but I'm just going to encourage you to think about that for a second. If you want to weigh out bitcoin is the Way, I will go to Stefan for any other general commentary and we'll start opening it up for questions. Go ahead, Stefan. Yeah, sure. I think ultimately, as I've mentioned before, you have to understand the problem of the system we're in. And that system rewards people who are well positioned in terms of ability to be near the credit, near the printer, their position in terms of access to politicians, to have, let's say, favorable regulation, things like this. Of course, that doesn't mean everyone should just give up. It means people should look at ways to I think it's important to sort of play good offense and good defense, right? Look for ways to earn more, like ethically, of course, not talking about like scamming or anything, but ethically, earning more and then looking at ways to save like, ways to save your wealth and then so that's kind of how I see it. I see it as you come up with a thesis of what you think bitcoin is. What does bitcoin compete with? What does it actually replace? It's a replacement for central banking or for fiat fractional reserve systems. That's what it replaces. So that's how I would contextualize this, Tomargood. I've shared a link to a free copy of my of my book that tries to answer this question and even in just its first essay, which is just a two minute read called why bitcoin exists. So the book, why bitcoin is available for download. For free download. And I really tried to answer this by writing a book on it. But to summarize the first essay as quickly as possible, it's like we have money that is broken, it's unreliable, it fails to serve all mankind, and its days are numbered. And bitcoin fixes all of those things. So that's as briefly as I can put why you should be interested in bitcoin. ",timestamp:"00:35:04-00:44:50",topics:["Fiat system","Bitcoin technology","dollar cost averaging"],type:"twitter_space",weight:3.9808995723724365},{boost:0,date:1668213420,description:"Bugs in running a Lightning node",episode_title:"CD79: lightning development, bugs, and the path forward",guests:[{name:"Ben Carman",profile_picture:"https://pbs.twimg.com/profile_images/1550704386007089152/pLwUSeff_400x400.jpg",ref_id:"1d1e95ba-b4af-415f-aafe-85c6dd7571b8",twitter_handle:"benthecarman"},{name:"Evan Kaloudis",profile_picture:"https://pbs.twimg.com/profile_images/1596923848997445633/DqxrGpkW_400x400.jpg",ref_id:"420172fa-9431-4ba4-965c-adab17648d1b",twitter_handle:"evankaloudis"},{name:"Brqgoo",profile_picture:"https://pbs.twimg.com/profile_images/1597268344029298691/-m6_LYWF_400x400.jpg",ref_id:"6a5e65a9-a1a6-4e73-8e54-53f168c080b6",twitter_handle:"brqgoo"},{name:"Seard Salmon",profile_picture:"https://pbs.twimg.com/profile_images/1562116931980779521/bsHY79h-_400x400.jpg",ref_id:"10074712-9e7d-44ee-9451-9df214834ec6",twitter_handle:"Seardsalmon"},{name:"Tony g",profile_picture:"https://pbs.twimg.com/profile_images/1523582744609136642/02NBRq6H_400x400.jpg",ref_id:"79cc45bb-d9c7-41da-8776-88b2a9f45bf7",twitter_handle:"TonyGuoga"},{name:"Bluematt",profile_picture:"https://pbs.twimg.com/profile_images/697361498587451394/_rX0-O0W_400x400.png",ref_id:"2c96fe6b-ec49-4a1d-824d-9b5d6a94a844",twitter_handle:"thebluematt"}],hosts:[{name:"Matt Odell",profile_picture:"https://pbs.twimg.com/profile_images/1421584695746338819/Z_7ZfAeP_400x400.jpg",ref_id:"4f2825ff-3b88-4595-84d4-36e81544b79a",twitter_handle:"ODELL"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/a09a2c49-84f1-4d0b-b150-6e6103f4ee41.jpg",keyword:!0,link:"https://anchor.fm/s/45563e80/podcast/play/60492378/https%253A%252F%252Fd3ctxlq1ktw2nl.cloudfront.net%252Fstaging%252F2022-10-12%252F296489339-44100-2-5853beb87e727.mp3",node_type:"clip",pub_key:"",ref_id:"e2f9e9e3-946f-44e8-a323-f43a599a3e2c",show_title:"Citadel Dispatch",text:"what would you want to see here? Let's say you're Barack and you discover the second exploit. Presumably you wouldn't do what Barack did. How would you proceed? I think what you do is certainly the first thing you do is you reach out to the vendor and you make sure you give them a reasonable amount of time to patch it. Right. Which vendor do all the Lightning implementations or just L and D? If it affects more than one that you're aware of? Certainly for security issues, you tell the minimum number of people required in order for the issue to get patched. So you start with L and D, because that's the only one you're aware of has this problem. To be clear. It's like you would reach out to them privately. You wouldn't just go post, like, an issue on GitHub. Right, right. Which is what Anthony Towns did right, about ten days before this happened. Yeah, I mean, I don't think he also I think he'd said that he screwed up. He didn't realize that this was a major security issue. But yeah, that's also not the correct yeah. I think an important part of understanding responsible disclosure is that you coordinate with the vendor about release timeline. Right. So if you're the one reporting a bug, you are allowed to say to the vendor, hey, I think this is really critical. I think I should go public with this in two weeks. Can you get a patch together and make sure you get that shipped ASAP? And then that's a conversation that you have with the vendor. It's not like the vendor gets to say, like, no, this has to stay private, or here's the release timeline. Take it or leave it. That's a conversation you have with them. And then I think once the fix is released, at that point, it becomes a question of, like, what you think is the makes the most sense for users. So really, you know, patching an issue quietly does not get the most people to upgrade. And so, you know, you've seen this back when I worked a bunch of Bitcoin core. We had these kinds of conversations a lot. When you have an issue, do you tell people about it so that people go and upgrade really quickly, or do you not tell people about it because you don't want to give attackers enough information to go exploit the vulnerability? And so it becomes a balancing act. And again, this is where you, the reporter, get to have a conversation with the vendor and where you, the reporter, gets to ultimately decide. I don't know if I would have decided to do that, but it would have been totally reasonable, or at least totally justified, to go exploit the issue after the patch had been released. Or maybe a few days after. The patch had been released so that people had a chance to upgrade on their own, to highlight the issue and to kind of force people to upgrade. But prior to there being a patch and prior to people having at least a small window of time to upgrade themselves, actually exploiting it just seems like putting users at more risk than is necessary. Isn't that kind of just like, the sad truth, the sad reality of the situation, like, we talked about just saying that because there are significant volumes on lightning now, and there are big companies and corporations looking at lightning, and then things like this overall hurt the perception of lightning. I mean, but isn't the perception of lightning just wrong currently? Like, we live in this happy little lightning world that all of our payments are fast and easy. We can do zero cough atomic swaps, we can do all these other fancy shit, but lightning is pretty broken. I mean, Matt, your talk crawler, your talk at Atlanta was like a really good talk and it just kind of highlighted that lightning is kind of broken in its current state. Yeah. As well. This is literally a valid transaction on chain. Right. I think that's the way certain people are framing it. So if your L two was affected by it, they feel like in essence, it was your fault. Bitcoin Core thought this was valid and I think that's where some people are drawing the line. Yeah, totally. I mean, it was Lndy's bug. It was rust lightning's bug. The foundational issue was that there was a bug. The foundational issue was not that it was exploited. The only question then is like, okay, there is a bug. Given there is a bug, should you exploit it? That's a very different question from like, whose fault is the fact that there is a bug? Right. And bugs happen. That's not going to change. That's the reality of software development. But yeah. So I think to the point about lightning being broken and the perception of lightning being wrong, I think it is important to highlight the difference between your counterparty and like I always kind of make the point that you shouldn't open channels with a counterparty you don't know or at least don't trust enough that they're not going to, like, try to steal your money and, like, put in a bunch of effort to steal your money. I think there's a very different world from and then there's denial of service attacks against lightning. Not in the take your note offline, but in the saturate your liquidity so that you can't send payments. So let me I guess I should rephrase my earlier statement about there not being denial of service attacks against lightning, just that the saturating liquidity denial of service attacks. So there's a lot of things that are broken with lightning and where the perception is maybe wrong. But I think those are different from you're going to lose funds maybe because your counterparty did something without them even being involved. So when we were talking about routing an HTLC through multiple hops and then stealing funds, that's something where your counterproduct can be totally honest and they go to chain and then your node doesn't see it, and then you still lose funds. Right. So I think that's the kind of thing where aside from these bugs generally, I think there's not really much in the way of known issues for lightning, for why this might be why you might lose funds if your counterpart is completely honest. And regarding previous bugs, Matt, it's not our first bug on lightning, right? There's one in 2019. And then Antoine Riad and Gleb also found a dust one last year that I guess they responsibly disclosed. Do you remember how that process was? And maybe we can touch on that. Yeah, that was across the whole that was basically on every lightning note. So they reached out to everyone. They emailed all of the I don't know who I was on the email list, but, you know, basically all the maintainers or the kind of lead maintainer or two of all the lighting implementations and kind of describe the issue. They describe the basically the issue was that because Lightning has some concepts, dust outputs. If an output is dust, if an HTLC, the value of the HTLC is dust below some threshold, then it just gets burned to feed. So a counterparty can send a bunch of HTLCs that were just barely below this threshold, and in fact, they can even do things to increase this threshold that nodes will currently accept. And then if they do that, then they can burn a lot of your money to fees. And I guess if they're a minor, they get free money then, because they burn the money to fees, and then they get to claim the fees because they're a minor. So they reached out to all the Lightning implementations. All the Lightning implementations added a bunch of code to patch it and then ship that code. And then I think after everyone had shipped or some period of time afterwards, they disclosed it publicly and Antoine wrote up a change to the bolts to kind of describe this issue and note that implementers of the Bolt Spec need to do something to ameliorate this issue. Unlike the kind of onchain stuff that we've been talking about, there's no way to go, like, exploit the issue to force people to upgrade. There's nothing like that. We can only write code and tell people that this issue exists and you should upgrade. And then if you were to exploit this issue, you have to actually go steal funds. You couldn't just like, cause the issue and then get those done. And then there was the other bug where none of the lighting implementations were actually checking the chain for commitment transactions, right. For funding. For funding. The funding transaction had the right script and the right value, actually, that's all we were. So before LDK was LDK Wrestling existed, and it was a joke. It was like a tiny project and no one used it and it wasn't even ready for production, but we were checking it. But yeah, I mean, again, that was another case where you couldn't do something to actively force everyone to upgrade. You could only actually go steal funds. Which obviously has a very different moral question. ",timestamp:"00:48:50-00:58:01",topics:["Lightning node"],type:"podcast",weight:4.718464210259866},{boost:0,date:1671048633,description:"Potential bitcoin market outlook",episode_title:"BR014 - On-chain Economics Experts Roundtable ft. Checkmate, Permabull & TXMC",guests:[{name:"Checkmate",profile_picture:"https://pbs.twimg.com/profile_images/1572347785072226304/1RsAUOvi_400x400.png",ref_id:"78b4085f-732c-4c40-8d8d-dbb8b64d641c",twitter_handle:"_Checkmatey_"},{name:"TXMC",profile_picture:"https://pbs.twimg.com/profile_images/1596714909307387910/Od-gB-bC_400x400.jpg",ref_id:"c458508a-f223-46a1-9eef-961f60c9c100",twitter_handle:"TXMCtrades"},{name:"Permabull",profile_picture:"https://pbs.twimg.com/profile_images/1009795179102994434/SfG90ffx_400x400.jpg",ref_id:"7aea8ebb-29e2-4ce0-b6b7-9b8364e10c58",twitter_handle:"PermabullNino"}],hosts:[{name:"NVK",profile_picture:"https://pbs.twimg.com/profile_images/608402052247658497/ENDv0BNd_400x400.png",ref_id:"d754e29b-2d3e-4280-8d72-f41d2a465a78",twitter_handle:"Coinkite"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/cd6b8d64-bd52-4f1e-86b3-ca8ba2eb169f.jpg",keyword:!0,link:"https://anchor.fm/s/9500fad8/podcast/play/62206185/https%253A%252F%252Fd3ctxlq1ktw2nl.cloudfront.net%252Fstaging%252F2022-11-14%252Fdcd28b47-9893-81ee-960b-def91bce3b84.mp3",node_type:"clip",pub_key:"02574d6e8e787372184b6f17c40d6c6fe1777db9015801f95dfd24692784d767cd",ref_id:"6f2b1717-7294-4cd3-967b-ee0930060b1c",show_title:"Bitcoin.Review",text:"has to leave in about ten to 15 minutes. Any topics or you want to bring on before you start sort of like wrapping up and maybe drop off? No top of mind. Not really. I guess maybe one thing that I'm curious, in terms of what the room thinks, what are we thinking in terms of market outlook over the next six months? Personally, I'm just waiting for another shoe to drop or we go sideways. There is not going to be up for a while. There's not going to be the crisp is up. I concur with that. The underlying dynamics of the market outside of bitcoin entirely has fundamentally changed from the way it has been throughout bitcoin's life. And it could conceivably be this way throughout, at least maybe this year. I'm sorry, this next year, it could be tough conditions. So I personally don't think that the low of price is in, but that doesn't mean we have to go straight down. I think a crab market is probably the least expected and most painful thing we could deal with. And we could certainly continue to range. We could have rallies, we could have crashes. But I think that the low probably won't be in until maybe the second quarter or third quarter of next year. And then maybe things could possibly start looking more constructive. But we haven't seen a real capitulation in TradFi, and that is probably what's going to be the bottom of the broad bear market. So I think bitcoin kind of has to wait for that. Unfortunately, we're essentially on the grind right now. Here's the interesting thing, right? Bitcoin, because it's so small, often responds to whichever is the new interested big pocket in bitcoin, right? So previously was private investors, VCs, that was the 2017 cycle. Before that was technology people that wanted to do payments. This cycle was the equity guys, right? There were a lot of equity guys that came in. That's why they were trading bitcoin like equity. That's why bitcoin traded like an equity, right? So what's the next pocket? Because the equity guys are getting burned and they're going to get poor. Realistically speaking, if the fed doesn't pivot in some amazing way soon, they're all going to be having fun staying poor. So who's the next pocket? It's a good question, but when I look at the overall spread of what's going on right now, and just to kind of bring it back to the previous point. So the last time rodolfo we did this podcast, price was selling off down to 15 five, and we all said, is this the bottom? And I think I said yes. So I'm going to have to just maintain that that that called the bottom on the actual bottom. Respect. When I look at transfer volume and whale activity and all these things, I can't help but feel that we have a textbook layout. Every bottom has looked exactly like this, but the big money appears to be massively under allocated to it. And I've been describing this like if your bond portfolio. Is selling off. You don't go digging around for couch cushions, right? Bitcoin is so small. If you needed the money from bitcoin to save your bond portfolio, you've sold it. You are so everybody's short bitcoin. That meme, is always true. I think that there is an under ownership problem in here as well. And also bitcoin tends to be the first thing to sniff out some kind of change. I agree, TX, that the world's in for an absolute shit storm. It's not good, right? Macro looks absolutely horrific. The question is, does the market sniff out that the Fed has to reverse course because of how bad it is, and it's thus potentially probably crabbing? And also not all time hiring anytime soon. But do we actually start? To get that under bid when the market starts to realize that this is an unsustainable recession that's coming and they're going to have to reverse course or their hands going to get forced at some point. Right? The luke groman moment. Yeah, I think that's possible here's. ",timestamp:"01:21:27-01:25:24",topics:["bitcoin market"],type:"podcast",weight:7.996680560360117},{boost:0,date:1636866e3,description:"[[Bitcoiners]] Passionate on Educating Normies",episode_title:"WHY ARE WE BULLISH JoeyTweets Mario Gibney Bobby Shell Len ep215",guests:[{name:"Bobby Shell",profile_picture:"https://pbs.twimg.com/profile_images/1090426395979890690/uUdaFXo__400x400.jpg",ref_id:"438f8067-3fed-49d2-91d9-5018cb043aac",twitter_handle:"BobbyShell2"},{name:"Len",profile_picture:"",ref_id:"1fc627d9-a446-4e48-b960-ad97fcdbcaa0",twitter_handle:""},{name:"Mario Gibney",profile_picture:"",ref_id:"1a3f05f5-5c4a-455f-b4ec-f682080a5518",twitter_handle:""},{name:"JoeyTweets",profile_picture:"",ref_id:"e6ada141-9c3c-4e1b-b8ab-2389c94f4130",twitter_handle:""}],hosts:[],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/f3b67780-d9c2-4a20-ab5c-115032a05b3a.jpg",keyword:!0,link:"https://anchor.fm/s/11e95d20/podcast/play/43334718/https%3A%2F%2Fd3ctxlq1ktw2nl.cloudfront.net%2Fstaging%2F2021-10-14%2F0bfc842d-3fe7-98e0-1a25-43385ac48a7d.mp3",node_type:"clip",pub_key:"",ref_id:"29cdad6e-4b64-4e9e-bd36-5843b5783d9d",show_title:"BTC Sessions",text:"disagree with Joey in a way. I get his whole story and we've all heard it. But am I bullish on Norman? No, because they're living the same life they always have. What I am bullish on those Bitcoin is telling the story like he just so eloquently did. And I was in a clubhouse with American Hotto and I was just like, dude, I'm obsessed with telling my friends about it and he's just like those people chose their life basically like natural selection. And I'm just like Mario, I don't really talk bad about normally if you go look at my Twitter right now, I got a text today of a friend who hit me up and said, hey, thanks for getting me into Bitcoin. I'm afraid to really talk about it with people because they're all living the same struggling life and now I have more money than what is due on my mortgage and he's just making shit, tons of money because he invests in Bitcoin and has for three to four years. And it's just like for me it's just I try to tell everyone about it. I probably spend four or 5 hours a week Orange billing people at 06:00 a.m. At the coffee shop or late at night if people want to talk my wife's friends and it's just like it's near and dear to my heart. I just love helping educate people. That's just what I do. I'm bullish on people that are passionate like Joey, passionate like me and have like the knowledge that Mario does and just come with the receipts like Lynn and same with you, Ben. Like you're willing to put in time every day and do this stuff. I'm really glad that there's people who care and I think that's what's really going to change the game because you think about it like you plant that seed and now they have the opportunity to plant a seed. It's different from the network effective Bitcoin. It's a network effective accountability. It's hard to hold like what I said earlier, it's hard to hold politicians accountable. You can hold friends accountable, you can text them and check in with them and the more you do it, the more they understand it because every conversation you have, they walk away with more knowledge and that's really what it's all about. That's how revolution start. And I think we're all in on that. Sounds like you're bullish on Normies becoming Bitcoinners because of other Bitcoinness. Yeah, I'm bullish on the real world happening. I can get some stats. We talked about it under show there was actually a poll conducted by Ipsos not too long ago and they actually showed that in 2016 there was 3% ownership of Bitcoin by the people that they polled. And in 2021 that number has increased to 14%. So it's 14%. You could say it's still very small but it's one in seven people, you know, invested in Bitcoin. So from that you're going to have some discussion going on between those people and that's how it's going to grow and that's how the seed is going to be planted. And every time I think about this, man, I think this is just going to go through the roof. I just want to liquidate everything. I have to buy more Bitcoin but I'm pretty much tapped out. And the only thing I have left is just a kidney and a lung for sale. Ps five. Apparently. It looks like he's in a Taliban hostage video in there. Like every week we record me. Well. That'S great. Yes. Although I will say I don't have a PS five. I haven't had a PlayStation for years. I do have an Xbox and a Nintendo because me and my wife are hidden Mario Kart on the regular. But I am Switch for life, man. Yeah, I love. I Switch. The first game in console I ever got for myself out of this. Thank you, Bitcoin. It was getting me through Quarantine and I came back from Miami. Actually. I can't wait till, like five years from now when. Hold on. I got to pull up this website. Has everybody seen this website that I'm about to pull up right here? It's called Bitcoinorshit.com. ",timestamp:"01:38:30-01:42:13",topics:["bitcoiners"],type:"podcast",weight:3.935025216900664},{boost:0,date:1640926800,description:"Not So Good Experiences on [[Lightning Wallets]] Such as [[Muun Wallet]]",episode_title:"WHY ARE WE BULLISH Tone Vays Jaime Garcia Trent Dudenhoeffer KC Hodl ep225",guests:[{name:"Tone Vays",profile_picture:"https://pbs.twimg.com/profile_images/1416821178266787844/T1OkI9ZW_400x400.jpg",ref_id:"da6fc991-7080-461c-86e3-4ac18c2f413d",twitter_handle:"tonevays"},{name:"KC Hodl",profile_picture:"https://pbs.twimg.com/profile_images/1506986051683950592/MMMse9gr_400x400.jpg",ref_id:"b2264dd3-e587-403e-9447-9e99afc1910d",twitter_handle:"kc_hodl"},{name:"Trent Dudenhoeffer",profile_picture:"",ref_id:"3b466176-3bbc-481d-9634-e127a9232404",twitter_handle:""},{name:"Jaime Garcia",profile_picture:"https://pbs.twimg.com/profile_images/953009048642715648/PKaQy5UD_400x400.jpg",ref_id:"f259c6b5-71d6-4c5c-897c-3cfbe80cccc2",twitter_handle:"jaimegarciag"}],hosts:[],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/c8ae0def-c33c-4d17-af4e-31ddaeedaf8a.jpg",keyword:!0,link:"https://anchor.fm/s/11e95d20/podcast/play/45510131/https%3A%2F%2Fd3ctxlq1ktw2nl.cloudfront.net%2Fstaging%2F2021-11-31%2Fc821a6ba-7ef1-35ba-b24e-b96e84186843.mp3",node_type:"clip",pub_key:"",ref_id:"325d3cbf-9cf8-49bf-aa7b-8c8bc8e113ff",show_title:"BTC Sessions",text:"I was going to ask you, when I saw you in Dubai back in October, we did a little Lightning workshop at Understanding Bitcoin, which again, thank you for having me out for that. That was great. I'm really glad you came. Yeah, it was a lot of fun. I really appreciated the invite and I'm really glad that I made it out. Funny enough, when we were about to do the Lightning tutorial, I was going to use Moon Wallet Muun, and it was like the only time that for some reason the back end of Moon just wasn't working, literally just for the entirety of that session. And then it immediately was back to normal. So Unfortunately, I didn't get to use that as the demo, but we did get to play around with Lightning. You had Dove into Lightning, like quite a couple of years prior and had not the greatest experience, obviously, because Liquidity was low and it was a little bit more difficult and fees were high and it wasn't super clear. Have you touched on like played with any Lightning wallet sense, or are you still kind of like sidelining it until it gets a little bit easier. I'm still kind of sidelining it. Actually, I've used some of the custodial solutions like Blue Wallet, and that's very smooth. But I've also tried using some of the non custodial solutions like Bitfinex, and I was not happy about that at all. Every time I was to open a Lightning channel, it was charging me 3000 sats, which I thought was a little bit high considering the fees have been almost nothing. And then there was one time they charged me $9,000 to open a channel and I'm like, no, I'm not doing this. I'm going to wait and I'll get back to the near future. I'm not using my Bitcoin to buy five dollar transactions anyway, so it's fine. I don't really need it. At the moment on chain fees are pretty damn small. It's good for the transactions that I deal with, but I won't get back into it. It's not my to do list early next year. Yeah, I think you'll find and again, it depends on the types of transactions you're trying to do. Like, if you're sending hundreds or thousands of dollars, Lightning is not really like the initial like an on chain transaction is still completely affordable enough for that type of stuff. And the liquidity, depending on the wallet that you're using, you may end up incurring some on chain transaction fees anyways, as channels get established. There's definitely been some issues in and around that. I really do enjoy Moon, but some of the stuff that I found with Moon is if I receive it, it's so easy to receive payments, like immediately with zero set up on Moon, but then later on down the line, if you go to send a larger transaction, even if you're going to send like $100 out and you've received a lot of payments on Moon, just the way that they work it in the back end, they're doing, I believe, submarine swaps. It ends up requiring an on chain transaction, and there's so many UTXOs involved in it that ends up being a pretty substantial fee if you come across that they're also doing that's a separate one. Yeah. So pay with Moon is a different company, and then Moon wallet, spelled M-U-N is a totally different there seems to be a lot of that happening in Bitcoin. Lightninglabs has the At Lightning Twitter handle. And there's a little bit of conferences called Bitcoin. It's a confusing space. Yeah, exactly. Well, Trent, I want to get a little bit of your input on this as well. Without diving into where we'll be talking about multi segment a little bit. What have you encountered this year in terms of people trying to learn various things, whether it be wallets, Lightning hardware. What are some of the things that you've found with people learning about Bitcoin this year? Yeah. Well, in general, just a lot more curiosity, a lot more people wanting to plug into the network, and then I feel like mining gets so much attention in ",timestamp:"00:22:42-00:27:24",topics:["lightning wallets","muun wallet"],type:"podcast",weight:3.9350252381201503},{boost:0,date:1669766400,description:"How Arvin came into bitcoin and integration of Galoy with Lightning",episode_title:"Meet the Makers: Konstantin & Arvin",guests:[{name:"Konstantin Wünscher",profile_picture:"https://pbs.twimg.com/profile_images/917464868663582720/PMFCqusG_400x400.jpg",ref_id:"5f027fce-7775-4824-b941-d2f4120d2d0f",twitter_handle:"krychtiukmd"},{name:"Arvin Galoy",profile_picture:"https://pbs.twimg.com/profile_images/1429792764464611329/4VQqlZiM_400x400.jpg",ref_id:"e0eb434a-9219-4c57-b9e4-da6ceeaec040",twitter_handle:"GaloyMoney"}],hosts:[{name:"Zapp Ed",profile_picture:"https://pbs.twimg.com/profile_images/1519990234070540288/adGqlFoj_400x400.jpg",ref_id:"bbe7cf1d-cd8d-4d36-926d-76f41b775fbb",twitter_handle:"zapp_ed"},{name:"Moritz Alby",profile_picture:"https://pbs.twimg.com/profile_images/859727763292512258/kiFpZ2vO_400x400.jpg",ref_id:"e88efbf8-3809-4508-a86a-d7bf9effb574",twitter_handle:"MoritzKaminski"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/965489b4-a414-4fd0-ab8c-55911b1596aa.jpg",keyword:!0,link:"https://www.youtube.com/watch?v=CjwjScc0TYg",node_type:"clip",pub_key:"02574d6e8e787372184b6f17c40d6c6fe1777db9015801f95dfd24692784d767cd",ref_id:"6d58ed61-0116-4ce8-b26e-bcfa9a32b7d5",show_title:"BOLT FUN",text:"and arvind? What fascinates you about lightning? Okay, so I guess I came at it from sort of a practical place as well, but from kind of a different perspective. So I'm based in the Caribbean, and I guess transferring money is not a solved problem here. We have lots of different currencies across different islands, and we usually have to settle to USD and go through correspondent banks, and online payments are a pain. Sending money anywhere is a pain. So, yeah, I guess I kind of found bitcoin from that angle, from that lens of being able to, I guess, work around some of these systems that aren't friendly to countries in this region. So I found lightning while looking at bitcoin, I guess pretty early. Like, I remember playing I've been dabbling with it at the edges for quite some time now. I'm not really developing in it directly, but I remember buying testnet coffee on the eclair. There's some website that they had quite a while back when eclair was launched. And then I remember when the main net versions of it came out. And yeah, the network was super small. I remember there was that graph where you could literally count all the nodes in the network. I don't know if you remember that really old ARPANET diagram, but the whole Internet was like one page. It felt like I would like to know and now it's totally different. But yeah, I think what fascinated me about it was just like the novel way that it used bitcoin as sort of a base layer supplement system type thing to build something on top of it that sort of gets around some of the restrictions of the base there. And yeah, I guess one thing led to another and I ended up working directly eventually. And I guess that's where I'm now. Can you describe a bit like, what was the journey from discovering lightning until having a full time position at Galloy? Yeah, so it started off with me just playing with the apps and stuff. I got into some of the node projects pretty early. I think I was dabbling with nodes and stuff before like umbrella and raspberry and stuff, or even things. Like there was a guy, I think he was based in Chiang Way at the time, Damien Me, who was just publishing, hey, I figured out how to run a node on a Raspberry pi. Somebody else should try this. So, yeah, I was kind of playing with things from those days and then eventually that evolved into more user facing research, researching, I guess, just the UX of lightning. And it was quite new for developers and it wasn't always super intuitive how you would integrate it or make use of it and stuff. I spent some time doing some of those things and around that, I'd say like a year ago. So this is still in me, kind of just doing random sort of drive by contributions to different repos and just playing at the edges. At the time I started to look into it's, not really quite a bitcoin thing, but I was looking into how to do Neobanks in the Caribbean just because, again, that's like a persistent problem still. And I came across Galloy as part of this bitcoin banking platform, which I thought was cool because they were doing so many things I was looking at, but they had this really nice Bitcoin angle to it and that sort of attracted me to it. So I started to look into the project, started to contribute open source to the open source code base. So started to just contribute in there and learn about it and stuff. And one thing led to the other and I ended up joining them. It's kind of how I went from dabbling to dabbling and just random contributions here and there to jumping in for them. We should maybe talk a bit later, but about these random contributions because maybe there's also a way for any other developer to get into this ecosystem ",timestamp:"00:05:43-00:10:09",topics:["Galoy","Lightning network"],type:"youtube",weight:5.830436750167251},{boost:0,date:1641168e3,description:"Major adoption of Bitcoin mempool",episode_title:"Scaling Bitcoin On-Chain - TABConf 2021",guests:[{name:"Andrew Chow",profile_picture:"https://pbs.twimg.com/profile_images/1452266201770496010/44FHCtZM_400x400.jpg",ref_id:"f96d87ca-5060-4021-aeb9-61db03312027",twitter_handle:"andrewrchow"},{name:"Mark Erhardt Murch",profile_picture:"https://pbs.twimg.com/profile_images/1269477743525130241/-U843Cmt_400x400.png",ref_id:"ef2f2f68-ae16-4e78-80cb-0be9bd156988",twitter_handle:"Murchandamus"},{name:"Andrew Poelstra",profile_picture:"https://pbs.twimg.com/profile_images/1316562683009921024/FSscAYvJ_400x400.jpg",ref_id:"15fb9c53-c988-4af1-bbf0-4832d71b0a01",twitter_handle:"Blockstream"},{name:"Peter Wuille",profile_picture:"https://pbs.twimg.com/profile_images/1264051937172836353/n7gHdLbB_400x400.jpg",ref_id:"fb836ce4-a933-4419-99d8-932fe65219a1",twitter_handle:"pwuille"}],hosts:[{name:"Stephan Liverra",profile_picture:"https://pbs.twimg.com/profile_images/1362551718110580740/v-W5Q2uo_400x400.jpg",ref_id:"551f3a72-9f09-4bcc-bc3b-80ec5605e30f",twitter_handle:"stephanlivera"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/e7d2a4ca-6b44-4a45-a94c-6f48987979f7.jpg",keyword:!0,link:"https://www.youtube.com/watch?v=GbhXJ43e2Bc",node_type:"clip",pub_key:"",ref_id:"65a9d9c6-3211-444a-a49f-f4a34b9ab5fb",show_title:"TABConf (The Atlanta Bitcoin Conference)",text:"I think I'd have another small topic to touch on, for ontime scaling. So I think one of the interesting things we've seen this year is that suddenly in the middle of the year, the mempool stopped backlogging as much, and I'm still looking for somebody to change my mind on that. But my hypothesis is that this is simply due to the smaller inputs that the average input size has decreased so much. So we saw this year a very significant adoption of native segment inputs. Yeah. And the average input size I calculated has roughly decreased from 126 V bytes to 107 or 108 VB. So just by having inputs that are 15% less weight, I think that we can fit a bunch more payments and about the same volume of payments can now easily fit into our blocks and our menpool clears much more often. Yeah, I guess. As if. We're a 2017 panel and we are talking about the interaction between the fee market and the block size. That's kind of a surprising nonlinearity, right? Because 15% sounds like 15% is cool. You can put it in your release notes and stuff, but you wouldn't expect it to result in qualitative changes in the way the network operates. But it does. You get kind of this nonlinear benefit to being able to cram more meaning into every bite. It really depends on the relation between the supply and demand. And if you're right at that level where you had more before and by removing 17% you are below you get a dramatic difference between the menpal clearing and the mentor not clearing, which is the difference between basically no fees and whatever people are willing to pay. So I don't know if that's the only reason, though. I feel like probably the ecosystem just has matured more and is more using RBF and other RBF transactions are also. Up to 25% now. There's just changes in wallet behavior and a bunch of other things within wallets can have an outsized impact. Yeah, so I guess it's like saying essentially on the margin because more people are using native Seguit and batching and maybe some lightning use and maybe people are a bit smarter about when they spend all of these things have, I guess, driven this outcome. I mean, also fee rate based input selection, right? If you use fewer inputs at high fee rates, the peaks of the mempool will be significantly lower because people add less data when the fees are already high and then it levels a little more up during the time that the mempool is empty because people use more inputs than right. So it sort of shifts transaction data from the high fee rate times to the low fee rate times. Also much more dumb, just better fee estimation. Can Andy talk about the bitcoin wallet dropping change outputs more frequently? Yeah. Okay, sure. Yeah, I've read some of your code, but I don't remember exactly how it works. But in short, I'll let you. Yeah, sure. So when you build your transactions so that you do not have to create change outputs, when you hit exactly the amount of funds that you need to pay to the recipients, your transactions are slightly smaller. You create fewer pieces of bitcoin in the first place that don't then later have to get spent again. And some of the players in the space have introduced UTXO selection algorithms that explicitly seek for these sort of input sets when they build transactions. One of them was that bitcoin core emerged a few pull requests this year that had been open for quite some time. Yes. And they introduced this behavior into bitcoin core. Now, I don't know exactly how many people are using bitcoin core because I. Also don't think that would really have a significant impact on transaction sizes, because even in simulations I've run, it's not that many that have changeless transactions. Well, 4% more transactions without change is almost fine. Anyway, 4% is 4%. ",timestamp:"00:43:51-00:48:26",topics:["Bitcoin mempool","free market"],type:"youtube",weight:3.9350252419142993},{boost:0,date:1636993919,description:"Why the mempool stopped backlogging",episode_title:"SLP321 On chain scaling with Bitcoin Core Developers Pieter Wuille, Andrew Poelstra, Andrew Chow & Murch",guests:[{name:"Pieter Wuille",profile_picture:"https://pbs.twimg.com/profile_images/1264051937172836353/n7gHdLbB_400x400.jpg",ref_id:"40260d2f-3480-47d6-8515-d2e780901273",twitter_handle:"pwuille"},{name:"Andrew Chow",profile_picture:"https://pbs.twimg.com/profile_images/1452266201770496010/44FHCtZM_400x400.jpg",ref_id:"f96d87ca-5060-4021-aeb9-61db03312027",twitter_handle:"andrewrchow"},{name:"Andrew Poelstra",profile_picture:"https://pbs.twimg.com/profile_images/1316562683009921024/FSscAYvJ_400x400.jpg",ref_id:"15fb9c53-c988-4af1-bbf0-4832d71b0a01",twitter_handle:"Blockstream"},{name:"Murch",profile_picture:"https://pbs.twimg.com/profile_images/1269477743525130241/-U843Cmt_400x400.png",ref_id:"3e2c1c73-a057-4475-9782-3bb0d3d8cc62",twitter_handle:"murchandamus"}],hosts:[{name:"Stephan Livera",profile_picture:"https://pbs.twimg.com/profile_images/1362551718110580740/v-W5Q2uo_400x400.jpg",ref_id:"72f57157-c96e-4466-8bf1-290cfe1f8a0b",twitter_handle:"stephanlivera"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/b79a3eb8-bcd0-4338-b979-d32aef360785.jpg",keyword:!0,link:"https://anchor.fm/s/7d083a4/podcast/play/43381293/https%253A%252F%252Fd3ctxlq1ktw2nl.cloudfront.net%252Fstaging%252F2021-10-15%252F4872859a-d95f-b966-4c6d-df50c0d78454.mp3",node_type:"clip",pub_key:"027be063cca62a6c08fbe2e8eba0aae10ad27a8896d04ee347a90fea2bce5e85ac",ref_id:"362a90a7-c9dc-4c90-827b-8cf469895c35",show_title:"Stephan Livera Podcast",text:"small topic to touch on for online scaling. So I think one of the interesting things we've seen this year is that suddenly in the middle of the year, the mempool stopped backlogging as much and I'm still looking for somebody to change my mind on that. But my hypothesis is that this is simply due to the smaller inputs and that the average input size has decreased so much. So we saw this year a very significant adoption of native segment inputs. And the average input size I calculated has roughly decreased from 126 V bytes to 107 or 108 V bytes. So just by having inputs that are 15% less weight, I think that we can fit a bunch more payments. And about the same volume of payments can now easily fit into our blocks and our mempool clears much more often. Yes, I guess as if we're a 2017 panel and we were talking about the interaction between the fee market and the block size. That's kind of surprising nonlinearity, right? Because 15% sounds like 15% is cool. You can put it in your release notes and stuff, but you wouldn't expect it to result in qualitative changes in the way the network operates. But it does. You get this nonlinear benefit to being able to cram more meaning into every bite. It really depends on the relation between supply and demand. And if you're right at that level where you had more before and by removing 17%, you are below, you get a dramatic difference between the mental clearing and the mental not clearing, which is the difference between basically no fees and whatever people are willing to pay. So I don't know if that's the only reason, though. I feel like probably the ecosystem just has matured more and is more using RBF. RBF transactions are also up to 25% now. It's just changes in wallet behavior and a bunch of other things within wallets can have an outsized impact. Yeah, so I guess it's like saying essentially on the margin, because more people are using native SegWit and batching and maybe some lightning use, and maybe people are a bit smarter about when they spend all these things have, I guess, driven this outcome. I mean, also fee rate based input selection, right? If you use fewer inputs at high fee rates, the peaks of the mempu will be significantly lower because people add less data when the fees are already high, and then it levels a little more up during the time that the mempua is empty because people use more inputs then. Right. So it sort of shifts transaction data from the high fee rate times to the low fee rate times. Also much more just better fee estimation. Yeah. Can Andy talk about the bitcoin wallet dropping change outputs more frequently? Yeah, okay, sure. Yeah, I've read some of your code, but I don't remember exactly how it works, but in short, I'll let you know. Yeah, sure. So when you build your transaction so that you do not have to create change outputs, when you hit exactly the amount of funds that you need to pay to the recipients and your transactions are slightly smaller, you create fewer pieces of bitcoin in the first place that don't then later have to get spend again. And some of the players in the space have introduced UT EXO selection algorithms that explicitly seek for these sort of input sets when they build transactions. One of them was that bitcoin core emerged a few pull requests this year that had been open for quite some time. Yes, and they introduced this behavior into bitcoin corps. Now, I don't know exactly how many people are using bitcoin core, because I. Also don't think that would really have a significant impact on transaction sizes, because even in simulations I've run, it's not that many have changeless transactions. Well, 4% more transactions without change is. Almost anyway, 4% to 4%. So we've only got a couple of minutes ",timestamp:"00:43:14-00:47:15",topics:["Bitcoin Network"],type:"podcast",weight:3.9350252170485933},{boost:0,date:1664323200,description:"Loyalty program",episode_title:"TRUBIT bringing Digital Loyalty Assets to Bitcoin - Voltage Twitter Spaces",guests:[{name:"@0xLinden",profile_picture:"https://pbs.twimg.com/profile_images/1439365331202437125/JBiXogun_400x400.jpg",ref_id:"b8bb4402-8f86-4220-9dee-0fa28ff8de72",twitter_handle:"0xLinden"},{name:"Stephen Doge",profile_picture:"https://pbs.twimg.com/profile_images/1215979900387184641/nZXkhgoP_400x400.jpg",ref_id:"076972a2-cdab-4766-8c66-618472b80772",twitter_handle:"StephenDodge20"},{name:"@617a7a",profile_picture:"https://pbs.twimg.com/profile_images/1548336437308715016/FUZFJf9k_400x400.jpg",ref_id:"148d77a5-6e95-4855-9e17-19e68f648898",twitter_handle:"617a7a"},{name:"@ian__major",profile_picture:"https://pbs.twimg.com/profile_images/1427414299169984517/Hw0ux6ie_400x400.jpg",ref_id:"7ed41a74-21a4-43a4-9a05-e977c981b6d3",twitter_handle:"ian__major"}],hosts:[{name:"@voltage_cloud",profile_picture:"https://pbs.twimg.com/profile_images/1508657900486422529/Lfa70poj_400x400.png",ref_id:"3b622187-60ce-43c2-a21f-ae749c2d961a",twitter_handle:"voltage_cloud"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/2ec62250-4755-4616-8342-096a2cfab95f.jpg",keyword:!0,link:"https://www.youtube.com/watch?v=1Cn7F1Oo_6Q",node_type:"clip",pub_key:"03c7a7f42d94fdfc7a655515c1421cd1d20db090a1c24150201de0b1dc6a30b0ee",ref_id:"d2d3e71f-24ad-4cf3-b516-f63ac5283d50",show_title:"Voltage",text:"working with and talking still with several mom and pop and just kind of given the broader macro environment, obviously it's every other day, it seems like it's the end of the world, but they're dealing with a lot. Labor shortages, supply chain issues. Like these small mom and pops are one looking for any break they can get. But I think they also acknowledge that they need some differentiation to again, to kind of speak to everything that he and just spoke to. But also they know that this customer segment, or maybe they don't kind of our job, but this consumer segment tends to skew younger but also higher income. And if they want to be able to keep a customer base that is able to purchase their actual products with rising costs and just kind of more and more strain and friction between them and the end customer, they're going to need to have some type of solution to that. And while bitcoin is probably not the only answer, I think it's a critical one for kind of a global debt crisis that's kind of unfolding before us. So I think that might become more apparent as things continue to kind of unfold. But it's kind of something that I think we could do a better job of, say, hey guys, look at this asset standing in the test of time. Zoom out a bit. It's obviously appreciating in value, and typically the people that own this are again, pretty savvy involved in multiprograms skew higher income. These are the kind of customers that you want to attract if you want to have your business be around for another decade. Yeah, I'm just thinking it probably is a lot easier to sort of cold orange pill a business into just giving bitcoin a loyalty thing instead of accepting it outright, even though that's sort of what a lot of bitcoinners go for. Every time I go to a mom and pop sort of coffee shop and I see them using toast or clover and I know that they're getting charged like $0.50 plus 3% or whatever it is on a $4 cup of coffee, it hurts my soul. I know his margins are already super thin and stuff, so we hate it. Because they want us to integrate with it. And integrating with them is a pain in the butt. Yeah, that too, right? When I talk about Bitcoin, it's like, okay, yeah, sure, put it in the system. It's like it's getting easier with things like IBEX and open noted stuff. But as far as going that loyalty route, that might be like the foot in the door that we've been missing instead of going from this like zero to 100, it's a little bit of a softer onboarding onto bitcoin for a lot of these businesses that haven't even thought about it. Yeah, exactly. I almost think there's an analogy to how we at times observe that folks in the Western world tend to have different behavior as it relates to Bitcoin versus the arguably much more kind of colorful peer to peer activity that we see in places like Africa and places like Southeast Asia, et cetera. You see all these dynamic communities springing up. That's awesome. And we believe that that is inevitable to see more and more of that, even in the Western world. But I think the same sort of dynamic is at play. Like, all fiats are melting ice cubes, but some are melting faster than others. And so the ones that are melting slower than others. I think that message of using Bitcoin as a medium of exchange is just something that takes a little bit more time in those markets. And so for the same reason as we see that dynamic I just described, I think that's been our observation, is that for brands kind of in this part of the world where we're based, the notion of extending their loyalty program with this additional reward type tends to be a little bit of, as you said, easier stepping stone. ",timestamp:"00:34:13-00:38:17",topics:["TRUBIT loyal program"],type:"youtube",weight:3.9981546053837542},{boost:0,date:1670056200,description:"Reverberation accross all the learning protocols in DeFi - Avi Eisenberg tried pulling off an attack on Aave",episode_title:"The Chopping Block: SBF Wants to Win in the Court of Public Opinion. Will He? - Ep. 428",guests:[],hosts:[{name:"Tom Schmidt",profile_picture:"https://pbs.twimg.com/profile_images/1563232354277085189/xQL92DR4_400x400.jpg",ref_id:"bc9d3bfd-36b0-4cbc-a491-9370decf4c99",twitter_handle:"tomhschmidt"},{name:"Haseeb Qureshi",profile_picture:"https://pbs.twimg.com/profile_images/1581025415551889408/thQwG4lb_400x400.jpg",ref_id:"790e4217-dd9f-416f-b9f8-ed596937f5b5",twitter_handle:"hosseeb"},{name:"Robert Leshner",profile_picture:"https://pbs.twimg.com/profile_images/1587956987786104833/1SiKVj-s_400x400.jpg",ref_id:"ebaa2166-7982-423d-9f43-add89e7d47f9",twitter_handle:"rleshner"},{name:"Tarun Chitra",profile_picture:"https://pbs.twimg.com/profile_images/1587539091444432897/Z6_nmrCB_400x400.jpg",ref_id:"dfad4b23-92ff-4aa1-9aa4-abc1d54cd6d3",twitter_handle:"tarunchitra"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/7de0d293-8ae3-4362-8500-8f7300f3fe41.jpg",keyword:!0,link:"https://traffic.megaphone.fm/LSHML5256608163.mp3?updated=1670080150",node_type:"clip",pub_key:"03c7a7f42d94fdfc7a655515c1421cd1d20db090a1c24150201de0b1dc6a30b0ee",ref_id:"8b5e41e9-6cc2-4070-8210-6f49967759f2",show_title:"Unchained",text:"speaking of chaos and defy, so we did have also last week a very interesting attack that took place against Ave, and this kind of caused reverberations across all the lending protocols in DPHI. So, Terune and Robert, I assume you guys are closest to this, but I'll give the very, very high level. So we talked before about the Mango markets attacker, avi Eisenberg. Abraham Eisenberg is a full name. So he was the one who manipulated Mango Markets and to have a very profitable trading strategy, quote unquote. He announced earlier this idea that he could basically do an attack against Ave by borrowing assets that were essentially that were less liquid than Ave was kind of giving them credit for and essentially manipulating markets after doing large loans. So I think essentially the way the attack were actually truly yours, it's probably better if you walk through it. Describe for us what exactly happened with the attack, what happened with Curve and all the kind of play by play why they ended up incurring bad debt at the end of this episode. Well, I mean, the bad debt that the protocol had is the thing that you should be worried about at the end, not the ones he made. But he was sort of doing a little bit of the opposite of what happened in Mango, where instead of trying to push the price up of some piece of collateral to borrow everything, he actually put some USDC's collateral, then sorted. Curve tried to push the price down, and then basically by pushing it down, he basically could bar all of the supply of curve. And then if it mean reverted, then you can do a Mango style thing. Now, he didn't really analyze where curve liquidity was. There was there are not many places to get curve. For instance, comics Finance is a place where people end up locking up curve for multiple years, and there's quite a bit of liquidity in there. And so it was easy for people to take the other side of his trade and basically grief him for shorting this in the way he did. The protocol realized that debt because basically there wasn't enough curve to do the liquidation. And so it was just expensive in some way sense. But the total amount of bad debt was like under $2 million. So it was relatively small. Yeah. So I think at the end of the day, the sheer destruction and overall liquidity since the FTX incident has made these Mango selling more likely, which is why I think people are being much more cautious. But the main point is in the V, both compound and there are borrow and supply caps which you can use to kind of limit the max size. Of these types of so if I can summarize in a sentence, there were some stale parameters for borrowing and lending long term, mostly borrowing long tail assets. And these parameters assumed market conditions that looked more like January than that look like today. And all the stuff, ironically, that we've been talking about with credit destruction for. Mango, it's actually quite different. Version is different, yes. In Mango it was sort of the long tail parameters. Here, there's this weird thing where like, the collateral use was actually like good collateral and the liquidation threshold was somewhat high. And it's actually very hard to convince people to lower liquidation thresholds in these communities on the major assets, meaning East WBTC, USDC, tether obviously put up USDC and then shorter curve. So it's a little bit more nuanced if you actually go and look at the details. But yes, it's one of these things where liquidity conditions deteriorated going through governance. By the time the proposal would make it through, it was late. And so we submitted the proposal for stuff. But I guess the point is, I think it was sort of unprecedented, but it wasn't like a huge loss. Also, Maker had some bad debt as well last week from Gemini Earn. So if you remember, Maker put part of the safety module into Gemini Earn to earn some yield, and it incurred some losses from them and has written them off and paid ",timestamp:"00:35:18-00:39:41",topics:["DeFi","Avi Eisenberg","Aave"],type:"podcast",weight:6.190678169952389},{boost:0,date:1623733200,description:"The Process of Financing in Small Business",episode_title:"Andrew Frazier on Running Your Business",guests:[],hosts:[],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/f2b2a2b2-8869-4256-94b9-a91c91c1ce7e.jpg",keyword:!0,link:"https://dts.podtrac.com/redirect.mp3/cdn.mises.org/122_e4b_andrew-frazier.mp3",node_type:"clip",pub_key:"",ref_id:"6e2a0132-8291-4ea4-b1a8-dc87c0adf527",show_title:"Economics For Business",text:"product and service should be. In that order. Yeah. So one of your great phrases is the more you know, the more you grow. So we've talked a little bit about that. If you know your customers and know your market, you're going to grow as you grow, you're going to need capital and finance to expand your business. And you've got a methodology for that too. It comes under an acronym, which you call Pray. Pray. But praying is not what you need. It's much more systematic approach to finance. So can you walk us through the Pray acronym and how small businesses approach financing? Yeah, definitely. I mean, I look at it as to access capital, you must pray. And it's a strategy for being able to increase the likelihood and the magnitude of financing that you're going to be able to attain. So, never hurts to pray. Definitely. Prayer works for many people, but in business financing, it also means to prepare to get your business and financial affairs in order. Research are for research, understanding the landscape of options and requirements for business financing. A for symbol. Putting together the important documentation on a timely basis. It's really interesting how many loans never get processed because all the documentation doesn't get turned in by the business owner and then yield. Once you have things in, you're going to go through due diligence and other stuff and you have to be patient. So you need to start the financing process early so that you have time to successfully go through and have the money and time for what you need. Most important thing is to prepare. You talk to any loan officer anywhere. Biggest reason why people don't get financing and really don't deserve to get financing is because they're not prepared. Yeah. So another element of that which we think is really important, and you just highlighted Andrew, is understanding time. That understanding that it's going to take time to get through that process of financing or any process that you're involved with. And therefore early preparation is a key element to success. So do you find that there's a misunderstanding of the time things take, the time it takes to get a loan, the time it takes to find the right supplier? Yeah. I think one thing I always tell business owners, especially new business owners, is everything takes longer and it's more expensive than you would expect. As a business owner, a lot of times you come in and you're like, okay, I'm going to be selling a million dollars a year too. Usually not that easy. So it takes time to learn, understand your market, build your relationships, so have customers satisfying. So the timing, it's always going to take you longer than you planned and expected. Especially for financing, it's important to start early and that's where you have a plan. If you have a plan, you already know when you think you're going to need financing and for what. And you have a plan of where your business is going and you know if you're achieving the plan or not and how that's going to impact you. Unfortunately, a lot of businesses don't have a plan and really they're kind of out there just winging it. And you don't want to wing it on your livelihood. Yeah. Would you agree, Andrew, that sources of financing are becoming more plentiful for small businesses? We talk about not having to go to the bank for a bank loan because there's crowdsourcing, there's angel investing, there's fintech platforms that offer an alternative to banks. Is that true in your experience for businesses or do we still need to go to the bank manager? I think there's more options, but there's also more risk because some of the options are more predatory and can hurt you as opposed to help you. But micro lenders tend to be one of the best options for people. Crowdfunding, depending on the type of business you have, may work, but it also depends on your network and it's a lot of work to even do. So sometimes it might be easier to just make money with your business and focus on it. So I'm a big fan of self financing, friends and family, and as you get up and have some cash flow and you have some profitability and success, that's when you. Really want to ",timestamp:"00:30:07-00:35:23",topics:["Financing in Small Business"],type:"podcast",weight:3.923132896423765},{boost:0,date:1669852800,description:"What is the future of bitcoin technology",episode_title:"The Future of Bitcoin Technology with Pierre Rochard, Dhruv Bansal, Warren Togami and Guy Swann",guests:[{name:"Warren Togami",profile_picture:"https://pbs.twimg.com/profile_images/1577819570039128065/bBmumEx9_400x400.jpg",ref_id:"f082b94a-673f-4b99-b46e-49a342b5792a",twitter_handle:"wtogami"},{name:"Dhruv Bansal",profile_picture:"https://pbs.twimg.com/profile_images/908397811284172800/kR9kKNsE_400x400.jpg",ref_id:"6ed2b14a-d97d-4a3f-b5b5-4c3222d85624",twitter_handle:"dhruvbansal"},{name:"Pierre Rochard",profile_picture:"https://pbs.twimg.com/profile_images/1567258180861792256/EEEBkvQR_400x400.jpg",ref_id:"426b30ba-7c24-4558-b926-ec307756a876",twitter_handle:"BitcoinPierre"}],hosts:[{name:"Guy Swann",profile_picture:"https://pbs.twimg.com/profile_images/1401969630634196995/DqOuszMi_400x400.jpg",ref_id:"39c31930-d799-40a0-9a46-193117d03418",twitter_handle:"TheGuySwann"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/492cbcce-3744-4d8b-b2ca-3a7f063e798a.jpg",keyword:!0,link:"https://www.youtube.com/watch?v=o26mezhnffU",node_type:"clip",pub_key:"02574d6e8e787372184b6f17c40d6c6fe1777db9015801f95dfd24692784d767cd",ref_id:"f3d0a35e-3e21-4c0c-874c-d6f2b1f37eed",show_title:"Swan Bitcoin",text:"so I want to start this off with what is your focus on bitcoin technology right now? Like when you project out in the short to medium term, what is the thing that you think is the most important next step for what we need to take advantage of and the tool that essentially is going to accomplish that for kind of the next use case or the next market? Start with you, Drew. Wow. Maybe I'll try to play my own trade by just saying multisig is really important. I mean that in a very general sense. Unchained, I think, is somewhat well known for offering multisig vaulting products and other financial services delivered through cold storage, multisig solutions. I do think that's really important. And investing in better security technology for bitcoiners is how we help keep them bitcoiners for many decades. I think more advanced forms of multisig, everything from configurable vaults with timeouts or other kinds of structures that are well suited to products like inheritance is really important. But I think multisig is actually way more important than, quote, unquote, just cold storage. I think multisig thematically is sort of considered a security technology. It should be considered a collaboration technology. And that's why Unchain often calls our product collaborative custody and not multisig because we're seeing coins with you. I think another form of collaborative custody is a lightning channel. We don't think of it that way frequently, but that's really what it is. It's a pre agreed collaboration over certain coins with certain rules that are very different than a product. You might get it unchained, but it's another form of collaboration through multisig. I think I'm going to make the general claim that in bitcoin, the way that we do collaboration, whether it's in an adversarial context, in a friendly context, in a financial services context, in an anonymous trading context, however we're collaborating. Whatever the locus of connectivity between individuals is, multisig shows up. And so I think that's an important theme for us to get better at as Bitcoiners all up and down the stack. Yeah, I agree with the emphasis on multisig. Fundamentally, bitcoin, if we think of it as a company, it's not a startup anymore, right? Bitcoin at this point has product market fit. It has trillions of dollars worth of transactions flowing through it, not every year over the past year. And the emphasis should be on reinvesting in what we know people value in Bitcoin, so they value holding Bitcoin. Multisig is a great way to hold Bitcoin. We also see that they value transacting in Bitcoin, whether it's small transactions or large transactions. Even over the past few months of the bear market, we still see a massive number of transactions going through the Bitcoin network. So the emphasis, I think, should be looking at Bitcoin as a monetary system where we want the software to be as reliable and as stable as possible so that people can feel confident that this is a monetary system that is going to continue to endure and is going to be there for them whether it's next year or ten years from now. Right now, in the markets, what we see is tremendous price volatility. But if you look at the underlying technology of Bitcoin and the blocks that come out on average every ten minutes, there is no volatility there. And the the protocol continues to function exactly as we expect it to. So I think that the emphasis should be focusing on reinvesting in Bitcoin's fundamentals what we know works, and then as a secondary focus, I also think it's really interesting to look at what will the future of Bitcoin's product market fit be? And there I really think that payments makes a lot of sense, specifically through the lightning network. So the lightning network enables smaller value transfers that are just not economical at the base layer because we want to keep the base layer to be as decentralized as possible. We want to keep the cost of running a Bitcoin node as low as possible. So there are trade offs between the different layers. And when we look at the other cryptocurrencies, they've taken trade offs that really are starting to reveal themselves as profoundly misguided. So when we think about the future of Bitcoin technology, we have to keep in mind that there are constraints if we want Bitcoin to continue to be decentralized and to be successful as a stable, sovereign monetary system that is really serving its users. So Pierre actually covered nearly all the points I wanted to make, but I'll speak from a developer's point of view, like, you know, bitcoin for stability and security. But it's not magic. It's because developers had been acting in a science driven peer review process for years. And you may have heard about the so called block size war, where people wanted to move fast and break things. If you don't have stability and security, you have nothing at the base layer. And now as Lightning is growing, we need we also need that stability and security at the lightning layer two level. So I'm glad you brought up Lightning. Lightning is something that I've focused on a lot and I literally use it essentially every day. And particularly in the context of small payments, it's amazing what you can do to incentivize people in the Bitcoin community. Like, I use it a lot in the Audio Knocks group for just kind of like fans of Bitcoin Audible. And I literally pay them to keep me off of Twitter and keep me from getting constantly distracted with everything. If they post articles that they're interested in to help kind of curate, like my having to just explore and dig through all of the trash to find good stuff to read about, I'll just pay them 21,000 SATS. If they post something that I end up wanting to read on the show and it saves me an unbelievable amount of time, and then I do the same thing and throw somebody 5000 stats on Twitter. If there's like some ridiculous sounding story, I'm like, please, somebody posted the source. I'll pay you 5000 SATS. And it's been surprising to see how many people will actually go get a Lightning wallet when they're in that situation. They're like, all right, I've never even done this before. Where do I post my invoice? But those like, small incentives, I think the liquidity and the adoption of Lightning is kind of getting to a very interesting place where certain use cases that didn't make sense early in the bootstrapping era now do, because now they can quickly sign up and offload on cash app or actually pay through cash app. Accept it. There's a huge variety of options and the payments are far more reliable today than they have been. And it's starting to look like we're entering a new phase where there's a whole lot of use cases that now suddenly makes them. And maybe actually I'll turn this right back over to you, Warren. Like, what do you ",timestamp:"00:01:17-00:09:06",topics:["bitcoin technology","multisig","multisig"],type:"youtube",weight:5.8957802652854445},{boost:0,date:1630296e3,description:"[[PlebNet]] is a Community of [[Plebs]] that Interact to Learn About [[Lightning]] and Bitcoin",episode_title:"WHY ARE WE BULLISH Plebnet Takeover With JC KP VS and Walton ep196",guests:[{name:"VS and Walton",profile_picture:"",ref_id:"5277e03c-a4d5-4b4b-ac6b-4dfd8fc9b8ce",twitter_handle:""},{name:"KP",profile_picture:"",ref_id:"9b4f73fc-d67b-4734-90e3-34dde1b7c4cc",twitter_handle:""},{name:"JC",profile_picture:"",ref_id:"cbd12a77-50f2-4a20-a176-1083ce920f32",twitter_handle:""}],hosts:[],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/419512c2-e309-4b25-bfe2-cd481d53f66d.jpg",keyword:!0,link:"https://anchor.fm/s/11e95d20/podcast/play/39539755/https%3A%2F%2Fd3ctxlq1ktw2nl.cloudfront.net%2Fstaging%2F2021-7-30%2F215548612-44100-2-1d28a0866fcfc.m4a",node_type:"clip",pub_key:"",ref_id:"c9fe9c3a-3c24-4803-817d-64d5fa2d58dc",show_title:"BTC Sessions",text:"But my reason for being bullish this week is that Pleb. Net exists. So I'm going to defer to somebody from the panel to explain what the hell is Pleb. Net? Kind of how it got started and how far it's come. So maybe like KP, do you maybe want to start us off with this and let us know what Club. Net is? Yeah, what the heck is Pleb. Net? So it's pretty interesting. When we got started in Lightning, there was a clubhouse room and then there is a small Telegram chat group which has got the Lntx bot. And this was like February, late February time frame and we throw in the LNTS bots and then we were all learning Lightning. There were of course, long term Masters like JC over here and CJ and several others. They were our go to people to actually answer a question or ask any questions to them. And the way I learn, Ben, is I like to learn in communities because guess what, that's how you get to interact with everybody and be able to actually feed off of each other. And in Bitcoin similar enlightening is, I don't know, is a great answer. And then you go and search all sorts of details behind that. So we used to hang around in clubhouse and then we actually created the small group and then we started opening channels and we started learning about the Lightning in general. And then we were thinking about this. And then we sort of like jointly created this group called FloodNET. I think Rajwinder came up with the idea how it throws around in a Telegram group, somebody throws a name and there were five different names about what the name means. And then flip. Net came in and then basically it took off from there, honestly. And then this is almost five or six months. It is hard to believe that it is six months. And the growth after that has been tremendous. And the reason being that the folks who are actually participating in this, they help each other. And at this point of time, as of this morning, I was checking and I'm actually stunned by this. 3500 people. There is 670 nodes out there in ClubNet and you know how many? I was just looking. There is almost 630 bitcoins 630 BTC on the nodes in pub. Net. That is a freaking big deal. And actually, if I looked at the average size of a node is about 95 million satoshis. So these are not like what it used to be. A small baby club. Net in the month of February is like a full grown. And then guess what, within pub. Net, you also have groups that specialize in advanced discussions, tools development. There are hardware development folks. Actually, there is a group which is only for node runners. There is a group which actually only for learning and playing with Lntx parts. So it's a whole gamut. There is an umbrella of five different Telegram groups, believe it or not, but really well connected. And then it is evolving from there. So that's plenty. And if you want to participate and learn about Lightning, guess what, just go to plumbing.org. It will land you into one of the Telegram groups. There will be tons of memes. You will find the people having a lot of fun over there. However, they are pretty serious and they all love Lightning. So that in short, is ClubNet. One thing I really liked that KP said was that it's okay to say I don't know. And actually this is something that's really valued in the Bitcoin community when people have the humility to accept that they don't know something and actually to acknowledge to other people that they don't know something. And I think that's a core part of what being a club is about is knowing your own limitations and wanting to be part of a larger community and recognizing that we all have different things to learn from ourselves. So the name pleb. Net really could not be better. So thanks for our Linda and Katie. You really touched on a lot of things that I really love. And I do want to stress one thing too, because while now it has gotten there are people that are very advanced, very serious. And that's one of my favorite things about it. It started out one my of most favorite parts was it was just a lot of people who Lightning always felt intimidating. People didn't know how easy it was or what tools existed. And you talk to somebody about Lightning, even if they've been in Bitcoin for a while, their eyes kind of glazed, like, oh, yeah, I don't know if I can set up like a Linux computer just to do some testnet coffee shop transaction stuff. And it's like, no, it's actually huge. There are communities out there, like all this stuff. And when we renew, sometimes someone would call me a Lightning expert. And I've been doing it for a while. But I'm not a developer. I'm like, guys, I'm not an expert. I can't even send a Lightning payment in the console on LND. But now it's gotten to the point where anybody, doesn't matter how long you've been doing this, you're going to be able to learn something from Premier. And the biggest thing is that the whole point of it is that you can go there knowing nothing at all, and there are going to be 100 people just like you and help each other and step by step get through it. And it's actually easier than you think. But that was, I think the root of it was a place where people who don't know and want to know and want to learn and get with a great community of people, some of whom were not even really necessarily Bitcoiners more than six months ago. And they've now gone to full blown Lightning routing operators, generating fees on hundreds of transactions a day. So that's part of the magic, I think of it. It's a place of learning for everybody. Like a tuition free College campus. You've got lots of great minds there, people contributing their time willingly. And it's this weird social experiment, as JC says, where anyone, no matter where they're at in their journey, can learn something. It's very exciting. Kp, what was that stat? How many Bitcoin did you say? Roughly 630 bitcoins. An average node. Average node is 94 million. Satoshis, as of this morning, I'm looking. At one third of the Bitcoin on the entire Lightning node. If I'm not wrong, in fairness, is. That calculation for outbound and inbound correct. It is outbound and inbound. There is no way to know the separation. So, yeah, thanks for clarifying that. But it's still like those nodes which are affiliated with our ClubNet. The point is, actually, it has grown and it is not about ClubNet, it is about Lightning. It is about expanding Lightning. And I keep saying this in our chats and what I honestly believe in, when you have a sound money and a monetary value and a store of value like Bitcoin, and when it flies on Lightning network across the globe, unhindered in an open, secure system, magic happens and it will happen. We are just beginning. It is just the beginning at this point of time. And that is the beauty of this whole group. And what everybody is doing there. Yeah. ",timestamp:"00:07:42-00:15:26",topics:["plebnet","plebs","lightning"],type:"podcast",weight:3.9111918211253958},{boost:0,date:1653436800,description:"Hurdles small businesses encounter when trying to embrace Bitcoin",episode_title:"Small Businesses Embracing Bitcoin w/ Michael from Oshi App - Voltage Twitter Spaces",guests:[{name:"Michael Atwood",profile_picture:"https://pbs.twimg.com/profile_images/1362207977470521345/Jy2_Ge60_400x400.jpg",ref_id:"16359ade-afb9-4a37-be0b-0844a6134327",twitter_handle:"Dooowta"}],hosts:[{name:"@voltage_cloud",profile_picture:"https://pbs.twimg.com/profile_images/1508657900486422529/Lfa70poj_400x400.png",ref_id:"3b622187-60ce-43c2-a21f-ae749c2d961a",twitter_handle:"voltage_cloud"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/2ec62250-4755-4616-8342-096a2cfab95f.jpg",keyword:!0,link:"https://www.youtube.com/watch?v=kMDSsyAEvd8",node_type:"clip",pub_key:"",ref_id:"d0f57eb5-87ba-4180-ad39-96589093a0f0",show_title:"Voltage",text:"yeah. One of the things I've spoken to you about before was there's a few people in my local community that wanted to accept Bitcoin or put it on their balance sheet. And they ran into issues where, for some reason, for accounting, it was complex. And their tax adviser said they need to buy it through PayPal because it's easier for accounting. That's one of many issues. But what are the hurdles small businesses are trying to overcome when it comes to just embracing bitcoin as a whole? If you could break those down, I. Would say maybe the biggest hurdle is just understanding what the hell bitcoin is and why they should use it. Let's say, okay, they understand that the hurdles are educating them on the tools. So they need to find the tools. It's really easy for them to go, okay, what do I do? I'm the business owner. I just download moon wallet and now I can accept bitcoin. It's like, well, if you're running a business and you have employees, you're not just going to be swinging around your moon wallet, right? So there are different tools, right? There's iVEX, there's open node, there's voltage, run your own BDC, pay server, run your own node, right there's all these different tools, the startup costs and a lot of these is effectively zero. The setup time can take as little as like five minutes and you can be up and running. So really, it's all about knowledge and awareness of these different things. And really, I think that the Bitcoin community has a lot of work to do in making sure that business owners become more aware of these tools and actually just educating themselves on what the tools are so they'll feel a lot more comfortable and confident whenever they walk up to a business and they're like, hey, do you guys take Bitcoin? What if the business owner is intrigued? What are they going to do? What's their next step? And honestly, most even of the bitcoin community is awesome, but I think a lot of them don't know the next steps. And just so bringing awareness to that would be a huge help. Let's say the businesses are now all set up and they accept bitcoin. Everything's ready to go. The next hurdle is the point of sale system. How do they integrate bitcoin, whether it's in a hacky way or one of these days will have hopefully a more seamless integration with the bigger point of sale systems. But how do they get that going? And that at this moment, in my opinion, is one of the biggest hurdles for businesses that are eager and willing and maybe already starting to accept it's, that point of sale? ",timestamp:"00:02:32-00:05:05",topics:["Michael Atwood","Bitcoin awareness","Bitcoin community"],type:"youtube",weight:3.8968925007363358},{boost:0,date:1674262945,description:"Ben Perrin sharing his experience building Bitcoin circular economy with Bitcoin meetups",episode_title:"WHY ARE WE BULLISH? Joe Consorti, Texas Slim, Max Gagliardi ep316",guests:[{name:"Joe Consorti",profile_picture:"https://pbs.twimg.com/profile_images/1596902707511664640/GYGWVDts_400x400.jpg",ref_id:"8d2024b2-03bb-454d-9bd6-bb121904b76a",twitter_handle:"JoeConsorti"},{name:"Max Gagliardi",profile_picture:"https://pbs.twimg.com/profile_images/1607930248301010944/2HRR14Fm_400x400.jpg",ref_id:"30de157e-f240-40a2-8048-bc2b39efef86",twitter_handle:"max_gagliardi"},{name:"Texas Slim",profile_picture:"https://pbs.twimg.com/profile_images/1589784780970795011/02jf0fqp_400x400.jpg",ref_id:"b4448c8e-9238-4aba-bd25-efb329ea5a72",twitter_handle:"modernTman"}],hosts:[{name:"Ben Perrin",profile_picture:"https://pbs.twimg.com/profile_images/1181715113226596352/ipGVEcYH_400x400.jpg",ref_id:"e6b013ef-178b-4b41-95ee-423148a3dc3a",twitter_handle:"profbenperrin"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/419512c2-e309-4b25-bfe2-cd481d53f66d.jpg",keyword:!0,link:"https://anchor.fm/s/11e95d20/podcast/play/63800208/https%253A%252F%252Fd3ctxlq1ktw2nl.cloudfront.net%252Fstaging%252F2023-0-21%252F308565129-44100-2-d4a2c0e1b4223.mp3",node_type:"clip",pub_key:"037f7331a5bef6c6f880246747befcc3767f3bb9730bc5e6f7c3770f4184ed0bff",ref_id:"0886e428-dab9-4882-9479-e2f64b5ed145",show_title:"BTC Sessions",text:"Yeah, I love that. I'll echo what Joe said. I think in particular what you said, the idea of educating new up and coming ranchers is so key and creating those relationships. I'll tag in here and say that because of what I saw you guys were doing. It got me curious about, Jeez, I should try and find somebody in Canada because I'm in Alberta. There's got to be somebody. I went to the website. There wasn't anybody yet in Canada that was on the beef initiative, but I still was curious. So I tweeted out and they said, hey, is there a cattle rancher somewhere in Alberta that might be interested in selling beef for bitcoin? Not three minutes later from somebody and my freezer, I could tell you right now, is stalked. Me and my friend both split. We bought half a cow together, filled our freezers, and we paid him bitcoin. And so now he's my guy. And I had a couple of little minute steaks before we came on this show. But yeah, again, I think it's so valuable creating those communities and forging those connections with the people around you. Not just in the sense of the beef initiative, but I think it's forging the way for people to be thinking in those lines. And so I've kind of made it my mission this year to start hitting the local meetup as often as possible. And I'm really pushing for the local meetup. And they've already said that they're happy to do this. But at the beginning of every single meet up, we're going to take five minutes for anybody to get up and say, hey, I've got a business, or I create something, or I do something, offer service, and I'm willing to accept bitcoin for it. Or inversely, somebody to get up and say, hey, I'm moving to a bitcoin standard. I'm looking for the following services or goods. Can anybody, if you guys don't directly do that, or do you know of people in your circles of friends? And like, when you get even a small meet up, when you start playing six degrees of Kevin Bacon in that small group of people, you can connect to a lot of people and you'd be surprised what you can find. Just. By making it known that you're looking for it. People come out of the woodwork and they're passionate. And so you don't need the grocery store to accept bitcoin. You need local people that you create genuine connections to to accept bitcoin. And you are on a bitcoin standard. You are a self sovereign. You've built a community. And yes, we can be sovereign individuals, but we can be sovereign communities as well. I mean, that's what's happening. You're right. It's not a numbers game, man. I always tell everybody it's one handshake, one rancher, one cow, one family at a time. And everything that you just said comes along with that one handshake. So at these bitcoin meetups, I tell everybody, hey, you guys go find a rancher and don't even tell them about bitcoin. Say, would you feed us at our gathering? It leads into bitcoin, man. Go get him to feed you. Ask him to feed you. Say, hey, man, we want some steaks, we want some barbecue, we want some burgers, whatever it is that he wants to provide. And guess what? You're letting him educate why he does what he does and then the conversation always goes into bitcoin, man. We don't have to be used car salesman to try to onboard these ranchers. All we have to do is go, hey, man, would you educate me a little bit about why you do what you do and would you come feed us? And then boom, it happens. Every one of them gets on board and everyone wants to know more, they want to feed you more. And all of a sudden, just like you, your freezer is full. That's how it starts. It's perfect. And we need a day, a microsumit or a summit in Canada. I'm just saying Calgary is the place to come to. I think that's what we need to shoot for you. We've talked about it a couple of times, but they have the stampede. They have all that kind of stuff up in Calgary. It'd be pretty badass. We do. I'd love to have you here. If you do come up too, I'll take you for a hike in the mountains. We can go check it out. It's a beautiful area. ",timestamp:"01:29:25-01:34:11",topics:["circular economy","ranchers"],type:"podcast",weight:21.881644866366297},{boost:0,date:1590465600,description:"Looking Forward on Bitcoin dominated world",episode_title:"Chat 39 - Bitcoin Renaissance - with Marty Bent John Vallis Alex Gladstein Elizabeth Prefontaine Brady Swenson",guests:[{name:"Alex Gladstein",profile_picture:"https://pbs.twimg.com/profile_images/1382371620669452292/VOPKOc8w_400x400.jpg",ref_id:"49445c1c-7c66-4b73-9eec-09a337befbec",twitter_handle:"gladstein"},{name:"Marty Bent",profile_picture:"https://pbs.twimg.com/profile_images/1362747135981199370/mSy97J12_400x400.jpg",ref_id:"655bdcb1-21c3-411c-aa24-fe7e4c7a248c",twitter_handle:"MartyBent"},{name:"John Vallis",profile_picture:"https://pbs.twimg.com/profile_images/1568743166035070976/4MyKww8A_400x400.jpg",ref_id:"c3a9fe29-3b78-4665-af54-e293e9d68962",twitter_handle:"johnkvallis"},{name:"& Brady Swenson",profile_picture:"",ref_id:"0b68a085-0680-44b8-891c-6e1e84ac4eb1",twitter_handle:""},{name:"Elizabeth Prefontaine",profile_picture:"https://pbs.twimg.com/profile_images/1382790711427354625/D09LMToL_400x400.jpg",ref_id:"4506df72-5de4-4144-abc4-011408b6b496",twitter_handle:"Eprefon"}],hosts:[],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/9e7e229f-2631-4542-b5d7-7fcd502798dc.jpg",keyword:!0,link:"https://traffic.megaphone.fm/CSN4002307424.mp3?updated=1627951379",node_type:"clip",pub_key:"",ref_id:"307ee148-c00d-4195-b815-bee1f45abe5d",show_title:"Bitcoin Audible",text:"just wondering, this is the bitcoin renaissance discussion that we're having. I'm wondering, aside from, let's say, your own personal wealth number go up, what is it about how you envision a future in which bitcoin is increasingly used or a bitcoin denominated world? What is it that kind of pulls you forward the most, that motivates you the most, that gets you the most excited about the prospects of a world like that? So, guy, I'll give it to you first. Independence. Just the idea. Like our increasingly interconnected world, this kind of goes in line with Marty's, we have two paths kind of thing, and it's something I talk about all the time on the show, is that the more connected we are in the digital era, the less independence we kind of naturally have. It kind of flips the dynamics of the physical world, both in the privacy sense and in the like, we are individual sense on its head. And it kind of makes the individualism the thing that we have to go reach and find, and privacy the thing that we have to go reach and find. Whereas it's the default in the physical. We are individuals. Our life is private unless we go outside and we yell to the world what the hell we're doing in our bathroom, you know? And I think the fact that there's the ability to build systems which can finally extend that into the digital era where we have privacy. Hopefully. Like. Fingers crossed by default. Where we have that which is truly ours in the digital space as it becomes more and more part of our lives. As we start going to conferences in VR. And even though we are so much more connected. We can still retain that which makes us who we are as individuals. I think every technology that incrementally pushes us closer to that is significant, no matter how small. And I think Bitcoin is the biggest step in that direction, as we have had since the birth of the Internet. I just want people to get out of the rat race, like doing jobs they don't like, to sustain a system that they don't understand, and it's only sustainable via consumerism and conspicuous consumption. There's a lot of people out there struggling, working paycheck to paycheck, wondering why they can't ever get out of a state of just treading water or sinking even. So, I hope the ability provided by sound monetary system and digital age to accumulate capital, save money to open up your time so that you can do other productive things, is what encourages me the most, is getting people out of the rat race. And instead of thinking about their next paycheck, thinking about something creative that they can provide to the world. Ready for me. Intrinsically, it's my kids, their kids future. Hope for them, hope for a better future, and then extrinsically. Yeah, just human potential being realized on a massive scale. Beautiful art and architecture and projects, people being able to pursue their dreams, their artisan, reperfecting it. And. Imagine a million people that are not dedicating their lives to creating strange financial products, just for one little example, and being able to dedicate it to something they're really passionate about that benefits the world, not just growing some middleman industry. So, yeah, a better future for my kids and for humanity. Alex? Yeah, I spoke about this in the keynote I gave for Bitcoin magazine having a celebration. But I think there's this really interesting trend in humans where by on the one hand, we have a drift towards authoritarianism, and that's kind of where it all began. And that force is super strong in our societies and in the way we organize ourselves. But over time, humans have created technology to fight that and to liberate one another. And that's just an amazing quality of humanity. So we started with governance and we started with collecting these, for example. And I know there are many other practitioners of what we now call democracy that were happening simultaneously around the world, in Latin America, Africa, Asia. But just to use Clste as the example, 2500 years ago, he came up with the idea that we should be ruled by rules and not by rulers. And of course, he was one of the elites in ancient Greece. And the other elites were like, you're crazy. And they chased him out. They were like, get out of here. We want the power for ourselves. But he came back and he managed to sort of start to implement this idea and over time, this more meritocratic, more democratic way of governing sort of took root. And humans have continued to just chip away at that, despite the fact that those in power are giving up what they have in order to achieve it. It's a very interesting, very kind of inspiring trend in history. But over time now, we have half the world living under more or less an open government where the people can kind of replace the rulers and there's lots of checks and balances and there's special interests, but there's also free press and there's the business community and the government. Everybody's kind of competing and balancing each other out and that's really healthy for society. And then you had the information movement where it used to be very closed and centralized and you had to be elite or wealthy to access the riches of the library of Alexandria, or to become knowledgeable. You had to have a certain class structure or you had to have certain permissions. Right now, today, everybody's got, thanks to the printing press, and then later the radio, the TV and the internet, everybody's got the ability to learn about everything and also to have their voice, this incredibly powerful, progressive trend in history. So you have the opening of government and the opening of information. And I think that bitcoin is the opening of money, which is like the third piece of this trinity. And they all kind of like interact with each other, they all amplify each other. So we're just now able to get to the third part through Satoshi's invention, but it wasn't possible before. But now we have the opening of money and we have the separation of money from state, which is beginning. And I really think that future societies that have all three are going to lead the world in terms of happiness, productivity, human thriving, et cetera. I think you're going to have societies that have one of the three or two of the three, but really the goal will be to have all three. And I think they'll work very beautifully. I love that my answer is probably a synthesis of the ones that you all gave, but for me, it's always been about freedom. I fundamentally believe in what this experience we're having as human beings on earth is. And I'm extremely curious what manifests when we become ever freer to have unrestricted access to joy, education, curiosity, love, beauty, expression, innovation, all of these things, like, what is our potential in a seemingly infinite universe? And I think the more we unshackle ourselves from everything that holds us back, whether they be internal or external, the more able we are to explore that potential. And it excites me just saying that, because I know it's a journey and perhaps a never ending one, but I'm excited by the prospects of bitcoin because I think it's an extremely powerful tool in helping to further us down that pathway and maybe even bring the timeline forward in a very powerful way. ",timestamp:"01:23:22-01:32:00",topics:[],type:"podcast",weight:3.8546091318130493},{boost:0,date:null,description:"What is an Oracle and how does it work",episode_title:"Bitcoin Backed Stablecoin’s",guests:[{name:"Andrew Begin",profile_picture:"https://pbs.twimg.com/profile_images/1461826323102449665/spEoEcpR_400x400.jpg",ref_id:"28db7b9d-1c71-4981-8044-baf001e58b94",twitter_handle:"agbegin"},{name:"Yago",profile_picture:"https://pbs.twimg.com/profile_images/1369335486456684546/AIJdrQ5l_400x400.jpg",ref_id:"0819a9d1-c085-42d5-8b3b-bc3ce79ff1ea",twitter_handle:"EdanYago"},{name:"Sovereign Horizon",profile_picture:"https://pbs.twimg.com/profile_images/1604168916300873731/mLszGVm6_400x400.jpg",ref_id:"6c159904-fe63-437e-91b5-5c444bbd11fa",twitter_handle:"SovereignHRZN"},{name:"Art of Thomas",profile_picture:"https://pbs.twimg.com/profile_images/1547047357371797504/avnHBa2W_400x400.jpg",ref_id:"2c312138-9a5f-4a75-9c19-513d5703d5ce",twitter_handle:"TheArtOfTomas"},{name:"Maximiliano Carjuzaa",profile_picture:"https://pbs.twimg.com/profile_images/1566622024662917120/B6uyn9QR_400x400.jpg",ref_id:"a5273c83-28f1-4df3-b8c6-d3b081f55b31",twitter_handle:"maxcarjuzaa"}],hosts:[{name:"Alexandria The Great",profile_picture:"https://pbs.twimg.com/profile_images/1575525599493427203/XubWEoDX_400x400.jpg",ref_id:"0c977f79-ed3c-46e9-8363-6c6c519d014a",twitter_handle:"alesander97"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/046c6869-0627-4825-8ecf-45ff0aed97b6.jpg",keyword:!0,link:"https://stakwork-uploads.s3.amazonaws.com/uploads/customers/2707/media_to_local/5e4a506b-0534-4217-b682-b568f6212b73/2b4c8ed5-a7cc-43df-95f1-0d75e2c886ab.mp3",node_type:"clip",pub_key:"",ref_id:"baa7169a-4b3a-462c-bcb5-03a34d1a41f1",show_title:"Alexandria The Great 🌋⛏🇿🇼",text:"that is a very interesting question because we are definitely using an oracle, but I will explain how it works. That is one of the biggest challenges in creating decentralized protocol. When we started working designing the protocol, we first focus on the tablecon protocol and then we launched the protocol using a centralized oracle because in that day the standard was maker diode had lunch in like six or seven months before us. So we thought, well, if the market accept a centralized oracle, we can start doing the same for a while. So we launched the protocol using a centralized oracle and we start working on a decentralized oracle and we create. First. Prototype of a truly decentralized protocol. I strongly believe that we have to go further with our oracles, but I also know that we have the best oracles out there. Why we have the best oracles out there? Well, because in order for you to be able to run a price feeder for the oracle, you have to take MOC token first and you have to be in the top ten MOC stakeholders. So you are going to have a lot of money at risk because if you cheat, basically what you are doing is you are making people lose faith in the protocol and the money will go away from the protocol. Turning your MOC token basically useless. So the first thing is that you have to have a lot of stakes on the protocol to be able to run an old, but that is not enough. We have an ebrid protocol for the oracle, some. Of the protocol runs of chain and some part of the protocol run on chain. So there is lottery every block and one of ten node operation is chosen. And that node operator is the one in charge to record the price. But in order to record the price, he has to have the approval of at least five more nodes operator. So in order to get the approval for the other five node operator, they have to query the price of Bitcoin in the five biggest exchange trading USD against Bitcoin, not USD, not USDC, USD against Bitcoin. And then you have to make some mathematic with that number to reach the true value of Bitcoin. And then you have to ask for the other node operator to sign your transaction. And once you have your transaction signed for at least five operations, then you can record the price of Bitcoin on chain. So what I said, this is an alpha prototype version of the Oracles. Well, because we have just ten nodes, we don't have 200 nodes. And why we have only just ten nodes? Well, because of restriction in the way signs are stored on the blockchain, if you have 200 nodes operator and you have to get 100 signs, then the transaction will be very big and very costly. Of course, there are techniques that can solve the problems that I hope we are going to implement in the near future. So from a practical perspective, sovereign community has talked quite a lot about the Oracle problem. And I think there's, while I think it will always remain a problem, I don't believe it is a very serious problem. It's a problem which is relatively easy to overcome in a practical sense. And one way that it can be overcome is what Max just described, which is having more and more robust and more and more decentralized or federated Oracle. A second way in which it is overcome by protocols that actually consume this data is by having multiple different Oracle systems that they use. And then you're not just using one federated or decentralized Oracle, you're using an assortment of them and you're able to observe if there are outliers or if one is misbehaving. And then the third, and this is I think ultimately the most important, is you can also observe organic price feeds that are unchanged. So when you start having trading occur on decentralized exchanges, a price emerges and this price gets arbed away quite efficiently, because arbitrage traders can make profit from any difference in price between the real price and the price on the exchange, or rather I would say the endogenous price and the exogenous price, the price outside. And so with strong volume, or even with relatively light volume, because arbitrage is so profitable, you get very robust pricing. And so one of the things that Sovereign does with its decks is it uses it as effectively a price feed as well. So while the Oracle problem is always going to be a problem because you always have to have sort of like this external piece of information that's not in the blockchain. Right? If what you're trying to pick to is the dollar, as more and more assets and more and more of the economy becomes blockchain native, it reduces that problem. But even now if you're careful and use a robust set of mechanisms to make sure that your price feed is accurate both on chain and off chain, both Federated and decentralized, then in practice the vulnerability of the space for exploits is quite small. And we can see this because there have been many exploits in the crypto space. Most of them, or very few of them were through the means of exploiting articles. Go ahead, you first. Yeah, I just want to say it was really interesting hearing from you both. I guess I would like to just put out a reminder that when you try to take something to something in the real world like Bitcoin in and of itself, like a lot of people forget this, like one BTC is in and of itself valuable because of the strength of the network. It's not linked to anything. Some can argue that it's linked to the electricity that is used to produce it, but in and of itself it's valuable because of the network. Right, so that's a good point. You have to have something that can actually maintain the peg and it's interesting that you want to use a more centralized Oracle. I assume the goal is mass adoption. Right. So using a more centralized Oracle, do you fair about that? It's sort of an attack vector because I mean your goal I assume is to have a permissionless stable coin. But if it's somewhat centralized then doesn't that fit the purpose? I completely agree with you. I don't like Federated Oracles. That is why the money in China Oracle is not Federated. There is a competition between people trying to run an old and I don't feel like on chain volume, merchant price or on chain transaction are valuable today because they are highly manipulated and there are plenty of attacks in the defy world manipulating on transactions. So I think that I don't know if we are going to see a day where we can trust the price of the centralized exchange, but I definitely think that today you cannot trust in the price of a decentralized exchange because it's very easy to manipulate especially with advanced protocols like Ave and flash loans out there. You cannot trust on chain volume. ",timestamp:"00:40:14-00:50:23",topics:["Oracle","oracles"],type:"twitter_space",weight:3.8546091318130493},{boost:0,date:1671116162,description:"Highest priority on Preston Pysh's and Dr. Jeff Ross' radar",episode_title:"Café ₿: MacroStrategy w/ Foss, Lepard, Lavish, Dr.Jeff, Pysh",guests:[{name:"Dr. Jeff Ross",profile_picture:"https://pbs.twimg.com/profile_images/1475554600094552064/DSlPG1lx_400x400.jpg",ref_id:"51a969bb-dbf7-4d20-b128-74dcc5f560f6",twitter_handle:"VailshireCap"},{name:"James Lavish",profile_picture:"https://pbs.twimg.com/profile_images/1466279082157502464/flD6cWI3_400x400.jpg",ref_id:"cf06ab2d-2ff3-4d7b-bef6-b996ae68517a",twitter_handle:"jameslavish"},{name:"Lawrence Lepard",profile_picture:"https://pbs.twimg.com/profile_images/1114275000889032704/mOUsG1XC_400x400.png",ref_id:"0452f07a-5ee6-447d-901b-d96fe2c51324",twitter_handle:"LawrenceLepard"},{name:"Preston Pysh",profile_picture:"https://pbs.twimg.com/profile_images/1408783276081299462/f4Ye5n7-_400x400.jpg",ref_id:"01ad2c81-2d0c-44a9-93a1-42c07287aa80",twitter_handle:"PrestonPysh"},{name:"Greg Foss",profile_picture:"https://pbs.twimg.com/profile_images/1552599670945464320/3OgqRHNo_400x400.jpg",ref_id:"853d9f80-f6cf-490f-9d1e-f29cdc6acc6f",twitter_handle:"FossGregfoss"}],hosts:[{name:"Alex Stanczyk",profile_picture:"https://pbs.twimg.com/profile_images/1539055022364708864/rwErK6x1_400x400.jpg",ref_id:"3126e2a3-bbe4-456b-b298-9714085fa286",twitter_handle:"alexstanczyk"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/239722cb-4216-414a-a17b-5adf9d52e15a.jpg",keyword:!0,link:"https://stakwork-uploads.s3.amazonaws.com/uploads/customers/2707/media_to_local/d6d54b80-b92d-4611-a490-b4e3605f7ae9/bce474b2-d95d-4867-8ec0-392a9b1efd42.mp3",node_type:"clip",pub_key:"02574d6e8e787372184b6f17c40d6c6fe1777db9015801f95dfd24692784d767cd",ref_id:"15e10126-3ca8-461d-bb9d-d412b8333b32",show_title:"Swan.com",text:"if I understand correctly, was a former pilot in the United States military. So what is the highest priority object on your radar, Preston? Highest priority back to like what Greg was saying with the Vics and stuff. Yeah. So when we do macro strategy, I was going around asking everybody what they think is the most important thing going on. What are you keeping track of that's concerning to you or what do you find fascinating or what's the most important macro issue on your radar? I don't find anything concerning. I find all of this to be a massive opportunity. I'm with Greg. I think the VIX is really important. I watch what the dollar is doing pretty closely. The global M two numbers which are highly correlated to the performance of the dollar itself. I've said before that it's pretty much a bitcoin versus dollar kind of world. And when you look at why I think we've had a bit of a breather and why you've had a bit of a bounce in equities and why you're seeing the VIX compress the way it is, I really think that because you've seen Dollar weakness for, I don't know, what, two months now. I think that's what's kind of put that little small bounce in the markets that makes it look like it's potentially going to reverse itself. And it's just like Jeff said, a total trap door moment. As long as you have negative spreads between inflation around the world and the interest rates, this pressure is this feeling of like everything kind of falling apart in the markets is not going to disappear. That's the thing that's driving all this because it's just one giant economic calculation that starts with the foundation of inflation. And if you can't out hurdle inflation, the math does not work. Right. So I'm looking at that, obviously, is that negative spread. I'm looking at the short duration versus long duration, which Jeff also addressed. And he's exactly right when it comes to banks and their ability to make money, the way that they can assure that is through the duration, the short duration versus the long duration and making sure it's a positively sloped curve. And right now you don't have that around the world. So, like, all these things are super important for people to really kind of understand why we're seeing what we're seeing. And it's going to have to resolve because as this credit gets impaired, it's only going to get more impaired until it resolves itself and they're going to have to step in with, just like Larry said, unbound amounts of printing. So I don't really place one of those things that I mentioned higher than the other. I think that they're all kind of interconnected and equally important to kind of be able to wrap your head around and for people that aren't intimately familiar with macro or some of the terminology. I can understand how that just sounds like a bunch of garbage, but I would just say that if I was going to simply describe it, think of like, you're in a lazy river and you're trying to go against the current. The current speeding up. It's getting harder for people just to retain their spot in the lazy river. Instead, they're starting to get pulled with the current, and that current is speeding up. And so it's really hard for somebody when you think of like a profitable business and somebody who's able to outperform in that environment to actually move up current like a fish. There's not too much of that happening in this environment. So that's how I would describe all the goblin gook that I said up front. And if I was going to put it in like a visual for everybody to really understand, I would describe it the way I did there at the end. And you guys want to respond to that? All right, let's go to Jeff Ross. Most important object on your radar right now? Well, I think I just covered it, so I don't want to take over and just repeat everything. But I think I think the most important thing besides I think volatility is important. I think well, lots of things are important, but to me, the most important sign is that the front end of the yield curve is now fully inverted. That just suggests to me that the trap has been set and that something is now we're just waiting for something to happen and for something to break. So just get ready for the floor dropout moment. All right, let's open it up. If you're in the audience and you want to come up here and ask questions of these guys, raise your hand. We'll bring you up. We'll be kind of I promise. If you want to ask questions in text, you can do that in our Telegram group. That's TM me. I'm sorry. It's? What is it, Jacob? I'm like forgetting it right now. Tmecafelinkler. While we're waiting for questions, Alex, I want to build on Dr. Jeff's excellent point. This is perhaps lost on a lot of people that when you are now shorting bonds, you are paid positive carry because overnight or repo is set off of fed funds, and every other point on the curve is below fed funds. That in itself leads to enormous stresses in the system. Okay, I know it's not second nature for people to understand that, but that is a dynamic that has very rarely existed all across the yield curve in the USA for a sustained amount of time. And that's why we're pushing up count the daily average not daily average, the daily time limits that the curve is inverted that Jeff is looking at and that is assigned. The pressure is building and building and building until something breaks. So the easiest thing that the Fed can control is the short end of the curve. And right now they have it like a coiled spring. Okay. Everything else in the market is coiled against the short term interest rates at the Fed, such that if you short the treasury bonds, you're paid overnight to do it. Wow, that's sort of cool. People need to understand that they're paying a short term they're making shortterm decisions at a long term expense. Right. The shortterm decision is, let's keep raising rates so we can suppress inflation and try to get it under control. The expense they're going to pay in the long run is they're and I sound like a broken record, but they're going to destroy supply chains and make the next round worse because the inflation isn't going to come in at seven or 8% on the next round. It's going to come in at like twelve or 15%. So that's the price. Right. They're making a short term decision at a long term expense. And they've been doing this continually for like 40 years. Right. So it's just building and building and coiling and coiling and so nobody should be surprised in the coming three to five years when this scenario plays out. That's pretty spooky. ",timestamp:"01:41:29-01:49:09",topics:["Preston Pysh","Dr. Jeff Ross"],type:"twitter_space",weight:7.955174819771106},{boost:0,date:1593259200,description:"Gut health and GI track ",episode_title:"Episode 112: Mental Health And Metabolism: Autism, Depression And Your Small Intestine",guests:[],hosts:[],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/e8ad867b-9cbe-4126-9f37-313b4d2329a5.jpg",keyword:!0,link:"https://www.buzzsprout.com/482971/4336655-episode-112-mental-health-and-metabolism-autism-depression-and-your-small-intestine.mp3",node_type:"clip",pub_key:"032d7609ff3f4a5232e4d60967971e23bc671dfb68020845a59bab5dc1f3b93b87",ref_id:"47586bfe-8c83-4281-96b8-c9e0dc0a3ba3",show_title:"Dr Karl Goldkamp - Keto Naturopath",text:"So today I would like to talk primarily about our guts and where do we get the justification that based on our GI tract, our gastrointestinal tract, from stomach to small intestine to large intestine, and we're going to leave it at that, and we know we'll get into it, that this does have some relevance? Can you base everything on it? I can leave that up to you. It's not a question that I feel I have to answer. So I think it's relevant to have a working knowledge, working common knowledge. It doesn't have to be so esoteric. You don't need to be an anthropologist. You don't need to be an archaeologist. You don't even need to be a medical doctor. In fact, I wish most medical doctors would know what we're going to talk about. And a good portion of the information that I have comes from a talk that I attended by Doctor Anchildders. She's a doctor in the Northwest. She's a diabetic, as well as being a psychiatrist, a child adolescent adult psychiatrist, which is really pretty interesting. One of the talks that I attended that she spoke at, she made a reference to animals, and she was very big into and is very much into her dogs and dogs and the diets of dogs. I'm going to get to that a little later. But it was very similar to shared with you about the nephrologist, the kidney doctor who talked about her cats that they had, and it was how they were getting sick and couldn't digest things properly on a processed food diet, otherwise known as cat food diet. And finally she gave up and just started giving them raw meat. And cats are obligate carnivores. And so gave them meat, chicken, fish, and so on, and everything became right then. They're great, happy cats now. Well, a similar story that I'll share with you later is also going to be about dogs. Even though dogs are not considered obligate carnivores, they're considered a little more omnivorous, and that's sort of up in the air, meaning perhaps they are obligate carnivores. So we're going to look at the gastrointestinal tract comparative differences and similarities to see if that speaks to the kind of diets that we have. That's going to be one vein that we're going to talk about today. And we're going to go off a few other offshoots of a little into autism, a little into mental disorders, because it's all related. I think she's a fascinating woman sorry, a fascinating doctor to listen to that she presents from, just like you remember, Dr. Christopher Palmer came from the idea of mental disorders. And he referred to, and I've referred to subsequently a number of times that Dr. Nora Lolkov, who is the head of the addiction agency, us. Addiction Agency, and how they're now starting to study the ketogenic diet for its effect on mental disorders. So there's a big circle here that we're going to be talking about. Okay, ",timestamp:"00:03:30-00:06:49",topics:["Gut health","GI track","anthropologist"],type:"podcast",weight:3.8545703887939453},{boost:0,date:1625958277,description:"The characteristic and culture of Bitcoiners and Bitcoin maximalists communities, putting a premium on reputation",episode_title:"WHY ARE WE BULLISH? Brandon Quittem, Timothy Kim, Shinobi, Steve Barbour ep185",guests:[{name:"Brandon Quittem",profile_picture:"https://pbs.twimg.com/profile_images/1502403738861940736/9J5VuTye_400x400.jpg",ref_id:"65512044-7810-4ece-8156-5519e072cb66",twitter_handle:"Bquittem"},{name:"Shinobi",profile_picture:"https://pbs.twimg.com/profile_images/1526590501742428160/0Y5H2uJK_400x400.jpg",ref_id:"a05dface-33a7-400d-a749-99efe0d96118",twitter_handle:"shinobi602"},{name:"Steve Barbour",profile_picture:"https://pbs.twimg.com/profile_images/1592714173469065216/q8kXPyQI_400x400.jpg",ref_id:"63a731b8-4759-4360-9e9d-d66f884e12d8",twitter_handle:"SGBarbour"},{name:"Timothy Kim",profile_picture:"https://pbs.twimg.com/profile_images/1569681307029934081/2s_nWYo__400x400.jpg",ref_id:"e0323798-c70f-4cc3-96ff-87bab50c2313",twitter_handle:"realtimothykim"}],hosts:[{name:"Ben Perrin",profile_picture:"https://pbs.twimg.com/profile_images/1181715113226596352/ipGVEcYH_400x400.jpg",ref_id:"e6b013ef-178b-4b41-95ee-423148a3dc3a",twitter_handle:"profbenperrin"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/419512c2-e309-4b25-bfe2-cd481d53f66d.jpg",keyword:!0,link:"https://anchor.fm/s/11e95d20/podcast/play/37027401/https%253A%252F%252Fd3ctxlq1ktw2nl.cloudfront.net%252Fstaging%252F2021-6-10%252Ffb6d5638-4579-5707-9740-0e586c980ba7.mp3",node_type:"clip",pub_key:"037f7331a5bef6c6f880246747befcc3767f3bb9730bc5e6f7c3770f4184ed0bff",ref_id:"00f5cd32-cb12-4c4c-979a-ed45445a103e",show_title:"BTC Sessions",text:"voters. I have a question, Shinobi. Do you think that I know we're kind of going down a little bit of a detour here, but in regards to I guess it applies in regards to breedlove or in regards to politicians or whatever if somebody messes up, do you think? Because right now, yeah, sure, the whole bit clout debacle and dude has more followers than he's ever had and so and so forth, do you think that's just a symptom of less? Like only a small percentage of people actually being in tune with bitcoin and kind of the incentives, it aligns and that shifts over time where people begin to kind of align with that low time preference ethos and eventually expect more of people and that has more of an actual impact on their actions moving forward? Or do you think that's just like a forever symptom of people just don't give a shit and they're not going to look deep enough to care? I think we're in our eternal September and I do think the amount of people in just pure numbers who actually start to go deeper down the hole think more about time preference and to what degree or what bar they hold other people, that number will grow. But percentage wise versus the people who don't give a shit, no, it's probably just going to keep shrinking and that's just a fundamental thing here. That's all it comes down to. Even personally speaking, I don't give a shit about people dumping a shit coin or trading a shit coin. Have at it. Just don't sit here and try to bullshit me about what you're fucking doing. You're dumping a shit coin to get more bitcoin. Own it. Yeah, I think the major point here is that the immune system of bitcoin, the toxicity, the way we police each other, et cetera, that's very important in the beginning with any community. You have to establish norms and ways to go about things and whatever. But at a certain point back to its eternal September, right, the new entrants outnumber the ideologically motivated people in the beginning that are incubating. And that has to happen for bitcoin to succeed. So our job is to just simply provide cover fire so that bitcoin can get through the door. We're trying to incubate this thing so it becomes too big to fail and then necessarily it must outgrow us at some point. And so there's going to be that tension point, like are we too big to fail now? Should we relax a little bit or do we need to stay vigilant for another period of time? And I don't know the answer to these questions, but if Bitcoin can't accept way more new users that aren't ideologically aligned, then Bitcoin failed from the beginning. Yeah, absolutely. And old breed love, he didn't really turn on Bitcoin like, some guys in the past, like Mr. Roger Verte and others. I don't think it's even in the same conversation. I never even liked that. I ignored all the dramas. Like, man, the guy guy's doing what he's doing. He's not directly I don't want to go into that conversation, but to me, it was like, okay, I'm also a big Sony Maxie. I'm also like, Dude, that's sort of gay. That's like an old saying. It's sort of, like, ridiculous. It's like, whatever. Who cares? Whatever. He's not out there scamming. Or maybe some people disagree, but it's this simple. Just own it. Yes, just own it. Just own it. This is the one thing I said, don't act like you're the first person to dump a shit coin block. I wanted to create my own Fiat called Soy Coin. Like, Steve owes you coins and like, just like, you give me your bitcoin, you give me all your bitcoin, I'll custody and I'll give you my Fiat and you can redeem your Fiat for my coins. And I consider myself a bitcoin like Maxi, Maxis, Maxi. That's what I think of myself. And I thought it was a great idea because I know I wouldn't fuck anyone, I wouldn't steal your coins. But I was joking about it online and people are ripping into me. I'm like, well, it's not even a bad idea in some context. It's in some situations, custodial options in certain situations are a good idea, but people are so quick to just, like, narrow vision, censorship, resistance, like, run your own Node, like all the memes hoddle stacks at. And when you go against it, it doesn't mean you're not a Bitcoin. Maxi is just like, chill sometimes, you know? I do like the implications of the interim as, like, in the context of what Brandon is talking about and politicians coming into the fray. And I do like that, given it's still so niche. There's that immediate pushback when you start seeing dumb shit, right? Like, if you're a politician, I love. It when people say something dumb, like, online, and you get trashed by your fellow Bitcoin guys. Like bitcoin people. It's a good thing. Yeah, it's a very good thing. Yeah, 100%. And I like the idea of because there was a guy from it doesn't. Happen anywhere else, man. It doesn't happen anywhere else. You could be in any other industry and people don't call you out. It's all about political correctness. There's no, like, just straight to the point. Like, be real, be truthful, be honest. And if you don't be honest, I think it's a really good thing. We literally told the richest man on the planet to go fuck himself and sell all his coins. So, like, the president has said, it. Doesn'T matter if callers had an amazing reply to Elon. Peter McCormack, like, in that little timeframe where Elon was being a weirdo with bitcoin, is that what you're talking about? Was that we were referring to where, like, Jack wreck them? I'm not sure about that. What was that one? Were you on turn on bitcoin about being dirty and then, like, Jack wrecked him on Twitter with all these reasons why, like, you're a fraud. It was, like, the best thing I've ever seen in my life. We all said, Go fuck yourself. Jack boiled down why Elon was actually a fucking idiot. Yeah, and I like that idea of because, like, politicians are used to, okay, I'm elected and then I get my term and whatever. And then I can just kind of like when it comes around to election time again, then I can start putting out the sound bites and sounding good. But bitcoin is like, they still how long ago was SegWit two X? And anybody involved in pushing that is like, as soon as they say anything, it's like, fuck you, man. What you tried to do was not okay. And so I feel like that seems. It'S only the people that didn't own it at all that are still getting shit. Because, like, anyone that owned it I don't know, was it the guy from Zappo or, like, one of the guys that were pushing it then? He owned it later. He's totally forgiven it's. Like, fine, you just got to own it. Right? Exactly. Fucking publicly apologize. One of the only fucking ones. And for that he's fucking badass in my book. Because that takes such a big person to do something like that. We're so used to people never, like, owning anything. I don't know what I love about the bitcoin space because I'm tied to the oil field and I'm tied to the bitcoin space. And I'm, like, sort of equally tied because I'm, like, on both ends of the spectrum. Like, in oil field, like, all these Fiat Maxi missions, fucking Nazis are like, saying, this is the way it's got to be. You're bad. You're bad for doing your business. You have to pay us a penalty. And it's ridiculous, this carbon tax stuff. And none of the oil companies, none of the people in the oil field are, like, making a platform of standing up against these people. But at least what I see in bitcoin, like, Marty Bent's, a big voice. There's other people in the bitcoin space that are big voices that are standing up against the bullshit. And you don't see that in normal industries because everyone is trying to be politically correct. But bitcoin people don't give a fuck about that because most of them, like, real bitcoiners are, like, self sovereign individuals. They don't care about being canceled. They don't care about, like, what anyone else thinks of them. I really have a hope that this is going to grow well, I'm seeing it grow. Like, I'm seeing Bitcoin penetrate the oil and get, like, the energy industries and the oil and gas. And so this is another bullish topic, but like, it's penetrating these industries, and I think it's going to change them. Like, I think it's going to change in big time. I'm out on LinkedIn trolling people, telling them to stop your bullshit. People don't normally see that kind of thing on LinkedIn because I just think it's necessary. Bitcoin maxis are considered almost like extreme intolerant individuals over bullshit. And I think it's going to permeate as it continues to be a factor in society. Like bitcoin continues to be a factor in society. I think there's an important point you made there. And regarding the bitcoin community, I think of it like a sports team or a fraternity or any type of organization, even a company who has the same mission or same goal, and we all align to this baseline value. So we may have very different personal lives or interests or whatever, but that sports team feel is important, right? Getting your ass kicked every day in practice is why you win games. And so the internal attacking that we do amongst each other is, in a way, practice. It's sharpening our tools, we're checking each other, et cetera. And that's why Bitcoin becomes the best team, right? Because we practice hard and we hold each other accountable at the same time. There's no tolerance of just nonsense. There's no nonsense tolerance. Stop fucking around. And you have to defend yourself. If you make a misstep, as we all have found out online at one time or another by saying something stupid. Exactly. Say something else stupid. The net of this, just to wrap up the net of this, is that it forces or it challenges a lot of people to become the best version of themselves, right? And that's where the magic is. You want to go write about Bitcoin? Okay, great. You better spend 100 hours or 1000 hours reading the existing literature. And if you're going to put something out there, it better be good because you're vying for the respect of the community. And so, speaking for myself, it challenges me to put out the best version of content that I can or be a better version of myself in my personal life or whatever it is. And that's extremely powerful, right? People eat differently. They work out, they change their diet, they Chernoby quit smoking. There's all these examples, and that's amazing. That's just a crucible of positive development. And positive development comes with pain and sacrifice and challenge. That's the only way. And constructive criticism, which is what we're all really doing to each other. And a lot of people can't take it in life. Maybe not. It's a hard thing for a lot of people, like, constructive criticism. And it's just ruthless in this space. Ruthless. Like, you can't make a misstep without getting constructively criticized by some anon on Twitter, but it's a beautiful thing. It's a really beautiful thing. It is a beautiful thing. People walking into, like, bitcoin Twitter, they're like, Jesus Christ, you guys are just tearing each other apart. You're such a l to each other. It's a meme at this point for a person to get the dogs attacking. Like the bitcoin dogs attack. And when they say something ridiculous, like whether it's FUD against bitcoin, which is usually something fun against bitcoin, and then all the someone finds it right online and then the dogs attack and it's like, I smell something, say something stupid, that's exactly you almost like, can't stop yourself from fucking. Just like, getting on there and joining in. But it's amusing to see as soon as they say something stupid, like you see a list of big players jump in and just grill. Yes, it is great. I love the standard that everybody's held, too. And if you can endure that, if you can then look at responses. If you get that flak and you can endure it and look at it and go, okay, what's actually behind this? Is it bullshit or did I do something that was totally off base? If you can get through that, then you can go a long way in bitcoin. Just in having that and it extrapolates out to the rest of your life, right? Like, if you can endure the criticism and then take the good criticism, the stuff that actually makes you improve yourself and use it to iterate, as opposed to just becoming defensive, I think that's a good trait to have. And bitcoin definitely gave me thicker skin than I used to have, that's for sure. It's also real and honest and supportive. Like, let's discard, let's say 1020 percent of people who are just being mean for no reason, they can go fuck themselves. They have no value to the conversation. But the other part of it is it's honest feedback. And almost nowhere in life you get that, right? We're taught culturally to be I mean, politically correct is what we call it now, but we kind of shy away from any amount of conflict. And what does that do? You're actually lying to your friends and your family. And we become such pussies, we can't actually say what we mean because the true thing is hard to say. And oh, my God, the chat is loving Timmy right now. He's the boss, man. He's a boss. I feel kind of bad right now. I think he might legitimately sleeping, but we're just going to roll with it, guys. I feel bad. I screenshotted the chat and posted on it. I don't want to stand, man. I've almost polished off as twixer, man. We got to go. It's all good. Well, I'm also Irish and Scottish, but I weigh like, literally almost £70. Don't dock yourself. We weigh £150. Shinobi, how tall are you? Let's just say it's hard for me to. Put, like, mass on and keep it. I'm 180. I thought I was thin. Brandon, what was the last thing you're saying there? We're all another good point. Yeah. Okay. The point is that because we're politically correct, we beat around the bush. We don't say things honestly. And the thing about that is you think you're doing you actually hurt people. Exactly. You think you're doing the right thing by not bringing up conflict. But in fact, the exact opposite is true. The hard truth is important. You have to give your friend a point. You have to give your family a point. You just made me think of, like, an idol of mine, which sort of no longer is Kevin O'Leary. Okay? Kevin O'Leary. So I grew up for years before Kevin O'Leary became big on Shark Tank and in the US. He was on Canadian dragonstone. Remember that sessions? Like, he was a big one, dragons. Before he got really big in the US. And became a big swinging dick. Like a big famous guy. I love that guy because I would watch that show. I always wanted to start a little small business when I was younger. I was like, that's so cool. What are these people doing? I love seeing their inventions. He would be ruthless. He'd be ruthless to people. But he would tell them his truth. Whether it was the truth or his truth, he would tell them his opinion. And I was like, man, this guy's the best. You don't see guys like this. You don't see guys that are cut throat. Your idea is shit because of this. Rip the dreams down on live TV, right? Like, just rip them down ruthless. He made a name for himself for doing that. And he became famous. Went into a shark tank, became famous. Now he's, like, hating on bitcoin, which is sad to me to see because I was like, this guy is the fucking boss. I love this guy. And now he's like, clean coins and ethical coins and all this stuff. I'm like, dude, you just totally ruined your image. I hope you'll eventually come to the good side and figure it out. He'll figure it out. Because I feel like he's one of the good guys generally, but he's also a guy, but wanting to make money. But he's one of the way you're saying, like, bitcoin ers, what I consider bitcoin is are ruthless. They don't sugarcoat anything. If you go out and do something silly stupid, even to say something stupid, misstep, you're getting called out. And it's not because people are you're right. You mentioned, like, the people that are just, like, constantly just negative. Like, you know, we've seen those people. Like, most of us, I think, like, everyone on this chat are like we're actually just this is constructive criticism. This is like, what we think. We might be wrong, but we're like, this is what we think. And we're going to give it to you if you missed that. And we're going to say you're an idiot, but don't take it to heart. Learn if it's the truth, absorb it and be better next time. And you're right. That's why Bitcoin is not going to lose. Because it just attracts the best people that are willing to be this non politically correct, just ruthless. It doesn't matter what it means to us to not be your friend. We're just going to tell you what we think in the end. Honestly, I think it's going to like Brandon shinobi. I actually never met Tammy before. I would love to know him more. BTC sessions. In my mind, you guys got a sick reputation. Like, sick reputation. If we were going to do business, I wouldn't need a credit application to give you credit. I'd be like, I already know things about you from peripherally listening to you guys, that it would just be you get full credit. I know your reputations and that's why I think that's the thing that differentiates this industry from others. Especially in the mining space, man, it's such a scammy space. My only goal, my only goal is that we try to provide a good service. My only goal is to not fuck any of our customers anytime and absorb the cost of that. Because I know the reputation thing. It's the only thing that's going to carry us forward for like, a long, long time. Because the Fiat method of bailing out and like getting bailouts and like, equity raises and stuff doesn't work. Like, it's a reputational thing. Yeah. If you know what I'm getting at. There's a different ethos and it's coming back. Yes. Online. It's pretty much me and Adam. Like Denver bitcoin. I have other sales guys that aren't as online. But we get business because I think we build a good product. But it's a reputation thing. People want to work with people that you know that won't fuck you, especially in this space. I've had suppliers. Mining is a weird space. I've had suppliers that I've worked with for like literally years. All of a sudden, screw us. I had built up. I thought they were a reputable supplier. They screwed us because just the market changes, like, asics get pricey faster, they can't compensate us for the shit they sent us and it just burns bridges down. Whereas I feel like the long game is you can never ever, under any circumstance, you don't need a legal contract. You just have to be good faith business, not screw somebody. Eat the cost of your own mistake, your reputation will live on and it'll carry you to a place like you'll never get, no matter what kind of contracts you get, no matter what kind of Fiat backing you get. I feel like our company, I don't think we've ever screwed a customer. We fucked up like a bunch of times. I've shipped guys stuff that was instable asics I bring them back at our costs, replace them with something that works. Don't fuck anyone over. It's a small space. It's all reputation. That's the way it used to be. I think in my mind, that's the way it used to be. Before the Fiat range, I could buy a minor off of reddit with no escrow from a random person and actually have the Asics show up and not get screwed and make the money. That I thought was it because you had a big handle, like people knew who you were? Or was it because he bought off a reputable seller? It was just because it was a dude who didn't fucking screw me. He's an honest dude and I will never forget that. I would not be in this space right now if that is not an honest dude, because I would have just. He was on bitcoin talk or something or read it and had a rep. RA. He had a rep. That's it. There was no legal probably a legal contract, right? You just trust it. There's a comment here. Fisher jay character and integrity. And so when you're talking about bitcoin versus Fiat versus also shit coins, that seems to be the separating ethos where bitcoin is perfectly aligned with trying to get the best character and integrity out of everybody, because that's what works best for an unforgivably sound money. If you don't have those attributes, then who's going to extend credit via bitcoin? You just straight up wouldn't. Who's going to deal with you? Who's going to trust you in that way, shape or form? It brings back truth and it brings back characteristics of personalities that people actually want to deal with. And I don't see that in the altcoin space. I don't see that in the Fiat space, for damn sure. And it's refreshing to see that come back. I doubt that any shit pointers lose sleep over failing to deliver something for their client. We've gone through problems where our suppliers fuck us. We end up letting our customers down on delivery timings. I literally can't sleep for weeks knowing that our reputation is at risk over something that was whether it's in our controller or out of control or just poor planning. To me, the only way to do business in this industry, like bitcoin mining, is a weird thing where it's like I've been scammed multiple times and I'm like, really conservative on who I work with. I still get scammed. It's wild. So it's an industry in my mind that if we can't build up an amazing rate, you can be a Fiat max. You get infinite feet injecting your company and try to offer service and bail itself out with more Fiat injection. But when you're actually a small business trying to do it organically and get customers, you have to be super conservative, work really hard to find the right suppliers and not screw it up. And no matter what happens, if you're going to make money on the sale and the service or not. You take the loss as opposed to fuck your customer up. If you can do it that way, it's better to make your customer whole take a loss. Because as soon as one guy publicly says, these guys fucked us, we had a dispute. Why not? You're done. You're just fucking done. In this space. This space is so small. I look at it like it starts with mining. Mining is sort of the start of the distribution point of the coin. I have a theory that if you can just build an insanely reputable business in mining, you don't have to have any legal contracts. Your word is going to just carry you and let you get you could sell asics at a price, at a premium, just on your word. Because your customer knows that if they buy off you, nothing is going to go wrong. And that's not something you normally see in the fiat world. Everyone's like, buying insurance and shit. You can't even get insurance in this fucking industry. Like in Bitcoin Mine. You can't get it. I could talk about that for a while. They're censoring bitcoin miners to a big degree, and it's affecting our business. Shinobi's got a pushback. I can feel it. Real quick. One complaint doesn't burn. Shit. I'm sorry. Do you not remember Cobra in 2017? Shrieking. How long? Mining is a scam for like six months. I do remember that. Why is 10% of the entire network using over ASIC boost, which only how long hardware supports? What is that again? Fair enough. I have to start wrapping this because I have sleep. Can I give a 32nd point to Steve? I'm having a lot of fun. Why are you controlling this conversation? Just leave. You could actually just go do what you want and leave your screen empty. I can imagine. You want to go. Have fun with your wife and your kids and stuff. I'm having a good time. I'd come back. Tim would still be here. Tim is still going to be here. As long as Snowbie and Brandon want to hang out. Who. Do your thing. Let's pause, toss to it. Brandon, what does he have to say here? This is the best podcast I've ever been on. For Steve. Here. What you're describing is you're seeing the world through a bitcoin lens. You have long term thinking. Reputation matters. You're living in the future. Okay. I feel like I'm living in 2077, where it's all just this guy. Like, this guy's got a name. This company's got a name. It's not 2021. Agreed. And most people are living in the present or the past, which is short termism. Right? Incentives lead them there. This is planned obsolescence. Just in time economy. Get a new job every six months. Doesn't fucking matter. Just in time. Manufacturing. I fucking hate that shit. Yes. We literally build things so that they break really soon so that we can sell them another one, right? Yeah. Everyone's steeped in Fiat. And so I think that's the major difference here. I think the number one thing is long term thinking versus short term thinking. And then also bitcoin community puts a premium on reputation. I am hitting the stampede. Who is that? There's a dude from Edmonton. I just saw him in a Bitcoin meetup the other day. Anyway, he's asking for hitting Calgary Stampede, which started today. I may I'm not sure. Any are there Calgary bitcoin meetups. There? Are there's one every two weeks? I'll let you know. Why am I not there? I don't know. What the fuck are you doing with your life, man? You guys are in these weird social circles. You won't invite your boys? I don't know, man. I thought you were busy. They came from Saskatchewan. Yeah. I thought you were showering or something. I thought you're busy. You guys fuck with the Sheepdogs ",timestamp:"01:56:18-02:26:03",topics:["Bitcoiners","Bitcoin maximalists","reputation"],type:"podcast",weight:3.8466525077836837},{boost:0,date:1639872e3,description:"Investment and Internalization in Foreign Policies",episode_title:"PFP016 Remigijus Šimašius, Bullies as Neighbors-on the Foreign Policy of Small Countries (PFS 2008)",guests:[],hosts:[],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/624262ef-b30f-4114-8061-e310187e6bb4.jpg",keyword:!0,link:"https://www.youtube.com/watch?v=0WAituFO614",node_type:"clip",pub_key:"02574d6e8e787372184b6f17c40d6c6fe1777db9015801f95dfd24692784d767cd",ref_id:"300c09ff-ce2f-4b87-b3d8-cc7dd4d4f7d1",show_title:"Property and Freedom Society",text:"the bully or exploiting the bully also receiving super gas. Because economics of this you may see that usually small countries is better places to make and show profits and mounting money in case of managers. In this case Russia would be interested in not selling certain energy to this country. So this computer the absence of internalization there is no need for every system to think about how to adapt and how to deal. In this case when you have a bulletproof this is a strong soldier in place and then to do fashionable jazz energy companies. There's no political involved in the process and there's no split of pressing on energy issues in order to get something politically because have local dixator or country. It means that dixator tries everything into Persian people just for being government and actually for all of their people. It's not a big deal whether you obtain one government or another government while it is a free nation. So this kind of centralization wanted to protect and just say that creating strong power inside. And the other aspect of that. ",timestamp:"00:25:57-00:33:16",topics:["State Foreign Policies","State Investment"],type:"youtube",weight:3.8100023383634563},{boost:0,date:1672216200,description:"Why so many Lending Companies went bust in 2022",episode_title:"The Chopping Block Recaps 2022: Crypto's Biggest Winners and Losers and Best Memes - Ep. 437",guests:[{name:"Tom Schmidt",profile_picture:"https://pbs.twimg.com/profile_images/1563232354277085189/xQL92DR4_400x400.jpg",ref_id:"bc9d3bfd-36b0-4cbc-a491-9370decf4c99",twitter_handle:"tomhschmidt"},{name:"Robert Leshner",profile_picture:"https://pbs.twimg.com/profile_images/1587956987786104833/1SiKVj-s_400x400.jpg",ref_id:"ebaa2166-7982-423d-9f43-add89e7d47f9",twitter_handle:"rleshner"},{name:"Tarun Chitra",profile_picture:"https://pbs.twimg.com/profile_images/1587539091444432897/Z6_nmrCB_400x400.jpg",ref_id:"dfad4b23-92ff-4aa1-9aa4-abc1d54cd6d3",twitter_handle:"tarunchitra"}],hosts:[{name:"Haseeb Qureshi",profile_picture:"https://pbs.twimg.com/profile_images/1581025415551889408/thQwG4lb_400x400.jpg",ref_id:"790e4217-dd9f-416f-b9f8-ed596937f5b5",twitter_handle:"hosseeb"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/7de0d293-8ae3-4362-8500-8f7300f3fe41.jpg",keyword:!0,link:"https://pdrl.fm/98e0b1/traffic.megaphone.fm/LSHML7648700824.mp3?updated=1672173949",node_type:"clip",pub_key:"",ref_id:"100d4882-b3a5-4d34-b7f1-c3251dc7c462",show_title:"Unchained",text:"Sure the line, the prices, the product was coined by Calcimati last year. So yeah, I think it is fitting that this is the year of the dissolution of that meme well called out. So my biggest surprise, and by the way, I just want to point out for the audience, you can tell we're all being cute and we're all dancing around like the actual biggest surprises, but whatever, I'll continue in the theme of being cute. Well, because we already said them. We kind of already said that. We already said that because like the biggest losers. Yeah, exactly. Okay. But I just want to say that in case we don't actually say it. So in my case, the biggest surprise I would say was the death of all the lenders. So it doesn't surprise me that lenders died, right? Like, okay, of course prices go down. Some people were leveraged, some people made bad loans, they died. It turns out every fucking lender in the industry died. Every single one of them. We basically had a great financial crisis level extinction event for every single lender. That was surprising to me. Basically nobody has made money in lending since inception, which is really just mind boggling to me. You would think that in a cycle there would be some people who sort of went too far toward the tide and ended up getting carried away when the tide increased, but the people who were closer to shore would be okay, and there would be some people who were like, oh, I had better risk management. I did this, I did that, and that's why I didn't do what those crazy people did. Doesn't matter what you did. Almost everybody died from this generation of lenders. And I would not have even if you told me that prices in crypto would have drawn down 50% plus in a single year, I would assume like, well, you know, BlockFi is going to be screwed, but like, other people will be fine. But turns out, no, every single lender died. And so anybody who's building a thesis last year about, well, I'm going to underwrite this lender because they're better than the other. Yeah, okay, BlockFi is crazy, sell season is crazy, but these guys are going to be fine. No, the entire category all got destroyed this year. I do remember talking to some people who were investing in BlockBy, like, last few rounds, and I had just been like, oh, what's your thesis? Like, why do you think they're going to be really great? People always said the same thing for all of these mega lender rounds. Like self is blocked by not Amber, the person amber used babble, stuff like that. People would always basically say the following they have these like really great borrowers who are market makers. Everyone said the same thing about all the lenders. So maybe this is just like the cycle of life, it seems. So there's a lot of lessons about why fundamentally or what could you have arrived at to know that the entire category was just not underwriting. And I think a large part of it comes from the fact that lending on the whole made a lot of money last year, right? So people made in aggregate in the billions last year. Obviously it was a crazy year for crypto leverage period and so a lot of that would just end up getting recycled as crypto leverage. But the difference between lending so there are some very successful lending companies in web, two traditional startups, but most of them have some kind of innovation and the innovation might be a point of sale integration like Binary later. It might be some clever underwriting or being able to model out exactly what your repayment schedule is going to be or something like that. Nobody in crypto had all of these. People had bad 2020. They all did. They all did. But they didn't die. Right? They didn't die. They didn't die. That was a lot of just repricing due to rates. So like the attractiveness of these lending, basically being able to get high risk debt just on the whole got destroyed because of rates going up, right? So that's ultimately what a lot of these lenders were really doing was packaging up high risk borrowers but they didn't die. Everyone in crypto died. And I think part of the reason why that is that ultimately the lenders in crypto were competing on taking risk because there was no way to compete on technology. Nobody had any better technology, there was no actual innovation. Normally when VCs back a sector they do so because the person who has the better, you know, structural advantage is going to win. The person who has better technology, who has better vertical integration, who has better execution, whatever, they're the person who's going to win. And venture capital is in the business of finding that one person, giving them lots, lots of money and achieving the outside success. But if there is no vector for competition besides risk, besides just taking more risk, then basically every single person that is venture backable takes a bunch of risks and as soon as the tide increases they all drown together and that's basically what happened. And so I think for me that's a big lesson about just what it looks like to find a category, even if it's making money that actually has the properties of venture. The properties of venture should be that as a company gets bigger, it becomes more robust, not less robust. And that seems to be what happened to the lenders that as lenders try to get bigger, they became less and less robust. In traditional finance, lending is not a venture type business. It's something that obviously lending is a big business, it's massive, but it's not the kind of thing that small players grow overnight through some kind of magic growth hack or structural advantage and then end up becoming these big incumbents. It's the opposite. It's a very slow moving industry with very entrenched players. Well, one thing I would dispute about that characterization is that a lot of edge lending that requires either Novel underwriting standards or packaging up loans in some weird way like buying out payload example or pipe all these invoice. Factoring type of things. They were venturebacked because they had some sort of like there's this outsized premium that that market is going to grow and the current users are just small. Right, but I think that also points to real innovation, right. It's like understanding there's a class of users that nobody else understands how to underwrite and they have some technological way to underwrite them in real time or at a much faster sales cycle than anybody else can, right. That's both by now, pay later and. In spite of certain VCs asking me to stop calling VCs down on the show. Wait, who asked you to stop calling me that? I'm not telling you but you have. To call them out. What are you talking about? I'm not calling them out. I'm just going to let them hear that I said that so they know. I think the problem is VCs just took the model of the pipes of the world like oh, let's translate it to this edge asset that we don't understand but people are securitizing in some way and oh, it seems to be growing. I can kind of see the growth investor story for this because they're just like what's the spreadsheet of the numbers and it's not really about the technology. That is sort of the difference between late stage growth investors and seed investors. If you're investing in growth stuff you're not actually underwriting the technology anymore. At some point you might be if it's like SpaceX but like most fintech stuff it's not right. Like and so I think like there's a sense in which calling a nod venture investable is not totally true but it is true that the growth investors maybe were not so sophisticated. And I'm not going to call venture investors dumb so I'm just going to say that leave it at that. I think one of the things that makes it interesting from a venture perspective is that at a hypothetical level, lending is a business that could require a lot of capital for something that is mostly just software and a little bit of people. And I think venture investors get excited about businesses that could require $5 billion just because that's something that you can deploy assets and capital into its scale. Unlike most other businesses in our space or in finance in general. It's one of the things that could soak up just huge amounts of capital given the right conditions. And it gets better as it gets bigger, because when it's small, it's like, oh, why would we bet on this? What's the odds of this making any sense as it gets bigger? I think people's eyes widen when they see how much capital it could ask to soak up. And that's what makes it interesting from a business perspective, in a way that we're building this protocol or we're building a new blockchain. It's very different. I think that was true in a bull market when there was tons and tons of money, and that money was trying to find a home. Right. So I think it was very true last year. This year, I think many fewer people are thinking of businesses in that context. And I think this is exactly where the counter analogy, of course, is that Blockbuster had a huge employee base. All these lenders had tons and tons of bodies. Right. Whereas, Robert, to your point about compound compound ave, they don't need employees. They just kind of run their super capital light. That is actually traditionally what VCs like. VCs like the idea that with a small amount of principal investment, you can build something really big, that's the advantage of software businesses is that they don't scale through people, they scale through software. And DFI is the apotheosis of that. And so I think the regular lenders we're seeing were not. Yes. I will take this opportunity to say that DFI is better than the old way of doing business with tons of people and spreadsheets and making up decisions on the fly and choosing who to lend to based on how much they grow out with you or Tweet. Good tweets. DFI is vastly superior to all of these businesses that have failed in almost every way. And there's a reason why DFI has performed exceptionally this year in terms of the resilience and the smoothness of their operating versus the CFI, and the fact. That DFI does not trust your self certified balance sheet. It checks like you got to put the collateral in the fucking contract. Yes, it's very hard to scam a smart contract. It's very easy to scam a human at a lender. Speaking of that, I'm ready for our last category, because this ties into my best meme. Okay, ",timestamp:"00:57:50-01:07:52",topics:["Lending Companies"],type:"podcast",weight:11.145632554335025},{boost:0,date:1644037200,description:"Protesting on Negative Temperatures",episode_title:"WHY ARE WE BULLISH Yellow Sean Harris Plan Marcus ep235",guests:[{name:"Plan Marcus",profile_picture:"",ref_id:"59eabed3-a4d8-4924-a492-c7a5bf112e16",twitter_handle:""},{name:"Sean Harris",profile_picture:"https://pbs.twimg.com/profile_images/1602092854188261378/QpI6m349_400x400.jpg",ref_id:"7213bc9e-9d1e-4dab-a894-f3431b8abde7",twitter_handle:"BigSeanHarris"},{name:"Yellow",profile_picture:"",ref_id:"932cc68f-cd06-4adc-8447-4a9422f7a9a8",twitter_handle:""}],hosts:[],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/46277681-3564-4504-9ca8-e2f41d658d28.jpg",keyword:!0,link:"https://anchor.fm/s/11e95d20/podcast/play/47216896/https%3A%2F%2Fd3ctxlq1ktw2nl.cloudfront.net%2Fstaging%2F2022-1-5%2F246293871-44100-2-1e73fa52f5258.mp3",node_type:"clip",pub_key:"",ref_id:"72743f40-5811-46ea-b47e-145c68c72c5b",show_title:"BTC Sessions",text:"up there. They're not running their trucks. It's costing them a lot of time, a lot of money, probably a lot of stress on their families as well. It's not like they're there. What's the temperature over there? I'm like, so bullish, if you're like -20 willing to. Yeah. There's spots as they were driving through, especially like in Saskatchewan and Manitoba and stuff where parts of Ontario was like -30 or something. And people were standing outside just cheering them on flags and stuff. Yeah. I don't know. I guess that's what Claus was talking about. We have a small but closing window of Apple tree. They figured nobody's going to protest in the midst of the window. We got to push this through now, guys. The window is closing right now. I guess if it was going to be anybody in the winter, it was going to be Canada. We don't give fuck Canada, Russia, those two. Yeah, exactly. Awesome. Well, I won't take up too much time with this topic, but again, I'll just say thanks to anybody that's contributed or shared or anything. Follow Hong Kong Coddle if you want updates on that. I'll be putting those out as they come. So, yeah, let's keep it rolling. If you haven't already, like subscribe all that good stuff, keep the comments coming. I'll start pulling them up, but we're going to rotate yellow. You get to take us on a journey. What are you bullish about? This week? ",timestamp:"00:18:21-00:19:55",topics:[],type:"podcast",weight:3.8047182962583412},{boost:0,date:1637384400,description:"[[Hillary Clinton]] on Cryptocurrency Undermining National Currencies and the Role of the Dollar as the Reserve Currency",episode_title:"WHY ARE WE BULLISH Bitcoin Brendo Stacking Hats Josh Terry ep217",guests:[{name:"Josh Terry",profile_picture:"",ref_id:"1e5ab8da-a3a5-41aa-af6c-e056e9995baf",twitter_handle:""},{name:"Stacking Hats",profile_picture:"",ref_id:"3247f8a5-954a-4d1b-aa04-df1956eb9bd3",twitter_handle:""},{name:"Bitcoin Brendo",profile_picture:"https://pbs.twimg.com/profile_images/1362868540756254723/-vueErUH_400x400.jpg",ref_id:"a10413d8-38f5-42fd-a7a9-de79d90f26ec",twitter_handle:"BitcoinBrendo"}],hosts:[],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/1bf7b1ea-f717-4c0f-ae66-0e00b26603df.jpg",keyword:!0,link:"https://anchor.fm/s/11e95d20/podcast/play/43657768/https%3A%2F%2Fd3ctxlq1ktw2nl.cloudfront.net%2Fstaging%2F2021-10-20%2F27c2440d-0d0e-8b28-945a-dab5701ed4cc.mp3",node_type:"clip",pub_key:"",ref_id:"f15740f5-7c02-44d6-90c1-ff61fc00a120",show_title:"BTC Sessions",text:"quote. I think it was Gandhi, actually. But first they ignore you, then they laugh at you, then they fight you, then you win. And I think that we're kind of straddling the line and stepping over into the then they fight you phase. I say that because of this clip that dropped today, and I'll just play it here. This is Hillary Clinton. Take a listen. And then one more area that I hope nation States start paying greater attention to is the rise of cryptocurrency. Because what looks like a very interesting and somewhat exotic effort to literally mine new coins in order to trade with them has the potential for undermining currencies, for undermining the role of the dollar as the reserve currency for destabilizing nations, perhaps starting with small ones, but going much larger. So when we think about this new environment in which we find ourselves that we've been discussing for the last some minutes, we can't just think about nation States. So she's basically saying that Bitcoin stands to destabilize and undermine nation States and their currencies. And to me, it kind of sounds like, well, nobody is ignoring it at this point. By and large, the laughter has gotten more sparse and has quieted down a lot. And we're starting to hear a lot more of these higher ups. And legitimate people start to look at this, some favorably but others as a legitimate threat. And you see examples of people on either side of the fence here. ",timestamp:"00:08:37-00:10:45",topics:["hillary clinton"],type:"podcast",weight:3.8047181391399194},{boost:0,date:1666137600,description:"The motivation of building apps on the Lightning network",episode_title:"Meet the Makers: Alan & Kwinten",guests:[{name:"Alan Plus",profile_picture:"https://pbs.twimg.com/profile_images/1565235279451103233/XD8pJuIo_400x400.jpg",ref_id:"e362fed6-ec06-4d8a-a052-3137b24f213f",twitter_handle:"alnboltn"},{name:"Kwinten De Backe",profile_picture:"https://pbs.twimg.com/profile_images/917859380699320320/p_v-fjmh_400x400.jpg",ref_id:"be68f240-1f4c-4b27-b4bb-752c90cbe0c3",twitter_handle:"QuintenDeBacke1"}],hosts:[{name:"Moritz Alby",profile_picture:"https://pbs.twimg.com/profile_images/859727763292512258/kiFpZ2vO_400x400.jpg",ref_id:"e88efbf8-3809-4508-a86a-d7bf9effb574",twitter_handle:"MoritzKaminski"},{name:"Zapp Ed",profile_picture:"https://pbs.twimg.com/profile_images/1519990234070540288/adGqlFoj_400x400.jpg",ref_id:"bbe7cf1d-cd8d-4d36-926d-76f41b775fbb",twitter_handle:"zapp_ed"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/965489b4-a414-4fd0-ab8c-55911b1596aa.jpg",keyword:!0,link:"https://www.youtube.com/watch?v=GyA8tHNKmig",node_type:"clip",pub_key:"02574d6e8e787372184b6f17c40d6c6fe1777db9015801f95dfd24692784d767cd",ref_id:"8019d172-6711-45bb-a305-bf773c9ae85d",show_title:"BOLT FUN",text:"actually choose to build things around Lightning? What's the main motivation behind that? Should I or should Alan answer this question or should Ed? I know. Yeah. So I don't know, it just kind of clicked for me since the beginning. So I was looking for some things to do after graduating university, and I just came across this. And it's just something that is when you're able to look at it and understand the system, how it really works, then you cannot be not excited. I find it's just that, yeah, I don't know. It's an open system. Everyone can participate, and that means that the possibilities are endless and I don't know what else I can see about it. And that hasn't been set for many times before. Alan? Well, for me, the bitcoin was definitely the default base layer, right? So I found that that's the future of money in terms of like a monetary base layer. But it was obvious from the beginning that it won't be able to handle all of the payments in the world because of hardware constraints on nodes and the Lightning network was promising to solve that, and it did. So it was like a perfect storm of things. Like you have the perfect base layer, and now we have a really solid solution for payment for the payment rail. So there's nothing else out there, really, that could compete for me. I know that there are many coins that promise all kinds of things, but the problem is none of them have the base layer. So no matter how good they are in terms of speed, it's just like nobody cares, really, aside from a small group of fanatic people who are invested in the success of those coins on short term. But on the long term, I don't think it's going to work. It's just a default. There's no other option for us right now. You either go with the Custodial system or bitcoin. And Lightning, I think. I think it's a very good summary from the two of you. But now you're working on Lightning Network Plus. You already mentioned that the Rings of Fire. Maybe you can explain a bit what is the Ring of Fire and what led to or what problem do you want to solve now with Lightning Network Plus? Sure. So I think the biggest issue that new users of the Lightning Network face is that they can open channels to other nodes and spend their bitcoin, but if they want to receive funds. So for example, somebody pays them for their work, or they receive tips, or they get paid by all these gaming apps and the podcasting apps and all the stacker news, all of these places which pay you, they won't be able to receive until they spend from their channel. And if they want to receive a lot of money, they will have to spend a lot before that can happen. So that's very unexpected for most users because on base layer bitcoin, there is no such problem. You can just receive any amount instantly. But on Lightning, that's not the case. So you have to have somebody opening a channel to you in order for you to be able to receive money. Or you have to empty your own new channel, which is cumbersome. So basically every node has this problem. Every new user has this problem. And somebody came up with this idea, it wasn't me, somebody before Lightning Network Plus was created, that why don't a couple of node operators band together, like team up and open to each other? So let's say we have three people, and everybody opens to another node operator in like a circle, or like a triangle rather, if it's three people, and then everybody receives a channel and also opens a channel to somebody else. So instantly you have two channels and you have incoming liquidity and outgoing liquidity, and the problem is solved. It's a rather simple solution to this initial problem. Basically, Lightning Network Plus, all it does is just allows node operators to team up and create these triangles and other shapes. There are square pentagons and you can also create so called dual funded channels which is between two node operators and it's a double sized channel ",timestamp:"00:06:18-00:12:01",topics:["Lightning network","ring of fire"],type:"youtube",weight:3.9958031609925744},{children:["6825363e-4733-4d3b-be8f-ef3a90b3549b"],episode_title:"The Chopping Block: The Inside Story of How Blur Toppled NFT Giant OpenSea - Ep. 459",guests:[{name:"Pacman Blur",profile_picture:"https://pbs.twimg.com/profile_images/1499571704753901569/wLAcCdsu_400x400.jpg",ref_id:"c042615e-905a-49af-8761-fa6fb1be4b8a",twitter_handle:"PacmanBlur"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/7de0d293-8ae3-4362-8500-8f7300f3fe41.jpg",node_type:"episode",ref_id:"d4948551-6ec5-4649-a700-364592e09edd",show_title:"Unchained"},{children:["100d4882-b3a5-4d34-b7f1-c3251dc7c462"],episode_title:"The Chopping Block Recaps 2022: Crypto's Biggest Winners and Losers and Best Memes - Ep. 437",guests:[{name:"Tom Schmidt",profile_picture:"https://pbs.twimg.com/profile_images/1563232354277085189/xQL92DR4_400x400.jpg",ref_id:"bc9d3bfd-36b0-4cbc-a491-9370decf4c99",twitter_handle:"tomhschmidt"},{name:"Robert Leshner",profile_picture:"https://pbs.twimg.com/profile_images/1587956987786104833/1SiKVj-s_400x400.jpg",ref_id:"ebaa2166-7982-423d-9f43-add89e7d47f9",twitter_handle:"rleshner"},{name:"Tarun Chitra",profile_picture:"https://pbs.twimg.com/profile_images/1587539091444432897/Z6_nmrCB_400x400.jpg",ref_id:"dfad4b23-92ff-4aa1-9aa4-abc1d54cd6d3",twitter_handle:"tarunchitra"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/7de0d293-8ae3-4362-8500-8f7300f3fe41.jpg",node_type:"episode",ref_id:"25e36282-297b-4f9d-b6e9-da65731be8a8",show_title:"Unchained"},{children:["a3fd38b6-998f-4c62-ab60-554ef9275993"],episode_title:"The Chopping Block: The SEC Is Attacking Crypto – Will Gary Gensler Succeed? - Ep. 456",guests:[{name:"Marc Boiron",profile_picture:"https://pbs.twimg.com/profile_images/1486397784844496897/ZyNlahT2_400x400.jpg",ref_id:"3f27d12e-0a50-42c0-8b76-b3bb15fa1ce6",twitter_handle:"boironattorney"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/7de0d293-8ae3-4362-8500-8f7300f3fe41.jpg",node_type:"episode",ref_id:"53cab9be-0f22-42a2-aef5-87920c2431cf",show_title:"Unchained"},{children:["ecaaa46f-b7ad-49b7-aae3-402befc21ab6"],episode_title:"The Chopping Block: Here's Why Gemini Could End Up Filing for Bankruptcy - Ep. 447",guests:[],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/7de0d293-8ae3-4362-8500-8f7300f3fe41.jpg",node_type:"episode",ref_id:"6028f484-d0b9-424a-87e5-d0dcb39f9fc7",show_title:"Unchained"},{children:["0329d1cb-7a66-4de5-a67d-36f28fce092f","a24f0efb-66be-40a2-afa2-bf29f370b10d"],episode_title:"The Chopping Block: Why Gemini Users Are Mad at Genesis and DCG - Ep. 443",guests:[],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/7de0d293-8ae3-4362-8500-8f7300f3fe41.jpg",node_type:"episode",ref_id:"092e9794-afc9-41fe-a635-4802777415a1",show_title:"Unchained"},{children:["6681918f-0067-45b2-b7ad-0f79d9ce724d","8b5e41e9-6cc2-4070-8210-6f49967759f2"],episode_title:"The Chopping Block: SBF Wants to Win in the Court of Public Opinion. Will He? - Ep. 428",guests:[],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/7de0d293-8ae3-4362-8500-8f7300f3fe41.jpg",node_type:"episode",ref_id:"36f1f7e1-df70-4528-8474-4bba448b1ed0",show_title:"Unchained"},{children:["9f78ecd6-03f5-4f0e-ba8b-1dbb60b09052","51ecdc95-4e1d-448b-923c-5a7e1822f131"],episode_title:"The Chopping Block on FTX/Alameda: Is Sam Bankman-Fried 'Crypto Kanye'? - Ep. 424",guests:[{name:"N/A",profile_picture:"https://pbs.twimg.com/profile_images/1478260779522658306/rm6XqGZx_400x400.jpg",ref_id:"9862384f-b99b-4777-aa71-538d41591686",twitter_handle:"unchained_pod"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/7de0d293-8ae3-4362-8500-8f7300f3fe41.jpg",node_type:"episode",ref_id:"6d267cc1-22b1-42fc-9b60-9701e64a75d0",show_title:"Unchained"},{children:["1f39afe1-2026-44ca-a0b5-80aea9a8cc83"],episode_title:" The Bitcoin v Crypto War with Udi Wertheimer, Crypto Cobain, Alex Gladstein & Allen Farrington",guests:[{name:"Crypto Cobain",profile_picture:"https://pbs.twimg.com/profile_images/1601273673041776641/7FrXDRv6_400x400.jpg",ref_id:"8fa5fec2-f714-433e-a8c9-ee5e76dabaf0",twitter_handle:"cobie"},{name:"Allen Farrington",profile_picture:"https://pbs.twimg.com/profile_images/1414147363560730624/EXMx91D6_400x400.jpg",ref_id:"8660a251-950b-4888-adbf-21f790210cf6",twitter_handle:"allenf32"},{name:"Udi Wertheimer",profile_picture:"https://pbs.twimg.com/profile_images/1600897375001874432/8pdVDKUz_400x400.jpg",ref_id:"483291b7-2101-4c28-a065-93b1524d0552",twitter_handle:"udiWertheimer"},{name:"Alex Gladstein",profile_picture:"https://pbs.twimg.com/profile_images/1382371620669452292/VOPKOc8w_400x400.jpg",ref_id:"49445c1c-7c66-4b73-9eec-09a337befbec",twitter_handle:"gladstein"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/4e607036-8fde-48ef-ab76-9c2ac4bab031.jpg",node_type:"episode",ref_id:"a7afaa66-6878-40c2-97fd-88a20ae007fd",show_title:"What Bitcoin Did with Peter McCormack"},{children:["ccac3748-afc5-4404-8497-1710f501f49f"],episode_title:"Mining Bitcoin with Nuclear Energy with Ryan MacLeod",guests:[{name:"Ryan MacLeod",profile_picture:"https://pbs.twimg.com/profile_images/1443185278525579278/_Yl1nao1_400x400.jpg",ref_id:"20a72757-923c-4a01-ad4f-7ccdc2a83e03",twitter_handle:"NuclearBitcoinr"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/4e607036-8fde-48ef-ab76-9c2ac4bab031.jpg",node_type:"episode",ref_id:"910f5aab-7896-4c19-8649-64dcef44c369",show_title:"What Bitcoin Did with Peter McCormack"},{children:["7ef1c3a7-3028-4a9d-a012-82a61645ecb4"],episode_title:"Read_375 - A Match Made in the Whitepaper - Treatise on Bitcoin & Privacy, Part 1 [Giacomo Zucco]",guests:[],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/9e7e229f-2631-4542-b5d7-7fcd502798dc.jpg",node_type:"episode",ref_id:"47c54384-785c-4a4b-bad1-cac242d8f190",show_title:"Bitcoin Audible"},{children:["2b8ef20b-4134-4d6a-bb2f-ee72a42468d2","4636725f-ae47-4777-bd41-f78a4694ba05"],episode_title:"Chat_45 - Bitcoin & an Energy Revolution, A panel at the VOB Conf",guests:[{name:"Christian Stoll",profile_picture:"https://pbs.twimg.com/profile_images/3296579573/69ebedb479a9bdb9d536fe887e2d3113_400x400.jpeg",ref_id:"ff74d59c-f846-4b16-a5e5-771fb8139f18",twitter_handle:"Granddragon14"},{name:"Jesse Peltan",profile_picture:"https://pbs.twimg.com/profile_images/1123954968636088326/EAjHUGDE_400x400.png",ref_id:"96309505-caeb-47bb-a1ba-712b97292675",twitter_handle:"JessePeltan"},{name:"Phillip Sandner",profile_picture:"https://pbs.twimg.com/profile_images/1043824764161335296/2SW3duCV_400x400.jpg",ref_id:"e1996e82-0354-421c-85d5-f18eebec9506",twitter_handle:"philippsandner"},{name:"Tone Vays",profile_picture:"https://pbs.twimg.com/profile_images/1416821178266787844/T1OkI9ZW_400x400.jpg",ref_id:"da6fc991-7080-461c-86e3-4ac18c2f413d",twitter_handle:"tonevays"},{name:"Christopher Bendiksen",profile_picture:"https://pbs.twimg.com/profile_images/1362772558882484233/3nS-l35s_400x400.jpg",ref_id:"d99d354e-41d4-4117-9b70-05955a85f9da",twitter_handle:"C_Bendiksen"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/9e7e229f-2631-4542-b5d7-7fcd502798dc.jpg",node_type:"episode",ref_id:"aa033894-120f-494e-9d6b-c6d62dfb0a69",show_title:"Bitcoin Audible"},{children:["307ee148-c00d-4195-b815-bee1f45abe5d","b241a91d-07ff-4169-9df8-16783be79ed1","67236e2a-900b-4cf6-bc6c-165c0f7e3219"],episode_title:"Chat 39 - Bitcoin Renaissance - with Marty Bent John Vallis Alex Gladstein Elizabeth Prefontaine Brady Swenson",guests:[{name:"Alex Gladstein",profile_picture:"https://pbs.twimg.com/profile_images/1382371620669452292/VOPKOc8w_400x400.jpg",ref_id:"49445c1c-7c66-4b73-9eec-09a337befbec",twitter_handle:"gladstein"},{name:"Marty Bent",profile_picture:"https://pbs.twimg.com/profile_images/1362747135981199370/mSy97J12_400x400.jpg",ref_id:"655bdcb1-21c3-411c-aa24-fe7e4c7a248c",twitter_handle:"MartyBent"},{name:"John Vallis",profile_picture:"https://pbs.twimg.com/profile_images/1568743166035070976/4MyKww8A_400x400.jpg",ref_id:"c3a9fe29-3b78-4665-af54-e293e9d68962",twitter_handle:"johnkvallis"},{name:"& Brady Swenson",profile_picture:"",ref_id:"0b68a085-0680-44b8-891c-6e1e84ac4eb1",twitter_handle:""},{name:"Elizabeth Prefontaine",profile_picture:"https://pbs.twimg.com/profile_images/1382790711427354625/D09LMToL_400x400.jpg",ref_id:"4506df72-5de4-4144-abc4-011408b6b496",twitter_handle:"Eprefon"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/9e7e229f-2631-4542-b5d7-7fcd502798dc.jpg",node_type:"episode",ref_id:"53402b84-7b30-4fec-a741-d9ef8fa03389",show_title:"Bitcoin Audible"},{children:["4fdf8ab1-a3e8-4390-b618-a8a915fa3f68","8ab125e2-e555-4adc-817a-bbf5bb93bf40","30641d73-c61d-47f4-bf37-f78566574dc8"],episode_title:"Chat 45 - Bitcoin an Energy Revolution A panel at the VOB Conf",guests:[{name:"Tone Vays",profile_picture:"https://pbs.twimg.com/profile_images/1416821178266787844/T1OkI9ZW_400x400.jpg",ref_id:"da6fc991-7080-461c-86e3-4ac18c2f413d",twitter_handle:"tonevays"},{name:"Phillip Sandner",profile_picture:"https://pbs.twimg.com/profile_images/1043824764161335296/2SW3duCV_400x400.jpg",ref_id:"e1996e82-0354-421c-85d5-f18eebec9506",twitter_handle:"philippsandner"},{name:"Jesse Peltan",profile_picture:"https://pbs.twimg.com/profile_images/1123954968636088326/EAjHUGDE_400x400.png",ref_id:"96309505-caeb-47bb-a1ba-712b97292675",twitter_handle:"JessePeltan"},{name:"Christopher Bendikson",profile_picture:"",ref_id:"d72ead54-7bff-4874-870f-123e665fddfd",twitter_handle:""},{name:"Christian Stoll",profile_picture:"https://pbs.twimg.com/profile_images/3296579573/69ebedb479a9bdb9d536fe887e2d3113_400x400.jpeg",ref_id:"ff74d59c-f846-4b16-a5e5-771fb8139f18",twitter_handle:"Granddragon14"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/9e7e229f-2631-4542-b5d7-7fcd502798dc.jpg",node_type:"episode",ref_id:"3a9db5f7-6722-469c-a0c6-6b157f44f33f",show_title:"Bitcoin Audible"},{children:["1df5002c-3c8a-42db-960a-2a35a6596b63"],episode_title:"E34: Cory Klippsten on Building Swan Bitcoin, Angel Investing, and the Lightning Network",guests:[],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/b6c52903-5124-43f4-8632-bc9aeb941f2e.jpg",node_type:"episode",ref_id:"fccdc763-2b69-4418-9a7a-78cdfe615ba9",show_title:"The Kevin Rooke Show"},{children:["362a90a7-c9dc-4c90-827b-8cf469895c35","c6a74c1e-d942-46d9-85e0-b7f33bb41078"],episode_title:"SLP321 On chain scaling with Bitcoin Core Developers Pieter Wuille, Andrew Poelstra, Andrew Chow & Murch",guests:[{name:"Pieter Wuille",profile_picture:"https://pbs.twimg.com/profile_images/1264051937172836353/n7gHdLbB_400x400.jpg",ref_id:"40260d2f-3480-47d6-8515-d2e780901273",twitter_handle:"pwuille"},{name:"Andrew Chow",profile_picture:"https://pbs.twimg.com/profile_images/1452266201770496010/44FHCtZM_400x400.jpg",ref_id:"f96d87ca-5060-4021-aeb9-61db03312027",twitter_handle:"andrewrchow"},{name:"Andrew Poelstra",profile_picture:"https://pbs.twimg.com/profile_images/1316562683009921024/FSscAYvJ_400x400.jpg",ref_id:"15fb9c53-c988-4af1-bbf0-4832d71b0a01",twitter_handle:"Blockstream"},{name:"Murch",profile_picture:"https://pbs.twimg.com/profile_images/1269477743525130241/-U843Cmt_400x400.png",ref_id:"3e2c1c73-a057-4475-9782-3bb0d3d8cc62",twitter_handle:"murchandamus"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/b79a3eb8-bcd0-4338-b979-d32aef360785.jpg",node_type:"episode",ref_id:"ae631d96-3b81-4308-bcc1-a57f81339b5c",show_title:"Stephan Livera Podcast"},{children:["a61c7685-556b-4886-8908-fd0ead4dc1f2","b1eabcd8-8d00-4950-b264-f4f2741ca3a7"],episode_title:"How Bitcoin UASF went down taproot lot true speedy trial small blocks",guests:[{name:"Luke Dashjr",profile_picture:"",ref_id:"c3b2367f-2863-421b-8b2c-c093423f0eaa",twitter_handle:""}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/b79a3eb8-bcd0-4338-b979-d32aef360785.jpg",node_type:"episode",ref_id:"4bea6c89-43b4-4e5e-9fea-0662d9ee7c00",show_title:"Stephan Livera Podcast"},{children:["72743f40-5811-46ea-b47e-145c68c72c5b"],episode_title:"WHY ARE WE BULLISH Yellow Sean Harris Plan Marcus ep235",guests:[{name:"Plan Marcus",profile_picture:"",ref_id:"59eabed3-a4d8-4924-a492-c7a5bf112e16",twitter_handle:""},{name:"Sean Harris",profile_picture:"https://pbs.twimg.com/profile_images/1602092854188261378/QpI6m349_400x400.jpg",ref_id:"7213bc9e-9d1e-4dab-a894-f3431b8abde7",twitter_handle:"BigSeanHarris"},{name:"Yellow",profile_picture:"",ref_id:"932cc68f-cd06-4adc-8447-4a9422f7a9a8",twitter_handle:""}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/46277681-3564-4504-9ca8-e2f41d658d28.jpg",node_type:"episode",ref_id:"46277681-3564-4504-9ca8-e2f41d658d28",show_title:"BTC Sessions"},{children:["784b1ee8-56e7-403c-b813-24713fd3a29c"],episode_title:"WHY ARE WE BULLISH? Ant, Bitcoin Island, Decentra Suze ep324",guests:[{name:"Decentra Suze",profile_picture:"https://pbs.twimg.com/profile_images/1614189317345214464/Z4BZBBbb_400x400.jpg",ref_id:"da307464-4ac8-449a-81f0-74ea9749dd1b",twitter_handle:"DecentraSuze"},{name:"Ant",profile_picture:"https://pbs.twimg.com/profile_images/1617275233831886853/RlWpn1qQ_400x400.jpg",ref_id:"9575e6e8-cd06-48f0-b548-801f7d2357a5",twitter_handle:"2140data"},{name:"Bitcoin Island",profile_picture:"",ref_id:"9b88c77a-65c9-4ae6-a30c-890937636d7f",twitter_handle:"BitcoinIslandPH"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/419512c2-e309-4b25-bfe2-cd481d53f66d.jpg",node_type:"episode",ref_id:"b05fa33c-fc91-4b55-a592-85eaa1a5b3fd",show_title:"BTC Sessions"},{children:["d865c803-93a1-47ae-b851-5bd6a683eda5"],episode_title:"WHY ARE WE BULLISH? Mickey Koss, Nozomi Hayase, The Bitcoin Explorers ep320",guests:[{name:"Nozomi Hayase",profile_picture:"https://pbs.twimg.com/profile_images/1362950252823597060/i-UISQoY_400x400.jpg",ref_id:"f82d9145-3308-493d-aa13-1fc3e21b7dd4",twitter_handle:"nozomimagine"},{name:"The Bitcoin Explorers",profile_picture:"https://pbs.twimg.com/profile_images/1380933164596625408/vDK0Tf2r_400x400.jpg",ref_id:"a81905a1-3698-4c2d-b9d3-205e4b91a08f",twitter_handle:"BitcoinExplorer"},{name:"Mickey Koss",profile_picture:"https://abs.twimg.com/sticky/default_profile_images/default_profile_400x400.png",ref_id:"47e8b134-431a-40a8-8f56-21778cf6f927",twitter_handle:"MickeyKoss"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/419512c2-e309-4b25-bfe2-cd481d53f66d.jpg",node_type:"episode",ref_id:"b723d81b-9c99-4797-b3a8-67f824924f0c",show_title:"BTC Sessions"},{children:["0886e428-dab9-4882-9479-e2f64b5ed145"],episode_title:"WHY ARE WE BULLISH? Joe Consorti, Texas Slim, Max Gagliardi ep316",guests:[{name:"Joe Consorti",profile_picture:"https://pbs.twimg.com/profile_images/1596902707511664640/GYGWVDts_400x400.jpg",ref_id:"8d2024b2-03bb-454d-9bd6-bb121904b76a",twitter_handle:"JoeConsorti"},{name:"Max Gagliardi",profile_picture:"https://pbs.twimg.com/profile_images/1607930248301010944/2HRR14Fm_400x400.jpg",ref_id:"30de157e-f240-40a2-8048-bc2b39efef86",twitter_handle:"max_gagliardi"},{name:"Texas Slim",profile_picture:"https://pbs.twimg.com/profile_images/1589784780970795011/02jf0fqp_400x400.jpg",ref_id:"b4448c8e-9238-4aba-bd25-efb329ea5a72",twitter_handle:"modernTman"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/419512c2-e309-4b25-bfe2-cd481d53f66d.jpg",node_type:"episode",ref_id:"eaeec64e-8e03-4826-a7c5-e1969a71ca2d",show_title:"BTC Sessions"},{children:["98a90a75-7ec6-412a-b5a0-dca009985290"],episode_title:"WHY ARE WE BULLISH? HodlSolo, James Dewar, Christopher Gordon, Peter Rounce ep302",guests:[{name:"Peter Rounce",profile_picture:"",ref_id:"0f59ce14-c4c9-49a3-9ff1-2d4051931a19",twitter_handle:""},{name:"Christopher Gordon",profile_picture:"",ref_id:"b4b8fac7-00ae-423d-b22e-e1ecf079bb5d",twitter_handle:""},{name:"James Dewar",profile_picture:"https://pbs.twimg.com/profile_images/1092486738814078978/WxYQsqYo_400x400.jpg",ref_id:"960d2bf1-17e6-4821-a041-4a1283ef0bce",twitter_handle:"IndigoFast"},{name:"HodlSolo",profile_picture:"https://pbs.twimg.com/profile_images/1526883855742943233/WE19hgdQ_400x400.jpg",ref_id:"93734db0-ad98-41ef-8548-5b3868edc23f",twitter_handle:"HodlSolo"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/419512c2-e309-4b25-bfe2-cd481d53f66d.jpg",node_type:"episode",ref_id:"922ae599-5631-4ffe-977e-a9174fc028bb",show_title:"BTC Sessions"},{children:["b6fe310d-bfa4-48aa-bfc2-d36ed303d024"],episode_title:"WHY ARE WE BULLISH? Brady Swenson, Kristin Thompson, Alex Stanczyk, Jon Chernot ep300",guests:[{name:"Brady Swenson",profile_picture:"https://pbs.twimg.com/profile_images/1502564606836981763/fmqtNrNc_400x400.jpg",ref_id:"49966553-d55b-44c9-94ec-8fee09eee5c2",twitter_handle:"CitizenBitcoin"},{name:"Alex Stanczyk",profile_picture:"https://pbs.twimg.com/profile_images/1539055022364708864/rwErK6x1_400x400.jpg",ref_id:"3126e2a3-bbe4-456b-b298-9714085fa286",twitter_handle:"alexstanczyk"},{name:"Jon Chernot ",profile_picture:"https://pbs.twimg.com/profile_images/1557153813122859008/VlOtu_p4_400x400.jpg",ref_id:"9e92acc2-17ad-4e7b-89d9-98a43fd12a6f",twitter_handle:"jonchenot"},{name:"Kristin Thompson",profile_picture:"https://pbs.twimg.com/profile_images/1517531647956033536/lf6DvsQm_400x400.jpg",ref_id:"29ff14ed-7fa9-4c27-a972-0d708f7f78b7",twitter_handle:"SpeakServeGrow"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/419512c2-e309-4b25-bfe2-cd481d53f66d.jpg",node_type:"episode",ref_id:"b534755c-92b6-4df1-b1f9-a28578661f48",show_title:"BTC Sessions"},{children:["1376395c-9c36-4f82-bdde-86ce6cf7ba26"],episode_title:"WHY ARE WE BULLISH? Bitcoin Buying Tsunami Swells in All Waters ep147",guests:[{name:" Away Slice",profile_picture:"https://pbs.twimg.com/profile_images/1493953883370053632/rvtEfkr-_400x400.jpg",ref_id:"ff304d54-ca39-45eb-98ef-483460548c9a",twitter_handle:"add_slice"},{name:"Littlest Hodler",profile_picture:"https://pbs.twimg.com/profile_images/1396223393322749952/uzavXUxh_400x400.jpg",ref_id:"5eaa1126-c920-4860-89a0-459e64be2af5",twitter_handle:"littlesthodler"},{name:" and Colin Aulds",profile_picture:"https://pbs.twimg.com/profile_images/1151579149091262464/uNkb8aat_400x400.jpg",ref_id:"fbd7719d-1c4a-497d-96a8-1d34e2e91702",twitter_handle:"Colin_Aulds"},{name:" Mark Moss",profile_picture:"https://pbs.twimg.com/profile_images/1501276126823346177/6grHYzO4_400x400.jpg",ref_id:"5a1cc110-3363-4dd1-a568-e80f70a51925",twitter_handle:"1MarkMoss"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/419512c2-e309-4b25-bfe2-cd481d53f66d.jpg",node_type:"episode",ref_id:"b317d76a-25e6-42f6-bc97-3de9f6c3f081",show_title:"BTC Sessions"},{children:["00f5cd32-cb12-4c4c-979a-ed45445a103e","07ab82b4-2fe7-42f9-9018-bb8f4188eb3b","fe680ae3-835d-492f-b664-7d645d02a99f"],episode_title:"WHY ARE WE BULLISH? Brandon Quittem, Timothy Kim, Shinobi, Steve Barbour ep185",guests:[{name:"Brandon Quittem",profile_picture:"https://pbs.twimg.com/profile_images/1502403738861940736/9J5VuTye_400x400.jpg",ref_id:"65512044-7810-4ece-8156-5519e072cb66",twitter_handle:"Bquittem"},{name:"Shinobi",profile_picture:"https://pbs.twimg.com/profile_images/1526590501742428160/0Y5H2uJK_400x400.jpg",ref_id:"a05dface-33a7-400d-a749-99efe0d96118",twitter_handle:"shinobi602"},{name:"Steve Barbour",profile_picture:"https://pbs.twimg.com/profile_images/1592714173469065216/q8kXPyQI_400x400.jpg",ref_id:"63a731b8-4759-4360-9e9d-d66f884e12d8",twitter_handle:"SGBarbour"},{name:"Timothy Kim",profile_picture:"https://pbs.twimg.com/profile_images/1569681307029934081/2s_nWYo__400x400.jpg",ref_id:"e0323798-c70f-4cc3-96ff-87bab50c2313",twitter_handle:"realtimothykim"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/419512c2-e309-4b25-bfe2-cd481d53f66d.jpg",node_type:"episode",ref_id:"94e1df77-e561-4361-b8ad-e98862d6e51a",show_title:"BTC Sessions"},{children:["310c587e-f3a7-4fbe-aacb-e9b0e73726d1"],episode_title:"WHY ARE WE BULLISH? Jeff Booth, Alyse Killeen, Marty Bent, Vijay Boyapati ep187",guests:[{name:"Jeff Booth",profile_picture:"https://pbs.twimg.com/profile_images/1362957991410954241/spiaMAg2_400x400.jpg",ref_id:"f1143bcc-9ab9-4716-8259-0e5b026f8039",twitter_handle:"JeffBooth"},{name:"Alyse Killeen",profile_picture:"https://pbs.twimg.com/profile_images/1469812274223194115/nynN-53X_400x400.jpg",ref_id:"4612f685-03a9-4ff7-8dbd-153db478effc",twitter_handle:"AlyseKilleen"},{name:"Marty Bent",profile_picture:"https://pbs.twimg.com/profile_images/1362747135981199370/mSy97J12_400x400.jpg",ref_id:"655bdcb1-21c3-411c-aa24-fe7e4c7a248c",twitter_handle:"MartyBent"},{name:"Vijay Boyapati ",profile_picture:"https://pbs.twimg.com/profile_images/1383215714056605700/49XT3cEZ_400x400.jpg",ref_id:"0e976bc7-e7d6-4666-85f3-6b7c19be3b2f",twitter_handle:"real_vijay"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/419512c2-e309-4b25-bfe2-cd481d53f66d.jpg",node_type:"episode",ref_id:"10c6d370-de6e-4a37-9981-d2c27e69d9e0",show_title:"BTC Sessions"},{children:["c9a7d4e3-bdca-4b73-8209-0eefae9248cb","ea5f251b-6174-4663-b1c8-176375396b6e"],episode_title:"WHY ARE WE BULLISH Natalie Brunell Aaron Segal Lauren Sieckmann Dan Held ep191",guests:[{name:"Dan Held",profile_picture:"https://pbs.twimg.com/profile_images/1522608646043181060/QQRjVYhi_400x400.jpg",ref_id:"3e22facc-9310-4346-82ac-3e183b88fa51",twitter_handle:"Ledger"},{name:"Lauren Sieckmann",profile_picture:"",ref_id:"427bb439-f251-4c7e-89fb-b53ecd8c9a82",twitter_handle:""},{name:"Aaron Segal",profile_picture:"https://pbs.twimg.com/profile_images/884309028125294592/sLDGwzDO_400x400.jpg",ref_id:"f7483c61-ba76-4a19-8d8d-992966e1f79e",twitter_handle:"AaronSegalActor"},{name:"Natalie Brunell",profile_picture:"",ref_id:"a09e8874-abbe-4a85-b19d-08cac1c8afde",twitter_handle:""}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/419512c2-e309-4b25-bfe2-cd481d53f66d.jpg",node_type:"episode",ref_id:"a52e09df-91bc-4997-ad65-725ee971af2b",show_title:"BTC Sessions"},{children:["315fbf52-eab1-4f1b-b3c7-e4e418498664"],episode_title:"WHY ARE WE BULLISH Tomer Walton Obi Gigi ep194",guests:[{name:"Walton",profile_picture:"https://pbs.twimg.com/profile_images/1579938510538153994/EYbT5PEr_400x400.jpg",ref_id:"ec8c8747-a001-42ba-ae87-bfdef751b781",twitter_handle:"beeforbacon1"},{name:"Gigi",profile_picture:"https://pbs.twimg.com/profile_images/1566370176446119943/UeuACt-4_400x400.jpg",ref_id:"9d8917ab-730b-4b1a-8321-49fb00907644",twitter_handle:"dergigi"},{name:"Obi",profile_picture:"",ref_id:"f5ce3cb3-d943-483c-a619-c60936181c0a",twitter_handle:""},{name:"Tomer",profile_picture:"",ref_id:"9dfdecd6-c851-4766-ac32-4c1818ef5a9a",twitter_handle:""}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/419512c2-e309-4b25-bfe2-cd481d53f66d.jpg",node_type:"episode",ref_id:"95403824-42d5-4fe8-b50b-72e08ab368c8",show_title:"BTC Sessions"},{children:["1f486e9a-51aa-476a-8430-b149c88817f4","ba7bc3fe-38e0-47e1-b917-f9e4c005a972","b03519b0-5139-4ad4-910a-40f40e332352"],episode_title:"WHY ARE WE BULLISH Bitcoin Meme Hub Jan Capek Bitcoin Mechanic Max Hillebrand ep195",guests:[{name:"Max Hillebrand",profile_picture:"https://pbs.twimg.com/profile_images/1311357499514269696/-HQFwyFH_400x400.jpg",ref_id:"9a86cc59-ed01-4757-88f6-e9d9d63067b9",twitter_handle:"HillebrandMax"},{name:"Bitcoin Mechanic",profile_picture:"",ref_id:"faae3a37-0115-4074-af21-7d79c429c7cb",twitter_handle:""},{name:"Jan Capek",profile_picture:"",ref_id:"ec6f8b14-6c4b-42e9-8e86-9aa902c0906d",twitter_handle:""},{name:"Bitcoin Meme Hub",profile_picture:"",ref_id:"dcd5a590-2018-4707-a49b-8142d7b14e33",twitter_handle:""}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/419512c2-e309-4b25-bfe2-cd481d53f66d.jpg",node_type:"episode",ref_id:"2e6613fa-ef17-413b-9158-0e3be5d5ae51",show_title:"BTC Sessions"},{children:["c9fe9c3a-3c24-4803-817d-64d5fa2d58dc"],episode_title:"WHY ARE WE BULLISH Plebnet Takeover With JC KP VS and Walton ep196",guests:[{name:"VS and Walton",profile_picture:"",ref_id:"5277e03c-a4d5-4b4b-ac6b-4dfd8fc9b8ce",twitter_handle:""},{name:"KP",profile_picture:"",ref_id:"9b4f73fc-d67b-4734-90e3-34dde1b7c4cc",twitter_handle:""},{name:"JC",profile_picture:"",ref_id:"cbd12a77-50f2-4a20-a176-1083ce920f32",twitter_handle:""}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/419512c2-e309-4b25-bfe2-cd481d53f66d.jpg",node_type:"episode",ref_id:"c0895c34-042b-4f51-a884-2330d9f83bc7",show_title:"BTC Sessions"},{children:["6f3620f8-fd11-4b37-b8c1-7b8bd991420c","1ac39cf4-fc11-47e7-8972-113c674860b2"],episode_title:"WHY ARE WE BULLISH Denver Bitcoin CryptoMags Lord Fusitua Jim Crider ep203",guests:[{name:"Jim Crider",profile_picture:"",ref_id:"acb937b5-97e9-4881-a45e-0e9511382019",twitter_handle:""},{name:"Lord Fusitua",profile_picture:"https://pbs.twimg.com/profile_images/1511890587586560000/xGb_Dq_D_400x400.jpg",ref_id:"45559c92-d4f0-42a5-8dc4-a8cce65e95a1",twitter_handle:"LordFusitua"},{name:"CryptoMags",profile_picture:"",ref_id:"79cd9104-fa2c-4996-a179-8acb75642acd",twitter_handle:""},{name:"Denver Bitcoin",profile_picture:"",ref_id:"5ab53f2f-797f-4e1b-90d8-f2ca90e88af4",twitter_handle:""}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/638c47da-8592-4d7b-aa1a-20e28fa0499f.jpg",node_type:"episode",ref_id:"638c47da-8592-4d7b-aa1a-20e28fa0499f",show_title:"BTC Sessions"},{children:["54d58e3e-b828-4a9e-92c3-f761826c0319"],episode_title:"WHY ARE WE BULLISH Haley Berkoe Tip Jamie Stuckert Colin Aulds ep206",guests:[{name:"Jamie Stuckert",profile_picture:"https://pbs.twimg.com/profile_images/1481004564090433537/ZAj3C3Kv_400x400.jpg",ref_id:"ee047505-97c1-4086-a01c-3d18bd40b2d2",twitter_handle:"JamiaStuckert"},{name:"Colin Aulds",profile_picture:"https://pbs.twimg.com/profile_images/1151579149091262464/uNkb8aat_400x400.jpg",ref_id:"7b6066e2-2ef5-4e90-9d93-dedb1d289118",twitter_handle:"Colin_Aulds"},{name:"Tip",profile_picture:"https://pbs.twimg.com/profile_images/1598405188343468032/yL-obWRx_400x400.jpg",ref_id:"72362a7b-2a0a-44ae-beb4-bb0f36a485fc",twitter_handle:"tip_nz"},{name:"Haley Berkoe",profile_picture:"",ref_id:"b62ba399-282a-4628-811c-25e280541c99",twitter_handle:""}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/2e84c98a-d7d8-4341-a129-3f4eaebe1e3e.jpg",node_type:"episode",ref_id:"2e84c98a-d7d8-4341-a129-3f4eaebe1e3e",show_title:"BTC Sessions"},{children:["5b032ecb-09f5-4581-a1a8-cd0865de6076"],episode_title:"WHY ARE WE BULLISH Adam Curry Untapped Growth John Vallis Guy Swann ep211",guests:[{name:"Adam Curry",profile_picture:"https://pbs.twimg.com/profile_images/1401922551161442307/XjN2DdFD_400x400.jpg",ref_id:"c304fffc-7fe0-49a1-86b8-d3278f5c89dc",twitter_handle:"adamcurry"},{name:"John Vallis",profile_picture:"https://pbs.twimg.com/profile_images/1568743166035070976/4MyKww8A_400x400.jpg",ref_id:"c3a9fe29-3b78-4665-af54-e293e9d68962",twitter_handle:"johnkvallis"},{name:"Guy Swann",profile_picture:"https://pbs.twimg.com/profile_images/1401969630634196995/DqOuszMi_400x400.jpg",ref_id:"39c31930-d799-40a0-9a46-193117d03418",twitter_handle:"TheGuySwann"},{name:"Untapped Growth",profile_picture:"",ref_id:"79de7f8f-4f00-48c4-897a-57aa2a5fb7da",twitter_handle:""}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/6b8fbd46-fa4a-4d07-a142-9aeb242d249f.jpg",node_type:"episode",ref_id:"6b8fbd46-fa4a-4d07-a142-9aeb242d249f",show_title:"BTC Sessions"},{children:["29cdad6e-4b64-4e9e-bd36-5843b5783d9d","3242aa43-f999-485b-9c94-8457526d6dbd"],episode_title:"WHY ARE WE BULLISH JoeyTweets Mario Gibney Bobby Shell Len ep215",guests:[{name:"Bobby Shell",profile_picture:"https://pbs.twimg.com/profile_images/1090426395979890690/uUdaFXo__400x400.jpg",ref_id:"438f8067-3fed-49d2-91d9-5018cb043aac",twitter_handle:"BobbyShell2"},{name:"Len",profile_picture:"",ref_id:"1fc627d9-a446-4e48-b960-ad97fcdbcaa0",twitter_handle:""},{name:"Mario Gibney",profile_picture:"",ref_id:"1a3f05f5-5c4a-455f-b4ec-f682080a5518",twitter_handle:""},{name:"JoeyTweets",profile_picture:"",ref_id:"e6ada141-9c3c-4e1b-b8ab-2389c94f4130",twitter_handle:""}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/f3b67780-d9c2-4a20-ab5c-115032a05b3a.jpg",node_type:"episode",ref_id:"f3b67780-d9c2-4a20-ab5c-115032a05b3a",show_title:"BTC Sessions"},{children:["f15740f5-7c02-44d6-90c1-ff61fc00a120"],episode_title:"WHY ARE WE BULLISH Bitcoin Brendo Stacking Hats Josh Terry ep217",guests:[{name:"Josh Terry",profile_picture:"",ref_id:"1e5ab8da-a3a5-41aa-af6c-e056e9995baf",twitter_handle:""},{name:"Stacking Hats",profile_picture:"",ref_id:"3247f8a5-954a-4d1b-aa04-df1956eb9bd3",twitter_handle:""},{name:"Bitcoin Brendo",profile_picture:"https://pbs.twimg.com/profile_images/1362868540756254723/-vueErUH_400x400.jpg",ref_id:"a10413d8-38f5-42fd-a7a9-de79d90f26ec",twitter_handle:"BitcoinBrendo"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/1bf7b1ea-f717-4c0f-ae66-0e00b26603df.jpg",node_type:"episode",ref_id:"1bf7b1ea-f717-4c0f-ae66-0e00b26603df",show_title:"BTC Sessions"},{children:["97fe1ee4-8b91-403e-8a64-d8f839be5b52"],episode_title:"WHY ARE WE BULLISH Max Keiser Meditation Man Stephan Livera ep221",guests:[{name:"Max Keiser",profile_picture:"https://pbs.twimg.com/profile_images/1361873587582472195/y57DiTYX_400x400.jpg",ref_id:"743efd07-d194-4c74-8663-45c3b8646b8e",twitter_handle:"Maxkeiser"},{name:"Stephan Livera",profile_picture:"https://pbs.twimg.com/profile_images/1362551718110580740/v-W5Q2uo_400x400.jpg",ref_id:"72f57157-c96e-4466-8bf1-290cfe1f8a0b",twitter_handle:"stephanlivera"},{name:"Meditation Man",profile_picture:"",ref_id:"6cf1c2b8-8a28-4840-9132-3c2631d6ea58",twitter_handle:""}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/7070839d-051e-48e4-bd9a-95c09b310db2.jpg",node_type:"episode",ref_id:"7070839d-051e-48e4-bd9a-95c09b310db2",show_title:"BTC Sessions"},{children:["a03e4374-8b17-4875-93ff-3410295eaae1","46c0e9e5-6d49-4830-b405-6021fd365979"],episode_title:"WHY ARE WE BULLISH Michael Schmidt Jeff Ross Joseph Brown Greg Foss ep224",guests:[{name:"Greg Foss",profile_picture:"https://pbs.twimg.com/profile_images/1552599670945464320/3OgqRHNo_400x400.jpg",ref_id:"853d9f80-f6cf-490f-9d1e-f29cdc6acc6f",twitter_handle:"FossGregfoss"},{name:"Jeff Ross",profile_picture:"https://pbs.twimg.com/profile_images/1475554600094552064/DSlPG1lx_400x400.jpg",ref_id:"ae6ee2a2-1cf7-41a0-8366-ff6e94a6403c",twitter_handle:"VailshireCap"},{name:"Joseph Brown",profile_picture:"",ref_id:"803206b6-7b9f-48e0-a5d5-7348f6842cca",twitter_handle:""},{name:"Michael Schmidt",profile_picture:"",ref_id:"e94a106d-cbea-4b30-b0cb-3825979179ca",twitter_handle:""}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/728d91e9-025d-43a7-8467-2c8d264ddf59.jpg",node_type:"episode",ref_id:"728d91e9-025d-43a7-8467-2c8d264ddf59",show_title:"BTC Sessions"},{children:["193f741e-2e1e-472f-a152-4514cb6d6372","325d3cbf-9cf8-49bf-aa7b-8c8bc8e113ff","450d6337-33ea-43a4-97f0-928b9d4174eb","d9b2af2b-2bf8-477f-9cde-dd27660ddde7"],episode_title:"WHY ARE WE BULLISH Tone Vays Jaime Garcia Trent Dudenhoeffer KC Hodl ep225",guests:[{name:"Tone Vays",profile_picture:"https://pbs.twimg.com/profile_images/1416821178266787844/T1OkI9ZW_400x400.jpg",ref_id:"da6fc991-7080-461c-86e3-4ac18c2f413d",twitter_handle:"tonevays"},{name:"KC Hodl",profile_picture:"https://pbs.twimg.com/profile_images/1506986051683950592/MMMse9gr_400x400.jpg",ref_id:"b2264dd3-e587-403e-9447-9e99afc1910d",twitter_handle:"kc_hodl"},{name:"Trent Dudenhoeffer",profile_picture:"",ref_id:"3b466176-3bbc-481d-9634-e127a9232404",twitter_handle:""},{name:"Jaime Garcia",profile_picture:"https://pbs.twimg.com/profile_images/953009048642715648/PKaQy5UD_400x400.jpg",ref_id:"f259c6b5-71d6-4c5c-897c-3cfbe80cccc2",twitter_handle:"jaimegarciag"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/c8ae0def-c33c-4d17-af4e-31ddaeedaf8a.jpg",node_type:"episode",ref_id:"c8ae0def-c33c-4d17-af4e-31ddaeedaf8a",show_title:"BTC Sessions"},{children:["c2dff822-95ca-45fd-bf30-61ed21ecc3b1","ef84d742-b332-4b77-8242-948a3737f91f","5bf12d7b-3c9b-4019-bca9-88899aaa4b35"],episode_title:"WHY ARE WE BULLISH Duczko Thomas Jestopher Morgen Rochard Rick Vanderhulst ep229",guests:[{name:"Rick Vanderhulst",profile_picture:"",ref_id:"4c184180-b77d-4e25-ac7c-4d2e86cdde85",twitter_handle:""},{name:"Morgen Rochard",profile_picture:"https://pbs.twimg.com/profile_images/1362921386256211972/IpIK8cwI_400x400.jpg",ref_id:"c29b26e9-82c8-4c0a-8130-aa083d33ec48",twitter_handle:"MorgenRochard"},{name:"Thomas Jestopher",profile_picture:"https://pbs.twimg.com/profile_images/1607521016368201730/6GSHGkGX_400x400.jpg",ref_id:"50388de7-3ec7-401b-8349-5ee1d8a004c0",twitter_handle:"Jestopher_BTC"},{name:"Duczko",profile_picture:"",ref_id:"2b6de75e-0cf5-4fec-b458-d1b8ee3f86df",twitter_handle:""}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/b87feb17-6926-4295-b2c2-d1c2e9d49ca8.jpg",node_type:"episode",ref_id:"b87feb17-6926-4295-b2c2-d1c2e9d49ca8",show_title:"BTC Sessions"},{children:["80462fda-0ec7-4677-bd1b-cd7741154f39"],episode_title:"WHY ARE WE BULLISH Mario Gibney Mauricio Di Bartolomeo Josias Carbon Bang Bitcoin",guests:[{name:"Bang Bitcoin ",profile_picture:"",ref_id:"ac7edd0f-886d-449a-ba1a-06033ad12695",twitter_handle:""},{name:"Josias Carbon",profile_picture:"",ref_id:"f3c2c48b-c174-43cc-acfc-2151634b7c77",twitter_handle:""},{name:"Mauricio Di Bartolomeo",profile_picture:"",ref_id:"10c70dfd-93fb-4e95-99d4-2bebf561e737",twitter_handle:""},{name:"Mario Gibney",profile_picture:"",ref_id:"1a3f05f5-5c4a-455f-b4ec-f682080a5518",twitter_handle:""}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/f29a41a4-6764-439e-9fcf-74fefaffc681.jpg",node_type:"episode",ref_id:"f29a41a4-6764-439e-9fcf-74fefaffc681",show_title:"BTC Sessions"},{children:["5992b639-b05a-4e6d-bd94-4c1b6907bda3"],episode_title:"WHY ARE WE BULLISH Lisa Hough JC Crown Brandon Quittem ep274",guests:[{name:"Brandon Quittem",profile_picture:"https://pbs.twimg.com/profile_images/1502403738861940736/9J5VuTye_400x400.jpg",ref_id:"65512044-7810-4ece-8156-5519e072cb66",twitter_handle:"Bquittem"},{name:"JC Crown",profile_picture:"",ref_id:"79ae57b7-59d1-416a-961e-9e584ced2dfa",twitter_handle:""},{name:"Lisa Hough",profile_picture:"",ref_id:"a65a3362-03a6-4a6d-a901-3067f8b5dc81",twitter_handle:""}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/419512c2-e309-4b25-bfe2-cd481d53f66d.jpg",node_type:"episode",ref_id:"065c0900-4e3c-48a0-87b8-4068dc441c82",show_title:"BTC Sessions"},{children:["4167618b-6ac6-403f-adcc-09716938e08e"],episode_title:"WHY ARE WE BULLISH SeedSigner MMA Fighter Kenny Florian Bitrefill CEO Sergej Kotliar ep259",guests:[{name:"Bitrefill CEO Sergej Kotliar",profile_picture:"",ref_id:"62f3aab5-0adf-4268-85f4-58cd53d85e6b",twitter_handle:""},{name:"MMA Fighter Kenny Florian",profile_picture:"",ref_id:"f272bf4f-6d43-461e-b053-7f680568db5d",twitter_handle:""},{name:"SeedSigner",profile_picture:"https://pbs.twimg.com/profile_images/1571221494927134721/FieppCOA_400x400.jpg",ref_id:"31ac465a-d2db-4255-b52d-50a10937f80d",twitter_handle:"Seedsigner"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/87cd8227-9464-45ed-8512-4e545d3812c2.jpg",node_type:"episode",ref_id:"87cd8227-9464-45ed-8512-4e545d3812c2",show_title:"BTC Sessions"},{children:["8b91e81a-82c0-4174-b2f5-f0f665c94fa9"],episode_title:"WHY ARE WE BULLISH Evan Kaloudis Q Bob Burnett ep256",guests:[{name:"Q",profile_picture:"https://pbs.twimg.com/profile_images/1560683048680665088/4MrHM_UY_400x400.jpg",ref_id:"b0f3fa4c-eb2a-4888-be23-6bb0a529fc26",twitter_handle:"q_liketheletter"},{name:"Bob Burnett",profile_picture:"",ref_id:"cb1f53fa-5573-428d-b220-3e0c56f07588",twitter_handle:""},{name:"Evan Kaloudis",profile_picture:"https://pbs.twimg.com/profile_images/1596923848997445633/DqxrGpkW_400x400.jpg",ref_id:"420172fa-9431-4ba4-965c-adab17648d1b",twitter_handle:"evankaloudis"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/2f714adf-e499-4c1f-9864-016a00737153.jpg",node_type:"episode",ref_id:"2f714adf-e499-4c1f-9864-016a00737153",show_title:"BTC Sessions"},{children:["f5449a66-a156-4b0a-abeb-6ff5e28434ac","345a7d30-5d4b-483c-8d3d-fd1999f7e34c"],episode_title:"WHY ARE WE BULLISH Kal Kassa Pierre Corbin Chris Smith Ben Gagnon ep243",guests:[{name:"Chris Smith",profile_picture:"https://pbs.twimg.com/profile_images/1248417464825724928/BjsozM7k_400x400.jpg",ref_id:"488a0f68-f24b-4d0b-9835-4b38a59f149e",twitter_handle:"chrissmithonair"},{name:"Ben Gagnon",profile_picture:"",ref_id:"d86128cb-056a-4233-bd95-cda98867f61c",twitter_handle:""},{name:"Pierre Corbin",profile_picture:"",ref_id:"a0a46e2e-1b24-4ce5-b34c-ca322067930a",twitter_handle:""},{name:"Kal Kassa",profile_picture:"https://pbs.twimg.com/profile_images/1515885093893681156/cpZcX_2q_400x400.jpg",ref_id:"5cf2cf3e-5cde-4426-b71f-f357195d40be",twitter_handle:"KalKassa"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/bbf0a536-990b-49b4-a9c3-a2a40fa38f88.jpg",node_type:"episode",ref_id:"bbf0a536-990b-49b4-a9c3-a2a40fa38f88",show_title:"BTC Sessions"},{children:["ee97306e-085f-4232-b84f-05350bd383c4"],episode_title:"WHY ARE WE BULLISH Troy Cross GoodGuy Biker Jesse Berger ep241",guests:[{name:"Jesse Berger",profile_picture:"https://pbs.twimg.com/profile_images/1552386182868307971/5ApLS7LH_400x400.jpg",ref_id:"5b38df61-d11d-4958-8aaf-80b2bcbdd175",twitter_handle:"jayberjay"},{name:"GoodGuy Biker",profile_picture:"",ref_id:"bca843d2-d773-4261-bac4-1402812c7131",twitter_handle:""},{name:"Troy Cross",profile_picture:"https://pbs.twimg.com/profile_images/1561364830774124544/cKmEpj_m_400x400.jpg",ref_id:"ea01fb42-72e2-417f-bb3e-a45d18feeed8",twitter_handle:"thetrocro"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/0ade0cc4-6303-4e28-8b00-6b3e659c1e3a.jpg",node_type:"episode",ref_id:"0ade0cc4-6303-4e28-8b00-6b3e659c1e3a",show_title:"BTC Sessions"},{children:["287d232d-d28d-400c-b4dd-c0026022fce4"],episode_title:"WHY ARE WE BULLISH Brian Harrington Jim Crider Nuclear Bitcoiner ep237",guests:[{name:"Nuclear Bitcoiner",profile_picture:"https://pbs.twimg.com/profile_images/1443185278525579278/_Yl1nao1_400x400.jpg",ref_id:"60f5891f-0864-4ed4-987a-81da4768b3ba",twitter_handle:"nuclearbitcoinr"},{name:"Jim Crider",profile_picture:"",ref_id:"acb937b5-97e9-4881-a45e-0e9511382019",twitter_handle:""},{name:"Brian Harrington",profile_picture:"",ref_id:"82840fe2-b87e-433c-8f54-e4d1aa4f3dbf",twitter_handle:""}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/9523aa00-daf4-42af-b25b-75d9682bc5a6.jpg",node_type:"episode",ref_id:"9523aa00-daf4-42af-b25b-75d9682bc5a6",show_title:"BTC Sessions"},{children:["50cf9922-5d13-4a4b-8621-e934b422aebf"],episode_title:"#1104 Dr. Philip Ovadia - Heart Surgeon Explains What To Eat To Save Your Life",guests:[],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/7934bd86-9344-4f1a-9c36-ea5f63ae418e.jpg",node_type:"episode",ref_id:"919ca76f-b3c7-48f1-9f5f-872537d43632",show_title:"The Pomp Podcast"},{children:["746c6d41-2f19-4b40-bca5-215942de62cc"],episode_title:"S12 E6: Talking Politics with Ben de Waal, Alexandra Moxin & Karo Zagorus",guests:[{name:"Ben de Waal",profile_picture:"https://pbs.twimg.com/profile_images/1590206971818512384/18qb3LEl_400x400.jpg",ref_id:"d8679601-a65f-41ea-9b55-c1a7791b39c3",twitter_handle:"Ben_deWaal"},{name:"Karo Zagorus",profile_picture:"https://pbs.twimg.com/profile_images/1601691364260978689/i38u9RRt_400x400.jpg",ref_id:"358c2fe3-3615-4c90-bb6a-d4176b893b5e",twitter_handle:"btcdragonlord"},{name:"Alexandra Moxin",profile_picture:"https://pbs.twimg.com/profile_images/1566131791916040192/8Nqn-lqU_400x400.jpg",ref_id:"be708104-b97c-4ef1-bbfd-054260b868d3",twitter_handle:"Alexandra933"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/5fc9c8b0-687f-487e-bde3-bea15e155e3e.jpg",node_type:"episode",ref_id:"ded2e35d-9fec-4bad-90f7-f3102d4eebd5",show_title:"Bitcoin Takeover Podcast"},{children:["181df76a-5789-48c8-8153-57f0be3ec7f8","b1b5acae-0bc8-4117-8d1b-b61e79bea99f","6565a1d2-53e0-48a8-bd22-9ea1080c4364","533a527d-5146-4c10-8091-329cbc8bf06a","01dc5a33-88e1-49ef-abb3-c5744cf8a046"],episode_title:"Bitcoin Fixes This 48 Small Business with Ali",guests:[{name:"Ali",profile_picture:"",ref_id:"1169edf2-a89f-4d89-94a4-1be1a7b9aef0",twitter_handle:""}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/2536a974-d668-4ac2-8613-0b37aa0ca08c.jpg",node_type:"episode",ref_id:"2536a974-d668-4ac2-8613-0b37aa0ca08c",show_title:"Bitcoin Fixes This"},{children:["77ce133d-2bdb-490c-9638-88cc560062dc"],episode_title:"Freedom Money w/ Jeanine, Abubakar, Mills and Matt Odell",guests:[{name:" Jeanine",profile_picture:"https://pbs.twimg.com/profile_images/850023968484368386/jBcIv7W1_400x400.jpg",ref_id:"dd36be1a-acf4-4bcf-a085-d713f49c4494",twitter_handle:"JudgeJeanine"},{name:"Abubakar Nur Khalil",profile_picture:"https://pbs.twimg.com/profile_images/1570024329512992768/D42LDEjI_400x400.jpg",ref_id:"ee2cd308-168e-4ffc-9332-2957981b5acc",twitter_handle:"ihate1999"},{name:"Matt Odell",profile_picture:"https://pbs.twimg.com/profile_images/1421584695746338819/Z_7ZfAeP_400x400.jpg",ref_id:"4f2825ff-3b88-4595-84d4-36e81544b79a",twitter_handle:"ODELL"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/1583c7c4-f4f2-4e52-8f27-a1eaeb6289fd.jpg",node_type:"episode",ref_id:"43dd10a8-c5d5-4643-9432-93868289f163",show_title:"Bitcoin Magazine Podcast"},{children:["9c870970-e48f-49e1-8781-3c25f4fd58c6"],episode_title:"$80 Trillion in Shadow Banking - FedWatch 122",guests:[],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/1583c7c4-f4f2-4e52-8f27-a1eaeb6289fd.jpg",node_type:"episode",ref_id:"6e8b01d5-df4f-4124-a13a-3ee9c93c8eb2",show_title:"Bitcoin Magazine Podcast"},{children:["8b94fbcf-e349-4b2f-8425-66287345b9ae"],episode_title:"FTX Is Worse Than Enron w/ Lawrence Lepard, Caitlin Long, Dylan LeClair, and Dr. Jeff Ross",guests:[{name:" Jeff Ross",profile_picture:"https://pbs.twimg.com/profile_images/1307109108127019008/rPNj47yJ_400x400.jpg",ref_id:"4f4f53c7-5a3a-46df-b334-9951fe38dc96",twitter_handle:"realjeffreyross"},{name:" Dylan LeClair",profile_picture:"https://pbs.twimg.com/profile_images/1599858581611941922/XxvPPWAt_400x400.jpg",ref_id:"c1d20e9f-7362-47be-a3a0-5b9c004cd58e",twitter_handle:"DylanLeClair_"},{name:"Sam Rule",profile_picture:"https://pbs.twimg.com/profile_images/1522271013026729987/RQZOdzjq_400x400.jpg",ref_id:"09214ea0-d8ff-47cb-84fe-08e8517768e5",twitter_handle:"samjrule"},{name:" Caitlin Long",profile_picture:"https://pbs.twimg.com/profile_images/1362592672150528003/iYZ84uXB_400x400.jpg",ref_id:"c0244641-6347-4b82-b2a9-0ee38b600c08",twitter_handle:"CaitlinLong_"},{name:" Lawrence Lepard",profile_picture:"https://pbs.twimg.com/profile_images/1114275000889032704/mOUsG1XC_400x400.png",ref_id:"bafa8935-8957-4a9f-aaaa-e45fb46615d4",twitter_handle:"LawrenceLepard"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/1583c7c4-f4f2-4e52-8f27-a1eaeb6289fd.jpg",node_type:"episode",ref_id:"3475140b-3e58-494f-b929-59e6ec5f1636",show_title:"Bitcoin Magazine Podcast"},{children:["e7094410-4a3e-43ce-8454-3eee9565878e"],episode_title:"CD89: Open Source Week Party Rip at Bitcoin Park with NVK, Vivek, Paul, Tony, and the Bens",guests:[{name:"NVK",profile_picture:"https://pbs.twimg.com/profile_images/608402052247658497/ENDv0BNd_400x400.png",ref_id:"d754e29b-2d3e-4280-8d72-f41d2a465a78",twitter_handle:"Coinkite"},{name:"Vivek",profile_picture:"https://pbs.twimg.com/profile_images/1386020558069026816/GvPjQySx_400x400.jpg",ref_id:"742d5011-6af1-4004-b4e8-57959614b4b5",twitter_handle:"citadeldispatch"},{name:"the Bens",profile_picture:"https://pbs.twimg.com/profile_images/1386020558069026816/GvPjQySx_400x400.jpg",ref_id:"55580f1d-310f-47c4-9a07-2c0a4ec19ca7",twitter_handle:"citadeldispatch"},{name:"Paul",profile_picture:"https://pbs.twimg.com/profile_images/1386020558069026816/GvPjQySx_400x400.jpg",ref_id:"b150b9d0-c3c3-435d-b457-a86c335c2586",twitter_handle:"citadeldispatch"},{name:"Tony",profile_picture:"https://pbs.twimg.com/profile_images/1386020558069026816/GvPjQySx_400x400.jpg",ref_id:"8293895d-c43c-4777-a282-d873de069fd1",twitter_handle:"citadeldispatch"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/a09a2c49-84f1-4d0b-b150-6e6103f4ee41.jpg",node_type:"episode",ref_id:"68309686-0bf0-4156-8f95-615ba255fdc4",show_title:"Citadel Dispatch"},{children:["5458df9b-3a25-4e1e-b7a0-e14daaa8d66d"],episode_title:"CD87: Bitcoin Dev Kit with Steve, Daniela, Alekos, and ThunderBiscuit",guests:[{name:"ThunderBiscuit",profile_picture:"https://pbs.twimg.com/profile_images/1004180692794839040/qvYqY796_400x400.jpg",ref_id:"2932056a-dad7-4618-9c8d-d275b9f150d5",twitter_handle:"thunderB__"},{name:"Steve",profile_picture:"",ref_id:"8602c01d-a34f-426d-b143-581f25d3d3c8",twitter_handle:""},{name:"Daniela",profile_picture:"",ref_id:"7d011916-5300-4d32-a08b-fe4731bff5f2",twitter_handle:""},{name:"Alekos",profile_picture:"",ref_id:"9b7499d2-4c12-48c9-b8ed-614d09f0fdf2",twitter_handle:""}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/a09a2c49-84f1-4d0b-b150-6e6103f4ee41.jpg",node_type:"episode",ref_id:"52f31c46-14c5-49f1-9836-70862c6f6567",show_title:"Citadel Dispatch"},{children:["e2f9e9e3-946f-44e8-a323-f43a599a3e2c"],episode_title:"CD79: lightning development, bugs, and the path forward",guests:[{name:"Ben Carman",profile_picture:"https://pbs.twimg.com/profile_images/1550704386007089152/pLwUSeff_400x400.jpg",ref_id:"1d1e95ba-b4af-415f-aafe-85c6dd7571b8",twitter_handle:"benthecarman"},{name:"Evan Kaloudis",profile_picture:"https://pbs.twimg.com/profile_images/1596923848997445633/DqxrGpkW_400x400.jpg",ref_id:"420172fa-9431-4ba4-965c-adab17648d1b",twitter_handle:"evankaloudis"},{name:"Brqgoo",profile_picture:"https://pbs.twimg.com/profile_images/1597268344029298691/-m6_LYWF_400x400.jpg",ref_id:"6a5e65a9-a1a6-4e73-8e54-53f168c080b6",twitter_handle:"brqgoo"},{name:"Seard Salmon",profile_picture:"https://pbs.twimg.com/profile_images/1562116931980779521/bsHY79h-_400x400.jpg",ref_id:"10074712-9e7d-44ee-9451-9df214834ec6",twitter_handle:"Seardsalmon"},{name:"Tony g",profile_picture:"https://pbs.twimg.com/profile_images/1523582744609136642/02NBRq6H_400x400.jpg",ref_id:"79cc45bb-d9c7-41da-8776-88b2a9f45bf7",twitter_handle:"TonyGuoga"},{name:"Bluematt",profile_picture:"https://pbs.twimg.com/profile_images/697361498587451394/_rX0-O0W_400x400.png",ref_id:"2c96fe6b-ec49-4a1d-824d-9b5d6a94a844",twitter_handle:"thebluematt"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/a09a2c49-84f1-4d0b-b150-6e6103f4ee41.jpg",node_type:"episode",ref_id:"665facde-c1bd-4091-a071-09e28606b863",show_title:"Citadel Dispatch"},{children:["5d13b0d2-3755-4363-9361-4b431f57b9c6","87aa1d63-e44d-43f4-8b02-dfbd1fab476a"],episode_title:"BR015 - Lightning Experts Roundtable ft. Calle, Roy, Rijndael & t-bast",guests:[{name:"Roy",profile_picture:"https://pbs.twimg.com/profile_images/1518195698323398656/v6d0knBt_400x400.jpg",ref_id:"528205f8-c65b-4b81-8e90-64a89737acd3",twitter_handle:"RoyNemer"},{name:"Calle",profile_picture:"https://pbs.twimg.com/profile_images/1514769710432219142/CIKDCEbq_400x400.jpg",ref_id:"c467552d-e3ae-4c55-a695-8369a63960bb",twitter_handle:"danielaacallee"},{name:"Rijndael",profile_picture:"https://pbs.twimg.com/profile_images/1542705395873058817/0zsy4Yur_400x400.jpg",ref_id:"861d5324-8ede-4059-826f-f29abca5d7e6",twitter_handle:"rot13maxi"},{name:"t-bast",profile_picture:"https://pbs.twimg.com/profile_images/1103941624843788289/Pg2rEZph_400x400.jpg",ref_id:"d3eacec2-0bdc-49cd-8bef-e99fa2776d3b",twitter_handle:"realtbast"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/cd6b8d64-bd52-4f1e-86b3-ca8ba2eb169f.jpg",node_type:"episode",ref_id:"274ecab4-c5d8-4ad7-9e16-b1cb5dd39d13",show_title:"Bitcoin.Review"},{children:["6f2b1717-7294-4cd3-967b-ee0930060b1c"],episode_title:"BR014 - On-chain Economics Experts Roundtable ft. Checkmate, Permabull & TXMC",guests:[{name:"Checkmate",profile_picture:"https://pbs.twimg.com/profile_images/1572347785072226304/1RsAUOvi_400x400.png",ref_id:"78b4085f-732c-4c40-8d8d-dbb8b64d641c",twitter_handle:"_Checkmatey_"},{name:"TXMC",profile_picture:"https://pbs.twimg.com/profile_images/1596714909307387910/Od-gB-bC_400x400.jpg",ref_id:"c458508a-f223-46a1-9eef-961f60c9c100",twitter_handle:"TXMCtrades"},{name:"Permabull",profile_picture:"https://pbs.twimg.com/profile_images/1009795179102994434/SfG90ffx_400x400.jpg",ref_id:"7aea8ebb-29e2-4ce0-b6b7-9b8364e10c58",twitter_handle:"PermabullNino"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/cd6b8d64-bd52-4f1e-86b3-ca8ba2eb169f.jpg",node_type:"episode",ref_id:"933d3953-2983-4a8b-a4dc-e9615eeecb88",show_title:"Bitcoin.Review"},{children:["3e106ab0-ad0d-4aa4-8ea1-0bbeb122ae78","18d862c2-f8bc-41c8-bea3-9b934701f0a8","f779d2b8-6e89-4ddd-ae99-6d1223615400"],episode_title:"BR005 - Bitcoin Wallet Experts Roundtable ft. Odell, Bitstein & Pierre Rochard",guests:[{name:"Charles Guillemet",profile_picture:"https://pbs.twimg.com/profile_images/1363770113162379265/7S1mRttg_400x400.jpg",ref_id:"c726ddde-836d-4f6c-9b6e-bb9e4d9365a7",twitter_handle:"P3b7_"},{name:"Matt Odell",profile_picture:"https://pbs.twimg.com/profile_images/1421584695746338819/Z_7ZfAeP_400x400.jpg",ref_id:"4f2825ff-3b88-4595-84d4-36e81544b79a",twitter_handle:"ODELL"},{name:"Graig Raw",profile_picture:"https://pbs.twimg.com/profile_images/1362841242665631745/UtA3FBQU_400x400.jpg",ref_id:"66fade84-61db-4cb1-b4a9-b759e285eb82",twitter_handle:"craigraw"},{name:"Lazy Ninja",profile_picture:"https://pbs.twimg.com/profile_images/1362843002318721028/PNKWuu0-_400x400.jpg",ref_id:"f855515d-75c4-4287-9a3d-e45d7ac25ddf",twitter_handle:"FreedomIsntSafe"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/cd6b8d64-bd52-4f1e-86b3-ca8ba2eb169f.jpg",node_type:"episode",ref_id:"8a89a96d-5877-4d00-9e11-c33d19ed7264",show_title:"Bitcoin.Review"},{children:["67e86e10-e641-4eb7-a81f-0b7b2d204f4b","6f6860cf-08b2-4c3c-96e8-dc9ef8474b37"],episode_title:"BR006 - BestBuy stocks HW, Podcasting 2.0, COLDCARD, ETH Merge, ATEC608A, Mullvad VPN hardware & MORE ft. Odell, Bitsten & Pierre Rochard",guests:[{name:"Pierre Rochard",profile_picture:"https://pbs.twimg.com/profile_images/1567258180861792256/EEEBkvQR_400x400.jpg",ref_id:"426b30ba-7c24-4558-b926-ec307756a876",twitter_handle:"BitcoinPierre"},{name:"Matt Odell",profile_picture:"https://pbs.twimg.com/profile_images/1421584695746338819/Z_7ZfAeP_400x400.jpg",ref_id:"4f2825ff-3b88-4595-84d4-36e81544b79a",twitter_handle:"ODELL"},{name:"Micheal Goldstein",profile_picture:"https://pbs.twimg.com/profile_images/1362578436665995266/yssI-4C__400x400.jpg",ref_id:"1d5697ef-ac55-4685-9ee1-80d8d7c6c501",twitter_handle:"bitstein"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/cd6b8d64-bd52-4f1e-86b3-ca8ba2eb169f.jpg",node_type:"episode",ref_id:"249e2426-55d6-473c-bbe0-4bebf74594e9",show_title:"Bitcoin.Review"},{children:["5d6441cb-9fb5-465e-b297-0a66ccc5823f","eba87a50-4628-4106-94ae-5aee0e5f3584"],episode_title:"BR011 - Podcasting 2.0 & Value-4-Value Experts Roundtable ft. Adam Curry, Oscar Merry, Gigi & Odell",guests:[{name:"Oscar Merry",profile_picture:"https://pbs.twimg.com/profile_images/1385168885071089664/3VHhMawv_400x400.jpg",ref_id:"485b9165-ae61-4698-8244-16ae10f4ccbc",twitter_handle:"MerryOscar"},{name:"Gigi",profile_picture:"https://pbs.twimg.com/profile_images/1566370176446119943/UeuACt-4_400x400.jpg",ref_id:"9d8917ab-730b-4b1a-8321-49fb00907644",twitter_handle:"dergigi"},{name:"Matt Odell",profile_picture:"https://pbs.twimg.com/profile_images/1421584695746338819/Z_7ZfAeP_400x400.jpg",ref_id:"4f2825ff-3b88-4595-84d4-36e81544b79a",twitter_handle:"ODELL"},{name:"Adam Curry",profile_picture:"https://pbs.twimg.com/profile_images/1401922551161442307/XjN2DdFD_400x400.jpg",ref_id:"c304fffc-7fe0-49a1-86b8-d3278f5c89dc",twitter_handle:"adamcurry"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/cd6b8d64-bd52-4f1e-86b3-ca8ba2eb169f.jpg",node_type:"episode",ref_id:"0f13f1e8-6031-4920-86bf-c2fbcaaed641",show_title:"Bitcoin.Review"},{children:["5216f100-c7ac-4b62-91d8-e394f5a0d531"],episode_title:"Orange Pill [OP7] - Bitcoin is Love",guests:[{name:" Abe Cambridge",profile_picture:"https://pbs.twimg.com/profile_images/1368910908282572802/MTMBCPZU_400x400.jpg",ref_id:"5eed11cc-94e5-4e17-b923-95183699f193",twitter_handle:"abecambridge"},{name:"Mitch Feierstein",profile_picture:"https://pbs.twimg.com/profile_images/2625988157/vky9cedsgb0mf3usbh3x_400x400.jpeg",ref_id:"f9a70e2b-f905-4c70-afcf-3ef7004b7cab",twitter_handle:"PlanetPonzi"},{name:" Alakanani Itireleng",profile_picture:"https://pbs.twimg.com/profile_images/1512849723283185673/MzgEELWq_400x400.jpg",ref_id:"bda1bc91-3acc-4dc7-82eb-03c70f63525f",twitter_handle:"bitcoinlady"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/afa24463-19f7-4875-b6f4-b261d1d6c648.jpg",node_type:"episode",ref_id:"993787ca-ce29-4d5b-b834-37a83ea2125a",show_title:"Orange Pill Podcast"},{children:["7434dc95-111e-4fa4-81bd-6019a1249950"],episode_title:"Episode 6: International Payments with Stablecoins",guests:[{name:"Fabricio Tota",profile_picture:"https://pbs.twimg.com/profile_images/1593923295660986368/PetsVmSs_400x400.jpg",ref_id:"d2b39da6-93a0-4511-98b3-3a57c9cf6491",twitter_handle:"ftota"},{name:"Sebastian Serrano",profile_picture:"https://pbs.twimg.com/profile_images/1586767206628605954/sAcHMD2y_400x400.jpg",ref_id:"22b37ca6-24f3-4f1e-ac19-b5c6f150499f",twitter_handle:"sserrano44"},{name:" Darius Sit",profile_picture:"https://pbs.twimg.com/profile_images/1407598510350819328/EGiy4zAh_400x400.jpg",ref_id:"cc4c1681-7fdf-4404-96a5-7e7fbed467cd",twitter_handle:"dariussitzl"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/99d17d22-4448-4267-9065-f55b341f43d2.jpg",node_type:"episode",ref_id:"72c4dd20-64fa-4d68-a0bd-ac50207ae1c0",show_title:"The Money Movement"},{children:["4b80af11-a773-43bb-8ada-b5771e2cf481"],episode_title:"Episode 5: The Future of Corporations in the Age of Blockchains",guests:[{name:"Jason Potts",profile_picture:"https://pbs.twimg.com/profile_images/1444448536947396612/MWoMpiut_400x400.jpg",ref_id:"83de5ad8-399d-4d5e-beb6-036bc73f2e60",twitter_handle:"profjasonpotts"},{name:"Aaron Wright",profile_picture:"https://pbs.twimg.com/profile_images/1467700275209195530/MuLAUZ7l_400x400.jpg",ref_id:"926d7ff6-0327-49a0-811e-3f2e2db2fc5c",twitter_handle:"awrigh01"},{name:"Luis Cuende",profile_picture:"https://pbs.twimg.com/profile_images/1590314672640630784/SniHt1kT_400x400.jpg",ref_id:"bf8c4b16-8bdb-4249-8e34-9c4458808890",twitter_handle:"licuende"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/99d17d22-4448-4267-9065-f55b341f43d2.jpg",node_type:"episode",ref_id:"cc447ce2-af39-4938-8ec8-2d70a6cfd851",show_title:"The Money Movement"},{children:["61f104e1-77d8-48c4-9def-92d74cbf0d64","d8d7f0d9-d40b-4431-8f02-f8bf15823175"],episode_title:"Is Sound Money the Answer? with George Gammon (WiM268)",guests:[{name:"George Gammon",profile_picture:"https://pbs.twimg.com/profile_images/1246550014450700291/2n_iHigp_400x400.jpg",ref_id:"7ca1bc4f-3a57-4a6a-bedf-ef47a8b37297",twitter_handle:"GeorgeGammon"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/ca3ab815-dc2e-408a-a0c5-8bbe50270a97.jpg",node_type:"episode",ref_id:"337981db-17c3-4c4e-8195-26cda6855ead",show_title:'The "What is Money?" Show'},{children:["e97927cd-526b-46ef-bde2-7e60339fd4a5","139f6af7-950d-44cd-a3fc-86cae3f86d65"],episode_title:"Borrowing - where is the money going? Corporate, Small Business, Government",guests:[],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/abd94520-1490-42aa-b349-9e861494a654.jpg",node_type:"episode",ref_id:"b43f377d-6599-421b-af45-a8ecee409420",show_title:"Economy Guy"},{children:["58c66464-fdd6-4f04-848b-f98021c4089c"],episode_title:"Government and Big Business | Peter G. Klein",guests:[],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/58189b3c-aa25-408d-8c5e-76f97c9501da.jpg",node_type:"episode",ref_id:"705db675-bc09-4cba-b578-e9904f339f55",show_title:"Mises University 2017"},{children:["5e1c63cb-adb2-4e52-a529-324dcb9d6632","9020a99f-62d8-462a-81aa-515e31bb5536"],episode_title:"Debating Professor Hanke on Bitcoin's value",guests:[{name:"Hong Fang",profile_picture:"https://pbs.twimg.com/profile_images/1554126711502999553/EkTARSpF_400x400.jpg",ref_id:"9adabc40-bbc7-44aa-8a11-c139f3697f80",twitter_handle:"hfangca"},{name:"Saifedean Ammous",profile_picture:"https://pbs.twimg.com/profile_images/1362635264158552067/CSsOKrBd_400x400.jpg",ref_id:"a61d4df9-1db4-4bdc-a7e9-a4c99268e59b",twitter_handle:"saifedean"},{name:"Professor Steve Hanke",profile_picture:"https://pbs.twimg.com/profile_images/915395033871867905/3zbE7bAT_400x400.jpg",ref_id:"4a754eea-7f67-46d0-b4d2-f0aa58aba36e",twitter_handle:"steve_hanke"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/5cdd0aef-f1a7-4d3b-8336-7f81c2db4a40.jpg",node_type:"episode",ref_id:"a12faf50-f4fb-472d-b3a1-030747594fa5",show_title:"The Bitcoin Standard Podcast"},{children:["a2b5f8c4-37aa-4931-951e-87416315eeab"],episode_title:"Classic 14: One Up on Wall Street",guests:[],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/4bb9069b-a373-4b1c-9cda-024b2bf4dc84.jpg",node_type:"episode",ref_id:"87054fe7-6a5c-471a-b518-5e9414d0c644",show_title:"We Study Billionaires - The Investor’s Podcast Network"},{children:["3bfbecac-2ad1-4983-9ed0-f1e48f1f0149"],episode_title:"#24 Decoding M2 (Non-M1): Money supply USA",guests:[],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/3325efce-80a8-490c-8645-cad1b9a22d94.jpg",node_type:"episode",ref_id:"04dd4023-ed42-4259-921c-e305af656389",show_title:"Crypto Voices"},{children:["f6e48088-be00-4596-8731-433c94a02ddb"],episode_title:"BUC Live: Lightning Hardware and Nodes Panel from The Lightning Conference Berlin",guests:[{name:"ketominer",profile_picture:"https://pbs.twimg.com/profile_images/1245972079528329218/YDUD9N2Q_400x400.jpg",ref_id:"2f8b0b59-6f23-4c89-973c-668cc7666998",twitter_handle:"ketominer"},{name:"Stacie Waleyco",profile_picture:"https://pbs.twimg.com/profile_images/1490885395390861317/MOzYmFOn_400x400.jpg",ref_id:"d4292662-08f9-4b16-a889-b61a401edcc2",twitter_handle:"satsie"},{name:"Christian Rotzoll",profile_picture:"https://pbs.twimg.com/profile_images/1593996559162773504/qKZTYL0I_400x400.jpg",ref_id:"8c13f2e9-d81a-4116-9ad7-d14a66d5f899",twitter_handle:"rtzll"},{name:"Sebastian Küng",profile_picture:"https://abs.twimg.com/sticky/default_profile_images/default_profile_400x400.png",ref_id:"04448652-5b1f-480c-a573-17c7de956e2c",twitter_handle:"sebastiankueng"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/357dc2db-2643-49f0-9393-5a20ed21d0fe.jpg",node_type:"episode",ref_id:"c6ecd519-ce8f-45b5-89ca-30a6a017f5d6",show_title:"The Anita Posch Show: A Bitcoin only podcast"},{children:["7b4a8ab4-5254-4195-8546-183e6a078a7a"],episode_title:"Quoth the Raven #237 - Jake Ducey",guests:[],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/710ac70a-11fc-40ec-a2a2-01b92fb8015e.jpg",node_type:"episode",ref_id:"b94dbd49-6ac1-497c-8f5b-d13140968920",show_title:"Quoth the Raven"},{children:["55e562c3-41d2-4bfb-94d5-26ac7098ba2f"],episode_title:"How to Address Regulations Suspended During the COVID-19 Crisis",guests:[],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/da1bbdc0-4d0a-43ed-8345-ee43102db244.jpg",node_type:"episode",ref_id:"406ce1e1-5f39-4c94-907c-eb5e501d2c64",show_title:"Mercatus Policy Download"},{children:["e2a347d3-a7ce-4200-836e-0c3df94980ce","d266ac59-706d-4b4c-b0ca-d9ea3ae4fc34","2485d5dc-6159-4638-aef1-e645f226a8a1"],episode_title:"Ep. 514 The Future of Crypto in the Media with Blockchain Boy",guests:[{name:"Lucas Dimos",profile_picture:"https://pbs.twimg.com/profile_images/1092408696838197250/n0-St2nZ_400x400.jpg",ref_id:"9ac17e2f-49bd-4fc5-bfe5-2f380ca63574",twitter_handle:"lucasdimos"},{name:"Blockchain Boy",profile_picture:"https://pbs.twimg.com/profile_images/1602154101642592256/A0OX97CT_400x400.jpg",ref_id:"4b070a6f-bcc8-4708-abaf-cc830709600f",twitter_handle:"BlockchainBoyy"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/93a6fe5b-364c-43f4-9f38-7da3e811460b.jpg",node_type:"episode",ref_id:"9585c916-c55a-4284-b348-f8a52c24dc8d",show_title:"CRYPTO 101"},{children:["22add7db-9562-44a4-a883-52f4d87d48f5","7fb2989d-f3f8-4e89-b1bb-66e08ed2f294"],episode_title:"Ep. 494 The Facts About Using Leverage when Trading Crypto",guests:[{name:"Antonio Juliano",profile_picture:"https://pbs.twimg.com/profile_images/1486890878694133761/85ev-DD6_400x400.jpg",ref_id:"025d2715-f5e7-4ba1-884c-45ba1e7770c5",twitter_handle:"antoniomjuliano"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/93a6fe5b-364c-43f4-9f38-7da3e811460b.jpg",node_type:"episode",ref_id:"1d938eb2-3bc2-4268-85d1-8967a1292a18",show_title:"CRYPTO 101"},{children:["8d9636c6-d564-47e0-89b6-5b9f87b27a34","56ded69f-9178-41fb-a466-b3f270175343","be782fc1-f095-4012-8711-f27a9cbb4e8b"],episode_title:"Breaking Away: On Secession and Small States",guests:[],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/6ec51741-3d93-4116-a619-d62a7cee1feb.jpg",node_type:"episode",ref_id:"50ab3e37-ccb3-4902-825b-a9da36579707",show_title:"Radio Rothbard"},{children:["6537e3ab-da86-41c5-acac-2e513ce23634","6e2a0132-8291-4ea4-b1a8-dc87c0adf527","3dacb7c8-34d2-4e73-8064-5d53c6857239","bda964fc-b276-490e-98b6-3009769f941e"],episode_title:"Andrew Frazier on Running Your Business",guests:[],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/f2b2a2b2-8869-4256-94b9-a91c91c1ce7e.jpg",node_type:"episode",ref_id:"8ec14282-c5bc-4da6-b516-3140efaf6b8f",show_title:"Economics For Business"},{children:["10cc2a43-918c-477f-a29c-de6fa5ddc79e"],episode_title:"Diana Jones: The New Management Model — Guarding Group Relationships",guests:[],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/f2b2a2b2-8869-4256-94b9-a91c91c1ce7e.jpg",node_type:"episode",ref_id:"2fee3ffd-e6f5-4fbf-9cac-2b8977b93b79",show_title:"Economics For Business"},{children:["cd0d29e6-af1f-4a94-8fc9-cc38a719807b"],episode_title:"13. Monopoly and Competition",guests:[],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/ef62c7ab-ef09-47b7-9af4-2ebe2384a72f.jpg",node_type:"episode",ref_id:"a77be405-8402-477a-9d72-b96d1e7ea63b",show_title:"Austrian Economics: An Introductory Course"},{children:["99fc3f47-1cb2-449e-bd46-97a597fce97a"],episode_title:"5. The Profit Motive",guests:[],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/ef62c7ab-ef09-47b7-9af4-2ebe2384a72f.jpg",node_type:"episode",ref_id:"32aad837-d99a-4b5a-b6ea-e12c590b925a",show_title:"Austrian Economics: An Introductory Course"},{children:["bdc4757d-1e87-4fa3-b293-6f375af8490f"],episode_title:"TheMacroView Episode #3: Financial Entanglement",guests:[],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/8e52e9c4-52e8-4dea-8ed9-8c6a7fcef25a.jpg",node_type:"episode",ref_id:"62e4eee0-25ba-495a-a7e6-dd0685a75d13",show_title:"The Macro View"},{children:["7eca97d5-7a23-4e41-8e04-cfffdef85f06","9ac59d0a-2e8d-430b-87e4-493026d9cbe3"],episode_title:"TheMacroView Episode 4: Access to Capital",guests:[],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/8e52e9c4-52e8-4dea-8ed9-8c6a7fcef25a.jpg",node_type:"episode",ref_id:"23ea78f2-8e21-42fe-980a-8c6ff04c2748",show_title:"The Macro View"},{children:["7ace464e-d855-496a-a80a-b6e7ccb0f12e"],episode_title:"TheMacroView Episode 32: Understanding Financial Markets Part 5 of 5",guests:[],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/8e52e9c4-52e8-4dea-8ed9-8c6a7fcef25a.jpg",node_type:"episode",ref_id:"b51b127d-9641-42a7-aac5-bd5b1228f52a",show_title:"The Macro View"},{children:["d67cf7af-79a8-457e-b65b-293fb279dcfe"],episode_title:" #14: Julia Reinhardt - What do GDPR and AI regulations mean for Silicon Valley?",guests:[],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/3ab6c599-bbcd-4c8f-beef-bcf509ed4afa.jpg",node_type:"episode",ref_id:"f18bb143-9582-41f3-b65b-1dbe8de6cfc3",show_title:"Voices of the Data Economy"},{children:["167a7be2-f14b-455a-9c20-95057af5ea7d"],episode_title:"Dr. Norm Robillard - SIBO, Digestion, and Gut Health on Carnivore/Keto",guests:[],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/5e0220b3-7c70-4423-bb76-3b75bc132fad.jpg",node_type:"episode",ref_id:"14dbb9b7-ec35-49e5-bbb9-1f2d626a5d6f",show_title:"Carnivore Cast"},{children:["51ef662a-201f-4c3c-b60d-bbc627c74e8e"],episode_title:"Life in Interesting Times - Part 1",guests:[{name:"Matt Murray",profile_picture:"https://pbs.twimg.com/profile_images/1273726156236140544/SJjI1WD7_400x400.jpg",ref_id:"72ce0a76-8593-4898-9369-f39b4bc3d2d3",twitter_handle:"MattMurray28"},{name:"Louise Reynolds",profile_picture:"https://pbs.twimg.com/profile_images/602592582754050048/RbAMd-Re_400x400.jpg",ref_id:"b4c2b12b-96a1-4d37-ae74-5be0883f3091",twitter_handle:"reynoldslouise"},{name:"Jon Slaughter",profile_picture:"https://pbs.twimg.com/profile_images/1336713360/samantha_test_090_400x400.jpg",ref_id:"a295820c-0098-433a-8cc3-cc13085b85c8",twitter_handle:"jonslaughtermd"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/a8e3517b-b44d-4270-adaa-57587896b1e7.jpg",node_type:"episode",ref_id:"c6996d2f-8541-4622-968f-4e4dee7f78e4",show_title:"Keto Life Support"},{children:["2bf2f8fe-9d2f-4d41-838d-787f2ca9734e"],episode_title:"Q&A: Kim & Dr Ken Berry",guests:[],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/a8e3517b-b44d-4270-adaa-57587896b1e7.jpg",node_type:"episode",ref_id:"41f7e1a4-f5b9-4a7e-8dbd-ee3fcb15260f",show_title:"Keto Life Support"},{children:["22824927-75e2-4592-9876-6f271258bf9c"],episode_title:"Bitcoin TA, Bitcoins Future, & Bitcoin Explained by Tone Vays @ Brisbane Bitcoin Meetup",guests:[{name:"Willy Woo",profile_picture:"https://pbs.twimg.com/profile_images/1600775715892432896/c1rFKYSz_400x400.jpg",ref_id:"b0d7c243-e94d-40d6-a844-f0da905c4356",twitter_handle:"woonomic"},{name:"Tyler Jenks",profile_picture:"https://abs.twimg.com/sticky/default_profile_images/default_profile_400x400.png",ref_id:"5b920cbf-7be2-4380-9c3c-87e99d8b7612",twitter_handle:"Tylerjenks"},{name:"Tai Zen",profile_picture:"https://pbs.twimg.com/profile_images/712935760085659648/0_mfEI59_400x400.jpg",ref_id:"f0e33df4-8524-460a-88a5-e4ebf6f5149e",twitter_handle:"Taizen"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/4ae5cf53-106f-4ba8-9a77-3ef1de3b44b6.jpg",node_type:"episode",ref_id:"4b228b78-99c7-4884-b91d-9dc711bde8e6",show_title:"Trading Bitcoin: The Tone Vays Podcast"},{children:["1806f209-3cd6-496a-baf3-0351b7f432aa"],episode_title:"Cryptocurrency Price Volatility and Bitcoin Store-of-value",guests:[],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/1c3fe064-f637-41ea-8a4b-a533ef5985b1.jpg",node_type:"episode",ref_id:"556a9506-357d-4dea-a6bb-75f391f7340d",show_title:"aantonop"},{children:["3dff5b59-31e0-4ce9-8add-c8a2ba564259","0bb19102-ebb2-4519-ac7a-e6e69593a091"],episode_title:"#Bitcoin Kenya 🇰🇪 - meet the Kenya Bitcoin community",guests:[{name:"Noelyne Sumba",profile_picture:"https://pbs.twimg.com/profile_images/1585949523901292545/tWf-IwWO_400x400.jpg",ref_id:"44455b1d-76cf-49df-baa0-cd606652885b",twitter_handle:"noelynesumba"},{name:"Okjodom",profile_picture:"https://pbs.twimg.com/profile_images/1577811376487088128/J2Z4nIgI_400x400.jpg",ref_id:"4c9df92d-3bb5-4d08-9a7e-a9ba15f58f03",twitter_handle:"okjodom"},{name:"Master Guantai",profile_picture:"https://pbs.twimg.com/profile_images/1521025685078302720/w9dZwehS_400x400.jpg",ref_id:"64c326c4-d4a9-4e6c-82fe-0c9bac8a7094",twitter_handle:"MasterGuantai"},{name:"Lorraine Marcel",profile_picture:"https://pbs.twimg.com/profile_images/2361719231/German_sheperd_Puppies_400x400.jpg",ref_id:"ab30679d-7931-4921-a4f8-6fee74e412c8",twitter_handle:"lorrainemarcel1"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/56bbafde-60ef-4e4b-b930-978429c6a635.jpg",node_type:"episode",ref_id:"1b47b05f-8f86-4e19-9694-d4255e9e89ac",show_title:"Global Bitcoin Fest"},{children:["1aec7881-31ab-4c1c-9f79-800cb8379ca1"],episode_title:"The Orange Sun 🌞 Does Price = Value? #Bitcoin",guests:[{name:"ToxiKat27",profile_picture:"https://pbs.twimg.com/profile_images/1505791887415730177/d0YDQ3Xc_400x400.jpg",ref_id:"50023cce-8a6f-4974-ad3b-fd7a9c0abf19",twitter_handle:"ToxiKat27"},{name:"AnuragSaikia",profile_picture:"https://pbs.twimg.com/profile_images/1016367353762852864/gDL5h8jh_400x400.jpg",ref_id:"0bb60736-56c5-4964-a9c3-e881b0b313b6",twitter_handle:"AnuragSaikia"},{name:"fnicencool",profile_picture:"https://pbs.twimg.com/profile_images/1600143435775856641/uqgmtT23_400x400.jpg",ref_id:"bfef6a55-2d08-407e-b147-e04d68af7dd6",twitter_handle:"fnicencool"},{name:"MrlamilamiKosch",profile_picture:"https://pbs.twimg.com/profile_images/1538403135101800450/sO-RPI9U_400x400.jpg",ref_id:"f8c8f97a-f79a-4950-8e3d-d2e94d27b3c8",twitter_handle:"MrlamilamiKosch"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/9b2e17f2-71c5-4f1e-a3e7-720d06dab810.jpg",node_type:"episode",ref_id:"a0826cdb-6198-4416-bd12-1dd5aa09a075",show_title:"Satoshi’s Journal"},{children:["bd8acc65-31a6-4d6c-93e2-cb91d3909825","51926635-4d2a-47d0-9e11-62c173898631","b8080ee6-90b2-4f75-8c69-79510c82aa08","9f2d3be4-e7df-4b86-981c-466bde0d92ad"],episode_title:'The Orange 🌞 Reading/Discussion "The Book of Satoshi" & Bitcoin News',guests:[{name:"CouncilmannJamm",profile_picture:"https://pbs.twimg.com/profile_images/1251040014152024066/dD3b2eA4_400x400.jpg",ref_id:"6c989c2c-d24d-49a2-8eb1-1d2f1c47f347",twitter_handle:"jamm_councilman"},{name:"thotsnplayerz",profile_picture:"https://pbs.twimg.com/profile_images/1608733749663109120/wwYEZgF2_400x400.jpg",ref_id:"66bbe365-9e85-4c34-9d51-39d8b49937b7",twitter_handle:"thotsnplayerz"},{name:"Will Schoellkopf",profile_picture:"https://pbs.twimg.com/profile_images/1487515153302130691/t5sDMzZW_400x400.jpg",ref_id:"461e2245-1672-4fa1-94f5-7aaf1afa531f",twitter_handle:"realBitcoinDog"},{name:"OKIN_17",profile_picture:"https://pbs.twimg.com/profile_images/1518945775685967873/O0wPrIKO_400x400.jpg",ref_id:"dbcdeab8-4824-43f7-aeb8-2b9eda6cbbad",twitter_handle:"OKIN_17"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/9b2e17f2-71c5-4f1e-a3e7-720d06dab810.jpg",node_type:"episode",ref_id:"c6447277-9a58-411f-85e1-5ac166884ce5",show_title:"Satoshi’s Journal"},{children:["ed128fbb-3ad8-4d26-921c-495edfda3cbd"],episode_title:"The Orange Sun 🌞 Interview with Nzonda Fotsing Sr. #Bitcoin",guests:[{name:"TK☣️Ph.Ple₿",profile_picture:"https://pbs.twimg.com/profile_images/1505791887415730177/d0YDQ3Xc_400x400.jpg",ref_id:"9e3ffa2c-9410-48e9-a726-8312c0abcd7c",twitter_handle:"ToxiKat27"},{name:"Funsho Jimoh",profile_picture:"https://pbs.twimg.com/profile_images/1600143435775856641/uqgmtT23_400x400.jpg",ref_id:"a237ffb0-792b-484e-b12f-65a2b679eaf1",twitter_handle:"fnicencool"},{name:"Heritage Falodun",profile_picture:"https://pbs.twimg.com/profile_images/1510397558652350469/jYOl00tU_400x400.jpg",ref_id:"b2bcc65a-b060-4dbe-b9ac-a7d64a11d2ac",twitter_handle:"herrytheeagle"},{name:"Nzonda Fotsing Sr",profile_picture:"https://pbs.twimg.com/profile_images/1458565804291670016/XaLi8e6a_400x400.jpg",ref_id:"53fe4486-5ef3-4988-8ada-47c3cb1c2d51",twitter_handle:"BitcoinSophist"},{name:"ROB",profile_picture:"https://pbs.twimg.com/profile_images/1605484577669074946/CkYjFUxH_400x400.jpg",ref_id:"25c5f080-fd07-4b37-9014-7fc05419edce",twitter_handle:"robertlamonta15"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/9b2e17f2-71c5-4f1e-a3e7-720d06dab810.jpg",node_type:"episode",ref_id:"8418f2a4-1874-403a-9e58-7a76a8e09d4f",show_title:"Satoshi’s Journal"},{children:["663836ff-8d5a-4037-a62f-72568fff46f1","6cbed027-125f-454c-b03a-865df0b60d36","63cc2dff-cc56-40e2-8c22-93153e7d3255"],episode_title:"The Orange Sun ☀️ #Bitcoin News and Talk",guests:[{name:"Portland Hodl",profile_picture:"https://pbs.twimg.com/profile_images/1562306406526492672/LiqmI9NS_400x400.jpg",ref_id:"530aba21-392f-4156-9e91-4fc5c76fced1",twitter_handle:"PortlandHODL"},{name:"Miykael Woodward",profile_picture:"https://pbs.twimg.com/profile_images/1473433558475689985/CM0o3oWu_400x400.jpg",ref_id:"6fe02a78-4f07-47e7-8e64-b278a3167835",twitter_handle:"MiykaelWoodward"},{name:"Okin Mobi",profile_picture:"https://pbs.twimg.com/profile_images/1518945775685967873/O0wPrIKO_400x400.jpg",ref_id:"bbd18918-7758-4bdb-b9a5-641bf92748a6",twitter_handle:"OKIN_17"},{name:"TK☣️Ph.Ple₿",profile_picture:"https://pbs.twimg.com/profile_images/1505791887415730177/d0YDQ3Xc_400x400.jpg",ref_id:"9e3ffa2c-9410-48e9-a726-8312c0abcd7c",twitter_handle:"ToxiKat27"},{name:"Funsho Jimoh",profile_picture:"https://pbs.twimg.com/profile_images/1600143435775856641/uqgmtT23_400x400.jpg",ref_id:"a237ffb0-792b-484e-b12f-65a2b679eaf1",twitter_handle:"fnicencool"},{name:"prince ogbonna",profile_picture:"https://pbs.twimg.com/profile_images/1595693872637681664/TeWJzTut_400x400.jpg",ref_id:"0b0c70b1-23b1-4d98-b259-6dbb67b7481d",twitter_handle:"princejoj0"},{name:"The Bitcoin Village",profile_picture:"https://pbs.twimg.com/profile_images/1544318244789649410/kQ2G1MCE_400x400.jpg",ref_id:"d894aca4-36f6-4821-a00b-a4e860b19502",twitter_handle:"VillageBitcoin"},{name:"Masterguantai",profile_picture:"https://pbs.twimg.com/profile_images/1521025685078302720/w9dZwehS_400x400.jpg",ref_id:"29baf525-42eb-41a6-98f9-a0d6b4480af0",twitter_handle:"MasterGuantai"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/9b2e17f2-71c5-4f1e-a3e7-720d06dab810.jpg",node_type:"episode",ref_id:"a7dcf3bf-b9f2-41f1-a3f3-ffd2db3a0b96",show_title:"Satoshi’s Journal"},{children:["754762ac-7680-4b80-9ff4-f314ae65d146","d8a44c3b-6219-49d5-9a35-4b2ca5972d7c","da54483f-f9f4-4c4b-9320-6ba317e64b44"],episode_title:"The Orange Sun 🌞 Let's talk #Bitcoin & Cattle Ranching/Sustainability",guests:[{name:"Texas Slim",profile_picture:"https://pbs.twimg.com/profile_images/1589784780970795011/02jf0fqp_400x400.jpg",ref_id:"b4448c8e-9238-4aba-bd25-efb329ea5a72",twitter_handle:"modernTman"},{name:"Lucas",profile_picture:"https://pbs.twimg.com/profile_images/1596345084966014976/maviSGq3_400x400.jpg",ref_id:"e3adb591-b29f-435b-bd34-210f2dbcedaa",twitter_handle:"impossiblyso"},{name:"Firebust",profile_picture:"https://pbs.twimg.com/profile_images/1517827165198458880/N79Wpx85_400x400.jpg",ref_id:"0fb6c7f3-a673-4fe5-9599-8165800a2ff0",twitter_handle:"FireBursts"},{name:"Hamza Yusuf",profile_picture:"https://pbs.twimg.com/profile_images/1318064165030940672/sakbSOvT_400x400.jpg",ref_id:"03a74669-b653-4c57-8799-a312cb041089",twitter_handle:"Hamzayu28849293"},{name:"Adenekan's Father",profile_picture:"https://pbs.twimg.com/profile_images/1505572078023495683/Wo_pJvTU_400x400.jpg",ref_id:"b8259997-2ef0-4e6e-8d58-a69b5eda550a",twitter_handle:"AdenekanFatai4"},{name:"Adenekan",profile_picture:"https://pbs.twimg.com/profile_images/1505572078023495683/Wo_pJvTU_400x400.jpg",ref_id:"ca6a563e-0e84-4811-be82-a3b3cd12d399",twitter_handle:"AdenekanFatai4"},{name:"Heritage",profile_picture:"https://pbs.twimg.com/profile_images/1510397558652350469/jYOl00tU_400x400.jpg",ref_id:"98a6d9df-3c39-49ec-8a39-074e61af4ece",twitter_handle:"herrytheeagle"},{name:"Enoch",profile_picture:"https://pbs.twimg.com/profile_images/1596235105663533056/5mRUbLm3_400x400.jpg",ref_id:"4f8af040-3d0c-49c1-806e-aef89d8693fb",twitter_handle:"KazEnoch"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/9b2e17f2-71c5-4f1e-a3e7-720d06dab810.jpg",node_type:"episode",ref_id:"47406d36-917a-47f7-b89e-26181d6070bc",show_title:"Satoshi’s Journal"},{children:["1984e7b9-23f1-4ef0-8fcb-deac4ef23cc7","7a7c8427-a11e-438b-ac49-345882ca9a3f","5e6d5d88-bdb0-4350-8c03-13b0a24d3050","5483d49e-fa1a-430c-9d2a-ed11e3a6beec"],episode_title:"The Orange Sun 🌞 VISA, MasterCard & #Bitcoin #BOLT12",guests:[{name:"Oluwasegun Kosemani",profile_picture:"https://pbs.twimg.com/profile_images/1538403135101800450/sO-RPI9U_400x400.jpg",ref_id:"25ce4b90-6689-4dd9-84b6-240c7bcbe407",twitter_handle:"MrlamilamiKosch"},{name:"~₿ Maxi~",profile_picture:"https://pbs.twimg.com/profile_images/1446241859651637250/i67F3y9p_400x400.jpg",ref_id:"ad997ae7-0726-431a-9f72-82da091c0658",twitter_handle:"fede0891"},{name:"TK☣️Ph.Ple₿",profile_picture:"https://pbs.twimg.com/profile_images/1505791887415730177/d0YDQ3Xc_400x400.jpg",ref_id:"9e3ffa2c-9410-48e9-a726-8312c0abcd7c",twitter_handle:"ToxiKat27"},{name:"FireBurs†s",profile_picture:"https://pbs.twimg.com/profile_images/1517827165198458880/N79Wpx85_400x400.jpg",ref_id:"cda1d3ad-dd80-458b-a5fb-a28861df10a7",twitter_handle:"FireBursts"},{name:"Nikolai Tjongarero",profile_picture:"https://pbs.twimg.com/profile_images/1578458155964682274/_SzDxkAJ_400x400.jpg",ref_id:"821ee040-2267-454e-a59a-92da51568afa",twitter_handle:"BitcoinNaijaShw"},{name:"ブランドン",profile_picture:"https://pbs.twimg.com/profile_images/834861311762649090/N0KAP4zH_400x400.jpg",ref_id:"3d41531d-6a59-4771-81f9-0924b4c02561",twitter_handle:"blario"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/9b2e17f2-71c5-4f1e-a3e7-720d06dab810.jpg",node_type:"episode",ref_id:"dc7b8177-4cef-4da2-bb05-b12dfe4c05bb",show_title:"Satoshi’s Journal"},{children:["e4520df5-b812-4247-bd2d-7db10bc5b51f","7eea8bdf-2873-4759-b53b-a207aa8bcdcf","4f0b1fbc-47f6-49c7-afe1-4978eabe5c4a"],episode_title:"TOXIC HAPPY HOUR! #Bitcoin, Foss, Max Keiser & the Plebs! 🍻😂",guests:[{name:"Greg Foss",profile_picture:"https://pbs.twimg.com/profile_images/1552599670945464320/3OgqRHNo_400x400.jpg",ref_id:"853d9f80-f6cf-490f-9d1e-f29cdc6acc6f",twitter_handle:"FossGregfoss"},{name:"Jeff Ross",profile_picture:"https://pbs.twimg.com/profile_images/1475554600094552064/DSlPG1lx_400x400.jpg",ref_id:"ae6ee2a2-1cf7-41a0-8366-ff6e94a6403c",twitter_handle:"VailshireCap"},{name:"Craig Shipp",profile_picture:"https://pbs.twimg.com/profile_images/1605961563420114945/MWGqR1Gm_400x400.jpg",ref_id:"8d6ca47a-89a2-4331-bae4-2fae18055a95",twitter_handle:"CraigShipp"},{name:"Oluwasegun Kosemani",profile_picture:"https://pbs.twimg.com/profile_images/1538403135101800450/sO-RPI9U_400x400.jpg",ref_id:"25ce4b90-6689-4dd9-84b6-240c7bcbe407",twitter_handle:"MrlamilamiKosch"},{name:"Max Keiser",profile_picture:"https://pbs.twimg.com/profile_images/1361873587582472195/y57DiTYX_400x400.jpg",ref_id:"743efd07-d194-4c74-8663-45c3b8646b8e",twitter_handle:"Maxkeiser"},{name:"Isabel Foxen Duke",profile_picture:"https://pbs.twimg.com/profile_images/1466874333410717698/WRQh2-_m_400x400.jpg",ref_id:"58989d4a-4a96-4ffc-8cbe-f233ffb10420",twitter_handle:"isabelfoxenduke"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/0c42d408-e518-4ecf-b282-d864a8c14002.jpg",node_type:"episode",ref_id:"fb60247a-9b2e-41d4-83f4-f4cf92eb20f4",show_title:"PUBLORD"},{children:["4491ca29-82ab-4599-8d39-039653b35aa3","d65c7fdb-df02-4bef-a6e6-8d214f6284d4","fbefee4e-b2e3-4635-88ac-800d3482e9f8","c09cfdab-f18f-45ad-9542-bd095f3ef52a","17d338d5-a11d-405f-bbc1-257b4e145723"],episode_title:"TOXIC HAPPY HOUR! #Bitcoin, Pysh, Booth, BTC Ben & the Plebs! 🍻😂",guests:[{name:"Jeff Booth",profile_picture:"https://pbs.twimg.com/profile_images/1362957991410954241/spiaMAg2_400x400.jpg",ref_id:"f1143bcc-9ab9-4716-8259-0e5b026f8039",twitter_handle:"JeffBooth"},{name:"George Gammon",profile_picture:"https://pbs.twimg.com/profile_images/1246550014450700291/2n_iHigp_400x400.jpg",ref_id:"7ca1bc4f-3a57-4a6a-bedf-ef47a8b37297",twitter_handle:"GeorgeGammon"},{name:"Neil Jacobs",profile_picture:"https://pbs.twimg.com/profile_images/1593645788978102277/UAQCQKeE_400x400.jpg",ref_id:"0bc759e0-b055-4800-a79d-2b950fe5cc53",twitter_handle:"NeilJacobs"},{name:"Preston Pysh",profile_picture:"https://pbs.twimg.com/profile_images/1408783276081299462/f4Ye5n7-_400x400.jpg",ref_id:"01ad2c81-2d0c-44a9-93a1-42c07287aa80",twitter_handle:"PrestonPysh"},{name:"Brian",profile_picture:"https://pbs.twimg.com/profile_images/1589300685182570500/cTffQlpJ_400x400.jpg",ref_id:"b167b1cd-bbce-4839-a03c-194f006f954d",twitter_handle:"BrianTheDrumer"},{name:"BTC Ben",profile_picture:"https://pbs.twimg.com/profile_images/1348015880664473610/S-uDNLlZ_400x400.jpg",ref_id:"2c95b3dd-e3a2-4cf0-a49e-a8915d2bfcd5",twitter_handle:"bensemchee"},{name:"Craig Shipp",profile_picture:"https://pbs.twimg.com/profile_images/1605961563420114945/MWGqR1Gm_400x400.jpg",ref_id:"8d6ca47a-89a2-4331-bae4-2fae18055a95",twitter_handle:"CraigShipp"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/0c42d408-e518-4ecf-b282-d864a8c14002.jpg",node_type:"episode",ref_id:"87a2efa8-6b4c-486d-8511-d6a95cb84514",show_title:"PUBLORD"},{children:["28845fb4-d3b9-4615-af36-f3f3862d93f7","c9e43dce-1fac-4545-be91-7aa8594fa7e6"],episode_title:"TOXIC HAPPY HOUR! #Bitcoin is Easy Like Sunday Morning! 🍻😂",guests:[{name:" 2140data",profile_picture:"https://pbs.twimg.com/profile_images/1598330787778232320/ZVFcRtet_400x400.jpg",ref_id:"c8fb52d1-fa69-410d-bf96-8a7559bba863",twitter_handle:"2140data"},{name:"Tomer Strolight",profile_picture:"https://pbs.twimg.com/profile_images/1591960241008148481/HtyINxtU_400x400.jpg",ref_id:"3a2bc97d-072c-4ed9-9a59-17ceeb68fe99",twitter_handle:"TomerStrolight"},{name:" TC",profile_picture:"https://pbs.twimg.com/profile_images/1480160632360124416/AM_vVRko_400x400.jpg",ref_id:"dac0717a-a743-40d4-a89f-7523f071bbb0",twitter_handle:"publordhodl"},{name:" kann b",profile_picture:"https://pbs.twimg.com/profile_images/1480160632360124416/AM_vVRko_400x400.jpg",ref_id:"1170bde7-7f3c-4c4f-a158-5c48a98fe92b",twitter_handle:"publordhodl"},{name:" Dallas Rushing",profile_picture:"https://pbs.twimg.com/profile_images/1602759767029604352/hzuwh5ZB_400x400.jpg",ref_id:"13fed037-77ce-48eb-9544-25e7abff9395",twitter_handle:"dallasirushing"},{name:" Lisa Hough",profile_picture:"https://pbs.twimg.com/profile_images/1541581547815436288/Li8wORWt_400x400.jpg",ref_id:"5e154adf-d8bd-4adf-a23b-47a51c183163",twitter_handle:"lisa_hough_"},{name:" Collectooor of sats",profile_picture:"https://pbs.twimg.com/profile_images/1594362077132587009/cNAE2FU5_400x400.jpg",ref_id:"c84d0e47-7eeb-419b-a36e-5055b96044f0",twitter_handle:"hoardingsats"},{name:" Gold Leader",profile_picture:"https://pbs.twimg.com/profile_images/1594152783011250176/lHMHv3gB_400x400.jpg",ref_id:"96c4f802-25ff-4a81-b91f-cae5562bf4a3",twitter_handle:"GoldLeader89"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/0c42d408-e518-4ecf-b282-d864a8c14002.jpg",node_type:"episode",ref_id:"de9ef389-d0ee-4ce1-ad23-38bfafa28a35",show_title:"PUBLORD"},{children:["1171938e-b754-45ff-958d-ca89aa3ab235"],episode_title:"Café ₿: #Bitcoin Fix the Money, Fix the World",guests:[{name:"OrangePild",profile_picture:"https://pbs.twimg.com/profile_images/1608905201334845441/SHUsfTBW_400x400.jpg",ref_id:"1c33ba0e-3e6b-41f6-aed4-5217aa534521",twitter_handle:"OrangePild"},{name:"Neil Jacobs",profile_picture:"https://pbs.twimg.com/profile_images/1593645788978102277/UAQCQKeE_400x400.jpg",ref_id:"0bc759e0-b055-4800-a79d-2b950fe5cc53",twitter_handle:"NeilJacobs"},{name:"Dr. Jeff Ross",profile_picture:"https://pbs.twimg.com/profile_images/1475554600094552064/DSlPG1lx_400x400.jpg",ref_id:"51a969bb-dbf7-4d20-b128-74dcc5f560f6",twitter_handle:"VailshireCap"},{name:"Jason Brett",profile_picture:"https://pbs.twimg.com/profile_images/1591476397847060482/bNapBM4Y_400x400.jpg",ref_id:"750a85f9-59f2-4627-817c-a437b65ee45e",twitter_handle:"RegulatoryJason"},{name:"Tatum Turn Up",profile_picture:"https://pbs.twimg.com/profile_images/1600036563429343233/PXP0gxRj_400x400.jpg",ref_id:"31824d8a-a2a6-434e-8d10-f0be1c2f8389",twitter_handle:"tatumturnup"},{name:"Stackchain ⛓ Signal",profile_picture:"https://pbs.twimg.com/profile_images/1589791699571802117/n_Y1Qm7J_400x400.jpg",ref_id:"b0242af7-0d94-4551-ba25-a8b216b82fce",twitter_handle:"StackchainSig"},{name:"Ross",profile_picture:"https://pbs.twimg.com/profile_images/1602431687564357632/57oH7beH_400x400.jpg",ref_id:"cdb90285-daa9-4dd2-b96a-78dd5e8ba468",twitter_handle:"theyoungrossco"},{name:"BTC Sessions",profile_picture:"https://pbs.twimg.com/profile_images/1602307254937866240/CKiRrFui_400x400.jpg",ref_id:"e207ef16-44d1-40c4-929a-ea2736f60a94",twitter_handle:"BTCsessions"},{name:"TC",profile_picture:"https://pbs.twimg.com/profile_images/1607590332925095937/6CTv4688_400x400.jpg",ref_id:"083ddb42-c4a0-4360-8de3-6178e3b659ec",twitter_handle:"Meditation_Man"},{name:"Tomer Strolight",profile_picture:"https://pbs.twimg.com/profile_images/1591960241008148481/HtyINxtU_400x400.jpg",ref_id:"3a2bc97d-072c-4ed9-9a59-17ceeb68fe99",twitter_handle:"TomerStrolight"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/239722cb-4216-414a-a17b-5adf9d52e15a.jpg",node_type:"episode",ref_id:"94726593-cead-47f6-8029-6848f277358c",show_title:"Swan.com"},{children:["f80dd079-1a9d-4bda-b8dd-81c05d203533","6f72249d-ab08-4a9e-ac54-545f618c29d2","ebecb620-735b-490e-bc9d-b4033f11144a"],episode_title:"Café ₿: #Bitcoin News & Bitcoin Day w/ @Bitcoindayio",guests:[{name:"@johnmichaeldrew",profile_picture:"https://pbs.twimg.com/profile_images/1512897699942744064/PuRU3K8P_400x400.jpg",ref_id:"6b72ee7f-52ef-4847-96ed-78ea09e3f19b",twitter_handle:"johnmichaeldrew"},{name:"@mattyicesensei",profile_picture:"https://pbs.twimg.com/profile_images/1607138483579101186/0qm0xaCF_400x400.jpg",ref_id:"286abd3b-cecc-4ec5-bf88-2a9fd5393083",twitter_handle:"mattyicesensei"},{name:"@Bitcoindayio",profile_picture:"https://pbs.twimg.com/profile_images/1493098733608837121/tLI-XTwl_400x400.jpg",ref_id:"6a87699e-7a27-4928-89e8-d884f1458bf9",twitter_handle:"Bitcoindayio"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/239722cb-4216-414a-a17b-5adf9d52e15a.jpg",node_type:"episode",ref_id:"2c2ac736-0711-4418-8a44-6f9de54cbe6f",show_title:"Swan.com"},{children:["12445bad-9deb-4bff-ba8a-e8a490b00cc5","2a0fb607-c735-4b09-809a-3c74cc61de97","2969a789-41bf-4e23-8ab8-31a76c5a5754","ada07186-c3fc-4b5e-b9c7-3ce54e1b94c7"],episode_title:"Café ₿: #Bitcoin Holiday Hangout & @StatusMoneyUSA a #BTC Credit Card",guests:[{name:" BITVOLT7",profile_picture:"https://pbs.twimg.com/profile_images/1532194001511714818/O8nSTKcx_400x400.png",ref_id:"2b9913b7-393c-4125-9aeb-4a8bf32bfa44",twitter_handle:"BITVOLT7"},{name:" samcallah",profile_picture:"https://pbs.twimg.com/profile_images/1502454836981166082/cQG0YQxc_400x400.jpg",ref_id:"a3dbdb56-e228-4382-98bc-d4495ff6dfbd",twitter_handle:"samcallah"},{name:" taodejing2",profile_picture:"https://pbs.twimg.com/profile_images/1575442322531274756/-ZdL-K9S_400x400.jpg",ref_id:"4914799b-a230-4bee-95c9-cf3ac44b6b70",twitter_handle:"TyonClubhouse"},{name:" MrHodl",profile_picture:"https://pbs.twimg.com/profile_images/1607490976670519296/vhLAojMR_400x400.jpg",ref_id:"01d6ee68-c0ef-4ead-b2b7-7eb04694519e",twitter_handle:"MrHodl"},{name:" TomerStrolight",profile_picture:"https://pbs.twimg.com/profile_images/1591960241008148481/HtyINxtU_400x400.jpg",ref_id:"57beb381-b9e8-4dd1-82f6-4e544a63146b",twitter_handle:"TomerStrolight"},{name:" VailshireCap",profile_picture:"https://pbs.twimg.com/profile_images/1475554600094552064/DSlPG1lx_400x400.jpg",ref_id:"73c15965-ddad-4e32-9746-da92f5d24134",twitter_handle:"VailshireCap"},{name:"bergealex4",profile_picture:"https://pbs.twimg.com/profile_images/1273374628577247233/tYigkAZH_400x400.jpg",ref_id:"da4bb8ab-540d-4f88-a2a6-f3a3941c5b74",twitter_handle:"bergealex4"},{name:" LukeMikic21",profile_picture:"https://pbs.twimg.com/profile_images/1604626418708742147/gWyVLeqa_400x400.jpg",ref_id:"0a907108-f59f-420f-9986-79b0f060f690",twitter_handle:"LukeMikic21"},{name:" 2140data",profile_picture:"https://pbs.twimg.com/profile_images/1598330787778232320/ZVFcRtet_400x400.jpg",ref_id:"c8fb52d1-fa69-410d-bf96-8a7559bba863",twitter_handle:"2140data"},{name:" majdmaksad",profile_picture:"https://pbs.twimg.com/profile_images/1483883774471516167/zvEjiCTO_400x400.jpg",ref_id:"1a63c59d-a760-4f8b-bba9-ddfd3cff9f33",twitter_handle:"majdmaksad"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/239722cb-4216-414a-a17b-5adf9d52e15a.jpg",node_type:"episode",ref_id:"883300ba-aeb4-42e5-bbd2-7c989e481a3b",show_title:"Swan.com"},{children:["6c3edea1-97d0-41d4-a015-0f16417f2ee7"],episode_title:"Café ₿: 23’ Macro Outlook w/ Joe Burnett & Mitch from Blockware",guests:[{name:"Cory Klippsten",profile_picture:"https://pbs.twimg.com/profile_images/1569687200857755648/fxiCeaqc_400x400.jpg",ref_id:"ddfb9b4c-4e6a-4f4c-a01b-e6bb1bc55464",twitter_handle:"coryklippsten"},{name:"Tomer Strolight",profile_picture:"https://pbs.twimg.com/profile_images/1591960241008148481/HtyINxtU_400x400.jpg",ref_id:"3a2bc97d-072c-4ed9-9a59-17ceeb68fe99",twitter_handle:"TomerStrolight"},{name:"Joe Burnnet",profile_picture:"https://pbs.twimg.com/profile_images/1601649626754564105/9TubQjRd_400x400.jpg",ref_id:"1c849151-1cca-44db-9a69-665fac5dc6f6",twitter_handle:"IIICapital"},{name:"Mitchell Askew",profile_picture:"https://pbs.twimg.com/profile_images/435841191524204544/mzKR9KCX_400x400.jpeg",ref_id:"fc4ba3ae-eacc-489d-a888-397ba6b1f842",twitter_handle:"mitchell_askew"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/239722cb-4216-414a-a17b-5adf9d52e15a.jpg",node_type:"episode",ref_id:"a41902c1-9f41-4ea4-b135-0d2078f6074b",show_title:"Swan.com"},{children:["b8d90bd0-45fb-40d9-87db-b9a908a8684a"],episode_title:"Café ₿: SBF Arrested 🚨 🚨 #Bitcoin Not Crypto",guests:[{name:" Tone Vays",profile_picture:"https://pbs.twimg.com/profile_images/1416821178266787844/T1OkI9ZW_400x400.jpg",ref_id:"ac43b4f0-9056-4a6b-9d30-4a6250405ade",twitter_handle:"ToneVays"},{name:" 2140data",profile_picture:"https://pbs.twimg.com/profile_images/1598330787778232320/ZVFcRtet_400x400.jpg",ref_id:"c8fb52d1-fa69-410d-bf96-8a7559bba863",twitter_handle:"2140data"},{name:" BITVOLT7",profile_picture:"https://pbs.twimg.com/profile_images/1532194001511714818/O8nSTKcx_400x400.png",ref_id:"2b9913b7-393c-4125-9aeb-4a8bf32bfa44",twitter_handle:"BITVOLT7"},{name:" Tomer Strolight",profile_picture:"https://pbs.twimg.com/profile_images/1591960241008148481/HtyINxtU_400x400.jpg",ref_id:"4e0b6941-6d5c-439c-9d30-7c5691828930",twitter_handle:"TomerStrolight"},{name:"Neil Jacobs",profile_picture:"https://pbs.twimg.com/profile_images/1593645788978102277/UAQCQKeE_400x400.jpg",ref_id:"0bc759e0-b055-4800-a79d-2b950fe5cc53",twitter_handle:"NeilJacobs"},{name:" StackchainSig",profile_picture:"https://pbs.twimg.com/profile_images/1589791699571802117/n_Y1Qm7J_400x400.jpg",ref_id:"c000ebd6-1c05-4c6a-ad07-5e5c10cc3fb3",twitter_handle:"StackchainSig"},{name:" Joe Carlasare",profile_picture:"https://pbs.twimg.com/profile_images/1567374701667794944/2ghrkDx7_400x400.jpg",ref_id:"75b3a3fa-f118-4ea0-9477-25832844c900",twitter_handle:"JoeCarlasare"},{name:" w_s_bitcoin",profile_picture:"https://pbs.twimg.com/profile_images/1594796869233811474/g0_ZRshz_400x400.png",ref_id:"268a731a-0e21-4cb1-ad73-d8d21f433393",twitter_handle:"w_s_bitcoin"},{name:" TYonClubhouse",profile_picture:"https://pbs.twimg.com/profile_images/1575442322531274756/-ZdL-K9S_400x400.jpg",ref_id:"519d68be-1a96-4394-8bab-48f570f1a6cd",twitter_handle:"TYonClubhouse"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/239722cb-4216-414a-a17b-5adf9d52e15a.jpg",node_type:"episode",ref_id:"6334a91f-b1db-4f05-a381-bc68b121dfb3",show_title:"Swan.com"},{children:["dbc2c8f6-e85d-449c-a431-e52f6e7594e2","6faac813-7f72-4208-a6ea-a8f330da5d1e","df4ad67d-6316-4762-a7c5-884c162dd8a9","124cbc47-3581-4bd6-add0-fe0855bc9ac3","3d112a9e-f3a1-4edb-96b0-c3a8c63b0c4a"],episode_title:"Café ₿: #Bitcoin Beginner Q&A",guests:[{name:"Peter",profile_picture:"https://pbs.twimg.com/profile_images/1581695667193643009/EljNY-TH_400x400.jpg",ref_id:"a3384925-e15e-421d-b9f9-6d44e273ed05",twitter_handle:"PeterAnsel9"},{name:"Stephan Livera",profile_picture:"https://pbs.twimg.com/profile_images/1362551718110580740/v-W5Q2uo_400x400.jpg",ref_id:"72f57157-c96e-4466-8bf1-290cfe1f8a0b",twitter_handle:"stephanlivera"},{name:"Thomas J Lake",profile_picture:"https://pbs.twimg.com/profile_images/1529168328534769670/5cl2Y_k-_400x400.jpg",ref_id:"21541a47-0601-447c-99c2-312d1a63c19f",twitter_handle:"thomaslake"},{name:"Goodguy",profile_picture:"https://pbs.twimg.com/profile_images/1363216959576285185/unulY4yd_400x400.jpg",ref_id:"0c3fec75-9cc2-4c0f-8dbe-db7fae2b585b",twitter_handle:"goodguybiker"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/239722cb-4216-414a-a17b-5adf9d52e15a.jpg",node_type:"episode",ref_id:"3b7e4cc5-bc15-45e9-bb7a-373fa4cca6f1",show_title:"Swan.com"},{children:["15e10126-3ca8-461d-bb9d-d412b8333b32"],episode_title:"Café ₿: MacroStrategy w/ Foss, Lepard, Lavish, Dr.Jeff, Pysh",guests:[{name:"Dr. Jeff Ross",profile_picture:"https://pbs.twimg.com/profile_images/1475554600094552064/DSlPG1lx_400x400.jpg",ref_id:"51a969bb-dbf7-4d20-b128-74dcc5f560f6",twitter_handle:"VailshireCap"},{name:"James Lavish",profile_picture:"https://pbs.twimg.com/profile_images/1466279082157502464/flD6cWI3_400x400.jpg",ref_id:"cf06ab2d-2ff3-4d7b-bef6-b996ae68517a",twitter_handle:"jameslavish"},{name:"Lawrence Lepard",profile_picture:"https://pbs.twimg.com/profile_images/1114275000889032704/mOUsG1XC_400x400.png",ref_id:"0452f07a-5ee6-447d-901b-d96fe2c51324",twitter_handle:"LawrenceLepard"},{name:"Preston Pysh",profile_picture:"https://pbs.twimg.com/profile_images/1408783276081299462/f4Ye5n7-_400x400.jpg",ref_id:"01ad2c81-2d0c-44a9-93a1-42c07287aa80",twitter_handle:"PrestonPysh"},{name:"Greg Foss",profile_picture:"https://pbs.twimg.com/profile_images/1552599670945464320/3OgqRHNo_400x400.jpg",ref_id:"853d9f80-f6cf-490f-9d1e-f29cdc6acc6f",twitter_handle:"FossGregfoss"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/239722cb-4216-414a-a17b-5adf9d52e15a.jpg",node_type:"episode",ref_id:"f8a66979-3fac-4793-bad0-8ede604e211b",show_title:"Swan.com"},{children:["fc9b5e45-fc94-42dd-a722-bde164f8c24b"],episode_title:"Café ₿: Bitcoin News & Using Bitcoin w/ Twitter, @tweetoshiapp",guests:[{name:"@TweetoshiApp",profile_picture:"https://pbs.twimg.com/profile_images/1532819967133028352/frxdtSHX_400x400.jpg",ref_id:"97e59475-beaf-44fe-b1b0-ea2a63d335b6",twitter_handle:"TweetoshiApp"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/239722cb-4216-414a-a17b-5adf9d52e15a.jpg",node_type:"episode",ref_id:"1d671494-3407-4619-92b0-99c7d6f95f86",show_title:"Swan.com"},{children:["7b90a2ff-ac29-43a9-9911-0eec916e3088"],episode_title:"Café ₿: GBTC was the Genesis of the Crypto Contagion w/ @samcallah",guests:[{name:"@StackchainSig",profile_picture:"https://pbs.twimg.com/profile_images/1589791699571802117/n_Y1Qm7J_400x400.jpg",ref_id:"6e652629-38ec-49d8-9f5c-3ba28f80c799",twitter_handle:"StackchainSig"},{name:"@Meditation_Man",profile_picture:"https://pbs.twimg.com/profile_images/1597303881339314176/kFqDWvq0_400x400.jpg",ref_id:"cf7119ec-50a5-4ba2-a9a6-4a24835f3364",twitter_handle:"Meditation_Man"},{name:"@TomerStrolight",profile_picture:"https://pbs.twimg.com/profile_images/1591960241008148481/HtyINxtU_400x400.jpg",ref_id:"7af639f8-8c5c-4ce1-a43b-e8560ed40e2b",twitter_handle:"TomerStrolight"},{name:"@2140data",profile_picture:"https://pbs.twimg.com/profile_images/1598330787778232320/ZVFcRtet_400x400.jpg",ref_id:"190b5001-a42a-46cc-b0d3-b6f74c625648",twitter_handle:"2140data"},{name:" @samcallah",profile_picture:"https://pbs.twimg.com/profile_images/1502454836981166082/cQG0YQxc_400x400.jpg",ref_id:"ee5d0119-780d-4539-9b84-83025e95c03f",twitter_handle:"samcallah"},{name:"@sonofsats",profile_picture:"https://pbs.twimg.com/profile_images/1593080311000211456/Dr_NQ9Iw_400x400.jpg",ref_id:"07f15eea-1f9a-41bc-b974-ffd370885708",twitter_handle:"sonofsats"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/239722cb-4216-414a-a17b-5adf9d52e15a.jpg",node_type:"episode",ref_id:"9ae3fabe-5d43-47bc-9ab0-541df990773a",show_title:"Swan.com"},{children:["7c3d3625-4308-437e-80bb-38fb8b2a678c","75ac478b-3dfa-45a8-9fa0-cebaacccfc05","639d4f31-2190-4fc2-a0dc-57cf53c3d97b","2b1c8514-7d10-4e83-9006-9974ec31d35a"],episode_title:"Café ₿: #Bitcoin News & Trusted P2P Reviews w/ @Apollosats",guests:[{name:"@2140data",profile_picture:"https://pbs.twimg.com/profile_images/1598330787778232320/ZVFcRtet_400x400.jpg",ref_id:"190b5001-a42a-46cc-b0d3-b6f74c625648",twitter_handle:"2140data"},{name:"@FossGregfoss",profile_picture:"https://abs.twimg.com/sticky/default_profile_images/default_profile_400x400.png",ref_id:"09913e9b-38dc-4465-9d4d-ae0c9ba9eeca",twitter_handle:"Fuckkkk"},{name:"@w_s_bitcoin",profile_picture:"https://pbs.twimg.com/profile_images/1594796869233811474/g0_ZRshz_400x400.png",ref_id:"b178b239-3b18-4a16-9d43-c5d15ba6f7f4",twitter_handle:"w_s_bitcoin"},{name:"@NeilJacobs",profile_picture:"https://pbs.twimg.com/profile_images/1599432572727169025/NSoPdchB_400x400.jpg",ref_id:"4b6997e1-ce0b-4a1d-90e7-dbaccef4b783",twitter_handle:"NeilJacobs"},{name:"@brandon_gentile",profile_picture:"https://pbs.twimg.com/profile_images/1561369452284895236/-8WgdwEm_400x400.jpg",ref_id:"f940c5e8-4808-4197-a38f-3f19d311a7ad",twitter_handle:"brandon_gentile"},{name:"@apollosats",profile_picture:"https://pbs.twimg.com/profile_images/1576946734927794176/2ail9FoU_400x400.jpg",ref_id:"74f4280f-5fdb-4bbc-aee2-a2ed32d64372",twitter_handle:"apollosats"},{name:"@StackchainSig",profile_picture:"https://pbs.twimg.com/profile_images/1589791699571802117/n_Y1Qm7J_400x400.jpg",ref_id:"6e652629-38ec-49d8-9f5c-3ba28f80c799",twitter_handle:"StackchainSig"},{name:"@TomerStrolight",profile_picture:"https://pbs.twimg.com/profile_images/1591960241008148481/HtyINxtU_400x400.jpg",ref_id:"7af639f8-8c5c-4ce1-a43b-e8560ed40e2b",twitter_handle:"TomerStrolight"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/239722cb-4216-414a-a17b-5adf9d52e15a.jpg",node_type:"episode",ref_id:"a119635b-a66a-4a90-a7e3-2a7929666a82",show_title:"Swan.com"},{children:["7fea625e-c79b-402b-bce5-66e4e97d9598","3b4b6a17-9995-4f90-88d0-15cfd0b53be6"],episode_title:"Café ₿: Bitcoin Credit Card w/ @BoldBitcoin @John_ely_21m",guests:[{name:"Cory Klippsten",profile_picture:"https://pbs.twimg.com/profile_images/1569687200857755648/fxiCeaqc_400x400.jpg",ref_id:"ddfb9b4c-4e6a-4f4c-a01b-e6bb1bc55464",twitter_handle:"coryklippsten"},{name:"Greg Foss",profile_picture:"https://pbs.twimg.com/profile_images/1552599670945464320/3OgqRHNo_400x400.jpg",ref_id:"853d9f80-f6cf-490f-9d1e-f29cdc6acc6f",twitter_handle:"FossGregfoss"},{name:"Wicked",profile_picture:"",ref_id:"fee44016-b05f-4961-a6d8-7dac655cd931",twitter_handle:""},{name:"@BoldBitcoin",profile_picture:"https://pbs.twimg.com/profile_images/1559592705231044609/iJrNKxF9_400x400.png",ref_id:"dd4e1c4c-d111-4f01-ad95-18200d50cdb8",twitter_handle:"BoldBitcoin"},{name:"@John_ely_21m",profile_picture:"https://pbs.twimg.com/profile_images/1560444673046585346/VN8n2LtM_400x400.jpg",ref_id:"a24436b1-5992-4711-a4a5-0770546ea80a",twitter_handle:"John_Ely_21m"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/239722cb-4216-414a-a17b-5adf9d52e15a.jpg",node_type:"episode",ref_id:"6fe2326f-7cad-4efb-abed-206db564556e",show_title:"Swan.com"},{children:["f76300e2-dc0d-4960-a1cf-6c7b90ad4cfa","888c6962-f33f-4e88-a1cb-6819baabe35f","f84d9798-f31e-480e-9da6-9be8dc74f6be"],episode_title:"Gladstein & Sam Callahan - World Bank / IMF & #Bitcoin",guests:[{name:"Sam Callahan",profile_picture:"https://pbs.twimg.com/profile_images/1592532728775409667/0DayEP2Q_400x400.jpg",ref_id:"5a044a91-8dee-421c-86dd-8c734dc9bc32",twitter_handle:"CallahanMusic_"},{name:"Alex Gladstein",profile_picture:"https://pbs.twimg.com/profile_images/1382371620669452292/VOPKOc8w_400x400.jpg",ref_id:"49445c1c-7c66-4b73-9eec-09a337befbec",twitter_handle:"gladstein"},{name:"Brady",profile_picture:"https://pbs.twimg.com/profile_images/1502564606836981763/fmqtNrNc_400x400.jpg",ref_id:"45bbbb01-6163-4b3b-905a-fc67174893d9",twitter_handle:"CitizenBitcoin"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/239722cb-4216-414a-a17b-5adf9d52e15a.jpg",node_type:"episode",ref_id:"141ef1e6-e6ec-4d29-a52a-01be662b21ae",show_title:"Swan.com"},{children:["929def08-6b32-4313-a296-eaa1e5ee8d1b","332af4b9-782f-40e4-878c-45bb9d7edcdc"],episode_title:"Café ₿: Bitcoin Lightning ⚡️ Q&A w/ Bobby & Paul From Voltage!",guests:[{name:"Tomer Strolight",profile_picture:"https://pbs.twimg.com/profile_images/1591960241008148481/HtyINxtU_400x400.jpg",ref_id:"3a2bc97d-072c-4ed9-9a59-17ceeb68fe99",twitter_handle:"TomerStrolight"},{name:" Brady Swenson",profile_picture:"https://pbs.twimg.com/profile_images/1502564606836981763/fmqtNrNc_400x400.jpg",ref_id:"560cf9ee-2844-4ced-bbfd-d0ec639b2177",twitter_handle:"CitizenBitcoin"},{name:" Jeff Ross",profile_picture:"https://pbs.twimg.com/profile_images/1307109108127019008/rPNj47yJ_400x400.jpg",ref_id:"4f4f53c7-5a3a-46df-b334-9951fe38dc96",twitter_handle:"realjeffreyross"},{name:" 2140data",profile_picture:"https://pbs.twimg.com/profile_images/1598330787778232320/ZVFcRtet_400x400.jpg",ref_id:"c8fb52d1-fa69-410d-bf96-8a7559bba863",twitter_handle:"2140data"},{name:" q_liketheletter",profile_picture:"https://pbs.twimg.com/profile_images/1560683048680665088/4MrHM_UY_400x400.jpg",ref_id:"d82c0d30-d0d3-4947-a358-d28f1cd5292e",twitter_handle:"q_liketheletter"},{name:" iBobbyShell",profile_picture:"https://pbs.twimg.com/profile_images/1583132979571920896/1Std3_ya_400x400.jpg",ref_id:"2f9bd0a3-1215-4a89-9dc6-d64f170961af",twitter_handle:"iBobbyShell"},{name:" Tone Vays",profile_picture:"https://pbs.twimg.com/profile_images/1416821178266787844/T1OkI9ZW_400x400.jpg",ref_id:"ac43b4f0-9056-4a6b-9d30-4a6250405ade",twitter_handle:"ToneVays"},{name:" sonofsats",profile_picture:"https://pbs.twimg.com/profile_images/1593080311000211456/Dr_NQ9Iw_400x400.jpg",ref_id:"d584f070-a66a-4b53-b15a-8142f8daea66",twitter_handle:"sonofsats"},{name:" futurepaul",profile_picture:"https://pbs.twimg.com/profile_images/1508452962917666821/1QheRD09_400x400.jpg",ref_id:"fcb50ec8-2669-47da-87b9-1702affb30c9",twitter_handle:"futurepaul"},{name:" Greg Foss",profile_picture:"https://pbs.twimg.com/profile_images/1552599670945464320/3OgqRHNo_400x400.jpg",ref_id:"a2ba4e1e-aab7-43b0-90d7-d3c6a9738ad0",twitter_handle:"FossGregfoss"},{name:" Brad Mills",profile_picture:"https://pbs.twimg.com/profile_images/1541955880752750592/XJqwIn2E_400x400.jpg",ref_id:"9a49201c-3b03-4a83-bcb8-d92dbf3d55b6",twitter_handle:"bradmillscan"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/239722cb-4216-414a-a17b-5adf9d52e15a.jpg",node_type:"episode",ref_id:"15cae8e2-7cb3-4c60-9b3a-32cb4b231c26",show_title:"Swan.com"},{children:["0fe0af9b-421e-43ab-800d-7354379ea21f","700e8ab8-7cc3-476c-87ea-524081f2322c","2a3ee0fe-bcfc-412d-b1ee-2ba7f72528bd","48de736c-df85-48ea-9856-e9b608a6025e","d72f67b3-c42f-43cf-8e01-47065fe8e638"],episode_title:"Café ₿: Sovereign Computing w/ Matt & Aiden, Start9",guests:[{name:"Andrew",profile_picture:"https://pbs.twimg.com/profile_images/1465763053014859786/xYFN2czJ_400x400.jpg",ref_id:"ae4b13f8-0ee7-480a-b47a-82b967ad7a79",twitter_handle:"AP_ArchPublic"},{name:"Matt Hill",profile_picture:"https://pbs.twimg.com/profile_images/1347317316057321474/ieMjzK3x_400x400.jpg",ref_id:"3576ad28-a04d-4388-865b-3ec5114c4f9f",twitter_handle:"_MattHill_"},{name:"Lauren",profile_picture:"https://pbs.twimg.com/profile_images/1586022214901501952/U1dRyCxP_400x400.jpg",ref_id:"7f14bbf5-a60b-496b-a361-3663cf120299",twitter_handle:"LaurenJauregui"},{name:"Aiden McClelland",profile_picture:"https://pbs.twimg.com/profile_images/1470160097225498624/0BjKB_2W_400x400.jpg",ref_id:"04ddd9d4-9329-4e6c-aaa3-d65ea4a9342a",twitter_handle:"_dr_bonez"},{name:"Peter",profile_picture:"https://pbs.twimg.com/profile_images/1581695667193643009/EljNY-TH_400x400.jpg",ref_id:"a3384925-e15e-421d-b9f9-6d44e273ed05",twitter_handle:"PeterAnsel9"},{name:"Lisa",profile_picture:"https://pbs.twimg.com/profile_images/1541581547815436288/Li8wORWt_400x400.jpg",ref_id:"e6f0c6e3-3237-4b13-878f-bb740cd32f8d",twitter_handle:"lisa_hough_"},{name:"Isabelle",profile_picture:"https://pbs.twimg.com/profile_images/1466874333410717698/WRQh2-_m_400x400.jpg",ref_id:"c8df253f-47b3-465e-878e-8405c01c090d",twitter_handle:"isabelfoxenduke"},{name:"Tone",profile_picture:"https://pbs.twimg.com/profile_images/1416821178266787844/T1OkI9ZW_400x400.jpg",ref_id:"5729ac07-51d6-4268-b585-62680c846acb",twitter_handle:"ToneVays"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/239722cb-4216-414a-a17b-5adf9d52e15a.jpg",node_type:"episode",ref_id:"3bc946bc-82f4-48d3-9bd2-fab82353774d",show_title:"Swan.com"},{children:["2acb23ed-c7ca-4f51-abb6-bfcc0a87316a","5faa3765-8f15-41c7-8c8e-6136a0e67b5f"],episode_title:"Café ₿: Thanksgiving Special 🦃 w/ the Café Bitcoin Crew",guests:[{name:"Rob Hamilton",profile_picture:"https://pbs.twimg.com/profile_images/1524033110630969351/wTUr8S36_400x400.jpg",ref_id:"94b18625-4778-4cfe-9c78-823704d1c1b1",twitter_handle:"Rob1Ham"},{name:"Tomer Strolight",profile_picture:"https://pbs.twimg.com/profile_images/1591960241008148481/HtyINxtU_400x400.jpg",ref_id:"3a2bc97d-072c-4ed9-9a59-17ceeb68fe99",twitter_handle:"TomerStrolight"},{name:"DJ Satoshi",profile_picture:"https://pbs.twimg.com/profile_images/915987644043030528/5nh3JQSz_400x400.jpg",ref_id:"02ae35cb-3728-441f-84c5-a8db5d9150b4",twitter_handle:"satoshi__tomiie"},{name:"Lauren",profile_picture:"https://pbs.twimg.com/profile_images/1586022214901501952/U1dRyCxP_400x400.jpg",ref_id:"7f14bbf5-a60b-496b-a361-3663cf120299",twitter_handle:"LaurenJauregui"},{name:"Shaeroden",profile_picture:"https://pbs.twimg.com/profile_images/1560742113410678789/cHZ2tUjU_400x400.jpg",ref_id:"0da06a5c-038f-4737-9af7-17bed3712e68",twitter_handle:"Shaeroden"},{name:"Andres",profile_picture:"https://pbs.twimg.com/profile_images/1401952614795943950/aL2h3Wb4_400x400.jpg",ref_id:"db4abfe9-e3bb-4ffa-9783-ce67f5b20270",twitter_handle:"andresvbr9"},{name:"Peter Ansel",profile_picture:"https://pbs.twimg.com/profile_images/1374726811221954565/R7ttqYMI_400x400.jpg",ref_id:"2d418514-e03c-414d-8ed1-10c894aacb6e",twitter_handle:"peteransell"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/239722cb-4216-414a-a17b-5adf9d52e15a.jpg",node_type:"episode",ref_id:"80617a1c-8bf7-404d-928c-86fc32d643fe",show_title:"Swan.com"},{children:["49fe88a8-79ec-423c-a550-a32eb875f090"],episode_title:"Café ₿: Bitcoin News, Bitcoin Timechain ⛓Day w/ Ant & TC",guests:[{name:"@2140data",profile_picture:"https://pbs.twimg.com/profile_images/1598330787778232320/ZVFcRtet_400x400.jpg",ref_id:"190b5001-a42a-46cc-b0d3-b6f74c625648",twitter_handle:"2140data"},{name:"@Meditation_Man",profile_picture:"https://pbs.twimg.com/profile_images/1597303881339314176/kFqDWvq0_400x400.jpg",ref_id:"cf7119ec-50a5-4ba2-a9a6-4a24835f3364",twitter_handle:"Meditation_Man"},{name:"@TimechainStats",profile_picture:"https://pbs.twimg.com/profile_images/1316207411741569028/LpDkqBMv_400x400.png",ref_id:"48e0e34d-8e04-47c0-972c-96cda708a719",twitter_handle:"TimechainStats"},{name:"@TimechainCaL",profile_picture:"https://pbs.twimg.com/profile_images/1589772501638184961/0qP3C4Wk_400x400.jpg",ref_id:"72d94cc5-b62e-4fe2-8275-837eab35a74a",twitter_handle:"TimechainCaL"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/239722cb-4216-414a-a17b-5adf9d52e15a.jpg",node_type:"episode",ref_id:"d28e279c-4539-4ec8-b187-1b6447bdb6be",show_title:"Swan.com"},{children:["ab983731-f12f-41d4-8921-6388b9c064b6"],episode_title:"#Bitcoin in DC",guests:[{name:" Matthew Pines",profile_picture:"https://pbs.twimg.com/profile_images/1518262325949734915/a5SFNpxO_400x400.jpg",ref_id:"6243401a-eb27-494a-b393-f2ecb02e02a7",twitter_handle:"matthew_pines"},{name:" Zack Shapiro",profile_picture:"https://pbs.twimg.com/profile_images/1602521378695118850/I5eXxQN5_400x400.jpg",ref_id:"736f0806-a6f5-41ea-84f8-d8e5cbd832c9",twitter_handle:"coinlawyer_"},{name:" Jason Brett",profile_picture:"https://pbs.twimg.com/profile_images/1591476397847060482/bNapBM4Y_400x400.jpg",ref_id:"7b8919ad-3196-46d5-9423-80eddf653e9f",twitter_handle:"RegulatoryJason"},{name:"Grant McCarty",profile_picture:"https://pbs.twimg.com/profile_images/1587887156797792261/6w4ewhwj_400x400.jpg",ref_id:"0bbb9ce6-25d3-4626-b3c2-96007355664f",twitter_handle:"grant_mccarty"},{name:" Stephen Pollock",profile_picture:"https://pbs.twimg.com/profile_images/1591160404293521408/pUvBZfsR_400x400.jpg",ref_id:"0c6704ac-558d-4de9-95f0-f96ee59657c8",twitter_handle:"spollockbtc"},{name:" David Zell",profile_picture:"https://pbs.twimg.com/profile_images/1574417496962105344/CcIm-voF_400x400.jpg",ref_id:"79345f31-415f-4859-9d10-2684e7006305",twitter_handle:"DavidZell_"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/f3a55dda-3dd5-4f62-99c1-bab3a88c27c1.jpg",node_type:"episode",ref_id:"aba10d42-f204-4853-99c4-c8a22f846945",show_title:"Bitcoin Magazine"},{children:["ea039879-1342-42d9-92e1-1fd4b6561488"],episode_title:"Escaping $ Debasement With #Bitcoin",guests:[{name:"Joe Consorti",profile_picture:"https://pbs.twimg.com/profile_images/1596902707511664640/GYGWVDts_400x400.jpg",ref_id:"8d2024b2-03bb-454d-9bd6-bb121904b76a",twitter_handle:"JoeConsorti"},{name:"Nik Bhatia",profile_picture:"https://pbs.twimg.com/profile_images/1496241412580397058/s7jy5g3a_400x400.jpg",ref_id:"d76f4499-ccf6-4153-9bc1-257a580aa079",twitter_handle:"timevalueofbtc"},{name:"Sam Callahan",profile_picture:"https://pbs.twimg.com/profile_images/1592532728775409667/0DayEP2Q_400x400.jpg",ref_id:"5a044a91-8dee-421c-86dd-8c734dc9bc32",twitter_handle:"CallahanMusic_"},{name:"Brian De Mint",profile_picture:"https://pbs.twimg.com/profile_images/1546297674512470016/oEVF8rJQ_400x400.jpg",ref_id:"064e04f7-8320-4854-8325-0cc19cd7ff55",twitter_handle:"BrianTheMint"},{name:"Dylan LeClair",profile_picture:"https://pbs.twimg.com/profile_images/1508157904913899522/3l7ctauV_400x400.jpg",ref_id:"283edea0-55cf-4245-95df-8d6d3dcb1851",twitter_handle:"DylanLeClair_"},{name:"@coryklippsten",profile_picture:"https://pbs.twimg.com/profile_images/1569687200857755648/fxiCeaqc_400x400.jpg",ref_id:"21aca21d-9a96-40a9-a8b8-a523ae6591c3",twitter_handle:"coryklippsten"},{name:"Matt C",profile_picture:"",ref_id:"337e3256-0602-4baf-a4b7-ca6d0655c569",twitter_handle:""}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/f3a55dda-3dd5-4f62-99c1-bab3a88c27c1.jpg",node_type:"episode",ref_id:"6c6c782e-382c-44c3-9b0a-5c598ef73ddc",show_title:"Bitcoin Magazine"},{children:["3138e8b2-0b4d-4ddf-876c-b5448436273e","a659e54a-bb90-4f6c-9179-a9e05224c988"],episode_title:"#Bitcoin and Macro Jam Session 🎸🔥",guests:[],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/7c53ad3c-1ce2-4661-8896-4c40dcc23b4d.jpg",node_type:"episode",ref_id:"7bebf6d3-5f24-4988-9141-7ed42c826983",show_title:"Blockware Solutions"},{children:["04e7ce48-3c54-41ef-a7d5-59f923b85354"],episode_title:"PFP063 | Anthony Daniels (Theodore Dalrymple) | “Public Health” as a Lever for Tyranny (PFS 2010)",guests:[],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/624262ef-b30f-4114-8061-e310187e6bb4.jpg",node_type:"episode",ref_id:"de789489-56bc-4012-b7c3-9dc92a937161",show_title:"Property and Freedom Society"},{children:["300c09ff-ce2f-4b87-b3d8-cc7dd4d4f7d1","c5d2ef78-9d30-45ab-8d1a-edef9b356569","4369ba7b-c9c8-4bf8-906a-1d8e27b1558b"],episode_title:"PFP016 Remigijus Šimašius, Bullies as Neighbors-on the Foreign Policy of Small Countries (PFS 2008)",guests:[],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/624262ef-b30f-4114-8061-e310187e6bb4.jpg",node_type:"episode",ref_id:"62ca7c93-e509-438e-87b3-43400a320f8d",show_title:"Property and Freedom Society"},{children:["c11fe5dc-bed6-408f-ae1b-650580184f3e","fed2b741-e9a2-4858-bee8-faa259806d3e","70cd556c-8349-4f80-b276-4c0056b46536","0330ada0-fbc0-4f8f-a560-a6c059a72907","ee9d0400-3d38-46f6-9741-f99864e86ed4","c80659ad-87eb-488c-be5d-00ac386a2b15","83ce1420-66d3-41e6-b987-b35fe2cf019f"],episode_title:"#Bitcoin Creators Space",guests:[{name:"@DecouvreBitcoin",profile_picture:"https://pbs.twimg.com/profile_images/1362747604044566530/Invedmre_400x400.jpg",ref_id:"0eda190b-4373-41fc-bc28-c3b95af30949",twitter_handle:"DecouvreBitcoin"},{name:"@Bridge2Bitcoin",profile_picture:"https://pbs.twimg.com/profile_images/1533812215198924800/vAAlVRxO_400x400.jpg",ref_id:"1aaf2c24-8d26-4038-b55a-8b94427b20c7",twitter_handle:"Bridge2Bitcoin"},{name:"@orangepillapp",profile_picture:"https://pbs.twimg.com/profile_images/1570918965601505282/SOApRCif_400x400.jpg",ref_id:"ba5b79b4-e2e7-4778-8879-df793b8420a4",twitter_handle:"orangepillapp"},{name:"@knutsvanholm",profile_picture:"https://pbs.twimg.com/profile_images/1586261395833774081/RQ8SYxiM_400x400.jpg",ref_id:"e12ebe66-706b-40d2-804a-861a4c79bbfa",twitter_handle:"knutsvanholm"},{name:"@bcvFoundation",profile_picture:"https://pbs.twimg.com/profile_images/1460813196902633476/edbNgO7y_400x400.jpg",ref_id:"d65bc3c3-cdd7-4539-8cb9-6a8d86f580c8",twitter_handle:"bcvFoundation"},{name:"Christopher",profile_picture:"https://pbs.twimg.com/profile_images/1345072452775370754/cBVFzpkV_400x400.jpg",ref_id:"7dacb545-925d-4201-9b9c-869d992dcdb3",twitter_handle:"Chrissuccess"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/c9bb5d58-c781-464d-878a-8b6c469ba198.jpg",node_type:"episode",ref_id:"0992287c-f653-4032-b06c-e8d65e2536e7",show_title:"Geyser 🌊"},{children:["af7832e4-45e7-44e6-a91c-04652f9ce4fa","e96970d0-30a7-4f86-8f81-996ba87a088c","c7542511-7354-423c-b6e0-8c0349d5a511","946f1308-fffb-4aeb-89b2-68b043873ae2"],episode_title:"The Sovereign Individual - The End of Egalitarian Economics",guests:[{name:"chriskapilla",profile_picture:"https://pbs.twimg.com/profile_images/1362817539135463427/2AXUeFLV_400x400.jpg",ref_id:"9d495790-93f2-4d6c-b770-b2885f66859d",twitter_handle:"chriskapilla"},{name:"remydenton",profile_picture:"",ref_id:"5c5beb0c-c214-4f23-b79a-e71bf9368f2d",twitter_handle:""},{name:"JackRonaldi",profile_picture:"https://pbs.twimg.com/profile_images/1583261828628496384/IazkwYjk_400x400.jpg",ref_id:"01621476-f040-49dd-8160-4035228faf78",twitter_handle:"JackRonaldi"},{name:"AlistairZ80Aftw",profile_picture:"https://pbs.twimg.com/profile_images/1362882489895841795/gH2zix3l_400x400.jpg",ref_id:"3dcba197-47ca-40c0-857d-73cec4325801",twitter_handle:"AlistairZ80Aftw"},{name:"mattonbtc",profile_picture:"https://pbs.twimg.com/profile_images/1549459254280687618/jzdHJou3_400x400.jpg",ref_id:"998167d3-e036-4ef1-9a05-4f062903f0c5",twitter_handle:"mattonbtc"},{name:"wai_wairua",profile_picture:"https://pbs.twimg.com/profile_images/1536570699761848320/T10Owc60_400x400.jpg",ref_id:"c4d4ff36-73fa-4471-91ba-de0f99a49e99",twitter_handle:"wai_wairua"},{name:"UltraSolomon",profile_picture:"https://pbs.twimg.com/profile_images/1468332451055427601/YVgUuUHc_400x400.jpg",ref_id:"6371d519-cc98-4bf4-9f82-be17b1ea532a",twitter_handle:"UltraSolomon"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/75ec86b1-cb6d-467f-a66e-5e642e5c126a.jpg",node_type:"episode",ref_id:"79ea2957-1161-4729-aacb-1981d9237e22",show_title:"Bitcoin Venetians Book Club"},{children:["27290854-e30c-4f09-aee9-c6ee23a4854d","42296529-2820-4c4f-be26-e12104e2b723","d1295013-33f3-431f-99a0-baa6d83500ad","475acbce-5a5c-4881-a93d-7d41edf1ae84","34c231bc-7fcf-4f55-a124-d67b008399a0"],episode_title:"Securing Bitcoin With Nuclear Energy",guests:[{name:"Nuclear Bitcoiner",profile_picture:"https://pbs.twimg.com/profile_images/1443185278525579278/_Yl1nao1_400x400.jpg",ref_id:"60f5891f-0864-4ed4-987a-81da4768b3ba",twitter_handle:"nuclearbitcoinr"},{name:"Eric McErlain",profile_picture:"https://pbs.twimg.com/profile_images/1252969137/Screen_shot_2011-02-23_at_10.59.21_PM_400x400.png",ref_id:"4815365d-44d0-4b06-9d9e-32070158d03c",twitter_handle:"atomiceric"},{name:"Puru Goyal",profile_picture:"https://pbs.twimg.com/profile_images/1590742805613203456/QAtYq_C__400x400.jpg",ref_id:"c24af059-b38b-4ce5-9547-9192c9eff579",twitter_handle:"purugyl"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/ae91fac6-a1af-4877-9a92-e793d556ee66.jpg",node_type:"episode",ref_id:"c0dabc11-aced-4078-93be-bca753fc2b14",show_title:"Compass Mining"},{children:["d2273e47-dfdb-4847-8690-ef58fe22d5c0","8dbb367b-5cba-4f05-a1db-104d0c66b579","05fee350-6926-4873-885a-76fd23008692","198dfd3b-7d1b-422c-b118-48520629af43","3cb5fd13-1b10-4dc0-b8e3-f2fc0f1ec406"],episode_title:"The ASIC Mining Hardware Market",guests:[{name:"Vincent Zhang",profile_picture:"https://pbs.twimg.com/profile_images/1158285609196109825/fuB-e6lm_400x400.jpg",ref_id:"98e7bc98-3a3b-4ddf-9b48-5dcd78973739",twitter_handle:"Whatsminer_MBT"},{name:"Vincent Vuong",profile_picture:"https://pbs.twimg.com/profile_images/1260974518547312640/n47yvbNL_400x400.jpg",ref_id:"8390e230-e36b-4e0d-9f5d-70c6635bf3c2",twitter_handle:"BitcoinVincent"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/ae91fac6-a1af-4877-9a92-e793d556ee66.jpg",node_type:"episode",ref_id:"d2e9db27-864c-4ee5-a7ae-abcf895bda98",show_title:"Compass Mining"},{children:["330a0238-1acc-47fe-b809-48cc986a0b21","03c6b2f5-685e-4921-a230-e14e5679f792"],episode_title:"Understanding Miner Extractable Value On Ethereum",guests:[{name:"Nathan Worsley",profile_picture:"https://pbs.twimg.com/profile_images/1576238702908637186/xzcScTyV_400x400.jpg",ref_id:"20529242-4546-475a-af1a-125b83aedd81",twitter_handle:"NathanWorsley_"},{name:"Robert Miller",profile_picture:"https://pbs.twimg.com/profile_images/1595788538938695680/w6i5Q6s4_400x400.jpg",ref_id:"292cfadd-7e67-4e34-876b-99804d416e20",twitter_handle:"robertjmiller_"},{name:"Jordan Frankfurt",profile_picture:"https://pbs.twimg.com/profile_images/1544902585462788097/bGe0hNIi_400x400.png",ref_id:"149db25a-26b1-4f69-8c9e-ec87e08ab8c8",twitter_handle:"jordanfrankfurt"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/ae91fac6-a1af-4877-9a92-e793d556ee66.jpg",node_type:"episode",ref_id:"6e8c90dc-12fa-415d-bf33-f286a4c5d1b1",show_title:"Compass Mining"},{children:["fd20d403-6fec-401f-9503-d20e298912b6"],episode_title:"Meet the Makers: René & Koty",guests:[{name:"kotty Auditore",profile_picture:"https://pbs.twimg.com/profile_images/1608131189289746432/DP7GXDLw_400x400.jpg",ref_id:"8d04ee18-3cc1-4a73-8510-05e70dbdb661",twitter_handle:"koty_auditore"},{name:"Rene Aaron",profile_picture:"https://pbs.twimg.com/profile_images/1499715029834375172/g8uCieYv_400x400.jpg",ref_id:"0ed58288-3a54-46e4-8734-8a133ffcdbb3",twitter_handle:"_reneaaron"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/965489b4-a414-4fd0-ab8c-55911b1596aa.jpg",node_type:"episode",ref_id:"5c8bc8cf-4d41-4c71-8154-aafbd1ed20c1",show_title:"BOLT FUN"},{children:["2ff6b481-d06c-42e3-9ad5-9fa7a84dbd96","c9e0fbb2-302b-44c3-b69c-dfac38c97f98","7e996fc8-37c7-447f-b0e5-c6dbf58015fe","8019d172-6711-45bb-a305-bf773c9ae85d"],episode_title:"Meet the Makers: Alan & Kwinten",guests:[{name:"Alan Plus",profile_picture:"https://pbs.twimg.com/profile_images/1565235279451103233/XD8pJuIo_400x400.jpg",ref_id:"e362fed6-ec06-4d8a-a052-3137b24f213f",twitter_handle:"alnboltn"},{name:"Kwinten De Backe",profile_picture:"https://pbs.twimg.com/profile_images/917859380699320320/p_v-fjmh_400x400.jpg",ref_id:"be68f240-1f4c-4b27-b4bb-752c90cbe0c3",twitter_handle:"QuintenDeBacke1"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/965489b4-a414-4fd0-ab8c-55911b1596aa.jpg",node_type:"episode",ref_id:"f7310238-67ab-4a2d-8679-72f6511934be",show_title:"BOLT FUN"},{children:["caca294d-8661-49a2-80a9-32e4e8452c03","6d58ed61-0116-4ce8-b26e-bcfa9a32b7d5","abb2867c-0c1e-4cc2-8f60-35322740d3f2"],episode_title:"Meet the Makers: Konstantin & Arvin",guests:[{name:"Konstantin Wünscher",profile_picture:"https://pbs.twimg.com/profile_images/917464868663582720/PMFCqusG_400x400.jpg",ref_id:"5f027fce-7775-4824-b941-d2f4120d2d0f",twitter_handle:"krychtiukmd"},{name:"Arvin Galoy",profile_picture:"https://pbs.twimg.com/profile_images/1429792764464611329/4VQqlZiM_400x400.jpg",ref_id:"e0eb434a-9219-4c57-b9e4-da6ceeaec040",twitter_handle:"GaloyMoney"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/965489b4-a414-4fd0-ab8c-55911b1596aa.jpg",node_type:"episode",ref_id:"99f0ab76-b0f5-4947-8341-759b5dff5341",show_title:"BOLT FUN"},{children:["7ef24d02-66fe-4872-b1f1-ea144bfcaf5c","1b0f7188-cbe0-4fdc-ae0e-a5f3b8d6ea2c"],episode_title:"Meet the Makers: Anthony & Dolu",guests:[{name:"Anthony Potdevin",profile_picture:"https://pbs.twimg.com/profile_images/1252630766909079555/qf-qI5EZ_400x400.jpg",ref_id:"da0a9fdc-eda1-4e07-8341-2100428065d1",twitter_handle:"thunderhubio"},{name:"Dolu Zerologin",profile_picture:"https://pbs.twimg.com/profile_images/1577320325158682626/igGerO9A_400x400.jpg",ref_id:"4c228a2d-4f9c-4bbd-bf49-d2be3159c6a4",twitter_handle:"Dolu_Web"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/965489b4-a414-4fd0-ab8c-55911b1596aa.jpg",node_type:"episode",ref_id:"c775e780-43ca-46c6-b5ef-e65b0103ee61",show_title:"BOLT FUN"},{children:["b8945614-0c02-4427-8749-f760691a4bea","2656d145-191a-4e86-8261-04c88a9a6562","433eb4ba-ba64-468f-9e3c-130fbc948adf"],episode_title:"TOXIC HAPPY HOUR! #Bitcoin, Beer and Plebs! 🍻😂🤌🏻",guests:[{name:"Dr. Jeff Ross",profile_picture:"https://pbs.twimg.com/profile_images/1475554600094552064/DSlPG1lx_400x400.jpg",ref_id:"51a969bb-dbf7-4d20-b128-74dcc5f560f6",twitter_handle:"VailshireCap"},{name:"Tomer Strolight",profile_picture:"https://pbs.twimg.com/profile_images/1591960241008148481/HtyINxtU_400x400.jpg",ref_id:"3a2bc97d-072c-4ed9-9a59-17ceeb68fe99",twitter_handle:"TomerStrolight"},{name:"Laura Shin",profile_picture:"https://pbs.twimg.com/profile_images/1539462748173746176/hxR80FYT_400x400.png",ref_id:"a56a7b4d-edca-41d5-9d51-33396aa05b96",twitter_handle:"laurashin"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/2a1450bc-0649-4dc5-8ec9-1474af1ea1c3.jpg",node_type:"episode",ref_id:"54fa34c9-0729-42ab-92d5-e5f8289ed32a",show_title:"Anders_🍆"},{children:["d9edac8b-8349-4e52-b61e-a22ef687f4f3"],episode_title:"#Bitcoin Self Custody Q&A Episode 15",guests:[{name:"@ToxiKat27",profile_picture:"https://pbs.twimg.com/profile_images/1505791887415730177/d0YDQ3Xc_400x400.jpg",ref_id:"29e1a1c3-1dbe-4ab2-955d-8a7a7476996b",twitter_handle:"ToxiKat27"},{name:"@Lil_WhiTe_Boi19",profile_picture:"https://pbs.twimg.com/profile_images/1594796869233811474/g0_ZRshz_400x400.png",ref_id:"c737d37a-be78-4bd1-823a-04d569aefcfe",twitter_handle:"w_s_bitcoin"},{name:"@Tarek_Z_Saad",profile_picture:"https://pbs.twimg.com/profile_images/1598082570931130374/aiUPJ1HC_400x400.jpg",ref_id:"16091cbf-d110-4299-af6e-84ecd0429d59",twitter_handle:"Tarek_Z_Saad"},{name:"@BeyondBlu3",profile_picture:"https://pbs.twimg.com/profile_images/1577513247107842050/JCDgPikZ_400x400.jpg",ref_id:"0be89e9a-6e96-4241-8ee8-cdebf9b134b1",twitter_handle:"BeyondBlu3"},{name:"@life2_one",profile_picture:"",ref_id:"d2a45191-e863-4e56-8a05-08afdff7f421",twitter_handle:""},{name:"@KahnsMichel",profile_picture:"",ref_id:"937fcaa9-4b73-4fbe-ada4-b40720644a1d",twitter_handle:"kahnsmichel"},{name:"@Jimmy14624",profile_picture:"https://pbs.twimg.com/profile_images/1594796869233811474/g0_ZRshz_400x400.png",ref_id:"73c17ab8-ce99-4c87-ba45-3334c255c97b",twitter_handle:"w_s_bitcoin"},{name:"@SovereignHRZN",profile_picture:"https://pbs.twimg.com/profile_images/1604168916300873731/mLszGVm6_400x400.jpg",ref_id:"2811a110-d1cc-4a2d-bead-59b4e1805817",twitter_handle:"SovereignHRZN"},{name:"@XpatSantiago",profile_picture:"https://pbs.twimg.com/profile_images/1599096281493778433/qeSvcIuj_400x400.jpg",ref_id:"bca4859c-3c8b-42c2-a0ee-86eb581f4078",twitter_handle:"XpatSantiago"},{name:"@MrHodl",profile_picture:"https://pbs.twimg.com/profile_images/1570497262735728640/q5ZDJFKz_400x400.jpg",ref_id:"8abfce7f-a49d-49f9-8bab-6861e41910d5",twitter_handle:"MrHodl"},{name:"@bankhatin",profile_picture:"https://pbs.twimg.com/profile_images/1596672372744019969/prxTKz_7_400x400.jpg",ref_id:"c4af2875-19ec-4439-85da-4ff34ae397fe",twitter_handle:"bankhatin"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/4127f08c-505a-4a7d-935f-e93e87204089.jpg",node_type:"episode",ref_id:"258c5ca5-52a6-4ce3-9994-e629263123d8",show_title:"Wicked Smart Bitcoin ∞/21M"},{children:["41015fe4-63fd-46d7-8dde-f065457f2af6"],episode_title:"#Bitcoin solutions for Emerging Economies",guests:[{name:"@RSK",profile_picture:"https://pbs.twimg.com/profile_images/1592915327343624195/HPPSuVx3_400x400.jpg",ref_id:"b326a250-3fc1-46da-a64c-2659a4de0e3a",twitter_handle:"RSKsmart"},{name:"Femi Longe",profile_picture:"https://pbs.twimg.com/profile_images/1547047357371797504/avnHBa2W_400x400.jpg",ref_id:"7a5a41f1-6d1e-46c9-b97f-20ae03eafdd1",twitter_handle:"TheArtOfTomas"},{name:"@Alexandria The Great",profile_picture:"https://pbs.twimg.com/profile_images/1575525599493427203/XubWEoDX_400x400.jpg",ref_id:"1c95e8b2-3a98-46ce-933f-ef9f50c518c5",twitter_handle:"alesander97"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/b2dd8be4-74b5-47b2-b470-e568657f3a0d.jpg",node_type:"episode",ref_id:"08c3748a-a85d-4d4f-a702-1fc3f1c46f33",show_title:"Art of Tomas"},{children:["d013b6c4-0962-464c-96e8-4070946d99a5","fff2f38f-b219-4c96-bf6c-c8b7b48d55af","47586bfe-8c83-4281-96b8-c9e0dc0a3ba3"],episode_title:"Episode 112: Mental Health And Metabolism: Autism, Depression And Your Small Intestine",guests:[],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/e8ad867b-9cbe-4126-9f37-313b4d2329a5.jpg",node_type:"episode",ref_id:"d862511e-6330-48b3-9d4a-44e8f754f0a5",show_title:"Dr Karl Goldkamp - Keto Naturopath"},{children:["3ff527f0-04a4-4bb5-9279-87f48ac98da0","baa7169a-4b3a-462c-bcb5-03a34d1a41f1"],episode_title:"Bitcoin Backed Stablecoin’s",guests:[{name:"Andrew Begin",profile_picture:"https://pbs.twimg.com/profile_images/1461826323102449665/spEoEcpR_400x400.jpg",ref_id:"28db7b9d-1c71-4981-8044-baf001e58b94",twitter_handle:"agbegin"},{name:"Yago",profile_picture:"https://pbs.twimg.com/profile_images/1369335486456684546/AIJdrQ5l_400x400.jpg",ref_id:"0819a9d1-c085-42d5-8b3b-bc3ce79ff1ea",twitter_handle:"EdanYago"},{name:"Sovereign Horizon",profile_picture:"https://pbs.twimg.com/profile_images/1604168916300873731/mLszGVm6_400x400.jpg",ref_id:"6c159904-fe63-437e-91b5-5c444bbd11fa",twitter_handle:"SovereignHRZN"},{name:"Art of Thomas",profile_picture:"https://pbs.twimg.com/profile_images/1547047357371797504/avnHBa2W_400x400.jpg",ref_id:"2c312138-9a5f-4a75-9c19-513d5703d5ce",twitter_handle:"TheArtOfTomas"},{name:"Maximiliano Carjuzaa",profile_picture:"https://pbs.twimg.com/profile_images/1566622024662917120/B6uyn9QR_400x400.jpg",ref_id:"a5273c83-28f1-4df3-b8c6-d3b081f55b31",twitter_handle:"maxcarjuzaa"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/046c6869-0627-4825-8ecf-45ff0aed97b6.jpg",node_type:"episode",ref_id:"21d1d401-626c-4ec2-ba30-3c08f08ec3ea",show_title:"Alexandria The Great 🌋⛏🇿🇼"},{children:["896a10a9-621e-4f5e-a8d7-d4504dffd923"],episode_title:"Reverse Proxy - #Bitcoin Nodes - NGINX is the Answer!🦾",guests:[{name:"Pedro",profile_picture:"https://pbs.twimg.com/profile_images/1395874649876140035/z-IycTAj_400x400.jpg",ref_id:"78acd8b7-3097-40c3-b626-245bc911dc49",twitter_handle:"pedromvpg"},{name:"Machankura",profile_picture:"https://pbs.twimg.com/profile_images/1536075376409059331/0zddZFmE_400x400.jpg",ref_id:"855f2d8f-2230-475d-b5c1-dcaace579de4",twitter_handle:"Machankura8333"},{name:"DJ Satoshi",profile_picture:"https://pbs.twimg.com/profile_images/915987644043030528/5nh3JQSz_400x400.jpg",ref_id:"02ae35cb-3728-441f-84c5-a8db5d9150b4",twitter_handle:"satoshi__tomiie"},{name:"Portland.HODL",profile_picture:"https://pbs.twimg.com/profile_images/1562306406526492672/LiqmI9NS_400x400.jpg",ref_id:"aaa58ce5-7907-4c3a-9881-839cd012c456",twitter_handle:"PortlandHODL"},{name:"anonsats",profile_picture:"https://pbs.twimg.com/profile_images/1601204123818401792/iQ85pwvS_400x400.jpg",ref_id:"f3bf3677-9864-4fe3-a8b0-976a67be45cd",twitter_handle:"anonsats"},{name:"₿rettInThe13%",profile_picture:"https://pbs.twimg.com/profile_images/1593104719311929345/tTSjoS2n_400x400.jpg",ref_id:"0ad02828-02ee-465b-87c6-96e559905ed8",twitter_handle:"brettinthewoods"},{name:"EasySats",profile_picture:"https://pbs.twimg.com/profile_images/1593330030905540618/ZHqVPhTM_400x400.jpg",ref_id:"d6d16cf5-4a9b-4517-897d-5cf98467ed1a",twitter_handle:"EasySats_"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/30180c4d-27f9-4215-81e0-6a22b16aba43.jpg",node_type:"episode",ref_id:"18e340ea-90ef-4200-a19d-dc82e1e18e21",show_title:"okin@8333.mobi ⚡️ 🏰"},{children:["a3fe7197-5948-404f-a8b0-f04bb130db27","3cced3da-246a-4df7-884c-689661de7d66","3008a0a4-d3c8-4d33-aa67-f39e4ce1a87c","09e8e827-fd7b-4800-8633-9f4fe7416210"],episode_title:"Bear Market Buidl — Major #Bitcoin developments! #Stacks #Sidechains",guests:[{name:"@GriffdenNFT",profile_picture:"https://pbs.twimg.com/profile_images/1604377729062895617/R4pSEdH4_400x400.png",ref_id:"dafdf7ec-28c0-43d3-a0d9-b2d266f38738",twitter_handle:"GriffdenNFT"},{name:"@Chad_333",profile_picture:"https://pbs.twimg.com/profile_images/1592310541732970496/o1tbw9Eo_400x400.jpg",ref_id:"484c7695-6a4e-4141-9585-1109bf23f8cf",twitter_handle:"Chad_333"},{name:"@jackbinswitch",profile_picture:"https://pbs.twimg.com/profile_images/1601214177439260672/O0SpU5B1_400x400.jpg",ref_id:"9685e7f3-3e0c-4b84-9fd9-b8a1d96f6ae9",twitter_handle:"jackbinswitch"},{name:"@jimdotbtc",profile_picture:"https://pbs.twimg.com/profile_images/1593210347825119237/L_SNThWQ_400x400.png",ref_id:"5dcf5545-fad6-44ee-ae56-360c5efe1151",twitter_handle:"jimdotbtc"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/99046513-2614-4eae-9de4-5781ba4b330a.jpg",node_type:"episode",ref_id:"9f12b8c2-175e-4078-9871-99a2edf2e0f3",show_title:"STX:LDN"},{children:["f66a9f05-a885-44f3-9673-f910c78d6360"],episode_title:"Rabbit Hole Recap #230: Building in the Bear Party Rip",guests:[{name:"Jason",profile_picture:"https://pbs.twimg.com/profile_images/1458137423716622342/ctyc_MTX_400x400.jpg",ref_id:"ca893631-4be5-42c4-bff1-92cc2f6e43fe",twitter_handle:"JasonWrich"},{name:" Texas Slim",profile_picture:"https://pbs.twimg.com/profile_images/1589784780970795011/02jf0fqp_400x400.jpg",ref_id:"add0c8be-0524-43e1-a3a3-aea1058057d4",twitter_handle:"modernTman"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/da64b29e-c2c0-41a6-ba29-acbaa2d022e8.jpg",node_type:"episode",ref_id:"03b5ca12-0aeb-4f04-aed0-746681d93b56",show_title:"Rabbit Hole Recap"},{children:["ccc45d70-f16e-498f-9f66-12cf8a221337"],episode_title:"UFC @NicolauMatheus - @LuPinheiroMMA - Fighting for #bitcoin! #296",guests:[{name:"Matheus Nicolau",profile_picture:"https://pbs.twimg.com/profile_images/1600020909946912768/LlhR_2HX_400x400.jpg",ref_id:"be94e55e-4b46-4b37-92bb-431496b067de",twitter_handle:"NicolauMatheus"},{name:"Luana Pinheiro",profile_picture:"https://pbs.twimg.com/profile_images/1461887787406221317/EFrMNheP_400x400.jpg",ref_id:"219d8df1-3a60-41ff-8aa4-d08992f49148",twitter_handle:"LuPinheiroMMA"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/e1eca67b-d372-4031-bf1f-8f0ff7fe6092.jpg",node_type:"episode",ref_id:"70bb863d-7226-4b9e-b13e-673f94a3eb86",show_title:`Once Bitten! + &.no-scroll { + overflow: hidden; + } + } + blockquote, q { + quotes: none; + } + blockquote:before, blockquote:after, + q:before, q:after { + content: ''; + content: none; + } + table { + border-collapse: collapse; + border-spacing: 0; + } +` + var constants$1 = { exports: {} }, + reactReconcilerConstants_production_min = {} + /** + * @license React + * react-reconciler-constants.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ reactReconcilerConstants_production_min.ConcurrentRoot = 1 + reactReconcilerConstants_production_min.ContinuousEventPriority = 4 + reactReconcilerConstants_production_min.DefaultEventPriority = 16 + reactReconcilerConstants_production_min.DiscreteEventPriority = 1 + reactReconcilerConstants_production_min.IdleEventPriority = 536870912 + reactReconcilerConstants_production_min.LegacyRoot = 0 + constants$1.exports = reactReconcilerConstants_production_min + var constantsExports = constants$1.exports + function createStore$2(tt) { + let et + const nt = new Set(), + rt = (ct, ut) => { + const ht = typeof ct == 'function' ? ct(et) : ct + if (ht !== et) { + const dt = et + ;(et = ut ? ht : Object.assign({}, et, ht)), nt.forEach((pt) => pt(et, dt)) + } + }, + it = () => et, + ot = (ct, ut = it, ht = Object.is) => { + console.warn('[DEPRECATED] Please use `subscribeWithSelector` middleware') + let dt = ut(et) + function pt() { + const mt = ut(et) + if (!ht(dt, mt)) { + const gt = dt + ct((dt = mt), gt) + } + } + return nt.add(pt), () => nt.delete(pt) + }, + lt = { + setState: rt, + getState: it, + subscribe: (ct, ut, ht) => (ut || ht ? ot(ct, ut, ht) : (nt.add(ct), () => nt.delete(ct))), + destroy: () => nt.clear(), + } + return (et = tt(rt, it, lt)), lt + } + const isSSR$2 = + typeof window > 'u' || !window.navigator || /ServerSideRendering|^Deno\//.test(window.navigator.userAgent), + useIsomorphicLayoutEffect$2 = isSSR$2 ? reactExports.useEffect : reactExports.useLayoutEffect + function create$2(tt) { + const et = typeof tt == 'function' ? createStore$2(tt) : tt, + nt = (rt = et.getState, it = Object.is) => { + const [, ot] = reactExports.useReducer((yt) => yt + 1, 0), + at = et.getState(), + st = reactExports.useRef(at), + lt = reactExports.useRef(rt), + ct = reactExports.useRef(it), + ut = reactExports.useRef(!1), + ht = reactExports.useRef() + ht.current === void 0 && (ht.current = rt(at)) + let dt, + pt = !1 + ;(st.current !== at || lt.current !== rt || ct.current !== it || ut.current) && + ((dt = rt(at)), (pt = !it(ht.current, dt))), + useIsomorphicLayoutEffect$2(() => { + pt && (ht.current = dt), (st.current = at), (lt.current = rt), (ct.current = it), (ut.current = !1) + }) + const mt = reactExports.useRef(at) + useIsomorphicLayoutEffect$2(() => { + const yt = () => { + try { + const vt = et.getState(), + xt = lt.current(vt) + ct.current(ht.current, xt) || ((st.current = vt), (ht.current = xt), ot()) + } catch { + ;(ut.current = !0), ot() + } + }, + bt = et.subscribe(yt) + return et.getState() !== mt.current && yt(), bt + }, []) + const gt = pt ? dt : ht.current + return reactExports.useDebugValue(gt), gt + } + return ( + Object.assign(nt, et), + (nt[Symbol.iterator] = function () { + console.warn('[useStore, api] = create() is deprecated and will be removed in v4') + const rt = [nt, et] + return { + next() { + const it = rt.length <= 0 + return { value: rt.shift(), done: it } + }, + } + }), + nt + ) + } + var reactReconciler = { exports: {} }, + scheduler = { exports: {} }, + scheduler_production_min = {} + /** + * @license React + * scheduler.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ ;(function (tt) { + function et(zt, Ft) { + var Nt = zt.length + zt.push(Ft) + e: for (; 0 < Nt; ) { + var Ut = (Nt - 1) >>> 1, + Mt = zt[Ut] + if (0 < it(Mt, Ft)) (zt[Ut] = Ft), (zt[Nt] = Mt), (Nt = Ut) + else break e + } + } + function nt(zt) { + return zt.length === 0 ? null : zt[0] + } + function rt(zt) { + if (zt.length === 0) return null + var Ft = zt[0], + Nt = zt.pop() + if (Nt !== Ft) { + zt[0] = Nt + e: for (var Ut = 0, Mt = zt.length, Ht = Mt >>> 1; Ut < Ht; ) { + var en = 2 * (Ut + 1) - 1, + sn = zt[en], + Kt = en + 1, + rn = zt[Kt] + if (0 > it(sn, Nt)) + Kt < Mt && 0 > it(rn, sn) + ? ((zt[Ut] = rn), (zt[Kt] = Nt), (Ut = Kt)) + : ((zt[Ut] = sn), (zt[en] = Nt), (Ut = en)) + else if (Kt < Mt && 0 > it(rn, Nt)) (zt[Ut] = rn), (zt[Kt] = Nt), (Ut = Kt) + else break e + } + } + return Ft + } + function it(zt, Ft) { + var Nt = zt.sortIndex - Ft.sortIndex + return Nt !== 0 ? Nt : zt.id - Ft.id + } + if (typeof performance == 'object' && typeof performance.now == 'function') { + var ot = performance + tt.unstable_now = function () { + return ot.now() + } + } else { + var at = Date, + st = at.now() + tt.unstable_now = function () { + return at.now() - st + } + } + var lt = [], + ct = [], + ut = 1, + ht = null, + dt = 3, + pt = !1, + mt = !1, + gt = !1, + yt = typeof setTimeout == 'function' ? setTimeout : null, + bt = typeof clearTimeout == 'function' ? clearTimeout : null, + vt = typeof setImmediate < 'u' ? setImmediate : null + typeof navigator < 'u' && + navigator.scheduling !== void 0 && + navigator.scheduling.isInputPending !== void 0 && + navigator.scheduling.isInputPending.bind(navigator.scheduling) + function xt(zt) { + for (var Ft = nt(ct); Ft !== null; ) { + if (Ft.callback === null) rt(ct) + else if (Ft.startTime <= zt) rt(ct), (Ft.sortIndex = Ft.expirationTime), et(lt, Ft) + else break + Ft = nt(ct) + } + } + function kt(zt) { + if (((gt = !1), xt(zt), !mt)) + if (nt(lt) !== null) (mt = !0), Ot(St) + else { + var Ft = nt(ct) + Ft !== null && Wt(kt, Ft.startTime - zt) + } + } + function St(zt, Ft) { + ;(mt = !1), gt && ((gt = !1), bt(Et), (Et = -1)), (pt = !0) + var Nt = dt + try { + for (xt(Ft), ht = nt(lt); ht !== null && (!(ht.expirationTime > Ft) || (zt && !jt())); ) { + var Ut = ht.callback + if (typeof Ut == 'function') { + ;(ht.callback = null), (dt = ht.priorityLevel) + var Mt = Ut(ht.expirationTime <= Ft) + ;(Ft = tt.unstable_now()), typeof Mt == 'function' ? (ht.callback = Mt) : ht === nt(lt) && rt(lt), xt(Ft) + } else rt(lt) + ht = nt(lt) + } + if (ht !== null) var Ht = !0 + else { + var en = nt(ct) + en !== null && Wt(kt, en.startTime - Ft), (Ht = !1) + } + return Ht + } finally { + ;(ht = null), (dt = Nt), (pt = !1) + } + } + var Tt = !1, + At = null, + Et = -1, + $t = 5, + Dt = -1 + function jt() { + return !(tt.unstable_now() - Dt < $t) + } + function Pt() { + if (At !== null) { + var zt = tt.unstable_now() + Dt = zt + var Ft = !0 + try { + Ft = At(!0, zt) + } finally { + Ft ? Ct() : ((Tt = !1), (At = null)) + } + } else Tt = !1 + } + var Ct + if (typeof vt == 'function') + Ct = function () { + vt(Pt) + } + else if (typeof MessageChannel < 'u') { + var wt = new MessageChannel(), + It = wt.port2 + ;(wt.port1.onmessage = Pt), + (Ct = function () { + It.postMessage(null) + }) + } else + Ct = function () { + yt(Pt, 0) + } + function Ot(zt) { + ;(At = zt), Tt || ((Tt = !0), Ct()) + } + function Wt(zt, Ft) { + Et = yt(function () { + zt(tt.unstable_now()) + }, Ft) + } + ;(tt.unstable_IdlePriority = 5), + (tt.unstable_ImmediatePriority = 1), + (tt.unstable_LowPriority = 4), + (tt.unstable_NormalPriority = 3), + (tt.unstable_Profiling = null), + (tt.unstable_UserBlockingPriority = 2), + (tt.unstable_cancelCallback = function (zt) { + zt.callback = null + }), + (tt.unstable_continueExecution = function () { + mt || pt || ((mt = !0), Ot(St)) + }), + (tt.unstable_forceFrameRate = function (zt) { + 0 > zt || 125 < zt + ? console.error( + 'forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported', + ) + : ($t = 0 < zt ? Math.floor(1e3 / zt) : 5) + }), + (tt.unstable_getCurrentPriorityLevel = function () { + return dt + }), + (tt.unstable_getFirstCallbackNode = function () { + return nt(lt) + }), + (tt.unstable_next = function (zt) { + switch (dt) { + case 1: + case 2: + case 3: + var Ft = 3 + break + default: + Ft = dt + } + var Nt = dt + dt = Ft + try { + return zt() + } finally { + dt = Nt + } + }), + (tt.unstable_pauseExecution = function () {}), + (tt.unstable_requestPaint = function () {}), + (tt.unstable_runWithPriority = function (zt, Ft) { + switch (zt) { + case 1: + case 2: + case 3: + case 4: + case 5: + break + default: + zt = 3 + } + var Nt = dt + dt = zt + try { + return Ft() + } finally { + dt = Nt + } + }), + (tt.unstable_scheduleCallback = function (zt, Ft, Nt) { + var Ut = tt.unstable_now() + switch ( + (typeof Nt == 'object' && Nt !== null + ? ((Nt = Nt.delay), (Nt = typeof Nt == 'number' && 0 < Nt ? Ut + Nt : Ut)) + : (Nt = Ut), + zt) + ) { + case 1: + var Mt = -1 + break + case 2: + Mt = 250 + break + case 5: + Mt = 1073741823 + break + case 4: + Mt = 1e4 + break + default: + Mt = 5e3 + } + return ( + (Mt = Nt + Mt), + (zt = { id: ut++, callback: Ft, priorityLevel: zt, startTime: Nt, expirationTime: Mt, sortIndex: -1 }), + Nt > Ut + ? ((zt.sortIndex = Nt), + et(ct, zt), + nt(lt) === null && zt === nt(ct) && (gt ? (bt(Et), (Et = -1)) : (gt = !0), Wt(kt, Nt - Ut))) + : ((zt.sortIndex = Mt), et(lt, zt), mt || pt || ((mt = !0), Ot(St))), + zt + ) + }), + (tt.unstable_shouldYield = jt), + (tt.unstable_wrapCallback = function (zt) { + var Ft = dt + return function () { + var Nt = dt + dt = Ft + try { + return zt.apply(this, arguments) + } finally { + dt = Nt + } + } + }) + })(scheduler_production_min) + scheduler.exports = scheduler_production_min + var schedulerExports = scheduler.exports + /** + * @license React + * react-reconciler.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ var reactReconciler_production_min = function (et) { + var nt = {}, + rt = reactExports, + it = schedulerExports, + ot = Object.assign + function at(Bt) { + for (var Lt = 'https://reactjs.org/docs/error-decoder.html?invariant=' + Bt, Gt = 1; Gt < arguments.length; Gt++) + Lt += '&args[]=' + encodeURIComponent(arguments[Gt]) + return ( + 'Minified React error #' + + Bt + + '; visit ' + + Lt + + ' for the full message or use the non-minified dev environment for full errors and additional helpful warnings.' + ) + } + var st = rt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED, + lt = Symbol.for('react.element'), + ct = Symbol.for('react.portal'), + ut = Symbol.for('react.fragment'), + ht = Symbol.for('react.strict_mode'), + dt = Symbol.for('react.profiler'), + pt = Symbol.for('react.provider'), + mt = Symbol.for('react.context'), + gt = Symbol.for('react.forward_ref'), + yt = Symbol.for('react.suspense'), + bt = Symbol.for('react.suspense_list'), + vt = Symbol.for('react.memo'), + xt = Symbol.for('react.lazy'), + kt = Symbol.for('react.offscreen'), + St = Symbol.iterator + function Tt(Bt) { + return Bt === null || typeof Bt != 'object' + ? null + : ((Bt = (St && Bt[St]) || Bt['@@iterator']), typeof Bt == 'function' ? Bt : null) + } + function At(Bt) { + if (Bt == null) return null + if (typeof Bt == 'function') return Bt.displayName || Bt.name || null + if (typeof Bt == 'string') return Bt + switch (Bt) { + case ut: + return 'Fragment' + case ct: + return 'Portal' + case dt: + return 'Profiler' + case ht: + return 'StrictMode' + case yt: + return 'Suspense' + case bt: + return 'SuspenseList' + } + if (typeof Bt == 'object') + switch (Bt.$$typeof) { + case mt: + return (Bt.displayName || 'Context') + '.Consumer' + case pt: + return (Bt._context.displayName || 'Context') + '.Provider' + case gt: + var Lt = Bt.render + return ( + (Bt = Bt.displayName), + Bt || + ((Bt = Lt.displayName || Lt.name || ''), (Bt = Bt !== '' ? 'ForwardRef(' + Bt + ')' : 'ForwardRef')), + Bt + ) + case vt: + return (Lt = Bt.displayName || null), Lt !== null ? Lt : At(Bt.type) || 'Memo' + case xt: + ;(Lt = Bt._payload), (Bt = Bt._init) + try { + return At(Bt(Lt)) + } catch {} + } + return null + } + function Et(Bt) { + var Lt = Bt.type + switch (Bt.tag) { + case 24: + return 'Cache' + case 9: + return (Lt.displayName || 'Context') + '.Consumer' + case 10: + return (Lt._context.displayName || 'Context') + '.Provider' + case 18: + return 'DehydratedFragment' + case 11: + return ( + (Bt = Lt.render), + (Bt = Bt.displayName || Bt.name || ''), + Lt.displayName || (Bt !== '' ? 'ForwardRef(' + Bt + ')' : 'ForwardRef') + ) + case 7: + return 'Fragment' + case 5: + return Lt + case 4: + return 'Portal' + case 3: + return 'Root' + case 6: + return 'Text' + case 16: + return At(Lt) + case 8: + return Lt === ht ? 'StrictMode' : 'Mode' + case 22: + return 'Offscreen' + case 12: + return 'Profiler' + case 21: + return 'Scope' + case 13: + return 'Suspense' + case 19: + return 'SuspenseList' + case 25: + return 'TracingMarker' + case 1: + case 0: + case 17: + case 2: + case 14: + case 15: + if (typeof Lt == 'function') return Lt.displayName || Lt.name || null + if (typeof Lt == 'string') return Lt + } + return null + } + function $t(Bt) { + var Lt = Bt, + Gt = Bt + if (Bt.alternate) for (; Lt.return; ) Lt = Lt.return + else { + Bt = Lt + do (Lt = Bt), Lt.flags & 4098 && (Gt = Lt.return), (Bt = Lt.return) + while (Bt) + } + return Lt.tag === 3 ? Gt : null + } + function Dt(Bt) { + if ($t(Bt) !== Bt) throw Error(at(188)) + } + function jt(Bt) { + var Lt = Bt.alternate + if (!Lt) { + if (((Lt = $t(Bt)), Lt === null)) throw Error(at(188)) + return Lt !== Bt ? null : Bt + } + for (var Gt = Bt, tn = Lt; ; ) { + var gn = Gt.return + if (gn === null) break + var Cn = gn.alternate + if (Cn === null) { + if (((tn = gn.return), tn !== null)) { + Gt = tn + continue + } + break + } + if (gn.child === Cn.child) { + for (Cn = gn.child; Cn; ) { + if (Cn === Gt) return Dt(gn), Bt + if (Cn === tn) return Dt(gn), Lt + Cn = Cn.sibling + } + throw Error(at(188)) + } + if (Gt.return !== tn.return) (Gt = gn), (tn = Cn) + else { + for (var Gn = !1, rr = gn.child; rr; ) { + if (rr === Gt) { + ;(Gn = !0), (Gt = gn), (tn = Cn) + break + } + if (rr === tn) { + ;(Gn = !0), (tn = gn), (Gt = Cn) + break + } + rr = rr.sibling + } + if (!Gn) { + for (rr = Cn.child; rr; ) { + if (rr === Gt) { + ;(Gn = !0), (Gt = Cn), (tn = gn) + break + } + if (rr === tn) { + ;(Gn = !0), (tn = Cn), (Gt = gn) + break + } + rr = rr.sibling + } + if (!Gn) throw Error(at(189)) + } + } + if (Gt.alternate !== tn) throw Error(at(190)) + } + if (Gt.tag !== 3) throw Error(at(188)) + return Gt.stateNode.current === Gt ? Bt : Lt + } + function Pt(Bt) { + return (Bt = jt(Bt)), Bt !== null ? Ct(Bt) : null + } + function Ct(Bt) { + if (Bt.tag === 5 || Bt.tag === 6) return Bt + for (Bt = Bt.child; Bt !== null; ) { + var Lt = Ct(Bt) + if (Lt !== null) return Lt + Bt = Bt.sibling + } + return null + } + function wt(Bt) { + if (Bt.tag === 5 || Bt.tag === 6) return Bt + for (Bt = Bt.child; Bt !== null; ) { + if (Bt.tag !== 4) { + var Lt = wt(Bt) + if (Lt !== null) return Lt + } + Bt = Bt.sibling + } + return null + } + var It = Array.isArray, + Ot = et.getPublicInstance, + Wt = et.getRootHostContext, + zt = et.getChildHostContext, + Ft = et.prepareForCommit, + Nt = et.resetAfterCommit, + Ut = et.createInstance, + Mt = et.appendInitialChild, + Ht = et.finalizeInitialChildren, + en = et.prepareUpdate, + sn = et.shouldSetTextContent, + Kt = et.createTextInstance, + rn = et.scheduleTimeout, + nn = et.cancelTimeout, + hn = et.noTimeout, + vn = et.isPrimaryRenderer, + an = et.supportsMutation, + Qt = et.supportsPersistence, + _n = et.supportsHydration, + Pn = et.getInstanceFromNode, + $n = et.preparePortalMount, + Nn = et.getCurrentEventPriority, + Tn = et.detachDeletedInstance, + cn = et.supportsMicrotasks, + mn = et.scheduleMicrotask, + In = et.supportsTestSelectors, + An = et.findFiberRoot, + wn = et.getBoundingRect, + fn = et.getTextContent, + pn = et.isHiddenSubtree, + kn = et.matchAccessibilityRole, + Dn = et.setFocusIfFocusable, + un = et.setupIntersectionObserver, + Zt = et.appendChild, + Xt = et.appendChildToContainer, + Sn = et.commitTextUpdate, + Rn = et.commitMount, + jn = et.commitUpdate, + On = et.insertBefore, + Zn = et.insertInContainerBefore, + Vn = et.removeChild, + qn = et.removeChildFromContainer, + zn = et.resetTextContent, + Jn = et.hideInstance, + Hn = et.hideTextInstance, + pr = et.unhideInstance, + fr = et.unhideTextInstance, + xr = et.clearContainer, + io = et.cloneInstance, + Tr = et.createContainerChildSet, + Ar = et.appendChildToContainerChildSet, + qr = et.finalizeContainerChildren, + jr = et.replaceContainerChildren, + Fr = et.cloneHiddenInstance, + ao = et.cloneHiddenTextInstance, + Yr = et.canHydrateInstance, + Dr = et.canHydrateTextInstance, + go = et.canHydrateSuspenseInstance, + xn = et.isSuspenseInstancePending, + Mn = et.isSuspenseInstanceFallback, + dn = et.registerSuspenseInstanceRetry, + Jt = et.getNextHydratableSibling, + En = et.getFirstHydratableChild, + Ln = et.getFirstHydratableChildWithinContainer, + Un = et.getFirstHydratableChildWithinSuspenseInstance, + Kn = et.hydrateInstance, + nr = et.hydrateTextInstance, + lr = et.hydrateSuspenseInstance, + cr = et.getNextHydratableInstanceAfterSuspenseInstance, + Hr = et.commitHydratedContainer, + vr = et.commitHydratedSuspenseInstance, + Nr = et.clearSuspenseBoundary, + Gr = et.clearSuspenseBoundaryFromContainer, + eo = et.shouldDeleteUnhydratedTailInstances, + Zr = et.didNotMatchHydratedContainerTextInstance, + Jr = et.didNotMatchHydratedTextInstance, + wr + function Mr(Bt) { + if (wr === void 0) + try { + throw Error() + } catch (Gt) { + var Lt = Gt.stack.trim().match(/\n( *(at )?)/) + wr = (Lt && Lt[1]) || '' + } + return ( + ` +` + + wr + + Bt + ) + } + var Ur = !1 + function Rr(Bt, Lt) { + if (!Bt || Ur) return '' + Ur = !0 + var Gt = Error.prepareStackTrace + Error.prepareStackTrace = void 0 + try { + if (Lt) + if ( + ((Lt = function () { + throw Error() + }), + Object.defineProperty(Lt.prototype, 'props', { + set: function () { + throw Error() + }, + }), + typeof Reflect == 'object' && Reflect.construct) + ) { + try { + Reflect.construct(Lt, []) + } catch (Vr) { + var tn = Vr + } + Reflect.construct(Bt, [], Lt) + } else { + try { + Lt.call() + } catch (Vr) { + tn = Vr + } + Bt.call(Lt.prototype) + } + else { + try { + throw Error() + } catch (Vr) { + tn = Vr + } + Bt() + } + } catch (Vr) { + if (Vr && tn && typeof Vr.stack == 'string') { + for ( + var gn = Vr.stack.split(` +`), + Cn = tn.stack.split(` +`), + Gn = gn.length - 1, + rr = Cn.length - 1; + 1 <= Gn && 0 <= rr && gn[Gn] !== Cn[rr]; -A Bitcoin Podcast. -`},{children:["e8539d75-fa8f-494a-bace-cf2e9997ba6c","ba64a3e2-dd25-459b-8968-154f986c42f8","58d095b5-4c46-4586-888c-8b56a9afd883","39b8ddc0-5c0b-4fd0-9d71-6fee6f556a98","50e012ee-2ed3-4fbe-9703-2b4b2695f5ef","313705da-96e5-4cd4-aee7-48ca03a80b42","a1ba314f-1a9e-432e-9350-d3b085c5c4d6"],episode_title:"@NuclearBitcoinr - Mining #bitcoin With Small Modular Nuclear Reactors. #313",guests:[{name:"Nuclear Bitcoiner",profile_picture:"https://pbs.twimg.com/profile_images/1443185278525579278/_Yl1nao1_400x400.jpg",ref_id:"60f5891f-0864-4ed4-987a-81da4768b3ba",twitter_handle:"nuclearbitcoinr"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/e1eca67b-d372-4031-bf1f-8f0ff7fe6092.jpg",node_type:"episode",ref_id:"06494953-4c8e-4376-9450-9efb8b00acc3",show_title:`Once Bitten! + ) + rr-- + for (; 1 <= Gn && 0 <= rr; Gn--, rr--) + if (gn[Gn] !== Cn[rr]) { + if (Gn !== 1 || rr !== 1) + do + if ((Gn--, rr--, 0 > rr || gn[Gn] !== Cn[rr])) { + var _r = + ` +` + gn[Gn].replace(' at new ', ' at ') + return ( + Bt.displayName && _r.includes('') && (_r = _r.replace('', Bt.displayName)), + _r + ) + } + while (1 <= Gn && 0 <= rr) + break + } + } + } finally { + ;(Ur = !1), (Error.prepareStackTrace = Gt) + } + return (Bt = Bt ? Bt.displayName || Bt.name : '') ? Mr(Bt) : '' + } + var Pr = Object.prototype.hasOwnProperty, + Lr = [], + Wr = -1 + function Br(Bt) { + return { current: Bt } + } + function tr(Bt) { + 0 > Wr || ((Bt.current = Lr[Wr]), (Lr[Wr] = null), Wr--) + } + function ir(Bt, Lt) { + Wr++, (Lr[Wr] = Bt.current), (Bt.current = Lt) + } + var Sr = {}, + dr = Br(Sr), + br = Br(!1), + $r = Sr + function no(Bt, Lt) { + var Gt = Bt.type.contextTypes + if (!Gt) return Sr + var tn = Bt.stateNode + if (tn && tn.__reactInternalMemoizedUnmaskedChildContext === Lt) + return tn.__reactInternalMemoizedMaskedChildContext + var gn = {}, + Cn + for (Cn in Gt) gn[Cn] = Lt[Cn] + return ( + tn && + ((Bt = Bt.stateNode), + (Bt.__reactInternalMemoizedUnmaskedChildContext = Lt), + (Bt.__reactInternalMemoizedMaskedChildContext = gn)), + gn + ) + } + function so(Bt) { + return (Bt = Bt.childContextTypes), Bt != null + } + function fo() { + tr(br), tr(dr) + } + function po(Bt, Lt, Gt) { + if (dr.current !== Sr) throw Error(at(168)) + ir(dr, Lt), ir(br, Gt) + } + function Yn(Bt, Lt, Gt) { + var tn = Bt.stateNode + if (((Lt = Lt.childContextTypes), typeof tn.getChildContext != 'function')) return Gt + tn = tn.getChildContext() + for (var gn in tn) if (!(gn in Lt)) throw Error(at(108, Et(Bt) || 'Unknown', gn)) + return ot({}, Gt, tn) + } + function vo(Bt) { + return ( + (Bt = ((Bt = Bt.stateNode) && Bt.__reactInternalMemoizedMergedChildContext) || Sr), + ($r = dr.current), + ir(dr, Bt), + ir(br, br.current), + !0 + ) + } + function _o(Bt, Lt, Gt) { + var tn = Bt.stateNode + if (!tn) throw Error(at(169)) + Gt + ? ((Bt = Yn(Bt, Lt, $r)), (tn.__reactInternalMemoizedMergedChildContext = Bt), tr(br), tr(dr), ir(dr, Bt)) + : tr(br), + ir(br, Gt) + } + var xo = Math.clz32 ? Math.clz32 : Ro, + bo = Math.log, + Co = Math.LN2 + function Ro(Bt) { + return (Bt >>>= 0), Bt === 0 ? 32 : (31 - ((bo(Bt) / Co) | 0)) | 0 + } + var Wo = 64, + Po = 4194304 + function Fo(Bt) { + switch (Bt & -Bt) { + case 1: + return 1 + case 2: + return 2 + case 4: + return 4 + case 8: + return 8 + case 16: + return 16 + case 32: + return 32 + case 64: + case 128: + case 256: + case 512: + case 1024: + case 2048: + case 4096: + case 8192: + case 16384: + case 32768: + case 65536: + case 131072: + case 262144: + case 524288: + case 1048576: + case 2097152: + return Bt & 4194240 + case 4194304: + case 8388608: + case 16777216: + case 33554432: + case 67108864: + return Bt & 130023424 + case 134217728: + return 134217728 + case 268435456: + return 268435456 + case 536870912: + return 536870912 + case 1073741824: + return 1073741824 + default: + return Bt + } + } + function Go(Bt, Lt) { + var Gt = Bt.pendingLanes + if (Gt === 0) return 0 + var tn = 0, + gn = Bt.suspendedLanes, + Cn = Bt.pingedLanes, + Gn = Gt & 268435455 + if (Gn !== 0) { + var rr = Gn & ~gn + rr !== 0 ? (tn = Fo(rr)) : ((Cn &= Gn), Cn !== 0 && (tn = Fo(Cn))) + } else (Gn = Gt & ~gn), Gn !== 0 ? (tn = Fo(Gn)) : Cn !== 0 && (tn = Fo(Cn)) + if (tn === 0) return 0 + if ( + Lt !== 0 && + Lt !== tn && + !(Lt & gn) && + ((gn = tn & -tn), (Cn = Lt & -Lt), gn >= Cn || (gn === 16 && (Cn & 4194240) !== 0)) + ) + return Lt + if ((tn & 4 && (tn |= Gt & 16), (Lt = Bt.entangledLanes), Lt !== 0)) + for (Bt = Bt.entanglements, Lt &= tn; 0 < Lt; ) (Gt = 31 - xo(Lt)), (gn = 1 << Gt), (tn |= Bt[Gt]), (Lt &= ~gn) + return tn + } + function Xo(Bt, Lt) { + switch (Bt) { + case 1: + case 2: + case 4: + return Lt + 250 + case 8: + case 16: + case 32: + case 64: + case 128: + case 256: + case 512: + case 1024: + case 2048: + case 4096: + case 8192: + case 16384: + case 32768: + case 65536: + case 131072: + case 262144: + case 524288: + case 1048576: + case 2097152: + return Lt + 5e3 + case 4194304: + case 8388608: + case 16777216: + case 33554432: + case 67108864: + return -1 + case 134217728: + case 268435456: + case 536870912: + case 1073741824: + return -1 + default: + return -1 + } + } + function ga(Bt, Lt) { + for (var Gt = Bt.suspendedLanes, tn = Bt.pingedLanes, gn = Bt.expirationTimes, Cn = Bt.pendingLanes; 0 < Cn; ) { + var Gn = 31 - xo(Cn), + rr = 1 << Gn, + _r = gn[Gn] + _r === -1 ? (!(rr & Gt) || rr & tn) && (gn[Gn] = Xo(rr, Lt)) : _r <= Lt && (Bt.expiredLanes |= rr), (Cn &= ~rr) + } + } + function na(Bt) { + return (Bt = Bt.pendingLanes & -1073741825), Bt !== 0 ? Bt : Bt & 1073741824 ? 1073741824 : 0 + } + function $a(Bt) { + for (var Lt = [], Gt = 0; 31 > Gt; Gt++) Lt.push(Bt) + return Lt + } + function Zo(Bt, Lt, Gt) { + ;(Bt.pendingLanes |= Lt), + Lt !== 536870912 && ((Bt.suspendedLanes = 0), (Bt.pingedLanes = 0)), + (Bt = Bt.eventTimes), + (Lt = 31 - xo(Lt)), + (Bt[Lt] = Gt) + } + function pu(Bt, Lt) { + var Gt = Bt.pendingLanes & ~Lt + ;(Bt.pendingLanes = Lt), + (Bt.suspendedLanes = 0), + (Bt.pingedLanes = 0), + (Bt.expiredLanes &= Lt), + (Bt.mutableReadLanes &= Lt), + (Bt.entangledLanes &= Lt), + (Lt = Bt.entanglements) + var tn = Bt.eventTimes + for (Bt = Bt.expirationTimes; 0 < Gt; ) { + var gn = 31 - xo(Gt), + Cn = 1 << gn + ;(Lt[gn] = 0), (tn[gn] = -1), (Bt[gn] = -1), (Gt &= ~Cn) + } + } + function eu(Bt, Lt) { + var Gt = (Bt.entangledLanes |= Lt) + for (Bt = Bt.entanglements; Gt; ) { + var tn = 31 - xo(Gt), + gn = 1 << tn + ;(gn & Lt) | (Bt[tn] & Lt) && (Bt[tn] |= Lt), (Gt &= ~gn) + } + } + var No = 0 + function Mp(Bt) { + return (Bt &= -Bt), 1 < Bt ? (4 < Bt ? (Bt & 268435455 ? 16 : 536870912) : 4) : 1 + } + var tu = it.unstable_scheduleCallback, + op = it.unstable_cancelCallback, + Rp = it.unstable_shouldYield, + mm = it.unstable_requestPaint, + ts = it.unstable_now, + mu = it.unstable_ImmediatePriority, + gm = it.unstable_UserBlockingPriority, + Us = it.unstable_NormalPriority, + Bp = it.unstable_IdlePriority, + Vu = null, + Xs = null + function Yo(Bt) { + if (Xs && typeof Xs.onCommitFiberRoot == 'function') + try { + Xs.onCommitFiberRoot(Vu, Bt, void 0, (Bt.current.flags & 128) === 128) + } catch {} + } + function Ko(Bt, Lt) { + return (Bt === Lt && (Bt !== 0 || 1 / Bt === 1 / Lt)) || (Bt !== Bt && Lt !== Lt) + } + var Zs = typeof Object.is == 'function' ? Object.is : Ko, + zs = null, + nu = !1, + Cl = !1 + function Op(Bt) { + zs === null ? (zs = [Bt]) : zs.push(Bt) + } + function jp(Bt) { + ;(nu = !0), Op(Bt) + } + function Ws() { + if (!Cl && zs !== null) { + Cl = !0 + var Bt = 0, + Lt = No + try { + var Gt = zs + for (No = 1; Bt < Gt.length; Bt++) { + var tn = Gt[Bt] + do tn = tn(!0) + while (tn !== null) + } + ;(zs = null), (nu = !1) + } catch (gn) { + throw (zs !== null && (zs = zs.slice(Bt + 1)), tu(mu, Ws), gn) + } finally { + ;(No = Lt), (Cl = !1) + } + } + return null + } + var Hu = st.ReactCurrentBatchConfig + function ns(Bt, Lt) { + if (Zs(Bt, Lt)) return !0 + if (typeof Bt != 'object' || Bt === null || typeof Lt != 'object' || Lt === null) return !1 + var Gt = Object.keys(Bt), + tn = Object.keys(Lt) + if (Gt.length !== tn.length) return !1 + for (tn = 0; tn < Gt.length; tn++) { + var gn = Gt[tn] + if (!Pr.call(Lt, gn) || !Zs(Bt[gn], Lt[gn])) return !1 + } + return !0 + } + function gu(Bt) { + switch (Bt.tag) { + case 5: + return Mr(Bt.type) + case 16: + return Mr('Lazy') + case 13: + return Mr('Suspense') + case 19: + return Mr('SuspenseList') + case 0: + case 2: + case 15: + return (Bt = Rr(Bt.type, !1)), Bt + case 11: + return (Bt = Rr(Bt.type.render, !1)), Bt + case 1: + return (Bt = Rr(Bt.type, !0)), Bt + default: + return '' + } + } + function ls(Bt, Lt) { + if (Bt && Bt.defaultProps) { + ;(Lt = ot({}, Lt)), (Bt = Bt.defaultProps) + for (var Gt in Bt) Lt[Gt] === void 0 && (Lt[Gt] = Bt[Gt]) + return Lt + } + return Lt + } + var ys = Br(null), + Iu = null, + rs = null, + yu = null + function Gu() { + yu = rs = Iu = null + } + function Dp(Bt, Lt, Gt) { + vn ? (ir(ys, Lt._currentValue), (Lt._currentValue = Gt)) : (ir(ys, Lt._currentValue2), (Lt._currentValue2 = Gt)) + } + function bs(Bt) { + var Lt = ys.current + tr(ys), vn ? (Bt._currentValue = Lt) : (Bt._currentValue2 = Lt) + } + function $s(Bt, Lt, Gt) { + for (; Bt !== null; ) { + var tn = Bt.alternate + if ( + ((Bt.childLanes & Lt) !== Lt + ? ((Bt.childLanes |= Lt), tn !== null && (tn.childLanes |= Lt)) + : tn !== null && (tn.childLanes & Lt) !== Lt && (tn.childLanes |= Lt), + Bt === Gt) + ) + break + Bt = Bt.return + } + } + function os(Bt, Lt) { + ;(Iu = Bt), + (yu = rs = null), + (Bt = Bt.dependencies), + Bt !== null && Bt.firstContext !== null && (Bt.lanes & Lt && (yl = !0), (Bt.firstContext = null)) + } + function Vo(Bt) { + var Lt = vn ? Bt._currentValue : Bt._currentValue2 + if (yu !== Bt) + if (((Bt = { context: Bt, memoizedValue: Lt, next: null }), rs === null)) { + if (Iu === null) throw Error(at(308)) + ;(rs = Bt), (Iu.dependencies = { lanes: 0, firstContext: Bt }) + } else rs = rs.next = Bt + return Lt + } + var Js = null, + ws = !1 + function qm(Bt) { + Bt.updateQueue = { + baseState: Bt.memoizedState, + firstBaseUpdate: null, + lastBaseUpdate: null, + shared: { pending: null, interleaved: null, lanes: 0 }, + effects: null, + } + } + function Ym(Bt, Lt) { + ;(Bt = Bt.updateQueue), + Lt.updateQueue === Bt && + (Lt.updateQueue = { + baseState: Bt.baseState, + firstBaseUpdate: Bt.firstBaseUpdate, + lastBaseUpdate: Bt.lastBaseUpdate, + shared: Bt.shared, + effects: Bt.effects, + }) + } + function Ps(Bt, Lt) { + return { eventTime: Bt, lane: Lt, tag: 0, payload: null, callback: null, next: null } + } + function Nl(Bt, Lt) { + var Gt = Bt.updateQueue + Gt !== null && + ((Gt = Gt.shared), + fs !== null && Bt.mode & 1 && !(Bo & 2) + ? ((Bt = Gt.interleaved), + Bt === null + ? ((Lt.next = Lt), Js === null ? (Js = [Gt]) : Js.push(Gt)) + : ((Lt.next = Bt.next), (Bt.next = Lt)), + (Gt.interleaved = Lt)) + : ((Bt = Gt.pending), + Bt === null ? (Lt.next = Lt) : ((Lt.next = Bt.next), (Bt.next = Lt)), + (Gt.pending = Lt))) + } + function ap(Bt, Lt, Gt) { + if (((Lt = Lt.updateQueue), Lt !== null && ((Lt = Lt.shared), (Gt & 4194240) !== 0))) { + var tn = Lt.lanes + ;(tn &= Bt.pendingLanes), (Gt |= tn), (Lt.lanes = Gt), eu(Bt, Gt) + } + } + function ba(Bt, Lt) { + var Gt = Bt.updateQueue, + tn = Bt.alternate + if (tn !== null && ((tn = tn.updateQueue), Gt === tn)) { + var gn = null, + Cn = null + if (((Gt = Gt.firstBaseUpdate), Gt !== null)) { + do { + var Gn = { + eventTime: Gt.eventTime, + lane: Gt.lane, + tag: Gt.tag, + payload: Gt.payload, + callback: Gt.callback, + next: null, + } + Cn === null ? (gn = Cn = Gn) : (Cn = Cn.next = Gn), (Gt = Gt.next) + } while (Gt !== null) + Cn === null ? (gn = Cn = Lt) : (Cn = Cn.next = Lt) + } else gn = Cn = Lt + ;(Gt = { + baseState: tn.baseState, + firstBaseUpdate: gn, + lastBaseUpdate: Cn, + shared: tn.shared, + effects: tn.effects, + }), + (Bt.updateQueue = Gt) + return + } + ;(Bt = Gt.lastBaseUpdate), Bt === null ? (Gt.firstBaseUpdate = Lt) : (Bt.next = Lt), (Gt.lastBaseUpdate = Lt) + } + function Ll(Bt, Lt, Gt, tn) { + var gn = Bt.updateQueue + ws = !1 + var Cn = gn.firstBaseUpdate, + Gn = gn.lastBaseUpdate, + rr = gn.shared.pending + if (rr !== null) { + gn.shared.pending = null + var _r = rr, + Vr = _r.next + ;(_r.next = null), Gn === null ? (Cn = Vr) : (Gn.next = Vr), (Gn = _r) + var oo = Bt.alternate + oo !== null && + ((oo = oo.updateQueue), + (rr = oo.lastBaseUpdate), + rr !== Gn && (rr === null ? (oo.firstBaseUpdate = Vr) : (rr.next = Vr), (oo.lastBaseUpdate = _r))) + } + if (Cn !== null) { + var Io = gn.baseState + ;(Gn = 0), (oo = Vr = _r = null), (rr = Cn) + do { + var ho = rr.lane, + Jo = rr.eventTime + if ((tn & ho) === ho) { + oo !== null && + (oo = oo.next = + { eventTime: Jo, lane: 0, tag: rr.tag, payload: rr.payload, callback: rr.callback, next: null }) + e: { + var lo = Bt, + Ls = rr + switch (((ho = Lt), (Jo = Gt), Ls.tag)) { + case 1: + if (((lo = Ls.payload), typeof lo == 'function')) { + Io = lo.call(Jo, Io, ho) + break e + } + Io = lo + break e + case 3: + lo.flags = (lo.flags & -65537) | 128 + case 0: + if (((lo = Ls.payload), (ho = typeof lo == 'function' ? lo.call(Jo, Io, ho) : lo), ho == null)) + break e + Io = ot({}, Io, ho) + break e + case 2: + ws = !0 + } + } + rr.callback !== null && + rr.lane !== 0 && + ((Bt.flags |= 64), (ho = gn.effects), ho === null ? (gn.effects = [rr]) : ho.push(rr)) + } else + (Jo = { eventTime: Jo, lane: ho, tag: rr.tag, payload: rr.payload, callback: rr.callback, next: null }), + oo === null ? ((Vr = oo = Jo), (_r = Io)) : (oo = oo.next = Jo), + (Gn |= ho) + if (((rr = rr.next), rr === null)) { + if (((rr = gn.shared.pending), rr === null)) break + ;(ho = rr), (rr = ho.next), (ho.next = null), (gn.lastBaseUpdate = ho), (gn.shared.pending = null) + } + } while (1) + if ( + (oo === null && (_r = Io), + (gn.baseState = _r), + (gn.firstBaseUpdate = Vr), + (gn.lastBaseUpdate = oo), + (Lt = gn.shared.interleaved), + Lt !== null) + ) { + gn = Lt + do (Gn |= gn.lane), (gn = gn.next) + while (gn !== Lt) + } else Cn === null && (gn.shared.lanes = 0) + ;(Ip |= Gn), (Bt.lanes = Gn), (Bt.memoizedState = Io) + } + } + function ym(Bt, Lt, Gt) { + if (((Bt = Lt.effects), (Lt.effects = null), Bt !== null)) + for (Lt = 0; Lt < Bt.length; Lt++) { + var tn = Bt[Lt], + gn = tn.callback + if (gn !== null) { + if (((tn.callback = null), (tn = Gt), typeof gn != 'function')) throw Error(at(191, gn)) + gn.call(tn) + } + } + } + var By = new rt.Component().refs + function Np(Bt, Lt, Gt, tn) { + ;(Lt = Bt.memoizedState), + (Gt = Gt(tn, Lt)), + (Gt = Gt == null ? Lt : ot({}, Lt, Gt)), + (Bt.memoizedState = Gt), + Bt.lanes === 0 && (Bt.updateQueue.baseState = Gt) + } + var bm = { + isMounted: function (Bt) { + return (Bt = Bt._reactInternals) ? $t(Bt) === Bt : !1 + }, + enqueueSetState: function (Bt, Lt, Gt) { + Bt = Bt._reactInternals + var tn = Os(), + gn = cu(Bt), + Cn = Ps(tn, gn) + ;(Cn.payload = Lt), + Gt != null && (Cn.callback = Gt), + Nl(Bt, Cn), + (Lt = Pl(Bt, gn, tn)), + Lt !== null && ap(Lt, Bt, gn) + }, + enqueueReplaceState: function (Bt, Lt, Gt) { + Bt = Bt._reactInternals + var tn = Os(), + gn = cu(Bt), + Cn = Ps(tn, gn) + ;(Cn.tag = 1), + (Cn.payload = Lt), + Gt != null && (Cn.callback = Gt), + Nl(Bt, Cn), + (Lt = Pl(Bt, gn, tn)), + Lt !== null && ap(Lt, Bt, gn) + }, + enqueueForceUpdate: function (Bt, Lt) { + Bt = Bt._reactInternals + var Gt = Os(), + tn = cu(Bt), + gn = Ps(Gt, tn) + ;(gn.tag = 2), + Lt != null && (gn.callback = Lt), + Nl(Bt, gn), + (Lt = Pl(Bt, tn, Gt)), + Lt !== null && ap(Lt, Bt, tn) + }, + } + function Oy(Bt, Lt, Gt, tn, gn, Cn, Gn) { + return ( + (Bt = Bt.stateNode), + typeof Bt.shouldComponentUpdate == 'function' + ? Bt.shouldComponentUpdate(tn, Cn, Gn) + : Lt.prototype && Lt.prototype.isPureReactComponent + ? !ns(Gt, tn) || !ns(gn, Cn) + : !0 + ) + } + function jy(Bt, Lt, Gt) { + var tn = !1, + gn = Sr, + Cn = Lt.contextType + return ( + typeof Cn == 'object' && Cn !== null + ? (Cn = Vo(Cn)) + : ((gn = so(Lt) ? $r : dr.current), (tn = Lt.contextTypes), (Cn = (tn = tn != null) ? no(Bt, gn) : Sr)), + (Lt = new Lt(Gt, Cn)), + (Bt.memoizedState = Lt.state !== null && Lt.state !== void 0 ? Lt.state : null), + (Lt.updater = bm), + (Bt.stateNode = Lt), + (Lt._reactInternals = Bt), + tn && + ((Bt = Bt.stateNode), + (Bt.__reactInternalMemoizedUnmaskedChildContext = gn), + (Bt.__reactInternalMemoizedMaskedChildContext = Cn)), + Lt + ) + } + function Km(Bt, Lt, Gt, tn) { + ;(Bt = Lt.state), + typeof Lt.componentWillReceiveProps == 'function' && Lt.componentWillReceiveProps(Gt, tn), + typeof Lt.UNSAFE_componentWillReceiveProps == 'function' && Lt.UNSAFE_componentWillReceiveProps(Gt, tn), + Lt.state !== Bt && bm.enqueueReplaceState(Lt, Lt.state, null) + } + function sp(Bt, Lt, Gt, tn) { + var gn = Bt.stateNode + ;(gn.props = Gt), (gn.state = Bt.memoizedState), (gn.refs = By), qm(Bt) + var Cn = Lt.contextType + typeof Cn == 'object' && Cn !== null + ? (gn.context = Vo(Cn)) + : ((Cn = so(Lt) ? $r : dr.current), (gn.context = no(Bt, Cn))), + (gn.state = Bt.memoizedState), + (Cn = Lt.getDerivedStateFromProps), + typeof Cn == 'function' && (Np(Bt, Lt, Cn, Gt), (gn.state = Bt.memoizedState)), + typeof Lt.getDerivedStateFromProps == 'function' || + typeof gn.getSnapshotBeforeUpdate == 'function' || + (typeof gn.UNSAFE_componentWillMount != 'function' && typeof gn.componentWillMount != 'function') || + ((Lt = gn.state), + typeof gn.componentWillMount == 'function' && gn.componentWillMount(), + typeof gn.UNSAFE_componentWillMount == 'function' && gn.UNSAFE_componentWillMount(), + Lt !== gn.state && bm.enqueueReplaceState(gn, gn.state, null), + Ll(Bt, Gt, gn, tn), + (gn.state = Bt.memoizedState)), + typeof gn.componentDidMount == 'function' && (Bt.flags |= 4194308) + } + var Fl = [], + lp = 0, + Lp = null, + Fp = 0, + qs = [], + Ys = 0, + Au = null, + bu = 1, + Ul = '' + function wu(Bt, Lt) { + ;(Fl[lp++] = Fp), (Fl[lp++] = Lp), (Lp = Bt), (Fp = Lt) + } + function Dy(Bt, Lt, Gt) { + ;(qs[Ys++] = bu), (qs[Ys++] = Ul), (qs[Ys++] = Au), (Au = Bt) + var tn = bu + Bt = Ul + var gn = 32 - xo(tn) - 1 + ;(tn &= ~(1 << gn)), (Gt += 1) + var Cn = 32 - xo(Lt) + gn + if (30 < Cn) { + var Gn = gn - (gn % 5) + ;(Cn = (tn & ((1 << Gn) - 1)).toString(32)), + (tn >>= Gn), + (gn -= Gn), + (bu = (1 << (32 - xo(Lt) + gn)) | (Gt << gn) | tn), + (Ul = Cn + Bt) + } else (bu = (1 << Cn) | (Gt << gn) | tn), (Ul = Bt) + } + function wm(Bt) { + Bt.return !== null && (wu(Bt, 1), Dy(Bt, 1, 0)) + } + function Vs(Bt) { + for (; Bt === Lp; ) (Lp = Fl[--lp]), (Fl[lp] = null), (Fp = Fl[--lp]), (Fl[lp] = null) + for (; Bt === Au; ) + (Au = qs[--Ys]), (qs[Ys] = null), (Ul = qs[--Ys]), (qs[Ys] = null), (bu = qs[--Ys]), (qs[Ys] = null) + } + var Hs = null, + As = null, + _a = !1, + cp = !1, + Wl = null + function Ny(Bt, Lt) { + var Gt = Ml(5, null, null, 0) + ;(Gt.elementType = 'DELETED'), + (Gt.stateNode = Lt), + (Gt.return = Bt), + (Lt = Bt.deletions), + Lt === null ? ((Bt.deletions = [Gt]), (Bt.flags |= 16)) : Lt.push(Gt) + } + function Ly(Bt, Lt) { + switch (Bt.tag) { + case 5: + return ( + (Lt = Yr(Lt, Bt.type, Bt.pendingProps)), + Lt !== null ? ((Bt.stateNode = Lt), (Hs = Bt), (As = En(Lt)), !0) : !1 + ) + case 6: + return (Lt = Dr(Lt, Bt.pendingProps)), Lt !== null ? ((Bt.stateNode = Lt), (Hs = Bt), (As = null), !0) : !1 + case 13: + if (((Lt = go(Lt)), Lt !== null)) { + var Gt = Au !== null ? { id: bu, overflow: Ul } : null + return ( + (Bt.memoizedState = { dehydrated: Lt, treeContext: Gt, retryLane: 1073741824 }), + (Gt = Ml(18, null, null, 0)), + (Gt.stateNode = Lt), + (Gt.return = Bt), + (Bt.child = Gt), + (Hs = Bt), + (As = null), + !0 + ) + } + return !1 + default: + return !1 + } + } + function Xm(Bt) { + return (Bt.mode & 1) !== 0 && (Bt.flags & 128) === 0 + } + function Zm(Bt) { + if (_a) { + var Lt = As + if (Lt) { + var Gt = Lt + if (!Ly(Bt, Lt)) { + if (Xm(Bt)) throw Error(at(418)) + Lt = Jt(Gt) + var tn = Hs + Lt && Ly(Bt, Lt) ? Ny(tn, Gt) : ((Bt.flags = (Bt.flags & -4097) | 2), (_a = !1), (Hs = Bt)) + } + } else { + if (Xm(Bt)) throw Error(at(418)) + ;(Bt.flags = (Bt.flags & -4097) | 2), (_a = !1), (Hs = Bt) + } + } + } + function qu(Bt) { + for (Bt = Bt.return; Bt !== null && Bt.tag !== 5 && Bt.tag !== 3 && Bt.tag !== 13; ) Bt = Bt.return + Hs = Bt + } + function Up(Bt) { + if (!_n || Bt !== Hs) return !1 + if (!_a) return qu(Bt), (_a = !0), !1 + if (Bt.tag !== 3 && (Bt.tag !== 5 || (eo(Bt.type) && !sn(Bt.type, Bt.memoizedProps)))) { + var Lt = As + if (Lt) { + if (Xm(Bt)) { + for (Bt = As; Bt; ) Bt = Jt(Bt) + throw Error(at(418)) + } + for (; Lt; ) Ny(Bt, Lt), (Lt = Jt(Lt)) + } + } + if ((qu(Bt), Bt.tag === 13)) { + if (!_n) throw Error(at(316)) + if (((Bt = Bt.memoizedState), (Bt = Bt !== null ? Bt.dehydrated : null), !Bt)) throw Error(at(317)) + As = cr(Bt) + } else As = Hs ? Jt(Bt.stateNode) : null + return !0 + } + function up() { + _n && ((As = Hs = null), (cp = _a = !1)) + } + function zp(Bt) { + Wl === null ? (Wl = [Bt]) : Wl.push(Bt) + } + function hp(Bt, Lt, Gt) { + if (((Bt = Gt.ref), Bt !== null && typeof Bt != 'function' && typeof Bt != 'object')) { + if (Gt._owner) { + if (((Gt = Gt._owner), Gt)) { + if (Gt.tag !== 1) throw Error(at(309)) + var tn = Gt.stateNode + } + if (!tn) throw Error(at(147, Bt)) + var gn = tn, + Cn = '' + Bt + return Lt !== null && Lt.ref !== null && typeof Lt.ref == 'function' && Lt.ref._stringRef === Cn + ? Lt.ref + : ((Lt = function (Gn) { + var rr = gn.refs + rr === By && (rr = gn.refs = {}), Gn === null ? delete rr[Cn] : (rr[Cn] = Gn) + }), + (Lt._stringRef = Cn), + Lt) + } + if (typeof Bt != 'string') throw Error(at(284)) + if (!Gt._owner) throw Error(at(290, Bt)) + } + return Bt + } + function Vl(Bt, Lt) { + throw ( + ((Bt = Object.prototype.toString.call(Lt)), + Error(at(31, Bt === '[object Object]' ? 'object with keys {' + Object.keys(Lt).join(', ') + '}' : Bt))) + ) + } + function Wp(Bt) { + var Lt = Bt._init + return Lt(Bt._payload) + } + function Fy(Bt) { + function Lt(ur, or) { + if (Bt) { + var yr = ur.deletions + yr === null ? ((ur.deletions = [or]), (ur.flags |= 16)) : yr.push(or) + } + } + function Gt(ur, or) { + if (!Bt) return null + for (; or !== null; ) Lt(ur, or), (or = or.sibling) + return null + } + function tn(ur, or) { + for (ur = new Map(); or !== null; ) + or.key !== null ? ur.set(or.key, or) : ur.set(or.index, or), (or = or.sibling) + return ur + } + function gn(ur, or) { + return (ur = Su(ur, or)), (ur.index = 0), (ur.sibling = null), ur + } + function Cn(ur, or, yr) { + return ( + (ur.index = yr), + Bt + ? ((yr = ur.alternate), + yr !== null ? ((yr = yr.index), yr < or ? ((ur.flags |= 2), or) : yr) : ((ur.flags |= 2), or)) + : ((ur.flags |= 1048576), or) + ) + } + function Gn(ur) { + return Bt && ur.alternate === null && (ur.flags |= 2), ur + } + function rr(ur, or, yr, _i) { + return or === null || or.tag !== 6 + ? ((or = Ns(yr, ur.mode, _i)), (or.return = ur), or) + : ((or = gn(or, yr)), (or.return = ur), or) + } + function _r(ur, or, yr, _i) { + var co = yr.type + return co === ut + ? oo(ur, or, yr.props.children, _i, yr.key) + : or !== null && + (or.elementType === co || + (typeof co == 'object' && co !== null && co.$$typeof === xt && Wp(co) === or.type)) + ? ((_i = gn(or, yr.props)), (_i.ref = hp(ur, or, yr)), (_i.return = ur), _i) + : ((_i = Lm(yr.type, yr.key, yr.props, null, ur.mode, _i)), (_i.ref = hp(ur, or, yr)), (_i.return = ur), _i) + } + function Vr(ur, or, yr, _i) { + return or === null || + or.tag !== 4 || + or.stateNode.containerInfo !== yr.containerInfo || + or.stateNode.implementation !== yr.implementation + ? ((or = Rl(yr, ur.mode, _i)), (or.return = ur), or) + : ((or = gn(or, yr.children || [])), (or.return = ur), or) + } + function oo(ur, or, yr, _i, co) { + return or === null || or.tag !== 7 + ? ((or = zu(yr, ur.mode, _i, co)), (or.return = ur), or) + : ((or = gn(or, yr)), (or.return = ur), or) + } + function Io(ur, or, yr) { + if ((typeof or == 'string' && or !== '') || typeof or == 'number') + return (or = Ns('' + or, ur.mode, yr)), (or.return = ur), or + if (typeof or == 'object' && or !== null) { + switch (or.$$typeof) { + case lt: + return ( + (yr = Lm(or.type, or.key, or.props, null, ur.mode, yr)), + (yr.ref = hp(ur, null, or)), + (yr.return = ur), + yr + ) + case ct: + return (or = Rl(or, ur.mode, yr)), (or.return = ur), or + case xt: + var _i = or._init + return Io(ur, _i(or._payload), yr) + } + if (It(or) || Tt(or)) return (or = zu(or, ur.mode, yr, null)), (or.return = ur), or + Vl(ur, or) + } + return null + } + function ho(ur, or, yr, _i) { + var co = or !== null ? or.key : null + if ((typeof yr == 'string' && yr !== '') || typeof yr == 'number') + return co !== null ? null : rr(ur, or, '' + yr, _i) + if (typeof yr == 'object' && yr !== null) { + switch (yr.$$typeof) { + case lt: + return yr.key === co ? _r(ur, or, yr, _i) : null + case ct: + return yr.key === co ? Vr(ur, or, yr, _i) : null + case xt: + return (co = yr._init), ho(ur, or, co(yr._payload), _i) + } + if (It(yr) || Tt(yr)) return co !== null ? null : oo(ur, or, yr, _i, null) + Vl(ur, yr) + } + return null + } + function Jo(ur, or, yr, _i, co) { + if ((typeof _i == 'string' && _i !== '') || typeof _i == 'number') + return (ur = ur.get(yr) || null), rr(or, ur, '' + _i, co) + if (typeof _i == 'object' && _i !== null) { + switch (_i.$$typeof) { + case lt: + return (ur = ur.get(_i.key === null ? yr : _i.key) || null), _r(or, ur, _i, co) + case ct: + return (ur = ur.get(_i.key === null ? yr : _i.key) || null), Vr(or, ur, _i, co) + case xt: + var Oo = _i._init + return Jo(ur, or, yr, Oo(_i._payload), co) + } + if (It(_i) || Tt(_i)) return (ur = ur.get(yr) || null), oo(or, ur, _i, co, null) + Vl(or, _i) + } + return null + } + function lo(ur, or, yr, _i) { + for (var co = null, Oo = null, Ao = or, jo = (or = 0), ms = null; Ao !== null && jo < yr.length; jo++) { + Ao.index > jo ? ((ms = Ao), (Ao = null)) : (ms = Ao.sibling) + var zo = ho(ur, Ao, yr[jo], _i) + if (zo === null) { + Ao === null && (Ao = ms) + break + } + Bt && Ao && zo.alternate === null && Lt(ur, Ao), + (or = Cn(zo, or, jo)), + Oo === null ? (co = zo) : (Oo.sibling = zo), + (Oo = zo), + (Ao = ms) + } + if (jo === yr.length) return Gt(ur, Ao), _a && wu(ur, jo), co + if (Ao === null) { + for (; jo < yr.length; jo++) + (Ao = Io(ur, yr[jo], _i)), + Ao !== null && ((or = Cn(Ao, or, jo)), Oo === null ? (co = Ao) : (Oo.sibling = Ao), (Oo = Ao)) + return _a && wu(ur, jo), co + } + for (Ao = tn(ur, Ao); jo < yr.length; jo++) + (ms = Jo(Ao, ur, jo, yr[jo], _i)), + ms !== null && + (Bt && ms.alternate !== null && Ao.delete(ms.key === null ? jo : ms.key), + (or = Cn(ms, or, jo)), + Oo === null ? (co = ms) : (Oo.sibling = ms), + (Oo = ms)) + return ( + Bt && + Ao.forEach(function (hu) { + return Lt(ur, hu) + }), + _a && wu(ur, jo), + co + ) + } + function Ls(ur, or, yr, _i) { + var co = Tt(yr) + if (typeof co != 'function') throw Error(at(150)) + if (((yr = co.call(yr)), yr == null)) throw Error(at(151)) + for ( + var Oo = (co = null), Ao = or, jo = (or = 0), ms = null, zo = yr.next(); + Ao !== null && !zo.done; + jo++, zo = yr.next() + ) { + Ao.index > jo ? ((ms = Ao), (Ao = null)) : (ms = Ao.sibling) + var hu = ho(ur, Ao, zo.value, _i) + if (hu === null) { + Ao === null && (Ao = ms) + break + } + Bt && Ao && hu.alternate === null && Lt(ur, Ao), + (or = Cn(hu, or, jo)), + Oo === null ? (co = hu) : (Oo.sibling = hu), + (Oo = hu), + (Ao = ms) + } + if (zo.done) return Gt(ur, Ao), _a && wu(ur, jo), co + if (Ao === null) { + for (; !zo.done; jo++, zo = yr.next()) + (zo = Io(ur, zo.value, _i)), + zo !== null && ((or = Cn(zo, or, jo)), Oo === null ? (co = zo) : (Oo.sibling = zo), (Oo = zo)) + return _a && wu(ur, jo), co + } + for (Ao = tn(ur, Ao); !zo.done; jo++, zo = yr.next()) + (zo = Jo(Ao, ur, jo, zo.value, _i)), + zo !== null && + (Bt && zo.alternate !== null && Ao.delete(zo.key === null ? jo : zo.key), + (or = Cn(zo, or, jo)), + Oo === null ? (co = zo) : (Oo.sibling = zo), + (Oo = zo)) + return ( + Bt && + Ao.forEach(function (Um) { + return Lt(ur, Um) + }), + _a && wu(ur, jo), + co + ) + } + function Tl(ur, or, yr, _i) { + if ( + (typeof yr == 'object' && yr !== null && yr.type === ut && yr.key === null && (yr = yr.props.children), + typeof yr == 'object' && yr !== null) + ) { + switch (yr.$$typeof) { + case lt: + e: { + for (var co = yr.key, Oo = or; Oo !== null; ) { + if (Oo.key === co) { + if (((co = yr.type), co === ut)) { + if (Oo.tag === 7) { + Gt(ur, Oo.sibling), (or = gn(Oo, yr.props.children)), (or.return = ur), (ur = or) + break e + } + } else if ( + Oo.elementType === co || + (typeof co == 'object' && co !== null && co.$$typeof === xt && Wp(co) === Oo.type) + ) { + Gt(ur, Oo.sibling), + (or = gn(Oo, yr.props)), + (or.ref = hp(ur, Oo, yr)), + (or.return = ur), + (ur = or) + break e + } + Gt(ur, Oo) + break + } else Lt(ur, Oo) + Oo = Oo.sibling + } + yr.type === ut + ? ((or = zu(yr.props.children, ur.mode, _i, yr.key)), (or.return = ur), (ur = or)) + : ((_i = Lm(yr.type, yr.key, yr.props, null, ur.mode, _i)), + (_i.ref = hp(ur, or, yr)), + (_i.return = ur), + (ur = _i)) + } + return Gn(ur) + case ct: + e: { + for (Oo = yr.key; or !== null; ) { + if (or.key === Oo) + if ( + or.tag === 4 && + or.stateNode.containerInfo === yr.containerInfo && + or.stateNode.implementation === yr.implementation + ) { + Gt(ur, or.sibling), (or = gn(or, yr.children || [])), (or.return = ur), (ur = or) + break e + } else { + Gt(ur, or) + break + } + else Lt(ur, or) + or = or.sibling + } + ;(or = Rl(yr, ur.mode, _i)), (or.return = ur), (ur = or) + } + return Gn(ur) + case xt: + return (Oo = yr._init), Tl(ur, or, Oo(yr._payload), _i) + } + if (It(yr)) return lo(ur, or, yr, _i) + if (Tt(yr)) return Ls(ur, or, yr, _i) + Vl(ur, yr) + } + return (typeof yr == 'string' && yr !== '') || typeof yr == 'number' + ? ((yr = '' + yr), + or !== null && or.tag === 6 + ? (Gt(ur, or.sibling), (or = gn(or, yr)), (or.return = ur), (ur = or)) + : (Gt(ur, or), (or = Ns(yr, ur.mode, _i)), (or.return = ur), (ur = or)), + Gn(ur)) + : Gt(ur, or) + } + return Tl + } + var dp = Fy(!0), + Uy = Fy(!1), + ru = {}, + ss = Br(ru), + fp = Br(ru), + pp = Br(ru) + function iu(Bt) { + if (Bt === ru) throw Error(at(174)) + return Bt + } + function Jm(Bt, Lt) { + ir(pp, Lt), ir(fp, Bt), ir(ss, ru), (Bt = Wt(Lt)), tr(ss), ir(ss, Bt) + } + function mp() { + tr(ss), tr(fp), tr(pp) + } + function zy(Bt) { + var Lt = iu(pp.current), + Gt = iu(ss.current) + ;(Lt = zt(Gt, Bt.type, Lt)), Gt !== Lt && (ir(fp, Bt), ir(ss, Lt)) + } + function Cu(Bt) { + fp.current === Bt && (tr(ss), tr(fp)) + } + var er = Br(0) + function Er(Bt) { + for (var Lt = Bt; Lt !== null; ) { + if (Lt.tag === 13) { + var Gt = Lt.memoizedState + if (Gt !== null && ((Gt = Gt.dehydrated), Gt === null || xn(Gt) || Mn(Gt))) return Lt + } else if (Lt.tag === 19 && Lt.memoizedProps.revealOrder !== void 0) { + if (Lt.flags & 128) return Lt + } else if (Lt.child !== null) { + ;(Lt.child.return = Lt), (Lt = Lt.child) + continue + } + if (Lt === Bt) break + for (; Lt.sibling === null; ) { + if (Lt.return === null || Lt.return === Bt) return null + Lt = Lt.return + } + ;(Lt.sibling.return = Lt.return), (Lt = Lt.sibling) + } + return null + } + var gr = [] + function ro() { + for (var Bt = 0; Bt < gr.length; Bt++) { + var Lt = gr[Bt] + vn ? (Lt._workInProgressVersionPrimary = null) : (Lt._workInProgressVersionSecondary = null) + } + gr.length = 0 + } + var To = st.ReactCurrentDispatcher, + $o = st.ReactCurrentBatchConfig, + es = 0, + ko = null, + Es = null, + Ts = null, + Gs = !1, + $u = !1, + Vp = 0, + gp = 0 + function vs() { + throw Error(at(321)) + } + function yp(Bt, Lt) { + if (Lt === null) return !1 + for (var Gt = 0; Gt < Lt.length && Gt < Bt.length; Gt++) if (!Zs(Bt[Gt], Lt[Gt])) return !1 + return !0 + } + function qo(Bt, Lt, Gt, tn, gn, Cn) { + if ( + ((es = Cn), + (ko = Lt), + (Lt.memoizedState = null), + (Lt.updateQueue = null), + (Lt.lanes = 0), + (To.current = Bt === null || Bt.memoizedState === null ? Jp : iy), + (Bt = Gt(tn, gn)), + $u) + ) { + Cn = 0 + do { + if ((($u = !1), (Vp = 0), 25 <= Cn)) throw Error(at(301)) + ;(Cn += 1), (Ts = Es = null), (Lt.updateQueue = null), (To.current = vp), (Bt = Gt(tn, gn)) + } while ($u) + } + if (((To.current = wp), (Lt = Es !== null && Es.next !== null), (es = 0), (Ts = Es = ko = null), (Gs = !1), Lt)) + throw Error(at(300)) + return Bt + } + function Qm() { + var Bt = Vp !== 0 + return (Vp = 0), Bt + } + function ou() { + var Bt = { memoizedState: null, baseState: null, baseQueue: null, queue: null, next: null } + return Ts === null ? (ko.memoizedState = Ts = Bt) : (Ts = Ts.next = Bt), Ts + } + function Qs() { + if (Es === null) { + var Bt = ko.alternate + Bt = Bt !== null ? Bt.memoizedState : null + } else Bt = Es.next + var Lt = Ts === null ? ko.memoizedState : Ts.next + if (Lt !== null) (Ts = Lt), (Es = Bt) + else { + if (Bt === null) throw Error(at(310)) + ;(Es = Bt), + (Bt = { + memoizedState: Es.memoizedState, + baseState: Es.baseState, + baseQueue: Es.baseQueue, + queue: Es.queue, + next: null, + }), + Ts === null ? (ko.memoizedState = Ts = Bt) : (Ts = Ts.next = Bt) + } + return Ts + } + function Yu(Bt, Lt) { + return typeof Lt == 'function' ? Lt(Bt) : Lt + } + function vm(Bt) { + var Lt = Qs(), + Gt = Lt.queue + if (Gt === null) throw Error(at(311)) + Gt.lastRenderedReducer = Bt + var tn = Es, + gn = tn.baseQueue, + Cn = Gt.pending + if (Cn !== null) { + if (gn !== null) { + var Gn = gn.next + ;(gn.next = Cn.next), (Cn.next = Gn) + } + ;(tn.baseQueue = gn = Cn), (Gt.pending = null) + } + if (gn !== null) { + ;(Cn = gn.next), (tn = tn.baseState) + var rr = (Gn = null), + _r = null, + Vr = Cn + do { + var oo = Vr.lane + if ((es & oo) === oo) + _r !== null && + (_r = _r.next = + { lane: 0, action: Vr.action, hasEagerState: Vr.hasEagerState, eagerState: Vr.eagerState, next: null }), + (tn = Vr.hasEagerState ? Vr.eagerState : Bt(tn, Vr.action)) + else { + var Io = { + lane: oo, + action: Vr.action, + hasEagerState: Vr.hasEagerState, + eagerState: Vr.eagerState, + next: null, + } + _r === null ? ((rr = _r = Io), (Gn = tn)) : (_r = _r.next = Io), (ko.lanes |= oo), (Ip |= oo) + } + Vr = Vr.next + } while (Vr !== null && Vr !== Cn) + _r === null ? (Gn = tn) : (_r.next = rr), + Zs(tn, Lt.memoizedState) || (yl = !0), + (Lt.memoizedState = tn), + (Lt.baseState = Gn), + (Lt.baseQueue = _r), + (Gt.lastRenderedState = tn) + } + if (((Bt = Gt.interleaved), Bt !== null)) { + gn = Bt + do (Cn = gn.lane), (ko.lanes |= Cn), (Ip |= Cn), (gn = gn.next) + while (gn !== Bt) + } else gn === null && (Gt.lanes = 0) + return [Lt.memoizedState, Gt.dispatch] + } + function _m(Bt) { + var Lt = Qs(), + Gt = Lt.queue + if (Gt === null) throw Error(at(311)) + Gt.lastRenderedReducer = Bt + var tn = Gt.dispatch, + gn = Gt.pending, + Cn = Lt.memoizedState + if (gn !== null) { + Gt.pending = null + var Gn = (gn = gn.next) + do (Cn = Bt(Cn, Gn.action)), (Gn = Gn.next) + while (Gn !== gn) + Zs(Cn, Lt.memoizedState) || (yl = !0), + (Lt.memoizedState = Cn), + Lt.baseQueue === null && (Lt.baseState = Cn), + (Gt.lastRenderedState = Cn) + } + return [Cn, tn] + } + function Hp() {} + function vu(Bt, Lt) { + var Gt = ko, + tn = Qs(), + gn = Lt(), + Cn = !Zs(tn.memoizedState, gn) + if ( + (Cn && ((tn.memoizedState = gn), (yl = !0)), + (tn = tn.queue), + Yp(qp.bind(null, Gt, tn, Bt), [Bt]), + tn.getSnapshot !== Lt || Cn || (Ts !== null && Ts.memoizedState.tag & 1)) + ) { + if (((Gt.flags |= 2048), Pu(9, _g.bind(null, Gt, tn, gn, Lt), void 0, null), fs === null)) throw Error(at(349)) + es & 30 || Gp(Gt, Lt, gn) + } + return gn + } + function Gp(Bt, Lt, Gt) { + ;(Bt.flags |= 16384), + (Bt = { getSnapshot: Lt, value: Gt }), + (Lt = ko.updateQueue), + Lt === null + ? ((Lt = { lastEffect: null, stores: null }), (ko.updateQueue = Lt), (Lt.stores = [Bt])) + : ((Gt = Lt.stores), Gt === null ? (Lt.stores = [Bt]) : Gt.push(Bt)) + } + function _g(Bt, Lt, Gt, tn) { + ;(Lt.value = Gt), (Lt.getSnapshot = tn), ey(Lt) && Pl(Bt, 1, -1) + } + function qp(Bt, Lt, Gt) { + return Gt(function () { + ey(Lt) && Pl(Bt, 1, -1) + }) + } + function ey(Bt) { + var Lt = Bt.getSnapshot + Bt = Bt.value + try { + var Gt = Lt() + return !Zs(Bt, Gt) + } catch { + return !0 + } + } + function xm(Bt) { + var Lt = ou() + return ( + typeof Bt == 'function' && (Bt = Bt()), + (Lt.memoizedState = Lt.baseState = Bt), + (Bt = { + pending: null, + interleaved: null, + lanes: 0, + dispatch: null, + lastRenderedReducer: Yu, + lastRenderedState: Bt, + }), + (Lt.queue = Bt), + (Bt = Bt.dispatch = Ms.bind(null, ko, Bt)), + [Lt.memoizedState, Bt] + ) + } + function Pu(Bt, Lt, Gt, tn) { + return ( + (Bt = { tag: Bt, create: Lt, destroy: Gt, deps: tn, next: null }), + (Lt = ko.updateQueue), + Lt === null + ? ((Lt = { lastEffect: null, stores: null }), (ko.updateQueue = Lt), (Lt.lastEffect = Bt.next = Bt)) + : ((Gt = Lt.lastEffect), + Gt === null + ? (Lt.lastEffect = Bt.next = Bt) + : ((tn = Gt.next), (Gt.next = Bt), (Bt.next = tn), (Lt.lastEffect = Bt))), + Bt + ) + } + function ty() { + return Qs().memoizedState + } + function Mu(Bt, Lt, Gt, tn) { + var gn = ou() + ;(ko.flags |= Bt), (gn.memoizedState = Pu(1 | Lt, Gt, void 0, tn === void 0 ? null : tn)) + } + function au(Bt, Lt, Gt, tn) { + var gn = Qs() + tn = tn === void 0 ? null : tn + var Cn = void 0 + if (Es !== null) { + var Gn = Es.memoizedState + if (((Cn = Gn.destroy), tn !== null && yp(tn, Gn.deps))) { + gn.memoizedState = Pu(Lt, Gt, Cn, tn) + return + } + } + ;(ko.flags |= Bt), (gn.memoizedState = Pu(1 | Lt, Gt, Cn, tn)) + } + function bp(Bt, Lt) { + return Mu(8390656, 8, Bt, Lt) + } + function Yp(Bt, Lt) { + return au(2048, 8, Bt, Lt) + } + function Wy(Bt, Lt) { + return au(4, 2, Bt, Lt) + } + function Vy(Bt, Lt) { + return au(4, 4, Bt, Lt) + } + function Kp(Bt, Lt) { + if (typeof Lt == 'function') + return ( + (Bt = Bt()), + Lt(Bt), + function () { + Lt(null) + } + ) + if (Lt != null) + return ( + (Bt = Bt()), + (Lt.current = Bt), + function () { + Lt.current = null + } + ) + } + function Xp(Bt, Lt, Gt) { + return (Gt = Gt != null ? Gt.concat([Bt]) : null), au(4, 4, Kp.bind(null, Lt, Bt), Gt) + } + function Zp() {} + function Hy(Bt, Lt) { + var Gt = Qs() + Lt = Lt === void 0 ? null : Lt + var tn = Gt.memoizedState + return tn !== null && Lt !== null && yp(Lt, tn[1]) ? tn[0] : ((Gt.memoizedState = [Bt, Lt]), Bt) + } + function ny(Bt, Lt) { + var Gt = Qs() + Lt = Lt === void 0 ? null : Lt + var tn = Gt.memoizedState + return tn !== null && Lt !== null && yp(Lt, tn[1]) ? tn[0] : ((Bt = Bt()), (Gt.memoizedState = [Bt, Lt]), Bt) + } + function N0(Bt, Lt) { + var Gt = No + ;(No = Gt !== 0 && 4 > Gt ? Gt : 4), Bt(!0) + var tn = $o.transition + $o.transition = {} + try { + Bt(!1), Lt() + } finally { + ;(No = Gt), ($o.transition = tn) + } + } + function Gy() { + return Qs().memoizedState + } + function _s(Bt, Lt, Gt) { + var tn = cu(Bt) + ;(Gt = { lane: tn, action: Gt, hasEagerState: !1, eagerState: null, next: null }), + qy(Bt) ? Yy(Lt, Gt) : (ry(Bt, Lt, Gt), (Gt = Os()), (Bt = Pl(Bt, tn, Gt)), Bt !== null && Ky(Bt, Lt, tn)) + } + function Ms(Bt, Lt, Gt) { + var tn = cu(Bt), + gn = { lane: tn, action: Gt, hasEagerState: !1, eagerState: null, next: null } + if (qy(Bt)) Yy(Lt, gn) + else { + ry(Bt, Lt, gn) + var Cn = Bt.alternate + if (Bt.lanes === 0 && (Cn === null || Cn.lanes === 0) && ((Cn = Lt.lastRenderedReducer), Cn !== null)) + try { + var Gn = Lt.lastRenderedState, + rr = Cn(Gn, Gt) + if (((gn.hasEagerState = !0), (gn.eagerState = rr), Zs(rr, Gn))) return + } catch { + } finally { + } + ;(Gt = Os()), (Bt = Pl(Bt, tn, Gt)), Bt !== null && Ky(Bt, Lt, tn) + } + } + function qy(Bt) { + var Lt = Bt.alternate + return Bt === ko || (Lt !== null && Lt === ko) + } + function Yy(Bt, Lt) { + $u = Gs = !0 + var Gt = Bt.pending + Gt === null ? (Lt.next = Lt) : ((Lt.next = Gt.next), (Gt.next = Lt)), (Bt.pending = Lt) + } + function ry(Bt, Lt, Gt) { + fs !== null && Bt.mode & 1 && !(Bo & 2) + ? ((Bt = Lt.interleaved), + Bt === null + ? ((Gt.next = Gt), Js === null ? (Js = [Lt]) : Js.push(Lt)) + : ((Gt.next = Bt.next), (Bt.next = Gt)), + (Lt.interleaved = Gt)) + : ((Bt = Lt.pending), Bt === null ? (Gt.next = Gt) : ((Gt.next = Bt.next), (Bt.next = Gt)), (Lt.pending = Gt)) + } + function Ky(Bt, Lt, Gt) { + if (Gt & 4194240) { + var tn = Lt.lanes + ;(tn &= Bt.pendingLanes), (Gt |= tn), (Lt.lanes = Gt), eu(Bt, Gt) + } + } + var wp = { + readContext: Vo, + useCallback: vs, + useContext: vs, + useEffect: vs, + useImperativeHandle: vs, + useInsertionEffect: vs, + useLayoutEffect: vs, + useMemo: vs, + useReducer: vs, + useRef: vs, + useState: vs, + useDebugValue: vs, + useDeferredValue: vs, + useTransition: vs, + useMutableSource: vs, + useSyncExternalStore: vs, + useId: vs, + unstable_isNewReconciler: !1, + }, + Jp = { + readContext: Vo, + useCallback: function (Bt, Lt) { + return (ou().memoizedState = [Bt, Lt === void 0 ? null : Lt]), Bt + }, + useContext: Vo, + useEffect: bp, + useImperativeHandle: function (Bt, Lt, Gt) { + return (Gt = Gt != null ? Gt.concat([Bt]) : null), Mu(4194308, 4, Kp.bind(null, Lt, Bt), Gt) + }, + useLayoutEffect: function (Bt, Lt) { + return Mu(4194308, 4, Bt, Lt) + }, + useInsertionEffect: function (Bt, Lt) { + return Mu(4, 2, Bt, Lt) + }, + useMemo: function (Bt, Lt) { + var Gt = ou() + return (Lt = Lt === void 0 ? null : Lt), (Bt = Bt()), (Gt.memoizedState = [Bt, Lt]), Bt + }, + useReducer: function (Bt, Lt, Gt) { + var tn = ou() + return ( + (Lt = Gt !== void 0 ? Gt(Lt) : Lt), + (tn.memoizedState = tn.baseState = Lt), + (Bt = { + pending: null, + interleaved: null, + lanes: 0, + dispatch: null, + lastRenderedReducer: Bt, + lastRenderedState: Lt, + }), + (tn.queue = Bt), + (Bt = Bt.dispatch = _s.bind(null, ko, Bt)), + [tn.memoizedState, Bt] + ) + }, + useRef: function (Bt) { + var Lt = ou() + return (Bt = { current: Bt }), (Lt.memoizedState = Bt) + }, + useState: xm, + useDebugValue: Zp, + useDeferredValue: function (Bt) { + var Lt = xm(Bt), + Gt = Lt[0], + tn = Lt[1] + return ( + bp( + function () { + var gn = $o.transition + $o.transition = {} + try { + tn(Bt) + } finally { + $o.transition = gn + } + }, + [Bt], + ), + Gt + ) + }, + useTransition: function () { + var Bt = xm(!1), + Lt = Bt[0] + return (Bt = N0.bind(null, Bt[1])), (ou().memoizedState = Bt), [Lt, Bt] + }, + useMutableSource: function () {}, + useSyncExternalStore: function (Bt, Lt, Gt) { + var tn = ko, + gn = ou() + if (_a) { + if (Gt === void 0) throw Error(at(407)) + Gt = Gt() + } else { + if (((Gt = Lt()), fs === null)) throw Error(at(349)) + es & 30 || Gp(tn, Lt, Gt) + } + gn.memoizedState = Gt + var Cn = { value: Gt, getSnapshot: Lt } + return ( + (gn.queue = Cn), + bp(qp.bind(null, tn, Cn, Bt), [Bt]), + (tn.flags |= 2048), + Pu(9, _g.bind(null, tn, Cn, Gt, Lt), void 0, null), + Gt + ) + }, + useId: function () { + var Bt = ou(), + Lt = fs.identifierPrefix + if (_a) { + var Gt = Ul, + tn = bu + ;(Gt = (tn & ~(1 << (32 - xo(tn) - 1))).toString(32) + Gt), + (Lt = ':' + Lt + 'R' + Gt), + (Gt = Vp++), + 0 < Gt && (Lt += 'H' + Gt.toString(32)), + (Lt += ':') + } else (Gt = gp++), (Lt = ':' + Lt + 'r' + Gt.toString(32) + ':') + return (Bt.memoizedState = Lt) + }, + unstable_isNewReconciler: !1, + }, + iy = { + readContext: Vo, + useCallback: Hy, + useContext: Vo, + useEffect: Yp, + useImperativeHandle: Xp, + useInsertionEffect: Wy, + useLayoutEffect: Vy, + useMemo: ny, + useReducer: vm, + useRef: ty, + useState: function () { + return vm(Yu) + }, + useDebugValue: Zp, + useDeferredValue: function (Bt) { + var Lt = vm(Yu), + Gt = Lt[0], + tn = Lt[1] + return ( + Yp( + function () { + var gn = $o.transition + $o.transition = {} + try { + tn(Bt) + } finally { + $o.transition = gn + } + }, + [Bt], + ), + Gt + ) + }, + useTransition: function () { + var Bt = vm(Yu)[0], + Lt = Qs().memoizedState + return [Bt, Lt] + }, + useMutableSource: Hp, + useSyncExternalStore: vu, + useId: Gy, + unstable_isNewReconciler: !1, + }, + vp = { + readContext: Vo, + useCallback: Hy, + useContext: Vo, + useEffect: Yp, + useImperativeHandle: Xp, + useInsertionEffect: Wy, + useLayoutEffect: Vy, + useMemo: ny, + useReducer: _m, + useRef: ty, + useState: function () { + return _m(Yu) + }, + useDebugValue: Zp, + useDeferredValue: function (Bt) { + var Lt = _m(Yu), + Gt = Lt[0], + tn = Lt[1] + return ( + Yp( + function () { + var gn = $o.transition + $o.transition = {} + try { + tn(Bt) + } finally { + $o.transition = gn + } + }, + [Bt], + ), + Gt + ) + }, + useTransition: function () { + var Bt = _m(Yu)[0], + Lt = Qs().memoizedState + return [Bt, Lt] + }, + useMutableSource: Hp, + useSyncExternalStore: vu, + useId: Gy, + unstable_isNewReconciler: !1, + } + function Ku(Bt, Lt) { + try { + var Gt = '', + tn = Lt + do (Gt += gu(tn)), (tn = tn.return) + while (tn) + var gn = Gt + } catch (Cn) { + gn = + ` +Error generating stack: ` + + Cn.message + + ` +` + + Cn.stack + } + return { value: Bt, source: Lt, stack: gn } + } + function Xu(Bt, Lt) { + try { + console.error(Lt.value) + } catch (Gt) { + setTimeout(function () { + throw Gt + }) + } + } + var km = typeof WeakMap == 'function' ? WeakMap : Map + function Zu(Bt, Lt, Gt) { + ;(Gt = Ps(-1, Gt)), (Gt.tag = 3), (Gt.payload = { element: null }) + var tn = Lt.value + return ( + (Gt.callback = function () { + am || ((am = !0), (Pm = tn)), Xu(Bt, Lt) + }), + Gt + ) + } + function Xy(Bt, Lt, Gt) { + ;(Gt = Ps(-1, Gt)), (Gt.tag = 3) + var tn = Bt.type.getDerivedStateFromError + if (typeof tn == 'function') { + var gn = Lt.value + ;(Gt.payload = function () { + return tn(gn) + }), + (Gt.callback = function () { + Xu(Bt, Lt) + }) + } + var Cn = Bt.stateNode + return ( + Cn !== null && + typeof Cn.componentDidCatch == 'function' && + (Gt.callback = function () { + Xu(Bt, Lt), typeof tn != 'function' && (Zl === null ? (Zl = new Set([this])) : Zl.add(this)) + var Gn = Lt.stack + this.componentDidCatch(Lt.value, { componentStack: Gn !== null ? Gn : '' }) + }), + Gt + ) + } + function Zy(Bt, Lt, Gt) { + var tn = Bt.pingCache + if (tn === null) { + tn = Bt.pingCache = new km() + var gn = new Set() + tn.set(Lt, gn) + } else (gn = tn.get(Lt)), gn === void 0 && ((gn = new Set()), tn.set(Lt, gn)) + gn.has(Gt) || (gn.add(Gt), (Bt = Fu.bind(null, Bt, Lt, Gt)), Lt.then(Bt, Bt)) + } + function Jy(Bt) { + do { + var Lt + if (((Lt = Bt.tag === 13) && ((Lt = Bt.memoizedState), (Lt = Lt !== null ? Lt.dehydrated !== null : !0)), Lt)) + return Bt + Bt = Bt.return + } while (Bt !== null) + return null + } + function Qy(Bt, Lt, Gt, tn, gn) { + return Bt.mode & 1 + ? ((Bt.flags |= 65536), (Bt.lanes = gn), Bt) + : (Bt === Lt + ? (Bt.flags |= 65536) + : ((Bt.flags |= 128), + (Gt.flags |= 131072), + (Gt.flags &= -52805), + Gt.tag === 1 && (Gt.alternate === null ? (Gt.tag = 17) : ((Lt = Ps(-1, 1)), (Lt.tag = 2), Nl(Gt, Lt))), + (Gt.lanes |= 1)), + Bt) + } + function su(Bt) { + Bt.flags |= 4 + } + function Qp(Bt, Lt) { + if (Bt !== null && Bt.child === Lt.child) return !0 + if (Lt.flags & 16) return !1 + for (Bt = Lt.child; Bt !== null; ) { + if (Bt.flags & 12854 || Bt.subtreeFlags & 12854) return !1 + Bt = Bt.sibling + } + return !0 + } + var _u, _p, Fn, xu + if (an) + (_u = function (Bt, Lt) { + for (var Gt = Lt.child; Gt !== null; ) { + if (Gt.tag === 5 || Gt.tag === 6) Mt(Bt, Gt.stateNode) + else if (Gt.tag !== 4 && Gt.child !== null) { + ;(Gt.child.return = Gt), (Gt = Gt.child) + continue + } + if (Gt === Lt) break + for (; Gt.sibling === null; ) { + if (Gt.return === null || Gt.return === Lt) return + Gt = Gt.return + } + ;(Gt.sibling.return = Gt.return), (Gt = Gt.sibling) + } + }), + (_p = function () {}), + (Fn = function (Bt, Lt, Gt, tn, gn) { + if (((Bt = Bt.memoizedProps), Bt !== tn)) { + var Cn = Lt.stateNode, + Gn = iu(ss.current) + ;(Gt = en(Cn, Gt, Bt, tn, gn, Gn)), (Lt.updateQueue = Gt) && su(Lt) + } + }), + (xu = function (Bt, Lt, Gt, tn) { + Gt !== tn && su(Lt) + }) + else if (Qt) { + _u = function (Bt, Lt, Gt, tn) { + for (var gn = Lt.child; gn !== null; ) { + if (gn.tag === 5) { + var Cn = gn.stateNode + Gt && tn && (Cn = Fr(Cn, gn.type, gn.memoizedProps, gn)), Mt(Bt, Cn) + } else if (gn.tag === 6) (Cn = gn.stateNode), Gt && tn && (Cn = ao(Cn, gn.memoizedProps, gn)), Mt(Bt, Cn) + else if (gn.tag !== 4) { + if (gn.tag === 22 && gn.memoizedState !== null) + (Cn = gn.child), Cn !== null && (Cn.return = gn), _u(Bt, gn, !0, !0) + else if (gn.child !== null) { + ;(gn.child.return = gn), (gn = gn.child) + continue + } + } + if (gn === Lt) break + for (; gn.sibling === null; ) { + if (gn.return === null || gn.return === Lt) return + gn = gn.return + } + ;(gn.sibling.return = gn.return), (gn = gn.sibling) + } + } + var em = function (Bt, Lt, Gt, tn) { + for (var gn = Lt.child; gn !== null; ) { + if (gn.tag === 5) { + var Cn = gn.stateNode + Gt && tn && (Cn = Fr(Cn, gn.type, gn.memoizedProps, gn)), Ar(Bt, Cn) + } else if (gn.tag === 6) (Cn = gn.stateNode), Gt && tn && (Cn = ao(Cn, gn.memoizedProps, gn)), Ar(Bt, Cn) + else if (gn.tag !== 4) { + if (gn.tag === 22 && gn.memoizedState !== null) + (Cn = gn.child), Cn !== null && (Cn.return = gn), em(Bt, gn, !0, !0) + else if (gn.child !== null) { + ;(gn.child.return = gn), (gn = gn.child) + continue + } + } + if (gn === Lt) break + for (; gn.sibling === null; ) { + if (gn.return === null || gn.return === Lt) return + gn = gn.return + } + ;(gn.sibling.return = gn.return), (gn = gn.sibling) + } + } + ;(_p = function (Bt, Lt) { + var Gt = Lt.stateNode + if (!Qp(Bt, Lt)) { + Bt = Gt.containerInfo + var tn = Tr(Bt) + em(tn, Lt, !1, !1), (Gt.pendingChildren = tn), su(Lt), qr(Bt, tn) + } + }), + (Fn = function (Bt, Lt, Gt, tn, gn) { + var Cn = Bt.stateNode, + Gn = Bt.memoizedProps + if ((Bt = Qp(Bt, Lt)) && Gn === tn) Lt.stateNode = Cn + else { + var rr = Lt.stateNode, + _r = iu(ss.current), + Vr = null + Gn !== tn && (Vr = en(rr, Gt, Gn, tn, gn, _r)), + Bt && Vr === null + ? (Lt.stateNode = Cn) + : ((Cn = io(Cn, Vr, Gt, Gn, tn, Lt, Bt, rr)), + Ht(Cn, Gt, tn, gn, _r) && su(Lt), + (Lt.stateNode = Cn), + Bt ? su(Lt) : _u(Cn, Lt, !1, !1)) + } + }), + (xu = function (Bt, Lt, Gt, tn) { + Gt !== tn + ? ((Bt = iu(pp.current)), (Gt = iu(ss.current)), (Lt.stateNode = Kt(tn, Bt, Gt, Lt)), su(Lt)) + : (Lt.stateNode = Bt.stateNode) + }) + } else (_p = function () {}), (Fn = function () {}), (xu = function () {}) + function Rs(Bt, Lt) { + if (!_a) + switch (Bt.tailMode) { + case 'hidden': + Lt = Bt.tail + for (var Gt = null; Lt !== null; ) Lt.alternate !== null && (Gt = Lt), (Lt = Lt.sibling) + Gt === null ? (Bt.tail = null) : (Gt.sibling = null) + break + case 'collapsed': + Gt = Bt.tail + for (var tn = null; Gt !== null; ) Gt.alternate !== null && (tn = Gt), (Gt = Gt.sibling) + tn === null ? (Lt || Bt.tail === null ? (Bt.tail = null) : (Bt.tail.sibling = null)) : (tn.sibling = null) + } + } + function yo(Bt) { + var Lt = Bt.alternate !== null && Bt.alternate.child === Bt.child, + Gt = 0, + tn = 0 + if (Lt) + for (var gn = Bt.child; gn !== null; ) + (Gt |= gn.lanes | gn.childLanes), + (tn |= gn.subtreeFlags & 14680064), + (tn |= gn.flags & 14680064), + (gn.return = Bt), + (gn = gn.sibling) + else + for (gn = Bt.child; gn !== null; ) + (Gt |= gn.lanes | gn.childLanes), + (tn |= gn.subtreeFlags), + (tn |= gn.flags), + (gn.return = Bt), + (gn = gn.sibling) + return (Bt.subtreeFlags |= tn), (Bt.childLanes = Gt), Lt + } + function L0(Bt, Lt, Gt) { + var tn = Lt.pendingProps + switch ((Vs(Lt), Lt.tag)) { + case 2: + case 16: + case 15: + case 0: + case 11: + case 7: + case 8: + case 12: + case 9: + case 14: + return yo(Lt), null + case 1: + return so(Lt.type) && fo(), yo(Lt), null + case 3: + return ( + (tn = Lt.stateNode), + mp(), + tr(br), + tr(dr), + ro(), + tn.pendingContext && ((tn.context = tn.pendingContext), (tn.pendingContext = null)), + (Bt === null || Bt.child === null) && + (Up(Lt) + ? su(Lt) + : Bt === null || + (Bt.memoizedState.isDehydrated && !(Lt.flags & 256)) || + ((Lt.flags |= 1024), Wl !== null && (_f(Wl), (Wl = null)))), + _p(Bt, Lt), + yo(Lt), + null + ) + case 5: + Cu(Lt), (Gt = iu(pp.current)) + var gn = Lt.type + if (Bt !== null && Lt.stateNode != null) + Fn(Bt, Lt, gn, tn, Gt), Bt.ref !== Lt.ref && ((Lt.flags |= 512), (Lt.flags |= 2097152)) + else { + if (!tn) { + if (Lt.stateNode === null) throw Error(at(166)) + return yo(Lt), null + } + if (((Bt = iu(ss.current)), Up(Lt))) { + if (!_n) throw Error(at(175)) + ;(Bt = Kn(Lt.stateNode, Lt.type, Lt.memoizedProps, Gt, Bt, Lt, !cp)), + (Lt.updateQueue = Bt), + Bt !== null && su(Lt) + } else { + var Cn = Ut(gn, tn, Gt, Bt, Lt) + _u(Cn, Lt, !1, !1), (Lt.stateNode = Cn), Ht(Cn, gn, tn, Gt, Bt) && su(Lt) + } + Lt.ref !== null && ((Lt.flags |= 512), (Lt.flags |= 2097152)) + } + return yo(Lt), null + case 6: + if (Bt && Lt.stateNode != null) xu(Bt, Lt, Bt.memoizedProps, tn) + else { + if (typeof tn != 'string' && Lt.stateNode === null) throw Error(at(166)) + if (((Bt = iu(pp.current)), (Gt = iu(ss.current)), Up(Lt))) { + if (!_n) throw Error(at(176)) + if ( + ((Bt = Lt.stateNode), (tn = Lt.memoizedProps), (Gt = nr(Bt, tn, Lt, !cp)) && ((gn = Hs), gn !== null)) + ) + switch (((Cn = (gn.mode & 1) !== 0), gn.tag)) { + case 3: + Zr(gn.stateNode.containerInfo, Bt, tn, Cn) + break + case 5: + Jr(gn.type, gn.memoizedProps, gn.stateNode, Bt, tn, Cn) + } + Gt && su(Lt) + } else Lt.stateNode = Kt(tn, Bt, Gt, Lt) + } + return yo(Lt), null + case 13: + if ((tr(er), (tn = Lt.memoizedState), _a && As !== null && Lt.mode & 1 && !(Lt.flags & 128))) { + for (Bt = As; Bt; ) Bt = Jt(Bt) + return up(), (Lt.flags |= 98560), Lt + } + if (tn !== null && tn.dehydrated !== null) { + if (((tn = Up(Lt)), Bt === null)) { + if (!tn) throw Error(at(318)) + if (!_n) throw Error(at(344)) + if (((Bt = Lt.memoizedState), (Bt = Bt !== null ? Bt.dehydrated : null), !Bt)) throw Error(at(317)) + lr(Bt, Lt) + } else up(), !(Lt.flags & 128) && (Lt.memoizedState = null), (Lt.flags |= 4) + return yo(Lt), null + } + return ( + Wl !== null && (_f(Wl), (Wl = null)), + Lt.flags & 128 + ? ((Lt.lanes = Gt), Lt) + : ((tn = tn !== null), + (Gt = !1), + Bt === null ? Up(Lt) : (Gt = Bt.memoizedState !== null), + tn && + !Gt && + ((Lt.child.flags |= 8192), + Lt.mode & 1 && (Bt === null || er.current & 1 ? hs === 0 && (hs = 3) : jm())), + Lt.updateQueue !== null && (Lt.flags |= 4), + yo(Lt), + null) + ) + case 4: + return mp(), _p(Bt, Lt), Bt === null && $n(Lt.stateNode.containerInfo), yo(Lt), null + case 10: + return bs(Lt.type._context), yo(Lt), null + case 17: + return so(Lt.type) && fo(), yo(Lt), null + case 19: + if ((tr(er), (gn = Lt.memoizedState), gn === null)) return yo(Lt), null + if (((tn = (Lt.flags & 128) !== 0), (Cn = gn.rendering), Cn === null)) + if (tn) Rs(gn, !1) + else { + if (hs !== 0 || (Bt !== null && Bt.flags & 128)) + for (Bt = Lt.child; Bt !== null; ) { + if (((Cn = Er(Bt)), Cn !== null)) { + for ( + Lt.flags |= 128, + Rs(gn, !1), + Bt = Cn.updateQueue, + Bt !== null && ((Lt.updateQueue = Bt), (Lt.flags |= 4)), + Lt.subtreeFlags = 0, + Bt = Gt, + tn = Lt.child; + tn !== null; -A Bitcoin Podcast. -`},{children:["1ba72c1d-ff22-4572-ad24-8171bfce9de3","5efbc2c3-e67a-4b16-9c9d-285bdd37e906"],episode_title:"Bitcoin Charlotte Book Club - Sovereign Individual Ch 1-7",guests:[{name:"Bolt",profile_picture:"https://pbs.twimg.com/profile_images/1352721439879786496/wfevZ8bG_400x400.jpg",ref_id:"b165e497-f255-4ce5-9762-30c90dcf776d",twitter_handle:"Bitcoin_CLT"},{name:"Victor",profile_picture:"https://pbs.twimg.com/profile_images/1519726025013350400/GHxSzgA3_400x400.jpg",ref_id:"d91fff8d-e4c6-4aeb-9f32-021e4a4ff9a6",twitter_handle:"victorwong"},{name:"George",profile_picture:"https://pbs.twimg.com/profile_images/1173474608856608768/vEBnPUdm_400x400.jpg",ref_id:"5946bdf6-8feb-43aa-b2ca-46b2944b0572",twitter_handle:"GeorgeNotFound"},{name:"Mark",profile_picture:"https://pbs.twimg.com/profile_images/1511102924310544387/j6E29xq6_400x400.jpg",ref_id:"c8cd0c95-c105-41c4-8fae-9dbfa76d84f2",twitter_handle:"markiplier"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/fe6bdbce-e91d-43cf-ab33-0e98bffabecc.jpg",node_type:"episode",ref_id:"9dcca755-0a20-45e5-8e4d-dfe2800b9c6f",show_title:"Bitcoin Charlotte"},{children:["821f7b5c-c6ad-422b-b4e1-ed34f915e4af"],episode_title:"TABConf Mixtape Vol 2: Sound Bites from TABConf",guests:[{name:"Michael",profile_picture:"https://pbs.twimg.com/profile_images/1558687629599657990/vf-bU14b_400x400.jpg",ref_id:"c7b4faa1-db77-4459-b03f-0e41e15efae7",twitter_handle:"MichaelHawaii"},{name:"Ben",profile_picture:"https://pbs.twimg.com/profile_images/1580596905721171969/0NnLeJWA_400x400.jpg",ref_id:"da0132b9-0d19-43e6-bc1a-9c7818c79ba4",twitter_handle:"benshapiro"},{name:"brandon",profile_picture:"https://pbs.twimg.com/profile_images/1575598727812812803/4FkPb0vt_400x400.jpg",ref_id:"8a27da7a-c05c-44da-8247-3c5f68bc3164",twitter_handle:"ThrillerBitcoin"},{name:"shane",profile_picture:"https://pbs.twimg.com/profile_images/1575598727812812803/4FkPb0vt_400x400.jpg",ref_id:"2e5ce678-7d04-4a48-8bd1-281329ea9424",twitter_handle:"ThrillerBitcoin"},{name:"exfrog",profile_picture:"https://pbs.twimg.com/profile_images/1575598727812812803/4FkPb0vt_400x400.jpg",ref_id:"d0dc102c-404e-4753-9290-9a3fe27fe2ee",twitter_handle:"ThrillerBitcoin"},{name:"josh",profile_picture:"https://pbs.twimg.com/profile_images/1575598727812812803/4FkPb0vt_400x400.jpg",ref_id:"34eb29e3-da86-485f-b20a-059f7d41f6ad",twitter_handle:"ThrillerBitcoin"},{name:"autumn",profile_picture:"https://pbs.twimg.com/profile_images/1575598727812812803/4FkPb0vt_400x400.jpg",ref_id:"3224f2ec-3e77-485f-88b8-6930e19f8ac6",twitter_handle:"ThrillerBitcoin"},{name:"buck",profile_picture:"https://pbs.twimg.com/profile_images/1575598727812812803/4FkPb0vt_400x400.jpg",ref_id:"00a55ec0-9b1a-482a-893a-345d350a33a0",twitter_handle:"ThrillerBitcoin"},{name:"stephen",profile_picture:"https://pbs.twimg.com/profile_images/1575598727812812803/4FkPb0vt_400x400.jpg",ref_id:"9dc56711-eacc-4691-821e-fe2a26855ea9",twitter_handle:"ThrillerBitcoin"},{name:"hodl",profile_picture:"https://pbs.twimg.com/profile_images/1575598727812812803/4FkPb0vt_400x400.jpg",ref_id:"b012eda0-b78c-46e7-ab46-6a7139584fc7",twitter_handle:"ThrillerBitcoin"},{name:"evan",profile_picture:"https://pbs.twimg.com/profile_images/1575598727812812803/4FkPb0vt_400x400.jpg",ref_id:"9a8418e9-8976-425c-95ce-ed2fe307e380",twitter_handle:"ThrillerBitcoin"},{name:"muzz",profile_picture:"https://pbs.twimg.com/profile_images/1575598727812812803/4FkPb0vt_400x400.jpg",ref_id:"444b8330-caa1-4bcf-8144-7d9110ae2242",twitter_handle:"ThrillerBitcoin"},{name:"thomas",profile_picture:"https://pbs.twimg.com/profile_images/1575598727812812803/4FkPb0vt_400x400.jpg",ref_id:"e2140e58-314d-4425-bc97-20f52f951866",twitter_handle:"ThrillerBitcoin"},{name:"justin",profile_picture:"https://pbs.twimg.com/profile_images/1575598727812812803/4FkPb0vt_400x400.jpg",ref_id:"2ce04090-b9b1-4e84-a87f-9c9dc9ececec",twitter_handle:"ThrillerBitcoin"},{name:"stakamoto",profile_picture:"https://pbs.twimg.com/profile_images/1575598727812812803/4FkPb0vt_400x400.jpg",ref_id:"8b249d9b-8521-4e0e-bf24-2d8b8721d26b",twitter_handle:"ThrillerBitcoin"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/4240c90e-0086-4ece-bfe5-84a282c5059e.jpg",node_type:"episode",ref_id:"b8289cbb-ec69-49a8-b6ab-c1fd808acc09",show_title:"Thriller Bitcoin"},{children:["c13cad10-b242-4812-ad19-3bce525dfeb0"],episode_title:"Pieter Wuille and Tim Ruffing - Nesting, ROAST, Half-Aggregation, Adaptor Signatures (part 2)",guests:[{name:"Tim Ruffing",profile_picture:"https://pbs.twimg.com/profile_images/925128264502439936/XcmMIk8k_400x400.jpg",ref_id:"222f7374-6d68-4934-81ed-37567c515b59",twitter_handle:"real_or_random"},{name:"Pieter Wuille",profile_picture:"https://pbs.twimg.com/profile_images/1264051937172836353/n7gHdLbB_400x400.jpg",ref_id:"40260d2f-3480-47d6-8515-d2e780901273",twitter_handle:"pwuille"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/24a144b0-7ca3-40e9-9c42-86b9fce0b662.jpg",node_type:"episode",ref_id:"daddd93e-7bc6-4c50-a150-5199b437afc9",show_title:"The Chaincode Podcast"},{children:["2a01dc8c-19f7-47a8-bfa8-92645a7314c0","1510e150-aee2-42cb-ac57-79b4997bb6cb","9abcd65c-f311-4a4a-ae65-bbef89f36fc7"],episode_title:"BR023 - OP_VAULT for Bitcoin Covenants Panel ft. James O'Beirne, Rijndael, Antoine Poinsot & Carman",guests:[{name:"Carman",profile_picture:"https://pbs.twimg.com/profile_images/1609775498971725824/5vyAafE3_400x400.jpg",ref_id:"09405d70-6fa6-4f2c-92f1-a2951ad56447",twitter_handle:"benthecarman"},{name:"Antoine Poinsot",profile_picture:"https://pbs.twimg.com/profile_images/1108377445936316423/ArRDGbr5_400x400.jpg",ref_id:"1ba10809-b3e6-4e37-a906-697a0368b814",twitter_handle:"darosior"},{name:"Rijndael",profile_picture:"https://pbs.twimg.com/profile_images/1542705395873058817/0zsy4Yur_400x400.jpg",ref_id:"861d5324-8ede-4059-826f-f29abca5d7e6",twitter_handle:"rot13maxi"},{name:"James O'Beirne",profile_picture:"https://pbs.twimg.com/profile_images/1542173995650408450/iDxrdmuj_400x400.jpg",ref_id:"e8e48fcf-9e54-4c66-9b20-aacf5c5b504e",twitter_handle:"jamesob"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/f1879df9-9bc6-4a76-951f-24548da768ef.jpg",node_type:"episode",ref_id:"56bf65e9-41d5-42e1-95d6-239e4c835781",show_title:"Bitcoin.Review Podcast with NVK & Guests"},{children:["62034201-203b-42ff-9884-a850d6298caf"],episode_title:"BR020 - Zeus, Alby, Bitcoin Knots Keys Leaked +MORE ft. Sjors, Schmidty, Evan Kaloudis & Justin Moon",guests:[{name:"Sjors",profile_picture:"",ref_id:"fa5c587a-09ef-4cbd-b470-cfc78163f749",twitter_handle:""},{name:"Evan Kaloudis",profile_picture:"https://pbs.twimg.com/profile_images/1596923848997445633/DqxrGpkW_400x400.jpg",ref_id:"420172fa-9431-4ba4-965c-adab17648d1b",twitter_handle:"evankaloudis"},{name:"Schmidty",profile_picture:"https://pbs.twimg.com/profile_images/1334879848280494083/A6ssSEfV_400x400.jpg",ref_id:"28f55137-e733-4f5b-b988-7cb60ef0d330",twitter_handle:"bitschmidty"},{name:"Justin Moon",profile_picture:"https://pbs.twimg.com/profile_images/1512674225651335169/iYHDJQcy_400x400.jpg",ref_id:"1d2cdf64-358f-4b00-8f2b-0c94f798dc2c",twitter_handle:"_JustinMoon_"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/f1879df9-9bc6-4a76-951f-24548da768ef.jpg",node_type:"episode",ref_id:"ff88a8b8-bcd6-4d86-8a65-8a68def35b9f",show_title:"Bitcoin.Review Podcast with NVK & Guests"},{children:["08600eb8-a8b1-4be4-b505-3adc409da2f8","1958362b-b149-4466-b873-4d22a36d67d8"],episode_title:"BR019 - Proof of Keys Day Twitter Space ft. Lopp, Craig Raw, Lazy Ninja, mshodl, Rijndael & guests",guests:[],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/f1879df9-9bc6-4a76-951f-24548da768ef.jpg",node_type:"episode",ref_id:"810a3acb-e30e-46bc-8c67-1d504b2e7c09",show_title:"Bitcoin.Review Podcast with NVK & Guests"},{children:["f9d1d228-19db-4a2d-bfb3-7853fd745ea0","88a4665a-7414-4ccd-96e4-3fb43f93d9bc"],episode_title:"Taproot Activation Q&A with Bitcoin Devs - TABConf 2021",guests:[{name:"Andrew Chow",profile_picture:"https://pbs.twimg.com/profile_images/1452266201770496010/44FHCtZM_400x400.jpg",ref_id:"f96d87ca-5060-4021-aeb9-61db03312027",twitter_handle:"andrewrchow"},{name:"Ben Carman",profile_picture:"https://pbs.twimg.com/profile_images/1550704386007089152/pLwUSeff_400x400.jpg",ref_id:"1d1e95ba-b4af-415f-aafe-85c6dd7571b8",twitter_handle:"benthecarman"},{name:"Matt Corallo",profile_picture:"https://pbs.twimg.com/profile_images/697361498587451394/_rX0-O0W_400x400.png",ref_id:"08cb3c45-c0bc-4a60-ae5b-a1283d352c8b",twitter_handle:"TheBlueMatt"},{name:"Pieter Wuille",profile_picture:"https://pbs.twimg.com/profile_images/1264051937172836353/n7gHdLbB_400x400.jpg",ref_id:"40260d2f-3480-47d6-8515-d2e780901273",twitter_handle:"pwuille"},{name:"Vivek Kasarabada",profile_picture:"",ref_id:"60ed22d0-8cf3-410e-8a7c-9c343ae109ca",twitter_handle:""},{name:"Murch",profile_picture:"https://pbs.twimg.com/profile_images/1269477743525130241/-U843Cmt_400x400.png",ref_id:"3e2c1c73-a057-4475-9782-3bb0d3d8cc62",twitter_handle:"murchandamus"},{name:"Andrew Poelstra",profile_picture:"https://pbs.twimg.com/profile_images/1316562683009921024/FSscAYvJ_400x400.jpg",ref_id:"15fb9c53-c988-4af1-bbf0-4832d71b0a01",twitter_handle:"Blockstream"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/e7d2a4ca-6b44-4a45-a94c-6f48987979f7.jpg",node_type:"episode",ref_id:"f7e75069-adf6-41b0-9bb7-a6a2aa846493",show_title:"TABConf (The Atlanta Bitcoin Conference)"},{children:["cd29b1a1-f94b-4eee-84ce-ddf8a4fcb0c5"],episode_title:"Lightning for Plebs - TABConf 2021",guests:[{name:"ketominer",profile_picture:"https://pbs.twimg.com/profile_images/1245972079528329218/YDUD9N2Q_400x400.jpg",ref_id:"2f8b0b59-6f23-4c89-973c-668cc7666998",twitter_handle:"ketominer"},{name:"Ryan Gentry",profile_picture:"https://pbs.twimg.com/profile_images/1362751223217160203/ekMa_yY-_400x400.jpg",ref_id:"8fe78b55-bc38-40df-9cb5-ffd5c84166a2",twitter_handle:"RyanTheGentry"},{name:"Dread",profile_picture:"https://pbs.twimg.com/profile_images/1532557131819491328/vvs1cD-7_400x400.jpg",ref_id:"e61af76b-8fbd-4719-b753-0a70edd22fa8",twitter_handle:"PoleVaultDream"},{name:"Andre Neves",profile_picture:"https://pbs.twimg.com/profile_images/1604172627550969856/bYCGb7Ev_400x400.jpg",ref_id:"227e071d-f8a6-4137-8078-729fa9eb3a13",twitter_handle:"andreneves"},{name:"Nate G",profile_picture:"https://pbs.twimg.com/profile_images/1542983032507858944/9w_UUx5Z_400x400.jpg",ref_id:"bda29551-f17f-452c-9204-4d6cafdf4f3b",twitter_handle:"natecgriffin"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/e7d2a4ca-6b44-4a45-a94c-6f48987979f7.jpg",node_type:"episode",ref_id:"6eb2a481-408f-4989-9f28-67789651259a",show_title:"TABConf (The Atlanta Bitcoin Conference)"},{children:["6731ba0c-c57b-4fb1-a2f6-6e1ec641e830"],episode_title:"Brink Projects: Research and Improvements for Bitcoin - TABConf 2021",guests:[{name:"Gloria Zhao",profile_picture:"https://pbs.twimg.com/profile_images/1144496084330266631/aPKPfoX3_400x400.png",ref_id:"cebd71c3-4ccf-452d-8ba7-4982f49fd060",twitter_handle:"GloriaHuiZhao"},{name:"Mike Schmidt",profile_picture:"https://pbs.twimg.com/profile_images/1320935020589158400/gFovyRlj_400x400.jpg",ref_id:"d503db9b-a7b1-49e1-8ef6-7541df3c2473",twitter_handle:"nytmike"},{name:"Jesse Posner",profile_picture:"https://pbs.twimg.com/profile_images/1467067234484830213/T6PtLZq1_400x400.jpg",ref_id:"bb55767f-dfbb-4182-8dd8-e1b08e0c6ad6",twitter_handle:"jesseposner"},{name:"Larry Ruane",profile_picture:"https://pbs.twimg.com/profile_images/1226076521/bike_crop_400x400.JPG",ref_id:"ce38f2dd-d41f-4957-ad83-671c3dc29cc5",twitter_handle:"larryruane"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/e7d2a4ca-6b44-4a45-a94c-6f48987979f7.jpg",node_type:"episode",ref_id:"89049a1c-0171-4999-b003-57e1b57d92b2",show_title:"TABConf (The Atlanta Bitcoin Conference)"},{children:["acdb65ab-789f-480c-9f88-414599d19a43"],episode_title:"Scaling Bitcoin Off-Chain - TABConf 2021",guests:[{name:"Graham Krizek",profile_picture:"https://pbs.twimg.com/profile_images/1600169182347288582/yNztRz0g_400x400.jpg",ref_id:"186974f3-37dd-4d62-9d88-1b7fa88c6cce",twitter_handle:"gkrizek"},{name:"Stephen Livera",profile_picture:"https://pbs.twimg.com/profile_images/1362551718110580740/v-W5Q2uo_400x400.jpg",ref_id:"9c9974bd-6a59-480f-8d5a-12b634b15b39",twitter_handle:"stephanlivera"},{name:"Alex Bosworth",profile_picture:"https://pbs.twimg.com/profile_images/1364274244960481281/G5gNi3di_400x400.jpg",ref_id:"2389663a-f7f8-42a7-99da-551089a9ea6a",twitter_handle:"alexbosworth"},{name:"Matt Corallo",profile_picture:"https://pbs.twimg.com/profile_images/697361498587451394/_rX0-O0W_400x400.png",ref_id:"08cb3c45-c0bc-4a60-ae5b-a1283d352c8b",twitter_handle:"TheBlueMatt"},{name:"Niftynei",profile_picture:"https://pbs.twimg.com/profile_images/1594756549162975240/J-4dbH6W_400x400.jpg",ref_id:"5e9f617b-cc12-4e3d-9fb5-ad058f14b171",twitter_handle:"niftynei"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/e7d2a4ca-6b44-4a45-a94c-6f48987979f7.jpg",node_type:"episode",ref_id:"d842ce17-a4c0-49a6-bdc5-5268f1d61779",show_title:"TABConf (The Atlanta Bitcoin Conference)"},{children:["65a9d9c6-3211-444a-a49f-f4a34b9ab5fb","d96fca70-c1c7-4b71-9d35-9aadf2820909"],episode_title:"Scaling Bitcoin On-Chain - TABConf 2021",guests:[{name:"Andrew Chow",profile_picture:"https://pbs.twimg.com/profile_images/1452266201770496010/44FHCtZM_400x400.jpg",ref_id:"f96d87ca-5060-4021-aeb9-61db03312027",twitter_handle:"andrewrchow"},{name:"Mark Erhardt Murch",profile_picture:"https://pbs.twimg.com/profile_images/1269477743525130241/-U843Cmt_400x400.png",ref_id:"ef2f2f68-ae16-4e78-80cb-0be9bd156988",twitter_handle:"Murchandamus"},{name:"Andrew Poelstra",profile_picture:"https://pbs.twimg.com/profile_images/1316562683009921024/FSscAYvJ_400x400.jpg",ref_id:"15fb9c53-c988-4af1-bbf0-4832d71b0a01",twitter_handle:"Blockstream"},{name:"Peter Wuille",profile_picture:"https://pbs.twimg.com/profile_images/1264051937172836353/n7gHdLbB_400x400.jpg",ref_id:"fb836ce4-a933-4419-99d8-932fe65219a1",twitter_handle:"pwuille"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/e7d2a4ca-6b44-4a45-a94c-6f48987979f7.jpg",node_type:"episode",ref_id:"8d9b0689-2e69-44c1-afe2-3519e999390a",show_title:"TABConf (The Atlanta Bitcoin Conference)"},{children:["9f69933d-69fe-47a0-af4d-9d80726e60aa","f507641d-2514-41d3-a4f3-9b218136fa98","addee850-119f-472c-87c2-05fc0642abeb"],episode_title:"Cool Apps Built on Lightning - March 16, 2022 - Voltage Twitter Spaces",guests:[{name:"Chad Atkins",profile_picture:"https://pbs.twimg.com/profile_images/1200611447979544576/W9ocRJTb_400x400.jpg",ref_id:"62da3c50-0a46-400b-81a3-5f482f5b8fee",twitter_handle:"Chemchad"},{name:"Michael Atwood",profile_picture:"https://pbs.twimg.com/profile_images/1362207977470521345/Jy2_Ge60_400x400.jpg",ref_id:"16359ade-afb9-4a37-be0b-0844a6134327",twitter_handle:"Dooowta"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/2ec62250-4755-4616-8342-096a2cfab95f.jpg",node_type:"episode",ref_id:"3b818893-4605-499c-a467-5abcc23f9483",show_title:"Voltage"},{children:["c7beffcd-bb44-4cf9-a04a-a26f6439114c","3db5f375-817e-4275-980c-6475803c430b"],episode_title:"Lightning Networks Impact on Music w/ Michael Rhee, Founder of Wavlake - Voltage Twitter Spaces",guests:[{name:"Michael Rhee",profile_picture:"https://pbs.twimg.com/profile_images/1348612450/IMG_0298_400x400.JPG",ref_id:"91302fb9-2d08-400e-bd1f-2d52e0af5508",twitter_handle:"rheedio"},{name:"@rheedio",profile_picture:"https://pbs.twimg.com/profile_images/1348612450/IMG_0298_400x400.JPG",ref_id:"a20f5e1f-5969-47a6-b986-faf29c0c4da0",twitter_handle:"rheedio"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/2ec62250-4755-4616-8342-096a2cfab95f.jpg",node_type:"episode",ref_id:"a44e78cd-dc66-4b67-9523-7ddff0d3655f",show_title:"Voltage"},{children:["f10270d7-1cdc-4922-853a-1f8247750382","d2d3e71f-24ad-4cf3-b516-f63ac5283d50"],episode_title:"TRUBIT bringing Digital Loyalty Assets to Bitcoin - Voltage Twitter Spaces",guests:[{name:"@0xLinden",profile_picture:"https://pbs.twimg.com/profile_images/1439365331202437125/JBiXogun_400x400.jpg",ref_id:"b8bb4402-8f86-4220-9dee-0fa28ff8de72",twitter_handle:"0xLinden"},{name:"Stephen Doge",profile_picture:"https://pbs.twimg.com/profile_images/1215979900387184641/nZXkhgoP_400x400.jpg",ref_id:"076972a2-cdab-4766-8c66-618472b80772",twitter_handle:"StephenDodge20"},{name:"@617a7a",profile_picture:"https://pbs.twimg.com/profile_images/1548336437308715016/FUZFJf9k_400x400.jpg",ref_id:"148d77a5-6e95-4855-9e17-19e68f648898",twitter_handle:"617a7a"},{name:"@ian__major",profile_picture:"https://pbs.twimg.com/profile_images/1427414299169984517/Hw0ux6ie_400x400.jpg",ref_id:"7ed41a74-21a4-43a4-9a05-e977c981b6d3",twitter_handle:"ian__major"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/2ec62250-4755-4616-8342-096a2cfab95f.jpg",node_type:"episode",ref_id:"0c4f330b-a39d-4312-9775-58b42c7c9723",show_title:"Voltage"},{children:["076eecc3-0553-4bb7-8fe2-9f43a6d54f79","4310fd96-1c4f-42a7-b72f-60fc5968c75d","3d451e38-8616-43bc-8269-c3b8ce7d9b15","ca89bac3-188b-4e90-8d0b-fe42d0abf067","d0f57eb5-87ba-4180-ad39-96589093a0f0"],episode_title:"Small Businesses Embracing Bitcoin w/ Michael from Oshi App - Voltage Twitter Spaces",guests:[{name:"Michael Atwood",profile_picture:"https://pbs.twimg.com/profile_images/1362207977470521345/Jy2_Ge60_400x400.jpg",ref_id:"16359ade-afb9-4a37-be0b-0844a6134327",twitter_handle:"Dooowta"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/2ec62250-4755-4616-8342-096a2cfab95f.jpg",node_type:"episode",ref_id:"205a0650-fefe-4aaf-a894-faa8b72d966a",show_title:"Voltage"},{children:["e9443306-25af-42d3-830d-ed6a26721103"],episode_title:"Austin Bitcoin Design Club Interview w/ Sahil, FuturePaul, and Car",guests:[{name:"Car Gonzalez",profile_picture:"https://pbs.twimg.com/profile_images/1541855444720836608/F4v02BuD_400x400.jpg",ref_id:"b554604d-47eb-4c7c-b6c9-87a062e6a844",twitter_handle:"Car_mdq_2010"},{name:"Sahil Chaturvedi",profile_picture:"https://pbs.twimg.com/profile_images/1362511727066107904/yP4o43cz_400x400.jpg",ref_id:"8b56eaa4-c9d6-46e8-a313-fbccd0ee86b5",twitter_handle:"SahilC0"},{name:"Future Paul",profile_picture:"https://pbs.twimg.com/profile_images/1508452962917666821/1QheRD09_400x400.jpg",ref_id:"ec933e22-f395-4817-b608-4337eaaf60a4",twitter_handle:"futurepaul"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/2ec62250-4755-4616-8342-096a2cfab95f.jpg",node_type:"episode",ref_id:"a60dc641-5d14-4960-ab73-66ff199edd1d",show_title:"Voltage"},{children:["f3d0a35e-3e21-4c0c-874c-d6f2b1f37eed"],episode_title:"The Future of Bitcoin Technology with Pierre Rochard, Dhruv Bansal, Warren Togami and Guy Swann",guests:[{name:"Warren Togami",profile_picture:"https://pbs.twimg.com/profile_images/1577819570039128065/bBmumEx9_400x400.jpg",ref_id:"f082b94a-673f-4b99-b46e-49a342b5792a",twitter_handle:"wtogami"},{name:"Dhruv Bansal",profile_picture:"https://pbs.twimg.com/profile_images/908397811284172800/kR9kKNsE_400x400.jpg",ref_id:"6ed2b14a-d97d-4a3f-b5b5-4c3222d85624",twitter_handle:"dhruvbansal"},{name:"Pierre Rochard",profile_picture:"https://pbs.twimg.com/profile_images/1567258180861792256/EEEBkvQR_400x400.jpg",ref_id:"426b30ba-7c24-4558-b926-ec307756a876",twitter_handle:"BitcoinPierre"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/492cbcce-3744-4d8b-b2ca-3a7f063e798a.jpg",node_type:"episode",ref_id:"3af98dc1-5e7c-4ef3-ad74-b9b6afaee8b9",show_title:"Swan Bitcoin"},{children:["6e890ef3-7358-40d6-a01f-44f444dbabfc"],episode_title:"#Bitcoin Mining Saves the World - Brought to you by Marathon",guests:[{name:"Steve Barbour",profile_picture:"https://pbs.twimg.com/profile_images/1592714173469065216/q8kXPyQI_400x400.jpg",ref_id:"63a731b8-4759-4360-9e9d-d66f884e12d8",twitter_handle:"SGBarbour"},{name:"Nathaniel Harmon",profile_picture:"https://pbs.twimg.com/profile_images/1578090357102780416/etXW-RA9_400x400.jpg",ref_id:"9105fb4e-4150-4c25-90f1-8ea770585749",twitter_handle:"NateHawaii"},{name:"Taylor Monnig",profile_picture:"https://pbs.twimg.com/profile_images/1599563776621219840/mvb8y3zY_400x400.jpg",ref_id:"b8513b01-ff94-4d7f-944f-5c92e1126885",twitter_handle:"taylorbmonnig"},{name:"Harry Suddock",profile_picture:"",ref_id:"6440ea0f-c982-4b76-b7c2-9c6bf7e9a4a9",twitter_handle:""}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/492cbcce-3744-4d8b-b2ca-3a7f063e798a.jpg",node_type:"episode",ref_id:"625d9252-2f5e-4f53-b577-dd2dfd4d4749",show_title:"Swan Bitcoin"},{children:["876e20ef-be1b-44e6-a77d-4af5beb33ad4"],episode_title:"Austin Bitcoin Club: August - Value for Value Panel",guests:[{name:"Justin Rezvani",profile_picture:"https://pbs.twimg.com/profile_images/1574666257781104641/hWG0vkSQ_400x400.jpg",ref_id:"b00877d0-ccbe-4c77-9c8c-88ab15063150",twitter_handle:"justin_rezvani"},{name:"Lyle Pratt",profile_picture:"https://pbs.twimg.com/profile_images/1477702801962721285/KqnrA7oU_400x400.jpg",ref_id:"ab752a01-84bb-4260-a683-2eb5798b1dce",twitter_handle:"lylepratt"},{name:"Keyan Kousha",profile_picture:"https://pbs.twimg.com/profile_images/1403763601391951878/ybuppfHt_400x400.jpg",ref_id:"7ef39c9b-63ba-4dd0-989e-2230afb45129",twitter_handle:"k00bideh"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/b29c81c8-cccd-4a6b-b78f-3c1591a54d27.jpg",node_type:"episode",ref_id:"8eef2f82-bbf9-4fef-ba3d-102679d4a1a5",show_title:"Austin Bitcoin Club"},{children:["b9fd54d3-49e8-44e1-a208-7780d50a3b3a"],episode_title:"Synonym Spaces Lightning Tokens",guests:[{name:"Paolo Ardoino",profile_picture:"https://pbs.twimg.com/profile_images/1583467513198923781/nCWMWFIn_400x400.jpg",ref_id:"9bb3e215-6065-4fe2-aac5-2b1d5545d48c",twitter_handle:"paoloardoino"},{name:"John Carvalho",profile_picture:"https://pbs.twimg.com/profile_images/1601964735016177676/c1mAfspt_400x400.jpg",ref_id:"f28f037f-a3af-48af-bdd3-28023219b524",twitter_handle:"BitcoinErrorLog"},{name:"Reza Bandegi",profile_picture:"https://pbs.twimg.com/profile_images/1446675390370500614/4LGHNSkl_400x400.jpg",ref_id:"ead50c13-2f13-4ffc-86b5-5a3eb49a5804",twitter_handle:"r32a_"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/63e0cbc0-731d-4ea0-9dd2-2b8b841eb28a.jpg",node_type:"episode",ref_id:"a1e3c3cf-2045-4c33-8152-0e162b7ca729",show_title:"Synonym"},{children:["d98bc278-4c35-4325-992c-78437ccf3569","144eff69-fd7a-48da-b92f-bb5b13e0b4f7","9f9305dd-fff2-4bb3-9e3f-698a55090999"],episode_title:"Blockware Intelligence Podcast: 2022 Highlights",guests:[{name:"Michael",profile_picture:"https://pbs.twimg.com/profile_images/1558687629599657990/vf-bU14b_400x400.jpg",ref_id:"c7b4faa1-db77-4459-b03f-0e41e15efae7",twitter_handle:"MichaelHawaii"},{name:"Cory Klippsten",profile_picture:"https://pbs.twimg.com/profile_images/1569687200857755648/fxiCeaqc_400x400.jpg",ref_id:"ddfb9b4c-4e6a-4f4c-a01b-e6bb1bc55464",twitter_handle:"coryklippsten"},{name:"Joe Consorti",profile_picture:"https://pbs.twimg.com/profile_images/1596902707511664640/GYGWVDts_400x400.jpg",ref_id:"8d2024b2-03bb-454d-9bd6-bb121904b76a",twitter_handle:"JoeConsorti"},{name:"Jeff Booth",profile_picture:"https://pbs.twimg.com/profile_images/1362957991410954241/spiaMAg2_400x400.jpg",ref_id:"f1143bcc-9ab9-4716-8259-0e5b026f8039",twitter_handle:"JeffBooth"},{name:"James Lavish",profile_picture:"https://pbs.twimg.com/profile_images/1466279082157502464/flD6cWI3_400x400.jpg",ref_id:"cf06ab2d-2ff3-4d7b-bef6-b996ae68517a",twitter_handle:"jameslavish"},{name:"Adam O",profile_picture:"https://pbs.twimg.com/profile_images/1395896857990160391/tJpgS2_p_400x400.jpg",ref_id:"95af0dd3-1e27-41b9-a36b-8a2c44438e85",twitter_handle:"denverbitcoin"},{name:"Jack Mallers",profile_picture:"https://pbs.twimg.com/profile_images/1599778945699909632/O0qc9ykA_400x400.jpg",ref_id:"d2e4aac5-e5e1-42fc-8f08-b3a77c076a64",twitter_handle:"jackmallers"},{name:"Lyn Alden",profile_picture:"https://pbs.twimg.com/profile_images/1521181379677073414/bm4LcJTr_400x400.jpg",ref_id:"903381dd-4b8a-4b59-8ecd-3281ae3ba297",twitter_handle:"LynAldenContact"},{name:"Dylan LeClair",profile_picture:"https://pbs.twimg.com/profile_images/1508157904913899522/3l7ctauV_400x400.jpg",ref_id:"283edea0-55cf-4245-95df-8d6d3dcb1851",twitter_handle:"DylanLeClair_"},{name:"Jeff Ross",profile_picture:"https://pbs.twimg.com/profile_images/1475554600094552064/DSlPG1lx_400x400.jpg",ref_id:"ae6ee2a2-1cf7-41a0-8366-ff6e94a6403c",twitter_handle:"VailshireCap"},{name:"Stacy Herbert",profile_picture:"https://pbs.twimg.com/profile_images/1546484196750905346/5WYPz-bc_400x400.jpg",ref_id:"7477463b-1f3a-4b83-94c3-9d5a63b576c0",twitter_handle:"Stacyherbert"},{name:"Greg Foss",profile_picture:"https://pbs.twimg.com/profile_images/1552599670945464320/3OgqRHNo_400x400.jpg",ref_id:"853d9f80-f6cf-490f-9d1e-f29cdc6acc6f",twitter_handle:"FossGregfoss"},{name:"Preston Pysh",profile_picture:"https://pbs.twimg.com/profile_images/1408783276081299462/f4Ye5n7-_400x400.jpg",ref_id:"01ad2c81-2d0c-44a9-93a1-42c07287aa80",twitter_handle:"PrestonPysh"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/ea2cf2ae-76de-4185-818c-384b3b06228b.jpg",node_type:"episode",ref_id:"e06b030a-063e-4894-9914-d326220f75f8",show_title:"Blockware Intelligence"},{children:["87520be0-ad60-48d0-aba6-44aec1452a09"],episode_title:"A Christmas Trip! | EP 20",guests:[{name:"Erik Cason",profile_picture:"https://pbs.twimg.com/profile_images/1528431738145361921/roDCkAUy_400x400.jpg",ref_id:"345e1da8-42ed-442b-8b90-ecb44bab61a1",twitter_handle:"Erikcason"},{name:"FractalEncrypt",profile_picture:"https://pbs.twimg.com/profile_images/1588218887807680512/lFJArP4n_400x400.jpg",ref_id:"888ea071-8312-4aca-b229-7447217e59f0",twitter_handle:"FractalEncrypt"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/e79b1a57-ecd0-4df3-b8ec-1a1a55d047e7.jpg",node_type:"episode",ref_id:"b707bbd8-1a9e-4aee-8e0e-2fe0be24c851",show_title:"Pleb UnderGround"},{children:["d4948551-6ec5-4649-a700-364592e09edd","25e36282-297b-4f9d-b6e9-da65731be8a8","53cab9be-0f22-42a2-aef5-87920c2431cf","6028f484-d0b9-424a-87e5-d0dcb39f9fc7","092e9794-afc9-41fe-a635-4802777415a1","092e9794-afc9-41fe-a635-4802777415a1","36f1f7e1-df70-4528-8474-4bba448b1ed0","36f1f7e1-df70-4528-8474-4bba448b1ed0","6d267cc1-22b1-42fc-9b60-9701e64a75d0","6d267cc1-22b1-42fc-9b60-9701e64a75d0"],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/7de0d293-8ae3-4362-8500-8f7300f3fe41.jpg",node_type:"show",ref_id:"7de0d293-8ae3-4362-8500-8f7300f3fe41",show_title:"Unchained"},{children:["a7afaa66-6878-40c2-97fd-88a20ae007fd","910f5aab-7896-4c19-8649-64dcef44c369"],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/4e607036-8fde-48ef-ab76-9c2ac4bab031.jpg",node_type:"show",ref_id:"4e607036-8fde-48ef-ab76-9c2ac4bab031",show_title:"What Bitcoin Did with Peter McCormack"},{children:["47c54384-785c-4a4b-bad1-cac242d8f190","aa033894-120f-494e-9d6b-c6d62dfb0a69","aa033894-120f-494e-9d6b-c6d62dfb0a69","53402b84-7b30-4fec-a741-d9ef8fa03389","53402b84-7b30-4fec-a741-d9ef8fa03389","53402b84-7b30-4fec-a741-d9ef8fa03389","3a9db5f7-6722-469c-a0c6-6b157f44f33f","3a9db5f7-6722-469c-a0c6-6b157f44f33f","3a9db5f7-6722-469c-a0c6-6b157f44f33f"],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/9e7e229f-2631-4542-b5d7-7fcd502798dc.jpg",node_type:"show",ref_id:"9e7e229f-2631-4542-b5d7-7fcd502798dc",show_title:"Bitcoin Audible"},{children:["fccdc763-2b69-4418-9a7a-78cdfe615ba9"],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/b6c52903-5124-43f4-8632-bc9aeb941f2e.jpg",node_type:"show",ref_id:"b6c52903-5124-43f4-8632-bc9aeb941f2e",show_title:"The Kevin Rooke Show"},{children:["ae631d96-3b81-4308-bcc1-a57f81339b5c","ae631d96-3b81-4308-bcc1-a57f81339b5c","4bea6c89-43b4-4e5e-9fea-0662d9ee7c00","4bea6c89-43b4-4e5e-9fea-0662d9ee7c00"],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/b79a3eb8-bcd0-4338-b979-d32aef360785.jpg",node_type:"show",ref_id:"b79a3eb8-bcd0-4338-b979-d32aef360785",show_title:"Stephan Livera Podcast"},{children:["46277681-3564-4504-9ca8-e2f41d658d28","b05fa33c-fc91-4b55-a592-85eaa1a5b3fd","b723d81b-9c99-4797-b3a8-67f824924f0c","eaeec64e-8e03-4826-a7c5-e1969a71ca2d","922ae599-5631-4ffe-977e-a9174fc028bb","b534755c-92b6-4df1-b1f9-a28578661f48","b317d76a-25e6-42f6-bc97-3de9f6c3f081","94e1df77-e561-4361-b8ad-e98862d6e51a","94e1df77-e561-4361-b8ad-e98862d6e51a","94e1df77-e561-4361-b8ad-e98862d6e51a","10c6d370-de6e-4a37-9981-d2c27e69d9e0","a52e09df-91bc-4997-ad65-725ee971af2b","a52e09df-91bc-4997-ad65-725ee971af2b","95403824-42d5-4fe8-b50b-72e08ab368c8","2e6613fa-ef17-413b-9158-0e3be5d5ae51","2e6613fa-ef17-413b-9158-0e3be5d5ae51","2e6613fa-ef17-413b-9158-0e3be5d5ae51","c0895c34-042b-4f51-a884-2330d9f83bc7","638c47da-8592-4d7b-aa1a-20e28fa0499f","638c47da-8592-4d7b-aa1a-20e28fa0499f","2e84c98a-d7d8-4341-a129-3f4eaebe1e3e","6b8fbd46-fa4a-4d07-a142-9aeb242d249f","f3b67780-d9c2-4a20-ab5c-115032a05b3a","f3b67780-d9c2-4a20-ab5c-115032a05b3a","1bf7b1ea-f717-4c0f-ae66-0e00b26603df","7070839d-051e-48e4-bd9a-95c09b310db2","728d91e9-025d-43a7-8467-2c8d264ddf59","728d91e9-025d-43a7-8467-2c8d264ddf59","c8ae0def-c33c-4d17-af4e-31ddaeedaf8a","c8ae0def-c33c-4d17-af4e-31ddaeedaf8a","c8ae0def-c33c-4d17-af4e-31ddaeedaf8a","c8ae0def-c33c-4d17-af4e-31ddaeedaf8a","b87feb17-6926-4295-b2c2-d1c2e9d49ca8","b87feb17-6926-4295-b2c2-d1c2e9d49ca8","b87feb17-6926-4295-b2c2-d1c2e9d49ca8","f29a41a4-6764-439e-9fcf-74fefaffc681","065c0900-4e3c-48a0-87b8-4068dc441c82","87cd8227-9464-45ed-8512-4e545d3812c2","2f714adf-e499-4c1f-9864-016a00737153","bbf0a536-990b-49b4-a9c3-a2a40fa38f88","bbf0a536-990b-49b4-a9c3-a2a40fa38f88","0ade0cc4-6303-4e28-8b00-6b3e659c1e3a","9523aa00-daf4-42af-b25b-75d9682bc5a6"],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/419512c2-e309-4b25-bfe2-cd481d53f66d.jpg",node_type:"show",ref_id:"419512c2-e309-4b25-bfe2-cd481d53f66d",show_title:"BTC Sessions"},{children:["919ca76f-b3c7-48f1-9f5f-872537d43632"],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/7934bd86-9344-4f1a-9c36-ea5f63ae418e.jpg",node_type:"show",ref_id:"7934bd86-9344-4f1a-9c36-ea5f63ae418e",show_title:"The Pomp Podcast"},{children:["ded2e35d-9fec-4bad-90f7-f3102d4eebd5"],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/5fc9c8b0-687f-487e-bde3-bea15e155e3e.jpg",node_type:"show",ref_id:"5fc9c8b0-687f-487e-bde3-bea15e155e3e",show_title:"Bitcoin Takeover Podcast"},{children:["2536a974-d668-4ac2-8613-0b37aa0ca08c","2536a974-d668-4ac2-8613-0b37aa0ca08c","2536a974-d668-4ac2-8613-0b37aa0ca08c","2536a974-d668-4ac2-8613-0b37aa0ca08c","2536a974-d668-4ac2-8613-0b37aa0ca08c"],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/3e178b7d-b8b9-4fd4-ba36-017b834537da.jpg",node_type:"show",ref_id:"3e178b7d-b8b9-4fd4-ba36-017b834537da",show_title:"Bitcoin Fixes This"},{children:["43dd10a8-c5d5-4643-9432-93868289f163","6e8b01d5-df4f-4124-a13a-3ee9c93c8eb2","3475140b-3e58-494f-b929-59e6ec5f1636"],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/1583c7c4-f4f2-4e52-8f27-a1eaeb6289fd.jpg",node_type:"show",ref_id:"1583c7c4-f4f2-4e52-8f27-a1eaeb6289fd",show_title:"Bitcoin Magazine Podcast"},{children:["68309686-0bf0-4156-8f95-615ba255fdc4","52f31c46-14c5-49f1-9836-70862c6f6567","665facde-c1bd-4091-a071-09e28606b863"],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/a09a2c49-84f1-4d0b-b150-6e6103f4ee41.jpg",node_type:"show",ref_id:"a09a2c49-84f1-4d0b-b150-6e6103f4ee41",show_title:"Citadel Dispatch"},{children:["274ecab4-c5d8-4ad7-9e16-b1cb5dd39d13","274ecab4-c5d8-4ad7-9e16-b1cb5dd39d13","933d3953-2983-4a8b-a4dc-e9615eeecb88","8a89a96d-5877-4d00-9e11-c33d19ed7264","8a89a96d-5877-4d00-9e11-c33d19ed7264","8a89a96d-5877-4d00-9e11-c33d19ed7264","249e2426-55d6-473c-bbe0-4bebf74594e9","249e2426-55d6-473c-bbe0-4bebf74594e9","0f13f1e8-6031-4920-86bf-c2fbcaaed641","0f13f1e8-6031-4920-86bf-c2fbcaaed641"],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/cd6b8d64-bd52-4f1e-86b3-ca8ba2eb169f.jpg",node_type:"show",ref_id:"cd6b8d64-bd52-4f1e-86b3-ca8ba2eb169f",show_title:"Bitcoin.Review"},{children:["993787ca-ce29-4d5b-b834-37a83ea2125a"],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/afa24463-19f7-4875-b6f4-b261d1d6c648.jpg",node_type:"show",ref_id:"afa24463-19f7-4875-b6f4-b261d1d6c648",show_title:"Orange Pill Podcast"},{children:["72c4dd20-64fa-4d68-a0bd-ac50207ae1c0","cc447ce2-af39-4938-8ec8-2d70a6cfd851"],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/99d17d22-4448-4267-9065-f55b341f43d2.jpg",node_type:"show",ref_id:"99d17d22-4448-4267-9065-f55b341f43d2",show_title:"The Money Movement"},{children:["337981db-17c3-4c4e-8195-26cda6855ead","337981db-17c3-4c4e-8195-26cda6855ead"],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/ca3ab815-dc2e-408a-a0c5-8bbe50270a97.jpg",node_type:"show",ref_id:"ca3ab815-dc2e-408a-a0c5-8bbe50270a97",show_title:'The "What is Money?" Show'},{children:["b43f377d-6599-421b-af45-a8ecee409420","b43f377d-6599-421b-af45-a8ecee409420"],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/abd94520-1490-42aa-b349-9e861494a654.jpg",node_type:"show",ref_id:"abd94520-1490-42aa-b349-9e861494a654",show_title:"Economy Guy"},{children:["705db675-bc09-4cba-b578-e9904f339f55"],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/58189b3c-aa25-408d-8c5e-76f97c9501da.jpg",node_type:"show",ref_id:"58189b3c-aa25-408d-8c5e-76f97c9501da",show_title:"Mises University 2017"},{children:["a12faf50-f4fb-472d-b3a1-030747594fa5","a12faf50-f4fb-472d-b3a1-030747594fa5"],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/5cdd0aef-f1a7-4d3b-8336-7f81c2db4a40.jpg",node_type:"show",ref_id:"5cdd0aef-f1a7-4d3b-8336-7f81c2db4a40",show_title:"The Bitcoin Standard Podcast"},{children:["87054fe7-6a5c-471a-b518-5e9414d0c644"],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/4bb9069b-a373-4b1c-9cda-024b2bf4dc84.jpg",node_type:"show",ref_id:"4bb9069b-a373-4b1c-9cda-024b2bf4dc84",show_title:"We Study Billionaires - The Investor’s Podcast Network"},{children:["04dd4023-ed42-4259-921c-e305af656389"],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/3325efce-80a8-490c-8645-cad1b9a22d94.jpg",node_type:"show",ref_id:"3325efce-80a8-490c-8645-cad1b9a22d94",show_title:"Crypto Voices"},{children:["c6ecd519-ce8f-45b5-89ca-30a6a017f5d6"],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/357dc2db-2643-49f0-9393-5a20ed21d0fe.jpg",node_type:"show",ref_id:"357dc2db-2643-49f0-9393-5a20ed21d0fe",show_title:"The Anita Posch Show: A Bitcoin only podcast"},{children:["b94dbd49-6ac1-497c-8f5b-d13140968920"],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/710ac70a-11fc-40ec-a2a2-01b92fb8015e.jpg",node_type:"show",ref_id:"710ac70a-11fc-40ec-a2a2-01b92fb8015e",show_title:"Quoth the Raven"},{children:["406ce1e1-5f39-4c94-907c-eb5e501d2c64"],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/da1bbdc0-4d0a-43ed-8345-ee43102db244.jpg",node_type:"show",ref_id:"da1bbdc0-4d0a-43ed-8345-ee43102db244",show_title:"Mercatus Policy Download"},{children:["9585c916-c55a-4284-b348-f8a52c24dc8d","9585c916-c55a-4284-b348-f8a52c24dc8d","9585c916-c55a-4284-b348-f8a52c24dc8d","1d938eb2-3bc2-4268-85d1-8967a1292a18","1d938eb2-3bc2-4268-85d1-8967a1292a18"],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/93a6fe5b-364c-43f4-9f38-7da3e811460b.jpg",node_type:"show",ref_id:"93a6fe5b-364c-43f4-9f38-7da3e811460b",show_title:"CRYPTO 101"},{children:["50ab3e37-ccb3-4902-825b-a9da36579707","50ab3e37-ccb3-4902-825b-a9da36579707","50ab3e37-ccb3-4902-825b-a9da36579707"],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/6ec51741-3d93-4116-a619-d62a7cee1feb.jpg",node_type:"show",ref_id:"6ec51741-3d93-4116-a619-d62a7cee1feb",show_title:"Radio Rothbard"},{children:["8ec14282-c5bc-4da6-b516-3140efaf6b8f","8ec14282-c5bc-4da6-b516-3140efaf6b8f","8ec14282-c5bc-4da6-b516-3140efaf6b8f","8ec14282-c5bc-4da6-b516-3140efaf6b8f","2fee3ffd-e6f5-4fbf-9cac-2b8977b93b79"],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/f2b2a2b2-8869-4256-94b9-a91c91c1ce7e.jpg",node_type:"show",ref_id:"f2b2a2b2-8869-4256-94b9-a91c91c1ce7e",show_title:"Economics For Business"},{children:["a77be405-8402-477a-9d72-b96d1e7ea63b","32aad837-d99a-4b5a-b6ea-e12c590b925a"],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/ef62c7ab-ef09-47b7-9af4-2ebe2384a72f.jpg",node_type:"show",ref_id:"ef62c7ab-ef09-47b7-9af4-2ebe2384a72f",show_title:"Austrian Economics: An Introductory Course"},{children:["62e4eee0-25ba-495a-a7e6-dd0685a75d13","23ea78f2-8e21-42fe-980a-8c6ff04c2748","23ea78f2-8e21-42fe-980a-8c6ff04c2748","b51b127d-9641-42a7-aac5-bd5b1228f52a"],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/8e52e9c4-52e8-4dea-8ed9-8c6a7fcef25a.jpg",node_type:"show",ref_id:"8e52e9c4-52e8-4dea-8ed9-8c6a7fcef25a",show_title:"The Macro View"},{children:["f18bb143-9582-41f3-b65b-1dbe8de6cfc3"],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/3ab6c599-bbcd-4c8f-beef-bcf509ed4afa.jpg",node_type:"show",ref_id:"3ab6c599-bbcd-4c8f-beef-bcf509ed4afa",show_title:"Voices of the Data Economy"},{children:["14dbb9b7-ec35-49e5-bbb9-1f2d626a5d6f"],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/5e0220b3-7c70-4423-bb76-3b75bc132fad.jpg",node_type:"show",ref_id:"5e0220b3-7c70-4423-bb76-3b75bc132fad",show_title:"Carnivore Cast"},{children:["c6996d2f-8541-4622-968f-4e4dee7f78e4","41f7e1a4-f5b9-4a7e-8dbd-ee3fcb15260f"],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/a8e3517b-b44d-4270-adaa-57587896b1e7.jpg",node_type:"show",ref_id:"a8e3517b-b44d-4270-adaa-57587896b1e7",show_title:"Keto Life Support"},{children:["4b228b78-99c7-4884-b91d-9dc711bde8e6"],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/4ae5cf53-106f-4ba8-9a77-3ef1de3b44b6.jpg",node_type:"show",ref_id:"4ae5cf53-106f-4ba8-9a77-3ef1de3b44b6",show_title:"Trading Bitcoin: The Tone Vays Podcast"},{children:["556a9506-357d-4dea-a6bb-75f391f7340d"],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/1c3fe064-f637-41ea-8a4b-a533ef5985b1.jpg",node_type:"show",ref_id:"1c3fe064-f637-41ea-8a4b-a533ef5985b1",show_title:"aantonop"},{children:["1b47b05f-8f86-4e19-9694-d4255e9e89ac","1b47b05f-8f86-4e19-9694-d4255e9e89ac"],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/56bbafde-60ef-4e4b-b930-978429c6a635.jpg",node_type:"show",ref_id:"56bbafde-60ef-4e4b-b930-978429c6a635",show_title:"Global Bitcoin Fest"},{children:["a0826cdb-6198-4416-bd12-1dd5aa09a075","c6447277-9a58-411f-85e1-5ac166884ce5","c6447277-9a58-411f-85e1-5ac166884ce5","c6447277-9a58-411f-85e1-5ac166884ce5","c6447277-9a58-411f-85e1-5ac166884ce5","8418f2a4-1874-403a-9e58-7a76a8e09d4f","a7dcf3bf-b9f2-41f1-a3f3-ffd2db3a0b96","a7dcf3bf-b9f2-41f1-a3f3-ffd2db3a0b96","a7dcf3bf-b9f2-41f1-a3f3-ffd2db3a0b96","47406d36-917a-47f7-b89e-26181d6070bc","47406d36-917a-47f7-b89e-26181d6070bc","47406d36-917a-47f7-b89e-26181d6070bc","dc7b8177-4cef-4da2-bb05-b12dfe4c05bb","dc7b8177-4cef-4da2-bb05-b12dfe4c05bb","dc7b8177-4cef-4da2-bb05-b12dfe4c05bb","dc7b8177-4cef-4da2-bb05-b12dfe4c05bb"],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/9b2e17f2-71c5-4f1e-a3e7-720d06dab810.jpg",node_type:"show",ref_id:"9b2e17f2-71c5-4f1e-a3e7-720d06dab810",show_title:"Satoshi’s Journal"},{children:["fb60247a-9b2e-41d4-83f4-f4cf92eb20f4","fb60247a-9b2e-41d4-83f4-f4cf92eb20f4","fb60247a-9b2e-41d4-83f4-f4cf92eb20f4","87a2efa8-6b4c-486d-8511-d6a95cb84514","87a2efa8-6b4c-486d-8511-d6a95cb84514","87a2efa8-6b4c-486d-8511-d6a95cb84514","87a2efa8-6b4c-486d-8511-d6a95cb84514","87a2efa8-6b4c-486d-8511-d6a95cb84514","de9ef389-d0ee-4ce1-ad23-38bfafa28a35","de9ef389-d0ee-4ce1-ad23-38bfafa28a35"],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/0c42d408-e518-4ecf-b282-d864a8c14002.jpg",node_type:"show",ref_id:"0c42d408-e518-4ecf-b282-d864a8c14002",show_title:"PUBLORD"},{children:["94726593-cead-47f6-8029-6848f277358c","2c2ac736-0711-4418-8a44-6f9de54cbe6f","2c2ac736-0711-4418-8a44-6f9de54cbe6f","2c2ac736-0711-4418-8a44-6f9de54cbe6f","883300ba-aeb4-42e5-bbd2-7c989e481a3b","883300ba-aeb4-42e5-bbd2-7c989e481a3b","883300ba-aeb4-42e5-bbd2-7c989e481a3b","883300ba-aeb4-42e5-bbd2-7c989e481a3b","a41902c1-9f41-4ea4-b135-0d2078f6074b","6334a91f-b1db-4f05-a381-bc68b121dfb3","3b7e4cc5-bc15-45e9-bb7a-373fa4cca6f1","3b7e4cc5-bc15-45e9-bb7a-373fa4cca6f1","3b7e4cc5-bc15-45e9-bb7a-373fa4cca6f1","3b7e4cc5-bc15-45e9-bb7a-373fa4cca6f1","3b7e4cc5-bc15-45e9-bb7a-373fa4cca6f1","f8a66979-3fac-4793-bad0-8ede604e211b","1d671494-3407-4619-92b0-99c7d6f95f86","9ae3fabe-5d43-47bc-9ab0-541df990773a","a119635b-a66a-4a90-a7e3-2a7929666a82","a119635b-a66a-4a90-a7e3-2a7929666a82","a119635b-a66a-4a90-a7e3-2a7929666a82","a119635b-a66a-4a90-a7e3-2a7929666a82","6fe2326f-7cad-4efb-abed-206db564556e","6fe2326f-7cad-4efb-abed-206db564556e","141ef1e6-e6ec-4d29-a52a-01be662b21ae","141ef1e6-e6ec-4d29-a52a-01be662b21ae","141ef1e6-e6ec-4d29-a52a-01be662b21ae","15cae8e2-7cb3-4c60-9b3a-32cb4b231c26","15cae8e2-7cb3-4c60-9b3a-32cb4b231c26","3bc946bc-82f4-48d3-9bd2-fab82353774d","3bc946bc-82f4-48d3-9bd2-fab82353774d","3bc946bc-82f4-48d3-9bd2-fab82353774d","3bc946bc-82f4-48d3-9bd2-fab82353774d","3bc946bc-82f4-48d3-9bd2-fab82353774d","80617a1c-8bf7-404d-928c-86fc32d643fe","80617a1c-8bf7-404d-928c-86fc32d643fe","d28e279c-4539-4ec8-b187-1b6447bdb6be"],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/239722cb-4216-414a-a17b-5adf9d52e15a.jpg",node_type:"show",ref_id:"239722cb-4216-414a-a17b-5adf9d52e15a",show_title:"Swan.com"},{children:["aba10d42-f204-4853-99c4-c8a22f846945","6c6c782e-382c-44c3-9b0a-5c598ef73ddc"],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/f3a55dda-3dd5-4f62-99c1-bab3a88c27c1.jpg",node_type:"show",ref_id:"f3a55dda-3dd5-4f62-99c1-bab3a88c27c1",show_title:"Bitcoin Magazine"},{children:["7bebf6d3-5f24-4988-9141-7ed42c826983","7bebf6d3-5f24-4988-9141-7ed42c826983"],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/7c53ad3c-1ce2-4661-8896-4c40dcc23b4d.jpg",node_type:"show",ref_id:"7c53ad3c-1ce2-4661-8896-4c40dcc23b4d",show_title:"Blockware Solutions"},{children:["de789489-56bc-4012-b7c3-9dc92a937161","62ca7c93-e509-438e-87b3-43400a320f8d","62ca7c93-e509-438e-87b3-43400a320f8d","62ca7c93-e509-438e-87b3-43400a320f8d"],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/624262ef-b30f-4114-8061-e310187e6bb4.jpg",node_type:"show",ref_id:"624262ef-b30f-4114-8061-e310187e6bb4",show_title:"Property and Freedom Society"},{children:["0992287c-f653-4032-b06c-e8d65e2536e7","0992287c-f653-4032-b06c-e8d65e2536e7","0992287c-f653-4032-b06c-e8d65e2536e7","0992287c-f653-4032-b06c-e8d65e2536e7","0992287c-f653-4032-b06c-e8d65e2536e7","0992287c-f653-4032-b06c-e8d65e2536e7","0992287c-f653-4032-b06c-e8d65e2536e7"],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/c9bb5d58-c781-464d-878a-8b6c469ba198.jpg",node_type:"show",ref_id:"c9bb5d58-c781-464d-878a-8b6c469ba198",show_title:"Geyser 🌊"},{children:["79ea2957-1161-4729-aacb-1981d9237e22","79ea2957-1161-4729-aacb-1981d9237e22","79ea2957-1161-4729-aacb-1981d9237e22","79ea2957-1161-4729-aacb-1981d9237e22"],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/75ec86b1-cb6d-467f-a66e-5e642e5c126a.jpg",node_type:"show",ref_id:"75ec86b1-cb6d-467f-a66e-5e642e5c126a",show_title:"Bitcoin Venetians Book Club"},{children:["c0dabc11-aced-4078-93be-bca753fc2b14","c0dabc11-aced-4078-93be-bca753fc2b14","c0dabc11-aced-4078-93be-bca753fc2b14","c0dabc11-aced-4078-93be-bca753fc2b14","c0dabc11-aced-4078-93be-bca753fc2b14","d2e9db27-864c-4ee5-a7ae-abcf895bda98","d2e9db27-864c-4ee5-a7ae-abcf895bda98","d2e9db27-864c-4ee5-a7ae-abcf895bda98","d2e9db27-864c-4ee5-a7ae-abcf895bda98","d2e9db27-864c-4ee5-a7ae-abcf895bda98","6e8c90dc-12fa-415d-bf33-f286a4c5d1b1","6e8c90dc-12fa-415d-bf33-f286a4c5d1b1"],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/ae91fac6-a1af-4877-9a92-e793d556ee66.jpg",node_type:"show",ref_id:"ae91fac6-a1af-4877-9a92-e793d556ee66",show_title:"Compass Mining"},{children:["5c8bc8cf-4d41-4c71-8154-aafbd1ed20c1","f7310238-67ab-4a2d-8679-72f6511934be","f7310238-67ab-4a2d-8679-72f6511934be","f7310238-67ab-4a2d-8679-72f6511934be","f7310238-67ab-4a2d-8679-72f6511934be","99f0ab76-b0f5-4947-8341-759b5dff5341","99f0ab76-b0f5-4947-8341-759b5dff5341","99f0ab76-b0f5-4947-8341-759b5dff5341","c775e780-43ca-46c6-b5ef-e65b0103ee61","c775e780-43ca-46c6-b5ef-e65b0103ee61"],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/965489b4-a414-4fd0-ab8c-55911b1596aa.jpg",node_type:"show",ref_id:"965489b4-a414-4fd0-ab8c-55911b1596aa",show_title:"BOLT FUN"},{children:["54fa34c9-0729-42ab-92d5-e5f8289ed32a","54fa34c9-0729-42ab-92d5-e5f8289ed32a","54fa34c9-0729-42ab-92d5-e5f8289ed32a"],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/2a1450bc-0649-4dc5-8ec9-1474af1ea1c3.jpg",node_type:"show",ref_id:"2a1450bc-0649-4dc5-8ec9-1474af1ea1c3",show_title:"Anders_🍆"},{children:["258c5ca5-52a6-4ce3-9994-e629263123d8"],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/4127f08c-505a-4a7d-935f-e93e87204089.jpg",node_type:"show",ref_id:"4127f08c-505a-4a7d-935f-e93e87204089",show_title:"Wicked Smart Bitcoin ∞/21M"},{children:["08c3748a-a85d-4d4f-a702-1fc3f1c46f33"],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/b2dd8be4-74b5-47b2-b470-e568657f3a0d.jpg",node_type:"show",ref_id:"b2dd8be4-74b5-47b2-b470-e568657f3a0d",show_title:"Art of Tomas"},{children:["d862511e-6330-48b3-9d4a-44e8f754f0a5","d862511e-6330-48b3-9d4a-44e8f754f0a5","d862511e-6330-48b3-9d4a-44e8f754f0a5"],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/e8ad867b-9cbe-4126-9f37-313b4d2329a5.jpg",node_type:"show",ref_id:"e8ad867b-9cbe-4126-9f37-313b4d2329a5",show_title:"Dr Karl Goldkamp - Keto Naturopath"},{children:["21d1d401-626c-4ec2-ba30-3c08f08ec3ea","21d1d401-626c-4ec2-ba30-3c08f08ec3ea"],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/046c6869-0627-4825-8ecf-45ff0aed97b6.jpg",node_type:"show",ref_id:"046c6869-0627-4825-8ecf-45ff0aed97b6",show_title:"Alexandria The Great 🌋⛏🇿🇼"},{children:["18e340ea-90ef-4200-a19d-dc82e1e18e21"],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/30180c4d-27f9-4215-81e0-6a22b16aba43.jpg",node_type:"show",ref_id:"30180c4d-27f9-4215-81e0-6a22b16aba43",show_title:"okin@8333.mobi ⚡️ 🏰"},{children:["9f12b8c2-175e-4078-9871-99a2edf2e0f3","9f12b8c2-175e-4078-9871-99a2edf2e0f3","9f12b8c2-175e-4078-9871-99a2edf2e0f3","9f12b8c2-175e-4078-9871-99a2edf2e0f3"],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/99046513-2614-4eae-9de4-5781ba4b330a.jpg",node_type:"show",ref_id:"99046513-2614-4eae-9de4-5781ba4b330a",show_title:"STX:LDN"},{children:["03b5ca12-0aeb-4f04-aed0-746681d93b56"],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/da64b29e-c2c0-41a6-ba29-acbaa2d022e8.jpg",node_type:"show",ref_id:"da64b29e-c2c0-41a6-ba29-acbaa2d022e8",show_title:"Rabbit Hole Recap"},{children:["70bb863d-7226-4b9e-b13e-673f94a3eb86","06494953-4c8e-4376-9450-9efb8b00acc3","06494953-4c8e-4376-9450-9efb8b00acc3","06494953-4c8e-4376-9450-9efb8b00acc3","06494953-4c8e-4376-9450-9efb8b00acc3","06494953-4c8e-4376-9450-9efb8b00acc3","06494953-4c8e-4376-9450-9efb8b00acc3","06494953-4c8e-4376-9450-9efb8b00acc3"],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/e1eca67b-d372-4031-bf1f-8f0ff7fe6092.jpg",node_type:"show",ref_id:"e1eca67b-d372-4031-bf1f-8f0ff7fe6092",show_title:`Once Bitten! + ) + (Gt = tn), + (gn = Bt), + (Gt.flags &= 14680066), + (Cn = Gt.alternate), + Cn === null + ? ((Gt.childLanes = 0), + (Gt.lanes = gn), + (Gt.child = null), + (Gt.subtreeFlags = 0), + (Gt.memoizedProps = null), + (Gt.memoizedState = null), + (Gt.updateQueue = null), + (Gt.dependencies = null), + (Gt.stateNode = null)) + : ((Gt.childLanes = Cn.childLanes), + (Gt.lanes = Cn.lanes), + (Gt.child = Cn.child), + (Gt.subtreeFlags = 0), + (Gt.deletions = null), + (Gt.memoizedProps = Cn.memoizedProps), + (Gt.memoizedState = Cn.memoizedState), + (Gt.updateQueue = Cn.updateQueue), + (Gt.type = Cn.type), + (gn = Cn.dependencies), + (Gt.dependencies = + gn === null ? null : { lanes: gn.lanes, firstContext: gn.firstContext })), + (tn = tn.sibling) + return ir(er, (er.current & 1) | 2), Lt.child + } + Bt = Bt.sibling + } + gn.tail !== null && ts() > om && ((Lt.flags |= 128), (tn = !0), Rs(gn, !1), (Lt.lanes = 4194304)) + } + else { + if (!tn) + if (((Bt = Er(Cn)), Bt !== null)) { + if ( + ((Lt.flags |= 128), + (tn = !0), + (Bt = Bt.updateQueue), + Bt !== null && ((Lt.updateQueue = Bt), (Lt.flags |= 4)), + Rs(gn, !0), + gn.tail === null && gn.tailMode === 'hidden' && !Cn.alternate && !_a) + ) + return yo(Lt), null + } else + 2 * ts() - gn.renderingStartTime > om && + Gt !== 1073741824 && + ((Lt.flags |= 128), (tn = !0), Rs(gn, !1), (Lt.lanes = 4194304)) + gn.isBackwards + ? ((Cn.sibling = Lt.child), (Lt.child = Cn)) + : ((Bt = gn.last), Bt !== null ? (Bt.sibling = Cn) : (Lt.child = Cn), (gn.last = Cn)) + } + return gn.tail !== null + ? ((Lt = gn.tail), + (gn.rendering = Lt), + (gn.tail = Lt.sibling), + (gn.renderingStartTime = ts()), + (Lt.sibling = null), + (Bt = er.current), + ir(er, tn ? (Bt & 1) | 2 : Bt & 1), + Lt) + : (yo(Lt), null) + case 22: + case 23: + return ( + xy(), + (tn = Lt.memoizedState !== null), + Bt !== null && (Bt.memoizedState !== null) !== tn && (Lt.flags |= 8192), + tn && Lt.mode & 1 ? Sl & 1073741824 && (yo(Lt), an && Lt.subtreeFlags & 6 && (Lt.flags |= 8192)) : yo(Lt), + null + ) + case 24: + return null + case 25: + return null + } + throw Error(at(156, Lt.tag)) + } + var F0 = st.ReactCurrentOwner, + yl = !1 + function cs(Bt, Lt, Gt, tn) { + Lt.child = Bt === null ? Uy(Lt, null, Gt, tn) : dp(Lt, Bt.child, Gt, tn) + } + function e0(Bt, Lt, Gt, tn, gn) { + Gt = Gt.render + var Cn = Lt.ref + return ( + os(Lt, gn), + (tn = qo(Bt, Lt, Gt, tn, Cn, gn)), + (Gt = Qm()), + Bt !== null && !yl + ? ((Lt.updateQueue = Bt.updateQueue), (Lt.flags &= -2053), (Bt.lanes &= ~gn), xs(Bt, Lt, gn)) + : (_a && Gt && wm(Lt), (Lt.flags |= 1), cs(Bt, Lt, tn, gn), Lt.child) + ) + } + function n0(Bt, Lt, Gt, tn, gn) { + if (Bt === null) { + var Cn = Gt.type + return typeof Cn == 'function' && + !Cy(Cn) && + Cn.defaultProps === void 0 && + Gt.compare === null && + Gt.defaultProps === void 0 + ? ((Lt.tag = 15), (Lt.type = Cn), r0(Bt, Lt, Cn, tn, gn)) + : ((Bt = Lm(Gt.type, null, tn, Lt, Lt.mode, gn)), (Bt.ref = Lt.ref), (Bt.return = Lt), (Lt.child = Bt)) + } + if (((Cn = Bt.child), !(Bt.lanes & gn))) { + var Gn = Cn.memoizedProps + if (((Gt = Gt.compare), (Gt = Gt !== null ? Gt : ns), Gt(Gn, tn) && Bt.ref === Lt.ref)) return xs(Bt, Lt, gn) + } + return (Lt.flags |= 1), (Bt = Su(Cn, tn)), (Bt.ref = Lt.ref), (Bt.return = Lt), (Lt.child = Bt) + } + function r0(Bt, Lt, Gt, tn, gn) { + if (Bt !== null && ns(Bt.memoizedProps, tn) && Bt.ref === Lt.ref) + if (((yl = !1), (Bt.lanes & gn) !== 0)) Bt.flags & 131072 && (yl = !0) + else return (Lt.lanes = Bt.lanes), xs(Bt, Lt, gn) + return Hl(Bt, Lt, Gt, tn, gn) + } + function i0(Bt, Lt, Gt) { + var tn = Lt.pendingProps, + gn = tn.children, + Cn = Bt !== null ? Bt.memoizedState : null + if (tn.mode === 'hidden') + if (!(Lt.mode & 1)) (Lt.memoizedState = { baseLanes: 0, cachePool: null }), ir(Ep, Sl), (Sl |= Gt) + else if (Gt & 1073741824) + (Lt.memoizedState = { baseLanes: 0, cachePool: null }), + (tn = Cn !== null ? Cn.baseLanes : Gt), + ir(Ep, Sl), + (Sl |= tn) + else + return ( + (Bt = Cn !== null ? Cn.baseLanes | Gt : Gt), + (Lt.lanes = Lt.childLanes = 1073741824), + (Lt.memoizedState = { baseLanes: Bt, cachePool: null }), + (Lt.updateQueue = null), + ir(Ep, Sl), + (Sl |= Bt), + null + ) + else Cn !== null ? ((tn = Cn.baseLanes | Gt), (Lt.memoizedState = null)) : (tn = Gt), ir(Ep, Sl), (Sl |= tn) + return cs(Bt, Lt, gn, Gt), Lt.child + } + function o0(Bt, Lt) { + var Gt = Lt.ref + ;((Bt === null && Gt !== null) || (Bt !== null && Bt.ref !== Gt)) && ((Lt.flags |= 512), (Lt.flags |= 2097152)) + } + function Hl(Bt, Lt, Gt, tn, gn) { + var Cn = so(Gt) ? $r : dr.current + return ( + (Cn = no(Lt, Cn)), + os(Lt, gn), + (Gt = qo(Bt, Lt, Gt, tn, Cn, gn)), + (tn = Qm()), + Bt !== null && !yl + ? ((Lt.updateQueue = Bt.updateQueue), (Lt.flags &= -2053), (Bt.lanes &= ~gn), xs(Bt, Lt, gn)) + : (_a && tn && wm(Lt), (Lt.flags |= 1), cs(Bt, Lt, Gt, gn), Lt.child) + ) + } + function a0(Bt, Lt, Gt, tn, gn) { + if (so(Gt)) { + var Cn = !0 + vo(Lt) + } else Cn = !1 + if ((os(Lt, gn), Lt.stateNode === null)) + Bt !== null && ((Bt.alternate = null), (Lt.alternate = null), (Lt.flags |= 2)), + jy(Lt, Gt, tn), + sp(Lt, Gt, tn, gn), + (tn = !0) + else if (Bt === null) { + var Gn = Lt.stateNode, + rr = Lt.memoizedProps + Gn.props = rr + var _r = Gn.context, + Vr = Gt.contextType + typeof Vr == 'object' && Vr !== null ? (Vr = Vo(Vr)) : ((Vr = so(Gt) ? $r : dr.current), (Vr = no(Lt, Vr))) + var oo = Gt.getDerivedStateFromProps, + Io = typeof oo == 'function' || typeof Gn.getSnapshotBeforeUpdate == 'function' + Io || + (typeof Gn.UNSAFE_componentWillReceiveProps != 'function' && + typeof Gn.componentWillReceiveProps != 'function') || + ((rr !== tn || _r !== Vr) && Km(Lt, Gn, tn, Vr)), + (ws = !1) + var ho = Lt.memoizedState + ;(Gn.state = ho), + Ll(Lt, tn, Gn, gn), + (_r = Lt.memoizedState), + rr !== tn || ho !== _r || br.current || ws + ? (typeof oo == 'function' && (Np(Lt, Gt, oo, tn), (_r = Lt.memoizedState)), + (rr = ws || Oy(Lt, Gt, rr, tn, ho, _r, Vr)) + ? (Io || + (typeof Gn.UNSAFE_componentWillMount != 'function' && typeof Gn.componentWillMount != 'function') || + (typeof Gn.componentWillMount == 'function' && Gn.componentWillMount(), + typeof Gn.UNSAFE_componentWillMount == 'function' && Gn.UNSAFE_componentWillMount()), + typeof Gn.componentDidMount == 'function' && (Lt.flags |= 4194308)) + : (typeof Gn.componentDidMount == 'function' && (Lt.flags |= 4194308), + (Lt.memoizedProps = tn), + (Lt.memoizedState = _r)), + (Gn.props = tn), + (Gn.state = _r), + (Gn.context = Vr), + (tn = rr)) + : (typeof Gn.componentDidMount == 'function' && (Lt.flags |= 4194308), (tn = !1)) + } else { + ;(Gn = Lt.stateNode), + Ym(Bt, Lt), + (rr = Lt.memoizedProps), + (Vr = Lt.type === Lt.elementType ? rr : ls(Lt.type, rr)), + (Gn.props = Vr), + (Io = Lt.pendingProps), + (ho = Gn.context), + (_r = Gt.contextType), + typeof _r == 'object' && _r !== null ? (_r = Vo(_r)) : ((_r = so(Gt) ? $r : dr.current), (_r = no(Lt, _r))) + var Jo = Gt.getDerivedStateFromProps + ;(oo = typeof Jo == 'function' || typeof Gn.getSnapshotBeforeUpdate == 'function') || + (typeof Gn.UNSAFE_componentWillReceiveProps != 'function' && + typeof Gn.componentWillReceiveProps != 'function') || + ((rr !== Io || ho !== _r) && Km(Lt, Gn, tn, _r)), + (ws = !1), + (ho = Lt.memoizedState), + (Gn.state = ho), + Ll(Lt, tn, Gn, gn) + var lo = Lt.memoizedState + rr !== Io || ho !== lo || br.current || ws + ? (typeof Jo == 'function' && (Np(Lt, Gt, Jo, tn), (lo = Lt.memoizedState)), + (Vr = ws || Oy(Lt, Gt, Vr, tn, ho, lo, _r) || !1) + ? (oo || + (typeof Gn.UNSAFE_componentWillUpdate != 'function' && typeof Gn.componentWillUpdate != 'function') || + (typeof Gn.componentWillUpdate == 'function' && Gn.componentWillUpdate(tn, lo, _r), + typeof Gn.UNSAFE_componentWillUpdate == 'function' && Gn.UNSAFE_componentWillUpdate(tn, lo, _r)), + typeof Gn.componentDidUpdate == 'function' && (Lt.flags |= 4), + typeof Gn.getSnapshotBeforeUpdate == 'function' && (Lt.flags |= 1024)) + : (typeof Gn.componentDidUpdate != 'function' || + (rr === Bt.memoizedProps && ho === Bt.memoizedState) || + (Lt.flags |= 4), + typeof Gn.getSnapshotBeforeUpdate != 'function' || + (rr === Bt.memoizedProps && ho === Bt.memoizedState) || + (Lt.flags |= 1024), + (Lt.memoizedProps = tn), + (Lt.memoizedState = lo)), + (Gn.props = tn), + (Gn.state = lo), + (Gn.context = _r), + (tn = Vr)) + : (typeof Gn.componentDidUpdate != 'function' || + (rr === Bt.memoizedProps && ho === Bt.memoizedState) || + (Lt.flags |= 4), + typeof Gn.getSnapshotBeforeUpdate != 'function' || + (rr === Bt.memoizedProps && ho === Bt.memoizedState) || + (Lt.flags |= 1024), + (tn = !1)) + } + return oy(Bt, Lt, Gt, tn, Cn, gn) + } + function oy(Bt, Lt, Gt, tn, gn, Cn) { + o0(Bt, Lt) + var Gn = (Lt.flags & 128) !== 0 + if (!tn && !Gn) return gn && _o(Lt, Gt, !1), xs(Bt, Lt, Cn) + ;(tn = Lt.stateNode), (F0.current = Lt) + var rr = Gn && typeof Gt.getDerivedStateFromError != 'function' ? null : tn.render() + return ( + (Lt.flags |= 1), + Bt !== null && Gn + ? ((Lt.child = dp(Lt, Bt.child, null, Cn)), (Lt.child = dp(Lt, null, rr, Cn))) + : cs(Bt, Lt, rr, Cn), + (Lt.memoizedState = tn.state), + gn && _o(Lt, Gt, !0), + Lt.child + ) + } + function s0(Bt) { + var Lt = Bt.stateNode + Lt.pendingContext + ? po(Bt, Lt.pendingContext, Lt.pendingContext !== Lt.context) + : Lt.context && po(Bt, Lt.context, !1), + Jm(Bt, Lt.containerInfo) + } + function l0(Bt, Lt, Gt, tn, gn) { + return up(), zp(gn), (Lt.flags |= 256), cs(Bt, Lt, Gt, tn), Lt.child + } + var Sm = { dehydrated: null, treeContext: null, retryLane: 0 } + function $l(Bt) { + return { baseLanes: Bt, cachePool: null } + } + function c0(Bt, Lt, Gt) { + var tn = Lt.pendingProps, + gn = er.current, + Cn = !1, + Gn = (Lt.flags & 128) !== 0, + rr + if ( + ((rr = Gn) || (rr = Bt !== null && Bt.memoizedState === null ? !1 : (gn & 2) !== 0), + rr ? ((Cn = !0), (Lt.flags &= -129)) : (Bt === null || Bt.memoizedState !== null) && (gn |= 1), + ir(er, gn & 1), + Bt === null) + ) + return ( + Zm(Lt), + (Bt = Lt.memoizedState), + Bt !== null && ((Bt = Bt.dehydrated), Bt !== null) + ? (Lt.mode & 1 ? (Mn(Bt) ? (Lt.lanes = 8) : (Lt.lanes = 1073741824)) : (Lt.lanes = 1), null) + : ((gn = tn.children), + (Bt = tn.fallback), + Cn + ? ((tn = Lt.mode), + (Cn = Lt.child), + (gn = { mode: 'hidden', children: gn }), + !(tn & 1) && Cn !== null ? ((Cn.childLanes = 0), (Cn.pendingProps = gn)) : (Cn = um(gn, tn, 0, null)), + (Bt = zu(Bt, tn, Gt, null)), + (Cn.return = Lt), + (Bt.return = Lt), + (Cn.sibling = Bt), + (Lt.child = Cn), + (Lt.child.memoizedState = $l(Gt)), + (Lt.memoizedState = Sm), + Bt) + : ay(Lt, gn)) + ) + if (((gn = Bt.memoizedState), gn !== null)) { + if (((rr = gn.dehydrated), rr !== null)) { + if (Gn) + return Lt.flags & 256 + ? ((Lt.flags &= -257), Em(Bt, Lt, Gt, Error(at(422)))) + : Lt.memoizedState !== null + ? ((Lt.child = Bt.child), (Lt.flags |= 128), null) + : ((Cn = tn.fallback), + (gn = Lt.mode), + (tn = um({ mode: 'visible', children: tn.children }, gn, 0, null)), + (Cn = zu(Cn, gn, Gt, null)), + (Cn.flags |= 2), + (tn.return = Lt), + (Cn.return = Lt), + (tn.sibling = Cn), + (Lt.child = tn), + Lt.mode & 1 && dp(Lt, Bt.child, null, Gt), + (Lt.child.memoizedState = $l(Gt)), + (Lt.memoizedState = Sm), + Cn) + if (!(Lt.mode & 1)) Lt = Em(Bt, Lt, Gt, null) + else if (Mn(rr)) Lt = Em(Bt, Lt, Gt, Error(at(419))) + else if (((tn = (Gt & Bt.childLanes) !== 0), yl || tn)) { + if (((tn = fs), tn !== null)) { + switch (Gt & -Gt) { + case 4: + Cn = 2 + break + case 16: + Cn = 8 + break + case 64: + case 128: + case 256: + case 512: + case 1024: + case 2048: + case 4096: + case 8192: + case 16384: + case 32768: + case 65536: + case 131072: + case 262144: + case 524288: + case 1048576: + case 2097152: + case 4194304: + case 8388608: + case 16777216: + case 33554432: + case 67108864: + Cn = 32 + break + case 536870912: + Cn = 268435456 + break + default: + Cn = 0 + } + ;(tn = Cn & (tn.suspendedLanes | Gt) ? 0 : Cn), + tn !== 0 && tn !== gn.retryLane && ((gn.retryLane = tn), Pl(Bt, tn, -1)) + } + jm(), (Lt = Em(Bt, Lt, Gt, Error(at(421)))) + } else + xn(rr) + ? ((Lt.flags |= 128), (Lt.child = Bt.child), (Lt = Uu.bind(null, Bt)), dn(rr, Lt), (Lt = null)) + : ((Gt = gn.treeContext), + _n && + ((As = Un(rr)), + (Hs = Lt), + (_a = !0), + (Wl = null), + (cp = !1), + Gt !== null && + ((qs[Ys++] = bu), (qs[Ys++] = Ul), (qs[Ys++] = Au), (bu = Gt.id), (Ul = Gt.overflow), (Au = Lt))), + (Lt = ay(Lt, Lt.pendingProps.children)), + (Lt.flags |= 4096)) + return Lt + } + return Cn + ? ((tn = h0(Bt, Lt, tn.children, tn.fallback, Gt)), + (Cn = Lt.child), + (gn = Bt.child.memoizedState), + (Cn.memoizedState = gn === null ? $l(Gt) : { baseLanes: gn.baseLanes | Gt, cachePool: null }), + (Cn.childLanes = Bt.childLanes & ~Gt), + (Lt.memoizedState = Sm), + tn) + : ((Gt = u0(Bt, Lt, tn.children, Gt)), (Lt.memoizedState = null), Gt) + } + return Cn + ? ((tn = h0(Bt, Lt, tn.children, tn.fallback, Gt)), + (Cn = Lt.child), + (gn = Bt.child.memoizedState), + (Cn.memoizedState = gn === null ? $l(Gt) : { baseLanes: gn.baseLanes | Gt, cachePool: null }), + (Cn.childLanes = Bt.childLanes & ~Gt), + (Lt.memoizedState = Sm), + tn) + : ((Gt = u0(Bt, Lt, tn.children, Gt)), (Lt.memoizedState = null), Gt) + } + function ay(Bt, Lt) { + return (Lt = um({ mode: 'visible', children: Lt }, Bt.mode, 0, null)), (Lt.return = Bt), (Bt.child = Lt) + } + function u0(Bt, Lt, Gt, tn) { + var gn = Bt.child + return ( + (Bt = gn.sibling), + (Gt = Su(gn, { mode: 'visible', children: Gt })), + !(Lt.mode & 1) && (Gt.lanes = tn), + (Gt.return = Lt), + (Gt.sibling = null), + Bt !== null && ((tn = Lt.deletions), tn === null ? ((Lt.deletions = [Bt]), (Lt.flags |= 16)) : tn.push(Bt)), + (Lt.child = Gt) + ) + } + function h0(Bt, Lt, Gt, tn, gn) { + var Cn = Lt.mode + Bt = Bt.child + var Gn = Bt.sibling, + rr = { mode: 'hidden', children: Gt } + return ( + !(Cn & 1) && Lt.child !== Bt + ? ((Gt = Lt.child), (Gt.childLanes = 0), (Gt.pendingProps = rr), (Lt.deletions = null)) + : ((Gt = Su(Bt, rr)), (Gt.subtreeFlags = Bt.subtreeFlags & 14680064)), + Gn !== null ? (tn = Su(Gn, tn)) : ((tn = zu(tn, Cn, gn, null)), (tn.flags |= 2)), + (tn.return = Lt), + (Gt.return = Lt), + (Gt.sibling = tn), + (Lt.child = Gt), + tn + ) + } + function Em(Bt, Lt, Gt, tn) { + return ( + tn !== null && zp(tn), + dp(Lt, Bt.child, null, Gt), + (Bt = ay(Lt, Lt.pendingProps.children)), + (Bt.flags |= 2), + (Lt.memoizedState = null), + Bt + ) + } + function Ru(Bt, Lt, Gt) { + Bt.lanes |= Lt + var tn = Bt.alternate + tn !== null && (tn.lanes |= Lt), $s(Bt.return, Lt, Gt) + } + function sy(Bt, Lt, Gt, tn, gn) { + var Cn = Bt.memoizedState + Cn === null + ? (Bt.memoizedState = { + isBackwards: Lt, + rendering: null, + renderingStartTime: 0, + last: tn, + tail: Gt, + tailMode: gn, + }) + : ((Cn.isBackwards = Lt), + (Cn.rendering = null), + (Cn.renderingStartTime = 0), + (Cn.last = tn), + (Cn.tail = Gt), + (Cn.tailMode = gn)) + } + function d0(Bt, Lt, Gt) { + var tn = Lt.pendingProps, + gn = tn.revealOrder, + Cn = tn.tail + if ((cs(Bt, Lt, tn.children, Gt), (tn = er.current), tn & 2)) (tn = (tn & 1) | 2), (Lt.flags |= 128) + else { + if (Bt !== null && Bt.flags & 128) + e: for (Bt = Lt.child; Bt !== null; ) { + if (Bt.tag === 13) Bt.memoizedState !== null && Ru(Bt, Gt, Lt) + else if (Bt.tag === 19) Ru(Bt, Gt, Lt) + else if (Bt.child !== null) { + ;(Bt.child.return = Bt), (Bt = Bt.child) + continue + } + if (Bt === Lt) break e + for (; Bt.sibling === null; ) { + if (Bt.return === null || Bt.return === Lt) break e + Bt = Bt.return + } + ;(Bt.sibling.return = Bt.return), (Bt = Bt.sibling) + } + tn &= 1 + } + if ((ir(er, tn), !(Lt.mode & 1))) Lt.memoizedState = null + else + switch (gn) { + case 'forwards': + for (Gt = Lt.child, gn = null; Gt !== null; ) + (Bt = Gt.alternate), Bt !== null && Er(Bt) === null && (gn = Gt), (Gt = Gt.sibling) + ;(Gt = gn), + Gt === null ? ((gn = Lt.child), (Lt.child = null)) : ((gn = Gt.sibling), (Gt.sibling = null)), + sy(Lt, !1, gn, Gt, Cn) + break + case 'backwards': + for (Gt = null, gn = Lt.child, Lt.child = null; gn !== null; ) { + if (((Bt = gn.alternate), Bt !== null && Er(Bt) === null)) { + Lt.child = gn + break + } + ;(Bt = gn.sibling), (gn.sibling = Gt), (Gt = gn), (gn = Bt) + } + sy(Lt, !0, Gt, null, Cn) + break + case 'together': + sy(Lt, !1, null, null, void 0) + break + default: + Lt.memoizedState = null + } + return Lt.child + } + function xs(Bt, Lt, Gt) { + if ((Bt !== null && (Lt.dependencies = Bt.dependencies), (Ip |= Lt.lanes), !(Gt & Lt.childLanes))) return null + if (Bt !== null && Lt.child !== Bt.child) throw Error(at(153)) + if (Lt.child !== null) { + for (Bt = Lt.child, Gt = Su(Bt, Bt.pendingProps), Lt.child = Gt, Gt.return = Lt; Bt.sibling !== null; ) + (Bt = Bt.sibling), (Gt = Gt.sibling = Su(Bt, Bt.pendingProps)), (Gt.return = Lt) + Gt.sibling = null + } + return Lt.child + } + function U0(Bt, Lt, Gt) { + switch (Lt.tag) { + case 3: + s0(Lt), up() + break + case 5: + zy(Lt) + break + case 1: + so(Lt.type) && vo(Lt) + break + case 4: + Jm(Lt, Lt.stateNode.containerInfo) + break + case 10: + Dp(Lt, Lt.type._context, Lt.memoizedProps.value) + break + case 13: + var tn = Lt.memoizedState + if (tn !== null) + return tn.dehydrated !== null + ? (ir(er, er.current & 1), (Lt.flags |= 128), null) + : Gt & Lt.child.childLanes + ? c0(Bt, Lt, Gt) + : (ir(er, er.current & 1), (Bt = xs(Bt, Lt, Gt)), Bt !== null ? Bt.sibling : null) + ir(er, er.current & 1) + break + case 19: + if (((tn = (Gt & Lt.childLanes) !== 0), Bt.flags & 128)) { + if (tn) return d0(Bt, Lt, Gt) + Lt.flags |= 128 + } + var gn = Lt.memoizedState + if ( + (gn !== null && ((gn.rendering = null), (gn.tail = null), (gn.lastEffect = null)), ir(er, er.current), tn) + ) + break + return null + case 22: + case 23: + return (Lt.lanes = 0), i0(Bt, Lt, Gt) + } + return xs(Bt, Lt, Gt) + } + function z0(Bt, Lt) { + switch ((Vs(Lt), Lt.tag)) { + case 1: + return so(Lt.type) && fo(), (Bt = Lt.flags), Bt & 65536 ? ((Lt.flags = (Bt & -65537) | 128), Lt) : null + case 3: + return ( + mp(), + tr(br), + tr(dr), + ro(), + (Bt = Lt.flags), + Bt & 65536 && !(Bt & 128) ? ((Lt.flags = (Bt & -65537) | 128), Lt) : null + ) + case 5: + return Cu(Lt), null + case 13: + if ((tr(er), (Bt = Lt.memoizedState), Bt !== null && Bt.dehydrated !== null)) { + if (Lt.alternate === null) throw Error(at(340)) + up() + } + return (Bt = Lt.flags), Bt & 65536 ? ((Lt.flags = (Bt & -65537) | 128), Lt) : null + case 19: + return tr(er), null + case 4: + return mp(), null + case 10: + return bs(Lt.type._context), null + case 22: + case 23: + return xy(), null + case 24: + return null + default: + return null + } + } + var Tm = !1, + Ju = !1, + W0 = typeof WeakSet == 'function' ? WeakSet : Set, + Xr = null + function tm(Bt, Lt) { + var Gt = Bt.ref + if (Gt !== null) + if (typeof Gt == 'function') + try { + Gt(null) + } catch (tn) { + Ds(Bt, Lt, tn) + } + else Gt.current = null + } + function ly(Bt, Lt, Gt) { + try { + Gt() + } catch (tn) { + Ds(Bt, Lt, tn) + } + } + var f0 = !1 + function cy(Bt, Lt) { + for (Ft(Bt.containerInfo), Xr = Lt; Xr !== null; ) + if (((Bt = Xr), (Lt = Bt.child), (Bt.subtreeFlags & 1028) !== 0 && Lt !== null)) (Lt.return = Bt), (Xr = Lt) + else + for (; Xr !== null; ) { + Bt = Xr + try { + var Gt = Bt.alternate + if (Bt.flags & 1024) + switch (Bt.tag) { + case 0: + case 11: + case 15: + break + case 1: + if (Gt !== null) { + var tn = Gt.memoizedProps, + gn = Gt.memoizedState, + Cn = Bt.stateNode, + Gn = Cn.getSnapshotBeforeUpdate(Bt.elementType === Bt.type ? tn : ls(Bt.type, tn), gn) + Cn.__reactInternalSnapshotBeforeUpdate = Gn + } + break + case 3: + an && xr(Bt.stateNode.containerInfo) + break + case 5: + case 6: + case 4: + case 17: + break + default: + throw Error(at(163)) + } + } catch (rr) { + Ds(Bt, Bt.return, rr) + } + if (((Lt = Bt.sibling), Lt !== null)) { + ;(Lt.return = Bt.return), (Xr = Lt) + break + } + Xr = Bt.return + } + return (Gt = f0), (f0 = !1), Gt + } + function Gl(Bt, Lt, Gt) { + var tn = Lt.updateQueue + if (((tn = tn !== null ? tn.lastEffect : null), tn !== null)) { + var gn = (tn = tn.next) + do { + if ((gn.tag & Bt) === Bt) { + var Cn = gn.destroy + ;(gn.destroy = void 0), Cn !== void 0 && ly(Lt, Gt, Cn) + } + gn = gn.next + } while (gn !== tn) + } + } + function Bu(Bt, Lt) { + if (((Lt = Lt.updateQueue), (Lt = Lt !== null ? Lt.lastEffect : null), Lt !== null)) { + var Gt = (Lt = Lt.next) + do { + if ((Gt.tag & Bt) === Bt) { + var tn = Gt.create + Gt.destroy = tn() + } + Gt = Gt.next + } while (Gt !== Lt) + } + } + function uy(Bt) { + var Lt = Bt.ref + if (Lt !== null) { + var Gt = Bt.stateNode + switch (Bt.tag) { + case 5: + Bt = Ot(Gt) + break + default: + Bt = Gt + } + typeof Lt == 'function' ? Lt(Bt) : (Lt.current = Bt) + } + } + function hy(Bt, Lt, Gt) { + if (Xs && typeof Xs.onCommitFiberUnmount == 'function') + try { + Xs.onCommitFiberUnmount(Vu, Lt) + } catch {} + switch (Lt.tag) { + case 0: + case 11: + case 14: + case 15: + if (((Bt = Lt.updateQueue), Bt !== null && ((Bt = Bt.lastEffect), Bt !== null))) { + var tn = (Bt = Bt.next) + do { + var gn = tn, + Cn = gn.destroy + ;(gn = gn.tag), Cn !== void 0 && (gn & 2 || gn & 4) && ly(Lt, Gt, Cn), (tn = tn.next) + } while (tn !== Bt) + } + break + case 1: + if ((tm(Lt, Gt), (Bt = Lt.stateNode), typeof Bt.componentWillUnmount == 'function')) + try { + ;(Bt.props = Lt.memoizedProps), (Bt.state = Lt.memoizedState), Bt.componentWillUnmount() + } catch (Gn) { + Ds(Lt, Gt, Gn) + } + break + case 5: + tm(Lt, Gt) + break + case 4: + an ? fy(Bt, Lt, Gt) : Qt && Qt && ((Lt = Lt.stateNode.containerInfo), (Gt = Tr(Lt)), jr(Lt, Gt)) + } + } + function p0(Bt, Lt, Gt) { + for (var tn = Lt; ; ) + if ((hy(Bt, tn, Gt), tn.child === null || (an && tn.tag === 4))) { + if (tn === Lt) break + for (; tn.sibling === null; ) { + if (tn.return === null || tn.return === Lt) return + tn = tn.return + } + ;(tn.sibling.return = tn.return), (tn = tn.sibling) + } else (tn.child.return = tn), (tn = tn.child) + } + function lu(Bt) { + var Lt = Bt.alternate + Lt !== null && ((Bt.alternate = null), lu(Lt)), + (Bt.child = null), + (Bt.deletions = null), + (Bt.sibling = null), + Bt.tag === 5 && ((Lt = Bt.stateNode), Lt !== null && Tn(Lt)), + (Bt.stateNode = null), + (Bt.return = null), + (Bt.dependencies = null), + (Bt.memoizedProps = null), + (Bt.memoizedState = null), + (Bt.pendingProps = null), + (Bt.stateNode = null), + (Bt.updateQueue = null) + } + function Im(Bt) { + return Bt.tag === 5 || Bt.tag === 3 || Bt.tag === 4 + } + function Ou(Bt) { + e: for (;;) { + for (; Bt.sibling === null; ) { + if (Bt.return === null || Im(Bt.return)) return null + Bt = Bt.return + } + for (Bt.sibling.return = Bt.return, Bt = Bt.sibling; Bt.tag !== 5 && Bt.tag !== 6 && Bt.tag !== 18; ) { + if (Bt.flags & 2 || Bt.child === null || Bt.tag === 4) continue e + ;(Bt.child.return = Bt), (Bt = Bt.child) + } + if (!(Bt.flags & 2)) return Bt.stateNode + } + } + function _l(Bt) { + if (an) { + e: { + for (var Lt = Bt.return; Lt !== null; ) { + if (Im(Lt)) break e + Lt = Lt.return + } + throw Error(at(160)) + } + var Gt = Lt + switch (Gt.tag) { + case 5: + ;(Lt = Gt.stateNode), Gt.flags & 32 && (zn(Lt), (Gt.flags &= -33)), (Gt = Ou(Bt)), Am(Bt, Gt, Lt) + break + case 3: + case 4: + ;(Lt = Gt.stateNode.containerInfo), (Gt = Ou(Bt)), dy(Bt, Gt, Lt) + break + default: + throw Error(at(161)) + } + } + } + function dy(Bt, Lt, Gt) { + var tn = Bt.tag + if (tn === 5 || tn === 6) (Bt = Bt.stateNode), Lt ? Zn(Gt, Bt, Lt) : Xt(Gt, Bt) + else if (tn !== 4 && ((Bt = Bt.child), Bt !== null)) + for (dy(Bt, Lt, Gt), Bt = Bt.sibling; Bt !== null; ) dy(Bt, Lt, Gt), (Bt = Bt.sibling) + } + function Am(Bt, Lt, Gt) { + var tn = Bt.tag + if (tn === 5 || tn === 6) (Bt = Bt.stateNode), Lt ? On(Gt, Bt, Lt) : Zt(Gt, Bt) + else if (tn !== 4 && ((Bt = Bt.child), Bt !== null)) + for (Am(Bt, Lt, Gt), Bt = Bt.sibling; Bt !== null; ) Am(Bt, Lt, Gt), (Bt = Bt.sibling) + } + function fy(Bt, Lt, Gt) { + for (var tn = Lt, gn = !1, Cn, Gn; ; ) { + if (!gn) { + gn = tn.return + e: for (;;) { + if (gn === null) throw Error(at(160)) + switch (((Cn = gn.stateNode), gn.tag)) { + case 5: + Gn = !1 + break e + case 3: + ;(Cn = Cn.containerInfo), (Gn = !0) + break e + case 4: + ;(Cn = Cn.containerInfo), (Gn = !0) + break e + } + gn = gn.return + } + gn = !0 + } + if (tn.tag === 5 || tn.tag === 6) p0(Bt, tn, Gt), Gn ? qn(Cn, tn.stateNode) : Vn(Cn, tn.stateNode) + else if (tn.tag === 18) Gn ? Gr(Cn, tn.stateNode) : Nr(Cn, tn.stateNode) + else if (tn.tag === 4) { + if (tn.child !== null) { + ;(Cn = tn.stateNode.containerInfo), (Gn = !0), (tn.child.return = tn), (tn = tn.child) + continue + } + } else if ((hy(Bt, tn, Gt), tn.child !== null)) { + ;(tn.child.return = tn), (tn = tn.child) + continue + } + if (tn === Lt) break + for (; tn.sibling === null; ) { + if (tn.return === null || tn.return === Lt) return + ;(tn = tn.return), tn.tag === 4 && (gn = !1) + } + ;(tn.sibling.return = tn.return), (tn = tn.sibling) + } + } + function Qu(Bt, Lt) { + if (an) { + switch (Lt.tag) { + case 0: + case 11: + case 14: + case 15: + Gl(3, Lt, Lt.return), Bu(3, Lt), Gl(5, Lt, Lt.return) + return + case 1: + return + case 5: + var Gt = Lt.stateNode + if (Gt != null) { + var tn = Lt.memoizedProps + Bt = Bt !== null ? Bt.memoizedProps : tn + var gn = Lt.type, + Cn = Lt.updateQueue + ;(Lt.updateQueue = null), Cn !== null && jn(Gt, Cn, gn, Bt, tn, Lt) + } + return + case 6: + if (Lt.stateNode === null) throw Error(at(162)) + ;(Gt = Lt.memoizedProps), Sn(Lt.stateNode, Bt !== null ? Bt.memoizedProps : Gt, Gt) + return + case 3: + _n && Bt !== null && Bt.memoizedState.isDehydrated && Hr(Lt.stateNode.containerInfo) + return + case 12: + return + case 13: + Yl(Lt) + return + case 19: + Yl(Lt) + return + case 17: + return + } + throw Error(at(163)) + } + switch (Lt.tag) { + case 0: + case 11: + case 14: + case 15: + Gl(3, Lt, Lt.return), Bu(3, Lt), Gl(5, Lt, Lt.return) + return + case 12: + return + case 13: + Yl(Lt) + return + case 19: + Yl(Lt) + return + case 3: + _n && Bt !== null && Bt.memoizedState.isDehydrated && Hr(Lt.stateNode.containerInfo) + break + case 22: + case 23: + return + } + e: if (Qt) { + switch (Lt.tag) { + case 1: + case 5: + case 6: + break e + case 3: + case 4: + ;(Lt = Lt.stateNode), jr(Lt.containerInfo, Lt.pendingChildren) + break e + } + throw Error(at(163)) + } + } + function Yl(Bt) { + var Lt = Bt.updateQueue + if (Lt !== null) { + Bt.updateQueue = null + var Gt = Bt.stateNode + Gt === null && (Gt = Bt.stateNode = new W0()), + Lt.forEach(function (tn) { + var gn = x0.bind(null, Bt, tn) + Gt.has(tn) || (Gt.add(tn), tn.then(gn, gn)) + }) + } + } + function m0(Bt, Lt) { + for (Xr = Lt; Xr !== null; ) { + Lt = Xr + var Gt = Lt.deletions + if (Gt !== null) + for (var tn = 0; tn < Gt.length; tn++) { + var gn = Gt[tn] + try { + var Cn = Bt + an ? fy(Cn, gn, Lt) : p0(Cn, gn, Lt) + var Gn = gn.alternate + Gn !== null && (Gn.return = null), (gn.return = null) + } catch (co) { + Ds(gn, Lt, co) + } + } + if (((Gt = Lt.child), Lt.subtreeFlags & 12854 && Gt !== null)) (Gt.return = Lt), (Xr = Gt) + else + for (; Xr !== null; ) { + Lt = Xr + try { + var rr = Lt.flags + if ((rr & 32 && an && zn(Lt.stateNode), rr & 512)) { + var _r = Lt.alternate + if (_r !== null) { + var Vr = _r.ref + Vr !== null && (typeof Vr == 'function' ? Vr(null) : (Vr.current = null)) + } + } + if (rr & 8192) + switch (Lt.tag) { + case 13: + if (Lt.memoizedState !== null) { + var oo = Lt.alternate + ;(oo === null || oo.memoizedState === null) && (wy = ts()) + } + break + case 22: + var Io = Lt.memoizedState !== null, + ho = Lt.alternate, + Jo = ho !== null && ho.memoizedState !== null + if (((Gt = Lt), an)) { + e: if (((tn = Gt), (gn = Io), (Cn = null), an)) + for (var lo = tn; ; ) { + if (lo.tag === 5) { + if (Cn === null) { + Cn = lo + var Ls = lo.stateNode + gn ? Jn(Ls) : pr(lo.stateNode, lo.memoizedProps) + } + } else if (lo.tag === 6) { + if (Cn === null) { + var Tl = lo.stateNode + gn ? Hn(Tl) : fr(Tl, lo.memoizedProps) + } + } else if ( + ((lo.tag !== 22 && lo.tag !== 23) || lo.memoizedState === null || lo === tn) && + lo.child !== null + ) { + ;(lo.child.return = lo), (lo = lo.child) + continue + } + if (lo === tn) break + for (; lo.sibling === null; ) { + if (lo.return === null || lo.return === tn) break e + Cn === lo && (Cn = null), (lo = lo.return) + } + Cn === lo && (Cn = null), (lo.sibling.return = lo.return), (lo = lo.sibling) + } + } + if (Io && !Jo && Gt.mode & 1) { + Xr = Gt + for (var ur = Gt.child; ur !== null; ) { + for (Gt = Xr = ur; Xr !== null; ) { + tn = Xr + var or = tn.child + switch (tn.tag) { + case 0: + case 11: + case 14: + case 15: + Gl(4, tn, tn.return) + break + case 1: + tm(tn, tn.return) + var yr = tn.stateNode + if (typeof yr.componentWillUnmount == 'function') { + var _i = tn.return + try { + ;(yr.props = tn.memoizedProps), + (yr.state = tn.memoizedState), + yr.componentWillUnmount() + } catch (co) { + Ds(tn, _i, co) + } + } + break + case 5: + tm(tn, tn.return) + break + case 22: + if (tn.memoizedState !== null) { + my(Gt) + continue + } + } + or !== null ? ((or.return = tn), (Xr = or)) : my(Gt) + } + ur = ur.sibling + } + } + } + switch (rr & 4102) { + case 2: + _l(Lt), (Lt.flags &= -3) + break + case 6: + _l(Lt), (Lt.flags &= -3), Qu(Lt.alternate, Lt) + break + case 4096: + Lt.flags &= -4097 + break + case 4100: + ;(Lt.flags &= -4097), Qu(Lt.alternate, Lt) + break + case 4: + Qu(Lt.alternate, Lt) + } + } catch (co) { + Ds(Lt, Lt.return, co) + } + if (((Gt = Lt.sibling), Gt !== null)) { + ;(Gt.return = Lt.return), (Xr = Gt) + break + } + Xr = Lt.return + } + } + } + function V0(Bt, Lt, Gt) { + ;(Xr = Bt), nm(Bt) + } + function nm(Bt, Lt, Gt) { + for (var tn = (Bt.mode & 1) !== 0; Xr !== null; ) { + var gn = Xr, + Cn = gn.child + if (gn.tag === 22 && tn) { + var Gn = gn.memoizedState !== null || Tm + if (!Gn) { + var rr = gn.alternate, + _r = (rr !== null && rr.memoizedState !== null) || Ju + rr = Tm + var Vr = Ju + if (((Tm = Gn), (Ju = _r) && !Vr)) + for (Xr = gn; Xr !== null; ) + (Gn = Xr), + (_r = Gn.child), + Gn.tag === 22 && Gn.memoizedState !== null + ? Is(gn) + : _r !== null + ? ((_r.return = Gn), (Xr = _r)) + : Is(gn) + for (; Cn !== null; ) (Xr = Cn), nm(Cn), (Cn = Cn.sibling) + ;(Xr = gn), (Tm = rr), (Ju = Vr) + } + g0(Bt) + } else gn.subtreeFlags & 8772 && Cn !== null ? ((Cn.return = gn), (Xr = Cn)) : g0(Bt) + } + } + function g0(Bt) { + for (; Xr !== null; ) { + var Lt = Xr + if (Lt.flags & 8772) { + var Gt = Lt.alternate + try { + if (Lt.flags & 8772) + switch (Lt.tag) { + case 0: + case 11: + case 15: + Ju || Bu(5, Lt) + break + case 1: + var tn = Lt.stateNode + if (Lt.flags & 4 && !Ju) + if (Gt === null) tn.componentDidMount() + else { + var gn = Lt.elementType === Lt.type ? Gt.memoizedProps : ls(Lt.type, Gt.memoizedProps) + tn.componentDidUpdate(gn, Gt.memoizedState, tn.__reactInternalSnapshotBeforeUpdate) + } + var Cn = Lt.updateQueue + Cn !== null && ym(Lt, Cn, tn) + break + case 3: + var Gn = Lt.updateQueue + if (Gn !== null) { + if (((Gt = null), Lt.child !== null)) + switch (Lt.child.tag) { + case 5: + Gt = Ot(Lt.child.stateNode) + break + case 1: + Gt = Lt.child.stateNode + } + ym(Lt, Gn, Gt) + } + break + case 5: + var rr = Lt.stateNode + Gt === null && Lt.flags & 4 && Rn(rr, Lt.type, Lt.memoizedProps, Lt) + break + case 6: + break + case 4: + break + case 12: + break + case 13: + if (_n && Lt.memoizedState === null) { + var _r = Lt.alternate + if (_r !== null) { + var Vr = _r.memoizedState + if (Vr !== null) { + var oo = Vr.dehydrated + oo !== null && vr(oo) + } + } + } + break + case 19: + case 17: + case 21: + case 22: + case 23: + break + default: + throw Error(at(163)) + } + Ju || (Lt.flags & 512 && uy(Lt)) + } catch (Io) { + Ds(Lt, Lt.return, Io) + } + } + if (Lt === Bt) { + Xr = null + break + } + if (((Gt = Lt.sibling), Gt !== null)) { + ;(Gt.return = Lt.return), (Xr = Gt) + break + } + Xr = Lt.return + } + } + function my(Bt) { + for (; Xr !== null; ) { + var Lt = Xr + if (Lt === Bt) { + Xr = null + break + } + var Gt = Lt.sibling + if (Gt !== null) { + ;(Gt.return = Lt.return), (Xr = Gt) + break + } + Xr = Lt.return + } + } + function Is(Bt) { + for (; Xr !== null; ) { + var Lt = Xr + try { + switch (Lt.tag) { + case 0: + case 11: + case 15: + var Gt = Lt.return + try { + Bu(4, Lt) + } catch (_r) { + Ds(Lt, Gt, _r) + } + break + case 1: + var tn = Lt.stateNode + if (typeof tn.componentDidMount == 'function') { + var gn = Lt.return + try { + tn.componentDidMount() + } catch (_r) { + Ds(Lt, gn, _r) + } + } + var Cn = Lt.return + try { + uy(Lt) + } catch (_r) { + Ds(Lt, Cn, _r) + } + break + case 5: + var Gn = Lt.return + try { + uy(Lt) + } catch (_r) { + Ds(Lt, Gn, _r) + } + } + } catch (_r) { + Ds(Lt, Lt.return, _r) + } + if (Lt === Bt) { + Xr = null + break + } + var rr = Lt.sibling + if (rr !== null) { + ;(rr.return = Lt.return), (Xr = rr) + break + } + Xr = Lt.return + } + } + var xp = 0, + rm = 1, + xl = 2, + kp = 3, + _h = 4 + if (typeof Symbol == 'function' && Symbol.for) { + var Xl = Symbol.for + ;(xp = Xl('selector.component')), + (rm = Xl('selector.has_pseudo_class')), + (xl = Xl('selector.role')), + (kp = Xl('selector.test_id')), + (_h = Xl('selector.text')) + } + function Cm(Bt) { + var Lt = Pn(Bt) + if (Lt != null) { + if (typeof Lt.memoizedProps['data-testname'] != 'string') throw Error(at(364)) + return Lt + } + if (((Bt = An(Bt)), Bt === null)) throw Error(at(362)) + return Bt.stateNode.current + } + function Cs(Bt, Lt) { + switch (Lt.$$typeof) { + case xp: + if (Bt.type === Lt.value) return !0 + break + case rm: + e: { + ;(Lt = Lt.value), (Bt = [Bt, 0]) + for (var Gt = 0; Gt < Bt.length; ) { + var tn = Bt[Gt++], + gn = Bt[Gt++], + Cn = Lt[gn] + if (tn.tag !== 5 || !pn(tn)) { + for (; Cn != null && Cs(tn, Cn); ) gn++, (Cn = Lt[gn]) + if (gn === Lt.length) { + Lt = !0 + break e + } else for (tn = tn.child; tn !== null; ) Bt.push(tn, gn), (tn = tn.sibling) + } + } + Lt = !1 + } + return Lt + case xl: + if (Bt.tag === 5 && kn(Bt.stateNode, Lt.value)) return !0 + break + case _h: + if ((Bt.tag === 5 || Bt.tag === 6) && ((Bt = fn(Bt)), Bt !== null && 0 <= Bt.indexOf(Lt.value))) return !0 + break + case kp: + if ( + Bt.tag === 5 && + ((Bt = Bt.memoizedProps['data-testname']), + typeof Bt == 'string' && Bt.toLowerCase() === Lt.value.toLowerCase()) + ) + return !0 + break + default: + throw Error(at(365)) + } + return !1 + } + function im(Bt) { + switch (Bt.$$typeof) { + case xp: + return '<' + (At(Bt.value) || 'Unknown') + '>' + case rm: + return ':has(' + (im(Bt) || '') + ')' + case xl: + return '[role="' + Bt.value + '"]' + case _h: + return '"' + Bt.value + '"' + case kp: + return '[data-testname="' + Bt.value + '"]' + default: + throw Error(at(365)) + } + } + function y0(Bt, Lt) { + var Gt = [] + Bt = [Bt, 0] + for (var tn = 0; tn < Bt.length; ) { + var gn = Bt[tn++], + Cn = Bt[tn++], + Gn = Lt[Cn] + if (gn.tag !== 5 || !pn(gn)) { + for (; Gn != null && Cs(gn, Gn); ) Cn++, (Gn = Lt[Cn]) + if (Cn === Lt.length) Gt.push(gn) + else for (gn = gn.child; gn !== null; ) Bt.push(gn, Cn), (gn = gn.sibling) + } + } + return Gt + } + function gy(Bt, Lt) { + if (!In) throw Error(at(363)) + ;(Bt = Cm(Bt)), (Bt = y0(Bt, Lt)), (Lt = []), (Bt = Array.from(Bt)) + for (var Gt = 0; Gt < Bt.length; ) { + var tn = Bt[Gt++] + if (tn.tag === 5) pn(tn) || Lt.push(tn.stateNode) + else for (tn = tn.child; tn !== null; ) Bt.push(tn), (tn = tn.sibling) + } + return Lt + } + var H0 = Math.ceil, + Sp = st.ReactCurrentDispatcher, + yy = st.ReactCurrentOwner, + xa = st.ReactCurrentBatchConfig, + Bo = 0, + fs = null, + ps = null, + us = 0, + Sl = 0, + Ep = Br(0), + hs = 0, + Tp = null, + Ip = 0, + $m = 0, + by = 0, + Ap = null, + Bs = null, + wy = 0, + om = 1 / 0 + function _d() { + om = ts() + 500 + } + var am = !1, + Pm = null, + Zl = null, + Mm = !1, + ku = null, + sm = 0, + lm = 0, + Rm = null, + Bm = -1, + Cp = 0 + function Os() { + return Bo & 6 ? ts() : Bm !== -1 ? Bm : (Bm = ts()) + } + function cu(Bt) { + return Bt.mode & 1 + ? Bo & 2 && us !== 0 + ? us & -us + : Hu.transition !== null + ? (Cp === 0 && ((Bt = Wo), (Wo <<= 1), !(Wo & 4194240) && (Wo = 64), (Cp = Bt)), Cp) + : ((Bt = No), Bt !== 0 ? Bt : Nn()) + : 1 + } + function Pl(Bt, Lt, Gt) { + if (50 < lm) throw ((lm = 0), (Rm = null), Error(at(185))) + var tn = $p(Bt, Lt) + return tn === null + ? null + : (Zo(tn, Lt, Gt), + (!(Bo & 2) || tn !== fs) && + (tn === fs && (!(Bo & 2) && ($m |= Lt), hs === 4 && ju(tn, us)), + mo(tn, Gt), + Lt === 1 && Bo === 0 && !(Bt.mode & 1) && (_d(), nu && Ws())), + tn) + } + function $p(Bt, Lt) { + Bt.lanes |= Lt + var Gt = Bt.alternate + for (Gt !== null && (Gt.lanes |= Lt), Gt = Bt, Bt = Bt.return; Bt !== null; ) + (Bt.childLanes |= Lt), (Gt = Bt.alternate), Gt !== null && (Gt.childLanes |= Lt), (Gt = Bt), (Bt = Bt.return) + return Gt.tag === 3 ? Gt.stateNode : null + } + function mo(Bt, Lt) { + var Gt = Bt.callbackNode + ga(Bt, Lt) + var tn = Go(Bt, Bt === fs ? us : 0) + if (tn === 0) Gt !== null && op(Gt), (Bt.callbackNode = null), (Bt.callbackPriority = 0) + else if (((Lt = tn & -tn), Bt.callbackPriority !== Lt)) { + if ((Gt != null && op(Gt), Lt === 1)) + Bt.tag === 0 ? jp(v0.bind(null, Bt)) : Op(v0.bind(null, Bt)), + cn + ? mn(function () { + Bo === 0 && Ws() + }) + : tu(mu, Ws), + (Gt = null) + else { + switch (Mp(tn)) { + case 1: + Gt = mu + break + case 4: + Gt = gm + break + case 16: + Gt = Us + break + case 536870912: + Gt = Bp + break + default: + Gt = Us + } + Gt = Nm(Gt, b0.bind(null, Bt)) + } + ;(Bt.callbackPriority = Lt), (Bt.callbackNode = Gt) + } + } + function b0(Bt, Lt) { + if (((Bm = -1), (Cp = 0), Bo & 6)) throw Error(at(327)) + var Gt = Bt.callbackNode + if (Lu() && Bt.callbackNode !== Gt) return null + var tn = Go(Bt, Bt === fs ? us : 0) + if (tn === 0) return null + if (tn & 30 || tn & Bt.expiredLanes || Lt) Lt = js(Bt, tn) + else { + Lt = tn + var gn = Bo + Bo |= 2 + var Cn = Sy() + ;(fs !== Bt || us !== Lt) && (_d(), uu(Bt, Lt)) + do + try { + Ey() + break + } catch (rr) { + Om(Bt, rr) + } + while (1) + Gu(), (Sp.current = Cn), (Bo = gn), ps !== null ? (Lt = 0) : ((fs = null), (us = 0), (Lt = hs)) + } + if (Lt !== 0) { + if ((Lt === 2 && ((gn = na(Bt)), gn !== 0 && ((tn = gn), (Lt = vy(Bt, gn)))), Lt === 1)) + throw ((Gt = Tp), uu(Bt, 0), ju(Bt, tn), mo(Bt, ts()), Gt) + if (Lt === 6) ju(Bt, tn) + else { + if ( + ((gn = Bt.current.alternate), + !(tn & 30) && + !w0(gn) && + ((Lt = js(Bt, tn)), Lt === 2 && ((Cn = na(Bt)), Cn !== 0 && ((tn = Cn), (Lt = vy(Bt, Cn)))), Lt === 1)) + ) + throw ((Gt = Tp), uu(Bt, 0), ju(Bt, tn), mo(Bt, ts()), Gt) + switch (((Bt.finishedWork = gn), (Bt.finishedLanes = tn), Lt)) { + case 0: + case 1: + throw Error(at(345)) + case 2: + Nu(Bt, Bs) + break + case 3: + if ((ju(Bt, tn), (tn & 130023424) === tn && ((Lt = wy + 500 - ts()), 10 < Lt))) { + if (Go(Bt, 0) !== 0) break + if (((gn = Bt.suspendedLanes), (gn & tn) !== tn)) { + Os(), (Bt.pingedLanes |= Bt.suspendedLanes & gn) + break + } + Bt.timeoutHandle = rn(Nu.bind(null, Bt, Bs), Lt) + break + } + Nu(Bt, Bs) + break + case 4: + if ((ju(Bt, tn), (tn & 4194240) === tn)) break + for (Lt = Bt.eventTimes, gn = -1; 0 < tn; ) { + var Gn = 31 - xo(tn) + ;(Cn = 1 << Gn), (Gn = Lt[Gn]), Gn > gn && (gn = Gn), (tn &= ~Cn) + } + if ( + ((tn = gn), + (tn = ts() - tn), + (tn = + (120 > tn + ? 120 + : 480 > tn + ? 480 + : 1080 > tn + ? 1080 + : 1920 > tn + ? 1920 + : 3e3 > tn + ? 3e3 + : 4320 > tn + ? 4320 + : 1960 * H0(tn / 1960)) - tn), + 10 < tn) + ) { + Bt.timeoutHandle = rn(Nu.bind(null, Bt, Bs), tn) + break + } + Nu(Bt, Bs) + break + case 5: + Nu(Bt, Bs) + break + default: + throw Error(at(329)) + } + } + } + return mo(Bt, ts()), Bt.callbackNode === Gt ? b0.bind(null, Bt) : null + } + function vy(Bt, Lt) { + var Gt = Ap + return ( + Bt.current.memoizedState.isDehydrated && (uu(Bt, Lt).flags |= 256), + (Bt = js(Bt, Lt)), + Bt !== 2 && ((Lt = Bs), (Bs = Gt), Lt !== null && _f(Lt)), + Bt + ) + } + function _f(Bt) { + Bs === null ? (Bs = Bt) : Bs.push.apply(Bs, Bt) + } + function w0(Bt) { + for (var Lt = Bt; ; ) { + if (Lt.flags & 16384) { + var Gt = Lt.updateQueue + if (Gt !== null && ((Gt = Gt.stores), Gt !== null)) + for (var tn = 0; tn < Gt.length; tn++) { + var gn = Gt[tn], + Cn = gn.getSnapshot + gn = gn.value + try { + if (!Zs(Cn(), gn)) return !1 + } catch { + return !1 + } + } + } + if (((Gt = Lt.child), Lt.subtreeFlags & 16384 && Gt !== null)) (Gt.return = Lt), (Lt = Gt) + else { + if (Lt === Bt) break + for (; Lt.sibling === null; ) { + if (Lt.return === null || Lt.return === Bt) return !0 + Lt = Lt.return + } + ;(Lt.sibling.return = Lt.return), (Lt = Lt.sibling) + } + } + return !0 + } + function ju(Bt, Lt) { + for (Lt &= ~by, Lt &= ~$m, Bt.suspendedLanes |= Lt, Bt.pingedLanes &= ~Lt, Bt = Bt.expirationTimes; 0 < Lt; ) { + var Gt = 31 - xo(Lt), + tn = 1 << Gt + ;(Bt[Gt] = -1), (Lt &= ~tn) + } + } + function v0(Bt) { + if (Bo & 6) throw Error(at(327)) + Lu() + var Lt = Go(Bt, 0) + if (!(Lt & 1)) return mo(Bt, ts()), null + var Gt = js(Bt, Lt) + if (Bt.tag !== 0 && Gt === 2) { + var tn = na(Bt) + tn !== 0 && ((Lt = tn), (Gt = vy(Bt, tn))) + } + if (Gt === 1) throw ((Gt = Tp), uu(Bt, 0), ju(Bt, Lt), mo(Bt, ts()), Gt) + if (Gt === 6) throw Error(at(345)) + return (Bt.finishedWork = Bt.current.alternate), (Bt.finishedLanes = Lt), Nu(Bt, Bs), mo(Bt, ts()), null + } + function El(Bt) { + ku !== null && ku.tag === 0 && !(Bo & 6) && Lu() + var Lt = Bo + Bo |= 1 + var Gt = xa.transition, + tn = No + try { + if (((xa.transition = null), (No = 1), Bt)) return Bt() + } finally { + ;(No = tn), (xa.transition = Gt), (Bo = Lt), !(Bo & 6) && Ws() + } + } + function xy() { + ;(Sl = Ep.current), tr(Ep) + } + function uu(Bt, Lt) { + ;(Bt.finishedWork = null), (Bt.finishedLanes = 0) + var Gt = Bt.timeoutHandle + if ((Gt !== hn && ((Bt.timeoutHandle = hn), nn(Gt)), ps !== null)) + for (Gt = ps.return; Gt !== null; ) { + var tn = Gt + switch ((Vs(tn), tn.tag)) { + case 1: + ;(tn = tn.type.childContextTypes), tn != null && fo() + break + case 3: + mp(), tr(br), tr(dr), ro() + break + case 5: + Cu(tn) + break + case 4: + mp() + break + case 13: + tr(er) + break + case 19: + tr(er) + break + case 10: + bs(tn.type._context) + break + case 22: + case 23: + xy() + } + Gt = Gt.return + } + if ( + ((fs = Bt), + (ps = Bt = Su(Bt.current, null)), + (us = Sl = Lt), + (hs = 0), + (Tp = null), + (by = $m = Ip = 0), + (Bs = Ap = null), + Js !== null) + ) { + for (Lt = 0; Lt < Js.length; Lt++) + if (((Gt = Js[Lt]), (tn = Gt.interleaved), tn !== null)) { + Gt.interleaved = null + var gn = tn.next, + Cn = Gt.pending + if (Cn !== null) { + var Gn = Cn.next + ;(Cn.next = gn), (tn.next = Gn) + } + Gt.pending = tn + } + Js = null + } + return Bt + } + function Om(Bt, Lt) { + do { + var Gt = ps + try { + if ((Gu(), (To.current = wp), Gs)) { + for (var tn = ko.memoizedState; tn !== null; ) { + var gn = tn.queue + gn !== null && (gn.pending = null), (tn = tn.next) + } + Gs = !1 + } + if ( + ((es = 0), + (Ts = Es = ko = null), + ($u = !1), + (Vp = 0), + (yy.current = null), + Gt === null || Gt.return === null) + ) { + ;(hs = 1), (Tp = Lt), (ps = null) + break + } + e: { + var Cn = Bt, + Gn = Gt.return, + rr = Gt, + _r = Lt + if ( + ((Lt = us), (rr.flags |= 32768), _r !== null && typeof _r == 'object' && typeof _r.then == 'function') + ) { + var Vr = _r, + oo = rr, + Io = oo.tag + if (!(oo.mode & 1) && (Io === 0 || Io === 11 || Io === 15)) { + var ho = oo.alternate + ho + ? ((oo.updateQueue = ho.updateQueue), (oo.memoizedState = ho.memoizedState), (oo.lanes = ho.lanes)) + : ((oo.updateQueue = null), (oo.memoizedState = null)) + } + var Jo = Jy(Gn) + if (Jo !== null) { + ;(Jo.flags &= -257), Qy(Jo, Gn, rr, Cn, Lt), Jo.mode & 1 && Zy(Cn, Vr, Lt), (Lt = Jo), (_r = Vr) + var lo = Lt.updateQueue + if (lo === null) { + var Ls = new Set() + Ls.add(_r), (Lt.updateQueue = Ls) + } else lo.add(_r) + break e + } else { + if (!(Lt & 1)) { + Zy(Cn, Vr, Lt), jm() + break e + } + _r = Error(at(426)) + } + } else if (_a && rr.mode & 1) { + var Tl = Jy(Gn) + if (Tl !== null) { + !(Tl.flags & 65536) && (Tl.flags |= 256), Qy(Tl, Gn, rr, Cn, Lt), zp(_r) + break e + } + } + ;(Cn = _r), hs !== 4 && (hs = 2), Ap === null ? (Ap = [Cn]) : Ap.push(Cn), (_r = Ku(_r, rr)), (rr = Gn) + do { + switch (rr.tag) { + case 3: + ;(rr.flags |= 65536), (Lt &= -Lt), (rr.lanes |= Lt) + var ur = Zu(rr, _r, Lt) + ba(rr, ur) + break e + case 1: + Cn = _r + var or = rr.type, + yr = rr.stateNode + if ( + !(rr.flags & 128) && + (typeof or.getDerivedStateFromError == 'function' || + (yr !== null && typeof yr.componentDidCatch == 'function' && (Zl === null || !Zl.has(yr)))) + ) { + ;(rr.flags |= 65536), (Lt &= -Lt), (rr.lanes |= Lt) + var _i = Xy(rr, Cn, Lt) + ba(rr, _i) + break e + } + } + rr = rr.return + } while (rr !== null) + } + cm(Gt) + } catch (co) { + ;(Lt = co), ps === Gt && Gt !== null && (ps = Gt = Gt.return) + continue + } + break + } while (1) + } + function Sy() { + var Bt = Sp.current + return (Sp.current = wp), Bt === null ? wp : Bt + } + function jm() { + ;(hs === 0 || hs === 3 || hs === 2) && (hs = 4), + fs === null || (!(Ip & 268435455) && !($m & 268435455)) || ju(fs, us) + } + function js(Bt, Lt) { + var Gt = Bo + Bo |= 2 + var tn = Sy() + ;(fs === Bt && us === Lt) || uu(Bt, Lt) + do + try { + Du() + break + } catch (gn) { + Om(Bt, gn) + } + while (1) + if ((Gu(), (Bo = Gt), (Sp.current = tn), ps !== null)) throw Error(at(261)) + return (fs = null), (us = 0), hs + } + function Du() { + for (; ps !== null; ) Ty(ps) + } + function Ey() { + for (; ps !== null && !Rp(); ) Ty(ps) + } + function Ty(Bt) { + var Lt = Ay(Bt.alternate, Bt, Sl) + ;(Bt.memoizedProps = Bt.pendingProps), Lt === null ? cm(Bt) : (ps = Lt), (yy.current = null) + } + function cm(Bt) { + var Lt = Bt + do { + var Gt = Lt.alternate + if (((Bt = Lt.return), Lt.flags & 32768)) { + if (((Gt = z0(Gt, Lt)), Gt !== null)) { + ;(Gt.flags &= 32767), (ps = Gt) + return + } + if (Bt !== null) (Bt.flags |= 32768), (Bt.subtreeFlags = 0), (Bt.deletions = null) + else { + ;(hs = 6), (ps = null) + return + } + } else if (((Gt = L0(Gt, Lt, Sl)), Gt !== null)) { + ps = Gt + return + } + if (((Lt = Lt.sibling), Lt !== null)) { + ps = Lt + return + } + ps = Lt = Bt + } while (Lt !== null) + hs === 0 && (hs = 5) + } + function Nu(Bt, Lt) { + var Gt = No, + tn = xa.transition + try { + ;(xa.transition = null), (No = 1), Iy(Bt, Lt, Gt) + } finally { + ;(xa.transition = tn), (No = Gt) + } + return null + } + function Iy(Bt, Lt, Gt) { + do Lu() + while (ku !== null) + if (Bo & 6) throw Error(at(327)) + var tn = Bt.finishedWork, + gn = Bt.finishedLanes + if (tn === null) return null + if (((Bt.finishedWork = null), (Bt.finishedLanes = 0), tn === Bt.current)) throw Error(at(177)) + ;(Bt.callbackNode = null), (Bt.callbackPriority = 0) + var Cn = tn.lanes | tn.childLanes + if ( + (pu(Bt, Cn), + Bt === fs && ((ps = fs = null), (us = 0)), + (!(tn.subtreeFlags & 2064) && !(tn.flags & 2064)) || + Mm || + ((Mm = !0), + Nm(Us, function () { + return Lu(), null + })), + (Cn = (tn.flags & 15990) !== 0), + tn.subtreeFlags & 15990 || Cn) + ) { + ;(Cn = xa.transition), (xa.transition = null) + var Gn = No + No = 1 + var rr = Bo + ;(Bo |= 4), + (yy.current = null), + cy(Bt, tn), + m0(Bt, tn), + Nt(Bt.containerInfo), + (Bt.current = tn), + V0(tn), + mm(), + (Bo = rr), + (No = Gn), + (xa.transition = Cn) + } else Bt.current = tn + if ( + (Mm && ((Mm = !1), (ku = Bt), (sm = gn)), + (Cn = Bt.pendingLanes), + Cn === 0 && (Zl = null), + Yo(tn.stateNode), + mo(Bt, ts()), + Lt !== null) + ) + for (Gt = Bt.onRecoverableError, tn = 0; tn < Lt.length; tn++) Gt(Lt[tn]) + if (am) throw ((am = !1), (Bt = Pm), (Pm = null), Bt) + return ( + sm & 1 && Bt.tag !== 0 && Lu(), + (Cn = Bt.pendingLanes), + Cn & 1 ? (Bt === Rm ? lm++ : ((lm = 0), (Rm = Bt))) : (lm = 0), + Ws(), + null + ) + } + function Lu() { + if (ku !== null) { + var Bt = Mp(sm), + Lt = xa.transition, + Gt = No + try { + if (((xa.transition = null), (No = 16 > Bt ? 16 : Bt), ku === null)) var tn = !1 + else { + if (((Bt = ku), (ku = null), (sm = 0), Bo & 6)) throw Error(at(331)) + var gn = Bo + for (Bo |= 4, Xr = Bt.current; Xr !== null; ) { + var Cn = Xr, + Gn = Cn.child + if (Xr.flags & 16) { + var rr = Cn.deletions + if (rr !== null) { + for (var _r = 0; _r < rr.length; _r++) { + var Vr = rr[_r] + for (Xr = Vr; Xr !== null; ) { + var oo = Xr + switch (oo.tag) { + case 0: + case 11: + case 15: + Gl(8, oo, Cn) + } + var Io = oo.child + if (Io !== null) (Io.return = oo), (Xr = Io) + else + for (; Xr !== null; ) { + oo = Xr + var ho = oo.sibling, + Jo = oo.return + if ((lu(oo), oo === Vr)) { + Xr = null + break + } + if (ho !== null) { + ;(ho.return = Jo), (Xr = ho) + break + } + Xr = Jo + } + } + } + var lo = Cn.alternate + if (lo !== null) { + var Ls = lo.child + if (Ls !== null) { + lo.child = null + do { + var Tl = Ls.sibling + ;(Ls.sibling = null), (Ls = Tl) + } while (Ls !== null) + } + } + Xr = Cn + } + } + if (Cn.subtreeFlags & 2064 && Gn !== null) (Gn.return = Cn), (Xr = Gn) + else + e: for (; Xr !== null; ) { + if (((Cn = Xr), Cn.flags & 2048)) + switch (Cn.tag) { + case 0: + case 11: + case 15: + Gl(9, Cn, Cn.return) + } + var ur = Cn.sibling + if (ur !== null) { + ;(ur.return = Cn.return), (Xr = ur) + break e + } + Xr = Cn.return + } + } + var or = Bt.current + for (Xr = or; Xr !== null; ) { + Gn = Xr + var yr = Gn.child + if (Gn.subtreeFlags & 2064 && yr !== null) (yr.return = Gn), (Xr = yr) + else + e: for (Gn = or; Xr !== null; ) { + if (((rr = Xr), rr.flags & 2048)) + try { + switch (rr.tag) { + case 0: + case 11: + case 15: + Bu(9, rr) + } + } catch (co) { + Ds(rr, rr.return, co) + } + if (rr === Gn) { + Xr = null + break e + } + var _i = rr.sibling + if (_i !== null) { + ;(_i.return = rr.return), (Xr = _i) + break e + } + Xr = rr.return + } + } + if (((Bo = gn), Ws(), Xs && typeof Xs.onPostCommitFiberRoot == 'function')) + try { + Xs.onPostCommitFiberRoot(Vu, Bt) + } catch {} + tn = !0 + } + return tn + } finally { + ;(No = Gt), (xa.transition = Lt) + } + } + return !1 + } + function Dm(Bt, Lt, Gt) { + ;(Lt = Ku(Gt, Lt)), + (Lt = Zu(Bt, Lt, 1)), + Nl(Bt, Lt), + (Lt = Os()), + (Bt = $p(Bt, 1)), + Bt !== null && (Zo(Bt, 1, Lt), mo(Bt, Lt)) + } + function Ds(Bt, Lt, Gt) { + if (Bt.tag === 3) Dm(Bt, Bt, Gt) + else + for (; Lt !== null; ) { + if (Lt.tag === 3) { + Dm(Lt, Bt, Gt) + break + } else if (Lt.tag === 1) { + var tn = Lt.stateNode + if ( + typeof Lt.type.getDerivedStateFromError == 'function' || + (typeof tn.componentDidCatch == 'function' && (Zl === null || !Zl.has(tn))) + ) { + ;(Bt = Ku(Gt, Bt)), + (Bt = Xy(Lt, Bt, 1)), + Nl(Lt, Bt), + (Bt = Os()), + (Lt = $p(Lt, 1)), + Lt !== null && (Zo(Lt, 1, Bt), mo(Lt, Bt)) + break + } + } + Lt = Lt.return + } + } + function Fu(Bt, Lt, Gt) { + var tn = Bt.pingCache + tn !== null && tn.delete(Lt), + (Lt = Os()), + (Bt.pingedLanes |= Bt.suspendedLanes & Gt), + fs === Bt && + (us & Gt) === Gt && + (hs === 4 || (hs === 3 && (us & 130023424) === us && 500 > ts() - wy) ? uu(Bt, 0) : (by |= Gt)), + mo(Bt, Lt) + } + function _0(Bt, Lt) { + Lt === 0 && (Bt.mode & 1 ? ((Lt = Po), (Po <<= 1), !(Po & 130023424) && (Po = 4194304)) : (Lt = 1)) + var Gt = Os() + ;(Bt = $p(Bt, Lt)), Bt !== null && (Zo(Bt, Lt, Gt), mo(Bt, Gt)) + } + function Uu(Bt) { + var Lt = Bt.memoizedState, + Gt = 0 + Lt !== null && (Gt = Lt.retryLane), _0(Bt, Gt) + } + function x0(Bt, Lt) { + var Gt = 0 + switch (Bt.tag) { + case 13: + var tn = Bt.stateNode, + gn = Bt.memoizedState + gn !== null && (Gt = gn.retryLane) + break + case 19: + tn = Bt.stateNode + break + default: + throw Error(at(314)) + } + tn !== null && tn.delete(Lt), _0(Bt, Gt) + } + var Ay + Ay = function (Bt, Lt, Gt) { + if (Bt !== null) + if (Bt.memoizedProps !== Lt.pendingProps || br.current) yl = !0 + else { + if (!(Bt.lanes & Gt) && !(Lt.flags & 128)) return (yl = !1), U0(Bt, Lt, Gt) + yl = !!(Bt.flags & 131072) + } + else (yl = !1), _a && Lt.flags & 1048576 && Dy(Lt, Fp, Lt.index) + switch (((Lt.lanes = 0), Lt.tag)) { + case 2: + var tn = Lt.type + Bt !== null && ((Bt.alternate = null), (Lt.alternate = null), (Lt.flags |= 2)), (Bt = Lt.pendingProps) + var gn = no(Lt, dr.current) + os(Lt, Gt), (gn = qo(null, Lt, tn, Bt, gn, Gt)) + var Cn = Qm() + return ( + (Lt.flags |= 1), + typeof gn == 'object' && gn !== null && typeof gn.render == 'function' && gn.$$typeof === void 0 + ? ((Lt.tag = 1), + (Lt.memoizedState = null), + (Lt.updateQueue = null), + so(tn) ? ((Cn = !0), vo(Lt)) : (Cn = !1), + (Lt.memoizedState = gn.state !== null && gn.state !== void 0 ? gn.state : null), + qm(Lt), + (gn.updater = bm), + (Lt.stateNode = gn), + (gn._reactInternals = Lt), + sp(Lt, tn, Bt, Gt), + (Lt = oy(null, Lt, tn, !0, Cn, Gt))) + : ((Lt.tag = 0), _a && Cn && wm(Lt), cs(null, Lt, gn, Gt), (Lt = Lt.child)), + Lt + ) + case 16: + tn = Lt.elementType + e: { + switch ( + (Bt !== null && ((Bt.alternate = null), (Lt.alternate = null), (Lt.flags |= 2)), + (Bt = Lt.pendingProps), + (gn = tn._init), + (tn = gn(tn._payload)), + (Lt.type = tn), + (gn = Lt.tag = k0(tn)), + (Bt = ls(tn, Bt)), + gn) + ) { + case 0: + Lt = Hl(null, Lt, tn, Bt, Gt) + break e + case 1: + Lt = a0(null, Lt, tn, Bt, Gt) + break e + case 11: + Lt = e0(null, Lt, tn, Bt, Gt) + break e + case 14: + Lt = n0(null, Lt, tn, ls(tn.type, Bt), Gt) + break e + } + throw Error(at(306, tn, '')) + } + return Lt + case 0: + return ( + (tn = Lt.type), + (gn = Lt.pendingProps), + (gn = Lt.elementType === tn ? gn : ls(tn, gn)), + Hl(Bt, Lt, tn, gn, Gt) + ) + case 1: + return ( + (tn = Lt.type), + (gn = Lt.pendingProps), + (gn = Lt.elementType === tn ? gn : ls(tn, gn)), + a0(Bt, Lt, tn, gn, Gt) + ) + case 3: + e: { + if ((s0(Lt), Bt === null)) throw Error(at(387)) + ;(tn = Lt.pendingProps), (Cn = Lt.memoizedState), (gn = Cn.element), Ym(Bt, Lt), Ll(Lt, tn, null, Gt) + var Gn = Lt.memoizedState + if (((tn = Gn.element), _n && Cn.isDehydrated)) + if ( + ((Cn = { element: tn, isDehydrated: !1, cache: Gn.cache, transitions: Gn.transitions }), + (Lt.updateQueue.baseState = Cn), + (Lt.memoizedState = Cn), + Lt.flags & 256) + ) { + ;(gn = Error(at(423))), (Lt = l0(Bt, Lt, tn, Gt, gn)) + break e + } else if (tn !== gn) { + ;(gn = Error(at(424))), (Lt = l0(Bt, Lt, tn, Gt, gn)) + break e + } else + for ( + _n && ((As = Ln(Lt.stateNode.containerInfo)), (Hs = Lt), (_a = !0), (Wl = null), (cp = !1)), + Gt = Uy(Lt, null, tn, Gt), + Lt.child = Gt; + Gt; -A Bitcoin Podcast. -`},{children:["9dcca755-0a20-45e5-8e4d-dfe2800b9c6f","9dcca755-0a20-45e5-8e4d-dfe2800b9c6f"],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/fe6bdbce-e91d-43cf-ab33-0e98bffabecc.jpg",node_type:"show",ref_id:"fe6bdbce-e91d-43cf-ab33-0e98bffabecc",show_title:"Bitcoin Charlotte"},{children:["b8289cbb-ec69-49a8-b6ab-c1fd808acc09"],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/4240c90e-0086-4ece-bfe5-84a282c5059e.jpg",node_type:"show",ref_id:"4240c90e-0086-4ece-bfe5-84a282c5059e",show_title:"Thriller Bitcoin"},{children:["daddd93e-7bc6-4c50-a150-5199b437afc9"],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/24a144b0-7ca3-40e9-9c42-86b9fce0b662.jpg",node_type:"show",ref_id:"24a144b0-7ca3-40e9-9c42-86b9fce0b662",show_title:"The Chaincode Podcast"},{children:["56bf65e9-41d5-42e1-95d6-239e4c835781","56bf65e9-41d5-42e1-95d6-239e4c835781","56bf65e9-41d5-42e1-95d6-239e4c835781","ff88a8b8-bcd6-4d86-8a65-8a68def35b9f","810a3acb-e30e-46bc-8c67-1d504b2e7c09","810a3acb-e30e-46bc-8c67-1d504b2e7c09"],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/f1879df9-9bc6-4a76-951f-24548da768ef.jpg",node_type:"show",ref_id:"f1879df9-9bc6-4a76-951f-24548da768ef",show_title:"Bitcoin.Review Podcast with NVK & Guests"},{children:["f7e75069-adf6-41b0-9bb7-a6a2aa846493","f7e75069-adf6-41b0-9bb7-a6a2aa846493","6eb2a481-408f-4989-9f28-67789651259a","89049a1c-0171-4999-b003-57e1b57d92b2","d842ce17-a4c0-49a6-bdc5-5268f1d61779","8d9b0689-2e69-44c1-afe2-3519e999390a","8d9b0689-2e69-44c1-afe2-3519e999390a"],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/e7d2a4ca-6b44-4a45-a94c-6f48987979f7.jpg",node_type:"show",ref_id:"e7d2a4ca-6b44-4a45-a94c-6f48987979f7",show_title:"TABConf (The Atlanta Bitcoin Conference)"},{children:["3b818893-4605-499c-a467-5abcc23f9483","3b818893-4605-499c-a467-5abcc23f9483","3b818893-4605-499c-a467-5abcc23f9483","a44e78cd-dc66-4b67-9523-7ddff0d3655f","a44e78cd-dc66-4b67-9523-7ddff0d3655f","0c4f330b-a39d-4312-9775-58b42c7c9723","0c4f330b-a39d-4312-9775-58b42c7c9723","205a0650-fefe-4aaf-a894-faa8b72d966a","205a0650-fefe-4aaf-a894-faa8b72d966a","205a0650-fefe-4aaf-a894-faa8b72d966a","205a0650-fefe-4aaf-a894-faa8b72d966a","205a0650-fefe-4aaf-a894-faa8b72d966a","a60dc641-5d14-4960-ab73-66ff199edd1d"],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/2ec62250-4755-4616-8342-096a2cfab95f.jpg",node_type:"show",ref_id:"2ec62250-4755-4616-8342-096a2cfab95f",show_title:"Voltage"},{children:["3af98dc1-5e7c-4ef3-ad74-b9b6afaee8b9","625d9252-2f5e-4f53-b577-dd2dfd4d4749"],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/492cbcce-3744-4d8b-b2ca-3a7f063e798a.jpg",node_type:"show",ref_id:"492cbcce-3744-4d8b-b2ca-3a7f063e798a",show_title:"Swan Bitcoin"},{children:["8eef2f82-bbf9-4fef-ba3d-102679d4a1a5"],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/b29c81c8-cccd-4a6b-b78f-3c1591a54d27.jpg",node_type:"show",ref_id:"b29c81c8-cccd-4a6b-b78f-3c1591a54d27",show_title:"Austin Bitcoin Club"},{children:["a1e3c3cf-2045-4c33-8152-0e162b7ca729"],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/63e0cbc0-731d-4ea0-9dd2-2b8b841eb28a.jpg",node_type:"show",ref_id:"63e0cbc0-731d-4ea0-9dd2-2b8b841eb28a",show_title:"Synonym"},{children:["e06b030a-063e-4894-9914-d326220f75f8","e06b030a-063e-4894-9914-d326220f75f8","e06b030a-063e-4894-9914-d326220f75f8"],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/ea2cf2ae-76de-4185-818c-384b3b06228b.jpg",node_type:"show",ref_id:"ea2cf2ae-76de-4185-818c-384b3b06228b",show_title:"Blockware Intelligence"},{children:["b707bbd8-1a9e-4aee-8e0e-2fe0be24c851"],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/e79b1a57-ecd0-4df3-b8ec-1a1a55d047e7.jpg",node_type:"show",ref_id:"e79b1a57-ecd0-4df3-b8ec-1a1a55d047e7",show_title:"Pleb UnderGround"}],related:[{episode_title:"The Orange Sun ☀️ #Bitcoin vs. Fiat",ref_id:"e5b1ad5b-2ce2-4192-a6d9-e99f0e3e88b5",show_title:"Satoshi’s Journal"},{episode_title:"Orange Sun 🌞 Why Ethereum is a shitcoin/scam & Bitcoin News",ref_id:"0645c5a3-b511-471d-9d8e-ef63b4dfe340",show_title:"Satoshi’s Journal"},{episode_title:"#Bitcoin Beats⚡🎶 by @SatoshisJournal Genesis Block walkthrough",ref_id:"aba7b4db-77bb-40c4-a0d4-4ce20da7b9ba",show_title:"Satoshi’s Journal"},{episode_title:"The Orange Sun 🌞 Does Price = Value? #Bitcoin",ref_id:"a0826cdb-6198-4416-bd12-1dd5aa09a075",show_title:"Satoshi’s Journal"},{episode_title:"#Bitcoin Beats⚡🎶 by @SatoshisJournal w @NEEDcreations & @DJSATOSHI18",ref_id:"fd00f285-c11e-40ba-8af9-b67265ac321b",show_title:"Satoshi’s Journal"},{episode_title:'The Orange Sun ☀️ Reading/Discussion of "The Book of Satoshi."',ref_id:"fcbe1196-c55d-476f-92d6-4dcba954eaf3",show_title:"Satoshi’s Journal"},{episode_title:'The Orange 🌞 Reading/Discussion "The Book of Satoshi" & Bitcoin News',ref_id:"c6447277-9a58-411f-85e1-5ac166884ce5",show_title:"Satoshi’s Journal"},{episode_title:"The Orange Sun 🌞 Bitcoin News and Talk - Happy Holidays!",ref_id:"d0b59017-ae64-47d4-be5c-c1531c9d480f",show_title:"Satoshi’s Journal"},{episode_title:`The Orange Sun 🌞 Reading/Discussion Tomer Strolight's "Why Bitcoin?"`,ref_id:"95848760-3863-4595-b049-f25826eba2d3",show_title:"Satoshi’s Journal"}]},typesWeighedByChildren=["show","episode"],getSuperficialNodeWeight=(tt,et)=>{var rt;return tt.weight?tt.weight:typesWeighedByChildren.includes(tt.node_type)?((rt=tt==null?void 0:tt.children)==null?void 0:rt.length)||0:et.filter(it=>it.sourceRef===tt.ref_id||it.targetRef===tt.ref_id).length},getMaxSuperficialWeightPerNodeType=(tt,et)=>{const nt={};return tt.forEach(rt=>{const it=getSuperficialNodeWeight(rt,et);(!nt[rt.node_type]||nt[rt.node_type]tt.clone().normalize().clone().negate().normalize().multiplyScalar(et).add(tt),getPositionFromLngLat=(tt,et,nt)=>{const rt=et*Math.PI/180,it=(tt-180)*Math.PI/180,ot=-nt*Math.cos(rt)*Math.cos(it),at=nt*Math.sin(rt),st=nt*Math.cos(rt)*Math.sin(it);return new Vector3(ot,at,st)},generateEarthGraphPositions=tt=>{const et=tt.map(rt=>{const{longitude:it,latitude:ot}=rt.longitude&&rt.latitude?rt:{longitude:getRandomLngLat(),latitude:getRandomLngLat()},at=getPositionFromLngLat(it,ot,dataRadius);return{...rt,...at}}),nt=generateLinksFromNodeData(et,!0,!0);return{nodes:et,links:nt}};function forceCenter(tt,et,nt){var rt,it=1;tt==null&&(tt=0),et==null&&(et=0),nt==null&&(nt=0);function ot(){var at,st=rt.length,lt,ct=0,ut=0,ht=0;for(at=0;at=(lt=(at+st)/2))?at=lt:st=lt,rt=it,!(it=it[ht=+ut]))return rt[ht]=ot,tt;if(ct=+tt._x.call(null,it.data),et===ct)return ot.next=it,rt?rt[ht]=ot:tt._root=ot,tt;do rt=rt?rt[ht]=new Array(2):tt._root=new Array(2),(ut=et>=(lt=(at+st)/2))?at=lt:st=lt;while((ht=+ut)==(dt=+(ct>=lt)));return rt[dt]=it,rt[ht]=ot,tt}function addAll$2(tt){Array.isArray(tt)||(tt=Array.from(tt));const et=tt.length,nt=new Float64Array(et);let rt=1/0,it=-1/0;for(let ot=0,at;otit&&(it=at));if(rt>it)return this;this.cover(rt).cover(it);for(let ot=0;ottt||tt>=nt;)switch(at=+(ttat||(ot=ct.x1)=ht))&&(ct=st[st.length-1],st[st.length-1]=st[st.length-1-ut],st[st.length-1-ut]=ct)}else{var dt=Math.abs(tt-+this._x.call(null,lt.data));dt=(ct=(at+st)/2))?at=ct:st=ct,et=nt,!(nt=nt[ht=+ut]))return this;if(!nt.length)break;et[ht+1&1]&&(rt=et,dt=ht)}for(;nt.data!==tt;)if(it=nt,!(nt=nt.next))return this;return(ot=nt.next)&&delete nt.next,it?(ot?it.next=ot:delete it.next,this):et?(ot?et[ht]=ot:delete et[ht],(nt=et[0]||et[1])&&nt===(et[1]||et[0])&&!nt.length&&(rt?rt[dt]=nt:this._root=nt),this):(this._root=ot,this)}function removeAll$2(tt){for(var et=0,nt=tt.length;et=(ht=(st+ct)/2))?st=ht:ct=ht,(yt=nt>=(dt=(lt+ut)/2))?lt=dt:ut=dt,it=ot,!(ot=ot[bt=yt<<1|gt]))return it[bt]=at,tt;if(pt=+tt._x.call(null,ot.data),mt=+tt._y.call(null,ot.data),et===pt&&nt===mt)return at.next=ot,it?it[bt]=at:tt._root=at,tt;do it=it?it[bt]=new Array(4):tt._root=new Array(4),(gt=et>=(ht=(st+ct)/2))?st=ht:ct=ht,(yt=nt>=(dt=(lt+ut)/2))?lt=dt:ut=dt;while((bt=yt<<1|gt)===(vt=(mt>=dt)<<1|pt>=ht));return it[vt]=ot,it[bt]=at,tt}function addAll$1(tt){var et,nt,rt=tt.length,it,ot,at=new Array(rt),st=new Array(rt),lt=1/0,ct=1/0,ut=-1/0,ht=-1/0;for(nt=0;ntut&&(ut=it),otht&&(ht=ot));if(lt>ut||ct>ht)return this;for(this.cover(lt,ct).cover(ut,ht),nt=0;nttt||tt>=it||rt>et||et>=ot;)switch(ct=(etut||(st=mt.y0)>ht||(lt=mt.x1)=bt)<<1|tt>=yt)&&(mt=dt[dt.length-1],dt[dt.length-1]=dt[dt.length-1-gt],dt[dt.length-1-gt]=mt)}else{var vt=tt-+this._x.call(null,pt.data),xt=et-+this._y.call(null,pt.data),kt=vt*vt+xt*xt;if(kt=(dt=(at+lt)/2))?at=dt:lt=dt,(gt=ht>=(pt=(st+ct)/2))?st=pt:ct=pt,et=nt,!(nt=nt[yt=gt<<1|mt]))return this;if(!nt.length)break;(et[yt+1&3]||et[yt+2&3]||et[yt+3&3])&&(rt=et,bt=yt)}for(;nt.data!==tt;)if(it=nt,!(nt=nt.next))return this;return(ot=nt.next)&&delete nt.next,it?(ot?it.next=ot:delete it.next,this):et?(ot?et[yt]=ot:delete et[yt],(nt=et[0]||et[1]||et[2]||et[3])&&nt===(et[3]||et[2]||et[1]||et[0])&&!nt.length&&(rt?rt[bt]=nt:this._root=nt),this):(this._root=ot,this)}function removeAll$1(tt){for(var et=0,nt=tt.length;et=(mt=(lt+ht)/2))?lt=mt:ht=mt,(St=nt>=(gt=(ct+dt)/2))?ct=gt:dt=gt,(Tt=rt>=(yt=(ut+pt)/2))?ut=yt:pt=yt,ot=at,!(at=at[At=Tt<<2|St<<1|kt]))return ot[At]=st,tt;if(bt=+tt._x.call(null,at.data),vt=+tt._y.call(null,at.data),xt=+tt._z.call(null,at.data),et===bt&&nt===vt&&rt===xt)return st.next=at,ot?ot[At]=st:tt._root=st,tt;do ot=ot?ot[At]=new Array(8):tt._root=new Array(8),(kt=et>=(mt=(lt+ht)/2))?lt=mt:ht=mt,(St=nt>=(gt=(ct+dt)/2))?ct=gt:dt=gt,(Tt=rt>=(yt=(ut+pt)/2))?ut=yt:pt=yt;while((At=Tt<<2|St<<1|kt)===(Et=(xt>=yt)<<2|(vt>=gt)<<1|bt>=mt));return ot[Et]=at,ot[At]=st,tt}function addAll(tt){Array.isArray(tt)||(tt=Array.from(tt));const et=tt.length,nt=new Float64Array(et),rt=new Float64Array(et),it=new Float64Array(et);let ot=1/0,at=1/0,st=1/0,lt=-1/0,ct=-1/0,ut=-1/0;for(let ht=0,dt,pt,mt,gt;htlt&&(lt=pt),mtct&&(ct=mt),gtut&&(ut=gt));if(ot>lt||at>ct||st>ut)return this;this.cover(ot,at,st).cover(lt,ct,ut);for(let ht=0;httt||tt>=at||it>et||et>=st||ot>nt||nt>=lt;)switch(dt=(ntmt||(ct=xt.y0)>gt||(ut=xt.z0)>yt||(ht=xt.x1)=At)<<2|(et>=Tt)<<1|tt>=St)&&(xt=bt[bt.length-1],bt[bt.length-1]=bt[bt.length-1-kt],bt[bt.length-1-kt]=xt)}else{var Et=tt-+this._x.call(null,vt.data),$t=et-+this._y.call(null,vt.data),Dt=nt-+this._z.call(null,vt.data),jt=Et*Et+$t*$t+Dt*Dt;if(jt=(gt=(at+ct)/2))?at=gt:ct=gt,(xt=pt>=(yt=(st+ut)/2))?st=yt:ut=yt,(kt=mt>=(bt=(lt+ht)/2))?lt=bt:ht=bt,et=nt,!(nt=nt[St=kt<<2|xt<<1|vt]))return this;if(!nt.length)break;(et[St+1&7]||et[St+2&7]||et[St+3&7]||et[St+4&7]||et[St+5&7]||et[St+6&7]||et[St+7&7])&&(rt=et,Tt=St)}for(;nt.data!==tt;)if(it=nt,!(nt=nt.next))return this;return(ot=nt.next)&&delete nt.next,it?(ot?it.next=ot:delete it.next,this):et?(ot?et[St]=ot:delete et[St],(nt=et[0]||et[1]||et[2]||et[3]||et[4]||et[5]||et[6]||et[7])&&nt===(et[7]||et[6]||et[5]||et[4]||et[3]||et[2]||et[1]||et[0])&&!nt.length&&(rt?rt[Tt]=nt:this._root=nt),this):(this._root=ot,this)}function removeAll(tt){for(var et=0,nt=tt.length;et1&&(gt=pt.y+pt.vy),nt>2&&(yt=pt.z+pt.vz),dt.visit(kt);function kt(St,Tt,At,Et,$t,Dt,jt){var Pt=[Tt,At,Et,$t,Dt,jt],Ct=Pt[0],wt=Pt[1],It=Pt[2],Ot=Pt[nt],Wt=Pt[nt+1],zt=Pt[nt+2],Ft=St.data,Nt=St.r,Ut=bt+Nt;if(Ft){if(Ft.index>pt.index){var Mt=mt-Ft.x-Ft.vx,Ht=nt>1?gt-Ft.y-Ft.vy:0,en=nt>2?yt-Ft.z-Ft.vz:0,sn=Mt*Mt+Ht*Ht+en*en;sn1&&Ht===0&&(Ht=jiggle(it),sn+=Ht*Ht),nt>2&&en===0&&(en=jiggle(it),sn+=en*en),sn=(Ut-(sn=Math.sqrt(sn)))/sn*ot,pt.vx+=(Mt*=sn)*(Ut=(Nt*=Nt)/(vt+Nt)),nt>1&&(pt.vy+=(Ht*=sn)*Ut),nt>2&&(pt.vz+=(en*=sn)*Ut),Ft.vx-=Mt*(Ut=1-Ut),nt>1&&(Ft.vy-=Ht*Ut),nt>2&&(Ft.vz-=en*Ut))}return}return Ct>mt+Ut||Ot1&&(wt>gt+Ut||Wt2&&(It>yt+Ut||ztut.r&&(ut.r=ut[ht].r)}function ct(){if(et){var ut,ht=et.length,dt;for(rt=new Array(ht),ut=0;uttypeof dt=="function")||Math.random,nt=ht.find(dt=>[1,2,3].includes(dt))||2,ct()},st.iterations=function(ut){return arguments.length?(at=+ut,st):at},st.strength=function(ut){return arguments.length?(ot=+ut,st):ot},st.radius=function(ut){return arguments.length?(tt=typeof ut=="function"?ut:constant$7(+ut),ct(),st):tt},st}function index$1(tt){return tt.index}function find$2(tt,et){var nt=tt.get(et);if(!nt)throw new Error("node not found: "+et);return nt}function forceLink(tt){var et=index$1,nt=dt,rt,it=constant$7(30),ot,at,st,lt,ct,ut,ht=1;tt==null&&(tt=[]);function dt(bt){return 1/Math.min(lt[bt.source.index],lt[bt.target.index])}function pt(bt){for(var vt=0,xt=tt.length;vt1&&($t=At.y+At.vy-Tt.y-Tt.vy||jiggle(ut)),st>2&&(Dt=At.z+At.vz-Tt.z-Tt.vz||jiggle(ut)),jt=Math.sqrt(Et*Et+$t*$t+Dt*Dt),jt=(jt-ot[kt])/jt*bt*rt[kt],Et*=jt,$t*=jt,Dt*=jt,At.vx-=Et*(Pt=ct[kt]),st>1&&(At.vy-=$t*Pt),st>2&&(At.vz-=Dt*Pt),Tt.vx+=Et*(Pt=1-Pt),st>1&&(Tt.vy+=$t*Pt),st>2&&(Tt.vz+=Dt*Pt)}function mt(){if(at){var bt,vt=at.length,xt=tt.length,kt=new Map(at.map((Tt,At)=>[et(Tt,At,at),Tt])),St;for(bt=0,lt=new Array(vt);bttypeof xt=="function")||Math.random,st=vt.find(xt=>[1,2,3].includes(xt))||2,mt()},pt.links=function(bt){return arguments.length?(tt=bt,mt(),pt):tt},pt.id=function(bt){return arguments.length?(et=bt,pt):et},pt.iterations=function(bt){return arguments.length?(ht=+bt,pt):ht},pt.strength=function(bt){return arguments.length?(nt=typeof bt=="function"?bt:constant$7(+bt),gt(),pt):nt},pt.distance=function(bt){return arguments.length?(it=typeof bt=="function"?bt:constant$7(+bt),yt(),pt):it},pt}var noop$6={value:()=>{}};function dispatch(){for(var tt=0,et=arguments.length,nt={},rt;tt=0&&(rt=nt.slice(it+1),nt=nt.slice(0,it)),nt&&!et.hasOwnProperty(nt))throw new Error("unknown type: "+nt);return{type:nt,name:rt}})}Dispatch.prototype=dispatch.prototype={constructor:Dispatch,on:function(tt,et){var nt=this._,rt=parseTypenames$1(tt+"",nt),it,ot=-1,at=rt.length;if(arguments.length<2){for(;++ot0)for(var nt=new Array(it),rt=0,it,ot;rt=0&&tt._call.call(void 0,et),tt=tt._next;--frame}function wake(){clockNow=(clockLast=clock.now())+clockSkew,frame=timeout$1=0;try{timerFlush()}finally{frame=0,nap(),clockNow=0}}function poke(){var tt=clock.now(),et=tt-clockLast;et>pokeDelay&&(clockSkew-=et,clockLast=tt)}function nap(){for(var tt,et=taskHead,nt,rt=1/0;et;)et._call?(rt>et._time&&(rt=et._time),tt=et,et=et._next):(nt=et._next,et._next=null,et=tt?tt._next=nt:taskHead=nt);taskTail=tt,sleep(rt)}function sleep(tt){if(!frame){timeout$1&&(timeout$1=clearTimeout(timeout$1));var et=tt-clockNow;et>24?(tt<1/0&&(timeout$1=setTimeout(wake,tt-clock.now()-clockSkew)),interval&&(interval=clearInterval(interval))):(interval||(clockLast=clock.now(),interval=setInterval(poke,pokeDelay)),frame=1,setFrame(wake))}}function timeout(tt,et,nt){var rt=new Timer$1;return et=et==null?0:+et,rt.restart(it=>{rt.stop(),tt(it+et)},et,nt),rt}const a$2=1664525,c$4=1013904223,m$3=4294967296;function lcg(){let tt=1;return()=>(tt=(a$2*tt+c$4)%m$3)/m$3}var MAX_DIMENSIONS=3;function x$2(tt){return tt.x}function y$2(tt){return tt.y}function z$1(tt){return tt.z}var initialRadius=10,initialAngleRoll=Math.PI*(3-Math.sqrt(5)),initialAngleYaw=Math.PI*20/(9+Math.sqrt(221));function forceSimulation(tt,et){et=et||2;var nt=Math.min(MAX_DIMENSIONS,Math.max(1,Math.round(et))),rt,it=1,ot=.001,at=1-Math.pow(ot,1/300),st=0,lt=.6,ct=new Map,ut=timer$1(pt),ht=dispatch("tick","end"),dt=lcg();tt==null&&(tt=[]);function pt(){mt(),ht.call("tick",rt),it1&&(kt.fy==null?kt.y+=kt.vy*=lt:(kt.y=kt.fy,kt.vy=0)),nt>2&&(kt.fz==null?kt.z+=kt.vz*=lt:(kt.z=kt.fz,kt.vz=0));return rt}function gt(){for(var bt=0,vt=tt.length,xt;bt1&&isNaN(xt.y)||nt>2&&isNaN(xt.z)){var kt=initialRadius*(nt>2?Math.cbrt(.5+bt):nt>1?Math.sqrt(.5+bt):bt),St=bt*initialAngleRoll,Tt=bt*initialAngleYaw;nt===1?xt.x=kt:nt===2?(xt.x=kt*Math.cos(St),xt.y=kt*Math.sin(St)):(xt.x=kt*Math.sin(St)*Math.cos(Tt),xt.y=kt*Math.cos(St),xt.z=kt*Math.sin(St)*Math.sin(Tt))}(isNaN(xt.vx)||nt>1&&isNaN(xt.vy)||nt>2&&isNaN(xt.vz))&&(xt.vx=0,nt>1&&(xt.vy=0),nt>2&&(xt.vz=0))}}function yt(bt){return bt.initialize&&bt.initialize(tt,dt,nt),bt}return gt(),rt={tick:mt,restart:function(){return ut.restart(pt),rt},stop:function(){return ut.stop(),rt},numDimensions:function(bt){return arguments.length?(nt=Math.min(MAX_DIMENSIONS,Math.max(1,Math.round(bt))),ct.forEach(yt),rt):nt},nodes:function(bt){return arguments.length?(tt=bt,gt(),ct.forEach(yt),rt):tt},alpha:function(bt){return arguments.length?(it=+bt,rt):it},alphaMin:function(bt){return arguments.length?(ot=+bt,rt):ot},alphaDecay:function(bt){return arguments.length?(at=+bt,rt):+at},alphaTarget:function(bt){return arguments.length?(st=+bt,rt):st},velocityDecay:function(bt){return arguments.length?(lt=1-bt,rt):1-lt},randomSource:function(bt){return arguments.length?(dt=bt,ct.forEach(yt),rt):dt},force:function(bt,vt){return arguments.length>1?(vt==null?ct.delete(bt):ct.set(bt,yt(vt)),rt):ct.get(bt)},find:function(){var bt=Array.prototype.slice.call(arguments),vt=bt.shift()||0,xt=(nt>1?bt.shift():null)||0,kt=(nt>2?bt.shift():null)||0,St=bt.shift()||1/0,Tt=0,At=tt.length,Et,$t,Dt,jt,Pt,Ct;for(St*=St,Tt=0;Tt1?(ht.on(bt,vt),rt):ht.on(bt)}}}function forceManyBody(){var tt,et,nt,rt,it,ot=constant$7(-30),at,st=1,lt=1/0,ct=.81;function ut(mt){var gt,yt=tt.length,bt=(et===1?binarytree(tt,x$2):et===2?quadtree(tt,x$2,y$2):et===3?octree(tt,x$2,y$2,z$1):null).visitAfter(dt);for(it=mt,gt=0;gt1&&(mt.y=kt/vt),et>2&&(mt.z=St/vt)}else{yt=mt,yt.x=yt.data.x,et>1&&(yt.y=yt.data.y),et>2&&(yt.z=yt.data.z);do gt+=at[yt.data.index];while(yt=yt.next)}mt.value=gt}function pt(mt,gt,yt,bt,vt){if(!mt.value)return!0;var xt=[yt,bt,vt][et-1],kt=mt.x-nt.x,St=et>1?mt.y-nt.y:0,Tt=et>2?mt.z-nt.z:0,At=xt-gt,Et=kt*kt+St*St+Tt*Tt;if(At*At/ct1&&St===0&&(St=jiggle(rt),Et+=St*St),et>2&&Tt===0&&(Tt=jiggle(rt),Et+=Tt*Tt),Et1&&(nt.vy+=St*mt.value*it/Et),et>2&&(nt.vz+=Tt*mt.value*it/Et)),!0;if(mt.length||Et>=lt)return;(mt.data!==nt||mt.next)&&(kt===0&&(kt=jiggle(rt),Et+=kt*kt),et>1&&St===0&&(St=jiggle(rt),Et+=St*St),et>2&&Tt===0&&(Tt=jiggle(rt),Et+=Tt*Tt),Et1&&(nt.vy+=St*At),et>2&&(nt.vz+=Tt*At));while(mt=mt.next)}return ut.initialize=function(mt,...gt){tt=mt,rt=gt.find(yt=>typeof yt=="function")||Math.random,et=gt.find(yt=>[1,2,3].includes(yt))||2,ht()},ut.strength=function(mt){return arguments.length?(ot=typeof mt=="function"?mt:constant$7(+mt),ht(),ut):ot},ut.distanceMin=function(mt){return arguments.length?(st=mt*mt,ut):Math.sqrt(st)},ut.distanceMax=function(mt){return arguments.length?(lt=mt*mt,ut):Math.sqrt(lt)},ut.theta=function(mt){return arguments.length?(ct=mt*mt,ut):Math.sqrt(ct)},ut}const simulation=forceSimulation().stop(),defaults$2={numDimensions:3,velocityDecay:.9,forceChargeStrength:-20,forceChargeMinDistance:10,forceChargeMaxDistance:8e3,forceLinkStrength:.04,forceCenterStrength:.85,disableCollide:!1,disableCenter:!1,disableLink:!1,disableCharge:!1,forceCollideRadiusMethod:tt=>(tt.scale||1)*6+200,forceLinkDistanceMethod:tt=>{const et=tt.source.node_type;let nt=50;switch(et){case"topic":nt=30;break;case"guest":nt=30;break;case"clip":nt=10;break;case"episode":nt=15;break}return nt*2}},runForceSimulation=(tt,et,{numDimensions:nt=defaults$2.numDimensions,velocityDecay:rt=defaults$2.velocityDecay,forceChargeStrength:it=defaults$2.forceChargeStrength,forceChargeMinDistance:ot=defaults$2.forceChargeMinDistance,forceChargeMaxDistance:at=defaults$2.forceChargeMaxDistance,forceLinkStrength:st=defaults$2.forceLinkStrength,forceCenterStrength:lt=defaults$2.forceCenterStrength,forceLinkDistanceMethod:ct=defaults$2.forceLinkDistanceMethod,forceCollideRadiusMethod:ut=defaults$2.forceCollideRadiusMethod,disableCollide:ht=defaults$2.disableCollide,disableCenter:dt=defaults$2.disableCenter,disableLink:pt=defaults$2.disableLink,disableCharge:mt=defaults$2.disableCharge})=>(simulation.alpha(1).stop().numDimensions(nt).velocityDecay(rt).force("collide",ht?null:forceCollide().radius(ut).iterations(1)).force("center",dt?null:forceCenter().strength(lt)).force("charge",mt?null:forceManyBody().strength(it).distanceMin(ot).distanceMax(at)).nodes(tt).force("link",pt?null:forceLink().distance(ct).strength(st).id(gt=>gt.id).links(et.filter(gt=>!gt.onlyVisibleOnSelect))).alpha(1).restart(),simulation),simulationTicks$1=60,collisionTicks$1=20,runSimulationPhase$1=tt=>{for(let et=0;et{tt.force("collide",forceCollide().radius(et=>(et.scale||1)*20).iterations(1));for(let et=0;et{const et=tt.map(ot=>({...ot,x:0,y:0,z:0})),nt=generateLinksFromNodeData(et,!1,!1),rt=runForceSimulation(et,nt,{numDimensions:3,forceLinkStrength:.5,forceChargeStrength:-40,forceCenterStrength:.3,velocityDecay:.5});runSimulationPhase$1(rt),runCollisionPhase$1(rt),rt.stop();const it=nt.map(ot=>{const at=et.find(ht=>ht.ref_id===ot.sourceRef),st=et.find(ht=>ht.ref_id===ot.targetRef),lt=["guest","topic"].some(ht=>ht===(at==null?void 0:at.node_type)||ht===(st==null?void 0:st.node_type)),ct=new Vector3((at==null?void 0:at.x)||0,(at==null?void 0:at.y)||0,(at==null?void 0:at.z)||0),ut=new Vector3((st==null?void 0:st.x)||0,(st==null?void 0:st.y)||0,(st==null?void 0:st.z)||0);return{...ot,onlyVisibleOnSelect:lt,sourcePosition:ct,targetPosition:ut}});return{nodes:et,links:it}},sortAB=(tt,et,nt)=>{let rt=-2;return tt===nt&&et===nt?rt=0:tt===nt&&et!==nt?rt=-1:tt!==nt&&et===nt&&(rt=1),rt},sortNodesByHierarchy=tt=>tt.map(nt=>nt).sort((nt,rt)=>{let it=0;return nt.node_type==="show"||rt.node_type==="show"?it=sortAB(nt.node_type,rt.node_type,"show"):nt.node_type==="episode"||rt.node_type==="episode"?it=sortAB(nt.node_type,rt.node_type,"episode"):nt.node_type==="clip"||rt.node_type==="clip"?it=sortAB(nt.node_type,rt.node_type,"clip"):nt.node_type!=="guest"&&rt.node_type==="guest"?it=sortAB(nt.node_type,rt.node_type,"guest"):it=0,it});function getMyParents(tt,et){const{ref_id:nt}=tt;return!nt||!et?[]:et.filter(it=>{var ot;return(ot=it.children)==null?void 0:ot.includes(nt)})}function getMyChildren(tt,et){return et.filter(rt=>rt.ref_id&&tt.includes(rt.ref_id))}const simulationTicks=60,collisionTicks=20,universeScale$1=5e3,universeCube={scale:universeScale$1/2,position:{x:0,y:0,z:0}};function generateNodePosition$1(tt,et){const{scale:nt,position:rt}=universeCube,it={x:rt.x+Math.random()*nt-nt*.5,y:rt.y+Math.random()*nt-nt*.5,z:rt.z+Math.random()*nt-nt*.5},ot=getMyParents(tt,et),at=ot!=null&&ot.length?new Vector3(ot[0].x,ot[0].y,ot[0].z):null;return at&&(it.x=at.x,it.y=at.y,it.z=at.z),new Vector3(it.x,it.y,it.z)}const runSimulationPhase=tt=>{for(let et=0;et{tt.force("collide",forceCollide().radius(et=>(et.scale||1)*20).iterations(1));for(let et=0;et{const et=[],nt=tt.map(at=>{const st=generateNodePosition$1(at,et),lt={...at,...st};return et.push(lt),lt}),rt=generateLinksFromNodeData(nt,!0,!0),it=runForceSimulation(nt,rt,{numDimensions:3,forceLinkStrength:.01,forceChargeStrength:-80,velocityDecay:.5,disableCenter:!0,disableCharge:!0});runSimulationPhase(it),runCollisionPhase(it),it.stop();const ot=rt.map(at=>{const st=nt.find(dt=>dt.ref_id===at.sourceRef),lt=nt.find(dt=>dt.ref_id===at.targetRef),ct=new Vector3((st==null?void 0:st.x)||0,(st==null?void 0:st.y)||0,(st==null?void 0:st.z)||0),ut=new Vector3((lt==null?void 0:lt.x)||0,(lt==null?void 0:lt.y)||0,(lt==null?void 0:lt.z)||0);return{...at,onlyVisibleOnSelect:!0,sourcePosition:ct,targetPosition:ut}});return{nodes:nt,links:ot}},universeScale=5e3,padding=300,guestCube={scale:universeScale/2,position:{x:0,y:0,z:universeScale/2+padding}},topicCube={scale:universeScale/2,position:{x:0,y:0,z:-(universeScale/2+padding)}},dataCube={scale:universeScale/2,position:{x:0,y:0,z:0}};function generateGuestNodePosition(){const{scale:tt,position:et}=guestCube,nt={x:et.x+Math.random()*tt-tt*.5,y:et.y+Math.random()*tt-tt*.5,z:et.z+Math.random()*tt-tt*.5},rt=1,it=10;return new Vector3(nt.x+rt*it,nt.y+rt*it,nt.z+rt*it)}function generateTopicNodePosition(){const{scale:tt,position:et}=topicCube,nt={x:et.x+Math.random()*tt-tt*.5,y:et.y+Math.random()*tt-tt*.5,z:et.z+Math.random()*tt-tt*.5},rt=1,it=10;return new Vector3(nt.x+rt*it,nt.y+rt*it,nt.z+rt*it)}function generateNearbyPosition(tt,et,nt=1){let it=0,ot=10*1;const at=0;switch(et){case"episode":ot+=50*(nt||0);break;case"clip":ot=0,it+=50*(nt||0);break}const st=new Vector3;return st.x=tt.x+it,st.y=tt.y+ot,st.z=tt.z+at,st}function generateNodePosition(tt,et,nt){const{ref_id:rt}=tt,{scale:it,position:ot}=dataCube,at={x:ot.x+Math.random()*it-it*.5,y:ot.y+Math.random()*it-it*.5,z:ot.z+Math.random()*it-it*.5},st=getMyParents(tt,nt);let lt=null;if(st!=null&&st.length){const ht=st[0],pt=getMyChildren(ht.children||[],et).findIndex(mt=>mt.ref_id===rt);lt=generateNearbyPosition(new Vector3(ht.x,ht.y,ht.z),tt.node_type,pt+1)}lt&&(at.x=lt.x,at.y=lt.y,at.z=lt.z);const ct=1,ut=1;return new Vector3(at.x+ct*ut,at.y+ct*ut,at.z+ct*ut)}const generateSplitGraphPositions=tt=>{const et=sortNodesByHierarchy(tt),nt=[],rt=et.map(at=>{let st=new Vector3(0,0,0);switch(at.node_type){case"guest":st=generateGuestNodePosition();break;case"topic":st=generateTopicNodePosition();break;case"data_series":st=generateNodePosition({},et,nt);break;default:st=generateNodePosition(at,et,nt);break}const lt={...at,...st};return nt.push(lt),lt}),ot=generateLinksFromNodeData(rt,!0,!0).map(at=>{const st=rt.find(dt=>dt.ref_id===at.sourceRef),lt=rt.find(dt=>dt.ref_id===at.targetRef);let ct=!1;((st==null?void 0:st.node_type)==="guest"||(st==null?void 0:st.node_type)==="topic"||(lt==null?void 0:lt.node_type)==="guest"||(lt==null?void 0:lt.node_type)==="topic")&&(ct=!0);const ut=new Vector3((st==null?void 0:st.x)||0,(st==null?void 0:st.y)||0,(st==null?void 0:st.z)||0),ht=new Vector3((lt==null?void 0:lt.x)||0,(lt==null?void 0:lt.y)||0,(lt==null?void 0:lt.z)||0);return{...at,onlyVisibleOnSelect:ct,sourcePosition:ut,targetPosition:ht}});return rt.sort((at,st)=>(st.weight||0)-(at.weight||0)),{nodes:rt,links:ot}},getGraphDataPositions=(tt,et)=>tt==="split"?generateSplitGraphPositions(et):tt==="sphere"?generateSphereGraphPositions(et):tt==="earth"?generateEarthGraphPositions(et):generateForceGraphPositions(et),defaultData$8={links:[],nodes:[]},shouldIncludeTopics=!0,maxScale=26,fetchGraphData=async tt=>{try{return getGraphData(tt)}catch{return defaultData$8}},fetchNodes=async tt=>{if(!tt)try{return await api.get("/prediction/content/latest")}catch(nt){return console.error(nt),mock}if(isDevelopment||isE2E)return await api.get(`/v2/searching?word=${tt}&free=true`);const et=await getLSat();try{return await api.get(`/v2/search?word=${tt}`,{Authorization:et})}catch(nt){if(nt.status===402){const rt=distExports.Lsat.fromHeader(nt.headers.get("www-authenticate"));return await payLsat(rt),fetchNodes(tt)}throw nt}},getTrends=async()=>{const tt="/get_trends";return await api.get(tt)},getSentimentData=async tt=>{const et=tt&&new URLSearchParams(tt),nt=et?`/sentiments?${et.toString()}`:"/sentiments";if(isE2E)return await api.get(nt);const rt=await getLSat();try{return await api.get(nt,{Authorization:rt})}catch(it){if(it.status===402){const ot=distExports.Lsat.fromHeader(it.headers.get("www-authenticate"));return await payLsat(ot),getSentimentData(tt)}throw it}},postInstagraph=async tt=>{const et=await getLSat();try{await api.post("/instagraph",JSON.stringify(tt),{Authorization:et})}catch(nt){if(nt.status===402){const rt=distExports.Lsat.fromHeader(nt.headers.get("www-authenticate"));await payLsat(rt),await postInstagraph(tt);return}throw nt}},postTeachMe=async tt=>{const et=await getLSat();try{await api.post("/teachme",JSON.stringify(tt),{Authorization:et})}catch(nt){if(nt.status===402){const rt=distExports.Lsat.fromHeader(nt.headers.get("www-authenticate"));await payLsat(rt),await postTeachMe(tt);return}throw nt}},postAskQuestion=async tt=>{const et=await getLSat();try{await api.post("/ask_question",JSON.stringify(tt),{Authorization:et})}catch(nt){if(nt.status===402){const rt=distExports.Lsat.fromHeader(nt.headers.get("www-authenticate"));await payLsat(rt),await postAskQuestion(tt);return}throw nt}},getNodeScale=tt=>{switch(tt.node_type){case"guest":case"episode":case"document":return 2;case"show":return 3;default:return 1.5}};function generateTopicNodesFromMap(tt,et){Object.entries(tt).forEach(([nt,rt],it)=>{const{children:ot,position:at}=rt,{x:st,y:lt,z:ct}=at,ut=ot.length*2>maxScale?maxScale:ot.length*2,ht=`topic_node_${it}`;et({x:st,y:lt,z:ct,children:ot,colors:["#000"],id:ht,label:nt,name:nt,type:"topic",node_type:"topic",ref_id:ht,scale:ut,show_title:nt,text:nt,weight:0})})}function generateGuestNodesFromMap(tt,et){Object.entries(tt).forEach(([nt,rt],it)=>{const ot=rt.children,at=ot.length*2>maxScale?maxScale:ot.length*2,st=nt||`guestnode_${it}`,lt={...rt,x:0,y:0,z:0,colors:["#000"],id:st,image_url:rt.imageUrl,label:rt.name,name:rt.name,node_type:"guest",ref_id:st,scale:at,show_title:rt.name,text:rt.twitterHandle,type:"guest",weight:0};et(lt)})}const getGraphData=async tt=>{const{graphStyle:et}=useDataStore.getState();let nt=[];const rt={},it={};try{const ot=await fetchNodes(tt),at=Array.isArray(ot.data_series)?ot.data_series:[],st=[...ot.exact,...ot.related,...at];let lt=0;st.length&&st.forEach((dt,pt)=>{var yt;if(dt.weight&<bt.ref_id===dt.ref_id))return;const gt=(yt=dt.image_url)==null?void 0:yt.replace(AWS_IMAGE_BUCKET_URL,CLOUDFRONT_IMAGE_BUCKET_URL).replace(".jpg","_s.jpg");nt.push({...dt,scale:getNodeScale(dt),id:dt.ref_id||dt.tweet_id||dt.id,image_url:gt,type:dt.type||dt.node_type}),dt.node_type==="episode"&&dt.ref_id&&(dt.guests||[]).forEach(vt=>{var kt;const xt=vt;xt.name&&xt.ref_id&&dt.ref_id&&(it[xt.ref_id]={children:[...((kt=it[xt.ref_id])==null?void 0:kt.children)||[],dt.ref_id],imageUrl:xt.profile_picture||"",name:xt.name,twitterHandle:xt.twitter_handle})})}),generateGuestNodesFromMap(it,dt=>{nt.push(dt)}),st.forEach(dt=>{const{topics:pt,ref_id:mt,show_title:gt}=dt;pt&&pt.forEach(yt=>{yt!==tt&>&&(rt[yt]&&!rt[yt].children.includes(mt||gt)?rt[yt].children.push(mt||gt):rt[yt]={position:new Vector3(0,0,0),children:[mt||gt]})})}),shouldIncludeTopics&&generateTopicNodesFromMap(rt,dt=>{nt.push(dt)});const ct=getGraphDataPositions(et,nt),{links:ut}=ct;nt=ct.nodes,nt.sort((dt,pt)=>(pt.weight||0)-(dt.weight||0));const ht=getMaxSuperficialWeightPerNodeType(nt,ut);return nt=addWeightNormalizationToNodes(lt,ht,nt,ut),{links:ut,nodes:nt}}catch(ot){return console.error(ot),defaultData$8}},getSegmentColor=(tt,et)=>tt==="topic"||et==="topic"?NODE_RELATIVE_HIGHLIGHT_COLORS.topics.segmentColor:tt==="guest"||et==="guest"?NODE_RELATIVE_HIGHLIGHT_COLORS.guests.segmentColor:NODE_RELATIVE_HIGHLIGHT_COLORS.children.segmentColor,generateLinksFromNodeData=(tt,et,nt)=>{const rt=[];return tt.forEach(it=>{const{children:ot,guests:at}=it;ot==null||ot.forEach(st=>{if(it.ref_id){const lt=tt.find(ht=>ht.ref_id===st)||null;if(!lt)return;const ct=new Vector3(it.x||0,it.y||0,it.z||0),ut=new Vector3((lt==null?void 0:lt.x)||0,(lt==null?void 0:lt.y)||0,(lt==null?void 0:lt.z)||0);rt.push({onlyVisibleOnSelect:et,color:getSegmentColor(it.node_type,(lt==null?void 0:lt.node_type)||""),source:it.ref_id,sourceRef:it.ref_id,sourcePosition:ct,target:st,targetRef:st,targetPosition:ut})}}),at==null||at.forEach(st=>{if(st&&typeof st!="string"&&it.ref_id){const lt=tt.find(ht=>ht.ref_id===(st==null?void 0:st.ref_id))||null;if(!lt)return;const ct=new Vector3(it.x||0,it.y||0,it.z||0),ut=new Vector3((lt==null?void 0:lt.x)||0,(lt==null?void 0:lt.y)||0,(lt==null?void 0:lt.z)||0);rt.push({onlyVisibleOnSelect:nt,color:getSegmentColor(it.node_type,"guest"),source:it.ref_id,sourceRef:it.ref_id,sourcePosition:ct,target:st==null?void 0:st.ref_id,targetRef:st==null?void 0:st.ref_id,targetPosition:ut})}})}),rt},addWeightNormalizationToNodes=(tt,et,nt,rt)=>nt.map(it=>{let ot=(it.weight||0)/tt;return!it.weight&&et[it.node_type]&&(ot=getSuperficialNodeWeight(it,rt)/et[it.node_type]),{...it,weight:ot}}),saveConsumedContent=async tt=>{await executeIfProd(async()=>{if(!await distExports$1.enable(!0)){console.error("Sphinx enable failed, means no pubkey and no budget (including budget of 0)");return}try{await distExports$1.saveGraphData({metaData:{date:Math.floor(new Date().getTime()/1e3),...tt},type:"second_brain_consumed_content"})}catch(nt){console.warn(nt)}})},saveSearchTerm=async()=>{await executeIfProd(async()=>{await distExports$1.enable(!0)||console.log("Sphinx enable failed, means no pubkey and no budget (including budget of 0)")})},graphStyles=["split","force","sphere","earth"],defaultData$7={categoryFilter:null,data:null,selectionGraphData:{nodes:[],links:[]},scrollEventsDisabled:!1,disableCameraRotation:!1,graphRadius:isChileGraph?1600:3056,graphStyle:"split",isFetching:!1,isTimestampLoaded:!1,queuedSources:null,topics:null,hoveredNode:null,selectedNode:null,selectedTimestamp:null,sources:null,sphinxModalIsOpen:!1,cameraFocusTrigger:!1,selectedNodeRelativeIds:[],nearbyNodeIds:[],showSelectionGraph:!1,showTeachMe:!1,hideNodeDetails:!1},useDataStore=react((tt,et)=>({...defaultData$7,fetchData:async nt=>{if(et().isFetching)return;tt({isFetching:!0,sphinxModalIsOpen:!0});const rt=await fetchGraphData(nt||"");nt&&await saveSearchTerm(),tt({data:rt,isFetching:!1,sphinxModalIsOpen:!1,disableCameraRotation:!1,nearbyNodeIds:[],selectedNodeRelativeIds:[],showSelectionGraph:!1,showTeachMe:!1})},setIsFetching:nt=>tt({isFetching:nt}),setData:nt=>tt({data:nt}),setSelectionData:nt=>tt({selectionGraphData:nt}),setScrollEventsDisabled:nt=>tt({scrollEventsDisabled:nt}),setCategoryFilter:nt=>tt({categoryFilter:nt}),setDisableCameraRotation:nt=>tt({disableCameraRotation:nt}),setGraphRadius:nt=>tt({graphRadius:nt}),setGraphStyle:nt=>tt({graphStyle:nt}),setQueuedSources:nt=>tt({queuedSources:nt}),setTopics:nt=>tt({topics:nt}),setHoveredNode:nt=>tt({hoveredNode:nt}),setSelectedNode:nt=>{const rt=et().selectedNode;if((rt==null?void 0:rt.ref_id)!==(nt==null?void 0:nt.ref_id)){const{data:it}=et(),ot=(it==null?void 0:it.nodes.filter(at=>at.ref_id&&nodesAreRelatives(at,nt)).map(at=>(at==null?void 0:at.ref_id)||""))||[];tt({hoveredNode:null,isTimestampLoaded:!1,selectedNode:nt,disableCameraRotation:!0,selectedNodeRelativeIds:ot})}},setSelectedTimestamp:nt=>tt({selectedTimestamp:nt}),setSources:nt=>tt({sources:nt}),setSphinxModalOpen:nt=>tt({sphinxModalIsOpen:nt}),setCameraFocusTrigger:nt=>tt({cameraFocusTrigger:nt}),setNearbyNodeIds:nt=>{const rt=et().nearbyNodeIds;(nt.length!==rt.length||nt[0]!==rt[0])&&tt({nearbyNodeIds:nt})},setShowSelectionGraph:nt=>tt({showSelectionGraph:nt}),setHideNodeDetails:nt=>tt({hideNodeDetails:nt}),setTeachMe:nt=>tt({showTeachMe:nt})})),useSelectedNode=()=>useDataStore(tt=>tt.selectedNode),setIsTimestampLoaded=tt=>useDataStore.setState({isTimestampLoaded:tt}),topupFromToast=async()=>{try{const tt=await distExports$1.topup();if(!tt)throw new Error("Topup failed");if(tt.budget<5)throw new Error("You set a budget of less than 5 sats");toast(jsxRuntimeExports.jsx(ToastMessage,{message:`You set a budget of ${tt.budget} sats`}),{icon:!1,position:toast.POSITION.BOTTOM_CENTER,type:"success"})}catch(tt){tt instanceof Error&&toast(jsxRuntimeExports.jsx(ToastMessage,{message:tt.message}),{icon:!1,position:toast.POSITION.BOTTOM_CENTER,type:"error"})}},ToastMessage=({message:tt})=>tt===BOOST_ERROR_BUDGET?jsxRuntimeExports.jsxs("div",{children:[tt,jsxRuntimeExports.jsx(ButtonWrapper,{onClick:topupFromToast,type:"button",children:jsxRuntimeExports.jsx(Text$3,{color:"white",kind:"medium",children:"Topup"})})]}):jsxRuntimeExports.jsx("div",{children:tt}),ButtonWrapper=styled$4.button` - background: ${colors.gray200}; - border: 1px solid ${colors.white}; - border-radius: 2px; - margin: 10px; - padding: 5px; + ) + (Gt.flags = (Gt.flags & -3) | 4096), (Gt = Gt.sibling) + else { + if ((up(), tn === gn)) { + Lt = xs(Bt, Lt, Gt) + break e + } + cs(Bt, Lt, tn, Gt) + } + Lt = Lt.child + } + return Lt + case 5: + return ( + zy(Lt), + Bt === null && Zm(Lt), + (tn = Lt.type), + (gn = Lt.pendingProps), + (Cn = Bt !== null ? Bt.memoizedProps : null), + (Gn = gn.children), + sn(tn, gn) ? (Gn = null) : Cn !== null && sn(tn, Cn) && (Lt.flags |= 32), + o0(Bt, Lt), + cs(Bt, Lt, Gn, Gt), + Lt.child + ) + case 6: + return Bt === null && Zm(Lt), null + case 13: + return c0(Bt, Lt, Gt) + case 4: + return ( + Jm(Lt, Lt.stateNode.containerInfo), + (tn = Lt.pendingProps), + Bt === null ? (Lt.child = dp(Lt, null, tn, Gt)) : cs(Bt, Lt, tn, Gt), + Lt.child + ) + case 11: + return ( + (tn = Lt.type), + (gn = Lt.pendingProps), + (gn = Lt.elementType === tn ? gn : ls(tn, gn)), + e0(Bt, Lt, tn, gn, Gt) + ) + case 7: + return cs(Bt, Lt, Lt.pendingProps, Gt), Lt.child + case 8: + return cs(Bt, Lt, Lt.pendingProps.children, Gt), Lt.child + case 12: + return cs(Bt, Lt, Lt.pendingProps.children, Gt), Lt.child + case 10: + e: { + if ( + ((tn = Lt.type._context), + (gn = Lt.pendingProps), + (Cn = Lt.memoizedProps), + (Gn = gn.value), + Dp(Lt, tn, Gn), + Cn !== null) + ) + if (Zs(Cn.value, Gn)) { + if (Cn.children === gn.children && !br.current) { + Lt = xs(Bt, Lt, Gt) + break e + } + } else + for (Cn = Lt.child, Cn !== null && (Cn.return = Lt); Cn !== null; ) { + var rr = Cn.dependencies + if (rr !== null) { + Gn = Cn.child + for (var _r = rr.firstContext; _r !== null; ) { + if (_r.context === tn) { + if (Cn.tag === 1) { + ;(_r = Ps(-1, Gt & -Gt)), (_r.tag = 2) + var Vr = Cn.updateQueue + if (Vr !== null) { + Vr = Vr.shared + var oo = Vr.pending + oo === null ? (_r.next = _r) : ((_r.next = oo.next), (oo.next = _r)), (Vr.pending = _r) + } + } + ;(Cn.lanes |= Gt), + (_r = Cn.alternate), + _r !== null && (_r.lanes |= Gt), + $s(Cn.return, Gt, Lt), + (rr.lanes |= Gt) + break + } + _r = _r.next + } + } else if (Cn.tag === 10) Gn = Cn.type === Lt.type ? null : Cn.child + else if (Cn.tag === 18) { + if (((Gn = Cn.return), Gn === null)) throw Error(at(341)) + ;(Gn.lanes |= Gt), + (rr = Gn.alternate), + rr !== null && (rr.lanes |= Gt), + $s(Gn, Gt, Lt), + (Gn = Cn.sibling) + } else Gn = Cn.child + if (Gn !== null) Gn.return = Cn + else + for (Gn = Cn; Gn !== null; ) { + if (Gn === Lt) { + Gn = null + break + } + if (((Cn = Gn.sibling), Cn !== null)) { + ;(Cn.return = Gn.return), (Gn = Cn) + break + } + Gn = Gn.return + } + Cn = Gn + } + cs(Bt, Lt, gn.children, Gt), (Lt = Lt.child) + } + return Lt + case 9: + return ( + (gn = Lt.type), + (tn = Lt.pendingProps.children), + os(Lt, Gt), + (gn = Vo(gn)), + (tn = tn(gn)), + (Lt.flags |= 1), + cs(Bt, Lt, tn, Gt), + Lt.child + ) + case 14: + return (tn = Lt.type), (gn = ls(tn, Lt.pendingProps)), (gn = ls(tn.type, gn)), n0(Bt, Lt, tn, gn, Gt) + case 15: + return r0(Bt, Lt, Lt.type, Lt.pendingProps, Gt) + case 17: + return ( + (tn = Lt.type), + (gn = Lt.pendingProps), + (gn = Lt.elementType === tn ? gn : ls(tn, gn)), + Bt !== null && ((Bt.alternate = null), (Lt.alternate = null), (Lt.flags |= 2)), + (Lt.tag = 1), + so(tn) ? ((Bt = !0), vo(Lt)) : (Bt = !1), + os(Lt, Gt), + jy(Lt, tn, gn), + sp(Lt, tn, gn, Gt), + oy(null, Lt, tn, !0, Bt, Gt) + ) + case 19: + return d0(Bt, Lt, Gt) + case 22: + return i0(Bt, Lt, Gt) + } + throw Error(at(156, Lt.tag)) + } + function Nm(Bt, Lt) { + return tu(Bt, Lt) + } + function G0(Bt, Lt, Gt, tn) { + ;(this.tag = Bt), + (this.key = Gt), + (this.sibling = this.child = this.return = this.stateNode = this.type = this.elementType = null), + (this.index = 0), + (this.ref = null), + (this.pendingProps = Lt), + (this.dependencies = this.memoizedState = this.updateQueue = this.memoizedProps = null), + (this.mode = tn), + (this.subtreeFlags = this.flags = 0), + (this.deletions = null), + (this.childLanes = this.lanes = 0), + (this.alternate = null) + } + function Ml(Bt, Lt, Gt, tn) { + return new G0(Bt, Lt, Gt, tn) + } + function Cy(Bt) { + return (Bt = Bt.prototype), !(!Bt || !Bt.isReactComponent) + } + function k0(Bt) { + if (typeof Bt == 'function') return Cy(Bt) ? 1 : 0 + if (Bt != null) { + if (((Bt = Bt.$$typeof), Bt === gt)) return 11 + if (Bt === vt) return 14 + } + return 2 + } + function Su(Bt, Lt) { + var Gt = Bt.alternate + return ( + Gt === null + ? ((Gt = Ml(Bt.tag, Lt, Bt.key, Bt.mode)), + (Gt.elementType = Bt.elementType), + (Gt.type = Bt.type), + (Gt.stateNode = Bt.stateNode), + (Gt.alternate = Bt), + (Bt.alternate = Gt)) + : ((Gt.pendingProps = Lt), (Gt.type = Bt.type), (Gt.flags = 0), (Gt.subtreeFlags = 0), (Gt.deletions = null)), + (Gt.flags = Bt.flags & 14680064), + (Gt.childLanes = Bt.childLanes), + (Gt.lanes = Bt.lanes), + (Gt.child = Bt.child), + (Gt.memoizedProps = Bt.memoizedProps), + (Gt.memoizedState = Bt.memoizedState), + (Gt.updateQueue = Bt.updateQueue), + (Lt = Bt.dependencies), + (Gt.dependencies = Lt === null ? null : { lanes: Lt.lanes, firstContext: Lt.firstContext }), + (Gt.sibling = Bt.sibling), + (Gt.index = Bt.index), + (Gt.ref = Bt.ref), + Gt + ) + } + function Lm(Bt, Lt, Gt, tn, gn, Cn) { + var Gn = 2 + if (((tn = Bt), typeof Bt == 'function')) Cy(Bt) && (Gn = 1) + else if (typeof Bt == 'string') Gn = 5 + else + e: switch (Bt) { + case ut: + return zu(Gt.children, gn, Cn, Lt) + case ht: + ;(Gn = 8), (gn |= 8) + break + case dt: + return (Bt = Ml(12, Gt, Lt, gn | 2)), (Bt.elementType = dt), (Bt.lanes = Cn), Bt + case yt: + return (Bt = Ml(13, Gt, Lt, gn)), (Bt.elementType = yt), (Bt.lanes = Cn), Bt + case bt: + return (Bt = Ml(19, Gt, Lt, gn)), (Bt.elementType = bt), (Bt.lanes = Cn), Bt + case kt: + return um(Gt, gn, Cn, Lt) + default: + if (typeof Bt == 'object' && Bt !== null) + switch (Bt.$$typeof) { + case pt: + Gn = 10 + break e + case mt: + Gn = 9 + break e + case gt: + Gn = 11 + break e + case vt: + Gn = 14 + break e + case xt: + ;(Gn = 16), (tn = null) + break e + } + throw Error(at(130, Bt == null ? Bt : typeof Bt, '')) + } + return (Lt = Ml(Gn, Gt, Lt, gn)), (Lt.elementType = Bt), (Lt.type = tn), (Lt.lanes = Cn), Lt + } + function zu(Bt, Lt, Gt, tn) { + return (Bt = Ml(7, Bt, tn, Lt)), (Bt.lanes = Gt), Bt + } + function um(Bt, Lt, Gt, tn) { + return (Bt = Ml(22, Bt, tn, Lt)), (Bt.elementType = kt), (Bt.lanes = Gt), (Bt.stateNode = {}), Bt + } + function Ns(Bt, Lt, Gt) { + return (Bt = Ml(6, Bt, null, Lt)), (Bt.lanes = Gt), Bt + } + function Rl(Bt, Lt, Gt) { + return ( + (Lt = Ml(4, Bt.children !== null ? Bt.children : [], Bt.key, Lt)), + (Lt.lanes = Gt), + (Lt.stateNode = { containerInfo: Bt.containerInfo, pendingChildren: null, implementation: Bt.implementation }), + Lt + ) + } + function q0(Bt, Lt, Gt, tn, gn) { + ;(this.tag = Lt), + (this.containerInfo = Bt), + (this.finishedWork = this.pingCache = this.current = this.pendingChildren = null), + (this.timeoutHandle = hn), + (this.callbackNode = this.pendingContext = this.context = null), + (this.callbackPriority = 0), + (this.eventTimes = $a(0)), + (this.expirationTimes = $a(-1)), + (this.entangledLanes = + this.finishedLanes = + this.mutableReadLanes = + this.expiredLanes = + this.pingedLanes = + this.suspendedLanes = + this.pendingLanes = + 0), + (this.entanglements = $a(0)), + (this.identifierPrefix = tn), + (this.onRecoverableError = gn), + _n && (this.mutableSourceEagerHydrationData = null) + } + function S0(Bt, Lt, Gt, tn, gn, Cn, Gn, rr, _r) { + return ( + (Bt = new q0(Bt, Lt, Gt, rr, _r)), + Lt === 1 ? ((Lt = 1), Cn === !0 && (Lt |= 8)) : (Lt = 0), + (Cn = Ml(3, null, null, Lt)), + (Bt.current = Cn), + (Cn.stateNode = Bt), + (Cn.memoizedState = { element: tn, isDehydrated: Gt, cache: null, transitions: null }), + qm(Cn), + Bt + ) + } + function hm(Bt) { + if (!Bt) return Sr + Bt = Bt._reactInternals + e: { + if ($t(Bt) !== Bt || Bt.tag !== 1) throw Error(at(170)) + var Lt = Bt + do { + switch (Lt.tag) { + case 3: + Lt = Lt.stateNode.context + break e + case 1: + if (so(Lt.type)) { + Lt = Lt.stateNode.__reactInternalMemoizedMergedChildContext + break e + } + } + Lt = Lt.return + } while (Lt !== null) + throw Error(at(171)) + } + if (Bt.tag === 1) { + var Gt = Bt.type + if (so(Gt)) return Yn(Bt, Gt, Lt) + } + return Lt + } + function ep(Bt) { + var Lt = Bt._reactInternals + if (Lt === void 0) + throw typeof Bt.render == 'function' ? Error(at(188)) : ((Bt = Object.keys(Bt).join(',')), Error(at(268, Bt))) + return (Bt = Pt(Lt)), Bt === null ? null : Bt.stateNode + } + function $y(Bt, Lt) { + if (((Bt = Bt.memoizedState), Bt !== null && Bt.dehydrated !== null)) { + var Gt = Bt.retryLane + Bt.retryLane = Gt !== 0 && Gt < Lt ? Gt : Lt + } + } + function Fm(Bt, Lt) { + $y(Bt, Lt), (Bt = Bt.alternate) && $y(Bt, Lt) + } + function Y0(Bt) { + return (Bt = Pt(Bt)), Bt === null ? null : Bt.stateNode + } + function E0() { + return null + } + return ( + (nt.attemptContinuousHydration = function (Bt) { + if (Bt.tag === 13) { + var Lt = Os() + Pl(Bt, 134217728, Lt), Fm(Bt, 134217728) + } + }), + (nt.attemptHydrationAtCurrentPriority = function (Bt) { + if (Bt.tag === 13) { + var Lt = Os(), + Gt = cu(Bt) + Pl(Bt, Gt, Lt), Fm(Bt, Gt) + } + }), + (nt.attemptSynchronousHydration = function (Bt) { + switch (Bt.tag) { + case 3: + var Lt = Bt.stateNode + if (Lt.current.memoizedState.isDehydrated) { + var Gt = Fo(Lt.pendingLanes) + Gt !== 0 && (eu(Lt, Gt | 1), mo(Lt, ts()), !(Bo & 6) && (_d(), Ws())) + } + break + case 13: + var tn = Os() + El(function () { + return Pl(Bt, 1, tn) + }), + Fm(Bt, 1) + } + }), + (nt.batchedUpdates = function (Bt, Lt) { + var Gt = Bo + Bo |= 1 + try { + return Bt(Lt) + } finally { + ;(Bo = Gt), Bo === 0 && (_d(), nu && Ws()) + } + }), + (nt.createComponentSelector = function (Bt) { + return { $$typeof: xp, value: Bt } + }), + (nt.createContainer = function (Bt, Lt, Gt, tn, gn, Cn, Gn) { + return S0(Bt, Lt, !1, null, Gt, tn, gn, Cn, Gn) + }), + (nt.createHasPseudoClassSelector = function (Bt) { + return { $$typeof: rm, value: Bt } + }), + (nt.createHydrationContainer = function (Bt, Lt, Gt, tn, gn, Cn, Gn, rr, _r) { + return ( + (Bt = S0(Gt, tn, !0, Bt, gn, Cn, Gn, rr, _r)), + (Bt.context = hm(null)), + (Gt = Bt.current), + (tn = Os()), + (gn = cu(Gt)), + (Cn = Ps(tn, gn)), + (Cn.callback = Lt ?? null), + Nl(Gt, Cn), + (Bt.current.lanes = gn), + Zo(Bt, gn, tn), + mo(Bt, tn), + Bt + ) + }), + (nt.createPortal = function (Bt, Lt, Gt) { + var tn = 3 < arguments.length && arguments[3] !== void 0 ? arguments[3] : null + return { $$typeof: ct, key: tn == null ? null : '' + tn, children: Bt, containerInfo: Lt, implementation: Gt } + }), + (nt.createRoleSelector = function (Bt) { + return { $$typeof: xl, value: Bt } + }), + (nt.createTestNameSelector = function (Bt) { + return { $$typeof: kp, value: Bt } + }), + (nt.createTextSelector = function (Bt) { + return { $$typeof: _h, value: Bt } + }), + (nt.deferredUpdates = function (Bt) { + var Lt = No, + Gt = xa.transition + try { + return (xa.transition = null), (No = 16), Bt() + } finally { + ;(No = Lt), (xa.transition = Gt) + } + }), + (nt.discreteUpdates = function (Bt, Lt, Gt, tn, gn) { + var Cn = No, + Gn = xa.transition + try { + return (xa.transition = null), (No = 1), Bt(Lt, Gt, tn, gn) + } finally { + ;(No = Cn), (xa.transition = Gn), Bo === 0 && _d() + } + }), + (nt.findAllNodes = gy), + (nt.findBoundingRects = function (Bt, Lt) { + if (!In) throw Error(at(363)) + ;(Lt = gy(Bt, Lt)), (Bt = []) + for (var Gt = 0; Gt < Lt.length; Gt++) Bt.push(wn(Lt[Gt])) + for (Lt = Bt.length - 1; 0 < Lt; Lt--) { + Gt = Bt[Lt] + for (var tn = Gt.x, gn = tn + Gt.width, Cn = Gt.y, Gn = Cn + Gt.height, rr = Lt - 1; 0 <= rr; rr--) + if (Lt !== rr) { + var _r = Bt[rr], + Vr = _r.x, + oo = Vr + _r.width, + Io = _r.y, + ho = Io + _r.height + if (tn >= Vr && Cn >= Io && gn <= oo && Gn <= ho) { + Bt.splice(Lt, 1) + break + } else if (tn !== Vr || Gt.width !== _r.width || ho < Cn || Io > Gn) { + if (!(Cn !== Io || Gt.height !== _r.height || oo < tn || Vr > gn)) { + Vr > tn && ((_r.width += Vr - tn), (_r.x = tn)), oo < gn && (_r.width = gn - Vr), Bt.splice(Lt, 1) + break + } + } else { + Io > Cn && ((_r.height += Io - Cn), (_r.y = Cn)), ho < Gn && (_r.height = Gn - Io), Bt.splice(Lt, 1) + break + } + } + } + return Bt + }), + (nt.findHostInstance = ep), + (nt.findHostInstanceWithNoPortals = function (Bt) { + return (Bt = jt(Bt)), (Bt = Bt !== null ? wt(Bt) : null), Bt === null ? null : Bt.stateNode + }), + (nt.findHostInstanceWithWarning = function (Bt) { + return ep(Bt) + }), + (nt.flushControlled = function (Bt) { + var Lt = Bo + Bo |= 1 + var Gt = xa.transition, + tn = No + try { + ;(xa.transition = null), (No = 1), Bt() + } finally { + ;(No = tn), (xa.transition = Gt), (Bo = Lt), Bo === 0 && (_d(), Ws()) + } + }), + (nt.flushPassiveEffects = Lu), + (nt.flushSync = El), + (nt.focusWithin = function (Bt, Lt) { + if (!In) throw Error(at(363)) + for (Bt = Cm(Bt), Lt = y0(Bt, Lt), Lt = Array.from(Lt), Bt = 0; Bt < Lt.length; ) { + var Gt = Lt[Bt++] + if (!pn(Gt)) { + if (Gt.tag === 5 && Dn(Gt.stateNode)) return !0 + for (Gt = Gt.child; Gt !== null; ) Lt.push(Gt), (Gt = Gt.sibling) + } + } + return !1 + }), + (nt.getCurrentUpdatePriority = function () { + return No + }), + (nt.getFindAllNodesFailureDescription = function (Bt, Lt) { + if (!In) throw Error(at(363)) + var Gt = 0, + tn = [] + Bt = [Cm(Bt), 0] + for (var gn = 0; gn < Bt.length; ) { + var Cn = Bt[gn++], + Gn = Bt[gn++], + rr = Lt[Gn] + if ( + (Cn.tag !== 5 || !pn(Cn)) && + (Cs(Cn, rr) && (tn.push(im(rr)), Gn++, Gn > Gt && (Gt = Gn)), Gn < Lt.length) + ) + for (Cn = Cn.child; Cn !== null; ) Bt.push(Cn, Gn), (Cn = Cn.sibling) + } + if (Gt < Lt.length) { + for (Bt = []; Gt < Lt.length; Gt++) Bt.push(im(Lt[Gt])) + return ( + `findAllNodes was able to match part of the selector: + ` + + (tn.join(' > ') + + ` - &:hover { - cursor: pointer; - background-color: ${colors.gray300}; +No matching component was found for: + `) + + Bt.join(' > ') + ) + } + return null + }), + (nt.getPublicRootInstance = function (Bt) { + if (((Bt = Bt.current), !Bt.child)) return null + switch (Bt.child.tag) { + case 5: + return Ot(Bt.child.stateNode) + default: + return Bt.child.stateNode + } + }), + (nt.injectIntoDevTools = function (Bt) { + if ( + ((Bt = { + bundleType: Bt.bundleType, + version: Bt.version, + rendererPackageName: Bt.rendererPackageName, + rendererConfig: Bt.rendererConfig, + overrideHookState: null, + overrideHookStateDeletePath: null, + overrideHookStateRenamePath: null, + overrideProps: null, + overridePropsDeletePath: null, + overridePropsRenamePath: null, + setErrorHandler: null, + setSuspenseHandler: null, + scheduleUpdate: null, + currentDispatcherRef: st.ReactCurrentDispatcher, + findHostInstanceByFiber: Y0, + findFiberByHostInstance: Bt.findFiberByHostInstance || E0, + findHostInstancesForRefresh: null, + scheduleRefresh: null, + scheduleRoot: null, + setRefreshHandler: null, + getCurrentFiber: null, + reconcilerVersion: '18.0.0-fc46dba67-20220329', + }), + typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ > 'u') + ) + Bt = !1 + else { + var Lt = __REACT_DEVTOOLS_GLOBAL_HOOK__ + if (Lt.isDisabled || !Lt.supportsFiber) Bt = !0 + else { + try { + ;(Vu = Lt.inject(Bt)), (Xs = Lt) + } catch {} + Bt = !!Lt.checkDCE + } + } + return Bt + }), + (nt.isAlreadyRendering = function () { + return !1 + }), + (nt.observeVisibleRects = function (Bt, Lt, Gt, tn) { + if (!In) throw Error(at(363)) + Bt = gy(Bt, Lt) + var gn = un(Bt, Gt, tn).disconnect + return { + disconnect: function () { + gn() + }, + } + }), + (nt.registerMutableSourceForHydration = function (Bt, Lt) { + var Gt = Lt._getVersion + ;(Gt = Gt(Lt._source)), + Bt.mutableSourceEagerHydrationData == null + ? (Bt.mutableSourceEagerHydrationData = [Lt, Gt]) + : Bt.mutableSourceEagerHydrationData.push(Lt, Gt) + }), + (nt.runWithPriority = function (Bt, Lt) { + var Gt = No + try { + return (No = Bt), Lt() + } finally { + No = Gt + } + }), + (nt.shouldError = function () { + return null + }), + (nt.shouldSuspend = function () { + return !1 + }), + (nt.updateContainer = function (Bt, Lt, Gt, tn) { + var gn = Lt.current, + Cn = Os(), + Gn = cu(gn) + return ( + (Gt = hm(Gt)), + Lt.context === null ? (Lt.context = Gt) : (Lt.pendingContext = Gt), + (Lt = Ps(Cn, Gn)), + (Lt.payload = { element: Bt }), + (tn = tn === void 0 ? null : tn), + tn !== null && (Lt.callback = tn), + Nl(gn, Lt), + (Bt = Pl(gn, Gn, Cn)), + Bt !== null && ap(Bt, gn, Gn), + Gn + ) + }), + nt + ) } -`;var lib$1={};const require$$0=getAugmentedNamespace(emotionStyledBase_browser_esm);var ClickOutside={};(function(tt){tt.__esModule=!0,tt.default=void 0;var et=nt(reactExports);nt(propTypesExports);function nt(ht){return ht&&ht.__esModule?ht:{default:ht}}function rt(ht){if(ht===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return ht}function it(ht,dt){ht.prototype=Object.create(dt.prototype),ht.prototype.constructor=ht,ot(ht,dt)}function ot(ht,dt){return ot=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(pt,mt){return pt.__proto__=mt,pt},ot(ht,dt)}function at(ht,dt,pt){return dt=st(dt),dt in ht?Object.defineProperty(ht,dt,{value:pt,enumerable:!0,configurable:!0,writable:!0}):ht[dt]=pt,ht}function st(ht){var dt=lt(ht,"string");return typeof dt=="symbol"?dt:dt+""}function lt(ht,dt){if(typeof ht!="object"||ht===null)return ht;var pt=ht[Symbol.toPrimitive];if(pt!==void 0){var mt=pt.call(ht,dt||"default");if(typeof mt!="object")return mt;throw new TypeError("@@toPrimitive must return a primitive value.")}return(dt==="string"?String:Number)(ht)}var ct=function(ht){function dt(){for(var mt,gt=arguments.length,yt=Array(gt),bt=0;bt"u"&&(commonjsGlobal.window={}),window};tt.isomorphicWindow=st})(util);var constants$2={};(function(tt){tt.__esModule=!0,tt.LIB_NAME=void 0,tt.LIB_NAME="react-dropdown-select"})(constants$2);(function(tt){tt.__esModule=!0,tt.default=void 0;var et=ot(require$$0),nt=ot(reactExports),rt=util,it=constants$2;function ot(ct){return ct&&ct.__esModule?ct:{default:ct}}var at=function(ct){var ut=ct.item,ht=ct.props,dt=ct.state,pt=ct.methods;return ut&&ht.optionRenderer?ht.optionRenderer({item:ut,props:ht,state:dt,methods:pt}):nt.default.createElement(st,{role:"listitem",disabled:ht.disabled,direction:ht.direction,className:it.LIB_NAME+"-option",color:ht.color},nt.default.createElement("span",{className:it.LIB_NAME+"-option-label"},(0,rt.getByPath)(ut,ht.labelField)),nt.default.createElement("span",{className:it.LIB_NAME+"-option-remove",onClick:function(gt){return pt.removeItem(gt,ut,ht.closeOnSelect)}},"×"))},st=(0,et.default)("span",{target:"e1l4eby50"})("padding:0 5px;border-radius:2px;line-height:21px;margin:3px 0 3px 5px;background:",function(ct){var ut=ct.color;return ut},";color:#fff;display:flex;flex-direction:",function(ct){var ut=ct.direction;return ut==="rtl"?"row-reverse":"row"},";.",it.LIB_NAME,"-option-remove{cursor:pointer;width:22px;height:22px;display:inline-block;text-align:center;margin:0 -5px 0 0px;border-radius:0 3px 3px 0;:hover{color:tomato;}}:hover,:hover>span{opacity:0.9;}"),lt=at;tt.default=lt})(Option);var Input$1={};(function(tt){tt.__esModule=!0,tt.default=void 0;var et=st(require$$0),nt=at(reactExports),rt=util;at(propTypesExports);var it=constants$2;function ot(vt){if(typeof WeakMap!="function")return null;var xt=new WeakMap,kt=new WeakMap;return(ot=function(St){return St?kt:xt})(vt)}function at(vt,xt){if(!xt&&vt&&vt.__esModule)return vt;if(vt===null||typeof vt!="object"&&typeof vt!="function")return{default:vt};var kt=ot(xt);if(kt&&kt.has(vt))return kt.get(vt);var St={},Tt=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var At in vt)if(At!="default"&&Object.prototype.hasOwnProperty.call(vt,At)){var Et=Tt?Object.getOwnPropertyDescriptor(vt,At):null;Et&&(Et.get||Et.set)?Object.defineProperty(St,At,Et):St[At]=vt[At]}return St.default=vt,kt&&kt.set(vt,St),St}function st(vt){return vt&&vt.__esModule?vt:{default:vt}}function lt(vt){if(vt===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return vt}function ct(vt,xt){vt.prototype=Object.create(xt.prototype),vt.prototype.constructor=vt,ut(vt,xt)}function ut(vt,xt){return ut=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(kt,St){return kt.__proto__=St,kt},ut(vt,xt)}function ht(vt,xt,kt){return xt=dt(xt),xt in vt?Object.defineProperty(vt,xt,{value:kt,enumerable:!0,configurable:!0,writable:!0}):vt[xt]=kt,vt}function dt(vt){var xt=pt(vt,"string");return typeof xt=="symbol"?xt:xt+""}function pt(vt,xt){if(typeof vt!="object"||vt===null)return vt;var kt=vt[Symbol.toPrimitive];if(kt!==void 0){var St=kt.call(vt,xt||"default");if(typeof St!="object")return St;throw new TypeError("@@toPrimitive must return a primitive value.")}return(xt==="string"?String:Number)(vt)}var mt=function(vt,xt){var kt=vt.addPlaceholder,St=vt.searchable,Tt=vt.placeholder,At=xt.values&&xt.values.length===0,Et=xt.values&&0 typeof tt == 'object' && typeof tt.then == 'function', + globalCache$1 = [] + function shallowEqualArrays$1(tt, et, nt = (rt, it) => rt === it) { + if (tt === et) return !0 + if (!tt || !et) return !1 + const rt = tt.length + if (et.length !== rt) return !1 + for (let it = 0; it < rt; it++) if (!nt(tt[it], et[it])) return !1 + return !0 + } + function query$1(tt, et = null, nt = !1, rt = {}) { + et === null && (et = [tt]) + for (const ot of globalCache$1) + if (shallowEqualArrays$1(et, ot.keys, ot.equal)) { + if (nt) return + if (Object.prototype.hasOwnProperty.call(ot, 'error')) throw ot.error + if (Object.prototype.hasOwnProperty.call(ot, 'response')) + return ( + rt.lifespan && + rt.lifespan > 0 && + (ot.timeout && clearTimeout(ot.timeout), (ot.timeout = setTimeout(ot.remove, rt.lifespan))), + ot.response + ) + if (!nt) throw ot.promise + } + const it = { + keys: et, + equal: rt.equal, + remove: () => { + const ot = globalCache$1.indexOf(it) + ot !== -1 && globalCache$1.splice(ot, 1) + }, + promise: (isPromise(tt) ? tt : tt(...et)) + .then((ot) => { + ;(it.response = ot), rt.lifespan && rt.lifespan > 0 && (it.timeout = setTimeout(it.remove, rt.lifespan)) + }) + .catch((ot) => (it.error = ot)), } - `:""},";"),yt=mt;tt.default=yt})(Item);(function(tt){tt.__esModule=!0,tt.default=void 0;var et=st(require$$0),nt=st(reactExports),rt=constants$2,it=st(NoData),ot=st(Item),at=util;function st(mt){return mt&&mt.__esModule?mt:{default:mt}}var lt=function(mt,gt){var yt=gt.getSelectRef().getBoundingClientRect(),bt=yt.bottom+parseInt(mt.dropdownHeight,10)+parseInt(mt.dropdownGap,10);return mt.dropdownPosition==="auto"?bt>(0,at.isomorphicWindow)().innerHeight&&bt>yt.top?"top":"bottom":mt.dropdownPosition},ct=function(mt){var gt=mt.props,yt=mt.state,bt=mt.methods;return nt.default.createElement(ut,{tabIndex:"-1","aria-expanded":"true",role:"list",dropdownPosition:lt(gt,bt),selectBounds:yt.selectBounds,portal:gt.portal,dropdownGap:gt.dropdownGap,dropdownHeight:gt.dropdownHeight,className:rt.LIB_NAME+"-dropdown "+rt.LIB_NAME+"-dropdown-position-"+lt(gt,bt)},gt.dropdownRenderer?gt.dropdownRenderer({props:gt,state:yt,methods:bt}):nt.default.createElement(nt.default.Fragment,null,gt.create&&yt.search&&!(0,at.valueExistInSelected)(yt.search,[].concat(yt.values,gt.options),gt)&&nt.default.createElement(ht,{role:"button",className:rt.LIB_NAME+"-dropdown-add-new",color:gt.color,onClick:function(){return bt.createNew(yt.search)}},gt.createNewLabel.replace("{search}",'"'+yt.search+'"')),yt.searchResults.length===0?nt.default.createElement(it.default,{className:rt.LIB_NAME+"-no-data",state:yt,props:gt,methods:bt}):yt.searchResults.map(function(vt,xt){return nt.default.createElement(ot.default,{key:vt[gt.valueField].toString(),item:vt,itemIndex:xt,state:yt,props:gt,methods:bt})}),gt.selectAll&>.options&>.multi&&nt.default.createElement(dt,{role:"button",className:rt.LIB_NAME+"-dropdown-select-all",color:gt.color,onClick:function(){return bt.areAllSelected()?bt.clearAll():bt.selectAll()}},bt.areAllSelected()?gt.clearAllLabel:gt.selectAllLabel)))},ut=(0,et.default)("div",{target:"e1qjn9k92"})("position:absolute;",function(mt){var gt=mt.selectBounds,yt=mt.dropdownGap,bt=mt.dropdownPosition;return bt==="top"?"bottom: "+(gt.height+2+yt)+"px":"top: "+(gt.height+2+yt)+"px"},";",function(mt){var gt=mt.selectBounds,yt=mt.dropdownGap,bt=mt.dropdownPosition,vt=mt.portal;return vt?` - position: fixed; - `+(bt==="bottom"?"top: "+(gt.bottom+yt)+"px;":"bottom: "+((0,at.isomorphicWindow)().innerHeight-gt.top+yt)+"px;")+` - left: `+(gt.left-1)+"px;":"left: -1px;"},";border:1px solid #ccc;width:",function(mt){var gt=mt.selectBounds;return gt.width},"px;padding:0;display:flex;flex-direction:column;background:#fff;border-radius:2px;box-shadow:0 0 10px 0 ",function(){return(0,at.hexToRGBA)("#000000",.2)},";max-height:",function(mt){var gt=mt.dropdownHeight;return gt},";overflow:auto;z-index:9;:focus{outline:none;}"),ht=(0,et.default)("div",{target:"e1qjn9k91"})("color:",function(mt){var gt=mt.color;return gt},";padding:5px 10px;:hover{background:",function(mt){var gt=mt.color;return gt&&(0,at.hexToRGBA)(gt,.1)},";outline:none;cursor:pointer;}"),dt=(0,et.default)("div",{target:"e1qjn9k90"})("color:",function(mt){var gt=mt.color;return gt},";padding:5px 10px;position:sticky;bottom:0;margin:0;opacity:1;background:#fff;box-shadow:0 0 10px 0 ",function(){return(0,at.hexToRGBA)("#000000",.2)},";:hover{outline:none;cursor:pointer;}"),pt=ct;tt.default=pt})(Dropdown);var Loading={};(function(tt){tt.__esModule=!0,tt.default=void 0;var et=it(require$$0),nt=it(reactExports),rt=constants$2;function it(lt){return lt&<.__esModule?lt:{default:lt}}var ot=function(lt){var ct=lt.props;return ct.loadingRenderer?ct.loadingRenderer({props:ct}):nt.default.createElement(at,{className:rt.LIB_NAME+"-loading",color:ct.color})},at=(0,et.default)("div",{target:"e1l5cpc30"})("@keyframes dual-ring-spin{0%{transform:rotate(0deg);}100%{transform:rotate(180deg);}}padding:0 5px;display:block;width:auto;height:auto;:after{content:' ';display:block;width:16px;height:16px;border-radius:50%;border-width:1px;border-style:solid;border-color:",function(lt){var ct=lt.color;return ct}," transparent;animation:dual-ring-spin 0.7s ease-in-out infinite;margin:0 0 0 -10px;}"),st=ot;tt.default=st})(Loading);var Clear={};(function(tt){tt.__esModule=!0,tt.default=void 0;var et=it(require$$0),nt=it(reactExports),rt=constants$2;function it(lt){return lt&<.__esModule?lt:{default:lt}}var ot=function(lt){var ct=lt.props,ut=lt.state,ht=lt.methods;return ct.clearRenderer?ct.clearRenderer({props:ct,state:ut,methods:ht}):nt.default.createElement(at,{className:rt.LIB_NAME+"-clear",tabIndex:"-1",onClick:function(){return ht.clearAll()},onKeyPress:function(){return ht.clearAll()}},"×")},at=(0,et.default)("div",{target:"e11qlq5e0"})({name:"992gsg",styles:"line-height:25px;margin:0 10px;cursor:pointer;:focus{outline:none;}:hover{color:tomato;}"}),st=ot;tt.default=st})(Clear);var Separator={};(function(tt){tt.__esModule=!0,tt.default=void 0;var et=it(require$$0),nt=it(reactExports),rt=constants$2;function it(lt){return lt&<.__esModule?lt:{default:lt}}var ot=function(lt){var ct=lt.props,ut=lt.state,ht=lt.methods;return ct.separatorRenderer?ct.separatorRenderer({props:ct,state:ut,methods:ht}):nt.default.createElement(at,{className:rt.LIB_NAME+"-separator"})},at=(0,et.default)("div",{target:"e19h5j1v0"})({name:"cmi1n0",styles:"border-left:1px solid #ccc;width:1px;height:25px;display:block"}),st=ot;tt.default=st})(Separator);var DropdownHandle={};(function(tt){tt.__esModule=!0,tt.default=void 0;var et=it(require$$0),nt=it(reactExports),rt=constants$2;function it(lt){return lt&<.__esModule?lt:{default:lt}}var ot=function(lt){var ct=lt.props,ut=lt.state,ht=lt.methods;return nt.default.createElement(at,{tabIndex:"-1",onClick:function(pt){return ht.dropDown(ut.dropdown?"close":"open",pt)},dropdownOpen:ut.dropdown,onKeyPress:function(pt){return ht.dropDown("toggle",pt)},onKeyDown:function(pt){return ht.dropDown("toggle",pt)},className:rt.LIB_NAME+"-dropdown-handle",rotate:ct.dropdownHandleRenderer?0:1,color:ct.color},ct.dropdownHandleRenderer?ct.dropdownHandleRenderer({props:ct,state:ut,methods:ht}):nt.default.createElement("svg",{fill:"currentColor",viewBox:"0 0 40 40"},nt.default.createElement("path",{d:"M31 26.4q0 .3-.2.5l-1.1 1.2q-.3.2-.6.2t-.5-.2l-8.7-8.8-8.8 8.8q-.2.2-.5.2t-.5-.2l-1.2-1.2q-.2-.2-.2-.5t.2-.5l10.4-10.4q.3-.2.6-.2t.5.2l10.4 10.4q.2.2.2.5z"})))},at=(0,et.default)("div",{target:"e1vudypg0"})("text-align:center;",function(lt){var ct=lt.dropdownOpen,ut=lt.rotate;return ct?` - pointer-events: all; - `+(ut?"transform: rotate(0deg);margin: 0px 0 -3px 5px;":"")+` - `:` - pointer-events: none; - `+(ut?"margin: 0 0 0 5px;transform: rotate(180deg);":"")+` - `},";cursor:pointer;svg{width:16px;height:16px;}:hover{path{stroke:",function(lt){var ct=lt.color;return ct},";}}:focus{outline:none;path{stroke:",function(lt){var ct=lt.color;return ct},";}}"),st=ot;tt.default=st})(DropdownHandle);(function(tt){tt.__esModule=!0,tt.default=tt.Select=void 0;var et=gt(require$$0),nt=mt(reactExports),rt=gt(reactDomExports);gt(propTypesExports);var it=gt(ClickOutside),ot=gt(Content$2),at=gt(Dropdown),st=gt(Loading),lt=gt(Clear),ct=gt(Separator),ut=gt(DropdownHandle),ht=util,dt=constants$2;function pt(Dt){if(typeof WeakMap!="function")return null;var jt=new WeakMap,Pt=new WeakMap;return(pt=function(Ct){return Ct?Pt:jt})(Dt)}function mt(Dt,jt){if(!jt&&Dt&&Dt.__esModule)return Dt;if(Dt===null||typeof Dt!="object"&&typeof Dt!="function")return{default:Dt};var Pt=pt(jt);if(Pt&&Pt.has(Dt))return Pt.get(Dt);var Ct={},wt=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var It in Dt)if(It!="default"&&Object.prototype.hasOwnProperty.call(Dt,It)){var Ot=wt?Object.getOwnPropertyDescriptor(Dt,It):null;Ot&&(Ot.get||Ot.set)?Object.defineProperty(Ct,It,Ot):Ct[It]=Dt[It]}return Ct.default=Dt,Pt&&Pt.set(Dt,Ct),Ct}function gt(Dt){return Dt&&Dt.__esModule?Dt:{default:Dt}}function yt(){return yt=Object.assign?Object.assign.bind():function(Dt){for(var jt,Pt=1;Pt(0,ht.getProp)(Ft,Ot)?1:0}),Wt}),kt(bt(wt),"searchFn",function(It){var Ot=It.state,Wt=It.methods,zt=new RegExp(Wt.safeString(Ot.search),"i");return Wt.sortBy().filter(function(Ft){return zt.test((0,ht.getByPath)(Ft,wt.props.searchBy)||(0,ht.getByPath)(Ft,wt.props.valueField))})}),kt(bt(wt),"searchResults",function(){var It={state:wt.state,props:wt.props,methods:wt.methods};return wt.props.searchFn(It)||wt.searchFn(It)}),kt(bt(wt),"activeCursorItem",function(It){return wt.setState({activeCursorItem:It})}),kt(bt(wt),"handleKeyDown",function(It){var Ot={event:It,state:wt.state,props:wt.props,methods:wt.methods,setState:wt.setState.bind(bt(wt))};return wt.props.handleKeyDownFn(Ot)||wt.handleKeyDownFn(Ot)}),kt(bt(wt),"handleKeyDownFn",function(It){var Ot=It.event,Wt=It.state,zt=It.props,Ft=It.methods,Nt=It.setState,Ut=Wt.cursor,Mt=Wt.searchResults,Ht=Ot.key==="Escape",en=Ot.key==="Enter",sn=Ot.key==="ArrowUp",Kt=Ot.key==="ArrowDown",rn=Ot.key==="Backspace",nn=Ot.key==="Tab"&&!Ot.shiftKey,hn=Ot.shiftKey&&Ot.key==="Tab";if(Kt&&!Wt.dropdown)return Ot.preventDefault(),wt.dropDown("open"),Nt({cursor:0});if((Kt||nn&&Wt.dropdown)&&Ut===null)return Nt({cursor:0});if((sn||Kt||hn&&Wt.dropdown||nn&&Wt.dropdown)&&Ot.preventDefault(),Ht&&wt.dropDown("close"),en){var vn=Mt[Ut];if(vn&&!vn.disabled){if(zt.create&&(0,ht.valueExistInSelected)(Wt.search,Wt.values,zt))return null;Ft.addItem(vn)}}return(Kt||nn&&Wt.dropdown)&&Mt.length===Ut?Nt({cursor:0}):((Kt||nn&&Wt.dropdown)&&Nt(function(an){return{cursor:an.cursor+1}}),(sn||hn&&Wt.dropdown)&&0 query$1(tt, et, !1, nt), + preload = (tt, et, nt) => void query$1(tt, et, !0, nt), + clear = (tt) => { + if (tt === void 0 || tt.length === 0) globalCache$1.splice(0, globalCache$1.length) + else { + const et = globalCache$1.find((nt) => shallowEqualArrays$1(tt, nt.keys, nt.equal)) + et && et.remove() + } + }, + catalogue = {}, + extend$2 = (tt) => void Object.assign(catalogue, tt) + function createRenderer(tt, et) { + function nt(ut, { args: ht = [], attach: dt, ...pt }, mt) { + let gt = `${ut[0].toUpperCase()}${ut.slice(1)}`, + yt + if (ut === 'primitive') { + if (pt.object === void 0) throw new Error("R3F: Primitives without 'object' are invalid!") + const bt = pt.object + yt = prepare(bt, { type: ut, root: mt, attach: dt, primitive: !0 }) + } else { + const bt = catalogue[gt] + if (!bt) + throw new Error( + `R3F: ${gt} is not part of the THREE namespace! Did you forget to extend? See: https://docs.pmnd.rs/react-three-fiber/api/objects#using-3rd-party-objects-declaratively`, + ) + if (!Array.isArray(ht)) throw new Error('R3F: The args prop must be an array!') + yt = prepare(new bt(...ht), { type: ut, root: mt, attach: dt, memoizedProps: { args: ht } }) + } + return ( + yt.__r3f.attach === void 0 && + (yt instanceof BufferGeometry + ? (yt.__r3f.attach = 'geometry') + : yt instanceof Material && (yt.__r3f.attach = 'material')), + gt !== 'inject' && applyProps$1(yt, pt), + yt + ) } - - &.hasSelected { - .react-dropdown-select-clear { - display: block; + function rt(ut, ht) { + let dt = !1 + if (ht) { + var pt, mt + ;(pt = ht.__r3f) != null && pt.attach + ? attach(ut, ht, ht.__r3f.attach) + : ht.isObject3D && ut.isObject3D && (ut.add(ht), (dt = !0)), + dt || (mt = ut.__r3f) == null || mt.objects.push(ht), + ht.__r3f || prepare(ht, {}), + (ht.__r3f.parent = ut), + updateInstance(ht), + invalidateInstance(ht) } } - - &:hover { - opacity: 1; - box-shadow: 0 0 10px 2px ${colors.primaryBlueBorder}; + function it(ut, ht, dt) { + let pt = !1 + if (ht) { + var mt, gt + if ((mt = ht.__r3f) != null && mt.attach) attach(ut, ht, ht.__r3f.attach) + else if (ht.isObject3D && ut.isObject3D) { + ;(ht.parent = ut), ht.dispatchEvent({ type: 'added' }) + const yt = ut.children.filter((vt) => vt !== ht), + bt = yt.indexOf(dt) + ;(ut.children = [...yt.slice(0, bt), ht, ...yt.slice(bt)]), (pt = !0) + } + pt || (gt = ut.__r3f) == null || gt.objects.push(ht), + ht.__r3f || prepare(ht, {}), + (ht.__r3f.parent = ut), + updateInstance(ht), + invalidateInstance(ht) + } } - - .react-dropdown-select-input::placeholder { - font-size: 14px; - font-weight: 600; - color: ${colors.white}; + function ot(ut, ht, dt = !1) { + ut && [...ut].forEach((pt) => at(ht, pt, dt)) + } + function at(ut, ht, dt) { + if (ht) { + var pt, mt, gt + if ( + (ht.__r3f && (ht.__r3f.parent = null), + (pt = ut.__r3f) != null && pt.objects && (ut.__r3f.objects = ut.__r3f.objects.filter((kt) => kt !== ht)), + (mt = ht.__r3f) != null && mt.attach) + ) + detach(ut, ht, ht.__r3f.attach) + else if (ht.isObject3D && ut.isObject3D) { + var yt + ut.remove(ht), (yt = ht.__r3f) != null && yt.root && removeInteractivity(ht.__r3f.root, ht) + } + const vt = (gt = ht.__r3f) == null ? void 0 : gt.primitive, + xt = dt === void 0 ? ht.dispose !== null && !vt : dt + if (!vt) { + var bt + ot((bt = ht.__r3f) == null ? void 0 : bt.objects, ht, xt), ot(ht.children, ht, xt) + } + delete ht.__r3f, + xt && + ht.dispose && + ht.type !== 'Scene' && + schedulerExports.unstable_scheduleCallback(schedulerExports.unstable_IdlePriority, () => { + try { + ht.dispose() + } catch {} + }), + invalidateInstance(ut) + } + } + function st(ut, ht, dt, pt) { + var mt + const gt = (mt = ut.__r3f) == null ? void 0 : mt.parent + if (!gt) return + const yt = nt(ht, dt, ut.__r3f.root) + if (ut.children) { + for (const bt of ut.children) bt.__r3f && rt(yt, bt) + ut.children = ut.children.filter((bt) => !bt.__r3f) + } + ut.__r3f.objects.forEach((bt) => rt(yt, bt)), + (ut.__r3f.objects = []), + ut.__r3f.autoRemovedBeforeAppend || at(gt, ut), + yt.parent && (yt.__r3f.autoRemovedBeforeAppend = !0), + rt(gt, yt), + yt.raycast && yt.__r3f.eventCount && yt.__r3f.root.getState().internal.interaction.push(yt), + [pt, pt.alternate].forEach((bt) => { + bt !== null && + ((bt.stateNode = yt), bt.ref && (typeof bt.ref == 'function' ? bt.ref(yt) : (bt.ref.current = yt))) + }) + } + const lt = () => console.warn('Text is not allowed in the R3F tree! This could be stray whitespace or characters.') + return { + reconciler: Reconciler({ + createInstance: nt, + removeChild: at, + appendChild: rt, + appendInitialChild: rt, + insertBefore: it, + supportsMutation: !0, + isPrimaryRenderer: !1, + supportsPersistence: !1, + supportsHydration: !1, + noTimeout: -1, + appendChildToContainer: (ut, ht) => { + if (!ht) return + const dt = ut.getState().scene + dt.__r3f && ((dt.__r3f.root = ut), rt(dt, ht)) + }, + removeChildFromContainer: (ut, ht) => { + ht && at(ut.getState().scene, ht) + }, + insertInContainerBefore: (ut, ht, dt) => { + if (!ht || !dt) return + const pt = ut.getState().scene + pt.__r3f && it(pt, ht, dt) + }, + getRootHostContext: () => null, + getChildHostContext: (ut) => ut, + finalizeInitialChildren(ut) { + var ht + return !!((ht = ut == null ? void 0 : ut.__r3f) != null ? ht : {}).handlers + }, + prepareUpdate(ut, ht, dt, pt) { + var mt + if (((mt = ut == null ? void 0 : ut.__r3f) != null ? mt : {}).primitive && pt.object && pt.object !== ut) + return [!0] + { + const { args: yt = [], children: bt, ...vt } = pt, + { args: xt = [], children: kt, ...St } = dt + if (!Array.isArray(yt)) throw new Error('R3F: the args prop must be an array!') + if (yt.some((At, Et) => At !== xt[Et])) return [!0] + const Tt = diffProps(ut, vt, St, !0) + return Tt.changes.length ? [!1, Tt] : null + } + }, + commitUpdate(ut, [ht, dt], pt, mt, gt, yt) { + ht ? st(ut, pt, gt, yt) : applyProps$1(ut, dt) + }, + commitMount(ut, ht, dt, pt) { + var mt + const gt = (mt = ut.__r3f) != null ? mt : {} + ut.raycast && gt.handlers && gt.eventCount && ut.__r3f.root.getState().internal.interaction.push(ut) + }, + getPublicInstance: (ut) => ut, + prepareForCommit: () => null, + preparePortalMount: (ut) => prepare(ut.getState().scene), + resetAfterCommit: () => {}, + shouldSetTextContent: () => !1, + clearContainer: () => !1, + hideInstance(ut) { + var ht + const { attach: dt, parent: pt } = (ht = ut.__r3f) != null ? ht : {} + dt && pt && detach(pt, ut, dt), ut.isObject3D && (ut.visible = !1), invalidateInstance(ut) + }, + unhideInstance(ut, ht) { + var dt + const { attach: pt, parent: mt } = (dt = ut.__r3f) != null ? dt : {} + pt && mt && attach(mt, ut, pt), + ((ut.isObject3D && ht.visible == null) || ht.visible) && (ut.visible = !0), + invalidateInstance(ut) + }, + createTextInstance: lt, + hideTextInstance: lt, + unhideTextInstance: lt, + getCurrentEventPriority: () => (et ? et() : constantsExports.DefaultEventPriority), + beforeActiveInstanceBlur: () => {}, + afterActiveInstanceBlur: () => {}, + detachDeletedInstance: () => {}, + now: + typeof performance < 'u' && is$1.fun(performance.now) + ? performance.now + : is$1.fun(Date.now) + ? Date.now + : () => 0, + scheduleTimeout: is$1.fun(setTimeout) ? setTimeout : void 0, + cancelTimeout: is$1.fun(clearTimeout) ? clearTimeout : void 0, + }), + applyProps: applyProps$1, } } - - .react-dropdown-select-clear { - &:hover { - color: ${colors.white}; - opacity: 0.7; + var _window$document, _window$navigator + const hasColorSpace = (tt) => 'colorSpace' in tt || 'outputColorSpace' in tt, + getColorManagement = () => { + var tt + return (tt = catalogue.ColorManagement) != null ? tt : null + }, + isOrthographicCamera$1 = (tt) => tt && tt.isOrthographicCamera, + isRef = (tt) => tt && tt.hasOwnProperty('current'), + useIsomorphicLayoutEffect$1 = + typeof window < 'u' && + (((_window$document = window.document) != null && _window$document.createElement) || + ((_window$navigator = window.navigator) == null ? void 0 : _window$navigator.product) === 'ReactNative') + ? reactExports.useLayoutEffect + : reactExports.useEffect + function useMutableCallback(tt) { + const et = reactExports.useRef(tt) + return useIsomorphicLayoutEffect$1(() => void (et.current = tt), [tt]), et + } + function Block({ set: tt }) { + return useIsomorphicLayoutEffect$1(() => (tt(new Promise(() => null)), () => tt(!1)), [tt]), null + } + class ErrorBoundary extends reactExports.Component { + constructor(...et) { + super(...et), (this.state = { error: !1 }) + } + componentDidCatch(et) { + this.props.set(et) + } + render() { + return this.state.error ? null : this.props.children } } - - .react-dropdown-select-input { - width: 100%; + ErrorBoundary.getDerivedStateFromError = () => ({ error: !0 }) + const DEFAULT = '__default', + DEFAULTS = new Map(), + isDiffSet = (tt) => tt && !!tt.memoized && !!tt.changes + function calculateDpr(tt) { + var et + const nt = typeof window < 'u' ? ((et = window.devicePixelRatio) != null ? et : 2) : 1 + return Array.isArray(tt) ? Math.min(Math.max(tt[0], nt), tt[1]) : tt } - - &.hasSelected { - .react-dropdown-select-input { - display: none; + const getRootState = (tt) => { + var et + return (et = tt.__r3f) == null ? void 0 : et.root.getState() + }, + is$1 = { + obj: (tt) => tt === Object(tt) && !is$1.arr(tt) && typeof tt != 'function', + fun: (tt) => typeof tt == 'function', + str: (tt) => typeof tt == 'string', + num: (tt) => typeof tt == 'number', + boo: (tt) => typeof tt == 'boolean', + und: (tt) => tt === void 0, + arr: (tt) => Array.isArray(tt), + equ(tt, et, { arrays: nt = 'shallow', objects: rt = 'reference', strict: it = !0 } = {}) { + if (typeof tt != typeof et || !!tt != !!et) return !1 + if (is$1.str(tt) || is$1.num(tt)) return tt === et + const ot = is$1.obj(tt) + if (ot && rt === 'reference') return tt === et + const at = is$1.arr(tt) + if (at && nt === 'reference') return tt === et + if ((at || ot) && tt === et) return !0 + let st + for (st in tt) if (!(st in et)) return !1 + if (ot && nt === 'shallow' && rt === 'shallow') { + for (st in it ? et : tt) if (!is$1.equ(tt[st], et[st], { strict: it, objects: 'reference' })) return !1 + } else for (st in it ? et : tt) if (tt[st] !== et[st]) return !1 + if (is$1.und(st)) { + if ( + (at && tt.length === 0 && et.length === 0) || + (ot && Object.keys(tt).length === 0 && Object.keys(et).length === 0) + ) + return !0 + if (tt !== et) return !1 + } + return !0 + }, } + function buildGraph(tt) { + const et = { nodes: {}, materials: {} } + return ( + tt && + tt.traverse((nt) => { + nt.name && (et.nodes[nt.name] = nt), + nt.material && !et.materials[nt.material.name] && (et.materials[nt.material.name] = nt.material) + }), + et + ) } - - .react-dropdown-select-dropdown { - background: ${colors.primaryBlueBorder}; - border: none; - border-radius: 12px; - width: 100%; - .react-dropdown-select-item { - border: none; - & + & { - border-bottom: 1px solid #fff !important; + function dispose(tt) { + tt.dispose && tt.type !== 'Scene' && tt.dispose() + for (const et in tt) et.dispose == null || et.dispose(), delete tt[et] + } + function prepare(tt, et) { + const nt = tt + return ( + (nt.__r3f = { + type: '', + root: null, + previousAttach: null, + memoizedProps: {}, + eventCount: 0, + handlers: {}, + objects: [], + parent: null, + ...et, + }), + tt + ) + } + function resolve(tt, et) { + let nt = tt + if (et.includes('-')) { + const rt = et.split('-'), + it = rt.pop() + return (nt = rt.reduce((ot, at) => ot[at], tt)), { target: nt, key: it } + } else return { target: nt, key: et } + } + const INDEX_REGEX = /-\d+$/ + function attach(tt, et, nt) { + if (is$1.str(nt)) { + if (INDEX_REGEX.test(nt)) { + const ot = nt.replace(INDEX_REGEX, ''), + { target: at, key: st } = resolve(tt, ot) + Array.isArray(at[st]) || (at[st] = []) } + const { target: rt, key: it } = resolve(tt, nt) + ;(et.__r3f.previousAttach = rt[it]), (rt[it] = et) + } else et.__r3f.previousAttach = nt(tt, et) + } + function detach(tt, et, nt) { + var rt, it + if (is$1.str(nt)) { + const { target: ot, key: at } = resolve(tt, nt), + st = et.__r3f.previousAttach + st === void 0 ? delete ot[at] : (ot[at] = st) + } else (rt = et.__r3f) == null || rt.previousAttach == null || rt.previousAttach(tt, et) + ;(it = et.__r3f) == null || delete it.previousAttach + } + function diffProps( + tt, + { children: et, key: nt, ref: rt, ...it }, + { children: ot, key: at, ref: st, ...lt } = {}, + ct = !1, + ) { + var ut + const ht = (ut = tt == null ? void 0 : tt.__r3f) != null ? ut : {}, + dt = Object.entries(it), + pt = [] + if (ct) { + const gt = Object.keys(lt) + for (let yt = 0; yt < gt.length; yt++) it.hasOwnProperty(gt[yt]) || dt.unshift([gt[yt], DEFAULT + 'remove']) } - - .react-dropdown-select-item-selected { - background: ${colors.white}; - color: ${colors.primaryBlueBorder}; - border: none; + dt.forEach(([gt, yt]) => { + var bt + if (((bt = tt.__r3f) != null && bt.primitive && gt === 'object') || is$1.equ(yt, lt[gt])) return + if (/^on(Pointer|Click|DoubleClick|ContextMenu|Wheel)/.test(gt)) return pt.push([gt, yt, !0, []]) + let vt = [] + gt.includes('-') && (vt = gt.split('-')), pt.push([gt, yt, !1, vt]) + for (const xt in it) { + const kt = it[xt] + xt.startsWith(`${gt}-`) && pt.push([xt, kt, !1, xt.split('-')]) + } + }) + const mt = { ...it } + return ( + ht.memoizedProps && ht.memoizedProps.args && (mt.args = ht.memoizedProps.args), + ht.memoizedProps && ht.memoizedProps.attach && (mt.attach = ht.memoizedProps.attach), + { memoized: mt, changes: pt } + ) + } + const __DEV__ = typeof process < 'u' && !1 + function applyProps$1(tt, et) { + var nt, rt, it + const ot = (nt = tt.__r3f) != null ? nt : {}, + at = ot.root, + st = (rt = at == null || at.getState == null ? void 0 : at.getState()) != null ? rt : {}, + { memoized: lt, changes: ct } = isDiffSet(et) ? et : diffProps(tt, et), + ut = ot.eventCount + tt.__r3f && (tt.__r3f.memoizedProps = lt) + for (let dt = 0; dt < ct.length; dt++) { + let [pt, mt, gt, yt] = ct[dt] + if (hasColorSpace(tt)) { + const kt = 'srgb', + St = 'srgb-linear' + pt === 'encoding' + ? ((pt = 'colorSpace'), (mt = mt === 3001 ? kt : St)) + : pt === 'outputEncoding' && ((pt = 'outputColorSpace'), (mt = mt === 3001 ? kt : St)) + } + let bt = tt, + vt = bt[pt] + if (yt.length && ((vt = yt.reduce((xt, kt) => xt[kt], tt)), !(vt && vt.set))) { + const [xt, ...kt] = yt.reverse() + ;(bt = kt.reverse().reduce((St, Tt) => St[Tt], tt)), (pt = xt) + } + if (mt === DEFAULT + 'remove') + if (bt.constructor) { + let xt = DEFAULTS.get(bt.constructor) + xt || ((xt = new bt.constructor()), DEFAULTS.set(bt.constructor, xt)), (mt = xt[pt]) + } else mt = 0 + if (gt) mt ? (ot.handlers[pt] = mt) : delete ot.handlers[pt], (ot.eventCount = Object.keys(ot.handlers).length) + else if (vt && vt.set && (vt.copy || vt instanceof Layers)) { + if (Array.isArray(mt)) vt.fromArray ? vt.fromArray(mt) : vt.set(...mt) + else if ( + vt.copy && + mt && + mt.constructor && + (__DEV__ ? vt.constructor.name === mt.constructor.name : vt.constructor === mt.constructor) + ) + vt.copy(mt) + else if (mt !== void 0) { + const xt = vt instanceof Color$1 + !xt && vt.setScalar + ? vt.setScalar(mt) + : vt instanceof Layers && mt instanceof Layers + ? (vt.mask = mt.mask) + : vt.set(mt), + !getColorManagement() && !st.linear && xt && vt.convertSRGBToLinear() + } + } else if ( + ((bt[pt] = mt), bt[pt] instanceof Texture && bt[pt].format === RGBAFormat && bt[pt].type === UnsignedByteType) + ) { + const xt = bt[pt] + hasColorSpace(xt) && hasColorSpace(st.gl) + ? (xt.colorSpace = st.gl.outputColorSpace) + : (xt.encoding = st.gl.outputEncoding) + } + invalidateInstance(tt) } + if (ot.parent && st.internal && tt.raycast && ut !== ot.eventCount) { + const dt = st.internal.interaction.indexOf(tt) + dt > -1 && st.internal.interaction.splice(dt, 1), ot.eventCount && st.internal.interaction.push(tt) + } + return ( + !(ct.length === 1 && ct[0][0] === 'onUpdate') && + ct.length && + (it = tt.__r3f) != null && + it.parent && + updateInstance(tt), + tt + ) } -`;function FaCheck(tt){return GenIcon({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M173.898 439.404l-166.4-166.4c-9.997-9.997-9.997-26.206 0-36.204l36.203-36.204c9.997-9.998 26.207-9.998 36.204 0L192 312.69 432.095 72.596c9.997-9.997 26.207-9.997 36.204 0l36.203 36.204c9.997 9.997 9.997 26.206 0 36.204l-294.4 294.401c-9.998 9.997-26.207 9.997-36.204-.001z"}}]})(tt)}function FaRegQuestionCircle(tt){return GenIcon({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M256 8C119.043 8 8 119.083 8 256c0 136.997 111.043 248 248 248s248-111.003 248-248C504 119.083 392.957 8 256 8zm0 448c-110.532 0-200-89.431-200-200 0-110.495 89.472-200 200-200 110.491 0 200 89.471 200 200 0 110.53-89.431 200-200 200zm107.244-255.2c0 67.052-72.421 68.084-72.421 92.863V300c0 6.627-5.373 12-12 12h-45.647c-6.627 0-12-5.373-12-12v-8.659c0-35.745 27.1-50.034 47.579-61.516 17.561-9.845 28.324-16.541 28.324-29.579 0-17.246-21.999-28.693-39.784-28.693-23.189 0-33.894 10.977-48.942 29.969-4.057 5.12-11.46 6.071-16.666 2.124l-27.824-21.098c-5.107-3.872-6.251-11.066-2.644-16.363C184.846 131.491 214.94 112 261.794 112c49.071 0 101.45 38.304 101.45 88.8zM298 368c0 23.159-18.841 42-42 42s-42-18.841-42-42 18.841-42 42-42 42 18.841 42 42z"}}]})(tt)}const defaultProps$5={colorName:"black",disabled:!1,maxLength:524288,placeholder:"",placeholderTextColor:"gray100",returnKeyType:"done",textAlign:"left",type:"text"},WebTextArea=styled$4.textarea` - -webkit-appearance: none; - -webkit-text-fill-color: ${({colorName:tt})=>colors[tt]}; - background: transparent; - border: none; - color: ${({colorName:tt})=>colors[tt]}; - cursor: ${({disabled:tt})=>tt?"default":"text"}; - margin: 0; - opacity: 1; - outline: 0; - padding: 0; - text-align: ${({textAlign:tt})=>tt}; - resize: none; - - &:focus { - border: none; - box-shadow: none; - outline: none; + function invalidateInstance(tt) { + var et, nt + const rt = (et = tt.__r3f) == null || (nt = et.root) == null || nt.getState == null ? void 0 : nt.getState() + rt && rt.internal.frames === 0 && rt.invalidate() } - - &::placeholder { - -webkit-text-fill-color: ${({placeholderTextColor:tt})=>colors[tt]}; - color: ${({placeholderTextColor:tt})=>colors[tt]}; + function updateInstance(tt) { + tt.onUpdate == null || tt.onUpdate(tt) } -`;WebTextArea.displayName="WebTextInput";const BaseTextArea=reactExports.forwardRef(({autoFocus:tt,className:et,colorName:nt=defaultProps$5.colorName,defaultValue:rt,disabled:it=defaultProps$5.disabled,id:ot,maxLength:at=defaultProps$5.maxLength,name:st,onBlur:lt,onChange:ct,onFocus:ut,onKeyDown:ht,placeholder:dt=defaultProps$5.placeholder,placeholderTextColor:pt=defaultProps$5.placeholderTextColor,textAlign:mt=defaultProps$5.textAlign,value:gt},yt)=>{const bt=reactExports.useCallback(vt=>{ct&&ct(vt.target.value)},[ct]);return jsxRuntimeExports.jsx(WebTextArea,{ref:yt,autoFocus:tt,className:et,colorName:nt,defaultValue:rt,disabled:it,id:ot,maxLength:at,name:st,onBlur:lt,onChange:bt,onFocus:ut,onKeyDown:ht,placeholder:dt,placeholderTextColor:pt,textAlign:mt,value:gt})});BaseTextArea.displayName="BaseTextArea";const Wrapper$r=styled$4(Flex).attrs({background:"inputBg2",px:8,py:12})` - border-radius: 8px; -`,TextArea=({id:tt,label:et,message:nt,name:rt,rules:it,...ot})=>{const{control:at,formState:{errors:st}}=useFormContext(),lt=get$5(st,rt);return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs(Flex,{align:"center",direction:"row",pb:4,pl:4,children:[jsxRuntimeExports.jsx(Label$3,{htmlFor:tt,children:et}),jsxRuntimeExports.jsxs(QuestionIcon$2,{role:"tooltip",children:[jsxRuntimeExports.jsx(FaRegQuestionCircle,{color:colors.secondaryText4}),jsxRuntimeExports.jsx("div",{className:"tooltip",children:nt})]})]}),jsxRuntimeExports.jsx(Wrapper$r,{children:jsxRuntimeExports.jsx(Controller,{control:at,name:rt,render:({field:{onBlur:ct,onChange:ut,value:ht}})=>jsxRuntimeExports.jsx(BaseTextArea,{...ot,colorName:"white",id:tt,name:rt,onBlur:ct,onChange:ut,placeholderTextColor:"inputPlaceholder",value:ht||""}),rules:it})}),lt&&jsxRuntimeExports.jsx(Flex,{pl:4,pt:8,shrink:1,tabIndex:0,children:jsxRuntimeExports.jsx(Text$3,{color:"primaryRed",kind:"regularBold",children:jsxRuntimeExports.jsxs(Flex,{align:"center",direction:"row",shrink:1,children:[jsxRuntimeExports.jsx(MdError,{}),jsxRuntimeExports.jsx(Flex,{pl:4,shrink:1,children:lt.message})]})})})]})},QuestionIcon$2=styled$4(Flex)` - cursor: default; - margin-left: 6px; - position: relative; - - .tooltip { - position: absolute; - background-color: ${colors.dashboardHeader}; - border: 1px solid ${colors.secondaryText4}; - border-radius: 4px; - color: ${colors.white}; - top: 22px; - padding: 4px 8px; - font-size: 13px; - visibility: hidden; - width: 175px; + function updateCamera(tt, et) { + tt.manual || + (isOrthographicCamera$1(tt) + ? ((tt.left = et.width / -2), (tt.right = et.width / 2), (tt.top = et.height / 2), (tt.bottom = et.height / -2)) + : (tt.aspect = et.width / et.height), + tt.updateProjectionMatrix(), + tt.updateMatrixWorld()) } - - &:hover .tooltip { - visibility: visible; + function makeId(tt) { + return (tt.eventObject || tt.object).uuid + '/' + tt.index + tt.instanceId } - - &:focus .tooltip { - visibility: visible; + function getEventPriority() { + var tt + const et = (typeof self < 'u' && self) || (typeof window < 'u' && window) + if (!et) return constantsExports.DefaultEventPriority + switch ((tt = et.event) == null ? void 0 : tt.type) { + case 'click': + case 'contextmenu': + case 'dblclick': + case 'pointercancel': + case 'pointerdown': + case 'pointerup': + return constantsExports.DiscreteEventPriority + case 'pointermove': + case 'pointerout': + case 'pointerover': + case 'pointerenter': + case 'pointerleave': + case 'wheel': + return constantsExports.ContinuousEventPriority + default: + return constantsExports.DefaultEventPriority + } } -`,Label$3=styled$4.label` - color: ${colors.lightGray}; - font-size: 14px; - font-weight: 600; -`,message$5="Submit Text",Document=()=>jsxRuntimeExports.jsx(Flex,{children:jsxRuntimeExports.jsx(TextArea,{id:"cy-text-id",label:"Text",maxLength:50,message:message$5,name:"document",placeholder:"Type your text here...",rules:{...requiredRule$1}})});var reactInputMask={exports:{}},reactInputMask_production_min={exports:{}},invariant$1=function(tt,et,nt,rt,it,ot,at,st){if(!tt){var lt;if(et===void 0)lt=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var ct=[nt,rt,it,ot,at,st],ut=0;lt=new Error(et.replace(/%s/g,function(){return ct[ut++]})),lt.name="Invariant Violation"}throw lt.framesToPop=1,lt}},browser=invariant$1;const invariant$2=getDefaultExportFromCjs(browser);function t$1(tt){return tt&&typeof tt=="object"&&"default"in tt?tt.default:tt}var e$1=reactExports,n$1=t$1(e$1),i$3=reactDomExports,r$2=t$1(browser);function a$1(){return(a$1=Object.assign||function(tt){for(var et=1;et=0||(it[nt]=tt[nt]);return it}function u(tt){return requestAnimationFrame(tt)}function s$1(tt){cancelAnimationFrame(tt)}function c$3(tt){var et=tt.ownerDocument;return et.hasFocus()&&et.activeElement===tt}function f$1(tt){return tt==null?void 0:tt.ownerDocument}function h$2(tt){var et=function(nt){var rt;return(rt=f$1(nt))==null?void 0:rt.defaultView}(tt);return!!et&&tt instanceof et.HTMLElement}function g$1(tt){return e$1.useCallback(function(){var et=tt.current,nt=typeof window<"u"&&h$2(et);if(!et||!nt)return null;if(et.nodeName!=="INPUT"&&(et=et.querySelector("input")),!et)throw new Error("react-input-mask: inputComponent doesn't contain input node");return et},[tt])}function v$2(tt,et){var nt,rt,it,ot,at=e$1.useRef({start:null,end:null}),st=g$1(tt),lt=e$1.useCallback(function(){return function(gt){var yt=gt.selectionStart,bt=gt.selectionEnd;return{start:yt,end:bt,length:bt-yt}}(st())},[st]),ct=e$1.useCallback(function(){return at.current},[]),ut=e$1.useCallback(function(gt){var yt=st();yt&&c$3(yt)&&(function(bt,vt,xt){xt===void 0&&(xt=vt),bt.setSelectionRange(vt,xt)}(yt,gt.start,gt.end),at.current=lt())},[st,lt]),ht=e$1.useCallback(function(){at.current=lt()},[lt]),dt=(nt=ht,rt=e$1.useRef(null),it=e$1.useCallback(function(){rt.current===null&&function gt(){nt(),rt.current=u(gt)}()},[nt]),ot=e$1.useCallback(function(){s$1(rt.current),rt.current=null},[]),e$1.useEffect(function(){rt.current&&(ot(),it())},[it,ot]),e$1.useEffect(s$1,[]),[it,ot]),pt=dt[0],mt=dt[1];return e$1.useLayoutEffect(function(){if(et){var gt=st();return gt.addEventListener("focus",pt),gt.addEventListener("blur",mt),c$3(gt)&&pt(),function(){gt.removeEventListener("focus",pt),gt.removeEventListener("blur",mt),mt()}}}),{getSelection:lt,getLastSelection:ct,setSelection:ut}}function d$1(tt,et){var nt=e$1.useRef(),rt=v$2(nt,et),it=rt.getSelection,ot=rt.getLastSelection,at=rt.setSelection,st=function(ht,dt){var pt=g$1(ht),mt=e$1.useRef(dt);return{getValue:e$1.useCallback(function(){return pt().value},[pt]),getLastValue:e$1.useCallback(function(){return mt.current},[]),setValue:e$1.useCallback(function(gt){mt.current=gt;var yt=pt();yt&&(yt.value=gt)},[pt])}}(nt,tt),lt=st.getValue,ct=st.getLastValue,ut=st.setValue;return{inputRef:nt,getInputState:function(){return{value:lt(),selection:it()}},getLastInputState:function(){return{value:ct(),selection:ot()}},setInputState:function(ht){var dt=ht.value,pt=ht.selection;ut(dt),at(pt)}}}var p$2=["disabled","onBlur","onChange","onFocus","onMouseDown","readOnly","value"],m$2={9:/[0-9]/,a:/[A-Za-z]/,"*":/[A-Za-z0-9]/},P$1=function(tt){var et=this;this.isCharacterAllowedAtPosition=function(nt,rt){var it=et.maskOptions.maskPlaceholder;return!!et.isCharacterFillingPosition(nt,rt)||!!it&&it[rt]===nt},this.isCharacterFillingPosition=function(nt,rt){var it=et.maskOptions.mask;if(!nt||rt>=it.length)return!1;if(!et.isPositionEditable(rt))return it[rt]===nt;var ot=it[rt];return new RegExp(ot).test(nt)},this.isPositionEditable=function(nt){var rt=et.maskOptions,it=rt.mask,ot=rt.permanents;return nt=0;ot--)if(it(rt[ot],ot))return ot;return-1}(nt.split(""),function(rt,it){return et.isPositionEditable(it)&&et.isCharacterFillingPosition(rt,it)})+1},this.getStringFillingLengthAtPosition=function(nt,rt){return nt.split("").reduce(function(it,ot){return et.insertCharacterAtPosition(it,ot,it.length)},function(it,ot){ot===void 0&&(ot=1);for(var at="",st=0;st=0;rt--)if(et.isPositionEditable(rt))return rt;return null},this.getRightEditablePosition=function(nt){for(var rt=et.maskOptions.mask,it=nt;it=ot&&!dt?"":ht=ot?ut:dt?st?st[ht]:"":lt[ht]}).join("");return et.formatValue(ct)},this.insertCharacterAtPosition=function(nt,rt,it){var ot=et.maskOptions,at=ot.mask,st=ot.maskPlaceholder;if(it>=at.length)return nt;var lt=et.isCharacterAllowedAtPosition(rt,it),ct=et.isPositionEditable(it),ut=et.getRightEditablePosition(it),ht=st&&ut?rt===st[ut]:null,dt=nt.slice(0,it);return!lt&&ct||(nt=dt+(lt?rt:at[it])),lt||ct||ht||(nt=et.insertCharacterAtPosition(nt,rt,it+1)),nt},this.insertStringAtPosition=function(nt,rt,it){var ot=et.maskOptions,at=ot.mask,st=ot.maskPlaceholder;if(!rt||it>=at.length)return nt;var lt=rt.split(""),ct=et.isValueFilled(nt)||!!st,ut=nt.slice(it);return nt=lt.reduce(function(ht,dt){return et.insertCharacterAtPosition(ht,dt,ht.length)},nt.slice(0,it)),ct?nt+=ut.slice(nt.length-it):et.isValueFilled(nt)?nt+=at.slice(nt.length).join(""):nt=ut.split("").filter(function(ht,dt){return et.isPositionEditable(it+dt)}).reduce(function(ht,dt){var pt=et.getRightEditablePosition(ht.length);return pt===null?ht:(et.isPositionEditable(ht.length)||(ht+=at.slice(ht.length,pt).join("")),et.insertCharacterAtPosition(ht,dt,ht.length))},nt),nt},this.processChange=function(nt,rt){var it=et.maskOptions,ot=it.mask,at=it.prefix,st=it.lastEditablePosition,lt=nt.value,ct=nt.selection,ut=rt.value,ht=rt.selection,dt=lt,pt="",mt=0,gt=0,yt=Math.min(ht.start,ct.start);return ct.end>ht.start?(pt=dt.slice(ht.start,ct.end),gt=(mt=et.getStringFillingLengthAtPosition(pt,yt))?ht.length:0):dt.length=ot.length?yt=ot.length:yt=at.length&&ytcolors[tt]}; - background: transparent; - border: none; - color: ${({colorName:tt})=>colors[tt]}; - cursor: ${({disabled:tt})=>tt?"default":"text"}; - margin: 0; - opacity: 1; - outline: 0; - padding: 0; - text-align: ${({textAlign:tt})=>tt}; - - ${whiteAutofill} - - &:focus { - border: none; - box-shadow: none; - outline: none; + function removeInteractivity(tt, et) { + const { internal: nt } = tt.getState() + ;(nt.interaction = nt.interaction.filter((rt) => rt !== et)), + (nt.initialHits = nt.initialHits.filter((rt) => rt !== et)), + nt.hovered.forEach((rt, it) => { + ;(rt.eventObject === et || rt.object === et) && nt.hovered.delete(it) + }), + nt.capturedMap.forEach((rt, it) => { + releaseInternalPointerCapture(nt.capturedMap, et, rt, it) + }) } - - &[type='number'] { - appearance: textfield; - -webkit-appearance: textfield; - - &::-webkit-outer-spin-button, - &::-webkit-inner-spin-button { - appearance: none; - -webkit-appearance: none; + function createEvents(tt) { + function et(lt) { + const { internal: ct } = tt.getState(), + ut = lt.offsetX - ct.initialClick[0], + ht = lt.offsetY - ct.initialClick[1] + return Math.round(Math.sqrt(ut * ut + ht * ht)) + } + function nt(lt) { + return lt.filter((ct) => + ['Move', 'Over', 'Enter', 'Out', 'Leave'].some((ut) => { + var ht + return (ht = ct.__r3f) == null ? void 0 : ht.handlers['onPointer' + ut] + }), + ) + } + function rt(lt, ct) { + const ut = tt.getState(), + ht = new Set(), + dt = [], + pt = ct ? ct(ut.internal.interaction) : ut.internal.interaction + for (let bt = 0; bt < pt.length; bt++) { + const vt = getRootState(pt[bt]) + vt && (vt.raycaster.camera = void 0) + } + ut.previousRoot || ut.events.compute == null || ut.events.compute(lt, ut) + function mt(bt) { + const vt = getRootState(bt) + if (!vt || !vt.events.enabled || vt.raycaster.camera === null) return [] + if (vt.raycaster.camera === void 0) { + var xt + vt.events.compute == null || + vt.events.compute(lt, vt, (xt = vt.previousRoot) == null ? void 0 : xt.getState()), + vt.raycaster.camera === void 0 && (vt.raycaster.camera = null) + } + return vt.raycaster.camera ? vt.raycaster.intersectObject(bt, !0) : [] + } + let gt = pt + .flatMap(mt) + .sort((bt, vt) => { + const xt = getRootState(bt.object), + kt = getRootState(vt.object) + return !xt || !kt + ? bt.distance - vt.distance + : kt.events.priority - xt.events.priority || bt.distance - vt.distance + }) + .filter((bt) => { + const vt = makeId(bt) + return ht.has(vt) ? !1 : (ht.add(vt), !0) + }) + ut.events.filter && (gt = ut.events.filter(gt, ut)) + for (const bt of gt) { + let vt = bt.object + for (; vt; ) { + var yt + ;(yt = vt.__r3f) != null && yt.eventCount && dt.push({ ...bt, eventObject: vt }), (vt = vt.parent) + } + } + if ('pointerId' in lt && ut.internal.capturedMap.has(lt.pointerId)) + for (let bt of ut.internal.capturedMap.get(lt.pointerId).values()) + ht.has(makeId(bt.intersection)) || dt.push(bt.intersection) + return dt + } + function it(lt, ct, ut, ht) { + const dt = tt.getState() + if (lt.length) { + const pt = { stopped: !1 } + for (const mt of lt) { + const gt = getRootState(mt.object) || dt, + { raycaster: yt, pointer: bt, camera: vt, internal: xt } = gt, + kt = new Vector3(bt.x, bt.y, 0).unproject(vt), + St = (Dt) => { + var jt, Pt + return (jt = (Pt = xt.capturedMap.get(Dt)) == null ? void 0 : Pt.has(mt.eventObject)) != null ? jt : !1 + }, + Tt = (Dt) => { + const jt = { intersection: mt, target: ct.target } + xt.capturedMap.has(Dt) + ? xt.capturedMap.get(Dt).set(mt.eventObject, jt) + : xt.capturedMap.set(Dt, new Map([[mt.eventObject, jt]])), + ct.target.setPointerCapture(Dt) + }, + At = (Dt) => { + const jt = xt.capturedMap.get(Dt) + jt && releaseInternalPointerCapture(xt.capturedMap, mt.eventObject, jt, Dt) + } + let Et = {} + for (let Dt in ct) { + let jt = ct[Dt] + typeof jt != 'function' && (Et[Dt] = jt) + } + let $t = { + ...mt, + ...Et, + pointer: bt, + intersections: lt, + stopped: pt.stopped, + delta: ut, + unprojectedPoint: kt, + ray: yt.ray, + camera: vt, + stopPropagation() { + const Dt = 'pointerId' in ct && xt.capturedMap.get(ct.pointerId) + if ( + (!Dt || Dt.has(mt.eventObject)) && + (($t.stopped = pt.stopped = !0), + xt.hovered.size && Array.from(xt.hovered.values()).find((jt) => jt.eventObject === mt.eventObject)) + ) { + const jt = lt.slice(0, lt.indexOf(mt)) + ot([...jt, mt]) + } + }, + target: { hasPointerCapture: St, setPointerCapture: Tt, releasePointerCapture: At }, + currentTarget: { hasPointerCapture: St, setPointerCapture: Tt, releasePointerCapture: At }, + nativeEvent: ct, + } + if ((ht($t), pt.stopped === !0)) break + } + } + return lt + } + function ot(lt) { + const { internal: ct } = tt.getState() + for (const ut of ct.hovered.values()) + if ( + !lt.length || + !lt.find((ht) => ht.object === ut.object && ht.index === ut.index && ht.instanceId === ut.instanceId) + ) { + const dt = ut.eventObject.__r3f, + pt = dt == null ? void 0 : dt.handlers + if ((ct.hovered.delete(makeId(ut)), dt != null && dt.eventCount)) { + const mt = { ...ut, intersections: lt } + pt.onPointerOut == null || pt.onPointerOut(mt), pt.onPointerLeave == null || pt.onPointerLeave(mt) + } + } + } + function at(lt, ct) { + for (let ut = 0; ut < ct.length; ut++) { + const ht = ct[ut].__r3f + ht == null || ht.handlers.onPointerMissed == null || ht.handlers.onPointerMissed(lt) + } + } + function st(lt) { + switch (lt) { + case 'onPointerLeave': + case 'onPointerCancel': + return () => ot([]) + case 'onLostPointerCapture': + return (ct) => { + const { internal: ut } = tt.getState() + 'pointerId' in ct && + ut.capturedMap.has(ct.pointerId) && + requestAnimationFrame(() => { + ut.capturedMap.has(ct.pointerId) && (ut.capturedMap.delete(ct.pointerId), ot([])) + }) + } + } + return function (ut) { + const { onPointerMissed: ht, internal: dt } = tt.getState() + dt.lastEvent.current = ut + const pt = lt === 'onPointerMove', + mt = lt === 'onClick' || lt === 'onContextMenu' || lt === 'onDoubleClick', + yt = rt(ut, pt ? nt : void 0), + bt = mt ? et(ut) : 0 + lt === 'onPointerDown' && + ((dt.initialClick = [ut.offsetX, ut.offsetY]), (dt.initialHits = yt.map((xt) => xt.eventObject))), + mt && !yt.length && bt <= 2 && (at(ut, dt.interaction), ht && ht(ut)), + pt && ot(yt) + function vt(xt) { + const kt = xt.eventObject, + St = kt.__r3f, + Tt = St == null ? void 0 : St.handlers + if (St != null && St.eventCount) + if (pt) { + if (Tt.onPointerOver || Tt.onPointerEnter || Tt.onPointerOut || Tt.onPointerLeave) { + const At = makeId(xt), + Et = dt.hovered.get(At) + Et + ? Et.stopped && xt.stopPropagation() + : (dt.hovered.set(At, xt), + Tt.onPointerOver == null || Tt.onPointerOver(xt), + Tt.onPointerEnter == null || Tt.onPointerEnter(xt)) + } + Tt.onPointerMove == null || Tt.onPointerMove(xt) + } else { + const At = Tt[lt] + At + ? (!mt || dt.initialHits.includes(kt)) && + (at( + ut, + dt.interaction.filter((Et) => !dt.initialHits.includes(Et)), + ), + At(xt)) + : mt && + dt.initialHits.includes(kt) && + at( + ut, + dt.interaction.filter((Et) => !dt.initialHits.includes(Et)), + ) + } + } + it(yt, ut, bt, vt) + } + } + return { handlePointer: st } + } + const privateKeys = [ + 'set', + 'get', + 'setSize', + 'setFrameloop', + 'setDpr', + 'events', + 'invalidate', + 'advance', + 'size', + 'viewport', + ], + isRenderer = (tt) => !!(tt != null && tt.render), + context$2 = reactExports.createContext(null), + createStore$1 = (tt, et) => { + const nt = create$2((st, lt) => { + const ct = new Vector3(), + ut = new Vector3(), + ht = new Vector3() + function dt(bt = lt().camera, vt = ut, xt = lt().size) { + const { width: kt, height: St, top: Tt, left: At } = xt, + Et = kt / St + vt instanceof Vector3 ? ht.copy(vt) : ht.set(...vt) + const $t = bt.getWorldPosition(ct).distanceTo(ht) + if (isOrthographicCamera$1(bt)) + return { + width: kt / bt.zoom, + height: St / bt.zoom, + top: Tt, + left: At, + factor: 1, + distance: $t, + aspect: Et, + } + { + const Dt = (bt.fov * Math.PI) / 180, + jt = 2 * Math.tan(Dt / 2) * $t, + Pt = jt * (kt / St) + return { width: Pt, height: jt, top: Tt, left: At, factor: kt / Pt, distance: $t, aspect: Et } + } + } + let pt + const mt = (bt) => st((vt) => ({ performance: { ...vt.performance, current: bt } })), + gt = new Vector2() + return { + set: st, + get: lt, + gl: null, + camera: null, + raycaster: null, + events: { priority: 1, enabled: !0, connected: !1 }, + xr: null, + scene: null, + invalidate: (bt = 1) => tt(lt(), bt), + advance: (bt, vt) => et(bt, vt, lt()), + legacy: !1, + linear: !1, + flat: !1, + controls: null, + clock: new Clock$1(), + pointer: gt, + mouse: gt, + frameloop: 'always', + onPointerMissed: void 0, + performance: { + current: 1, + min: 0.5, + max: 1, + debounce: 200, + regress: () => { + const bt = lt() + pt && clearTimeout(pt), + bt.performance.current !== bt.performance.min && mt(bt.performance.min), + (pt = setTimeout(() => mt(lt().performance.max), bt.performance.debounce)) + }, + }, + size: { width: 0, height: 0, top: 0, left: 0, updateStyle: !1 }, + viewport: { + initialDpr: 0, + dpr: 0, + width: 0, + height: 0, + top: 0, + left: 0, + aspect: 0, + distance: 0, + factor: 0, + getCurrentViewport: dt, + }, + setEvents: (bt) => st((vt) => ({ ...vt, events: { ...vt.events, ...bt } })), + setSize: (bt, vt, xt, kt, St) => { + const Tt = lt().camera, + At = { width: bt, height: vt, top: kt || 0, left: St || 0, updateStyle: xt } + st((Et) => ({ size: At, viewport: { ...Et.viewport, ...dt(Tt, ut, At) } })) + }, + setDpr: (bt) => + st((vt) => { + const xt = calculateDpr(bt) + return { viewport: { ...vt.viewport, dpr: xt, initialDpr: vt.viewport.initialDpr || xt } } + }), + setFrameloop: (bt = 'always') => { + const vt = lt().clock + vt.stop(), + (vt.elapsedTime = 0), + bt !== 'never' && (vt.start(), (vt.elapsedTime = 0)), + st(() => ({ frameloop: bt })) + }, + previousRoot: void 0, + internal: { + active: !1, + priority: 0, + frames: 0, + lastEvent: reactExports.createRef(), + interaction: [], + hovered: new Map(), + subscribers: [], + initialClick: [0, 0], + initialHits: [], + capturedMap: new Map(), + subscribe: (bt, vt, xt) => { + const kt = lt().internal + return ( + (kt.priority = kt.priority + (vt > 0 ? 1 : 0)), + kt.subscribers.push({ ref: bt, priority: vt, store: xt }), + (kt.subscribers = kt.subscribers.sort((St, Tt) => St.priority - Tt.priority)), + () => { + const St = lt().internal + St != null && + St.subscribers && + ((St.priority = St.priority - (vt > 0 ? 1 : 0)), + (St.subscribers = St.subscribers.filter((Tt) => Tt.ref !== bt))) + } + ) + }, + }, + } + }), + rt = nt.getState() + let it = rt.size, + ot = rt.viewport.dpr, + at = rt.camera + return ( + nt.subscribe(() => { + const { camera: st, size: lt, viewport: ct, gl: ut, set: ht } = nt.getState() + if (lt !== it || ct.dpr !== ot) { + var dt + ;(it = lt), (ot = ct.dpr), updateCamera(st, lt), ut.setPixelRatio(ct.dpr) + const pt = + (dt = lt.updateStyle) != null + ? dt + : typeof HTMLCanvasElement < 'u' && ut.domElement instanceof HTMLCanvasElement + ut.setSize(lt.width, lt.height, pt) + } + st !== at && + ((at = st), ht((pt) => ({ viewport: { ...pt.viewport, ...pt.viewport.getCurrentViewport(st) } }))) + }), + nt.subscribe((st) => tt(st)), + nt + ) + } + function createSubs(tt, et) { + const nt = { callback: tt } + return et.add(nt), () => void et.delete(nt) + } + let i$2, + globalEffects = new Set(), + globalAfterEffects = new Set(), + globalTailEffects = new Set() + const addEffect = (tt) => createSubs(tt, globalEffects), + addAfterEffect = (tt) => createSubs(tt, globalAfterEffects), + addTail = (tt) => createSubs(tt, globalTailEffects) + function run(tt, et) { + if (tt.size) for (const { callback: nt } of tt.values()) nt(et) + } + function flushGlobalEffects(tt, et) { + switch (tt) { + case 'before': + return run(globalEffects, et) + case 'after': + return run(globalAfterEffects, et) + case 'tail': + return run(globalTailEffects, et) + } + } + let subscribers, subscription + function render$1(tt, et, nt) { + let rt = et.clock.getDelta() + for ( + et.frameloop === 'never' && + typeof tt == 'number' && + ((rt = tt - et.clock.elapsedTime), (et.clock.oldTime = et.clock.elapsedTime), (et.clock.elapsedTime = tt)), + subscribers = et.internal.subscribers, + i$2 = 0; + i$2 < subscribers.length; + i$2++ + ) + (subscription = subscribers[i$2]), subscription.ref.current(subscription.store.getState(), rt, nt) + return ( + !et.internal.priority && et.gl.render && et.gl.render(et.scene, et.camera), + (et.internal.frames = Math.max(0, et.internal.frames - 1)), + et.frameloop === 'always' ? 1 : et.internal.frames + ) + } + function createLoop(tt) { + let et = !1, + nt, + rt, + it + function ot(lt) { + ;(rt = requestAnimationFrame(ot)), (et = !0), (nt = 0), flushGlobalEffects('before', lt) + for (const ut of tt.values()) { + var ct + ;(it = ut.store.getState()), + it.internal.active && + (it.frameloop === 'always' || it.internal.frames > 0) && + !((ct = it.gl.xr) != null && ct.isPresenting) && + (nt += render$1(lt, it)) + } + if ((flushGlobalEffects('after', lt), nt === 0)) + return flushGlobalEffects('tail', lt), (et = !1), cancelAnimationFrame(rt) + } + function at(lt, ct = 1) { + var ut + if (!lt) return tt.forEach((ht) => at(ht.store.getState()), ct) + ;((ut = lt.gl.xr) != null && ut.isPresenting) || + !lt.internal.active || + lt.frameloop === 'never' || + ((lt.internal.frames = Math.min(60, lt.internal.frames + ct)), et || ((et = !0), requestAnimationFrame(ot))) + } + function st(lt, ct = !0, ut, ht) { + if ((ct && flushGlobalEffects('before', lt), ut)) render$1(lt, ut, ht) + else for (const dt of tt.values()) render$1(lt, dt.store.getState()) + ct && flushGlobalEffects('after', lt) + } + return { loop: ot, invalidate: at, advance: st } + } + function useInstanceHandle(tt) { + const et = reactExports.useRef(null) + return useIsomorphicLayoutEffect$1(() => void (et.current = tt.current.__r3f), [tt]), et + } + function useStore$1() { + const tt = reactExports.useContext(context$2) + if (!tt) throw new Error('R3F: Hooks can only be used within the Canvas component!') + return tt + } + function useThree(tt = (nt) => nt, et) { + return useStore$1()(tt, et) + } + function useFrame(tt, et = 0) { + const nt = useStore$1(), + rt = nt.getState().internal.subscribe, + it = useMutableCallback(tt) + return useIsomorphicLayoutEffect$1(() => rt(it, et, nt), [et, rt, nt]), null + } + const memoizedLoaders = new WeakMap() + function loadingFn(tt, et) { + return function (nt, ...rt) { + let it = memoizedLoaders.get(nt) + return ( + it || ((it = new nt()), memoizedLoaders.set(nt, it)), + tt && tt(it), + Promise.all( + rt.map( + (ot) => + new Promise((at, st) => + it.load( + ot, + (lt) => { + lt.scene && Object.assign(lt, buildGraph(lt.scene)), at(lt) + }, + et, + (lt) => st(new Error(`Could not load ${ot}: ${lt == null ? void 0 : lt.message}`)), + ), + ), + ), + ).finally(() => (it.dispose == null ? void 0 : it.dispose())) + ) + } + } + function useLoader(tt, et, nt, rt) { + const it = Array.isArray(et) ? et : [et], + ot = suspend$1(loadingFn(nt, rt), [tt, ...it], { equal: is$1.equ }) + return Array.isArray(et) ? ot : ot[0] + } + useLoader.preload = function (tt, et, nt) { + const rt = Array.isArray(et) ? et : [et] + return preload(loadingFn(nt), [tt, ...rt]) + } + useLoader.clear = function (tt, et) { + const nt = Array.isArray(et) ? et : [et] + return clear([tt, ...nt]) + } + const roots = new Map(), + { invalidate, advance } = createLoop(roots), + { reconciler, applyProps } = createRenderer(roots, getEventPriority), + shallowLoose = { objects: 'shallow', strict: !1 }, + createRendererInstance = (tt, et) => { + const nt = typeof tt == 'function' ? tt(et) : tt + return isRenderer(nt) + ? nt + : new WebGLRenderer({ powerPreference: 'high-performance', canvas: et, antialias: !0, alpha: !0, ...tt }) + } + function computeInitialSize(tt, et) { + if (et) return et + if (typeof HTMLCanvasElement < 'u' && tt instanceof HTMLCanvasElement && tt.parentElement) { + const { width: nt, height: rt, top: it, left: ot } = tt.parentElement.getBoundingClientRect() + return { width: nt, height: rt, top: it, left: ot } + } else if (typeof OffscreenCanvas < 'u' && tt instanceof OffscreenCanvas) + return { width: tt.width, height: tt.height, top: 0, left: 0 } + return { width: 0, height: 0, top: 0, left: 0 } + } + function createRoot(tt) { + const et = roots.get(tt), + nt = et == null ? void 0 : et.fiber, + rt = et == null ? void 0 : et.store + et && console.warn('R3F.createRoot should only be called once!') + const it = typeof reportError == 'function' ? reportError : console.error, + ot = rt || createStore$1(invalidate, advance), + at = nt || reconciler.createContainer(ot, constantsExports.ConcurrentRoot, null, !1, null, '', it, null) + et || roots.set(tt, { fiber: at, store: ot }) + let st, + lt = !1, + ct + return { + configure(ut = {}) { + let { + gl: ht, + size: dt, + scene: pt, + events: mt, + onCreated: gt, + shadows: yt = !1, + linear: bt = !1, + flat: vt = !1, + legacy: xt = !1, + orthographic: kt = !1, + frameloop: St = 'always', + dpr: Tt = [1, 2], + performance: At, + raycaster: Et, + camera: $t, + onPointerMissed: Dt, + } = ut, + jt = ot.getState(), + Pt = jt.gl + jt.gl || jt.set({ gl: (Pt = createRendererInstance(ht, tt)) }) + let Ct = jt.raycaster + Ct || jt.set({ raycaster: (Ct = new Raycaster()) }) + const { params: wt, ...It } = Et || {} + if ( + (is$1.equ(It, Ct, shallowLoose) || applyProps(Ct, { ...It }), + is$1.equ(wt, Ct.params, shallowLoose) || applyProps(Ct, { params: { ...Ct.params, ...wt } }), + !jt.camera || (jt.camera === ct && !is$1.equ(ct, $t, shallowLoose))) + ) { + ct = $t + const Mt = $t instanceof Camera, + Ht = Mt ? $t : kt ? new OrthographicCamera(0, 0, 0, 0, 0.1, 1e3) : new PerspectiveCamera(75, 0, 0.1, 1e3) + Mt || + ((Ht.position.z = 5), + $t && applyProps(Ht, $t), + !jt.camera && !($t != null && $t.rotation) && Ht.lookAt(0, 0, 0)), + jt.set({ camera: Ht }) + } + if (!jt.scene) { + let Mt + pt instanceof Scene ? (Mt = pt) : ((Mt = new Scene()), pt && applyProps(Mt, pt)), + jt.set({ scene: prepare(Mt) }) + } + if (!jt.xr) { + var Ot + const Mt = (sn, Kt) => { + const rn = ot.getState() + rn.frameloop !== 'never' && advance(sn, !0, rn, Kt) + }, + Ht = () => { + const sn = ot.getState() + ;(sn.gl.xr.enabled = sn.gl.xr.isPresenting), + sn.gl.xr.setAnimationLoop(sn.gl.xr.isPresenting ? Mt : null), + sn.gl.xr.isPresenting || invalidate(sn) + }, + en = { + connect() { + const sn = ot.getState().gl + sn.xr.addEventListener('sessionstart', Ht), sn.xr.addEventListener('sessionend', Ht) + }, + disconnect() { + const sn = ot.getState().gl + sn.xr.removeEventListener('sessionstart', Ht), sn.xr.removeEventListener('sessionend', Ht) + }, + } + typeof ((Ot = Pt.xr) == null ? void 0 : Ot.addEventListener) == 'function' && en.connect(), jt.set({ xr: en }) + } + if (Pt.shadowMap) { + const Mt = Pt.shadowMap.enabled, + Ht = Pt.shadowMap.type + if (((Pt.shadowMap.enabled = !!yt), is$1.boo(yt))) Pt.shadowMap.type = PCFSoftShadowMap + else if (is$1.str(yt)) { + var Wt + const en = { + basic: BasicShadowMap, + percentage: PCFShadowMap, + soft: PCFSoftShadowMap, + variance: VSMShadowMap, + } + Pt.shadowMap.type = (Wt = en[yt]) != null ? Wt : PCFSoftShadowMap + } else is$1.obj(yt) && Object.assign(Pt.shadowMap, yt) + ;(Mt !== Pt.shadowMap.enabled || Ht !== Pt.shadowMap.type) && (Pt.shadowMap.needsUpdate = !0) + } + const zt = getColorManagement() + zt && ('enabled' in zt ? (zt.enabled = !xt) : 'legacyMode' in zt && (zt.legacyMode = xt)), + applyProps(Pt, { outputEncoding: bt ? 3e3 : 3001, toneMapping: vt ? NoToneMapping : ACESFilmicToneMapping }), + jt.legacy !== xt && jt.set(() => ({ legacy: xt })), + jt.linear !== bt && jt.set(() => ({ linear: bt })), + jt.flat !== vt && jt.set(() => ({ flat: vt })), + ht && !is$1.fun(ht) && !isRenderer(ht) && !is$1.equ(ht, Pt, shallowLoose) && applyProps(Pt, ht), + mt && !jt.events.handlers && jt.set({ events: mt(ot) }) + const Ut = computeInitialSize(tt, dt) + return ( + is$1.equ(Ut, jt.size, shallowLoose) || jt.setSize(Ut.width, Ut.height, Ut.updateStyle, Ut.top, Ut.left), + Tt && jt.viewport.dpr !== calculateDpr(Tt) && jt.setDpr(Tt), + jt.frameloop !== St && jt.setFrameloop(St), + jt.onPointerMissed || jt.set({ onPointerMissed: Dt }), + At && + !is$1.equ(At, jt.performance, shallowLoose) && + jt.set((Mt) => ({ performance: { ...Mt.performance, ...At } })), + (st = gt), + (lt = !0), + this + ) + }, + render(ut) { + return ( + lt || this.configure(), + reconciler.updateContainer( + reactExports.createElement(Provider$2, { store: ot, children: ut, onCreated: st, rootElement: tt }), + at, + null, + () => {}, + ), + ot + ) + }, + unmount() { + unmountComponentAtNode(tt) + }, + } + } + function Provider$2({ store: tt, children: et, onCreated: nt, rootElement: rt }) { + return ( + useIsomorphicLayoutEffect$1(() => { + const it = tt.getState() + it.set((ot) => ({ internal: { ...ot.internal, active: !0 } })), + nt && nt(it), + tt.getState().events.connected || it.events.connect == null || it.events.connect(rt) + }, []), + reactExports.createElement(context$2.Provider, { value: tt }, et) + ) + } + function unmountComponentAtNode(tt, et) { + const nt = roots.get(tt), + rt = nt == null ? void 0 : nt.fiber + if (rt) { + const it = nt == null ? void 0 : nt.store.getState() + it && (it.internal.active = !1), + reconciler.updateContainer(null, rt, null, () => { + it && + setTimeout(() => { + try { + var ot, at, st, lt + it.events.disconnect == null || it.events.disconnect(), + (ot = it.gl) == null || (at = ot.renderLists) == null || at.dispose == null || at.dispose(), + (st = it.gl) == null || st.forceContextLoss == null || st.forceContextLoss(), + (lt = it.gl) != null && lt.xr && it.xr.disconnect(), + dispose(it), + roots.delete(tt), + et && et(tt) + } catch {} + }, 500) + }) } } - - &::placeholder { - -webkit-text-fill-color: ${({placeholderTextColor:tt})=>colors[tt]}; - color: ${({placeholderTextColor:tt})=>colors[tt]}; + function createPortal(tt, et, nt) { + return reactExports.createElement(Portal, { key: et.uuid, children: tt, container: et, state: nt }) } -`;WebTextInput.displayName="WebTextInput";const BaseTextInput=reactExports.forwardRef(({autoCapitalize:tt,autoComplete:et=defaultProps$4.autoComplete,autoFocus:nt,className:rt,colorName:it=defaultProps$4.colorName,defaultValue:ot,disabled:at=defaultProps$4.disabled,id:st,maxLength:lt=defaultProps$4.maxLength,name:ct,onBlur:ut,onChange:ht,onFocus:dt,onKeyDown:pt,placeholder:mt=defaultProps$4.placeholder,placeholderTextColor:gt=defaultProps$4.placeholderTextColor,textAlign:yt=defaultProps$4.textAlign,type:bt=defaultProps$4.type,value:vt},xt)=>{const kt=reactExports.useCallback(St=>{ht&&ht(St.target.value)},[ht]);return jsxRuntimeExports.jsx(WebTextInput,{ref:xt,autoCapitalize:tt,autoComplete:autoCompleteValuesWeb[et],autoFocus:nt,className:rt,colorName:it,defaultValue:ot,disabled:at,id:st,maxLength:lt,name:ct,onBlur:ut,onChange:kt,onFocus:dt,onKeyDown:pt,placeholder:mt,placeholderTextColor:gt,textAlign:yt,type:bt,value:vt})});BaseTextInput.displayName="BaseTextInput";const Wrapper$q=styled$4(Flex).attrs({background:"inputBg2",px:8,py:12})` - border-radius: 8px; -`,TextInput=({id:tt,label:et,mask:nt="",message:rt,name:it,rules:ot,showMask:at=!1,maskPlaceholder:st=null,...lt})=>{const{control:ct,formState:{errors:ut}}=useFormContext(),ht=get$5(ut,it);return jsxRuntimeExports.jsxs(Flex,{shrink:1,children:[jsxRuntimeExports.jsxs(Flex,{align:"center",direction:"row",pb:4,pl:4,children:[jsxRuntimeExports.jsx(Label$2,{htmlFor:tt,children:et}),rt&&jsxRuntimeExports.jsxs(QuestionIcon$1,{name:it,role:"tooltip",children:[jsxRuntimeExports.jsx(FaRegQuestionCircle,{color:colors.secondaryText4}),jsxRuntimeExports.jsx("div",{className:"tooltip",children:rt})]})]}),jsxRuntimeExports.jsx(Wrapper$q,{children:jsxRuntimeExports.jsx(Controller,{control:ct,name:it,render:({field:{onBlur:dt,onChange:pt,value:mt,ref:gt}})=>{const{disabled:yt=defaultProps$4.disabled,textAlign:bt=defaultProps$4.textAlign}=lt;return nt?jsxRuntimeExports.jsx(InputMask,{alwaysShowMask:at,disabled:!1,inputRef:gt,mask:nt,maskPlaceholder:st,onBlur:dt,onChange:pt,value:mt,children:jsxRuntimeExports.jsx(WebTextInput,{colorName:"white",disabled:yt,id:tt,placeholderTextColor:"inputPlaceholder",textAlign:bt})}):jsxRuntimeExports.jsx(BaseTextInput,{...lt,colorName:"white",id:tt,name:it,onBlur:dt,onChange:pt,placeholderTextColor:"inputPlaceholder",value:mt||""})},rules:ot})}),ht&&jsxRuntimeExports.jsx(Flex,{pl:4,pt:8,shrink:1,tabIndex:0,children:jsxRuntimeExports.jsx(Text$3,{color:"primaryRed",kind:"regularBold",children:jsxRuntimeExports.jsxs(Flex,{align:"center",direction:"row",shrink:1,children:[jsxRuntimeExports.jsx(MdError,{fontSize:18}),jsxRuntimeExports.jsx(Flex,{pl:4,shrink:1,children:ht.message})]})})})]})},QuestionIcon$1=styled$4(Flex)` - cursor: default; - margin-left: 6px; - position: relative; - - .tooltip { - position: absolute; - background-color: ${colors.dashboardHeader}; - border: 1px solid ${colors.secondaryText4}; - border-radius: 4px; - color: ${colors.white}; - top: 22px; - padding: 4px 8px; - font-size: 13px; - visibility: hidden; - width: 175px; - z-index: 1; + function Portal({ state: tt = {}, children: et, container: nt }) { + const { events: rt, size: it, ...ot } = tt, + at = useStore$1(), + [st] = reactExports.useState(() => new Raycaster()), + [lt] = reactExports.useState(() => new Vector2()), + ct = reactExports.useCallback( + (ht, dt) => { + const pt = { ...ht } + Object.keys(ht).forEach((gt) => { + ;(privateKeys.includes(gt) || (ht[gt] !== dt[gt] && dt[gt])) && delete pt[gt] + }) + let mt + if (dt && it) { + const gt = dt.camera + ;(mt = ht.viewport.getCurrentViewport(gt, new Vector3(), it)), gt !== ht.camera && updateCamera(gt, it) + } + return { + ...pt, + scene: nt, + raycaster: st, + pointer: lt, + mouse: lt, + previousRoot: at, + events: { ...ht.events, ...(dt == null ? void 0 : dt.events), ...rt }, + size: { ...ht.size, ...it }, + viewport: { ...ht.viewport, ...mt }, + ...ot, + } + }, + [tt], + ), + [ut] = reactExports.useState(() => { + const ht = at.getState() + return create$2((pt, mt) => ({ + ...ht, + scene: nt, + raycaster: st, + pointer: lt, + mouse: lt, + previousRoot: at, + events: { ...ht.events, ...rt }, + size: { ...ht.size, ...it }, + ...ot, + set: pt, + get: mt, + setEvents: (gt) => pt((yt) => ({ ...yt, events: { ...yt.events, ...gt } })), + })) + }) + return ( + reactExports.useEffect(() => { + const ht = at.subscribe((dt) => ut.setState((pt) => ct(dt, pt))) + return () => { + ht(), ut.destroy() + } + }, []), + reactExports.useEffect(() => { + ut.setState((ht) => ct(at.getState(), ht)) + }, [ct]), + reactExports.createElement( + reactExports.Fragment, + null, + reconciler.createPortal(reactExports.createElement(context$2.Provider, { value: ut }, et), ut, null), + ) + ) } - - ${tt=>tt.name==="endTime"&&` - .tooltip { - left: -68px; + reconciler.injectIntoDevTools({ + bundleType: 0, + rendererPackageName: '@react-three/fiber', + version: reactExports.version, + }) + function debounce$3(tt, et, nt) { + var rt, it, ot, at, st + et == null && (et = 100) + function lt() { + var ut = Date.now() - at + ut < et && ut >= 0 + ? (rt = setTimeout(lt, et - ut)) + : ((rt = null), nt || ((st = tt.apply(ot, it)), (ot = it = null))) } - `} - - &:hover .tooltip { - visibility: visible; + var ct = function () { + ;(ot = this), (it = arguments), (at = Date.now()) + var ut = nt && !rt + return rt || (rt = setTimeout(lt, et)), ut && ((st = tt.apply(ot, it)), (ot = it = null)), st + } + return ( + (ct.clear = function () { + rt && (clearTimeout(rt), (rt = null)) + }), + (ct.flush = function () { + rt && ((st = tt.apply(ot, it)), (ot = it = null), clearTimeout(rt), (rt = null)) + }), + ct + ) } - - &:focus .tooltip { - visibility: visible; + debounce$3.debounce = debounce$3 + var debounce_1$1 = debounce$3 + const createDebounce = getDefaultExportFromCjs(debounce_1$1) + function useMeasure(tt) { + let { + debounce: et, + scroll: nt, + polyfill: rt, + offsetSize: it, + } = tt === void 0 ? { debounce: 0, scroll: !1, offsetSize: !1 } : tt + const ot = rt || (typeof window > 'u' ? class {} : window.ResizeObserver) + if (!ot) + throw new Error( + 'This browser does not support ResizeObserver out of the box. See: https://github.com/react-spring/react-use-measure/#resize-observer-polyfills', + ) + const [at, st] = reactExports.useState({ left: 0, top: 0, width: 0, height: 0, bottom: 0, right: 0, x: 0, y: 0 }), + lt = reactExports.useRef({ element: null, scrollContainers: null, resizeObserver: null, lastBounds: at }), + ct = et ? (typeof et == 'number' ? et : et.scroll) : null, + ut = et ? (typeof et == 'number' ? et : et.resize) : null, + ht = reactExports.useRef(!1) + reactExports.useEffect(() => ((ht.current = !0), () => void (ht.current = !1))) + const [dt, pt, mt] = reactExports.useMemo(() => { + const vt = () => { + if (!lt.current.element) return + const { + left: xt, + top: kt, + width: St, + height: Tt, + bottom: At, + right: Et, + x: $t, + y: Dt, + } = lt.current.element.getBoundingClientRect(), + jt = { left: xt, top: kt, width: St, height: Tt, bottom: At, right: Et, x: $t, y: Dt } + lt.current.element instanceof HTMLElement && + it && + ((jt.height = lt.current.element.offsetHeight), (jt.width = lt.current.element.offsetWidth)), + Object.freeze(jt), + ht.current && !areBoundsEqual(lt.current.lastBounds, jt) && st((lt.current.lastBounds = jt)) + } + return [vt, ut ? createDebounce(vt, ut) : vt, ct ? createDebounce(vt, ct) : vt] + }, [st, it, ct, ut]) + function gt() { + lt.current.scrollContainers && + (lt.current.scrollContainers.forEach((vt) => vt.removeEventListener('scroll', mt, !0)), + (lt.current.scrollContainers = null)), + lt.current.resizeObserver && (lt.current.resizeObserver.disconnect(), (lt.current.resizeObserver = null)) + } + function yt() { + lt.current.element && + ((lt.current.resizeObserver = new ot(mt)), + lt.current.resizeObserver.observe(lt.current.element), + nt && + lt.current.scrollContainers && + lt.current.scrollContainers.forEach((vt) => vt.addEventListener('scroll', mt, { capture: !0, passive: !0 }))) + } + const bt = (vt) => { + !vt || + vt === lt.current.element || + (gt(), (lt.current.element = vt), (lt.current.scrollContainers = findScrollContainers(vt)), yt()) + } + return ( + useOnWindowScroll(mt, !!nt), + useOnWindowResize(pt), + reactExports.useEffect(() => { + gt(), yt() + }, [nt, mt, pt]), + reactExports.useEffect(() => gt, []), + [bt, at, dt] + ) } -`,Label$2=styled$4.label` - color: ${colors.lightGray}; - font-size: 14px; - font-weight: 600; -`,message$4="Submit github repository",GithubRepository=()=>jsxRuntimeExports.jsx(Flex,{children:jsxRuntimeExports.jsx(TextInput,{id:"cy-github-repository-id",label:"Github repository",message:message$4,name:"source",placeholder:"Type github repository here...",rules:{...requiredRule$1}})}),message$3="Submit RSS feed",RSSFeed=()=>jsxRuntimeExports.jsx(Flex,{children:jsxRuntimeExports.jsx(TextInput,{id:"cy-rss-feed-id",label:"RSS feed",maxLength:200,message:message$3,name:"source",placeholder:"Type RSS link here...",rules:{...requiredRule$1}})}),latitudeReg=/^(-?\d{1,2}(\.\d+)?|90(\.0+)?)$/,longitudeReg=/^(-?\d{1,3}(\.\d+)?|180(\.0+)?)$/,Location=({setValue:tt})=>{const[et,nt]=reactExports.useState(!1),rt=()=>{tt&&tt("withLocation",!et),nt(!et)},it=at=>{const st=Number(at);return st<-90||st>90?"Latitude must be between -90 and 90.":!st&&st!==0?"Latitude is required.":!0},ot=at=>at<-180||at>180?"Longitude must be between -180 and 180.":!at&&at!==0?"Longitude is required.":!0;return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Flex,{direction:"row",pt:12,children:jsxRuntimeExports.jsxs(CheckBoxWrapper,{children:["Add location",jsxRuntimeExports.jsx("button",{className:"checkbox",id:"add-node-location-checkbox",onClick:rt,type:"button",children:et&&jsxRuntimeExports.jsx(FaCheck,{color:colors.lightBlue500})})]})}),et&&jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsxs(Flex,{direction:"row",pt:12,children:[jsxRuntimeExports.jsx(Flex,{basis:"50%",pr:16,children:jsxRuntimeExports.jsx(TextInput,{id:"add-node-latitude",label:"Latitude",message:"Enter latitude coordinates",name:"latitude",placeholder:"Enter latitude (-90 to 90)",rules:{...requiredRule$1,pattern:{message:"Incorrect longitude format",value:latitudeReg},validate:{latitude:it}}})}),jsxRuntimeExports.jsx(Flex,{basis:"50%",pl:16,children:jsxRuntimeExports.jsx(TextInput,{id:"add-node-location-longitude",label:"Longitude",message:"Enter longitude coordinates",name:"longitude",placeholder:"Enter longitude (-180 to 180)",rules:{...requiredRule$1,pattern:{message:"Incorrect longitude format",value:longitudeReg},validate:{longitude:ot}}})})]})})]})},Wrapper$p=styled$4(Flex).attrs({background:"inputBg2",basis:"25%",px:8,py:12})` - border-radius: 8px; - margin-right: 8px; -`,name="tags",TagInput=({id:tt,label:et,message:nt,rules:rt,...it})=>{const{setValue:ot,getValues:at,clearErrors:st,formState:{errors:lt}}=useFormContext(),ct=get$5(lt,name),[ut,ht]=reactExports.useState(""),dt=at(name),pt=reactExports.useCallback(yt=>{if(yt.type==="keydown"){if(yt.key!=="Enter")return;yt.preventDefault()}if(!ut.trim()||dt&&dt.length===15)return;const bt=new Set([...dt||[],ut]);ot(name,[...bt]),ht(""),st(name)},[ut,ot,dt,st]),mt=reactExports.useCallback(yt=>{if(!dt)return;const bt=dt.findIndex(vt=>vt===yt);dt.splice(bt,1),ot(name,[...dt],{shouldValidate:!0})},[ot,dt]),gt=reactExports.useCallback(yt=>{ht(yt)},[ht]);return jsxRuntimeExports.jsxs(Flex,{shrink:1,children:[jsxRuntimeExports.jsxs(Flex,{align:"center",direction:"row",pb:4,pl:4,children:[jsxRuntimeExports.jsx(Label$1,{htmlFor:tt,children:et}),jsxRuntimeExports.jsxs(QuestionIcon,{role:"tooltip",children:[jsxRuntimeExports.jsx(FaRegQuestionCircle,{color:colors.secondaryText4}),jsxRuntimeExports.jsx("div",{className:"tooltip",children:nt})]})]}),jsxRuntimeExports.jsxs(Flex,{direction:"row",children:[jsxRuntimeExports.jsx(Wrapper$p,{children:jsxRuntimeExports.jsx(Controller,{name,render:()=>jsxRuntimeExports.jsx(BaseTextInput,{...it,colorName:"white",id:tt,name,onChange:gt,onKeyDown:pt,placeholderTextColor:"inputPlaceholder",value:ut||""}),rules:rt})}),jsxRuntimeExports.jsxs(AddTagButton,{onClick:pt,role:"button",tabIndex:0,children:[jsxRuntimeExports.jsx(Text$3,{color:"lightGray",kind:"regular",children:"Add Tag"}),jsxRuntimeExports.jsx(MdAdd,{fontSize:16})]})]}),jsxRuntimeExports.jsx(Flex,{direction:"row",grow:0,pt:8,shrink:1,wrap:"wrap",children:dt==null?void 0:dt.map(yt=>jsxRuntimeExports.jsx(Flex,{pr:4,pt:4,children:jsxRuntimeExports.jsxs(Flex,{align:"center",background:"white",borderRadius:12,direction:"row",px:8,py:4,tabIndex:0,children:[jsxRuntimeExports.jsx(Flex,{children:jsxRuntimeExports.jsx(Text$3,{color:"black",children:yt})}),jsxRuntimeExports.jsx(CloseButton$6,{onClick:()=>mt(yt),role:"button",tabIndex:0,children:jsxRuntimeExports.jsx(MdRemove,{fontSize:12})})]})},yt))}),ct&&jsxRuntimeExports.jsx(Flex,{id:"tag-input-errors",pl:4,pt:8,shrink:1,tabIndex:0,children:jsxRuntimeExports.jsx(Text$3,{color:"primaryRed",kind:"regularBold",children:jsxRuntimeExports.jsxs(Flex,{align:"center",direction:"row",shrink:1,children:[jsxRuntimeExports.jsx(MdError,{fontSize:18}),jsxRuntimeExports.jsx(Flex,{pl:4,shrink:1,children:ct.message})]})})})]})},CloseButton$6=styled$4(Flex)` - cursor: pointer; -`,AddTagButton=styled$4(Flex).attrs({align:"center",borderRadius:8,borderSize:1,direction:"row",px:8,py:8})` - border-color: ${colors.gray500}; - cursor: pointer; - color: ${colors.lightGray}; -`,QuestionIcon=styled$4(Flex)` - cursor: default; - margin-left: 6px; - position: relative; - - .tooltip { - position: absolute; - background-color: ${colors.dashboardHeader}; - border: 1px solid ${colors.secondaryText4}; - border-radius: 4px; - color: ${colors.white}; - top: 22px; - padding: 4px 8px; - font-size: 13px; - visibility: hidden; - width: 250px; + function useOnWindowResize(tt) { + reactExports.useEffect(() => { + const et = tt + return window.addEventListener('resize', et), () => void window.removeEventListener('resize', et) + }, [tt]) } - - &:hover .tooltip { - visibility: visible; + function useOnWindowScroll(tt, et) { + reactExports.useEffect(() => { + if (et) { + const nt = tt + return ( + window.addEventListener('scroll', nt, { capture: !0, passive: !0 }), + () => void window.removeEventListener('scroll', nt, !0) + ) + } + }, [tt, et]) } - - &:focus .tooltip { - visibility: visible; + function findScrollContainers(tt) { + const et = [] + if (!tt || tt === document.body) return et + const { overflow: nt, overflowX: rt, overflowY: it } = window.getComputedStyle(tt) + return ( + [nt, rt, it].some((ot) => ot === 'auto' || ot === 'scroll') && et.push(tt), + [...et, ...findScrollContainers(tt.parentElement)] + ) } -`,Label$1=styled$4.label` - color: ${colors.lightGray}; - font-size: 14px; - font-weight: 600; -`,tagRule={required:{message:"You need to enter at least 1 topic tag to submit a node.",value:!0}},timeRegex=/^\d{2}:\d{2}:\d{2}$/,twitterOrYoutubeRegexOrMp3=/^(?:(?:https?:\/\/)?(?:www\.)?(?:youtube\.com\/(?:watch\?v=|embed\/)|youtu\.be\/)[\w-]{11}(?:\S*)?|(?:https?:\/\/)?(?:www\.)?twitter\.com\/i\/spaces\/\d+.*$|.+\.mp3)$/i,SourceUrl=({setValue:tt,startTime:et})=>{const[nt,rt]=reactExports.useState(!1),it=()=>{tt&&tt("withTimeStamps",!nt),rt(!nt)};return jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsxs(Flex,{children:[jsxRuntimeExports.jsx(TextInput,{id:"add-node-link",label:"Link",message:"Paste a valid YouTube or Twitter Space link here.",name:"link",placeholder:"Paste your link here...",rules:{...requiredRule$1,pattern:{message:"You must enter a valid YouTube, Twitter Space or mp3 link.",value:twitterOrYoutubeRegexOrMp3}}}),jsxRuntimeExports.jsx(Flex,{direction:"row",pt:12,children:jsxRuntimeExports.jsxs(CheckBoxWrapper,{children:["Add timestamps",jsxRuntimeExports.jsx("button",{className:"checkbox",id:"add-node-timestamps-checkbox",onClick:it,type:"button",children:nt&&jsxRuntimeExports.jsx(FaCheck,{color:colors.lightBlue500})})]})}),nt&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs(Flex,{direction:"row",pt:12,children:[jsxRuntimeExports.jsx(Flex,{basis:"50%",pr:16,children:jsxRuntimeExports.jsx(TextInput,{id:"add-node-start-time",label:"Start Time",mask:"99:99:99",maskPlaceholder:"_",message:"Enter start and end timestamps which will encompass the segment of video or audio you want to submit. [hh:mm:ss]",name:"startTime",placeholder:"00:00:00",rules:{...requiredRule$1,pattern:{message:"Timestamp must be in the format hh:mm:ss",value:timeRegex}},showMask:!0})}),jsxRuntimeExports.jsx(Flex,{basis:"50%",pl:16,children:jsxRuntimeExports.jsx(TextInput,{id:"add-node-end-time",label:"End Time",mask:"99:99:99",maskPlaceholder:"_",message:"Enter start and end timestamps which will encompass the segment of video or audio you want to submit. [hh:mm:ss]",name:"endTime",placeholder:"00:00:00",rules:{...requiredRule$1,pattern:{message:"Timestamp must be in the format hh:mm:ss",value:timeRegex},validate:{endTime:ot=>ot>(et||"00:00:00")||"End time should be greater than start time"}},showMask:!0})})]}),jsxRuntimeExports.jsx(Flex,{pt:12,children:jsxRuntimeExports.jsx(TextArea,{id:"add-node-description",label:"Clip Description",maxLength:100,message:"Enter a short description of your audio/video segment. Think of this as the title of your node. [max 100 characters]",name:"description",rules:requiredRule$1})}),jsxRuntimeExports.jsx(Flex,{pt:12,children:jsxRuntimeExports.jsx(TagInput,{id:"add-node-tags",label:"Tags",maxLength:50,message:"Enter some topic tags that capture the main ideas of your segment. Be specific! Generic tags aren't useful for anyone. Think, 'What term(s) would someone search to find my node? [max: 15, max characters per tag: 50]",rules:tagRule})})]}),jsxRuntimeExports.jsx(Location,{setValue:tt})]})})},CheckBoxWrapper=styled$4.div` - color: ${colors.lightGray}; - font-size: 14px; - font-weight: 600; - display: flex; - - .checkbox { - width: 20px; - height: 20px; - border-radius: 4px; - border: 2px solid ${colors.lightBlue400}; - margin-left: 16px; - font-size: 12px; - display: flex; - align-items: center; - justify-content: center; - cursor: pointer; - background: transparent; - padding: 0; + const keys$5 = ['x', 'y', 'top', 'bottom', 'left', 'right', 'width', 'height'], + areBoundsEqual = (tt, et) => keys$5.every((nt) => tt[nt] === et[nt]) + var __defProp = Object.defineProperty, + __defProps = Object.defineProperties, + __getOwnPropDescs = Object.getOwnPropertyDescriptors, + __getOwnPropSymbols = Object.getOwnPropertySymbols, + __hasOwnProp = Object.prototype.hasOwnProperty, + __propIsEnum = Object.prototype.propertyIsEnumerable, + __defNormalProp = (tt, et, nt) => + et in tt ? __defProp(tt, et, { enumerable: !0, configurable: !0, writable: !0, value: nt }) : (tt[et] = nt), + __spreadValues = (tt, et) => { + for (var nt in et || (et = {})) __hasOwnProp.call(et, nt) && __defNormalProp(tt, nt, et[nt]) + if (__getOwnPropSymbols) + for (var nt of __getOwnPropSymbols(et)) __propIsEnum.call(et, nt) && __defNormalProp(tt, nt, et[nt]) + return tt + }, + __spreadProps = (tt, et) => __defProps(tt, __getOwnPropDescs(et)) + function traverseFiber(tt, et, nt) { + if (!tt) return + if (nt(tt) === !0) return tt + let rt = et ? tt.return : tt.child + for (; rt; ) { + const it = traverseFiber(rt, et, nt) + if (it) return it + rt = et ? null : rt.sibling + } } -`,message$2="Submit a topic that you would like to monitor (for example, “inflation”, “bitcoin”, etc). We will continuously fetch the latest content associated with your topic and add them to your graph.",Topic$1=()=>jsxRuntimeExports.jsx(Flex,{children:jsxRuntimeExports.jsx(TextInput,{id:"cy-topic-id",label:"Topic",maxLength:50,message:message$2,name:"source",placeholder:"Type your topic here...",rules:{...requiredRule$1}})}),TwitId=({setValue:tt})=>jsxRuntimeExports.jsxs(Flex,{children:[jsxRuntimeExports.jsx(TextInput,{id:"tweet-id",label:"Tweet id",message:"Paste a valid tweet url or tweet id.",name:"tweet",placeholder:"Paste your link or id here...",rules:{...requiredRule$1}}),jsxRuntimeExports.jsx(Location,{setValue:tt})]}),TwitterHandle$2=()=>jsxRuntimeExports.jsx(Flex,{children:jsxRuntimeExports.jsx(TextInput,{id:"twitter-handle",label:"Twitter Handle",mask:"@***********************************",maxLength:16,message:"Paste a valid twitter handle.",name:"source",placeholder:"Paste your id here...",rules:{...requiredRule$1},showMask:!1})}),message$1="Submit a valid webpage url. If you find a webpage with great text content you’d like to add to the graph, use this option (e.g. A news article, a wiki page, etc). This is NOT for audio or video content.",urlRegex=/^(?:(?:https?|ftp):\/\/)?(?:www\.)?[a-zA-Z0-9_-]+(?:\.[a-zA-Z0-9_-]+)*\.[a-zA-Z]{2,10}(?:\/[^\s]*)?$/,WebPage=()=>jsxRuntimeExports.jsx(Flex,{children:jsxRuntimeExports.jsx(TextInput,{id:"tweet-id",label:"Web page url",message:message$1,name:"web_page",placeholder:"Paste your url here...",rules:{...requiredRule$1,pattern:{message:"You must enter a valid webpage url",value:urlRegex}}})}),message="Submit youtube channel",YoutubeChannel=()=>jsxRuntimeExports.jsx(Flex,{children:jsxRuntimeExports.jsx(TextInput,{id:"cy-youtube-channel-id",label:"Youtube channel",maxLength:50,message,name:"source",placeholder:"Type youtube channel here...",rules:{...requiredRule$1}})}),requiredRule$1={required:{message:"The field is required",value:!0}},infoMessageContent=`Come across an interesting or useful part of a video or audio you'd like to share? You can add it to the knowledge graph here! - -Enter a valid link to the YouTube video or Twitter Space you were watching, choose a start and end timestamp to encompass the segment you found interesting or useful, provide a brief description of what the segment is about, and add topic tags that are relevant to the segment. Hit "Add node", and your clip will be added to the graph shortly. - -Your pubkey will be submitted with your clip, and any boosts your clip receives will go to you!`,infoMessageSource="If you come across a source that produces ongoing content (e.g. a twitter account, youtube channel, etc). You can add it to the source table for your graph. Once the source is added to the table we will gather new content produced by that source, process it, and add it to your graph.",notify$1=tt=>{toast(jsxRuntimeExports.jsx(ToastMessage,{message:tt}),{icon:tt===NODE_ADD_SUCCESS?jsxRuntimeExports.jsx(MdCheckCircle,{color:colors.primaryGreen}):jsxRuntimeExports.jsx(MdWarning,{color:colors.primaryRed}),position:toast.POSITION.BOTTOM_CENTER,type:tt===NODE_ADD_SUCCESS?"success":"error"})},handleSubmit=async(tt,et,nt,rt,it)=>{var lt;const ot={};if(nt===LINK)ot.media_url=tt.link,tt.withTimeStamps?(ot.content_type="clip",ot.job_response={tags:[{description:tt.description,"end-time":timeToMilliseconds(tt.endTime),"start-time":timeToMilliseconds(tt.startTime),tag:(lt=tt.tags)==null?void 0:lt.join(", ")}]}):tt.withLocation?(ot.latitude=tt.latitude,ot.longitude=tt.longitude):ot.content_type;else if(nt===TWITTER_SOURCE){const ct=/(?:https?:\/\/)?(?:www\.)?twitter\.com\/\w+\/status\/\d+/,ut=/^[0-9]{16,}$/;if(ct.test(tt.tweet)){const ht=/\/status\/(\d+)/,dt=tt.tweet.match(ht);if(dt!=null&&dt[1]){const[,pt]=dt;ot.tweet_id=pt}}else ot.tweet_id=tt.tweet;if(!ut.test(ot.tweet_id))return;tt.withLocation&&(ot.latitude=tt.latitude,ot.longitude=tt.longitude),ot.content_type="tweet"}else nt===WEB_PAGE?(ot.content_type="webpage",ot.web_page=tt.web_page):nt===DOCUMENT?(ot.content_type="document",ot.text=tt.document):(ot.source_type=nt,nt===TWITTER_HANDLE?ot.source=(tt.source||"").replace(/[@]/g,""):ot.source=tt.source);let at="";await executeIfProd(async()=>{const ct=await distExports$1.enable();ot.pubkey=ct==null?void 0:ct.pubkey,at=await getLSat()});const st=CONTENT_TYPES.includes(nt)?"add_node":"radar";try{const ct=await api.post(`/${st}`,JSON.stringify(ot),{Authorization:at});if(ct.error){const{message:ut}=ct.error;throw new Error(ut)}st==="radar"&&await rt(),notify$1(NODE_ADD_SUCCESS),et()}catch(ct){if(ct.status===402){const ut=distExports.Lsat.fromHeader(ct.headers.get("www-authenticate"));await payLsat(ut),await updateBudget(it),await handleSubmit(tt,et,nt,rt,it)}ct instanceof Error&&(notify$1(NODE_ADD_ERROR),et())}},CONTENT_TYPE_OPTIONS={content:{[LINK]:{component:SourceUrl,label:"Youtube / Twitter space / Mp3"},[TWITTER_SOURCE]:{component:TwitId,label:"Tweet"},[WEB_PAGE]:{component:WebPage,label:"Webpage (Text)"},[DOCUMENT]:{component:Document,label:"Document"}},source:{[GITHUB_REPOSITORY]:{component:GithubRepository,label:"Github repository"},[RSS]:{component:RSSFeed,label:"RSS feed"},[TOPIC]:{component:Topic$1,label:"Topic"},[TWITTER_HANDLE]:{component:TwitterHandle$2,label:"Twitter handle"},[YOUTUBE_CHANNEL]:{component:YoutubeChannel,label:"Youtube channel"}}},CONTENT_TYPES=Object.keys(CONTENT_TYPE_OPTIONS.content),AddNodeModal=()=>{const{close:tt,addNodeModalData:et}=useModal("addNode"),[nt,rt]=reactExports.useState(""),it=useDataStore(St=>St.setSources),[ot]=useUserStore(St=>[St.setBudget]),at=et?CONTENT_TYPE_OPTIONS[et]:null,st=et==="source"?infoMessageSource:infoMessageContent,lt=useForm({mode:"onSubmit"}),{reset:ct,watch:ut,setValue:ht}=lt,{isSubmitting:dt}=lt.formState,pt=()=>{rt(""),ct(),tt()},mt=async()=>{if([TWITTER_HANDLE,TOPIC].includes(nt))try{const St=await getRadarData();it(St.data)}catch(St){console.warn(St)}},gt=lt.handleSubmit(async St=>{await handleSubmit(St,pt,nt,mt,ot)}),yt=at?Object.keys(at).map(St=>({label:at[St].label,value:St})):[],bt=nt?[{label:nt,value:nt}]:[],vt=ut("startTime"),xt=nt&&at?at[nt].component:()=>null,kt={setValue:ht,startTime:vt};return at&&jsxRuntimeExports.jsx(BaseModal,{id:"addNode",preventOutsideClose:!0,children:jsxRuntimeExports.jsx(FormProvider,{...lt,children:jsxRuntimeExports.jsx("form",{id:"add-node-form",onSubmit:gt,children:jsxRuntimeExports.jsxs(Wrapper$o,{children:[jsxRuntimeExports.jsxs(Flex,{align:"center",direction:"row",justify:"space-between",pb:32,children:[jsxRuntimeExports.jsxs(Flex,{align:"center",direction:"row",children:[jsxRuntimeExports.jsxs(Flex,{align:"center",direction:"row",children:[nt&&jsxRuntimeExports.jsx(BackButton,{onClick:()=>rt(""),children:jsxRuntimeExports.jsx(MdKeyboardBackspace,{color:colors.white,size:24})}),jsxRuntimeExports.jsxs(Text$3,{kind:"bigHeadingBold",children:["Add ",et]})]}),jsxRuntimeExports.jsxs(InfoIcon,{role:"tooltip",tabIndex:0,children:[jsxRuntimeExports.jsx(MdInfo,{}),jsxRuntimeExports.jsx("div",{className:"tooltip",children:st})]})]}),jsxRuntimeExports.jsx(CloseButton$5,{id:"add-node-close-button",onClick:pt,onKeyDown:St=>{(St.key==="Enter"||St.key==="Space")&&pt()},role:"button",tabIndex:0,children:jsxRuntimeExports.jsx(MdClose,{color:"white"})})]}),nt?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Flex,{children:jsxRuntimeExports.jsx(xt,{...kt})}),jsxRuntimeExports.jsx(Flex,{pt:16,px:4,tabIndex:0,children:jsxRuntimeExports.jsx(Text$3,{color:"lightGray",kind:"tinyBold",children:"Your pubkey will be submitted with your input, so you can receive sats that your content earns."})}),jsxRuntimeExports.jsx(Flex,{pt:8,children:dt?jsxRuntimeExports.jsx(SubmitLoader$1,{children:jsxRuntimeExports.jsx(ClipLoader$2,{color:colors.white,size:20})}):jsxRuntimeExports.jsx(Button,{disabled:dt,id:"add-node-submit-cta",kind:"big",type:"submit",children:`Add ${et}`})})]}):jsxRuntimeExports.jsxs(Stack$5,{alignItems:{xs:"stretch",sm:"flex-start",minHeight:"160px"},component:"div",direction:{xs:"column",sm:"row"},justifyContent:"space-between",spacing:2,children:[jsxRuntimeExports.jsx(Flex,{children:jsxRuntimeExports.jsx(Text$3,{kind:"mediumBold",children:"What do you want to add?"})}),jsxRuntimeExports.jsx(Flex,{grow:1,children:jsxRuntimeExports.jsx(StyledSelect$1,{className:clsx$1(bt.length&&"hasSelected","cy-select-content-type"),clearable:!0,onChange:St=>{rt(St.length?St[0].value:"")},options:yt,placeholder:`Select ${et} type`,searchable:!1,values:bt})})]})]})})})})},CloseButton$5=styled$4(Flex)` - cursor: pointer; - - svg { - font-size: 24px; - color: ${colors.white}; + function wrapContext(tt) { + try { + return Object.defineProperties(tt, { + _currentRenderer: { + get() { + return null + }, + set() {}, + }, + _currentRenderer2: { + get() { + return null + }, + set() {}, + }, + }) + } catch { + return tt + } } -`,BackButton=styled$4(Flex)` - cursor: pointer; - margin-right: 8px; -`,InfoIcon=styled$4(Flex)` - cursor: default; - padding: 8px; - position: relative; - - svg { - font-size: 22px; - color: ${colors.secondaryText4}; + const FiberContext = wrapContext(reactExports.createContext(null)) + class FiberProvider extends reactExports.Component { + render() { + return reactExports.createElement(FiberContext.Provider, { value: this._reactInternals }, this.props.children) + } } - - .tooltip { - position: absolute; - background-color: ${colors.dashboardHeader}; - border: 1px solid ${colors.secondaryText4}; - border-radius: 4px; - color: ${colors.white}; - top: 40px; - left: -142px; - padding: 4px 8px; - font-size: 13px; - visibility: hidden; - width: 470px; - white-space: pre-wrap; - z-index: 1; + const { ReactCurrentOwner, ReactCurrentDispatcher } = reactExports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED + function useFiber() { + const tt = reactExports.useContext(FiberContext) + if (tt === null) throw new Error('its-fine: useFiber must be called within a !') + const et = reactExports.useId() + return reactExports.useMemo(() => { + for (const rt of [ + ReactCurrentOwner == null ? void 0 : ReactCurrentOwner.current, + tt, + tt == null ? void 0 : tt.alternate, + ]) { + if (!rt) continue + const it = traverseFiber(rt, !1, (ot) => { + let at = ot.memoizedState + for (; at; ) { + if (at.memoizedState === et) return !0 + at = at.next + } + }) + if (it) return it + } + }, [tt, et]) } - - span:hover + .tooltip { - visibility: visible; + function useContextMap() { + var tt, et + const nt = useFiber(), + [rt] = reactExports.useState(() => new Map()) + rt.clear() + let it = nt + for (; it; ) { + const ot = (tt = it.type) == null ? void 0 : tt._context + ot && + ot !== FiberContext && + !rt.has(ot) && + rt.set( + ot, + (et = ReactCurrentDispatcher == null ? void 0 : ReactCurrentDispatcher.current) == null + ? void 0 + : et.readContext(wrapContext(ot)), + ), + (it = it.return) + } + return rt } - - &:focus .tooltip { - visibility: visible; + function useContextBridge() { + const tt = useContextMap() + return reactExports.useMemo( + () => + Array.from(tt.keys()).reduce( + (et, nt) => (rt) => + reactExports.createElement( + et, + null, + reactExports.createElement(nt.Provider, __spreadProps(__spreadValues({}, rt), { value: tt.get(nt) })), + ), + (et) => reactExports.createElement(FiberProvider, __spreadValues({}, et)), + ), + [tt], + ) } -`,SubmitLoader$1=styled$4(Flex).attrs({align:"center",background:"primaryButton",borderRadius:8,justify:"center"})` - padding: 16px 24px; - opacity: 0.5; -`,Wrapper$o=styled$4(Flex)` - min-height: 600px; -`,defaultData$6={currentSearch:null,flagErrorIsOpen:!1,hasBudgetExplanationModalBeSeen:!1,relevanceIsSelected:!1,secondarySidebarActiveTab:"",sidebarIsOpen:!0,theme:"light",transcriptIsOpen:!1},useAppStore=react((tt,et)=>({...defaultData$6,clearSearch:()=>tt({currentSearch:null}),setCurrentSearch:nt=>tt({currentSearch:nt}),setFlagErrorOpen:nt=>tt({flagErrorIsOpen:nt}),setRelevanceSelected:nt=>tt({relevanceIsSelected:nt}),setSecondarySidebarActiveTab:nt=>tt({secondarySidebarActiveTab:nt}),setSidebarOpen:nt=>tt({sidebarIsOpen:nt,transcriptIsOpen:nt?et().transcriptIsOpen:!1}),setTranscriptOpen:nt=>tt({transcriptIsOpen:nt})})),CloseButton$4=styled$4(Flex)` - cursor: pointer; -`,ButtonWrap=styled$4(Flex)` - margin: 0 auto; -`,AuthorizeHeader=styled$4(Text$3).attrs({color:"modalAuth",kind:"bigHeading"})` - font-size: 32px; -`,BudgetExplanationModal=()=>{const{close:tt}=useModal("budgetExplanation"),et=reactExports.useCallback(()=>{useAppStore.setState({hasBudgetExplanationModalBeSeen:!0}),tt()},[tt]);return jsxRuntimeExports.jsxs(BaseModal,{background:"budgetExplanationModalBg",id:"budgetExplanation",kind:"small",children:[jsxRuntimeExports.jsx(Flex,{align:"flex-end",pb:14,children:jsxRuntimeExports.jsx(CloseButton$4,{onClick:tt,children:jsxRuntimeExports.jsx(MdClose,{color:colors.primaryRed,fontSize:18})})}),jsxRuntimeExports.jsxs(Flex,{align:"center",children:[jsxRuntimeExports.jsx(Flex,{children:jsxRuntimeExports.jsx(MdVerifiedUser,{color:colors.modalShield,fontSize:18})}),jsxRuntimeExports.jsx(Flex,{pb:10,pt:12,children:jsxRuntimeExports.jsx(AuthorizeHeader,{children:"Authorize"})})]}),jsxRuntimeExports.jsx(Flex,{px:4,py:32,children:jsxRuntimeExports.jsx(Text$3,{color:"white",kind:"regularBold",children:"Each search of the graph costs 10 sats. Please enter a budget to buy an L402 which will allow you to search up until your budget runs out. You will be able to set a new budget when that happens."})}),jsxRuntimeExports.jsx(ButtonWrap,{children:jsxRuntimeExports.jsx(Button,{kind:"small",onClick:et,children:"Next"})}),jsxRuntimeExports.jsx(Flex,{pt:94})]})},DataRetriever=({children:tt,loader:et})=>{const[nt,rt]=[useDataStore(at=>at.data),useDataStore(at=>at.fetchData)],[it,ot]=reactExports.useState(!1);return reactExports.useEffect(()=>{rt()},[rt]),reactExports.useEffect(()=>{ot(!0),setTimeout(()=>{ot(!1)},3e3)},[]),nt===null&&et?jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:et}):nt===null?null:jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:it?et:tt})},useGraphData=()=>{const tt=useDataStore(et=>et.data);return invariant$2(tt!==null,"This hook is meant to be used inside a DataRetriever component"),tt},GlobalStyle=$e` - html { - box-sizing: border-box; + const DOM_EVENTS = { + onClick: ['click', !1], + onContextMenu: ['contextmenu', !1], + onDoubleClick: ['dblclick', !1], + onWheel: ['wheel', !0], + onPointerDown: ['pointerdown', !0], + onPointerUp: ['pointerup', !0], + onPointerLeave: ['pointerleave', !0], + onPointerMove: ['pointermove', !0], + onPointerCancel: ['pointercancel', !0], + onLostPointerCapture: ['lostpointercapture', !0], } - *, *:before, *:after { - box-sizing: inherit; + function createPointerEvents(tt) { + const { handlePointer: et } = createEvents(tt) + return { + priority: 1, + enabled: !0, + compute(nt, rt, it) { + rt.pointer.set((nt.offsetX / rt.size.width) * 2 - 1, -(nt.offsetY / rt.size.height) * 2 + 1), + rt.raycaster.setFromCamera(rt.pointer, rt.camera) + }, + connected: void 0, + handlers: Object.keys(DOM_EVENTS).reduce((nt, rt) => ({ ...nt, [rt]: et(rt) }), {}), + update: () => { + var nt + const { events: rt, internal: it } = tt.getState() + ;(nt = it.lastEvent) != null && nt.current && rt.handlers && rt.handlers.onPointerMove(it.lastEvent.current) + }, + connect: (nt) => { + var rt + const { set: it, events: ot } = tt.getState() + ot.disconnect == null || ot.disconnect(), + it((at) => ({ events: { ...at.events, connected: nt } })), + Object.entries((rt = ot.handlers) != null ? rt : []).forEach(([at, st]) => { + const [lt, ct] = DOM_EVENTS[at] + nt.addEventListener(lt, st, { passive: ct }) + }) + }, + disconnect: () => { + const { set: nt, events: rt } = tt.getState() + if (rt.connected) { + var it + Object.entries((it = rt.handlers) != null ? it : []).forEach(([ot, at]) => { + if (rt && rt.connected instanceof HTMLElement) { + const [st] = DOM_EVENTS[ot] + rt.connected.removeEventListener(st, at) + } + }), + nt((ot) => ({ events: { ...ot.events, connected: void 0 } })) + } + }, + } } - html, body, div, span, applet, object, iframe, - h1, h2, h3, h4, h5, h6, p, blockquote, pre, - a, abbr, acronym, address, big, cite, code, - del, dfn, em, img, ins, kbd, q, s, samp, - small, strike, strong, sub, sup, tt, var, - b, u, i, center, - dl, dt, dd, ol, ul, li, - fieldset, form, label, legend, - table, caption, tbody, tfoot, thead, tr, th, td, - article, aside, canvas, details, embed, - figure, figcaption, footer, header, hgroup, - menu, nav, output, ruby, section, summary, - time, mark, audio, video { - -moz-osx-font-smoothing: grayscale; - -webkit-font-smoothing: antialiased; - -webkit-tap-highlight-color: transparent; - border: 0; - font-size: 100%; - margin: 0; - padding: 0; - text-rendering: optimizeLegibility; - vertical-align: baseline; + const CanvasImpl = reactExports.forwardRef(function ( + { + children: et, + fallback: nt, + resize: rt, + style: it, + gl: ot, + events: at = createPointerEvents, + eventSource: st, + eventPrefix: lt, + shadows: ct, + linear: ut, + flat: ht, + legacy: dt, + orthographic: pt, + frameloop: mt, + dpr: gt, + performance: yt, + raycaster: bt, + camera: vt, + scene: xt, + onPointerMissed: kt, + onCreated: St, + ...Tt + }, + At, + ) { + reactExports.useMemo(() => extend$2(THREE$1), []) + const Et = useContextBridge(), + [$t, Dt] = useMeasure({ scroll: !0, debounce: { scroll: 50, resize: 0 }, ...rt }), + jt = reactExports.useRef(null), + Pt = reactExports.useRef(null) + reactExports.useImperativeHandle(At, () => jt.current) + const Ct = useMutableCallback(kt), + [wt, It] = reactExports.useState(!1), + [Ot, Wt] = reactExports.useState(!1) + if (wt) throw wt + if (Ot) throw Ot + const zt = reactExports.useRef(null) + useIsomorphicLayoutEffect$1(() => { + const Nt = jt.current + Dt.width > 0 && + Dt.height > 0 && + Nt && + (zt.current || (zt.current = createRoot(Nt)), + zt.current.configure({ + gl: ot, + events: at, + shadows: ct, + linear: ut, + flat: ht, + legacy: dt, + orthographic: pt, + frameloop: mt, + dpr: gt, + performance: yt, + raycaster: bt, + camera: vt, + scene: xt, + size: Dt, + onPointerMissed: (...Ut) => (Ct.current == null ? void 0 : Ct.current(...Ut)), + onCreated: (Ut) => { + Ut.events.connect == null || Ut.events.connect(st ? (isRef(st) ? st.current : st) : Pt.current), + lt && + Ut.setEvents({ + compute: (Mt, Ht) => { + const en = Mt[lt + 'X'], + sn = Mt[lt + 'Y'] + Ht.pointer.set((en / Ht.size.width) * 2 - 1, -(sn / Ht.size.height) * 2 + 1), + Ht.raycaster.setFromCamera(Ht.pointer, Ht.camera) + }, + }), + St == null || St(Ut) + }, + }), + zt.current.render( + reactExports.createElement( + Et, + null, + reactExports.createElement( + ErrorBoundary, + { set: Wt }, + reactExports.createElement( + reactExports.Suspense, + { fallback: reactExports.createElement(Block, { set: It }) }, + et, + ), + ), + ), + )) + }), + reactExports.useEffect(() => { + const Nt = jt.current + if (Nt) return () => unmountComponentAtNode(Nt) + }, []) + const Ft = st ? 'none' : 'auto' + return reactExports.createElement( + 'div', + _extends$u( + { + ref: Pt, + style: { + position: 'relative', + width: '100%', + height: '100%', + overflow: 'hidden', + pointerEvents: Ft, + ...it, + }, + }, + Tt, + ), + reactExports.createElement( + 'div', + { ref: $t, style: { width: '100%', height: '100%' } }, + reactExports.createElement('canvas', { ref: jt, style: { display: 'block' } }, nt), + ), + ) + }), + Canvas$1 = reactExports.forwardRef(function (et, nt) { + return reactExports.createElement( + FiberProvider, + null, + reactExports.createElement(CanvasImpl, _extends$u({}, et, { ref: nt })), + ) + }), + v1 = new Vector3(), + v2 = new Vector3(), + v3 = new Vector3() + function defaultCalculatePosition(tt, et, nt) { + const rt = v1.setFromMatrixPosition(tt.matrixWorld) + rt.project(et) + const it = nt.width / 2, + ot = nt.height / 2 + return [rt.x * it + it, -(rt.y * ot) + ot] } - a { - cursor: pointer; - text-decoration: none; + function isObjectBehindCamera(tt, et) { + const nt = v1.setFromMatrixPosition(tt.matrixWorld), + rt = v2.setFromMatrixPosition(et.matrixWorld), + it = nt.sub(rt), + ot = et.getWorldDirection(v3) + return it.angleTo(ot) > Math.PI / 2 } - body { - - &.no-scroll { - overflow: hidden; + function isObjectVisible(tt, et, nt, rt) { + const it = v1.setFromMatrixPosition(tt.matrixWorld), + ot = it.clone() + ot.project(et), nt.setFromCamera(ot, et) + const at = nt.intersectObjects(rt, !0) + if (at.length) { + const st = at[0].distance + return it.distanceTo(nt.ray.origin) < st } + return !0 } - blockquote, q { - quotes: none; + function objectScale(tt, et) { + if (et instanceof OrthographicCamera) return et.zoom + if (et instanceof PerspectiveCamera) { + const nt = v1.setFromMatrixPosition(tt.matrixWorld), + rt = v2.setFromMatrixPosition(et.matrixWorld), + it = (et.fov * Math.PI) / 180, + ot = nt.distanceTo(rt) + return 1 / (2 * Math.tan(it / 2) * ot) + } else return 1 } - blockquote:before, blockquote:after, - q:before, q:after { - content: ''; - content: none; + function objectZIndex(tt, et, nt) { + if (et instanceof PerspectiveCamera || et instanceof OrthographicCamera) { + const rt = v1.setFromMatrixPosition(tt.matrixWorld), + it = v2.setFromMatrixPosition(et.matrixWorld), + ot = rt.distanceTo(it), + at = (nt[1] - nt[0]) / (et.far - et.near), + st = nt[1] - at * et.far + return Math.round(at * ot + st) + } } - table { - border-collapse: collapse; - border-spacing: 0; + const epsilon$1 = (tt) => (Math.abs(tt) < 1e-10 ? 0 : tt) + function getCSSMatrix(tt, et, nt = '') { + let rt = 'matrix3d(' + for (let it = 0; it !== 16; it++) rt += epsilon$1(et[it] * tt.elements[it]) + (it !== 15 ? ',' : ')') + return nt + rt } -`;var constants$1={exports:{}},reactReconcilerConstants_production_min={};/** - * @license React - * react-reconciler-constants.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */reactReconcilerConstants_production_min.ConcurrentRoot=1;reactReconcilerConstants_production_min.ContinuousEventPriority=4;reactReconcilerConstants_production_min.DefaultEventPriority=16;reactReconcilerConstants_production_min.DiscreteEventPriority=1;reactReconcilerConstants_production_min.IdleEventPriority=536870912;reactReconcilerConstants_production_min.LegacyRoot=0;constants$1.exports=reactReconcilerConstants_production_min;var constantsExports=constants$1.exports;function createStore$2(tt){let et;const nt=new Set,rt=(ct,ut)=>{const ht=typeof ct=="function"?ct(et):ct;if(ht!==et){const dt=et;et=ut?ht:Object.assign({},et,ht),nt.forEach(pt=>pt(et,dt))}},it=()=>et,ot=(ct,ut=it,ht=Object.is)=>{console.warn("[DEPRECATED] Please use `subscribeWithSelector` middleware");let dt=ut(et);function pt(){const mt=ut(et);if(!ht(dt,mt)){const gt=dt;ct(dt=mt,gt)}}return nt.add(pt),()=>nt.delete(pt)},lt={setState:rt,getState:it,subscribe:(ct,ut,ht)=>ut||ht?ot(ct,ut,ht):(nt.add(ct),()=>nt.delete(ct)),destroy:()=>nt.clear()};return et=tt(rt,it,lt),lt}const isSSR$2=typeof window>"u"||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),useIsomorphicLayoutEffect$2=isSSR$2?reactExports.useEffect:reactExports.useLayoutEffect;function create$2(tt){const et=typeof tt=="function"?createStore$2(tt):tt,nt=(rt=et.getState,it=Object.is)=>{const[,ot]=reactExports.useReducer(yt=>yt+1,0),at=et.getState(),st=reactExports.useRef(at),lt=reactExports.useRef(rt),ct=reactExports.useRef(it),ut=reactExports.useRef(!1),ht=reactExports.useRef();ht.current===void 0&&(ht.current=rt(at));let dt,pt=!1;(st.current!==at||lt.current!==rt||ct.current!==it||ut.current)&&(dt=rt(at),pt=!it(ht.current,dt)),useIsomorphicLayoutEffect$2(()=>{pt&&(ht.current=dt),st.current=at,lt.current=rt,ct.current=it,ut.current=!1});const mt=reactExports.useRef(at);useIsomorphicLayoutEffect$2(()=>{const yt=()=>{try{const vt=et.getState(),xt=lt.current(vt);ct.current(ht.current,xt)||(st.current=vt,ht.current=xt,ot())}catch{ut.current=!0,ot()}},bt=et.subscribe(yt);return et.getState()!==mt.current&&yt(),bt},[]);const gt=pt?dt:ht.current;return reactExports.useDebugValue(gt),gt};return Object.assign(nt,et),nt[Symbol.iterator]=function(){console.warn("[useStore, api] = create() is deprecated and will be removed in v4");const rt=[nt,et];return{next(){const it=rt.length<=0;return{value:rt.shift(),done:it}}}},nt}var reactReconciler={exports:{}},scheduler={exports:{}},scheduler_production_min={};/** - * @license React - * scheduler.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */(function(tt){function et(zt,Ft){var Nt=zt.length;zt.push(Ft);e:for(;0>>1,Mt=zt[Ut];if(0>>1;Utit(sn,Nt))Ktit(rn,sn)?(zt[Ut]=rn,zt[Kt]=Nt,Ut=Kt):(zt[Ut]=sn,zt[en]=Nt,Ut=en);else if(Ktit(rn,Nt))zt[Ut]=rn,zt[Kt]=Nt,Ut=Kt;else break e}}return Ft}function it(zt,Ft){var Nt=zt.sortIndex-Ft.sortIndex;return Nt!==0?Nt:zt.id-Ft.id}if(typeof performance=="object"&&typeof performance.now=="function"){var ot=performance;tt.unstable_now=function(){return ot.now()}}else{var at=Date,st=at.now();tt.unstable_now=function(){return at.now()-st}}var lt=[],ct=[],ut=1,ht=null,dt=3,pt=!1,mt=!1,gt=!1,yt=typeof setTimeout=="function"?setTimeout:null,bt=typeof clearTimeout=="function"?clearTimeout:null,vt=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function xt(zt){for(var Ft=nt(ct);Ft!==null;){if(Ft.callback===null)rt(ct);else if(Ft.startTime<=zt)rt(ct),Ft.sortIndex=Ft.expirationTime,et(lt,Ft);else break;Ft=nt(ct)}}function kt(zt){if(gt=!1,xt(zt),!mt)if(nt(lt)!==null)mt=!0,Ot(St);else{var Ft=nt(ct);Ft!==null&&Wt(kt,Ft.startTime-zt)}}function St(zt,Ft){mt=!1,gt&&(gt=!1,bt(Et),Et=-1),pt=!0;var Nt=dt;try{for(xt(Ft),ht=nt(lt);ht!==null&&(!(ht.expirationTime>Ft)||zt&&!jt());){var Ut=ht.callback;if(typeof Ut=="function"){ht.callback=null,dt=ht.priorityLevel;var Mt=Ut(ht.expirationTime<=Ft);Ft=tt.unstable_now(),typeof Mt=="function"?ht.callback=Mt:ht===nt(lt)&&rt(lt),xt(Ft)}else rt(lt);ht=nt(lt)}if(ht!==null)var Ht=!0;else{var en=nt(ct);en!==null&&Wt(kt,en.startTime-Ft),Ht=!1}return Ht}finally{ht=null,dt=Nt,pt=!1}}var Tt=!1,At=null,Et=-1,$t=5,Dt=-1;function jt(){return!(tt.unstable_now()-Dt<$t)}function Pt(){if(At!==null){var zt=tt.unstable_now();Dt=zt;var Ft=!0;try{Ft=At(!0,zt)}finally{Ft?Ct():(Tt=!1,At=null)}}else Tt=!1}var Ct;if(typeof vt=="function")Ct=function(){vt(Pt)};else if(typeof MessageChannel<"u"){var wt=new MessageChannel,It=wt.port2;wt.port1.onmessage=Pt,Ct=function(){It.postMessage(null)}}else Ct=function(){yt(Pt,0)};function Ot(zt){At=zt,Tt||(Tt=!0,Ct())}function Wt(zt,Ft){Et=yt(function(){zt(tt.unstable_now())},Ft)}tt.unstable_IdlePriority=5,tt.unstable_ImmediatePriority=1,tt.unstable_LowPriority=4,tt.unstable_NormalPriority=3,tt.unstable_Profiling=null,tt.unstable_UserBlockingPriority=2,tt.unstable_cancelCallback=function(zt){zt.callback=null},tt.unstable_continueExecution=function(){mt||pt||(mt=!0,Ot(St))},tt.unstable_forceFrameRate=function(zt){0>zt||125Ut?(zt.sortIndex=Nt,et(ct,zt),nt(lt)===null&&zt===nt(ct)&&(gt?(bt(Et),Et=-1):gt=!0,Wt(kt,Nt-Ut))):(zt.sortIndex=Mt,et(lt,zt),mt||pt||(mt=!0,Ot(St))),zt},tt.unstable_shouldYield=jt,tt.unstable_wrapCallback=function(zt){var Ft=dt;return function(){var Nt=dt;dt=Ft;try{return zt.apply(this,arguments)}finally{dt=Nt}}}})(scheduler_production_min);scheduler.exports=scheduler_production_min;var schedulerExports=scheduler.exports;/** - * @license React - * react-reconciler.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var reactReconciler_production_min=function(et){var nt={},rt=reactExports,it=schedulerExports,ot=Object.assign;function at(Bt){for(var Lt="https://reactjs.org/docs/error-decoder.html?invariant="+Bt,Gt=1;Gtrr||gn[Gn]!==Cn[rr]){var _r=` -`+gn[Gn].replace(" at new "," at ");return Bt.displayName&&_r.includes("")&&(_r=_r.replace("",Bt.displayName)),_r}while(1<=Gn&&0<=rr);break}}}finally{Ur=!1,Error.prepareStackTrace=Gt}return(Bt=Bt?Bt.displayName||Bt.name:"")?Mr(Bt):""}var Pr=Object.prototype.hasOwnProperty,Lr=[],Wr=-1;function Br(Bt){return{current:Bt}}function tr(Bt){0>Wr||(Bt.current=Lr[Wr],Lr[Wr]=null,Wr--)}function ir(Bt,Lt){Wr++,Lr[Wr]=Bt.current,Bt.current=Lt}var Sr={},dr=Br(Sr),br=Br(!1),$r=Sr;function no(Bt,Lt){var Gt=Bt.type.contextTypes;if(!Gt)return Sr;var tn=Bt.stateNode;if(tn&&tn.__reactInternalMemoizedUnmaskedChildContext===Lt)return tn.__reactInternalMemoizedMaskedChildContext;var gn={},Cn;for(Cn in Gt)gn[Cn]=Lt[Cn];return tn&&(Bt=Bt.stateNode,Bt.__reactInternalMemoizedUnmaskedChildContext=Lt,Bt.__reactInternalMemoizedMaskedChildContext=gn),gn}function so(Bt){return Bt=Bt.childContextTypes,Bt!=null}function fo(){tr(br),tr(dr)}function po(Bt,Lt,Gt){if(dr.current!==Sr)throw Error(at(168));ir(dr,Lt),ir(br,Gt)}function Yn(Bt,Lt,Gt){var tn=Bt.stateNode;if(Lt=Lt.childContextTypes,typeof tn.getChildContext!="function")return Gt;tn=tn.getChildContext();for(var gn in tn)if(!(gn in Lt))throw Error(at(108,Et(Bt)||"Unknown",gn));return ot({},Gt,tn)}function vo(Bt){return Bt=(Bt=Bt.stateNode)&&Bt.__reactInternalMemoizedMergedChildContext||Sr,$r=dr.current,ir(dr,Bt),ir(br,br.current),!0}function _o(Bt,Lt,Gt){var tn=Bt.stateNode;if(!tn)throw Error(at(169));Gt?(Bt=Yn(Bt,Lt,$r),tn.__reactInternalMemoizedMergedChildContext=Bt,tr(br),tr(dr),ir(dr,Bt)):tr(br),ir(br,Gt)}var xo=Math.clz32?Math.clz32:Ro,bo=Math.log,Co=Math.LN2;function Ro(Bt){return Bt>>>=0,Bt===0?32:31-(bo(Bt)/Co|0)|0}var Wo=64,Po=4194304;function Fo(Bt){switch(Bt&-Bt){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return Bt&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return Bt&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return Bt}}function Go(Bt,Lt){var Gt=Bt.pendingLanes;if(Gt===0)return 0;var tn=0,gn=Bt.suspendedLanes,Cn=Bt.pingedLanes,Gn=Gt&268435455;if(Gn!==0){var rr=Gn&~gn;rr!==0?tn=Fo(rr):(Cn&=Gn,Cn!==0&&(tn=Fo(Cn)))}else Gn=Gt&~gn,Gn!==0?tn=Fo(Gn):Cn!==0&&(tn=Fo(Cn));if(tn===0)return 0;if(Lt!==0&&Lt!==tn&&!(Lt&gn)&&(gn=tn&-tn,Cn=Lt&-Lt,gn>=Cn||gn===16&&(Cn&4194240)!==0))return Lt;if(tn&4&&(tn|=Gt&16),Lt=Bt.entangledLanes,Lt!==0)for(Bt=Bt.entanglements,Lt&=tn;0Gt;Gt++)Lt.push(Bt);return Lt}function Zo(Bt,Lt,Gt){Bt.pendingLanes|=Lt,Lt!==536870912&&(Bt.suspendedLanes=0,Bt.pingedLanes=0),Bt=Bt.eventTimes,Lt=31-xo(Lt),Bt[Lt]=Gt}function pu(Bt,Lt){var Gt=Bt.pendingLanes&~Lt;Bt.pendingLanes=Lt,Bt.suspendedLanes=0,Bt.pingedLanes=0,Bt.expiredLanes&=Lt,Bt.mutableReadLanes&=Lt,Bt.entangledLanes&=Lt,Lt=Bt.entanglements;var tn=Bt.eventTimes;for(Bt=Bt.expirationTimes;0>=Gn,gn-=Gn,bu=1<<32-xo(Lt)+gn|Gt<jo?(ms=Ao,Ao=null):ms=Ao.sibling;var zo=ho(ur,Ao,yr[jo],_i);if(zo===null){Ao===null&&(Ao=ms);break}Bt&&Ao&&zo.alternate===null&&Lt(ur,Ao),or=Cn(zo,or,jo),Oo===null?co=zo:Oo.sibling=zo,Oo=zo,Ao=ms}if(jo===yr.length)return Gt(ur,Ao),_a&&wu(ur,jo),co;if(Ao===null){for(;jojo?(ms=Ao,Ao=null):ms=Ao.sibling;var hu=ho(ur,Ao,zo.value,_i);if(hu===null){Ao===null&&(Ao=ms);break}Bt&&Ao&&hu.alternate===null&&Lt(ur,Ao),or=Cn(hu,or,jo),Oo===null?co=hu:Oo.sibling=hu,Oo=hu,Ao=ms}if(zo.done)return Gt(ur,Ao),_a&&wu(ur,jo),co;if(Ao===null){for(;!zo.done;jo++,zo=yr.next())zo=Io(ur,zo.value,_i),zo!==null&&(or=Cn(zo,or,jo),Oo===null?co=zo:Oo.sibling=zo,Oo=zo);return _a&&wu(ur,jo),co}for(Ao=tn(ur,Ao);!zo.done;jo++,zo=yr.next())zo=Jo(Ao,ur,jo,zo.value,_i),zo!==null&&(Bt&&zo.alternate!==null&&Ao.delete(zo.key===null?jo:zo.key),or=Cn(zo,or,jo),Oo===null?co=zo:Oo.sibling=zo,Oo=zo);return Bt&&Ao.forEach(function(Um){return Lt(ur,Um)}),_a&&wu(ur,jo),co}function Tl(ur,or,yr,_i){if(typeof yr=="object"&&yr!==null&&yr.type===ut&&yr.key===null&&(yr=yr.props.children),typeof yr=="object"&&yr!==null){switch(yr.$$typeof){case lt:e:{for(var co=yr.key,Oo=or;Oo!==null;){if(Oo.key===co){if(co=yr.type,co===ut){if(Oo.tag===7){Gt(ur,Oo.sibling),or=gn(Oo,yr.props.children),or.return=ur,ur=or;break e}}else if(Oo.elementType===co||typeof co=="object"&&co!==null&&co.$$typeof===xt&&Wp(co)===Oo.type){Gt(ur,Oo.sibling),or=gn(Oo,yr.props),or.ref=hp(ur,Oo,yr),or.return=ur,ur=or;break e}Gt(ur,Oo);break}else Lt(ur,Oo);Oo=Oo.sibling}yr.type===ut?(or=zu(yr.props.children,ur.mode,_i,yr.key),or.return=ur,ur=or):(_i=Lm(yr.type,yr.key,yr.props,null,ur.mode,_i),_i.ref=hp(ur,or,yr),_i.return=ur,ur=_i)}return Gn(ur);case ct:e:{for(Oo=yr.key;or!==null;){if(or.key===Oo)if(or.tag===4&&or.stateNode.containerInfo===yr.containerInfo&&or.stateNode.implementation===yr.implementation){Gt(ur,or.sibling),or=gn(or,yr.children||[]),or.return=ur,ur=or;break e}else{Gt(ur,or);break}else Lt(ur,or);or=or.sibling}or=Rl(yr,ur.mode,_i),or.return=ur,ur=or}return Gn(ur);case xt:return Oo=yr._init,Tl(ur,or,Oo(yr._payload),_i)}if(It(yr))return lo(ur,or,yr,_i);if(Tt(yr))return Ls(ur,or,yr,_i);Vl(ur,yr)}return typeof yr=="string"&&yr!==""||typeof yr=="number"?(yr=""+yr,or!==null&&or.tag===6?(Gt(ur,or.sibling),or=gn(or,yr),or.return=ur,ur=or):(Gt(ur,or),or=Ns(yr,ur.mode,_i),or.return=ur,ur=or),Gn(ur)):Gt(ur,or)}return Tl}var dp=Fy(!0),Uy=Fy(!1),ru={},ss=Br(ru),fp=Br(ru),pp=Br(ru);function iu(Bt){if(Bt===ru)throw Error(at(174));return Bt}function Jm(Bt,Lt){ir(pp,Lt),ir(fp,Bt),ir(ss,ru),Bt=Wt(Lt),tr(ss),ir(ss,Bt)}function mp(){tr(ss),tr(fp),tr(pp)}function zy(Bt){var Lt=iu(pp.current),Gt=iu(ss.current);Lt=zt(Gt,Bt.type,Lt),Gt!==Lt&&(ir(fp,Bt),ir(ss,Lt))}function Cu(Bt){fp.current===Bt&&(tr(ss),tr(fp))}var er=Br(0);function Er(Bt){for(var Lt=Bt;Lt!==null;){if(Lt.tag===13){var Gt=Lt.memoizedState;if(Gt!==null&&(Gt=Gt.dehydrated,Gt===null||xn(Gt)||Mn(Gt)))return Lt}else if(Lt.tag===19&&Lt.memoizedProps.revealOrder!==void 0){if(Lt.flags&128)return Lt}else if(Lt.child!==null){Lt.child.return=Lt,Lt=Lt.child;continue}if(Lt===Bt)break;for(;Lt.sibling===null;){if(Lt.return===null||Lt.return===Bt)return null;Lt=Lt.return}Lt.sibling.return=Lt.return,Lt=Lt.sibling}return null}var gr=[];function ro(){for(var Bt=0;BtGt?Gt:4,Bt(!0);var tn=$o.transition;$o.transition={};try{Bt(!1),Lt()}finally{No=Gt,$o.transition=tn}}function Gy(){return Qs().memoizedState}function _s(Bt,Lt,Gt){var tn=cu(Bt);Gt={lane:tn,action:Gt,hasEagerState:!1,eagerState:null,next:null},qy(Bt)?Yy(Lt,Gt):(ry(Bt,Lt,Gt),Gt=Os(),Bt=Pl(Bt,tn,Gt),Bt!==null&&Ky(Bt,Lt,tn))}function Ms(Bt,Lt,Gt){var tn=cu(Bt),gn={lane:tn,action:Gt,hasEagerState:!1,eagerState:null,next:null};if(qy(Bt))Yy(Lt,gn);else{ry(Bt,Lt,gn);var Cn=Bt.alternate;if(Bt.lanes===0&&(Cn===null||Cn.lanes===0)&&(Cn=Lt.lastRenderedReducer,Cn!==null))try{var Gn=Lt.lastRenderedState,rr=Cn(Gn,Gt);if(gn.hasEagerState=!0,gn.eagerState=rr,Zs(rr,Gn))return}catch{}finally{}Gt=Os(),Bt=Pl(Bt,tn,Gt),Bt!==null&&Ky(Bt,Lt,tn)}}function qy(Bt){var Lt=Bt.alternate;return Bt===ko||Lt!==null&&Lt===ko}function Yy(Bt,Lt){$u=Gs=!0;var Gt=Bt.pending;Gt===null?Lt.next=Lt:(Lt.next=Gt.next,Gt.next=Lt),Bt.pending=Lt}function ry(Bt,Lt,Gt){fs!==null&&Bt.mode&1&&!(Bo&2)?(Bt=Lt.interleaved,Bt===null?(Gt.next=Gt,Js===null?Js=[Lt]:Js.push(Lt)):(Gt.next=Bt.next,Bt.next=Gt),Lt.interleaved=Gt):(Bt=Lt.pending,Bt===null?Gt.next=Gt:(Gt.next=Bt.next,Bt.next=Gt),Lt.pending=Gt)}function Ky(Bt,Lt,Gt){if(Gt&4194240){var tn=Lt.lanes;tn&=Bt.pendingLanes,Gt|=tn,Lt.lanes=Gt,eu(Bt,Gt)}}var wp={readContext:Vo,useCallback:vs,useContext:vs,useEffect:vs,useImperativeHandle:vs,useInsertionEffect:vs,useLayoutEffect:vs,useMemo:vs,useReducer:vs,useRef:vs,useState:vs,useDebugValue:vs,useDeferredValue:vs,useTransition:vs,useMutableSource:vs,useSyncExternalStore:vs,useId:vs,unstable_isNewReconciler:!1},Jp={readContext:Vo,useCallback:function(Bt,Lt){return ou().memoizedState=[Bt,Lt===void 0?null:Lt],Bt},useContext:Vo,useEffect:bp,useImperativeHandle:function(Bt,Lt,Gt){return Gt=Gt!=null?Gt.concat([Bt]):null,Mu(4194308,4,Kp.bind(null,Lt,Bt),Gt)},useLayoutEffect:function(Bt,Lt){return Mu(4194308,4,Bt,Lt)},useInsertionEffect:function(Bt,Lt){return Mu(4,2,Bt,Lt)},useMemo:function(Bt,Lt){var Gt=ou();return Lt=Lt===void 0?null:Lt,Bt=Bt(),Gt.memoizedState=[Bt,Lt],Bt},useReducer:function(Bt,Lt,Gt){var tn=ou();return Lt=Gt!==void 0?Gt(Lt):Lt,tn.memoizedState=tn.baseState=Lt,Bt={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Bt,lastRenderedState:Lt},tn.queue=Bt,Bt=Bt.dispatch=_s.bind(null,ko,Bt),[tn.memoizedState,Bt]},useRef:function(Bt){var Lt=ou();return Bt={current:Bt},Lt.memoizedState=Bt},useState:xm,useDebugValue:Zp,useDeferredValue:function(Bt){var Lt=xm(Bt),Gt=Lt[0],tn=Lt[1];return bp(function(){var gn=$o.transition;$o.transition={};try{tn(Bt)}finally{$o.transition=gn}},[Bt]),Gt},useTransition:function(){var Bt=xm(!1),Lt=Bt[0];return Bt=N0.bind(null,Bt[1]),ou().memoizedState=Bt,[Lt,Bt]},useMutableSource:function(){},useSyncExternalStore:function(Bt,Lt,Gt){var tn=ko,gn=ou();if(_a){if(Gt===void 0)throw Error(at(407));Gt=Gt()}else{if(Gt=Lt(),fs===null)throw Error(at(349));es&30||Gp(tn,Lt,Gt)}gn.memoizedState=Gt;var Cn={value:Gt,getSnapshot:Lt};return gn.queue=Cn,bp(qp.bind(null,tn,Cn,Bt),[Bt]),tn.flags|=2048,Pu(9,_g.bind(null,tn,Cn,Gt,Lt),void 0,null),Gt},useId:function(){var Bt=ou(),Lt=fs.identifierPrefix;if(_a){var Gt=Ul,tn=bu;Gt=(tn&~(1<<32-xo(tn)-1)).toString(32)+Gt,Lt=":"+Lt+"R"+Gt,Gt=Vp++,0om&&(Lt.flags|=128,tn=!0,Rs(gn,!1),Lt.lanes=4194304)}else{if(!tn)if(Bt=Er(Cn),Bt!==null){if(Lt.flags|=128,tn=!0,Bt=Bt.updateQueue,Bt!==null&&(Lt.updateQueue=Bt,Lt.flags|=4),Rs(gn,!0),gn.tail===null&&gn.tailMode==="hidden"&&!Cn.alternate&&!_a)return yo(Lt),null}else 2*ts()-gn.renderingStartTime>om&&Gt!==1073741824&&(Lt.flags|=128,tn=!0,Rs(gn,!1),Lt.lanes=4194304);gn.isBackwards?(Cn.sibling=Lt.child,Lt.child=Cn):(Bt=gn.last,Bt!==null?Bt.sibling=Cn:Lt.child=Cn,gn.last=Cn)}return gn.tail!==null?(Lt=gn.tail,gn.rendering=Lt,gn.tail=Lt.sibling,gn.renderingStartTime=ts(),Lt.sibling=null,Bt=er.current,ir(er,tn?Bt&1|2:Bt&1),Lt):(yo(Lt),null);case 22:case 23:return xy(),tn=Lt.memoizedState!==null,Bt!==null&&Bt.memoizedState!==null!==tn&&(Lt.flags|=8192),tn&&Lt.mode&1?Sl&1073741824&&(yo(Lt),an&&Lt.subtreeFlags&6&&(Lt.flags|=8192)):yo(Lt),null;case 24:return null;case 25:return null}throw Error(at(156,Lt.tag))}var F0=st.ReactCurrentOwner,yl=!1;function cs(Bt,Lt,Gt,tn){Lt.child=Bt===null?Uy(Lt,null,Gt,tn):dp(Lt,Bt.child,Gt,tn)}function e0(Bt,Lt,Gt,tn,gn){Gt=Gt.render;var Cn=Lt.ref;return os(Lt,gn),tn=qo(Bt,Lt,Gt,tn,Cn,gn),Gt=Qm(),Bt!==null&&!yl?(Lt.updateQueue=Bt.updateQueue,Lt.flags&=-2053,Bt.lanes&=~gn,xs(Bt,Lt,gn)):(_a&&Gt&&wm(Lt),Lt.flags|=1,cs(Bt,Lt,tn,gn),Lt.child)}function n0(Bt,Lt,Gt,tn,gn){if(Bt===null){var Cn=Gt.type;return typeof Cn=="function"&&!Cy(Cn)&&Cn.defaultProps===void 0&&Gt.compare===null&&Gt.defaultProps===void 0?(Lt.tag=15,Lt.type=Cn,r0(Bt,Lt,Cn,tn,gn)):(Bt=Lm(Gt.type,null,tn,Lt,Lt.mode,gn),Bt.ref=Lt.ref,Bt.return=Lt,Lt.child=Bt)}if(Cn=Bt.child,!(Bt.lanes&gn)){var Gn=Cn.memoizedProps;if(Gt=Gt.compare,Gt=Gt!==null?Gt:ns,Gt(Gn,tn)&&Bt.ref===Lt.ref)return xs(Bt,Lt,gn)}return Lt.flags|=1,Bt=Su(Cn,tn),Bt.ref=Lt.ref,Bt.return=Lt,Lt.child=Bt}function r0(Bt,Lt,Gt,tn,gn){if(Bt!==null&&ns(Bt.memoizedProps,tn)&&Bt.ref===Lt.ref)if(yl=!1,(Bt.lanes&gn)!==0)Bt.flags&131072&&(yl=!0);else return Lt.lanes=Bt.lanes,xs(Bt,Lt,gn);return Hl(Bt,Lt,Gt,tn,gn)}function i0(Bt,Lt,Gt){var tn=Lt.pendingProps,gn=tn.children,Cn=Bt!==null?Bt.memoizedState:null;if(tn.mode==="hidden")if(!(Lt.mode&1))Lt.memoizedState={baseLanes:0,cachePool:null},ir(Ep,Sl),Sl|=Gt;else if(Gt&1073741824)Lt.memoizedState={baseLanes:0,cachePool:null},tn=Cn!==null?Cn.baseLanes:Gt,ir(Ep,Sl),Sl|=tn;else return Bt=Cn!==null?Cn.baseLanes|Gt:Gt,Lt.lanes=Lt.childLanes=1073741824,Lt.memoizedState={baseLanes:Bt,cachePool:null},Lt.updateQueue=null,ir(Ep,Sl),Sl|=Bt,null;else Cn!==null?(tn=Cn.baseLanes|Gt,Lt.memoizedState=null):tn=Gt,ir(Ep,Sl),Sl|=tn;return cs(Bt,Lt,gn,Gt),Lt.child}function o0(Bt,Lt){var Gt=Lt.ref;(Bt===null&&Gt!==null||Bt!==null&&Bt.ref!==Gt)&&(Lt.flags|=512,Lt.flags|=2097152)}function Hl(Bt,Lt,Gt,tn,gn){var Cn=so(Gt)?$r:dr.current;return Cn=no(Lt,Cn),os(Lt,gn),Gt=qo(Bt,Lt,Gt,tn,Cn,gn),tn=Qm(),Bt!==null&&!yl?(Lt.updateQueue=Bt.updateQueue,Lt.flags&=-2053,Bt.lanes&=~gn,xs(Bt,Lt,gn)):(_a&&tn&&wm(Lt),Lt.flags|=1,cs(Bt,Lt,Gt,gn),Lt.child)}function a0(Bt,Lt,Gt,tn,gn){if(so(Gt)){var Cn=!0;vo(Lt)}else Cn=!1;if(os(Lt,gn),Lt.stateNode===null)Bt!==null&&(Bt.alternate=null,Lt.alternate=null,Lt.flags|=2),jy(Lt,Gt,tn),sp(Lt,Gt,tn,gn),tn=!0;else if(Bt===null){var Gn=Lt.stateNode,rr=Lt.memoizedProps;Gn.props=rr;var _r=Gn.context,Vr=Gt.contextType;typeof Vr=="object"&&Vr!==null?Vr=Vo(Vr):(Vr=so(Gt)?$r:dr.current,Vr=no(Lt,Vr));var oo=Gt.getDerivedStateFromProps,Io=typeof oo=="function"||typeof Gn.getSnapshotBeforeUpdate=="function";Io||typeof Gn.UNSAFE_componentWillReceiveProps!="function"&&typeof Gn.componentWillReceiveProps!="function"||(rr!==tn||_r!==Vr)&&Km(Lt,Gn,tn,Vr),ws=!1;var ho=Lt.memoizedState;Gn.state=ho,Ll(Lt,tn,Gn,gn),_r=Lt.memoizedState,rr!==tn||ho!==_r||br.current||ws?(typeof oo=="function"&&(Np(Lt,Gt,oo,tn),_r=Lt.memoizedState),(rr=ws||Oy(Lt,Gt,rr,tn,ho,_r,Vr))?(Io||typeof Gn.UNSAFE_componentWillMount!="function"&&typeof Gn.componentWillMount!="function"||(typeof Gn.componentWillMount=="function"&&Gn.componentWillMount(),typeof Gn.UNSAFE_componentWillMount=="function"&&Gn.UNSAFE_componentWillMount()),typeof Gn.componentDidMount=="function"&&(Lt.flags|=4194308)):(typeof Gn.componentDidMount=="function"&&(Lt.flags|=4194308),Lt.memoizedProps=tn,Lt.memoizedState=_r),Gn.props=tn,Gn.state=_r,Gn.context=Vr,tn=rr):(typeof Gn.componentDidMount=="function"&&(Lt.flags|=4194308),tn=!1)}else{Gn=Lt.stateNode,Ym(Bt,Lt),rr=Lt.memoizedProps,Vr=Lt.type===Lt.elementType?rr:ls(Lt.type,rr),Gn.props=Vr,Io=Lt.pendingProps,ho=Gn.context,_r=Gt.contextType,typeof _r=="object"&&_r!==null?_r=Vo(_r):(_r=so(Gt)?$r:dr.current,_r=no(Lt,_r));var Jo=Gt.getDerivedStateFromProps;(oo=typeof Jo=="function"||typeof Gn.getSnapshotBeforeUpdate=="function")||typeof Gn.UNSAFE_componentWillReceiveProps!="function"&&typeof Gn.componentWillReceiveProps!="function"||(rr!==Io||ho!==_r)&&Km(Lt,Gn,tn,_r),ws=!1,ho=Lt.memoizedState,Gn.state=ho,Ll(Lt,tn,Gn,gn);var lo=Lt.memoizedState;rr!==Io||ho!==lo||br.current||ws?(typeof Jo=="function"&&(Np(Lt,Gt,Jo,tn),lo=Lt.memoizedState),(Vr=ws||Oy(Lt,Gt,Vr,tn,ho,lo,_r)||!1)?(oo||typeof Gn.UNSAFE_componentWillUpdate!="function"&&typeof Gn.componentWillUpdate!="function"||(typeof Gn.componentWillUpdate=="function"&&Gn.componentWillUpdate(tn,lo,_r),typeof Gn.UNSAFE_componentWillUpdate=="function"&&Gn.UNSAFE_componentWillUpdate(tn,lo,_r)),typeof Gn.componentDidUpdate=="function"&&(Lt.flags|=4),typeof Gn.getSnapshotBeforeUpdate=="function"&&(Lt.flags|=1024)):(typeof Gn.componentDidUpdate!="function"||rr===Bt.memoizedProps&&ho===Bt.memoizedState||(Lt.flags|=4),typeof Gn.getSnapshotBeforeUpdate!="function"||rr===Bt.memoizedProps&&ho===Bt.memoizedState||(Lt.flags|=1024),Lt.memoizedProps=tn,Lt.memoizedState=lo),Gn.props=tn,Gn.state=lo,Gn.context=_r,tn=Vr):(typeof Gn.componentDidUpdate!="function"||rr===Bt.memoizedProps&&ho===Bt.memoizedState||(Lt.flags|=4),typeof Gn.getSnapshotBeforeUpdate!="function"||rr===Bt.memoizedProps&&ho===Bt.memoizedState||(Lt.flags|=1024),tn=!1)}return oy(Bt,Lt,Gt,tn,Cn,gn)}function oy(Bt,Lt,Gt,tn,gn,Cn){o0(Bt,Lt);var Gn=(Lt.flags&128)!==0;if(!tn&&!Gn)return gn&&_o(Lt,Gt,!1),xs(Bt,Lt,Cn);tn=Lt.stateNode,F0.current=Lt;var rr=Gn&&typeof Gt.getDerivedStateFromError!="function"?null:tn.render();return Lt.flags|=1,Bt!==null&&Gn?(Lt.child=dp(Lt,Bt.child,null,Cn),Lt.child=dp(Lt,null,rr,Cn)):cs(Bt,Lt,rr,Cn),Lt.memoizedState=tn.state,gn&&_o(Lt,Gt,!0),Lt.child}function s0(Bt){var Lt=Bt.stateNode;Lt.pendingContext?po(Bt,Lt.pendingContext,Lt.pendingContext!==Lt.context):Lt.context&&po(Bt,Lt.context,!1),Jm(Bt,Lt.containerInfo)}function l0(Bt,Lt,Gt,tn,gn){return up(),zp(gn),Lt.flags|=256,cs(Bt,Lt,Gt,tn),Lt.child}var Sm={dehydrated:null,treeContext:null,retryLane:0};function $l(Bt){return{baseLanes:Bt,cachePool:null}}function c0(Bt,Lt,Gt){var tn=Lt.pendingProps,gn=er.current,Cn=!1,Gn=(Lt.flags&128)!==0,rr;if((rr=Gn)||(rr=Bt!==null&&Bt.memoizedState===null?!1:(gn&2)!==0),rr?(Cn=!0,Lt.flags&=-129):(Bt===null||Bt.memoizedState!==null)&&(gn|=1),ir(er,gn&1),Bt===null)return Zm(Lt),Bt=Lt.memoizedState,Bt!==null&&(Bt=Bt.dehydrated,Bt!==null)?(Lt.mode&1?Mn(Bt)?Lt.lanes=8:Lt.lanes=1073741824:Lt.lanes=1,null):(gn=tn.children,Bt=tn.fallback,Cn?(tn=Lt.mode,Cn=Lt.child,gn={mode:"hidden",children:gn},!(tn&1)&&Cn!==null?(Cn.childLanes=0,Cn.pendingProps=gn):Cn=um(gn,tn,0,null),Bt=zu(Bt,tn,Gt,null),Cn.return=Lt,Bt.return=Lt,Cn.sibling=Bt,Lt.child=Cn,Lt.child.memoizedState=$l(Gt),Lt.memoizedState=Sm,Bt):ay(Lt,gn));if(gn=Bt.memoizedState,gn!==null){if(rr=gn.dehydrated,rr!==null){if(Gn)return Lt.flags&256?(Lt.flags&=-257,Em(Bt,Lt,Gt,Error(at(422)))):Lt.memoizedState!==null?(Lt.child=Bt.child,Lt.flags|=128,null):(Cn=tn.fallback,gn=Lt.mode,tn=um({mode:"visible",children:tn.children},gn,0,null),Cn=zu(Cn,gn,Gt,null),Cn.flags|=2,tn.return=Lt,Cn.return=Lt,tn.sibling=Cn,Lt.child=tn,Lt.mode&1&&dp(Lt,Bt.child,null,Gt),Lt.child.memoizedState=$l(Gt),Lt.memoizedState=Sm,Cn);if(!(Lt.mode&1))Lt=Em(Bt,Lt,Gt,null);else if(Mn(rr))Lt=Em(Bt,Lt,Gt,Error(at(419)));else if(tn=(Gt&Bt.childLanes)!==0,yl||tn){if(tn=fs,tn!==null){switch(Gt&-Gt){case 4:Cn=2;break;case 16:Cn=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:Cn=32;break;case 536870912:Cn=268435456;break;default:Cn=0}tn=Cn&(tn.suspendedLanes|Gt)?0:Cn,tn!==0&&tn!==gn.retryLane&&(gn.retryLane=tn,Pl(Bt,tn,-1))}jm(),Lt=Em(Bt,Lt,Gt,Error(at(421)))}else xn(rr)?(Lt.flags|=128,Lt.child=Bt.child,Lt=Uu.bind(null,Bt),dn(rr,Lt),Lt=null):(Gt=gn.treeContext,_n&&(As=Un(rr),Hs=Lt,_a=!0,Wl=null,cp=!1,Gt!==null&&(qs[Ys++]=bu,qs[Ys++]=Ul,qs[Ys++]=Au,bu=Gt.id,Ul=Gt.overflow,Au=Lt)),Lt=ay(Lt,Lt.pendingProps.children),Lt.flags|=4096);return Lt}return Cn?(tn=h0(Bt,Lt,tn.children,tn.fallback,Gt),Cn=Lt.child,gn=Bt.child.memoizedState,Cn.memoizedState=gn===null?$l(Gt):{baseLanes:gn.baseLanes|Gt,cachePool:null},Cn.childLanes=Bt.childLanes&~Gt,Lt.memoizedState=Sm,tn):(Gt=u0(Bt,Lt,tn.children,Gt),Lt.memoizedState=null,Gt)}return Cn?(tn=h0(Bt,Lt,tn.children,tn.fallback,Gt),Cn=Lt.child,gn=Bt.child.memoizedState,Cn.memoizedState=gn===null?$l(Gt):{baseLanes:gn.baseLanes|Gt,cachePool:null},Cn.childLanes=Bt.childLanes&~Gt,Lt.memoizedState=Sm,tn):(Gt=u0(Bt,Lt,tn.children,Gt),Lt.memoizedState=null,Gt)}function ay(Bt,Lt){return Lt=um({mode:"visible",children:Lt},Bt.mode,0,null),Lt.return=Bt,Bt.child=Lt}function u0(Bt,Lt,Gt,tn){var gn=Bt.child;return Bt=gn.sibling,Gt=Su(gn,{mode:"visible",children:Gt}),!(Lt.mode&1)&&(Gt.lanes=tn),Gt.return=Lt,Gt.sibling=null,Bt!==null&&(tn=Lt.deletions,tn===null?(Lt.deletions=[Bt],Lt.flags|=16):tn.push(Bt)),Lt.child=Gt}function h0(Bt,Lt,Gt,tn,gn){var Cn=Lt.mode;Bt=Bt.child;var Gn=Bt.sibling,rr={mode:"hidden",children:Gt};return!(Cn&1)&&Lt.child!==Bt?(Gt=Lt.child,Gt.childLanes=0,Gt.pendingProps=rr,Lt.deletions=null):(Gt=Su(Bt,rr),Gt.subtreeFlags=Bt.subtreeFlags&14680064),Gn!==null?tn=Su(Gn,tn):(tn=zu(tn,Cn,gn,null),tn.flags|=2),tn.return=Lt,Gt.return=Lt,Gt.sibling=tn,Lt.child=Gt,tn}function Em(Bt,Lt,Gt,tn){return tn!==null&&zp(tn),dp(Lt,Bt.child,null,Gt),Bt=ay(Lt,Lt.pendingProps.children),Bt.flags|=2,Lt.memoizedState=null,Bt}function Ru(Bt,Lt,Gt){Bt.lanes|=Lt;var tn=Bt.alternate;tn!==null&&(tn.lanes|=Lt),$s(Bt.return,Lt,Gt)}function sy(Bt,Lt,Gt,tn,gn){var Cn=Bt.memoizedState;Cn===null?Bt.memoizedState={isBackwards:Lt,rendering:null,renderingStartTime:0,last:tn,tail:Gt,tailMode:gn}:(Cn.isBackwards=Lt,Cn.rendering=null,Cn.renderingStartTime=0,Cn.last=tn,Cn.tail=Gt,Cn.tailMode=gn)}function d0(Bt,Lt,Gt){var tn=Lt.pendingProps,gn=tn.revealOrder,Cn=tn.tail;if(cs(Bt,Lt,tn.children,Gt),tn=er.current,tn&2)tn=tn&1|2,Lt.flags|=128;else{if(Bt!==null&&Bt.flags&128)e:for(Bt=Lt.child;Bt!==null;){if(Bt.tag===13)Bt.memoizedState!==null&&Ru(Bt,Gt,Lt);else if(Bt.tag===19)Ru(Bt,Gt,Lt);else if(Bt.child!==null){Bt.child.return=Bt,Bt=Bt.child;continue}if(Bt===Lt)break e;for(;Bt.sibling===null;){if(Bt.return===null||Bt.return===Lt)break e;Bt=Bt.return}Bt.sibling.return=Bt.return,Bt=Bt.sibling}tn&=1}if(ir(er,tn),!(Lt.mode&1))Lt.memoizedState=null;else switch(gn){case"forwards":for(Gt=Lt.child,gn=null;Gt!==null;)Bt=Gt.alternate,Bt!==null&&Er(Bt)===null&&(gn=Gt),Gt=Gt.sibling;Gt=gn,Gt===null?(gn=Lt.child,Lt.child=null):(gn=Gt.sibling,Gt.sibling=null),sy(Lt,!1,gn,Gt,Cn);break;case"backwards":for(Gt=null,gn=Lt.child,Lt.child=null;gn!==null;){if(Bt=gn.alternate,Bt!==null&&Er(Bt)===null){Lt.child=gn;break}Bt=gn.sibling,gn.sibling=Gt,Gt=gn,gn=Bt}sy(Lt,!0,Gt,null,Cn);break;case"together":sy(Lt,!1,null,null,void 0);break;default:Lt.memoizedState=null}return Lt.child}function xs(Bt,Lt,Gt){if(Bt!==null&&(Lt.dependencies=Bt.dependencies),Ip|=Lt.lanes,!(Gt&Lt.childLanes))return null;if(Bt!==null&&Lt.child!==Bt.child)throw Error(at(153));if(Lt.child!==null){for(Bt=Lt.child,Gt=Su(Bt,Bt.pendingProps),Lt.child=Gt,Gt.return=Lt;Bt.sibling!==null;)Bt=Bt.sibling,Gt=Gt.sibling=Su(Bt,Bt.pendingProps),Gt.return=Lt;Gt.sibling=null}return Lt.child}function U0(Bt,Lt,Gt){switch(Lt.tag){case 3:s0(Lt),up();break;case 5:zy(Lt);break;case 1:so(Lt.type)&&vo(Lt);break;case 4:Jm(Lt,Lt.stateNode.containerInfo);break;case 10:Dp(Lt,Lt.type._context,Lt.memoizedProps.value);break;case 13:var tn=Lt.memoizedState;if(tn!==null)return tn.dehydrated!==null?(ir(er,er.current&1),Lt.flags|=128,null):Gt&Lt.child.childLanes?c0(Bt,Lt,Gt):(ir(er,er.current&1),Bt=xs(Bt,Lt,Gt),Bt!==null?Bt.sibling:null);ir(er,er.current&1);break;case 19:if(tn=(Gt&Lt.childLanes)!==0,Bt.flags&128){if(tn)return d0(Bt,Lt,Gt);Lt.flags|=128}var gn=Lt.memoizedState;if(gn!==null&&(gn.rendering=null,gn.tail=null,gn.lastEffect=null),ir(er,er.current),tn)break;return null;case 22:case 23:return Lt.lanes=0,i0(Bt,Lt,Gt)}return xs(Bt,Lt,Gt)}function z0(Bt,Lt){switch(Vs(Lt),Lt.tag){case 1:return so(Lt.type)&&fo(),Bt=Lt.flags,Bt&65536?(Lt.flags=Bt&-65537|128,Lt):null;case 3:return mp(),tr(br),tr(dr),ro(),Bt=Lt.flags,Bt&65536&&!(Bt&128)?(Lt.flags=Bt&-65537|128,Lt):null;case 5:return Cu(Lt),null;case 13:if(tr(er),Bt=Lt.memoizedState,Bt!==null&&Bt.dehydrated!==null){if(Lt.alternate===null)throw Error(at(340));up()}return Bt=Lt.flags,Bt&65536?(Lt.flags=Bt&-65537|128,Lt):null;case 19:return tr(er),null;case 4:return mp(),null;case 10:return bs(Lt.type._context),null;case 22:case 23:return xy(),null;case 24:return null;default:return null}}var Tm=!1,Ju=!1,W0=typeof WeakSet=="function"?WeakSet:Set,Xr=null;function tm(Bt,Lt){var Gt=Bt.ref;if(Gt!==null)if(typeof Gt=="function")try{Gt(null)}catch(tn){Ds(Bt,Lt,tn)}else Gt.current=null}function ly(Bt,Lt,Gt){try{Gt()}catch(tn){Ds(Bt,Lt,tn)}}var f0=!1;function cy(Bt,Lt){for(Ft(Bt.containerInfo),Xr=Lt;Xr!==null;)if(Bt=Xr,Lt=Bt.child,(Bt.subtreeFlags&1028)!==0&&Lt!==null)Lt.return=Bt,Xr=Lt;else for(;Xr!==null;){Bt=Xr;try{var Gt=Bt.alternate;if(Bt.flags&1024)switch(Bt.tag){case 0:case 11:case 15:break;case 1:if(Gt!==null){var tn=Gt.memoizedProps,gn=Gt.memoizedState,Cn=Bt.stateNode,Gn=Cn.getSnapshotBeforeUpdate(Bt.elementType===Bt.type?tn:ls(Bt.type,tn),gn);Cn.__reactInternalSnapshotBeforeUpdate=Gn}break;case 3:an&&xr(Bt.stateNode.containerInfo);break;case 5:case 6:case 4:case 17:break;default:throw Error(at(163))}}catch(rr){Ds(Bt,Bt.return,rr)}if(Lt=Bt.sibling,Lt!==null){Lt.return=Bt.return,Xr=Lt;break}Xr=Bt.return}return Gt=f0,f0=!1,Gt}function Gl(Bt,Lt,Gt){var tn=Lt.updateQueue;if(tn=tn!==null?tn.lastEffect:null,tn!==null){var gn=tn=tn.next;do{if((gn.tag&Bt)===Bt){var Cn=gn.destroy;gn.destroy=void 0,Cn!==void 0&&ly(Lt,Gt,Cn)}gn=gn.next}while(gn!==tn)}}function Bu(Bt,Lt){if(Lt=Lt.updateQueue,Lt=Lt!==null?Lt.lastEffect:null,Lt!==null){var Gt=Lt=Lt.next;do{if((Gt.tag&Bt)===Bt){var tn=Gt.create;Gt.destroy=tn()}Gt=Gt.next}while(Gt!==Lt)}}function uy(Bt){var Lt=Bt.ref;if(Lt!==null){var Gt=Bt.stateNode;switch(Bt.tag){case 5:Bt=Ot(Gt);break;default:Bt=Gt}typeof Lt=="function"?Lt(Bt):Lt.current=Bt}}function hy(Bt,Lt,Gt){if(Xs&&typeof Xs.onCommitFiberUnmount=="function")try{Xs.onCommitFiberUnmount(Vu,Lt)}catch{}switch(Lt.tag){case 0:case 11:case 14:case 15:if(Bt=Lt.updateQueue,Bt!==null&&(Bt=Bt.lastEffect,Bt!==null)){var tn=Bt=Bt.next;do{var gn=tn,Cn=gn.destroy;gn=gn.tag,Cn!==void 0&&(gn&2||gn&4)&&ly(Lt,Gt,Cn),tn=tn.next}while(tn!==Bt)}break;case 1:if(tm(Lt,Gt),Bt=Lt.stateNode,typeof Bt.componentWillUnmount=="function")try{Bt.props=Lt.memoizedProps,Bt.state=Lt.memoizedState,Bt.componentWillUnmount()}catch(Gn){Ds(Lt,Gt,Gn)}break;case 5:tm(Lt,Gt);break;case 4:an?fy(Bt,Lt,Gt):Qt&&Qt&&(Lt=Lt.stateNode.containerInfo,Gt=Tr(Lt),jr(Lt,Gt))}}function p0(Bt,Lt,Gt){for(var tn=Lt;;)if(hy(Bt,tn,Gt),tn.child===null||an&&tn.tag===4){if(tn===Lt)break;for(;tn.sibling===null;){if(tn.return===null||tn.return===Lt)return;tn=tn.return}tn.sibling.return=tn.return,tn=tn.sibling}else tn.child.return=tn,tn=tn.child}function lu(Bt){var Lt=Bt.alternate;Lt!==null&&(Bt.alternate=null,lu(Lt)),Bt.child=null,Bt.deletions=null,Bt.sibling=null,Bt.tag===5&&(Lt=Bt.stateNode,Lt!==null&&Tn(Lt)),Bt.stateNode=null,Bt.return=null,Bt.dependencies=null,Bt.memoizedProps=null,Bt.memoizedState=null,Bt.pendingProps=null,Bt.stateNode=null,Bt.updateQueue=null}function Im(Bt){return Bt.tag===5||Bt.tag===3||Bt.tag===4}function Ou(Bt){e:for(;;){for(;Bt.sibling===null;){if(Bt.return===null||Im(Bt.return))return null;Bt=Bt.return}for(Bt.sibling.return=Bt.return,Bt=Bt.sibling;Bt.tag!==5&&Bt.tag!==6&&Bt.tag!==18;){if(Bt.flags&2||Bt.child===null||Bt.tag===4)continue e;Bt.child.return=Bt,Bt=Bt.child}if(!(Bt.flags&2))return Bt.stateNode}}function _l(Bt){if(an){e:{for(var Lt=Bt.return;Lt!==null;){if(Im(Lt))break e;Lt=Lt.return}throw Error(at(160))}var Gt=Lt;switch(Gt.tag){case 5:Lt=Gt.stateNode,Gt.flags&32&&(zn(Lt),Gt.flags&=-33),Gt=Ou(Bt),Am(Bt,Gt,Lt);break;case 3:case 4:Lt=Gt.stateNode.containerInfo,Gt=Ou(Bt),dy(Bt,Gt,Lt);break;default:throw Error(at(161))}}}function dy(Bt,Lt,Gt){var tn=Bt.tag;if(tn===5||tn===6)Bt=Bt.stateNode,Lt?Zn(Gt,Bt,Lt):Xt(Gt,Bt);else if(tn!==4&&(Bt=Bt.child,Bt!==null))for(dy(Bt,Lt,Gt),Bt=Bt.sibling;Bt!==null;)dy(Bt,Lt,Gt),Bt=Bt.sibling}function Am(Bt,Lt,Gt){var tn=Bt.tag;if(tn===5||tn===6)Bt=Bt.stateNode,Lt?On(Gt,Bt,Lt):Zt(Gt,Bt);else if(tn!==4&&(Bt=Bt.child,Bt!==null))for(Am(Bt,Lt,Gt),Bt=Bt.sibling;Bt!==null;)Am(Bt,Lt,Gt),Bt=Bt.sibling}function fy(Bt,Lt,Gt){for(var tn=Lt,gn=!1,Cn,Gn;;){if(!gn){gn=tn.return;e:for(;;){if(gn===null)throw Error(at(160));switch(Cn=gn.stateNode,gn.tag){case 5:Gn=!1;break e;case 3:Cn=Cn.containerInfo,Gn=!0;break e;case 4:Cn=Cn.containerInfo,Gn=!0;break e}gn=gn.return}gn=!0}if(tn.tag===5||tn.tag===6)p0(Bt,tn,Gt),Gn?qn(Cn,tn.stateNode):Vn(Cn,tn.stateNode);else if(tn.tag===18)Gn?Gr(Cn,tn.stateNode):Nr(Cn,tn.stateNode);else if(tn.tag===4){if(tn.child!==null){Cn=tn.stateNode.containerInfo,Gn=!0,tn.child.return=tn,tn=tn.child;continue}}else if(hy(Bt,tn,Gt),tn.child!==null){tn.child.return=tn,tn=tn.child;continue}if(tn===Lt)break;for(;tn.sibling===null;){if(tn.return===null||tn.return===Lt)return;tn=tn.return,tn.tag===4&&(gn=!1)}tn.sibling.return=tn.return,tn=tn.sibling}}function Qu(Bt,Lt){if(an){switch(Lt.tag){case 0:case 11:case 14:case 15:Gl(3,Lt,Lt.return),Bu(3,Lt),Gl(5,Lt,Lt.return);return;case 1:return;case 5:var Gt=Lt.stateNode;if(Gt!=null){var tn=Lt.memoizedProps;Bt=Bt!==null?Bt.memoizedProps:tn;var gn=Lt.type,Cn=Lt.updateQueue;Lt.updateQueue=null,Cn!==null&&jn(Gt,Cn,gn,Bt,tn,Lt)}return;case 6:if(Lt.stateNode===null)throw Error(at(162));Gt=Lt.memoizedProps,Sn(Lt.stateNode,Bt!==null?Bt.memoizedProps:Gt,Gt);return;case 3:_n&&Bt!==null&&Bt.memoizedState.isDehydrated&&Hr(Lt.stateNode.containerInfo);return;case 12:return;case 13:Yl(Lt);return;case 19:Yl(Lt);return;case 17:return}throw Error(at(163))}switch(Lt.tag){case 0:case 11:case 14:case 15:Gl(3,Lt,Lt.return),Bu(3,Lt),Gl(5,Lt,Lt.return);return;case 12:return;case 13:Yl(Lt);return;case 19:Yl(Lt);return;case 3:_n&&Bt!==null&&Bt.memoizedState.isDehydrated&&Hr(Lt.stateNode.containerInfo);break;case 22:case 23:return}e:if(Qt){switch(Lt.tag){case 1:case 5:case 6:break e;case 3:case 4:Lt=Lt.stateNode,jr(Lt.containerInfo,Lt.pendingChildren);break e}throw Error(at(163))}}function Yl(Bt){var Lt=Bt.updateQueue;if(Lt!==null){Bt.updateQueue=null;var Gt=Bt.stateNode;Gt===null&&(Gt=Bt.stateNode=new W0),Lt.forEach(function(tn){var gn=x0.bind(null,Bt,tn);Gt.has(tn)||(Gt.add(tn),tn.then(gn,gn))})}}function m0(Bt,Lt){for(Xr=Lt;Xr!==null;){Lt=Xr;var Gt=Lt.deletions;if(Gt!==null)for(var tn=0;tn";case rm:return":has("+(im(Bt)||"")+")";case xl:return'[role="'+Bt.value+'"]';case _h:return'"'+Bt.value+'"';case kp:return'[data-testname="'+Bt.value+'"]';default:throw Error(at(365))}}function y0(Bt,Lt){var Gt=[];Bt=[Bt,0];for(var tn=0;tngn&&(gn=Gn),tn&=~Cn}if(tn=gn,tn=ts()-tn,tn=(120>tn?120:480>tn?480:1080>tn?1080:1920>tn?1920:3e3>tn?3e3:4320>tn?4320:1960*H0(tn/1960))-tn,10Bt?16:Bt,ku===null)var tn=!1;else{if(Bt=ku,ku=null,sm=0,Bo&6)throw Error(at(331));var gn=Bo;for(Bo|=4,Xr=Bt.current;Xr!==null;){var Cn=Xr,Gn=Cn.child;if(Xr.flags&16){var rr=Cn.deletions;if(rr!==null){for(var _r=0;_rts()-wy?uu(Bt,0):by|=Gt),mo(Bt,Lt)}function _0(Bt,Lt){Lt===0&&(Bt.mode&1?(Lt=Po,Po<<=1,!(Po&130023424)&&(Po=4194304)):Lt=1);var Gt=Os();Bt=$p(Bt,Lt),Bt!==null&&(Zo(Bt,Lt,Gt),mo(Bt,Gt))}function Uu(Bt){var Lt=Bt.memoizedState,Gt=0;Lt!==null&&(Gt=Lt.retryLane),_0(Bt,Gt)}function x0(Bt,Lt){var Gt=0;switch(Bt.tag){case 13:var tn=Bt.stateNode,gn=Bt.memoizedState;gn!==null&&(Gt=gn.retryLane);break;case 19:tn=Bt.stateNode;break;default:throw Error(at(314))}tn!==null&&tn.delete(Lt),_0(Bt,Gt)}var Ay;Ay=function(Bt,Lt,Gt){if(Bt!==null)if(Bt.memoizedProps!==Lt.pendingProps||br.current)yl=!0;else{if(!(Bt.lanes&Gt)&&!(Lt.flags&128))return yl=!1,U0(Bt,Lt,Gt);yl=!!(Bt.flags&131072)}else yl=!1,_a&&Lt.flags&1048576&&Dy(Lt,Fp,Lt.index);switch(Lt.lanes=0,Lt.tag){case 2:var tn=Lt.type;Bt!==null&&(Bt.alternate=null,Lt.alternate=null,Lt.flags|=2),Bt=Lt.pendingProps;var gn=no(Lt,dr.current);os(Lt,Gt),gn=qo(null,Lt,tn,Bt,gn,Gt);var Cn=Qm();return Lt.flags|=1,typeof gn=="object"&&gn!==null&&typeof gn.render=="function"&&gn.$$typeof===void 0?(Lt.tag=1,Lt.memoizedState=null,Lt.updateQueue=null,so(tn)?(Cn=!0,vo(Lt)):Cn=!1,Lt.memoizedState=gn.state!==null&&gn.state!==void 0?gn.state:null,qm(Lt),gn.updater=bm,Lt.stateNode=gn,gn._reactInternals=Lt,sp(Lt,tn,Bt,Gt),Lt=oy(null,Lt,tn,!0,Cn,Gt)):(Lt.tag=0,_a&&Cn&&wm(Lt),cs(null,Lt,gn,Gt),Lt=Lt.child),Lt;case 16:tn=Lt.elementType;e:{switch(Bt!==null&&(Bt.alternate=null,Lt.alternate=null,Lt.flags|=2),Bt=Lt.pendingProps,gn=tn._init,tn=gn(tn._payload),Lt.type=tn,gn=Lt.tag=k0(tn),Bt=ls(tn,Bt),gn){case 0:Lt=Hl(null,Lt,tn,Bt,Gt);break e;case 1:Lt=a0(null,Lt,tn,Bt,Gt);break e;case 11:Lt=e0(null,Lt,tn,Bt,Gt);break e;case 14:Lt=n0(null,Lt,tn,ls(tn.type,Bt),Gt);break e}throw Error(at(306,tn,""))}return Lt;case 0:return tn=Lt.type,gn=Lt.pendingProps,gn=Lt.elementType===tn?gn:ls(tn,gn),Hl(Bt,Lt,tn,gn,Gt);case 1:return tn=Lt.type,gn=Lt.pendingProps,gn=Lt.elementType===tn?gn:ls(tn,gn),a0(Bt,Lt,tn,gn,Gt);case 3:e:{if(s0(Lt),Bt===null)throw Error(at(387));tn=Lt.pendingProps,Cn=Lt.memoizedState,gn=Cn.element,Ym(Bt,Lt),Ll(Lt,tn,null,Gt);var Gn=Lt.memoizedState;if(tn=Gn.element,_n&&Cn.isDehydrated)if(Cn={element:tn,isDehydrated:!1,cache:Gn.cache,transitions:Gn.transitions},Lt.updateQueue.baseState=Cn,Lt.memoizedState=Cn,Lt.flags&256){gn=Error(at(423)),Lt=l0(Bt,Lt,tn,Gt,gn);break e}else if(tn!==gn){gn=Error(at(424)),Lt=l0(Bt,Lt,tn,Gt,gn);break e}else for(_n&&(As=Ln(Lt.stateNode.containerInfo),Hs=Lt,_a=!0,Wl=null,cp=!1),Gt=Uy(Lt,null,tn,Gt),Lt.child=Gt;Gt;)Gt.flags=Gt.flags&-3|4096,Gt=Gt.sibling;else{if(up(),tn===gn){Lt=xs(Bt,Lt,Gt);break e}cs(Bt,Lt,tn,Gt)}Lt=Lt.child}return Lt;case 5:return zy(Lt),Bt===null&&Zm(Lt),tn=Lt.type,gn=Lt.pendingProps,Cn=Bt!==null?Bt.memoizedProps:null,Gn=gn.children,sn(tn,gn)?Gn=null:Cn!==null&&sn(tn,Cn)&&(Lt.flags|=32),o0(Bt,Lt),cs(Bt,Lt,Gn,Gt),Lt.child;case 6:return Bt===null&&Zm(Lt),null;case 13:return c0(Bt,Lt,Gt);case 4:return Jm(Lt,Lt.stateNode.containerInfo),tn=Lt.pendingProps,Bt===null?Lt.child=dp(Lt,null,tn,Gt):cs(Bt,Lt,tn,Gt),Lt.child;case 11:return tn=Lt.type,gn=Lt.pendingProps,gn=Lt.elementType===tn?gn:ls(tn,gn),e0(Bt,Lt,tn,gn,Gt);case 7:return cs(Bt,Lt,Lt.pendingProps,Gt),Lt.child;case 8:return cs(Bt,Lt,Lt.pendingProps.children,Gt),Lt.child;case 12:return cs(Bt,Lt,Lt.pendingProps.children,Gt),Lt.child;case 10:e:{if(tn=Lt.type._context,gn=Lt.pendingProps,Cn=Lt.memoizedProps,Gn=gn.value,Dp(Lt,tn,Gn),Cn!==null)if(Zs(Cn.value,Gn)){if(Cn.children===gn.children&&!br.current){Lt=xs(Bt,Lt,Gt);break e}}else for(Cn=Lt.child,Cn!==null&&(Cn.return=Lt);Cn!==null;){var rr=Cn.dependencies;if(rr!==null){Gn=Cn.child;for(var _r=rr.firstContext;_r!==null;){if(_r.context===tn){if(Cn.tag===1){_r=Ps(-1,Gt&-Gt),_r.tag=2;var Vr=Cn.updateQueue;if(Vr!==null){Vr=Vr.shared;var oo=Vr.pending;oo===null?_r.next=_r:(_r.next=oo.next,oo.next=_r),Vr.pending=_r}}Cn.lanes|=Gt,_r=Cn.alternate,_r!==null&&(_r.lanes|=Gt),$s(Cn.return,Gt,Lt),rr.lanes|=Gt;break}_r=_r.next}}else if(Cn.tag===10)Gn=Cn.type===Lt.type?null:Cn.child;else if(Cn.tag===18){if(Gn=Cn.return,Gn===null)throw Error(at(341));Gn.lanes|=Gt,rr=Gn.alternate,rr!==null&&(rr.lanes|=Gt),$s(Gn,Gt,Lt),Gn=Cn.sibling}else Gn=Cn.child;if(Gn!==null)Gn.return=Cn;else for(Gn=Cn;Gn!==null;){if(Gn===Lt){Gn=null;break}if(Cn=Gn.sibling,Cn!==null){Cn.return=Gn.return,Gn=Cn;break}Gn=Gn.return}Cn=Gn}cs(Bt,Lt,gn.children,Gt),Lt=Lt.child}return Lt;case 9:return gn=Lt.type,tn=Lt.pendingProps.children,os(Lt,Gt),gn=Vo(gn),tn=tn(gn),Lt.flags|=1,cs(Bt,Lt,tn,Gt),Lt.child;case 14:return tn=Lt.type,gn=ls(tn,Lt.pendingProps),gn=ls(tn.type,gn),n0(Bt,Lt,tn,gn,Gt);case 15:return r0(Bt,Lt,Lt.type,Lt.pendingProps,Gt);case 17:return tn=Lt.type,gn=Lt.pendingProps,gn=Lt.elementType===tn?gn:ls(tn,gn),Bt!==null&&(Bt.alternate=null,Lt.alternate=null,Lt.flags|=2),Lt.tag=1,so(tn)?(Bt=!0,vo(Lt)):Bt=!1,os(Lt,Gt),jy(Lt,tn,gn),sp(Lt,tn,gn,Gt),oy(null,Lt,tn,!0,Bt,Gt);case 19:return d0(Bt,Lt,Gt);case 22:return i0(Bt,Lt,Gt)}throw Error(at(156,Lt.tag))};function Nm(Bt,Lt){return tu(Bt,Lt)}function G0(Bt,Lt,Gt,tn){this.tag=Bt,this.key=Gt,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=Lt,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=tn,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ml(Bt,Lt,Gt,tn){return new G0(Bt,Lt,Gt,tn)}function Cy(Bt){return Bt=Bt.prototype,!(!Bt||!Bt.isReactComponent)}function k0(Bt){if(typeof Bt=="function")return Cy(Bt)?1:0;if(Bt!=null){if(Bt=Bt.$$typeof,Bt===gt)return 11;if(Bt===vt)return 14}return 2}function Su(Bt,Lt){var Gt=Bt.alternate;return Gt===null?(Gt=Ml(Bt.tag,Lt,Bt.key,Bt.mode),Gt.elementType=Bt.elementType,Gt.type=Bt.type,Gt.stateNode=Bt.stateNode,Gt.alternate=Bt,Bt.alternate=Gt):(Gt.pendingProps=Lt,Gt.type=Bt.type,Gt.flags=0,Gt.subtreeFlags=0,Gt.deletions=null),Gt.flags=Bt.flags&14680064,Gt.childLanes=Bt.childLanes,Gt.lanes=Bt.lanes,Gt.child=Bt.child,Gt.memoizedProps=Bt.memoizedProps,Gt.memoizedState=Bt.memoizedState,Gt.updateQueue=Bt.updateQueue,Lt=Bt.dependencies,Gt.dependencies=Lt===null?null:{lanes:Lt.lanes,firstContext:Lt.firstContext},Gt.sibling=Bt.sibling,Gt.index=Bt.index,Gt.ref=Bt.ref,Gt}function Lm(Bt,Lt,Gt,tn,gn,Cn){var Gn=2;if(tn=Bt,typeof Bt=="function")Cy(Bt)&&(Gn=1);else if(typeof Bt=="string")Gn=5;else e:switch(Bt){case ut:return zu(Gt.children,gn,Cn,Lt);case ht:Gn=8,gn|=8;break;case dt:return Bt=Ml(12,Gt,Lt,gn|2),Bt.elementType=dt,Bt.lanes=Cn,Bt;case yt:return Bt=Ml(13,Gt,Lt,gn),Bt.elementType=yt,Bt.lanes=Cn,Bt;case bt:return Bt=Ml(19,Gt,Lt,gn),Bt.elementType=bt,Bt.lanes=Cn,Bt;case kt:return um(Gt,gn,Cn,Lt);default:if(typeof Bt=="object"&&Bt!==null)switch(Bt.$$typeof){case pt:Gn=10;break e;case mt:Gn=9;break e;case gt:Gn=11;break e;case vt:Gn=14;break e;case xt:Gn=16,tn=null;break e}throw Error(at(130,Bt==null?Bt:typeof Bt,""))}return Lt=Ml(Gn,Gt,Lt,gn),Lt.elementType=Bt,Lt.type=tn,Lt.lanes=Cn,Lt}function zu(Bt,Lt,Gt,tn){return Bt=Ml(7,Bt,tn,Lt),Bt.lanes=Gt,Bt}function um(Bt,Lt,Gt,tn){return Bt=Ml(22,Bt,tn,Lt),Bt.elementType=kt,Bt.lanes=Gt,Bt.stateNode={},Bt}function Ns(Bt,Lt,Gt){return Bt=Ml(6,Bt,null,Lt),Bt.lanes=Gt,Bt}function Rl(Bt,Lt,Gt){return Lt=Ml(4,Bt.children!==null?Bt.children:[],Bt.key,Lt),Lt.lanes=Gt,Lt.stateNode={containerInfo:Bt.containerInfo,pendingChildren:null,implementation:Bt.implementation},Lt}function q0(Bt,Lt,Gt,tn,gn){this.tag=Lt,this.containerInfo=Bt,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=hn,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=$a(0),this.expirationTimes=$a(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=$a(0),this.identifierPrefix=tn,this.onRecoverableError=gn,_n&&(this.mutableSourceEagerHydrationData=null)}function S0(Bt,Lt,Gt,tn,gn,Cn,Gn,rr,_r){return Bt=new q0(Bt,Lt,Gt,rr,_r),Lt===1?(Lt=1,Cn===!0&&(Lt|=8)):Lt=0,Cn=Ml(3,null,null,Lt),Bt.current=Cn,Cn.stateNode=Bt,Cn.memoizedState={element:tn,isDehydrated:Gt,cache:null,transitions:null},qm(Cn),Bt}function hm(Bt){if(!Bt)return Sr;Bt=Bt._reactInternals;e:{if($t(Bt)!==Bt||Bt.tag!==1)throw Error(at(170));var Lt=Bt;do{switch(Lt.tag){case 3:Lt=Lt.stateNode.context;break e;case 1:if(so(Lt.type)){Lt=Lt.stateNode.__reactInternalMemoizedMergedChildContext;break e}}Lt=Lt.return}while(Lt!==null);throw Error(at(171))}if(Bt.tag===1){var Gt=Bt.type;if(so(Gt))return Yn(Bt,Gt,Lt)}return Lt}function ep(Bt){var Lt=Bt._reactInternals;if(Lt===void 0)throw typeof Bt.render=="function"?Error(at(188)):(Bt=Object.keys(Bt).join(","),Error(at(268,Bt)));return Bt=Pt(Lt),Bt===null?null:Bt.stateNode}function $y(Bt,Lt){if(Bt=Bt.memoizedState,Bt!==null&&Bt.dehydrated!==null){var Gt=Bt.retryLane;Bt.retryLane=Gt!==0&&Gt=Vr&&Cn>=Io&&gn<=oo&&Gn<=ho){Bt.splice(Lt,1);break}else if(tn!==Vr||Gt.width!==_r.width||hoGn){if(!(Cn!==Io||Gt.height!==_r.height||oogn)){Vr>tn&&(_r.width+=Vr-tn,_r.x=tn),ooCn&&(_r.height+=Io-Cn,_r.y=Cn),hoGt&&(Gt=Gn)),Gn ")+` - -No matching component was found for: - `)+Bt.join(" > ")}return null},nt.getPublicRootInstance=function(Bt){if(Bt=Bt.current,!Bt.child)return null;switch(Bt.child.tag){case 5:return Ot(Bt.child.stateNode);default:return Bt.child.stateNode}},nt.injectIntoDevTools=function(Bt){if(Bt={bundleType:Bt.bundleType,version:Bt.version,rendererPackageName:Bt.rendererPackageName,rendererConfig:Bt.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:st.ReactCurrentDispatcher,findHostInstanceByFiber:Y0,findFiberByHostInstance:Bt.findFiberByHostInstance||E0,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.0.0-fc46dba67-20220329"},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u")Bt=!1;else{var Lt=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(Lt.isDisabled||!Lt.supportsFiber)Bt=!0;else{try{Vu=Lt.inject(Bt),Xs=Lt}catch{}Bt=!!Lt.checkDCE}}return Bt},nt.isAlreadyRendering=function(){return!1},nt.observeVisibleRects=function(Bt,Lt,Gt,tn){if(!In)throw Error(at(363));Bt=gy(Bt,Lt);var gn=un(Bt,Gt,tn).disconnect;return{disconnect:function(){gn()}}},nt.registerMutableSourceForHydration=function(Bt,Lt){var Gt=Lt._getVersion;Gt=Gt(Lt._source),Bt.mutableSourceEagerHydrationData==null?Bt.mutableSourceEagerHydrationData=[Lt,Gt]:Bt.mutableSourceEagerHydrationData.push(Lt,Gt)},nt.runWithPriority=function(Bt,Lt){var Gt=No;try{return No=Bt,Lt()}finally{No=Gt}},nt.shouldError=function(){return null},nt.shouldSuspend=function(){return!1},nt.updateContainer=function(Bt,Lt,Gt,tn){var gn=Lt.current,Cn=Os(),Gn=cu(gn);return Gt=hm(Gt),Lt.context===null?Lt.context=Gt:Lt.pendingContext=Gt,Lt=Ps(Cn,Gn),Lt.payload={element:Bt},tn=tn===void 0?null:tn,tn!==null&&(Lt.callback=tn),Nl(gn,Lt),Bt=Pl(gn,Gn,Cn),Bt!==null&&ap(Bt,gn,Gn),Gn},nt};reactReconciler.exports=reactReconciler_production_min;var reactReconcilerExports=reactReconciler.exports;const Reconciler=getDefaultExportFromCjs(reactReconcilerExports),isPromise=tt=>typeof tt=="object"&&typeof tt.then=="function",globalCache$1=[];function shallowEqualArrays$1(tt,et,nt=(rt,it)=>rt===it){if(tt===et)return!0;if(!tt||!et)return!1;const rt=tt.length;if(et.length!==rt)return!1;for(let it=0;it0&&(ot.timeout&&clearTimeout(ot.timeout),ot.timeout=setTimeout(ot.remove,rt.lifespan)),ot.response;if(!nt)throw ot.promise}const it={keys:et,equal:rt.equal,remove:()=>{const ot=globalCache$1.indexOf(it);ot!==-1&&globalCache$1.splice(ot,1)},promise:(isPromise(tt)?tt:tt(...et)).then(ot=>{it.response=ot,rt.lifespan&&rt.lifespan>0&&(it.timeout=setTimeout(it.remove,rt.lifespan))}).catch(ot=>it.error=ot)};if(globalCache$1.push(it),!nt)throw it.promise}const suspend$1=(tt,et,nt)=>query$1(tt,et,!1,nt),preload=(tt,et,nt)=>void query$1(tt,et,!0,nt),clear=tt=>{if(tt===void 0||tt.length===0)globalCache$1.splice(0,globalCache$1.length);else{const et=globalCache$1.find(nt=>shallowEqualArrays$1(tt,nt.keys,nt.equal));et&&et.remove()}},catalogue={},extend$2=tt=>void Object.assign(catalogue,tt);function createRenderer(tt,et){function nt(ut,{args:ht=[],attach:dt,...pt},mt){let gt=`${ut[0].toUpperCase()}${ut.slice(1)}`,yt;if(ut==="primitive"){if(pt.object===void 0)throw new Error("R3F: Primitives without 'object' are invalid!");const bt=pt.object;yt=prepare(bt,{type:ut,root:mt,attach:dt,primitive:!0})}else{const bt=catalogue[gt];if(!bt)throw new Error(`R3F: ${gt} is not part of the THREE namespace! Did you forget to extend? See: https://docs.pmnd.rs/react-three-fiber/api/objects#using-3rd-party-objects-declaratively`);if(!Array.isArray(ht))throw new Error("R3F: The args prop must be an array!");yt=prepare(new bt(...ht),{type:ut,root:mt,attach:dt,memoizedProps:{args:ht}})}return yt.__r3f.attach===void 0&&(yt instanceof BufferGeometry?yt.__r3f.attach="geometry":yt instanceof Material&&(yt.__r3f.attach="material")),gt!=="inject"&&applyProps$1(yt,pt),yt}function rt(ut,ht){let dt=!1;if(ht){var pt,mt;(pt=ht.__r3f)!=null&&pt.attach?attach(ut,ht,ht.__r3f.attach):ht.isObject3D&&ut.isObject3D&&(ut.add(ht),dt=!0),dt||(mt=ut.__r3f)==null||mt.objects.push(ht),ht.__r3f||prepare(ht,{}),ht.__r3f.parent=ut,updateInstance(ht),invalidateInstance(ht)}}function it(ut,ht,dt){let pt=!1;if(ht){var mt,gt;if((mt=ht.__r3f)!=null&&mt.attach)attach(ut,ht,ht.__r3f.attach);else if(ht.isObject3D&&ut.isObject3D){ht.parent=ut,ht.dispatchEvent({type:"added"});const yt=ut.children.filter(vt=>vt!==ht),bt=yt.indexOf(dt);ut.children=[...yt.slice(0,bt),ht,...yt.slice(bt)],pt=!0}pt||(gt=ut.__r3f)==null||gt.objects.push(ht),ht.__r3f||prepare(ht,{}),ht.__r3f.parent=ut,updateInstance(ht),invalidateInstance(ht)}}function ot(ut,ht,dt=!1){ut&&[...ut].forEach(pt=>at(ht,pt,dt))}function at(ut,ht,dt){if(ht){var pt,mt,gt;if(ht.__r3f&&(ht.__r3f.parent=null),(pt=ut.__r3f)!=null&&pt.objects&&(ut.__r3f.objects=ut.__r3f.objects.filter(kt=>kt!==ht)),(mt=ht.__r3f)!=null&&mt.attach)detach(ut,ht,ht.__r3f.attach);else if(ht.isObject3D&&ut.isObject3D){var yt;ut.remove(ht),(yt=ht.__r3f)!=null&&yt.root&&removeInteractivity(ht.__r3f.root,ht)}const vt=(gt=ht.__r3f)==null?void 0:gt.primitive,xt=dt===void 0?ht.dispose!==null&&!vt:dt;if(!vt){var bt;ot((bt=ht.__r3f)==null?void 0:bt.objects,ht,xt),ot(ht.children,ht,xt)}delete ht.__r3f,xt&&ht.dispose&&ht.type!=="Scene"&&schedulerExports.unstable_scheduleCallback(schedulerExports.unstable_IdlePriority,()=>{try{ht.dispose()}catch{}}),invalidateInstance(ut)}}function st(ut,ht,dt,pt){var mt;const gt=(mt=ut.__r3f)==null?void 0:mt.parent;if(!gt)return;const yt=nt(ht,dt,ut.__r3f.root);if(ut.children){for(const bt of ut.children)bt.__r3f&&rt(yt,bt);ut.children=ut.children.filter(bt=>!bt.__r3f)}ut.__r3f.objects.forEach(bt=>rt(yt,bt)),ut.__r3f.objects=[],ut.__r3f.autoRemovedBeforeAppend||at(gt,ut),yt.parent&&(yt.__r3f.autoRemovedBeforeAppend=!0),rt(gt,yt),yt.raycast&&yt.__r3f.eventCount&&yt.__r3f.root.getState().internal.interaction.push(yt),[pt,pt.alternate].forEach(bt=>{bt!==null&&(bt.stateNode=yt,bt.ref&&(typeof bt.ref=="function"?bt.ref(yt):bt.ref.current=yt))})}const lt=()=>console.warn("Text is not allowed in the R3F tree! This could be stray whitespace or characters.");return{reconciler:Reconciler({createInstance:nt,removeChild:at,appendChild:rt,appendInitialChild:rt,insertBefore:it,supportsMutation:!0,isPrimaryRenderer:!1,supportsPersistence:!1,supportsHydration:!1,noTimeout:-1,appendChildToContainer:(ut,ht)=>{if(!ht)return;const dt=ut.getState().scene;dt.__r3f&&(dt.__r3f.root=ut,rt(dt,ht))},removeChildFromContainer:(ut,ht)=>{ht&&at(ut.getState().scene,ht)},insertInContainerBefore:(ut,ht,dt)=>{if(!ht||!dt)return;const pt=ut.getState().scene;pt.__r3f&&it(pt,ht,dt)},getRootHostContext:()=>null,getChildHostContext:ut=>ut,finalizeInitialChildren(ut){var ht;return!!((ht=ut==null?void 0:ut.__r3f)!=null?ht:{}).handlers},prepareUpdate(ut,ht,dt,pt){var mt;if(((mt=ut==null?void 0:ut.__r3f)!=null?mt:{}).primitive&&pt.object&&pt.object!==ut)return[!0];{const{args:yt=[],children:bt,...vt}=pt,{args:xt=[],children:kt,...St}=dt;if(!Array.isArray(yt))throw new Error("R3F: the args prop must be an array!");if(yt.some((At,Et)=>At!==xt[Et]))return[!0];const Tt=diffProps(ut,vt,St,!0);return Tt.changes.length?[!1,Tt]:null}},commitUpdate(ut,[ht,dt],pt,mt,gt,yt){ht?st(ut,pt,gt,yt):applyProps$1(ut,dt)},commitMount(ut,ht,dt,pt){var mt;const gt=(mt=ut.__r3f)!=null?mt:{};ut.raycast&>.handlers&>.eventCount&&ut.__r3f.root.getState().internal.interaction.push(ut)},getPublicInstance:ut=>ut,prepareForCommit:()=>null,preparePortalMount:ut=>prepare(ut.getState().scene),resetAfterCommit:()=>{},shouldSetTextContent:()=>!1,clearContainer:()=>!1,hideInstance(ut){var ht;const{attach:dt,parent:pt}=(ht=ut.__r3f)!=null?ht:{};dt&&pt&&detach(pt,ut,dt),ut.isObject3D&&(ut.visible=!1),invalidateInstance(ut)},unhideInstance(ut,ht){var dt;const{attach:pt,parent:mt}=(dt=ut.__r3f)!=null?dt:{};pt&&mt&&attach(mt,ut,pt),(ut.isObject3D&&ht.visible==null||ht.visible)&&(ut.visible=!0),invalidateInstance(ut)},createTextInstance:lt,hideTextInstance:lt,unhideTextInstance:lt,getCurrentEventPriority:()=>et?et():constantsExports.DefaultEventPriority,beforeActiveInstanceBlur:()=>{},afterActiveInstanceBlur:()=>{},detachDeletedInstance:()=>{},now:typeof performance<"u"&&is$1.fun(performance.now)?performance.now:is$1.fun(Date.now)?Date.now:()=>0,scheduleTimeout:is$1.fun(setTimeout)?setTimeout:void 0,cancelTimeout:is$1.fun(clearTimeout)?clearTimeout:void 0}),applyProps:applyProps$1}}var _window$document,_window$navigator;const hasColorSpace=tt=>"colorSpace"in tt||"outputColorSpace"in tt,getColorManagement=()=>{var tt;return(tt=catalogue.ColorManagement)!=null?tt:null},isOrthographicCamera$1=tt=>tt&&tt.isOrthographicCamera,isRef=tt=>tt&&tt.hasOwnProperty("current"),useIsomorphicLayoutEffect$1=typeof window<"u"&&((_window$document=window.document)!=null&&_window$document.createElement||((_window$navigator=window.navigator)==null?void 0:_window$navigator.product)==="ReactNative")?reactExports.useLayoutEffect:reactExports.useEffect;function useMutableCallback(tt){const et=reactExports.useRef(tt);return useIsomorphicLayoutEffect$1(()=>void(et.current=tt),[tt]),et}function Block({set:tt}){return useIsomorphicLayoutEffect$1(()=>(tt(new Promise(()=>null)),()=>tt(!1)),[tt]),null}class ErrorBoundary extends reactExports.Component{constructor(...et){super(...et),this.state={error:!1}}componentDidCatch(et){this.props.set(et)}render(){return this.state.error?null:this.props.children}}ErrorBoundary.getDerivedStateFromError=()=>({error:!0});const DEFAULT="__default",DEFAULTS=new Map,isDiffSet=tt=>tt&&!!tt.memoized&&!!tt.changes;function calculateDpr(tt){var et;const nt=typeof window<"u"?(et=window.devicePixelRatio)!=null?et:2:1;return Array.isArray(tt)?Math.min(Math.max(tt[0],nt),tt[1]):tt}const getRootState=tt=>{var et;return(et=tt.__r3f)==null?void 0:et.root.getState()},is$1={obj:tt=>tt===Object(tt)&&!is$1.arr(tt)&&typeof tt!="function",fun:tt=>typeof tt=="function",str:tt=>typeof tt=="string",num:tt=>typeof tt=="number",boo:tt=>typeof tt=="boolean",und:tt=>tt===void 0,arr:tt=>Array.isArray(tt),equ(tt,et,{arrays:nt="shallow",objects:rt="reference",strict:it=!0}={}){if(typeof tt!=typeof et||!!tt!=!!et)return!1;if(is$1.str(tt)||is$1.num(tt))return tt===et;const ot=is$1.obj(tt);if(ot&&rt==="reference")return tt===et;const at=is$1.arr(tt);if(at&&nt==="reference")return tt===et;if((at||ot)&&tt===et)return!0;let st;for(st in tt)if(!(st in et))return!1;if(ot&&nt==="shallow"&&rt==="shallow"){for(st in it?et:tt)if(!is$1.equ(tt[st],et[st],{strict:it,objects:"reference"}))return!1}else for(st in it?et:tt)if(tt[st]!==et[st])return!1;if(is$1.und(st)){if(at&&tt.length===0&&et.length===0||ot&&Object.keys(tt).length===0&&Object.keys(et).length===0)return!0;if(tt!==et)return!1}return!0}};function buildGraph(tt){const et={nodes:{},materials:{}};return tt&&tt.traverse(nt=>{nt.name&&(et.nodes[nt.name]=nt),nt.material&&!et.materials[nt.material.name]&&(et.materials[nt.material.name]=nt.material)}),et}function dispose(tt){tt.dispose&&tt.type!=="Scene"&&tt.dispose();for(const et in tt)et.dispose==null||et.dispose(),delete tt[et]}function prepare(tt,et){const nt=tt;return nt.__r3f={type:"",root:null,previousAttach:null,memoizedProps:{},eventCount:0,handlers:{},objects:[],parent:null,...et},tt}function resolve(tt,et){let nt=tt;if(et.includes("-")){const rt=et.split("-"),it=rt.pop();return nt=rt.reduce((ot,at)=>ot[at],tt),{target:nt,key:it}}else return{target:nt,key:et}}const INDEX_REGEX=/-\d+$/;function attach(tt,et,nt){if(is$1.str(nt)){if(INDEX_REGEX.test(nt)){const ot=nt.replace(INDEX_REGEX,""),{target:at,key:st}=resolve(tt,ot);Array.isArray(at[st])||(at[st]=[])}const{target:rt,key:it}=resolve(tt,nt);et.__r3f.previousAttach=rt[it],rt[it]=et}else et.__r3f.previousAttach=nt(tt,et)}function detach(tt,et,nt){var rt,it;if(is$1.str(nt)){const{target:ot,key:at}=resolve(tt,nt),st=et.__r3f.previousAttach;st===void 0?delete ot[at]:ot[at]=st}else(rt=et.__r3f)==null||rt.previousAttach==null||rt.previousAttach(tt,et);(it=et.__r3f)==null||delete it.previousAttach}function diffProps(tt,{children:et,key:nt,ref:rt,...it},{children:ot,key:at,ref:st,...lt}={},ct=!1){var ut;const ht=(ut=tt==null?void 0:tt.__r3f)!=null?ut:{},dt=Object.entries(it),pt=[];if(ct){const gt=Object.keys(lt);for(let yt=0;yt{var bt;if((bt=tt.__r3f)!=null&&bt.primitive&>==="object"||is$1.equ(yt,lt[gt]))return;if(/^on(Pointer|Click|DoubleClick|ContextMenu|Wheel)/.test(gt))return pt.push([gt,yt,!0,[]]);let vt=[];gt.includes("-")&&(vt=gt.split("-")),pt.push([gt,yt,!1,vt]);for(const xt in it){const kt=it[xt];xt.startsWith(`${gt}-`)&&pt.push([xt,kt,!1,xt.split("-")])}});const mt={...it};return ht.memoizedProps&&ht.memoizedProps.args&&(mt.args=ht.memoizedProps.args),ht.memoizedProps&&ht.memoizedProps.attach&&(mt.attach=ht.memoizedProps.attach),{memoized:mt,changes:pt}}const __DEV__=typeof process<"u"&&!1;function applyProps$1(tt,et){var nt,rt,it;const ot=(nt=tt.__r3f)!=null?nt:{},at=ot.root,st=(rt=at==null||at.getState==null?void 0:at.getState())!=null?rt:{},{memoized:lt,changes:ct}=isDiffSet(et)?et:diffProps(tt,et),ut=ot.eventCount;tt.__r3f&&(tt.__r3f.memoizedProps=lt);for(let dt=0;dtxt[kt],tt),!(vt&&vt.set))){const[xt,...kt]=yt.reverse();bt=kt.reverse().reduce((St,Tt)=>St[Tt],tt),pt=xt}if(mt===DEFAULT+"remove")if(bt.constructor){let xt=DEFAULTS.get(bt.constructor);xt||(xt=new bt.constructor,DEFAULTS.set(bt.constructor,xt)),mt=xt[pt]}else mt=0;if(gt)mt?ot.handlers[pt]=mt:delete ot.handlers[pt],ot.eventCount=Object.keys(ot.handlers).length;else if(vt&&vt.set&&(vt.copy||vt instanceof Layers)){if(Array.isArray(mt))vt.fromArray?vt.fromArray(mt):vt.set(...mt);else if(vt.copy&&mt&&mt.constructor&&(__DEV__?vt.constructor.name===mt.constructor.name:vt.constructor===mt.constructor))vt.copy(mt);else if(mt!==void 0){const xt=vt instanceof Color$1;!xt&&vt.setScalar?vt.setScalar(mt):vt instanceof Layers&&mt instanceof Layers?vt.mask=mt.mask:vt.set(mt),!getColorManagement()&&!st.linear&&xt&&vt.convertSRGBToLinear()}}else if(bt[pt]=mt,bt[pt]instanceof Texture&&bt[pt].format===RGBAFormat&&bt[pt].type===UnsignedByteType){const xt=bt[pt];hasColorSpace(xt)&&hasColorSpace(st.gl)?xt.colorSpace=st.gl.outputColorSpace:xt.encoding=st.gl.outputEncoding}invalidateInstance(tt)}if(ot.parent&&st.internal&&tt.raycast&&ut!==ot.eventCount){const dt=st.internal.interaction.indexOf(tt);dt>-1&&st.internal.interaction.splice(dt,1),ot.eventCount&&st.internal.interaction.push(tt)}return!(ct.length===1&&ct[0][0]==="onUpdate")&&ct.length&&(it=tt.__r3f)!=null&&it.parent&&updateInstance(tt),tt}function invalidateInstance(tt){var et,nt;const rt=(et=tt.__r3f)==null||(nt=et.root)==null||nt.getState==null?void 0:nt.getState();rt&&rt.internal.frames===0&&rt.invalidate()}function updateInstance(tt){tt.onUpdate==null||tt.onUpdate(tt)}function updateCamera(tt,et){tt.manual||(isOrthographicCamera$1(tt)?(tt.left=et.width/-2,tt.right=et.width/2,tt.top=et.height/2,tt.bottom=et.height/-2):tt.aspect=et.width/et.height,tt.updateProjectionMatrix(),tt.updateMatrixWorld())}function makeId(tt){return(tt.eventObject||tt.object).uuid+"/"+tt.index+tt.instanceId}function getEventPriority(){var tt;const et=typeof self<"u"&&self||typeof window<"u"&&window;if(!et)return constantsExports.DefaultEventPriority;switch((tt=et.event)==null?void 0:tt.type){case"click":case"contextmenu":case"dblclick":case"pointercancel":case"pointerdown":case"pointerup":return constantsExports.DiscreteEventPriority;case"pointermove":case"pointerout":case"pointerover":case"pointerenter":case"pointerleave":case"wheel":return constantsExports.ContinuousEventPriority;default:return constantsExports.DefaultEventPriority}}function releaseInternalPointerCapture(tt,et,nt,rt){const it=nt.get(et);it&&(nt.delete(et),nt.size===0&&(tt.delete(rt),it.target.releasePointerCapture(rt)))}function removeInteractivity(tt,et){const{internal:nt}=tt.getState();nt.interaction=nt.interaction.filter(rt=>rt!==et),nt.initialHits=nt.initialHits.filter(rt=>rt!==et),nt.hovered.forEach((rt,it)=>{(rt.eventObject===et||rt.object===et)&&nt.hovered.delete(it)}),nt.capturedMap.forEach((rt,it)=>{releaseInternalPointerCapture(nt.capturedMap,et,rt,it)})}function createEvents(tt){function et(lt){const{internal:ct}=tt.getState(),ut=lt.offsetX-ct.initialClick[0],ht=lt.offsetY-ct.initialClick[1];return Math.round(Math.sqrt(ut*ut+ht*ht))}function nt(lt){return lt.filter(ct=>["Move","Over","Enter","Out","Leave"].some(ut=>{var ht;return(ht=ct.__r3f)==null?void 0:ht.handlers["onPointer"+ut]}))}function rt(lt,ct){const ut=tt.getState(),ht=new Set,dt=[],pt=ct?ct(ut.internal.interaction):ut.internal.interaction;for(let bt=0;bt{const xt=getRootState(bt.object),kt=getRootState(vt.object);return!xt||!kt?bt.distance-vt.distance:kt.events.priority-xt.events.priority||bt.distance-vt.distance}).filter(bt=>{const vt=makeId(bt);return ht.has(vt)?!1:(ht.add(vt),!0)});ut.events.filter&&(gt=ut.events.filter(gt,ut));for(const bt of gt){let vt=bt.object;for(;vt;){var yt;(yt=vt.__r3f)!=null&&yt.eventCount&&dt.push({...bt,eventObject:vt}),vt=vt.parent}}if("pointerId"in lt&&ut.internal.capturedMap.has(lt.pointerId))for(let bt of ut.internal.capturedMap.get(lt.pointerId).values())ht.has(makeId(bt.intersection))||dt.push(bt.intersection);return dt}function it(lt,ct,ut,ht){const dt=tt.getState();if(lt.length){const pt={stopped:!1};for(const mt of lt){const gt=getRootState(mt.object)||dt,{raycaster:yt,pointer:bt,camera:vt,internal:xt}=gt,kt=new Vector3(bt.x,bt.y,0).unproject(vt),St=Dt=>{var jt,Pt;return(jt=(Pt=xt.capturedMap.get(Dt))==null?void 0:Pt.has(mt.eventObject))!=null?jt:!1},Tt=Dt=>{const jt={intersection:mt,target:ct.target};xt.capturedMap.has(Dt)?xt.capturedMap.get(Dt).set(mt.eventObject,jt):xt.capturedMap.set(Dt,new Map([[mt.eventObject,jt]])),ct.target.setPointerCapture(Dt)},At=Dt=>{const jt=xt.capturedMap.get(Dt);jt&&releaseInternalPointerCapture(xt.capturedMap,mt.eventObject,jt,Dt)};let Et={};for(let Dt in ct){let jt=ct[Dt];typeof jt!="function"&&(Et[Dt]=jt)}let $t={...mt,...Et,pointer:bt,intersections:lt,stopped:pt.stopped,delta:ut,unprojectedPoint:kt,ray:yt.ray,camera:vt,stopPropagation(){const Dt="pointerId"in ct&&xt.capturedMap.get(ct.pointerId);if((!Dt||Dt.has(mt.eventObject))&&($t.stopped=pt.stopped=!0,xt.hovered.size&&Array.from(xt.hovered.values()).find(jt=>jt.eventObject===mt.eventObject))){const jt=lt.slice(0,lt.indexOf(mt));ot([...jt,mt])}},target:{hasPointerCapture:St,setPointerCapture:Tt,releasePointerCapture:At},currentTarget:{hasPointerCapture:St,setPointerCapture:Tt,releasePointerCapture:At},nativeEvent:ct};if(ht($t),pt.stopped===!0)break}}return lt}function ot(lt){const{internal:ct}=tt.getState();for(const ut of ct.hovered.values())if(!lt.length||!lt.find(ht=>ht.object===ut.object&&ht.index===ut.index&&ht.instanceId===ut.instanceId)){const dt=ut.eventObject.__r3f,pt=dt==null?void 0:dt.handlers;if(ct.hovered.delete(makeId(ut)),dt!=null&&dt.eventCount){const mt={...ut,intersections:lt};pt.onPointerOut==null||pt.onPointerOut(mt),pt.onPointerLeave==null||pt.onPointerLeave(mt)}}}function at(lt,ct){for(let ut=0;utot([]);case"onLostPointerCapture":return ct=>{const{internal:ut}=tt.getState();"pointerId"in ct&&ut.capturedMap.has(ct.pointerId)&&requestAnimationFrame(()=>{ut.capturedMap.has(ct.pointerId)&&(ut.capturedMap.delete(ct.pointerId),ot([]))})}}return function(ut){const{onPointerMissed:ht,internal:dt}=tt.getState();dt.lastEvent.current=ut;const pt=lt==="onPointerMove",mt=lt==="onClick"||lt==="onContextMenu"||lt==="onDoubleClick",yt=rt(ut,pt?nt:void 0),bt=mt?et(ut):0;lt==="onPointerDown"&&(dt.initialClick=[ut.offsetX,ut.offsetY],dt.initialHits=yt.map(xt=>xt.eventObject)),mt&&!yt.length&&bt<=2&&(at(ut,dt.interaction),ht&&ht(ut)),pt&&ot(yt);function vt(xt){const kt=xt.eventObject,St=kt.__r3f,Tt=St==null?void 0:St.handlers;if(St!=null&&St.eventCount)if(pt){if(Tt.onPointerOver||Tt.onPointerEnter||Tt.onPointerOut||Tt.onPointerLeave){const At=makeId(xt),Et=dt.hovered.get(At);Et?Et.stopped&&xt.stopPropagation():(dt.hovered.set(At,xt),Tt.onPointerOver==null||Tt.onPointerOver(xt),Tt.onPointerEnter==null||Tt.onPointerEnter(xt))}Tt.onPointerMove==null||Tt.onPointerMove(xt)}else{const At=Tt[lt];At?(!mt||dt.initialHits.includes(kt))&&(at(ut,dt.interaction.filter(Et=>!dt.initialHits.includes(Et))),At(xt)):mt&&dt.initialHits.includes(kt)&&at(ut,dt.interaction.filter(Et=>!dt.initialHits.includes(Et)))}}it(yt,ut,bt,vt)}}return{handlePointer:st}}const privateKeys=["set","get","setSize","setFrameloop","setDpr","events","invalidate","advance","size","viewport"],isRenderer=tt=>!!(tt!=null&&tt.render),context$2=reactExports.createContext(null),createStore$1=(tt,et)=>{const nt=create$2((st,lt)=>{const ct=new Vector3,ut=new Vector3,ht=new Vector3;function dt(bt=lt().camera,vt=ut,xt=lt().size){const{width:kt,height:St,top:Tt,left:At}=xt,Et=kt/St;vt instanceof Vector3?ht.copy(vt):ht.set(...vt);const $t=bt.getWorldPosition(ct).distanceTo(ht);if(isOrthographicCamera$1(bt))return{width:kt/bt.zoom,height:St/bt.zoom,top:Tt,left:At,factor:1,distance:$t,aspect:Et};{const Dt=bt.fov*Math.PI/180,jt=2*Math.tan(Dt/2)*$t,Pt=jt*(kt/St);return{width:Pt,height:jt,top:Tt,left:At,factor:kt/Pt,distance:$t,aspect:Et}}}let pt;const mt=bt=>st(vt=>({performance:{...vt.performance,current:bt}})),gt=new Vector2;return{set:st,get:lt,gl:null,camera:null,raycaster:null,events:{priority:1,enabled:!0,connected:!1},xr:null,scene:null,invalidate:(bt=1)=>tt(lt(),bt),advance:(bt,vt)=>et(bt,vt,lt()),legacy:!1,linear:!1,flat:!1,controls:null,clock:new Clock$1,pointer:gt,mouse:gt,frameloop:"always",onPointerMissed:void 0,performance:{current:1,min:.5,max:1,debounce:200,regress:()=>{const bt=lt();pt&&clearTimeout(pt),bt.performance.current!==bt.performance.min&&mt(bt.performance.min),pt=setTimeout(()=>mt(lt().performance.max),bt.performance.debounce)}},size:{width:0,height:0,top:0,left:0,updateStyle:!1},viewport:{initialDpr:0,dpr:0,width:0,height:0,top:0,left:0,aspect:0,distance:0,factor:0,getCurrentViewport:dt},setEvents:bt=>st(vt=>({...vt,events:{...vt.events,...bt}})),setSize:(bt,vt,xt,kt,St)=>{const Tt=lt().camera,At={width:bt,height:vt,top:kt||0,left:St||0,updateStyle:xt};st(Et=>({size:At,viewport:{...Et.viewport,...dt(Tt,ut,At)}}))},setDpr:bt=>st(vt=>{const xt=calculateDpr(bt);return{viewport:{...vt.viewport,dpr:xt,initialDpr:vt.viewport.initialDpr||xt}}}),setFrameloop:(bt="always")=>{const vt=lt().clock;vt.stop(),vt.elapsedTime=0,bt!=="never"&&(vt.start(),vt.elapsedTime=0),st(()=>({frameloop:bt}))},previousRoot:void 0,internal:{active:!1,priority:0,frames:0,lastEvent:reactExports.createRef(),interaction:[],hovered:new Map,subscribers:[],initialClick:[0,0],initialHits:[],capturedMap:new Map,subscribe:(bt,vt,xt)=>{const kt=lt().internal;return kt.priority=kt.priority+(vt>0?1:0),kt.subscribers.push({ref:bt,priority:vt,store:xt}),kt.subscribers=kt.subscribers.sort((St,Tt)=>St.priority-Tt.priority),()=>{const St=lt().internal;St!=null&&St.subscribers&&(St.priority=St.priority-(vt>0?1:0),St.subscribers=St.subscribers.filter(Tt=>Tt.ref!==bt))}}}}}),rt=nt.getState();let it=rt.size,ot=rt.viewport.dpr,at=rt.camera;return nt.subscribe(()=>{const{camera:st,size:lt,viewport:ct,gl:ut,set:ht}=nt.getState();if(lt!==it||ct.dpr!==ot){var dt;it=lt,ot=ct.dpr,updateCamera(st,lt),ut.setPixelRatio(ct.dpr);const pt=(dt=lt.updateStyle)!=null?dt:typeof HTMLCanvasElement<"u"&&ut.domElement instanceof HTMLCanvasElement;ut.setSize(lt.width,lt.height,pt)}st!==at&&(at=st,ht(pt=>({viewport:{...pt.viewport,...pt.viewport.getCurrentViewport(st)}})))}),nt.subscribe(st=>tt(st)),nt};function createSubs(tt,et){const nt={callback:tt};return et.add(nt),()=>void et.delete(nt)}let i$2,globalEffects=new Set,globalAfterEffects=new Set,globalTailEffects=new Set;const addEffect=tt=>createSubs(tt,globalEffects),addAfterEffect=tt=>createSubs(tt,globalAfterEffects),addTail=tt=>createSubs(tt,globalTailEffects);function run(tt,et){if(tt.size)for(const{callback:nt}of tt.values())nt(et)}function flushGlobalEffects(tt,et){switch(tt){case"before":return run(globalEffects,et);case"after":return run(globalAfterEffects,et);case"tail":return run(globalTailEffects,et)}}let subscribers,subscription;function render$1(tt,et,nt){let rt=et.clock.getDelta();for(et.frameloop==="never"&&typeof tt=="number"&&(rt=tt-et.clock.elapsedTime,et.clock.oldTime=et.clock.elapsedTime,et.clock.elapsedTime=tt),subscribers=et.internal.subscribers,i$2=0;i$20)&&!((ct=it.gl.xr)!=null&&ct.isPresenting)&&(nt+=render$1(lt,it))}if(flushGlobalEffects("after",lt),nt===0)return flushGlobalEffects("tail",lt),et=!1,cancelAnimationFrame(rt)}function at(lt,ct=1){var ut;if(!lt)return tt.forEach(ht=>at(ht.store.getState()),ct);(ut=lt.gl.xr)!=null&&ut.isPresenting||!lt.internal.active||lt.frameloop==="never"||(lt.internal.frames=Math.min(60,lt.internal.frames+ct),et||(et=!0,requestAnimationFrame(ot)))}function st(lt,ct=!0,ut,ht){if(ct&&flushGlobalEffects("before",lt),ut)render$1(lt,ut,ht);else for(const dt of tt.values())render$1(lt,dt.store.getState());ct&&flushGlobalEffects("after",lt)}return{loop:ot,invalidate:at,advance:st}}function useInstanceHandle(tt){const et=reactExports.useRef(null);return useIsomorphicLayoutEffect$1(()=>void(et.current=tt.current.__r3f),[tt]),et}function useStore$1(){const tt=reactExports.useContext(context$2);if(!tt)throw new Error("R3F: Hooks can only be used within the Canvas component!");return tt}function useThree(tt=nt=>nt,et){return useStore$1()(tt,et)}function useFrame(tt,et=0){const nt=useStore$1(),rt=nt.getState().internal.subscribe,it=useMutableCallback(tt);return useIsomorphicLayoutEffect$1(()=>rt(it,et,nt),[et,rt,nt]),null}const memoizedLoaders=new WeakMap;function loadingFn(tt,et){return function(nt,...rt){let it=memoizedLoaders.get(nt);return it||(it=new nt,memoizedLoaders.set(nt,it)),tt&&tt(it),Promise.all(rt.map(ot=>new Promise((at,st)=>it.load(ot,lt=>{lt.scene&&Object.assign(lt,buildGraph(lt.scene)),at(lt)},et,lt=>st(new Error(`Could not load ${ot}: ${lt==null?void 0:lt.message}`)))))).finally(()=>it.dispose==null?void 0:it.dispose())}}function useLoader(tt,et,nt,rt){const it=Array.isArray(et)?et:[et],ot=suspend$1(loadingFn(nt,rt),[tt,...it],{equal:is$1.equ});return Array.isArray(et)?ot:ot[0]}useLoader.preload=function(tt,et,nt){const rt=Array.isArray(et)?et:[et];return preload(loadingFn(nt),[tt,...rt])};useLoader.clear=function(tt,et){const nt=Array.isArray(et)?et:[et];return clear([tt,...nt])};const roots=new Map,{invalidate,advance}=createLoop(roots),{reconciler,applyProps}=createRenderer(roots,getEventPriority),shallowLoose={objects:"shallow",strict:!1},createRendererInstance=(tt,et)=>{const nt=typeof tt=="function"?tt(et):tt;return isRenderer(nt)?nt:new WebGLRenderer({powerPreference:"high-performance",canvas:et,antialias:!0,alpha:!0,...tt})};function computeInitialSize(tt,et){if(et)return et;if(typeof HTMLCanvasElement<"u"&&tt instanceof HTMLCanvasElement&&tt.parentElement){const{width:nt,height:rt,top:it,left:ot}=tt.parentElement.getBoundingClientRect();return{width:nt,height:rt,top:it,left:ot}}else if(typeof OffscreenCanvas<"u"&&tt instanceof OffscreenCanvas)return{width:tt.width,height:tt.height,top:0,left:0};return{width:0,height:0,top:0,left:0}}function createRoot(tt){const et=roots.get(tt),nt=et==null?void 0:et.fiber,rt=et==null?void 0:et.store;et&&console.warn("R3F.createRoot should only be called once!");const it=typeof reportError=="function"?reportError:console.error,ot=rt||createStore$1(invalidate,advance),at=nt||reconciler.createContainer(ot,constantsExports.ConcurrentRoot,null,!1,null,"",it,null);et||roots.set(tt,{fiber:at,store:ot});let st,lt=!1,ct;return{configure(ut={}){let{gl:ht,size:dt,scene:pt,events:mt,onCreated:gt,shadows:yt=!1,linear:bt=!1,flat:vt=!1,legacy:xt=!1,orthographic:kt=!1,frameloop:St="always",dpr:Tt=[1,2],performance:At,raycaster:Et,camera:$t,onPointerMissed:Dt}=ut,jt=ot.getState(),Pt=jt.gl;jt.gl||jt.set({gl:Pt=createRendererInstance(ht,tt)});let Ct=jt.raycaster;Ct||jt.set({raycaster:Ct=new Raycaster});const{params:wt,...It}=Et||{};if(is$1.equ(It,Ct,shallowLoose)||applyProps(Ct,{...It}),is$1.equ(wt,Ct.params,shallowLoose)||applyProps(Ct,{params:{...Ct.params,...wt}}),!jt.camera||jt.camera===ct&&!is$1.equ(ct,$t,shallowLoose)){ct=$t;const Mt=$t instanceof Camera,Ht=Mt?$t:kt?new OrthographicCamera(0,0,0,0,.1,1e3):new PerspectiveCamera(75,0,.1,1e3);Mt||(Ht.position.z=5,$t&&applyProps(Ht,$t),!jt.camera&&!($t!=null&&$t.rotation)&&Ht.lookAt(0,0,0)),jt.set({camera:Ht})}if(!jt.scene){let Mt;pt instanceof Scene?Mt=pt:(Mt=new Scene,pt&&applyProps(Mt,pt)),jt.set({scene:prepare(Mt)})}if(!jt.xr){var Ot;const Mt=(sn,Kt)=>{const rn=ot.getState();rn.frameloop!=="never"&&advance(sn,!0,rn,Kt)},Ht=()=>{const sn=ot.getState();sn.gl.xr.enabled=sn.gl.xr.isPresenting,sn.gl.xr.setAnimationLoop(sn.gl.xr.isPresenting?Mt:null),sn.gl.xr.isPresenting||invalidate(sn)},en={connect(){const sn=ot.getState().gl;sn.xr.addEventListener("sessionstart",Ht),sn.xr.addEventListener("sessionend",Ht)},disconnect(){const sn=ot.getState().gl;sn.xr.removeEventListener("sessionstart",Ht),sn.xr.removeEventListener("sessionend",Ht)}};typeof((Ot=Pt.xr)==null?void 0:Ot.addEventListener)=="function"&&en.connect(),jt.set({xr:en})}if(Pt.shadowMap){const Mt=Pt.shadowMap.enabled,Ht=Pt.shadowMap.type;if(Pt.shadowMap.enabled=!!yt,is$1.boo(yt))Pt.shadowMap.type=PCFSoftShadowMap;else if(is$1.str(yt)){var Wt;const en={basic:BasicShadowMap,percentage:PCFShadowMap,soft:PCFSoftShadowMap,variance:VSMShadowMap};Pt.shadowMap.type=(Wt=en[yt])!=null?Wt:PCFSoftShadowMap}else is$1.obj(yt)&&Object.assign(Pt.shadowMap,yt);(Mt!==Pt.shadowMap.enabled||Ht!==Pt.shadowMap.type)&&(Pt.shadowMap.needsUpdate=!0)}const zt=getColorManagement();zt&&("enabled"in zt?zt.enabled=!xt:"legacyMode"in zt&&(zt.legacyMode=xt)),applyProps(Pt,{outputEncoding:bt?3e3:3001,toneMapping:vt?NoToneMapping:ACESFilmicToneMapping}),jt.legacy!==xt&&jt.set(()=>({legacy:xt})),jt.linear!==bt&&jt.set(()=>({linear:bt})),jt.flat!==vt&&jt.set(()=>({flat:vt})),ht&&!is$1.fun(ht)&&!isRenderer(ht)&&!is$1.equ(ht,Pt,shallowLoose)&&applyProps(Pt,ht),mt&&!jt.events.handlers&&jt.set({events:mt(ot)});const Ut=computeInitialSize(tt,dt);return is$1.equ(Ut,jt.size,shallowLoose)||jt.setSize(Ut.width,Ut.height,Ut.updateStyle,Ut.top,Ut.left),Tt&&jt.viewport.dpr!==calculateDpr(Tt)&&jt.setDpr(Tt),jt.frameloop!==St&&jt.setFrameloop(St),jt.onPointerMissed||jt.set({onPointerMissed:Dt}),At&&!is$1.equ(At,jt.performance,shallowLoose)&&jt.set(Mt=>({performance:{...Mt.performance,...At}})),st=gt,lt=!0,this},render(ut){return lt||this.configure(),reconciler.updateContainer(reactExports.createElement(Provider$2,{store:ot,children:ut,onCreated:st,rootElement:tt}),at,null,()=>{}),ot},unmount(){unmountComponentAtNode(tt)}}}function Provider$2({store:tt,children:et,onCreated:nt,rootElement:rt}){return useIsomorphicLayoutEffect$1(()=>{const it=tt.getState();it.set(ot=>({internal:{...ot.internal,active:!0}})),nt&&nt(it),tt.getState().events.connected||it.events.connect==null||it.events.connect(rt)},[]),reactExports.createElement(context$2.Provider,{value:tt},et)}function unmountComponentAtNode(tt,et){const nt=roots.get(tt),rt=nt==null?void 0:nt.fiber;if(rt){const it=nt==null?void 0:nt.store.getState();it&&(it.internal.active=!1),reconciler.updateContainer(null,rt,null,()=>{it&&setTimeout(()=>{try{var ot,at,st,lt;it.events.disconnect==null||it.events.disconnect(),(ot=it.gl)==null||(at=ot.renderLists)==null||at.dispose==null||at.dispose(),(st=it.gl)==null||st.forceContextLoss==null||st.forceContextLoss(),(lt=it.gl)!=null&<.xr&&it.xr.disconnect(),dispose(it),roots.delete(tt),et&&et(tt)}catch{}},500)})}}function createPortal(tt,et,nt){return reactExports.createElement(Portal,{key:et.uuid,children:tt,container:et,state:nt})}function Portal({state:tt={},children:et,container:nt}){const{events:rt,size:it,...ot}=tt,at=useStore$1(),[st]=reactExports.useState(()=>new Raycaster),[lt]=reactExports.useState(()=>new Vector2),ct=reactExports.useCallback((ht,dt)=>{const pt={...ht};Object.keys(ht).forEach(gt=>{(privateKeys.includes(gt)||ht[gt]!==dt[gt]&&dt[gt])&&delete pt[gt]});let mt;if(dt&&it){const gt=dt.camera;mt=ht.viewport.getCurrentViewport(gt,new Vector3,it),gt!==ht.camera&&updateCamera(gt,it)}return{...pt,scene:nt,raycaster:st,pointer:lt,mouse:lt,previousRoot:at,events:{...ht.events,...dt==null?void 0:dt.events,...rt},size:{...ht.size,...it},viewport:{...ht.viewport,...mt},...ot}},[tt]),[ut]=reactExports.useState(()=>{const ht=at.getState();return create$2((pt,mt)=>({...ht,scene:nt,raycaster:st,pointer:lt,mouse:lt,previousRoot:at,events:{...ht.events,...rt},size:{...ht.size,...it},...ot,set:pt,get:mt,setEvents:gt=>pt(yt=>({...yt,events:{...yt.events,...gt}}))}))});return reactExports.useEffect(()=>{const ht=at.subscribe(dt=>ut.setState(pt=>ct(dt,pt)));return()=>{ht(),ut.destroy()}},[]),reactExports.useEffect(()=>{ut.setState(ht=>ct(at.getState(),ht))},[ct]),reactExports.createElement(reactExports.Fragment,null,reconciler.createPortal(reactExports.createElement(context$2.Provider,{value:ut},et),ut,null))}reconciler.injectIntoDevTools({bundleType:0,rendererPackageName:"@react-three/fiber",version:reactExports.version});function debounce$3(tt,et,nt){var rt,it,ot,at,st;et==null&&(et=100);function lt(){var ut=Date.now()-at;ut=0?rt=setTimeout(lt,et-ut):(rt=null,nt||(st=tt.apply(ot,it),ot=it=null))}var ct=function(){ot=this,it=arguments,at=Date.now();var ut=nt&&!rt;return rt||(rt=setTimeout(lt,et)),ut&&(st=tt.apply(ot,it),ot=it=null),st};return ct.clear=function(){rt&&(clearTimeout(rt),rt=null)},ct.flush=function(){rt&&(st=tt.apply(ot,it),ot=it=null,clearTimeout(rt),rt=null)},ct}debounce$3.debounce=debounce$3;var debounce_1$1=debounce$3;const createDebounce=getDefaultExportFromCjs(debounce_1$1);function useMeasure(tt){let{debounce:et,scroll:nt,polyfill:rt,offsetSize:it}=tt===void 0?{debounce:0,scroll:!1,offsetSize:!1}:tt;const ot=rt||(typeof window>"u"?class{}:window.ResizeObserver);if(!ot)throw new Error("This browser does not support ResizeObserver out of the box. See: https://github.com/react-spring/react-use-measure/#resize-observer-polyfills");const[at,st]=reactExports.useState({left:0,top:0,width:0,height:0,bottom:0,right:0,x:0,y:0}),lt=reactExports.useRef({element:null,scrollContainers:null,resizeObserver:null,lastBounds:at}),ct=et?typeof et=="number"?et:et.scroll:null,ut=et?typeof et=="number"?et:et.resize:null,ht=reactExports.useRef(!1);reactExports.useEffect(()=>(ht.current=!0,()=>void(ht.current=!1)));const[dt,pt,mt]=reactExports.useMemo(()=>{const vt=()=>{if(!lt.current.element)return;const{left:xt,top:kt,width:St,height:Tt,bottom:At,right:Et,x:$t,y:Dt}=lt.current.element.getBoundingClientRect(),jt={left:xt,top:kt,width:St,height:Tt,bottom:At,right:Et,x:$t,y:Dt};lt.current.element instanceof HTMLElement&&it&&(jt.height=lt.current.element.offsetHeight,jt.width=lt.current.element.offsetWidth),Object.freeze(jt),ht.current&&!areBoundsEqual(lt.current.lastBounds,jt)&&st(lt.current.lastBounds=jt)};return[vt,ut?createDebounce(vt,ut):vt,ct?createDebounce(vt,ct):vt]},[st,it,ct,ut]);function gt(){lt.current.scrollContainers&&(lt.current.scrollContainers.forEach(vt=>vt.removeEventListener("scroll",mt,!0)),lt.current.scrollContainers=null),lt.current.resizeObserver&&(lt.current.resizeObserver.disconnect(),lt.current.resizeObserver=null)}function yt(){lt.current.element&&(lt.current.resizeObserver=new ot(mt),lt.current.resizeObserver.observe(lt.current.element),nt&<.current.scrollContainers&<.current.scrollContainers.forEach(vt=>vt.addEventListener("scroll",mt,{capture:!0,passive:!0})))}const bt=vt=>{!vt||vt===lt.current.element||(gt(),lt.current.element=vt,lt.current.scrollContainers=findScrollContainers(vt),yt())};return useOnWindowScroll(mt,!!nt),useOnWindowResize(pt),reactExports.useEffect(()=>{gt(),yt()},[nt,mt,pt]),reactExports.useEffect(()=>gt,[]),[bt,at,dt]}function useOnWindowResize(tt){reactExports.useEffect(()=>{const et=tt;return window.addEventListener("resize",et),()=>void window.removeEventListener("resize",et)},[tt])}function useOnWindowScroll(tt,et){reactExports.useEffect(()=>{if(et){const nt=tt;return window.addEventListener("scroll",nt,{capture:!0,passive:!0}),()=>void window.removeEventListener("scroll",nt,!0)}},[tt,et])}function findScrollContainers(tt){const et=[];if(!tt||tt===document.body)return et;const{overflow:nt,overflowX:rt,overflowY:it}=window.getComputedStyle(tt);return[nt,rt,it].some(ot=>ot==="auto"||ot==="scroll")&&et.push(tt),[...et,...findScrollContainers(tt.parentElement)]}const keys$5=["x","y","top","bottom","left","right","width","height"],areBoundsEqual=(tt,et)=>keys$5.every(nt=>tt[nt]===et[nt]);var __defProp=Object.defineProperty,__defProps=Object.defineProperties,__getOwnPropDescs=Object.getOwnPropertyDescriptors,__getOwnPropSymbols=Object.getOwnPropertySymbols,__hasOwnProp=Object.prototype.hasOwnProperty,__propIsEnum=Object.prototype.propertyIsEnumerable,__defNormalProp=(tt,et,nt)=>et in tt?__defProp(tt,et,{enumerable:!0,configurable:!0,writable:!0,value:nt}):tt[et]=nt,__spreadValues=(tt,et)=>{for(var nt in et||(et={}))__hasOwnProp.call(et,nt)&&__defNormalProp(tt,nt,et[nt]);if(__getOwnPropSymbols)for(var nt of __getOwnPropSymbols(et))__propIsEnum.call(et,nt)&&__defNormalProp(tt,nt,et[nt]);return tt},__spreadProps=(tt,et)=>__defProps(tt,__getOwnPropDescs(et));function traverseFiber(tt,et,nt){if(!tt)return;if(nt(tt)===!0)return tt;let rt=et?tt.return:tt.child;for(;rt;){const it=traverseFiber(rt,et,nt);if(it)return it;rt=et?null:rt.sibling}}function wrapContext(tt){try{return Object.defineProperties(tt,{_currentRenderer:{get(){return null},set(){}},_currentRenderer2:{get(){return null},set(){}}})}catch{return tt}}const FiberContext=wrapContext(reactExports.createContext(null));class FiberProvider extends reactExports.Component{render(){return reactExports.createElement(FiberContext.Provider,{value:this._reactInternals},this.props.children)}}const{ReactCurrentOwner,ReactCurrentDispatcher}=reactExports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function useFiber(){const tt=reactExports.useContext(FiberContext);if(tt===null)throw new Error("its-fine: useFiber must be called within a !");const et=reactExports.useId();return reactExports.useMemo(()=>{for(const rt of[ReactCurrentOwner==null?void 0:ReactCurrentOwner.current,tt,tt==null?void 0:tt.alternate]){if(!rt)continue;const it=traverseFiber(rt,!1,ot=>{let at=ot.memoizedState;for(;at;){if(at.memoizedState===et)return!0;at=at.next}});if(it)return it}},[tt,et])}function useContextMap(){var tt,et;const nt=useFiber(),[rt]=reactExports.useState(()=>new Map);rt.clear();let it=nt;for(;it;){const ot=(tt=it.type)==null?void 0:tt._context;ot&&ot!==FiberContext&&!rt.has(ot)&&rt.set(ot,(et=ReactCurrentDispatcher==null?void 0:ReactCurrentDispatcher.current)==null?void 0:et.readContext(wrapContext(ot))),it=it.return}return rt}function useContextBridge(){const tt=useContextMap();return reactExports.useMemo(()=>Array.from(tt.keys()).reduce((et,nt)=>rt=>reactExports.createElement(et,null,reactExports.createElement(nt.Provider,__spreadProps(__spreadValues({},rt),{value:tt.get(nt)}))),et=>reactExports.createElement(FiberProvider,__spreadValues({},et))),[tt])}const DOM_EVENTS={onClick:["click",!1],onContextMenu:["contextmenu",!1],onDoubleClick:["dblclick",!1],onWheel:["wheel",!0],onPointerDown:["pointerdown",!0],onPointerUp:["pointerup",!0],onPointerLeave:["pointerleave",!0],onPointerMove:["pointermove",!0],onPointerCancel:["pointercancel",!0],onLostPointerCapture:["lostpointercapture",!0]};function createPointerEvents(tt){const{handlePointer:et}=createEvents(tt);return{priority:1,enabled:!0,compute(nt,rt,it){rt.pointer.set(nt.offsetX/rt.size.width*2-1,-(nt.offsetY/rt.size.height)*2+1),rt.raycaster.setFromCamera(rt.pointer,rt.camera)},connected:void 0,handlers:Object.keys(DOM_EVENTS).reduce((nt,rt)=>({...nt,[rt]:et(rt)}),{}),update:()=>{var nt;const{events:rt,internal:it}=tt.getState();(nt=it.lastEvent)!=null&&nt.current&&rt.handlers&&rt.handlers.onPointerMove(it.lastEvent.current)},connect:nt=>{var rt;const{set:it,events:ot}=tt.getState();ot.disconnect==null||ot.disconnect(),it(at=>({events:{...at.events,connected:nt}})),Object.entries((rt=ot.handlers)!=null?rt:[]).forEach(([at,st])=>{const[lt,ct]=DOM_EVENTS[at];nt.addEventListener(lt,st,{passive:ct})})},disconnect:()=>{const{set:nt,events:rt}=tt.getState();if(rt.connected){var it;Object.entries((it=rt.handlers)!=null?it:[]).forEach(([ot,at])=>{if(rt&&rt.connected instanceof HTMLElement){const[st]=DOM_EVENTS[ot];rt.connected.removeEventListener(st,at)}}),nt(ot=>({events:{...ot.events,connected:void 0}}))}}}}const CanvasImpl=reactExports.forwardRef(function({children:et,fallback:nt,resize:rt,style:it,gl:ot,events:at=createPointerEvents,eventSource:st,eventPrefix:lt,shadows:ct,linear:ut,flat:ht,legacy:dt,orthographic:pt,frameloop:mt,dpr:gt,performance:yt,raycaster:bt,camera:vt,scene:xt,onPointerMissed:kt,onCreated:St,...Tt},At){reactExports.useMemo(()=>extend$2(THREE$1),[]);const Et=useContextBridge(),[$t,Dt]=useMeasure({scroll:!0,debounce:{scroll:50,resize:0},...rt}),jt=reactExports.useRef(null),Pt=reactExports.useRef(null);reactExports.useImperativeHandle(At,()=>jt.current);const Ct=useMutableCallback(kt),[wt,It]=reactExports.useState(!1),[Ot,Wt]=reactExports.useState(!1);if(wt)throw wt;if(Ot)throw Ot;const zt=reactExports.useRef(null);useIsomorphicLayoutEffect$1(()=>{const Nt=jt.current;Dt.width>0&&Dt.height>0&&Nt&&(zt.current||(zt.current=createRoot(Nt)),zt.current.configure({gl:ot,events:at,shadows:ct,linear:ut,flat:ht,legacy:dt,orthographic:pt,frameloop:mt,dpr:gt,performance:yt,raycaster:bt,camera:vt,scene:xt,size:Dt,onPointerMissed:(...Ut)=>Ct.current==null?void 0:Ct.current(...Ut),onCreated:Ut=>{Ut.events.connect==null||Ut.events.connect(st?isRef(st)?st.current:st:Pt.current),lt&&Ut.setEvents({compute:(Mt,Ht)=>{const en=Mt[lt+"X"],sn=Mt[lt+"Y"];Ht.pointer.set(en/Ht.size.width*2-1,-(sn/Ht.size.height)*2+1),Ht.raycaster.setFromCamera(Ht.pointer,Ht.camera)}}),St==null||St(Ut)}}),zt.current.render(reactExports.createElement(Et,null,reactExports.createElement(ErrorBoundary,{set:Wt},reactExports.createElement(reactExports.Suspense,{fallback:reactExports.createElement(Block,{set:It})},et)))))}),reactExports.useEffect(()=>{const Nt=jt.current;if(Nt)return()=>unmountComponentAtNode(Nt)},[]);const Ft=st?"none":"auto";return reactExports.createElement("div",_extends$u({ref:Pt,style:{position:"relative",width:"100%",height:"100%",overflow:"hidden",pointerEvents:Ft,...it}},Tt),reactExports.createElement("div",{ref:$t,style:{width:"100%",height:"100%"}},reactExports.createElement("canvas",{ref:jt,style:{display:"block"}},nt)))}),Canvas$1=reactExports.forwardRef(function(et,nt){return reactExports.createElement(FiberProvider,null,reactExports.createElement(CanvasImpl,_extends$u({},et,{ref:nt})))}),v1=new Vector3,v2=new Vector3,v3=new Vector3;function defaultCalculatePosition(tt,et,nt){const rt=v1.setFromMatrixPosition(tt.matrixWorld);rt.project(et);const it=nt.width/2,ot=nt.height/2;return[rt.x*it+it,-(rt.y*ot)+ot]}function isObjectBehindCamera(tt,et){const nt=v1.setFromMatrixPosition(tt.matrixWorld),rt=v2.setFromMatrixPosition(et.matrixWorld),it=nt.sub(rt),ot=et.getWorldDirection(v3);return it.angleTo(ot)>Math.PI/2}function isObjectVisible(tt,et,nt,rt){const it=v1.setFromMatrixPosition(tt.matrixWorld),ot=it.clone();ot.project(et),nt.setFromCamera(ot,et);const at=nt.intersectObjects(rt,!0);if(at.length){const st=at[0].distance;return it.distanceTo(nt.ray.origin)Math.abs(tt)<1e-10?0:tt;function getCSSMatrix(tt,et,nt=""){let rt="matrix3d(";for(let it=0;it!==16;it++)rt+=epsilon$1(et[it]*tt.elements[it])+(it!==15?",":")");return nt+rt}const getCameraCSSMatrix=(tt=>et=>getCSSMatrix(et,tt))([1,-1,1,1,1,-1,1,1,1,-1,1,1,1,-1,1,1]),getObjectCSSMatrix=(tt=>(et,nt)=>getCSSMatrix(et,tt(nt),"translate(-50%,-50%)"))(tt=>[1/tt,1/tt,1/tt,1,-1/tt,-1/tt,-1/tt,-1,1/tt,1/tt,1/tt,1,1,1,1,1]);function isRefObject(tt){return tt&&typeof tt=="object"&&"current"in tt}const Html$1=reactExports.forwardRef(({children:tt,eps:et=.001,style:nt,className:rt,prepend:it,center:ot,fullscreen:at,portal:st,distanceFactor:lt,sprite:ct=!1,transform:ut=!1,occlude:ht,onOcclude:dt,castShadow:pt,receiveShadow:mt,material:gt,geometry:yt,zIndexRange:bt=[16777271,0],calculatePosition:vt=defaultCalculatePosition,as:xt="div",wrapperClass:kt,pointerEvents:St="auto",...Tt},At)=>{const{gl:Et,camera:$t,scene:Dt,size:jt,raycaster:Pt,events:Ct,viewport:wt}=useThree(),[It]=reactExports.useState(()=>document.createElement(xt)),Ot=reactExports.useRef(),Wt=reactExports.useRef(null),zt=reactExports.useRef(0),Ft=reactExports.useRef([0,0]),Nt=reactExports.useRef(null),Ut=reactExports.useRef(null),Mt=(st==null?void 0:st.current)||Ct.connected||Et.domElement.parentNode,Ht=reactExports.useRef(null),en=reactExports.useRef(!1),sn=reactExports.useMemo(()=>ht&&ht!=="blending"||Array.isArray(ht)&&ht.length&&isRefObject(ht[0]),[ht]);reactExports.useLayoutEffect(()=>{const vn=Et.domElement;ht&&ht==="blending"?(vn.style.zIndex=`${Math.floor(bt[0]/2)}`,vn.style.position="absolute",vn.style.pointerEvents="none"):(vn.style.zIndex=null,vn.style.position=null,vn.style.pointerEvents=null)},[ht]),reactExports.useLayoutEffect(()=>{if(Wt.current){const vn=Ot.current=createRoot$1(It);if(Dt.updateMatrixWorld(),ut)It.style.cssText="position:absolute;top:0;left:0;pointer-events:none;overflow:hidden;";else{const an=vt(Wt.current,$t,jt);It.style.cssText=`position:absolute;top:0;left:0;transform:translate3d(${an[0]}px,${an[1]}px,0);transform-origin:0 0;`}return Mt&&(it?Mt.prepend(It):Mt.appendChild(It)),()=>{Mt&&Mt.removeChild(It),vn.unmount()}}},[Mt,ut]),reactExports.useLayoutEffect(()=>{kt&&(It.className=kt)},[kt]);const Kt=reactExports.useMemo(()=>ut?{position:"absolute",top:0,left:0,width:jt.width,height:jt.height,transformStyle:"preserve-3d",pointerEvents:"none"}:{position:"absolute",transform:ot?"translate3d(-50%,-50%,0)":"none",...at&&{top:-jt.height/2,left:-jt.width/2,width:jt.width,height:jt.height},...nt},[nt,ot,at,jt,ut]),rn=reactExports.useMemo(()=>({position:"absolute",pointerEvents:St}),[St]);reactExports.useLayoutEffect(()=>{if(en.current=!1,ut){var vn;(vn=Ot.current)==null||vn.render(reactExports.createElement("div",{ref:Nt,style:Kt},reactExports.createElement("div",{ref:Ut,style:rn},reactExports.createElement("div",{ref:At,className:rt,style:nt,children:tt}))))}else{var an;(an=Ot.current)==null||an.render(reactExports.createElement("div",{ref:At,style:Kt,className:rt,children:tt}))}});const nn=reactExports.useRef(!0);useFrame(vn=>{if(Wt.current){$t.updateMatrixWorld(),Wt.current.updateWorldMatrix(!0,!1);const an=ut?Ft.current:vt(Wt.current,$t,jt);if(ut||Math.abs(zt.current-$t.zoom)>et||Math.abs(Ft.current[0]-an[0])>et||Math.abs(Ft.current[1]-an[1])>et){const Qt=isObjectBehindCamera(Wt.current,$t);let _n=!1;sn&&(ht!=="blending"?_n=[Dt]:Array.isArray(ht)&&(_n=ht.map(Tn=>Tn.current)));const Pn=nn.current;if(_n){const Tn=isObjectVisible(Wt.current,$t,Pt,_n);nn.current=Tn&&!Qt}else nn.current=!Qt;Pn!==nn.current&&(dt?dt(!nn.current):It.style.display=nn.current?"block":"none");const $n=Math.floor(bt[0]/2),Nn=ht?sn?[bt[0],$n]:[$n-1,0]:bt;if(It.style.zIndex=`${objectZIndex(Wt.current,$t,Nn)}`,ut){const[Tn,cn]=[jt.width/2,jt.height/2],mn=$t.projectionMatrix.elements[5]*cn,{isOrthographicCamera:In,top:An,left:wn,bottom:fn,right:pn}=$t,kn=getCameraCSSMatrix($t.matrixWorldInverse),Dn=In?`scale(${mn})translate(${epsilon$1(-(pn+wn)/2)}px,${epsilon$1((An+fn)/2)}px)`:`translateZ(${mn}px)`;let un=Wt.current.matrixWorld;ct&&(un=$t.matrixWorldInverse.clone().transpose().copyPosition(un).scale(Wt.current.scale),un.elements[3]=un.elements[7]=un.elements[11]=0,un.elements[15]=1),It.style.width=jt.width+"px",It.style.height=jt.height+"px",It.style.perspective=In?"":`${mn}px`,Nt.current&&Ut.current&&(Nt.current.style.transform=`${Dn}${kn}translate(${Tn}px,${cn}px)`,Ut.current.style.transform=getObjectCSSMatrix(un,1/((lt||10)/400)))}else{const Tn=lt===void 0?1:objectScale(Wt.current,$t)*lt;It.style.transform=`translate3d(${an[0]}px,${an[1]}px,0) scale(${Tn})`}Ft.current=an,zt.current=$t.zoom}}if(!sn&&Ht.current&&!en.current)if(ut){if(Nt.current){const an=Nt.current.children[0];if(an!=null&&an.clientWidth&&an!=null&&an.clientHeight){const{isOrthographicCamera:Qt}=$t;if(Qt||yt)Tt.scale&&(Array.isArray(Tt.scale)?Tt.scale instanceof Vector3?Ht.current.scale.copy(Tt.scale.clone().divideScalar(1)):Ht.current.scale.set(1/Tt.scale[0],1/Tt.scale[1],1/Tt.scale[2]):Ht.current.scale.setScalar(1/Tt.scale));else{const _n=(lt||10)/400,Pn=an.clientWidth*_n,$n=an.clientHeight*_n;Ht.current.scale.set(Pn,$n,1)}en.current=!0}}}else{const an=It.children[0];if(an!=null&&an.clientWidth&&an!=null&&an.clientHeight){const Qt=1/wt.factor,_n=an.clientWidth*Qt,Pn=an.clientHeight*Qt;Ht.current.scale.set(_n,Pn,1),en.current=!0}Ht.current.lookAt(vn.camera.position)}});const hn=reactExports.useMemo(()=>({vertexShader:ut?void 0:` + const getCameraCSSMatrix = ( + (tt) => (et) => + getCSSMatrix(et, tt) + )([1, -1, 1, 1, 1, -1, 1, 1, 1, -1, 1, 1, 1, -1, 1, 1]), + getObjectCSSMatrix = ( + (tt) => (et, nt) => + getCSSMatrix(et, tt(nt), 'translate(-50%,-50%)') + )((tt) => [1 / tt, 1 / tt, 1 / tt, 1, -1 / tt, -1 / tt, -1 / tt, -1, 1 / tt, 1 / tt, 1 / tt, 1, 1, 1, 1, 1]) + function isRefObject(tt) { + return tt && typeof tt == 'object' && 'current' in tt + } + const Html$1 = reactExports.forwardRef( + ( + { + children: tt, + eps: et = 0.001, + style: nt, + className: rt, + prepend: it, + center: ot, + fullscreen: at, + portal: st, + distanceFactor: lt, + sprite: ct = !1, + transform: ut = !1, + occlude: ht, + onOcclude: dt, + castShadow: pt, + receiveShadow: mt, + material: gt, + geometry: yt, + zIndexRange: bt = [16777271, 0], + calculatePosition: vt = defaultCalculatePosition, + as: xt = 'div', + wrapperClass: kt, + pointerEvents: St = 'auto', + ...Tt + }, + At, + ) => { + const { gl: Et, camera: $t, scene: Dt, size: jt, raycaster: Pt, events: Ct, viewport: wt } = useThree(), + [It] = reactExports.useState(() => document.createElement(xt)), + Ot = reactExports.useRef(), + Wt = reactExports.useRef(null), + zt = reactExports.useRef(0), + Ft = reactExports.useRef([0, 0]), + Nt = reactExports.useRef(null), + Ut = reactExports.useRef(null), + Mt = (st == null ? void 0 : st.current) || Ct.connected || Et.domElement.parentNode, + Ht = reactExports.useRef(null), + en = reactExports.useRef(!1), + sn = reactExports.useMemo( + () => (ht && ht !== 'blending') || (Array.isArray(ht) && ht.length && isRefObject(ht[0])), + [ht], + ) + reactExports.useLayoutEffect(() => { + const vn = Et.domElement + ht && ht === 'blending' + ? ((vn.style.zIndex = `${Math.floor(bt[0] / 2)}`), + (vn.style.position = 'absolute'), + (vn.style.pointerEvents = 'none')) + : ((vn.style.zIndex = null), (vn.style.position = null), (vn.style.pointerEvents = null)) + }, [ht]), + reactExports.useLayoutEffect(() => { + if (Wt.current) { + const vn = (Ot.current = createRoot$1(It)) + if ((Dt.updateMatrixWorld(), ut)) + It.style.cssText = 'position:absolute;top:0;left:0;pointer-events:none;overflow:hidden;' + else { + const an = vt(Wt.current, $t, jt) + It.style.cssText = `position:absolute;top:0;left:0;transform:translate3d(${an[0]}px,${an[1]}px,0);transform-origin:0 0;` + } + return ( + Mt && (it ? Mt.prepend(It) : Mt.appendChild(It)), + () => { + Mt && Mt.removeChild(It), vn.unmount() + } + ) + } + }, [Mt, ut]), + reactExports.useLayoutEffect(() => { + kt && (It.className = kt) + }, [kt]) + const Kt = reactExports.useMemo( + () => + ut + ? { + position: 'absolute', + top: 0, + left: 0, + width: jt.width, + height: jt.height, + transformStyle: 'preserve-3d', + pointerEvents: 'none', + } + : { + position: 'absolute', + transform: ot ? 'translate3d(-50%,-50%,0)' : 'none', + ...(at && { top: -jt.height / 2, left: -jt.width / 2, width: jt.width, height: jt.height }), + ...nt, + }, + [nt, ot, at, jt, ut], + ), + rn = reactExports.useMemo(() => ({ position: 'absolute', pointerEvents: St }), [St]) + reactExports.useLayoutEffect(() => { + if (((en.current = !1), ut)) { + var vn + ;(vn = Ot.current) == null || + vn.render( + reactExports.createElement( + 'div', + { ref: Nt, style: Kt }, + reactExports.createElement( + 'div', + { ref: Ut, style: rn }, + reactExports.createElement('div', { ref: At, className: rt, style: nt, children: tt }), + ), + ), + ) + } else { + var an + ;(an = Ot.current) == null || + an.render(reactExports.createElement('div', { ref: At, style: Kt, className: rt, children: tt })) + } + }) + const nn = reactExports.useRef(!0) + useFrame((vn) => { + if (Wt.current) { + $t.updateMatrixWorld(), Wt.current.updateWorldMatrix(!0, !1) + const an = ut ? Ft.current : vt(Wt.current, $t, jt) + if ( + ut || + Math.abs(zt.current - $t.zoom) > et || + Math.abs(Ft.current[0] - an[0]) > et || + Math.abs(Ft.current[1] - an[1]) > et + ) { + const Qt = isObjectBehindCamera(Wt.current, $t) + let _n = !1 + sn && (ht !== 'blending' ? (_n = [Dt]) : Array.isArray(ht) && (_n = ht.map((Tn) => Tn.current))) + const Pn = nn.current + if (_n) { + const Tn = isObjectVisible(Wt.current, $t, Pt, _n) + nn.current = Tn && !Qt + } else nn.current = !Qt + Pn !== nn.current && (dt ? dt(!nn.current) : (It.style.display = nn.current ? 'block' : 'none')) + const $n = Math.floor(bt[0] / 2), + Nn = ht ? (sn ? [bt[0], $n] : [$n - 1, 0]) : bt + if (((It.style.zIndex = `${objectZIndex(Wt.current, $t, Nn)}`), ut)) { + const [Tn, cn] = [jt.width / 2, jt.height / 2], + mn = $t.projectionMatrix.elements[5] * cn, + { isOrthographicCamera: In, top: An, left: wn, bottom: fn, right: pn } = $t, + kn = getCameraCSSMatrix($t.matrixWorldInverse), + Dn = In + ? `scale(${mn})translate(${epsilon$1(-(pn + wn) / 2)}px,${epsilon$1((An + fn) / 2)}px)` + : `translateZ(${mn}px)` + let un = Wt.current.matrixWorld + ct && + ((un = $t.matrixWorldInverse.clone().transpose().copyPosition(un).scale(Wt.current.scale)), + (un.elements[3] = un.elements[7] = un.elements[11] = 0), + (un.elements[15] = 1)), + (It.style.width = jt.width + 'px'), + (It.style.height = jt.height + 'px'), + (It.style.perspective = In ? '' : `${mn}px`), + Nt.current && + Ut.current && + ((Nt.current.style.transform = `${Dn}${kn}translate(${Tn}px,${cn}px)`), + (Ut.current.style.transform = getObjectCSSMatrix(un, 1 / ((lt || 10) / 400)))) + } else { + const Tn = lt === void 0 ? 1 : objectScale(Wt.current, $t) * lt + It.style.transform = `translate3d(${an[0]}px,${an[1]}px,0) scale(${Tn})` + } + ;(Ft.current = an), (zt.current = $t.zoom) + } + } + if (!sn && Ht.current && !en.current) + if (ut) { + if (Nt.current) { + const an = Nt.current.children[0] + if (an != null && an.clientWidth && an != null && an.clientHeight) { + const { isOrthographicCamera: Qt } = $t + if (Qt || yt) + Tt.scale && + (Array.isArray(Tt.scale) + ? Tt.scale instanceof Vector3 + ? Ht.current.scale.copy(Tt.scale.clone().divideScalar(1)) + : Ht.current.scale.set(1 / Tt.scale[0], 1 / Tt.scale[1], 1 / Tt.scale[2]) + : Ht.current.scale.setScalar(1 / Tt.scale)) + else { + const _n = (lt || 10) / 400, + Pn = an.clientWidth * _n, + $n = an.clientHeight * _n + Ht.current.scale.set(Pn, $n, 1) + } + en.current = !0 + } + } + } else { + const an = It.children[0] + if (an != null && an.clientWidth && an != null && an.clientHeight) { + const Qt = 1 / wt.factor, + _n = an.clientWidth * Qt, + Pn = an.clientHeight * Qt + Ht.current.scale.set(_n, Pn, 1), (en.current = !0) + } + Ht.current.lookAt(vn.camera.position) + } + }) + const hn = reactExports.useMemo( + () => ({ + vertexShader: ut + ? void 0 + : ` /* This shader is from the THREE's SpriteMaterial. We need to turn the backing plane into a Sprite @@ -4198,11 +140150,530 @@ No matching component was found for: gl_Position = projectionMatrix * mvPosition; } - `,fragmentShader:` + `, + fragmentShader: ` void main() { gl_FragColor = vec4(0.0, 0.0, 0.0, 0.0); } - `}),[ut]);return reactExports.createElement("group",_extends$u({},Tt,{ref:Wt}),ht&&!sn&&reactExports.createElement("mesh",{castShadow:pt,receiveShadow:mt,ref:Ht},yt||reactExports.createElement("planeGeometry",null),gt||reactExports.createElement("shaderMaterial",{side:DoubleSide,vertexShader:hn.vertexShader,fragmentShader:hn.fragmentShader})))});function createStore(tt){let et;const nt=new Set,rt=(ct,ut)=>{const ht=typeof ct=="function"?ct(et):ct;if(ht!==et){const dt=et;et=ut?ht:Object.assign({},et,ht),nt.forEach(pt=>pt(et,dt))}},it=()=>et,ot=(ct,ut=it,ht=Object.is)=>{console.warn("[DEPRECATED] Please use `subscribeWithSelector` middleware");let dt=ut(et);function pt(){const mt=ut(et);if(!ht(dt,mt)){const gt=dt;ct(dt=mt,gt)}}return nt.add(pt),()=>nt.delete(pt)},lt={setState:rt,getState:it,subscribe:(ct,ut,ht)=>ut||ht?ot(ct,ut,ht):(nt.add(ct),()=>nt.delete(ct)),destroy:()=>nt.clear()};return et=tt(rt,it,lt),lt}const isSSR$1=typeof window>"u"||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),useIsomorphicLayoutEffect=isSSR$1?reactExports.useEffect:reactExports.useLayoutEffect;function create$1(tt){const et=typeof tt=="function"?createStore(tt):tt,nt=(rt=et.getState,it=Object.is)=>{const[,ot]=reactExports.useReducer(yt=>yt+1,0),at=et.getState(),st=reactExports.useRef(at),lt=reactExports.useRef(rt),ct=reactExports.useRef(it),ut=reactExports.useRef(!1),ht=reactExports.useRef();ht.current===void 0&&(ht.current=rt(at));let dt,pt=!1;(st.current!==at||lt.current!==rt||ct.current!==it||ut.current)&&(dt=rt(at),pt=!it(ht.current,dt)),useIsomorphicLayoutEffect(()=>{pt&&(ht.current=dt),st.current=at,lt.current=rt,ct.current=it,ut.current=!1});const mt=reactExports.useRef(at);useIsomorphicLayoutEffect(()=>{const yt=()=>{try{const vt=et.getState(),xt=lt.current(vt);ct.current(ht.current,xt)||(st.current=vt,ht.current=xt,ot())}catch{ut.current=!0,ot()}},bt=et.subscribe(yt);return et.getState()!==mt.current&&yt(),bt},[]);const gt=pt?dt:ht.current;return reactExports.useDebugValue(gt),gt};return Object.assign(nt,et),nt[Symbol.iterator]=function(){console.warn("[useStore, api] = create() is deprecated and will be removed in v4");const rt=[nt,et];return{next(){const it=rt.length<=0;return{value:rt.shift(),done:it}}}},nt}let saveLastTotalLoaded=0;const useProgress=create$1(tt=>(DefaultLoadingManager.onStart=(et,nt,rt)=>{tt({active:!0,item:et,loaded:nt,total:rt,progress:(nt-saveLastTotalLoaded)/(rt-saveLastTotalLoaded)*100})},DefaultLoadingManager.onLoad=()=>{tt({active:!1})},DefaultLoadingManager.onError=et=>tt(nt=>({errors:[...nt.errors,et]})),DefaultLoadingManager.onProgress=(et,nt,rt)=>{nt===rt&&(saveLastTotalLoaded=rt),tt({active:!0,item:et,loaded:nt,total:rt,progress:(nt-saveLastTotalLoaded)/(rt-saveLastTotalLoaded)*100||100})},{errors:[],active:!1,progress:0,item:"",loaded:0,total:0})),defaultDataInterpolation=tt=>`Loading ${tt.toFixed(2)}%`;function Loader$1({containerStyles:tt,innerStyles:et,barStyles:nt,dataStyles:rt,dataInterpolation:it=defaultDataInterpolation,initialState:ot=at=>at}){const{active:at,progress:st}=useProgress(),lt=reactExports.useRef(0),ct=reactExports.useRef(0),ut=reactExports.useRef(null),[ht,dt]=reactExports.useState(ot(at));reactExports.useEffect(()=>{let mt;return at!==ht&&(mt=setTimeout(()=>dt(at),300)),()=>clearTimeout(mt)},[ht,at]);const pt=reactExports.useCallback(()=>{ut.current&&(lt.current+=(st-lt.current)/2,(lt.current>.95*st||st===100)&&(lt.current=st),ut.current.innerText=it(lt.current),lt.current(pt(),()=>cancelAnimationFrame(ct.current)),[pt]),ht?reactExports.createElement("div",{style:{...styles$1.container,opacity:at?1:0,...tt}},reactExports.createElement("div",null,reactExports.createElement("div",{style:{...styles$1.inner,...et}},reactExports.createElement("div",{style:{...styles$1.bar,transform:`scaleX(${st/100})`,...nt}}),reactExports.createElement("span",{ref:ut,style:{...styles$1.data,...rt}})))):null}const styles$1={container:{position:"absolute",top:0,left:0,width:"100%",height:"100%",background:"#171717",display:"flex",alignItems:"center",justifyContent:"center",transition:"opacity 300ms ease",zIndex:1e3},inner:{width:100,height:3,background:"#272727",textAlign:"center"},bar:{height:3,width:"100%",background:"white",transition:"transform 200ms",transformOrigin:"left center"},data:{display:"inline-block",position:"relative",fontVariantNumeric:"tabular-nums",marginTop:"0.8em",color:"#f0f0f0",fontSize:"0.6em",fontFamily:'-apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", "Helvetica Neue", Helvetica, Arial, Roboto, Ubuntu, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',whiteSpace:"nowrap"}};function mergeRefs(tt){return function(et){tt.forEach(function(nt){typeof nt=="function"?nt(et):nt!=null&&(nt.current=et)})}}let webGL2Available;function isWebGL2Available$1(){var tt;if(webGL2Available!==void 0)return webGL2Available;try{let et;const nt=document.createElement("canvas");return webGL2Available=!!(window.WebGL2RenderingContext&&(et=nt.getContext("webgl2"))),et&&((tt=et.getExtension("WEBGL_lose_context"))==null||tt.loseContext()),webGL2Available}catch{return webGL2Available=!1}}function estimateBytesUsed(tt){let et=0;for(let rt in tt.attributes){const it=tt.getAttribute(rt);et+=it.count*it.itemSize*it.array.BYTES_PER_ELEMENT}const nt=tt.getIndex();return et+=nt?nt.count*nt.itemSize*nt.array.BYTES_PER_ELEMENT:0,et}const frustum=new Frustum,center$2=new Vector3,tmpPoint=new Vector3,vecNear=new Vector3,vecTopLeft=new Vector3,vecTopRight=new Vector3,vecDownRight=new Vector3,vecDownLeft=new Vector3,vecFarTopLeft=new Vector3,vecFarTopRight=new Vector3,vecFarDownRight=new Vector3,vecFarDownLeft=new Vector3,vectemp1=new Vector3,vectemp2=new Vector3,vectemp3=new Vector3;class SelectionBox{constructor(et,nt,rt){this.camera=et,this.scene=nt,this.startPoint=new Vector3,this.endPoint=new Vector3,this.collection=[],this.deep=rt||Number.MAX_VALUE}select(et,nt){return this.startPoint=et||this.startPoint,this.endPoint=nt||this.endPoint,this.collection=[],this.updateFrustum(this.startPoint,this.endPoint),this.searchChildInFrustum(frustum,this.scene),this.collection}updateFrustum(et,nt){if(et=et||this.startPoint,nt=nt||this.endPoint,et.x===nt.x&&(nt.x+=Number.EPSILON),et.y===nt.y&&(nt.y+=Number.EPSILON),this.camera.updateProjectionMatrix(),this.camera.updateMatrixWorld(),this.camera.isPerspectiveCamera){tmpPoint.copy(et),tmpPoint.x=Math.min(et.x,nt.x),tmpPoint.y=Math.max(et.y,nt.y),nt.x=Math.max(et.x,nt.x),nt.y=Math.min(et.y,nt.y),vecNear.setFromMatrixPosition(this.camera.matrixWorld),vecTopLeft.copy(tmpPoint),vecTopRight.set(nt.x,tmpPoint.y,0),vecDownRight.copy(nt),vecDownLeft.set(tmpPoint.x,nt.y,0),vecTopLeft.unproject(this.camera),vecTopRight.unproject(this.camera),vecDownRight.unproject(this.camera),vecDownLeft.unproject(this.camera),vectemp1.copy(vecTopLeft).sub(vecNear),vectemp2.copy(vecTopRight).sub(vecNear),vectemp3.copy(vecDownRight).sub(vecNear),vectemp1.normalize(),vectemp2.normalize(),vectemp3.normalize(),vectemp1.multiplyScalar(this.deep),vectemp2.multiplyScalar(this.deep),vectemp3.multiplyScalar(this.deep),vectemp1.add(vecNear),vectemp2.add(vecNear),vectemp3.add(vecNear);var rt=frustum.planes;rt[0].setFromCoplanarPoints(vecNear,vecTopLeft,vecTopRight),rt[1].setFromCoplanarPoints(vecNear,vecTopRight,vecDownRight),rt[2].setFromCoplanarPoints(vecDownRight,vecDownLeft,vecNear),rt[3].setFromCoplanarPoints(vecDownLeft,vecTopLeft,vecNear),rt[4].setFromCoplanarPoints(vecTopRight,vecDownRight,vecDownLeft),rt[5].setFromCoplanarPoints(vectemp3,vectemp2,vectemp1),rt[5].normal.multiplyScalar(-1)}else if(this.camera.isOrthographicCamera){const it=Math.min(et.x,nt.x),ot=Math.max(et.y,nt.y),at=Math.max(et.x,nt.x),st=Math.min(et.y,nt.y);vecTopLeft.set(it,ot,-1),vecTopRight.set(at,ot,-1),vecDownRight.set(at,st,-1),vecDownLeft.set(it,st,-1),vecFarTopLeft.set(it,ot,1),vecFarTopRight.set(at,ot,1),vecFarDownRight.set(at,st,1),vecFarDownLeft.set(it,st,1),vecTopLeft.unproject(this.camera),vecTopRight.unproject(this.camera),vecDownRight.unproject(this.camera),vecDownLeft.unproject(this.camera),vecFarTopLeft.unproject(this.camera),vecFarTopRight.unproject(this.camera),vecFarDownRight.unproject(this.camera),vecFarDownLeft.unproject(this.camera);var rt=frustum.planes;rt[0].setFromCoplanarPoints(vecTopLeft,vecFarTopLeft,vecFarTopRight),rt[1].setFromCoplanarPoints(vecTopRight,vecFarTopRight,vecFarDownRight),rt[2].setFromCoplanarPoints(vecFarDownRight,vecFarDownLeft,vecDownLeft),rt[3].setFromCoplanarPoints(vecFarDownLeft,vecFarTopLeft,vecTopLeft),rt[4].setFromCoplanarPoints(vecTopRight,vecDownRight,vecDownLeft),rt[5].setFromCoplanarPoints(vecFarDownRight,vecFarTopRight,vecFarTopLeft),rt[5].normal.multiplyScalar(-1)}else console.error("THREE.SelectionBox: Unsupported camera type.")}searchChildInFrustum(et,nt){if((nt.isMesh||nt.isLine||nt.isPoints)&&nt.material!==void 0&&(nt.geometry.boundingSphere===null&&nt.geometry.computeBoundingSphere(),center$2.copy(nt.geometry.boundingSphere.center),center$2.applyMatrix4(nt.matrixWorld),et.containsPoint(center$2)&&this.collection.push(nt)),nt.children.length>0)for(let rt=0;rt { + const ht = typeof ct == 'function' ? ct(et) : ct + if (ht !== et) { + const dt = et + ;(et = ut ? ht : Object.assign({}, et, ht)), nt.forEach((pt) => pt(et, dt)) + } + }, + it = () => et, + ot = (ct, ut = it, ht = Object.is) => { + console.warn('[DEPRECATED] Please use `subscribeWithSelector` middleware') + let dt = ut(et) + function pt() { + const mt = ut(et) + if (!ht(dt, mt)) { + const gt = dt + ct((dt = mt), gt) + } + } + return nt.add(pt), () => nt.delete(pt) + }, + lt = { + setState: rt, + getState: it, + subscribe: (ct, ut, ht) => (ut || ht ? ot(ct, ut, ht) : (nt.add(ct), () => nt.delete(ct))), + destroy: () => nt.clear(), + } + return (et = tt(rt, it, lt)), lt + } + const isSSR$1 = + typeof window > 'u' || !window.navigator || /ServerSideRendering|^Deno\//.test(window.navigator.userAgent), + useIsomorphicLayoutEffect = isSSR$1 ? reactExports.useEffect : reactExports.useLayoutEffect + function create$1(tt) { + const et = typeof tt == 'function' ? createStore(tt) : tt, + nt = (rt = et.getState, it = Object.is) => { + const [, ot] = reactExports.useReducer((yt) => yt + 1, 0), + at = et.getState(), + st = reactExports.useRef(at), + lt = reactExports.useRef(rt), + ct = reactExports.useRef(it), + ut = reactExports.useRef(!1), + ht = reactExports.useRef() + ht.current === void 0 && (ht.current = rt(at)) + let dt, + pt = !1 + ;(st.current !== at || lt.current !== rt || ct.current !== it || ut.current) && + ((dt = rt(at)), (pt = !it(ht.current, dt))), + useIsomorphicLayoutEffect(() => { + pt && (ht.current = dt), (st.current = at), (lt.current = rt), (ct.current = it), (ut.current = !1) + }) + const mt = reactExports.useRef(at) + useIsomorphicLayoutEffect(() => { + const yt = () => { + try { + const vt = et.getState(), + xt = lt.current(vt) + ct.current(ht.current, xt) || ((st.current = vt), (ht.current = xt), ot()) + } catch { + ;(ut.current = !0), ot() + } + }, + bt = et.subscribe(yt) + return et.getState() !== mt.current && yt(), bt + }, []) + const gt = pt ? dt : ht.current + return reactExports.useDebugValue(gt), gt + } + return ( + Object.assign(nt, et), + (nt[Symbol.iterator] = function () { + console.warn('[useStore, api] = create() is deprecated and will be removed in v4') + const rt = [nt, et] + return { + next() { + const it = rt.length <= 0 + return { value: rt.shift(), done: it } + }, + } + }), + nt + ) + } + let saveLastTotalLoaded = 0 + const useProgress = create$1( + (tt) => ( + (DefaultLoadingManager.onStart = (et, nt, rt) => { + tt({ + active: !0, + item: et, + loaded: nt, + total: rt, + progress: ((nt - saveLastTotalLoaded) / (rt - saveLastTotalLoaded)) * 100, + }) + }), + (DefaultLoadingManager.onLoad = () => { + tt({ active: !1 }) + }), + (DefaultLoadingManager.onError = (et) => tt((nt) => ({ errors: [...nt.errors, et] }))), + (DefaultLoadingManager.onProgress = (et, nt, rt) => { + nt === rt && (saveLastTotalLoaded = rt), + tt({ + active: !0, + item: et, + loaded: nt, + total: rt, + progress: ((nt - saveLastTotalLoaded) / (rt - saveLastTotalLoaded)) * 100 || 100, + }) + }), + { errors: [], active: !1, progress: 0, item: '', loaded: 0, total: 0 } + ), + ), + defaultDataInterpolation = (tt) => `Loading ${tt.toFixed(2)}%` + function Loader$1({ + containerStyles: tt, + innerStyles: et, + barStyles: nt, + dataStyles: rt, + dataInterpolation: it = defaultDataInterpolation, + initialState: ot = (at) => at, + }) { + const { active: at, progress: st } = useProgress(), + lt = reactExports.useRef(0), + ct = reactExports.useRef(0), + ut = reactExports.useRef(null), + [ht, dt] = reactExports.useState(ot(at)) + reactExports.useEffect(() => { + let mt + return at !== ht && (mt = setTimeout(() => dt(at), 300)), () => clearTimeout(mt) + }, [ht, at]) + const pt = reactExports.useCallback(() => { + ut.current && + ((lt.current += (st - lt.current) / 2), + (lt.current > 0.95 * st || st === 100) && (lt.current = st), + (ut.current.innerText = it(lt.current)), + lt.current < st && (ct.current = requestAnimationFrame(pt))) + }, [it, st]) + return ( + reactExports.useEffect(() => (pt(), () => cancelAnimationFrame(ct.current)), [pt]), + ht + ? reactExports.createElement( + 'div', + { style: { ...styles$1.container, opacity: at ? 1 : 0, ...tt } }, + reactExports.createElement( + 'div', + null, + reactExports.createElement( + 'div', + { style: { ...styles$1.inner, ...et } }, + reactExports.createElement('div', { + style: { ...styles$1.bar, transform: `scaleX(${st / 100})`, ...nt }, + }), + reactExports.createElement('span', { ref: ut, style: { ...styles$1.data, ...rt } }), + ), + ), + ) + : null + ) + } + const styles$1 = { + container: { + position: 'absolute', + top: 0, + left: 0, + width: '100%', + height: '100%', + background: '#171717', + display: 'flex', + alignItems: 'center', + justifyContent: 'center', + transition: 'opacity 300ms ease', + zIndex: 1e3, + }, + inner: { width: 100, height: 3, background: '#272727', textAlign: 'center' }, + bar: { + height: 3, + width: '100%', + background: 'white', + transition: 'transform 200ms', + transformOrigin: 'left center', + }, + data: { + display: 'inline-block', + position: 'relative', + fontVariantNumeric: 'tabular-nums', + marginTop: '0.8em', + color: '#f0f0f0', + fontSize: '0.6em', + fontFamily: + '-apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", "Helvetica Neue", Helvetica, Arial, Roboto, Ubuntu, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"', + whiteSpace: 'nowrap', + }, + } + function mergeRefs(tt) { + return function (et) { + tt.forEach(function (nt) { + typeof nt == 'function' ? nt(et) : nt != null && (nt.current = et) + }) + } + } + let webGL2Available + function isWebGL2Available$1() { + var tt + if (webGL2Available !== void 0) return webGL2Available + try { + let et + const nt = document.createElement('canvas') + return ( + (webGL2Available = !!(window.WebGL2RenderingContext && (et = nt.getContext('webgl2')))), + et && ((tt = et.getExtension('WEBGL_lose_context')) == null || tt.loseContext()), + webGL2Available + ) + } catch { + return (webGL2Available = !1) + } + } + function estimateBytesUsed(tt) { + let et = 0 + for (let rt in tt.attributes) { + const it = tt.getAttribute(rt) + et += it.count * it.itemSize * it.array.BYTES_PER_ELEMENT + } + const nt = tt.getIndex() + return (et += nt ? nt.count * nt.itemSize * nt.array.BYTES_PER_ELEMENT : 0), et + } + const frustum = new Frustum(), + center$2 = new Vector3(), + tmpPoint = new Vector3(), + vecNear = new Vector3(), + vecTopLeft = new Vector3(), + vecTopRight = new Vector3(), + vecDownRight = new Vector3(), + vecDownLeft = new Vector3(), + vecFarTopLeft = new Vector3(), + vecFarTopRight = new Vector3(), + vecFarDownRight = new Vector3(), + vecFarDownLeft = new Vector3(), + vectemp1 = new Vector3(), + vectemp2 = new Vector3(), + vectemp3 = new Vector3() + class SelectionBox { + constructor(et, nt, rt) { + ;(this.camera = et), + (this.scene = nt), + (this.startPoint = new Vector3()), + (this.endPoint = new Vector3()), + (this.collection = []), + (this.deep = rt || Number.MAX_VALUE) + } + select(et, nt) { + return ( + (this.startPoint = et || this.startPoint), + (this.endPoint = nt || this.endPoint), + (this.collection = []), + this.updateFrustum(this.startPoint, this.endPoint), + this.searchChildInFrustum(frustum, this.scene), + this.collection + ) + } + updateFrustum(et, nt) { + if ( + ((et = et || this.startPoint), + (nt = nt || this.endPoint), + et.x === nt.x && (nt.x += Number.EPSILON), + et.y === nt.y && (nt.y += Number.EPSILON), + this.camera.updateProjectionMatrix(), + this.camera.updateMatrixWorld(), + this.camera.isPerspectiveCamera) + ) { + tmpPoint.copy(et), + (tmpPoint.x = Math.min(et.x, nt.x)), + (tmpPoint.y = Math.max(et.y, nt.y)), + (nt.x = Math.max(et.x, nt.x)), + (nt.y = Math.min(et.y, nt.y)), + vecNear.setFromMatrixPosition(this.camera.matrixWorld), + vecTopLeft.copy(tmpPoint), + vecTopRight.set(nt.x, tmpPoint.y, 0), + vecDownRight.copy(nt), + vecDownLeft.set(tmpPoint.x, nt.y, 0), + vecTopLeft.unproject(this.camera), + vecTopRight.unproject(this.camera), + vecDownRight.unproject(this.camera), + vecDownLeft.unproject(this.camera), + vectemp1.copy(vecTopLeft).sub(vecNear), + vectemp2.copy(vecTopRight).sub(vecNear), + vectemp3.copy(vecDownRight).sub(vecNear), + vectemp1.normalize(), + vectemp2.normalize(), + vectemp3.normalize(), + vectemp1.multiplyScalar(this.deep), + vectemp2.multiplyScalar(this.deep), + vectemp3.multiplyScalar(this.deep), + vectemp1.add(vecNear), + vectemp2.add(vecNear), + vectemp3.add(vecNear) + var rt = frustum.planes + rt[0].setFromCoplanarPoints(vecNear, vecTopLeft, vecTopRight), + rt[1].setFromCoplanarPoints(vecNear, vecTopRight, vecDownRight), + rt[2].setFromCoplanarPoints(vecDownRight, vecDownLeft, vecNear), + rt[3].setFromCoplanarPoints(vecDownLeft, vecTopLeft, vecNear), + rt[4].setFromCoplanarPoints(vecTopRight, vecDownRight, vecDownLeft), + rt[5].setFromCoplanarPoints(vectemp3, vectemp2, vectemp1), + rt[5].normal.multiplyScalar(-1) + } else if (this.camera.isOrthographicCamera) { + const it = Math.min(et.x, nt.x), + ot = Math.max(et.y, nt.y), + at = Math.max(et.x, nt.x), + st = Math.min(et.y, nt.y) + vecTopLeft.set(it, ot, -1), + vecTopRight.set(at, ot, -1), + vecDownRight.set(at, st, -1), + vecDownLeft.set(it, st, -1), + vecFarTopLeft.set(it, ot, 1), + vecFarTopRight.set(at, ot, 1), + vecFarDownRight.set(at, st, 1), + vecFarDownLeft.set(it, st, 1), + vecTopLeft.unproject(this.camera), + vecTopRight.unproject(this.camera), + vecDownRight.unproject(this.camera), + vecDownLeft.unproject(this.camera), + vecFarTopLeft.unproject(this.camera), + vecFarTopRight.unproject(this.camera), + vecFarDownRight.unproject(this.camera), + vecFarDownLeft.unproject(this.camera) + var rt = frustum.planes + rt[0].setFromCoplanarPoints(vecTopLeft, vecFarTopLeft, vecFarTopRight), + rt[1].setFromCoplanarPoints(vecTopRight, vecFarTopRight, vecFarDownRight), + rt[2].setFromCoplanarPoints(vecFarDownRight, vecFarDownLeft, vecDownLeft), + rt[3].setFromCoplanarPoints(vecFarDownLeft, vecFarTopLeft, vecTopLeft), + rt[4].setFromCoplanarPoints(vecTopRight, vecDownRight, vecDownLeft), + rt[5].setFromCoplanarPoints(vecFarDownRight, vecFarTopRight, vecFarTopLeft), + rt[5].normal.multiplyScalar(-1) + } else console.error('THREE.SelectionBox: Unsupported camera type.') + } + searchChildInFrustum(et, nt) { + if ( + ((nt.isMesh || nt.isLine || nt.isPoints) && + nt.material !== void 0 && + (nt.geometry.boundingSphere === null && nt.geometry.computeBoundingSphere(), + center$2.copy(nt.geometry.boundingSphere.center), + center$2.applyMatrix4(nt.matrixWorld), + et.containsPoint(center$2) && this.collection.push(nt)), + nt.children.length > 0) + ) + for (let rt = 0; rt < nt.children.length; rt++) this.searchChildInFrustum(et, nt.children[rt]) + } + } + const _box$1 = new Box3(), + _vector = new Vector3() + class LineSegmentsGeometry extends InstancedBufferGeometry { + constructor() { + super(), (this.isLineSegmentsGeometry = !0), (this.type = 'LineSegmentsGeometry') + const et = [-1, 2, 0, 1, 2, 0, -1, 1, 0, 1, 1, 0, -1, 0, 0, 1, 0, 0, -1, -1, 0, 1, -1, 0], + nt = [-1, 2, 1, 2, -1, 1, 1, 1, -1, -1, 1, -1, -1, -2, 1, -2], + rt = [0, 2, 1, 2, 3, 1, 2, 4, 3, 4, 5, 3, 4, 6, 5, 6, 7, 5] + this.setIndex(rt), + this.setAttribute('position', new Float32BufferAttribute(et, 3)), + this.setAttribute('uv', new Float32BufferAttribute(nt, 2)) + } + applyMatrix4(et) { + const nt = this.attributes.instanceStart, + rt = this.attributes.instanceEnd + return ( + nt !== void 0 && (nt.applyMatrix4(et), rt.applyMatrix4(et), (nt.needsUpdate = !0)), + this.boundingBox !== null && this.computeBoundingBox(), + this.boundingSphere !== null && this.computeBoundingSphere(), + this + ) + } + setPositions(et) { + let nt + et instanceof Float32Array ? (nt = et) : Array.isArray(et) && (nt = new Float32Array(et)) + const rt = new InstancedInterleavedBuffer(nt, 6, 1) + return ( + this.setAttribute('instanceStart', new InterleavedBufferAttribute(rt, 3, 0)), + this.setAttribute('instanceEnd', new InterleavedBufferAttribute(rt, 3, 3)), + this.computeBoundingBox(), + this.computeBoundingSphere(), + this + ) + } + setColors(et) { + let nt + et instanceof Float32Array ? (nt = et) : Array.isArray(et) && (nt = new Float32Array(et)) + const rt = new InstancedInterleavedBuffer(nt, 6, 1) + return ( + this.setAttribute('instanceColorStart', new InterleavedBufferAttribute(rt, 3, 0)), + this.setAttribute('instanceColorEnd', new InterleavedBufferAttribute(rt, 3, 3)), + this + ) + } + fromWireframeGeometry(et) { + return this.setPositions(et.attributes.position.array), this + } + fromEdgesGeometry(et) { + return this.setPositions(et.attributes.position.array), this + } + fromMesh(et) { + return this.fromWireframeGeometry(new WireframeGeometry(et.geometry)), this + } + fromLineSegments(et) { + const nt = et.geometry + return this.setPositions(nt.attributes.position.array), this + } + computeBoundingBox() { + this.boundingBox === null && (this.boundingBox = new Box3()) + const et = this.attributes.instanceStart, + nt = this.attributes.instanceEnd + et !== void 0 && + nt !== void 0 && + (this.boundingBox.setFromBufferAttribute(et), _box$1.setFromBufferAttribute(nt), this.boundingBox.union(_box$1)) + } + computeBoundingSphere() { + this.boundingSphere === null && (this.boundingSphere = new Sphere()), + this.boundingBox === null && this.computeBoundingBox() + const et = this.attributes.instanceStart, + nt = this.attributes.instanceEnd + if (et !== void 0 && nt !== void 0) { + const rt = this.boundingSphere.center + this.boundingBox.getCenter(rt) + let it = 0 + for (let ot = 0, at = et.count; ot < at; ot++) + _vector.fromBufferAttribute(et, ot), + (it = Math.max(it, rt.distanceToSquared(_vector))), + _vector.fromBufferAttribute(nt, ot), + (it = Math.max(it, rt.distanceToSquared(_vector))) + ;(this.boundingSphere.radius = Math.sqrt(it)), + isNaN(this.boundingSphere.radius) && + console.error( + 'THREE.LineSegmentsGeometry.computeBoundingSphere(): Computed radius is NaN. The instanced position data is likely to have NaN values.', + this, + ) + } + } + toJSON() {} + applyMatrix(et) { + return ( + console.warn('THREE.LineSegmentsGeometry: applyMatrix() has been renamed to applyMatrix4().'), + this.applyMatrix4(et) + ) + } + } + class LineGeometry extends LineSegmentsGeometry { + constructor() { + super(), (this.isLineGeometry = !0), (this.type = 'LineGeometry') + } + setPositions(et) { + const nt = et.length - 3, + rt = new Float32Array(2 * nt) + for (let it = 0; it < nt; it += 3) + (rt[2 * it] = et[it]), + (rt[2 * it + 1] = et[it + 1]), + (rt[2 * it + 2] = et[it + 2]), + (rt[2 * it + 3] = et[it + 3]), + (rt[2 * it + 4] = et[it + 4]), + (rt[2 * it + 5] = et[it + 5]) + return super.setPositions(rt), this + } + setColors(et) { + const nt = et.length - 3, + rt = new Float32Array(2 * nt) + for (let it = 0; it < nt; it += 3) + (rt[2 * it] = et[it]), + (rt[2 * it + 1] = et[it + 1]), + (rt[2 * it + 2] = et[it + 2]), + (rt[2 * it + 3] = et[it + 3]), + (rt[2 * it + 4] = et[it + 4]), + (rt[2 * it + 5] = et[it + 5]) + return super.setColors(rt), this + } + fromLine(et) { + const nt = et.geometry + return this.setPositions(nt.attributes.position.array), this + } + } + class LineMaterial extends ShaderMaterial { + constructor(et) { + super({ + type: 'LineMaterial', + uniforms: UniformsUtils.clone( + UniformsUtils.merge([ + UniformsLib.common, + UniformsLib.fog, + { + worldUnits: { value: 1 }, + linewidth: { value: 1 }, + resolution: { value: new Vector2(1, 1) }, + dashOffset: { value: 0 }, + dashScale: { value: 1 }, + dashSize: { value: 1 }, + gapSize: { value: 1 }, + }, + ]), + ), + vertexShader: ` #include #include #include @@ -4430,7 +140901,8 @@ No matching component was found for: #include } - `,fragmentShader:` + `, + fragmentShader: ` uniform vec3 diffuse; uniform float opacity; uniform float linewidth; @@ -4584,63 +141056,5311 @@ No matching component was found for: gl_FragColor = vec4( diffuseColor.rgb, alpha ); #include - #include <${parseInt(REVISION.replace(/\D+/g,""))>=154?"colorspace_fragment":"encodings_fragment"}> + #include <${parseInt(REVISION.replace(/\D+/g, '')) >= 154 ? 'colorspace_fragment' : 'encodings_fragment'}> #include #include } - `,clipping:!0}),this.isLineMaterial=!0,Object.defineProperties(this,{color:{enumerable:!0,get:function(){return this.uniforms.diffuse.value},set:function(nt){this.uniforms.diffuse.value=nt}},worldUnits:{enumerable:!0,get:function(){return"WORLD_UNITS"in this.defines},set:function(nt){nt===!0?this.defines.WORLD_UNITS="":delete this.defines.WORLD_UNITS}},linewidth:{enumerable:!0,get:function(){return this.uniforms.linewidth.value},set:function(nt){this.uniforms.linewidth.value=nt}},dashed:{enumerable:!0,get:function(){return"USE_DASH"in this.defines},set(nt){!!nt!="USE_DASH"in this.defines&&(this.needsUpdate=!0),nt===!0?this.defines.USE_DASH="":delete this.defines.USE_DASH}},dashScale:{enumerable:!0,get:function(){return this.uniforms.dashScale.value},set:function(nt){this.uniforms.dashScale.value=nt}},dashSize:{enumerable:!0,get:function(){return this.uniforms.dashSize.value},set:function(nt){this.uniforms.dashSize.value=nt}},dashOffset:{enumerable:!0,get:function(){return this.uniforms.dashOffset.value},set:function(nt){this.uniforms.dashOffset.value=nt}},gapSize:{enumerable:!0,get:function(){return this.uniforms.gapSize.value},set:function(nt){this.uniforms.gapSize.value=nt}},opacity:{enumerable:!0,get:function(){return this.uniforms.opacity.value},set:function(nt){this.uniforms.opacity.value=nt}},resolution:{enumerable:!0,get:function(){return this.uniforms.resolution.value},set:function(nt){this.uniforms.resolution.value.copy(nt)}},alphaToCoverage:{enumerable:!0,get:function(){return"USE_ALPHA_TO_COVERAGE"in this.defines},set:function(nt){!!nt!="USE_ALPHA_TO_COVERAGE"in this.defines&&(this.needsUpdate=!0),nt===!0?(this.defines.USE_ALPHA_TO_COVERAGE="",this.extensions.derivatives=!0):(delete this.defines.USE_ALPHA_TO_COVERAGE,this.extensions.derivatives=!1)}}}),this.setValues(et)}}const _start=new Vector3,_end=new Vector3,_start4=new Vector4,_end4=new Vector4,_ssOrigin=new Vector4,_ssOrigin3=new Vector3,_mvMatrix=new Matrix4,_line=new Line3,_closestPoint=new Vector3,_box=new Box3,_sphere$1=new Sphere,_clipToWorldVector=new Vector4;let _ray,_instanceStart,_instanceEnd,_lineWidth;function getWorldSpaceHalfWidth(tt,et,nt){return _clipToWorldVector.set(0,0,-et,1).applyMatrix4(tt.projectionMatrix),_clipToWorldVector.multiplyScalar(1/_clipToWorldVector.w),_clipToWorldVector.x=_lineWidth/nt.width,_clipToWorldVector.y=_lineWidth/nt.height,_clipToWorldVector.applyMatrix4(tt.projectionMatrixInverse),_clipToWorldVector.multiplyScalar(1/_clipToWorldVector.w),Math.abs(Math.max(_clipToWorldVector.x,_clipToWorldVector.y))}function raycastWorldUnits(tt,et){for(let nt=0,rt=_instanceStart.count;ntut&&_end4.z>ut)continue;if(_start4.z>ut){const vt=_start4.z-_end4.z,xt=(_start4.z-ut)/vt;_start4.lerp(_end4,xt)}else if(_end4.z>ut){const vt=_end4.z-_start4.z,xt=(_end4.z-ut)/vt;_end4.lerp(_start4,xt)}_start4.applyMatrix4(rt),_end4.applyMatrix4(rt),_start4.multiplyScalar(1/_start4.w),_end4.multiplyScalar(1/_end4.w),_start4.x*=ot.x/2,_start4.y*=ot.y/2,_end4.x*=ot.x/2,_end4.y*=ot.y/2,_line.start.copy(_start4),_line.start.z=0,_line.end.copy(_end4),_line.end.z=0;const mt=_line.closestPointToPointParameter(_ssOrigin3,!0);_line.at(mt,_closestPoint);const gt=MathUtils.lerp(_start4.z,_end4.z,mt),yt=gt>=-1&><=1,bt=_ssOrigin3.distanceTo(_closestPoint)<_lineWidth*.5;if(yt&&bt){_line.start.fromBufferAttribute(lt,ht),_line.end.fromBufferAttribute(ct,ht),_line.start.applyMatrix4(at),_line.end.applyMatrix4(at);const vt=new Vector3,xt=new Vector3;_ray.distanceSqToSegment(_line.start,_line.end,xt,vt),nt.push({point:xt,pointOnLine:vt,distance:_ray.origin.distanceTo(xt),object:tt,face:null,faceIndex:ht,uv:null,uv2:null})}}}class LineSegments2 extends Mesh{constructor(et=new LineSegmentsGeometry,nt=new LineMaterial({color:Math.random()*16777215})){super(et,nt),this.isLineSegments2=!0,this.type="LineSegments2"}computeLineDistances(){const et=this.geometry,nt=et.attributes.instanceStart,rt=et.attributes.instanceEnd,it=new Float32Array(2*nt.count);for(let at=0,st=0,lt=nt.count;atlt,...st}){const{setEvents:lt,camera:ct,raycaster:ut,gl:ht,controls:dt,size:pt,get:mt}=useThree(),[gt,yt]=reactExports.useState(!1),[bt,vt]=reactExports.useReducer((Tt,{object:At,shift:Et})=>At===void 0?[]:Array.isArray(At)?At:Et?Tt.includes(At)?Tt.filter($t=>$t!==At):[At,...Tt]:Tt[0]===At?[]:[At],[]);reactExports.useEffect(()=>void(rt==null?void 0:rt(bt)),[bt]);const xt=reactExports.useCallback(Tt=>{Tt.stopPropagation(),vt({object:at([Tt.object])[0],shift:et&&Tt.shiftKey})},[]),kt=reactExports.useCallback(Tt=>!gt&&vt({}),[gt]),St=reactExports.useRef(null);return reactExports.useEffect(()=>{if(!tt||!et)return;const Tt=new SelectionBox(ct,St.current),At=document.createElement("div");At.style.pointerEvents="none",At.style.border=it,At.style.backgroundColor=ot,At.style.position="fixed";const Et=new Vector2,$t=new Vector2,Dt=new Vector2,jt=mt().events.enabled,Pt=dt==null?void 0:dt.enabled;let Ct=!1;function wt(Mt,Ht){const{offsetX:en,offsetY:sn}=Mt,{width:Kt,height:rn}=pt;Ht.set(en/Kt*2-1,-(sn/rn)*2+1)}function It(Mt){var Ht;dt&&(dt.enabled=!1),lt({enabled:!1}),Ct=!0,(Ht=ht.domElement.parentElement)==null||Ht.appendChild(At),At.style.left=`${Mt.clientX}px`,At.style.top=`${Mt.clientY}px`,At.style.width="0px",At.style.height="0px",Et.x=Mt.clientX,Et.y=Mt.clientY}function Ot(Mt){Dt.x=Math.max(Et.x,Mt.clientX),Dt.y=Math.max(Et.y,Mt.clientY),$t.x=Math.min(Et.x,Mt.clientX),$t.y=Math.min(Et.y,Mt.clientY),At.style.left=`${$t.x}px`,At.style.top=`${$t.y}px`,At.style.width=`${Dt.x-$t.x}px`,At.style.height=`${Dt.y-$t.y}px`}function Wt(){if(Ct){var Mt;dt&&(dt.enabled=Pt),lt({enabled:jt}),Ct=!1,(Mt=At.parentElement)==null||Mt.removeChild(At)}}function zt(Mt){Mt.shiftKey&&(It(Mt),wt(Mt,Tt.startPoint))}let Ft=[];function Nt(Mt){if(Ct){Ot(Mt),wt(Mt,Tt.endPoint);const Ht=Tt.select().sort(en=>en.uuid).filter(en=>en.isMesh);shallow(Ht,Ft)||(Ft=Ht,vt({object:at(Ht)}))}}function Ut(Mt){Ct&&Wt()}return document.addEventListener("pointerdown",zt,{passive:!0}),document.addEventListener("pointermove",Nt,{passive:!0,capture:!0}),document.addEventListener("pointerup",Ut,{passive:!0}),()=>{document.removeEventListener("pointerdown",zt),document.removeEventListener("pointermove",Nt),document.removeEventListener("pointerup",Ut)}},[pt.width,pt.height,ut,ct,dt,ht]),reactExports.createElement("group",_extends$u({ref:St,onClick:xt,onPointerOver:()=>yt(!0),onPointerOut:()=>yt(!1),onPointerMissed:kt},st),reactExports.createElement(context$1.Provider,{value:bt},nt))}const Line$1=reactExports.forwardRef(function({points:et,color:nt="black",vertexColors:rt,linewidth:it,lineWidth:ot,segments:at,dashed:st,...lt},ct){const ut=useThree(mt=>mt.size),ht=reactExports.useMemo(()=>at?new LineSegments2:new Line2,[at]),[dt]=reactExports.useState(()=>new LineMaterial),pt=reactExports.useMemo(()=>{const mt=at?new LineSegmentsGeometry:new LineGeometry,gt=et.map(yt=>{const bt=Array.isArray(yt);return yt instanceof Vector3?[yt.x,yt.y,yt.z]:yt instanceof Vector2?[yt.x,yt.y,0]:bt&&yt.length===3?[yt[0],yt[1],yt[2]]:bt&&yt.length===2?[yt[0],yt[1],0]:yt});if(mt.setPositions(gt.flat()),rt){const yt=rt.map(bt=>bt instanceof Color$1?bt.toArray():bt);mt.setColors(yt.flat())}return mt},[et,at,rt]);return reactExports.useLayoutEffect(()=>{ht.computeLineDistances()},[et,ht]),reactExports.useLayoutEffect(()=>{st?dt.defines.USE_DASH="":delete dt.defines.USE_DASH,dt.needsUpdate=!0},[st,dt]),reactExports.useEffect(()=>()=>pt.dispose(),[pt]),reactExports.createElement("primitive",_extends$u({object:ht,ref:ct},lt),reactExports.createElement("primitive",{object:pt,attach:"geometry"}),reactExports.createElement("primitive",_extends$u({object:dt,attach:"material",color:nt,vertexColors:!!rt,resolution:[ut.width,ut.height],linewidth:it??ot,dashed:st},lt)))});function workerBootstrap(){var tt=Object.create(null);function et(it,ot){var at=it.id,st=it.name,lt=it.dependencies;lt===void 0&&(lt=[]);var ct=it.init;ct===void 0&&(ct=function(){});var ut=it.getTransferables;if(ut===void 0&&(ut=null),!tt[at])try{lt=lt.map(function(dt){return dt&&dt.isWorkerModule&&(et(dt,function(pt){if(pt instanceof Error)throw pt}),dt=tt[dt.id].value),dt}),ct=rt("<"+st+">.init",ct),ut&&(ut=rt("<"+st+">.getTransferables",ut));var ht=null;typeof ct=="function"?ht=ct.apply(void 0,lt):console.error("worker module init function failed to rehydrate"),tt[at]={id:at,value:ht,getTransferables:ut},ot(ht)}catch(dt){dt&&dt.noLog||console.error(dt),ot(dt)}}function nt(it,ot){var at,st=it.id,lt=it.args;(!tt[st]||typeof tt[st].value!="function")&&ot(new Error("Worker module "+st+": not found or its 'init' did not return a function"));try{var ct=(at=tt[st]).value.apply(at,lt);ct&&typeof ct.then=="function"?ct.then(ut,function(ht){return ot(ht instanceof Error?ht:new Error(""+ht))}):ut(ct)}catch(ht){ot(ht)}function ut(ht){try{var dt=tt[st].getTransferables&&tt[st].getTransferables(ht);(!dt||!Array.isArray(dt)||!dt.length)&&(dt=void 0),ot(ht,dt)}catch(pt){console.error(pt),ot(pt)}}}function rt(it,ot){var at=void 0;self.troikaDefine=function(lt){return at=lt};var st=URL.createObjectURL(new Blob(["/** "+it.replace(/\*/g,"")+` **/ + `, + clipping: !0, + }), + (this.isLineMaterial = !0), + Object.defineProperties(this, { + color: { + enumerable: !0, + get: function () { + return this.uniforms.diffuse.value + }, + set: function (nt) { + this.uniforms.diffuse.value = nt + }, + }, + worldUnits: { + enumerable: !0, + get: function () { + return 'WORLD_UNITS' in this.defines + }, + set: function (nt) { + nt === !0 ? (this.defines.WORLD_UNITS = '') : delete this.defines.WORLD_UNITS + }, + }, + linewidth: { + enumerable: !0, + get: function () { + return this.uniforms.linewidth.value + }, + set: function (nt) { + this.uniforms.linewidth.value = nt + }, + }, + dashed: { + enumerable: !0, + get: function () { + return 'USE_DASH' in this.defines + }, + set(nt) { + !!nt != 'USE_DASH' in this.defines && (this.needsUpdate = !0), + nt === !0 ? (this.defines.USE_DASH = '') : delete this.defines.USE_DASH + }, + }, + dashScale: { + enumerable: !0, + get: function () { + return this.uniforms.dashScale.value + }, + set: function (nt) { + this.uniforms.dashScale.value = nt + }, + }, + dashSize: { + enumerable: !0, + get: function () { + return this.uniforms.dashSize.value + }, + set: function (nt) { + this.uniforms.dashSize.value = nt + }, + }, + dashOffset: { + enumerable: !0, + get: function () { + return this.uniforms.dashOffset.value + }, + set: function (nt) { + this.uniforms.dashOffset.value = nt + }, + }, + gapSize: { + enumerable: !0, + get: function () { + return this.uniforms.gapSize.value + }, + set: function (nt) { + this.uniforms.gapSize.value = nt + }, + }, + opacity: { + enumerable: !0, + get: function () { + return this.uniforms.opacity.value + }, + set: function (nt) { + this.uniforms.opacity.value = nt + }, + }, + resolution: { + enumerable: !0, + get: function () { + return this.uniforms.resolution.value + }, + set: function (nt) { + this.uniforms.resolution.value.copy(nt) + }, + }, + alphaToCoverage: { + enumerable: !0, + get: function () { + return 'USE_ALPHA_TO_COVERAGE' in this.defines + }, + set: function (nt) { + !!nt != 'USE_ALPHA_TO_COVERAGE' in this.defines && (this.needsUpdate = !0), + nt === !0 + ? ((this.defines.USE_ALPHA_TO_COVERAGE = ''), (this.extensions.derivatives = !0)) + : (delete this.defines.USE_ALPHA_TO_COVERAGE, (this.extensions.derivatives = !1)) + }, + }, + }), + this.setValues(et) + } + } + const _start = new Vector3(), + _end = new Vector3(), + _start4 = new Vector4(), + _end4 = new Vector4(), + _ssOrigin = new Vector4(), + _ssOrigin3 = new Vector3(), + _mvMatrix = new Matrix4(), + _line = new Line3(), + _closestPoint = new Vector3(), + _box = new Box3(), + _sphere$1 = new Sphere(), + _clipToWorldVector = new Vector4() + let _ray, _instanceStart, _instanceEnd, _lineWidth + function getWorldSpaceHalfWidth(tt, et, nt) { + return ( + _clipToWorldVector.set(0, 0, -et, 1).applyMatrix4(tt.projectionMatrix), + _clipToWorldVector.multiplyScalar(1 / _clipToWorldVector.w), + (_clipToWorldVector.x = _lineWidth / nt.width), + (_clipToWorldVector.y = _lineWidth / nt.height), + _clipToWorldVector.applyMatrix4(tt.projectionMatrixInverse), + _clipToWorldVector.multiplyScalar(1 / _clipToWorldVector.w), + Math.abs(Math.max(_clipToWorldVector.x, _clipToWorldVector.y)) + ) + } + function raycastWorldUnits(tt, et) { + for (let nt = 0, rt = _instanceStart.count; nt < rt; nt++) { + _line.start.fromBufferAttribute(_instanceStart, nt), _line.end.fromBufferAttribute(_instanceEnd, nt) + const it = new Vector3(), + ot = new Vector3() + _ray.distanceSqToSegment(_line.start, _line.end, ot, it), + ot.distanceTo(it) < _lineWidth * 0.5 && + et.push({ + point: ot, + pointOnLine: it, + distance: _ray.origin.distanceTo(ot), + object: tt, + face: null, + faceIndex: nt, + uv: null, + uv2: null, + }) + } + } + function raycastScreenSpace(tt, et, nt) { + const rt = et.projectionMatrix, + ot = tt.material.resolution, + at = tt.matrixWorld, + st = tt.geometry, + lt = st.attributes.instanceStart, + ct = st.attributes.instanceEnd, + ut = -et.near + _ray.at(1, _ssOrigin), + (_ssOrigin.w = 1), + _ssOrigin.applyMatrix4(et.matrixWorldInverse), + _ssOrigin.applyMatrix4(rt), + _ssOrigin.multiplyScalar(1 / _ssOrigin.w), + (_ssOrigin.x *= ot.x / 2), + (_ssOrigin.y *= ot.y / 2), + (_ssOrigin.z = 0), + _ssOrigin3.copy(_ssOrigin), + _mvMatrix.multiplyMatrices(et.matrixWorldInverse, at) + for (let ht = 0, dt = lt.count; ht < dt; ht++) { + if ( + (_start4.fromBufferAttribute(lt, ht), + _end4.fromBufferAttribute(ct, ht), + (_start4.w = 1), + (_end4.w = 1), + _start4.applyMatrix4(_mvMatrix), + _end4.applyMatrix4(_mvMatrix), + _start4.z > ut && _end4.z > ut) + ) + continue + if (_start4.z > ut) { + const vt = _start4.z - _end4.z, + xt = (_start4.z - ut) / vt + _start4.lerp(_end4, xt) + } else if (_end4.z > ut) { + const vt = _end4.z - _start4.z, + xt = (_end4.z - ut) / vt + _end4.lerp(_start4, xt) + } + _start4.applyMatrix4(rt), + _end4.applyMatrix4(rt), + _start4.multiplyScalar(1 / _start4.w), + _end4.multiplyScalar(1 / _end4.w), + (_start4.x *= ot.x / 2), + (_start4.y *= ot.y / 2), + (_end4.x *= ot.x / 2), + (_end4.y *= ot.y / 2), + _line.start.copy(_start4), + (_line.start.z = 0), + _line.end.copy(_end4), + (_line.end.z = 0) + const mt = _line.closestPointToPointParameter(_ssOrigin3, !0) + _line.at(mt, _closestPoint) + const gt = MathUtils.lerp(_start4.z, _end4.z, mt), + yt = gt >= -1 && gt <= 1, + bt = _ssOrigin3.distanceTo(_closestPoint) < _lineWidth * 0.5 + if (yt && bt) { + _line.start.fromBufferAttribute(lt, ht), + _line.end.fromBufferAttribute(ct, ht), + _line.start.applyMatrix4(at), + _line.end.applyMatrix4(at) + const vt = new Vector3(), + xt = new Vector3() + _ray.distanceSqToSegment(_line.start, _line.end, xt, vt), + nt.push({ + point: xt, + pointOnLine: vt, + distance: _ray.origin.distanceTo(xt), + object: tt, + face: null, + faceIndex: ht, + uv: null, + uv2: null, + }) + } + } + } + class LineSegments2 extends Mesh { + constructor(et = new LineSegmentsGeometry(), nt = new LineMaterial({ color: Math.random() * 16777215 })) { + super(et, nt), (this.isLineSegments2 = !0), (this.type = 'LineSegments2') + } + computeLineDistances() { + const et = this.geometry, + nt = et.attributes.instanceStart, + rt = et.attributes.instanceEnd, + it = new Float32Array(2 * nt.count) + for (let at = 0, st = 0, lt = nt.count; at < lt; at++, st += 2) + _start.fromBufferAttribute(nt, at), + _end.fromBufferAttribute(rt, at), + (it[st] = st === 0 ? 0 : it[st - 1]), + (it[st + 1] = it[st] + _start.distanceTo(_end)) + const ot = new InstancedInterleavedBuffer(it, 2, 1) + return ( + et.setAttribute('instanceDistanceStart', new InterleavedBufferAttribute(ot, 1, 0)), + et.setAttribute('instanceDistanceEnd', new InterleavedBufferAttribute(ot, 1, 1)), + this + ) + } + raycast(et, nt) { + const rt = this.material.worldUnits, + it = et.camera + it === null && + !rt && + console.error( + 'LineSegments2: "Raycaster.camera" needs to be set in order to raycast against LineSegments2 while worldUnits is set to false.', + ) + const ot = (et.params.Line2 !== void 0 && et.params.Line2.threshold) || 0 + _ray = et.ray + const at = this.matrixWorld, + st = this.geometry, + lt = this.material + ;(_lineWidth = lt.linewidth + ot), + (_instanceStart = st.attributes.instanceStart), + (_instanceEnd = st.attributes.instanceEnd), + st.boundingSphere === null && st.computeBoundingSphere(), + _sphere$1.copy(st.boundingSphere).applyMatrix4(at) + let ct + if (rt) ct = _lineWidth * 0.5 + else { + const ht = Math.max(it.near, _sphere$1.distanceToPoint(_ray.origin)) + ct = getWorldSpaceHalfWidth(it, ht, lt.resolution) + } + if (((_sphere$1.radius += ct), _ray.intersectsSphere(_sphere$1) === !1)) return + st.boundingBox === null && st.computeBoundingBox(), _box.copy(st.boundingBox).applyMatrix4(at) + let ut + if (rt) ut = _lineWidth * 0.5 + else { + const ht = Math.max(it.near, _box.distanceToPoint(_ray.origin)) + ut = getWorldSpaceHalfWidth(it, ht, lt.resolution) + } + _box.expandByScalar(ut), + _ray.intersectsBox(_box) !== !1 && (rt ? raycastWorldUnits(this, nt) : raycastScreenSpace(this, it, nt)) + } + } + class Line2 extends LineSegments2 { + constructor(et = new LineGeometry(), nt = new LineMaterial({ color: Math.random() * 16777215 })) { + super(et, nt), (this.isLine2 = !0), (this.type = 'Line2') + } + } + function shallow(tt, et) { + if (Object.is(tt, et)) return !0 + if (typeof tt != 'object' || tt === null || typeof et != 'object' || et === null) return !1 + const nt = Object.keys(tt) + if (nt.length !== Object.keys(et).length) return !1 + for (let rt = 0; rt < nt.length; rt++) + if (!Object.prototype.hasOwnProperty.call(et, nt[rt]) || !Object.is(tt[nt[rt]], et[nt[rt]])) return !1 + return !0 + } + const context$1 = reactExports.createContext([]) + function Select$1({ + box: tt, + multiple: et, + children: nt, + onChange: rt, + border: it = '1px solid #55aaff', + backgroundColor: ot = 'rgba(75, 160, 255, 0.1)', + filter: at = (lt) => lt, + ...st + }) { + const { setEvents: lt, camera: ct, raycaster: ut, gl: ht, controls: dt, size: pt, get: mt } = useThree(), + [gt, yt] = reactExports.useState(!1), + [bt, vt] = reactExports.useReducer( + (Tt, { object: At, shift: Et }) => + At === void 0 + ? [] + : Array.isArray(At) + ? At + : Et + ? Tt.includes(At) + ? Tt.filter(($t) => $t !== At) + : [At, ...Tt] + : Tt[0] === At + ? [] + : [At], + [], + ) + reactExports.useEffect(() => void (rt == null ? void 0 : rt(bt)), [bt]) + const xt = reactExports.useCallback((Tt) => { + Tt.stopPropagation(), vt({ object: at([Tt.object])[0], shift: et && Tt.shiftKey }) + }, []), + kt = reactExports.useCallback((Tt) => !gt && vt({}), [gt]), + St = reactExports.useRef(null) + return ( + reactExports.useEffect(() => { + if (!tt || !et) return + const Tt = new SelectionBox(ct, St.current), + At = document.createElement('div') + ;(At.style.pointerEvents = 'none'), + (At.style.border = it), + (At.style.backgroundColor = ot), + (At.style.position = 'fixed') + const Et = new Vector2(), + $t = new Vector2(), + Dt = new Vector2(), + jt = mt().events.enabled, + Pt = dt == null ? void 0 : dt.enabled + let Ct = !1 + function wt(Mt, Ht) { + const { offsetX: en, offsetY: sn } = Mt, + { width: Kt, height: rn } = pt + Ht.set((en / Kt) * 2 - 1, -(sn / rn) * 2 + 1) + } + function It(Mt) { + var Ht + dt && (dt.enabled = !1), + lt({ enabled: !1 }), + (Ct = !0), + (Ht = ht.domElement.parentElement) == null || Ht.appendChild(At), + (At.style.left = `${Mt.clientX}px`), + (At.style.top = `${Mt.clientY}px`), + (At.style.width = '0px'), + (At.style.height = '0px'), + (Et.x = Mt.clientX), + (Et.y = Mt.clientY) + } + function Ot(Mt) { + ;(Dt.x = Math.max(Et.x, Mt.clientX)), + (Dt.y = Math.max(Et.y, Mt.clientY)), + ($t.x = Math.min(Et.x, Mt.clientX)), + ($t.y = Math.min(Et.y, Mt.clientY)), + (At.style.left = `${$t.x}px`), + (At.style.top = `${$t.y}px`), + (At.style.width = `${Dt.x - $t.x}px`), + (At.style.height = `${Dt.y - $t.y}px`) + } + function Wt() { + if (Ct) { + var Mt + dt && (dt.enabled = Pt), + lt({ enabled: jt }), + (Ct = !1), + (Mt = At.parentElement) == null || Mt.removeChild(At) + } + } + function zt(Mt) { + Mt.shiftKey && (It(Mt), wt(Mt, Tt.startPoint)) + } + let Ft = [] + function Nt(Mt) { + if (Ct) { + Ot(Mt), wt(Mt, Tt.endPoint) + const Ht = Tt.select() + .sort((en) => en.uuid) + .filter((en) => en.isMesh) + shallow(Ht, Ft) || ((Ft = Ht), vt({ object: at(Ht) })) + } + } + function Ut(Mt) { + Ct && Wt() + } + return ( + document.addEventListener('pointerdown', zt, { passive: !0 }), + document.addEventListener('pointermove', Nt, { passive: !0, capture: !0 }), + document.addEventListener('pointerup', Ut, { passive: !0 }), + () => { + document.removeEventListener('pointerdown', zt), + document.removeEventListener('pointermove', Nt), + document.removeEventListener('pointerup', Ut) + } + ) + }, [pt.width, pt.height, ut, ct, dt, ht]), + reactExports.createElement( + 'group', + _extends$u( + { ref: St, onClick: xt, onPointerOver: () => yt(!0), onPointerOut: () => yt(!1), onPointerMissed: kt }, + st, + ), + reactExports.createElement(context$1.Provider, { value: bt }, nt), + ) + ) + } + const Line$1 = reactExports.forwardRef(function ( + { + points: et, + color: nt = 'black', + vertexColors: rt, + linewidth: it, + lineWidth: ot, + segments: at, + dashed: st, + ...lt + }, + ct, + ) { + const ut = useThree((mt) => mt.size), + ht = reactExports.useMemo(() => (at ? new LineSegments2() : new Line2()), [at]), + [dt] = reactExports.useState(() => new LineMaterial()), + pt = reactExports.useMemo(() => { + const mt = at ? new LineSegmentsGeometry() : new LineGeometry(), + gt = et.map((yt) => { + const bt = Array.isArray(yt) + return yt instanceof Vector3 + ? [yt.x, yt.y, yt.z] + : yt instanceof Vector2 + ? [yt.x, yt.y, 0] + : bt && yt.length === 3 + ? [yt[0], yt[1], yt[2]] + : bt && yt.length === 2 + ? [yt[0], yt[1], 0] + : yt + }) + if ((mt.setPositions(gt.flat()), rt)) { + const yt = rt.map((bt) => (bt instanceof Color$1 ? bt.toArray() : bt)) + mt.setColors(yt.flat()) + } + return mt + }, [et, at, rt]) + return ( + reactExports.useLayoutEffect(() => { + ht.computeLineDistances() + }, [et, ht]), + reactExports.useLayoutEffect(() => { + st ? (dt.defines.USE_DASH = '') : delete dt.defines.USE_DASH, (dt.needsUpdate = !0) + }, [st, dt]), + reactExports.useEffect(() => () => pt.dispose(), [pt]), + reactExports.createElement( + 'primitive', + _extends$u({ object: ht, ref: ct }, lt), + reactExports.createElement('primitive', { object: pt, attach: 'geometry' }), + reactExports.createElement( + 'primitive', + _extends$u( + { + object: dt, + attach: 'material', + color: nt, + vertexColors: !!rt, + resolution: [ut.width, ut.height], + linewidth: it ?? ot, + dashed: st, + }, + lt, + ), + ), + ) + ) + }) + function workerBootstrap() { + var tt = Object.create(null) + function et(it, ot) { + var at = it.id, + st = it.name, + lt = it.dependencies + lt === void 0 && (lt = []) + var ct = it.init + ct === void 0 && (ct = function () {}) + var ut = it.getTransferables + if ((ut === void 0 && (ut = null), !tt[at])) + try { + ;(lt = lt.map(function (dt) { + return ( + dt && + dt.isWorkerModule && + (et(dt, function (pt) { + if (pt instanceof Error) throw pt + }), + (dt = tt[dt.id].value)), + dt + ) + })), + (ct = rt('<' + st + '>.init', ct)), + ut && (ut = rt('<' + st + '>.getTransferables', ut)) + var ht = null + typeof ct == 'function' + ? (ht = ct.apply(void 0, lt)) + : console.error('worker module init function failed to rehydrate'), + (tt[at] = { id: at, value: ht, getTransferables: ut }), + ot(ht) + } catch (dt) { + ;(dt && dt.noLog) || console.error(dt), ot(dt) + } + } + function nt(it, ot) { + var at, + st = it.id, + lt = it.args + ;(!tt[st] || typeof tt[st].value != 'function') && + ot(new Error('Worker module ' + st + ": not found or its 'init' did not return a function")) + try { + var ct = (at = tt[st]).value.apply(at, lt) + ct && typeof ct.then == 'function' + ? ct.then(ut, function (ht) { + return ot(ht instanceof Error ? ht : new Error('' + ht)) + }) + : ut(ct) + } catch (ht) { + ot(ht) + } + function ut(ht) { + try { + var dt = tt[st].getTransferables && tt[st].getTransferables(ht) + ;(!dt || !Array.isArray(dt) || !dt.length) && (dt = void 0), ot(ht, dt) + } catch (pt) { + console.error(pt), ot(pt) + } + } + } + function rt(it, ot) { + var at = void 0 + self.troikaDefine = function (lt) { + return (at = lt) + } + var st = URL.createObjectURL( + new Blob( + [ + '/** ' + + it.replace(/\*/g, '') + + ` **/ troikaDefine( -`+ot+` -)`],{type:"application/javascript"}));try{importScripts(st)}catch(lt){console.error(lt)}return URL.revokeObjectURL(st),delete self.troikaDefine,at}self.addEventListener("message",function(it){var ot=it.data,at=ot.messageId,st=ot.action,lt=ot.data;try{st==="registerModule"&&et(lt,function(ct){ct instanceof Error?postMessage({messageId:at,success:!1,error:ct.message}):postMessage({messageId:at,success:!0,result:{isCallable:typeof ct=="function"}})}),st==="callModule"&&nt(lt,function(ct,ut){ct instanceof Error?postMessage({messageId:at,success:!1,error:ct.message}):postMessage({messageId:at,success:!0,result:ct},ut||void 0)})}catch(ct){postMessage({messageId:at,success:!1,error:ct.stack})}})}function defineMainThreadModule(tt){var et=function(){for(var nt=[],rt=arguments.length;rt--;)nt[rt]=arguments[rt];return et._getInitResult().then(function(it){if(typeof it=="function")return it.apply(void 0,nt);throw new Error("Worker module function was called but `init` did not return a callable function")})};return et._getInitResult=function(){var nt=tt.dependencies,rt=tt.init;nt=Array.isArray(nt)?nt.map(function(ot){return ot&&ot._getInitResult?ot._getInitResult():ot}):[];var it=Promise.all(nt).then(function(ot){return rt.apply(null,ot)});return et._getInitResult=function(){return it},it},et}var supportsWorkers=function(){var tt=!1;if(typeof window<"u"&&typeof window.document<"u")try{var et=new Worker(URL.createObjectURL(new Blob([""],{type:"application/javascript"})));et.terminate(),tt=!0}catch(nt){typeof process<"u",console.log("Troika createWorkerModule: web workers not allowed; falling back to main thread execution. Cause: ["+nt.message+"]")}return supportsWorkers=function(){return tt},tt},_workerModuleId=0,_messageId=0,_allowInitAsString=!1,workers=Object.create(null),registeredModules=Object.create(null),openRequests=Object.create(null);function defineWorkerModule(tt){if((!tt||typeof tt.init!="function")&&!_allowInitAsString)throw new Error("requires `options.init` function");var et=tt.dependencies,nt=tt.init,rt=tt.getTransferables,it=tt.workerId;if(!supportsWorkers())return defineMainThreadModule(tt);it==null&&(it="#default");var ot="workerModule"+ ++_workerModuleId,at=tt.name||ot,st=null;et=et&&et.map(function(ct){return typeof ct=="function"&&!ct.workerModuleData&&(_allowInitAsString=!0,ct=defineWorkerModule({workerId:it,name:"<"+at+"> function dependency: "+ct.name,init:`function(){return ( -`+stringifyFunction(ct)+` -)}`}),_allowInitAsString=!1),ct&&ct.workerModuleData&&(ct=ct.workerModuleData),ct});function lt(){for(var ct=[],ut=arguments.length;ut--;)ct[ut]=arguments[ut];if(!st){st=callWorker(it,"registerModule",lt.workerModuleData);var ht=function(){st=null,registeredModules[it].delete(ht)};(registeredModules[it]||(registeredModules[it]=new Set)).add(ht)}return st.then(function(dt){var pt=dt.isCallable;if(pt)return callWorker(it,"callModule",{id:ot,args:ct});throw new Error("Worker module function was called but `init` did not return a callable function")})}return lt.workerModuleData={isWorkerModule:!0,id:ot,name:at,dependencies:et,init:stringifyFunction(nt),getTransferables:rt&&stringifyFunction(rt)},lt}function terminateWorker(tt){registeredModules[tt]&®isteredModules[tt].forEach(function(et){et()}),workers[tt]&&(workers[tt].terminate(),delete workers[tt])}function stringifyFunction(tt){var et=tt.toString();return!/^function/.test(et)&&/^\w+\s*\(/.test(et)&&(et="function "+et),et}function getWorker(tt){var et=workers[tt];if(!et){var nt=stringifyFunction(workerBootstrap);et=workers[tt]=new Worker(URL.createObjectURL(new Blob(["/** Worker Module Bootstrap: "+tt.replace(/\*/g,"")+` **/ +` + + ot + + ` +)`, + ], + { type: 'application/javascript' }, + ), + ) + try { + importScripts(st) + } catch (lt) { + console.error(lt) + } + return URL.revokeObjectURL(st), delete self.troikaDefine, at + } + self.addEventListener('message', function (it) { + var ot = it.data, + at = ot.messageId, + st = ot.action, + lt = ot.data + try { + st === 'registerModule' && + et(lt, function (ct) { + ct instanceof Error + ? postMessage({ messageId: at, success: !1, error: ct.message }) + : postMessage({ messageId: at, success: !0, result: { isCallable: typeof ct == 'function' } }) + }), + st === 'callModule' && + nt(lt, function (ct, ut) { + ct instanceof Error + ? postMessage({ messageId: at, success: !1, error: ct.message }) + : postMessage({ messageId: at, success: !0, result: ct }, ut || void 0) + }) + } catch (ct) { + postMessage({ messageId: at, success: !1, error: ct.stack }) + } + }) + } + function defineMainThreadModule(tt) { + var et = function () { + for (var nt = [], rt = arguments.length; rt--; ) nt[rt] = arguments[rt] + return et._getInitResult().then(function (it) { + if (typeof it == 'function') return it.apply(void 0, nt) + throw new Error('Worker module function was called but `init` did not return a callable function') + }) + } + return ( + (et._getInitResult = function () { + var nt = tt.dependencies, + rt = tt.init + nt = Array.isArray(nt) + ? nt.map(function (ot) { + return ot && ot._getInitResult ? ot._getInitResult() : ot + }) + : [] + var it = Promise.all(nt).then(function (ot) { + return rt.apply(null, ot) + }) + return ( + (et._getInitResult = function () { + return it + }), + it + ) + }), + et + ) + } + var supportsWorkers = function () { + var tt = !1 + if (typeof window < 'u' && typeof window.document < 'u') + try { + var et = new Worker(URL.createObjectURL(new Blob([''], { type: 'application/javascript' }))) + et.terminate(), (tt = !0) + } catch (nt) { + typeof process < 'u', + console.log( + 'Troika createWorkerModule: web workers not allowed; falling back to main thread execution. Cause: [' + + nt.message + + ']', + ) + } + return ( + (supportsWorkers = function () { + return tt + }), + tt + ) + }, + _workerModuleId = 0, + _messageId = 0, + _allowInitAsString = !1, + workers = Object.create(null), + registeredModules = Object.create(null), + openRequests = Object.create(null) + function defineWorkerModule(tt) { + if ((!tt || typeof tt.init != 'function') && !_allowInitAsString) + throw new Error('requires `options.init` function') + var et = tt.dependencies, + nt = tt.init, + rt = tt.getTransferables, + it = tt.workerId + if (!supportsWorkers()) return defineMainThreadModule(tt) + it == null && (it = '#default') + var ot = 'workerModule' + ++_workerModuleId, + at = tt.name || ot, + st = null + et = + et && + et.map(function (ct) { + return ( + typeof ct == 'function' && + !ct.workerModuleData && + ((_allowInitAsString = !0), + (ct = defineWorkerModule({ + workerId: it, + name: '<' + at + '> function dependency: ' + ct.name, + init: + `function(){return ( +` + + stringifyFunction(ct) + + ` +)}`, + })), + (_allowInitAsString = !1)), + ct && ct.workerModuleData && (ct = ct.workerModuleData), + ct + ) + }) + function lt() { + for (var ct = [], ut = arguments.length; ut--; ) ct[ut] = arguments[ut] + if (!st) { + st = callWorker(it, 'registerModule', lt.workerModuleData) + var ht = function () { + ;(st = null), registeredModules[it].delete(ht) + } + ;(registeredModules[it] || (registeredModules[it] = new Set())).add(ht) + } + return st.then(function (dt) { + var pt = dt.isCallable + if (pt) return callWorker(it, 'callModule', { id: ot, args: ct }) + throw new Error('Worker module function was called but `init` did not return a callable function') + }) + } + return ( + (lt.workerModuleData = { + isWorkerModule: !0, + id: ot, + name: at, + dependencies: et, + init: stringifyFunction(nt), + getTransferables: rt && stringifyFunction(rt), + }), + lt + ) + } + function terminateWorker(tt) { + registeredModules[tt] && + registeredModules[tt].forEach(function (et) { + et() + }), + workers[tt] && (workers[tt].terminate(), delete workers[tt]) + } + function stringifyFunction(tt) { + var et = tt.toString() + return !/^function/.test(et) && /^\w+\s*\(/.test(et) && (et = 'function ' + et), et + } + function getWorker(tt) { + var et = workers[tt] + if (!et) { + var nt = stringifyFunction(workerBootstrap) + ;(et = workers[tt] = + new Worker( + URL.createObjectURL( + new Blob( + [ + '/** Worker Module Bootstrap: ' + + tt.replace(/\*/g, '') + + ` **/ + +;(` + + nt + + ')()', + ], + { type: 'application/javascript' }, + ), + ), + )), + (et.onmessage = function (rt) { + var it = rt.data, + ot = it.messageId, + at = openRequests[ot] + if (!at) throw new Error('WorkerModule response with empty or unknown messageId') + delete openRequests[ot], at(it) + }) + } + return et + } + function callWorker(tt, et, nt) { + return new Promise(function (rt, it) { + var ot = ++_messageId + ;(openRequests[ot] = function (at) { + at.success ? rt(at.result) : it(new Error('Error in worker ' + et + ' call: ' + at.error)) + }), + getWorker(tt).postMessage({ messageId: ot, action: et, data: nt }) + }) + } + function SDFGenerator() { + var tt = (function (et) { + function nt(Ft, Nt, Ut, Mt, Ht, en, sn, Kt) { + var rn = 1 - sn + ;(Kt.x = rn * rn * Ft + 2 * rn * sn * Ut + sn * sn * Ht), + (Kt.y = rn * rn * Nt + 2 * rn * sn * Mt + sn * sn * en) + } + function rt(Ft, Nt, Ut, Mt, Ht, en, sn, Kt, rn, nn) { + var hn = 1 - rn + ;(nn.x = hn * hn * hn * Ft + 3 * hn * hn * rn * Ut + 3 * hn * rn * rn * Ht + rn * rn * rn * sn), + (nn.y = hn * hn * hn * Nt + 3 * hn * hn * rn * Mt + 3 * hn * rn * rn * en + rn * rn * rn * Kt) + } + function it(Ft, Nt) { + for (var Ut = /([MLQCZ])([^MLQCZ]*)/g, Mt, Ht, en, sn, Kt; (Mt = Ut.exec(Ft)); ) { + var rn = Mt[2] + .replace(/^\s*|\s*$/g, '') + .split(/[,\s]+/) + .map(function (nn) { + return parseFloat(nn) + }) + switch (Mt[1]) { + case 'M': + ;(sn = Ht = rn[0]), (Kt = en = rn[1]) + break + case 'L': + ;(rn[0] !== sn || rn[1] !== Kt) && Nt('L', sn, Kt, (sn = rn[0]), (Kt = rn[1])) + break + case 'Q': { + Nt('Q', sn, Kt, (sn = rn[2]), (Kt = rn[3]), rn[0], rn[1]) + break + } + case 'C': { + Nt('C', sn, Kt, (sn = rn[4]), (Kt = rn[5]), rn[0], rn[1], rn[2], rn[3]) + break + } + case 'Z': + ;(sn !== Ht || Kt !== en) && Nt('L', sn, Kt, Ht, en) + break + } + } + } + function ot(Ft, Nt, Ut) { + Ut === void 0 && (Ut = 16) + var Mt = { x: 0, y: 0 } + it(Ft, function (Ht, en, sn, Kt, rn, nn, hn, vn, an) { + switch (Ht) { + case 'L': + Nt(en, sn, Kt, rn) + break + case 'Q': { + for (var Qt = en, _n = sn, Pn = 1; Pn < Ut; Pn++) + nt(en, sn, nn, hn, Kt, rn, Pn / (Ut - 1), Mt), Nt(Qt, _n, Mt.x, Mt.y), (Qt = Mt.x), (_n = Mt.y) + break + } + case 'C': { + for (var $n = en, Nn = sn, Tn = 1; Tn < Ut; Tn++) + rt(en, sn, nn, hn, vn, an, Kt, rn, Tn / (Ut - 1), Mt), Nt($n, Nn, Mt.x, Mt.y), ($n = Mt.x), (Nn = Mt.y) + break + } + } + }) + } + var at = + 'precision highp float;attribute vec2 aUV;varying vec2 vUV;void main(){vUV=aUV;gl_Position=vec4(mix(vec2(-1.0),vec2(1.0),aUV),0.0,1.0);}', + st = + 'precision highp float;uniform sampler2D tex;varying vec2 vUV;void main(){gl_FragColor=texture2D(tex,vUV);}', + lt = new WeakMap(), + ct = { premultipliedAlpha: !1, preserveDrawingBuffer: !0, antialias: !1, depth: !1 } + function ut(Ft, Nt) { + var Ut = Ft.getContext ? Ft.getContext('webgl', ct) : Ft, + Mt = lt.get(Ut) + if (!Mt) { + let $n = function (An) { + var wn = en[An] + if (!wn && ((wn = en[An] = Ut.getExtension(An)), !wn)) throw new Error(An + ' not supported') + return wn + }, + Nn = function (An, wn) { + var fn = Ut.createShader(wn) + return Ut.shaderSource(fn, An), Ut.compileShader(fn), fn + }, + Tn = function (An, wn, fn, pn) { + if (!sn[An]) { + var kn = {}, + Dn = {}, + un = Ut.createProgram() + Ut.attachShader(un, Nn(wn, Ut.VERTEX_SHADER)), + Ut.attachShader(un, Nn(fn, Ut.FRAGMENT_SHADER)), + Ut.linkProgram(un), + (sn[An] = { + program: un, + transaction: function (Xt) { + Ut.useProgram(un), + Xt({ + setUniform: function (Rn, jn) { + for (var On = [], Zn = arguments.length - 2; Zn-- > 0; ) On[Zn] = arguments[Zn + 2] + var Vn = Dn[jn] || (Dn[jn] = Ut.getUniformLocation(un, jn)) + Ut['uniform' + Rn].apply(Ut, [Vn].concat(On)) + }, + setAttribute: function (Rn, jn, On, Zn, Vn) { + var qn = kn[Rn] + qn || + (qn = kn[Rn] = { buf: Ut.createBuffer(), loc: Ut.getAttribLocation(un, Rn), data: null }), + Ut.bindBuffer(Ut.ARRAY_BUFFER, qn.buf), + Ut.vertexAttribPointer(qn.loc, jn, Ut.FLOAT, !1, 0, 0), + Ut.enableVertexAttribArray(qn.loc), + Ht + ? Ut.vertexAttribDivisor(qn.loc, Zn) + : $n('ANGLE_instanced_arrays').vertexAttribDivisorANGLE(qn.loc, Zn), + Vn !== qn.data && (Ut.bufferData(Ut.ARRAY_BUFFER, Vn, On), (qn.data = Vn)) + }, + }) + }, + }) + } + sn[An].transaction(pn) + }, + cn = function (An, wn) { + rn++ + try { + Ut.activeTexture(Ut.TEXTURE0 + rn) + var fn = Kt[An] + fn || + ((fn = Kt[An] = Ut.createTexture()), + Ut.bindTexture(Ut.TEXTURE_2D, fn), + Ut.texParameteri(Ut.TEXTURE_2D, Ut.TEXTURE_MIN_FILTER, Ut.NEAREST), + Ut.texParameteri(Ut.TEXTURE_2D, Ut.TEXTURE_MAG_FILTER, Ut.NEAREST)), + Ut.bindTexture(Ut.TEXTURE_2D, fn), + wn(fn, rn) + } finally { + rn-- + } + }, + mn = function (An, wn, fn) { + var pn = Ut.createFramebuffer() + nn.push(pn), + Ut.bindFramebuffer(Ut.FRAMEBUFFER, pn), + Ut.activeTexture(Ut.TEXTURE0 + wn), + Ut.bindTexture(Ut.TEXTURE_2D, An), + Ut.framebufferTexture2D(Ut.FRAMEBUFFER, Ut.COLOR_ATTACHMENT0, Ut.TEXTURE_2D, An, 0) + try { + fn(pn) + } finally { + Ut.deleteFramebuffer(pn), Ut.bindFramebuffer(Ut.FRAMEBUFFER, nn[--nn.length - 1] || null) + } + }, + In = function () { + ;(en = {}), (sn = {}), (Kt = {}), (rn = -1), (nn.length = 0) + } + var hn = $n, + vn = Nn, + an = Tn, + Qt = cn, + _n = mn, + Pn = In, + Ht = typeof WebGL2RenderingContext < 'u' && Ut instanceof WebGL2RenderingContext, + en = {}, + sn = {}, + Kt = {}, + rn = -1, + nn = [] + Ut.canvas.addEventListener( + 'webglcontextlost', + function (An) { + In(), An.preventDefault() + }, + !1, + ), + lt.set( + Ut, + (Mt = { + gl: Ut, + isWebGL2: Ht, + getExtension: $n, + withProgram: Tn, + withTexture: cn, + withTextureFramebuffer: mn, + handleContextLoss: In, + }), + ) + } + Nt(Mt) + } + function ht(Ft, Nt, Ut, Mt, Ht, en, sn, Kt) { + sn === void 0 && (sn = 15), + Kt === void 0 && (Kt = null), + ut(Ft, function (rn) { + var nn = rn.gl, + hn = rn.withProgram, + vn = rn.withTexture + vn('copy', function (an, Qt) { + nn.texImage2D(nn.TEXTURE_2D, 0, nn.RGBA, Ht, en, 0, nn.RGBA, nn.UNSIGNED_BYTE, Nt), + hn('copy', at, st, function (_n) { + var Pn = _n.setUniform, + $n = _n.setAttribute + $n('aUV', 2, nn.STATIC_DRAW, 0, new Float32Array([0, 0, 2, 0, 0, 2])), + Pn('1i', 'image', Qt), + nn.bindFramebuffer(nn.FRAMEBUFFER, Kt || null), + nn.disable(nn.BLEND), + nn.colorMask(sn & 8, sn & 4, sn & 2, sn & 1), + nn.viewport(Ut, Mt, Ht, en), + nn.scissor(Ut, Mt, Ht, en), + nn.drawArrays(nn.TRIANGLES, 0, 3) + }) + }) + }) + } + function dt(Ft, Nt, Ut) { + var Mt = Ft.width, + Ht = Ft.height + ut(Ft, function (en) { + var sn = en.gl, + Kt = new Uint8Array(Mt * Ht * 4) + sn.readPixels(0, 0, Mt, Ht, sn.RGBA, sn.UNSIGNED_BYTE, Kt), + (Ft.width = Nt), + (Ft.height = Ut), + ht(sn, Kt, 0, 0, Mt, Ht) + }) + } + var pt = Object.freeze({ + __proto__: null, + withWebGLContext: ut, + renderImageData: ht, + resizeWebGLCanvasWithoutClearing: dt, + }) + function mt(Ft, Nt, Ut, Mt, Ht, en) { + en === void 0 && (en = 1) + var sn = new Uint8Array(Ft * Nt), + Kt = Mt[2] - Mt[0], + rn = Mt[3] - Mt[1], + nn = [] + ot(Ut, function ($n, Nn, Tn, cn) { + nn.push({ + x1: $n, + y1: Nn, + x2: Tn, + y2: cn, + minX: Math.min($n, Tn), + minY: Math.min(Nn, cn), + maxX: Math.max($n, Tn), + maxY: Math.max(Nn, cn), + }) + }), + nn.sort(function ($n, Nn) { + return $n.maxX - Nn.maxX + }) + for (var hn = 0; hn < Ft; hn++) + for (var vn = 0; vn < Nt; vn++) { + var an = _n(Mt[0] + (Kt * (hn + 0.5)) / Ft, Mt[1] + (rn * (vn + 0.5)) / Nt), + Qt = Math.pow(1 - Math.abs(an) / Ht, en) / 2 + an < 0 && (Qt = 1 - Qt), (Qt = Math.max(0, Math.min(255, Math.round(Qt * 255)))), (sn[vn * Ft + hn] = Qt) + } + return sn + function _n($n, Nn) { + for (var Tn = 1 / 0, cn = 1 / 0, mn = nn.length; mn--; ) { + var In = nn[mn] + if (In.maxX + cn <= $n) break + if ($n + cn > In.minX && Nn - cn < In.maxY && Nn + cn > In.minY) { + var An = bt($n, Nn, In.x1, In.y1, In.x2, In.y2) + An < Tn && ((Tn = An), (cn = Math.sqrt(Tn))) + } + } + return Pn($n, Nn) && (cn = -cn), cn + } + function Pn($n, Nn) { + for (var Tn = 0, cn = nn.length; cn--; ) { + var mn = nn[cn] + if (mn.maxX <= $n) break + var In = mn.y1 > Nn != mn.y2 > Nn && $n < ((mn.x2 - mn.x1) * (Nn - mn.y1)) / (mn.y2 - mn.y1) + mn.x1 + In && (Tn += mn.y1 < mn.y2 ? 1 : -1) + } + return Tn !== 0 + } + } + function gt(Ft, Nt, Ut, Mt, Ht, en, sn, Kt, rn, nn) { + en === void 0 && (en = 1), + Kt === void 0 && (Kt = 0), + rn === void 0 && (rn = 0), + nn === void 0 && (nn = 0), + yt(Ft, Nt, Ut, Mt, Ht, en, sn, null, Kt, rn, nn) + } + function yt(Ft, Nt, Ut, Mt, Ht, en, sn, Kt, rn, nn, hn) { + en === void 0 && (en = 1), rn === void 0 && (rn = 0), nn === void 0 && (nn = 0), hn === void 0 && (hn = 0) + for (var vn = mt(Ft, Nt, Ut, Mt, Ht, en), an = new Uint8Array(vn.length * 4), Qt = 0; Qt < vn.length; Qt++) + an[Qt * 4 + hn] = vn[Qt] + ht(sn, an, rn, nn, Ft, Nt, 1 << (3 - hn), Kt) + } + function bt(Ft, Nt, Ut, Mt, Ht, en) { + var sn = Ht - Ut, + Kt = en - Mt, + rn = sn * sn + Kt * Kt, + nn = rn ? Math.max(0, Math.min(1, ((Ft - Ut) * sn + (Nt - Mt) * Kt) / rn)) : 0, + hn = Ft - (Ut + nn * sn), + vn = Nt - (Mt + nn * Kt) + return hn * hn + vn * vn + } + var vt = Object.freeze({ __proto__: null, generate: mt, generateIntoCanvas: gt, generateIntoFramebuffer: yt }), + xt = + 'precision highp float;uniform vec4 uGlyphBounds;attribute vec2 aUV;attribute vec4 aLineSegment;varying vec4 vLineSegment;varying vec2 vGlyphXY;void main(){vLineSegment=aLineSegment;vGlyphXY=mix(uGlyphBounds.xy,uGlyphBounds.zw,aUV);gl_Position=vec4(mix(vec2(-1.0),vec2(1.0),aUV),0.0,1.0);}', + kt = + 'precision highp float;uniform vec4 uGlyphBounds;uniform float uMaxDistance;uniform float uExponent;varying vec4 vLineSegment;varying vec2 vGlyphXY;float absDistToSegment(vec2 point,vec2 lineA,vec2 lineB){vec2 lineDir=lineB-lineA;float lenSq=dot(lineDir,lineDir);float t=lenSq==0.0 ? 0.0 : clamp(dot(point-lineA,lineDir)/lenSq,0.0,1.0);vec2 linePt=lineA+t*lineDir;return distance(point,linePt);}void main(){vec4 seg=vLineSegment;vec2 p=vGlyphXY;float dist=absDistToSegment(p,seg.xy,seg.zw);float val=pow(1.0-clamp(dist/uMaxDistance,0.0,1.0),uExponent)*0.5;bool crossing=(seg.y>p.y!=seg.w>p.y)&&(p.x<(seg.z-seg.x)*(p.y-seg.y)/(seg.w-seg.y)+seg.x);bool crossingUp=crossing&&vLineSegment.y1,1e>2,u>2,2wt>1,1>1,1ge>1,1wp>1,1j>1,f>1,hm>1,1>1,u>1,u6>1,1>1,+5,28>1,w>1,1>1,+3,b8>1,1>1,+3,1>3,-1>-1,3>1,1>1,+2,1s>1,1>1,x>1,th>1,1>1,+2,db>1,1>1,+3,3>1,1>1,+2,14qm>1,1>1,+1,4q>1,1e>2,u>2,2>1,+1', + canonical: + '6f1>-6dx,6dy>-6dx,6ec>-6ed,6ee>-6ed,6ww>2jj,-2ji>2jj,14r4>-1e7l,1e7m>-1e7l,1e7m>-1e5c,1e5d>-1e5b,1e5c>-14qx,14qy>-14qx,14vn>-1ecg,1ech>-1ecg,1edu>-1ecg,1eci>-1ecg,1eda>-1ecg,1eci>-1ecg,1eci>-168q,168r>-168q,168s>-14ye,14yf>-14ye', + } + function gt(cn, mn) { + var In = 36, + An = 0, + wn = new Map(), + fn = mn && new Map(), + pn + return ( + cn.split(',').forEach(function kn(Dn) { + if (Dn.indexOf('+') !== -1) for (var un = +Dn; un--; ) kn(pn) + else { + pn = Dn + var Zt = Dn.split('>'), + Xt = Zt[0], + Sn = Zt[1] + ;(Xt = String.fromCodePoint((An += parseInt(Xt, In)))), + (Sn = String.fromCodePoint((An += parseInt(Sn, In)))), + wn.set(Xt, Sn), + mn && fn.set(Sn, Xt) + } + }), + { map: wn, reverseMap: fn } + ) + } + var yt, bt, vt + function xt() { + if (!yt) { + var cn = gt(mt.pairs, !0), + mn = cn.map, + In = cn.reverseMap + ;(yt = mn), (bt = In), (vt = gt(mt.canonical, !1).map) + } + } + function kt(cn) { + return xt(), yt.get(cn) || null + } + function St(cn) { + return xt(), bt.get(cn) || null + } + function Tt(cn) { + return xt(), vt.get(cn) || null + } + var At = rt.L, + Et = rt.R, + $t = rt.EN, + Dt = rt.ES, + jt = rt.ET, + Pt = rt.AN, + Ct = rt.CS, + wt = rt.B, + It = rt.S, + Ot = rt.ON, + Wt = rt.BN, + zt = rt.NSM, + Ft = rt.AL, + Nt = rt.LRO, + Ut = rt.RLO, + Mt = rt.LRE, + Ht = rt.RLE, + en = rt.PDF, + sn = rt.LRI, + Kt = rt.RLI, + rn = rt.FSI, + nn = rt.PDI + function hn(cn, mn) { + for (var In = 125, An = new Uint32Array(cn.length), wn = 0; wn < cn.length; wn++) An[wn] = dt(cn[wn]) + var fn = new Map() + function pn(bs, $s) { + var os = An[bs] + ;(An[bs] = $s), + fn.set(os, fn.get(os) - 1), + os & st && fn.set(st, fn.get(st) - 1), + fn.set($s, (fn.get($s) || 0) + 1), + $s & st && fn.set(st, (fn.get(st) || 0) + 1) + } + for (var kn = new Uint8Array(cn.length), Dn = new Map(), un = [], Zt = null, Xt = 0; Xt < cn.length; Xt++) + Zt || + un.push((Zt = { start: Xt, end: cn.length - 1, level: mn === 'rtl' ? 1 : mn === 'ltr' ? 0 : Gu(Xt, !1) })), + An[Xt] & wt && ((Zt.end = Xt), (Zt = null)) + for ( + var Sn = Ht | Mt | Ut | Nt | ot | nn | en | wt, + Rn = function (bs) { + return bs + (bs & 1 ? 1 : 2) + }, + jn = function (bs) { + return bs + (bs & 1 ? 2 : 1) + }, + On = 0; + On < un.length; + On++ + ) { + Zt = un[On] + var Zn = [{ _level: Zt.level, _override: 0, _isolate: 0 }], + Vn = void 0, + qn = 0, + zn = 0, + Jn = 0 + fn.clear() + for (var Hn = Zt.start; Hn <= Zt.end; Hn++) { + var pr = An[Hn] + if ( + ((Vn = Zn[Zn.length - 1]), + fn.set(pr, (fn.get(pr) || 0) + 1), + pr & st && fn.set(st, (fn.get(st) || 0) + 1), + pr & Sn) + ) + if (pr & (Ht | Mt)) { + kn[Hn] = Vn._level + var fr = (pr === Ht ? jn : Rn)(Vn._level) + fr <= In && !qn && !zn ? Zn.push({ _level: fr, _override: 0, _isolate: 0 }) : qn || zn++ + } else if (pr & (Ut | Nt)) { + kn[Hn] = Vn._level + var xr = (pr === Ut ? jn : Rn)(Vn._level) + xr <= In && !qn && !zn ? Zn.push({ _level: xr, _override: pr & Ut ? Et : At, _isolate: 0 }) : qn || zn++ + } else if (pr & ot) { + pr & rn && (pr = Gu(Hn + 1, !0) === 1 ? Kt : sn), + (kn[Hn] = Vn._level), + Vn._override && pn(Hn, Vn._override) + var io = (pr === Kt ? jn : Rn)(Vn._level) + io <= In && qn === 0 && zn === 0 + ? (Jn++, Zn.push({ _level: io, _override: 0, _isolate: 1, _isolInitIndex: Hn })) + : qn++ + } else if (pr & nn) { + if (qn > 0) qn-- + else if (Jn > 0) { + for (zn = 0; !Zn[Zn.length - 1]._isolate; ) Zn.pop() + var Tr = Zn[Zn.length - 1]._isolInitIndex + Tr != null && (Dn.set(Tr, Hn), Dn.set(Hn, Tr)), Zn.pop(), Jn-- + } + ;(Vn = Zn[Zn.length - 1]), (kn[Hn] = Vn._level), Vn._override && pn(Hn, Vn._override) + } else + pr & en + ? (qn === 0 && + (zn > 0 ? zn-- : !Vn._isolate && Zn.length > 1 && (Zn.pop(), (Vn = Zn[Zn.length - 1]))), + (kn[Hn] = Vn._level)) + : pr & wt && (kn[Hn] = Zt.level) + else (kn[Hn] = Vn._level), Vn._override && pr !== Wt && pn(Hn, Vn._override) + } + for (var Ar = [], qr = null, jr = Zt.start; jr <= Zt.end; jr++) { + var Fr = An[jr] + if (!(Fr & lt)) { + var ao = kn[jr], + Yr = Fr & ot, + Dr = Fr === nn + qr && ao === qr._level + ? ((qr._end = jr), (qr._endsWithIsolInit = Yr)) + : Ar.push((qr = { _start: jr, _end: jr, _level: ao, _startsWithPDI: Dr, _endsWithIsolInit: Yr })) + } + } + for (var go = [], xn = 0; xn < Ar.length; xn++) { + var Mn = Ar[xn] + if (!Mn._startsWithPDI || (Mn._startsWithPDI && !Dn.has(Mn._start))) { + for (var dn = [(qr = Mn)], Jt = void 0; qr && qr._endsWithIsolInit && (Jt = Dn.get(qr._end)) != null; ) + for (var En = xn + 1; En < Ar.length; En++) + if (Ar[En]._start === Jt) { + dn.push((qr = Ar[En])) + break + } + for (var Ln = [], Un = 0; Un < dn.length; Un++) + for (var Kn = dn[Un], nr = Kn._start; nr <= Kn._end; nr++) Ln.push(nr) + for (var lr = kn[Ln[0]], cr = Zt.level, Hr = Ln[0] - 1; Hr >= 0; Hr--) + if (!(An[Hr] & lt)) { + cr = kn[Hr] + break + } + var vr = Ln[Ln.length - 1], + Nr = kn[vr], + Gr = Zt.level + if (!(An[vr] & ot)) { + for (var eo = vr + 1; eo <= Zt.end; eo++) + if (!(An[eo] & lt)) { + Gr = kn[eo] + break + } + } + go.push({ + _seqIndices: Ln, + _sosType: Math.max(cr, lr) % 2 ? Et : At, + _eosType: Math.max(Gr, Nr) % 2 ? Et : At, + }) + } + } + for (var Zr = 0; Zr < go.length; Zr++) { + var Jr = go[Zr], + wr = Jr._seqIndices, + Mr = Jr._sosType, + Ur = Jr._eosType, + Rr = kn[wr[0]] & 1 ? Et : At + if (fn.get(zt)) + for (var Pr = 0; Pr < wr.length; Pr++) { + var Lr = wr[Pr] + if (An[Lr] & zt) { + for (var Wr = Mr, Br = Pr - 1; Br >= 0; Br--) + if (!(An[wr[Br]] & lt)) { + Wr = An[wr[Br]] + break + } + pn(Lr, Wr & (ot | nn) ? Ot : Wr) + } + } + if (fn.get($t)) + for (var tr = 0; tr < wr.length; tr++) { + var ir = wr[tr] + if (An[ir] & $t) + for (var Sr = tr - 1; Sr >= -1; Sr--) { + var dr = Sr === -1 ? Mr : An[wr[Sr]] + if (dr & at) { + dr === Ft && pn(ir, Pt) + break + } + } + } + if (fn.get(Ft)) + for (var br = 0; br < wr.length; br++) { + var $r = wr[br] + An[$r] & Ft && pn($r, Et) + } + if (fn.get(Dt) || fn.get(Ct)) + for (var no = 1; no < wr.length - 1; no++) { + var so = wr[no] + if (An[so] & (Dt | Ct)) { + for (var fo = 0, po = 0, Yn = no - 1; Yn >= 0 && ((fo = An[wr[Yn]]), !!(fo & lt)); Yn--); + for (var vo = no + 1; vo < wr.length && ((po = An[wr[vo]]), !!(po & lt)); vo++); + fo === po && (An[so] === Dt ? fo === $t : fo & ($t | Pt)) && pn(so, fo) + } + } + if (fn.get($t)) + for (var _o = 0; _o < wr.length; _o++) { + var xo = wr[_o] + if (An[xo] & $t) { + for (var bo = _o - 1; bo >= 0 && An[wr[bo]] & (jt | lt); bo--) pn(wr[bo], $t) + for (_o++; _o < wr.length && An[wr[_o]] & (jt | lt | $t); _o++) An[wr[_o]] !== $t && pn(wr[_o], $t) + } + } + if (fn.get(jt) || fn.get(Dt) || fn.get(Ct)) + for (var Co = 0; Co < wr.length; Co++) { + var Ro = wr[Co] + if (An[Ro] & (jt | Dt | Ct)) { + pn(Ro, Ot) + for (var Wo = Co - 1; Wo >= 0 && An[wr[Wo]] & lt; Wo--) pn(wr[Wo], Ot) + for (var Po = Co + 1; Po < wr.length && An[wr[Po]] & lt; Po++) pn(wr[Po], Ot) + } + } + if (fn.get($t)) + for (var Fo = 0, Go = Mr; Fo < wr.length; Fo++) { + var Xo = wr[Fo], + ga = An[Xo] + ga & $t ? Go === At && pn(Xo, At) : ga & at && (Go = ga) + } + if (fn.get(st)) { + var na = Et | $t | Pt, + $a = na | At, + Zo = [] + { + for (var pu = [], eu = 0; eu < wr.length; eu++) + if (An[wr[eu]] & st) { + var No = cn[wr[eu]], + Mp = void 0 + if (kt(No) !== null) + if (pu.length < 63) pu.push({ char: No, seqIndex: eu }) + else break + else if ((Mp = St(No)) !== null) + for (var tu = pu.length - 1; tu >= 0; tu--) { + var op = pu[tu].char + if (op === Mp || op === St(Tt(No)) || kt(Tt(op)) === No) { + Zo.push([pu[tu].seqIndex, eu]), (pu.length = tu) + break + } + } + } + Zo.sort(function (bs, $s) { + return bs[0] - $s[0] + }) + } + for (var Rp = 0; Rp < Zo.length; Rp++) { + for (var mm = Zo[Rp], ts = mm[0], mu = mm[1], gm = !1, Us = 0, Bp = ts + 1; Bp < mu; Bp++) { + var Vu = wr[Bp] + if (An[Vu] & $a) { + gm = !0 + var Xs = An[Vu] & na ? Et : At + if (Xs === Rr) { + Us = Xs + break + } + } + } + if (gm && !Us) { + Us = Mr + for (var Yo = ts - 1; Yo >= 0; Yo--) { + var Ko = wr[Yo] + if (An[Ko] & $a) { + var Zs = An[Ko] & na ? Et : At + Zs !== Rr ? (Us = Zs) : (Us = Rr) + break + } + } + } + if (Us) { + if (((An[wr[ts]] = An[wr[mu]] = Us), Us !== Rr)) { + for (var zs = ts + 1; zs < wr.length; zs++) + if (!(An[wr[zs]] & lt)) { + dt(cn[wr[zs]]) & zt && (An[wr[zs]] = Us) + break + } + } + if (Us !== Rr) { + for (var nu = mu + 1; nu < wr.length; nu++) + if (!(An[wr[nu]] & lt)) { + dt(cn[wr[nu]]) & zt && (An[wr[nu]] = Us) + break + } + } + } + } + for (var Cl = 0; Cl < wr.length; Cl++) + if (An[wr[Cl]] & st) { + for (var Op = Cl, jp = Cl, Ws = Mr, Hu = Cl - 1; Hu >= 0; Hu--) + if (An[wr[Hu]] & lt) Op = Hu + else { + Ws = An[wr[Hu]] & na ? Et : At + break + } + for (var ns = Ur, gu = Cl + 1; gu < wr.length; gu++) + if (An[wr[gu]] & (st | lt)) jp = gu + else { + ns = An[wr[gu]] & na ? Et : At + break + } + for (var ls = Op; ls <= jp; ls++) An[wr[ls]] = Ws === ns ? Ws : Rr + Cl = jp + } + } + } + for (var ys = Zt.start; ys <= Zt.end; ys++) { + var Iu = kn[ys], + rs = An[ys] + if ( + (Iu & 1 ? rs & (At | $t | Pt) && kn[ys]++ : rs & Et ? kn[ys]++ : rs & (Pt | $t) && (kn[ys] += 2), + rs & lt && (kn[ys] = ys === 0 ? Zt.level : kn[ys - 1]), + ys === Zt.end || dt(cn[ys]) & (It | wt)) + ) + for (var yu = ys; yu >= 0 && dt(cn[yu]) & ct; yu--) kn[yu] = Zt.level + } + } + return { levels: kn, paragraphs: un } + function Gu(bs, $s) { + for (var os = bs; os < cn.length; os++) { + var Vo = An[os] + if (Vo & (Et | Ft)) return 1 + if (Vo & (wt | At) || ($s && Vo === nn)) return 0 + if (Vo & ot) { + var Js = Dp(os) + os = Js === -1 ? cn.length : Js + } + } + return 0 + } + function Dp(bs) { + for (var $s = 1, os = bs + 1; os < cn.length; os++) { + var Vo = An[os] + if (Vo & wt) break + if (Vo & nn) { + if (--$s === 0) return os + } else Vo & ot && $s++ + } + return -1 + } + } + var vn = + '14>1,j>2,t>2,u>2,1a>g,2v3>1,1>1,1ge>1,1wd>1,b>1,1j>1,f>1,ai>3,-2>3,+1,8>1k0,-1jq>1y7,-1y6>1hf,-1he>1h6,-1h5>1ha,-1h8>1qi,-1pu>1,6>3u,-3s>7,6>1,1>1,f>1,1>1,+2,3>1,1>1,+13,4>1,1>1,6>1eo,-1ee>1,3>1mg,-1me>1mk,-1mj>1mi,-1mg>1mi,-1md>1,1>1,+2,1>10k,-103>1,1>1,4>1,5>1,1>1,+10,3>1,1>8,-7>8,+1,-6>7,+1,a>1,1>1,u>1,u6>1,1>1,+5,26>1,1>1,2>1,2>2,8>1,7>1,4>1,1>1,+5,b8>1,1>1,+3,1>3,-2>1,2>1,1>1,+2,c>1,3>1,1>1,+2,h>1,3>1,a>1,1>1,2>1,3>1,1>1,d>1,f>1,3>1,1a>1,1>1,6>1,7>1,13>1,k>1,1>1,+19,4>1,1>1,+2,2>1,1>1,+18,m>1,a>1,1>1,lk>1,1>1,4>1,2>1,f>1,3>1,1>1,+3,db>1,1>1,+3,3>1,1>1,+2,14qm>1,1>1,+1,6>1,4j>1,j>2,t>2,u>2,2>1,+1', + an + function Qt() { + if (!an) { + var cn = gt(vn, !0), + mn = cn.map, + In = cn.reverseMap + In.forEach(function (An, wn) { + mn.set(wn, An) + }), + (an = mn) + } + } + function _n(cn) { + return Qt(), an.get(cn) || null + } + function Pn(cn, mn, In, An) { + var wn = cn.length + ;(In = Math.max(0, In == null ? 0 : +In)), (An = Math.min(wn - 1, An == null ? wn - 1 : +An)) + for (var fn = new Map(), pn = In; pn <= An; pn++) + if (mn[pn] & 1) { + var kn = _n(cn[pn]) + kn !== null && fn.set(pn, kn) + } + return fn + } + function $n(cn, mn, In, An) { + var wn = cn.length + ;(In = Math.max(0, In == null ? 0 : +In)), (An = Math.min(wn - 1, An == null ? wn - 1 : +An)) + var fn = [] + return ( + mn.paragraphs.forEach(function (pn) { + var kn = Math.max(In, pn.start), + Dn = Math.min(An, pn.end) + if (kn < Dn) { + for (var un = mn.levels.slice(kn, Dn + 1), Zt = Dn; Zt >= kn && dt(cn[Zt]) & ct; Zt--) un[Zt] = pn.level + for (var Xt = pn.level, Sn = 1 / 0, Rn = 0; Rn < un.length; Rn++) { + var jn = un[Rn] + jn > Xt && (Xt = jn), jn < Sn && (Sn = jn | 1) + } + for (var On = Xt; On >= Sn; On--) + for (var Zn = 0; Zn < un.length; Zn++) + if (un[Zn] >= On) { + for (var Vn = Zn; Zn + 1 < un.length && un[Zn + 1] >= On; ) Zn++ + Zn > Vn && fn.push([Vn + kn, Zn + kn]) + } + } + }), + fn + ) + } + function Nn(cn, mn, In, An) { + var wn = Tn(cn, mn, In, An), + fn = [].concat(cn) + return ( + wn.forEach(function (pn, kn) { + fn[kn] = (mn.levels[pn] & 1 ? _n(cn[pn]) : null) || cn[pn] + }), + fn.join('') + ) + } + function Tn(cn, mn, In, An) { + for (var wn = $n(cn, mn, In, An), fn = [], pn = 0; pn < cn.length; pn++) fn[pn] = pn + return ( + wn.forEach(function (kn) { + for (var Dn = kn[0], un = kn[1], Zt = fn.slice(Dn, un + 1), Xt = Zt.length; Xt--; ) fn[un - Xt] = Zt[Xt] + }), + fn + ) + } + return ( + (et.closingToOpeningBracket = St), + (et.getBidiCharType = dt), + (et.getBidiCharTypeName = pt), + (et.getCanonicalBracket = Tt), + (et.getEmbeddingLevels = hn), + (et.getMirroredCharacter = _n), + (et.getMirroredCharactersMap = Pn), + (et.getReorderSegments = $n), + (et.getReorderedIndices = Tn), + (et.getReorderedString = Nn), + (et.openingToClosingBracket = kt), + Object.defineProperty(et, '__esModule', { value: !0 }), + et + ) + })({}) + return tt + } + const voidMainRegExp = /\bvoid\s+main\s*\(\s*\)\s*{/g + function expandShaderIncludes(tt) { + const et = /^[ \t]*#include +<([\w\d./]+)>/gm + function nt(rt, it) { + let ot = ShaderChunk[it] + return ot ? expandShaderIncludes(ot) : rt + } + return tt.replace(et, nt) + } + const _lut = [] + for (let tt = 0; tt < 256; tt++) _lut[tt] = (tt < 16 ? '0' : '') + tt.toString(16) + function generateUUID() { + const tt = (Math.random() * 4294967295) | 0, + et = (Math.random() * 4294967295) | 0, + nt = (Math.random() * 4294967295) | 0, + rt = (Math.random() * 4294967295) | 0 + return ( + _lut[tt & 255] + + _lut[(tt >> 8) & 255] + + _lut[(tt >> 16) & 255] + + _lut[(tt >> 24) & 255] + + '-' + + _lut[et & 255] + + _lut[(et >> 8) & 255] + + '-' + + _lut[((et >> 16) & 15) | 64] + + _lut[(et >> 24) & 255] + + '-' + + _lut[(nt & 63) | 128] + + _lut[(nt >> 8) & 255] + + '-' + + _lut[(nt >> 16) & 255] + + _lut[(nt >> 24) & 255] + + _lut[rt & 255] + + _lut[(rt >> 8) & 255] + + _lut[(rt >> 16) & 255] + + _lut[(rt >> 24) & 255] + ).toUpperCase() + } + const assign$2 = + Object.assign || + function () { + let tt = arguments[0] + for (let et = 1, nt = arguments.length; et < nt; et++) { + let rt = arguments[et] + if (rt) for (let it in rt) Object.prototype.hasOwnProperty.call(rt, it) && (tt[it] = rt[it]) + } + return tt + }, + epoch = Date.now(), + CONSTRUCTOR_CACHE = new WeakMap(), + SHADER_UPGRADE_CACHE = new Map() + let materialInstanceId = 1e10 + function createDerivedMaterial(tt, et) { + const nt = getKeyForOptions(et) + let rt = CONSTRUCTOR_CACHE.get(tt) + if ((rt || CONSTRUCTOR_CACHE.set(tt, (rt = Object.create(null))), rt[nt])) return new rt[nt]() + const it = `_onBeforeCompile${nt}`, + ot = function (ct, ut) { + tt.onBeforeCompile.call(this, ct, ut) + const ht = this.customProgramCacheKey() + '|' + ct.vertexShader + '|' + ct.fragmentShader + let dt = SHADER_UPGRADE_CACHE[ht] + if (!dt) { + const pt = upgradeShaders(this, ct, et, nt) + dt = SHADER_UPGRADE_CACHE[ht] = pt + } + ;(ct.vertexShader = dt.vertexShader), + (ct.fragmentShader = dt.fragmentShader), + assign$2(ct.uniforms, this.uniforms), + et.timeUniform && + (ct.uniforms[et.timeUniform] = { + get value() { + return Date.now() - epoch + }, + }), + this[it] && this[it](ct) + }, + at = function () { + return st(et.chained ? tt : tt.clone()) + }, + st = function (ct) { + const ut = Object.create(ct, lt) + return ( + Object.defineProperty(ut, 'baseMaterial', { value: tt }), + Object.defineProperty(ut, 'id', { value: materialInstanceId++ }), + (ut.uuid = generateUUID()), + (ut.uniforms = assign$2({}, ct.uniforms, et.uniforms)), + (ut.defines = assign$2({}, ct.defines, et.defines)), + (ut.defines[`TROIKA_DERIVED_MATERIAL_${nt}`] = ''), + (ut.extensions = assign$2({}, ct.extensions, et.extensions)), + (ut._listeners = void 0), + ut + ) + }, + lt = { + constructor: { value: at }, + isDerivedMaterial: { value: !0 }, + customProgramCacheKey: { + writable: !0, + configurable: !0, + value: function () { + return tt.customProgramCacheKey() + '|' + nt + }, + }, + onBeforeCompile: { + get() { + return ot + }, + set(ct) { + this[it] = ct + }, + }, + copy: { + writable: !0, + configurable: !0, + value: function (ct) { + return ( + tt.copy.call(this, ct), + !tt.isShaderMaterial && + !tt.isDerivedMaterial && + (assign$2(this.extensions, ct.extensions), + assign$2(this.defines, ct.defines), + assign$2(this.uniforms, UniformsUtils.clone(ct.uniforms))), + this + ) + }, + }, + clone: { + writable: !0, + configurable: !0, + value: function () { + const ct = new tt.constructor() + return st(ct).copy(this) + }, + }, + getDepthMaterial: { + writable: !0, + configurable: !0, + value: function () { + let ct = this._depthMaterial + return ( + ct || + ((ct = this._depthMaterial = + createDerivedMaterial( + tt.isDerivedMaterial + ? tt.getDepthMaterial() + : new MeshDepthMaterial({ depthPacking: RGBADepthPacking }), + et, + )), + (ct.defines.IS_DEPTH_MATERIAL = ''), + (ct.uniforms = this.uniforms)), + ct + ) + }, + }, + getDistanceMaterial: { + writable: !0, + configurable: !0, + value: function () { + let ct = this._distanceMaterial + return ( + ct || + ((ct = this._distanceMaterial = + createDerivedMaterial( + tt.isDerivedMaterial ? tt.getDistanceMaterial() : new MeshDistanceMaterial(), + et, + )), + (ct.defines.IS_DISTANCE_MATERIAL = ''), + (ct.uniforms = this.uniforms)), + ct + ) + }, + }, + dispose: { + writable: !0, + configurable: !0, + value() { + const { _depthMaterial: ct, _distanceMaterial: ut } = this + ct && ct.dispose(), ut && ut.dispose(), tt.dispose.call(this) + }, + }, + } + return (rt[nt] = at), new at() + } + function upgradeShaders(tt, { vertexShader: et, fragmentShader: nt }, rt, it) { + let { + vertexDefs: ot, + vertexMainIntro: at, + vertexMainOutro: st, + vertexTransform: lt, + fragmentDefs: ct, + fragmentMainIntro: ut, + fragmentMainOutro: ht, + fragmentColorTransform: dt, + customRewriter: pt, + timeUniform: mt, + } = rt + if ( + ((ot = ot || ''), + (at = at || ''), + (st = st || ''), + (ct = ct || ''), + (ut = ut || ''), + (ht = ht || ''), + (lt || pt) && (et = expandShaderIncludes(et)), + (dt || pt) && + ((nt = nt.replace( + /^[ \t]*#include <((?:tonemapping|encodings|fog|premultiplied_alpha|dithering)_fragment)>/gm, + ` +//!BEGIN_POST_CHUNK $1 +$& +//!END_POST_CHUNK +`, + )), + (nt = expandShaderIncludes(nt))), + pt) + ) { + let gt = pt({ vertexShader: et, fragmentShader: nt }) + ;(et = gt.vertexShader), (nt = gt.fragmentShader) + } + if (dt) { + let gt = [] + ;(nt = nt.replace(/^\/\/!BEGIN_POST_CHUNK[^]+?^\/\/!END_POST_CHUNK/gm, (yt) => (gt.push(yt), ''))), + (ht = `${dt} +${gt.join(` +`)} +${ht}`) + } + if (mt) { + const gt = ` +uniform float ${mt}; +` + ;(ot = gt + ot), (ct = gt + ct) + } + return ( + lt && + ((et = `vec3 troika_position_${it}; +vec3 troika_normal_${it}; +vec2 troika_uv_${it}; +${et} +`), + (ot = `${ot} +void troikaVertexTransform${it}(inout vec3 position, inout vec3 normal, inout vec2 uv) { + ${lt} +} +`), + (at = ` +troika_position_${it} = vec3(position); +troika_normal_${it} = vec3(normal); +troika_uv_${it} = vec2(uv); +troikaVertexTransform${it}(troika_position_${it}, troika_normal_${it}, troika_uv_${it}); +${at} +`), + (et = et.replace(/\b(position|normal|uv)\b/g, (gt, yt, bt, vt) => + /\battribute\s+vec[23]\s+$/.test(vt.substr(0, bt)) ? yt : `troika_${yt}_${it}`, + )), + (tt.map && tt.map.channel > 0) || (et = et.replace(/\bMAP_UV\b/g, `troika_uv_${it}`))), + (et = injectIntoShaderCode(et, it, ot, at, st)), + (nt = injectIntoShaderCode(nt, it, ct, ut, ht)), + { vertexShader: et, fragmentShader: nt } + ) + } + function injectIntoShaderCode(tt, et, nt, rt, it) { + return ( + (rt || it || nt) && + ((tt = tt.replace( + voidMainRegExp, + ` +${nt} +void troikaOrigMain${et}() {`, + )), + (tt += ` +void main() { + ${rt} + troikaOrigMain${et}(); + ${it} +}`)), + tt + ) + } + function optionsJsonReplacer(tt, et) { + return tt === 'uniforms' ? void 0 : typeof et == 'function' ? et.toString() : et + } + let _idCtr = 0 + const optionsHashesToIds = new Map() + function getKeyForOptions(tt) { + const et = JSON.stringify(tt, optionsJsonReplacer) + let nt = optionsHashesToIds.get(et) + return nt == null && optionsHashesToIds.set(et, (nt = ++_idCtr)), nt + } + function createTypesetter(tt, et, nt) { + const { defaultFontURL: rt } = nt, + it = Object.create(null), + ot = 1 / 0, + at = + /[\u00AD\u034F\u061C\u115F-\u1160\u17B4-\u17B5\u180B-\u180E\u200B-\u200F\u202A-\u202E\u2060-\u206F\u3164\uFE00-\uFE0F\uFEFF\uFFA0\uFFF0-\uFFF8]/, + st = '[^\\S\\u00A0]', + lt = new RegExp(`${st}|[\\-\\u007C\\u00AD\\u2010\\u2012-\\u2014\\u2027\\u2056\\u2E17\\u2E40]`) + function ct(vt, xt) { + function kt() { + const St = (Tt) => { + console.error(`Failure loading font ${vt}${vt === rt ? '' : '; trying fallback'}`, Tt), + vt !== rt && ((vt = rt), kt()) + } + try { + const Tt = new XMLHttpRequest() + Tt.open('get', vt, !0), + (Tt.responseType = 'arraybuffer'), + (Tt.onload = function () { + if (Tt.status >= 400) St(new Error(Tt.statusText)) + else if (Tt.status > 0) + try { + const At = tt(Tt.response) + xt(At) + } catch (At) { + St(At) + } + }), + (Tt.onerror = St), + Tt.send() + } catch (Tt) { + St(Tt) + } + } + kt() + } + function ut(vt, xt) { + vt || (vt = rt) + let kt = it[vt] + kt + ? kt.pending + ? kt.pending.push(xt) + : xt(kt) + : ((it[vt] = { pending: [xt] }), + ct(vt, (St) => { + let Tt = it[vt].pending + ;(it[vt] = St), Tt.forEach((At) => At(St)) + })) + } + function ht( + { + text: vt = '', + font: xt = rt, + sdfGlyphSize: kt = 64, + fontSize: St = 1, + letterSpacing: Tt = 0, + lineHeight: At = 'normal', + maxWidth: Et = ot, + direction: $t, + textAlign: Dt = 'left', + textIndent: jt = 0, + whiteSpace: Pt = 'normal', + overflowWrap: Ct = 'normal', + anchorX: wt = 0, + anchorY: It = 0, + includeCaretPositions: Ot = !1, + chunkedBoundsSize: Wt = 8192, + colorRanges: zt = null, + }, + Ft, + Nt = !1, + ) { + const Ut = gt(), + Mt = { fontLoad: 0, typesetting: 0 } + vt.indexOf('\r') > -1 && + (console.info('Typesetter: got text with \\r chars; normalizing to \\n'), + (vt = vt + .replace( + /\r\n/g, + ` +`, + ) + .replace( + /\r/g, + ` +`, + ))), + (St = +St), + (Tt = +Tt), + (Et = +Et), + (At = At || 'normal'), + (jt = +jt), + ut(xt, (Ht) => { + const en = isFinite(Et) + let sn = null, + Kt = null, + rn = null, + nn = null, + hn = null, + vn = null, + an = null, + Qt = 0, + _n = 0, + Pn = Pt !== 'nowrap' + const { ascender: $n, descender: Nn, unitsPerEm: Tn, lineGap: cn, capHeight: mn, xHeight: In } = Ht + Mt.fontLoad = gt() - Ut + const An = gt(), + wn = St / Tn + At === 'normal' && (At = ($n - Nn + cn) / Tn), (At = At * St) + const fn = (At - ($n - Nn) * wn) / 2, + pn = -($n * wn + fn), + kn = Math.min(At, ($n - Nn) * wn), + Dn = (($n + Nn) / 2) * wn - kn / 2 + let un = jt, + Zt = new yt() + const Xt = [Zt] + Ht.forEachGlyph(vt, St, Tt, (jn, On, Zn) => { + const Vn = vt.charAt(Zn), + qn = jn.advanceWidth * wn, + zn = Zt.count + let Jn + if ( + ('isEmpty' in jn || + ((jn.isWhitespace = !!Vn && new RegExp(st).test(Vn)), + (jn.canBreakAfter = !!Vn && lt.test(Vn)), + (jn.isEmpty = jn.xMin === jn.xMax || jn.yMin === jn.yMax || at.test(Vn))), + !jn.isWhitespace && !jn.isEmpty && _n++, + Pn && en && !jn.isWhitespace && On + qn + un > Et && zn) + ) { + if (Zt.glyphAt(zn - 1).glyphObj.canBreakAfter) (Jn = new yt()), (un = -On) + else + for (let pr = zn; pr--; ) + if (pr === 0 && Ct === 'break-word') { + ;(Jn = new yt()), (un = -On) + break + } else if (Zt.glyphAt(pr).glyphObj.canBreakAfter) { + Jn = Zt.splitAt(pr + 1) + const fr = Jn.glyphAt(0).x + un -= fr + for (let xr = Jn.count; xr--; ) Jn.glyphAt(xr).x -= fr + break + } + Jn && ((Zt.isSoftWrapped = !0), (Zt = Jn), Xt.push(Zt), (Qt = Et)) + } + let Hn = Zt.glyphAt(Zt.count) + ;(Hn.glyphObj = jn), + (Hn.x = On + un), + (Hn.width = qn), + (Hn.charIndex = Zn), + Vn === + ` +` && ((Zt = new yt()), Xt.push(Zt), (un = -(On + qn + Tt * St) + jt)) + }), + Xt.forEach((jn) => { + for (let On = jn.count; On--; ) { + let { glyphObj: Zn, x: Vn, width: qn } = jn.glyphAt(On) + if (!Zn.isWhitespace) { + ;(jn.width = Vn + qn), jn.width > Qt && (Qt = jn.width) + return + } + } + }) + let Sn = 0, + Rn = 0 + if ( + (wt && + (typeof wt == 'number' + ? (Sn = -wt) + : typeof wt == 'string' && + (Sn = -Qt * (wt === 'left' ? 0 : wt === 'center' ? 0.5 : wt === 'right' ? 1 : pt(wt)))), + It) + ) { + if (typeof It == 'number') Rn = -It + else if (typeof It == 'string') { + let jn = Xt.length * At + Rn = + It === 'top' + ? 0 + : It === 'top-baseline' + ? -pn + : It === 'top-cap' + ? -pn - mn * wn + : It === 'top-ex' + ? -pn - In * wn + : It === 'middle' + ? jn / 2 + : It === 'bottom' + ? jn + : It === 'bottom-baseline' + ? jn - fn + Nn * wn + : pt(It) * jn + } + } + if (!Nt) { + const jn = et.getEmbeddingLevels(vt, $t) + ;(sn = new Uint16Array(_n)), + (Kt = new Float32Array(_n * 2)), + (rn = {}), + (vn = [ot, ot, -ot, -ot]), + (an = []) + let On = pn + Ot && (hn = new Float32Array(vt.length * 3)), zt && (nn = new Uint8Array(_n * 3)) + let Zn = 0, + Vn = -1, + qn = -1, + zn, + Jn + if ( + (Xt.forEach((Hn, pr) => { + let { count: fr, width: xr } = Hn + if (fr > 0) { + let io = 0 + for (let ao = fr; ao-- && Hn.glyphAt(ao).glyphObj.isWhitespace; ) io++ + let Tr = 0, + Ar = 0 + if (Dt === 'center') Tr = (Qt - xr) / 2 + else if (Dt === 'right') Tr = Qt - xr + else if (Dt === 'justify' && Hn.isSoftWrapped) { + let ao = 0 + for (let Yr = fr - io; Yr--; ) Hn.glyphAt(Yr).glyphObj.isWhitespace && ao++ + Ar = (Qt - xr) / ao + } + if (Ar || Tr) { + let ao = 0 + for (let Yr = 0; Yr < fr; Yr++) { + let Dr = Hn.glyphAt(Yr) + const go = Dr.glyphObj + ;(Dr.x += Tr + ao), Ar !== 0 && go.isWhitespace && Yr < fr - io && ((ao += Ar), (Dr.width += Ar)) + } + } + const qr = et.getReorderSegments(vt, jn, Hn.glyphAt(0).charIndex, Hn.glyphAt(Hn.count - 1).charIndex) + for (let ao = 0; ao < qr.length; ao++) { + const [Yr, Dr] = qr[ao] + let go = 1 / 0, + xn = -1 / 0 + for (let Mn = 0; Mn < fr; Mn++) + if (Hn.glyphAt(Mn).charIndex >= Yr) { + let dn = Mn, + Jt = Mn + for (; Jt < fr; Jt++) { + let En = Hn.glyphAt(Jt) + if (En.charIndex > Dr) break + Jt < fr - io && ((go = Math.min(go, En.x)), (xn = Math.max(xn, En.x + En.width))) + } + for (let En = dn; En < Jt; En++) { + const Ln = Hn.glyphAt(En) + Ln.x = xn - (Ln.x + Ln.width - go) + } + break + } + } + let jr + const Fr = (ao) => (jr = ao) + for (let ao = 0; ao < fr; ao++) { + let Yr = Hn.glyphAt(ao) + jr = Yr.glyphObj + const Dr = jr.index, + go = jn.levels[Yr.charIndex] & 1 + if (go) { + const xn = et.getMirroredCharacter(vt[Yr.charIndex]) + xn && Ht.forEachGlyph(xn, 0, 0, Fr) + } + if (Ot) { + const { charIndex: xn } = Yr, + Mn = Yr.x + Sn, + dn = Yr.x + Yr.width + Sn + ;(hn[xn * 3] = go ? dn : Mn), (hn[xn * 3 + 1] = go ? Mn : dn), (hn[xn * 3 + 2] = On + Dn + Rn) + const Jt = xn - Vn + Jt > 1 && mt(hn, Vn, Jt), (Vn = xn) + } + if (zt) { + const { charIndex: xn } = Yr + for (; xn > qn; ) qn++, zt.hasOwnProperty(qn) && (Jn = zt[qn]) + } + if (!jr.isWhitespace && !jr.isEmpty) { + const xn = Zn++ + rn[Dr] || (rn[Dr] = { path: jr.path, pathBounds: [jr.xMin, jr.yMin, jr.xMax, jr.yMax] }) + const Mn = Yr.x + Sn, + dn = On + Rn + ;(Kt[xn * 2] = Mn), (Kt[xn * 2 + 1] = dn) + const Jt = Mn + jr.xMin * wn, + En = dn + jr.yMin * wn, + Ln = Mn + jr.xMax * wn, + Un = dn + jr.yMax * wn + Jt < vn[0] && (vn[0] = Jt), + En < vn[1] && (vn[1] = En), + Ln > vn[2] && (vn[2] = Ln), + Un > vn[3] && (vn[3] = Un), + xn % Wt === 0 && ((zn = { start: xn, end: xn, rect: [ot, ot, -ot, -ot] }), an.push(zn)), + zn.end++ + const Kn = zn.rect + if ( + (Jt < Kn[0] && (Kn[0] = Jt), + En < Kn[1] && (Kn[1] = En), + Ln > Kn[2] && (Kn[2] = Ln), + Un > Kn[3] && (Kn[3] = Un), + (sn[xn] = Dr), + zt) + ) { + const nr = xn * 3 + ;(nn[nr] = (Jn >> 16) & 255), (nn[nr + 1] = (Jn >> 8) & 255), (nn[nr + 2] = Jn & 255) + } + } + } + } + On -= At + }), + hn) + ) { + const Hn = vt.length - Vn + Hn > 1 && mt(hn, Vn, Hn) + } + } + ;(Mt.typesetting = gt() - An), + Ft({ + glyphIds: sn, + glyphPositions: Kt, + glyphData: rn, + caretPositions: hn, + caretHeight: kn, + glyphColors: nn, + chunkedBounds: an, + fontSize: St, + unitsPerEm: Tn, + ascender: $n * wn, + descender: Nn * wn, + capHeight: mn * wn, + xHeight: In * wn, + lineHeight: At, + topBaseline: pn, + blockBounds: [Sn, Rn - Xt.length * At, Sn + Qt, Rn], + visibleBounds: vn, + timings: Mt, + }) + }) + } + function dt(vt, xt) { + ht( + vt, + (kt) => { + const [St, Tt, At, Et] = kt.blockBounds + xt({ width: At - St, height: Et - Tt }) + }, + { metricsOnly: !0 }, + ) + } + function pt(vt) { + let xt = vt.match(/^([\d.]+)%$/), + kt = xt ? parseFloat(xt[1]) : NaN + return isNaN(kt) ? 0 : kt / 100 + } + function mt(vt, xt, kt) { + const St = vt[xt * 3], + Tt = vt[xt * 3 + 1], + At = vt[xt * 3 + 2], + Et = (Tt - St) / kt + for (let $t = 0; $t < kt; $t++) { + const Dt = (xt + $t) * 3 + ;(vt[Dt] = St + Et * $t), (vt[Dt + 1] = St + Et * ($t + 1)), (vt[Dt + 2] = At) + } + } + function gt() { + return (self.performance || Date).now() + } + function yt() { + this.data = [] + } + const bt = ['glyphObj', 'x', 'width', 'charIndex'] + return ( + (yt.prototype = { + width: 0, + isSoftWrapped: !1, + get count() { + return Math.ceil(this.data.length / bt.length) + }, + glyphAt(vt) { + let xt = yt.flyweight + return (xt.data = this.data), (xt.index = vt), xt + }, + splitAt(vt) { + let xt = new yt() + return (xt.data = this.data.splice(vt * bt.length)), xt + }, + }), + (yt.flyweight = bt.reduce( + (vt, xt, kt, St) => ( + Object.defineProperty(vt, xt, { + get() { + return this.data[this.index * bt.length + kt] + }, + set(Tt) { + this.data[this.index * bt.length + kt] = Tt + }, + }), + vt + ), + { data: null, index: 0 }, + )), + { typeset: ht, measure: dt, loadFont: ut } + ) + } + const now$3 = () => (self.performance || Date).now(), + mainThreadGenerator = SDFGenerator() + let warned + function generateSDF(tt, et, nt, rt, it, ot, at, st, lt, ct, ut = !0) { + return ut + ? generateSDF_GL(tt, et, nt, rt, it, ot, at, st, lt, ct).then( + null, + (ht) => ( + warned || (console.warn('WebGL SDF generation failed, falling back to JS', ht), (warned = !0)), + generateSDF_JS_Worker(tt, et, nt, rt, it, ot, at, st, lt, ct) + ), + ) + : generateSDF_JS_Worker(tt, et, nt, rt, it, ot, at, st, lt, ct) + } + const queue = [], + chunkTimeBudget = 5 + let timer = 0 + function nextChunk() { + const tt = now$3() + for (; queue.length && now$3() - tt < chunkTimeBudget; ) queue.shift()() + timer = queue.length ? setTimeout(nextChunk, 0) : 0 + } + const generateSDF_GL = (...tt) => + new Promise((et, nt) => { + queue.push(() => { + const rt = now$3() + try { + mainThreadGenerator.webgl.generateIntoCanvas(...tt), et({ timing: now$3() - rt }) + } catch (it) { + nt(it) + } + }), + timer || (timer = setTimeout(nextChunk, 0)) + }), + threadCount = 4, + idleTimeout = 2e3, + threads = {} + let callNum = 0 + function generateSDF_JS_Worker(tt, et, nt, rt, it, ot, at, st, lt, ct) { + const ut = 'TroikaTextSDFGenerator_JS_' + (callNum++ % threadCount) + let ht = threads[ut] + return ( + ht || + (ht = threads[ut] = + { + workerModule: defineWorkerModule({ + name: ut, + workerId: ut, + dependencies: [SDFGenerator, now$3], + init(dt, pt) { + const mt = dt().javascript.generate + return function (...gt) { + const yt = pt() + return { textureData: mt(...gt), timing: pt() - yt } + } + }, + getTransferables(dt) { + return [dt.textureData.buffer] + }, + }), + requests: 0, + idleTimer: null, + }), + ht.requests++, + clearTimeout(ht.idleTimer), + ht.workerModule(tt, et, nt, rt, it, ot).then(({ textureData: dt, timing: pt }) => { + const mt = now$3(), + gt = new Uint8Array(dt.length * 4) + for (let yt = 0; yt < dt.length; yt++) gt[yt * 4 + ct] = dt[yt] + return ( + mainThreadGenerator.webglUtils.renderImageData(at, gt, st, lt, tt, et, 1 << (3 - ct)), + (pt += now$3() - mt), + --ht.requests === 0 && + (ht.idleTimer = setTimeout(() => { + terminateWorker(ut) + }, idleTimeout)), + { timing: pt } + ) + }) + ) + } + function warmUpSDFCanvas(tt) { + tt._warm || (mainThreadGenerator.webgl.isSupported(tt), (tt._warm = !0)) + } + const resizeWebGLCanvasWithoutClearing = mainThreadGenerator.webglUtils.resizeWebGLCanvasWithoutClearing + /*! +Custom build of Typr.ts (https://github.com/fredli74/Typr.ts) for use in Troika text rendering. +Original MIT license applies: https://github.com/fredli74/Typr.ts/blob/master/LICENSE +*/ function typrFactory() { + return ( + typeof window > 'u' && (self.window = self), + (function (tt) { + var et = { + parse: function (it) { + var ot = et._bin, + at = new Uint8Array(it) + if (ot.readASCII(at, 0, 4) == 'ttcf') { + var st = 4 + ot.readUshort(at, st), (st += 2), ot.readUshort(at, st), (st += 2) + var lt = ot.readUint(at, st) + st += 4 + for (var ct = [], ut = 0; ut < lt; ut++) { + var ht = ot.readUint(at, st) + ;(st += 4), ct.push(et._readFont(at, ht)) + } + return ct + } + return [et._readFont(at, 0)] + }, + _readFont: function (it, ot) { + var at = et._bin, + st = ot + at.readFixed(it, ot), (ot += 4) + var lt = at.readUshort(it, ot) + ;(ot += 2), + at.readUshort(it, ot), + (ot += 2), + at.readUshort(it, ot), + (ot += 2), + at.readUshort(it, ot), + (ot += 2) + for ( + var ct = [ + 'cmap', + 'head', + 'hhea', + 'maxp', + 'hmtx', + 'name', + 'OS/2', + 'post', + 'loca', + 'glyf', + 'kern', + 'CFF ', + 'GPOS', + 'GSUB', + 'SVG ', + ], + ut = { _data: it, _offset: st }, + ht = {}, + dt = 0; + dt < lt; + dt++ + ) { + var pt = at.readASCII(it, ot, 4) + ;(ot += 4), at.readUint(it, ot), (ot += 4) + var mt = at.readUint(it, ot) + ot += 4 + var gt = at.readUint(it, ot) + ;(ot += 4), (ht[pt] = { offset: mt, length: gt }) + } + for (dt = 0; dt < ct.length; dt++) { + var yt = ct[dt] + ht[yt] && (ut[yt.trim()] = et[yt.trim()].parse(it, ht[yt].offset, ht[yt].length, ut)) + } + return ut + }, + _tabOffset: function (it, ot, at) { + for (var st = et._bin, lt = st.readUshort(it, at + 4), ct = at + 12, ut = 0; ut < lt; ut++) { + var ht = st.readASCII(it, ct, 4) + ;(ct += 4), st.readUint(it, ct), (ct += 4) + var dt = st.readUint(it, ct) + if (((ct += 4), st.readUint(it, ct), (ct += 4), ht == ot)) return dt + } + return 0 + }, + } + ;(et._bin = { + readFixed: function (it, ot) { + return ((it[ot] << 8) | it[ot + 1]) + ((it[ot + 2] << 8) | it[ot + 3]) / 65540 + }, + readF2dot14: function (it, ot) { + return et._bin.readShort(it, ot) / 16384 + }, + readInt: function (it, ot) { + return et._bin._view(it).getInt32(ot) + }, + readInt8: function (it, ot) { + return et._bin._view(it).getInt8(ot) + }, + readShort: function (it, ot) { + return et._bin._view(it).getInt16(ot) + }, + readUshort: function (it, ot) { + return et._bin._view(it).getUint16(ot) + }, + readUshorts: function (it, ot, at) { + for (var st = [], lt = 0; lt < at; lt++) st.push(et._bin.readUshort(it, ot + 2 * lt)) + return st + }, + readUint: function (it, ot) { + return et._bin._view(it).getUint32(ot) + }, + readUint64: function (it, ot) { + return 4294967296 * et._bin.readUint(it, ot) + et._bin.readUint(it, ot + 4) + }, + readASCII: function (it, ot, at) { + for (var st = '', lt = 0; lt < at; lt++) st += String.fromCharCode(it[ot + lt]) + return st + }, + readUnicode: function (it, ot, at) { + for (var st = '', lt = 0; lt < at; lt++) { + var ct = (it[ot++] << 8) | it[ot++] + st += String.fromCharCode(ct) + } + return st + }, + _tdec: typeof window < 'u' && window.TextDecoder ? new window.TextDecoder() : null, + readUTF8: function (it, ot, at) { + var st = et._bin._tdec + return st && ot == 0 && at == it.length ? st.decode(it) : et._bin.readASCII(it, ot, at) + }, + readBytes: function (it, ot, at) { + for (var st = [], lt = 0; lt < at; lt++) st.push(it[ot + lt]) + return st + }, + readASCIIArray: function (it, ot, at) { + for (var st = [], lt = 0; lt < at; lt++) st.push(String.fromCharCode(it[ot + lt])) + return st + }, + _view: function (it) { + return ( + it._dataView || + (it._dataView = it.buffer + ? new DataView(it.buffer, it.byteOffset, it.byteLength) + : new DataView(new Uint8Array(it).buffer)) + ) + }, + }), + (et._lctf = {}), + (et._lctf.parse = function (it, ot, at, st, lt) { + var ct = et._bin, + ut = {}, + ht = ot + ct.readFixed(it, ot), (ot += 4) + var dt = ct.readUshort(it, ot) + ot += 2 + var pt = ct.readUshort(it, ot) + ot += 2 + var mt = ct.readUshort(it, ot) + return ( + (ot += 2), + (ut.scriptList = et._lctf.readScriptList(it, ht + dt)), + (ut.featureList = et._lctf.readFeatureList(it, ht + pt)), + (ut.lookupList = et._lctf.readLookupList(it, ht + mt, lt)), + ut + ) + }), + (et._lctf.readLookupList = function (it, ot, at) { + var st = et._bin, + lt = ot, + ct = [], + ut = st.readUshort(it, ot) + ot += 2 + for (var ht = 0; ht < ut; ht++) { + var dt = st.readUshort(it, ot) + ot += 2 + var pt = et._lctf.readLookupTable(it, lt + dt, at) + ct.push(pt) + } + return ct + }), + (et._lctf.readLookupTable = function (it, ot, at) { + var st = et._bin, + lt = ot, + ct = { tabs: [] } + ;(ct.ltype = st.readUshort(it, ot)), (ot += 2), (ct.flag = st.readUshort(it, ot)), (ot += 2) + var ut = st.readUshort(it, ot) + ot += 2 + for (var ht = ct.ltype, dt = 0; dt < ut; dt++) { + var pt = st.readUshort(it, ot) + ot += 2 + var mt = at(it, ht, lt + pt, ct) + ct.tabs.push(mt) + } + return ct + }), + (et._lctf.numOfOnes = function (it) { + for (var ot = 0, at = 0; at < 32; at++) (it >>> at) & 1 && ot++ + return ot + }), + (et._lctf.readClassDef = function (it, ot) { + var at = et._bin, + st = [], + lt = at.readUshort(it, ot) + if (((ot += 2), lt == 1)) { + var ct = at.readUshort(it, ot) + ot += 2 + var ut = at.readUshort(it, ot) + ot += 2 + for (var ht = 0; ht < ut; ht++) + st.push(ct + ht), st.push(ct + ht), st.push(at.readUshort(it, ot)), (ot += 2) + } + if (lt == 2) { + var dt = at.readUshort(it, ot) + for (ot += 2, ht = 0; ht < dt; ht++) + st.push(at.readUshort(it, ot)), + (ot += 2), + st.push(at.readUshort(it, ot)), + (ot += 2), + st.push(at.readUshort(it, ot)), + (ot += 2) + } + return st + }), + (et._lctf.getInterval = function (it, ot) { + for (var at = 0; at < it.length; at += 3) { + var st = it[at], + lt = it[at + 1] + if ((it[at + 2], st <= ot && ot <= lt)) return at + } + return -1 + }), + (et._lctf.readCoverage = function (it, ot) { + var at = et._bin, + st = {} + ;(st.fmt = at.readUshort(it, ot)), (ot += 2) + var lt = at.readUshort(it, ot) + return ( + (ot += 2), + st.fmt == 1 && (st.tab = at.readUshorts(it, ot, lt)), + st.fmt == 2 && (st.tab = at.readUshorts(it, ot, 3 * lt)), + st + ) + }), + (et._lctf.coverageIndex = function (it, ot) { + var at = it.tab + if (it.fmt == 1) return at.indexOf(ot) + if (it.fmt == 2) { + var st = et._lctf.getInterval(at, ot) + if (st != -1) return at[st + 2] + (ot - at[st]) + } + return -1 + }), + (et._lctf.readFeatureList = function (it, ot) { + var at = et._bin, + st = ot, + lt = [], + ct = at.readUshort(it, ot) + ot += 2 + for (var ut = 0; ut < ct; ut++) { + var ht = at.readASCII(it, ot, 4) + ot += 4 + var dt = at.readUshort(it, ot) + ot += 2 + var pt = et._lctf.readFeatureTable(it, st + dt) + ;(pt.tag = ht.trim()), lt.push(pt) + } + return lt + }), + (et._lctf.readFeatureTable = function (it, ot) { + var at = et._bin, + st = ot, + lt = {}, + ct = at.readUshort(it, ot) + ;(ot += 2), ct > 0 && (lt.featureParams = st + ct) + var ut = at.readUshort(it, ot) + ;(ot += 2), (lt.tab = []) + for (var ht = 0; ht < ut; ht++) lt.tab.push(at.readUshort(it, ot + 2 * ht)) + return lt + }), + (et._lctf.readScriptList = function (it, ot) { + var at = et._bin, + st = ot, + lt = {}, + ct = at.readUshort(it, ot) + ot += 2 + for (var ut = 0; ut < ct; ut++) { + var ht = at.readASCII(it, ot, 4) + ot += 4 + var dt = at.readUshort(it, ot) + ;(ot += 2), (lt[ht.trim()] = et._lctf.readScriptTable(it, st + dt)) + } + return lt + }), + (et._lctf.readScriptTable = function (it, ot) { + var at = et._bin, + st = ot, + lt = {}, + ct = at.readUshort(it, ot) + ;(ot += 2), (lt.default = et._lctf.readLangSysTable(it, st + ct)) + var ut = at.readUshort(it, ot) + ot += 2 + for (var ht = 0; ht < ut; ht++) { + var dt = at.readASCII(it, ot, 4) + ot += 4 + var pt = at.readUshort(it, ot) + ;(ot += 2), (lt[dt.trim()] = et._lctf.readLangSysTable(it, st + pt)) + } + return lt + }), + (et._lctf.readLangSysTable = function (it, ot) { + var at = et._bin, + st = {} + at.readUshort(it, ot), (ot += 2), (st.reqFeature = at.readUshort(it, ot)), (ot += 2) + var lt = at.readUshort(it, ot) + return (ot += 2), (st.features = at.readUshorts(it, ot, lt)), st + }), + (et.CFF = {}), + (et.CFF.parse = function (it, ot, at) { + var st = et._bin + ;(it = new Uint8Array(it.buffer, ot, at))[(ot = 0)], it[++ot], it[++ot], it[++ot], ot++ + var lt = [] + ot = et.CFF.readIndex(it, ot, lt) + for (var ct = [], ut = 0; ut < lt.length - 1; ut++) + ct.push(st.readASCII(it, ot + lt[ut], lt[ut + 1] - lt[ut])) + ot += lt[lt.length - 1] + var ht = [] + ot = et.CFF.readIndex(it, ot, ht) + var dt = [] + for (ut = 0; ut < ht.length - 1; ut++) dt.push(et.CFF.readDict(it, ot + ht[ut], ot + ht[ut + 1])) + ot += ht[ht.length - 1] + var pt = dt[0], + mt = [] + ot = et.CFF.readIndex(it, ot, mt) + var gt = [] + for (ut = 0; ut < mt.length - 1; ut++) gt.push(st.readASCII(it, ot + mt[ut], mt[ut + 1] - mt[ut])) + if (((ot += mt[mt.length - 1]), et.CFF.readSubrs(it, ot, pt), pt.CharStrings)) { + ;(ot = pt.CharStrings), (mt = []), (ot = et.CFF.readIndex(it, ot, mt)) + var yt = [] + for (ut = 0; ut < mt.length - 1; ut++) yt.push(st.readBytes(it, ot + mt[ut], mt[ut + 1] - mt[ut])) + pt.CharStrings = yt + } + if (pt.ROS) { + ot = pt.FDArray + var bt = [] + for (ot = et.CFF.readIndex(it, ot, bt), pt.FDArray = [], ut = 0; ut < bt.length - 1; ut++) { + var vt = et.CFF.readDict(it, ot + bt[ut], ot + bt[ut + 1]) + et.CFF._readFDict(it, vt, gt), pt.FDArray.push(vt) + } + ;(ot += bt[bt.length - 1]), (ot = pt.FDSelect), (pt.FDSelect = []) + var xt = it[ot] + if ((ot++, xt != 3)) throw xt + var kt = st.readUshort(it, ot) + for (ot += 2, ut = 0; ut < kt + 1; ut++) pt.FDSelect.push(st.readUshort(it, ot), it[ot + 2]), (ot += 3) + } + return ( + pt.Encoding && (pt.Encoding = et.CFF.readEncoding(it, pt.Encoding, pt.CharStrings.length)), + pt.charset && (pt.charset = et.CFF.readCharset(it, pt.charset, pt.CharStrings.length)), + et.CFF._readFDict(it, pt, gt), + pt + ) + }), + (et.CFF._readFDict = function (it, ot, at) { + var st + for (var lt in (ot.Private && + ((st = ot.Private[1]), + (ot.Private = et.CFF.readDict(it, st, st + ot.Private[0])), + ot.Private.Subrs && et.CFF.readSubrs(it, st + ot.Private.Subrs, ot.Private)), + ot)) + ['FamilyName', 'FontName', 'FullName', 'Notice', 'version', 'Copyright'].indexOf(lt) != -1 && + (ot[lt] = at[ot[lt] - 426 + 35]) + }), + (et.CFF.readSubrs = function (it, ot, at) { + var st = et._bin, + lt = [] + ot = et.CFF.readIndex(it, ot, lt) + var ct, + ut = lt.length + ;(ct = ut < 1240 ? 107 : ut < 33900 ? 1131 : 32768), (at.Bias = ct), (at.Subrs = []) + for (var ht = 0; ht < lt.length - 1; ht++) at.Subrs.push(st.readBytes(it, ot + lt[ht], lt[ht + 1] - lt[ht])) + }), + (et.CFF.tableSE = [ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, + 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, + 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, + 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, + 87, 88, 89, 90, 91, 92, 93, 94, 95, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 0, 111, + 112, 113, 114, 0, 115, 116, 117, 118, 119, 120, 121, 122, 0, 123, 0, 124, 125, 126, 127, 128, 129, 130, 131, + 0, 132, 133, 0, 134, 135, 136, 137, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 138, 0, 139, 0, 0, 0, 0, + 140, 141, 142, 143, 0, 0, 0, 0, 0, 144, 0, 0, 0, 145, 0, 0, 146, 147, 148, 149, 0, 0, 0, 0, + ]), + (et.CFF.glyphByUnicode = function (it, ot) { + for (var at = 0; at < it.charset.length; at++) if (it.charset[at] == ot) return at + return -1 + }), + (et.CFF.glyphBySE = function (it, ot) { + return ot < 0 || ot > 255 ? -1 : et.CFF.glyphByUnicode(it, et.CFF.tableSE[ot]) + }), + (et.CFF.readEncoding = function (it, ot, at) { + et._bin + var st = ['.notdef'], + lt = it[ot] + if ((ot++, lt != 0)) throw 'error: unknown encoding format: ' + lt + var ct = it[ot] + ot++ + for (var ut = 0; ut < ct; ut++) st.push(it[ot + ut]) + return st + }), + (et.CFF.readCharset = function (it, ot, at) { + var st = et._bin, + lt = ['.notdef'], + ct = it[ot] + if ((ot++, ct == 0)) + for (var ut = 0; ut < at; ut++) { + var ht = st.readUshort(it, ot) + ;(ot += 2), lt.push(ht) + } + else { + if (ct != 1 && ct != 2) throw 'error: format: ' + ct + for (; lt.length < at; ) { + ;(ht = st.readUshort(it, ot)), (ot += 2) + var dt = 0 + for ( + ct == 1 ? ((dt = it[ot]), ot++) : ((dt = st.readUshort(it, ot)), (ot += 2)), ut = 0; + ut <= dt; + ut++ + ) + lt.push(ht), ht++ + } + } + return lt + }), + (et.CFF.readIndex = function (it, ot, at) { + var st = et._bin, + lt = st.readUshort(it, ot) + 1, + ct = it[(ot += 2)] + if ((ot++, ct == 1)) for (var ut = 0; ut < lt; ut++) at.push(it[ot + ut]) + else if (ct == 2) for (ut = 0; ut < lt; ut++) at.push(st.readUshort(it, ot + 2 * ut)) + else if (ct == 3) for (ut = 0; ut < lt; ut++) at.push(16777215 & st.readUint(it, ot + 3 * ut - 1)) + else if (lt != 1) throw 'unsupported offset size: ' + ct + ', count: ' + lt + return (ot += lt * ct) - 1 + }), + (et.CFF.getCharString = function (it, ot, at) { + var st = et._bin, + lt = it[ot], + ct = it[ot + 1] + it[ot + 2], it[ot + 3], it[ot + 4] + var ut = 1, + ht = null, + dt = null + lt <= 20 && ((ht = lt), (ut = 1)), + lt == 12 && ((ht = 100 * lt + ct), (ut = 2)), + 21 <= lt && lt <= 27 && ((ht = lt), (ut = 1)), + lt == 28 && ((dt = st.readShort(it, ot + 1)), (ut = 3)), + 29 <= lt && lt <= 31 && ((ht = lt), (ut = 1)), + 32 <= lt && lt <= 246 && ((dt = lt - 139), (ut = 1)), + 247 <= lt && lt <= 250 && ((dt = 256 * (lt - 247) + ct + 108), (ut = 2)), + 251 <= lt && lt <= 254 && ((dt = 256 * -(lt - 251) - ct - 108), (ut = 2)), + lt == 255 && ((dt = st.readInt(it, ot + 1) / 65535), (ut = 5)), + (at.val = dt ?? 'o' + ht), + (at.size = ut) + }), + (et.CFF.readCharString = function (it, ot, at) { + for (var st = ot + at, lt = et._bin, ct = []; ot < st; ) { + var ut = it[ot], + ht = it[ot + 1] + it[ot + 2], it[ot + 3], it[ot + 4] + var dt = 1, + pt = null, + mt = null + ut <= 20 && ((pt = ut), (dt = 1)), + ut == 12 && ((pt = 100 * ut + ht), (dt = 2)), + (ut != 19 && ut != 20) || ((pt = ut), (dt = 2)), + 21 <= ut && ut <= 27 && ((pt = ut), (dt = 1)), + ut == 28 && ((mt = lt.readShort(it, ot + 1)), (dt = 3)), + 29 <= ut && ut <= 31 && ((pt = ut), (dt = 1)), + 32 <= ut && ut <= 246 && ((mt = ut - 139), (dt = 1)), + 247 <= ut && ut <= 250 && ((mt = 256 * (ut - 247) + ht + 108), (dt = 2)), + 251 <= ut && ut <= 254 && ((mt = 256 * -(ut - 251) - ht - 108), (dt = 2)), + ut == 255 && ((mt = lt.readInt(it, ot + 1) / 65535), (dt = 5)), + ct.push(mt ?? 'o' + pt), + (ot += dt) + } + return ct + }), + (et.CFF.readDict = function (it, ot, at) { + for (var st = et._bin, lt = {}, ct = []; ot < at; ) { + var ut = it[ot], + ht = it[ot + 1] + it[ot + 2], it[ot + 3], it[ot + 4] + var dt = 1, + pt = null, + mt = null + if ( + (ut == 28 && ((mt = st.readShort(it, ot + 1)), (dt = 3)), + ut == 29 && ((mt = st.readInt(it, ot + 1)), (dt = 5)), + 32 <= ut && ut <= 246 && ((mt = ut - 139), (dt = 1)), + 247 <= ut && ut <= 250 && ((mt = 256 * (ut - 247) + ht + 108), (dt = 2)), + 251 <= ut && ut <= 254 && ((mt = 256 * -(ut - 251) - ht - 108), (dt = 2)), + ut == 255) + ) + throw ((mt = st.readInt(it, ot + 1) / 65535), (dt = 5), 'unknown number') + if (ut == 30) { + var gt = [] + for (dt = 1; ; ) { + var yt = it[ot + dt] + dt++ + var bt = yt >> 4, + vt = 15 & yt + if ((bt != 15 && gt.push(bt), vt != 15 && gt.push(vt), vt == 15)) break + } + for ( + var xt = '', + kt = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, '.', 'e', 'e-', 'reserved', '-', 'endOfNumber'], + St = 0; + St < gt.length; + St++ + ) + xt += kt[gt[St]] + mt = parseFloat(xt) + } + ut <= 21 && + ((pt = [ + 'version', + 'Notice', + 'FullName', + 'FamilyName', + 'Weight', + 'FontBBox', + 'BlueValues', + 'OtherBlues', + 'FamilyBlues', + 'FamilyOtherBlues', + 'StdHW', + 'StdVW', + 'escape', + 'UniqueID', + 'XUID', + 'charset', + 'Encoding', + 'CharStrings', + 'Private', + 'Subrs', + 'defaultWidthX', + 'nominalWidthX', + ][ut]), + (dt = 1), + ut == 12 && + ((pt = [ + 'Copyright', + 'isFixedPitch', + 'ItalicAngle', + 'UnderlinePosition', + 'UnderlineThickness', + 'PaintType', + 'CharstringType', + 'FontMatrix', + 'StrokeWidth', + 'BlueScale', + 'BlueShift', + 'BlueFuzz', + 'StemSnapH', + 'StemSnapV', + 'ForceBold', + 0, + 0, + 'LanguageGroup', + 'ExpansionFactor', + 'initialRandomSeed', + 'SyntheticBase', + 'PostScript', + 'BaseFontName', + 'BaseFontBlend', + 0, + 0, + 0, + 0, + 0, + 0, + 'ROS', + 'CIDFontVersion', + 'CIDFontRevision', + 'CIDFontType', + 'CIDCount', + 'UIDBase', + 'FDArray', + 'FDSelect', + 'FontName', + ][ht]), + (dt = 2))), + pt != null ? ((lt[pt] = ct.length == 1 ? ct[0] : ct), (ct = [])) : ct.push(mt), + (ot += dt) + } + return lt + }), + (et.cmap = {}), + (et.cmap.parse = function (it, ot, at) { + ;(it = new Uint8Array(it.buffer, ot, at)), (ot = 0) + var st = et._bin, + lt = {} + st.readUshort(it, ot), (ot += 2) + var ct = st.readUshort(it, ot) + ot += 2 + var ut = [] + lt.tables = [] + for (var ht = 0; ht < ct; ht++) { + var dt = st.readUshort(it, ot) + ot += 2 + var pt = st.readUshort(it, ot) + ot += 2 + var mt = st.readUint(it, ot) + ot += 4 + var gt = 'p' + dt + 'e' + pt, + yt = ut.indexOf(mt) + if (yt == -1) { + var bt + ;(yt = lt.tables.length), ut.push(mt) + var vt = st.readUshort(it, mt) + vt == 0 + ? (bt = et.cmap.parse0(it, mt)) + : vt == 4 + ? (bt = et.cmap.parse4(it, mt)) + : vt == 6 + ? (bt = et.cmap.parse6(it, mt)) + : vt == 12 + ? (bt = et.cmap.parse12(it, mt)) + : console.debug('unknown format: ' + vt, dt, pt, mt), + lt.tables.push(bt) + } + if (lt[gt] != null) throw 'multiple tables for one platform+encoding' + lt[gt] = yt + } + return lt + }), + (et.cmap.parse0 = function (it, ot) { + var at = et._bin, + st = {} + ;(st.format = at.readUshort(it, ot)), (ot += 2) + var lt = at.readUshort(it, ot) + ;(ot += 2), at.readUshort(it, ot), (ot += 2), (st.map = []) + for (var ct = 0; ct < lt - 6; ct++) st.map.push(it[ot + ct]) + return st + }), + (et.cmap.parse4 = function (it, ot) { + var at = et._bin, + st = ot, + lt = {} + ;(lt.format = at.readUshort(it, ot)), (ot += 2) + var ct = at.readUshort(it, ot) + ;(ot += 2), at.readUshort(it, ot), (ot += 2) + var ut = at.readUshort(it, ot) + ot += 2 + var ht = ut / 2 + ;(lt.searchRange = at.readUshort(it, ot)), + (ot += 2), + (lt.entrySelector = at.readUshort(it, ot)), + (ot += 2), + (lt.rangeShift = at.readUshort(it, ot)), + (ot += 2), + (lt.endCount = at.readUshorts(it, ot, ht)), + (ot += 2 * ht), + (ot += 2), + (lt.startCount = at.readUshorts(it, ot, ht)), + (ot += 2 * ht), + (lt.idDelta = []) + for (var dt = 0; dt < ht; dt++) lt.idDelta.push(at.readShort(it, ot)), (ot += 2) + for (lt.idRangeOffset = at.readUshorts(it, ot, ht), ot += 2 * ht, lt.glyphIdArray = []; ot < st + ct; ) + lt.glyphIdArray.push(at.readUshort(it, ot)), (ot += 2) + return lt + }), + (et.cmap.parse6 = function (it, ot) { + var at = et._bin, + st = {} + ;(st.format = at.readUshort(it, ot)), + (ot += 2), + at.readUshort(it, ot), + (ot += 2), + at.readUshort(it, ot), + (ot += 2), + (st.firstCode = at.readUshort(it, ot)), + (ot += 2) + var lt = at.readUshort(it, ot) + ;(ot += 2), (st.glyphIdArray = []) + for (var ct = 0; ct < lt; ct++) st.glyphIdArray.push(at.readUshort(it, ot)), (ot += 2) + return st + }), + (et.cmap.parse12 = function (it, ot) { + var at = et._bin, + st = {} + ;(st.format = at.readUshort(it, ot)), + (ot += 2), + (ot += 2), + at.readUint(it, ot), + (ot += 4), + at.readUint(it, ot), + (ot += 4) + var lt = at.readUint(it, ot) + ;(ot += 4), (st.groups = []) + for (var ct = 0; ct < lt; ct++) { + var ut = ot + 12 * ct, + ht = at.readUint(it, ut + 0), + dt = at.readUint(it, ut + 4), + pt = at.readUint(it, ut + 8) + st.groups.push([ht, dt, pt]) + } + return st + }), + (et.glyf = {}), + (et.glyf.parse = function (it, ot, at, st) { + for (var lt = [], ct = 0; ct < st.maxp.numGlyphs; ct++) lt.push(null) + return lt + }), + (et.glyf._parseGlyf = function (it, ot) { + var at = et._bin, + st = it._data, + lt = et._tabOffset(st, 'glyf', it._offset) + it.loca[ot] + if (it.loca[ot] == it.loca[ot + 1]) return null + var ct = {} + if ( + ((ct.noc = at.readShort(st, lt)), + (lt += 2), + (ct.xMin = at.readShort(st, lt)), + (lt += 2), + (ct.yMin = at.readShort(st, lt)), + (lt += 2), + (ct.xMax = at.readShort(st, lt)), + (lt += 2), + (ct.yMax = at.readShort(st, lt)), + (lt += 2), + ct.xMin >= ct.xMax || ct.yMin >= ct.yMax) + ) + return null + if (ct.noc > 0) { + ct.endPts = [] + for (var ut = 0; ut < ct.noc; ut++) ct.endPts.push(at.readUshort(st, lt)), (lt += 2) + var ht = at.readUshort(st, lt) + if (((lt += 2), st.length - lt < ht)) return null + ;(ct.instructions = at.readBytes(st, lt, ht)), (lt += ht) + var dt = ct.endPts[ct.noc - 1] + 1 + for (ct.flags = [], ut = 0; ut < dt; ut++) { + var pt = st[lt] + if ((lt++, ct.flags.push(pt), (8 & pt) != 0)) { + var mt = st[lt] + lt++ + for (var gt = 0; gt < mt; gt++) ct.flags.push(pt), ut++ + } + } + for (ct.xs = [], ut = 0; ut < dt; ut++) { + var yt = (2 & ct.flags[ut]) != 0, + bt = (16 & ct.flags[ut]) != 0 + yt + ? (ct.xs.push(bt ? st[lt] : -st[lt]), lt++) + : bt + ? ct.xs.push(0) + : (ct.xs.push(at.readShort(st, lt)), (lt += 2)) + } + for (ct.ys = [], ut = 0; ut < dt; ut++) + (yt = (4 & ct.flags[ut]) != 0), + (bt = (32 & ct.flags[ut]) != 0), + yt + ? (ct.ys.push(bt ? st[lt] : -st[lt]), lt++) + : bt + ? ct.ys.push(0) + : (ct.ys.push(at.readShort(st, lt)), (lt += 2)) + var vt = 0, + xt = 0 + for (ut = 0; ut < dt; ut++) (vt += ct.xs[ut]), (xt += ct.ys[ut]), (ct.xs[ut] = vt), (ct.ys[ut] = xt) + } else { + var kt + ct.parts = [] + do { + ;(kt = at.readUshort(st, lt)), (lt += 2) + var St = { m: { a: 1, b: 0, c: 0, d: 1, tx: 0, ty: 0 }, p1: -1, p2: -1 } + if ((ct.parts.push(St), (St.glyphIndex = at.readUshort(st, lt)), (lt += 2), 1 & kt)) { + var Tt = at.readShort(st, lt) + lt += 2 + var At = at.readShort(st, lt) + lt += 2 + } else (Tt = at.readInt8(st, lt)), lt++, (At = at.readInt8(st, lt)), lt++ + 2 & kt ? ((St.m.tx = Tt), (St.m.ty = At)) : ((St.p1 = Tt), (St.p2 = At)), + 8 & kt + ? ((St.m.a = St.m.d = at.readF2dot14(st, lt)), (lt += 2)) + : 64 & kt + ? ((St.m.a = at.readF2dot14(st, lt)), (lt += 2), (St.m.d = at.readF2dot14(st, lt)), (lt += 2)) + : 128 & kt && + ((St.m.a = at.readF2dot14(st, lt)), + (lt += 2), + (St.m.b = at.readF2dot14(st, lt)), + (lt += 2), + (St.m.c = at.readF2dot14(st, lt)), + (lt += 2), + (St.m.d = at.readF2dot14(st, lt)), + (lt += 2)) + } while (32 & kt) + if (256 & kt) { + var Et = at.readUshort(st, lt) + for (lt += 2, ct.instr = [], ut = 0; ut < Et; ut++) ct.instr.push(st[lt]), lt++ + } + } + return ct + }), + (et.GPOS = {}), + (et.GPOS.parse = function (it, ot, at, st) { + return et._lctf.parse(it, ot, at, st, et.GPOS.subt) + }), + (et.GPOS.subt = function (it, ot, at, st) { + var lt = et._bin, + ct = at, + ut = {} + if ( + ((ut.fmt = lt.readUshort(it, at)), + (at += 2), + ot == 1 || ot == 2 || ot == 3 || ot == 7 || (ot == 8 && ut.fmt <= 2)) + ) { + var ht = lt.readUshort(it, at) + ;(at += 2), (ut.coverage = et._lctf.readCoverage(it, ht + ct)) + } + if (ot == 1 && ut.fmt == 1) { + var dt = lt.readUshort(it, at) + at += 2 + var pt = et._lctf.numOfOnes(dt) + dt != 0 && (ut.pos = et.GPOS.readValueRecord(it, at, dt)) + } else if (ot == 2 && ut.fmt >= 1 && ut.fmt <= 2) { + ;(dt = lt.readUshort(it, at)), (at += 2) + var mt = lt.readUshort(it, at) + ;(at += 2), (pt = et._lctf.numOfOnes(dt)) + var gt = et._lctf.numOfOnes(mt) + if (ut.fmt == 1) { + ut.pairsets = [] + var yt = lt.readUshort(it, at) + at += 2 + for (var bt = 0; bt < yt; bt++) { + var vt = ct + lt.readUshort(it, at) + at += 2 + var xt = lt.readUshort(it, vt) + vt += 2 + for (var kt = [], St = 0; St < xt; St++) { + var Tt = lt.readUshort(it, vt) + ;(vt += 2), + dt != 0 && ((Pt = et.GPOS.readValueRecord(it, vt, dt)), (vt += 2 * pt)), + mt != 0 && ((Ct = et.GPOS.readValueRecord(it, vt, mt)), (vt += 2 * gt)), + kt.push({ gid2: Tt, val1: Pt, val2: Ct }) + } + ut.pairsets.push(kt) + } + } + if (ut.fmt == 2) { + var At = lt.readUshort(it, at) + at += 2 + var Et = lt.readUshort(it, at) + at += 2 + var $t = lt.readUshort(it, at) + at += 2 + var Dt = lt.readUshort(it, at) + for ( + at += 2, + ut.classDef1 = et._lctf.readClassDef(it, ct + At), + ut.classDef2 = et._lctf.readClassDef(it, ct + Et), + ut.matrix = [], + bt = 0; + bt < $t; + bt++ + ) { + var jt = [] + for (St = 0; St < Dt; St++) { + var Pt = null, + Ct = null + dt != 0 && ((Pt = et.GPOS.readValueRecord(it, at, dt)), (at += 2 * pt)), + mt != 0 && ((Ct = et.GPOS.readValueRecord(it, at, mt)), (at += 2 * gt)), + jt.push({ val1: Pt, val2: Ct }) + } + ut.matrix.push(jt) + } + } + } else { + if (ot == 9 && ut.fmt == 1) { + var wt = lt.readUshort(it, at) + at += 2 + var It = lt.readUint(it, at) + if (((at += 4), st.ltype == 9)) st.ltype = wt + else if (st.ltype != wt) throw 'invalid extension substitution' + return et.GPOS.subt(it, st.ltype, ct + It) + } + console.debug('unsupported GPOS table LookupType', ot, 'format', ut.fmt) + } + return ut + }), + (et.GPOS.readValueRecord = function (it, ot, at) { + var st = et._bin, + lt = [] + return ( + lt.push(1 & at ? st.readShort(it, ot) : 0), + (ot += 1 & at ? 2 : 0), + lt.push(2 & at ? st.readShort(it, ot) : 0), + (ot += 2 & at ? 2 : 0), + lt.push(4 & at ? st.readShort(it, ot) : 0), + (ot += 4 & at ? 2 : 0), + lt.push(8 & at ? st.readShort(it, ot) : 0), + (ot += 8 & at ? 2 : 0), + lt + ) + }), + (et.GSUB = {}), + (et.GSUB.parse = function (it, ot, at, st) { + return et._lctf.parse(it, ot, at, st, et.GSUB.subt) + }), + (et.GSUB.subt = function (it, ot, at, st) { + var lt = et._bin, + ct = at, + ut = {} + if (((ut.fmt = lt.readUshort(it, at)), (at += 2), ot != 1 && ot != 4 && ot != 5 && ot != 6)) return null + if (ot == 1 || ot == 4 || (ot == 5 && ut.fmt <= 2) || (ot == 6 && ut.fmt <= 2)) { + var ht = lt.readUshort(it, at) + ;(at += 2), (ut.coverage = et._lctf.readCoverage(it, ct + ht)) + } + if (ot == 1 && ut.fmt >= 1 && ut.fmt <= 2) { + if (ut.fmt == 1) (ut.delta = lt.readShort(it, at)), (at += 2) + else if (ut.fmt == 2) { + var dt = lt.readUshort(it, at) + ;(at += 2), (ut.newg = lt.readUshorts(it, at, dt)), (at += 2 * ut.newg.length) + } + } else if (ot == 4) { + ;(ut.vals = []), (dt = lt.readUshort(it, at)), (at += 2) + for (var pt = 0; pt < dt; pt++) { + var mt = lt.readUshort(it, at) + ;(at += 2), ut.vals.push(et.GSUB.readLigatureSet(it, ct + mt)) + } + } else if (ot == 5 && ut.fmt == 2) { + if (ut.fmt == 2) { + var gt = lt.readUshort(it, at) + ;(at += 2), (ut.cDef = et._lctf.readClassDef(it, ct + gt)), (ut.scset = []) + var yt = lt.readUshort(it, at) + for (at += 2, pt = 0; pt < yt; pt++) { + var bt = lt.readUshort(it, at) + ;(at += 2), ut.scset.push(bt == 0 ? null : et.GSUB.readSubClassSet(it, ct + bt)) + } + } + } else if (ot == 6 && ut.fmt == 3) { + if (ut.fmt == 3) { + for (pt = 0; pt < 3; pt++) { + ;(dt = lt.readUshort(it, at)), (at += 2) + for (var vt = [], xt = 0; xt < dt; xt++) + vt.push(et._lctf.readCoverage(it, ct + lt.readUshort(it, at + 2 * xt))) + ;(at += 2 * dt), + pt == 0 && (ut.backCvg = vt), + pt == 1 && (ut.inptCvg = vt), + pt == 2 && (ut.ahedCvg = vt) + } + ;(dt = lt.readUshort(it, at)), (at += 2), (ut.lookupRec = et.GSUB.readSubstLookupRecords(it, at, dt)) + } + } else { + if (ot == 7 && ut.fmt == 1) { + var kt = lt.readUshort(it, at) + at += 2 + var St = lt.readUint(it, at) + if (((at += 4), st.ltype == 9)) st.ltype = kt + else if (st.ltype != kt) throw 'invalid extension substitution' + return et.GSUB.subt(it, st.ltype, ct + St) + } + console.debug('unsupported GSUB table LookupType', ot, 'format', ut.fmt) + } + return ut + }), + (et.GSUB.readSubClassSet = function (it, ot) { + var at = et._bin.readUshort, + st = ot, + lt = [], + ct = at(it, ot) + ot += 2 + for (var ut = 0; ut < ct; ut++) { + var ht = at(it, ot) + ;(ot += 2), lt.push(et.GSUB.readSubClassRule(it, st + ht)) + } + return lt + }), + (et.GSUB.readSubClassRule = function (it, ot) { + var at = et._bin.readUshort, + st = {}, + lt = at(it, ot), + ct = at(it, (ot += 2)) + ;(ot += 2), (st.input = []) + for (var ut = 0; ut < lt - 1; ut++) st.input.push(at(it, ot)), (ot += 2) + return (st.substLookupRecords = et.GSUB.readSubstLookupRecords(it, ot, ct)), st + }), + (et.GSUB.readSubstLookupRecords = function (it, ot, at) { + for (var st = et._bin.readUshort, lt = [], ct = 0; ct < at; ct++) + lt.push(st(it, ot), st(it, ot + 2)), (ot += 4) + return lt + }), + (et.GSUB.readChainSubClassSet = function (it, ot) { + var at = et._bin, + st = ot, + lt = [], + ct = at.readUshort(it, ot) + ot += 2 + for (var ut = 0; ut < ct; ut++) { + var ht = at.readUshort(it, ot) + ;(ot += 2), lt.push(et.GSUB.readChainSubClassRule(it, st + ht)) + } + return lt + }), + (et.GSUB.readChainSubClassRule = function (it, ot) { + for (var at = et._bin, st = {}, lt = ['backtrack', 'input', 'lookahead'], ct = 0; ct < lt.length; ct++) { + var ut = at.readUshort(it, ot) + ;(ot += 2), ct == 1 && ut--, (st[lt[ct]] = at.readUshorts(it, ot, ut)), (ot += 2 * st[lt[ct]].length) + } + return ( + (ut = at.readUshort(it, ot)), + (ot += 2), + (st.subst = at.readUshorts(it, ot, 2 * ut)), + (ot += 2 * st.subst.length), + st + ) + }), + (et.GSUB.readLigatureSet = function (it, ot) { + var at = et._bin, + st = ot, + lt = [], + ct = at.readUshort(it, ot) + ot += 2 + for (var ut = 0; ut < ct; ut++) { + var ht = at.readUshort(it, ot) + ;(ot += 2), lt.push(et.GSUB.readLigature(it, st + ht)) + } + return lt + }), + (et.GSUB.readLigature = function (it, ot) { + var at = et._bin, + st = { chain: [] } + ;(st.nglyph = at.readUshort(it, ot)), (ot += 2) + var lt = at.readUshort(it, ot) + ot += 2 + for (var ct = 0; ct < lt - 1; ct++) st.chain.push(at.readUshort(it, ot)), (ot += 2) + return st + }), + (et.head = {}), + (et.head.parse = function (it, ot, at) { + var st = et._bin, + lt = {} + return ( + st.readFixed(it, ot), + (ot += 4), + (lt.fontRevision = st.readFixed(it, ot)), + (ot += 4), + st.readUint(it, ot), + (ot += 4), + st.readUint(it, ot), + (ot += 4), + (lt.flags = st.readUshort(it, ot)), + (ot += 2), + (lt.unitsPerEm = st.readUshort(it, ot)), + (ot += 2), + (lt.created = st.readUint64(it, ot)), + (ot += 8), + (lt.modified = st.readUint64(it, ot)), + (ot += 8), + (lt.xMin = st.readShort(it, ot)), + (ot += 2), + (lt.yMin = st.readShort(it, ot)), + (ot += 2), + (lt.xMax = st.readShort(it, ot)), + (ot += 2), + (lt.yMax = st.readShort(it, ot)), + (ot += 2), + (lt.macStyle = st.readUshort(it, ot)), + (ot += 2), + (lt.lowestRecPPEM = st.readUshort(it, ot)), + (ot += 2), + (lt.fontDirectionHint = st.readShort(it, ot)), + (ot += 2), + (lt.indexToLocFormat = st.readShort(it, ot)), + (ot += 2), + (lt.glyphDataFormat = st.readShort(it, ot)), + (ot += 2), + lt + ) + }), + (et.hhea = {}), + (et.hhea.parse = function (it, ot, at) { + var st = et._bin, + lt = {} + return ( + st.readFixed(it, ot), + (ot += 4), + (lt.ascender = st.readShort(it, ot)), + (ot += 2), + (lt.descender = st.readShort(it, ot)), + (ot += 2), + (lt.lineGap = st.readShort(it, ot)), + (ot += 2), + (lt.advanceWidthMax = st.readUshort(it, ot)), + (ot += 2), + (lt.minLeftSideBearing = st.readShort(it, ot)), + (ot += 2), + (lt.minRightSideBearing = st.readShort(it, ot)), + (ot += 2), + (lt.xMaxExtent = st.readShort(it, ot)), + (ot += 2), + (lt.caretSlopeRise = st.readShort(it, ot)), + (ot += 2), + (lt.caretSlopeRun = st.readShort(it, ot)), + (ot += 2), + (lt.caretOffset = st.readShort(it, ot)), + (ot += 2), + (ot += 8), + (lt.metricDataFormat = st.readShort(it, ot)), + (ot += 2), + (lt.numberOfHMetrics = st.readUshort(it, ot)), + (ot += 2), + lt + ) + }), + (et.hmtx = {}), + (et.hmtx.parse = function (it, ot, at, st) { + for ( + var lt = et._bin, ct = { aWidth: [], lsBearing: [] }, ut = 0, ht = 0, dt = 0; + dt < st.maxp.numGlyphs; + dt++ + ) + dt < st.hhea.numberOfHMetrics && + ((ut = lt.readUshort(it, ot)), (ot += 2), (ht = lt.readShort(it, ot)), (ot += 2)), + ct.aWidth.push(ut), + ct.lsBearing.push(ht) + return ct + }), + (et.kern = {}), + (et.kern.parse = function (it, ot, at, st) { + var lt = et._bin, + ct = lt.readUshort(it, ot) + if (((ot += 2), ct == 1)) return et.kern.parseV1(it, ot - 2, at, st) + var ut = lt.readUshort(it, ot) + ot += 2 + for (var ht = { glyph1: [], rval: [] }, dt = 0; dt < ut; dt++) { + ;(ot += 2), (at = lt.readUshort(it, ot)), (ot += 2) + var pt = lt.readUshort(it, ot) + ot += 2 + var mt = pt >>> 8 + if ((mt &= 15) != 0) throw 'unknown kern table format: ' + mt + ot = et.kern.readFormat0(it, ot, ht) + } + return ht + }), + (et.kern.parseV1 = function (it, ot, at, st) { + var lt = et._bin + lt.readFixed(it, ot), (ot += 4) + var ct = lt.readUint(it, ot) + ot += 4 + for (var ut = { glyph1: [], rval: [] }, ht = 0; ht < ct; ht++) { + lt.readUint(it, ot), (ot += 4) + var dt = lt.readUshort(it, ot) + ;(ot += 2), lt.readUshort(it, ot), (ot += 2) + var pt = dt >>> 8 + if ((pt &= 15) != 0) throw 'unknown kern table format: ' + pt + ot = et.kern.readFormat0(it, ot, ut) + } + return ut + }), + (et.kern.readFormat0 = function (it, ot, at) { + var st = et._bin, + lt = -1, + ct = st.readUshort(it, ot) + ;(ot += 2), + st.readUshort(it, ot), + (ot += 2), + st.readUshort(it, ot), + (ot += 2), + st.readUshort(it, ot), + (ot += 2) + for (var ut = 0; ut < ct; ut++) { + var ht = st.readUshort(it, ot) + ot += 2 + var dt = st.readUshort(it, ot) + ot += 2 + var pt = st.readShort(it, ot) + ;(ot += 2), ht != lt && (at.glyph1.push(ht), at.rval.push({ glyph2: [], vals: [] })) + var mt = at.rval[at.rval.length - 1] + mt.glyph2.push(dt), mt.vals.push(pt), (lt = ht) + } + return ot + }), + (et.loca = {}), + (et.loca.parse = function (it, ot, at, st) { + var lt = et._bin, + ct = [], + ut = st.head.indexToLocFormat, + ht = st.maxp.numGlyphs + 1 + if (ut == 0) for (var dt = 0; dt < ht; dt++) ct.push(lt.readUshort(it, ot + (dt << 1)) << 1) + if (ut == 1) for (dt = 0; dt < ht; dt++) ct.push(lt.readUint(it, ot + (dt << 2))) + return ct + }), + (et.maxp = {}), + (et.maxp.parse = function (it, ot, at) { + var st = et._bin, + lt = {}, + ct = st.readUint(it, ot) + return ( + (ot += 4), + (lt.numGlyphs = st.readUshort(it, ot)), + (ot += 2), + ct == 65536 && + ((lt.maxPoints = st.readUshort(it, ot)), + (ot += 2), + (lt.maxContours = st.readUshort(it, ot)), + (ot += 2), + (lt.maxCompositePoints = st.readUshort(it, ot)), + (ot += 2), + (lt.maxCompositeContours = st.readUshort(it, ot)), + (ot += 2), + (lt.maxZones = st.readUshort(it, ot)), + (ot += 2), + (lt.maxTwilightPoints = st.readUshort(it, ot)), + (ot += 2), + (lt.maxStorage = st.readUshort(it, ot)), + (ot += 2), + (lt.maxFunctionDefs = st.readUshort(it, ot)), + (ot += 2), + (lt.maxInstructionDefs = st.readUshort(it, ot)), + (ot += 2), + (lt.maxStackElements = st.readUshort(it, ot)), + (ot += 2), + (lt.maxSizeOfInstructions = st.readUshort(it, ot)), + (ot += 2), + (lt.maxComponentElements = st.readUshort(it, ot)), + (ot += 2), + (lt.maxComponentDepth = st.readUshort(it, ot)), + (ot += 2)), + lt + ) + }), + (et.name = {}), + (et.name.parse = function (it, ot, at) { + var st = et._bin, + lt = {} + st.readUshort(it, ot), (ot += 2) + var ct = st.readUshort(it, ot) + ;(ot += 2), st.readUshort(it, ot) + for ( + var ut, + ht = [ + 'copyright', + 'fontFamily', + 'fontSubfamily', + 'ID', + 'fullName', + 'version', + 'postScriptName', + 'trademark', + 'manufacturer', + 'designer', + 'description', + 'urlVendor', + 'urlDesigner', + 'licence', + 'licenceURL', + '---', + 'typoFamilyName', + 'typoSubfamilyName', + 'compatibleFull', + 'sampleText', + 'postScriptCID', + 'wwsFamilyName', + 'wwsSubfamilyName', + 'lightPalette', + 'darkPalette', + ], + dt = (ot += 2), + pt = 0; + pt < ct; + pt++ + ) { + var mt = st.readUshort(it, ot) + ot += 2 + var gt = st.readUshort(it, ot) + ot += 2 + var yt = st.readUshort(it, ot) + ot += 2 + var bt = st.readUshort(it, ot) + ot += 2 + var vt = st.readUshort(it, ot) + ot += 2 + var xt = st.readUshort(it, ot) + ot += 2 + var kt, + St = ht[bt], + Tt = dt + 12 * ct + xt + if (mt == 0) kt = st.readUnicode(it, Tt, vt / 2) + else if (mt == 3 && gt == 0) kt = st.readUnicode(it, Tt, vt / 2) + else if (gt == 0) kt = st.readASCII(it, Tt, vt) + else if (gt == 1) kt = st.readUnicode(it, Tt, vt / 2) + else if (gt == 3) kt = st.readUnicode(it, Tt, vt / 2) + else { + if (mt != 1) throw 'unknown encoding ' + gt + ', platformID: ' + mt + ;(kt = st.readASCII(it, Tt, vt)), console.debug('reading unknown MAC encoding ' + gt + ' as ASCII') + } + var At = 'p' + mt + ',' + yt.toString(16) + lt[At] == null && (lt[At] = {}), (lt[At][St !== void 0 ? St : bt] = kt), (lt[At]._lang = yt) + } + for (var Et in lt) if (lt[Et].postScriptName != null && lt[Et]._lang == 1033) return lt[Et] + for (var Et in lt) if (lt[Et].postScriptName != null && lt[Et]._lang == 0) return lt[Et] + for (var Et in lt) if (lt[Et].postScriptName != null && lt[Et]._lang == 3084) return lt[Et] + for (var Et in lt) if (lt[Et].postScriptName != null) return lt[Et] + for (var Et in lt) { + ut = Et + break + } + return console.debug('returning name table with languageID ' + lt[ut]._lang), lt[ut] + }), + (et['OS/2'] = {}), + (et['OS/2'].parse = function (it, ot, at) { + var st = et._bin.readUshort(it, ot) + ot += 2 + var lt = {} + if (st == 0) et['OS/2'].version0(it, ot, lt) + else if (st == 1) et['OS/2'].version1(it, ot, lt) + else if (st == 2 || st == 3 || st == 4) et['OS/2'].version2(it, ot, lt) + else { + if (st != 5) throw 'unknown OS/2 table version: ' + st + et['OS/2'].version5(it, ot, lt) + } + return lt + }), + (et['OS/2'].version0 = function (it, ot, at) { + var st = et._bin + return ( + (at.xAvgCharWidth = st.readShort(it, ot)), + (ot += 2), + (at.usWeightClass = st.readUshort(it, ot)), + (ot += 2), + (at.usWidthClass = st.readUshort(it, ot)), + (ot += 2), + (at.fsType = st.readUshort(it, ot)), + (ot += 2), + (at.ySubscriptXSize = st.readShort(it, ot)), + (ot += 2), + (at.ySubscriptYSize = st.readShort(it, ot)), + (ot += 2), + (at.ySubscriptXOffset = st.readShort(it, ot)), + (ot += 2), + (at.ySubscriptYOffset = st.readShort(it, ot)), + (ot += 2), + (at.ySuperscriptXSize = st.readShort(it, ot)), + (ot += 2), + (at.ySuperscriptYSize = st.readShort(it, ot)), + (ot += 2), + (at.ySuperscriptXOffset = st.readShort(it, ot)), + (ot += 2), + (at.ySuperscriptYOffset = st.readShort(it, ot)), + (ot += 2), + (at.yStrikeoutSize = st.readShort(it, ot)), + (ot += 2), + (at.yStrikeoutPosition = st.readShort(it, ot)), + (ot += 2), + (at.sFamilyClass = st.readShort(it, ot)), + (ot += 2), + (at.panose = st.readBytes(it, ot, 10)), + (ot += 10), + (at.ulUnicodeRange1 = st.readUint(it, ot)), + (ot += 4), + (at.ulUnicodeRange2 = st.readUint(it, ot)), + (ot += 4), + (at.ulUnicodeRange3 = st.readUint(it, ot)), + (ot += 4), + (at.ulUnicodeRange4 = st.readUint(it, ot)), + (ot += 4), + (at.achVendID = [ + st.readInt8(it, ot), + st.readInt8(it, ot + 1), + st.readInt8(it, ot + 2), + st.readInt8(it, ot + 3), + ]), + (ot += 4), + (at.fsSelection = st.readUshort(it, ot)), + (ot += 2), + (at.usFirstCharIndex = st.readUshort(it, ot)), + (ot += 2), + (at.usLastCharIndex = st.readUshort(it, ot)), + (ot += 2), + (at.sTypoAscender = st.readShort(it, ot)), + (ot += 2), + (at.sTypoDescender = st.readShort(it, ot)), + (ot += 2), + (at.sTypoLineGap = st.readShort(it, ot)), + (ot += 2), + (at.usWinAscent = st.readUshort(it, ot)), + (ot += 2), + (at.usWinDescent = st.readUshort(it, ot)), + (ot += 2) + ) + }), + (et['OS/2'].version1 = function (it, ot, at) { + var st = et._bin + return ( + (ot = et['OS/2'].version0(it, ot, at)), + (at.ulCodePageRange1 = st.readUint(it, ot)), + (ot += 4), + (at.ulCodePageRange2 = st.readUint(it, ot)), + (ot += 4) + ) + }), + (et['OS/2'].version2 = function (it, ot, at) { + var st = et._bin + return ( + (ot = et['OS/2'].version1(it, ot, at)), + (at.sxHeight = st.readShort(it, ot)), + (ot += 2), + (at.sCapHeight = st.readShort(it, ot)), + (ot += 2), + (at.usDefault = st.readUshort(it, ot)), + (ot += 2), + (at.usBreak = st.readUshort(it, ot)), + (ot += 2), + (at.usMaxContext = st.readUshort(it, ot)), + (ot += 2) + ) + }), + (et['OS/2'].version5 = function (it, ot, at) { + var st = et._bin + return ( + (ot = et['OS/2'].version2(it, ot, at)), + (at.usLowerOpticalPointSize = st.readUshort(it, ot)), + (ot += 2), + (at.usUpperOpticalPointSize = st.readUshort(it, ot)), + (ot += 2) + ) + }), + (et.post = {}), + (et.post.parse = function (it, ot, at) { + var st = et._bin, + lt = {} + return ( + (lt.version = st.readFixed(it, ot)), + (ot += 4), + (lt.italicAngle = st.readFixed(it, ot)), + (ot += 4), + (lt.underlinePosition = st.readShort(it, ot)), + (ot += 2), + (lt.underlineThickness = st.readShort(it, ot)), + (ot += 2), + lt + ) + }), + et == null && (et = {}), + et.U == null && (et.U = {}), + (et.U.codeToGlyph = function (it, ot) { + var at = it.cmap, + st = -1 + if ( + (at.p0e4 != null + ? (st = at.p0e4) + : at.p3e1 != null + ? (st = at.p3e1) + : at.p1e0 != null + ? (st = at.p1e0) + : at.p0e3 != null && (st = at.p0e3), + st == -1) + ) + throw 'no familiar platform and encoding!' + var lt = at.tables[st] + if (lt.format == 0) return ot >= lt.map.length ? 0 : lt.map[ot] + if (lt.format == 4) { + for (var ct = -1, ut = 0; ut < lt.endCount.length; ut++) + if (ot <= lt.endCount[ut]) { + ct = ut + break + } + return ct == -1 || lt.startCount[ct] > ot + ? 0 + : 65535 & + (lt.idRangeOffset[ct] != 0 + ? lt.glyphIdArray[ + ot - lt.startCount[ct] + (lt.idRangeOffset[ct] >> 1) - (lt.idRangeOffset.length - ct) + ] + : ot + lt.idDelta[ct]) + } + if (lt.format == 12) { + if (ot > lt.groups[lt.groups.length - 1][1]) return 0 + for (ut = 0; ut < lt.groups.length; ut++) { + var ht = lt.groups[ut] + if (ht[0] <= ot && ot <= ht[1]) return ht[2] + (ot - ht[0]) + } + return 0 + } + throw 'unknown cmap table format ' + lt.format + }), + (et.U.glyphToPath = function (it, ot) { + var at = { cmds: [], crds: [] } + if (it.SVG && it.SVG.entries[ot]) { + var st = it.SVG.entries[ot] + return st == null + ? at + : (typeof st == 'string' && ((st = et.SVG.toPath(st)), (it.SVG.entries[ot] = st)), st) + } + if (it.CFF) { + var lt = { + x: 0, + y: 0, + stack: [], + nStems: 0, + haveWidth: !1, + width: it.CFF.Private ? it.CFF.Private.defaultWidthX : 0, + open: !1, + }, + ct = it.CFF, + ut = it.CFF.Private + if (ct.ROS) { + for (var ht = 0; ct.FDSelect[ht + 2] <= ot; ) ht += 2 + ut = ct.FDArray[ct.FDSelect[ht + 1]].Private + } + et.U._drawCFF(it.CFF.CharStrings[ot], lt, ct, ut, at) + } else it.glyf && et.U._drawGlyf(ot, it, at) + return at + }), + (et.U._drawGlyf = function (it, ot, at) { + var st = ot.glyf[it] + st == null && (st = ot.glyf[it] = et.glyf._parseGlyf(ot, it)), + st != null && (st.noc > -1 ? et.U._simpleGlyph(st, at) : et.U._compoGlyph(st, ot, at)) + }), + (et.U._simpleGlyph = function (it, ot) { + for (var at = 0; at < it.noc; at++) { + for (var st = at == 0 ? 0 : it.endPts[at - 1] + 1, lt = it.endPts[at], ct = st; ct <= lt; ct++) { + var ut = ct == st ? lt : ct - 1, + ht = ct == lt ? st : ct + 1, + dt = 1 & it.flags[ct], + pt = 1 & it.flags[ut], + mt = 1 & it.flags[ht], + gt = it.xs[ct], + yt = it.ys[ct] + if (ct == st) + if (dt) { + if (!pt) { + et.U.P.moveTo(ot, gt, yt) + continue + } + et.U.P.moveTo(ot, it.xs[ut], it.ys[ut]) + } else + pt + ? et.U.P.moveTo(ot, it.xs[ut], it.ys[ut]) + : et.U.P.moveTo(ot, (it.xs[ut] + gt) / 2, (it.ys[ut] + yt) / 2) + dt + ? pt && et.U.P.lineTo(ot, gt, yt) + : mt + ? et.U.P.qcurveTo(ot, gt, yt, it.xs[ht], it.ys[ht]) + : et.U.P.qcurveTo(ot, gt, yt, (gt + it.xs[ht]) / 2, (yt + it.ys[ht]) / 2) + } + et.U.P.closePath(ot) + } + }), + (et.U._compoGlyph = function (it, ot, at) { + for (var st = 0; st < it.parts.length; st++) { + var lt = { cmds: [], crds: [] }, + ct = it.parts[st] + et.U._drawGlyf(ct.glyphIndex, ot, lt) + for (var ut = ct.m, ht = 0; ht < lt.crds.length; ht += 2) { + var dt = lt.crds[ht], + pt = lt.crds[ht + 1] + at.crds.push(dt * ut.a + pt * ut.b + ut.tx), at.crds.push(dt * ut.c + pt * ut.d + ut.ty) + } + for (ht = 0; ht < lt.cmds.length; ht++) at.cmds.push(lt.cmds[ht]) + } + }), + (et.U._getGlyphClass = function (it, ot) { + var at = et._lctf.getInterval(ot, it) + return at == -1 ? 0 : ot[at + 2] + }), + (et.U.getPairAdjustment = function (it, ot, at) { + var st = !1 + if (it.GPOS) + for (var lt = it.GPOS, ct = lt.lookupList, ut = lt.featureList, ht = [], dt = 0; dt < ut.length; dt++) { + var pt = ut[dt] + if (pt.tag == 'kern') { + st = !0 + for (var mt = 0; mt < pt.tab.length; mt++) + if (!ht[pt.tab[mt]]) { + ht[pt.tab[mt]] = !0 + for (var gt = ct[pt.tab[mt]], yt = 0; yt < gt.tabs.length; yt++) + if (gt.tabs[yt] != null) { + var bt, + vt = gt.tabs[yt] + if ((!vt.coverage || (bt = et._lctf.coverageIndex(vt.coverage, ot)) != -1) && gt.ltype != 1) { + if (gt.ltype == 2) { + var xt = null + if (vt.fmt == 1) { + var kt = vt.pairsets[bt] + for (dt = 0; dt < kt.length; dt++) kt[dt].gid2 == at && (xt = kt[dt]) + } else if (vt.fmt == 2) { + var St = et.U._getGlyphClass(ot, vt.classDef1), + Tt = et.U._getGlyphClass(at, vt.classDef2) + xt = vt.matrix[St][Tt] + } + if (xt) { + var At = 0 + return ( + xt.val1 && xt.val1[2] && (At += xt.val1[2]), + xt.val2 && xt.val2[0] && (At += xt.val2[0]), + At + ) + } + } + } + } + } + } + } + if (it.kern && !st) { + var Et = it.kern.glyph1.indexOf(ot) + if (Et != -1) { + var $t = it.kern.rval[Et].glyph2.indexOf(at) + if ($t != -1) return it.kern.rval[Et].vals[$t] + } + } + return 0 + }), + (et.U._applySubs = function (it, ot, at, st) { + for (var lt = it.length - ot - 1, ct = 0; ct < at.tabs.length; ct++) + if (at.tabs[ct] != null) { + var ut, + ht = at.tabs[ct] + if (!ht.coverage || (ut = et._lctf.coverageIndex(ht.coverage, it[ot])) != -1) { + if (at.ltype == 1) it[ot], ht.fmt == 1 ? (it[ot] = it[ot] + ht.delta) : (it[ot] = ht.newg[ut]) + else if (at.ltype == 4) + for (var dt = ht.vals[ut], pt = 0; pt < dt.length; pt++) { + var mt = dt[pt], + gt = mt.chain.length + if (!(gt > lt)) { + for (var yt = !0, bt = 0, vt = 0; vt < gt; vt++) { + for (; it[ot + bt + (1 + vt)] == -1; ) bt++ + mt.chain[vt] != it[ot + bt + (1 + vt)] && (yt = !1) + } + if (yt) { + for (it[ot] = mt.nglyph, vt = 0; vt < gt + bt; vt++) it[ot + vt + 1] = -1 + break + } + } + } + else if (at.ltype == 5 && ht.fmt == 2) + for ( + var xt = et._lctf.getInterval(ht.cDef, it[ot]), kt = ht.cDef[xt + 2], St = ht.scset[kt], Tt = 0; + Tt < St.length; + Tt++ + ) { + var At = St[Tt], + Et = At.input + if (!(Et.length > lt)) { + for (yt = !0, vt = 0; vt < Et.length; vt++) { + var $t = et._lctf.getInterval(ht.cDef, it[ot + 1 + vt]) + if (xt == -1 && ht.cDef[$t + 2] != Et[vt]) { + yt = !1 + break + } + } + if (yt) { + var Dt = At.substLookupRecords + for (pt = 0; pt < Dt.length; pt += 2) Dt[pt], Dt[pt + 1] + } + } + } + else if (at.ltype == 6 && ht.fmt == 3) { + if ( + !et.U._glsCovered(it, ht.backCvg, ot - ht.backCvg.length) || + !et.U._glsCovered(it, ht.inptCvg, ot) || + !et.U._glsCovered(it, ht.ahedCvg, ot + ht.inptCvg.length) + ) + continue + var jt = ht.lookupRec + for (Tt = 0; Tt < jt.length; Tt += 2) { + xt = jt[Tt] + var Pt = st[jt[Tt + 1]] + et.U._applySubs(it, ot + xt, Pt, st) + } + } + } + } + }), + (et.U._glsCovered = function (it, ot, at) { + for (var st = 0; st < ot.length; st++) if (et._lctf.coverageIndex(ot[st], it[at + st]) == -1) return !1 + return !0 + }), + (et.U.glyphsToPath = function (it, ot, at) { + for (var st = { cmds: [], crds: [] }, lt = 0, ct = 0; ct < ot.length; ct++) { + var ut = ot[ct] + if (ut != -1) { + for ( + var ht = ct < ot.length - 1 && ot[ct + 1] != -1 ? ot[ct + 1] : 0, + dt = et.U.glyphToPath(it, ut), + pt = 0; + pt < dt.crds.length; + pt += 2 + ) + st.crds.push(dt.crds[pt] + lt), st.crds.push(dt.crds[pt + 1]) + for (at && st.cmds.push(at), pt = 0; pt < dt.cmds.length; pt++) st.cmds.push(dt.cmds[pt]) + at && st.cmds.push('X'), + (lt += it.hmtx.aWidth[ut]), + ct < ot.length - 1 && (lt += et.U.getPairAdjustment(it, ut, ht)) + } + } + return st + }), + (et.U.P = {}), + (et.U.P.moveTo = function (it, ot, at) { + it.cmds.push('M'), it.crds.push(ot, at) + }), + (et.U.P.lineTo = function (it, ot, at) { + it.cmds.push('L'), it.crds.push(ot, at) + }), + (et.U.P.curveTo = function (it, ot, at, st, lt, ct, ut) { + it.cmds.push('C'), it.crds.push(ot, at, st, lt, ct, ut) + }), + (et.U.P.qcurveTo = function (it, ot, at, st, lt) { + it.cmds.push('Q'), it.crds.push(ot, at, st, lt) + }), + (et.U.P.closePath = function (it) { + it.cmds.push('Z') + }), + (et.U._drawCFF = function (it, ot, at, st, lt) { + for ( + var ct = ot.stack, + ut = ot.nStems, + ht = ot.haveWidth, + dt = ot.width, + pt = ot.open, + mt = 0, + gt = ot.x, + yt = ot.y, + bt = 0, + vt = 0, + xt = 0, + kt = 0, + St = 0, + Tt = 0, + At = 0, + Et = 0, + $t = 0, + Dt = 0, + jt = { val: 0, size: 0 }; + mt < it.length; -;(`+nt+")()"],{type:"application/javascript"}))),et.onmessage=function(rt){var it=rt.data,ot=it.messageId,at=openRequests[ot];if(!at)throw new Error("WorkerModule response with empty or unknown messageId");delete openRequests[ot],at(it)}}return et}function callWorker(tt,et,nt){return new Promise(function(rt,it){var ot=++_messageId;openRequests[ot]=function(at){at.success?rt(at.result):it(new Error("Error in worker "+et+" call: "+at.error))},getWorker(tt).postMessage({messageId:ot,action:et,data:nt})})}function SDFGenerator(){var tt=function(et){function nt(Ft,Nt,Ut,Mt,Ht,en,sn,Kt){var rn=1-sn;Kt.x=rn*rn*Ft+2*rn*sn*Ut+sn*sn*Ht,Kt.y=rn*rn*Nt+2*rn*sn*Mt+sn*sn*en}function rt(Ft,Nt,Ut,Mt,Ht,en,sn,Kt,rn,nn){var hn=1-rn;nn.x=hn*hn*hn*Ft+3*hn*hn*rn*Ut+3*hn*rn*rn*Ht+rn*rn*rn*sn,nn.y=hn*hn*hn*Nt+3*hn*hn*rn*Mt+3*hn*rn*rn*en+rn*rn*rn*Kt}function it(Ft,Nt){for(var Ut=/([MLQCZ])([^MLQCZ]*)/g,Mt,Ht,en,sn,Kt;Mt=Ut.exec(Ft);){var rn=Mt[2].replace(/^\s*|\s*$/g,"").split(/[,\s]+/).map(function(nn){return parseFloat(nn)});switch(Mt[1]){case"M":sn=Ht=rn[0],Kt=en=rn[1];break;case"L":(rn[0]!==sn||rn[1]!==Kt)&&Nt("L",sn,Kt,sn=rn[0],Kt=rn[1]);break;case"Q":{Nt("Q",sn,Kt,sn=rn[2],Kt=rn[3],rn[0],rn[1]);break}case"C":{Nt("C",sn,Kt,sn=rn[4],Kt=rn[5],rn[0],rn[1],rn[2],rn[3]);break}case"Z":(sn!==Ht||Kt!==en)&&Nt("L",sn,Kt,Ht,en);break}}}function ot(Ft,Nt,Ut){Ut===void 0&&(Ut=16);var Mt={x:0,y:0};it(Ft,function(Ht,en,sn,Kt,rn,nn,hn,vn,an){switch(Ht){case"L":Nt(en,sn,Kt,rn);break;case"Q":{for(var Qt=en,_n=sn,Pn=1;Pn0;)On[Zn]=arguments[Zn+2];var Vn=Dn[jn]||(Dn[jn]=Ut.getUniformLocation(un,jn));Ut["uniform"+Rn].apply(Ut,[Vn].concat(On))},setAttribute:function(Rn,jn,On,Zn,Vn){var qn=kn[Rn];qn||(qn=kn[Rn]={buf:Ut.createBuffer(),loc:Ut.getAttribLocation(un,Rn),data:null}),Ut.bindBuffer(Ut.ARRAY_BUFFER,qn.buf),Ut.vertexAttribPointer(qn.loc,jn,Ut.FLOAT,!1,0,0),Ut.enableVertexAttribArray(qn.loc),Ht?Ut.vertexAttribDivisor(qn.loc,Zn):$n("ANGLE_instanced_arrays").vertexAttribDivisorANGLE(qn.loc,Zn),Vn!==qn.data&&(Ut.bufferData(Ut.ARRAY_BUFFER,Vn,On),qn.data=Vn)}})}}}sn[An].transaction(pn)},cn=function(An,wn){rn++;try{Ut.activeTexture(Ut.TEXTURE0+rn);var fn=Kt[An];fn||(fn=Kt[An]=Ut.createTexture(),Ut.bindTexture(Ut.TEXTURE_2D,fn),Ut.texParameteri(Ut.TEXTURE_2D,Ut.TEXTURE_MIN_FILTER,Ut.NEAREST),Ut.texParameteri(Ut.TEXTURE_2D,Ut.TEXTURE_MAG_FILTER,Ut.NEAREST)),Ut.bindTexture(Ut.TEXTURE_2D,fn),wn(fn,rn)}finally{rn--}},mn=function(An,wn,fn){var pn=Ut.createFramebuffer();nn.push(pn),Ut.bindFramebuffer(Ut.FRAMEBUFFER,pn),Ut.activeTexture(Ut.TEXTURE0+wn),Ut.bindTexture(Ut.TEXTURE_2D,An),Ut.framebufferTexture2D(Ut.FRAMEBUFFER,Ut.COLOR_ATTACHMENT0,Ut.TEXTURE_2D,An,0);try{fn(pn)}finally{Ut.deleteFramebuffer(pn),Ut.bindFramebuffer(Ut.FRAMEBUFFER,nn[--nn.length-1]||null)}},In=function(){en={},sn={},Kt={},rn=-1,nn.length=0};var hn=$n,vn=Nn,an=Tn,Qt=cn,_n=mn,Pn=In,Ht=typeof WebGL2RenderingContext<"u"&&Ut instanceof WebGL2RenderingContext,en={},sn={},Kt={},rn=-1,nn=[];Ut.canvas.addEventListener("webglcontextlost",function(An){In(),An.preventDefault()},!1),lt.set(Ut,Mt={gl:Ut,isWebGL2:Ht,getExtension:$n,withProgram:Tn,withTexture:cn,withTextureFramebuffer:mn,handleContextLoss:In})}Nt(Mt)}function ht(Ft,Nt,Ut,Mt,Ht,en,sn,Kt){sn===void 0&&(sn=15),Kt===void 0&&(Kt=null),ut(Ft,function(rn){var nn=rn.gl,hn=rn.withProgram,vn=rn.withTexture;vn("copy",function(an,Qt){nn.texImage2D(nn.TEXTURE_2D,0,nn.RGBA,Ht,en,0,nn.RGBA,nn.UNSIGNED_BYTE,Nt),hn("copy",at,st,function(_n){var Pn=_n.setUniform,$n=_n.setAttribute;$n("aUV",2,nn.STATIC_DRAW,0,new Float32Array([0,0,2,0,0,2])),Pn("1i","image",Qt),nn.bindFramebuffer(nn.FRAMEBUFFER,Kt||null),nn.disable(nn.BLEND),nn.colorMask(sn&8,sn&4,sn&2,sn&1),nn.viewport(Ut,Mt,Ht,en),nn.scissor(Ut,Mt,Ht,en),nn.drawArrays(nn.TRIANGLES,0,3)})})})}function dt(Ft,Nt,Ut){var Mt=Ft.width,Ht=Ft.height;ut(Ft,function(en){var sn=en.gl,Kt=new Uint8Array(Mt*Ht*4);sn.readPixels(0,0,Mt,Ht,sn.RGBA,sn.UNSIGNED_BYTE,Kt),Ft.width=Nt,Ft.height=Ut,ht(sn,Kt,0,0,Mt,Ht)})}var pt=Object.freeze({__proto__:null,withWebGLContext:ut,renderImageData:ht,resizeWebGLCanvasWithoutClearing:dt});function mt(Ft,Nt,Ut,Mt,Ht,en){en===void 0&&(en=1);var sn=new Uint8Array(Ft*Nt),Kt=Mt[2]-Mt[0],rn=Mt[3]-Mt[1],nn=[];ot(Ut,function($n,Nn,Tn,cn){nn.push({x1:$n,y1:Nn,x2:Tn,y2:cn,minX:Math.min($n,Tn),minY:Math.min(Nn,cn),maxX:Math.max($n,Tn),maxY:Math.max(Nn,cn)})}),nn.sort(function($n,Nn){return $n.maxX-Nn.maxX});for(var hn=0;hnIn.minX&&Nn-cnIn.minY){var An=bt($n,Nn,In.x1,In.y1,In.x2,In.y2);AnNn!=mn.y2>Nn&&$n<(mn.x2-mn.x1)*(Nn-mn.y1)/(mn.y2-mn.y1)+mn.x1;In&&(Tn+=mn.y1p.y!=seg.w>p.y)&&(p.x<(seg.z-seg.x)*(p.y-seg.y)/(seg.w-seg.y)+seg.x);bool crossingUp=crossing&&vLineSegment.y1,1e>2,u>2,2wt>1,1>1,1ge>1,1wp>1,1j>1,f>1,hm>1,1>1,u>1,u6>1,1>1,+5,28>1,w>1,1>1,+3,b8>1,1>1,+3,1>3,-1>-1,3>1,1>1,+2,1s>1,1>1,x>1,th>1,1>1,+2,db>1,1>1,+3,3>1,1>1,+2,14qm>1,1>1,+1,4q>1,1e>2,u>2,2>1,+1",canonical:"6f1>-6dx,6dy>-6dx,6ec>-6ed,6ee>-6ed,6ww>2jj,-2ji>2jj,14r4>-1e7l,1e7m>-1e7l,1e7m>-1e5c,1e5d>-1e5b,1e5c>-14qx,14qy>-14qx,14vn>-1ecg,1ech>-1ecg,1edu>-1ecg,1eci>-1ecg,1eda>-1ecg,1eci>-1ecg,1eci>-168q,168r>-168q,168s>-14ye,14yf>-14ye"};function gt(cn,mn){var In=36,An=0,wn=new Map,fn=mn&&new Map,pn;return cn.split(",").forEach(function kn(Dn){if(Dn.indexOf("+")!==-1)for(var un=+Dn;un--;)kn(pn);else{pn=Dn;var Zt=Dn.split(">"),Xt=Zt[0],Sn=Zt[1];Xt=String.fromCodePoint(An+=parseInt(Xt,In)),Sn=String.fromCodePoint(An+=parseInt(Sn,In)),wn.set(Xt,Sn),mn&&fn.set(Sn,Xt)}}),{map:wn,reverseMap:fn}}var yt,bt,vt;function xt(){if(!yt){var cn=gt(mt.pairs,!0),mn=cn.map,In=cn.reverseMap;yt=mn,bt=In,vt=gt(mt.canonical,!1).map}}function kt(cn){return xt(),yt.get(cn)||null}function St(cn){return xt(),bt.get(cn)||null}function Tt(cn){return xt(),vt.get(cn)||null}var At=rt.L,Et=rt.R,$t=rt.EN,Dt=rt.ES,jt=rt.ET,Pt=rt.AN,Ct=rt.CS,wt=rt.B,It=rt.S,Ot=rt.ON,Wt=rt.BN,zt=rt.NSM,Ft=rt.AL,Nt=rt.LRO,Ut=rt.RLO,Mt=rt.LRE,Ht=rt.RLE,en=rt.PDF,sn=rt.LRI,Kt=rt.RLI,rn=rt.FSI,nn=rt.PDI;function hn(cn,mn){for(var In=125,An=new Uint32Array(cn.length),wn=0;wn0)qn--;else if(Jn>0){for(zn=0;!Zn[Zn.length-1]._isolate;)Zn.pop();var Tr=Zn[Zn.length-1]._isolInitIndex;Tr!=null&&(Dn.set(Tr,Hn),Dn.set(Hn,Tr)),Zn.pop(),Jn--}Vn=Zn[Zn.length-1],kn[Hn]=Vn._level,Vn._override&&pn(Hn,Vn._override)}else pr&en?(qn===0&&(zn>0?zn--:!Vn._isolate&&Zn.length>1&&(Zn.pop(),Vn=Zn[Zn.length-1])),kn[Hn]=Vn._level):pr&wt&&(kn[Hn]=Zt.level);else kn[Hn]=Vn._level,Vn._override&&pr!==Wt&&pn(Hn,Vn._override)}for(var Ar=[],qr=null,jr=Zt.start;jr<=Zt.end;jr++){var Fr=An[jr];if(!(Fr<)){var ao=kn[jr],Yr=Fr&ot,Dr=Fr===nn;qr&&ao===qr._level?(qr._end=jr,qr._endsWithIsolInit=Yr):Ar.push(qr={_start:jr,_end:jr,_level:ao,_startsWithPDI:Dr,_endsWithIsolInit:Yr})}}for(var go=[],xn=0;xn=0;Hr--)if(!(An[Hr]<)){cr=kn[Hr];break}var vr=Ln[Ln.length-1],Nr=kn[vr],Gr=Zt.level;if(!(An[vr]&ot)){for(var eo=vr+1;eo<=Zt.end;eo++)if(!(An[eo]<)){Gr=kn[eo];break}}go.push({_seqIndices:Ln,_sosType:Math.max(cr,lr)%2?Et:At,_eosType:Math.max(Gr,Nr)%2?Et:At})}}for(var Zr=0;Zr=0;Br--)if(!(An[wr[Br]]<)){Wr=An[wr[Br]];break}pn(Lr,Wr&(ot|nn)?Ot:Wr)}}if(fn.get($t))for(var tr=0;tr=-1;Sr--){var dr=Sr===-1?Mr:An[wr[Sr]];if(dr&at){dr===Ft&&pn(ir,Pt);break}}}if(fn.get(Ft))for(var br=0;br=0&&(fo=An[wr[Yn]],!!(fo<));Yn--);for(var vo=no+1;vo=0&&An[wr[bo]]&(jt|lt);bo--)pn(wr[bo],$t);for(_o++;_o=0&&An[wr[Wo]]<Wo--)pn(wr[Wo],Ot);for(var Po=Co+1;Po=0;tu--){var op=pu[tu].char;if(op===Mp||op===St(Tt(No))||kt(Tt(op))===No){Zo.push([pu[tu].seqIndex,eu]),pu.length=tu;break}}}Zo.sort(function(bs,$s){return bs[0]-$s[0]})}for(var Rp=0;Rp=0;Yo--){var Ko=wr[Yo];if(An[Ko]&$a){var Zs=An[Ko]&na?Et:At;Zs!==Rr?Us=Zs:Us=Rr;break}}}if(Us){if(An[wr[ts]]=An[wr[mu]]=Us,Us!==Rr){for(var zs=ts+1;zs=0;Hu--)if(An[wr[Hu]]<)Op=Hu;else{Ws=An[wr[Hu]]&na?Et:At;break}for(var ns=Ur,gu=Cl+1;gu=0&&dt(cn[yu])&ct;yu--)kn[yu]=Zt.level}}return{levels:kn,paragraphs:un};function Gu(bs,$s){for(var os=bs;os=kn&&dt(cn[Zt])&ct;Zt--)un[Zt]=pn.level;for(var Xt=pn.level,Sn=1/0,Rn=0;RnXt&&(Xt=jn),jn=Sn;On--)for(var Zn=0;Zn=On){for(var Vn=Zn;Zn+1=On;)Zn++;Zn>Vn&&fn.push([Vn+kn,Zn+kn])}}}),fn}function Nn(cn,mn,In,An){var wn=Tn(cn,mn,In,An),fn=[].concat(cn);return wn.forEach(function(pn,kn){fn[kn]=(mn.levels[pn]&1?_n(cn[pn]):null)||cn[pn]}),fn.join("")}function Tn(cn,mn,In,An){for(var wn=$n(cn,mn,In,An),fn=[],pn=0;pn/gm;function nt(rt,it){let ot=ShaderChunk[it];return ot?expandShaderIncludes(ot):rt}return tt.replace(et,nt)}const _lut=[];for(let tt=0;tt<256;tt++)_lut[tt]=(tt<16?"0":"")+tt.toString(16);function generateUUID(){const tt=Math.random()*4294967295|0,et=Math.random()*4294967295|0,nt=Math.random()*4294967295|0,rt=Math.random()*4294967295|0;return(_lut[tt&255]+_lut[tt>>8&255]+_lut[tt>>16&255]+_lut[tt>>24&255]+"-"+_lut[et&255]+_lut[et>>8&255]+"-"+_lut[et>>16&15|64]+_lut[et>>24&255]+"-"+_lut[nt&63|128]+_lut[nt>>8&255]+"-"+_lut[nt>>16&255]+_lut[nt>>24&255]+_lut[rt&255]+_lut[rt>>8&255]+_lut[rt>>16&255]+_lut[rt>>24&255]).toUpperCase()}const assign$2=Object.assign||function(){let tt=arguments[0];for(let et=1,nt=arguments.length;et/gm,` -//!BEGIN_POST_CHUNK $1 -$& -//!END_POST_CHUNK -`),nt=expandShaderIncludes(nt)),pt){let gt=pt({vertexShader:et,fragmentShader:nt});et=gt.vertexShader,nt=gt.fragmentShader}if(dt){let gt=[];nt=nt.replace(/^\/\/!BEGIN_POST_CHUNK[^]+?^\/\/!END_POST_CHUNK/gm,yt=>(gt.push(yt),"")),ht=`${dt} -${gt.join(` -`)} -${ht}`}if(mt){const gt=` -uniform float ${mt}; -`;ot=gt+ot,ct=gt+ct}return lt&&(et=`vec3 troika_position_${it}; -vec3 troika_normal_${it}; -vec2 troika_uv_${it}; -${et} -`,ot=`${ot} -void troikaVertexTransform${it}(inout vec3 position, inout vec3 normal, inout vec2 uv) { - ${lt} -} -`,at=` -troika_position_${it} = vec3(position); -troika_normal_${it} = vec3(normal); -troika_uv_${it} = vec2(uv); -troikaVertexTransform${it}(troika_position_${it}, troika_normal_${it}, troika_uv_${it}); -${at} -`,et=et.replace(/\b(position|normal|uv)\b/g,(gt,yt,bt,vt)=>/\battribute\s+vec[23]\s+$/.test(vt.substr(0,bt))?yt:`troika_${yt}_${it}`),tt.map&&tt.map.channel>0||(et=et.replace(/\bMAP_UV\b/g,`troika_uv_${it}`))),et=injectIntoShaderCode(et,it,ot,at,st),nt=injectIntoShaderCode(nt,it,ct,ut,ht),{vertexShader:et,fragmentShader:nt}}function injectIntoShaderCode(tt,et,nt,rt,it){return(rt||it||nt)&&(tt=tt.replace(voidMainRegExp,` -${nt} -void troikaOrigMain${et}() {`),tt+=` -void main() { - ${rt} - troikaOrigMain${et}(); - ${it} -}`),tt}function optionsJsonReplacer(tt,et){return tt==="uniforms"?void 0:typeof et=="function"?et.toString():et}let _idCtr=0;const optionsHashesToIds=new Map;function getKeyForOptions(tt){const et=JSON.stringify(tt,optionsJsonReplacer);let nt=optionsHashesToIds.get(et);return nt==null&&optionsHashesToIds.set(et,nt=++_idCtr),nt}function createTypesetter(tt,et,nt){const{defaultFontURL:rt}=nt,it=Object.create(null),ot=1/0,at=/[\u00AD\u034F\u061C\u115F-\u1160\u17B4-\u17B5\u180B-\u180E\u200B-\u200F\u202A-\u202E\u2060-\u206F\u3164\uFE00-\uFE0F\uFEFF\uFFA0\uFFF0-\uFFF8]/,st="[^\\S\\u00A0]",lt=new RegExp(`${st}|[\\-\\u007C\\u00AD\\u2010\\u2012-\\u2014\\u2027\\u2056\\u2E17\\u2E40]`);function ct(vt,xt){function kt(){const St=Tt=>{console.error(`Failure loading font ${vt}${vt===rt?"":"; trying fallback"}`,Tt),vt!==rt&&(vt=rt,kt())};try{const Tt=new XMLHttpRequest;Tt.open("get",vt,!0),Tt.responseType="arraybuffer",Tt.onload=function(){if(Tt.status>=400)St(new Error(Tt.statusText));else if(Tt.status>0)try{const At=tt(Tt.response);xt(At)}catch(At){St(At)}},Tt.onerror=St,Tt.send()}catch(Tt){St(Tt)}}kt()}function ut(vt,xt){vt||(vt=rt);let kt=it[vt];kt?kt.pending?kt.pending.push(xt):xt(kt):(it[vt]={pending:[xt]},ct(vt,St=>{let Tt=it[vt].pending;it[vt]=St,Tt.forEach(At=>At(St))}))}function ht({text:vt="",font:xt=rt,sdfGlyphSize:kt=64,fontSize:St=1,letterSpacing:Tt=0,lineHeight:At="normal",maxWidth:Et=ot,direction:$t,textAlign:Dt="left",textIndent:jt=0,whiteSpace:Pt="normal",overflowWrap:Ct="normal",anchorX:wt=0,anchorY:It=0,includeCaretPositions:Ot=!1,chunkedBoundsSize:Wt=8192,colorRanges:zt=null},Ft,Nt=!1){const Ut=gt(),Mt={fontLoad:0,typesetting:0};vt.indexOf("\r")>-1&&(console.info("Typesetter: got text with \\r chars; normalizing to \\n"),vt=vt.replace(/\r\n/g,` -`).replace(/\r/g,` -`)),St=+St,Tt=+Tt,Et=+Et,At=At||"normal",jt=+jt,ut(xt,Ht=>{const en=isFinite(Et);let sn=null,Kt=null,rn=null,nn=null,hn=null,vn=null,an=null,Qt=0,_n=0,Pn=Pt!=="nowrap";const{ascender:$n,descender:Nn,unitsPerEm:Tn,lineGap:cn,capHeight:mn,xHeight:In}=Ht;Mt.fontLoad=gt()-Ut;const An=gt(),wn=St/Tn;At==="normal"&&(At=($n-Nn+cn)/Tn),At=At*St;const fn=(At-($n-Nn)*wn)/2,pn=-($n*wn+fn),kn=Math.min(At,($n-Nn)*wn),Dn=($n+Nn)/2*wn-kn/2;let un=jt,Zt=new yt;const Xt=[Zt];Ht.forEachGlyph(vt,St,Tt,(jn,On,Zn)=>{const Vn=vt.charAt(Zn),qn=jn.advanceWidth*wn,zn=Zt.count;let Jn;if("isEmpty"in jn||(jn.isWhitespace=!!Vn&&new RegExp(st).test(Vn),jn.canBreakAfter=!!Vn&<.test(Vn),jn.isEmpty=jn.xMin===jn.xMax||jn.yMin===jn.yMax||at.test(Vn)),!jn.isWhitespace&&!jn.isEmpty&&_n++,Pn&&en&&!jn.isWhitespace&&On+qn+un>Et&&zn){if(Zt.glyphAt(zn-1).glyphObj.canBreakAfter)Jn=new yt,un=-On;else for(let pr=zn;pr--;)if(pr===0&&Ct==="break-word"){Jn=new yt,un=-On;break}else if(Zt.glyphAt(pr).glyphObj.canBreakAfter){Jn=Zt.splitAt(pr+1);const fr=Jn.glyphAt(0).x;un-=fr;for(let xr=Jn.count;xr--;)Jn.glyphAt(xr).x-=fr;break}Jn&&(Zt.isSoftWrapped=!0,Zt=Jn,Xt.push(Zt),Qt=Et)}let Hn=Zt.glyphAt(Zt.count);Hn.glyphObj=jn,Hn.x=On+un,Hn.width=qn,Hn.charIndex=Zn,Vn===` -`&&(Zt=new yt,Xt.push(Zt),un=-(On+qn+Tt*St)+jt)}),Xt.forEach(jn=>{for(let On=jn.count;On--;){let{glyphObj:Zn,x:Vn,width:qn}=jn.glyphAt(On);if(!Zn.isWhitespace){jn.width=Vn+qn,jn.width>Qt&&(Qt=jn.width);return}}});let Sn=0,Rn=0;if(wt&&(typeof wt=="number"?Sn=-wt:typeof wt=="string"&&(Sn=-Qt*(wt==="left"?0:wt==="center"?.5:wt==="right"?1:pt(wt)))),It){if(typeof It=="number")Rn=-It;else if(typeof It=="string"){let jn=Xt.length*At;Rn=It==="top"?0:It==="top-baseline"?-pn:It==="top-cap"?-pn-mn*wn:It==="top-ex"?-pn-In*wn:It==="middle"?jn/2:It==="bottom"?jn:It==="bottom-baseline"?jn-fn+Nn*wn:pt(It)*jn}}if(!Nt){const jn=et.getEmbeddingLevels(vt,$t);sn=new Uint16Array(_n),Kt=new Float32Array(_n*2),rn={},vn=[ot,ot,-ot,-ot],an=[];let On=pn;Ot&&(hn=new Float32Array(vt.length*3)),zt&&(nn=new Uint8Array(_n*3));let Zn=0,Vn=-1,qn=-1,zn,Jn;if(Xt.forEach((Hn,pr)=>{let{count:fr,width:xr}=Hn;if(fr>0){let io=0;for(let ao=fr;ao--&&Hn.glyphAt(ao).glyphObj.isWhitespace;)io++;let Tr=0,Ar=0;if(Dt==="center")Tr=(Qt-xr)/2;else if(Dt==="right")Tr=Qt-xr;else if(Dt==="justify"&&Hn.isSoftWrapped){let ao=0;for(let Yr=fr-io;Yr--;)Hn.glyphAt(Yr).glyphObj.isWhitespace&&ao++;Ar=(Qt-xr)/ao}if(Ar||Tr){let ao=0;for(let Yr=0;Yr=Yr){let dn=Mn,Jt=Mn;for(;JtDr)break;Jtjr=ao;for(let ao=0;ao1&&mt(hn,Vn,Jt),Vn=xn}if(zt){const{charIndex:xn}=Yr;for(;xn>qn;)qn++,zt.hasOwnProperty(qn)&&(Jn=zt[qn])}if(!jr.isWhitespace&&!jr.isEmpty){const xn=Zn++;rn[Dr]||(rn[Dr]={path:jr.path,pathBounds:[jr.xMin,jr.yMin,jr.xMax,jr.yMax]});const Mn=Yr.x+Sn,dn=On+Rn;Kt[xn*2]=Mn,Kt[xn*2+1]=dn;const Jt=Mn+jr.xMin*wn,En=dn+jr.yMin*wn,Ln=Mn+jr.xMax*wn,Un=dn+jr.yMax*wn;Jtvn[2]&&(vn[2]=Ln),Un>vn[3]&&(vn[3]=Un),xn%Wt===0&&(zn={start:xn,end:xn,rect:[ot,ot,-ot,-ot]},an.push(zn)),zn.end++;const Kn=zn.rect;if(JtKn[2]&&(Kn[2]=Ln),Un>Kn[3]&&(Kn[3]=Un),sn[xn]=Dr,zt){const nr=xn*3;nn[nr]=Jn>>16&255,nn[nr+1]=Jn>>8&255,nn[nr+2]=Jn&255}}}}On-=At}),hn){const Hn=vt.length-Vn;Hn>1&&mt(hn,Vn,Hn)}}Mt.typesetting=gt()-An,Ft({glyphIds:sn,glyphPositions:Kt,glyphData:rn,caretPositions:hn,caretHeight:kn,glyphColors:nn,chunkedBounds:an,fontSize:St,unitsPerEm:Tn,ascender:$n*wn,descender:Nn*wn,capHeight:mn*wn,xHeight:In*wn,lineHeight:At,topBaseline:pn,blockBounds:[Sn,Rn-Xt.length*At,Sn+Qt,Rn],visibleBounds:vn,timings:Mt})})}function dt(vt,xt){ht(vt,kt=>{const[St,Tt,At,Et]=kt.blockBounds;xt({width:At-St,height:Et-Tt})},{metricsOnly:!0})}function pt(vt){let xt=vt.match(/^([\d.]+)%$/),kt=xt?parseFloat(xt[1]):NaN;return isNaN(kt)?0:kt/100}function mt(vt,xt,kt){const St=vt[xt*3],Tt=vt[xt*3+1],At=vt[xt*3+2],Et=(Tt-St)/kt;for(let $t=0;$t(Object.defineProperty(vt,xt,{get(){return this.data[this.index*bt.length+kt]},set(Tt){this.data[this.index*bt.length+kt]=Tt}}),vt),{data:null,index:0}),{typeset:ht,measure:dt,loadFont:ut}}const now$3=()=>(self.performance||Date).now(),mainThreadGenerator=SDFGenerator();let warned;function generateSDF(tt,et,nt,rt,it,ot,at,st,lt,ct,ut=!0){return ut?generateSDF_GL(tt,et,nt,rt,it,ot,at,st,lt,ct).then(null,ht=>(warned||(console.warn("WebGL SDF generation failed, falling back to JS",ht),warned=!0),generateSDF_JS_Worker(tt,et,nt,rt,it,ot,at,st,lt,ct))):generateSDF_JS_Worker(tt,et,nt,rt,it,ot,at,st,lt,ct)}const queue=[],chunkTimeBudget=5;let timer=0;function nextChunk(){const tt=now$3();for(;queue.length&&now$3()-ttnew Promise((et,nt)=>{queue.push(()=>{const rt=now$3();try{mainThreadGenerator.webgl.generateIntoCanvas(...tt),et({timing:now$3()-rt})}catch(it){nt(it)}}),timer||(timer=setTimeout(nextChunk,0))}),threadCount=4,idleTimeout=2e3,threads={};let callNum=0;function generateSDF_JS_Worker(tt,et,nt,rt,it,ot,at,st,lt,ct){const ut="TroikaTextSDFGenerator_JS_"+callNum++%threadCount;let ht=threads[ut];return ht||(ht=threads[ut]={workerModule:defineWorkerModule({name:ut,workerId:ut,dependencies:[SDFGenerator,now$3],init(dt,pt){const mt=dt().javascript.generate;return function(...gt){const yt=pt();return{textureData:mt(...gt),timing:pt()-yt}}},getTransferables(dt){return[dt.textureData.buffer]}}),requests:0,idleTimer:null}),ht.requests++,clearTimeout(ht.idleTimer),ht.workerModule(tt,et,nt,rt,it,ot).then(({textureData:dt,timing:pt})=>{const mt=now$3(),gt=new Uint8Array(dt.length*4);for(let yt=0;yt{terminateWorker(ut)},idleTimeout)),{timing:pt}})}function warmUpSDFCanvas(tt){tt._warm||(mainThreadGenerator.webgl.isSupported(tt),tt._warm=!0)}const resizeWebGLCanvasWithoutClearing=mainThreadGenerator.webglUtils.resizeWebGLCanvasWithoutClearing;/*! -Custom build of Typr.ts (https://github.com/fredli74/Typr.ts) for use in Troika text rendering. -Original MIT license applies: https://github.com/fredli74/Typr.ts/blob/master/LICENSE -*/function typrFactory(){return typeof window>"u"&&(self.window=self),function(tt){var et={parse:function(it){var ot=et._bin,at=new Uint8Array(it);if(ot.readASCII(at,0,4)=="ttcf"){var st=4;ot.readUshort(at,st),st+=2,ot.readUshort(at,st),st+=2;var lt=ot.readUint(at,st);st+=4;for(var ct=[],ut=0;ut>>at&1&&ot++;return ot},et._lctf.readClassDef=function(it,ot){var at=et._bin,st=[],lt=at.readUshort(it,ot);if(ot+=2,lt==1){var ct=at.readUshort(it,ot);ot+=2;var ut=at.readUshort(it,ot);ot+=2;for(var ht=0;ht0&&(lt.featureParams=st+ct);var ut=at.readUshort(it,ot);ot+=2,lt.tab=[];for(var ht=0;ht255?-1:et.CFF.glyphByUnicode(it,et.CFF.tableSE[ot])},et.CFF.readEncoding=function(it,ot,at){et._bin;var st=[".notdef"],lt=it[ot];if(ot++,lt!=0)throw"error: unknown encoding format: "+lt;var ct=it[ot];ot++;for(var ut=0;ut>4,vt=15&yt;if(bt!=15&>.push(bt),vt!=15&>.push(vt),vt==15)break}for(var xt="",kt=[0,1,2,3,4,5,6,7,8,9,".","e","e-","reserved","-","endOfNumber"],St=0;St=ct.xMax||ct.yMin>=ct.yMax)return null;if(ct.noc>0){ct.endPts=[];for(var ut=0;ut=1&&ut.fmt<=2){dt=lt.readUshort(it,at),at+=2;var mt=lt.readUshort(it,at);at+=2,pt=et._lctf.numOfOnes(dt);var gt=et._lctf.numOfOnes(mt);if(ut.fmt==1){ut.pairsets=[];var yt=lt.readUshort(it,at);at+=2;for(var bt=0;bt=1&&ut.fmt<=2){if(ut.fmt==1)ut.delta=lt.readShort(it,at),at+=2;else if(ut.fmt==2){var dt=lt.readUshort(it,at);at+=2,ut.newg=lt.readUshorts(it,at,dt),at+=2*ut.newg.length}}else if(ot==4){ut.vals=[],dt=lt.readUshort(it,at),at+=2;for(var pt=0;pt>>8;if((mt&=15)!=0)throw"unknown kern table format: "+mt;ot=et.kern.readFormat0(it,ot,ht)}return ht},et.kern.parseV1=function(it,ot,at,st){var lt=et._bin;lt.readFixed(it,ot),ot+=4;var ct=lt.readUint(it,ot);ot+=4;for(var ut={glyph1:[],rval:[]},ht=0;ht>>8;if((pt&=15)!=0)throw"unknown kern table format: "+pt;ot=et.kern.readFormat0(it,ot,ut)}return ut},et.kern.readFormat0=function(it,ot,at){var st=et._bin,lt=-1,ct=st.readUshort(it,ot);ot+=2,st.readUshort(it,ot),ot+=2,st.readUshort(it,ot),ot+=2,st.readUshort(it,ot),ot+=2;for(var ut=0;ut=lt.map.length?0:lt.map[ot];if(lt.format==4){for(var ct=-1,ut=0;utot?0:65535&(lt.idRangeOffset[ct]!=0?lt.glyphIdArray[ot-lt.startCount[ct]+(lt.idRangeOffset[ct]>>1)-(lt.idRangeOffset.length-ct)]:ot+lt.idDelta[ct])}if(lt.format==12){if(ot>lt.groups[lt.groups.length-1][1])return 0;for(ut=0;ut-1?et.U._simpleGlyph(st,at):et.U._compoGlyph(st,ot,at))},et.U._simpleGlyph=function(it,ot){for(var at=0;atlt)){for(var yt=!0,bt=0,vt=0;vtlt)){for(yt=!0,vt=0;vt>1,ct.length=0,ht=!0;else if(Pt=="o3"||Pt=="o23")ct.length%2!=0&&!ht&&(dt=ct.shift()+st.nominalWidthX),ut+=ct.length>>1,ct.length=0,ht=!0;else if(Pt=="o4")ct.length>1&&!ht&&(dt=ct.shift()+st.nominalWidthX,ht=!0),pt&&et.U.P.closePath(lt),yt+=ct.pop(),et.U.P.moveTo(lt,gt,yt),pt=!0;else if(Pt=="o5")for(;ct.length>0;)gt+=ct.shift(),yt+=ct.shift(),et.U.P.lineTo(lt,gt,yt);else if(Pt=="o6"||Pt=="o7")for(var Ct=ct.length,wt=Pt=="o6",It=0;ItMath.abs(Et-yt)?gt=At+ct.shift():yt=Et+ct.shift(),et.U.P.curveTo(lt,bt,vt,xt,kt,$t,Dt),et.U.P.curveTo(lt,St,Tt,At,Et,gt,yt));else if(Pt=="o14"){if(ct.length>0&&!ht&&(dt=ct.shift()+at.nominalWidthX,ht=!0),ct.length==4){var zt=ct.shift(),Ft=ct.shift(),Nt=ct.shift(),Ut=ct.shift(),Mt=et.CFF.glyphBySE(at,Nt),Ht=et.CFF.glyphBySE(at,Ut);et.U._drawCFF(at.CharStrings[Mt],ot,at,st,lt),ot.x=zt,ot.y=Ft,et.U._drawCFF(at.CharStrings[Ht],ot,at,st,lt)}pt&&(et.U.P.closePath(lt),pt=!1)}else if(Pt=="o19"||Pt=="o20")ct.length%2!=0&&!ht&&(dt=ct.shift()+st.nominalWidthX),ut+=ct.length>>1,ct.length=0,ht=!0,mt+=ut+7>>3;else if(Pt=="o21")ct.length>2&&!ht&&(dt=ct.shift()+st.nominalWidthX,ht=!0),yt+=ct.pop(),gt+=ct.pop(),pt&&et.U.P.closePath(lt),et.U.P.moveTo(lt,gt,yt),pt=!0;else if(Pt=="o22")ct.length>1&&!ht&&(dt=ct.shift()+st.nominalWidthX,ht=!0),gt+=ct.pop(),pt&&et.U.P.closePath(lt),et.U.P.moveTo(lt,gt,yt),pt=!0;else if(Pt=="o25"){for(;ct.length>6;)gt+=ct.shift(),yt+=ct.shift(),et.U.P.lineTo(lt,gt,yt);bt=gt+ct.shift(),vt=yt+ct.shift(),xt=bt+ct.shift(),kt=vt+ct.shift(),gt=xt+ct.shift(),yt=kt+ct.shift(),et.U.P.curveTo(lt,bt,vt,xt,kt,gt,yt)}else if(Pt=="o26")for(ct.length%2&&(gt+=ct.shift());ct.length>0;)bt=gt,vt=yt+ct.shift(),gt=xt=bt+ct.shift(),yt=(kt=vt+ct.shift())+ct.shift(),et.U.P.curveTo(lt,bt,vt,xt,kt,gt,yt);else if(Pt=="o27")for(ct.length%2&&(yt+=ct.shift());ct.length>0;)vt=yt,xt=(bt=gt+ct.shift())+ct.shift(),kt=vt+ct.shift(),gt=xt+ct.shift(),yt=kt,et.U.P.curveTo(lt,bt,vt,xt,kt,gt,yt);else if(Pt=="o10"||Pt=="o29"){var en=Pt=="o10"?st:at;if(ct.length==0)console.debug("error: empty stack");else{var sn=ct.pop(),Kt=en.Subrs[sn+en.Bias];ot.x=gt,ot.y=yt,ot.nStems=ut,ot.haveWidth=ht,ot.width=dt,ot.open=pt,et.U._drawCFF(Kt,ot,at,st,lt),gt=ot.x,yt=ot.y,ut=ot.nStems,ht=ot.haveWidth,dt=ot.width,pt=ot.open}}else if(Pt=="o30"||Pt=="o31"){var rn=ct.length,nn=(Wt=0,Pt=="o31");for(Wt+=rn-(Ct=-3&rn);Wt> 1), + (ct.length = 0), + (ht = !0) + else if (Pt == 'o3' || Pt == 'o23') + ct.length % 2 != 0 && !ht && (dt = ct.shift() + st.nominalWidthX), + (ut += ct.length >> 1), + (ct.length = 0), + (ht = !0) + else if (Pt == 'o4') + ct.length > 1 && !ht && ((dt = ct.shift() + st.nominalWidthX), (ht = !0)), + pt && et.U.P.closePath(lt), + (yt += ct.pop()), + et.U.P.moveTo(lt, gt, yt), + (pt = !0) + else if (Pt == 'o5') + for (; ct.length > 0; ) (gt += ct.shift()), (yt += ct.shift()), et.U.P.lineTo(lt, gt, yt) + else if (Pt == 'o6' || Pt == 'o7') + for (var Ct = ct.length, wt = Pt == 'o6', It = 0; It < Ct; It++) { + var Ot = ct.shift() + wt ? (gt += Ot) : (yt += Ot), (wt = !wt), et.U.P.lineTo(lt, gt, yt) + } + else if (Pt == 'o8' || Pt == 'o24') { + Ct = ct.length + for (var Wt = 0; Wt + 6 <= Ct; ) + (bt = gt + ct.shift()), + (vt = yt + ct.shift()), + (xt = bt + ct.shift()), + (kt = vt + ct.shift()), + (gt = xt + ct.shift()), + (yt = kt + ct.shift()), + et.U.P.curveTo(lt, bt, vt, xt, kt, gt, yt), + (Wt += 6) + Pt == 'o24' && ((gt += ct.shift()), (yt += ct.shift()), et.U.P.lineTo(lt, gt, yt)) + } else { + if (Pt == 'o11') break + if (Pt == 'o1234' || Pt == 'o1235' || Pt == 'o1236' || Pt == 'o1237') + Pt == 'o1234' && + ((vt = yt), + (xt = (bt = gt + ct.shift()) + ct.shift()), + (Dt = kt = vt + ct.shift()), + (Tt = kt), + (Et = yt), + (gt = (At = (St = ($t = xt + ct.shift()) + ct.shift()) + ct.shift()) + ct.shift()), + et.U.P.curveTo(lt, bt, vt, xt, kt, $t, Dt), + et.U.P.curveTo(lt, St, Tt, At, Et, gt, yt)), + Pt == 'o1235' && + ((bt = gt + ct.shift()), + (vt = yt + ct.shift()), + (xt = bt + ct.shift()), + (kt = vt + ct.shift()), + ($t = xt + ct.shift()), + (Dt = kt + ct.shift()), + (St = $t + ct.shift()), + (Tt = Dt + ct.shift()), + (At = St + ct.shift()), + (Et = Tt + ct.shift()), + (gt = At + ct.shift()), + (yt = Et + ct.shift()), + ct.shift(), + et.U.P.curveTo(lt, bt, vt, xt, kt, $t, Dt), + et.U.P.curveTo(lt, St, Tt, At, Et, gt, yt)), + Pt == 'o1236' && + ((bt = gt + ct.shift()), + (vt = yt + ct.shift()), + (xt = bt + ct.shift()), + (Dt = kt = vt + ct.shift()), + (Tt = kt), + (At = (St = ($t = xt + ct.shift()) + ct.shift()) + ct.shift()), + (Et = Tt + ct.shift()), + (gt = At + ct.shift()), + et.U.P.curveTo(lt, bt, vt, xt, kt, $t, Dt), + et.U.P.curveTo(lt, St, Tt, At, Et, gt, yt)), + Pt == 'o1237' && + ((bt = gt + ct.shift()), + (vt = yt + ct.shift()), + (xt = bt + ct.shift()), + (kt = vt + ct.shift()), + ($t = xt + ct.shift()), + (Dt = kt + ct.shift()), + (St = $t + ct.shift()), + (Tt = Dt + ct.shift()), + (At = St + ct.shift()), + (Et = Tt + ct.shift()), + Math.abs(At - gt) > Math.abs(Et - yt) ? (gt = At + ct.shift()) : (yt = Et + ct.shift()), + et.U.P.curveTo(lt, bt, vt, xt, kt, $t, Dt), + et.U.P.curveTo(lt, St, Tt, At, Et, gt, yt)) + else if (Pt == 'o14') { + if ((ct.length > 0 && !ht && ((dt = ct.shift() + at.nominalWidthX), (ht = !0)), ct.length == 4)) { + var zt = ct.shift(), + Ft = ct.shift(), + Nt = ct.shift(), + Ut = ct.shift(), + Mt = et.CFF.glyphBySE(at, Nt), + Ht = et.CFF.glyphBySE(at, Ut) + et.U._drawCFF(at.CharStrings[Mt], ot, at, st, lt), + (ot.x = zt), + (ot.y = Ft), + et.U._drawCFF(at.CharStrings[Ht], ot, at, st, lt) + } + pt && (et.U.P.closePath(lt), (pt = !1)) + } else if (Pt == 'o19' || Pt == 'o20') + ct.length % 2 != 0 && !ht && (dt = ct.shift() + st.nominalWidthX), + (ut += ct.length >> 1), + (ct.length = 0), + (ht = !0), + (mt += (ut + 7) >> 3) + else if (Pt == 'o21') + ct.length > 2 && !ht && ((dt = ct.shift() + st.nominalWidthX), (ht = !0)), + (yt += ct.pop()), + (gt += ct.pop()), + pt && et.U.P.closePath(lt), + et.U.P.moveTo(lt, gt, yt), + (pt = !0) + else if (Pt == 'o22') + ct.length > 1 && !ht && ((dt = ct.shift() + st.nominalWidthX), (ht = !0)), + (gt += ct.pop()), + pt && et.U.P.closePath(lt), + et.U.P.moveTo(lt, gt, yt), + (pt = !0) + else if (Pt == 'o25') { + for (; ct.length > 6; ) (gt += ct.shift()), (yt += ct.shift()), et.U.P.lineTo(lt, gt, yt) + ;(bt = gt + ct.shift()), + (vt = yt + ct.shift()), + (xt = bt + ct.shift()), + (kt = vt + ct.shift()), + (gt = xt + ct.shift()), + (yt = kt + ct.shift()), + et.U.P.curveTo(lt, bt, vt, xt, kt, gt, yt) + } else if (Pt == 'o26') + for (ct.length % 2 && (gt += ct.shift()); ct.length > 0; ) + (bt = gt), + (vt = yt + ct.shift()), + (gt = xt = bt + ct.shift()), + (yt = (kt = vt + ct.shift()) + ct.shift()), + et.U.P.curveTo(lt, bt, vt, xt, kt, gt, yt) + else if (Pt == 'o27') + for (ct.length % 2 && (yt += ct.shift()); ct.length > 0; ) + (vt = yt), + (xt = (bt = gt + ct.shift()) + ct.shift()), + (kt = vt + ct.shift()), + (gt = xt + ct.shift()), + (yt = kt), + et.U.P.curveTo(lt, bt, vt, xt, kt, gt, yt) + else if (Pt == 'o10' || Pt == 'o29') { + var en = Pt == 'o10' ? st : at + if (ct.length == 0) console.debug('error: empty stack') + else { + var sn = ct.pop(), + Kt = en.Subrs[sn + en.Bias] + ;(ot.x = gt), + (ot.y = yt), + (ot.nStems = ut), + (ot.haveWidth = ht), + (ot.width = dt), + (ot.open = pt), + et.U._drawCFF(Kt, ot, at, st, lt), + (gt = ot.x), + (yt = ot.y), + (ut = ot.nStems), + (ht = ot.haveWidth), + (dt = ot.width), + (pt = ot.open) + } + } else if (Pt == 'o30' || Pt == 'o31') { + var rn = ct.length, + nn = ((Wt = 0), Pt == 'o31') + for (Wt += rn - (Ct = -3 & rn); Wt < Ct; ) + nn + ? ((vt = yt), + (xt = (bt = gt + ct.shift()) + ct.shift()), + (yt = (kt = vt + ct.shift()) + ct.shift()), + Ct - Wt == 5 ? ((gt = xt + ct.shift()), Wt++) : (gt = xt), + (nn = !1)) + : ((bt = gt), + (vt = yt + ct.shift()), + (xt = bt + ct.shift()), + (kt = vt + ct.shift()), + (gt = xt + ct.shift()), + Ct - Wt == 5 ? ((yt = kt + ct.shift()), Wt++) : (yt = kt), + (nn = !0)), + et.U.P.curveTo(lt, bt, vt, xt, kt, gt, yt), + (Wt += 4) + } else { + if ((Pt + '').charAt(0) == 'o') throw (console.debug('Unknown operation: ' + Pt, it), Pt) + ct.push(Pt) + } + } + } + ;(ot.x = gt), (ot.y = yt), (ot.nStems = ut), (ot.haveWidth = ht), (ot.width = dt), (ot.open = pt) + }) + var nt = et, + rt = { Typr: nt } + return (tt.Typr = nt), (tt.default = rt), Object.defineProperty(tt, '__esModule', { value: !0 }), tt + })({}).Typr + ) + } + /*! Custom bundle of woff2otf (https://github.com/arty-name/woff2otf) with fflate (https://github.com/101arrowz/fflate) for use in Troika text rendering. Original licenses apply: - fflate: https://github.com/101arrowz/fflate/blob/master/LICENSE (MIT) - woff2otf.js: https://github.com/arty-name/woff2otf/blob/master/woff2otf.js (Apache2) -*/function woff2otfFactory(){return function(tt){var et=Uint8Array,nt=Uint16Array,rt=Uint32Array,it=new et([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),ot=new et([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),at=new et([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),st=function(Pt,Ct){for(var wt=new nt(31),It=0;It<31;++It)wt[It]=Ct+=1<>>1|(21845&pt)<<1;mt=(61680&(mt=(52428&mt)>>>2|(13107&mt)<<2))>>>4|(3855&mt)<<4,dt[pt]=((65280&mt)>>>8|(255&mt)<<8)>>>1}var gt=function(Pt,Ct,wt){for(var It=Pt.length,Ot=0,Wt=new nt(Ct);Ot>>Nt]=Ut}else for(zt=new nt(It),Ot=0;Ot>>15-Pt[Ot]);return zt},yt=new et(288);for(pt=0;pt<144;++pt)yt[pt]=8;for(pt=144;pt<256;++pt)yt[pt]=9;for(pt=256;pt<280;++pt)yt[pt]=7;for(pt=280;pt<288;++pt)yt[pt]=8;var bt=new et(32);for(pt=0;pt<32;++pt)bt[pt]=5;var vt=gt(yt,9,1),xt=gt(bt,5,1),kt=function(Pt){for(var Ct=Pt[0],wt=1;wtCt&&(Ct=Pt[wt]);return Ct},St=function(Pt,Ct,wt){var It=Ct/8|0;return(Pt[It]|Pt[It+1]<<8)>>(7&Ct)&wt},Tt=function(Pt,Ct){var wt=Ct/8|0;return(Pt[wt]|Pt[wt+1]<<8|Pt[wt+2]<<16)>>(7&Ct)},At=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],Et=function(Pt,Ct,wt){var It=new Error(Ct||At[Pt]);if(It.code=Pt,Error.captureStackTrace&&Error.captureStackTrace(It,Et),!wt)throw It;return It},$t=function(Pt,Ct,wt){var It=Pt.length;if(!It||wt&&!wt.l&&It<5)return Ct||new et(0);var Ot=!Ct||wt,Wt=!wt||wt.i;wt||(wt={}),Ct||(Ct=new et(3*It));var zt,Ft=function(Vn){var qn=Ct.length;if(Vn>qn){var zn=new et(Math.max(2*qn,Vn));zn.set(Ct),Ct=zn}},Nt=wt.f||0,Ut=wt.p||0,Mt=wt.b||0,Ht=wt.l,en=wt.d,sn=wt.m,Kt=wt.n,rn=8*It;do{if(!Ht){wt.f=Nt=St(Pt,Ut,1);var nn=St(Pt,Ut+1,3);if(Ut+=3,!nn){var hn=Pt[(In=((zt=Ut)/8|0)+(7&zt&&1)+4)-4]|Pt[In-3]<<8,vn=In+hn;if(vn>It){Wt&&Et(0);break}Ot&&Ft(Mt+hn),Ct.set(Pt.subarray(In,vn),Mt),wt.b=Mt+=hn,wt.p=Ut=8*vn;continue}if(nn==1)Ht=vt,en=xt,sn=9,Kt=5;else if(nn==2){var an=St(Pt,Ut,31)+257,Qt=St(Pt,Ut+10,15)+4,_n=an+St(Pt,Ut+5,31)+1;Ut+=14;for(var Pn=new et(_n),$n=new et(19),Nn=0;Nn>>4)<16)Pn[Nn++]=In;else{var wn=0,fn=0;for(In==16?(fn=3+St(Pt,Ut,3),Ut+=2,wn=Pn[Nn-1]):In==17?(fn=3+St(Pt,Ut,7),Ut+=3):In==18&&(fn=11+St(Pt,Ut,127),Ut+=7);fn--;)Pn[Nn++]=wn}}var pn=Pn.subarray(0,an),kn=Pn.subarray(an);sn=kt(pn),Kt=kt(kn),Ht=gt(pn,sn,1),en=gt(kn,Kt,1)}else Et(1);if(Ut>rn){Wt&&Et(0);break}}Ot&&Ft(Mt+131072);for(var Dn=(1<>>4;if((Ut+=15&wn)>rn){Wt&&Et(0);break}if(wn||Et(2),Xt<256)Ct[Mt++]=Xt;else{if(Xt==256){Zt=Ut,Ht=null;break}var Sn=Xt-254;if(Xt>264){var Rn=it[Nn=Xt-257];Sn=St(Pt,Ut,(1<>>4;if(jn||Et(3),Ut+=15&jn,kn=ht[On],On>3&&(Rn=ot[On],kn+=Tt(Pt,Ut)&(1<rn){Wt&&Et(0);break}Ot&&Ft(Mt+131072);for(var Zn=Mt+Sn;MtVn.length)&&(zn=Vn.length);var Jn=new(Vn instanceof nt?nt:Vn instanceof rt?rt:et)(zn-qn);return Jn.set(Vn.subarray(qn,zn)),Jn}(Ct,0,Mt)},Dt=new et(0),jt=typeof TextDecoder<"u"&&new TextDecoder;try{jt.decode(Dt,{stream:!0})}catch{}return tt.convert_streams=function(Pt){var Ct=new DataView(Pt),wt=0;function It(){var an=Ct.getUint16(wt);return wt+=2,an}function Ot(){var an=Ct.getUint32(wt);return wt+=4,an}function Wt(an){hn.setUint16(vn,an),vn+=2}function zt(an){hn.setUint32(vn,an),vn+=4}for(var Ft={signature:Ot(),flavor:Ot(),length:Ot(),numTables:It(),reserved:It(),totalSfntSize:Ot(),majorVersion:It(),minorVersion:It(),metaOffset:Ot(),metaLength:Ot(),metaOrigLength:Ot(),privOffset:Ot(),privLength:Ot()},Nt=0;Math.pow(2,Nt)<=Ft.numTables;)Nt++;Nt--;for(var Ut=16*Math.pow(2,Nt),Mt=16*Ft.numTables-Ut,Ht=12,en=[],sn=0;sn{let[Dt,jt]=$t.split("+");Dt=parseInt(Dt,36),jt=jt?parseInt(jt,36):0,ut.set(Et+=Dt,Tt[At]);for(let Pt=jt;Pt--;)ut.set(++Et,Tt[At])})}}return ut.get(St)||ct}const dt=1,pt=2,mt=3,gt=4,yt=[null,"isol","init","fina","medi"];function bt(St){const Tt=new Uint8Array(St.length);let At=ct,Et=dt,$t=-1;for(let Dt=0;Dt65535&&Dt++)}return Tt}function vt(St,Tt){const At=[];for(let $t=0;$t65535&&$t++,At.push(tt.U.codeToGlyph(St,Dt))}const Et=St.GSUB;if(Et){const{lookupList:$t,featureList:Dt}=Et;let jt;const Pt=/^(rlig|liga|mset|isol|init|fina|medi|half|pres|blws)$/,Ct=[];Dt.forEach(wt=>{if(Pt.test(wt.tag))for(let It=0;It{if(Ut!==-1){let Ht=Tt[Ut];if(!Ht){const{cmds:en,crds:sn}=tt.U.glyphToPath(St,Ut);let Kt="",rn=0;for(let Qt=0,_n=en.length;Qt<_n;Qt++){const Pn=nt[en[Qt]];Kt+=en[Qt];for(let $n=1;$n<=Pn;$n++)Kt+=($n>1?",":"")+sn[rn++]}let nn,hn,vn,an;if(sn.length){nn=hn=1/0,vn=an=-1/0;for(let Qt=0,_n=sn.length;Qt<_n;Qt+=2){let Pn=sn[Qt],$n=sn[Qt+1];Pnvn&&(vn=Pn),$n>an&&(an=$n)}}else nn=vn=hn=an=0;Ht=Tt[Ut]={index:Ut,advanceWidth:St.hmtx.aWidth[Ut],xMin:nn,yMin:hn,xMax:vn,yMax:an,path:Kt,pathCommandCount:en.length}}Nt!==-1&&(Ot+=tt.U.getPairAdjustment(St,Nt,Ut)*Wt),It.call(null,Ht,Ot,Ft),Ht.advanceWidth&&(Ot+=Ht.advanceWidth*Wt),wt&&(Ot+=wt*Ct),Nt=Ut}Ft+=Pt.codePointAt(Ft)>65535?2:1}),Ot}};return jt}return function(Tt){const At=new Uint8Array(Tt,0,4),Et=tt._bin.readASCII(At,0,4);if(Et==="wOFF")Tt=et(Tt);else if(Et==="wOF2")throw new Error("woff2 fonts not supported");return kt(tt.parse(Tt)[0])}}const workerModule=defineWorkerModule({name:"Typr Font Parser",dependencies:[typrFactory,woff2otfFactory,parserFactory],init(tt,et,nt){const rt=tt(),it=et();return nt(rt,it)}}),CONFIG={defaultFontURL:"https://fonts.gstatic.com/s/roboto/v18/KFOmCnqEu92Fr1Mu4mxM.woff",sdfGlyphSize:64,sdfMargin:1/16,sdfExponent:9,textureWidth:2048},tempColor=new Color$1;function now$1$1(){return(self.performance||Date).now()}const atlases=Object.create(null);function getTextRenderInfo(tt,et){tt=assign$1({},tt);const nt=now$1$1();if(tt.font=toAbsoluteURL(tt.font||CONFIG.defaultFontURL),tt.text=""+tt.text,tt.sdfGlyphSize=tt.sdfGlyphSize||CONFIG.sdfGlyphSize,tt.colorRanges!=null){let ht={};for(let dt in tt.colorRanges)if(tt.colorRanges.hasOwnProperty(dt)){let pt=tt.colorRanges[dt];typeof pt!="number"&&(pt=tempColor.set(pt).getHex()),ht[dt]=pt}tt.colorRanges=ht}Object.freeze(tt);const{textureWidth:rt,sdfExponent:it}=CONFIG,{sdfGlyphSize:ot}=tt,at=rt/ot*4;let st=atlases[ot];if(!st){const ht=document.createElement("canvas");ht.width=rt,ht.height=ot*256/at,st=atlases[ot]={glyphCount:0,sdfGlyphSize:ot,sdfCanvas:ht,sdfTexture:new Texture(ht,void 0,void 0,void 0,LinearFilter,LinearFilter),contextLost:!1,glyphsByFont:new Map},st.sdfTexture.generateMipmaps=!1,initContextLossHandling(st)}const{sdfTexture:lt,sdfCanvas:ct}=st;let ut=st.glyphsByFont.get(tt.font);ut||st.glyphsByFont.set(tt.font,ut=new Map),typesetInWorker(tt).then(ht=>{const{glyphIds:dt,glyphPositions:pt,fontSize:mt,unitsPerEm:gt,timings:yt}=ht,bt=[],vt=new Float32Array(dt.length*4),xt=mt/gt;let kt=0,St=0;const Tt=now$1$1();dt.forEach((jt,Pt)=>{let Ct=ut.get(jt);if(!Ct){const{path:Wt,pathBounds:zt}=ht.glyphData[jt],Ft=Math.max(zt[2]-zt[0],zt[3]-zt[1])/ot*(CONFIG.sdfMargin*ot+.5),Nt=st.glyphCount++,Ut=[zt[0]-Ft,zt[1]-Ft,zt[2]+Ft,zt[3]+Ft];ut.set(jt,Ct={path:Wt,atlasIndex:Nt,sdfViewBox:Ut}),bt.push(Ct)}const{sdfViewBox:wt}=Ct,It=pt[St++],Ot=pt[St++];vt[kt++]=It+wt[0]*xt,vt[kt++]=Ot+wt[1]*xt,vt[kt++]=It+wt[2]*xt,vt[kt++]=Ot+wt[3]*xt,dt[Pt]=Ct.atlasIndex}),yt.quads=(yt.quads||0)+(now$1$1()-Tt);const At=now$1$1();yt.sdf={};const Et=ct.height,$t=Math.ceil(st.glyphCount/at),Dt=Math.pow(2,Math.ceil(Math.log2($t*ot)));Dt>Et&&(console.info(`Increasing SDF texture size ${Et}->${Dt}`),resizeWebGLCanvasWithoutClearing(ct,rt,Dt),lt.dispose()),Promise.all(bt.map(jt=>generateGlyphSDF(jt,st,tt.gpuAccelerateSDF).then(({timing:Pt})=>{yt.sdf[jt.atlasIndex]=Pt}))).then(()=>{bt.length&&!st.contextLost&&(safariPre15Workaround(st),lt.needsUpdate=!0),yt.sdfTotal=now$1$1()-At,yt.total=now$1$1()-nt,et(Object.freeze({parameters:tt,sdfTexture:lt,sdfGlyphSize:ot,sdfExponent:it,glyphBounds:vt,glyphAtlasIndices:dt,glyphColors:ht.glyphColors,caretPositions:ht.caretPositions,caretHeight:ht.caretHeight,chunkedBounds:ht.chunkedBounds,ascender:ht.ascender,descender:ht.descender,lineHeight:ht.lineHeight,capHeight:ht.capHeight,xHeight:ht.xHeight,topBaseline:ht.topBaseline,blockBounds:ht.blockBounds,visibleBounds:ht.visibleBounds,timings:ht.timings}))})}),Promise.resolve().then(()=>{st.contextLost||warmUpSDFCanvas(ct)})}function generateGlyphSDF({path:tt,atlasIndex:et,sdfViewBox:nt},{sdfGlyphSize:rt,sdfCanvas:it,contextLost:ot},at){if(ot)return Promise.resolve({timing:-1});const{textureWidth:st,sdfExponent:lt}=CONFIG,ct=Math.max(nt[2]-nt[0],nt[3]-nt[1]),ut=Math.floor(et/4),ht=ut%(st/rt)*rt,dt=Math.floor(ut/(st/rt))*rt,pt=et%4;return generateSDF(rt,rt,tt,nt,ct,lt,it,ht,dt,pt,at)}function initContextLossHandling(tt){const et=tt.sdfCanvas;et.addEventListener("webglcontextlost",nt=>{console.log("Context Lost",nt),nt.preventDefault(),tt.contextLost=!0}),et.addEventListener("webglcontextrestored",nt=>{console.log("Context Restored",nt),tt.contextLost=!1;const rt=[];tt.glyphsByFont.forEach(it=>{it.forEach(ot=>{rt.push(generateGlyphSDF(ot,tt,!0))})}),Promise.all(rt).then(()=>{safariPre15Workaround(tt),tt.sdfTexture.needsUpdate=!0})})}function preloadFont({font:tt,characters:et,sdfGlyphSize:nt},rt){let it=Array.isArray(et)?et.join(` -`):""+et;getTextRenderInfo({font:tt,sdfGlyphSize:nt,text:it},rt)}function assign$1(tt,et){for(let nt in et)et.hasOwnProperty(nt)&&(tt[nt]=et[nt]);return tt}let linkEl;function toAbsoluteURL(tt){return linkEl||(linkEl=typeof document>"u"?{}:document.createElement("a")),linkEl.href=tt,linkEl.href}function safariPre15Workaround(tt){if(typeof createImageBitmap!="function"){console.info("Safari<15: applying SDF canvas workaround");const{sdfCanvas:et,sdfTexture:nt}=tt,{width:rt,height:it}=et,ot=tt.sdfCanvas.getContext("webgl");let at=nt.image.data;(!at||at.length!==rt*it*4)&&(at=new Uint8Array(rt*it*4),nt.image={width:rt,height:it,data:at},nt.flipY=!1,nt.isDataTexture=!0),ot.readPixels(0,0,rt,it,ot.RGBA,ot.UNSIGNED_BYTE,at)}}const typesetterWorkerModule=defineWorkerModule({name:"Typesetter",dependencies:[CONFIG,workerModule,createTypesetter,bidiFactory],init(tt,et,nt,rt){const{defaultFontURL:it}=tt;return nt(et,rt(),{defaultFontURL:it})}}),typesetInWorker=defineWorkerModule({name:"Typesetter",dependencies:[typesetterWorkerModule],init(tt){return function(et){return new Promise(nt=>{tt.typeset(et,nt)})}},getTransferables(tt){const et=[tt.glyphPositions.buffer,tt.glyphIds.buffer];return tt.caretPositions&&et.push(tt.caretPositions.buffer),tt.glyphColors&&et.push(tt.glyphColors.buffer),et}}),templateGeometries={};function getTemplateGeometry(tt){let et=templateGeometries[tt];if(!et){const nt=new PlaneGeometry(1,1,tt,tt),rt=nt.clone(),it=nt.attributes,ot=rt.attributes,at=new BufferGeometry,st=it.uv.count;for(let lt=0;lt{at.setAttribute(lt,new Float32BufferAttribute([...it[lt].array,...ot[lt].array],it[lt].itemSize))}),at.setIndex([...nt.index.array,...rt.index.array.map(lt=>lt+st)]),at.translate(.5,.5,0),et=templateGeometries[tt]=at}return et}const glyphBoundsAttrName="aTroikaGlyphBounds",glyphIndexAttrName="aTroikaGlyphIndex",glyphColorAttrName="aTroikaGlyphColor";class GlyphsGeometry extends InstancedBufferGeometry{constructor(){super(),this.detail=1,this.curveRadius=0,this.groups=[{start:0,count:1/0,materialIndex:0},{start:0,count:1/0,materialIndex:1}],this.boundingSphere=new Sphere,this.boundingBox=new Box3}computeBoundingSphere(){}computeBoundingBox(){}setSide(et){const nt=this.getIndex().count;this.setDrawRange(et===BackSide?nt/2:0,et===DoubleSide?nt:nt/2)}set detail(et){if(et!==this._detail){this._detail=et,(typeof et!="number"||et<1)&&(et=1);let nt=getTemplateGeometry(et);["position","normal","uv"].forEach(rt=>{this.attributes[rt]=nt.attributes[rt].clone()}),this.setIndex(nt.getIndex().clone())}}get detail(){return this._detail}set curveRadius(et){et!==this._curveRadius&&(this._curveRadius=et,this._updateBounds())}get curveRadius(){return this._curveRadius}updateGlyphs(et,nt,rt,it,ot){updateBufferAttr(this,glyphBoundsAttrName,et,4),updateBufferAttr(this,glyphIndexAttrName,nt,1),updateBufferAttr(this,glyphColorAttrName,ot,3),this._blockBounds=rt,this._chunkedBounds=it,this.instanceCount=nt.length,this._updateBounds()}_updateBounds(){const et=this._blockBounds;if(et){const{curveRadius:nt,boundingBox:rt}=this;if(nt){const{PI:it,floor:ot,min:at,max:st,sin:lt,cos:ct}=Math,ut=it/2,ht=it*2,dt=Math.abs(nt),pt=et[0]/dt,mt=et[2]/dt,gt=ot((pt+ut)/ht)!==ot((mt+ut)/ht)?-dt:at(lt(pt)*dt,lt(mt)*dt),yt=ot((pt-ut)/ht)!==ot((mt-ut)/ht)?dt:st(lt(pt)*dt,lt(mt)*dt),bt=ot((pt+it)/ht)!==ot((mt+it)/ht)?dt*2:st(dt-ct(pt)*dt,dt-ct(mt)*dt);rt.min.set(gt,et[1],nt<0?-bt:0),rt.max.set(yt,et[3],nt<0?0:bt)}else rt.min.set(et[0],et[1],0),rt.max.set(et[2],et[3],0);rt.getBoundingSphere(this.boundingSphere)}}applyClipRect(et){let nt=this.getAttribute(glyphIndexAttrName).count,rt=this._chunkedBounds;if(rt)for(let it=rt.length;it--;){nt=rt[it].end;let ot=rt[it].rect;if(ot[1]et.y&&ot[0]et.x)break}this.instanceCount=nt}}function updateBufferAttr(tt,et,nt,rt){const it=tt.getAttribute(et);nt?it&&it.array.length===nt.length?(it.array.set(nt),it.needsUpdate=!0):(tt.setAttribute(et,new InstancedBufferAttribute(nt,rt)),delete tt._maxInstanceCount,tt.dispose()):it&&tt.deleteAttribute(et)}const VERTEX_DEFS=` +*/ function woff2otfFactory() { + return (function (tt) { + var et = Uint8Array, + nt = Uint16Array, + rt = Uint32Array, + it = new et([0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0, 0, 0, 0]), + ot = new et([ + 0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, 0, 0, + ]), + at = new et([16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15]), + st = function (Pt, Ct) { + for (var wt = new nt(31), It = 0; It < 31; ++It) wt[It] = Ct += 1 << Pt[It - 1] + var Ot = new rt(wt[30]) + for (It = 1; It < 30; ++It) for (var Wt = wt[It]; Wt < wt[It + 1]; ++Wt) Ot[Wt] = ((Wt - wt[It]) << 5) | It + return [wt, Ot] + }, + lt = st(it, 2), + ct = lt[0], + ut = lt[1] + ;(ct[28] = 258), (ut[258] = 28) + for (var ht = st(ot, 0)[0], dt = new nt(32768), pt = 0; pt < 32768; ++pt) { + var mt = ((43690 & pt) >>> 1) | ((21845 & pt) << 1) + ;(mt = ((61680 & (mt = ((52428 & mt) >>> 2) | ((13107 & mt) << 2))) >>> 4) | ((3855 & mt) << 4)), + (dt[pt] = (((65280 & mt) >>> 8) | ((255 & mt) << 8)) >>> 1) + } + var gt = function (Pt, Ct, wt) { + for (var It = Pt.length, Ot = 0, Wt = new nt(Ct); Ot < It; ++Ot) ++Wt[Pt[Ot] - 1] + var zt, + Ft = new nt(Ct) + for (Ot = 0; Ot < Ct; ++Ot) Ft[Ot] = (Ft[Ot - 1] + Wt[Ot - 1]) << 1 + if (wt) { + zt = new nt(1 << Ct) + var Nt = 15 - Ct + for (Ot = 0; Ot < It; ++Ot) + if (Pt[Ot]) + for ( + var Ut = (Ot << 4) | Pt[Ot], Mt = Ct - Pt[Ot], Ht = Ft[Pt[Ot] - 1]++ << Mt, en = Ht | ((1 << Mt) - 1); + Ht <= en; + ++Ht + ) + zt[dt[Ht] >>> Nt] = Ut + } else + for (zt = new nt(It), Ot = 0; Ot < It; ++Ot) Pt[Ot] && (zt[Ot] = dt[Ft[Pt[Ot] - 1]++] >>> (15 - Pt[Ot])) + return zt + }, + yt = new et(288) + for (pt = 0; pt < 144; ++pt) yt[pt] = 8 + for (pt = 144; pt < 256; ++pt) yt[pt] = 9 + for (pt = 256; pt < 280; ++pt) yt[pt] = 7 + for (pt = 280; pt < 288; ++pt) yt[pt] = 8 + var bt = new et(32) + for (pt = 0; pt < 32; ++pt) bt[pt] = 5 + var vt = gt(yt, 9, 1), + xt = gt(bt, 5, 1), + kt = function (Pt) { + for (var Ct = Pt[0], wt = 1; wt < Pt.length; ++wt) Pt[wt] > Ct && (Ct = Pt[wt]) + return Ct + }, + St = function (Pt, Ct, wt) { + var It = (Ct / 8) | 0 + return ((Pt[It] | (Pt[It + 1] << 8)) >> (7 & Ct)) & wt + }, + Tt = function (Pt, Ct) { + var wt = (Ct / 8) | 0 + return (Pt[wt] | (Pt[wt + 1] << 8) | (Pt[wt + 2] << 16)) >> (7 & Ct) + }, + At = [ + 'unexpected EOF', + 'invalid block type', + 'invalid length/literal', + 'invalid distance', + 'stream finished', + 'no stream handler', + , + 'no callback', + 'invalid UTF-8 data', + 'extra field too long', + 'date not in range 1980-2099', + 'filename too long', + 'stream finishing', + 'invalid zip data', + ], + Et = function (Pt, Ct, wt) { + var It = new Error(Ct || At[Pt]) + if (((It.code = Pt), Error.captureStackTrace && Error.captureStackTrace(It, Et), !wt)) throw It + return It + }, + $t = function (Pt, Ct, wt) { + var It = Pt.length + if (!It || (wt && !wt.l && It < 5)) return Ct || new et(0) + var Ot = !Ct || wt, + Wt = !wt || wt.i + wt || (wt = {}), Ct || (Ct = new et(3 * It)) + var zt, + Ft = function (Vn) { + var qn = Ct.length + if (Vn > qn) { + var zn = new et(Math.max(2 * qn, Vn)) + zn.set(Ct), (Ct = zn) + } + }, + Nt = wt.f || 0, + Ut = wt.p || 0, + Mt = wt.b || 0, + Ht = wt.l, + en = wt.d, + sn = wt.m, + Kt = wt.n, + rn = 8 * It + do { + if (!Ht) { + wt.f = Nt = St(Pt, Ut, 1) + var nn = St(Pt, Ut + 1, 3) + if (((Ut += 3), !nn)) { + var hn = Pt[(In = (((zt = Ut) / 8) | 0) + (7 & zt && 1) + 4) - 4] | (Pt[In - 3] << 8), + vn = In + hn + if (vn > It) { + Wt && Et(0) + break + } + Ot && Ft(Mt + hn), Ct.set(Pt.subarray(In, vn), Mt), (wt.b = Mt += hn), (wt.p = Ut = 8 * vn) + continue + } + if (nn == 1) (Ht = vt), (en = xt), (sn = 9), (Kt = 5) + else if (nn == 2) { + var an = St(Pt, Ut, 31) + 257, + Qt = St(Pt, Ut + 10, 15) + 4, + _n = an + St(Pt, Ut + 5, 31) + 1 + Ut += 14 + for (var Pn = new et(_n), $n = new et(19), Nn = 0; Nn < Qt; ++Nn) $n[at[Nn]] = St(Pt, Ut + 3 * Nn, 7) + Ut += 3 * Qt + var Tn = kt($n), + cn = (1 << Tn) - 1, + mn = gt($n, Tn, 1) + for (Nn = 0; Nn < _n; ) { + var In, + An = mn[St(Pt, Ut, cn)] + if (((Ut += 15 & An), (In = An >>> 4) < 16)) Pn[Nn++] = In + else { + var wn = 0, + fn = 0 + for ( + In == 16 + ? ((fn = 3 + St(Pt, Ut, 3)), (Ut += 2), (wn = Pn[Nn - 1])) + : In == 17 + ? ((fn = 3 + St(Pt, Ut, 7)), (Ut += 3)) + : In == 18 && ((fn = 11 + St(Pt, Ut, 127)), (Ut += 7)); + fn--; + + ) + Pn[Nn++] = wn + } + } + var pn = Pn.subarray(0, an), + kn = Pn.subarray(an) + ;(sn = kt(pn)), (Kt = kt(kn)), (Ht = gt(pn, sn, 1)), (en = gt(kn, Kt, 1)) + } else Et(1) + if (Ut > rn) { + Wt && Et(0) + break + } + } + Ot && Ft(Mt + 131072) + for (var Dn = (1 << sn) - 1, un = (1 << Kt) - 1, Zt = Ut; ; Zt = Ut) { + var Xt = (wn = Ht[Tt(Pt, Ut) & Dn]) >>> 4 + if ((Ut += 15 & wn) > rn) { + Wt && Et(0) + break + } + if ((wn || Et(2), Xt < 256)) Ct[Mt++] = Xt + else { + if (Xt == 256) { + ;(Zt = Ut), (Ht = null) + break + } + var Sn = Xt - 254 + if (Xt > 264) { + var Rn = it[(Nn = Xt - 257)] + ;(Sn = St(Pt, Ut, (1 << Rn) - 1) + ct[Nn]), (Ut += Rn) + } + var jn = en[Tt(Pt, Ut) & un], + On = jn >>> 4 + if ( + (jn || Et(3), + (Ut += 15 & jn), + (kn = ht[On]), + On > 3 && ((Rn = ot[On]), (kn += Tt(Pt, Ut) & ((1 << Rn) - 1)), (Ut += Rn)), + Ut > rn) + ) { + Wt && Et(0) + break + } + Ot && Ft(Mt + 131072) + for (var Zn = Mt + Sn; Mt < Zn; Mt += 4) + (Ct[Mt] = Ct[Mt - kn]), + (Ct[Mt + 1] = Ct[Mt + 1 - kn]), + (Ct[Mt + 2] = Ct[Mt + 2 - kn]), + (Ct[Mt + 3] = Ct[Mt + 3 - kn]) + Mt = Zn + } + } + ;(wt.l = Ht), (wt.p = Zt), (wt.b = Mt), Ht && ((Nt = 1), (wt.m = sn), (wt.d = en), (wt.n = Kt)) + } while (!Nt) + return Mt == Ct.length + ? Ct + : (function (Vn, qn, zn) { + ;(qn == null || qn < 0) && (qn = 0), (zn == null || zn > Vn.length) && (zn = Vn.length) + var Jn = new (Vn instanceof nt ? nt : Vn instanceof rt ? rt : et)(zn - qn) + return Jn.set(Vn.subarray(qn, zn)), Jn + })(Ct, 0, Mt) + }, + Dt = new et(0), + jt = typeof TextDecoder < 'u' && new TextDecoder() + try { + jt.decode(Dt, { stream: !0 }) + } catch {} + return ( + (tt.convert_streams = function (Pt) { + var Ct = new DataView(Pt), + wt = 0 + function It() { + var an = Ct.getUint16(wt) + return (wt += 2), an + } + function Ot() { + var an = Ct.getUint32(wt) + return (wt += 4), an + } + function Wt(an) { + hn.setUint16(vn, an), (vn += 2) + } + function zt(an) { + hn.setUint32(vn, an), (vn += 4) + } + for ( + var Ft = { + signature: Ot(), + flavor: Ot(), + length: Ot(), + numTables: It(), + reserved: It(), + totalSfntSize: Ot(), + majorVersion: It(), + minorVersion: It(), + metaOffset: Ot(), + metaLength: Ot(), + metaOrigLength: Ot(), + privOffset: Ot(), + privLength: Ot(), + }, + Nt = 0; + Math.pow(2, Nt) <= Ft.numTables; + + ) + Nt++ + Nt-- + for ( + var Ut = 16 * Math.pow(2, Nt), Mt = 16 * Ft.numTables - Ut, Ht = 12, en = [], sn = 0; + sn < Ft.numTables; + sn++ + ) + en.push({ tag: Ot(), offset: Ot(), compLength: Ot(), origLength: Ot(), origChecksum: Ot() }), (Ht += 16) + var Kt, + rn = new Uint8Array( + 12 + + 16 * en.length + + en.reduce(function (an, Qt) { + return an + Qt.origLength + 4 + }, 0), + ), + nn = rn.buffer, + hn = new DataView(nn), + vn = 0 + return ( + zt(Ft.flavor), + Wt(Ft.numTables), + Wt(Ut), + Wt(Nt), + Wt(Mt), + en.forEach(function (an) { + zt(an.tag), + zt(an.origChecksum), + zt(Ht), + zt(an.origLength), + (an.outOffset = Ht), + (Ht += an.origLength) % 4 != 0 && (Ht += 4 - (Ht % 4)) + }), + en.forEach(function (an) { + var Qt, + _n = Pt.slice(an.offset, an.offset + an.compLength) + if (an.compLength != an.origLength) { + var Pn = new Uint8Array(an.origLength) + ;(Qt = new Uint8Array(_n, 2)), $t(Qt, Pn) + } else Pn = new Uint8Array(_n) + rn.set(Pn, an.outOffset) + var $n = 0 + ;(Ht = an.outOffset + an.origLength) % 4 != 0 && ($n = 4 - (Ht % 4)), + rn.set(new Uint8Array($n).buffer, an.outOffset + an.origLength), + (Kt = Ht + $n) + }), + nn.slice(0, Kt) + ) + }), + Object.defineProperty(tt, '__esModule', { value: !0 }), + tt + ) + })({}).convert_streams + } + function parserFactory(tt, et) { + const nt = { M: 2, L: 2, Q: 4, C: 6, Z: 0 }, + rt = { + C: '18g,ca,368,1kz', + D: '17k,6,2,2+4,5+c,2+6,2+1,10+1,9+f,j+11,2+1,a,2,2+1,15+2,3,j+2,6+3,2+8,2,2,2+1,w+a,4+e,3+3,2,3+2,3+5,23+w,2f+4,3,2+9,2,b,2+3,3,1k+9,6+1,3+1,2+2,2+d,30g,p+y,1,1+1g,f+x,2,sd2+1d,jf3+4,f+3,2+4,2+2,b+3,42,2,4+2,2+1,2,3,t+1,9f+w,2,el+2,2+g,d+2,2l,2+1,5,3+1,2+1,2,3,6,16wm+1v', + R: '17m+3,2,2,6+3,m,15+2,2+2,h+h,13,3+8,2,2,3+1,2,p+1,x,5+4,5,a,2,2,3,u,c+2,g+1,5,2+1,4+1,5j,6+1,2,b,2+2,f,2+1,1s+2,2,3+1,7,1ez0,2,2+1,4+4,b,4,3,b,42,2+2,4,3,2+1,2,o+3,ae,ep,x,2o+2,3+1,3,5+1,6', + L: 'x9u,jff,a,fd,jv', + T: '4t,gj+33,7o+4,1+1,7c+18,2,2+1,2+1,2,21+a,2,1b+k,h,2u+6,3+5,3+1,2+3,y,2,v+q,2k+a,1n+8,a,p+3,2+8,2+2,2+4,18+2,3c+e,2+v,1k,2,5+7,5,4+6,b+1,u,1n,5+3,9,l+1,r,3+1,1m,5+1,5+1,3+2,4,v+1,4,c+1,1m,5+4,2+1,5,l+1,n+5,2,1n,3,2+3,9,8+1,c+1,v,1q,d,1f,4,1m+2,6+2,2+3,8+1,c+1,u,1n,3,7,6+1,l+1,t+1,1m+1,5+3,9,l+1,u,21,8+2,2,2j,3+6,d+7,2r,3+8,c+5,23+1,s,2,2,1k+d,2+4,2+1,6+a,2+z,a,2v+3,2+5,2+1,3+1,q+1,5+2,h+3,e,3+1,7,g,jk+2,qb+2,u+2,u+1,v+1,1t+1,2+6,9,3+a,a,1a+2,3c+1,z,3b+2,5+1,a,7+2,64+1,3,1n,2+6,2,2,3+7,7+9,3,1d+d,1,1+1,1s+3,1d,2+4,2,6,15+8,d+1,x+3,3+1,2+2,1l,2+1,4,2+2,1n+7,3+1,49+2,2+c,2+6,5,7,4+1,5j+1l,2+4,ek,3+1,r+4,1e+4,6+5,2p+c,1+3,1,1+2,1+b,2db+2,3y,2p+v,ff+3,30+1,n9x,1+2,2+9,x+1,29+1,7l,4,5,q+1,6,48+1,r+h,e,13+7,q+a,1b+2,1d,3+3,3+1,14,1w+5,3+1,3+1,d,9,1c,1g,2+2,3+1,6+1,2,17+1,9,6n,3,5,fn5,ki+f,h+f,5s,6y+2,ea,6b,46+4,1af+2,2+1,6+3,15+2,5,4m+1,fy+3,as+1,4a+a,4x,1j+e,1l+2,1e+3,3+1,1y+2,11+4,2+7,1r,d+1,1h+8,b+3,3,2o+2,3,2+1,7,4h,4+7,m+1,1m+1,4,12+6,4+4,5g+7,3+2,2,o,2d+5,2,5+1,2+1,6n+3,7+1,2+1,s+1,2e+7,3,2+1,2z,2,3+5,2,2u+2,3+3,2+4,78+8,2+1,75+1,2,5,41+3,3+1,5,x+9,15+5,3+3,9,a+5,3+2,1b+c,2+1,bb+6,2+5,2,2b+l,3+6,2+1,2+1,3f+5,4,2+1,2+6,2,21+1,4,2,9o+1,470+8,at4+4,1o+6,t5,1s+3,2a,f5l+1,2+3,43o+2,a+7,1+7,3+6,v+3,45+2,1j0+1i,5+1d,9,f,n+4,2+e,11t+6,2+g,3+6,2+1,2+4,7a+6,c6+3,15t+6,32+6,1,gzau,v+2n,3l+6n', + }, + it = 1, + ot = 2, + at = 4, + st = 8, + lt = 16, + ct = 32 + let ut + function ht(St) { + if (!ut) { + const Tt = { R: ot, L: it, D: at, C: lt, U: ct, T: st } + ut = new Map() + for (let At in rt) { + let Et = 0 + rt[At].split(',').forEach(($t) => { + let [Dt, jt] = $t.split('+') + ;(Dt = parseInt(Dt, 36)), (jt = jt ? parseInt(jt, 36) : 0), ut.set((Et += Dt), Tt[At]) + for (let Pt = jt; Pt--; ) ut.set(++Et, Tt[At]) + }) + } + } + return ut.get(St) || ct + } + const dt = 1, + pt = 2, + mt = 3, + gt = 4, + yt = [null, 'isol', 'init', 'fina', 'medi'] + function bt(St) { + const Tt = new Uint8Array(St.length) + let At = ct, + Et = dt, + $t = -1 + for (let Dt = 0; Dt < St.length; Dt++) { + const jt = St.codePointAt(Dt) + let Pt = ht(jt) | 0, + Ct = dt + Pt & st || + (At & (it | at | lt) + ? Pt & (ot | at | lt) + ? ((Ct = mt), (Et === dt || Et === mt) && Tt[$t]++) + : Pt & (it | ct) && (Et === pt || Et === gt) && Tt[$t]-- + : At & (ot | ct) && (Et === pt || Et === gt) && Tt[$t]--, + (Et = Tt[Dt] = Ct), + (At = Pt), + ($t = Dt), + jt > 65535 && Dt++) + } + return Tt + } + function vt(St, Tt) { + const At = [] + for (let $t = 0; $t < Tt.length; $t++) { + const Dt = Tt.codePointAt($t) + Dt > 65535 && $t++, At.push(tt.U.codeToGlyph(St, Dt)) + } + const Et = St.GSUB + if (Et) { + const { lookupList: $t, featureList: Dt } = Et + let jt + const Pt = /^(rlig|liga|mset|isol|init|fina|medi|half|pres|blws)$/, + Ct = [] + Dt.forEach((wt) => { + if (Pt.test(wt.tag)) + for (let It = 0; It < wt.tab.length; It++) { + if (Ct[wt.tab[It]]) continue + Ct[wt.tab[It]] = !0 + const Ot = $t[wt.tab[It]], + Wt = /^(isol|init|fina|medi)$/.test(wt.tag) + Wt && !jt && (jt = bt(Tt)) + for (let zt = 0; zt < At.length; zt++) + (!jt || !Wt || yt[jt[zt]] === wt.tag) && tt.U._applySubs(At, zt, Ot, $t) + } + }) + } + return At + } + function xt(...St) { + for (let Tt = 0; Tt < St.length; Tt++) if (typeof St[Tt] == 'number') return St[Tt] + } + function kt(St) { + const Tt = Object.create(null), + At = St['OS/2'], + Et = St.hhea, + $t = St.head.unitsPerEm, + Dt = xt(At && At.sTypoAscender, Et && Et.ascender, $t), + jt = { + unitsPerEm: $t, + ascender: Dt, + descender: xt(At && At.sTypoDescender, Et && Et.descender, 0), + capHeight: xt(At && At.sCapHeight, Dt), + xHeight: xt(At && At.sxHeight, Dt), + lineGap: xt(At && At.sTypoLineGap, Et && Et.lineGap), + forEachGlyph(Pt, Ct, wt, It) { + let Ot = 0 + const Wt = (1 / jt.unitsPerEm) * Ct, + zt = vt(St, Pt) + let Ft = 0, + Nt = -1 + return ( + zt.forEach((Ut, Mt) => { + if (Ut !== -1) { + let Ht = Tt[Ut] + if (!Ht) { + const { cmds: en, crds: sn } = tt.U.glyphToPath(St, Ut) + let Kt = '', + rn = 0 + for (let Qt = 0, _n = en.length; Qt < _n; Qt++) { + const Pn = nt[en[Qt]] + Kt += en[Qt] + for (let $n = 1; $n <= Pn; $n++) Kt += ($n > 1 ? ',' : '') + sn[rn++] + } + let nn, hn, vn, an + if (sn.length) { + ;(nn = hn = 1 / 0), (vn = an = -1 / 0) + for (let Qt = 0, _n = sn.length; Qt < _n; Qt += 2) { + let Pn = sn[Qt], + $n = sn[Qt + 1] + Pn < nn && (nn = Pn), $n < hn && (hn = $n), Pn > vn && (vn = Pn), $n > an && (an = $n) + } + } else nn = vn = hn = an = 0 + Ht = Tt[Ut] = { + index: Ut, + advanceWidth: St.hmtx.aWidth[Ut], + xMin: nn, + yMin: hn, + xMax: vn, + yMax: an, + path: Kt, + pathCommandCount: en.length, + } + } + Nt !== -1 && (Ot += tt.U.getPairAdjustment(St, Nt, Ut) * Wt), + It.call(null, Ht, Ot, Ft), + Ht.advanceWidth && (Ot += Ht.advanceWidth * Wt), + wt && (Ot += wt * Ct), + (Nt = Ut) + } + Ft += Pt.codePointAt(Ft) > 65535 ? 2 : 1 + }), + Ot + ) + }, + } + return jt + } + return function (Tt) { + const At = new Uint8Array(Tt, 0, 4), + Et = tt._bin.readASCII(At, 0, 4) + if (Et === 'wOFF') Tt = et(Tt) + else if (Et === 'wOF2') throw new Error('woff2 fonts not supported') + return kt(tt.parse(Tt)[0]) + } + } + const workerModule = defineWorkerModule({ + name: 'Typr Font Parser', + dependencies: [typrFactory, woff2otfFactory, parserFactory], + init(tt, et, nt) { + const rt = tt(), + it = et() + return nt(rt, it) + }, + }), + CONFIG = { + defaultFontURL: 'https://fonts.gstatic.com/s/roboto/v18/KFOmCnqEu92Fr1Mu4mxM.woff', + sdfGlyphSize: 64, + sdfMargin: 1 / 16, + sdfExponent: 9, + textureWidth: 2048, + }, + tempColor = new Color$1() + function now$1$1() { + return (self.performance || Date).now() + } + const atlases = Object.create(null) + function getTextRenderInfo(tt, et) { + tt = assign$1({}, tt) + const nt = now$1$1() + if ( + ((tt.font = toAbsoluteURL(tt.font || CONFIG.defaultFontURL)), + (tt.text = '' + tt.text), + (tt.sdfGlyphSize = tt.sdfGlyphSize || CONFIG.sdfGlyphSize), + tt.colorRanges != null) + ) { + let ht = {} + for (let dt in tt.colorRanges) + if (tt.colorRanges.hasOwnProperty(dt)) { + let pt = tt.colorRanges[dt] + typeof pt != 'number' && (pt = tempColor.set(pt).getHex()), (ht[dt] = pt) + } + tt.colorRanges = ht + } + Object.freeze(tt) + const { textureWidth: rt, sdfExponent: it } = CONFIG, + { sdfGlyphSize: ot } = tt, + at = (rt / ot) * 4 + let st = atlases[ot] + if (!st) { + const ht = document.createElement('canvas') + ;(ht.width = rt), + (ht.height = (ot * 256) / at), + (st = atlases[ot] = + { + glyphCount: 0, + sdfGlyphSize: ot, + sdfCanvas: ht, + sdfTexture: new Texture(ht, void 0, void 0, void 0, LinearFilter, LinearFilter), + contextLost: !1, + glyphsByFont: new Map(), + }), + (st.sdfTexture.generateMipmaps = !1), + initContextLossHandling(st) + } + const { sdfTexture: lt, sdfCanvas: ct } = st + let ut = st.glyphsByFont.get(tt.font) + ut || st.glyphsByFont.set(tt.font, (ut = new Map())), + typesetInWorker(tt).then((ht) => { + const { glyphIds: dt, glyphPositions: pt, fontSize: mt, unitsPerEm: gt, timings: yt } = ht, + bt = [], + vt = new Float32Array(dt.length * 4), + xt = mt / gt + let kt = 0, + St = 0 + const Tt = now$1$1() + dt.forEach((jt, Pt) => { + let Ct = ut.get(jt) + if (!Ct) { + const { path: Wt, pathBounds: zt } = ht.glyphData[jt], + Ft = (Math.max(zt[2] - zt[0], zt[3] - zt[1]) / ot) * (CONFIG.sdfMargin * ot + 0.5), + Nt = st.glyphCount++, + Ut = [zt[0] - Ft, zt[1] - Ft, zt[2] + Ft, zt[3] + Ft] + ut.set(jt, (Ct = { path: Wt, atlasIndex: Nt, sdfViewBox: Ut })), bt.push(Ct) + } + const { sdfViewBox: wt } = Ct, + It = pt[St++], + Ot = pt[St++] + ;(vt[kt++] = It + wt[0] * xt), + (vt[kt++] = Ot + wt[1] * xt), + (vt[kt++] = It + wt[2] * xt), + (vt[kt++] = Ot + wt[3] * xt), + (dt[Pt] = Ct.atlasIndex) + }), + (yt.quads = (yt.quads || 0) + (now$1$1() - Tt)) + const At = now$1$1() + yt.sdf = {} + const Et = ct.height, + $t = Math.ceil(st.glyphCount / at), + Dt = Math.pow(2, Math.ceil(Math.log2($t * ot))) + Dt > Et && + (console.info(`Increasing SDF texture size ${Et}->${Dt}`), + resizeWebGLCanvasWithoutClearing(ct, rt, Dt), + lt.dispose()), + Promise.all( + bt.map((jt) => + generateGlyphSDF(jt, st, tt.gpuAccelerateSDF).then(({ timing: Pt }) => { + yt.sdf[jt.atlasIndex] = Pt + }), + ), + ).then(() => { + bt.length && !st.contextLost && (safariPre15Workaround(st), (lt.needsUpdate = !0)), + (yt.sdfTotal = now$1$1() - At), + (yt.total = now$1$1() - nt), + et( + Object.freeze({ + parameters: tt, + sdfTexture: lt, + sdfGlyphSize: ot, + sdfExponent: it, + glyphBounds: vt, + glyphAtlasIndices: dt, + glyphColors: ht.glyphColors, + caretPositions: ht.caretPositions, + caretHeight: ht.caretHeight, + chunkedBounds: ht.chunkedBounds, + ascender: ht.ascender, + descender: ht.descender, + lineHeight: ht.lineHeight, + capHeight: ht.capHeight, + xHeight: ht.xHeight, + topBaseline: ht.topBaseline, + blockBounds: ht.blockBounds, + visibleBounds: ht.visibleBounds, + timings: ht.timings, + }), + ) + }) + }), + Promise.resolve().then(() => { + st.contextLost || warmUpSDFCanvas(ct) + }) + } + function generateGlyphSDF( + { path: tt, atlasIndex: et, sdfViewBox: nt }, + { sdfGlyphSize: rt, sdfCanvas: it, contextLost: ot }, + at, + ) { + if (ot) return Promise.resolve({ timing: -1 }) + const { textureWidth: st, sdfExponent: lt } = CONFIG, + ct = Math.max(nt[2] - nt[0], nt[3] - nt[1]), + ut = Math.floor(et / 4), + ht = (ut % (st / rt)) * rt, + dt = Math.floor(ut / (st / rt)) * rt, + pt = et % 4 + return generateSDF(rt, rt, tt, nt, ct, lt, it, ht, dt, pt, at) + } + function initContextLossHandling(tt) { + const et = tt.sdfCanvas + et.addEventListener('webglcontextlost', (nt) => { + console.log('Context Lost', nt), nt.preventDefault(), (tt.contextLost = !0) + }), + et.addEventListener('webglcontextrestored', (nt) => { + console.log('Context Restored', nt), (tt.contextLost = !1) + const rt = [] + tt.glyphsByFont.forEach((it) => { + it.forEach((ot) => { + rt.push(generateGlyphSDF(ot, tt, !0)) + }) + }), + Promise.all(rt).then(() => { + safariPre15Workaround(tt), (tt.sdfTexture.needsUpdate = !0) + }) + }) + } + function preloadFont({ font: tt, characters: et, sdfGlyphSize: nt }, rt) { + let it = Array.isArray(et) + ? et.join(` +`) + : '' + et + getTextRenderInfo({ font: tt, sdfGlyphSize: nt, text: it }, rt) + } + function assign$1(tt, et) { + for (let nt in et) et.hasOwnProperty(nt) && (tt[nt] = et[nt]) + return tt + } + let linkEl + function toAbsoluteURL(tt) { + return ( + linkEl || (linkEl = typeof document > 'u' ? {} : document.createElement('a')), (linkEl.href = tt), linkEl.href + ) + } + function safariPre15Workaround(tt) { + if (typeof createImageBitmap != 'function') { + console.info('Safari<15: applying SDF canvas workaround') + const { sdfCanvas: et, sdfTexture: nt } = tt, + { width: rt, height: it } = et, + ot = tt.sdfCanvas.getContext('webgl') + let at = nt.image.data + ;(!at || at.length !== rt * it * 4) && + ((at = new Uint8Array(rt * it * 4)), + (nt.image = { width: rt, height: it, data: at }), + (nt.flipY = !1), + (nt.isDataTexture = !0)), + ot.readPixels(0, 0, rt, it, ot.RGBA, ot.UNSIGNED_BYTE, at) + } + } + const typesetterWorkerModule = defineWorkerModule({ + name: 'Typesetter', + dependencies: [CONFIG, workerModule, createTypesetter, bidiFactory], + init(tt, et, nt, rt) { + const { defaultFontURL: it } = tt + return nt(et, rt(), { defaultFontURL: it }) + }, + }), + typesetInWorker = defineWorkerModule({ + name: 'Typesetter', + dependencies: [typesetterWorkerModule], + init(tt) { + return function (et) { + return new Promise((nt) => { + tt.typeset(et, nt) + }) + } + }, + getTransferables(tt) { + const et = [tt.glyphPositions.buffer, tt.glyphIds.buffer] + return ( + tt.caretPositions && et.push(tt.caretPositions.buffer), tt.glyphColors && et.push(tt.glyphColors.buffer), et + ) + }, + }), + templateGeometries = {} + function getTemplateGeometry(tt) { + let et = templateGeometries[tt] + if (!et) { + const nt = new PlaneGeometry(1, 1, tt, tt), + rt = nt.clone(), + it = nt.attributes, + ot = rt.attributes, + at = new BufferGeometry(), + st = it.uv.count + for (let lt = 0; lt < st; lt++) (ot.position.array[lt * 3] *= -1), (ot.normal.array[lt * 3 + 2] *= -1) + ;['position', 'normal', 'uv'].forEach((lt) => { + at.setAttribute(lt, new Float32BufferAttribute([...it[lt].array, ...ot[lt].array], it[lt].itemSize)) + }), + at.setIndex([...nt.index.array, ...rt.index.array.map((lt) => lt + st)]), + at.translate(0.5, 0.5, 0), + (et = templateGeometries[tt] = at) + } + return et + } + const glyphBoundsAttrName = 'aTroikaGlyphBounds', + glyphIndexAttrName = 'aTroikaGlyphIndex', + glyphColorAttrName = 'aTroikaGlyphColor' + class GlyphsGeometry extends InstancedBufferGeometry { + constructor() { + super(), + (this.detail = 1), + (this.curveRadius = 0), + (this.groups = [ + { start: 0, count: 1 / 0, materialIndex: 0 }, + { start: 0, count: 1 / 0, materialIndex: 1 }, + ]), + (this.boundingSphere = new Sphere()), + (this.boundingBox = new Box3()) + } + computeBoundingSphere() {} + computeBoundingBox() {} + setSide(et) { + const nt = this.getIndex().count + this.setDrawRange(et === BackSide ? nt / 2 : 0, et === DoubleSide ? nt : nt / 2) + } + set detail(et) { + if (et !== this._detail) { + ;(this._detail = et), (typeof et != 'number' || et < 1) && (et = 1) + let nt = getTemplateGeometry(et) + ;['position', 'normal', 'uv'].forEach((rt) => { + this.attributes[rt] = nt.attributes[rt].clone() + }), + this.setIndex(nt.getIndex().clone()) + } + } + get detail() { + return this._detail + } + set curveRadius(et) { + et !== this._curveRadius && ((this._curveRadius = et), this._updateBounds()) + } + get curveRadius() { + return this._curveRadius + } + updateGlyphs(et, nt, rt, it, ot) { + updateBufferAttr(this, glyphBoundsAttrName, et, 4), + updateBufferAttr(this, glyphIndexAttrName, nt, 1), + updateBufferAttr(this, glyphColorAttrName, ot, 3), + (this._blockBounds = rt), + (this._chunkedBounds = it), + (this.instanceCount = nt.length), + this._updateBounds() + } + _updateBounds() { + const et = this._blockBounds + if (et) { + const { curveRadius: nt, boundingBox: rt } = this + if (nt) { + const { PI: it, floor: ot, min: at, max: st, sin: lt, cos: ct } = Math, + ut = it / 2, + ht = it * 2, + dt = Math.abs(nt), + pt = et[0] / dt, + mt = et[2] / dt, + gt = ot((pt + ut) / ht) !== ot((mt + ut) / ht) ? -dt : at(lt(pt) * dt, lt(mt) * dt), + yt = ot((pt - ut) / ht) !== ot((mt - ut) / ht) ? dt : st(lt(pt) * dt, lt(mt) * dt), + bt = ot((pt + it) / ht) !== ot((mt + it) / ht) ? dt * 2 : st(dt - ct(pt) * dt, dt - ct(mt) * dt) + rt.min.set(gt, et[1], nt < 0 ? -bt : 0), rt.max.set(yt, et[3], nt < 0 ? 0 : bt) + } else rt.min.set(et[0], et[1], 0), rt.max.set(et[2], et[3], 0) + rt.getBoundingSphere(this.boundingSphere) + } + } + applyClipRect(et) { + let nt = this.getAttribute(glyphIndexAttrName).count, + rt = this._chunkedBounds + if (rt) + for (let it = rt.length; it--; ) { + nt = rt[it].end + let ot = rt[it].rect + if (ot[1] < et.w && ot[3] > et.y && ot[0] < et.z && ot[2] > et.x) break + } + this.instanceCount = nt + } + } + function updateBufferAttr(tt, et, nt, rt) { + const it = tt.getAttribute(et) + nt + ? it && it.array.length === nt.length + ? (it.array.set(nt), (it.needsUpdate = !0)) + : (tt.setAttribute(et, new InstancedBufferAttribute(nt, rt)), delete tt._maxInstanceCount, tt.dispose()) + : it && tt.deleteAttribute(et) + } + const VERTEX_DEFS = ` uniform vec2 uTroikaSDFTextureSize; uniform float uTroikaSDFGlyphSize; uniform vec4 uTroikaTotalBounds; @@ -4659,7 +146379,8 @@ varying vec4 vTroikaTextureUVBounds; varying float vTroikaTextureChannel; varying vec3 vTroikaGlyphColor; varying vec2 vTroikaGlyphDimensions; -`,VERTEX_TRANSFORM=` +`, + VERTEX_TRANSFORM = ` vec4 bounds = aTroikaGlyphBounds; bounds.xz += uTroikaPositionOffset.x; bounds.yw -= uTroikaPositionOffset.y; @@ -4701,7 +146422,8 @@ vec2 txStartUV = txUvPerSquare * vec2( ); vTroikaTextureUVBounds = vec4(txStartUV, vec2(txStartUV) + txUvPerSquare); vTroikaTextureChannel = mod(aTroikaGlyphIndex, 4.0); -`,FRAGMENT_DEFS=` +`, + FRAGMENT_DEFS = ` uniform sampler2D uTroikaSDFTexture; uniform vec2 uTroikaSDFTextureSize; uniform float uTroikaSDFGlyphSize; @@ -4747,3397 +146469,88518 @@ float troikaGetAADist() { return vTroikaGlyphDimensions.x / 64.0; #endif } - -float troikaGetFragDistValue() { - vec2 clampedGlyphUV = clamp(vTroikaGlyphUV, 0.5 / uTroikaSDFGlyphSize, 1.0 - 0.5 / uTroikaSDFGlyphSize); - float distance = troikaGlyphUvToDistance(clampedGlyphUV); - - // Extrapolate distance when outside bounds: - distance += clampedGlyphUV == vTroikaGlyphUV ? 0.0 : - length((vTroikaGlyphUV - clampedGlyphUV) * vTroikaGlyphDimensions); - - - - return distance; + +float troikaGetFragDistValue() { + vec2 clampedGlyphUV = clamp(vTroikaGlyphUV, 0.5 / uTroikaSDFGlyphSize, 1.0 - 0.5 / uTroikaSDFGlyphSize); + float distance = troikaGlyphUvToDistance(clampedGlyphUV); + + // Extrapolate distance when outside bounds: + distance += clampedGlyphUV == vTroikaGlyphUV ? 0.0 : + length((vTroikaGlyphUV - clampedGlyphUV) * vTroikaGlyphDimensions); + + + + return distance; +} + +float troikaGetEdgeAlpha(float distance, float distanceOffset, float aaDist) { + #if defined(IS_DEPTH_MATERIAL) || defined(IS_DISTANCE_MATERIAL) + float alpha = step(-distanceOffset, -distance); + #else + + float alpha = smoothstep( + distanceOffset + aaDist, + distanceOffset - aaDist, + distance + ); + #endif + + return alpha; +} +`, + FRAGMENT_TRANSFORM = ` +float aaDist = troikaGetAADist(); +float fragDistance = troikaGetFragDistValue(); +float edgeAlpha = uTroikaSDFDebug ? + troikaGlyphUvToSdfValue(vTroikaGlyphUV) : + troikaGetEdgeAlpha(fragDistance, uTroikaDistanceOffset, max(aaDist, uTroikaBlurRadius)); + +#if !defined(IS_DEPTH_MATERIAL) && !defined(IS_DISTANCE_MATERIAL) +vec4 fillRGBA = gl_FragColor; +fillRGBA.a *= uTroikaFillOpacity; +vec4 strokeRGBA = uTroikaStrokeWidth == 0.0 ? fillRGBA : vec4(uTroikaStrokeColor, uTroikaStrokeOpacity); +if (fillRGBA.a == 0.0) fillRGBA.rgb = strokeRGBA.rgb; +gl_FragColor = mix(fillRGBA, strokeRGBA, smoothstep( + -uTroikaStrokeWidth - aaDist, + -uTroikaStrokeWidth + aaDist, + fragDistance +)); +gl_FragColor.a *= edgeAlpha; +#endif + +if (edgeAlpha == 0.0) { + discard; +} +` + function createTextDerivedMaterial(tt) { + const et = createDerivedMaterial(tt, { + chained: !0, + extensions: { derivatives: !0 }, + uniforms: { + uTroikaSDFTexture: { value: null }, + uTroikaSDFTextureSize: { value: new Vector2() }, + uTroikaSDFGlyphSize: { value: 0 }, + uTroikaSDFExponent: { value: 0 }, + uTroikaTotalBounds: { value: new Vector4(0, 0, 0, 0) }, + uTroikaClipRect: { value: new Vector4(0, 0, 0, 0) }, + uTroikaDistanceOffset: { value: 0 }, + uTroikaOutlineOpacity: { value: 0 }, + uTroikaFillOpacity: { value: 1 }, + uTroikaPositionOffset: { value: new Vector2() }, + uTroikaCurveRadius: { value: 0 }, + uTroikaBlurRadius: { value: 0 }, + uTroikaStrokeWidth: { value: 0 }, + uTroikaStrokeColor: { value: new Color$1() }, + uTroikaStrokeOpacity: { value: 1 }, + uTroikaOrient: { value: new Matrix3() }, + uTroikaUseGlyphColors: { value: !0 }, + uTroikaSDFDebug: { value: !1 }, + }, + vertexDefs: VERTEX_DEFS, + vertexTransform: VERTEX_TRANSFORM, + fragmentDefs: FRAGMENT_DEFS, + fragmentColorTransform: FRAGMENT_TRANSFORM, + customRewriter({ vertexShader: nt, fragmentShader: rt }) { + let it = /\buniform\s+vec3\s+diffuse\b/ + return ( + it.test(rt) && + ((rt = rt.replace(it, 'varying vec3 vTroikaGlyphColor').replace(/\bdiffuse\b/g, 'vTroikaGlyphColor')), + it.test(nt) || + (nt = nt.replace( + voidMainRegExp, + `uniform vec3 diffuse; +$& +vTroikaGlyphColor = uTroikaUseGlyphColors ? aTroikaGlyphColor / 255.0 : diffuse; +`, + ))), + { vertexShader: nt, fragmentShader: rt } + ) + }, + }) + return ( + (et.transparent = !0), + Object.defineProperties(et, { + isTroikaTextMaterial: { value: !0 }, + shadowSide: { + get() { + return this.side + }, + set() {}, + }, + }), + et + ) + } + const defaultMaterial = new MeshBasicMaterial({ color: 16777215, side: DoubleSide, transparent: !0 }), + defaultStrokeColor = 8421504, + tempMat4 = new Matrix4(), + tempVec3a = new Vector3(), + tempVec3b = new Vector3(), + tempArray = [], + origin = new Vector3(), + defaultOrient = '+x+y' + function first(tt) { + return Array.isArray(tt) ? tt[0] : tt + } + let getFlatRaycastMesh = () => { + const tt = new Mesh(new PlaneGeometry(1, 1), defaultMaterial) + return (getFlatRaycastMesh = () => tt), tt + }, + getCurvedRaycastMesh = () => { + const tt = new Mesh(new PlaneGeometry(1, 1, 32, 1), defaultMaterial) + return (getCurvedRaycastMesh = () => tt), tt + } + const syncStartEvent = { type: 'syncstart' }, + syncCompleteEvent = { type: 'synccomplete' }, + SYNCABLE_PROPS = [ + 'font', + 'fontSize', + 'letterSpacing', + 'lineHeight', + 'maxWidth', + 'overflowWrap', + 'text', + 'direction', + 'textAlign', + 'textIndent', + 'whiteSpace', + 'anchorX', + 'anchorY', + 'colorRanges', + 'sdfGlyphSize', + ], + COPYABLE_PROPS = SYNCABLE_PROPS.concat( + 'material', + 'color', + 'depthOffset', + 'clipRect', + 'curveRadius', + 'orientation', + 'glyphGeometryDetail', + ) + let Text$2 = class extends Mesh { + constructor() { + const et = new GlyphsGeometry() + super(et, null), + (this.text = ''), + (this.anchorX = 0), + (this.anchorY = 0), + (this.curveRadius = 0), + (this.direction = 'auto'), + (this.font = null), + (this.fontSize = 0.1), + (this.letterSpacing = 0), + (this.lineHeight = 'normal'), + (this.maxWidth = 1 / 0), + (this.overflowWrap = 'normal'), + (this.textAlign = 'left'), + (this.textIndent = 0), + (this.whiteSpace = 'normal'), + (this.material = null), + (this.color = null), + (this.colorRanges = null), + (this.outlineWidth = 0), + (this.outlineColor = 0), + (this.outlineOpacity = 1), + (this.outlineBlur = 0), + (this.outlineOffsetX = 0), + (this.outlineOffsetY = 0), + (this.strokeWidth = 0), + (this.strokeColor = defaultStrokeColor), + (this.strokeOpacity = 1), + (this.fillOpacity = 1), + (this.depthOffset = 0), + (this.clipRect = null), + (this.orientation = defaultOrient), + (this.glyphGeometryDetail = 1), + (this.sdfGlyphSize = null), + (this.gpuAccelerateSDF = !0), + (this.debugSDF = !1) + } + sync(et) { + this._needsSync && + ((this._needsSync = !1), + this._isSyncing + ? (this._queuedSyncs || (this._queuedSyncs = [])).push(et) + : ((this._isSyncing = !0), + this.dispatchEvent(syncStartEvent), + getTextRenderInfo( + { + text: this.text, + font: this.font, + fontSize: this.fontSize || 0.1, + letterSpacing: this.letterSpacing || 0, + lineHeight: this.lineHeight || 'normal', + maxWidth: this.maxWidth, + direction: this.direction || 'auto', + textAlign: this.textAlign, + textIndent: this.textIndent, + whiteSpace: this.whiteSpace, + overflowWrap: this.overflowWrap, + anchorX: this.anchorX, + anchorY: this.anchorY, + colorRanges: this.colorRanges, + includeCaretPositions: !0, + sdfGlyphSize: this.sdfGlyphSize, + gpuAccelerateSDF: this.gpuAccelerateSDF, + }, + (nt) => { + ;(this._isSyncing = !1), + (this._textRenderInfo = nt), + this.geometry.updateGlyphs( + nt.glyphBounds, + nt.glyphAtlasIndices, + nt.blockBounds, + nt.chunkedBounds, + nt.glyphColors, + ) + const rt = this._queuedSyncs + rt && + ((this._queuedSyncs = null), + (this._needsSync = !0), + this.sync(() => { + rt.forEach((it) => it && it()) + })), + this.dispatchEvent(syncCompleteEvent), + et && et() + }, + ))) + } + onBeforeRender(et, nt, rt, it, ot, at) { + this.sync(), + ot.isTroikaTextMaterial && this._prepareForRender(ot), + (ot._hadOwnSide = ot.hasOwnProperty('side')), + this.geometry.setSide((ot._actualSide = ot.side)), + (ot.side = FrontSide) + } + onAfterRender(et, nt, rt, it, ot, at) { + ot._hadOwnSide ? (ot.side = ot._actualSide) : delete ot.side + } + dispose() { + this.geometry.dispose() + } + get textRenderInfo() { + return this._textRenderInfo || null + } + get material() { + let et = this._derivedMaterial + const nt = this._baseMaterial || this._defaultMaterial || (this._defaultMaterial = defaultMaterial.clone()) + if ( + ((!et || et.baseMaterial !== nt) && + ((et = this._derivedMaterial = createTextDerivedMaterial(nt)), + nt.addEventListener('dispose', function rt() { + nt.removeEventListener('dispose', rt), et.dispose() + })), + this.outlineWidth || this.outlineBlur || this.outlineOffsetX || this.outlineOffsetY) + ) { + let rt = et._outlineMtl + return ( + rt || + ((rt = et._outlineMtl = Object.create(et, { id: { value: et.id + 0.1 } })), + (rt.isTextOutlineMaterial = !0), + (rt.depthWrite = !1), + (rt.map = null), + et.addEventListener('dispose', function it() { + et.removeEventListener('dispose', it), rt.dispose() + })), + [rt, et] + ) + } else return et + } + set material(et) { + et && et.isTroikaTextMaterial + ? ((this._derivedMaterial = et), (this._baseMaterial = et.baseMaterial)) + : (this._baseMaterial = et) + } + get glyphGeometryDetail() { + return this.geometry.detail + } + set glyphGeometryDetail(et) { + this.geometry.detail = et + } + get curveRadius() { + return this.geometry.curveRadius + } + set curveRadius(et) { + this.geometry.curveRadius = et + } + get customDepthMaterial() { + return first(this.material).getDepthMaterial() + } + get customDistanceMaterial() { + return first(this.material).getDistanceMaterial() + } + _prepareForRender(et) { + const nt = et.isTextOutlineMaterial, + rt = et.uniforms, + it = this.textRenderInfo + if (it) { + const { sdfTexture: st, blockBounds: lt } = it + ;(rt.uTroikaSDFTexture.value = st), + rt.uTroikaSDFTextureSize.value.set(st.image.width, st.image.height), + (rt.uTroikaSDFGlyphSize.value = it.sdfGlyphSize), + (rt.uTroikaSDFExponent.value = it.sdfExponent), + rt.uTroikaTotalBounds.value.fromArray(lt), + (rt.uTroikaUseGlyphColors.value = !nt && !!it.glyphColors) + let ct = 0, + ut = 0, + ht = 0, + dt, + pt, + mt, + gt = 0, + yt = 0 + if (nt) { + let { outlineWidth: vt, outlineOffsetX: xt, outlineOffsetY: kt, outlineBlur: St, outlineOpacity: Tt } = this + ;(ct = this._parsePercent(vt) || 0), + (ut = Math.max(0, this._parsePercent(St) || 0)), + (dt = Tt), + (gt = this._parsePercent(xt) || 0), + (yt = this._parsePercent(kt) || 0) + } else + (ht = Math.max(0, this._parsePercent(this.strokeWidth) || 0)), + ht && + ((mt = this.strokeColor), + rt.uTroikaStrokeColor.value.set(mt ?? defaultStrokeColor), + (pt = this.strokeOpacity), + pt == null && (pt = 1)), + (dt = this.fillOpacity) + ;(rt.uTroikaDistanceOffset.value = ct), + rt.uTroikaPositionOffset.value.set(gt, yt), + (rt.uTroikaBlurRadius.value = ut), + (rt.uTroikaStrokeWidth.value = ht), + (rt.uTroikaStrokeOpacity.value = pt), + (rt.uTroikaFillOpacity.value = dt ?? 1), + (rt.uTroikaCurveRadius.value = this.curveRadius || 0) + let bt = this.clipRect + if (bt && Array.isArray(bt) && bt.length === 4) rt.uTroikaClipRect.value.fromArray(bt) + else { + const vt = (this.fontSize || 0.1) * 100 + rt.uTroikaClipRect.value.set(lt[0] - vt, lt[1] - vt, lt[2] + vt, lt[3] + vt) + } + this.geometry.applyClipRect(rt.uTroikaClipRect.value) + } + ;(rt.uTroikaSDFDebug.value = !!this.debugSDF), + (et.polygonOffset = !!this.depthOffset), + (et.polygonOffsetFactor = et.polygonOffsetUnits = this.depthOffset || 0) + const ot = nt ? this.outlineColor || 0 : this.color + if (ot == null) delete et.color + else { + const st = et.hasOwnProperty('color') ? et.color : (et.color = new Color$1()) + ;(ot !== st._input || typeof ot == 'object') && st.set((st._input = ot)) + } + let at = this.orientation || defaultOrient + if (at !== et._orientation) { + let st = rt.uTroikaOrient.value + at = at.replace(/[^-+xyz]/g, '') + let lt = at !== defaultOrient && at.match(/^([-+])([xyz])([-+])([xyz])$/) + if (lt) { + let [, ct, ut, ht, dt] = lt + ;(tempVec3a.set(0, 0, 0)[ut] = ct === '-' ? 1 : -1), + (tempVec3b.set(0, 0, 0)[dt] = ht === '-' ? -1 : 1), + tempMat4.lookAt(origin, tempVec3a.cross(tempVec3b), tempVec3b), + st.setFromMatrix4(tempMat4) + } else st.identity() + et._orientation = at + } + } + _parsePercent(et) { + if (typeof et == 'string') { + let nt = et.match(/^(-?[\d.]+)%$/), + rt = nt ? parseFloat(nt[1]) : NaN + et = (isNaN(rt) ? 0 : rt / 100) * this.fontSize + } + return et + } + localPositionToTextCoords(et, nt = new Vector2()) { + nt.copy(et) + const rt = this.curveRadius + return rt && (nt.x = Math.atan2(et.x, Math.abs(rt) - Math.abs(et.z)) * Math.abs(rt)), nt + } + worldPositionToTextCoords(et, nt = new Vector2()) { + return tempVec3a.copy(et), this.localPositionToTextCoords(this.worldToLocal(tempVec3a), nt) + } + raycast(et, nt) { + const { textRenderInfo: rt, curveRadius: it } = this + if (rt) { + const ot = rt.blockBounds, + at = it ? getCurvedRaycastMesh() : getFlatRaycastMesh(), + st = at.geometry, + { position: lt, uv: ct } = st.attributes + for (let ut = 0; ut < ct.count; ut++) { + let ht = ot[0] + ct.getX(ut) * (ot[2] - ot[0]) + const dt = ot[1] + ct.getY(ut) * (ot[3] - ot[1]) + let pt = 0 + it && ((pt = it - Math.cos(ht / it) * it), (ht = Math.sin(ht / it) * it)), lt.setXYZ(ut, ht, dt, pt) + } + ;(st.boundingSphere = this.geometry.boundingSphere), + (st.boundingBox = this.geometry.boundingBox), + (at.matrixWorld = this.matrixWorld), + (at.material.side = this.material.side), + (tempArray.length = 0), + at.raycast(et, tempArray) + for (let ut = 0; ut < tempArray.length; ut++) (tempArray[ut].object = this), nt.push(tempArray[ut]) + } + } + copy(et) { + const nt = this.geometry + return ( + super.copy(et), + (this.geometry = nt), + COPYABLE_PROPS.forEach((rt) => { + this[rt] = et[rt] + }), + this + ) + } + clone() { + return new this.constructor().copy(this) + } + } + SYNCABLE_PROPS.forEach((tt) => { + const et = '_private_' + tt + Object.defineProperty(Text$2.prototype, tt, { + get() { + return this[et] + }, + set(nt) { + nt !== this[et] && ((this[et] = nt), (this._needsSync = !0)) + }, + }) + }) + function shallowEqualArrays(tt, et, nt = (rt, it) => rt === it) { + if (tt === et) return !0 + if (!tt || !et) return !1 + const rt = tt.length + if (et.length !== rt) return !1 + for (let it = 0; it < rt; it++) if (!nt(tt[it], et[it])) return !1 + return !0 + } + const globalCache = [] + function query(tt, et, nt = !1, rt = {}) { + for (const ot of globalCache) + if (shallowEqualArrays(et, ot.keys, ot.equal)) { + if (nt) return + if (Object.prototype.hasOwnProperty.call(ot, 'error')) throw ot.error + if (Object.prototype.hasOwnProperty.call(ot, 'response')) return ot.response + if (!nt) throw ot.promise + } + const it = { + keys: et, + equal: rt.equal, + promise: tt(...et) + .then((ot) => (it.response = ot)) + .then(() => { + rt.lifespan && + rt.lifespan > 0 && + setTimeout(() => { + const ot = globalCache.indexOf(it) + ot !== -1 && globalCache.splice(ot, 1) + }, rt.lifespan) + }) + .catch((ot) => (it.error = ot)), + } + if ((globalCache.push(it), !nt)) throw it.promise + } + const suspend = (tt, et, nt) => query(tt, et, !1, nt), + Text$1 = reactExports.forwardRef( + ( + { + anchorX: tt = 'center', + anchorY: et = 'middle', + font: nt, + fontSize: rt = 1, + children: it, + characters: ot, + onSync: at, + ...st + }, + lt, + ) => { + const ct = useThree(({ invalidate: pt }) => pt), + [ut] = reactExports.useState(() => new Text$2()), + [ht, dt] = reactExports.useMemo(() => { + const pt = [] + let mt = '' + return ( + reactExports.Children.forEach(it, (gt) => { + typeof gt == 'string' || typeof gt == 'number' ? (mt += gt) : pt.push(gt) + }), + [pt, mt] + ) + }, [it]) + return ( + suspend(() => new Promise((pt) => preloadFont({ font: nt, characters: ot }, pt)), ['troika-text', nt, ot]), + reactExports.useLayoutEffect( + () => + void ut.sync(() => { + ct(), at && at(ut) + }), + ), + reactExports.useEffect(() => () => ut.dispose(), [ut]), + reactExports.createElement( + 'primitive', + _extends$u({ object: ut, ref: lt, font: nt, text: dt, anchorX: tt, anchorY: et, fontSize: rt }, st), + ht, + ) + ) + }, + ), + IsObject = (tt) => tt === Object(tt) && !Array.isArray(tt) && typeof tt != 'function' + function useTexture(tt, et) { + const nt = useThree((it) => it.gl), + rt = useLoader(TextureLoader, IsObject(tt) ? Object.values(tt) : tt) + if ( + (reactExports.useLayoutEffect(() => { + et == null || et(rt) + }, [et]), + reactExports.useEffect(() => { + ;(Array.isArray(rt) ? rt : [rt]).forEach(nt.initTexture) + }, [nt, rt]), + IsObject(tt)) + ) { + const it = Object.keys(tt), + ot = {} + return it.forEach((at) => Object.assign(ot, { [at]: rt[it.indexOf(at)] })), ot + } else return rt + } + useTexture.preload = (tt) => useLoader.preload(TextureLoader, tt) + useTexture.clear = (tt) => useLoader.clear(TextureLoader, tt) + /*! + * camera-controls + * https://github.com/yomotsu/camera-controls + * (c) 2017 @yomotsu + * Released under the MIT License. + */ const MOUSE_BUTTON = { LEFT: 1, RIGHT: 2, MIDDLE: 4 }, + ACTION = Object.freeze({ + NONE: 0, + ROTATE: 1, + TRUCK: 2, + OFFSET: 4, + DOLLY: 8, + ZOOM: 16, + TOUCH_ROTATE: 32, + TOUCH_TRUCK: 64, + TOUCH_OFFSET: 128, + TOUCH_DOLLY: 256, + TOUCH_ZOOM: 512, + TOUCH_DOLLY_TRUCK: 1024, + TOUCH_DOLLY_OFFSET: 2048, + TOUCH_DOLLY_ROTATE: 4096, + TOUCH_ZOOM_TRUCK: 8192, + TOUCH_ZOOM_OFFSET: 16384, + TOUCH_ZOOM_ROTATE: 32768, + }), + DOLLY_DIRECTION = { NONE: 0, IN: 1, OUT: -1 } + function isPerspectiveCamera(tt) { + return tt.isPerspectiveCamera + } + function isOrthographicCamera(tt) { + return tt.isOrthographicCamera + } + const PI_2 = Math.PI * 2, + PI_HALF = Math.PI / 2, + EPSILON$1 = 1e-5, + DEG2RAD = Math.PI / 180 + function clamp$4(tt, et, nt) { + return Math.max(et, Math.min(nt, tt)) + } + function approxZero(tt, et = EPSILON$1) { + return Math.abs(tt) < et + } + function approxEquals(tt, et, nt = EPSILON$1) { + return approxZero(tt - et, nt) + } + function roundToStep(tt, et) { + return Math.round(tt / et) * et + } + function infinityToMaxNumber(tt) { + return isFinite(tt) ? tt : tt < 0 ? -Number.MAX_VALUE : Number.MAX_VALUE + } + function maxNumberToInfinity(tt) { + return Math.abs(tt) < Number.MAX_VALUE ? tt : tt * (1 / 0) + } + function smoothDamp(tt, et, nt, rt, it = 1 / 0, ot) { + rt = Math.max(1e-4, rt) + const at = 2 / rt, + st = at * ot, + lt = 1 / (1 + st + 0.48 * st * st + 0.235 * st * st * st) + let ct = tt - et + const ut = et, + ht = it * rt + ;(ct = clamp$4(ct, -ht, ht)), (et = tt - ct) + const dt = (nt.value + at * ct) * ot + nt.value = (nt.value - at * dt) * lt + let pt = et + (ct + dt) * lt + return ut - tt > 0 == pt > ut && ((pt = ut), (nt.value = (pt - ut) / ot)), pt + } + function smoothDampVec3(tt, et, nt, rt, it = 1 / 0, ot, at) { + rt = Math.max(1e-4, rt) + const st = 2 / rt, + lt = st * ot, + ct = 1 / (1 + lt + 0.48 * lt * lt + 0.235 * lt * lt * lt) + let ut = et.x, + ht = et.y, + dt = et.z, + pt = tt.x - ut, + mt = tt.y - ht, + gt = tt.z - dt + const yt = ut, + bt = ht, + vt = dt, + xt = it * rt, + kt = xt * xt, + St = pt * pt + mt * mt + gt * gt + if (St > kt) { + const It = Math.sqrt(St) + ;(pt = (pt / It) * xt), (mt = (mt / It) * xt), (gt = (gt / It) * xt) + } + ;(ut = tt.x - pt), (ht = tt.y - mt), (dt = tt.z - gt) + const Tt = (nt.x + st * pt) * ot, + At = (nt.y + st * mt) * ot, + Et = (nt.z + st * gt) * ot + ;(nt.x = (nt.x - st * Tt) * ct), + (nt.y = (nt.y - st * At) * ct), + (nt.z = (nt.z - st * Et) * ct), + (at.x = ut + (pt + Tt) * ct), + (at.y = ht + (mt + At) * ct), + (at.z = dt + (gt + Et) * ct) + const $t = yt - tt.x, + Dt = bt - tt.y, + jt = vt - tt.z, + Pt = at.x - yt, + Ct = at.y - bt, + wt = at.z - vt + return ( + $t * Pt + Dt * Ct + jt * wt > 0 && + ((at.x = yt), + (at.y = bt), + (at.z = vt), + (nt.x = (at.x - yt) / ot), + (nt.y = (at.y - bt) / ot), + (nt.z = (at.z - vt) / ot)), + at + ) + } + function extractClientCoordFromEvent(tt, et) { + et.set(0, 0), + tt.forEach((nt) => { + ;(et.x += nt.clientX), (et.y += nt.clientY) + }), + (et.x /= tt.length), + (et.y /= tt.length) + } + function notSupportedInOrthographicCamera(tt, et) { + return isOrthographicCamera(tt) ? (console.warn(`${et} is not supported in OrthographicCamera`), !0) : !1 + } + class EventDispatcher { + constructor() { + this._listeners = {} + } + addEventListener(et, nt) { + const rt = this._listeners + rt[et] === void 0 && (rt[et] = []), rt[et].indexOf(nt) === -1 && rt[et].push(nt) + } + hasEventListener(et, nt) { + const rt = this._listeners + return rt[et] !== void 0 && rt[et].indexOf(nt) !== -1 + } + removeEventListener(et, nt) { + const it = this._listeners[et] + if (it !== void 0) { + const ot = it.indexOf(nt) + ot !== -1 && it.splice(ot, 1) + } + } + removeAllEventListeners(et) { + if (!et) { + this._listeners = {} + return + } + Array.isArray(this._listeners[et]) && (this._listeners[et].length = 0) + } + dispatchEvent(et) { + const rt = this._listeners[et.type] + if (rt !== void 0) { + et.target = this + const it = rt.slice(0) + for (let ot = 0, at = it.length; ot < at; ot++) it[ot].call(this, et) + } + } + } + const VERSION = '2.7.2', + TOUCH_DOLLY_FACTOR = 1 / 8, + isBrowser = typeof window < 'u', + isMac = isBrowser && /Mac/.test(navigator.platform), + isPointerEventsNotSupported = !(isBrowser && 'PointerEvent' in window) + let THREE, + _ORIGIN, + _AXIS_Y, + _AXIS_Z, + _v2, + _v3A, + _v3B, + _v3C, + _cameraDirection, + _xColumn, + _yColumn, + _zColumn, + _deltaTarget, + _deltaOffset, + _sphericalA, + _sphericalB, + _box3A, + _box3B, + _sphere, + _quaternionA, + _quaternionB, + _rotationMatrix, + _raycaster, + CameraControls$1 = class y1 extends EventDispatcher { + static install(et) { + ;(THREE = et.THREE), + (_ORIGIN = Object.freeze(new THREE.Vector3(0, 0, 0))), + (_AXIS_Y = Object.freeze(new THREE.Vector3(0, 1, 0))), + (_AXIS_Z = Object.freeze(new THREE.Vector3(0, 0, 1))), + (_v2 = new THREE.Vector2()), + (_v3A = new THREE.Vector3()), + (_v3B = new THREE.Vector3()), + (_v3C = new THREE.Vector3()), + (_cameraDirection = new THREE.Vector3()), + (_xColumn = new THREE.Vector3()), + (_yColumn = new THREE.Vector3()), + (_zColumn = new THREE.Vector3()), + (_deltaTarget = new THREE.Vector3()), + (_deltaOffset = new THREE.Vector3()), + (_sphericalA = new THREE.Spherical()), + (_sphericalB = new THREE.Spherical()), + (_box3A = new THREE.Box3()), + (_box3B = new THREE.Box3()), + (_sphere = new THREE.Sphere()), + (_quaternionA = new THREE.Quaternion()), + (_quaternionB = new THREE.Quaternion()), + (_rotationMatrix = new THREE.Matrix4()), + (_raycaster = new THREE.Raycaster()) + } + static get ACTION() { + return ACTION + } + constructor(et, nt) { + super(), + (this.minPolarAngle = 0), + (this.maxPolarAngle = Math.PI), + (this.minAzimuthAngle = -1 / 0), + (this.maxAzimuthAngle = 1 / 0), + (this.minDistance = Number.EPSILON), + (this.maxDistance = 1 / 0), + (this.infinityDolly = !1), + (this.minZoom = 0.01), + (this.maxZoom = 1 / 0), + (this.smoothTime = 0.25), + (this.draggingSmoothTime = 0.125), + (this.maxSpeed = 1 / 0), + (this.azimuthRotateSpeed = 1), + (this.polarRotateSpeed = 1), + (this.dollySpeed = 1), + (this.dollyDragInverted = !1), + (this.truckSpeed = 2), + (this.dollyToCursor = !1), + (this.dragToOffset = !1), + (this.verticalDragToForward = !1), + (this.boundaryFriction = 0), + (this.restThreshold = 0.01), + (this.colliderMeshes = []), + (this.cancel = () => {}), + (this._enabled = !0), + (this._state = ACTION.NONE), + (this._viewport = null), + (this._changedDolly = 0), + (this._changedZoom = 0), + (this._hasRested = !0), + (this._boundaryEnclosesCamera = !1), + (this._needsUpdate = !0), + (this._updatedLastTime = !1), + (this._elementRect = new DOMRect()), + (this._isDragging = !1), + (this._activePointers = []), + (this._lockedPointer = null), + (this._interactiveArea = new DOMRect(0, 0, 1, 1)), + (this._isUserControllingRotate = !1), + (this._isUserControllingDolly = !1), + (this._isUserControllingTruck = !1), + (this._isUserControllingOffset = !1), + (this._isUserControllingZoom = !1), + (this._lastDollyDirection = DOLLY_DIRECTION.NONE), + (this._thetaVelocity = { value: 0 }), + (this._phiVelocity = { value: 0 }), + (this._radiusVelocity = { value: 0 }), + (this._targetVelocity = new THREE.Vector3()), + (this._focalOffsetVelocity = new THREE.Vector3()), + (this._zoomVelocity = { value: 0 }), + (this._truckInternal = (kt, St, Tt) => { + let At, Et + if (isPerspectiveCamera(this._camera)) { + const $t = _v3A.copy(this._camera.position).sub(this._target), + Dt = this._camera.getEffectiveFOV() * DEG2RAD, + jt = $t.length() * Math.tan(Dt * 0.5) + ;(At = (this.truckSpeed * kt * jt) / this._elementRect.height), + (Et = (this.truckSpeed * St * jt) / this._elementRect.height) + } else if (isOrthographicCamera(this._camera)) { + const $t = this._camera + ;(At = (kt * ($t.right - $t.left)) / $t.zoom / this._elementRect.width), + (Et = (St * ($t.top - $t.bottom)) / $t.zoom / this._elementRect.height) + } else return + this.verticalDragToForward + ? (Tt + ? this.setFocalOffset(this._focalOffsetEnd.x + At, this._focalOffsetEnd.y, this._focalOffsetEnd.z, !0) + : this.truck(At, 0, !0), + this.forward(-Et, !0)) + : Tt + ? this.setFocalOffset( + this._focalOffsetEnd.x + At, + this._focalOffsetEnd.y + Et, + this._focalOffsetEnd.z, + !0, + ) + : this.truck(At, Et, !0) + }), + (this._rotateInternal = (kt, St) => { + const Tt = (PI_2 * this.azimuthRotateSpeed * kt) / this._elementRect.height, + At = (PI_2 * this.polarRotateSpeed * St) / this._elementRect.height + this.rotate(Tt, At, !0) + }), + (this._dollyInternal = (kt, St, Tt) => { + const At = Math.pow(0.95, -kt * this.dollySpeed), + Et = this._sphericalEnd.radius, + $t = this._sphericalEnd.radius * At, + Dt = clamp$4($t, this.minDistance, this.maxDistance), + jt = Dt - $t + this.infinityDolly && this.dollyToCursor + ? this._dollyToNoClamp($t, !0) + : this.infinityDolly && !this.dollyToCursor + ? (this.dollyInFixed(jt, !0), this._dollyToNoClamp(Dt, !0)) + : this._dollyToNoClamp(Dt, !0), + this.dollyToCursor && + ((this._changedDolly += (this.infinityDolly ? $t : Dt) - Et), this._dollyControlCoord.set(St, Tt)), + (this._lastDollyDirection = Math.sign(-kt)) + }), + (this._zoomInternal = (kt, St, Tt) => { + const At = Math.pow(0.95, kt * this.dollySpeed), + Et = this._zoom, + $t = this._zoom * At + this.zoomTo($t, !0), + this.dollyToCursor && ((this._changedZoom += $t - Et), this._dollyControlCoord.set(St, Tt)) + }), + typeof THREE > 'u' && + console.error( + 'camera-controls: `THREE` is undefined. You must first run `CameraControls.install( { THREE: THREE } )`. Check the docs for further information.', + ), + (this._camera = et), + (this._yAxisUpSpace = new THREE.Quaternion().setFromUnitVectors(this._camera.up, _AXIS_Y)), + (this._yAxisUpSpaceInverse = this._yAxisUpSpace.clone().invert()), + (this._state = ACTION.NONE), + (this._target = new THREE.Vector3()), + (this._targetEnd = this._target.clone()), + (this._focalOffset = new THREE.Vector3()), + (this._focalOffsetEnd = this._focalOffset.clone()), + (this._spherical = new THREE.Spherical().setFromVector3( + _v3A.copy(this._camera.position).applyQuaternion(this._yAxisUpSpace), + )), + (this._sphericalEnd = this._spherical.clone()), + (this._lastDistance = this._spherical.radius), + (this._zoom = this._camera.zoom), + (this._zoomEnd = this._zoom), + (this._lastZoom = this._zoom), + (this._nearPlaneCorners = [ + new THREE.Vector3(), + new THREE.Vector3(), + new THREE.Vector3(), + new THREE.Vector3(), + ]), + this._updateNearPlaneCorners(), + (this._boundary = new THREE.Box3( + new THREE.Vector3(-1 / 0, -1 / 0, -1 / 0), + new THREE.Vector3(1 / 0, 1 / 0, 1 / 0), + )), + (this._cameraUp0 = this._camera.up.clone()), + (this._target0 = this._target.clone()), + (this._position0 = this._camera.position.clone()), + (this._zoom0 = this._zoom), + (this._focalOffset0 = this._focalOffset.clone()), + (this._dollyControlCoord = new THREE.Vector2()), + (this.mouseButtons = { + left: ACTION.ROTATE, + middle: ACTION.DOLLY, + right: ACTION.TRUCK, + wheel: isPerspectiveCamera(this._camera) + ? ACTION.DOLLY + : isOrthographicCamera(this._camera) + ? ACTION.ZOOM + : ACTION.NONE, + }), + (this.touches = { + one: ACTION.TOUCH_ROTATE, + two: isPerspectiveCamera(this._camera) + ? ACTION.TOUCH_DOLLY_TRUCK + : isOrthographicCamera(this._camera) + ? ACTION.TOUCH_ZOOM_TRUCK + : ACTION.NONE, + three: ACTION.TOUCH_TRUCK, + }) + const rt = new THREE.Vector2(), + it = new THREE.Vector2(), + ot = new THREE.Vector2(), + at = (kt) => { + if (!this._enabled || !this._domElement) return + if ( + this._interactiveArea.left !== 0 || + this._interactiveArea.top !== 0 || + this._interactiveArea.width !== 1 || + this._interactiveArea.height !== 1 + ) { + const At = this._domElement.getBoundingClientRect(), + Et = kt.clientX / At.width, + $t = kt.clientY / At.height + if ( + Et < this._interactiveArea.left || + Et > this._interactiveArea.right || + $t < this._interactiveArea.top || + $t > this._interactiveArea.bottom + ) + return + } + const St = + kt.pointerType !== 'mouse' + ? null + : (kt.buttons & MOUSE_BUTTON.LEFT) === MOUSE_BUTTON.LEFT + ? MOUSE_BUTTON.LEFT + : (kt.buttons & MOUSE_BUTTON.MIDDLE) === MOUSE_BUTTON.MIDDLE + ? MOUSE_BUTTON.MIDDLE + : (kt.buttons & MOUSE_BUTTON.RIGHT) === MOUSE_BUTTON.RIGHT + ? MOUSE_BUTTON.RIGHT + : null + if (St !== null) { + const At = this._findPointerByMouseButton(St) + At && this._disposePointer(At) + } + if ((kt.buttons & MOUSE_BUTTON.LEFT) === MOUSE_BUTTON.LEFT && this._lockedPointer) return + const Tt = { + pointerId: kt.pointerId, + clientX: kt.clientX, + clientY: kt.clientY, + deltaX: 0, + deltaY: 0, + mouseButton: St, + } + this._activePointers.push(Tt), + this._domElement.ownerDocument.removeEventListener('pointermove', lt, { passive: !1 }), + this._domElement.ownerDocument.removeEventListener('pointerup', ut), + this._domElement.ownerDocument.addEventListener('pointermove', lt, { passive: !1 }), + this._domElement.ownerDocument.addEventListener('pointerup', ut), + (this._isDragging = !0), + gt(kt) + }, + st = (kt) => { + if (!this._enabled || !this._domElement || this._lockedPointer) return + if ( + this._interactiveArea.left !== 0 || + this._interactiveArea.top !== 0 || + this._interactiveArea.width !== 1 || + this._interactiveArea.height !== 1 + ) { + const At = this._domElement.getBoundingClientRect(), + Et = kt.clientX / At.width, + $t = kt.clientY / At.height + if ( + Et < this._interactiveArea.left || + Et > this._interactiveArea.right || + $t < this._interactiveArea.top || + $t > this._interactiveArea.bottom + ) + return + } + const St = + (kt.buttons & MOUSE_BUTTON.LEFT) === MOUSE_BUTTON.LEFT + ? MOUSE_BUTTON.LEFT + : (kt.buttons & MOUSE_BUTTON.MIDDLE) === MOUSE_BUTTON.MIDDLE + ? MOUSE_BUTTON.MIDDLE + : (kt.buttons & MOUSE_BUTTON.RIGHT) === MOUSE_BUTTON.RIGHT + ? MOUSE_BUTTON.RIGHT + : null + if (St !== null) { + const At = this._findPointerByMouseButton(St) + At && this._disposePointer(At) + } + const Tt = { + pointerId: 1, + clientX: kt.clientX, + clientY: kt.clientY, + deltaX: 0, + deltaY: 0, + mouseButton: + (kt.buttons & MOUSE_BUTTON.LEFT) === MOUSE_BUTTON.LEFT + ? MOUSE_BUTTON.LEFT + : (kt.buttons & MOUSE_BUTTON.MIDDLE) === MOUSE_BUTTON.LEFT + ? MOUSE_BUTTON.MIDDLE + : (kt.buttons & MOUSE_BUTTON.RIGHT) === MOUSE_BUTTON.LEFT + ? MOUSE_BUTTON.RIGHT + : null, + } + this._activePointers.push(Tt), + this._domElement.ownerDocument.removeEventListener('mousemove', ct), + this._domElement.ownerDocument.removeEventListener('mouseup', ht), + this._domElement.ownerDocument.addEventListener('mousemove', ct), + this._domElement.ownerDocument.addEventListener('mouseup', ht), + (this._isDragging = !0), + gt(kt) + }, + lt = (kt) => { + kt.cancelable && kt.preventDefault() + const St = kt.pointerId, + Tt = this._lockedPointer || this._findPointerById(St) + if (Tt) { + if ( + ((Tt.clientX = kt.clientX), + (Tt.clientY = kt.clientY), + (Tt.deltaX = kt.movementX), + (Tt.deltaY = kt.movementY), + (this._state = 0), + kt.pointerType === 'touch') + ) + switch (this._activePointers.length) { + case 1: + this._state = this.touches.one + break + case 2: + this._state = this.touches.two + break + case 3: + this._state = this.touches.three + break + } + else + ((!this._isDragging && this._lockedPointer) || + (this._isDragging && (kt.buttons & MOUSE_BUTTON.LEFT) === MOUSE_BUTTON.LEFT)) && + (this._state = this._state | this.mouseButtons.left), + this._isDragging && + (kt.buttons & MOUSE_BUTTON.MIDDLE) === MOUSE_BUTTON.MIDDLE && + (this._state = this._state | this.mouseButtons.middle), + this._isDragging && + (kt.buttons & MOUSE_BUTTON.RIGHT) === MOUSE_BUTTON.RIGHT && + (this._state = this._state | this.mouseButtons.right) + yt() + } + }, + ct = (kt) => { + const St = this._lockedPointer || this._findPointerById(1) + St && + ((St.clientX = kt.clientX), + (St.clientY = kt.clientY), + (St.deltaX = kt.movementX), + (St.deltaY = kt.movementY), + (this._state = 0), + (this._lockedPointer || (kt.buttons & MOUSE_BUTTON.LEFT) === MOUSE_BUTTON.LEFT) && + (this._state = this._state | this.mouseButtons.left), + (kt.buttons & MOUSE_BUTTON.MIDDLE) === MOUSE_BUTTON.MIDDLE && + (this._state = this._state | this.mouseButtons.middle), + (kt.buttons & MOUSE_BUTTON.RIGHT) === MOUSE_BUTTON.RIGHT && + (this._state = this._state | this.mouseButtons.right), + yt()) + }, + ut = (kt) => { + const St = this._findPointerById(kt.pointerId) + if (!(St && St === this._lockedPointer)) { + if ((St && this._disposePointer(St), kt.pointerType === 'touch')) + switch (this._activePointers.length) { + case 0: + this._state = ACTION.NONE + break + case 1: + this._state = this.touches.one + break + case 2: + this._state = this.touches.two + break + case 3: + this._state = this.touches.three + break + } + else this._state = ACTION.NONE + bt() + } + }, + ht = () => { + const kt = this._findPointerById(1) + ;(kt && kt === this._lockedPointer) || (kt && this._disposePointer(kt), (this._state = ACTION.NONE), bt()) + } + let dt = -1 + const pt = (kt) => { + if (!this._domElement || !this._enabled || this.mouseButtons.wheel === ACTION.NONE) return + if ( + this._interactiveArea.left !== 0 || + this._interactiveArea.top !== 0 || + this._interactiveArea.width !== 1 || + this._interactiveArea.height !== 1 + ) { + const $t = this._domElement.getBoundingClientRect(), + Dt = kt.clientX / $t.width, + jt = kt.clientY / $t.height + if ( + Dt < this._interactiveArea.left || + Dt > this._interactiveArea.right || + jt < this._interactiveArea.top || + jt > this._interactiveArea.bottom + ) + return + } + if ( + (kt.preventDefault(), + this.dollyToCursor || + this.mouseButtons.wheel === ACTION.ROTATE || + this.mouseButtons.wheel === ACTION.TRUCK) + ) { + const $t = performance.now() + dt - $t < 1e3 && this._getClientRect(this._elementRect), (dt = $t) + } + const St = isMac ? -1 : -3, + Tt = kt.deltaMode === 1 ? kt.deltaY / St : kt.deltaY / (St * 10), + At = this.dollyToCursor ? ((kt.clientX - this._elementRect.x) / this._elementRect.width) * 2 - 1 : 0, + Et = this.dollyToCursor ? ((kt.clientY - this._elementRect.y) / this._elementRect.height) * -2 + 1 : 0 + switch (this.mouseButtons.wheel) { + case ACTION.ROTATE: { + this._rotateInternal(kt.deltaX, kt.deltaY), (this._isUserControllingRotate = !0) + break + } + case ACTION.TRUCK: { + this._truckInternal(kt.deltaX, kt.deltaY, !1), (this._isUserControllingTruck = !0) + break + } + case ACTION.OFFSET: { + this._truckInternal(kt.deltaX, kt.deltaY, !0), (this._isUserControllingOffset = !0) + break + } + case ACTION.DOLLY: { + this._dollyInternal(-Tt, At, Et), (this._isUserControllingDolly = !0) + break + } + case ACTION.ZOOM: { + this._zoomInternal(-Tt, At, Et), (this._isUserControllingZoom = !0) + break + } + } + this.dispatchEvent({ type: 'control' }) + }, + mt = (kt) => { + if (!(!this._domElement || !this._enabled)) { + if (this.mouseButtons.right === y1.ACTION.NONE) { + const St = kt instanceof PointerEvent ? kt.pointerId : (kt instanceof MouseEvent, 0), + Tt = this._findPointerById(St) + Tt && this._disposePointer(Tt), + this._domElement.ownerDocument.removeEventListener('pointermove', lt, { passive: !1 }), + this._domElement.ownerDocument.removeEventListener('pointerup', ut), + this._domElement.ownerDocument.removeEventListener('mousemove', ct), + this._domElement.ownerDocument.removeEventListener('mouseup', ht) + return + } + kt.preventDefault() + } + }, + gt = (kt) => { + if (!this._enabled) return + if ( + (extractClientCoordFromEvent(this._activePointers, _v2), + this._getClientRect(this._elementRect), + rt.copy(_v2), + it.copy(_v2), + this._activePointers.length >= 2) + ) { + const Tt = _v2.x - this._activePointers[1].clientX, + At = _v2.y - this._activePointers[1].clientY, + Et = Math.sqrt(Tt * Tt + At * At) + ot.set(0, Et) + const $t = (this._activePointers[0].clientX + this._activePointers[1].clientX) * 0.5, + Dt = (this._activePointers[0].clientY + this._activePointers[1].clientY) * 0.5 + it.set($t, Dt) + } + if (((this._state = 0), !kt)) this._lockedPointer && (this._state = this._state | this.mouseButtons.left) + else if ('pointerType' in kt && kt.pointerType === 'touch') + switch (this._activePointers.length) { + case 1: + this._state = this.touches.one + break + case 2: + this._state = this.touches.two + break + case 3: + this._state = this.touches.three + break + } + else + !this._lockedPointer && + (kt.buttons & MOUSE_BUTTON.LEFT) === MOUSE_BUTTON.LEFT && + (this._state = this._state | this.mouseButtons.left), + (kt.buttons & MOUSE_BUTTON.MIDDLE) === MOUSE_BUTTON.MIDDLE && + (this._state = this._state | this.mouseButtons.middle), + (kt.buttons & MOUSE_BUTTON.RIGHT) === MOUSE_BUTTON.RIGHT && + (this._state = this._state | this.mouseButtons.right) + ;((this._state & ACTION.ROTATE) === ACTION.ROTATE || + (this._state & ACTION.TOUCH_ROTATE) === ACTION.TOUCH_ROTATE || + (this._state & ACTION.TOUCH_DOLLY_ROTATE) === ACTION.TOUCH_DOLLY_ROTATE || + (this._state & ACTION.TOUCH_ZOOM_ROTATE) === ACTION.TOUCH_ZOOM_ROTATE) && + ((this._sphericalEnd.theta = this._spherical.theta), + (this._sphericalEnd.phi = this._spherical.phi), + (this._thetaVelocity.value = 0), + (this._phiVelocity.value = 0)), + ((this._state & ACTION.TRUCK) === ACTION.TRUCK || + (this._state & ACTION.TOUCH_TRUCK) === ACTION.TOUCH_TRUCK || + (this._state & ACTION.TOUCH_DOLLY_TRUCK) === ACTION.TOUCH_DOLLY_TRUCK || + (this._state & ACTION.TOUCH_ZOOM_TRUCK) === ACTION.TOUCH_ZOOM_TRUCK) && + (this._targetEnd.copy(this._target), this._targetVelocity.set(0, 0, 0)), + ((this._state & ACTION.DOLLY) === ACTION.DOLLY || + (this._state & ACTION.TOUCH_DOLLY) === ACTION.TOUCH_DOLLY || + (this._state & ACTION.TOUCH_DOLLY_TRUCK) === ACTION.TOUCH_DOLLY_TRUCK || + (this._state & ACTION.TOUCH_DOLLY_OFFSET) === ACTION.TOUCH_DOLLY_OFFSET || + (this._state & ACTION.TOUCH_DOLLY_ROTATE) === ACTION.TOUCH_DOLLY_ROTATE) && + ((this._sphericalEnd.radius = this._spherical.radius), (this._radiusVelocity.value = 0)), + ((this._state & ACTION.ZOOM) === ACTION.ZOOM || + (this._state & ACTION.TOUCH_ZOOM) === ACTION.TOUCH_ZOOM || + (this._state & ACTION.TOUCH_ZOOM_TRUCK) === ACTION.TOUCH_ZOOM_TRUCK || + (this._state & ACTION.TOUCH_ZOOM_OFFSET) === ACTION.TOUCH_ZOOM_OFFSET || + (this._state & ACTION.TOUCH_ZOOM_ROTATE) === ACTION.TOUCH_ZOOM_ROTATE) && + ((this._zoomEnd = this._zoom), (this._zoomVelocity.value = 0)), + ((this._state & ACTION.OFFSET) === ACTION.OFFSET || + (this._state & ACTION.TOUCH_OFFSET) === ACTION.TOUCH_OFFSET || + (this._state & ACTION.TOUCH_DOLLY_OFFSET) === ACTION.TOUCH_DOLLY_OFFSET || + (this._state & ACTION.TOUCH_ZOOM_OFFSET) === ACTION.TOUCH_ZOOM_OFFSET) && + (this._focalOffsetEnd.copy(this._focalOffset), this._focalOffsetVelocity.set(0, 0, 0)), + this.dispatchEvent({ type: 'controlstart' }) + }, + yt = () => { + if (!this._enabled) return + extractClientCoordFromEvent(this._activePointers, _v2) + const St = + this._domElement && document.pointerLockElement === this._domElement + ? this._lockedPointer || this._activePointers[0] + : null, + Tt = St ? -St.deltaX : it.x - _v2.x, + At = St ? -St.deltaY : it.y - _v2.y + if ( + (it.copy(_v2), + ((this._state & ACTION.ROTATE) === ACTION.ROTATE || + (this._state & ACTION.TOUCH_ROTATE) === ACTION.TOUCH_ROTATE || + (this._state & ACTION.TOUCH_DOLLY_ROTATE) === ACTION.TOUCH_DOLLY_ROTATE || + (this._state & ACTION.TOUCH_ZOOM_ROTATE) === ACTION.TOUCH_ZOOM_ROTATE) && + (this._rotateInternal(Tt, At), (this._isUserControllingRotate = !0)), + (this._state & ACTION.DOLLY) === ACTION.DOLLY || (this._state & ACTION.ZOOM) === ACTION.ZOOM) + ) { + const Et = this.dollyToCursor ? ((rt.x - this._elementRect.x) / this._elementRect.width) * 2 - 1 : 0, + $t = this.dollyToCursor ? ((rt.y - this._elementRect.y) / this._elementRect.height) * -2 + 1 : 0, + Dt = this.dollyDragInverted ? -1 : 1 + ;(this._state & ACTION.DOLLY) === ACTION.DOLLY + ? (this._dollyInternal(Dt * At * TOUCH_DOLLY_FACTOR, Et, $t), (this._isUserControllingDolly = !0)) + : (this._zoomInternal(Dt * At * TOUCH_DOLLY_FACTOR, Et, $t), (this._isUserControllingZoom = !0)) + } + if ( + (this._state & ACTION.TOUCH_DOLLY) === ACTION.TOUCH_DOLLY || + (this._state & ACTION.TOUCH_ZOOM) === ACTION.TOUCH_ZOOM || + (this._state & ACTION.TOUCH_DOLLY_TRUCK) === ACTION.TOUCH_DOLLY_TRUCK || + (this._state & ACTION.TOUCH_ZOOM_TRUCK) === ACTION.TOUCH_ZOOM_TRUCK || + (this._state & ACTION.TOUCH_DOLLY_OFFSET) === ACTION.TOUCH_DOLLY_OFFSET || + (this._state & ACTION.TOUCH_ZOOM_OFFSET) === ACTION.TOUCH_ZOOM_OFFSET || + (this._state & ACTION.TOUCH_DOLLY_ROTATE) === ACTION.TOUCH_DOLLY_ROTATE || + (this._state & ACTION.TOUCH_ZOOM_ROTATE) === ACTION.TOUCH_ZOOM_ROTATE + ) { + const Et = _v2.x - this._activePointers[1].clientX, + $t = _v2.y - this._activePointers[1].clientY, + Dt = Math.sqrt(Et * Et + $t * $t), + jt = ot.y - Dt + ot.set(0, Dt) + const Pt = this.dollyToCursor ? ((it.x - this._elementRect.x) / this._elementRect.width) * 2 - 1 : 0, + Ct = this.dollyToCursor ? ((it.y - this._elementRect.y) / this._elementRect.height) * -2 + 1 : 0 + ;(this._state & ACTION.TOUCH_DOLLY) === ACTION.TOUCH_DOLLY || + (this._state & ACTION.TOUCH_DOLLY_ROTATE) === ACTION.TOUCH_DOLLY_ROTATE || + (this._state & ACTION.TOUCH_DOLLY_TRUCK) === ACTION.TOUCH_DOLLY_TRUCK || + (this._state & ACTION.TOUCH_DOLLY_OFFSET) === ACTION.TOUCH_DOLLY_OFFSET + ? (this._dollyInternal(jt * TOUCH_DOLLY_FACTOR, Pt, Ct), (this._isUserControllingDolly = !0)) + : (this._zoomInternal(jt * TOUCH_DOLLY_FACTOR, Pt, Ct), (this._isUserControllingZoom = !0)) + } + ;((this._state & ACTION.TRUCK) === ACTION.TRUCK || + (this._state & ACTION.TOUCH_TRUCK) === ACTION.TOUCH_TRUCK || + (this._state & ACTION.TOUCH_DOLLY_TRUCK) === ACTION.TOUCH_DOLLY_TRUCK || + (this._state & ACTION.TOUCH_ZOOM_TRUCK) === ACTION.TOUCH_ZOOM_TRUCK) && + (this._truckInternal(Tt, At, !1), (this._isUserControllingTruck = !0)), + ((this._state & ACTION.OFFSET) === ACTION.OFFSET || + (this._state & ACTION.TOUCH_OFFSET) === ACTION.TOUCH_OFFSET || + (this._state & ACTION.TOUCH_DOLLY_OFFSET) === ACTION.TOUCH_DOLLY_OFFSET || + (this._state & ACTION.TOUCH_ZOOM_OFFSET) === ACTION.TOUCH_ZOOM_OFFSET) && + (this._truckInternal(Tt, At, !0), (this._isUserControllingOffset = !0)), + this.dispatchEvent({ type: 'control' }) + }, + bt = () => { + extractClientCoordFromEvent(this._activePointers, _v2), + it.copy(_v2), + (this._activePointers.length === 0 || + (this._activePointers.length === 1 && this._activePointers[0] === this._lockedPointer)) && + (this._isDragging = !1), + this._activePointers.length === 0 && + this._domElement && + (this._domElement.ownerDocument.removeEventListener('pointermove', lt, { passive: !1 }), + this._domElement.ownerDocument.removeEventListener('mousemove', ct), + this._domElement.ownerDocument.removeEventListener('pointerup', ut), + this._domElement.ownerDocument.removeEventListener('mouseup', ht), + this.dispatchEvent({ type: 'controlend' })) + } + ;(this.lockPointer = () => { + !this._enabled || + !this._domElement || + (this.cancel(), + (this._lockedPointer = { pointerId: -1, clientX: 0, clientY: 0, deltaX: 0, deltaY: 0, mouseButton: null }), + this._activePointers.push(this._lockedPointer), + this._domElement.ownerDocument.removeEventListener('pointermove', lt, { passive: !1 }), + this._domElement.ownerDocument.removeEventListener('pointerup', ut), + this._domElement.requestPointerLock(), + this._domElement.ownerDocument.addEventListener('pointerlockchange', vt), + this._domElement.ownerDocument.addEventListener('pointerlockerror', xt), + this._domElement.ownerDocument.addEventListener('pointermove', lt, { passive: !1 }), + this._domElement.ownerDocument.addEventListener('pointerup', ut), + gt()) + }), + (this.unlockPointer = () => { + this._lockedPointer !== null && (this._disposePointer(this._lockedPointer), (this._lockedPointer = null)), + document.exitPointerLock(), + this.cancel(), + this._domElement && + (this._domElement.ownerDocument.removeEventListener('pointerlockchange', vt), + this._domElement.ownerDocument.removeEventListener('pointerlockerror', xt)) + }) + const vt = () => { + ;(this._domElement && this._domElement.ownerDocument.pointerLockElement === this._domElement) || + this.unlockPointer() + }, + xt = () => { + this.unlockPointer() + } + ;(this._addAllEventListeners = (kt) => { + ;(this._domElement = kt), + (this._domElement.style.touchAction = 'none'), + (this._domElement.style.userSelect = 'none'), + (this._domElement.style.webkitUserSelect = 'none'), + this._domElement.addEventListener('pointerdown', at), + isPointerEventsNotSupported && this._domElement.addEventListener('mousedown', st), + this._domElement.addEventListener('pointercancel', ut), + this._domElement.addEventListener('wheel', pt, { passive: !1 }), + this._domElement.addEventListener('contextmenu', mt) + }), + (this._removeAllEventListeners = () => { + this._domElement && + ((this._domElement.style.touchAction = ''), + (this._domElement.style.userSelect = ''), + (this._domElement.style.webkitUserSelect = ''), + this._domElement.removeEventListener('pointerdown', at), + this._domElement.removeEventListener('mousedown', st), + this._domElement.removeEventListener('pointercancel', ut), + this._domElement.removeEventListener('wheel', pt, { passive: !1 }), + this._domElement.removeEventListener('contextmenu', mt), + this._domElement.ownerDocument.removeEventListener('pointermove', lt, { passive: !1 }), + this._domElement.ownerDocument.removeEventListener('mousemove', ct), + this._domElement.ownerDocument.removeEventListener('pointerup', ut), + this._domElement.ownerDocument.removeEventListener('mouseup', ht), + this._domElement.ownerDocument.removeEventListener('pointerlockchange', vt), + this._domElement.ownerDocument.removeEventListener('pointerlockerror', xt)) + }), + (this.cancel = () => { + this._state !== ACTION.NONE && ((this._state = ACTION.NONE), (this._activePointers.length = 0), bt()) + }), + nt && this.connect(nt), + this.update(0) + } + get camera() { + return this._camera + } + set camera(et) { + ;(this._camera = et), + this.updateCameraUp(), + this._camera.updateProjectionMatrix(), + this._updateNearPlaneCorners(), + (this._needsUpdate = !0) + } + get enabled() { + return this._enabled + } + set enabled(et) { + ;(this._enabled = et), + this._domElement && + (et + ? ((this._domElement.style.touchAction = 'none'), + (this._domElement.style.userSelect = 'none'), + (this._domElement.style.webkitUserSelect = 'none')) + : (this.cancel(), + (this._domElement.style.touchAction = ''), + (this._domElement.style.userSelect = ''), + (this._domElement.style.webkitUserSelect = ''))) + } + get active() { + return !this._hasRested + } + get currentAction() { + return this._state + } + get distance() { + return this._spherical.radius + } + set distance(et) { + ;(this._spherical.radius === et && this._sphericalEnd.radius === et) || + ((this._spherical.radius = et), (this._sphericalEnd.radius = et), (this._needsUpdate = !0)) + } + get azimuthAngle() { + return this._spherical.theta + } + set azimuthAngle(et) { + ;(this._spherical.theta === et && this._sphericalEnd.theta === et) || + ((this._spherical.theta = et), (this._sphericalEnd.theta = et), (this._needsUpdate = !0)) + } + get polarAngle() { + return this._spherical.phi + } + set polarAngle(et) { + ;(this._spherical.phi === et && this._sphericalEnd.phi === et) || + ((this._spherical.phi = et), (this._sphericalEnd.phi = et), (this._needsUpdate = !0)) + } + get boundaryEnclosesCamera() { + return this._boundaryEnclosesCamera + } + set boundaryEnclosesCamera(et) { + ;(this._boundaryEnclosesCamera = et), (this._needsUpdate = !0) + } + set interactiveArea(et) { + ;(this._interactiveArea.width = clamp$4(et.width, 0, 1)), + (this._interactiveArea.height = clamp$4(et.height, 0, 1)), + (this._interactiveArea.x = clamp$4(et.x, 0, 1 - this._interactiveArea.width)), + (this._interactiveArea.y = clamp$4(et.x, 0, 1 - this._interactiveArea.height)) + } + addEventListener(et, nt) { + super.addEventListener(et, nt) + } + removeEventListener(et, nt) { + super.removeEventListener(et, nt) + } + rotate(et, nt, rt = !1) { + return this.rotateTo(this._sphericalEnd.theta + et, this._sphericalEnd.phi + nt, rt) + } + rotateAzimuthTo(et, nt = !1) { + return this.rotateTo(et, this._sphericalEnd.phi, nt) + } + rotatePolarTo(et, nt = !1) { + return this.rotateTo(this._sphericalEnd.theta, et, nt) + } + rotateTo(et, nt, rt = !1) { + this._isUserControllingRotate = !1 + const it = clamp$4(et, this.minAzimuthAngle, this.maxAzimuthAngle), + ot = clamp$4(nt, this.minPolarAngle, this.maxPolarAngle) + ;(this._sphericalEnd.theta = it), + (this._sphericalEnd.phi = ot), + this._sphericalEnd.makeSafe(), + (this._needsUpdate = !0), + rt || ((this._spherical.theta = this._sphericalEnd.theta), (this._spherical.phi = this._sphericalEnd.phi)) + const at = + !rt || + (approxEquals(this._spherical.theta, this._sphericalEnd.theta, this.restThreshold) && + approxEquals(this._spherical.phi, this._sphericalEnd.phi, this.restThreshold)) + return this._createOnRestPromise(at) + } + dolly(et, nt = !1) { + return this.dollyTo(this._sphericalEnd.radius - et, nt) + } + dollyTo(et, nt = !1) { + return ( + (this._isUserControllingDolly = !1), + (this._lastDollyDirection = DOLLY_DIRECTION.NONE), + (this._changedDolly = 0), + this._dollyToNoClamp(clamp$4(et, this.minDistance, this.maxDistance), nt) + ) + } + _dollyToNoClamp(et, nt = !1) { + const rt = this._sphericalEnd.radius + if (this.colliderMeshes.length >= 1) { + const at = this._collisionTest(), + st = approxEquals(at, this._spherical.radius) + if (!(rt > et) && st) return Promise.resolve() + this._sphericalEnd.radius = Math.min(et, at) + } else this._sphericalEnd.radius = et + ;(this._needsUpdate = !0), nt || (this._spherical.radius = this._sphericalEnd.radius) + const ot = !nt || approxEquals(this._spherical.radius, this._sphericalEnd.radius, this.restThreshold) + return this._createOnRestPromise(ot) + } + dollyInFixed(et, nt = !1) { + this._targetEnd.add(this._getCameraDirection(_cameraDirection).multiplyScalar(et)), + nt || this._target.copy(this._targetEnd) + const rt = + !nt || + (approxEquals(this._target.x, this._targetEnd.x, this.restThreshold) && + approxEquals(this._target.y, this._targetEnd.y, this.restThreshold) && + approxEquals(this._target.z, this._targetEnd.z, this.restThreshold)) + return this._createOnRestPromise(rt) + } + zoom(et, nt = !1) { + return this.zoomTo(this._zoomEnd + et, nt) + } + zoomTo(et, nt = !1) { + ;(this._isUserControllingZoom = !1), + (this._zoomEnd = clamp$4(et, this.minZoom, this.maxZoom)), + (this._needsUpdate = !0), + nt || (this._zoom = this._zoomEnd) + const rt = !nt || approxEquals(this._zoom, this._zoomEnd, this.restThreshold) + return (this._changedZoom = 0), this._createOnRestPromise(rt) + } + pan(et, nt, rt = !1) { + return console.warn('`pan` has been renamed to `truck`'), this.truck(et, nt, rt) + } + truck(et, nt, rt = !1) { + this._camera.updateMatrix(), + _xColumn.setFromMatrixColumn(this._camera.matrix, 0), + _yColumn.setFromMatrixColumn(this._camera.matrix, 1), + _xColumn.multiplyScalar(et), + _yColumn.multiplyScalar(-nt) + const it = _v3A.copy(_xColumn).add(_yColumn), + ot = _v3B.copy(this._targetEnd).add(it) + return this.moveTo(ot.x, ot.y, ot.z, rt) + } + forward(et, nt = !1) { + _v3A.setFromMatrixColumn(this._camera.matrix, 0), + _v3A.crossVectors(this._camera.up, _v3A), + _v3A.multiplyScalar(et) + const rt = _v3B.copy(this._targetEnd).add(_v3A) + return this.moveTo(rt.x, rt.y, rt.z, nt) + } + elevate(et, nt = !1) { + return ( + _v3A.copy(this._camera.up).multiplyScalar(et), + this.moveTo(this._targetEnd.x + _v3A.x, this._targetEnd.y + _v3A.y, this._targetEnd.z + _v3A.z, nt) + ) + } + moveTo(et, nt, rt, it = !1) { + this._isUserControllingTruck = !1 + const ot = _v3A.set(et, nt, rt).sub(this._targetEnd) + this._encloseToBoundary(this._targetEnd, ot, this.boundaryFriction), + (this._needsUpdate = !0), + it || this._target.copy(this._targetEnd) + const at = + !it || + (approxEquals(this._target.x, this._targetEnd.x, this.restThreshold) && + approxEquals(this._target.y, this._targetEnd.y, this.restThreshold) && + approxEquals(this._target.z, this._targetEnd.z, this.restThreshold)) + return this._createOnRestPromise(at) + } + lookInDirectionOf(et, nt, rt, it = !1) { + const st = _v3A.set(et, nt, rt).sub(this._targetEnd).normalize().multiplyScalar(-this._sphericalEnd.radius) + return this.setPosition(st.x, st.y, st.z, it) + } + fitToBox( + et, + nt, + { cover: rt = !1, paddingLeft: it = 0, paddingRight: ot = 0, paddingBottom: at = 0, paddingTop: st = 0 } = {}, + ) { + const lt = [], + ct = et.isBox3 ? _box3A.copy(et) : _box3A.setFromObject(et) + ct.isEmpty() && + (console.warn('camera-controls: fitTo() cannot be used with an empty box. Aborting'), Promise.resolve()) + const ut = roundToStep(this._sphericalEnd.theta, PI_HALF), + ht = roundToStep(this._sphericalEnd.phi, PI_HALF) + lt.push(this.rotateTo(ut, ht, nt)) + const dt = _v3A.setFromSpherical(this._sphericalEnd).normalize(), + pt = _quaternionA.setFromUnitVectors(dt, _AXIS_Z), + mt = approxEquals(Math.abs(dt.y), 1) + mt && pt.multiply(_quaternionB.setFromAxisAngle(_AXIS_Y, ut)), pt.multiply(this._yAxisUpSpaceInverse) + const gt = _box3B.makeEmpty() + _v3B.copy(ct.min).applyQuaternion(pt), + gt.expandByPoint(_v3B), + _v3B.copy(ct.min).setX(ct.max.x).applyQuaternion(pt), + gt.expandByPoint(_v3B), + _v3B.copy(ct.min).setY(ct.max.y).applyQuaternion(pt), + gt.expandByPoint(_v3B), + _v3B.copy(ct.max).setZ(ct.min.z).applyQuaternion(pt), + gt.expandByPoint(_v3B), + _v3B.copy(ct.min).setZ(ct.max.z).applyQuaternion(pt), + gt.expandByPoint(_v3B), + _v3B.copy(ct.max).setY(ct.min.y).applyQuaternion(pt), + gt.expandByPoint(_v3B), + _v3B.copy(ct.max).setX(ct.min.x).applyQuaternion(pt), + gt.expandByPoint(_v3B), + _v3B.copy(ct.max).applyQuaternion(pt), + gt.expandByPoint(_v3B), + (gt.min.x -= it), + (gt.min.y -= at), + (gt.max.x += ot), + (gt.max.y += st), + pt.setFromUnitVectors(_AXIS_Z, dt), + mt && pt.premultiply(_quaternionB.invert()), + pt.premultiply(this._yAxisUpSpace) + const yt = gt.getSize(_v3A), + bt = gt.getCenter(_v3B).applyQuaternion(pt) + if (isPerspectiveCamera(this._camera)) { + const vt = this.getDistanceToFitBox(yt.x, yt.y, yt.z, rt) + lt.push(this.moveTo(bt.x, bt.y, bt.z, nt)), + lt.push(this.dollyTo(vt, nt)), + lt.push(this.setFocalOffset(0, 0, 0, nt)) + } else if (isOrthographicCamera(this._camera)) { + const vt = this._camera, + xt = vt.right - vt.left, + kt = vt.top - vt.bottom, + St = rt ? Math.max(xt / yt.x, kt / yt.y) : Math.min(xt / yt.x, kt / yt.y) + lt.push(this.moveTo(bt.x, bt.y, bt.z, nt)), + lt.push(this.zoomTo(St, nt)), + lt.push(this.setFocalOffset(0, 0, 0, nt)) + } + return Promise.all(lt) + } + fitToSphere(et, nt) { + const rt = [], + ot = et instanceof THREE.Sphere ? _sphere.copy(et) : y1.createBoundingSphere(et, _sphere) + if ((rt.push(this.moveTo(ot.center.x, ot.center.y, ot.center.z, nt)), isPerspectiveCamera(this._camera))) { + const at = this.getDistanceToFitSphere(ot.radius) + rt.push(this.dollyTo(at, nt)) + } else if (isOrthographicCamera(this._camera)) { + const at = this._camera.right - this._camera.left, + st = this._camera.top - this._camera.bottom, + lt = 2 * ot.radius, + ct = Math.min(at / lt, st / lt) + rt.push(this.zoomTo(ct, nt)) + } + return rt.push(this.setFocalOffset(0, 0, 0, nt)), Promise.all(rt) + } + setLookAt(et, nt, rt, it, ot, at, st = !1) { + ;(this._isUserControllingRotate = !1), + (this._isUserControllingDolly = !1), + (this._isUserControllingTruck = !1), + (this._lastDollyDirection = DOLLY_DIRECTION.NONE), + (this._changedDolly = 0) + const lt = _v3B.set(it, ot, at), + ct = _v3A.set(et, nt, rt) + this._targetEnd.copy(lt), + this._sphericalEnd.setFromVector3(ct.sub(lt).applyQuaternion(this._yAxisUpSpace)), + this.normalizeRotations(), + (this._needsUpdate = !0), + st || (this._target.copy(this._targetEnd), this._spherical.copy(this._sphericalEnd)) + const ut = + !st || + (approxEquals(this._target.x, this._targetEnd.x, this.restThreshold) && + approxEquals(this._target.y, this._targetEnd.y, this.restThreshold) && + approxEquals(this._target.z, this._targetEnd.z, this.restThreshold) && + approxEquals(this._spherical.theta, this._sphericalEnd.theta, this.restThreshold) && + approxEquals(this._spherical.phi, this._sphericalEnd.phi, this.restThreshold) && + approxEquals(this._spherical.radius, this._sphericalEnd.radius, this.restThreshold)) + return this._createOnRestPromise(ut) + } + lerpLookAt(et, nt, rt, it, ot, at, st, lt, ct, ut, ht, dt, pt, mt = !1) { + ;(this._isUserControllingRotate = !1), + (this._isUserControllingDolly = !1), + (this._isUserControllingTruck = !1), + (this._lastDollyDirection = DOLLY_DIRECTION.NONE), + (this._changedDolly = 0) + const gt = _v3A.set(it, ot, at), + yt = _v3B.set(et, nt, rt) + _sphericalA.setFromVector3(yt.sub(gt).applyQuaternion(this._yAxisUpSpace)) + const bt = _v3C.set(ut, ht, dt), + vt = _v3B.set(st, lt, ct) + _sphericalB.setFromVector3(vt.sub(bt).applyQuaternion(this._yAxisUpSpace)), + this._targetEnd.copy(gt.lerp(bt, pt)) + const xt = _sphericalB.theta - _sphericalA.theta, + kt = _sphericalB.phi - _sphericalA.phi, + St = _sphericalB.radius - _sphericalA.radius + this._sphericalEnd.set(_sphericalA.radius + St * pt, _sphericalA.phi + kt * pt, _sphericalA.theta + xt * pt), + this.normalizeRotations(), + (this._needsUpdate = !0), + mt || (this._target.copy(this._targetEnd), this._spherical.copy(this._sphericalEnd)) + const Tt = + !mt || + (approxEquals(this._target.x, this._targetEnd.x, this.restThreshold) && + approxEquals(this._target.y, this._targetEnd.y, this.restThreshold) && + approxEquals(this._target.z, this._targetEnd.z, this.restThreshold) && + approxEquals(this._spherical.theta, this._sphericalEnd.theta, this.restThreshold) && + approxEquals(this._spherical.phi, this._sphericalEnd.phi, this.restThreshold) && + approxEquals(this._spherical.radius, this._sphericalEnd.radius, this.restThreshold)) + return this._createOnRestPromise(Tt) + } + setPosition(et, nt, rt, it = !1) { + return this.setLookAt(et, nt, rt, this._targetEnd.x, this._targetEnd.y, this._targetEnd.z, it) + } + setTarget(et, nt, rt, it = !1) { + const ot = this.getPosition(_v3A), + at = this.setLookAt(ot.x, ot.y, ot.z, et, nt, rt, it) + return (this._sphericalEnd.phi = clamp$4(this._sphericalEnd.phi, this.minPolarAngle, this.maxPolarAngle)), at + } + setFocalOffset(et, nt, rt, it = !1) { + ;(this._isUserControllingOffset = !1), + this._focalOffsetEnd.set(et, nt, rt), + (this._needsUpdate = !0), + it || this._focalOffset.copy(this._focalOffsetEnd) + const ot = + !it || + (approxEquals(this._focalOffset.x, this._focalOffsetEnd.x, this.restThreshold) && + approxEquals(this._focalOffset.y, this._focalOffsetEnd.y, this.restThreshold) && + approxEquals(this._focalOffset.z, this._focalOffsetEnd.z, this.restThreshold)) + return this._createOnRestPromise(ot) + } + setOrbitPoint(et, nt, rt) { + this._camera.updateMatrixWorld(), + _xColumn.setFromMatrixColumn(this._camera.matrixWorldInverse, 0), + _yColumn.setFromMatrixColumn(this._camera.matrixWorldInverse, 1), + _zColumn.setFromMatrixColumn(this._camera.matrixWorldInverse, 2) + const it = _v3A.set(et, nt, rt), + ot = it.distanceTo(this._camera.position), + at = it.sub(this._camera.position) + _xColumn.multiplyScalar(at.x), + _yColumn.multiplyScalar(at.y), + _zColumn.multiplyScalar(at.z), + _v3A.copy(_xColumn).add(_yColumn).add(_zColumn), + (_v3A.z = _v3A.z + ot), + this.dollyTo(ot, !1), + this.setFocalOffset(-_v3A.x, _v3A.y, -_v3A.z, !1), + this.moveTo(et, nt, rt, !1) + } + setBoundary(et) { + if (!et) { + this._boundary.min.set(-1 / 0, -1 / 0, -1 / 0), + this._boundary.max.set(1 / 0, 1 / 0, 1 / 0), + (this._needsUpdate = !0) + return + } + this._boundary.copy(et), this._boundary.clampPoint(this._targetEnd, this._targetEnd), (this._needsUpdate = !0) + } + setViewport(et, nt, rt, it) { + if (et === null) { + this._viewport = null + return + } + ;(this._viewport = this._viewport || new THREE.Vector4()), + typeof et == 'number' ? this._viewport.set(et, nt, rt, it) : this._viewport.copy(et) + } + getDistanceToFitBox(et, nt, rt, it = !1) { + if (notSupportedInOrthographicCamera(this._camera, 'getDistanceToFitBox')) return this._spherical.radius + const ot = et / nt, + at = this._camera.getEffectiveFOV() * DEG2RAD, + st = this._camera.aspect + return (((it ? ot > st : ot < st) ? nt : et / st) * 0.5) / Math.tan(at * 0.5) + rt * 0.5 + } + getDistanceToFitSphere(et) { + if (notSupportedInOrthographicCamera(this._camera, 'getDistanceToFitSphere')) return this._spherical.radius + const nt = this._camera.getEffectiveFOV() * DEG2RAD, + rt = Math.atan(Math.tan(nt * 0.5) * this._camera.aspect) * 2, + it = 1 < this._camera.aspect ? nt : rt + return et / Math.sin(it * 0.5) + } + getTarget(et, nt = !0) { + return (et && et.isVector3 ? et : new THREE.Vector3()).copy(nt ? this._targetEnd : this._target) + } + getPosition(et, nt = !0) { + return (et && et.isVector3 ? et : new THREE.Vector3()) + .setFromSpherical(nt ? this._sphericalEnd : this._spherical) + .applyQuaternion(this._yAxisUpSpaceInverse) + .add(nt ? this._targetEnd : this._target) + } + getSpherical(et, nt = !0) { + return (et && et instanceof THREE.Spherical ? et : new THREE.Spherical()).copy( + nt ? this._sphericalEnd : this._spherical, + ) + } + getFocalOffset(et, nt = !0) { + return (et && et.isVector3 ? et : new THREE.Vector3()).copy(nt ? this._focalOffsetEnd : this._focalOffset) + } + normalizeRotations() { + ;(this._sphericalEnd.theta = this._sphericalEnd.theta % PI_2), + this._sphericalEnd.theta < 0 && (this._sphericalEnd.theta += PI_2), + (this._spherical.theta += PI_2 * Math.round((this._sphericalEnd.theta - this._spherical.theta) / PI_2)) + } + reset(et = !1) { + if ( + !approxEquals(this._camera.up.x, this._cameraUp0.x) || + !approxEquals(this._camera.up.y, this._cameraUp0.y) || + !approxEquals(this._camera.up.z, this._cameraUp0.z) + ) { + this._camera.up.copy(this._cameraUp0) + const rt = this.getPosition(_v3A) + this.updateCameraUp(), this.setPosition(rt.x, rt.y, rt.z) + } + const nt = [ + this.setLookAt( + this._position0.x, + this._position0.y, + this._position0.z, + this._target0.x, + this._target0.y, + this._target0.z, + et, + ), + this.setFocalOffset(this._focalOffset0.x, this._focalOffset0.y, this._focalOffset0.z, et), + this.zoomTo(this._zoom0, et), + ] + return Promise.all(nt) + } + saveState() { + this._cameraUp0.copy(this._camera.up), + this.getTarget(this._target0), + this.getPosition(this._position0), + (this._zoom0 = this._zoom), + this._focalOffset0.copy(this._focalOffset) + } + updateCameraUp() { + this._yAxisUpSpace.setFromUnitVectors(this._camera.up, _AXIS_Y), + this._yAxisUpSpaceInverse.copy(this._yAxisUpSpace).invert() + } + applyCameraUp() { + const et = _v3A.subVectors(this._target, this._camera.position).normalize(), + nt = _v3B.crossVectors(et, this._camera.up) + this._camera.up.crossVectors(nt, et).normalize(), this._camera.updateMatrixWorld() + const rt = this.getPosition(_v3A) + this.updateCameraUp(), this.setPosition(rt.x, rt.y, rt.z) + } + update(et) { + const nt = this._sphericalEnd.theta - this._spherical.theta, + rt = this._sphericalEnd.phi - this._spherical.phi, + it = this._sphericalEnd.radius - this._spherical.radius, + ot = _deltaTarget.subVectors(this._targetEnd, this._target), + at = _deltaOffset.subVectors(this._focalOffsetEnd, this._focalOffset), + st = this._zoomEnd - this._zoom + if (approxZero(nt)) (this._thetaVelocity.value = 0), (this._spherical.theta = this._sphericalEnd.theta) + else { + const ht = this._isUserControllingRotate ? this.draggingSmoothTime : this.smoothTime + ;(this._spherical.theta = smoothDamp( + this._spherical.theta, + this._sphericalEnd.theta, + this._thetaVelocity, + ht, + 1 / 0, + et, + )), + (this._needsUpdate = !0) + } + if (approxZero(rt)) (this._phiVelocity.value = 0), (this._spherical.phi = this._sphericalEnd.phi) + else { + const ht = this._isUserControllingRotate ? this.draggingSmoothTime : this.smoothTime + ;(this._spherical.phi = smoothDamp( + this._spherical.phi, + this._sphericalEnd.phi, + this._phiVelocity, + ht, + 1 / 0, + et, + )), + (this._needsUpdate = !0) + } + if (approxZero(it)) (this._radiusVelocity.value = 0), (this._spherical.radius = this._sphericalEnd.radius) + else { + const ht = this._isUserControllingDolly ? this.draggingSmoothTime : this.smoothTime + ;(this._spherical.radius = smoothDamp( + this._spherical.radius, + this._sphericalEnd.radius, + this._radiusVelocity, + ht, + this.maxSpeed, + et, + )), + (this._needsUpdate = !0) + } + if (approxZero(ot.x) && approxZero(ot.y) && approxZero(ot.z)) + this._targetVelocity.set(0, 0, 0), this._target.copy(this._targetEnd) + else { + const ht = this._isUserControllingTruck ? this.draggingSmoothTime : this.smoothTime + smoothDampVec3(this._target, this._targetEnd, this._targetVelocity, ht, this.maxSpeed, et, this._target), + (this._needsUpdate = !0) + } + if (approxZero(at.x) && approxZero(at.y) && approxZero(at.z)) + this._focalOffsetVelocity.set(0, 0, 0), this._focalOffset.copy(this._focalOffsetEnd) + else { + const ht = this._isUserControllingOffset ? this.draggingSmoothTime : this.smoothTime + smoothDampVec3( + this._focalOffset, + this._focalOffsetEnd, + this._focalOffsetVelocity, + ht, + this.maxSpeed, + et, + this._focalOffset, + ), + (this._needsUpdate = !0) + } + if (approxZero(st)) (this._zoomVelocity.value = 0), (this._zoom = this._zoomEnd) + else { + const ht = this._isUserControllingZoom ? this.draggingSmoothTime : this.smoothTime + this._zoom = smoothDamp(this._zoom, this._zoomEnd, this._zoomVelocity, ht, 1 / 0, et) + } + if (this.dollyToCursor) { + if (isPerspectiveCamera(this._camera) && this._changedDolly !== 0) { + const ht = this._spherical.radius - this._lastDistance, + dt = this._camera, + pt = this._getCameraDirection(_cameraDirection), + mt = _v3A.copy(pt).cross(dt.up).normalize() + mt.lengthSq() === 0 && (mt.x = 1) + const gt = _v3B.crossVectors(mt, pt), + yt = this._sphericalEnd.radius * Math.tan(dt.getEffectiveFOV() * DEG2RAD * 0.5), + vt = (this._sphericalEnd.radius - ht - this._sphericalEnd.radius) / this._sphericalEnd.radius, + xt = _v3C + .copy(this._targetEnd) + .add(mt.multiplyScalar(this._dollyControlCoord.x * yt * dt.aspect)) + .add(gt.multiplyScalar(this._dollyControlCoord.y * yt)), + kt = _v3A.copy(this._targetEnd).lerp(xt, vt), + St = this._lastDollyDirection === DOLLY_DIRECTION.IN && this._spherical.radius <= this.minDistance, + Tt = this._lastDollyDirection === DOLLY_DIRECTION.OUT && this.maxDistance <= this._spherical.radius + if (this.infinityDolly && (St || Tt)) { + ;(this._sphericalEnd.radius -= ht), (this._spherical.radius -= ht) + const Et = _v3B.copy(pt).multiplyScalar(-ht) + kt.add(Et) + } + this._boundary.clampPoint(kt, kt) + const At = _v3B.subVectors(kt, this._targetEnd) + this._targetEnd.copy(kt), + this._target.add(At), + (this._changedDolly -= ht), + approxZero(this._changedDolly) && (this._changedDolly = 0) + } else if (isOrthographicCamera(this._camera) && this._changedZoom !== 0) { + const ht = this._zoom - this._lastZoom, + dt = this._camera, + pt = _v3A + .set(this._dollyControlCoord.x, this._dollyControlCoord.y, (dt.near + dt.far) / (dt.near - dt.far)) + .unproject(dt), + mt = _v3B.set(0, 0, -1).applyQuaternion(dt.quaternion), + gt = _v3C.copy(pt).add(mt.multiplyScalar(-pt.dot(dt.up))), + bt = -(this._zoom - ht - this._zoom) / this._zoom, + vt = this._getCameraDirection(_cameraDirection), + xt = this._targetEnd.dot(vt), + kt = _v3A.copy(this._targetEnd).lerp(gt, bt), + St = kt.dot(vt), + Tt = vt.multiplyScalar(St - xt) + kt.sub(Tt), this._boundary.clampPoint(kt, kt) + const At = _v3B.subVectors(kt, this._targetEnd) + this._targetEnd.copy(kt), + this._target.add(At), + (this._changedZoom -= ht), + approxZero(this._changedZoom) && (this._changedZoom = 0) + } + } + this._camera.zoom !== this._zoom && + ((this._camera.zoom = this._zoom), + this._camera.updateProjectionMatrix(), + this._updateNearPlaneCorners(), + (this._needsUpdate = !0)) + const lt = this._collisionTest() + ;(this._spherical.radius = Math.min(this._spherical.radius, lt)), + this._spherical.makeSafe(), + this._camera.position + .setFromSpherical(this._spherical) + .applyQuaternion(this._yAxisUpSpaceInverse) + .add(this._target), + this._camera.lookAt(this._target), + (!approxZero(this._focalOffset.x) || !approxZero(this._focalOffset.y) || !approxZero(this._focalOffset.z)) && + (this._camera.updateMatrixWorld(), + _xColumn.setFromMatrixColumn(this._camera.matrix, 0), + _yColumn.setFromMatrixColumn(this._camera.matrix, 1), + _zColumn.setFromMatrixColumn(this._camera.matrix, 2), + _xColumn.multiplyScalar(this._focalOffset.x), + _yColumn.multiplyScalar(-this._focalOffset.y), + _zColumn.multiplyScalar(this._focalOffset.z), + _v3A.copy(_xColumn).add(_yColumn).add(_zColumn), + this._camera.position.add(_v3A)), + this._boundaryEnclosesCamera && + this._encloseToBoundary( + this._camera.position.copy(this._target), + _v3A.setFromSpherical(this._spherical).applyQuaternion(this._yAxisUpSpaceInverse), + 1, + ) + const ut = this._needsUpdate + return ( + ut && !this._updatedLastTime + ? ((this._hasRested = !1), this.dispatchEvent({ type: 'wake' }), this.dispatchEvent({ type: 'update' })) + : ut + ? (this.dispatchEvent({ type: 'update' }), + approxZero(nt, this.restThreshold) && + approxZero(rt, this.restThreshold) && + approxZero(it, this.restThreshold) && + approxZero(ot.x, this.restThreshold) && + approxZero(ot.y, this.restThreshold) && + approxZero(ot.z, this.restThreshold) && + approxZero(at.x, this.restThreshold) && + approxZero(at.y, this.restThreshold) && + approxZero(at.z, this.restThreshold) && + approxZero(st, this.restThreshold) && + !this._hasRested && + ((this._hasRested = !0), this.dispatchEvent({ type: 'rest' }))) + : !ut && this._updatedLastTime && this.dispatchEvent({ type: 'sleep' }), + (this._lastDistance = this._spherical.radius), + (this._lastZoom = this._zoom), + (this._updatedLastTime = ut), + (this._needsUpdate = !1), + ut + ) + } + toJSON() { + return JSON.stringify({ + enabled: this._enabled, + minDistance: this.minDistance, + maxDistance: infinityToMaxNumber(this.maxDistance), + minZoom: this.minZoom, + maxZoom: infinityToMaxNumber(this.maxZoom), + minPolarAngle: this.minPolarAngle, + maxPolarAngle: infinityToMaxNumber(this.maxPolarAngle), + minAzimuthAngle: infinityToMaxNumber(this.minAzimuthAngle), + maxAzimuthAngle: infinityToMaxNumber(this.maxAzimuthAngle), + smoothTime: this.smoothTime, + draggingSmoothTime: this.draggingSmoothTime, + dollySpeed: this.dollySpeed, + truckSpeed: this.truckSpeed, + dollyToCursor: this.dollyToCursor, + verticalDragToForward: this.verticalDragToForward, + target: this._targetEnd.toArray(), + position: _v3A.setFromSpherical(this._sphericalEnd).add(this._targetEnd).toArray(), + zoom: this._zoomEnd, + focalOffset: this._focalOffsetEnd.toArray(), + target0: this._target0.toArray(), + position0: this._position0.toArray(), + zoom0: this._zoom0, + focalOffset0: this._focalOffset0.toArray(), + }) + } + fromJSON(et, nt = !1) { + const rt = JSON.parse(et) + ;(this.enabled = rt.enabled), + (this.minDistance = rt.minDistance), + (this.maxDistance = maxNumberToInfinity(rt.maxDistance)), + (this.minZoom = rt.minZoom), + (this.maxZoom = maxNumberToInfinity(rt.maxZoom)), + (this.minPolarAngle = rt.minPolarAngle), + (this.maxPolarAngle = maxNumberToInfinity(rt.maxPolarAngle)), + (this.minAzimuthAngle = maxNumberToInfinity(rt.minAzimuthAngle)), + (this.maxAzimuthAngle = maxNumberToInfinity(rt.maxAzimuthAngle)), + (this.smoothTime = rt.smoothTime), + (this.draggingSmoothTime = rt.draggingSmoothTime), + (this.dollySpeed = rt.dollySpeed), + (this.truckSpeed = rt.truckSpeed), + (this.dollyToCursor = rt.dollyToCursor), + (this.verticalDragToForward = rt.verticalDragToForward), + this._target0.fromArray(rt.target0), + this._position0.fromArray(rt.position0), + (this._zoom0 = rt.zoom0), + this._focalOffset0.fromArray(rt.focalOffset0), + this.moveTo(rt.target[0], rt.target[1], rt.target[2], nt), + _sphericalA.setFromVector3( + _v3A.fromArray(rt.position).sub(this._targetEnd).applyQuaternion(this._yAxisUpSpace), + ), + this.rotateTo(_sphericalA.theta, _sphericalA.phi, nt), + this.dollyTo(_sphericalA.radius, nt), + this.zoomTo(rt.zoom, nt), + this.setFocalOffset(rt.focalOffset[0], rt.focalOffset[1], rt.focalOffset[2], nt), + (this._needsUpdate = !0) + } + connect(et) { + if (this._domElement) { + console.warn('camera-controls is already connected.') + return + } + et.setAttribute('data-camera-controls-version', VERSION), + this._addAllEventListeners(et), + this._getClientRect(this._elementRect) + } + disconnect() { + this.cancel(), + this._removeAllEventListeners(), + this._domElement && + (this._domElement.removeAttribute('data-camera-controls-version'), (this._domElement = void 0)) + } + dispose() { + this.removeAllEventListeners(), this.disconnect() + } + _getTargetDirection(et) { + return et + .setFromSpherical(this._spherical) + .divideScalar(this._spherical.radius) + .applyQuaternion(this._yAxisUpSpaceInverse) + } + _getCameraDirection(et) { + return this._getTargetDirection(et).negate() + } + _findPointerById(et) { + return this._activePointers.find((nt) => nt.pointerId === et) + } + _findPointerByMouseButton(et) { + return this._activePointers.find((nt) => nt.mouseButton === et) + } + _disposePointer(et) { + this._activePointers.splice(this._activePointers.indexOf(et), 1) + } + _encloseToBoundary(et, nt, rt) { + const it = nt.lengthSq() + if (it === 0) return et + const ot = _v3B.copy(nt).add(et), + st = this._boundary.clampPoint(ot, _v3C).sub(ot), + lt = st.lengthSq() + if (lt === 0) return et.add(nt) + if (lt === it) return et + if (rt === 0) return et.add(nt).add(st) + { + const ct = 1 + (rt * lt) / nt.dot(st) + return et.add(_v3B.copy(nt).multiplyScalar(ct)).add(st.multiplyScalar(1 - rt)) + } + } + _updateNearPlaneCorners() { + if (isPerspectiveCamera(this._camera)) { + const et = this._camera, + nt = et.near, + rt = et.getEffectiveFOV() * DEG2RAD, + it = Math.tan(rt * 0.5) * nt, + ot = it * et.aspect + this._nearPlaneCorners[0].set(-ot, -it, 0), + this._nearPlaneCorners[1].set(ot, -it, 0), + this._nearPlaneCorners[2].set(ot, it, 0), + this._nearPlaneCorners[3].set(-ot, it, 0) + } else if (isOrthographicCamera(this._camera)) { + const et = this._camera, + nt = 1 / et.zoom, + rt = et.left * nt, + it = et.right * nt, + ot = et.top * nt, + at = et.bottom * nt + this._nearPlaneCorners[0].set(rt, ot, 0), + this._nearPlaneCorners[1].set(it, ot, 0), + this._nearPlaneCorners[2].set(it, at, 0), + this._nearPlaneCorners[3].set(rt, at, 0) + } + } + _collisionTest() { + let et = 1 / 0 + if (!(this.colliderMeshes.length >= 1) || notSupportedInOrthographicCamera(this._camera, '_collisionTest')) + return et + const rt = this._getTargetDirection(_cameraDirection) + _rotationMatrix.lookAt(_ORIGIN, rt, this._camera.up) + for (let it = 0; it < 4; it++) { + const ot = _v3B.copy(this._nearPlaneCorners[it]) + ot.applyMatrix4(_rotationMatrix) + const at = _v3C.addVectors(this._target, ot) + _raycaster.set(at, rt), (_raycaster.far = this._spherical.radius + 1) + const st = _raycaster.intersectObjects(this.colliderMeshes) + st.length !== 0 && st[0].distance < et && (et = st[0].distance) + } + return et + } + _getClientRect(et) { + if (!this._domElement) return + const nt = this._domElement.getBoundingClientRect() + return ( + (et.x = nt.left), + (et.y = nt.top), + this._viewport + ? ((et.x += this._viewport.x), + (et.y += nt.height - this._viewport.w - this._viewport.y), + (et.width = this._viewport.z), + (et.height = this._viewport.w)) + : ((et.width = nt.width), (et.height = nt.height)), + et + ) + } + _createOnRestPromise(et) { + return et + ? Promise.resolve() + : ((this._hasRested = !1), + this.dispatchEvent({ type: 'transitionstart' }), + new Promise((nt) => { + const rt = () => { + this.removeEventListener('rest', rt), nt() + } + this.addEventListener('rest', rt) + })) + } + _addAllEventListeners(et) {} + _removeAllEventListeners() {} + get dampingFactor() { + return console.warn('.dampingFactor has been deprecated. use smoothTime (in seconds) instead.'), 0 + } + set dampingFactor(et) { + console.warn('.dampingFactor has been deprecated. use smoothTime (in seconds) instead.') + } + get draggingDampingFactor() { + return ( + console.warn('.draggingDampingFactor has been deprecated. use draggingSmoothTime (in seconds) instead.'), 0 + ) + } + set draggingDampingFactor(et) { + console.warn('.draggingDampingFactor has been deprecated. use draggingSmoothTime (in seconds) instead.') + } + static createBoundingSphere(et, nt = new THREE.Sphere()) { + const rt = nt, + it = rt.center + _box3A.makeEmpty(), + et.traverseVisible((at) => { + at.isMesh && _box3A.expandByObject(at) + }), + _box3A.getCenter(it) + let ot = 0 + return ( + et.traverseVisible((at) => { + if (!at.isMesh) return + const st = at, + lt = st.geometry.clone() + lt.applyMatrix4(st.matrixWorld) + const ut = lt.attributes.position + for (let ht = 0, dt = ut.count; ht < dt; ht++) + _v3A.fromBufferAttribute(ut, ht), (ot = Math.max(ot, it.distanceToSquared(_v3A))) + }), + (rt.radius = Math.sqrt(ot)), + rt + ) + } + } + const CameraControls = reactExports.forwardRef((tt, et) => { + reactExports.useMemo(() => { + CameraControls$1.install({ THREE: THREE$1 }), extend$2({ CameraControlsImpl: CameraControls$1 }) + }, []) + const { + camera: nt, + domElement: rt, + makeDefault: it, + onStart: ot, + onEnd: at, + onChange: st, + regress: lt, + ...ct + } = tt, + ut = useThree((St) => St.camera), + ht = useThree((St) => St.gl), + dt = useThree((St) => St.invalidate), + pt = useThree((St) => St.events), + mt = useThree((St) => St.setEvents), + gt = useThree((St) => St.set), + yt = useThree((St) => St.get), + bt = useThree((St) => St.performance), + vt = nt || ut, + xt = rt || pt.connected || ht.domElement, + kt = reactExports.useMemo(() => new CameraControls$1(vt), [vt]) + return ( + useFrame((St, Tt) => { + kt.enabled && kt.update(Tt) + }, -1), + reactExports.useEffect(() => (kt.connect(xt), () => void kt.disconnect()), [xt, kt]), + reactExports.useEffect(() => { + const St = (Et) => { + dt(), lt && bt.regress(), st && st(Et) + }, + Tt = (Et) => { + ot && ot(Et) + }, + At = (Et) => { + at && at(Et) + } + return ( + kt.addEventListener('update', St), + kt.addEventListener('controlstart', Tt), + kt.addEventListener('controlend', At), + () => { + kt.removeEventListener('update', St), + kt.removeEventListener('controlstart', Tt), + kt.removeEventListener('controlend', At) + } + ) + }, [kt, ot, at, dt, mt, lt, st]), + reactExports.useEffect(() => { + if (it) { + const St = yt().controls + return gt({ controls: kt }), () => gt({ controls: St }) + } + }, [it, kt]), + reactExports.createElement('primitive', _extends$u({ ref: et, object: kt }, ct)) + ) + }) + PropTypes.func.isRequired, PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.element, PropTypes.func])).isRequired + const _instanceLocalMatrix = new Matrix4(), + _instanceWorldMatrix = new Matrix4(), + _instanceIntersects = [], + _mesh = new Mesh() + class PositionMesh extends Group { + constructor() { + super(), + (this.color = new Color$1('white')), + (this.instance = { current: void 0 }), + (this.instanceKey = { current: void 0 }) + } + get geometry() { + var et + return (et = this.instance.current) == null ? void 0 : et.geometry + } + raycast(et, nt) { + const rt = this.instance.current + if (!rt || !rt.geometry || !rt.material) return + _mesh.geometry = rt.geometry + const it = rt.matrixWorld, + ot = rt.userData.instances.indexOf(this.instanceKey) + if (!(ot === -1 || ot > rt.count)) { + rt.getMatrixAt(ot, _instanceLocalMatrix), + _instanceWorldMatrix.multiplyMatrices(it, _instanceLocalMatrix), + (_mesh.matrixWorld = _instanceWorldMatrix), + rt.material instanceof Material + ? (_mesh.material.side = rt.material.side) + : (_mesh.material.side = rt.material[0].side), + _mesh.raycast(et, _instanceIntersects) + for (let at = 0, st = _instanceIntersects.length; at < st; at++) { + const lt = _instanceIntersects[at] + ;(lt.instanceId = ot), (lt.object = this), nt.push(lt) + } + _instanceIntersects.length = 0 + } + } + } + const globalContext$1 = reactExports.createContext(null), + parentMatrix = new Matrix4(), + instanceMatrix = new Matrix4(), + tempMatrix = new Matrix4(), + translation = new Vector3(), + rotation = new Quaternion(), + scale = new Vector3(), + Instance = reactExports.forwardRef(({ context: tt, children: et, ...nt }, rt) => { + reactExports.useMemo(() => extend$2({ PositionMesh }), []) + const it = reactExports.useRef(), + { subscribe: ot, getParent: at } = reactExports.useContext(tt || globalContext$1) + return ( + reactExports.useLayoutEffect(() => ot(it), []), + reactExports.createElement( + 'positionMesh', + _extends$u({ instance: at(), instanceKey: it, ref: mergeRefs([rt, it]) }, nt), + et, + ) + ) + }), + Instances = reactExports.forwardRef( + ({ children: tt, range: et, limit: nt = 1e3, frames: rt = 1 / 0, ...it }, ot) => { + const [{ context: at, instance: st }] = reactExports.useState(() => { + const yt = reactExports.createContext(null) + return { + context: yt, + instance: reactExports.forwardRef((bt, vt) => + reactExports.createElement(Instance, _extends$u({ context: yt }, bt, { ref: vt })), + ), + } + }), + lt = reactExports.useRef(null), + [ct, ut] = reactExports.useState([]), + [[ht, dt]] = reactExports.useState(() => { + const yt = new Float32Array(nt * 16) + for (let bt = 0; bt < nt; bt++) tempMatrix.identity().toArray(yt, bt * 16) + return [yt, new Float32Array([...new Array(nt * 3)].map(() => 1))] + }) + reactExports.useEffect(() => { + lt.current.instanceMatrix.needsUpdate = !0 + }) + let pt = 0, + mt = 0 + useFrame(() => { + if (rt === 1 / 0 || pt < rt) { + lt.current.updateMatrix(), + lt.current.updateMatrixWorld(), + parentMatrix.copy(lt.current.matrixWorld).invert(), + (mt = Math.min(nt, et !== void 0 ? et : nt, ct.length)), + (lt.current.count = mt), + (lt.current.instanceMatrix.updateRange.count = mt * 16), + (lt.current.instanceColor.updateRange.count = mt * 3) + for (let yt = 0; yt < ct.length; yt++) { + const bt = ct[yt].current + bt.matrixWorld.decompose(translation, rotation, scale), + instanceMatrix.compose(translation, rotation, scale).premultiply(parentMatrix), + instanceMatrix.toArray(ht, yt * 16), + (lt.current.instanceMatrix.needsUpdate = !0), + bt.color.toArray(dt, yt * 3), + (lt.current.instanceColor.needsUpdate = !0) + } + pt++ + } + }) + const gt = reactExports.useMemo( + () => ({ + getParent: () => lt, + subscribe: (yt) => ( + ut((bt) => [...bt, yt]), () => ut((bt) => bt.filter((vt) => vt.current !== yt.current)) + ), + }), + [], + ) + return reactExports.createElement( + 'instancedMesh', + _extends$u( + { + userData: { instances: ct }, + matrixAutoUpdate: !1, + ref: mergeRefs([ot, lt]), + args: [null, null, 0], + raycast: () => null, + }, + it, + ), + reactExports.createElement('instancedBufferAttribute', { + attach: 'instanceMatrix', + count: ht.length / 16, + array: ht, + itemSize: 16, + usage: DynamicDrawUsage, + }), + reactExports.createElement('instancedBufferAttribute', { + attach: 'instanceColor', + count: dt.length / 3, + array: dt, + itemSize: 3, + usage: DynamicDrawUsage, + }), + typeof tt == 'function' + ? reactExports.createElement(at.Provider, { value: gt }, tt(st)) + : reactExports.createElement(globalContext$1.Provider, { value: gt }, tt), + ) + }, + ), + context = reactExports.createContext(null), + Segments = reactExports.forwardRef((tt, et) => { + reactExports.useMemo(() => extend$2({ SegmentObject }), []) + const { limit: nt = 1e3, lineWidth: rt = 1, children: it, ...ot } = tt, + [at, st] = reactExports.useState([]), + [lt] = reactExports.useState(() => new Line2()), + [ct] = reactExports.useState(() => new LineMaterial()), + [ut] = reactExports.useState(() => new LineSegmentsGeometry()), + [ht] = reactExports.useState(() => new Vector2(512, 512)), + [dt] = reactExports.useState(() => Array(nt * 6).fill(0)), + [pt] = reactExports.useState(() => Array(nt * 6).fill(0)), + mt = reactExports.useMemo( + () => ({ + subscribe: (gt) => ( + st((yt) => [...yt, gt]), () => st((yt) => yt.filter((bt) => bt.current !== gt.current)) + ), + }), + [], + ) + return ( + useFrame(() => { + for (let yt = 0; yt < nt; yt++) { + var gt + const bt = (gt = at[yt]) == null ? void 0 : gt.current + bt && + ((dt[yt * 6 + 0] = bt.start.x), + (dt[yt * 6 + 1] = bt.start.y), + (dt[yt * 6 + 2] = bt.start.z), + (dt[yt * 6 + 3] = bt.end.x), + (dt[yt * 6 + 4] = bt.end.y), + (dt[yt * 6 + 5] = bt.end.z), + (pt[yt * 6 + 0] = bt.color.r), + (pt[yt * 6 + 1] = bt.color.g), + (pt[yt * 6 + 2] = bt.color.b), + (pt[yt * 6 + 3] = bt.color.r), + (pt[yt * 6 + 4] = bt.color.g), + (pt[yt * 6 + 5] = bt.color.b)) + } + ut.setColors(pt), ut.setPositions(dt), lt.computeLineDistances() + }), + reactExports.createElement( + 'primitive', + { object: lt, ref: et }, + reactExports.createElement('primitive', { object: ut, attach: 'geometry' }), + reactExports.createElement( + 'primitive', + _extends$u({ object: ct, attach: 'material', vertexColors: !0, resolution: ht, linewidth: rt }, ot), + ), + reactExports.createElement(context.Provider, { value: mt }, it), + ) + ) + }) + class SegmentObject { + constructor() { + ;(this.color = new Color$1('white')), (this.start = new Vector3(0, 0, 0)), (this.end = new Vector3(0, 0, 0)) + } + } + const normPos = (tt) => (tt instanceof Vector3 ? tt : new Vector3(...(typeof tt == 'number' ? [tt, tt, tt] : tt))), + Segment$1 = reactExports.forwardRef(({ color: tt, start: et, end: nt }, rt) => { + const it = reactExports.useContext(context) + if (!it) throw 'Segment must used inside Segments component.' + const ot = reactExports.useRef(null) + return ( + reactExports.useLayoutEffect(() => it.subscribe(ot), []), + reactExports.createElement('segmentObject', { + ref: mergeRefs([ot, rt]), + color: tt, + start: normPos(et), + end: normPos(nt), + }) + ) + }) + function Preload({ all: tt, scene: et, camera: nt }) { + const rt = useThree(({ gl: at }) => at), + it = useThree(({ camera: at }) => at), + ot = useThree(({ scene: at }) => at) + return ( + reactExports.useLayoutEffect(() => { + const at = [] + tt && + (et || ot).traverse((ct) => { + ct.visible === !1 && (at.push(ct), (ct.visible = !0)) + }), + rt.compile(et || ot, nt || it) + const st = new WebGLCubeRenderTarget(128) + new CubeCamera(0.01, 1e5, st).update(rt, et || ot), st.dispose(), at.forEach((ct) => (ct.visible = !1)) + }, []), + null + ) + } + function AdaptiveDpr({ pixelated: tt }) { + const et = useThree((at) => at.gl), + nt = useThree((at) => at.internal.active), + rt = useThree((at) => at.performance.current), + it = useThree((at) => at.viewport.initialDpr), + ot = useThree((at) => at.setDpr) + return ( + reactExports.useEffect(() => { + const at = et.domElement + return () => { + nt && ot(it), tt && at && (at.style.imageRendering = 'auto') + } + }, []), + reactExports.useEffect(() => { + ot(rt * it), tt && et.domElement && (et.domElement.style.imageRendering = rt === 1 ? 'auto' : 'pixelated') + }, [rt]), + null + ) + } + function AdaptiveEvents() { + const tt = useThree((rt) => rt.get), + et = useThree((rt) => rt.setEvents), + nt = useThree((rt) => rt.performance.current) + return ( + reactExports.useEffect(() => { + const rt = tt().events.enabled + return () => et({ enabled: rt }) + }, []), + reactExports.useEffect(() => et({ enabled: nt === 1 }), [nt]), + null + ) + } + /** + * postprocessing v6.33.2 build Mon Oct 02 2023 + * https://github.com/pmndrs/postprocessing + * Copyright 2015-2023 Raoul van Rüschen + * @license Zlib + */ var common_default = + 'varying vec2 vUv;void main(){vUv=position.xy*0.5+0.5;gl_Position=vec4(position.xy,1.0,1.0);}', + convolution_bokeh_default = `#ifdef FRAMEBUFFER_PRECISION_HIGH +uniform mediump sampler2D inputBuffer; +#else +uniform lowp sampler2D inputBuffer; +#endif +#if PASS == 1 +uniform vec4 kernel64[32]; +#else +uniform vec4 kernel16[8]; +#endif +uniform lowp sampler2D cocBuffer;uniform vec2 texelSize;uniform float scale;varying vec2 vUv;void main(){ +#ifdef FOREGROUND +vec2 cocNearFar=texture2D(cocBuffer,vUv).rg*scale;float coc=cocNearFar.x; +#else +float coc=texture2D(cocBuffer,vUv).g*scale; +#endif +if(coc==0.0){gl_FragColor=texture2D(inputBuffer,vUv);}else{ +#ifdef FOREGROUND +vec2 step=texelSize*max(cocNearFar.x,cocNearFar.y); +#else +vec2 step=texelSize*coc; +#endif +#if PASS == 1 +vec4 acc=vec4(0.0);for(int i=0;i<32;++i){vec4 kernel=kernel64[i];vec2 uv=step*kernel.xy+vUv;acc+=texture2D(inputBuffer,uv);uv=step*kernel.zw+vUv;acc+=texture2D(inputBuffer,uv);}gl_FragColor=acc/64.0; +#else +vec4 maxValue=texture2D(inputBuffer,vUv);for(int i=0;i<8;++i){vec4 kernel=kernel16[i];vec2 uv=step*kernel.xy+vUv;maxValue=max(texture2D(inputBuffer,uv),maxValue);uv=step*kernel.zw+vUv;maxValue=max(texture2D(inputBuffer,uv),maxValue);}gl_FragColor=maxValue; +#endif +}}`, + BokehMaterial = class extends ShaderMaterial { + constructor(tt = !1, et = !1) { + super({ + name: 'BokehMaterial', + defines: { PASS: tt ? '2' : '1' }, + uniforms: { + inputBuffer: new Uniform(null), + cocBuffer: new Uniform(null), + texelSize: new Uniform(new Vector2()), + kernel64: new Uniform(null), + kernel16: new Uniform(null), + scale: new Uniform(1), + }, + blending: NoBlending, + toneMapped: !1, + depthWrite: !1, + depthTest: !1, + fragmentShader: convolution_bokeh_default, + vertexShader: common_default, + }), + et && (this.defines.FOREGROUND = '1'), + this.generateKernel() + } + set inputBuffer(tt) { + this.uniforms.inputBuffer.value = tt + } + setInputBuffer(tt) { + this.uniforms.inputBuffer.value = tt + } + set cocBuffer(tt) { + this.uniforms.cocBuffer.value = tt + } + setCoCBuffer(tt) { + this.uniforms.cocBuffer.value = tt + } + get scale() { + return this.uniforms.scale.value + } + set scale(tt) { + this.uniforms.scale.value = tt + } + getScale(tt) { + return this.scale + } + setScale(tt) { + this.scale = tt + } + generateKernel() { + const tt = 2.39996323, + et = new Float64Array(128), + nt = new Float64Array(32) + let rt = 0, + it = 0 + for (let ot = 0, at = Math.sqrt(80); ot < 80; ++ot) { + const st = ot * tt, + lt = Math.sqrt(ot) / at, + ct = lt * Math.cos(st), + ut = lt * Math.sin(st) + ot % 5 === 0 ? ((nt[it++] = ct), (nt[it++] = ut)) : ((et[rt++] = ct), (et[rt++] = ut)) + } + ;(this.uniforms.kernel64.value = et), (this.uniforms.kernel16.value = nt) + } + setTexelSize(tt, et) { + this.uniforms.texelSize.value.set(tt, et) + } + setSize(tt, et) { + this.uniforms.texelSize.value.set(1 / tt, 1 / et) + } + }, + BlendFunction = { + SKIP: 9, + SET: 30, + ADD: 0, + ALPHA: 1, + AVERAGE: 2, + COLOR: 3, + COLOR_BURN: 4, + COLOR_DODGE: 5, + DARKEN: 6, + DIFFERENCE: 7, + DIVIDE: 8, + DST: 9, + EXCLUSION: 10, + HARD_LIGHT: 11, + HARD_MIX: 12, + HUE: 13, + INVERT: 14, + INVERT_RGB: 15, + LIGHTEN: 16, + LINEAR_BURN: 17, + LINEAR_DODGE: 18, + LINEAR_LIGHT: 19, + LUMINOSITY: 20, + MULTIPLY: 21, + NEGATION: 22, + NORMAL: 23, + OVERLAY: 24, + PIN_LIGHT: 25, + REFLECT: 26, + SATURATION: 27, + SCREEN: 28, + SOFT_LIGHT: 29, + SRC: 30, + SUBTRACT: 31, + VIVID_LIGHT: 32, + }, + ColorChannel = { RED: 0, GREEN: 1, BLUE: 2, ALPHA: 3 }, + NoColorSpace = '', + SRGBColorSpace = 'srgb', + LinearSRGBColorSpace = 'srgb-linear', + DepthCopyMode = { FULL: 0, SINGLE: 1 }, + DepthTestStrategy = { DEFAULT: 0, KEEP_MAX_DEPTH: 1, DISCARD_MAX_DEPTH: 2 }, + EffectAttribute = { NONE: 0, DEPTH: 1, CONVOLUTION: 2 }, + EffectShaderSection = { + FRAGMENT_HEAD: 'FRAGMENT_HEAD', + FRAGMENT_MAIN_UV: 'FRAGMENT_MAIN_UV', + FRAGMENT_MAIN_IMAGE: 'FRAGMENT_MAIN_IMAGE', + VERTEX_HEAD: 'VERTEX_HEAD', + VERTEX_MAIN_SUPPORT: 'VERTEX_MAIN_SUPPORT', + }, + GlitchMode = { DISABLED: 0, SPORADIC: 1, CONSTANT_MILD: 2, CONSTANT_WILD: 3 }, + KernelSize = { VERY_SMALL: 0, SMALL: 1, MEDIUM: 2, LARGE: 3, VERY_LARGE: 4, HUGE: 5 }, + LUTOperation = { SCALE_UP: 'lut.scaleup' }, + MaskFunction = { DISCARD: 0, MULTIPLY: 1, MULTIPLY_RGB_SET_ALPHA: 2, MULTIPLY_RGB: 3 }, + VignetteTechnique = { DEFAULT: 0, ESKIL: 1 }, + revision = Number(REVISION.replace(/\D+/g, '')), + useColorSpace = revision >= 152, + encodingToColorSpace = new Map([ + [LinearEncoding, LinearSRGBColorSpace], + [sRGBEncoding, SRGBColorSpace], + ]), + colorSpaceToEncoding = new Map([ + [LinearSRGBColorSpace, LinearEncoding], + [SRGBColorSpace, sRGBEncoding], + ]) + function getOutputColorSpace(tt) { + return tt === null ? null : useColorSpace ? tt.outputColorSpace : encodingToColorSpace.get(tt.outputEncoding) + } + function setTextureColorSpace(tt, et) { + tt !== null && (useColorSpace ? (tt.colorSpace = et) : (tt.encoding = colorSpaceToEncoding.get(et))) + } + function copyTextureColorSpace(tt, et) { + tt === null || et === null || (useColorSpace ? (et.colorSpace = tt.colorSpace) : (et.encoding = tt.encoding)) + } + function updateFragmentShader(tt) { + return revision < 154 ? tt.replace('colorspace_fragment', 'encodings_fragment') : tt + } + function orthographicDepthToViewZ(tt, et, nt) { + return tt * (et - nt) - et + } + function viewZToOrthographicDepth(tt, et, nt) { + return Math.min(Math.max((tt + et) / (et - nt), 0), 1) + } + var circle_of_confusion_default = `#include +#include +#ifdef GL_FRAGMENT_PRECISION_HIGH +uniform highp sampler2D depthBuffer; +#else +uniform mediump sampler2D depthBuffer; +#endif +uniform float focusDistance;uniform float focusRange;uniform float cameraNear;uniform float cameraFar;varying vec2 vUv;float readDepth(const in vec2 uv){ +#if DEPTH_PACKING == 3201 +float depth=unpackRGBAToDepth(texture2D(depthBuffer,uv)); +#else +float depth=texture2D(depthBuffer,uv).r; +#endif +#ifdef LOG_DEPTH +float d=pow(2.0,depth*log2(cameraFar+1.0))-1.0;float a=cameraFar/(cameraFar-cameraNear);float b=cameraFar*cameraNear/(cameraNear-cameraFar);depth=a+b/d; +#endif +return depth;}void main(){float depth=readDepth(vUv); +#ifdef PERSPECTIVE_CAMERA +float viewZ=perspectiveDepthToViewZ(depth,cameraNear,cameraFar);float linearDepth=viewZToOrthographicDepth(viewZ,cameraNear,cameraFar); +#else +float linearDepth=depth; +#endif +float signedDistance=linearDepth-focusDistance;float magnitude=smoothstep(0.0,focusRange,abs(signedDistance));gl_FragColor.rg=magnitude*vec2(step(signedDistance,0.0),step(0.0,signedDistance));}`, + CircleOfConfusionMaterial = class extends ShaderMaterial { + constructor(tt) { + super({ + name: 'CircleOfConfusionMaterial', + defines: { DEPTH_PACKING: '0' }, + uniforms: { + depthBuffer: new Uniform(null), + focusDistance: new Uniform(0), + focusRange: new Uniform(0), + cameraNear: new Uniform(0.3), + cameraFar: new Uniform(1e3), + }, + blending: NoBlending, + toneMapped: !1, + depthWrite: !1, + depthTest: !1, + fragmentShader: circle_of_confusion_default, + vertexShader: common_default, + }), + (this.uniforms.focalLength = this.uniforms.focusRange), + this.copyCameraSettings(tt) + } + get near() { + return this.uniforms.cameraNear.value + } + get far() { + return this.uniforms.cameraFar.value + } + set depthBuffer(tt) { + this.uniforms.depthBuffer.value = tt + } + set depthPacking(tt) { + ;(this.defines.DEPTH_PACKING = tt.toFixed(0)), (this.needsUpdate = !0) + } + setDepthBuffer(tt, et = BasicDepthPacking) { + ;(this.depthBuffer = tt), (this.depthPacking = et) + } + get focusDistance() { + return this.uniforms.focusDistance.value + } + set focusDistance(tt) { + this.uniforms.focusDistance.value = tt + } + get worldFocusDistance() { + return -orthographicDepthToViewZ(this.focusDistance, this.near, this.far) + } + set worldFocusDistance(tt) { + this.focusDistance = viewZToOrthographicDepth(-tt, this.near, this.far) + } + getFocusDistance(tt) { + this.uniforms.focusDistance.value = tt + } + setFocusDistance(tt) { + this.uniforms.focusDistance.value = tt + } + get focalLength() { + return this.focusRange + } + set focalLength(tt) { + this.focusRange = tt + } + get focusRange() { + return this.uniforms.focusRange.value + } + set focusRange(tt) { + this.uniforms.focusRange.value = tt + } + get worldFocusRange() { + return -orthographicDepthToViewZ(this.focusRange, this.near, this.far) + } + set worldFocusRange(tt) { + this.focusRange = viewZToOrthographicDepth(-tt, this.near, this.far) + } + getFocalLength(tt) { + return this.focusRange + } + setFocalLength(tt) { + this.focusRange = tt + } + adoptCameraSettings(tt) { + this.copyCameraSettings(tt) + } + copyCameraSettings(tt) { + tt && + ((this.uniforms.cameraNear.value = tt.near), + (this.uniforms.cameraFar.value = tt.far), + tt instanceof PerspectiveCamera + ? (this.defines.PERSPECTIVE_CAMERA = '1') + : delete this.defines.PERSPECTIVE_CAMERA, + (this.needsUpdate = !0)) + } + }, + convolution_kawase_default = `#ifdef FRAMEBUFFER_PRECISION_HIGH +uniform mediump sampler2D inputBuffer; +#else +uniform lowp sampler2D inputBuffer; +#endif +varying vec2 vUv0;varying vec2 vUv1;varying vec2 vUv2;varying vec2 vUv3;void main(){vec4 sum=texture2D(inputBuffer,vUv0);sum+=texture2D(inputBuffer,vUv1);sum+=texture2D(inputBuffer,vUv2);sum+=texture2D(inputBuffer,vUv3);gl_FragColor=sum*0.25; +#include +}`, + convolution_kawase_default2 = + 'uniform vec4 texelSize;uniform float kernel;uniform float scale;varying vec2 vUv0;varying vec2 vUv1;varying vec2 vUv2;varying vec2 vUv3;void main(){vec2 uv=position.xy*0.5+0.5;vec2 dUv=(texelSize.xy*vec2(kernel)+texelSize.zw)*scale;vUv0=vec2(uv.x-dUv.x,uv.y+dUv.y);vUv1=vec2(uv.x+dUv.x,uv.y+dUv.y);vUv2=vec2(uv.x+dUv.x,uv.y-dUv.y);vUv3=vec2(uv.x-dUv.x,uv.y-dUv.y);gl_Position=vec4(position.xy,1.0,1.0);}', + kernelPresets = [ + new Float32Array([0, 0]), + new Float32Array([0, 1, 1]), + new Float32Array([0, 1, 1, 2]), + new Float32Array([0, 1, 2, 2, 3]), + new Float32Array([0, 1, 2, 3, 4, 4, 5]), + new Float32Array([0, 1, 2, 3, 4, 5, 7, 8, 9, 10]), + ], + KawaseBlurMaterial = class extends ShaderMaterial { + constructor(tt = new Vector4()) { + super({ + name: 'KawaseBlurMaterial', + uniforms: { + inputBuffer: new Uniform(null), + texelSize: new Uniform(new Vector4()), + scale: new Uniform(1), + kernel: new Uniform(0), + }, + blending: NoBlending, + toneMapped: !1, + depthWrite: !1, + depthTest: !1, + fragmentShader: convolution_kawase_default, + vertexShader: convolution_kawase_default2, + }), + (this.fragmentShader = updateFragmentShader(this.fragmentShader)), + this.setTexelSize(tt.x, tt.y), + (this.kernelSize = KernelSize.MEDIUM) + } + set inputBuffer(tt) { + this.uniforms.inputBuffer.value = tt + } + setInputBuffer(tt) { + this.inputBuffer = tt + } + get kernelSequence() { + return kernelPresets[this.kernelSize] + } + get scale() { + return this.uniforms.scale.value + } + set scale(tt) { + this.uniforms.scale.value = tt + } + getScale() { + return this.uniforms.scale.value + } + setScale(tt) { + this.uniforms.scale.value = tt + } + getKernel() { + return null + } + get kernel() { + return this.uniforms.kernel.value + } + set kernel(tt) { + this.uniforms.kernel.value = tt + } + setKernel(tt) { + this.kernel = tt + } + setTexelSize(tt, et) { + this.uniforms.texelSize.value.set(tt, et, tt * 0.5, et * 0.5) + } + setSize(tt, et) { + const nt = 1 / tt, + rt = 1 / et + this.uniforms.texelSize.value.set(nt, rt, nt * 0.5, rt * 0.5) + } + }, + copy_default = `#include +#include +#ifdef FRAMEBUFFER_PRECISION_HIGH +uniform mediump sampler2D inputBuffer; +#else +uniform lowp sampler2D inputBuffer; +#endif +uniform float opacity;varying vec2 vUv;void main(){vec4 texel=texture2D(inputBuffer,vUv);gl_FragColor=opacity*texel; +#include +#include +}`, + CopyMaterial = class extends ShaderMaterial { + constructor() { + super({ + name: 'CopyMaterial', + uniforms: { inputBuffer: new Uniform(null), opacity: new Uniform(1) }, + blending: NoBlending, + toneMapped: !1, + depthWrite: !1, + depthTest: !1, + fragmentShader: copy_default, + vertexShader: common_default, + }), + (this.fragmentShader = updateFragmentShader(this.fragmentShader)) + } + set inputBuffer(tt) { + this.uniforms.inputBuffer.value = tt + } + setInputBuffer(tt) { + this.uniforms.inputBuffer.value = tt + } + getOpacity(tt) { + return this.uniforms.opacity.value + } + setOpacity(tt) { + this.uniforms.opacity.value = tt + } + }, + depth_comparison_default = `#include +#include +#ifdef GL_FRAGMENT_PRECISION_HIGH +uniform highp sampler2D depthBuffer; +#else +uniform mediump sampler2D depthBuffer; +#endif +uniform float cameraNear;uniform float cameraFar;centroid varying float vViewZ;centroid varying vec4 vProjTexCoord;void main(){ +#include +vec2 projTexCoord=(vProjTexCoord.xy/vProjTexCoord.w)*0.5+0.5;projTexCoord=clamp(projTexCoord,0.002,0.998); +#if DEPTH_PACKING == 3201 +float fragCoordZ=unpackRGBAToDepth(texture2D(depthBuffer,projTexCoord)); +#else +float fragCoordZ=texture2D(depthBuffer,projTexCoord).r; +#endif +#ifdef PERSPECTIVE_CAMERA +float viewZ=perspectiveDepthToViewZ(fragCoordZ,cameraNear,cameraFar); +#else +float viewZ=orthographicDepthToViewZ(fragCoordZ,cameraNear,cameraFar); +#endif +float depthTest=(-vViewZ>-viewZ)?1.0:0.0;gl_FragColor.rg=vec2(0.0,depthTest);}`, + depth_comparison_default2 = `#include +#include +#include +#include +varying float vViewZ;varying vec4 vProjTexCoord;void main(){ +#include +#include +#include +#include +#include +vViewZ=mvPosition.z;vProjTexCoord=gl_Position; +#include +}`, + DepthComparisonMaterial = class extends ShaderMaterial { + constructor(tt = null, et) { + super({ + name: 'DepthComparisonMaterial', + defines: { DEPTH_PACKING: '0' }, + uniforms: { depthBuffer: new Uniform(null), cameraNear: new Uniform(0.3), cameraFar: new Uniform(1e3) }, + blending: NoBlending, + toneMapped: !1, + depthWrite: !1, + depthTest: !1, + fragmentShader: depth_comparison_default, + vertexShader: depth_comparison_default2, + }), + (this.depthBuffer = tt), + (this.depthPacking = RGBADepthPacking), + this.copyCameraSettings(et) + } + set depthBuffer(tt) { + this.uniforms.depthBuffer.value = tt + } + set depthPacking(tt) { + ;(this.defines.DEPTH_PACKING = tt.toFixed(0)), (this.needsUpdate = !0) + } + setDepthBuffer(tt, et = RGBADepthPacking) { + ;(this.depthBuffer = tt), (this.depthPacking = et) + } + adoptCameraSettings(tt) { + this.copyCameraSettings(tt) + } + copyCameraSettings(tt) { + tt && + ((this.uniforms.cameraNear.value = tt.near), + (this.uniforms.cameraFar.value = tt.far), + tt instanceof PerspectiveCamera + ? (this.defines.PERSPECTIVE_CAMERA = '1') + : delete this.defines.PERSPECTIVE_CAMERA, + (this.needsUpdate = !0)) + } + }, + depth_copy_default = `#include +varying vec2 vUv; +#ifdef NORMAL_DEPTH +#ifdef GL_FRAGMENT_PRECISION_HIGH +uniform highp sampler2D normalDepthBuffer; +#else +uniform mediump sampler2D normalDepthBuffer; +#endif +float readDepth(const in vec2 uv){return texture2D(normalDepthBuffer,uv).a;} +#else +#if INPUT_DEPTH_PACKING == 3201 +uniform lowp sampler2D depthBuffer; +#elif defined(GL_FRAGMENT_PRECISION_HIGH) +uniform highp sampler2D depthBuffer; +#else +uniform mediump sampler2D depthBuffer; +#endif +float readDepth(const in vec2 uv){ +#if INPUT_DEPTH_PACKING == 3201 +return unpackRGBAToDepth(texture2D(depthBuffer,uv)); +#else +return texture2D(depthBuffer,uv).r; +#endif +} +#endif +void main(){ +#if INPUT_DEPTH_PACKING == OUTPUT_DEPTH_PACKING +gl_FragColor=texture2D(depthBuffer,vUv); +#else +float depth=readDepth(vUv); +#if OUTPUT_DEPTH_PACKING == 3201 +gl_FragColor=(depth==1.0)?vec4(1.0):packDepthToRGBA(depth); +#else +gl_FragColor=vec4(vec3(depth),1.0); +#endif +#endif +}`, + depth_copy_default2 = `varying vec2 vUv; +#if DEPTH_COPY_MODE == 1 +uniform vec2 texelPosition; +#endif +void main(){ +#if DEPTH_COPY_MODE == 1 +vUv=texelPosition; +#else +vUv=position.xy*0.5+0.5; +#endif +gl_Position=vec4(position.xy,1.0,1.0);}`, + DepthCopyMaterial = class extends ShaderMaterial { + constructor() { + super({ + name: 'DepthCopyMaterial', + defines: { INPUT_DEPTH_PACKING: '0', OUTPUT_DEPTH_PACKING: '0', DEPTH_COPY_MODE: '0' }, + uniforms: { depthBuffer: new Uniform(null), texelPosition: new Uniform(new Vector2()) }, + blending: NoBlending, + toneMapped: !1, + depthWrite: !1, + depthTest: !1, + fragmentShader: depth_copy_default, + vertexShader: depth_copy_default2, + }), + (this.depthCopyMode = DepthCopyMode.FULL) + } + get depthBuffer() { + return this.uniforms.depthBuffer.value + } + set depthBuffer(tt) { + this.uniforms.depthBuffer.value = tt + } + set inputDepthPacking(tt) { + ;(this.defines.INPUT_DEPTH_PACKING = tt.toFixed(0)), (this.needsUpdate = !0) + } + get outputDepthPacking() { + return Number(this.defines.OUTPUT_DEPTH_PACKING) + } + set outputDepthPacking(tt) { + ;(this.defines.OUTPUT_DEPTH_PACKING = tt.toFixed(0)), (this.needsUpdate = !0) + } + setDepthBuffer(tt, et = BasicDepthPacking) { + ;(this.depthBuffer = tt), (this.inputDepthPacking = et) + } + getInputDepthPacking() { + return Number(this.defines.INPUT_DEPTH_PACKING) + } + setInputDepthPacking(tt) { + ;(this.defines.INPUT_DEPTH_PACKING = tt.toFixed(0)), (this.needsUpdate = !0) + } + getOutputDepthPacking() { + return Number(this.defines.OUTPUT_DEPTH_PACKING) + } + setOutputDepthPacking(tt) { + ;(this.defines.OUTPUT_DEPTH_PACKING = tt.toFixed(0)), (this.needsUpdate = !0) + } + get texelPosition() { + return this.uniforms.texelPosition.value + } + getTexelPosition() { + return this.uniforms.texelPosition.value + } + setTexelPosition(tt) { + this.uniforms.texelPosition.value = tt + } + get mode() { + return this.depthCopyMode + } + set mode(tt) { + ;(this.depthCopyMode = tt), (this.defines.DEPTH_COPY_MODE = tt.toFixed(0)), (this.needsUpdate = !0) + } + getMode() { + return this.mode + } + setMode(tt) { + this.mode = tt + } + }, + depth_downsampling_default = `#include +#ifdef GL_FRAGMENT_PRECISION_HIGH +uniform highp sampler2D depthBuffer; +#else +uniform mediump sampler2D depthBuffer; +#endif +#ifdef DOWNSAMPLE_NORMALS +uniform lowp sampler2D normalBuffer; +#endif +varying vec2 vUv0;varying vec2 vUv1;varying vec2 vUv2;varying vec2 vUv3;float readDepth(const in vec2 uv){ +#if DEPTH_PACKING == 3201 +return unpackRGBAToDepth(texture2D(depthBuffer,uv)); +#else +return texture2D(depthBuffer,uv).r; +#endif +}int findBestDepth(const in highp float samples[4]){float c=(samples[0]+samples[1]+samples[2]+samples[3])*0.25;highp float distances[]=float[4](abs(c-samples[0]),abs(c-samples[1]),abs(c-samples[2]),abs(c-samples[3]));float maxDistance=max(max(distances[0],distances[1]),max(distances[2],distances[3]));int remaining[3];int rejected[3];int i,j,k;for(i=0,j=0,k=0;i<4;++i){if(distances[i] +#include +#ifdef GL_FRAGMENT_PRECISION_HIGH +uniform highp sampler2D depthBuffer0;uniform highp sampler2D depthBuffer1; +#else +uniform mediump sampler2D depthBuffer0;uniform mediump sampler2D depthBuffer1; +#endif +uniform sampler2D inputBuffer;uniform vec2 cameraNearFar;float getViewZ(const in float depth){ +#ifdef PERSPECTIVE_CAMERA +return perspectiveDepthToViewZ(depth,cameraNearFar.x,cameraNearFar.y); +#else +return orthographicDepthToViewZ(depth,cameraNearFar.x,cameraNearFar.y); +#endif +}varying vec2 vUv;void main(){vec2 depth; +#if DEPTH_PACKING_0 == 3201 +depth.x=unpackRGBAToDepth(texture2D(depthBuffer0,vUv)); +#else +depth.x=texture2D(depthBuffer0,vUv).r; +#ifdef LOG_DEPTH +float d=pow(2.0,depth.x*log2(cameraNearFar.y+1.0))-1.0;float a=cameraNearFar.y/(cameraNearFar.y-cameraNearFar.x);float b=cameraNearFar.y*cameraNearFar.x/(cameraNearFar.x-cameraNearFar.y);depth.x=a+b/d; +#endif +#endif +#if DEPTH_PACKING_1 == 3201 +depth.y=unpackRGBAToDepth(texture2D(depthBuffer1,vUv)); +#else +depth.y=texture2D(depthBuffer1,vUv).r; +#ifdef LOG_DEPTH +float d=pow(2.0,depth.y*log2(cameraNearFar.y+1.0))-1.0;float a=cameraNearFar.y/(cameraNearFar.y-cameraNearFar.x);float b=cameraNearFar.y*cameraNearFar.x/(cameraNearFar.x-cameraNearFar.y);depth.y=a+b/d; +#endif +#endif +bool isMaxDepth=(depth.x==1.0); +#ifdef PERSPECTIVE_CAMERA +depth.x=viewZToOrthographicDepth(getViewZ(depth.x),cameraNearFar.x,cameraNearFar.y);depth.y=viewZToOrthographicDepth(getViewZ(depth.y),cameraNearFar.x,cameraNearFar.y); +#endif +#if DEPTH_TEST_STRATEGY == 0 +bool keep=depthTest(depth.x,depth.y); +#elif DEPTH_TEST_STRATEGY == 1 +bool keep=isMaxDepth||depthTest(depth.x,depth.y); +#else +bool keep=!isMaxDepth&&depthTest(depth.x,depth.y); +#endif +if(keep){gl_FragColor=texture2D(inputBuffer,vUv);}else{discard;}}`, + DepthMaskMaterial = class extends ShaderMaterial { + constructor() { + super({ + name: 'DepthMaskMaterial', + defines: { + DEPTH_EPSILON: '0.0001', + DEPTH_PACKING_0: '0', + DEPTH_PACKING_1: '0', + DEPTH_TEST_STRATEGY: DepthTestStrategy.KEEP_MAX_DEPTH, + }, + uniforms: { + inputBuffer: new Uniform(null), + depthBuffer0: new Uniform(null), + depthBuffer1: new Uniform(null), + cameraNearFar: new Uniform(new Vector2(1, 1)), + }, + blending: NoBlending, + toneMapped: !1, + depthWrite: !1, + depthTest: !1, + fragmentShader: depth_mask_default, + vertexShader: common_default, + }), + (this.depthMode = LessDepth) + } + set depthBuffer0(tt) { + this.uniforms.depthBuffer0.value = tt + } + set depthPacking0(tt) { + ;(this.defines.DEPTH_PACKING_0 = tt.toFixed(0)), (this.needsUpdate = !0) + } + setDepthBuffer0(tt, et = BasicDepthPacking) { + ;(this.depthBuffer0 = tt), (this.depthPacking0 = et) + } + set depthBuffer1(tt) { + this.uniforms.depthBuffer1.value = tt + } + set depthPacking1(tt) { + ;(this.defines.DEPTH_PACKING_1 = tt.toFixed(0)), (this.needsUpdate = !0) + } + setDepthBuffer1(tt, et = BasicDepthPacking) { + ;(this.depthBuffer1 = tt), (this.depthPacking1 = et) + } + get maxDepthStrategy() { + return Number(this.defines.DEPTH_TEST_STRATEGY) + } + set maxDepthStrategy(tt) { + ;(this.defines.DEPTH_TEST_STRATEGY = tt.toFixed(0)), (this.needsUpdate = !0) + } + get keepFar() { + return this.maxDepthStrategy + } + set keepFar(tt) { + this.maxDepthStrategy = tt ? DepthTestStrategy.KEEP_MAX_DEPTH : DepthTestStrategy.DISCARD_MAX_DEPTH + } + getMaxDepthStrategy() { + return this.maxDepthStrategy + } + setMaxDepthStrategy(tt) { + this.maxDepthStrategy = tt + } + get epsilon() { + return Number(this.defines.DEPTH_EPSILON) + } + set epsilon(tt) { + ;(this.defines.DEPTH_EPSILON = tt.toFixed(16)), (this.needsUpdate = !0) + } + getEpsilon() { + return this.epsilon + } + setEpsilon(tt) { + this.epsilon = tt + } + get depthMode() { + return Number(this.defines.DEPTH_MODE) + } + set depthMode(tt) { + let et + switch (tt) { + case NeverDepth: + et = 'false' + break + case AlwaysDepth: + et = 'true' + break + case EqualDepth: + et = 'abs(d1 - d0) <= DEPTH_EPSILON' + break + case NotEqualDepth: + et = 'abs(d1 - d0) > DEPTH_EPSILON' + break + case LessDepth: + et = 'd0 > d1' + break + case LessEqualDepth: + et = 'd0 >= d1' + break + case GreaterEqualDepth: + et = 'd0 <= d1' + break + case GreaterDepth: + default: + et = 'd0 < d1' + break + } + ;(this.defines.DEPTH_MODE = tt.toFixed(0)), (this.defines['depthTest(d0, d1)'] = et), (this.needsUpdate = !0) + } + getDepthMode() { + return this.depthMode + } + setDepthMode(tt) { + this.depthMode = tt + } + adoptCameraSettings(tt) { + this.copyCameraSettings(tt) + } + copyCameraSettings(tt) { + tt && + (this.uniforms.cameraNearFar.value.set(tt.near, tt.far), + tt instanceof PerspectiveCamera + ? (this.defines.PERSPECTIVE_CAMERA = '1') + : delete this.defines.PERSPECTIVE_CAMERA, + (this.needsUpdate = !0)) + } + }, + convolution_downsampling_default = `#ifdef FRAMEBUFFER_PRECISION_HIGH +uniform mediump sampler2D inputBuffer; +#else +uniform lowp sampler2D inputBuffer; +#endif +#define WEIGHT_INNER 0.125 +#define WEIGHT_OUTER 0.0555555 +varying vec2 vUv;varying vec2 vUv00;varying vec2 vUv01;varying vec2 vUv02;varying vec2 vUv03;varying vec2 vUv04;varying vec2 vUv05;varying vec2 vUv06;varying vec2 vUv07;varying vec2 vUv08;varying vec2 vUv09;varying vec2 vUv10;varying vec2 vUv11;float clampToBorder(const in vec2 uv){return float(uv.s>=0.0&&uv.s<=1.0&&uv.t>=0.0&&uv.t<=1.0);}void main(){vec4 c=vec4(0.0);vec4 w=WEIGHT_INNER*vec4(clampToBorder(vUv00),clampToBorder(vUv01),clampToBorder(vUv02),clampToBorder(vUv03));c+=w.x*texture2D(inputBuffer,vUv00);c+=w.y*texture2D(inputBuffer,vUv01);c+=w.z*texture2D(inputBuffer,vUv02);c+=w.w*texture2D(inputBuffer,vUv03);w=WEIGHT_OUTER*vec4(clampToBorder(vUv04),clampToBorder(vUv05),clampToBorder(vUv06),clampToBorder(vUv07));c+=w.x*texture2D(inputBuffer,vUv04);c+=w.y*texture2D(inputBuffer,vUv05);c+=w.z*texture2D(inputBuffer,vUv06);c+=w.w*texture2D(inputBuffer,vUv07);w=WEIGHT_OUTER*vec4(clampToBorder(vUv08),clampToBorder(vUv09),clampToBorder(vUv10),clampToBorder(vUv11));c+=w.x*texture2D(inputBuffer,vUv08);c+=w.y*texture2D(inputBuffer,vUv09);c+=w.z*texture2D(inputBuffer,vUv10);c+=w.w*texture2D(inputBuffer,vUv11);c+=WEIGHT_OUTER*texture2D(inputBuffer,vUv);gl_FragColor=c; +#include +}`, + convolution_downsampling_default2 = + 'uniform vec2 texelSize;varying vec2 vUv;varying vec2 vUv00;varying vec2 vUv01;varying vec2 vUv02;varying vec2 vUv03;varying vec2 vUv04;varying vec2 vUv05;varying vec2 vUv06;varying vec2 vUv07;varying vec2 vUv08;varying vec2 vUv09;varying vec2 vUv10;varying vec2 vUv11;void main(){vUv=position.xy*0.5+0.5;vUv00=vUv+texelSize*vec2(-1.0,1.0);vUv01=vUv+texelSize*vec2(1.0,1.0);vUv02=vUv+texelSize*vec2(-1.0,-1.0);vUv03=vUv+texelSize*vec2(1.0,-1.0);vUv04=vUv+texelSize*vec2(-2.0,2.0);vUv05=vUv+texelSize*vec2(0.0,2.0);vUv06=vUv+texelSize*vec2(2.0,2.0);vUv07=vUv+texelSize*vec2(-2.0,0.0);vUv08=vUv+texelSize*vec2(2.0,0.0);vUv09=vUv+texelSize*vec2(-2.0,-2.0);vUv10=vUv+texelSize*vec2(0.0,-2.0);vUv11=vUv+texelSize*vec2(2.0,-2.0);gl_Position=vec4(position.xy,1.0,1.0);}', + DownsamplingMaterial = class extends ShaderMaterial { + constructor() { + super({ + name: 'DownsamplingMaterial', + uniforms: { inputBuffer: new Uniform(null), texelSize: new Uniform(new Vector2()) }, + blending: NoBlending, + toneMapped: !1, + depthWrite: !1, + depthTest: !1, + fragmentShader: convolution_downsampling_default, + vertexShader: convolution_downsampling_default2, + }), + (this.fragmentShader = updateFragmentShader(this.fragmentShader)) + } + set inputBuffer(tt) { + this.uniforms.inputBuffer.value = tt + } + setSize(tt, et) { + this.uniforms.texelSize.value.set(1 / tt, 1 / et) + } + }, + effect_default = `#include +#include +#include +#define packFloatToRGBA(v) packDepthToRGBA(v) +#define unpackRGBAToFloat(v) unpackRGBAToDepth(v) +#ifdef FRAMEBUFFER_PRECISION_HIGH +uniform mediump sampler2D inputBuffer; +#else +uniform lowp sampler2D inputBuffer; +#endif +#if DEPTH_PACKING == 3201 +uniform lowp sampler2D depthBuffer; +#elif defined(GL_FRAGMENT_PRECISION_HIGH) +uniform highp sampler2D depthBuffer; +#else +uniform mediump sampler2D depthBuffer; +#endif +uniform vec2 resolution;uniform vec2 texelSize;uniform float cameraNear;uniform float cameraFar;uniform float aspect;uniform float time;varying vec2 vUv; +#if THREE_REVISION < 143 +#define luminance(v) linearToRelativeLuminance(v) +#endif +#if THREE_REVISION >= 137 +vec4 sRGBToLinear(const in vec4 value){return vec4(mix(pow(value.rgb*0.9478672986+vec3(0.0521327014),vec3(2.4)),value.rgb*0.0773993808,vec3(lessThanEqual(value.rgb,vec3(0.04045)))),value.a);} +#endif +float readDepth(const in vec2 uv){ +#if DEPTH_PACKING == 3201 +return unpackRGBAToDepth(texture2D(depthBuffer,uv)); +#else +return texture2D(depthBuffer,uv).r; +#endif +}float getViewZ(const in float depth){ +#ifdef PERSPECTIVE_CAMERA +return perspectiveDepthToViewZ(depth,cameraNear,cameraFar); +#else +return orthographicDepthToViewZ(depth,cameraNear,cameraFar); +#endif +}vec3 RGBToHCV(const in vec3 RGB){vec4 P=mix(vec4(RGB.bg,-1.0,2.0/3.0),vec4(RGB.gb,0.0,-1.0/3.0),step(RGB.b,RGB.g));vec4 Q=mix(vec4(P.xyw,RGB.r),vec4(RGB.r,P.yzx),step(P.x,RGB.r));float C=Q.x-min(Q.w,Q.y);float H=abs((Q.w-Q.y)/(6.0*C+EPSILON)+Q.z);return vec3(H,C,Q.x);}vec3 RGBToHSL(const in vec3 RGB){vec3 HCV=RGBToHCV(RGB);float L=HCV.z-HCV.y*0.5;float S=HCV.y/(1.0-abs(L*2.0-1.0)+EPSILON);return vec3(HCV.x,S,L);}vec3 HueToRGB(const in float H){float R=abs(H*6.0-3.0)-1.0;float G=2.0-abs(H*6.0-2.0);float B=2.0-abs(H*6.0-4.0);return clamp(vec3(R,G,B),0.0,1.0);}vec3 HSLToRGB(const in vec3 HSL){vec3 RGB=HueToRGB(HSL.x);float C=(1.0-abs(2.0*HSL.z-1.0))*HSL.y;return(RGB-0.5)*C+HSL.z;}FRAGMENT_HEAD void main(){FRAGMENT_MAIN_UV vec4 color0=texture2D(inputBuffer,UV);vec4 color1=vec4(0.0);FRAGMENT_MAIN_IMAGE color0.a=clamp(color0.a,0.0,1.0);gl_FragColor=color0; +#ifdef ENCODE_OUTPUT +#include +#endif +#include +}`, + effect_default2 = + 'uniform vec2 resolution;uniform vec2 texelSize;uniform float cameraNear;uniform float cameraFar;uniform float aspect;uniform float time;varying vec2 vUv;VERTEX_HEAD void main(){vUv=position.xy*0.5+0.5;VERTEX_MAIN_SUPPORT gl_Position=vec4(position.xy,1.0,1.0);}', + EffectMaterial = class extends ShaderMaterial { + constructor(tt, et, nt, rt, it = !1) { + super({ + name: 'EffectMaterial', + defines: { THREE_REVISION: REVISION.replace(/\D+/g, ''), DEPTH_PACKING: '0', ENCODE_OUTPUT: '1' }, + uniforms: { + inputBuffer: new Uniform(null), + depthBuffer: new Uniform(null), + resolution: new Uniform(new Vector2()), + texelSize: new Uniform(new Vector2()), + cameraNear: new Uniform(0.3), + cameraFar: new Uniform(1e3), + aspect: new Uniform(1), + time: new Uniform(0), + }, + blending: NoBlending, + toneMapped: !1, + depthWrite: !1, + depthTest: !1, + dithering: it, + }), + tt && this.setShaderParts(tt), + et && this.setDefines(et), + nt && this.setUniforms(nt), + this.copyCameraSettings(rt) + } + set inputBuffer(tt) { + this.uniforms.inputBuffer.value = tt + } + setInputBuffer(tt) { + this.uniforms.inputBuffer.value = tt + } + get depthBuffer() { + return this.uniforms.depthBuffer.value + } + set depthBuffer(tt) { + this.uniforms.depthBuffer.value = tt + } + get depthPacking() { + return Number(this.defines.DEPTH_PACKING) + } + set depthPacking(tt) { + ;(this.defines.DEPTH_PACKING = tt.toFixed(0)), (this.needsUpdate = !0) + } + setDepthBuffer(tt, et = BasicDepthPacking) { + ;(this.depthBuffer = tt), (this.depthPacking = et) + } + setShaderData(tt) { + this.setShaderParts(tt.shaderParts), + this.setDefines(tt.defines), + this.setUniforms(tt.uniforms), + this.setExtensions(tt.extensions) + } + setShaderParts(tt) { + return ( + (this.fragmentShader = effect_default + .replace(EffectShaderSection.FRAGMENT_HEAD, tt.get(EffectShaderSection.FRAGMENT_HEAD) || '') + .replace(EffectShaderSection.FRAGMENT_MAIN_UV, tt.get(EffectShaderSection.FRAGMENT_MAIN_UV) || '') + .replace(EffectShaderSection.FRAGMENT_MAIN_IMAGE, tt.get(EffectShaderSection.FRAGMENT_MAIN_IMAGE) || '')), + (this.vertexShader = effect_default2 + .replace(EffectShaderSection.VERTEX_HEAD, tt.get(EffectShaderSection.VERTEX_HEAD) || '') + .replace(EffectShaderSection.VERTEX_MAIN_SUPPORT, tt.get(EffectShaderSection.VERTEX_MAIN_SUPPORT) || '')), + (this.fragmentShader = updateFragmentShader(this.fragmentShader)), + (this.needsUpdate = !0), + this + ) + } + setDefines(tt) { + for (const et of tt.entries()) this.defines[et[0]] = et[1] + return (this.needsUpdate = !0), this + } + setUniforms(tt) { + for (const et of tt.entries()) this.uniforms[et[0]] = et[1] + return this + } + setExtensions(tt) { + this.extensions = {} + for (const et of tt) this.extensions[et] = !0 + return this + } + get encodeOutput() { + return this.defines.ENCODE_OUTPUT !== void 0 + } + set encodeOutput(tt) { + this.encodeOutput !== tt && + (tt ? (this.defines.ENCODE_OUTPUT = '1') : delete this.defines.ENCODE_OUTPUT, (this.needsUpdate = !0)) + } + isOutputEncodingEnabled(tt) { + return this.encodeOutput + } + setOutputEncodingEnabled(tt) { + this.encodeOutput = tt + } + get time() { + return this.uniforms.time.value + } + set time(tt) { + this.uniforms.time.value = tt + } + setDeltaTime(tt) { + this.uniforms.time.value += tt + } + adoptCameraSettings(tt) { + this.copyCameraSettings(tt) + } + copyCameraSettings(tt) { + tt && + ((this.uniforms.cameraNear.value = tt.near), + (this.uniforms.cameraFar.value = tt.far), + tt instanceof PerspectiveCamera + ? (this.defines.PERSPECTIVE_CAMERA = '1') + : delete this.defines.PERSPECTIVE_CAMERA, + (this.needsUpdate = !0)) + } + setSize(tt, et) { + const nt = this.uniforms + nt.resolution.value.set(tt, et), nt.texelSize.value.set(1 / tt, 1 / et), (nt.aspect.value = tt / et) + } + static get Section() { + return EffectShaderSection + } + }, + convolution_god_rays_default = `#include +#include +#ifdef FRAMEBUFFER_PRECISION_HIGH +uniform mediump sampler2D inputBuffer; +#else +uniform lowp sampler2D inputBuffer; +#endif +uniform vec2 lightPosition;uniform float exposure;uniform float decay;uniform float density;uniform float weight;uniform float clampMax;varying vec2 vUv;void main(){vec2 coord=vUv;vec2 delta=lightPosition-coord;delta*=1.0/SAMPLES_FLOAT*density;float illuminationDecay=1.0;vec4 color=vec4(0.0);for(int i=0;i +}`, + GodRaysMaterial = class extends ShaderMaterial { + constructor(tt) { + super({ + name: 'GodRaysMaterial', + defines: { SAMPLES_INT: '60', SAMPLES_FLOAT: '60.0' }, + uniforms: { + inputBuffer: new Uniform(null), + lightPosition: new Uniform(tt), + density: new Uniform(1), + decay: new Uniform(1), + weight: new Uniform(1), + exposure: new Uniform(1), + clampMax: new Uniform(1), + }, + blending: NoBlending, + toneMapped: !1, + depthWrite: !1, + depthTest: !1, + fragmentShader: convolution_god_rays_default, + vertexShader: common_default, + }) + } + set inputBuffer(tt) { + this.uniforms.inputBuffer.value = tt + } + setInputBuffer(tt) { + this.uniforms.inputBuffer.value = tt + } + get lightPosition() { + return this.uniforms.lightPosition.value + } + getLightPosition() { + return this.uniforms.lightPosition.value + } + setLightPosition(tt) { + this.uniforms.lightPosition.value = tt + } + get density() { + return this.uniforms.density.value + } + set density(tt) { + this.uniforms.density.value = tt + } + getDensity() { + return this.uniforms.density.value + } + setDensity(tt) { + this.uniforms.density.value = tt + } + get decay() { + return this.uniforms.decay.value + } + set decay(tt) { + this.uniforms.decay.value = tt + } + getDecay() { + return this.uniforms.decay.value + } + setDecay(tt) { + this.uniforms.decay.value = tt + } + get weight() { + return this.uniforms.weight.value + } + set weight(tt) { + this.uniforms.weight.value = tt + } + getWeight() { + return this.uniforms.weight.value + } + setWeight(tt) { + this.uniforms.weight.value = tt + } + get exposure() { + return this.uniforms.exposure.value + } + set exposure(tt) { + this.uniforms.exposure.value = tt + } + getExposure() { + return this.uniforms.exposure.value + } + setExposure(tt) { + this.uniforms.exposure.value = tt + } + get maxIntensity() { + return this.uniforms.clampMax.value + } + set maxIntensity(tt) { + this.uniforms.clampMax.value = tt + } + getMaxIntensity() { + return this.uniforms.clampMax.value + } + setMaxIntensity(tt) { + this.uniforms.clampMax.value = tt + } + get samples() { + return Number(this.defines.SAMPLES_INT) + } + set samples(tt) { + const et = Math.floor(tt) + ;(this.defines.SAMPLES_INT = et.toFixed(0)), + (this.defines.SAMPLES_FLOAT = et.toFixed(1)), + (this.needsUpdate = !0) + } + getSamples() { + return this.samples + } + setSamples(tt) { + this.samples = tt + } + }, + luminance_default = `#include +#if THREE_REVISION < 143 +#define luminance(v) linearToRelativeLuminance(v) +#endif +#ifdef FRAMEBUFFER_PRECISION_HIGH +uniform mediump sampler2D inputBuffer; +#else +uniform lowp sampler2D inputBuffer; +#endif +#ifdef RANGE +uniform vec2 range; +#elif defined(THRESHOLD) +uniform float threshold;uniform float smoothing; +#endif +varying vec2 vUv;void main(){vec4 texel=texture2D(inputBuffer,vUv);float l=luminance(texel.rgb); +#ifdef RANGE +float low=step(range.x,l);float high=step(l,range.y);l*=low*high; +#elif defined(THRESHOLD) +l=smoothstep(threshold,threshold+smoothing,l); +#endif +#ifdef COLOR +gl_FragColor=vec4(texel.rgb*l,l); +#else +gl_FragColor=vec4(l); +#endif +}`, + LuminanceMaterial = class extends ShaderMaterial { + constructor(tt = !1, et = null) { + super({ + name: 'LuminanceMaterial', + defines: { THREE_REVISION: REVISION.replace(/\D+/g, '') }, + uniforms: { + inputBuffer: new Uniform(null), + threshold: new Uniform(0), + smoothing: new Uniform(1), + range: new Uniform(null), + }, + blending: NoBlending, + toneMapped: !1, + depthWrite: !1, + depthTest: !1, + fragmentShader: luminance_default, + vertexShader: common_default, + }), + (this.colorOutput = tt), + (this.luminanceRange = et) + } + set inputBuffer(tt) { + this.uniforms.inputBuffer.value = tt + } + setInputBuffer(tt) { + this.uniforms.inputBuffer.value = tt + } + get threshold() { + return this.uniforms.threshold.value + } + set threshold(tt) { + this.smoothing > 0 || tt > 0 ? (this.defines.THRESHOLD = '1') : delete this.defines.THRESHOLD, + (this.uniforms.threshold.value = tt) + } + getThreshold() { + return this.threshold + } + setThreshold(tt) { + this.threshold = tt + } + get smoothing() { + return this.uniforms.smoothing.value + } + set smoothing(tt) { + this.threshold > 0 || tt > 0 ? (this.defines.THRESHOLD = '1') : delete this.defines.THRESHOLD, + (this.uniforms.smoothing.value = tt) + } + getSmoothingFactor() { + return this.smoothing + } + setSmoothingFactor(tt) { + this.smoothing = tt + } + get useThreshold() { + return this.threshold > 0 || this.smoothing > 0 + } + set useThreshold(tt) {} + get colorOutput() { + return this.defines.COLOR !== void 0 + } + set colorOutput(tt) { + tt ? (this.defines.COLOR = '1') : delete this.defines.COLOR, (this.needsUpdate = !0) + } + isColorOutputEnabled(tt) { + return this.colorOutput + } + setColorOutputEnabled(tt) { + this.colorOutput = tt + } + get useRange() { + return this.luminanceRange !== null + } + set useRange(tt) { + this.luminanceRange = null + } + get luminanceRange() { + return this.uniforms.range.value + } + set luminanceRange(tt) { + tt !== null ? (this.defines.RANGE = '1') : delete this.defines.RANGE, + (this.uniforms.range.value = tt), + (this.needsUpdate = !0) + } + getLuminanceRange() { + return this.luminanceRange + } + setLuminanceRange(tt) { + this.luminanceRange = tt + } + }, + mask_default = `#ifdef FRAMEBUFFER_PRECISION_HIGH +uniform mediump sampler2D inputBuffer; +#else +uniform lowp sampler2D inputBuffer; +#endif +#ifdef MASK_PRECISION_HIGH +uniform mediump sampler2D maskTexture; +#else +uniform lowp sampler2D maskTexture; +#endif +#if MASK_FUNCTION != 0 +uniform float strength; +#endif +varying vec2 vUv;void main(){ +#if COLOR_CHANNEL == 0 +float mask=texture2D(maskTexture,vUv).r; +#elif COLOR_CHANNEL == 1 +float mask=texture2D(maskTexture,vUv).g; +#elif COLOR_CHANNEL == 2 +float mask=texture2D(maskTexture,vUv).b; +#else +float mask=texture2D(maskTexture,vUv).a; +#endif +#if MASK_FUNCTION == 0 +#ifdef INVERTED +mask=step(mask,0.0); +#else +mask=1.0-step(mask,0.0); +#endif +#else +mask=clamp(mask*strength,0.0,1.0); +#ifdef INVERTED +mask=1.0-mask; +#endif +#endif +#if MASK_FUNCTION == 3 +vec4 texel=texture2D(inputBuffer,vUv);gl_FragColor=vec4(mask*texel.rgb,texel.a); +#elif MASK_FUNCTION == 2 +gl_FragColor=vec4(mask*texture2D(inputBuffer,vUv).rgb,mask); +#else +gl_FragColor=mask*texture2D(inputBuffer,vUv); +#endif +}`, + MaskMaterial = class extends ShaderMaterial { + constructor(tt = null) { + super({ + name: 'MaskMaterial', + uniforms: { maskTexture: new Uniform(tt), inputBuffer: new Uniform(null), strength: new Uniform(1) }, + blending: NoBlending, + toneMapped: !1, + depthWrite: !1, + depthTest: !1, + fragmentShader: mask_default, + vertexShader: common_default, + }), + (this.colorChannel = ColorChannel.RED), + (this.maskFunction = MaskFunction.DISCARD) + } + set inputBuffer(tt) { + this.uniforms.inputBuffer.value = tt + } + setInputBuffer(tt) { + this.uniforms.inputBuffer.value = tt + } + set maskTexture(tt) { + ;(this.uniforms.maskTexture.value = tt), + delete this.defines.MASK_PRECISION_HIGH, + tt.type !== UnsignedByteType && (this.defines.MASK_PRECISION_HIGH = '1'), + (this.needsUpdate = !0) + } + setMaskTexture(tt) { + this.maskTexture = tt + } + set colorChannel(tt) { + ;(this.defines.COLOR_CHANNEL = tt.toFixed(0)), (this.needsUpdate = !0) + } + setColorChannel(tt) { + this.colorChannel = tt + } + set maskFunction(tt) { + ;(this.defines.MASK_FUNCTION = tt.toFixed(0)), (this.needsUpdate = !0) + } + setMaskFunction(tt) { + this.maskFunction = tt + } + get inverted() { + return this.defines.INVERTED !== void 0 + } + set inverted(tt) { + this.inverted && !tt ? delete this.defines.INVERTED : tt && (this.defines.INVERTED = '1'), + (this.needsUpdate = !0) + } + isInverted() { + return this.inverted + } + setInverted(tt) { + this.inverted = tt + } + get strength() { + return this.uniforms.strength.value + } + set strength(tt) { + this.uniforms.strength.value = tt + } + getStrength() { + return this.strength + } + setStrength(tt) { + this.strength = tt + } + }, + outline_default = + 'uniform lowp sampler2D inputBuffer;varying vec2 vUv0;varying vec2 vUv1;varying vec2 vUv2;varying vec2 vUv3;void main(){vec2 c0=texture2D(inputBuffer,vUv0).rg;vec2 c1=texture2D(inputBuffer,vUv1).rg;vec2 c2=texture2D(inputBuffer,vUv2).rg;vec2 c3=texture2D(inputBuffer,vUv3).rg;float d0=(c0.x-c1.x)*0.5;float d1=(c2.x-c3.x)*0.5;float d=length(vec2(d0,d1));float a0=min(c0.y,c1.y);float a1=min(c2.y,c3.y);float visibilityFactor=min(a0,a1);gl_FragColor.rg=(1.0-visibilityFactor>0.001)?vec2(d,0.0):vec2(0.0,d);}', + outline_default2 = + 'uniform vec2 texelSize;varying vec2 vUv0;varying vec2 vUv1;varying vec2 vUv2;varying vec2 vUv3;void main(){vec2 uv=position.xy*0.5+0.5;vUv0=vec2(uv.x+texelSize.x,uv.y);vUv1=vec2(uv.x-texelSize.x,uv.y);vUv2=vec2(uv.x,uv.y+texelSize.y);vUv3=vec2(uv.x,uv.y-texelSize.y);gl_Position=vec4(position.xy,1.0,1.0);}', + OutlineMaterial = class extends ShaderMaterial { + constructor(tt = new Vector2()) { + super({ + name: 'OutlineMaterial', + uniforms: { inputBuffer: new Uniform(null), texelSize: new Uniform(new Vector2()) }, + blending: NoBlending, + toneMapped: !1, + depthWrite: !1, + depthTest: !1, + fragmentShader: outline_default, + vertexShader: outline_default2, + }), + this.uniforms.texelSize.value.set(tt.x, tt.y), + (this.uniforms.maskTexture = this.uniforms.inputBuffer) + } + set inputBuffer(tt) { + this.uniforms.inputBuffer.value = tt + } + setInputBuffer(tt) { + this.uniforms.inputBuffer.value = tt + } + setTexelSize(tt, et) { + this.uniforms.texelSize.value.set(tt, et) + } + setSize(tt, et) { + this.uniforms.texelSize.value.set(1 / tt, 1 / et) + } + }, + ssao_default = `#include +#include +#ifdef NORMAL_DEPTH +#ifdef GL_FRAGMENT_PRECISION_HIGH +uniform highp sampler2D normalDepthBuffer; +#else +uniform mediump sampler2D normalDepthBuffer; +#endif +float readDepth(const in vec2 uv){return texture2D(normalDepthBuffer,uv).a;} +#else +uniform lowp sampler2D normalBuffer; +#if DEPTH_PACKING == 3201 +uniform lowp sampler2D depthBuffer; +#elif defined(GL_FRAGMENT_PRECISION_HIGH) +uniform highp sampler2D depthBuffer; +#else +uniform mediump sampler2D depthBuffer; +#endif +float readDepth(const in vec2 uv){ +#if DEPTH_PACKING == 3201 +return unpackRGBAToDepth(texture2D(depthBuffer,uv)); +#else +return texture2D(depthBuffer,uv).r; +#endif } +#endif +uniform lowp sampler2D noiseTexture;uniform mat4 inverseProjectionMatrix;uniform mat4 projectionMatrix;uniform vec2 texelSize;uniform vec2 cameraNearFar;uniform float intensity;uniform float minRadiusScale;uniform float fade;uniform float bias;uniform vec2 distanceCutoff;uniform vec2 proximityCutoff;varying vec2 vUv;varying vec2 vUv2;float getViewZ(const in float depth){ +#ifdef PERSPECTIVE_CAMERA +return perspectiveDepthToViewZ(depth,cameraNearFar.x,cameraNearFar.y); +#else +return orthographicDepthToViewZ(depth,cameraNearFar.x,cameraNearFar.y); +#endif +}vec3 getViewPosition(const in vec2 screenPosition,const in float depth,const in float viewZ){vec4 clipPosition=vec4(vec3(screenPosition,depth)*2.0-1.0,1.0);float clipW=projectionMatrix[2][3]*viewZ+projectionMatrix[3][3];clipPosition*=clipW;return(inverseProjectionMatrix*clipPosition).xyz;}float getAmbientOcclusion(const in vec3 p,const in vec3 n,const in float depth,const in vec2 uv){float radiusScale=1.0-smoothstep(0.0,distanceCutoff.y,depth);radiusScale=radiusScale*(1.0-minRadiusScale)+minRadiusScale;float radius=RADIUS*radiusScale;float noise=texture2D(noiseTexture,vUv2).r;float baseAngle=noise*PI2;float rings=SPIRAL_TURNS*PI2;float occlusion=0.0;int taps=0;for(int i=0;i1.0||coords.t<0.0||coords.t>1.0){continue;}float sampleDepth=readDepth(coords);float viewZ=getViewZ(sampleDepth); +#ifdef PERSPECTIVE_CAMERA +float linearSampleDepth=viewZToOrthographicDepth(viewZ,cameraNearFar.x,cameraNearFar.y); +#else +float linearSampleDepth=sampleDepth; +#endif +float proximity=abs(depth-linearSampleDepth);if(proximity +}`, + convolution_upsampling_default2 = + 'uniform vec2 texelSize;varying vec2 vUv;varying vec2 vUv0;varying vec2 vUv1;varying vec2 vUv2;varying vec2 vUv3;varying vec2 vUv4;varying vec2 vUv5;varying vec2 vUv6;varying vec2 vUv7;void main(){vUv=position.xy*0.5+0.5;vUv0=vUv+texelSize*vec2(-1.0,1.0);vUv1=vUv+texelSize*vec2(0.0,1.0);vUv2=vUv+texelSize*vec2(1.0,1.0);vUv3=vUv+texelSize*vec2(-1.0,0.0);vUv4=vUv+texelSize*vec2(1.0,0.0);vUv5=vUv+texelSize*vec2(-1.0,-1.0);vUv6=vUv+texelSize*vec2(0.0,-1.0);vUv7=vUv+texelSize*vec2(1.0,-1.0);gl_Position=vec4(position.xy,1.0,1.0);}', + UpsamplingMaterial = class extends ShaderMaterial { + constructor() { + super({ + name: 'UpsamplingMaterial', + uniforms: { + inputBuffer: new Uniform(null), + supportBuffer: new Uniform(null), + texelSize: new Uniform(new Vector2()), + radius: new Uniform(0.85), + }, + blending: NoBlending, + toneMapped: !1, + depthWrite: !1, + depthTest: !1, + fragmentShader: convolution_upsampling_default, + vertexShader: convolution_upsampling_default2, + }), + (this.fragmentShader = updateFragmentShader(this.fragmentShader)) + } + set inputBuffer(tt) { + this.uniforms.inputBuffer.value = tt + } + set supportBuffer(tt) { + this.uniforms.supportBuffer.value = tt + } + get radius() { + return this.uniforms.radius.value + } + set radius(tt) { + this.uniforms.radius.value = tt + } + setSize(tt, et) { + this.uniforms.texelSize.value.set(1 / tt, 1 / et) + } + }, + dummyCamera = new Camera(), + geometry = null + function getFullscreenTriangle() { + if (geometry === null) { + const tt = new Float32Array([-1, -1, 0, 3, -1, 0, -1, 3, 0]), + et = new Float32Array([0, 0, 2, 0, 0, 2]) + ;(geometry = new BufferGeometry()), + geometry.setAttribute !== void 0 + ? (geometry.setAttribute('position', new BufferAttribute(tt, 3)), + geometry.setAttribute('uv', new BufferAttribute(et, 2))) + : (geometry.addAttribute('position', new BufferAttribute(tt, 3)), + geometry.addAttribute('uv', new BufferAttribute(et, 2))) + } + return geometry + } + var Pass = class yw { + constructor(et = 'Pass', nt = new Scene(), rt = dummyCamera) { + ;(this.name = et), + (this.renderer = null), + (this.scene = nt), + (this.camera = rt), + (this.screen = null), + (this.rtt = !0), + (this.needsSwap = !0), + (this.needsDepthTexture = !1), + (this.enabled = !0) + } + get renderToScreen() { + return !this.rtt + } + set renderToScreen(et) { + if (this.rtt === et) { + const nt = this.fullscreenMaterial + nt !== null && (nt.needsUpdate = !0), (this.rtt = !et) + } + } + set mainScene(et) {} + set mainCamera(et) {} + setRenderer(et) { + this.renderer = et + } + isEnabled() { + return this.enabled + } + setEnabled(et) { + this.enabled = et + } + get fullscreenMaterial() { + return this.screen !== null ? this.screen.material : null + } + set fullscreenMaterial(et) { + let nt = this.screen + nt !== null + ? (nt.material = et) + : ((nt = new Mesh(getFullscreenTriangle(), et)), + (nt.frustumCulled = !1), + this.scene === null && (this.scene = new Scene()), + this.scene.add(nt), + (this.screen = nt)) + } + getFullscreenMaterial() { + return this.fullscreenMaterial + } + setFullscreenMaterial(et) { + this.fullscreenMaterial = et + } + getDepthTexture() { + return null + } + setDepthTexture(et, nt = BasicDepthPacking) {} + render(et, nt, rt, it, ot) { + throw new Error('Render method not implemented!') + } + setSize(et, nt) {} + initialize(et, nt, rt) {} + dispose() { + for (const et of Object.keys(this)) { + const nt = this[et] + ;(nt instanceof WebGLRenderTarget || nt instanceof Material || nt instanceof Texture || nt instanceof yw) && + this[et].dispose() + } + } + }, + CopyPass = class extends Pass { + constructor(tt, et = !0) { + super('CopyPass'), + (this.fullscreenMaterial = new CopyMaterial()), + (this.needsSwap = !1), + (this.renderTarget = tt), + tt === void 0 && + ((this.renderTarget = new WebGLRenderTarget(1, 1, { + minFilter: LinearFilter, + magFilter: LinearFilter, + stencilBuffer: !1, + depthBuffer: !1, + })), + (this.renderTarget.texture.name = 'CopyPass.Target')), + (this.autoResize = et) + } + get resize() { + return this.autoResize + } + set resize(tt) { + this.autoResize = tt + } + get texture() { + return this.renderTarget.texture + } + getTexture() { + return this.renderTarget.texture + } + setAutoResizeEnabled(tt) { + this.autoResize = tt + } + render(tt, et, nt, rt, it) { + ;(this.fullscreenMaterial.inputBuffer = et.texture), + tt.setRenderTarget(this.renderToScreen ? null : this.renderTarget), + tt.render(this.scene, this.camera) + } + setSize(tt, et) { + this.autoResize && this.renderTarget.setSize(tt, et) + } + initialize(tt, et, nt) { + nt !== void 0 && + ((this.renderTarget.texture.type = nt), + nt !== UnsignedByteType + ? (this.fullscreenMaterial.defines.FRAMEBUFFER_PRECISION_HIGH = '1') + : getOutputColorSpace(tt) === SRGBColorSpace && + setTextureColorSpace(this.renderTarget.texture, SRGBColorSpace)) + } + }, + ClearMaskPass = class extends Pass { + constructor() { + super('ClearMaskPass', null, null), (this.needsSwap = !1) + } + render(tt, et, nt, rt, it) { + const ot = tt.state.buffers.stencil + ot.setLocked(!1), ot.setTest(!1) + } + }, + color$1 = new Color$1(), + ClearPass = class extends Pass { + constructor(tt = !0, et = !0, nt = !1) { + super('ClearPass', null, null), + (this.needsSwap = !1), + (this.color = tt), + (this.depth = et), + (this.stencil = nt), + (this.overrideClearColor = null), + (this.overrideClearAlpha = -1) + } + setClearFlags(tt, et, nt) { + ;(this.color = tt), (this.depth = et), (this.stencil = nt) + } + getOverrideClearColor() { + return this.overrideClearColor + } + setOverrideClearColor(tt) { + this.overrideClearColor = tt + } + getOverrideClearAlpha() { + return this.overrideClearAlpha + } + setOverrideClearAlpha(tt) { + this.overrideClearAlpha = tt + } + render(tt, et, nt, rt, it) { + const ot = this.overrideClearColor, + at = this.overrideClearAlpha, + st = tt.getClearAlpha(), + lt = ot !== null, + ct = at >= 0 + lt ? (tt.getClearColor(color$1), tt.setClearColor(ot, ct ? at : st)) : ct && tt.setClearAlpha(at), + tt.setRenderTarget(this.renderToScreen ? null : et), + tt.clear(this.color, this.depth, this.stencil), + lt ? tt.setClearColor(color$1, st) : ct && tt.setClearAlpha(st) + } + }, + RenderPass = class extends Pass { + constructor(tt, et, nt = null) { + super('RenderPass', tt, et), + (this.needsSwap = !1), + (this.clearPass = new ClearPass()), + (this.overrideMaterialManager = nt === null ? null : new OverrideMaterialManager(nt)), + (this.ignoreBackground = !1), + (this.skipShadowMapUpdate = !1), + (this.selection = null) + } + set mainScene(tt) { + this.scene = tt + } + set mainCamera(tt) { + this.camera = tt + } + get renderToScreen() { + return super.renderToScreen + } + set renderToScreen(tt) { + ;(super.renderToScreen = tt), (this.clearPass.renderToScreen = tt) + } + get overrideMaterial() { + const tt = this.overrideMaterialManager + return tt !== null ? tt.material : null + } + set overrideMaterial(tt) { + const et = this.overrideMaterialManager + tt !== null + ? et !== null + ? et.setMaterial(tt) + : (this.overrideMaterialManager = new OverrideMaterialManager(tt)) + : et !== null && (et.dispose(), (this.overrideMaterialManager = null)) + } + getOverrideMaterial() { + return this.overrideMaterial + } + setOverrideMaterial(tt) { + this.overrideMaterial = tt + } + get clear() { + return this.clearPass.enabled + } + set clear(tt) { + this.clearPass.enabled = tt + } + getSelection() { + return this.selection + } + setSelection(tt) { + this.selection = tt + } + isBackgroundDisabled() { + return this.ignoreBackground + } + setBackgroundDisabled(tt) { + this.ignoreBackground = tt + } + isShadowMapDisabled() { + return this.skipShadowMapUpdate + } + setShadowMapDisabled(tt) { + this.skipShadowMapUpdate = tt + } + getClearPass() { + return this.clearPass + } + render(tt, et, nt, rt, it) { + const ot = this.scene, + at = this.camera, + st = this.selection, + lt = at.layers.mask, + ct = ot.background, + ut = tt.shadowMap.autoUpdate, + ht = this.renderToScreen ? null : et + st !== null && at.layers.set(st.getLayer()), + this.skipShadowMapUpdate && (tt.shadowMap.autoUpdate = !1), + (this.ignoreBackground || this.clearPass.overrideClearColor !== null) && (ot.background = null), + this.clearPass.enabled && this.clearPass.render(tt, et), + tt.setRenderTarget(ht), + this.overrideMaterialManager !== null ? this.overrideMaterialManager.render(tt, ot, at) : tt.render(ot, at), + (at.layers.mask = lt), + (ot.background = ct), + (tt.shadowMap.autoUpdate = ut) + } + }, + DepthPass = class extends Pass { + constructor( + tt, + et, + { + renderTarget: nt, + resolutionScale: rt = 1, + width: it = Resolution.AUTO_SIZE, + height: ot = Resolution.AUTO_SIZE, + resolutionX: at = it, + resolutionY: st = ot, + } = {}, + ) { + super('DepthPass'), + (this.needsSwap = !1), + (this.renderPass = new RenderPass(tt, et, new MeshDepthMaterial({ depthPacking: RGBADepthPacking }))) + const lt = this.renderPass + ;(lt.skipShadowMapUpdate = !0), (lt.ignoreBackground = !0) + const ct = lt.clearPass + ;(ct.overrideClearColor = new Color$1(16777215)), + (ct.overrideClearAlpha = 1), + (this.renderTarget = nt), + this.renderTarget === void 0 && + ((this.renderTarget = new WebGLRenderTarget(1, 1, { minFilter: NearestFilter, magFilter: NearestFilter })), + (this.renderTarget.texture.name = 'DepthPass.Target')) + const ut = (this.resolution = new Resolution(this, at, st, rt)) + ut.addEventListener('change', (ht) => this.setSize(ut.baseWidth, ut.baseHeight)) + } + set mainScene(tt) { + this.renderPass.mainScene = tt + } + set mainCamera(tt) { + this.renderPass.mainCamera = tt + } + get texture() { + return this.renderTarget.texture + } + getTexture() { + return this.renderTarget.texture + } + getResolution() { + return this.resolution + } + getResolutionScale() { + return this.resolution.scale + } + setResolutionScale(tt) { + this.resolution.scale = tt + } + render(tt, et, nt, rt, it) { + const ot = this.renderToScreen ? null : this.renderTarget + this.renderPass.render(tt, ot) + } + setSize(tt, et) { + const nt = this.resolution + nt.setBaseSize(tt, et), this.renderTarget.setSize(nt.width, nt.height) + } + }, + DepthDownsamplingPass = class extends Pass { + constructor({ + normalBuffer: tt = null, + resolutionScale: et = 0.5, + width: nt = Resolution.AUTO_SIZE, + height: rt = Resolution.AUTO_SIZE, + resolutionX: it = nt, + resolutionY: ot = rt, + } = {}) { + super('DepthDownsamplingPass') + const at = new DepthDownsamplingMaterial() + ;(at.normalBuffer = tt), + (this.fullscreenMaterial = at), + (this.needsDepthTexture = !0), + (this.needsSwap = !1), + (this.renderTarget = new WebGLRenderTarget(1, 1, { + minFilter: NearestFilter, + magFilter: NearestFilter, + depthBuffer: !1, + type: FloatType, + })), + (this.renderTarget.texture.name = 'DepthDownsamplingPass.Target'), + (this.renderTarget.texture.generateMipmaps = !1) + const st = (this.resolution = new Resolution(this, it, ot, et)) + st.addEventListener('change', (lt) => this.setSize(st.baseWidth, st.baseHeight)) + } + get texture() { + return this.renderTarget.texture + } + getTexture() { + return this.renderTarget.texture + } + getResolution() { + return this.resolution + } + setDepthTexture(tt, et = BasicDepthPacking) { + ;(this.fullscreenMaterial.depthBuffer = tt), (this.fullscreenMaterial.depthPacking = et) + } + render(tt, et, nt, rt, it) { + tt.setRenderTarget(this.renderToScreen ? null : this.renderTarget), tt.render(this.scene, this.camera) + } + setSize(tt, et) { + const nt = this.resolution + nt.setBaseSize(tt, et), this.renderTarget.setSize(nt.width, nt.height), this.fullscreenMaterial.setSize(tt, et) + } + initialize(tt, et, nt) { + const rt = tt.getContext() + if (!(rt.getExtension('EXT_color_buffer_float') || rt.getExtension('EXT_color_buffer_half_float'))) + throw new Error('Rendering to float texture is not supported.') + } + }, + DepthCopyPass = class extends Pass { + constructor({ depthPacking: tt = RGBADepthPacking } = {}) { + super('DepthCopyPass') + const et = new DepthCopyMaterial() + ;(et.outputDepthPacking = tt), + (this.fullscreenMaterial = et), + (this.needsDepthTexture = !0), + (this.needsSwap = !1), + (this.renderTarget = new WebGLRenderTarget(1, 1, { + type: tt === RGBADepthPacking ? UnsignedByteType : FloatType, + minFilter: NearestFilter, + magFilter: NearestFilter, + depthBuffer: !1, + })), + (this.renderTarget.texture.name = 'DepthCopyPass.Target') + } + get texture() { + return this.renderTarget.texture + } + getTexture() { + return this.renderTarget.texture + } + get depthPacking() { + return this.fullscreenMaterial.outputDepthPacking + } + getDepthPacking() { + return this.fullscreenMaterial.outputDepthPacking + } + setDepthTexture(tt, et = BasicDepthPacking) { + ;(this.fullscreenMaterial.depthBuffer = tt), (this.fullscreenMaterial.inputDepthPacking = et) + } + render(tt, et, nt, rt, it) { + tt.setRenderTarget(this.renderToScreen ? null : this.renderTarget), tt.render(this.scene, this.camera) + } + setSize(tt, et) { + this.renderTarget.setSize(tt, et) + } + }, + unpackFactors = new Float32Array([255 / 256 / 256 ** 3, 255 / 256 / 256 ** 2, 255 / 256 / 256, 255 / 256]) + function unpackRGBAToDepth(tt) { + return ( + (tt[0] * unpackFactors[0] + tt[1] * unpackFactors[1] + tt[2] * unpackFactors[2] + tt[3] * unpackFactors[3]) / 255 + ) + } + var DepthPickingPass = class extends DepthCopyPass { + constructor({ depthPacking: tt = RGBADepthPacking, mode: et = DepthCopyMode.SINGLE } = {}) { + super({ depthPacking: tt }), + (this.name = 'DepthPickingPass'), + (this.fullscreenMaterial.mode = et), + (this.pixelBuffer = tt === RGBADepthPacking ? new Uint8Array(4) : new Float32Array(4)), + (this.callback = null) + } + readDepth(tt) { + return ( + this.fullscreenMaterial.texelPosition.set(tt.x * 0.5 + 0.5, tt.y * 0.5 + 0.5), + new Promise((et) => { + this.callback = et + }) + ) + } + render(tt, et, nt, rt, it) { + const ot = this.fullscreenMaterial, + at = ot.mode + if ((at === DepthCopyMode.FULL && super.render(tt), this.callback !== null)) { + const st = this.renderTarget, + lt = this.pixelBuffer, + ct = st.texture.type !== FloatType + let ut = 0, + ht = 0 + if (at === DepthCopyMode.SINGLE) super.render(tt) + else { + const dt = ot.texelPosition + ;(ut = Math.round(dt.x * st.width)), (ht = Math.round(dt.y * st.height)) + } + tt.readRenderTargetPixels(st, ut, ht, 1, 1, lt), + this.callback(ct ? unpackRGBAToDepth(lt) : lt[0]), + (this.callback = null) + } + } + setSize(tt, et) { + this.fullscreenMaterial.mode === DepthCopyMode.FULL && super.setSize(tt, et) + } + } + function prefixSubstrings(tt, et, nt) { + for (const rt of et) { + const it = '$1' + tt + rt.charAt(0).toUpperCase() + rt.slice(1), + ot = new RegExp('([^\\.])(\\b' + rt + '\\b)', 'g') + for (const at of nt.entries()) at[1] !== null && nt.set(at[0], at[1].replace(ot, it)) + } + } + function integrateEffect(tt, et, nt) { + let rt = et.getFragmentShader(), + it = et.getVertexShader() + const ot = rt !== void 0 && /mainImage/.test(rt), + at = rt !== void 0 && /mainUv/.test(rt) + if (((nt.attributes |= et.getAttributes()), rt === void 0)) throw new Error(`Missing fragment shader (${et.name})`) + if (at && nt.attributes & EffectAttribute.CONVOLUTION) + throw new Error(`Effects that transform UVs are incompatible with convolution effects (${et.name})`) + if (!ot && !at) throw new Error(`Could not find mainImage or mainUv function (${et.name})`) + { + const st = /\w+\s+(\w+)\([\w\s,]*\)\s*{/g, + lt = nt.shaderParts + let ct = lt.get(EffectShaderSection.FRAGMENT_HEAD) || '', + ut = lt.get(EffectShaderSection.FRAGMENT_MAIN_UV) || '', + ht = lt.get(EffectShaderSection.FRAGMENT_MAIN_IMAGE) || '', + dt = lt.get(EffectShaderSection.VERTEX_HEAD) || '', + pt = lt.get(EffectShaderSection.VERTEX_MAIN_SUPPORT) || '' + const mt = new Set(), + gt = new Set() + if ( + (at && + ((ut += ` ${tt}MainUv(UV); +`), + (nt.uvTransformation = !0)), + it !== null && /mainSupport/.test(it)) + ) { + const vt = /mainSupport *\([\w\s]*?uv\s*?\)/.test(it) + ;(pt += ` ${tt}MainSupport(`), + (pt += vt + ? `vUv); +` + : `); +`) + for (const xt of it.matchAll(/(?:varying\s+\w+\s+([\S\s]*?);)/g)) + for (const kt of xt[1].split(/\s*,\s*/)) nt.varyings.add(kt), mt.add(kt), gt.add(kt) + for (const xt of it.matchAll(st)) gt.add(xt[1]) + } + for (const vt of rt.matchAll(st)) gt.add(vt[1]) + for (const vt of et.defines.keys()) gt.add(vt.replace(/\([\w\s,]*\)/g, '')) + for (const vt of et.uniforms.keys()) gt.add(vt) + gt.delete('while'), + gt.delete('for'), + gt.delete('if'), + et.uniforms.forEach((vt, xt) => nt.uniforms.set(tt + xt.charAt(0).toUpperCase() + xt.slice(1), vt)), + et.defines.forEach((vt, xt) => nt.defines.set(tt + xt.charAt(0).toUpperCase() + xt.slice(1), vt)) + const yt = new Map([ + ['fragment', rt], + ['vertex', it], + ]) + prefixSubstrings(tt, gt, nt.defines), + prefixSubstrings(tt, gt, yt), + (rt = yt.get('fragment')), + (it = yt.get('vertex')) + const bt = et.blendMode + if ((nt.blendModes.set(bt.blendFunction, bt), ot)) { + et.inputColorSpace !== null && + et.inputColorSpace !== nt.colorSpace && + (ht += + et.inputColorSpace === SRGBColorSpace + ? `color0 = LinearTosRGB(color0); + ` + : `color0 = sRGBToLinear(color0); + `), + et.outputColorSpace !== NoColorSpace + ? (nt.colorSpace = et.outputColorSpace) + : et.inputColorSpace !== null && (nt.colorSpace = et.inputColorSpace) + const vt = /MainImage *\([\w\s,]*?depth[\w\s,]*?\)/ + ;(ht += `${tt}MainImage(color0, UV, `), + nt.attributes & EffectAttribute.DEPTH && vt.test(rt) && ((ht += 'depth, '), (nt.readDepth = !0)), + (ht += `color1); + `) + const xt = tt + 'BlendOpacity' + nt.uniforms.set(xt, bt.opacity), + (ht += `color0 = blend${bt.blendFunction}(color0, color1, ${xt}); -float troikaGetEdgeAlpha(float distance, float distanceOffset, float aaDist) { - #if defined(IS_DEPTH_MATERIAL) || defined(IS_DISTANCE_MATERIAL) - float alpha = step(-distanceOffset, -distance); - #else - - float alpha = smoothstep( - distanceOffset + aaDist, - distanceOffset - aaDist, - distance - ); - #endif + `), + (ct += `uniform float ${xt}; - return alpha; -} -`,FRAGMENT_TRANSFORM=` -float aaDist = troikaGetAADist(); -float fragDistance = troikaGetFragDistValue(); -float edgeAlpha = uTroikaSDFDebug ? - troikaGlyphUvToSdfValue(vTroikaGlyphUV) : - troikaGetEdgeAlpha(fragDistance, uTroikaDistanceOffset, max(aaDist, uTroikaBlurRadius)); +`) + } + if ( + ((ct += + rt + + ` +`), + it !== null && + (dt += + it + + ` +`), + lt.set(EffectShaderSection.FRAGMENT_HEAD, ct), + lt.set(EffectShaderSection.FRAGMENT_MAIN_UV, ut), + lt.set(EffectShaderSection.FRAGMENT_MAIN_IMAGE, ht), + lt.set(EffectShaderSection.VERTEX_HEAD, dt), + lt.set(EffectShaderSection.VERTEX_MAIN_SUPPORT, pt), + et.extensions !== null) + ) + for (const vt of et.extensions) nt.extensions.add(vt) + } + } + var EffectPass = class extends Pass { + constructor(tt, ...et) { + super('EffectPass'), + (this.fullscreenMaterial = new EffectMaterial(null, null, null, tt)), + (this.listener = (nt) => this.handleEvent(nt)), + (this.effects = []), + this.setEffects(et), + (this.skipRendering = !1), + (this.minTime = 1), + (this.maxTime = Number.POSITIVE_INFINITY), + (this.timeScale = 1) + } + set mainScene(tt) { + for (const et of this.effects) et.mainScene = tt + } + set mainCamera(tt) { + this.fullscreenMaterial.copyCameraSettings(tt) + for (const et of this.effects) et.mainCamera = tt + } + get encodeOutput() { + return this.fullscreenMaterial.encodeOutput + } + set encodeOutput(tt) { + this.fullscreenMaterial.encodeOutput = tt + } + get dithering() { + return this.fullscreenMaterial.dithering + } + set dithering(tt) { + const et = this.fullscreenMaterial + ;(et.dithering = tt), (et.needsUpdate = !0) + } + setEffects(tt) { + for (const et of this.effects) et.removeEventListener('change', this.listener) + this.effects = tt.sort((et, nt) => nt.attributes - et.attributes) + for (const et of this.effects) et.addEventListener('change', this.listener) + } + updateMaterial() { + const tt = new EffectShaderData() + let et = 0 + for (const at of this.effects) + if (at.blendMode.blendFunction === BlendFunction.DST) + tt.attributes |= at.getAttributes() & EffectAttribute.DEPTH + else { + if (tt.attributes & at.getAttributes() & EffectAttribute.CONVOLUTION) + throw new Error(`Convolution effects cannot be merged (${at.name})`) + integrateEffect('e' + et++, at, tt) + } + let nt = tt.shaderParts.get(EffectShaderSection.FRAGMENT_HEAD), + rt = tt.shaderParts.get(EffectShaderSection.FRAGMENT_MAIN_IMAGE), + it = tt.shaderParts.get(EffectShaderSection.FRAGMENT_MAIN_UV) + const ot = /\bblend\b/g + for (const at of tt.blendModes.values()) + nt += + at.getShaderCode().replace(ot, `blend${at.blendFunction}`) + + ` +` + tt.attributes & EffectAttribute.DEPTH + ? (tt.readDepth && + (rt = + `float depth = readDepth(UV); -#if !defined(IS_DEPTH_MATERIAL) && !defined(IS_DISTANCE_MATERIAL) -vec4 fillRGBA = gl_FragColor; -fillRGBA.a *= uTroikaFillOpacity; -vec4 strokeRGBA = uTroikaStrokeWidth == 0.0 ? fillRGBA : vec4(uTroikaStrokeColor, uTroikaStrokeOpacity); -if (fillRGBA.a == 0.0) fillRGBA.rgb = strokeRGBA.rgb; -gl_FragColor = mix(fillRGBA, strokeRGBA, smoothstep( - -uTroikaStrokeWidth - aaDist, - -uTroikaStrokeWidth + aaDist, - fragDistance -)); -gl_FragColor.a *= edgeAlpha; + ` + rt), + (this.needsDepthTexture = this.getDepthTexture() === null)) + : (this.needsDepthTexture = !1), + tt.colorSpace === SRGBColorSpace && + (rt += `color0 = sRGBToLinear(color0); + `), + tt.uvTransformation + ? ((it = + `vec2 transformedUv = vUv; +` + it), + tt.defines.set('UV', 'transformedUv')) + : tt.defines.set('UV', 'vUv'), + tt.shaderParts.set(EffectShaderSection.FRAGMENT_HEAD, nt), + tt.shaderParts.set(EffectShaderSection.FRAGMENT_MAIN_IMAGE, rt), + tt.shaderParts.set(EffectShaderSection.FRAGMENT_MAIN_UV, it) + for (const [at, st] of tt.shaderParts) + st !== null && + tt.shaderParts.set( + at, + st.trim().replace( + /^#/, + ` +#`, + ), + ) + ;(this.skipRendering = et === 0), + (this.needsSwap = !this.skipRendering), + this.fullscreenMaterial.setShaderData(tt) + } + recompile() { + this.updateMaterial() + } + getDepthTexture() { + return this.fullscreenMaterial.depthBuffer + } + setDepthTexture(tt, et = BasicDepthPacking) { + ;(this.fullscreenMaterial.depthBuffer = tt), (this.fullscreenMaterial.depthPacking = et) + for (const nt of this.effects) nt.setDepthTexture(tt, et) + } + render(tt, et, nt, rt, it) { + for (const ot of this.effects) ot.update(tt, et, rt) + if (!this.skipRendering || this.renderToScreen) { + const ot = this.fullscreenMaterial + ;(ot.inputBuffer = et.texture), + (ot.time += rt * this.timeScale), + tt.setRenderTarget(this.renderToScreen ? null : nt), + tt.render(this.scene, this.camera) + } + } + setSize(tt, et) { + this.fullscreenMaterial.setSize(tt, et) + for (const nt of this.effects) nt.setSize(tt, et) + } + initialize(tt, et, nt) { + this.renderer = tt + for (const rt of this.effects) rt.initialize(tt, et, nt) + this.updateMaterial(), + nt !== void 0 && nt !== UnsignedByteType && (this.fullscreenMaterial.defines.FRAMEBUFFER_PRECISION_HIGH = '1') + } + dispose() { + super.dispose() + for (const tt of this.effects) tt.removeEventListener('change', this.listener), tt.dispose() + } + handleEvent(tt) { + switch (tt.type) { + case 'change': + this.recompile() + break + } + } + }, + KawaseBlurPass = class extends Pass { + constructor({ + kernelSize: tt = KernelSize.MEDIUM, + resolutionScale: et = 0.5, + width: nt = Resolution.AUTO_SIZE, + height: rt = Resolution.AUTO_SIZE, + resolutionX: it = nt, + resolutionY: ot = rt, + } = {}) { + super('KawaseBlurPass'), + (this.renderTargetA = new WebGLRenderTarget(1, 1, { depthBuffer: !1 })), + (this.renderTargetA.texture.name = 'Blur.Target.A'), + (this.renderTargetB = this.renderTargetA.clone()), + (this.renderTargetB.texture.name = 'Blur.Target.B') + const at = (this.resolution = new Resolution(this, it, ot, et)) + at.addEventListener('change', (st) => this.setSize(at.baseWidth, at.baseHeight)), + (this._blurMaterial = new KawaseBlurMaterial()), + (this._blurMaterial.kernelSize = tt), + (this.copyMaterial = new CopyMaterial()) + } + getResolution() { + return this.resolution + } + get blurMaterial() { + return this._blurMaterial + } + set blurMaterial(tt) { + this._blurMaterial = tt + } + get dithering() { + return this.copyMaterial.dithering + } + set dithering(tt) { + this.copyMaterial.dithering = tt + } + get kernelSize() { + return this.blurMaterial.kernelSize + } + set kernelSize(tt) { + this.blurMaterial.kernelSize = tt + } + get width() { + return this.resolution.width + } + set width(tt) { + this.resolution.preferredWidth = tt + } + get height() { + return this.resolution.height + } + set height(tt) { + this.resolution.preferredHeight = tt + } + get scale() { + return this.blurMaterial.scale + } + set scale(tt) { + this.blurMaterial.scale = tt + } + getScale() { + return this.blurMaterial.scale + } + setScale(tt) { + this.blurMaterial.scale = tt + } + getKernelSize() { + return this.kernelSize + } + setKernelSize(tt) { + this.kernelSize = tt + } + getResolutionScale() { + return this.resolution.scale + } + setResolutionScale(tt) { + this.resolution.scale = tt + } + render(tt, et, nt, rt, it) { + const ot = this.scene, + at = this.camera, + st = this.renderTargetA, + lt = this.renderTargetB, + ct = this.blurMaterial, + ut = ct.kernelSequence + let ht = et + this.fullscreenMaterial = ct + for (let dt = 0, pt = ut.length; dt < pt; ++dt) { + const mt = dt & 1 ? lt : st + ;(ct.kernel = ut[dt]), (ct.inputBuffer = ht.texture), tt.setRenderTarget(mt), tt.render(ot, at), (ht = mt) + } + ;(this.fullscreenMaterial = this.copyMaterial), + (this.copyMaterial.inputBuffer = ht.texture), + tt.setRenderTarget(this.renderToScreen ? null : nt), + tt.render(ot, at) + } + setSize(tt, et) { + const nt = this.resolution + nt.setBaseSize(tt, et) + const rt = nt.width, + it = nt.height + this.renderTargetA.setSize(rt, it), this.renderTargetB.setSize(rt, it), this.blurMaterial.setSize(tt, et) + } + initialize(tt, et, nt) { + nt !== void 0 && + ((this.renderTargetA.texture.type = nt), + (this.renderTargetB.texture.type = nt), + nt !== UnsignedByteType + ? ((this.blurMaterial.defines.FRAMEBUFFER_PRECISION_HIGH = '1'), + (this.copyMaterial.defines.FRAMEBUFFER_PRECISION_HIGH = '1')) + : getOutputColorSpace(tt) === SRGBColorSpace && + (setTextureColorSpace(this.renderTargetA.texture, SRGBColorSpace), + setTextureColorSpace(this.renderTargetB.texture, SRGBColorSpace))) + } + static get AUTO_SIZE() { + return Resolution.AUTO_SIZE + } + }, + LuminancePass = class extends Pass { + constructor({ + renderTarget: tt, + luminanceRange: et, + colorOutput: nt, + resolutionScale: rt = 1, + width: it = Resolution.AUTO_SIZE, + height: ot = Resolution.AUTO_SIZE, + resolutionX: at = it, + resolutionY: st = ot, + } = {}) { + super('LuminancePass'), + (this.fullscreenMaterial = new LuminanceMaterial(nt, et)), + (this.needsSwap = !1), + (this.renderTarget = tt), + this.renderTarget === void 0 && + ((this.renderTarget = new WebGLRenderTarget(1, 1, { depthBuffer: !1 })), + (this.renderTarget.texture.name = 'LuminancePass.Target')) + const lt = (this.resolution = new Resolution(this, at, st, rt)) + lt.addEventListener('change', (ct) => this.setSize(lt.baseWidth, lt.baseHeight)) + } + get texture() { + return this.renderTarget.texture + } + getTexture() { + return this.renderTarget.texture + } + getResolution() { + return this.resolution + } + render(tt, et, nt, rt, it) { + const ot = this.fullscreenMaterial + ;(ot.inputBuffer = et.texture), + tt.setRenderTarget(this.renderToScreen ? null : this.renderTarget), + tt.render(this.scene, this.camera) + } + setSize(tt, et) { + const nt = this.resolution + nt.setBaseSize(tt, et), this.renderTarget.setSize(nt.width, nt.height) + } + initialize(tt, et, nt) { + nt !== void 0 && + nt !== UnsignedByteType && + ((this.renderTarget.texture.type = nt), (this.fullscreenMaterial.defines.FRAMEBUFFER_PRECISION_HIGH = '1')) + } + }, + MaskPass = class extends Pass { + constructor(tt, et) { + super('MaskPass', tt, et), + (this.needsSwap = !1), + (this.clearPass = new ClearPass(!1, !1, !0)), + (this.inverse = !1) + } + set mainScene(tt) { + this.scene = tt + } + set mainCamera(tt) { + this.camera = tt + } + get inverted() { + return this.inverse + } + set inverted(tt) { + this.inverse = tt + } + get clear() { + return this.clearPass.enabled + } + set clear(tt) { + this.clearPass.enabled = tt + } + getClearPass() { + return this.clearPass + } + isInverted() { + return this.inverted + } + setInverted(tt) { + this.inverted = tt + } + render(tt, et, nt, rt, it) { + const ot = tt.getContext(), + at = tt.state.buffers, + st = this.scene, + lt = this.camera, + ct = this.clearPass, + ut = this.inverted ? 0 : 1, + ht = 1 - ut + at.color.setMask(!1), + at.depth.setMask(!1), + at.color.setLocked(!0), + at.depth.setLocked(!0), + at.stencil.setTest(!0), + at.stencil.setOp(ot.REPLACE, ot.REPLACE, ot.REPLACE), + at.stencil.setFunc(ot.ALWAYS, ut, 4294967295), + at.stencil.setClear(ht), + at.stencil.setLocked(!0), + this.clearPass.enabled && + (this.renderToScreen ? ct.render(tt, null) : (ct.render(tt, et), ct.render(tt, nt))), + this.renderToScreen + ? (tt.setRenderTarget(null), tt.render(st, lt)) + : (tt.setRenderTarget(et), tt.render(st, lt), tt.setRenderTarget(nt), tt.render(st, lt)), + at.color.setLocked(!1), + at.depth.setLocked(!1), + at.stencil.setLocked(!1), + at.stencil.setFunc(ot.EQUAL, 1, 4294967295), + at.stencil.setOp(ot.KEEP, ot.KEEP, ot.KEEP), + at.stencil.setLocked(!0) + } + }, + MipmapBlurPass = class extends Pass { + constructor() { + super('MipmapBlurPass'), + (this.needsSwap = !1), + (this.renderTarget = new WebGLRenderTarget(1, 1, { depthBuffer: !1 })), + (this.renderTarget.texture.name = 'Upsampling.Mipmap0'), + (this.downsamplingMipmaps = []), + (this.upsamplingMipmaps = []), + (this.downsamplingMaterial = new DownsamplingMaterial()), + (this.upsamplingMaterial = new UpsamplingMaterial()), + (this.resolution = new Vector2()) + } + get texture() { + return this.renderTarget.texture + } + get levels() { + return this.downsamplingMipmaps.length + } + set levels(tt) { + if (this.levels !== tt) { + const et = this.renderTarget + this.dispose(), (this.downsamplingMipmaps = []), (this.upsamplingMipmaps = []) + for (let nt = 0; nt < tt; ++nt) { + const rt = et.clone() + ;(rt.texture.name = 'Downsampling.Mipmap' + nt), this.downsamplingMipmaps.push(rt) + } + this.upsamplingMipmaps.push(et) + for (let nt = 1, rt = tt - 1; nt < rt; ++nt) { + const it = et.clone() + ;(it.texture.name = 'Upsampling.Mipmap' + nt), this.upsamplingMipmaps.push(it) + } + this.setSize(this.resolution.x, this.resolution.y) + } + } + get radius() { + return this.upsamplingMaterial.radius + } + set radius(tt) { + this.upsamplingMaterial.radius = tt + } + render(tt, et, nt, rt, it) { + const { scene: ot, camera: at } = this, + { downsamplingMaterial: st, upsamplingMaterial: lt } = this, + { downsamplingMipmaps: ct, upsamplingMipmaps: ut } = this + let ht = et + this.fullscreenMaterial = st + for (let dt = 0, pt = ct.length; dt < pt; ++dt) { + const mt = ct[dt] + st.setSize(ht.width, ht.height), + (st.inputBuffer = ht.texture), + tt.setRenderTarget(mt), + tt.render(ot, at), + (ht = mt) + } + this.fullscreenMaterial = lt + for (let dt = ut.length - 1; dt >= 0; --dt) { + const pt = ut[dt] + lt.setSize(ht.width, ht.height), + (lt.inputBuffer = ht.texture), + (lt.supportBuffer = ct[dt].texture), + tt.setRenderTarget(pt), + tt.render(ot, at), + (ht = pt) + } + } + setSize(tt, et) { + const nt = this.resolution + nt.set(tt, et) + let rt = nt.width, + it = nt.height + for (let ot = 0, at = this.downsamplingMipmaps.length; ot < at; ++ot) + (rt = Math.round(rt * 0.5)), + (it = Math.round(it * 0.5)), + this.downsamplingMipmaps[ot].setSize(rt, it), + ot < this.upsamplingMipmaps.length && this.upsamplingMipmaps[ot].setSize(rt, it) + } + initialize(tt, et, nt) { + if (nt !== void 0) { + const rt = this.downsamplingMipmaps.concat(this.upsamplingMipmaps) + for (const it of rt) it.texture.type = nt + if (nt !== UnsignedByteType) + (this.downsamplingMaterial.defines.FRAMEBUFFER_PRECISION_HIGH = '1'), + (this.upsamplingMaterial.defines.FRAMEBUFFER_PRECISION_HIGH = '1') + else if (getOutputColorSpace(tt) === SRGBColorSpace) + for (const it of rt) setTextureColorSpace(it.texture, SRGBColorSpace) + } + } + dispose() { + super.dispose() + for (const tt of this.downsamplingMipmaps.concat(this.upsamplingMipmaps)) tt.dispose() + } + }, + NormalPass = class extends Pass { + constructor( + tt, + et, + { + renderTarget: nt, + resolutionScale: rt = 1, + width: it = Resolution.AUTO_SIZE, + height: ot = Resolution.AUTO_SIZE, + resolutionX: at = it, + resolutionY: st = ot, + } = {}, + ) { + super('NormalPass'), (this.needsSwap = !1), (this.renderPass = new RenderPass(tt, et, new MeshNormalMaterial())) + const lt = this.renderPass + ;(lt.ignoreBackground = !0), (lt.skipShadowMapUpdate = !0) + const ct = lt.getClearPass() + ;(ct.overrideClearColor = new Color$1(7829503)), + (ct.overrideClearAlpha = 1), + (this.renderTarget = nt), + this.renderTarget === void 0 && + ((this.renderTarget = new WebGLRenderTarget(1, 1, { minFilter: NearestFilter, magFilter: NearestFilter })), + (this.renderTarget.texture.name = 'NormalPass.Target')) + const ut = (this.resolution = new Resolution(this, at, st, rt)) + ut.addEventListener('change', (ht) => this.setSize(ut.baseWidth, ut.baseHeight)) + } + set mainScene(tt) { + this.renderPass.mainScene = tt + } + set mainCamera(tt) { + this.renderPass.mainCamera = tt + } + get texture() { + return this.renderTarget.texture + } + getTexture() { + return this.renderTarget.texture + } + getResolution() { + return this.resolution + } + getResolutionScale() { + return this.resolution.scale + } + setResolutionScale(tt) { + this.resolution.scale = tt + } + render(tt, et, nt, rt, it) { + const ot = this.renderToScreen ? null : this.renderTarget + this.renderPass.render(tt, ot, ot) + } + setSize(tt, et) { + const nt = this.resolution + nt.setBaseSize(tt, et), this.renderTarget.setSize(nt.width, nt.height) + } + }, + ShaderPass = class extends Pass { + constructor(tt, et = 'inputBuffer') { + super('ShaderPass'), (this.fullscreenMaterial = tt), (this.input = et) + } + setInput(tt) { + this.input = tt + } + render(tt, et, nt, rt, it) { + const ot = this.fullscreenMaterial.uniforms + et !== null && ot !== void 0 && ot[this.input] !== void 0 && (ot[this.input].value = et.texture), + tt.setRenderTarget(this.renderToScreen ? null : nt), + tt.render(this.scene, this.camera) + } + initialize(tt, et, nt) { + nt !== void 0 && nt !== UnsignedByteType && (this.fullscreenMaterial.defines.FRAMEBUFFER_PRECISION_HIGH = '1') + } + }, + MILLISECONDS_TO_SECONDS = 1 / 1e3, + SECONDS_TO_MILLISECONDS = 1e3, + Timer = class { + constructor() { + ;(this.startTime = performance.now()), + (this.previousTime = 0), + (this.currentTime = 0), + (this._delta = 0), + (this._elapsed = 0), + (this._fixedDelta = 1e3 / 60), + (this.timescale = 1), + (this.useFixedDelta = !1), + (this._autoReset = !1) + } + get autoReset() { + return this._autoReset + } + set autoReset(tt) { + typeof document < 'u' && + document.hidden !== void 0 && + (tt + ? document.addEventListener('visibilitychange', this) + : document.removeEventListener('visibilitychange', this), + (this._autoReset = tt)) + } + get delta() { + return this._delta * MILLISECONDS_TO_SECONDS + } + get fixedDelta() { + return this._fixedDelta * MILLISECONDS_TO_SECONDS + } + set fixedDelta(tt) { + this._fixedDelta = tt * SECONDS_TO_MILLISECONDS + } + get elapsed() { + return this._elapsed * MILLISECONDS_TO_SECONDS + } + update(tt) { + this.useFixedDelta + ? (this._delta = this.fixedDelta) + : ((this.previousTime = this.currentTime), + (this.currentTime = (tt !== void 0 ? tt : performance.now()) - this.startTime), + (this._delta = this.currentTime - this.previousTime)), + (this._delta *= this.timescale), + (this._elapsed += this._delta) + } + reset() { + ;(this._delta = 0), (this._elapsed = 0), (this.currentTime = performance.now() - this.startTime) + } + handleEvent(tt) { + document.hidden || (this.currentTime = performance.now() - this.startTime) + } + dispose() { + this.autoReset = !1 + } + }, + EffectComposer$1 = class { + constructor( + et = null, + { depthBuffer: nt = !0, stencilBuffer: rt = !1, multisampling: it = 0, frameBufferType: ot } = {}, + ) { + ;(this.renderer = null), + (this.inputBuffer = this.createBuffer(nt, rt, ot, it)), + (this.outputBuffer = this.inputBuffer.clone()), + (this.copyPass = new CopyPass()), + (this.depthTexture = null), + (this.passes = []), + (this.timer = new Timer()), + (this.autoRenderToScreen = !0), + this.setRenderer(et) + } + get multisampling() { + return this.inputBuffer.samples || 0 + } + set multisampling(et) { + const nt = this.inputBuffer, + rt = this.multisampling + rt > 0 && et > 0 + ? ((this.inputBuffer.samples = et), + (this.outputBuffer.samples = et), + this.inputBuffer.dispose(), + this.outputBuffer.dispose()) + : rt !== et && + (this.inputBuffer.dispose(), + this.outputBuffer.dispose(), + (this.inputBuffer = this.createBuffer(nt.depthBuffer, nt.stencilBuffer, nt.texture.type, et)), + (this.inputBuffer.depthTexture = this.depthTexture), + (this.outputBuffer = this.inputBuffer.clone())) + } + getTimer() { + return this.timer + } + getRenderer() { + return this.renderer + } + setRenderer(et) { + if (((this.renderer = et), et !== null)) { + const nt = et.getSize(new Vector2()), + rt = et.getContext().getContextAttributes().alpha, + it = this.inputBuffer.texture.type + it === UnsignedByteType && + getOutputColorSpace(et) === SRGBColorSpace && + (setTextureColorSpace(this.inputBuffer.texture, SRGBColorSpace), + setTextureColorSpace(this.outputBuffer.texture, SRGBColorSpace), + this.inputBuffer.dispose(), + this.outputBuffer.dispose()), + (et.autoClear = !1), + this.setSize(nt.width, nt.height) + for (const ot of this.passes) ot.initialize(et, rt, it) + } + } + replaceRenderer(et, nt = !0) { + const rt = this.renderer, + it = rt.domElement.parentNode + return ( + this.setRenderer(et), nt && it !== null && (it.removeChild(rt.domElement), it.appendChild(et.domElement)), rt + ) + } + createDepthTexture() { + const et = (this.depthTexture = new DepthTexture()) + return ( + (this.inputBuffer.depthTexture = et), + this.inputBuffer.dispose(), + this.inputBuffer.stencilBuffer + ? ((et.format = DepthStencilFormat), (et.type = UnsignedInt248Type)) + : (et.type = UnsignedIntType), + et + ) + } + deleteDepthTexture() { + if (this.depthTexture !== null) { + this.depthTexture.dispose(), + (this.depthTexture = null), + (this.inputBuffer.depthTexture = null), + this.inputBuffer.dispose() + for (const et of this.passes) et.setDepthTexture(null) + } + } + createBuffer(et, nt, rt, it) { + const ot = this.renderer, + at = ot === null ? new Vector2() : ot.getDrawingBufferSize(new Vector2()), + st = { minFilter: LinearFilter, magFilter: LinearFilter, stencilBuffer: nt, depthBuffer: et, type: rt }, + lt = new WebGLRenderTarget(at.width, at.height, st) + return ( + it > 0 && ((lt.ignoreDepthForMultisampleCopy = !1), (lt.samples = it)), + rt === UnsignedByteType && + getOutputColorSpace(ot) === SRGBColorSpace && + setTextureColorSpace(lt.texture, SRGBColorSpace), + (lt.texture.name = 'EffectComposer.Buffer'), + (lt.texture.generateMipmaps = !1), + lt + ) + } + setMainScene(et) { + for (const nt of this.passes) nt.mainScene = et + } + setMainCamera(et) { + for (const nt of this.passes) nt.mainCamera = et + } + addPass(et, nt) { + const rt = this.passes, + it = this.renderer, + ot = it.getDrawingBufferSize(new Vector2()), + at = it.getContext().getContextAttributes().alpha, + st = this.inputBuffer.texture.type + if ( + (et.setRenderer(it), + et.setSize(ot.width, ot.height), + et.initialize(it, at, st), + this.autoRenderToScreen && + (rt.length > 0 && (rt[rt.length - 1].renderToScreen = !1), + et.renderToScreen && (this.autoRenderToScreen = !1)), + nt !== void 0 ? rt.splice(nt, 0, et) : rt.push(et), + this.autoRenderToScreen && (rt[rt.length - 1].renderToScreen = !0), + et.needsDepthTexture || this.depthTexture !== null) + ) + if (this.depthTexture === null) { + const lt = this.createDepthTexture() + for (et of rt) et.setDepthTexture(lt) + } else et.setDepthTexture(this.depthTexture) + } + removePass(et) { + const nt = this.passes, + rt = nt.indexOf(et) + if (rt !== -1 && nt.splice(rt, 1).length > 0) { + if (this.depthTexture !== null) { + const at = (lt, ct) => lt || ct.needsDepthTexture + nt.reduce(at, !1) || + (et.getDepthTexture() === this.depthTexture && et.setDepthTexture(null), this.deleteDepthTexture()) + } + this.autoRenderToScreen && + rt === nt.length && + ((et.renderToScreen = !1), nt.length > 0 && (nt[nt.length - 1].renderToScreen = !0)) + } + } + removeAllPasses() { + const et = this.passes + this.deleteDepthTexture(), + et.length > 0 && (this.autoRenderToScreen && (et[et.length - 1].renderToScreen = !1), (this.passes = [])) + } + render(et) { + const nt = this.renderer, + rt = this.copyPass + let it = this.inputBuffer, + ot = this.outputBuffer, + at = !1, + st, + lt, + ct + et === void 0 && (this.timer.update(), (et = this.timer.delta)) + for (const ut of this.passes) + ut.enabled && + (ut.render(nt, it, ot, et, at), + ut.needsSwap && + (at && + ((rt.renderToScreen = ut.renderToScreen), + (st = nt.getContext()), + (lt = nt.state.buffers.stencil), + lt.setFunc(st.NOTEQUAL, 1, 4294967295), + rt.render(nt, it, ot, et, at), + lt.setFunc(st.EQUAL, 1, 4294967295)), + (ct = it), + (it = ot), + (ot = ct)), + ut instanceof MaskPass ? (at = !0) : ut instanceof ClearMaskPass && (at = !1)) + } + setSize(et, nt, rt) { + const it = this.renderer, + ot = it.getSize(new Vector2()) + ;(et === void 0 || nt === void 0) && ((et = ot.width), (nt = ot.height)), + (ot.width !== et || ot.height !== nt) && it.setSize(et, nt, rt) + const at = it.getDrawingBufferSize(new Vector2()) + this.inputBuffer.setSize(at.width, at.height), this.outputBuffer.setSize(at.width, at.height) + for (const st of this.passes) st.setSize(at.width, at.height) + } + reset() { + const et = this.timer.autoReset + this.dispose(), (this.autoRenderToScreen = !0), (this.timer.autoReset = et) + } + dispose() { + for (const et of this.passes) et.dispose() + ;(this.passes = []), + this.inputBuffer !== null && this.inputBuffer.dispose(), + this.outputBuffer !== null && this.outputBuffer.dispose(), + this.deleteDepthTexture(), + this.copyPass.dispose(), + this.timer.dispose() + } + }, + EffectShaderData = class { + constructor() { + ;(this.shaderParts = new Map([ + [EffectShaderSection.FRAGMENT_HEAD, null], + [EffectShaderSection.FRAGMENT_MAIN_UV, null], + [EffectShaderSection.FRAGMENT_MAIN_IMAGE, null], + [EffectShaderSection.VERTEX_HEAD, null], + [EffectShaderSection.VERTEX_MAIN_SUPPORT, null], + ])), + (this.defines = new Map()), + (this.uniforms = new Map()), + (this.blendModes = new Map()), + (this.extensions = new Set()), + (this.attributes = EffectAttribute.NONE), + (this.varyings = new Set()), + (this.uvTransformation = !1), + (this.readDepth = !1), + (this.colorSpace = LinearSRGBColorSpace) + } + }, + workaroundEnabled = !1, + OverrideMaterialManager = class { + constructor(tt = null) { + ;(this.originalMaterials = new Map()), + (this.material = null), + (this.materials = null), + (this.materialsBackSide = null), + (this.materialsDoubleSide = null), + (this.materialsFlatShaded = null), + (this.materialsFlatShadedBackSide = null), + (this.materialsFlatShadedDoubleSide = null), + this.setMaterial(tt), + (this.meshCount = 0), + (this.replaceMaterial = (et) => { + if (et.isMesh) { + let nt + if (et.material.flatShading) + switch (et.material.side) { + case DoubleSide: + nt = this.materialsFlatShadedDoubleSide + break + case BackSide: + nt = this.materialsFlatShadedBackSide + break + default: + nt = this.materialsFlatShaded + break + } + else + switch (et.material.side) { + case DoubleSide: + nt = this.materialsDoubleSide + break + case BackSide: + nt = this.materialsBackSide + break + default: + nt = this.materials + break + } + this.originalMaterials.set(et, et.material), + et.isSkinnedMesh + ? (et.material = nt[2]) + : et.isInstancedMesh + ? (et.material = nt[1]) + : (et.material = nt[0]), + ++this.meshCount + } + }) + } + cloneMaterial(tt) { + if (!(tt instanceof ShaderMaterial)) return tt.clone() + const et = tt.uniforms, + nt = new Map() + for (const it in et) { + const ot = et[it].value + ot.isRenderTargetTexture && ((et[it].value = null), nt.set(it, ot)) + } + const rt = tt.clone() + for (const it of nt) (et[it[0]].value = it[1]), (rt.uniforms[it[0]].value = it[1]) + return rt + } + setMaterial(tt) { + if ((this.disposeMaterials(), (this.material = tt), tt !== null)) { + const et = (this.materials = [this.cloneMaterial(tt), this.cloneMaterial(tt), this.cloneMaterial(tt)]) + for (const nt of et) (nt.uniforms = Object.assign({}, tt.uniforms)), (nt.side = FrontSide) + ;(et[2].skinning = !0), + (this.materialsBackSide = et.map((nt) => { + const rt = this.cloneMaterial(nt) + return (rt.uniforms = Object.assign({}, tt.uniforms)), (rt.side = BackSide), rt + })), + (this.materialsDoubleSide = et.map((nt) => { + const rt = this.cloneMaterial(nt) + return (rt.uniforms = Object.assign({}, tt.uniforms)), (rt.side = DoubleSide), rt + })), + (this.materialsFlatShaded = et.map((nt) => { + const rt = this.cloneMaterial(nt) + return (rt.uniforms = Object.assign({}, tt.uniforms)), (rt.flatShading = !0), rt + })), + (this.materialsFlatShadedBackSide = et.map((nt) => { + const rt = this.cloneMaterial(nt) + return (rt.uniforms = Object.assign({}, tt.uniforms)), (rt.flatShading = !0), (rt.side = BackSide), rt + })), + (this.materialsFlatShadedDoubleSide = et.map((nt) => { + const rt = this.cloneMaterial(nt) + return (rt.uniforms = Object.assign({}, tt.uniforms)), (rt.flatShading = !0), (rt.side = DoubleSide), rt + })) + } + } + render(tt, et, nt) { + const rt = tt.shadowMap.enabled + if (((tt.shadowMap.enabled = !1), workaroundEnabled)) { + const it = this.originalMaterials + ;(this.meshCount = 0), et.traverse(this.replaceMaterial), tt.render(et, nt) + for (const ot of it) ot[0].material = ot[1] + this.meshCount !== it.size && it.clear() + } else { + const it = et.overrideMaterial + ;(et.overrideMaterial = this.material), tt.render(et, nt), (et.overrideMaterial = it) + } + tt.shadowMap.enabled = rt + } + disposeMaterials() { + if (this.material !== null) { + const tt = this.materials + .concat(this.materialsBackSide) + .concat(this.materialsDoubleSide) + .concat(this.materialsFlatShaded) + .concat(this.materialsFlatShadedBackSide) + .concat(this.materialsFlatShadedDoubleSide) + for (const et of tt) et.dispose() + } + } + dispose() { + this.originalMaterials.clear(), this.disposeMaterials() + } + static get workaroundEnabled() { + return workaroundEnabled + } + static set workaroundEnabled(tt) { + workaroundEnabled = tt + } + }, + AUTO_SIZE = -1, + Resolution = class extends EventDispatcher$1 { + constructor(tt, et = AUTO_SIZE, nt = AUTO_SIZE, rt = 1) { + super(), + (this.resizable = tt), + (this.baseSize = new Vector2(1, 1)), + (this.preferredSize = new Vector2(et, nt)), + (this.target = this.preferredSize), + (this.s = rt), + (this.effectiveSize = new Vector2()), + this.addEventListener('change', () => this.updateEffectiveSize()), + this.updateEffectiveSize() + } + updateEffectiveSize() { + const tt = this.baseSize, + et = this.preferredSize, + nt = this.effectiveSize, + rt = this.scale + et.width !== AUTO_SIZE + ? (nt.width = et.width) + : et.height !== AUTO_SIZE + ? (nt.width = Math.round(et.height * (tt.width / Math.max(tt.height, 1)))) + : (nt.width = Math.round(tt.width * rt)), + et.height !== AUTO_SIZE + ? (nt.height = et.height) + : et.width !== AUTO_SIZE + ? (nt.height = Math.round(et.width / Math.max(tt.width / Math.max(tt.height, 1), 1))) + : (nt.height = Math.round(tt.height * rt)) + } + get width() { + return this.effectiveSize.width + } + set width(tt) { + this.preferredWidth = tt + } + get height() { + return this.effectiveSize.height + } + set height(tt) { + this.preferredHeight = tt + } + getWidth() { + return this.width + } + getHeight() { + return this.height + } + get scale() { + return this.s + } + set scale(tt) { + this.s !== tt && + ((this.s = tt), + this.preferredSize.setScalar(AUTO_SIZE), + this.dispatchEvent({ type: 'change' }), + this.resizable.setSize(this.baseSize.width, this.baseSize.height)) + } + getScale() { + return this.scale + } + setScale(tt) { + this.scale = tt + } + get baseWidth() { + return this.baseSize.width + } + set baseWidth(tt) { + this.baseSize.width !== tt && + ((this.baseSize.width = tt), + this.dispatchEvent({ type: 'change' }), + this.resizable.setSize(this.baseSize.width, this.baseSize.height)) + } + getBaseWidth() { + return this.baseWidth + } + setBaseWidth(tt) { + this.baseWidth = tt + } + get baseHeight() { + return this.baseSize.height + } + set baseHeight(tt) { + this.baseSize.height !== tt && + ((this.baseSize.height = tt), + this.dispatchEvent({ type: 'change' }), + this.resizable.setSize(this.baseSize.width, this.baseSize.height)) + } + getBaseHeight() { + return this.baseHeight + } + setBaseHeight(tt) { + this.baseHeight = tt + } + setBaseSize(tt, et) { + ;(this.baseSize.width !== tt || this.baseSize.height !== et) && + (this.baseSize.set(tt, et), + this.dispatchEvent({ type: 'change' }), + this.resizable.setSize(this.baseSize.width, this.baseSize.height)) + } + get preferredWidth() { + return this.preferredSize.width + } + set preferredWidth(tt) { + this.preferredSize.width !== tt && + ((this.preferredSize.width = tt), + this.dispatchEvent({ type: 'change' }), + this.resizable.setSize(this.baseSize.width, this.baseSize.height)) + } + getPreferredWidth() { + return this.preferredWidth + } + setPreferredWidth(tt) { + this.preferredWidth = tt + } + get preferredHeight() { + return this.preferredSize.height + } + set preferredHeight(tt) { + this.preferredSize.height !== tt && + ((this.preferredSize.height = tt), + this.dispatchEvent({ type: 'change' }), + this.resizable.setSize(this.baseSize.width, this.baseSize.height)) + } + getPreferredHeight() { + return this.preferredHeight + } + setPreferredHeight(tt) { + this.preferredHeight = tt + } + setPreferredSize(tt, et) { + ;(this.preferredSize.width !== tt || this.preferredSize.height !== et) && + (this.preferredSize.set(tt, et), + this.dispatchEvent({ type: 'change' }), + this.resizable.setSize(this.baseSize.width, this.baseSize.height)) + } + copy(tt) { + ;(this.s = tt.scale), + this.baseSize.set(tt.baseWidth, tt.baseHeight), + this.preferredSize.set(tt.preferredWidth, tt.preferredHeight), + this.dispatchEvent({ type: 'change' }), + this.resizable.setSize(this.baseSize.width, this.baseSize.height) + } + static get AUTO_SIZE() { + return AUTO_SIZE + } + }, + Selection$3 = class extends Set { + constructor(et, nt = 10) { + super(), (this.l = nt), (this.exclusive = !1), et !== void 0 && this.set(et) + } + get layer() { + return this.l + } + set layer(et) { + const nt = this.l + for (const rt of this) rt.layers.disable(nt), rt.layers.enable(et) + this.l = et + } + getLayer() { + return this.layer + } + setLayer(et) { + this.layer = et + } + isExclusive() { + return this.exclusive + } + setExclusive(et) { + this.exclusive = et + } + clear() { + const et = this.layer + for (const nt of this) nt.layers.disable(et) + return super.clear() + } + set(et) { + this.clear() + for (const nt of et) this.add(nt) + return this + } + indexOf(et) { + return this.has(et) ? 0 : -1 + } + add(et) { + return this.exclusive ? et.layers.set(this.layer) : et.layers.enable(this.layer), super.add(et) + } + delete(et) { + return this.has(et) && et.layers.disable(this.layer), super.delete(et) + } + toggle(et) { + let nt + return this.has(et) ? (this.delete(et), (nt = !1)) : (this.add(et), (nt = !0)), nt + } + setVisible(et) { + for (const nt of this) et ? nt.layers.enable(0) : nt.layers.disable(0) + return this + } + }, + add_default = 'vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,x+y,opacity);}', + alpha_default = + 'vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,y,min(y.a,opacity));}', + average_default = + 'vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,(x+y)*0.5,opacity);}', + color_default = + 'vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec3 xHSL=RGBToHSL(x.rgb);vec3 yHSL=RGBToHSL(y.rgb);vec3 z=HSLToRGB(vec3(yHSL.rg,xHSL.b));return vec4(mix(x.rgb,z,opacity),y.a);}', + color_burn_default = + 'vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec4 z=mix(step(0.0,y)*(1.0-min(vec4(1.0),(1.0-x)/y)),vec4(1.0),step(1.0,x));return mix(x,z,opacity);}', + color_dodge_default = + 'vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec4 z=step(0.0,x)*mix(min(vec4(1.0),x/max(1.0-y,1e-9)),vec4(1.0),step(1.0,y));return mix(x,z,opacity);}', + darken_default = + 'vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,min(x,y),opacity);}', + difference_default = + 'vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,abs(x-y),opacity);}', + divide_default = + 'vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,x/max(y,1e-12),opacity);}', + exclusion_default = + 'vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,(x+y-2.0*x*y),opacity);}', + hard_light_default = + 'vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec4 a=min(x,1.0),b=min(y,1.0);vec4 z=mix(2.0*a*b,1.0-2.0*(1.0-a)*(1.0-b),step(0.5,y));return mix(x,z,opacity);}', + hard_mix_default = + 'vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,step(1.0,x+y),opacity);}', + hue_default = + 'vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec3 xHSL=RGBToHSL(x.rgb);vec3 yHSL=RGBToHSL(y.rgb);vec3 z=HSLToRGB(vec3(yHSL.r,xHSL.gb));return vec4(mix(x.rgb,z,opacity),y.a);}', + invert_default = 'vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,1.0-y,opacity);}', + invert_rgb_default = + 'vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,y*(1.0-x),opacity);}', + lighten_default = + 'vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,max(x,y),opacity);}', + linear_burn_default = + 'vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,clamp(y+x-1.0,0.0,1.0),opacity);}', + linear_dodge_default = + 'vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,min(x+y,1.0),opacity);}', + linear_light_default = + 'vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,clamp(2.0*y+x-1.0,0.0,1.0),opacity);}', + luminosity_default = + 'vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec3 xHSL=RGBToHSL(x.rgb);vec3 yHSL=RGBToHSL(y.rgb);vec3 z=HSLToRGB(vec3(xHSL.rg,yHSL.b));return vec4(mix(x.rgb,z,opacity),y.a);}', + multiply_default = 'vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,x*y,opacity);}', + negation_default = + 'vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,1.0-abs(1.0-x-y),opacity);}', + normal_default = 'vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,y,opacity);}', + overlay_default = + 'vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec4 z=mix(2.0*y*x,1.0-2.0*(1.0-y)*(1.0-x),step(0.5,x));return mix(x,z,opacity);}', + pin_light_default = + 'vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec4 y2=2.0*y;vec4 z=mix(mix(y2,x,step(0.5*x,y)),max(vec4(0.0),y2-1.0),step(x,(y2-1.0)));return mix(x,z,opacity);}', + reflect_default = + 'vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec4 z=mix(min(x*x/max(1.0-y,1e-12),1.0),y,step(1.0,y));return mix(x,z,opacity);}', + saturation_default = + 'vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec3 xHSL=RGBToHSL(x.rgb);vec3 yHSL=RGBToHSL(y.rgb);vec3 z=HSLToRGB(vec3(xHSL.r,yHSL.g,xHSL.b));return vec4(mix(x.rgb,z,opacity),y.a);}', + screen_default = + 'vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,x+y-min(x*y,1.0),opacity);}', + soft_light_default = + 'vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec4 y2=2.0*y;vec4 w=step(0.5,y);vec4 z=mix(x-(1.0-y2)*x*(1.0-x),mix(x+(y2-1.0)*(sqrt(x)-x),x+(y2-1.0)*x*((16.0*x-12.0)*x+3.0),w*(1.0-step(0.25,x))),w);return mix(x,z,opacity);}', + src_default = 'vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return y;}', + subtract_default = + 'vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,max(x+y-1.0,0.0),opacity);}', + vivid_light_default = + 'vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec4 z=mix(max(1.0-min((1.0-x)/(2.0*y),1.0),0.0),min(x/(2.0*(1.0-y)),1.0),step(0.5,y));return mix(x,z,opacity);}', + blendFunctions = new Map([ + [BlendFunction.ADD, add_default], + [BlendFunction.ALPHA, alpha_default], + [BlendFunction.AVERAGE, average_default], + [BlendFunction.COLOR, color_default], + [BlendFunction.COLOR_BURN, color_burn_default], + [BlendFunction.COLOR_DODGE, color_dodge_default], + [BlendFunction.DARKEN, darken_default], + [BlendFunction.DIFFERENCE, difference_default], + [BlendFunction.DIVIDE, divide_default], + [BlendFunction.DST, null], + [BlendFunction.EXCLUSION, exclusion_default], + [BlendFunction.HARD_LIGHT, hard_light_default], + [BlendFunction.HARD_MIX, hard_mix_default], + [BlendFunction.HUE, hue_default], + [BlendFunction.INVERT, invert_default], + [BlendFunction.INVERT_RGB, invert_rgb_default], + [BlendFunction.LIGHTEN, lighten_default], + [BlendFunction.LINEAR_BURN, linear_burn_default], + [BlendFunction.LINEAR_DODGE, linear_dodge_default], + [BlendFunction.LINEAR_LIGHT, linear_light_default], + [BlendFunction.LUMINOSITY, luminosity_default], + [BlendFunction.MULTIPLY, multiply_default], + [BlendFunction.NEGATION, negation_default], + [BlendFunction.NORMAL, normal_default], + [BlendFunction.OVERLAY, overlay_default], + [BlendFunction.PIN_LIGHT, pin_light_default], + [BlendFunction.REFLECT, reflect_default], + [BlendFunction.SATURATION, saturation_default], + [BlendFunction.SCREEN, screen_default], + [BlendFunction.SOFT_LIGHT, soft_light_default], + [BlendFunction.SRC, src_default], + [BlendFunction.SUBTRACT, subtract_default], + [BlendFunction.VIVID_LIGHT, vivid_light_default], + ]), + BlendMode = class extends EventDispatcher$1 { + constructor(tt, et = 1) { + super(), (this._blendFunction = tt), (this.opacity = new Uniform(et)) + } + getOpacity() { + return this.opacity.value + } + setOpacity(tt) { + this.opacity.value = tt + } + get blendFunction() { + return this._blendFunction + } + set blendFunction(tt) { + ;(this._blendFunction = tt), this.dispatchEvent({ type: 'change' }) + } + getBlendFunction() { + return this.blendFunction + } + setBlendFunction(tt) { + this.blendFunction = tt + } + getShaderCode() { + return blendFunctions.get(this.blendFunction) + } + }, + Effect$1 = class extends EventDispatcher$1 { + constructor( + et, + nt, + { + attributes: rt = EffectAttribute.NONE, + blendFunction: it = BlendFunction.NORMAL, + defines: ot = new Map(), + uniforms: at = new Map(), + extensions: st = null, + vertexShader: lt = null, + } = {}, + ) { + super(), + (this.name = et), + (this.renderer = null), + (this.attributes = rt), + (this.fragmentShader = nt), + (this.vertexShader = lt), + (this.defines = ot), + (this.uniforms = at), + (this.extensions = st), + (this.blendMode = new BlendMode(it)), + this.blendMode.addEventListener('change', (ct) => this.setChanged()), + (this._inputColorSpace = LinearSRGBColorSpace), + (this._outputColorSpace = NoColorSpace) + } + get inputColorSpace() { + return this._inputColorSpace + } + set inputColorSpace(et) { + ;(this._inputColorSpace = et), this.setChanged() + } + get outputColorSpace() { + return this._outputColorSpace + } + set outputColorSpace(et) { + ;(this._outputColorSpace = et), this.setChanged() + } + set mainScene(et) {} + set mainCamera(et) {} + getName() { + return this.name + } + setRenderer(et) { + this.renderer = et + } + getDefines() { + return this.defines + } + getUniforms() { + return this.uniforms + } + getExtensions() { + return this.extensions + } + getBlendMode() { + return this.blendMode + } + getAttributes() { + return this.attributes + } + setAttributes(et) { + ;(this.attributes = et), this.setChanged() + } + getFragmentShader() { + return this.fragmentShader + } + setFragmentShader(et) { + ;(this.fragmentShader = et), this.setChanged() + } + getVertexShader() { + return this.vertexShader + } + setVertexShader(et) { + ;(this.vertexShader = et), this.setChanged() + } + setChanged() { + this.dispatchEvent({ type: 'change' }) + } + setDepthTexture(et, nt = BasicDepthPacking) {} + update(et, nt, rt) {} + setSize(et, nt) {} + initialize(et, nt, rt) {} + dispose() { + for (const et of Object.keys(this)) { + const nt = this[et] + ;(nt instanceof WebGLRenderTarget || nt instanceof Material || nt instanceof Texture || nt instanceof Pass) && + this[et].dispose() + } + } + }, + bloom_default = `#ifdef FRAMEBUFFER_PRECISION_HIGH +uniform mediump sampler2D map; +#else +uniform lowp sampler2D map; #endif - -if (edgeAlpha == 0.0) { - discard; -} -`;function createTextDerivedMaterial(tt){const et=createDerivedMaterial(tt,{chained:!0,extensions:{derivatives:!0},uniforms:{uTroikaSDFTexture:{value:null},uTroikaSDFTextureSize:{value:new Vector2},uTroikaSDFGlyphSize:{value:0},uTroikaSDFExponent:{value:0},uTroikaTotalBounds:{value:new Vector4(0,0,0,0)},uTroikaClipRect:{value:new Vector4(0,0,0,0)},uTroikaDistanceOffset:{value:0},uTroikaOutlineOpacity:{value:0},uTroikaFillOpacity:{value:1},uTroikaPositionOffset:{value:new Vector2},uTroikaCurveRadius:{value:0},uTroikaBlurRadius:{value:0},uTroikaStrokeWidth:{value:0},uTroikaStrokeColor:{value:new Color$1},uTroikaStrokeOpacity:{value:1},uTroikaOrient:{value:new Matrix3},uTroikaUseGlyphColors:{value:!0},uTroikaSDFDebug:{value:!1}},vertexDefs:VERTEX_DEFS,vertexTransform:VERTEX_TRANSFORM,fragmentDefs:FRAGMENT_DEFS,fragmentColorTransform:FRAGMENT_TRANSFORM,customRewriter({vertexShader:nt,fragmentShader:rt}){let it=/\buniform\s+vec3\s+diffuse\b/;return it.test(rt)&&(rt=rt.replace(it,"varying vec3 vTroikaGlyphColor").replace(/\bdiffuse\b/g,"vTroikaGlyphColor"),it.test(nt)||(nt=nt.replace(voidMainRegExp,`uniform vec3 diffuse; -$& -vTroikaGlyphColor = uTroikaUseGlyphColors ? aTroikaGlyphColor / 255.0 : diffuse; -`))),{vertexShader:nt,fragmentShader:rt}}});return et.transparent=!0,Object.defineProperties(et,{isTroikaTextMaterial:{value:!0},shadowSide:{get(){return this.side},set(){}}}),et}const defaultMaterial=new MeshBasicMaterial({color:16777215,side:DoubleSide,transparent:!0}),defaultStrokeColor=8421504,tempMat4=new Matrix4,tempVec3a=new Vector3,tempVec3b=new Vector3,tempArray=[],origin=new Vector3,defaultOrient="+x+y";function first(tt){return Array.isArray(tt)?tt[0]:tt}let getFlatRaycastMesh=()=>{const tt=new Mesh(new PlaneGeometry(1,1),defaultMaterial);return getFlatRaycastMesh=()=>tt,tt},getCurvedRaycastMesh=()=>{const tt=new Mesh(new PlaneGeometry(1,1,32,1),defaultMaterial);return getCurvedRaycastMesh=()=>tt,tt};const syncStartEvent={type:"syncstart"},syncCompleteEvent={type:"synccomplete"},SYNCABLE_PROPS=["font","fontSize","letterSpacing","lineHeight","maxWidth","overflowWrap","text","direction","textAlign","textIndent","whiteSpace","anchorX","anchorY","colorRanges","sdfGlyphSize"],COPYABLE_PROPS=SYNCABLE_PROPS.concat("material","color","depthOffset","clipRect","curveRadius","orientation","glyphGeometryDetail");let Text$2=class extends Mesh{constructor(){const et=new GlyphsGeometry;super(et,null),this.text="",this.anchorX=0,this.anchorY=0,this.curveRadius=0,this.direction="auto",this.font=null,this.fontSize=.1,this.letterSpacing=0,this.lineHeight="normal",this.maxWidth=1/0,this.overflowWrap="normal",this.textAlign="left",this.textIndent=0,this.whiteSpace="normal",this.material=null,this.color=null,this.colorRanges=null,this.outlineWidth=0,this.outlineColor=0,this.outlineOpacity=1,this.outlineBlur=0,this.outlineOffsetX=0,this.outlineOffsetY=0,this.strokeWidth=0,this.strokeColor=defaultStrokeColor,this.strokeOpacity=1,this.fillOpacity=1,this.depthOffset=0,this.clipRect=null,this.orientation=defaultOrient,this.glyphGeometryDetail=1,this.sdfGlyphSize=null,this.gpuAccelerateSDF=!0,this.debugSDF=!1}sync(et){this._needsSync&&(this._needsSync=!1,this._isSyncing?(this._queuedSyncs||(this._queuedSyncs=[])).push(et):(this._isSyncing=!0,this.dispatchEvent(syncStartEvent),getTextRenderInfo({text:this.text,font:this.font,fontSize:this.fontSize||.1,letterSpacing:this.letterSpacing||0,lineHeight:this.lineHeight||"normal",maxWidth:this.maxWidth,direction:this.direction||"auto",textAlign:this.textAlign,textIndent:this.textIndent,whiteSpace:this.whiteSpace,overflowWrap:this.overflowWrap,anchorX:this.anchorX,anchorY:this.anchorY,colorRanges:this.colorRanges,includeCaretPositions:!0,sdfGlyphSize:this.sdfGlyphSize,gpuAccelerateSDF:this.gpuAccelerateSDF},nt=>{this._isSyncing=!1,this._textRenderInfo=nt,this.geometry.updateGlyphs(nt.glyphBounds,nt.glyphAtlasIndices,nt.blockBounds,nt.chunkedBounds,nt.glyphColors);const rt=this._queuedSyncs;rt&&(this._queuedSyncs=null,this._needsSync=!0,this.sync(()=>{rt.forEach(it=>it&&it())})),this.dispatchEvent(syncCompleteEvent),et&&et()})))}onBeforeRender(et,nt,rt,it,ot,at){this.sync(),ot.isTroikaTextMaterial&&this._prepareForRender(ot),ot._hadOwnSide=ot.hasOwnProperty("side"),this.geometry.setSide(ot._actualSide=ot.side),ot.side=FrontSide}onAfterRender(et,nt,rt,it,ot,at){ot._hadOwnSide?ot.side=ot._actualSide:delete ot.side}dispose(){this.geometry.dispose()}get textRenderInfo(){return this._textRenderInfo||null}get material(){let et=this._derivedMaterial;const nt=this._baseMaterial||this._defaultMaterial||(this._defaultMaterial=defaultMaterial.clone());if((!et||et.baseMaterial!==nt)&&(et=this._derivedMaterial=createTextDerivedMaterial(nt),nt.addEventListener("dispose",function rt(){nt.removeEventListener("dispose",rt),et.dispose()})),this.outlineWidth||this.outlineBlur||this.outlineOffsetX||this.outlineOffsetY){let rt=et._outlineMtl;return rt||(rt=et._outlineMtl=Object.create(et,{id:{value:et.id+.1}}),rt.isTextOutlineMaterial=!0,rt.depthWrite=!1,rt.map=null,et.addEventListener("dispose",function it(){et.removeEventListener("dispose",it),rt.dispose()})),[rt,et]}else return et}set material(et){et&&et.isTroikaTextMaterial?(this._derivedMaterial=et,this._baseMaterial=et.baseMaterial):this._baseMaterial=et}get glyphGeometryDetail(){return this.geometry.detail}set glyphGeometryDetail(et){this.geometry.detail=et}get curveRadius(){return this.geometry.curveRadius}set curveRadius(et){this.geometry.curveRadius=et}get customDepthMaterial(){return first(this.material).getDepthMaterial()}get customDistanceMaterial(){return first(this.material).getDistanceMaterial()}_prepareForRender(et){const nt=et.isTextOutlineMaterial,rt=et.uniforms,it=this.textRenderInfo;if(it){const{sdfTexture:st,blockBounds:lt}=it;rt.uTroikaSDFTexture.value=st,rt.uTroikaSDFTextureSize.value.set(st.image.width,st.image.height),rt.uTroikaSDFGlyphSize.value=it.sdfGlyphSize,rt.uTroikaSDFExponent.value=it.sdfExponent,rt.uTroikaTotalBounds.value.fromArray(lt),rt.uTroikaUseGlyphColors.value=!nt&&!!it.glyphColors;let ct=0,ut=0,ht=0,dt,pt,mt,gt=0,yt=0;if(nt){let{outlineWidth:vt,outlineOffsetX:xt,outlineOffsetY:kt,outlineBlur:St,outlineOpacity:Tt}=this;ct=this._parsePercent(vt)||0,ut=Math.max(0,this._parsePercent(St)||0),dt=Tt,gt=this._parsePercent(xt)||0,yt=this._parsePercent(kt)||0}else ht=Math.max(0,this._parsePercent(this.strokeWidth)||0),ht&&(mt=this.strokeColor,rt.uTroikaStrokeColor.value.set(mt??defaultStrokeColor),pt=this.strokeOpacity,pt==null&&(pt=1)),dt=this.fillOpacity;rt.uTroikaDistanceOffset.value=ct,rt.uTroikaPositionOffset.value.set(gt,yt),rt.uTroikaBlurRadius.value=ut,rt.uTroikaStrokeWidth.value=ht,rt.uTroikaStrokeOpacity.value=pt,rt.uTroikaFillOpacity.value=dt??1,rt.uTroikaCurveRadius.value=this.curveRadius||0;let bt=this.clipRect;if(bt&&Array.isArray(bt)&&bt.length===4)rt.uTroikaClipRect.value.fromArray(bt);else{const vt=(this.fontSize||.1)*100;rt.uTroikaClipRect.value.set(lt[0]-vt,lt[1]-vt,lt[2]+vt,lt[3]+vt)}this.geometry.applyClipRect(rt.uTroikaClipRect.value)}rt.uTroikaSDFDebug.value=!!this.debugSDF,et.polygonOffset=!!this.depthOffset,et.polygonOffsetFactor=et.polygonOffsetUnits=this.depthOffset||0;const ot=nt?this.outlineColor||0:this.color;if(ot==null)delete et.color;else{const st=et.hasOwnProperty("color")?et.color:et.color=new Color$1;(ot!==st._input||typeof ot=="object")&&st.set(st._input=ot)}let at=this.orientation||defaultOrient;if(at!==et._orientation){let st=rt.uTroikaOrient.value;at=at.replace(/[^-+xyz]/g,"");let lt=at!==defaultOrient&&at.match(/^([-+])([xyz])([-+])([xyz])$/);if(lt){let[,ct,ut,ht,dt]=lt;tempVec3a.set(0,0,0)[ut]=ct==="-"?1:-1,tempVec3b.set(0,0,0)[dt]=ht==="-"?-1:1,tempMat4.lookAt(origin,tempVec3a.cross(tempVec3b),tempVec3b),st.setFromMatrix4(tempMat4)}else st.identity();et._orientation=at}}_parsePercent(et){if(typeof et=="string"){let nt=et.match(/^(-?[\d.]+)%$/),rt=nt?parseFloat(nt[1]):NaN;et=(isNaN(rt)?0:rt/100)*this.fontSize}return et}localPositionToTextCoords(et,nt=new Vector2){nt.copy(et);const rt=this.curveRadius;return rt&&(nt.x=Math.atan2(et.x,Math.abs(rt)-Math.abs(et.z))*Math.abs(rt)),nt}worldPositionToTextCoords(et,nt=new Vector2){return tempVec3a.copy(et),this.localPositionToTextCoords(this.worldToLocal(tempVec3a),nt)}raycast(et,nt){const{textRenderInfo:rt,curveRadius:it}=this;if(rt){const ot=rt.blockBounds,at=it?getCurvedRaycastMesh():getFlatRaycastMesh(),st=at.geometry,{position:lt,uv:ct}=st.attributes;for(let ut=0;ut{this[rt]=et[rt]}),this}clone(){return new this.constructor().copy(this)}};SYNCABLE_PROPS.forEach(tt=>{const et="_private_"+tt;Object.defineProperty(Text$2.prototype,tt,{get(){return this[et]},set(nt){nt!==this[et]&&(this[et]=nt,this._needsSync=!0)}})});function shallowEqualArrays(tt,et,nt=(rt,it)=>rt===it){if(tt===et)return!0;if(!tt||!et)return!1;const rt=tt.length;if(et.length!==rt)return!1;for(let it=0;itit.response=ot).then(()=>{rt.lifespan&&rt.lifespan>0&&setTimeout(()=>{const ot=globalCache.indexOf(it);ot!==-1&&globalCache.splice(ot,1)},rt.lifespan)}).catch(ot=>it.error=ot)};if(globalCache.push(it),!nt)throw it.promise}const suspend=(tt,et,nt)=>query(tt,et,!1,nt),Text$1=reactExports.forwardRef(({anchorX:tt="center",anchorY:et="middle",font:nt,fontSize:rt=1,children:it,characters:ot,onSync:at,...st},lt)=>{const ct=useThree(({invalidate:pt})=>pt),[ut]=reactExports.useState(()=>new Text$2),[ht,dt]=reactExports.useMemo(()=>{const pt=[];let mt="";return reactExports.Children.forEach(it,gt=>{typeof gt=="string"||typeof gt=="number"?mt+=gt:pt.push(gt)}),[pt,mt]},[it]);return suspend(()=>new Promise(pt=>preloadFont({font:nt,characters:ot},pt)),["troika-text",nt,ot]),reactExports.useLayoutEffect(()=>void ut.sync(()=>{ct(),at&&at(ut)})),reactExports.useEffect(()=>()=>ut.dispose(),[ut]),reactExports.createElement("primitive",_extends$u({object:ut,ref:lt,font:nt,text:dt,anchorX:tt,anchorY:et,fontSize:rt},st),ht)}),IsObject=tt=>tt===Object(tt)&&!Array.isArray(tt)&&typeof tt!="function";function useTexture(tt,et){const nt=useThree(it=>it.gl),rt=useLoader(TextureLoader,IsObject(tt)?Object.values(tt):tt);if(reactExports.useLayoutEffect(()=>{et==null||et(rt)},[et]),reactExports.useEffect(()=>{(Array.isArray(rt)?rt:[rt]).forEach(nt.initTexture)},[nt,rt]),IsObject(tt)){const it=Object.keys(tt),ot={};return it.forEach(at=>Object.assign(ot,{[at]:rt[it.indexOf(at)]})),ot}else return rt}useTexture.preload=tt=>useLoader.preload(TextureLoader,tt);useTexture.clear=tt=>useLoader.clear(TextureLoader,tt);/*! - * camera-controls - * https://github.com/yomotsu/camera-controls - * (c) 2017 @yomotsu - * Released under the MIT License. - */const MOUSE_BUTTON={LEFT:1,RIGHT:2,MIDDLE:4},ACTION=Object.freeze({NONE:0,ROTATE:1,TRUCK:2,OFFSET:4,DOLLY:8,ZOOM:16,TOUCH_ROTATE:32,TOUCH_TRUCK:64,TOUCH_OFFSET:128,TOUCH_DOLLY:256,TOUCH_ZOOM:512,TOUCH_DOLLY_TRUCK:1024,TOUCH_DOLLY_OFFSET:2048,TOUCH_DOLLY_ROTATE:4096,TOUCH_ZOOM_TRUCK:8192,TOUCH_ZOOM_OFFSET:16384,TOUCH_ZOOM_ROTATE:32768}),DOLLY_DIRECTION={NONE:0,IN:1,OUT:-1};function isPerspectiveCamera(tt){return tt.isPerspectiveCamera}function isOrthographicCamera(tt){return tt.isOrthographicCamera}const PI_2=Math.PI*2,PI_HALF=Math.PI/2,EPSILON$1=1e-5,DEG2RAD=Math.PI/180;function clamp$4(tt,et,nt){return Math.max(et,Math.min(nt,tt))}function approxZero(tt,et=EPSILON$1){return Math.abs(tt)0==pt>ut&&(pt=ut,nt.value=(pt-ut)/ot),pt}function smoothDampVec3(tt,et,nt,rt,it=1/0,ot,at){rt=Math.max(1e-4,rt);const st=2/rt,lt=st*ot,ct=1/(1+lt+.48*lt*lt+.235*lt*lt*lt);let ut=et.x,ht=et.y,dt=et.z,pt=tt.x-ut,mt=tt.y-ht,gt=tt.z-dt;const yt=ut,bt=ht,vt=dt,xt=it*rt,kt=xt*xt,St=pt*pt+mt*mt+gt*gt;if(St>kt){const It=Math.sqrt(St);pt=pt/It*xt,mt=mt/It*xt,gt=gt/It*xt}ut=tt.x-pt,ht=tt.y-mt,dt=tt.z-gt;const Tt=(nt.x+st*pt)*ot,At=(nt.y+st*mt)*ot,Et=(nt.z+st*gt)*ot;nt.x=(nt.x-st*Tt)*ct,nt.y=(nt.y-st*At)*ct,nt.z=(nt.z-st*Et)*ct,at.x=ut+(pt+Tt)*ct,at.y=ht+(mt+At)*ct,at.z=dt+(gt+Et)*ct;const $t=yt-tt.x,Dt=bt-tt.y,jt=vt-tt.z,Pt=at.x-yt,Ct=at.y-bt,wt=at.z-vt;return $t*Pt+Dt*Ct+jt*wt>0&&(at.x=yt,at.y=bt,at.z=vt,nt.x=(at.x-yt)/ot,nt.y=(at.y-bt)/ot,nt.z=(at.z-vt)/ot),at}function extractClientCoordFromEvent(tt,et){et.set(0,0),tt.forEach(nt=>{et.x+=nt.clientX,et.y+=nt.clientY}),et.x/=tt.length,et.y/=tt.length}function notSupportedInOrthographicCamera(tt,et){return isOrthographicCamera(tt)?(console.warn(`${et} is not supported in OrthographicCamera`),!0):!1}class EventDispatcher{constructor(){this._listeners={}}addEventListener(et,nt){const rt=this._listeners;rt[et]===void 0&&(rt[et]=[]),rt[et].indexOf(nt)===-1&&rt[et].push(nt)}hasEventListener(et,nt){const rt=this._listeners;return rt[et]!==void 0&&rt[et].indexOf(nt)!==-1}removeEventListener(et,nt){const it=this._listeners[et];if(it!==void 0){const ot=it.indexOf(nt);ot!==-1&&it.splice(ot,1)}}removeAllEventListeners(et){if(!et){this._listeners={};return}Array.isArray(this._listeners[et])&&(this._listeners[et].length=0)}dispatchEvent(et){const rt=this._listeners[et.type];if(rt!==void 0){et.target=this;const it=rt.slice(0);for(let ot=0,at=it.length;ot{},this._enabled=!0,this._state=ACTION.NONE,this._viewport=null,this._changedDolly=0,this._changedZoom=0,this._hasRested=!0,this._boundaryEnclosesCamera=!1,this._needsUpdate=!0,this._updatedLastTime=!1,this._elementRect=new DOMRect,this._isDragging=!1,this._activePointers=[],this._lockedPointer=null,this._interactiveArea=new DOMRect(0,0,1,1),this._isUserControllingRotate=!1,this._isUserControllingDolly=!1,this._isUserControllingTruck=!1,this._isUserControllingOffset=!1,this._isUserControllingZoom=!1,this._lastDollyDirection=DOLLY_DIRECTION.NONE,this._thetaVelocity={value:0},this._phiVelocity={value:0},this._radiusVelocity={value:0},this._targetVelocity=new THREE.Vector3,this._focalOffsetVelocity=new THREE.Vector3,this._zoomVelocity={value:0},this._truckInternal=(kt,St,Tt)=>{let At,Et;if(isPerspectiveCamera(this._camera)){const $t=_v3A.copy(this._camera.position).sub(this._target),Dt=this._camera.getEffectiveFOV()*DEG2RAD,jt=$t.length()*Math.tan(Dt*.5);At=this.truckSpeed*kt*jt/this._elementRect.height,Et=this.truckSpeed*St*jt/this._elementRect.height}else if(isOrthographicCamera(this._camera)){const $t=this._camera;At=kt*($t.right-$t.left)/$t.zoom/this._elementRect.width,Et=St*($t.top-$t.bottom)/$t.zoom/this._elementRect.height}else return;this.verticalDragToForward?(Tt?this.setFocalOffset(this._focalOffsetEnd.x+At,this._focalOffsetEnd.y,this._focalOffsetEnd.z,!0):this.truck(At,0,!0),this.forward(-Et,!0)):Tt?this.setFocalOffset(this._focalOffsetEnd.x+At,this._focalOffsetEnd.y+Et,this._focalOffsetEnd.z,!0):this.truck(At,Et,!0)},this._rotateInternal=(kt,St)=>{const Tt=PI_2*this.azimuthRotateSpeed*kt/this._elementRect.height,At=PI_2*this.polarRotateSpeed*St/this._elementRect.height;this.rotate(Tt,At,!0)},this._dollyInternal=(kt,St,Tt)=>{const At=Math.pow(.95,-kt*this.dollySpeed),Et=this._sphericalEnd.radius,$t=this._sphericalEnd.radius*At,Dt=clamp$4($t,this.minDistance,this.maxDistance),jt=Dt-$t;this.infinityDolly&&this.dollyToCursor?this._dollyToNoClamp($t,!0):this.infinityDolly&&!this.dollyToCursor?(this.dollyInFixed(jt,!0),this._dollyToNoClamp(Dt,!0)):this._dollyToNoClamp(Dt,!0),this.dollyToCursor&&(this._changedDolly+=(this.infinityDolly?$t:Dt)-Et,this._dollyControlCoord.set(St,Tt)),this._lastDollyDirection=Math.sign(-kt)},this._zoomInternal=(kt,St,Tt)=>{const At=Math.pow(.95,kt*this.dollySpeed),Et=this._zoom,$t=this._zoom*At;this.zoomTo($t,!0),this.dollyToCursor&&(this._changedZoom+=$t-Et,this._dollyControlCoord.set(St,Tt))},typeof THREE>"u"&&console.error("camera-controls: `THREE` is undefined. You must first run `CameraControls.install( { THREE: THREE } )`. Check the docs for further information."),this._camera=et,this._yAxisUpSpace=new THREE.Quaternion().setFromUnitVectors(this._camera.up,_AXIS_Y),this._yAxisUpSpaceInverse=this._yAxisUpSpace.clone().invert(),this._state=ACTION.NONE,this._target=new THREE.Vector3,this._targetEnd=this._target.clone(),this._focalOffset=new THREE.Vector3,this._focalOffsetEnd=this._focalOffset.clone(),this._spherical=new THREE.Spherical().setFromVector3(_v3A.copy(this._camera.position).applyQuaternion(this._yAxisUpSpace)),this._sphericalEnd=this._spherical.clone(),this._lastDistance=this._spherical.radius,this._zoom=this._camera.zoom,this._zoomEnd=this._zoom,this._lastZoom=this._zoom,this._nearPlaneCorners=[new THREE.Vector3,new THREE.Vector3,new THREE.Vector3,new THREE.Vector3],this._updateNearPlaneCorners(),this._boundary=new THREE.Box3(new THREE.Vector3(-1/0,-1/0,-1/0),new THREE.Vector3(1/0,1/0,1/0)),this._cameraUp0=this._camera.up.clone(),this._target0=this._target.clone(),this._position0=this._camera.position.clone(),this._zoom0=this._zoom,this._focalOffset0=this._focalOffset.clone(),this._dollyControlCoord=new THREE.Vector2,this.mouseButtons={left:ACTION.ROTATE,middle:ACTION.DOLLY,right:ACTION.TRUCK,wheel:isPerspectiveCamera(this._camera)?ACTION.DOLLY:isOrthographicCamera(this._camera)?ACTION.ZOOM:ACTION.NONE},this.touches={one:ACTION.TOUCH_ROTATE,two:isPerspectiveCamera(this._camera)?ACTION.TOUCH_DOLLY_TRUCK:isOrthographicCamera(this._camera)?ACTION.TOUCH_ZOOM_TRUCK:ACTION.NONE,three:ACTION.TOUCH_TRUCK};const rt=new THREE.Vector2,it=new THREE.Vector2,ot=new THREE.Vector2,at=kt=>{if(!this._enabled||!this._domElement)return;if(this._interactiveArea.left!==0||this._interactiveArea.top!==0||this._interactiveArea.width!==1||this._interactiveArea.height!==1){const At=this._domElement.getBoundingClientRect(),Et=kt.clientX/At.width,$t=kt.clientY/At.height;if(Etthis._interactiveArea.right||$tthis._interactiveArea.bottom)return}const St=kt.pointerType!=="mouse"?null:(kt.buttons&MOUSE_BUTTON.LEFT)===MOUSE_BUTTON.LEFT?MOUSE_BUTTON.LEFT:(kt.buttons&MOUSE_BUTTON.MIDDLE)===MOUSE_BUTTON.MIDDLE?MOUSE_BUTTON.MIDDLE:(kt.buttons&MOUSE_BUTTON.RIGHT)===MOUSE_BUTTON.RIGHT?MOUSE_BUTTON.RIGHT:null;if(St!==null){const At=this._findPointerByMouseButton(St);At&&this._disposePointer(At)}if((kt.buttons&MOUSE_BUTTON.LEFT)===MOUSE_BUTTON.LEFT&&this._lockedPointer)return;const Tt={pointerId:kt.pointerId,clientX:kt.clientX,clientY:kt.clientY,deltaX:0,deltaY:0,mouseButton:St};this._activePointers.push(Tt),this._domElement.ownerDocument.removeEventListener("pointermove",lt,{passive:!1}),this._domElement.ownerDocument.removeEventListener("pointerup",ut),this._domElement.ownerDocument.addEventListener("pointermove",lt,{passive:!1}),this._domElement.ownerDocument.addEventListener("pointerup",ut),this._isDragging=!0,gt(kt)},st=kt=>{if(!this._enabled||!this._domElement||this._lockedPointer)return;if(this._interactiveArea.left!==0||this._interactiveArea.top!==0||this._interactiveArea.width!==1||this._interactiveArea.height!==1){const At=this._domElement.getBoundingClientRect(),Et=kt.clientX/At.width,$t=kt.clientY/At.height;if(Etthis._interactiveArea.right||$tthis._interactiveArea.bottom)return}const St=(kt.buttons&MOUSE_BUTTON.LEFT)===MOUSE_BUTTON.LEFT?MOUSE_BUTTON.LEFT:(kt.buttons&MOUSE_BUTTON.MIDDLE)===MOUSE_BUTTON.MIDDLE?MOUSE_BUTTON.MIDDLE:(kt.buttons&MOUSE_BUTTON.RIGHT)===MOUSE_BUTTON.RIGHT?MOUSE_BUTTON.RIGHT:null;if(St!==null){const At=this._findPointerByMouseButton(St);At&&this._disposePointer(At)}const Tt={pointerId:1,clientX:kt.clientX,clientY:kt.clientY,deltaX:0,deltaY:0,mouseButton:(kt.buttons&MOUSE_BUTTON.LEFT)===MOUSE_BUTTON.LEFT?MOUSE_BUTTON.LEFT:(kt.buttons&MOUSE_BUTTON.MIDDLE)===MOUSE_BUTTON.LEFT?MOUSE_BUTTON.MIDDLE:(kt.buttons&MOUSE_BUTTON.RIGHT)===MOUSE_BUTTON.LEFT?MOUSE_BUTTON.RIGHT:null};this._activePointers.push(Tt),this._domElement.ownerDocument.removeEventListener("mousemove",ct),this._domElement.ownerDocument.removeEventListener("mouseup",ht),this._domElement.ownerDocument.addEventListener("mousemove",ct),this._domElement.ownerDocument.addEventListener("mouseup",ht),this._isDragging=!0,gt(kt)},lt=kt=>{kt.cancelable&&kt.preventDefault();const St=kt.pointerId,Tt=this._lockedPointer||this._findPointerById(St);if(Tt){if(Tt.clientX=kt.clientX,Tt.clientY=kt.clientY,Tt.deltaX=kt.movementX,Tt.deltaY=kt.movementY,this._state=0,kt.pointerType==="touch")switch(this._activePointers.length){case 1:this._state=this.touches.one;break;case 2:this._state=this.touches.two;break;case 3:this._state=this.touches.three;break}else(!this._isDragging&&this._lockedPointer||this._isDragging&&(kt.buttons&MOUSE_BUTTON.LEFT)===MOUSE_BUTTON.LEFT)&&(this._state=this._state|this.mouseButtons.left),this._isDragging&&(kt.buttons&MOUSE_BUTTON.MIDDLE)===MOUSE_BUTTON.MIDDLE&&(this._state=this._state|this.mouseButtons.middle),this._isDragging&&(kt.buttons&MOUSE_BUTTON.RIGHT)===MOUSE_BUTTON.RIGHT&&(this._state=this._state|this.mouseButtons.right);yt()}},ct=kt=>{const St=this._lockedPointer||this._findPointerById(1);St&&(St.clientX=kt.clientX,St.clientY=kt.clientY,St.deltaX=kt.movementX,St.deltaY=kt.movementY,this._state=0,(this._lockedPointer||(kt.buttons&MOUSE_BUTTON.LEFT)===MOUSE_BUTTON.LEFT)&&(this._state=this._state|this.mouseButtons.left),(kt.buttons&MOUSE_BUTTON.MIDDLE)===MOUSE_BUTTON.MIDDLE&&(this._state=this._state|this.mouseButtons.middle),(kt.buttons&MOUSE_BUTTON.RIGHT)===MOUSE_BUTTON.RIGHT&&(this._state=this._state|this.mouseButtons.right),yt())},ut=kt=>{const St=this._findPointerById(kt.pointerId);if(!(St&&St===this._lockedPointer)){if(St&&this._disposePointer(St),kt.pointerType==="touch")switch(this._activePointers.length){case 0:this._state=ACTION.NONE;break;case 1:this._state=this.touches.one;break;case 2:this._state=this.touches.two;break;case 3:this._state=this.touches.three;break}else this._state=ACTION.NONE;bt()}},ht=()=>{const kt=this._findPointerById(1);kt&&kt===this._lockedPointer||(kt&&this._disposePointer(kt),this._state=ACTION.NONE,bt())};let dt=-1;const pt=kt=>{if(!this._domElement||!this._enabled||this.mouseButtons.wheel===ACTION.NONE)return;if(this._interactiveArea.left!==0||this._interactiveArea.top!==0||this._interactiveArea.width!==1||this._interactiveArea.height!==1){const $t=this._domElement.getBoundingClientRect(),Dt=kt.clientX/$t.width,jt=kt.clientY/$t.height;if(Dtthis._interactiveArea.right||jtthis._interactiveArea.bottom)return}if(kt.preventDefault(),this.dollyToCursor||this.mouseButtons.wheel===ACTION.ROTATE||this.mouseButtons.wheel===ACTION.TRUCK){const $t=performance.now();dt-$t<1e3&&this._getClientRect(this._elementRect),dt=$t}const St=isMac?-1:-3,Tt=kt.deltaMode===1?kt.deltaY/St:kt.deltaY/(St*10),At=this.dollyToCursor?(kt.clientX-this._elementRect.x)/this._elementRect.width*2-1:0,Et=this.dollyToCursor?(kt.clientY-this._elementRect.y)/this._elementRect.height*-2+1:0;switch(this.mouseButtons.wheel){case ACTION.ROTATE:{this._rotateInternal(kt.deltaX,kt.deltaY),this._isUserControllingRotate=!0;break}case ACTION.TRUCK:{this._truckInternal(kt.deltaX,kt.deltaY,!1),this._isUserControllingTruck=!0;break}case ACTION.OFFSET:{this._truckInternal(kt.deltaX,kt.deltaY,!0),this._isUserControllingOffset=!0;break}case ACTION.DOLLY:{this._dollyInternal(-Tt,At,Et),this._isUserControllingDolly=!0;break}case ACTION.ZOOM:{this._zoomInternal(-Tt,At,Et),this._isUserControllingZoom=!0;break}}this.dispatchEvent({type:"control"})},mt=kt=>{if(!(!this._domElement||!this._enabled)){if(this.mouseButtons.right===y1.ACTION.NONE){const St=kt instanceof PointerEvent?kt.pointerId:(kt instanceof MouseEvent,0),Tt=this._findPointerById(St);Tt&&this._disposePointer(Tt),this._domElement.ownerDocument.removeEventListener("pointermove",lt,{passive:!1}),this._domElement.ownerDocument.removeEventListener("pointerup",ut),this._domElement.ownerDocument.removeEventListener("mousemove",ct),this._domElement.ownerDocument.removeEventListener("mouseup",ht);return}kt.preventDefault()}},gt=kt=>{if(!this._enabled)return;if(extractClientCoordFromEvent(this._activePointers,_v2),this._getClientRect(this._elementRect),rt.copy(_v2),it.copy(_v2),this._activePointers.length>=2){const Tt=_v2.x-this._activePointers[1].clientX,At=_v2.y-this._activePointers[1].clientY,Et=Math.sqrt(Tt*Tt+At*At);ot.set(0,Et);const $t=(this._activePointers[0].clientX+this._activePointers[1].clientX)*.5,Dt=(this._activePointers[0].clientY+this._activePointers[1].clientY)*.5;it.set($t,Dt)}if(this._state=0,!kt)this._lockedPointer&&(this._state=this._state|this.mouseButtons.left);else if("pointerType"in kt&&kt.pointerType==="touch")switch(this._activePointers.length){case 1:this._state=this.touches.one;break;case 2:this._state=this.touches.two;break;case 3:this._state=this.touches.three;break}else!this._lockedPointer&&(kt.buttons&MOUSE_BUTTON.LEFT)===MOUSE_BUTTON.LEFT&&(this._state=this._state|this.mouseButtons.left),(kt.buttons&MOUSE_BUTTON.MIDDLE)===MOUSE_BUTTON.MIDDLE&&(this._state=this._state|this.mouseButtons.middle),(kt.buttons&MOUSE_BUTTON.RIGHT)===MOUSE_BUTTON.RIGHT&&(this._state=this._state|this.mouseButtons.right);((this._state&ACTION.ROTATE)===ACTION.ROTATE||(this._state&ACTION.TOUCH_ROTATE)===ACTION.TOUCH_ROTATE||(this._state&ACTION.TOUCH_DOLLY_ROTATE)===ACTION.TOUCH_DOLLY_ROTATE||(this._state&ACTION.TOUCH_ZOOM_ROTATE)===ACTION.TOUCH_ZOOM_ROTATE)&&(this._sphericalEnd.theta=this._spherical.theta,this._sphericalEnd.phi=this._spherical.phi,this._thetaVelocity.value=0,this._phiVelocity.value=0),((this._state&ACTION.TRUCK)===ACTION.TRUCK||(this._state&ACTION.TOUCH_TRUCK)===ACTION.TOUCH_TRUCK||(this._state&ACTION.TOUCH_DOLLY_TRUCK)===ACTION.TOUCH_DOLLY_TRUCK||(this._state&ACTION.TOUCH_ZOOM_TRUCK)===ACTION.TOUCH_ZOOM_TRUCK)&&(this._targetEnd.copy(this._target),this._targetVelocity.set(0,0,0)),((this._state&ACTION.DOLLY)===ACTION.DOLLY||(this._state&ACTION.TOUCH_DOLLY)===ACTION.TOUCH_DOLLY||(this._state&ACTION.TOUCH_DOLLY_TRUCK)===ACTION.TOUCH_DOLLY_TRUCK||(this._state&ACTION.TOUCH_DOLLY_OFFSET)===ACTION.TOUCH_DOLLY_OFFSET||(this._state&ACTION.TOUCH_DOLLY_ROTATE)===ACTION.TOUCH_DOLLY_ROTATE)&&(this._sphericalEnd.radius=this._spherical.radius,this._radiusVelocity.value=0),((this._state&ACTION.ZOOM)===ACTION.ZOOM||(this._state&ACTION.TOUCH_ZOOM)===ACTION.TOUCH_ZOOM||(this._state&ACTION.TOUCH_ZOOM_TRUCK)===ACTION.TOUCH_ZOOM_TRUCK||(this._state&ACTION.TOUCH_ZOOM_OFFSET)===ACTION.TOUCH_ZOOM_OFFSET||(this._state&ACTION.TOUCH_ZOOM_ROTATE)===ACTION.TOUCH_ZOOM_ROTATE)&&(this._zoomEnd=this._zoom,this._zoomVelocity.value=0),((this._state&ACTION.OFFSET)===ACTION.OFFSET||(this._state&ACTION.TOUCH_OFFSET)===ACTION.TOUCH_OFFSET||(this._state&ACTION.TOUCH_DOLLY_OFFSET)===ACTION.TOUCH_DOLLY_OFFSET||(this._state&ACTION.TOUCH_ZOOM_OFFSET)===ACTION.TOUCH_ZOOM_OFFSET)&&(this._focalOffsetEnd.copy(this._focalOffset),this._focalOffsetVelocity.set(0,0,0)),this.dispatchEvent({type:"controlstart"})},yt=()=>{if(!this._enabled)return;extractClientCoordFromEvent(this._activePointers,_v2);const St=this._domElement&&document.pointerLockElement===this._domElement?this._lockedPointer||this._activePointers[0]:null,Tt=St?-St.deltaX:it.x-_v2.x,At=St?-St.deltaY:it.y-_v2.y;if(it.copy(_v2),((this._state&ACTION.ROTATE)===ACTION.ROTATE||(this._state&ACTION.TOUCH_ROTATE)===ACTION.TOUCH_ROTATE||(this._state&ACTION.TOUCH_DOLLY_ROTATE)===ACTION.TOUCH_DOLLY_ROTATE||(this._state&ACTION.TOUCH_ZOOM_ROTATE)===ACTION.TOUCH_ZOOM_ROTATE)&&(this._rotateInternal(Tt,At),this._isUserControllingRotate=!0),(this._state&ACTION.DOLLY)===ACTION.DOLLY||(this._state&ACTION.ZOOM)===ACTION.ZOOM){const Et=this.dollyToCursor?(rt.x-this._elementRect.x)/this._elementRect.width*2-1:0,$t=this.dollyToCursor?(rt.y-this._elementRect.y)/this._elementRect.height*-2+1:0,Dt=this.dollyDragInverted?-1:1;(this._state&ACTION.DOLLY)===ACTION.DOLLY?(this._dollyInternal(Dt*At*TOUCH_DOLLY_FACTOR,Et,$t),this._isUserControllingDolly=!0):(this._zoomInternal(Dt*At*TOUCH_DOLLY_FACTOR,Et,$t),this._isUserControllingZoom=!0)}if((this._state&ACTION.TOUCH_DOLLY)===ACTION.TOUCH_DOLLY||(this._state&ACTION.TOUCH_ZOOM)===ACTION.TOUCH_ZOOM||(this._state&ACTION.TOUCH_DOLLY_TRUCK)===ACTION.TOUCH_DOLLY_TRUCK||(this._state&ACTION.TOUCH_ZOOM_TRUCK)===ACTION.TOUCH_ZOOM_TRUCK||(this._state&ACTION.TOUCH_DOLLY_OFFSET)===ACTION.TOUCH_DOLLY_OFFSET||(this._state&ACTION.TOUCH_ZOOM_OFFSET)===ACTION.TOUCH_ZOOM_OFFSET||(this._state&ACTION.TOUCH_DOLLY_ROTATE)===ACTION.TOUCH_DOLLY_ROTATE||(this._state&ACTION.TOUCH_ZOOM_ROTATE)===ACTION.TOUCH_ZOOM_ROTATE){const Et=_v2.x-this._activePointers[1].clientX,$t=_v2.y-this._activePointers[1].clientY,Dt=Math.sqrt(Et*Et+$t*$t),jt=ot.y-Dt;ot.set(0,Dt);const Pt=this.dollyToCursor?(it.x-this._elementRect.x)/this._elementRect.width*2-1:0,Ct=this.dollyToCursor?(it.y-this._elementRect.y)/this._elementRect.height*-2+1:0;(this._state&ACTION.TOUCH_DOLLY)===ACTION.TOUCH_DOLLY||(this._state&ACTION.TOUCH_DOLLY_ROTATE)===ACTION.TOUCH_DOLLY_ROTATE||(this._state&ACTION.TOUCH_DOLLY_TRUCK)===ACTION.TOUCH_DOLLY_TRUCK||(this._state&ACTION.TOUCH_DOLLY_OFFSET)===ACTION.TOUCH_DOLLY_OFFSET?(this._dollyInternal(jt*TOUCH_DOLLY_FACTOR,Pt,Ct),this._isUserControllingDolly=!0):(this._zoomInternal(jt*TOUCH_DOLLY_FACTOR,Pt,Ct),this._isUserControllingZoom=!0)}((this._state&ACTION.TRUCK)===ACTION.TRUCK||(this._state&ACTION.TOUCH_TRUCK)===ACTION.TOUCH_TRUCK||(this._state&ACTION.TOUCH_DOLLY_TRUCK)===ACTION.TOUCH_DOLLY_TRUCK||(this._state&ACTION.TOUCH_ZOOM_TRUCK)===ACTION.TOUCH_ZOOM_TRUCK)&&(this._truckInternal(Tt,At,!1),this._isUserControllingTruck=!0),((this._state&ACTION.OFFSET)===ACTION.OFFSET||(this._state&ACTION.TOUCH_OFFSET)===ACTION.TOUCH_OFFSET||(this._state&ACTION.TOUCH_DOLLY_OFFSET)===ACTION.TOUCH_DOLLY_OFFSET||(this._state&ACTION.TOUCH_ZOOM_OFFSET)===ACTION.TOUCH_ZOOM_OFFSET)&&(this._truckInternal(Tt,At,!0),this._isUserControllingOffset=!0),this.dispatchEvent({type:"control"})},bt=()=>{extractClientCoordFromEvent(this._activePointers,_v2),it.copy(_v2),(this._activePointers.length===0||this._activePointers.length===1&&this._activePointers[0]===this._lockedPointer)&&(this._isDragging=!1),this._activePointers.length===0&&this._domElement&&(this._domElement.ownerDocument.removeEventListener("pointermove",lt,{passive:!1}),this._domElement.ownerDocument.removeEventListener("mousemove",ct),this._domElement.ownerDocument.removeEventListener("pointerup",ut),this._domElement.ownerDocument.removeEventListener("mouseup",ht),this.dispatchEvent({type:"controlend"}))};this.lockPointer=()=>{!this._enabled||!this._domElement||(this.cancel(),this._lockedPointer={pointerId:-1,clientX:0,clientY:0,deltaX:0,deltaY:0,mouseButton:null},this._activePointers.push(this._lockedPointer),this._domElement.ownerDocument.removeEventListener("pointermove",lt,{passive:!1}),this._domElement.ownerDocument.removeEventListener("pointerup",ut),this._domElement.requestPointerLock(),this._domElement.ownerDocument.addEventListener("pointerlockchange",vt),this._domElement.ownerDocument.addEventListener("pointerlockerror",xt),this._domElement.ownerDocument.addEventListener("pointermove",lt,{passive:!1}),this._domElement.ownerDocument.addEventListener("pointerup",ut),gt())},this.unlockPointer=()=>{this._lockedPointer!==null&&(this._disposePointer(this._lockedPointer),this._lockedPointer=null),document.exitPointerLock(),this.cancel(),this._domElement&&(this._domElement.ownerDocument.removeEventListener("pointerlockchange",vt),this._domElement.ownerDocument.removeEventListener("pointerlockerror",xt))};const vt=()=>{this._domElement&&this._domElement.ownerDocument.pointerLockElement===this._domElement||this.unlockPointer()},xt=()=>{this.unlockPointer()};this._addAllEventListeners=kt=>{this._domElement=kt,this._domElement.style.touchAction="none",this._domElement.style.userSelect="none",this._domElement.style.webkitUserSelect="none",this._domElement.addEventListener("pointerdown",at),isPointerEventsNotSupported&&this._domElement.addEventListener("mousedown",st),this._domElement.addEventListener("pointercancel",ut),this._domElement.addEventListener("wheel",pt,{passive:!1}),this._domElement.addEventListener("contextmenu",mt)},this._removeAllEventListeners=()=>{this._domElement&&(this._domElement.style.touchAction="",this._domElement.style.userSelect="",this._domElement.style.webkitUserSelect="",this._domElement.removeEventListener("pointerdown",at),this._domElement.removeEventListener("mousedown",st),this._domElement.removeEventListener("pointercancel",ut),this._domElement.removeEventListener("wheel",pt,{passive:!1}),this._domElement.removeEventListener("contextmenu",mt),this._domElement.ownerDocument.removeEventListener("pointermove",lt,{passive:!1}),this._domElement.ownerDocument.removeEventListener("mousemove",ct),this._domElement.ownerDocument.removeEventListener("pointerup",ut),this._domElement.ownerDocument.removeEventListener("mouseup",ht),this._domElement.ownerDocument.removeEventListener("pointerlockchange",vt),this._domElement.ownerDocument.removeEventListener("pointerlockerror",xt))},this.cancel=()=>{this._state!==ACTION.NONE&&(this._state=ACTION.NONE,this._activePointers.length=0,bt())},nt&&this.connect(nt),this.update(0)}get camera(){return this._camera}set camera(et){this._camera=et,this.updateCameraUp(),this._camera.updateProjectionMatrix(),this._updateNearPlaneCorners(),this._needsUpdate=!0}get enabled(){return this._enabled}set enabled(et){this._enabled=et,this._domElement&&(et?(this._domElement.style.touchAction="none",this._domElement.style.userSelect="none",this._domElement.style.webkitUserSelect="none"):(this.cancel(),this._domElement.style.touchAction="",this._domElement.style.userSelect="",this._domElement.style.webkitUserSelect=""))}get active(){return!this._hasRested}get currentAction(){return this._state}get distance(){return this._spherical.radius}set distance(et){this._spherical.radius===et&&this._sphericalEnd.radius===et||(this._spherical.radius=et,this._sphericalEnd.radius=et,this._needsUpdate=!0)}get azimuthAngle(){return this._spherical.theta}set azimuthAngle(et){this._spherical.theta===et&&this._sphericalEnd.theta===et||(this._spherical.theta=et,this._sphericalEnd.theta=et,this._needsUpdate=!0)}get polarAngle(){return this._spherical.phi}set polarAngle(et){this._spherical.phi===et&&this._sphericalEnd.phi===et||(this._spherical.phi=et,this._sphericalEnd.phi=et,this._needsUpdate=!0)}get boundaryEnclosesCamera(){return this._boundaryEnclosesCamera}set boundaryEnclosesCamera(et){this._boundaryEnclosesCamera=et,this._needsUpdate=!0}set interactiveArea(et){this._interactiveArea.width=clamp$4(et.width,0,1),this._interactiveArea.height=clamp$4(et.height,0,1),this._interactiveArea.x=clamp$4(et.x,0,1-this._interactiveArea.width),this._interactiveArea.y=clamp$4(et.x,0,1-this._interactiveArea.height)}addEventListener(et,nt){super.addEventListener(et,nt)}removeEventListener(et,nt){super.removeEventListener(et,nt)}rotate(et,nt,rt=!1){return this.rotateTo(this._sphericalEnd.theta+et,this._sphericalEnd.phi+nt,rt)}rotateAzimuthTo(et,nt=!1){return this.rotateTo(et,this._sphericalEnd.phi,nt)}rotatePolarTo(et,nt=!1){return this.rotateTo(this._sphericalEnd.theta,et,nt)}rotateTo(et,nt,rt=!1){this._isUserControllingRotate=!1;const it=clamp$4(et,this.minAzimuthAngle,this.maxAzimuthAngle),ot=clamp$4(nt,this.minPolarAngle,this.maxPolarAngle);this._sphericalEnd.theta=it,this._sphericalEnd.phi=ot,this._sphericalEnd.makeSafe(),this._needsUpdate=!0,rt||(this._spherical.theta=this._sphericalEnd.theta,this._spherical.phi=this._sphericalEnd.phi);const at=!rt||approxEquals(this._spherical.theta,this._sphericalEnd.theta,this.restThreshold)&&approxEquals(this._spherical.phi,this._sphericalEnd.phi,this.restThreshold);return this._createOnRestPromise(at)}dolly(et,nt=!1){return this.dollyTo(this._sphericalEnd.radius-et,nt)}dollyTo(et,nt=!1){return this._isUserControllingDolly=!1,this._lastDollyDirection=DOLLY_DIRECTION.NONE,this._changedDolly=0,this._dollyToNoClamp(clamp$4(et,this.minDistance,this.maxDistance),nt)}_dollyToNoClamp(et,nt=!1){const rt=this._sphericalEnd.radius;if(this.colliderMeshes.length>=1){const at=this._collisionTest(),st=approxEquals(at,this._spherical.radius);if(!(rt>et)&&st)return Promise.resolve();this._sphericalEnd.radius=Math.min(et,at)}else this._sphericalEnd.radius=et;this._needsUpdate=!0,nt||(this._spherical.radius=this._sphericalEnd.radius);const ot=!nt||approxEquals(this._spherical.radius,this._sphericalEnd.radius,this.restThreshold);return this._createOnRestPromise(ot)}dollyInFixed(et,nt=!1){this._targetEnd.add(this._getCameraDirection(_cameraDirection).multiplyScalar(et)),nt||this._target.copy(this._targetEnd);const rt=!nt||approxEquals(this._target.x,this._targetEnd.x,this.restThreshold)&&approxEquals(this._target.y,this._targetEnd.y,this.restThreshold)&&approxEquals(this._target.z,this._targetEnd.z,this.restThreshold);return this._createOnRestPromise(rt)}zoom(et,nt=!1){return this.zoomTo(this._zoomEnd+et,nt)}zoomTo(et,nt=!1){this._isUserControllingZoom=!1,this._zoomEnd=clamp$4(et,this.minZoom,this.maxZoom),this._needsUpdate=!0,nt||(this._zoom=this._zoomEnd);const rt=!nt||approxEquals(this._zoom,this._zoomEnd,this.restThreshold);return this._changedZoom=0,this._createOnRestPromise(rt)}pan(et,nt,rt=!1){return console.warn("`pan` has been renamed to `truck`"),this.truck(et,nt,rt)}truck(et,nt,rt=!1){this._camera.updateMatrix(),_xColumn.setFromMatrixColumn(this._camera.matrix,0),_yColumn.setFromMatrixColumn(this._camera.matrix,1),_xColumn.multiplyScalar(et),_yColumn.multiplyScalar(-nt);const it=_v3A.copy(_xColumn).add(_yColumn),ot=_v3B.copy(this._targetEnd).add(it);return this.moveTo(ot.x,ot.y,ot.z,rt)}forward(et,nt=!1){_v3A.setFromMatrixColumn(this._camera.matrix,0),_v3A.crossVectors(this._camera.up,_v3A),_v3A.multiplyScalar(et);const rt=_v3B.copy(this._targetEnd).add(_v3A);return this.moveTo(rt.x,rt.y,rt.z,nt)}elevate(et,nt=!1){return _v3A.copy(this._camera.up).multiplyScalar(et),this.moveTo(this._targetEnd.x+_v3A.x,this._targetEnd.y+_v3A.y,this._targetEnd.z+_v3A.z,nt)}moveTo(et,nt,rt,it=!1){this._isUserControllingTruck=!1;const ot=_v3A.set(et,nt,rt).sub(this._targetEnd);this._encloseToBoundary(this._targetEnd,ot,this.boundaryFriction),this._needsUpdate=!0,it||this._target.copy(this._targetEnd);const at=!it||approxEquals(this._target.x,this._targetEnd.x,this.restThreshold)&&approxEquals(this._target.y,this._targetEnd.y,this.restThreshold)&&approxEquals(this._target.z,this._targetEnd.z,this.restThreshold);return this._createOnRestPromise(at)}lookInDirectionOf(et,nt,rt,it=!1){const st=_v3A.set(et,nt,rt).sub(this._targetEnd).normalize().multiplyScalar(-this._sphericalEnd.radius);return this.setPosition(st.x,st.y,st.z,it)}fitToBox(et,nt,{cover:rt=!1,paddingLeft:it=0,paddingRight:ot=0,paddingBottom:at=0,paddingTop:st=0}={}){const lt=[],ct=et.isBox3?_box3A.copy(et):_box3A.setFromObject(et);ct.isEmpty()&&(console.warn("camera-controls: fitTo() cannot be used with an empty box. Aborting"),Promise.resolve());const ut=roundToStep(this._sphericalEnd.theta,PI_HALF),ht=roundToStep(this._sphericalEnd.phi,PI_HALF);lt.push(this.rotateTo(ut,ht,nt));const dt=_v3A.setFromSpherical(this._sphericalEnd).normalize(),pt=_quaternionA.setFromUnitVectors(dt,_AXIS_Z),mt=approxEquals(Math.abs(dt.y),1);mt&&pt.multiply(_quaternionB.setFromAxisAngle(_AXIS_Y,ut)),pt.multiply(this._yAxisUpSpaceInverse);const gt=_box3B.makeEmpty();_v3B.copy(ct.min).applyQuaternion(pt),gt.expandByPoint(_v3B),_v3B.copy(ct.min).setX(ct.max.x).applyQuaternion(pt),gt.expandByPoint(_v3B),_v3B.copy(ct.min).setY(ct.max.y).applyQuaternion(pt),gt.expandByPoint(_v3B),_v3B.copy(ct.max).setZ(ct.min.z).applyQuaternion(pt),gt.expandByPoint(_v3B),_v3B.copy(ct.min).setZ(ct.max.z).applyQuaternion(pt),gt.expandByPoint(_v3B),_v3B.copy(ct.max).setY(ct.min.y).applyQuaternion(pt),gt.expandByPoint(_v3B),_v3B.copy(ct.max).setX(ct.min.x).applyQuaternion(pt),gt.expandByPoint(_v3B),_v3B.copy(ct.max).applyQuaternion(pt),gt.expandByPoint(_v3B),gt.min.x-=it,gt.min.y-=at,gt.max.x+=ot,gt.max.y+=st,pt.setFromUnitVectors(_AXIS_Z,dt),mt&&pt.premultiply(_quaternionB.invert()),pt.premultiply(this._yAxisUpSpace);const yt=gt.getSize(_v3A),bt=gt.getCenter(_v3B).applyQuaternion(pt);if(isPerspectiveCamera(this._camera)){const vt=this.getDistanceToFitBox(yt.x,yt.y,yt.z,rt);lt.push(this.moveTo(bt.x,bt.y,bt.z,nt)),lt.push(this.dollyTo(vt,nt)),lt.push(this.setFocalOffset(0,0,0,nt))}else if(isOrthographicCamera(this._camera)){const vt=this._camera,xt=vt.right-vt.left,kt=vt.top-vt.bottom,St=rt?Math.max(xt/yt.x,kt/yt.y):Math.min(xt/yt.x,kt/yt.y);lt.push(this.moveTo(bt.x,bt.y,bt.z,nt)),lt.push(this.zoomTo(St,nt)),lt.push(this.setFocalOffset(0,0,0,nt))}return Promise.all(lt)}fitToSphere(et,nt){const rt=[],ot=et instanceof THREE.Sphere?_sphere.copy(et):y1.createBoundingSphere(et,_sphere);if(rt.push(this.moveTo(ot.center.x,ot.center.y,ot.center.z,nt)),isPerspectiveCamera(this._camera)){const at=this.getDistanceToFitSphere(ot.radius);rt.push(this.dollyTo(at,nt))}else if(isOrthographicCamera(this._camera)){const at=this._camera.right-this._camera.left,st=this._camera.top-this._camera.bottom,lt=2*ot.radius,ct=Math.min(at/lt,st/lt);rt.push(this.zoomTo(ct,nt))}return rt.push(this.setFocalOffset(0,0,0,nt)),Promise.all(rt)}setLookAt(et,nt,rt,it,ot,at,st=!1){this._isUserControllingRotate=!1,this._isUserControllingDolly=!1,this._isUserControllingTruck=!1,this._lastDollyDirection=DOLLY_DIRECTION.NONE,this._changedDolly=0;const lt=_v3B.set(it,ot,at),ct=_v3A.set(et,nt,rt);this._targetEnd.copy(lt),this._sphericalEnd.setFromVector3(ct.sub(lt).applyQuaternion(this._yAxisUpSpace)),this.normalizeRotations(),this._needsUpdate=!0,st||(this._target.copy(this._targetEnd),this._spherical.copy(this._sphericalEnd));const ut=!st||approxEquals(this._target.x,this._targetEnd.x,this.restThreshold)&&approxEquals(this._target.y,this._targetEnd.y,this.restThreshold)&&approxEquals(this._target.z,this._targetEnd.z,this.restThreshold)&&approxEquals(this._spherical.theta,this._sphericalEnd.theta,this.restThreshold)&&approxEquals(this._spherical.phi,this._sphericalEnd.phi,this.restThreshold)&&approxEquals(this._spherical.radius,this._sphericalEnd.radius,this.restThreshold);return this._createOnRestPromise(ut)}lerpLookAt(et,nt,rt,it,ot,at,st,lt,ct,ut,ht,dt,pt,mt=!1){this._isUserControllingRotate=!1,this._isUserControllingDolly=!1,this._isUserControllingTruck=!1,this._lastDollyDirection=DOLLY_DIRECTION.NONE,this._changedDolly=0;const gt=_v3A.set(it,ot,at),yt=_v3B.set(et,nt,rt);_sphericalA.setFromVector3(yt.sub(gt).applyQuaternion(this._yAxisUpSpace));const bt=_v3C.set(ut,ht,dt),vt=_v3B.set(st,lt,ct);_sphericalB.setFromVector3(vt.sub(bt).applyQuaternion(this._yAxisUpSpace)),this._targetEnd.copy(gt.lerp(bt,pt));const xt=_sphericalB.theta-_sphericalA.theta,kt=_sphericalB.phi-_sphericalA.phi,St=_sphericalB.radius-_sphericalA.radius;this._sphericalEnd.set(_sphericalA.radius+St*pt,_sphericalA.phi+kt*pt,_sphericalA.theta+xt*pt),this.normalizeRotations(),this._needsUpdate=!0,mt||(this._target.copy(this._targetEnd),this._spherical.copy(this._sphericalEnd));const Tt=!mt||approxEquals(this._target.x,this._targetEnd.x,this.restThreshold)&&approxEquals(this._target.y,this._targetEnd.y,this.restThreshold)&&approxEquals(this._target.z,this._targetEnd.z,this.restThreshold)&&approxEquals(this._spherical.theta,this._sphericalEnd.theta,this.restThreshold)&&approxEquals(this._spherical.phi,this._sphericalEnd.phi,this.restThreshold)&&approxEquals(this._spherical.radius,this._sphericalEnd.radius,this.restThreshold);return this._createOnRestPromise(Tt)}setPosition(et,nt,rt,it=!1){return this.setLookAt(et,nt,rt,this._targetEnd.x,this._targetEnd.y,this._targetEnd.z,it)}setTarget(et,nt,rt,it=!1){const ot=this.getPosition(_v3A),at=this.setLookAt(ot.x,ot.y,ot.z,et,nt,rt,it);return this._sphericalEnd.phi=clamp$4(this._sphericalEnd.phi,this.minPolarAngle,this.maxPolarAngle),at}setFocalOffset(et,nt,rt,it=!1){this._isUserControllingOffset=!1,this._focalOffsetEnd.set(et,nt,rt),this._needsUpdate=!0,it||this._focalOffset.copy(this._focalOffsetEnd);const ot=!it||approxEquals(this._focalOffset.x,this._focalOffsetEnd.x,this.restThreshold)&&approxEquals(this._focalOffset.y,this._focalOffsetEnd.y,this.restThreshold)&&approxEquals(this._focalOffset.z,this._focalOffsetEnd.z,this.restThreshold);return this._createOnRestPromise(ot)}setOrbitPoint(et,nt,rt){this._camera.updateMatrixWorld(),_xColumn.setFromMatrixColumn(this._camera.matrixWorldInverse,0),_yColumn.setFromMatrixColumn(this._camera.matrixWorldInverse,1),_zColumn.setFromMatrixColumn(this._camera.matrixWorldInverse,2);const it=_v3A.set(et,nt,rt),ot=it.distanceTo(this._camera.position),at=it.sub(this._camera.position);_xColumn.multiplyScalar(at.x),_yColumn.multiplyScalar(at.y),_zColumn.multiplyScalar(at.z),_v3A.copy(_xColumn).add(_yColumn).add(_zColumn),_v3A.z=_v3A.z+ot,this.dollyTo(ot,!1),this.setFocalOffset(-_v3A.x,_v3A.y,-_v3A.z,!1),this.moveTo(et,nt,rt,!1)}setBoundary(et){if(!et){this._boundary.min.set(-1/0,-1/0,-1/0),this._boundary.max.set(1/0,1/0,1/0),this._needsUpdate=!0;return}this._boundary.copy(et),this._boundary.clampPoint(this._targetEnd,this._targetEnd),this._needsUpdate=!0}setViewport(et,nt,rt,it){if(et===null){this._viewport=null;return}this._viewport=this._viewport||new THREE.Vector4,typeof et=="number"?this._viewport.set(et,nt,rt,it):this._viewport.copy(et)}getDistanceToFitBox(et,nt,rt,it=!1){if(notSupportedInOrthographicCamera(this._camera,"getDistanceToFitBox"))return this._spherical.radius;const ot=et/nt,at=this._camera.getEffectiveFOV()*DEG2RAD,st=this._camera.aspect;return((it?ot>st:otnt.pointerId===et)}_findPointerByMouseButton(et){return this._activePointers.find(nt=>nt.mouseButton===et)}_disposePointer(et){this._activePointers.splice(this._activePointers.indexOf(et),1)}_encloseToBoundary(et,nt,rt){const it=nt.lengthSq();if(it===0)return et;const ot=_v3B.copy(nt).add(et),st=this._boundary.clampPoint(ot,_v3C).sub(ot),lt=st.lengthSq();if(lt===0)return et.add(nt);if(lt===it)return et;if(rt===0)return et.add(nt).add(st);{const ct=1+rt*lt/nt.dot(st);return et.add(_v3B.copy(nt).multiplyScalar(ct)).add(st.multiplyScalar(1-rt))}}_updateNearPlaneCorners(){if(isPerspectiveCamera(this._camera)){const et=this._camera,nt=et.near,rt=et.getEffectiveFOV()*DEG2RAD,it=Math.tan(rt*.5)*nt,ot=it*et.aspect;this._nearPlaneCorners[0].set(-ot,-it,0),this._nearPlaneCorners[1].set(ot,-it,0),this._nearPlaneCorners[2].set(ot,it,0),this._nearPlaneCorners[3].set(-ot,it,0)}else if(isOrthographicCamera(this._camera)){const et=this._camera,nt=1/et.zoom,rt=et.left*nt,it=et.right*nt,ot=et.top*nt,at=et.bottom*nt;this._nearPlaneCorners[0].set(rt,ot,0),this._nearPlaneCorners[1].set(it,ot,0),this._nearPlaneCorners[2].set(it,at,0),this._nearPlaneCorners[3].set(rt,at,0)}}_collisionTest(){let et=1/0;if(!(this.colliderMeshes.length>=1)||notSupportedInOrthographicCamera(this._camera,"_collisionTest"))return et;const rt=this._getTargetDirection(_cameraDirection);_rotationMatrix.lookAt(_ORIGIN,rt,this._camera.up);for(let it=0;it<4;it++){const ot=_v3B.copy(this._nearPlaneCorners[it]);ot.applyMatrix4(_rotationMatrix);const at=_v3C.addVectors(this._target,ot);_raycaster.set(at,rt),_raycaster.far=this._spherical.radius+1;const st=_raycaster.intersectObjects(this.colliderMeshes);st.length!==0&&st[0].distance{const rt=()=>{this.removeEventListener("rest",rt),nt()};this.addEventListener("rest",rt)}))}_addAllEventListeners(et){}_removeAllEventListeners(){}get dampingFactor(){return console.warn(".dampingFactor has been deprecated. use smoothTime (in seconds) instead."),0}set dampingFactor(et){console.warn(".dampingFactor has been deprecated. use smoothTime (in seconds) instead.")}get draggingDampingFactor(){return console.warn(".draggingDampingFactor has been deprecated. use draggingSmoothTime (in seconds) instead."),0}set draggingDampingFactor(et){console.warn(".draggingDampingFactor has been deprecated. use draggingSmoothTime (in seconds) instead.")}static createBoundingSphere(et,nt=new THREE.Sphere){const rt=nt,it=rt.center;_box3A.makeEmpty(),et.traverseVisible(at=>{at.isMesh&&_box3A.expandByObject(at)}),_box3A.getCenter(it);let ot=0;return et.traverseVisible(at=>{if(!at.isMesh)return;const st=at,lt=st.geometry.clone();lt.applyMatrix4(st.matrixWorld);const ut=lt.attributes.position;for(let ht=0,dt=ut.count;ht{reactExports.useMemo(()=>{CameraControls$1.install({THREE:THREE$1}),extend$2({CameraControlsImpl:CameraControls$1})},[]);const{camera:nt,domElement:rt,makeDefault:it,onStart:ot,onEnd:at,onChange:st,regress:lt,...ct}=tt,ut=useThree(St=>St.camera),ht=useThree(St=>St.gl),dt=useThree(St=>St.invalidate),pt=useThree(St=>St.events),mt=useThree(St=>St.setEvents),gt=useThree(St=>St.set),yt=useThree(St=>St.get),bt=useThree(St=>St.performance),vt=nt||ut,xt=rt||pt.connected||ht.domElement,kt=reactExports.useMemo(()=>new CameraControls$1(vt),[vt]);return useFrame((St,Tt)=>{kt.enabled&&kt.update(Tt)},-1),reactExports.useEffect(()=>(kt.connect(xt),()=>void kt.disconnect()),[xt,kt]),reactExports.useEffect(()=>{const St=Et=>{dt(),lt&&bt.regress(),st&&st(Et)},Tt=Et=>{ot&&ot(Et)},At=Et=>{at&&at(Et)};return kt.addEventListener("update",St),kt.addEventListener("controlstart",Tt),kt.addEventListener("controlend",At),()=>{kt.removeEventListener("update",St),kt.removeEventListener("controlstart",Tt),kt.removeEventListener("controlend",At)}},[kt,ot,at,dt,mt,lt,st]),reactExports.useEffect(()=>{if(it){const St=yt().controls;return gt({controls:kt}),()=>gt({controls:St})}},[it,kt]),reactExports.createElement("primitive",_extends$u({ref:et,object:kt},ct))});PropTypes.func.isRequired,PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.element,PropTypes.func])).isRequired;const _instanceLocalMatrix=new Matrix4,_instanceWorldMatrix=new Matrix4,_instanceIntersects=[],_mesh=new Mesh;class PositionMesh extends Group{constructor(){super(),this.color=new Color$1("white"),this.instance={current:void 0},this.instanceKey={current:void 0}}get geometry(){var et;return(et=this.instance.current)==null?void 0:et.geometry}raycast(et,nt){const rt=this.instance.current;if(!rt||!rt.geometry||!rt.material)return;_mesh.geometry=rt.geometry;const it=rt.matrixWorld,ot=rt.userData.instances.indexOf(this.instanceKey);if(!(ot===-1||ot>rt.count)){rt.getMatrixAt(ot,_instanceLocalMatrix),_instanceWorldMatrix.multiplyMatrices(it,_instanceLocalMatrix),_mesh.matrixWorld=_instanceWorldMatrix,rt.material instanceof Material?_mesh.material.side=rt.material.side:_mesh.material.side=rt.material[0].side,_mesh.raycast(et,_instanceIntersects);for(let at=0,st=_instanceIntersects.length;at{reactExports.useMemo(()=>extend$2({PositionMesh}),[]);const it=reactExports.useRef(),{subscribe:ot,getParent:at}=reactExports.useContext(tt||globalContext$1);return reactExports.useLayoutEffect(()=>ot(it),[]),reactExports.createElement("positionMesh",_extends$u({instance:at(),instanceKey:it,ref:mergeRefs([rt,it])},nt),et)}),Instances=reactExports.forwardRef(({children:tt,range:et,limit:nt=1e3,frames:rt=1/0,...it},ot)=>{const[{context:at,instance:st}]=reactExports.useState(()=>{const yt=reactExports.createContext(null);return{context:yt,instance:reactExports.forwardRef((bt,vt)=>reactExports.createElement(Instance,_extends$u({context:yt},bt,{ref:vt})))}}),lt=reactExports.useRef(null),[ct,ut]=reactExports.useState([]),[[ht,dt]]=reactExports.useState(()=>{const yt=new Float32Array(nt*16);for(let bt=0;bt1))]});reactExports.useEffect(()=>{lt.current.instanceMatrix.needsUpdate=!0});let pt=0,mt=0;useFrame(()=>{if(rt===1/0||pt({getParent:()=>lt,subscribe:yt=>(ut(bt=>[...bt,yt]),()=>ut(bt=>bt.filter(vt=>vt.current!==yt.current)))}),[]);return reactExports.createElement("instancedMesh",_extends$u({userData:{instances:ct},matrixAutoUpdate:!1,ref:mergeRefs([ot,lt]),args:[null,null,0],raycast:()=>null},it),reactExports.createElement("instancedBufferAttribute",{attach:"instanceMatrix",count:ht.length/16,array:ht,itemSize:16,usage:DynamicDrawUsage}),reactExports.createElement("instancedBufferAttribute",{attach:"instanceColor",count:dt.length/3,array:dt,itemSize:3,usage:DynamicDrawUsage}),typeof tt=="function"?reactExports.createElement(at.Provider,{value:gt},tt(st)):reactExports.createElement(globalContext$1.Provider,{value:gt},tt))}),context=reactExports.createContext(null),Segments=reactExports.forwardRef((tt,et)=>{reactExports.useMemo(()=>extend$2({SegmentObject}),[]);const{limit:nt=1e3,lineWidth:rt=1,children:it,...ot}=tt,[at,st]=reactExports.useState([]),[lt]=reactExports.useState(()=>new Line2),[ct]=reactExports.useState(()=>new LineMaterial),[ut]=reactExports.useState(()=>new LineSegmentsGeometry),[ht]=reactExports.useState(()=>new Vector2(512,512)),[dt]=reactExports.useState(()=>Array(nt*6).fill(0)),[pt]=reactExports.useState(()=>Array(nt*6).fill(0)),mt=reactExports.useMemo(()=>({subscribe:gt=>(st(yt=>[...yt,gt]),()=>st(yt=>yt.filter(bt=>bt.current!==gt.current)))}),[]);return useFrame(()=>{for(let yt=0;yttt instanceof Vector3?tt:new Vector3(...typeof tt=="number"?[tt,tt,tt]:tt),Segment$1=reactExports.forwardRef(({color:tt,start:et,end:nt},rt)=>{const it=reactExports.useContext(context);if(!it)throw"Segment must used inside Segments component.";const ot=reactExports.useRef(null);return reactExports.useLayoutEffect(()=>it.subscribe(ot),[]),reactExports.createElement("segmentObject",{ref:mergeRefs([ot,rt]),color:tt,start:normPos(et),end:normPos(nt)})});function Preload({all:tt,scene:et,camera:nt}){const rt=useThree(({gl:at})=>at),it=useThree(({camera:at})=>at),ot=useThree(({scene:at})=>at);return reactExports.useLayoutEffect(()=>{const at=[];tt&&(et||ot).traverse(ct=>{ct.visible===!1&&(at.push(ct),ct.visible=!0)}),rt.compile(et||ot,nt||it);const st=new WebGLCubeRenderTarget(128);new CubeCamera(.01,1e5,st).update(rt,et||ot),st.dispose(),at.forEach(ct=>ct.visible=!1)},[]),null}function AdaptiveDpr({pixelated:tt}){const et=useThree(at=>at.gl),nt=useThree(at=>at.internal.active),rt=useThree(at=>at.performance.current),it=useThree(at=>at.viewport.initialDpr),ot=useThree(at=>at.setDpr);return reactExports.useEffect(()=>{const at=et.domElement;return()=>{nt&&ot(it),tt&&at&&(at.style.imageRendering="auto")}},[]),reactExports.useEffect(()=>{ot(rt*it),tt&&et.domElement&&(et.domElement.style.imageRendering=rt===1?"auto":"pixelated")},[rt]),null}function AdaptiveEvents(){const tt=useThree(rt=>rt.get),et=useThree(rt=>rt.setEvents),nt=useThree(rt=>rt.performance.current);return reactExports.useEffect(()=>{const rt=tt().events.enabled;return()=>et({enabled:rt})},[]),reactExports.useEffect(()=>et({enabled:nt===1}),[nt]),null}/** - * postprocessing v6.33.2 build Mon Oct 02 2023 - * https://github.com/pmndrs/postprocessing - * Copyright 2015-2023 Raoul van Rüschen - * @license Zlib - */var common_default="varying vec2 vUv;void main(){vUv=position.xy*0.5+0.5;gl_Position=vec4(position.xy,1.0,1.0);}",convolution_bokeh_default=`#ifdef FRAMEBUFFER_PRECISION_HIGH -uniform mediump sampler2D inputBuffer; +uniform float intensity;void mainImage(const in vec4 inputColor,const in vec2 uv,out vec4 outputColor){vec4 texel=texture2D(map,uv);outputColor=vec4(texel.rgb*intensity,texel.a);}`, + BloomEffect = class extends Effect$1 { + constructor({ + blendFunction: tt = BlendFunction.SCREEN, + luminanceThreshold: et = 0.9, + luminanceSmoothing: nt = 0.025, + mipmapBlur: rt = !1, + intensity: it = 1, + radius: ot = 0.85, + levels: at = 8, + kernelSize: st = KernelSize.LARGE, + resolutionScale: lt = 0.5, + width: ct = Resolution.AUTO_SIZE, + height: ut = Resolution.AUTO_SIZE, + resolutionX: ht = ct, + resolutionY: dt = ut, + } = {}) { + super('BloomEffect', bloom_default, { + blendFunction: tt, + uniforms: new Map([ + ['map', new Uniform(null)], + ['intensity', new Uniform(it)], + ]), + }), + (this.renderTarget = new WebGLRenderTarget(1, 1, { depthBuffer: !1 })), + (this.renderTarget.texture.name = 'Bloom.Target'), + (this.blurPass = new KawaseBlurPass({ kernelSize: st })), + (this.luminancePass = new LuminancePass({ colorOutput: !0 })), + (this.luminanceMaterial.threshold = et), + (this.luminanceMaterial.smoothing = nt), + (this.mipmapBlurPass = new MipmapBlurPass()), + (this.mipmapBlurPass.enabled = rt), + (this.mipmapBlurPass.radius = ot), + (this.mipmapBlurPass.levels = at), + (this.uniforms.get('map').value = rt ? this.mipmapBlurPass.texture : this.renderTarget.texture) + const pt = (this.resolution = new Resolution(this, ht, dt, lt)) + pt.addEventListener('change', (mt) => this.setSize(pt.baseWidth, pt.baseHeight)) + } + get texture() { + return this.mipmapBlurPass.enabled ? this.mipmapBlurPass.texture : this.renderTarget.texture + } + getTexture() { + return this.texture + } + getResolution() { + return this.resolution + } + getBlurPass() { + return this.blurPass + } + getLuminancePass() { + return this.luminancePass + } + get luminanceMaterial() { + return this.luminancePass.fullscreenMaterial + } + getLuminanceMaterial() { + return this.luminancePass.fullscreenMaterial + } + get width() { + return this.resolution.width + } + set width(tt) { + this.resolution.preferredWidth = tt + } + get height() { + return this.resolution.height + } + set height(tt) { + this.resolution.preferredHeight = tt + } + get dithering() { + return this.blurPass.dithering + } + set dithering(tt) { + this.blurPass.dithering = tt + } + get kernelSize() { + return this.blurPass.kernelSize + } + set kernelSize(tt) { + this.blurPass.kernelSize = tt + } + get distinction() { + return console.warn(this.name, 'distinction was removed'), 1 + } + set distinction(tt) { + console.warn(this.name, 'distinction was removed') + } + get intensity() { + return this.uniforms.get('intensity').value + } + set intensity(tt) { + this.uniforms.get('intensity').value = tt + } + getIntensity() { + return this.intensity + } + setIntensity(tt) { + this.intensity = tt + } + getResolutionScale() { + return this.resolution.scale + } + setResolutionScale(tt) { + this.resolution.scale = tt + } + update(tt, et, nt) { + const rt = this.renderTarget, + it = this.luminancePass + it.enabled + ? (it.render(tt, et), + this.mipmapBlurPass.enabled + ? this.mipmapBlurPass.render(tt, it.renderTarget) + : this.blurPass.render(tt, it.renderTarget, rt)) + : this.mipmapBlurPass.enabled + ? this.mipmapBlurPass.render(tt, et) + : this.blurPass.render(tt, et, rt) + } + setSize(tt, et) { + const nt = this.resolution + nt.setBaseSize(tt, et), + this.renderTarget.setSize(nt.width, nt.height), + this.blurPass.resolution.copy(nt), + this.luminancePass.setSize(tt, et), + this.mipmapBlurPass.setSize(tt, et) + } + initialize(tt, et, nt) { + this.blurPass.initialize(tt, et, nt), + this.luminancePass.initialize(tt, et, nt), + this.mipmapBlurPass.initialize(tt, et, nt), + nt !== void 0 && + ((this.renderTarget.texture.type = nt), + getOutputColorSpace(tt) === SRGBColorSpace && + setTextureColorSpace(this.renderTarget.texture, SRGBColorSpace)) + } + }, + color_average_default = + 'void mainImage(const in vec4 inputColor,const in vec2 uv,out vec4 outputColor){outputColor=vec4(vec3(average(inputColor.rgb)),inputColor.a);}', + ColorAverageEffect = class extends Effect$1 { + constructor(tt) { + super('ColorAverageEffect', color_average_default, { blendFunction: tt }) + } + }, + depth_of_field_default = `#ifdef FRAMEBUFFER_PRECISION_HIGH +uniform mediump sampler2D nearColorBuffer;uniform mediump sampler2D farColorBuffer; #else -uniform lowp sampler2D inputBuffer; +uniform lowp sampler2D nearColorBuffer;uniform lowp sampler2D farColorBuffer; +#endif +uniform lowp sampler2D nearCoCBuffer;uniform lowp sampler2D farCoCBuffer;uniform float scale;void mainImage(const in vec4 inputColor,const in vec2 uv,const in float depth,out vec4 outputColor){vec4 colorNear=texture2D(nearColorBuffer,uv);vec4 colorFar=texture2D(farColorBuffer,uv); +#if MASK_FUNCTION == 1 +vec2 cocNearFar=vec2(texture2D(nearCoCBuffer,uv).r,colorFar.a);cocNearFar.x=min(cocNearFar.x*scale,1.0); +#else +vec2 cocNearFar=vec2(texture2D(nearCoCBuffer,uv).r,texture2D(farCoCBuffer,uv).g);cocNearFar=min(cocNearFar*scale,1.0); +#endif +vec4 result=inputColor*(1.0-cocNearFar.y)+colorFar;result=mix(result,colorNear,cocNearFar.x);outputColor=result;}`, + DepthOfFieldEffect = class extends Effect$1 { + constructor( + tt, + { + blendFunction: et, + worldFocusDistance: nt, + worldFocusRange: rt, + focusDistance: it = 0, + focalLength: ot = 0.1, + focusRange: at = ot, + bokehScale: st = 1, + resolutionScale: lt = 1, + width: ct = Resolution.AUTO_SIZE, + height: ut = Resolution.AUTO_SIZE, + resolutionX: ht = ct, + resolutionY: dt = ut, + } = {}, + ) { + super('DepthOfFieldEffect', depth_of_field_default, { + blendFunction: et, + attributes: EffectAttribute.DEPTH, + uniforms: new Map([ + ['nearColorBuffer', new Uniform(null)], + ['farColorBuffer', new Uniform(null)], + ['nearCoCBuffer', new Uniform(null)], + ['farCoCBuffer', new Uniform(null)], + ['scale', new Uniform(1)], + ]), + }), + (this.camera = tt), + (this.renderTarget = new WebGLRenderTarget(1, 1, { depthBuffer: !1 })), + (this.renderTarget.texture.name = 'DoF.Intermediate'), + (this.renderTargetMasked = this.renderTarget.clone()), + (this.renderTargetMasked.texture.name = 'DoF.Masked.Far'), + (this.renderTargetNear = this.renderTarget.clone()), + (this.renderTargetNear.texture.name = 'DoF.Bokeh.Near'), + (this.uniforms.get('nearColorBuffer').value = this.renderTargetNear.texture), + (this.renderTargetFar = this.renderTarget.clone()), + (this.renderTargetFar.texture.name = 'DoF.Bokeh.Far'), + (this.uniforms.get('farColorBuffer').value = this.renderTargetFar.texture), + (this.renderTargetCoC = this.renderTarget.clone()), + (this.renderTargetCoC.texture.name = 'DoF.CoC'), + (this.uniforms.get('farCoCBuffer').value = this.renderTargetCoC.texture), + (this.renderTargetCoCBlurred = this.renderTargetCoC.clone()), + (this.renderTargetCoCBlurred.texture.name = 'DoF.CoC.Blurred'), + (this.uniforms.get('nearCoCBuffer').value = this.renderTargetCoCBlurred.texture), + (this.cocPass = new ShaderPass(new CircleOfConfusionMaterial(tt))) + const pt = this.cocMaterial + ;(pt.focusDistance = it), + (pt.focusRange = at), + nt !== void 0 && (pt.worldFocusDistance = nt), + rt !== void 0 && (pt.worldFocusRange = rt), + (this.blurPass = new KawaseBlurPass({ + resolutionScale: lt, + resolutionX: ht, + resolutionY: dt, + kernelSize: KernelSize.MEDIUM, + })), + (this.maskPass = new ShaderPass(new MaskMaterial(this.renderTargetCoC.texture))) + const mt = this.maskPass.fullscreenMaterial + ;(mt.colorChannel = ColorChannel.GREEN), + (this.maskFunction = MaskFunction.MULTIPLY_RGB), + (this.bokehNearBasePass = new ShaderPass(new BokehMaterial(!1, !0))), + (this.bokehNearBasePass.fullscreenMaterial.cocBuffer = this.renderTargetCoCBlurred.texture), + (this.bokehNearFillPass = new ShaderPass(new BokehMaterial(!0, !0))), + (this.bokehNearFillPass.fullscreenMaterial.cocBuffer = this.renderTargetCoCBlurred.texture), + (this.bokehFarBasePass = new ShaderPass(new BokehMaterial(!1, !1))), + (this.bokehFarBasePass.fullscreenMaterial.cocBuffer = this.renderTargetCoC.texture), + (this.bokehFarFillPass = new ShaderPass(new BokehMaterial(!0, !1))), + (this.bokehFarFillPass.fullscreenMaterial.cocBuffer = this.renderTargetCoC.texture), + (this.target = null) + const gt = (this.resolution = new Resolution(this, ht, dt, lt)) + gt.addEventListener('change', (yt) => this.setSize(gt.baseWidth, gt.baseHeight)), (this.bokehScale = st) + } + set mainCamera(tt) { + ;(this.camera = tt), this.cocMaterial.copyCameraSettings(tt) + } + get cocTexture() { + return this.renderTargetCoC.texture + } + get maskFunction() { + return this.maskPass.fullscreenMaterial.maskFunction + } + set maskFunction(tt) { + this.maskFunction !== tt && + (this.defines.set('MASK_FUNCTION', tt.toFixed(0)), + (this.maskPass.fullscreenMaterial.maskFunction = tt), + this.setChanged()) + } + get cocMaterial() { + return this.cocPass.fullscreenMaterial + } + get circleOfConfusionMaterial() { + return this.cocMaterial + } + getCircleOfConfusionMaterial() { + return this.cocMaterial + } + getBlurPass() { + return this.blurPass + } + getResolution() { + return this.resolution + } + get bokehScale() { + return this.uniforms.get('scale').value + } + set bokehScale(tt) { + ;(this.bokehNearBasePass.fullscreenMaterial.scale = tt), + (this.bokehNearFillPass.fullscreenMaterial.scale = tt), + (this.bokehFarBasePass.fullscreenMaterial.scale = tt), + (this.bokehFarFillPass.fullscreenMaterial.scale = tt), + (this.maskPass.fullscreenMaterial.strength = tt), + (this.uniforms.get('scale').value = tt) + } + getBokehScale() { + return this.bokehScale + } + setBokehScale(tt) { + this.bokehScale = tt + } + getTarget() { + return this.target + } + setTarget(tt) { + this.target = tt + } + calculateFocusDistance(tt) { + const et = this.camera, + nt = et.position.distanceTo(tt) + return viewZToOrthographicDepth(-nt, et.near, et.far) + } + setDepthTexture(tt, et = BasicDepthPacking) { + ;(this.cocMaterial.depthBuffer = tt), (this.cocMaterial.depthPacking = et) + } + update(tt, et, nt) { + const rt = this.renderTarget, + it = this.renderTargetCoC, + ot = this.renderTargetCoCBlurred, + at = this.renderTargetMasked + if (this.target !== null) { + const st = this.calculateFocusDistance(this.target) + this.cocMaterial.focusDistance = st + } + this.cocPass.render(tt, null, it), + this.blurPass.render(tt, it, ot), + this.maskPass.render(tt, et, at), + this.bokehFarBasePass.render(tt, at, rt), + this.bokehFarFillPass.render(tt, rt, this.renderTargetFar), + this.bokehNearBasePass.render(tt, et, rt), + this.bokehNearFillPass.render(tt, rt, this.renderTargetNear) + } + setSize(tt, et) { + const nt = this.resolution + nt.setBaseSize(tt, et) + const rt = nt.width, + it = nt.height + this.cocPass.setSize(tt, et), + this.blurPass.setSize(tt, et), + this.maskPass.setSize(tt, et), + this.renderTargetFar.setSize(tt, et), + this.renderTargetCoC.setSize(tt, et), + this.renderTargetMasked.setSize(tt, et), + this.renderTarget.setSize(rt, it), + this.renderTargetNear.setSize(rt, it), + this.renderTargetCoCBlurred.setSize(rt, it), + this.bokehNearBasePass.fullscreenMaterial.setSize(tt, et), + this.bokehNearFillPass.fullscreenMaterial.setSize(tt, et), + this.bokehFarBasePass.fullscreenMaterial.setSize(tt, et), + this.bokehFarFillPass.fullscreenMaterial.setSize(tt, et) + } + initialize(tt, et, nt) { + this.cocPass.initialize(tt, et, nt), + this.maskPass.initialize(tt, et, nt), + this.bokehNearBasePass.initialize(tt, et, nt), + this.bokehNearFillPass.initialize(tt, et, nt), + this.bokehFarBasePass.initialize(tt, et, nt), + this.bokehFarFillPass.initialize(tt, et, nt), + this.blurPass.initialize(tt, et, UnsignedByteType), + tt.capabilities.logarithmicDepthBuffer && (this.cocPass.fullscreenMaterial.defines.LOG_DEPTH = '1'), + nt !== void 0 && + ((this.renderTarget.texture.type = nt), + (this.renderTargetNear.texture.type = nt), + (this.renderTargetFar.texture.type = nt), + (this.renderTargetMasked.texture.type = nt), + getOutputColorSpace(tt) === SRGBColorSpace && + (setTextureColorSpace(this.renderTarget.texture, SRGBColorSpace), + setTextureColorSpace(this.renderTargetNear.texture, SRGBColorSpace), + setTextureColorSpace(this.renderTargetFar.texture, SRGBColorSpace), + setTextureColorSpace(this.renderTargetMasked.texture, SRGBColorSpace))) + } + } + function createCanvas(tt, et, nt) { + const rt = document.createElement('canvas'), + it = rt.getContext('2d') + if (((rt.width = tt), (rt.height = et), nt instanceof Image)) it.drawImage(nt, 0, 0) + else { + const ot = it.createImageData(tt, et) + ot.data.set(nt), it.putImageData(ot, 0, 0) + } + return rt + } + var RawImageData = class bw { + constructor(et = 0, nt = 0, rt = null) { + ;(this.width = et), (this.height = nt), (this.data = rt) + } + toCanvas() { + return typeof document > 'u' ? null : createCanvas(this.width, this.height, this.data) + } + static from(et) { + const { width: nt, height: rt } = et + let it + if (et instanceof Image) { + const ot = createCanvas(nt, rt, et) + ot !== null && (it = ot.getContext('2d').getImageData(0, 0, nt, rt).data) + } else it = et.data + return new bw(nt, rt, it) + } + }, + worker_default = `"use strict";(()=>{var O={SCALE_UP:"lut.scaleup"};var _=[new Float32Array(3),new Float32Array(3)],n=[new Float32Array(3),new Float32Array(3),new Float32Array(3),new Float32Array(3)],Z=[[new Float32Array([0,0,0]),new Float32Array([1,0,0]),new Float32Array([1,1,0]),new Float32Array([1,1,1])],[new Float32Array([0,0,0]),new Float32Array([1,0,0]),new Float32Array([1,0,1]),new Float32Array([1,1,1])],[new Float32Array([0,0,0]),new Float32Array([0,0,1]),new Float32Array([1,0,1]),new Float32Array([1,1,1])],[new Float32Array([0,0,0]),new Float32Array([0,1,0]),new Float32Array([1,1,0]),new Float32Array([1,1,1])],[new Float32Array([0,0,0]),new Float32Array([0,1,0]),new Float32Array([0,1,1]),new Float32Array([1,1,1])],[new Float32Array([0,0,0]),new Float32Array([0,0,1]),new Float32Array([0,1,1]),new Float32Array([1,1,1])]];function d(a,t,r,m){let i=r[0]-t[0],e=r[1]-t[1],y=r[2]-t[2],h=a[0]-t[0],A=a[1]-t[1],w=a[2]-t[2],c=e*w-y*A,l=y*h-i*w,x=i*A-e*h,u=Math.sqrt(c*c+l*l+x*x),b=u*.5,s=c/u,F=l/u,f=x/u,p=-(a[0]*s+a[1]*F+a[2]*f),M=m[0]*s+m[1]*F+m[2]*f;return Math.abs(M+p)*b/3}function V(a,t,r,m,i,e){let y=(r+m*t+i*t*t)*4;e[0]=a[y+0],e[1]=a[y+1],e[2]=a[y+2]}function k(a,t,r,m,i,e){let y=r*(t-1),h=m*(t-1),A=i*(t-1),w=Math.floor(y),c=Math.floor(h),l=Math.floor(A),x=Math.ceil(y),u=Math.ceil(h),b=Math.ceil(A),s=y-w,F=h-c,f=A-l;if(w===y&&c===h&&l===A)V(a,t,y,h,A,e);else{let p;s>=F&&F>=f?p=Z[0]:s>=f&&f>=F?p=Z[1]:f>=s&&s>=F?p=Z[2]:F>=s&&s>=f?p=Z[3]:F>=f&&f>=s?p=Z[4]:f>=F&&F>=s&&(p=Z[5]);let[M,g,X,Y]=p,P=_[0];P[0]=s,P[1]=F,P[2]=f;let o=_[1],L=x-w,S=u-c,U=b-l;o[0]=L*M[0]+w,o[1]=S*M[1]+c,o[2]=U*M[2]+l,V(a,t,o[0],o[1],o[2],n[0]),o[0]=L*g[0]+w,o[1]=S*g[1]+c,o[2]=U*g[2]+l,V(a,t,o[0],o[1],o[2],n[1]),o[0]=L*X[0]+w,o[1]=S*X[1]+c,o[2]=U*X[2]+l,V(a,t,o[0],o[1],o[2],n[2]),o[0]=L*Y[0]+w,o[1]=S*Y[1]+c,o[2]=U*Y[2]+l,V(a,t,o[0],o[1],o[2],n[3]);let T=d(g,X,Y,P)*6,q=d(M,X,Y,P)*6,C=d(M,g,Y,P)*6,E=d(M,g,X,P)*6;n[0][0]*=T,n[0][1]*=T,n[0][2]*=T,n[1][0]*=q,n[1][1]*=q,n[1][2]*=q,n[2][0]*=C,n[2][1]*=C,n[2][2]*=C,n[3][0]*=E,n[3][1]*=E,n[3][2]*=E,e[0]=n[0][0]+n[1][0]+n[2][0]+n[3][0],e[1]=n[0][1]+n[1][1]+n[2][1]+n[3][1],e[2]=n[0][2]+n[1][2]+n[2][2]+n[3][2]}}var v=class{static expand(t,r){let m=Math.cbrt(t.length/4),i=new Float32Array(3),e=new t.constructor(r**3*4),y=t instanceof Uint8Array?255:1,h=r**2,A=1/(r-1);for(let w=0;w{let t=a.data,r=t.data;switch(t.operation){case O.SCALE_UP:r=v.expand(r,t.size);break}postMessage(r,[r.buffer]),close()});})(); +`, + c$2 = new Color$1(), + LookupTexture = class j0 extends Data3DTexture { + constructor(et, nt) { + super(et, nt, nt, nt), + (this.type = FloatType), + (this.format = RGBAFormat), + (this.minFilter = LinearFilter), + (this.magFilter = LinearFilter), + (this.wrapS = ClampToEdgeWrapping), + (this.wrapT = ClampToEdgeWrapping), + (this.wrapR = ClampToEdgeWrapping), + (this.unpackAlignment = 1), + (this.needsUpdate = !0), + setTextureColorSpace(this, LinearSRGBColorSpace), + (this.domainMin = new Vector3(0, 0, 0)), + (this.domainMax = new Vector3(1, 1, 1)) + } + get isLookupTexture3D() { + return !0 + } + scaleUp(et, nt = !0) { + const rt = this.image + let it + return ( + et <= rt.width + ? (it = Promise.reject(new Error('The target size must be greater than the current size'))) + : (it = new Promise((ot, at) => { + const st = URL.createObjectURL(new Blob([worker_default], { type: 'text/javascript' })), + lt = new Worker(st) + lt.addEventListener('error', (ut) => at(ut.error)), + lt.addEventListener('message', (ut) => { + const ht = new j0(ut.data, et) + copyTextureColorSpace(this, ht), + (ht.type = this.type), + (ht.name = this.name), + URL.revokeObjectURL(st), + ot(ht) + }) + const ct = nt ? [rt.data.buffer] : [] + lt.postMessage({ operation: LUTOperation.SCALE_UP, data: rt.data, size: et }, ct) + })), + it + ) + } + applyLUT(et) { + const nt = this.image, + rt = et.image, + it = Math.min(nt.width, nt.height, nt.depth), + ot = Math.min(rt.width, rt.height, rt.depth) + if (it !== ot) console.error('Size mismatch') + else if (et.type !== FloatType || this.type !== FloatType) console.error('Both LUTs must be FloatType textures') + else if (et.format !== RGBAFormat || this.format !== RGBAFormat) + console.error('Both LUTs must be RGBA textures') + else { + const at = nt.data, + st = rt.data, + lt = it, + ct = lt ** 2, + ut = lt - 1 + for (let ht = 0, dt = lt ** 3; ht < dt; ++ht) { + const pt = ht * 4, + mt = at[pt + 0] * ut, + gt = at[pt + 1] * ut, + yt = at[pt + 2] * ut, + bt = Math.round(mt + gt * lt + yt * ct) * 4 + ;(at[pt + 0] = st[bt + 0]), (at[pt + 1] = st[bt + 1]), (at[pt + 2] = st[bt + 2]) + } + this.needsUpdate = !0 + } + return this + } + convertToUint8() { + if (this.type === FloatType) { + const et = this.image.data, + nt = new Uint8Array(et.length) + for (let rt = 0, it = et.length; rt < it; ++rt) nt[rt] = et[rt] * 255 + 0.5 + ;(this.image.data = nt), (this.type = UnsignedByteType), (this.needsUpdate = !0) + } + return this + } + convertToFloat() { + if (this.type === UnsignedByteType) { + const et = this.image.data, + nt = new Float32Array(et.length) + for (let rt = 0, it = et.length; rt < it; ++rt) nt[rt] = et[rt] / 255 + ;(this.image.data = nt), (this.type = FloatType), (this.needsUpdate = !0) + } + return this + } + convertToRGBA() { + return console.warn('LookupTexture', 'convertToRGBA() is deprecated, LUTs are now RGBA by default'), this + } + convertLinearToSRGB() { + const et = this.image.data + if (this.type === FloatType) { + for (let nt = 0, rt = et.length; nt < rt; nt += 4) c$2.fromArray(et, nt).convertLinearToSRGB().toArray(et, nt) + setTextureColorSpace(this, SRGBColorSpace), (this.needsUpdate = !0) + } else console.error('Color space conversion requires FloatType data') + return this + } + convertSRGBToLinear() { + const et = this.image.data + if (this.type === FloatType) { + for (let nt = 0, rt = et.length; nt < rt; nt += 4) c$2.fromArray(et, nt).convertSRGBToLinear().toArray(et, nt) + setTextureColorSpace(this, LinearSRGBColorSpace), (this.needsUpdate = !0) + } else console.error('Color space conversion requires FloatType data') + return this + } + toDataTexture() { + const et = this.image.width, + nt = this.image.height * this.image.depth, + rt = new DataTexture(this.image.data, et, nt) + return ( + (rt.name = this.name), + (rt.type = this.type), + (rt.format = this.format), + (rt.minFilter = LinearFilter), + (rt.magFilter = LinearFilter), + (rt.wrapS = this.wrapS), + (rt.wrapT = this.wrapT), + (rt.generateMipmaps = !1), + (rt.needsUpdate = !0), + copyTextureColorSpace(this, rt), + rt + ) + } + static from(et) { + const nt = et.image, + { width: rt, height: it } = nt, + ot = Math.min(rt, it) + let at + if (nt instanceof Image) { + const ct = RawImageData.from(nt).data + if (rt > it) { + at = new Uint8Array(ct.length) + for (let ut = 0; ut < ot; ++ut) + for (let ht = 0; ht < ot; ++ht) + for (let dt = 0; dt < ot; ++dt) { + const pt = (dt + ut * ot + ht * ot * ot) * 4, + mt = (dt + ht * ot + ut * ot * ot) * 4 + ;(at[mt + 0] = ct[pt + 0]), + (at[mt + 1] = ct[pt + 1]), + (at[mt + 2] = ct[pt + 2]), + (at[mt + 3] = ct[pt + 3]) + } + } else at = new Uint8Array(ct.buffer) + } else at = nt.data.slice() + const st = new j0(at, ot) + return (st.type = et.type), (st.name = et.name), copyTextureColorSpace(et, st), st + } + static createNeutral(et) { + const nt = new Float32Array(et ** 3 * 4), + rt = et ** 2, + it = 1 / (et - 1) + for (let at = 0; at < et; ++at) + for (let st = 0; st < et; ++st) + for (let lt = 0; lt < et; ++lt) { + const ct = (at + st * et + lt * rt) * 4 + ;(nt[ct + 0] = at * it), (nt[ct + 1] = st * it), (nt[ct + 2] = lt * it), (nt[ct + 3] = 1) + } + const ot = new j0(nt, et) + return (ot.name = 'neutral'), ot + } + } + function getNoise(tt, et, nt) { + const rt = new Map([ + [LuminanceFormat, 1], + [RedFormat, 1], + [RGFormat, 2], + [RGBAFormat, 4], + ]) + let it + if ((rt.has(et) || console.error('Invalid noise texture format'), nt === UnsignedByteType)) { + it = new Uint8Array(tt * rt.get(et)) + for (let ot = 0, at = it.length; ot < at; ++ot) it[ot] = Math.random() * 255 + 0.5 + } else { + it = new Float32Array(tt * rt.get(et)) + for (let ot = 0, at = it.length; ot < at; ++ot) it[ot] = Math.random() + } + return it + } + var NoiseTexture = class extends DataTexture { + constructor(tt, et, nt = LuminanceFormat, rt = UnsignedByteType) { + super(getNoise(tt * et, nt, rt), tt, et, nt, rt), (this.needsUpdate = !0) + } + }, + glitch_default = + 'uniform lowp sampler2D perturbationMap;uniform bool active;uniform float columns;uniform float random;uniform vec2 seeds;uniform vec2 distortion;void mainUv(inout vec2 uv){if(active){if(uv.ydistortion.x-columns*random){float sx=clamp(ceil(seeds.x),0.0,1.0);uv.y=sx*(1.0-(uv.y+distortion.y))+(1.0-sx)*distortion.y;}if(uv.xdistortion.y-columns*random){float sy=clamp(ceil(seeds.y),0.0,1.0);uv.x=sy*distortion.x+(1.0-sy)*(1.0-(uv.x+distortion.x));}vec2 normal=texture2D(perturbationMap,uv*random*random).rg;uv+=normal*seeds*(random*0.2);}}', + textureTag = 'Glitch.Generated' + function randomFloat(tt, et) { + return tt + Math.random() * (et - tt) + } + var GlitchEffect = class extends Effect$1 { + constructor({ + chromaticAberrationOffset: tt = null, + delay: et = new Vector2(1.5, 3.5), + duration: nt = new Vector2(0.6, 1), + strength: rt = new Vector2(0.3, 1), + columns: it = 0.05, + ratio: ot = 0.85, + perturbationMap: at = null, + dtSize: st = 64, + } = {}) { + if ( + (super('GlitchEffect', glitch_default, { + uniforms: new Map([ + ['perturbationMap', new Uniform(null)], + ['columns', new Uniform(it)], + ['active', new Uniform(!1)], + ['random', new Uniform(1)], + ['seeds', new Uniform(new Vector2())], + ['distortion', new Uniform(new Vector2())], + ]), + }), + at === null) + ) { + const lt = new NoiseTexture(st, st, RGBAFormat) + ;(lt.name = textureTag), (this.perturbationMap = lt) + } else this.perturbationMap = at + ;(this.time = 0), + (this.distortion = this.uniforms.get('distortion').value), + (this.delay = et), + (this.duration = nt), + (this.breakPoint = new Vector2( + randomFloat(this.delay.x, this.delay.y), + randomFloat(this.duration.x, this.duration.y), + )), + (this.strength = rt), + (this.mode = GlitchMode.SPORADIC), + (this.ratio = ot), + (this.chromaticAberrationOffset = tt) + } + get seeds() { + return this.uniforms.get('seeds').value + } + get active() { + return this.uniforms.get('active').value + } + isActive() { + return this.active + } + get minDelay() { + return this.delay.x + } + set minDelay(tt) { + this.delay.x = tt + } + getMinDelay() { + return this.delay.x + } + setMinDelay(tt) { + this.delay.x = tt + } + get maxDelay() { + return this.delay.y + } + set maxDelay(tt) { + this.delay.y = tt + } + getMaxDelay() { + return this.delay.y + } + setMaxDelay(tt) { + this.delay.y = tt + } + get minDuration() { + return this.duration.x + } + set minDuration(tt) { + this.duration.x = tt + } + getMinDuration() { + return this.duration.x + } + setMinDuration(tt) { + this.duration.x = tt + } + get maxDuration() { + return this.duration.y + } + set maxDuration(tt) { + this.duration.y = tt + } + getMaxDuration() { + return this.duration.y + } + setMaxDuration(tt) { + this.duration.y = tt + } + get minStrength() { + return this.strength.x + } + set minStrength(tt) { + this.strength.x = tt + } + getMinStrength() { + return this.strength.x + } + setMinStrength(tt) { + this.strength.x = tt + } + get maxStrength() { + return this.strength.y + } + set maxStrength(tt) { + this.strength.y = tt + } + getMaxStrength() { + return this.strength.y + } + setMaxStrength(tt) { + this.strength.y = tt + } + getMode() { + return this.mode + } + setMode(tt) { + this.mode = tt + } + getGlitchRatio() { + return 1 - this.ratio + } + setGlitchRatio(tt) { + this.ratio = Math.min(Math.max(1 - tt, 0), 1) + } + get columns() { + return this.uniforms.get('columns').value + } + set columns(tt) { + this.uniforms.get('columns').value = tt + } + getGlitchColumns() { + return this.columns + } + setGlitchColumns(tt) { + this.columns = tt + } + getChromaticAberrationOffset() { + return this.chromaticAberrationOffset + } + setChromaticAberrationOffset(tt) { + this.chromaticAberrationOffset = tt + } + get perturbationMap() { + return this.uniforms.get('perturbationMap').value + } + set perturbationMap(tt) { + const et = this.perturbationMap + et !== null && et.name === textureTag && et.dispose(), + (tt.minFilter = tt.magFilter = NearestFilter), + (tt.wrapS = tt.wrapT = RepeatWrapping), + (tt.generateMipmaps = !1), + (this.uniforms.get('perturbationMap').value = tt) + } + getPerturbationMap() { + return this.perturbationMap + } + setPerturbationMap(tt) { + this.perturbationMap = tt + } + generatePerturbationMap(tt = 64) { + const et = new NoiseTexture(tt, tt, RGBAFormat) + return (et.name = textureTag), et + } + update(tt, et, nt) { + const rt = this.mode, + it = this.breakPoint, + ot = this.chromaticAberrationOffset, + at = this.strength + let st = this.time, + lt = !1, + ct = 0, + ut = 0, + ht + rt !== GlitchMode.DISABLED && + (rt === GlitchMode.SPORADIC && + ((st += nt), + (ht = st > it.x), + st >= it.x + it.y && + (it.set(randomFloat(this.delay.x, this.delay.y), randomFloat(this.duration.x, this.duration.y)), + (st = 0))), + (ct = Math.random()), + (this.uniforms.get('random').value = ct), + (ht && ct > this.ratio) || rt === GlitchMode.CONSTANT_WILD + ? ((lt = !0), + (ct *= at.y * 0.03), + (ut = randomFloat(-Math.PI, Math.PI)), + this.seeds.set(randomFloat(-at.y, at.y), randomFloat(-at.y, at.y)), + this.distortion.set(randomFloat(0, 1), randomFloat(0, 1))) + : (ht || rt === GlitchMode.CONSTANT_MILD) && + ((lt = !0), + (ct *= at.x * 0.03), + (ut = randomFloat(-Math.PI, Math.PI)), + this.seeds.set(randomFloat(-at.x, at.x), randomFloat(-at.x, at.x)), + this.distortion.set(randomFloat(0, 1), randomFloat(0, 1))), + (this.time = st)), + ot !== null && (lt ? ot.set(Math.cos(ut), Math.sin(ut)).multiplyScalar(ct) : ot.set(0, 0)), + (this.uniforms.get('active').value = lt) + } + dispose() { + const tt = this.perturbationMap + tt !== null && tt.name === textureTag && tt.dispose() + } + }, + god_rays_default = `#ifdef FRAMEBUFFER_PRECISION_HIGH +uniform mediump sampler2D map; +#else +uniform lowp sampler2D map; +#endif +void mainImage(const in vec4 inputColor,const in vec2 uv,out vec4 outputColor){outputColor=texture2D(map,uv);}`, + v$1 = new Vector3(), + m$1 = new Matrix4(), + GodRaysEffect = class extends Effect$1 { + constructor( + tt, + et, + { + blendFunction: nt = BlendFunction.SCREEN, + samples: rt = 60, + density: it = 0.96, + decay: ot = 0.9, + weight: at = 0.4, + exposure: st = 0.6, + clampMax: lt = 1, + blur: ct = !0, + kernelSize: ut = KernelSize.SMALL, + resolutionScale: ht = 0.5, + width: dt = Resolution.AUTO_SIZE, + height: pt = Resolution.AUTO_SIZE, + resolutionX: mt = dt, + resolutionY: gt = pt, + } = {}, + ) { + super('GodRaysEffect', god_rays_default, { + blendFunction: nt, + attributes: EffectAttribute.DEPTH, + uniforms: new Map([['map', new Uniform(null)]]), + }), + (this.camera = tt), + (this._lightSource = et), + (this.lightSource = et), + (this.lightScene = new Scene()), + (this.screenPosition = new Vector2()), + (this.renderTargetA = new WebGLRenderTarget(1, 1, { depthBuffer: !1 })), + (this.renderTargetA.texture.name = 'GodRays.Target.A'), + (this.renderTargetB = this.renderTargetA.clone()), + (this.renderTargetB.texture.name = 'GodRays.Target.B'), + (this.uniforms.get('map').value = this.renderTargetB.texture), + (this.renderTargetLight = new WebGLRenderTarget(1, 1)), + (this.renderTargetLight.texture.name = 'GodRays.Light'), + (this.renderTargetLight.depthTexture = new DepthTexture()), + (this.renderPassLight = new RenderPass(this.lightScene, tt)), + (this.renderPassLight.clearPass.overrideClearColor = new Color$1(0)), + (this.clearPass = new ClearPass(!0, !1, !1)), + (this.clearPass.overrideClearColor = new Color$1(0)), + (this.blurPass = new KawaseBlurPass({ kernelSize: ut })), + (this.blurPass.enabled = ct), + (this.depthMaskPass = new ShaderPass(new DepthMaskMaterial())) + const yt = this.depthMaskMaterial + ;(yt.depthBuffer1 = this.renderTargetLight.depthTexture), + yt.copyCameraSettings(tt), + (this.godRaysPass = new ShaderPass(new GodRaysMaterial(this.screenPosition))) + const bt = this.godRaysMaterial + ;(bt.density = it), + (bt.decay = ot), + (bt.weight = at), + (bt.exposure = st), + (bt.maxIntensity = lt), + (bt.samples = rt) + const vt = (this.resolution = new Resolution(this, mt, gt, ht)) + vt.addEventListener('change', (xt) => this.setSize(vt.baseWidth, vt.baseHeight)) + } + set mainCamera(tt) { + ;(this.camera = tt), (this.renderPassLight.mainCamera = tt), this.depthMaskMaterial.copyCameraSettings(tt) + } + get lightSource() { + return this._lightSource + } + set lightSource(tt) { + ;(this._lightSource = tt), tt !== null && ((tt.material.depthWrite = !1), (tt.material.transparent = !0)) + } + getBlurPass() { + return this.blurPass + } + get texture() { + return this.renderTargetB.texture + } + getTexture() { + return this.texture + } + get depthMaskMaterial() { + return this.depthMaskPass.fullscreenMaterial + } + get godRaysMaterial() { + return this.godRaysPass.fullscreenMaterial + } + getGodRaysMaterial() { + return this.godRaysMaterial + } + getResolution() { + return this.resolution + } + get width() { + return this.resolution.width + } + set width(tt) { + this.resolution.preferredWidth = tt + } + get height() { + return this.resolution.height + } + set height(tt) { + this.resolution.preferredHeight = tt + } + get dithering() { + return this.godRaysMaterial.dithering + } + set dithering(tt) { + const et = this.godRaysMaterial + ;(et.dithering = tt), (et.needsUpdate = !0) + } + get blur() { + return this.blurPass.enabled + } + set blur(tt) { + this.blurPass.enabled = tt + } + get kernelSize() { + return this.blurPass.kernelSize + } + set kernelSize(tt) { + this.blurPass.kernelSize = tt + } + getResolutionScale() { + return this.resolution.scale + } + setResolutionScale(tt) { + this.resolution.scale = tt + } + get samples() { + return this.godRaysMaterial.samples + } + set samples(tt) { + this.godRaysMaterial.samples = tt + } + setDepthTexture(tt, et = BasicDepthPacking) { + ;(this.depthMaskPass.fullscreenMaterial.depthBuffer0 = tt), + (this.depthMaskPass.fullscreenMaterial.depthPacking0 = et) + } + update(tt, et, nt) { + const rt = this.lightSource, + it = rt.parent, + ot = rt.matrixAutoUpdate, + at = this.renderTargetA, + st = this.renderTargetLight + ;(rt.material.depthWrite = !0), + (rt.matrixAutoUpdate = !1), + rt.updateWorldMatrix(!0, !1), + it !== null && (ot || m$1.copy(rt.matrix), rt.matrix.copy(rt.matrixWorld)), + this.lightScene.add(rt), + this.renderPassLight.render(tt, st), + this.clearPass.render(tt, at), + this.depthMaskPass.render(tt, st, at), + (rt.material.depthWrite = !1), + (rt.matrixAutoUpdate = ot), + it !== null && (ot || rt.matrix.copy(m$1), it.add(rt)), + v$1.setFromMatrixPosition(rt.matrixWorld).project(this.camera), + this.screenPosition.set( + Math.min(Math.max((v$1.x + 1) * 0.5, -1), 2), + Math.min(Math.max((v$1.y + 1) * 0.5, -1), 2), + ), + this.blurPass.enabled && this.blurPass.render(tt, at, at), + this.godRaysPass.render(tt, at, this.renderTargetB) + } + setSize(tt, et) { + const nt = this.resolution + nt.setBaseSize(tt, et) + const rt = nt.width, + it = nt.height + this.renderTargetA.setSize(rt, it), + this.renderTargetB.setSize(rt, it), + this.renderTargetLight.setSize(rt, it), + this.blurPass.resolution.copy(nt) + } + initialize(tt, et, nt) { + this.blurPass.initialize(tt, et, nt), + this.renderPassLight.initialize(tt, et, nt), + this.depthMaskPass.initialize(tt, et, nt), + this.godRaysPass.initialize(tt, et, nt), + nt !== void 0 && + ((this.renderTargetA.texture.type = nt), + (this.renderTargetB.texture.type = nt), + (this.renderTargetLight.texture.type = nt), + getOutputColorSpace(tt) === SRGBColorSpace && + (setTextureColorSpace(this.renderTargetA.texture, SRGBColorSpace), + setTextureColorSpace(this.renderTargetB.texture, SRGBColorSpace), + setTextureColorSpace(this.renderTargetLight.texture, SRGBColorSpace))) + } + }, + grid_default = + 'uniform vec2 scale;uniform float lineWidth;void mainImage(const in vec4 inputColor,const in vec2 uv,out vec4 outputColor){float grid=0.5-max(abs(mod(uv.x*scale.x,1.0)-0.5),abs(mod(uv.y*scale.y,1.0)-0.5));outputColor=vec4(vec3(smoothstep(0.0,lineWidth,grid)),inputColor.a);}', + GridEffect = class extends Effect$1 { + constructor({ blendFunction: tt = BlendFunction.OVERLAY, scale: et = 1, lineWidth: nt = 0 } = {}) { + super('GridEffect', grid_default, { + blendFunction: tt, + uniforms: new Map([ + ['scale', new Uniform(new Vector2())], + ['lineWidth', new Uniform(nt)], + ]), + }), + (this.resolution = new Vector2()), + (this.s = 0), + (this.scale = et), + (this.l = 0), + (this.lineWidth = nt) + } + get scale() { + return this.s + } + set scale(tt) { + ;(this.s = Math.max(tt, 1e-6)), this.setSize(this.resolution.width, this.resolution.height) + } + getScale() { + return this.scale + } + setScale(tt) { + this.scale = tt + } + get lineWidth() { + return this.l + } + set lineWidth(tt) { + ;(this.l = tt), this.setSize(this.resolution.width, this.resolution.height) + } + getLineWidth() { + return this.lineWidth + } + setLineWidth(tt) { + this.lineWidth = tt + } + setSize(tt, et) { + this.resolution.set(tt, et) + const nt = tt / et, + rt = this.scale * (et * 0.125) + this.uniforms.get('scale').value.set(nt * rt, rt), + (this.uniforms.get('lineWidth').value = rt / et + this.lineWidth) + } + }, + lut_3d_default = `uniform vec3 scale;uniform vec3 offset; +#ifdef CUSTOM_INPUT_DOMAIN +uniform vec3 domainMin;uniform vec3 domainMax; #endif -#if PASS == 1 -uniform vec4 kernel64[32]; +#ifdef LUT_3D +#ifdef LUT_PRECISION_HIGH +#ifdef GL_FRAGMENT_PRECISION_HIGH +uniform highp sampler3D lut; #else -uniform vec4 kernel16[8]; +uniform mediump sampler3D lut; #endif -uniform lowp sampler2D cocBuffer;uniform vec2 texelSize;uniform float scale;varying vec2 vUv;void main(){ -#ifdef FOREGROUND -vec2 cocNearFar=texture2D(cocBuffer,vUv).rg*scale;float coc=cocNearFar.x; #else -float coc=texture2D(cocBuffer,vUv).g*scale; +uniform lowp sampler3D lut; #endif -if(coc==0.0){gl_FragColor=texture2D(inputBuffer,vUv);}else{ -#ifdef FOREGROUND -vec2 step=texelSize*max(cocNearFar.x,cocNearFar.y); +vec4 applyLUT(const in vec3 rgb){ +#ifdef TETRAHEDRAL_INTERPOLATION +vec3 p=floor(rgb);vec3 f=rgb-p;vec3 v1=(p+0.5)*LUT_TEXEL_WIDTH;vec3 v4=(p+1.5)*LUT_TEXEL_WIDTH;vec3 v2,v3;vec3 frac;if(f.r>=f.g){if(f.g>f.b){frac=f.rgb;v2=vec3(v4.x,v1.y,v1.z);v3=vec3(v4.x,v4.y,v1.z);}else if(f.r>=f.b){frac=f.rbg;v2=vec3(v4.x,v1.y,v1.z);v3=vec3(v4.x,v1.y,v4.z);}else{frac=f.brg;v2=vec3(v1.x,v1.y,v4.z);v3=vec3(v4.x,v1.y,v4.z);}}else{if(f.b>f.g){frac=f.bgr;v2=vec3(v1.x,v1.y,v4.z);v3=vec3(v1.x,v4.y,v4.z);}else if(f.r>=f.b){frac=f.grb;v2=vec3(v1.x,v4.y,v1.z);v3=vec3(v4.x,v4.y,v1.z);}else{frac=f.gbr;v2=vec3(v1.x,v4.y,v1.z);v3=vec3(v1.x,v4.y,v4.z);}}vec4 n1=texture(lut,v1);vec4 n2=texture(lut,v2);vec4 n3=texture(lut,v3);vec4 n4=texture(lut,v4);vec4 weights=vec4(1.0-frac.x,frac.x-frac.y,frac.y-frac.z,frac.z);vec4 result=weights*mat4(vec4(n1.r,n2.r,n3.r,n4.r),vec4(n1.g,n2.g,n3.g,n4.g),vec4(n1.b,n2.b,n3.b,n4.b),vec4(1.0));return vec4(result.rgb,1.0); #else -vec2 step=texelSize*coc; +return texture(lut,rgb); #endif -#if PASS == 1 -vec4 acc=vec4(0.0);for(int i=0;i<32;++i){vec4 kernel=kernel64[i];vec2 uv=step*kernel.xy+vUv;acc+=texture2D(inputBuffer,uv);uv=step*kernel.zw+vUv;acc+=texture2D(inputBuffer,uv);}gl_FragColor=acc/64.0; +} #else -vec4 maxValue=texture2D(inputBuffer,vUv);for(int i=0;i<8;++i){vec4 kernel=kernel16[i];vec2 uv=step*kernel.xy+vUv;maxValue=max(texture2D(inputBuffer,uv),maxValue);uv=step*kernel.zw+vUv;maxValue=max(texture2D(inputBuffer,uv),maxValue);}gl_FragColor=maxValue; -#endif -}}`,BokehMaterial=class extends ShaderMaterial{constructor(tt=!1,et=!1){super({name:"BokehMaterial",defines:{PASS:tt?"2":"1"},uniforms:{inputBuffer:new Uniform(null),cocBuffer:new Uniform(null),texelSize:new Uniform(new Vector2),kernel64:new Uniform(null),kernel16:new Uniform(null),scale:new Uniform(1)},blending:NoBlending,toneMapped:!1,depthWrite:!1,depthTest:!1,fragmentShader:convolution_bokeh_default,vertexShader:common_default}),et&&(this.defines.FOREGROUND="1"),this.generateKernel()}set inputBuffer(tt){this.uniforms.inputBuffer.value=tt}setInputBuffer(tt){this.uniforms.inputBuffer.value=tt}set cocBuffer(tt){this.uniforms.cocBuffer.value=tt}setCoCBuffer(tt){this.uniforms.cocBuffer.value=tt}get scale(){return this.uniforms.scale.value}set scale(tt){this.uniforms.scale.value=tt}getScale(tt){return this.scale}setScale(tt){this.scale=tt}generateKernel(){const tt=2.39996323,et=new Float64Array(128),nt=new Float64Array(32);let rt=0,it=0;for(let ot=0,at=Math.sqrt(80);ot<80;++ot){const st=ot*tt,lt=Math.sqrt(ot)/at,ct=lt*Math.cos(st),ut=lt*Math.sin(st);ot%5===0?(nt[it++]=ct,nt[it++]=ut):(et[rt++]=ct,et[rt++]=ut)}this.uniforms.kernel64.value=et,this.uniforms.kernel16.value=nt}setTexelSize(tt,et){this.uniforms.texelSize.value.set(tt,et)}setSize(tt,et){this.uniforms.texelSize.value.set(1/tt,1/et)}},BlendFunction={SKIP:9,SET:30,ADD:0,ALPHA:1,AVERAGE:2,COLOR:3,COLOR_BURN:4,COLOR_DODGE:5,DARKEN:6,DIFFERENCE:7,DIVIDE:8,DST:9,EXCLUSION:10,HARD_LIGHT:11,HARD_MIX:12,HUE:13,INVERT:14,INVERT_RGB:15,LIGHTEN:16,LINEAR_BURN:17,LINEAR_DODGE:18,LINEAR_LIGHT:19,LUMINOSITY:20,MULTIPLY:21,NEGATION:22,NORMAL:23,OVERLAY:24,PIN_LIGHT:25,REFLECT:26,SATURATION:27,SCREEN:28,SOFT_LIGHT:29,SRC:30,SUBTRACT:31,VIVID_LIGHT:32},ColorChannel={RED:0,GREEN:1,BLUE:2,ALPHA:3},NoColorSpace="",SRGBColorSpace="srgb",LinearSRGBColorSpace="srgb-linear",DepthCopyMode={FULL:0,SINGLE:1},DepthTestStrategy={DEFAULT:0,KEEP_MAX_DEPTH:1,DISCARD_MAX_DEPTH:2},EffectAttribute={NONE:0,DEPTH:1,CONVOLUTION:2},EffectShaderSection={FRAGMENT_HEAD:"FRAGMENT_HEAD",FRAGMENT_MAIN_UV:"FRAGMENT_MAIN_UV",FRAGMENT_MAIN_IMAGE:"FRAGMENT_MAIN_IMAGE",VERTEX_HEAD:"VERTEX_HEAD",VERTEX_MAIN_SUPPORT:"VERTEX_MAIN_SUPPORT"},GlitchMode={DISABLED:0,SPORADIC:1,CONSTANT_MILD:2,CONSTANT_WILD:3},KernelSize={VERY_SMALL:0,SMALL:1,MEDIUM:2,LARGE:3,VERY_LARGE:4,HUGE:5},LUTOperation={SCALE_UP:"lut.scaleup"},MaskFunction={DISCARD:0,MULTIPLY:1,MULTIPLY_RGB_SET_ALPHA:2,MULTIPLY_RGB:3},VignetteTechnique={DEFAULT:0,ESKIL:1},revision=Number(REVISION.replace(/\D+/g,"")),useColorSpace=revision>=152,encodingToColorSpace=new Map([[LinearEncoding,LinearSRGBColorSpace],[sRGBEncoding,SRGBColorSpace]]),colorSpaceToEncoding=new Map([[LinearSRGBColorSpace,LinearEncoding],[SRGBColorSpace,sRGBEncoding]]);function getOutputColorSpace(tt){return tt===null?null:useColorSpace?tt.outputColorSpace:encodingToColorSpace.get(tt.outputEncoding)}function setTextureColorSpace(tt,et){tt!==null&&(useColorSpace?tt.colorSpace=et:tt.encoding=colorSpaceToEncoding.get(et))}function copyTextureColorSpace(tt,et){tt===null||et===null||(useColorSpace?et.colorSpace=tt.colorSpace:et.encoding=tt.encoding)}function updateFragmentShader(tt){return revision<154?tt.replace("colorspace_fragment","encodings_fragment"):tt}function orthographicDepthToViewZ(tt,et,nt){return tt*(et-nt)-et}function viewZToOrthographicDepth(tt,et,nt){return Math.min(Math.max((tt+et)/(et-nt),0),1)}var circle_of_confusion_default=`#include -#include +#ifdef LUT_PRECISION_HIGH #ifdef GL_FRAGMENT_PRECISION_HIGH -uniform highp sampler2D depthBuffer; -#else -uniform mediump sampler2D depthBuffer; -#endif -uniform float focusDistance;uniform float focusRange;uniform float cameraNear;uniform float cameraFar;varying vec2 vUv;float readDepth(const in vec2 uv){ -#if DEPTH_PACKING == 3201 -float depth=unpackRGBAToDepth(texture2D(depthBuffer,uv)); -#else -float depth=texture2D(depthBuffer,uv).r; -#endif -#ifdef LOG_DEPTH -float d=pow(2.0,depth*log2(cameraFar+1.0))-1.0;float a=cameraFar/(cameraFar-cameraNear);float b=cameraFar*cameraNear/(cameraNear-cameraFar);depth=a+b/d; -#endif -return depth;}void main(){float depth=readDepth(vUv); -#ifdef PERSPECTIVE_CAMERA -float viewZ=perspectiveDepthToViewZ(depth,cameraNear,cameraFar);float linearDepth=viewZToOrthographicDepth(viewZ,cameraNear,cameraFar); +uniform highp sampler2D lut; #else -float linearDepth=depth; +uniform mediump sampler2D lut; #endif -float signedDistance=linearDepth-focusDistance;float magnitude=smoothstep(0.0,focusRange,abs(signedDistance));gl_FragColor.rg=magnitude*vec2(step(signedDistance,0.0),step(0.0,signedDistance));}`,CircleOfConfusionMaterial=class extends ShaderMaterial{constructor(tt){super({name:"CircleOfConfusionMaterial",defines:{DEPTH_PACKING:"0"},uniforms:{depthBuffer:new Uniform(null),focusDistance:new Uniform(0),focusRange:new Uniform(0),cameraNear:new Uniform(.3),cameraFar:new Uniform(1e3)},blending:NoBlending,toneMapped:!1,depthWrite:!1,depthTest:!1,fragmentShader:circle_of_confusion_default,vertexShader:common_default}),this.uniforms.focalLength=this.uniforms.focusRange,this.copyCameraSettings(tt)}get near(){return this.uniforms.cameraNear.value}get far(){return this.uniforms.cameraFar.value}set depthBuffer(tt){this.uniforms.depthBuffer.value=tt}set depthPacking(tt){this.defines.DEPTH_PACKING=tt.toFixed(0),this.needsUpdate=!0}setDepthBuffer(tt,et=BasicDepthPacking){this.depthBuffer=tt,this.depthPacking=et}get focusDistance(){return this.uniforms.focusDistance.value}set focusDistance(tt){this.uniforms.focusDistance.value=tt}get worldFocusDistance(){return-orthographicDepthToViewZ(this.focusDistance,this.near,this.far)}set worldFocusDistance(tt){this.focusDistance=viewZToOrthographicDepth(-tt,this.near,this.far)}getFocusDistance(tt){this.uniforms.focusDistance.value=tt}setFocusDistance(tt){this.uniforms.focusDistance.value=tt}get focalLength(){return this.focusRange}set focalLength(tt){this.focusRange=tt}get focusRange(){return this.uniforms.focusRange.value}set focusRange(tt){this.uniforms.focusRange.value=tt}get worldFocusRange(){return-orthographicDepthToViewZ(this.focusRange,this.near,this.far)}set worldFocusRange(tt){this.focusRange=viewZToOrthographicDepth(-tt,this.near,this.far)}getFocalLength(tt){return this.focusRange}setFocalLength(tt){this.focusRange=tt}adoptCameraSettings(tt){this.copyCameraSettings(tt)}copyCameraSettings(tt){tt&&(this.uniforms.cameraNear.value=tt.near,this.uniforms.cameraFar.value=tt.far,tt instanceof PerspectiveCamera?this.defines.PERSPECTIVE_CAMERA="1":delete this.defines.PERSPECTIVE_CAMERA,this.needsUpdate=!0)}},convolution_kawase_default=`#ifdef FRAMEBUFFER_PRECISION_HIGH -uniform mediump sampler2D inputBuffer; #else -uniform lowp sampler2D inputBuffer; +uniform lowp sampler2D lut; #endif -varying vec2 vUv0;varying vec2 vUv1;varying vec2 vUv2;varying vec2 vUv3;void main(){vec4 sum=texture2D(inputBuffer,vUv0);sum+=texture2D(inputBuffer,vUv1);sum+=texture2D(inputBuffer,vUv2);sum+=texture2D(inputBuffer,vUv3);gl_FragColor=sum*0.25; -#include -}`,convolution_kawase_default2="uniform vec4 texelSize;uniform float kernel;uniform float scale;varying vec2 vUv0;varying vec2 vUv1;varying vec2 vUv2;varying vec2 vUv3;void main(){vec2 uv=position.xy*0.5+0.5;vec2 dUv=(texelSize.xy*vec2(kernel)+texelSize.zw)*scale;vUv0=vec2(uv.x-dUv.x,uv.y+dUv.y);vUv1=vec2(uv.x+dUv.x,uv.y+dUv.y);vUv2=vec2(uv.x+dUv.x,uv.y-dUv.y);vUv3=vec2(uv.x-dUv.x,uv.y-dUv.y);gl_Position=vec4(position.xy,1.0,1.0);}",kernelPresets=[new Float32Array([0,0]),new Float32Array([0,1,1]),new Float32Array([0,1,1,2]),new Float32Array([0,1,2,2,3]),new Float32Array([0,1,2,3,4,4,5]),new Float32Array([0,1,2,3,4,5,7,8,9,10])],KawaseBlurMaterial=class extends ShaderMaterial{constructor(tt=new Vector4){super({name:"KawaseBlurMaterial",uniforms:{inputBuffer:new Uniform(null),texelSize:new Uniform(new Vector4),scale:new Uniform(1),kernel:new Uniform(0)},blending:NoBlending,toneMapped:!1,depthWrite:!1,depthTest:!1,fragmentShader:convolution_kawase_default,vertexShader:convolution_kawase_default2}),this.fragmentShader=updateFragmentShader(this.fragmentShader),this.setTexelSize(tt.x,tt.y),this.kernelSize=KernelSize.MEDIUM}set inputBuffer(tt){this.uniforms.inputBuffer.value=tt}setInputBuffer(tt){this.inputBuffer=tt}get kernelSequence(){return kernelPresets[this.kernelSize]}get scale(){return this.uniforms.scale.value}set scale(tt){this.uniforms.scale.value=tt}getScale(){return this.uniforms.scale.value}setScale(tt){this.uniforms.scale.value=tt}getKernel(){return null}get kernel(){return this.uniforms.kernel.value}set kernel(tt){this.uniforms.kernel.value=tt}setKernel(tt){this.kernel=tt}setTexelSize(tt,et){this.uniforms.texelSize.value.set(tt,et,tt*.5,et*.5)}setSize(tt,et){const nt=1/tt,rt=1/et;this.uniforms.texelSize.value.set(nt,rt,nt*.5,rt*.5)}},copy_default=`#include -#include -#ifdef FRAMEBUFFER_PRECISION_HIGH -uniform mediump sampler2D inputBuffer; +vec4 applyLUT(const in vec3 rgb){float slice=rgb.b*LUT_SIZE;float slice0=floor(slice);float interp=slice-slice0;float centeredInterp=interp-0.5;float slice1=slice0+sign(centeredInterp); +#ifdef LUT_STRIP_HORIZONTAL +float xOffset=clamp(rgb.r*LUT_TEXEL_HEIGHT,LUT_TEXEL_WIDTH*0.5,LUT_TEXEL_HEIGHT-LUT_TEXEL_WIDTH*0.5);vec2 uv0=vec2(slice0*LUT_TEXEL_HEIGHT+xOffset,rgb.g);vec2 uv1=vec2(slice1*LUT_TEXEL_HEIGHT+xOffset,rgb.g); #else -uniform lowp sampler2D inputBuffer; +float yOffset=clamp(rgb.g*LUT_TEXEL_WIDTH,LUT_TEXEL_HEIGHT*0.5,LUT_TEXEL_WIDTH-LUT_TEXEL_HEIGHT*0.5);vec2 uv0=vec2(rgb.r,slice0*LUT_TEXEL_WIDTH+yOffset);vec2 uv1=vec2(rgb.r,slice1*LUT_TEXEL_WIDTH+yOffset); #endif -uniform float opacity;varying vec2 vUv;void main(){vec4 texel=texture2D(inputBuffer,vUv);gl_FragColor=opacity*texel; -#include -#include -}`,CopyMaterial=class extends ShaderMaterial{constructor(){super({name:"CopyMaterial",uniforms:{inputBuffer:new Uniform(null),opacity:new Uniform(1)},blending:NoBlending,toneMapped:!1,depthWrite:!1,depthTest:!1,fragmentShader:copy_default,vertexShader:common_default}),this.fragmentShader=updateFragmentShader(this.fragmentShader)}set inputBuffer(tt){this.uniforms.inputBuffer.value=tt}setInputBuffer(tt){this.uniforms.inputBuffer.value=tt}getOpacity(tt){return this.uniforms.opacity.value}setOpacity(tt){this.uniforms.opacity.value=tt}},depth_comparison_default=`#include -#include -#ifdef GL_FRAGMENT_PRECISION_HIGH -uniform highp sampler2D depthBuffer; -#else -uniform mediump sampler2D depthBuffer; +vec4 sample0=texture2D(lut,uv0);vec4 sample1=texture2D(lut,uv1);return mix(sample0,sample1,abs(centeredInterp));} #endif -uniform float cameraNear;uniform float cameraFar;centroid varying float vViewZ;centroid varying vec4 vProjTexCoord;void main(){ -#include -vec2 projTexCoord=(vProjTexCoord.xy/vProjTexCoord.w)*0.5+0.5;projTexCoord=clamp(projTexCoord,0.002,0.998); -#if DEPTH_PACKING == 3201 -float fragCoordZ=unpackRGBAToDepth(texture2D(depthBuffer,projTexCoord)); +void mainImage(const in vec4 inputColor,const in vec2 uv,out vec4 outputColor){vec3 c=inputColor.rgb; +#ifdef CUSTOM_INPUT_DOMAIN +if(c.r>=domainMin.r&&c.g>=domainMin.g&&c.b>=domainMin.b&&c.r<=domainMax.r&&c.g<=domainMax.g&&c.b<=domainMax.b){c=applyLUT(scale*c+offset).rgb;}else{c=inputColor.rgb;} #else -float fragCoordZ=texture2D(depthBuffer,projTexCoord).r; +#if !defined(LUT_3D) || defined(TETRAHEDRAL_INTERPOLATION) +c=clamp(c,0.0,1.0); #endif -#ifdef PERSPECTIVE_CAMERA -float viewZ=perspectiveDepthToViewZ(fragCoordZ,cameraNear,cameraFar); -#else -float viewZ=orthographicDepthToViewZ(fragCoordZ,cameraNear,cameraFar); +c=applyLUT(scale*c+offset).rgb; #endif -float depthTest=(-vViewZ>-viewZ)?1.0:0.0;gl_FragColor.rg=vec2(0.0,depthTest);}`,depth_comparison_default2=`#include -#include -#include -#include -varying float vViewZ;varying vec4 vProjTexCoord;void main(){ -#include -#include -#include -#include -#include -vViewZ=mvPosition.z;vProjTexCoord=gl_Position; -#include -}`,DepthComparisonMaterial=class extends ShaderMaterial{constructor(tt=null,et){super({name:"DepthComparisonMaterial",defines:{DEPTH_PACKING:"0"},uniforms:{depthBuffer:new Uniform(null),cameraNear:new Uniform(.3),cameraFar:new Uniform(1e3)},blending:NoBlending,toneMapped:!1,depthWrite:!1,depthTest:!1,fragmentShader:depth_comparison_default,vertexShader:depth_comparison_default2}),this.depthBuffer=tt,this.depthPacking=RGBADepthPacking,this.copyCameraSettings(et)}set depthBuffer(tt){this.uniforms.depthBuffer.value=tt}set depthPacking(tt){this.defines.DEPTH_PACKING=tt.toFixed(0),this.needsUpdate=!0}setDepthBuffer(tt,et=RGBADepthPacking){this.depthBuffer=tt,this.depthPacking=et}adoptCameraSettings(tt){this.copyCameraSettings(tt)}copyCameraSettings(tt){tt&&(this.uniforms.cameraNear.value=tt.near,this.uniforms.cameraFar.value=tt.far,tt instanceof PerspectiveCamera?this.defines.PERSPECTIVE_CAMERA="1":delete this.defines.PERSPECTIVE_CAMERA,this.needsUpdate=!0)}},depth_copy_default=`#include -varying vec2 vUv; -#ifdef NORMAL_DEPTH -#ifdef GL_FRAGMENT_PRECISION_HIGH -uniform highp sampler2D normalDepthBuffer; -#else -uniform mediump sampler2D normalDepthBuffer; +outputColor=vec4(c,inputColor.a);}`, + LUT3DEffect = class extends Effect$1 { + constructor( + tt, + { + blendFunction: et = BlendFunction.SRC, + tetrahedralInterpolation: nt = !1, + inputEncoding: rt = sRGBEncoding, + inputColorSpace: it, + } = {}, + ) { + super('LUT3DEffect', lut_3d_default, { + blendFunction: et, + uniforms: new Map([ + ['lut', new Uniform(null)], + ['scale', new Uniform(new Vector3())], + ['offset', new Uniform(new Vector3())], + ['domainMin', new Uniform(null)], + ['domainMax', new Uniform(null)], + ]), + }), + (this.tetrahedralInterpolation = nt), + (this.inputColorSpace = it || encodingToColorSpace.get(rt)), + (this.lut = tt) + } + get inputEncoding() { + return this.inputColorSpace + } + set inputEncoding(tt) { + this.inputColorSpace = tt + } + getInputEncoding() { + return this.inputColorSpace + } + setInputEncoding(tt) { + this.inputColorSpace = tt + } + getOutputEncoding() { + return this.outputColorSpace + } + get lut() { + return this.uniforms.get('lut').value + } + set lut(tt) { + const et = this.defines, + nt = this.uniforms + if (this.lut !== tt && ((nt.get('lut').value = tt), tt !== null)) { + const rt = tt.image, + it = this.tetrahedralInterpolation + if ( + (et.clear(), + et.set('LUT_SIZE', Math.min(rt.width, rt.height).toFixed(16)), + et.set('LUT_TEXEL_WIDTH', (1 / rt.width).toFixed(16)), + et.set('LUT_TEXEL_HEIGHT', (1 / rt.height).toFixed(16)), + (nt.get('domainMin').value = null), + (nt.get('domainMax').value = null), + (tt.type === FloatType || tt.type === HalfFloatType) && et.set('LUT_PRECISION_HIGH', '1'), + rt.width > rt.height + ? et.set('LUT_STRIP_HORIZONTAL', '1') + : tt instanceof Data3DTexture && et.set('LUT_3D', '1'), + tt instanceof LookupTexture) + ) { + const ot = tt.domainMin, + at = tt.domainMax + ;(ot.x !== 0 || ot.y !== 0 || ot.z !== 0 || at.x !== 1 || at.y !== 1 || at.z !== 1) && + (et.set('CUSTOM_INPUT_DOMAIN', '1'), + (nt.get('domainMin').value = ot.clone()), + (nt.get('domainMax').value = at.clone())) + } + this.tetrahedralInterpolation = it + } + } + getLUT() { + return this.lut + } + setLUT(tt) { + this.lut = tt + } + updateScaleOffset() { + const tt = this.lut + if (tt !== null) { + const et = Math.min(tt.image.width, tt.image.height), + nt = this.uniforms.get('scale').value, + rt = this.uniforms.get('offset').value + if (this.tetrahedralInterpolation && tt instanceof Data3DTexture) + if (this.defines.has('CUSTOM_INPUT_DOMAIN')) { + const it = tt.domainMax.clone().sub(tt.domainMin) + nt.setScalar(et - 1).divide(it), rt.copy(tt.domainMin).negate().multiply(nt) + } else nt.setScalar(et - 1), rt.setScalar(0) + else if (this.defines.has('CUSTOM_INPUT_DOMAIN')) { + const it = tt.domainMax.clone().sub(tt.domainMin).multiplyScalar(et) + nt.setScalar(et - 1).divide(it), + rt + .copy(tt.domainMin) + .negate() + .multiply(nt) + .addScalar(1 / (2 * et)) + } else nt.setScalar((et - 1) / et), rt.setScalar(1 / (2 * et)) + } + } + configureTetrahedralInterpolation() { + const tt = this.lut + tt !== null && + ((tt.minFilter = LinearFilter), + (tt.magFilter = LinearFilter), + this.tetrahedralInterpolation && + (tt instanceof Data3DTexture + ? ((tt.minFilter = NearestFilter), (tt.magFilter = NearestFilter)) + : console.warn('Tetrahedral interpolation requires a 3D texture')), + tt.source === void 0 && (tt.needsUpdate = !0)) + } + get tetrahedralInterpolation() { + return this.defines.has('TETRAHEDRAL_INTERPOLATION') + } + set tetrahedralInterpolation(tt) { + tt ? this.defines.set('TETRAHEDRAL_INTERPOLATION', '1') : this.defines.delete('TETRAHEDRAL_INTERPOLATION'), + this.configureTetrahedralInterpolation(), + this.updateScaleOffset(), + this.setChanged() + } + setTetrahedralInterpolationEnabled(tt) { + this.tetrahedralInterpolation = tt + } + }, + outline_default3 = `uniform lowp sampler2D edgeTexture;uniform lowp sampler2D maskTexture;uniform vec3 visibleEdgeColor;uniform vec3 hiddenEdgeColor;uniform float pulse;uniform float edgeStrength; +#ifdef USE_PATTERN +uniform lowp sampler2D patternTexture;varying vec2 vUvPattern; #endif -float readDepth(const in vec2 uv){return texture2D(normalDepthBuffer,uv).a;} -#else -#if INPUT_DEPTH_PACKING == 3201 -uniform lowp sampler2D depthBuffer; -#elif defined(GL_FRAGMENT_PRECISION_HIGH) -uniform highp sampler2D depthBuffer; -#else -uniform mediump sampler2D depthBuffer; +void mainImage(const in vec4 inputColor,const in vec2 uv,out vec4 outputColor){vec2 edge=texture2D(edgeTexture,uv).rg;vec2 mask=texture2D(maskTexture,uv).rg; +#ifndef X_RAY +edge.y=0.0; #endif -float readDepth(const in vec2 uv){ -#if INPUT_DEPTH_PACKING == 3201 -return unpackRGBAToDepth(texture2D(depthBuffer,uv)); +edge*=(edgeStrength*mask.x*pulse);vec3 color=edge.x*visibleEdgeColor+edge.y*hiddenEdgeColor;float visibilityFactor=0.0; +#ifdef USE_PATTERN +vec4 patternColor=texture2D(patternTexture,vUvPattern); +#ifdef X_RAY +float hiddenFactor=0.5; #else -return texture2D(depthBuffer,uv).r; +float hiddenFactor=0.0; #endif -} +visibilityFactor=(1.0-mask.y>0.0)?1.0:hiddenFactor;visibilityFactor*=(1.0-mask.x)*patternColor.a;color+=visibilityFactor*patternColor.rgb; #endif -void main(){ -#if INPUT_DEPTH_PACKING == OUTPUT_DEPTH_PACKING -gl_FragColor=texture2D(depthBuffer,vUv); -#else -float depth=readDepth(vUv); -#if OUTPUT_DEPTH_PACKING == 3201 -gl_FragColor=(depth==1.0)?vec4(1.0):packDepthToRGBA(depth); +float alpha=max(max(edge.x,edge.y),visibilityFactor); +#ifdef ALPHA +outputColor=vec4(color,alpha); #else -gl_FragColor=vec4(vec3(depth),1.0); -#endif -#endif -}`,depth_copy_default2=`varying vec2 vUv; -#if DEPTH_COPY_MODE == 1 -uniform vec2 texelPosition; +outputColor=vec4(color,max(alpha,inputColor.a)); #endif -void main(){ -#if DEPTH_COPY_MODE == 1 -vUv=texelPosition; -#else -vUv=position.xy*0.5+0.5; +}`, + outline_default4 = + 'uniform float patternScale;varying vec2 vUvPattern;void mainSupport(const in vec2 uv){vUvPattern=uv*vec2(aspect,1.0)*patternScale;}', + OutlineEffect = class extends Effect$1 { + constructor( + tt, + et, + { + blendFunction: nt = BlendFunction.SCREEN, + patternTexture: rt = null, + patternScale: it = 1, + edgeStrength: ot = 1, + pulseSpeed: at = 0, + visibleEdgeColor: st = 16777215, + hiddenEdgeColor: lt = 2230538, + kernelSize: ct = KernelSize.VERY_SMALL, + blur: ut = !1, + xRay: ht = !0, + multisampling: dt = 0, + resolutionScale: pt = 0.5, + width: mt = Resolution.AUTO_SIZE, + height: gt = Resolution.AUTO_SIZE, + resolutionX: yt = mt, + resolutionY: bt = gt, + } = {}, + ) { + super('OutlineEffect', outline_default3, { + uniforms: new Map([ + ['maskTexture', new Uniform(null)], + ['edgeTexture', new Uniform(null)], + ['edgeStrength', new Uniform(ot)], + ['visibleEdgeColor', new Uniform(new Color$1(st))], + ['hiddenEdgeColor', new Uniform(new Color$1(lt))], + ['pulse', new Uniform(1)], + ['patternScale', new Uniform(it)], + ['patternTexture', new Uniform(null)], + ]), + }), + this.blendMode.addEventListener('change', (St) => { + this.blendMode.blendFunction === BlendFunction.ALPHA + ? this.defines.set('ALPHA', '1') + : this.defines.delete('ALPHA'), + this.setChanged() + }), + (this.blendMode.blendFunction = nt), + (this.patternTexture = rt), + (this.xRay = ht), + (this.scene = tt), + (this.camera = et), + (this.renderTargetMask = new WebGLRenderTarget(1, 1)), + (this.renderTargetMask.samples = dt), + (this.renderTargetMask.texture.name = 'Outline.Mask'), + (this.uniforms.get('maskTexture').value = this.renderTargetMask.texture), + (this.renderTargetOutline = new WebGLRenderTarget(1, 1, { depthBuffer: !1 })), + (this.renderTargetOutline.texture.name = 'Outline.Edges'), + (this.uniforms.get('edgeTexture').value = this.renderTargetOutline.texture), + (this.clearPass = new ClearPass()), + (this.clearPass.overrideClearColor = new Color$1(0)), + (this.clearPass.overrideClearAlpha = 1), + (this.depthPass = new DepthPass(tt, et)), + (this.maskPass = new RenderPass(tt, et, new DepthComparisonMaterial(this.depthPass.texture, et))) + const vt = this.maskPass.clearPass + ;(vt.overrideClearColor = new Color$1(16777215)), + (vt.overrideClearAlpha = 1), + (this.blurPass = new KawaseBlurPass({ + resolutionScale: pt, + resolutionX: yt, + resolutionY: bt, + kernelSize: ct, + })), + (this.blurPass.enabled = ut) + const xt = this.blurPass.resolution + xt.addEventListener('change', (St) => this.setSize(xt.baseWidth, xt.baseHeight)), + (this.outlinePass = new ShaderPass(new OutlineMaterial())) + const kt = this.outlinePass.fullscreenMaterial + ;(kt.inputBuffer = this.renderTargetMask.texture), + (this.time = 0), + (this.forceUpdate = !0), + (this.selection = new Selection$3()), + (this.selection.layer = 10), + (this.pulseSpeed = at) + } + set mainScene(tt) { + ;(this.scene = tt), (this.depthPass.mainScene = tt), (this.maskPass.mainScene = tt) + } + set mainCamera(tt) { + ;(this.camera = tt), + (this.depthPass.mainCamera = tt), + (this.maskPass.mainCamera = tt), + this.maskPass.overrideMaterial.copyCameraSettings(tt) + } + get resolution() { + return this.blurPass.resolution + } + getResolution() { + return this.blurPass.getResolution() + } + get multisampling() { + return this.renderTargetMask.samples + } + set multisampling(tt) { + ;(this.renderTargetMask.samples = tt), this.renderTargetMask.dispose() + } + get patternScale() { + return this.uniforms.get('patternScale').value + } + set patternScale(tt) { + this.uniforms.get('patternScale').value = tt + } + get edgeStrength() { + return this.uniforms.get('edgeStrength').value + } + set edgeStrength(tt) { + this.uniforms.get('edgeStrength').value = tt + } + get visibleEdgeColor() { + return this.uniforms.get('visibleEdgeColor').value + } + set visibleEdgeColor(tt) { + this.uniforms.get('visibleEdgeColor').value = tt + } + get hiddenEdgeColor() { + return this.uniforms.get('hiddenEdgeColor').value + } + set hiddenEdgeColor(tt) { + this.uniforms.get('hiddenEdgeColor').value = tt + } + getBlurPass() { + return this.blurPass + } + getSelection() { + return this.selection + } + getPulseSpeed() { + return this.pulseSpeed + } + setPulseSpeed(tt) { + this.pulseSpeed = tt + } + get width() { + return this.resolution.width + } + set width(tt) { + this.resolution.preferredWidth = tt + } + get height() { + return this.resolution.height + } + set height(tt) { + this.resolution.preferredHeight = tt + } + get selectionLayer() { + return this.selection.layer + } + set selectionLayer(tt) { + this.selection.layer = tt + } + get dithering() { + return this.blurPass.dithering + } + set dithering(tt) { + this.blurPass.dithering = tt + } + get kernelSize() { + return this.blurPass.kernelSize + } + set kernelSize(tt) { + this.blurPass.kernelSize = tt + } + get blur() { + return this.blurPass.enabled + } + set blur(tt) { + this.blurPass.enabled = tt + } + get xRay() { + return this.defines.has('X_RAY') + } + set xRay(tt) { + this.xRay !== tt && (tt ? this.defines.set('X_RAY', '1') : this.defines.delete('X_RAY'), this.setChanged()) + } + isXRayEnabled() { + return this.xRay + } + setXRayEnabled(tt) { + this.xRay = tt + } + get patternTexture() { + return this.uniforms.get('patternTexture').value + } + set patternTexture(tt) { + tt !== null + ? ((tt.wrapS = tt.wrapT = RepeatWrapping), + this.defines.set('USE_PATTERN', '1'), + this.setVertexShader(outline_default4)) + : (this.defines.delete('USE_PATTERN'), this.setVertexShader(null)), + (this.uniforms.get('patternTexture').value = tt), + this.setChanged() + } + setPatternTexture(tt) { + this.patternTexture = tt + } + getResolutionScale() { + return this.resolution.scale + } + setResolutionScale(tt) { + this.resolution.scale = tt + } + setSelection(tt) { + return this.selection.set(tt), this + } + clearSelection() { + return this.selection.clear(), this + } + selectObject(tt) { + return this.selection.add(tt), this + } + deselectObject(tt) { + return this.selection.delete(tt), this + } + update(tt, et, nt) { + const rt = this.scene, + it = this.camera, + ot = this.selection, + st = this.uniforms.get('pulse'), + lt = rt.background, + ct = it.layers.mask + ;(this.forceUpdate || ot.size > 0) && + ((rt.background = null), + (st.value = 1), + this.pulseSpeed > 0 && (st.value = Math.cos(this.time * this.pulseSpeed * 10) * 0.375 + 0.625), + (this.time += nt), + ot.setVisible(!1), + this.depthPass.render(tt), + ot.setVisible(!0), + it.layers.set(ot.layer), + this.maskPass.render(tt, this.renderTargetMask), + (it.layers.mask = ct), + (rt.background = lt), + this.outlinePass.render(tt, null, this.renderTargetOutline), + this.blurPass.enabled && this.blurPass.render(tt, this.renderTargetOutline, this.renderTargetOutline)), + (this.forceUpdate = ot.size > 0) + } + setSize(tt, et) { + this.blurPass.setSize(tt, et), this.renderTargetMask.setSize(tt, et) + const nt = this.resolution + nt.setBaseSize(tt, et) + const rt = nt.width, + it = nt.height + this.depthPass.setSize(rt, it), + this.renderTargetOutline.setSize(rt, it), + this.outlinePass.fullscreenMaterial.setSize(rt, it) + } + initialize(tt, et, nt) { + this.blurPass.initialize(tt, et, UnsignedByteType), + nt !== void 0 && + (this.depthPass.initialize(tt, et, nt), + this.maskPass.initialize(tt, et, nt), + this.outlinePass.initialize(tt, et, nt)) + } + }, + pixelation_default = + 'uniform bool active;uniform vec4 d;void mainUv(inout vec2 uv){if(active){uv=d.xy*(floor(uv*d.zw)+0.5);}}', + PixelationEffect = class extends Effect$1 { + constructor(tt = 30) { + super('PixelationEffect', pixelation_default, { + uniforms: new Map([ + ['active', new Uniform(!1)], + ['d', new Uniform(new Vector4())], + ]), + }), + (this.resolution = new Vector2()), + (this._granularity = 0), + (this.granularity = tt) + } + get granularity() { + return this._granularity + } + set granularity(tt) { + let et = Math.floor(tt) + et % 2 > 0 && (et += 1), + (this._granularity = et), + (this.uniforms.get('active').value = et > 0), + this.setSize(this.resolution.width, this.resolution.height) + } + getGranularity() { + return this.granularity + } + setGranularity(tt) { + this.granularity = tt + } + setSize(tt, et) { + const nt = this.resolution + nt.set(tt, et) + const rt = this.granularity, + it = rt / nt.x, + ot = rt / nt.y + this.uniforms.get('d').value.set(it, ot, 1 / it, 1 / ot) + } + }, + SelectiveBloomEffect = class extends BloomEffect { + constructor(tt, et, nt) { + super(nt), + this.setAttributes(this.getAttributes() | EffectAttribute.DEPTH), + (this.camera = et), + (this.depthPass = new DepthPass(tt, et)), + (this.clearPass = new ClearPass(!0, !1, !1)), + (this.clearPass.overrideClearColor = new Color$1(0)), + (this.depthMaskPass = new ShaderPass(new DepthMaskMaterial())) + const rt = this.depthMaskMaterial + rt.copyCameraSettings(et), + (rt.depthBuffer1 = this.depthPass.texture), + (rt.depthPacking1 = RGBADepthPacking), + (rt.depthMode = EqualDepth), + (this.renderTargetMasked = new WebGLRenderTarget(1, 1, { depthBuffer: !1 })), + (this.renderTargetMasked.texture.name = 'Bloom.Masked'), + (this.selection = new Selection$3()), + (this.selection.layer = 11), + (this._inverted = !1), + (this._ignoreBackground = !1) + } + set mainScene(tt) { + this.depthPass.mainScene = tt + } + set mainCamera(tt) { + ;(this.camera = tt), (this.depthPass.mainCamera = tt), this.depthMaskMaterial.copyCameraSettings(tt) + } + getSelection() { + return this.selection + } + get depthMaskMaterial() { + return this.depthMaskPass.fullscreenMaterial + } + get inverted() { + return this._inverted + } + set inverted(tt) { + ;(this._inverted = tt), (this.depthMaskMaterial.depthMode = tt ? NotEqualDepth : EqualDepth) + } + isInverted() { + return this.inverted + } + setInverted(tt) { + this.inverted = tt + } + get ignoreBackground() { + return this._ignoreBackground + } + set ignoreBackground(tt) { + ;(this._ignoreBackground = tt), + (this.depthMaskMaterial.maxDepthStrategy = tt + ? DepthTestStrategy.DISCARD_MAX_DEPTH + : DepthTestStrategy.KEEP_MAX_DEPTH) + } + isBackgroundDisabled() { + return this.ignoreBackground + } + setBackgroundDisabled(tt) { + this.ignoreBackground = tt + } + setDepthTexture(tt, et = BasicDepthPacking) { + ;(this.depthMaskMaterial.depthBuffer0 = tt), (this.depthMaskMaterial.depthPacking0 = et) + } + update(tt, et, nt) { + const rt = this.camera, + it = this.selection, + ot = this.inverted + let at = et + if (this.ignoreBackground || !ot || it.size > 0) { + const st = rt.layers.mask + rt.layers.set(it.layer), + this.depthPass.render(tt), + (rt.layers.mask = st), + (at = this.renderTargetMasked), + this.clearPass.render(tt, at), + this.depthMaskPass.render(tt, et, at) + } + super.update(tt, at, nt) + } + setSize(tt, et) { + super.setSize(tt, et), this.renderTargetMasked.setSize(tt, et), this.depthPass.setSize(tt, et) + } + initialize(tt, et, nt) { + super.initialize(tt, et, nt), + this.clearPass.initialize(tt, et, nt), + this.depthPass.initialize(tt, et, nt), + this.depthMaskPass.initialize(tt, et, nt), + tt.capabilities.logarithmicDepthBuffer && (this.depthMaskPass.fullscreenMaterial.defines.LOG_DEPTH = '1'), + nt !== void 0 && + ((this.renderTargetMasked.texture.type = nt), + getOutputColorSpace(tt) === SRGBColorSpace && + setTextureColorSpace(this.renderTargetMasked.texture, SRGBColorSpace)) + } + }, + ssao_default3 = `uniform lowp sampler2D aoBuffer;uniform float luminanceInfluence;uniform float intensity; +#if THREE_REVISION < 143 +#define luminance(v) linearToRelativeLuminance(v) #endif -gl_Position=vec4(position.xy,1.0,1.0);}`,DepthCopyMaterial=class extends ShaderMaterial{constructor(){super({name:"DepthCopyMaterial",defines:{INPUT_DEPTH_PACKING:"0",OUTPUT_DEPTH_PACKING:"0",DEPTH_COPY_MODE:"0"},uniforms:{depthBuffer:new Uniform(null),texelPosition:new Uniform(new Vector2)},blending:NoBlending,toneMapped:!1,depthWrite:!1,depthTest:!1,fragmentShader:depth_copy_default,vertexShader:depth_copy_default2}),this.depthCopyMode=DepthCopyMode.FULL}get depthBuffer(){return this.uniforms.depthBuffer.value}set depthBuffer(tt){this.uniforms.depthBuffer.value=tt}set inputDepthPacking(tt){this.defines.INPUT_DEPTH_PACKING=tt.toFixed(0),this.needsUpdate=!0}get outputDepthPacking(){return Number(this.defines.OUTPUT_DEPTH_PACKING)}set outputDepthPacking(tt){this.defines.OUTPUT_DEPTH_PACKING=tt.toFixed(0),this.needsUpdate=!0}setDepthBuffer(tt,et=BasicDepthPacking){this.depthBuffer=tt,this.inputDepthPacking=et}getInputDepthPacking(){return Number(this.defines.INPUT_DEPTH_PACKING)}setInputDepthPacking(tt){this.defines.INPUT_DEPTH_PACKING=tt.toFixed(0),this.needsUpdate=!0}getOutputDepthPacking(){return Number(this.defines.OUTPUT_DEPTH_PACKING)}setOutputDepthPacking(tt){this.defines.OUTPUT_DEPTH_PACKING=tt.toFixed(0),this.needsUpdate=!0}get texelPosition(){return this.uniforms.texelPosition.value}getTexelPosition(){return this.uniforms.texelPosition.value}setTexelPosition(tt){this.uniforms.texelPosition.value=tt}get mode(){return this.depthCopyMode}set mode(tt){this.depthCopyMode=tt,this.defines.DEPTH_COPY_MODE=tt.toFixed(0),this.needsUpdate=!0}getMode(){return this.mode}setMode(tt){this.mode=tt}},depth_downsampling_default=`#include +#if defined(DEPTH_AWARE_UPSAMPLING) && defined(NORMAL_DEPTH) #ifdef GL_FRAGMENT_PRECISION_HIGH -uniform highp sampler2D depthBuffer; +uniform highp sampler2D normalDepthBuffer; #else -uniform mediump sampler2D depthBuffer; +uniform mediump sampler2D normalDepthBuffer; #endif -#ifdef DOWNSAMPLE_NORMALS -uniform lowp sampler2D normalBuffer; #endif -varying vec2 vUv0;varying vec2 vUv1;varying vec2 vUv2;varying vec2 vUv3;float readDepth(const in vec2 uv){ -#if DEPTH_PACKING == 3201 -return unpackRGBAToDepth(texture2D(depthBuffer,uv)); -#else -return texture2D(depthBuffer,uv).r; +#ifdef COLORIZE +uniform vec3 color; #endif -}int findBestDepth(const in highp float samples[4]){float c=(samples[0]+samples[1]+samples[2]+samples[3])*0.25;highp float distances[]=float[4](abs(c-samples[0]),abs(c-samples[1]),abs(c-samples[2]),abs(c-samples[3]));float maxDistance=max(max(distances[0],distances[1]),max(distances[2],distances[3]));int remaining[3];int rejected[3];int i,j,k;for(i=0,j=0,k=0;i<4;++i){if(distances[i] -#include -#ifdef GL_FRAGMENT_PRECISION_HIGH -uniform highp sampler2D depthBuffer0;uniform highp sampler2D depthBuffer1; +float l=luminance(inputColor.rgb);ao=mix(ao,0.0,l*luminanceInfluence);ao=clamp(ao*intensity,0.0,1.0); +#ifdef COLORIZE +outputColor=vec4(1.0-ao*(1.0-color),inputColor.a); #else -uniform mediump sampler2D depthBuffer0;uniform mediump sampler2D depthBuffer1; +outputColor=vec4(vec3(1.0-ao),inputColor.a); #endif -uniform sampler2D inputBuffer;uniform vec2 cameraNearFar;float getViewZ(const in float depth){ -#ifdef PERSPECTIVE_CAMERA -return perspectiveDepthToViewZ(depth,cameraNearFar.x,cameraNearFar.y); +}`, + NOISE_TEXTURE_SIZE = 64, + SSAOEffect = class extends Effect$1 { + constructor( + tt, + et, + { + blendFunction: nt = BlendFunction.MULTIPLY, + samples: rt = 9, + rings: it = 7, + normalDepthBuffer: ot = null, + depthAwareUpsampling: at = !0, + worldDistanceThreshold: st, + worldDistanceFalloff: lt, + worldProximityThreshold: ct, + worldProximityFalloff: ut, + distanceThreshold: ht = 0.97, + distanceFalloff: dt = 0.03, + rangeThreshold: pt = 5e-4, + rangeFalloff: mt = 0.001, + minRadiusScale: gt = 0.1, + luminanceInfluence: yt = 0.7, + radius: bt = 0.1825, + intensity: vt = 1, + bias: xt = 0.025, + fade: kt = 0.01, + color: St = null, + resolutionScale: Tt = 1, + width: At = Resolution.AUTO_SIZE, + height: Et = Resolution.AUTO_SIZE, + resolutionX: $t = At, + resolutionY: Dt = Et, + } = {}, + ) { + super('SSAOEffect', ssao_default3, { + blendFunction: nt, + attributes: EffectAttribute.DEPTH, + defines: new Map([['THRESHOLD', '0.997']]), + uniforms: new Map([ + ['aoBuffer', new Uniform(null)], + ['normalDepthBuffer', new Uniform(ot)], + ['luminanceInfluence', new Uniform(yt)], + ['color', new Uniform(null)], + ['intensity', new Uniform(vt)], + ['scale', new Uniform(0)], + ]), + }), + (this.renderTarget = new WebGLRenderTarget(1, 1, { depthBuffer: !1 })), + (this.renderTarget.texture.name = 'AO.Target'), + (this.uniforms.get('aoBuffer').value = this.renderTarget.texture) + const jt = (this.resolution = new Resolution(this, $t, Dt, Tt)) + jt.addEventListener('change', (wt) => this.setSize(jt.baseWidth, jt.baseHeight)), + (this.camera = tt), + (this.depthDownsamplingPass = new DepthDownsamplingPass({ normalBuffer: et, resolutionScale: Tt })), + (this.depthDownsamplingPass.enabled = ot === null), + (this.ssaoPass = new ShaderPass(new SSAOMaterial(tt))) + const Pt = new NoiseTexture(NOISE_TEXTURE_SIZE, NOISE_TEXTURE_SIZE, RGBAFormat) + Pt.wrapS = Pt.wrapT = RepeatWrapping + const Ct = this.ssaoMaterial + ;(Ct.normalBuffer = et), + (Ct.noiseTexture = Pt), + (Ct.minRadiusScale = gt), + (Ct.samples = rt), + (Ct.radius = bt), + (Ct.rings = it), + (Ct.fade = kt), + (Ct.bias = xt), + (Ct.distanceThreshold = ht), + (Ct.distanceFalloff = dt), + (Ct.proximityThreshold = pt), + (Ct.proximityFalloff = mt), + st !== void 0 && (Ct.worldDistanceThreshold = st), + lt !== void 0 && (Ct.worldDistanceFalloff = lt), + ct !== void 0 && (Ct.worldProximityThreshold = ct), + ut !== void 0 && (Ct.worldProximityFalloff = ut), + ot !== null && ((this.ssaoMaterial.normalDepthBuffer = ot), this.defines.set('NORMAL_DEPTH', '1')), + (this.depthAwareUpsampling = at), + (this.color = St) + } + set mainCamera(tt) { + ;(this.camera = tt), this.ssaoMaterial.copyCameraSettings(tt) + } + get normalBuffer() { + return this.ssaoMaterial.normalBuffer + } + set normalBuffer(tt) { + ;(this.ssaoMaterial.normalBuffer = tt), (this.depthDownsamplingPass.fullscreenMaterial.normalBuffer = tt) + } + getResolution() { + return this.resolution + } + get ssaoMaterial() { + return this.ssaoPass.fullscreenMaterial + } + getSSAOMaterial() { + return this.ssaoMaterial + } + get samples() { + return this.ssaoMaterial.samples + } + set samples(tt) { + this.ssaoMaterial.samples = tt + } + get rings() { + return this.ssaoMaterial.rings + } + set rings(tt) { + this.ssaoMaterial.rings = tt + } + get radius() { + return this.ssaoMaterial.radius + } + set radius(tt) { + this.ssaoMaterial.radius = tt + } + get depthAwareUpsampling() { + return this.defines.has('DEPTH_AWARE_UPSAMPLING') + } + set depthAwareUpsampling(tt) { + this.depthAwareUpsampling !== tt && + (tt ? this.defines.set('DEPTH_AWARE_UPSAMPLING', '1') : this.defines.delete('DEPTH_AWARE_UPSAMPLING'), + this.setChanged()) + } + isDepthAwareUpsamplingEnabled() { + return this.depthAwareUpsampling + } + setDepthAwareUpsamplingEnabled(tt) { + this.depthAwareUpsampling = tt + } + get distanceScaling() { + return !0 + } + set distanceScaling(tt) {} + get color() { + return this.uniforms.get('color').value + } + set color(tt) { + const et = this.uniforms, + nt = this.defines + tt !== null + ? nt.has('COLORIZE') + ? et.get('color').value.set(tt) + : (nt.set('COLORIZE', '1'), (et.get('color').value = new Color$1(tt)), this.setChanged()) + : nt.has('COLORIZE') && (nt.delete('COLORIZE'), (et.get('color').value = null), this.setChanged()) + } + get luminanceInfluence() { + return this.uniforms.get('luminanceInfluence').value + } + set luminanceInfluence(tt) { + this.uniforms.get('luminanceInfluence').value = tt + } + get intensity() { + return this.uniforms.get('intensity').value + } + set intensity(tt) { + this.uniforms.get('intensity').value = tt + } + getColor() { + return this.color + } + setColor(tt) { + this.color = tt + } + setDistanceCutoff(tt, et) { + ;(this.ssaoMaterial.distanceThreshold = tt), (this.ssaoMaterial.distanceFalloff = et) + } + setProximityCutoff(tt, et) { + ;(this.ssaoMaterial.proximityThreshold = tt), (this.ssaoMaterial.proximityFalloff = et) + } + setDepthTexture(tt, et = BasicDepthPacking) { + this.depthDownsamplingPass.setDepthTexture(tt, et), + (this.ssaoMaterial.depthBuffer = tt), + (this.ssaoMaterial.depthPacking = et) + } + update(tt, et, nt) { + const rt = this.renderTarget + this.depthDownsamplingPass.enabled && this.depthDownsamplingPass.render(tt), this.ssaoPass.render(tt, null, rt) + } + setSize(tt, et) { + const nt = this.resolution + nt.setBaseSize(tt, et) + const rt = nt.width, + it = nt.height + this.ssaoMaterial.copyCameraSettings(this.camera), + this.ssaoMaterial.setSize(rt, it), + this.renderTarget.setSize(rt, it), + (this.depthDownsamplingPass.resolution.scale = nt.scale), + this.depthDownsamplingPass.setSize(tt, et) + } + initialize(tt, et, nt) { + try { + let rt = this.uniforms.get('normalDepthBuffer').value + rt === null && + (this.depthDownsamplingPass.initialize(tt, et, nt), + (rt = this.depthDownsamplingPass.texture), + (this.uniforms.get('normalDepthBuffer').value = rt), + (this.ssaoMaterial.normalDepthBuffer = rt), + this.defines.set('NORMAL_DEPTH', '1')) + } catch { + this.depthDownsamplingPass.enabled = !1 + } + } + }, + texture_default = `#ifdef TEXTURE_PRECISION_HIGH +uniform mediump sampler2D map; #else -return orthographicDepthToViewZ(depth,cameraNearFar.x,cameraNearFar.y); +uniform lowp sampler2D map; #endif -}varying vec2 vUv;void main(){vec2 depth; -#if DEPTH_PACKING_0 == 3201 -depth.x=unpackRGBAToDepth(texture2D(depthBuffer0,vUv)); +varying vec2 vUv2;void mainImage(const in vec4 inputColor,const in vec2 uv,out vec4 outputColor){ +#ifdef UV_TRANSFORM +vec4 texel=texture2D(map,vUv2); #else -depth.x=texture2D(depthBuffer0,vUv).r; -#ifdef LOG_DEPTH -float d=pow(2.0,depth.x*log2(cameraNearFar.y+1.0))-1.0;float a=cameraNearFar.y/(cameraNearFar.y-cameraNearFar.x);float b=cameraNearFar.y*cameraNearFar.x/(cameraNearFar.x-cameraNearFar.y);depth.x=a+b/d; -#endif +vec4 texel=texture2D(map,uv); #endif -#if DEPTH_PACKING_1 == 3201 -depth.y=unpackRGBAToDepth(texture2D(depthBuffer1,vUv)); +outputColor=TEXEL;}`, + texture_default2 = `#ifdef ASPECT_CORRECTION +uniform float scale; #else -depth.y=texture2D(depthBuffer1,vUv).r; -#ifdef LOG_DEPTH -float d=pow(2.0,depth.y*log2(cameraNearFar.y+1.0))-1.0;float a=cameraNearFar.y/(cameraNearFar.y-cameraNearFar.x);float b=cameraNearFar.y*cameraNearFar.x/(cameraNearFar.x-cameraNearFar.y);depth.y=a+b/d; -#endif -#endif -bool isMaxDepth=(depth.x==1.0); -#ifdef PERSPECTIVE_CAMERA -depth.x=viewZToOrthographicDepth(getViewZ(depth.x),cameraNearFar.x,cameraNearFar.y);depth.y=viewZToOrthographicDepth(getViewZ(depth.y),cameraNearFar.x,cameraNearFar.y); +uniform mat3 uvTransform; #endif -#if DEPTH_TEST_STRATEGY == 0 -bool keep=depthTest(depth.x,depth.y); -#elif DEPTH_TEST_STRATEGY == 1 -bool keep=isMaxDepth||depthTest(depth.x,depth.y); +varying vec2 vUv2;void mainSupport(const in vec2 uv){ +#ifdef ASPECT_CORRECTION +vUv2=uv*vec2(aspect,1.0)*scale; #else -bool keep=!isMaxDepth&&depthTest(depth.x,depth.y); +vUv2=(uvTransform*vec3(uv,1.0)).xy; #endif -if(keep){gl_FragColor=texture2D(inputBuffer,vUv);}else{discard;}}`,DepthMaskMaterial=class extends ShaderMaterial{constructor(){super({name:"DepthMaskMaterial",defines:{DEPTH_EPSILON:"0.0001",DEPTH_PACKING_0:"0",DEPTH_PACKING_1:"0",DEPTH_TEST_STRATEGY:DepthTestStrategy.KEEP_MAX_DEPTH},uniforms:{inputBuffer:new Uniform(null),depthBuffer0:new Uniform(null),depthBuffer1:new Uniform(null),cameraNearFar:new Uniform(new Vector2(1,1))},blending:NoBlending,toneMapped:!1,depthWrite:!1,depthTest:!1,fragmentShader:depth_mask_default,vertexShader:common_default}),this.depthMode=LessDepth}set depthBuffer0(tt){this.uniforms.depthBuffer0.value=tt}set depthPacking0(tt){this.defines.DEPTH_PACKING_0=tt.toFixed(0),this.needsUpdate=!0}setDepthBuffer0(tt,et=BasicDepthPacking){this.depthBuffer0=tt,this.depthPacking0=et}set depthBuffer1(tt){this.uniforms.depthBuffer1.value=tt}set depthPacking1(tt){this.defines.DEPTH_PACKING_1=tt.toFixed(0),this.needsUpdate=!0}setDepthBuffer1(tt,et=BasicDepthPacking){this.depthBuffer1=tt,this.depthPacking1=et}get maxDepthStrategy(){return Number(this.defines.DEPTH_TEST_STRATEGY)}set maxDepthStrategy(tt){this.defines.DEPTH_TEST_STRATEGY=tt.toFixed(0),this.needsUpdate=!0}get keepFar(){return this.maxDepthStrategy}set keepFar(tt){this.maxDepthStrategy=tt?DepthTestStrategy.KEEP_MAX_DEPTH:DepthTestStrategy.DISCARD_MAX_DEPTH}getMaxDepthStrategy(){return this.maxDepthStrategy}setMaxDepthStrategy(tt){this.maxDepthStrategy=tt}get epsilon(){return Number(this.defines.DEPTH_EPSILON)}set epsilon(tt){this.defines.DEPTH_EPSILON=tt.toFixed(16),this.needsUpdate=!0}getEpsilon(){return this.epsilon}setEpsilon(tt){this.epsilon=tt}get depthMode(){return Number(this.defines.DEPTH_MODE)}set depthMode(tt){let et;switch(tt){case NeverDepth:et="false";break;case AlwaysDepth:et="true";break;case EqualDepth:et="abs(d1 - d0) <= DEPTH_EPSILON";break;case NotEqualDepth:et="abs(d1 - d0) > DEPTH_EPSILON";break;case LessDepth:et="d0 > d1";break;case LessEqualDepth:et="d0 >= d1";break;case GreaterEqualDepth:et="d0 <= d1";break;case GreaterDepth:default:et="d0 < d1";break}this.defines.DEPTH_MODE=tt.toFixed(0),this.defines["depthTest(d0, d1)"]=et,this.needsUpdate=!0}getDepthMode(){return this.depthMode}setDepthMode(tt){this.depthMode=tt}adoptCameraSettings(tt){this.copyCameraSettings(tt)}copyCameraSettings(tt){tt&&(this.uniforms.cameraNearFar.value.set(tt.near,tt.far),tt instanceof PerspectiveCamera?this.defines.PERSPECTIVE_CAMERA="1":delete this.defines.PERSPECTIVE_CAMERA,this.needsUpdate=!0)}},convolution_downsampling_default=`#ifdef FRAMEBUFFER_PRECISION_HIGH -uniform mediump sampler2D inputBuffer; +}`, + TextureEffect = class extends Effect$1 { + constructor({ blendFunction: tt, texture: et = null, aspectCorrection: nt = !1 } = {}) { + super('TextureEffect', texture_default, { + blendFunction: tt, + defines: new Map([['TEXEL', 'texel']]), + uniforms: new Map([ + ['map', new Uniform(null)], + ['scale', new Uniform(1)], + ['uvTransform', new Uniform(null)], + ]), + }), + (this.texture = et), + (this.aspectCorrection = nt) + } + get texture() { + return this.uniforms.get('map').value + } + set texture(tt) { + const et = this.texture, + nt = this.uniforms, + rt = this.defines + et !== tt && + ((nt.get('map').value = tt), + (nt.get('uvTransform').value = tt.matrix), + rt.delete('TEXTURE_PRECISION_HIGH'), + tt !== null && + (tt.matrixAutoUpdate + ? (rt.set('UV_TRANSFORM', '1'), this.setVertexShader(texture_default2)) + : (rt.delete('UV_TRANSFORM'), this.setVertexShader(null)), + tt.type !== UnsignedByteType && rt.set('TEXTURE_PRECISION_HIGH', '1'), + (et === null || et.type !== tt.type || et.encoding !== tt.encoding) && this.setChanged())) + } + getTexture() { + return this.texture + } + setTexture(tt) { + this.texture = tt + } + get aspectCorrection() { + return this.defines.has('ASPECT_CORRECTION') + } + set aspectCorrection(tt) { + this.aspectCorrection !== tt && + (tt ? this.defines.set('ASPECT_CORRECTION', '1') : this.defines.delete('ASPECT_CORRECTION'), + this.setChanged()) + } + get uvTransform() { + const tt = this.texture + return tt !== null && tt.matrixAutoUpdate + } + set uvTransform(tt) { + const et = this.texture + et !== null && (et.matrixAutoUpdate = tt) + } + setTextureSwizzleRGBA(tt, et = tt, nt = tt, rt = tt) { + const it = 'rgba' + let ot = '' + ;(tt !== ColorChannel.RED || + et !== ColorChannel.GREEN || + nt !== ColorChannel.BLUE || + rt !== ColorChannel.ALPHA) && + (ot = ['.', it[tt], it[et], it[nt], it[rt]].join('')), + this.defines.set('TEXEL', 'texel' + ot), + this.setChanged() + } + update(tt, et, nt) { + this.texture.matrixAutoUpdate && this.texture.updateMatrix() + } + }, + vignette_default = `uniform float offset;uniform float darkness;void mainImage(const in vec4 inputColor,const in vec2 uv,out vec4 outputColor){const vec2 center=vec2(0.5);vec3 color=inputColor.rgb; +#if VIGNETTE_TECHNIQUE == 0 +float d=distance(uv,center);color*=smoothstep(0.8,offset*0.799,d*(darkness+offset)); #else -uniform lowp sampler2D inputBuffer; +vec2 coord=(uv-center)*vec2(offset);color=mix(color,vec3(1.0-darkness),dot(coord,coord)); +#endif +outputColor=vec4(color,inputColor.a);}`, + VignetteEffect = class extends Effect$1 { + constructor({ + blendFunction: tt, + technique: et = VignetteTechnique.DEFAULT, + eskil: nt = !1, + offset: rt = 0.5, + darkness: it = 0.5, + } = {}) { + super('VignetteEffect', vignette_default, { + blendFunction: tt, + defines: new Map([['VIGNETTE_TECHNIQUE', et.toFixed(0)]]), + uniforms: new Map([ + ['offset', new Uniform(rt)], + ['darkness', new Uniform(it)], + ]), + }) + } + get technique() { + return Number(this.defines.get('VIGNETTE_TECHNIQUE')) + } + set technique(tt) { + this.technique !== tt && (this.defines.set('VIGNETTE_TECHNIQUE', tt.toFixed(0)), this.setChanged()) + } + get eskil() { + return this.technique === VignetteTechnique.ESKIL + } + set eskil(tt) { + this.technique = tt ? VignetteTechnique.ESKIL : VignetteTechnique.DEFAULT + } + getTechnique() { + return this.technique + } + setTechnique(tt) { + this.technique = tt + } + get offset() { + return this.uniforms.get('offset').value + } + set offset(tt) { + this.uniforms.get('offset').value = tt + } + getOffset() { + return this.offset + } + setOffset(tt) { + this.offset = tt + } + get darkness() { + return this.uniforms.get('darkness').value + } + set darkness(tt) { + this.uniforms.get('darkness').value = tt + } + getDarkness() { + return this.darkness + } + setDarkness(tt) { + this.darkness = tt + } + } + function _defineProperty$C(tt, et, nt) { + return ( + et in tt + ? Object.defineProperty(tt, et, { value: nt, enumerable: !0, configurable: !0, writable: !0 }) + : (tt[et] = nt), + tt + ) + } + function _arrayLikeToArray$o(tt, et) { + ;(et == null || et > tt.length) && (et = tt.length) + for (var nt = 0, rt = new Array(et); nt < et; nt++) rt[nt] = tt[nt] + return rt + } + function _unsupportedIterableToArray$o(tt, et) { + if (tt) { + if (typeof tt == 'string') return _arrayLikeToArray$o(tt, et) + var nt = Object.prototype.toString.call(tt).slice(8, -1) + if ((nt === 'Object' && tt.constructor && (nt = tt.constructor.name), nt === 'Map' || nt === 'Set')) + return Array.from(tt) + if (nt === 'Arguments' || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(nt)) return _arrayLikeToArray$o(tt, et) + } + } + function _arrayWithoutHoles$d(tt) { + if (Array.isArray(tt)) return _arrayLikeToArray$o(tt) + } + function _iterableToArray$e(tt) { + if ((typeof Symbol < 'u' && tt[Symbol.iterator] != null) || tt['@@iterator'] != null) return Array.from(tt) + } + function _nonIterableSpread$d() { + throw new TypeError(`Invalid attempt to spread non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`) + } + function _toConsumableArray$d(tt) { + return ( + _arrayWithoutHoles$d(tt) || _iterableToArray$e(tt) || _unsupportedIterableToArray$o(tt) || _nonIterableSpread$d() + ) + } + new Vector2() + new Vector2() + function clamp$3(tt, et, nt) { + return Math.max(et, Math.min(nt, tt)) + } + function repeat(tt, et) { + return clamp$3(tt - Math.floor(tt / et) * et, 0, et) + } + function deltaAngle(tt, et) { + var nt = repeat(et - tt, Math.PI * 2) + return nt > Math.PI && (nt -= Math.PI * 2), nt + } + function _classCallCheck$f(tt, et) { + if (!(tt instanceof et)) throw new TypeError('Cannot call a class as a function') + } + var Grad = function tt(et, nt, rt) { + var it = this + _classCallCheck$f(this, tt), + _defineProperty$C(this, 'dot2', function (ot, at) { + return it.x * ot + it.y * at + }), + _defineProperty$C(this, 'dot3', function (ot, at, st) { + return it.x * ot + it.y * at + it.z * st + }), + (this.x = et), + (this.y = nt), + (this.z = rt) + }, + grad3 = [ + new Grad(1, 1, 0), + new Grad(-1, 1, 0), + new Grad(1, -1, 0), + new Grad(-1, -1, 0), + new Grad(1, 0, 1), + new Grad(-1, 0, 1), + new Grad(1, 0, -1), + new Grad(-1, 0, -1), + new Grad(0, 1, 1), + new Grad(0, -1, 1), + new Grad(0, 1, -1), + new Grad(0, -1, -1), + ], + p$1 = [ + 151, 160, 137, 91, 90, 15, 131, 13, 201, 95, 96, 53, 194, 233, 7, 225, 140, 36, 103, 30, 69, 142, 8, 99, 37, 240, + 21, 10, 23, 190, 6, 148, 247, 120, 234, 75, 0, 26, 197, 62, 94, 252, 219, 203, 117, 35, 11, 32, 57, 177, 33, 88, + 237, 149, 56, 87, 174, 20, 125, 136, 171, 168, 68, 175, 74, 165, 71, 134, 139, 48, 27, 166, 77, 146, 158, 231, 83, + 111, 229, 122, 60, 211, 133, 230, 220, 105, 92, 41, 55, 46, 245, 40, 244, 102, 143, 54, 65, 25, 63, 161, 1, 216, + 80, 73, 209, 76, 132, 187, 208, 89, 18, 169, 200, 196, 135, 130, 116, 188, 159, 86, 164, 100, 109, 198, 173, 186, + 3, 64, 52, 217, 226, 250, 124, 123, 5, 202, 38, 147, 118, 126, 255, 82, 85, 212, 207, 206, 59, 227, 47, 16, 58, + 17, 182, 189, 28, 42, 223, 183, 170, 213, 119, 248, 152, 2, 44, 154, 163, 70, 221, 153, 101, 155, 167, 43, 172, 9, + 129, 22, 39, 253, 19, 98, 108, 110, 79, 113, 224, 232, 178, 185, 112, 104, 218, 246, 97, 228, 251, 34, 242, 193, + 238, 210, 144, 12, 191, 179, 162, 241, 81, 51, 145, 235, 249, 14, 239, 107, 49, 192, 214, 31, 181, 199, 106, 157, + 184, 84, 204, 176, 115, 121, 50, 45, 127, 4, 150, 254, 138, 236, 205, 93, 222, 114, 67, 29, 24, 72, 243, 141, 128, + 195, 78, 66, 215, 61, 156, 180, + ], + perm = new Array(512), + gradP = new Array(512), + seed$1 = function (et) { + et > 0 && et < 1 && (et *= 65536), (et = Math.floor(et)), et < 256 && (et |= et << 8) + for (var nt = 0; nt < 256; nt++) { + var rt + nt & 1 ? (rt = p$1[nt] ^ (et & 255)) : (rt = p$1[nt] ^ ((et >> 8) & 255)), + (perm[nt] = perm[nt + 256] = rt), + (gradP[nt] = gradP[nt + 256] = grad3[rt % 12]) + } + } + seed$1(0) + function normalizeSeed(tt) { + if (typeof tt == 'number') tt = Math.abs(tt) + else if (typeof tt == 'string') { + var et = tt + tt = 0 + for (var nt = 0; nt < et.length; nt++) tt = (tt + (nt + 1) * (et.charCodeAt(nt) % 96)) % 2147483647 + } + return tt === 0 && (tt = 311), tt + } + function lcgRandom(tt) { + var et = normalizeSeed(tt) + return function () { + var nt = (et * 48271) % 2147483647 + return (et = nt), nt / 2147483647 + } + } + var Generator = function tt(et) { + var nt = this + _classCallCheck$f(this, tt), + _defineProperty$C(this, 'seed', 0), + _defineProperty$C(this, 'init', function (rt) { + ;(nt.seed = rt), (nt.value = lcgRandom(rt)) + }), + _defineProperty$C(this, 'value', lcgRandom(this.seed)), + this.init(et) + } + new Generator(Math.random()) + var rsqw = function (et) { + var nt = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0.01, + rt = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 1, + it = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : 1 / (2 * Math.PI) + return (rt / Math.atan(1 / nt)) * Math.atan(Math.sin(2 * Math.PI * et * it) / nt) + }, + exp$1 = function (et) { + return 1 / (1 + et + 0.48 * et * et + 0.235 * et * et * et) + } + function damp(tt, et, nt) { + var rt = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : 0.25, + it = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : 0.01, + ot = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : 1 / 0, + at = arguments.length > 6 && arguments[6] !== void 0 ? arguments[6] : exp$1, + st = arguments.length > 7 && arguments[7] !== void 0 ? arguments[7] : 0.001, + lt = 'velocity_' + et + if ( + (tt.__damp === void 0 && (tt.__damp = {}), + tt.__damp[lt] === void 0 && (tt.__damp[lt] = 0), + Math.abs(tt[et] - nt) <= st) + ) + return (tt[et] = nt), !1 + rt = Math.max(1e-4, rt) + var ct = 2 / rt, + ut = at(ct * it), + ht = tt[et] - nt, + dt = nt, + pt = ot * rt + ;(ht = Math.min(Math.max(ht, -pt), pt)), (nt = tt[et] - ht) + var mt = (tt.__damp[lt] + ct * ht) * it + tt.__damp[lt] = (tt.__damp[lt] - ct * mt) * ut + var gt = nt + (ht + mt) * ut + return dt - tt[et] > 0 == gt > dt && ((gt = dt), (tt.__damp[lt] = (gt - dt) / it)), (tt[et] = gt), !0 + } + function dampAngle(tt, et, nt, rt, it, ot, at, st) { + return damp(tt, et, tt[et] + deltaAngle(tt[et], nt), rt, it, ot, at, st) + } + var v2d = new Vector2(), + a2, + b2 + function damp2(tt, et, nt, rt, it, ot, at) { + return ( + typeof et == 'number' ? v2d.setScalar(et) : Array.isArray(et) ? v2d.set(et[0], et[1]) : v2d.copy(et), + (a2 = damp(tt, 'x', v2d.x, nt, rt, it, ot, at)), + (b2 = damp(tt, 'y', v2d.y, nt, rt, it, ot, at)), + a2 || b2 + ) + } + var v3d = new Vector3(), + a3, + b3, + c3 + function damp3(tt, et, nt, rt, it, ot, at) { + return ( + typeof et == 'number' ? v3d.setScalar(et) : Array.isArray(et) ? v3d.set(et[0], et[1], et[2]) : v3d.copy(et), + (a3 = damp(tt, 'x', v3d.x, nt, rt, it, ot, at)), + (b3 = damp(tt, 'y', v3d.y, nt, rt, it, ot, at)), + (c3 = damp(tt, 'z', v3d.z, nt, rt, it, ot, at)), + a3 || b3 || c3 + ) + } + var v4d = new Vector4(), + a4, + b4, + c4, + d4 + function damp4(tt, et, nt, rt, it, ot, at) { + return ( + typeof et == 'number' + ? v4d.setScalar(et) + : Array.isArray(et) + ? v4d.set(et[0], et[1], et[2], et[3]) + : v4d.copy(et), + (a4 = damp(tt, 'x', v4d.x, nt, rt, it, ot, at)), + (b4 = damp(tt, 'y', v4d.y, nt, rt, it, ot, at)), + (c4 = damp(tt, 'z', v4d.z, nt, rt, it, ot, at)), + (d4 = damp(tt, 'w', v4d.w, nt, rt, it, ot, at)), + a4 || b4 || c4 || d4 + ) + } + var rot = new Euler(), + aE, + bE, + cE + function dampE(tt, et, nt, rt, it, ot, at) { + return ( + Array.isArray(et) ? rot.set(et[0], et[1], et[2], et[3]) : rot.copy(et), + (aE = dampAngle(tt, 'x', rot.x, nt, rt, it, ot, at)), + (bE = dampAngle(tt, 'y', rot.y, nt, rt, it, ot, at)), + (cE = dampAngle(tt, 'z', rot.z, nt, rt, it, ot, at)), + aE || bE || cE + ) + } + var col = new Color$1(), + aC, + bC, + cC + function dampC(tt, et, nt, rt, it, ot, at) { + return ( + et instanceof Color$1 ? col.copy(et) : Array.isArray(et) ? col.setRGB(et[0], et[1], et[2]) : col.set(et), + (aC = damp(tt, 'r', col.r, nt, rt, it, ot, at)), + (bC = damp(tt, 'g', col.g, nt, rt, it, ot, at)), + (cC = damp(tt, 'b', col.b, nt, rt, it, ot, at)), + aC || bC || cC + ) + } + var qt = new Quaternion(), + v4result = new Vector4(), + v4velocity = new Vector4(), + v4error = new Vector4(), + aQ, + bQ, + cQ, + dQ + function dampQ(tt, et, nt, rt, it, ot, at) { + var st = tt + Array.isArray(et) ? qt.set(et[0], et[1], et[2], et[3]) : qt.copy(et) + var lt = tt.dot(qt) > 0 ? 1 : -1 + return ( + (qt.x *= lt), + (qt.y *= lt), + (qt.z *= lt), + (qt.w *= lt), + (aQ = damp(tt, 'x', qt.x, nt, rt, it, ot, at)), + (bQ = damp(tt, 'y', qt.y, nt, rt, it, ot, at)), + (cQ = damp(tt, 'z', qt.z, nt, rt, it, ot, at)), + (dQ = damp(tt, 'w', qt.w, nt, rt, it, ot, at)), + v4result.set(tt.x, tt.y, tt.z, tt.w).normalize(), + v4velocity.set(st.__damp.velocity_x, st.__damp.velocity_y, st.__damp.velocity_z, st.__damp.velocity_w), + v4error.copy(v4result).multiplyScalar(v4velocity.dot(v4result) / v4result.dot(v4result)), + (st.__damp.velocity_x -= v4error.x), + (st.__damp.velocity_y -= v4error.y), + (st.__damp.velocity_z -= v4error.z), + (st.__damp.velocity_w -= v4error.w), + tt.set(v4result.x, v4result.y, v4result.z, v4result.w), + aQ || bQ || cQ || dQ + ) + } + var spherical = new Spherical(), + aS, + bS, + cS + function dampS(tt, et, nt, rt, it, ot, at) { + return ( + Array.isArray(et) ? spherical.set(et[0], et[1], et[2]) : spherical.copy(et), + (aS = damp(tt, 'radius', spherical.radius, nt, rt, it, ot, at)), + (bS = dampAngle(tt, 'phi', spherical.phi, nt, rt, it, ot, at)), + (cS = dampAngle(tt, 'theta', spherical.theta, nt, rt, it, ot, at)), + aS || bS || cS + ) + } + var mat = new Matrix4(), + mPos = new Vector3(), + mRot = new Quaternion(), + mSca = new Vector3(), + aM, + bM, + cM + function dampM(tt, et, nt, rt, it, ot, at) { + var st = tt + return ( + st.__damp === void 0 && + ((st.__damp = { position: new Vector3(), rotation: new Quaternion(), scale: new Vector3() }), + tt.decompose(st.__damp.position, st.__damp.rotation, st.__damp.scale)), + Array.isArray(et) ? mat.set.apply(mat, _toConsumableArray$d(et)) : mat.copy(et), + mat.decompose(mPos, mRot, mSca), + (aM = damp3(st.__damp.position, mPos, nt, rt, it, ot, at)), + (bM = dampQ(st.__damp.rotation, mRot, nt, rt, it, ot, at)), + (cM = damp3(st.__damp.scale, mSca, nt, rt, it, ot, at)), + tt.compose(st.__damp.position, st.__damp.rotation, st.__damp.scale), + aM || bM || cM + ) + } + var easing = Object.freeze({ + __proto__: null, + rsqw, + exp: exp$1, + damp, + dampAngle, + damp2, + damp3, + damp4, + dampE, + dampC, + dampQ, + dampS, + dampM, + }) + const selectionContext = reactExports.createContext(null) + function Selection$2({ children: tt, enabled: et = !0 }) { + const [nt, rt] = reactExports.useState([]), + it = reactExports.useMemo(() => ({ selected: nt, select: rt, enabled: et }), [nt, rt, et]) + return jsxRuntimeExports.jsx(selectionContext.Provider, { value: it, children: tt }) + } + function Select({ enabled: tt = !1, children: et, ...nt }) { + const rt = reactExports.useRef(null), + it = reactExports.useContext(selectionContext) + return ( + reactExports.useEffect(() => { + if (it && tt) { + let ot = !1 + const at = [] + if ( + (rt.current.traverse((st) => { + st.type === 'Mesh' && at.push(st), it.selected.indexOf(st) === -1 && (ot = !0) + }), + ot) + ) + return ( + it.select((st) => [...st, ...at]), + () => { + it.select((st) => st.filter((lt) => !at.includes(lt))) + } + ) + } + }, [tt, et, it]), + jsxRuntimeExports.jsx('group', { ref: rt, ...nt, children: et }) + ) + } + const EffectComposerContext = reactExports.createContext(null), + EffectComposer = React$1.memo( + reactExports.forwardRef( + ( + { + children: tt, + camera: et, + scene: nt, + resolutionScale: rt, + enabled: it = !0, + renderPriority: ot = 1, + autoClear: at = !0, + depthBuffer: st, + disableNormalPass: lt, + stencilBuffer: ct, + multisampling: ut = 8, + frameBufferType: ht = HalfFloatType, + }, + dt, + ) => { + const { gl: pt, scene: mt, camera: gt, size: yt } = useThree(), + bt = nt || mt, + vt = et || gt, + [xt, kt, St] = reactExports.useMemo(() => { + const $t = isWebGL2Available$1(), + Dt = new EffectComposer$1(pt, { + depthBuffer: st, + stencilBuffer: ct, + multisampling: ut > 0 && $t ? ut : 0, + frameBufferType: ht, + }) + Dt.addPass(new RenderPass(bt, vt)) + let jt = null, + Pt = null + return ( + lt || + ((Pt = new NormalPass(bt, vt)), + (Pt.enabled = !1), + Dt.addPass(Pt), + rt !== void 0 && + $t && + ((jt = new DepthDownsamplingPass({ normalBuffer: Pt.texture, resolutionScale: rt })), + (jt.enabled = !1), + Dt.addPass(jt))), + [Dt, Pt, jt] + ) + }, [vt, pt, st, ct, ut, ht, bt, lt, rt]) + reactExports.useEffect(() => (xt == null ? void 0 : xt.setSize(yt.width, yt.height)), [xt, yt]), + useFrame( + ($t, Dt) => { + if (it) { + const jt = pt.autoClear + ;(pt.autoClear = at), ct && !at && pt.clearStencil(), xt.render(Dt), (pt.autoClear = jt) + } + }, + it ? ot : 0, + ) + const Tt = reactExports.useRef(null), + At = useInstanceHandle(Tt) + reactExports.useLayoutEffect(() => { + const $t = [] + if (Tt.current && At.current && xt) { + const Dt = At.current.objects + for (let jt = 0; jt < Dt.length; jt++) { + const Pt = Dt[jt] + if (Pt instanceof Effect$1) { + const Ct = [] + for (; Dt[jt] instanceof Effect$1; ) Ct.push(Dt[jt++]) + jt-- + const wt = new EffectPass(vt, ...Ct) + $t.push(wt) + } else Pt instanceof Pass && $t.push(Pt) + } + for (const jt of $t) xt == null || xt.addPass(jt) + kt && (kt.enabled = !0), St && (St.enabled = !0) + } + return () => { + for (const Dt of $t) xt == null || xt.removePass(Dt) + kt && (kt.enabled = !1), St && (St.enabled = !1) + } + }, [xt, tt, vt, kt, St, At]) + const Et = reactExports.useMemo( + () => ({ composer: xt, normalPass: kt, downSamplingPass: St, resolutionScale: rt, camera: vt, scene: bt }), + [xt, kt, St, rt, vt, bt], + ) + return ( + reactExports.useImperativeHandle(dt, () => xt, [xt]), + jsxRuntimeExports.jsx(EffectComposerContext.Provider, { + value: Et, + children: jsxRuntimeExports.jsx('group', { ref: Tt, children: tt }), + }) + ) + }, + ), + ), + resolveRef = (tt) => (typeof tt == 'object' && tt != null && 'current' in tt ? tt.current : tt) + let i$1 = 0 + const components = new WeakMap(), + wrapEffect = (tt, et) => + React$1.forwardRef(function ( + { + blendFunction: rt = et == null ? void 0 : et.blendFunction, + opacity: it = et == null ? void 0 : et.opacity, + ...ot + }, + at, + ) { + let st = components.get(tt) + if (!st) { + const ut = `@react-three/postprocessing/${tt.name}-${i$1++}` + extend$2({ [ut]: tt }), components.set(tt, (st = ut)) + } + const lt = useThree((ut) => ut.camera), + ct = React$1.useMemo(() => { + var ut, ht + return [ + ...((ut = et == null ? void 0 : et.args) != null ? ut : []), + ...((ht = ot.args) != null ? ht : [{ ...et, ...ot }]), + ] + }, [JSON.stringify(ot)]) + return jsxRuntimeExports.jsx(st, { + camera: lt, + 'blendMode-blendFunction': rt, + 'blendMode-opacity-value': it, + ...ot, + ref: at, + args: ct, + }) + }), + useVector2 = (tt, et) => { + const nt = tt[et] + return React$1.useMemo( + () => (typeof nt == 'number' ? new Vector2(nt, nt) : nt ? new Vector2(...nt) : new Vector2()), + [nt], + ) + }, + DepthOfField = reactExports.forwardRef(function ( + { + blendFunction: et, + worldFocusDistance: nt, + worldFocusRange: rt, + focusDistance: it, + focusRange: ot, + focalLength: at, + bokehScale: st, + resolutionScale: lt, + resolutionX: ct, + resolutionY: ut, + width: ht, + height: dt, + target: pt, + depthTexture: mt, + ...gt + }, + yt, + ) { + const { camera: bt } = reactExports.useContext(EffectComposerContext), + vt = pt != null, + xt = reactExports.useMemo(() => { + const kt = new DepthOfFieldEffect(bt, { + blendFunction: et, + worldFocusDistance: nt, + worldFocusRange: rt, + focusDistance: it, + focusRange: ot, + focalLength: at, + bokehScale: st, + resolutionScale: lt, + resolutionX: ct, + resolutionY: ut, + width: ht, + height: dt, + }) + vt && (kt.target = new Vector3()), mt && kt.setDepthTexture(mt.texture, mt.packing) + const St = kt.maskPass.getFullscreenMaterial() + return (St.maskFunction = MaskFunction.MULTIPLY_RGB_SET_ALPHA), kt + }, [bt, et, nt, rt, it, ot, at, st, lt, ct, ut, ht, dt, vt, mt]) + return ( + reactExports.useEffect( + () => () => { + xt.dispose() + }, + [xt], + ), + jsxRuntimeExports.jsx('primitive', { ...gt, ref: yt, object: xt, target: pt }) + ) + }) + reactExports.forwardRef( + ( + { target: tt = void 0, mouse: et = !1, debug: nt = void 0, manual: rt = !1, smoothTime: it = 0.25, ...ot }, + at, + ) => { + const st = reactExports.useRef(null), + lt = reactExports.useRef(null), + ct = reactExports.useRef(null), + ut = useThree(({ scene: St }) => St), + ht = useThree(({ pointer: St }) => St), + { composer: dt, camera: pt } = reactExports.useContext(EffectComposerContext), + [mt] = reactExports.useState(() => new DepthPickingPass()), + [gt] = reactExports.useState(() => new CopyPass()) + reactExports.useEffect( + () => ( + dt.addPass(mt), + dt.addPass(gt), + () => { + dt.removePass(mt), dt.removePass(gt) + } + ), + [dt, mt, gt], + ), + reactExports.useEffect( + () => () => { + mt.dispose(), gt.dispose() + }, + [mt, gt], + ) + const [yt] = reactExports.useState(() => new Vector3(0, 0, 0)), + [bt] = reactExports.useState(() => new Vector3(0, 0, 0)), + vt = reactExports.useCallback( + async (St, Tt) => ( + (bt.x = St), + (bt.y = Tt), + (bt.z = await mt.readDepth(bt)), + (bt.z = bt.z * 2 - 1), + 1 - bt.z > 1e-7 ? bt.unproject(pt) : !1 + ), + [bt, mt, pt], + ), + xt = reactExports.useCallback( + async (St, Tt = !0) => { + var At + if (tt) yt.set(...tt) + else { + const { x: Et, y: $t } = et ? ht : { x: 0, y: 0 }, + Dt = await vt(Et, $t) + Dt && yt.copy(Dt) + } + Tt && + (At = st.current) != null && + At.target && + (it > 0 && St > 0 ? easing.damp3(st.current.target, yt, it, St) : st.current.target.copy(yt)) + }, + [tt, yt, et, vt, it, ht], + ) + useFrame(async (St, Tt) => { + var At + rt || xt(Tt), + lt.current && lt.current.position.copy(yt), + ct.current && (At = st.current) != null && At.target && ct.current.position.copy(st.current.target) + }) + const kt = reactExports.useMemo(() => ({ dofRef: st, hitpoint: yt, update: xt }), [yt, xt]) + return ( + reactExports.useImperativeHandle(at, () => kt, [kt]), + jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { + children: [ + nt + ? createPortal( + jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { + children: [ + jsxRuntimeExports.jsxs('mesh', { + ref: lt, + children: [ + jsxRuntimeExports.jsx('sphereGeometry', { args: [nt, 16, 16] }), + jsxRuntimeExports.jsx('meshBasicMaterial', { + color: '#00ff00', + opacity: 1, + transparent: !0, + depthWrite: !1, + }), + ], + }), + jsxRuntimeExports.jsxs('mesh', { + ref: ct, + children: [ + jsxRuntimeExports.jsx('sphereGeometry', { args: [nt / 2, 16, 16] }), + jsxRuntimeExports.jsx('meshBasicMaterial', { + color: '#00ff00', + opacity: 0.5, + transparent: !0, + depthWrite: !1, + }), + ], + }), + ], + }), + ut, + ) + : null, + jsxRuntimeExports.jsx(DepthOfField, { ref: st, ...ot, target: yt }), + ], + }) + ) + }, + ) + const LensFlareShader = { + fragmentShader: ` + + uniform float iTime; + uniform vec2 lensPosition; + uniform vec2 iResolution; + uniform vec3 colorGain; + uniform float starPoints; + uniform float glareSize; + uniform float flareSize; + uniform float flareSpeed; + uniform float flareShape; + uniform float haloScale; + uniform float opacity; + uniform bool animated; + uniform bool anamorphic; + uniform bool enabled; + uniform bool secondaryGhosts; + uniform bool starBurst; + uniform float ghostScale; + uniform bool aditionalStreaks; + uniform sampler2D lensDirtTexture; + vec2 vxtC; + + float rndf(float n){return fract(sin(n) * 43758.5453123);}float niz(float p){float fl = floor(p);float fc = fract(p);return mix(rndf(fl),rndf(fl + 1.0), fc);} + vec3 hsv2rgb(vec3 c){vec4 k = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0);vec3 p = abs(fract(c.xxx + k.xyz) * 6.0 - k.www);return c.z * mix(k.xxx, clamp(p - k.xxx, 0.0, 1.0), c.y);} + float satU(float x){return clamp(x, 0.,1.);}vec2 rtU(vec2 naz, float rtn){return vec2(cos(rtn) * naz.x + sin(rtn) * naz.y,cos(rtn) * naz.y - sin(rtn) * naz.x);} + vec3 drwF(vec2 p, float intensity, float rnd, float speed, int id){float flhos = (1. / 32.) * float(id) * 0.1;float lingrad = distance(vec2(0.), p);float expg = 1. / exp(lingrad * (fract(rnd) * 0.66 + 0.33));vec3 qzTg = hsv2rgb(vec3( fract( (expg * 8.) + speed * flareSpeed + flhos), pow(1.-abs(expg*2.-1.), 0.45), 20.0 * expg * intensity));float internalStarPoints;if(anamorphic){internalStarPoints = 1.0;} else{internalStarPoints = starPoints;}float ams = length(p * flareShape * sin(internalStarPoints * atan(p.x, p.y)));float kJhg = pow(1.-satU(ams), ( anamorphic ? 100. : 12.));kJhg += satU(expg-0.9) * 3.;kJhg = pow(kJhg * expg, 8. + (1.-intensity) * 5.);if(flareSpeed > 0.0){return vec3(kJhg) * qzTg;} else{return vec3(kJhg) * flareSize * 15.;}} + float ams2(vec3 a, vec3 b) { return abs(a.x - b.x) + abs(a.y - b.y) + abs(a.z - b.z);}vec3 satU(vec3 x){return clamp(x, vec3(0.0), vec3(1.0));} + float glR(vec2 naz, vec2 pos, float zsi){vec2 mni;if(animated){mni = rtU(naz-pos, iTime * 0.1);} else{mni = naz-pos;}float ang = atan(mni.y, mni.x) * (anamorphic ? 1.0 : starPoints);float ams2 = length(mni);ams2 = pow(ams2, .9);float f0 = 1.0/(length(naz-pos)*(1.0/zsi*16.0)+.2);return f0+f0*(sin((ang))*.2 +.3);} + float sdHex(vec2 p){p = abs(p);vec2 q = vec2(p.x*2.0*0.5773503, p.y + p.x*0.5773503);return dot(step(q.xy,q.yx), 1.0-q.yx);}float fpow(float x, float k){return x > k ? pow((x-k)/(1.0-k),2.0) : 0.0;} + vec3 rHx(vec2 naz, vec2 p, float s, vec3 col){naz -= p;if (abs(naz.x) < 0.2*s && abs(naz.y) < 0.2*s){return mix(vec3(0),mix(vec3(0),col,0.1 + fpow(length(naz/s),0.1)*10.0),smoothstep(0.0,0.1,sdHex(naz*20.0/s)));}return vec3(0);} + vec3 mLs(vec2 naz, vec2 pos){vec2 mni = naz-pos;vec2 zxMp = naz*(length(naz));float ang = atan(mni.x,mni.y);float f0 = .3/(length(naz-pos)*16.0+1.0);f0 = f0*(sin(niz(sin(ang*3.9-(animated ? iTime : 0.0) * 0.3) * starPoints))*.2 );float f1 = max(0.01-pow(length(naz+1.2*pos),1.9),.0)*7.0;float f2 = max(.9/(10.0+32.0*pow(length(zxMp+0.99*pos),2.0)),.0)*0.35;float f22 = max(.9/(11.0+32.0*pow(length(zxMp+0.85*pos),2.0)),.0)*0.23;float f23 = max(.9/(12.0+32.0*pow(length(zxMp+0.95*pos),2.0)),.0)*0.6;vec2 ztX = mix(naz,zxMp, 0.1);float f4 = max(0.01-pow(length(ztX+0.4*pos),2.9),.0)*4.02;float f42 = max(0.0-pow(length(ztX+0.45*pos),2.9),.0)*4.1;float f43 = max(0.01-pow(length(ztX+0.5*pos),2.9),.0)*4.6;ztX = mix(naz,zxMp,-.4);float f5 = max(0.01-pow(length(ztX+0.1*pos),5.5),.0)*2.0;float f52 = max(0.01-pow(length(ztX+0.2*pos),5.5),.0)*2.0;float f53 = max(0.01-pow(length(ztX+0.1*pos),5.5),.0)*2.0;ztX = mix(naz,zxMp, 2.1);float f6 = max(0.01-pow(length(ztX-0.3*pos),1.61),.0)*3.159;float f62 = max(0.01-pow(length(ztX-0.325*pos),1.614),.0)*3.14;float f63 = max(0.01-pow(length(ztX-0.389*pos),1.623),.0)*3.12;vec3 c = vec3(glR(naz,pos, glareSize));vec2 prot;if(animated){prot = rtU(naz - pos, (iTime * 0.1));} else if(anamorphic){prot = rtU(naz - pos, 1.570796);} else {prot = naz - pos;}c += drwF(prot, (anamorphic ? flareSize * 10. : flareSize), 0.1, iTime, 1);c.r+=f1+f2+f4+f5+f6; c.g+=f1+f22+f42+f52+f62; c.b+=f1+f23+f43+f53+f63;c = c*1.3 * vec3(length(zxMp)+.09);c+=vec3(f0);return c;} + vec3 cc(vec3 clr, float fct,float fct2){float w = clr.x+clr.y+clr.z;return mix(clr,vec3(w)*fct,w*fct2);}float rnd(vec2 p){float f = fract(sin(dot(p, vec2(12.1234, 72.8392) )*45123.2));return f;}float rnd(float w){float f = fract(sin(w)*1000.);return f;} + float rShp(vec2 p, int N){float f;float a=atan(p.x,p.y)+.2;float b=6.28319/float(N);f=smoothstep(.5,.51, cos(floor(.5+a/b)*b-a)*length(p.xy)* 2.0 -ghostScale);return f;} + vec3 drC(vec2 p, float zsi, float dCy, vec3 clr, vec3 clr2, float ams2, vec2 esom){float l = length(p + esom*(ams2*2.))+zsi/2.;float l2 = length(p + esom*(ams2*4.))+zsi/3.;float c = max(0.01-pow(length(p + esom*ams2), zsi*ghostScale), 0.0)*10.;float c1 = max(0.001-pow(l-0.3, 1./40.)+sin(l*20.), 0.0)*3.;float c2 = max(0.09/pow(length(p-esom*ams2/.5)*1., .95), 0.0)/20.;float s = max(0.02-pow(rShp(p*5. + esom*ams2*5. + dCy, 6) , 1.), 0.0)*1.5;clr = cos(vec3(0.44, .24, .2)*8. + ams2*4.)*0.5+.5;vec3 f = c*clr;f += c1*clr;f += c2*clr;f += s*clr;return f-0.01;} + vec4 geLC(float x){return vec4(vec3(mix(mix(mix(mix(mix(mix(mix(mix(mix(mix(mix(mix(mix(mix(mix(vec3(0., 0., 0.),vec3(0., 0., 0.), smoothstep(0.0, 0.063, x)),vec3(0., 0., 0.), smoothstep(0.063, 0.125, x)),vec3(0.0, 0., 0.), smoothstep(0.125, 0.188, x)),vec3(0.188, 0.131, 0.116), smoothstep(0.188, 0.227, x)),vec3(0.31, 0.204, 0.537), smoothstep(0.227, 0.251, x)),vec3(0.192, 0.106, 0.286), smoothstep(0.251, 0.314, x)),vec3(0.102, 0.008, 0.341), smoothstep(0.314, 0.392, x)),vec3(0.086, 0.0, 0.141), smoothstep(0.392, 0.502, x)),vec3(1.0, 0.31, 0.0), smoothstep(0.502, 0.604, x)),vec3(.1, 0.1, 0.1), smoothstep(0.604, 0.643, x)),vec3(1.0, 0.929, 0.0), smoothstep(0.643, 0.761, x)),vec3(1.0, 0.086, 0.424), smoothstep(0.761, 0.847, x)),vec3(1.0, 0.49, 0.0), smoothstep(0.847, 0.89, x)),vec3(0.945, 0.275, 0.475), smoothstep(0.89, 0.941, x)),vec3(0.251, 0.275, 0.796), smoothstep(0.941, 1.0, x))),1.0);} + float diTN(vec2 p){vec2 f = fract(p);f = (f * f) * (3.0 - (2.0 * f));float n = dot(floor(p), vec2(1.0, 157.0));vec4 a = fract(sin(vec4(n + 0.0, n + 1.0, n + 157.0, n + 158.0)) * 43758.5453123);return mix(mix(a.x, a.y, f.x), mix(a.z, a.w, f.x), f.y);} + float fbm(vec2 p){const mat2 m = mat2(0.80, -0.60, 0.60, 0.80);float f = 0.0;f += 0.5000*diTN(p); p = m*p*2.02;f += 0.2500*diTN(p); p = m*p*2.03;f += 0.1250*diTN(p); p = m*p*2.01;f += 0.0625*diTN(p);return f/0.9375;} + vec4 geLS(vec2 p){vec2 pp = (p - vec2(0.5)) * 2.0;float a = atan(pp.y, pp.x);vec4 cp = vec4(sin(a * 1.0), length(pp), sin(a * 13.0), sin(a * 53.0));float d = sin(clamp(pow(length(vec2(0.5) - p) * 0.5 + haloScale /2., 5.0), 0.0, 1.0) * 3.14159);vec3 c = vec3(d) * vec3(fbm(cp.xy * 16.0) * fbm(cp.zw * 9.0) * max(max(max(max(0.5, sin(a * 1.0)), sin(a * 3.0) * 0.8), sin(a * 7.0) * 0.8), sin(a * 9.0) * 10.6));c *= vec3(mix(2.0, (sin(length(pp.xy) * 256.0) * 0.5) + 0.5, sin((clamp((length(pp.xy) - 0.875) / 0.1, 0.0, 1.0) + 0.0) * 2.0 * 3.14159) * 1.5) + 0.5) * 0.3275;return vec4(vec3(c * 1.0), d);} + vec4 geLD(vec2 p){p.xy += vec2(fbm(p.yx * 3.0), fbm(p.yx * 2.0)) * 0.0825;vec3 o = vec3(mix(0.125, 0.25, max(max(smoothstep(0.1, 0.0, length(p - vec2(0.25))),smoothstep(0.4, 0.0, length(p - vec2(0.75)))),smoothstep(0.8, 0.0, length(p - vec2(0.875, 0.125))))));o += vec3(max(fbm(p * 1.0) - 0.5, 0.0)) * 0.5;o += vec3(max(fbm(p * 2.0) - 0.5, 0.0)) * 0.5;o += vec3(max(fbm(p * 4.0) - 0.5, 0.0)) * 0.25;o += vec3(max(fbm(p * 8.0) - 0.75, 0.0)) * 1.0;o += vec3(max(fbm(p * 16.0) - 0.75, 0.0)) * 0.75;o += vec3(max(fbm(p * 64.0) - 0.75, 0.0)) * 0.5;return vec4(clamp(o, vec3(0.15), vec3(1.0)), 1.0);} + vec4 txL(sampler2D tex, vec2 xtC){if(((xtC.x < 0.) || (xtC.y < 0.)) || ((xtC.x > 1.) || (xtC.y > 1.))){return vec4(0.0);}else{return texture(tex, xtC); }} + vec4 txD(sampler2D tex, vec2 xtC, vec2 dir, vec3 ditn) {return vec4(txL(tex, (xtC + (dir * ditn.r))).r,txL(tex, (xtC + (dir * ditn.g))).g,txL(tex, (xtC + (dir * ditn.b))).b,1.0);} + vec4 strB(){vec2 aspXtc = vec2(1.0) - (((vxtC - vec2(0.5)) * vec2(1.0)) + vec2(0.5)); vec2 xtC = vec2(1.0) - vxtC; vec2 ghvc = (vec2(0.5) - xtC) * 0.3 - lensPosition; vec2 ghNm = normalize(ghvc * vec2(1.0)) * vec2(1.0);vec2 haloVec = normalize(ghvc) * 0.6;vec2 hlNm = ghNm * 0.6;vec2 texelSize = vec2(1.0) / vec2(iResolution.xy);vec3 ditn = vec3(-(texelSize.x * 1.5), 0.2, texelSize.x * 1.5);vec4 c = vec4(0.0);for (int i = 0; i < 8; i++) {vec2 offset = xtC + (ghvc * float(i));c += txD(lensDirtTexture, offset, ghNm, ditn) * pow(max(0.0, 1.0 - (length(vec2(0.5) - offset) / length(vec2(0.5)))), 10.0);}vec2 uyTrz = xtC + hlNm; return (c * geLC((length(vec2(0.5) - aspXtc) / length(vec2(haloScale))))) +(txD(lensDirtTexture, uyTrz, ghNm, ditn) * pow(max(0.0, 1.0 - (length(vec2(0.5) - uyTrz) / length(vec2(0.5)))), 10.0));} + void mainImage(vec4 v,vec2 r,out vec4 i){vec2 g=r-.5;g.y*=iResolution.y/iResolution.x;vec2 l=lensPosition*.5;l.y*=iResolution.y/iResolution.x;vec3 f=mLs(g,l)*20.*colorGain/256.;if(aditionalStreaks){vec3 o=vec3(.9,.2,.1),p=vec3(.3,.1,.9);for(float n=0.;n<10.;n++)f+=drC(g,pow(rnd(n*2e3)*2.8,.1)+1.41,0.,o+n,p+n,rnd(n*20.)*3.+.2-.5,lensPosition);}if(secondaryGhosts){vec3 n=vec3(0);n+=rHx(g,-lensPosition*.25,ghostScale*1.4,vec3(.25,.35,0));n+=rHx(g,lensPosition*.25,ghostScale*.5,vec3(1,.5,.5));n+=rHx(g,lensPosition*.1,ghostScale*1.6,vec3(1));n+=rHx(g,lensPosition*1.8,ghostScale*2.,vec3(0,.5,.75));n+=rHx(g,lensPosition*1.25,ghostScale*.8,vec3(1,1,.5));n+=rHx(g,-lensPosition*1.25,ghostScale*5.,vec3(.5,.5,.25));n+=fpow(1.-abs(distance(lensPosition*.8,g)-.7),.985)*colorGain/2100.;f+=n;}if(starBurst){vxtC=g+.5;vec4 n=geLD(g);float o=1.-clamp(0.5,0.,.5)*2.;n+=mix(n,pow(n*2.,vec4(2))*.5,o);float s=(g.x+g.y)*(1./6.);vec2 d=mat2(cos(s),-sin(s),sin(s),cos(s))*vxtC;n+=geLS(d)*2.;f+=clamp(n.xyz*strB().xyz,.01,1.);}i=enabled?vec4(mix(f,vec3(0),opacity)+v.xyz,v.w):vec4(v);} +`, + } + class LensFlareEffect extends Effect$1 { + constructor({ + blendFunction: et = BlendFunction.NORMAL, + enabled: nt = !0, + glareSize: rt = 0.2, + lensPosition: it = [0.01, 0.01], + iResolution: ot = [0, 0], + starPoints: at = 6, + flareSize: st = 0.01, + flareSpeed: lt = 0.01, + flareShape: ct = 0.01, + animated: ut = !0, + anamorphic: ht = !1, + colorGain: dt = new Color$1(20, 20, 20), + lensDirtTexture: pt = null, + haloScale: mt = 0.5, + secondaryGhosts: gt = !0, + aditionalStreaks: yt = !0, + ghostScale: bt = 0, + opacity: vt = 1, + starBurst: xt = !1, + } = {}) { + super('LensFlareEffect', LensFlareShader.fragmentShader, { + blendFunction: et, + uniforms: new Map([ + ['enabled', new Uniform(nt)], + ['glareSize', new Uniform(rt)], + ['lensPosition', new Uniform(it)], + ['iTime', new Uniform(0)], + ['iResolution', new Uniform(ot)], + ['starPoints', new Uniform(at)], + ['flareSize', new Uniform(st)], + ['flareSpeed', new Uniform(lt)], + ['flareShape', new Uniform(ct)], + ['animated', new Uniform(ut)], + ['anamorphic', new Uniform(ht)], + ['colorGain', new Uniform(dt)], + ['lensDirtTexture', new Uniform(pt)], + ['haloScale', new Uniform(mt)], + ['secondaryGhosts', new Uniform(gt)], + ['aditionalStreaks', new Uniform(yt)], + ['ghostScale', new Uniform(bt)], + ['starBurst', new Uniform(xt)], + ['opacity', new Uniform(vt)], + ]), + }) + } + update(et, nt, rt) { + const it = this.uniforms.get('iTime') + it && (it.value += rt) + } + } + reactExports.forwardRef( + ({ position: tt = new Vector3(-25, 6, -60), followMouse: et = !1, smoothTime: nt = 0.07, ...rt }, it) => { + const ot = useThree(({ viewport: pt }) => pt), + at = useThree(({ raycaster: pt }) => pt), + st = useThree(({ pointer: pt }) => pt), + { scene: lt, camera: ct } = reactExports.useContext(EffectComposerContext), + [ut] = reactExports.useState(() => new Vector3()), + [ht] = reactExports.useState(() => new Vector2()), + dt = reactExports.useMemo(() => new LensFlareEffect(rt), [rt]) + return ( + useFrame((pt, mt) => { + var gt, yt, bt + const vt = dt.uniforms.get('lensPosition'), + xt = dt.uniforms.get('opacity') + if (!vt || !xt) return + let kt = 1 + if (et) (vt.value.x = st.x), (vt.value.y = st.y), (kt = 0) + else { + if ((ut.copy(tt).project(ct), ut.z > 1)) return + ;(vt.value.x = ut.x), (vt.value.y = ut.y), ht.set(ut.x, ut.y), at.setFromCamera(ht, ct) + const St = at.intersectObjects(lt.children, !0), + { object: Tt } = St[0] + Tt && + (((gt = Tt.userData) == null ? void 0 : gt.lensflare) === 'no-occlusion' + ? (kt = 0) + : Tt instanceof Mesh && + (((bt = (yt = Tt.material.uniforms) == null ? void 0 : yt._transmission) == null + ? void 0 + : bt.value) > 0.2 || + (Tt.material._transmission && Tt.material._transmission > 0.2) + ? (kt = 0.2) + : Tt.material.transparent && (kt = Tt.material.opacity))) + } + easing.damp(xt, 'value', kt, nt, mt) + }), + reactExports.useEffect(() => { + const pt = dt.uniforms.get('iResolution') + pt && ((pt.value.x = ot.width), (pt.value.y = ot.height)) + }, [dt, ot]), + jsxRuntimeExports.jsx('primitive', { ref: it, object: dt, dispose: null }) + ) + }, + ) + const Bloom = wrapEffect(BloomEffect, { blendFunction: BlendFunction.ADD }) + reactExports.forwardRef(function ({ blendFunction: et = BlendFunction.NORMAL }, nt) { + const rt = reactExports.useMemo(() => new ColorAverageEffect(et), [et]) + return jsxRuntimeExports.jsx('primitive', { ref: nt, object: rt, dispose: null }) + }) + reactExports.forwardRef(function ({ active: et = !0, ...nt }, rt) { + const it = useThree((ut) => ut.invalidate), + ot = useVector2(nt, 'delay'), + at = useVector2(nt, 'duration'), + st = useVector2(nt, 'strength'), + lt = useVector2(nt, 'chromaticAberrationOffset'), + ct = reactExports.useMemo( + () => new GlitchEffect({ ...nt, delay: ot, duration: at, strength: st, chromaticAberrationOffset: lt }), + [ot, at, nt, st, lt], + ) + return ( + reactExports.useLayoutEffect(() => { + ;(ct.mode = et ? nt.mode || GlitchMode.SPORADIC : GlitchMode.DISABLED), it() + }, [et, ct, it, nt.mode]), + reactExports.useEffect( + () => () => { + ct.dispose() + }, + [ct], + ), + jsxRuntimeExports.jsx('primitive', { ref: rt, object: ct, dispose: null }) + ) + }) + reactExports.forwardRef(function (et, nt) { + const { camera: rt } = reactExports.useContext(EffectComposerContext), + it = reactExports.useMemo(() => new GodRaysEffect(rt, resolveRef(et.sun), et), [rt, et]) + return ( + reactExports.useLayoutEffect(() => void (it.lightSource = resolveRef(et.sun)), [it, et.sun]), + jsxRuntimeExports.jsx('primitive', { ref: nt, object: it, dispose: null }) + ) + }) + reactExports.forwardRef(function ({ size: et, ...nt }, rt) { + const it = useThree((at) => at.invalidate), + ot = reactExports.useMemo(() => new GridEffect(nt), [nt]) + return ( + reactExports.useLayoutEffect(() => { + et && ot.setSize(et.width, et.height), it() + }, [ot, et]), + jsxRuntimeExports.jsx('primitive', { ref: rt, object: ot, dispose: null }) + ) + }) + const Outline = reactExports.forwardRef(function ( + { + selection: et = [], + selectionLayer: nt = 10, + blendFunction: rt, + patternTexture: it, + edgeStrength: ot, + pulseSpeed: at, + visibleEdgeColor: st, + hiddenEdgeColor: lt, + width: ct, + height: ut, + kernelSize: ht, + blur: dt, + xRay: pt, + ...mt + }, + gt, + ) { + const yt = useThree((St) => St.invalidate), + { scene: bt, camera: vt } = reactExports.useContext(EffectComposerContext), + xt = reactExports.useMemo( + () => + new OutlineEffect(bt, vt, { + blendFunction: rt, + patternTexture: it, + edgeStrength: ot, + pulseSpeed: at, + visibleEdgeColor: st, + hiddenEdgeColor: lt, + width: ct, + height: ut, + kernelSize: ht, + blur: dt, + xRay: pt, + ...mt, + }), + [rt, dt, vt, ot, ut, lt, ht, it, at, bt, st, ct, pt], + ), + kt = reactExports.useContext(selectionContext) + return ( + reactExports.useEffect(() => { + if (!kt && et) + return ( + xt.selection.set(Array.isArray(et) ? et.map(resolveRef) : [resolveRef(et)]), + yt(), + () => { + xt.selection.clear(), yt() + } + ) + }, [xt, et, kt, yt]), + reactExports.useEffect(() => { + ;(xt.selectionLayer = nt), yt() + }, [xt, yt, nt]), + reactExports.useRef(), + reactExports.useEffect(() => { + var St + if (kt && kt.enabled && (St = kt.selected) != null && St.length) + return ( + xt.selection.set(kt.selected), + yt(), + () => { + xt.selection.clear(), yt() + } + ) + }, [kt, xt.selection, yt]), + jsxRuntimeExports.jsx('primitive', { ref: gt, object: xt }) + ) + }) + reactExports.forwardRef(function ({ granularity: et = 5 }, nt) { + const rt = reactExports.useMemo(() => new PixelationEffect(et), [et]) + return jsxRuntimeExports.jsx('primitive', { ref: nt, object: rt, dispose: null }) + }) + const addLight = (tt, et) => tt.layers.enable(et.selection.layer), + removeLight = (tt, et) => tt.layers.disable(et.selection.layer) + reactExports.forwardRef(function ( + { + selection: et = [], + selectionLayer: nt = 10, + lights: rt = [], + luminanceThreshold: it, + luminanceSmoothing: ot, + intensity: at, + width: st, + height: lt, + kernelSize: ct, + mipmapBlur: ut, + ...ht + }, + dt, + ) { + rt.length === 0 && console.warn('SelectiveBloom requires lights to work.') + const pt = useThree((vt) => vt.invalidate), + { scene: mt, camera: gt } = reactExports.useContext(EffectComposerContext), + yt = reactExports.useMemo( + () => + new SelectiveBloomEffect(mt, gt, { + blendFunction: BlendFunction.ADD, + luminanceThreshold: it, + luminanceSmoothing: ot, + intensity: at, + width: st, + height: lt, + kernelSize: ct, + mipmapBlur: ut, + ...ht, + }), + [mt, gt, it, ot, at, st, lt, ct, ut, ht], + ), + bt = reactExports.useContext(selectionContext) + return ( + reactExports.useEffect(() => { + if (!bt && et) + return ( + yt.selection.set(Array.isArray(et) ? et.map(resolveRef) : [resolveRef(et)]), + pt(), + () => { + yt.selection.clear(), pt() + } + ) + }, [yt, et, bt, pt]), + reactExports.useEffect(() => { + ;(yt.selection.layer = nt), pt() + }, [yt, pt, nt]), + reactExports.useEffect(() => { + if (rt && rt.length > 0) + return ( + rt.forEach((vt) => addLight(resolveRef(vt), yt)), + pt(), + () => { + rt.forEach((vt) => removeLight(resolveRef(vt), yt)), pt() + } + ) + }, [yt, pt, rt, nt]), + reactExports.useEffect(() => { + var vt + if (bt && bt.enabled && (vt = bt.selected) != null && vt.length) + return ( + yt.selection.set(bt.selected), + pt(), + () => { + yt.selection.clear(), pt() + } + ) + }, [bt, yt.selection, pt]), + jsxRuntimeExports.jsx('primitive', { ref: dt, object: yt, dispose: null }) + ) + }) + reactExports.forwardRef(function (et, nt) { + const { + camera: rt, + normalPass: it, + downSamplingPass: ot, + resolutionScale: at, + } = reactExports.useContext(EffectComposerContext), + st = reactExports.useMemo( + () => + it === null && ot === null + ? (console.error('Please enable the NormalPass in the EffectComposer in order to use SSAO.'), {}) + : new SSAOEffect(rt, it && !ot ? it.texture : null, { + blendFunction: BlendFunction.MULTIPLY, + samples: 30, + rings: 4, + distanceThreshold: 1, + distanceFalloff: 0, + rangeThreshold: 0.5, + rangeFalloff: 0.1, + luminanceInfluence: 0.9, + radius: 20, + bias: 0.5, + intensity: 1, + color: void 0, + normalDepthBuffer: ot ? ot.texture : null, + resolutionScale: at ?? 1, + depthAwareUpsampling: !0, + ...et, + }), + [rt, it, et], + ) + return jsxRuntimeExports.jsx('primitive', { ref: nt, object: st, dispose: null }) + }) + reactExports.forwardRef(function ({ textureSrc: et, texture: nt, ...rt }, it) { + const ot = useLoader(TextureLoader, et) + reactExports.useLayoutEffect(() => { + ;(ot.encoding = sRGBEncoding), (ot.wrapS = ot.wrapT = RepeatWrapping) + }, [ot]) + const at = reactExports.useMemo(() => new TextureEffect({ ...rt, texture: ot || nt }), [rt, ot, nt]) + return jsxRuntimeExports.jsx('primitive', { ref: it, object: at, dispose: null }) + }) + const Vignette = wrapEffect(VignetteEffect) + reactExports.forwardRef(function ({ lut: et, tetrahedralInterpolation: nt, ...rt }, it) { + const ot = reactExports.useMemo(() => new LUT3DEffect(et, rt), [et, rt]), + at = useThree((st) => st.invalidate) + return ( + reactExports.useLayoutEffect(() => { + nt && (ot.tetrahedralInterpolation = nt), et && (ot.lut = et), at() + }, [ot, at, et, nt]), + jsxRuntimeExports.jsx('primitive', { ref: it, object: ot, dispose: null }) + ) + }) + const fragment = ` +uniform sampler2D uCharacters; +uniform float uCharactersCount; +uniform float uCellSize; +uniform bool uInvert; +uniform vec3 uColor; + +const vec2 SIZE = vec2(16.); + +vec3 greyscale(vec3 color, float strength) { + float g = dot(color, vec3(0.299, 0.587, 0.114)); + return mix(color, vec3(g), strength); +} + +vec3 greyscale(vec3 color) { + return greyscale(color, 1.0); +} + +void mainImage(const in vec4 inputColor, const in vec2 uv, out vec4 outputColor) { + vec2 cell = resolution / uCellSize; + vec2 grid = 1.0 / cell; + vec2 pixelizedUV = grid * (0.5 + floor(uv / grid)); + vec4 pixelized = texture2D(inputBuffer, pixelizedUV); + float greyscaled = greyscale(pixelized.rgb).r; + + if (uInvert) { + greyscaled = 1.0 - greyscaled; + } + + float characterIndex = floor((uCharactersCount - 1.0) * greyscaled); + vec2 characterPosition = vec2(mod(characterIndex, SIZE.x), floor(characterIndex / SIZE.y)); + vec2 offset = vec2(characterPosition.x, -characterPosition.y) / SIZE; + vec2 charUV = mod(uv * (cell / SIZE), 1.0 / SIZE) - vec2(0., 1.0 / SIZE) + offset; + vec4 asciiCharacter = texture2D(uCharacters, charUV); + + asciiCharacter.rgb = uColor * asciiCharacter.r; + asciiCharacter.a = pixelized.a; + outputColor = asciiCharacter; +} +` + class ASCIIEffect extends Effect$1 { + constructor({ + characters: et = " .:,'-^=*+?!|0#X%WM@", + fontSize: nt = 54, + cellSize: rt = 16, + color: it = '#ffffff', + invert: ot = !1, + } = {}) { + const at = new Map([ + ['uCharacters', new Uniform(new Texture())], + ['uCellSize', new Uniform(rt)], + ['uCharactersCount', new Uniform(et.length)], + ['uColor', new Uniform(new Color$1(it))], + ['uInvert', new Uniform(ot)], + ]) + super('ASCIIEffect', fragment, { uniforms: at }) + const st = this.uniforms.get('uCharacters') + st && (st.value = this.createCharactersTexture(et, nt)) + } + createCharactersTexture(et, nt) { + const rt = document.createElement('canvas'), + it = 1024, + ot = 16, + at = it / ot + rt.width = rt.height = it + const st = new CanvasTexture(rt, void 0, RepeatWrapping, RepeatWrapping, NearestFilter, NearestFilter), + lt = rt.getContext('2d') + if (!lt) throw new Error('Context not available') + lt.clearRect(0, 0, it, it), + (lt.font = `${nt}px arial`), + (lt.textAlign = 'center'), + (lt.textBaseline = 'middle'), + (lt.fillStyle = '#fff') + for (let ct = 0; ct < et.length; ct++) { + const ut = et[ct], + ht = ct % ot, + dt = Math.floor(ct / ot) + lt.fillText(ut, ht * at + at / 2, dt * at + at / 2) + } + return (st.needsUpdate = !0), st + } + } + reactExports.forwardRef( + ( + { + characters: tt = " .:,'-^=*+?!|0#X%WM@", + fontSize: et = 54, + cellSize: nt = 16, + color: rt = '#ffffff', + invert: it = !1, + }, + ot, + ) => { + const at = reactExports.useMemo( + () => new ASCIIEffect({ characters: tt, fontSize: et, cellSize: nt, color: rt, invert: it }), + [tt, et, nt, rt, it], + ) + return jsxRuntimeExports.jsx('primitive', { ref: ot, object: at }) + }, + ) + var boxBlur = `#define GLSLIFY 1 +uniform float blur;uniform float blurSharpness;uniform int blurKernel;vec3 denoise(vec3 center,sampler2D tex,vec2 uv,vec2 invTexSize,float blur,float blurSharpness,int blurKernel){vec3 color;float total;vec3 col;float weight;for(int x=-blurKernel;x<=blurKernel;x++){for(int y=-blurKernel;y<=blurKernel;y++){col=textureLod(tex,uv+vec2(x,y)*invTexSize,0.).rgb;weight=1.0-abs(dot(col-center,vec3(0.25)));weight=pow(weight,blurSharpness);color+=col*weight;total+=weight;}}return color/total;}`, + finalSSRShader = `#define GLSLIFY 1 +#define MODE_DEFAULT 0 +#define MODE_REFLECTIONS 1 +#define MODE_RAW_REFLECTION 2 +#define MODE_BLURRED_REFLECTIONS 3 +#define MODE_INPUT 4 +#define MODE_BLUR_MIX 5 +#define FLOAT_EPSILON 0.00001 +uniform sampler2D inputTexture;uniform sampler2D reflectionsTexture;uniform float samples; +#include +void mainImage(const in vec4 inputColor,const in vec2 uv,out vec4 outputColor){vec4 reflectionsTexel=texture2D(reflectionsTexture,vUv);ivec2 size=textureSize(reflectionsTexture,0);vec2 invTexSize=1./vec2(size.x,size.y);vec3 reflectionClr=reflectionsTexel.xyz;if(blur>FLOAT_EPSILON){vec3 blurredReflectionsColor=denoise(reflectionsTexel.rgb,reflectionsTexture,vUv,invTexSize,blur,blurSharpness,blurKernel);reflectionClr=mix(reflectionClr,blurredReflectionsColor.rgb,blur);} +#if RENDER_MODE == MODE_DEFAULT +outputColor=vec4(inputColor.rgb+reflectionClr,1.0); #endif -#define WEIGHT_INNER 0.125 -#define WEIGHT_OUTER 0.0555555 -varying vec2 vUv;varying vec2 vUv00;varying vec2 vUv01;varying vec2 vUv02;varying vec2 vUv03;varying vec2 vUv04;varying vec2 vUv05;varying vec2 vUv06;varying vec2 vUv07;varying vec2 vUv08;varying vec2 vUv09;varying vec2 vUv10;varying vec2 vUv11;float clampToBorder(const in vec2 uv){return float(uv.s>=0.0&&uv.s<=1.0&&uv.t>=0.0&&uv.t<=1.0);}void main(){vec4 c=vec4(0.0);vec4 w=WEIGHT_INNER*vec4(clampToBorder(vUv00),clampToBorder(vUv01),clampToBorder(vUv02),clampToBorder(vUv03));c+=w.x*texture2D(inputBuffer,vUv00);c+=w.y*texture2D(inputBuffer,vUv01);c+=w.z*texture2D(inputBuffer,vUv02);c+=w.w*texture2D(inputBuffer,vUv03);w=WEIGHT_OUTER*vec4(clampToBorder(vUv04),clampToBorder(vUv05),clampToBorder(vUv06),clampToBorder(vUv07));c+=w.x*texture2D(inputBuffer,vUv04);c+=w.y*texture2D(inputBuffer,vUv05);c+=w.z*texture2D(inputBuffer,vUv06);c+=w.w*texture2D(inputBuffer,vUv07);w=WEIGHT_OUTER*vec4(clampToBorder(vUv08),clampToBorder(vUv09),clampToBorder(vUv10),clampToBorder(vUv11));c+=w.x*texture2D(inputBuffer,vUv08);c+=w.y*texture2D(inputBuffer,vUv09);c+=w.z*texture2D(inputBuffer,vUv10);c+=w.w*texture2D(inputBuffer,vUv11);c+=WEIGHT_OUTER*texture2D(inputBuffer,vUv);gl_FragColor=c; -#include -}`,convolution_downsampling_default2="uniform vec2 texelSize;varying vec2 vUv;varying vec2 vUv00;varying vec2 vUv01;varying vec2 vUv02;varying vec2 vUv03;varying vec2 vUv04;varying vec2 vUv05;varying vec2 vUv06;varying vec2 vUv07;varying vec2 vUv08;varying vec2 vUv09;varying vec2 vUv10;varying vec2 vUv11;void main(){vUv=position.xy*0.5+0.5;vUv00=vUv+texelSize*vec2(-1.0,1.0);vUv01=vUv+texelSize*vec2(1.0,1.0);vUv02=vUv+texelSize*vec2(-1.0,-1.0);vUv03=vUv+texelSize*vec2(1.0,-1.0);vUv04=vUv+texelSize*vec2(-2.0,2.0);vUv05=vUv+texelSize*vec2(0.0,2.0);vUv06=vUv+texelSize*vec2(2.0,2.0);vUv07=vUv+texelSize*vec2(-2.0,0.0);vUv08=vUv+texelSize*vec2(2.0,0.0);vUv09=vUv+texelSize*vec2(-2.0,-2.0);vUv10=vUv+texelSize*vec2(0.0,-2.0);vUv11=vUv+texelSize*vec2(2.0,-2.0);gl_Position=vec4(position.xy,1.0,1.0);}",DownsamplingMaterial=class extends ShaderMaterial{constructor(){super({name:"DownsamplingMaterial",uniforms:{inputBuffer:new Uniform(null),texelSize:new Uniform(new Vector2)},blending:NoBlending,toneMapped:!1,depthWrite:!1,depthTest:!1,fragmentShader:convolution_downsampling_default,vertexShader:convolution_downsampling_default2}),this.fragmentShader=updateFragmentShader(this.fragmentShader)}set inputBuffer(tt){this.uniforms.inputBuffer.value=tt}setSize(tt,et){this.uniforms.texelSize.value.set(1/tt,1/et)}},effect_default=`#include -#include -#include -#define packFloatToRGBA(v) packDepthToRGBA(v) -#define unpackRGBAToFloat(v) unpackRGBAToDepth(v) -#ifdef FRAMEBUFFER_PRECISION_HIGH -uniform mediump sampler2D inputBuffer; -#else -uniform lowp sampler2D inputBuffer; +#if RENDER_MODE == MODE_REFLECTIONS +outputColor=vec4(reflectionClr,1.0); #endif -#if DEPTH_PACKING == 3201 -uniform lowp sampler2D depthBuffer; -#elif defined(GL_FRAGMENT_PRECISION_HIGH) -uniform highp sampler2D depthBuffer; -#else -uniform mediump sampler2D depthBuffer; +#if RENDER_MODE == MODE_RAW_REFLECTION +outputColor=vec4(reflectionsTexel.xyz,1.0); #endif -uniform vec2 resolution;uniform vec2 texelSize;uniform float cameraNear;uniform float cameraFar;uniform float aspect;uniform float time;varying vec2 vUv; -#if THREE_REVISION < 143 -#define luminance(v) linearToRelativeLuminance(v) +#if RENDER_MODE == MODE_BLURRED_REFLECTIONS +outputColor=vec4(blurredReflectionsTexel.xyz,1.0); #endif -#if THREE_REVISION >= 137 -vec4 sRGBToLinear(const in vec4 value){return vec4(mix(pow(value.rgb*0.9478672986+vec3(0.0521327014),vec3(2.4)),value.rgb*0.0773993808,vec3(lessThanEqual(value.rgb,vec3(0.04045)))),value.a);} +#if RENDER_MODE == MODE_INPUT +outputColor=vec4(inputColor.xyz,1.0); #endif -float readDepth(const in vec2 uv){ -#if DEPTH_PACKING == 3201 -return unpackRGBAToDepth(texture2D(depthBuffer,uv)); -#else -return texture2D(depthBuffer,uv).r; +#if RENDER_MODE == MODE_BLUR_MIX +outputColor=vec4(vec3(blur),1.0); #endif -}float getViewZ(const in float depth){ +}`, + helperFunctions = `#define GLSLIFY 1 +vec3 getViewPosition(const float depth){float clipW=_projectionMatrix[2][3]*depth+_projectionMatrix[3][3];vec4 clipPosition=vec4((vec3(vUv,depth)-0.5)*2.0,1.0);clipPosition*=clipW;return(_inverseProjectionMatrix*clipPosition).xyz;}float getViewZ(const in float depth){ #ifdef PERSPECTIVE_CAMERA return perspectiveDepthToViewZ(depth,cameraNear,cameraFar); #else return orthographicDepthToViewZ(depth,cameraNear,cameraFar); #endif -}vec3 RGBToHCV(const in vec3 RGB){vec4 P=mix(vec4(RGB.bg,-1.0,2.0/3.0),vec4(RGB.gb,0.0,-1.0/3.0),step(RGB.b,RGB.g));vec4 Q=mix(vec4(P.xyw,RGB.r),vec4(RGB.r,P.yzx),step(P.x,RGB.r));float C=Q.x-min(Q.w,Q.y);float H=abs((Q.w-Q.y)/(6.0*C+EPSILON)+Q.z);return vec3(H,C,Q.x);}vec3 RGBToHSL(const in vec3 RGB){vec3 HCV=RGBToHCV(RGB);float L=HCV.z-HCV.y*0.5;float S=HCV.y/(1.0-abs(L*2.0-1.0)+EPSILON);return vec3(HCV.x,S,L);}vec3 HueToRGB(const in float H){float R=abs(H*6.0-3.0)-1.0;float G=2.0-abs(H*6.0-2.0);float B=2.0-abs(H*6.0-4.0);return clamp(vec3(R,G,B),0.0,1.0);}vec3 HSLToRGB(const in vec3 HSL){vec3 RGB=HueToRGB(HSL.x);float C=(1.0-abs(2.0*HSL.z-1.0))*HSL.y;return(RGB-0.5)*C+HSL.z;}FRAGMENT_HEAD void main(){FRAGMENT_MAIN_UV vec4 color0=texture2D(inputBuffer,UV);vec4 color1=vec4(0.0);FRAGMENT_MAIN_IMAGE color0.a=clamp(color0.a,0.0,1.0);gl_FragColor=color0; -#ifdef ENCODE_OUTPUT -#include -#endif -#include -}`,effect_default2="uniform vec2 resolution;uniform vec2 texelSize;uniform float cameraNear;uniform float cameraFar;uniform float aspect;uniform float time;varying vec2 vUv;VERTEX_HEAD void main(){vUv=position.xy*0.5+0.5;VERTEX_MAIN_SUPPORT gl_Position=vec4(position.xy,1.0,1.0);}",EffectMaterial=class extends ShaderMaterial{constructor(tt,et,nt,rt,it=!1){super({name:"EffectMaterial",defines:{THREE_REVISION:REVISION.replace(/\D+/g,""),DEPTH_PACKING:"0",ENCODE_OUTPUT:"1"},uniforms:{inputBuffer:new Uniform(null),depthBuffer:new Uniform(null),resolution:new Uniform(new Vector2),texelSize:new Uniform(new Vector2),cameraNear:new Uniform(.3),cameraFar:new Uniform(1e3),aspect:new Uniform(1),time:new Uniform(0)},blending:NoBlending,toneMapped:!1,depthWrite:!1,depthTest:!1,dithering:it}),tt&&this.setShaderParts(tt),et&&this.setDefines(et),nt&&this.setUniforms(nt),this.copyCameraSettings(rt)}set inputBuffer(tt){this.uniforms.inputBuffer.value=tt}setInputBuffer(tt){this.uniforms.inputBuffer.value=tt}get depthBuffer(){return this.uniforms.depthBuffer.value}set depthBuffer(tt){this.uniforms.depthBuffer.value=tt}get depthPacking(){return Number(this.defines.DEPTH_PACKING)}set depthPacking(tt){this.defines.DEPTH_PACKING=tt.toFixed(0),this.needsUpdate=!0}setDepthBuffer(tt,et=BasicDepthPacking){this.depthBuffer=tt,this.depthPacking=et}setShaderData(tt){this.setShaderParts(tt.shaderParts),this.setDefines(tt.defines),this.setUniforms(tt.uniforms),this.setExtensions(tt.extensions)}setShaderParts(tt){return this.fragmentShader=effect_default.replace(EffectShaderSection.FRAGMENT_HEAD,tt.get(EffectShaderSection.FRAGMENT_HEAD)||"").replace(EffectShaderSection.FRAGMENT_MAIN_UV,tt.get(EffectShaderSection.FRAGMENT_MAIN_UV)||"").replace(EffectShaderSection.FRAGMENT_MAIN_IMAGE,tt.get(EffectShaderSection.FRAGMENT_MAIN_IMAGE)||""),this.vertexShader=effect_default2.replace(EffectShaderSection.VERTEX_HEAD,tt.get(EffectShaderSection.VERTEX_HEAD)||"").replace(EffectShaderSection.VERTEX_MAIN_SUPPORT,tt.get(EffectShaderSection.VERTEX_MAIN_SUPPORT)||""),this.fragmentShader=updateFragmentShader(this.fragmentShader),this.needsUpdate=!0,this}setDefines(tt){for(const et of tt.entries())this.defines[et[0]]=et[1];return this.needsUpdate=!0,this}setUniforms(tt){for(const et of tt.entries())this.uniforms[et[0]]=et[1];return this}setExtensions(tt){this.extensions={};for(const et of tt)this.extensions[et]=!0;return this}get encodeOutput(){return this.defines.ENCODE_OUTPUT!==void 0}set encodeOutput(tt){this.encodeOutput!==tt&&(tt?this.defines.ENCODE_OUTPUT="1":delete this.defines.ENCODE_OUTPUT,this.needsUpdate=!0)}isOutputEncodingEnabled(tt){return this.encodeOutput}setOutputEncodingEnabled(tt){this.encodeOutput=tt}get time(){return this.uniforms.time.value}set time(tt){this.uniforms.time.value=tt}setDeltaTime(tt){this.uniforms.time.value+=tt}adoptCameraSettings(tt){this.copyCameraSettings(tt)}copyCameraSettings(tt){tt&&(this.uniforms.cameraNear.value=tt.near,this.uniforms.cameraFar.value=tt.far,tt instanceof PerspectiveCamera?this.defines.PERSPECTIVE_CAMERA="1":delete this.defines.PERSPECTIVE_CAMERA,this.needsUpdate=!0)}setSize(tt,et){const nt=this.uniforms;nt.resolution.value.set(tt,et),nt.texelSize.value.set(1/tt,1/et),nt.aspect.value=tt/et}static get Section(){return EffectShaderSection}},convolution_god_rays_default=`#include -#include -#ifdef FRAMEBUFFER_PRECISION_HIGH -uniform mediump sampler2D inputBuffer; -#else -uniform lowp sampler2D inputBuffer; +}vec3 screenSpaceToWorldSpace(const vec2 uv,const float depth){vec4 ndc=vec4((uv.x-0.5)*2.0,(uv.y-0.5)*2.0,(depth-0.5)*2.0,1.0);vec4 clip=_inverseProjectionMatrix*ndc;vec4 view=cameraMatrixWorld*(clip/clip.w);return view.xyz;} +#define Scale (vec3(0.8, 0.8, 0.8)) +#define K (19.19) +vec3 hash(vec3 a){a=fract(a*Scale);a+=dot(a,a.yxz+K);return fract((a.xxy+a.yxx)*a.zyx);}float fresnel_dielectric_cos(float cosi,float eta){float c=abs(cosi);float g=eta*eta-1.0+c*c;float result;if(g>0.0){g=sqrt(g);float A=(g-c)/(g+c);float B=(c*(g+c)-1.0)/(c*(g-c)+1.0);result=0.5*A*A*(1.0+B*B);}else{result=1.0;}return result;}float fresnel_dielectric(vec3 Incoming,vec3 Normal,float eta){float cosine=dot(Incoming,Normal);return min(1.0,5.0*fresnel_dielectric_cos(cosine,eta));}`, + trCompose = `#define GLSLIFY 1 +#define INV_EULER 0.36787944117144233 +alpha=velocityDisocclusion0.5; +#ifdef boxBlur +if(needsBlur)inputColor=boxBlurredColor; #endif -uniform vec2 lightPosition;uniform float exposure;uniform float decay;uniform float density;uniform float weight;uniform float clampMax;varying vec2 vUv;void main(){vec2 coord=vUv;vec2 delta=lightPosition-coord;delta*=1.0/SAMPLES_FLOAT*density;float illuminationDecay=1.0;vec4 color=vec4(0.0);for(int i=0;i -}`,GodRaysMaterial=class extends ShaderMaterial{constructor(tt){super({name:"GodRaysMaterial",defines:{SAMPLES_INT:"60",SAMPLES_FLOAT:"60.0"},uniforms:{inputBuffer:new Uniform(null),lightPosition:new Uniform(tt),density:new Uniform(1),decay:new Uniform(1),weight:new Uniform(1),exposure:new Uniform(1),clampMax:new Uniform(1)},blending:NoBlending,toneMapped:!1,depthWrite:!1,depthTest:!1,fragmentShader:convolution_god_rays_default,vertexShader:common_default})}set inputBuffer(tt){this.uniforms.inputBuffer.value=tt}setInputBuffer(tt){this.uniforms.inputBuffer.value=tt}get lightPosition(){return this.uniforms.lightPosition.value}getLightPosition(){return this.uniforms.lightPosition.value}setLightPosition(tt){this.uniforms.lightPosition.value=tt}get density(){return this.uniforms.density.value}set density(tt){this.uniforms.density.value=tt}getDensity(){return this.uniforms.density.value}setDensity(tt){this.uniforms.density.value=tt}get decay(){return this.uniforms.decay.value}set decay(tt){this.uniforms.decay.value=tt}getDecay(){return this.uniforms.decay.value}setDecay(tt){this.uniforms.decay.value=tt}get weight(){return this.uniforms.weight.value}set weight(tt){this.uniforms.weight.value=tt}getWeight(){return this.uniforms.weight.value}setWeight(tt){this.uniforms.weight.value=tt}get exposure(){return this.uniforms.exposure.value}set exposure(tt){this.uniforms.exposure.value=tt}getExposure(){return this.uniforms.exposure.value}setExposure(tt){this.uniforms.exposure.value=tt}get maxIntensity(){return this.uniforms.clampMax.value}set maxIntensity(tt){this.uniforms.clampMax.value=tt}getMaxIntensity(){return this.uniforms.clampMax.value}setMaxIntensity(tt){this.uniforms.clampMax.value=tt}get samples(){return Number(this.defines.SAMPLES_INT)}set samples(tt){const et=Math.floor(tt);this.defines.SAMPLES_INT=et.toFixed(0),this.defines.SAMPLES_FLOAT=et.toFixed(1),this.needsUpdate=!0}getSamples(){return this.samples}setSamples(tt){this.samples=tt}},luminance_default=`#include -#if THREE_REVISION < 143 -#define luminance(v) linearToRelativeLuminance(v) +if(alpha==1.0){outputColor=accumulatedColor;}else{float m=mix(alpha,1.0,blend);if(needsBlur)m=0.0;outputColor=accumulatedColor*m+inputColor*(1.0-m);}` + class MRTMaterial extends ShaderMaterial { + constructor() { + super({ + type: 'MRTMaterial', + defines: { USE_UV: '', TEMPORAL_RESOLVE: '' }, + uniforms: { + opacity: new Uniform(1), + normalMap: new Uniform(null), + normalScale: new Uniform(new Vector2(1, 1)), + uvTransform: new Uniform(new Matrix3()), + roughness: new Uniform(1), + roughnessMap: new Uniform(null), + }, + vertexShader: ` + #ifdef USE_MRT + varying vec2 vHighPrecisionZW; + #endif + #define NORMAL + #if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( TANGENTSPACE_NORMALMAP ) + varying vec3 vViewPosition; + #endif + #include + #include + #include + #include + #include + #include + #include + #include + #ifdef USE_UV + ${REVISION.replace(/\D+/g, '') >= 151 ? 'uniform mat3 uvTransform;' : ''} + #endif + void main() { + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( TANGENTSPACE_NORMALMAP ) + vViewPosition = - mvPosition.xyz; + #endif + #ifdef USE_MRT + vHighPrecisionZW = gl_Position.zw; + #endif + #ifdef USE_UV + vUv = ( uvTransform * vec3( uv, 1 ) ).xy; + #endif + } + `, + fragmentShader: ` + #define NORMAL + #if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( TANGENTSPACE_NORMALMAP ) + varying vec3 vViewPosition; + #endif + #include + #include + #include + #include + #include + #include + #include + #include + + #ifdef USE_MRT + layout(location = 0) out vec4 gNormal; + layout(location = 1) out vec4 gDepth; + + varying vec2 vHighPrecisionZW; + #endif + uniform float roughness; + void main() { + #include + #include + #include + #include + + float roughnessFactor = roughness; + + if(roughness > 10.0e9){ + roughnessFactor = 1.; + }else{ + #ifdef useRoughnessMap + vec4 texelRoughness = texture2D( roughnessMap, vUv ); + // reads channel G, compatible with a combined OcclusionRoughnessMetallic (RGB) texture + roughnessFactor *= texelRoughness.g; + #endif + } + + vec3 normalColor = packNormalToRGB( normal ); + #ifdef USE_MRT + float fragCoordZ = 0.5 * vHighPrecisionZW[0] / vHighPrecisionZW[1] + 0.5; + vec4 depthColor = packDepthToRGBA( fragCoordZ ); + gNormal = vec4( normalColor, roughnessFactor ); + gDepth = depthColor; + #else + gl_FragColor = vec4(normalColor, roughnessFactor); + #endif + } + `, + toneMapped: !1, + }), + (this.normalMapType = TangentSpaceNormalMap), + (this.normalScale = new Vector2(1, 1)), + Object.defineProperty(this, 'glslVersion', { + get() { + return 'USE_MRT' in this.defines ? GLSL3 : null + }, + set(et) {}, + }) + } + } + var vertexShader$1 = `#define GLSLIFY 1 +varying vec2 vUv;void main(){vUv=position.xy*0.5+0.5;gl_Position=vec4(position.xy,1.0,1.0);}`, + fragmentShader = `#define GLSLIFY 1 +varying vec2 vUv;uniform sampler2D inputTexture;uniform sampler2D accumulatedTexture;uniform sampler2D normalTexture;uniform sampler2D depthTexture;uniform sampler2D envMap;uniform mat4 _projectionMatrix;uniform mat4 _inverseProjectionMatrix;uniform mat4 cameraMatrixWorld;uniform float cameraNear;uniform float cameraFar;uniform float rayDistance;uniform float intensity;uniform float maxDepthDifference;uniform float roughnessFade;uniform float maxRoughness;uniform float fade;uniform float thickness;uniform float ior;uniform float samples;uniform float jitter;uniform float jitterRoughness; +#define INVALID_RAY_COORDS vec2(-1.0); +#define EARLY_OUT_COLOR vec4(0.0, 0.0, 0.0, 1.0) +#define FLOAT_EPSILON 0.00001 +float nearMinusFar;float nearMulFar;float farMinusNear; +#include +#include +vec2 RayMarch(vec3 dir,inout vec3 hitPos,inout float rayHitDepthDifference);vec2 BinarySearch(in vec3 dir,inout vec3 hitPos,inout float rayHitDepthDifference);float fastGetViewZ(const in float depth);vec3 getIBLRadiance(const in vec3 viewDir,const in vec3 normal,const in float roughness);void main(){vec4 depthTexel=textureLod(depthTexture,vUv,0.0);if(dot(depthTexel.rgb,depthTexel.rgb)1.0)jitterMix=1.0;jitt=mix(vec3(0.0),randomJitter*spread,jitterMix);}viewNormal+=jitt;float fresnelFactor=fresnel_dielectric(viewDir,viewNormal,ior);vec3 iblRadiance=getIBLRadiance(-viewDir,viewNormal,0.)*fresnelFactor;float lastFrameAlpha=textureLod(accumulatedTexture,vUv,0.0).a;if(roughness>maxRoughness||(roughness>1.0-FLOAT_EPSILON&&roughnessFade>1.0-FLOAT_EPSILON)){gl_FragColor=vec4(iblRadiance,lastFrameAlpha);return;}vec3 reflected=reflect(viewDir,viewNormal);vec3 rayDir=reflected*-viewPos.z;vec3 hitPos=viewPos;float rayHitDepthDifference;vec2 coords=RayMarch(rayDir,hitPos,rayHitDepthDifference);if(coords.x==-1.0){gl_FragColor=vec4(iblRadiance,lastFrameAlpha);return;}vec4 SSRTexel=textureLod(inputTexture,coords.xy,0.0);vec4 SSRTexelReflected=textureLod(accumulatedTexture,coords.xy,0.0);vec3 SSR=SSRTexel.rgb+SSRTexelReflected.rgb;float roughnessFactor=mix(specular,1.0,max(0.0,1.0-roughnessFade));vec2 coordsNDC=(coords.xy*2.0-1.0);float screenFade=0.1;float maxDimension=min(1.0,max(abs(coordsNDC.x),abs(coordsNDC.y)));float reflectionIntensity=1.0-(max(0.0,maxDimension-screenFade)/(1.0-screenFade));reflectionIntensity=max(0.,reflectionIntensity);vec3 finalSSR=mix(iblRadiance,SSR,reflectionIntensity)*roughnessFactor;if(fade!=0.0){vec3 hitWorldPos=screenSpaceToWorldSpace(coords,rayHitDepthDifference);float reflectionDistance=distance(hitWorldPos,worldPos)+1.0;float opacity=1.0/(reflectionDistance*fade*0.1);if(opacity>1.0)opacity=1.0;finalSSR*=opacity;}finalSSR*=fresnelFactor*intensity;finalSSR=min(vec3(1.0),finalSSR);float alpha=hitPos.z==1.0 ? 1.0 : SSRTexelReflected.a;alpha=min(lastFrameAlpha,alpha);gl_FragColor=vec4(finalSSR,alpha);}vec2 RayMarch(vec3 dir,inout vec3 hitPos,inout float rayHitDepthDifference){dir=normalize(dir);dir*=rayDistance/float(steps);float depth;vec4 projectedCoord;vec4 lastProjectedCoord;float unpackedDepth;vec4 depthTexel;for(int i=0;i1.0||projectedCoord.y<0.0||projectedCoord.y>1.0){return INVALID_RAY_COORDS;} #endif -#ifdef FRAMEBUFFER_PRECISION_HIGH -uniform mediump sampler2D inputBuffer; +depthTexel=textureLod(depthTexture,projectedCoord.xy,0.0);unpackedDepth=unpackRGBAToDepth(depthTexel);depth=fastGetViewZ(unpackedDepth);rayHitDepthDifference=depth-hitPos.z;if(rayHitDepthDifference>=0.0&&rayHitDepthDifference0.0){return INVALID_RAY_COORDS;} #endif -varying vec2 vUv;void main(){vec4 texel=texture2D(inputBuffer,vUv);float l=luminance(texel.rgb); -#ifdef RANGE -float low=step(range.x,l);float high=step(l,range.y);l*=low*high; -#elif defined(THRESHOLD) -l=smoothstep(threshold,threshold+smoothing,l); +lastProjectedCoord=projectedCoord;}hitPos.z=1.0; +#ifndef missedRays +return INVALID_RAY_COORDS; #endif -#ifdef COLOR -gl_FragColor=vec4(texel.rgb*l,l); +rayHitDepthDifference=unpackedDepth;return projectedCoord.xy;}vec2 BinarySearch(in vec3 dir,inout vec3 hitPos,inout float rayHitDepthDifference){float depth;vec4 projectedCoord;vec2 lastMinProjectedCoordXY;float unpackedDepth;vec4 depthTexel;for(int i=0;i0.0){hitPos-=dir;}else{hitPos+=dir;}}if(dot(depthTexel.rgb,depthTexel.rgb)maxDepthDifference)return INVALID_RAY_COORDS;projectedCoord=_projectionMatrix*vec4(hitPos,1.0);projectedCoord.xy/=projectedCoord.w;projectedCoord.xy=projectedCoord.xy*0.5+0.5;rayHitDepthDifference=unpackedDepth;return projectedCoord.xy;}float fastGetViewZ(const in float depth){ +#ifdef PERSPECTIVE_CAMERA +return nearMulFar/(farMinusNear*depth-cameraFar); #else -gl_FragColor=vec4(l); +return depth*nearMinusFar-cameraNear; #endif -}`,LuminanceMaterial=class extends ShaderMaterial{constructor(tt=!1,et=null){super({name:"LuminanceMaterial",defines:{THREE_REVISION:REVISION.replace(/\D+/g,"")},uniforms:{inputBuffer:new Uniform(null),threshold:new Uniform(0),smoothing:new Uniform(1),range:new Uniform(null)},blending:NoBlending,toneMapped:!1,depthWrite:!1,depthTest:!1,fragmentShader:luminance_default,vertexShader:common_default}),this.colorOutput=tt,this.luminanceRange=et}set inputBuffer(tt){this.uniforms.inputBuffer.value=tt}setInputBuffer(tt){this.uniforms.inputBuffer.value=tt}get threshold(){return this.uniforms.threshold.value}set threshold(tt){this.smoothing>0||tt>0?this.defines.THRESHOLD="1":delete this.defines.THRESHOLD,this.uniforms.threshold.value=tt}getThreshold(){return this.threshold}setThreshold(tt){this.threshold=tt}get smoothing(){return this.uniforms.smoothing.value}set smoothing(tt){this.threshold>0||tt>0?this.defines.THRESHOLD="1":delete this.defines.THRESHOLD,this.uniforms.smoothing.value=tt}getSmoothingFactor(){return this.smoothing}setSmoothingFactor(tt){this.smoothing=tt}get useThreshold(){return this.threshold>0||this.smoothing>0}set useThreshold(tt){}get colorOutput(){return this.defines.COLOR!==void 0}set colorOutput(tt){tt?this.defines.COLOR="1":delete this.defines.COLOR,this.needsUpdate=!0}isColorOutputEnabled(tt){return this.colorOutput}setColorOutputEnabled(tt){this.colorOutput=tt}get useRange(){return this.luminanceRange!==null}set useRange(tt){this.luminanceRange=null}get luminanceRange(){return this.uniforms.range.value}set luminanceRange(tt){tt!==null?this.defines.RANGE="1":delete this.defines.RANGE,this.uniforms.range.value=tt,this.needsUpdate=!0}getLuminanceRange(){return this.luminanceRange}setLuminanceRange(tt){this.luminanceRange=tt}},mask_default=`#ifdef FRAMEBUFFER_PRECISION_HIGH -uniform mediump sampler2D inputBuffer; +} +#include +#include +vec3 getIBLRadiance(const in vec3 viewDir,const in vec3 normal,const in float roughness){ +#if defined(ENVMAP_TYPE_CUBE_UV) +vec3 reflectVec=reflect(-viewDir,normal);reflectVec=normalize(mix(reflectVec,normal,roughness*roughness));reflectVec=inverseTransformDirection(reflectVec,viewMatrix);vec4 envMapColor=textureCubeUV(envMap,reflectVec,roughness);return envMapColor.rgb*intensity; #else -uniform lowp sampler2D inputBuffer; +return vec3(0.0); #endif -#ifdef MASK_PRECISION_HIGH -uniform mediump sampler2D maskTexture; -#else -uniform lowp sampler2D maskTexture; +}` + class ReflectionsMaterial extends ShaderMaterial { + constructor() { + super({ + type: 'ReflectionsMaterial', + uniforms: { + inputTexture: new Uniform(null), + accumulatedTexture: new Uniform(null), + normalTexture: new Uniform(null), + depthTexture: new Uniform(null), + _projectionMatrix: new Uniform(new Matrix4()), + _inverseProjectionMatrix: new Uniform(new Matrix4()), + cameraMatrixWorld: new Uniform(new Matrix4()), + cameraNear: new Uniform(0), + cameraFar: new Uniform(0), + rayDistance: new Uniform(0), + intensity: new Uniform(0), + roughnessFade: new Uniform(0), + fade: new Uniform(0), + thickness: new Uniform(0), + ior: new Uniform(0), + maxDepthDifference: new Uniform(0), + jitter: new Uniform(0), + jitterRoughness: new Uniform(0), + maxRoughness: new Uniform(0), + samples: new Uniform(0), + envMap: new Uniform(null), + envMapPosition: new Uniform(new Vector3()), + envMapSize: new Uniform(new Vector3()), + viewMatrix: new Uniform(new Matrix4()), + }, + defines: { + steps: 20, + refineSteps: 5, + CUBEUV_TEXEL_WIDTH: 0, + CUBEUV_TEXEL_HEIGHT: 0, + CUBEUV_MAX_MIP: 0, + vWorldPosition: 'worldPos', + }, + fragmentShader: fragmentShader.replace('#include ', helperFunctions), + vertexShader: vertexShader$1, + toneMapped: !1, + depthWrite: !1, + depthTest: !1, + }) + } + } + const getVisibleChildren = (tt) => { + const et = [tt], + nt = [] + for (; et.length !== 0; ) { + const rt = et.shift() + rt.material && nt.push(rt) + for (const it of rt.children) it.visible && et.push(it) + } + return nt + }, + generateCubeUVSize = (tt) => { + const et = tt.envMapCubeUVHeight + if (et === null) return null + const nt = Math.log2(et) - 2, + rt = 1 / et + return { texelWidth: 1 / (3 * Math.max(Math.pow(2, nt), 7 * 16)), texelHeight: rt, maxMip: nt } + }, + setupEnvMap = (tt, et, nt) => { + tt.uniforms.envMap.value = et + const rt = generateCubeUVSize({ envMapCubeUVHeight: nt }) + ;(tt.defines.ENVMAP_TYPE_CUBE_UV = ''), + (tt.defines.CUBEUV_TEXEL_WIDTH = rt.texelWidth), + (tt.defines.CUBEUV_TEXEL_HEIGHT = rt.texelHeight), + (tt.defines.CUBEUV_MAX_MIP = rt.maxMip + '.0'), + (tt.needsUpdate = !0) + }, + isWebGL2Available = () => { + try { + const tt = document.createElement('canvas') + return !!(window.WebGL2RenderingContext && tt.getContext('webgl2')) + } catch { + return !1 + } + } + class ReflectionsPass extends Pass { + constructor(et, nt = {}) { + super('ReflectionsPass'), + (this.ssrEffect = void 0), + (this.cachedMaterials = new WeakMap()), + (this.USE_MRT = !1), + (this.webgl1DepthPass = null), + (this.visibleMeshes = []), + (this.ssrEffect = et), + (this._scene = et._scene), + (this._camera = et._camera), + (this.fullscreenMaterial = new ReflectionsMaterial()), + et._camera.isPerspectiveCamera && (this.fullscreenMaterial.defines.PERSPECTIVE_CAMERA = '') + const rt = nt.width || typeof window < 'u' ? window.innerWidth : 2e3, + it = nt.height || typeof window < 'u' ? window.innerHeight : 1e3 + ;(this.renderTarget = new WebGLRenderTarget(rt, it, { + minFilter: LinearFilter, + magFilter: LinearFilter, + type: HalfFloatType, + depthBuffer: !1, + })), + (this.renderPass = new RenderPass(this._scene, this._camera)), + (this.USE_MRT = isWebGL2Available()), + this.USE_MRT + ? ((this.gBuffersRenderTarget = new WebGLMultipleRenderTargets(rt, it, 2, { + minFilter: LinearFilter, + magFilter: LinearFilter, + })), + (this.normalTexture = this.gBuffersRenderTarget.texture[0]), + (this.depthTexture = this.gBuffersRenderTarget.texture[1])) + : ((this.webgl1DepthPass = new DepthPass(this._scene, this._camera)), + (this.webgl1DepthPass.renderTarget.minFilter = LinearFilter), + (this.webgl1DepthPass.renderTarget.magFilter = LinearFilter), + (this.webgl1DepthPass.renderTarget.texture.minFilter = LinearFilter), + (this.webgl1DepthPass.renderTarget.texture.magFilter = LinearFilter), + this.webgl1DepthPass.setSize( + typeof window < 'u' ? window.innerWidth : 2e3, + typeof window < 'u' ? window.innerHeight : 1e3, + ), + (this.gBuffersRenderTarget = new WebGLRenderTarget(rt, it, { + minFilter: LinearFilter, + magFilter: LinearFilter, + })), + (this.normalTexture = this.gBuffersRenderTarget.texture), + (this.depthTexture = this.webgl1DepthPass.texture)), + (this.fullscreenMaterial.uniforms.normalTexture.value = this.normalTexture), + (this.fullscreenMaterial.uniforms.depthTexture.value = this.depthTexture), + (this.fullscreenMaterial.uniforms.accumulatedTexture.value = + this.ssrEffect.temporalResolvePass.accumulatedTexture), + (this.fullscreenMaterial.uniforms.cameraMatrixWorld.value = this._camera.matrixWorld), + (this.fullscreenMaterial.uniforms._projectionMatrix.value = this._camera.projectionMatrix), + (this.fullscreenMaterial.uniforms._inverseProjectionMatrix.value = this._camera.projectionMatrixInverse) + } + setSize(et, nt) { + this.renderTarget.setSize(et * this.ssrEffect.resolutionScale, nt * this.ssrEffect.resolutionScale), + this.gBuffersRenderTarget.setSize(et * this.ssrEffect.resolutionScale, nt * this.ssrEffect.resolutionScale), + (this.fullscreenMaterial.uniforms.accumulatedTexture.value = + this.ssrEffect.temporalResolvePass.accumulatedTexture), + (this.fullscreenMaterial.needsUpdate = !0) + } + dispose() { + this.renderTarget.dispose(), + this.gBuffersRenderTarget.dispose(), + this.renderPass.dispose(), + this.USE_MRT || this.webgl1DepthPass.dispose(), + this.fullscreenMaterial.dispose(), + (this.normalTexture = null), + (this.depthTexture = null), + (this.velocityTexture = null) + } + keepMaterialMapUpdated(et, nt, rt, it) { + this.ssrEffect[it] + ? nt[rt] !== et[rt] && + ((et[rt] = nt[rt]), + (et.uniforms[rt].value = nt[rt]), + nt[rt] ? (et.defines[it] = '') : delete et.defines[it], + (et.needsUpdate = !0)) + : et[rt] !== void 0 && + ((et[rt] = void 0), (et.uniforms[rt].value = void 0), delete et.defines[it], (et.needsUpdate = !0)) + } + setMRTMaterialInScene() { + this.visibleMeshes = getVisibleChildren(this._scene) + for (const et of this.visibleMeshes) + if (et.material) { + const nt = et.material + let [rt, it] = this.cachedMaterials.get(et) || [] + if (nt !== rt) { + it && it.dispose(), + (it = new MRTMaterial()), + this.USE_MRT && (it.defines.USE_MRT = ''), + (it.normalScale = nt.normalScale), + (it.uniforms.normalScale.value = nt.normalScale) + const ot = nt.map || nt.normalMap || nt.roughnessMap || nt.metalnessMap + ot && (it.uniforms.uvTransform.value = ot.matrix), this.cachedMaterials.set(et, [nt, it]) + } + this.keepMaterialMapUpdated(it, nt, 'normalMap', 'useNormalMap'), + this.keepMaterialMapUpdated(it, nt, 'roughnessMap', 'useRoughnessMap'), + (it.uniforms.roughness.value = + this.ssrEffect.selection.size === 0 || this.ssrEffect.selection.has(et) ? nt.roughness || 0 : 1e11), + (et.material = it) + } + } + unsetMRTMaterialInScene() { + for (const nt of this.visibleMeshes) { + var et + if (((et = nt.material) == null ? void 0 : et.type) === 'MRTMaterial') { + nt.visible = !0 + const [rt] = this.cachedMaterials.get(nt) + nt.material = rt + } + } + } + render(et, nt) { + this.setMRTMaterialInScene(), + et.setRenderTarget(this.gBuffersRenderTarget), + this.renderPass.render(et, this.gBuffersRenderTarget), + this.unsetMRTMaterialInScene(), + this.USE_MRT || this.webgl1DepthPass.renderPass.render(et, this.webgl1DepthPass.renderTarget), + (this.fullscreenMaterial.uniforms.inputTexture.value = nt.texture), + (this.fullscreenMaterial.uniforms.samples.value = this.ssrEffect.temporalResolvePass.samples), + (this.fullscreenMaterial.uniforms.cameraNear.value = this._camera.near), + (this.fullscreenMaterial.uniforms.cameraFar.value = this._camera.far), + this.fullscreenMaterial.uniforms.viewMatrix.value.copy(this._camera.matrixWorldInverse), + et.setRenderTarget(this.renderTarget), + et.render(this.scene, this.camera) + } + } + const defaultSSROptions = { + intensity: 1, + exponent: 1, + distance: 10, + fade: 0, + roughnessFade: 1, + thickness: 10, + ior: 1.45, + maxRoughness: 1, + maxDepthDifference: 10, + blend: 0.9, + correction: 1, + correctionRadius: 1, + blur: 0.5, + blurKernel: 1, + blurSharpness: 10, + jitter: 0, + jitterRoughness: 0, + steps: 20, + refineSteps: 5, + missedRays: !0, + useNormalMap: !0, + useRoughnessMap: !0, + resolutionScale: 1, + velocityResolutionScale: 1, + } + var vertexShader = `#define GLSLIFY 1 +varying vec2 vUv;void main(){vUv=position.xy*0.5+0.5;gl_Position=vec4(position.xy,1.0,1.0);}`, + temporalResolve = `#define GLSLIFY 1 +uniform sampler2D inputTexture;uniform sampler2D accumulatedTexture;uniform sampler2D velocityTexture;uniform sampler2D lastVelocityTexture;uniform float blend;uniform float correction;uniform float exponent;uniform float samples;uniform vec2 invTexSize;uniform mat4 curInverseProjectionMatrix;uniform mat4 curCameraMatrixWorld;uniform mat4 prevInverseProjectionMatrix;uniform mat4 prevCameraMatrixWorld;varying vec2 vUv; +#define MAX_NEIGHBOR_DEPTH_DIFFERENCE 0.001 +#define FLOAT_EPSILON 0.00001 +#define FLOAT_ONE_MINUS_EPSILON 0.99999 +vec3 transformexponent;vec3 undoColorTransformExponent;vec3 transformColor(vec3 color){if(exponent==1.0)return color;return pow(abs(color),transformexponent);}vec3 undoColorTransform(vec3 color){if(exponent==1.0)return color;return max(pow(abs(color),undoColorTransformExponent),vec3(0.0));}void main(){if(exponent!=1.0){transformexponent=vec3(1.0/exponent);undoColorTransformExponent=vec3(exponent);}vec4 inputTexel=textureLod(inputTexture,vUv,0.0);vec4 accumulatedTexel;vec3 inputColor=transformColor(inputTexel.rgb);vec3 accumulatedColor;float alpha=inputTexel.a;float velocityDisocclusion;bool didReproject=false; +#ifdef boxBlur +vec3 boxBlurredColor=inputTexel.rgb; #endif -#if MASK_FUNCTION != 0 -uniform float strength; +vec4 velocity=textureLod(velocityTexture,vUv,0.0);bool isMoving=alpha<1.0||dot(velocity.xy,velocity.xy)>0.0;if(isMoving){vec3 minNeighborColor=inputColor;vec3 maxNeighborColor=inputColor;vec3 col;vec2 neighborUv;vec2 reprojectedUv=vUv-velocity.xy;vec4 lastVelocity=textureLod(lastVelocityTexture,reprojectedUv,0.0);float depth=velocity.b;float closestDepth=depth;float lastClosestDepth=lastVelocity.b;float neighborDepth;float lastNeighborDepth;for(int x=-correctionRadius;x<=correctionRadius;x++){for(int y=-correctionRadius;y<=correctionRadius;y++){if(x!=0||y!=0){neighborUv=vUv+vec2(x,y)*invTexSize;vec4 neigborVelocity=textureLod(velocityTexture,neighborUv,0.0);neighborDepth=neigborVelocity.b;col=textureLod(inputTexture,neighborUv,0.0).xyz;int absX=abs(x);int absY=abs(y); +#ifdef dilation +if(absX==1&&absY==1){if(neighborDepth>closestDepth){velocity=neigborVelocity;closestDepth=neighborDepth;}vec4 lastNeighborVelocity=textureLod(velocityTexture,vUv+vec2(x,y)*invTexSize,0.0);lastNeighborDepth=lastNeighborVelocity.b;if(neighborDepth>closestDepth){lastVelocity=lastNeighborVelocity;lastClosestDepth=lastNeighborDepth;}} #endif -varying vec2 vUv;void main(){ -#if COLOR_CHANNEL == 0 -float mask=texture2D(maskTexture,vUv).r; -#elif COLOR_CHANNEL == 1 -float mask=texture2D(maskTexture,vUv).g; -#elif COLOR_CHANNEL == 2 -float mask=texture2D(maskTexture,vUv).b; -#else -float mask=texture2D(maskTexture,vUv).a; +if(abs(depth-neighborDepth)5 ? 121.0 : pow(float(correctionRadius*2+1),2.0);boxBlurredColor/=pxRadius;boxBlurredColor=transformColor(boxBlurredColor); #endif +if(reprojectedUv.x>=0.0&&reprojectedUv.x<=1.0&&reprojectedUv.y>=0.0&&reprojectedUv.y<=1.0){accumulatedTexel=textureLod(accumulatedTexture,reprojectedUv,0.0);accumulatedColor=transformColor(accumulatedTexel.rgb);vec3 clampedColor=clamp(accumulatedColor,minNeighborColor,maxNeighborColor);accumulatedColor=mix(accumulatedColor,clampedColor,correction);didReproject=true;}else{ +#ifdef boxBlur +accumulatedColor=boxBlurredColor; #else -mask=clamp(mask*strength,0.0,1.0); -#ifdef INVERTED -mask=1.0-mask; -#endif +accumulatedColor=inputColor; #endif -#if MASK_FUNCTION == 3 -vec4 texel=texture2D(inputBuffer,vUv);gl_FragColor=vec4(mask*texel.rgb,texel.a); -#elif MASK_FUNCTION == 2 -gl_FragColor=vec4(mask*texture2D(inputBuffer,vUv).rgb,mask); -#else -gl_FragColor=mask*texture2D(inputBuffer,vUv); +}if(velocity.r>FLOAT_ONE_MINUS_EPSILON&&velocity.g>FLOAT_ONE_MINUS_EPSILON){alpha=0.0;velocityDisocclusion=1.0;}}else{accumulatedColor=transformColor(textureLod(accumulatedTexture,vUv,0.0).rgb);}vec3 outputColor=inputColor; +#include +gl_FragColor=vec4(undoColorTransform(outputColor),alpha);}` + class TemporalResolveMaterial extends ShaderMaterial { + constructor(et) { + const nt = temporalResolve.replace('#include ', et) + super({ + type: 'TemporalResolveMaterial', + uniforms: { + inputTexture: new Uniform(null), + accumulatedTexture: new Uniform(null), + velocityTexture: new Uniform(null), + lastVelocityTexture: new Uniform(null), + samples: new Uniform(1), + blend: new Uniform(0.5), + correction: new Uniform(1), + exponent: new Uniform(1), + invTexSize: new Uniform(new Vector2()), + }, + defines: { correctionRadius: 1 }, + vertexShader, + fragmentShader: nt, + }) + } + } + const prev_skinning_pars_vertex = ` + #ifdef USE_SKINNING + #ifdef BONE_TEXTURE + uniform sampler2D prevBoneTexture; + mat4 getPrevBoneMatrix( const in float i ) { + float j = i * 4.0; + float x = mod( j, float( boneTextureSize ) ); + float y = floor( j / float( boneTextureSize ) ); + float dx = 1.0 / float( boneTextureSize ); + float dy = 1.0 / float( boneTextureSize ); + y = dy * ( y + 0.5 ); + vec4 v1 = texture2D( prevBoneTexture, vec2( dx * ( x + 0.5 ), y ) ); + vec4 v2 = texture2D( prevBoneTexture, vec2( dx * ( x + 1.5 ), y ) ); + vec4 v3 = texture2D( prevBoneTexture, vec2( dx * ( x + 2.5 ), y ) ); + vec4 v4 = texture2D( prevBoneTexture, vec2( dx * ( x + 3.5 ), y ) ); + mat4 bone = mat4( v1, v2, v3, v4 ); + return bone; + } + #else + uniform mat4 prevBoneMatrices[ MAX_BONES ]; + mat4 getPrevBoneMatrix( const in float i ) { + mat4 bone = prevBoneMatrices[ int(i) ]; + return bone; + } + #endif + #endif +`, + velocity_vertex = ` + vec3 transformed; + + // Get the normal + ${ShaderChunk.skinbase_vertex} + ${ShaderChunk.beginnormal_vertex} + ${ShaderChunk.skinnormal_vertex} + ${ShaderChunk.defaultnormal_vertex} + + // Get the current vertex position + transformed = vec3( position ); + ${ShaderChunk.skinning_vertex} + newPosition = velocityMatrix * vec4( transformed, 1.0 ); + + // Get the previous vertex position + transformed = vec3( position ); + ${ShaderChunk.skinbase_vertex.replace(/mat4 /g, '').replace(/getBoneMatrix/g, 'getPrevBoneMatrix')} + ${ShaderChunk.skinning_vertex.replace(/vec4 /g, '')} + prevPosition = prevVelocityMatrix * vec4( transformed, 1.0 ); + + gl_Position = newPosition; +` + class VelocityMaterial extends ShaderMaterial { + constructor() { + super({ + uniforms: { + prevVelocityMatrix: { value: new Matrix4() }, + velocityMatrix: { value: new Matrix4() }, + prevBoneTexture: { value: null }, + interpolateGeometry: { value: 0 }, + intensity: { value: 1 }, + boneTexture: { value: null }, + alphaTest: { value: 0 }, + map: { value: null }, + alphaMap: { value: null }, + opacity: { value: 1 }, + }, + vertexShader: ` + #define MAX_BONES 1024 + + ${ShaderChunk.skinning_pars_vertex} + ${prev_skinning_pars_vertex} + + uniform mat4 velocityMatrix; + uniform mat4 prevVelocityMatrix; + uniform float interpolateGeometry; + varying vec4 prevPosition; + varying vec4 newPosition; + varying vec2 vHighPrecisionZW; + + void main() { + + ${velocity_vertex} + + vHighPrecisionZW = gl_Position.zw; + + }`, + fragmentShader: ` + uniform float intensity; + varying vec4 prevPosition; + varying vec4 newPosition; + varying vec2 vHighPrecisionZW; + + void main() { + #ifdef FULL_MOVEMENT + gl_FragColor = vec4( 1., 1., 1. - gl_FragCoord.z, 0. ); + return; + #endif + + vec2 pos0 = (prevPosition.xy / prevPosition.w) * 0.5 + 0.5; + vec2 pos1 = (newPosition.xy / newPosition.w) * 0.5 + 0.5; + + vec2 vel = pos1 - pos0; + + float fragCoordZ = 0.5 * vHighPrecisionZW[0] / vHighPrecisionZW[1] + 0.5; + + gl_FragColor = vec4( vel, 1. - fragCoordZ, 0. ); + + }`, + }), + (this.isVelocityMaterial = !0) + } + } + const backgroundColor = new Color$1(0), + updateProperties = ['visible', 'wireframe', 'side'] + class VelocityPass extends Pass { + constructor(et, nt) { + var rt, it + super('VelocityPass'), + (this.cachedMaterials = new WeakMap()), + (this.lastCameraTransform = { position: new Vector3(), quaternion: new Quaternion() }), + (this.visibleMeshes = []), + (this.renderedMeshesThisFrame = 0), + (this.renderedMeshesLastFrame = 0), + (this._scene = et), + (this._camera = nt), + (this.renderTarget = new WebGLRenderTarget( + ((rt = window) == null ? void 0 : rt.innerWidth) || 1e3, + ((it = window) == null ? void 0 : it.innerHeight) || 1e3, + { type: HalfFloatType }, + )) + } + setVelocityMaterialInScene() { + ;(this.renderedMeshesThisFrame = 0), (this.visibleMeshes = getVisibleChildren(this._scene)) + for (const rt of this.visibleMeshes) { + var et + const it = rt.material + let [ot, at] = this.cachedMaterials.get(rt) || [] + if (it !== ot) { + var nt + ;(at = new VelocityMaterial()), + (at.lastMatrixWorld = new Matrix4()), + (rt.material = at), + (nt = rt.skeleton) != null && nt.boneTexture && this.saveBoneTexture(rt), + this.cachedMaterials.set(rt, [it, at]) + } + if ( + (at.uniforms.velocityMatrix.value.multiplyMatrices(this._camera.projectionMatrix, rt.modelViewMatrix), + rt.userData.needsUpdatedReflections || it.map instanceof VideoTexture + ? ('FULL_MOVEMENT' in at.defines || (at.needsUpdate = !0), (at.defines.FULL_MOVEMENT = '')) + : 'FULL_MOVEMENT' in at.defines && (delete at.defines.FULL_MOVEMENT, (at.needsUpdate = !0)), + (rt.visible = + this.cameraMovedThisFrame || + !rt.matrixWorld.equals(at.lastMatrixWorld) || + rt.skeleton || + 'FULL_MOVEMENT' in at.defines), + (rt.material = at), + !!rt.visible) + ) { + this.renderedMeshesThisFrame++ + for (const st of updateProperties) at[st] = it[st] + ;(et = rt.skeleton) != null && + et.boneTexture && + ((at.defines.USE_SKINNING = ''), + (at.defines.BONE_TEXTURE = ''), + (at.uniforms.boneTexture.value = rt.skeleton.boneTexture)) + } + } + } + saveBoneTexture(et) { + let nt = et.material.uniforms.prevBoneTexture.value + if (nt && nt.image.width === et.skeleton.boneTexture.width) + (nt = et.material.uniforms.prevBoneTexture.value), nt.image.data.set(et.skeleton.boneTexture.image.data) + else { + var rt + ;(rt = nt) == null || rt.dispose() + const it = et.skeleton.boneTexture.image.data.slice(), + ot = et.skeleton.boneTexture.image.width + ;(nt = new DataTexture(it, ot, ot, RGBAFormat, FloatType)), + (et.material.uniforms.prevBoneTexture.value = nt), + (nt.needsUpdate = !0) + } + } + unsetVelocityMaterialInScene() { + for (const nt of this.visibleMeshes) + if (nt.material.isVelocityMaterial) { + var et + ;(nt.visible = !0), + nt.material.lastMatrixWorld.copy(nt.matrixWorld), + nt.material.uniforms.prevVelocityMatrix.value.multiplyMatrices( + this._camera.projectionMatrix, + nt.modelViewMatrix, + ), + (et = nt.skeleton) != null && et.boneTexture && this.saveBoneTexture(nt), + (nt.material = this.cachedMaterials.get(nt)[0]) + } + } + setSize(et, nt) { + this.renderTarget.setSize(et, nt) + } + renderVelocity(et) { + if ((et.setRenderTarget(this.renderTarget), this.renderedMeshesThisFrame > 0)) { + const { background: nt } = this._scene + ;(this._scene.background = backgroundColor), et.render(this._scene, this._camera), (this._scene.background = nt) + } else et.clearColor() + } + checkCameraMoved() { + const et = this.lastCameraTransform.position.distanceToSquared(this._camera.position), + nt = 8 * (1 - this.lastCameraTransform.quaternion.dot(this._camera.quaternion)) + return et > 1e-6 || nt > 1e-6 + ? (this.lastCameraTransform.position.copy(this._camera.position), + this.lastCameraTransform.quaternion.copy(this._camera.quaternion), + !0) + : !1 + } + render(et) { + ;(this.cameraMovedThisFrame = this.checkCameraMoved()), + this.setVelocityMaterialInScene(), + (this.renderedMeshesThisFrame > 0 || this.renderedMeshesLastFrame > 0) && this.renderVelocity(et), + this.unsetVelocityMaterialInScene(), + (this.renderedMeshesLastFrame = this.renderedMeshesThisFrame) + } + } + const zeroVec2 = new Vector2() + class TemporalResolvePass extends Pass { + constructor(et, nt, rt, it = {}) { + super('TemporalResolvePass'), + (this.velocityPass = null), + (this.velocityResolutionScale = 1), + (this.samples = 1), + (this.lastCameraTransform = { position: new Vector3(), quaternion: new Quaternion() }), + (this._scene = et), + (this._camera = nt), + (this.renderTarget = new WebGLRenderTarget(1, 1, { + minFilter: LinearFilter, + magFilter: LinearFilter, + type: HalfFloatType, + depthBuffer: !1, + })), + (this.velocityPass = new VelocityPass(et, nt)), + (this.fullscreenMaterial = new TemporalResolveMaterial(rt)), + (this.fullscreenMaterial.defines.correctionRadius = it.correctionRadius || 1), + it.dilation && (this.fullscreenMaterial.defines.dilation = ''), + it.boxBlur && (this.fullscreenMaterial.defines.boxBlur = ''), + this.setupFramebuffers(1, 1), + this.checkCanUseSharedVelocityTexture() + } + dispose() { + this._scene.userData.velocityTexture === this.velocityPass.renderTarget.texture && + (delete this._scene.userData.velocityTexture, delete this._scene.userData.lastVelocityTexture), + this.renderTarget.dispose(), + this.accumulatedTexture.dispose(), + this.fullscreenMaterial.dispose(), + this.velocityPass.dispose() + } + setSize(et, nt) { + this.renderTarget.setSize(et, nt), + this.velocityPass.setSize(et * this.velocityResolutionScale, nt * this.velocityResolutionScale), + (this.velocityPass.renderTarget.texture.minFilter = + this.velocityResolutionScale === 1 ? NearestFilter : LinearFilter), + (this.velocityPass.renderTarget.texture.magFilter = + this.velocityResolutionScale === 1 ? NearestFilter : LinearFilter), + (this.velocityPass.renderTarget.texture.needsUpdate = !0), + this.fullscreenMaterial.uniforms.invTexSize.value.set(1 / et, 1 / nt), + this.setupFramebuffers(et, nt) + } + setupFramebuffers(et, nt) { + this.accumulatedTexture && this.accumulatedTexture.dispose(), + this.lastVelocityTexture && this.lastVelocityTexture.dispose(), + (this.accumulatedTexture = new FramebufferTexture(et, nt, RGBAFormat)), + (this.accumulatedTexture.minFilter = LinearFilter), + (this.accumulatedTexture.magFilter = LinearFilter), + (this.accumulatedTexture.type = HalfFloatType), + (this.lastVelocityTexture = new FramebufferTexture( + et * this.velocityResolutionScale, + nt * this.velocityResolutionScale, + RGBAFormat, + )), + (this.lastVelocityTexture.minFilter = this.velocityResolutionScale === 1 ? NearestFilter : LinearFilter), + (this.lastVelocityTexture.magFilter = this.velocityResolutionScale === 1 ? NearestFilter : LinearFilter), + (this.lastVelocityTexture.type = HalfFloatType), + (this.fullscreenMaterial.uniforms.accumulatedTexture.value = this.accumulatedTexture), + (this.fullscreenMaterial.uniforms.lastVelocityTexture.value = this.lastVelocityTexture), + (this.fullscreenMaterial.needsUpdate = !0) + } + checkCanUseSharedVelocityTexture() { + return ( + this._scene.userData.velocityTexture && + this.velocityPass.renderTarget.texture !== this._scene.userData.velocityTexture + ? this.velocityPass.renderTarget.texture === this.fullscreenMaterial.uniforms.velocityTexture.value && + ((this.fullscreenMaterial.uniforms.lastVelocityTexture.value = this._scene.userData.lastVelocityTexture), + (this.fullscreenMaterial.uniforms.velocityTexture.value = this._scene.userData.velocityTexture), + (this.fullscreenMaterial.needsUpdate = !0)) + : this.velocityPass.renderTarget.texture !== this.fullscreenMaterial.uniforms.velocityTexture.value && + ((this.fullscreenMaterial.uniforms.velocityTexture.value = this.velocityPass.renderTarget.texture), + (this.fullscreenMaterial.uniforms.lastVelocityTexture.value = this.lastVelocityTexture), + (this.fullscreenMaterial.needsUpdate = !0), + this._scene.userData.velocityTexture || + ((this._scene.userData.velocityTexture = this.velocityPass.renderTarget.texture), + (this._scene.userData.lastVelocityTexture = this.lastVelocityTexture))), + this.velocityPass.renderTarget.texture !== this.fullscreenMaterial.uniforms.velocityTexture.value + ) + } + checkNeedsResample() { + const et = this.lastCameraTransform.position.distanceToSquared(this._camera.position), + nt = 8 * (1 - this.lastCameraTransform.quaternion.dot(this._camera.quaternion)) + ;(et > 1e-6 || nt > 1e-6) && + ((this.samples = 1), + this.lastCameraTransform.position.copy(this._camera.position), + this.lastCameraTransform.quaternion.copy(this._camera.quaternion)) + } + render(et) { + this.samples++, + this.checkNeedsResample(), + (this.fullscreenMaterial.uniforms.samples.value = this.samples), + et.setRenderTarget(this.renderTarget), + et.render(this.scene, this.camera), + et.copyFramebufferToTexture(zeroVec2, this.accumulatedTexture), + et.setRenderTarget(this.velocityPass.renderTarget), + et.copyFramebufferToTexture(zeroVec2, this.lastVelocityTexture) + } + } + const halton = function (et, nt) { + let rt = 1, + it = 0 + for (; et > 0; ) (rt /= nt), (it += rt * (et % nt)), (et = ~~(et / nt)) + return it + }, + generateHalton23Points = (tt) => { + const et = [] + let nt = 1 + const rt = nt + tt + for (; nt < rt; nt++) et.push([halton(nt, 2) - 0.5, halton(nt, 3) - 0.5]) + return et + } + function escapeRegExp(tt) { + return tt.replace(/[.*+?^${}()|[\]\\]/g, '\\$&') + } + const worldposReplace = ` +#if defined( USE_ENVMAP ) || defined( ) || defined ( USE_SHADOWMAP ) + vec4 worldPosition = modelMatrix * vec4( transformed, 1.0 ); + + #ifdef BOX_PROJECTED_ENV_MAP + vWorldPosition = worldPosition.xyz; + #endif #endif -}`,MaskMaterial=class extends ShaderMaterial{constructor(tt=null){super({name:"MaskMaterial",uniforms:{maskTexture:new Uniform(tt),inputBuffer:new Uniform(null),strength:new Uniform(1)},blending:NoBlending,toneMapped:!1,depthWrite:!1,depthTest:!1,fragmentShader:mask_default,vertexShader:common_default}),this.colorChannel=ColorChannel.RED,this.maskFunction=MaskFunction.DISCARD}set inputBuffer(tt){this.uniforms.inputBuffer.value=tt}setInputBuffer(tt){this.uniforms.inputBuffer.value=tt}set maskTexture(tt){this.uniforms.maskTexture.value=tt,delete this.defines.MASK_PRECISION_HIGH,tt.type!==UnsignedByteType&&(this.defines.MASK_PRECISION_HIGH="1"),this.needsUpdate=!0}setMaskTexture(tt){this.maskTexture=tt}set colorChannel(tt){this.defines.COLOR_CHANNEL=tt.toFixed(0),this.needsUpdate=!0}setColorChannel(tt){this.colorChannel=tt}set maskFunction(tt){this.defines.MASK_FUNCTION=tt.toFixed(0),this.needsUpdate=!0}setMaskFunction(tt){this.maskFunction=tt}get inverted(){return this.defines.INVERTED!==void 0}set inverted(tt){this.inverted&&!tt?delete this.defines.INVERTED:tt&&(this.defines.INVERTED="1"),this.needsUpdate=!0}isInverted(){return this.inverted}setInverted(tt){this.inverted=tt}get strength(){return this.uniforms.strength.value}set strength(tt){this.uniforms.strength.value=tt}getStrength(){return this.strength}setStrength(tt){this.strength=tt}},outline_default="uniform lowp sampler2D inputBuffer;varying vec2 vUv0;varying vec2 vUv1;varying vec2 vUv2;varying vec2 vUv3;void main(){vec2 c0=texture2D(inputBuffer,vUv0).rg;vec2 c1=texture2D(inputBuffer,vUv1).rg;vec2 c2=texture2D(inputBuffer,vUv2).rg;vec2 c3=texture2D(inputBuffer,vUv3).rg;float d0=(c0.x-c1.x)*0.5;float d1=(c2.x-c3.x)*0.5;float d=length(vec2(d0,d1));float a0=min(c0.y,c1.y);float a1=min(c2.y,c3.y);float visibilityFactor=min(a0,a1);gl_FragColor.rg=(1.0-visibilityFactor>0.001)?vec2(d,0.0):vec2(0.0,d);}",outline_default2="uniform vec2 texelSize;varying vec2 vUv0;varying vec2 vUv1;varying vec2 vUv2;varying vec2 vUv3;void main(){vec2 uv=position.xy*0.5+0.5;vUv0=vec2(uv.x+texelSize.x,uv.y);vUv1=vec2(uv.x-texelSize.x,uv.y);vUv2=vec2(uv.x,uv.y+texelSize.y);vUv3=vec2(uv.x,uv.y-texelSize.y);gl_Position=vec4(position.xy,1.0,1.0);}",OutlineMaterial=class extends ShaderMaterial{constructor(tt=new Vector2){super({name:"OutlineMaterial",uniforms:{inputBuffer:new Uniform(null),texelSize:new Uniform(new Vector2)},blending:NoBlending,toneMapped:!1,depthWrite:!1,depthTest:!1,fragmentShader:outline_default,vertexShader:outline_default2}),this.uniforms.texelSize.value.set(tt.x,tt.y),this.uniforms.maskTexture=this.uniforms.inputBuffer}set inputBuffer(tt){this.uniforms.inputBuffer.value=tt}setInputBuffer(tt){this.uniforms.inputBuffer.value=tt}setTexelSize(tt,et){this.uniforms.texelSize.value.set(tt,et)}setSize(tt,et){this.uniforms.texelSize.value.set(1/tt,1/et)}},ssao_default=`#include -#include -#ifdef NORMAL_DEPTH -#ifdef GL_FRAGMENT_PRECISION_HIGH -uniform highp sampler2D normalDepthBuffer; -#else -uniform mediump sampler2D normalDepthBuffer; +`, + boxProjectDefinitions = ` +#ifdef BOX_PROJECTED_ENV_MAP + uniform vec3 envMapSize; + uniform vec3 envMapPosition; + varying vec3 vWorldPosition; + + vec3 parallaxCorrectNormal( vec3 v, vec3 cubeSize, vec3 cubePos ) { + vec3 nDir = normalize( v ); + + vec3 rbmax = ( .5 * cubeSize + cubePos - vWorldPosition ) / nDir; + vec3 rbmin = ( -.5 * cubeSize + cubePos - vWorldPosition ) / nDir; + + vec3 rbminmax; + + rbminmax.x = ( nDir.x > 0. ) ? rbmax.x : rbmin.x; + rbminmax.y = ( nDir.y > 0. ) ? rbmax.y : rbmin.y; + rbminmax.z = ( nDir.z > 0. ) ? rbmax.z : rbmin.z; + + float correction = min( min( rbminmax.x, rbminmax.y ), rbminmax.z ); + vec3 boxIntersection = vWorldPosition + nDir * correction; + + return boxIntersection - cubePos; + } #endif -float readDepth(const in vec2 uv){return texture2D(normalDepthBuffer,uv).a;} -#else -uniform lowp sampler2D normalBuffer; -#if DEPTH_PACKING == 3201 -uniform lowp sampler2D depthBuffer; -#elif defined(GL_FRAGMENT_PRECISION_HIGH) -uniform highp sampler2D depthBuffer; -#else -uniform mediump sampler2D depthBuffer; +`, + getIBLIrradiance_patch = ` +#ifdef BOX_PROJECTED_ENV_MAP + worldNormal = parallaxCorrectNormal( worldNormal, envMapSize, envMapPosition ); #endif -float readDepth(const in vec2 uv){ -#if DEPTH_PACKING == 3201 -return unpackRGBAToDepth(texture2D(depthBuffer,uv)); -#else -return texture2D(depthBuffer,uv).r; +`, + getIBLRadiance_patch = ` +#ifdef BOX_PROJECTED_ENV_MAP + reflectVec = parallaxCorrectNormal( reflectVec, envMapSize, envMapPosition ); #endif +` + function useBoxProjectedEnvMap(tt, et, nt) { + ;(tt.defines.BOX_PROJECTED_ENV_MAP = ''), + (tt.uniforms.envMapPosition = { value: et }), + (tt.uniforms.envMapSize = { value: nt }) + const rt = new RegExp( + escapeRegExp('vec3 worldNormal = inverseTransformDirection ( normal , viewMatrix ) ;').replaceAll(' ', '\\s*'), + 'g', + ), + it = new RegExp( + escapeRegExp('reflectVec = inverseTransformDirection ( reflectVec , viewMatrix ) ;').replaceAll(' ', '\\s*'), + 'g', + ) + ;(tt.vertexShader = + `varying vec3 vWorldPosition; +` + tt.vertexShader.replace('#include ', worldposReplace)), + (tt.fragmentShader = + boxProjectDefinitions + + ` +` + + tt.fragmentShader + .replace('#include ', ShaderChunk.envmap_physical_pars_fragment) + .replace( + rt, + `vec3 worldNormal = inverseTransformDirection( normal, viewMatrix ); + ${getIBLIrradiance_patch}`, + ) + .replace( + it, + `reflectVec = inverseTransformDirection( reflectVec, viewMatrix ); + ${getIBLRadiance_patch}`, + )) + } + const finalFragmentShader = finalSSRShader + .replace('#include ', helperFunctions) + .replace('#include ', boxBlur), + noResetSamplesProperties = ['blur', 'blurSharpness', 'blurKernel'], + defaultCubeRenderTarget = new WebGLCubeRenderTarget(1) + let pmremGenerator + class SSREffect extends Effect$1 { + constructor(et, nt, rt = defaultSSROptions) { + super('SSREffect', finalFragmentShader, { + type: 'FinalSSRMaterial', + uniforms: new Map([ + ['reflectionsTexture', new Uniform(null)], + ['blur', new Uniform(0)], + ['blurSharpness', new Uniform(0)], + ['blurKernel', new Uniform(0)], + ]), + defines: new Map([['RENDER_MODE', '0']]), + }), + (this.haltonSequence = generateHalton23Points(1024)), + (this.haltonIndex = 0), + (this.selection = new Selection$3()), + (this.lastSize = void 0), + (this.cubeCamera = new CubeCamera(0.001, 1e3, defaultCubeRenderTarget)), + (this.usingBoxProjectedEnvMap = !1), + (this._scene = et), + (this._camera = nt), + (rt = { ...defaultSSROptions, ...rt, ...{ boxBlur: !0, dilation: !0 } }), + (this.temporalResolvePass = new TemporalResolvePass(et, nt, trCompose, rt)), + (this.uniforms.get('reflectionsTexture').value = this.temporalResolvePass.renderTarget.texture), + (this.reflectionsPass = new ReflectionsPass(this, rt)), + (this.temporalResolvePass.fullscreenMaterial.uniforms.inputTexture.value = + this.reflectionsPass.renderTarget.texture), + (this.lastSize = { + width: rt.width, + height: rt.height, + resolutionScale: rt.resolutionScale, + velocityResolutionScale: rt.velocityResolutionScale, + }), + this.setSize(rt.width, rt.height), + this.makeOptionsReactive(rt) + } + makeOptionsReactive(et) { + let nt = !1 + const rt = this.reflectionsPass.fullscreenMaterial.uniforms, + it = Object.keys(rt) + for (const ot of Object.keys(et)) + Object.defineProperty(this, ot, { + get() { + return et[ot] + }, + set(at) { + if (!(et[ot] === at && nt)) + switch ( + ((et[ot] = at), + noResetSamplesProperties.includes(ot) || this.setSize(this.lastSize.width, this.lastSize.height, !0), + ot) + ) { + case 'resolutionScale': + this.setSize(this.lastSize.width, this.lastSize.height) + break + case 'velocityResolutionScale': + ;(this.temporalResolvePass.velocityResolutionScale = at), + this.setSize(this.lastSize.width, this.lastSize.height, !0) + break + case 'blur': + this.uniforms.get('blur').value = at + break + case 'blurSharpness': + this.uniforms.get('blurSharpness').value = at + break + case 'blurKernel': + this.uniforms.get('blurKernel').value = at + break + case 'steps': + ;(this.reflectionsPass.fullscreenMaterial.defines.steps = parseInt(at)), + (this.reflectionsPass.fullscreenMaterial.needsUpdate = nt) + break + case 'refineSteps': + ;(this.reflectionsPass.fullscreenMaterial.defines.refineSteps = parseInt(at)), + (this.reflectionsPass.fullscreenMaterial.needsUpdate = nt) + break + case 'missedRays': + at + ? (this.reflectionsPass.fullscreenMaterial.defines.missedRays = '') + : delete this.reflectionsPass.fullscreenMaterial.defines.missedRays, + (this.reflectionsPass.fullscreenMaterial.needsUpdate = nt) + break + case 'correctionRadius': + ;(this.temporalResolvePass.fullscreenMaterial.defines.correctionRadius = Math.round(at)), + (this.temporalResolvePass.fullscreenMaterial.needsUpdate = nt) + break + case 'blend': + this.temporalResolvePass.fullscreenMaterial.uniforms.blend.value = at + break + case 'correction': + this.temporalResolvePass.fullscreenMaterial.uniforms.correction.value = at + break + case 'exponent': + this.temporalResolvePass.fullscreenMaterial.uniforms.exponent.value = at + break + case 'distance': + rt.rayDistance.value = at + default: + it.includes(ot) && (rt[ot].value = at) + } + }, + }), + (this[ot] = et[ot]) + nt = !0 + } + setSize(et, nt, rt = !1) { + ;(!rt && + et === this.lastSize.width && + nt === this.lastSize.height && + this.resolutionScale === this.lastSize.resolutionScale && + this.velocityResolutionScale === this.lastSize.velocityResolutionScale) || + (this.temporalResolvePass.setSize(et, nt), + this.reflectionsPass.setSize(et, nt), + (this.lastSize = { + width: et, + height: nt, + resolutionScale: this.resolutionScale, + velocityResolutionScale: this.velocityResolutionScale, + })) + } + generateBoxProjectedEnvMapFallback(et, nt = new Vector3(), rt = new Vector3(), it = 512) { + this.cubeCamera.renderTarget.dispose(), + (this.cubeCamera.renderTarget = new WebGLCubeRenderTarget(it)), + this.cubeCamera.position.copy(nt), + this.cubeCamera.updateMatrixWorld(), + this.cubeCamera.update(et, this._scene), + pmremGenerator || ((pmremGenerator = new PMREMGenerator(et)), pmremGenerator.compileCubemapShader()) + const ot = pmremGenerator.fromCubemap(this.cubeCamera.renderTarget.texture).texture + ;(ot.minFilter = LinearFilter), (ot.magFilter = LinearFilter) + const at = this.reflectionsPass.fullscreenMaterial + return ( + useBoxProjectedEnvMap(at, nt, rt), + (at.fragmentShader = at.fragmentShader + .replace('vec3 worldPos', 'worldPos') + .replace('varying vec3 vWorldPosition;', 'vec3 worldPos;')), + at.uniforms.envMapPosition.value.copy(nt), + at.uniforms.envMapSize.value.copy(rt), + setupEnvMap(at, ot, it), + (this.usingBoxProjectedEnvMap = !0), + ot + ) + } + setIBLRadiance(et, nt) { + this._scene.traverse((rt) => { + if (rt.material) { + var it + const ot = (it = nt.properties.get(rt.material)) == null ? void 0 : it.uniforms + ot && 'disableIBLRadiance' in ot && (ot.disableIBLRadiance.value = et) + } + }) + } + deleteBoxProjectedEnvMapFallback() { + const et = this.reflectionsPass.fullscreenMaterial + ;(et.uniforms.envMap.value = null), + (et.fragmentShader = et.fragmentShader.replace('worldPos = ', 'vec3 worldPos = ')), + delete et.defines.BOX_PROJECTED_ENV_MAP, + (et.needsUpdate = !0), + (this.usingBoxProjectedEnvMap = !1) + } + dispose() { + super.dispose(), this.reflectionsPass.dispose(), this.temporalResolvePass.dispose() + } + update(et, nt) { + if (!this.usingBoxProjectedEnvMap && this._scene.environment) { + const st = this.reflectionsPass.fullscreenMaterial + let lt = null + if ( + (this._scene.traverse((ct) => { + if (!lt && ct.material && !ct.material.envMap) { + const ut = et.properties.get(ct.material) + 'envMap' in ut && ut.envMap instanceof Texture && (lt = ut.envMap) + } + }), + lt) + ) { + const ct = this._scene.environment.image.height + setupEnvMap(st, lt, ct) + } + } + this.haltonIndex = (this.haltonIndex + 1) % this.haltonSequence.length + const [rt, it] = this.haltonSequence[this.haltonIndex], + { width: ot, height: at } = this.lastSize + this.temporalResolvePass.velocityPass.render(et), + this._camera.setViewOffset && this._camera.setViewOffset(ot, at, rt, it, ot, at), + this.reflectionsPass.render(et, nt), + this.temporalResolvePass.render(et), + this._camera.clearViewOffset() + } + static patchDirectEnvIntensity(et = 0) { + et === 0 + ? (ShaderChunk.envmap_physical_pars_fragment = ShaderChunk.envmap_physical_pars_fragment.replace( + 'vec3 getIBLRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness ) {', + 'vec3 getIBLRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness ) { return vec3(0.0);', + )) + : (ShaderChunk.envmap_physical_pars_fragment = ShaderChunk.envmap_physical_pars_fragment.replace( + 'vec4 envMapColor = textureCubeUV( envMap, reflectVec, roughness );', + 'vec4 envMapColor = textureCubeUV( envMap, reflectVec, roughness ) * ' + et.toFixed(5) + ';', + )) + } + } + reactExports.forwardRef(function ({ ENABLE_BLUR: et = !0, USE_MRT: nt = !0, ...rt }, it) { + const { invalidate: ot } = useThree(), + { scene: at, camera: st } = reactExports.useContext(EffectComposerContext), + lt = reactExports.useMemo( + () => new SSREffect(at, st, { ENABLE_BLUR: et, USE_MRT: nt, ...rt }), + [at, st, et, nt, rt], + ), + ct = reactExports.useContext(selectionContext) + return ( + reactExports.useEffect(() => { + var ut + if (ct && ct.enabled && (ut = ct.selected) != null && ut.length) + return ( + lt.selection.set(ct.selected), + ot(), + () => { + lt.selection.clear(), ot() + } + ) + }, [ct]), + jsxRuntimeExports.jsx('primitive', { ref: it, object: lt, ...rt }) + ) + }) + const $e4ca8dcb0218f846$var$_geometry = new BufferGeometry() + $e4ca8dcb0218f846$var$_geometry.setAttribute( + 'position', + new BufferAttribute(new Float32Array([-1, -1, 3, -1, -1, 3]), 2), + ) + $e4ca8dcb0218f846$var$_geometry.setAttribute('uv', new BufferAttribute(new Float32Array([0, 0, 2, 0, 0, 2]), 2)) + $e4ca8dcb0218f846$var$_geometry.boundingSphere = new Sphere() + $e4ca8dcb0218f846$var$_geometry.computeBoundingSphere = function () {} + const $e4ca8dcb0218f846$var$_camera = new OrthographicCamera() + class $e4ca8dcb0218f846$export$dcd670d73db751f5 { + constructor(et) { + ;(this._mesh = new Mesh($e4ca8dcb0218f846$var$_geometry, et)), (this._mesh.frustumCulled = !1) + } + render(et) { + et.render(this._mesh, $e4ca8dcb0218f846$var$_camera) + } + get material() { + return this._mesh.material + } + set material(et) { + this._mesh.material = et + } + dispose() { + this._mesh.material.dispose(), this._mesh.geometry.dispose() + } + } + const $1ed45968c1160c3c$export$c9b263b9a17dffd7 = { + uniforms: { + sceneDiffuse: { value: null }, + sceneDepth: { value: null }, + sceneNormal: { value: null }, + projMat: { value: new Matrix4() }, + viewMat: { value: new Matrix4() }, + projViewMat: { value: new Matrix4() }, + projectionMatrixInv: { value: new Matrix4() }, + viewMatrixInv: { value: new Matrix4() }, + cameraPos: { value: new Vector3() }, + resolution: { value: new Vector2() }, + time: { value: 0 }, + samples: { value: [] }, + samplesR: { value: [] }, + bluenoise: { value: null }, + distanceFalloff: { value: 1 }, + radius: { value: 5 }, + near: { value: 0.1 }, + far: { value: 1e3 }, + logDepth: { value: !1 }, + ortho: { value: !1 }, + screenSpaceRadius: { value: !1 }, + }, + vertexShader: ` +varying vec2 vUv; +void main() { + vUv = uv; + gl_Position = vec4(position, 1); +}`, + fragmentShader: ` + #define SAMPLES 16 + #define FSAMPLES 16.0 +uniform sampler2D sceneDiffuse; +uniform highp sampler2D sceneNormal; +uniform highp sampler2D sceneDepth; +uniform mat4 projectionMatrixInv; +uniform mat4 viewMatrixInv; +uniform mat4 projMat; +uniform mat4 viewMat; +uniform mat4 projViewMat; +uniform vec3 cameraPos; +uniform vec2 resolution; +uniform float time; +uniform vec3[SAMPLES] samples; +uniform float[SAMPLES] samplesR; +uniform float radius; +uniform float distanceFalloff; +uniform float near; +uniform float far; +uniform bool logDepth; +uniform bool ortho; +uniform bool screenSpaceRadius; +uniform sampler2D bluenoise; + varying vec2 vUv; + highp float linearize_depth(highp float d, highp float zNear,highp float zFar) + { + return (zFar * zNear) / (zFar - d * (zFar - zNear)); + } + highp float linearize_depth_ortho(highp float d, highp float nearZ, highp float farZ) { + return nearZ + (farZ - nearZ) * d; + } + highp float linearize_depth_log(highp float d, highp float nearZ,highp float farZ) { + float depth = pow(2.0, d * log2(farZ + 1.0)) - 1.0; + float a = farZ / (farZ - nearZ); + float b = farZ * nearZ / (nearZ - farZ); + float linDepth = a + b / depth; + return ortho ? linearize_depth_ortho( + linDepth, + nearZ, + farZ + ) :linearize_depth(linDepth, nearZ, farZ); + } + + vec3 getWorldPosLog(vec3 posS) { + vec2 uv = posS.xy; + float z = posS.z; + float nearZ =near; + float farZ = far; + float depth = pow(2.0, z * log2(farZ + 1.0)) - 1.0; + float a = farZ / (farZ - nearZ); + float b = farZ * nearZ / (nearZ - farZ); + float linDepth = a + b / depth; + vec4 clipVec = vec4(uv, linDepth, 1.0) * 2.0 - 1.0; + vec4 wpos = projectionMatrixInv * clipVec; + return wpos.xyz / wpos.w; + } + vec3 getWorldPos(float depth, vec2 coord) { + #ifdef LOGDEPTH + return getWorldPosLog(vec3(coord, depth)); + #endif + float z = depth * 2.0 - 1.0; + vec4 clipSpacePosition = vec4(coord * 2.0 - 1.0, z, 1.0); + vec4 viewSpacePosition = projectionMatrixInv * clipSpacePosition; + // Perspective division + vec4 worldSpacePosition = viewSpacePosition; + worldSpacePosition.xyz /= worldSpacePosition.w; + return worldSpacePosition.xyz; + } + + vec3 computeNormal(vec3 worldPos, vec2 vUv) { + ivec2 p = ivec2(vUv * resolution); + float c0 = texelFetch(sceneDepth, p, 0).x; + float l2 = texelFetch(sceneDepth, p - ivec2(2, 0), 0).x; + float l1 = texelFetch(sceneDepth, p - ivec2(1, 0), 0).x; + float r1 = texelFetch(sceneDepth, p + ivec2(1, 0), 0).x; + float r2 = texelFetch(sceneDepth, p + ivec2(2, 0), 0).x; + float b2 = texelFetch(sceneDepth, p - ivec2(0, 2), 0).x; + float b1 = texelFetch(sceneDepth, p - ivec2(0, 1), 0).x; + float t1 = texelFetch(sceneDepth, p + ivec2(0, 1), 0).x; + float t2 = texelFetch(sceneDepth, p + ivec2(0, 2), 0).x; + + float dl = abs((2.0 * l1 - l2) - c0); + float dr = abs((2.0 * r1 - r2) - c0); + float db = abs((2.0 * b1 - b2) - c0); + float dt = abs((2.0 * t1 - t2) - c0); + + vec3 ce = getWorldPos(c0, vUv).xyz; + + vec3 dpdx = (dl < dr) ? ce - getWorldPos(l1, (vUv - vec2(1.0 / resolution.x, 0.0))).xyz + : -ce + getWorldPos(r1, (vUv + vec2(1.0 / resolution.x, 0.0))).xyz; + vec3 dpdy = (db < dt) ? ce - getWorldPos(b1, (vUv - vec2(0.0, 1.0 / resolution.y))).xyz + : -ce + getWorldPos(t1, (vUv + vec2(0.0, 1.0 / resolution.y))).xyz; + + return normalize(cross(dpdx, dpdy)); +} + +void main() { + vec4 diffuse = texture2D(sceneDiffuse, vUv); + float depth = texture2D(sceneDepth, vUv).x; + if (depth == 1.0) { + gl_FragColor = vec4(vec3(1.0), 1.0); + return; + } + vec3 worldPos = getWorldPos(depth, vUv); + // vec3 normal = texture2D(sceneNormal, vUv).rgb;//computeNormal(worldPos, vUv); + #ifdef HALFRES + vec3 normal = texture2D(sceneNormal, vUv).rgb; + #else + vec3 normal = computeNormal(worldPos, vUv); + #endif + vec4 noise = texture2D(bluenoise, gl_FragCoord.xy / 128.0); + vec3 randomVec = normalize(noise.rgb * 2.0 - 1.0); + vec3 tangent = normalize(randomVec - normal * dot(randomVec, normal)); + vec3 bitangent = cross(normal, tangent); + mat3 tbn = mat3(tangent, bitangent, normal); + float occluded = 0.0; + float totalWeight = 0.0; + /* float radiusScreen = distance( + worldPos, + getWorldPos(depth, vUv + + vec2(48.0, 0.0) / resolution) + );/*vUv.x < 0.5 ? radius : min(distance( + worldPos, + getWorldPos(depth, vUv + + vec2(100.0, 0.0) / resolution) + ), radius); + float distanceFalloffScreen = radiusScreen * 0.2;*/ + float radiusToUse = screenSpaceRadius ? distance( + worldPos, + getWorldPos(depth, vUv + + vec2(radius, 0.0) / resolution) + ) : radius; + float distanceFalloffToUse =screenSpaceRadius ? + radiusToUse * distanceFalloff + : distanceFalloff; + float bias = (0.1 / near) * fwidth(distance(worldPos, cameraPos)) / radiusToUse; + for(float i = 0.0; i < FSAMPLES; i++) { + vec3 sampleDirection = + tbn * + samples[int(i)]; + ; + float moveAmt = samplesR[int(mod(i + noise.a * FSAMPLES, FSAMPLES))]; + vec3 samplePos = worldPos + radiusToUse * moveAmt * sampleDirection; + vec4 offset = projMat * vec4(samplePos, 1.0); + offset.xyz /= offset.w; + offset.xyz = offset.xyz * 0.5 + 0.5; + float sampleDepth = textureLod(sceneDepth, offset.xy, 0.0).x; + /*float distSample = logDepth ? linearize_depth_log(sampleDepth, near, far) + (ortho ? linearize_depth_ortho(sampleDepth, near, far) : linearize_depth(sampleDepth, near, far));*/ + #ifdef LOGDEPTH + float distSample = linearize_depth_log(sampleDepth, near, far); + #else + float distSample = ortho ? linearize_depth_ortho(sampleDepth, near, far) : linearize_depth(sampleDepth, near, far); + #endif + float distWorld = ortho ? linearize_depth_ortho(offset.z, near, far) : linearize_depth(offset.z, near, far); + float rangeCheck = smoothstep(0.0, 1.0, distanceFalloffToUse / (abs(distSample - distWorld))); + vec2 diff = gl_FragCoord.xy - ( offset.xy * resolution); + float weight = dot(sampleDirection, normal); + occluded += rangeCheck * weight * + (distSample + bias + < distWorld ? 1.0 : 0.0) * ( + (dot( + diff, + diff + + ) < 1.0 || (sampleDepth == depth) || ( + offset.x < 0.0 || offset.x > 1.0 || offset.y < 0.0 || offset.y > 1.0 + ) ? 0.0 : 1.0) + ); + totalWeight += weight; + } + float occ = clamp(1.0 - occluded / totalWeight, 0.0, 1.0); + gl_FragColor = vec4(0.5 + 0.5 * normal, occ); +}`, + }, + $12b21d24d1192a04$export$a815acccbd2c9a49 = { + uniforms: { + sceneDiffuse: { value: null }, + sceneDepth: { value: null }, + tDiffuse: { value: null }, + projMat: { value: new Matrix4() }, + viewMat: { value: new Matrix4() }, + projectionMatrixInv: { value: new Matrix4() }, + viewMatrixInv: { value: new Matrix4() }, + cameraPos: { value: new Vector3() }, + resolution: { value: new Vector2() }, + color: { value: new Vector3(0, 0, 0) }, + blueNoise: { value: null }, + downsampledDepth: { value: null }, + time: { value: 0 }, + intensity: { value: 10 }, + renderMode: { value: 0 }, + gammaCorrection: { value: !1 }, + logDepth: { value: !1 }, + ortho: { value: !1 }, + near: { value: 0.1 }, + far: { value: 1e3 }, + screenSpaceRadius: { value: !1 }, + radius: { value: 0 }, + distanceFalloff: { value: 1 }, + fog: { value: !1 }, + fogExp: { value: !1 }, + fogDensity: { value: 0 }, + fogNear: { value: 1 / 0 }, + fogFar: { value: 1 / 0 }, + colorMultiply: { value: !0 }, + }, + vertexShader: ` + varying vec2 vUv; + void main() { + vUv = uv; + gl_Position = vec4(position, 1); + }`, + fragmentShader: ` + uniform sampler2D sceneDiffuse; + uniform highp sampler2D sceneDepth; + uniform highp sampler2D downsampledDepth; + uniform sampler2D tDiffuse; + uniform sampler2D blueNoise; + uniform vec2 resolution; + uniform vec3 color; + uniform mat4 projectionMatrixInv; + uniform mat4 viewMatrixInv; + uniform float intensity; + uniform float renderMode; + uniform float near; + uniform float far; + uniform bool gammaCorrection; + uniform bool logDepth; + uniform bool ortho; + uniform bool screenSpaceRadius; + uniform bool fog; + uniform bool fogExp; + uniform bool colorMultiply; + uniform float fogDensity; + uniform float fogNear; + uniform float fogFar; + uniform float radius; + uniform float distanceFalloff; + uniform vec3 cameraPos; + varying vec2 vUv; + highp float linearize_depth(highp float d, highp float zNear,highp float zFar) + { + return (zFar * zNear) / (zFar - d * (zFar - zNear)); + } + highp float linearize_depth_ortho(highp float d, highp float nearZ, highp float farZ) { + return nearZ + (farZ - nearZ) * d; + } + highp float linearize_depth_log(highp float d, highp float nearZ,highp float farZ) { + float depth = pow(2.0, d * log2(farZ + 1.0)) - 1.0; + float a = farZ / (farZ - nearZ); + float b = farZ * nearZ / (nearZ - farZ); + float linDepth = a + b / depth; + return ortho ? linearize_depth_ortho( + linDepth, + nearZ, + farZ + ) :linearize_depth(linDepth, nearZ, farZ); + } + vec3 getWorldPosLog(vec3 posS) { + vec2 uv = posS.xy; + float z = posS.z; + float nearZ =near; + float farZ = far; + float depth = pow(2.0, z * log2(farZ + 1.0)) - 1.0; + float a = farZ / (farZ - nearZ); + float b = farZ * nearZ / (nearZ - farZ); + float linDepth = a + b / depth; + vec4 clipVec = vec4(uv, linDepth, 1.0) * 2.0 - 1.0; + vec4 wpos = projectionMatrixInv * clipVec; + return wpos.xyz / wpos.w; + } + vec3 getWorldPos(float depth, vec2 coord) { + // if (logDepth) { + #ifdef LOGDEPTH + return getWorldPosLog(vec3(coord, depth)); + #endif + // } + float z = depth * 2.0 - 1.0; + vec4 clipSpacePosition = vec4(coord * 2.0 - 1.0, z, 1.0); + vec4 viewSpacePosition = projectionMatrixInv * clipSpacePosition; + // Perspective division + vec4 worldSpacePosition = viewSpacePosition; + worldSpacePosition.xyz /= worldSpacePosition.w; + return worldSpacePosition.xyz; + } + + vec3 computeNormal(vec3 worldPos, vec2 vUv) { + ivec2 p = ivec2(vUv * resolution); + float c0 = texelFetch(sceneDepth, p, 0).x; + float l2 = texelFetch(sceneDepth, p - ivec2(2, 0), 0).x; + float l1 = texelFetch(sceneDepth, p - ivec2(1, 0), 0).x; + float r1 = texelFetch(sceneDepth, p + ivec2(1, 0), 0).x; + float r2 = texelFetch(sceneDepth, p + ivec2(2, 0), 0).x; + float b2 = texelFetch(sceneDepth, p - ivec2(0, 2), 0).x; + float b1 = texelFetch(sceneDepth, p - ivec2(0, 1), 0).x; + float t1 = texelFetch(sceneDepth, p + ivec2(0, 1), 0).x; + float t2 = texelFetch(sceneDepth, p + ivec2(0, 2), 0).x; + + float dl = abs((2.0 * l1 - l2) - c0); + float dr = abs((2.0 * r1 - r2) - c0); + float db = abs((2.0 * b1 - b2) - c0); + float dt = abs((2.0 * t1 - t2) - c0); + + vec3 ce = getWorldPos(c0, vUv).xyz; + + vec3 dpdx = (dl < dr) ? ce - getWorldPos(l1, (vUv - vec2(1.0 / resolution.x, 0.0))).xyz + : -ce + getWorldPos(r1, (vUv + vec2(1.0 / resolution.x, 0.0))).xyz; + vec3 dpdy = (db < dt) ? ce - getWorldPos(b1, (vUv - vec2(0.0, 1.0 / resolution.y))).xyz + : -ce + getWorldPos(t1, (vUv + vec2(0.0, 1.0 / resolution.y))).xyz; + + return normalize(cross(dpdx, dpdy)); + } + + #include + #include + void main() { + //vec4 texel = texture2D(tDiffuse, vUv);//vec3(0.0); + vec4 sceneTexel = texture2D(sceneDiffuse, vUv); + float depth = texture2D( + sceneDepth, + vUv + ).x; + #ifdef HALFRES + vec4 texel; + if (depth == 1.0) { + texel = vec4(0.0, 0.0, 0.0, 1.0); + } else { + vec3 worldPos = getWorldPos(depth, vUv); + vec3 normal = computeNormal(getWorldPos(depth, vUv), vUv); + // vec4 texel = texture2D(tDiffuse, vUv); + // Find closest depth; + float totalWeight = 0.0; + float radiusToUse = screenSpaceRadius ? distance( + worldPos, + getWorldPos(depth, vUv + + vec2(radius, 0.0) / resolution) + ) : radius; + float distanceFalloffToUse =screenSpaceRadius ? + radiusToUse * distanceFalloff + : distanceFalloff; + for(float x = -1.0; x <= 1.0; x++) { + for(float y = -1.0; y <= 1.0; y++) { + vec2 offset = vec2(x, y); + ivec2 p = ivec2( + (vUv * resolution * 0.5) + offset + ); + vec2 pUv = vec2(p) / (resolution * 0.5); + float sampleDepth = texelFetch(downsampledDepth,p, 0).x; + vec4 sampleInfo = texelFetch(tDiffuse, p, 0); + vec3 normalSample = sampleInfo.xyz * 2.0 - 1.0; + vec3 worldPosSample = getWorldPos(sampleDepth, pUv); + float tangentPlaneDist = abs(dot(worldPos - worldPosSample, normal)); + float rangeCheck = exp(-1.0 * tangentPlaneDist * (1.0 / distanceFalloffToUse)) * max(dot(normal, normalSample), 0.0); + float weight = rangeCheck; + totalWeight += weight; + texel += sampleInfo * weight; + } + } + if (totalWeight == 0.0) { + texel = texture2D(tDiffuse, vUv); + } else { + texel /= totalWeight; + } + } + #else + vec4 texel = texture2D(tDiffuse, vUv); + #endif + + + float finalAo = pow(texel.a, intensity); + float fogFactor; + float fogDepth = distance( + cameraPos, + getWorldPos(depth, vUv) + ); + if (fog) { + if (fogExp) { + fogFactor = 1.0 - exp( - fogDensity * fogDensity * fogDepth * fogDepth ); + } else { + fogFactor = smoothstep( fogNear, fogFar, fogDepth ); + } + } + finalAo = mix(finalAo, 1.0, fogFactor); + vec3 aoApplied = color * mix(vec3(1.0), sceneTexel.rgb, float(colorMultiply)); + if (renderMode == 0.0) { + gl_FragColor = vec4( mix(sceneTexel.rgb, aoApplied, 1.0 - finalAo), sceneTexel.a); + } else if (renderMode == 1.0) { + gl_FragColor = vec4( mix(vec3(1.0), aoApplied, 1.0 - finalAo), sceneTexel.a); + } else if (renderMode == 2.0) { + gl_FragColor = vec4( sceneTexel.rgb, sceneTexel.a); + } else if (renderMode == 3.0) { + if (vUv.x < 0.5) { + gl_FragColor = vec4( sceneTexel.rgb, sceneTexel.a); + } else if (abs(vUv.x - 0.5) < 1.0 / resolution.x) { + gl_FragColor = vec4(1.0); + } else { + gl_FragColor = vec4( mix(sceneTexel.rgb, aoApplied, 1.0 - finalAo), sceneTexel.a); + } + } else if (renderMode == 4.0) { + if (vUv.x < 0.5) { + gl_FragColor = vec4( sceneTexel.rgb, sceneTexel.a); + } else if (abs(vUv.x - 0.5) < 1.0 / resolution.x) { + gl_FragColor = vec4(1.0); + } else { + gl_FragColor = vec4( mix(vec3(1.0), aoApplied, 1.0 - finalAo), sceneTexel.a); + } + } + #include + if (gammaCorrection) { + gl_FragColor = LinearTosRGB(gl_FragColor); + } + } + `, + }, + $e52378cd0f5a973d$export$57856b59f317262e = { + uniforms: { + sceneDiffuse: { value: null }, + sceneDepth: { value: null }, + tDiffuse: { value: null }, + projMat: { value: new Matrix4() }, + viewMat: { value: new Matrix4() }, + projectionMatrixInv: { value: new Matrix4() }, + viewMatrixInv: { value: new Matrix4() }, + cameraPos: { value: new Vector3() }, + resolution: { value: new Vector2() }, + time: { value: 0 }, + r: { value: 5 }, + blueNoise: { value: null }, + radius: { value: 12 }, + worldRadius: { value: 5 }, + index: { value: 0 }, + poissonDisk: { value: [] }, + distanceFalloff: { value: 1 }, + near: { value: 0.1 }, + far: { value: 1e3 }, + logDepth: { value: !1 }, + screenSpaceRadius: { value: !1 }, + }, + vertexShader: ` + varying vec2 vUv; + void main() { + vUv = uv; + gl_Position = vec4(position, 1.0); + }`, + fragmentShader: ` + uniform sampler2D sceneDiffuse; + uniform highp sampler2D sceneDepth; + uniform sampler2D tDiffuse; + uniform sampler2D blueNoise; + uniform mat4 projectionMatrixInv; + uniform mat4 viewMatrixInv; + uniform vec2 resolution; + uniform float r; + uniform float radius; + uniform float worldRadius; + uniform float index; + uniform float near; + uniform float far; + uniform float distanceFalloff; + uniform bool logDepth; + uniform bool screenSpaceRadius; + varying vec2 vUv; + + highp float linearize_depth(highp float d, highp float zNear,highp float zFar) + { + highp float z_n = 2.0 * d - 1.0; + return 2.0 * zNear * zFar / (zFar + zNear - z_n * (zFar - zNear)); + } + highp float linearize_depth_log(highp float d, highp float nearZ,highp float farZ) { + float depth = pow(2.0, d * log2(farZ + 1.0)) - 1.0; + float a = farZ / (farZ - nearZ); + float b = farZ * nearZ / (nearZ - farZ); + float linDepth = a + b / depth; + return linearize_depth(linDepth, nearZ, farZ); + } + highp float linearize_depth_ortho(highp float d, highp float nearZ, highp float farZ) { + return nearZ + (farZ - nearZ) * d; + } + vec3 getWorldPosLog(vec3 posS) { + vec2 uv = posS.xy; + float z = posS.z; + float nearZ =near; + float farZ = far; + float depth = pow(2.0, z * log2(farZ + 1.0)) - 1.0; + float a = farZ / (farZ - nearZ); + float b = farZ * nearZ / (nearZ - farZ); + float linDepth = a + b / depth; + vec4 clipVec = vec4(uv, linDepth, 1.0) * 2.0 - 1.0; + vec4 wpos = projectionMatrixInv * clipVec; + return wpos.xyz / wpos.w; + } + vec3 getWorldPos(float depth, vec2 coord) { + #ifdef LOGDEPTH + return getWorldPosLog(vec3(coord, depth)); + #endif + + float z = depth * 2.0 - 1.0; + vec4 clipSpacePosition = vec4(coord * 2.0 - 1.0, z, 1.0); + vec4 viewSpacePosition = projectionMatrixInv * clipSpacePosition; + // Perspective division + vec4 worldSpacePosition = viewSpacePosition; + worldSpacePosition.xyz /= worldSpacePosition.w; + return worldSpacePosition.xyz; + } + #include + #define NUM_SAMPLES 16 + uniform vec2 poissonDisk[NUM_SAMPLES]; + void main() { + const float pi = 3.14159; + vec2 texelSize = vec2(1.0 / resolution.x, 1.0 / resolution.y); + vec2 uv = vUv; + vec4 data = texture2D(tDiffuse, vUv); + float occlusion = data.a; + float baseOcc = data.a; + vec3 normal = data.rgb * 2.0 - 1.0; + float count = 1.0; + float d = texture2D(sceneDepth, vUv).x; + if (d == 1.0) { + gl_FragColor = data; + return; + } + vec3 worldPos = getWorldPos(d, vUv); + float size = radius; + float angle; + if (index == 0.0) { + angle = texture2D(blueNoise, gl_FragCoord.xy / 128.0).x * PI2; + } else if (index == 1.0) { + angle = texture2D(blueNoise, gl_FragCoord.xy / 128.0).y * PI2; + } else if (index == 2.0) { + angle = texture2D(blueNoise, gl_FragCoord.xy / 128.0).z * PI2; + } else { + angle = texture2D(blueNoise, gl_FragCoord.xy / 128.0).w * PI2; + } + + mat2 rotationMatrix = mat2(cos(angle), -sin(angle), sin(angle), cos(angle)); + float radiusToUse = screenSpaceRadius ? distance( + worldPos, + getWorldPos(d, vUv + + vec2(worldRadius, 0.0) / resolution) + ) : worldRadius; + float distanceFalloffToUse =screenSpaceRadius ? + radiusToUse * distanceFalloff + : distanceFalloff; + + + for(int i = 0; i < NUM_SAMPLES; i++) { + vec2 offset = (rotationMatrix * poissonDisk[i]) * texelSize * size; + vec4 dataSample = texture2D(tDiffuse, uv + offset); + float occSample = dataSample.a; + vec3 normalSample = dataSample.rgb * 2.0 - 1.0; + float dSample = texture2D(sceneDepth, uv + offset).x; + vec3 worldPosSample = getWorldPos(dSample, uv + offset); + float tangentPlaneDist = abs(dot(worldPos - worldPosSample, normal)); + float rangeCheck = dSample == 1.0 ? 0.0 :exp(-1.0 * tangentPlaneDist * (1.0 / distanceFalloffToUse)) * max(dot(normal, normalSample), 0.0) * (1.0 - abs(occSample - baseOcc)); + occlusion += occSample * rangeCheck; + count += rangeCheck; + } + occlusion /= count; + gl_FragColor = vec4(0.5 + 0.5 * normal, occlusion); + } + `, + }, + $26aca173e0984d99$export$1efdf491687cd442 = { + uniforms: { + sceneDepth: { value: null }, + resolution: { value: new Vector2() }, + near: { value: 0.1 }, + far: { value: 1e3 }, + viewMatrixInv: { value: new Matrix4() }, + projectionMatrixInv: { value: new Matrix4() }, + logDepth: { value: !1 }, + }, + vertexShader: ` + varying vec2 vUv; + void main() { + vUv = uv; + gl_Position = vec4(position, 1); + }`, + fragmentShader: ` + uniform highp sampler2D sceneDepth; + uniform vec2 resolution; + uniform float near; + uniform float far; + uniform bool logDepth; + uniform mat4 viewMatrixInv; + uniform mat4 projectionMatrixInv; + varying vec2 vUv; + layout(location = 1) out vec4 gNormal; + vec3 getWorldPosLog(vec3 posS) { + vec2 uv = posS.xy; + float z = posS.z; + float nearZ =near; + float farZ = far; + float depth = pow(2.0, z * log2(farZ + 1.0)) - 1.0; + float a = farZ / (farZ - nearZ); + float b = farZ * nearZ / (nearZ - farZ); + float linDepth = a + b / depth; + vec4 clipVec = vec4(uv, linDepth, 1.0) * 2.0 - 1.0; + vec4 wpos = projectionMatrixInv * clipVec; + return wpos.xyz / wpos.w; + } + vec3 getWorldPos(float depth, vec2 coord) { + if (logDepth) { + return getWorldPosLog(vec3(coord, depth)); + } + float z = depth * 2.0 - 1.0; + vec4 clipSpacePosition = vec4(coord * 2.0 - 1.0, z, 1.0); + vec4 viewSpacePosition = projectionMatrixInv * clipSpacePosition; + // Perspective division + vec4 worldSpacePosition = viewSpacePosition; + worldSpacePosition.xyz /= worldSpacePosition.w; + return worldSpacePosition.xyz; + } + + vec3 computeNormal(vec3 worldPos, vec2 vUv) { + ivec2 p = ivec2(vUv * resolution); + float c0 = texelFetch(sceneDepth, p, 0).x; + float l2 = texelFetch(sceneDepth, p - ivec2(2, 0), 0).x; + float l1 = texelFetch(sceneDepth, p - ivec2(1, 0), 0).x; + float r1 = texelFetch(sceneDepth, p + ivec2(1, 0), 0).x; + float r2 = texelFetch(sceneDepth, p + ivec2(2, 0), 0).x; + float b2 = texelFetch(sceneDepth, p - ivec2(0, 2), 0).x; + float b1 = texelFetch(sceneDepth, p - ivec2(0, 1), 0).x; + float t1 = texelFetch(sceneDepth, p + ivec2(0, 1), 0).x; + float t2 = texelFetch(sceneDepth, p + ivec2(0, 2), 0).x; + + float dl = abs((2.0 * l1 - l2) - c0); + float dr = abs((2.0 * r1 - r2) - c0); + float db = abs((2.0 * b1 - b2) - c0); + float dt = abs((2.0 * t1 - t2) - c0); + + vec3 ce = getWorldPos(c0, vUv).xyz; + + vec3 dpdx = (dl < dr) ? ce - getWorldPos(l1, (vUv - vec2(1.0 / resolution.x, 0.0))).xyz + : -ce + getWorldPos(r1, (vUv + vec2(1.0 / resolution.x, 0.0))).xyz; + vec3 dpdy = (db < dt) ? ce - getWorldPos(b1, (vUv - vec2(0.0, 1.0 / resolution.y))).xyz + : -ce + getWorldPos(t1, (vUv + vec2(0.0, 1.0 / resolution.y))).xyz; + + return normalize(cross(dpdx, dpdy)); + } + void main() { + vec2 uv = vUv - vec2(0.5) / resolution; + vec2 pixelSize = vec2(1.0) / resolution; + vec2[] uvSamples = vec2[4]( + uv, + uv + vec2(pixelSize.x, 0.0), + uv + vec2(0.0, pixelSize.y), + uv + pixelSize + ); + float depth00 = texture2D(sceneDepth, uvSamples[0]).r; + float depth10 = texture2D(sceneDepth, uvSamples[1]).r; + float depth01 = texture2D(sceneDepth, uvSamples[2]).r; + float depth11 = texture2D(sceneDepth, uvSamples[3]).r; + float minDepth = min(min(depth00, depth10), min(depth01, depth11)); + float maxDepth = max(max(depth00, depth10), max(depth01, depth11)); + float targetDepth = minDepth; + // Checkerboard pattern to avoid artifacts + if (mod(gl_FragCoord.x + gl_FragCoord.y, 2.0) > 0.5) { + targetDepth = maxDepth; + } + int chosenIndex = 0; + float[] samples = float[4](depth00, depth10, depth01, depth11); + for(int i = 0; i < 4; ++i) { + if (samples[i] == targetDepth) { + chosenIndex = i; + break; + } + } + gl_FragColor = vec4(samples[chosenIndex], 0.0, 0.0, 1.0); + gNormal = vec4(computeNormal( + getWorldPos(samples[chosenIndex], uvSamples[chosenIndex]), uvSamples[chosenIndex] + ), 0.0); + /* float[] samples = float[4](depth00, depth10, depth01, depth11); + float c = 0.25 * (depth00 + depth10 + depth01 + depth11); + float[] distances = float[4](depth00, depth10, depth01, depth11); + float maxDistance = max(max(distances[0], distances[1]), max(distances[2], distances[3])); + + int remaining[3]; + int rejected[3]; + int i, j, k; + + for(i = 0, j = 0, k = 0; i < 4; ++i) { + if (distances[i] < maxDistance) { + remaining[j++] = i; + } else { + rejected[k++] = i; + } + } + for(;j < 3;++j) { + remaining[j] = rejected[--k]; + } + vec3 s = vec3( + samples[remaining[0]], + samples[remaining[1]], + samples[remaining[2]] + ); + c = (s.x + s.y + s.z) / 3.0; + + distances[0] = abs(c - s.x); + distances[1] = abs(c - s.y); + distances[2] = abs(c - s.z); + + float minDistance = min(min(distances[0], distances[1]), distances[2]); + + for(i = 0; i < 3; ++i) { + if (distances[i] == minDistance) { + break; + } + }*/ + /* gl_FragColor = vec4(samples[remaining[i]], 0.0, 0.0, 0.0); + gNormal = vec4(computeNormal( + getWorldPos(samples[remaining[i]], uvSamples[remaining[i]]), uvSamples[remaining[i]] + ), 0.0);*/ + }`, + } + var $06269ad78f3c5fdf$export$2e2bcd8739ae039 = + '5L7pP4UXrOIr/VZ1G3f6p89FIWU7lqc7J3DPxKjJUXODJoHQzf/aNVM+ABlvhXeBGN7iC0WkmTjEaAqOItBfBdaK5KSGV1ET5SOKl3x9JOX5w2sAl6+6KjDhVUHgbqq7DZ5EeYzbdSNxtrQLW/KkPJoOTG4u5CBUZkCKHniY9l7DUgjuz708zG1HIC8qfohi1vPjPH9Lq47ksjRrjwXD4MlVCjdAqYFGodQ8tRmHkOfq4wVRIAHvoavPHvN1lpk3X4Y1yzAPGe8S9KBs3crc4GwlU1dEOXiWol/mgQqxkNqB1xd04+0Bmpwj0GcCc4NUi+c731FUxjvaexCkCJ0qhrJJ++htWqetNC4NewClu8aFRSwrqiJEGe+qtTg4CYCHaF1wJI0sy/ZBQAI0qAMyBvVjWZlv2pdkCaro9eWDLK5I4mbb8E4d7hZr9dDJiTJm6Bmb5S+2F7yal/JPdeLUfwq7jmVLaQfhv4tWMJAt7V4sG9LuAv2oPJgSj1nnlBvPibfHM2TrlWHwGCLGxW/5Jm2TotaDL+pHDM5pn1r0UuTZ24N8S5k68bLHW9tfD+2k4zGev23ExJb4YTRKWrj82N5LjJ26lj1BkGZ0CsXLGGELoPaYQomjTqPxYqhfwOwDliNGVqux9ffuybqOKgsbB51B1GbZfG8vHDBE2JQGib1mnCmWOWAMJcHN0cKeDHYTflbDTVXajtr68mwfRje6WueQ/6yWqmZMLWNH7P27zGFhMFqaqfg11Q88g/9UA/FROe9yfq0yOO0pnNAxvepFy2BpEbcgG+mCyjCC01JWlOZlIPdf1TtlyOt7L94ToYGCukoFt4OqwOrofamjECpSgKLLmrRM+sNRAw12eaqk8KtdFk7pn2IcDQiPXCh16t1a+psi+w9towHTKPyQM0StKr61b2BnN1HU+aezFNBLfHTiXwhGTbdxLLmrsAGIVSiNAeCGE8GlB0iOv2v78kP0CTmAPUEqnHYRSDlP+L6m/rYjEK6Q85GRDJi2W20/7NLPpSOaMR++IFvpkcwRuc59j8hh9tYlc1xjdt2jmp9KJczB7U9P43inuxLOv11P5/HYH5d6gLB0CsbGC8APjh+EcCP0zFWqlaACZweLhVfv3yiyd8R3bdVg8sRKsxPvhDaPpiFp9+MN+0Ua0bsPr+lhxfZhMhlevkLbR4ZvcSRP6ApQLy3+eMh9ehCB3z5DVAaN3P6J8pi5Qa88ZQsOuCTWyH6q8yMfBw8y8nm6jaOxJhPH6Hf0I4jmALUBsWKH4gWBnyijHh7z3/1HhQzFLRDRrIQwUtu11yk7U0gDw/FatOIZOJaBx3UqbUxSZ6dboFPm5pAyyXC2wYdSWlpZx/D2C6hDO2sJM4HT9IKWWmDkZIO2si/6BKHruXIEDpfAtz3xDlIdKnnlqnkfCyy6vNOPyuoWsSWBeiN0mcfIrnOtp2j7bxjOkr25skfS/lwOC692cEp7TKSlymbsyzoWg/0AN66SvQYo6BqpNwPpTaUu25zMWlwVUdfu1EEdc0O06TI0JmHk4f6GZQbfOs//OdgtGPO6uLoadJycR8Z80rkd88QoNmimZd8vcpQKScCFkxH1RMTkPlN3K7CL/NSMOiXEvxrn9VyUPFee63uRflgaPMSsafvqMgzTt3T1RaHNLLFatQbD0Vha4YXZ/6Ake7onM65nC9cyLkteYkDfHoJtef7wCrWXTK0+vH38VUBcFJP0+uUXpkiK0gDXNA39HL/qdVcaOA16kd2gzq8aHpNSaKtgMLJC6fdLLS/I/4lUWV2+djY9Rc3QuJOUrlHFQERtXN4xJaAHZERCUQZ9ND2pEtZg8dsnilcnqmqYn3c1sRyK0ziKpHNytEyi2gmzxEFchvT1uBWxZUikkAlWuyqvvhteSG9kFhTLNM97s3X1iS2UbE6cvApgbmeJ/KqtP0NNT3bZiG9TURInCZtVsNZzYus6On0wcdMlVfqo8XLhT5ojaOk4DtCyeoQkBt1mf5luFNaLFjI/1cnPefyCQwcq5ia/4pN4NB+xE/3SEPsliJypS964SI6o5fDVa0IERR8DoeQ+1iyRLU1qGYexB61ph4pkG1rf3c2YD6By1pFCmww9B0r2VjFeaubkIdgWx4RKLQRPLENdGo8ezI5mkNtdCws19aP1uHhenD+HKa8GDeLulb2fiMRhU2xJzzz9e4yOMPvEnGEfbCiQ17nUDpcFDWthr68mhZ4WiHUkRpaVWJNExuULcGkuyVLsQj59pf6OHFR7tofhy9FMrWPCEvX1d5sCVJt8yBFiB6NoOuwMy4wlso9I2G4E5/5B2c6vIZUUY9fFujT3hpkdTuVhbhBwLCtnlIjBpN4cq+waZ0wXSrmebcl+dcrb7sPh9jKxFINkScDTBgjSUfLkC3huJJs/M4M8AOFxbbSIVpBUarYFmLpGsv+V6TJnWNTwI41tubwo7QSI1VOdRKT/Pp8U3oK2ciDbeuWnAGAANvQjGfcewdAdo6H83XzqlK/4yudtFHJSv9Y+qJskwnVToH1I0+tJ3vsLBXtlvMzLIxUj/8LcqZnrNHfVRgabFNXW0qpUvDgxnP3f54KooR3NI+2Q/VHAYFigMkQE5dLH6C6fGs/TKeE6E2jOhZQcP9/rrJjJKcLYdn5cw6XLCUe9F7quk5Yhac+nYL5HOXvp6Q/5qbiQHkuebanX77YSNx34YaWYpcEHuY1u/lEVTCQ7taPaw3oNcn/qJhMzGPZUs3XAq48wj/hCIO2d5aFdfXnS0yg57/jxzDJBwkdOgeVnyyh19Iz1UqiysT4J1eeKwUuWEYln23ydtP7g3R1BnvnxqFPAnOMgOIop2dkXPfUh/9ZKV3ZQbZNactPD4ql5Qg9CxSBnIwzlj/tseQKWRstwNbf17neGwDFFWdm/8f+nDWt/WlKV3MUiAm3ci6xXMDSL5ubPXBg/gKEE7TsZVGUcrIbdXILcMngvGs7unvlPJh6oadeBDqiAviIZ/iyiUMdQZAuf/YBAY0VP1hcgInuWoKbx31AOjyTN2OOHrlthB3ny9JKHOAc8BMvqopikPldcwIQoFxTccKKIeI815GcwaKDLsMbCsxegrzXl8E0bpic/xffU9y1DCgeKZoF2PIY77RIn6kSRdBiGd8NtNwT74dyeFBMkYraPkudN26x9NPuBt4iCOAnBFaNSKVgKiZQruw22kM1fgBKG7cPYAxdHJ8M4V/jzBn2jEJg+jk/jjV4oMmMNOpKB5oVpVh7tK529Z+5vKZ0NSY2A4YdcT0x4BdkoNEDrpsTmekSTjvx9ZBiTHrm9M/n/hGmgpjz4WEjttRfAEy5DYH5vCK/9GuVPa4hoApFaNlrFD/n2PpKOw24iKujKhVIz41p1E0HwsCd/c17OA0H0RjZi1V/rjJLexUzpmXTMIMuzaOBbU4dxvQMgyvxJvR6DyF3BaHkaqT4P3FRYlm+zh8EEGgmkNqD1WRUubDW62VqLoH8UEelIpL7C8CguWWGGCAIDPma9bnh+7IJSt0Cn6ACER2mYk8dLsrN70RUVLiE0ig+08yPY9IOtuqHf/KYsT84BwhMcVq7t8q1WVjpJGNyXdtIPIjhAzabtrX03Itn29QO3TCixE9WpkHIOdAoGvqCrw1D3x9g9Px8u0yZZuulZuGy0veSY34KDSlhsO1zx2ZMrpDBzCHPB4niwApk6NevIvmBxU3+4yaewDvgEQDJ6Of5iRxjAIpp9UO8EzNY4blj4qh8SCSZTqbe/lShE6tNU9Y5IoWHeJxPcHF9KwYQD7lFcIpcscHrcfkHJfL2lL1zczKywEF7BwkjXEirgBcvNWayatqdTVT5oLbzTmED3EOYBSXFyb2VIYk3t0dOZWJdG1nP+W7Qfyeb8MSIyUGKEA57ptPxrPHKYGZPHsuBqQuVSrn0i8KJX+rlzAqo8AawchsJ26FckxTf5+joTcw+2y8c8bushpRYEbgrdr64ltEYPV2AbVgKXV3XACoD1gbs01CExbJALkuItjfYN3+6I8kbiTYmdzBLaNC+xu9z/eXcRQV1Lo8cJoSsKyWJPuTncu5vcmfMUAWmuwhjymK1rhYR8pQMXNQg9X+5ha5fEnap+LhUL1d5SURZz9rGdOWLhrMcMKSaU3LhOQ/6a6qSCwgzQxCW2gFs53fpvfWxhH+xDHdKRV6w29nQ6rNqd9by+zm1OpzYyJwvFyOkrVXQUwt4HaapnweCa7Tj2Mp/tT4YcY3Q/tk1czgkzlV5mpDrdp1spOYB8ionAwxujjdhj5y9qEHu0uc36PAKAYsKLaEoiwPnob0pdluPWdv4sNSlG8GWViI+x/Z4DkW/kSs2iE3ADFjg4TCvgCbX3v0Hz0KZkerrpzEIukAusidDs2g/w0zgmLnZXvVr5kkpwQTLZ0L6uaTHl0LVikIuNIVPmL3fOQJqIdfzymUN0zucIrDintBn6ICl/inj5zteISv5hEMGMqtHc2ghcFJvmH3ZhIZi34vqqTFCb9pltTYz582Y3dwYaHb9khdfve1YryzEwEKbI8qm62qv+NyllC+WxLLAJjz0ZaEF2aTn35qeFmkbP6LDYcbwqWxA0WKsteB7vy8bRHE4r8LhubWDc0pbe90XckSDDAkRej0TQlmWsWwaz18Tx2phykVvwuIRzf4kt9srT8N7gsMjMs0NLAAldabFf2tiMoaaxHcZSX51WPc1BrwApMxih227qTZkcgtkdK1h314XvZKUKh/XysWYnk1ST4kiBI1B9OlfTjB3WHzTAReFLofsGtikwpIXzQBc/gOjz2Thlj36WN0sxyf4RmAFtrYt64fwm+ThjbhlmUTZzebLl4yAkAqzJSfjPBZS2H/IvkkTUdVh0qdB6EuiHEjEil5lk9BTPzxmoW4Jx543hiyy4ASdYA2DNoprsR9iwGFwFG3F2vIROy4L5CZrl230+k733JwboSNBKngsaFPtqo+q3mFFSjC1k0kIAFmKihaYSwaSF7konmYHZWmchuaq15TpneA2ADSRvA07I7US0lTOOfKrgxhzRl0uJihcEZhhYWxObjvNTJ/5sR4Aa5wOQhGClGLb746cJhQ2E6Jie1hbGgWxUH7YSKETptrTeR/xfcMNk2WM12S0XElC9klR8O7jLYekEOZdscP0ypSdoCVZAoK+2ju2PHE869Q9rxCs9DVQco4BriiPbCjN/8tBjsah4IuboR5QbmbyDpcdXVxGMxvWKIjocBuKbjb+B4HvkunbG0wX0IFCjQKoNMFIKcJSJXtkP3EO+J16uh4img0LQlBAOYwBLupu5r1NALMo0g3xkd9b4f7KoCBWHeyk24FmYUCy/PGLv0xErOTyORp8TJ5nnc2k1dOVBTJok7iHye9dwxwRVP3c7eAS8pMmJYHGpzIHz6ii2WJm8HMTPAZdA4q+ugj3PNCL/N45kyglqvQV4f/+ryDDG5RPy5HVoV9FVuJcq2dxF9Y0heVoipV6q1LyfAeuMzbsUV+rsSBmCSV+1CdKlxy0T0Y6Om0X6701URm2Ml6DIQgJ/3KO6kwcMYRrmKsY7TfxWhSXZll+1PfyRXe9HS0t1IKTQMZL7ZqQ8D/o+en57Y9XAQ9C+kZYykNr0xOMxEwu2+Cppm69mQyTm3H7QX6kHvXF201r+KVAf354qypJC5OHSeBU47bM1bTaVmdVEWQ+9CcvvHdu8Ue5UndHM+EeukmR82voQpetZ7WJjyXs+tPS60nk09gymuORoHNtbm0VuvyigiEvOsyHiRBW7V6FyTCppLPEHvesan91SlEh1/QEunq+qgREFXByDwNKcAH5s8/RFg8hP4wcPmFqX0xXGSKY087bqRLsBZe52jThx0XLkhKQUWPvI18WQQS3g2Ra1pzQ1oNFKdfJJjyaH5tJH6w0/upJobwB8KZ5cIs9LnVGxfBaHXBfvLkNpab7dpU6TdcbBIc+A4bqXE/Xt8/xsGQOdoXra4Us5nDAM6v2BNBQaGMmgMfQQV+ikTteSHvyl8wUxULiYRIEKaiDxpBJnyf9OoqQdZVJ8ahqOvuwqq5mnDUAUzUr/Lvs1wLu2F+r4eZMfJPL4gV5mKLkITmozRnTvA7VABaxZmFRtkhvU5iH9RQ1z26ku7aABokvptx7RKZBVL6dveLKOzg0NC7HAxcg5kE1wuyJiEQLOpO0ma3AtWD2Q2Wmn2oPZeDYAwVyEpxuwDy7ivmdUDSL95ol3h2JByTMovOCgxZ1q4E5nwwa7+4WtDAse6bDdr27XgAi5Px3IWbyZ/vRiECKwOMeJSuIl8A4Ds0emI3SgKVVWVO5uyiEUET+ucEq0casA+DQyhzRc8j+Plo0pxKynB/t0uXod1FVV4fX1sC4kDfwFaUDGQ4p9HYgaMqIWX3OF/S8+vcR0JS0bDapWKJwAIIQiRUzvh5YwtzkjccbbrT9Ky/qt5X7MAGA0lzh43mDF9EB6lCGuO/aFCMhdOqNryvd73KdJNy3mxtT8AqgmG4xq7eE1jKu6rV0g8UGyMatzyIMjiOCf4lIJFzAfwDbIfC72TJ/TK+cGsLR8blpjlEILjD8Mxr7IffhbFhgo12CzXRQ2O8JqBJ70+t12385tSmFC8Or+U8svOaoGoojT1/EmjRMT7x2iTUZ7Ny02VGeMZTtGy029tGN1/9k7x3mFu63lYnaWjfJT1m1zpWO3HSXpGkFqVd/m3kDMv4X9rmLOpwEeu8r6TI6C2zUG+MT6v90OU3y5hKqLhpyFLGtkZhDmUg/W1JGSmA8N1TapR4Kny+P6+DuMadZ9+xBbv06nfOjMwkoTsjG0zFmNbvlxEjw+Pl5QYK+V8Qyb+nknZ0Nb/Ofi9+V0eoNtTrtD1/0wzUGGG5u2D/J1ouO/PjXFJVx6LurVnPOyFVbZx7s3ZSjSq+7YN3wzTbFbUvP8GBh7cKieJt56SIowQ2I577+UEXrxUKMFO+XaLLCALuiJWB2vUdpsT+kQ+adoeTfwOulXhd/KZ7ygjj6PhvGT1xzfT7hTwd6dzSB4xV70CesHC0dsg2VyujlMGBKjg5snbrHHX/LNj3SsoLGSX+bZNTDDCNTXh+dCVPlj4K8+hJ/kVddrbtZw26Hx5qYiv3oNNg5blHRSPtmojhZmBQAz8sLC9nAuWNSz1dIofFtlryEKklbdkhBCcx5dhj7pinXDNlCeatCeTCEjYCpZ3HRf5QzUcRR1Tdb3gwtYtpPdgMxmWfJGoZSu1EsCJbIhS16Ed97+8br4Ar1mB1GcnZVx/HPtJl4CgbHXrrDPwlE4od8deRQYLt9IlsvCqgesMmLAVxB+igH7WGTcY/e3lLHJ4rkBgh2p1QpUBRb/cSQsJCbosFDkalbJigimldVK7TIHKSq2w8mezku9hgw8fXJxGdXoL1ggma52kXzjP78l0d0zMwtTVlt0FqnRyGLPGEjmICzgSp7XPFlUr7AeMclQ4opqwBFInziM5F8oJJ8qeuckGOnAcZZOLl1+ZhGF17pfIuujipwFJL7ChIIB2vlo0IQZGTJPNa2YjNcGUw+a/gWYLkCp+bOGIYhWr08UIE709ZEHlUoEbumzgpJv1D0+hWYNEpj+laoZIK5weO2DFwLL6UBYNrXTm9YvvxeN9U9oKsB3zKBwzFFwDgid5ESMhy68xBnVa55sCZd+l5AnzT8etYjIwF/BGwEx1jjzFv32bk6EeJulESARh8RZ48o7rKw67UZpudPa15SDnL8AL8xMV2SC0D1P53p190zhCFkMmEiir2olwxcJppl/kLm6/0QSUQLNaxi1AC3Pg1CTosX2YQr73PjEIxIlg4mJ62vP7ZyoHE55B0SX9YrrrCPtNsrJEwtn6KOSt7nLT3n3DLJTPbLulcqQ1kETP6Huts29oP+JLEqRGWgnrqMD+mhCl1XCZifjgQ39AeudE8pyu2DqnYU3PyPbJhStq1HbP+VxgseWL+hQ+4w1okADlA9WqoaRuoS7IY77Cm40cJiE6FLomUMltT+xO3Upcv5dzSh9F57hodSBnMHukcH1kd9tqlpprBQ/Ij9E+wMQXrZG5PlzwYJ6jmRdnQtRj64wC/7vsDaaMFteBOUDR4ebRrNZJHhwlNEK9Bz3k7jqOV5KJpL74p2sQnd7vLE374Jz+G7H3RUbX17SobYOe9wKkL/Ja/zeiKExOBmPo0X29bURQMxJkN4ddbrHnOkn6+M1zTZHo0efsB23WSSsByfmye2ZuTEZ12J3Y8ffT6Fcv8XVfA/k+p+xJGreKHJRVUIBqfEIlRt987/QXkssXuvLkECSpVEBs+gE1meB6Xn1RWISG6sV3+KOVjiE9wGdRHS8rmTERRnk0mDNU/+kOQYN/6jdeq0IHeh9c6xlSNICo9OcX1MmAiEuvGay43xCZgxHeZqD7etZMigoJI5V2q7xDcXcPort7AEjLwWlEf4ouzy2iPa3lxpcJWdIcHjhLZf1zg/Kv3/yN1voOmCLrI1Fe0MuFbB0TFSUt+t4Wqe2Mj1o2KS0TFQPGRlFm26IvVP9OXKIQkjfueRtMPoqLfVgDhplKvWWJA673+52FgEEgm+HwEgzOjaTuBz639XtCTwaQL/DrCeRdXun0VU3HDmNmTkc6YrNR6tTVWnbqHwykSBswchFLnvouR0KRhDhZiTYYYNWdvXzY+61Jz5IBcTJavGXr9BcHdk/3tqaLbwCbfpwjxCFSUs1xfFcRzRfMAl+QYuCpsYGz9H01poc1LyzhXwmODmUSg/xFq/RosgYikz4Om/ni9QCcr28ZPISaKrY7O+CspM/s+sHtnA9o9WgFWhcBX2LDN2/AL5uB6UxL/RaBp7EI+JHGz6MeLfvSNJnBgI9THFdUwmg1AXb9pvd7ccLqRdmcHLRT1I2VuEAghBduBm7pHNrZIjb2UVrijpZPlGL68hr+SDlC31mdis0BjP4aZFEOcw+uB17y5u7WOnho60Vcy7gRr7BZ9z5zY1uIwo+tW1YKpuQpdR0Vi7AxKmaIa4jXTjUh7MRlNM0W/Ut/CSD7atFd4soMsX7QbcrUZZaWuN0KOVCL9E09UcJlX+esWK56mre/s6UO9ks0owQ+foaVopkuKG+HZYbE1L1e0VwY2J53aCpwC77HqtpyNtoIlBVzOPtFvzBpDV9TjiP3CcTTGqLKh+m7urHvtHSB/+cGuRk4SsTma9sPCVJ19UPvaAv5WB8u57lNeUewwKpXmmKm5XZV91+FqCCT6nVrrrOgXfYmGFlVjqsSn3/yufkGIdtmdD0yVBcYFR3hDx43e3E4iuiEtP3Me9gcsBqveQdKojKR//qD2nEDY0IktMgFvH+SqVWi9mAorym92NEGbY8MeDjp553MiTXCRSASPt+Ga5q7pB9vwFQCTpaoevx0yEfrq9rMs3eU6wclBMJ9Ve8m6QuLYZ58J41YG3jW/khW92h6M/vbFIUPuopZ6VVtpciesU74Ef7ic8iSymDohGeUn4ubT0vRsXmbsjaJaYhL8f+8I5EiD5l680MJbxX/4GYrOg4iPQqpKp0qddSu/HKtznHeVyxgTwhfEORMCwnaqetVSzvidaWN9P+fXtGXfEP9cTdwx2gKVfDdICq7hecgRhIs0qlCt6+5pGlCc6kWoplHa/KjP+FJdXBU/IDoKMxRjFhSYkggIkhvRKiN/b2ud8URPF+lB87AGAwyMjr/Wju2Uj5IrppXZWjI3d14BdKE2fhALyQPmHqqA+AXd2LwvRHcBq4mhOQ4oNRWH7wpzc6Pggfcbv9kqhLxrJKEaJqA6Rxi+TDNOJstd5DoRVCDjmVspCVyHJsFEWPg9+NA8l1e4X2PDvOd5MPZAGw6LRhWqeZoSQcPf9/dGJYAyzCmttlRnx0BfrKQ/G9i5DVJft9fuJwMi3OD/0Dv1bRoxcXAyZ0wMJ6rwk9RjRTF4ZK8JviCCNuVt/BqQYiphOzWCpnbwOZt6qXuiAabQWrS4mNXQ7cEErXR/yJcbdFp5nWE1bPBjD0fmG3ovMxmOq5blpcOs0DtNQpci1t+9DKERWAO53IVV/S4yhMklvIp0j0FIQgwjdUptqmoMYGVWSI5YkTKLHZdXRDv9zs+HdFZt1QVcdlGOgATro3fg6ticCrDQKUJC7bYX50wdvetilEwVenHhlr85HMLRLTD6nDXWId4ORLwwe5IXiOhpuZTVTv+xdkTxJofqeCRM/jcZqQlU0gFVTlYlfwMi6HKR2YG4fQ8TOtgR+yV+BMZb6L5OwDc/28/xdfD7GXFaVA2ZSObiIxBwT2Zev637EuvpM6rxcogdM4FJFa0ZhF7nrqtNsqWg5M7hZMORpjd4szf/wS+Ahs1shY54Ct5J1dOBO4sdEtSnRc0P9PhgyOCt6aQW98R22DpAcNTDe72AHK40vutKTPfpokghRPuGvz0dulBPKfC3O4KVDCyWrJGO7Ikdu06A0keKlVfi0tGcpO0NhzXEh75NHyMysAMV19fq7//sPC0For1k2uFEvq8lwrMAfmP7afR69U2RqaILHe7glpc8HmVf87Qb2ohsw+Di9U+ePdHLecS66MhB/0OwdcXR5WBcWTZLGq/kiAaT+bzkjR8GIpWdv6pfIgQ+Q0xdiKvo+gNB7/Nf9knNJGxnh7LeZEFtMn517tNc74PPS0M4K3I6HHZqNPA+VZcBc/g5a2ARyqKrJ4Z3krsuA+VOJJz2KJpBMgCCWFln3u7k6/q3DETAubKG/pt3ObaNT0NI0Qug90L2ip5dHnZJUjPTvK5E96aX/4mRU2u8n8kh6MKbY7ANBro3huF06U+JvfyELQP25oIaj+n0ITQ4KT9rXZD4EtBIOj95fYNldDN3io/VMIvWNj9P/b95WEMq8UAVfG2XG0N6fSYdnBEC7sUEbatbDICH9qA8TTuW9kEt9DlFOZFP7bdfYLa/khSY8W5K/AkIIAPXtMvyVKyESjKx9nfragssxC0jFMVY94d8lOAwRocdS/l/P43cBGa3IqDa0ihGPcmwS8O8Vj16Uy55rOrnN0shhRJZdW8I7F0Q0KeHc35GFo4aJOFc25gNafBu1V/VO0qS4Qkb6wjRrnlepUWjtYyaDABZceValuOMtoDdeIITWKOJiwGPpB12lQgwkmXh9M86podb0D117mNQ8ElluFvbaS8RTKQ6lyj88dUwoJU/ofOeubhoXWBF8eNumkVJu+As3ED/AvLlrV91UowIWI2m8HBG+a3k247ZKAGYsOcWe7fTWqL8eqwM5ZFuoXbeugPKuMOAtOsN+4dSwkhrSAlfGNTzFwEmCNWtzpa9CgPbYNcmoHtO8pj8qMvlGET6nrkJoQ2lp5MEUV1E2A4ZH70JUlCLXvqTIpZlzyxdr5p/GZiD1/BuFOGbyfFzhuxaC/l3lC2jjt6GNRBa06AqqPlYtdA7kiidYa5Qi0/XpXiMDyMXNOj3kmJEaXufW0GO8+DF8OoMULX1vvjCePKNis4AmxQKLCF+cjf/wyilCJvuiyLVPSdsuRTPZ0AhpdDF/1uFmDwG7iP3qYwNsKzqd3sYdnMolCOuQOIHWy1eQpWhuV+jmSeAC5zCc0/KsOIXkZPdiw8vtB33jEBpezpGDBP4JLY2wH1J7Fzp8y8RICqVd25mDT2tDb/L1mh4fv9TOfDH5dTeATqu+diOZi+/sIt18hiTovPsVQVaqXLPRx/4R/uH/86tBMcF+WBkThKLfblcVCIECc8DgNRVX97KdrsCeIK+CvJZMfwrftcDZDZyp7G8HeKl7bPYnTKX88dXAwAyz66O2chkPDHy/2K2XcT/61XnlAKgPwtI8yP9Vu45yh55KHhJu93mL4nfo8szp/IyDjmFHtSMqqoWsj8WaVhbjXgzZxcqZcyOe7pUK6aXF/Y32LnBOt0WN28UmHRiOpL525C63I2JQPX8vvOU0fz2ij74OeJ1Apgu3JRObfdo9xGDpp7cv3TdULEfNS6Gu3EJu7drBsBsogUqUc6wAUW3ux0/1hLVI/JEKJrAGm8g72C2aJSsGAsKFW4CBvBXVlNIKa5r7HvT1BeGYBfxTR1vhNlFFNN8WQYwr39yT/13XzRGiF2IsfE8HcN0+lN1zN/OnzekVBKkFY11GgrK5CLxrE/2HCEMwQb9yOuP2rTXiZzTEETp/ismFGcTWmbM9G1Sn2D/x3G74uWYZY4rgKB2Zo2bTKS6QnM5x1Yee66Y1L7K44AyiY5K2MH5wrTwxMFh+S8LzNQ25z6sunWZyiRwFIIvSnioltUXNiOr+XMZ6O9h9HcHxZJkfF0tUm6QkU7iJ2ozXARitiL86aqVsMOpmvdIBROhUoanPtCjgft8up3hAaKpw9Qs9MzYtBA2ijHXotzarkV3zKEK0dFFQUwT74NgCmGGuSCEDmFCezXPC9BhyGhmzNa6rQeQQz+r9CmGUZjIQEPsHwe86oCOQhWaHERsv5ia9rZvJ//7UXO7B329YUkLLAiqpLRsVV5XpcfdawlJqi/BVcCqO6dr9YJTFFRMVGhfUbB9YWNvYPY6RyaydAFYq1YIBQxuNAGfYWLMAHtt2XRHoOKCLz+qf5HCVBDOPOktQ3SdJBfxUkaiD585bmTzMwU3oeXUHZ55EC99Kz9kk4ZXMIENwVVpqW2JmGIcUiutIMj2KkpjE2QD+dIZUCxcX57kH7hiuUPnKCTdaw4KN95XPeFRvMcvo5L8LexWqvaJPECzwXCs/4XPAlSMpWUzBBjK3pEnkbueMkMJQrYcnXf7PjbAoJra1VLX4YuscQLpaeYWbT+h24hCFrfcHjxxx6WTSe4AGY/KHRZCQKqTuFWt0D8RmGWmvXSdg1ptIefYPshuIVZT7CV4Ny67fvjJugy0TNYHqoCO45CB88kxrvIsih19DqjD0UqiJsTFPcGW3P/ULOG3nb8CjpgVTIoa5nO9ZYEX4uEHu8hLXrJPjV1lTQ5xTdZVagg+Wj8V0EE4yPsTc345KM6lVXqLiHtm+G6edC4GVEiPgd98g+twSYm18gCsPnjqlLcFm9e72CLJbYD+ocIZOxuVjrX6IKh9fh7WqdIZ66x9PWkDGOVVGkx7jM76Ywe16DX9ng205kg5eq+R2q2MguTJxYv/wWHliD9mOYpzZKNXYC3Wr4iBGkm54hBwkPzFhiX/VBHdVH/KJ1ZIMOHxIN6arKdxrm6EBsgwDt0mPe0MX1HRUMq8ctcmysU6xX0bzM1J07kAvq33jw1q0Pq2cyMWme8F7aVkfhzZEFdyi8fVBQav0YZqvAjZ83WKH726rBx5Bn7GHFthR6H4lFsltu+jWmsAibJ3kpWMG/QbncU7n9skIBL0MuXXtj9sJg+4Dl0XhKJ1LcrMydaIgyrgZgScP4k8YQvcsBmD26X1iYXKLzMYfZn2IfRjznsrJ1e5cnl/3a5xiNoI6n1x1U36FWckJbyx+hiSZg0QqAqeeSvzFYMlZ2REnO/a6yoQhu7PdHMYEPFIvfyGeyCU8e7rpju4DrlOhszj9rOIpNsvCkuD+TLyf5J7D/wsPkBpscFVI1q7oUSU9bN30vH5AqnO7bsf+9rGhtVjOJQ32H9hHSAzR2ape4L0Cz4WxaySm4jvuGXwkFp5NMMLrgZ8LdA+5uLuyxO5SMOmJNDBcbbLefv7z6LyxBwltnfQLd7qqpG1MmNcoLUcx73BkNF/xpdS0cKd6G646ntChXSeTZJJTFYGw39T7fqXDPKoG2cF7/ZcTvME42gXLVjTqzAER1Rt5m7GYsh0X0+XgOeW9MJqE5j/rpGzY6vUu6ACcCTzDMdZHiWELpDnvgE1hmztLcSYz0MtNyUBLqvylUJJnJu79Sku9NMHCTkgqozTnhMFfduV2NLCSYvAI5HUvQp1h/M02vKFD6eosIkGTg6mujUo1W8hy5Knf/erkBQC9LzNqPAYCgR+hczgevta88NNqSlBZryq9QNeUK7RpbvHjoNhUKAAeNYH55LeTW36KyFaXdAkBvyNP9xmRuBokPi2OhqDby6IZ61mwfzG+GmACkS+G80A4WGON5izgJWeeDK91jzusfOi0RmEsVJXwbVUr8u/J2LCQaMnHhi+wJTEPN9tS2b6W4GRGCNmtjAMgPsP357nOeD3H2tcDAPu5xQBKMHf/j4ZhXlkvvy3YmBJsjsd4pSOlfPZCnw5JvzxEXM5JIc+E2mU4CgB0mdJnH4NEsCHYNeVRDXFNuyZUE4nuvaJf1h+11AWLdAZ72D9XNRcxfb2+XHZN/SN48U7yl+sNZhg5gn/PD8wkBtnRj1zBUPIWnoMP6yGUEEzuT+VaX3x2jEIZAZsr3rs9wCfY1Ss0EdIFFzBbyruUup4EPanbSYew5tf16/ZWVup5iykttuqL4xoC/jdZWsAZeSfDSd3fP9kbyAFYXkf0Q2lmxaTkKRZrCo9XCoiUG4yP1URJ5G7+HSOhhJp0Anz0N07QZtyFUye6rcgiOFbtyoO1lkuV0iQ602MTyFK9xLqNHtNy4cJaTO6hjtiwNynVc34ZA6H7k8ai6S6eF6jIG0xJx+JfP97lzuCZr8vU5SIzImaNpiQhyvDbz23//PJcOk7hD4iIvJzfIgOGIR6ZPEJpWHZQoacbF+omeHw8aWHaNOfaIyGeG4lEryMfhtNmWh4RAIpn8dLs7ZE2eTVDwK++xDoSUgh47WDmKlZ/k6OosEUoQjk7Q+Kp7OxwgMFShAv6z4pTW8loVj2+qXLQ0T3hmIue8qHy1o/HXjm089m71t6mrrUyDftqMYtmfvQXKDlZ+K1HR/FkqPSqcjGlcPPIwbMw3wIFKBdVMJ4pFLt+oOIkWZMw8pkoYZ3byw4LmAF+7BdicGXFcb5PWtDw5XNNVc6eB9dv0rAEpgr5J+bLr010bpfGw+IkRoxDbkDFmQdEQUSElP5bViLo1ur/23KN0jEwl+rGC6AUMKxHcv+T9F1Ktpn8jSSrKxJnVkK8UD/tH5DN6nXB8mjUdFU539e9ywLtLYCwmHYVEVqnFmdubduaSd1ivIo4pTsX+mJcOAkrR1D60RIoocCBIdwJhCBM1rOE2XSlPo0U+khALvw+zfxYzwzd4roWlLJkZheFRR8QB8v4USwmAcDswUZ2P/7v7Xa51Fs7orYebYyww4YW5869Y/c6Kq2eTR9HLSjYuChTkXaDygoo8nz/yJ0KzfX8oowaNAwz8HvQdlLU9V9hjqYMURyYvPzZ60G0itmUdZwB+sY6rUkMAZZtWStbDFmnk/dQorhwr3121XQWffrK3as0g29ASwxbsZ3dZAq/96b7/XWckbjmo8+jwdE680DzoEUUivnBgowMuBQxHXoGyp+w/cSGY88rWtmwoyNNIvChs/QsZRnbdV7y8x7t2RkliJV/j8e6qfctrTsMV22zoqgQuTSNFh7U7p/Q49L0kygXNnEYXCBDgi5BeNWxu7VjULcUHI+lGj+OTCEATzWrDmaynq3wT9IAejtvh3esCu6sEu9JOsXxMDpqxm4Tzl+pt2Wa5Bq3TM5TKH4N7KLir8FGIPA569+uJ1VEL3fW8Jyigz/nEUjAVYrdCWq2MnS4hQVgcvXq9aF7Xke/k++rAtIQqckPNwjKrV2t7HCOrA1ps88Y5Rw1Zp+9itnB71j8tNiQc7mV1kUCQXkoi5fOsq1uC6hUPUL7Z69NAM6lg0c/aeiifHoi35v+pVBh7CDM1XfvYpiK5JIbIQFHafmnhHfRTnMagKcjdE7zzgtxkTPKVrObTySTT51g9bB5ro/dzn/sB24fNM2LGJuRQsmC49PLi1jTRfZaLpo8Txxxczij5Pl2vur+S1wQW3W5qyVcIUySZHtFDQHv+EYDoZG1T1J7D91vEIV8dHzUBzW1UyuxRbP+M/CM/vsas6RzmS5traXnQ0Jzv9hYXxKHcs15TQCP744XsLjzFjILYURXFnhM+nnV0iO6nwls9TR4tlz1J9/NvE8FGg5mgpZA4htS05AK0NnU2gxuqf2vjCyWlm3ypKvaX4vxh8Um1MHGB2NTeAFhbDyGm+5w2zqJAWxVlj6dVePb5yR+aMhuz05YubCQJ0BOtoYQ6PoDoW5fCwCtXj5SHvCgL/3B5z2mcXWaRTf8/GsFAfX/ntdWZWFc2xg8MJeenwZ4dZUToce43If4zVb1ex3BMAWGhgkPwR5EgktZhW3Yi+nsnZTUr9FYI160YhAraB0zMV+ouHz6hYm25/ETDM0MTmcypoGgZISSkfwYAQaHGY45yZ91K4A4Mm4fnbMk8GTc4orypT3NLBqAxYdcY/qCH82PpIkmVOEHi1NoYaUymuImLLcib5pmd2MHTB3JR+4rLdRc3gtQ9zeFdciciRiWviu3HkqaLSxJeI2rgc7OKQslItumACQow89elXmi4P3gTZeCauvMH5nF4VrBcLjjwGD+KlKqe/RWIEgT2wGqAgSuL6b+RTTPnQZzxZ5y5HQJkEEKJp5NfoB8hJBM8qn6xbOFtyzBjVBrwSS1zCJR3lEc9ODQ5Wu/xct9/2Q6qLHnmNx6XwZus/i8rEd6UsVxGtoDrm+Br0L5oUojlwdcqyVV4PIMsR60JhZwJtgX7izQWj+GOeF9DA8Wexdmv6DWjgR8LEBp9YuPAM8tJDu3uCumNqHnF2ATYX/tuVO55OgQuiUhmDmJbF9jJyifBRtxOVI9DCNLUY71IXZYTuiYcnILQ/XHuVJ8aHDStL0N+3eYNvXwHi2vEiTPnBqzsC4TsPnFVnYY042j5i7C11AVdBZ1pGSa52jM9dIL119rry0mgGxFzI8xPs+7bmMfYKh37A4HtA081olG1m9S4Zch2hoNCGVvVhd6UL7C2d5hKIBHoB+Uxarq/4aQXhh7IWjSj+ca7Vhqb4+ZwY3nHXh2S9JH4XZxQojbe/eINxYlozTYtT2rpU/xbj+W2hXjFQ+z+dQ8wh9751MP0UpjutQdxz3/FJYAEG5BF400JXWCBs7KrCRf/l+F+d9EuwVk6thOPDB+HNS9iWlLmDgXvY6K0vgiyoeA3An+jWufdAG1suUMBuJT+/w0FNJZbObUT8c5q5WtQxASQF6E+/u8UwVBs1eo8jTamCrcdhZJlADJbqn3crcDHQlBQNGq7btcGKiJXW6q0cn3F0xzf+k1JJS2testB3rx15ZPTDXm8QV5XE2qxBOdM2n6t5YbxyNOmEdsHx+hMp+y9pWkcgw1NikeXuafJvzcjaNwE1Ad6gG79S68aO7jWpKgBETYLmV4ONHhBk7Be8tjf2WVvWMDQvQdOnk448yeMv1tQKU1xev0L171e/qxkMZbmkfKnd29XRCK2hgNNJhwt1qiYWZGKz7Di6K3fGDT7DO2YQ7WU33svE/WKGbWQEvzUV2w+VNYDocI4yxQ6i3i4zU2TjmjCwu5Pk+Ja9HSwLpEoUswq3tFJ1jimthgMXd7KjSl6Qd0K+vxWT8G4/+xITHsWDGSfQTSdFQth5uVVfa8wrkDZHTGVgpJys2ik+3I0dSf6TNo6A/sVptyY/kx1hdAWKPI6t/xj6s+fPMU3hg1vkEB0RRHq/tCy3KUUhzU/d0JKxTyjvUms5iy1GbOFco0NA4t83SK9sBmtLWm4kOLLflyxqgQYP08iyXwYXzKnlQ6VTipuaspSJ9g5H5Lu3eLMnPKbhcwuEg0VZ80ppJWjUnhS3rL35erzysp+fJhxsUs86m28/UwW+IgrS5Y0zWaxlFJ8xML5wk8sg1ragF+eNajyI0Y4mwStxt1RZH2BjaAhvu+SnNNIK88thEgZEsoHv+ii+OMmXJL7dnAiINVDz3tCnqDgpQX9OguNGgZj3axcjq1UgxDw785yNIpqNiLgv57399jVmJ0/RStNswaFIs6FtnkilFZldxj6m562jL4p5g3Y9XCiXRJX6nq2PGJFifFR7EyPG4jDMnBM4t+O8ZpEp3th7TCxEw+ZG4afHl4sNFaqxyLh6+979tt0Aq9BrqI+CS2U7HJoKiGmyVU1lFa3/0O5mNC1bzRgNMy+GXyifLwJP7FwUSUmxmVRpn+gnXWoIuswPutsiciurvN6lsMG7yqEc2Y5ZI3jrPgPq0xEKPZpF7teJa0TQn8BQL4Th+hjv2ByfwKookyXEmj0d1KMcsmfKaeKK3cZZubiYqmSCrnGpYTwgPk5itKucVtjViuswQsDR6TuyGSIHYvlz7wkLg1Rr0K9kV1o8RgABlhbLrN74cVWJW6TnfXN0q12JFMpUbEa8t1+j440FA+17o8qa8PQ9igkctVROVIfB3jU5vtGm5pYYHYSDvU2TEc15pIz19ka1q6c/7WXfF8+POkApdOw7nn7Kqz6V4tru7NXgnA/u0g6+fPRT3hp/QrDQwMsjwNCZxdWrR6pgCBDJNc7/KAlwC0UZ4yWQs0KsuwbbOgcTxQPK54wiXr7s+221hzZ8RVxfoRUKM3e4lpxHC83JllxlrV760tl06f7/65qhE1jhMfivAUXIXfRMe3uY/G2TpWYzDrw5Cm5cS062Bx9lhHq9gtJp8xZwAtSdSuW/Kd7+orEAiswA76N8ezmVGYgNaYlQ/xk930LAWAtKVBC4U6R08L45IohB1kFia7XJs0TcaT2zBZoLFuOGu4iJaoAnfjL3uS6gnRH7G7A+aT6ETlmkYUfgrBuaSLLDJfhPJe01PfN0oqBTeQURasl3N8BZiQSgdr0aDv3hPTiog4NSyfAUyy98WP7dnTDWQTY+Qwzgk1uxwRqHl5MpC/84Cuw1TXfRlgJrwPop10kCHjmffnFdxCe2J3R3J5j+3H/sZn3IUu3Suy+I+dAOMWvzwExNR3RRPVelZAhtarKlXPWNjPRIVP4JsAFSRXs3o/fSYAPaV/zP8q6DltH47/rYhCLdy/LrpOsbaLf09eACcClJosNefetNElkSFSuCgeY7oTAAl+8Y2zOXJb/bgEDpoDXfQqc6lnlBr/WsmVznkBS1M7ufiqpxvKXjwvR4WxLbh5NbMNy8LsnX4UiuAi8XonbSUcVZKQOWBYUecSOMj6jMG8gHu7WNreBHY90lV7FocDprSrSbexkAtMW9KlXcnrOyLnZdodGYdxz8aw71HztIqLhRdCOB6NyzHPoS2hDy6wLk0I5Jr2t+U0A+A7EsgSn/Ih03A5CspHnVF4MOic+Lck3m61Um+GHDEe4DrHBhmgtDlRQl1XJ/V/VumCHtUDDcZCkgjVMBOmVOGYW0Rcdi1ahdjhBcFlfjA+5cRjBop1aNDvdrf7CxkLVgxiCxhRctW8wczM8+kVmIrGtkaHGlr8y2D098HXE23r7fnJFUU68zyeyM265igNOGPzFG0dIgUDWN6S3ZcfMERJdWVvpGhVEHXNLeWqHiTcF3wOt0FbJY4XHEpmkoG9MQPJJ4ueQ01+MB+SR0rCSGzlE8zod19q75LlLWgzogpnJoD4gPxUYcX+Gpc5Ly4nk+Zm8LDXcNR7SNVxLh6NAcx8ekjb/AC7ADlRnfuHaHJaBodZr7RBX9FLTvocY6kY8bavdAkQicE9bbwGLkZu6whTCJ56lOvM39ijehpTOFqR3V53nQx4hfOvwRPU2y2w7UU8yiRbcyaX6jGJ9CRvl9ybV1tebTp5MMuMnwLcx/lven0w9T0atJuiUE2WtYGiVMaP3EchABl5AsyaCpu/BKAWDFvU2vaCL2/fJBKCKLjxG6xzT4Mh4wHhH3/EqsGSoQAHu2wbHmXHj2LvoW19GXDa2oyeKRwGG1PU+S7mE/S+UmjHiDF1oqJ0R5QsdjAZYN1MzpNX5YDqWYfhfdjAXyFQaVyGKkp1oEGTR8MK6jaGfRDFd41u2Ex8ac8jKPYu3pXsk8gu+m9tr1RVzTTuDsACW4S1h32yFHX7qpXSmA0QVEcR8W9j2Juu0pcYqTmdis88VgT3gq7iYue5Hx/3K6hFQa9rZrNSDcjaSQlNn4LSqs20bypnKqpzvnnxjMdz5StbzvoAJKgVZa4DLCVoJW765/KyTF4s4YztmAT1c0pTmKJHTpa106FegDo8p2zD6uOnwpYi0vJlRMDe9wPT6964UfAf6lq3qWypUOx9q6BbKEYt7K3gWMXDNN6wAm1fNnSOnZ4JkbPq7jLQrl0wL1V7QwO/sXneKGfTgUL28I5iPVG9dA2gS7Ki005JUR7Vmw4gX4TJvy1WS74cIXD08LCF5obqcZwamuoZ+FPMJEck0TLHjyH1baPr55/Cy0ptDfRJ7d89pbP48tLMHG5dO11Z8xSSpPGQSgXDWmpsNsmm+MvxJjMCi7OFDHxxpmTtjgnOCq+c7Fi1DybfhAntviKccz+sj+OPKPYOKeYYPLvq6MpUx/chSvBccg9dfbeqetQNCs3eiCFZTU1mrDido/mib64STMgsa+IKLk9PyxGGbVSQB9GsHto6f5prAFIbRDSItDedz3t5+Nn69FFS0nEfmkF7hKBmNVce5xv65USKGBoHYxJyutSGnRIq7vMDsAMvirOEJOzNi5Kt7fypuSU2c2Npo6UH5jMOkePH0TwgpammO3Fb2FX6f11309z/mqRmQ949HHRj/wMzKNx95M9pwKf+UQkMEwisL3YVotvHhCv4y00Ui0Ql8dR7tGqFcSdYtmoAOuAodkBNs4PZSjAAF7S/szwLddFMdCyB/dWPgFUiUE+WmUUCjYrKfJLQfNNpQ4NKaF57w7Kp/isZVwQPUJyjJavN3fQNKU+F74jVBJYQEcEdw0Niinyea0l9PJ1/AcTm/LI91RZjDvLI81pnat7RKU2P4/TnIAa3hIEfeg4iGQ+wTDlURK6YjNpN5s5VkQW9w7sDYKU4XmjyZsCQLxztqd4SDQvLyuPDhURAJXKfR1c7tq3mRu4usFHPqz7HgS0X7kNxiWWR3fb3uVwbgKpmgLYkwKrXKt09COw4MjhxeZlDXKy7nNLHXAIKPtferWQnZLboonQXK81x+BB3oUidBehK1swSXxVbscj/LsfONu/xYEXYPM3aMqIYd+2hAnFvDHbdrJLhGEd3sG5PyxqhzejhQJo9wauFK3xmPYqxB99J8zYU9/yzrEZNzzbvPoR9vUlE3Ha4zspVDzHHffPZMJ1VLZkKqGCf8ZqupqMt6T+NRPfmPm2xeDgvzMrRJEL4/zzlu7Z35smvzbgeC25VP2CUrZkRxEi15A0769ojdO1d7C9OG+swj1ROMM3NgKdeBADoRMeJkRZcZ1FbQu6C0BS9NNSaoxtFzYT4lX7+PQ7BKa84yrN+ujVVef+SgnEie1G0N+eOtbZF/UU+wkeerWjloYqFiqo0vBnmxh+TwNMo9I/8lfU2XTCT0K4OoWE08ipyNHjxHvfhY6qa3x4HzdQ8+jkiO5+j91YkihS5memfpFREHP/2veN5XcRue2zCVuAub8V6vDlOvyP+PBm+owyRhMmng5wwGGIXsOkQekXrXpE/6dFjkHwwoFoj5bIFiqp+4wHpSWRbv2xGrRpd2c87FzMP6Hfj/3LWIBqFiNOAxBw+AAP1XqUBszdZhzOSQrQS4Ein4fyV7MaGsB0VsMF4bPb4lx/foTGQRJv45LpoxDd84xCawHaX7jpXUrOdkFxx2oUvY2xqpgIvcVufwd+zAnaaVTnEyDXD7S/o/xrrk4mgTjXhcjj5Rzrbr23NmuZQvpdNzny5MCR9bwvIRIqzOZZLsstZSCDYa56JTvzxgBs20dYTtTUbe21uljlWqGfSh2bYAzOpf6UguK30ZxNXgLHs6Y6urtxFA5iLYvlue5mDONW0MOtQjhqr8fRbCkYneiDkvzHkQVT4F9v9vxh2SIGPBH8bZb8ugo/BSgXojeSdNXbBAIDsB6DUNSXnwlu/bFLaCqSbvu4+YLplwO1JbtrMf9ZUfsxerAZjB7E/zl3qwgK27FswemUmSM4i37YAVhQSocuV8AcDI/CSeCDNPavESshDQ8A/lVIrAJAMdP/rHXouiNU8RL/TIvfQiuZEb6dkIKMGGOW5kT8vO8pivWnT4v7qmwuJo52AS1r/RyQ2g/7c9ZJgmMIzf0GvJJRfMNu1utRNuLWHOm9JIMcJK3qiDtVpGCDP45W1oTTMUnMC91kYhP0GHjhCW8V38xhjHgFFBfuWMsmSQ9MvNqKXiqtUhDAkIy0PW7YSKaKUv6zctAiIk+Jt17kG6LpNVOeMvJnlVBaJSkKe0HTJJUMvf8R2zna35/yh2wNlWLzIP3BJR5aRNxkV94ICOlycI1/JYRZtzvWMNoIpQrdNvyBuBydhSwhRwPo079Xk/XQZpbhzN/KK4NbdJQV0JIMP+Y5UBIM3TTYlFGYVjcvA5yVozkimco91Fx/eo+ydgAx1gMezTh+bYxCtXPYkMoPdtaElRusxlmdSV9zgF4Np+iylun3LVxCycAFxGCFsmARf6y4I6zXY0tx81aQyalr3/ih+ZjxGNWdhItgNLdEZ/BOIJpPoAveh2bKbEFxU/M0+4xqDo3Ox8MnNn8Lmv15NJigSvJV+y2W/ZogEXNiv0/nuFzZGr0pKujOShzcdkEVlMw8mNZXZCbtM9V+mfawtLxCTvo+enFWhJcFv8LVTFycDjPGBXRQKNN+z68HJtYdpH++g5WdhQpCO+DE7Qdu6TmZgtetrpU2ZlgpslOx+4hb3aXaqbdc92LCh51er8vm1GQ9uWD9+fAPRV50ixhgc5zi2Jsg1xQVxzlaELRWJ5biyF+eCwNV0oFnTbBHr3Glm9qlGVOpoOsQC8hlNG88fxeAekkCGnHFn6i5WzyO7ShDYbZ2KM4eqndyy01v+6TFhmkxgc0dndt7EzRCcEfBxSaWZwcev6MDZcuvSZQ9CNSd4Tx25TY6UAbrhikuP1vNFfPdZhCG1pe6vx4D6Ez3zIb0zDa42FPpxWvIpEeXb7YTcfZOahSpSYaWLH/vq0F3U1KO7ZxliZpoMBBYJs91IE0bOkrPNQ/USYY0qKCO3CU+AFbOYxzKWBkIglrX34377BZ18MKQCv1KWfIHEeguSpvrNH5RQOD4LeiH2gdx1MOAKphlL41F4RpxaU4dy8xERFgqoyICQq9XmQ8WJSokwqvhQM0fLtsvyCO2PAkJ3BZg5IqoR5q/GdTLgOWPFR53Nqw9Ma5vBzZcQ4+iZgetmKg5ZIn+/7Jbi+VlViXuD9CaAUtdEmnwWTS7wZWuskVvc/SDaaKV+Jz6HrZTHo3UrAu0IZDBkXWmL+mTTjdTb1A+MdhKkY/hvFNwXj1FzUngsN58u/kTdJ3Xi0hy7efR6faAOi4SKGaiOty8lxDFkiD9wq2GW1EZEsoWGw/WzxXhWDzYY8CC7WuLFHc+x19jhH+FiLXwDIARRtnkJPF2BUPZ9+grZ3tjqAWhhN3h74w5pooRQUNATy05A9HDLnILGSCtfESoSilqtqAIQ/TV2t3KhOc+teDf5t+DqZDdB8Ob9YXyklrSO73pR0QAxPvQj57c6FIR5dOciqeHZ2LRABMROo8Jk8V6JFewCL8TCd/A5MSbXLky1cW7mXobqgeEXdFDoEydKo5oCuyn+2JYI/7pIGFAzErlHZ5hOaiT17HC3zp2HpJwsIAb4/oIoZ8x8ak43Yp83Ermq55Dg8HxKGHXbXs47sh0PzQELTGFsf5eO3lYAuJjMneoYWk8W/3tW2WLntEKBZEW4hOFgo8K58Rj0vk5KLyezu1d8SO/JcuxpOJqFUM2sxBmbQ/9qqwb90R0WulpR/Ju84bQ5/fTh7po/pbBb7AQaYNdK3fatD3K4TLHAaa66MQzp/+ZGyCjzo5OXRzJ8UHyg/YpNHvvlOpwQIOjakpLHwGV4WsLDPjEIqG23ily3LL0dlkYQxj3Xx0ApCo35zYGoGOtIclYS83MnI5TwVdQ+Hg453WFQN694DaqhGaL/dm0KncXYqXLi5polgT4DOrzD4oSVhrkh8GW2PaXjOFDCLPcn4RQj8dRGIJuV81LxMPZ0UL6zpkaebhbFBxcRJe38UiTbUPDjFWk2jBqzrBvXcKmgdDcmRyJhIpuq+3DQY464AlY42z2EM0yIK0I6b+VgpanMfpdWo7OxKY8RM5tSJv340/qD8SxrYsybMuUkF8fHj7HcvxEPC5YYrH4LW1YKg6QaeFZLvPbrHZHvi4OXLKkN8cGQO8019OKqcv6QnBlj01e7qS5evoGm53rv+VmDxxCXDiOrDg+IaPeMPrn8TJ1oReXYI3yb+4HQbikxP5TQXHk4YXPUv95+KmkxGsRgTwP71YiMpqNXp0loHZeXRp9i3euKrVtxMM0e6XAoACwNtcc6sOuhZVb1htBLudzahrDFt5GkdlwHjZl5y0LbvSHwII+qYeDwRKTTzyXaInHIM+8rc5TrjUlPRVwB5LKFpQnV8e7vLv7T7V/iJTW9h9TnRtNCSGcofBWYm5P7wZcAq3AFamEW/GMbo27ldz0plt5HI53ddWkn9IuCZY+Iy0MATUh3YenRTbVgdLYtu893SuN6EL4e9V4NhlzUjI8nOS6B99ecyC1Ot8sDahQpWHbmt2YvWGyL3S9tEVLKYs+LnghBmmSl2uPWfqPobPwBHNLW21LUjfZb7jfLMTsMp3icGO1npK/rCsUgdBVKVg0Ys+/WKuTmVJoC8Oe5h3PK1TQhbpZ2ytP9nlutQPtLAEt+CVT90DfVkn7lHLOX8AfS6HLzfHeAhu1alnl19RHKV1LI0G7RPzYgVaSpX7th9f06uo2WpxjL86i/2uzK2qj/ClHbGDyQr3F9/axmq4kJ7zZFVXVVwfiFr5bhUGVZeQJHKFAcsnqPKsb8vHyB9SpFpT9U1U7D4aS9vYgqajxhC+hOkolJV2dKAxysCkWBo3SPiPUrSQYZxOWwWCoQzbV0oeaDEcgUtqI3nq9TSmpQ688/+wb26P2CHLY1H7q5lypXSrnwnnztq/jN1o9lyvLmLyGguV0VJnDCREkiUNrZqGG06MsyA+Phd9CuFoM5M1Pyk7S6TJaHdTw0ni3n5ysAup0kyxr65lFc81NcH8xSmpp+iOEtQZrH/y01k1rGMRJAGFhi+nDecpUlnrh+qBOCMZCcSCovOPJrxjZnZJDMLdpMVu+tBSVS1nKxsYjY9Dtq1/++riVfLUVhzofIcIgQQPOqHioELxU3EpCcZMoL9laa5YlOZAMEp5apx7CphrkL+fyKbBAf8ctwVd93FTo7F5Oc/alNsCgK6lHruPROtN2RybiLqx8P5LTUZXU+Aoyz08zYHasR3U8hPDKj+6arWXR9yWdJoMn45prCSURKKy3+JHgvs2Ot6v6GbEtdCumgCttv2VNoU3KOqUwqNIWHqYm4eMijTM9VWB7umEyp7UPOI8fduHJY0W9xSCZdvc2xMjo3Zdu2o/WZKDMOSh9UmLvo45IBppD2dG++HJu8kbfFdlwuIxk2KHhgHQeNKcHhFkYGRzL2VJVMOAb0Co64wvds5CaYl9ZmBm4zuGDeaO2eI1XM4+rD/HmZyRF62SabgAe8TF43VuMutigJJMfbW2UK0azGLFbOfujnHD+GGBYmSmOQbUCOY99HYvswBQA6r9hrc2jtsUUxLVjxnZ4JnIrTwIVdWCTPtpJpvlA7m01/4tbUMyz9mv1jdN1jkiHQCJXXKg8bJ+aqW6rbwbn5yDSHBTcFXIegrhHGAjJOZI1pyP83Z3vMYTAJoo8V9IwyS+U6OVg78+IhSYHDYjRs8FrF8smHQ9h4qAYxp49rRP2d5uxLAuP72GvZaYvfeLOkMrcg0PkPuq7NsXhMFmiZa6PKBH1l+oKHI5DBLdZCvCwTPdXqmnz8gLzVRb/ixLTSdit2nrzt0x+5rDeZT+ac31NKNskQs6noKlQccyD3UxzfVZFmcbpmrfPsZD0Ve34xpKWk/E9Khn4A5yVPVq+dwnv0EyYecPqXGU7R8suTW0A6NJWweLI3iSGDlQXzMYsSWkSMhFTfyA2vTDt/3wXk+mVU6bRNkZvNnyVHYiA4tmnNwdh/RVsk/EgSerfTIf5VBmuAc2IKSeL5Nbrg3acgFj80mI8SWsc3dNAGCBLLMP89gH5UnLTKq78d9SxQH/g7DVnBh/qnBdw5CDrw/uMzcdXSxWqGIFcnQZt/1aOHxUg88MN2w+FPx/V75gy2wzEVe6G51PQIR2tZsxbv62HhgjwtlzrVREw/yzlaAiuXC26cnpvQzWXp2mOgihyPCWqq38nEadX2T7f1Y5zGxEGBaT//IcL/BsquAJX5EDbX8X1p8nLWR2yyjFRvqC/jssoCJBCDJOsZvoBfXqQSEKhNARH1YfueeKBslAwLi24/wAO1BHptlf1kQFNsOPlDvlYednrEp3a4SAz/G7LIVEsZBu0EKWZu/euB/XKdkGonP6t6lgEcCOw8mceuzvEVzyoPnMyzrqoNQXJb9C8ZCXSiedKiCgNwfNkpVlHbUgE2Rb9WFScOeEad+T+jT8XlSc8rcvkIuhAv/gxRu2eb2GonLTyokjcGF1EBpCJbhy2H3lhL0rdZIw1okA5pBg2oRfQceXTPzhuNKorTEF7t1UIgDqIo7/loxyTgbtKu29o9K9KujvCqUGyPY7upcfiZLNBVKh5uXAAZjQjhlhBp0ukmO4Avxu4xAVhCtnsOIA/tAm94U3HEuSr3wq+ZLo8pyoC9EB/q3pOzQRyCTkozmJwo1Ln/2xEbtNnS2S0NUIS3yz3/mBIdxONHxqP9FW+uoGI1F415lI1nZwK0SoPA0+flaokBGEoXgZnO4GOExU7VOjdPns59ekmDxqNhEHeAF5i5N/3W2NC1XGFjTpqLrnCECiwVkOTrLtp2ehUIaejOG6+1336YQSKMSsL4zhUjw6SQKryVRz5Ldn3R5/r8AOi02RJkQXPdvPsl/FMg96E/cJmIFLmEDzr1Gkh9G3zisG4pqM/MV6XIz+CtDUh6hmJB97VzN8jaPSS90vgDjvnaNlKky2/zIhE9ObugwrftI+Oi2a4VVaB/Mwn3VmaWjsU9NOf2usbcN/GLQMjvfeU/YvyEERPKw1leXZWWk1HXzY3P9MUq6MZq1hkEgFzds51mv8mnp1i4pQprPwY0TId1szXwe5TG+R5mMD76nGPQr7/EhQWksjsgGs7Zy5QYvMcGV5tcXJR+6hlHFIAc/M6XjkKYtwm673Bi+K1tNO9i1YBePTur4I+gMsOK7f7980mcJXhgdWdhNzUN2JvFsvXq3zZRG2V30sJtJYxj0aUv1u4/ppVHi1iHnTY3gDHsrQS8YwMX5XwZ2gcFYYe2wd7ZO9swr0gb8zf/fXx8QWKPXcK1UdJk3760B/TMlpWLCbhkqVoSTsOqzgkmFmFteCCTGhNyvFhw1RrTIWzRxq8Tj5FirvKvtkp2GAVhnZ7vnr71pyI0rKwQbVxKZuqM7GAvn2mRBj5p8djlHUsh/r/eBECptpbbjP5nFyuN4mvQLZCaxeTkDUzd/kNGLIzBFv1CElQO+xmf7Dzt1f7GM1Bh+wLDCJZlhcVDXbtPuGssdEie3lZNiWcXMTjZtWAT5MCmpq6JCRuFSHZYGKcSFZ9kOYJfEqLIcWdzpTA+Hmu+ktgSUwXVSwkaa/aHdZXh7IOyrudCBalCZpgXGRNbhN2XpEY60DXXO1Ci5ayZSoxtG0WRCC50+XtgWz7qgX5MRA5S+jzXCYy7O7Nn0ljVxiBxQNCZKZMTqi6mPfy2LZx76uyRUXHjnpJJEimflHDUxyX7fFg7iJvSrsZMH6Uv2xbfQNx5eCbx3oKycUrBY22KPmgfg/w07CDVsw6tb5VxPg5/X38cQtXI47U7MAGGjO28II12T+PjaXHlstPtkUQNn0DKkCYis+kVAkA1wyAJgYKLGnKD3nlVCarYqCkNIZbiVwO2Ydjl7N6iOtvvbAfuq7VKZLo0jEdw1YdsRaHcuJQulgb51JyELzYBkP1hd03IDcZfPg5XmNvYQSOINsCSn3BuLtkCPZRalK7+S97zxvJHiJCZJM9XP785NZ8B8fqDe/Ot0BS3PH1ptErwxBtpgfOj4d/41nrSjJQf9bV1kfdBHJxYbHILxOsWkZvoP/Z4Sl0Yx3bDjTF96xf96+6uIoQ351Ce6DeTwTnkPr20YwATlnhskWIddUohklNITCq/07zkiEc3B58uiBG6d9YAc4h/7s44FN2RG1UuZWeojrOZIhElvDP4KqHcOYbqqS95o7ilQH5ONJfy+aYiB+sPpn35HfHG3duLpNvBjXc+Klf4IKrFHjeVty02xPTNnbdL4gtkqPqMLhSgR/fDXzxJbSScqewiF1wdVoJ/fGL/nGWZfVlDHOQKD+/i/mqwXqvNqxtZeRHwoe/bodk66B9soOnZp36gdzVMRRQsQiBFf+HXjRcrRf9FsGghw3+qoN0JeeMvDJrkSBPsESDai/uVOzn2Ohge+UVdi050fdWpsjP0D/QuTdYs6QyI9xnhU8WT2+KBKzoZ7Bq8fOdKPeLulUhJjT34/EOnUloqus8+pzqNh/UdUOhgTlrbkuTfsaIYDm87u/GNIl3N53uaU8bgaBjpz0jdu1f59K4KFDtwUUeEUoeYx6DEkWKHdi7dtHhQF44lbysk7PqERrsuAQu2D5tDMl7kFoGdI8r/s8rMytJzYBU40wqeFvTl0ZVLdOB6Ya9E/f8VPbGx5MdpYqYMLMyB0QxVdnoJ+tgAQVWfH+jtOHD3PsjuT8dOTSrupuvHWRHQoGI1Qj1Hc6k+Mg84FAZ/gzl3SEzuGWZKFwuo2D3EiG95D2Z1szTqAuFRmT1nEh20tkC4ysmXx6JtN0taK1iRR62s2uNW5rSAvMEJ8yotr3UhJe22brlQn8Gvcq1I0aODaHJucQKVe6SXyfcDWODMw8xf+2C7Zx5a4Qlh7pJs550DictL4OxcDXKvVmLgVWRwb3moxv4kcxzm89EERJXCl7X/BziBkGQWOHPGF+6K5NFJYOFVv4+NyFq+OPMaSWZKoydplufY+CYyL63T8MCMmwqLTmAE8h0prhi174wnx7DHZWYuRJSYZ63uz97AGOzyI3aebclnud77znbZetbWUripe+AadLQeZPtWsF+FNiaXCy/98km137lWewyc7Gamai1Hd3Ls+KMMVh0R3NKTQ08TIClDfMKwUGKy/7YZlJHU3uW60X0r74Afh02v5MJgVOYkjmors6GAaDU7yKHydfkXYd6nEjYc76xws1LDLWCNNKBtUHNyLseOyNDgmHiJ41lXvq638RzDGis8WIniOb/pbTs+HsQVGPi6mxG+CU+oflMR6/qx3pVP+GPgqa0U0lo8MVmI1cBgSnPGgrh+J+m9TVg8nivua0EQP7xai44ruC5gsAVOp9bLsDXfHQujo6IpBmpfbbU8PDavZpTuJtmflVQuOImnRQ5kKoQz2NBFjdiHH3cF9QLgDP5vz/W5trCy22Uk+TCjXjdbCCHB3rJhKYTwiyQUf8xu6yTKtIwrbw4tzFgXDODmWYEnnpDupk3b4AP3qz4AZ2En5wi6aZV287AgCF4vH8TlWLni1E5Hd93vLxSYLBWSuj3eXGFtWyWpBkIeKu+YsBh19VeakA8OePM0ILu6dYYl9DNIK3kU1ybH+A5xYhFI/EqSX3vtNs6V5eQgxYLvu0hYFjiG+n8JzqLQVROiVa8XNQDYJtDAetPFSuEtGI3B8rnbbrNo9TJn/z3lRYq0ecBIe7a03vLESwhKOm1bGTk2kPMv/Sh9wyCOmIore7JhSFT9HIjonBfi+gcdDLfFt7dpShJmW1gkcXmitWwm1cC480CraHm/or2MHphB9Q1bmt/SBXFqXJdcv5GTt3IS2fRgqThhInCjRkh7Dk1iS2vMBLSGtRPppb4FEu762JehUMQxxLQre365CKoJGvJwVde91XQ+bDp5ZsMu/QHmLgITmwGXSpQFQlQBajqquxlwIOe2cyfezaSHIoRNLcwjW+epnmAtmmWA9KU29v/cA2iuWbj9ZV7HR4anhHkjbxnzKPHnIZ7Mm5wAf2o/3xUhnfH++quS20TdhalHgNhusidPKWyKWV8ZjFLgb1fX2r7ifLyUtxuKHHIfCWXQJ/DKeU61vxmPT34MTi2Q9r7/sK1CYuHVqMBsgtfenn31bUzCoyPN89KiO5wHveqnk3uyHnJSUBVTQQ3NyRPmeRKTQvWEBZ4QWcSgMyZF0RQgvUXRcp6KflF056fwahSioP622TdcTVYi4cAwSZLWDvfjoKFLMowPQpzn6ogXHc93fFA5NZmnwslSuesOyNI1EE3RM8kzat6thkmpOiGmm69Yn8yNuxz1YuuPWekoybkee106T9WTPXo44ea9E5QH2Ig6FZn716DBa2FyXHG1B+YfnmhbEpANlOi61BoGO4+G3WMJDokJXj9GhNsFqdaLjA1pkhLP+/mGCZoYsxNI+A+sMvWyoj+PMWeR8koRz+r9pNVEWT70WhiAkNTrojdr0sBLwxIM7D4zT+cVy96ZE+ABi9CqkM9VK7iOfkJVp7AqCqQ9EZ9emn8rB8zfoQZUBrVd6YS2AqiTFt0nJ8HfPGmnBWf3Xi5CgyWoLAmHJp/AfTdHB0+Ns5DlhL6UJ+O/6xys+CWVKtL9S8fVHkpwZZMJn6jVtiUTtXjywmiVXw9a6f/G7Qd4tZtcoS3aytxXYA9aGGmEeBobjiammhUaMDicH3nlOkDvvz19NqWOvHC2SMv7OQHtDIykYerPuoLz6SQNOBtw6oX2Sj3ZLITBDcWNx9CuZYYVaE+vleXnATrwn+PnuQ34jL52tp85aIOk684SUlQ8uyO2t+eIOHndZ3oxD+BcMAba/JVxRYUAUZoEw3D80WWOz0/ul+fYbhFnffx3PgOy2LLiu82D5FMSpi+Pd4EkIFTgfv7p/0vnX1wp0VpNzyXs/5S/4z0RFS21vIF67k1ERTfFuhLM/8fdbKognohMqTNF/+oqvXXLuJB7IHeDdn1X2eParLBEpz8y9CAN2g5VdE7EimekAOhkw+tTzqeEsgyQL4iVDnWrP/RcBd6CDm16/5t+I1SAxCn9wo8knzmpg8DYP8V/vHw8Stu7cliAt+G/VR4XPNZXWF2rZBeQO75os2jFJrbtkfhN9BzHT4HGgXTjyTy8NGsiQdeOw12GjYKCyxP+34kRHZqYsn0pFvVubB0+/emKRgiGXNRWQwMSvAB1xvTprD0Zyt08BjP/4W9HGNfNBcA0Qb9qF5hdQ4dDqpKAFLoIW2gFEVKOganw3M9/4WP9ckP0/g6kaJDRurtxNgT+PjvWYEWlFa80wKYCkd/0ZChV94njjGyg0t98Pz3AL2AFAhvRRiJwdfRcQqqhWkv/o6X45d5w1YLJOye3v7rgta7Ya0jAl/an42ng5Wz4S5we7n2+1W94JnpoGyV8WW2HYjKLkKmp4hBKlNtb5y4W1MrsG/wfq2N5Xrz2kqhdPQL/YoxgCQd6Y2KNkADVu7TxugQRWVuNL0BUj3JRFyWNeCmB74Wsz54OPnbq0GFFxzSkoiJ3Rtq8yEJMKvOMMalFKH7YFHKjb2nwrKVfuUUuRtTfJDiBuaEHHoX+MUrM2bBaAsSdnY5PjqcMBn/wwojQxzt2MoOCC3OEArr09ghhsj2M0mue5ntQcmcC1R/sK3zfShGJuazS+mJUeKxk5u36CYj8+SJCq8ZEv7bNf1+BywGeDQoTDGq6Yh1xW3Suwo2O/ykazTPK/TdVOICyiwK8MuQpK+FX3mqSPzxfLwFJ/iYDjs0WgW2kqXYgm+gkNToB5+jYH83Xlt0cbtEmkkBaVGlHz61rVuWzrK1yjn5nYHKvKCrBPPRth3AKDQQB83fdrbgIeIfB3iHya5NPpEyxbzmtN5Dnk7GqrQ4uu4h3QSoHU+74zs31cWqIx4SZ2bwWLvIxUtR6gufZhNZoMcmSB5z1O9TKvHMORD+VmuiqzsyJKA1OaApB+b9x6u9FTvUkalgl0r7raV+wRqimc2D7B1z/OiSagdd5UME2igLGUcgPlMSX1VsKQp/9yDiYei87KTBA2NPCUmgaLwVdvQFFFxWp2vGCY/KCUvxt3FOu6xIgwS4Vybvbj6feUCkrQPpO/wPHJPhAobSj/aa5YrUvjHMcQkDZwfc9mvghrk/PIPvcJa5InhVBfjh3Xr9vIvA4ac+m+pywS/EqkSX55xgiyj0TB1EE0NT3W2CPFdVD88P72SpdFzHS/6XsmbGtM8JE/m8eojzd4PM1bNADliZ+XG/9hbcKg6PftVKyKKt/8Bz4lGsHyT0VKj2vDGp/qDGBajSHrqzmpEjW5LXsb5kTV6HgbMcnPW2dzQju9N1sI/gPVlgGmk0bHKOX2Ws1q4aPizhcM/XiJ5EZNUK6bZNUeFaUJVTvGxglRUY7vdnoVOe0Raho3huh1XDeTlHpk/2gBjjhUQXe8FN5A4zcRqkNtKpSVq0xyw9j3yQlQxq/Lnqklpz8lXmzHkz8sX9HJjHwyn8UAjblvN0ZFIk4liejx0lVACoKvpsT9+pQoLY4weMHRzcuVC60DUFkaqLfclS4UJti5WK4FE3dYcc0OilX50uscLJomlR6pXriD6ELNNBWOSMt50CJjPkyt3Zn/xj1dlPVP1t6XExK+b3jMoULLPOrEGvjELfAMM1qcuBb0AijkIuFca8f8xapUlkvLjmmJW7RK94r8HaPzvmHHSqX9MXdivNI4A+JHy0VCe79UZZJvzMGzpnsj+Q6k3EItDBiA12fTMlSbEOMAWCdQq9TtyUiAaAqJozMzryEg0k+yVHqCc/DyJcCE2V4WXIhEnsOc5c8f4ChWfUaONhPPWogpDs/lyVCvp3m0NSfrAJKNiVy5aNC9gZ6c9BqwYgj/cDO3kdam6gCjhR+akALFYmt4ixHkWxKhDTGs5K+CwRiKJnvxP9dbxRPCBHbiVa8gsd2GuiNHZD98MNwXMdMC0MubVodd7dnyk3UQFfCIIL1osPxY0ZJ6DvZXwtZ2I0th6aqlTMULVo+lhSIU/5qO63lTSa3MgPRJEOi0AJ8/UlZuvgqLw9dyEDQoHTKWOsq+6fzoAyvIpv14fLaY+braPd6NkSaq0RClMenK1QLH87NZriUaeuCo6SZ7/CfUt2K6VOt0AjIK2jR0vorf6R8+TVzxZb+QdLimH9pU5tQc73xW93QRPMGy/gCK+R+YzmV4fHK52GWBEBL05EEoTY6OYG1WWji66dWnVTg0uPNw839p/yjLxkCfdTaH+v6hVUCd6HlROj6W8Mil6AYGC7NI2+qkZvJh/dAw/iQspXQNwwWHr6slLIp0hBHYTDh/J7Ba7ZR6cp3iU4bSXdmzhTahYDev4yKiIHyN64EANhI5OHYv1G4KXfIOvQizYWchPhzQg5eVGNMxsqrvWVxjtIbkKuHzE+IcA2NZ83GKz0D8z5zmgRnoJGKigseP9TmMS7BgAqtqyixA/SLc1KEUWrhXOQ6kA5ZQRazp3wwSa404cppBnfsS8EsEpbr/gXyW36cZ9pt1RhzyxGxDUmnZeBz/Uf1AP+gyLIg9x04u1fThm2w/H1ZXGvVqsO1VqutV5gUhFkdkwoCjzz3F3FUr1v0njGYT2mSZYvoF/fSd1W11c5VIhkEO06US5wYRmHVPYXmZnbK5YHQ8pkIDJ0yqssqFK34CuHE8RWb+Dr4omk779QOOcYomAMYQ9ILt2KUk2uNlahW/IjGtenuGLxb/t3aFoVz4oNwMZ7iyp4td8mdzgJAfnCcYtklubGAUB9k6bGC5DSkf5VFarnGEBWz600VGR8QywZ+jIYFZbtKT2QdDOYP6k7D8qVgEZByGmRedZRWaQDTggLyNgDD6pQwEeSs82+hTxWypqwU3zuAWqfwil+mytzVnKztyvMFJyJwPFaPr4Z3mTjyxCR2Jv674JVGGMUSWb0l+GtcYtd+NBGChwr8mB2hlyccget9liJhQEb0XgXfgVRlHlbO+jlZ9CcAew0Nw+tRcWgNnz/GL9Kur7RohRhaYZBBmQA6JhvzkazHRcdZDn0zDkfBmYP1PfQjP3d6qqx6gE7vrb3lBKEfK3Y/nCe4COdpr23oZCoIpssGXmqE8CGpO2bEwkSN6uqeqR4UtWR+xsgOzNeR49PTLJpFEAkXha5YaecJ8t/KR+eG7/HKV23zPZAMvHDC1rdxQ0l+6wlIgZbUybjBe6yusL7isRuuYYwg4+8+4lia2ox8RCdvmXlt00ZshBnAIfLkSwIqUzCcsD/d1ZG6Az728L4FCIqBKpbA6bzkJ87lYQpbaHpwPpqu3S0UqNDCwgg3q9MEn02X16E4xibz/rLx7NMDtHcwMOt9r1dVU6Hws9TvJVH7THrnSFESgN5eBy53Nq2Fdb8mySTxz5CitvVE+ZjHaYS3hq9Bax+uS7TxMIT4qJE7HGdsHM1/9uPNBylhP04Lck39JMe8v2dPOSJzyQoy8m/8Fc6h+X+5/mBVA9jAsG4vmx/KdUW+NXxgRt//SS2Ib7aGILsjOz+ZZQu/NMeuAsP1pFRTN90rqIVULbJ20ZJlrjoZD1VxHEoDFFGVWCVOT3jGK+vFD06gc3yDUSnZ7ZHjGmw4ZiAglY2nm78aUpXxI4BfUHqL6YQKFDCazUIryLi53RczlaTh0ry7WN4WpWK9sPJ0J49fu6RGUMYZd3+NrRvEdOrS5n+EJOTkr4lNzo8vawcYnR/n1Dq0rCHu5o2BGBEHABJbsFLi/mlWFO1MjpvUu6UPJjXlXse6MtBROT/mQfyegWGmFRQ7Q/O+rJp471+tQF10+bvkExfBoTQrewd5UwhAUODpyeW+aK6vx2AroUo2bGBZ/ZjcsJFfMYEMsm47LdQSq7T7peI2Ex+4/9oIAJGfhidbXA9UYPNhxigFTg83CETNYfYVkoambj3vv4MZNtE/wrIfTguBNqkQk9ebLPTmY2U4UCzbYqPKO5vjaZXeVksobDAJzhVjoU7p9TdFmNMyLyCQJryBSOcm0hFk/pcwcV15KZ/+IIqeQGPkTbiY1haWSnuQYBeyW5uSPHGtYw28cQS/v3rToNAUGVBSQ6zpBt4CHvaOfEJhuDJYZCcxvPeOStdCzaoSQn9nDe8wDc1MXrJ0+9N9TAKcS6u8ANLCLY4UfHLGf884/LFIn4OLOlRcNl7FS1IJgu1/vLm4INkgHt5ISp2vC3MFJHz1zJnopnKS1AgJtCmhJRZDaW6wis8CJ0KAJW0Yy0+kWI3lJ9N8yqJht68FMNVgkgaAGi5LuKmkZWm+ztKvf9gT8hJrXZkM/QdHI6wy9BqVeWa7g7ZM1YLbUv37YSnLmGsCrl/UVi/tG+fZbzY4bGye0zH08VQpGmyd/v++fS9EtasmbkQEIYnmLZLxO+tNHp3myIGwYBZVXjlWvrCiQcsP/Fu9l0HWmLBu3gvuJ4phtJsXXllJdM8iZIQR8Z6zEMs+cqVL7+TYhxDd0c0l4sbyIEw6N+V0v3ZbUlidyekdcz/aIomGdZtmdI+1QUrrHw7eDXT+G3zbTZMXxpEgJc4zY5bH5az8eHzwoo8QUleUKpVRrsErGmSF6GPJ2OltKYL6/C4zx4rHdcfsrQTcWBmrBWMMiFiU4NGtpYeACqYafRyu8j8x7ltp3nxVbsPO0MSoaR8tv61/q+YCqHX3h4vy4HzjCYEl+4ZDtj2+mawuj4J0rBpcDw+spzuCQ2khFbks09lPGxK8HYJl0Y/lNLUxGLZ+2h6+EFSaD22bYzF7dk/EhCWh6u/v1HUVKC/r/Wl6JHtd1V68J9zdOTgbvJuQug4r4vUV3JJolQQ5tecHKqcNoYjOIs6BZTlfB+yHGfGdxTKsGxbU/4taKuH8Qpd/M7fIG5zebrpiDHV97T4jiUNt7K64/u1e/+erXV34aOjfddcKNO76EzIf1pfD+KivBsRlzlsjj17aDPq/lnKHQCLsD+3TK021HNzhZyuwpLRKS3KE0XH/0TqUOr3VqLMcsSZM6349QJDznPG+sUqeS6wwMWp28TAoDKdmjzW6f+2au71HsOzLIeWencRa5JapKkVTYpvwMIC8u2L+/hYGJmk0588rq6Nnqe041NMzU6lj1K5KmSj0ZRiVpzu2FSTl4PBYHAuhe5dtwnRQwvvNqIELVxKMFWedxxB7UO4zpYRe2x0zH4X6pI2m4g6YdCs08vR9B7omy/goQUYbUZA+wJamq7/c0FhkNm74Mp05NSCK1Dcy1+9qp82p8XVkUB4+SsVRJ/Tqtn8v2esmemr7zjCfjLicMb05JqNoL6zzz0KaYkXeStBrF9+T7EbZTo2Fa/wS5NhJvRoZc8QUfS46HX8HIZ8A6LK8zKtROnakAnEEFoonVlvYR71xYuBAXbjtxfu/bteN8WkArB3//qp+3btpi2SIMyK6rX03iCLnzOd2OrPnD6xqgVT35e6NUMpN7EJSz0DRRzyze1J+Dx3cfx0M577W84qifD51mZG8VNbBf+5PxmGGrGOmkO+Q41YnCkx51D+X3CXsNAjaz/XfcPJUXJ00vaQyfYDtmFq4kU1ZHdnep48T4IskzPsYT9or3rd/ubiYLqeBqjnGbuNWb9ZdPDxkeBmJwYTjsTU+VugQmtz5+C3QBX0piVh3d7BK+Hk4mO3q8qJVQXeIqs4hKuRvBfIwwUyKg9W1x8dv+EwESuk2Bgs1+Zc3wzx4eGasynWs3V360wH3fKXZFTckeHZdgtzTqcQPC2hCHhSXyFMyljvrneLE+c+b/YQ0XcDBam1oAPzvKmmcgER6AqnyC32Ic4HMP4FQN2rh4Y2ntrawByV+9oq/Z8hdwQEPYRYiELBCnuGGXDQbl3ZLuUo0vfKU/AuMwYfNXmNM2vkn/GRrpc5WDP+MEL80tbJDZfDNBRfpfcvVpf75u0LrkIIjnU4adaolZWzB2yjIVwNrF7zF//n4N5xHeaGc7Vh1EYRdc0h2l23qFvLBNQ5kHbmX8Yta2Vj4DU6eBN3XyJBvJf9iL4x+hw1hx/7Ej5U8EZr/Qhgoni5r9PxBfU3fdvXICGW9DzST7GV141bvyMDXblFG5PizNjJUVAWNSxIAStz6+eDAbkYeAKTj6DIR6ysFvZAloBLCgSdMFd3ol/WXDQh3BbBtLqO9hp08BfumZjLpTJGRAIHzDizXZfhbgqejNSS27BIXQLV0muwzgXGqYt9McSvtLWo1Fos3k6Nu2qGyFftqQyDz0/bmgvtZyiFce/SLYnjt2Q9BnlmUVBWOtbDPvUgOSizvJDhdiSkbLLP96MJ7dKO3eUK2nZnpb4s4b2XGF4T6gC4qo9TDv9z2SY4Rffb/RjPs76P0YiWADpPB/nQjC2tDRlxt4sdNCIjmMsLgU+cr8cpyaMSYI9maP4HHww2jTPkGKvF6H6+DFAF+jAZKT9oi23gpZ2zavE0xXPkF7a2FTNJ3bwxvsJV+o0fXZAkmouYq6B2+6ccHhnUIeL10QtZaPoZPJB7/Xry/2Nv+JJFmQ/p2NSiO5bYGA8ej1vh5QlWhaX3JMs5gMBnyyIfXIMf4im0WEUnCPAJzq9q04Tmxzy7nGKKEf31kAp6IFk95aj0AogL7iljLVJlOXNvV7BwZn4dKfuZweSEZBqy+Mvual0TVDHiwHuIuXbvaw+OkU7aeAfck0Hc6H0jgt9g6Rxb6dAuaiKEN1cUYtD88y0b9Arq1q6ML9B20/FunTnZNF+IHgsg641FfllDFpQ+dqrIPKQ8IkLx/2ppx0ivQSrehNaf5dwtBjnPHroRGzG/RWOdiW0COPzepxIqcsWjhfmBXSUD7YCvPm/qTGcSnhcriFKew6a5s0AgK03I1gEifX6y90cJBY9REbQ7yW/XB+zAXN1XZQVEs7r+0ajtx8KvVBKJksKj5YFGdhEennMbwgCJJIMdt/pJD6FIcNVegt2LiQS70DAJeiNNG86dQVNYNZmYEfo8oa002xKLh1+rHlBX40iY8Wlv7FqswQFktpyLn5oSdo1jBRz8V3aRIOmhSnrs2wxGwGBEVEXvRm8RZVvSQ0xlKMVWs9Y7nnmJ9jEVuDL08D2ES3plzvCNP3FpKQeSknFeVBXv5T1Yk0/X5vdj1J1LYa6Ffxxrv90ObLHARkCI+tz6+0i5cZTinvgIYLMVnV/OL+m4RCsTy/+9VQPsYv6X2qSSlVdQ3KM1SOntMNUBpb4C0MsDh10xHQ0cbJK0gsR6X93ru63BDYbRZmPISt1casVwVVE7+u3l55XJGJ0Ev6S+2zpNqOAH66RuzpVskXE6X8x6wHOfp5PAI/7YG3Zozh1U27IXGEEKIm13Rt/nTE3pKWA7i1NFdVQKQ0CNdqEsBkjiuM41dd5rIbR4DMnoDva07v1esxYBGU4JWJUJQyejYbI9p7pqjrpHZUNlz2exX1lTAks+WxY6CExoPlSlNNv6AIsE0VdPmHOj4m0a8bigDelTpIL1WoePLhblmhRlkPDKiZvkzz6eG8vLeJjCGJL1+VFa4QREBVyuhcpZm1ygJm9kuQ+8v4yEMw0VO+TKee6sMFRVc/kS4IirJupnw48LoR2aRk+GuDBZ25xnKFxdSYqZqvWlEcemsbzl7wvQg5z2xKxEUsquyGziyzd/X+XFl/ct9KRLzyyb6ComIL8Wam9x6LPNZXvhO0QQZmQ8T2MFjmRJ42WyRzfyLGkJKft94uO0Yy6Fflo3AoIEon3XBygpi3Je932ToU5EKoikvqkeLFACpsBN5dseemiMdHxOJKrVJDdTS0qCcTzPCyz506oyENFdelskwdghmUnWyXK2WeJX2CBXudNUBON/i8kMdtJm52REvmGqVmxe5aricuTCGLbgZtYvigT++E7xltEh/ZgUoMP+d8vaPU/HdhZaUjsgQ8OoqZeezvNR2JFm2on+IliVyYQ/58LmZ2stgKoBbs4SllwiTpNRw7ecL2WR8bbg05aTN00C8aGWtReWSsYsirJ0K0I97flI2gJRRN717wESryWahXUAFZAdyD08j9SIZQm+wq5GkoUkK5cQ3wk1x01x4fKLPgPIj6D6lZiylqvWGtl6KxCfoSQXlNZIHeDsrIRqhINxdrCinM0iMMkveNxhqrEzhnBn8F6nXVY5zUDLzOXpp338I2HycFa2pueObEof3HQgFEMnHS3/CDKwJAyYl3HyA4X5vXUE8MMa79gYELseTf0IEUJRsfSa873vl6n29lFq+GCqF1I+mB5PSyLFvgHv6hG5Hd14PAHTKhY+xzCgOwwRZxygPwNET0UiO9ynH0p3j7GAFEs+VSjl4ArhHJbySohRLfm6B7FxxYJLJxJlQr5UdD+5Vs0nM6CehSZZNYw4FzcpYoL6nS+wGGSNKLVLXgbgvzAbT4B1J4GMS16IKMlo5S/dzM/NM4NI+a1Fuk4qwaewoHqGp78vgp+SkuhLyAVhI2Or50Id4LlHwRon9o7JT3D2pibchFvFi2VTEx6cLX/qorW2YGSSmnu9+M8teW9DIRH1TfabuDIuLk16NFz3kNr5QLPGAd0JzN2IYFA140yqfi9LfBcZI3aUK/Gt2bfMMk8eqttN8c92OmUYKUaHbB9C9cpEwaOYs49MztuGtI0VMqDDHN8HiRP55BpRIJtIWbSyi0/LOC94XhzqGVyuzaVaBfg0f++sV8wy7ytxlQYA9w1ejE0XaCkpM9zbOrymf4OrEaIyQX84Z9e6wQ1czIvOihnSaq/fcFdkxJcMzE2kWcARwWT1U80dW6B+v6HdclWMyMWLYr49iKWrhm7o1yumJKxVGiv1Rx3Tw61jrh+vuNjikpFRxa0F9G7ZWs57nuhaIeT8ZRjYzuyq4WZBEXs4CyfvmZxGcS4/G2aWon2O/UkjqrfdbBUF0yavSPdNJacaaZxFQNejGDPK7SCF82XxiahbNpwFs/t07gbCJkDUvvKjqaYv1SNJBa21RKsOuGJNKO/F6HTjc1Q5t8lqLL4e83gWTT4aubYGtE+D4e9zdPPo2R3dvG7bDrCQosp62YhTaV3B/kEQGqtzvu59fbgA6lFyGe7urhYr3TWCBFYBmrEpB78fWnXUEd1z0LSzMcWL6vuh4CJYR0tg1jX4H0wkw9mkbM07MXopLJ2Rt7/aL3Hl3MjO8h/1lqNlK74QTbgkurmgd23XflEcMhjO52Y/Wsz+CqwkBCDN8SUcd0hvJ6srikURdDKw75ZZMyms8NdzvzfsXreeCzpVaPKbkgWo0BlD+qWqaXziVa7YTSezNkCD1UBphMwE3IFwG3+Oja0AILbwR+VMjirrIkRPt+DMtp+OKLpkiE15AVv3jn19brZGZkhhAsuT2sTiWSjLvxJkMICAGdQY6CcJ1bmQsycrXCCxoxrME8B5k7aYQkl31h4kmnvmUA1Uo5bGEJkzebQNuMeVIRwKr7shM3Y3iowzuO8Jm833ALhjeDbR9i+ajGdiv5nuQcBDW0PZ0CB/GHvnmE702e3iEmWKin/StmkbfvsVh9mXnjLzZCRfht3g5Fu6OpDSsq1DSVUie4hNThGTSTWkOhTKbARv54Bxp1m/BqW0CfvfUJMQYci+HzQBrAw7lHJI8klNzq1wbwtxf0zzTFIpYQcsU3ddDWDMuciKmN+BHJ47B6FkgX4uR5QSWzLqgN2wQK1aLp2hgMJGqMII4rLK56VcDk89QQhw6cy8PCM19olNpuDwdrQFvP+77wiyyKx8Z4MVJNxV5vJWOwvF+aDouZMW5HNno5d960qcPPO89qYm6Zh6UO7MyFx272aWYtu/0+UZ6eThOP3s/uMGRarrYNGVN2bkl0VbM7ZArP2AnCQLuPoIbkry4nTS/RsIdFmPg98zeYI4R0RY41FQsBym1OXnJcHtmKPjfEXuujVQGfCPrCZsaT+vFbMFWIvUy7OxquIvdi2DVp3+q3E3NGG06d/cz77wgHGWrfcy5LJIzCMZHkk6m2QnZCXYVXwMsVhJI9nJcgG/CrU5lgDb/DlVEsXG06BHIuqVfnTyLdAQZYmJlEEk43pdgF69V12XC+sB9W5Tfm3jPwiHn/VmGszkYx+Er49CLbyk3hDBSKuzDj+nzCo77ZO40EIP4ZROdSwWlf5S8wfYcAzjNdj/aZ8uknw3tur126RfCzMA+cUo5mPaZL9cVp33X0mRTUIS2vgtwDRgsSSX5xcJUWR8gZbdeqyqQEEAeDu3+BMlrgYP2SH/le2u1yfVFn5JX9VQ04X9mmABR/KOd3rAYqR+OQwLWao9MXVS1y+0OKo0FlXuirKuPaY1BQbY3Vo05Gf/+N+u4rDcFBQqiCrYhgRAEjvVW9eNCaOsukcJWEaDuo/pWCYGJLadm4ssTCPvVVEJNBfVXAcTIxH4EFtWFMJUy5of50QNXNZBl+oRuFIkdbt04DeU6j2A3vzzP+IkMahLD6zBVJv+xRBIc5fODvnJMmJRMI8kcyMFqxpeWZAHxC68tGFNyl6yyGN95SwNYXwDSIQCPlL9bzjZaWNWvs5puiP2lbEBlDw5vCHtVmb/sD8QBgOhRassChwM5o5g4lhlD4u86wmdmVmhmEXnCyLeQJ0rRtqYIWRhg72ieDnqmPvOkDTWtKR38TeJwrK/7IRYfbNspygrU6yV9YtJyw3I3uEkDgbPrpcNUpISYvzv3beFg3ZN+swedqf3IVKkcdiAezu/KpHGHPyvX9oT6qzTS342/DenW9ctM197UfFl4rk21KxSma1KnLIWlGGasMF4+G3dxTnqBscul4CqNda6Qy8ita7HCzKlYa86yljm+HQA2B5ArJoZy4LNxeT9izFuQhEoEhUTNJQj2pCc/O44h8GpQX6XgpaAvAQJLVNq0yXGFbzb3O54XQ6sm557+lT3A+VWPyCJn1MLbsssHIdFhJcMtBFQYi0bS+exQ4Rq74xNE2CIRSzi3nj5TNy2AoO0gdyBC0/2iH67UB581jmM92OHqgD4EzAzyxDauPnlIdZu0nWwB4dtxWN+meq/faIuQpK2hoRP/ULwIJ9r3xyxtXxfFwJ3YquXldSEnxoPiYD85u0OAHvKOG6+3eBraUiOgvdfp1EjiroeSLLFutuPPV9XqhAReYPaRy87OAkV5tzSqvyfufCvOMTtkpxApWsJ9n+cNM2uBWu4lj1oDjGasCfCt6cfgCzh6UbZanbL/qCgf/iHjKYaavIiRLJrU2BuzdsP97XHkXLYbbfsHVTlXSohKOXOJ+3LiR6ix9UFLo9qieejYk+P4e5wC64jGQLSxJzYt3cErx1Rtc2+xlJaEBynLN4hLl/qOrgBM7a+yswC0Mh2OieA4SR6MfM9WK/FOWbVyoUBIUAKOhhIZp2LOgukk0/DInn7sF7dRP6Nw77MaAcYg6k0gdjQN9/1wtGVSBm+6LwkI+xfcK9l+JiWepXul+/EEdV7XXp/9lUsW4RQmIkda9H38FJj3EYJTrG4hEU9YWtNd2lKI1683cXFVzSMkh+2nuu9K0JUBoAnrYkKVZpAKF9G7y5n/KMZrP2xPuUFSOaruqriffSEX9Euj/k5dgewEyQCFTif83LhkIjt5qJ1LyI4ynIznWl1SoAdecEp+I5WmKBB2fr5yw33NX94q6HIP0jW3Np2E0r1f7fUjqdxV+iCRULU+yAwPXFvTL7HqfFLj+wCfIbOg+nsW03rGTf1haLvAZA/nC52pSDnC4f0qOiA6WtK20BldZUaA6GO3m5ZOCGyemGK4a12hM3BXnbladA/yTRV+pH7IiT/9WOijGGNXzV+K4wmdmRjU3It+QwUCRat2mGkEHhOcQY06pWeQqBGjHkWcceX8/drkk+tYysHMXVk8hLhLGjUVgivK1Ra4K+RtUcZO5fkVkWQ4W8fyo2tafhGEDSsflUH7yj8wsATBE9YpskR+r7Ac8xqdxtEAfRioGXSprjbLI2DAZZz9HAYR7rUHzvh/UPpFvrLbd/hFf7sF3RimWNpiGsQRZ11RqfZkck9IJu/FPU2DYr/HWUdskJHuLufXCvDbKn0F9sM31Hn3zIuAMTUc+tQsO9ll6jnNnW9Ulo7d32jEQMqJIrWQL5+Se0a8lKRp+XhYp4IfyUaTRC58vFEjKupeFEpU4EOp1AjeALc7vZV0ovza8QSl3ru6xFpY0/ckElMOChkhLWSDHLCKaFK/qC/SIfT50GJZnkCr5SgXZRddXq8Gc6XNjIzSdCF+9YlUFKMiri/sn1Gp/dEMhARah97GidLqitLNBlF+H8XoQmdrM3GXBSCN6izNn2ON0OzpCxOuM917OZCw2ZC0DSvNuTOFCGGYf1TYgUbgK2KKc4zm/25dz3GhVpFqs6x4yhZBbiy/6FD1vXW/aIcDiSUoIhwrUtxuGGZijb47Jz8JfUTblzx4eNPbXeYpygkQo1xXonjeouTuJvAH/zH+FK50zOLAtbN9AO6xjfX09CsjKitMVlHWmmQybLoBHBPkC5IbAZxvs3cH1VAcy2X90WL6y/0SXNsGeLBdr1OWVuYg+/wUNiR7QnP2ec7jNrZZOosT6Olwn02Dh6zSwKoDnMFLfk7lBO0p9mWjex7gEFXNfxFO19qmaoISUZEgdTuy7sHgrD/36o3XeFdzLFoFnOJa4yaENBXdTSmVZacz+5IGdVkEgjQt/TxuhNGHGtQuzNDfM4iNZ28Ly9S9WkUGMNAfDRLr4ipZkJxUA6HnlOi4Yb04/Ze8rB+HEXpDGC5Jpr4fN62LQh8o6kxknE1P5/rNmz43jehFlRUvCyNi3Y5St7lC7a2ogCt3Za6M7AshQdbVV2+R2DuuiLEJz0MLhnn/1/F2Z2U3h560PrnhR0Gc/5GW5DwO/DGrR/4PvL046BKjUp1lfrtKfE4osRTS9/oB0GrNW3cYgvhU8ld61sHhKOf4P94t4n7h9zdRXDaFv4ORPHokkY+NA9QA49RmsGMfJLu1/RXuluq0J4fsUUBoa9dL9T0yDJXvGtuoln8aYrNzoapa7E8cR73/wX6KwBPpwCUUlxsBtOj0rnca7zu5FqJC5W0U8Yt529SAI0S6nmWnS8zguQLRzf/gRLaqSQ6E9T6Q84u1cs56dzBMv2eBG+zAKw2V0x1NJX1gC8M2MYZpScdXEKPG1442UFWTEUlkM9OjbR4FurtJNV4IqEu1htlgltESO0SeZMHZ1JM7bNtYegevwPSCmW+S8uEGj7FTSSV0HbDg1rOnt4Ws8DxqN2T/HOXNd5NGboZ8VTSD6g6rLWcoWOwsyeG08GPG6KHPiLRunEdTPNmY74ObRGT1VCHP7nmBYmjnH+kqK6rDyrEoNjdqc8uG8yZrHWBXU9weqD5rpQ6S/annq7P/GiYepA2ZDdJA/GbdxpHYatPgkXt5sop564gVHZamW6cq/cdADaLCXWt1WgK7y11WaQR90YOen8BECQ56pmJbLvzzfWBhUUJP+dAEEK4o4wZv2+IBAFEdNkNF3mKntsLE5PDLA/IEiV0rziyORzLJsoxRMCQV/HlpCkXsaizcHT/vxU9iadf2hOkKehGum3973fFs7uRlqxz/oDerFL0617PqG+VYIxjeRb2IRLZJGH8vp8ITzF7U7HUg8Crs3WpVY5r8wxn8tzGvUUwY5csVu15Vmm1xcs0UL/lUCkrOXdLtlaa4pHLeQgpd/vu1ZzjMOcgzfQaIwiZK+fMZjRLAHUf83TSCOkovb3xPkD0jElmb4TBqFrwn8G4KWr+RM58qhCnlVimQ390m8YLz+fNHbBRDs7GJgHSK+v5Z9cwZq4glnR2eTjnqTy8Wo7BEg24CL/RT1AKzOIE7muo8oegzn8R6qab08LzTcbb0ippsScfjQoJhsr4jKG2pMVczpCYqptZcGD5rxTHFbL3+NDnEUptRMyARhF2FMiM7pgaB/IpAna1AHa5EPt7oBdzMGg7kOdSOpxrPXbdP3l/+QCfCLMpCsxFd3VAxA/IPVvK8JaenCYCadhyZ6rJeGxTUh11+OOAjrXIJxb/EbIy8rv6h7hywPp9ZhPCcgt9BN808JhGIaKwtL85jO5nipQyAF690xJ9A2DMuCx55TSG88fN6rqBMYDI+I+DtFmoAqJB27B/xxN9xMLnQwLcLCHOx4GIFCq3/6i7gwJePjoG/HKNb0XjhuEQmYFzTgtt/uIo1bBX4C+y1jrb+R0mRj+RyaDkRus8W4WW73qbcjpjIh2tGUY6KJyhEaKiK+LHG5euQeYZO4zXoKbZOWiJTvJNNVrWugpXkIIIE4zK/g4JKATQjtaC1qbJ6khaJHxOTS2goU5zGyjmaPKvVPrBh27E7E2iZ/6omwpBARV/9EKeU1m4Msz8Q7y3MzEF0C8VIIqAxB+Fk8qG970lhV/ZIX6CsxiHqybemqil3Qv/cWKm96fPoMJWSA1dcF03dSwSyNMdvKKBCYVYLuqr2pISKPaNRJJw2R43RNE6avh/TNA1tGJ/ilW/e4LbOvIh7cS2OsbjyXcD6WS0DYaDa+og0lSxehZQiDSt2fVdtF+DO7/cEUAM3uju47Fl17rUPkRPaheA+6/jpSYK5Nh6rSwO8Pbi1y4/L0L5SStva0NcscpH0pw/3Y9+Eqw1SDVvRn2r2d8vRC6YhQywdhKWraKGBMILqjiU2l5d3jb1tnQIwi95QiTJW7MAjJD4Plr9FGRGlM4NQyAiG8wSAKUbRCpmxE+zk9YhXjiC/Rbt983pV0VzovJW+90dH65IOb2VS+Wk+MpsRgZ86uEuxeGPyB++07HlAwqFjq0sm5Lvom/rcHSaLduJrDdabujYJRWbbY2QZptvGwTHAiaqsAafE9NQa2oq6hV8+E2YRbdEcrirxyx9JVWpti7CsFfA/egMevH0MR40/X1jQzMYbw6mr01MI833RiE3EuU79cpspC8tuN6QxFB7ExHF8yrFQ4vRniEkTgKc8kT2tC2HgNJJ+l/FwYXky6qbHj1cMtBGVOw3SFMHn5l5odYVrLqhL6R4DujKq/CEsEj742QjUogvrSb9DOh1Mm5Z7n6MI+YHii3bWp2abi25FJIiX3GM/137MQVr4wwQ5IQETnYx0CoXX1nLeqLjQ2VlOulhy58iVxN5d0Q2TEV6MPr+wA6lluGEC5890db42elDUvTbbMcjHGrT7WA4eEhNLqVT35NhLruSPkwg1UCAUz94Dj23i6dqS1MPh40Oyi0W+wfoWYXIw+siweU3qKdQM/IWLUwDjgMQuiK+CTyRgR/Cg+XmfazCLiF1JChK7C2x+ROCl4t2WjYngGRxBWRQqqrNqx1EesLx8Z8GOimBJK3Ip3O0TWp1z6fhibUBvCtBpCBH7Wz0MrsYEtW/6gd/rLbB2IcMxOrxgW5u+/ZBOjd+9Zg9SRf7ln5tqXgM7wZE2rj4u7BOezWvuyca2TpJkQOR8U/bR+LRjmN6RAS7MCfYSPtJWSbZYnQL8vGmJb39SyiYiER2Via1nlShjJEe3JgCwTOTiIQJ5h+NQeEs7qWkpIDJiQHb7VwcR7T1gLGhKAqUT5DPO5zvGPny/DOh+Lo+Xhxf5wTkF5p5yY0vM1gw2UZQ2nhCedQ+PBxACaAeuBYTyBs9aNWvYATPBLUtXJ3H/+rMIUQ3Xz5MJKdV6OhLEEK73rb9hfjPlA0gKO4j120U6VHh4AJvL3WqjaY/KCbwpCzUCADZmnJdpD4p4U5ry6/YuhcWXcVV4dFm5J8qADBWw9jPITjUtkf0lhIJkzhXLTcXQBZaaunvCCxyWh6ifYzNTTCGJcUD6DyfGam2zj4qdBy7DwBaL2S2IxicF7F2ubPDvx0+DEQVydAIF4Utn+/niyxDQpGlaaG5eRQcfYEHaZeHBOfZ8x6KnSsZnB8YZbLVBcEF3Mv/87cj4r/BYDYAaUWrrm/rWPImSVpvPlB3xQvVG305B+bCj4kIW4ZWzFnX7/nApDibPZxncAV04laDsD872g54z55DZylkUKHXF7Y5iFwsc0HDovYpJ1P+XIAb4pKZnw/e2BrTZn6jCeAAvAt6Z8EdXqS/KoRwK37xhZL7w17n2PYpqnoCtRAvnU/CocUq+el+PFEwM2GkhLBAJXvVbqxBMfPWlA8XMNY1+dfsV9Uy0C+WgSzcXw/ylN23DlELK9DPZ1nzFCvyDWygh1ABv0LXhuVuDEraYOrX0J/NpbYoxjl/mfncXN1DorfumMjOo/dWEk/OvdZ8w/66CtISpGM2htGRpT929qEz+kRM+2XpAqcSS9GOrLWVVUVIm3Ez/yIqAWm019Td/ytbE6eeYJaY+mJpelcp0h+4Y1hmcF9J6cZQEJi7foY8n1psVTCzE0QYMX+ScYxKxb/bU9eproUaSNTxHeNhomtba4y/CfLAZYXndn5ndeIjFIsRWRpwX3HwrIsKxRgd52tRs/iun5uy44w8u2wZgayiPbOTWGXUn/BDqak5EZebXbdQHyE0yEhUO5HcDnE6xlAuZFDSKLDTTZz9bWcfe1wy8KhSOwh15cBRibt+faUQgl7/5na6Nl5d1o7iUWTjOhjQa4z2Pha1PNGSn0hZFeICMKGtHJ6EGQbB+HF6+M2e8YSQjJ2cnG2SVpdzXlnkzxYqwXv0s0WM8nggSh7Viq5joXNiF3RJ0A9637p1HFJd2I7GrQ4ZTOWRi8jcZaL/25Pox9feMT7VDPV6TT++0Ri3a1aLS8IABZh2dWfxnBmXDWPdvrxmBiF3eePVqd2ZM5bI9YAN23/3qVLElDeD61xvgRdjkXkl2tqif3zsX1gGp9mzEm6suh1kWL75XC2kXlrCreiNi2pfI+iWVFJDXPd3MBNp7VSAZRp1jpt3ug1pQEM470lZXwotpDljklvGxuNeKwTuKNJw0EK74nc0d851QXL9P4pxZdM7pkmbA7IU2S2Xa/AJRP2VOz3Kyp9oW6FgoQi4noNkoHeNnprbQod8n+dQSSbMzNRZIuL/riHaxoOHkaGYwROCZwqcbK1tUnU2Qt1J+3UTvklj6wOD/d8lrZG7ucjZiCyHxK5XVtzq9lDJ4N1FvARCTUfnLeOLc5bmrtGvb8mmsr0lDDyR5607k41wzglZH1fExfmsXrEjiNLSzSKGb7FVusl07/BgeCclDsQkds2G654GVeUpX7UHaqQBEmJsIyvfxvz85+WyRaoYuQfSH9WpJLeUoXpUt7+Crnl1Jqz+eARyCmzL59OUUBwBuoQAl5VddIrfG6xvDA/RZBOV5AfwjOrJ2xRo4N42rCSFCcnOY7xfewl6tVLetiM2tGLqRLc9k/owyHriX1A9BnluzfDc5xdEUKyuwzWPG+tZGNDV0WLl1JyHPflzcBpj92G0AR0lGaMSZuKui5/LUMn69X9wPKc6FVkNEHEjHjQKPQjuFCokjN+N/6DlMscpE48IhHIa0Ghrc36GwGEiPRymXWKD/di92yfjZjDM3fdHBdwSxJRSBVKHSwh6Ey1/zWZRZ4kk+KMS8HuroIw1UPa+PDVpsSIKvmqZnZisbfHFWNW/dl9n5+wM4VIzhmrETz3k9WU3s+z84SHh2f7dGT/G5WvoisBYAgwm+pqFS0A8xyhy4PiKfgS+6TgnQD5hDEerpzgFSaMcw3yvDZ0+xfL0yznf0uY8N6APiqHdoJZOWqTPnTIbeBLc5dvFdh+mvD+sDtl8BAWzYR7QkSgnx30Ru7TH5a/g4byacurCNvG0lTgpkj9w42uqBp1zMsKr2riOCQwfCRKkuSX9CGADOYGqCHh1JUsk6RwvI9OvM9fCJoL7Sap8NUQ7mAvdB2ougA01NdqxVo8NeGta0R9C7QybiN4uAtDxw2zLTG9+0we68JkqZrj9tJilUV/f4wOLc83GfstXOVF2bAJ6zf56YworQQEDj6QnC+lqyMkGAr0QuAikm0jqS7fy9bYSBz5hekPILc94b8aUau3Kt69QI1kFEmcb19aFQA4bSegA9/hFi61RDIVQ7iOBqViYdGaK8d3zH5qWIjed0hR9e6o4zELdXWhOVOcPCmZIYYXvgUsAyGUoCszsCiTdwOaPEL2kRnYh0mNSZGb6/kr8XfbyUdbEZ7mDBYy0yTDxhkrpIoJmVutN6FHk/E4cTEolaGnv7x+QxQIKZus8IEygpdtBDxj+lC5M6HaJ313pLDYbjpCA+oYl11ISRJ/fB2oIdDBHFLefQmF1uHk7vtSmIyI7Q9HG0qxu8QRWecP8ipKR1o4bGrAhR2KcGEDE6k8r2F7N9lNUZCswXi/EXaOlPb9fdsaw1Sspku1xrmyADIImEs//XiPqI3Jl8BlrsHf1mAVCBmlqE7usMbDEpilt45ia5CXzVqlIZ95Fesu48LEATS3dyXVEjwQAqVbFBttbLfXvX4LhaGKv6P3XBsKWvqEFfq1rPYdohHtQH03ehlVMpZ/BRCBFV6dffGCrIa7OngRAbORd6wsIcR/gQSxhfrfHFmb9Ws3Pk/SikwIvAIYljNbXbvIpKTROSiPcmBDp4hxLkrjR+MfBFZLV5I4usLY6WYmjhT2kzW9XAxxLYCELLIf6lg6p/GFgpoRTm+yQ6PYtmKVvdTHyBxv28y3vTiy+reYBZqmC7x0TDasiMCcA+TxdKgDY4s61MpZyI1+RUzeMfx1qh9MBXg1tI/HSKpcUj7+qTrwp35J3ezefo6UZiEWMPBtx0/tJyaej7NUmUHVRBJfB1q0bsw4yHfui2ZOPNh/6R2/I0j09t9QGeRxpuJzB6DNbaPTOmER6WTXYEGXq7DhzkvCP247uSz6r7MfaasDs419fVF4RAt4XoxkFRmk3sjrhpNSeuDoG5RpjE4pI3rH/ESPaF6RIIJBiAbVU/ct/nKrDmBQPBYlNob0WmW07GhOvvz0m/BXTsPB8qA8Iesm6PsDuOLEEm5+jbniDFyXfndwIXHgWBB1GCyGV52MU+5iXguncQS8T+WyxaPDqCCXMjwPJxGObdF8mBkG2+SpqaBQkeN+1IL8Cbb72d3ySQUR/uO+N9v36KAiKVEPx8EERU0vfKi53JWN50+LSYqgHmF0UrnnHCNpcwfX8ezokGL4sK/rgFZlXnIqg6a8EJh7DfMOwMgTwRjjZ+TrXsj7SA6EaMRroFgxXRIOGDPYZgkadllrCosfuVZqNQwAY1cDJzuD4ocR7PgZYXbCA3g9Jd1PRx7PyRTNad56qFMVIv/9AYYd32opL/KQOuEa2LIoyMUHWsHVeJEgDnTAizkdfigKSmZVUDrztoGXA+B+9B+MYT2q5BETXJUKRLiEw3upTpXnlh7hkEk8/0D3rV1lUxxSlnDzLfFArxdnXRhBNu085RxiTwTISjItGPuj0MQknBfLTi9AeLTT9QUKRG7bxHm7P2Kei6fVAeNBP31q/OVsTuBJZfKaxLodsCxObxFdyJNLV2tAt+2SCAO5/VWcDOd7Or0wzbVGwbXJr73+/PYn3VfNQ4CSxdqgXNPWDqh9ZFVRQbSeb+bFmOpdkO7C70y6dTSHVuHlIY33/KV1QHDJ226atG4ltS4fk0ZNDrmPZ2Lps6qyMYO+Wkmsyw/ECuxfXcZ0zM7vmLjkk/LsX/XG0vaL3KZb2C51I5TVf8fBJmMxHHzKvaXDwSTGiya0f8ZZ3olqbqcd2cjXM0jicXlX0cJsaB81POyuItwEiYZwsHn4gymrnlD0mfAro2YoSC7KxDdL1DQVO+0a7fN1fLkv8ElaXx46Z8EGJ/W6akIr6uEuiFIQB9fHujgNzIzAgaDEYVITJJO5XQkyimdgaTBvra1hUbw4jb8imqVpd7G9dSoQVNPatqBlbm7NLsdI/einfpw6HdFlo9bpLb/wBxf2BGK/YWhn6LhzEvBuRuBZJTDv7HV9WfnA2SyT3HV/F6f+23aOYC8rxO7QQ1FI4/0m/OAHdCwYedzx6F6TIlSh668B+Id3ZxNP3V+Z82Tt/AHYSzDsxyYC8mxyk+Za4Q6u8y70AKpUm1NPP2WMeSHfqCc5mUcG67RR+sJWZg7P5iG4FPnFmWKv1nwwk+fM0IIA5p7xmHnj1zbj89sN0hc81tzI6enBjIyPd6P5GXzsmp9IRHKS506SAEK7IxfjQLxkNK1x+M8YAYLrD1qWXqo03kTvXgYllmtbguZX1FQGpXYjbZzgqSLxcXTKqQ/GhYqBJzZtvPaYGODBTozt0Rw6/vP+hTUJGOAYcEWWr5Mqy4792lLWmElkf2k2HiF5268DSkEL2oQl+VXl2NXgbfa8xxQoI7lpuNkURcA/pNz/go3LD+w41q4eQy20ecjCwekr0XfODump0XPUm2vvNfk4P/tAVA2PLhl21zoFOrSKjd6D1AiMtz/f41uWlBWCDDY4tDRMhyGsls4GW7P8b0/dGx6VTgC6oCCWxMyJyOgl5RPaFDE/EzGGGL9XUm5X9L3crn0DvEELm/Vx6HwlGWtnfZK7dA8/zJkr9b7PBgLeFlmXyfUBxZHF8kxgW5tcxvkEz0roS70jNLvk3QNCTUIwCHnqk5NRDEaewDCzjTR5lKzNzx1RHHJNiZZJ0lXrAsSM03iKPyYNdJfMwUAvRlKP49yIx7XS9cvseBWVvGNAc2I0PmR6Xc9KjqauqjgG/Q8i16OIPtQ2Ll3qDkunTNq2O65AEFG5qycHaB2/159N4n67iMEpyNowNdkq/ZlDxsX4dRKNvBUJaYqhID70qa2Rgq8+AzqTaJhuYrqrDDO1n/0rWggrBcFsYwo7ujJZblKGamFf+3B5MTAXNUOKn5PW91Gx56gtqTqz1dYMML1dFR/KZUZom7Wky7v9EfKnYbBseAvDuBFBFFCuXnhvWc/JS4ipUIe59Ls/kL+W5lteo1xt5bkJYfug17vGw6cqrOjTG4nQXZ+RbEDCMTf5JZ4DBcuVv+tGPyucc3B6R9NMF/lc4ubulrqcBPhRUjGBILbQ+4uBJ9eUHMAj2ijfMskRMLcV5FdgqIWhiEvxNVlZSRrzTzySfBUjZHCJQtbgDZ8nRWLwk6rQKWD5aSHuJh0vBgvlNTP+a4P7p59l0FYBPtoNpiFl/dOo05KHesQCueTxj7IB6io9sqTWxTu2PK2C3ACiXWNyxs52441hxg3eco87pSRV1NUvQeac35o3tgUpXtmtl2yHh3QO1mQ55wSqIri3PtVxJ57l0nOuyav/0ixzLEq3QlLZmLb8Y2JVlrdQMjhpcC1j0DS+VHrYIB4JgyXacVu9PCRoC5Y2+p8qfeJA3OFreaabxWxz5omyn/l55+ufQkO5e9iODCdLWl2crwLrUpaMCi8EUcVXGb3Z8oBCUdwuuohn1sivwQp1O+DaRFYXIbHQibdPfq4dU8WeiYJ4WKMlNEuQr/BRIGwOrAIM3Ppjmzvh27Lyx6xK14sUHgNy2ggNG57CBbXznFP/0NVrUQef5mMdso3AJ33SJxInqYebzcZ2pEVYHYczXE/+mcptBHb4ANtGohwQabL1xmFHav/wFH/al8TKjzGnYiFLEifJHL7OJD0x/rtzWuCrDToEWPBNtRKXFZqz/kBH6gsxzy/TUzP6R+C/A456FbGm8soK/uYyafgNmX0re6fgXeehUvtDCXdAUJElJt7AMv+VMdIrrOK7TAaHo6E8Khx1rq48yOqMqtC08so9cQh/AV760CiEtSm6PBL7JKCZBV4m7t8Gbbc4TQRawpuwTFyS/vt1JBnAQUBDPdEddlJlVAfbGy+OKkohOw9BB/JY9rDZQK1o/kpfl82umHijUnj0gVqhJCsrzUxYl+ygkRPDEPZqUIo/+AtsGplmBSxL8bUE1iBc8lCtShF2iqMC1DdHIH1DcucbSNtxOF9LY4IMng4T9eTYzDr+gnOPVxWBYMambJUexTzxyvFOneFg3r4FBEHqG3QZRgnKISYUQKv9B23A8vhFRe8uNZpBtiMtXqOQlVEbO/HzkRbqVaGj4s2XRVlhO+ewkvEaTp4pNLXG1OVF6ncxf3Fq94KmGuG29LLsFI1fuX35J0TsRNGo+TCioyTrXLVEjPztNVQL1/q5tGSrMPhfJEaQxHcrnqhVVqN1gfF+JK9Pgcud/lGa+Ig7eKQpJuUN+PYhBYQ/b6ahi4nLNe5+d8rQlfK/gl3OQ3WDGWuUMOt1YlBKoX+99JWlZr6tTAVgDF0NSHs5fqbU0euO7cXKnvVB3taBFHP6/KKZCBfGqzNo6DgZgiAELh1EYOni64dmOWUuwAQCKu+L8tnTFLlL6uKkaNtO8YGlOBVU9mQFYx4aGPgGEI/HTycxYXBClfKbmSErtcsuhalOh73FnzRz/thPjvRJcRwPtZmCHs1nYjivLMWWGprl4fRUOlrCDiwNU+9TZuaVsuCxj/4DzKfcla139igH7Z+0uskWkEq/c0mrsRLlVpl8ln0G77hwK9rLKc+RLeI6KLKy3Um5C6Of3qiKNoY/7ad3EFvdP4VICsuTMTii/bee9efmKAiym0A+l3hS7SofuEJ46In7BEO+Kf597wnd6s5mL1d5zNRBdOEmfNKyPdUuCW3u/SfFQes7nYlfV/B1DOE9p/pmgK+bx+eZdZUMu44uBGlaPvej5wxU9aumiyt/uCCZ4PyO0OYfFAMMqTaYcI8GxYeHO/3tDJsJisLleLpS/gvPLbEksIm3R4OCJ21S4P//uyzQ4EJZyYmWZjtknKJbz0vFEi0zDWnZHl4kvpMSPlVI8cEAG5r0JoNN59joEsMhUcPZ1YtIDYX9cnR711x6SQEnBGgTz6d3b1iebIdotlgqE03w87xlD0+qEykcVizaOB3Z+ocaMGWybZTIdpR4niV9mDm65EzKK8VQq59iMlABk54A7zAlMdkYNmaRuWJN+bLJ7RqEZf8vrpM0+3cwD0NctuwJJA13JIJVFlPStNIXzAW4pp1OnTx3rMZQfF+o4p92WDkF2tx1MUdC14Er9l1RlYsEYnOubj2IotL4tkgKwnE219ZsjXb8PJFkzakaWhRBJAkgbR6myiYFsJgC/lellsN9g1ML0j4HX4rwIzHbq20FDkBdfqN9SUnIbJf0QQr+QxHx4f0kRekXaqKZYUXYMbRKa6OObLPOaKGft7xFAgT2pHuSw7kdfloER91zsJPWQJbkAzyDFkkgUg80kW7n7n+WBN3CMXA3lU6QR23Ipx/98577h2OGkpcp5YiTX/TikBkcza+iwBGNBi/j+GwW8tGbKxpiSNEQqUDdqfscbVMQ+OSYGoeQKSLwREfUGDjR/emc+ZAJsy3sraTZkpHFZAI69dwO1dvsOw/Q+O/2lgghmEsk6NKzmfI+OYuOG2UoagP9Le/y9UABk4VHk54+6fW891qe1yVDT2KUc5hNeePBaQwVb5BQYPt/+2xEpqsHC4GY37hXyRSGvfwYa7DGUDbMKd8vud28h67mpOl7fe4uFRe/HOKf3TFs+9RX+QpL0+C2b4R/8VfkUQOABt4tcaDV34nU/UFXBUDvPYMYe0F24AZPIWphY9bLwt+tWvmuWwhvAgPN1rxvo3hpXvQNSPsVKgFUKENrmSCjWPYCUoQfJFpepI6oqpsVwJt6IlBFGO4soABNOS2KtnF9P7E9sSLK1WWOdGvYNhxKO5/D5ACMSM3oLy6XvjzPe57hP26DKKsIbhLZqcz8tJOcm1zlVKV87cVqDh5iOgGkNIKp7JU8eBp4VRPvv6peu3DR+ROhro3GOnpo6Cdltkq395hUi+pDXzwcONA2YjC4BKvX3JGZi77wJboSzwwPelRCe5297Gau3hHdjkNfDMaoCdfo4BX1IthlFNEHUm2nTsuiPe/rOux7FSlxIwT09NqnvyBmWQYcleqlPEreuoCZRFvXL07v84AxlxNdJM/atDmCjpmzumIoYOf4uVqV/8ZnSwV78WW0S0R7AwI0EDq4B6IaI6AUBwPrNLY0eeSw24zQ6qVAgBGW5aK79Mg+Skj4XxdPl8axMl4x6nwmnAfEBIju1ssp4yr/gdi9kl+ScGW3r5NVqJ1fXRkW9O0A6JBottvWGypQioSH2C46bepNpt5dXRK28XY0hseEnW9fDBaUMHziavWy8Q7jttulrsjOd5WunqGz20rPiwX/3fdKuQgv0g4CDqGBMamo9htCyKqN0qTOxWP5MmZG0lur+eIMwtcrfYqJujT19J3dps8mrCySt1MRdmlNIykG8cIMszw/nMlRV1DmpxNn2zf3gflXm1sXSH00EqrICj29dnyNSbIteQOqjPLqBf2QDDVVCAgcCz7vER9m5X4XkTIeB4ppqaFa2UHE05QSkAhs7FkyPf40UFGlKG8GnrdKq0ZLUk9m5jleTBwhdDsYP8HCDKRE6LS48qLHD4pvSl3XFvmH8KBEmyeyNwwJzAJQd8MqhmKsdandB6Ec1bHOw8agmVGP/vvY2C60X8AnR2r2HhdkUbclW9+ozjmxmipA1AJIZnqxg4aa1Le0RHfU2vkpf68y/rFMYgCXue7eNqxoS0NkOw9a9/WcDFJOh0Grb8zYjPgaSDENIFMCM0H5OlIqq2r2FKGkaQSMzVm87r9L7fysa4xxVMD0h7CIExLBVbCe1/r/WavK3yPhHVe3XBjyVTDOqI4/90N/Cm5KnqxFrVYOHbwMIXa3GwNwVME+38OpXvNwD6l+jN8BDCRDEjGDFC+WObTdm+5/tfm0QeEfVUYFtA7gTobiCnl8rywroMyBHNClofz+W7OhssrGuos+fRhh8kBA+Ni0fYdhKK+qCZaY0LUDpn17UUKCX6dOZccCYzSsD2iSQP74pFnhlkOzACsapdT20zbjF6ZqLgELUPT8IglaX38zP6zfdyBF+NjNf247XNtmIz4QCO5iRy/GcS8jjaWMfTxI3EbUvzrprtgRQDOz/eMnyVQVbbFiTMZfhfQLeu+j6iY0Qs/QYGFdHefwzAYuVpPhVZK/tXsy6DAioLlmNDzAu1eQ5ihCnobO+MOZtSD0+uTpiOAvPwGWf52xDUHj4zbdFtZULPV4c1TmWflDGMkg/Ia6kPHprHErwFTGoBg+1D6oX8lSPdz5srAF0RbktUTmq44+USAYYowZQOVbM3BWMc603Oy9SQD3buNTgzJ7yaMBbo/pjkzVrpW5xYH0Ra11ykiz32vo4nBg9Zvm92KHWhJm7uQJV5DMPA1JHBWBMcjz/uZupwXqjoTffeHZ17N3waXUaR7cZDs94ewlhsbQrmI7/A4zJDUZj0qKiVQhn3f3AneEhDwl6GUdCBdKY14q9n6ay58twW2PRXXPJ6UE6TUs6oqH/0xgDpP3bx/mfcCUy5oo91agCPtpTfowGZ0tyw5mIOsUqvdURDhjuWLX/WIqaPlYx3zmJ3ahTcxtC5xQgKWrQskF57LaOvwYN0lzIwz/joNYkiZwLyB7Joi0CsWWRC6SapEN5TClIisNQtNPmfwKaKYb+Hguo76RtcQMXdRZWjEJNHq8KZKeg/uWWDOW6aygLP9JDrNNW7JfWDyHPR8GL+29zBAD5FY1WZXsmYfdKU1VTLLzAHERJJGTpwKZH5k0uZrDYM8zG9WX+RVDM8bsmN8cI2wKz0Td8GEq9T4DvY6FuhMsqPGHC1tkLdxuwBYP0Lu2RvjXaxodrZhKfkkIwGcfm+lFS4WMFPCz3FwWwuvNLNqv7c85xnk3aXWl49yCW0YTzTqwyKuKWSIFJum5G8BBjvxx2yDOZMh18M2WhRGX5VA0p3eAilBsGa54P+iEat2c0lLnTrXg7fzDLJrjO/213hRmT/92zHwHShntUiR+9KUWKWRcx9OrMWfefEo/p2FR7dbNWoP/P/se7JJUfBzJixcPvTzMvSTQrccDAmpwoLnh6pnsAF37U9Cakvwb0EZzywhYhfUyAZ4oAu4R1X55yrbJifKRbLIC6NaYqZxbpzV9ec4/SFSjJKEvmVGa9tHfUJayAvrPPbVHNaxlbdJOOn7f43GTTdGGufXu/daAhuYtol2y5rFVUxlDpyKCfYRz3fOyJZEjhxizetlF5kpK8kUuEpKNWnSG9VEdmcn7Tu0/U9Pho+IZiTincXepD9zQXGusmr6j19TKRCe4dmbGmRl1cDDNABYeOKT51fHc6+d1Q9T2n1UMmkd+aiSUgNIrogqtnInezaEs7HmtmpjKttWg7ulLhPvEEnGE5TqPY3iCItPzYojGET4V755b+cNmqdG6OBTlbYjDs4AAp+ho1Iq8R/eWa0/FOyB4K5JLQ/WqwpaNPuaoufHcJMEld4peiw/7uIRZ9U4otV2lACBY2PfSUUu7vJ/iZUtvPoJmd8K/BmbnNo2iumTtQxEeARnjsHdzf1JrE1L6NGFsI7t81c5GCgmWILKM5pWDA5HO53I6aju6916JkUl1YcYyk9Hwwf/waKzGbNaeXD2d1jBd+rriDyPgR5p32kxAb41vjMM5QjUrVztISMmbVDBnx2qArnLJ6ECRGZcfK4U6LCAMxRtE+Y32MobWIYqbeJLCsaF4pCXyZjPABVmN36NRAavX8RXO80JuF2m/Snmg2NL0dSW67EVH9I4fcFSjpL73r6ohLh/V+uK3786Tpz4u9p1byZEEFVjn4eK4wBNeQ7DGhdbFbRTt6/9b55EBMfJGakrqZ4U+Fgnh2uIpidUcG+iBjHE5HMRX2ZKkKLyYQElkw/Kbj2w8OvDaxd8rzWoSUnwkiP9DB4L1FBdrrf9anTqNfPehHTBlyG9cgcQLrR8tQEZN9zuxs8BV1Zf+cIk9kSStcCODphQCbZP7NYhgTuqPh967gyo6DhJVEeM/gq2arEo3NkVtX7D7mzM4zzsjwEazeZbygY6xwP5F5NLqPJ0Hxncni2XMn/GdHQmTbQF1zee4LOhZaDlBzMZLsKXcJ3sJsBmPODcSW/FKYiVgzz7wLdz0C3bFpTwedWpIZzG+H0kpS6hOFF5yNj/xUGHEQK75qxYUFuXq2vFITPVf7aaAWUF+eBV5VbBqFcUccHNaTmGaDdRTdXTurKJ8ATxX0DHWz2qNhGP4nrYJRCKI12hvvahdfR6RlR+zca42mjybVuHEEGrU2KvnHy9+mmlQDH4jYHZKC6knkne5Q28ldgrISAF0p2u8YVTy2bGLZqUkIV6zWDXi0DuZMiQhOJwUgZQNnrjzpboxif7CaCAFdxHukA5fPTubF6aLOTWCnS/EP8ZSOIyNGpkn86BVLEgxNoCo5XDdJHdnSB0Zy+5O4NQSsoKdZzikwg0eSvXAE6j6WW27irlXjNHHxiuOY/LaFsSgXv62JfK2/O09r1DMjpxv32Y457Wd8wFBf9V6i6CdLP2Z9qNFsxcP88S7N6b5FAkZAkO78T3f4mpUVnXed/QQC1AAudBr+gg118i202+jHf4m1tBvD2iwt/8PqoAWQSajReU2kDJ91lZ9cqfgKVbzge5mUlKDSh7aeClFOoVz9UEdTQyNyjj+u7JaX9DWyqtt6955fcvBJF1aKEjjPQjYV4+FQr9Fnd8NqWavBRL91OUcILzXVselzvLQtPmmvtdhkUNi8G+O+b/qcVyHvls9lJjRGbe0YWtuq9zXA02yIjtBjoQd1vY0EmEFvb3u3xiPt9Wix6NZ7ljWQVbw229SAPrh/hsIECHTLmxKxWD3/K6TUieQeqJIfpcIoOQcgmvHDyyRUevzKImeikRzg+ly1+qSicz7hh/DCm/39Fyk6M86XNkhcEgJKANNt1matUHBPuMmqkqR0Irsee0uIofjg8efSzC4Ml6OzAV1PuydANODV+SaVqKrg8qTvT2ROpiQHqoOAq3EdFRo1QW+1ak/AYmGEVA4cF99A82GRm5mLHhLHqOSqBVNF5d+tjFko2morW+bAtWqE3Mhi2uYPJEeL+puWOoJaLV9uHtQIj2GvjqEnPiF3gSNk2kq1rb+v31DDwcalu1nsmfE1n7J39uQgliDyyoBoudkZrUtnIUrDsC6iGs/DA1YU+EpC8VYQ4iw91D0O8kJIRK0Zo3YzUzYnm6vxq+9EDAP5SWf+Eyupwlhcyq7rgfu0UcsS/cyy18bZBvpooyg1q0GNkTJ+MwtXBtDoaChHEqMdF/a7GjUgboSb8jHDJrfqRhQ/bbI62r8nHoOa6UgOaJLxxg1EhXpXmkd3Rch7uNxgpPzxP/mBdrGsygnoth1z7Q/YLYJb7LwpuGREdhP+ef4imi3CBmJrq9pWR8/s43S4uxqNYHUv9ha9RBACBhuz+S4xTQTZaCKSoDHnxC8CxGhiHczvJUTlt4rrWQpu9+AvsrR2wMvwqpTTd2ETTsO/P3JJiLBUvcs0TXCPCRY2h9Nx8ZqMz8XSEqa9ByDLoNM8PxxK/62v/Wkztb9dlxfHsl4u4UjIZo5lD7knNDevOZvFRYHhwFE22lXrX+Sffrt3y9R1DKaG/GlAPLQQX/Hetzpmce0TT69U3cFZSUWj1hcJa25OoCXx3O5jXSizjPu68eF6JRu4ly0GPmihJAcdY54LAu+PeTtHdGWaRfb6RVp9zxwP+2PoTSQm+qFhD5LkhsYuT1IwWLIAUjU9P0z7IOUj2QP4sYABt2vX5hJCVUnjOBPVGQTmwyR8LSRc2WvhlmD4DMitovW8AmruHvsuxxMnY/ybXB0f6jgvY+7tMu0sJN5r4DBEBXa37SH5PepbiAlY5L6+09qF9dbg57qZdXr+Lkj+9ODwIdoY9Ogs9QXAMPBK9sNLNDM1mFaODMVpqeBBx3+/X8BkyPofOmxl+kYJsG1PP50FDBXj0A4uVUwSXOnyDvjHd5pupMiy5DyOMVDjPDi22YVTeKKPxtGz5/wLm/x/DzHO4PBKlriUyR2fdazZ8MZwZO2yzm40RwLqezNhsNT7aqhOqWBMfTbYcyVtVzrROKLQ/cw8h9MBYgLQZ5m7RtajLhjAmwWRubbOysVY9+MbTxulvSqQymjxTj0/yGmowXOk8LorLHbyciHZbi5Wipq5e028xOnXPq0SO1Ei/BmXFCr+iw4toQwld1d5KXZJaq1eDPduqLEuVRpKA9CzB7KJsTTpdrYpMaOsIFM7Wgr9Oh/caoRAohQN6A6HSrmbUuxffYlS4ymc4W40QYfauuqpQ/JTXe2l3gW1vBU3Q0CQWi+YnGMAlM7QCe806vIrrgQmejgYb3z21bFn0KNZj8qMbtk0fubcrDYYwmBhjZezZtAK7N3MQKKCODWwtmN/WYEGctudKJzRB3xrBGIXPbh2oyOsQ4psvw2packPl36ulG2AlW5rvS3xsDrZG0jPgcLNOBZVquBKudvtx5EyYnivmLREWPn30cbkfL4RsfTwuJVSFZZJFh6UkofGq/bkz/WqbPwyDk8xppCVNz7JQstijvxEWrb40THMQJebLnzyY2q2jx2SLecaR7/0b676f5ddR3aDQqQxzS6YlPvFcYbw+8vic5SAk75H9CSsEorQCVlJSk7DU5HBRkzDnV2QtTJe9fsfqy1sQNBXqUXzv+3HDVDSjlHNPKEmNGm5+zlEP/Pa0mLR8hxOG5PeuHfsO4YAaC+btxGwKVWC9Se7tv8fBJBx1n+Kox6GyPB1SVukkNQkjh9dl8s6dR8uwRo6Ep3zrpyoDHwNvpGU0zV5/27gpveUjCyrt2ZF4TOPsS/WygLkfE2dbNXsNDXjU0kggbh+REnbrOGVNbeYAoc4ZX0aRdyTYOFzlRKaGo4MoHLkMH9FMwYlY+jItBYVbIzsByLIUmu7xM7N3q4VtOAzdBtYpwYx/5yTIIJ9yh2VZWg/uPZimDRgASUeaIeF/TU+n3NBLOkQvsf4CKuJi9s4FqpE2p0HLaw6yIcFU8mcl8Jx6XPWv+eL9Uv+Eyr1QVYQfaJcVwJ6kjFn9GSZ3uvbIxaZMwi7x+nNLp60sgdzogotqc5oVT+LDsygUDk+S361me7L2BWYFkcDER/Rx+J0tgDZ6wwKRu7kFtxCpqtt19WgsF6LzpqmDlLORvOsY68JnuZgBdo7ozFmFR6uGXxbySNeCvPKl92vkVsYEYjZ70nSsNQz9WiIy0pcd4Cjnd16gHVj3X+IIr+ZH/gTnYy0JQvVtpoQKA3yqTH8ZK5WAWFLSXjNeHCwtYmaan6uJoOWW3ktmR0n9j0uxSEniCHfobcaa4adhh6U65iKCHer9DsvpoFJxkj5jhGLhPSjJ+hLddzatV/1Ocn1CE5uZoZAMtgkhUYN5zk9+VUjJxOTjDsX8kQFan+fCSw0rK8IhXNp3dynfHXSYCNq076Pn60lpsgbLC41pl75UNjAtdkXJ0OFBP9SOFxYd/qxoACmCf2c4BNjgll3P8P77ikGQPLbKe6Bprf5RR7SLTcoLj+WEriYD+XvlnCQ6gwN09MIkc6PH+xS8JfJD7iyBoSsLx/L/1AzaxG7e0eIP2dxroERhpC6jg8arrg7XQBksDHIJZIPRhy16WjWaucMUOLtxrgBU9rezETjoCtMnBYdaOAagkVHdueRkp+p0+SRoZ4ejQaCwhOiYRYYJC7NsV73oO8dwYLioC3qILoo9B/eMud5uERJdTB+L3gaZcXObntZ43fegezhpmSwHyw4dM10xfsXF1MY5XAR1XmGR9Qz8Yrc2BSBiUUf1wSye1tGQLKtmsheBI0zWEKzJu8/tdWQ84lcWgnXo9INPwDU5XiJi0OyBQbwRH1ahR14L10g9kAYWlDK/0N3VzcgYYursjTtw/2wSHmfTGJsx5NOXmMmVliBLLHGu6G0jFBLZtUkH7EzFzorhlKhKRrLqXXlXpO8crQ3CHEcZLu9XzwCc9SvkPe94gxwonijdizLHtGfLLKLF1cdtXMFa7Mf4P/JQHiBZIRXBzCKoqPaIuvh7X4/SQdEJnxbsIECUF90ZnrLUpBjTXiX4XAc3Mse7eTXKyZp8Q3Sf1S3esZyDQl+BBER4PmbGOeQ+K1112FbEeyqQZg56WiQ0jRCUmP+Kew9A1ZxSjutLVOfkpuBwoSkP4RGNoe7WrmyTXKI6nk1Tnz0oe2Vm3PjBDf8Gwhe+fwAYSAjlPra1TtCj1uu1GcdIAm6ViQn9Srqf1ym9fPIxInLxt48mCIl6DSTi4ZJ+XkJrz2dXWQqhpSF4nNWapdIjJH+p1Opedufkw0xHlr4vORb9BCJ3W8vAPdZSqI7VxbNaaOfqhI/8w7L9horVKv7MLnEr2l2XgUM6+i5Ix58xgRlYVxa+ltEdaupD5yktPEOlldMIatEHTM9j7h7hxVvQPEbtQP6BmDdVaPz2u/o7+Aiy4lsXGE+Km2ss6828uqY4y28croxcwQBaemP2+4hEA88WmmXnQTmIMFje/i5qVzP/dynhApy5GEB55hU7+jPdveexxyrULupZB1hjyqISvKscuKXOXZUnp8dPLlTkOIlOhMu9t4Vx5PLPIDK0SdUiZ95AlS0+/1macnq6hXYYejgXigt9NePxN2PY9CC0HftH0q8httvBeLZ48ootbmSIZgK7/Wm1zqq/lUDZBL6CYC5KDyLg/WfRKIQMNyN2X432uLr/f/9AoV132hvDNWvIbdgJKmzFwnqjd8+MjwrCINW480Y/0ve7EpvtXHg4WzJv5MuILg89gjdMk86QRO9Q/YKdmb+HV6eMqRTq/oudO/E6zvH3NzGgHNz/zI4Clc1kXUMDTrnDpBI2KbWe//7iI6d1A8nhX4F+4tGki7hfsA4VOK83fdLmcdAGqQRjtItVXa3J7vhE+x0h3K+fVJpM2FZDdY7gVF9ME1rtQmyQOE+F7b6vQAUregqMnIegpxtIKRhyTvfx+DFWZLf+VUZHUO+CicH8sE+9LpldACFUpG+WMfE56X+8xIB5l+Eu4ij2kBUNYythq4o1kyIEuD1kt9XQ97gS9+waaIHokWae6jm/Y8Govgmk31Z2M0SBZAIeudbA/y6RkBys3zsWVHoPxD73jIs92cougppJ3Uxf/pQcoOw/qt20epdVJgHhT5/Rg5mNf+bvQ4LJnwSxs7VE9Qc/myZF4IFBUAom49bMTIghVW6RJ2gfXkP6ovc0THTEpxZWx4zTkARVTfH75vftaIkZptS+h3ERciwL+zFBfxojqrdRqqdkYWAVmXpf+ueckOfXPrN5b9eEwl8OJWgoXwyPM73RDn5ix09+qYTUbhIRquBAIHnO03H3q5TFdSXzP+sPDF+FV61ALiJwLttts7/NF2qhFJI57p4sixeZfoEtm0Dg5wGwPCH6tc6aqO8oe5R+IkDR8TuyFEN2w2kBdTxxvejaSoap3bQlCW4svakUIjVrpe7zCbbcGL0xSe/T3hysCfb20Xj0oFitmmY1Q+1QAbHJj3MfeeZfxuvYYoF7mLnb9sF2SPQEFrRwt08qapY0ODw4ReEM3TamVg4j3BvgKWWLIeWrMXPSM+I3hBzjUn6TbqMNWIPDWj5FBYrWBwXYB71BOpmX+5iYomjHoQ7LUcQ867QRS3qZXYnBbLy/FO2tEGfzE/rGyNxED2nvMySIIs4Fx3fZIsIZn/tCkocG9krZ5TWha4eDI3zmyCQeBMYsXlRDNsMfjEEBFh6/Qhq12c9IUp606kEY5bwbG/QnU+IAyJhlftn2f8iRL5A7v4R9oAJGU2GYjNHqZUGg2z6az4YMtQyXcV9X9WBRlaYnfVIRsmuVGDhDBIoG6C8AkCK6LdXd0NgeShgVCNpx7iacd6L5r4rVi1Gco6rCBwBfwyIJs4Fhnq8IZrURn9zhkJ2FenUPijnbIom4cDNJT3zqMfvySGt4ko2KqwoGDH25QLfuWMbcuRhuQwYKgCX9VgClxETR6DM5DNjTv7F3ysG0kI8NKZ5AZDzjJnJD4VVPwVR/fNKHpzgM8QQGSapVEbQCuiSw0xjHphp0eDxZeames1Mp9WwQ2puhmhj5ql1Lv0eYJEpN8RFa01yfNY0KZkTpYzcO/Ckhbb36k9esVXSMPl1G/K7/sR9Mcqvz7tEmdFwGaO02c6azfLxlRg6byx5y5aqHXBgH+N8X+0pGSjHsaENs0tEcJU4XtLrRLBJGIFVEe3TvIYkvc3siaU1d3xi9t7TPq1L/+hMRqojqmp8jBLyo7KEuYZeOKHFM3mUkV+XkyhiFhmwxtLgSsGMbh8fE6hCR2rTOIinlmsF74yj7IpViQkLbyCbrvDt5/yX6I7Y1abrFs7QBI3D9QnlxlwbgZHvFTKeaFKcI3NvUQFQURMimQ5M+eF6vwSlYff+7/cWpYmvPrIh9BVONzVYOe2tQdAWWT5fJSYL5Upt0L6Dl/pZObBEdo+FPC4b2+iU09eJ6vb/kc2/uq9CvCUV9KB+C/CPAJdOu7vq8wf/Yxy8081PEnm7VGsIzzoFYnDvfYTUyPhdXV2yICWljxWqkyEe4e1n+SZCRACDyiLTdzj5Dq5ThMdA+CNJhV09iM2iW1Pgf2XiLDkIpNo8ugDtNdVTMEBsO+uHzrqEI+EwMOFr2gevD8TkmyjvrYH9Bw6rkARUFwc7DRpOCIaACn2Edjv7bmiS3MFeVgdj1y0Rv+v1DYqY6EwHst3CNlpq6XBW7Q/fu+F1R20aHUR5Z1LIZ7wvY0E/w99bKzAyUjG7671ZUYF6F5+Ynv4Cm0twLZ+GTrBp8VL/LMeq8XYgzYldrklMglyWJS7iWBhdA5GraO3m3rO2AorN4N62bHcpIhG8kbvIkybnRVTEWt5a5f7iIYJN61OO1gLp+lMKa9CuaUR/y9eoF3/jHgqh6iPSadglFYQ/GTsLkzIXMTFtBelXwJHtvmQtoXItuOsLGvL2IK/M295YD8SaNfSND8zTfgUXGYQRyrzsPYC1cxWOto+YkW9R3EinZBFUy/5HWXF6WeqLcPADGeJH3U642mjV9hMqA/GY+7DcN2bpls25VizlGv+FyH0qhDmmd0gUS8y90rDX+Xk6y6McJ6S7gM/DYcoTHv/2NeKg4rjMw8TqrlL9LBcLKWQxtuJxVX7ObKDCs6fNlfUj6iRrGPFdJD+ziFknCJKgixZ5RJQEQZi2MefRmUYi5crYu3Oh50a5Jf+upvNzFAo7KhxO8WRvoqnLO0wvvdcPsaVUOIcvfZoUierdTyFyoxwnJI91KCBroEodybtBGshuLseewOL8RJP+H2Oqsca/SYdeeRtivXY+FFQeTQ33eeX3DdtS0+wgHXVCCQk/CkG/az4aY+ExO9eyJRmpeKAXose57USPZEoRKo6m3uIY0rsGhjw0xAS7X1DuBTFVuo29v3dChgu70cPjpl5/xQmrPdA36PXNZRWOszr9FtTYYxG7dHUooremnYo1QnUGWsN/xygLq9TDGLLhVH/pc4pD+15uGiALFzU4PINmfD25G8LAsJea1dQlpC1s7rkYJUQqIwFNDY4Eh0dawLn8fCol/rhUCEbEHM1dJlCBpXxKfm7zt/ZpsbXgy68nEkEoLjs9rk0E9GFFZoYLZv/4qZR7nl7qBbeALu0FWvdWoNb4hCvlkME+i5nbMafn9uVxxXlpXBlOxHA7IKvKJLMXQanWkuK9A+2VI1JSDoY06+R0/g5TPJIHfO3roljfhM9ncx6Qrk66xY1H0+2UgF+oQgm28A27u9+T4rGo0sT6suA8Jdwthg1T9gojZro33dFb5pubkZ5ZHchLzsKkibaR3DHxf769V4iImNuKKrpgMMK8vcvF4YgFx9Asca63MVyNPtp5+zXPASns3bwdmsxnn1S54GTdkB4DwX4L7JXMnQGqIaS+mPgWxbIZbFcDNIrMilEIEGFczfvcACtmReTyzqnpITyfsh5QK4RKX9ZWtvUy4bWXjsLYbNV7MrrZsT82c9cmf4f8I0sSYqVIlcUYgI782imxBuEKs3OWcogWDmwlr9TGLtVSSTlyzHUW4PU9f7Wv06gLioBSoAf5esTj3FD9kKtTKQZfTKEIOcCYWcfIk4IkcfoFGKSLqsHhBpBOTfEJ6dxkBJXCSlknDrb8XJYO4/96XFd4ThAg4/Heg3u5p1kP3QG2yMuUrty2cFQaT3cWMABIB2diEu/1KfFFSKbfjTp8aUhb99C/ZA5m7h8JWsGwT5Ml9Uhw6CmNHyRA15TyVwIsOH0I1tFeVqQaoqT7wGjyqrJ9bI+WtpjMv5CAGQfj+k2aPOJZ/zLvxAtkd/Bzh9BZPEwVE0I0DI82uWK72P5+mHKig5zbXYrQE5bSNA9/gHvSND2qLV3hLPnoJp5q/NeZX7mhb2aWf7qkF8iM4HEHQ6YiYA+E+kPmfMGabHq62QBi8sSJ3yb68iTcA4YT6f+gJb6G3adGkY9eeu7XQZiQEi2fXRSKUOj/zLkyh4R3hOAX6xhT1yCvCHT2Jb9tAzSMxe0RFbM3g6b/VHgP8nyZkt45j1ZYBTwOpQIaFU7nU5focNbiclNOds9b6I+FOnBXwyAf1ViJPMKBBofmR8wg+77g5o3CiYUzQ+KdNxUo14XQc58/GKrIq3XSIefM9azql5sX7KlTsU8DGT1HlHIYnd10cJYsAEHoN0mLKcHTySHsjTFesKWsmK+siZFXhlavE6F44mweXOrX6FBoELRrvIrsst4OH+O47VaML4CK/cNrjlTodfRr3u2XZsHCcw9kXLGX/15sm10DYmP3G3387x7LDyVoplrs0pzIvfcy41eb2Ob/wM6tQNLxQKnfSbL0eyYL+RWR09qeHT/lWpCFvcISYlmdF/jMaIWDyxE/LA1tguYOSiQtSqHfgqHr1n/k5nFhnUBnU1J1eys/8qySmWwIplgfD3uNcFHlg6trf2B11Om/f7E9onO53sWHhas4nNuhBJsUn2OjOnOAFZi2dcAvexHytVxIdybjHcEdXUcp0jkab19hwZ0RddTUGjtyulBmpbfGD+4d+oynTEjmMlYS/pfoCyhEk9XbgbBf7wtFs5qleFrCmB0NrUYZLxmw+2wFqYEUy2hYP3ZxY8uhRZeFXZfhOD58zGBx7lo4yMjiBc0zvOGqVQm8d4tk1CRpyGJOGJWVU4EpHPxqgMP6hV7f0IxJugziIEJHavrZauRXe0/THYEOKpl/a4jm/fah+oAzHRBqwetjJBSjNp5LaZ3ZUNQElZJBDOF1e4muumSHF6da394Cvppq45QN1B2wYBfbx4Y9fnq5b+heTNTCmP9XhMQGniDhmdhGzfPUY5YPvTUhEcaaA2ucNDUO/xvaUVhXDIodrM/05R31bnFkjUjn34N7Aiuagl9VB9SjYsu83Ws9eoevaZVwZMC4uiZko2GtNzZCyMHRq6GKhvEGBiM1gLyvMZk3eR2dGcn19YX72JnDBY6RWncG7lGAg0YZR9lyoCyQ13gtnyBi05gPlO9yOeIYGqQrhgRpR+pAvx4czdaBMpVI7SgZMAhMSsdPUEQ9stTtwSabBmrln0uHsOMhDvi0bNRUWUmqnu3eiLgzk2XKGyTaHCe59vZZcmDkk8aOO6pTw5H+DWALBPMcCOmfIz4cF9E5zesXbQkQNDFk7vlnAcetbpid+Ce9MnTb3Clhv0lL7lyusJYCpLpalVXmQ67YNR+IIDh9vW7XeWnU3FFfdnO0yqCON1josSLVMTTaH/T3Q7Y+gOUofDwwXaGyGRB+4GRC2kk7zANlgd7PmE5kXda4IpmTbP2OqUJ/O9EXW4aslQR5PtYy3tNMamtk4Lwzb6WIFll7MVBneG5vPfEGslblvK4unzLLIvceI6WxhiZNc/nr10k9nn8ikKPz5jmA9oC+lWIE8QR4XYTcO6WZ7VMORykmWLBbTE1NQc8/TBpYSaYjlsyOK50EEwZC6/hyMiltFDU/OcVfSs/4s0Rk68qJkU5mIFxzQcySQSzLKmqQzkbb2ZlC8MLMP8Tt/ui2UK3r3IoyOWjDNfAV+2/iYAbaU/gcEuC9PqZbBCpHpobrsMSJpIpAbdk+lZArMaQfdQP2kY9Krk6TsjNb/ad7Ghc/HTlJyxRISEoijGyuLhUJB5Ch35PrR1oibmRE3vvhC5cWj/AFFMlliT5ELHoj9ieMLEG0BOkVRUXKuv2bfaF8AdXORnzTtMfXYqB8UVY5TvybX4Mkg9YXaiDDrp7KV8wVHpmx3MIlmRkznG4Q7DbYNTZBEi2yxQfQW37NrAOyCP8AXP/EHi/BLLFg/ip1tleZLojlnpdzKgSmJyi4IRDWNifCtFxTRjzh2z9DNa3KUZLZnixrksQWHwp2gRkmuu7HYPHYIQrdjih0WnNb7CL7hFDLjbfGaVLQh5Fu7SHtZTqDYzgY4QnM/x2PC8v6+qmCAMbOvWxZOIxjgpUF1ud2/e41K1bJAXPTZ0ctJLsigJDqNH6fNsXGGXNx7cwJPgP6INK3Qxc3ylfv0L1e9m37k+CqkJJTN6MvvQuae8WjO1l0JvBh6yHIrZgf/Bt/DNS1QULgHfUCLdwH6GVXxn8JChzrTEJL4dTZGD6nCwPWD+eeU/jxNc/wph/HYngIZcSTOnA7ZoHemc7pUYXx0Nr45Sbce9CyAvFnCzoIYbXxoDXYVwt/7sf509VEfvoLzjbFrRKr4vntb5dgeDiwRX6neO0yQZsOSoVjVvOOSAuP4PT+ezKgOTL5CMeBFh5fTyCTneXHNexLrs1pBpLHH3kmt/Gi6938ByjJyGR1wM7/rvRQQoS1drQjQ0vefqIJKlavxUAyi0PuILAyGGfaeCzz00DKjY1cowpRuwwf7rYPEZOByjttnqj6EUZ84F5gZp+4HJmTpMjNq0q/lyKFhwHKG0wkVp5h+gESx82VKGR+mbao8YOh23JnEy+eNJ45yos7d1gFc6GC67dt+OzE5TpAYicEpe2YtuuIHNt0hQpdLBdS8eqx9D9RSrya3h16jYIp9Ogfv58USTrQa6bOJgC6Fuw3VSohoUOQpQ/XY+PVKw2eV8Q1N6yxzymT6QIiLizm3kcA+jtFVJVj/IlTTGr7Tj6P8fQmh0ag3AJfRbLs8nmEQ1QHGUtaUv9djTgKNG5hVLyiujHLL77tNlHcYLwqquU6Z2V+WMoDwfBiMDqK39/tNhs7dXQhQTHYkold5VgNmV+WJr8ETyoKTHTS8g1RZL+KCbZw1LZoGTgR6eNleq+XGRggG9pbw1+WcW0jzJpvQle+pDWTA3yPaJogeuohg7EijR/48Se6kjwNpGStelAHWNOtzrfgmNxtH9r1eSRWLz79nRNF5th43Vy+rZ9FcwK7PlfJojQmk6yDIgDVpS2IJtFflHkl2pdrA/ZK4Grks9dfURGUNk54HimplKaYEZX5dE2M9W/60vxTLBE6XeIZ01h4YiHBHGMX+eAHZAHpSk2dFZUbQL/ylbq8VdzyOCnwzB532xAsz2XqmJFNJCZ6YuvEpyZtLa07GuhPki8MeZUI63KN4jC30SSX7/bWpsMyfpqrzmMI+cCYlmRUB0Mu4kG/untuIlFzWG2JnuSThOvNB87WuxDF4K9MPLtApA2nPV+2yMqZtQu/5eBgMzg8/6FBhddJz3kV0onK4Jbo71w6dhI4czF3ksh7/wVe0vAH8B/pVGb1v7xscPIhg6KL+hvTtq6g1+kCPpBURUhkj6yrfPgZ3/Xtc22MaQJp0ouI8smF0IW7P8ZfkCNRlxyoz5rOlXJ2YoBYf+hZJACLpIW6Ecg7s2fptIWtvuAgGvGV7dSNLkYv17ghjkJQx6tLucnApd6V56PAKNj/7Yyi6MOC9uwvXC4HnQSolMT49c6/5ZRIfWauOyw+arQBxET3gqjgZPldHDuhPDdYxffuJ1ityuwa75OUwVzCfQ3DhhKAfuieBFYqqN1i5usxjNFwKad4V39gjt2wLjcS1yX59qz0LCyVW9KbSYU9A28hy5DC7hdtdQxRU9PX4vfg8R4KZzpT7OhJe4Rwnuob88KsYJT3Xdb5uQj/iI2b9k+IAL2RazReg2nxwi3ia771jH8mWcStAs1NJu+cMgx6oarFqLe8b1HSRxQ7za0WtQhVKdhOSo+l5MyUbO7l4rtMf8vOidRDYSBoESyiDirZR/lirb7mNwOHR9B00U3KDHjR+/6/p0FjHCVpWNOzJcWfIRQkZ6XmbdXoGNbYi+/6K31kVQSpEiFHlf0XTAzQKDh03BJv6aoldSXInQfAEINY34mN7TGvaILI1iq1F8qQD9LdUyM1y1GkmIcoViAyaqPmTF6srtanuyTM4L1D0wyuj0tEVAfuycGdwEON4fnsCqlt5T6S1obgnUutprS4s5WpzQgzd4U9TRXJErli2+o2bS7A/uISBZhgh/679K/zLda6gWtuZwAvTGNdCbAN9uwZti3Hk9kKWrIq/zDHz00+fSYLcc5sgjgY5sWd/F9nGirgGojICMTxUzGmVVyjsC+0iZ7i++UKuLA2KCekIgylXj+DAZVKUFgBgXYW5+1bwyASMUltB5MhCcaMuivyyhZw3MJ7OjjmJyH+sH7zwWOwFaztw+KQpl6ETunGZ4wgXDkkep9RDpXHKdERy5R1KfOfi61l4kXklOVi+UvIPbGuKxTqSuKxjgg5aUU0X3V/EKdOugbYyeYKlYTyfe6Py6u2Z+A0k4k2giHiUVqkoC8MKxTXxmChSs68WryAMhUxyo84ORdwTONcLdmrVJbnyH+ugmyyx9iKEPADsMijuo2U3uJDa7Wnfr9gcycQq006VxIwrhk0FV/BDjqzquNOsEJXdrimGw0G+JVU4/5BNk+lE5kSCYz9cOOfNBtbtPUoVHnu1jfPwwGlaTc7GUxPcDFnEgwaHh5znVnSwPAAdXz5o6vI34Epz0NKfx11wmUjfW8nTAn60/CwPV4XjHM2yzXbq/EA9hUimpPyH+gMWQc8fiEpaTtk7l1iADxvDO8EMdlaQ0nXdXnhCuCrsoC+Uvlb9IaXpTbhDyzTzYYUPRsJ1khYU6+UMPk1YHn7mE5V3/F28Yia/wrwDdF+R6TmVzsqudzix7NyUGk46wXs0WaHIURcZDicGiV7SEhoVNTU0zgBoaSd49LNnCcmSgWRMUa0JKdpcVnfovdDcIyEcqOXD4VeP1baW1O5XKi8DuZzNuEL/drafxlkHz2RIla0Jp8ILNn7S3fdeg9UhAx9q0+SKtkZq2KsJrdjjyAjr3GfTjVIDAz98414NxYOtS7EWs2ZaFK7+4WBYoC5Hkeq4b/TVXen2W5sxGUXGVbea0PfIOieEzqtacY9iZH8JBwrLvaO9mQx8S8Xs1qoQA5mRuhLUFIcDGMj1wJK/K+vclB5Bl071Plrpq5+L4WJ77f/haemR3QBDVN+DYo/NMMFkqokI7b1nRwuzDmI5dEx4XMlGANd6UtZZVQ12+CHjwiLfAM9yPWaei6wRjGbxBRZUWxyt/lA3BanlqVbrdSdMBG5p3j4Pa9sSfYjUr77zB9h2qpnC6V8u1+XFmGBTP3y97KCCHykGfB6mbCNng2OYcDfFxSp12MaqtqOwry+xB9gUkHlnfW9DENAGqcYOxFOWwZHAJEeIuPuyLr3pc8euQGkJA6K1rmHJDoeAl370hmHY+Wk02WBNr6bOj8owlbEPXZobBQ/xU4JVN9l2GH0nnIedokXyCvBiq+jOf90wECFhhyXgaKiOos+J5t5i72+cySCooSeyr88ULT2mwUuMCLDw9Pty72PByiEtatpiqNeZF8Kladg4jD+8iY+w8ru/PveAVmrABMft/YevFyzmyB1LNidUz8yrnolKmitwK2bPJrQzSfyMg7RCZtnj801QmxB2Hh1RdODJ04NYCR84mkyeVmLrySQsPfWBiZawIPusj3W803YTrCIFZh55a7RhYSAh5uolGsv0TMC+pfZ8CJFMfhrjIkPX4iPlpoVij0m+1EDPaObMhssohxiQLjAb8un88eH/6Z8SnJxoDDY9JjIkM28xe9G9BMqE8CdRizNqXF+yzFoq+i0JXmGCunk6mGwVz7dw0Aht2yZLXL1jgrrUpP84ikBVljLiJmABWcOUt5aq4e2FLPP4IYwNw6/6kBGhUw92jqGvzzSz2IXFoSGkFThCZ6Hdi95k3hbTR+UyOtNXxKf3qOHtoG1+tO5u2H6XvCe4OZ0IsSdV2C22f4X0XRjnoLI9dkAJcmaPzyLbgrWgj/dizWHsrNz5PzGCCZ7zywhZMyk6RrEJ5ucZ5k4Fosm8+U94ZyJFHYaHthMhJSLgoHd9plpggxNFeaBMx2BdSg8d0qM1P9s3xHTr7n+uvFsfU5qJafAkyfAi/gC+OLxCw0uMl/XJ+id3bpdG4VxQwyKvZaxCWrPaRHIy9KcdR43jv9jfykGUTzB9KjyF1G0SkyMHMeY5wgAmcEp9B8ffD92GR4FQExXAD/Rm70xyf9mrg0HowJ+Y5o1trz3gJx6Em+pGPt0PvCVSXsmyA7BLMqIiL8iKyvmFzR0O7FJPoUD5dZJ1eKn4tDUJJ4Umb72XTHqR1qs8KsHPpu1Bas2jM6FoTMyoX5aScTz2RVJH0xso6SkxxuMBg3uUblz4fj83SnK1GADX8ZJtrY6l5lrbF1/ZuSi1BShVAdFnfBB3Sh1SW4KQz2mL+Y4svWwspzeGp4W6pTFKdMDjOxHzkJHkAfLjLjqf+T1Axa9og+Cl7gRTi70bSWjsQM9F19HqH1IdJOoerLMQTLpuVpFU//G6/hsxG6sFsnzMJ7n73SbIizBrcriqJQot6sKe+uP1gONUVuBIPlDJA49atkvafSdkS4NR+zciAFrwoHjdIsVSJKqDxAVrM15uFJb4cUI1Z5j3Wgo4gLqLZDMdNtYKJ1P7oBTGSBKZGTqguAYXj9FtcQ4sSbuwAvEKj0iSHfGzNYpAzMhIVEl+O5tVLe4s/3uEd9Gsrl6bogS5HKQwX3XK8Vnj7lf+5qIQiTSzRnfkEpdxxgU0LAZG7OSxjiHkVD2gFaZ1GjKhIedce7dFUwac8qA8Ut250wwH7O4rKHFECWEhhPfyyNNFFWeFrcIjCB9QkpXuz0U80DXFirexggv6bCvxlzrpYL2A02HykHogeIIum14ATyzZnKSfKNZqYUHkFr6qN2/mPO1WK01C9CpwXcl3fLEficn+qMiFNH5a/JFJBAF2ZZWJ5EP8mGzPCF9CDlr0z0YHruP+6bAUG47CNw5yDdR0WDTjq/DqDE8W+/fc6iTB4r9945YbHjR76ZqoOFAkp3KnRniRLdWK5iKvLCCH/Jf9vzHnX4LfdHlAiEucOADd6aaTJnMDTB0DnLoW9pvA/TvJPoH2GYOwUyBgDkGv7VLqRPzjz9nIWylnnWqIlm7L9YRAuucHIleKaTQCeUrXP0Wnyp2nmBxzeDiVOPsap6l6MYLHO4xg8HBAK3J1dgvBpIjcYDKZexJV5mf8c0hpw5ODKTwdkKCeeTezcPXh/9nI/FlRcIYy8sH3nKCQ0EEucVi+uinLNXGTmZXSuB5jYC2k1R6X8FYDLSs7G3qg+Wa30/SZZVsN+vbIWPDRqs9HMz/V2eXRrxClGwzMRZTnpwuqrD1GTjLUluOf9uPygJGxe+/EB6Ak5UCCsCWe2GLD5iZX8ywqGyaP9CGKOOsQ504tSVjAMPPpKo7Ex8LT3xYdh4QReijfasLvMKd8/bu689y+WY+S8IO9LXV7KYzmOOycnb7imsjeiBPCZgNd2Hd2fLIQOaLorPkKjFZcGRaNO6lp+pBPTMvw9QIbYuQZBlhu48VmV3i/3Y0m71BChUWR3cdNSS4D96YC5J0Y7ZFqMHBW6G9p9pf1EMvsoq2dzX2wSvNYXqdP47zyePLrk+nreb97cBNao7U34lHDXeFQ+HqT8XvcE26g42SyQZmHFRlH2UZ0kohpcgm7Li2wAo0IHMre/0XfRV0HtarB6og11KC3Z7/RUcqKzEPA7ZEJQgZNgBZE02MFT702HN67p516Nvqkm0Gjx83wQdQMeqxlml8LDK0V5SdTdnatEK7C+bhiQ3CLRBupVuTeGYhJY/BbrqiE1SY1vdXZ2SFuvNbcrI6ErGJV8/qH1acDEtu58Cm9IYXlR4R//8FS+sjKjiIPcuzVQ+9bV25MODrRYTzxFJYbLhp2Um/HKOncgLdKHj7tOrMZfxR6CrV1qRAGh+vD5dMMDkqvh3RtFI8M/B+95gOm4879zLjARkfVycAOqjJdoBfgWjWNsJnafTkmc7B3nIQv/Doeol9zaGW/DlpeEHHLSCVAFpPcoRFbXqIB0NIfCnsKcK8GmaNVe1S1WmDjR9kV2WjYdDpu3d+gX3edjZ363f9jQEbUhFXtuRXOQv+gmYCubqBrqUoagUdP7xj0HIFEZg93/KZ2CrZfN9t0A6WcpUJBI5WLyoLnqf11jJxzi7XP7icTGifXh8HPdPwOvmb7A1BFcfY2H1yrgpQ9LL1WPc8f4dqfuE91BNq8DtcEql3/06rGk4gsNyWI77GnH9IKwUsAFlrpUmA3zzUPojorig8/2Cbd3TjsCKM9wxliCLyKPngKsM1KFkqM6bMFtyxYYrU2eewcxYM6RkLIzuCbt2tjjkrWkSVoIS5lGaeH9ACsgsCD8uBJTg2FG+jOXwTTSCvGIWOiSPmrIKKcqEISVvUcMWhHEeUKjXTMdtBmPl8s4WipwTYa2j7rmaa0RNf7IXAOT77NGep/q0h0KdWRo5UPERTufgAqHgtum1dZEPq6OH8ILA+nokd8MXPhCko+zgkNqNlrLQew5ugiVBI+TSaF0+Nh/0lIpsCoBQWlDacVD+Vx3x3aSXTbkp6URafBo7r4W0YMJYL0MnwFM5mzSBvH459mHAZ0yzT09dEXgjVW9/ggg2LxRO6yGo5FTpGQS5EwMSjG3crtd3U4X4CO+KX5W46TC5B/X/DpEipFhWLaE6rpYO0r44KwsS9Ge9H2dfFY3QNvXA1sWHN6WR25HgQ091u/FmxcmTXpvXerH0b5xRi1MwmGmrK4ZAT1TapoD8+smzXuW4xfFWkVDOL7zk9xNtB53A3+dJrIzc5OTB601UXSFtQkX3hWaSnhB0fIWaxp9w7vGQDYtDAeTTDigrLMhVNfLUpJcIxhrMjO0Amicb+Ubauev6gApJbByzVQRTWq047GGRSYgxukHnlk5+xWTYTi31cQQCJ9ILZRJ3tV05M1AIgNeeDW2H8IBJqkzSl9nnKSajGYOD7eMyjHHWbG4SEV8CvAH8Iew6SodPSlX4spOyb4O8XdYQ2bne98jMMolgBIbc8j1VfPhmdPcqVcmf5qMjZcC2VzGSMF9s4863hYPVGq86Huy5cmg6zBz+qDU3yje9vmEr3yJ6kZhF5z8UdlkJdjq/581O9VuCR2B3lyEAfQoUZot9HdVILawreyRxAy11JlpE3UoO/fi5/5omkUs0A7Gvb5+bsteFVIW+9l+qR2dINow47smAidv0bLLEr/yqKcUanjvixyzAQCM5CVzq0r7rDR9M7wjLxBq9eBWRVmyK9TfSJqXHjL8T3l8phqzWGZrkRC5oiPO6C5Wf59fFDP+ituUaiEqytebX0Feyu7U5Leql5gBMTdDPsmK7KUOyA5TuWxjGc7dN7kJKEYpro0VWRhjMArMIGbutu6vN2OSHb6nvd508S4Q34uCRKu96bSAD7YHASNVhzXv8N8jroYf5Y7E9s4wTpkvo3BZkkWqpF0M1vka3jjUC/JuZvw9V8avX+D9bciICl12vr/bQJxDe+TN9MQwDJwOe5HRWZKtCtH/1/2brHVDE381FF3JIILjZf20UTFL4MLwmZtFv3M88Bv1x6hEyoaAlZ5p5QEWzlw8bJBt8orARhiododtduYtJBSF7octT9JzbeKdozaif0LBWL/u9RjbeVNLZ8UV44Ye6Sz56Vn8QlwftWL01WoPryii3ZZ930Zx6Ins/HGvGQmHAD+2qvuKQAs8Y6ublb+Dvhp3Y2NNMjsuzOvb6m4YtkPzbhlctKadex8tBQuo0zhmSxfDIZm5VnEDdG2vZ6kcykYFxgAz3wrkVyXQnwxyQIeYMIHQYT+257jBWD0yJIiC3PqmohMzTC/65XVgSsowG2kgnlR7pYY18nBQ8aVfJ64D79rH2pymM4xMU1Zk/OS14XiDcldhO0c0RhQxiPSY72XYxpiaKVYmzOcEvI1PzQa7+LVZ6pBIwn8ffWvhqa38b3IskTs4RBkYs9i+i9/AqdAQg2IOeWv2fuo5tEcFyefI9nATJXQchbBEQO2Cj3kaBe2X+81o97B22kYSwjOkgZybf53qZFQ6p/N0dL/VnuL1cYTGi8k6rMpkKGx4j+Mc/fcHUVNXTKhyO10FkvHiN+qSbJGepJ/aLXoLZ8RET0Bshv/4hAQgzeS7yl0n74cedqdnmAeHmQ2CyXvMM0MWpEvA2ezZIKU+WvUSaGpTt1kvMloerqnqxHLfT01Yh2n3iD29EWnrQsyjedi1I5SUgvQKBM9G+oAai15cO1con2QFz3UK7w7ZgzM+vPmbk2QqR87fzlbdTSAhrLXzqVfLnWBA/4+5aC+0BRMZ6iX9lH3QXtKU9D01K3HprdilL456y5lsl38VQaMbz9hk0LgquziMY01Znz2WE4ClHG9cF/e7stVmn89oNFUE9NZ1RAc97KzDEWHLoKwlCG6L20/2Gj7/M6PDhsvhY+FMzYRg+v/0jo2gPT0UTCfaLBDRVvKQgUSYPMG1dr6ox7ohepBUS0msHq/V7A6Y9WfKDgSLatqTzwhOXnuXAoFc1LsdlV/Nv7XHqg5TAohZGa1mOn44SyY1fyPMCxL1QmxvhBC7mxDyj9DUnBpbjdAzrBW0mUzZ51brDVW3f0A8oKL6FYBf0mwK6YxDMJogq94OPgpZyKHKBYvJXMfs6u0pYnEn/jPeTVQMK6uY9Egww5setjqwdQmwi1ea0/uoNw7QKPorCWZohFt4VB+HUy/ObjCDdxryIg/y0wXGMwFyftSyf0v/ESOVaUNOHg1aA0SQ0KOwx/oqBneMvSoxZc7SqvQaHcx3ZLg7I0FQgQ9799KuVGTfGNgWvzIMnHqMNnCyCLJMNoNQK9XA4Wkq+6tVuCUREehKj+szE6KlaSwgAPfb6JeGqIyBrjJK/wNw2yPaYB9wHia3A56M5r4OplAvdVjO1vrsc4I8LAy1zqqpo0yM1hfixHeLNDG6ufXaX/4mWxYpqL3hBHpPbnox49P3jj/wGgdZFaJe1JTer036xd0Xak5qCI6SV86xqAdAChv6sj7ESw0SU7w0leCi/08lfYfucRQHdzjO3JkA7lvHw0ouMCSCweP+ms5HlStT1HLlgQ/pkLQ0HiDkuoPtTY6fDW0UPlH3ebKJKJsiIlEwAnWQ1ExfQhfs1IRdbEO6sgyC7u2YqSye9WFoH3s0+d4P2X78UPcUsRitbiSflMds3+5ixk47wEAbwHOouv3l0AUb9zZIP32hh+8n3fJx3LXT4wqErJXRmufydvyJuKW5IkA+rD7B5y3hJGUFrf+je8x2WEZ93MMZZjKF3R4hY4E82J7y0z9znWEXqtnGce0dejOBkrf6CbP1VCh4ixhRvmOXO9yA0A2XQqeWYNfk1eUkRWlybRDBiE5SOOtjudxOpqC6Hv0XRqdL58/dsrEItVoppvb13l9MrZRKzOe/vtw9JP9aAkOa7ra6MbT/3YE4LlEJ5ticKWKe+rOGibg+N20Vx6Vg7J3byZG9+hIpULnZWH4Tq3LmlMA+oUfgAbbzPl3twbDuQozSElI95KSsXaBWevUxIWPQdY+4eolMlTtLwn+51SP6BWFEiioYy+r2Rza4OqKJPMbx7t0CZCtpMKxYQ5JCowbAH7J4Y3Eh3C04j1H/2a7qH3cVo01mg0KjVVR59qENmLLCnQ4LNMS3i2XshEK7QAIvi4D+egZPpMUywog3s+tqRiaGXIEMFp3rd3TuvLXVT9tpJGxjgQLGMKXmGL1MVjoN97by2NaOn0JoIbOQqeBIHTVbBYNON5DD3XP+rStPIfVbuHd+90TJpGh8BlfV0dLneK2wDMnndVGVvQLhvaQxu6sL3XsvtxmQzeFWUSHLeAlmTc9yNQKkXtOJWS9faewS8yotiXdJQ6EI1vpVOHgh46gljSllVDRx9qlH7i2QFU/dKpaQEbpAFUBI/eSUGbpgT2ORGcUGXXDWjQJQo+nCkQVnIMRUCP367os5Iw4Rb3LDvOi+/mwcBozzUa4WkjVcSIURKO3RTFCiY9j3O6C5MBS6Y0WbBooC0nOzhKxL8xMIIaM/tnyEzIdlABrz3f9XlCiQ0hh+C7/bNp14eUvnjcHWjBOSw8E7BjzeXkRQkpIuZSOriwZ8PiOLZxCkXFOQ4hbXa4Tu69lccJ9Hd0F1lxkg5QnAhhfx5WdcTkBH3SibBUMCLPb/cYypz6s4GGDMV5smYibldp//j9gbCEhqanpxLsoexOMik4SOt879z21iz+8V3wgG8CicQsmxcsqCc5QUqOZhnpO4qAFgzHF+noxN835P4xf5EsOcPvYWwtzK3WEYVGy5tuvxE5WZB246SGIDgeC4sMge0B4p70Tse4b6NjlPHW+90GmqnySqY83r0ilaew46qmwi4RzmOcPehbn4YPCoISjQ44RURV++dfU53vcKhkSj6cWuh75tdSSUNMysFwoP+lN2gGTwxOfrha9wWxDPpimhEBVrt6dcBIvdoUbCLTDQDZuUOVVhZP4sATqq8z7Ai0STnGxzKmAHG+3I+/tvrDN/OOTHwR6W5aWSRj+M5wmS5hfdvimlus2z4pE6RV+l6scSEX3XjFUVgbSuuufln4qZfmgBxNvIZmkPtMh4WHAtuqRVdgDOLksqdhjqc9jrNVpRsYL4L5fXaKhNXYNJfTorxbaoSpoqj6ZEp05xsc4y4Qryx7BRs3iYvuHRbCUsiCPmmGdUPXDn6H7woEjiz1YeriH6NPF5au5aVrtcw0DvEgLLKMuVq6QvzE1mu+x9AFhhIEE3jVvzGWs7x+IBGJ2hfG8Kb57q5sDsPmddrc0s2doavGt3j59SpKkbETAVxcSwwHbpAEsYTNPM1KhVl7EPpQp+gNotyPx7hI11xG47CrYE7+4xlCFpaDwvf9FWescjE9qNrcgCXvSeme0GAOo6QjsttWQcRguwWZb6OG1VPN2xZcfyUeEGLHhPkrziDDf4SHNaCcXXJ9CtFdyRMVueZNWqaoSKhpFI91MMLSXju3pGbSzJlM8FPf/oxZbRADvlZZCyb8fbb4mQVBZZ3GWV4hj4PCrLA1qQvEqs9XLsRnoal9WaSQhWRzLJmCurnGGRc6wxyAAejp0pAR70k0M8R+ziXphTbSz5jU2xp2cFe1EhegrqPqjFAtYWbYwsm9X969oYf76RSVpD5DfI8iDfFILBkfvnZaZtHikQ2tfNY1T0QOYafZ+dfiQjWZxqrDxXDWbc/jYZSbOzpgJ0HvC9wodOgTk5d5d9dmNrnM0LH8bvtI4zgktUZdf/DkYM10EF8yMhbFqvpMTi+TaLBUNd9aLSzSGAqu41xsKxsEYHFPhxozYZMPCafc4U5t8Ja7k34czb9pTsN2JFnwl8AmZSpI39KzBoEcD8fz0CAcio2KlaDIhPF8V0HkEbwc2c0mkpBazhOMI1d4cxnKG15nlJ+haP4D9g/H1z7jIEHS7enL9st+r19iJpqLFuJiKD2NT7LXyBzaAcFxIJ/fo4roeZSvHUyfgqUjSVcPiszEAuk4Fgqjxih+ln6TZW8b5sbDIvrB1Ul++c1B63XbFgHdVJTaRPzIXeh5f5u+QYvfa7pHyQV0ZUIv4SnfFMvTC0g0/fdaaBd9rcpxu/CBpbobKZgCIyVRDZGdPlZs8UGyu7+Hxb64E/k0YIIyG0d7ZSIcU1dOwyAQt25Ow5B4W/oUhgU+Gf+qB/Eqf+V11+GylEkiyGag2sSabnAwgaqTr549u7USX8FH6EnKLv1g9jl2zIU7C6GM3aeDn8kP+9aBM0Agrl165RV4/UHaXPnrBjs3YOHlrMK9jziNkwwt6+rC5FPPvSm2uVuOQouD4+Rk/8X2VoT+8bijB9PNpfsOsNhiSOVgntu7dzfzJItraFExs2ylPt0vanTgZJP3SIxPvZsgaDSBNmxIh0KPLS+EZkJ1Xy0gY8WVOZDbYF9v0GJta6+GUy7ek8lisYumJ1nyw90NF5n7L6H1aFMYqA/WI2COJA7pWaf9Ugf5pniETIJNyNXtonwZOLeCG380p2a2m5Fs4WDJIbVCtkJ77ah+h3HMvJJ0fzW8OXfnZDuzbWB935lP5zr2+vOc7CL44LjNt8p2deJJKd+d8n1mwKwxWxUjkxJRVlpIqwq1a+Sfeu1oNGDaOXyS/LVoiWAi4/RFFK77j8sVBWyTeqc13DCYWKdEbHTgEcIdtBewm3fvU99V8J4gYLJijdis2O/D+3FBz8kG/SwAXwjzKgO1TmXuA3syLPxxfnEUxttkUPpzQJgAzcN6o79tpHr3QWX3TVy4USKZJPX/G7/sFv7TB2RKaM9LvG8518UTl/oNK6/mqMpSOqsv0xRVzNjumgamqz/e3LG3e1lkrW5SquqlrDJIrN90AProjO2hsva2vAv1ZNPbHVfvH6K8KnMmDbXcZImS+YAXafdXLVILS/Q0MSKuRaLPQABT6AsH1SpBlkiSLXyhT/gT5IbfD6Z1Jx0n7l33o2uGW4lgd8BRn8WUeEHBHEn2SCXVQwlREQtvN7iSC2y8qSngF4ytc3vgOucrGccauebyUn9sdKmkhMom+XHRGLg4yr7NW/ZAq8UDCTjimw0unj204NYoihtZTNdXwgmCpqzA6Y4a3S/braI7FEXELgpjVSnB+dqkyFq3Tny2G8lAz1OtN0TZdE3wgbqL8XtsE5Ut1NayTqmPNmEhJVC0f6ZfMop0HP5VawTxA+lq1XoeRAoIGH0ojuV+9O13sh2V2zoxj5jVyNGuZDtqZVlEeSIRI05PVi7nZfKw+EuT5YTkdX/qnx/AmQXABJR8mEbt5A8Oab2RqMdG+P0zvDI0gODnGDSO2w4ZOrD1zi5LnYaIljibbOMhpDWcwsd6Ry5eUmiLQ24OpaErO6a3/sYLybm9xOJLqfn7DNg/5SKBxEfKNyyUYP4KtkSMQI5Xo7dHcIhqH4l3CRK/gB7WtFU6bj0mReNJIitL8grYbUyZpqDuMDT5s5WQsWjOEmRSbMiH7HIkEIPvRu0WxMnRCJKjGFWdlKGqK96T7jlsEHCjsPjk/9VEQ4W5qB2tRAFGJ5YGgbmyYxqxGxduvkNdd3IZKcIbvtEtH4X7aHeyV4Dcn4wkEzUNRRhISM51Av5I1mwi2lj3DP8d6K9iFzNVDCSb+eb9pBu+SEqYrvFC8WKSi8OcZDj50KV871120hgz6n6OZy1KOh8OzKNuCKFt9mVlUfJKzD9gcuL53q+oTHGGIKFz4+4/zLC13N3l3y4Fn9dzM02uGyBGoJXmF3jrwW9OguOsh1FVykE1suM6kC/e005VRngkgcn29tixbfGSx7k8JzTId+5wTXE1HgKXCtGlwA7L6FxS+RUGGP2az1Em91D7THACjjqlVdoDOltQ7Yb4S8n4kG/m/CvtFfQB0e/e/JMgICLGKds6v5THENB7WYOdJ0P5s3GQzdbeXjUAG5Y2WCUBs5LZ6xDZzv1L7jfUHqBbmnHW7U4g+UTYB/tW7B0Ya0JAbpzWFSoVQH6CbY6q9fM8ccelwWdxeWdjZm+TcmBAHpje+emw8T5mUgl7Omvks7D2xk04/HjynzVyBN2dI3dBgxTkB1keL9tMN0WgyjY0ddKI8pigHP9lOa8hb7F2bZIa/FqS6JJPPHnlyPbVl+weIG7j4ocmWH/OkvaT4qtcbnafk2ocwOkjSqUob66ehit1UDMwKXreD2R92MZugTHNe/PWAZesANg9eBbm2p+4kqK52j8MW3AhqaffDN+kK195DUM4FLVYm8BQhOF+OWoM5tTD8LImCNRenutbU6qRxpaMDXCBU37/K3Y7eobcg/IaZaBuw44FteI67Hdgufk5VqCDjlK7jDBUtVq07hpPI9ymWW/m3nNLQlusNGDSBNYXOUBDRWNnHira/1eo9GEwVgpXn2tG1PUUxT15p/fbfGXCvpsj0QlzwErC0ge/Oqlsh7E0QhpqDAcvlBJOiXDD/bv01SkM269rmghWHJPUbmpq4trj7H6cCMXMIwWgOLaTXR0w3tamzJpReC8FXDNwkxSCbmg/ag17JdPyptz7mR3k6KvXor6tFCfEv85TW7CDWLEap1AC12Ym+LK9/CxdKPnXz9Qz4xNXGn3sG1wAfthifQfjDyiCnLo2uhuMzI9yKxH4PUTt52mReMLmnHFrrLpDYcPC+cU7ge55guYhGv/ANB92YzoXrI+Hs6gdXnnfE8GGhfydGwvKBKCtpDecGnu41Mz28j9/LTVtSV9WZEoxANMgPGo4BDbY2p69ixYGQWATdyg9TRDAK7f/Lrlubat60yuVZ9wcwqZ7NBP71mX6NEgdvfK1EgMnkZzsDQl/wWDHdAoOYCo4pKwY5I/V26cKTO4aMYcV/YDdgglOtas2KtIXBJAcgotsV4YfF+CDN4T5WdX808VdXh3/UXLrAdcMDF3QIXj1HyUHIOkXBH7DXICbJt9eNiowRXiuB0d1J/FqjPFe2IlNdXnwFwpRusB5PLSv0Lk/AdI1gQmao8wwLmnoh/L9riMbMMsWAOI+5B71d+lGTKlxx4hQn4ixRfedyZUUsRcpGrgAS1XqCKzggl0/LFuyQpe9BsgvZGkEHQ4ELkl6bcLtiHZ+7uFxmRjnV7v8PP1Whug1igIT3OTMnmb/dGJPuGKY5fRdvWoatxfNU3ABi+fY7eHiPqC0gQDpAC19twVfWBtBur+ST+y7fzmSE5Q0C3mcp8/31XIdqm7sEZJHtFnXBgaTyG+fWRGAY70K10IBvKH2TE6IMzm1k92/Cn2payTupKTtojgP3uaWIgFVgV0lD0WGR0PanqiKtrBFwqznvb/rz2PgpSjWd2BESLQpxY+6tmKXZnjvY9xfR12CQ8o/aKz1t+XxCSzy0uE5f/kaFUCrwxjL8gT7SEUJshp//5/yvPFJHgJlgsvXp+gRQCSzz+vS6rl3BhMsbj/HzwJYz8GsWppOQDGVswlOHEaFE/qhImhDrt2DUfNxtt21GW7KwJRn9/mtYIjlnnwgESPEpwoLyTru3SsVGzRxnZG6x+BiseUs57lTdb3H8KG7UPeH1SSjy9wZHELnar9x5cOtOR7lOvyjWm4Ab18Q+qoMxxLCFit0V8SmOu7AU8XGY3eSXb6Ly+kaQmDkRlOstgmcj+rD34KNz7LTvLL0O1Z9J/nCjp+1flOFgtbd7Yg0t5eNrPuppxYxJfSpnJRNL4S3YTffnV+x+zVsuioseET/On2wNi/TnL2rAQIKswi7Er3Sv48D/+PLsa2WJOSk6DqcCLmusILDiz0FwKEhMewrxtNyM2IAE0/6hiopIQoUgC6U8CLirhWbfVibSnCGZlF5uywIcaUlcEaYP/evokbi1NSquO62XNnWR4+fB3M1N7LaI5pwdHYOKEjg9OaSiTtEDypKGOVxZhdQS0jEvZ46foNS4SBpwZfPn60p6pQldNUmimhWeU5LUnEpZYjPJU6hmAsh4AKaLFfJANrZ9ou428yoEIFuiY9UgOYkqtSUocWxyijxK+NTtuDdbh7NJcyLIl6CUBWQjZiL34Bk0Qe3vmT9tpIKus3r5CvEdEu5Va2Wxm8CQJT9bESzuFBeH0QIRybKFAUVqNa9tCXukd1jwLXYKWsuMuFda8R1UjVG2cvAZ+R3lBV+nLksL4Ti6lubX3hKFcSyFsG5rK9pJt5nlSGIkBLP/HFqLL/KX0S96NdOo4CS+GYPBk+lBZxz6Yie12vvUj8l4t1ik/5PmvbLOTPCcaoPeZ7APUQIKIcxcNUDin3R1okbeAUGwt7Ja3G0ntQokBhlajisyXeqbfPLrTTKpTauclKp+DGdyBsbzFHEYtIqZnlLe5wjluF/UID6EgwWPGj0FVKM59Jom3+0Y1QTb+IKqHZv/0FIEEuVItlJHSixdza2w0UN80Hyc/eUGv6SBybC/EEs9cOcLBR1eeQXXe7p7hfIhtxxBrGhk9n7jom/4LXF125WzPmMCUiNyE8iO7sVSmRf/iSNFBveZWGPeCirfJ8a43fk5jCfA3NPEJyMAamu3Q5im0DKo8aonWXtye9iE8vraixlVTAGSXFMjP3+XiOE9jrnXTDzARnt7+9gvHctQpaAI0za6N7bq9R1lb55jILwmx4Ih4OA0K1/Xx7B9jytPFBRhEO8xqXLhxotsIRjnGRvnkMK/KJ1YhE9T2mNmclLYgMSn+7dzik8BzoHt+EcXstV8yNpTspqsnS96ATq3A66NbF449w9JqViBt4gWi7yVzt3kR4XSJ8iEB5anMqG+EsSyrMQVv0sMeEysGx+yYs6G2xPJw3zqTq4RzDQXPhYra/VMlt7E8zzl4D7L3HS3kkWf4ZkmFmnjcENPQdkmohl6p/gqkOg+8McyzNxxb5Fl19DsSr3MTuSMqhSKDn95ibzYCEdrZXJiKaqu7BFBuju+jSObOPchog2IsE/u/3U/UK2mntvSnD0qNkPYoRTskBnLJ3NJamL0V4sEbryX8NMr7MKMJ0+h2+xMKY4KERpvUrd0c6ABXWHqLdY1QTugC/5dhdoLy3+KwgG5FnL0MZw6qvOvHkKQRoQrcKLuwUld15s05QxurH67A9eAr02a/vUWNBIgP6vOa69ZZuZKElWttIerRDGIAkZ54fw7HBctSZtfspPxaliwbOEH/Laxot3ZQonzvXknSVodzZHA1Jw7BcNRsYvl+KJ0Y6pMRPpIbaN/QSuHtnjUoej+vlVhq5021xMUPKxCK/D8rSRbOmduHG85/JrIimgo5wXWP83lLvRaxwCxeTGVt44fTUqsfUARmQcS3f5DbHR9SZ4nJYIEvcCjIqLezJ3I6S7xBop57j3ZyMQX0Xxr5mc6IUmrlOXM9fJG5iDZQQ9rWsGZ0Y26GzTAEsD6pjPuDa1XAT1MRpxyZ8zN53sl1YEV0E0EHvZqcnBnqMTXRh6zC9PwDXEk3OHs2zLLIjBhY5+7lDxp1X0qcm8XtWorat33mUx+kEDDgaDUdpclQq/ZM6mMYoF433nKbCKDxCozugSPVaRjNPosMDy8FujvIJSb763XuBGBIYLS9x+HZhYiUa9xod0xKV9aRt7yczWWlLgfK8qn4fULHMBSP48m/wTWfDBdTH8uDAKt5WM033+2bCpxDhmZtE+d7XP65yBTOf9/EWaCG+Gs9/5kVbWS0JlfoDH6Si2tVCzCRGfV0XZAUWfXOMJ5F9dkMagbwaeqVqqbVONDQGg8zID5MUV7IkazdAz4JLOXsn1RuZnoZNIGV2Na15+dRKYUAmXFmkWBJpPMBwT8N4bd8VZwBnhm3WzH9S0sbpoP0sgf2OmPvQ6smMyfkVK+OLjXYubmtioAhdwDb5/pLRg3PGwfHEz6v9OOe4AK8iw2cma49tV44In8Rc9jGcqSQlFXPdlC8366ke4U/ITFy0/SQBl1vWvGk40KycwWGaLf8cCtEi/4X2W8961i6lYnpfNQhGcQyC8s2oIOW+Pw545Thq3ZBEyNC8YDr/pzCEmBI8U3A4IiQJoHiD9kUMNd8wfzysC2Kqc4OGeWYsJxmDev4Jn4HV+vqpgN6xxSEMABhRMdTteHiJAgnQEX9BR2V1sNqh5EcMvQNYYa5+bblQn7Rli1UFCtQkP6ECmGkxmPNkg2CGS2mmf0/WEuTZSyPMtbbrnftPgleOmJ3jSm0m1EU9fQHQo1NZti+KczpJ8mSYIVtXzXh4rNJcL3Fm7Bbftpjmj5UnuDpPk8HvqKOj2DGJyk4R0Md1x7umiH0DTOXaLwO0EI94k7n6R8nfqiwekgUQZ1rRek0HViM5YN0JLWp4f4NRE8ErcGNSHZd58+9Kx8lmkc9ogfQmX0rX1kB8QQzNbH+eVDee0jOQNUgQcew3y+0QbifXrtLHXDIxsqsej41Kz7vfcQRE1zUnY2phYNILK8a657zyHNMzPiRhxs28s1JX2kiCMEloubOXnc8BzU+n7LM9wztf63eFWN/eWHXVivSdCWg5DfWsk2CF8aFJrOP277QEPdkWlOlewCVEkLjyd5wUn9ZzaKOJKnDQDLfliiRLTKlU8TOeQj8jOU8FfpM9tayJTDpxw6sVlZuJRAILfxn+QAGIB/W1FGDjuuVu62hFDBdvzVSfge95Ebf9pclp0GrpV3S+gwBWn5J7aGiim/fRyIN7YVVXJsnAnVeq90vDdAV0XearTqjT2Ck/AMkBW6T/ls/6VUVnFWs01wxkahKR0tRwyLRKgHefm3RWie/pTVQpUMZw+/7ozQSW+7vuZd8lsvT1iX5rwlpiaFnOnDbHsr1As6vLETd5HVbcBCGbJHcS7ax9Byd50jdYyagUtjAaHYX8ryyuR/bDkw1o4j8+hXMfbzy+CVmgrfRDyl4dn+5LxrqRAXLoDKpQREAHqdLSsVSJh1s8KnZ/SsUVq27cq+O6LMSBmhT4X3E750rmWwCsoCre6bT//oFWYALjp2SbcxnULBaTvnYDHtfEbO1m/3c9nJk8ZO5KHQTV88ivTWN/S2EXwmisTPdcupMrvI8e48QZdkZu9WHyKron7MKhGFJw6Z0KZ3tleVrvvJo89siUwByPY+Hs4gkKPBQbLQOaedcv/xeM+Ih8rl1eHEC/C65xWVciToVqSGp9HfbhVzFSrO6kBnv7mJwnRLvMEwqiNankVdJJMw4icU3lKyw/ecNSWIUddqlbThYMiq8nHjRRufs+28cq0OI9zhpvxFvFgSZE/eAYvm0x+9lZO+EH9NkBngaqU1NMYhdombNuy3awUN9p0mJQ//e9L65YbShgoc+ZUlNy+c6F6gDEHXV0JrzevPIZFAe2RyRa2dNqzLvihAAMCszYueqszzXRkSyobx5+LTLK2V3lfg3wbS9DzP3QW7VHdHbjZcttQRvtjrGveJnNn2DE2ZDIbvkCrT0H8RzbGDdmIq4P1ey+hoY/W6NuZKOz4dv4HUNznxdKV1Wf3MvqUv35r2jTKvpPWBUWNm5fytX/QJwp6qkIOsSx7Y67BSCbCDVLM8/VcMG+T0j+INrgL9sfT1ICtACH8BI0G6ViUZPVzzCmQHW2oVIwZjAoFl6+meO/pD8teO1E+1y03mCpYfW9S8qhtH2GhlFlebPf4NbezVv9xbXKWz0xezRNQWqUqtYRTUbuzK7KTvjG4rQHfzBpVmK4wDLnSIwdSzTSk1fPNeY0WOpPZTLlvQ59xwgfFrb326vT2hS1JAZ9E6sujFtKTiJ7bxI6o4cBhDaX+adXREThhR+MwA4TqD7rga/o9iY7d6TVRe14CS2S3iSQsD0R6ApnhG/2Wa0A0AY2NtWTjmabdKU+KgIRDP9RQYVjXiF1qC+xyNVG03I9vpmEpY/G/zC4nLOKgXAZ/uTikHI9Afbkhfgfgo9arWbix5eH7WUo9RQygDzwCnVSjbXc7MihEufVj6WGbK963pw8VjY3RS8IH1cy2yZbIcKLO5CgAUcXJfF2+McnDLKtXxyZaf7SPA6KJq+zF2NHyfoeTOwHhGqNcnHVr1hT73pcoyXyfvCYBnG1Bp/aR9t8hoI7CXM3UZOisWGA1SHZ2jf7k9GlRnp3mF/c1AV+JjvUsnZrsybEOQJg/dn/9eJkyykQHjbF56zgcPX6DdMG03WKUMlYz+uOZ+5DZy9E9MZOZ9GMoLFdrIPPQQLjv+GlCMpoyHPXkzIODjHAID2PrnaRpqWVHh0rnieDILKq+Emrd5RnjgE9pDUXWTmHaKuqqYlcgEz4zbi46dbWrAAFBjsQq1rLHIiPJEcwFLCOY4JNlXRXQJqCUKXk2d1RSBGzDP6HDSpo863BhVRFFF6uIpjQV7j5ebFe3UkkO/+coIo2BTAcgBqOtQ134s9a4QJvofuqBYMGOBMsWZ+sn/2AOxDx6SfAnDFGw==' + const $87431ee93b037844$var$bluenoiseBits = Uint8Array.from(atob($06269ad78f3c5fdf$export$2e2bcd8739ae039), (tt) => + tt.charCodeAt(0), + ) + function $87431ee93b037844$var$checkTimerQuery(tt, et, nt) { + if (et.getQueryParameter(tt, et.QUERY_RESULT_AVAILABLE)) { + const ot = et.getQueryParameter(tt, et.QUERY_RESULT) / 1e6 + nt.lastTime = ot + } else + setTimeout(() => { + $87431ee93b037844$var$checkTimerQuery(tt, et, nt) + }, 1) + } + class $87431ee93b037844$export$2489f9981ab0fa82 extends Pass { + constructor(et, nt, rt = 512, it = 512) { + super(), + (this.width = rt), + (this.height = it), + (this.clear = !0), + (this.camera = nt), + (this.scene = et), + (this.autosetGamma = !0), + (this.configuration = new Proxy( + { + aoSamples: 16, + aoRadius: 5, + denoiseSamples: 8, + denoiseRadius: 12, + distanceFalloff: 1, + intensity: 5, + denoiseIterations: 2, + renderMode: 0, + color: new Color$1(0, 0, 0), + gammaCorrection: !0, + logarithmicDepthBuffer: !1, + screenSpaceRadius: !1, + halfRes: !1, + depthAwareUpsampling: !0, + colorMultiply: !0, + }, + { + set: (ot, at, st) => { + const lt = ot[at] + return ( + (ot[at] = st), + at === 'aoSamples' && lt !== st && this.configureAOPass(this.configuration.logarithmicDepthBuffer), + at === 'denoiseSamples' && + lt !== st && + this.configureDenoisePass(this.configuration.logarithmicDepthBuffer), + at === 'halfRes' && + lt !== st && + (this.configureAOPass(this.configuration.logarithmicDepthBuffer), + this.configureHalfResTargets(), + this.configureEffectCompositer(this.configuration.logarithmicDepthBuffer), + this.setSize(this.width, this.height)), + at === 'depthAwareUpsampling' && + lt !== st && + this.configureEffectCompositer(this.configuration.logarithmicDepthBuffer), + at === 'gammaCorrection' && (this.autosetGamma = !1), + !0 + ) + }, + }, + )), + (this.samples = []), + (this.samplesR = []), + (this.samplesDenoise = []), + this.configureEffectCompositer(this.configuration.logarithmicDepthBuffer), + this.configureSampleDependentPasses(), + this.configureHalfResTargets(), + (this.copyQuad = new $e4ca8dcb0218f846$export$dcd670d73db751f5( + new ShaderMaterial({ + uniforms: { tDiffuse: { value: null } }, + depthWrite: !1, + vertexShader: ` + varying vec2 vUv; + void main() { + vUv = uv; + gl_Position = vec4(position, 1); + } + `, + fragmentShader: ` + uniform sampler2D tDiffuse; + varying vec2 vUv; + void main() { + gl_FragColor = texture2D(tDiffuse, vUv); + } + `, + }), + )), + (this.writeTargetInternal = new WebGLRenderTarget(this.width, this.height, { + minFilter: LinearFilter, + magFilter: LinearFilter, + depthBuffer: !1, + })), + (this.readTargetInternal = new WebGLRenderTarget(this.width, this.height, { + minFilter: LinearFilter, + magFilter: LinearFilter, + depthBuffer: !1, + })), + (this.outputTargetInternal = new WebGLRenderTarget(this.width, this.height, { + minFilter: LinearFilter, + magFilter: LinearFilter, + depthBuffer: !1, + })), + (this.bluenoise = new DataTexture($87431ee93b037844$var$bluenoiseBits, 128, 128)), + (this.bluenoise.colorSpace = NoColorSpace$1), + (this.bluenoise.wrapS = RepeatWrapping), + (this.bluenoise.wrapT = RepeatWrapping), + (this.bluenoise.minFilter = NearestFilter), + (this.bluenoise.magFilter = NearestFilter), + (this.bluenoise.needsUpdate = !0), + (this.lastTime = 0), + (this.needsDepthTexture = !0), + (this.needsSwap = !0), + (this._r = new Vector2()), + (this._c = new Color$1()) + } + configureHalfResTargets() { + this.configuration.halfRes + ? ((this.depthDownsampleTarget = new WebGLMultipleRenderTargets(this.width / 2, this.height / 2, 2)), + (this.depthDownsampleTarget.texture[0].format = RedFormat), + (this.depthDownsampleTarget.texture[0].type = FloatType), + (this.depthDownsampleTarget.texture[0].minFilter = NearestFilter), + (this.depthDownsampleTarget.texture[0].magFilter = NearestFilter), + (this.depthDownsampleTarget.texture[0].depthBuffer = !1), + (this.depthDownsampleTarget.texture[1].format = RGBAFormat), + (this.depthDownsampleTarget.texture[1].type = HalfFloatType), + (this.depthDownsampleTarget.texture[1].minFilter = NearestFilter), + (this.depthDownsampleTarget.texture[1].magFilter = NearestFilter), + (this.depthDownsampleTarget.texture[1].depthBuffer = !1), + (this.depthDownsampleQuad = new $e4ca8dcb0218f846$export$dcd670d73db751f5( + new ShaderMaterial($26aca173e0984d99$export$1efdf491687cd442), + ))) + : (this.depthDownsampleTarget && (this.depthDownsampleTarget.dispose(), (this.depthDownsampleTarget = null)), + this.depthDownsampleQuad && (this.depthDownsampleQuad.dispose(), (this.depthDownsampleQuad = null))) + } + configureSampleDependentPasses() { + this.configureAOPass(this.configuration.logarithmicDepthBuffer), + this.configureDenoisePass(this.configuration.logarithmicDepthBuffer) + } + configureAOPass(et = !1) { + ;(this.samples = this.generateHemisphereSamples(this.configuration.aoSamples)), + (this.samplesR = this.generateHemisphereSamplesR(this.configuration.aoSamples)) + const nt = { ...$1ed45968c1160c3c$export$c9b263b9a17dffd7 } + ;(nt.fragmentShader = nt.fragmentShader + .replace('16', this.configuration.aoSamples) + .replace('16.0', this.configuration.aoSamples + '.0')), + et && + (nt.fragmentShader = + `#define LOGDEPTH +` + nt.fragmentShader), + this.configuration.halfRes && + (nt.fragmentShader = + `#define HALFRES +` + nt.fragmentShader), + this.effectShaderQuad + ? (this.effectShaderQuad.material.dispose(), (this.effectShaderQuad.material = new ShaderMaterial(nt))) + : (this.effectShaderQuad = new $e4ca8dcb0218f846$export$dcd670d73db751f5(new ShaderMaterial(nt))) + } + configureDenoisePass(et = !1) { + this.samplesDenoise = this.generateDenoiseSamples(this.configuration.denoiseSamples, 11) + const nt = { ...$e52378cd0f5a973d$export$57856b59f317262e } + ;(nt.fragmentShader = nt.fragmentShader.replace('16', this.configuration.denoiseSamples)), + et && + (nt.fragmentShader = + `#define LOGDEPTH +` + nt.fragmentShader), + this.poissonBlurQuad + ? (this.poissonBlurQuad.material.dispose(), (this.poissonBlurQuad.material = new ShaderMaterial(nt))) + : (this.poissonBlurQuad = new $e4ca8dcb0218f846$export$dcd670d73db751f5(new ShaderMaterial(nt))) + } + configureEffectCompositer(et = !1) { + const nt = { ...$12b21d24d1192a04$export$a815acccbd2c9a49 } + et && + (nt.fragmentShader = + `#define LOGDEPTH +` + nt.fragmentShader), + this.configuration.halfRes && + this.configuration.depthAwareUpsampling && + (nt.fragmentShader = + `#define HALFRES +` + nt.fragmentShader), + this.effectCompositerQuad + ? (this.effectCompositerQuad.material.dispose(), + (this.effectCompositerQuad.material = new ShaderMaterial(nt))) + : (this.effectCompositerQuad = new $e4ca8dcb0218f846$export$dcd670d73db751f5(new ShaderMaterial(nt))) + } + generateHemisphereSamples(et) { + const nt = [] + for (let rt = 0; rt < et; rt++) { + const it = 2.399963 * rt, + ot = Math.sqrt(rt + 0.5) / Math.sqrt(et), + at = ot * Math.cos(it), + st = ot * Math.sin(it), + lt = Math.sqrt(1 - (at * at + st * st)) + nt.push(new Vector3(at, st, lt)) + } + return nt + } + generateHemisphereSamplesR(et) { + let nt = [] + for (let rt = 0; rt < et; rt++) nt.push((rt + 1) / et) + return nt + } + generateDenoiseSamples(et, nt) { + const rt = (2 * Math.PI * nt) / et, + it = 1 / et, + ot = it, + at = [] + let st = it, + lt = 0 + for (let ct = 0; ct < et; ct++) + at.push(new Vector2(Math.cos(lt), Math.sin(lt)).multiplyScalar(Math.pow(st, 0.75))), (st += ot), (lt += rt) + return at + } + setSize(et, nt) { + ;(this.width = et), (this.height = nt) + const rt = this.configuration.halfRes ? 0.5 : 1 + this.writeTargetInternal.setSize(et * rt, nt * rt), + this.readTargetInternal.setSize(et * rt, nt * rt), + this.configuration.halfRes && this.depthDownsampleTarget.setSize(et * rt, nt * rt), + this.outputTargetInternal.setSize(et, nt) + } + setDepthTexture(et) { + this.depthTexture = et + } + render(et, nt, rt) { + const it = et.xr.enabled + ;(et.xr.enabled = !1), + et.capabilities.logarithmicDepthBuffer !== this.configuration.logarithmicDepthBuffer && + ((this.configuration.logarithmicDepthBuffer = et.capabilities.logarithmicDepthBuffer), + this.configureAOPass(this.configuration.logarithmicDepthBuffer), + this.configureDenoisePass(this.configuration.logarithmicDepthBuffer), + this.configureEffectCompositer(this.configuration.logarithmicDepthBuffer)), + nt.texture.type !== this.outputTargetInternal.texture.type && + ((this.outputTargetInternal.texture.type = nt.texture.type), + (this.outputTargetInternal.texture.needsUpdate = !0)) + let ot, at, st + this.debugMode && + ((ot = et.getContext()), + (at = ot.getExtension('EXT_disjoint_timer_query_webgl2')), + at === null && + (console.error('EXT_disjoint_timer_query_webgl2 not available, disabling debug mode.'), + (this.debugMode = !1))), + this.debugMode && ((st = ot.createQuery()), ot.beginQuery(at.TIME_ELAPSED_EXT, st)), + this.camera.updateMatrixWorld(), + this._r.set(this.width, this.height) + let lt = this.configuration.aoRadius + this.configuration.halfRes && this.configuration.screenSpaceRadius && (lt *= 0.5), + this.configuration.halfRes && + (et.setRenderTarget(this.depthDownsampleTarget), + (this.depthDownsampleQuad.material.uniforms.sceneDepth.value = this.depthTexture), + (this.depthDownsampleQuad.material.uniforms.resolution.value = this._r), + (this.depthDownsampleQuad.material.uniforms.near.value = this.camera.near), + (this.depthDownsampleQuad.material.uniforms.far.value = this.camera.far), + (this.depthDownsampleQuad.material.uniforms.projectionMatrixInv.value = this.camera.projectionMatrixInverse), + (this.depthDownsampleQuad.material.uniforms.viewMatrixInv.value = this.camera.matrixWorld), + (this.depthDownsampleQuad.material.uniforms.logDepth.value = this.configuration.logarithmicDepthBuffer), + this.depthDownsampleQuad.render(et)), + (this.effectShaderQuad.material.uniforms.sceneDiffuse.value = nt.texture), + (this.effectShaderQuad.material.uniforms.sceneDepth.value = this.configuration.halfRes + ? this.depthDownsampleTarget.texture[0] + : this.depthTexture), + (this.effectShaderQuad.material.uniforms.sceneNormal.value = this.configuration.halfRes + ? this.depthDownsampleTarget.texture[1] + : null), + (this.effectShaderQuad.material.uniforms.projMat.value = this.camera.projectionMatrix), + (this.effectShaderQuad.material.uniforms.viewMat.value = this.camera.matrixWorldInverse), + (this.effectShaderQuad.material.uniforms.projViewMat.value = this.camera.projectionMatrix + .clone() + .multiply(this.camera.matrixWorldInverse.clone())), + (this.effectShaderQuad.material.uniforms.projectionMatrixInv.value = this.camera.projectionMatrixInverse), + (this.effectShaderQuad.material.uniforms.viewMatrixInv.value = this.camera.matrixWorld), + (this.effectShaderQuad.material.uniforms.cameraPos.value = this.camera.getWorldPosition(new Vector3())), + (this.effectShaderQuad.material.uniforms.resolution.value = this.configuration.halfRes + ? this._r.clone().multiplyScalar(0.5).floor() + : this._r), + (this.effectShaderQuad.material.uniforms.time.value = performance.now() / 1e3), + (this.effectShaderQuad.material.uniforms.samples.value = this.samples), + (this.effectShaderQuad.material.uniforms.samplesR.value = this.samplesR), + (this.effectShaderQuad.material.uniforms.bluenoise.value = this.bluenoise), + (this.effectShaderQuad.material.uniforms.radius.value = lt), + (this.effectShaderQuad.material.uniforms.distanceFalloff.value = this.configuration.distanceFalloff), + (this.effectShaderQuad.material.uniforms.near.value = this.camera.near), + (this.effectShaderQuad.material.uniforms.far.value = this.camera.far), + (this.effectShaderQuad.material.uniforms.logDepth.value = et.capabilities.logarithmicDepthBuffer), + (this.effectShaderQuad.material.uniforms.ortho.value = this.camera.isOrthographicCamera), + (this.effectShaderQuad.material.uniforms.screenSpaceRadius.value = this.configuration.screenSpaceRadius), + et.setRenderTarget(this.writeTargetInternal), + this.effectShaderQuad.render(et) + for (let ct = 0; ct < this.configuration.denoiseIterations; ct++) + ([this.writeTargetInternal, this.readTargetInternal] = [this.readTargetInternal, this.writeTargetInternal]), + (this.poissonBlurQuad.material.uniforms.tDiffuse.value = this.readTargetInternal.texture), + (this.poissonBlurQuad.material.uniforms.sceneDepth.value = this.configuration.halfRes + ? this.depthDownsampleTarget.texture[0] + : this.depthTexture), + (this.poissonBlurQuad.material.uniforms.projMat.value = this.camera.projectionMatrix), + (this.poissonBlurQuad.material.uniforms.viewMat.value = this.camera.matrixWorldInverse), + (this.poissonBlurQuad.material.uniforms.projectionMatrixInv.value = this.camera.projectionMatrixInverse), + (this.poissonBlurQuad.material.uniforms.viewMatrixInv.value = this.camera.matrixWorld), + (this.poissonBlurQuad.material.uniforms.cameraPos.value = this.camera.getWorldPosition(new Vector3())), + (this.poissonBlurQuad.material.uniforms.resolution.value = this.configuration.halfRes + ? this._r.clone().multiplyScalar(0.5).floor() + : this._r), + (this.poissonBlurQuad.material.uniforms.time.value = performance.now() / 1e3), + (this.poissonBlurQuad.material.uniforms.blueNoise.value = this.bluenoise), + (this.poissonBlurQuad.material.uniforms.radius.value = + this.configuration.denoiseRadius * (this.configuration.halfRes ? 0.5 : 1)), + (this.poissonBlurQuad.material.uniforms.worldRadius.value = lt), + (this.poissonBlurQuad.material.uniforms.distanceFalloff.value = this.configuration.distanceFalloff), + (this.poissonBlurQuad.material.uniforms.index.value = ct), + (this.poissonBlurQuad.material.uniforms.poissonDisk.value = this.samplesDenoise), + (this.poissonBlurQuad.material.uniforms.near.value = this.camera.near), + (this.poissonBlurQuad.material.uniforms.far.value = this.camera.far), + (this.poissonBlurQuad.material.uniforms.logDepth.value = et.capabilities.logarithmicDepthBuffer), + (this.poissonBlurQuad.material.uniforms.screenSpaceRadius.value = this.configuration.screenSpaceRadius), + et.setRenderTarget(this.writeTargetInternal), + this.poissonBlurQuad.render(et) + ;(this.effectCompositerQuad.material.uniforms.sceneDiffuse.value = nt.texture), + (this.effectCompositerQuad.material.uniforms.sceneDepth.value = this.depthTexture), + (this.effectCompositerQuad.material.uniforms.near.value = this.camera.near), + (this.effectCompositerQuad.material.uniforms.far.value = this.camera.far), + (this.effectCompositerQuad.material.uniforms.projectionMatrixInv.value = this.camera.projectionMatrixInverse), + (this.effectCompositerQuad.material.uniforms.viewMatrixInv.value = this.camera.matrixWorld), + (this.effectCompositerQuad.material.uniforms.logDepth.value = et.capabilities.logarithmicDepthBuffer), + (this.effectCompositerQuad.material.uniforms.ortho.value = this.camera.isOrthographicCamera), + (this.effectCompositerQuad.material.uniforms.downsampledDepth.value = this.configuration.halfRes + ? this.depthDownsampleTarget.texture[0] + : this.depthTexture), + (this.effectCompositerQuad.material.uniforms.resolution.value = this._r), + (this.effectCompositerQuad.material.uniforms.blueNoise.value = this.bluenoise), + (this.effectCompositerQuad.material.uniforms.intensity.value = this.configuration.intensity), + (this.effectCompositerQuad.material.uniforms.renderMode.value = this.configuration.renderMode), + (this.effectCompositerQuad.material.uniforms.screenSpaceRadius.value = this.configuration.screenSpaceRadius), + (this.effectCompositerQuad.material.uniforms.radius.value = lt), + (this.effectCompositerQuad.material.uniforms.distanceFalloff.value = this.configuration.distanceFalloff), + (this.effectCompositerQuad.material.uniforms.gammaCorrection.value = this.autosetGamma + ? this.renderToScreen + : this.configuration.gammaCorrection), + (this.effectCompositerQuad.material.uniforms.tDiffuse.value = this.writeTargetInternal.texture), + (this.effectCompositerQuad.material.uniforms.color.value = this._c + .copy(this.configuration.color) + .convertSRGBToLinear()), + (this.effectCompositerQuad.material.uniforms.colorMultiply.value = this.configuration.colorMultiply), + (this.effectCompositerQuad.material.uniforms.cameraPos.value = this.camera.getWorldPosition(new Vector3())), + (this.effectCompositerQuad.material.uniforms.fog.value = !!this.scene.fog), + this.scene.fog && + (this.scene.fog.isFog + ? ((this.effectCompositerQuad.material.uniforms.fogExp.value = !1), + (this.effectCompositerQuad.material.uniforms.fogNear.value = this.scene.fog.near), + (this.effectCompositerQuad.material.uniforms.fogFar.value = this.scene.fog.far)) + : this.scene.fog.isFogExp2 + ? ((this.effectCompositerQuad.material.uniforms.fogExp.value = !0), + (this.effectCompositerQuad.material.uniforms.fogDensity.value = this.scene.fog.density)) + : console.error(`Unsupported fog type ${this.scene.fog.constructor.name} in SSAOPass.`)), + et.setRenderTarget(this.outputTargetInternal), + this.effectCompositerQuad.render(et), + et.setRenderTarget(this.renderToScreen ? null : rt), + (this.copyQuad.material.uniforms.tDiffuse.value = this.outputTargetInternal.texture), + this.copyQuad.render(et), + this.debugMode && (ot.endQuery(at.TIME_ELAPSED_EXT), $87431ee93b037844$var$checkTimerQuery(st, ot, this)), + (et.xr.enabled = it) + } + enableDebugMode() { + this.debugMode = !0 + } + disableDebugMode() { + this.debugMode = !1 + } + setDisplayMode(et) { + this.configuration.renderMode = ['Combined', 'AO', 'No AO', 'Split', 'Split AO'].indexOf(et) + } + setQualityMode(et) { + et === 'Performance' + ? ((this.configuration.aoSamples = 8), + (this.configuration.denoiseSamples = 4), + (this.configuration.denoiseRadius = 12)) + : et === 'Low' + ? ((this.configuration.aoSamples = 16), + (this.configuration.denoiseSamples = 4), + (this.configuration.denoiseRadius = 12)) + : et === 'Medium' + ? ((this.configuration.aoSamples = 16), + (this.configuration.denoiseSamples = 8), + (this.configuration.denoiseRadius = 12)) + : et === 'High' + ? ((this.configuration.aoSamples = 64), + (this.configuration.denoiseSamples = 8), + (this.configuration.denoiseRadius = 6)) + : et === 'Ultra' && + ((this.configuration.aoSamples = 64), + (this.configuration.denoiseSamples = 16), + (this.configuration.denoiseRadius = 6)) + } + } + Uint8Array.from(atob($06269ad78f3c5fdf$export$2e2bcd8739ae039), (tt) => tt.charCodeAt(0)) + reactExports.forwardRef( + ( + { + halfRes: tt, + screenSpaceRadius: et, + quality: nt, + depthAwareUpsampling: rt = !0, + aoRadius: it = 5, + aoSamples: ot = 16, + denoiseSamples: at = 4, + denoiseRadius: st = 12, + distanceFalloff: lt = 1, + intensity: ct = 1, + color: ut, + renderMode: ht = 0, + }, + dt, + ) => { + const { camera: pt, scene: mt } = useThree(), + gt = reactExports.useMemo(() => new $87431ee93b037844$export$2489f9981ab0fa82(mt, pt), []) + return ( + reactExports.useLayoutEffect(() => { + applyProps(gt.configuration, { + color: ut, + aoRadius: it, + distanceFalloff: lt, + intensity: ct, + aoSamples: ot, + denoiseSamples: at, + denoiseRadius: st, + screenSpaceRadius: et, + renderMode: ht, + halfRes: tt, + depthAwareUpsampling: rt, + }) + }, [et, ut, it, lt, ct, ot, at, st, ht, tt, rt]), + reactExports.useLayoutEffect(() => { + nt && gt.setQualityMode(nt.charAt(0).toUpperCase() + nt.slice(1)) + }, [nt]), + jsxRuntimeExports.jsx('primitive', { ref: dt, object: gt }) + ) + }, + ) + function _objectWithoutPropertiesLoose$k(tt, et) { + if (tt == null) return {} + var nt = {}, + rt = Object.keys(tt), + it, + ot + for (ot = 0; ot < rt.length; ot++) (it = rt[ot]), !(et.indexOf(it) >= 0) && (nt[it] = tt[it]) + return nt + } + var _excluded$1$1 = ['color'], + ActivityLogIcon = reactExports.forwardRef(function (tt, et) { + var nt = tt.color, + rt = nt === void 0 ? 'currentColor' : nt, + it = _objectWithoutPropertiesLoose$k(tt, _excluded$1$1) + return reactExports.createElement( + 'svg', + Object.assign( + { width: '15', height: '15', viewBox: '0 0 15 15', fill: 'none', xmlns: 'http://www.w3.org/2000/svg' }, + it, + { ref: et }, + ), + reactExports.createElement('path', { + d: 'M0 1.5C0 1.22386 0.223858 1 0.5 1H2.5C2.77614 1 3 1.22386 3 1.5C3 1.77614 2.77614 2 2.5 2H0.5C0.223858 2 0 1.77614 0 1.5ZM4 1.5C4 1.22386 4.22386 1 4.5 1H14.5C14.7761 1 15 1.22386 15 1.5C15 1.77614 14.7761 2 14.5 2H4.5C4.22386 2 4 1.77614 4 1.5ZM4 4.5C4 4.22386 4.22386 4 4.5 4H11.5C11.7761 4 12 4.22386 12 4.5C12 4.77614 11.7761 5 11.5 5H4.5C4.22386 5 4 4.77614 4 4.5ZM0 7.5C0 7.22386 0.223858 7 0.5 7H2.5C2.77614 7 3 7.22386 3 7.5C3 7.77614 2.77614 8 2.5 8H0.5C0.223858 8 0 7.77614 0 7.5ZM4 7.5C4 7.22386 4.22386 7 4.5 7H14.5C14.7761 7 15 7.22386 15 7.5C15 7.77614 14.7761 8 14.5 8H4.5C4.22386 8 4 7.77614 4 7.5ZM4 10.5C4 10.2239 4.22386 10 4.5 10H11.5C11.7761 10 12 10.2239 12 10.5C12 10.7761 11.7761 11 11.5 11H4.5C4.22386 11 4 10.7761 4 10.5ZM0 13.5C0 13.2239 0.223858 13 0.5 13H2.5C2.77614 13 3 13.2239 3 13.5C3 13.7761 2.77614 14 2.5 14H0.5C0.223858 14 0 13.7761 0 13.5ZM4 13.5C4 13.2239 4.22386 13 4.5 13H14.5C14.7761 13 15 13.2239 15 13.5C15 13.7761 14.7761 14 14.5 14H4.5C4.22386 14 4 13.7761 4 13.5Z', + fill: rt, + fillRule: 'evenodd', + clipRule: 'evenodd', + }), + ) + }), + _excluded$o$1 = ['color'], + BarChartIcon = reactExports.forwardRef(function (tt, et) { + var nt = tt.color, + rt = nt === void 0 ? 'currentColor' : nt, + it = _objectWithoutPropertiesLoose$k(tt, _excluded$o$1) + return reactExports.createElement( + 'svg', + Object.assign( + { width: '15', height: '15', viewBox: '0 0 15 15', fill: 'none', xmlns: 'http://www.w3.org/2000/svg' }, + it, + { ref: et }, + ), + reactExports.createElement('path', { + d: 'M11.5 1C11.7761 1 12 1.22386 12 1.5V13.5C12 13.7761 11.7761 14 11.5 14C11.2239 14 11 13.7761 11 13.5V1.5C11 1.22386 11.2239 1 11.5 1ZM9.5 3C9.77614 3 10 3.22386 10 3.5V13.5C10 13.7761 9.77614 14 9.5 14C9.22386 14 9 13.7761 9 13.5V3.5C9 3.22386 9.22386 3 9.5 3ZM13.5 3C13.7761 3 14 3.22386 14 3.5V13.5C14 13.7761 13.7761 14 13.5 14C13.2239 14 13 13.7761 13 13.5V3.5C13 3.22386 13.2239 3 13.5 3ZM5.5 4C5.77614 4 6 4.22386 6 4.5V13.5C6 13.7761 5.77614 14 5.5 14C5.22386 14 5 13.7761 5 13.5V4.5C5 4.22386 5.22386 4 5.5 4ZM1.5 5C1.77614 5 2 5.22386 2 5.5V13.5C2 13.7761 1.77614 14 1.5 14C1.22386 14 1 13.7761 1 13.5V5.5C1 5.22386 1.22386 5 1.5 5ZM7.5 5C7.77614 5 8 5.22386 8 5.5V13.5C8 13.7761 7.77614 14 7.5 14C7.22386 14 7 13.7761 7 13.5V5.5C7 5.22386 7.22386 5 7.5 5ZM3.5 7C3.77614 7 4 7.22386 4 7.5V13.5C4 13.7761 3.77614 14 3.5 14C3.22386 14 3 13.7761 3 13.5V7.5C3 7.22386 3.22386 7 3.5 7Z', + fill: rt, + fillRule: 'evenodd', + clipRule: 'evenodd', + }), + ) + }), + _excluded$H = ['color'], + ButtonIcon = reactExports.forwardRef(function (tt, et) { + var nt = tt.color, + rt = nt === void 0 ? 'currentColor' : nt, + it = _objectWithoutPropertiesLoose$k(tt, _excluded$H) + return reactExports.createElement( + 'svg', + Object.assign( + { width: '15', height: '15', viewBox: '0 0 15 15', fill: 'none', xmlns: 'http://www.w3.org/2000/svg' }, + it, + { ref: et }, + ), + reactExports.createElement('path', { + d: 'M2 5H13C13.5523 5 14 5.44772 14 6V9C14 9.55228 13.5523 10 13 10H2C1.44772 10 1 9.55228 1 9V6C1 5.44772 1.44772 5 2 5ZM0 6C0 4.89543 0.895431 4 2 4H13C14.1046 4 15 4.89543 15 6V9C15 10.1046 14.1046 11 13 11H2C0.89543 11 0 10.1046 0 9V6ZM4.5 6.75C4.08579 6.75 3.75 7.08579 3.75 7.5C3.75 7.91421 4.08579 8.25 4.5 8.25C4.91421 8.25 5.25 7.91421 5.25 7.5C5.25 7.08579 4.91421 6.75 4.5 6.75ZM6.75 7.5C6.75 7.08579 7.08579 6.75 7.5 6.75C7.91421 6.75 8.25 7.08579 8.25 7.5C8.25 7.91421 7.91421 8.25 7.5 8.25C7.08579 8.25 6.75 7.91421 6.75 7.5ZM10.5 6.75C10.0858 6.75 9.75 7.08579 9.75 7.5C9.75 7.91421 10.0858 8.25 10.5 8.25C10.9142 8.25 11.25 7.91421 11.25 7.5C11.25 7.08579 10.9142 6.75 10.5 6.75Z', + fill: rt, + fillRule: 'evenodd', + clipRule: 'evenodd', + }), + ) + }), + _excluded$1w = ['color'], + CubeIcon = reactExports.forwardRef(function (tt, et) { + var nt = tt.color, + rt = nt === void 0 ? 'currentColor' : nt, + it = _objectWithoutPropertiesLoose$k(tt, _excluded$1w) + return reactExports.createElement( + 'svg', + Object.assign( + { width: '15', height: '15', viewBox: '0 0 15 15', fill: 'none', xmlns: 'http://www.w3.org/2000/svg' }, + it, + { ref: et }, + ), + reactExports.createElement('path', { + d: 'M7.28856 0.796908C7.42258 0.734364 7.57742 0.734364 7.71144 0.796908L13.7114 3.59691C13.8875 3.67906 14 3.85574 14 4.05V10.95C14 11.1443 13.8875 11.3209 13.7114 11.4031L7.71144 14.2031C7.57742 14.2656 7.42258 14.2656 7.28856 14.2031L1.28856 11.4031C1.11252 11.3209 1 11.1443 1 10.95V4.05C1 3.85574 1.11252 3.67906 1.28856 3.59691L7.28856 0.796908ZM2 4.80578L7 6.93078V12.9649L2 10.6316V4.80578ZM8 12.9649L13 10.6316V4.80578L8 6.93078V12.9649ZM7.5 6.05672L12.2719 4.02866L7.5 1.80176L2.72809 4.02866L7.5 6.05672Z', + fill: rt, + fillRule: 'evenodd', + clipRule: 'evenodd', + }), + ) + }), + _excluded$1H = ['color'], + DotIcon = reactExports.forwardRef(function (tt, et) { + var nt = tt.color, + rt = nt === void 0 ? 'currentColor' : nt, + it = _objectWithoutPropertiesLoose$k(tt, _excluded$1H) + return reactExports.createElement( + 'svg', + Object.assign( + { width: '15', height: '15', viewBox: '0 0 15 15', fill: 'none', xmlns: 'http://www.w3.org/2000/svg' }, + it, + { ref: et }, + ), + reactExports.createElement('path', { + d: 'M7.5 9.125C8.39746 9.125 9.125 8.39746 9.125 7.5C9.125 6.60254 8.39746 5.875 7.5 5.875C6.60254 5.875 5.875 6.60254 5.875 7.5C5.875 8.39746 6.60254 9.125 7.5 9.125ZM7.5 10.125C8.94975 10.125 10.125 8.94975 10.125 7.5C10.125 6.05025 8.94975 4.875 7.5 4.875C6.05025 4.875 4.875 6.05025 4.875 7.5C4.875 8.94975 6.05025 10.125 7.5 10.125Z', + fill: rt, + fillRule: 'evenodd', + clipRule: 'evenodd', + }), + ) + }), + _excluded$1W = ['color'], + DropdownMenuIcon = reactExports.forwardRef(function (tt, et) { + var nt = tt.color, + rt = nt === void 0 ? 'currentColor' : nt, + it = _objectWithoutPropertiesLoose$k(tt, _excluded$1W) + return reactExports.createElement( + 'svg', + Object.assign( + { width: '15', height: '15', viewBox: '0 0 15 15', fill: 'none', xmlns: 'http://www.w3.org/2000/svg' }, + it, + { ref: et }, + ), + reactExports.createElement('path', { + d: 'M7.49999 3.09998C7.27907 3.09998 7.09999 3.27906 7.09999 3.49998C7.09999 3.72089 7.27907 3.89998 7.49999 3.89998H14.5C14.7209 3.89998 14.9 3.72089 14.9 3.49998C14.9 3.27906 14.7209 3.09998 14.5 3.09998H7.49999ZM7.49998 5.1C7.27907 5.1 7.09998 5.27908 7.09998 5.5C7.09998 5.72091 7.27907 5.9 7.49998 5.9H14.5C14.7209 5.9 14.9 5.72091 14.9 5.5C14.9 5.27908 14.7209 5.1 14.5 5.1H7.49998ZM7.1 7.5C7.1 7.27908 7.27909 7.1 7.5 7.1H14.5C14.7209 7.1 14.9 7.27908 14.9 7.5C14.9 7.72091 14.7209 7.9 14.5 7.9H7.5C7.27909 7.9 7.1 7.72091 7.1 7.5ZM7.49998 9.1C7.27907 9.1 7.09998 9.27908 7.09998 9.5C7.09998 9.72091 7.27907 9.9 7.49998 9.9H14.5C14.7209 9.9 14.9 9.72091 14.9 9.5C14.9 9.27908 14.7209 9.1 14.5 9.1H7.49998ZM7.09998 11.5C7.09998 11.2791 7.27907 11.1 7.49998 11.1H14.5C14.7209 11.1 14.9 11.2791 14.9 11.5C14.9 11.7209 14.7209 11.9 14.5 11.9H7.49998C7.27907 11.9 7.09998 11.7209 7.09998 11.5ZM2.5 9.25003L5 6.00003H0L2.5 9.25003Z', + fill: rt, + fillRule: 'evenodd', + clipRule: 'evenodd', + }), + ) + }), + _excluded$25 = ['color'], + EyeNoneIcon = reactExports.forwardRef(function (tt, et) { + var nt = tt.color, + rt = nt === void 0 ? 'currentColor' : nt, + it = _objectWithoutPropertiesLoose$k(tt, _excluded$25) + return reactExports.createElement( + 'svg', + Object.assign( + { width: '15', height: '15', viewBox: '0 0 15 15', fill: 'none', xmlns: 'http://www.w3.org/2000/svg' }, + it, + { ref: et }, + ), + reactExports.createElement('path', { + d: 'M13.3536 2.35355C13.5488 2.15829 13.5488 1.84171 13.3536 1.64645C13.1583 1.45118 12.8417 1.45118 12.6464 1.64645L10.6828 3.61012C9.70652 3.21671 8.63759 3 7.5 3C4.30786 3 1.65639 4.70638 0.0760002 7.23501C-0.0253338 7.39715 -0.0253334 7.60288 0.0760014 7.76501C0.902945 9.08812 2.02314 10.1861 3.36061 10.9323L1.64645 12.6464C1.45118 12.8417 1.45118 13.1583 1.64645 13.3536C1.84171 13.5488 2.15829 13.5488 2.35355 13.3536L4.31723 11.3899C5.29348 11.7833 6.36241 12 7.5 12C10.6921 12 13.3436 10.2936 14.924 7.76501C15.0253 7.60288 15.0253 7.39715 14.924 7.23501C14.0971 5.9119 12.9769 4.81391 11.6394 4.06771L13.3536 2.35355ZM9.90428 4.38861C9.15332 4.1361 8.34759 4 7.5 4C4.80285 4 2.52952 5.37816 1.09622 7.50001C1.87284 8.6497 2.89609 9.58106 4.09974 10.1931L9.90428 4.38861ZM5.09572 10.6114L10.9003 4.80685C12.1039 5.41894 13.1272 6.35031 13.9038 7.50001C12.4705 9.62183 10.1971 11 7.5 11C6.65241 11 5.84668 10.8639 5.09572 10.6114Z', + fill: rt, + fillRule: 'evenodd', + clipRule: 'evenodd', + }), + ) + }), + _excluded$26 = ['color'], + EyeOpenIcon = reactExports.forwardRef(function (tt, et) { + var nt = tt.color, + rt = nt === void 0 ? 'currentColor' : nt, + it = _objectWithoutPropertiesLoose$k(tt, _excluded$26) + return reactExports.createElement( + 'svg', + Object.assign( + { width: '15', height: '15', viewBox: '0 0 15 15', fill: 'none', xmlns: 'http://www.w3.org/2000/svg' }, + it, + { ref: et }, + ), + reactExports.createElement('path', { + d: 'M7.5 11C4.80285 11 2.52952 9.62184 1.09622 7.50001C2.52952 5.37816 4.80285 4 7.5 4C10.1971 4 12.4705 5.37816 13.9038 7.50001C12.4705 9.62183 10.1971 11 7.5 11ZM7.5 3C4.30786 3 1.65639 4.70638 0.0760002 7.23501C-0.0253338 7.39715 -0.0253334 7.60288 0.0760014 7.76501C1.65639 10.2936 4.30786 12 7.5 12C10.6921 12 13.3436 10.2936 14.924 7.76501C15.0253 7.60288 15.0253 7.39715 14.924 7.23501C13.3436 4.70638 10.6921 3 7.5 3ZM7.5 9.5C8.60457 9.5 9.5 8.60457 9.5 7.5C9.5 6.39543 8.60457 5.5 7.5 5.5C6.39543 5.5 5.5 6.39543 5.5 7.5C5.5 8.60457 6.39543 9.5 7.5 9.5Z', + fill: rt, + fillRule: 'evenodd', + clipRule: 'evenodd', + }), + ) + }), + _excluded$2C = ['color'], + ImageIcon = reactExports.forwardRef(function (tt, et) { + var nt = tt.color, + rt = nt === void 0 ? 'currentColor' : nt, + it = _objectWithoutPropertiesLoose$k(tt, _excluded$2C) + return reactExports.createElement( + 'svg', + Object.assign( + { width: '15', height: '15', viewBox: '0 0 15 15', fill: 'none', xmlns: 'http://www.w3.org/2000/svg' }, + it, + { ref: et }, + ), + reactExports.createElement('path', { + d: 'M2.5 1H12.5C13.3284 1 14 1.67157 14 2.5V12.5C14 13.3284 13.3284 14 12.5 14H2.5C1.67157 14 1 13.3284 1 12.5V2.5C1 1.67157 1.67157 1 2.5 1ZM2.5 2C2.22386 2 2 2.22386 2 2.5V8.3636L3.6818 6.6818C3.76809 6.59551 3.88572 6.54797 4.00774 6.55007C4.12975 6.55216 4.24568 6.60372 4.32895 6.69293L7.87355 10.4901L10.6818 7.6818C10.8575 7.50607 11.1425 7.50607 11.3182 7.6818L13 9.3636V2.5C13 2.22386 12.7761 2 12.5 2H2.5ZM2 12.5V9.6364L3.98887 7.64753L7.5311 11.4421L8.94113 13H2.5C2.22386 13 2 12.7761 2 12.5ZM12.5 13H10.155L8.48336 11.153L11 8.6364L13 10.6364V12.5C13 12.7761 12.7761 13 12.5 13ZM6.64922 5.5C6.64922 5.03013 7.03013 4.64922 7.5 4.64922C7.96987 4.64922 8.35078 5.03013 8.35078 5.5C8.35078 5.96987 7.96987 6.35078 7.5 6.35078C7.03013 6.35078 6.64922 5.96987 6.64922 5.5ZM7.5 3.74922C6.53307 3.74922 5.74922 4.53307 5.74922 5.5C5.74922 6.46693 6.53307 7.25078 7.5 7.25078C8.46693 7.25078 9.25078 6.46693 9.25078 5.5C9.25078 4.53307 8.46693 3.74922 7.5 3.74922Z', + fill: rt, + fillRule: 'evenodd', + clipRule: 'evenodd', + }), + ) + }), + _excluded$2H = ['color'], + LapTimerIcon = reactExports.forwardRef(function (tt, et) { + var nt = tt.color, + rt = nt === void 0 ? 'currentColor' : nt, + it = _objectWithoutPropertiesLoose$k(tt, _excluded$2H) + return reactExports.createElement( + 'svg', + Object.assign( + { width: '15', height: '15', viewBox: '0 0 15 15', fill: 'none', xmlns: 'http://www.w3.org/2000/svg' }, + it, + { ref: et }, + ), + reactExports.createElement('path', { + d: 'M5.49998 0.5C5.49998 0.223858 5.72383 0 5.99998 0H7.49998H8.99998C9.27612 0 9.49998 0.223858 9.49998 0.5C9.49998 0.776142 9.27612 1 8.99998 1H7.99998V2.11922C9.09832 2.20409 10.119 2.56622 10.992 3.13572C11.0116 3.10851 11.0336 3.08252 11.058 3.05806L12.058 2.05806C12.3021 1.81398 12.6978 1.81398 12.9419 2.05806C13.186 2.30214 13.186 2.69786 12.9419 2.94194L11.967 3.91682C13.1595 5.07925 13.9 6.70314 13.9 8.49998C13.9 12.0346 11.0346 14.9 7.49998 14.9C3.96535 14.9 1.09998 12.0346 1.09998 8.49998C1.09998 5.13361 3.69904 2.3743 6.99998 2.11922V1H5.99998C5.72383 1 5.49998 0.776142 5.49998 0.5ZM2.09998 8.49998C2.09998 5.51764 4.51764 3.09998 7.49998 3.09998C10.4823 3.09998 12.9 5.51764 12.9 8.49998C12.9 11.4823 10.4823 13.9 7.49998 13.9C4.51764 13.9 2.09998 11.4823 2.09998 8.49998ZM7.49998 8.49998V4.09998C5.06992 4.09998 3.09998 6.06992 3.09998 8.49998C3.09998 10.93 5.06992 12.9 7.49998 12.9C8.715 12.9 9.815 12.4075 10.6112 11.6112L7.49998 8.49998Z', + fill: rt, + fillRule: 'evenodd', + clipRule: 'evenodd', + }), + ) + }), + _excluded$2J = ['color'], + LayersIcon = reactExports.forwardRef(function (tt, et) { + var nt = tt.color, + rt = nt === void 0 ? 'currentColor' : nt, + it = _objectWithoutPropertiesLoose$k(tt, _excluded$2J) + return reactExports.createElement( + 'svg', + Object.assign( + { width: '15', height: '15', viewBox: '0 0 15 15', fill: 'none', xmlns: 'http://www.w3.org/2000/svg' }, + it, + { ref: et }, + ), + reactExports.createElement('path', { + d: 'M7.75432 0.819537C7.59742 0.726821 7.4025 0.726821 7.24559 0.819537L1.74559 4.06954C1.59336 4.15949 1.49996 4.32317 1.49996 4.5C1.49996 4.67683 1.59336 4.84051 1.74559 4.93046L7.24559 8.18046C7.4025 8.27318 7.59742 8.27318 7.75432 8.18046L13.2543 4.93046C13.4066 4.84051 13.5 4.67683 13.5 4.5C13.5 4.32317 13.4066 4.15949 13.2543 4.06954L7.75432 0.819537ZM7.49996 7.16923L2.9828 4.5L7.49996 1.83077L12.0171 4.5L7.49996 7.16923ZM1.5695 7.49564C1.70998 7.2579 2.01659 7.17906 2.25432 7.31954L7.49996 10.4192L12.7456 7.31954C12.9833 7.17906 13.2899 7.2579 13.4304 7.49564C13.5709 7.73337 13.4921 8.03998 13.2543 8.18046L7.75432 11.4305C7.59742 11.5232 7.4025 11.5232 7.24559 11.4305L1.74559 8.18046C1.50786 8.03998 1.42901 7.73337 1.5695 7.49564ZM1.56949 10.4956C1.70998 10.2579 2.01658 10.1791 2.25432 10.3195L7.49996 13.4192L12.7456 10.3195C12.9833 10.1791 13.2899 10.2579 13.4304 10.4956C13.5709 10.7334 13.4921 11.04 13.2543 11.1805L7.75432 14.4305C7.59742 14.5232 7.4025 14.5232 7.24559 14.4305L1.74559 11.1805C1.50785 11.04 1.42901 10.7334 1.56949 10.4956Z', + fill: rt, + fillRule: 'evenodd', + clipRule: 'evenodd', + }), + ) + }), + _excluded$2Q = ['color'], + LightningBoltIcon = reactExports.forwardRef(function (tt, et) { + var nt = tt.color, + rt = nt === void 0 ? 'currentColor' : nt, + it = _objectWithoutPropertiesLoose$k(tt, _excluded$2Q) + return reactExports.createElement( + 'svg', + Object.assign( + { width: '15', height: '15', viewBox: '0 0 15 15', fill: 'none', xmlns: 'http://www.w3.org/2000/svg' }, + it, + { ref: et }, + ), + reactExports.createElement('path', { + d: 'M8.69667 0.0403541C8.90859 0.131038 9.03106 0.354857 8.99316 0.582235L8.0902 6.00001H12.5C12.6893 6.00001 12.8625 6.10701 12.9472 6.27641C13.0319 6.4458 13.0136 6.6485 12.8999 6.80001L6.89997 14.8C6.76167 14.9844 6.51521 15.0503 6.30328 14.9597C6.09135 14.869 5.96888 14.6452 6.00678 14.4178L6.90974 9H2.49999C2.31061 9 2.13748 8.893 2.05278 8.72361C1.96809 8.55422 1.98636 8.35151 2.09999 8.2L8.09997 0.200038C8.23828 0.0156255 8.48474 -0.0503301 8.69667 0.0403541ZM3.49999 8.00001H7.49997C7.64695 8.00001 7.78648 8.06467 7.88148 8.17682C7.97648 8.28896 8.01733 8.43723 7.99317 8.5822L7.33027 12.5596L11.5 7.00001H7.49997C7.353 7.00001 7.21347 6.93534 7.11846 6.8232C7.02346 6.71105 6.98261 6.56279 7.00678 6.41781L7.66968 2.44042L3.49999 8.00001Z', + fill: rt, + fillRule: 'evenodd', + clipRule: 'evenodd', + }), + ) + }), + _excluded$34 = ['color'], + MarginIcon = reactExports.forwardRef(function (tt, et) { + var nt = tt.color, + rt = nt === void 0 ? 'currentColor' : nt, + it = _objectWithoutPropertiesLoose$k(tt, _excluded$34) + return reactExports.createElement( + 'svg', + Object.assign( + { width: '15', height: '15', viewBox: '0 0 15 15', fill: 'none', xmlns: 'http://www.w3.org/2000/svg' }, + it, + { ref: et }, + ), + reactExports.createElement('path', { + d: 'M1.49988 2.00012C1.77602 2.00012 1.99988 1.77626 1.99988 1.50012C1.99988 1.22398 1.77602 1.00012 1.49988 1.00012C1.22374 1.00012 0.999878 1.22398 0.999878 1.50012C0.999878 1.77626 1.22374 2.00012 1.49988 2.00012ZM4.49988 2.00012C4.77602 2.00012 4.99988 1.77626 4.99988 1.50012C4.99988 1.22398 4.77602 1.00012 4.49988 1.00012C4.22374 1.00012 3.99988 1.22398 3.99988 1.50012C3.99988 1.77626 4.22374 2.00012 4.49988 2.00012ZM7.99988 1.50012C7.99988 1.77626 7.77602 2.00012 7.49988 2.00012C7.22374 2.00012 6.99988 1.77626 6.99988 1.50012C6.99988 1.22398 7.22374 1.00012 7.49988 1.00012C7.77602 1.00012 7.99988 1.22398 7.99988 1.50012ZM10.4999 2.00012C10.776 2.00012 10.9999 1.77626 10.9999 1.50012C10.9999 1.22398 10.776 1.00012 10.4999 1.00012C10.2237 1.00012 9.99988 1.22398 9.99988 1.50012C9.99988 1.77626 10.2237 2.00012 10.4999 2.00012ZM13.9999 1.50012C13.9999 1.77626 13.776 2.00012 13.4999 2.00012C13.2237 2.00012 12.9999 1.77626 12.9999 1.50012C12.9999 1.22398 13.2237 1.00012 13.4999 1.00012C13.776 1.00012 13.9999 1.22398 13.9999 1.50012ZM1.49988 14.0001C1.77602 14.0001 1.99988 13.7763 1.99988 13.5001C1.99988 13.224 1.77602 13.0001 1.49988 13.0001C1.22374 13.0001 0.999878 13.224 0.999878 13.5001C0.999878 13.7763 1.22374 14.0001 1.49988 14.0001ZM1.99988 10.5001C1.99988 10.7763 1.77602 11.0001 1.49988 11.0001C1.22374 11.0001 0.999878 10.7763 0.999878 10.5001C0.999878 10.224 1.22374 10.0001 1.49988 10.0001C1.77602 10.0001 1.99988 10.224 1.99988 10.5001ZM1.49988 8.00012C1.77602 8.00012 1.99988 7.77626 1.99988 7.50012C1.99988 7.22398 1.77602 7.00012 1.49988 7.00012C1.22374 7.00012 0.999878 7.22398 0.999878 7.50012C0.999878 7.77626 1.22374 8.00012 1.49988 8.00012ZM1.99988 4.50012C1.99988 4.77626 1.77602 5.00012 1.49988 5.00012C1.22374 5.00012 0.999878 4.77626 0.999878 4.50012C0.999878 4.22398 1.22374 4.00012 1.49988 4.00012C1.77602 4.00012 1.99988 4.22398 1.99988 4.50012ZM13.4999 11.0001C13.776 11.0001 13.9999 10.7763 13.9999 10.5001C13.9999 10.224 13.776 10.0001 13.4999 10.0001C13.2237 10.0001 12.9999 10.224 12.9999 10.5001C12.9999 10.7763 13.2237 11.0001 13.4999 11.0001ZM13.9999 7.50012C13.9999 7.77626 13.776 8.00012 13.4999 8.00012C13.2237 8.00012 12.9999 7.77626 12.9999 7.50012C12.9999 7.22398 13.2237 7.00012 13.4999 7.00012C13.776 7.00012 13.9999 7.22398 13.9999 7.50012ZM13.4999 5.00012C13.776 5.00012 13.9999 4.77626 13.9999 4.50012C13.9999 4.22398 13.776 4.00012 13.4999 4.00012C13.2237 4.00012 12.9999 4.22398 12.9999 4.50012C12.9999 4.77626 13.2237 5.00012 13.4999 5.00012ZM4.99988 13.5001C4.99988 13.7763 4.77602 14.0001 4.49988 14.0001C4.22374 14.0001 3.99988 13.7763 3.99988 13.5001C3.99988 13.224 4.22374 13.0001 4.49988 13.0001C4.77602 13.0001 4.99988 13.224 4.99988 13.5001ZM7.49988 14.0001C7.77602 14.0001 7.99988 13.7763 7.99988 13.5001C7.99988 13.224 7.77602 13.0001 7.49988 13.0001C7.22374 13.0001 6.99988 13.224 6.99988 13.5001C6.99988 13.7763 7.22374 14.0001 7.49988 14.0001ZM10.9999 13.5001C10.9999 13.7763 10.776 14.0001 10.4999 14.0001C10.2237 14.0001 9.99988 13.7763 9.99988 13.5001C9.99988 13.224 10.2237 13.0001 10.4999 13.0001C10.776 13.0001 10.9999 13.224 10.9999 13.5001ZM13.4999 14.0001C13.776 14.0001 13.9999 13.7763 13.9999 13.5001C13.9999 13.224 13.776 13.0001 13.4999 13.0001C13.2237 13.0001 12.9999 13.224 12.9999 13.5001C12.9999 13.7763 13.2237 14.0001 13.4999 14.0001ZM3.99988 5.00012C3.99988 4.44784 4.44759 4.00012 4.99988 4.00012H9.99988C10.5522 4.00012 10.9999 4.44784 10.9999 5.00012V10.0001C10.9999 10.5524 10.5522 11.0001 9.99988 11.0001H4.99988C4.44759 11.0001 3.99988 10.5524 3.99988 10.0001V5.00012ZM4.99988 5.00012H9.99988V10.0001H4.99988V5.00012Z', + fill: rt, + fillRule: 'evenodd', + clipRule: 'evenodd', + }), + ) + }), + _excluded$37 = ['color'], + MinusIcon = reactExports.forwardRef(function (tt, et) { + var nt = tt.color, + rt = nt === void 0 ? 'currentColor' : nt, + it = _objectWithoutPropertiesLoose$k(tt, _excluded$37) + return reactExports.createElement( + 'svg', + Object.assign( + { width: '15', height: '15', viewBox: '0 0 15 15', fill: 'none', xmlns: 'http://www.w3.org/2000/svg' }, + it, + { ref: et }, + ), + reactExports.createElement('path', { + d: 'M2.25 7.5C2.25 7.22386 2.47386 7 2.75 7H12.25C12.5261 7 12.75 7.22386 12.75 7.5C12.75 7.77614 12.5261 8 12.25 8H2.75C2.47386 8 2.25 7.77614 2.25 7.5Z', + fill: rt, + fillRule: 'evenodd', + clipRule: 'evenodd', + }), + ) + }), + _excluded$3m = ['color'], + PauseIcon = reactExports.forwardRef(function (tt, et) { + var nt = tt.color, + rt = nt === void 0 ? 'currentColor' : nt, + it = _objectWithoutPropertiesLoose$k(tt, _excluded$3m) + return reactExports.createElement( + 'svg', + Object.assign( + { width: '15', height: '15', viewBox: '0 0 15 15', fill: 'none', xmlns: 'http://www.w3.org/2000/svg' }, + it, + { ref: et }, + ), + reactExports.createElement('path', { + d: 'M6.04995 2.74998C6.04995 2.44623 5.80371 2.19998 5.49995 2.19998C5.19619 2.19998 4.94995 2.44623 4.94995 2.74998V12.25C4.94995 12.5537 5.19619 12.8 5.49995 12.8C5.80371 12.8 6.04995 12.5537 6.04995 12.25V2.74998ZM10.05 2.74998C10.05 2.44623 9.80371 2.19998 9.49995 2.19998C9.19619 2.19998 8.94995 2.44623 8.94995 2.74998V12.25C8.94995 12.5537 9.19619 12.8 9.49995 12.8C9.80371 12.8 10.05 12.5537 10.05 12.25V2.74998Z', + fill: rt, + fillRule: 'evenodd', + clipRule: 'evenodd', + }), + ) + }), + _excluded$3H = ['color'], + RocketIcon = reactExports.forwardRef(function (tt, et) { + var nt = tt.color, + rt = nt === void 0 ? 'currentColor' : nt, + it = _objectWithoutPropertiesLoose$k(tt, _excluded$3H) + return reactExports.createElement( + 'svg', + Object.assign( + { width: '15', height: '15', viewBox: '0 0 15 15', fill: 'none', xmlns: 'http://www.w3.org/2000/svg' }, + it, + { ref: et }, + ), + reactExports.createElement('path', { + d: 'M6.85357 3.85355L7.65355 3.05353C8.2981 2.40901 9.42858 1.96172 10.552 1.80125C11.1056 1.72217 11.6291 1.71725 12.0564 1.78124C12.4987 1.84748 12.7698 1.97696 12.8965 2.10357C13.0231 2.23018 13.1526 2.50125 13.2188 2.94357C13.2828 3.37086 13.2779 3.89439 13.1988 4.44801C13.0383 5.57139 12.591 6.70188 11.9464 7.34645L7.49999 11.7929L6.35354 10.6465C6.15827 10.4512 5.84169 10.4512 5.64643 10.6465C5.45117 10.8417 5.45117 11.1583 5.64643 11.3536L7.14644 12.8536C7.34171 13.0488 7.65829 13.0488 7.85355 12.8536L8.40073 12.3064L9.57124 14.2572C9.65046 14.3893 9.78608 14.4774 9.9389 14.4963C10.0917 14.5151 10.2447 14.4624 10.3535 14.3536L12.3535 12.3536C12.4648 12.2423 12.5172 12.0851 12.495 11.9293L12.0303 8.67679L12.6536 8.05355C13.509 7.19808 14.0117 5.82855 14.1887 4.58943C14.2784 3.9618 14.2891 3.33847 14.2078 2.79546C14.1287 2.26748 13.9519 1.74482 13.6035 1.39645C13.2552 1.04809 12.7325 0.871332 12.2045 0.792264C11.6615 0.710945 11.0382 0.721644 10.4105 0.8113C9.17143 0.988306 7.80189 1.491 6.94644 2.34642L6.32322 2.96968L3.07071 2.50504C2.91492 2.48278 2.75773 2.53517 2.64645 2.64646L0.646451 4.64645C0.537579 4.75533 0.484938 4.90829 0.50375 5.0611C0.522563 5.21391 0.61073 5.34954 0.742757 5.42876L2.69364 6.59928L2.14646 7.14645C2.0527 7.24022 2.00002 7.3674 2.00002 7.50001C2.00002 7.63261 2.0527 7.75979 2.14646 7.85356L3.64647 9.35356C3.84173 9.54883 4.15831 9.54883 4.35357 9.35356C4.54884 9.1583 4.54884 8.84172 4.35357 8.64646L3.20712 7.50001L3.85357 6.85356L6.85357 3.85355ZM10.0993 13.1936L9.12959 11.5775L11.1464 9.56067L11.4697 11.8232L10.0993 13.1936ZM3.42251 5.87041L5.43935 3.85356L3.17678 3.53034L1.80638 4.90074L3.42251 5.87041ZM2.35356 10.3535C2.54882 10.1583 2.54882 9.8417 2.35356 9.64644C2.1583 9.45118 1.84171 9.45118 1.64645 9.64644L0.646451 10.6464C0.451188 10.8417 0.451188 11.1583 0.646451 11.3535C0.841713 11.5488 1.1583 11.5488 1.35356 11.3535L2.35356 10.3535ZM3.85358 11.8536C4.04884 11.6583 4.04885 11.3417 3.85359 11.1465C3.65833 10.9512 3.34175 10.9512 3.14648 11.1465L1.14645 13.1464C0.95119 13.3417 0.951187 13.6583 1.14645 13.8535C1.34171 14.0488 1.65829 14.0488 1.85355 13.8536L3.85358 11.8536ZM5.35356 13.3535C5.54882 13.1583 5.54882 12.8417 5.35356 12.6464C5.1583 12.4512 4.84171 12.4512 4.64645 12.6464L3.64645 13.6464C3.45119 13.8417 3.45119 14.1583 3.64645 14.3535C3.84171 14.5488 4.1583 14.5488 4.35356 14.3535L5.35356 13.3535ZM9.49997 6.74881C10.1897 6.74881 10.7488 6.1897 10.7488 5.5C10.7488 4.8103 10.1897 4.25118 9.49997 4.25118C8.81026 4.25118 8.25115 4.8103 8.25115 5.5C8.25115 6.1897 8.81026 6.74881 9.49997 6.74881Z', + fill: rt, + fillRule: 'evenodd', + clipRule: 'evenodd', + }), + ) + }), + _excluded$3L = ['color'], + RulerHorizontalIcon = reactExports.forwardRef(function (tt, et) { + var nt = tt.color, + rt = nt === void 0 ? 'currentColor' : nt, + it = _objectWithoutPropertiesLoose$k(tt, _excluded$3L) + return reactExports.createElement( + 'svg', + Object.assign( + { width: '15', height: '15', viewBox: '0 0 15 15', fill: 'none', xmlns: 'http://www.w3.org/2000/svg' }, + it, + { ref: et }, + ), + reactExports.createElement('path', { + d: 'M0.5 4C0.223858 4 0 4.22386 0 4.5V10.5C0 10.7761 0.223858 11 0.5 11H14.5C14.7761 11 15 10.7761 15 10.5V4.5C15 4.22386 14.7761 4 14.5 4H0.5ZM1 10V5H2.075V7.5C2.075 7.73472 2.26528 7.925 2.5 7.925C2.73472 7.925 2.925 7.73472 2.925 7.5V5H4.075V6.5C4.075 6.73472 4.26528 6.925 4.5 6.925C4.73472 6.925 4.925 6.73472 4.925 6.5V5H6.075V6.5C6.075 6.73472 6.26528 6.925 6.5 6.925C6.73472 6.925 6.925 6.73472 6.925 6.5V5H8.075V7.5C8.075 7.73472 8.26528 7.925 8.5 7.925C8.73472 7.925 8.925 7.73472 8.925 7.5V5H10.075V6.5C10.075 6.73472 10.2653 6.925 10.5 6.925C10.7347 6.925 10.925 6.73472 10.925 6.5V5H12.075V6.5C12.075 6.73472 12.2653 6.925 12.5 6.925C12.7347 6.925 12.925 6.73472 12.925 6.5V5H14V10H1Z', + fill: rt, + fillRule: 'evenodd', + clipRule: 'evenodd', + }), + ) + }), + _excluded$4q = ['color'], + TextAlignJustifyIcon = reactExports.forwardRef(function (tt, et) { + var nt = tt.color, + rt = nt === void 0 ? 'currentColor' : nt, + it = _objectWithoutPropertiesLoose$k(tt, _excluded$4q) + return reactExports.createElement( + 'svg', + Object.assign( + { width: '15', height: '15', viewBox: '0 0 15 15', fill: 'none', xmlns: 'http://www.w3.org/2000/svg' }, + it, + { ref: et }, + ), + reactExports.createElement('path', { + d: 'M2.5 4C2.22386 4 2 4.22386 2 4.5C2 4.77614 2.22386 5 2.5 5H12.5C12.7761 5 13 4.77614 13 4.5C13 4.22386 12.7761 4 12.5 4H2.5ZM2 7.5C2 7.22386 2.22386 7 2.5 7H12.5C12.7761 7 13 7.22386 13 7.5C13 7.77614 12.7761 8 12.5 8H2.5C2.22386 8 2 7.77614 2 7.5ZM2 10.5C2 10.2239 2.22386 10 2.5 10H12.5C12.7761 10 13 10.2239 13 10.5C13 10.7761 12.7761 11 12.5 11H2.5C2.22386 11 2 10.7761 2 10.5Z', + fill: rt, + fillRule: 'evenodd', + clipRule: 'evenodd', + }), + ) + }), + _excluded$4H = ['color'], + TriangleDownIcon = reactExports.forwardRef(function (tt, et) { + var nt = tt.color, + rt = nt === void 0 ? 'currentColor' : nt, + it = _objectWithoutPropertiesLoose$k(tt, _excluded$4H) + return reactExports.createElement( + 'svg', + Object.assign( + { width: '15', height: '15', viewBox: '0 0 15 15', fill: 'none', xmlns: 'http://www.w3.org/2000/svg' }, + it, + { ref: et }, + ), + reactExports.createElement('path', { d: 'M4 6H11L7.5 10.5L4 6Z', fill: rt }), + ) + }), + _excluded$4K = ['color'], + TriangleUpIcon = reactExports.forwardRef(function (tt, et) { + var nt = tt.color, + rt = nt === void 0 ? 'currentColor' : nt, + it = _objectWithoutPropertiesLoose$k(tt, _excluded$4K) + return reactExports.createElement( + 'svg', + Object.assign( + { width: '15', height: '15', viewBox: '0 0 15 15', fill: 'none', xmlns: 'http://www.w3.org/2000/svg' }, + it, + { ref: et }, + ), + reactExports.createElement('path', { d: 'M4 9H11L7.5 4.5L4 9Z', fill: rt }), + ) + }), + _excluded$4R = ['color'], + VercelLogoIcon = reactExports.forwardRef(function (tt, et) { + var nt = tt.color, + rt = nt === void 0 ? 'currentColor' : nt, + it = _objectWithoutPropertiesLoose$k(tt, _excluded$4R) + return reactExports.createElement( + 'svg', + Object.assign( + { width: '15', height: '15', viewBox: '0 0 15 15', fill: 'none', xmlns: 'http://www.w3.org/2000/svg' }, + it, + { ref: et }, + ), + reactExports.createElement('path', { + d: 'M7.49998 1L6.92321 2.00307L1.17498 12L0.599976 13H1.7535H13.2464H14.4L13.825 12L8.07674 2.00307L7.49998 1ZM7.49998 3.00613L2.3285 12H12.6714L7.49998 3.00613Z', + fill: rt, + fillRule: 'evenodd', + clipRule: 'evenodd', + }), + ) + }) + function _toPrimitive$B(tt, et) { + if (typeof tt != 'object' || tt === null) return tt + var nt = tt[Symbol.toPrimitive] + if (nt !== void 0) { + var rt = nt.call(tt, et || 'default') + if (typeof rt != 'object') return rt + throw new TypeError('@@toPrimitive must return a primitive value.') + } + return (et === 'string' ? String : Number)(tt) + } + function _toPropertyKey$B(tt) { + var et = _toPrimitive$B(tt, 'string') + return typeof et == 'symbol' ? et : String(et) + } + function _defineProperty$B(tt, et, nt) { + return ( + (et = _toPropertyKey$B(et)), + et in tt + ? Object.defineProperty(tt, et, { value: nt, enumerable: !0, configurable: !0, writable: !0 }) + : (tt[et] = nt), + tt + ) + } + function ownKeys$A(tt, et) { + var nt = Object.keys(tt) + if (Object.getOwnPropertySymbols) { + var rt = Object.getOwnPropertySymbols(tt) + et && + (rt = rt.filter(function (it) { + return Object.getOwnPropertyDescriptor(tt, it).enumerable + })), + nt.push.apply(nt, rt) + } + return nt + } + function _objectSpread2(tt) { + for (var et = 1; et < arguments.length; et++) { + var nt = arguments[et] != null ? arguments[et] : {} + et % 2 + ? ownKeys$A(Object(nt), !0).forEach(function (rt) { + _defineProperty$B(tt, rt, nt[rt]) + }) + : Object.getOwnPropertyDescriptors + ? Object.defineProperties(tt, Object.getOwnPropertyDescriptors(nt)) + : ownKeys$A(Object(nt)).forEach(function (rt) { + Object.defineProperty(tt, rt, Object.getOwnPropertyDescriptor(nt, rt)) + }) + } + return tt + } + const overLimitFps = { value: 0, fpsLimit: 60, isOverLimit: 0 }, + average = (tt) => (tt == null ? void 0 : tt.reduce((et, nt) => et + nt, 0)) / tt.length + class GLPerf { + constructor(et = {}) { + ;(this.names = ['']), + (this.finished = []), + (this.gl = void 0), + (this.extension = void 0), + (this.query = void 0), + (this.paused = !1), + (this.overClock = !1), + (this.queryHasResult = !1), + (this.queryCreated = !1), + (this.isWebGL2 = !0), + (this.memAccums = []), + (this.gpuAccums = []), + (this.activeAccums = []), + (this.logsAccums = { mem: [], gpu: [], cpu: [], fps: [], fpsFixed: [] }), + (this.fpsChart = []), + (this.gpuChart = []), + (this.cpuChart = []), + (this.memChart = []), + (this.paramLogger = () => {}), + (this.glFinish = () => {}), + (this.chartLogger = () => {}), + (this.chartLen = 60), + (this.maxMemory = 1500), + (this.chartHz = 10), + (this.startCpuProfiling = !1), + (this.lastCalculateFixed = 0), + (this.chartFrame = 0), + (this.gpuTimeProcess = 0), + (this.chartTime = 0), + (this.activeQueries = 0), + (this.circularId = 0), + (this.detected = 0), + (this.frameId = 0), + (this.rafId = 0), + (this.idleCbId = 0), + (this.checkQueryId = 0), + (this.uuid = void 0), + (this.currentCpu = 0), + (this.currentMem = 0), + (this.paramFrame = 0), + (this.paramTime = 0), + (this.now = () => {}), + (this.t0 = 0), + (window.GLPerf = window.GLPerf || {}), + Object.assign(this, et), + (this.fpsChart = new Array(this.chartLen).fill(0)), + (this.gpuChart = new Array(this.chartLen).fill(0)), + (this.cpuChart = new Array(this.chartLen).fill(0)), + (this.memChart = new Array(this.chartLen).fill(0)), + (this.now = () => (window.performance && window.performance.now ? window.performance.now() : Date.now())), + this.initGpu(), + this.is120hz() + } + initGpu() { + ;(this.uuid = MathUtils.generateUUID()), + this.gl && + ((this.isWebGL2 = !0), + this.extension || (this.extension = this.gl.getExtension('EXT_disjoint_timer_query_webgl2')), + this.extension === null && (this.isWebGL2 = !1)) + } + is120hz() { + let et = 0 + const nt = (rt) => { + ++et < 20 + ? (this.rafId = window.requestAnimationFrame(nt)) + : ((this.detected = Math.ceil((1e3 * et) / (rt - this.t0) / 70)), window.cancelAnimationFrame(this.rafId)), + this.t0 || (this.t0 = rt) + } + this.rafId = window.requestAnimationFrame(nt) + } + addUI(et) { + this.names.indexOf(et) === -1 && (this.names.push(et), this.gpuAccums.push(0), this.activeAccums.push(!1)) + } + nextFps(et) { + const nt = 16.666666666666668, + rt = nt - et.timeRemaining(), + it = (nt * overLimitFps.fpsLimit) / 10 / rt + it < 0 || + ((overLimitFps.value = it), + overLimitFps.isOverLimit < 25 ? overLimitFps.isOverLimit++ : usePerfStore.setState({ overclockingFps: !0 })) + } + nextFrame(et) { + this.frameId++ + const nt = et || this.now() + let rt = nt - this.paramTime, + it = 0 + if (this.frameId <= 1) (this.paramFrame = this.frameId), (this.paramTime = nt) + else if (nt >= this.paramTime) { + this.maxMemory = window.performance.memory ? window.performance.memory.jsHeapSizeLimit / 1048576 : 0 + const ot = this.frameId - this.paramFrame, + at = (ot * 1e3) / rt, + st = usePerfStore.getState().overclockingFps ? overLimitFps.value : at + if ( + ((it = this.isWebGL2 ? this.gpuAccums[0] : this.gpuAccums[0] / rt), + this.isWebGL2 + ? (this.gpuAccums[0] = 0) + : Promise.all(this.finished).then(() => { + ;(this.gpuAccums[0] = 0), (this.finished = []) + }), + (this.currentMem = Math.round( + window.performance && window.performance.memory ? window.performance.memory.usedJSHeapSize / 1048576 : 0, + )), + window.performance && this.startCpuProfiling) + ) { + window.performance.mark('cpu-finished') + const lt = performance.measure('cpu-duration', 'cpu-started', 'cpu-finished') + ;(this.currentCpu = lt.duration), this.logsAccums.cpu.push(this.currentCpu), (this.startCpuProfiling = !1) + } + this.logsAccums.mem.push(this.currentMem), + this.logsAccums.fpsFixed.push(at), + this.logsAccums.fps.push(st), + this.logsAccums.gpu.push(it), + this.overClock && + typeof window.requestIdleCallback < 'u' && + (overLimitFps.isOverLimit > 0 && st > at + ? overLimitFps.isOverLimit-- + : usePerfStore.getState().overclockingFps && usePerfStore.setState({ overclockingFps: !1 })), + nt >= this.paramTime + 180 && + (this.paramLogger({ + cpu: average(this.logsAccums.cpu), + gpu: average(this.logsAccums.gpu), + mem: average(this.logsAccums.mem), + fps: average(this.logsAccums.fps), + duration: Math.round(rt), + maxMemory: this.maxMemory, + frameCount: ot, + }), + (this.logsAccums.mem = []), + (this.logsAccums.fps = []), + (this.logsAccums.gpu = []), + (this.logsAccums.cpu = []), + (this.paramFrame = this.frameId), + (this.paramTime = nt)), + this.overClock && + nt - this.lastCalculateFixed >= 2 * 1e3 && + ((this.lastCalculateFixed = et), + (overLimitFps.fpsLimit = Math.round(average(this.logsAccums.fpsFixed) / 10) * 100), + usePerfStore.setState({ fpsLimit: overLimitFps.fpsLimit / 10 }), + (this.logsAccums.fpsFixed = []), + (this.paramFrame = this.frameId), + (this.paramTime = nt)) + } + if (!this.detected || !this.chartFrame) + (this.chartFrame = this.frameId), (this.chartTime = nt), (this.circularId = 0) + else { + const ot = nt - this.chartTime + let at = (this.chartHz * ot) / 1e3 + for (; --at > 0 && this.detected; ) { + const lt = ((this.frameId - this.chartFrame) / ot) * 1e3, + ct = usePerfStore.getState().overclockingFps ? overLimitFps.value : lt + this.fpsChart[this.circularId % this.chartLen] = ct + const ut = 1e3 / this.currentMem, + ht = this.currentCpu, + dt = (this.isWebGL2 ? this.gpuAccums[1] * 2 : Math.round((this.gpuAccums[1] / rt) * 100)) + 4 + dt > 0 && (this.gpuChart[this.circularId % this.chartLen] = dt), + ht > 0 && (this.cpuChart[this.circularId % this.chartLen] = ht), + ut > 0 && (this.memChart[this.circularId % this.chartLen] = ut) + for (let pt = 0; pt < this.names.length; pt++) + this.chartLogger({ + i: pt, + data: { fps: this.fpsChart, gpu: this.gpuChart, cpu: this.cpuChart, mem: this.memChart }, + circularId: this.circularId, + }) + this.circularId++, (this.chartFrame = this.frameId), (this.chartTime = nt) + } + } + } + startGpu() { + const et = this.gl, + nt = this.extension + if (!(!et || !nt) && this.isWebGL2) { + let rt = !1, + it, + ot + if (this.query) { + this.queryHasResult = !1 + let at = this.query + if ( + ((rt = et.getQueryParameter(at, et.QUERY_RESULT_AVAILABLE)), + (it = et.getParameter(nt.GPU_DISJOINT_EXT)), + rt && !it) + ) { + ot = et.getQueryParameter(this.query, et.QUERY_RESULT) + const st = ot * 1e-6 + rt && + st > 0 && + (it || + this.activeAccums.forEach((lt, ct) => { + this.gpuAccums[ct] = st + })) + } + } + ;(rt || !this.query) && + ((this.queryCreated = !0), (this.query = et.createQuery()), et.beginQuery(nt.TIME_ELAPSED_EXT, this.query)) + } + } + endGpu() { + const et = this.extension, + nt = this.gl + this.isWebGL2 && + this.queryCreated && + nt.getQuery(et.TIME_ELAPSED_EXT, nt.CURRENT_QUERY) && + nt.endQuery(et.TIME_ELAPSED_EXT) + } + begin(et) { + this.startGpu(), this.updateAccums(et) + } + end(et) { + this.endGpu(), this.updateAccums(et) + } + updateAccums(et) { + let nt = this.names.indexOf(et) + nt === -1 && ((nt = this.names.length), this.addUI(et)) + const rt = this.now() + ;(this.activeAccums[nt] = !this.activeAccums[nt]), (this.t0 = rt) + } + } + const countGeoDrawCalls = (tt) => { + tt.forEach((et, nt) => { + const { meshes: rt } = et + if (!rt) return + let it = { total: 0, type: 'Triangle', data: [] } + Object.keys(rt).forEach((ot) => { + const at = rt[ot], + { geometry: st, material: lt } = at + let ct = st.index + const ut = st.attributes.position + if (!ut) return + let ht = 1 + lt.wireframe === !0 && (ht = 0) + const dt = ct !== null ? ct.count : ut.count, + pt = st.drawRange.start * ht, + mt = st.drawRange.count * ht, + gt = pt, + yt = Math.min(dt, pt + mt) - 1 + let bt = 1 + const vt = at.count || 1 + let xt = 'Triangle', + kt = 0 + at.isMesh + ? lt.wireframe === !0 + ? ((xt = 'Line'), (bt = bt / 2)) + : ((xt = 'Triangle'), (bt = bt / 3)) + : at.isLine + ? ((xt = 'Line'), at.isLineSegments ? (bt = bt / 2) : at.isLineLoop ? (bt = bt) : (bt = bt - 1)) + : at.isPoints + ? ((xt = 'Point'), (bt = bt)) + : at.isSprite && ((xt = 'Triangle'), (bt = bt / 3)) + const St = Math.round(Math.max(0, yt - gt + 1) * (bt * vt)) + St > kt && ((kt = St), (it.type = xt)), + (it.total += St), + it.data.push({ drawCount: St, type: xt }), + (at.userData.drawCount = { type: xt, count: St }) + }), + (et.drawCounts = it) + }) + }, + updateMatrixWorldTemp = Object3D.prototype.updateMatrixWorld, + updateWorldMatrixTemp = Object3D.prototype.updateWorldMatrix, + updateMatrixTemp = Object3D.prototype.updateMatrix + let matriceWorldCount = { value: 0 }, + matriceCount = { value: 0 } + const isUUID = (tt) => { + let et = '' + tt + return ( + (et = et.match('^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$')), et !== null + ) + }, + addMuiPerfID = (tt, et) => { + tt.defines || (tt.defines = {}), + tt.defines && !tt.defines.muiPerf && (tt.defines = Object.assign(tt.defines || {}, { muiPerf: tt.uuid })) + const nt = tt.uuid + return et[nt] || ((et[nt] = { meshes: {}, material: tt }), (tt.needsUpdate = !0)), (tt.needsUpdate = !1), nt + }, + getMUIIndex = (tt) => tt === 'muiPerf', + usePerfStore = react((tt) => ({ + log: null, + paused: !1, + triggerProgramsUpdate: 0, + customData: 0, + fpsLimit: 60, + overclockingFps: !1, + chart: { data: { fps: [], cpu: [], gpu: [], mem: [] }, circularId: 0 }, + gl: void 0, + objectWithMaterials: null, + scene: void 0, + programs: new Map(), + sceneLength: void 0, + tab: 'infos', + })), + Headless = ({ trackCPU: tt, overClock: et, chart: nt, deepAnalyze: rt, matrixUpdate: it }) => { + const { gl: ot, scene: at } = useThree() + usePerfStore.setState({ gl: ot, scene: at }) + const st = reactExports.useMemo(() => { + const lt = new GLPerf({ + trackGPU: !0, + overClock: et, + chartLen: nt ? nt.length : 120, + chartHz: nt ? nt.hz : 60, + gl: ot.getContext(), + chartLogger: (ht) => { + usePerfStore.setState({ chart: ht }) + }, + paramLogger: (ht) => { + usePerfStore.setState({ + log: { + maxMemory: ht.maxMemory, + gpu: ht.gpu, + cpu: ht.cpu, + mem: ht.mem, + fps: ht.fps, + totalTime: ht.duration, + frameCount: ht.frameCount, + }, + }) + }, + }), + ct = new Map(), + ut = new Map() + return ( + Object.defineProperty(Scene.prototype, 'onBeforeRender', { + get() { + return (...ht) => { + var dt + lt && lt.begin('profiler'), (dt = ct.get(this)) === null || dt === void 0 || dt(...ht) + } + }, + set(ht) { + ct.set(this, ht) + }, + configurable: !0, + }), + Object.defineProperty(Scene.prototype, 'onAfterRender', { + get() { + return (...ht) => { + var dt + lt && lt.end('profiler'), (dt = ut.get(this)) === null || dt === void 0 || dt(...ht) + } + }, + set(ht) { + ut.set(this, ht) + }, + configurable: !0, + }), + lt + ) + }, []) + return ( + reactExports.useEffect(() => { + st && + ((st.overClock = et || !1), + et === !1 && + (usePerfStore.setState({ overclockingFps: !1 }), + (overLimitFps.value = 0), + (overLimitFps.isOverLimit = 0)), + (st.chartHz = (nt == null ? void 0 : nt.hz) || 60), + (st.chartLen = (nt == null ? void 0 : nt.length) || 120)) + }, [et, st, nt == null ? void 0 : nt.length, nt == null ? void 0 : nt.hz]), + reactExports.useEffect(() => { + it && + ((Object3D.prototype.updateMatrixWorld = function () { + ;(this.matrixWorldNeedsUpdate || arguments[0]) && matriceWorldCount.value++, + updateMatrixWorldTemp.apply(this, arguments) + }), + (Object3D.prototype.updateWorldMatrix = function () { + matriceWorldCount.value++, updateWorldMatrixTemp.apply(this, arguments) + }), + (Object3D.prototype.updateMatrix = function () { + matriceCount.value++, updateMatrixTemp.apply(this, arguments) + })), + (ot.info.autoReset = !1) + let lt = null, + ct = null + if (ot.info) + return ( + (lt = addEffect(function () { + usePerfStore.getState().paused && usePerfStore.setState({ paused: !1 }), + window.performance && (window.performance.mark('cpu-started'), (st.startCpuProfiling = !0)), + (matriceCount.value -= 1), + (matriceWorldCount.value = 0), + (matriceCount.value = 0), + ot.info && ot.info.reset() + })), + (ct = addAfterEffect(function () { + if ( + (st && + !st.paused && + (st.nextFrame(window.performance.now()), + et && typeof window.requestIdleCallback < 'u' && (st.idleCbId = requestIdleCallback(st.nextFps))), + rt) + ) { + var ht, dt + const pt = {}, + mt = new Map() + at.traverse(function (yt) { + if ((yt instanceof Mesh || yt instanceof Points) && yt.material) { + let bt = yt.material.uuid + Array.isArray(yt.material) && yt.material.length > 1 + ? (bt = addMuiPerfID(yt.material[1], pt)) + : (bt = addMuiPerfID(yt.material, pt)), + (pt[bt].meshes[yt.uuid] = yt) + } + }), + ot == null || + (ht = ot.info) === null || + ht === void 0 || + (dt = ht.programs) === null || + dt === void 0 || + dt.forEach((gt) => { + const yt = gt.cacheKey.split(','), + bt = yt[yt.findIndex(getMUIIndex) + 1] + if (isUUID(bt) && pt[bt]) { + const { material: vt, meshes: xt } = pt[bt] + mt.set(bt, { + program: gt, + material: vt, + meshes: xt, + drawCounts: { total: 0, type: 'triangle', data: [] }, + expand: !1, + visible: !0, + }) + } + }), + mt.size !== usePerfStore.getState().programs.size && + (countGeoDrawCalls(mt), + usePerfStore.setState({ + programs: mt, + triggerProgramsUpdate: usePerfStore.getState().triggerProgramsUpdate++, + })) + } + })), + () => { + st && + (typeof window.cancelIdleCallback < 'u' && window.cancelIdleCallback(st.idleCbId), + window.cancelAnimationFrame(st.rafId), + window.cancelAnimationFrame(st.checkQueryId)), + it && (Object3D.prototype.updateMatrixWorld = updateMatrixTemp), + lt(), + ct() + } + ) + }, [st, ot, tt, nt, it]), + reactExports.useEffect(() => { + const lt = addTail(function () { + return ( + st && + ((st.paused = !0), + (matriceCount.value = 0), + (matriceWorldCount.value = 0), + usePerfStore.setState({ + paused: !0, + log: { maxMemory: 0, gpu: 0, mem: 0, cpu: 0, fps: 0, totalTime: 0, frameCount: 0 }, + })), + !1 + ) + }) + return () => { + lt() + } + }, []), + null + ) + }, + PerfS = re$4('div', { + position: 'fixed', + top: 0, + right: 0, + zIndex: 9999, + fontFamily: `-apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', + 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', + sans-serif`, + backgroundColor: 'rgba(36, 36, 36, .9)', + color: '#fff', + margin: 0, + minHeight: '100px', + padding: '4px 0', + '-webkit-font-smoothing': 'antialiased', + '-moz-osx-font-smoothing': 'grayscale', + userSelect: 'none', + '&.top-left': { right: 'initial', left: 0 }, + '&.bottom-left': { + right: 'initial', + top: 'initial', + bottom: 0, + left: 0, + '.__perf_toggle': { top: '-20px', bottom: 'initial' }, + }, + '&.bottom-right': { top: 'initial', bottom: 0, '.__perf_toggle': { top: '-20px', bottom: 'initial' } }, + '&.minimal': { backgroundColor: 'rgba(36, 36, 36, .75)' }, + '*': { margin: '0', padding: '0', border: '0', fontSize: '100%', lineHeight: '1', verticalAlign: 'baseline' }, + }), + PerfSmallI = re$4('small', { position: 'absolute', right: 0, fontSize: '10px' }), + PerfI = re$4('div', { + display: 'inline-flex', + fontStyle: 'normal', + padding: 0, + lineHeight: '13px', + fontSize: '14px', + width: '62px', + position: 'relative', + pointerEvents: 'auto', + cursor: 'default', + fontWeight: 500, + letterSpacing: '0px', + textAlign: 'left', + height: '29px', + whiteSpace: 'nowrap', + justifyContent: 'space-evenly', + fontVariantNumeric: 'tabular-nums', + small: { paddingLeft: '12px' }, + svg: { + padding: 0, + color: 'rgba(145, 145, 145, 0.3)', + fontSize: '40px', + position: 'absolute', + zIndex: 1, + maxHeight: '20px', + left: ' 50%', + marginLeft: '-23px', + top: '4px', + }, + }), + PerfB = re$4('span', { + verticalAlign: 'bottom', + position: 'absolute', + bottom: '5px', + color: 'rgba(101, 197, 188, 1)', + textAlign: 'right', + letterSpacing: '1px', + fontSize: '8px', + fontWeight: '500', + width: '60px', + }), + PerfIContainer = re$4('div', { display: 'flex' }), + ProgramHeader = re$4('div', { + backgroundColor: '#404040', + padding: '6px', + display: 'block', + fontSize: '12px', + marginBottom: '6px', + cursor: 'pointer', + '*': { cursor: 'pointer !important' }, + '> span': {}, + small: { fontSize: '9px' }, + '> b': { marginRight: '4px', cursor: 'pointer' }, + }), + Graph$1 = re$4('div', { + height: '66px', + overflow: 'hidden', + position: 'absolute', + pointerEvents: 'none', + display: 'flex', + top: '0px', + justifyContent: 'center', + width: '100%', + minWidth: '310px', + margin: '0 auto', + canvas: { background: 'transparent !important', position: 'absolute !important' }, + }), + Graphpc = re$4('div', { + textAlign: 'center', + fontWeight: 700, + fontSize: '12px', + lineHeight: '12px', + display: 'flex', + justifyContent: 'center', + alignItems: 'center', + verticalAlign: 'middle', + color: '#f1f1f1', + padding: '7px', + width: '100%', + backgroundColor: 'rgba(36, 36, 37, 0.8)', + zIndex: 1, + position: 'absolute', + height: '100%', + }), + Toggle = re$4('div', { + pointerEvents: 'auto', + justifyContent: 'center', + cursor: 'pointer', + fontSize: '12px', + backgroundColor: 'rgb(41, 43, 45)', + marginTop: '6px', + width: 'auto', + margin: '0', + color: 'rgba(145, 145, 145, 1)', + textAlign: 'center', + display: 'inline-block', + verticalAlign: 'middle', + padding: '4px 6px', + '&.__perf_toggle_tab_active': { backgroundColor: 'rgb(31 31 31)' }, + svg: { width: '12px', height: '12px', float: 'left' }, + }), + ToggleVisible = re$4('div', { + pointerEvents: 'auto', + justifyContent: 'center', + cursor: 'pointer', + fontSize: '12px', + float: 'right', + backgroundColor: 'rgb(41, 43, 45)', + width: 'auto', + margin: '0', + color: 'rgba(145, 145, 145, 1)', + textAlign: 'center', + display: 'inline-block', + verticalAlign: 'middle', + padding: '4px 6px', + '&.__perf_toggle_tab_active': { backgroundColor: 'rgb(31 31 31)' }, + svg: { width: '12px', height: '12px', float: 'left' }, + }), + ProgramGeo = re$4('div', { padding: '4px 6px', fontSize: '12px', pointerEvents: 'auto' }), + ProgramTitle = re$4('span', { + fontWeight: 'bold', + letterSpacing: '0.08em', + maxWidth: '145px', + overflow: 'hidden', + textOverflow: 'ellipsis', + display: 'inline-block', + verticalAlign: 'middle', + fontSize: '11px', + marginRight: '10px', + }), + ContainerScroll = re$4('div', { maxHeight: '50vh', overflowY: 'auto', marginTop: '38px' }), + ProgramsContainer = re$4('div', { marginTop: '0' }), + ProgramsULHeader = re$4('div', { + display: 'flex', + position: 'relative', + fontWeight: 'bold', + color: '#fff', + lineHeight: '14px', + svg: { marginRight: '4px', display: 'inline-block' }, + }), + ProgramsUL = re$4('ul', { + display: 'block', + position: 'relative', + paddingLeft: '10px', + margin: '6px 6px', + img: { maxHeight: '60px', maxWidth: '100%', margin: '6px auto', display: 'block' }, + '&:after': { + content: '', + position: 'absolute', + left: '0px', + top: '0px', + width: '1px', + height: '100%', + backgroundColor: 'grey', + transform: 'translateX(-50%)', + maxHeight: '50vh', + overflowY: 'auto', + }, + li: { + borderBottom: '1px solid #313131', + display: 'block', + padding: '4px', + margin: 0, + lineHeight: 1, + verticalAlign: 'middle', + height: '24px', + }, + b: { fontWeight: 'bold' }, + small: { + textAlign: 'revert', + letterSpacing: '1px', + fontSize: '10px', + fontWeight: '500', + marginLeft: '2px', + color: 'rgb(101, 197, 188)', + }, + }), + ProgramConsole = re$4('button', { + fontWeight: 'bold', + letterSpacing: '0.02em', + backgroundColor: 'rgb(41, 43, 45)', + color: 'rgb(211, 211, 211)', + overflow: 'hidden', + textOverflow: 'ellipsis', + cursor: 'pointer', + display: 'block', + verticalAlign: 'middle', + fontSize: '11px', + padding: '5px', + margin: '4px auto', + }), + ToggleContainer = re$4('div', { + display: 'flex', + justifyContent: 'center', + cursor: 'pointer', + fontSize: '12px', + backgroundColor: 'rgb(41, 43, 45)', + marginTop: '6px', + width: 'auto', + margin: '0 auto', + color: 'rgba(145, 145, 145, 1)', + textAlign: 'center', + position: 'absolute', + right: 0, + bottom: ' -20px', + svg: { width: '12px', height: '12px', float: 'left' }, + }), + ProgramsGeoLi = re$4('li', { + display: 'flex !important', + height: 'auto !important', + span: { height: '40px', display: 'block', position: 'relative' }, + b: { paddingLeft: '12px' }, + }), + TextHighHZ = reactExports.memo( + ({ + isPerf: tt, + color: et, + colorBlind: nt, + customData: rt, + isMemory: it, + isShadersInfo: ot, + metric: at, + fontSize: st, + offsetY: lt = 0, + offsetX: ct, + round: ut, + hasInstance: ht, + }) => { + const { width: dt, height: pt } = useThree((yt) => yt.viewport), + mt = reactExports.useRef(null), + gt = reactExports.useRef(null) + return ( + useFrame(function () { + const bt = usePerfStore.getState().gl, + vt = usePerfStore.getState().log + if (!vt || !mt.current || (rt && (mt.current.text = usePerfStore.getState().customData), !at)) return + let xt = vt[at] + if (ot) { + var kt + xt = (kt = bt.info.programs) === null || kt === void 0 ? void 0 : kt.length + } else at === 'matriceCount' ? (xt = matriceCount.value) : !tt && bt.info.render && (xt = (it ? bt.info.memory : bt.info.render)[at]) + if ( + (at === 'fps' && + (mt.current.color = usePerfStore.getState().overclockingFps + ? colorsGraph(nt).overClock.toString() + : `rgb(${colorsGraph(nt).fps.toString()})`), + (mt.current.text = (Math.round(xt * Math.pow(10, ut)) / Math.pow(10, ut)).toFixed(ut)), + ht) + ) { + const St = bt.info.instance + if (typeof St > 'u' && at !== 'matriceCount') return + let Tt + at === 'matriceCount' ? (Tt = matriceWorldCount.value) : (Tt = St[at]), + Tt > 0 + ? ((mt.current.fontSize = st / 1.15), + (gt.current.fontSize = xt > 0 ? st / 1.4 : st), + (mt.current.position.y = pt / 2 - lt - st / 1.9), + (gt.current.text = ' ± ' + (Math.round(Tt * Math.pow(10, ut)) / Math.pow(10, ut)).toFixed(ut))) + : ((mt.current.position.y = pt / 2 - lt - st), (mt.current.fontSize = st)) + } + ;(matriceCount.value -= 1), mt.current.updateMatrix(), mt.current.matrixWorld.copy(mt.current.matrix) + }), + jsxRuntimeExports.jsxs(reactExports.Suspense, { + fallback: null, + children: [ + jsxRuntimeExports.jsxs(Text$1, { + textAlign: 'justify', + matrixAutoUpdate: !1, + ref: mt, + fontSize: st, + position: [-dt / 2 + ct + st, pt / 2 - lt - st, 0], + color: et, + characters: '0123456789', + onUpdate: (yt) => { + yt.updateMatrix(), (matriceCount.value -= 1), yt.matrixWorld.copy(yt.matrix) + }, + children: [jsxRuntimeExports.jsx('meshBasicMaterial', { blending: NormalBlending }), '0'], + }), + ht && + jsxRuntimeExports.jsx(Text$1, { + textAlign: 'justify', + matrixAutoUpdate: !1, + ref: gt, + fontSize: 8, + position: [-dt / 2 + ct + st, pt / 2 - lt - st * 1.15, 0], + color: 'lightgrey', + characters: '0123456789', + onUpdate: (yt) => { + yt.updateMatrix(), (matriceCount.value -= 1), yt.matrixWorld.copy(yt.matrix) + }, + children: jsxRuntimeExports.jsx('meshBasicMaterial', { blending: NormalBlending }), + }), + ], + }) + ) + }, + ), + TextsHighHZ = ({ colorBlind: tt, customData: et, minimal: nt, matrixUpdate: rt }) => + jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { + children: [ + jsxRuntimeExports.jsx(TextHighHZ, { + colorBlind: tt, + color: `rgb(${colorsGraph(tt).fps.toString()})`, + isPerf: !0, + metric: 'fps', + fontSize: 14, + offsetX: 140, + round: 0, + }), + jsxRuntimeExports.jsx(TextHighHZ, { + color: `rgb(${colorsGraph(tt).cpu.toString()})`, + isPerf: !0, + metric: 'cpu', + fontSize: 14, + offsetX: 72, + round: 3, + }), + jsxRuntimeExports.jsx(TextHighHZ, { + color: `rgb(${colorsGraph(tt).gpu.toString()})`, + isPerf: !0, + metric: 'gpu', + fontSize: 14, + offsetX: 10, + round: 3, + }), + nt + ? null + : jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { + children: [ + jsxRuntimeExports.jsx(TextHighHZ, { + metric: 'calls', + fontSize: 14, + offsetX: 200, + round: 0, + hasInstance: !0, + }), + jsxRuntimeExports.jsx(TextHighHZ, { + metric: 'triangles', + fontSize: 14, + offsetX: 260, + round: 0, + hasInstance: !0, + }), + jsxRuntimeExports.jsx(TextHighHZ, { + isMemory: !0, + metric: 'geometries', + fontSize: 14, + offsetY: 30, + offsetX: 0, + round: 0, + }), + jsxRuntimeExports.jsx(TextHighHZ, { + isMemory: !0, + metric: 'textures', + fontSize: 14, + offsetY: 30, + offsetX: 80, + round: 0, + }), + jsxRuntimeExports.jsx(TextHighHZ, { + isShadersInfo: !0, + metric: 'programs', + fontSize: 14, + offsetY: 30, + offsetX: 140, + round: 0, + }), + jsxRuntimeExports.jsx(TextHighHZ, { + metric: 'lines', + fontSize: 14, + offsetY: 30, + offsetX: 200, + round: 0, + hasInstance: !0, + }), + jsxRuntimeExports.jsx(TextHighHZ, { + metric: 'points', + fontSize: 14, + offsetY: 30, + offsetX: 260, + round: 0, + hasInstance: !0, + }), + rt && + jsxRuntimeExports.jsx(TextHighHZ, { + isPerf: !0, + metric: 'matriceCount', + fontSize: 14, + offsetY: 30, + offsetX: 320, + round: 0, + hasInstance: !0, + }), + ], + }), + et && + jsxRuntimeExports.jsx(TextHighHZ, { + color: `rgb(${colorsGraph(tt).custom.toString()})`, + customData: et, + fontSize: 14, + offsetY: 0, + offsetX: nt ? 200 : 320, + round: 0, + }), + ], + }), + ChartCurve = ({ colorBlind: tt, minimal: et, chart: nt = { length: 30, hz: 15 } }) => { + const rt = reactExports.useMemo( + () => ({ + fps: new Float32Array(nt.length * 3), + cpu: new Float32Array(nt.length * 3), + gpu: new Float32Array(nt.length * 3), + }), + [nt], + ), + it = reactExports.useRef(null), + ot = reactExports.useRef(null), + at = reactExports.useRef(null), + st = reactExports.useRef(null), + lt = reactExports.useMemo(() => new Vector3(0, 0, 0), []), + ct = (ut, ht = 1, dt, pt) => { + let mt = 0 + const { width: gt, height: yt } = pt, + bt = usePerfStore.getState().chart.data[ut] + if (!bt || bt.length === 0) return + const vt = et ? 2 : 6, + xt = et ? 12 : 50 + let kt = bt.length + for (let St = 0; St < kt; St++) { + let Tt = (usePerfStore.getState().chart.circularId + St + 1) % kt + bt[Tt] !== void 0 && + (bt[Tt] > mt && (mt = bt[Tt] * ht), + lt.set( + vt + (St / (kt - 1)) * (gt - vt * 2) - gt / 2, + ((Math.min(100, bt[Tt]) * ht) / 100) * (yt - vt * 2 - xt) - yt / 2, + 0, + ), + lt.toArray(dt.attributes.position.array, St * 3)) + } + dt.attributes.position.needsUpdate = !0 + } + return ( + useFrame(function ({ viewport: ht }) { + ct('fps', 1, it.current, ht), + ot.current && + ot.current.color.set( + usePerfStore.getState().overclockingFps + ? colorsGraph(tt).overClock.toString() + : `rgb(${colorsGraph(tt).fps.toString()})`, + ), + ct('gpu', 5, at.current, ht), + ct('cpu', 5, st.current, ht) + }), + jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { + children: [ + jsxRuntimeExports.jsxs('line', { + children: [ + jsxRuntimeExports.jsx('bufferGeometry', { + ref: it, + children: jsxRuntimeExports.jsx('bufferAttribute', { + attach: 'attributes-position', + count: nt.length, + array: rt.fps, + itemSize: 3, + usage: DynamicDrawUsage, + needsUpdate: !0, + }), + }), + jsxRuntimeExports.jsx('lineBasicMaterial', { + ref: ot, + color: `rgb(${colorsGraph(tt).fps.toString()})`, + transparent: !0, + opacity: 0.5, + }), + ], + }), + jsxRuntimeExports.jsxs('line', { + children: [ + jsxRuntimeExports.jsx('bufferGeometry', { + ref: at, + children: jsxRuntimeExports.jsx('bufferAttribute', { + attach: 'attributes-position', + count: nt.length, + array: rt.gpu, + itemSize: 3, + usage: DynamicDrawUsage, + needsUpdate: !0, + }), + }), + jsxRuntimeExports.jsx('lineBasicMaterial', { + color: `rgb(${colorsGraph(tt).gpu.toString()})`, + transparent: !0, + opacity: 0.5, + }), + ], + }), + jsxRuntimeExports.jsxs('line', { + children: [ + jsxRuntimeExports.jsx('bufferGeometry', { + ref: st, + children: jsxRuntimeExports.jsx('bufferAttribute', { + attach: 'attributes-position', + count: nt.length, + array: rt.cpu, + itemSize: 3, + usage: DynamicDrawUsage, + needsUpdate: !0, + }), + }), + jsxRuntimeExports.jsx('lineBasicMaterial', { + color: `rgb(${colorsGraph(tt).cpu.toString()})`, + transparent: !0, + opacity: 0.5, + }), + ], + }), + ], + }) + ) + }, + ChartUI = ({ + colorBlind: tt, + chart: et, + customData: nt, + matrixUpdate: rt, + showGraph: it = !0, + antialias: ot = !0, + minimal: at, + }) => { + const st = reactExports.useRef(void 0), + lt = usePerfStore((ct) => ct.paused) + return jsxRuntimeExports.jsxs(Graph$1, { + style: { + display: 'flex', + position: 'absolute', + height: `${at ? 37 : it ? 100 : 60}px`, + minWidth: `${at ? '100px' : nt ? '370px' : '310px'}`, + }, + children: [ + jsxRuntimeExports.jsx(Canvas$1, { + ref: st, + orthographic: !0, + dpr: ot ? [1, 2] : 1, + gl: { antialias: !0, alpha: !0, stencil: !1, depth: !1 }, + onCreated: ({ scene: ct }) => { + ct.traverse((ut) => { + ;(ut.matrixWorldAutoUpdate = !1), (ut.matrixAutoUpdate = !1) + }) + }, + flat: !0, + style: { + marginBottom: '-42px', + position: 'relative', + pointerEvents: 'none', + background: 'transparent !important', + height: `${at ? 37 : it ? 100 : 60}px`, + }, + children: lt + ? null + : jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { + children: [ + jsxRuntimeExports.jsx(Renderer, {}), + jsxRuntimeExports.jsx(TextsHighHZ, { customData: nt, minimal: at, matrixUpdate: rt }), + it && jsxRuntimeExports.jsx(ChartCurve, { colorBlind: tt, minimal: at, chart: et }), + ], + }), + }), + lt && jsxRuntimeExports.jsxs(Graphpc, { children: [jsxRuntimeExports.jsx(PauseIcon, {}), ' PAUSED'] }), + ], + }) + }, + Renderer = () => ( + useFrame(function ({ gl: et, scene: nt, camera: rt }) { + rt.updateMatrix(), + (matriceCount.value -= 1), + rt.matrixWorld.copy(rt.matrix), + rt.matrixWorldInverse.copy(rt.matrixWorld).invert(), + et.render(nt, rt), + (matriceWorldCount.value = 0), + (matriceCount.value = 0) + }, 1 / 0), + null + ) + function _objectWithoutPropertiesLoose$j(tt, et) { + if (tt == null) return {} + var nt = {}, + rt = Object.keys(tt), + it, + ot + for (ot = 0; ot < rt.length; ot++) (it = rt[ot]), !(et.indexOf(it) >= 0) && (nt[it] = tt[it]) + return nt + } + function _objectWithoutProperties$j(tt, et) { + if (tt == null) return {} + var nt = _objectWithoutPropertiesLoose$j(tt, et), + rt, + it + if (Object.getOwnPropertySymbols) { + var ot = Object.getOwnPropertySymbols(tt) + for (it = 0; it < ot.length; it++) + (rt = ot[it]), !(et.indexOf(rt) >= 0) && Object.prototype.propertyIsEnumerable.call(tt, rt) && (nt[rt] = tt[rt]) + } + return nt + } + const _excluded$G = ['portal', 'className', 'children'], + Html = reactExports.forwardRef((tt, et) => { + let { portal: nt, className: rt, children: it } = tt, + ot = _objectWithoutProperties$j(tt, _excluded$G) + const at = useThree((ut) => ut.gl), + st = reactExports.useRef(null), + lt = reactExports.useRef(null), + ct = (nt == null ? void 0 : nt.current) != null ? nt.current : at.domElement.parentNode + return ( + reactExports.useLayoutEffect(() => { + if (!st.current || !ct) return + const ut = document.createElement('div'), + ht = (lt.current = createRoot$1(ut)) + return ( + ct.appendChild(ut), + () => { + ht.unmount(), (lt.current = null), ct.removeChild(ut) + } + ) + }, [ct]), + reactExports.useLayoutEffect(() => { + const ut = lt.current + ut && ut.render(jsxRuntimeExports.jsx('div', { ref: et, className: rt, children: it })) + }), + jsxRuntimeExports.jsx('group', _objectSpread2(_objectSpread2({}, ot), {}, { ref: st })) + ) + }), + addTextureUniforms = (tt, et) => { + const nt = (it) => { + switch (it) { + case 1e3: + return 'RepeatWrapping' + case 1001: + return 'ClampToEdgeWrapping' + case 1002: + return 'MirroredRepeatWrapping' + default: + return 'ClampToEdgeWrapping' + } + }, + rt = (it) => { + switch (it) { + case 3e3: + return 'LinearEncoding' + case 3001: + return 'sRGBEncoding' + case 3002: + return 'RGBEEncoding' + case 3003: + return 'LogLuvEncoding' + case 3004: + return 'RGBM7Encoding' + case 3005: + return 'RGBM16Encoding' + case 3006: + return 'RGBDEncoding' + case 3007: + return 'GammaEncoding' + default: + return 'ClampToEdgeWrapping' + } + } + return { + name: tt, + url: et.image.currentSrc, + encoding: rt(et.encoding), + wrapT: nt(et.image.wrapT), + flipY: et.flipY.toString(), + } + }, + UniformsGL = ({ program: tt, material: et, setTexNumber: nt }) => { + const rt = usePerfStore((at) => at.gl), + [it, ot] = reactExports.useState(null) + return ( + reactExports.useEffect(() => { + if (rt) { + const at = tt == null ? void 0 : tt.getUniforms() + let st = 0 + const lt = new Map() + at.seq.forEach((ct) => { + if ( + !ct.id.includes('uTroika') && + ct.id !== 'isOrthographic' && + ct.id !== 'uvTransform' && + ct.id !== 'lightProbe' && + ct.id !== 'projectionMatrix' && + ct.id !== 'viewMatrix' && + ct.id !== 'normalMatrix' && + ct.id !== 'modelMatrix' && + ct.id !== 'modelViewMatrix' + ) { + let ut = [], + ht = { name: ct.id } + ct.cache && + (ct.cache.forEach((dt) => { + typeof dt < 'u' && ut.push(dt.toString().substring(0, 4)) + }), + (ht.value = ut.join()), + et[ct.id] && + et[ct.id].image && + et[ct.id].image && + (st++, (ht.value = addTextureUniforms(ct.id, et[ct.id]))), + ht.value || (ht.value = 'empty'), + lt.set(ct.id, ht)) + } + }), + et.uniforms && + Object.keys(et.uniforms).forEach((ct) => { + const ut = et.uniforms[ct] + if (ut.value) { + const { value: ht } = ut + let dt = { name: ct } + if (ct.includes('uTroika')) return + if (ht instanceof Texture) st++, (dt.value = addTextureUniforms(ct, ht)) + else { + let pt = JSON.stringify(ht) + try { + pt = JSON.stringify(ht) + } catch { + pt = ht.toString() + } + dt.value = pt + } + lt.set(ct, dt) + } + }), + st > 0 && nt(st), + ot(lt) + } + }, []), + jsxRuntimeExports.jsx(ProgramsUL, { + children: + it && + Array.from(it.values()).map((at) => + jsxRuntimeExports.jsx( + 'span', + { + children: + typeof at.value == 'string' + ? jsxRuntimeExports.jsx('li', { + children: jsxRuntimeExports.jsxs('span', { + children: [ + at.name, + ' :', + ' ', + jsxRuntimeExports.jsxs('b', { + children: [at.value.substring(0, 30), at.value.length > 30 ? '...' : ''], + }), + ], + }), + }) + : jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { + children: [ + jsxRuntimeExports.jsx('li', { + children: jsxRuntimeExports.jsxs('b', { children: [at.value.name, ':'] }), + }), + jsxRuntimeExports.jsxs('div', { + children: [ + Object.keys(at.value).map((st) => + st !== 'name' + ? jsxRuntimeExports.jsx( + 'div', + { + children: + st === 'url' + ? jsxRuntimeExports.jsx('a', { + href: at.value[st], + target: '_blank', + children: jsxRuntimeExports.jsx('img', { src: at.value[st] }), + }) + : jsxRuntimeExports.jsxs('li', { + children: [ + st, + ': ', + jsxRuntimeExports.jsx('b', { children: at.value[st] }), + ], + }), + }, + st, + ) + : null, + ), + jsxRuntimeExports.jsxs(ProgramConsole, { + onClick: () => { + var st + console.info( + et[at.value.name] || + (et == null || (st = et.uniforms[at.value.name]) === null || st === void 0 + ? void 0 + : st.value), + ) + }, + children: ['console.info(', at.value.name, ');'], + }), + ], + }), + ], + }), + }, + at.name, + ), + ), + }) + ) + }, + DynamicDrawCallInfo = ({ el: tt }) => { + usePerfStore((rt) => rt.log) + const et = usePerfStore((rt) => rt.gl), + nt = (rt) => { + if (!et) return 0 + const it = + Math.round( + (rt.drawCounts.total / (et.info.render.triangles + et.info.render.lines + et.info.render.points)) * + 100 * + 10, + ) / 10 + return (isFinite(it) && it) || 0 + } + return jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { + children: + tt.drawCounts.total > 0 && + jsxRuntimeExports.jsxs(PerfI, { + style: { height: 'auto', width: 'auto', margin: '0 4px' }, + children: [ + tt.drawCounts.type === 'Triangle' + ? jsxRuntimeExports.jsx(VercelLogoIcon, { style: { top: '-1px' } }) + : jsxRuntimeExports.jsx(ActivityLogIcon, { style: { top: '-1px' } }), + tt.drawCounts.total, + jsxRuntimeExports.jsxs('small', { children: [tt.drawCounts.type, 's'] }), + et && + jsxRuntimeExports.jsxs(PerfB, { + style: { bottom: '-10px', width: '40px', fontWeight: 'bold' }, + children: [tt.visible && !tt.material.wireframe ? nt(tt) : 0, '%'], + }), + ], + }), + }) + }, + ProgramUI = ({ el: tt }) => { + const [et, nt] = reactExports.useState(tt.visible), + [rt, it] = reactExports.useState(tt.expand), + [ot, at] = reactExports.useState(0), + { meshes: st, program: lt, material: ct } = tt + return jsxRuntimeExports.jsxs(ProgramGeo, { + children: [ + jsxRuntimeExports.jsxs(ProgramHeader, { + onClick: () => { + ;(tt.expand = !rt), + Object.keys(st).forEach((ut) => { + const ht = st[ut] + ht.material.wireframe = !1 + }), + it(!rt) + }, + children: [ + jsxRuntimeExports.jsx(Toggle, { + style: { marginRight: '6px' }, + children: rt + ? jsxRuntimeExports.jsx('span', { children: jsxRuntimeExports.jsx(TriangleDownIcon, {}) }) + : jsxRuntimeExports.jsx('span', { children: jsxRuntimeExports.jsx(TriangleUpIcon, {}) }), + }), + lt && + jsxRuntimeExports.jsxs('span', { + children: [ + jsxRuntimeExports.jsx(ProgramTitle, { children: lt.name }), + jsxRuntimeExports.jsxs(PerfI, { + style: { height: 'auto', width: 'auto', margin: '0 4px' }, + children: [ + jsxRuntimeExports.jsx(LayersIcon, { style: { top: '-1px' } }), + Object.keys(st).length, + jsxRuntimeExports.jsx('small', { children: Object.keys(st).length > 1 ? 'users' : 'user' }), + ], + }), + ot > 0 && + jsxRuntimeExports.jsxs(PerfI, { + style: { height: 'auto', width: 'auto', margin: '0 4px' }, + children: [ + ot > 1 + ? jsxRuntimeExports.jsx(ImageIcon, { style: { top: '-1px' } }) + : jsxRuntimeExports.jsx(ImageIcon, { style: { top: '-1px' } }), + ot, + jsxRuntimeExports.jsx('small', { children: 'tex' }), + ], + }), + jsxRuntimeExports.jsx(DynamicDrawCallInfo, { el: tt }), + ct.glslVersion === '300 es' && + jsxRuntimeExports.jsxs(PerfI, { + style: { height: 'auto', width: 'auto', margin: '0 4px' }, + children: [ + jsxRuntimeExports.jsx(RocketIcon, { style: { top: '-1px' } }), + '300', + jsxRuntimeExports.jsx('small', { children: 'es' }), + jsxRuntimeExports.jsx(PerfB, { style: { bottom: '-10px', width: '40px' }, children: 'glsl' }), + ], + }), + ], + }), + jsxRuntimeExports.jsx(ToggleVisible, { + onPointerEnter: () => { + Object.keys(st).forEach((ut) => { + const ht = st[ut] + ht.material.wireframe = !0 + }) + }, + onPointerLeave: () => { + Object.keys(st).forEach((ut) => { + const ht = st[ut] + ht.material.wireframe = !1 + }) + }, + onClick: (ut) => { + ut.stopPropagation(), + Object.keys(st).forEach((ht) => { + const dt = st[ht], + pt = !et + ;(dt.visible = pt), (tt.visible = pt), nt(pt) + }) + }, + children: et ? jsxRuntimeExports.jsx(EyeOpenIcon, {}) : jsxRuntimeExports.jsx(EyeNoneIcon, {}), + }), + ], + }), + jsxRuntimeExports.jsxs('div', { + style: { maxHeight: rt ? '9999px' : 0, overflow: 'hidden' }, + children: [ + jsxRuntimeExports.jsxs(ProgramsULHeader, { + children: [jsxRuntimeExports.jsx(ButtonIcon, {}), ' Uniforms:'], + }), + jsxRuntimeExports.jsx(UniformsGL, { program: lt, material: ct, setTexNumber: at }), + jsxRuntimeExports.jsxs(ProgramsULHeader, { + children: [jsxRuntimeExports.jsx(CubeIcon, {}), ' Geometries:'], + }), + jsxRuntimeExports.jsx(ProgramsUL, { + children: + st && + Object.keys(st).map( + (ut) => + st[ut] && + st[ut].geometry && + jsxRuntimeExports.jsxs( + ProgramsGeoLi, + { + children: [ + jsxRuntimeExports.jsxs('span', { children: [st[ut].geometry.type, ': '] }), + st[ut].userData && + st[ut].userData.drawCount && + jsxRuntimeExports.jsxs('b', { + children: [ + jsxRuntimeExports.jsxs('div', { + children: [ + st[ut].userData.drawCount.count, + jsxRuntimeExports.jsxs('small', { + children: [' ', st[ut].userData.drawCount.type, 's'], + }), + ], + }), + jsxRuntimeExports.jsx('br', {}), + jsxRuntimeExports.jsxs('div', { + children: [ + Math.round((estimateBytesUsed(st[ut].geometry) / 1024) * 1e3) / 1e3, + 'Kb', + jsxRuntimeExports.jsx('small', { children: ' memory used' }), + ], + }), + ], + }), + ], + }, + ut, + ), + ), + }), + jsxRuntimeExports.jsxs(ProgramConsole, { + onClick: () => { + console.info(ct) + }, + children: ['console.info(', ct.type, ')'], + }), + ], + }), + ], + }) + }, + ProgramsUI = () => { + usePerfStore((et) => et.triggerProgramsUpdate) + const tt = usePerfStore((et) => et.programs) + return jsxRuntimeExports.jsx(ProgramsContainer, { + children: + tt && + Array.from(tt.values()).map((et) => + et && et ? jsxRuntimeExports.jsx(ProgramUI, { el: et }, et.material.uuid) : null, + ), + }) + }, + colorsGraph = (tt) => ({ + overClock: '#ff6eff', + fps: tt ? '100, 143, 255' : '238,38,110', + cpu: tt ? '254, 254, 98' : '66,226,46', + gpu: tt ? '254,254,254' : '253,151,31', + custom: tt ? '86,180,233' : '40,255,255', + }), + DynamicUIPerf = ({ showGraph: tt, colorBlind: et }) => { + const nt = usePerfStore((it) => it.overclockingFps), + rt = usePerfStore((it) => it.fpsLimit) + return jsxRuntimeExports.jsxs(PerfB, { + style: tt ? { color: nt ? colorsGraph(et).overClock.toString() : `rgb(${colorsGraph(et).fps})` } : {}, + children: ['FPS ', nt ? `${rt}🚀` : ''], + }) + }, + DynamicUI = ({ showGraph: tt, colorBlind: et, customData: nt, minimal: rt }) => { + const it = usePerfStore((ot) => ot.gl) + return it + ? jsxRuntimeExports.jsxs(PerfIContainer, { + children: [ + jsxRuntimeExports.jsxs(PerfI, { + children: [ + jsxRuntimeExports.jsx(LightningBoltIcon, {}), + jsxRuntimeExports.jsx(PerfB, { + style: tt ? { color: `rgb(${colorsGraph(et).gpu.toString()})` } : {}, + children: 'GPU', + }), + jsxRuntimeExports.jsx(PerfSmallI, { children: 'ms' }), + ], + }), + jsxRuntimeExports.jsxs(PerfI, { + children: [ + jsxRuntimeExports.jsx(RulerHorizontalIcon, {}), + jsxRuntimeExports.jsx(PerfB, { + style: tt ? { color: `rgb(${colorsGraph(et).cpu.toString()})` } : {}, + children: 'CPU', + }), + jsxRuntimeExports.jsx(PerfSmallI, { children: 'ms' }), + ], + }), + jsxRuntimeExports.jsxs(PerfI, { + children: [ + jsxRuntimeExports.jsx(LapTimerIcon, {}), + jsxRuntimeExports.jsx(DynamicUIPerf, { showGraph: tt, colorBlind: et }), + ], + }), + !rt && + it && + jsxRuntimeExports.jsxs(PerfI, { + children: [ + jsxRuntimeExports.jsx(TextAlignJustifyIcon, {}), + jsxRuntimeExports.jsx(PerfB, { children: it.info.render.calls === 1 ? 'call' : 'calls' }), + ], + }), + !rt && + it && + jsxRuntimeExports.jsxs(PerfI, { + children: [ + jsxRuntimeExports.jsx(VercelLogoIcon, {}), + jsxRuntimeExports.jsx(PerfB, { children: 'Triangles' }), + ], + }), + nt && + jsxRuntimeExports.jsxs(PerfI, { + children: [ + jsxRuntimeExports.jsx(BarChartIcon, {}), + jsxRuntimeExports.jsx(PerfB, { + style: tt ? { color: `rgb(${colorsGraph(et).custom})` } : {}, + children: nt.name, + }), + nt.info && jsxRuntimeExports.jsx(PerfSmallI, { children: nt.info }), + ], + }), + ], + }) + : null + }, + PerfUI = ({ + showGraph: tt, + colorBlind: et, + deepAnalyze: nt, + customData: rt, + matrixUpdate: it, + openByDefault: ot, + minimal: at, + }) => + jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { + children: [ + jsxRuntimeExports.jsx(DynamicUI, { showGraph: tt, colorBlind: et, customData: rt, minimal: at }), + !at && + jsxRuntimeExports.jsx(PerfThree, { matrixUpdate: it, openByDefault: ot, deepAnalyze: nt, showGraph: tt }), + ], + }), + InfoUI = ({ matrixUpdate: tt }) => + jsxRuntimeExports.jsxs('div', { + children: [ + jsxRuntimeExports.jsxs(PerfI, { + children: [jsxRuntimeExports.jsx(MarginIcon, {}), jsxRuntimeExports.jsx(PerfB, { children: 'Geometries' })], + }), + jsxRuntimeExports.jsxs(PerfI, { + children: [jsxRuntimeExports.jsx(ImageIcon, {}), jsxRuntimeExports.jsx(PerfB, { children: 'Textures' })], + }), + jsxRuntimeExports.jsxs(PerfI, { + children: [ + jsxRuntimeExports.jsx(ActivityLogIcon, {}), + jsxRuntimeExports.jsx(PerfB, { children: 'shaders' }), + ], + }), + jsxRuntimeExports.jsxs(PerfI, { + children: [jsxRuntimeExports.jsx(MinusIcon, {}), jsxRuntimeExports.jsx(PerfB, { children: 'Lines' })], + }), + jsxRuntimeExports.jsxs(PerfI, { + children: [jsxRuntimeExports.jsx(DotIcon, {}), jsxRuntimeExports.jsx(PerfB, { children: 'Points' })], + }), + tt && + jsxRuntimeExports.jsxs(PerfI, { + children: [ + jsxRuntimeExports.jsx(DropdownMenuIcon, {}), + jsxRuntimeExports.jsx(PerfB, { children: 'Matrices' }), + ], + }), + ], + }), + ToggleEl = ({ tab: tt, title: et, set: nt }) => { + const rt = usePerfStore((it) => it.tab) + return jsxRuntimeExports.jsx(Toggle, { + className: `${rt === tt ? ' __perf_toggle_tab_active' : ''}`, + onClick: () => { + nt(!0), usePerfStore.setState({ tab: tt }) + }, + children: jsxRuntimeExports.jsx('span', { children: et }), + }) + }, + PerfThree = ({ openByDefault: tt, showGraph: et, deepAnalyze: nt, matrixUpdate: rt }) => { + const [it, ot] = React$1.useState(tt) + return jsxRuntimeExports.jsxs('span', { + children: [ + jsxRuntimeExports.jsx(TabContainers, { show: it, showGraph: et, matrixUpdate: rt }), + tt && !nt + ? null + : jsxRuntimeExports.jsxs(ToggleContainer, { + className: '__perf_toggle', + children: [ + nt && jsxRuntimeExports.jsx(ToggleEl, { tab: 'programs', title: 'Programs', set: ot }), + nt && jsxRuntimeExports.jsx(ToggleEl, { tab: 'infos', title: 'Infos', set: ot }), + jsxRuntimeExports.jsx(Toggle, { + onClick: () => { + ot(!it) + }, + children: it + ? jsxRuntimeExports.jsxs('span', { + children: [jsxRuntimeExports.jsx(TriangleDownIcon, {}), ' Minimize'], + }) + : jsxRuntimeExports.jsxs('span', { + children: [jsxRuntimeExports.jsx(TriangleUpIcon, {}), ' More'], + }), + }), + ], + }), + ], + }) + }, + TabContainers = ({ show: tt, showGraph: et, matrixUpdate: nt }) => { + const rt = usePerfStore((it) => it.tab) + return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { + children: [ + jsxRuntimeExports.jsx(InfoUI, { matrixUpdate: nt }), + tt && + jsxRuntimeExports.jsx('div', { + children: jsxRuntimeExports.jsx(ContainerScroll, { + style: { marginTop: et ? '38px' : 0 }, + children: rt === 'programs' && jsxRuntimeExports.jsx(ProgramsUI, {}), + }), + }), + ], + }) + }, + Gui = ({ + showGraph: tt, + colorBlind: et, + openByDefault: nt, + className: rt, + overClock: it, + style: ot, + position: at, + chart: st, + deepAnalyze: lt, + antialias: ct, + customData: ut, + matrixUpdate: ht, + minimal: dt, + }) => { + const pt = reactExports.useRef(null) + return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { + children: [ + jsxRuntimeExports.jsx(Headless, { chart: st, overClock: it, deepAnalyze: lt, matrixUpdate: ht }), + jsxRuntimeExports.jsx(Html, { + transform: !1, + children: jsxRuntimeExports.jsxs(PerfS, { + className: (rt ? ' '.concat(rt) : ' ') + ` ${at || ''} ${dt ? 'minimal' : ''}`, + style: _objectSpread2({ minHeight: dt ? '37px' : tt ? '100px' : '60px' }, ot), + ref: pt, + children: [ + jsxRuntimeExports.jsx(ChartUI, { + perfContainerRef: pt, + colorBlind: et, + chart: st, + showGraph: tt, + antialias: ct, + customData: ut, + minimal: dt, + matrixUpdate: ht, + }), + jsxRuntimeExports.jsx(PerfUI, { + colorBlind: et, + showGraph: tt, + deepAnalyze: lt, + openByDefault: nt, + customData: ut, + matrixUpdate: ht, + minimal: dt, + }), + ], + }), + }), + ], + }) + }, + Perf = ({ + headless: tt = !1, + colorBlind: et = !1, + overClock: nt = !1, + showGraph: rt = !0, + trackCPU: it = !1, + deepAnalyze: ot = !1, + antialias: at = !0, + openByDefault: st = !0, + customData: lt, + matrixUpdate: ct = !1, + position: ut = 'top-right', + chart: ht = { length: 30, hz: 15 }, + className: dt, + style: pt, + minimal: mt = !1, + }) => + tt + ? jsxRuntimeExports.jsx(Headless, { chart: ht, deepAnalyze: ot, matrixUpdate: ct, overClock: nt }) + : jsxRuntimeExports.jsx(Gui, { + colorBlind: et, + showGraph: rt, + trackCPU: it, + openByDefault: st, + className: dt, + style: pt, + overClock: nt, + position: ut, + antialias: at, + chart: ht, + deepAnalyze: ot, + minimal: mt, + customData: lt, + matrixUpdate: ct, + }), + UNIVERSE_SCALE = 5e3, + DATA_COLOR_PALETTE = { show: '#FF723C', clip: '#FFFF00', episode: '#FF7F50', guest: '#E066FF', topic: '#F8F8FF' }, + getNodeColorByType = (tt, et) => { + const nt = DATA_COLOR_PALETTE[tt] || '#F8F8FF' + return et ? nt : parseInt(nt.replace('#', '0x'), 16) + }, + defaultData$5 = { isUserDragging: !1, isUserScrolling: !1, userMovedCamera: !1, isUserScrollingOnHtmlPanel: !1 }, + useControlStore = react((tt) => ({ + ...defaultData$5, + setIsUserDragging: (et) => tt({ isUserDragging: et }), + setIsUserScrolling: (et) => tt({ isUserScrolling: et }), + setUserMovedCamera: (et) => tt({ userMovedCamera: et }), + setIsUserScrollingOnHtmlPanel: (et) => tt({ isUserScrollingOnHtmlPanel: et }), + })) + function _assertThisInitialized$c(tt) { + if (tt === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called") + return tt + } + function _inheritsLoose(tt, et) { + ;(tt.prototype = Object.create(et.prototype)), (tt.prototype.constructor = tt), (tt.__proto__ = et) + } + /*! + * GSAP 3.12.2 + * https://greensock.com + * + * @license Copyright 2008-2023, GreenSock. All rights reserved. + * Subject to the terms at https://greensock.com/standard-license or for + * Club GreenSock members, the agreement issued with that membership. + * @author: Jack Doyle, jack@greensock.com + */ var _config = { autoSleep: 120, force3D: 'auto', nullTargetWarn: 1, units: { lineHeight: '' } }, + _defaults = { duration: 0.5, overwrite: !1, delay: 0 }, + _suppressOverwrites, + _reverting$1, + _context, + _bigNum$1 = 1e8, + _tinyNum = 1 / _bigNum$1, + _2PI = Math.PI * 2, + _HALF_PI = _2PI / 4, + _gsID = 0, + _sqrt = Math.sqrt, + _cos = Math.cos, + _sin = Math.sin, + _isString$1 = function (et) { + return typeof et == 'string' + }, + _isFunction = function (et) { + return typeof et == 'function' + }, + _isNumber$1 = function (et) { + return typeof et == 'number' + }, + _isUndefined = function (et) { + return typeof et > 'u' + }, + _isObject = function (et) { + return typeof et == 'object' + }, + _isNotFalse = function (et) { + return et !== !1 + }, + _windowExists$1 = function () { + return typeof window < 'u' + }, + _isFuncOrString = function (et) { + return _isFunction(et) || _isString$1(et) + }, + _isTypedArray = (typeof ArrayBuffer == 'function' && ArrayBuffer.isView) || function () {}, + _isArray = Array.isArray, + _strictNumExp = /(?:-?\.?\d|\.)+/gi, + _numExp = /[-+=.]*\d+[.e\-+]*\d*[e\-+]*\d*/g, + _numWithUnitExp = /[-+=.]*\d+[.e-]*\d*[a-z%]*/g, + _complexStringNumExp = /[-+=.]*\d+\.?\d*(?:e-|e\+)?\d*/gi, + _relExp = /[+-]=-?[.\d]+/, + _delimitedValueExp = /[^,'"\[\]\s]+/gi, + _unitExp = /^[+\-=e\s\d]*\d+[.\d]*([a-z]*|%)\s*$/i, + _globalTimeline, + _win$1, + _coreInitted, + _doc$1, + _globals = {}, + _installScope = {}, + _coreReady, + _install = function (et) { + return (_installScope = _merge(et, _globals)) && gsap + }, + _missingPlugin = function (et, nt) { + return console.warn('Invalid property', et, 'set to', nt, 'Missing plugin? gsap.registerPlugin()') + }, + _warn = function (et, nt) { + return !nt && console.warn(et) + }, + _addGlobal = function (et, nt) { + return (et && (_globals[et] = nt) && _installScope && (_installScope[et] = nt)) || _globals + }, + _emptyFunc = function () { + return 0 + }, + _startAtRevertConfig = { suppressEvents: !0, isStart: !0, kill: !1 }, + _revertConfigNoKill = { suppressEvents: !0, kill: !1 }, + _revertConfig = { suppressEvents: !0 }, + _reservedProps = {}, + _lazyTweens = [], + _lazyLookup = {}, + _lastRenderedFrame, + _plugins = {}, + _effects = {}, + _nextGCFrame = 30, + _harnessPlugins = [], + _callbackNames = '', + _harness = function (et) { + var nt = et[0], + rt, + it + if ((_isObject(nt) || _isFunction(nt) || (et = [et]), !(rt = (nt._gsap || {}).harness))) { + for (it = _harnessPlugins.length; it-- && !_harnessPlugins[it].targetTest(nt); ); + rt = _harnessPlugins[it] + } + for (it = et.length; it--; ) + (et[it] && (et[it]._gsap || (et[it]._gsap = new GSCache(et[it], rt)))) || et.splice(it, 1) + return et + }, + _getCache = function (et) { + return et._gsap || _harness(toArray$3(et))[0]._gsap + }, + _getProperty = function (et, nt, rt) { + return (rt = et[nt]) && _isFunction(rt) + ? et[nt]() + : (_isUndefined(rt) && et.getAttribute && et.getAttribute(nt)) || rt + }, + _forEachName = function (et, nt) { + return (et = et.split(',')).forEach(nt) || et + }, + _round = function (et) { + return Math.round(et * 1e5) / 1e5 || 0 + }, + _roundPrecise = function (et) { + return Math.round(et * 1e7) / 1e7 || 0 + }, + _parseRelative = function (et, nt) { + var rt = nt.charAt(0), + it = parseFloat(nt.substr(2)) + return (et = parseFloat(et)), rt === '+' ? et + it : rt === '-' ? et - it : rt === '*' ? et * it : et / it + }, + _arrayContainsAny = function (et, nt) { + for (var rt = nt.length, it = 0; et.indexOf(nt[it]) < 0 && ++it < rt; ); + return it < rt + }, + _lazyRender = function () { + var et = _lazyTweens.length, + nt = _lazyTweens.slice(0), + rt, + it + for (_lazyLookup = {}, _lazyTweens.length = 0, rt = 0; rt < et; rt++) + (it = nt[rt]), it && it._lazy && (it.render(it._lazy[0], it._lazy[1], !0)._lazy = 0) + }, + _lazySafeRender = function (et, nt, rt, it) { + _lazyTweens.length && !_reverting$1 && _lazyRender(), + et.render(nt, rt, it || (_reverting$1 && nt < 0 && (et._initted || et._startAt))), + _lazyTweens.length && !_reverting$1 && _lazyRender() + }, + _numericIfPossible = function (et) { + var nt = parseFloat(et) + return (nt || nt === 0) && (et + '').match(_delimitedValueExp).length < 2 ? nt : _isString$1(et) ? et.trim() : et + }, + _passThrough = function (et) { + return et + }, + _setDefaults = function (et, nt) { + for (var rt in nt) rt in et || (et[rt] = nt[rt]) + return et + }, + _setKeyframeDefaults = function (et) { + return function (nt, rt) { + for (var it in rt) it in nt || (it === 'duration' && et) || it === 'ease' || (nt[it] = rt[it]) + } + }, + _merge = function (et, nt) { + for (var rt in nt) et[rt] = nt[rt] + return et + }, + _mergeDeep = function tt(et, nt) { + for (var rt in nt) + rt !== '__proto__' && + rt !== 'constructor' && + rt !== 'prototype' && + (et[rt] = _isObject(nt[rt]) ? tt(et[rt] || (et[rt] = {}), nt[rt]) : nt[rt]) + return et + }, + _copyExcluding = function (et, nt) { + var rt = {}, + it + for (it in et) it in nt || (rt[it] = et[it]) + return rt + }, + _inheritDefaults = function (et) { + var nt = et.parent || _globalTimeline, + rt = et.keyframes ? _setKeyframeDefaults(_isArray(et.keyframes)) : _setDefaults + if (_isNotFalse(et.inherit)) for (; nt; ) rt(et, nt.vars.defaults), (nt = nt.parent || nt._dp) + return et + }, + _arraysMatch = function (et, nt) { + for (var rt = et.length, it = rt === nt.length; it && rt-- && et[rt] === nt[rt]; ); + return rt < 0 + }, + _addLinkedListItem = function (et, nt, rt, it, ot) { + rt === void 0 && (rt = '_first'), it === void 0 && (it = '_last') + var at = et[it], + st + if (ot) for (st = nt[ot]; at && at[ot] > st; ) at = at._prev + return ( + at ? ((nt._next = at._next), (at._next = nt)) : ((nt._next = et[rt]), (et[rt] = nt)), + nt._next ? (nt._next._prev = nt) : (et[it] = nt), + (nt._prev = at), + (nt.parent = nt._dp = et), + nt + ) + }, + _removeLinkedListItem = function (et, nt, rt, it) { + rt === void 0 && (rt = '_first'), it === void 0 && (it = '_last') + var ot = nt._prev, + at = nt._next + ot ? (ot._next = at) : et[rt] === nt && (et[rt] = at), + at ? (at._prev = ot) : et[it] === nt && (et[it] = ot), + (nt._next = nt._prev = nt.parent = null) + }, + _removeFromParent = function (et, nt) { + et.parent && (!nt || et.parent.autoRemoveChildren) && et.parent.remove && et.parent.remove(et), (et._act = 0) + }, + _uncache = function (et, nt) { + if (et && (!nt || nt._end > et._dur || nt._start < 0)) for (var rt = et; rt; ) (rt._dirty = 1), (rt = rt.parent) + return et + }, + _recacheAncestors = function (et) { + for (var nt = et.parent; nt && nt.parent; ) (nt._dirty = 1), nt.totalDuration(), (nt = nt.parent) + return et + }, + _rewindStartAt = function (et, nt, rt, it) { + return ( + et._startAt && + (_reverting$1 + ? et._startAt.revert(_revertConfigNoKill) + : (et.vars.immediateRender && !et.vars.autoRevert) || et._startAt.render(nt, !0, it)) + ) + }, + _hasNoPausedAncestors = function tt(et) { + return !et || (et._ts && tt(et.parent)) + }, + _elapsedCycleDuration = function (et) { + return et._repeat ? _animationCycle(et._tTime, (et = et.duration() + et._rDelay)) * et : 0 + }, + _animationCycle = function (et, nt) { + var rt = Math.floor((et /= nt)) + return et && rt === et ? rt - 1 : rt + }, + _parentToChildTotalTime = function (et, nt) { + return (et - nt._start) * nt._ts + (nt._ts >= 0 ? 0 : nt._dirty ? nt.totalDuration() : nt._tDur) + }, + _setEnd = function (et) { + return (et._end = _roundPrecise(et._start + (et._tDur / Math.abs(et._ts || et._rts || _tinyNum) || 0))) + }, + _alignPlayhead = function (et, nt) { + var rt = et._dp + return ( + rt && + rt.smoothChildTiming && + et._ts && + ((et._start = _roundPrecise( + rt._time - (et._ts > 0 ? nt / et._ts : ((et._dirty ? et.totalDuration() : et._tDur) - nt) / -et._ts), + )), + _setEnd(et), + rt._dirty || _uncache(rt, et)), + et + ) + }, + _postAddChecks = function (et, nt) { + var rt + if ( + ((nt._time || (!nt._dur && nt._initted) || (nt._start < et._time && (nt._dur || !nt.add))) && + ((rt = _parentToChildTotalTime(et.rawTime(), nt)), + (!nt._dur || _clamp(0, nt.totalDuration(), rt) - nt._tTime > _tinyNum) && nt.render(rt, !0)), + _uncache(et, nt)._dp && et._initted && et._time >= et._dur && et._ts) + ) { + if (et._dur < et.duration()) for (rt = et; rt._dp; ) rt.rawTime() >= 0 && rt.totalTime(rt._tTime), (rt = rt._dp) + et._zTime = -_tinyNum + } + }, + _addToTimeline = function (et, nt, rt, it) { + return ( + nt.parent && _removeFromParent(nt), + (nt._start = _roundPrecise( + (_isNumber$1(rt) ? rt : rt || et !== _globalTimeline ? _parsePosition(et, rt, nt) : et._time) + nt._delay, + )), + (nt._end = _roundPrecise(nt._start + (nt.totalDuration() / Math.abs(nt.timeScale()) || 0))), + _addLinkedListItem(et, nt, '_first', '_last', et._sort ? '_start' : 0), + _isFromOrFromStart(nt) || (et._recent = nt), + it || _postAddChecks(et, nt), + et._ts < 0 && _alignPlayhead(et, et._tTime), + et + ) + }, + _scrollTrigger = function (et, nt) { + return (_globals.ScrollTrigger || _missingPlugin('scrollTrigger', nt)) && _globals.ScrollTrigger.create(nt, et) + }, + _attemptInitTween = function (et, nt, rt, it, ot) { + if ((_initTween(et, nt, ot), !et._initted)) return 1 + if ( + !rt && + et._pt && + !_reverting$1 && + ((et._dur && et.vars.lazy !== !1) || (!et._dur && et.vars.lazy)) && + _lastRenderedFrame !== _ticker.frame + ) + return _lazyTweens.push(et), (et._lazy = [ot, it]), 1 + }, + _parentPlayheadIsBeforeStart = function tt(et) { + var nt = et.parent + return nt && nt._ts && nt._initted && !nt._lock && (nt.rawTime() < 0 || tt(nt)) + }, + _isFromOrFromStart = function (et) { + var nt = et.data + return nt === 'isFromStart' || nt === 'isStart' + }, + _renderZeroDurationTween = function (et, nt, rt, it) { + var ot = et.ratio, + at = + nt < 0 || + (!nt && + ((!et._start && _parentPlayheadIsBeforeStart(et) && !(!et._initted && _isFromOrFromStart(et))) || + ((et._ts < 0 || et._dp._ts < 0) && !_isFromOrFromStart(et)))) + ? 0 + : 1, + st = et._rDelay, + lt = 0, + ct, + ut, + ht + if ( + (st && + et._repeat && + ((lt = _clamp(0, et._tDur, nt)), + (ut = _animationCycle(lt, st)), + et._yoyo && ut & 1 && (at = 1 - at), + ut !== _animationCycle(et._tTime, st) && + ((ot = 1 - at), et.vars.repeatRefresh && et._initted && et.invalidate())), + at !== ot || _reverting$1 || it || et._zTime === _tinyNum || (!nt && et._zTime)) + ) { + if (!et._initted && _attemptInitTween(et, nt, it, rt, lt)) return + for ( + ht = et._zTime, + et._zTime = nt || (rt ? _tinyNum : 0), + rt || (rt = nt && !ht), + et.ratio = at, + et._from && (at = 1 - at), + et._time = 0, + et._tTime = lt, + ct = et._pt; + ct; + + ) + ct.r(at, ct.d), (ct = ct._next) + nt < 0 && _rewindStartAt(et, nt, rt, !0), + et._onUpdate && !rt && _callback(et, 'onUpdate'), + lt && et._repeat && !rt && et.parent && _callback(et, 'onRepeat'), + (nt >= et._tDur || nt < 0) && + et.ratio === at && + (at && _removeFromParent(et, 1), + !rt && + !_reverting$1 && + (_callback(et, at ? 'onComplete' : 'onReverseComplete', !0), et._prom && et._prom())) + } else et._zTime || (et._zTime = nt) + }, + _findNextPauseTween = function (et, nt, rt) { + var it + if (rt > nt) + for (it = et._first; it && it._start <= rt; ) { + if (it.data === 'isPause' && it._start > nt) return it + it = it._next + } + else + for (it = et._last; it && it._start >= rt; ) { + if (it.data === 'isPause' && it._start < nt) return it + it = it._prev + } + }, + _setDuration = function (et, nt, rt, it) { + var ot = et._repeat, + at = _roundPrecise(nt) || 0, + st = et._tTime / et._tDur + return ( + st && !it && (et._time *= at / et._dur), + (et._dur = at), + (et._tDur = ot ? (ot < 0 ? 1e10 : _roundPrecise(at * (ot + 1) + et._rDelay * ot)) : at), + st > 0 && !it && _alignPlayhead(et, (et._tTime = et._tDur * st)), + et.parent && _setEnd(et), + rt || _uncache(et.parent, et), + et + ) + }, + _onUpdateTotalDuration = function (et) { + return et instanceof Timeline$1 ? _uncache(et) : _setDuration(et, et._dur) + }, + _zeroPosition = { _start: 0, endTime: _emptyFunc, totalDuration: _emptyFunc }, + _parsePosition = function tt(et, nt, rt) { + var it = et.labels, + ot = et._recent || _zeroPosition, + at = et.duration() >= _bigNum$1 ? ot.endTime(!1) : et._dur, + st, + lt, + ct + return _isString$1(nt) && (isNaN(nt) || nt in it) + ? ((lt = nt.charAt(0)), + (ct = nt.substr(-1) === '%'), + (st = nt.indexOf('=')), + lt === '<' || lt === '>' + ? (st >= 0 && (nt = nt.replace(/=/, '')), + (lt === '<' ? ot._start : ot.endTime(ot._repeat >= 0)) + + (parseFloat(nt.substr(1)) || 0) * (ct ? (st < 0 ? ot : rt).totalDuration() / 100 : 1)) + : st < 0 + ? (nt in it || (it[nt] = at), it[nt]) + : ((lt = parseFloat(nt.charAt(st - 1) + nt.substr(st + 1))), + ct && rt && (lt = (lt / 100) * (_isArray(rt) ? rt[0] : rt).totalDuration()), + st > 1 ? tt(et, nt.substr(0, st - 1), rt) + lt : at + lt)) + : nt == null + ? at + : +nt + }, + _createTweenType = function (et, nt, rt) { + var it = _isNumber$1(nt[1]), + ot = (it ? 2 : 1) + (et < 2 ? 0 : 1), + at = nt[ot], + st, + lt + if ((it && (at.duration = nt[1]), (at.parent = rt), et)) { + for (st = at, lt = rt; lt && !('immediateRender' in st); ) + (st = lt.vars.defaults || {}), (lt = _isNotFalse(lt.vars.inherit) && lt.parent) + ;(at.immediateRender = _isNotFalse(st.immediateRender)), + et < 2 ? (at.runBackwards = 1) : (at.startAt = nt[ot - 1]) + } + return new Tween(nt[0], at, nt[ot + 1]) + }, + _conditionalReturn = function (et, nt) { + return et || et === 0 ? nt(et) : nt + }, + _clamp = function (et, nt, rt) { + return rt < et ? et : rt > nt ? nt : rt + }, + getUnit = function (et, nt) { + return !_isString$1(et) || !(nt = _unitExp.exec(et)) ? '' : nt[1] + }, + clamp$2 = function (et, nt, rt) { + return _conditionalReturn(rt, function (it) { + return _clamp(et, nt, it) + }) + }, + _slice = [].slice, + _isArrayLike = function (et, nt) { + return ( + et && + _isObject(et) && + 'length' in et && + ((!nt && !et.length) || (et.length - 1 in et && _isObject(et[0]))) && + !et.nodeType && + et !== _win$1 + ) + }, + _flatten = function (et, nt, rt) { + return ( + rt === void 0 && (rt = []), + et.forEach(function (it) { + var ot + return (_isString$1(it) && !nt) || _isArrayLike(it, 1) ? (ot = rt).push.apply(ot, toArray$3(it)) : rt.push(it) + }) || rt + ) + }, + toArray$3 = function (et, nt, rt) { + return _context && !nt && _context.selector + ? _context.selector(et) + : _isString$1(et) && !rt && (_coreInitted || !_wake()) + ? _slice.call((nt || _doc$1).querySelectorAll(et), 0) + : _isArray(et) + ? _flatten(et, rt) + : _isArrayLike(et) + ? _slice.call(et, 0) + : et + ? [et] + : [] + }, + selector$1 = function (et) { + return ( + (et = toArray$3(et)[0] || _warn('Invalid scope') || {}), + function (nt) { + var rt = et.current || et.nativeElement || et + return toArray$3( + nt, + rt.querySelectorAll ? rt : rt === et ? _warn('Invalid scope') || _doc$1.createElement('div') : et, + ) + } + ) + }, + shuffle = function (et) { + return et.sort(function () { + return 0.5 - Math.random() + }) + }, + distribute = function (et) { + if (_isFunction(et)) return et + var nt = _isObject(et) ? et : { each: et }, + rt = _parseEase(nt.ease), + it = nt.from || 0, + ot = parseFloat(nt.base) || 0, + at = {}, + st = it > 0 && it < 1, + lt = isNaN(it) || st, + ct = nt.axis, + ut = it, + ht = it + return ( + _isString$1(it) + ? (ut = ht = { center: 0.5, edges: 0.5, end: 1 }[it] || 0) + : !st && lt && ((ut = it[0]), (ht = it[1])), + function (dt, pt, mt) { + var gt = (mt || nt).length, + yt = at[gt], + bt, + vt, + xt, + kt, + St, + Tt, + At, + Et, + $t + if (!yt) { + if ((($t = nt.grid === 'auto' ? 0 : (nt.grid || [1, _bigNum$1])[1]), !$t)) { + for (At = -_bigNum$1; At < (At = mt[$t++].getBoundingClientRect().left) && $t < gt; ); + $t-- + } + for ( + yt = at[gt] = [], + bt = lt ? Math.min($t, gt) * ut - 0.5 : it % $t, + vt = $t === _bigNum$1 ? 0 : lt ? (gt * ht) / $t - 0.5 : (it / $t) | 0, + At = 0, + Et = _bigNum$1, + Tt = 0; + Tt < gt; + Tt++ + ) + (xt = (Tt % $t) - bt), + (kt = vt - ((Tt / $t) | 0)), + (yt[Tt] = St = ct ? Math.abs(ct === 'y' ? kt : xt) : _sqrt(xt * xt + kt * kt)), + St > At && (At = St), + St < Et && (Et = St) + it === 'random' && shuffle(yt), + (yt.max = At - Et), + (yt.min = Et), + (yt.v = gt = + (parseFloat(nt.amount) || + parseFloat(nt.each) * ($t > gt ? gt - 1 : ct ? (ct === 'y' ? gt / $t : $t) : Math.max($t, gt / $t)) || + 0) * (it === 'edges' ? -1 : 1)), + (yt.b = gt < 0 ? ot - gt : ot), + (yt.u = getUnit(nt.amount || nt.each) || 0), + (rt = rt && gt < 0 ? _invertEase(rt) : rt) + } + return (gt = (yt[dt] - yt.min) / yt.max || 0), _roundPrecise(yt.b + (rt ? rt(gt) : gt) * yt.v) + yt.u + } + ) + }, + _roundModifier = function (et) { + var nt = Math.pow(10, ((et + '').split('.')[1] || '').length) + return function (rt) { + var it = _roundPrecise(Math.round(parseFloat(rt) / et) * et * nt) + return (it - (it % 1)) / nt + (_isNumber$1(rt) ? 0 : getUnit(rt)) + } + }, + snap = function (et, nt) { + var rt = _isArray(et), + it, + ot + return ( + !rt && + _isObject(et) && + ((it = rt = et.radius || _bigNum$1), + et.values + ? ((et = toArray$3(et.values)), (ot = !_isNumber$1(et[0])) && (it *= it)) + : (et = _roundModifier(et.increment))), + _conditionalReturn( + nt, + rt + ? _isFunction(et) + ? function (at) { + return (ot = et(at)), Math.abs(ot - at) <= it ? ot : at + } + : function (at) { + for ( + var st = parseFloat(ot ? at.x : at), + lt = parseFloat(ot ? at.y : 0), + ct = _bigNum$1, + ut = 0, + ht = et.length, + dt, + pt; + ht--; + + ) + ot + ? ((dt = et[ht].x - st), (pt = et[ht].y - lt), (dt = dt * dt + pt * pt)) + : (dt = Math.abs(et[ht] - st)), + dt < ct && ((ct = dt), (ut = ht)) + return ( + (ut = !it || ct <= it ? et[ut] : at), ot || ut === at || _isNumber$1(at) ? ut : ut + getUnit(at) + ) + } + : _roundModifier(et), + ) + ) + }, + random = function (et, nt, rt, it) { + return _conditionalReturn(_isArray(et) ? !nt : rt === !0 ? !!(rt = 0) : !it, function () { + return _isArray(et) + ? et[~~(Math.random() * et.length)] + : (rt = rt || 1e-5) && + (it = rt < 1 ? Math.pow(10, (rt + '').length - 2) : 1) && + Math.floor(Math.round((et - rt / 2 + Math.random() * (nt - et + rt * 0.99)) / rt) * rt * it) / it + }) + }, + pipe = function () { + for (var et = arguments.length, nt = new Array(et), rt = 0; rt < et; rt++) nt[rt] = arguments[rt] + return function (it) { + return nt.reduce(function (ot, at) { + return at(ot) + }, it) + } + }, + unitize = function (et, nt) { + return function (rt) { + return et(parseFloat(rt)) + (nt || getUnit(rt)) + } + }, + normalize$1 = function (et, nt, rt) { + return mapRange(et, nt, 0, 1, rt) + }, + _wrapArray = function (et, nt, rt) { + return _conditionalReturn(rt, function (it) { + return et[~~nt(it)] + }) + }, + wrap = function tt(et, nt, rt) { + var it = nt - et + return _isArray(et) + ? _wrapArray(et, tt(0, et.length), nt) + : _conditionalReturn(rt, function (ot) { + return ((it + ((ot - et) % it)) % it) + et + }) + }, + wrapYoyo = function tt(et, nt, rt) { + var it = nt - et, + ot = it * 2 + return _isArray(et) + ? _wrapArray(et, tt(0, et.length - 1), nt) + : _conditionalReturn(rt, function (at) { + return (at = (ot + ((at - et) % ot)) % ot || 0), et + (at > it ? ot - at : at) + }) + }, + _replaceRandom = function (et) { + for (var nt = 0, rt = '', it, ot, at, st; ~(it = et.indexOf('random(', nt)); ) + (at = et.indexOf(')', it)), + (st = et.charAt(it + 7) === '['), + (ot = et.substr(it + 7, at - it - 7).match(st ? _delimitedValueExp : _strictNumExp)), + (rt += et.substr(nt, it - nt) + random(st ? ot : +ot[0], st ? 0 : +ot[1], +ot[2] || 1e-5)), + (nt = at + 1) + return rt + et.substr(nt, et.length - nt) + }, + mapRange = function (et, nt, rt, it, ot) { + var at = nt - et, + st = it - rt + return _conditionalReturn(ot, function (lt) { + return rt + (((lt - et) / at) * st || 0) + }) + }, + interpolate$2 = function tt(et, nt, rt, it) { + var ot = isNaN(et + nt) + ? 0 + : function (pt) { + return (1 - pt) * et + pt * nt + } + if (!ot) { + var at = _isString$1(et), + st = {}, + lt, + ct, + ut, + ht, + dt + if ((rt === !0 && (it = 1) && (rt = null), at)) (et = { p: et }), (nt = { p: nt }) + else if (_isArray(et) && !_isArray(nt)) { + for (ut = [], ht = et.length, dt = ht - 2, ct = 1; ct < ht; ct++) ut.push(tt(et[ct - 1], et[ct])) + ht--, + (ot = function (mt) { + mt *= ht + var gt = Math.min(dt, ~~mt) + return ut[gt](mt - gt) + }), + (rt = nt) + } else it || (et = _merge(_isArray(et) ? [] : {}, et)) + if (!ut) { + for (lt in nt) _addPropTween.call(st, et, lt, 'get', nt[lt]) + ot = function (mt) { + return _renderPropTweens(mt, st) || (at ? et.p : et) + } + } + } + return _conditionalReturn(rt, ot) + }, + _getLabelInDirection = function (et, nt, rt) { + var it = et.labels, + ot = _bigNum$1, + at, + st, + lt + for (at in it) (st = it[at] - nt), st < 0 == !!rt && st && ot > (st = Math.abs(st)) && ((lt = at), (ot = st)) + return lt + }, + _callback = function (et, nt, rt) { + var it = et.vars, + ot = it[nt], + at = _context, + st = et._ctx, + lt, + ct, + ut + if (ot) + return ( + (lt = it[nt + 'Params']), + (ct = it.callbackScope || et), + rt && _lazyTweens.length && _lazyRender(), + st && (_context = st), + (ut = lt ? ot.apply(ct, lt) : ot.call(ct)), + (_context = at), + ut + ) + }, + _interrupt = function (et) { + return ( + _removeFromParent(et), + et.scrollTrigger && et.scrollTrigger.kill(!!_reverting$1), + et.progress() < 1 && _callback(et, 'onInterrupt'), + et + ) + }, + _quickTween, + _registerPluginQueue = [], + _createPlugin = function (et) { + if (_windowExists$1() && et) { + et = (!et.name && et.default) || et + var nt = et.name, + rt = _isFunction(et), + it = + nt && !rt && et.init + ? function () { + this._props = [] + } + : et, + ot = { + init: _emptyFunc, + render: _renderPropTweens, + add: _addPropTween, + kill: _killPropTweensOf, + modifier: _addPluginModifier, + rawVars: 0, + }, + at = { targetTest: 0, get: 0, getSetter: _getSetter, aliases: {}, register: 0 } + if ((_wake(), et !== it)) { + if (_plugins[nt]) return + _setDefaults(it, _setDefaults(_copyExcluding(et, ot), at)), + _merge(it.prototype, _merge(ot, _copyExcluding(et, at))), + (_plugins[(it.prop = nt)] = it), + et.targetTest && (_harnessPlugins.push(it), (_reservedProps[nt] = 1)), + (nt = (nt === 'css' ? 'CSS' : nt.charAt(0).toUpperCase() + nt.substr(1)) + 'Plugin') + } + _addGlobal(nt, it), et.register && et.register(gsap, it, PropTween) + } else et && _registerPluginQueue.push(et) + }, + _255 = 255, + _colorLookup = { + aqua: [0, _255, _255], + lime: [0, _255, 0], + silver: [192, 192, 192], + black: [0, 0, 0], + maroon: [128, 0, 0], + teal: [0, 128, 128], + blue: [0, 0, _255], + navy: [0, 0, 128], + white: [_255, _255, _255], + olive: [128, 128, 0], + yellow: [_255, _255, 0], + orange: [_255, 165, 0], + gray: [128, 128, 128], + purple: [128, 0, 128], + green: [0, 128, 0], + red: [_255, 0, 0], + pink: [_255, 192, 203], + cyan: [0, _255, _255], + transparent: [_255, _255, _255, 0], + }, + _hue = function (et, nt, rt) { + return ( + (et += et < 0 ? 1 : et > 1 ? -1 : 0), + ((et * 6 < 1 ? nt + (rt - nt) * et * 6 : et < 0.5 ? rt : et * 3 < 2 ? nt + (rt - nt) * (2 / 3 - et) * 6 : nt) * + _255 + + 0.5) | + 0 + ) + }, + splitColor = function (et, nt, rt) { + var it = et ? (_isNumber$1(et) ? [et >> 16, (et >> 8) & _255, et & _255] : 0) : _colorLookup.black, + ot, + at, + st, + lt, + ct, + ut, + ht, + dt, + pt, + mt + if (!it) { + if ((et.substr(-1) === ',' && (et = et.substr(0, et.length - 1)), _colorLookup[et])) it = _colorLookup[et] + else if (et.charAt(0) === '#') { + if ( + (et.length < 6 && + ((ot = et.charAt(1)), + (at = et.charAt(2)), + (st = et.charAt(3)), + (et = '#' + ot + ot + at + at + st + st + (et.length === 5 ? et.charAt(4) + et.charAt(4) : ''))), + et.length === 9) + ) + return ( + (it = parseInt(et.substr(1, 6), 16)), + [it >> 16, (it >> 8) & _255, it & _255, parseInt(et.substr(7), 16) / 255] + ) + ;(et = parseInt(et.substr(1), 16)), (it = [et >> 16, (et >> 8) & _255, et & _255]) + } else if (et.substr(0, 3) === 'hsl') { + if (((it = mt = et.match(_strictNumExp)), !nt)) + (lt = (+it[0] % 360) / 360), + (ct = +it[1] / 100), + (ut = +it[2] / 100), + (at = ut <= 0.5 ? ut * (ct + 1) : ut + ct - ut * ct), + (ot = ut * 2 - at), + it.length > 3 && (it[3] *= 1), + (it[0] = _hue(lt + 1 / 3, ot, at)), + (it[1] = _hue(lt, ot, at)), + (it[2] = _hue(lt - 1 / 3, ot, at)) + else if (~et.indexOf('=')) return (it = et.match(_numExp)), rt && it.length < 4 && (it[3] = 1), it + } else it = et.match(_strictNumExp) || _colorLookup.transparent + it = it.map(Number) + } + return ( + nt && + !mt && + ((ot = it[0] / _255), + (at = it[1] / _255), + (st = it[2] / _255), + (ht = Math.max(ot, at, st)), + (dt = Math.min(ot, at, st)), + (ut = (ht + dt) / 2), + ht === dt + ? (lt = ct = 0) + : ((pt = ht - dt), + (ct = ut > 0.5 ? pt / (2 - ht - dt) : pt / (ht + dt)), + (lt = + ht === ot ? (at - st) / pt + (at < st ? 6 : 0) : ht === at ? (st - ot) / pt + 2 : (ot - at) / pt + 4), + (lt *= 60)), + (it[0] = ~~(lt + 0.5)), + (it[1] = ~~(ct * 100 + 0.5)), + (it[2] = ~~(ut * 100 + 0.5))), + rt && it.length < 4 && (it[3] = 1), + it + ) + }, + _colorOrderData = function (et) { + var nt = [], + rt = [], + it = -1 + return ( + et.split(_colorExp).forEach(function (ot) { + var at = ot.match(_numWithUnitExp) || [] + nt.push.apply(nt, at), rt.push((it += at.length + 1)) + }), + (nt.c = rt), + nt + ) + }, + _formatColors = function (et, nt, rt) { + var it = '', + ot = (et + it).match(_colorExp), + at = nt ? 'hsla(' : 'rgba(', + st = 0, + lt, + ct, + ut, + ht + if (!ot) return et + if ( + ((ot = ot.map(function (dt) { + return ( + (dt = splitColor(dt, nt, 1)) && + at + (nt ? dt[0] + ',' + dt[1] + '%,' + dt[2] + '%,' + dt[3] : dt.join(',')) + ')' + ) + })), + rt && ((ut = _colorOrderData(et)), (lt = rt.c), lt.join(it) !== ut.c.join(it))) + ) + for (ct = et.replace(_colorExp, '1').split(_numWithUnitExp), ht = ct.length - 1; st < ht; st++) + it += + ct[st] + (~lt.indexOf(st) ? ot.shift() || at + '0,0,0,0)' : (ut.length ? ut : ot.length ? ot : rt).shift()) + if (!ct) for (ct = et.split(_colorExp), ht = ct.length - 1; st < ht; st++) it += ct[st] + ot[st] + return it + ct[ht] + }, + _colorExp = (function () { + var tt = '(?:\\b(?:(?:rgb|rgba|hsl|hsla)\\(.+?\\))|\\B#(?:[0-9a-f]{3,4}){1,2}\\b', + et + for (et in _colorLookup) tt += '|' + et + '\\b' + return new RegExp(tt + ')', 'gi') + })(), + _hslExp = /hsl[a]?\(/, + _colorStringFilter = function (et) { + var nt = et.join(' '), + rt + if (((_colorExp.lastIndex = 0), _colorExp.test(nt))) + return ( + (rt = _hslExp.test(nt)), + (et[1] = _formatColors(et[1], rt)), + (et[0] = _formatColors(et[0], rt, _colorOrderData(et[1]))), + !0 + ) + }, + _tickerActive, + _ticker = (function () { + var tt = Date.now, + et = 500, + nt = 33, + rt = tt(), + it = rt, + ot = 1e3 / 240, + at = ot, + st = [], + lt, + ct, + ut, + ht, + dt, + pt, + mt = function gt(yt) { + var bt = tt() - it, + vt = yt === !0, + xt, + kt, + St, + Tt + if ( + (bt > et && (rt += bt - nt), + (it += bt), + (St = it - rt), + (xt = St - at), + (xt > 0 || vt) && + ((Tt = ++ht.frame), + (dt = St - ht.time * 1e3), + (ht.time = St = St / 1e3), + (at += xt + (xt >= ot ? 4 : ot - xt)), + (kt = 1)), + vt || (lt = ct(gt)), + kt) + ) + for (pt = 0; pt < st.length; pt++) st[pt](St, dt, Tt, yt) + } + return ( + (ht = { + time: 0, + frame: 0, + tick: function () { + mt(!0) + }, + deltaRatio: function (yt) { + return dt / (1e3 / (yt || 60)) + }, + wake: function () { + _coreReady && + (!_coreInitted && + _windowExists$1() && + ((_win$1 = _coreInitted = window), + (_doc$1 = _win$1.document || {}), + (_globals.gsap = gsap), + (_win$1.gsapVersions || (_win$1.gsapVersions = [])).push(gsap.version), + _install(_installScope || _win$1.GreenSockGlobals || (!_win$1.gsap && _win$1) || {}), + (ut = _win$1.requestAnimationFrame), + _registerPluginQueue.forEach(_createPlugin)), + lt && ht.sleep(), + (ct = + ut || + function (yt) { + return setTimeout(yt, (at - ht.time * 1e3 + 1) | 0) + }), + (_tickerActive = 1), + mt(2)) + }, + sleep: function () { + ;(ut ? _win$1.cancelAnimationFrame : clearTimeout)(lt), (_tickerActive = 0), (ct = _emptyFunc) + }, + lagSmoothing: function (yt, bt) { + ;(et = yt || 1 / 0), (nt = Math.min(bt || 33, et)) + }, + fps: function (yt) { + ;(ot = 1e3 / (yt || 240)), (at = ht.time * 1e3 + ot) + }, + add: function (yt, bt, vt) { + var xt = bt + ? function (kt, St, Tt, At) { + yt(kt, St, Tt, At), ht.remove(xt) + } + : yt + return ht.remove(yt), st[vt ? 'unshift' : 'push'](xt), _wake(), xt + }, + remove: function (yt, bt) { + ~(bt = st.indexOf(yt)) && st.splice(bt, 1) && pt >= bt && pt-- + }, + _listeners: st, + }), + ht + ) + })(), + _wake = function () { + return !_tickerActive && _ticker.wake() + }, + _easeMap = {}, + _customEaseExp = /^[\d.\-M][\d.\-,\s]/, + _quotesExp = /["']/g, + _parseObjectInString = function (et) { + for ( + var nt = {}, rt = et.substr(1, et.length - 3).split(':'), it = rt[0], ot = 1, at = rt.length, st, lt, ct; + ot < at; + ot++ + ) + (lt = rt[ot]), + (st = ot !== at - 1 ? lt.lastIndexOf(',') : lt.length), + (ct = lt.substr(0, st)), + (nt[it] = isNaN(ct) ? ct.replace(_quotesExp, '').trim() : +ct), + (it = lt.substr(st + 1).trim()) + return nt + }, + _valueInParentheses = function (et) { + var nt = et.indexOf('(') + 1, + rt = et.indexOf(')'), + it = et.indexOf('(', nt) + return et.substring(nt, ~it && it < rt ? et.indexOf(')', rt + 1) : rt) + }, + _configEaseFromString = function (et) { + var nt = (et + '').split('('), + rt = _easeMap[nt[0]] + return rt && nt.length > 1 && rt.config + ? rt.config.apply( + null, + ~et.indexOf('{') + ? [_parseObjectInString(nt[1])] + : _valueInParentheses(et).split(',').map(_numericIfPossible), + ) + : _easeMap._CE && _customEaseExp.test(et) + ? _easeMap._CE('', et) + : rt + }, + _invertEase = function (et) { + return function (nt) { + return 1 - et(1 - nt) + } + }, + _propagateYoyoEase = function tt(et, nt) { + for (var rt = et._first, it; rt; ) + rt instanceof Timeline$1 + ? tt(rt, nt) + : rt.vars.yoyoEase && + (!rt._yoyo || !rt._repeat) && + rt._yoyo !== nt && + (rt.timeline + ? tt(rt.timeline, nt) + : ((it = rt._ease), (rt._ease = rt._yEase), (rt._yEase = it), (rt._yoyo = nt))), + (rt = rt._next) + }, + _parseEase = function (et, nt) { + return (et && (_isFunction(et) ? et : _easeMap[et] || _configEaseFromString(et))) || nt + }, + _insertEase = function (et, nt, rt, it) { + rt === void 0 && + (rt = function (lt) { + return 1 - nt(1 - lt) + }), + it === void 0 && + (it = function (lt) { + return lt < 0.5 ? nt(lt * 2) / 2 : 1 - nt((1 - lt) * 2) / 2 + }) + var ot = { easeIn: nt, easeOut: rt, easeInOut: it }, + at + return ( + _forEachName(et, function (st) { + ;(_easeMap[st] = _globals[st] = ot), (_easeMap[(at = st.toLowerCase())] = rt) + for (var lt in ot) + _easeMap[at + (lt === 'easeIn' ? '.in' : lt === 'easeOut' ? '.out' : '.inOut')] = _easeMap[st + '.' + lt] = + ot[lt] + }), + ot + ) + }, + _easeInOutFromOut = function (et) { + return function (nt) { + return nt < 0.5 ? (1 - et(1 - nt * 2)) / 2 : 0.5 + et((nt - 0.5) * 2) / 2 + } + }, + _configElastic = function tt(et, nt, rt) { + var it = nt >= 1 ? nt : 1, + ot = (rt || (et ? 0.3 : 0.45)) / (nt < 1 ? nt : 1), + at = (ot / _2PI) * (Math.asin(1 / it) || 0), + st = function (ut) { + return ut === 1 ? 1 : it * Math.pow(2, -10 * ut) * _sin((ut - at) * ot) + 1 + }, + lt = + et === 'out' + ? st + : et === 'in' + ? function (ct) { + return 1 - st(1 - ct) + } + : _easeInOutFromOut(st) + return ( + (ot = _2PI / ot), + (lt.config = function (ct, ut) { + return tt(et, ct, ut) + }), + lt + ) + }, + _configBack = function tt(et, nt) { + nt === void 0 && (nt = 1.70158) + var rt = function (at) { + return at ? --at * at * ((nt + 1) * at + nt) + 1 : 0 + }, + it = + et === 'out' + ? rt + : et === 'in' + ? function (ot) { + return 1 - rt(1 - ot) + } + : _easeInOutFromOut(rt) + return ( + (it.config = function (ot) { + return tt(et, ot) + }), + it + ) + } + _forEachName('Linear,Quad,Cubic,Quart,Quint,Strong', function (tt, et) { + var nt = et < 5 ? et + 1 : et + _insertEase( + tt + ',Power' + (nt - 1), + et + ? function (rt) { + return Math.pow(rt, nt) + } + : function (rt) { + return rt + }, + function (rt) { + return 1 - Math.pow(1 - rt, nt) + }, + function (rt) { + return rt < 0.5 ? Math.pow(rt * 2, nt) / 2 : 1 - Math.pow((1 - rt) * 2, nt) / 2 + }, + ) + }) + _easeMap.Linear.easeNone = _easeMap.none = _easeMap.Linear.easeIn + _insertEase('Elastic', _configElastic('in'), _configElastic('out'), _configElastic()) + ;(function (tt, et) { + var nt = 1 / et, + rt = 2 * nt, + it = 2.5 * nt, + ot = function (st) { + return st < nt + ? tt * st * st + : st < rt + ? tt * Math.pow(st - 1.5 / et, 2) + 0.75 + : st < it + ? tt * (st -= 2.25 / et) * st + 0.9375 + : tt * Math.pow(st - 2.625 / et, 2) + 0.984375 + } + _insertEase( + 'Bounce', + function (at) { + return 1 - ot(1 - at) + }, + ot, + ) + })(7.5625, 2.75) + _insertEase('Expo', function (tt) { + return tt ? Math.pow(2, 10 * (tt - 1)) : 0 + }) + _insertEase('Circ', function (tt) { + return -(_sqrt(1 - tt * tt) - 1) + }) + _insertEase('Sine', function (tt) { + return tt === 1 ? 1 : -_cos(tt * _HALF_PI) + 1 + }) + _insertEase('Back', _configBack('in'), _configBack('out'), _configBack()) + _easeMap.SteppedEase = + _easeMap.steps = + _globals.SteppedEase = + { + config: function (et, nt) { + et === void 0 && (et = 1) + var rt = 1 / et, + it = et + (nt ? 0 : 1), + ot = nt ? 1 : 0, + at = 1 - _tinyNum + return function (st) { + return (((it * _clamp(0, at, st)) | 0) + ot) * rt + } + }, + } + _defaults.ease = _easeMap['quad.out'] + _forEachName('onComplete,onUpdate,onStart,onRepeat,onReverseComplete,onInterrupt', function (tt) { + return (_callbackNames += tt + ',' + tt + 'Params,') + }) + var GSCache = function (et, nt) { + ;(this.id = _gsID++), + (et._gsap = this), + (this.target = et), + (this.harness = nt), + (this.get = nt ? nt.get : _getProperty), + (this.set = nt ? nt.getSetter : _getSetter) + }, + Animation = (function () { + function tt(nt) { + ;(this.vars = nt), + (this._delay = +nt.delay || 0), + (this._repeat = nt.repeat === 1 / 0 ? -2 : nt.repeat || 0) && + ((this._rDelay = nt.repeatDelay || 0), (this._yoyo = !!nt.yoyo || !!nt.yoyoEase)), + (this._ts = 1), + _setDuration(this, +nt.duration, 1, 1), + (this.data = nt.data), + _context && ((this._ctx = _context), _context.data.push(this)), + _tickerActive || _ticker.wake() + } + var et = tt.prototype + return ( + (et.delay = function (rt) { + return rt || rt === 0 + ? (this.parent && this.parent.smoothChildTiming && this.startTime(this._start + rt - this._delay), + (this._delay = rt), + this) + : this._delay + }), + (et.duration = function (rt) { + return arguments.length + ? this.totalDuration(this._repeat > 0 ? rt + (rt + this._rDelay) * this._repeat : rt) + : this.totalDuration() && this._dur + }), + (et.totalDuration = function (rt) { + return arguments.length + ? ((this._dirty = 0), + _setDuration(this, this._repeat < 0 ? rt : (rt - this._repeat * this._rDelay) / (this._repeat + 1))) + : this._tDur + }), + (et.totalTime = function (rt, it) { + if ((_wake(), !arguments.length)) return this._tTime + var ot = this._dp + if (ot && ot.smoothChildTiming && this._ts) { + for (_alignPlayhead(this, rt), !ot._dp || ot.parent || _postAddChecks(ot, this); ot && ot.parent; ) + ot.parent._time !== + ot._start + (ot._ts >= 0 ? ot._tTime / ot._ts : (ot.totalDuration() - ot._tTime) / -ot._ts) && + ot.totalTime(ot._tTime, !0), + (ot = ot.parent) + !this.parent && + this._dp.autoRemoveChildren && + ((this._ts > 0 && rt < this._tDur) || (this._ts < 0 && rt > 0) || (!this._tDur && !rt)) && + _addToTimeline(this._dp, this, this._start - this._delay) + } + return ( + (this._tTime !== rt || + (!this._dur && !it) || + (this._initted && Math.abs(this._zTime) === _tinyNum) || + (!rt && !this._initted && (this.add || this._ptLookup))) && + (this._ts || (this._pTime = rt), _lazySafeRender(this, rt, it)), + this + ) + }), + (et.time = function (rt, it) { + return arguments.length + ? this.totalTime( + Math.min(this.totalDuration(), rt + _elapsedCycleDuration(this)) % (this._dur + this._rDelay) || + (rt ? this._dur : 0), + it, + ) + : this._time + }), + (et.totalProgress = function (rt, it) { + return arguments.length + ? this.totalTime(this.totalDuration() * rt, it) + : this.totalDuration() + ? Math.min(1, this._tTime / this._tDur) + : this.ratio + }), + (et.progress = function (rt, it) { + return arguments.length + ? this.totalTime( + this.duration() * (this._yoyo && !(this.iteration() & 1) ? 1 - rt : rt) + _elapsedCycleDuration(this), + it, + ) + : this.duration() + ? Math.min(1, this._time / this._dur) + : this.ratio + }), + (et.iteration = function (rt, it) { + var ot = this.duration() + this._rDelay + return arguments.length + ? this.totalTime(this._time + (rt - 1) * ot, it) + : this._repeat + ? _animationCycle(this._tTime, ot) + 1 + : 1 + }), + (et.timeScale = function (rt) { + if (!arguments.length) return this._rts === -_tinyNum ? 0 : this._rts + if (this._rts === rt) return this + var it = this.parent && this._ts ? _parentToChildTotalTime(this.parent._time, this) : this._tTime + return ( + (this._rts = +rt || 0), + (this._ts = this._ps || rt === -_tinyNum ? 0 : this._rts), + this.totalTime(_clamp(-Math.abs(this._delay), this._tDur, it), !0), + _setEnd(this), + _recacheAncestors(this) + ) + }), + (et.paused = function (rt) { + return arguments.length + ? (this._ps !== rt && + ((this._ps = rt), + rt + ? ((this._pTime = this._tTime || Math.max(-this._delay, this.rawTime())), (this._ts = this._act = 0)) + : (_wake(), + (this._ts = this._rts), + this.totalTime( + this.parent && !this.parent.smoothChildTiming ? this.rawTime() : this._tTime || this._pTime, + this.progress() === 1 && Math.abs(this._zTime) !== _tinyNum && (this._tTime -= _tinyNum), + ))), + this) + : this._ps + }), + (et.startTime = function (rt) { + if (arguments.length) { + this._start = rt + var it = this.parent || this._dp + return it && (it._sort || !this.parent) && _addToTimeline(it, this, rt - this._delay), this + } + return this._start + }), + (et.endTime = function (rt) { + return this._start + (_isNotFalse(rt) ? this.totalDuration() : this.duration()) / Math.abs(this._ts || 1) + }), + (et.rawTime = function (rt) { + var it = this.parent || this._dp + return it + ? rt && (!this._ts || (this._repeat && this._time && this.totalProgress() < 1)) + ? this._tTime % (this._dur + this._rDelay) + : this._ts + ? _parentToChildTotalTime(it.rawTime(rt), this) + : this._tTime + : this._tTime + }), + (et.revert = function (rt) { + rt === void 0 && (rt = _revertConfig) + var it = _reverting$1 + return ( + (_reverting$1 = rt), + (this._initted || this._startAt) && + (this.timeline && this.timeline.revert(rt), this.totalTime(-0.01, rt.suppressEvents)), + this.data !== 'nested' && rt.kill !== !1 && this.kill(), + (_reverting$1 = it), + this + ) + }), + (et.globalTime = function (rt) { + for (var it = this, ot = arguments.length ? rt : it.rawTime(); it; ) + (ot = it._start + ot / (it._ts || 1)), (it = it._dp) + return !this.parent && this._sat ? (this._sat.vars.immediateRender ? -1 / 0 : this._sat.globalTime(rt)) : ot + }), + (et.repeat = function (rt) { + return arguments.length + ? ((this._repeat = rt === 1 / 0 ? -2 : rt), _onUpdateTotalDuration(this)) + : this._repeat === -2 + ? 1 / 0 + : this._repeat + }), + (et.repeatDelay = function (rt) { + if (arguments.length) { + var it = this._time + return (this._rDelay = rt), _onUpdateTotalDuration(this), it ? this.time(it) : this + } + return this._rDelay + }), + (et.yoyo = function (rt) { + return arguments.length ? ((this._yoyo = rt), this) : this._yoyo + }), + (et.seek = function (rt, it) { + return this.totalTime(_parsePosition(this, rt), _isNotFalse(it)) + }), + (et.restart = function (rt, it) { + return this.play().totalTime(rt ? -this._delay : 0, _isNotFalse(it)) + }), + (et.play = function (rt, it) { + return rt != null && this.seek(rt, it), this.reversed(!1).paused(!1) + }), + (et.reverse = function (rt, it) { + return rt != null && this.seek(rt || this.totalDuration(), it), this.reversed(!0).paused(!1) + }), + (et.pause = function (rt, it) { + return rt != null && this.seek(rt, it), this.paused(!0) + }), + (et.resume = function () { + return this.paused(!1) + }), + (et.reversed = function (rt) { + return arguments.length + ? (!!rt !== this.reversed() && this.timeScale(-this._rts || (rt ? -_tinyNum : 0)), this) + : this._rts < 0 + }), + (et.invalidate = function () { + return (this._initted = this._act = 0), (this._zTime = -_tinyNum), this + }), + (et.isActive = function () { + var rt = this.parent || this._dp, + it = this._start, + ot + return !!( + !rt || + (this._ts && + this._initted && + rt.isActive() && + (ot = rt.rawTime(!0)) >= it && + ot < this.endTime(!0) - _tinyNum) + ) + }), + (et.eventCallback = function (rt, it, ot) { + var at = this.vars + return arguments.length > 1 + ? (it + ? ((at[rt] = it), ot && (at[rt + 'Params'] = ot), rt === 'onUpdate' && (this._onUpdate = it)) + : delete at[rt], + this) + : at[rt] + }), + (et.then = function (rt) { + var it = this + return new Promise(function (ot) { + var at = _isFunction(rt) ? rt : _passThrough, + st = function () { + var ct = it.then + ;(it.then = null), + _isFunction(at) && (at = at(it)) && (at.then || at === it) && (it.then = ct), + ot(at), + (it.then = ct) + } + ;(it._initted && it.totalProgress() === 1 && it._ts >= 0) || (!it._tTime && it._ts < 0) + ? st() + : (it._prom = st) + }) + }), + (et.kill = function () { + _interrupt(this) + }), + tt + ) + })() + _setDefaults(Animation.prototype, { + _time: 0, + _start: 0, + _end: 0, + _tTime: 0, + _tDur: 0, + _dirty: 0, + _repeat: 0, + _yoyo: !1, + parent: null, + _initted: !1, + _rDelay: 0, + _ts: 1, + _dp: 0, + ratio: 0, + _zTime: -_tinyNum, + _prom: 0, + _ps: !1, + _rts: 1, + }) + var Timeline$1 = (function (tt) { + _inheritsLoose(et, tt) + function et(rt, it) { + var ot + return ( + rt === void 0 && (rt = {}), + (ot = tt.call(this, rt) || this), + (ot.labels = {}), + (ot.smoothChildTiming = !!rt.smoothChildTiming), + (ot.autoRemoveChildren = !!rt.autoRemoveChildren), + (ot._sort = _isNotFalse(rt.sortChildren)), + _globalTimeline && _addToTimeline(rt.parent || _globalTimeline, _assertThisInitialized$c(ot), it), + rt.reversed && ot.reverse(), + rt.paused && ot.paused(!0), + rt.scrollTrigger && _scrollTrigger(_assertThisInitialized$c(ot), rt.scrollTrigger), + ot + ) + } + var nt = et.prototype + return ( + (nt.to = function (it, ot, at) { + return _createTweenType(0, arguments, this), this + }), + (nt.from = function (it, ot, at) { + return _createTweenType(1, arguments, this), this + }), + (nt.fromTo = function (it, ot, at, st) { + return _createTweenType(2, arguments, this), this + }), + (nt.set = function (it, ot, at) { + return ( + (ot.duration = 0), + (ot.parent = this), + _inheritDefaults(ot).repeatDelay || (ot.repeat = 0), + (ot.immediateRender = !!ot.immediateRender), + new Tween(it, ot, _parsePosition(this, at), 1), + this + ) + }), + (nt.call = function (it, ot, at) { + return _addToTimeline(this, Tween.delayedCall(0, it, ot), at) + }), + (nt.staggerTo = function (it, ot, at, st, lt, ct, ut) { + return ( + (at.duration = ot), + (at.stagger = at.stagger || st), + (at.onComplete = ct), + (at.onCompleteParams = ut), + (at.parent = this), + new Tween(it, at, _parsePosition(this, lt)), + this + ) + }), + (nt.staggerFrom = function (it, ot, at, st, lt, ct, ut) { + return ( + (at.runBackwards = 1), + (_inheritDefaults(at).immediateRender = _isNotFalse(at.immediateRender)), + this.staggerTo(it, ot, at, st, lt, ct, ut) + ) + }), + (nt.staggerFromTo = function (it, ot, at, st, lt, ct, ut, ht) { + return ( + (st.startAt = at), + (_inheritDefaults(st).immediateRender = _isNotFalse(st.immediateRender)), + this.staggerTo(it, ot, st, lt, ct, ut, ht) + ) + }), + (nt.render = function (it, ot, at) { + var st = this._time, + lt = this._dirty ? this.totalDuration() : this._tDur, + ct = this._dur, + ut = it <= 0 ? 0 : _roundPrecise(it), + ht = this._zTime < 0 != it < 0 && (this._initted || !ct), + dt, + pt, + mt, + gt, + yt, + bt, + vt, + xt, + kt, + St, + Tt, + At + if ((this !== _globalTimeline && ut > lt && it >= 0 && (ut = lt), ut !== this._tTime || at || ht)) { + if ( + (st !== this._time && ct && ((ut += this._time - st), (it += this._time - st)), + (dt = ut), + (kt = this._start), + (xt = this._ts), + (bt = !xt), + ht && (ct || (st = this._zTime), (it || !ot) && (this._zTime = it)), + this._repeat) + ) { + if (((Tt = this._yoyo), (yt = ct + this._rDelay), this._repeat < -1 && it < 0)) + return this.totalTime(yt * 100 + it, ot, at) + if ( + ((dt = _roundPrecise(ut % yt)), + ut === lt + ? ((gt = this._repeat), (dt = ct)) + : ((gt = ~~(ut / yt)), gt && gt === ut / yt && ((dt = ct), gt--), dt > ct && (dt = ct)), + (St = _animationCycle(this._tTime, yt)), + !st && this._tTime && St !== gt && this._tTime - St * yt - this._dur <= 0 && (St = gt), + Tt && gt & 1 && ((dt = ct - dt), (At = 1)), + gt !== St && !this._lock) + ) { + var Et = Tt && St & 1, + $t = Et === (Tt && gt & 1) + if ( + (gt < St && (Et = !Et), + (st = Et ? 0 : ut % ct ? ct : ut), + (this._lock = 1), + (this.render(st || (At ? 0 : _roundPrecise(gt * yt)), ot, !ct)._lock = 0), + (this._tTime = ut), + !ot && this.parent && _callback(this, 'onRepeat'), + this.vars.repeatRefresh && !At && (this.invalidate()._lock = 1), + (st && st !== this._time) || bt !== !this._ts || (this.vars.onRepeat && !this.parent && !this._act)) + ) + return this + if ( + ((ct = this._dur), + (lt = this._tDur), + $t && + ((this._lock = 2), + (st = Et ? ct : -1e-4), + this.render(st, !0), + this.vars.repeatRefresh && !At && this.invalidate()), + (this._lock = 0), + !this._ts && !bt) + ) + return this + _propagateYoyoEase(this, At) + } + } + if ( + (this._hasPause && + !this._forcing && + this._lock < 2 && + ((vt = _findNextPauseTween(this, _roundPrecise(st), _roundPrecise(dt))), + vt && (ut -= dt - (dt = vt._start))), + (this._tTime = ut), + (this._time = dt), + (this._act = !xt), + this._initted || ((this._onUpdate = this.vars.onUpdate), (this._initted = 1), (this._zTime = it), (st = 0)), + !st && dt && !ot && !gt && (_callback(this, 'onStart'), this._tTime !== ut)) + ) + return this + if (dt >= st && it >= 0) + for (pt = this._first; pt; ) { + if (((mt = pt._next), (pt._act || dt >= pt._start) && pt._ts && vt !== pt)) { + if (pt.parent !== this) return this.render(it, ot, at) + if ( + (pt.render( + pt._ts > 0 + ? (dt - pt._start) * pt._ts + : (pt._dirty ? pt.totalDuration() : pt._tDur) + (dt - pt._start) * pt._ts, + ot, + at, + ), + dt !== this._time || (!this._ts && !bt)) + ) { + ;(vt = 0), mt && (ut += this._zTime = -_tinyNum) + break + } + } + pt = mt + } + else { + pt = this._last + for (var Dt = it < 0 ? it : dt; pt; ) { + if (((mt = pt._prev), (pt._act || Dt <= pt._end) && pt._ts && vt !== pt)) { + if (pt.parent !== this) return this.render(it, ot, at) + if ( + (pt.render( + pt._ts > 0 + ? (Dt - pt._start) * pt._ts + : (pt._dirty ? pt.totalDuration() : pt._tDur) + (Dt - pt._start) * pt._ts, + ot, + at || (_reverting$1 && (pt._initted || pt._startAt)), + ), + dt !== this._time || (!this._ts && !bt)) + ) { + ;(vt = 0), mt && (ut += this._zTime = Dt ? -_tinyNum : _tinyNum) + break + } + } + pt = mt + } + } + if (vt && !ot && (this.pause(), (vt.render(dt >= st ? 0 : -_tinyNum)._zTime = dt >= st ? 1 : -1), this._ts)) + return (this._start = kt), _setEnd(this), this.render(it, ot, at) + this._onUpdate && !ot && _callback(this, 'onUpdate', !0), + ((ut === lt && this._tTime >= this.totalDuration()) || (!ut && st)) && + (kt === this._start || Math.abs(xt) !== Math.abs(this._ts)) && + (this._lock || + ((it || !ct) && ((ut === lt && this._ts > 0) || (!ut && this._ts < 0)) && _removeFromParent(this, 1), + !ot && + !(it < 0 && !st) && + (ut || st || !lt) && + (_callback(this, ut === lt && it >= 0 ? 'onComplete' : 'onReverseComplete', !0), + this._prom && !(ut < lt && this.timeScale() > 0) && this._prom()))) + } + return this + }), + (nt.add = function (it, ot) { + var at = this + if ((_isNumber$1(ot) || (ot = _parsePosition(this, ot, it)), !(it instanceof Animation))) { + if (_isArray(it)) + return ( + it.forEach(function (st) { + return at.add(st, ot) + }), + this + ) + if (_isString$1(it)) return this.addLabel(it, ot) + if (_isFunction(it)) it = Tween.delayedCall(0, it) + else return this + } + return this !== it ? _addToTimeline(this, it, ot) : this + }), + (nt.getChildren = function (it, ot, at, st) { + it === void 0 && (it = !0), + ot === void 0 && (ot = !0), + at === void 0 && (at = !0), + st === void 0 && (st = -_bigNum$1) + for (var lt = [], ct = this._first; ct; ) + ct._start >= st && + (ct instanceof Tween + ? ot && lt.push(ct) + : (at && lt.push(ct), it && lt.push.apply(lt, ct.getChildren(!0, ot, at)))), + (ct = ct._next) + return lt + }), + (nt.getById = function (it) { + for (var ot = this.getChildren(1, 1, 1), at = ot.length; at--; ) if (ot[at].vars.id === it) return ot[at] + }), + (nt.remove = function (it) { + return _isString$1(it) + ? this.removeLabel(it) + : _isFunction(it) + ? this.killTweensOf(it) + : (_removeLinkedListItem(this, it), it === this._recent && (this._recent = this._last), _uncache(this)) + }), + (nt.totalTime = function (it, ot) { + return arguments.length + ? ((this._forcing = 1), + !this._dp && + this._ts && + (this._start = _roundPrecise( + _ticker.time - (this._ts > 0 ? it / this._ts : (this.totalDuration() - it) / -this._ts), + )), + tt.prototype.totalTime.call(this, it, ot), + (this._forcing = 0), + this) + : this._tTime + }), + (nt.addLabel = function (it, ot) { + return (this.labels[it] = _parsePosition(this, ot)), this + }), + (nt.removeLabel = function (it) { + return delete this.labels[it], this + }), + (nt.addPause = function (it, ot, at) { + var st = Tween.delayedCall(0, ot || _emptyFunc, at) + return (st.data = 'isPause'), (this._hasPause = 1), _addToTimeline(this, st, _parsePosition(this, it)) + }), + (nt.removePause = function (it) { + var ot = this._first + for (it = _parsePosition(this, it); ot; ) + ot._start === it && ot.data === 'isPause' && _removeFromParent(ot), (ot = ot._next) + }), + (nt.killTweensOf = function (it, ot, at) { + for (var st = this.getTweensOf(it, at), lt = st.length; lt--; ) + _overwritingTween !== st[lt] && st[lt].kill(it, ot) + return this + }), + (nt.getTweensOf = function (it, ot) { + for (var at = [], st = toArray$3(it), lt = this._first, ct = _isNumber$1(ot), ut; lt; ) + lt instanceof Tween + ? _arrayContainsAny(lt._targets, st) && + (ct + ? (!_overwritingTween || (lt._initted && lt._ts)) && + lt.globalTime(0) <= ot && + lt.globalTime(lt.totalDuration()) > ot + : !ot || lt.isActive()) && + at.push(lt) + : (ut = lt.getTweensOf(st, ot)).length && at.push.apply(at, ut), + (lt = lt._next) + return at + }), + (nt.tweenTo = function (it, ot) { + ot = ot || {} + var at = this, + st = _parsePosition(at, it), + lt = ot, + ct = lt.startAt, + ut = lt.onStart, + ht = lt.onStartParams, + dt = lt.immediateRender, + pt, + mt = Tween.to( + at, + _setDefaults( + { + ease: ot.ease || 'none', + lazy: !1, + immediateRender: !1, + time: st, + overwrite: 'auto', + duration: + ot.duration || + Math.abs((st - (ct && 'time' in ct ? ct.time : at._time)) / at.timeScale()) || + _tinyNum, + onStart: function () { + if ((at.pause(), !pt)) { + var yt = ot.duration || Math.abs((st - (ct && 'time' in ct ? ct.time : at._time)) / at.timeScale()) + mt._dur !== yt && _setDuration(mt, yt, 0, 1).render(mt._time, !0, !0), (pt = 1) + } + ut && ut.apply(mt, ht || []) + }, + }, + ot, + ), + ) + return dt ? mt.render(0) : mt + }), + (nt.tweenFromTo = function (it, ot, at) { + return this.tweenTo(ot, _setDefaults({ startAt: { time: _parsePosition(this, it) } }, at)) + }), + (nt.recent = function () { + return this._recent + }), + (nt.nextLabel = function (it) { + return it === void 0 && (it = this._time), _getLabelInDirection(this, _parsePosition(this, it)) + }), + (nt.previousLabel = function (it) { + return it === void 0 && (it = this._time), _getLabelInDirection(this, _parsePosition(this, it), 1) + }), + (nt.currentLabel = function (it) { + return arguments.length ? this.seek(it, !0) : this.previousLabel(this._time + _tinyNum) + }), + (nt.shiftChildren = function (it, ot, at) { + at === void 0 && (at = 0) + for (var st = this._first, lt = this.labels, ct; st; ) + st._start >= at && ((st._start += it), (st._end += it)), (st = st._next) + if (ot) for (ct in lt) lt[ct] >= at && (lt[ct] += it) + return _uncache(this) + }), + (nt.invalidate = function (it) { + var ot = this._first + for (this._lock = 0; ot; ) ot.invalidate(it), (ot = ot._next) + return tt.prototype.invalidate.call(this, it) + }), + (nt.clear = function (it) { + it === void 0 && (it = !0) + for (var ot = this._first, at; ot; ) (at = ot._next), this.remove(ot), (ot = at) + return this._dp && (this._time = this._tTime = this._pTime = 0), it && (this.labels = {}), _uncache(this) + }), + (nt.totalDuration = function (it) { + var ot = 0, + at = this, + st = at._last, + lt = _bigNum$1, + ct, + ut, + ht + if (arguments.length) + return at.timeScale((at._repeat < 0 ? at.duration() : at.totalDuration()) / (at.reversed() ? -it : it)) + if (at._dirty) { + for (ht = at.parent; st; ) + (ct = st._prev), + st._dirty && st.totalDuration(), + (ut = st._start), + ut > lt && at._sort && st._ts && !at._lock + ? ((at._lock = 1), (_addToTimeline(at, st, ut - st._delay, 1)._lock = 0)) + : (lt = ut), + ut < 0 && + st._ts && + ((ot -= ut), + ((!ht && !at._dp) || (ht && ht.smoothChildTiming)) && + ((at._start += ut / at._ts), (at._time -= ut), (at._tTime -= ut)), + at.shiftChildren(-ut, !1, -1 / 0), + (lt = 0)), + st._end > ot && st._ts && (ot = st._end), + (st = ct) + _setDuration(at, at === _globalTimeline && at._time > ot ? at._time : ot, 1, 1), (at._dirty = 0) + } + return at._tDur + }), + (et.updateRoot = function (it) { + if ( + (_globalTimeline._ts && + (_lazySafeRender(_globalTimeline, _parentToChildTotalTime(it, _globalTimeline)), + (_lastRenderedFrame = _ticker.frame)), + _ticker.frame >= _nextGCFrame) + ) { + _nextGCFrame += _config.autoSleep || 120 + var ot = _globalTimeline._first + if ((!ot || !ot._ts) && _config.autoSleep && _ticker._listeners.length < 2) { + for (; ot && !ot._ts; ) ot = ot._next + ot || _ticker.sleep() + } + } + }), + et + ) + })(Animation) + _setDefaults(Timeline$1.prototype, { _lock: 0, _hasPause: 0, _forcing: 0 }) + var _addComplexStringPropTween = function (et, nt, rt, it, ot, at, st) { + var lt = new PropTween(this._pt, et, nt, 0, 1, _renderComplexString, null, ot), + ct = 0, + ut = 0, + ht, + dt, + pt, + mt, + gt, + yt, + bt, + vt + for ( + lt.b = rt, + lt.e = it, + rt += '', + it += '', + (bt = ~it.indexOf('random(')) && (it = _replaceRandom(it)), + at && ((vt = [rt, it]), at(vt, et, nt), (rt = vt[0]), (it = vt[1])), + dt = rt.match(_complexStringNumExp) || []; + (ht = _complexStringNumExp.exec(it)); + + ) + (mt = ht[0]), + (gt = it.substring(ct, ht.index)), + pt ? (pt = (pt + 1) % 5) : gt.substr(-5) === 'rgba(' && (pt = 1), + mt !== dt[ut++] && + ((yt = parseFloat(dt[ut - 1]) || 0), + (lt._pt = { + _next: lt._pt, + p: gt || ut === 1 ? gt : ',', + s: yt, + c: mt.charAt(1) === '=' ? _parseRelative(yt, mt) - yt : parseFloat(mt) - yt, + m: pt && pt < 4 ? Math.round : 0, + }), + (ct = _complexStringNumExp.lastIndex)) + return ( + (lt.c = ct < it.length ? it.substring(ct, it.length) : ''), + (lt.fp = st), + (_relExp.test(it) || bt) && (lt.e = 0), + (this._pt = lt), + lt + ) + }, + _addPropTween = function (et, nt, rt, it, ot, at, st, lt, ct, ut) { + _isFunction(it) && (it = it(ot || 0, et, at)) + var ht = et[nt], + dt = + rt !== 'get' + ? rt + : _isFunction(ht) + ? ct + ? et[nt.indexOf('set') || !_isFunction(et['get' + nt.substr(3)]) ? nt : 'get' + nt.substr(3)](ct) + : et[nt]() + : ht, + pt = _isFunction(ht) ? (ct ? _setterFuncWithParam : _setterFunc) : _setterPlain, + mt + if ( + (_isString$1(it) && + (~it.indexOf('random(') && (it = _replaceRandom(it)), + it.charAt(1) === '=' && ((mt = _parseRelative(dt, it) + (getUnit(dt) || 0)), (mt || mt === 0) && (it = mt))), + !ut || dt !== it || _forceAllPropTweens) + ) + return !isNaN(dt * it) && it !== '' + ? ((mt = new PropTween( + this._pt, + et, + nt, + +dt || 0, + it - (dt || 0), + typeof ht == 'boolean' ? _renderBoolean : _renderPlain, + 0, + pt, + )), + ct && (mt.fp = ct), + st && mt.modifier(st, this, et), + (this._pt = mt)) + : (!ht && !(nt in et) && _missingPlugin(nt, it), + _addComplexStringPropTween.call(this, et, nt, dt, it, pt, lt || _config.stringFilter, ct)) + }, + _processVars = function (et, nt, rt, it, ot) { + if ( + (_isFunction(et) && (et = _parseFuncOrString(et, ot, nt, rt, it)), + !_isObject(et) || (et.style && et.nodeType) || _isArray(et) || _isTypedArray(et)) + ) + return _isString$1(et) ? _parseFuncOrString(et, ot, nt, rt, it) : et + var at = {}, + st + for (st in et) at[st] = _parseFuncOrString(et[st], ot, nt, rt, it) + return at + }, + _checkPlugin = function (et, nt, rt, it, ot, at) { + var st, lt, ct, ut + if ( + _plugins[et] && + (st = new _plugins[et]()).init(ot, st.rawVars ? nt[et] : _processVars(nt[et], it, ot, at, rt), rt, it, at) !== + !1 && + ((rt._pt = lt = new PropTween(rt._pt, ot, et, 0, 1, st.render, st, 0, st.priority)), rt !== _quickTween) + ) + for (ct = rt._ptLookup[rt._targets.indexOf(ot)], ut = st._props.length; ut--; ) ct[st._props[ut]] = lt + return st + }, + _overwritingTween, + _forceAllPropTweens, + _initTween = function tt(et, nt, rt) { + var it = et.vars, + ot = it.ease, + at = it.startAt, + st = it.immediateRender, + lt = it.lazy, + ct = it.onUpdate, + ut = it.onUpdateParams, + ht = it.callbackScope, + dt = it.runBackwards, + pt = it.yoyoEase, + mt = it.keyframes, + gt = it.autoRevert, + yt = et._dur, + bt = et._startAt, + vt = et._targets, + xt = et.parent, + kt = xt && xt.data === 'nested' ? xt.vars.targets : vt, + St = et._overwrite === 'auto' && !_suppressOverwrites, + Tt = et.timeline, + At, + Et, + $t, + Dt, + jt, + Pt, + Ct, + wt, + It, + Ot, + Wt, + zt, + Ft + if ( + (Tt && (!mt || !ot) && (ot = 'none'), + (et._ease = _parseEase(ot, _defaults.ease)), + (et._yEase = pt ? _invertEase(_parseEase(pt === !0 ? ot : pt, _defaults.ease)) : 0), + pt && et._yoyo && !et._repeat && ((pt = et._yEase), (et._yEase = et._ease), (et._ease = pt)), + (et._from = !Tt && !!it.runBackwards), + !Tt || (mt && !it.stagger)) + ) { + if ( + ((wt = vt[0] ? _getCache(vt[0]).harness : 0), + (zt = wt && it[wt.prop]), + (At = _copyExcluding(it, _reservedProps)), + bt && + (bt._zTime < 0 && bt.progress(1), + nt < 0 && dt && st && !gt + ? bt.render(-1, !0) + : bt.revert(dt && yt ? _revertConfigNoKill : _startAtRevertConfig), + (bt._lazy = 0)), + at) + ) { + if ( + (_removeFromParent( + (et._startAt = Tween.set( + vt, + _setDefaults( + { + data: 'isStart', + overwrite: !1, + parent: xt, + immediateRender: !0, + lazy: !bt && _isNotFalse(lt), + startAt: null, + delay: 0, + onUpdate: ct, + onUpdateParams: ut, + callbackScope: ht, + stagger: 0, + }, + at, + ), + )), + ), + (et._startAt._dp = 0), + (et._startAt._sat = et), + nt < 0 && (_reverting$1 || (!st && !gt)) && et._startAt.revert(_revertConfigNoKill), + st && yt && nt <= 0 && rt <= 0) + ) { + nt && (et._zTime = nt) + return + } + } else if (dt && yt && !bt) { + if ( + (nt && (st = !1), + ($t = _setDefaults( + { + overwrite: !1, + data: 'isFromStart', + lazy: st && !bt && _isNotFalse(lt), + immediateRender: st, + stagger: 0, + parent: xt, + }, + At, + )), + zt && ($t[wt.prop] = zt), + _removeFromParent((et._startAt = Tween.set(vt, $t))), + (et._startAt._dp = 0), + (et._startAt._sat = et), + nt < 0 && (_reverting$1 ? et._startAt.revert(_revertConfigNoKill) : et._startAt.render(-1, !0)), + (et._zTime = nt), + !st) + ) + tt(et._startAt, _tinyNum, _tinyNum) + else if (!nt) return + } + for (et._pt = et._ptCache = 0, lt = (yt && _isNotFalse(lt)) || (lt && !yt), Et = 0; Et < vt.length; Et++) { + if ( + ((jt = vt[Et]), + (Ct = jt._gsap || _harness(vt)[Et]._gsap), + (et._ptLookup[Et] = Ot = {}), + _lazyLookup[Ct.id] && _lazyTweens.length && _lazyRender(), + (Wt = kt === vt ? Et : kt.indexOf(jt)), + wt && + (It = new wt()).init(jt, zt || At, et, Wt, kt) !== !1 && + ((et._pt = Dt = new PropTween(et._pt, jt, It.name, 0, 1, It.render, It, 0, It.priority)), + It._props.forEach(function (Nt) { + Ot[Nt] = Dt + }), + It.priority && (Pt = 1)), + !wt || zt) + ) + for ($t in At) + _plugins[$t] && (It = _checkPlugin($t, At, et, Wt, jt, kt)) + ? It.priority && (Pt = 1) + : (Ot[$t] = Dt = _addPropTween.call(et, jt, $t, 'get', At[$t], Wt, kt, 0, it.stringFilter)) + et._op && et._op[Et] && et.kill(jt, et._op[Et]), + St && + et._pt && + ((_overwritingTween = et), + _globalTimeline.killTweensOf(jt, Ot, et.globalTime(nt)), + (Ft = !et.parent), + (_overwritingTween = 0)), + et._pt && lt && (_lazyLookup[Ct.id] = 1) + } + Pt && _sortPropTweensByPriority(et), et._onInit && et._onInit(et) + } + ;(et._onUpdate = ct), (et._initted = (!et._op || et._pt) && !Ft), mt && nt <= 0 && Tt.render(_bigNum$1, !0, !0) + }, + _updatePropTweens = function (et, nt, rt, it, ot, at, st) { + var lt = ((et._pt && et._ptCache) || (et._ptCache = {}))[nt], + ct, + ut, + ht, + dt + if (!lt) + for (lt = et._ptCache[nt] = [], ht = et._ptLookup, dt = et._targets.length; dt--; ) { + if (((ct = ht[dt][nt]), ct && ct.d && ct.d._pt)) + for (ct = ct.d._pt; ct && ct.p !== nt && ct.fp !== nt; ) ct = ct._next + if (!ct) + return (_forceAllPropTweens = 1), (et.vars[nt] = '+=0'), _initTween(et, st), (_forceAllPropTweens = 0), 1 + lt.push(ct) + } + for (dt = lt.length; dt--; ) + (ut = lt[dt]), + (ct = ut._pt || ut), + (ct.s = (it || it === 0) && !ot ? it : ct.s + (it || 0) + at * ct.c), + (ct.c = rt - ct.s), + ut.e && (ut.e = _round(rt) + getUnit(ut.e)), + ut.b && (ut.b = ct.s + getUnit(ut.b)) + }, + _addAliasesToVars = function (et, nt) { + var rt = et[0] ? _getCache(et[0]).harness : 0, + it = rt && rt.aliases, + ot, + at, + st, + lt + if (!it) return nt + ot = _merge({}, nt) + for (at in it) if (at in ot) for (lt = it[at].split(','), st = lt.length; st--; ) ot[lt[st]] = ot[at] + return ot + }, + _parseKeyframe = function (et, nt, rt, it) { + var ot = nt.ease || it || 'power1.inOut', + at, + st + if (_isArray(nt)) + (st = rt[et] || (rt[et] = [])), + nt.forEach(function (lt, ct) { + return st.push({ t: (ct / (nt.length - 1)) * 100, v: lt, e: ot }) + }) + else + for (at in nt) (st = rt[at] || (rt[at] = [])), at === 'ease' || st.push({ t: parseFloat(et), v: nt[at], e: ot }) + }, + _parseFuncOrString = function (et, nt, rt, it, ot) { + return _isFunction(et) + ? et.call(nt, rt, it, ot) + : _isString$1(et) && ~et.indexOf('random(') + ? _replaceRandom(et) + : et + }, + _staggerTweenProps = _callbackNames + 'repeat,repeatDelay,yoyo,repeatRefresh,yoyoEase,autoRevert', + _staggerPropsToSkip = {} + _forEachName(_staggerTweenProps + ',id,stagger,delay,duration,paused,scrollTrigger', function (tt) { + return (_staggerPropsToSkip[tt] = 1) + }) + var Tween = (function (tt) { + _inheritsLoose(et, tt) + function et(rt, it, ot, at) { + var st + typeof it == 'number' && ((ot.duration = it), (it = ot), (ot = null)), + (st = tt.call(this, at ? it : _inheritDefaults(it)) || this) + var lt = st.vars, + ct = lt.duration, + ut = lt.delay, + ht = lt.immediateRender, + dt = lt.stagger, + pt = lt.overwrite, + mt = lt.keyframes, + gt = lt.defaults, + yt = lt.scrollTrigger, + bt = lt.yoyoEase, + vt = it.parent || _globalTimeline, + xt = (_isArray(rt) || _isTypedArray(rt) ? _isNumber$1(rt[0]) : 'length' in it) ? [rt] : toArray$3(rt), + kt, + St, + Tt, + At, + Et, + $t, + Dt, + jt + if ( + ((st._targets = xt.length + ? _harness(xt) + : _warn('GSAP target ' + rt + ' not found. https://greensock.com', !_config.nullTargetWarn) || []), + (st._ptLookup = []), + (st._overwrite = pt), + mt || dt || _isFuncOrString(ct) || _isFuncOrString(ut)) + ) { + if ( + ((it = st.vars), + (kt = st.timeline = + new Timeline$1({ + data: 'nested', + defaults: gt || {}, + targets: vt && vt.data === 'nested' ? vt.vars.targets : xt, + })), + kt.kill(), + (kt.parent = kt._dp = _assertThisInitialized$c(st)), + (kt._start = 0), + dt || _isFuncOrString(ct) || _isFuncOrString(ut)) + ) { + if (((At = xt.length), (Dt = dt && distribute(dt)), _isObject(dt))) + for (Et in dt) ~_staggerTweenProps.indexOf(Et) && (jt || (jt = {}), (jt[Et] = dt[Et])) + for (St = 0; St < At; St++) + (Tt = _copyExcluding(it, _staggerPropsToSkip)), + (Tt.stagger = 0), + bt && (Tt.yoyoEase = bt), + jt && _merge(Tt, jt), + ($t = xt[St]), + (Tt.duration = +_parseFuncOrString(ct, _assertThisInitialized$c(st), St, $t, xt)), + (Tt.delay = (+_parseFuncOrString(ut, _assertThisInitialized$c(st), St, $t, xt) || 0) - st._delay), + !dt && At === 1 && Tt.delay && ((st._delay = ut = Tt.delay), (st._start += ut), (Tt.delay = 0)), + kt.to($t, Tt, Dt ? Dt(St, $t, xt) : 0), + (kt._ease = _easeMap.none) + kt.duration() ? (ct = ut = 0) : (st.timeline = 0) + } else if (mt) { + _inheritDefaults(_setDefaults(kt.vars.defaults, { ease: 'none' })), + (kt._ease = _parseEase(mt.ease || it.ease || 'none')) + var Pt = 0, + Ct, + wt, + It + if (_isArray(mt)) + mt.forEach(function (Ot) { + return kt.to(xt, Ot, '>') + }), + kt.duration() + else { + Tt = {} + for (Et in mt) Et === 'ease' || Et === 'easeEach' || _parseKeyframe(Et, mt[Et], Tt, mt.easeEach) + for (Et in Tt) + for ( + Ct = Tt[Et].sort(function (Ot, Wt) { + return Ot.t - Wt.t + }), + Pt = 0, + St = 0; + St < Ct.length; + St++ + ) + (wt = Ct[St]), + (It = { ease: wt.e, duration: ((wt.t - (St ? Ct[St - 1].t : 0)) / 100) * ct }), + (It[Et] = wt.v), + kt.to(xt, It, Pt), + (Pt += It.duration) + kt.duration() < ct && kt.to({}, { duration: ct - kt.duration() }) + } + } + ct || st.duration((ct = kt.duration())) + } else st.timeline = 0 + return ( + pt === !0 && + !_suppressOverwrites && + ((_overwritingTween = _assertThisInitialized$c(st)), + _globalTimeline.killTweensOf(xt), + (_overwritingTween = 0)), + _addToTimeline(vt, _assertThisInitialized$c(st), ot), + it.reversed && st.reverse(), + it.paused && st.paused(!0), + (ht || + (!ct && + !mt && + st._start === _roundPrecise(vt._time) && + _isNotFalse(ht) && + _hasNoPausedAncestors(_assertThisInitialized$c(st)) && + vt.data !== 'nested')) && + ((st._tTime = -_tinyNum), st.render(Math.max(0, -ut) || 0)), + yt && _scrollTrigger(_assertThisInitialized$c(st), yt), + st + ) + } + var nt = et.prototype + return ( + (nt.render = function (it, ot, at) { + var st = this._time, + lt = this._tDur, + ct = this._dur, + ut = it < 0, + ht = it > lt - _tinyNum && !ut ? lt : it < _tinyNum ? 0 : it, + dt, + pt, + mt, + gt, + yt, + bt, + vt, + xt, + kt + if (!ct) _renderZeroDurationTween(this, it, ot, at) + else if ( + ht !== this._tTime || + !it || + at || + (!this._initted && this._tTime) || + (this._startAt && this._zTime < 0 !== ut) + ) { + if (((dt = ht), (xt = this.timeline), this._repeat)) { + if (((gt = ct + this._rDelay), this._repeat < -1 && ut)) return this.totalTime(gt * 100 + it, ot, at) + if ( + ((dt = _roundPrecise(ht % gt)), + ht === lt + ? ((mt = this._repeat), (dt = ct)) + : ((mt = ~~(ht / gt)), mt && mt === ht / gt && ((dt = ct), mt--), dt > ct && (dt = ct)), + (bt = this._yoyo && mt & 1), + bt && ((kt = this._yEase), (dt = ct - dt)), + (yt = _animationCycle(this._tTime, gt)), + dt === st && !at && this._initted) + ) + return (this._tTime = ht), this + mt !== yt && + (xt && this._yEase && _propagateYoyoEase(xt, bt), + this.vars.repeatRefresh && + !bt && + !this._lock && + ((this._lock = at = 1), (this.render(_roundPrecise(gt * mt), !0).invalidate()._lock = 0))) + } + if (!this._initted) { + if (_attemptInitTween(this, ut ? it : dt, at, ot, ht)) return (this._tTime = 0), this + if (st !== this._time) return this + if (ct !== this._dur) return this.render(it, ot, at) + } + if ( + ((this._tTime = ht), + (this._time = dt), + !this._act && this._ts && ((this._act = 1), (this._lazy = 0)), + (this.ratio = vt = (kt || this._ease)(dt / ct)), + this._from && (this.ratio = vt = 1 - vt), + dt && !st && !ot && !mt && (_callback(this, 'onStart'), this._tTime !== ht)) + ) + return this + for (pt = this._pt; pt; ) pt.r(vt, pt.d), (pt = pt._next) + ;(xt && xt.render(it < 0 ? it : !dt && bt ? -_tinyNum : xt._dur * xt._ease(dt / this._dur), ot, at)) || + (this._startAt && (this._zTime = it)), + this._onUpdate && !ot && (ut && _rewindStartAt(this, it, ot, at), _callback(this, 'onUpdate')), + this._repeat && mt !== yt && this.vars.onRepeat && !ot && this.parent && _callback(this, 'onRepeat'), + (ht === this._tDur || !ht) && + this._tTime === ht && + (ut && !this._onUpdate && _rewindStartAt(this, it, !0, !0), + (it || !ct) && + ((ht === this._tDur && this._ts > 0) || (!ht && this._ts < 0)) && + _removeFromParent(this, 1), + !ot && + !(ut && !st) && + (ht || st || bt) && + (_callback(this, ht === lt ? 'onComplete' : 'onReverseComplete', !0), + this._prom && !(ht < lt && this.timeScale() > 0) && this._prom())) + } + return this + }), + (nt.targets = function () { + return this._targets + }), + (nt.invalidate = function (it) { + return ( + (!it || !this.vars.runBackwards) && (this._startAt = 0), + (this._pt = this._op = this._onUpdate = this._lazy = this.ratio = 0), + (this._ptLookup = []), + this.timeline && this.timeline.invalidate(it), + tt.prototype.invalidate.call(this, it) + ) + }), + (nt.resetTo = function (it, ot, at, st) { + _tickerActive || _ticker.wake(), this._ts || this.play() + var lt = Math.min(this._dur, (this._dp._time - this._start) * this._ts), + ct + return ( + this._initted || _initTween(this, lt), + (ct = this._ease(lt / this._dur)), + _updatePropTweens(this, it, ot, at, st, ct, lt) + ? this.resetTo(it, ot, at, st) + : (_alignPlayhead(this, 0), + this.parent || _addLinkedListItem(this._dp, this, '_first', '_last', this._dp._sort ? '_start' : 0), + this.render(0)) + ) + }), + (nt.kill = function (it, ot) { + if ((ot === void 0 && (ot = 'all'), !it && (!ot || ot === 'all'))) + return (this._lazy = this._pt = 0), this.parent ? _interrupt(this) : this + if (this.timeline) { + var at = this.timeline.totalDuration() + return ( + this.timeline.killTweensOf(it, ot, _overwritingTween && _overwritingTween.vars.overwrite !== !0)._first || + _interrupt(this), + this.parent && + at !== this.timeline.totalDuration() && + _setDuration(this, (this._dur * this.timeline._tDur) / at, 0, 1), + this + ) + } + var st = this._targets, + lt = it ? toArray$3(it) : st, + ct = this._ptLookup, + ut = this._pt, + ht, + dt, + pt, + mt, + gt, + yt, + bt + if ((!ot || ot === 'all') && _arraysMatch(st, lt)) return ot === 'all' && (this._pt = 0), _interrupt(this) + for ( + ht = this._op = this._op || [], + ot !== 'all' && + (_isString$1(ot) && + ((gt = {}), + _forEachName(ot, function (vt) { + return (gt[vt] = 1) + }), + (ot = gt)), + (ot = _addAliasesToVars(st, ot))), + bt = st.length; + bt--; + + ) + if (~lt.indexOf(st[bt])) { + ;(dt = ct[bt]), + ot === 'all' ? ((ht[bt] = ot), (mt = dt), (pt = {})) : ((pt = ht[bt] = ht[bt] || {}), (mt = ot)) + for (gt in mt) + (yt = dt && dt[gt]), + yt && + ((!('kill' in yt.d) || yt.d.kill(gt) === !0) && _removeLinkedListItem(this, yt, '_pt'), + delete dt[gt]), + pt !== 'all' && (pt[gt] = 1) + } + return this._initted && !this._pt && ut && _interrupt(this), this + }), + (et.to = function (it, ot) { + return new et(it, ot, arguments[2]) + }), + (et.from = function (it, ot) { + return _createTweenType(1, arguments) + }), + (et.delayedCall = function (it, ot, at, st) { + return new et(ot, 0, { + immediateRender: !1, + lazy: !1, + overwrite: !1, + delay: it, + onComplete: ot, + onReverseComplete: ot, + onCompleteParams: at, + onReverseCompleteParams: at, + callbackScope: st, + }) + }), + (et.fromTo = function (it, ot, at) { + return _createTweenType(2, arguments) + }), + (et.set = function (it, ot) { + return (ot.duration = 0), ot.repeatDelay || (ot.repeat = 0), new et(it, ot) + }), + (et.killTweensOf = function (it, ot, at) { + return _globalTimeline.killTweensOf(it, ot, at) + }), + et + ) + })(Animation) + _setDefaults(Tween.prototype, { _targets: [], _lazy: 0, _startAt: 0, _op: 0, _onInit: 0 }) + _forEachName('staggerTo,staggerFrom,staggerFromTo', function (tt) { + Tween[tt] = function () { + var et = new Timeline$1(), + nt = _slice.call(arguments, 0) + return nt.splice(tt === 'staggerFromTo' ? 5 : 4, 0, 0), et[tt].apply(et, nt) + } + }) + var _setterPlain = function (et, nt, rt) { + return (et[nt] = rt) + }, + _setterFunc = function (et, nt, rt) { + return et[nt](rt) + }, + _setterFuncWithParam = function (et, nt, rt, it) { + return et[nt](it.fp, rt) + }, + _setterAttribute = function (et, nt, rt) { + return et.setAttribute(nt, rt) + }, + _getSetter = function (et, nt) { + return _isFunction(et[nt]) + ? _setterFunc + : _isUndefined(et[nt]) && et.setAttribute + ? _setterAttribute + : _setterPlain + }, + _renderPlain = function (et, nt) { + return nt.set(nt.t, nt.p, Math.round((nt.s + nt.c * et) * 1e6) / 1e6, nt) + }, + _renderBoolean = function (et, nt) { + return nt.set(nt.t, nt.p, !!(nt.s + nt.c * et), nt) + }, + _renderComplexString = function (et, nt) { + var rt = nt._pt, + it = '' + if (!et && nt.b) it = nt.b + else if (et === 1 && nt.e) it = nt.e + else { + for (; rt; ) + (it = rt.p + (rt.m ? rt.m(rt.s + rt.c * et) : Math.round((rt.s + rt.c * et) * 1e4) / 1e4) + it), + (rt = rt._next) + it += nt.c + } + nt.set(nt.t, nt.p, it, nt) + }, + _renderPropTweens = function (et, nt) { + for (var rt = nt._pt; rt; ) rt.r(et, rt.d), (rt = rt._next) + }, + _addPluginModifier = function (et, nt, rt, it) { + for (var ot = this._pt, at; ot; ) (at = ot._next), ot.p === it && ot.modifier(et, nt, rt), (ot = at) + }, + _killPropTweensOf = function (et) { + for (var nt = this._pt, rt, it; nt; ) + (it = nt._next), + (nt.p === et && !nt.op) || nt.op === et ? _removeLinkedListItem(this, nt, '_pt') : nt.dep || (rt = 1), + (nt = it) + return !rt + }, + _setterWithModifier = function (et, nt, rt, it) { + it.mSet(et, nt, it.m.call(it.tween, rt, it.mt), it) + }, + _sortPropTweensByPriority = function (et) { + for (var nt = et._pt, rt, it, ot, at; nt; ) { + for (rt = nt._next, it = ot; it && it.pr > nt.pr; ) it = it._next + ;(nt._prev = it ? it._prev : at) ? (nt._prev._next = nt) : (ot = nt), + (nt._next = it) ? (it._prev = nt) : (at = nt), + (nt = rt) + } + et._pt = ot + }, + PropTween = (function () { + function tt(nt, rt, it, ot, at, st, lt, ct, ut) { + ;(this.t = rt), + (this.s = ot), + (this.c = at), + (this.p = it), + (this.r = st || _renderPlain), + (this.d = lt || this), + (this.set = ct || _setterPlain), + (this.pr = ut || 0), + (this._next = nt), + nt && (nt._prev = this) + } + var et = tt.prototype + return ( + (et.modifier = function (rt, it, ot) { + ;(this.mSet = this.mSet || this.set), + (this.set = _setterWithModifier), + (this.m = rt), + (this.mt = ot), + (this.tween = it) + }), + tt + ) + })() + _forEachName( + _callbackNames + + 'parent,duration,ease,delay,overwrite,runBackwards,startAt,yoyo,immediateRender,repeat,repeatDelay,data,paused,reversed,lazy,callbackScope,stringFilter,id,yoyoEase,stagger,inherit,repeatRefresh,keyframes,autoRevert,scrollTrigger', + function (tt) { + return (_reservedProps[tt] = 1) + }, + ) + _globals.TweenMax = _globals.TweenLite = Tween + _globals.TimelineLite = _globals.TimelineMax = Timeline$1 + _globalTimeline = new Timeline$1({ + sortChildren: !1, + defaults: _defaults, + autoRemoveChildren: !0, + id: 'root', + smoothChildTiming: !0, + }) + _config.stringFilter = _colorStringFilter + var _media = [], + _listeners = {}, + _emptyArray = [], + _lastMediaTime = 0, + _contextID = 0, + _dispatch = function (et) { + return (_listeners[et] || _emptyArray).map(function (nt) { + return nt() + }) + }, + _onMediaChange = function () { + var et = Date.now(), + nt = [] + et - _lastMediaTime > 2 && + (_dispatch('matchMediaInit'), + _media.forEach(function (rt) { + var it = rt.queries, + ot = rt.conditions, + at, + st, + lt, + ct + for (st in it) + (at = _win$1.matchMedia(it[st]).matches), at && (lt = 1), at !== ot[st] && ((ot[st] = at), (ct = 1)) + ct && (rt.revert(), lt && nt.push(rt)) + }), + _dispatch('matchMediaRevert'), + nt.forEach(function (rt) { + return rt.onMatch(rt) + }), + (_lastMediaTime = et), + _dispatch('matchMedia')) + }, + Context$1 = (function () { + function tt(nt, rt) { + ;(this.selector = rt && selector$1(rt)), + (this.data = []), + (this._r = []), + (this.isReverted = !1), + (this.id = _contextID++), + nt && this.add(nt) + } + var et = tt.prototype + return ( + (et.add = function (rt, it, ot) { + _isFunction(rt) && ((ot = it), (it = rt), (rt = _isFunction)) + var at = this, + st = function () { + var ct = _context, + ut = at.selector, + ht + return ( + ct && ct !== at && ct.data.push(at), + ot && (at.selector = selector$1(ot)), + (_context = at), + (ht = it.apply(at, arguments)), + _isFunction(ht) && at._r.push(ht), + (_context = ct), + (at.selector = ut), + (at.isReverted = !1), + ht + ) + } + return (at.last = st), rt === _isFunction ? st(at) : rt ? (at[rt] = st) : st + }), + (et.ignore = function (rt) { + var it = _context + ;(_context = null), rt(this), (_context = it) + }), + (et.getTweens = function () { + var rt = [] + return ( + this.data.forEach(function (it) { + return it instanceof tt + ? rt.push.apply(rt, it.getTweens()) + : it instanceof Tween && !(it.parent && it.parent.data === 'nested') && rt.push(it) + }), + rt + ) + }), + (et.clear = function () { + this._r.length = this.data.length = 0 + }), + (et.kill = function (rt, it) { + var ot = this + if (rt) { + var at = this.getTweens() + this.data.forEach(function (lt) { + lt.data === 'isFlip' && + (lt.revert(), + lt.getChildren(!0, !0, !1).forEach(function (ct) { + return at.splice(at.indexOf(ct), 1) + })) + }), + at + .map(function (lt) { + return { g: lt.globalTime(0), t: lt } + }) + .sort(function (lt, ct) { + return ct.g - lt.g || -1 / 0 + }) + .forEach(function (lt) { + return lt.t.revert(rt) + }), + this.data.forEach(function (lt) { + return !(lt instanceof Tween) && lt.revert && lt.revert(rt) + }), + this._r.forEach(function (lt) { + return lt(rt, ot) + }), + (this.isReverted = !0) + } else + this.data.forEach(function (lt) { + return lt.kill && lt.kill() + }) + if ((this.clear(), it)) for (var st = _media.length; st--; ) _media[st].id === this.id && _media.splice(st, 1) + }), + (et.revert = function (rt) { + this.kill(rt || {}) + }), + tt + ) + })(), + MatchMedia = (function () { + function tt(nt) { + ;(this.contexts = []), (this.scope = nt) + } + var et = tt.prototype + return ( + (et.add = function (rt, it, ot) { + _isObject(rt) || (rt = { matches: rt }) + var at = new Context$1(0, ot || this.scope), + st = (at.conditions = {}), + lt, + ct, + ut + _context && !at.selector && (at.selector = _context.selector), + this.contexts.push(at), + (it = at.add('onMatch', it)), + (at.queries = rt) + for (ct in rt) + ct === 'all' + ? (ut = 1) + : ((lt = _win$1.matchMedia(rt[ct])), + lt && + (_media.indexOf(at) < 0 && _media.push(at), + (st[ct] = lt.matches) && (ut = 1), + lt.addListener ? lt.addListener(_onMediaChange) : lt.addEventListener('change', _onMediaChange))) + return ut && it(at), this + }), + (et.revert = function (rt) { + this.kill(rt || {}) + }), + (et.kill = function (rt) { + this.contexts.forEach(function (it) { + return it.kill(rt, !0) + }) + }), + tt + ) + })(), + _gsap = { + registerPlugin: function () { + for (var et = arguments.length, nt = new Array(et), rt = 0; rt < et; rt++) nt[rt] = arguments[rt] + nt.forEach(function (it) { + return _createPlugin(it) + }) + }, + timeline: function (et) { + return new Timeline$1(et) + }, + getTweensOf: function (et, nt) { + return _globalTimeline.getTweensOf(et, nt) + }, + getProperty: function (et, nt, rt, it) { + _isString$1(et) && (et = toArray$3(et)[0]) + var ot = _getCache(et || {}).get, + at = rt ? _passThrough : _numericIfPossible + return ( + rt === 'native' && (rt = ''), + et && + (nt + ? at(((_plugins[nt] && _plugins[nt].get) || ot)(et, nt, rt, it)) + : function (st, lt, ct) { + return at(((_plugins[st] && _plugins[st].get) || ot)(et, st, lt, ct)) + }) + ) + }, + quickSetter: function (et, nt, rt) { + if (((et = toArray$3(et)), et.length > 1)) { + var it = et.map(function (ut) { + return gsap.quickSetter(ut, nt, rt) + }), + ot = it.length + return function (ut) { + for (var ht = ot; ht--; ) it[ht](ut) + } + } + et = et[0] || {} + var at = _plugins[nt], + st = _getCache(et), + lt = (st.harness && (st.harness.aliases || {})[nt]) || nt, + ct = at + ? function (ut) { + var ht = new at() + ;(_quickTween._pt = 0), + ht.init(et, rt ? ut + rt : ut, _quickTween, 0, [et]), + ht.render(1, ht), + _quickTween._pt && _renderPropTweens(1, _quickTween) + } + : st.set(et, lt) + return at + ? ct + : function (ut) { + return ct(et, lt, rt ? ut + rt : ut, st, 1) + } + }, + quickTo: function (et, nt, rt) { + var it, + ot = gsap.to(et, _merge(((it = {}), (it[nt] = '+=0.1'), (it.paused = !0), it), rt || {})), + at = function (lt, ct, ut) { + return ot.resetTo(nt, lt, ct, ut) + } + return (at.tween = ot), at + }, + isTweening: function (et) { + return _globalTimeline.getTweensOf(et, !0).length > 0 + }, + defaults: function (et) { + return et && et.ease && (et.ease = _parseEase(et.ease, _defaults.ease)), _mergeDeep(_defaults, et || {}) + }, + config: function (et) { + return _mergeDeep(_config, et || {}) + }, + registerEffect: function (et) { + var nt = et.name, + rt = et.effect, + it = et.plugins, + ot = et.defaults, + at = et.extendTimeline + ;(it || '').split(',').forEach(function (st) { + return st && !_plugins[st] && !_globals[st] && _warn(nt + ' effect requires ' + st + ' plugin.') + }), + (_effects[nt] = function (st, lt, ct) { + return rt(toArray$3(st), _setDefaults(lt || {}, ot), ct) + }), + at && + (Timeline$1.prototype[nt] = function (st, lt, ct) { + return this.add(_effects[nt](st, _isObject(lt) ? lt : (ct = lt) && {}, this), ct) + }) + }, + registerEase: function (et, nt) { + _easeMap[et] = _parseEase(nt) + }, + parseEase: function (et, nt) { + return arguments.length ? _parseEase(et, nt) : _easeMap + }, + getById: function (et) { + return _globalTimeline.getById(et) + }, + exportRoot: function (et, nt) { + et === void 0 && (et = {}) + var rt = new Timeline$1(et), + it, + ot + for ( + rt.smoothChildTiming = _isNotFalse(et.smoothChildTiming), + _globalTimeline.remove(rt), + rt._dp = 0, + rt._time = rt._tTime = _globalTimeline._time, + it = _globalTimeline._first; + it; + + ) + (ot = it._next), + (nt || !(!it._dur && it instanceof Tween && it.vars.onComplete === it._targets[0])) && + _addToTimeline(rt, it, it._start - it._delay), + (it = ot) + return _addToTimeline(_globalTimeline, rt, 0), rt + }, + context: function (et, nt) { + return et ? new Context$1(et, nt) : _context + }, + matchMedia: function (et) { + return new MatchMedia(et) + }, + matchMediaRefresh: function () { + return ( + _media.forEach(function (et) { + var nt = et.conditions, + rt, + it + for (it in nt) nt[it] && ((nt[it] = !1), (rt = 1)) + rt && et.revert() + }) || _onMediaChange() + ) + }, + addEventListener: function (et, nt) { + var rt = _listeners[et] || (_listeners[et] = []) + ~rt.indexOf(nt) || rt.push(nt) + }, + removeEventListener: function (et, nt) { + var rt = _listeners[et], + it = rt && rt.indexOf(nt) + it >= 0 && rt.splice(it, 1) + }, + utils: { + wrap, + wrapYoyo, + distribute, + random, + snap, + normalize: normalize$1, + getUnit, + clamp: clamp$2, + splitColor, + toArray: toArray$3, + selector: selector$1, + mapRange, + pipe, + unitize, + interpolate: interpolate$2, + shuffle, + }, + install: _install, + effects: _effects, + ticker: _ticker, + updateRoot: Timeline$1.updateRoot, + plugins: _plugins, + globalTimeline: _globalTimeline, + core: { + PropTween, + globals: _addGlobal, + Tween, + Timeline: Timeline$1, + Animation, + getCache: _getCache, + _removeLinkedListItem, + reverting: function () { + return _reverting$1 + }, + context: function (et) { + return et && _context && (_context.data.push(et), (et._ctx = _context)), _context + }, + suppressOverwrites: function (et) { + return (_suppressOverwrites = et) + }, + }, + } + _forEachName('to,from,fromTo,delayedCall,set,killTweensOf', function (tt) { + return (_gsap[tt] = Tween[tt]) + }) + _ticker.add(Timeline$1.updateRoot) + _quickTween = _gsap.to({}, { duration: 0 }) + var _getPluginPropTween = function (et, nt) { + for (var rt = et._pt; rt && rt.p !== nt && rt.op !== nt && rt.fp !== nt; ) rt = rt._next + return rt + }, + _addModifiers = function (et, nt) { + var rt = et._targets, + it, + ot, + at + for (it in nt) + for (ot = rt.length; ot--; ) + (at = et._ptLookup[ot][it]), + at && + (at = at.d) && + (at._pt && (at = _getPluginPropTween(at, it)), at && at.modifier && at.modifier(nt[it], et, rt[ot], it)) + }, + _buildModifierPlugin = function (et, nt) { + return { + name: et, + rawVars: 1, + init: function (it, ot, at) { + at._onInit = function (st) { + var lt, ct + if ( + (_isString$1(ot) && + ((lt = {}), + _forEachName(ot, function (ut) { + return (lt[ut] = 1) + }), + (ot = lt)), + nt) + ) { + lt = {} + for (ct in ot) lt[ct] = nt(ot[ct]) + ot = lt + } + _addModifiers(st, ot) + } + }, + } + }, + gsap = + _gsap.registerPlugin( + { + name: 'attr', + init: function (et, nt, rt, it, ot) { + var at, st, lt + this.tween = rt + for (at in nt) + (lt = et.getAttribute(at) || ''), + (st = this.add(et, 'setAttribute', (lt || 0) + '', nt[at], it, ot, 0, 0, at)), + (st.op = at), + (st.b = lt), + this._props.push(at) + }, + render: function (et, nt) { + for (var rt = nt._pt; rt; ) _reverting$1 ? rt.set(rt.t, rt.p, rt.b, rt) : rt.r(et, rt.d), (rt = rt._next) + }, + }, + { + name: 'endArray', + init: function (et, nt) { + for (var rt = nt.length; rt--; ) this.add(et, rt, et[rt] || 0, nt[rt], 0, 0, 0, 0, 0, 1) + }, + }, + _buildModifierPlugin('roundProps', _roundModifier), + _buildModifierPlugin('modifiers'), + _buildModifierPlugin('snap', snap), + ) || _gsap + Tween.version = Timeline$1.version = gsap.version = '3.12.2' + _coreReady = 1 + _windowExists$1() && _wake() + _easeMap.Power0 + _easeMap.Power1 + _easeMap.Power2 + _easeMap.Power3 + _easeMap.Power4 + _easeMap.Linear + _easeMap.Quad + _easeMap.Cubic + _easeMap.Quart + _easeMap.Quint + _easeMap.Strong + _easeMap.Elastic + _easeMap.Back + _easeMap.SteppedEase + _easeMap.Bounce + _easeMap.Sine + _easeMap.Expo + _easeMap.Circ + /*! + * CSSPlugin 3.12.2 + * https://greensock.com + * + * Copyright 2008-2023, GreenSock. All rights reserved. + * Subject to the terms at https://greensock.com/standard-license or for + * Club GreenSock members, the agreement issued with that membership. + * @author: Jack Doyle, jack@greensock.com + */ var _win, + _doc, + _docElement, + _pluginInitted, + _tempDiv, + _recentSetterPlugin, + _reverting, + _windowExists = function () { + return typeof window < 'u' + }, + _transformProps = {}, + _RAD2DEG = 180 / Math.PI, + _DEG2RAD = Math.PI / 180, + _atan2 = Math.atan2, + _bigNum = 1e8, + _capsExp = /([A-Z])/g, + _horizontalExp = /(left|right|width|margin|padding|x)/i, + _complexExp = /[\s,\(]\S/, + _propertyAliases = { autoAlpha: 'opacity,visibility', scale: 'scaleX,scaleY', alpha: 'opacity' }, + _renderCSSProp = function (et, nt) { + return nt.set(nt.t, nt.p, Math.round((nt.s + nt.c * et) * 1e4) / 1e4 + nt.u, nt) + }, + _renderPropWithEnd = function (et, nt) { + return nt.set(nt.t, nt.p, et === 1 ? nt.e : Math.round((nt.s + nt.c * et) * 1e4) / 1e4 + nt.u, nt) + }, + _renderCSSPropWithBeginning = function (et, nt) { + return nt.set(nt.t, nt.p, et ? Math.round((nt.s + nt.c * et) * 1e4) / 1e4 + nt.u : nt.b, nt) + }, + _renderRoundedCSSProp = function (et, nt) { + var rt = nt.s + nt.c * et + nt.set(nt.t, nt.p, ~~(rt + (rt < 0 ? -0.5 : 0.5)) + nt.u, nt) + }, + _renderNonTweeningValue = function (et, nt) { + return nt.set(nt.t, nt.p, et ? nt.e : nt.b, nt) + }, + _renderNonTweeningValueOnlyAtEnd = function (et, nt) { + return nt.set(nt.t, nt.p, et !== 1 ? nt.b : nt.e, nt) + }, + _setterCSSStyle = function (et, nt, rt) { + return (et.style[nt] = rt) + }, + _setterCSSProp = function (et, nt, rt) { + return et.style.setProperty(nt, rt) + }, + _setterTransform = function (et, nt, rt) { + return (et._gsap[nt] = rt) + }, + _setterScale = function (et, nt, rt) { + return (et._gsap.scaleX = et._gsap.scaleY = rt) + }, + _setterScaleWithRender = function (et, nt, rt, it, ot) { + var at = et._gsap + ;(at.scaleX = at.scaleY = rt), at.renderTransform(ot, at) + }, + _setterTransformWithRender = function (et, nt, rt, it, ot) { + var at = et._gsap + ;(at[nt] = rt), at.renderTransform(ot, at) + }, + _transformProp = 'transform', + _transformOriginProp = _transformProp + 'Origin', + _saveStyle = function tt(et, nt) { + var rt = this, + it = this.target, + ot = it.style + if (et in _transformProps && ot) { + if (((this.tfm = this.tfm || {}), et !== 'transform')) + (et = _propertyAliases[et] || et), + ~et.indexOf(',') + ? et.split(',').forEach(function (at) { + return (rt.tfm[at] = _get$1(it, at)) + }) + : (this.tfm[et] = it._gsap.x ? it._gsap[et] : _get$1(it, et)) + else + return _propertyAliases.transform.split(',').forEach(function (at) { + return tt.call(rt, at, nt) + }) + if (this.props.indexOf(_transformProp) >= 0) return + it._gsap.svg && + ((this.svgo = it.getAttribute('data-svg-origin')), this.props.push(_transformOriginProp, nt, '')), + (et = _transformProp) + } + ;(ot || nt) && this.props.push(et, nt, ot[et]) + }, + _removeIndependentTransforms = function (et) { + et.translate && (et.removeProperty('translate'), et.removeProperty('scale'), et.removeProperty('rotate')) + }, + _revertStyle = function () { + var et = this.props, + nt = this.target, + rt = nt.style, + it = nt._gsap, + ot, + at + for (ot = 0; ot < et.length; ot += 3) + et[ot + 1] + ? (nt[et[ot]] = et[ot + 2]) + : et[ot + 2] + ? (rt[et[ot]] = et[ot + 2]) + : rt.removeProperty(et[ot].substr(0, 2) === '--' ? et[ot] : et[ot].replace(_capsExp, '-$1').toLowerCase()) + if (this.tfm) { + for (at in this.tfm) it[at] = this.tfm[at] + it.svg && (it.renderTransform(), nt.setAttribute('data-svg-origin', this.svgo || '')), + (ot = _reverting()), + (!ot || !ot.isStart) && !rt[_transformProp] && (_removeIndependentTransforms(rt), (it.uncache = 1)) + } + }, + _getStyleSaver = function (et, nt) { + var rt = { target: et, props: [], revert: _revertStyle, save: _saveStyle } + return ( + et._gsap || gsap.core.getCache(et), + nt && + nt.split(',').forEach(function (it) { + return rt.save(it) + }), + rt + ) + }, + _supports3D, + _createElement = function (et, nt) { + var rt = _doc.createElementNS + ? _doc.createElementNS((nt || 'http://www.w3.org/1999/xhtml').replace(/^https/, 'http'), et) + : _doc.createElement(et) + return rt.style ? rt : _doc.createElement(et) + }, + _getComputedProperty = function tt(et, nt, rt) { + var it = getComputedStyle(et) + return ( + it[nt] || + it.getPropertyValue(nt.replace(_capsExp, '-$1').toLowerCase()) || + it.getPropertyValue(nt) || + (!rt && tt(et, _checkPropPrefix(nt) || nt, 1)) || + '' + ) + }, + _prefixes = 'O,Moz,ms,Ms,Webkit'.split(','), + _checkPropPrefix = function (et, nt, rt) { + var it = nt || _tempDiv, + ot = it.style, + at = 5 + if (et in ot && !rt) return et + for (et = et.charAt(0).toUpperCase() + et.substr(1); at-- && !(_prefixes[at] + et in ot); ); + return at < 0 ? null : (at === 3 ? 'ms' : at >= 0 ? _prefixes[at] : '') + et + }, + _initCore = function () { + _windowExists() && + window.document && + ((_win = window), + (_doc = _win.document), + (_docElement = _doc.documentElement), + (_tempDiv = _createElement('div') || { style: {} }), + _createElement('div'), + (_transformProp = _checkPropPrefix(_transformProp)), + (_transformOriginProp = _transformProp + 'Origin'), + (_tempDiv.style.cssText = 'border-width:0;line-height:0;position:absolute;padding:0'), + (_supports3D = !!_checkPropPrefix('perspective')), + (_reverting = gsap.core.reverting), + (_pluginInitted = 1)) + }, + _getBBoxHack = function tt(et) { + var nt = _createElement( + 'svg', + (this.ownerSVGElement && this.ownerSVGElement.getAttribute('xmlns')) || 'http://www.w3.org/2000/svg', + ), + rt = this.parentNode, + it = this.nextSibling, + ot = this.style.cssText, + at + if ((_docElement.appendChild(nt), nt.appendChild(this), (this.style.display = 'block'), et)) + try { + ;(at = this.getBBox()), (this._gsapBBox = this.getBBox), (this.getBBox = tt) + } catch {} + else this._gsapBBox && (at = this._gsapBBox()) + return ( + rt && (it ? rt.insertBefore(this, it) : rt.appendChild(this)), + _docElement.removeChild(nt), + (this.style.cssText = ot), + at + ) + }, + _getAttributeFallbacks = function (et, nt) { + for (var rt = nt.length; rt--; ) if (et.hasAttribute(nt[rt])) return et.getAttribute(nt[rt]) + }, + _getBBox = function (et) { + var nt + try { + nt = et.getBBox() + } catch { + nt = _getBBoxHack.call(et, !0) + } + return ( + (nt && (nt.width || nt.height)) || et.getBBox === _getBBoxHack || (nt = _getBBoxHack.call(et, !0)), + nt && !nt.width && !nt.x && !nt.y + ? { + x: +_getAttributeFallbacks(et, ['x', 'cx', 'x1']) || 0, + y: +_getAttributeFallbacks(et, ['y', 'cy', 'y1']) || 0, + width: 0, + height: 0, + } + : nt + ) + }, + _isSVG = function (et) { + return !!(et.getCTM && (!et.parentNode || et.ownerSVGElement) && _getBBox(et)) + }, + _removeProperty = function (et, nt) { + if (nt) { + var rt = et.style + nt in _transformProps && nt !== _transformOriginProp && (nt = _transformProp), + rt.removeProperty + ? ((nt.substr(0, 2) === 'ms' || nt.substr(0, 6) === 'webkit') && (nt = '-' + nt), + rt.removeProperty(nt.replace(_capsExp, '-$1').toLowerCase())) + : rt.removeAttribute(nt) + } + }, + _addNonTweeningPT = function (et, nt, rt, it, ot, at) { + var st = new PropTween(et._pt, nt, rt, 0, 1, at ? _renderNonTweeningValueOnlyAtEnd : _renderNonTweeningValue) + return (et._pt = st), (st.b = it), (st.e = ot), et._props.push(rt), st + }, + _nonConvertibleUnits = { deg: 1, rad: 1, turn: 1 }, + _nonStandardLayouts = { grid: 1, flex: 1 }, + _convertToUnit = function tt(et, nt, rt, it) { + var ot = parseFloat(rt) || 0, + at = (rt + '').trim().substr((ot + '').length) || 'px', + st = _tempDiv.style, + lt = _horizontalExp.test(nt), + ct = et.tagName.toLowerCase() === 'svg', + ut = (ct ? 'client' : 'offset') + (lt ? 'Width' : 'Height'), + ht = 100, + dt = it === 'px', + pt = it === '%', + mt, + gt, + yt, + bt + return it === at || !ot || _nonConvertibleUnits[it] || _nonConvertibleUnits[at] + ? ot + : (at !== 'px' && !dt && (ot = tt(et, nt, rt, 'px')), + (bt = et.getCTM && _isSVG(et)), + (pt || at === '%') && (_transformProps[nt] || ~nt.indexOf('adius')) + ? ((mt = bt ? et.getBBox()[lt ? 'width' : 'height'] : et[ut]), + _round(pt ? (ot / mt) * ht : (ot / 100) * mt)) + : ((st[lt ? 'width' : 'height'] = ht + (dt ? at : it)), + (gt = ~nt.indexOf('adius') || (it === 'em' && et.appendChild && !ct) ? et : et.parentNode), + bt && (gt = (et.ownerSVGElement || {}).parentNode), + (!gt || gt === _doc || !gt.appendChild) && (gt = _doc.body), + (yt = gt._gsap), + yt && pt && yt.width && lt && yt.time === _ticker.time && !yt.uncache + ? _round((ot / yt.width) * ht) + : ((pt || at === '%') && + !_nonStandardLayouts[_getComputedProperty(gt, 'display')] && + (st.position = _getComputedProperty(et, 'position')), + gt === et && (st.position = 'static'), + gt.appendChild(_tempDiv), + (mt = _tempDiv[ut]), + gt.removeChild(_tempDiv), + (st.position = 'absolute'), + lt && pt && ((yt = _getCache(gt)), (yt.time = _ticker.time), (yt.width = gt[ut])), + _round(dt ? (mt * ot) / ht : mt && ot ? (ht / mt) * ot : 0)))) + }, + _get$1 = function (et, nt, rt, it) { + var ot + return ( + _pluginInitted || _initCore(), + nt in _propertyAliases && + nt !== 'transform' && + ((nt = _propertyAliases[nt]), ~nt.indexOf(',') && (nt = nt.split(',')[0])), + _transformProps[nt] && nt !== 'transform' + ? ((ot = _parseTransform(et, it)), + (ot = + nt !== 'transformOrigin' + ? ot[nt] + : ot.svg + ? ot.origin + : _firstTwoOnly(_getComputedProperty(et, _transformOriginProp)) + ' ' + ot.zOrigin + 'px')) + : ((ot = et.style[nt]), + (!ot || ot === 'auto' || it || ~(ot + '').indexOf('calc(')) && + (ot = + (_specialProps[nt] && _specialProps[nt](et, nt, rt)) || + _getComputedProperty(et, nt) || + _getProperty(et, nt) || + (nt === 'opacity' ? 1 : 0))), + rt && !~(ot + '').trim().indexOf(' ') ? _convertToUnit(et, nt, ot, rt) + rt : ot + ) + }, + _tweenComplexCSSString = function (et, nt, rt, it) { + if (!rt || rt === 'none') { + var ot = _checkPropPrefix(nt, et, 1), + at = ot && _getComputedProperty(et, ot, 1) + at && at !== rt + ? ((nt = ot), (rt = at)) + : nt === 'borderColor' && (rt = _getComputedProperty(et, 'borderTopColor')) + } + var st = new PropTween(this._pt, et.style, nt, 0, 1, _renderComplexString), + lt = 0, + ct = 0, + ut, + ht, + dt, + pt, + mt, + gt, + yt, + bt, + vt, + xt, + kt, + St + if ( + ((st.b = rt), + (st.e = it), + (rt += ''), + (it += ''), + it === 'auto' && ((et.style[nt] = it), (it = _getComputedProperty(et, nt) || it), (et.style[nt] = rt)), + (ut = [rt, it]), + _colorStringFilter(ut), + (rt = ut[0]), + (it = ut[1]), + (dt = rt.match(_numWithUnitExp) || []), + (St = it.match(_numWithUnitExp) || []), + St.length) + ) { + for (; (ht = _numWithUnitExp.exec(it)); ) + (yt = ht[0]), + (vt = it.substring(lt, ht.index)), + mt ? (mt = (mt + 1) % 5) : (vt.substr(-5) === 'rgba(' || vt.substr(-5) === 'hsla(') && (mt = 1), + yt !== (gt = dt[ct++] || '') && + ((pt = parseFloat(gt) || 0), + (kt = gt.substr((pt + '').length)), + yt.charAt(1) === '=' && (yt = _parseRelative(pt, yt) + kt), + (bt = parseFloat(yt)), + (xt = yt.substr((bt + '').length)), + (lt = _numWithUnitExp.lastIndex - xt.length), + xt || ((xt = xt || _config.units[nt] || kt), lt === it.length && ((it += xt), (st.e += xt))), + kt !== xt && (pt = _convertToUnit(et, nt, gt, xt) || 0), + (st._pt = { + _next: st._pt, + p: vt || ct === 1 ? vt : ',', + s: pt, + c: bt - pt, + m: (mt && mt < 4) || nt === 'zIndex' ? Math.round : 0, + })) + st.c = lt < it.length ? it.substring(lt, it.length) : '' + } else st.r = nt === 'display' && it === 'none' ? _renderNonTweeningValueOnlyAtEnd : _renderNonTweeningValue + return _relExp.test(it) && (st.e = 0), (this._pt = st), st + }, + _keywordToPercent = { top: '0%', bottom: '100%', left: '0%', right: '100%', center: '50%' }, + _convertKeywordsToPercentages = function (et) { + var nt = et.split(' '), + rt = nt[0], + it = nt[1] || '50%' + return ( + (rt === 'top' || rt === 'bottom' || it === 'left' || it === 'right') && ((et = rt), (rt = it), (it = et)), + (nt[0] = _keywordToPercent[rt] || rt), + (nt[1] = _keywordToPercent[it] || it), + nt.join(' ') + ) + }, + _renderClearProps = function (et, nt) { + if (nt.tween && nt.tween._time === nt.tween._dur) { + var rt = nt.t, + it = rt.style, + ot = nt.u, + at = rt._gsap, + st, + lt, + ct + if (ot === 'all' || ot === !0) (it.cssText = ''), (lt = 1) + else + for (ot = ot.split(','), ct = ot.length; --ct > -1; ) + (st = ot[ct]), + _transformProps[st] && + ((lt = 1), (st = st === 'transformOrigin' ? _transformOriginProp : _transformProp)), + _removeProperty(rt, st) + lt && + (_removeProperty(rt, _transformProp), + at && + (at.svg && rt.removeAttribute('transform'), + _parseTransform(rt, 1), + (at.uncache = 1), + _removeIndependentTransforms(it))) + } + }, + _specialProps = { + clearProps: function (et, nt, rt, it, ot) { + if (ot.data !== 'isFromStart') { + var at = (et._pt = new PropTween(et._pt, nt, rt, 0, 0, _renderClearProps)) + return (at.u = it), (at.pr = -10), (at.tween = ot), et._props.push(rt), 1 + } + }, + }, + _identity2DMatrix = [1, 0, 0, 1, 0, 0], + _rotationalProperties = {}, + _isNullTransform = function (et) { + return et === 'matrix(1, 0, 0, 1, 0, 0)' || et === 'none' || !et + }, + _getComputedTransformMatrixAsArray = function (et) { + var nt = _getComputedProperty(et, _transformProp) + return _isNullTransform(nt) ? _identity2DMatrix : nt.substr(7).match(_numExp).map(_round) + }, + _getMatrix = function (et, nt) { + var rt = et._gsap || _getCache(et), + it = et.style, + ot = _getComputedTransformMatrixAsArray(et), + at, + st, + lt, + ct + return rt.svg && et.getAttribute('transform') + ? ((lt = et.transform.baseVal.consolidate().matrix), + (ot = [lt.a, lt.b, lt.c, lt.d, lt.e, lt.f]), + ot.join(',') === '1,0,0,1,0,0' ? _identity2DMatrix : ot) + : (ot === _identity2DMatrix && + !et.offsetParent && + et !== _docElement && + !rt.svg && + ((lt = it.display), + (it.display = 'block'), + (at = et.parentNode), + (!at || !et.offsetParent) && ((ct = 1), (st = et.nextElementSibling), _docElement.appendChild(et)), + (ot = _getComputedTransformMatrixAsArray(et)), + lt ? (it.display = lt) : _removeProperty(et, 'display'), + ct && (st ? at.insertBefore(et, st) : at ? at.appendChild(et) : _docElement.removeChild(et))), + nt && ot.length > 6 ? [ot[0], ot[1], ot[4], ot[5], ot[12], ot[13]] : ot) + }, + _applySVGOrigin = function (et, nt, rt, it, ot, at) { + var st = et._gsap, + lt = ot || _getMatrix(et, !0), + ct = st.xOrigin || 0, + ut = st.yOrigin || 0, + ht = st.xOffset || 0, + dt = st.yOffset || 0, + pt = lt[0], + mt = lt[1], + gt = lt[2], + yt = lt[3], + bt = lt[4], + vt = lt[5], + xt = nt.split(' '), + kt = parseFloat(xt[0]) || 0, + St = parseFloat(xt[1]) || 0, + Tt, + At, + Et, + $t + rt + ? lt !== _identity2DMatrix && + (At = pt * yt - mt * gt) && + ((Et = kt * (yt / At) + St * (-gt / At) + (gt * vt - yt * bt) / At), + ($t = kt * (-mt / At) + St * (pt / At) - (pt * vt - mt * bt) / At), + (kt = Et), + (St = $t)) + : ((Tt = _getBBox(et)), + (kt = Tt.x + (~xt[0].indexOf('%') ? (kt / 100) * Tt.width : kt)), + (St = Tt.y + (~(xt[1] || xt[0]).indexOf('%') ? (St / 100) * Tt.height : St))), + it || (it !== !1 && st.smooth) + ? ((bt = kt - ct), + (vt = St - ut), + (st.xOffset = ht + (bt * pt + vt * gt) - bt), + (st.yOffset = dt + (bt * mt + vt * yt) - vt)) + : (st.xOffset = st.yOffset = 0), + (st.xOrigin = kt), + (st.yOrigin = St), + (st.smooth = !!it), + (st.origin = nt), + (st.originIsAbsolute = !!rt), + (et.style[_transformOriginProp] = '0px 0px'), + at && + (_addNonTweeningPT(at, st, 'xOrigin', ct, kt), + _addNonTweeningPT(at, st, 'yOrigin', ut, St), + _addNonTweeningPT(at, st, 'xOffset', ht, st.xOffset), + _addNonTweeningPT(at, st, 'yOffset', dt, st.yOffset)), + et.setAttribute('data-svg-origin', kt + ' ' + St) + }, + _parseTransform = function (et, nt) { + var rt = et._gsap || new GSCache(et) + if ('x' in rt && !nt && !rt.uncache) return rt + var it = et.style, + ot = rt.scaleX < 0, + at = 'px', + st = 'deg', + lt = getComputedStyle(et), + ct = _getComputedProperty(et, _transformOriginProp) || '0', + ut, + ht, + dt, + pt, + mt, + gt, + yt, + bt, + vt, + xt, + kt, + St, + Tt, + At, + Et, + $t, + Dt, + jt, + Pt, + Ct, + wt, + It, + Ot, + Wt, + zt, + Ft, + Nt, + Ut, + Mt, + Ht, + en, + sn + return ( + (ut = ht = dt = gt = yt = bt = vt = xt = kt = 0), + (pt = mt = 1), + (rt.svg = !!(et.getCTM && _isSVG(et))), + lt.translate && + ((lt.translate !== 'none' || lt.scale !== 'none' || lt.rotate !== 'none') && + (it[_transformProp] = + (lt.translate !== 'none' + ? 'translate3d(' + (lt.translate + ' 0 0').split(' ').slice(0, 3).join(', ') + ') ' + : '') + + (lt.rotate !== 'none' ? 'rotate(' + lt.rotate + ') ' : '') + + (lt.scale !== 'none' ? 'scale(' + lt.scale.split(' ').join(',') + ') ' : '') + + (lt[_transformProp] !== 'none' ? lt[_transformProp] : '')), + (it.scale = it.rotate = it.translate = 'none')), + (At = _getMatrix(et, rt.svg)), + rt.svg && + (rt.uncache + ? ((zt = et.getBBox()), (ct = rt.xOrigin - zt.x + 'px ' + (rt.yOrigin - zt.y) + 'px'), (Wt = '')) + : (Wt = !nt && et.getAttribute('data-svg-origin')), + _applySVGOrigin(et, Wt || ct, !!Wt || rt.originIsAbsolute, rt.smooth !== !1, At)), + (St = rt.xOrigin || 0), + (Tt = rt.yOrigin || 0), + At !== _identity2DMatrix && + ((jt = At[0]), + (Pt = At[1]), + (Ct = At[2]), + (wt = At[3]), + (ut = It = At[4]), + (ht = Ot = At[5]), + At.length === 6 + ? ((pt = Math.sqrt(jt * jt + Pt * Pt)), + (mt = Math.sqrt(wt * wt + Ct * Ct)), + (gt = jt || Pt ? _atan2(Pt, jt) * _RAD2DEG : 0), + (vt = Ct || wt ? _atan2(Ct, wt) * _RAD2DEG + gt : 0), + vt && (mt *= Math.abs(Math.cos(vt * _DEG2RAD))), + rt.svg && ((ut -= St - (St * jt + Tt * Ct)), (ht -= Tt - (St * Pt + Tt * wt)))) + : ((sn = At[6]), + (Ht = At[7]), + (Nt = At[8]), + (Ut = At[9]), + (Mt = At[10]), + (en = At[11]), + (ut = At[12]), + (ht = At[13]), + (dt = At[14]), + (Et = _atan2(sn, Mt)), + (yt = Et * _RAD2DEG), + Et && + (($t = Math.cos(-Et)), + (Dt = Math.sin(-Et)), + (Wt = It * $t + Nt * Dt), + (zt = Ot * $t + Ut * Dt), + (Ft = sn * $t + Mt * Dt), + (Nt = It * -Dt + Nt * $t), + (Ut = Ot * -Dt + Ut * $t), + (Mt = sn * -Dt + Mt * $t), + (en = Ht * -Dt + en * $t), + (It = Wt), + (Ot = zt), + (sn = Ft)), + (Et = _atan2(-Ct, Mt)), + (bt = Et * _RAD2DEG), + Et && + (($t = Math.cos(-Et)), + (Dt = Math.sin(-Et)), + (Wt = jt * $t - Nt * Dt), + (zt = Pt * $t - Ut * Dt), + (Ft = Ct * $t - Mt * Dt), + (en = wt * Dt + en * $t), + (jt = Wt), + (Pt = zt), + (Ct = Ft)), + (Et = _atan2(Pt, jt)), + (gt = Et * _RAD2DEG), + Et && + (($t = Math.cos(Et)), + (Dt = Math.sin(Et)), + (Wt = jt * $t + Pt * Dt), + (zt = It * $t + Ot * Dt), + (Pt = Pt * $t - jt * Dt), + (Ot = Ot * $t - It * Dt), + (jt = Wt), + (It = zt)), + yt && Math.abs(yt) + Math.abs(gt) > 359.9 && ((yt = gt = 0), (bt = 180 - bt)), + (pt = _round(Math.sqrt(jt * jt + Pt * Pt + Ct * Ct))), + (mt = _round(Math.sqrt(Ot * Ot + sn * sn))), + (Et = _atan2(It, Ot)), + (vt = Math.abs(Et) > 2e-4 ? Et * _RAD2DEG : 0), + (kt = en ? 1 / (en < 0 ? -en : en) : 0)), + rt.svg && + ((Wt = et.getAttribute('transform')), + (rt.forceCSS = + et.setAttribute('transform', '') || !_isNullTransform(_getComputedProperty(et, _transformProp))), + Wt && et.setAttribute('transform', Wt))), + Math.abs(vt) > 90 && + Math.abs(vt) < 270 && + (ot + ? ((pt *= -1), (vt += gt <= 0 ? 180 : -180), (gt += gt <= 0 ? 180 : -180)) + : ((mt *= -1), (vt += vt <= 0 ? 180 : -180))), + (nt = nt || rt.uncache), + (rt.x = + ut - + ((rt.xPercent = + ut && ((!nt && rt.xPercent) || (Math.round(et.offsetWidth / 2) === Math.round(-ut) ? -50 : 0))) + ? (et.offsetWidth * rt.xPercent) / 100 + : 0) + + at), + (rt.y = + ht - + ((rt.yPercent = + ht && ((!nt && rt.yPercent) || (Math.round(et.offsetHeight / 2) === Math.round(-ht) ? -50 : 0))) + ? (et.offsetHeight * rt.yPercent) / 100 + : 0) + + at), + (rt.z = dt + at), + (rt.scaleX = _round(pt)), + (rt.scaleY = _round(mt)), + (rt.rotation = _round(gt) + st), + (rt.rotationX = _round(yt) + st), + (rt.rotationY = _round(bt) + st), + (rt.skewX = vt + st), + (rt.skewY = xt + st), + (rt.transformPerspective = kt + at), + (rt.zOrigin = parseFloat(ct.split(' ')[2]) || 0) && (it[_transformOriginProp] = _firstTwoOnly(ct)), + (rt.xOffset = rt.yOffset = 0), + (rt.force3D = _config.force3D), + (rt.renderTransform = rt.svg + ? _renderSVGTransforms + : _supports3D + ? _renderCSSTransforms + : _renderNon3DTransforms), + (rt.uncache = 0), + rt + ) + }, + _firstTwoOnly = function (et) { + return (et = et.split(' '))[0] + ' ' + et[1] + }, + _addPxTranslate = function (et, nt, rt) { + var it = getUnit(nt) + return _round(parseFloat(nt) + parseFloat(_convertToUnit(et, 'x', rt + 'px', it))) + it + }, + _renderNon3DTransforms = function (et, nt) { + ;(nt.z = '0px'), (nt.rotationY = nt.rotationX = '0deg'), (nt.force3D = 0), _renderCSSTransforms(et, nt) + }, + _zeroDeg = '0deg', + _zeroPx = '0px', + _endParenthesis = ') ', + _renderCSSTransforms = function (et, nt) { + var rt = nt || this, + it = rt.xPercent, + ot = rt.yPercent, + at = rt.x, + st = rt.y, + lt = rt.z, + ct = rt.rotation, + ut = rt.rotationY, + ht = rt.rotationX, + dt = rt.skewX, + pt = rt.skewY, + mt = rt.scaleX, + gt = rt.scaleY, + yt = rt.transformPerspective, + bt = rt.force3D, + vt = rt.target, + xt = rt.zOrigin, + kt = '', + St = (bt === 'auto' && et && et !== 1) || bt === !0 + if (xt && (ht !== _zeroDeg || ut !== _zeroDeg)) { + var Tt = parseFloat(ut) * _DEG2RAD, + At = Math.sin(Tt), + Et = Math.cos(Tt), + $t + ;(Tt = parseFloat(ht) * _DEG2RAD), + ($t = Math.cos(Tt)), + (at = _addPxTranslate(vt, at, At * $t * -xt)), + (st = _addPxTranslate(vt, st, -Math.sin(Tt) * -xt)), + (lt = _addPxTranslate(vt, lt, Et * $t * -xt + xt)) + } + yt !== _zeroPx && (kt += 'perspective(' + yt + _endParenthesis), + (it || ot) && (kt += 'translate(' + it + '%, ' + ot + '%) '), + (St || at !== _zeroPx || st !== _zeroPx || lt !== _zeroPx) && + (kt += + lt !== _zeroPx || St + ? 'translate3d(' + at + ', ' + st + ', ' + lt + ') ' + : 'translate(' + at + ', ' + st + _endParenthesis), + ct !== _zeroDeg && (kt += 'rotate(' + ct + _endParenthesis), + ut !== _zeroDeg && (kt += 'rotateY(' + ut + _endParenthesis), + ht !== _zeroDeg && (kt += 'rotateX(' + ht + _endParenthesis), + (dt !== _zeroDeg || pt !== _zeroDeg) && (kt += 'skew(' + dt + ', ' + pt + _endParenthesis), + (mt !== 1 || gt !== 1) && (kt += 'scale(' + mt + ', ' + gt + _endParenthesis), + (vt.style[_transformProp] = kt || 'translate(0, 0)') + }, + _renderSVGTransforms = function (et, nt) { + var rt = nt || this, + it = rt.xPercent, + ot = rt.yPercent, + at = rt.x, + st = rt.y, + lt = rt.rotation, + ct = rt.skewX, + ut = rt.skewY, + ht = rt.scaleX, + dt = rt.scaleY, + pt = rt.target, + mt = rt.xOrigin, + gt = rt.yOrigin, + yt = rt.xOffset, + bt = rt.yOffset, + vt = rt.forceCSS, + xt = parseFloat(at), + kt = parseFloat(st), + St, + Tt, + At, + Et, + $t + ;(lt = parseFloat(lt)), + (ct = parseFloat(ct)), + (ut = parseFloat(ut)), + ut && ((ut = parseFloat(ut)), (ct += ut), (lt += ut)), + lt || ct + ? ((lt *= _DEG2RAD), + (ct *= _DEG2RAD), + (St = Math.cos(lt) * ht), + (Tt = Math.sin(lt) * ht), + (At = Math.sin(lt - ct) * -dt), + (Et = Math.cos(lt - ct) * dt), + ct && + ((ut *= _DEG2RAD), + ($t = Math.tan(ct - ut)), + ($t = Math.sqrt(1 + $t * $t)), + (At *= $t), + (Et *= $t), + ut && (($t = Math.tan(ut)), ($t = Math.sqrt(1 + $t * $t)), (St *= $t), (Tt *= $t))), + (St = _round(St)), + (Tt = _round(Tt)), + (At = _round(At)), + (Et = _round(Et))) + : ((St = ht), (Et = dt), (Tt = At = 0)), + ((xt && !~(at + '').indexOf('px')) || (kt && !~(st + '').indexOf('px'))) && + ((xt = _convertToUnit(pt, 'x', at, 'px')), (kt = _convertToUnit(pt, 'y', st, 'px'))), + (mt || gt || yt || bt) && + ((xt = _round(xt + mt - (mt * St + gt * At) + yt)), (kt = _round(kt + gt - (mt * Tt + gt * Et) + bt))), + (it || ot) && + (($t = pt.getBBox()), (xt = _round(xt + (it / 100) * $t.width)), (kt = _round(kt + (ot / 100) * $t.height))), + ($t = 'matrix(' + St + ',' + Tt + ',' + At + ',' + Et + ',' + xt + ',' + kt + ')'), + pt.setAttribute('transform', $t), + vt && (pt.style[_transformProp] = $t) + }, + _addRotationalPropTween = function (et, nt, rt, it, ot) { + var at = 360, + st = _isString$1(ot), + lt = parseFloat(ot) * (st && ~ot.indexOf('rad') ? _RAD2DEG : 1), + ct = lt - it, + ut = it + ct + 'deg', + ht, + dt + return ( + st && + ((ht = ot.split('_')[1]), + ht === 'short' && ((ct %= at), ct !== ct % (at / 2) && (ct += ct < 0 ? at : -at)), + ht === 'cw' && ct < 0 + ? (ct = ((ct + at * _bigNum) % at) - ~~(ct / at) * at) + : ht === 'ccw' && ct > 0 && (ct = ((ct - at * _bigNum) % at) - ~~(ct / at) * at)), + (et._pt = dt = new PropTween(et._pt, nt, rt, it, ct, _renderPropWithEnd)), + (dt.e = ut), + (dt.u = 'deg'), + et._props.push(rt), + dt + ) + }, + _assign = function (et, nt) { + for (var rt in nt) et[rt] = nt[rt] + return et + }, + _addRawTransformPTs = function (et, nt, rt) { + var it = _assign({}, rt._gsap), + ot = 'perspective,force3D,transformOrigin,svgOrigin', + at = rt.style, + st, + lt, + ct, + ut, + ht, + dt, + pt, + mt + it.svg + ? ((ct = rt.getAttribute('transform')), + rt.setAttribute('transform', ''), + (at[_transformProp] = nt), + (st = _parseTransform(rt, 1)), + _removeProperty(rt, _transformProp), + rt.setAttribute('transform', ct)) + : ((ct = getComputedStyle(rt)[_transformProp]), + (at[_transformProp] = nt), + (st = _parseTransform(rt, 1)), + (at[_transformProp] = ct)) + for (lt in _transformProps) + (ct = it[lt]), + (ut = st[lt]), + ct !== ut && + ot.indexOf(lt) < 0 && + ((pt = getUnit(ct)), + (mt = getUnit(ut)), + (ht = pt !== mt ? _convertToUnit(rt, lt, ct, mt) : parseFloat(ct)), + (dt = parseFloat(ut)), + (et._pt = new PropTween(et._pt, st, lt, ht, dt - ht, _renderCSSProp)), + (et._pt.u = mt || 0), + et._props.push(lt)) + _assign(st, it) + } + _forEachName('padding,margin,Width,Radius', function (tt, et) { + var nt = 'Top', + rt = 'Right', + it = 'Bottom', + ot = 'Left', + at = (et < 3 ? [nt, rt, it, ot] : [nt + ot, nt + rt, it + rt, it + ot]).map(function (st) { + return et < 2 ? tt + st : 'border' + st + tt + }) + _specialProps[et > 1 ? 'border' + tt : tt] = function (st, lt, ct, ut, ht) { + var dt, pt + if (arguments.length < 4) + return ( + (dt = at.map(function (mt) { + return _get$1(st, mt, ct) + })), + (pt = dt.join(' ')), + pt.split(dt[0]).length === 5 ? dt[0] : pt + ) + ;(dt = (ut + '').split(' ')), + (pt = {}), + at.forEach(function (mt, gt) { + return (pt[mt] = dt[gt] = dt[gt] || dt[((gt - 1) / 2) | 0]) + }), + st.init(lt, pt, ht) + } + }) + var CSSPlugin = { + name: 'css', + register: _initCore, + targetTest: function (et) { + return et.style && et.nodeType + }, + init: function (et, nt, rt, it, ot) { + var at = this._props, + st = et.style, + lt = rt.vars.startAt, + ct, + ut, + ht, + dt, + pt, + mt, + gt, + yt, + bt, + vt, + xt, + kt, + St, + Tt, + At, + Et + _pluginInitted || _initCore(), + (this.styles = this.styles || _getStyleSaver(et)), + (Et = this.styles.props), + (this.tween = rt) + for (gt in nt) + if (gt !== 'autoRound' && ((ut = nt[gt]), !(_plugins[gt] && _checkPlugin(gt, nt, rt, it, et, ot)))) { + if ( + ((pt = typeof ut), + (mt = _specialProps[gt]), + pt === 'function' && ((ut = ut.call(rt, it, et, ot)), (pt = typeof ut)), + pt === 'string' && ~ut.indexOf('random(') && (ut = _replaceRandom(ut)), + mt) + ) + mt(this, et, gt, ut, rt) && (At = 1) + else if (gt.substr(0, 2) === '--') + (ct = (getComputedStyle(et).getPropertyValue(gt) + '').trim()), + (ut += ''), + (_colorExp.lastIndex = 0), + _colorExp.test(ct) || ((yt = getUnit(ct)), (bt = getUnit(ut))), + bt ? yt !== bt && (ct = _convertToUnit(et, gt, ct, bt) + bt) : yt && (ut += yt), + this.add(st, 'setProperty', ct, ut, it, ot, 0, 0, gt), + at.push(gt), + Et.push(gt, 0, st[gt]) + else if (pt !== 'undefined') { + if ( + (lt && gt in lt + ? ((ct = typeof lt[gt] == 'function' ? lt[gt].call(rt, it, et, ot) : lt[gt]), + _isString$1(ct) && ~ct.indexOf('random(') && (ct = _replaceRandom(ct)), + getUnit(ct + '') || (ct += _config.units[gt] || getUnit(_get$1(et, gt)) || ''), + (ct + '').charAt(1) === '=' && (ct = _get$1(et, gt))) + : (ct = _get$1(et, gt)), + (dt = parseFloat(ct)), + (vt = pt === 'string' && ut.charAt(1) === '=' && ut.substr(0, 2)), + vt && (ut = ut.substr(2)), + (ht = parseFloat(ut)), + gt in _propertyAliases && + (gt === 'autoAlpha' && + (dt === 1 && _get$1(et, 'visibility') === 'hidden' && ht && (dt = 0), + Et.push('visibility', 0, st.visibility), + _addNonTweeningPT(this, st, 'visibility', dt ? 'inherit' : 'hidden', ht ? 'inherit' : 'hidden', !ht)), + gt !== 'scale' && + gt !== 'transform' && + ((gt = _propertyAliases[gt]), ~gt.indexOf(',') && (gt = gt.split(',')[0]))), + (xt = gt in _transformProps), + xt) + ) { + if ( + (this.styles.save(gt), + kt || + ((St = et._gsap), + (St.renderTransform && !nt.parseTransform) || _parseTransform(et, nt.parseTransform), + (Tt = nt.smoothOrigin !== !1 && St.smooth), + (kt = this._pt = new PropTween(this._pt, st, _transformProp, 0, 1, St.renderTransform, St, 0, -1)), + (kt.dep = 1)), + gt === 'scale') + ) + (this._pt = new PropTween( + this._pt, + St, + 'scaleY', + St.scaleY, + (vt ? _parseRelative(St.scaleY, vt + ht) : ht) - St.scaleY || 0, + _renderCSSProp, + )), + (this._pt.u = 0), + at.push('scaleY', gt), + (gt += 'X') + else if (gt === 'transformOrigin') { + Et.push(_transformOriginProp, 0, st[_transformOriginProp]), + (ut = _convertKeywordsToPercentages(ut)), + St.svg + ? _applySVGOrigin(et, ut, 0, Tt, 0, this) + : ((bt = parseFloat(ut.split(' ')[2]) || 0), + bt !== St.zOrigin && _addNonTweeningPT(this, St, 'zOrigin', St.zOrigin, bt), + _addNonTweeningPT(this, st, gt, _firstTwoOnly(ct), _firstTwoOnly(ut))) + continue + } else if (gt === 'svgOrigin') { + _applySVGOrigin(et, ut, 1, Tt, 0, this) + continue + } else if (gt in _rotationalProperties) { + _addRotationalPropTween(this, St, gt, dt, vt ? _parseRelative(dt, vt + ut) : ut) + continue + } else if (gt === 'smoothOrigin') { + _addNonTweeningPT(this, St, 'smooth', St.smooth, ut) + continue + } else if (gt === 'force3D') { + St[gt] = ut + continue + } else if (gt === 'transform') { + _addRawTransformPTs(this, ut, et) + continue + } + } else gt in st || (gt = _checkPropPrefix(gt) || gt) + if (xt || ((ht || ht === 0) && (dt || dt === 0) && !_complexExp.test(ut) && gt in st)) + (yt = (ct + '').substr((dt + '').length)), + ht || (ht = 0), + (bt = getUnit(ut) || (gt in _config.units ? _config.units[gt] : yt)), + yt !== bt && (dt = _convertToUnit(et, gt, ct, bt)), + (this._pt = new PropTween( + this._pt, + xt ? St : st, + gt, + dt, + (vt ? _parseRelative(dt, vt + ht) : ht) - dt, + !xt && (bt === 'px' || gt === 'zIndex') && nt.autoRound !== !1 + ? _renderRoundedCSSProp + : _renderCSSProp, + )), + (this._pt.u = bt || 0), + yt !== bt && bt !== '%' && ((this._pt.b = ct), (this._pt.r = _renderCSSPropWithBeginning)) + else if (gt in st) _tweenComplexCSSString.call(this, et, gt, ct, vt ? vt + ut : ut) + else if (gt in et) this.add(et, gt, ct || et[gt], vt ? vt + ut : ut, it, ot) + else if (gt !== 'parseTransform') { + _missingPlugin(gt, ut) + continue + } + xt || (gt in st ? Et.push(gt, 0, st[gt]) : Et.push(gt, 1, ct || et[gt])), at.push(gt) + } + } + At && _sortPropTweensByPriority(this) + }, + render: function (et, nt) { + if (nt.tween._time || !_reverting()) for (var rt = nt._pt; rt; ) rt.r(et, rt.d), (rt = rt._next) + else nt.styles.revert() + }, + get: _get$1, + aliases: _propertyAliases, + getSetter: function (et, nt, rt) { + var it = _propertyAliases[nt] + return ( + it && it.indexOf(',') < 0 && (nt = it), + nt in _transformProps && nt !== _transformOriginProp && (et._gsap.x || _get$1(et, 'x')) + ? rt && _recentSetterPlugin === rt + ? nt === 'scale' + ? _setterScale + : _setterTransform + : (_recentSetterPlugin = rt || {}) && (nt === 'scale' ? _setterScaleWithRender : _setterTransformWithRender) + : et.style && !_isUndefined(et.style[nt]) + ? _setterCSSStyle + : ~nt.indexOf('-') + ? _setterCSSProp + : _getSetter(et, nt) + ) + }, + core: { _removeProperty, _getMatrix }, + } + gsap.utils.checkPrefix = _checkPropPrefix + gsap.core.getStyleSaver = _getStyleSaver + ;(function (tt, et, nt, rt) { + var it = _forEachName(tt + ',' + et + ',' + nt, function (ot) { + _transformProps[ot] = 1 + }) + _forEachName(et, function (ot) { + ;(_config.units[ot] = 'deg'), (_rotationalProperties[ot] = 1) + }), + (_propertyAliases[it[13]] = tt + ',' + et), + _forEachName(rt, function (ot) { + var at = ot.split(':') + _propertyAliases[at[1]] = it[at[0]] + }) + })( + 'x,y,z,scale,scaleX,scaleY,xPercent,yPercent', + 'rotation,rotationX,rotationY,skewX,skewY', + 'transform,transformOrigin,svgOrigin,force3D,smoothOrigin,transformPerspective', + '0:translateX,1:translateY,2:translateZ,8:rotate,8:rotationZ,8:rotateZ,9:rotateX,10:rotateY', + ) + _forEachName('x,y,z,top,right,bottom,left,width,height,fontSize,padding,margin,perspective', function (tt) { + _config.units[tt] = 'px' + }) + gsap.registerPlugin(CSSPlugin) + var gsapWithCSS = gsap.registerPlugin(CSSPlugin) || gsap + gsapWithCSS.core.Tween + const createRoundedBoxGeometry = (tt, et, nt, rt, it) => { + const ot = new Shape$1(), + at = 1e-5 + ot.absarc(at, at, at, -Math.PI / 2, -Math.PI, !0), + ot.absarc(at, et - rt * 2, at, Math.PI, Math.PI / 2, !0), + ot.absarc(tt - rt * 2, et - rt * 2, at, Math.PI / 2, 0, !0), + ot.absarc(tt - rt * 2, at, at, 0, -Math.PI / 2, !0) + const st = new ExtrudeGeometry(ot, { + depth: nt - rt * 2, + bevelEnabled: !0, + bevelSegments: it, + steps: 2, + bevelSize: rt, + bevelThickness: rt, + curveSegments: it, + }) + st.center() + const lt = [], + ct = st.getAttribute('normal'), + ut = st.getAttribute('position') + for (let ht = 0; ht < ut.count; ht += 1) { + const dt = new Vector3(ct.getX(ht), ct.getY(ht), ct.getZ(ht)), + pt = new Vector3(ut.getX(ht), ut.getY(ht), ut.getZ(ht)) + let mt = 0, + gt = 0 + Math.abs(dt.y) > 0.9 + ? ((mt = pt.x / tt + 0.5), (gt = 1 - (pt.z / nt + 0.5))) + : Math.abs(dt.x) > 0.9 + ? ((mt = -pt.z / nt + 0.5), (gt = 1 - (-pt.y / et + 0.5))) + : Math.abs(dt.z) > 0.9 && ((mt = pt.x / tt + 0.5), (gt = 1 - (-pt.y / et + 0.5))), + lt.push(mt, gt) + } + return st.setAttribute('uv', new Float32BufferAttribute(lt, 2)), st + } + createRoundedBoxGeometry(10, 10, 10, 2, 10) + const boxGeometry = new BoxGeometry(10, 10, 10), + isMainTopic = (tt) => tt.node_type === 'topic' && (tt.scale || 1) > 5, + meshRenderLimit = 500, + meshRenderRadius = 800 + let nearbyNodeTimeout = null + const nearbyNodeTimeoutCycle = 500, + getNearbyNodeIds = (tt, et) => { + if (nearbyNodeTimeout) return null + nearbyNodeTimeout = setTimeout(() => { + nearbyNodeTimeout && (clearTimeout(nearbyNodeTimeout), (nearbyNodeTimeout = null)) + }, nearbyNodeTimeoutCycle) + const nt = [] + return ( + tt.forEach((it) => { + const ot = et.position.distanceTo(variableVector3$1.set(it.x, it.y, it.z)) + ot < meshRenderRadius && nt.push({ id: it.ref_id || '', distance: ot }) + }), + nt + .sort((it, ot) => it.distance - ot.distance) + .slice(0, meshRenderLimit) + .map((it) => it.id) + ) + }, + initialCameraPosition = new Vector3(5e3, 600, 1600), + arriveDistance = 100, + topicArriveDistance = 600, + selectionGraphDistance = 2e3, + selectionGraphCameraPosition = { x: 172.7392402058252, y: -239.04675366094037, z: -2e3 }, + version$1 = '14.8.49', + createExtendedExponentialRampToValueAutomationEvent = (tt, et, nt) => ({ + endTime: et, + insertTime: nt, + type: 'exponentialRampToValue', + value: tt, + }), + createExtendedLinearRampToValueAutomationEvent = (tt, et, nt) => ({ + endTime: et, + insertTime: nt, + type: 'linearRampToValue', + value: tt, + }), + createSetValueAutomationEvent = (tt, et) => ({ startTime: et, type: 'setValue', value: tt }), + createSetValueCurveAutomationEvent = (tt, et, nt) => ({ + duration: nt, + startTime: et, + type: 'setValueCurve', + values: tt, + }), + getTargetValueAtTime = (tt, et, { startTime: nt, target: rt, timeConstant: it }) => + rt + (et - rt) * Math.exp((nt - tt) / it), + isExponentialRampToValueAutomationEvent = (tt) => tt.type === 'exponentialRampToValue', + isLinearRampToValueAutomationEvent = (tt) => tt.type === 'linearRampToValue', + isAnyRampToValueAutomationEvent = (tt) => + isExponentialRampToValueAutomationEvent(tt) || isLinearRampToValueAutomationEvent(tt), + isSetValueAutomationEvent = (tt) => tt.type === 'setValue', + isSetValueCurveAutomationEvent = (tt) => tt.type === 'setValueCurve', + getValueOfAutomationEventAtIndexAtTime = (tt, et, nt, rt) => { + const it = tt[et] + return it === void 0 + ? rt + : isAnyRampToValueAutomationEvent(it) || isSetValueAutomationEvent(it) + ? it.value + : isSetValueCurveAutomationEvent(it) + ? it.values[it.values.length - 1] + : getTargetValueAtTime(nt, getValueOfAutomationEventAtIndexAtTime(tt, et - 1, it.startTime, rt), it) + }, + getEndTimeAndValueOfPreviousAutomationEvent = (tt, et, nt, rt, it) => + nt === void 0 + ? [rt.insertTime, it] + : isAnyRampToValueAutomationEvent(nt) + ? [nt.endTime, nt.value] + : isSetValueAutomationEvent(nt) + ? [nt.startTime, nt.value] + : isSetValueCurveAutomationEvent(nt) + ? [nt.startTime + nt.duration, nt.values[nt.values.length - 1]] + : [nt.startTime, getValueOfAutomationEventAtIndexAtTime(tt, et - 1, nt.startTime, it)], + isCancelAndHoldAutomationEvent = (tt) => tt.type === 'cancelAndHold', + isCancelScheduledValuesAutomationEvent = (tt) => tt.type === 'cancelScheduledValues', + getEventTime = (tt) => + isCancelAndHoldAutomationEvent(tt) || isCancelScheduledValuesAutomationEvent(tt) + ? tt.cancelTime + : isExponentialRampToValueAutomationEvent(tt) || isLinearRampToValueAutomationEvent(tt) + ? tt.endTime + : tt.startTime, + getExponentialRampValueAtTime = (tt, et, nt, { endTime: rt, value: it }) => + nt === it ? it : (0 < nt && 0 < it) || (nt < 0 && it < 0) ? nt * (it / nt) ** ((tt - et) / (rt - et)) : 0, + getLinearRampValueAtTime = (tt, et, nt, { endTime: rt, value: it }) => nt + ((tt - et) / (rt - et)) * (it - nt), + interpolateValue = (tt, et) => { + const nt = Math.floor(et), + rt = Math.ceil(et) + return nt === rt ? tt[nt] : (1 - (et - nt)) * tt[nt] + (1 - (rt - et)) * tt[rt] + }, + getValueCurveValueAtTime = (tt, { duration: et, startTime: nt, values: rt }) => { + const it = ((tt - nt) / et) * (rt.length - 1) + return interpolateValue(rt, it) + }, + isSetTargetAutomationEvent = (tt) => tt.type === 'setTarget' + class AutomationEventList { + constructor(et) { + ;(this._automationEvents = []), (this._currenTime = 0), (this._defaultValue = et) + } + [Symbol.iterator]() { + return this._automationEvents[Symbol.iterator]() + } + add(et) { + const nt = getEventTime(et) + if (isCancelAndHoldAutomationEvent(et) || isCancelScheduledValuesAutomationEvent(et)) { + const rt = this._automationEvents.findIndex((ot) => + isCancelScheduledValuesAutomationEvent(et) && isSetValueCurveAutomationEvent(ot) + ? ot.startTime + ot.duration >= nt + : getEventTime(ot) >= nt, + ), + it = this._automationEvents[rt] + if ( + (rt !== -1 && (this._automationEvents = this._automationEvents.slice(0, rt)), + isCancelAndHoldAutomationEvent(et)) + ) { + const ot = this._automationEvents[this._automationEvents.length - 1] + if (it !== void 0 && isAnyRampToValueAutomationEvent(it)) { + if (ot !== void 0 && isSetTargetAutomationEvent(ot)) throw new Error('The internal list is malformed.') + const at = + ot === void 0 + ? it.insertTime + : isSetValueCurveAutomationEvent(ot) + ? ot.startTime + ot.duration + : getEventTime(ot), + st = + ot === void 0 + ? this._defaultValue + : isSetValueCurveAutomationEvent(ot) + ? ot.values[ot.values.length - 1] + : ot.value, + lt = isExponentialRampToValueAutomationEvent(it) + ? getExponentialRampValueAtTime(nt, at, st, it) + : getLinearRampValueAtTime(nt, at, st, it), + ct = isExponentialRampToValueAutomationEvent(it) + ? createExtendedExponentialRampToValueAutomationEvent(lt, nt, this._currenTime) + : createExtendedLinearRampToValueAutomationEvent(lt, nt, this._currenTime) + this._automationEvents.push(ct) + } + if ( + (ot !== void 0 && + isSetTargetAutomationEvent(ot) && + this._automationEvents.push(createSetValueAutomationEvent(this.getValue(nt), nt)), + ot !== void 0 && isSetValueCurveAutomationEvent(ot) && ot.startTime + ot.duration > nt) + ) { + const at = nt - ot.startTime, + st = (ot.values.length - 1) / ot.duration, + lt = Math.max(2, 1 + Math.ceil(at * st)), + ct = (at / (lt - 1)) * st, + ut = ot.values.slice(0, lt) + if (ct < 1) + for (let ht = 1; ht < lt; ht += 1) { + const dt = (ct * ht) % 1 + ut[ht] = ot.values[ht - 1] * (1 - dt) + ot.values[ht] * dt + } + this._automationEvents[this._automationEvents.length - 1] = createSetValueCurveAutomationEvent( + ut, + ot.startTime, + at, + ) + } + } + } else { + const rt = this._automationEvents.findIndex((at) => getEventTime(at) > nt), + it = rt === -1 ? this._automationEvents[this._automationEvents.length - 1] : this._automationEvents[rt - 1] + if (it !== void 0 && isSetValueCurveAutomationEvent(it) && getEventTime(it) + it.duration > nt) return !1 + const ot = isExponentialRampToValueAutomationEvent(et) + ? createExtendedExponentialRampToValueAutomationEvent(et.value, et.endTime, this._currenTime) + : isLinearRampToValueAutomationEvent(et) + ? createExtendedLinearRampToValueAutomationEvent(et.value, nt, this._currenTime) + : et + if (rt === -1) this._automationEvents.push(ot) + else { + if (isSetValueCurveAutomationEvent(et) && nt + et.duration > getEventTime(this._automationEvents[rt])) + return !1 + this._automationEvents.splice(rt, 0, ot) + } + } + return !0 + } + flush(et) { + const nt = this._automationEvents.findIndex((rt) => getEventTime(rt) > et) + if (nt > 1) { + const rt = this._automationEvents.slice(nt - 1), + it = rt[0] + isSetTargetAutomationEvent(it) && + rt.unshift( + createSetValueAutomationEvent( + getValueOfAutomationEventAtIndexAtTime(this._automationEvents, nt - 2, it.startTime, this._defaultValue), + it.startTime, + ), + ), + (this._automationEvents = rt) + } + } + getValue(et) { + if (this._automationEvents.length === 0) return this._defaultValue + const nt = this._automationEvents.findIndex((at) => getEventTime(at) > et), + rt = this._automationEvents[nt], + it = (nt === -1 ? this._automationEvents.length : nt) - 1, + ot = this._automationEvents[it] + if ( + ot !== void 0 && + isSetTargetAutomationEvent(ot) && + (rt === void 0 || !isAnyRampToValueAutomationEvent(rt) || rt.insertTime > et) + ) + return getTargetValueAtTime( + et, + getValueOfAutomationEventAtIndexAtTime(this._automationEvents, it - 1, ot.startTime, this._defaultValue), + ot, + ) + if (ot !== void 0 && isSetValueAutomationEvent(ot) && (rt === void 0 || !isAnyRampToValueAutomationEvent(rt))) + return ot.value + if ( + ot !== void 0 && + isSetValueCurveAutomationEvent(ot) && + (rt === void 0 || !isAnyRampToValueAutomationEvent(rt) || ot.startTime + ot.duration > et) + ) + return et < ot.startTime + ot.duration ? getValueCurveValueAtTime(et, ot) : ot.values[ot.values.length - 1] + if ( + ot !== void 0 && + isAnyRampToValueAutomationEvent(ot) && + (rt === void 0 || !isAnyRampToValueAutomationEvent(rt)) + ) + return ot.value + if (rt !== void 0 && isExponentialRampToValueAutomationEvent(rt)) { + const [at, st] = getEndTimeAndValueOfPreviousAutomationEvent( + this._automationEvents, + it, + ot, + rt, + this._defaultValue, + ) + return getExponentialRampValueAtTime(et, at, st, rt) + } + if (rt !== void 0 && isLinearRampToValueAutomationEvent(rt)) { + const [at, st] = getEndTimeAndValueOfPreviousAutomationEvent( + this._automationEvents, + it, + ot, + rt, + this._defaultValue, + ) + return getLinearRampValueAtTime(et, at, st, rt) + } + return this._defaultValue + } + } + const createCancelAndHoldAutomationEvent = (tt) => ({ cancelTime: tt, type: 'cancelAndHold' }), + createCancelScheduledValuesAutomationEvent = (tt) => ({ cancelTime: tt, type: 'cancelScheduledValues' }), + createExponentialRampToValueAutomationEvent = (tt, et) => ({ + endTime: et, + type: 'exponentialRampToValue', + value: tt, + }), + createLinearRampToValueAutomationEvent = (tt, et) => ({ endTime: et, type: 'linearRampToValue', value: tt }), + createSetTargetAutomationEvent = (tt, et, nt) => ({ + startTime: et, + target: tt, + timeConstant: nt, + type: 'setTarget', + }), + createAbortError = () => new DOMException('', 'AbortError'), + createAddActiveInputConnectionToAudioNode = + (tt) => + (et, nt, [rt, it, ot], at) => { + tt(et[it], [nt, rt, ot], (st) => st[0] === nt && st[1] === rt, at) + }, + createAddAudioNodeConnections = (tt) => (et, nt, rt) => { + const it = [] + for (let ot = 0; ot < rt.numberOfInputs; ot += 1) it.push(new Set()) + tt.set(et, { activeInputs: it, outputs: new Set(), passiveInputs: new WeakMap(), renderer: nt }) + }, + createAddAudioParamConnections = (tt) => (et, nt) => { + tt.set(et, { activeInputs: new Set(), passiveInputs: new WeakMap(), renderer: nt }) + }, + ACTIVE_AUDIO_NODE_STORE = new WeakSet(), + AUDIO_NODE_CONNECTIONS_STORE = new WeakMap(), + AUDIO_NODE_STORE = new WeakMap(), + AUDIO_PARAM_CONNECTIONS_STORE = new WeakMap(), + AUDIO_PARAM_STORE = new WeakMap(), + CONTEXT_STORE = new WeakMap(), + EVENT_LISTENERS = new WeakMap(), + CYCLE_COUNTERS = new WeakMap(), + NODE_NAME_TO_PROCESSOR_CONSTRUCTOR_MAPS = new WeakMap(), + NODE_TO_PROCESSOR_MAPS = new WeakMap(), + handler = { + construct() { + return handler + }, + }, + isConstructible = (tt) => { + try { + const et = new Proxy(tt, handler) + new et() + } catch { + return !1 + } + return !0 + }, + IMPORT_STATEMENT_REGEX = + /^import(?:(?:[\s]+[\w]+|(?:[\s]+[\w]+[\s]*,)?[\s]*\{[\s]*[\w]+(?:[\s]+as[\s]+[\w]+)?(?:[\s]*,[\s]*[\w]+(?:[\s]+as[\s]+[\w]+)?)*[\s]*}|(?:[\s]+[\w]+[\s]*,)?[\s]*\*[\s]+as[\s]+[\w]+)[\s]+from)?(?:[\s]*)("([^"\\]|\\.)+"|'([^'\\]|\\.)+')(?:[\s]*);?/, + splitImportStatements = (tt, et) => { + const nt = [] + let rt = tt.replace(/^[\s]+/, ''), + it = rt.match(IMPORT_STATEMENT_REGEX) + for (; it !== null; ) { + const ot = it[1].slice(1, -1), + at = it[0].replace(/([\s]+)?;?$/, '').replace(ot, new URL(ot, et).toString()) + nt.push(at), (rt = rt.slice(it[0].length).replace(/^[\s]+/, '')), (it = rt.match(IMPORT_STATEMENT_REGEX)) + } + return [nt.join(';'), rt] + }, + verifyParameterDescriptors = (tt) => { + if (tt !== void 0 && !Array.isArray(tt)) + throw new TypeError('The parameterDescriptors property of given value for processorCtor is not an array.') + }, + verifyProcessorCtor = (tt) => { + if (!isConstructible(tt)) throw new TypeError('The given value for processorCtor should be a constructor.') + if (tt.prototype === null || typeof tt.prototype != 'object') + throw new TypeError('The given value for processorCtor should have a prototype.') + }, + createAddAudioWorkletModule = (tt, et, nt, rt, it, ot, at, st, lt, ct, ut, ht, dt) => { + let pt = 0 + return (mt, gt, yt = { credentials: 'omit' }) => { + const bt = ut.get(mt) + if (bt !== void 0 && bt.has(gt)) return Promise.resolve() + const vt = ct.get(mt) + if (vt !== void 0) { + const St = vt.get(gt) + if (St !== void 0) return St + } + const xt = ot(mt), + kt = + xt.audioWorklet === void 0 + ? it(gt) + .then(([St, Tt]) => { + const [At, Et] = splitImportStatements(St, Tt), + $t = `${At};((a,b)=>{(a[b]=a[b]||[]).push((AudioWorkletProcessor,global,registerProcessor,sampleRate,self,window)=>{${Et} +})})(window,'_AWGS')` + return nt($t) + }) + .then(() => { + const St = dt._AWGS.pop() + if (St === void 0) throw new SyntaxError() + rt(xt.currentTime, xt.sampleRate, () => + St( + class {}, + void 0, + (Tt, At) => { + if (Tt.trim() === '') throw et() + const Et = NODE_NAME_TO_PROCESSOR_CONSTRUCTOR_MAPS.get(xt) + if (Et !== void 0) { + if (Et.has(Tt)) throw et() + verifyProcessorCtor(At), verifyParameterDescriptors(At.parameterDescriptors), Et.set(Tt, At) + } else + verifyProcessorCtor(At), + verifyParameterDescriptors(At.parameterDescriptors), + NODE_NAME_TO_PROCESSOR_CONSTRUCTOR_MAPS.set(xt, new Map([[Tt, At]])) + }, + xt.sampleRate, + void 0, + void 0, + ), + ) + }) + : Promise.all([it(gt), Promise.resolve(tt(ht, ht))]).then(([[St, Tt], At]) => { + const Et = pt + 1 + pt = Et + const [$t, Dt] = splitImportStatements(St, Tt), + wt = `${$t};((AudioWorkletProcessor,registerProcessor)=>{${Dt} +})(${ + At + ? 'AudioWorkletProcessor' + : 'class extends AudioWorkletProcessor {__b=new WeakSet();constructor(){super();(p=>p.postMessage=(q=>(m,t)=>q.call(p,m,t?t.filter(u=>!this.__b.has(u)):t))(p.postMessage))(this.port)}}' + },(n,p)=>registerProcessor(n,class extends p{${ + At ? '' : '__c = (a) => a.forEach(e=>this.__b.add(e.buffer));' + }process(i,o,p){${ + At ? '' : 'i.forEach(this.__c);o.forEach(this.__c);this.__c(Object.values(p));' + }return super.process(i.map(j=>j.some(k=>k.length===0)?[]:j),o,p)}}));registerProcessor('__sac${Et}',class extends AudioWorkletProcessor{process(){return !1}})`, + It = new Blob([wt], { type: 'application/javascript; charset=utf-8' }), + Ot = URL.createObjectURL(It) + return xt.audioWorklet + .addModule(Ot, yt) + .then(() => { + if (st(xt)) return xt + const Wt = at(xt) + return Wt.audioWorklet.addModule(Ot, yt).then(() => Wt) + }) + .then((Wt) => { + if (lt === null) throw new SyntaxError() + try { + new lt(Wt, `__sac${Et}`) + } catch { + throw new SyntaxError() + } + }) + .finally(() => URL.revokeObjectURL(Ot)) + }) + return ( + vt === void 0 ? ct.set(mt, new Map([[gt, kt]])) : vt.set(gt, kt), + kt + .then(() => { + const St = ut.get(mt) + St === void 0 ? ut.set(mt, new Set([gt])) : St.add(gt) + }) + .finally(() => { + const St = ct.get(mt) + St !== void 0 && St.delete(gt) + }), + kt + ) + } + }, + getValueForKey = (tt, et) => { + const nt = tt.get(et) + if (nt === void 0) throw new Error('A value with the given key could not be found.') + return nt + }, + pickElementFromSet = (tt, et) => { + const nt = Array.from(tt).filter(et) + if (nt.length > 1) throw Error('More than one element was found.') + if (nt.length === 0) throw Error('No element was found.') + const [rt] = nt + return tt.delete(rt), rt + }, + deletePassiveInputConnectionToAudioNode = (tt, et, nt, rt) => { + const it = getValueForKey(tt, et), + ot = pickElementFromSet(it, (at) => at[0] === nt && at[1] === rt) + return it.size === 0 && tt.delete(et), ot + }, + getEventListenersOfAudioNode = (tt) => getValueForKey(EVENT_LISTENERS, tt), + setInternalStateToActive = (tt) => { + if (ACTIVE_AUDIO_NODE_STORE.has(tt)) throw new Error('The AudioNode is already stored.') + ACTIVE_AUDIO_NODE_STORE.add(tt), getEventListenersOfAudioNode(tt).forEach((et) => et(!0)) + }, + isAudioWorkletNode = (tt) => 'port' in tt, + setInternalStateToPassive = (tt) => { + if (!ACTIVE_AUDIO_NODE_STORE.has(tt)) throw new Error('The AudioNode is not stored.') + ACTIVE_AUDIO_NODE_STORE.delete(tt), getEventListenersOfAudioNode(tt).forEach((et) => et(!1)) + }, + setInternalStateToPassiveWhenNecessary = (tt, et) => { + !isAudioWorkletNode(tt) && et.every((nt) => nt.size === 0) && setInternalStateToPassive(tt) + }, + createAddConnectionToAudioNode = (tt, et, nt, rt, it, ot, at, st, lt, ct, ut, ht, dt) => { + const pt = new WeakMap() + return (mt, gt, yt, bt, vt) => { + const { activeInputs: xt, passiveInputs: kt } = ot(gt), + { outputs: St } = ot(mt), + Tt = st(mt), + At = (Et) => { + const $t = lt(gt), + Dt = lt(mt) + if (Et) { + const jt = deletePassiveInputConnectionToAudioNode(kt, mt, yt, bt) + tt(xt, mt, jt, !1), !vt && !ht(mt) && nt(Dt, $t, yt, bt), dt(gt) && setInternalStateToActive(gt) + } else { + const jt = rt(xt, mt, yt, bt) + et(kt, bt, jt, !1), !vt && !ht(mt) && it(Dt, $t, yt, bt) + const Pt = at(gt) + if (Pt === 0) ut(gt) && setInternalStateToPassiveWhenNecessary(gt, xt) + else { + const Ct = pt.get(gt) + Ct !== void 0 && clearTimeout(Ct), + pt.set( + gt, + setTimeout(() => { + ut(gt) && setInternalStateToPassiveWhenNecessary(gt, xt) + }, Pt * 1e3), + ) + } + } + } + return ct(St, [gt, yt, bt], (Et) => Et[0] === gt && Et[1] === yt && Et[2] === bt, !0) + ? (Tt.add(At), ut(mt) ? tt(xt, mt, [yt, bt, At], !0) : et(kt, bt, [mt, yt, At], !0), !0) + : !1 + } + }, + createAddPassiveInputConnectionToAudioNode = + (tt) => + (et, nt, [rt, it, ot], at) => { + const st = et.get(rt) + st === void 0 + ? et.set(rt, new Set([[it, nt, ot]])) + : tt(st, [it, nt, ot], (lt) => lt[0] === it && lt[1] === nt, at) + }, + createAddSilentConnection = (tt) => (et, nt) => { + const rt = tt(et, { channelCount: 1, channelCountMode: 'explicit', channelInterpretation: 'discrete', gain: 0 }) + nt.connect(rt).connect(et.destination) + const it = () => { + nt.removeEventListener('ended', it), nt.disconnect(rt), rt.disconnect() + } + nt.addEventListener('ended', it) + }, + createAddUnrenderedAudioWorkletNode = (tt) => (et, nt) => { + tt(et).add(nt) + }, + DEFAULT_OPTIONS$j = { + channelCount: 2, + channelCountMode: 'max', + channelInterpretation: 'speakers', + fftSize: 2048, + maxDecibels: -30, + minDecibels: -100, + smoothingTimeConstant: 0.8, + }, + createAnalyserNodeConstructor = (tt, et, nt, rt, it, ot) => + class extends tt { + constructor(st, lt) { + const ct = it(st), + ut = { ...DEFAULT_OPTIONS$j, ...lt }, + ht = rt(ct, ut), + dt = ot(ct) ? et() : null + super(st, !1, ht, dt), (this._nativeAnalyserNode = ht) + } + get fftSize() { + return this._nativeAnalyserNode.fftSize + } + set fftSize(st) { + this._nativeAnalyserNode.fftSize = st + } + get frequencyBinCount() { + return this._nativeAnalyserNode.frequencyBinCount + } + get maxDecibels() { + return this._nativeAnalyserNode.maxDecibels + } + set maxDecibels(st) { + const lt = this._nativeAnalyserNode.maxDecibels + if (((this._nativeAnalyserNode.maxDecibels = st), !(st > this._nativeAnalyserNode.minDecibels))) + throw ((this._nativeAnalyserNode.maxDecibels = lt), nt()) + } + get minDecibels() { + return this._nativeAnalyserNode.minDecibels + } + set minDecibels(st) { + const lt = this._nativeAnalyserNode.minDecibels + if (((this._nativeAnalyserNode.minDecibels = st), !(this._nativeAnalyserNode.maxDecibels > st))) + throw ((this._nativeAnalyserNode.minDecibels = lt), nt()) + } + get smoothingTimeConstant() { + return this._nativeAnalyserNode.smoothingTimeConstant + } + set smoothingTimeConstant(st) { + this._nativeAnalyserNode.smoothingTimeConstant = st + } + getByteFrequencyData(st) { + this._nativeAnalyserNode.getByteFrequencyData(st) + } + getByteTimeDomainData(st) { + this._nativeAnalyserNode.getByteTimeDomainData(st) + } + getFloatFrequencyData(st) { + this._nativeAnalyserNode.getFloatFrequencyData(st) + } + getFloatTimeDomainData(st) { + this._nativeAnalyserNode.getFloatTimeDomainData(st) + } + }, + isOwnedByContext = (tt, et) => tt.context === et, + createAnalyserNodeRendererFactory = (tt, et, nt) => () => { + const rt = new WeakMap(), + it = async (ot, at) => { + let st = et(ot) + if (!isOwnedByContext(st, at)) { + const ct = { + channelCount: st.channelCount, + channelCountMode: st.channelCountMode, + channelInterpretation: st.channelInterpretation, + fftSize: st.fftSize, + maxDecibels: st.maxDecibels, + minDecibels: st.minDecibels, + smoothingTimeConstant: st.smoothingTimeConstant, + } + st = tt(at, ct) + } + return rt.set(at, st), await nt(ot, at, st), st + } + return { + render(ot, at) { + const st = rt.get(at) + return st !== void 0 ? Promise.resolve(st) : it(ot, at) + }, + } + }, + testAudioBufferCopyChannelMethodsOutOfBoundsSupport = (tt) => { + try { + tt.copyToChannel(new Float32Array(1), 0, -1) + } catch { + return !1 + } + return !0 + }, + createIndexSizeError = () => new DOMException('', 'IndexSizeError'), + wrapAudioBufferGetChannelDataMethod = (tt) => { + tt.getChannelData = ((et) => (nt) => { + try { + return et.call(tt, nt) + } catch (rt) { + throw rt.code === 12 ? createIndexSizeError() : rt + } + })(tt.getChannelData) + }, + DEFAULT_OPTIONS$i = { numberOfChannels: 1 }, + createAudioBufferConstructor = (tt, et, nt, rt, it, ot, at, st) => { + let lt = null + return class ww { + constructor(ut) { + if (it === null) throw new Error('Missing the native OfflineAudioContext constructor.') + const { length: ht, numberOfChannels: dt, sampleRate: pt } = { ...DEFAULT_OPTIONS$i, ...ut } + lt === null && (lt = new it(1, 1, 44100)) + const mt = + rt !== null && et(ot, ot) + ? new rt({ length: ht, numberOfChannels: dt, sampleRate: pt }) + : lt.createBuffer(dt, ht, pt) + if (mt.numberOfChannels === 0) throw nt() + return ( + typeof mt.copyFromChannel != 'function' + ? (at(mt), wrapAudioBufferGetChannelDataMethod(mt)) + : et(testAudioBufferCopyChannelMethodsOutOfBoundsSupport, () => + testAudioBufferCopyChannelMethodsOutOfBoundsSupport(mt), + ) || st(mt), + tt.add(mt), + mt + ) + } + static [Symbol.hasInstance](ut) { + return (ut !== null && typeof ut == 'object' && Object.getPrototypeOf(ut) === ww.prototype) || tt.has(ut) + } + } + }, + MOST_NEGATIVE_SINGLE_FLOAT = -34028234663852886e22, + MOST_POSITIVE_SINGLE_FLOAT = -MOST_NEGATIVE_SINGLE_FLOAT, + isActiveAudioNode = (tt) => ACTIVE_AUDIO_NODE_STORE.has(tt), + DEFAULT_OPTIONS$h = { + buffer: null, + channelCount: 2, + channelCountMode: 'max', + channelInterpretation: 'speakers', + loop: !1, + loopEnd: 0, + loopStart: 0, + playbackRate: 1, + }, + createAudioBufferSourceNodeConstructor = (tt, et, nt, rt, it, ot, at, st) => + class extends tt { + constructor(ct, ut) { + const ht = ot(ct), + dt = { ...DEFAULT_OPTIONS$h, ...ut }, + pt = it(ht, dt), + mt = at(ht), + gt = mt ? et() : null + super(ct, !1, pt, gt), + (this._audioBufferSourceNodeRenderer = gt), + (this._isBufferNullified = !1), + (this._isBufferSet = dt.buffer !== null), + (this._nativeAudioBufferSourceNode = pt), + (this._onended = null), + (this._playbackRate = nt(this, mt, pt.playbackRate, MOST_POSITIVE_SINGLE_FLOAT, MOST_NEGATIVE_SINGLE_FLOAT)) + } + get buffer() { + return this._isBufferNullified ? null : this._nativeAudioBufferSourceNode.buffer + } + set buffer(ct) { + if (((this._nativeAudioBufferSourceNode.buffer = ct), ct !== null)) { + if (this._isBufferSet) throw rt() + this._isBufferSet = !0 + } + } + get loop() { + return this._nativeAudioBufferSourceNode.loop + } + set loop(ct) { + this._nativeAudioBufferSourceNode.loop = ct + } + get loopEnd() { + return this._nativeAudioBufferSourceNode.loopEnd + } + set loopEnd(ct) { + this._nativeAudioBufferSourceNode.loopEnd = ct + } + get loopStart() { + return this._nativeAudioBufferSourceNode.loopStart + } + set loopStart(ct) { + this._nativeAudioBufferSourceNode.loopStart = ct + } + get onended() { + return this._onended + } + set onended(ct) { + const ut = typeof ct == 'function' ? st(this, ct) : null + this._nativeAudioBufferSourceNode.onended = ut + const ht = this._nativeAudioBufferSourceNode.onended + this._onended = ht !== null && ht === ut ? ct : ht + } + get playbackRate() { + return this._playbackRate + } + start(ct = 0, ut = 0, ht) { + if ( + (this._nativeAudioBufferSourceNode.start(ct, ut, ht), + this._audioBufferSourceNodeRenderer !== null && + (this._audioBufferSourceNodeRenderer.start = ht === void 0 ? [ct, ut] : [ct, ut, ht]), + this.context.state !== 'closed') + ) { + setInternalStateToActive(this) + const dt = () => { + this._nativeAudioBufferSourceNode.removeEventListener('ended', dt), + isActiveAudioNode(this) && setInternalStateToPassive(this) + } + this._nativeAudioBufferSourceNode.addEventListener('ended', dt) + } + } + stop(ct = 0) { + this._nativeAudioBufferSourceNode.stop(ct), + this._audioBufferSourceNodeRenderer !== null && (this._audioBufferSourceNodeRenderer.stop = ct) + } + }, + createAudioBufferSourceNodeRendererFactory = (tt, et, nt, rt, it) => () => { + const ot = new WeakMap() + let at = null, + st = null + const lt = async (ct, ut) => { + let ht = nt(ct) + const dt = isOwnedByContext(ht, ut) + if (!dt) { + const pt = { + buffer: ht.buffer, + channelCount: ht.channelCount, + channelCountMode: ht.channelCountMode, + channelInterpretation: ht.channelInterpretation, + loop: ht.loop, + loopEnd: ht.loopEnd, + loopStart: ht.loopStart, + playbackRate: ht.playbackRate.value, + } + ;(ht = et(ut, pt)), at !== null && ht.start(...at), st !== null && ht.stop(st) + } + return ( + ot.set(ut, ht), + dt ? await tt(ut, ct.playbackRate, ht.playbackRate) : await rt(ut, ct.playbackRate, ht.playbackRate), + await it(ct, ut, ht), + ht + ) + } + return { + set start(ct) { + at = ct + }, + set stop(ct) { + st = ct + }, + render(ct, ut) { + const ht = ot.get(ut) + return ht !== void 0 ? Promise.resolve(ht) : lt(ct, ut) + }, + } + }, + isAudioBufferSourceNode = (tt) => 'playbackRate' in tt, + isBiquadFilterNode = (tt) => 'frequency' in tt && 'gain' in tt, + isConstantSourceNode = (tt) => 'offset' in tt, + isGainNode = (tt) => !('frequency' in tt) && 'gain' in tt, + isOscillatorNode = (tt) => 'detune' in tt && 'frequency' in tt, + isStereoPannerNode = (tt) => 'pan' in tt, + getAudioNodeConnections = (tt) => getValueForKey(AUDIO_NODE_CONNECTIONS_STORE, tt), + getAudioParamConnections = (tt) => getValueForKey(AUDIO_PARAM_CONNECTIONS_STORE, tt), + deactivateActiveAudioNodeInputConnections = (tt, et) => { + const { activeInputs: nt } = getAudioNodeConnections(tt) + nt.forEach((it) => + it.forEach(([ot]) => { + et.includes(tt) || deactivateActiveAudioNodeInputConnections(ot, [...et, tt]) + }), + ) + const rt = isAudioBufferSourceNode(tt) + ? [tt.playbackRate] + : isAudioWorkletNode(tt) + ? Array.from(tt.parameters.values()) + : isBiquadFilterNode(tt) + ? [tt.Q, tt.detune, tt.frequency, tt.gain] + : isConstantSourceNode(tt) + ? [tt.offset] + : isGainNode(tt) + ? [tt.gain] + : isOscillatorNode(tt) + ? [tt.detune, tt.frequency] + : isStereoPannerNode(tt) + ? [tt.pan] + : [] + for (const it of rt) { + const ot = getAudioParamConnections(it) + ot !== void 0 && ot.activeInputs.forEach(([at]) => deactivateActiveAudioNodeInputConnections(at, et)) + } + isActiveAudioNode(tt) && setInternalStateToPassive(tt) + }, + deactivateAudioGraph = (tt) => { + deactivateActiveAudioNodeInputConnections(tt.destination, []) + }, + isValidLatencyHint = (tt) => + tt === void 0 || + typeof tt == 'number' || + (typeof tt == 'string' && (tt === 'balanced' || tt === 'interactive' || tt === 'playback')), + createAudioContextConstructor = (tt, et, nt, rt, it, ot, at, st, lt) => + class extends tt { + constructor(ut = {}) { + if (lt === null) throw new Error('Missing the native AudioContext constructor.') + let ht + try { + ht = new lt(ut) + } catch (mt) { + throw mt.code === 12 && mt.message === 'sampleRate is not in range' ? nt() : mt + } + if (ht === null) throw rt() + if (!isValidLatencyHint(ut.latencyHint)) + throw new TypeError( + `The provided value '${ut.latencyHint}' is not a valid enum value of type AudioContextLatencyCategory.`, + ) + if (ut.sampleRate !== void 0 && ht.sampleRate !== ut.sampleRate) throw nt() + super(ht, 2) + const { latencyHint: dt } = ut, + { sampleRate: pt } = ht + if ( + ((this._baseLatency = + typeof ht.baseLatency == 'number' + ? ht.baseLatency + : dt === 'balanced' + ? 512 / pt + : dt === 'interactive' || dt === void 0 + ? 256 / pt + : dt === 'playback' + ? 1024 / pt + : (Math.max(2, Math.min(128, Math.round((dt * pt) / 128))) * 128) / pt), + (this._nativeAudioContext = ht), + lt.name === 'webkitAudioContext' + ? ((this._nativeGainNode = ht.createGain()), + (this._nativeOscillatorNode = ht.createOscillator()), + (this._nativeGainNode.gain.value = 1e-37), + this._nativeOscillatorNode.connect(this._nativeGainNode).connect(ht.destination), + this._nativeOscillatorNode.start()) + : ((this._nativeGainNode = null), (this._nativeOscillatorNode = null)), + (this._state = null), + ht.state === 'running') + ) { + this._state = 'suspended' + const mt = () => { + this._state === 'suspended' && (this._state = null), ht.removeEventListener('statechange', mt) + } + ht.addEventListener('statechange', mt) + } + } + get baseLatency() { + return this._baseLatency + } + get state() { + return this._state !== null ? this._state : this._nativeAudioContext.state + } + close() { + return this.state === 'closed' + ? this._nativeAudioContext.close().then(() => { + throw et() + }) + : (this._state === 'suspended' && (this._state = null), + this._nativeAudioContext.close().then(() => { + this._nativeGainNode !== null && + this._nativeOscillatorNode !== null && + (this._nativeOscillatorNode.stop(), + this._nativeGainNode.disconnect(), + this._nativeOscillatorNode.disconnect()), + deactivateAudioGraph(this) + })) + } + createMediaElementSource(ut) { + return new it(this, { mediaElement: ut }) + } + createMediaStreamDestination() { + return new ot(this) + } + createMediaStreamSource(ut) { + return new at(this, { mediaStream: ut }) + } + createMediaStreamTrackSource(ut) { + return new st(this, { mediaStreamTrack: ut }) + } + resume() { + return this._state === 'suspended' + ? new Promise((ut, ht) => { + const dt = () => { + this._nativeAudioContext.removeEventListener('statechange', dt), + this._nativeAudioContext.state === 'running' ? ut() : this.resume().then(ut, ht) + } + this._nativeAudioContext.addEventListener('statechange', dt) + }) + : this._nativeAudioContext.resume().catch((ut) => { + throw ut === void 0 || ut.code === 15 ? et() : ut + }) + } + suspend() { + return this._nativeAudioContext.suspend().catch((ut) => { + throw ut === void 0 ? et() : ut + }) + } + }, + createAudioDestinationNodeConstructor = (tt, et, nt, rt, it, ot, at, st) => + class extends tt { + constructor(ct, ut) { + const ht = ot(ct), + dt = at(ht), + pt = it(ht, ut, dt), + mt = dt ? et(st) : null + super(ct, !1, pt, mt), (this._isNodeOfNativeOfflineAudioContext = dt), (this._nativeAudioDestinationNode = pt) + } + get channelCount() { + return this._nativeAudioDestinationNode.channelCount + } + set channelCount(ct) { + if (this._isNodeOfNativeOfflineAudioContext) throw rt() + if (ct > this._nativeAudioDestinationNode.maxChannelCount) throw nt() + this._nativeAudioDestinationNode.channelCount = ct + } + get channelCountMode() { + return this._nativeAudioDestinationNode.channelCountMode + } + set channelCountMode(ct) { + if (this._isNodeOfNativeOfflineAudioContext) throw rt() + this._nativeAudioDestinationNode.channelCountMode = ct + } + get maxChannelCount() { + return this._nativeAudioDestinationNode.maxChannelCount + } + }, + createAudioDestinationNodeRenderer = (tt) => { + const et = new WeakMap(), + nt = async (rt, it) => { + const ot = it.destination + return et.set(it, ot), await tt(rt, it, ot), ot + } + return { + render(rt, it) { + const ot = et.get(it) + return ot !== void 0 ? Promise.resolve(ot) : nt(rt, it) + }, + } + }, + createAudioListenerFactory = (tt, et, nt, rt, it, ot, at, st) => (lt, ct) => { + const ut = ct.listener, + ht = () => { + const St = new Float32Array(1), + Tt = et(ct, { + channelCount: 1, + channelCountMode: 'explicit', + channelInterpretation: 'speakers', + numberOfInputs: 9, + }), + At = at(ct) + let Et = !1, + $t = [0, 0, -1, 0, 1, 0], + Dt = [0, 0, 0] + const jt = () => { + if (Et) return + Et = !0 + const It = rt(ct, 256, 9, 0) + ;(It.onaudioprocess = ({ inputBuffer: Ot }) => { + const Wt = [ot(Ot, St, 0), ot(Ot, St, 1), ot(Ot, St, 2), ot(Ot, St, 3), ot(Ot, St, 4), ot(Ot, St, 5)] + Wt.some((Ft, Nt) => Ft !== $t[Nt]) && (ut.setOrientation(...Wt), ($t = Wt)) + const zt = [ot(Ot, St, 6), ot(Ot, St, 7), ot(Ot, St, 8)] + zt.some((Ft, Nt) => Ft !== Dt[Nt]) && (ut.setPosition(...zt), (Dt = zt)) + }), + Tt.connect(It) + }, + Pt = (It) => (Ot) => { + Ot !== $t[It] && (($t[It] = Ot), ut.setOrientation(...$t)) + }, + Ct = (It) => (Ot) => { + Ot !== Dt[It] && ((Dt[It] = Ot), ut.setPosition(...Dt)) + }, + wt = (It, Ot, Wt) => { + const zt = nt(ct, { + channelCount: 1, + channelCountMode: 'explicit', + channelInterpretation: 'discrete', + offset: Ot, + }) + zt.connect(Tt, 0, It), + zt.start(), + Object.defineProperty(zt.offset, 'defaultValue', { + get() { + return Ot + }, + }) + const Ft = tt({ context: lt }, At, zt.offset, MOST_POSITIVE_SINGLE_FLOAT, MOST_NEGATIVE_SINGLE_FLOAT) + return ( + st( + Ft, + 'value', + (Nt) => () => Nt.call(Ft), + (Nt) => (Ut) => { + try { + Nt.call(Ft, Ut) + } catch (Mt) { + if (Mt.code !== 9) throw Mt + } + jt(), At && Wt(Ut) + }, + ), + (Ft.cancelAndHoldAtTime = ((Nt) => + At + ? () => { + throw it() + } + : (...Ut) => { + const Mt = Nt.apply(Ft, Ut) + return jt(), Mt + })(Ft.cancelAndHoldAtTime)), + (Ft.cancelScheduledValues = ((Nt) => + At + ? () => { + throw it() + } + : (...Ut) => { + const Mt = Nt.apply(Ft, Ut) + return jt(), Mt + })(Ft.cancelScheduledValues)), + (Ft.exponentialRampToValueAtTime = ((Nt) => + At + ? () => { + throw it() + } + : (...Ut) => { + const Mt = Nt.apply(Ft, Ut) + return jt(), Mt + })(Ft.exponentialRampToValueAtTime)), + (Ft.linearRampToValueAtTime = ((Nt) => + At + ? () => { + throw it() + } + : (...Ut) => { + const Mt = Nt.apply(Ft, Ut) + return jt(), Mt + })(Ft.linearRampToValueAtTime)), + (Ft.setTargetAtTime = ((Nt) => + At + ? () => { + throw it() + } + : (...Ut) => { + const Mt = Nt.apply(Ft, Ut) + return jt(), Mt + })(Ft.setTargetAtTime)), + (Ft.setValueAtTime = ((Nt) => + At + ? () => { + throw it() + } + : (...Ut) => { + const Mt = Nt.apply(Ft, Ut) + return jt(), Mt + })(Ft.setValueAtTime)), + (Ft.setValueCurveAtTime = ((Nt) => + At + ? () => { + throw it() + } + : (...Ut) => { + const Mt = Nt.apply(Ft, Ut) + return jt(), Mt + })(Ft.setValueCurveAtTime)), + Ft + ) + } + return { + forwardX: wt(0, 0, Pt(0)), + forwardY: wt(1, 0, Pt(1)), + forwardZ: wt(2, -1, Pt(2)), + positionX: wt(6, 0, Ct(0)), + positionY: wt(7, 0, Ct(1)), + positionZ: wt(8, 0, Ct(2)), + upX: wt(3, 0, Pt(3)), + upY: wt(4, 1, Pt(4)), + upZ: wt(5, 0, Pt(5)), + } + }, + { + forwardX: dt, + forwardY: pt, + forwardZ: mt, + positionX: gt, + positionY: yt, + positionZ: bt, + upX: vt, + upY: xt, + upZ: kt, + } = ut.forwardX === void 0 ? ht() : ut + return { + get forwardX() { + return dt + }, + get forwardY() { + return pt + }, + get forwardZ() { + return mt + }, + get positionX() { + return gt + }, + get positionY() { + return yt + }, + get positionZ() { + return bt + }, + get upX() { + return vt + }, + get upY() { + return xt + }, + get upZ() { + return kt + }, + } + }, + isAudioNode$1 = (tt) => 'context' in tt, + isAudioNodeOutputConnection = (tt) => isAudioNode$1(tt[0]), + insertElementInSet = (tt, et, nt, rt) => { + for (const it of tt) + if (nt(it)) { + if (rt) return !1 + throw Error('The set contains at least one similar element.') + } + return tt.add(et), !0 + }, + addActiveInputConnectionToAudioParam = (tt, et, [nt, rt], it) => { + insertElementInSet(tt, [et, nt, rt], (ot) => ot[0] === et && ot[1] === nt, it) + }, + addPassiveInputConnectionToAudioParam = (tt, [et, nt, rt], it) => { + const ot = tt.get(et) + ot === void 0 ? tt.set(et, new Set([[nt, rt]])) : insertElementInSet(ot, [nt, rt], (at) => at[0] === nt, it) + }, + isNativeAudioNodeFaker = (tt) => 'inputs' in tt, + connectNativeAudioNodeToNativeAudioNode = (tt, et, nt, rt) => { + if (isNativeAudioNodeFaker(et)) { + const it = et.inputs[rt] + return tt.connect(it, nt, 0), [it, nt, 0] + } + return tt.connect(et, nt, rt), [et, nt, rt] + }, + deleteActiveInputConnection = (tt, et, nt) => { + for (const rt of tt) if (rt[0] === et && rt[1] === nt) return tt.delete(rt), rt + return null + }, + deleteActiveInputConnectionToAudioParam = (tt, et, nt) => + pickElementFromSet(tt, (rt) => rt[0] === et && rt[1] === nt), + deleteEventListenerOfAudioNode = (tt, et) => { + if (!getEventListenersOfAudioNode(tt).delete(et)) throw new Error('Missing the expected event listener.') + }, + deletePassiveInputConnectionToAudioParam = (tt, et, nt) => { + const rt = getValueForKey(tt, et), + it = pickElementFromSet(rt, (ot) => ot[0] === nt) + return rt.size === 0 && tt.delete(et), it + }, + disconnectNativeAudioNodeFromNativeAudioNode = (tt, et, nt, rt) => { + isNativeAudioNodeFaker(et) ? tt.disconnect(et.inputs[rt], nt, 0) : tt.disconnect(et, nt, rt) + }, + getNativeAudioNode = (tt) => getValueForKey(AUDIO_NODE_STORE, tt), + getNativeAudioParam = (tt) => getValueForKey(AUDIO_PARAM_STORE, tt), + isPartOfACycle = (tt) => CYCLE_COUNTERS.has(tt), + isPassiveAudioNode = (tt) => !ACTIVE_AUDIO_NODE_STORE.has(tt), + testAudioNodeDisconnectMethodSupport = (tt, et) => + new Promise((nt) => { + if (et !== null) nt(!0) + else { + const rt = tt.createScriptProcessor(256, 1, 1), + it = tt.createGain(), + ot = tt.createBuffer(1, 2, 44100), + at = ot.getChannelData(0) + ;(at[0] = 1), (at[1] = 1) + const st = tt.createBufferSource() + ;(st.buffer = ot), + (st.loop = !0), + st.connect(rt).connect(tt.destination), + st.connect(it), + st.disconnect(it), + (rt.onaudioprocess = (lt) => { + const ct = lt.inputBuffer.getChannelData(0) + Array.prototype.some.call(ct, (ut) => ut === 1) ? nt(!0) : nt(!1), + st.stop(), + (rt.onaudioprocess = null), + st.disconnect(rt), + rt.disconnect(tt.destination) + }), + st.start() + } + }), + visitEachAudioNodeOnce = (tt, et) => { + const nt = new Map() + for (const rt of tt) + for (const it of rt) { + const ot = nt.get(it) + nt.set(it, ot === void 0 ? 1 : ot + 1) + } + nt.forEach((rt, it) => et(it, rt)) + }, + isNativeAudioNode$1 = (tt) => 'context' in tt, + wrapAudioNodeDisconnectMethod = (tt) => { + const et = new Map() + ;(tt.connect = ( + (nt) => + (rt, it = 0, ot = 0) => { + const at = isNativeAudioNode$1(rt) ? nt(rt, it, ot) : nt(rt, it), + st = et.get(rt) + return ( + st === void 0 + ? et.set(rt, [{ input: ot, output: it }]) + : st.every((lt) => lt.input !== ot || lt.output !== it) && st.push({ input: ot, output: it }), + at + ) + } + )(tt.connect.bind(tt))), + (tt.disconnect = ((nt) => (rt, it, ot) => { + if ((nt.apply(tt), rt === void 0)) et.clear() + else if (typeof rt == 'number') + for (const [at, st] of et) { + const lt = st.filter((ct) => ct.output !== rt) + lt.length === 0 ? et.delete(at) : et.set(at, lt) + } + else if (et.has(rt)) + if (it === void 0) et.delete(rt) + else { + const at = et.get(rt) + if (at !== void 0) { + const st = at.filter((lt) => lt.output !== it && (lt.input !== ot || ot === void 0)) + st.length === 0 ? et.delete(rt) : et.set(rt, st) + } + } + for (const [at, st] of et) + st.forEach((lt) => { + isNativeAudioNode$1(at) ? tt.connect(at, lt.output, lt.input) : tt.connect(at, lt.output) + }) + })(tt.disconnect)) + }, + addConnectionToAudioParamOfAudioContext = (tt, et, nt, rt) => { + const { activeInputs: it, passiveInputs: ot } = getAudioParamConnections(et), + { outputs: at } = getAudioNodeConnections(tt), + st = getEventListenersOfAudioNode(tt), + lt = (ct) => { + const ut = getNativeAudioNode(tt), + ht = getNativeAudioParam(et) + if (ct) { + const dt = deletePassiveInputConnectionToAudioParam(ot, tt, nt) + addActiveInputConnectionToAudioParam(it, tt, dt, !1), !rt && !isPartOfACycle(tt) && ut.connect(ht, nt) + } else { + const dt = deleteActiveInputConnectionToAudioParam(it, tt, nt) + addPassiveInputConnectionToAudioParam(ot, dt, !1), !rt && !isPartOfACycle(tt) && ut.disconnect(ht, nt) + } + } + return insertElementInSet(at, [et, nt], (ct) => ct[0] === et && ct[1] === nt, !0) + ? (st.add(lt), + isActiveAudioNode(tt) + ? addActiveInputConnectionToAudioParam(it, tt, [nt, lt], !0) + : addPassiveInputConnectionToAudioParam(ot, [tt, nt, lt], !0), + !0) + : !1 + }, + deleteInputConnectionOfAudioNode = (tt, et, nt, rt) => { + const { activeInputs: it, passiveInputs: ot } = getAudioNodeConnections(et), + at = deleteActiveInputConnection(it[rt], tt, nt) + return at === null ? [deletePassiveInputConnectionToAudioNode(ot, tt, nt, rt)[2], !1] : [at[2], !0] + }, + deleteInputConnectionOfAudioParam = (tt, et, nt) => { + const { activeInputs: rt, passiveInputs: it } = getAudioParamConnections(et), + ot = deleteActiveInputConnection(rt, tt, nt) + return ot === null ? [deletePassiveInputConnectionToAudioParam(it, tt, nt)[1], !1] : [ot[2], !0] + }, + deleteInputsOfAudioNode = (tt, et, nt, rt, it) => { + const [ot, at] = deleteInputConnectionOfAudioNode(tt, nt, rt, it) + if ( + (ot !== null && + (deleteEventListenerOfAudioNode(tt, ot), + at && + !et && + !isPartOfACycle(tt) && + disconnectNativeAudioNodeFromNativeAudioNode(getNativeAudioNode(tt), getNativeAudioNode(nt), rt, it)), + isActiveAudioNode(nt)) + ) { + const { activeInputs: st } = getAudioNodeConnections(nt) + setInternalStateToPassiveWhenNecessary(nt, st) + } + }, + deleteInputsOfAudioParam = (tt, et, nt, rt) => { + const [it, ot] = deleteInputConnectionOfAudioParam(tt, nt, rt) + it !== null && + (deleteEventListenerOfAudioNode(tt, it), + ot && !et && !isPartOfACycle(tt) && getNativeAudioNode(tt).disconnect(getNativeAudioParam(nt), rt)) + }, + deleteAnyConnection = (tt, et) => { + const nt = getAudioNodeConnections(tt), + rt = [] + for (const it of nt.outputs) + isAudioNodeOutputConnection(it) + ? deleteInputsOfAudioNode(tt, et, ...it) + : deleteInputsOfAudioParam(tt, et, ...it), + rt.push(it[0]) + return nt.outputs.clear(), rt + }, + deleteConnectionAtOutput = (tt, et, nt) => { + const rt = getAudioNodeConnections(tt), + it = [] + for (const ot of rt.outputs) + ot[1] === nt && + (isAudioNodeOutputConnection(ot) + ? deleteInputsOfAudioNode(tt, et, ...ot) + : deleteInputsOfAudioParam(tt, et, ...ot), + it.push(ot[0]), + rt.outputs.delete(ot)) + return it + }, + deleteConnectionToDestination = (tt, et, nt, rt, it) => { + const ot = getAudioNodeConnections(tt) + return Array.from(ot.outputs) + .filter((at) => at[0] === nt && (rt === void 0 || at[1] === rt) && (it === void 0 || at[2] === it)) + .map( + (at) => ( + isAudioNodeOutputConnection(at) + ? deleteInputsOfAudioNode(tt, et, ...at) + : deleteInputsOfAudioParam(tt, et, ...at), + ot.outputs.delete(at), + at[0] + ), + ) + }, + createAudioNodeConstructor = (tt, et, nt, rt, it, ot, at, st, lt, ct, ut, ht, dt, pt, mt, gt) => + class extends ct { + constructor(bt, vt, xt, kt) { + super(xt), (this._context = bt), (this._nativeAudioNode = xt) + const St = ut(bt) + ht(St) && + nt(testAudioNodeDisconnectMethodSupport, () => testAudioNodeDisconnectMethodSupport(St, gt)) !== !0 && + wrapAudioNodeDisconnectMethod(xt), + AUDIO_NODE_STORE.set(this, xt), + EVENT_LISTENERS.set(this, new Set()), + bt.state !== 'closed' && vt && setInternalStateToActive(this), + tt(this, kt, xt) + } + get channelCount() { + return this._nativeAudioNode.channelCount + } + set channelCount(bt) { + this._nativeAudioNode.channelCount = bt + } + get channelCountMode() { + return this._nativeAudioNode.channelCountMode + } + set channelCountMode(bt) { + this._nativeAudioNode.channelCountMode = bt + } + get channelInterpretation() { + return this._nativeAudioNode.channelInterpretation + } + set channelInterpretation(bt) { + this._nativeAudioNode.channelInterpretation = bt + } + get context() { + return this._context + } + get numberOfInputs() { + return this._nativeAudioNode.numberOfInputs + } + get numberOfOutputs() { + return this._nativeAudioNode.numberOfOutputs + } + connect(bt, vt = 0, xt = 0) { + if (vt < 0 || vt >= this._nativeAudioNode.numberOfOutputs) throw it() + const kt = ut(this._context), + St = mt(kt) + if (dt(bt) || pt(bt)) throw ot() + if (isAudioNode$1(bt)) { + const Et = getNativeAudioNode(bt) + try { + const Dt = connectNativeAudioNodeToNativeAudioNode(this._nativeAudioNode, Et, vt, xt), + jt = isPassiveAudioNode(this) + ;(St || jt) && this._nativeAudioNode.disconnect(...Dt), + this.context.state !== 'closed' && !jt && isPassiveAudioNode(bt) && setInternalStateToActive(bt) + } catch (Dt) { + throw Dt.code === 12 ? ot() : Dt + } + if (et(this, bt, vt, xt, St)) { + const Dt = lt([this], bt) + visitEachAudioNodeOnce(Dt, rt(St)) + } + return bt + } + const Tt = getNativeAudioParam(bt) + if (Tt.name === 'playbackRate' && Tt.maxValue === 1024) throw at() + try { + this._nativeAudioNode.connect(Tt, vt), + (St || isPassiveAudioNode(this)) && this._nativeAudioNode.disconnect(Tt, vt) + } catch (Et) { + throw Et.code === 12 ? ot() : Et + } + if (addConnectionToAudioParamOfAudioContext(this, bt, vt, St)) { + const Et = lt([this], bt) + visitEachAudioNodeOnce(Et, rt(St)) + } + } + disconnect(bt, vt, xt) { + let kt + const St = ut(this._context), + Tt = mt(St) + if (bt === void 0) kt = deleteAnyConnection(this, Tt) + else if (typeof bt == 'number') { + if (bt < 0 || bt >= this.numberOfOutputs) throw it() + kt = deleteConnectionAtOutput(this, Tt, bt) + } else { + if ( + (vt !== void 0 && (vt < 0 || vt >= this.numberOfOutputs)) || + (isAudioNode$1(bt) && xt !== void 0 && (xt < 0 || xt >= bt.numberOfInputs)) + ) + throw it() + if (((kt = deleteConnectionToDestination(this, Tt, bt, vt, xt)), kt.length === 0)) throw ot() + } + for (const At of kt) { + const Et = lt([this], At) + visitEachAudioNodeOnce(Et, st) + } + } + }, + createAudioParamFactory = + (tt, et, nt, rt, it, ot, at, st, lt, ct, ut, ht, dt) => + (pt, mt, gt, yt = null, bt = null) => { + const vt = gt.value, + xt = new AutomationEventList(vt), + kt = mt ? rt(xt) : null, + St = { + get defaultValue() { + return vt + }, + get maxValue() { + return yt === null ? gt.maxValue : yt + }, + get minValue() { + return bt === null ? gt.minValue : bt + }, + get value() { + return gt.value + }, + set value(Tt) { + ;(gt.value = Tt), St.setValueAtTime(Tt, pt.context.currentTime) + }, + cancelAndHoldAtTime(Tt) { + if (typeof gt.cancelAndHoldAtTime == 'function') + kt === null && xt.flush(pt.context.currentTime), xt.add(it(Tt)), gt.cancelAndHoldAtTime(Tt) + else { + const At = Array.from(xt).pop() + kt === null && xt.flush(pt.context.currentTime), xt.add(it(Tt)) + const Et = Array.from(xt).pop() + gt.cancelScheduledValues(Tt), + At !== Et && + Et !== void 0 && + (Et.type === 'exponentialRampToValue' + ? gt.exponentialRampToValueAtTime(Et.value, Et.endTime) + : Et.type === 'linearRampToValue' + ? gt.linearRampToValueAtTime(Et.value, Et.endTime) + : Et.type === 'setValue' + ? gt.setValueAtTime(Et.value, Et.startTime) + : Et.type === 'setValueCurve' && gt.setValueCurveAtTime(Et.values, Et.startTime, Et.duration)) + } + return St + }, + cancelScheduledValues(Tt) { + return kt === null && xt.flush(pt.context.currentTime), xt.add(ot(Tt)), gt.cancelScheduledValues(Tt), St + }, + exponentialRampToValueAtTime(Tt, At) { + if (Tt === 0) throw new RangeError() + if (!Number.isFinite(At) || At < 0) throw new RangeError() + const Et = pt.context.currentTime + return ( + kt === null && xt.flush(Et), + Array.from(xt).length === 0 && (xt.add(ct(vt, Et)), gt.setValueAtTime(vt, Et)), + xt.add(at(Tt, At)), + gt.exponentialRampToValueAtTime(Tt, At), + St + ) + }, + linearRampToValueAtTime(Tt, At) { + const Et = pt.context.currentTime + return ( + kt === null && xt.flush(Et), + Array.from(xt).length === 0 && (xt.add(ct(vt, Et)), gt.setValueAtTime(vt, Et)), + xt.add(st(Tt, At)), + gt.linearRampToValueAtTime(Tt, At), + St + ) + }, + setTargetAtTime(Tt, At, Et) { + return ( + kt === null && xt.flush(pt.context.currentTime), + xt.add(lt(Tt, At, Et)), + gt.setTargetAtTime(Tt, At, Et), + St + ) + }, + setValueAtTime(Tt, At) { + return kt === null && xt.flush(pt.context.currentTime), xt.add(ct(Tt, At)), gt.setValueAtTime(Tt, At), St + }, + setValueCurveAtTime(Tt, At, Et) { + const $t = Tt instanceof Float32Array ? Tt : new Float32Array(Tt) + if (ht !== null && ht.name === 'webkitAudioContext') { + const Dt = At + Et, + jt = pt.context.sampleRate, + Pt = Math.ceil(At * jt), + Ct = Math.floor(Dt * jt), + wt = Ct - Pt, + It = new Float32Array(wt) + for (let Wt = 0; Wt < wt; Wt += 1) { + const zt = (($t.length - 1) / Et) * ((Pt + Wt) / jt - At), + Ft = Math.floor(zt), + Nt = Math.ceil(zt) + It[Wt] = Ft === Nt ? $t[Ft] : (1 - (zt - Ft)) * $t[Ft] + (1 - (Nt - zt)) * $t[Nt] + } + kt === null && xt.flush(pt.context.currentTime), + xt.add(ut(It, At, Et)), + gt.setValueCurveAtTime(It, At, Et) + const Ot = Ct / jt + Ot < Dt && dt(St, It[It.length - 1], Ot), dt(St, $t[$t.length - 1], Dt) + } else + kt === null && xt.flush(pt.context.currentTime), + xt.add(ut($t, At, Et)), + gt.setValueCurveAtTime($t, At, Et) + return St + }, + } + return nt.set(St, gt), et.set(St, pt), tt(St, kt), St + }, + createAudioParamRenderer = (tt) => ({ + replay(et) { + for (const nt of tt) + if (nt.type === 'exponentialRampToValue') { + const { endTime: rt, value: it } = nt + et.exponentialRampToValueAtTime(it, rt) + } else if (nt.type === 'linearRampToValue') { + const { endTime: rt, value: it } = nt + et.linearRampToValueAtTime(it, rt) + } else if (nt.type === 'setTarget') { + const { startTime: rt, target: it, timeConstant: ot } = nt + et.setTargetAtTime(it, rt, ot) + } else if (nt.type === 'setValue') { + const { startTime: rt, value: it } = nt + et.setValueAtTime(it, rt) + } else if (nt.type === 'setValueCurve') { + const { duration: rt, startTime: it, values: ot } = nt + et.setValueCurveAtTime(ot, it, rt) + } else throw new Error("Can't apply an unknown automation.") + }, + }) + class ReadOnlyMap { + constructor(et) { + this._map = new Map(et) + } + get size() { + return this._map.size + } + entries() { + return this._map.entries() + } + forEach(et, nt = null) { + return this._map.forEach((rt, it) => et.call(nt, rt, it, this)) + } + get(et) { + return this._map.get(et) + } + has(et) { + return this._map.has(et) + } + keys() { + return this._map.keys() + } + values() { + return this._map.values() + } + } + const DEFAULT_OPTIONS$g = { + channelCount: 2, + channelCountMode: 'explicit', + channelInterpretation: 'speakers', + numberOfInputs: 1, + numberOfOutputs: 1, + parameterData: {}, + processorOptions: {}, + }, + createAudioWorkletNodeConstructor = (tt, et, nt, rt, it, ot, at, st, lt, ct, ut, ht, dt, pt) => + class extends et { + constructor(gt, yt, bt) { + var vt + const xt = st(gt), + kt = lt(xt), + St = ut({ ...DEFAULT_OPTIONS$g, ...bt }) + dt(St) + const Tt = NODE_NAME_TO_PROCESSOR_CONSTRUCTOR_MAPS.get(xt), + At = Tt == null ? void 0 : Tt.get(yt), + Et = kt || xt.state !== 'closed' ? xt : (vt = at(xt)) !== null && vt !== void 0 ? vt : xt, + $t = it(Et, kt ? null : gt.baseLatency, ct, yt, At, St), + Dt = kt ? rt(yt, St, At) : null + super(gt, !0, $t, Dt) + const jt = [] + $t.parameters.forEach((Ct, wt) => { + const It = nt(this, kt, Ct) + jt.push([wt, It]) + }), + (this._nativeAudioWorkletNode = $t), + (this._onprocessorerror = null), + (this._parameters = new ReadOnlyMap(jt)), + kt && tt(xt, this) + const { activeInputs: Pt } = ot(this) + ht($t, Pt) + } + get onprocessorerror() { + return this._onprocessorerror + } + set onprocessorerror(gt) { + const yt = typeof gt == 'function' ? pt(this, gt) : null + this._nativeAudioWorkletNode.onprocessorerror = yt + const bt = this._nativeAudioWorkletNode.onprocessorerror + this._onprocessorerror = bt !== null && bt === yt ? gt : bt + } + get parameters() { + return this._parameters === null ? this._nativeAudioWorkletNode.parameters : this._parameters + } + get port() { + return this._nativeAudioWorkletNode.port + } + } + function copyFromChannel(tt, et, nt, rt, it) { + if (typeof tt.copyFromChannel == 'function') + et[nt].byteLength === 0 && (et[nt] = new Float32Array(128)), tt.copyFromChannel(et[nt], rt, it) + else { + const ot = tt.getChannelData(rt) + if (et[nt].byteLength === 0) et[nt] = ot.slice(it, it + 128) + else { + const at = new Float32Array(ot.buffer, it * Float32Array.BYTES_PER_ELEMENT, 128) + et[nt].set(at) + } + } + } + const copyToChannel = (tt, et, nt, rt, it) => { + typeof tt.copyToChannel == 'function' + ? et[nt].byteLength !== 0 && tt.copyToChannel(et[nt], rt, it) + : et[nt].byteLength !== 0 && tt.getChannelData(rt).set(et[nt], it) + }, + createNestedArrays = (tt, et) => { + const nt = [] + for (let rt = 0; rt < tt; rt += 1) { + const it = [], + ot = typeof et == 'number' ? et : et[rt] + for (let at = 0; at < ot; at += 1) it.push(new Float32Array(128)) + nt.push(it) + } + return nt + }, + getAudioWorkletProcessor = (tt, et) => { + const nt = getValueForKey(NODE_TO_PROCESSOR_MAPS, tt), + rt = getNativeAudioNode(et) + return getValueForKey(nt, rt) + }, + processBuffer = async (tt, et, nt, rt, it, ot, at) => { + const st = et === null ? Math.ceil(tt.context.length / 128) * 128 : et.length, + lt = rt.channelCount * rt.numberOfInputs, + ct = it.reduce((yt, bt) => yt + bt, 0), + ut = ct === 0 ? null : nt.createBuffer(ct, st, nt.sampleRate) + if (ot === void 0) throw new Error('Missing the processor constructor.') + const ht = getAudioNodeConnections(tt), + dt = await getAudioWorkletProcessor(nt, tt), + pt = createNestedArrays(rt.numberOfInputs, rt.channelCount), + mt = createNestedArrays(rt.numberOfOutputs, it), + gt = Array.from(tt.parameters.keys()).reduce((yt, bt) => ({ ...yt, [bt]: new Float32Array(128) }), {}) + for (let yt = 0; yt < st; yt += 128) { + if (rt.numberOfInputs > 0 && et !== null) + for (let bt = 0; bt < rt.numberOfInputs; bt += 1) + for (let vt = 0; vt < rt.channelCount; vt += 1) copyFromChannel(et, pt[bt], vt, vt, yt) + ot.parameterDescriptors !== void 0 && + et !== null && + ot.parameterDescriptors.forEach(({ name: bt }, vt) => { + copyFromChannel(et, gt, bt, lt + vt, yt) + }) + for (let bt = 0; bt < rt.numberOfInputs; bt += 1) + for (let vt = 0; vt < it[bt]; vt += 1) mt[bt][vt].byteLength === 0 && (mt[bt][vt] = new Float32Array(128)) + try { + const bt = pt.map((xt, kt) => (ht.activeInputs[kt].size === 0 ? [] : xt)), + vt = at(yt / nt.sampleRate, nt.sampleRate, () => dt.process(bt, mt, gt)) + if (ut !== null) + for (let xt = 0, kt = 0; xt < rt.numberOfOutputs; xt += 1) { + for (let St = 0; St < it[xt]; St += 1) copyToChannel(ut, mt[xt], St, kt + St, yt) + kt += it[xt] + } + if (!vt) break + } catch (bt) { + tt.dispatchEvent( + new ErrorEvent('processorerror', { + colno: bt.colno, + filename: bt.filename, + lineno: bt.lineno, + message: bt.message, + }), + ) + break + } + } + return ut + }, + createAudioWorkletNodeRendererFactory = + (tt, et, nt, rt, it, ot, at, st, lt, ct, ut, ht, dt, pt, mt, gt) => (yt, bt, vt) => { + const xt = new WeakMap() + let kt = null + const St = async (Tt, At) => { + let Et = ut(Tt), + $t = null + const Dt = isOwnedByContext(Et, At), + jt = Array.isArray(bt.outputChannelCount) ? bt.outputChannelCount : Array.from(bt.outputChannelCount) + if (ht === null) { + const Pt = jt.reduce((Ot, Wt) => Ot + Wt, 0), + Ct = it(At, { + channelCount: Math.max(1, Pt), + channelCountMode: 'explicit', + channelInterpretation: 'discrete', + numberOfOutputs: Math.max(1, Pt), + }), + wt = [] + for (let Ot = 0; Ot < Tt.numberOfOutputs; Ot += 1) + wt.push( + rt(At, { + channelCount: 1, + channelCountMode: 'explicit', + channelInterpretation: 'speakers', + numberOfInputs: jt[Ot], + }), + ) + const It = at(At, { + channelCount: bt.channelCount, + channelCountMode: bt.channelCountMode, + channelInterpretation: bt.channelInterpretation, + gain: 1, + }) + ;(It.connect = et.bind(null, wt)), (It.disconnect = lt.bind(null, wt)), ($t = [Ct, wt, It]) + } else Dt || (Et = new ht(At, yt)) + if ((xt.set(At, $t === null ? Et : $t[2]), $t !== null)) { + if (kt === null) { + if (vt === void 0) throw new Error('Missing the processor constructor.') + if (dt === null) throw new Error('Missing the native OfflineAudioContext constructor.') + const Wt = Tt.channelCount * Tt.numberOfInputs, + zt = vt.parameterDescriptors === void 0 ? 0 : vt.parameterDescriptors.length, + Ft = Wt + zt + kt = processBuffer( + Tt, + Ft === 0 + ? null + : await (async () => { + const Ut = new dt(Ft, Math.ceil(Tt.context.length / 128) * 128, At.sampleRate), + Mt = [], + Ht = [] + for (let Kt = 0; Kt < bt.numberOfInputs; Kt += 1) + Mt.push( + at(Ut, { + channelCount: bt.channelCount, + channelCountMode: bt.channelCountMode, + channelInterpretation: bt.channelInterpretation, + gain: 1, + }), + ), + Ht.push( + it(Ut, { + channelCount: bt.channelCount, + channelCountMode: 'explicit', + channelInterpretation: 'discrete', + numberOfOutputs: bt.channelCount, + }), + ) + const en = await Promise.all( + Array.from(Tt.parameters.values()).map(async (Kt) => { + const rn = ot(Ut, { + channelCount: 1, + channelCountMode: 'explicit', + channelInterpretation: 'discrete', + offset: Kt.value, + }) + return await pt(Ut, Kt, rn.offset), rn + }), + ), + sn = rt(Ut, { + channelCount: 1, + channelCountMode: 'explicit', + channelInterpretation: 'speakers', + numberOfInputs: Math.max(1, Wt + zt), + }) + for (let Kt = 0; Kt < bt.numberOfInputs; Kt += 1) { + Mt[Kt].connect(Ht[Kt]) + for (let rn = 0; rn < bt.channelCount; rn += 1) + Ht[Kt].connect(sn, rn, Kt * bt.channelCount + rn) + } + for (const [Kt, rn] of en.entries()) rn.connect(sn, 0, Wt + Kt), rn.start(0) + return sn.connect(Ut.destination), await Promise.all(Mt.map((Kt) => mt(Tt, Ut, Kt))), gt(Ut) + })(), + At, + bt, + jt, + vt, + ct, + ) + } + const Pt = await kt, + Ct = nt(At, { + buffer: null, + channelCount: 2, + channelCountMode: 'max', + channelInterpretation: 'speakers', + loop: !1, + loopEnd: 0, + loopStart: 0, + playbackRate: 1, + }), + [wt, It, Ot] = $t + Pt !== null && ((Ct.buffer = Pt), Ct.start(0)), Ct.connect(wt) + for (let Wt = 0, zt = 0; Wt < Tt.numberOfOutputs; Wt += 1) { + const Ft = It[Wt] + for (let Nt = 0; Nt < jt[Wt]; Nt += 1) wt.connect(Ft, zt + Nt, Nt) + zt += jt[Wt] + } + return Ot + } + if (Dt) for (const [Pt, Ct] of Tt.parameters.entries()) await tt(At, Ct, Et.parameters.get(Pt)) + else for (const [Pt, Ct] of Tt.parameters.entries()) await pt(At, Ct, Et.parameters.get(Pt)) + return await mt(Tt, At, Et), Et + } + return { + render(Tt, At) { + st(At, Tt) + const Et = xt.get(At) + return Et !== void 0 ? Promise.resolve(Et) : St(Tt, At) + }, + } + }, + createBaseAudioContextConstructor = ( + tt, + et, + nt, + rt, + it, + ot, + at, + st, + lt, + ct, + ut, + ht, + dt, + pt, + mt, + gt, + yt, + bt, + vt, + xt, + ) => + class extends mt { + constructor(St, Tt) { + super(St, Tt), + (this._nativeContext = St), + (this._audioWorklet = tt === void 0 ? void 0 : { addModule: (At, Et) => tt(this, At, Et) }) + } + get audioWorklet() { + return this._audioWorklet + } + createAnalyser() { + return new et(this) + } + createBiquadFilter() { + return new it(this) + } + createBuffer(St, Tt, At) { + return new nt({ length: Tt, numberOfChannels: St, sampleRate: At }) + } + createBufferSource() { + return new rt(this) + } + createChannelMerger(St = 6) { + return new ot(this, { numberOfInputs: St }) + } + createChannelSplitter(St = 6) { + return new at(this, { numberOfOutputs: St }) + } + createConstantSource() { + return new st(this) + } + createConvolver() { + return new lt(this) + } + createDelay(St = 1) { + return new ut(this, { maxDelayTime: St }) + } + createDynamicsCompressor() { + return new ht(this) + } + createGain() { + return new dt(this) + } + createIIRFilter(St, Tt) { + return new pt(this, { feedback: Tt, feedforward: St }) + } + createOscillator() { + return new gt(this) + } + createPanner() { + return new yt(this) + } + createPeriodicWave(St, Tt, At = { disableNormalization: !1 }) { + return new bt(this, { ...At, imag: Tt, real: St }) + } + createStereoPanner() { + return new vt(this) + } + createWaveShaper() { + return new xt(this) + } + decodeAudioData(St, Tt, At) { + return ct(this._nativeContext, St).then( + (Et) => (typeof Tt == 'function' && Tt(Et), Et), + (Et) => { + throw (typeof At == 'function' && At(Et), Et) + }, + ) + } + }, + DEFAULT_OPTIONS$f = { + Q: 1, + channelCount: 2, + channelCountMode: 'max', + channelInterpretation: 'speakers', + detune: 0, + frequency: 350, + gain: 0, + type: 'lowpass', + }, + createBiquadFilterNodeConstructor = (tt, et, nt, rt, it, ot, at, st) => + class extends tt { + constructor(ct, ut) { + const ht = ot(ct), + dt = { ...DEFAULT_OPTIONS$f, ...ut }, + pt = it(ht, dt), + mt = at(ht), + gt = mt ? nt() : null + super(ct, !1, pt, gt), + (this._Q = et(this, mt, pt.Q, MOST_POSITIVE_SINGLE_FLOAT, MOST_NEGATIVE_SINGLE_FLOAT)), + (this._detune = et( + this, + mt, + pt.detune, + 1200 * Math.log2(MOST_POSITIVE_SINGLE_FLOAT), + -1200 * Math.log2(MOST_POSITIVE_SINGLE_FLOAT), + )), + (this._frequency = et(this, mt, pt.frequency, ct.sampleRate / 2, 0)), + (this._gain = et( + this, + mt, + pt.gain, + 40 * Math.log10(MOST_POSITIVE_SINGLE_FLOAT), + MOST_NEGATIVE_SINGLE_FLOAT, + )), + (this._nativeBiquadFilterNode = pt), + st(this, 1) + } + get detune() { + return this._detune + } + get frequency() { + return this._frequency + } + get gain() { + return this._gain + } + get Q() { + return this._Q + } + get type() { + return this._nativeBiquadFilterNode.type + } + set type(ct) { + this._nativeBiquadFilterNode.type = ct + } + getFrequencyResponse(ct, ut, ht) { + try { + this._nativeBiquadFilterNode.getFrequencyResponse(ct, ut, ht) + } catch (dt) { + throw dt.code === 11 ? rt() : dt + } + if (ct.length !== ut.length || ut.length !== ht.length) throw rt() + } + }, + createBiquadFilterNodeRendererFactory = (tt, et, nt, rt, it) => () => { + const ot = new WeakMap(), + at = async (st, lt) => { + let ct = nt(st) + const ut = isOwnedByContext(ct, lt) + if (!ut) { + const ht = { + Q: ct.Q.value, + channelCount: ct.channelCount, + channelCountMode: ct.channelCountMode, + channelInterpretation: ct.channelInterpretation, + detune: ct.detune.value, + frequency: ct.frequency.value, + gain: ct.gain.value, + type: ct.type, + } + ct = et(lt, ht) + } + return ( + ot.set(lt, ct), + ut + ? (await tt(lt, st.Q, ct.Q), + await tt(lt, st.detune, ct.detune), + await tt(lt, st.frequency, ct.frequency), + await tt(lt, st.gain, ct.gain)) + : (await rt(lt, st.Q, ct.Q), + await rt(lt, st.detune, ct.detune), + await rt(lt, st.frequency, ct.frequency), + await rt(lt, st.gain, ct.gain)), + await it(st, lt, ct), + ct + ) + } + return { + render(st, lt) { + const ct = ot.get(lt) + return ct !== void 0 ? Promise.resolve(ct) : at(st, lt) + }, + } + }, + createCacheTestResult = (tt, et) => (nt, rt) => { + const it = et.get(nt) + if (it !== void 0) return it + const ot = tt.get(nt) + if (ot !== void 0) return ot + try { + const at = rt() + return at instanceof Promise + ? (tt.set(nt, at), at.catch(() => !1).then((st) => (tt.delete(nt), et.set(nt, st), st))) + : (et.set(nt, at), at) + } catch { + return et.set(nt, !1), !1 + } + }, + DEFAULT_OPTIONS$e = { + channelCount: 1, + channelCountMode: 'explicit', + channelInterpretation: 'speakers', + numberOfInputs: 6, + }, + createChannelMergerNodeConstructor = (tt, et, nt, rt, it) => + class extends tt { + constructor(at, st) { + const lt = rt(at), + ct = { ...DEFAULT_OPTIONS$e, ...st }, + ut = nt(lt, ct), + ht = it(lt) ? et() : null + super(at, !1, ut, ht) + } + }, + createChannelMergerNodeRendererFactory = (tt, et, nt) => () => { + const rt = new WeakMap(), + it = async (ot, at) => { + let st = et(ot) + if (!isOwnedByContext(st, at)) { + const ct = { + channelCount: st.channelCount, + channelCountMode: st.channelCountMode, + channelInterpretation: st.channelInterpretation, + numberOfInputs: st.numberOfInputs, + } + st = tt(at, ct) + } + return rt.set(at, st), await nt(ot, at, st), st + } + return { + render(ot, at) { + const st = rt.get(at) + return st !== void 0 ? Promise.resolve(st) : it(ot, at) + }, + } + }, + DEFAULT_OPTIONS$d = { + channelCount: 6, + channelCountMode: 'explicit', + channelInterpretation: 'discrete', + numberOfOutputs: 6, + }, + createChannelSplitterNodeConstructor = (tt, et, nt, rt, it, ot) => + class extends tt { + constructor(st, lt) { + const ct = rt(st), + ut = ot({ ...DEFAULT_OPTIONS$d, ...lt }), + ht = nt(ct, ut), + dt = it(ct) ? et() : null + super(st, !1, ht, dt) + } + }, + createChannelSplitterNodeRendererFactory = (tt, et, nt) => () => { + const rt = new WeakMap(), + it = async (ot, at) => { + let st = et(ot) + if (!isOwnedByContext(st, at)) { + const ct = { + channelCount: st.channelCount, + channelCountMode: st.channelCountMode, + channelInterpretation: st.channelInterpretation, + numberOfOutputs: st.numberOfOutputs, + } + st = tt(at, ct) + } + return rt.set(at, st), await nt(ot, at, st), st + } + return { + render(ot, at) { + const st = rt.get(at) + return st !== void 0 ? Promise.resolve(st) : it(ot, at) + }, + } + }, + createConnectAudioParam = (tt) => (et, nt, rt) => tt(nt, et, rt), + createConnectMultipleOutputs = + (tt) => + (et, nt, rt = 0, it = 0) => { + const ot = et[rt] + if (ot === void 0) throw tt() + return isNativeAudioNode$1(nt) ? ot.connect(nt, 0, it) : ot.connect(nt, 0) + }, + createConnectedNativeAudioBufferSourceNodeFactory = (tt) => (et, nt) => { + const rt = tt(et, { + buffer: null, + channelCount: 2, + channelCountMode: 'max', + channelInterpretation: 'speakers', + loop: !1, + loopEnd: 0, + loopStart: 0, + playbackRate: 1, + }), + it = et.createBuffer(1, 2, 44100) + return ( + (rt.buffer = it), + (rt.loop = !0), + rt.connect(nt), + rt.start(), + () => { + rt.stop(), rt.disconnect(nt) + } + ) + }, + DEFAULT_OPTIONS$c = { channelCount: 2, channelCountMode: 'max', channelInterpretation: 'speakers', offset: 1 }, + createConstantSourceNodeConstructor = (tt, et, nt, rt, it, ot, at) => + class extends tt { + constructor(lt, ct) { + const ut = it(lt), + ht = { ...DEFAULT_OPTIONS$c, ...ct }, + dt = rt(ut, ht), + pt = ot(ut), + mt = pt ? nt() : null + super(lt, !1, dt, mt), + (this._constantSourceNodeRenderer = mt), + (this._nativeConstantSourceNode = dt), + (this._offset = et(this, pt, dt.offset, MOST_POSITIVE_SINGLE_FLOAT, MOST_NEGATIVE_SINGLE_FLOAT)), + (this._onended = null) + } + get offset() { + return this._offset + } + get onended() { + return this._onended + } + set onended(lt) { + const ct = typeof lt == 'function' ? at(this, lt) : null + this._nativeConstantSourceNode.onended = ct + const ut = this._nativeConstantSourceNode.onended + this._onended = ut !== null && ut === ct ? lt : ut + } + start(lt = 0) { + if ( + (this._nativeConstantSourceNode.start(lt), + this._constantSourceNodeRenderer !== null && (this._constantSourceNodeRenderer.start = lt), + this.context.state !== 'closed') + ) { + setInternalStateToActive(this) + const ct = () => { + this._nativeConstantSourceNode.removeEventListener('ended', ct), + isActiveAudioNode(this) && setInternalStateToPassive(this) + } + this._nativeConstantSourceNode.addEventListener('ended', ct) + } + } + stop(lt = 0) { + this._nativeConstantSourceNode.stop(lt), + this._constantSourceNodeRenderer !== null && (this._constantSourceNodeRenderer.stop = lt) + } + }, + createConstantSourceNodeRendererFactory = (tt, et, nt, rt, it) => () => { + const ot = new WeakMap() + let at = null, + st = null + const lt = async (ct, ut) => { + let ht = nt(ct) + const dt = isOwnedByContext(ht, ut) + if (!dt) { + const pt = { + channelCount: ht.channelCount, + channelCountMode: ht.channelCountMode, + channelInterpretation: ht.channelInterpretation, + offset: ht.offset.value, + } + ;(ht = et(ut, pt)), at !== null && ht.start(at), st !== null && ht.stop(st) + } + return ( + ot.set(ut, ht), + dt ? await tt(ut, ct.offset, ht.offset) : await rt(ut, ct.offset, ht.offset), + await it(ct, ut, ht), + ht + ) + } + return { + set start(ct) { + at = ct + }, + set stop(ct) { + st = ct + }, + render(ct, ut) { + const ht = ot.get(ut) + return ht !== void 0 ? Promise.resolve(ht) : lt(ct, ut) + }, + } + }, + createConvertNumberToUnsignedLong = (tt) => (et) => ((tt[0] = et), tt[0]), + DEFAULT_OPTIONS$b = { + buffer: null, + channelCount: 2, + channelCountMode: 'clamped-max', + channelInterpretation: 'speakers', + disableNormalization: !1, + }, + createConvolverNodeConstructor = (tt, et, nt, rt, it, ot) => + class extends tt { + constructor(st, lt) { + const ct = rt(st), + ut = { ...DEFAULT_OPTIONS$b, ...lt }, + ht = nt(ct, ut), + pt = it(ct) ? et() : null + super(st, !1, ht, pt), + (this._isBufferNullified = !1), + (this._nativeConvolverNode = ht), + ut.buffer !== null && ot(this, ut.buffer.duration) + } + get buffer() { + return this._isBufferNullified ? null : this._nativeConvolverNode.buffer + } + set buffer(st) { + if (((this._nativeConvolverNode.buffer = st), st === null && this._nativeConvolverNode.buffer !== null)) { + const lt = this._nativeConvolverNode.context + ;(this._nativeConvolverNode.buffer = lt.createBuffer(1, 1, lt.sampleRate)), + (this._isBufferNullified = !0), + ot(this, 0) + } else + (this._isBufferNullified = !1), + ot(this, this._nativeConvolverNode.buffer === null ? 0 : this._nativeConvolverNode.buffer.duration) + } + get normalize() { + return this._nativeConvolverNode.normalize + } + set normalize(st) { + this._nativeConvolverNode.normalize = st + } + }, + createConvolverNodeRendererFactory = (tt, et, nt) => () => { + const rt = new WeakMap(), + it = async (ot, at) => { + let st = et(ot) + if (!isOwnedByContext(st, at)) { + const ct = { + buffer: st.buffer, + channelCount: st.channelCount, + channelCountMode: st.channelCountMode, + channelInterpretation: st.channelInterpretation, + disableNormalization: !st.normalize, + } + st = tt(at, ct) + } + return rt.set(at, st), isNativeAudioNodeFaker(st) ? await nt(ot, at, st.inputs[0]) : await nt(ot, at, st), st + } + return { + render(ot, at) { + const st = rt.get(at) + return st !== void 0 ? Promise.resolve(st) : it(ot, at) + }, + } + }, + createCreateNativeOfflineAudioContext = (tt, et) => (nt, rt, it) => { + if (et === null) throw new Error('Missing the native OfflineAudioContext constructor.') + try { + return new et(nt, rt, it) + } catch (ot) { + throw ot.name === 'SyntaxError' ? tt() : ot + } + }, + createDataCloneError = () => new DOMException('', 'DataCloneError'), + detachArrayBuffer = (tt) => { + const { port1: et, port2: nt } = new MessageChannel() + return new Promise((rt) => { + const it = () => { + ;(nt.onmessage = null), et.close(), nt.close(), rt() + } + nt.onmessage = () => it() + try { + et.postMessage(tt, [tt]) + } catch { + } finally { + it() + } + }) + }, + createDecodeAudioData = (tt, et, nt, rt, it, ot, at, st, lt, ct, ut) => (ht, dt) => { + const pt = at(ht) ? ht : ot(ht) + if (it.has(dt)) { + const mt = nt() + return Promise.reject(mt) + } + try { + it.add(dt) + } catch {} + return et(lt, () => lt(pt)) + ? pt + .decodeAudioData(dt) + .then((mt) => (detachArrayBuffer(dt).catch(() => {}), et(st, () => st(mt)) || ut(mt), tt.add(mt), mt)) + : new Promise((mt, gt) => { + const yt = async () => { + try { + await detachArrayBuffer(dt) + } catch {} + }, + bt = (vt) => { + gt(vt), yt() + } + try { + pt.decodeAudioData( + dt, + (vt) => { + typeof vt.copyFromChannel != 'function' && (ct(vt), wrapAudioBufferGetChannelDataMethod(vt)), + tt.add(vt), + yt().then(() => mt(vt)) + }, + (vt) => { + bt(vt === null ? rt() : vt) + }, + ) + } catch (vt) { + bt(vt) + } + }) + }, + createDecrementCycleCounter = (tt, et, nt, rt, it, ot, at, st) => (lt, ct) => { + const ut = et.get(lt) + if (ut === void 0) throw new Error('Missing the expected cycle count.') + const ht = ot(lt.context), + dt = st(ht) + if (ut === ct) { + if ((et.delete(lt), !dt && at(lt))) { + const pt = rt(lt), + { outputs: mt } = nt(lt) + for (const gt of mt) + if (isAudioNodeOutputConnection(gt)) { + const yt = rt(gt[0]) + tt(pt, yt, gt[1], gt[2]) + } else { + const yt = it(gt[0]) + pt.connect(yt, gt[1]) + } + } + } else et.set(lt, ut - ct) + }, + DEFAULT_OPTIONS$a = { + channelCount: 2, + channelCountMode: 'max', + channelInterpretation: 'speakers', + delayTime: 0, + maxDelayTime: 1, + }, + createDelayNodeConstructor = (tt, et, nt, rt, it, ot, at) => + class extends tt { + constructor(lt, ct) { + const ut = it(lt), + ht = { ...DEFAULT_OPTIONS$a, ...ct }, + dt = rt(ut, ht), + pt = ot(ut), + mt = pt ? nt(ht.maxDelayTime) : null + super(lt, !1, dt, mt), (this._delayTime = et(this, pt, dt.delayTime)), at(this, ht.maxDelayTime) + } + get delayTime() { + return this._delayTime + } + }, + createDelayNodeRendererFactory = (tt, et, nt, rt, it) => (ot) => { + const at = new WeakMap(), + st = async (lt, ct) => { + let ut = nt(lt) + const ht = isOwnedByContext(ut, ct) + if (!ht) { + const dt = { + channelCount: ut.channelCount, + channelCountMode: ut.channelCountMode, + channelInterpretation: ut.channelInterpretation, + delayTime: ut.delayTime.value, + maxDelayTime: ot, + } + ut = et(ct, dt) + } + return ( + at.set(ct, ut), + ht ? await tt(ct, lt.delayTime, ut.delayTime) : await rt(ct, lt.delayTime, ut.delayTime), + await it(lt, ct, ut), + ut + ) + } + return { + render(lt, ct) { + const ut = at.get(ct) + return ut !== void 0 ? Promise.resolve(ut) : st(lt, ct) + }, + } + }, + createDeleteActiveInputConnectionToAudioNode = (tt) => (et, nt, rt, it) => + tt(et[it], (ot) => ot[0] === nt && ot[1] === rt), + createDeleteUnrenderedAudioWorkletNode = (tt) => (et, nt) => { + tt(et).delete(nt) + }, + isDelayNode = (tt) => 'delayTime' in tt, + createDetectCycles = (tt, et, nt) => + function rt(it, ot) { + const at = isAudioNode$1(ot) ? ot : nt(tt, ot) + if (isDelayNode(at)) return [] + if (it[0] === at) return [it] + if (it.includes(at)) return [] + const { outputs: st } = et(at) + return Array.from(st) + .map((lt) => rt([...it, at], lt[0])) + .reduce((lt, ct) => lt.concat(ct), []) + }, + getOutputAudioNodeAtIndex = (tt, et, nt) => { + const rt = et[nt] + if (rt === void 0) throw tt() + return rt + }, + createDisconnectMultipleOutputs = + (tt) => + (et, nt = void 0, rt = void 0, it = 0) => + nt === void 0 + ? et.forEach((ot) => ot.disconnect()) + : typeof nt == 'number' + ? getOutputAudioNodeAtIndex(tt, et, nt).disconnect() + : isNativeAudioNode$1(nt) + ? rt === void 0 + ? et.forEach((ot) => ot.disconnect(nt)) + : it === void 0 + ? getOutputAudioNodeAtIndex(tt, et, rt).disconnect(nt, 0) + : getOutputAudioNodeAtIndex(tt, et, rt).disconnect(nt, 0, it) + : rt === void 0 + ? et.forEach((ot) => ot.disconnect(nt)) + : getOutputAudioNodeAtIndex(tt, et, rt).disconnect(nt, 0), + DEFAULT_OPTIONS$9 = { + attack: 0.003, + channelCount: 2, + channelCountMode: 'clamped-max', + channelInterpretation: 'speakers', + knee: 30, + ratio: 12, + release: 0.25, + threshold: -24, + }, + createDynamicsCompressorNodeConstructor = (tt, et, nt, rt, it, ot, at, st) => + class extends tt { + constructor(ct, ut) { + const ht = ot(ct), + dt = { ...DEFAULT_OPTIONS$9, ...ut }, + pt = rt(ht, dt), + mt = at(ht), + gt = mt ? nt() : null + super(ct, !1, pt, gt), + (this._attack = et(this, mt, pt.attack)), + (this._knee = et(this, mt, pt.knee)), + (this._nativeDynamicsCompressorNode = pt), + (this._ratio = et(this, mt, pt.ratio)), + (this._release = et(this, mt, pt.release)), + (this._threshold = et(this, mt, pt.threshold)), + st(this, 0.006) + } + get attack() { + return this._attack + } + get channelCount() { + return this._nativeDynamicsCompressorNode.channelCount + } + set channelCount(ct) { + const ut = this._nativeDynamicsCompressorNode.channelCount + if (((this._nativeDynamicsCompressorNode.channelCount = ct), ct > 2)) + throw ((this._nativeDynamicsCompressorNode.channelCount = ut), it()) + } + get channelCountMode() { + return this._nativeDynamicsCompressorNode.channelCountMode + } + set channelCountMode(ct) { + const ut = this._nativeDynamicsCompressorNode.channelCountMode + if (((this._nativeDynamicsCompressorNode.channelCountMode = ct), ct === 'max')) + throw ((this._nativeDynamicsCompressorNode.channelCountMode = ut), it()) + } + get knee() { + return this._knee + } + get ratio() { + return this._ratio + } + get reduction() { + return typeof this._nativeDynamicsCompressorNode.reduction.value == 'number' + ? this._nativeDynamicsCompressorNode.reduction.value + : this._nativeDynamicsCompressorNode.reduction + } + get release() { + return this._release + } + get threshold() { + return this._threshold + } + }, + createDynamicsCompressorNodeRendererFactory = (tt, et, nt, rt, it) => () => { + const ot = new WeakMap(), + at = async (st, lt) => { + let ct = nt(st) + const ut = isOwnedByContext(ct, lt) + if (!ut) { + const ht = { + attack: ct.attack.value, + channelCount: ct.channelCount, + channelCountMode: ct.channelCountMode, + channelInterpretation: ct.channelInterpretation, + knee: ct.knee.value, + ratio: ct.ratio.value, + release: ct.release.value, + threshold: ct.threshold.value, + } + ct = et(lt, ht) + } + return ( + ot.set(lt, ct), + ut + ? (await tt(lt, st.attack, ct.attack), + await tt(lt, st.knee, ct.knee), + await tt(lt, st.ratio, ct.ratio), + await tt(lt, st.release, ct.release), + await tt(lt, st.threshold, ct.threshold)) + : (await rt(lt, st.attack, ct.attack), + await rt(lt, st.knee, ct.knee), + await rt(lt, st.ratio, ct.ratio), + await rt(lt, st.release, ct.release), + await rt(lt, st.threshold, ct.threshold)), + await it(st, lt, ct), + ct + ) + } + return { + render(st, lt) { + const ct = ot.get(lt) + return ct !== void 0 ? Promise.resolve(ct) : at(st, lt) + }, + } + }, + createEncodingError = () => new DOMException('', 'EncodingError'), + createEvaluateSource = (tt) => (et) => + new Promise((nt, rt) => { + if (tt === null) { + rt(new SyntaxError()) + return + } + const it = tt.document.head + if (it === null) rt(new SyntaxError()) + else { + const ot = tt.document.createElement('script'), + at = new Blob([et], { type: 'application/javascript' }), + st = URL.createObjectURL(at), + lt = tt.onerror, + ct = () => { + ;(tt.onerror = lt), URL.revokeObjectURL(st) + } + ;(tt.onerror = (ut, ht, dt, pt, mt) => { + if (ht === st || (ht === tt.location.href && dt === 1 && pt === 1)) return ct(), rt(mt), !1 + if (lt !== null) return lt(ut, ht, dt, pt, mt) + }), + (ot.onerror = () => { + ct(), rt(new SyntaxError()) + }), + (ot.onload = () => { + ct(), nt() + }), + (ot.src = st), + (ot.type = 'module'), + it.appendChild(ot) + } + }), + createEventTargetConstructor = (tt) => + class { + constructor(nt) { + ;(this._nativeEventTarget = nt), (this._listeners = new WeakMap()) + } + addEventListener(nt, rt, it) { + if (rt !== null) { + let ot = this._listeners.get(rt) + ot === void 0 && ((ot = tt(this, rt)), typeof rt == 'function' && this._listeners.set(rt, ot)), + this._nativeEventTarget.addEventListener(nt, ot, it) + } + } + dispatchEvent(nt) { + return this._nativeEventTarget.dispatchEvent(nt) + } + removeEventListener(nt, rt, it) { + const ot = rt === null ? void 0 : this._listeners.get(rt) + this._nativeEventTarget.removeEventListener(nt, ot === void 0 ? null : ot, it) + } + }, + createExposeCurrentFrameAndCurrentTime = (tt) => (et, nt, rt) => { + Object.defineProperties(tt, { + currentFrame: { + configurable: !0, + get() { + return Math.round(et * nt) + }, + }, + currentTime: { + configurable: !0, + get() { + return et + }, + }, + }) + try { + return rt() + } finally { + tt !== null && (delete tt.currentFrame, delete tt.currentTime) + } + }, + createFetchSource = (tt) => async (et) => { + try { + const nt = await fetch(et) + if (nt.ok) return [await nt.text(), nt.url] + } catch {} + throw tt() + }, + DEFAULT_OPTIONS$8 = { channelCount: 2, channelCountMode: 'max', channelInterpretation: 'speakers', gain: 1 }, + createGainNodeConstructor = (tt, et, nt, rt, it, ot) => + class extends tt { + constructor(st, lt) { + const ct = it(st), + ut = { ...DEFAULT_OPTIONS$8, ...lt }, + ht = rt(ct, ut), + dt = ot(ct), + pt = dt ? nt() : null + super(st, !1, ht, pt), + (this._gain = et(this, dt, ht.gain, MOST_POSITIVE_SINGLE_FLOAT, MOST_NEGATIVE_SINGLE_FLOAT)) + } + get gain() { + return this._gain + } + }, + createGainNodeRendererFactory = (tt, et, nt, rt, it) => () => { + const ot = new WeakMap(), + at = async (st, lt) => { + let ct = nt(st) + const ut = isOwnedByContext(ct, lt) + if (!ut) { + const ht = { + channelCount: ct.channelCount, + channelCountMode: ct.channelCountMode, + channelInterpretation: ct.channelInterpretation, + gain: ct.gain.value, + } + ct = et(lt, ht) + } + return ( + ot.set(lt, ct), + ut ? await tt(lt, st.gain, ct.gain) : await rt(lt, st.gain, ct.gain), + await it(st, lt, ct), + ct + ) + } + return { + render(st, lt) { + const ct = ot.get(lt) + return ct !== void 0 ? Promise.resolve(ct) : at(st, lt) + }, + } + }, + createGetActiveAudioWorkletNodeInputs = (tt, et) => (nt) => et(tt, nt), + createGetAudioNodeRenderer = (tt) => (et) => { + const nt = tt(et) + if (nt.renderer === null) throw new Error('Missing the renderer of the given AudioNode in the audio graph.') + return nt.renderer + }, + createGetAudioNodeTailTime = (tt) => (et) => { + var nt + return (nt = tt.get(et)) !== null && nt !== void 0 ? nt : 0 + }, + createGetAudioParamRenderer = (tt) => (et) => { + const nt = tt(et) + if (nt.renderer === null) throw new Error('Missing the renderer of the given AudioParam in the audio graph.') + return nt.renderer + }, + createGetBackupOfflineAudioContext = (tt) => (et) => tt.get(et), + createInvalidStateError = () => new DOMException('', 'InvalidStateError'), + createGetNativeContext = (tt) => (et) => { + const nt = tt.get(et) + if (nt === void 0) throw createInvalidStateError() + return nt + }, + createGetOrCreateBackupOfflineAudioContext = (tt, et) => (nt) => { + let rt = tt.get(nt) + if (rt !== void 0) return rt + if (et === null) throw new Error('Missing the native OfflineAudioContext constructor.') + return (rt = new et(1, 1, 44100)), tt.set(nt, rt), rt + }, + createGetUnrenderedAudioWorkletNodes = (tt) => (et) => { + const nt = tt.get(et) + if (nt === void 0) throw new Error('The context has no set of AudioWorkletNodes.') + return nt + }, + createInvalidAccessError = () => new DOMException('', 'InvalidAccessError'), + wrapIIRFilterNodeGetFrequencyResponseMethod = (tt) => { + tt.getFrequencyResponse = ((et) => (nt, rt, it) => { + if (nt.length !== rt.length || rt.length !== it.length) throw createInvalidAccessError() + return et.call(tt, nt, rt, it) + })(tt.getFrequencyResponse) + }, + DEFAULT_OPTIONS$7 = { channelCount: 2, channelCountMode: 'max', channelInterpretation: 'speakers' }, + createIIRFilterNodeConstructor = (tt, et, nt, rt, it, ot) => + class extends tt { + constructor(st, lt) { + const ct = rt(st), + ut = it(ct), + ht = { ...DEFAULT_OPTIONS$7, ...lt }, + dt = et(ct, ut ? null : st.baseLatency, ht), + pt = ut ? nt(ht.feedback, ht.feedforward) : null + super(st, !1, dt, pt), + wrapIIRFilterNodeGetFrequencyResponseMethod(dt), + (this._nativeIIRFilterNode = dt), + ot(this, 1) + } + getFrequencyResponse(st, lt, ct) { + return this._nativeIIRFilterNode.getFrequencyResponse(st, lt, ct) + } + }, + filterBuffer = (tt, et, nt, rt, it, ot, at, st, lt, ct, ut) => { + const ht = ct.length + let dt = st + for (let pt = 0; pt < ht; pt += 1) { + let mt = nt[0] * ct[pt] + for (let gt = 1; gt < it; gt += 1) { + const yt = (dt - gt) & (lt - 1) + ;(mt += nt[gt] * ot[yt]), (mt -= tt[gt] * at[yt]) + } + for (let gt = it; gt < rt; gt += 1) mt += nt[gt] * ot[(dt - gt) & (lt - 1)] + for (let gt = it; gt < et; gt += 1) mt -= tt[gt] * at[(dt - gt) & (lt - 1)] + ;(ot[dt] = ct[pt]), (at[dt] = mt), (dt = (dt + 1) & (lt - 1)), (ut[pt] = mt) + } + return dt + }, + filterFullBuffer = (tt, et, nt, rt) => { + const it = nt instanceof Float64Array ? nt : new Float64Array(nt), + ot = rt instanceof Float64Array ? rt : new Float64Array(rt), + at = it.length, + st = ot.length, + lt = Math.min(at, st) + if (it[0] !== 1) { + for (let mt = 0; mt < at; mt += 1) ot[mt] /= it[0] + for (let mt = 1; mt < st; mt += 1) it[mt] /= it[0] + } + const ct = 32, + ut = new Float32Array(ct), + ht = new Float32Array(ct), + dt = et.createBuffer(tt.numberOfChannels, tt.length, tt.sampleRate), + pt = tt.numberOfChannels + for (let mt = 0; mt < pt; mt += 1) { + const gt = tt.getChannelData(mt), + yt = dt.getChannelData(mt) + ut.fill(0), ht.fill(0), filterBuffer(it, at, ot, st, lt, ut, ht, 0, ct, gt, yt) + } + return dt + }, + createIIRFilterNodeRendererFactory = (tt, et, nt, rt, it) => (ot, at) => { + const st = new WeakMap() + let lt = null + const ct = async (ut, ht) => { + let dt = null, + pt = et(ut) + const mt = isOwnedByContext(pt, ht) + if ( + (ht.createIIRFilter === void 0 + ? (dt = tt(ht, { + buffer: null, + channelCount: 2, + channelCountMode: 'max', + channelInterpretation: 'speakers', + loop: !1, + loopEnd: 0, + loopStart: 0, + playbackRate: 1, + })) + : mt || (pt = ht.createIIRFilter(at, ot)), + st.set(ht, dt === null ? pt : dt), + dt !== null) + ) { + if (lt === null) { + if (nt === null) throw new Error('Missing the native OfflineAudioContext constructor.') + const yt = new nt(ut.context.destination.channelCount, ut.context.length, ht.sampleRate) + lt = (async () => { + await rt(ut, yt, yt.destination) + const bt = await it(yt) + return filterFullBuffer(bt, ht, ot, at) + })() + } + const gt = await lt + return (dt.buffer = gt), dt.start(0), dt + } + return await rt(ut, ht, pt), pt + } + return { + render(ut, ht) { + const dt = st.get(ht) + return dt !== void 0 ? Promise.resolve(dt) : ct(ut, ht) + }, + } + }, + createIncrementCycleCounterFactory = (tt, et, nt, rt, it, ot) => (at) => (st, lt) => { + const ct = tt.get(st) + if (ct === void 0) { + if (!at && ot(st)) { + const ut = rt(st), + { outputs: ht } = nt(st) + for (const dt of ht) + if (isAudioNodeOutputConnection(dt)) { + const pt = rt(dt[0]) + et(ut, pt, dt[1], dt[2]) + } else { + const pt = it(dt[0]) + ut.disconnect(pt, dt[1]) + } + } + tt.set(st, lt) + } else tt.set(st, ct + lt) + }, + createIsAnyAudioContext = (tt, et) => (nt) => { + const rt = tt.get(nt) + return et(rt) || et(nt) + }, + createIsAnyAudioNode = (tt, et) => (nt) => tt.has(nt) || et(nt), + createIsAnyAudioParam = (tt, et) => (nt) => tt.has(nt) || et(nt), + createIsAnyOfflineAudioContext = (tt, et) => (nt) => { + const rt = tt.get(nt) + return et(rt) || et(nt) + }, + createIsNativeAudioContext = (tt) => (et) => tt !== null && et instanceof tt, + createIsNativeAudioNode = (tt) => (et) => + tt !== null && typeof tt.AudioNode == 'function' && et instanceof tt.AudioNode, + createIsNativeAudioParam = (tt) => (et) => + tt !== null && typeof tt.AudioParam == 'function' && et instanceof tt.AudioParam, + createIsNativeContext = (tt, et) => (nt) => tt(nt) || et(nt), + createIsNativeOfflineAudioContext = (tt) => (et) => tt !== null && et instanceof tt, + createIsSecureContext = (tt) => tt !== null && tt.isSecureContext, + createMediaElementAudioSourceNodeConstructor = (tt, et, nt, rt) => + class extends tt { + constructor(ot, at) { + const st = nt(ot), + lt = et(st, at) + if (rt(st)) throw TypeError() + super(ot, !0, lt, null), (this._nativeMediaElementAudioSourceNode = lt) + } + get mediaElement() { + return this._nativeMediaElementAudioSourceNode.mediaElement + } + }, + DEFAULT_OPTIONS$6 = { channelCount: 2, channelCountMode: 'explicit', channelInterpretation: 'speakers' }, + createMediaStreamAudioDestinationNodeConstructor = (tt, et, nt, rt) => + class extends tt { + constructor(ot, at) { + const st = nt(ot) + if (rt(st)) throw new TypeError() + const lt = { ...DEFAULT_OPTIONS$6, ...at }, + ct = et(st, lt) + super(ot, !1, ct, null), (this._nativeMediaStreamAudioDestinationNode = ct) + } + get stream() { + return this._nativeMediaStreamAudioDestinationNode.stream + } + }, + createMediaStreamAudioSourceNodeConstructor = (tt, et, nt, rt) => + class extends tt { + constructor(ot, at) { + const st = nt(ot), + lt = et(st, at) + if (rt(st)) throw new TypeError() + super(ot, !0, lt, null), (this._nativeMediaStreamAudioSourceNode = lt) + } + get mediaStream() { + return this._nativeMediaStreamAudioSourceNode.mediaStream + } + }, + createMediaStreamTrackAudioSourceNodeConstructor = (tt, et, nt) => + class extends tt { + constructor(it, ot) { + const at = nt(it), + st = et(at, ot) + super(it, !0, st, null) + } + }, + createMinimalBaseAudioContextConstructor = (tt, et, nt, rt, it, ot) => + class extends nt { + constructor(st, lt) { + super(st), + (this._nativeContext = st), + CONTEXT_STORE.set(this, st), + rt(st) && it.set(st, new Set()), + (this._destination = new tt(this, lt)), + (this._listener = et(this, st)), + (this._onstatechange = null) + } + get currentTime() { + return this._nativeContext.currentTime + } + get destination() { + return this._destination + } + get listener() { + return this._listener + } + get onstatechange() { + return this._onstatechange + } + set onstatechange(st) { + const lt = typeof st == 'function' ? ot(this, st) : null + this._nativeContext.onstatechange = lt + const ct = this._nativeContext.onstatechange + this._onstatechange = ct !== null && ct === lt ? st : ct + } + get sampleRate() { + return this._nativeContext.sampleRate + } + get state() { + return this._nativeContext.state + } + }, + testPromiseSupport = (tt) => { + const et = new Uint32Array([ + 1179011410, 40, 1163280727, 544501094, 16, 131073, 44100, 176400, 1048580, 1635017060, 4, 0, + ]) + try { + const nt = tt.decodeAudioData(et.buffer, () => {}) + return nt === void 0 ? !1 : (nt.catch(() => {}), !0) + } catch {} + return !1 + }, + createMonitorConnections = (tt, et) => (nt, rt, it) => { + const ot = new Set() + return ( + (nt.connect = ( + (at) => + (st, lt = 0, ct = 0) => { + const ut = ot.size === 0 + if (et(st)) + return ( + at.call(nt, st, lt, ct), + tt(ot, [st, lt, ct], (ht) => ht[0] === st && ht[1] === lt && ht[2] === ct, !0), + ut && rt(), + st + ) + at.call(nt, st, lt), tt(ot, [st, lt], (ht) => ht[0] === st && ht[1] === lt, !0), ut && rt() + } + )(nt.connect)), + (nt.disconnect = ((at) => (st, lt, ct) => { + const ut = ot.size > 0 + if (st === void 0) at.apply(nt), ot.clear() + else if (typeof st == 'number') { + at.call(nt, st) + for (const dt of ot) dt[1] === st && ot.delete(dt) + } else { + et(st) ? at.call(nt, st, lt, ct) : at.call(nt, st, lt) + for (const dt of ot) + dt[0] === st && (lt === void 0 || dt[1] === lt) && (ct === void 0 || dt[2] === ct) && ot.delete(dt) + } + const ht = ot.size === 0 + ut && ht && it() + })(nt.disconnect)), + nt + ) + }, + assignNativeAudioNodeOption = (tt, et, nt) => { + const rt = et[nt] + rt !== void 0 && rt !== tt[nt] && (tt[nt] = rt) + }, + assignNativeAudioNodeOptions = (tt, et) => { + assignNativeAudioNodeOption(tt, et, 'channelCount'), + assignNativeAudioNodeOption(tt, et, 'channelCountMode'), + assignNativeAudioNodeOption(tt, et, 'channelInterpretation') + }, + testAnalyserNodeGetFloatTimeDomainDataMethodSupport = (tt) => typeof tt.getFloatTimeDomainData == 'function', + wrapAnalyserNodeGetFloatTimeDomainDataMethod = (tt) => { + tt.getFloatTimeDomainData = (et) => { + const nt = new Uint8Array(et.length) + tt.getByteTimeDomainData(nt) + const rt = Math.max(nt.length, tt.fftSize) + for (let it = 0; it < rt; it += 1) et[it] = (nt[it] - 128) * 0.0078125 + return et + } + }, + createNativeAnalyserNodeFactory = (tt, et) => (nt, rt) => { + const it = nt.createAnalyser() + if ((assignNativeAudioNodeOptions(it, rt), !(rt.maxDecibels > rt.minDecibels))) throw et() + return ( + assignNativeAudioNodeOption(it, rt, 'fftSize'), + assignNativeAudioNodeOption(it, rt, 'maxDecibels'), + assignNativeAudioNodeOption(it, rt, 'minDecibels'), + assignNativeAudioNodeOption(it, rt, 'smoothingTimeConstant'), + tt(testAnalyserNodeGetFloatTimeDomainDataMethodSupport, () => + testAnalyserNodeGetFloatTimeDomainDataMethodSupport(it), + ) || wrapAnalyserNodeGetFloatTimeDomainDataMethod(it), + it + ) + }, + createNativeAudioBufferConstructor = (tt) => + tt === null ? null : tt.hasOwnProperty('AudioBuffer') ? tt.AudioBuffer : null, + assignNativeAudioNodeAudioParamValue = (tt, et, nt) => { + const rt = et[nt] + rt !== void 0 && rt !== tt[nt].value && (tt[nt].value = rt) + }, + wrapAudioBufferSourceNodeStartMethodConsecutiveCalls = (tt) => { + tt.start = ((et) => { + let nt = !1 + return (rt = 0, it = 0, ot) => { + if (nt) throw createInvalidStateError() + et.call(tt, rt, it, ot), (nt = !0) + } + })(tt.start) + }, + wrapAudioScheduledSourceNodeStartMethodNegativeParameters = (tt) => { + tt.start = ( + (et) => + (nt = 0, rt = 0, it) => { + if ((typeof it == 'number' && it < 0) || rt < 0 || nt < 0) + throw new RangeError("The parameters can't be negative.") + et.call(tt, nt, rt, it) + } + )(tt.start) + }, + wrapAudioScheduledSourceNodeStopMethodNegativeParameters = (tt) => { + tt.stop = ( + (et) => + (nt = 0) => { + if (nt < 0) throw new RangeError("The parameter can't be negative.") + et.call(tt, nt) + } + )(tt.stop) + }, + createNativeAudioBufferSourceNodeFactory = (tt, et, nt, rt, it, ot, at, st, lt, ct, ut) => (ht, dt) => { + const pt = ht.createBufferSource() + return ( + assignNativeAudioNodeOptions(pt, dt), + assignNativeAudioNodeAudioParamValue(pt, dt, 'playbackRate'), + assignNativeAudioNodeOption(pt, dt, 'buffer'), + assignNativeAudioNodeOption(pt, dt, 'loop'), + assignNativeAudioNodeOption(pt, dt, 'loopEnd'), + assignNativeAudioNodeOption(pt, dt, 'loopStart'), + et(nt, () => nt(ht)) || wrapAudioBufferSourceNodeStartMethodConsecutiveCalls(pt), + et(rt, () => rt(ht)) || lt(pt), + et(it, () => it(ht)) || ct(pt, ht), + et(ot, () => ot(ht)) || wrapAudioScheduledSourceNodeStartMethodNegativeParameters(pt), + et(at, () => at(ht)) || ut(pt, ht), + et(st, () => st(ht)) || wrapAudioScheduledSourceNodeStopMethodNegativeParameters(pt), + tt(ht, pt), + pt + ) + }, + createNativeAudioContextConstructor = (tt) => + tt === null + ? null + : tt.hasOwnProperty('AudioContext') + ? tt.AudioContext + : tt.hasOwnProperty('webkitAudioContext') + ? tt.webkitAudioContext + : null, + createNativeAudioDestinationNodeFactory = (tt, et) => (nt, rt, it) => { + const ot = nt.destination + if (ot.channelCount !== rt) + try { + ot.channelCount = rt + } catch {} + it && ot.channelCountMode !== 'explicit' && (ot.channelCountMode = 'explicit'), + ot.maxChannelCount === 0 && Object.defineProperty(ot, 'maxChannelCount', { value: rt }) + const at = tt(nt, { + channelCount: rt, + channelCountMode: ot.channelCountMode, + channelInterpretation: ot.channelInterpretation, + gain: 1, + }) + return ( + et( + at, + 'channelCount', + (st) => () => st.call(at), + (st) => (lt) => { + st.call(at, lt) + try { + ot.channelCount = lt + } catch (ct) { + if (lt > ot.maxChannelCount) throw ct + } + }, + ), + et( + at, + 'channelCountMode', + (st) => () => st.call(at), + (st) => (lt) => { + st.call(at, lt), (ot.channelCountMode = lt) + }, + ), + et( + at, + 'channelInterpretation', + (st) => () => st.call(at), + (st) => (lt) => { + st.call(at, lt), (ot.channelInterpretation = lt) + }, + ), + Object.defineProperty(at, 'maxChannelCount', { get: () => ot.maxChannelCount }), + at.connect(ot), + at + ) + }, + createNativeAudioWorkletNodeConstructor = (tt) => + tt === null ? null : tt.hasOwnProperty('AudioWorkletNode') ? tt.AudioWorkletNode : null, + testClonabilityOfAudioWorkletNodeOptions = (tt) => { + const { port1: et } = new MessageChannel() + try { + et.postMessage(tt) + } finally { + et.close() + } + }, + createNativeAudioWorkletNodeFactory = (tt, et, nt, rt, it) => (ot, at, st, lt, ct, ut) => { + if (st !== null) + try { + const ht = new st(ot, lt, ut), + dt = new Map() + let pt = null + if ( + (Object.defineProperties(ht, { + channelCount: { + get: () => ut.channelCount, + set: () => { + throw tt() + }, + }, + channelCountMode: { + get: () => 'explicit', + set: () => { + throw tt() + }, + }, + onprocessorerror: { + get: () => pt, + set: (mt) => { + typeof pt == 'function' && ht.removeEventListener('processorerror', pt), + (pt = typeof mt == 'function' ? mt : null), + typeof pt == 'function' && ht.addEventListener('processorerror', pt) + }, + }, + }), + (ht.addEventListener = ( + (mt) => + (...gt) => { + if (gt[0] === 'processorerror') { + const yt = + typeof gt[1] == 'function' + ? gt[1] + : typeof gt[1] == 'object' && gt[1] !== null && typeof gt[1].handleEvent == 'function' + ? gt[1].handleEvent + : null + if (yt !== null) { + const bt = dt.get(gt[1]) + bt !== void 0 + ? (gt[1] = bt) + : ((gt[1] = (vt) => { + vt.type === 'error' + ? (Object.defineProperties(vt, { type: { value: 'processorerror' } }), yt(vt)) + : yt(new ErrorEvent(gt[0], { ...vt })) + }), + dt.set(yt, gt[1])) + } + } + return mt.call(ht, 'error', gt[1], gt[2]), mt.call(ht, ...gt) + } + )(ht.addEventListener)), + (ht.removeEventListener = ( + (mt) => + (...gt) => { + if (gt[0] === 'processorerror') { + const yt = dt.get(gt[1]) + yt !== void 0 && (dt.delete(gt[1]), (gt[1] = yt)) + } + return mt.call(ht, 'error', gt[1], gt[2]), mt.call(ht, gt[0], gt[1], gt[2]) + } + )(ht.removeEventListener)), + ut.numberOfOutputs !== 0) + ) { + const mt = nt(ot, { + channelCount: 1, + channelCountMode: 'explicit', + channelInterpretation: 'discrete', + gain: 0, + }) + return ( + ht.connect(mt).connect(ot.destination), + it( + ht, + () => mt.disconnect(), + () => mt.connect(ot.destination), + ) + ) + } + return ht + } catch (ht) { + throw ht.code === 11 ? rt() : ht + } + if (ct === void 0) throw rt() + return testClonabilityOfAudioWorkletNodeOptions(ut), et(ot, at, ct, ut) + }, + computeBufferSize = (tt, et) => + tt === null ? 512 : Math.max(512, Math.min(16384, Math.pow(2, Math.round(Math.log2(tt * et))))), + cloneAudioWorkletNodeOptions = (tt) => + new Promise((et, nt) => { + const { port1: rt, port2: it } = new MessageChannel() + ;(rt.onmessage = ({ data: ot }) => { + rt.close(), it.close(), et(ot) + }), + (rt.onmessageerror = ({ data: ot }) => { + rt.close(), it.close(), nt(ot) + }), + it.postMessage(tt) + }), + createAudioWorkletProcessorPromise = async (tt, et) => { + const nt = await cloneAudioWorkletNodeOptions(et) + return new tt(nt) + }, + createAudioWorkletProcessor = (tt, et, nt, rt) => { + let it = NODE_TO_PROCESSOR_MAPS.get(tt) + it === void 0 && ((it = new WeakMap()), NODE_TO_PROCESSOR_MAPS.set(tt, it)) + const ot = createAudioWorkletProcessorPromise(nt, rt) + return it.set(et, ot), ot + }, + createNativeAudioWorkletNodeFakerFactory = + (tt, et, nt, rt, it, ot, at, st, lt, ct, ut, ht, dt) => (pt, mt, gt, yt) => { + if (yt.numberOfInputs === 0 && yt.numberOfOutputs === 0) throw lt() + const bt = Array.isArray(yt.outputChannelCount) ? yt.outputChannelCount : Array.from(yt.outputChannelCount) + if (bt.some(($n) => $n < 1)) throw lt() + if (bt.length !== yt.numberOfOutputs) throw et() + if (yt.channelCountMode !== 'explicit') throw lt() + const vt = yt.channelCount * yt.numberOfInputs, + xt = bt.reduce(($n, Nn) => $n + Nn, 0), + kt = gt.parameterDescriptors === void 0 ? 0 : gt.parameterDescriptors.length + if (vt + kt > 6 || xt > 6) throw lt() + const St = new MessageChannel(), + Tt = [], + At = [] + for (let $n = 0; $n < yt.numberOfInputs; $n += 1) + Tt.push( + at(pt, { + channelCount: yt.channelCount, + channelCountMode: yt.channelCountMode, + channelInterpretation: yt.channelInterpretation, + gain: 1, + }), + ), + At.push( + it(pt, { + channelCount: yt.channelCount, + channelCountMode: 'explicit', + channelInterpretation: 'discrete', + numberOfOutputs: yt.channelCount, + }), + ) + const Et = [] + if (gt.parameterDescriptors !== void 0) + for (const { defaultValue: $n, maxValue: Nn, minValue: Tn, name: cn } of gt.parameterDescriptors) { + const mn = ot(pt, { + channelCount: 1, + channelCountMode: 'explicit', + channelInterpretation: 'discrete', + offset: yt.parameterData[cn] !== void 0 ? yt.parameterData[cn] : $n === void 0 ? 0 : $n, + }) + Object.defineProperties(mn.offset, { + defaultValue: { get: () => ($n === void 0 ? 0 : $n) }, + maxValue: { get: () => (Nn === void 0 ? MOST_POSITIVE_SINGLE_FLOAT : Nn) }, + minValue: { get: () => (Tn === void 0 ? MOST_NEGATIVE_SINGLE_FLOAT : Tn) }, + }), + Et.push(mn) + } + const $t = rt(pt, { + channelCount: 1, + channelCountMode: 'explicit', + channelInterpretation: 'speakers', + numberOfInputs: Math.max(1, vt + kt), + }), + Dt = computeBufferSize(mt, pt.sampleRate), + jt = st(pt, Dt, vt + kt, Math.max(1, xt)), + Pt = it(pt, { + channelCount: Math.max(1, xt), + channelCountMode: 'explicit', + channelInterpretation: 'discrete', + numberOfOutputs: Math.max(1, xt), + }), + Ct = [] + for (let $n = 0; $n < yt.numberOfOutputs; $n += 1) + Ct.push( + rt(pt, { + channelCount: 1, + channelCountMode: 'explicit', + channelInterpretation: 'speakers', + numberOfInputs: bt[$n], + }), + ) + for (let $n = 0; $n < yt.numberOfInputs; $n += 1) { + Tt[$n].connect(At[$n]) + for (let Nn = 0; Nn < yt.channelCount; Nn += 1) At[$n].connect($t, Nn, $n * yt.channelCount + Nn) + } + const wt = new ReadOnlyMap( + gt.parameterDescriptors === void 0 + ? [] + : gt.parameterDescriptors.map(({ name: $n }, Nn) => { + const Tn = Et[Nn] + return Tn.connect($t, 0, vt + Nn), Tn.start(0), [$n, Tn.offset] + }), + ) + $t.connect(jt) + let It = yt.channelInterpretation, + Ot = null + const Wt = yt.numberOfOutputs === 0 ? [jt] : Ct, + zt = { + get bufferSize() { + return Dt + }, + get channelCount() { + return yt.channelCount + }, + set channelCount($n) { + throw nt() + }, + get channelCountMode() { + return yt.channelCountMode + }, + set channelCountMode($n) { + throw nt() + }, + get channelInterpretation() { + return It + }, + set channelInterpretation($n) { + for (const Nn of Tt) Nn.channelInterpretation = $n + It = $n + }, + get context() { + return jt.context + }, + get inputs() { + return Tt + }, + get numberOfInputs() { + return yt.numberOfInputs + }, + get numberOfOutputs() { + return yt.numberOfOutputs + }, + get onprocessorerror() { + return Ot + }, + set onprocessorerror($n) { + typeof Ot == 'function' && zt.removeEventListener('processorerror', Ot), + (Ot = typeof $n == 'function' ? $n : null), + typeof Ot == 'function' && zt.addEventListener('processorerror', Ot) + }, + get parameters() { + return wt + }, + get port() { + return St.port2 + }, + addEventListener(...$n) { + return jt.addEventListener($n[0], $n[1], $n[2]) + }, + connect: tt.bind(null, Wt), + disconnect: ct.bind(null, Wt), + dispatchEvent(...$n) { + return jt.dispatchEvent($n[0]) + }, + removeEventListener(...$n) { + return jt.removeEventListener($n[0], $n[1], $n[2]) + }, + }, + Ft = new Map() + ;(St.port1.addEventListener = ( + ($n) => + (...Nn) => { + if (Nn[0] === 'message') { + const Tn = + typeof Nn[1] == 'function' + ? Nn[1] + : typeof Nn[1] == 'object' && Nn[1] !== null && typeof Nn[1].handleEvent == 'function' + ? Nn[1].handleEvent + : null + if (Tn !== null) { + const cn = Ft.get(Nn[1]) + cn !== void 0 + ? (Nn[1] = cn) + : ((Nn[1] = (mn) => { + ut(pt.currentTime, pt.sampleRate, () => Tn(mn)) + }), + Ft.set(Tn, Nn[1])) + } + } + return $n.call(St.port1, Nn[0], Nn[1], Nn[2]) + } + )(St.port1.addEventListener)), + (St.port1.removeEventListener = ( + ($n) => + (...Nn) => { + if (Nn[0] === 'message') { + const Tn = Ft.get(Nn[1]) + Tn !== void 0 && (Ft.delete(Nn[1]), (Nn[1] = Tn)) + } + return $n.call(St.port1, Nn[0], Nn[1], Nn[2]) + } + )(St.port1.removeEventListener)) + let Nt = null + Object.defineProperty(St.port1, 'onmessage', { + get: () => Nt, + set: ($n) => { + typeof Nt == 'function' && St.port1.removeEventListener('message', Nt), + (Nt = typeof $n == 'function' ? $n : null), + typeof Nt == 'function' && (St.port1.addEventListener('message', Nt), St.port1.start()) + }, + }), + (gt.prototype.port = St.port1) + let Ut = null + createAudioWorkletProcessor(pt, zt, gt, yt).then(($n) => (Ut = $n)) + const Ht = createNestedArrays(yt.numberOfInputs, yt.channelCount), + en = createNestedArrays(yt.numberOfOutputs, bt), + sn = + gt.parameterDescriptors === void 0 + ? [] + : gt.parameterDescriptors.reduce(($n, { name: Nn }) => ({ ...$n, [Nn]: new Float32Array(128) }), {}) + let Kt = !0 + const rn = () => { + yt.numberOfOutputs > 0 && jt.disconnect(Pt) + for (let $n = 0, Nn = 0; $n < yt.numberOfOutputs; $n += 1) { + const Tn = Ct[$n] + for (let cn = 0; cn < bt[$n]; cn += 1) Pt.disconnect(Tn, Nn + cn, cn) + Nn += bt[$n] + } + }, + nn = new Map() + jt.onaudioprocess = ({ inputBuffer: $n, outputBuffer: Nn }) => { + if (Ut !== null) { + const Tn = ht(zt) + for (let cn = 0; cn < Dt; cn += 128) { + for (let mn = 0; mn < yt.numberOfInputs; mn += 1) + for (let In = 0; In < yt.channelCount; In += 1) copyFromChannel($n, Ht[mn], In, In, cn) + gt.parameterDescriptors !== void 0 && + gt.parameterDescriptors.forEach(({ name: mn }, In) => { + copyFromChannel($n, sn, mn, vt + In, cn) + }) + for (let mn = 0; mn < yt.numberOfInputs; mn += 1) + for (let In = 0; In < bt[mn]; In += 1) + en[mn][In].byteLength === 0 && (en[mn][In] = new Float32Array(128)) + try { + const mn = Ht.map((An, wn) => { + if (Tn[wn].size > 0) return nn.set(wn, Dt / 128), An + const pn = nn.get(wn) + return pn === void 0 + ? [] + : (An.every((kn) => kn.every((Dn) => Dn === 0)) && (pn === 1 ? nn.delete(wn) : nn.set(wn, pn - 1)), + An) + }) + Kt = ut(pt.currentTime + cn / pt.sampleRate, pt.sampleRate, () => Ut.process(mn, en, sn)) + for (let An = 0, wn = 0; An < yt.numberOfOutputs; An += 1) { + for (let fn = 0; fn < bt[An]; fn += 1) copyToChannel(Nn, en[An], fn, wn + fn, cn) + wn += bt[An] + } + } catch (mn) { + ;(Kt = !1), + zt.dispatchEvent( + new ErrorEvent('processorerror', { + colno: mn.colno, + filename: mn.filename, + lineno: mn.lineno, + message: mn.message, + }), + ) + } + if (!Kt) { + for (let mn = 0; mn < yt.numberOfInputs; mn += 1) { + Tt[mn].disconnect(At[mn]) + for (let In = 0; In < yt.channelCount; In += 1) At[cn].disconnect($t, In, mn * yt.channelCount + In) + } + if (gt.parameterDescriptors !== void 0) { + const mn = gt.parameterDescriptors.length + for (let In = 0; In < mn; In += 1) { + const An = Et[In] + An.disconnect($t, 0, vt + In), An.stop() + } + } + $t.disconnect(jt), (jt.onaudioprocess = null), hn ? rn() : Qt() + break + } + } + } + } + let hn = !1 + const vn = at(pt, { + channelCount: 1, + channelCountMode: 'explicit', + channelInterpretation: 'discrete', + gain: 0, + }), + an = () => jt.connect(vn).connect(pt.destination), + Qt = () => { + jt.disconnect(vn), vn.disconnect() + }, + _n = () => { + if (Kt) { + Qt(), yt.numberOfOutputs > 0 && jt.connect(Pt) + for (let $n = 0, Nn = 0; $n < yt.numberOfOutputs; $n += 1) { + const Tn = Ct[$n] + for (let cn = 0; cn < bt[$n]; cn += 1) Pt.connect(Tn, Nn + cn, cn) + Nn += bt[$n] + } + } + hn = !0 + }, + Pn = () => { + Kt && (an(), rn()), (hn = !1) + } + return an(), dt(zt, _n, Pn) + }, + createNativeBiquadFilterNode = (tt, et) => { + const nt = tt.createBiquadFilter() + return ( + assignNativeAudioNodeOptions(nt, et), + assignNativeAudioNodeAudioParamValue(nt, et, 'Q'), + assignNativeAudioNodeAudioParamValue(nt, et, 'detune'), + assignNativeAudioNodeAudioParamValue(nt, et, 'frequency'), + assignNativeAudioNodeAudioParamValue(nt, et, 'gain'), + assignNativeAudioNodeOption(nt, et, 'type'), + nt + ) + }, + createNativeChannelMergerNodeFactory = (tt, et) => (nt, rt) => { + const it = nt.createChannelMerger(rt.numberOfInputs) + return tt !== null && tt.name === 'webkitAudioContext' && et(nt, it), assignNativeAudioNodeOptions(it, rt), it + }, + wrapChannelSplitterNode = (tt) => { + const et = tt.numberOfOutputs + Object.defineProperty(tt, 'channelCount', { + get: () => et, + set: (nt) => { + if (nt !== et) throw createInvalidStateError() + }, + }), + Object.defineProperty(tt, 'channelCountMode', { + get: () => 'explicit', + set: (nt) => { + if (nt !== 'explicit') throw createInvalidStateError() + }, + }), + Object.defineProperty(tt, 'channelInterpretation', { + get: () => 'discrete', + set: (nt) => { + if (nt !== 'discrete') throw createInvalidStateError() + }, + }) + }, + createNativeChannelSplitterNode = (tt, et) => { + const nt = tt.createChannelSplitter(et.numberOfOutputs) + return assignNativeAudioNodeOptions(nt, et), wrapChannelSplitterNode(nt), nt + }, + createNativeConstantSourceNodeFactory = (tt, et, nt, rt, it) => (ot, at) => { + if (ot.createConstantSource === void 0) return nt(ot, at) + const st = ot.createConstantSource() + return ( + assignNativeAudioNodeOptions(st, at), + assignNativeAudioNodeAudioParamValue(st, at, 'offset'), + et(rt, () => rt(ot)) || wrapAudioScheduledSourceNodeStartMethodNegativeParameters(st), + et(it, () => it(ot)) || wrapAudioScheduledSourceNodeStopMethodNegativeParameters(st), + tt(ot, st), + st + ) + }, + interceptConnections = (tt, et) => ( + (tt.connect = et.connect.bind(et)), (tt.disconnect = et.disconnect.bind(et)), tt + ), + createNativeConstantSourceNodeFakerFactory = + (tt, et, nt, rt) => + (it, { offset: ot, ...at }) => { + const st = it.createBuffer(1, 2, 44100), + lt = et(it, { + buffer: null, + channelCount: 2, + channelCountMode: 'max', + channelInterpretation: 'speakers', + loop: !1, + loopEnd: 0, + loopStart: 0, + playbackRate: 1, + }), + ct = nt(it, { ...at, gain: ot }), + ut = st.getChannelData(0) + ;(ut[0] = 1), (ut[1] = 1), (lt.buffer = st), (lt.loop = !0) + const ht = { + get bufferSize() {}, + get channelCount() { + return ct.channelCount + }, + set channelCount(mt) { + ct.channelCount = mt + }, + get channelCountMode() { + return ct.channelCountMode + }, + set channelCountMode(mt) { + ct.channelCountMode = mt + }, + get channelInterpretation() { + return ct.channelInterpretation + }, + set channelInterpretation(mt) { + ct.channelInterpretation = mt + }, + get context() { + return ct.context + }, + get inputs() { + return [] + }, + get numberOfInputs() { + return lt.numberOfInputs + }, + get numberOfOutputs() { + return ct.numberOfOutputs + }, + get offset() { + return ct.gain + }, + get onended() { + return lt.onended + }, + set onended(mt) { + lt.onended = mt + }, + addEventListener(...mt) { + return lt.addEventListener(mt[0], mt[1], mt[2]) + }, + dispatchEvent(...mt) { + return lt.dispatchEvent(mt[0]) + }, + removeEventListener(...mt) { + return lt.removeEventListener(mt[0], mt[1], mt[2]) + }, + start(mt = 0) { + lt.start.call(lt, mt) + }, + stop(mt = 0) { + lt.stop.call(lt, mt) + }, + }, + dt = () => lt.connect(ct), + pt = () => lt.disconnect(ct) + return tt(it, lt), rt(interceptConnections(ht, ct), dt, pt) + }, + createNativeConvolverNodeFactory = (tt, et) => (nt, rt) => { + const it = nt.createConvolver() + if ( + (assignNativeAudioNodeOptions(it, rt), + rt.disableNormalization === it.normalize && (it.normalize = !rt.disableNormalization), + assignNativeAudioNodeOption(it, rt, 'buffer'), + rt.channelCount > 2 || + (et( + it, + 'channelCount', + (ot) => () => ot.call(it), + (ot) => (at) => { + if (at > 2) throw tt() + return ot.call(it, at) + }, + ), + rt.channelCountMode === 'max')) + ) + throw tt() + return ( + et( + it, + 'channelCountMode', + (ot) => () => ot.call(it), + (ot) => (at) => { + if (at === 'max') throw tt() + return ot.call(it, at) + }, + ), + it + ) + }, + createNativeDelayNode = (tt, et) => { + const nt = tt.createDelay(et.maxDelayTime) + return assignNativeAudioNodeOptions(nt, et), assignNativeAudioNodeAudioParamValue(nt, et, 'delayTime'), nt + }, + createNativeDynamicsCompressorNodeFactory = (tt) => (et, nt) => { + const rt = et.createDynamicsCompressor() + if ((assignNativeAudioNodeOptions(rt, nt), nt.channelCount > 2 || nt.channelCountMode === 'max')) throw tt() + return ( + assignNativeAudioNodeAudioParamValue(rt, nt, 'attack'), + assignNativeAudioNodeAudioParamValue(rt, nt, 'knee'), + assignNativeAudioNodeAudioParamValue(rt, nt, 'ratio'), + assignNativeAudioNodeAudioParamValue(rt, nt, 'release'), + assignNativeAudioNodeAudioParamValue(rt, nt, 'threshold'), + rt + ) + }, + createNativeGainNode = (tt, et) => { + const nt = tt.createGain() + return assignNativeAudioNodeOptions(nt, et), assignNativeAudioNodeAudioParamValue(nt, et, 'gain'), nt + }, + createNativeIIRFilterNodeFactory = (tt) => (et, nt, rt) => { + if (et.createIIRFilter === void 0) return tt(et, nt, rt) + const it = et.createIIRFilter(rt.feedforward, rt.feedback) + return assignNativeAudioNodeOptions(it, rt), it + } + function divide$1(tt, et) { + const nt = et[0] * et[0] + et[1] * et[1] + return [(tt[0] * et[0] + tt[1] * et[1]) / nt, (tt[1] * et[0] - tt[0] * et[1]) / nt] + } + function multiply(tt, et) { + return [tt[0] * et[0] - tt[1] * et[1], tt[0] * et[1] + tt[1] * et[0]] + } + function evaluatePolynomial(tt, et) { + let nt = [0, 0] + for (let rt = tt.length - 1; rt >= 0; rt -= 1) (nt = multiply(nt, et)), (nt[0] += tt[rt]) + return nt + } + const createNativeIIRFilterNodeFakerFactory = + (tt, et, nt, rt) => + ( + it, + ot, + { channelCount: at, channelCountMode: st, channelInterpretation: lt, feedback: ct, feedforward: ut }, + ) => { + const ht = computeBufferSize(ot, it.sampleRate), + dt = ct instanceof Float64Array ? ct : new Float64Array(ct), + pt = ut instanceof Float64Array ? ut : new Float64Array(ut), + mt = dt.length, + gt = pt.length, + yt = Math.min(mt, gt) + if (mt === 0 || mt > 20) throw rt() + if (dt[0] === 0) throw et() + if (gt === 0 || gt > 20) throw rt() + if (pt[0] === 0) throw et() + if (dt[0] !== 1) { + for (let Et = 0; Et < gt; Et += 1) pt[Et] /= dt[0] + for (let Et = 1; Et < mt; Et += 1) dt[Et] /= dt[0] + } + const bt = nt(it, ht, at, at) + ;(bt.channelCount = at), (bt.channelCountMode = st), (bt.channelInterpretation = lt) + const vt = 32, + xt = [], + kt = [], + St = [] + for (let Et = 0; Et < at; Et += 1) { + xt.push(0) + const $t = new Float32Array(vt), + Dt = new Float32Array(vt) + $t.fill(0), Dt.fill(0), kt.push($t), St.push(Dt) + } + bt.onaudioprocess = (Et) => { + const $t = Et.inputBuffer, + Dt = Et.outputBuffer, + jt = $t.numberOfChannels + for (let Pt = 0; Pt < jt; Pt += 1) { + const Ct = $t.getChannelData(Pt), + wt = Dt.getChannelData(Pt) + xt[Pt] = filterBuffer(dt, mt, pt, gt, yt, kt[Pt], St[Pt], xt[Pt], vt, Ct, wt) + } + } + const Tt = it.sampleRate / 2 + return interceptConnections( + { + get bufferSize() { + return ht + }, + get channelCount() { + return bt.channelCount + }, + set channelCount(Et) { + bt.channelCount = Et + }, + get channelCountMode() { + return bt.channelCountMode + }, + set channelCountMode(Et) { + bt.channelCountMode = Et + }, + get channelInterpretation() { + return bt.channelInterpretation + }, + set channelInterpretation(Et) { + bt.channelInterpretation = Et + }, + get context() { + return bt.context + }, + get inputs() { + return [bt] + }, + get numberOfInputs() { + return bt.numberOfInputs + }, + get numberOfOutputs() { + return bt.numberOfOutputs + }, + addEventListener(...Et) { + return bt.addEventListener(Et[0], Et[1], Et[2]) + }, + dispatchEvent(...Et) { + return bt.dispatchEvent(Et[0]) + }, + getFrequencyResponse(Et, $t, Dt) { + if (Et.length !== $t.length || $t.length !== Dt.length) throw tt() + const jt = Et.length + for (let Pt = 0; Pt < jt; Pt += 1) { + const Ct = -Math.PI * (Et[Pt] / Tt), + wt = [Math.cos(Ct), Math.sin(Ct)], + It = evaluatePolynomial(pt, wt), + Ot = evaluatePolynomial(dt, wt), + Wt = divide$1(It, Ot) + ;($t[Pt] = Math.sqrt(Wt[0] * Wt[0] + Wt[1] * Wt[1])), (Dt[Pt] = Math.atan2(Wt[1], Wt[0])) + } + }, + removeEventListener(...Et) { + return bt.removeEventListener(Et[0], Et[1], Et[2]) + }, + }, + bt, + ) + }, + createNativeMediaElementAudioSourceNode = (tt, et) => tt.createMediaElementSource(et.mediaElement), + createNativeMediaStreamAudioDestinationNode = (tt, et) => { + const nt = tt.createMediaStreamDestination() + return ( + assignNativeAudioNodeOptions(nt, et), + nt.numberOfOutputs === 1 && Object.defineProperty(nt, 'numberOfOutputs', { get: () => 0 }), + nt + ) + }, + createNativeMediaStreamAudioSourceNode = (tt, { mediaStream: et }) => { + const nt = et.getAudioTracks() + nt.sort((ot, at) => (ot.id < at.id ? -1 : ot.id > at.id ? 1 : 0)) + const rt = nt.slice(0, 1), + it = tt.createMediaStreamSource(new MediaStream(rt)) + return Object.defineProperty(it, 'mediaStream', { value: et }), it + }, + createNativeMediaStreamTrackAudioSourceNodeFactory = + (tt, et) => + (nt, { mediaStreamTrack: rt }) => { + if (typeof nt.createMediaStreamTrackSource == 'function') return nt.createMediaStreamTrackSource(rt) + const it = new MediaStream([rt]), + ot = nt.createMediaStreamSource(it) + if (rt.kind !== 'audio') throw tt() + if (et(nt)) throw new TypeError() + return ot + }, + createNativeOfflineAudioContextConstructor = (tt) => + tt === null + ? null + : tt.hasOwnProperty('OfflineAudioContext') + ? tt.OfflineAudioContext + : tt.hasOwnProperty('webkitOfflineAudioContext') + ? tt.webkitOfflineAudioContext + : null, + createNativeOscillatorNodeFactory = (tt, et, nt, rt, it, ot) => (at, st) => { + const lt = at.createOscillator() + return ( + assignNativeAudioNodeOptions(lt, st), + assignNativeAudioNodeAudioParamValue(lt, st, 'detune'), + assignNativeAudioNodeAudioParamValue(lt, st, 'frequency'), + st.periodicWave !== void 0 ? lt.setPeriodicWave(st.periodicWave) : assignNativeAudioNodeOption(lt, st, 'type'), + et(nt, () => nt(at)) || wrapAudioScheduledSourceNodeStartMethodNegativeParameters(lt), + et(rt, () => rt(at)) || ot(lt, at), + et(it, () => it(at)) || wrapAudioScheduledSourceNodeStopMethodNegativeParameters(lt), + tt(at, lt), + lt + ) + }, + createNativePannerNodeFactory = (tt) => (et, nt) => { + const rt = et.createPanner() + return rt.orientationX === void 0 + ? tt(et, nt) + : (assignNativeAudioNodeOptions(rt, nt), + assignNativeAudioNodeAudioParamValue(rt, nt, 'orientationX'), + assignNativeAudioNodeAudioParamValue(rt, nt, 'orientationY'), + assignNativeAudioNodeAudioParamValue(rt, nt, 'orientationZ'), + assignNativeAudioNodeAudioParamValue(rt, nt, 'positionX'), + assignNativeAudioNodeAudioParamValue(rt, nt, 'positionY'), + assignNativeAudioNodeAudioParamValue(rt, nt, 'positionZ'), + assignNativeAudioNodeOption(rt, nt, 'coneInnerAngle'), + assignNativeAudioNodeOption(rt, nt, 'coneOuterAngle'), + assignNativeAudioNodeOption(rt, nt, 'coneOuterGain'), + assignNativeAudioNodeOption(rt, nt, 'distanceModel'), + assignNativeAudioNodeOption(rt, nt, 'maxDistance'), + assignNativeAudioNodeOption(rt, nt, 'panningModel'), + assignNativeAudioNodeOption(rt, nt, 'refDistance'), + assignNativeAudioNodeOption(rt, nt, 'rolloffFactor'), + rt) + }, + createNativePannerNodeFakerFactory = + (tt, et, nt, rt, it, ot, at, st, lt, ct) => + ( + ut, + { + coneInnerAngle: ht, + coneOuterAngle: dt, + coneOuterGain: pt, + distanceModel: mt, + maxDistance: gt, + orientationX: yt, + orientationY: bt, + orientationZ: vt, + panningModel: xt, + positionX: kt, + positionY: St, + positionZ: Tt, + refDistance: At, + rolloffFactor: Et, + ...$t + }, + ) => { + const Dt = ut.createPanner() + if ($t.channelCount > 2 || $t.channelCountMode === 'max') throw at() + assignNativeAudioNodeOptions(Dt, $t) + const jt = { channelCount: 1, channelCountMode: 'explicit', channelInterpretation: 'discrete' }, + Pt = nt(ut, { ...jt, channelInterpretation: 'speakers', numberOfInputs: 6 }), + Ct = rt(ut, { ...$t, gain: 1 }), + wt = rt(ut, { ...jt, gain: 1 }), + It = rt(ut, { ...jt, gain: 0 }), + Ot = rt(ut, { ...jt, gain: 0 }), + Wt = rt(ut, { ...jt, gain: 0 }), + zt = rt(ut, { ...jt, gain: 0 }), + Ft = rt(ut, { ...jt, gain: 0 }), + Nt = it(ut, 256, 6, 1), + Ut = ot(ut, { ...jt, curve: new Float32Array([1, 1]), oversample: 'none' }) + let Mt = [yt, bt, vt], + Ht = [kt, St, Tt] + const en = new Float32Array(1) + ;(Nt.onaudioprocess = ({ inputBuffer: nn }) => { + const hn = [lt(nn, en, 0), lt(nn, en, 1), lt(nn, en, 2)] + hn.some((an, Qt) => an !== Mt[Qt]) && (Dt.setOrientation(...hn), (Mt = hn)) + const vn = [lt(nn, en, 3), lt(nn, en, 4), lt(nn, en, 5)] + vn.some((an, Qt) => an !== Ht[Qt]) && (Dt.setPosition(...vn), (Ht = vn)) + }), + Object.defineProperty(It.gain, 'defaultValue', { get: () => 0 }), + Object.defineProperty(Ot.gain, 'defaultValue', { get: () => 0 }), + Object.defineProperty(Wt.gain, 'defaultValue', { get: () => 0 }), + Object.defineProperty(zt.gain, 'defaultValue', { get: () => 0 }), + Object.defineProperty(Ft.gain, 'defaultValue', { get: () => 0 }) + const sn = { + get bufferSize() {}, + get channelCount() { + return Dt.channelCount + }, + set channelCount(nn) { + if (nn > 2) throw at() + ;(Ct.channelCount = nn), (Dt.channelCount = nn) + }, + get channelCountMode() { + return Dt.channelCountMode + }, + set channelCountMode(nn) { + if (nn === 'max') throw at() + ;(Ct.channelCountMode = nn), (Dt.channelCountMode = nn) + }, + get channelInterpretation() { + return Dt.channelInterpretation + }, + set channelInterpretation(nn) { + ;(Ct.channelInterpretation = nn), (Dt.channelInterpretation = nn) + }, + get coneInnerAngle() { + return Dt.coneInnerAngle + }, + set coneInnerAngle(nn) { + Dt.coneInnerAngle = nn + }, + get coneOuterAngle() { + return Dt.coneOuterAngle + }, + set coneOuterAngle(nn) { + Dt.coneOuterAngle = nn + }, + get coneOuterGain() { + return Dt.coneOuterGain + }, + set coneOuterGain(nn) { + if (nn < 0 || nn > 1) throw et() + Dt.coneOuterGain = nn + }, + get context() { + return Dt.context + }, + get distanceModel() { + return Dt.distanceModel + }, + set distanceModel(nn) { + Dt.distanceModel = nn + }, + get inputs() { + return [Ct] + }, + get maxDistance() { + return Dt.maxDistance + }, + set maxDistance(nn) { + if (nn < 0) throw new RangeError() + Dt.maxDistance = nn + }, + get numberOfInputs() { + return Dt.numberOfInputs + }, + get numberOfOutputs() { + return Dt.numberOfOutputs + }, + get orientationX() { + return wt.gain + }, + get orientationY() { + return It.gain + }, + get orientationZ() { + return Ot.gain + }, + get panningModel() { + return Dt.panningModel + }, + set panningModel(nn) { + Dt.panningModel = nn + }, + get positionX() { + return Wt.gain + }, + get positionY() { + return zt.gain + }, + get positionZ() { + return Ft.gain + }, + get refDistance() { + return Dt.refDistance + }, + set refDistance(nn) { + if (nn < 0) throw new RangeError() + Dt.refDistance = nn + }, + get rolloffFactor() { + return Dt.rolloffFactor + }, + set rolloffFactor(nn) { + if (nn < 0) throw new RangeError() + Dt.rolloffFactor = nn + }, + addEventListener(...nn) { + return Ct.addEventListener(nn[0], nn[1], nn[2]) + }, + dispatchEvent(...nn) { + return Ct.dispatchEvent(nn[0]) + }, + removeEventListener(...nn) { + return Ct.removeEventListener(nn[0], nn[1], nn[2]) + }, + } + ht !== sn.coneInnerAngle && (sn.coneInnerAngle = ht), + dt !== sn.coneOuterAngle && (sn.coneOuterAngle = dt), + pt !== sn.coneOuterGain && (sn.coneOuterGain = pt), + mt !== sn.distanceModel && (sn.distanceModel = mt), + gt !== sn.maxDistance && (sn.maxDistance = gt), + yt !== sn.orientationX.value && (sn.orientationX.value = yt), + bt !== sn.orientationY.value && (sn.orientationY.value = bt), + vt !== sn.orientationZ.value && (sn.orientationZ.value = vt), + xt !== sn.panningModel && (sn.panningModel = xt), + kt !== sn.positionX.value && (sn.positionX.value = kt), + St !== sn.positionY.value && (sn.positionY.value = St), + Tt !== sn.positionZ.value && (sn.positionZ.value = Tt), + At !== sn.refDistance && (sn.refDistance = At), + Et !== sn.rolloffFactor && (sn.rolloffFactor = Et), + (Mt[0] !== 1 || Mt[1] !== 0 || Mt[2] !== 0) && Dt.setOrientation(...Mt), + (Ht[0] !== 0 || Ht[1] !== 0 || Ht[2] !== 0) && Dt.setPosition(...Ht) + const Kt = () => { + Ct.connect(Dt), + tt(Ct, Ut, 0, 0), + Ut.connect(wt).connect(Pt, 0, 0), + Ut.connect(It).connect(Pt, 0, 1), + Ut.connect(Ot).connect(Pt, 0, 2), + Ut.connect(Wt).connect(Pt, 0, 3), + Ut.connect(zt).connect(Pt, 0, 4), + Ut.connect(Ft).connect(Pt, 0, 5), + Pt.connect(Nt).connect(ut.destination) + }, + rn = () => { + Ct.disconnect(Dt), + st(Ct, Ut, 0, 0), + Ut.disconnect(wt), + wt.disconnect(Pt), + Ut.disconnect(It), + It.disconnect(Pt), + Ut.disconnect(Ot), + Ot.disconnect(Pt), + Ut.disconnect(Wt), + Wt.disconnect(Pt), + Ut.disconnect(zt), + zt.disconnect(Pt), + Ut.disconnect(Ft), + Ft.disconnect(Pt), + Pt.disconnect(Nt), + Nt.disconnect(ut.destination) + } + return ct(interceptConnections(sn, Dt), Kt, rn) + }, + createNativePeriodicWaveFactory = + (tt) => + (et, { disableNormalization: nt, imag: rt, real: it }) => { + const ot = rt instanceof Float32Array ? rt : new Float32Array(rt), + at = it instanceof Float32Array ? it : new Float32Array(it), + st = et.createPeriodicWave(at, ot, { disableNormalization: nt }) + if (Array.from(rt).length < 2) throw tt() + return st + }, + createNativeScriptProcessorNode = (tt, et, nt, rt) => tt.createScriptProcessor(et, nt, rt), + createNativeStereoPannerNodeFactory = (tt, et) => (nt, rt) => { + const it = rt.channelCountMode + if (it === 'clamped-max') throw et() + if (nt.createStereoPanner === void 0) return tt(nt, rt) + const ot = nt.createStereoPanner() + return ( + assignNativeAudioNodeOptions(ot, rt), + assignNativeAudioNodeAudioParamValue(ot, rt, 'pan'), + Object.defineProperty(ot, 'channelCountMode', { + get: () => it, + set: (at) => { + if (at !== it) throw et() + }, + }), + ot + ) + }, + createNativeStereoPannerNodeFakerFactory = (tt, et, nt, rt, it, ot) => { + const st = new Float32Array([1, 1]), + lt = Math.PI / 2, + ct = { channelCount: 1, channelCountMode: 'explicit', channelInterpretation: 'discrete' }, + ut = { ...ct, oversample: 'none' }, + ht = (mt, gt, yt, bt) => { + const vt = new Float32Array(16385), + xt = new Float32Array(16385) + for (let $t = 0; $t < 16385; $t += 1) { + const Dt = ($t / 16384) * lt + ;(vt[$t] = Math.cos(Dt)), (xt[$t] = Math.sin(Dt)) + } + const kt = nt(mt, { ...ct, gain: 0 }), + St = rt(mt, { ...ut, curve: vt }), + Tt = rt(mt, { ...ut, curve: st }), + At = nt(mt, { ...ct, gain: 0 }), + Et = rt(mt, { ...ut, curve: xt }) + return { + connectGraph() { + gt.connect(kt), + gt.connect(Tt.inputs === void 0 ? Tt : Tt.inputs[0]), + gt.connect(At), + Tt.connect(yt), + yt.connect(St.inputs === void 0 ? St : St.inputs[0]), + yt.connect(Et.inputs === void 0 ? Et : Et.inputs[0]), + St.connect(kt.gain), + Et.connect(At.gain), + kt.connect(bt, 0, 0), + At.connect(bt, 0, 1) + }, + disconnectGraph() { + gt.disconnect(kt), + gt.disconnect(Tt.inputs === void 0 ? Tt : Tt.inputs[0]), + gt.disconnect(At), + Tt.disconnect(yt), + yt.disconnect(St.inputs === void 0 ? St : St.inputs[0]), + yt.disconnect(Et.inputs === void 0 ? Et : Et.inputs[0]), + St.disconnect(kt.gain), + Et.disconnect(At.gain), + kt.disconnect(bt, 0, 0), + At.disconnect(bt, 0, 1) + }, + } + }, + dt = (mt, gt, yt, bt) => { + const vt = new Float32Array(16385), + xt = new Float32Array(16385), + kt = new Float32Array(16385), + St = new Float32Array(16385), + Tt = Math.floor(16385 / 2) + for (let Wt = 0; Wt < 16385; Wt += 1) + if (Wt > Tt) { + const zt = ((Wt - Tt) / (16384 - Tt)) * lt + ;(vt[Wt] = Math.cos(zt)), (xt[Wt] = Math.sin(zt)), (kt[Wt] = 0), (St[Wt] = 1) + } else { + const zt = (Wt / (16384 - Tt)) * lt + ;(vt[Wt] = 1), (xt[Wt] = 0), (kt[Wt] = Math.cos(zt)), (St[Wt] = Math.sin(zt)) + } + const At = et(mt, { + channelCount: 2, + channelCountMode: 'explicit', + channelInterpretation: 'discrete', + numberOfOutputs: 2, + }), + Et = nt(mt, { ...ct, gain: 0 }), + $t = rt(mt, { ...ut, curve: vt }), + Dt = nt(mt, { ...ct, gain: 0 }), + jt = rt(mt, { ...ut, curve: xt }), + Pt = rt(mt, { ...ut, curve: st }), + Ct = nt(mt, { ...ct, gain: 0 }), + wt = rt(mt, { ...ut, curve: kt }), + It = nt(mt, { ...ct, gain: 0 }), + Ot = rt(mt, { ...ut, curve: St }) + return { + connectGraph() { + gt.connect(At), + gt.connect(Pt.inputs === void 0 ? Pt : Pt.inputs[0]), + At.connect(Et, 0), + At.connect(Dt, 0), + At.connect(Ct, 1), + At.connect(It, 1), + Pt.connect(yt), + yt.connect($t.inputs === void 0 ? $t : $t.inputs[0]), + yt.connect(jt.inputs === void 0 ? jt : jt.inputs[0]), + yt.connect(wt.inputs === void 0 ? wt : wt.inputs[0]), + yt.connect(Ot.inputs === void 0 ? Ot : Ot.inputs[0]), + $t.connect(Et.gain), + jt.connect(Dt.gain), + wt.connect(Ct.gain), + Ot.connect(It.gain), + Et.connect(bt, 0, 0), + Ct.connect(bt, 0, 0), + Dt.connect(bt, 0, 1), + It.connect(bt, 0, 1) + }, + disconnectGraph() { + gt.disconnect(At), + gt.disconnect(Pt.inputs === void 0 ? Pt : Pt.inputs[0]), + At.disconnect(Et, 0), + At.disconnect(Dt, 0), + At.disconnect(Ct, 1), + At.disconnect(It, 1), + Pt.disconnect(yt), + yt.disconnect($t.inputs === void 0 ? $t : $t.inputs[0]), + yt.disconnect(jt.inputs === void 0 ? jt : jt.inputs[0]), + yt.disconnect(wt.inputs === void 0 ? wt : wt.inputs[0]), + yt.disconnect(Ot.inputs === void 0 ? Ot : Ot.inputs[0]), + $t.disconnect(Et.gain), + jt.disconnect(Dt.gain), + wt.disconnect(Ct.gain), + Ot.disconnect(It.gain), + Et.disconnect(bt, 0, 0), + Ct.disconnect(bt, 0, 0), + Dt.disconnect(bt, 0, 1), + It.disconnect(bt, 0, 1) + }, + } + }, + pt = (mt, gt, yt, bt, vt) => { + if (gt === 1) return ht(mt, yt, bt, vt) + if (gt === 2) return dt(mt, yt, bt, vt) + throw it() + } + return (mt, { channelCount: gt, channelCountMode: yt, pan: bt, ...vt }) => { + if (yt === 'max') throw it() + const xt = tt(mt, { ...vt, channelCount: 1, channelCountMode: yt, numberOfInputs: 2 }), + kt = nt(mt, { ...vt, channelCount: gt, channelCountMode: yt, gain: 1 }), + St = nt(mt, { channelCount: 1, channelCountMode: 'explicit', channelInterpretation: 'discrete', gain: bt }) + let { connectGraph: Tt, disconnectGraph: At } = pt(mt, gt, kt, St, xt) + Object.defineProperty(St.gain, 'defaultValue', { get: () => 0 }), + Object.defineProperty(St.gain, 'maxValue', { get: () => 1 }), + Object.defineProperty(St.gain, 'minValue', { get: () => -1 }) + const Et = { + get bufferSize() {}, + get channelCount() { + return kt.channelCount + }, + set channelCount(Pt) { + kt.channelCount !== Pt && + ($t && At(), ({ connectGraph: Tt, disconnectGraph: At } = pt(mt, Pt, kt, St, xt)), $t && Tt()), + (kt.channelCount = Pt) + }, + get channelCountMode() { + return kt.channelCountMode + }, + set channelCountMode(Pt) { + if (Pt === 'clamped-max' || Pt === 'max') throw it() + kt.channelCountMode = Pt + }, + get channelInterpretation() { + return kt.channelInterpretation + }, + set channelInterpretation(Pt) { + kt.channelInterpretation = Pt + }, + get context() { + return kt.context + }, + get inputs() { + return [kt] + }, + get numberOfInputs() { + return kt.numberOfInputs + }, + get numberOfOutputs() { + return kt.numberOfOutputs + }, + get pan() { + return St.gain + }, + addEventListener(...Pt) { + return kt.addEventListener(Pt[0], Pt[1], Pt[2]) + }, + dispatchEvent(...Pt) { + return kt.dispatchEvent(Pt[0]) + }, + removeEventListener(...Pt) { + return kt.removeEventListener(Pt[0], Pt[1], Pt[2]) + }, + } + let $t = !1 + const Dt = () => { + Tt(), ($t = !0) + }, + jt = () => { + At(), ($t = !1) + } + return ot(interceptConnections(Et, xt), Dt, jt) + } + }, + createNativeWaveShaperNodeFactory = (tt, et, nt, rt, it, ot, at) => (st, lt) => { + const ct = st.createWaveShaper() + if (ot !== null && ot.name === 'webkitAudioContext' && st.createGain().gain.automationRate === void 0) + return nt(st, lt) + assignNativeAudioNodeOptions(ct, lt) + const ut = lt.curve === null || lt.curve instanceof Float32Array ? lt.curve : new Float32Array(lt.curve) + if (ut !== null && ut.length < 2) throw et() + assignNativeAudioNodeOption(ct, { curve: ut }, 'curve'), assignNativeAudioNodeOption(ct, lt, 'oversample') + let ht = null, + dt = !1 + return ( + at( + ct, + 'curve', + (gt) => () => gt.call(ct), + (gt) => (yt) => ( + gt.call(ct, yt), + dt && (rt(yt) && ht === null ? (ht = tt(st, ct)) : !rt(yt) && ht !== null && (ht(), (ht = null))), + yt + ), + ), + it( + ct, + () => { + ;(dt = !0), rt(ct.curve) && (ht = tt(st, ct)) + }, + () => { + ;(dt = !1), ht !== null && (ht(), (ht = null)) + }, + ) + ) + }, + createNativeWaveShaperNodeFakerFactory = + (tt, et, nt, rt, it) => + (ot, { curve: at, oversample: st, ...lt }) => { + const ct = ot.createWaveShaper(), + ut = ot.createWaveShaper() + assignNativeAudioNodeOptions(ct, lt), assignNativeAudioNodeOptions(ut, lt) + const ht = nt(ot, { ...lt, gain: 1 }), + dt = nt(ot, { ...lt, gain: -1 }), + pt = nt(ot, { ...lt, gain: 1 }), + mt = nt(ot, { ...lt, gain: -1 }) + let gt = null, + yt = !1, + bt = null + const vt = { + get bufferSize() {}, + get channelCount() { + return ct.channelCount + }, + set channelCount(St) { + ;(ht.channelCount = St), + (dt.channelCount = St), + (ct.channelCount = St), + (pt.channelCount = St), + (ut.channelCount = St), + (mt.channelCount = St) + }, + get channelCountMode() { + return ct.channelCountMode + }, + set channelCountMode(St) { + ;(ht.channelCountMode = St), + (dt.channelCountMode = St), + (ct.channelCountMode = St), + (pt.channelCountMode = St), + (ut.channelCountMode = St), + (mt.channelCountMode = St) + }, + get channelInterpretation() { + return ct.channelInterpretation + }, + set channelInterpretation(St) { + ;(ht.channelInterpretation = St), + (dt.channelInterpretation = St), + (ct.channelInterpretation = St), + (pt.channelInterpretation = St), + (ut.channelInterpretation = St), + (mt.channelInterpretation = St) + }, + get context() { + return ct.context + }, + get curve() { + return bt + }, + set curve(St) { + if (St !== null && St.length < 2) throw et() + if (St === null) (ct.curve = St), (ut.curve = St) + else { + const Tt = St.length, + At = new Float32Array(Tt + 2 - (Tt % 2)), + Et = new Float32Array(Tt + 2 - (Tt % 2)) + ;(At[0] = St[0]), (Et[0] = -St[Tt - 1]) + const $t = Math.ceil((Tt + 1) / 2), + Dt = (Tt + 1) / 2 - 1 + for (let jt = 1; jt < $t; jt += 1) { + const Pt = (jt / $t) * Dt, + Ct = Math.floor(Pt), + wt = Math.ceil(Pt) + ;(At[jt] = Ct === wt ? St[Ct] : (1 - (Pt - Ct)) * St[Ct] + (1 - (wt - Pt)) * St[wt]), + (Et[jt] = + Ct === wt + ? -St[Tt - 1 - Ct] + : -((1 - (Pt - Ct)) * St[Tt - 1 - Ct]) - (1 - (wt - Pt)) * St[Tt - 1 - wt]) + } + ;(At[$t] = Tt % 2 === 1 ? St[$t - 1] : (St[$t - 2] + St[$t - 1]) / 2), (ct.curve = At), (ut.curve = Et) + } + ;(bt = St), yt && (rt(bt) && gt === null ? (gt = tt(ot, ht)) : gt !== null && (gt(), (gt = null))) + }, + get inputs() { + return [ht] + }, + get numberOfInputs() { + return ct.numberOfInputs + }, + get numberOfOutputs() { + return ct.numberOfOutputs + }, + get oversample() { + return ct.oversample + }, + set oversample(St) { + ;(ct.oversample = St), (ut.oversample = St) + }, + addEventListener(...St) { + return ht.addEventListener(St[0], St[1], St[2]) + }, + dispatchEvent(...St) { + return ht.dispatchEvent(St[0]) + }, + removeEventListener(...St) { + return ht.removeEventListener(St[0], St[1], St[2]) + }, + } + at !== null && (vt.curve = at instanceof Float32Array ? at : new Float32Array(at)), + st !== vt.oversample && (vt.oversample = st) + const xt = () => { + ht.connect(ct).connect(pt), + ht.connect(dt).connect(ut).connect(mt).connect(pt), + (yt = !0), + rt(bt) && (gt = tt(ot, ht)) + }, + kt = () => { + ht.disconnect(ct), + ct.disconnect(pt), + ht.disconnect(dt), + dt.disconnect(ut), + ut.disconnect(mt), + mt.disconnect(pt), + (yt = !1), + gt !== null && (gt(), (gt = null)) + } + return it(interceptConnections(vt, pt), xt, kt) + }, + createNotSupportedError = () => new DOMException('', 'NotSupportedError'), + DEFAULT_OPTIONS$5 = { numberOfChannels: 1 }, + createOfflineAudioContextConstructor = (tt, et, nt, rt, it) => + class extends tt { + constructor(at, st, lt) { + let ct + if (typeof at == 'number' && st !== void 0 && lt !== void 0) + ct = { length: st, numberOfChannels: at, sampleRate: lt } + else if (typeof at == 'object') ct = at + else throw new Error('The given parameters are not valid.') + const { length: ut, numberOfChannels: ht, sampleRate: dt } = { ...DEFAULT_OPTIONS$5, ...ct }, + pt = rt(ht, ut, dt) + et(testPromiseSupport, () => testPromiseSupport(pt)) || + pt.addEventListener( + 'statechange', + (() => { + let mt = 0 + const gt = (yt) => { + this._state === 'running' && + (mt > 0 + ? (pt.removeEventListener('statechange', gt), + yt.stopImmediatePropagation(), + this._waitForThePromiseToSettle(yt)) + : (mt += 1)) + } + return gt + })(), + ), + super(pt, ht), + (this._length = ut), + (this._nativeOfflineAudioContext = pt), + (this._state = null) + } + get length() { + return this._nativeOfflineAudioContext.length === void 0 + ? this._length + : this._nativeOfflineAudioContext.length + } + get state() { + return this._state === null ? this._nativeOfflineAudioContext.state : this._state + } + startRendering() { + return this._state === 'running' + ? Promise.reject(nt()) + : ((this._state = 'running'), + it(this.destination, this._nativeOfflineAudioContext).finally(() => { + ;(this._state = null), deactivateAudioGraph(this) + })) + } + _waitForThePromiseToSettle(at) { + this._state === null + ? this._nativeOfflineAudioContext.dispatchEvent(at) + : setTimeout(() => this._waitForThePromiseToSettle(at)) + } + }, + DEFAULT_OPTIONS$4 = { + channelCount: 2, + channelCountMode: 'max', + channelInterpretation: 'speakers', + detune: 0, + frequency: 440, + periodicWave: void 0, + type: 'sine', + }, + createOscillatorNodeConstructor = (tt, et, nt, rt, it, ot, at) => + class extends tt { + constructor(lt, ct) { + const ut = it(lt), + ht = { ...DEFAULT_OPTIONS$4, ...ct }, + dt = nt(ut, ht), + pt = ot(ut), + mt = pt ? rt() : null, + gt = lt.sampleRate / 2 + super(lt, !1, dt, mt), + (this._detune = et(this, pt, dt.detune, 153600, -153600)), + (this._frequency = et(this, pt, dt.frequency, gt, -gt)), + (this._nativeOscillatorNode = dt), + (this._onended = null), + (this._oscillatorNodeRenderer = mt), + this._oscillatorNodeRenderer !== null && + ht.periodicWave !== void 0 && + (this._oscillatorNodeRenderer.periodicWave = ht.periodicWave) + } + get detune() { + return this._detune + } + get frequency() { + return this._frequency + } + get onended() { + return this._onended + } + set onended(lt) { + const ct = typeof lt == 'function' ? at(this, lt) : null + this._nativeOscillatorNode.onended = ct + const ut = this._nativeOscillatorNode.onended + this._onended = ut !== null && ut === ct ? lt : ut + } + get type() { + return this._nativeOscillatorNode.type + } + set type(lt) { + ;(this._nativeOscillatorNode.type = lt), + this._oscillatorNodeRenderer !== null && (this._oscillatorNodeRenderer.periodicWave = null) + } + setPeriodicWave(lt) { + this._nativeOscillatorNode.setPeriodicWave(lt), + this._oscillatorNodeRenderer !== null && (this._oscillatorNodeRenderer.periodicWave = lt) + } + start(lt = 0) { + if ( + (this._nativeOscillatorNode.start(lt), + this._oscillatorNodeRenderer !== null && (this._oscillatorNodeRenderer.start = lt), + this.context.state !== 'closed') + ) { + setInternalStateToActive(this) + const ct = () => { + this._nativeOscillatorNode.removeEventListener('ended', ct), + isActiveAudioNode(this) && setInternalStateToPassive(this) + } + this._nativeOscillatorNode.addEventListener('ended', ct) + } + } + stop(lt = 0) { + this._nativeOscillatorNode.stop(lt), + this._oscillatorNodeRenderer !== null && (this._oscillatorNodeRenderer.stop = lt) + } + }, + createOscillatorNodeRendererFactory = (tt, et, nt, rt, it) => () => { + const ot = new WeakMap() + let at = null, + st = null, + lt = null + const ct = async (ut, ht) => { + let dt = nt(ut) + const pt = isOwnedByContext(dt, ht) + if (!pt) { + const mt = { + channelCount: dt.channelCount, + channelCountMode: dt.channelCountMode, + channelInterpretation: dt.channelInterpretation, + detune: dt.detune.value, + frequency: dt.frequency.value, + periodicWave: at === null ? void 0 : at, + type: dt.type, + } + ;(dt = et(ht, mt)), st !== null && dt.start(st), lt !== null && dt.stop(lt) + } + return ( + ot.set(ht, dt), + pt + ? (await tt(ht, ut.detune, dt.detune), await tt(ht, ut.frequency, dt.frequency)) + : (await rt(ht, ut.detune, dt.detune), await rt(ht, ut.frequency, dt.frequency)), + await it(ut, ht, dt), + dt + ) + } + return { + set periodicWave(ut) { + at = ut + }, + set start(ut) { + st = ut + }, + set stop(ut) { + lt = ut + }, + render(ut, ht) { + const dt = ot.get(ht) + return dt !== void 0 ? Promise.resolve(dt) : ct(ut, ht) + }, + } + }, + DEFAULT_OPTIONS$3 = { + channelCount: 2, + channelCountMode: 'clamped-max', + channelInterpretation: 'speakers', + coneInnerAngle: 360, + coneOuterAngle: 360, + coneOuterGain: 0, + distanceModel: 'inverse', + maxDistance: 1e4, + orientationX: 1, + orientationY: 0, + orientationZ: 0, + panningModel: 'equalpower', + positionX: 0, + positionY: 0, + positionZ: 0, + refDistance: 1, + rolloffFactor: 1, + }, + createPannerNodeConstructor = (tt, et, nt, rt, it, ot, at) => + class extends tt { + constructor(lt, ct) { + const ut = it(lt), + ht = { ...DEFAULT_OPTIONS$3, ...ct }, + dt = nt(ut, ht), + pt = ot(ut), + mt = pt ? rt() : null + super(lt, !1, dt, mt), + (this._nativePannerNode = dt), + (this._orientationX = et( + this, + pt, + dt.orientationX, + MOST_POSITIVE_SINGLE_FLOAT, + MOST_NEGATIVE_SINGLE_FLOAT, + )), + (this._orientationY = et( + this, + pt, + dt.orientationY, + MOST_POSITIVE_SINGLE_FLOAT, + MOST_NEGATIVE_SINGLE_FLOAT, + )), + (this._orientationZ = et( + this, + pt, + dt.orientationZ, + MOST_POSITIVE_SINGLE_FLOAT, + MOST_NEGATIVE_SINGLE_FLOAT, + )), + (this._positionX = et(this, pt, dt.positionX, MOST_POSITIVE_SINGLE_FLOAT, MOST_NEGATIVE_SINGLE_FLOAT)), + (this._positionY = et(this, pt, dt.positionY, MOST_POSITIVE_SINGLE_FLOAT, MOST_NEGATIVE_SINGLE_FLOAT)), + (this._positionZ = et(this, pt, dt.positionZ, MOST_POSITIVE_SINGLE_FLOAT, MOST_NEGATIVE_SINGLE_FLOAT)), + at(this, 1) + } + get coneInnerAngle() { + return this._nativePannerNode.coneInnerAngle + } + set coneInnerAngle(lt) { + this._nativePannerNode.coneInnerAngle = lt + } + get coneOuterAngle() { + return this._nativePannerNode.coneOuterAngle + } + set coneOuterAngle(lt) { + this._nativePannerNode.coneOuterAngle = lt + } + get coneOuterGain() { + return this._nativePannerNode.coneOuterGain + } + set coneOuterGain(lt) { + this._nativePannerNode.coneOuterGain = lt + } + get distanceModel() { + return this._nativePannerNode.distanceModel + } + set distanceModel(lt) { + this._nativePannerNode.distanceModel = lt + } + get maxDistance() { + return this._nativePannerNode.maxDistance + } + set maxDistance(lt) { + this._nativePannerNode.maxDistance = lt + } + get orientationX() { + return this._orientationX + } + get orientationY() { + return this._orientationY + } + get orientationZ() { + return this._orientationZ + } + get panningModel() { + return this._nativePannerNode.panningModel + } + set panningModel(lt) { + this._nativePannerNode.panningModel = lt + } + get positionX() { + return this._positionX + } + get positionY() { + return this._positionY + } + get positionZ() { + return this._positionZ + } + get refDistance() { + return this._nativePannerNode.refDistance + } + set refDistance(lt) { + this._nativePannerNode.refDistance = lt + } + get rolloffFactor() { + return this._nativePannerNode.rolloffFactor + } + set rolloffFactor(lt) { + this._nativePannerNode.rolloffFactor = lt + } + }, + createPannerNodeRendererFactory = (tt, et, nt, rt, it, ot, at, st, lt, ct) => () => { + const ut = new WeakMap() + let ht = null + const dt = async (pt, mt) => { + let gt = null, + yt = ot(pt) + const bt = { + channelCount: yt.channelCount, + channelCountMode: yt.channelCountMode, + channelInterpretation: yt.channelInterpretation, + }, + vt = { + ...bt, + coneInnerAngle: yt.coneInnerAngle, + coneOuterAngle: yt.coneOuterAngle, + coneOuterGain: yt.coneOuterGain, + distanceModel: yt.distanceModel, + maxDistance: yt.maxDistance, + panningModel: yt.panningModel, + refDistance: yt.refDistance, + rolloffFactor: yt.rolloffFactor, + }, + xt = isOwnedByContext(yt, mt) + if ('bufferSize' in yt) gt = rt(mt, { ...bt, gain: 1 }) + else if (!xt) { + const kt = { + ...vt, + orientationX: yt.orientationX.value, + orientationY: yt.orientationY.value, + orientationZ: yt.orientationZ.value, + positionX: yt.positionX.value, + positionY: yt.positionY.value, + positionZ: yt.positionZ.value, + } + yt = it(mt, kt) + } + if ((ut.set(mt, gt === null ? yt : gt), gt !== null)) { + if (ht === null) { + if (at === null) throw new Error('Missing the native OfflineAudioContext constructor.') + const jt = new at(6, pt.context.length, mt.sampleRate), + Pt = et(jt, { + channelCount: 1, + channelCountMode: 'explicit', + channelInterpretation: 'speakers', + numberOfInputs: 6, + }) + Pt.connect(jt.destination), + (ht = (async () => { + const Ct = await Promise.all( + [pt.orientationX, pt.orientationY, pt.orientationZ, pt.positionX, pt.positionY, pt.positionZ].map( + async (wt, It) => { + const Ot = nt(jt, { + channelCount: 1, + channelCountMode: 'explicit', + channelInterpretation: 'discrete', + offset: It === 0 ? 1 : 0, + }) + return await st(jt, wt, Ot.offset), Ot + }, + ), + ) + for (let wt = 0; wt < 6; wt += 1) Ct[wt].connect(Pt, 0, wt), Ct[wt].start(0) + return ct(jt) + })()) + } + const kt = await ht, + St = rt(mt, { ...bt, gain: 1 }) + await lt(pt, mt, St) + const Tt = [] + for (let jt = 0; jt < kt.numberOfChannels; jt += 1) Tt.push(kt.getChannelData(jt)) + let At = [Tt[0][0], Tt[1][0], Tt[2][0]], + Et = [Tt[3][0], Tt[4][0], Tt[5][0]], + $t = rt(mt, { ...bt, gain: 1 }), + Dt = it(mt, { + ...vt, + orientationX: At[0], + orientationY: At[1], + orientationZ: At[2], + positionX: Et[0], + positionY: Et[1], + positionZ: Et[2], + }) + St.connect($t).connect(Dt.inputs[0]), Dt.connect(gt) + for (let jt = 128; jt < kt.length; jt += 128) { + const Pt = [Tt[0][jt], Tt[1][jt], Tt[2][jt]], + Ct = [Tt[3][jt], Tt[4][jt], Tt[5][jt]] + if (Pt.some((wt, It) => wt !== At[It]) || Ct.some((wt, It) => wt !== Et[It])) { + ;(At = Pt), (Et = Ct) + const wt = jt / mt.sampleRate + $t.gain.setValueAtTime(0, wt), + ($t = rt(mt, { ...bt, gain: 0 })), + (Dt = it(mt, { + ...vt, + orientationX: At[0], + orientationY: At[1], + orientationZ: At[2], + positionX: Et[0], + positionY: Et[1], + positionZ: Et[2], + })), + $t.gain.setValueAtTime(1, wt), + St.connect($t).connect(Dt.inputs[0]), + Dt.connect(gt) + } + } + return gt + } + return ( + xt + ? (await tt(mt, pt.orientationX, yt.orientationX), + await tt(mt, pt.orientationY, yt.orientationY), + await tt(mt, pt.orientationZ, yt.orientationZ), + await tt(mt, pt.positionX, yt.positionX), + await tt(mt, pt.positionY, yt.positionY), + await tt(mt, pt.positionZ, yt.positionZ)) + : (await st(mt, pt.orientationX, yt.orientationX), + await st(mt, pt.orientationY, yt.orientationY), + await st(mt, pt.orientationZ, yt.orientationZ), + await st(mt, pt.positionX, yt.positionX), + await st(mt, pt.positionY, yt.positionY), + await st(mt, pt.positionZ, yt.positionZ)), + isNativeAudioNodeFaker(yt) ? await lt(pt, mt, yt.inputs[0]) : await lt(pt, mt, yt), + yt + ) + } + return { + render(pt, mt) { + const gt = ut.get(mt) + return gt !== void 0 ? Promise.resolve(gt) : dt(pt, mt) + }, + } + }, + DEFAULT_OPTIONS$2 = { disableNormalization: !1 }, + createPeriodicWaveConstructor = (tt, et, nt, rt) => + class vw { + constructor(ot, at) { + const st = et(ot), + lt = rt({ ...DEFAULT_OPTIONS$2, ...at }), + ct = tt(st, lt) + return nt.add(ct), ct + } + static [Symbol.hasInstance](ot) { + return (ot !== null && typeof ot == 'object' && Object.getPrototypeOf(ot) === vw.prototype) || nt.has(ot) + } + }, + createRenderAutomation = (tt, et) => (nt, rt, it) => (tt(rt).replay(it), et(rt, nt, it)), + createRenderInputsOfAudioNode = (tt, et, nt) => async (rt, it, ot) => { + const at = tt(rt) + await Promise.all( + at.activeInputs + .map((st, lt) => + Array.from(st).map(async ([ct, ut]) => { + const dt = await et(ct).render(ct, it), + pt = rt.context.destination + !nt(ct) && (rt !== pt || !nt(rt)) && dt.connect(ot, ut, lt) + }), + ) + .reduce((st, lt) => [...st, ...lt], []), + ) + }, + createRenderInputsOfAudioParam = (tt, et, nt) => async (rt, it, ot) => { + const at = et(rt) + await Promise.all( + Array.from(at.activeInputs).map(async ([st, lt]) => { + const ut = await tt(st).render(st, it) + nt(st) || ut.connect(ot, lt) + }), + ) + }, + createRenderNativeOfflineAudioContext = (tt, et, nt, rt) => (it) => + tt(testPromiseSupport, () => testPromiseSupport(it)) + ? Promise.resolve(tt(rt, rt)).then((ot) => { + if (!ot) { + const at = nt(it, 512, 0, 1) + ;(it.oncomplete = () => { + ;(at.onaudioprocess = null), at.disconnect() + }), + (at.onaudioprocess = () => it.currentTime), + at.connect(it.destination) + } + return it.startRendering() + }) + : new Promise((ot) => { + const at = et(it, { + channelCount: 1, + channelCountMode: 'explicit', + channelInterpretation: 'discrete', + gain: 0, + }) + ;(it.oncomplete = (st) => { + at.disconnect(), ot(st.renderedBuffer) + }), + at.connect(it.destination), + it.startRendering() + }), + createSetActiveAudioWorkletNodeInputs = (tt) => (et, nt) => { + tt.set(et, nt) + }, + createSetAudioNodeTailTime = (tt) => (et, nt) => tt.set(et, nt), + createStartRendering = (tt, et, nt, rt, it, ot, at, st) => (lt, ct) => + nt(lt) + .render(lt, ct) + .then(() => Promise.all(Array.from(rt(ct)).map((ut) => nt(ut).render(ut, ct)))) + .then(() => it(ct)) + .then( + (ut) => ( + typeof ut.copyFromChannel != 'function' + ? (at(ut), wrapAudioBufferGetChannelDataMethod(ut)) + : et(ot, () => ot(ut)) || st(ut), + tt.add(ut), + ut + ), + ), + DEFAULT_OPTIONS$1 = { channelCount: 2, channelCountMode: 'explicit', channelInterpretation: 'speakers', pan: 0 }, + createStereoPannerNodeConstructor = (tt, et, nt, rt, it, ot) => + class extends tt { + constructor(st, lt) { + const ct = it(st), + ut = { ...DEFAULT_OPTIONS$1, ...lt }, + ht = nt(ct, ut), + dt = ot(ct), + pt = dt ? rt() : null + super(st, !1, ht, pt), (this._pan = et(this, dt, ht.pan)) + } + get pan() { + return this._pan + } + }, + createStereoPannerNodeRendererFactory = (tt, et, nt, rt, it) => () => { + const ot = new WeakMap(), + at = async (st, lt) => { + let ct = nt(st) + const ut = isOwnedByContext(ct, lt) + if (!ut) { + const ht = { + channelCount: ct.channelCount, + channelCountMode: ct.channelCountMode, + channelInterpretation: ct.channelInterpretation, + pan: ct.pan.value, + } + ct = et(lt, ht) + } + return ( + ot.set(lt, ct), + ut ? await tt(lt, st.pan, ct.pan) : await rt(lt, st.pan, ct.pan), + isNativeAudioNodeFaker(ct) ? await it(st, lt, ct.inputs[0]) : await it(st, lt, ct), + ct + ) + } + return { + render(st, lt) { + const ct = ot.get(lt) + return ct !== void 0 ? Promise.resolve(ct) : at(st, lt) + }, + } + }, + createTestAudioBufferConstructorSupport = (tt) => () => { + if (tt === null) return !1 + try { + new tt({ length: 1, sampleRate: 44100 }) + } catch { + return !1 + } + return !0 + }, + createTestAudioWorkletProcessorPostMessageSupport = (tt, et) => async () => { + if (tt === null) return !0 + if (et === null) return !1 + const nt = new Blob( + [ + 'class A extends AudioWorkletProcessor{process(i){this.port.postMessage(i,[i[0][0].buffer])}}registerProcessor("a",A)', + ], + { type: 'application/javascript; charset=utf-8' }, + ), + rt = new et(1, 128, 44100), + it = URL.createObjectURL(nt) + let ot = !1, + at = !1 + try { + await rt.audioWorklet.addModule(it) + const st = new tt(rt, 'a', { numberOfOutputs: 0 }), + lt = rt.createOscillator() + ;(st.port.onmessage = () => (ot = !0)), + (st.onprocessorerror = () => (at = !0)), + lt.connect(st), + lt.start(0), + await rt.startRendering(), + await new Promise((ct) => setTimeout(ct)) + } catch { + } finally { + URL.revokeObjectURL(it) + } + return ot && !at + }, + createTestOfflineAudioContextCurrentTimeSupport = (tt, et) => () => { + if (et === null) return Promise.resolve(!1) + const nt = new et(1, 1, 44100), + rt = tt(nt, { channelCount: 1, channelCountMode: 'explicit', channelInterpretation: 'discrete', gain: 0 }) + return new Promise((it) => { + ;(nt.oncomplete = () => { + rt.disconnect(), it(nt.currentTime !== 0) + }), + nt.startRendering() + }) + }, + createUnknownError = () => new DOMException('', 'UnknownError'), + DEFAULT_OPTIONS = { + channelCount: 2, + channelCountMode: 'max', + channelInterpretation: 'speakers', + curve: null, + oversample: 'none', + }, + createWaveShaperNodeConstructor = (tt, et, nt, rt, it, ot, at) => + class extends tt { + constructor(lt, ct) { + const ut = it(lt), + ht = { ...DEFAULT_OPTIONS, ...ct }, + dt = nt(ut, ht), + mt = ot(ut) ? rt() : null + super(lt, !0, dt, mt), (this._isCurveNullified = !1), (this._nativeWaveShaperNode = dt), at(this, 1) + } + get curve() { + return this._isCurveNullified ? null : this._nativeWaveShaperNode.curve + } + set curve(lt) { + if (lt === null) (this._isCurveNullified = !0), (this._nativeWaveShaperNode.curve = new Float32Array([0, 0])) + else { + if (lt.length < 2) throw et() + ;(this._isCurveNullified = !1), (this._nativeWaveShaperNode.curve = lt) + } + } + get oversample() { + return this._nativeWaveShaperNode.oversample + } + set oversample(lt) { + this._nativeWaveShaperNode.oversample = lt + } + }, + createWaveShaperNodeRendererFactory = (tt, et, nt) => () => { + const rt = new WeakMap(), + it = async (ot, at) => { + let st = et(ot) + if (!isOwnedByContext(st, at)) { + const ct = { + channelCount: st.channelCount, + channelCountMode: st.channelCountMode, + channelInterpretation: st.channelInterpretation, + curve: st.curve, + oversample: st.oversample, + } + st = tt(at, ct) + } + return rt.set(at, st), isNativeAudioNodeFaker(st) ? await nt(ot, at, st.inputs[0]) : await nt(ot, at, st), st + } + return { + render(ot, at) { + const st = rt.get(at) + return st !== void 0 ? Promise.resolve(st) : it(ot, at) + }, + } + }, + createWindow = () => (typeof window > 'u' ? null : window), + createWrapAudioBufferCopyChannelMethods = (tt, et) => (nt) => { + ;(nt.copyFromChannel = (rt, it, ot = 0) => { + const at = tt(ot), + st = tt(it) + if (st >= nt.numberOfChannels) throw et() + const lt = nt.length, + ct = nt.getChannelData(st), + ut = rt.length + for (let ht = at < 0 ? -at : 0; ht + at < lt && ht < ut; ht += 1) rt[ht] = ct[ht + at] + }), + (nt.copyToChannel = (rt, it, ot = 0) => { + const at = tt(ot), + st = tt(it) + if (st >= nt.numberOfChannels) throw et() + const lt = nt.length, + ct = nt.getChannelData(st), + ut = rt.length + for (let ht = at < 0 ? -at : 0; ht + at < lt && ht < ut; ht += 1) ct[ht + at] = rt[ht] + }) + }, + createWrapAudioBufferCopyChannelMethodsOutOfBounds = (tt) => (et) => { + ;(et.copyFromChannel = ( + (nt) => + (rt, it, ot = 0) => { + const at = tt(ot), + st = tt(it) + if (at < et.length) return nt.call(et, rt, st, at) + } + )(et.copyFromChannel)), + (et.copyToChannel = ( + (nt) => + (rt, it, ot = 0) => { + const at = tt(ot), + st = tt(it) + if (at < et.length) return nt.call(et, rt, st, at) + } + )(et.copyToChannel)) + }, + createWrapAudioBufferSourceNodeStopMethodNullifiedBuffer = (tt) => (et, nt) => { + const rt = nt.createBuffer(1, 1, 44100) + et.buffer === null && (et.buffer = rt), + tt( + et, + 'buffer', + (it) => () => { + const ot = it.call(et) + return ot === rt ? null : ot + }, + (it) => (ot) => it.call(et, ot === null ? rt : ot), + ) + }, + createWrapChannelMergerNode = (tt, et) => (nt, rt) => { + ;(rt.channelCount = 1), + (rt.channelCountMode = 'explicit'), + Object.defineProperty(rt, 'channelCount', { + get: () => 1, + set: () => { + throw tt() + }, + }), + Object.defineProperty(rt, 'channelCountMode', { + get: () => 'explicit', + set: () => { + throw tt() + }, + }) + const it = nt.createBufferSource() + et( + rt, + () => { + const st = rt.numberOfInputs + for (let lt = 0; lt < st; lt += 1) it.connect(rt, 0, lt) + }, + () => it.disconnect(rt), + ) + }, + getFirstSample = (tt, et, nt) => + tt.copyFromChannel === void 0 ? tt.getChannelData(nt)[0] : (tt.copyFromChannel(et, nt), et[0]), + isDCCurve = (tt) => { + if (tt === null) return !1 + const et = tt.length + return et % 2 !== 0 ? tt[Math.floor(et / 2)] !== 0 : tt[et / 2 - 1] + tt[et / 2] !== 0 + }, + overwriteAccessors = (tt, et, nt, rt) => { + let it = tt + for (; !it.hasOwnProperty(et); ) it = Object.getPrototypeOf(it) + const { get: ot, set: at } = Object.getOwnPropertyDescriptor(it, et) + Object.defineProperty(tt, et, { get: nt(ot), set: rt(at) }) + }, + sanitizeAudioWorkletNodeOptions = (tt) => ({ + ...tt, + outputChannelCount: + tt.outputChannelCount !== void 0 + ? tt.outputChannelCount + : tt.numberOfInputs === 1 && tt.numberOfOutputs === 1 + ? [tt.channelCount] + : Array.from({ length: tt.numberOfOutputs }, () => 1), + }), + sanitizeChannelSplitterOptions = (tt) => ({ ...tt, channelCount: tt.numberOfOutputs }), + sanitizePeriodicWaveOptions = (tt) => { + const { imag: et, real: nt } = tt + return et === void 0 + ? nt === void 0 + ? { ...tt, imag: [0, 0], real: [0, 0] } + : { ...tt, imag: Array.from(nt, () => 0), real: nt } + : nt === void 0 + ? { ...tt, imag: et, real: Array.from(et, () => 0) } + : { ...tt, imag: et, real: nt } + }, + setValueAtTimeUntilPossible = (tt, et, nt) => { + try { + tt.setValueAtTime(et, nt) + } catch (rt) { + if (rt.code !== 9) throw rt + setValueAtTimeUntilPossible(tt, et, nt + 1e-7) + } + }, + testAudioBufferSourceNodeStartMethodConsecutiveCallsSupport = (tt) => { + const et = tt.createBufferSource() + et.start() + try { + et.start() + } catch { + return !0 + } + return !1 + }, + testAudioBufferSourceNodeStartMethodOffsetClampingSupport = (tt) => { + const et = tt.createBufferSource(), + nt = tt.createBuffer(1, 1, 44100) + et.buffer = nt + try { + et.start(0, 1) + } catch { + return !1 + } + return !0 + }, + testAudioBufferSourceNodeStopMethodNullifiedBufferSupport = (tt) => { + const et = tt.createBufferSource() + et.start() + try { + et.stop() + } catch { + return !1 + } + return !0 + }, + testAudioScheduledSourceNodeStartMethodNegativeParametersSupport = (tt) => { + const et = tt.createOscillator() + try { + et.start(-1) + } catch (nt) { + return nt instanceof RangeError + } + return !1 + }, + testAudioScheduledSourceNodeStopMethodConsecutiveCallsSupport = (tt) => { + const et = tt.createBuffer(1, 1, 44100), + nt = tt.createBufferSource() + ;(nt.buffer = et), nt.start(), nt.stop() + try { + return nt.stop(), !0 + } catch { + return !1 + } + }, + testAudioScheduledSourceNodeStopMethodNegativeParametersSupport = (tt) => { + const et = tt.createOscillator() + try { + et.stop(-1) + } catch (nt) { + return nt instanceof RangeError + } + return !1 + }, + testAudioWorkletNodeOptionsClonability = (tt) => { + const { port1: et, port2: nt } = new MessageChannel() + try { + et.postMessage(tt) + } finally { + et.close(), nt.close() + } + }, + wrapAudioBufferSourceNodeStartMethodOffsetClamping = (tt) => { + tt.start = ( + (et) => + (nt = 0, rt = 0, it) => { + const ot = tt.buffer, + at = ot === null ? rt : Math.min(ot.duration, rt) + ot !== null && at > ot.duration - 0.5 / tt.context.sampleRate + ? et.call(tt, nt, 0, 0) + : et.call(tt, nt, at, it) + } + )(tt.start) + }, + wrapAudioScheduledSourceNodeStopMethodConsecutiveCalls = (tt, et) => { + const nt = et.createGain() + tt.connect(nt) + const rt = ((it) => () => { + it.call(tt, nt), tt.removeEventListener('ended', rt) + })(tt.disconnect) + tt.addEventListener('ended', rt), + interceptConnections(tt, nt), + (tt.stop = ((it) => { + let ot = !1 + return (at = 0) => { + if (ot) + try { + it.call(tt, at) + } catch { + nt.gain.setValueAtTime(0, at) + } + else it.call(tt, at), (ot = !0) + } + })(tt.stop)) + }, + wrapEventListener = (tt, et) => (nt) => { + const rt = { value: tt } + return ( + Object.defineProperties(nt, { currentTarget: rt, target: rt }), + typeof et == 'function' ? et.call(tt, nt) : et.handleEvent.call(tt, nt) + ) + }, + addActiveInputConnectionToAudioNode = createAddActiveInputConnectionToAudioNode(insertElementInSet), + addPassiveInputConnectionToAudioNode = createAddPassiveInputConnectionToAudioNode(insertElementInSet), + deleteActiveInputConnectionToAudioNode = createDeleteActiveInputConnectionToAudioNode(pickElementFromSet), + audioNodeTailTimeStore = new WeakMap(), + getAudioNodeTailTime = createGetAudioNodeTailTime(audioNodeTailTimeStore), + cacheTestResult = createCacheTestResult(new Map(), new WeakMap()), + window$1 = createWindow(), + createNativeAnalyserNode = createNativeAnalyserNodeFactory(cacheTestResult, createIndexSizeError), + getAudioNodeRenderer = createGetAudioNodeRenderer(getAudioNodeConnections), + renderInputsOfAudioNode = createRenderInputsOfAudioNode( + getAudioNodeConnections, + getAudioNodeRenderer, + isPartOfACycle, + ), + createAnalyserNodeRenderer = createAnalyserNodeRendererFactory( + createNativeAnalyserNode, + getNativeAudioNode, + renderInputsOfAudioNode, + ), + getNativeContext = createGetNativeContext(CONTEXT_STORE), + nativeOfflineAudioContextConstructor = createNativeOfflineAudioContextConstructor(window$1), + isNativeOfflineAudioContext = createIsNativeOfflineAudioContext(nativeOfflineAudioContextConstructor), + audioParamAudioNodeStore = new WeakMap(), + eventTargetConstructor = createEventTargetConstructor(wrapEventListener), + nativeAudioContextConstructor = createNativeAudioContextConstructor(window$1), + isNativeAudioContext = createIsNativeAudioContext(nativeAudioContextConstructor), + isNativeAudioNode = createIsNativeAudioNode(window$1), + isNativeAudioParam = createIsNativeAudioParam(window$1), + nativeAudioWorkletNodeConstructor = createNativeAudioWorkletNodeConstructor(window$1), + audioNodeConstructor = createAudioNodeConstructor( + createAddAudioNodeConnections(AUDIO_NODE_CONNECTIONS_STORE), + createAddConnectionToAudioNode( + addActiveInputConnectionToAudioNode, + addPassiveInputConnectionToAudioNode, + connectNativeAudioNodeToNativeAudioNode, + deleteActiveInputConnectionToAudioNode, + disconnectNativeAudioNodeFromNativeAudioNode, + getAudioNodeConnections, + getAudioNodeTailTime, + getEventListenersOfAudioNode, + getNativeAudioNode, + insertElementInSet, + isActiveAudioNode, + isPartOfACycle, + isPassiveAudioNode, + ), + cacheTestResult, + createIncrementCycleCounterFactory( + CYCLE_COUNTERS, + disconnectNativeAudioNodeFromNativeAudioNode, + getAudioNodeConnections, + getNativeAudioNode, + getNativeAudioParam, + isActiveAudioNode, + ), + createIndexSizeError, + createInvalidAccessError, + createNotSupportedError, + createDecrementCycleCounter( + connectNativeAudioNodeToNativeAudioNode, + CYCLE_COUNTERS, + getAudioNodeConnections, + getNativeAudioNode, + getNativeAudioParam, + getNativeContext, + isActiveAudioNode, + isNativeOfflineAudioContext, + ), + createDetectCycles(audioParamAudioNodeStore, getAudioNodeConnections, getValueForKey), + eventTargetConstructor, + getNativeContext, + isNativeAudioContext, + isNativeAudioNode, + isNativeAudioParam, + isNativeOfflineAudioContext, + nativeAudioWorkletNodeConstructor, + ), + analyserNodeConstructor = createAnalyserNodeConstructor( + audioNodeConstructor, + createAnalyserNodeRenderer, + createIndexSizeError, + createNativeAnalyserNode, + getNativeContext, + isNativeOfflineAudioContext, + ), + audioBufferStore = new WeakSet(), + nativeAudioBufferConstructor = createNativeAudioBufferConstructor(window$1), + convertNumberToUnsignedLong = createConvertNumberToUnsignedLong(new Uint32Array(1)), + wrapAudioBufferCopyChannelMethods = createWrapAudioBufferCopyChannelMethods( + convertNumberToUnsignedLong, + createIndexSizeError, + ), + wrapAudioBufferCopyChannelMethodsOutOfBounds = + createWrapAudioBufferCopyChannelMethodsOutOfBounds(convertNumberToUnsignedLong), + audioBufferConstructor = createAudioBufferConstructor( + audioBufferStore, + cacheTestResult, + createNotSupportedError, + nativeAudioBufferConstructor, + nativeOfflineAudioContextConstructor, + createTestAudioBufferConstructorSupport(nativeAudioBufferConstructor), + wrapAudioBufferCopyChannelMethods, + wrapAudioBufferCopyChannelMethodsOutOfBounds, + ), + addSilentConnection = createAddSilentConnection(createNativeGainNode), + renderInputsOfAudioParam = createRenderInputsOfAudioParam( + getAudioNodeRenderer, + getAudioParamConnections, + isPartOfACycle, + ), + connectAudioParam = createConnectAudioParam(renderInputsOfAudioParam), + createNativeAudioBufferSourceNode = createNativeAudioBufferSourceNodeFactory( + addSilentConnection, + cacheTestResult, + testAudioBufferSourceNodeStartMethodConsecutiveCallsSupport, + testAudioBufferSourceNodeStartMethodOffsetClampingSupport, + testAudioBufferSourceNodeStopMethodNullifiedBufferSupport, + testAudioScheduledSourceNodeStartMethodNegativeParametersSupport, + testAudioScheduledSourceNodeStopMethodConsecutiveCallsSupport, + testAudioScheduledSourceNodeStopMethodNegativeParametersSupport, + wrapAudioBufferSourceNodeStartMethodOffsetClamping, + createWrapAudioBufferSourceNodeStopMethodNullifiedBuffer(overwriteAccessors), + wrapAudioScheduledSourceNodeStopMethodConsecutiveCalls, + ), + renderAutomation = createRenderAutomation( + createGetAudioParamRenderer(getAudioParamConnections), + renderInputsOfAudioParam, + ), + createAudioBufferSourceNodeRenderer = createAudioBufferSourceNodeRendererFactory( + connectAudioParam, + createNativeAudioBufferSourceNode, + getNativeAudioNode, + renderAutomation, + renderInputsOfAudioNode, + ), + createAudioParam = createAudioParamFactory( + createAddAudioParamConnections(AUDIO_PARAM_CONNECTIONS_STORE), + audioParamAudioNodeStore, + AUDIO_PARAM_STORE, + createAudioParamRenderer, + createCancelAndHoldAutomationEvent, + createCancelScheduledValuesAutomationEvent, + createExponentialRampToValueAutomationEvent, + createLinearRampToValueAutomationEvent, + createSetTargetAutomationEvent, + createSetValueAutomationEvent, + createSetValueCurveAutomationEvent, + nativeAudioContextConstructor, + setValueAtTimeUntilPossible, + ), + audioBufferSourceNodeConstructor = createAudioBufferSourceNodeConstructor( + audioNodeConstructor, + createAudioBufferSourceNodeRenderer, + createAudioParam, + createInvalidStateError, + createNativeAudioBufferSourceNode, + getNativeContext, + isNativeOfflineAudioContext, + wrapEventListener, + ), + audioDestinationNodeConstructor = createAudioDestinationNodeConstructor( + audioNodeConstructor, + createAudioDestinationNodeRenderer, + createIndexSizeError, + createInvalidStateError, + createNativeAudioDestinationNodeFactory(createNativeGainNode, overwriteAccessors), + getNativeContext, + isNativeOfflineAudioContext, + renderInputsOfAudioNode, + ), + createBiquadFilterNodeRenderer = createBiquadFilterNodeRendererFactory( + connectAudioParam, + createNativeBiquadFilterNode, + getNativeAudioNode, + renderAutomation, + renderInputsOfAudioNode, + ), + setAudioNodeTailTime = createSetAudioNodeTailTime(audioNodeTailTimeStore), + biquadFilterNodeConstructor = createBiquadFilterNodeConstructor( + audioNodeConstructor, + createAudioParam, + createBiquadFilterNodeRenderer, + createInvalidAccessError, + createNativeBiquadFilterNode, + getNativeContext, + isNativeOfflineAudioContext, + setAudioNodeTailTime, + ), + monitorConnections = createMonitorConnections(insertElementInSet, isNativeAudioNode), + wrapChannelMergerNode = createWrapChannelMergerNode(createInvalidStateError, monitorConnections), + createNativeChannelMergerNode = createNativeChannelMergerNodeFactory( + nativeAudioContextConstructor, + wrapChannelMergerNode, + ), + createChannelMergerNodeRenderer = createChannelMergerNodeRendererFactory( + createNativeChannelMergerNode, + getNativeAudioNode, + renderInputsOfAudioNode, + ), + channelMergerNodeConstructor = createChannelMergerNodeConstructor( + audioNodeConstructor, + createChannelMergerNodeRenderer, + createNativeChannelMergerNode, + getNativeContext, + isNativeOfflineAudioContext, + ), + createChannelSplitterNodeRenderer = createChannelSplitterNodeRendererFactory( + createNativeChannelSplitterNode, + getNativeAudioNode, + renderInputsOfAudioNode, + ), + channelSplitterNodeConstructor = createChannelSplitterNodeConstructor( + audioNodeConstructor, + createChannelSplitterNodeRenderer, + createNativeChannelSplitterNode, + getNativeContext, + isNativeOfflineAudioContext, + sanitizeChannelSplitterOptions, + ), + createNativeConstantSourceNodeFaker = createNativeConstantSourceNodeFakerFactory( + addSilentConnection, + createNativeAudioBufferSourceNode, + createNativeGainNode, + monitorConnections, + ), + createNativeConstantSourceNode = createNativeConstantSourceNodeFactory( + addSilentConnection, + cacheTestResult, + createNativeConstantSourceNodeFaker, + testAudioScheduledSourceNodeStartMethodNegativeParametersSupport, + testAudioScheduledSourceNodeStopMethodNegativeParametersSupport, + ), + createConstantSourceNodeRenderer = createConstantSourceNodeRendererFactory( + connectAudioParam, + createNativeConstantSourceNode, + getNativeAudioNode, + renderAutomation, + renderInputsOfAudioNode, + ), + constantSourceNodeConstructor = createConstantSourceNodeConstructor( + audioNodeConstructor, + createAudioParam, + createConstantSourceNodeRenderer, + createNativeConstantSourceNode, + getNativeContext, + isNativeOfflineAudioContext, + wrapEventListener, + ), + createNativeConvolverNode = createNativeConvolverNodeFactory(createNotSupportedError, overwriteAccessors), + createConvolverNodeRenderer = createConvolverNodeRendererFactory( + createNativeConvolverNode, + getNativeAudioNode, + renderInputsOfAudioNode, + ), + convolverNodeConstructor = createConvolverNodeConstructor( + audioNodeConstructor, + createConvolverNodeRenderer, + createNativeConvolverNode, + getNativeContext, + isNativeOfflineAudioContext, + setAudioNodeTailTime, + ), + createDelayNodeRenderer = createDelayNodeRendererFactory( + connectAudioParam, + createNativeDelayNode, + getNativeAudioNode, + renderAutomation, + renderInputsOfAudioNode, + ), + delayNodeConstructor = createDelayNodeConstructor( + audioNodeConstructor, + createAudioParam, + createDelayNodeRenderer, + createNativeDelayNode, + getNativeContext, + isNativeOfflineAudioContext, + setAudioNodeTailTime, + ), + createNativeDynamicsCompressorNode = createNativeDynamicsCompressorNodeFactory(createNotSupportedError), + createDynamicsCompressorNodeRenderer = createDynamicsCompressorNodeRendererFactory( + connectAudioParam, + createNativeDynamicsCompressorNode, + getNativeAudioNode, + renderAutomation, + renderInputsOfAudioNode, + ), + dynamicsCompressorNodeConstructor = createDynamicsCompressorNodeConstructor( + audioNodeConstructor, + createAudioParam, + createDynamicsCompressorNodeRenderer, + createNativeDynamicsCompressorNode, + createNotSupportedError, + getNativeContext, + isNativeOfflineAudioContext, + setAudioNodeTailTime, + ), + createGainNodeRenderer = createGainNodeRendererFactory( + connectAudioParam, + createNativeGainNode, + getNativeAudioNode, + renderAutomation, + renderInputsOfAudioNode, + ), + gainNodeConstructor = createGainNodeConstructor( + audioNodeConstructor, + createAudioParam, + createGainNodeRenderer, + createNativeGainNode, + getNativeContext, + isNativeOfflineAudioContext, + ), + createNativeIIRFilterNodeFaker = createNativeIIRFilterNodeFakerFactory( + createInvalidAccessError, + createInvalidStateError, + createNativeScriptProcessorNode, + createNotSupportedError, + ), + renderNativeOfflineAudioContext = createRenderNativeOfflineAudioContext( + cacheTestResult, + createNativeGainNode, + createNativeScriptProcessorNode, + createTestOfflineAudioContextCurrentTimeSupport(createNativeGainNode, nativeOfflineAudioContextConstructor), + ), + createIIRFilterNodeRenderer = createIIRFilterNodeRendererFactory( + createNativeAudioBufferSourceNode, + getNativeAudioNode, + nativeOfflineAudioContextConstructor, + renderInputsOfAudioNode, + renderNativeOfflineAudioContext, + ), + createNativeIIRFilterNode = createNativeIIRFilterNodeFactory(createNativeIIRFilterNodeFaker), + iIRFilterNodeConstructor = createIIRFilterNodeConstructor( + audioNodeConstructor, + createNativeIIRFilterNode, + createIIRFilterNodeRenderer, + getNativeContext, + isNativeOfflineAudioContext, + setAudioNodeTailTime, + ), + createAudioListener = createAudioListenerFactory( + createAudioParam, + createNativeChannelMergerNode, + createNativeConstantSourceNode, + createNativeScriptProcessorNode, + createNotSupportedError, + getFirstSample, + isNativeOfflineAudioContext, + overwriteAccessors, + ), + unrenderedAudioWorkletNodeStore = new WeakMap(), + minimalBaseAudioContextConstructor = createMinimalBaseAudioContextConstructor( + audioDestinationNodeConstructor, + createAudioListener, + eventTargetConstructor, + isNativeOfflineAudioContext, + unrenderedAudioWorkletNodeStore, + wrapEventListener, + ), + createNativeOscillatorNode = createNativeOscillatorNodeFactory( + addSilentConnection, + cacheTestResult, + testAudioScheduledSourceNodeStartMethodNegativeParametersSupport, + testAudioScheduledSourceNodeStopMethodConsecutiveCallsSupport, + testAudioScheduledSourceNodeStopMethodNegativeParametersSupport, + wrapAudioScheduledSourceNodeStopMethodConsecutiveCalls, + ), + createOscillatorNodeRenderer = createOscillatorNodeRendererFactory( + connectAudioParam, + createNativeOscillatorNode, + getNativeAudioNode, + renderAutomation, + renderInputsOfAudioNode, + ), + oscillatorNodeConstructor = createOscillatorNodeConstructor( + audioNodeConstructor, + createAudioParam, + createNativeOscillatorNode, + createOscillatorNodeRenderer, + getNativeContext, + isNativeOfflineAudioContext, + wrapEventListener, + ), + createConnectedNativeAudioBufferSourceNode = createConnectedNativeAudioBufferSourceNodeFactory( + createNativeAudioBufferSourceNode, + ), + createNativeWaveShaperNodeFaker = createNativeWaveShaperNodeFakerFactory( + createConnectedNativeAudioBufferSourceNode, + createInvalidStateError, + createNativeGainNode, + isDCCurve, + monitorConnections, + ), + createNativeWaveShaperNode = createNativeWaveShaperNodeFactory( + createConnectedNativeAudioBufferSourceNode, + createInvalidStateError, + createNativeWaveShaperNodeFaker, + isDCCurve, + monitorConnections, + nativeAudioContextConstructor, + overwriteAccessors, + ), + createNativePannerNodeFaker = createNativePannerNodeFakerFactory( + connectNativeAudioNodeToNativeAudioNode, + createInvalidStateError, + createNativeChannelMergerNode, + createNativeGainNode, + createNativeScriptProcessorNode, + createNativeWaveShaperNode, + createNotSupportedError, + disconnectNativeAudioNodeFromNativeAudioNode, + getFirstSample, + monitorConnections, + ), + createNativePannerNode = createNativePannerNodeFactory(createNativePannerNodeFaker), + createPannerNodeRenderer = createPannerNodeRendererFactory( + connectAudioParam, + createNativeChannelMergerNode, + createNativeConstantSourceNode, + createNativeGainNode, + createNativePannerNode, + getNativeAudioNode, + nativeOfflineAudioContextConstructor, + renderAutomation, + renderInputsOfAudioNode, + renderNativeOfflineAudioContext, + ), + pannerNodeConstructor = createPannerNodeConstructor( + audioNodeConstructor, + createAudioParam, + createNativePannerNode, + createPannerNodeRenderer, + getNativeContext, + isNativeOfflineAudioContext, + setAudioNodeTailTime, + ), + createNativePeriodicWave = createNativePeriodicWaveFactory(createIndexSizeError), + periodicWaveConstructor = createPeriodicWaveConstructor( + createNativePeriodicWave, + getNativeContext, + new WeakSet(), + sanitizePeriodicWaveOptions, + ), + nativeStereoPannerNodeFakerFactory = createNativeStereoPannerNodeFakerFactory( + createNativeChannelMergerNode, + createNativeChannelSplitterNode, + createNativeGainNode, + createNativeWaveShaperNode, + createNotSupportedError, + monitorConnections, + ), + createNativeStereoPannerNode = createNativeStereoPannerNodeFactory( + nativeStereoPannerNodeFakerFactory, + createNotSupportedError, + ), + createStereoPannerNodeRenderer = createStereoPannerNodeRendererFactory( + connectAudioParam, + createNativeStereoPannerNode, + getNativeAudioNode, + renderAutomation, + renderInputsOfAudioNode, + ), + stereoPannerNodeConstructor = createStereoPannerNodeConstructor( + audioNodeConstructor, + createAudioParam, + createNativeStereoPannerNode, + createStereoPannerNodeRenderer, + getNativeContext, + isNativeOfflineAudioContext, + ), + createWaveShaperNodeRenderer = createWaveShaperNodeRendererFactory( + createNativeWaveShaperNode, + getNativeAudioNode, + renderInputsOfAudioNode, + ), + waveShaperNodeConstructor = createWaveShaperNodeConstructor( + audioNodeConstructor, + createInvalidStateError, + createNativeWaveShaperNode, + createWaveShaperNodeRenderer, + getNativeContext, + isNativeOfflineAudioContext, + setAudioNodeTailTime, + ), + isSecureContext = createIsSecureContext(window$1), + exposeCurrentFrameAndCurrentTime = createExposeCurrentFrameAndCurrentTime(window$1), + backupOfflineAudioContextStore = new WeakMap(), + getOrCreateBackupOfflineAudioContext = createGetOrCreateBackupOfflineAudioContext( + backupOfflineAudioContextStore, + nativeOfflineAudioContextConstructor, + ), + addAudioWorkletModule = isSecureContext + ? createAddAudioWorkletModule( + cacheTestResult, + createNotSupportedError, + createEvaluateSource(window$1), + exposeCurrentFrameAndCurrentTime, + createFetchSource(createAbortError), + getNativeContext, + getOrCreateBackupOfflineAudioContext, + isNativeOfflineAudioContext, + nativeAudioWorkletNodeConstructor, + new WeakMap(), + new WeakMap(), + createTestAudioWorkletProcessorPostMessageSupport( + nativeAudioWorkletNodeConstructor, + nativeOfflineAudioContextConstructor, + ), + window$1, + ) + : void 0, + isNativeContext = createIsNativeContext(isNativeAudioContext, isNativeOfflineAudioContext), + decodeAudioData = createDecodeAudioData( + audioBufferStore, + cacheTestResult, + createDataCloneError, + createEncodingError, + new WeakSet(), + getNativeContext, + isNativeContext, + testAudioBufferCopyChannelMethodsOutOfBoundsSupport, + testPromiseSupport, + wrapAudioBufferCopyChannelMethods, + wrapAudioBufferCopyChannelMethodsOutOfBounds, + ), + baseAudioContextConstructor = createBaseAudioContextConstructor( + addAudioWorkletModule, + analyserNodeConstructor, + audioBufferConstructor, + audioBufferSourceNodeConstructor, + biquadFilterNodeConstructor, + channelMergerNodeConstructor, + channelSplitterNodeConstructor, + constantSourceNodeConstructor, + convolverNodeConstructor, + decodeAudioData, + delayNodeConstructor, + dynamicsCompressorNodeConstructor, + gainNodeConstructor, + iIRFilterNodeConstructor, + minimalBaseAudioContextConstructor, + oscillatorNodeConstructor, + pannerNodeConstructor, + periodicWaveConstructor, + stereoPannerNodeConstructor, + waveShaperNodeConstructor, + ), + mediaElementAudioSourceNodeConstructor = createMediaElementAudioSourceNodeConstructor( + audioNodeConstructor, + createNativeMediaElementAudioSourceNode, + getNativeContext, + isNativeOfflineAudioContext, + ), + mediaStreamAudioDestinationNodeConstructor = createMediaStreamAudioDestinationNodeConstructor( + audioNodeConstructor, + createNativeMediaStreamAudioDestinationNode, + getNativeContext, + isNativeOfflineAudioContext, + ), + mediaStreamAudioSourceNodeConstructor = createMediaStreamAudioSourceNodeConstructor( + audioNodeConstructor, + createNativeMediaStreamAudioSourceNode, + getNativeContext, + isNativeOfflineAudioContext, + ), + createNativeMediaStreamTrackAudioSourceNode = createNativeMediaStreamTrackAudioSourceNodeFactory( + createInvalidStateError, + isNativeOfflineAudioContext, + ), + mediaStreamTrackAudioSourceNodeConstructor = createMediaStreamTrackAudioSourceNodeConstructor( + audioNodeConstructor, + createNativeMediaStreamTrackAudioSourceNode, + getNativeContext, + ), + audioContextConstructor = createAudioContextConstructor( + baseAudioContextConstructor, + createInvalidStateError, + createNotSupportedError, + createUnknownError, + mediaElementAudioSourceNodeConstructor, + mediaStreamAudioDestinationNodeConstructor, + mediaStreamAudioSourceNodeConstructor, + mediaStreamTrackAudioSourceNodeConstructor, + nativeAudioContextConstructor, + ), + getUnrenderedAudioWorkletNodes = createGetUnrenderedAudioWorkletNodes(unrenderedAudioWorkletNodeStore), + addUnrenderedAudioWorkletNode = createAddUnrenderedAudioWorkletNode(getUnrenderedAudioWorkletNodes), + connectMultipleOutputs = createConnectMultipleOutputs(createIndexSizeError), + deleteUnrenderedAudioWorkletNode = createDeleteUnrenderedAudioWorkletNode(getUnrenderedAudioWorkletNodes), + disconnectMultipleOutputs = createDisconnectMultipleOutputs(createIndexSizeError), + activeAudioWorkletNodeInputsStore = new WeakMap(), + getActiveAudioWorkletNodeInputs = createGetActiveAudioWorkletNodeInputs( + activeAudioWorkletNodeInputsStore, + getValueForKey, + ), + createNativeAudioWorkletNodeFaker = createNativeAudioWorkletNodeFakerFactory( + connectMultipleOutputs, + createIndexSizeError, + createInvalidStateError, + createNativeChannelMergerNode, + createNativeChannelSplitterNode, + createNativeConstantSourceNode, + createNativeGainNode, + createNativeScriptProcessorNode, + createNotSupportedError, + disconnectMultipleOutputs, + exposeCurrentFrameAndCurrentTime, + getActiveAudioWorkletNodeInputs, + monitorConnections, + ), + createNativeAudioWorkletNode = createNativeAudioWorkletNodeFactory( + createInvalidStateError, + createNativeAudioWorkletNodeFaker, + createNativeGainNode, + createNotSupportedError, + monitorConnections, + ), + createAudioWorkletNodeRenderer = createAudioWorkletNodeRendererFactory( + connectAudioParam, + connectMultipleOutputs, + createNativeAudioBufferSourceNode, + createNativeChannelMergerNode, + createNativeChannelSplitterNode, + createNativeConstantSourceNode, + createNativeGainNode, + deleteUnrenderedAudioWorkletNode, + disconnectMultipleOutputs, + exposeCurrentFrameAndCurrentTime, + getNativeAudioNode, + nativeAudioWorkletNodeConstructor, + nativeOfflineAudioContextConstructor, + renderAutomation, + renderInputsOfAudioNode, + renderNativeOfflineAudioContext, + ), + getBackupOfflineAudioContext = createGetBackupOfflineAudioContext(backupOfflineAudioContextStore), + setActiveAudioWorkletNodeInputs = createSetActiveAudioWorkletNodeInputs(activeAudioWorkletNodeInputsStore), + audioWorkletNodeConstructor = isSecureContext + ? createAudioWorkletNodeConstructor( + addUnrenderedAudioWorkletNode, + audioNodeConstructor, + createAudioParam, + createAudioWorkletNodeRenderer, + createNativeAudioWorkletNode, + getAudioNodeConnections, + getBackupOfflineAudioContext, + getNativeContext, + isNativeOfflineAudioContext, + nativeAudioWorkletNodeConstructor, + sanitizeAudioWorkletNodeOptions, + setActiveAudioWorkletNodeInputs, + testAudioWorkletNodeOptionsClonability, + wrapEventListener, + ) + : void 0, + createNativeOfflineAudioContext = createCreateNativeOfflineAudioContext( + createNotSupportedError, + nativeOfflineAudioContextConstructor, + ), + startRendering = createStartRendering( + audioBufferStore, + cacheTestResult, + getAudioNodeRenderer, + getUnrenderedAudioWorkletNodes, + renderNativeOfflineAudioContext, + testAudioBufferCopyChannelMethodsOutOfBoundsSupport, + wrapAudioBufferCopyChannelMethods, + wrapAudioBufferCopyChannelMethodsOutOfBounds, + ), + offlineAudioContextConstructor = createOfflineAudioContextConstructor( + baseAudioContextConstructor, + cacheTestResult, + createInvalidStateError, + createNativeOfflineAudioContext, + startRendering, + ), + isAnyAudioContext = createIsAnyAudioContext(CONTEXT_STORE, isNativeAudioContext), + isAnyAudioNode = createIsAnyAudioNode(AUDIO_NODE_STORE, isNativeAudioNode), + isAnyAudioParam = createIsAnyAudioParam(AUDIO_PARAM_STORE, isNativeAudioParam), + isAnyOfflineAudioContext = createIsAnyOfflineAudioContext(CONTEXT_STORE, isNativeOfflineAudioContext) + function isUndef(tt) { + return typeof tt > 'u' + } + function isDefined(tt) { + return !isUndef(tt) + } + function isFunction$2(tt) { + return typeof tt == 'function' + } + function isNumber$4(tt) { + return typeof tt == 'number' + } + function isObject$7(tt) { + return Object.prototype.toString.call(tt) === '[object Object]' && tt.constructor === Object + } + function isBoolean$1(tt) { + return typeof tt == 'boolean' + } + function isArray$e(tt) { + return Array.isArray(tt) + } + function isString$2(tt) { + return typeof tt == 'string' + } + function isNote(tt) { + return isString$2(tt) && /^([a-g]{1}(?:b|#|x|bb)?)(-?[0-9]+)/i.test(tt) + } + function assert(tt, et) { + if (!tt) throw new Error(et) + } + function assertRange(tt, et, nt = 1 / 0) { + if (!(et <= tt && tt <= nt)) throw new RangeError(`Value must be within [${et}, ${nt}], got: ${tt}`) + } + function assertContextRunning(tt) { + !tt.isOffline && + tt.state !== 'running' && + warn$2('The AudioContext is "suspended". Invoke Tone.start() from a user action to start the audio.') + } + let isInsideScheduledCallback = !1, + printedScheduledWarning = !1 + function enterScheduledCallback(tt) { + isInsideScheduledCallback = tt + } + function assertUsedScheduleTime(tt) { + isUndef(tt) && + isInsideScheduledCallback && + !printedScheduledWarning && + ((printedScheduledWarning = !0), + warn$2( + 'Events scheduled inside of scheduled callbacks should use the passed in scheduling time. See https://github.com/Tonejs/Tone.js/wiki/Accurate-Timing', + )) + } + let defaultLogger = console + function log$1(...tt) { + defaultLogger.log(...tt) + } + function warn$2(...tt) { + defaultLogger.warn(...tt) + } + function createAudioContext(tt) { + return new audioContextConstructor(tt) + } + function createOfflineAudioContext(tt, et, nt) { + return new offlineAudioContextConstructor(tt, et, nt) + } + const theWindow = typeof self == 'object' ? self : null, + hasAudioContext = + theWindow && (theWindow.hasOwnProperty('AudioContext') || theWindow.hasOwnProperty('webkitAudioContext')) + function createAudioWorkletNode(tt, et, nt) { + return ( + assert(isDefined(audioWorkletNodeConstructor), 'This node only works in a secure context (https or localhost)'), + new audioWorkletNodeConstructor(tt, et, nt) + ) + } + class Ticker { + constructor(et, nt, rt, it) { + ;(this._callback = et), + (this._type = nt), + (this._minimumUpdateInterval = Math.max(128 / (it || 44100), 0.001)), + (this.updateInterval = rt), + this._createClock() + } + _createWorker() { + const et = new Blob( + [ + ` + // the initial timeout time + let timeoutTime = ${(this._updateInterval * 1e3).toFixed(1)}; + // onmessage callback + self.onmessage = function(msg){ + timeoutTime = parseInt(msg.data); + }; + // the tick function which posts a message + // and schedules a new tick + function tick(){ + setTimeout(tick, timeoutTime); + self.postMessage('tick'); + } + // call tick initially + tick(); + `, + ], + { type: 'text/javascript' }, + ), + nt = URL.createObjectURL(et), + rt = new Worker(nt) + ;(rt.onmessage = this._callback.bind(this)), (this._worker = rt) + } + _createTimeout() { + this._timeout = setTimeout(() => { + this._createTimeout(), this._callback() + }, this._updateInterval * 1e3) + } + _createClock() { + if (this._type === 'worker') + try { + this._createWorker() + } catch { + ;(this._type = 'timeout'), this._createClock() + } + else this._type === 'timeout' && this._createTimeout() + } + _disposeClock() { + this._timeout && clearTimeout(this._timeout), + this._worker && (this._worker.terminate(), (this._worker.onmessage = null)) + } + get updateInterval() { + return this._updateInterval + } + set updateInterval(et) { + var nt + ;(this._updateInterval = Math.max(et, this._minimumUpdateInterval)), + this._type === 'worker' && + ((nt = this._worker) === null || nt === void 0 || nt.postMessage(this._updateInterval * 1e3)) + } + get type() { + return this._type + } + set type(et) { + this._disposeClock(), (this._type = et), this._createClock() + } + dispose() { + this._disposeClock() + } + } + function isAudioParam(tt) { + return isAnyAudioParam(tt) + } + function isAudioNode(tt) { + return isAnyAudioNode(tt) + } + function isOfflineAudioContext(tt) { + return isAnyOfflineAudioContext(tt) + } + function isAudioContext(tt) { + return isAnyAudioContext(tt) + } + function isAudioBuffer(tt) { + return tt instanceof audioBufferConstructor + } + function noCopy(tt, et) { + return tt === 'value' || isAudioParam(et) || isAudioNode(et) || isAudioBuffer(et) + } + function deepMerge(tt, ...et) { + if (!et.length) return tt + const nt = et.shift() + if (isObject$7(tt) && isObject$7(nt)) + for (const rt in nt) + noCopy(rt, nt[rt]) + ? (tt[rt] = nt[rt]) + : isObject$7(nt[rt]) + ? (tt[rt] || Object.assign(tt, { [rt]: {} }), deepMerge(tt[rt], nt[rt])) + : Object.assign(tt, { [rt]: nt[rt] }) + return deepMerge(tt, ...et) + } + function deepEquals(tt, et) { + return tt.length === et.length && tt.every((nt, rt) => et[rt] === nt) + } + function optionsFromArguments(tt, et, nt = [], rt) { + const it = {}, + ot = Array.from(et) + if ( + (isObject$7(ot[0]) && + rt && + !Reflect.has(ot[0], rt) && + (Object.keys(ot[0]).some((st) => Reflect.has(tt, st)) || + (deepMerge(it, { [rt]: ot[0] }), nt.splice(nt.indexOf(rt), 1), ot.shift())), + ot.length === 1 && isObject$7(ot[0])) + ) + deepMerge(it, ot[0]) + else for (let at = 0; at < nt.length; at++) isDefined(ot[at]) && (it[nt[at]] = ot[at]) + return deepMerge(tt, it) + } + function getDefaultsFromInstance(tt) { + return tt.constructor.getDefaults() + } + function defaultArg(tt, et) { + return isUndef(tt) ? et : tt + } + function omitFromObject(tt, et) { + return ( + et.forEach((nt) => { + Reflect.has(tt, nt) && delete tt[nt] + }), + tt + ) + } + /** + * Tone.js + * @author Yotam Mann + * @license http://opensource.org/licenses/MIT MIT License + * @copyright 2014-2019 Yotam Mann + */ class Tone { + constructor() { + ;(this.debug = !1), (this._wasDisposed = !1) + } + static getDefaults() { + return {} + } + log(...et) { + ;(this.debug || (theWindow && this.toString() === theWindow.TONE_DEBUG_CLASS)) && log$1(this, ...et) + } + dispose() { + return (this._wasDisposed = !0), this + } + get disposed() { + return this._wasDisposed + } + toString() { + return this.name + } + } + Tone.version = version$1 + const EPSILON = 1e-6 + function GT(tt, et) { + return tt > et + EPSILON + } + function GTE(tt, et) { + return GT(tt, et) || EQ(tt, et) + } + function LT(tt, et) { + return tt + EPSILON < et + } + function EQ(tt, et) { + return Math.abs(tt - et) < EPSILON + } + function clamp$1(tt, et, nt) { + return Math.max(Math.min(tt, nt), et) + } + class Timeline extends Tone { + constructor() { + super(), (this.name = 'Timeline'), (this._timeline = []) + const et = optionsFromArguments(Timeline.getDefaults(), arguments, ['memory']) + ;(this.memory = et.memory), (this.increasing = et.increasing) + } + static getDefaults() { + return { memory: 1 / 0, increasing: !1 } + } + get length() { + return this._timeline.length + } + add(et) { + if ( + (assert(Reflect.has(et, 'time'), 'Timeline: events must have a time attribute'), + (et.time = et.time.valueOf()), + this.increasing && this.length) + ) { + const nt = this._timeline[this.length - 1] + assert(GTE(et.time, nt.time), 'The time must be greater than or equal to the last scheduled time'), + this._timeline.push(et) + } else { + const nt = this._search(et.time) + this._timeline.splice(nt + 1, 0, et) + } + if (this.length > this.memory) { + const nt = this.length - this.memory + this._timeline.splice(0, nt) + } + return this + } + remove(et) { + const nt = this._timeline.indexOf(et) + return nt !== -1 && this._timeline.splice(nt, 1), this + } + get(et, nt = 'time') { + const rt = this._search(et, nt) + return rt !== -1 ? this._timeline[rt] : null + } + peek() { + return this._timeline[0] + } + shift() { + return this._timeline.shift() + } + getAfter(et, nt = 'time') { + const rt = this._search(et, nt) + return rt + 1 < this._timeline.length ? this._timeline[rt + 1] : null + } + getBefore(et) { + const nt = this._timeline.length + if (nt > 0 && this._timeline[nt - 1].time < et) return this._timeline[nt - 1] + const rt = this._search(et) + return rt - 1 >= 0 ? this._timeline[rt - 1] : null + } + cancel(et) { + if (this._timeline.length > 1) { + let nt = this._search(et) + if (nt >= 0) + if (EQ(this._timeline[nt].time, et)) { + for (let rt = nt; rt >= 0 && EQ(this._timeline[rt].time, et); rt--) nt = rt + this._timeline = this._timeline.slice(0, nt) + } else this._timeline = this._timeline.slice(0, nt + 1) + else this._timeline = [] + } else this._timeline.length === 1 && GTE(this._timeline[0].time, et) && (this._timeline = []) + return this + } + cancelBefore(et) { + const nt = this._search(et) + return nt >= 0 && (this._timeline = this._timeline.slice(nt + 1)), this + } + previousEvent(et) { + const nt = this._timeline.indexOf(et) + return nt > 0 ? this._timeline[nt - 1] : null + } + _search(et, nt = 'time') { + if (this._timeline.length === 0) return -1 + let rt = 0 + const it = this._timeline.length + let ot = it + if (it > 0 && this._timeline[it - 1][nt] <= et) return it - 1 + for (; rt < ot; ) { + let at = Math.floor(rt + (ot - rt) / 2) + const st = this._timeline[at], + lt = this._timeline[at + 1] + if (EQ(st[nt], et)) { + for (let ct = at; ct < this._timeline.length; ct++) { + const ut = this._timeline[ct] + if (EQ(ut[nt], et)) at = ct + else break + } + return at + } else { + if (LT(st[nt], et) && GT(lt[nt], et)) return at + GT(st[nt], et) ? (ot = at) : (rt = at + 1) + } + } + return -1 + } + _iterate(et, nt = 0, rt = this._timeline.length - 1) { + this._timeline.slice(nt, rt + 1).forEach(et) + } + forEach(et) { + return this._iterate(et), this + } + forEachBefore(et, nt) { + const rt = this._search(et) + return rt !== -1 && this._iterate(nt, 0, rt), this + } + forEachAfter(et, nt) { + const rt = this._search(et) + return this._iterate(nt, rt + 1), this + } + forEachBetween(et, nt, rt) { + let it = this._search(et), + ot = this._search(nt) + return ( + it !== -1 && ot !== -1 + ? (this._timeline[it].time !== et && (it += 1), + this._timeline[ot].time === nt && (ot -= 1), + this._iterate(rt, it, ot)) + : it === -1 && this._iterate(rt, 0, ot), + this + ) + } + forEachFrom(et, nt) { + let rt = this._search(et) + for (; rt >= 0 && this._timeline[rt].time >= et; ) rt-- + return this._iterate(nt, rt + 1), this + } + forEachAtTime(et, nt) { + const rt = this._search(et) + if (rt !== -1 && EQ(this._timeline[rt].time, et)) { + let it = rt + for (let ot = rt; ot >= 0 && EQ(this._timeline[ot].time, et); ot--) it = ot + this._iterate( + (ot) => { + nt(ot) + }, + it, + rt, + ) + } + return this + } + dispose() { + return super.dispose(), (this._timeline = []), this + } + } + const notifyNewContext = [] + function onContextInit(tt) { + notifyNewContext.push(tt) + } + function initializeContext(tt) { + notifyNewContext.forEach((et) => et(tt)) + } + const notifyCloseContext = [] + function onContextClose(tt) { + notifyCloseContext.push(tt) + } + function closeContext(tt) { + notifyCloseContext.forEach((et) => et(tt)) + } + let Emitter$1 = class _w extends Tone { + constructor() { + super(...arguments), (this.name = 'Emitter') + } + on(et, nt) { + return ( + et.split(/\W+/).forEach((it) => { + isUndef(this._events) && (this._events = {}), + this._events.hasOwnProperty(it) || (this._events[it] = []), + this._events[it].push(nt) + }), + this + ) + } + once(et, nt) { + const rt = (...it) => { + nt(...it), this.off(et, rt) + } + return this.on(et, rt), this + } + off(et, nt) { + return ( + et.split(/\W+/).forEach((it) => { + if ((isUndef(this._events) && (this._events = {}), this._events.hasOwnProperty(it))) + if (isUndef(nt)) this._events[it] = [] + else { + const ot = this._events[it] + for (let at = ot.length - 1; at >= 0; at--) ot[at] === nt && ot.splice(at, 1) + } + }), + this + ) + } + emit(et, ...nt) { + if (this._events && this._events.hasOwnProperty(et)) { + const rt = this._events[et].slice(0) + for (let it = 0, ot = rt.length; it < ot; it++) rt[it].apply(this, nt) + } + return this + } + static mixin(et) { + ;['on', 'once', 'off', 'emit'].forEach((nt) => { + const rt = Object.getOwnPropertyDescriptor(_w.prototype, nt) + Object.defineProperty(et.prototype, nt, rt) + }) + } + dispose() { + return super.dispose(), (this._events = void 0), this + } + } + class BaseContext extends Emitter$1 { + constructor() { + super(...arguments), (this.isOffline = !1) + } + toJSON() { + return {} + } + } + class Context extends BaseContext { + constructor() { + var et, nt + super(), + (this.name = 'Context'), + (this._constants = new Map()), + (this._timeouts = new Timeline()), + (this._timeoutIds = 0), + (this._initialized = !1), + (this._closeStarted = !1), + (this.isOffline = !1), + (this._workletPromise = null) + const rt = optionsFromArguments(Context.getDefaults(), arguments, ['context']) + rt.context + ? ((this._context = rt.context), + (this._latencyHint = ((et = arguments[0]) === null || et === void 0 ? void 0 : et.latencyHint) || '')) + : ((this._context = createAudioContext({ latencyHint: rt.latencyHint })), (this._latencyHint = rt.latencyHint)), + (this._ticker = new Ticker( + this.emit.bind(this, 'tick'), + rt.clockSource, + rt.updateInterval, + this._context.sampleRate, + )), + this.on('tick', this._timeoutLoop.bind(this)), + (this._context.onstatechange = () => { + this.emit('statechange', this.state) + }), + (this[ + !((nt = arguments[0]) === null || nt === void 0) && nt.hasOwnProperty('updateInterval') + ? '_lookAhead' + : 'lookAhead' + ] = rt.lookAhead) + } + static getDefaults() { + return { clockSource: 'worker', latencyHint: 'interactive', lookAhead: 0.1, updateInterval: 0.05 } + } + initialize() { + return this._initialized || (initializeContext(this), (this._initialized = !0)), this + } + createAnalyser() { + return this._context.createAnalyser() + } + createOscillator() { + return this._context.createOscillator() + } + createBufferSource() { + return this._context.createBufferSource() + } + createBiquadFilter() { + return this._context.createBiquadFilter() + } + createBuffer(et, nt, rt) { + return this._context.createBuffer(et, nt, rt) + } + createChannelMerger(et) { + return this._context.createChannelMerger(et) + } + createChannelSplitter(et) { + return this._context.createChannelSplitter(et) + } + createConstantSource() { + return this._context.createConstantSource() + } + createConvolver() { + return this._context.createConvolver() + } + createDelay(et) { + return this._context.createDelay(et) + } + createDynamicsCompressor() { + return this._context.createDynamicsCompressor() + } + createGain() { + return this._context.createGain() + } + createIIRFilter(et, nt) { + return this._context.createIIRFilter(et, nt) + } + createPanner() { + return this._context.createPanner() + } + createPeriodicWave(et, nt, rt) { + return this._context.createPeriodicWave(et, nt, rt) + } + createStereoPanner() { + return this._context.createStereoPanner() + } + createWaveShaper() { + return this._context.createWaveShaper() + } + createMediaStreamSource(et) { + return ( + assert(isAudioContext(this._context), 'Not available if OfflineAudioContext'), + this._context.createMediaStreamSource(et) + ) + } + createMediaElementSource(et) { + return ( + assert(isAudioContext(this._context), 'Not available if OfflineAudioContext'), + this._context.createMediaElementSource(et) + ) + } + createMediaStreamDestination() { + return ( + assert(isAudioContext(this._context), 'Not available if OfflineAudioContext'), + this._context.createMediaStreamDestination() + ) + } + decodeAudioData(et) { + return this._context.decodeAudioData(et) + } + get currentTime() { + return this._context.currentTime + } + get state() { + return this._context.state + } + get sampleRate() { + return this._context.sampleRate + } + get listener() { + return this.initialize(), this._listener + } + set listener(et) { + assert(!this._initialized, 'The listener cannot be set after initialization.'), (this._listener = et) + } + get transport() { + return this.initialize(), this._transport + } + set transport(et) { + assert(!this._initialized, 'The transport cannot be set after initialization.'), (this._transport = et) + } + get draw() { + return this.initialize(), this._draw + } + set draw(et) { + assert(!this._initialized, 'Draw cannot be set after initialization.'), (this._draw = et) + } + get destination() { + return this.initialize(), this._destination + } + set destination(et) { + assert(!this._initialized, 'The destination cannot be set after initialization.'), (this._destination = et) + } + createAudioWorkletNode(et, nt) { + return createAudioWorkletNode(this.rawContext, et, nt) + } + addAudioWorkletModule(et) { + return __awaiter(this, void 0, void 0, function* () { + assert( + isDefined(this.rawContext.audioWorklet), + 'AudioWorkletNode is only available in a secure context (https or localhost)', + ), + this._workletPromise || (this._workletPromise = this.rawContext.audioWorklet.addModule(et)), + yield this._workletPromise + }) + } + workletsAreReady() { + return __awaiter(this, void 0, void 0, function* () { + ;(yield this._workletPromise) ? this._workletPromise : Promise.resolve() + }) + } + get updateInterval() { + return this._ticker.updateInterval + } + set updateInterval(et) { + this._ticker.updateInterval = et + } + get clockSource() { + return this._ticker.type + } + set clockSource(et) { + this._ticker.type = et + } + get lookAhead() { + return this._lookAhead + } + set lookAhead(et) { + ;(this._lookAhead = et), (this.updateInterval = et ? et / 2 : 0.01) + } + get latencyHint() { + return this._latencyHint + } + get rawContext() { + return this._context + } + now() { + return this._context.currentTime + this._lookAhead + } + immediate() { + return this._context.currentTime + } + resume() { + return isAudioContext(this._context) ? this._context.resume() : Promise.resolve() + } + close() { + return __awaiter(this, void 0, void 0, function* () { + isAudioContext(this._context) && + this.state !== 'closed' && + !this._closeStarted && + ((this._closeStarted = !0), yield this._context.close()), + this._initialized && closeContext(this) + }) + } + getConstant(et) { + if (this._constants.has(et)) return this._constants.get(et) + { + const nt = this._context.createBuffer(1, 128, this._context.sampleRate), + rt = nt.getChannelData(0) + for (let ot = 0; ot < rt.length; ot++) rt[ot] = et + const it = this._context.createBufferSource() + return ( + (it.channelCount = 1), + (it.channelCountMode = 'explicit'), + (it.buffer = nt), + (it.loop = !0), + it.start(0), + this._constants.set(et, it), + it + ) + } + } + dispose() { + return ( + super.dispose(), + this._ticker.dispose(), + this._timeouts.dispose(), + Object.keys(this._constants).map((et) => this._constants[et].disconnect()), + this.close(), + this + ) + } + _timeoutLoop() { + const et = this.now() + let nt = this._timeouts.peek() + for (; this._timeouts.length && nt && nt.time <= et; ) + nt.callback(), this._timeouts.shift(), (nt = this._timeouts.peek()) + } + setTimeout(et, nt) { + this._timeoutIds++ + const rt = this.now() + return this._timeouts.add({ callback: et, id: this._timeoutIds, time: rt + nt }), this._timeoutIds + } + clearTimeout(et) { + return ( + this._timeouts.forEach((nt) => { + nt.id === et && this._timeouts.remove(nt) + }), + this + ) + } + clearInterval(et) { + return this.clearTimeout(et) + } + setInterval(et, nt) { + const rt = ++this._timeoutIds, + it = () => { + const ot = this.now() + this._timeouts.add({ + callback: () => { + et(), it() + }, + id: rt, + time: ot + nt, + }) + } + return it(), rt + } + } + class DummyContext extends BaseContext { + constructor() { + super(...arguments), (this.lookAhead = 0), (this.latencyHint = 0), (this.isOffline = !1) + } + createAnalyser() { + return {} + } + createOscillator() { + return {} + } + createBufferSource() { + return {} + } + createBiquadFilter() { + return {} + } + createBuffer(et, nt, rt) { + return {} + } + createChannelMerger(et) { + return {} + } + createChannelSplitter(et) { + return {} + } + createConstantSource() { + return {} + } + createConvolver() { + return {} + } + createDelay(et) { + return {} + } + createDynamicsCompressor() { + return {} + } + createGain() { + return {} + } + createIIRFilter(et, nt) { + return {} + } + createPanner() { + return {} + } + createPeriodicWave(et, nt, rt) { + return {} + } + createStereoPanner() { + return {} + } + createWaveShaper() { + return {} + } + createMediaStreamSource(et) { + return {} + } + createMediaElementSource(et) { + return {} + } + createMediaStreamDestination() { + return {} + } + decodeAudioData(et) { + return Promise.resolve({}) + } + createAudioWorkletNode(et, nt) { + return {} + } + get rawContext() { + return {} + } + addAudioWorkletModule(et) { + return __awaiter(this, void 0, void 0, function* () { + return Promise.resolve() + }) + } + resume() { + return Promise.resolve() + } + setTimeout(et, nt) { + return 0 + } + clearTimeout(et) { + return this + } + setInterval(et, nt) { + return 0 + } + clearInterval(et) { + return this + } + getConstant(et) { + return {} + } + get currentTime() { + return 0 + } + get state() { + return {} + } + get sampleRate() { + return 0 + } + get listener() { + return {} + } + get transport() { + return {} + } + get draw() { + return {} + } + set draw(et) {} + get destination() { + return {} + } + set destination(et) {} + now() { + return 0 + } + immediate() { + return 0 + } + } + function readOnly(tt, et) { + isArray$e(et) + ? et.forEach((nt) => readOnly(tt, nt)) + : Object.defineProperty(tt, et, { enumerable: !0, writable: !1 }) + } + function writable(tt, et) { + isArray$e(et) ? et.forEach((nt) => writable(tt, nt)) : Object.defineProperty(tt, et, { writable: !0 }) + } + const noOp = () => {} + class ToneAudioBuffer extends Tone { + constructor() { + super(), (this.name = 'ToneAudioBuffer'), (this.onload = noOp) + const et = optionsFromArguments(ToneAudioBuffer.getDefaults(), arguments, ['url', 'onload', 'onerror']) + ;(this.reverse = et.reverse), + (this.onload = et.onload), + isString$2(et.url) ? this.load(et.url).catch(et.onerror) : et.url && this.set(et.url) + } + static getDefaults() { + return { onerror: noOp, onload: noOp, reverse: !1 } + } + get sampleRate() { + return this._buffer ? this._buffer.sampleRate : getContext().sampleRate + } + set(et) { + return ( + et instanceof ToneAudioBuffer + ? et.loaded + ? (this._buffer = et.get()) + : (et.onload = () => { + this.set(et), this.onload(this) + }) + : (this._buffer = et), + this._reversed && this._reverse(), + this + ) + } + get() { + return this._buffer + } + load(et) { + return __awaiter(this, void 0, void 0, function* () { + const nt = ToneAudioBuffer.load(et).then((rt) => { + this.set(rt), this.onload(this) + }) + ToneAudioBuffer.downloads.push(nt) + try { + yield nt + } finally { + const rt = ToneAudioBuffer.downloads.indexOf(nt) + ToneAudioBuffer.downloads.splice(rt, 1) + } + return this + }) + } + dispose() { + return super.dispose(), (this._buffer = void 0), this + } + fromArray(et) { + const nt = isArray$e(et) && et[0].length > 0, + rt = nt ? et.length : 1, + it = nt ? et[0].length : et.length, + ot = getContext(), + at = ot.createBuffer(rt, it, ot.sampleRate), + st = !nt && rt === 1 ? [et] : et + for (let lt = 0; lt < rt; lt++) at.copyToChannel(st[lt], lt) + return (this._buffer = at), this + } + toMono(et) { + if (isNumber$4(et)) this.fromArray(this.toArray(et)) + else { + let nt = new Float32Array(this.length) + const rt = this.numberOfChannels + for (let it = 0; it < rt; it++) { + const ot = this.toArray(it) + for (let at = 0; at < ot.length; at++) nt[at] += ot[at] + } + ;(nt = nt.map((it) => it / rt)), this.fromArray(nt) + } + return this + } + toArray(et) { + if (isNumber$4(et)) return this.getChannelData(et) + if (this.numberOfChannels === 1) return this.toArray(0) + { + const nt = [] + for (let rt = 0; rt < this.numberOfChannels; rt++) nt[rt] = this.getChannelData(rt) + return nt + } + } + getChannelData(et) { + return this._buffer ? this._buffer.getChannelData(et) : new Float32Array(0) + } + slice(et, nt = this.duration) { + assert(this.loaded, 'Buffer is not loaded') + const rt = Math.floor(et * this.sampleRate), + it = Math.floor(nt * this.sampleRate) + assert(rt < it, 'The start time must be less than the end time') + const ot = it - rt, + at = getContext().createBuffer(this.numberOfChannels, ot, this.sampleRate) + for (let st = 0; st < this.numberOfChannels; st++) at.copyToChannel(this.getChannelData(st).subarray(rt, it), st) + return new ToneAudioBuffer(at) + } + _reverse() { + if (this.loaded) for (let et = 0; et < this.numberOfChannels; et++) this.getChannelData(et).reverse() + return this + } + get loaded() { + return this.length > 0 + } + get duration() { + return this._buffer ? this._buffer.duration : 0 + } + get length() { + return this._buffer ? this._buffer.length : 0 + } + get numberOfChannels() { + return this._buffer ? this._buffer.numberOfChannels : 0 + } + get reverse() { + return this._reversed + } + set reverse(et) { + this._reversed !== et && ((this._reversed = et), this._reverse()) + } + static fromArray(et) { + return new ToneAudioBuffer().fromArray(et) + } + static fromUrl(et) { + return __awaiter(this, void 0, void 0, function* () { + return yield new ToneAudioBuffer().load(et) + }) + } + static load(et) { + return __awaiter(this, void 0, void 0, function* () { + const nt = et.match(/\[([^\]\[]+\|.+)\]$/) + if (nt) { + const lt = nt[1].split('|') + let ct = lt[0] + for (const ut of lt) + if (ToneAudioBuffer.supportsType(ut)) { + ct = ut + break + } + et = et.replace(nt[0], ct) + } + const rt = + ToneAudioBuffer.baseUrl === '' || ToneAudioBuffer.baseUrl.endsWith('/') + ? ToneAudioBuffer.baseUrl + : ToneAudioBuffer.baseUrl + '/', + it = document.createElement('a') + ;(it.href = rt + et), (it.pathname = (it.pathname + it.hash).split('/').map(encodeURIComponent).join('/')) + const ot = yield fetch(it.href) + if (!ot.ok) throw new Error(`could not load url: ${et}`) + const at = yield ot.arrayBuffer() + return yield getContext().decodeAudioData(at) + }) + } + static supportsType(et) { + const nt = et.split('.'), + rt = nt[nt.length - 1] + return document.createElement('audio').canPlayType('audio/' + rt) !== '' + } + static loaded() { + return __awaiter(this, void 0, void 0, function* () { + for (yield Promise.resolve(); ToneAudioBuffer.downloads.length; ) yield ToneAudioBuffer.downloads[0] + }) + } + } + ToneAudioBuffer.baseUrl = '' + ToneAudioBuffer.downloads = [] + class OfflineContext extends Context { + constructor() { + super({ + clockSource: 'offline', + context: isOfflineAudioContext(arguments[0]) + ? arguments[0] + : createOfflineAudioContext(arguments[0], arguments[1] * arguments[2], arguments[2]), + lookAhead: 0, + updateInterval: isOfflineAudioContext(arguments[0]) ? 128 / arguments[0].sampleRate : 128 / arguments[2], + }), + (this.name = 'OfflineContext'), + (this._currentTime = 0), + (this.isOffline = !0), + (this._duration = isOfflineAudioContext(arguments[0]) + ? arguments[0].length / arguments[0].sampleRate + : arguments[1]) + } + now() { + return this._currentTime + } + get currentTime() { + return this._currentTime + } + _renderClock(et) { + return __awaiter(this, void 0, void 0, function* () { + let nt = 0 + for (; this._duration - this._currentTime >= 0; ) { + this.emit('tick'), (this._currentTime += 128 / this.sampleRate), nt++ + const rt = Math.floor(this.sampleRate / 128) + et && nt % rt === 0 && (yield new Promise((it) => setTimeout(it, 1))) + } + }) + } + render(et = !0) { + return __awaiter(this, void 0, void 0, function* () { + yield this.workletsAreReady(), yield this._renderClock(et) + const nt = yield this._context.startRendering() + return new ToneAudioBuffer(nt) + }) + } + close() { + return Promise.resolve() + } + } + const dummyContext = new DummyContext() + let globalContext = dummyContext + function getContext() { + return globalContext === dummyContext && hasAudioContext && setContext(new Context()), globalContext + } + function setContext(tt, et = !1) { + et && globalContext.dispose(), + isAudioContext(tt) + ? (globalContext = new Context(tt)) + : isOfflineAudioContext(tt) + ? (globalContext = new OfflineContext(tt)) + : (globalContext = tt) + } + function start$1() { + return globalContext.resume() + } + if (theWindow && !theWindow.TONE_SILENCE_LOGGING) { + const et = ` * Tone.js v${version$1} * ` + console.log(`%c${et}`, 'background: #000; color: #fff') + } + function dbToGain(tt) { + return Math.pow(10, tt / 20) + } + function gainToDb(tt) { + return 20 * (Math.log(tt) / Math.LN10) + } + function intervalToFrequencyRatio(tt) { + return Math.pow(2, tt / 12) + } + let A4 = 440 + function getA4() { + return A4 + } + function setA4(tt) { + A4 = tt + } + function ftom(tt) { + return Math.round(ftomf(tt)) + } + function ftomf(tt) { + return 69 + 12 * Math.log2(tt / A4) + } + function mtof(tt) { + return A4 * Math.pow(2, (tt - 69) / 12) + } + class TimeBaseClass extends Tone { + constructor(et, nt, rt) { + super(), + (this.defaultUnits = 's'), + (this._val = nt), + (this._units = rt), + (this.context = et), + (this._expressions = this._getExpressions()) + } + _getExpressions() { + return { + hz: { method: (et) => this._frequencyToUnits(parseFloat(et)), regexp: /^(\d+(?:\.\d+)?)hz$/i }, + i: { method: (et) => this._ticksToUnits(parseInt(et, 10)), regexp: /^(\d+)i$/i }, + m: { method: (et) => this._beatsToUnits(parseInt(et, 10) * this._getTimeSignature()), regexp: /^(\d+)m$/i }, + n: { + method: (et, nt) => { + const rt = parseInt(et, 10), + it = nt === '.' ? 1.5 : 1 + return rt === 1 ? this._beatsToUnits(this._getTimeSignature()) * it : this._beatsToUnits(4 / rt) * it + }, + regexp: /^(\d+)n(\.?)$/i, + }, + number: { + method: (et) => this._expressions[this.defaultUnits].method.call(this, et), + regexp: /^(\d+(?:\.\d+)?)$/, + }, + s: { method: (et) => this._secondsToUnits(parseFloat(et)), regexp: /^(\d+(?:\.\d+)?)s$/ }, + samples: { method: (et) => parseInt(et, 10) / this.context.sampleRate, regexp: /^(\d+)samples$/ }, + t: { + method: (et) => { + const nt = parseInt(et, 10) + return this._beatsToUnits(8 / (Math.floor(nt) * 3)) + }, + regexp: /^(\d+)t$/i, + }, + tr: { + method: (et, nt, rt) => { + let it = 0 + return ( + et && et !== '0' && (it += this._beatsToUnits(this._getTimeSignature() * parseFloat(et))), + nt && nt !== '0' && (it += this._beatsToUnits(parseFloat(nt))), + rt && rt !== '0' && (it += this._beatsToUnits(parseFloat(rt) / 4)), + it + ) + }, + regexp: /^(\d+(?:\.\d+)?):(\d+(?:\.\d+)?):?(\d+(?:\.\d+)?)?$/, + }, + } + } + valueOf() { + if ((this._val instanceof TimeBaseClass && this.fromType(this._val), isUndef(this._val))) return this._noArg() + if (isString$2(this._val) && isUndef(this._units)) { + for (const et in this._expressions) + if (this._expressions[et].regexp.test(this._val.trim())) { + this._units = et + break + } + } else if (isObject$7(this._val)) { + let et = 0 + for (const nt in this._val) + if (isDefined(this._val[nt])) { + const rt = this._val[nt], + it = new this.constructor(this.context, nt).valueOf() * rt + et += it + } + return et + } + if (isDefined(this._units)) { + const et = this._expressions[this._units], + nt = this._val.toString().trim().match(et.regexp) + return nt ? et.method.apply(this, nt.slice(1)) : et.method.call(this, this._val) + } else return isString$2(this._val) ? parseFloat(this._val) : this._val + } + _frequencyToUnits(et) { + return 1 / et + } + _beatsToUnits(et) { + return (60 / this._getBpm()) * et + } + _secondsToUnits(et) { + return et + } + _ticksToUnits(et) { + return (et * this._beatsToUnits(1)) / this._getPPQ() + } + _noArg() { + return this._now() + } + _getBpm() { + return this.context.transport.bpm.value + } + _getTimeSignature() { + return this.context.transport.timeSignature + } + _getPPQ() { + return this.context.transport.PPQ + } + fromType(et) { + switch (((this._units = void 0), this.defaultUnits)) { + case 's': + this._val = et.toSeconds() + break + case 'i': + this._val = et.toTicks() + break + case 'hz': + this._val = et.toFrequency() + break + case 'midi': + this._val = et.toMidi() + break + } + return this + } + toFrequency() { + return 1 / this.toSeconds() + } + toSamples() { + return this.toSeconds() * this.context.sampleRate + } + toMilliseconds() { + return this.toSeconds() * 1e3 + } + } + class TimeClass extends TimeBaseClass { + constructor() { + super(...arguments), (this.name = 'TimeClass') + } + _getExpressions() { + return Object.assign(super._getExpressions(), { + now: { method: (et) => this._now() + new this.constructor(this.context, et).valueOf(), regexp: /^\+(.+)/ }, + quantize: { + method: (et) => { + const nt = new TimeClass(this.context, et).valueOf() + return this._secondsToUnits(this.context.transport.nextSubdivision(nt)) + }, + regexp: /^@(.+)/, + }, + }) + } + quantize(et, nt = 1) { + const rt = new this.constructor(this.context, et).valueOf(), + it = this.valueOf(), + st = Math.round(it / rt) * rt - it + return it + st * nt + } + toNotation() { + const et = this.toSeconds(), + nt = ['1m'] + for (let ot = 1; ot < 9; ot++) { + const at = Math.pow(2, ot) + nt.push(at + 'n.'), nt.push(at + 'n'), nt.push(at + 't') + } + nt.push('0') + let rt = nt[0], + it = new TimeClass(this.context, nt[0]).toSeconds() + return ( + nt.forEach((ot) => { + const at = new TimeClass(this.context, ot).toSeconds() + Math.abs(at - et) < Math.abs(it - et) && ((rt = ot), (it = at)) + }), + rt + ) + } + toBarsBeatsSixteenths() { + const et = this._beatsToUnits(1) + let nt = this.valueOf() / et + nt = parseFloat(nt.toFixed(4)) + const rt = Math.floor(nt / this._getTimeSignature()) + let it = (nt % 1) * 4 + nt = Math.floor(nt) % this._getTimeSignature() + const ot = it.toString() + return ot.length > 3 && (it = parseFloat(parseFloat(ot).toFixed(3))), [rt, nt, it].join(':') + } + toTicks() { + const et = this._beatsToUnits(1) + return (this.valueOf() / et) * this._getPPQ() + } + toSeconds() { + return this.valueOf() + } + toMidi() { + return ftom(this.toFrequency()) + } + _now() { + return this.context.now() + } + } + class FrequencyClass extends TimeClass { + constructor() { + super(...arguments), (this.name = 'Frequency'), (this.defaultUnits = 'hz') + } + static get A4() { + return getA4() + } + static set A4(et) { + setA4(et) + } + _getExpressions() { + return Object.assign({}, super._getExpressions(), { + midi: { + regexp: /^(\d+(?:\.\d+)?midi)/, + method(et) { + return this.defaultUnits === 'midi' ? et : FrequencyClass.mtof(et) + }, + }, + note: { + regexp: /^([a-g]{1}(?:b|#|##|x|bb|###|#x|x#|bbb)?)(-?[0-9]+)/i, + method(et, nt) { + const it = noteToScaleIndex[et.toLowerCase()] + (parseInt(nt, 10) + 1) * 12 + return this.defaultUnits === 'midi' ? it : FrequencyClass.mtof(it) + }, + }, + tr: { + regexp: /^(\d+(?:\.\d+)?):(\d+(?:\.\d+)?):?(\d+(?:\.\d+)?)?/, + method(et, nt, rt) { + let it = 1 + return ( + et && et !== '0' && (it *= this._beatsToUnits(this._getTimeSignature() * parseFloat(et))), + nt && nt !== '0' && (it *= this._beatsToUnits(parseFloat(nt))), + rt && rt !== '0' && (it *= this._beatsToUnits(parseFloat(rt) / 4)), + it + ) + }, + }, + }) + } + transpose(et) { + return new FrequencyClass(this.context, this.valueOf() * intervalToFrequencyRatio(et)) + } + harmonize(et) { + return et.map((nt) => this.transpose(nt)) + } + toMidi() { + return ftom(this.valueOf()) + } + toNote() { + const et = this.toFrequency(), + nt = Math.log2(et / FrequencyClass.A4) + let rt = Math.round(12 * nt) + 57 + const it = Math.floor(rt / 12) + return it < 0 && (rt += -12 * it), scaleIndexToNote[rt % 12] + it.toString() + } + toSeconds() { + return 1 / super.toSeconds() + } + toTicks() { + const et = this._beatsToUnits(1), + nt = this.valueOf() / et + return Math.floor(nt * this._getPPQ()) + } + _noArg() { + return 0 + } + _frequencyToUnits(et) { + return et + } + _ticksToUnits(et) { + return 1 / ((et * 60) / (this._getBpm() * this._getPPQ())) + } + _beatsToUnits(et) { + return 1 / super._beatsToUnits(et) + } + _secondsToUnits(et) { + return 1 / et + } + static mtof(et) { + return mtof(et) + } + static ftom(et) { + return ftom(et) + } + } + const noteToScaleIndex = { + cbbb: -3, + cbb: -2, + cb: -1, + c: 0, + 'c#': 1, + cx: 2, + 'c##': 2, + 'c###': 3, + 'cx#': 3, + 'c#x': 3, + dbbb: -1, + dbb: 0, + db: 1, + d: 2, + 'd#': 3, + dx: 4, + 'd##': 4, + 'd###': 5, + 'dx#': 5, + 'd#x': 5, + ebbb: 1, + ebb: 2, + eb: 3, + e: 4, + 'e#': 5, + ex: 6, + 'e##': 6, + 'e###': 7, + 'ex#': 7, + 'e#x': 7, + fbbb: 2, + fbb: 3, + fb: 4, + f: 5, + 'f#': 6, + fx: 7, + 'f##': 7, + 'f###': 8, + 'fx#': 8, + 'f#x': 8, + gbbb: 4, + gbb: 5, + gb: 6, + g: 7, + 'g#': 8, + gx: 9, + 'g##': 9, + 'g###': 10, + 'gx#': 10, + 'g#x': 10, + abbb: 6, + abb: 7, + ab: 8, + a: 9, + 'a#': 10, + ax: 11, + 'a##': 11, + 'a###': 12, + 'ax#': 12, + 'a#x': 12, + bbbb: 8, + bbb: 9, + bb: 10, + b: 11, + 'b#': 12, + bx: 13, + 'b##': 13, + 'b###': 14, + 'bx#': 14, + 'b#x': 14, + }, + scaleIndexToNote = ['C', 'C#', 'D', 'D#', 'E', 'F', 'F#', 'G', 'G#', 'A', 'A#', 'B'] + class TransportTimeClass extends TimeClass { + constructor() { + super(...arguments), (this.name = 'TransportTime') + } + _now() { + return this.context.transport.seconds + } + } + class ToneWithContext extends Tone { + constructor() { + super() + const et = optionsFromArguments(ToneWithContext.getDefaults(), arguments, ['context']) + this.defaultContext ? (this.context = this.defaultContext) : (this.context = et.context) + } + static getDefaults() { + return { context: getContext() } + } + now() { + return this.context.currentTime + this.context.lookAhead + } + immediate() { + return this.context.currentTime + } + get sampleTime() { + return 1 / this.context.sampleRate + } + get blockTime() { + return 128 / this.context.sampleRate + } + toSeconds(et) { + return assertUsedScheduleTime(et), new TimeClass(this.context, et).toSeconds() + } + toFrequency(et) { + return new FrequencyClass(this.context, et).toFrequency() + } + toTicks(et) { + return new TransportTimeClass(this.context, et).toTicks() + } + _getPartialProperties(et) { + const nt = this.get() + return ( + Object.keys(nt).forEach((rt) => { + isUndef(et[rt]) && delete nt[rt] + }), + nt + ) + } + get() { + const et = getDefaultsFromInstance(this) + return ( + Object.keys(et).forEach((nt) => { + if (Reflect.has(this, nt)) { + const rt = this[nt] + isDefined(rt) && isDefined(rt.value) && isDefined(rt.setValueAtTime) + ? (et[nt] = rt.value) + : rt instanceof ToneWithContext + ? (et[nt] = rt._getPartialProperties(et[nt])) + : isArray$e(rt) || isNumber$4(rt) || isString$2(rt) || isBoolean$1(rt) + ? (et[nt] = rt) + : delete et[nt] + } + }), + et + ) + } + set(et) { + return ( + Object.keys(et).forEach((nt) => { + Reflect.has(this, nt) && + isDefined(this[nt]) && + (this[nt] && isDefined(this[nt].value) && isDefined(this[nt].setValueAtTime) + ? this[nt].value !== et[nt] && (this[nt].value = et[nt]) + : this[nt] instanceof ToneWithContext + ? this[nt].set(et[nt]) + : (this[nt] = et[nt])) + }), + this + ) + } + } + class StateTimeline extends Timeline { + constructor(et = 'stopped') { + super(), (this.name = 'StateTimeline'), (this._initial = et), this.setStateAtTime(this._initial, 0) + } + getValueAtTime(et) { + const nt = this.get(et) + return nt !== null ? nt.state : this._initial + } + setStateAtTime(et, nt, rt) { + return assertRange(nt, 0), this.add(Object.assign({}, rt, { state: et, time: nt })), this + } + getLastState(et, nt) { + const rt = this._search(nt) + for (let it = rt; it >= 0; it--) { + const ot = this._timeline[it] + if (ot.state === et) return ot + } + } + getNextState(et, nt) { + const rt = this._search(nt) + if (rt !== -1) + for (let it = rt; it < this._timeline.length; it++) { + const ot = this._timeline[it] + if (ot.state === et) return ot + } + } + } + class Param extends ToneWithContext { + constructor() { + super(optionsFromArguments(Param.getDefaults(), arguments, ['param', 'units', 'convert'])), + (this.name = 'Param'), + (this.overridden = !1), + (this._minOutput = 1e-7) + const et = optionsFromArguments(Param.getDefaults(), arguments, ['param', 'units', 'convert']) + for ( + assert( + isDefined(et.param) && (isAudioParam(et.param) || et.param instanceof Param), + 'param must be an AudioParam', + ); + !isAudioParam(et.param); + + ) + et.param = et.param._param + ;(this._swappable = isDefined(et.swappable) ? et.swappable : !1), + this._swappable + ? ((this.input = this.context.createGain()), (this._param = et.param), this.input.connect(this._param)) + : (this._param = this.input = et.param), + (this._events = new Timeline(1e3)), + (this._initialValue = this._param.defaultValue), + (this.units = et.units), + (this.convert = et.convert), + (this._minValue = et.minValue), + (this._maxValue = et.maxValue), + isDefined(et.value) && et.value !== this._toType(this._initialValue) && this.setValueAtTime(et.value, 0) + } + static getDefaults() { + return Object.assign(ToneWithContext.getDefaults(), { convert: !0, units: 'number' }) + } + get value() { + const et = this.now() + return this.getValueAtTime(et) + } + set value(et) { + this.cancelScheduledValues(this.now()), this.setValueAtTime(et, this.now()) + } + get minValue() { + return isDefined(this._minValue) + ? this._minValue + : this.units === 'time' || + this.units === 'frequency' || + this.units === 'normalRange' || + this.units === 'positive' || + this.units === 'transportTime' || + this.units === 'ticks' || + this.units === 'bpm' || + this.units === 'hertz' || + this.units === 'samples' + ? 0 + : this.units === 'audioRange' + ? -1 + : this.units === 'decibels' + ? -1 / 0 + : this._param.minValue + } + get maxValue() { + return isDefined(this._maxValue) + ? this._maxValue + : this.units === 'normalRange' || this.units === 'audioRange' + ? 1 + : this._param.maxValue + } + _is(et, nt) { + return this.units === nt + } + _assertRange(et) { + return ( + isDefined(this.maxValue) && + isDefined(this.minValue) && + assertRange(et, this._fromType(this.minValue), this._fromType(this.maxValue)), + et + ) + } + _fromType(et) { + return this.convert && !this.overridden + ? this._is(et, 'time') + ? this.toSeconds(et) + : this._is(et, 'decibels') + ? dbToGain(et) + : this._is(et, 'frequency') + ? this.toFrequency(et) + : et + : this.overridden + ? 0 + : et + } + _toType(et) { + return this.convert && this.units === 'decibels' ? gainToDb(et) : et + } + setValueAtTime(et, nt) { + const rt = this.toSeconds(nt), + it = this._fromType(et) + return ( + assert( + isFinite(it) && isFinite(rt), + `Invalid argument(s) to setValueAtTime: ${JSON.stringify(et)}, ${JSON.stringify(nt)}`, + ), + this._assertRange(it), + this.log(this.units, 'setValueAtTime', et, rt), + this._events.add({ time: rt, type: 'setValueAtTime', value: it }), + this._param.setValueAtTime(it, rt), + this + ) + } + getValueAtTime(et) { + const nt = Math.max(this.toSeconds(et), 0), + rt = this._events.getAfter(nt), + it = this._events.get(nt) + let ot = this._initialValue + if (it === null) ot = this._initialValue + else if (it.type === 'setTargetAtTime' && (rt === null || rt.type === 'setValueAtTime')) { + const at = this._events.getBefore(it.time) + let st + at === null ? (st = this._initialValue) : (st = at.value), + it.type === 'setTargetAtTime' && (ot = this._exponentialApproach(it.time, st, it.value, it.constant, nt)) + } else if (rt === null) ot = it.value + else if (rt.type === 'linearRampToValueAtTime' || rt.type === 'exponentialRampToValueAtTime') { + let at = it.value + if (it.type === 'setTargetAtTime') { + const st = this._events.getBefore(it.time) + st === null ? (at = this._initialValue) : (at = st.value) + } + rt.type === 'linearRampToValueAtTime' + ? (ot = this._linearInterpolate(it.time, at, rt.time, rt.value, nt)) + : (ot = this._exponentialInterpolate(it.time, at, rt.time, rt.value, nt)) + } else ot = it.value + return this._toType(ot) + } + setRampPoint(et) { + et = this.toSeconds(et) + let nt = this.getValueAtTime(et) + return ( + this.cancelAndHoldAtTime(et), + this._fromType(nt) === 0 && (nt = this._toType(this._minOutput)), + this.setValueAtTime(nt, et), + this + ) + } + linearRampToValueAtTime(et, nt) { + const rt = this._fromType(et), + it = this.toSeconds(nt) + return ( + assert( + isFinite(rt) && isFinite(it), + `Invalid argument(s) to linearRampToValueAtTime: ${JSON.stringify(et)}, ${JSON.stringify(nt)}`, + ), + this._assertRange(rt), + this._events.add({ time: it, type: 'linearRampToValueAtTime', value: rt }), + this.log(this.units, 'linearRampToValueAtTime', et, it), + this._param.linearRampToValueAtTime(rt, it), + this + ) + } + exponentialRampToValueAtTime(et, nt) { + let rt = this._fromType(et) + ;(rt = EQ(rt, 0) ? this._minOutput : rt), this._assertRange(rt) + const it = this.toSeconds(nt) + return ( + assert( + isFinite(rt) && isFinite(it), + `Invalid argument(s) to exponentialRampToValueAtTime: ${JSON.stringify(et)}, ${JSON.stringify(nt)}`, + ), + this._events.add({ time: it, type: 'exponentialRampToValueAtTime', value: rt }), + this.log(this.units, 'exponentialRampToValueAtTime', et, it), + this._param.exponentialRampToValueAtTime(rt, it), + this + ) + } + exponentialRampTo(et, nt, rt) { + return ( + (rt = this.toSeconds(rt)), + this.setRampPoint(rt), + this.exponentialRampToValueAtTime(et, rt + this.toSeconds(nt)), + this + ) + } + linearRampTo(et, nt, rt) { + return ( + (rt = this.toSeconds(rt)), + this.setRampPoint(rt), + this.linearRampToValueAtTime(et, rt + this.toSeconds(nt)), + this + ) + } + targetRampTo(et, nt, rt) { + return (rt = this.toSeconds(rt)), this.setRampPoint(rt), this.exponentialApproachValueAtTime(et, rt, nt), this + } + exponentialApproachValueAtTime(et, nt, rt) { + ;(nt = this.toSeconds(nt)), (rt = this.toSeconds(rt)) + const it = Math.log(rt + 1) / Math.log(200) + return ( + this.setTargetAtTime(et, nt, it), + this.cancelAndHoldAtTime(nt + rt * 0.9), + this.linearRampToValueAtTime(et, nt + rt), + this + ) + } + setTargetAtTime(et, nt, rt) { + const it = this._fromType(et) + assert(isFinite(rt) && rt > 0, 'timeConstant must be a number greater than 0') + const ot = this.toSeconds(nt) + return ( + this._assertRange(it), + assert( + isFinite(it) && isFinite(ot), + `Invalid argument(s) to setTargetAtTime: ${JSON.stringify(et)}, ${JSON.stringify(nt)}`, + ), + this._events.add({ constant: rt, time: ot, type: 'setTargetAtTime', value: it }), + this.log(this.units, 'setTargetAtTime', et, ot, rt), + this._param.setTargetAtTime(it, ot, rt), + this + ) + } + setValueCurveAtTime(et, nt, rt, it = 1) { + ;(rt = this.toSeconds(rt)), (nt = this.toSeconds(nt)) + const ot = this._fromType(et[0]) * it + this.setValueAtTime(this._toType(ot), nt) + const at = rt / (et.length - 1) + for (let st = 1; st < et.length; st++) { + const lt = this._fromType(et[st]) * it + this.linearRampToValueAtTime(this._toType(lt), nt + st * at) + } + return this + } + cancelScheduledValues(et) { + const nt = this.toSeconds(et) + return ( + assert(isFinite(nt), `Invalid argument to cancelScheduledValues: ${JSON.stringify(et)}`), + this._events.cancel(nt), + this._param.cancelScheduledValues(nt), + this.log(this.units, 'cancelScheduledValues', nt), + this + ) + } + cancelAndHoldAtTime(et) { + const nt = this.toSeconds(et), + rt = this._fromType(this.getValueAtTime(nt)) + assert(isFinite(nt), `Invalid argument to cancelAndHoldAtTime: ${JSON.stringify(et)}`), + this.log(this.units, 'cancelAndHoldAtTime', nt, 'value=' + rt) + const it = this._events.get(nt), + ot = this._events.getAfter(nt) + return ( + it && EQ(it.time, nt) + ? ot + ? (this._param.cancelScheduledValues(ot.time), this._events.cancel(ot.time)) + : (this._param.cancelAndHoldAtTime(nt), this._events.cancel(nt + this.sampleTime)) + : ot && + (this._param.cancelScheduledValues(ot.time), + this._events.cancel(ot.time), + ot.type === 'linearRampToValueAtTime' + ? this.linearRampToValueAtTime(this._toType(rt), nt) + : ot.type === 'exponentialRampToValueAtTime' && this.exponentialRampToValueAtTime(this._toType(rt), nt)), + this._events.add({ time: nt, type: 'setValueAtTime', value: rt }), + this._param.setValueAtTime(rt, nt), + this + ) + } + rampTo(et, nt = 0.1, rt) { + return ( + this.units === 'frequency' || this.units === 'bpm' || this.units === 'decibels' + ? this.exponentialRampTo(et, nt, rt) + : this.linearRampTo(et, nt, rt), + this + ) + } + apply(et) { + const nt = this.context.currentTime + et.setValueAtTime(this.getValueAtTime(nt), nt) + const rt = this._events.get(nt) + if (rt && rt.type === 'setTargetAtTime') { + const it = this._events.getAfter(rt.time), + ot = it ? it.time : nt + 2, + at = (ot - nt) / 10 + for (let st = nt; st < ot; st += at) et.linearRampToValueAtTime(this.getValueAtTime(st), st) + } + return ( + this._events.forEachAfter(this.context.currentTime, (it) => { + it.type === 'cancelScheduledValues' + ? et.cancelScheduledValues(it.time) + : it.type === 'setTargetAtTime' + ? et.setTargetAtTime(it.value, it.time, it.constant) + : et[it.type](it.value, it.time) + }), + this + ) + } + setParam(et) { + assert(this._swappable, "The Param must be assigned as 'swappable' in the constructor") + const nt = this.input + return nt.disconnect(this._param), this.apply(et), (this._param = et), nt.connect(this._param), this + } + dispose() { + return super.dispose(), this._events.dispose(), this + } + get defaultValue() { + return this._toType(this._param.defaultValue) + } + _exponentialApproach(et, nt, rt, it, ot) { + return rt + (nt - rt) * Math.exp(-(ot - et) / it) + } + _linearInterpolate(et, nt, rt, it, ot) { + return nt + (it - nt) * ((ot - et) / (rt - et)) + } + _exponentialInterpolate(et, nt, rt, it, ot) { + return nt * Math.pow(it / nt, (ot - et) / (rt - et)) + } + } + class ToneAudioNode extends ToneWithContext { + constructor() { + super(...arguments), (this._internalChannels = []) + } + get numberOfInputs() { + return isDefined(this.input) + ? isAudioParam(this.input) || this.input instanceof Param + ? 1 + : this.input.numberOfInputs + : 0 + } + get numberOfOutputs() { + return isDefined(this.output) ? this.output.numberOfOutputs : 0 + } + _isAudioNode(et) { + return isDefined(et) && (et instanceof ToneAudioNode || isAudioNode(et)) + } + _getInternalNodes() { + const et = this._internalChannels.slice(0) + return ( + this._isAudioNode(this.input) && et.push(this.input), + this._isAudioNode(this.output) && this.input !== this.output && et.push(this.output), + et + ) + } + _setChannelProperties(et) { + this._getInternalNodes().forEach((rt) => { + ;(rt.channelCount = et.channelCount), + (rt.channelCountMode = et.channelCountMode), + (rt.channelInterpretation = et.channelInterpretation) + }) + } + _getChannelProperties() { + const et = this._getInternalNodes() + assert(et.length > 0, 'ToneAudioNode does not have any internal nodes') + const nt = et[0] + return { + channelCount: nt.channelCount, + channelCountMode: nt.channelCountMode, + channelInterpretation: nt.channelInterpretation, + } + } + get channelCount() { + return this._getChannelProperties().channelCount + } + set channelCount(et) { + const nt = this._getChannelProperties() + this._setChannelProperties(Object.assign(nt, { channelCount: et })) + } + get channelCountMode() { + return this._getChannelProperties().channelCountMode + } + set channelCountMode(et) { + const nt = this._getChannelProperties() + this._setChannelProperties(Object.assign(nt, { channelCountMode: et })) + } + get channelInterpretation() { + return this._getChannelProperties().channelInterpretation + } + set channelInterpretation(et) { + const nt = this._getChannelProperties() + this._setChannelProperties(Object.assign(nt, { channelInterpretation: et })) + } + connect(et, nt = 0, rt = 0) { + return connect(this, et, nt, rt), this + } + toDestination() { + return this.connect(this.context.destination), this + } + toMaster() { + return warn$2('toMaster() has been renamed toDestination()'), this.toDestination() + } + disconnect(et, nt = 0, rt = 0) { + return disconnect(this, et, nt, rt), this + } + chain(...et) { + return connectSeries(this, ...et), this + } + fan(...et) { + return et.forEach((nt) => this.connect(nt)), this + } + dispose() { + return ( + super.dispose(), + isDefined(this.input) && + (this.input instanceof ToneAudioNode + ? this.input.dispose() + : isAudioNode(this.input) && this.input.disconnect()), + isDefined(this.output) && + (this.output instanceof ToneAudioNode + ? this.output.dispose() + : isAudioNode(this.output) && this.output.disconnect()), + (this._internalChannels = []), + this + ) + } + } + function connectSeries(...tt) { + const et = tt.shift() + tt.reduce((nt, rt) => (nt instanceof ToneAudioNode ? nt.connect(rt) : isAudioNode(nt) && connect(nt, rt), rt), et) + } + function connect(tt, et, nt = 0, rt = 0) { + for ( + assert(isDefined(tt), 'Cannot connect from undefined node'), + assert(isDefined(et), 'Cannot connect to undefined node'), + (et instanceof ToneAudioNode || isAudioNode(et)) && + assert(et.numberOfInputs > 0, 'Cannot connect to node with no inputs'), + assert(tt.numberOfOutputs > 0, 'Cannot connect from node with no outputs'); + et instanceof ToneAudioNode || et instanceof Param; + + ) + isDefined(et.input) && (et = et.input) + for (; tt instanceof ToneAudioNode; ) isDefined(tt.output) && (tt = tt.output) + isAudioParam(et) ? tt.connect(et, nt) : tt.connect(et, nt, rt) + } + function disconnect(tt, et, nt = 0, rt = 0) { + if (isDefined(et)) for (; et instanceof ToneAudioNode; ) et = et.input + for (; !isAudioNode(tt); ) isDefined(tt.output) && (tt = tt.output) + isAudioParam(et) ? tt.disconnect(et, nt) : isAudioNode(et) ? tt.disconnect(et, nt, rt) : tt.disconnect() + } + class Gain extends ToneAudioNode { + constructor() { + super(optionsFromArguments(Gain.getDefaults(), arguments, ['gain', 'units'])), + (this.name = 'Gain'), + (this._gainNode = this.context.createGain()), + (this.input = this._gainNode), + (this.output = this._gainNode) + const et = optionsFromArguments(Gain.getDefaults(), arguments, ['gain', 'units']) + ;(this.gain = new Param({ + context: this.context, + convert: et.convert, + param: this._gainNode.gain, + units: et.units, + value: et.gain, + minValue: et.minValue, + maxValue: et.maxValue, + })), + readOnly(this, 'gain') + } + static getDefaults() { + return Object.assign(ToneAudioNode.getDefaults(), { convert: !0, gain: 1, units: 'gain' }) + } + dispose() { + return super.dispose(), this._gainNode.disconnect(), this.gain.dispose(), this + } + } + class OneShotSource extends ToneAudioNode { + constructor(et) { + super(et), + (this.onended = noOp), + (this._startTime = -1), + (this._stopTime = -1), + (this._timeout = -1), + (this.output = new Gain({ context: this.context, gain: 0 })), + (this._gainNode = this.output), + (this.getStateAtTime = function (nt) { + const rt = this.toSeconds(nt) + return this._startTime !== -1 && rt >= this._startTime && (this._stopTime === -1 || rt <= this._stopTime) + ? 'started' + : 'stopped' + }), + (this._fadeIn = et.fadeIn), + (this._fadeOut = et.fadeOut), + (this._curve = et.curve), + (this.onended = et.onended) + } + static getDefaults() { + return Object.assign(ToneAudioNode.getDefaults(), { curve: 'linear', fadeIn: 0, fadeOut: 0, onended: noOp }) + } + _startGain(et, nt = 1) { + assert(this._startTime === -1, 'Source cannot be started more than once') + const rt = this.toSeconds(this._fadeIn) + return ( + (this._startTime = et + rt), + (this._startTime = Math.max(this._startTime, this.context.currentTime)), + rt > 0 + ? (this._gainNode.gain.setValueAtTime(0, et), + this._curve === 'linear' + ? this._gainNode.gain.linearRampToValueAtTime(nt, et + rt) + : this._gainNode.gain.exponentialApproachValueAtTime(nt, et, rt)) + : this._gainNode.gain.setValueAtTime(nt, et), + this + ) + } + stop(et) { + return this.log('stop', et), this._stopGain(this.toSeconds(et)), this + } + _stopGain(et) { + assert(this._startTime !== -1, "'start' must be called before 'stop'"), this.cancelStop() + const nt = this.toSeconds(this._fadeOut) + return ( + (this._stopTime = this.toSeconds(et) + nt), + (this._stopTime = Math.max(this._stopTime, this.now())), + nt > 0 + ? this._curve === 'linear' + ? this._gainNode.gain.linearRampTo(0, nt, et) + : this._gainNode.gain.targetRampTo(0, nt, et) + : (this._gainNode.gain.cancelAndHoldAtTime(et), this._gainNode.gain.setValueAtTime(0, et)), + this.context.clearTimeout(this._timeout), + (this._timeout = this.context.setTimeout(() => { + const rt = this._curve === 'exponential' ? nt * 2 : 0 + this._stopSource(this.now() + rt), this._onended() + }, this._stopTime - this.context.currentTime)), + this + ) + } + _onended() { + if (this.onended !== noOp && (this.onended(this), (this.onended = noOp), !this.context.isOffline)) { + const et = () => this.dispose() + typeof window.requestIdleCallback < 'u' ? window.requestIdleCallback(et) : setTimeout(et, 1e3) + } + } + get state() { + return this.getStateAtTime(this.now()) + } + cancelStop() { + return ( + this.log('cancelStop'), + assert(this._startTime !== -1, 'Source is not started'), + this._gainNode.gain.cancelScheduledValues(this._startTime + this.sampleTime), + this.context.clearTimeout(this._timeout), + (this._stopTime = -1), + this + ) + } + dispose() { + return super.dispose(), this._gainNode.dispose(), (this.onended = noOp), this + } + } + class ToneConstantSource extends OneShotSource { + constructor() { + super(optionsFromArguments(ToneConstantSource.getDefaults(), arguments, ['offset'])), + (this.name = 'ToneConstantSource'), + (this._source = this.context.createConstantSource()) + const et = optionsFromArguments(ToneConstantSource.getDefaults(), arguments, ['offset']) + connect(this._source, this._gainNode), + (this.offset = new Param({ + context: this.context, + convert: et.convert, + param: this._source.offset, + units: et.units, + value: et.offset, + minValue: et.minValue, + maxValue: et.maxValue, + })) + } + static getDefaults() { + return Object.assign(OneShotSource.getDefaults(), { convert: !0, offset: 1, units: 'number' }) + } + start(et) { + const nt = this.toSeconds(et) + return this.log('start', nt), this._startGain(nt), this._source.start(nt), this + } + _stopSource(et) { + this._source.stop(et) + } + dispose() { + return ( + super.dispose(), this.state === 'started' && this.stop(), this._source.disconnect(), this.offset.dispose(), this + ) + } + } + class Signal extends ToneAudioNode { + constructor() { + super(optionsFromArguments(Signal.getDefaults(), arguments, ['value', 'units'])), + (this.name = 'Signal'), + (this.override = !0) + const et = optionsFromArguments(Signal.getDefaults(), arguments, ['value', 'units']) + ;(this.output = this._constantSource = + new ToneConstantSource({ + context: this.context, + convert: et.convert, + offset: et.value, + units: et.units, + minValue: et.minValue, + maxValue: et.maxValue, + })), + this._constantSource.start(0), + (this.input = this._param = this._constantSource.offset) + } + static getDefaults() { + return Object.assign(ToneAudioNode.getDefaults(), { convert: !0, units: 'number', value: 0 }) + } + connect(et, nt = 0, rt = 0) { + return connectSignal(this, et, nt, rt), this + } + dispose() { + return super.dispose(), this._param.dispose(), this._constantSource.dispose(), this + } + setValueAtTime(et, nt) { + return this._param.setValueAtTime(et, nt), this + } + getValueAtTime(et) { + return this._param.getValueAtTime(et) + } + setRampPoint(et) { + return this._param.setRampPoint(et), this + } + linearRampToValueAtTime(et, nt) { + return this._param.linearRampToValueAtTime(et, nt), this + } + exponentialRampToValueAtTime(et, nt) { + return this._param.exponentialRampToValueAtTime(et, nt), this + } + exponentialRampTo(et, nt, rt) { + return this._param.exponentialRampTo(et, nt, rt), this + } + linearRampTo(et, nt, rt) { + return this._param.linearRampTo(et, nt, rt), this + } + targetRampTo(et, nt, rt) { + return this._param.targetRampTo(et, nt, rt), this + } + exponentialApproachValueAtTime(et, nt, rt) { + return this._param.exponentialApproachValueAtTime(et, nt, rt), this + } + setTargetAtTime(et, nt, rt) { + return this._param.setTargetAtTime(et, nt, rt), this + } + setValueCurveAtTime(et, nt, rt, it) { + return this._param.setValueCurveAtTime(et, nt, rt, it), this + } + cancelScheduledValues(et) { + return this._param.cancelScheduledValues(et), this + } + cancelAndHoldAtTime(et) { + return this._param.cancelAndHoldAtTime(et), this + } + rampTo(et, nt, rt) { + return this._param.rampTo(et, nt, rt), this + } + get value() { + return this._param.value + } + set value(et) { + this._param.value = et + } + get convert() { + return this._param.convert + } + set convert(et) { + this._param.convert = et + } + get units() { + return this._param.units + } + get overridden() { + return this._param.overridden + } + set overridden(et) { + this._param.overridden = et + } + get maxValue() { + return this._param.maxValue + } + get minValue() { + return this._param.minValue + } + apply(et) { + return this._param.apply(et), this + } + } + function connectSignal(tt, et, nt, rt) { + ;(et instanceof Param || isAudioParam(et) || (et instanceof Signal && et.override)) && + (et.cancelScheduledValues(0), et.setValueAtTime(0, 0), et instanceof Signal && (et.overridden = !0)), + connect(tt, et, nt, rt) + } + class TickParam extends Param { + constructor() { + super(optionsFromArguments(TickParam.getDefaults(), arguments, ['value'])), + (this.name = 'TickParam'), + (this._events = new Timeline(1 / 0)), + (this._multiplier = 1) + const et = optionsFromArguments(TickParam.getDefaults(), arguments, ['value']) + ;(this._multiplier = et.multiplier), + this._events.cancel(0), + this._events.add({ ticks: 0, time: 0, type: 'setValueAtTime', value: this._fromType(et.value) }), + this.setValueAtTime(et.value, 0) + } + static getDefaults() { + return Object.assign(Param.getDefaults(), { multiplier: 1, units: 'hertz', value: 1 }) + } + setTargetAtTime(et, nt, rt) { + ;(nt = this.toSeconds(nt)), this.setRampPoint(nt) + const it = this._fromType(et), + ot = this._events.get(nt), + at = Math.round(Math.max(1 / rt, 1)) + for (let st = 0; st <= at; st++) { + const lt = rt * st + nt, + ct = this._exponentialApproach(ot.time, ot.value, it, rt, lt) + this.linearRampToValueAtTime(this._toType(ct), lt) + } + return this + } + setValueAtTime(et, nt) { + const rt = this.toSeconds(nt) + super.setValueAtTime(et, nt) + const it = this._events.get(rt), + ot = this._events.previousEvent(it), + at = this._getTicksUntilEvent(ot, rt) + return (it.ticks = Math.max(at, 0)), this + } + linearRampToValueAtTime(et, nt) { + const rt = this.toSeconds(nt) + super.linearRampToValueAtTime(et, nt) + const it = this._events.get(rt), + ot = this._events.previousEvent(it), + at = this._getTicksUntilEvent(ot, rt) + return (it.ticks = Math.max(at, 0)), this + } + exponentialRampToValueAtTime(et, nt) { + nt = this.toSeconds(nt) + const rt = this._fromType(et), + it = this._events.get(nt), + ot = Math.round(Math.max((nt - it.time) * 10, 1)), + at = (nt - it.time) / ot + for (let st = 0; st <= ot; st++) { + const lt = at * st + it.time, + ct = this._exponentialInterpolate(it.time, it.value, nt, rt, lt) + this.linearRampToValueAtTime(this._toType(ct), lt) + } + return this + } + _getTicksUntilEvent(et, nt) { + if (et === null) et = { ticks: 0, time: 0, type: 'setValueAtTime', value: 0 } + else if (isUndef(et.ticks)) { + const at = this._events.previousEvent(et) + et.ticks = this._getTicksUntilEvent(at, et.time) + } + const rt = this._fromType(this.getValueAtTime(et.time)) + let it = this._fromType(this.getValueAtTime(nt)) + const ot = this._events.get(nt) + return ( + ot && + ot.time === nt && + ot.type === 'setValueAtTime' && + (it = this._fromType(this.getValueAtTime(nt - this.sampleTime))), + 0.5 * (nt - et.time) * (rt + it) + et.ticks + ) + } + getTicksAtTime(et) { + const nt = this.toSeconds(et), + rt = this._events.get(nt) + return Math.max(this._getTicksUntilEvent(rt, nt), 0) + } + getDurationOfTicks(et, nt) { + const rt = this.toSeconds(nt), + it = this.getTicksAtTime(nt) + return this.getTimeOfTick(it + et) - rt + } + getTimeOfTick(et) { + const nt = this._events.get(et, 'ticks'), + rt = this._events.getAfter(et, 'ticks') + if (nt && nt.ticks === et) return nt.time + if (nt && rt && rt.type === 'linearRampToValueAtTime' && nt.value !== rt.value) { + const it = this._fromType(this.getValueAtTime(nt.time)), + at = (this._fromType(this.getValueAtTime(rt.time)) - it) / (rt.time - nt.time), + st = Math.sqrt(Math.pow(it, 2) - 2 * at * (nt.ticks - et)), + lt = (-it + st) / at, + ct = (-it - st) / at + return (lt > 0 ? lt : ct) + nt.time + } else return nt ? (nt.value === 0 ? 1 / 0 : nt.time + (et - nt.ticks) / nt.value) : et / this._initialValue + } + ticksToTime(et, nt) { + return this.getDurationOfTicks(et, nt) + } + timeToTicks(et, nt) { + const rt = this.toSeconds(nt), + it = this.toSeconds(et), + ot = this.getTicksAtTime(rt) + return this.getTicksAtTime(rt + it) - ot + } + _fromType(et) { + return this.units === 'bpm' && this.multiplier ? 1 / (60 / et / this.multiplier) : super._fromType(et) + } + _toType(et) { + return this.units === 'bpm' && this.multiplier ? (et / this.multiplier) * 60 : super._toType(et) + } + get multiplier() { + return this._multiplier + } + set multiplier(et) { + const nt = this.value + ;(this._multiplier = et), this.cancelScheduledValues(0), this.setValueAtTime(nt, 0) + } + } + class TickSignal extends Signal { + constructor() { + super(optionsFromArguments(TickSignal.getDefaults(), arguments, ['value'])), (this.name = 'TickSignal') + const et = optionsFromArguments(TickSignal.getDefaults(), arguments, ['value']) + this.input = this._param = new TickParam({ + context: this.context, + convert: et.convert, + multiplier: et.multiplier, + param: this._constantSource.offset, + units: et.units, + value: et.value, + }) + } + static getDefaults() { + return Object.assign(Signal.getDefaults(), { multiplier: 1, units: 'hertz', value: 1 }) + } + ticksToTime(et, nt) { + return this._param.ticksToTime(et, nt) + } + timeToTicks(et, nt) { + return this._param.timeToTicks(et, nt) + } + getTimeOfTick(et) { + return this._param.getTimeOfTick(et) + } + getDurationOfTicks(et, nt) { + return this._param.getDurationOfTicks(et, nt) + } + getTicksAtTime(et) { + return this._param.getTicksAtTime(et) + } + get multiplier() { + return this._param.multiplier + } + set multiplier(et) { + this._param.multiplier = et + } + dispose() { + return super.dispose(), this._param.dispose(), this + } + } + class TickSource extends ToneWithContext { + constructor() { + super(optionsFromArguments(TickSource.getDefaults(), arguments, ['frequency'])), + (this.name = 'TickSource'), + (this._state = new StateTimeline()), + (this._tickOffset = new Timeline()), + (this._ticksAtTime = new Timeline()), + (this._secondsAtTime = new Timeline()) + const et = optionsFromArguments(TickSource.getDefaults(), arguments, ['frequency']) + ;(this.frequency = new TickSignal({ context: this.context, units: et.units, value: et.frequency })), + readOnly(this, 'frequency'), + this._state.setStateAtTime('stopped', 0), + this.setTicksAtTime(0, 0) + } + static getDefaults() { + return Object.assign({ frequency: 1, units: 'hertz' }, ToneWithContext.getDefaults()) + } + get state() { + return this.getStateAtTime(this.now()) + } + start(et, nt) { + const rt = this.toSeconds(et) + return ( + this._state.getValueAtTime(rt) !== 'started' && + (this._state.setStateAtTime('started', rt), + isDefined(nt) && this.setTicksAtTime(nt, rt), + this._ticksAtTime.cancel(rt), + this._secondsAtTime.cancel(rt)), + this + ) + } + stop(et) { + const nt = this.toSeconds(et) + if (this._state.getValueAtTime(nt) === 'stopped') { + const rt = this._state.get(nt) + rt && rt.time > 0 && (this._tickOffset.cancel(rt.time), this._state.cancel(rt.time)) + } + return ( + this._state.cancel(nt), + this._state.setStateAtTime('stopped', nt), + this.setTicksAtTime(0, nt), + this._ticksAtTime.cancel(nt), + this._secondsAtTime.cancel(nt), + this + ) + } + pause(et) { + const nt = this.toSeconds(et) + return ( + this._state.getValueAtTime(nt) === 'started' && + (this._state.setStateAtTime('paused', nt), this._ticksAtTime.cancel(nt), this._secondsAtTime.cancel(nt)), + this + ) + } + cancel(et) { + return ( + (et = this.toSeconds(et)), + this._state.cancel(et), + this._tickOffset.cancel(et), + this._ticksAtTime.cancel(et), + this._secondsAtTime.cancel(et), + this + ) + } + getTicksAtTime(et) { + const nt = this.toSeconds(et), + rt = this._state.getLastState('stopped', nt), + it = this._ticksAtTime.get(nt), + ot = { state: 'paused', time: nt } + this._state.add(ot) + let at = it || rt, + st = it ? it.ticks : 0, + lt = null + return ( + this._state.forEachBetween(at.time, nt + this.sampleTime, (ct) => { + let ut = at.time + const ht = this._tickOffset.get(ct.time) + ht && ht.time >= at.time && ((st = ht.ticks), (ut = ht.time)), + at.state === 'started' && + ct.state !== 'started' && + ((st += this.frequency.getTicksAtTime(ct.time) - this.frequency.getTicksAtTime(ut)), + ct.time != ot.time && (lt = { state: ct.state, time: ct.time, ticks: st })), + (at = ct) + }), + this._state.remove(ot), + lt && this._ticksAtTime.add(lt), + st + ) + } + get ticks() { + return this.getTicksAtTime(this.now()) + } + set ticks(et) { + this.setTicksAtTime(et, this.now()) + } + get seconds() { + return this.getSecondsAtTime(this.now()) + } + set seconds(et) { + const nt = this.now(), + rt = this.frequency.timeToTicks(et, nt) + this.setTicksAtTime(rt, nt) + } + getSecondsAtTime(et) { + et = this.toSeconds(et) + const nt = this._state.getLastState('stopped', et), + rt = { state: 'paused', time: et } + this._state.add(rt) + const it = this._secondsAtTime.get(et) + let ot = it || nt, + at = it ? it.seconds : 0, + st = null + return ( + this._state.forEachBetween(ot.time, et + this.sampleTime, (lt) => { + let ct = ot.time + const ut = this._tickOffset.get(lt.time) + ut && ut.time >= ot.time && ((at = ut.seconds), (ct = ut.time)), + ot.state === 'started' && + lt.state !== 'started' && + ((at += lt.time - ct), lt.time != rt.time && (st = { state: lt.state, time: lt.time, seconds: at })), + (ot = lt) + }), + this._state.remove(rt), + st && this._secondsAtTime.add(st), + at + ) + } + setTicksAtTime(et, nt) { + return ( + (nt = this.toSeconds(nt)), + this._tickOffset.cancel(nt), + this._tickOffset.add({ seconds: this.frequency.getDurationOfTicks(et, nt), ticks: et, time: nt }), + this._ticksAtTime.cancel(nt), + this._secondsAtTime.cancel(nt), + this + ) + } + getStateAtTime(et) { + return (et = this.toSeconds(et)), this._state.getValueAtTime(et) + } + getTimeOfTick(et, nt = this.now()) { + const rt = this._tickOffset.get(nt), + it = this._state.get(nt), + ot = Math.max(rt.time, it.time), + at = this.frequency.getTicksAtTime(ot) + et - rt.ticks + return this.frequency.getTimeOfTick(at) + } + forEachTickBetween(et, nt, rt) { + let it = this._state.get(et) + this._state.forEachBetween(et, nt, (at) => { + it && + it.state === 'started' && + at.state !== 'started' && + this.forEachTickBetween(Math.max(it.time, et), at.time - this.sampleTime, rt), + (it = at) + }) + let ot = null + if (it && it.state === 'started') { + const at = Math.max(it.time, et), + st = this.frequency.getTicksAtTime(at), + lt = this.frequency.getTicksAtTime(it.time), + ct = st - lt + let ut = Math.ceil(ct) - ct + ut = EQ(ut, 1) ? 0 : ut + let ht = this.frequency.getTimeOfTick(st + ut) + for (; ht < nt; ) { + try { + rt(ht, Math.round(this.getTicksAtTime(ht))) + } catch (dt) { + ot = dt + break + } + ht += this.frequency.getDurationOfTicks(1, ht) + } + } + if (ot) throw ot + return this + } + dispose() { + return ( + super.dispose(), + this._state.dispose(), + this._tickOffset.dispose(), + this._ticksAtTime.dispose(), + this._secondsAtTime.dispose(), + this.frequency.dispose(), + this + ) + } + } + class Clock extends ToneWithContext { + constructor() { + super(optionsFromArguments(Clock.getDefaults(), arguments, ['callback', 'frequency'])), + (this.name = 'Clock'), + (this.callback = noOp), + (this._lastUpdate = 0), + (this._state = new StateTimeline('stopped')), + (this._boundLoop = this._loop.bind(this)) + const et = optionsFromArguments(Clock.getDefaults(), arguments, ['callback', 'frequency']) + ;(this.callback = et.callback), + (this._tickSource = new TickSource({ context: this.context, frequency: et.frequency, units: et.units })), + (this._lastUpdate = 0), + (this.frequency = this._tickSource.frequency), + readOnly(this, 'frequency'), + this._state.setStateAtTime('stopped', 0), + this.context.on('tick', this._boundLoop) + } + static getDefaults() { + return Object.assign(ToneWithContext.getDefaults(), { callback: noOp, frequency: 1, units: 'hertz' }) + } + get state() { + return this._state.getValueAtTime(this.now()) + } + start(et, nt) { + assertContextRunning(this.context) + const rt = this.toSeconds(et) + return ( + this.log('start', rt), + this._state.getValueAtTime(rt) !== 'started' && + (this._state.setStateAtTime('started', rt), + this._tickSource.start(rt, nt), + rt < this._lastUpdate && this.emit('start', rt, nt)), + this + ) + } + stop(et) { + const nt = this.toSeconds(et) + return ( + this.log('stop', nt), + this._state.cancel(nt), + this._state.setStateAtTime('stopped', nt), + this._tickSource.stop(nt), + nt < this._lastUpdate && this.emit('stop', nt), + this + ) + } + pause(et) { + const nt = this.toSeconds(et) + return ( + this._state.getValueAtTime(nt) === 'started' && + (this._state.setStateAtTime('paused', nt), + this._tickSource.pause(nt), + nt < this._lastUpdate && this.emit('pause', nt)), + this + ) + } + get ticks() { + return Math.ceil(this.getTicksAtTime(this.now())) + } + set ticks(et) { + this._tickSource.ticks = et + } + get seconds() { + return this._tickSource.seconds + } + set seconds(et) { + this._tickSource.seconds = et + } + getSecondsAtTime(et) { + return this._tickSource.getSecondsAtTime(et) + } + setTicksAtTime(et, nt) { + return this._tickSource.setTicksAtTime(et, nt), this + } + getTimeOfTick(et, nt = this.now()) { + return this._tickSource.getTimeOfTick(et, nt) + } + getTicksAtTime(et) { + return this._tickSource.getTicksAtTime(et) + } + nextTickTime(et, nt) { + const rt = this.toSeconds(nt), + it = this.getTicksAtTime(rt) + return this._tickSource.getTimeOfTick(it + et, rt) + } + _loop() { + const et = this._lastUpdate, + nt = this.now() + ;(this._lastUpdate = nt), + this.log('loop', et, nt), + et !== nt && + (this._state.forEachBetween(et, nt, (rt) => { + switch (rt.state) { + case 'started': + const it = this._tickSource.getTicksAtTime(rt.time) + this.emit('start', rt.time, it) + break + case 'stopped': + rt.time !== 0 && this.emit('stop', rt.time) + break + case 'paused': + this.emit('pause', rt.time) + break + } + }), + this._tickSource.forEachTickBetween(et, nt, (rt, it) => { + this.callback(rt, it) + })) + } + getStateAtTime(et) { + const nt = this.toSeconds(et) + return this._state.getValueAtTime(nt) + } + dispose() { + return ( + super.dispose(), + this.context.off('tick', this._boundLoop), + this._tickSource.dispose(), + this._state.dispose(), + this + ) + } + } + Emitter$1.mixin(Clock) + class ToneAudioBuffers extends Tone { + constructor() { + super(), (this.name = 'ToneAudioBuffers'), (this._buffers = new Map()), (this._loadingCount = 0) + const et = optionsFromArguments(ToneAudioBuffers.getDefaults(), arguments, ['urls', 'onload', 'baseUrl'], 'urls') + ;(this.baseUrl = et.baseUrl), + Object.keys(et.urls).forEach((nt) => { + this._loadingCount++ + const rt = et.urls[nt] + this.add(nt, rt, this._bufferLoaded.bind(this, et.onload), et.onerror) + }) + } + static getDefaults() { + return { baseUrl: '', onerror: noOp, onload: noOp, urls: {} } + } + has(et) { + return this._buffers.has(et.toString()) + } + get(et) { + return assert(this.has(et), `ToneAudioBuffers has no buffer named: ${et}`), this._buffers.get(et.toString()) + } + _bufferLoaded(et) { + this._loadingCount--, this._loadingCount === 0 && et && et() + } + get loaded() { + return Array.from(this._buffers).every(([et, nt]) => nt.loaded) + } + add(et, nt, rt = noOp, it = noOp) { + return ( + isString$2(nt) + ? (this.baseUrl && nt.trim().substring(0, 11).toLowerCase() === 'data:audio/' && (this.baseUrl = ''), + this._buffers.set(et.toString(), new ToneAudioBuffer(this.baseUrl + nt, rt, it))) + : this._buffers.set(et.toString(), new ToneAudioBuffer(nt, rt, it)), + this + ) + } + dispose() { + return super.dispose(), this._buffers.forEach((et) => et.dispose()), this._buffers.clear(), this + } + } + class TicksClass extends TransportTimeClass { + constructor() { + super(...arguments), (this.name = 'Ticks'), (this.defaultUnits = 'i') + } + _now() { + return this.context.transport.ticks + } + _beatsToUnits(et) { + return this._getPPQ() * et + } + _secondsToUnits(et) { + return Math.floor((et / (60 / this._getBpm())) * this._getPPQ()) + } + _ticksToUnits(et) { + return et + } + toTicks() { + return this.valueOf() + } + toSeconds() { + return (this.valueOf() / this._getPPQ()) * (60 / this._getBpm()) + } + } + class Draw extends ToneWithContext { + constructor() { + super(...arguments), + (this.name = 'Draw'), + (this.expiration = 0.25), + (this.anticipation = 0.008), + (this._events = new Timeline()), + (this._boundDrawLoop = this._drawLoop.bind(this)), + (this._animationFrame = -1) + } + schedule(et, nt) { + return ( + this._events.add({ callback: et, time: this.toSeconds(nt) }), + this._events.length === 1 && (this._animationFrame = requestAnimationFrame(this._boundDrawLoop)), + this + ) + } + cancel(et) { + return this._events.cancel(this.toSeconds(et)), this + } + _drawLoop() { + const et = this.context.currentTime + for (; this._events.length && this._events.peek().time - this.anticipation <= et; ) { + const nt = this._events.shift() + nt && et - nt.time <= this.expiration && nt.callback() + } + this._events.length > 0 && (this._animationFrame = requestAnimationFrame(this._boundDrawLoop)) + } + dispose() { + return super.dispose(), this._events.dispose(), cancelAnimationFrame(this._animationFrame), this + } + } + onContextInit((tt) => { + tt.draw = new Draw({ context: tt }) + }) + onContextClose((tt) => { + tt.draw.dispose() + }) + class IntervalTimeline extends Tone { + constructor() { + super(...arguments), (this.name = 'IntervalTimeline'), (this._root = null), (this._length = 0) + } + add(et) { + assert(isDefined(et.time), 'Events must have a time property'), + assert(isDefined(et.duration), 'Events must have a duration parameter'), + (et.time = et.time.valueOf()) + let nt = new IntervalNode(et.time, et.time + et.duration, et) + for (this._root === null ? (this._root = nt) : this._root.insert(nt), this._length++; nt !== null; ) + nt.updateHeight(), nt.updateMax(), this._rebalance(nt), (nt = nt.parent) + return this + } + remove(et) { + if (this._root !== null) { + const nt = [] + this._root.search(et.time, nt) + for (const rt of nt) + if (rt.event === et) { + this._removeNode(rt), this._length-- + break + } + } + return this + } + get length() { + return this._length + } + cancel(et) { + return this.forEachFrom(et, (nt) => this.remove(nt)), this + } + _setRoot(et) { + ;(this._root = et), this._root !== null && (this._root.parent = null) + } + _replaceNodeInParent(et, nt) { + et.parent !== null + ? (et.isLeftChild() ? (et.parent.left = nt) : (et.parent.right = nt), this._rebalance(et.parent)) + : this._setRoot(nt) + } + _removeNode(et) { + if (et.left === null && et.right === null) this._replaceNodeInParent(et, null) + else if (et.right === null) this._replaceNodeInParent(et, et.left) + else if (et.left === null) this._replaceNodeInParent(et, et.right) + else { + const nt = et.getBalance() + let rt, + it = null + if (nt > 0) + if (et.left.right === null) (rt = et.left), (rt.right = et.right), (it = rt) + else { + for (rt = et.left.right; rt.right !== null; ) rt = rt.right + rt.parent && ((rt.parent.right = rt.left), (it = rt.parent), (rt.left = et.left), (rt.right = et.right)) + } + else if (et.right.left === null) (rt = et.right), (rt.left = et.left), (it = rt) + else { + for (rt = et.right.left; rt.left !== null; ) rt = rt.left + rt.parent && ((rt.parent.left = rt.right), (it = rt.parent), (rt.left = et.left), (rt.right = et.right)) + } + et.parent !== null ? (et.isLeftChild() ? (et.parent.left = rt) : (et.parent.right = rt)) : this._setRoot(rt), + it && this._rebalance(it) + } + et.dispose() + } + _rotateLeft(et) { + const nt = et.parent, + rt = et.isLeftChild(), + it = et.right + it && ((et.right = it.left), (it.left = et)), + nt !== null ? (rt ? (nt.left = it) : (nt.right = it)) : this._setRoot(it) + } + _rotateRight(et) { + const nt = et.parent, + rt = et.isLeftChild(), + it = et.left + it && ((et.left = it.right), (it.right = et)), + nt !== null ? (rt ? (nt.left = it) : (nt.right = it)) : this._setRoot(it) + } + _rebalance(et) { + const nt = et.getBalance() + nt > 1 && et.left + ? et.left.getBalance() < 0 + ? this._rotateLeft(et.left) + : this._rotateRight(et) + : nt < -1 && et.right && (et.right.getBalance() > 0 ? this._rotateRight(et.right) : this._rotateLeft(et)) + } + get(et) { + if (this._root !== null) { + const nt = [] + if ((this._root.search(et, nt), nt.length > 0)) { + let rt = nt[0] + for (let it = 1; it < nt.length; it++) nt[it].low > rt.low && (rt = nt[it]) + return rt.event + } + } + return null + } + forEach(et) { + if (this._root !== null) { + const nt = [] + this._root.traverse((rt) => nt.push(rt)), + nt.forEach((rt) => { + rt.event && et(rt.event) + }) + } + return this + } + forEachAtTime(et, nt) { + if (this._root !== null) { + const rt = [] + this._root.search(et, rt), + rt.forEach((it) => { + it.event && nt(it.event) + }) + } + return this + } + forEachFrom(et, nt) { + if (this._root !== null) { + const rt = [] + this._root.searchAfter(et, rt), + rt.forEach((it) => { + it.event && nt(it.event) + }) + } + return this + } + dispose() { + return ( + super.dispose(), this._root !== null && this._root.traverse((et) => et.dispose()), (this._root = null), this + ) + } + } + class IntervalNode { + constructor(et, nt, rt) { + ;(this._left = null), + (this._right = null), + (this.parent = null), + (this.height = 0), + (this.event = rt), + (this.low = et), + (this.high = nt), + (this.max = this.high) + } + insert(et) { + et.low <= this.low + ? this.left === null + ? (this.left = et) + : this.left.insert(et) + : this.right === null + ? (this.right = et) + : this.right.insert(et) + } + search(et, nt) { + et > this.max || + (this.left !== null && this.left.search(et, nt), + this.low <= et && this.high > et && nt.push(this), + !(this.low > et) && this.right !== null && this.right.search(et, nt)) + } + searchAfter(et, nt) { + this.low >= et && (nt.push(this), this.left !== null && this.left.searchAfter(et, nt)), + this.right !== null && this.right.searchAfter(et, nt) + } + traverse(et) { + et(this), this.left !== null && this.left.traverse(et), this.right !== null && this.right.traverse(et) + } + updateHeight() { + this.left !== null && this.right !== null + ? (this.height = Math.max(this.left.height, this.right.height) + 1) + : this.right !== null + ? (this.height = this.right.height + 1) + : this.left !== null + ? (this.height = this.left.height + 1) + : (this.height = 0) + } + updateMax() { + ;(this.max = this.high), + this.left !== null && (this.max = Math.max(this.max, this.left.max)), + this.right !== null && (this.max = Math.max(this.max, this.right.max)) + } + getBalance() { + let et = 0 + return ( + this.left !== null && this.right !== null + ? (et = this.left.height - this.right.height) + : this.left !== null + ? (et = this.left.height + 1) + : this.right !== null && (et = -(this.right.height + 1)), + et + ) + } + isLeftChild() { + return this.parent !== null && this.parent.left === this + } + get left() { + return this._left + } + set left(et) { + ;(this._left = et), et !== null && (et.parent = this), this.updateHeight(), this.updateMax() + } + get right() { + return this._right + } + set right(et) { + ;(this._right = et), et !== null && (et.parent = this), this.updateHeight(), this.updateMax() + } + dispose() { + ;(this.parent = null), (this._left = null), (this._right = null), (this.event = null) + } + } + class Volume extends ToneAudioNode { + constructor() { + super(optionsFromArguments(Volume.getDefaults(), arguments, ['volume'])), (this.name = 'Volume') + const et = optionsFromArguments(Volume.getDefaults(), arguments, ['volume']) + ;(this.input = this.output = new Gain({ context: this.context, gain: et.volume, units: 'decibels' })), + (this.volume = this.output.gain), + readOnly(this, 'volume'), + (this._unmutedVolume = et.volume), + (this.mute = et.mute) + } + static getDefaults() { + return Object.assign(ToneAudioNode.getDefaults(), { mute: !1, volume: 0 }) + } + get mute() { + return this.volume.value === -1 / 0 + } + set mute(et) { + !this.mute && et + ? ((this._unmutedVolume = this.volume.value), (this.volume.value = -1 / 0)) + : this.mute && !et && (this.volume.value = this._unmutedVolume) + } + dispose() { + return super.dispose(), this.input.dispose(), this.volume.dispose(), this + } + } + let Destination$1 = class b1 extends ToneAudioNode { + constructor() { + super(optionsFromArguments(b1.getDefaults(), arguments)), + (this.name = 'Destination'), + (this.input = new Volume({ context: this.context })), + (this.output = new Gain({ context: this.context })), + (this.volume = this.input.volume) + const et = optionsFromArguments(b1.getDefaults(), arguments) + connectSeries(this.input, this.output, this.context.rawContext.destination), + (this.mute = et.mute), + (this._internalChannels = [this.input, this.context.rawContext.destination, this.output]) + } + static getDefaults() { + return Object.assign(ToneAudioNode.getDefaults(), { mute: !1, volume: 0 }) + } + get mute() { + return this.input.mute + } + set mute(et) { + this.input.mute = et + } + chain(...et) { + return this.input.disconnect(), et.unshift(this.input), et.push(this.output), connectSeries(...et), this + } + get maxChannelCount() { + return this.context.rawContext.destination.maxChannelCount + } + dispose() { + return super.dispose(), this.volume.dispose(), this + } + } + onContextInit((tt) => { + tt.destination = new Destination$1({ context: tt }) + }) + onContextClose((tt) => { + tt.destination.dispose() + }) + class TimelineValue extends Tone { + constructor(et) { + super(), (this.name = 'TimelineValue'), (this._timeline = new Timeline({ memory: 10 })), (this._initialValue = et) + } + set(et, nt) { + return this._timeline.add({ value: et, time: nt }), this + } + get(et) { + const nt = this._timeline.get(et) + return nt ? nt.value : this._initialValue + } + } + class SignalOperator extends ToneAudioNode { + constructor() { + super(Object.assign(optionsFromArguments(SignalOperator.getDefaults(), arguments, ['context']))) + } + connect(et, nt = 0, rt = 0) { + return connectSignal(this, et, nt, rt), this + } + } + class WaveShaper extends SignalOperator { + constructor() { + super(Object.assign(optionsFromArguments(WaveShaper.getDefaults(), arguments, ['mapping', 'length']))), + (this.name = 'WaveShaper'), + (this._shaper = this.context.createWaveShaper()), + (this.input = this._shaper), + (this.output = this._shaper) + const et = optionsFromArguments(WaveShaper.getDefaults(), arguments, ['mapping', 'length']) + isArray$e(et.mapping) || et.mapping instanceof Float32Array + ? (this.curve = Float32Array.from(et.mapping)) + : isFunction$2(et.mapping) && this.setMap(et.mapping, et.length) + } + static getDefaults() { + return Object.assign(Signal.getDefaults(), { length: 1024 }) + } + setMap(et, nt = 1024) { + const rt = new Float32Array(nt) + for (let it = 0, ot = nt; it < ot; it++) { + const at = (it / (ot - 1)) * 2 - 1 + rt[it] = et(at, it) + } + return (this.curve = rt), this + } + get curve() { + return this._shaper.curve + } + set curve(et) { + this._shaper.curve = et + } + get oversample() { + return this._shaper.oversample + } + set oversample(et) { + const nt = ['none', '2x', '4x'].some((rt) => rt.includes(et)) + assert(nt, "oversampling must be either 'none', '2x', or '4x'"), (this._shaper.oversample = et) + } + dispose() { + return super.dispose(), this._shaper.disconnect(), this + } + } + class Pow extends SignalOperator { + constructor() { + super(Object.assign(optionsFromArguments(Pow.getDefaults(), arguments, ['value']))), (this.name = 'Pow') + const et = optionsFromArguments(Pow.getDefaults(), arguments, ['value']) + ;(this._exponentScaler = + this.input = + this.output = + new WaveShaper({ context: this.context, mapping: this._expFunc(et.value), length: 8192 })), + (this._exponent = et.value) + } + static getDefaults() { + return Object.assign(SignalOperator.getDefaults(), { value: 1 }) + } + _expFunc(et) { + return (nt) => Math.pow(Math.abs(nt), et) + } + get value() { + return this._exponent + } + set value(et) { + ;(this._exponent = et), this._exponentScaler.setMap(this._expFunc(this._exponent)) + } + dispose() { + return super.dispose(), this._exponentScaler.dispose(), this + } + } + class TransportEvent { + constructor(et, nt) { + ;(this.id = TransportEvent._eventId++), (this._remainderTime = 0) + const rt = Object.assign(TransportEvent.getDefaults(), nt) + ;(this.transport = et), + (this.callback = rt.callback), + (this._once = rt.once), + (this.time = Math.floor(rt.time)), + (this._remainderTime = rt.time - this.time) + } + static getDefaults() { + return { callback: noOp, once: !1, time: 0 } + } + get floatTime() { + return this.time + this._remainderTime + } + invoke(et) { + if (this.callback) { + const nt = this.transport.bpm.getDurationOfTicks(1, et) + this.callback(et + this._remainderTime * nt), this._once && this.transport.clear(this.id) + } + } + dispose() { + return (this.callback = void 0), this + } + } + TransportEvent._eventId = 0 + class TransportRepeatEvent extends TransportEvent { + constructor(et, nt) { + super(et, nt), + (this._currentId = -1), + (this._nextId = -1), + (this._nextTick = this.time), + (this._boundRestart = this._restart.bind(this)) + const rt = Object.assign(TransportRepeatEvent.getDefaults(), nt) + ;(this.duration = rt.duration), + (this._interval = rt.interval), + (this._nextTick = rt.time), + this.transport.on('start', this._boundRestart), + this.transport.on('loopStart', this._boundRestart), + this.transport.on('ticks', this._boundRestart), + (this.context = this.transport.context), + this._restart() + } + static getDefaults() { + return Object.assign({}, TransportEvent.getDefaults(), { duration: 1 / 0, interval: 1, once: !1 }) + } + invoke(et) { + this._createEvents(et), super.invoke(et) + } + _createEvent() { + return LT(this._nextTick, this.floatTime + this.duration) + ? this.transport.scheduleOnce(this.invoke.bind(this), new TicksClass(this.context, this._nextTick).toSeconds()) + : -1 + } + _createEvents(et) { + LT(this._nextTick + this._interval, this.floatTime + this.duration) && + ((this._nextTick += this._interval), + (this._currentId = this._nextId), + (this._nextId = this.transport.scheduleOnce( + this.invoke.bind(this), + new TicksClass(this.context, this._nextTick).toSeconds(), + ))) + } + _restart(et) { + this.transport.clear(this._currentId), this.transport.clear(this._nextId), (this._nextTick = this.floatTime) + const nt = this.transport.getTicksAtTime(et) + GT(nt, this.time) && + (this._nextTick = this.floatTime + Math.ceil((nt - this.floatTime) / this._interval) * this._interval), + (this._currentId = this._createEvent()), + (this._nextTick += this._interval), + (this._nextId = this._createEvent()) + } + dispose() { + return ( + super.dispose(), + this.transport.clear(this._currentId), + this.transport.clear(this._nextId), + this.transport.off('start', this._boundRestart), + this.transport.off('loopStart', this._boundRestart), + this.transport.off('ticks', this._boundRestart), + this + ) + } + } + let Transport$1 = class w1 extends ToneWithContext { + constructor() { + super(optionsFromArguments(w1.getDefaults(), arguments)), + (this.name = 'Transport'), + (this._loop = new TimelineValue(!1)), + (this._loopStart = 0), + (this._loopEnd = 0), + (this._scheduledEvents = {}), + (this._timeline = new Timeline()), + (this._repeatedEvents = new IntervalTimeline()), + (this._syncedSignals = []), + (this._swingAmount = 0) + const et = optionsFromArguments(w1.getDefaults(), arguments) + ;(this._ppq = et.ppq), + (this._clock = new Clock({ + callback: this._processTick.bind(this), + context: this.context, + frequency: 0, + units: 'bpm', + })), + this._bindClockEvents(), + (this.bpm = this._clock.frequency), + (this._clock.frequency.multiplier = et.ppq), + this.bpm.setValueAtTime(et.bpm, 0), + readOnly(this, 'bpm'), + (this._timeSignature = et.timeSignature), + (this._swingTicks = et.ppq / 2) + } + static getDefaults() { + return Object.assign(ToneWithContext.getDefaults(), { + bpm: 120, + loopEnd: '4m', + loopStart: 0, + ppq: 192, + swing: 0, + swingSubdivision: '8n', + timeSignature: 4, + }) + } + _processTick(et, nt) { + if ( + (this._loop.get(et) && + nt >= this._loopEnd && + (this.emit('loopEnd', et), + this._clock.setTicksAtTime(this._loopStart, et), + (nt = this._loopStart), + this.emit('loopStart', et, this._clock.getSecondsAtTime(et)), + this.emit('loop', et)), + this._swingAmount > 0 && nt % this._ppq !== 0 && nt % (this._swingTicks * 2) !== 0) + ) { + const rt = (nt % (this._swingTicks * 2)) / (this._swingTicks * 2), + it = Math.sin(rt * Math.PI) * this._swingAmount + et += new TicksClass(this.context, (this._swingTicks * 2) / 3).toSeconds() * it + } + enterScheduledCallback(!0), this._timeline.forEachAtTime(nt, (rt) => rt.invoke(et)), enterScheduledCallback(!1) + } + schedule(et, nt) { + const rt = new TransportEvent(this, { callback: et, time: new TransportTimeClass(this.context, nt).toTicks() }) + return this._addEvent(rt, this._timeline) + } + scheduleRepeat(et, nt, rt, it = 1 / 0) { + const ot = new TransportRepeatEvent(this, { + callback: et, + duration: new TimeClass(this.context, it).toTicks(), + interval: new TimeClass(this.context, nt).toTicks(), + time: new TransportTimeClass(this.context, rt).toTicks(), + }) + return this._addEvent(ot, this._repeatedEvents) + } + scheduleOnce(et, nt) { + const rt = new TransportEvent(this, { + callback: et, + once: !0, + time: new TransportTimeClass(this.context, nt).toTicks(), + }) + return this._addEvent(rt, this._timeline) + } + clear(et) { + if (this._scheduledEvents.hasOwnProperty(et)) { + const nt = this._scheduledEvents[et.toString()] + nt.timeline.remove(nt.event), nt.event.dispose(), delete this._scheduledEvents[et.toString()] + } + return this + } + _addEvent(et, nt) { + return (this._scheduledEvents[et.id.toString()] = { event: et, timeline: nt }), nt.add(et), et.id + } + cancel(et = 0) { + const nt = this.toTicks(et) + return ( + this._timeline.forEachFrom(nt, (rt) => this.clear(rt.id)), + this._repeatedEvents.forEachFrom(nt, (rt) => this.clear(rt.id)), + this + ) + } + _bindClockEvents() { + this._clock.on('start', (et, nt) => { + ;(nt = new TicksClass(this.context, nt).toSeconds()), this.emit('start', et, nt) + }), + this._clock.on('stop', (et) => { + this.emit('stop', et) + }), + this._clock.on('pause', (et) => { + this.emit('pause', et) + }) + } + get state() { + return this._clock.getStateAtTime(this.now()) + } + start(et, nt) { + this.context.resume() + let rt + return isDefined(nt) && (rt = this.toTicks(nt)), this._clock.start(et, rt), this + } + stop(et) { + return this._clock.stop(et), this + } + pause(et) { + return this._clock.pause(et), this + } + toggle(et) { + return ( + (et = this.toSeconds(et)), this._clock.getStateAtTime(et) !== 'started' ? this.start(et) : this.stop(et), this + ) + } + get timeSignature() { + return this._timeSignature + } + set timeSignature(et) { + isArray$e(et) && (et = (et[0] / et[1]) * 4), (this._timeSignature = et) + } + get loopStart() { + return new TimeClass(this.context, this._loopStart, 'i').toSeconds() + } + set loopStart(et) { + this._loopStart = this.toTicks(et) + } + get loopEnd() { + return new TimeClass(this.context, this._loopEnd, 'i').toSeconds() + } + set loopEnd(et) { + this._loopEnd = this.toTicks(et) + } + get loop() { + return this._loop.get(this.now()) + } + set loop(et) { + this._loop.set(et, this.now()) + } + setLoopPoints(et, nt) { + return (this.loopStart = et), (this.loopEnd = nt), this + } + get swing() { + return this._swingAmount + } + set swing(et) { + this._swingAmount = et + } + get swingSubdivision() { + return new TicksClass(this.context, this._swingTicks).toNotation() + } + set swingSubdivision(et) { + this._swingTicks = this.toTicks(et) + } + get position() { + const et = this.now(), + nt = this._clock.getTicksAtTime(et) + return new TicksClass(this.context, nt).toBarsBeatsSixteenths() + } + set position(et) { + const nt = this.toTicks(et) + this.ticks = nt + } + get seconds() { + return this._clock.seconds + } + set seconds(et) { + const nt = this.now(), + rt = this._clock.frequency.timeToTicks(et, nt) + this.ticks = rt + } + get progress() { + if (this.loop) { + const et = this.now() + return (this._clock.getTicksAtTime(et) - this._loopStart) / (this._loopEnd - this._loopStart) + } else return 0 + } + get ticks() { + return this._clock.ticks + } + set ticks(et) { + if (this._clock.ticks !== et) { + const nt = this.now() + if (this.state === 'started') { + const rt = this._clock.getTicksAtTime(nt), + it = this._clock.frequency.getDurationOfTicks(Math.ceil(rt) - rt, nt), + ot = nt + it + this.emit('stop', ot), + this._clock.setTicksAtTime(et, ot), + this.emit('start', ot, this._clock.getSecondsAtTime(ot)) + } else this.emit('ticks', nt), this._clock.setTicksAtTime(et, nt) + } + } + getTicksAtTime(et) { + return this._clock.getTicksAtTime(et) + } + getSecondsAtTime(et) { + return this._clock.getSecondsAtTime(et) + } + get PPQ() { + return this._clock.frequency.multiplier + } + set PPQ(et) { + this._clock.frequency.multiplier = et + } + nextSubdivision(et) { + if (((et = this.toTicks(et)), this.state !== 'started')) return 0 + { + const nt = this.now(), + rt = this.getTicksAtTime(nt), + it = et - (rt % et) + return this._clock.nextTickTime(it, nt) + } + } + syncSignal(et, nt) { + const rt = this.now() + let it = this.bpm, + ot = 1 / (60 / it.getValueAtTime(rt) / this.PPQ), + at = [] + if (et.units === 'time') { + const lt = 0.015625 / ot, + ct = new Gain(lt), + ut = new Pow(-1), + ht = new Gain(lt) + it.chain(ct, ut, ht), (it = ht), (ot = 1 / ot), (at = [ct, ut, ht]) + } + nt || (et.getValueAtTime(rt) !== 0 ? (nt = et.getValueAtTime(rt) / ot) : (nt = 0)) + const st = new Gain(nt) + return ( + it.connect(st), + st.connect(et._param), + at.push(st), + this._syncedSignals.push({ initial: et.value, nodes: at, signal: et }), + (et.value = 0), + this + ) + } + unsyncSignal(et) { + for (let nt = this._syncedSignals.length - 1; nt >= 0; nt--) { + const rt = this._syncedSignals[nt] + rt.signal === et && + (rt.nodes.forEach((it) => it.dispose()), (rt.signal.value = rt.initial), this._syncedSignals.splice(nt, 1)) + } + return this + } + dispose() { + return ( + super.dispose(), + this._clock.dispose(), + writable(this, 'bpm'), + this._timeline.dispose(), + this._repeatedEvents.dispose(), + this + ) + } + } + Emitter$1.mixin(Transport$1) + onContextInit((tt) => { + tt.transport = new Transport$1({ context: tt }) + }) + onContextClose((tt) => { + tt.transport.dispose() + }) + class Source extends ToneAudioNode { + constructor(et) { + super(et), + (this.input = void 0), + (this._state = new StateTimeline('stopped')), + (this._synced = !1), + (this._scheduled = []), + (this._syncedStart = noOp), + (this._syncedStop = noOp), + (this._state.memory = 100), + (this._state.increasing = !0), + (this._volume = this.output = new Volume({ context: this.context, mute: et.mute, volume: et.volume })), + (this.volume = this._volume.volume), + readOnly(this, 'volume'), + (this.onstop = et.onstop) + } + static getDefaults() { + return Object.assign(ToneAudioNode.getDefaults(), { mute: !1, onstop: noOp, volume: 0 }) + } + get state() { + return this._synced + ? this.context.transport.state === 'started' + ? this._state.getValueAtTime(this.context.transport.seconds) + : 'stopped' + : this._state.getValueAtTime(this.now()) + } + get mute() { + return this._volume.mute + } + set mute(et) { + this._volume.mute = et + } + _clampToCurrentTime(et) { + return this._synced ? et : Math.max(et, this.context.currentTime) + } + start(et, nt, rt) { + let it = isUndef(et) && this._synced ? this.context.transport.seconds : this.toSeconds(et) + if (((it = this._clampToCurrentTime(it)), !this._synced && this._state.getValueAtTime(it) === 'started')) + assert(GT(it, this._state.get(it).time), 'Start time must be strictly greater than previous start time'), + this._state.cancel(it), + this._state.setStateAtTime('started', it), + this.log('restart', it), + this.restart(it, nt, rt) + else if ((this.log('start', it), this._state.setStateAtTime('started', it), this._synced)) { + const ot = this._state.get(it) + ot && ((ot.offset = this.toSeconds(defaultArg(nt, 0))), (ot.duration = rt ? this.toSeconds(rt) : void 0)) + const at = this.context.transport.schedule((st) => { + this._start(st, nt, rt) + }, it) + this._scheduled.push(at), + this.context.transport.state === 'started' && + this.context.transport.getSecondsAtTime(this.immediate()) > it && + this._syncedStart(this.now(), this.context.transport.seconds) + } else assertContextRunning(this.context), this._start(it, nt, rt) + return this + } + stop(et) { + let nt = isUndef(et) && this._synced ? this.context.transport.seconds : this.toSeconds(et) + if ( + ((nt = this._clampToCurrentTime(nt)), + this._state.getValueAtTime(nt) === 'started' || isDefined(this._state.getNextState('started', nt))) + ) { + if ((this.log('stop', nt), !this._synced)) this._stop(nt) + else { + const rt = this.context.transport.schedule(this._stop.bind(this), nt) + this._scheduled.push(rt) + } + this._state.cancel(nt), this._state.setStateAtTime('stopped', nt) + } + return this + } + restart(et, nt, rt) { + return ( + (et = this.toSeconds(et)), + this._state.getValueAtTime(et) === 'started' && (this._state.cancel(et), this._restart(et, nt, rt)), + this + ) + } + sync() { + return ( + this._synced || + ((this._synced = !0), + (this._syncedStart = (et, nt) => { + if (GT(nt, 0)) { + const rt = this._state.get(nt) + if (rt && rt.state === 'started' && rt.time !== nt) { + const it = nt - this.toSeconds(rt.time) + let ot + rt.duration && (ot = this.toSeconds(rt.duration) - it), + this._start(et, this.toSeconds(rt.offset) + it, ot) + } + } + }), + (this._syncedStop = (et) => { + const nt = this.context.transport.getSecondsAtTime(Math.max(et - this.sampleTime, 0)) + this._state.getValueAtTime(nt) === 'started' && this._stop(et) + }), + this.context.transport.on('start', this._syncedStart), + this.context.transport.on('loopStart', this._syncedStart), + this.context.transport.on('stop', this._syncedStop), + this.context.transport.on('pause', this._syncedStop), + this.context.transport.on('loopEnd', this._syncedStop)), + this + ) + } + unsync() { + return ( + this._synced && + (this.context.transport.off('stop', this._syncedStop), + this.context.transport.off('pause', this._syncedStop), + this.context.transport.off('loopEnd', this._syncedStop), + this.context.transport.off('start', this._syncedStart), + this.context.transport.off('loopStart', this._syncedStart)), + (this._synced = !1), + this._scheduled.forEach((et) => this.context.transport.clear(et)), + (this._scheduled = []), + this._state.cancel(0), + this._stop(0), + this + ) + } + dispose() { + return super.dispose(), (this.onstop = noOp), this.unsync(), this._volume.dispose(), this._state.dispose(), this + } + } + class ToneBufferSource extends OneShotSource { + constructor() { + super(optionsFromArguments(ToneBufferSource.getDefaults(), arguments, ['url', 'onload'])), + (this.name = 'ToneBufferSource'), + (this._source = this.context.createBufferSource()), + (this._internalChannels = [this._source]), + (this._sourceStarted = !1), + (this._sourceStopped = !1) + const et = optionsFromArguments(ToneBufferSource.getDefaults(), arguments, ['url', 'onload']) + connect(this._source, this._gainNode), + (this._source.onended = () => this._stopSource()), + (this.playbackRate = new Param({ + context: this.context, + param: this._source.playbackRate, + units: 'positive', + value: et.playbackRate, + })), + (this.loop = et.loop), + (this.loopStart = et.loopStart), + (this.loopEnd = et.loopEnd), + (this._buffer = new ToneAudioBuffer(et.url, et.onload, et.onerror)), + this._internalChannels.push(this._source) + } + static getDefaults() { + return Object.assign(OneShotSource.getDefaults(), { + url: new ToneAudioBuffer(), + loop: !1, + loopEnd: 0, + loopStart: 0, + onload: noOp, + onerror: noOp, + playbackRate: 1, + }) + } + get fadeIn() { + return this._fadeIn + } + set fadeIn(et) { + this._fadeIn = et + } + get fadeOut() { + return this._fadeOut + } + set fadeOut(et) { + this._fadeOut = et + } + get curve() { + return this._curve + } + set curve(et) { + this._curve = et + } + start(et, nt, rt, it = 1) { + assert(this.buffer.loaded, 'buffer is either not set or not loaded') + const ot = this.toSeconds(et) + this._startGain(ot, it), this.loop ? (nt = defaultArg(nt, this.loopStart)) : (nt = defaultArg(nt, 0)) + let at = Math.max(this.toSeconds(nt), 0) + if (this.loop) { + const st = this.toSeconds(this.loopEnd) || this.buffer.duration, + lt = this.toSeconds(this.loopStart), + ct = st - lt + GTE(at, st) && (at = ((at - lt) % ct) + lt), EQ(at, this.buffer.duration) && (at = 0) + } + if ( + ((this._source.buffer = this.buffer.get()), + (this._source.loopEnd = this.toSeconds(this.loopEnd) || this.buffer.duration), + LT(at, this.buffer.duration) && ((this._sourceStarted = !0), this._source.start(ot, at)), + isDefined(rt)) + ) { + let st = this.toSeconds(rt) + ;(st = Math.max(st, 0)), this.stop(ot + st) + } + return this + } + _stopSource(et) { + !this._sourceStopped && + this._sourceStarted && + ((this._sourceStopped = !0), this._source.stop(this.toSeconds(et)), this._onended()) + } + get loopStart() { + return this._source.loopStart + } + set loopStart(et) { + this._source.loopStart = this.toSeconds(et) + } + get loopEnd() { + return this._source.loopEnd + } + set loopEnd(et) { + this._source.loopEnd = this.toSeconds(et) + } + get buffer() { + return this._buffer + } + set buffer(et) { + this._buffer.set(et) + } + get loop() { + return this._source.loop + } + set loop(et) { + ;(this._source.loop = et), this._sourceStarted && this.cancelStop() + } + dispose() { + return ( + super.dispose(), + (this._source.onended = null), + this._source.disconnect(), + this._buffer.dispose(), + this.playbackRate.dispose(), + this + ) + } + } + class Noise extends Source { + constructor() { + super(optionsFromArguments(Noise.getDefaults(), arguments, ['type'])), + (this.name = 'Noise'), + (this._source = null) + const et = optionsFromArguments(Noise.getDefaults(), arguments, ['type']) + ;(this._playbackRate = et.playbackRate), + (this.type = et.type), + (this._fadeIn = et.fadeIn), + (this._fadeOut = et.fadeOut) + } + static getDefaults() { + return Object.assign(Source.getDefaults(), { fadeIn: 0, fadeOut: 0, playbackRate: 1, type: 'white' }) + } + get type() { + return this._type + } + set type(et) { + if ( + (assert(et in _noiseBuffers, 'Noise: invalid type: ' + et), + this._type !== et && ((this._type = et), this.state === 'started')) + ) { + const nt = this.now() + this._stop(nt), this._start(nt) + } + } + get playbackRate() { + return this._playbackRate + } + set playbackRate(et) { + ;(this._playbackRate = et), this._source && (this._source.playbackRate.value = et) + } + _start(et) { + const nt = _noiseBuffers[this._type] + ;(this._source = new ToneBufferSource({ + url: nt, + context: this.context, + fadeIn: this._fadeIn, + fadeOut: this._fadeOut, + loop: !0, + onended: () => this.onstop(this), + playbackRate: this._playbackRate, + }).connect(this.output)), + this._source.start(this.toSeconds(et), Math.random() * (nt.duration - 0.001)) + } + _stop(et) { + this._source && (this._source.stop(this.toSeconds(et)), (this._source = null)) + } + get fadeIn() { + return this._fadeIn + } + set fadeIn(et) { + ;(this._fadeIn = et), this._source && (this._source.fadeIn = this._fadeIn) + } + get fadeOut() { + return this._fadeOut + } + set fadeOut(et) { + ;(this._fadeOut = et), this._source && (this._source.fadeOut = this._fadeOut) + } + _restart(et) { + this._stop(et), this._start(et) + } + dispose() { + return super.dispose(), this._source && this._source.disconnect(), this + } + } + const BUFFER_LENGTH = 44100 * 5, + NUM_CHANNELS = 2, + _noiseCache = { brown: null, pink: null, white: null }, + _noiseBuffers = { + get brown() { + if (!_noiseCache.brown) { + const tt = [] + for (let et = 0; et < NUM_CHANNELS; et++) { + const nt = new Float32Array(BUFFER_LENGTH) + tt[et] = nt + let rt = 0 + for (let it = 0; it < BUFFER_LENGTH; it++) { + const ot = Math.random() * 2 - 1 + ;(nt[it] = (rt + 0.02 * ot) / 1.02), (rt = nt[it]), (nt[it] *= 3.5) + } + } + _noiseCache.brown = new ToneAudioBuffer().fromArray(tt) + } + return _noiseCache.brown + }, + get pink() { + if (!_noiseCache.pink) { + const tt = [] + for (let et = 0; et < NUM_CHANNELS; et++) { + const nt = new Float32Array(BUFFER_LENGTH) + tt[et] = nt + let rt, it, ot, at, st, lt, ct + rt = it = ot = at = st = lt = ct = 0 + for (let ut = 0; ut < BUFFER_LENGTH; ut++) { + const ht = Math.random() * 2 - 1 + ;(rt = 0.99886 * rt + ht * 0.0555179), + (it = 0.99332 * it + ht * 0.0750759), + (ot = 0.969 * ot + ht * 0.153852), + (at = 0.8665 * at + ht * 0.3104856), + (st = 0.55 * st + ht * 0.5329522), + (lt = -0.7616 * lt - ht * 0.016898), + (nt[ut] = rt + it + ot + at + st + lt + ct + ht * 0.5362), + (nt[ut] *= 0.11), + (ct = ht * 0.115926) + } + } + _noiseCache.pink = new ToneAudioBuffer().fromArray(tt) + } + return _noiseCache.pink + }, + get white() { + if (!_noiseCache.white) { + const tt = [] + for (let et = 0; et < NUM_CHANNELS; et++) { + const nt = new Float32Array(BUFFER_LENGTH) + tt[et] = nt + for (let rt = 0; rt < BUFFER_LENGTH; rt++) nt[rt] = Math.random() * 2 - 1 + } + _noiseCache.white = new ToneAudioBuffer().fromArray(tt) + } + return _noiseCache.white + }, + } + function generateWaveform(tt, et) { + return __awaiter(this, void 0, void 0, function* () { + const nt = et / tt.context.sampleRate, + rt = new OfflineContext(1, nt, tt.context.sampleRate) + return ( + new tt.constructor(Object.assign(tt.get(), { frequency: 2 / nt, detune: 0, context: rt })) + .toDestination() + .start(0), + (yield rt.render()).getChannelData(0) + ) + }) + } + class ToneOscillatorNode extends OneShotSource { + constructor() { + super(optionsFromArguments(ToneOscillatorNode.getDefaults(), arguments, ['frequency', 'type'])), + (this.name = 'ToneOscillatorNode'), + (this._oscillator = this.context.createOscillator()), + (this._internalChannels = [this._oscillator]) + const et = optionsFromArguments(ToneOscillatorNode.getDefaults(), arguments, ['frequency', 'type']) + connect(this._oscillator, this._gainNode), + (this.type = et.type), + (this.frequency = new Param({ + context: this.context, + param: this._oscillator.frequency, + units: 'frequency', + value: et.frequency, + })), + (this.detune = new Param({ + context: this.context, + param: this._oscillator.detune, + units: 'cents', + value: et.detune, + })), + readOnly(this, ['frequency', 'detune']) + } + static getDefaults() { + return Object.assign(OneShotSource.getDefaults(), { detune: 0, frequency: 440, type: 'sine' }) + } + start(et) { + const nt = this.toSeconds(et) + return this.log('start', nt), this._startGain(nt), this._oscillator.start(nt), this + } + _stopSource(et) { + this._oscillator.stop(et) + } + setPeriodicWave(et) { + return this._oscillator.setPeriodicWave(et), this + } + get type() { + return this._oscillator.type + } + set type(et) { + this._oscillator.type = et + } + dispose() { + return ( + super.dispose(), + this.state === 'started' && this.stop(), + this._oscillator.disconnect(), + this.frequency.dispose(), + this.detune.dispose(), + this + ) + } + } + class Oscillator extends Source { + constructor() { + super(optionsFromArguments(Oscillator.getDefaults(), arguments, ['frequency', 'type'])), + (this.name = 'Oscillator'), + (this._oscillator = null) + const et = optionsFromArguments(Oscillator.getDefaults(), arguments, ['frequency', 'type']) + ;(this.frequency = new Signal({ context: this.context, units: 'frequency', value: et.frequency })), + readOnly(this, 'frequency'), + (this.detune = new Signal({ context: this.context, units: 'cents', value: et.detune })), + readOnly(this, 'detune'), + (this._partials = et.partials), + (this._partialCount = et.partialCount), + (this._type = et.type), + et.partialCount && et.type !== 'custom' && (this._type = this.baseType + et.partialCount.toString()), + (this.phase = et.phase) + } + static getDefaults() { + return Object.assign(Source.getDefaults(), { + detune: 0, + frequency: 440, + partialCount: 0, + partials: [], + phase: 0, + type: 'sine', + }) + } + _start(et) { + const nt = this.toSeconds(et), + rt = new ToneOscillatorNode({ context: this.context, onended: () => this.onstop(this) }) + ;(this._oscillator = rt), + this._wave ? this._oscillator.setPeriodicWave(this._wave) : (this._oscillator.type = this._type), + this._oscillator.connect(this.output), + this.frequency.connect(this._oscillator.frequency), + this.detune.connect(this._oscillator.detune), + this._oscillator.start(nt) + } + _stop(et) { + const nt = this.toSeconds(et) + this._oscillator && this._oscillator.stop(nt) + } + _restart(et) { + const nt = this.toSeconds(et) + return this.log('restart', nt), this._oscillator && this._oscillator.cancelStop(), this._state.cancel(nt), this + } + syncFrequency() { + return this.context.transport.syncSignal(this.frequency), this + } + unsyncFrequency() { + return this.context.transport.unsyncSignal(this.frequency), this + } + _getCachedPeriodicWave() { + if (this._type === 'custom') + return Oscillator._periodicWaveCache.find( + (nt) => nt.phase === this._phase && deepEquals(nt.partials, this._partials), + ) + { + const et = Oscillator._periodicWaveCache.find((nt) => nt.type === this._type && nt.phase === this._phase) + return (this._partialCount = et ? et.partialCount : this._partialCount), et + } + } + get type() { + return this._type + } + set type(et) { + this._type = et + const nt = ['sine', 'square', 'sawtooth', 'triangle'].indexOf(et) !== -1 + if (this._phase === 0 && nt) + (this._wave = void 0), (this._partialCount = 0), this._oscillator !== null && (this._oscillator.type = et) + else { + const rt = this._getCachedPeriodicWave() + if (isDefined(rt)) { + const { partials: it, wave: ot } = rt + ;(this._wave = ot), + (this._partials = it), + this._oscillator !== null && this._oscillator.setPeriodicWave(this._wave) + } else { + const [it, ot] = this._getRealImaginary(et, this._phase), + at = this.context.createPeriodicWave(it, ot) + ;(this._wave = at), + this._oscillator !== null && this._oscillator.setPeriodicWave(this._wave), + Oscillator._periodicWaveCache.push({ + imag: ot, + partialCount: this._partialCount, + partials: this._partials, + phase: this._phase, + real: it, + type: this._type, + wave: this._wave, + }), + Oscillator._periodicWaveCache.length > 100 && Oscillator._periodicWaveCache.shift() + } + } + } + get baseType() { + return this._type.replace(this.partialCount.toString(), '') + } + set baseType(et) { + this.partialCount && this._type !== 'custom' && et !== 'custom' + ? (this.type = et + this.partialCount) + : (this.type = et) + } + get partialCount() { + return this._partialCount + } + set partialCount(et) { + assertRange(et, 0) + let nt = this._type + const rt = /^(sine|triangle|square|sawtooth)(\d+)$/.exec(this._type) + if ((rt && (nt = rt[1]), this._type !== 'custom')) et === 0 ? (this.type = nt) : (this.type = nt + et.toString()) + else { + const it = new Float32Array(et) + this._partials.forEach((ot, at) => (it[at] = ot)), (this._partials = Array.from(it)), (this.type = this._type) + } + } + _getRealImaginary(et, nt) { + let it = 2048 + const ot = new Float32Array(it), + at = new Float32Array(it) + let st = 1 + if (et === 'custom') { + if ( + ((st = this._partials.length + 1), + (this._partialCount = this._partials.length), + (it = st), + this._partials.length === 0) + ) + return [ot, at] + } else { + const lt = /^(sine|triangle|square|sawtooth)(\d+)$/.exec(et) + lt + ? ((st = parseInt(lt[2], 10) + 1), + (this._partialCount = parseInt(lt[2], 10)), + (et = lt[1]), + (st = Math.max(st, 2)), + (it = st)) + : (this._partialCount = 0), + (this._partials = []) + } + for (let lt = 1; lt < it; ++lt) { + const ct = 2 / (lt * Math.PI) + let ut + switch (et) { + case 'sine': + ;(ut = lt <= st ? 1 : 0), (this._partials[lt - 1] = ut) + break + case 'square': + ;(ut = lt & 1 ? 2 * ct : 0), (this._partials[lt - 1] = ut) + break + case 'sawtooth': + ;(ut = ct * (lt & 1 ? 1 : -1)), (this._partials[lt - 1] = ut) + break + case 'triangle': + lt & 1 ? (ut = 2 * (ct * ct) * (((lt - 1) >> 1) & 1 ? -1 : 1)) : (ut = 0), (this._partials[lt - 1] = ut) + break + case 'custom': + ut = this._partials[lt - 1] + break + default: + throw new TypeError('Oscillator: invalid type: ' + et) + } + ut !== 0 + ? ((ot[lt] = -ut * Math.sin(nt * lt)), (at[lt] = ut * Math.cos(nt * lt))) + : ((ot[lt] = 0), (at[lt] = 0)) + } + return [ot, at] + } + _inverseFFT(et, nt, rt) { + let it = 0 + const ot = et.length + for (let at = 0; at < ot; at++) it += et[at] * Math.cos(at * rt) + nt[at] * Math.sin(at * rt) + return it + } + getInitialValue() { + const [et, nt] = this._getRealImaginary(this._type, 0) + let rt = 0 + const it = Math.PI * 2, + ot = 32 + for (let at = 0; at < ot; at++) rt = Math.max(this._inverseFFT(et, nt, (at / ot) * it), rt) + return clamp$1(-this._inverseFFT(et, nt, this._phase) / rt, -1, 1) + } + get partials() { + return this._partials.slice(0, this.partialCount) + } + set partials(et) { + ;(this._partials = et), (this._partialCount = this._partials.length), et.length && (this.type = 'custom') + } + get phase() { + return this._phase * (180 / Math.PI) + } + set phase(et) { + ;(this._phase = (et * Math.PI) / 180), (this.type = this._type) + } + asArray(et = 1024) { + return __awaiter(this, void 0, void 0, function* () { + return generateWaveform(this, et) + }) + } + dispose() { + return ( + super.dispose(), + this._oscillator !== null && this._oscillator.dispose(), + (this._wave = void 0), + this.frequency.dispose(), + this.detune.dispose(), + this + ) + } + } + Oscillator._periodicWaveCache = [] + class AudioToGain extends SignalOperator { + constructor() { + super(...arguments), + (this.name = 'AudioToGain'), + (this._norm = new WaveShaper({ context: this.context, mapping: (et) => (et + 1) / 2 })), + (this.input = this._norm), + (this.output = this._norm) + } + dispose() { + return super.dispose(), this._norm.dispose(), this + } + } + class Multiply extends Signal { + constructor() { + super(Object.assign(optionsFromArguments(Multiply.getDefaults(), arguments, ['value']))), + (this.name = 'Multiply'), + (this.override = !1) + const et = optionsFromArguments(Multiply.getDefaults(), arguments, ['value']) + ;(this._mult = + this.input = + this.output = + new Gain({ context: this.context, minValue: et.minValue, maxValue: et.maxValue })), + (this.factor = this._param = this._mult.gain), + this.factor.setValueAtTime(et.value, 0) + } + static getDefaults() { + return Object.assign(Signal.getDefaults(), { value: 0 }) + } + dispose() { + return super.dispose(), this._mult.dispose(), this + } + } + class AMOscillator extends Source { + constructor() { + super(optionsFromArguments(AMOscillator.getDefaults(), arguments, ['frequency', 'type', 'modulationType'])), + (this.name = 'AMOscillator'), + (this._modulationScale = new AudioToGain({ context: this.context })), + (this._modulationNode = new Gain({ context: this.context })) + const et = optionsFromArguments(AMOscillator.getDefaults(), arguments, ['frequency', 'type', 'modulationType']) + ;(this._carrier = new Oscillator({ + context: this.context, + detune: et.detune, + frequency: et.frequency, + onstop: () => this.onstop(this), + phase: et.phase, + type: et.type, + })), + (this.frequency = this._carrier.frequency), + (this.detune = this._carrier.detune), + (this._modulator = new Oscillator({ context: this.context, phase: et.phase, type: et.modulationType })), + (this.harmonicity = new Multiply({ context: this.context, units: 'positive', value: et.harmonicity })), + this.frequency.chain(this.harmonicity, this._modulator.frequency), + this._modulator.chain(this._modulationScale, this._modulationNode.gain), + this._carrier.chain(this._modulationNode, this.output), + readOnly(this, ['frequency', 'detune', 'harmonicity']) + } + static getDefaults() { + return Object.assign(Oscillator.getDefaults(), { harmonicity: 1, modulationType: 'square' }) + } + _start(et) { + this._modulator.start(et), this._carrier.start(et) + } + _stop(et) { + this._modulator.stop(et), this._carrier.stop(et) + } + _restart(et) { + this._modulator.restart(et), this._carrier.restart(et) + } + get type() { + return this._carrier.type + } + set type(et) { + this._carrier.type = et + } + get baseType() { + return this._carrier.baseType + } + set baseType(et) { + this._carrier.baseType = et + } + get partialCount() { + return this._carrier.partialCount + } + set partialCount(et) { + this._carrier.partialCount = et + } + get modulationType() { + return this._modulator.type + } + set modulationType(et) { + this._modulator.type = et + } + get phase() { + return this._carrier.phase + } + set phase(et) { + ;(this._carrier.phase = et), (this._modulator.phase = et) + } + get partials() { + return this._carrier.partials + } + set partials(et) { + this._carrier.partials = et + } + asArray(et = 1024) { + return __awaiter(this, void 0, void 0, function* () { + return generateWaveform(this, et) + }) + } + dispose() { + return ( + super.dispose(), + this.frequency.dispose(), + this.detune.dispose(), + this.harmonicity.dispose(), + this._carrier.dispose(), + this._modulator.dispose(), + this._modulationNode.dispose(), + this._modulationScale.dispose(), + this + ) + } + } + class FMOscillator extends Source { + constructor() { + super(optionsFromArguments(FMOscillator.getDefaults(), arguments, ['frequency', 'type', 'modulationType'])), + (this.name = 'FMOscillator'), + (this._modulationNode = new Gain({ context: this.context, gain: 0 })) + const et = optionsFromArguments(FMOscillator.getDefaults(), arguments, ['frequency', 'type', 'modulationType']) + ;(this._carrier = new Oscillator({ + context: this.context, + detune: et.detune, + frequency: 0, + onstop: () => this.onstop(this), + phase: et.phase, + type: et.type, + })), + (this.detune = this._carrier.detune), + (this.frequency = new Signal({ context: this.context, units: 'frequency', value: et.frequency })), + (this._modulator = new Oscillator({ context: this.context, phase: et.phase, type: et.modulationType })), + (this.harmonicity = new Multiply({ context: this.context, units: 'positive', value: et.harmonicity })), + (this.modulationIndex = new Multiply({ context: this.context, units: 'positive', value: et.modulationIndex })), + this.frequency.connect(this._carrier.frequency), + this.frequency.chain(this.harmonicity, this._modulator.frequency), + this.frequency.chain(this.modulationIndex, this._modulationNode), + this._modulator.connect(this._modulationNode.gain), + this._modulationNode.connect(this._carrier.frequency), + this._carrier.connect(this.output), + this.detune.connect(this._modulator.detune), + readOnly(this, ['modulationIndex', 'frequency', 'detune', 'harmonicity']) + } + static getDefaults() { + return Object.assign(Oscillator.getDefaults(), { harmonicity: 1, modulationIndex: 2, modulationType: 'square' }) + } + _start(et) { + this._modulator.start(et), this._carrier.start(et) + } + _stop(et) { + this._modulator.stop(et), this._carrier.stop(et) + } + _restart(et) { + return this._modulator.restart(et), this._carrier.restart(et), this + } + get type() { + return this._carrier.type + } + set type(et) { + this._carrier.type = et + } + get baseType() { + return this._carrier.baseType + } + set baseType(et) { + this._carrier.baseType = et + } + get partialCount() { + return this._carrier.partialCount + } + set partialCount(et) { + this._carrier.partialCount = et + } + get modulationType() { + return this._modulator.type + } + set modulationType(et) { + this._modulator.type = et + } + get phase() { + return this._carrier.phase + } + set phase(et) { + ;(this._carrier.phase = et), (this._modulator.phase = et) + } + get partials() { + return this._carrier.partials + } + set partials(et) { + this._carrier.partials = et + } + asArray(et = 1024) { + return __awaiter(this, void 0, void 0, function* () { + return generateWaveform(this, et) + }) + } + dispose() { + return ( + super.dispose(), + this.frequency.dispose(), + this.harmonicity.dispose(), + this._carrier.dispose(), + this._modulator.dispose(), + this._modulationNode.dispose(), + this.modulationIndex.dispose(), + this + ) + } + } + class PulseOscillator extends Source { + constructor() { + super(optionsFromArguments(PulseOscillator.getDefaults(), arguments, ['frequency', 'width'])), + (this.name = 'PulseOscillator'), + (this._widthGate = new Gain({ context: this.context, gain: 0 })), + (this._thresh = new WaveShaper({ context: this.context, mapping: (nt) => (nt <= 0 ? -1 : 1) })) + const et = optionsFromArguments(PulseOscillator.getDefaults(), arguments, ['frequency', 'width']) + ;(this.width = new Signal({ context: this.context, units: 'audioRange', value: et.width })), + (this._triangle = new Oscillator({ + context: this.context, + detune: et.detune, + frequency: et.frequency, + onstop: () => this.onstop(this), + phase: et.phase, + type: 'triangle', + })), + (this.frequency = this._triangle.frequency), + (this.detune = this._triangle.detune), + this._triangle.chain(this._thresh, this.output), + this.width.chain(this._widthGate, this._thresh), + readOnly(this, ['width', 'frequency', 'detune']) + } + static getDefaults() { + return Object.assign(Source.getDefaults(), { detune: 0, frequency: 440, phase: 0, type: 'pulse', width: 0.2 }) + } + _start(et) { + ;(et = this.toSeconds(et)), this._triangle.start(et), this._widthGate.gain.setValueAtTime(1, et) + } + _stop(et) { + ;(et = this.toSeconds(et)), + this._triangle.stop(et), + this._widthGate.gain.cancelScheduledValues(et), + this._widthGate.gain.setValueAtTime(0, et) + } + _restart(et) { + this._triangle.restart(et), + this._widthGate.gain.cancelScheduledValues(et), + this._widthGate.gain.setValueAtTime(1, et) + } + get phase() { + return this._triangle.phase + } + set phase(et) { + this._triangle.phase = et + } + get type() { + return 'pulse' + } + get baseType() { + return 'pulse' + } + get partials() { + return [] + } + get partialCount() { + return 0 + } + set carrierType(et) { + this._triangle.type = et + } + asArray(et = 1024) { + return __awaiter(this, void 0, void 0, function* () { + return generateWaveform(this, et) + }) + } + dispose() { + return ( + super.dispose(), + this._triangle.dispose(), + this.width.dispose(), + this._widthGate.dispose(), + this._thresh.dispose(), + this + ) + } + } + class FatOscillator extends Source { + constructor() { + super(optionsFromArguments(FatOscillator.getDefaults(), arguments, ['frequency', 'type', 'spread'])), + (this.name = 'FatOscillator'), + (this._oscillators = []) + const et = optionsFromArguments(FatOscillator.getDefaults(), arguments, ['frequency', 'type', 'spread']) + ;(this.frequency = new Signal({ context: this.context, units: 'frequency', value: et.frequency })), + (this.detune = new Signal({ context: this.context, units: 'cents', value: et.detune })), + (this._spread = et.spread), + (this._type = et.type), + (this._phase = et.phase), + (this._partials = et.partials), + (this._partialCount = et.partialCount), + (this.count = et.count), + readOnly(this, ['frequency', 'detune']) + } + static getDefaults() { + return Object.assign(Oscillator.getDefaults(), { count: 3, spread: 20, type: 'sawtooth' }) + } + _start(et) { + ;(et = this.toSeconds(et)), this._forEach((nt) => nt.start(et)) + } + _stop(et) { + ;(et = this.toSeconds(et)), this._forEach((nt) => nt.stop(et)) + } + _restart(et) { + this._forEach((nt) => nt.restart(et)) + } + _forEach(et) { + for (let nt = 0; nt < this._oscillators.length; nt++) et(this._oscillators[nt], nt) + } + get type() { + return this._type + } + set type(et) { + ;(this._type = et), this._forEach((nt) => (nt.type = et)) + } + get spread() { + return this._spread + } + set spread(et) { + if (((this._spread = et), this._oscillators.length > 1)) { + const nt = -et / 2, + rt = et / (this._oscillators.length - 1) + this._forEach((it, ot) => (it.detune.value = nt + rt * ot)) + } + } + get count() { + return this._oscillators.length + } + set count(et) { + if ((assertRange(et, 1), this._oscillators.length !== et)) { + this._forEach((nt) => nt.dispose()), (this._oscillators = []) + for (let nt = 0; nt < et; nt++) { + const rt = new Oscillator({ + context: this.context, + volume: -6 - et * 1.1, + type: this._type, + phase: this._phase + (nt / et) * 360, + partialCount: this._partialCount, + onstop: nt === 0 ? () => this.onstop(this) : noOp, + }) + this.type === 'custom' && (rt.partials = this._partials), + this.frequency.connect(rt.frequency), + this.detune.connect(rt.detune), + (rt.detune.overridden = !1), + rt.connect(this.output), + (this._oscillators[nt] = rt) + } + ;(this.spread = this._spread), this.state === 'started' && this._forEach((nt) => nt.start()) + } + } + get phase() { + return this._phase + } + set phase(et) { + ;(this._phase = et), this._forEach((nt, rt) => (nt.phase = this._phase + (rt / this.count) * 360)) + } + get baseType() { + return this._oscillators[0].baseType + } + set baseType(et) { + this._forEach((nt) => (nt.baseType = et)), (this._type = this._oscillators[0].type) + } + get partials() { + return this._oscillators[0].partials + } + set partials(et) { + ;(this._partials = et), + (this._partialCount = this._partials.length), + et.length && ((this._type = 'custom'), this._forEach((nt) => (nt.partials = et))) + } + get partialCount() { + return this._oscillators[0].partialCount + } + set partialCount(et) { + ;(this._partialCount = et), + this._forEach((nt) => (nt.partialCount = et)), + (this._type = this._oscillators[0].type) + } + asArray(et = 1024) { + return __awaiter(this, void 0, void 0, function* () { + return generateWaveform(this, et) + }) + } + dispose() { + return super.dispose(), this.frequency.dispose(), this.detune.dispose(), this._forEach((et) => et.dispose()), this + } + } + class PWMOscillator extends Source { + constructor() { + super(optionsFromArguments(PWMOscillator.getDefaults(), arguments, ['frequency', 'modulationFrequency'])), + (this.name = 'PWMOscillator'), + (this.sourceType = 'pwm'), + (this._scale = new Multiply({ context: this.context, value: 2 })) + const et = optionsFromArguments(PWMOscillator.getDefaults(), arguments, ['frequency', 'modulationFrequency']) + ;(this._pulse = new PulseOscillator({ context: this.context, frequency: et.modulationFrequency })), + (this._pulse.carrierType = 'sine'), + (this.modulationFrequency = this._pulse.frequency), + (this._modulator = new Oscillator({ + context: this.context, + detune: et.detune, + frequency: et.frequency, + onstop: () => this.onstop(this), + phase: et.phase, + })), + (this.frequency = this._modulator.frequency), + (this.detune = this._modulator.detune), + this._modulator.chain(this._scale, this._pulse.width), + this._pulse.connect(this.output), + readOnly(this, ['modulationFrequency', 'frequency', 'detune']) + } + static getDefaults() { + return Object.assign(Source.getDefaults(), { + detune: 0, + frequency: 440, + modulationFrequency: 0.4, + phase: 0, + type: 'pwm', + }) + } + _start(et) { + ;(et = this.toSeconds(et)), this._modulator.start(et), this._pulse.start(et) + } + _stop(et) { + ;(et = this.toSeconds(et)), this._modulator.stop(et), this._pulse.stop(et) + } + _restart(et) { + this._modulator.restart(et), this._pulse.restart(et) + } + get type() { + return 'pwm' + } + get baseType() { + return 'pwm' + } + get partials() { + return [] + } + get partialCount() { + return 0 + } + get phase() { + return this._modulator.phase + } + set phase(et) { + this._modulator.phase = et + } + asArray(et = 1024) { + return __awaiter(this, void 0, void 0, function* () { + return generateWaveform(this, et) + }) + } + dispose() { + return super.dispose(), this._pulse.dispose(), this._scale.dispose(), this._modulator.dispose(), this + } + } + const OmniOscillatorSourceMap = { + am: AMOscillator, + fat: FatOscillator, + fm: FMOscillator, + oscillator: Oscillator, + pulse: PulseOscillator, + pwm: PWMOscillator, + } + class OmniOscillator extends Source { + constructor() { + super(optionsFromArguments(OmniOscillator.getDefaults(), arguments, ['frequency', 'type'])), + (this.name = 'OmniOscillator') + const et = optionsFromArguments(OmniOscillator.getDefaults(), arguments, ['frequency', 'type']) + ;(this.frequency = new Signal({ context: this.context, units: 'frequency', value: et.frequency })), + (this.detune = new Signal({ context: this.context, units: 'cents', value: et.detune })), + readOnly(this, ['frequency', 'detune']), + this.set(et) + } + static getDefaults() { + return Object.assign( + Oscillator.getDefaults(), + FMOscillator.getDefaults(), + AMOscillator.getDefaults(), + FatOscillator.getDefaults(), + PulseOscillator.getDefaults(), + PWMOscillator.getDefaults(), + ) + } + _start(et) { + this._oscillator.start(et) + } + _stop(et) { + this._oscillator.stop(et) + } + _restart(et) { + return this._oscillator.restart(et), this + } + get type() { + let et = '' + return ( + ['am', 'fm', 'fat'].some((nt) => this._sourceType === nt) && (et = this._sourceType), et + this._oscillator.type + ) + } + set type(et) { + et.substr(0, 2) === 'fm' + ? (this._createNewOscillator('fm'), + (this._oscillator = this._oscillator), + (this._oscillator.type = et.substr(2))) + : et.substr(0, 2) === 'am' + ? (this._createNewOscillator('am'), + (this._oscillator = this._oscillator), + (this._oscillator.type = et.substr(2))) + : et.substr(0, 3) === 'fat' + ? (this._createNewOscillator('fat'), + (this._oscillator = this._oscillator), + (this._oscillator.type = et.substr(3))) + : et === 'pwm' + ? (this._createNewOscillator('pwm'), (this._oscillator = this._oscillator)) + : et === 'pulse' + ? this._createNewOscillator('pulse') + : (this._createNewOscillator('oscillator'), (this._oscillator = this._oscillator), (this._oscillator.type = et)) + } + get partials() { + return this._oscillator.partials + } + set partials(et) { + !this._getOscType(this._oscillator, 'pulse') && + !this._getOscType(this._oscillator, 'pwm') && + (this._oscillator.partials = et) + } + get partialCount() { + return this._oscillator.partialCount + } + set partialCount(et) { + !this._getOscType(this._oscillator, 'pulse') && + !this._getOscType(this._oscillator, 'pwm') && + (this._oscillator.partialCount = et) + } + set(et) { + return Reflect.has(et, 'type') && et.type && (this.type = et.type), super.set(et), this + } + _createNewOscillator(et) { + if (et !== this._sourceType) { + this._sourceType = et + const nt = OmniOscillatorSourceMap[et], + rt = this.now() + if (this._oscillator) { + const it = this._oscillator + it.stop(rt), this.context.setTimeout(() => it.dispose(), this.blockTime) + } + ;(this._oscillator = new nt({ context: this.context })), + this.frequency.connect(this._oscillator.frequency), + this.detune.connect(this._oscillator.detune), + this._oscillator.connect(this.output), + (this._oscillator.onstop = () => this.onstop(this)), + this.state === 'started' && this._oscillator.start(rt) + } + } + get phase() { + return this._oscillator.phase + } + set phase(et) { + this._oscillator.phase = et + } + get sourceType() { + return this._sourceType + } + set sourceType(et) { + let nt = 'sine' + this._oscillator.type !== 'pwm' && this._oscillator.type !== 'pulse' && (nt = this._oscillator.type), + et === 'fm' + ? (this.type = 'fm' + nt) + : et === 'am' + ? (this.type = 'am' + nt) + : et === 'fat' + ? (this.type = 'fat' + nt) + : et === 'oscillator' + ? (this.type = nt) + : et === 'pulse' + ? (this.type = 'pulse') + : et === 'pwm' && (this.type = 'pwm') + } + _getOscType(et, nt) { + return et instanceof OmniOscillatorSourceMap[nt] + } + get baseType() { + return this._oscillator.baseType + } + set baseType(et) { + !this._getOscType(this._oscillator, 'pulse') && + !this._getOscType(this._oscillator, 'pwm') && + et !== 'pulse' && + et !== 'pwm' && + (this._oscillator.baseType = et) + } + get width() { + if (this._getOscType(this._oscillator, 'pulse')) return this._oscillator.width + } + get count() { + if (this._getOscType(this._oscillator, 'fat')) return this._oscillator.count + } + set count(et) { + this._getOscType(this._oscillator, 'fat') && isNumber$4(et) && (this._oscillator.count = et) + } + get spread() { + if (this._getOscType(this._oscillator, 'fat')) return this._oscillator.spread + } + set spread(et) { + this._getOscType(this._oscillator, 'fat') && isNumber$4(et) && (this._oscillator.spread = et) + } + get modulationType() { + if (this._getOscType(this._oscillator, 'fm') || this._getOscType(this._oscillator, 'am')) + return this._oscillator.modulationType + } + set modulationType(et) { + ;(this._getOscType(this._oscillator, 'fm') || this._getOscType(this._oscillator, 'am')) && + isString$2(et) && + (this._oscillator.modulationType = et) + } + get modulationIndex() { + if (this._getOscType(this._oscillator, 'fm')) return this._oscillator.modulationIndex + } + get harmonicity() { + if (this._getOscType(this._oscillator, 'fm') || this._getOscType(this._oscillator, 'am')) + return this._oscillator.harmonicity + } + get modulationFrequency() { + if (this._getOscType(this._oscillator, 'pwm')) return this._oscillator.modulationFrequency + } + asArray(et = 1024) { + return __awaiter(this, void 0, void 0, function* () { + return generateWaveform(this, et) + }) + } + dispose() { + return super.dispose(), this.detune.dispose(), this.frequency.dispose(), this._oscillator.dispose(), this + } + } + class Add extends Signal { + constructor() { + super(Object.assign(optionsFromArguments(Add.getDefaults(), arguments, ['value']))), + (this.override = !1), + (this.name = 'Add'), + (this._sum = new Gain({ context: this.context })), + (this.input = this._sum), + (this.output = this._sum), + (this.addend = this._param), + connectSeries(this._constantSource, this._sum) + } + static getDefaults() { + return Object.assign(Signal.getDefaults(), { value: 0 }) + } + dispose() { + return super.dispose(), this._sum.dispose(), this + } + } + class Scale extends SignalOperator { + constructor() { + super(Object.assign(optionsFromArguments(Scale.getDefaults(), arguments, ['min', 'max']))), (this.name = 'Scale') + const et = optionsFromArguments(Scale.getDefaults(), arguments, ['min', 'max']) + ;(this._mult = this.input = new Multiply({ context: this.context, value: et.max - et.min })), + (this._add = this.output = new Add({ context: this.context, value: et.min })), + (this._min = et.min), + (this._max = et.max), + this.input.connect(this.output) + } + static getDefaults() { + return Object.assign(SignalOperator.getDefaults(), { max: 1, min: 0 }) + } + get min() { + return this._min + } + set min(et) { + ;(this._min = et), this._setRange() + } + get max() { + return this._max + } + set max(et) { + ;(this._max = et), this._setRange() + } + _setRange() { + ;(this._add.value = this._min), (this._mult.value = this._max - this._min) + } + dispose() { + return super.dispose(), this._add.dispose(), this._mult.dispose(), this + } + } + function range$3(tt, et = 1 / 0) { + const nt = new WeakMap() + return function (rt, it) { + Reflect.defineProperty(rt, it, { + configurable: !0, + enumerable: !0, + get: function () { + return nt.get(this) + }, + set: function (ot) { + assertRange(ot, tt, et), nt.set(this, ot) + }, + }) + } + } + function timeRange(tt, et = 1 / 0) { + const nt = new WeakMap() + return function (rt, it) { + Reflect.defineProperty(rt, it, { + configurable: !0, + enumerable: !0, + get: function () { + return nt.get(this) + }, + set: function (ot) { + assertRange(this.toSeconds(ot), tt, et), nt.set(this, ot) + }, + }) + } + } + let Player$1 = class x1 extends Source { + constructor() { + super(optionsFromArguments(x1.getDefaults(), arguments, ['url', 'onload'])), + (this.name = 'Player'), + (this._activeSources = new Set()) + const et = optionsFromArguments(x1.getDefaults(), arguments, ['url', 'onload']) + ;(this._buffer = new ToneAudioBuffer({ + onload: this._onload.bind(this, et.onload), + onerror: et.onerror, + reverse: et.reverse, + url: et.url, + })), + (this.autostart = et.autostart), + (this._loop = et.loop), + (this._loopStart = et.loopStart), + (this._loopEnd = et.loopEnd), + (this._playbackRate = et.playbackRate), + (this.fadeIn = et.fadeIn), + (this.fadeOut = et.fadeOut) + } + static getDefaults() { + return Object.assign(Source.getDefaults(), { + autostart: !1, + fadeIn: 0, + fadeOut: 0, + loop: !1, + loopEnd: 0, + loopStart: 0, + onload: noOp, + onerror: noOp, + playbackRate: 1, + reverse: !1, + }) + } + load(et) { + return __awaiter(this, void 0, void 0, function* () { + return yield this._buffer.load(et), this._onload(), this + }) + } + _onload(et = noOp) { + et(), this.autostart && this.start() + } + _onSourceEnd(et) { + this.onstop(this), + this._activeSources.delete(et), + this._activeSources.size === 0 && + !this._synced && + this._state.getValueAtTime(this.now()) === 'started' && + (this._state.cancel(this.now()), this._state.setStateAtTime('stopped', this.now())) + } + start(et, nt, rt) { + return super.start(et, nt, rt), this + } + _start(et, nt, rt) { + this._loop ? (nt = defaultArg(nt, this._loopStart)) : (nt = defaultArg(nt, 0)) + const it = this.toSeconds(nt), + ot = rt + rt = defaultArg(rt, Math.max(this._buffer.duration - it, 0)) + let at = this.toSeconds(rt) + ;(at = at / this._playbackRate), (et = this.toSeconds(et)) + const st = new ToneBufferSource({ + url: this._buffer, + context: this.context, + fadeIn: this.fadeIn, + fadeOut: this.fadeOut, + loop: this._loop, + loopEnd: this._loopEnd, + loopStart: this._loopStart, + onended: this._onSourceEnd.bind(this), + playbackRate: this._playbackRate, + }).connect(this.output) + !this._loop && + !this._synced && + (this._state.cancel(et + at), this._state.setStateAtTime('stopped', et + at, { implicitEnd: !0 })), + this._activeSources.add(st), + this._loop && isUndef(ot) ? st.start(et, it) : st.start(et, it, at - this.toSeconds(this.fadeOut)) + } + _stop(et) { + const nt = this.toSeconds(et) + this._activeSources.forEach((rt) => rt.stop(nt)) + } + restart(et, nt, rt) { + return super.restart(et, nt, rt), this + } + _restart(et, nt, rt) { + var it + ;(it = [...this._activeSources].pop()) === null || it === void 0 || it.stop(et), this._start(et, nt, rt) + } + seek(et, nt) { + const rt = this.toSeconds(nt) + if (this._state.getValueAtTime(rt) === 'started') { + const it = this.toSeconds(et) + this._stop(rt), this._start(rt, it) + } + return this + } + setLoopPoints(et, nt) { + return (this.loopStart = et), (this.loopEnd = nt), this + } + get loopStart() { + return this._loopStart + } + set loopStart(et) { + ;(this._loopStart = et), + this.buffer.loaded && assertRange(this.toSeconds(et), 0, this.buffer.duration), + this._activeSources.forEach((nt) => { + nt.loopStart = et + }) + } + get loopEnd() { + return this._loopEnd + } + set loopEnd(et) { + ;(this._loopEnd = et), + this.buffer.loaded && assertRange(this.toSeconds(et), 0, this.buffer.duration), + this._activeSources.forEach((nt) => { + nt.loopEnd = et + }) + } + get buffer() { + return this._buffer + } + set buffer(et) { + this._buffer.set(et) + } + get loop() { + return this._loop + } + set loop(et) { + if ( + this._loop !== et && + ((this._loop = et), + this._activeSources.forEach((nt) => { + nt.loop = et + }), + et) + ) { + const nt = this._state.getNextState('stopped', this.now()) + nt && this._state.cancel(nt.time) + } + } + get playbackRate() { + return this._playbackRate + } + set playbackRate(et) { + this._playbackRate = et + const nt = this.now(), + rt = this._state.getNextState('stopped', nt) + rt && rt.implicitEnd && (this._state.cancel(rt.time), this._activeSources.forEach((it) => it.cancelStop())), + this._activeSources.forEach((it) => { + it.playbackRate.setValueAtTime(et, nt) + }) + } + get reverse() { + return this._buffer.reverse + } + set reverse(et) { + this._buffer.reverse = et + } + get loaded() { + return this._buffer.loaded + } + dispose() { + return ( + super.dispose(), + this._activeSources.forEach((et) => et.dispose()), + this._activeSources.clear(), + this._buffer.dispose(), + this + ) + } + } + __decorate([timeRange(0)], Player$1.prototype, 'fadeIn', void 0) + __decorate([timeRange(0)], Player$1.prototype, 'fadeOut', void 0) + class GainToAudio extends SignalOperator { + constructor() { + super(...arguments), + (this.name = 'GainToAudio'), + (this._norm = new WaveShaper({ context: this.context, mapping: (et) => Math.abs(et) * 2 - 1 })), + (this.input = this._norm), + (this.output = this._norm) + } + dispose() { + return super.dispose(), this._norm.dispose(), this + } + } + class Envelope extends ToneAudioNode { + constructor() { + super(optionsFromArguments(Envelope.getDefaults(), arguments, ['attack', 'decay', 'sustain', 'release'])), + (this.name = 'Envelope'), + (this._sig = new Signal({ context: this.context, value: 0 })), + (this.output = this._sig), + (this.input = void 0) + const et = optionsFromArguments(Envelope.getDefaults(), arguments, ['attack', 'decay', 'sustain', 'release']) + ;(this.attack = et.attack), + (this.decay = et.decay), + (this.sustain = et.sustain), + (this.release = et.release), + (this.attackCurve = et.attackCurve), + (this.releaseCurve = et.releaseCurve), + (this.decayCurve = et.decayCurve) + } + static getDefaults() { + return Object.assign(ToneAudioNode.getDefaults(), { + attack: 0.01, + attackCurve: 'linear', + decay: 0.1, + decayCurve: 'exponential', + release: 1, + releaseCurve: 'exponential', + sustain: 0.5, + }) + } + get value() { + return this.getValueAtTime(this.now()) + } + _getCurve(et, nt) { + if (isString$2(et)) return et + { + let rt + for (rt in EnvelopeCurves) if (EnvelopeCurves[rt][nt] === et) return rt + return et + } + } + _setCurve(et, nt, rt) { + if (isString$2(rt) && Reflect.has(EnvelopeCurves, rt)) { + const it = EnvelopeCurves[rt] + isObject$7(it) ? et !== '_decayCurve' && (this[et] = it[nt]) : (this[et] = it) + } else if (isArray$e(rt) && et !== '_decayCurve') this[et] = rt + else throw new Error('Envelope: invalid curve: ' + rt) + } + get attackCurve() { + return this._getCurve(this._attackCurve, 'In') + } + set attackCurve(et) { + this._setCurve('_attackCurve', 'In', et) + } + get releaseCurve() { + return this._getCurve(this._releaseCurve, 'Out') + } + set releaseCurve(et) { + this._setCurve('_releaseCurve', 'Out', et) + } + get decayCurve() { + return this._getCurve(this._decayCurve, 'Out') + } + set decayCurve(et) { + this._setCurve('_decayCurve', 'Out', et) + } + triggerAttack(et, nt = 1) { + this.log('triggerAttack', et, nt), (et = this.toSeconds(et)) + let it = this.toSeconds(this.attack) + const ot = this.toSeconds(this.decay), + at = this.getValueAtTime(et) + if (at > 0) { + const st = 1 / it + it = (1 - at) / st + } + if (it < this.sampleTime) this._sig.cancelScheduledValues(et), this._sig.setValueAtTime(nt, et) + else if (this._attackCurve === 'linear') this._sig.linearRampTo(nt, it, et) + else if (this._attackCurve === 'exponential') this._sig.targetRampTo(nt, it, et) + else { + this._sig.cancelAndHoldAtTime(et) + let st = this._attackCurve + for (let lt = 1; lt < st.length; lt++) + if (st[lt - 1] <= at && at <= st[lt]) { + ;(st = this._attackCurve.slice(lt)), (st[0] = at) + break + } + this._sig.setValueCurveAtTime(st, et, it, nt) + } + if (ot && this.sustain < 1) { + const st = nt * this.sustain, + lt = et + it + this.log('decay', lt), + this._decayCurve === 'linear' + ? this._sig.linearRampToValueAtTime(st, ot + lt) + : this._sig.exponentialApproachValueAtTime(st, lt, ot) + } + return this + } + triggerRelease(et) { + this.log('triggerRelease', et), (et = this.toSeconds(et)) + const nt = this.getValueAtTime(et) + if (nt > 0) { + const rt = this.toSeconds(this.release) + rt < this.sampleTime + ? this._sig.setValueAtTime(0, et) + : this._releaseCurve === 'linear' + ? this._sig.linearRampTo(0, rt, et) + : this._releaseCurve === 'exponential' + ? this._sig.targetRampTo(0, rt, et) + : (assert(isArray$e(this._releaseCurve), "releaseCurve must be either 'linear', 'exponential' or an array"), + this._sig.cancelAndHoldAtTime(et), + this._sig.setValueCurveAtTime(this._releaseCurve, et, rt, nt)) + } + return this + } + getValueAtTime(et) { + return this._sig.getValueAtTime(et) + } + triggerAttackRelease(et, nt, rt = 1) { + return (nt = this.toSeconds(nt)), this.triggerAttack(nt, rt), this.triggerRelease(nt + this.toSeconds(et)), this + } + cancel(et) { + return this._sig.cancelScheduledValues(this.toSeconds(et)), this + } + connect(et, nt = 0, rt = 0) { + return connectSignal(this, et, nt, rt), this + } + asArray(et = 1024) { + return __awaiter(this, void 0, void 0, function* () { + const nt = et / this.context.sampleRate, + rt = new OfflineContext(1, nt, this.context.sampleRate), + it = this.toSeconds(this.attack) + this.toSeconds(this.decay), + ot = it + this.toSeconds(this.release), + at = ot * 0.1, + st = ot + at, + lt = new this.constructor( + Object.assign(this.get(), { + attack: (nt * this.toSeconds(this.attack)) / st, + decay: (nt * this.toSeconds(this.decay)) / st, + release: (nt * this.toSeconds(this.release)) / st, + context: rt, + }), + ) + return ( + lt._sig.toDestination(), + lt.triggerAttackRelease((nt * (it + at)) / st, 0), + (yield rt.render()).getChannelData(0) + ) + }) + } + dispose() { + return super.dispose(), this._sig.dispose(), this + } + } + __decorate([timeRange(0)], Envelope.prototype, 'attack', void 0) + __decorate([timeRange(0)], Envelope.prototype, 'decay', void 0) + __decorate([range$3(0, 1)], Envelope.prototype, 'sustain', void 0) + __decorate([timeRange(0)], Envelope.prototype, 'release', void 0) + const EnvelopeCurves = (() => { + let et, nt + const rt = [] + for (et = 0; et < 128; et++) rt[et] = Math.sin((et / (128 - 1)) * (Math.PI / 2)) + const it = [], + ot = 6.4 + for (et = 0; et < 128 - 1; et++) { + nt = et / (128 - 1) + const dt = Math.sin(nt * (Math.PI * 2) * ot - Math.PI / 2) + 1 + it[et] = dt / 10 + nt * 0.83 + } + it[128 - 1] = 1 + const at = [], + st = 5 + for (et = 0; et < 128; et++) at[et] = Math.ceil((et / (128 - 1)) * st) / st + const lt = [] + for (et = 0; et < 128; et++) (nt = et / (128 - 1)), (lt[et] = 0.5 * (1 - Math.cos(Math.PI * nt))) + const ct = [] + for (et = 0; et < 128; et++) { + nt = et / (128 - 1) + const dt = Math.pow(nt, 3) * 4 + 0.2, + pt = Math.cos(dt * Math.PI * 2 * nt) + ct[et] = Math.abs(pt * (1 - nt)) + } + function ut(dt) { + const pt = new Array(dt.length) + for (let mt = 0; mt < dt.length; mt++) pt[mt] = 1 - dt[mt] + return pt + } + function ht(dt) { + return dt.slice(0).reverse() + } + return { + bounce: { In: ut(ct), Out: ct }, + cosine: { In: rt, Out: ht(rt) }, + exponential: 'exponential', + linear: 'linear', + ripple: { In: it, Out: ut(it) }, + sine: { In: lt, Out: ut(lt) }, + step: { In: at, Out: ut(at) }, + } + })() + class Instrument extends ToneAudioNode { + constructor() { + super(optionsFromArguments(Instrument.getDefaults(), arguments)), + (this._scheduledEvents = []), + (this._synced = !1), + (this._original_triggerAttack = this.triggerAttack), + (this._original_triggerRelease = this.triggerRelease), + (this._syncedRelease = (nt) => this._original_triggerRelease(nt)) + const et = optionsFromArguments(Instrument.getDefaults(), arguments) + ;(this._volume = this.output = new Volume({ context: this.context, volume: et.volume })), + (this.volume = this._volume.volume), + readOnly(this, 'volume') + } + static getDefaults() { + return Object.assign(ToneAudioNode.getDefaults(), { volume: 0 }) + } + sync() { + return ( + this._syncState() && + (this._syncMethod('triggerAttack', 1), + this._syncMethod('triggerRelease', 0), + this.context.transport.on('stop', this._syncedRelease), + this.context.transport.on('pause', this._syncedRelease), + this.context.transport.on('loopEnd', this._syncedRelease)), + this + ) + } + _syncState() { + let et = !1 + return this._synced || ((this._synced = !0), (et = !0)), et + } + _syncMethod(et, nt) { + const rt = (this['_original_' + et] = this[et]) + this[et] = (...it) => { + const ot = it[nt], + at = this.context.transport.schedule((st) => { + ;(it[nt] = st), rt.apply(this, it) + }, ot) + this._scheduledEvents.push(at) + } + } + unsync() { + return ( + this._scheduledEvents.forEach((et) => this.context.transport.clear(et)), + (this._scheduledEvents = []), + this._synced && + ((this._synced = !1), + (this.triggerAttack = this._original_triggerAttack), + (this.triggerRelease = this._original_triggerRelease), + this.context.transport.off('stop', this._syncedRelease), + this.context.transport.off('pause', this._syncedRelease), + this.context.transport.off('loopEnd', this._syncedRelease)), + this + ) + } + triggerAttackRelease(et, nt, rt, it) { + const ot = this.toSeconds(rt), + at = this.toSeconds(nt) + return this.triggerAttack(et, ot, it), this.triggerRelease(ot + at), this + } + dispose() { + return super.dispose(), this._volume.dispose(), this.unsync(), (this._scheduledEvents = []), this + } + } + class Monophonic extends Instrument { + constructor() { + super(optionsFromArguments(Monophonic.getDefaults(), arguments)) + const et = optionsFromArguments(Monophonic.getDefaults(), arguments) + ;(this.portamento = et.portamento), (this.onsilence = et.onsilence) + } + static getDefaults() { + return Object.assign(Instrument.getDefaults(), { detune: 0, onsilence: noOp, portamento: 0 }) + } + triggerAttack(et, nt, rt = 1) { + this.log('triggerAttack', et, nt, rt) + const it = this.toSeconds(nt) + return this._triggerEnvelopeAttack(it, rt), this.setNote(et, it), this + } + triggerRelease(et) { + this.log('triggerRelease', et) + const nt = this.toSeconds(et) + return this._triggerEnvelopeRelease(nt), this + } + setNote(et, nt) { + const rt = this.toSeconds(nt), + it = et instanceof FrequencyClass ? et.toFrequency() : et + if (this.portamento > 0 && this.getLevelAtTime(rt) > 0.05) { + const ot = this.toSeconds(this.portamento) + this.frequency.exponentialRampTo(it, ot, rt) + } else this.frequency.setValueAtTime(it, rt) + return this + } + } + __decorate([timeRange(0)], Monophonic.prototype, 'portamento', void 0) + class AmplitudeEnvelope extends Envelope { + constructor() { + super( + optionsFromArguments(AmplitudeEnvelope.getDefaults(), arguments, ['attack', 'decay', 'sustain', 'release']), + ), + (this.name = 'AmplitudeEnvelope'), + (this._gainNode = new Gain({ context: this.context, gain: 0 })), + (this.output = this._gainNode), + (this.input = this._gainNode), + this._sig.connect(this._gainNode.gain), + (this.output = this._gainNode), + (this.input = this._gainNode) + } + dispose() { + return super.dispose(), this._gainNode.dispose(), this + } + } + class Synth extends Monophonic { + constructor() { + super(optionsFromArguments(Synth.getDefaults(), arguments)), (this.name = 'Synth') + const et = optionsFromArguments(Synth.getDefaults(), arguments) + ;(this.oscillator = new OmniOscillator( + Object.assign({ context: this.context, detune: et.detune, onstop: () => this.onsilence(this) }, et.oscillator), + )), + (this.frequency = this.oscillator.frequency), + (this.detune = this.oscillator.detune), + (this.envelope = new AmplitudeEnvelope(Object.assign({ context: this.context }, et.envelope))), + this.oscillator.chain(this.envelope, this.output), + readOnly(this, ['oscillator', 'frequency', 'detune', 'envelope']) + } + static getDefaults() { + return Object.assign(Monophonic.getDefaults(), { + envelope: Object.assign(omitFromObject(Envelope.getDefaults(), Object.keys(ToneAudioNode.getDefaults())), { + attack: 0.005, + decay: 0.1, + release: 1, + sustain: 0.3, + }), + oscillator: Object.assign( + omitFromObject(OmniOscillator.getDefaults(), [...Object.keys(Source.getDefaults()), 'frequency', 'detune']), + { type: 'triangle' }, + ), + }) + } + _triggerEnvelopeAttack(et, nt) { + if ((this.envelope.triggerAttack(et, nt), this.oscillator.start(et), this.envelope.sustain === 0)) { + const rt = this.toSeconds(this.envelope.attack), + it = this.toSeconds(this.envelope.decay) + this.oscillator.stop(et + rt + it) + } + } + _triggerEnvelopeRelease(et) { + this.envelope.triggerRelease(et), this.oscillator.stop(et + this.toSeconds(this.envelope.release)) + } + getLevelAtTime(et) { + return (et = this.toSeconds(et)), this.envelope.getValueAtTime(et) + } + dispose() { + return super.dispose(), this.oscillator.dispose(), this.envelope.dispose(), this + } + } + class BiquadFilter extends ToneAudioNode { + constructor() { + super(optionsFromArguments(BiquadFilter.getDefaults(), arguments, ['frequency', 'type'])), + (this.name = 'BiquadFilter') + const et = optionsFromArguments(BiquadFilter.getDefaults(), arguments, ['frequency', 'type']) + ;(this._filter = this.context.createBiquadFilter()), + (this.input = this.output = this._filter), + (this.Q = new Param({ context: this.context, units: 'number', value: et.Q, param: this._filter.Q })), + (this.frequency = new Param({ + context: this.context, + units: 'frequency', + value: et.frequency, + param: this._filter.frequency, + })), + (this.detune = new Param({ + context: this.context, + units: 'cents', + value: et.detune, + param: this._filter.detune, + })), + (this.gain = new Param({ + context: this.context, + units: 'decibels', + convert: !1, + value: et.gain, + param: this._filter.gain, + })), + (this.type = et.type) + } + static getDefaults() { + return Object.assign(ToneAudioNode.getDefaults(), { Q: 1, type: 'lowpass', frequency: 350, detune: 0, gain: 0 }) + } + get type() { + return this._filter.type + } + set type(et) { + assert( + ['lowpass', 'highpass', 'bandpass', 'lowshelf', 'highshelf', 'notch', 'allpass', 'peaking'].indexOf(et) !== -1, + `Invalid filter type: ${et}`, + ), + (this._filter.type = et) + } + getFrequencyResponse(et = 128) { + const nt = new Float32Array(et) + for (let at = 0; at < et; at++) { + const lt = Math.pow(at / et, 2) * (2e4 - 20) + 20 + nt[at] = lt + } + const rt = new Float32Array(et), + it = new Float32Array(et), + ot = this.context.createBiquadFilter() + return ( + (ot.type = this.type), + (ot.Q.value = this.Q.value), + (ot.frequency.value = this.frequency.value), + (ot.gain.value = this.gain.value), + ot.getFrequencyResponse(nt, rt, it), + rt + ) + } + dispose() { + return ( + super.dispose(), + this._filter.disconnect(), + this.Q.dispose(), + this.frequency.dispose(), + this.gain.dispose(), + this.detune.dispose(), + this + ) + } + } + class Filter extends ToneAudioNode { + constructor() { + super(optionsFromArguments(Filter.getDefaults(), arguments, ['frequency', 'type', 'rolloff'])), + (this.name = 'Filter'), + (this.input = new Gain({ context: this.context })), + (this.output = new Gain({ context: this.context })), + (this._filters = []) + const et = optionsFromArguments(Filter.getDefaults(), arguments, ['frequency', 'type', 'rolloff']) + ;(this._filters = []), + (this.Q = new Signal({ context: this.context, units: 'positive', value: et.Q })), + (this.frequency = new Signal({ context: this.context, units: 'frequency', value: et.frequency })), + (this.detune = new Signal({ context: this.context, units: 'cents', value: et.detune })), + (this.gain = new Signal({ context: this.context, units: 'decibels', convert: !1, value: et.gain })), + (this._type = et.type), + (this.rolloff = et.rolloff), + readOnly(this, ['detune', 'frequency', 'gain', 'Q']) + } + static getDefaults() { + return Object.assign(ToneAudioNode.getDefaults(), { + Q: 1, + detune: 0, + frequency: 350, + gain: 0, + rolloff: -12, + type: 'lowpass', + }) + } + get type() { + return this._type + } + set type(et) { + assert( + ['lowpass', 'highpass', 'bandpass', 'lowshelf', 'highshelf', 'notch', 'allpass', 'peaking'].indexOf(et) !== -1, + `Invalid filter type: ${et}`, + ), + (this._type = et), + this._filters.forEach((rt) => (rt.type = et)) + } + get rolloff() { + return this._rolloff + } + set rolloff(et) { + const nt = isNumber$4(et) ? et : parseInt(et, 10), + rt = [-12, -24, -48, -96] + let it = rt.indexOf(nt) + assert(it !== -1, `rolloff can only be ${rt.join(', ')}`), + (it += 1), + (this._rolloff = nt), + this.input.disconnect(), + this._filters.forEach((ot) => ot.disconnect()), + (this._filters = new Array(it)) + for (let ot = 0; ot < it; ot++) { + const at = new BiquadFilter({ context: this.context }) + ;(at.type = this._type), + this.frequency.connect(at.frequency), + this.detune.connect(at.detune), + this.Q.connect(at.Q), + this.gain.connect(at.gain), + (this._filters[ot] = at) + } + ;(this._internalChannels = this._filters), connectSeries(this.input, ...this._internalChannels, this.output) + } + getFrequencyResponse(et = 128) { + const nt = new BiquadFilter({ + frequency: this.frequency.value, + gain: this.gain.value, + Q: this.Q.value, + type: this._type, + detune: this.detune.value, + }), + rt = new Float32Array(et).map(() => 1) + return ( + this._filters.forEach(() => { + nt.getFrequencyResponse(et).forEach((ot, at) => (rt[at] *= ot)) + }), + nt.dispose(), + rt + ) + } + dispose() { + return ( + super.dispose(), + this._filters.forEach((et) => { + et.dispose() + }), + writable(this, ['detune', 'frequency', 'gain', 'Q']), + this.frequency.dispose(), + this.Q.dispose(), + this.detune.dispose(), + this.gain.dispose(), + this + ) + } + } + class FrequencyEnvelope extends Envelope { + constructor() { + super( + optionsFromArguments(FrequencyEnvelope.getDefaults(), arguments, ['attack', 'decay', 'sustain', 'release']), + ), + (this.name = 'FrequencyEnvelope') + const et = optionsFromArguments(FrequencyEnvelope.getDefaults(), arguments, [ + 'attack', + 'decay', + 'sustain', + 'release', + ]) + ;(this._octaves = et.octaves), + (this._baseFrequency = this.toFrequency(et.baseFrequency)), + (this._exponent = this.input = new Pow({ context: this.context, value: et.exponent })), + (this._scale = this.output = + new Scale({ + context: this.context, + min: this._baseFrequency, + max: this._baseFrequency * Math.pow(2, this._octaves), + })), + this._sig.chain(this._exponent, this._scale) + } + static getDefaults() { + return Object.assign(Envelope.getDefaults(), { baseFrequency: 200, exponent: 1, octaves: 4 }) + } + get baseFrequency() { + return this._baseFrequency + } + set baseFrequency(et) { + const nt = this.toFrequency(et) + assertRange(nt, 0), + (this._baseFrequency = nt), + (this._scale.min = this._baseFrequency), + (this.octaves = this._octaves) + } + get octaves() { + return this._octaves + } + set octaves(et) { + ;(this._octaves = et), (this._scale.max = this._baseFrequency * Math.pow(2, et)) + } + get exponent() { + return this._exponent.value + } + set exponent(et) { + this._exponent.value = et + } + dispose() { + return super.dispose(), this._exponent.dispose(), this._scale.dispose(), this + } + } + class MonoSynth extends Monophonic { + constructor() { + super(optionsFromArguments(MonoSynth.getDefaults(), arguments)), (this.name = 'MonoSynth') + const et = optionsFromArguments(MonoSynth.getDefaults(), arguments) + ;(this.oscillator = new OmniOscillator( + Object.assign(et.oscillator, { context: this.context, detune: et.detune, onstop: () => this.onsilence(this) }), + )), + (this.frequency = this.oscillator.frequency), + (this.detune = this.oscillator.detune), + (this.filter = new Filter(Object.assign(et.filter, { context: this.context }))), + (this.filterEnvelope = new FrequencyEnvelope(Object.assign(et.filterEnvelope, { context: this.context }))), + (this.envelope = new AmplitudeEnvelope(Object.assign(et.envelope, { context: this.context }))), + this.oscillator.chain(this.filter, this.envelope, this.output), + this.filterEnvelope.connect(this.filter.frequency), + readOnly(this, ['oscillator', 'frequency', 'detune', 'filter', 'filterEnvelope', 'envelope']) + } + static getDefaults() { + return Object.assign(Monophonic.getDefaults(), { + envelope: Object.assign(omitFromObject(Envelope.getDefaults(), Object.keys(ToneAudioNode.getDefaults())), { + attack: 0.005, + decay: 0.1, + release: 1, + sustain: 0.9, + }), + filter: Object.assign(omitFromObject(Filter.getDefaults(), Object.keys(ToneAudioNode.getDefaults())), { + Q: 1, + rolloff: -12, + type: 'lowpass', + }), + filterEnvelope: Object.assign( + omitFromObject(FrequencyEnvelope.getDefaults(), Object.keys(ToneAudioNode.getDefaults())), + { attack: 0.6, baseFrequency: 200, decay: 0.2, exponent: 2, octaves: 3, release: 2, sustain: 0.5 }, + ), + oscillator: Object.assign(omitFromObject(OmniOscillator.getDefaults(), Object.keys(Source.getDefaults())), { + type: 'sawtooth', + }), + }) + } + _triggerEnvelopeAttack(et, nt = 1) { + if ( + (this.envelope.triggerAttack(et, nt), + this.filterEnvelope.triggerAttack(et), + this.oscillator.start(et), + this.envelope.sustain === 0) + ) { + const rt = this.toSeconds(this.envelope.attack), + it = this.toSeconds(this.envelope.decay) + this.oscillator.stop(et + rt + it) + } + } + _triggerEnvelopeRelease(et) { + this.envelope.triggerRelease(et), + this.filterEnvelope.triggerRelease(et), + this.oscillator.stop(et + this.toSeconds(this.envelope.release)) + } + getLevelAtTime(et) { + return (et = this.toSeconds(et)), this.envelope.getValueAtTime(et) + } + dispose() { + return ( + super.dispose(), + this.oscillator.dispose(), + this.envelope.dispose(), + this.filterEnvelope.dispose(), + this.filter.dispose(), + this + ) + } + } + class MembraneSynth extends Synth { + constructor() { + super(optionsFromArguments(MembraneSynth.getDefaults(), arguments)), + (this.name = 'MembraneSynth'), + (this.portamento = 0) + const et = optionsFromArguments(MembraneSynth.getDefaults(), arguments) + ;(this.pitchDecay = et.pitchDecay), (this.octaves = et.octaves), readOnly(this, ['oscillator', 'envelope']) + } + static getDefaults() { + return deepMerge(Monophonic.getDefaults(), Synth.getDefaults(), { + envelope: { attack: 0.001, attackCurve: 'exponential', decay: 0.4, release: 1.4, sustain: 0.01 }, + octaves: 10, + oscillator: { type: 'sine' }, + pitchDecay: 0.05, + }) + } + setNote(et, nt) { + const rt = this.toSeconds(nt), + it = this.toFrequency(et instanceof FrequencyClass ? et.toFrequency() : et), + ot = it * this.octaves + return ( + this.oscillator.frequency.setValueAtTime(ot, rt), + this.oscillator.frequency.exponentialRampToValueAtTime(it, rt + this.toSeconds(this.pitchDecay)), + this + ) + } + dispose() { + return super.dispose(), this + } + } + __decorate([range$3(0)], MembraneSynth.prototype, 'octaves', void 0) + __decorate([timeRange(0)], MembraneSynth.prototype, 'pitchDecay', void 0) + const workletContext = new Set() + function addToWorklet(tt) { + workletContext.add(tt) + } + function registerProcessor(tt, et) { + const nt = `registerProcessor("${tt}", ${et})` + workletContext.add(nt) + } + const toneAudioWorkletProcessor = ` + /** + * The base AudioWorkletProcessor for use in Tone.js. Works with the [[ToneAudioWorklet]]. + */ + class ToneAudioWorkletProcessor extends AudioWorkletProcessor { + + constructor(options) { + + super(options); + /** + * If the processor was disposed or not. Keep alive until it's disposed. + */ + this.disposed = false; + /** + * The number of samples in the processing block + */ + this.blockSize = 128; + /** + * the sample rate + */ + this.sampleRate = sampleRate; + + this.port.onmessage = (event) => { + // when it receives a dispose + if (event.data === "dispose") { + this.disposed = true; + } + }; + } + } +` + addToWorklet(toneAudioWorkletProcessor) + const singleIOProcess = ` + /** + * Abstract class for a single input/output processor. + * has a 'generate' function which processes one sample at a time + */ + class SingleIOProcessor extends ToneAudioWorkletProcessor { + + constructor(options) { + super(Object.assign(options, { + numberOfInputs: 1, + numberOfOutputs: 1 + })); + /** + * Holds the name of the parameter and a single value of that + * parameter at the current sample + * @type { [name: string]: number } + */ + this.params = {} + } + + /** + * Generate an output sample from the input sample and parameters + * @abstract + * @param input number + * @param channel number + * @param parameters { [name: string]: number } + * @returns number + */ + generate(){} + + /** + * Update the private params object with the + * values of the parameters at the given index + * @param parameters { [name: string]: Float32Array }, + * @param index number + */ + updateParams(parameters, index) { + for (const paramName in parameters) { + const param = parameters[paramName]; + if (param.length > 1) { + this.params[paramName] = parameters[paramName][index]; + } else { + this.params[paramName] = parameters[paramName][0]; + } + } + } + + /** + * Process a single frame of the audio + * @param inputs Float32Array[][] + * @param outputs Float32Array[][] + */ + process(inputs, outputs, parameters) { + const input = inputs[0]; + const output = outputs[0]; + // get the parameter values + const channelCount = Math.max(input && input.length || 0, output.length); + for (let sample = 0; sample < this.blockSize; sample++) { + this.updateParams(parameters, sample); + for (let channel = 0; channel < channelCount; channel++) { + const inputSample = input && input.length ? input[channel][sample] : 0; + output[channel][sample] = this.generate(inputSample, channel, this.params); + } + } + return !this.disposed; + } + }; +` + addToWorklet(singleIOProcess) + const delayLine = ` + /** + * A multichannel buffer for use within an AudioWorkletProcessor as a delay line + */ + class DelayLine { + + constructor(size, channels) { + this.buffer = []; + this.writeHead = [] + this.size = size; + + // create the empty channels + for (let i = 0; i < channels; i++) { + this.buffer[i] = new Float32Array(this.size); + this.writeHead[i] = 0; + } + } + + /** + * Push a value onto the end + * @param channel number + * @param value number + */ + push(channel, value) { + this.writeHead[channel] += 1; + if (this.writeHead[channel] > this.size) { + this.writeHead[channel] = 0; + } + this.buffer[channel][this.writeHead[channel]] = value; + } + + /** + * Get the recorded value of the channel given the delay + * @param channel number + * @param delay number delay samples + */ + get(channel, delay) { + let readHead = this.writeHead[channel] - Math.floor(delay); + if (readHead < 0) { + readHead += this.size; + } + return this.buffer[channel][readHead]; + } + } +` + addToWorklet(delayLine) + const workletName$1 = 'feedback-comb-filter', + feedbackCombFilter = ` + class FeedbackCombFilterWorklet extends SingleIOProcessor { + + constructor(options) { + super(options); + this.delayLine = new DelayLine(this.sampleRate, options.channelCount || 2); + } + + static get parameterDescriptors() { + return [{ + name: "delayTime", + defaultValue: 0.1, + minValue: 0, + maxValue: 1, + automationRate: "k-rate" + }, { + name: "feedback", + defaultValue: 0.5, + minValue: 0, + maxValue: 0.9999, + automationRate: "k-rate" + }]; + } + + generate(input, channel, parameters) { + const delayedSample = this.delayLine.get(channel, parameters.delayTime * this.sampleRate); + this.delayLine.push(channel, input + delayedSample * parameters.feedback); + return delayedSample; + } + } +` + registerProcessor(workletName$1, feedbackCombFilter) + class Sampler extends Instrument { + constructor() { + super(optionsFromArguments(Sampler.getDefaults(), arguments, ['urls', 'onload', 'baseUrl'], 'urls')), + (this.name = 'Sampler'), + (this._activeSources = new Map()) + const et = optionsFromArguments(Sampler.getDefaults(), arguments, ['urls', 'onload', 'baseUrl'], 'urls'), + nt = {} + Object.keys(et.urls).forEach((rt) => { + const it = parseInt(rt, 10) + if ( + (assert(isNote(rt) || (isNumber$4(it) && isFinite(it)), `url key is neither a note or midi pitch: ${rt}`), + isNote(rt)) + ) { + const ot = new FrequencyClass(this.context, rt).toMidi() + nt[ot] = et.urls[rt] + } else isNumber$4(it) && isFinite(it) && (nt[it] = et.urls[it]) + }), + (this._buffers = new ToneAudioBuffers({ + urls: nt, + onload: et.onload, + baseUrl: et.baseUrl, + onerror: et.onerror, + })), + (this.attack = et.attack), + (this.release = et.release), + (this.curve = et.curve), + this._buffers.loaded && Promise.resolve().then(et.onload) + } + static getDefaults() { + return Object.assign(Instrument.getDefaults(), { + attack: 0, + baseUrl: '', + curve: 'exponential', + onload: noOp, + onerror: noOp, + release: 0.1, + urls: {}, + }) + } + _findClosest(et) { + let rt = 0 + for (; rt < 96; ) { + if (this._buffers.has(et + rt)) return -rt + if (this._buffers.has(et - rt)) return rt + rt++ + } + throw new Error(`No available buffers for note: ${et}`) + } + triggerAttack(et, nt, rt = 1) { + return ( + this.log('triggerAttack', et, nt, rt), + Array.isArray(et) || (et = [et]), + et.forEach((it) => { + const ot = ftomf(new FrequencyClass(this.context, it).toFrequency()), + at = Math.round(ot), + st = ot - at, + lt = this._findClosest(at), + ct = at - lt, + ut = this._buffers.get(ct), + ht = intervalToFrequencyRatio(lt + st), + dt = new ToneBufferSource({ + url: ut, + context: this.context, + curve: this.curve, + fadeIn: this.attack, + fadeOut: this.release, + playbackRate: ht, + }).connect(this.output) + dt.start(nt, 0, ut.duration / ht, rt), + isArray$e(this._activeSources.get(at)) || this._activeSources.set(at, []), + this._activeSources.get(at).push(dt), + (dt.onended = () => { + if (this._activeSources && this._activeSources.has(at)) { + const pt = this._activeSources.get(at), + mt = pt.indexOf(dt) + mt !== -1 && pt.splice(mt, 1) + } + }) + }), + this + ) + } + triggerRelease(et, nt) { + return ( + this.log('triggerRelease', et, nt), + Array.isArray(et) || (et = [et]), + et.forEach((rt) => { + const it = new FrequencyClass(this.context, rt).toMidi() + if (this._activeSources.has(it) && this._activeSources.get(it).length) { + const ot = this._activeSources.get(it) + ;(nt = this.toSeconds(nt)), + ot.forEach((at) => { + at.stop(nt) + }), + this._activeSources.set(it, []) + } + }), + this + ) + } + releaseAll(et) { + const nt = this.toSeconds(et) + return ( + this._activeSources.forEach((rt) => { + for (; rt.length; ) rt.shift().stop(nt) + }), + this + ) + } + sync() { + return this._syncState() && (this._syncMethod('triggerAttack', 1), this._syncMethod('triggerRelease', 1)), this + } + triggerAttackRelease(et, nt, rt, it = 1) { + const ot = this.toSeconds(rt) + return ( + this.triggerAttack(et, ot, it), + isArray$e(nt) + ? (assert(isArray$e(et), 'notes must be an array when duration is array'), + et.forEach((at, st) => { + const lt = nt[Math.min(st, nt.length - 1)] + this.triggerRelease(at, ot + this.toSeconds(lt)) + })) + : this.triggerRelease(et, ot + this.toSeconds(nt)), + this + ) + } + add(et, nt, rt) { + if ((assert(isNote(et) || isFinite(et), `note must be a pitch or midi: ${et}`), isNote(et))) { + const it = new FrequencyClass(this.context, et).toMidi() + this._buffers.add(it, nt, rt) + } else this._buffers.add(et, nt, rt) + return this + } + get loaded() { + return this._buffers.loaded + } + dispose() { + return ( + super.dispose(), + this._buffers.dispose(), + this._activeSources.forEach((et) => { + et.forEach((nt) => nt.dispose()) + }), + this._activeSources.clear(), + this + ) + } + } + __decorate([timeRange(0)], Sampler.prototype, 'attack', void 0) + __decorate([timeRange(0)], Sampler.prototype, 'release', void 0) + class CrossFade extends ToneAudioNode { + constructor() { + super(Object.assign(optionsFromArguments(CrossFade.getDefaults(), arguments, ['fade']))), + (this.name = 'CrossFade'), + (this._panner = this.context.createStereoPanner()), + (this._split = this.context.createChannelSplitter(2)), + (this._g2a = new GainToAudio({ context: this.context })), + (this.a = new Gain({ context: this.context, gain: 0 })), + (this.b = new Gain({ context: this.context, gain: 0 })), + (this.output = new Gain({ context: this.context })), + (this._internalChannels = [this.a, this.b]) + const et = optionsFromArguments(CrossFade.getDefaults(), arguments, ['fade']) + ;(this.fade = new Signal({ context: this.context, units: 'normalRange', value: et.fade })), + readOnly(this, 'fade'), + this.context.getConstant(1).connect(this._panner), + this._panner.connect(this._split), + (this._panner.channelCount = 1), + (this._panner.channelCountMode = 'explicit'), + connect(this._split, this.a.gain, 0), + connect(this._split, this.b.gain, 1), + this.fade.chain(this._g2a, this._panner.pan), + this.a.connect(this.output), + this.b.connect(this.output) + } + static getDefaults() { + return Object.assign(ToneAudioNode.getDefaults(), { fade: 0.5 }) + } + dispose() { + return ( + super.dispose(), + this.a.dispose(), + this.b.dispose(), + this.output.dispose(), + this.fade.dispose(), + this._g2a.dispose(), + this._panner.disconnect(), + this._split.disconnect(), + this + ) + } + } + class Effect extends ToneAudioNode { + constructor(et) { + super(et), + (this.name = 'Effect'), + (this._dryWet = new CrossFade({ context: this.context })), + (this.wet = this._dryWet.fade), + (this.effectSend = new Gain({ context: this.context })), + (this.effectReturn = new Gain({ context: this.context })), + (this.input = new Gain({ context: this.context })), + (this.output = this._dryWet), + this.input.fan(this._dryWet.a, this.effectSend), + this.effectReturn.connect(this._dryWet.b), + this.wet.setValueAtTime(et.wet, 0), + (this._internalChannels = [this.effectReturn, this.effectSend]), + readOnly(this, 'wet') + } + static getDefaults() { + return Object.assign(ToneAudioNode.getDefaults(), { wet: 1 }) + } + connectEffect(et) { + return this._internalChannels.push(et), this.effectSend.chain(et, this.effectReturn), this + } + dispose() { + return ( + super.dispose(), + this._dryWet.dispose(), + this.effectSend.dispose(), + this.effectReturn.dispose(), + this.wet.dispose(), + this + ) + } + } + class Panner extends ToneAudioNode { + constructor() { + super(Object.assign(optionsFromArguments(Panner.getDefaults(), arguments, ['pan']))), + (this.name = 'Panner'), + (this._panner = this.context.createStereoPanner()), + (this.input = this._panner), + (this.output = this._panner) + const et = optionsFromArguments(Panner.getDefaults(), arguments, ['pan']) + ;(this.pan = new Param({ + context: this.context, + param: this._panner.pan, + value: et.pan, + minValue: -1, + maxValue: 1, + })), + (this._panner.channelCount = et.channelCount), + (this._panner.channelCountMode = 'explicit'), + readOnly(this, 'pan') + } + static getDefaults() { + return Object.assign(ToneAudioNode.getDefaults(), { pan: 0, channelCount: 1 }) + } + dispose() { + return super.dispose(), this._panner.disconnect(), this.pan.dispose(), this + } + } + const workletName = 'bit-crusher', + bitCrusherWorklet = ` + class BitCrusherWorklet extends SingleIOProcessor { + + static get parameterDescriptors() { + return [{ + name: "bits", + defaultValue: 12, + minValue: 1, + maxValue: 16, + automationRate: 'k-rate' + }]; + } + + generate(input, _channel, parameters) { + const step = Math.pow(0.5, parameters.bits - 1); + const val = step * Math.floor(input / step + 0.5); + return val; + } + } +` + registerProcessor(workletName, bitCrusherWorklet) + class Merge extends ToneAudioNode { + constructor() { + super(optionsFromArguments(Merge.getDefaults(), arguments, ['channels'])), (this.name = 'Merge') + const et = optionsFromArguments(Merge.getDefaults(), arguments, ['channels']) + this._merger = this.output = this.input = this.context.createChannelMerger(et.channels) + } + static getDefaults() { + return Object.assign(ToneAudioNode.getDefaults(), { channels: 2 }) + } + dispose() { + return super.dispose(), this._merger.disconnect(), this + } + } + class Reverb extends Effect { + constructor() { + super(optionsFromArguments(Reverb.getDefaults(), arguments, ['decay'])), + (this.name = 'Reverb'), + (this._convolver = this.context.createConvolver()), + (this.ready = Promise.resolve()) + const et = optionsFromArguments(Reverb.getDefaults(), arguments, ['decay']) + ;(this._decay = et.decay), (this._preDelay = et.preDelay), this.generate(), this.connectEffect(this._convolver) + } + static getDefaults() { + return Object.assign(Effect.getDefaults(), { decay: 1.5, preDelay: 0.01 }) + } + get decay() { + return this._decay + } + set decay(et) { + ;(et = this.toSeconds(et)), assertRange(et, 0.001), (this._decay = et), this.generate() + } + get preDelay() { + return this._preDelay + } + set preDelay(et) { + ;(et = this.toSeconds(et)), assertRange(et, 0), (this._preDelay = et), this.generate() + } + generate() { + return __awaiter(this, void 0, void 0, function* () { + const et = this.ready, + nt = new OfflineContext(2, this._decay + this._preDelay, this.context.sampleRate), + rt = new Noise({ context: nt }), + it = new Noise({ context: nt }), + ot = new Merge({ context: nt }) + rt.connect(ot, 0, 0), it.connect(ot, 0, 1) + const at = new Gain({ context: nt }).toDestination() + ot.connect(at), + rt.start(0), + it.start(0), + at.gain.setValueAtTime(0, 0), + at.gain.setValueAtTime(1, this._preDelay), + at.gain.exponentialApproachValueAtTime(0, this._preDelay, this.decay) + const st = nt.render() + return (this.ready = st.then(noOp)), yield et, (this._convolver.buffer = (yield st).get()), this + }) + } + dispose() { + return super.dispose(), this._convolver.disconnect(), this + } + } + class Solo extends ToneAudioNode { + constructor() { + super(optionsFromArguments(Solo.getDefaults(), arguments, ['solo'])), (this.name = 'Solo') + const et = optionsFromArguments(Solo.getDefaults(), arguments, ['solo']) + ;(this.input = this.output = new Gain({ context: this.context })), + Solo._allSolos.has(this.context) || Solo._allSolos.set(this.context, new Set()), + Solo._allSolos.get(this.context).add(this), + (this.solo = et.solo) + } + static getDefaults() { + return Object.assign(ToneAudioNode.getDefaults(), { solo: !1 }) + } + get solo() { + return this._isSoloed() + } + set solo(et) { + et ? this._addSolo() : this._removeSolo(), Solo._allSolos.get(this.context).forEach((nt) => nt._updateSolo()) + } + get muted() { + return this.input.gain.value === 0 + } + _addSolo() { + Solo._soloed.has(this.context) || Solo._soloed.set(this.context, new Set()), + Solo._soloed.get(this.context).add(this) + } + _removeSolo() { + Solo._soloed.has(this.context) && Solo._soloed.get(this.context).delete(this) + } + _isSoloed() { + return Solo._soloed.has(this.context) && Solo._soloed.get(this.context).has(this) + } + _noSolos() { + return ( + !Solo._soloed.has(this.context) || (Solo._soloed.has(this.context) && Solo._soloed.get(this.context).size === 0) + ) + } + _updateSolo() { + this._isSoloed() + ? (this.input.gain.value = 1) + : this._noSolos() + ? (this.input.gain.value = 1) + : (this.input.gain.value = 0) + } + dispose() { + return super.dispose(), Solo._allSolos.get(this.context).delete(this), this._removeSolo(), this + } + } + Solo._allSolos = new Map() + Solo._soloed = new Map() + class PanVol extends ToneAudioNode { + constructor() { + super(optionsFromArguments(PanVol.getDefaults(), arguments, ['pan', 'volume'])), (this.name = 'PanVol') + const et = optionsFromArguments(PanVol.getDefaults(), arguments, ['pan', 'volume']) + ;(this._panner = this.input = new Panner({ context: this.context, pan: et.pan, channelCount: et.channelCount })), + (this.pan = this._panner.pan), + (this._volume = this.output = new Volume({ context: this.context, volume: et.volume })), + (this.volume = this._volume.volume), + this._panner.connect(this._volume), + (this.mute = et.mute), + readOnly(this, ['pan', 'volume']) + } + static getDefaults() { + return Object.assign(ToneAudioNode.getDefaults(), { mute: !1, pan: 0, volume: 0, channelCount: 1 }) + } + get mute() { + return this._volume.mute + } + set mute(et) { + this._volume.mute = et + } + dispose() { + return ( + super.dispose(), this._panner.dispose(), this.pan.dispose(), this._volume.dispose(), this.volume.dispose(), this + ) + } + } + class Channel extends ToneAudioNode { + constructor() { + super(optionsFromArguments(Channel.getDefaults(), arguments, ['volume', 'pan'])), (this.name = 'Channel') + const et = optionsFromArguments(Channel.getDefaults(), arguments, ['volume', 'pan']) + ;(this._solo = this.input = new Solo({ solo: et.solo, context: this.context })), + (this._panVol = this.output = + new PanVol({ + context: this.context, + pan: et.pan, + volume: et.volume, + mute: et.mute, + channelCount: et.channelCount, + })), + (this.pan = this._panVol.pan), + (this.volume = this._panVol.volume), + this._solo.connect(this._panVol), + readOnly(this, ['pan', 'volume']) + } + static getDefaults() { + return Object.assign(ToneAudioNode.getDefaults(), { pan: 0, volume: 0, mute: !1, solo: !1, channelCount: 1 }) + } + get solo() { + return this._solo.solo + } + set solo(et) { + this._solo.solo = et + } + get muted() { + return this._solo.muted || this.mute + } + get mute() { + return this._panVol.mute + } + set mute(et) { + this._panVol.mute = et + } + _getBus(et) { + return Channel.buses.has(et) || Channel.buses.set(et, new Gain({ context: this.context })), Channel.buses.get(et) + } + send(et, nt = 0) { + const rt = this._getBus(et), + it = new Gain({ context: this.context, units: 'decibels', gain: nt }) + return this.connect(it), it.connect(rt), it + } + receive(et) { + return this._getBus(et).connect(this), this + } + dispose() { + return ( + super.dispose(), this._panVol.dispose(), this.pan.dispose(), this.volume.dispose(), this._solo.dispose(), this + ) + } + } + Channel.buses = new Map() + class Listener extends ToneAudioNode { + constructor() { + super(...arguments), + (this.name = 'Listener'), + (this.positionX = new Param({ context: this.context, param: this.context.rawContext.listener.positionX })), + (this.positionY = new Param({ context: this.context, param: this.context.rawContext.listener.positionY })), + (this.positionZ = new Param({ context: this.context, param: this.context.rawContext.listener.positionZ })), + (this.forwardX = new Param({ context: this.context, param: this.context.rawContext.listener.forwardX })), + (this.forwardY = new Param({ context: this.context, param: this.context.rawContext.listener.forwardY })), + (this.forwardZ = new Param({ context: this.context, param: this.context.rawContext.listener.forwardZ })), + (this.upX = new Param({ context: this.context, param: this.context.rawContext.listener.upX })), + (this.upY = new Param({ context: this.context, param: this.context.rawContext.listener.upY })), + (this.upZ = new Param({ context: this.context, param: this.context.rawContext.listener.upZ })) + } + static getDefaults() { + return Object.assign(ToneAudioNode.getDefaults(), { + positionX: 0, + positionY: 0, + positionZ: 0, + forwardX: 0, + forwardY: 0, + forwardZ: -1, + upX: 0, + upY: 1, + upZ: 0, + }) + } + dispose() { + return ( + super.dispose(), + this.positionX.dispose(), + this.positionY.dispose(), + this.positionZ.dispose(), + this.forwardX.dispose(), + this.forwardY.dispose(), + this.forwardZ.dispose(), + this.upX.dispose(), + this.upY.dispose(), + this.upZ.dispose(), + this + ) + } + } + onContextInit((tt) => { + tt.listener = new Listener({ context: tt }) + }) + onContextClose((tt) => { + tt.listener.dispose() + }) + getContext().transport + const Destination = getContext().destination + getContext().destination + getContext().listener + getContext().draw + getContext() + const highPassFilter = new Filter(900, 'highpass'), + effectsBus = new Volume(-6) + effectsBus.chain(highPassFilter, Destination) + const reverb = new Reverb(3).connect(effectsBus), + monoSynth = new MonoSynth({ envelope: { attack: 0, decay: 0.9, sustain: 0.2, release: 0.1 } }) + monoSynth.oscillator.type = 'triangle2' + monoSynth.volume.value = -6 + monoSynth.chain(highPassFilter, Destination) + const monoSynth2 = new MonoSynth({ envelope: { attack: 0.4, decay: 0.9, sustain: 0.7, release: 0.6 } }).connect( + reverb, + ) + monoSynth2.oscillator.type = 'triangle' + monoSynth2.volume.value = -6 + monoSynth2.chain(highPassFilter, Destination) + function addOrganicVariant() { + return Math.floor((Math.random() - 0.5) * 20) + } + let toneStarted = !1 + const playInspectSound = async (tt = 0) => { + toneStarted || (await start$1(), (toneStarted = !0)) + try { + if (tt > 2e3) monoSynth2.triggerAttackRelease(60, 0.3) + else if (tt > 1e3) { + let et = 310 + ;(et += addOrganicVariant()), monoSynth.triggerAttackRelease(et, 0.001) + } + } catch (et) { + console.warn(et) + } + } + let lookAtAnimationTimer, departAnimationTimer + const departAnimationTimerLength = 4e3, + lookAtAnimationTimerLength = 2e3, + useAutoNavigate = (tt) => { + const et = useSelectedNode(), + nt = useDataStore((At) => At.cameraFocusTrigger), + rt = useControlStore((At) => At.isUserDragging), + it = useControlStore((At) => At.isUserScrolling), + ot = useControlStore((At) => At.setUserMovedCamera), + at = useDataStore((At) => At.setNearbyNodeIds), + st = useDataStore((At) => At.showSelectionGraph), + lt = useDataStore((At) => At.data), + ct = useDataStore((At) => At.graphStyle), + { camera: ut } = useThree(), + [ht, dt] = reactExports.useState(!1), + [pt, mt] = reactExports.useState(!1), + [gt, yt] = reactExports.useState(arriveDistance), + bt = reactExports.useMemo(() => { + if (st) return new Vector3(0, 0, 0) + const At = lt == null ? void 0 : lt.nodes.find(($t) => $t.ref_id === (et == null ? void 0 : et.ref_id)) + let Et = new Vector3(0, 0, 0) + if (At && lt) { + const $t = + lt == null + ? void 0 + : lt.nodes.filter((wt) => { + var It + return (It = At.children) == null ? void 0 : It.find((Ot) => Ot === wt.id) + }), + Dt = new Vector3(At.x, At.y, At.z) + let jt = new Vector3(0, 0, 0) + $t.map((wt) => ((jt = jt.add(new Vector3(wt.x, wt.y, wt.z).normalize())), wt)) + const Pt = At.scale ? 1 - 1 / (At.scale + 10) : 1, + Ct = Dt.sub(jt).multiplyScalar(0.8 * Pt) + Et = Dt.add(Ct) + } + return Et + }, [st, et, lt]), + vt = reactExports.useMemo(() => { + if (st) return new Vector3(0, 0, 0) + const At = lt == null ? void 0 : lt.nodes.find((Et) => Et.ref_id === (et == null ? void 0 : et.ref_id)) + return new Vector3( + (At == null ? void 0 : At.x) || 0, + (At == null ? void 0 : At.y) || 0, + (At == null ? void 0 : At.z) || 0, + ) + }, [st, et, lt]) + reactExports.useEffect(() => { + var At + st && + ((At = tt.current) == null || + At.setLookAt( + selectionGraphCameraPosition.x, + selectionGraphCameraPosition.y, + selectionGraphCameraPosition.z, + 0, + 0, + 0, + !1, + )), + xt() + }, [st]), + reactExports.useEffect(() => { + st + ? yt(selectionGraphDistance) + : (et == null ? void 0 : et.node_type) === 'topic' + ? yt(topicArriveDistance) + : yt(arriveDistance) + }, [et, yt, st]), + reactExports.useEffect(() => { + kt() + }, [nt]), + reactExports.useEffect(() => { + ;(rt || it) && (dt(!0), mt(!0)) + }, [rt, it, dt, mt]), + reactExports.useEffect(() => { + if (et) + if (!st && ct === 'earth' && tt != null && tt.current) { + const At = tt.current.camera.position.distanceTo(new Vector3()), + Et = getPointAbove(vt, -At / 2) + tt.current.setLookAt(Et.x, Et.y, Et.z, 0, 0, 0, !0) + } else + lookAtAnimationTimer && clearTimeout(lookAtAnimationTimer), + (lookAtAnimationTimer = setTimeout(() => { + mt(!0), clearTimeout(lookAtAnimationTimer) + }, lookAtAnimationTimerLength)), + xt() + return () => { + lookAtAnimationTimer && clearTimeout(lookAtAnimationTimer), + departAnimationTimer && clearTimeout(departAnimationTimer) + } + }, [et]), + useFrame((At) => { + tt.current && et && (ht || St(bt, At.camera), pt || Tt(vt, At.camera)) + }) + const xt = () => { + if (et) { + const At = ut.position.distanceTo(bt) + playInspectSound(At) + } + kt() + }, + kt = () => { + dt(!1), + mt(!1), + ot(!1), + departAnimationTimer && clearTimeout(departAnimationTimer), + (departAnimationTimer = setTimeout(() => { + dt(!0), mt(!0) + }, departAnimationTimerLength)) + }, + St = (At, Et) => { + if (Et.position.distanceTo(At) < gt) dt(!0) + else { + Et.position.lerp(At, 0.5) + const Dt = getNearbyNodeIds((lt == null ? void 0 : lt.nodes) || [], ut) + Dt && at(Dt) + } + }, + Tt = (At, Et) => { + var $t + ;($t = tt == null ? void 0 : tt.current) == null || + $t.setLookAt(Et.position.x, Et.position.y, Et.position.z, At.x, At.y, At.z, !0) + } + return null + }, + autoRotateSpeed = 1 + let cameraAnimation = null + const useCameraAnimations = (tt, { enabled: et }) => { + const nt = useSelectedNode() + useAutoNavigate(tt) + const rt = useControlStore((ct) => ct.isUserDragging), + it = useDataStore((ct) => ct.disableCameraRotation), + ot = useDataStore((ct) => ct.data), + at = useDataStore((ct) => ct.graphRadius), + st = useDataStore((ct) => ct.setNearbyNodeIds) + reactExports.useEffect(() => { + et || (cameraAnimation == null || cameraAnimation.kill(), (cameraAnimation = null)) + }, [et]) + const lt = reactExports.useCallback(() => { + cameraAnimation == null || cameraAnimation.kill() + const ct = { value: -244 }, + ut = gsapWithCSS.to(ct, { + duration: 5, + keyframes: { '0%': { value: 10 }, '100%': { delay: 2, ease: 'Power4.easeIn', value: -200 } }, + onComplete: () => { + cameraAnimation = null + }, + onInterrupt() { + ut.kill() + }, + onUpdate: () => { + var dt + const { value: ht } = ct + if (tt.current) { + const pt = getNearbyNodeIds((ot == null ? void 0 : ot.nodes) || [], tt.current.camera) + pt && st(pt), (dt = tt.current) == null || dt.dolly(ht, !1) + } + }, + }) + ut.play(), (cameraAnimation = ut) + }, []) + return ( + reactExports.useEffect(() => { + tt.current && at && (tt.current.maxDistance = tt.current.getDistanceToFitSphere(at + 200)), et && lt() + }, [at]), + reactExports.useEffect(() => { + !nt && + tt.current && + tt.current.setLookAt(initialCameraPosition.x, initialCameraPosition.y, initialCameraPosition.z, 0, 0, 0, !0) + }, [nt]), + useFrame((ct, ut) => { + tt.current && + (!it && !rt && (tt.current.azimuthAngle += autoRotateSpeed * ut * MathUtils.DEG2RAD), tt.current.update(ut)) + }), + null + ) + }, + Controls = ({ disableAnimations: tt }) => { + const et = reactExports.useRef(null), + nt = useDataStore((dt) => dt.graphStyle), + rt = useDataStore((dt) => dt.data), + it = useDataStore((dt) => dt.setNearbyNodeIds), + ot = useDataStore((dt) => dt.setDisableCameraRotation), + [at] = reactExports.useState(0.8), + { camera: st } = useThree(), + [lt, ct, ut, ht] = useControlStore((dt) => [ + dt.isUserDragging, + dt.setIsUserDragging, + dt.isUserScrolling, + dt.isUserScrollingOnHtmlPanel, + ]) + return ( + useCameraAnimations(et, { enabled: !tt && !ut && !lt }), + reactExports.useEffect(() => { + et.current && + et.current.setLookAt(initialCameraPosition.x, initialCameraPosition.y, initialCameraPosition.z, 0, 0, 0, !0) + }, [nt]), + reactExports.useEffect(() => { + if (!lt) { + const dt = getNearbyNodeIds((rt == null ? void 0 : rt.nodes) || [], st) + dt && it(dt) + } + }, [st, st.position, st.position.x, st.position.y, st.position.z, rt == null ? void 0 : rt.nodes, it, lt]), + reactExports.useEffect(() => { + lt && ot(!0) + }, [lt, ot]), + jsxRuntimeExports.jsx(CameraControls, { + ref: et, + boundaryEnclosesCamera: !0, + enabled: !ht, + makeDefault: !0, + maxDistance: 12e3, + minDistance: 100, + onEnd: () => ct(!1), + onStart: () => ct(!0), + smoothTime: at, + }) + ) + }, + smoothness = { metalness: 0.9, roughness: 0 }, + materialOptions = { ...smoothness }, + blurryMaterial = new MeshStandardMaterial(materialOptions), + BlurryInstances = ({ hide: tt }) => { + const et = useGraphData(), + nt = useDataStore((it) => it.graphStyle), + rt = reactExports.useMemo( + () => + et.nodes.map((it, ot) => { + if (it.node_type === 'topic') return !1 + const at = !isMainTopic(it), + st = getNodeColorByType(it.node_type || '', !0) + return jsxRuntimeExports.jsx( + Instance, + { + color: st, + name: it.id, + position: [it.x, it.y, it.z], + scale: at ? (it.scale || 1) * 0.9 : 0, + userData: it, + }, + `${it.ref_id || it.id}-instanced-node-${ot}-${nt}`, + ) + }), + [nt, et], + ) + return jsxRuntimeExports.jsx(Instances, { + geometry: boxGeometry, + material: blurryMaterial, + visible: !tt, + children: rt, + }) + }, + loader = new TextureLoader(), + noImageTexture = loader.load('noimage.jpeg'), + noImageMaterial = new MeshStandardMaterial({ ...smoothness, map: noImageTexture }), + transparentValue = 0.4, + noImageTransparentMaterial = new MeshStandardMaterial({ + ...smoothness, + map: noImageTexture, + transparent: !0, + opacity: transparentValue, + }), + cachedMaterials = {}, + useMaterial = (tt, et) => { + const [nt, rt] = reactExports.useState(noImageTexture), + [it, ot] = reactExports.useState(noImageMaterial) + return ( + reactExports.useEffect(() => { + const at = `${tt}${et && '-transparent'}` + if (cachedMaterials[at]) { + rt(cachedMaterials[at].texture), ot(cachedMaterials[at].material) + return + } + loader.load( + tt, + (st) => { + const lt = new MeshStandardMaterial({ + map: st, + transparent: et, + opacity: et ? transparentValue : 1, + ...smoothness, + }) + ;(cachedMaterials[at] = { texture: st, material: lt }), rt(st), ot(lt) + }, + void 0, + () => { + rt(noImageTexture), ot(et ? noImageTransparentMaterial : noImageMaterial) + }, + ) + }, [tt, et]), + reactExports.useEffect( + () => + function () { + nt.dispose(), it.dispose() + }, + [nt, it], + ), + it + ) + }, + Cube = reactExports.memo(({ node: tt, hide: et, animated: nt }) => { + const rt = reactExports.useRef(null), + [it] = reactExports.useState(boxGeometry), + ot = useSelectedNode(), + at = useDataStore((ut) => ut.showSelectionGraph), + st = !!ot && tt.ref_id === ot.ref_id, + lt = useMaterial(tt.image_url || 'noimage.jpeg', !1) + useFrame((ut, ht) => { + nt && + rt.current && + (rt.current.position.set(tt.x, tt.y, tt.z), + st && ((rt.current.rotation.y += ht * 1), (rt.current.rotation.x -= ht * 0.6))) + }), + reactExports.useEffect( + () => + function () { + it.dispose() + }, + [it], + ) + const ct = reactExports.useMemo(() => (at && st ? 20 : st ? (tt.scale || 1) * 1.2 : tt.scale), [tt, st, at]) + return jsxRuntimeExports.jsx(Select, { + enabled: !!st, + children: jsxRuntimeExports.jsx('mesh', { + ref: rt, + geometry: boxGeometry, + material: lt, + name: tt.id, + position: [tt.x, tt.y, tt.z], + scale: ct, + userData: tt, + visible: !et, + }), + }) + }) + Cube.displayName = 'Cube' + const TypesMapper = { + youtube: 'video', + podcast: 'audio', + episode: 'audio', + clip: 'audio', + tweet: 'twitter', + person: 'person', + guest: 'person', + twitter_space: 'audio', + }, + Avatar$1 = styled$4.div` + background-image: ${({ src: tt, type: et = 'audio' }) => + `url(${tt}), url('/${TypesMapper[et]}_placeholder_img.png')`}; + background-size: contain; + background-repeat: no-repeat; + width: ${({ size: tt = 45 }) => tt}px; + height: ${({ size: tt = 45 }) => tt}px; + border-radius: ${({ rounded: tt }) => (tt ? '50%' : '2px')}; +`, + EpisodeTypeImages = { + podcast: { img: 'audio_badge.svg', label: 'podcast' }, + clip: { img: 'audio_badge.svg', label: 'clip' }, + show: { img: 'audio_badge.svg', label: 'show' }, + tweet: { img: 'twitter_badge.svg', label: 'tweet' }, + twitter_space: { img: 'audio_badge.svg', label: 'twitter_space' }, + youtube: { img: 'video_badge.svg', label: 'episode' }, + episode: { img: 'video_badge.svg', label: 'episode' }, + document: { img: 'notes_badge.svg', label: 'text' }, + }, + TypeBadge = ({ type: tt }) => { + var et, nt, rt + return jsxRuntimeExports.jsxs(EpisodeWrapper$3, { + children: [ + jsxRuntimeExports.jsx('img', { + alt: ((et = EpisodeTypeImages[tt]) == null ? void 0 : et.label) || tt, + src: ((nt = EpisodeTypeImages[tt]) == null ? void 0 : nt.img) || '', + }), + jsxRuntimeExports.jsx('div', { + className: 'label', + children: ((rt = EpisodeTypeImages[tt]) == null ? void 0 : rt.label) || tt, + }), + ], + }) + }, + EpisodeWrapper$3 = styled$4(Flex).attrs({ direction: 'row' })` + cursor: pointer; + background: ${colors.white}; + border-radius: 1px; + overflow: hidden; + + img { + width: 14px; + height: 14px; + object-fit: cover; + } + + .label { + color: ${colors.BG1}; + font-family: Barlow; + font-size: 8px; + font-style: normal; + font-weight: 800; + line-height: 14px; + text-transform: uppercase; + line-height: 14px; + letter-spacing: 0.48px; + padding: 0 4px; + } +`, + Tag = styled$4(Flex)` + text-align: center; + width: ${(tt) => (tt.type === 'topic' ? 'auto' : `${tt.size}px`)}; + height: ${(tt) => (tt.type === 'topic' ? 'auto' : `${tt.size}px`)}; + outline: 1px solid ${(tt) => colors.white}; + outline-offset: 0px; + background: rgba(0, 0, 0, 0.75); + color: ${(tt) => tt.fontColor}; + border-radius: ${(tt) => `${tt.type === 'guest' ? '100%' : '6px'}`}; + font-size: ${(tt) => `${tt.fontSize}px`}; + cursor: pointer; + transition: font-size 0.4s, outline 0.4s; + transform: scale(${(tt) => tt.scale}); + align-items: center; + justify-content: center; + font-family: Barlow; + font-size: 26px; + font-style: normal; + font-weight: 700; + text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5); + + &:hover { + outline-offset: 4px; + } + + &.selected { + .badge-wrapper { + top: 0; + } + + font-size: 36px; + + &:hover { + outline-offset: 0px; + } + } + + &.topic { + outline: none; + background: none; + &:hover { + font-size: 36px; + } + white-space: nowrap; + .badge-wrapper { + display: none; + } + } + + .badge-wrapper { + position: absolute; + top: -7px; + left: -14px; + } +` + styled$4.img` + background-image: ${({ src: tt }) => `url(${tt})`}; + background-size: contain; + background-repeat: no-repeat; + width: ${(tt) => tt.size}px; + height: ${(tt) => tt.size}px; + border-radius: ${(tt) => tt.borderRadius}; +` + styled$4.div` + display: flex; + position: absolute; + bottom: -14px; + left: -5px; + width: auto; + justify-content: center; + align-items: center; +` + styled$4.div` + display: flex; + justify-content: center; + align-items: center; + background: ${colors.transparentBlack}; + border: 2px solid ${(tt) => tt.color}; + color: #fff; + padding: 0 4px; + min-width: 30px; + height: 26px; + font-size: 12px; + font-weight: 500; + border-radius: 6px; + margin-right: 5px; +` + styled$4.div` + display: flex; + justify-content: center; + align-items: center; + border: 2px solid ${(tt) => tt.color}44; + background: ${colors.transparentBlack}; + padding: 0 4px; + color: ${(tt) => tt.color}; + min-width: 30px; + height: 26px; + font-size: 12px; + font-weight: 500; + border-radius: 6px; + margin-right: 5px; +` + const variableVector3 = new Vector3(), + NodeBadge = ({ position: tt, userData: et, color: nt }) => { + const rt = reactExports.useRef(null), + [it, ot] = useDataStore((pt) => [pt.selectedNode, pt.setSelectedNode]), + at = useDataStore((pt) => pt.setHoveredNode), + st = useDataStore((pt) => pt.hoveredNode), + lt = useDataStore((pt) => pt.showSelectionGraph), + ct = ((et == null ? void 0 : et.node_type) || '') === 'topic', + ut = + ((et == null ? void 0 : et.node_type) || '') === 'guest' || + ((et == null ? void 0 : et.node_type) || '') === 'person' + useFrame(() => { + if (lt && rt.current) { + const pt = variableVector3.set( + (et == null ? void 0 : et.x) || 0, + (et == null ? void 0 : et.y) || 0, + (et == null ? void 0 : et.z) || 0, + ) + rt.current.position.copy(pt) + } + }), + reactExports.useEffect( + () => + function () { + rt.current && rt.current.clear() + }, + [rt], + ) + const ht = reactExports.useMemo( + () => (st == null ? void 0 : st.ref_id) === (et == null ? void 0 : et.ref_id), + [st == null ? void 0 : st.ref_id, et == null ? void 0 : et.ref_id], + ), + dt = (it == null ? void 0 : it.ref_id) === (et == null ? void 0 : et.ref_id) + return (dt && lt) || !dt + ? jsxRuntimeExports.jsx('group', { + ref: rt, + position: tt, + children: jsxRuntimeExports.jsx(Html$1, { + center: !0, + sprite: !0, + children: jsxRuntimeExports.jsxs(Tag, { + className: clsx$1(et == null ? void 0 : et.node_type, { selected: dt }), + color: nt, + fontColor: colors.white, + fontSize: ct ? 14 : 20, + onClick: (pt) => { + pt.stopPropagation(), et && ot(et) + }, + onPointerOut: (pt) => { + pt.stopPropagation(), at(null) + }, + onPointerOver: (pt) => { + pt.stopPropagation(), at(et || null) + }, + scale: ht ? 1.05 : 1, + selected: !1, + size: dt ? 100 : 68, + type: (et == null ? void 0 : et.node_type) || '', + children: [ + !ut && !ct + ? jsxRuntimeExports.jsx('div', { + className: 'badge-wrapper', + children: jsxRuntimeExports.jsx(TypeBadge, { + type: (et == null ? void 0 : et.node_type) || '', + }), + }) + : null, + ct + ? et == null + ? void 0 + : et.label + : jsxRuntimeExports.jsx(Avatar$1, { + rounded: ut, + size: dt ? 60 : 52, + src: (et == null ? void 0 : et.image_url) || 'audio_default.svg', + type: et == null ? void 0 : et.node_type, + }), + ], + }), + }), + }) + : null + }, + RelevanceBadges = reactExports.memo(() => { + const tt = useDataStore((at) => at.data), + et = useSelectedNode(), + nt = useDataStore((at) => at.showSelectionGraph), + rt = useDataStore((at) => at.selectionGraphData), + it = useDataStore((at) => at.selectedNodeRelativeIds), + ot = reactExports.useMemo( + () => + (nt ? rt.nodes : (tt == null ? void 0 : tt.nodes) || []) + .filter( + (lt) => + it.includes((lt == null ? void 0 : lt.ref_id) || '') || + (et == null ? void 0 : et.ref_id) === (lt == null ? void 0 : lt.ref_id), + ) + .map((lt) => { + const ct = getNodeColorByType(lt.node_type || '', !0), + ut = new Vector3( + (lt == null ? void 0 : lt.x) || 0, + (lt == null ? void 0 : lt.y) || 0, + (lt == null ? void 0 : lt.z) || 0, + ), + ht = + ((tt == null ? void 0 : tt.nodes) || []) + .filter((dt) => dt.ref_id && nodesAreRelatives(dt, lt)) + .map((dt) => (dt == null ? void 0 : dt.ref_id) || '') || [] + return jsxRuntimeExports.jsx( + NodeBadge, + { color: ct, position: ut, relativeIds: ht, userData: lt }, + `node-badge-${lt.ref_id}`, + ) + }), + [it, tt == null ? void 0 : tt.nodes, nt, rt, et], + ) + return jsxRuntimeExports.jsx(reactExports.Fragment, { children: ot.length ? ot : null }, 'node-badges') + }) + RelevanceBadges.displayName = 'RelevanceBadges' + const Segment = ({ link: tt, animated: et }) => { + const nt = reactExports.useRef(null), + rt = useSelectedNode(), + [it, ot] = reactExports.useState(new Vector3(0, 0, 0)), + [at, st] = reactExports.useState(new Vector3(0, 0, 0)), + [lt, ct] = reactExports.useState(8947848), + ut = useDataStore((ht) => ht.selectionGraphData) + return ( + reactExports.useEffect(() => { + var pt, mt, gt, yt, bt, vt + const ht = (rt == null ? void 0 : rt.ref_id) || '', + dt = rt && (ht === tt.targetRef || ht === tt.sourceRef) + !tt.onlyVisibleOnSelect || dt + ? (ot( + new Vector3( + ((pt = tt.sourcePosition) == null ? void 0 : pt.x) || 0, + ((mt = tt.sourcePosition) == null ? void 0 : mt.y) || 0, + ((gt = tt.sourcePosition) == null ? void 0 : gt.z) || 0, + ), + ), + st( + new Vector3( + ((yt = tt.targetPosition) == null ? void 0 : yt.x) || 0, + ((bt = tt.targetPosition) == null ? void 0 : bt.y) || 0, + ((vt = tt.targetPosition) == null ? void 0 : vt.z) || 0, + ), + )) + : (ot(new Vector3(0, 0, 0)), st(new Vector3(0, 0, 0))), + ct(dt ? tt.color || NODE_RELATIVE_HIGHLIGHT_COLORS.children.segmentColor : rt ? 5592405 : 8947848) + }, [rt, tt]), + useFrame(() => { + if (et && nt.current) { + const ht = ut.nodes.find((pt) => pt.ref_id === tt.sourceRef), + dt = ut.nodes.find((pt) => pt.ref_id === tt.targetRef) + nt.current.start.set( + (ht == null ? void 0 : ht.x) || 0, + (ht == null ? void 0 : ht.y) || 0, + (ht == null ? void 0 : ht.z) || 0, + ), + nt.current.end.set( + (dt == null ? void 0 : dt.x) || 0, + (dt == null ? void 0 : dt.y) || 0, + (dt == null ? void 0 : dt.z) || 0, + ) + } + }), + jsxRuntimeExports.jsx(Segment$1, { ref: nt, color: '0xFFFFFF', end: at, start: it }) + ) + }, + fontProps = { + font: '/fonts/Inter-Bold.woff', + characters: 'abcdefghijklmnopqrstuvwxyz0123456789!', + fontSize: 2, + letterSpacing: -0.05, + lineHeight: 1, + 'material-toneMapped': !1, + }, + TextNode = reactExports.memo(({ node: tt, hide: et }) => { + const nt = reactExports.useRef(null), + rt = useSelectedNode(), + ot = useDataStore((ut) => ut.selectedNodeRelativeIds).includes((tt == null ? void 0 : tt.ref_id) || ''), + at = !!rt && (rt == null ? void 0 : rt.id) === tt.id, + st = useDataStore((ut) => ut.showSelectionGraph) + useFrame(({ camera: ut }) => { + nt != null && + nt.current && + (nt.current.quaternion.copy(ut.quaternion), st && nt.current.position.set(tt.x, tt.y, tt.z)) + }) + const lt = reactExports.useMemo(() => { + let ut = (tt.scale || 1) * 4 + return st && at ? (ut = 40) : !at && ot && (ut = 0), ut + }, [tt.scale, at, ot, st]), + ct = reactExports.useMemo(() => (rt && rt.node_type === 'topic' && !at ? 0.2 : 1), [at, rt]) + return jsxRuntimeExports.jsx(Text$1, { + ref: nt, + anchorX: 'center', + anchorY: 'middle', + color: colors.white, + fillOpacity: ct, + position: [tt.x, tt.y, tt.z], + scale: lt, + userData: tt, + visible: !et, + ...fontProps, + children: tt.label, + }) + }) + TextNode.displayName = 'TextNode' + let simulation2d = null + const SelectionDataNodes = reactExports.memo(() => { + const tt = useGraphData(), + et = useSelectedNode(), + nt = useDataStore((ot) => ot.selectedNodeRelativeIds), + rt = useDataStore((ot) => ot.selectionGraphData), + it = useDataStore((ot) => ot.setSelectionData) + return ( + reactExports.useEffect(() => { + const ot = tt.nodes + .filter( + (st) => + st.ref_id === (et == null ? void 0 : et.ref_id) || nt.includes((st == null ? void 0 : st.ref_id) || ''), + ) + .map((st) => { + const lt = + st.ref_id === (et == null ? void 0 : et.ref_id) && st.node_type !== 'topic' + ? { fx: 0, fy: 0, fz: 0 } + : {} + return { ...st, x: 0, y: 0, z: 0, ...lt } + }), + at = generateLinksFromNodeData(ot, !1, !1) + it({ nodes: ot, links: at }) + }, [tt, et, nt, it]), + reactExports.useEffect(() => { + simulation2d = runForceSimulation(rt.nodes, rt.links, { + numDimensions: 2, + forceLinkStrength: 0.01, + forceCenterStrength: 0.85, + forceChargeStrength: -20, + velocityDecay: 0.9, + }) + }, [rt]), + useFrame(() => { + simulation2d && simulation2d.tick() + }), + jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { + children: [ + rt == null + ? void 0 + : rt.nodes.map((ot) => + ot.node_type === 'topic' + ? jsxRuntimeExports.jsx(TextNode, { hide: !0, node: ot }, `${ot.ref_id || ot.id}-compact`) + : jsxRuntimeExports.jsx(Cube, { animated: !0, hide: !0, node: ot }, `${ot.ref_id || ot.id}-compact`), + ), + jsxRuntimeExports.jsx( + Segments, + { + fog: !0, + lineWidth: 0.9, + children: (rt == null ? void 0 : rt.links).map((ot, at) => + jsxRuntimeExports.jsx(Segment, { animated: !0, link: ot }, at.toString()), + ), + }, + `selection-links-${rt == null ? void 0 : rt.links.length}`, + ), + ], + }) + ) + }) + SelectionDataNodes.displayName = 'SelectionDataNodes' + const Cubes = reactExports.memo(() => { + const tt = useGraphData(), + et = useSelectedNode(), + nt = useDataStore((dt) => dt.nearbyNodeIds), + rt = useDataStore((dt) => dt.setHoveredNode), + it = useDataStore((dt) => dt.showSelectionGraph), + ot = useDataStore((dt) => dt.selectionGraphData), + at = useAppStore((dt) => dt.setTranscriptOpen), + st = reactExports.useCallback((dt) => !!(it && !ot.nodes.find((pt) => pt.ref_id === dt.ref_id)), [it, ot]), + lt = reactExports.useCallback( + (dt) => { + const pt = dt == null ? void 0 : dt[0] + pt && + (at(!1), + pt.userData && + (st(pt.userData) || useDataStore.getState().setSelectedNode((pt == null ? void 0 : pt.userData) || null))) + }, + [at, st], + ), + ct = reactExports.useCallback( + (dt) => { + dt.stopPropagation(), rt(null) + }, + [rt], + ), + ut = reactExports.useCallback( + (dt) => { + var gt + const mt = dt.intersections.map((yt) => yt.object)[0] + if ((gt = mt == null ? void 0 : mt.userData) != null && gt.ref_id) { + const yt = mt.userData + st(yt) || (dt.stopPropagation(), rt(yt)) + } + }, + [rt, st], + ), + ht = it && !!et + return jsxRuntimeExports.jsxs(Select$1, { + filter: (dt) => + dt.filter((pt) => { + var mt + return !!((mt = pt.userData) != null && mt.id) + }), + onChange: lt, + onPointerOut: ct, + onPointerOver: ut, + children: [ + jsxRuntimeExports.jsx(BlurryInstances, { hide: ht }), + tt.nodes + .filter((dt) => { + const pt = (dt == null ? void 0 : dt.ref_id) === (et == null ? void 0 : et.ref_id) + return nt.includes(dt.ref_id || '') || isMainTopic(dt) || pt + }) + .map((dt) => + dt.node_type === 'topic' + ? jsxRuntimeExports.jsx(TextNode, { hide: ht, node: dt }, dt.ref_id || dt.id) + : jsxRuntimeExports.jsx(Cube, { hide: ht, node: dt }, dt.ref_id || dt.id), + ), + ht && jsxRuntimeExports.jsx(SelectionDataNodes, {}), + jsxRuntimeExports.jsx(RelevanceBadges, {}), + ], + }) + }) + Cubes.displayName = 'Cubes' + const defaultData$4 = { earthRef: null }, + useRefStore = react((tt) => ({ ...defaultData$4, setEarthRef: (et) => tt({ earthRef: et }) })), + getCurvedLineFromStartAndEnd = (tt, et) => { + const nt = new Quaternion().setFromUnitVectors(new Vector3(0, 1, 0), tt.clone().normalize()), + rt = new Quaternion().setFromUnitVectors(new Vector3(0, 1, 0), et.clone().normalize()), + it = new Quaternion(), + ot = 50, + at = [] + for (let lt = 0; lt <= ot; lt += 1) { + const ct = lt / ot + it.slerpQuaternions(nt, rt, ct) + const ut = new Vector3(0, 1, 0).applyQuaternion(it).multiplyScalar(EARTH_RADIUS + EARTH_DATA_PADDING) + at.push(ut) + } + return new CatmullRomCurve3(at).getPoints(ot) + }, + CurvedLine = ({ link: tt }) => { + const et = useSelectedNode(), + [nt, rt] = reactExports.useState(8947848) + reactExports.useEffect(() => { + const ot = (et == null ? void 0 : et.ref_id) || '', + at = et && (ot === tt.targetRef || ot === tt.sourceRef) + rt(at ? tt.color || NODE_RELATIVE_HIGHLIGHT_COLORS.children.segmentColor : et ? 5592405 : 8947848) + }, [et, tt]) + const it = reactExports.useMemo(() => { + var ct, ut, ht, dt, pt, mt + const ot = (et == null ? void 0 : et.ref_id) || '', + at = et && (ot === tt.targetRef || ot === tt.sourceRef) + if (!(!tt.onlyVisibleOnSelect || at)) return [] + const st = new Vector3( + ((ct = tt.sourcePosition) == null ? void 0 : ct.x) || 0, + ((ut = tt.sourcePosition) == null ? void 0 : ut.y) || 0, + ((ht = tt.sourcePosition) == null ? void 0 : ht.z) || 0, + ), + lt = new Vector3( + ((dt = tt.targetPosition) == null ? void 0 : dt.x) || 0, + ((pt = tt.targetPosition) == null ? void 0 : pt.y) || 0, + ((mt = tt.targetPosition) == null ? void 0 : mt.z) || 0, + ) + return getCurvedLineFromStartAndEnd(st, lt) + }, [tt, et]) + return it.length ? jsxRuntimeExports.jsx(Line$1, { color: nt, dashed: !1, lineWidth: 3, points: it }) : null + }, + center$1 = new Vector3(0, 0, 0), + Earth = () => { + const tt = reactExports.useRef(null), + et = reactExports.useRef(null), + nt = useDataStore((lt) => lt.graphStyle), + rt = useDataStore((lt) => lt.showSelectionGraph), + it = useDataStore((lt) => lt.data), + ot = useRefStore((lt) => lt.setEarthRef), + at = useTexture('textures/earth/galaxy.png'), + st = useTexture('textures/earth/clouds.png') + return ( + useFrame(({ camera: lt }) => { + et.current && et.current.position.copy(lt.getWorldPosition(center$1)) + }), + reactExports.useLayoutEffect(() => { + tt.current && ot(tt) + }, [ot]), + nt !== 'earth' || rt + ? null + : jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { + children: [ + jsxRuntimeExports.jsxs('mesh', { + ref: tt, + userData: { type: 'earth' }, + children: [ + jsxRuntimeExports.jsx('sphereGeometry', { args: [EARTH_RADIUS, 200, 200] }), + jsxRuntimeExports.jsx(EarthMaterial, {}), + ], + }), + jsxRuntimeExports.jsxs('mesh', { + children: [ + jsxRuntimeExports.jsx('sphereGeometry', { args: [EARTH_RADIUS + 2, 200, 200] }), + jsxRuntimeExports.jsx('meshStandardMaterial', { alphaMap: st, map: st, transparent: !0 }), + ], + }), + jsxRuntimeExports.jsxs('mesh', { + children: [ + jsxRuntimeExports.jsx('sphereGeometry', { args: [EARTH_RADIUS * 4, 200, 200] }), + jsxRuntimeExports.jsx('meshStandardMaterial', { + map: at, + opacity: 0.4, + side: DoubleSide, + transparent: !0, + }), + ], + }), + jsxRuntimeExports.jsx('directionalLight', { + ref: et, + intensity: 0.9, + position: [0, 0, EARTH_RADIUS * 3], + }), + it == null + ? void 0 + : it.links.map((lt, ct) => jsxRuntimeExports.jsx(CurvedLine, { link: lt }, `curved-${ct}`)), + ], + }) + ) + }, + EarthMaterial = () => { + const tt = useTexture('textures/earth/earth.jpeg'), + et = useTexture('textures/earth/bump.jpeg'), + nt = useTexture('textures/earth/water.png'), + rt = reactExports.useMemo( + () => + new MeshStandardMaterial({ + map: tt, + bumpMap: et, + aoMap: et, + roughnessMap: et, + metalnessMap: nt, + toneMapped: !0, + roughness: 35, + metalness: 0, + }), + [tt, et, nt], + ) + return jsxRuntimeExports.jsx('meshStandardMaterial', { ...rt }) + }, + particleCount = 2e3, + radiusLimit = UNIVERSE_SCALE * 4, + colorsArray = Object.values(DATA_COLOR_PALETTE).map((tt) => tt), + Particles = () => { + const tt = reactExports.useRef(null) + useFrame(() => { + var at, st, lt + const it = ((at = tt.current) == null ? void 0 : at.geometry.getAttribute('position')).array, + ot = ((st = tt.current) == null ? void 0 : st.geometry.getAttribute('velocity')).array + if (it && ot) { + for (let ct = 0; ct < it.length; ct += 3) { + const ut = it[ct], + ht = it[ct + 1], + dt = it[ct + 2], + pt = ot[ct], + mt = ot[ct + 1], + gt = ot[ct + 2] + ;(it[ct] += pt), (it[ct + 1] += mt), (it[ct + 2] += gt) + const yt = Math.sqrt(ut * ut + ht * ht + dt * dt) + if (yt * yt > radiusLimit * radiusLimit) { + const vt = Math.random() * Math.PI * 2, + xt = Math.random() * Math.PI * 2, + kt = Math.random() * radiusLimit + ;(it[ct] = Math.sin(vt) * Math.cos(xt) * kt), + (it[ct + 1] = Math.sin(vt) * Math.sin(xt) * kt), + (it[ct + 2] = Math.cos(vt) * kt) + } + } + ;((lt = tt.current) == null ? void 0 : lt.geometry.getAttribute('position')).needsUpdate = !0 + } + }) + const et = reactExports.useMemo(() => new Float32Array(particleCount * 3), []), + nt = reactExports.useMemo(() => new Float32Array(particleCount * 3), []) + reactExports.useEffect(() => { + const it = radiusLimit + for (let ot = 0; ot < particleCount; ot += 1) { + const at = ot * 3, + st = Math.acos(1 - (ot / particleCount) * 2), + lt = (Math.PI * 2 * ot) / particleCount + ;(et[at] = Math.sin(st) * Math.cos(lt) * it), + (et[at + 1] = Math.sin(st) * Math.sin(lt) * it), + (et[at + 2] = Math.cos(st) * it), + (nt[at] = Math.random() - 0.5), + (nt[at + 1] = Math.random() - 0.5), + (nt[at + 2] = Math.random() - 0.5) + } + }, [et, nt]) + const rt = reactExports.useRef(null) + return ( + reactExports.useEffect(() => { + rt.current && + tt.current && + (rt.current.setAttribute('position', new BufferAttribute(et, 3)), + rt.current.setAttribute('velocity', new BufferAttribute(nt, 3)), + (tt.current.geometry = rt.current)) + }, [et, nt]), + reactExports.useEffect(() => { + if (rt.current) { + const it = [] + for (let ot = 0; ot < particleCount; ot += 1) { + const at = Math.floor(Math.random() * colorsArray.length), + st = colorsArray[at], + lt = new Color$1(st) + lt.multiplyScalar(2), it.push(lt.r, lt.g, lt.b) + } + rt.current.setAttribute('color', new BufferAttribute(new Float32Array(it), 3)) + } + }, []), + jsxRuntimeExports.jsxs('points', { + ref: tt, + frustumCulled: !1, + children: [ + jsxRuntimeExports.jsx('bufferGeometry', { ref: rt }), + jsxRuntimeExports.jsx('pointsMaterial', { opacity: 0.8, size: 4, transparent: !0, vertexColors: !0 }), + ], + }) + ) + }, + buttonColors = (tt) => ({ + close: { backgroundColor: 'rgba(48, 51, 66, 1)', borderColor: '#fff', fontColor: 'rgba(255, 255, 255, 1)' }, + focus: { + backgroundColor: tt ? 'rgba(255, 255, 255, 0.90);' : 'rgba(255, 255, 255, 0.90)', + borderColor: tt ? '#FFDB58bb' : '#fff', + fontColor: 'rgba(48, 51, 66, 1)', + }, + menu: { + backgroundColor: '#00000066', + borderColor: tt ? '#ffffff66' : '#5078f2', + fontColor: tt ? '#ffffff66' : '#fff', + }, + }), + reuseableVector3 = new Vector3(), + NodeControls = reactExports.memo(() => { + const tt = reactExports.useRef(null), + et = useAppStore((ut) => ut.setSidebarOpen), + nt = useDataStore((ut) => ut.showSelectionGraph), + rt = useDataStore((ut) => ut.selectionGraphData), + it = useDataStore((ut) => ut.data), + ot = useSelectedNode(), + at = useDataStore((ut) => ut.setSelectedNode), + st = useDataStore((ut) => ut.setShowSelectionGraph) + useFrame(() => { + lt() + }) + const lt = reactExports.useCallback(() => { + const ut = nt ? rt : it + if (tt.current) { + const ht = ut == null ? void 0 : ut.nodes.find((dt) => dt.ref_id === (ot == null ? void 0 : ot.ref_id)) + if (ht) { + const dt = reuseableVector3.set( + ht == null ? void 0 : ht.x, + ht == null ? void 0 : ht.y, + ht == null ? void 0 : ht.z, + ) + tt.current.position.copy(dt) + } + } + }, [ot, nt, rt, it]), + ct = reactExports.useMemo( + () => [ + { + key: 'control-key-1', + colors: buttonColors(nt).focus, + icon: jsxRuntimeExports.jsx(MdViewInAr, {}), + left: 10, + className: 'expand', + onClick: () => { + const ut = !nt + st(ut), ut && et(!0) + }, + }, + { + key: 'control-key-2', + colors: buttonColors(!0).close, + icon: jsxRuntimeExports.jsx(MdClose, {}), + left: 40, + className: 'exit', + onClick: () => { + at(null), st(!1) + }, + }, + ], + [st, at, et, nt], + ) + return ot + ? jsxRuntimeExports.jsx('group', { + ref: tt, + children: jsxRuntimeExports.jsx(Html$1, { + center: !0, + className: 'control-panel', + onClick: (ut) => ut.stopPropagation(), + onKeyDown: (ut) => ut.stopPropagation(), + onPointerDown: (ut) => ut.stopPropagation(), + onPointerOut: (ut) => ut.stopPropagation(), + onPointerOver: (ut) => ut.stopPropagation(), + onPointerUp: (ut) => ut.stopPropagation(), + sprite: !0, + zIndexRange: [16777271, 16777272], + children: ct.map((ut) => + jsxRuntimeExports.jsx( + IconButton, + { + backgroundColor: ut.colors.backgroundColor, + borderColor: ut.colors.borderColor, + className: ut.className, + fontColor: ut.colors.fontColor, + left: ut.left, + onClick: (ht) => { + ht.stopPropagation(), ut.onClick() + }, + children: ut.icon, + }, + ut.key, + ), + ), + }), + }) + : null + }) + NodeControls.displayName = 'NodeControls' + const IconButton = styled$4.div` + position: fixed; + top: -60px; + left: ${(tt) => -7 + tt.left}px; + width: 24px; + height: 24px; + + border-radius: 40px; + display: flex; + justify-content: center; + align-items: center; + background: ${(tt) => (tt.backgroundColor ? tt.backgroundColor : '#000000bb')}; + color: ${(tt) => (tt.fontColor ? tt.fontColor : '#ffffff')}; + border-radius: 100%; + font-size: 16px; + cursor: pointer; + transition: opacity 0.4s; + box-shadow: 0px 2px 12px rgba(0, 0, 0, 0.5); +`, + NodeDetailsPanel = reactExports.memo(() => + jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: jsxRuntimeExports.jsx(NodeControls, {}) }), + ) + NodeDetailsPanel.displayName = 'NodeDetailsPanel' + const Graph = () => { + const tt = useGraphData(), + et = useDataStore((ot) => ot.isFetching), + nt = useDataStore((ot) => ot.graphStyle), + rt = useDataStore((ot) => ot.showSelectionGraph), + it = reactExports.useMemo(() => (rt ? 0 : nt === 'force' ? 0.2 : 0.4), [rt, nt]) + return et + ? null + : jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { + children: [ + jsxRuntimeExports.jsx(Cubes, {}), + jsxRuntimeExports.jsx(Earth, {}), + jsxRuntimeExports.jsx(Particles, {}), + nt !== 'earth' && + jsxRuntimeExports.jsx( + Segments, + { + fog: !0, + limit: tt.links.length, + lineWidth: it, + children: tt.links.map((ot, at) => jsxRuntimeExports.jsx(Segment, { link: ot }, at.toString())), + }, + `links-${tt.links.length}-${nt}`, + ), + jsxRuntimeExports.jsx(NodeDetailsPanel, {}), + ], + }) + }, + Lights = () => { + const { fogColor: tt } = useControls('universe', { fogColor: GRAPH_FOG_COLOR }), + et = useDataStore((ot) => ot.graphStyle), + nt = reactExports.useRef(null), + rt = reactExports.useRef(null), + it = reactExports.useRef(null) + return ( + useFrame(({ camera: ot, clock: at }) => { + const st = at.getElapsedTime() + if (nt.current) { + const ct = Math.sin(st / 8) * 1e3 + nt.current.position.setZ(ct) + } + if ((rt.current && rt.current.position.lerp(ot.position, 0.5), it.current)) { + const lt = st * 0.5, + ct = Math.sin(lt) * UNIVERSE_SCALE, + ut = Math.cos(lt) * UNIVERSE_SCALE + it.current.position.set(ct, 0, ut) + } + }), + jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { + children: [ + jsxRuntimeExports.jsx('hemisphereLight', { + args: [colors.white, GRAPH_GROUND_COLOR, GRAPH_LIGHT_INTENSITY], + }), + et !== 'earth' && jsxRuntimeExports.jsx('fog', { args: [tt, 5, 18e3], attach: 'fog' }), + jsxRuntimeExports.jsx('ambientLight', { color: colors.white, intensity: 1 }), + jsxRuntimeExports.jsx('pointLight', { + ref: rt, + color: colors.white, + distance: 4e3, + intensity: 5, + position: [0, 0, 0], + }), + jsxRuntimeExports.jsx('directionalLight', { + ref: it, + color: colors.white, + intensity: 8, + position: [UNIVERSE_SCALE, 0, 0], + }), + jsxRuntimeExports.jsx('pointLight', { + ref: nt, + color: colors.white, + distance: 4e3, + intensity: 8, + position: [0, 0, 0], + }), + ], + }) + ) + } + function formatDescription(tt) { + return tt ? tt.replace(/[[]{2}/g, '').replace(/[\]]{2}/g, '') : '' + } + var loadjs_umd = { exports: {} } + ;(function (tt, et) { + ;(function (nt, rt) { + tt.exports = rt() + })(commonjsGlobal, function () { + var nt = function () {}, + rt = {}, + it = {}, + ot = {} + function at(dt, pt) { + dt = dt.push ? dt : [dt] + var mt = [], + gt = dt.length, + yt = gt, + bt, + vt, + xt, + kt + for ( + bt = function (St, Tt) { + Tt.length && mt.push(St), yt--, yt || pt(mt) + }; + gt--; + + ) { + if (((vt = dt[gt]), (xt = it[vt]), xt)) { + bt(vt, xt) + continue + } + ;(kt = ot[vt] = ot[vt] || []), kt.push(bt) + } + } + function st(dt, pt) { + if (dt) { + var mt = ot[dt] + if (((it[dt] = pt), !!mt)) for (; mt.length; ) mt[0](dt, pt), mt.splice(0, 1) + } + } + function lt(dt, pt) { + dt.call && (dt = { success: dt }), pt.length ? (dt.error || nt)(pt) : (dt.success || nt)(dt) + } + function ct(dt, pt, mt, gt) { + var yt = document, + bt = mt.async, + vt = (mt.numRetries || 0) + 1, + xt = mt.before || nt, + kt = dt.replace(/[\?|#].*$/, ''), + St = dt.replace(/^(css|img)!/, ''), + Tt, + At + ;(gt = gt || 0), + /(^css!|\.css$)/.test(kt) + ? ((At = yt.createElement('link')), + (At.rel = 'stylesheet'), + (At.href = St), + (Tt = 'hideFocus' in At), + Tt && At.relList && ((Tt = 0), (At.rel = 'preload'), (At.as = 'style'))) + : /(^img!|\.(png|gif|jpg|svg|webp)$)/.test(kt) + ? ((At = yt.createElement('img')), (At.src = St)) + : ((At = yt.createElement('script')), (At.src = dt), (At.async = bt === void 0 ? !0 : bt)), + (At.onload = + At.onerror = + At.onbeforeload = + function (Et) { + var $t = Et.type[0] + if (Tt) + try { + At.sheet.cssText.length || ($t = 'e') + } catch (Dt) { + Dt.code != 18 && ($t = 'e') + } + if ($t == 'e') { + if (((gt += 1), gt < vt)) return ct(dt, pt, mt, gt) + } else if (At.rel == 'preload' && At.as == 'style') return (At.rel = 'stylesheet') + pt(dt, $t, Et.defaultPrevented) + }), + xt(dt, At) !== !1 && yt.head.appendChild(At) + } + function ut(dt, pt, mt) { + dt = dt.push ? dt : [dt] + var gt = dt.length, + yt = gt, + bt = [], + vt, + xt + for ( + vt = function (kt, St, Tt) { + if ((St == 'e' && bt.push(kt), St == 'b')) + if (Tt) bt.push(kt) + else return + gt--, gt || pt(bt) + }, + xt = 0; + xt < yt; + xt++ + ) + ct(dt[xt], vt, mt) + } + function ht(dt, pt, mt) { + var gt, yt + if ((pt && pt.trim && (gt = pt), (yt = (gt ? mt : pt) || {}), gt)) { + if (gt in rt) throw 'LoadJS' + rt[gt] = !0 + } + function bt(vt, xt) { + ut( + dt, + function (kt) { + lt(yt, kt), vt && lt({ success: vt, error: xt }, kt), st(gt, kt) + }, + yt, + ) + } + if (yt.returnPromise) return new Promise(bt) + bt() + } + return ( + (ht.ready = function (pt, mt) { + return ( + at(pt, function (gt) { + lt(mt, gt) + }), + ht + ) + }), + (ht.done = function (pt) { + st(pt, []) + }), + (ht.reset = function () { + ;(rt = {}), (it = {}), (ot = {}) + }), + (ht.isDefined = function (pt) { + return pt in rt + }), + ht + ) + }) + })(loadjs_umd) + var loadjs_umdExports = loadjs_umd.exports + const loadjs = getDefaultExportFromCjs(loadjs_umdExports) + var twScriptUrl = 'https://platform.twitter.com/widgets.js', + twScriptWindowFieldName = 'twttr', + twScriptName = twScriptWindowFieldName, + canUseDOM = !!(typeof window < 'u' && window.document && window.document.createElement) + function loadTwitterLibrary() { + loadjs.isDefined(twScriptName) || loadjs(twScriptUrl, twScriptName) + } + function twWidgetFactory() { + return new Promise(function (tt, et) { + var nt = function () { + return et(new Error('Could not load remote twitter widgets js')) + } + loadTwitterLibrary(), + loadjs.ready(twScriptName, { + success: function () { + var it = window[twScriptWindowFieldName] + ;(!it || !it.widgets) && nt(), tt(it.widgets) + }, + error: nt, + }) + }) + } + function removeChildrenWithAttribute(tt, et) { + tt && + tt.querySelectorAll('*').forEach(function (nt) { + nt.hasAttribute(et) && nt.remove() + }) + } + function is(tt, et) { + return tt === et ? tt !== 0 || et !== 0 || 1 / tt === 1 / et : tt !== tt && et !== et + } + function isShallowEqual(tt, et) { + if (is(tt, et)) return !0 + if (typeof tt != 'object' || tt === null || typeof et != 'object' || et === null) return !1 + var nt = Object.keys(tt), + rt = Object.keys(et) + if (nt.length !== rt.length) return !1 + for (var it = 0; it < nt.length; it++) + if (!Object.prototype.hasOwnProperty.call(et, nt[it]) || !is(tt[nt[it]], et[nt[it]])) return !1 + return !0 + } + function useShallowCompareMemoize(tt) { + var et = reactExports.useRef() + return isShallowEqual(tt, et.current) || (et.current = tt), et.current + } + function cloneShallow(tt) { + return typeof tt == 'object' ? Object.assign({}, tt) : tt + } + var childDivIdentifyingAttribute = 'twdiv' + function useTwitterWidget(tt, et, nt, rt) { + var it = reactExports.useState(null), + ot = it[0], + at = it[1], + st = reactExports.useRef(null) + if (!canUseDOM) return { ref: st, error: ot } + var lt = [tt, useShallowCompareMemoize(et), useShallowCompareMemoize(nt)] + return ( + reactExports.useEffect(function () { + at(null) + var ct = !1 + if (st.current) { + if ((removeChildrenWithAttribute(st.current, childDivIdentifyingAttribute), !st || !st.current)) return + var ut = document.createElement('div') + ut.setAttribute(childDivIdentifyingAttribute, 'yes'), + st.current.appendChild(ut), + twWidgetFactory() + .then(function (ht) { + return ht[tt](cloneShallow(et), ut, cloneShallow(nt)) + }) + .then(function (ht) { + if (!ht && !ct) + throw new Error( + 'Twitter could not create widget. If it is a Timeline or Tweet, ensure the screenName/tweetId exists.', + ) + if (!(!st || !st.current)) { + if (ct) { + ut && ut.remove() + return + } + rt && rt() + } + }) + .catch(function (ht) { + console.error(ht), at(ht) + }) + } + return function () { + ct = !0 + } + }, lt), + { ref: st, error: ot } + ) + } + var Tweet = function (et) { + var nt = et.tweetId, + rt = et.options, + it = et.onLoad, + ot = et.renderError, + at = useTwitterWidget('createTweet', nt, rt, it), + st = at.ref, + lt = at.error + return React$1.createElement('div', { ref: st }, lt && ot && ot(lt)) + } + const TwitData$1 = ({ twitterHandle: tt, tweetId: et }) => { + const [nt, rt] = reactExports.useState(!0) + return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { + children: [ + jsxRuntimeExports.jsx(Flex, { + direction: 'row', + children: jsxRuntimeExports.jsx(Flex, { + align: 'flex-start', + pb: 12, + children: jsxRuntimeExports.jsxs(Text$3, { children: ['Tweet by @', tt] }), + }), + }), + jsxRuntimeExports.jsxs(Flex, { + direction: 'column', + py: 16, + children: [ + nt && + jsxRuntimeExports.jsx(Flex, { + align: 'center', + direction: 'row', + justify: 'center', + p: 10, + children: jsxRuntimeExports.jsx(ClipLoader$2, { color: colors.white }), + }), + et && + jsxRuntimeExports.jsx(Tweet, { + onLoad: () => rt(!1), + renderError: () => jsxRuntimeExports.jsx(Error$1, {}), + tweetId: et, + }), + ], + }), + ], + }) + }, + Error$1 = () => jsxRuntimeExports.jsx(Flex, { children: 'Error occurred' }), + Wrapper$n = styled$4(Flex)(({ theme: tt }) => ({ + position: 'absolute', + top: '20px', + right: '20px', + width: '300px', + pointerEvents: 'none', + background: colors.dashboardHeader, + boxShadow: '0px 1px 6px rgba(0, 0, 0, 0.1)', + color: colors.primaryText1, + zIndex: 100, + transition: 'opacity 0.6s', + padding: tt.spacing(2, 3), + [tt.breakpoints.down('sm')]: { padding: tt.spacing(1, 1.5) }, + })), + Divider$1 = styled$4(Flex)` + width: 22.5%; +`, + Tooltip$1 = ({ node: tt }) => { + if (!tt) return null + const { + node_type: et, + show_title: nt, + episode_title: rt, + description: it, + label: ot, + text: at, + timestamp: st, + type: lt, + tweet_id: ct, + twitter_handle: ut, + } = tt, + ht = tt.guests + let dt = !1, + pt = !1 + ht && (ht.length && ht[0] !== null && (dt = !0), typeof ht[0] == 'object' && (pt = !0)) + let mt = tt.image_url + if ((lt === 'twitter_space' && (mt = 'twitter_placeholder.png'), mt == null)) + switch (et) { + case 'guest': + mt = 'person_placeholder2.png' + break + default: + mt = 'noimage.jpeg' + } + return jsxRuntimeExports.jsx(Wrapper$n, { + borderRadius: 8, + px: 24, + py: 16, + children: + et === 'tweet' + ? jsxRuntimeExports.jsx(TwitData$1, { tweetId: ct, twitterHandle: ut }) + : jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { + children: [ + jsxRuntimeExports.jsxs(Flex, { + direction: 'row', + children: [ + jsxRuntimeExports.jsx(Divider$1, {}), + jsxRuntimeExports.jsx(Flex, { + align: 'flex-start', + pb: 12, + children: jsxRuntimeExports.jsx(Text$3, { children: et == null ? void 0 : et.toUpperCase() }), + }), + ], + }), + jsxRuntimeExports.jsxs(Flex, { + direction: 'row', + children: [ + jsxRuntimeExports.jsx(Flex, { + pr: 12, + children: jsxRuntimeExports.jsx(Avatar$1, { src: mt, type: 'person' }), + }), + jsxRuntimeExports.jsxs('div', { + children: [ + lt === 'guest' + ? jsxRuntimeExports.jsxs(Flex, { + direction: 'column', + children: [ + jsxRuntimeExports.jsx(Text$3, { children: ot }), + at && + jsxRuntimeExports.jsx(Flex, { + pt: 4, + children: jsxRuntimeExports.jsxs(Text$3, { + color: 'primaryText1', + kind: 'tiny', + children: ['@', at], + }), + }), + ], + }) + : jsxRuntimeExports.jsx(Text$3, { color: 'primaryText1', kind: 'tiny', children: nt }), + jsxRuntimeExports.jsxs(Flex, { + pt: 4, + children: [ + et === 'clip' || + (et === 'episode' && + jsxRuntimeExports.jsx(Text$3, { color: 'primaryText1', children: 'Episode' })), + et === 'clip' + ? jsxRuntimeExports.jsx(Text$3, { + as: 'div', + kind: 'regularBold', + children: formatDescription(it), + }) + : jsxRuntimeExports.jsx(Text$3, { color: 'primaryText1', kind: 'tiny', children: rt }), + ], + }), + jsxRuntimeExports.jsx(Text$3, { color: 'primaryText1', kind: 'tiny', children: st }), + jsxRuntimeExports.jsxs(Flex, { + pt: 12, + children: [ + et === 'clip' && + jsxRuntimeExports.jsx(Text$3, { color: 'primaryText1', children: 'Episode' }), + jsxRuntimeExports.jsx(Text$3, { + color: 'primaryText1', + kind: 'tiny', + children: et === 'clip' ? rt : formatDescription(it), + }), + ], + }), + dt && + jsxRuntimeExports.jsxs(Flex, { + pt: 12, + children: [ + jsxRuntimeExports.jsx(Text$3, { color: 'primaryText1', children: 'People' }), + jsxRuntimeExports.jsx(Flex, { + pt: 4, + children: jsxRuntimeExports.jsx(Text$3, { + color: 'primaryText1', + kind: 'tiny', + children: pt + ? ht.map((gt) => (gt.name ? gt.name : `@${gt.twitter_handle}`)).join(', ') + : ht == null + ? void 0 + : ht.join(', '), + }), + }), + ], + }), + ], + }), + ], + }), + ], + }), + }) + }, + Overlay = () => { + const [tt, et, nt, rt] = useDataStore((ot) => [ + ot.selectedNode, + ot.hoveredNode, + ot.cameraFocusTrigger, + ot.setCameraFocusTrigger, + ]), + it = useControlStore((ot) => ot.userMovedCamera) + return ( + reactExports.useEffect(() => { + document.body.style.cursor = et ? 'pointer' : 'auto' + }, [et]), + jsxRuntimeExports.jsxs(OverlayWrap, { + children: [ + !!tt && + it && + jsxRuntimeExports.jsx(Button, { + background: 'bluePressState', + kind: 'small', + onClick: () => rt(!nt), + children: 'Re-center map', + }), + et && + jsxRuntimeExports.jsx('div', { + id: 'tooltip-portal', + children: jsxRuntimeExports.jsx(Tooltip$1, { node: et }), + }), + ], + }) + ) + }, + OverlayWrap = styled$4('div')(({ theme: tt }) => ({ + position: 'absolute', + zIndex: 1, + top: 0, + left: 0, + userSelect: 'none', + pointerEvents: 'none', + display: 'flex', + justifyContent: 'flex-end', + alignItems: 'flex-start', + height: '100%', + width: '100%', + padding: '16px', + [tt.breakpoints.down('sm')]: { top: 50 }, + })), + Preloader = ({ fullSize: tt = !0 }) => { + const et = useAppStore((nt) => nt.sidebarIsOpen) + return jsxRuntimeExports.jsx(Loader, { + align: 'center', + className: clsx$1({ 'sidebar-is-open': et && !tt }), + justify: 'center', + children: jsxRuntimeExports.jsx(ClipLoader$2, { color: colors.SECONDARY_BLUE, size: 64 }), + }) + }, + Loader = styled$4(Flex)` + position: absolute; + left: 0; + right: 0; + bottom: 0; + top: 0; + background-color: ${colors.black}; + z-index: 1; +`, + Fallback = () => jsxRuntimeExports.jsx(Html$1, { children: jsxRuntimeExports.jsx(Loader$1, {}) }), + Content$1 = () => { + const { universeColor: tt } = useControls('universe', { universeColor: colors.black }), + et = useSelectedNode(), + nt = reactExports.useMemo( + () => (et != null && et.node_type ? getNodeColorByType(et.node_type) : outlineEffectColor), + [et], + ) + return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { + children: [ + jsxRuntimeExports.jsx('color', { args: [tt], attach: 'background' }), + jsxRuntimeExports.jsx(Lights, {}), + jsxRuntimeExports.jsx(Controls, {}), + jsxRuntimeExports.jsxs(Selection$2, { + children: [ + jsxRuntimeExports.jsxs(EffectComposer, { + autoClear: !1, + multisampling: 8, + children: [ + jsxRuntimeExports.jsx(Vignette, { darkness: 0.7, eskil: !1, offset: 0.05 }), + jsxRuntimeExports.jsx(Bloom, { + luminanceThreshold: 1, + mipmapBlur: !0, + resolutionX: Resolution.AUTO_SIZE, + resolutionY: Resolution.AUTO_SIZE, + }), + jsxRuntimeExports.jsx(Outline, { + blendFunction: BlendFunction.SCREEN, + blur: !0, + edgeStrength: 4, + hiddenEdgeColor: nt, + visibleEdgeColor: nt, + }), + ], + }), + jsxRuntimeExports.jsx(Graph, {}), + ], + }), + ], + }) + } + let wheelEventTimeout = null + const cameraProps = { + aspect: window.innerWidth / window.innerHeight, + far: 3e4, + near: 1, + position: [initialCameraPosition.x, initialCameraPosition.y, initialCameraPosition.z], + }, + _Universe = () => { + const [tt, et, nt] = [ + useControlStore((at) => at.setIsUserScrollingOnHtmlPanel), + useControlStore((at) => at.setIsUserScrolling), + useControlStore((at) => at.setUserMovedCamera), + ], + rt = useDataStore((at) => at.isFetching), + it = reactExports.useCallback( + (at) => { + var ct + const { target: st } = at, + { offsetParent: lt } = st + wheelEventTimeout && clearTimeout(wheelEventTimeout), + (ct = lt == null ? void 0 : lt.classList) != null && + ct.contains('html-panel') && + lt.clientHeight < lt.scrollHeight && + tt(!0), + et(!0), + nt(!0), + (wheelEventTimeout = setTimeout(() => { + et(!1), tt(!1) + }, 200)) + }, + [et, tt, nt], + ), + ot = reactExports.useCallback((at) => addToGlobalForE2e(at, 'threeState'), []) + return jsxRuntimeExports.jsxs(Wrapper$m, { + children: [ + jsxRuntimeExports.jsx(Overlay, {}), + jsxRuntimeExports.jsx(reactExports.Suspense, { + fallback: null, + children: jsxRuntimeExports.jsxs(Canvas$1, { + camera: cameraProps, + id: 'universe-canvas', + onCreated: ot, + onWheel: it, + children: [ + isDevelopment && jsxRuntimeExports.jsx(Perf, { position: 'top-right' }), + jsxRuntimeExports.jsxs(reactExports.Suspense, { + fallback: jsxRuntimeExports.jsx(Fallback, {}), + children: [ + jsxRuntimeExports.jsx(Preload, {}), + jsxRuntimeExports.jsx(AdaptiveDpr, {}), + jsxRuntimeExports.jsx(AdaptiveEvents, {}), + jsxRuntimeExports.jsx(Content$1, {}), + ], + }), + ], + }), + }), + rt && jsxRuntimeExports.jsx(Preloader, { fullSize: !1 }), + ], + }) + }, + Wrapper$m = styled$4(Flex)` + flex: 1 1 100%; + position: relative; +`, + Universe = reactExports.memo(_Universe), + defaultData$3 = { + askedQuestions: null, + askedQuestionsAnswers: null, + hasQuestionInProgress: !1, + hasTeachingInProgress: !1, + hasInstagraphInProgress: !1, + teachMeAnswer: null, + instgraphAnswser: null, + }, + useTeachStore = react((tt) => ({ + ...defaultData$3, + setAskedQuestion: (et) => + tt((nt) => ({ askedQuestions: [...(nt.askedQuestions || []), et], hasQuestionInProgress: !0 })), + setAskedQuestionAnswer: (et) => + tt((nt) => ({ askedQuestionsAnswers: [...(nt.askedQuestionsAnswers || []), et], hasQuestionInProgress: !1 })), + setHasQuestionInProgress: (et) => tt({ hasQuestionInProgress: et }), + setHasTeachingInProgress: (et) => tt({ hasTeachingInProgress: et }), + setHasInstagraphInProgress: (et) => tt({ hasInstagraphInProgress: et }), + setTeachMeAnswer: (et) => tt({ hasTeachingInProgress: !1, teachMeAnswer: et }), + setInstagraphAnswer: (et) => { + var nt, rt, it, ot + ;(nt = et == null ? void 0 : et.instagraph) != null && + nt.edges && + (rt = et == null ? void 0 : et.instagraph) != null && + rt.nodes && + tt({ + hasInstagraphInProgress: !1, + instgraphAnswser: { + edges: (it = et == null ? void 0 : et.instagraph) == null ? void 0 : it.edges, + nodes: (ot = et == null ? void 0 : et.instagraph) == null ? void 0 : ot.nodes, + }, + }) + }, + })), + version = '0.1.86', + StyledTableCell = styled$4(TableCell$1)` + && { + color: ${colors.white}; + border: none; + padding: 6px 27px 6px 0; + color: ${colors.GRAY3}; + font-family: Barlow; + font-size: 14px; + font-style: normal; + font-weight: 500; + line-height: 24px; + } + + &.empty { + width: 36px; + padding: 0; + } +`, + StyledTableRow = styled$4(TableRow$1)` + && { + height: 48px; + padding: 0 36px; + } + &:nth-child(odd) { + background-color: ${colors.BG3}; + } +`, + StyledTableHead = styled$4(TableHead$1)` + && { + border-bottom: 1px solid ${colors.black}; + } + + ${StyledTableCell} { + color: ${colors.white}; + font-family: Barlow; + font-size: 11px; + font-style: normal; + font-weight: 700; + line-height: 18px; /* 163.636% */ + letter-spacing: 1.1px; + text-transform: uppercase; + } +`, + StyledPill = styled$4(Button$2)` + &.selected { + background: ${colors.white}; + color: ${colors.BG1}; + pointer-events: none; + } + + & + & { + margin-left: 16px; + } +`, + Heading$4 = styled$4(Flex)` + margin-bottom: 26px; + padding: 0 36px; + ${Text$3} { + margin-bottom: 0; + } +`, + sourcesMapper = { + [GITHUB_REPOSITORY]: 'Github repository', + [RSS]: 'RSS link', + [TOPIC]: 'Topic', + [TWITTER_HANDLE]: 'Twitter Handle', + [YOUTUBE_CHANNEL]: 'Youtube channel', + }, + TWITTER_LINK = 'https://twitter.com', + ConfirmPopover = ({ + message: tt = 'Are you sure you want to delete this item?', + onConfirm: et, + children: nt, + anchorOrigin: rt = { vertical: 'bottom', horizontal: 'center' }, + transformOrigin: it = { vertical: 'top', horizontal: 'center' }, + }) => { + const [ot, at] = reactExports.useState(null), + st = (dt) => { + at(dt.currentTarget) + }, + lt = () => { + at(null) + }, + ct = () => { + et(), lt() + }, + ut = () => { + lt() + }, + ht = !!ot + return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { + children: [ + jsxRuntimeExports.jsx('div', { children: React$1.cloneElement(nt, { onClick: st }) }), + jsxRuntimeExports.jsx(Popover$1, { + anchorEl: ot, + anchorOrigin: rt, + onClose: lt, + open: ht, + transformOrigin: it, + children: jsxRuntimeExports.jsxs(Wrapper$l, { + justify: 'space-around', + children: [ + jsxRuntimeExports.jsx(Text$3, { children: tt }), + jsxRuntimeExports.jsxs(Flex, { + align: 'center', + direction: 'row', + justify: 'center', + pt: 8, + children: [ + jsxRuntimeExports.jsx(Button, { kind: 'small', onClick: ct, children: 'Yes' }), + jsxRuntimeExports.jsx(Button, { + className: 'secondary', + kind: 'small', + onClick: ut, + children: 'No', + }), + ], + }), + ], + }), + }), + ], + }) + }, + Wrapper$l = styled$4(Flex)` + background: ${colors.headerBackground}; + color: ${colors.white}; + padding: 16px 8px; + + .secondary { + margin-left: 8px; + background: transparent; + border: 1px solid ${colors.primaryButton}; + } +`, + FilterOffIcon = (tt) => + jsxRuntimeExports.jsx('svg', { + width: '1em', + height: '1em', + viewBox: '0 0 24 24', + fill: 'currentColor', + xmlns: 'http://www.w3.org/2000/svg', + children: jsxRuntimeExports.jsxs('g', { + id: 'filter_alt_off', + children: [ + jsxRuntimeExports.jsx('mask', { + id: 'mask0_1543_23288', + maskUnits: 'userSpaceOnUse', + x: '0', + y: '0', + width: '24', + height: '24', + children: jsxRuntimeExports.jsx('rect', { + id: 'Bounding box', + width: '1em', + height: '1em', + fill: 'currentColor', + }), + }), + jsxRuntimeExports.jsx('g', { + mask: 'url(#mask0_1543_23288)', + children: jsxRuntimeExports.jsx('path', { + id: 'filter_alt_off_2', + d: 'M14.8 11.9748L6.82503 3.9998H19C19.4167 3.9998 19.7167 4.18314 19.9 4.5498C20.0834 4.91647 20.05 5.26647 19.8 5.5998L14.8 11.9748ZM19.775 22.5998L14 16.8248V18.9998C14 19.2831 13.9042 19.5206 13.7125 19.7123C13.5209 19.904 13.2834 19.9998 13 19.9998H11C10.7167 19.9998 10.4792 19.904 10.2875 19.7123C10.0959 19.5206 10 19.2831 10 18.9998V12.8248L1.40002 4.2248L2.80002 2.7998L21.2 21.1998L19.775 22.5998Z', + fill: 'currentColor', + }), + }), + ], + }), + }), + Table$2 = ({ data: tt }) => { + const et = useDataStore((at) => at.setQueuedSources), + [nt, rt] = reactExports.useState(''), + it = async (at) => { + if (tt != null && tt.length) + try { + const st = await distExports$1.enable() + await approveRadarData(at, st.pubkey), et(tt.filter((lt) => lt.ref_id !== at)) + } catch (st) { + console.warn(st) + } + }, + ot = async (at) => { + if (!(!at || !(tt != null && tt.length))) { + rt(at) + try { + await deleteRadarData(at), et(tt == null ? void 0 : tt.filter((st) => st.ref_id !== at)) + } catch (st) { + console.warn(st) + } finally { + rt('') + } + } + } + return tt != null && tt.length + ? jsxRuntimeExports.jsxs(MaterialTable, { + component: 'table', + children: [ + jsxRuntimeExports.jsx(StyledTableHead, { + children: jsxRuntimeExports.jsxs(TableRow$1, { + component: 'tr', + children: [ + jsxRuntimeExports.jsx(StyledTableCell, { className: 'empty' }), + jsxRuntimeExports.jsx(StyledTableCell, { children: 'Type' }), + jsxRuntimeExports.jsx(StyledTableCell, { children: 'Source' }), + jsxRuntimeExports.jsx(StyledTableCell, {}), + jsxRuntimeExports.jsx(StyledTableCell, { className: 'empty' }), + ], + }), + }), + (tt == null ? void 0 : tt.length) && + jsxRuntimeExports.jsx('tbody', { + children: + tt == null + ? void 0 + : tt.map((at) => + jsxRuntimeExports.jsxs( + StyledTableRow, + { + children: [ + jsxRuntimeExports.jsx(StyledTableCell, { className: 'empty' }), + jsxRuntimeExports.jsx(StyledTableCell, { children: sourcesMapper[at.source_type] }), + jsxRuntimeExports.jsx(StyledTableCell, { + width: '268px', + children: + at.source_type === 'twitter_handle' + ? jsxRuntimeExports.jsxs(StyledLink$1, { + href: `${TWITTER_LINK}/${at.source}`, + target: '_blank', + children: ['@', at.source], + }) + : jsxRuntimeExports.jsx('div', { children: at.source }), + }), + jsxRuntimeExports.jsx(StyledTableCell, { + className: 'cell-center', + children: jsxRuntimeExports.jsxs(Flex, { + direction: 'row', + justify: 'space-between', + children: [ + jsxRuntimeExports.jsx('div', { + className: 'approve-wrapper', + children: jsxRuntimeExports.jsx(IconWrapper$4, { + className: 'centered', + onClick: () => it(at.ref_id), + children: jsxRuntimeExports.jsx(MdCheckCircle, { + color: colors.primaryGreen, + fontSize: 24, + }), + }), + }), + jsxRuntimeExports.jsx('div', { + className: 'delete-wrapper', + children: + nt === at.ref_id + ? jsxRuntimeExports.jsx(ClipLoader$2, { color: colors.white, size: 16 }) + : jsxRuntimeExports.jsx(ConfirmPopover, { + message: 'Are you sure ?', + onConfirm: () => ot(at.ref_id), + children: jsxRuntimeExports.jsx(IconWrapper$4, { + className: 'centered', + children: jsxRuntimeExports.jsx(MdCancel, { + color: colors.primaryRed, + fontSize: 24, + }), + }), + }), + }), + ], + }), + }), + jsxRuntimeExports.jsx(StyledTableCell, { className: 'empty' }), + ], + }, + at.source, + ), + ), + }), + ], + }) + : jsxRuntimeExports.jsxs(Flex, { + children: [ + jsxRuntimeExports.jsx(Text$3, { children: 'There is not any results for selected filters' }), + jsxRuntimeExports.jsx(FilterOffIcon, {}), + ], + }) + }, + IconWrapper$4 = styled$4(Flex)` + width: 20px; + height: 20px; + border-radius: 50%; + cursor: pointer; + background: transparent; + color: ${colors.lightBlue500}; + &.centered { + margin: 0 auto; + } + + & + & { + margin-left: 4px; + } +`, + StyledLink$1 = styled$4.a` + color: ${colors.white}; + text-decoration: underline; + &:visited { + color: ${colors.white}; + } +`, + QueuedSources = () => { + const [tt, et] = reactExports.useState(!0), + [nt, rt] = reactExports.useState(''), + [it, ot] = useDataStore((lt) => [lt.queuedSources, lt.setQueuedSources]) + reactExports.useEffect(() => { + ;(async () => { + et(!0) + try { + const ct = await getRadarData({ approved: 'False' }) + ot(ct.data) + } catch (ct) { + console.warn(ct) + } finally { + et(!1) + } + })() + }, [ot]) + const at = (lt) => { + rt(nt === lt || !lt ? '' : lt) + }, + st = it == null ? void 0 : it.filter((lt) => !nt || lt.source_type === nt) + return jsxRuntimeExports.jsxs(Wrapper$k, { + align: 'stretch', + direction: 'column', + justify: 'flex-end', + children: [ + jsxRuntimeExports.jsxs(Heading$4, { + align: 'flex-start', + justify: 'space-between', + children: [ + jsxRuntimeExports.jsx(Text$3, { className: 'title', children: 'Queued Sources' }), + jsxRuntimeExports.jsx(Text$3, { + className: 'subtitle', + children: + 'This is a queue of pending sources waiting for approval or denial from graph users. If you think a source will provide good content for the graph, you can pay to approve it. Think of this as an investment: you pay to add it to the source table, and if the content is popular you will earn from it. If content is not relevant to the graph, you should deny it.', + }), + ], + }), + jsxRuntimeExports.jsxs(Flex, { + className: 'filters', + direction: 'row', + pb: 16, + px: 36, + children: [ + jsxRuntimeExports.jsx(StyledPill, { + className: clsx$1({ selected: !nt }), + onClick: () => at(''), + size: 'small', + children: 'All', + }), + Object.keys(sourcesMapper).map((lt) => + jsxRuntimeExports.jsx( + StyledPill, + { + className: clsx$1({ selected: lt === nt }), + onClick: () => at(lt), + size: 'small', + children: sourcesMapper[lt], + }, + lt, + ), + ), + ], + }), + jsxRuntimeExports.jsx(TableWrapper$2, { + align: 'center', + justify: tt ? 'center' : 'flex-start', + children: tt + ? jsxRuntimeExports.jsx(ClipLoader$2, { color: colors.white }) + : jsxRuntimeExports.jsx(Table$2, { data: st }), + }), + ], + }) + }, + Wrapper$k = styled$4(Flex)` + flex: 1; + + .title { + margin-bottom: 32px; + font-size: 20px; + color: ${colors.white}; + font-family: Barlow; + font-size: 22px; + font-style: normal; + font-weight: 600; + line-height: normal; + } + + .subtitle { + color: ${colors.GRAY3}; + font-family: Barlow; + font-size: 13px; + font-style: normal; + font-weight: 400; + line-height: normal; + } + + & .filters { + overflow-x: auto; + } +`, + TableWrapper$2 = styled$4(Flex)` + min-height: 0; + overflow: auto; + flex: 1; + width: 100%; +`, + ShieldPersonIcon = (tt) => + jsxRuntimeExports.jsx('svg', { + width: '1em', + height: '1em', + viewBox: '0 0 20 20', + fill: 'currentColor', + xmlns: 'http://www.w3.org/2000/svg', + children: jsxRuntimeExports.jsxs('g', { + id: 'shield_person', + children: [ + jsxRuntimeExports.jsx('mask', { + id: 'mask0_1543_22988', + maskUnits: 'userSpaceOnUse', + x: '0', + y: '0', + width: '20', + height: '20', + children: jsxRuntimeExports.jsx('rect', { + id: 'Bounding box', + width: '1em', + height: '1em', + fill: 'currentColor', + }), + }), + jsxRuntimeExports.jsx('g', { + mask: 'url(#mask0_1543_22988)', + children: jsxRuntimeExports.jsx('path', { + id: 'shield_person_2', + d: 'M9.99998 10.6249C10.7521 10.6249 11.3915 10.3616 11.9182 9.83486C12.4449 9.30816 12.7083 8.66875 12.7083 7.91661C12.7083 7.16447 12.4449 6.52505 11.9182 5.99836C11.3915 5.47165 10.7521 5.20829 9.99998 5.20829C9.24784 5.20829 8.60842 5.47165 8.08173 5.99836C7.55502 6.52505 7.29167 7.16447 7.29167 7.91661C7.29167 8.66875 7.55502 9.30816 8.08173 9.83486C8.60842 10.3616 9.24784 10.6249 9.99998 10.6249ZM9.99998 17.9005C8.08973 17.376 6.57051 16.3049 5.44231 14.6874C4.3141 13.0699 3.75 11.2574 3.75 9.24994V4.45509L9.99998 2.11536L16.25 4.45509V9.24994C16.25 11.2574 15.6859 13.0699 14.5576 14.6874C13.4295 16.3049 11.9102 17.376 9.99998 17.9005ZM9.99998 16.5833C10.782 16.3301 11.4823 15.9422 12.1009 15.4198C12.7195 14.8974 13.2569 14.298 13.7131 13.6218C13.1373 13.3269 12.5371 13.1009 11.9126 12.9439C11.2882 12.7868 10.6506 12.7083 9.99998 12.7083C9.34934 12.7083 8.71179 12.7868 8.08733 12.9439C7.46286 13.1009 6.8627 13.3269 6.28685 13.6218C6.74305 14.298 7.28044 14.8974 7.89902 15.4198C8.51762 15.9422 9.21794 16.3301 9.99998 16.5833Z', + fill: 'currentColor', + }), + }), + ], + }), + }), + Table$1 = ({ data: tt, canEdit: et = !1 }) => { + const nt = useDataStore((st) => st.setSources), + [rt, it] = reactExports.useState(''), + ot = async (st, lt) => { + if (tt != null && tt.length) + try { + await putRadarData(st, lt) + const ct = tt == null ? void 0 : tt.findIndex((ht) => ht.ref_id === st), + ut = [...tt] + ;(ut[ct] = { ...ut[ct], source: lt.source }), nt(ut) + } catch (ct) { + console.warn(ct) + } + }, + at = async (st) => { + if (!(!st || !(tt != null && tt.length))) { + it(st) + try { + await deleteRadarData(st), nt(tt == null ? void 0 : tt.filter((lt) => lt.ref_id !== st)) + } catch (lt) { + console.warn(lt) + } finally { + it('') + } + } + } + return tt != null && tt.length + ? jsxRuntimeExports.jsxs(MaterialTable, { + 'aria-label': 'a dense table', + component: 'table', + id: 'sources-table', + size: 'small', + children: [ + jsxRuntimeExports.jsx(StyledTableHead, { + children: jsxRuntimeExports.jsxs(TableRow$1, { + component: 'tr', + children: [ + jsxRuntimeExports.jsx(StyledTableCell, { className: 'empty' }), + jsxRuntimeExports.jsx(StyledTableCell, { children: 'Type' }), + jsxRuntimeExports.jsx(StyledTableCell, { align: 'left', children: 'Source' }), + et && jsxRuntimeExports.jsx(StyledTableCell, { align: 'left' }), + jsxRuntimeExports.jsx(StyledTableCell, { className: 'empty' }), + ], + }), + }), + jsxRuntimeExports.jsx(TableBody$1, { + component: 'tbody', + children: + tt == null + ? void 0 + : tt.map((st) => + jsxRuntimeExports.jsxs( + StyledTableRow, + { + children: [ + jsxRuntimeExports.jsx(StyledTableCell, { className: 'empty' }), + jsxRuntimeExports.jsx(StyledTableCell, { + align: 'left', + children: sourcesMapper[st.source_type], + }), + jsxRuntimeExports.jsx(StyledTableCell, { + align: 'left', + children: jsxRuntimeExports.jsx(ConditionalWrapper, { + condition: et, + wrapper: (lt) => + jsxRuntimeExports.jsx(EditableCell, { + id: st.ref_id, + onSave: (ct) => ot(st.ref_id, { source: ct, source_type: st.source_type }), + value: st.source, + children: lt, + }), + children: + st.source_type === TWITTER_HANDLE || st.source_type === RSS + ? jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { + children: [ + st.source_type === TWITTER_HANDLE && + jsxRuntimeExports.jsxs(StyledLink, { + href: `${TWITTER_LINK}/${st.source}`, + target: '_blank', + children: ['@', st.source], + }), + st.source_type === RSS && + jsxRuntimeExports.jsx(StyledLink, { + href: st.source, + target: '_blank', + children: st.source, + }), + ], + }) + : jsxRuntimeExports.jsx('div', { children: st.source }), + }), + }), + et && + jsxRuntimeExports.jsx(StyledTableCell, { + align: 'left', + children: jsxRuntimeExports.jsx('div', { + className: 'delete-wrapper', + id: `delete-${st.source}`, + children: + rt === st.ref_id + ? jsxRuntimeExports.jsx(ClipLoader$2, { color: colors.white }) + : jsxRuntimeExports.jsx(ConfirmPopover, { + message: 'Are you sure ?', + onConfirm: () => at(st.ref_id), + children: jsxRuntimeExports.jsx(IconWrapper$3, { + className: 'centered', + children: jsxRuntimeExports.jsx(MdDeleteForever, {}), + }), + }), + }), + }), + jsxRuntimeExports.jsx(StyledTableCell, { className: 'empty' }), + ], + }, + st.source, + ), + ), + }), + ], + }) + : jsxRuntimeExports.jsxs(Flex, { + children: [ + jsxRuntimeExports.jsx(Text$3, { children: 'There is not any results for selected filters' }), + jsxRuntimeExports.jsx(FilterOffIcon, {}), + ], + }) + } + function ConditionalWrapper({ condition: tt, wrapper: et, children: nt }) { + return tt ? et(nt) : nt + } + const EditableCell = ({ value: tt, onSave: et, id: nt, children: rt }) => { + const [it, ot] = reactExports.useState(!1), + [at, st] = reactExports.useState(tt), + [lt, ct] = reactExports.useState(!1), + ut = async () => { + if (nt) { + ct(!0) + try { + await et(at), ot(!1) + } catch (ht) { + console.warn(ht) + } finally { + ct(!1) + } + } + } + return jsxRuntimeExports.jsx('div', { + children: it + ? jsxRuntimeExports.jsxs(EditModeCellWrapper, { + direction: 'row', + children: [ + jsxRuntimeExports.jsx(BaseTextInput, { + className: 'editable-cell__input', + name: 'cell-input', + onChange: (ht) => st(ht), + value: at, + }), + jsxRuntimeExports.jsx(IconWrapper$3, { + align: 'center', + justify: 'center', + children: lt + ? jsxRuntimeExports.jsx(ClipLoader$2, {}) + : jsxRuntimeExports.jsx(MdCheck, { onClick: ut }), + }), + jsxRuntimeExports.jsx(IconWrapper$3, { + align: 'center', + className: 'secondary', + justify: 'center', + onClick: () => ot(!1), + children: jsxRuntimeExports.jsx(MdClose, {}), + }), + ], + }) + : jsxRuntimeExports.jsxs(EditableCellWrapper, { + direction: 'row', + children: [ + rt, + jsxRuntimeExports.jsx(IconWrapper$3, { + onClick: () => ot(!0), + children: jsxRuntimeExports.jsx(MdOutlineModeEdit, { size: 20 }), + }), + ], + }), + }) + }, + EditModeCellWrapper = styled$4(Flex)` + display: flex; + width: 250px; + border: 2px solid ${colors.lightBlue300}; + padding: 4px; + height: 28px; + border-radius: 8px; + box-sizing: border-box; + + .editable-cell__input { + flex: 1; + -webkit-text-fill-color: #fff; + padding: 0 4px; + color: #fff; + } +`, + IconWrapper$3 = styled$4(Flex)` + width: 20px; + height: 20px; + border-radius: 50%; + cursor: pointer; + background: transparent; + color: ${colors.lightBlue500}; + &.centered { + margin: 0 auto; + } + + & + & { + margin-left: 4px; + } +`, + EditableCellWrapper = styled$4(Flex)` + display: flex; + padding: 4px; + position: relative; + + ${IconWrapper$3} { + visibility: hidden; + } + + &:hover { + ${IconWrapper$3} { + visibility: visible; + } + } +`, + StyledLink = styled$4.a` + color: ${colors.white}; + text-decoration: underline; + &:visited { + color: ${colors.white}; + } +`, + admins$1 = [ + '02c431e64078b10925584d64824c9d1d12eca05e2c56660ffa5ac84aa6946adfe5', + '03a9a8d953fe747d0dd94dd3c567ddc58451101e987e2d2bf7a4d1e10a2c89ff38', + '024efa31d1e4f98bccc415b222c9d971866013ad6f95f7d1ed9e8be8e3355a36ff', + '03bfe6723c06fb2b7546df1e8ca1a17ae5c504615da32c945425ccbe8d3ca6260d', + '024efa31d1e4f98bccc415b222c9d971866013ad6f95f7d1ed9e8be8e3355a36ff', + ], + Sources = () => { + const [tt, et] = reactExports.useState(!0), + [nt, rt] = reactExports.useState(''), + [it, ot] = useDataStore((gt) => [gt.sources, gt.setSources]), + [at, st, lt, ct] = useUserStore((gt) => [gt.setIsAdmin, gt.isAdmin, gt.setPubKey, gt.pubKey]) + reactExports.useEffect(() => { + ;(async () => { + et(!0) + try { + const yt = await getRadarData() + ot(yt.data) + } catch (yt) { + console.warn(yt) + } finally { + et(!1) + } + })() + }, [ot]) + const ut = (gt) => { + rt(nt === gt || !gt ? '' : gt) + }, + ht = async () => { + await executeIfProd(async () => { + try { + const gt = await distExports$1.enable(), + yt = gt == null ? void 0 : gt.pubkey + lt(yt), yt && at(yt && admins$1.includes(yt)) + } catch (gt) { + console.warn(gt) + } + }) + }, + dt = async () => { + try { + const gt = await triggerRadarJob() + if (gt != null && gt.error) { + toast(jsxRuntimeExports.jsx(ToastMessage, { message: 'An error happened' }), { + icon: !1, + position: toast.POSITION.BOTTOM_CENTER, + type: 'error', + }) + return + } + toast(jsxRuntimeExports.jsx(ToastMessage, { message: 'Job started' }), { + icon: !1, + position: toast.POSITION.BOTTOM_CENTER, + type: 'success', + }) + } catch { + toast(jsxRuntimeExports.jsx(ToastMessage, { message: 'An error happened' }), { + icon: !1, + position: toast.POSITION.BOTTOM_CENTER, + type: 'error', + }) + } + }, + pt = () => + ct + ? ct && st + ? jsxRuntimeExports.jsx(RunButton, { + endIcon: jsxRuntimeExports.jsx(MdRestartAlt, { color: colors.white }), + onClick: dt, + size: 'small', + children: 'Run', + }) + : jsxRuntimeExports.jsx(Text$3, { children: 'You are not admin' }) + : jsxRuntimeExports.jsx(EditButton$1, { + color: 'secondary', + onClick: ht, + size: 'small', + startIcon: jsxRuntimeExports.jsx(ShieldPersonIcon, {}), + variant: 'contained', + children: 'Admin', + }), + mt = it == null ? void 0 : it.filter((gt) => !nt || gt.source_type === nt) + return jsxRuntimeExports.jsxs(Wrapper$j, { + align: 'stretch', + direction: 'column', + justify: 'flex-end', + children: [ + jsxRuntimeExports.jsxs(Heading$4, { + align: 'center', + direction: 'row', + justify: 'space-between', + children: [jsxRuntimeExports.jsx(Text$3, { className: 'title', children: 'Sources for this Graph' }), pt()], + }), + jsxRuntimeExports.jsxs(Flex, { + className: 'filters', + direction: 'row', + pb: 16, + px: 36, + children: [ + jsxRuntimeExports.jsx(StyledPill, { + className: clsx$1({ selected: !nt }), + onClick: () => ut(''), + size: 'small', + children: 'All', + }), + Object.keys(sourcesMapper).map((gt) => + jsxRuntimeExports.jsx( + StyledPill, + { + className: clsx$1({ selected: gt === nt }), + onClick: () => ut(gt), + size: 'small', + children: sourcesMapper[gt], + }, + gt, + ), + ), + ], + }), + jsxRuntimeExports.jsx(TableWrapper$1, { + align: 'center', + justify: tt ? 'center' : 'flex-start', + children: tt + ? jsxRuntimeExports.jsx(ClipLoader$2, { color: colors.white }) + : jsxRuntimeExports.jsx(Table$1, { canEdit: st, data: mt }), + }), + ], + }) + }, + Wrapper$j = styled$4(Flex)` + flex: 1; + .title { + margin-bottom: 16px; + font-size: 20px; + color: ${colors.white}; + font-family: Barlow; + font-size: 22px; + font-style: normal; + font-weight: 600; + line-height: normal; + } + + & .filters { + overflow-x: auto; + } +`, + TableWrapper$1 = styled$4(Flex)` + min-height: 0; + overflow: auto; + flex: 1; + width: 100%; +`, + RunButton = styled$4(Button$2)` + margin-left: 8px; +`, + EditButton$1 = styled$4(Button$2)` + margin-left: auto; +`, + Pill = styled$4(Flex).attrs({ align: 'center', direction: 'row', grow: 0, justify: 'center', shrink: 0 })` + border-radius: 20px; + color: ${colors.primaryText1}; + border: 2px solid ${colors.white}; + cursor: pointer; + font-size: 12px; + font-weight: 500; + line-height: 14px; + margin-right: 10px; + + opacity: ${({ disabled: tt }) => (tt ? '0.7' : '1')}; + + padding: 10px 20px; + +${({ disabled: tt }) => + tt && + Ae` + cursor: none; + opacity: 0.5; + `} + + } + + &:hover { + background: ${({ selected: tt }) => (tt ? colors.gray300 : colors.gray200)}; + } } -#endif -uniform lowp sampler2D noiseTexture;uniform mat4 inverseProjectionMatrix;uniform mat4 projectionMatrix;uniform vec2 texelSize;uniform vec2 cameraNearFar;uniform float intensity;uniform float minRadiusScale;uniform float fade;uniform float bias;uniform vec2 distanceCutoff;uniform vec2 proximityCutoff;varying vec2 vUv;varying vec2 vUv2;float getViewZ(const in float depth){ -#ifdef PERSPECTIVE_CAMERA -return perspectiveDepthToViewZ(depth,cameraNearFar.x,cameraNearFar.y); -#else -return orthographicDepthToViewZ(depth,cameraNearFar.x,cameraNearFar.y); -#endif -}vec3 getViewPosition(const in vec2 screenPosition,const in float depth,const in float viewZ){vec4 clipPosition=vec4(vec3(screenPosition,depth)*2.0-1.0,1.0);float clipW=projectionMatrix[2][3]*viewZ+projectionMatrix[3][3];clipPosition*=clipW;return(inverseProjectionMatrix*clipPosition).xyz;}float getAmbientOcclusion(const in vec3 p,const in vec3 n,const in float depth,const in vec2 uv){float radiusScale=1.0-smoothstep(0.0,distanceCutoff.y,depth);radiusScale=radiusScale*(1.0-minRadiusScale)+minRadiusScale;float radius=RADIUS*radiusScale;float noise=texture2D(noiseTexture,vUv2).r;float baseAngle=noise*PI2;float rings=SPIRAL_TURNS*PI2;float occlusion=0.0;int taps=0;for(int i=0;i1.0||coords.t<0.0||coords.t>1.0){continue;}float sampleDepth=readDepth(coords);float viewZ=getViewZ(sampleDepth); -#ifdef PERSPECTIVE_CAMERA -float linearSampleDepth=viewZToOrthographicDepth(viewZ,cameraNearFar.x,cameraNearFar.y); -#else -float linearSampleDepth=sampleDepth; -#endif -float proximity=abs(depth-linearSampleDepth);if(proximity -}`,convolution_upsampling_default2="uniform vec2 texelSize;varying vec2 vUv;varying vec2 vUv0;varying vec2 vUv1;varying vec2 vUv2;varying vec2 vUv3;varying vec2 vUv4;varying vec2 vUv5;varying vec2 vUv6;varying vec2 vUv7;void main(){vUv=position.xy*0.5+0.5;vUv0=vUv+texelSize*vec2(-1.0,1.0);vUv1=vUv+texelSize*vec2(0.0,1.0);vUv2=vUv+texelSize*vec2(1.0,1.0);vUv3=vUv+texelSize*vec2(-1.0,0.0);vUv4=vUv+texelSize*vec2(1.0,0.0);vUv5=vUv+texelSize*vec2(-1.0,-1.0);vUv6=vUv+texelSize*vec2(0.0,-1.0);vUv7=vUv+texelSize*vec2(1.0,-1.0);gl_Position=vec4(position.xy,1.0,1.0);}",UpsamplingMaterial=class extends ShaderMaterial{constructor(){super({name:"UpsamplingMaterial",uniforms:{inputBuffer:new Uniform(null),supportBuffer:new Uniform(null),texelSize:new Uniform(new Vector2),radius:new Uniform(.85)},blending:NoBlending,toneMapped:!1,depthWrite:!1,depthTest:!1,fragmentShader:convolution_upsampling_default,vertexShader:convolution_upsampling_default2}),this.fragmentShader=updateFragmentShader(this.fragmentShader)}set inputBuffer(tt){this.uniforms.inputBuffer.value=tt}set supportBuffer(tt){this.uniforms.supportBuffer.value=tt}get radius(){return this.uniforms.radius.value}set radius(tt){this.uniforms.radius.value=tt}setSize(tt,et){this.uniforms.texelSize.value.set(1/tt,1/et)}},dummyCamera=new Camera,geometry=null;function getFullscreenTriangle(){if(geometry===null){const tt=new Float32Array([-1,-1,0,3,-1,0,-1,3,0]),et=new Float32Array([0,0,2,0,0,2]);geometry=new BufferGeometry,geometry.setAttribute!==void 0?(geometry.setAttribute("position",new BufferAttribute(tt,3)),geometry.setAttribute("uv",new BufferAttribute(et,2))):(geometry.addAttribute("position",new BufferAttribute(tt,3)),geometry.addAttribute("uv",new BufferAttribute(et,2)))}return geometry}var Pass=class yw{constructor(et="Pass",nt=new Scene,rt=dummyCamera){this.name=et,this.renderer=null,this.scene=nt,this.camera=rt,this.screen=null,this.rtt=!0,this.needsSwap=!0,this.needsDepthTexture=!1,this.enabled=!0}get renderToScreen(){return!this.rtt}set renderToScreen(et){if(this.rtt===et){const nt=this.fullscreenMaterial;nt!==null&&(nt.needsUpdate=!0),this.rtt=!et}}set mainScene(et){}set mainCamera(et){}setRenderer(et){this.renderer=et}isEnabled(){return this.enabled}setEnabled(et){this.enabled=et}get fullscreenMaterial(){return this.screen!==null?this.screen.material:null}set fullscreenMaterial(et){let nt=this.screen;nt!==null?nt.material=et:(nt=new Mesh(getFullscreenTriangle(),et),nt.frustumCulled=!1,this.scene===null&&(this.scene=new Scene),this.scene.add(nt),this.screen=nt)}getFullscreenMaterial(){return this.fullscreenMaterial}setFullscreenMaterial(et){this.fullscreenMaterial=et}getDepthTexture(){return null}setDepthTexture(et,nt=BasicDepthPacking){}render(et,nt,rt,it,ot){throw new Error("Render method not implemented!")}setSize(et,nt){}initialize(et,nt,rt){}dispose(){for(const et of Object.keys(this)){const nt=this[et];(nt instanceof WebGLRenderTarget||nt instanceof Material||nt instanceof Texture||nt instanceof yw)&&this[et].dispose()}}},CopyPass=class extends Pass{constructor(tt,et=!0){super("CopyPass"),this.fullscreenMaterial=new CopyMaterial,this.needsSwap=!1,this.renderTarget=tt,tt===void 0&&(this.renderTarget=new WebGLRenderTarget(1,1,{minFilter:LinearFilter,magFilter:LinearFilter,stencilBuffer:!1,depthBuffer:!1}),this.renderTarget.texture.name="CopyPass.Target"),this.autoResize=et}get resize(){return this.autoResize}set resize(tt){this.autoResize=tt}get texture(){return this.renderTarget.texture}getTexture(){return this.renderTarget.texture}setAutoResizeEnabled(tt){this.autoResize=tt}render(tt,et,nt,rt,it){this.fullscreenMaterial.inputBuffer=et.texture,tt.setRenderTarget(this.renderToScreen?null:this.renderTarget),tt.render(this.scene,this.camera)}setSize(tt,et){this.autoResize&&this.renderTarget.setSize(tt,et)}initialize(tt,et,nt){nt!==void 0&&(this.renderTarget.texture.type=nt,nt!==UnsignedByteType?this.fullscreenMaterial.defines.FRAMEBUFFER_PRECISION_HIGH="1":getOutputColorSpace(tt)===SRGBColorSpace&&setTextureColorSpace(this.renderTarget.texture,SRGBColorSpace))}},ClearMaskPass=class extends Pass{constructor(){super("ClearMaskPass",null,null),this.needsSwap=!1}render(tt,et,nt,rt,it){const ot=tt.state.buffers.stencil;ot.setLocked(!1),ot.setTest(!1)}},color$1=new Color$1,ClearPass=class extends Pass{constructor(tt=!0,et=!0,nt=!1){super("ClearPass",null,null),this.needsSwap=!1,this.color=tt,this.depth=et,this.stencil=nt,this.overrideClearColor=null,this.overrideClearAlpha=-1}setClearFlags(tt,et,nt){this.color=tt,this.depth=et,this.stencil=nt}getOverrideClearColor(){return this.overrideClearColor}setOverrideClearColor(tt){this.overrideClearColor=tt}getOverrideClearAlpha(){return this.overrideClearAlpha}setOverrideClearAlpha(tt){this.overrideClearAlpha=tt}render(tt,et,nt,rt,it){const ot=this.overrideClearColor,at=this.overrideClearAlpha,st=tt.getClearAlpha(),lt=ot!==null,ct=at>=0;lt?(tt.getClearColor(color$1),tt.setClearColor(ot,ct?at:st)):ct&&tt.setClearAlpha(at),tt.setRenderTarget(this.renderToScreen?null:et),tt.clear(this.color,this.depth,this.stencil),lt?tt.setClearColor(color$1,st):ct&&tt.setClearAlpha(st)}},RenderPass=class extends Pass{constructor(tt,et,nt=null){super("RenderPass",tt,et),this.needsSwap=!1,this.clearPass=new ClearPass,this.overrideMaterialManager=nt===null?null:new OverrideMaterialManager(nt),this.ignoreBackground=!1,this.skipShadowMapUpdate=!1,this.selection=null}set mainScene(tt){this.scene=tt}set mainCamera(tt){this.camera=tt}get renderToScreen(){return super.renderToScreen}set renderToScreen(tt){super.renderToScreen=tt,this.clearPass.renderToScreen=tt}get overrideMaterial(){const tt=this.overrideMaterialManager;return tt!==null?tt.material:null}set overrideMaterial(tt){const et=this.overrideMaterialManager;tt!==null?et!==null?et.setMaterial(tt):this.overrideMaterialManager=new OverrideMaterialManager(tt):et!==null&&(et.dispose(),this.overrideMaterialManager=null)}getOverrideMaterial(){return this.overrideMaterial}setOverrideMaterial(tt){this.overrideMaterial=tt}get clear(){return this.clearPass.enabled}set clear(tt){this.clearPass.enabled=tt}getSelection(){return this.selection}setSelection(tt){this.selection=tt}isBackgroundDisabled(){return this.ignoreBackground}setBackgroundDisabled(tt){this.ignoreBackground=tt}isShadowMapDisabled(){return this.skipShadowMapUpdate}setShadowMapDisabled(tt){this.skipShadowMapUpdate=tt}getClearPass(){return this.clearPass}render(tt,et,nt,rt,it){const ot=this.scene,at=this.camera,st=this.selection,lt=at.layers.mask,ct=ot.background,ut=tt.shadowMap.autoUpdate,ht=this.renderToScreen?null:et;st!==null&&at.layers.set(st.getLayer()),this.skipShadowMapUpdate&&(tt.shadowMap.autoUpdate=!1),(this.ignoreBackground||this.clearPass.overrideClearColor!==null)&&(ot.background=null),this.clearPass.enabled&&this.clearPass.render(tt,et),tt.setRenderTarget(ht),this.overrideMaterialManager!==null?this.overrideMaterialManager.render(tt,ot,at):tt.render(ot,at),at.layers.mask=lt,ot.background=ct,tt.shadowMap.autoUpdate=ut}},DepthPass=class extends Pass{constructor(tt,et,{renderTarget:nt,resolutionScale:rt=1,width:it=Resolution.AUTO_SIZE,height:ot=Resolution.AUTO_SIZE,resolutionX:at=it,resolutionY:st=ot}={}){super("DepthPass"),this.needsSwap=!1,this.renderPass=new RenderPass(tt,et,new MeshDepthMaterial({depthPacking:RGBADepthPacking}));const lt=this.renderPass;lt.skipShadowMapUpdate=!0,lt.ignoreBackground=!0;const ct=lt.clearPass;ct.overrideClearColor=new Color$1(16777215),ct.overrideClearAlpha=1,this.renderTarget=nt,this.renderTarget===void 0&&(this.renderTarget=new WebGLRenderTarget(1,1,{minFilter:NearestFilter,magFilter:NearestFilter}),this.renderTarget.texture.name="DepthPass.Target");const ut=this.resolution=new Resolution(this,at,st,rt);ut.addEventListener("change",ht=>this.setSize(ut.baseWidth,ut.baseHeight))}set mainScene(tt){this.renderPass.mainScene=tt}set mainCamera(tt){this.renderPass.mainCamera=tt}get texture(){return this.renderTarget.texture}getTexture(){return this.renderTarget.texture}getResolution(){return this.resolution}getResolutionScale(){return this.resolution.scale}setResolutionScale(tt){this.resolution.scale=tt}render(tt,et,nt,rt,it){const ot=this.renderToScreen?null:this.renderTarget;this.renderPass.render(tt,ot)}setSize(tt,et){const nt=this.resolution;nt.setBaseSize(tt,et),this.renderTarget.setSize(nt.width,nt.height)}},DepthDownsamplingPass=class extends Pass{constructor({normalBuffer:tt=null,resolutionScale:et=.5,width:nt=Resolution.AUTO_SIZE,height:rt=Resolution.AUTO_SIZE,resolutionX:it=nt,resolutionY:ot=rt}={}){super("DepthDownsamplingPass");const at=new DepthDownsamplingMaterial;at.normalBuffer=tt,this.fullscreenMaterial=at,this.needsDepthTexture=!0,this.needsSwap=!1,this.renderTarget=new WebGLRenderTarget(1,1,{minFilter:NearestFilter,magFilter:NearestFilter,depthBuffer:!1,type:FloatType}),this.renderTarget.texture.name="DepthDownsamplingPass.Target",this.renderTarget.texture.generateMipmaps=!1;const st=this.resolution=new Resolution(this,it,ot,et);st.addEventListener("change",lt=>this.setSize(st.baseWidth,st.baseHeight))}get texture(){return this.renderTarget.texture}getTexture(){return this.renderTarget.texture}getResolution(){return this.resolution}setDepthTexture(tt,et=BasicDepthPacking){this.fullscreenMaterial.depthBuffer=tt,this.fullscreenMaterial.depthPacking=et}render(tt,et,nt,rt,it){tt.setRenderTarget(this.renderToScreen?null:this.renderTarget),tt.render(this.scene,this.camera)}setSize(tt,et){const nt=this.resolution;nt.setBaseSize(tt,et),this.renderTarget.setSize(nt.width,nt.height),this.fullscreenMaterial.setSize(tt,et)}initialize(tt,et,nt){const rt=tt.getContext();if(!(rt.getExtension("EXT_color_buffer_float")||rt.getExtension("EXT_color_buffer_half_float")))throw new Error("Rendering to float texture is not supported.")}},DepthCopyPass=class extends Pass{constructor({depthPacking:tt=RGBADepthPacking}={}){super("DepthCopyPass");const et=new DepthCopyMaterial;et.outputDepthPacking=tt,this.fullscreenMaterial=et,this.needsDepthTexture=!0,this.needsSwap=!1,this.renderTarget=new WebGLRenderTarget(1,1,{type:tt===RGBADepthPacking?UnsignedByteType:FloatType,minFilter:NearestFilter,magFilter:NearestFilter,depthBuffer:!1}),this.renderTarget.texture.name="DepthCopyPass.Target"}get texture(){return this.renderTarget.texture}getTexture(){return this.renderTarget.texture}get depthPacking(){return this.fullscreenMaterial.outputDepthPacking}getDepthPacking(){return this.fullscreenMaterial.outputDepthPacking}setDepthTexture(tt,et=BasicDepthPacking){this.fullscreenMaterial.depthBuffer=tt,this.fullscreenMaterial.inputDepthPacking=et}render(tt,et,nt,rt,it){tt.setRenderTarget(this.renderToScreen?null:this.renderTarget),tt.render(this.scene,this.camera)}setSize(tt,et){this.renderTarget.setSize(tt,et)}},unpackFactors=new Float32Array([255/256/256**3,255/256/256**2,255/256/256,255/256]);function unpackRGBAToDepth(tt){return(tt[0]*unpackFactors[0]+tt[1]*unpackFactors[1]+tt[2]*unpackFactors[2]+tt[3]*unpackFactors[3])/255}var DepthPickingPass=class extends DepthCopyPass{constructor({depthPacking:tt=RGBADepthPacking,mode:et=DepthCopyMode.SINGLE}={}){super({depthPacking:tt}),this.name="DepthPickingPass",this.fullscreenMaterial.mode=et,this.pixelBuffer=tt===RGBADepthPacking?new Uint8Array(4):new Float32Array(4),this.callback=null}readDepth(tt){return this.fullscreenMaterial.texelPosition.set(tt.x*.5+.5,tt.y*.5+.5),new Promise(et=>{this.callback=et})}render(tt,et,nt,rt,it){const ot=this.fullscreenMaterial,at=ot.mode;if(at===DepthCopyMode.FULL&&super.render(tt),this.callback!==null){const st=this.renderTarget,lt=this.pixelBuffer,ct=st.texture.type!==FloatType;let ut=0,ht=0;if(at===DepthCopyMode.SINGLE)super.render(tt);else{const dt=ot.texelPosition;ut=Math.round(dt.x*st.width),ht=Math.round(dt.y*st.height)}tt.readRenderTargetPixels(st,ut,ht,1,1,lt),this.callback(ct?unpackRGBAToDepth(lt):lt[0]),this.callback=null}}setSize(tt,et){this.fullscreenMaterial.mode===DepthCopyMode.FULL&&super.setSize(tt,et)}};function prefixSubstrings(tt,et,nt){for(const rt of et){const it="$1"+tt+rt.charAt(0).toUpperCase()+rt.slice(1),ot=new RegExp("([^\\.])(\\b"+rt+"\\b)","g");for(const at of nt.entries())at[1]!==null&&nt.set(at[0],at[1].replace(ot,it))}}function integrateEffect(tt,et,nt){let rt=et.getFragmentShader(),it=et.getVertexShader();const ot=rt!==void 0&&/mainImage/.test(rt),at=rt!==void 0&&/mainUv/.test(rt);if(nt.attributes|=et.getAttributes(),rt===void 0)throw new Error(`Missing fragment shader (${et.name})`);if(at&&nt.attributes&EffectAttribute.CONVOLUTION)throw new Error(`Effects that transform UVs are incompatible with convolution effects (${et.name})`);if(!ot&&!at)throw new Error(`Could not find mainImage or mainUv function (${et.name})`);{const st=/\w+\s+(\w+)\([\w\s,]*\)\s*{/g,lt=nt.shaderParts;let ct=lt.get(EffectShaderSection.FRAGMENT_HEAD)||"",ut=lt.get(EffectShaderSection.FRAGMENT_MAIN_UV)||"",ht=lt.get(EffectShaderSection.FRAGMENT_MAIN_IMAGE)||"",dt=lt.get(EffectShaderSection.VERTEX_HEAD)||"",pt=lt.get(EffectShaderSection.VERTEX_MAIN_SUPPORT)||"";const mt=new Set,gt=new Set;if(at&&(ut+=` ${tt}MainUv(UV); -`,nt.uvTransformation=!0),it!==null&&/mainSupport/.test(it)){const vt=/mainSupport *\([\w\s]*?uv\s*?\)/.test(it);pt+=` ${tt}MainSupport(`,pt+=vt?`vUv); -`:`); -`;for(const xt of it.matchAll(/(?:varying\s+\w+\s+([\S\s]*?);)/g))for(const kt of xt[1].split(/\s*,\s*/))nt.varyings.add(kt),mt.add(kt),gt.add(kt);for(const xt of it.matchAll(st))gt.add(xt[1])}for(const vt of rt.matchAll(st))gt.add(vt[1]);for(const vt of et.defines.keys())gt.add(vt.replace(/\([\w\s,]*\)/g,""));for(const vt of et.uniforms.keys())gt.add(vt);gt.delete("while"),gt.delete("for"),gt.delete("if"),et.uniforms.forEach((vt,xt)=>nt.uniforms.set(tt+xt.charAt(0).toUpperCase()+xt.slice(1),vt)),et.defines.forEach((vt,xt)=>nt.defines.set(tt+xt.charAt(0).toUpperCase()+xt.slice(1),vt));const yt=new Map([["fragment",rt],["vertex",it]]);prefixSubstrings(tt,gt,nt.defines),prefixSubstrings(tt,gt,yt),rt=yt.get("fragment"),it=yt.get("vertex");const bt=et.blendMode;if(nt.blendModes.set(bt.blendFunction,bt),ot){et.inputColorSpace!==null&&et.inputColorSpace!==nt.colorSpace&&(ht+=et.inputColorSpace===SRGBColorSpace?`color0 = LinearTosRGB(color0); - `:`color0 = sRGBToLinear(color0); - `),et.outputColorSpace!==NoColorSpace?nt.colorSpace=et.outputColorSpace:et.inputColorSpace!==null&&(nt.colorSpace=et.inputColorSpace);const vt=/MainImage *\([\w\s,]*?depth[\w\s,]*?\)/;ht+=`${tt}MainImage(color0, UV, `,nt.attributes&EffectAttribute.DEPTH&&vt.test(rt)&&(ht+="depth, ",nt.readDepth=!0),ht+=`color1); - `;const xt=tt+"BlendOpacity";nt.uniforms.set(xt,bt.opacity),ht+=`color0 = blend${bt.blendFunction}(color0, color1, ${xt}); - - `,ct+=`uniform float ${xt}; - -`}if(ct+=rt+` -`,it!==null&&(dt+=it+` -`),lt.set(EffectShaderSection.FRAGMENT_HEAD,ct),lt.set(EffectShaderSection.FRAGMENT_MAIN_UV,ut),lt.set(EffectShaderSection.FRAGMENT_MAIN_IMAGE,ht),lt.set(EffectShaderSection.VERTEX_HEAD,dt),lt.set(EffectShaderSection.VERTEX_MAIN_SUPPORT,pt),et.extensions!==null)for(const vt of et.extensions)nt.extensions.add(vt)}}var EffectPass=class extends Pass{constructor(tt,...et){super("EffectPass"),this.fullscreenMaterial=new EffectMaterial(null,null,null,tt),this.listener=nt=>this.handleEvent(nt),this.effects=[],this.setEffects(et),this.skipRendering=!1,this.minTime=1,this.maxTime=Number.POSITIVE_INFINITY,this.timeScale=1}set mainScene(tt){for(const et of this.effects)et.mainScene=tt}set mainCamera(tt){this.fullscreenMaterial.copyCameraSettings(tt);for(const et of this.effects)et.mainCamera=tt}get encodeOutput(){return this.fullscreenMaterial.encodeOutput}set encodeOutput(tt){this.fullscreenMaterial.encodeOutput=tt}get dithering(){return this.fullscreenMaterial.dithering}set dithering(tt){const et=this.fullscreenMaterial;et.dithering=tt,et.needsUpdate=!0}setEffects(tt){for(const et of this.effects)et.removeEventListener("change",this.listener);this.effects=tt.sort((et,nt)=>nt.attributes-et.attributes);for(const et of this.effects)et.addEventListener("change",this.listener)}updateMaterial(){const tt=new EffectShaderData;let et=0;for(const at of this.effects)if(at.blendMode.blendFunction===BlendFunction.DST)tt.attributes|=at.getAttributes()&EffectAttribute.DEPTH;else{if(tt.attributes&at.getAttributes()&EffectAttribute.CONVOLUTION)throw new Error(`Convolution effects cannot be merged (${at.name})`);integrateEffect("e"+et++,at,tt)}let nt=tt.shaderParts.get(EffectShaderSection.FRAGMENT_HEAD),rt=tt.shaderParts.get(EffectShaderSection.FRAGMENT_MAIN_IMAGE),it=tt.shaderParts.get(EffectShaderSection.FRAGMENT_MAIN_UV);const ot=/\bblend\b/g;for(const at of tt.blendModes.values())nt+=at.getShaderCode().replace(ot,`blend${at.blendFunction}`)+` -`;tt.attributes&EffectAttribute.DEPTH?(tt.readDepth&&(rt=`float depth = readDepth(UV); - - `+rt),this.needsDepthTexture=this.getDepthTexture()===null):this.needsDepthTexture=!1,tt.colorSpace===SRGBColorSpace&&(rt+=`color0 = sRGBToLinear(color0); - `),tt.uvTransformation?(it=`vec2 transformedUv = vUv; -`+it,tt.defines.set("UV","transformedUv")):tt.defines.set("UV","vUv"),tt.shaderParts.set(EffectShaderSection.FRAGMENT_HEAD,nt),tt.shaderParts.set(EffectShaderSection.FRAGMENT_MAIN_IMAGE,rt),tt.shaderParts.set(EffectShaderSection.FRAGMENT_MAIN_UV,it);for(const[at,st]of tt.shaderParts)st!==null&&tt.shaderParts.set(at,st.trim().replace(/^#/,` -#`));this.skipRendering=et===0,this.needsSwap=!this.skipRendering,this.fullscreenMaterial.setShaderData(tt)}recompile(){this.updateMaterial()}getDepthTexture(){return this.fullscreenMaterial.depthBuffer}setDepthTexture(tt,et=BasicDepthPacking){this.fullscreenMaterial.depthBuffer=tt,this.fullscreenMaterial.depthPacking=et;for(const nt of this.effects)nt.setDepthTexture(tt,et)}render(tt,et,nt,rt,it){for(const ot of this.effects)ot.update(tt,et,rt);if(!this.skipRendering||this.renderToScreen){const ot=this.fullscreenMaterial;ot.inputBuffer=et.texture,ot.time+=rt*this.timeScale,tt.setRenderTarget(this.renderToScreen?null:nt),tt.render(this.scene,this.camera)}}setSize(tt,et){this.fullscreenMaterial.setSize(tt,et);for(const nt of this.effects)nt.setSize(tt,et)}initialize(tt,et,nt){this.renderer=tt;for(const rt of this.effects)rt.initialize(tt,et,nt);this.updateMaterial(),nt!==void 0&&nt!==UnsignedByteType&&(this.fullscreenMaterial.defines.FRAMEBUFFER_PRECISION_HIGH="1")}dispose(){super.dispose();for(const tt of this.effects)tt.removeEventListener("change",this.listener),tt.dispose()}handleEvent(tt){switch(tt.type){case"change":this.recompile();break}}},KawaseBlurPass=class extends Pass{constructor({kernelSize:tt=KernelSize.MEDIUM,resolutionScale:et=.5,width:nt=Resolution.AUTO_SIZE,height:rt=Resolution.AUTO_SIZE,resolutionX:it=nt,resolutionY:ot=rt}={}){super("KawaseBlurPass"),this.renderTargetA=new WebGLRenderTarget(1,1,{depthBuffer:!1}),this.renderTargetA.texture.name="Blur.Target.A",this.renderTargetB=this.renderTargetA.clone(),this.renderTargetB.texture.name="Blur.Target.B";const at=this.resolution=new Resolution(this,it,ot,et);at.addEventListener("change",st=>this.setSize(at.baseWidth,at.baseHeight)),this._blurMaterial=new KawaseBlurMaterial,this._blurMaterial.kernelSize=tt,this.copyMaterial=new CopyMaterial}getResolution(){return this.resolution}get blurMaterial(){return this._blurMaterial}set blurMaterial(tt){this._blurMaterial=tt}get dithering(){return this.copyMaterial.dithering}set dithering(tt){this.copyMaterial.dithering=tt}get kernelSize(){return this.blurMaterial.kernelSize}set kernelSize(tt){this.blurMaterial.kernelSize=tt}get width(){return this.resolution.width}set width(tt){this.resolution.preferredWidth=tt}get height(){return this.resolution.height}set height(tt){this.resolution.preferredHeight=tt}get scale(){return this.blurMaterial.scale}set scale(tt){this.blurMaterial.scale=tt}getScale(){return this.blurMaterial.scale}setScale(tt){this.blurMaterial.scale=tt}getKernelSize(){return this.kernelSize}setKernelSize(tt){this.kernelSize=tt}getResolutionScale(){return this.resolution.scale}setResolutionScale(tt){this.resolution.scale=tt}render(tt,et,nt,rt,it){const ot=this.scene,at=this.camera,st=this.renderTargetA,lt=this.renderTargetB,ct=this.blurMaterial,ut=ct.kernelSequence;let ht=et;this.fullscreenMaterial=ct;for(let dt=0,pt=ut.length;dtthis.setSize(lt.baseWidth,lt.baseHeight))}get texture(){return this.renderTarget.texture}getTexture(){return this.renderTarget.texture}getResolution(){return this.resolution}render(tt,et,nt,rt,it){const ot=this.fullscreenMaterial;ot.inputBuffer=et.texture,tt.setRenderTarget(this.renderToScreen?null:this.renderTarget),tt.render(this.scene,this.camera)}setSize(tt,et){const nt=this.resolution;nt.setBaseSize(tt,et),this.renderTarget.setSize(nt.width,nt.height)}initialize(tt,et,nt){nt!==void 0&&nt!==UnsignedByteType&&(this.renderTarget.texture.type=nt,this.fullscreenMaterial.defines.FRAMEBUFFER_PRECISION_HIGH="1")}},MaskPass=class extends Pass{constructor(tt,et){super("MaskPass",tt,et),this.needsSwap=!1,this.clearPass=new ClearPass(!1,!1,!0),this.inverse=!1}set mainScene(tt){this.scene=tt}set mainCamera(tt){this.camera=tt}get inverted(){return this.inverse}set inverted(tt){this.inverse=tt}get clear(){return this.clearPass.enabled}set clear(tt){this.clearPass.enabled=tt}getClearPass(){return this.clearPass}isInverted(){return this.inverted}setInverted(tt){this.inverted=tt}render(tt,et,nt,rt,it){const ot=tt.getContext(),at=tt.state.buffers,st=this.scene,lt=this.camera,ct=this.clearPass,ut=this.inverted?0:1,ht=1-ut;at.color.setMask(!1),at.depth.setMask(!1),at.color.setLocked(!0),at.depth.setLocked(!0),at.stencil.setTest(!0),at.stencil.setOp(ot.REPLACE,ot.REPLACE,ot.REPLACE),at.stencil.setFunc(ot.ALWAYS,ut,4294967295),at.stencil.setClear(ht),at.stencil.setLocked(!0),this.clearPass.enabled&&(this.renderToScreen?ct.render(tt,null):(ct.render(tt,et),ct.render(tt,nt))),this.renderToScreen?(tt.setRenderTarget(null),tt.render(st,lt)):(tt.setRenderTarget(et),tt.render(st,lt),tt.setRenderTarget(nt),tt.render(st,lt)),at.color.setLocked(!1),at.depth.setLocked(!1),at.stencil.setLocked(!1),at.stencil.setFunc(ot.EQUAL,1,4294967295),at.stencil.setOp(ot.KEEP,ot.KEEP,ot.KEEP),at.stencil.setLocked(!0)}},MipmapBlurPass=class extends Pass{constructor(){super("MipmapBlurPass"),this.needsSwap=!1,this.renderTarget=new WebGLRenderTarget(1,1,{depthBuffer:!1}),this.renderTarget.texture.name="Upsampling.Mipmap0",this.downsamplingMipmaps=[],this.upsamplingMipmaps=[],this.downsamplingMaterial=new DownsamplingMaterial,this.upsamplingMaterial=new UpsamplingMaterial,this.resolution=new Vector2}get texture(){return this.renderTarget.texture}get levels(){return this.downsamplingMipmaps.length}set levels(tt){if(this.levels!==tt){const et=this.renderTarget;this.dispose(),this.downsamplingMipmaps=[],this.upsamplingMipmaps=[];for(let nt=0;nt=0;--dt){const pt=ut[dt];lt.setSize(ht.width,ht.height),lt.inputBuffer=ht.texture,lt.supportBuffer=ct[dt].texture,tt.setRenderTarget(pt),tt.render(ot,at),ht=pt}}setSize(tt,et){const nt=this.resolution;nt.set(tt,et);let rt=nt.width,it=nt.height;for(let ot=0,at=this.downsamplingMipmaps.length;otthis.setSize(ut.baseWidth,ut.baseHeight))}set mainScene(tt){this.renderPass.mainScene=tt}set mainCamera(tt){this.renderPass.mainCamera=tt}get texture(){return this.renderTarget.texture}getTexture(){return this.renderTarget.texture}getResolution(){return this.resolution}getResolutionScale(){return this.resolution.scale}setResolutionScale(tt){this.resolution.scale=tt}render(tt,et,nt,rt,it){const ot=this.renderToScreen?null:this.renderTarget;this.renderPass.render(tt,ot,ot)}setSize(tt,et){const nt=this.resolution;nt.setBaseSize(tt,et),this.renderTarget.setSize(nt.width,nt.height)}},ShaderPass=class extends Pass{constructor(tt,et="inputBuffer"){super("ShaderPass"),this.fullscreenMaterial=tt,this.input=et}setInput(tt){this.input=tt}render(tt,et,nt,rt,it){const ot=this.fullscreenMaterial.uniforms;et!==null&&ot!==void 0&&ot[this.input]!==void 0&&(ot[this.input].value=et.texture),tt.setRenderTarget(this.renderToScreen?null:nt),tt.render(this.scene,this.camera)}initialize(tt,et,nt){nt!==void 0&&nt!==UnsignedByteType&&(this.fullscreenMaterial.defines.FRAMEBUFFER_PRECISION_HIGH="1")}},MILLISECONDS_TO_SECONDS=1/1e3,SECONDS_TO_MILLISECONDS=1e3,Timer=class{constructor(){this.startTime=performance.now(),this.previousTime=0,this.currentTime=0,this._delta=0,this._elapsed=0,this._fixedDelta=1e3/60,this.timescale=1,this.useFixedDelta=!1,this._autoReset=!1}get autoReset(){return this._autoReset}set autoReset(tt){typeof document<"u"&&document.hidden!==void 0&&(tt?document.addEventListener("visibilitychange",this):document.removeEventListener("visibilitychange",this),this._autoReset=tt)}get delta(){return this._delta*MILLISECONDS_TO_SECONDS}get fixedDelta(){return this._fixedDelta*MILLISECONDS_TO_SECONDS}set fixedDelta(tt){this._fixedDelta=tt*SECONDS_TO_MILLISECONDS}get elapsed(){return this._elapsed*MILLISECONDS_TO_SECONDS}update(tt){this.useFixedDelta?this._delta=this.fixedDelta:(this.previousTime=this.currentTime,this.currentTime=(tt!==void 0?tt:performance.now())-this.startTime,this._delta=this.currentTime-this.previousTime),this._delta*=this.timescale,this._elapsed+=this._delta}reset(){this._delta=0,this._elapsed=0,this.currentTime=performance.now()-this.startTime}handleEvent(tt){document.hidden||(this.currentTime=performance.now()-this.startTime)}dispose(){this.autoReset=!1}},EffectComposer$1=class{constructor(et=null,{depthBuffer:nt=!0,stencilBuffer:rt=!1,multisampling:it=0,frameBufferType:ot}={}){this.renderer=null,this.inputBuffer=this.createBuffer(nt,rt,ot,it),this.outputBuffer=this.inputBuffer.clone(),this.copyPass=new CopyPass,this.depthTexture=null,this.passes=[],this.timer=new Timer,this.autoRenderToScreen=!0,this.setRenderer(et)}get multisampling(){return this.inputBuffer.samples||0}set multisampling(et){const nt=this.inputBuffer,rt=this.multisampling;rt>0&&et>0?(this.inputBuffer.samples=et,this.outputBuffer.samples=et,this.inputBuffer.dispose(),this.outputBuffer.dispose()):rt!==et&&(this.inputBuffer.dispose(),this.outputBuffer.dispose(),this.inputBuffer=this.createBuffer(nt.depthBuffer,nt.stencilBuffer,nt.texture.type,et),this.inputBuffer.depthTexture=this.depthTexture,this.outputBuffer=this.inputBuffer.clone())}getTimer(){return this.timer}getRenderer(){return this.renderer}setRenderer(et){if(this.renderer=et,et!==null){const nt=et.getSize(new Vector2),rt=et.getContext().getContextAttributes().alpha,it=this.inputBuffer.texture.type;it===UnsignedByteType&&getOutputColorSpace(et)===SRGBColorSpace&&(setTextureColorSpace(this.inputBuffer.texture,SRGBColorSpace),setTextureColorSpace(this.outputBuffer.texture,SRGBColorSpace),this.inputBuffer.dispose(),this.outputBuffer.dispose()),et.autoClear=!1,this.setSize(nt.width,nt.height);for(const ot of this.passes)ot.initialize(et,rt,it)}}replaceRenderer(et,nt=!0){const rt=this.renderer,it=rt.domElement.parentNode;return this.setRenderer(et),nt&&it!==null&&(it.removeChild(rt.domElement),it.appendChild(et.domElement)),rt}createDepthTexture(){const et=this.depthTexture=new DepthTexture;return this.inputBuffer.depthTexture=et,this.inputBuffer.dispose(),this.inputBuffer.stencilBuffer?(et.format=DepthStencilFormat,et.type=UnsignedInt248Type):et.type=UnsignedIntType,et}deleteDepthTexture(){if(this.depthTexture!==null){this.depthTexture.dispose(),this.depthTexture=null,this.inputBuffer.depthTexture=null,this.inputBuffer.dispose();for(const et of this.passes)et.setDepthTexture(null)}}createBuffer(et,nt,rt,it){const ot=this.renderer,at=ot===null?new Vector2:ot.getDrawingBufferSize(new Vector2),st={minFilter:LinearFilter,magFilter:LinearFilter,stencilBuffer:nt,depthBuffer:et,type:rt},lt=new WebGLRenderTarget(at.width,at.height,st);return it>0&&(lt.ignoreDepthForMultisampleCopy=!1,lt.samples=it),rt===UnsignedByteType&&getOutputColorSpace(ot)===SRGBColorSpace&&setTextureColorSpace(lt.texture,SRGBColorSpace),lt.texture.name="EffectComposer.Buffer",lt.texture.generateMipmaps=!1,lt}setMainScene(et){for(const nt of this.passes)nt.mainScene=et}setMainCamera(et){for(const nt of this.passes)nt.mainCamera=et}addPass(et,nt){const rt=this.passes,it=this.renderer,ot=it.getDrawingBufferSize(new Vector2),at=it.getContext().getContextAttributes().alpha,st=this.inputBuffer.texture.type;if(et.setRenderer(it),et.setSize(ot.width,ot.height),et.initialize(it,at,st),this.autoRenderToScreen&&(rt.length>0&&(rt[rt.length-1].renderToScreen=!1),et.renderToScreen&&(this.autoRenderToScreen=!1)),nt!==void 0?rt.splice(nt,0,et):rt.push(et),this.autoRenderToScreen&&(rt[rt.length-1].renderToScreen=!0),et.needsDepthTexture||this.depthTexture!==null)if(this.depthTexture===null){const lt=this.createDepthTexture();for(et of rt)et.setDepthTexture(lt)}else et.setDepthTexture(this.depthTexture)}removePass(et){const nt=this.passes,rt=nt.indexOf(et);if(rt!==-1&&nt.splice(rt,1).length>0){if(this.depthTexture!==null){const at=(lt,ct)=>lt||ct.needsDepthTexture;nt.reduce(at,!1)||(et.getDepthTexture()===this.depthTexture&&et.setDepthTexture(null),this.deleteDepthTexture())}this.autoRenderToScreen&&rt===nt.length&&(et.renderToScreen=!1,nt.length>0&&(nt[nt.length-1].renderToScreen=!0))}}removeAllPasses(){const et=this.passes;this.deleteDepthTexture(),et.length>0&&(this.autoRenderToScreen&&(et[et.length-1].renderToScreen=!1),this.passes=[])}render(et){const nt=this.renderer,rt=this.copyPass;let it=this.inputBuffer,ot=this.outputBuffer,at=!1,st,lt,ct;et===void 0&&(this.timer.update(),et=this.timer.delta);for(const ut of this.passes)ut.enabled&&(ut.render(nt,it,ot,et,at),ut.needsSwap&&(at&&(rt.renderToScreen=ut.renderToScreen,st=nt.getContext(),lt=nt.state.buffers.stencil,lt.setFunc(st.NOTEQUAL,1,4294967295),rt.render(nt,it,ot,et,at),lt.setFunc(st.EQUAL,1,4294967295)),ct=it,it=ot,ot=ct),ut instanceof MaskPass?at=!0:ut instanceof ClearMaskPass&&(at=!1))}setSize(et,nt,rt){const it=this.renderer,ot=it.getSize(new Vector2);(et===void 0||nt===void 0)&&(et=ot.width,nt=ot.height),(ot.width!==et||ot.height!==nt)&&it.setSize(et,nt,rt);const at=it.getDrawingBufferSize(new Vector2);this.inputBuffer.setSize(at.width,at.height),this.outputBuffer.setSize(at.width,at.height);for(const st of this.passes)st.setSize(at.width,at.height)}reset(){const et=this.timer.autoReset;this.dispose(),this.autoRenderToScreen=!0,this.timer.autoReset=et}dispose(){for(const et of this.passes)et.dispose();this.passes=[],this.inputBuffer!==null&&this.inputBuffer.dispose(),this.outputBuffer!==null&&this.outputBuffer.dispose(),this.deleteDepthTexture(),this.copyPass.dispose(),this.timer.dispose()}},EffectShaderData=class{constructor(){this.shaderParts=new Map([[EffectShaderSection.FRAGMENT_HEAD,null],[EffectShaderSection.FRAGMENT_MAIN_UV,null],[EffectShaderSection.FRAGMENT_MAIN_IMAGE,null],[EffectShaderSection.VERTEX_HEAD,null],[EffectShaderSection.VERTEX_MAIN_SUPPORT,null]]),this.defines=new Map,this.uniforms=new Map,this.blendModes=new Map,this.extensions=new Set,this.attributes=EffectAttribute.NONE,this.varyings=new Set,this.uvTransformation=!1,this.readDepth=!1,this.colorSpace=LinearSRGBColorSpace}},workaroundEnabled=!1,OverrideMaterialManager=class{constructor(tt=null){this.originalMaterials=new Map,this.material=null,this.materials=null,this.materialsBackSide=null,this.materialsDoubleSide=null,this.materialsFlatShaded=null,this.materialsFlatShadedBackSide=null,this.materialsFlatShadedDoubleSide=null,this.setMaterial(tt),this.meshCount=0,this.replaceMaterial=et=>{if(et.isMesh){let nt;if(et.material.flatShading)switch(et.material.side){case DoubleSide:nt=this.materialsFlatShadedDoubleSide;break;case BackSide:nt=this.materialsFlatShadedBackSide;break;default:nt=this.materialsFlatShaded;break}else switch(et.material.side){case DoubleSide:nt=this.materialsDoubleSide;break;case BackSide:nt=this.materialsBackSide;break;default:nt=this.materials;break}this.originalMaterials.set(et,et.material),et.isSkinnedMesh?et.material=nt[2]:et.isInstancedMesh?et.material=nt[1]:et.material=nt[0],++this.meshCount}}}cloneMaterial(tt){if(!(tt instanceof ShaderMaterial))return tt.clone();const et=tt.uniforms,nt=new Map;for(const it in et){const ot=et[it].value;ot.isRenderTargetTexture&&(et[it].value=null,nt.set(it,ot))}const rt=tt.clone();for(const it of nt)et[it[0]].value=it[1],rt.uniforms[it[0]].value=it[1];return rt}setMaterial(tt){if(this.disposeMaterials(),this.material=tt,tt!==null){const et=this.materials=[this.cloneMaterial(tt),this.cloneMaterial(tt),this.cloneMaterial(tt)];for(const nt of et)nt.uniforms=Object.assign({},tt.uniforms),nt.side=FrontSide;et[2].skinning=!0,this.materialsBackSide=et.map(nt=>{const rt=this.cloneMaterial(nt);return rt.uniforms=Object.assign({},tt.uniforms),rt.side=BackSide,rt}),this.materialsDoubleSide=et.map(nt=>{const rt=this.cloneMaterial(nt);return rt.uniforms=Object.assign({},tt.uniforms),rt.side=DoubleSide,rt}),this.materialsFlatShaded=et.map(nt=>{const rt=this.cloneMaterial(nt);return rt.uniforms=Object.assign({},tt.uniforms),rt.flatShading=!0,rt}),this.materialsFlatShadedBackSide=et.map(nt=>{const rt=this.cloneMaterial(nt);return rt.uniforms=Object.assign({},tt.uniforms),rt.flatShading=!0,rt.side=BackSide,rt}),this.materialsFlatShadedDoubleSide=et.map(nt=>{const rt=this.cloneMaterial(nt);return rt.uniforms=Object.assign({},tt.uniforms),rt.flatShading=!0,rt.side=DoubleSide,rt})}}render(tt,et,nt){const rt=tt.shadowMap.enabled;if(tt.shadowMap.enabled=!1,workaroundEnabled){const it=this.originalMaterials;this.meshCount=0,et.traverse(this.replaceMaterial),tt.render(et,nt);for(const ot of it)ot[0].material=ot[1];this.meshCount!==it.size&&it.clear()}else{const it=et.overrideMaterial;et.overrideMaterial=this.material,tt.render(et,nt),et.overrideMaterial=it}tt.shadowMap.enabled=rt}disposeMaterials(){if(this.material!==null){const tt=this.materials.concat(this.materialsBackSide).concat(this.materialsDoubleSide).concat(this.materialsFlatShaded).concat(this.materialsFlatShadedBackSide).concat(this.materialsFlatShadedDoubleSide);for(const et of tt)et.dispose()}}dispose(){this.originalMaterials.clear(),this.disposeMaterials()}static get workaroundEnabled(){return workaroundEnabled}static set workaroundEnabled(tt){workaroundEnabled=tt}},AUTO_SIZE=-1,Resolution=class extends EventDispatcher$1{constructor(tt,et=AUTO_SIZE,nt=AUTO_SIZE,rt=1){super(),this.resizable=tt,this.baseSize=new Vector2(1,1),this.preferredSize=new Vector2(et,nt),this.target=this.preferredSize,this.s=rt,this.effectiveSize=new Vector2,this.addEventListener("change",()=>this.updateEffectiveSize()),this.updateEffectiveSize()}updateEffectiveSize(){const tt=this.baseSize,et=this.preferredSize,nt=this.effectiveSize,rt=this.scale;et.width!==AUTO_SIZE?nt.width=et.width:et.height!==AUTO_SIZE?nt.width=Math.round(et.height*(tt.width/Math.max(tt.height,1))):nt.width=Math.round(tt.width*rt),et.height!==AUTO_SIZE?nt.height=et.height:et.width!==AUTO_SIZE?nt.height=Math.round(et.width/Math.max(tt.width/Math.max(tt.height,1),1)):nt.height=Math.round(tt.height*rt)}get width(){return this.effectiveSize.width}set width(tt){this.preferredWidth=tt}get height(){return this.effectiveSize.height}set height(tt){this.preferredHeight=tt}getWidth(){return this.width}getHeight(){return this.height}get scale(){return this.s}set scale(tt){this.s!==tt&&(this.s=tt,this.preferredSize.setScalar(AUTO_SIZE),this.dispatchEvent({type:"change"}),this.resizable.setSize(this.baseSize.width,this.baseSize.height))}getScale(){return this.scale}setScale(tt){this.scale=tt}get baseWidth(){return this.baseSize.width}set baseWidth(tt){this.baseSize.width!==tt&&(this.baseSize.width=tt,this.dispatchEvent({type:"change"}),this.resizable.setSize(this.baseSize.width,this.baseSize.height))}getBaseWidth(){return this.baseWidth}setBaseWidth(tt){this.baseWidth=tt}get baseHeight(){return this.baseSize.height}set baseHeight(tt){this.baseSize.height!==tt&&(this.baseSize.height=tt,this.dispatchEvent({type:"change"}),this.resizable.setSize(this.baseSize.width,this.baseSize.height))}getBaseHeight(){return this.baseHeight}setBaseHeight(tt){this.baseHeight=tt}setBaseSize(tt,et){(this.baseSize.width!==tt||this.baseSize.height!==et)&&(this.baseSize.set(tt,et),this.dispatchEvent({type:"change"}),this.resizable.setSize(this.baseSize.width,this.baseSize.height))}get preferredWidth(){return this.preferredSize.width}set preferredWidth(tt){this.preferredSize.width!==tt&&(this.preferredSize.width=tt,this.dispatchEvent({type:"change"}),this.resizable.setSize(this.baseSize.width,this.baseSize.height))}getPreferredWidth(){return this.preferredWidth}setPreferredWidth(tt){this.preferredWidth=tt}get preferredHeight(){return this.preferredSize.height}set preferredHeight(tt){this.preferredSize.height!==tt&&(this.preferredSize.height=tt,this.dispatchEvent({type:"change"}),this.resizable.setSize(this.baseSize.width,this.baseSize.height))}getPreferredHeight(){return this.preferredHeight}setPreferredHeight(tt){this.preferredHeight=tt}setPreferredSize(tt,et){(this.preferredSize.width!==tt||this.preferredSize.height!==et)&&(this.preferredSize.set(tt,et),this.dispatchEvent({type:"change"}),this.resizable.setSize(this.baseSize.width,this.baseSize.height))}copy(tt){this.s=tt.scale,this.baseSize.set(tt.baseWidth,tt.baseHeight),this.preferredSize.set(tt.preferredWidth,tt.preferredHeight),this.dispatchEvent({type:"change"}),this.resizable.setSize(this.baseSize.width,this.baseSize.height)}static get AUTO_SIZE(){return AUTO_SIZE}},Selection$3=class extends Set{constructor(et,nt=10){super(),this.l=nt,this.exclusive=!1,et!==void 0&&this.set(et)}get layer(){return this.l}set layer(et){const nt=this.l;for(const rt of this)rt.layers.disable(nt),rt.layers.enable(et);this.l=et}getLayer(){return this.layer}setLayer(et){this.layer=et}isExclusive(){return this.exclusive}setExclusive(et){this.exclusive=et}clear(){const et=this.layer;for(const nt of this)nt.layers.disable(et);return super.clear()}set(et){this.clear();for(const nt of et)this.add(nt);return this}indexOf(et){return this.has(et)?0:-1}add(et){return this.exclusive?et.layers.set(this.layer):et.layers.enable(this.layer),super.add(et)}delete(et){return this.has(et)&&et.layers.disable(this.layer),super.delete(et)}toggle(et){let nt;return this.has(et)?(this.delete(et),nt=!1):(this.add(et),nt=!0),nt}setVisible(et){for(const nt of this)et?nt.layers.enable(0):nt.layers.disable(0);return this}},add_default="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,x+y,opacity);}",alpha_default="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,y,min(y.a,opacity));}",average_default="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,(x+y)*0.5,opacity);}",color_default="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec3 xHSL=RGBToHSL(x.rgb);vec3 yHSL=RGBToHSL(y.rgb);vec3 z=HSLToRGB(vec3(yHSL.rg,xHSL.b));return vec4(mix(x.rgb,z,opacity),y.a);}",color_burn_default="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec4 z=mix(step(0.0,y)*(1.0-min(vec4(1.0),(1.0-x)/y)),vec4(1.0),step(1.0,x));return mix(x,z,opacity);}",color_dodge_default="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec4 z=step(0.0,x)*mix(min(vec4(1.0),x/max(1.0-y,1e-9)),vec4(1.0),step(1.0,y));return mix(x,z,opacity);}",darken_default="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,min(x,y),opacity);}",difference_default="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,abs(x-y),opacity);}",divide_default="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,x/max(y,1e-12),opacity);}",exclusion_default="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,(x+y-2.0*x*y),opacity);}",hard_light_default="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec4 a=min(x,1.0),b=min(y,1.0);vec4 z=mix(2.0*a*b,1.0-2.0*(1.0-a)*(1.0-b),step(0.5,y));return mix(x,z,opacity);}",hard_mix_default="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,step(1.0,x+y),opacity);}",hue_default="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec3 xHSL=RGBToHSL(x.rgb);vec3 yHSL=RGBToHSL(y.rgb);vec3 z=HSLToRGB(vec3(yHSL.r,xHSL.gb));return vec4(mix(x.rgb,z,opacity),y.a);}",invert_default="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,1.0-y,opacity);}",invert_rgb_default="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,y*(1.0-x),opacity);}",lighten_default="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,max(x,y),opacity);}",linear_burn_default="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,clamp(y+x-1.0,0.0,1.0),opacity);}",linear_dodge_default="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,min(x+y,1.0),opacity);}",linear_light_default="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,clamp(2.0*y+x-1.0,0.0,1.0),opacity);}",luminosity_default="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec3 xHSL=RGBToHSL(x.rgb);vec3 yHSL=RGBToHSL(y.rgb);vec3 z=HSLToRGB(vec3(xHSL.rg,yHSL.b));return vec4(mix(x.rgb,z,opacity),y.a);}",multiply_default="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,x*y,opacity);}",negation_default="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,1.0-abs(1.0-x-y),opacity);}",normal_default="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,y,opacity);}",overlay_default="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec4 z=mix(2.0*y*x,1.0-2.0*(1.0-y)*(1.0-x),step(0.5,x));return mix(x,z,opacity);}",pin_light_default="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec4 y2=2.0*y;vec4 z=mix(mix(y2,x,step(0.5*x,y)),max(vec4(0.0),y2-1.0),step(x,(y2-1.0)));return mix(x,z,opacity);}",reflect_default="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec4 z=mix(min(x*x/max(1.0-y,1e-12),1.0),y,step(1.0,y));return mix(x,z,opacity);}",saturation_default="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec3 xHSL=RGBToHSL(x.rgb);vec3 yHSL=RGBToHSL(y.rgb);vec3 z=HSLToRGB(vec3(xHSL.r,yHSL.g,xHSL.b));return vec4(mix(x.rgb,z,opacity),y.a);}",screen_default="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,x+y-min(x*y,1.0),opacity);}",soft_light_default="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec4 y2=2.0*y;vec4 w=step(0.5,y);vec4 z=mix(x-(1.0-y2)*x*(1.0-x),mix(x+(y2-1.0)*(sqrt(x)-x),x+(y2-1.0)*x*((16.0*x-12.0)*x+3.0),w*(1.0-step(0.25,x))),w);return mix(x,z,opacity);}",src_default="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return y;}",subtract_default="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,max(x+y-1.0,0.0),opacity);}",vivid_light_default="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec4 z=mix(max(1.0-min((1.0-x)/(2.0*y),1.0),0.0),min(x/(2.0*(1.0-y)),1.0),step(0.5,y));return mix(x,z,opacity);}",blendFunctions=new Map([[BlendFunction.ADD,add_default],[BlendFunction.ALPHA,alpha_default],[BlendFunction.AVERAGE,average_default],[BlendFunction.COLOR,color_default],[BlendFunction.COLOR_BURN,color_burn_default],[BlendFunction.COLOR_DODGE,color_dodge_default],[BlendFunction.DARKEN,darken_default],[BlendFunction.DIFFERENCE,difference_default],[BlendFunction.DIVIDE,divide_default],[BlendFunction.DST,null],[BlendFunction.EXCLUSION,exclusion_default],[BlendFunction.HARD_LIGHT,hard_light_default],[BlendFunction.HARD_MIX,hard_mix_default],[BlendFunction.HUE,hue_default],[BlendFunction.INVERT,invert_default],[BlendFunction.INVERT_RGB,invert_rgb_default],[BlendFunction.LIGHTEN,lighten_default],[BlendFunction.LINEAR_BURN,linear_burn_default],[BlendFunction.LINEAR_DODGE,linear_dodge_default],[BlendFunction.LINEAR_LIGHT,linear_light_default],[BlendFunction.LUMINOSITY,luminosity_default],[BlendFunction.MULTIPLY,multiply_default],[BlendFunction.NEGATION,negation_default],[BlendFunction.NORMAL,normal_default],[BlendFunction.OVERLAY,overlay_default],[BlendFunction.PIN_LIGHT,pin_light_default],[BlendFunction.REFLECT,reflect_default],[BlendFunction.SATURATION,saturation_default],[BlendFunction.SCREEN,screen_default],[BlendFunction.SOFT_LIGHT,soft_light_default],[BlendFunction.SRC,src_default],[BlendFunction.SUBTRACT,subtract_default],[BlendFunction.VIVID_LIGHT,vivid_light_default]]),BlendMode=class extends EventDispatcher$1{constructor(tt,et=1){super(),this._blendFunction=tt,this.opacity=new Uniform(et)}getOpacity(){return this.opacity.value}setOpacity(tt){this.opacity.value=tt}get blendFunction(){return this._blendFunction}set blendFunction(tt){this._blendFunction=tt,this.dispatchEvent({type:"change"})}getBlendFunction(){return this.blendFunction}setBlendFunction(tt){this.blendFunction=tt}getShaderCode(){return blendFunctions.get(this.blendFunction)}},Effect$1=class extends EventDispatcher$1{constructor(et,nt,{attributes:rt=EffectAttribute.NONE,blendFunction:it=BlendFunction.NORMAL,defines:ot=new Map,uniforms:at=new Map,extensions:st=null,vertexShader:lt=null}={}){super(),this.name=et,this.renderer=null,this.attributes=rt,this.fragmentShader=nt,this.vertexShader=lt,this.defines=ot,this.uniforms=at,this.extensions=st,this.blendMode=new BlendMode(it),this.blendMode.addEventListener("change",ct=>this.setChanged()),this._inputColorSpace=LinearSRGBColorSpace,this._outputColorSpace=NoColorSpace}get inputColorSpace(){return this._inputColorSpace}set inputColorSpace(et){this._inputColorSpace=et,this.setChanged()}get outputColorSpace(){return this._outputColorSpace}set outputColorSpace(et){this._outputColorSpace=et,this.setChanged()}set mainScene(et){}set mainCamera(et){}getName(){return this.name}setRenderer(et){this.renderer=et}getDefines(){return this.defines}getUniforms(){return this.uniforms}getExtensions(){return this.extensions}getBlendMode(){return this.blendMode}getAttributes(){return this.attributes}setAttributes(et){this.attributes=et,this.setChanged()}getFragmentShader(){return this.fragmentShader}setFragmentShader(et){this.fragmentShader=et,this.setChanged()}getVertexShader(){return this.vertexShader}setVertexShader(et){this.vertexShader=et,this.setChanged()}setChanged(){this.dispatchEvent({type:"change"})}setDepthTexture(et,nt=BasicDepthPacking){}update(et,nt,rt){}setSize(et,nt){}initialize(et,nt,rt){}dispose(){for(const et of Object.keys(this)){const nt=this[et];(nt instanceof WebGLRenderTarget||nt instanceof Material||nt instanceof Texture||nt instanceof Pass)&&this[et].dispose()}}},bloom_default=`#ifdef FRAMEBUFFER_PRECISION_HIGH -uniform mediump sampler2D map; -#else -uniform lowp sampler2D map; -#endif -uniform float intensity;void mainImage(const in vec4 inputColor,const in vec2 uv,out vec4 outputColor){vec4 texel=texture2D(map,uv);outputColor=vec4(texel.rgb*intensity,texel.a);}`,BloomEffect=class extends Effect$1{constructor({blendFunction:tt=BlendFunction.SCREEN,luminanceThreshold:et=.9,luminanceSmoothing:nt=.025,mipmapBlur:rt=!1,intensity:it=1,radius:ot=.85,levels:at=8,kernelSize:st=KernelSize.LARGE,resolutionScale:lt=.5,width:ct=Resolution.AUTO_SIZE,height:ut=Resolution.AUTO_SIZE,resolutionX:ht=ct,resolutionY:dt=ut}={}){super("BloomEffect",bloom_default,{blendFunction:tt,uniforms:new Map([["map",new Uniform(null)],["intensity",new Uniform(it)]])}),this.renderTarget=new WebGLRenderTarget(1,1,{depthBuffer:!1}),this.renderTarget.texture.name="Bloom.Target",this.blurPass=new KawaseBlurPass({kernelSize:st}),this.luminancePass=new LuminancePass({colorOutput:!0}),this.luminanceMaterial.threshold=et,this.luminanceMaterial.smoothing=nt,this.mipmapBlurPass=new MipmapBlurPass,this.mipmapBlurPass.enabled=rt,this.mipmapBlurPass.radius=ot,this.mipmapBlurPass.levels=at,this.uniforms.get("map").value=rt?this.mipmapBlurPass.texture:this.renderTarget.texture;const pt=this.resolution=new Resolution(this,ht,dt,lt);pt.addEventListener("change",mt=>this.setSize(pt.baseWidth,pt.baseHeight))}get texture(){return this.mipmapBlurPass.enabled?this.mipmapBlurPass.texture:this.renderTarget.texture}getTexture(){return this.texture}getResolution(){return this.resolution}getBlurPass(){return this.blurPass}getLuminancePass(){return this.luminancePass}get luminanceMaterial(){return this.luminancePass.fullscreenMaterial}getLuminanceMaterial(){return this.luminancePass.fullscreenMaterial}get width(){return this.resolution.width}set width(tt){this.resolution.preferredWidth=tt}get height(){return this.resolution.height}set height(tt){this.resolution.preferredHeight=tt}get dithering(){return this.blurPass.dithering}set dithering(tt){this.blurPass.dithering=tt}get kernelSize(){return this.blurPass.kernelSize}set kernelSize(tt){this.blurPass.kernelSize=tt}get distinction(){return console.warn(this.name,"distinction was removed"),1}set distinction(tt){console.warn(this.name,"distinction was removed")}get intensity(){return this.uniforms.get("intensity").value}set intensity(tt){this.uniforms.get("intensity").value=tt}getIntensity(){return this.intensity}setIntensity(tt){this.intensity=tt}getResolutionScale(){return this.resolution.scale}setResolutionScale(tt){this.resolution.scale=tt}update(tt,et,nt){const rt=this.renderTarget,it=this.luminancePass;it.enabled?(it.render(tt,et),this.mipmapBlurPass.enabled?this.mipmapBlurPass.render(tt,it.renderTarget):this.blurPass.render(tt,it.renderTarget,rt)):this.mipmapBlurPass.enabled?this.mipmapBlurPass.render(tt,et):this.blurPass.render(tt,et,rt)}setSize(tt,et){const nt=this.resolution;nt.setBaseSize(tt,et),this.renderTarget.setSize(nt.width,nt.height),this.blurPass.resolution.copy(nt),this.luminancePass.setSize(tt,et),this.mipmapBlurPass.setSize(tt,et)}initialize(tt,et,nt){this.blurPass.initialize(tt,et,nt),this.luminancePass.initialize(tt,et,nt),this.mipmapBlurPass.initialize(tt,et,nt),nt!==void 0&&(this.renderTarget.texture.type=nt,getOutputColorSpace(tt)===SRGBColorSpace&&setTextureColorSpace(this.renderTarget.texture,SRGBColorSpace))}},color_average_default="void mainImage(const in vec4 inputColor,const in vec2 uv,out vec4 outputColor){outputColor=vec4(vec3(average(inputColor.rgb)),inputColor.a);}",ColorAverageEffect=class extends Effect$1{constructor(tt){super("ColorAverageEffect",color_average_default,{blendFunction:tt})}},depth_of_field_default=`#ifdef FRAMEBUFFER_PRECISION_HIGH -uniform mediump sampler2D nearColorBuffer;uniform mediump sampler2D farColorBuffer; -#else -uniform lowp sampler2D nearColorBuffer;uniform lowp sampler2D farColorBuffer; -#endif -uniform lowp sampler2D nearCoCBuffer;uniform lowp sampler2D farCoCBuffer;uniform float scale;void mainImage(const in vec4 inputColor,const in vec2 uv,const in float depth,out vec4 outputColor){vec4 colorNear=texture2D(nearColorBuffer,uv);vec4 colorFar=texture2D(farColorBuffer,uv); -#if MASK_FUNCTION == 1 -vec2 cocNearFar=vec2(texture2D(nearCoCBuffer,uv).r,colorFar.a);cocNearFar.x=min(cocNearFar.x*scale,1.0); -#else -vec2 cocNearFar=vec2(texture2D(nearCoCBuffer,uv).r,texture2D(farCoCBuffer,uv).g);cocNearFar=min(cocNearFar*scale,1.0); -#endif -vec4 result=inputColor*(1.0-cocNearFar.y)+colorFar;result=mix(result,colorNear,cocNearFar.x);outputColor=result;}`,DepthOfFieldEffect=class extends Effect$1{constructor(tt,{blendFunction:et,worldFocusDistance:nt,worldFocusRange:rt,focusDistance:it=0,focalLength:ot=.1,focusRange:at=ot,bokehScale:st=1,resolutionScale:lt=1,width:ct=Resolution.AUTO_SIZE,height:ut=Resolution.AUTO_SIZE,resolutionX:ht=ct,resolutionY:dt=ut}={}){super("DepthOfFieldEffect",depth_of_field_default,{blendFunction:et,attributes:EffectAttribute.DEPTH,uniforms:new Map([["nearColorBuffer",new Uniform(null)],["farColorBuffer",new Uniform(null)],["nearCoCBuffer",new Uniform(null)],["farCoCBuffer",new Uniform(null)],["scale",new Uniform(1)]])}),this.camera=tt,this.renderTarget=new WebGLRenderTarget(1,1,{depthBuffer:!1}),this.renderTarget.texture.name="DoF.Intermediate",this.renderTargetMasked=this.renderTarget.clone(),this.renderTargetMasked.texture.name="DoF.Masked.Far",this.renderTargetNear=this.renderTarget.clone(),this.renderTargetNear.texture.name="DoF.Bokeh.Near",this.uniforms.get("nearColorBuffer").value=this.renderTargetNear.texture,this.renderTargetFar=this.renderTarget.clone(),this.renderTargetFar.texture.name="DoF.Bokeh.Far",this.uniforms.get("farColorBuffer").value=this.renderTargetFar.texture,this.renderTargetCoC=this.renderTarget.clone(),this.renderTargetCoC.texture.name="DoF.CoC",this.uniforms.get("farCoCBuffer").value=this.renderTargetCoC.texture,this.renderTargetCoCBlurred=this.renderTargetCoC.clone(),this.renderTargetCoCBlurred.texture.name="DoF.CoC.Blurred",this.uniforms.get("nearCoCBuffer").value=this.renderTargetCoCBlurred.texture,this.cocPass=new ShaderPass(new CircleOfConfusionMaterial(tt));const pt=this.cocMaterial;pt.focusDistance=it,pt.focusRange=at,nt!==void 0&&(pt.worldFocusDistance=nt),rt!==void 0&&(pt.worldFocusRange=rt),this.blurPass=new KawaseBlurPass({resolutionScale:lt,resolutionX:ht,resolutionY:dt,kernelSize:KernelSize.MEDIUM}),this.maskPass=new ShaderPass(new MaskMaterial(this.renderTargetCoC.texture));const mt=this.maskPass.fullscreenMaterial;mt.colorChannel=ColorChannel.GREEN,this.maskFunction=MaskFunction.MULTIPLY_RGB,this.bokehNearBasePass=new ShaderPass(new BokehMaterial(!1,!0)),this.bokehNearBasePass.fullscreenMaterial.cocBuffer=this.renderTargetCoCBlurred.texture,this.bokehNearFillPass=new ShaderPass(new BokehMaterial(!0,!0)),this.bokehNearFillPass.fullscreenMaterial.cocBuffer=this.renderTargetCoCBlurred.texture,this.bokehFarBasePass=new ShaderPass(new BokehMaterial(!1,!1)),this.bokehFarBasePass.fullscreenMaterial.cocBuffer=this.renderTargetCoC.texture,this.bokehFarFillPass=new ShaderPass(new BokehMaterial(!0,!1)),this.bokehFarFillPass.fullscreenMaterial.cocBuffer=this.renderTargetCoC.texture,this.target=null;const gt=this.resolution=new Resolution(this,ht,dt,lt);gt.addEventListener("change",yt=>this.setSize(gt.baseWidth,gt.baseHeight)),this.bokehScale=st}set mainCamera(tt){this.camera=tt,this.cocMaterial.copyCameraSettings(tt)}get cocTexture(){return this.renderTargetCoC.texture}get maskFunction(){return this.maskPass.fullscreenMaterial.maskFunction}set maskFunction(tt){this.maskFunction!==tt&&(this.defines.set("MASK_FUNCTION",tt.toFixed(0)),this.maskPass.fullscreenMaterial.maskFunction=tt,this.setChanged())}get cocMaterial(){return this.cocPass.fullscreenMaterial}get circleOfConfusionMaterial(){return this.cocMaterial}getCircleOfConfusionMaterial(){return this.cocMaterial}getBlurPass(){return this.blurPass}getResolution(){return this.resolution}get bokehScale(){return this.uniforms.get("scale").value}set bokehScale(tt){this.bokehNearBasePass.fullscreenMaterial.scale=tt,this.bokehNearFillPass.fullscreenMaterial.scale=tt,this.bokehFarBasePass.fullscreenMaterial.scale=tt,this.bokehFarFillPass.fullscreenMaterial.scale=tt,this.maskPass.fullscreenMaterial.strength=tt,this.uniforms.get("scale").value=tt}getBokehScale(){return this.bokehScale}setBokehScale(tt){this.bokehScale=tt}getTarget(){return this.target}setTarget(tt){this.target=tt}calculateFocusDistance(tt){const et=this.camera,nt=et.position.distanceTo(tt);return viewZToOrthographicDepth(-nt,et.near,et.far)}setDepthTexture(tt,et=BasicDepthPacking){this.cocMaterial.depthBuffer=tt,this.cocMaterial.depthPacking=et}update(tt,et,nt){const rt=this.renderTarget,it=this.renderTargetCoC,ot=this.renderTargetCoCBlurred,at=this.renderTargetMasked;if(this.target!==null){const st=this.calculateFocusDistance(this.target);this.cocMaterial.focusDistance=st}this.cocPass.render(tt,null,it),this.blurPass.render(tt,it,ot),this.maskPass.render(tt,et,at),this.bokehFarBasePass.render(tt,at,rt),this.bokehFarFillPass.render(tt,rt,this.renderTargetFar),this.bokehNearBasePass.render(tt,et,rt),this.bokehNearFillPass.render(tt,rt,this.renderTargetNear)}setSize(tt,et){const nt=this.resolution;nt.setBaseSize(tt,et);const rt=nt.width,it=nt.height;this.cocPass.setSize(tt,et),this.blurPass.setSize(tt,et),this.maskPass.setSize(tt,et),this.renderTargetFar.setSize(tt,et),this.renderTargetCoC.setSize(tt,et),this.renderTargetMasked.setSize(tt,et),this.renderTarget.setSize(rt,it),this.renderTargetNear.setSize(rt,it),this.renderTargetCoCBlurred.setSize(rt,it),this.bokehNearBasePass.fullscreenMaterial.setSize(tt,et),this.bokehNearFillPass.fullscreenMaterial.setSize(tt,et),this.bokehFarBasePass.fullscreenMaterial.setSize(tt,et),this.bokehFarFillPass.fullscreenMaterial.setSize(tt,et)}initialize(tt,et,nt){this.cocPass.initialize(tt,et,nt),this.maskPass.initialize(tt,et,nt),this.bokehNearBasePass.initialize(tt,et,nt),this.bokehNearFillPass.initialize(tt,et,nt),this.bokehFarBasePass.initialize(tt,et,nt),this.bokehFarFillPass.initialize(tt,et,nt),this.blurPass.initialize(tt,et,UnsignedByteType),tt.capabilities.logarithmicDepthBuffer&&(this.cocPass.fullscreenMaterial.defines.LOG_DEPTH="1"),nt!==void 0&&(this.renderTarget.texture.type=nt,this.renderTargetNear.texture.type=nt,this.renderTargetFar.texture.type=nt,this.renderTargetMasked.texture.type=nt,getOutputColorSpace(tt)===SRGBColorSpace&&(setTextureColorSpace(this.renderTarget.texture,SRGBColorSpace),setTextureColorSpace(this.renderTargetNear.texture,SRGBColorSpace),setTextureColorSpace(this.renderTargetFar.texture,SRGBColorSpace),setTextureColorSpace(this.renderTargetMasked.texture,SRGBColorSpace)))}};function createCanvas(tt,et,nt){const rt=document.createElement("canvas"),it=rt.getContext("2d");if(rt.width=tt,rt.height=et,nt instanceof Image)it.drawImage(nt,0,0);else{const ot=it.createImageData(tt,et);ot.data.set(nt),it.putImageData(ot,0,0)}return rt}var RawImageData=class bw{constructor(et=0,nt=0,rt=null){this.width=et,this.height=nt,this.data=rt}toCanvas(){return typeof document>"u"?null:createCanvas(this.width,this.height,this.data)}static from(et){const{width:nt,height:rt}=et;let it;if(et instanceof Image){const ot=createCanvas(nt,rt,et);ot!==null&&(it=ot.getContext("2d").getImageData(0,0,nt,rt).data)}else it=et.data;return new bw(nt,rt,it)}},worker_default=`"use strict";(()=>{var O={SCALE_UP:"lut.scaleup"};var _=[new Float32Array(3),new Float32Array(3)],n=[new Float32Array(3),new Float32Array(3),new Float32Array(3),new Float32Array(3)],Z=[[new Float32Array([0,0,0]),new Float32Array([1,0,0]),new Float32Array([1,1,0]),new Float32Array([1,1,1])],[new Float32Array([0,0,0]),new Float32Array([1,0,0]),new Float32Array([1,0,1]),new Float32Array([1,1,1])],[new Float32Array([0,0,0]),new Float32Array([0,0,1]),new Float32Array([1,0,1]),new Float32Array([1,1,1])],[new Float32Array([0,0,0]),new Float32Array([0,1,0]),new Float32Array([1,1,0]),new Float32Array([1,1,1])],[new Float32Array([0,0,0]),new Float32Array([0,1,0]),new Float32Array([0,1,1]),new Float32Array([1,1,1])],[new Float32Array([0,0,0]),new Float32Array([0,0,1]),new Float32Array([0,1,1]),new Float32Array([1,1,1])]];function d(a,t,r,m){let i=r[0]-t[0],e=r[1]-t[1],y=r[2]-t[2],h=a[0]-t[0],A=a[1]-t[1],w=a[2]-t[2],c=e*w-y*A,l=y*h-i*w,x=i*A-e*h,u=Math.sqrt(c*c+l*l+x*x),b=u*.5,s=c/u,F=l/u,f=x/u,p=-(a[0]*s+a[1]*F+a[2]*f),M=m[0]*s+m[1]*F+m[2]*f;return Math.abs(M+p)*b/3}function V(a,t,r,m,i,e){let y=(r+m*t+i*t*t)*4;e[0]=a[y+0],e[1]=a[y+1],e[2]=a[y+2]}function k(a,t,r,m,i,e){let y=r*(t-1),h=m*(t-1),A=i*(t-1),w=Math.floor(y),c=Math.floor(h),l=Math.floor(A),x=Math.ceil(y),u=Math.ceil(h),b=Math.ceil(A),s=y-w,F=h-c,f=A-l;if(w===y&&c===h&&l===A)V(a,t,y,h,A,e);else{let p;s>=F&&F>=f?p=Z[0]:s>=f&&f>=F?p=Z[1]:f>=s&&s>=F?p=Z[2]:F>=s&&s>=f?p=Z[3]:F>=f&&f>=s?p=Z[4]:f>=F&&F>=s&&(p=Z[5]);let[M,g,X,Y]=p,P=_[0];P[0]=s,P[1]=F,P[2]=f;let o=_[1],L=x-w,S=u-c,U=b-l;o[0]=L*M[0]+w,o[1]=S*M[1]+c,o[2]=U*M[2]+l,V(a,t,o[0],o[1],o[2],n[0]),o[0]=L*g[0]+w,o[1]=S*g[1]+c,o[2]=U*g[2]+l,V(a,t,o[0],o[1],o[2],n[1]),o[0]=L*X[0]+w,o[1]=S*X[1]+c,o[2]=U*X[2]+l,V(a,t,o[0],o[1],o[2],n[2]),o[0]=L*Y[0]+w,o[1]=S*Y[1]+c,o[2]=U*Y[2]+l,V(a,t,o[0],o[1],o[2],n[3]);let T=d(g,X,Y,P)*6,q=d(M,X,Y,P)*6,C=d(M,g,Y,P)*6,E=d(M,g,X,P)*6;n[0][0]*=T,n[0][1]*=T,n[0][2]*=T,n[1][0]*=q,n[1][1]*=q,n[1][2]*=q,n[2][0]*=C,n[2][1]*=C,n[2][2]*=C,n[3][0]*=E,n[3][1]*=E,n[3][2]*=E,e[0]=n[0][0]+n[1][0]+n[2][0]+n[3][0],e[1]=n[0][1]+n[1][1]+n[2][1]+n[3][1],e[2]=n[0][2]+n[1][2]+n[2][2]+n[3][2]}}var v=class{static expand(t,r){let m=Math.cbrt(t.length/4),i=new Float32Array(3),e=new t.constructor(r**3*4),y=t instanceof Uint8Array?255:1,h=r**2,A=1/(r-1);for(let w=0;w{let t=a.data,r=t.data;switch(t.operation){case O.SCALE_UP:r=v.expand(r,t.size);break}postMessage(r,[r.buffer]),close()});})(); -`,c$2=new Color$1,LookupTexture=class j0 extends Data3DTexture{constructor(et,nt){super(et,nt,nt,nt),this.type=FloatType,this.format=RGBAFormat,this.minFilter=LinearFilter,this.magFilter=LinearFilter,this.wrapS=ClampToEdgeWrapping,this.wrapT=ClampToEdgeWrapping,this.wrapR=ClampToEdgeWrapping,this.unpackAlignment=1,this.needsUpdate=!0,setTextureColorSpace(this,LinearSRGBColorSpace),this.domainMin=new Vector3(0,0,0),this.domainMax=new Vector3(1,1,1)}get isLookupTexture3D(){return!0}scaleUp(et,nt=!0){const rt=this.image;let it;return et<=rt.width?it=Promise.reject(new Error("The target size must be greater than the current size")):it=new Promise((ot,at)=>{const st=URL.createObjectURL(new Blob([worker_default],{type:"text/javascript"})),lt=new Worker(st);lt.addEventListener("error",ut=>at(ut.error)),lt.addEventListener("message",ut=>{const ht=new j0(ut.data,et);copyTextureColorSpace(this,ht),ht.type=this.type,ht.name=this.name,URL.revokeObjectURL(st),ot(ht)});const ct=nt?[rt.data.buffer]:[];lt.postMessage({operation:LUTOperation.SCALE_UP,data:rt.data,size:et},ct)}),it}applyLUT(et){const nt=this.image,rt=et.image,it=Math.min(nt.width,nt.height,nt.depth),ot=Math.min(rt.width,rt.height,rt.depth);if(it!==ot)console.error("Size mismatch");else if(et.type!==FloatType||this.type!==FloatType)console.error("Both LUTs must be FloatType textures");else if(et.format!==RGBAFormat||this.format!==RGBAFormat)console.error("Both LUTs must be RGBA textures");else{const at=nt.data,st=rt.data,lt=it,ct=lt**2,ut=lt-1;for(let ht=0,dt=lt**3;htit){at=new Uint8Array(ct.length);for(let ut=0;utdistortion.x-columns*random){float sx=clamp(ceil(seeds.x),0.0,1.0);uv.y=sx*(1.0-(uv.y+distortion.y))+(1.0-sx)*distortion.y;}if(uv.xdistortion.y-columns*random){float sy=clamp(ceil(seeds.y),0.0,1.0);uv.x=sy*distortion.x+(1.0-sy)*(1.0-(uv.x+distortion.x));}vec2 normal=texture2D(perturbationMap,uv*random*random).rg;uv+=normal*seeds*(random*0.2);}}",textureTag="Glitch.Generated";function randomFloat(tt,et){return tt+Math.random()*(et-tt)}var GlitchEffect=class extends Effect$1{constructor({chromaticAberrationOffset:tt=null,delay:et=new Vector2(1.5,3.5),duration:nt=new Vector2(.6,1),strength:rt=new Vector2(.3,1),columns:it=.05,ratio:ot=.85,perturbationMap:at=null,dtSize:st=64}={}){if(super("GlitchEffect",glitch_default,{uniforms:new Map([["perturbationMap",new Uniform(null)],["columns",new Uniform(it)],["active",new Uniform(!1)],["random",new Uniform(1)],["seeds",new Uniform(new Vector2)],["distortion",new Uniform(new Vector2)]])}),at===null){const lt=new NoiseTexture(st,st,RGBAFormat);lt.name=textureTag,this.perturbationMap=lt}else this.perturbationMap=at;this.time=0,this.distortion=this.uniforms.get("distortion").value,this.delay=et,this.duration=nt,this.breakPoint=new Vector2(randomFloat(this.delay.x,this.delay.y),randomFloat(this.duration.x,this.duration.y)),this.strength=rt,this.mode=GlitchMode.SPORADIC,this.ratio=ot,this.chromaticAberrationOffset=tt}get seeds(){return this.uniforms.get("seeds").value}get active(){return this.uniforms.get("active").value}isActive(){return this.active}get minDelay(){return this.delay.x}set minDelay(tt){this.delay.x=tt}getMinDelay(){return this.delay.x}setMinDelay(tt){this.delay.x=tt}get maxDelay(){return this.delay.y}set maxDelay(tt){this.delay.y=tt}getMaxDelay(){return this.delay.y}setMaxDelay(tt){this.delay.y=tt}get minDuration(){return this.duration.x}set minDuration(tt){this.duration.x=tt}getMinDuration(){return this.duration.x}setMinDuration(tt){this.duration.x=tt}get maxDuration(){return this.duration.y}set maxDuration(tt){this.duration.y=tt}getMaxDuration(){return this.duration.y}setMaxDuration(tt){this.duration.y=tt}get minStrength(){return this.strength.x}set minStrength(tt){this.strength.x=tt}getMinStrength(){return this.strength.x}setMinStrength(tt){this.strength.x=tt}get maxStrength(){return this.strength.y}set maxStrength(tt){this.strength.y=tt}getMaxStrength(){return this.strength.y}setMaxStrength(tt){this.strength.y=tt}getMode(){return this.mode}setMode(tt){this.mode=tt}getGlitchRatio(){return 1-this.ratio}setGlitchRatio(tt){this.ratio=Math.min(Math.max(1-tt,0),1)}get columns(){return this.uniforms.get("columns").value}set columns(tt){this.uniforms.get("columns").value=tt}getGlitchColumns(){return this.columns}setGlitchColumns(tt){this.columns=tt}getChromaticAberrationOffset(){return this.chromaticAberrationOffset}setChromaticAberrationOffset(tt){this.chromaticAberrationOffset=tt}get perturbationMap(){return this.uniforms.get("perturbationMap").value}set perturbationMap(tt){const et=this.perturbationMap;et!==null&&et.name===textureTag&&et.dispose(),tt.minFilter=tt.magFilter=NearestFilter,tt.wrapS=tt.wrapT=RepeatWrapping,tt.generateMipmaps=!1,this.uniforms.get("perturbationMap").value=tt}getPerturbationMap(){return this.perturbationMap}setPerturbationMap(tt){this.perturbationMap=tt}generatePerturbationMap(tt=64){const et=new NoiseTexture(tt,tt,RGBAFormat);return et.name=textureTag,et}update(tt,et,nt){const rt=this.mode,it=this.breakPoint,ot=this.chromaticAberrationOffset,at=this.strength;let st=this.time,lt=!1,ct=0,ut=0,ht;rt!==GlitchMode.DISABLED&&(rt===GlitchMode.SPORADIC&&(st+=nt,ht=st>it.x,st>=it.x+it.y&&(it.set(randomFloat(this.delay.x,this.delay.y),randomFloat(this.duration.x,this.duration.y)),st=0)),ct=Math.random(),this.uniforms.get("random").value=ct,ht&&ct>this.ratio||rt===GlitchMode.CONSTANT_WILD?(lt=!0,ct*=at.y*.03,ut=randomFloat(-Math.PI,Math.PI),this.seeds.set(randomFloat(-at.y,at.y),randomFloat(-at.y,at.y)),this.distortion.set(randomFloat(0,1),randomFloat(0,1))):(ht||rt===GlitchMode.CONSTANT_MILD)&&(lt=!0,ct*=at.x*.03,ut=randomFloat(-Math.PI,Math.PI),this.seeds.set(randomFloat(-at.x,at.x),randomFloat(-at.x,at.x)),this.distortion.set(randomFloat(0,1),randomFloat(0,1))),this.time=st),ot!==null&&(lt?ot.set(Math.cos(ut),Math.sin(ut)).multiplyScalar(ct):ot.set(0,0)),this.uniforms.get("active").value=lt}dispose(){const tt=this.perturbationMap;tt!==null&&tt.name===textureTag&&tt.dispose()}},god_rays_default=`#ifdef FRAMEBUFFER_PRECISION_HIGH -uniform mediump sampler2D map; -#else -uniform lowp sampler2D map; -#endif -void mainImage(const in vec4 inputColor,const in vec2 uv,out vec4 outputColor){outputColor=texture2D(map,uv);}`,v$1=new Vector3,m$1=new Matrix4,GodRaysEffect=class extends Effect$1{constructor(tt,et,{blendFunction:nt=BlendFunction.SCREEN,samples:rt=60,density:it=.96,decay:ot=.9,weight:at=.4,exposure:st=.6,clampMax:lt=1,blur:ct=!0,kernelSize:ut=KernelSize.SMALL,resolutionScale:ht=.5,width:dt=Resolution.AUTO_SIZE,height:pt=Resolution.AUTO_SIZE,resolutionX:mt=dt,resolutionY:gt=pt}={}){super("GodRaysEffect",god_rays_default,{blendFunction:nt,attributes:EffectAttribute.DEPTH,uniforms:new Map([["map",new Uniform(null)]])}),this.camera=tt,this._lightSource=et,this.lightSource=et,this.lightScene=new Scene,this.screenPosition=new Vector2,this.renderTargetA=new WebGLRenderTarget(1,1,{depthBuffer:!1}),this.renderTargetA.texture.name="GodRays.Target.A",this.renderTargetB=this.renderTargetA.clone(),this.renderTargetB.texture.name="GodRays.Target.B",this.uniforms.get("map").value=this.renderTargetB.texture,this.renderTargetLight=new WebGLRenderTarget(1,1),this.renderTargetLight.texture.name="GodRays.Light",this.renderTargetLight.depthTexture=new DepthTexture,this.renderPassLight=new RenderPass(this.lightScene,tt),this.renderPassLight.clearPass.overrideClearColor=new Color$1(0),this.clearPass=new ClearPass(!0,!1,!1),this.clearPass.overrideClearColor=new Color$1(0),this.blurPass=new KawaseBlurPass({kernelSize:ut}),this.blurPass.enabled=ct,this.depthMaskPass=new ShaderPass(new DepthMaskMaterial);const yt=this.depthMaskMaterial;yt.depthBuffer1=this.renderTargetLight.depthTexture,yt.copyCameraSettings(tt),this.godRaysPass=new ShaderPass(new GodRaysMaterial(this.screenPosition));const bt=this.godRaysMaterial;bt.density=it,bt.decay=ot,bt.weight=at,bt.exposure=st,bt.maxIntensity=lt,bt.samples=rt;const vt=this.resolution=new Resolution(this,mt,gt,ht);vt.addEventListener("change",xt=>this.setSize(vt.baseWidth,vt.baseHeight))}set mainCamera(tt){this.camera=tt,this.renderPassLight.mainCamera=tt,this.depthMaskMaterial.copyCameraSettings(tt)}get lightSource(){return this._lightSource}set lightSource(tt){this._lightSource=tt,tt!==null&&(tt.material.depthWrite=!1,tt.material.transparent=!0)}getBlurPass(){return this.blurPass}get texture(){return this.renderTargetB.texture}getTexture(){return this.texture}get depthMaskMaterial(){return this.depthMaskPass.fullscreenMaterial}get godRaysMaterial(){return this.godRaysPass.fullscreenMaterial}getGodRaysMaterial(){return this.godRaysMaterial}getResolution(){return this.resolution}get width(){return this.resolution.width}set width(tt){this.resolution.preferredWidth=tt}get height(){return this.resolution.height}set height(tt){this.resolution.preferredHeight=tt}get dithering(){return this.godRaysMaterial.dithering}set dithering(tt){const et=this.godRaysMaterial;et.dithering=tt,et.needsUpdate=!0}get blur(){return this.blurPass.enabled}set blur(tt){this.blurPass.enabled=tt}get kernelSize(){return this.blurPass.kernelSize}set kernelSize(tt){this.blurPass.kernelSize=tt}getResolutionScale(){return this.resolution.scale}setResolutionScale(tt){this.resolution.scale=tt}get samples(){return this.godRaysMaterial.samples}set samples(tt){this.godRaysMaterial.samples=tt}setDepthTexture(tt,et=BasicDepthPacking){this.depthMaskPass.fullscreenMaterial.depthBuffer0=tt,this.depthMaskPass.fullscreenMaterial.depthPacking0=et}update(tt,et,nt){const rt=this.lightSource,it=rt.parent,ot=rt.matrixAutoUpdate,at=this.renderTargetA,st=this.renderTargetLight;rt.material.depthWrite=!0,rt.matrixAutoUpdate=!1,rt.updateWorldMatrix(!0,!1),it!==null&&(ot||m$1.copy(rt.matrix),rt.matrix.copy(rt.matrixWorld)),this.lightScene.add(rt),this.renderPassLight.render(tt,st),this.clearPass.render(tt,at),this.depthMaskPass.render(tt,st,at),rt.material.depthWrite=!1,rt.matrixAutoUpdate=ot,it!==null&&(ot||rt.matrix.copy(m$1),it.add(rt)),v$1.setFromMatrixPosition(rt.matrixWorld).project(this.camera),this.screenPosition.set(Math.min(Math.max((v$1.x+1)*.5,-1),2),Math.min(Math.max((v$1.y+1)*.5,-1),2)),this.blurPass.enabled&&this.blurPass.render(tt,at,at),this.godRaysPass.render(tt,at,this.renderTargetB)}setSize(tt,et){const nt=this.resolution;nt.setBaseSize(tt,et);const rt=nt.width,it=nt.height;this.renderTargetA.setSize(rt,it),this.renderTargetB.setSize(rt,it),this.renderTargetLight.setSize(rt,it),this.blurPass.resolution.copy(nt)}initialize(tt,et,nt){this.blurPass.initialize(tt,et,nt),this.renderPassLight.initialize(tt,et,nt),this.depthMaskPass.initialize(tt,et,nt),this.godRaysPass.initialize(tt,et,nt),nt!==void 0&&(this.renderTargetA.texture.type=nt,this.renderTargetB.texture.type=nt,this.renderTargetLight.texture.type=nt,getOutputColorSpace(tt)===SRGBColorSpace&&(setTextureColorSpace(this.renderTargetA.texture,SRGBColorSpace),setTextureColorSpace(this.renderTargetB.texture,SRGBColorSpace),setTextureColorSpace(this.renderTargetLight.texture,SRGBColorSpace)))}},grid_default="uniform vec2 scale;uniform float lineWidth;void mainImage(const in vec4 inputColor,const in vec2 uv,out vec4 outputColor){float grid=0.5-max(abs(mod(uv.x*scale.x,1.0)-0.5),abs(mod(uv.y*scale.y,1.0)-0.5));outputColor=vec4(vec3(smoothstep(0.0,lineWidth,grid)),inputColor.a);}",GridEffect=class extends Effect$1{constructor({blendFunction:tt=BlendFunction.OVERLAY,scale:et=1,lineWidth:nt=0}={}){super("GridEffect",grid_default,{blendFunction:tt,uniforms:new Map([["scale",new Uniform(new Vector2)],["lineWidth",new Uniform(nt)]])}),this.resolution=new Vector2,this.s=0,this.scale=et,this.l=0,this.lineWidth=nt}get scale(){return this.s}set scale(tt){this.s=Math.max(tt,1e-6),this.setSize(this.resolution.width,this.resolution.height)}getScale(){return this.scale}setScale(tt){this.scale=tt}get lineWidth(){return this.l}set lineWidth(tt){this.l=tt,this.setSize(this.resolution.width,this.resolution.height)}getLineWidth(){return this.lineWidth}setLineWidth(tt){this.lineWidth=tt}setSize(tt,et){this.resolution.set(tt,et);const nt=tt/et,rt=this.scale*(et*.125);this.uniforms.get("scale").value.set(nt*rt,rt),this.uniforms.get("lineWidth").value=rt/et+this.lineWidth}},lut_3d_default=`uniform vec3 scale;uniform vec3 offset; -#ifdef CUSTOM_INPUT_DOMAIN -uniform vec3 domainMin;uniform vec3 domainMax; -#endif -#ifdef LUT_3D -#ifdef LUT_PRECISION_HIGH -#ifdef GL_FRAGMENT_PRECISION_HIGH -uniform highp sampler3D lut; -#else -uniform mediump sampler3D lut; -#endif -#else -uniform lowp sampler3D lut; -#endif -vec4 applyLUT(const in vec3 rgb){ -#ifdef TETRAHEDRAL_INTERPOLATION -vec3 p=floor(rgb);vec3 f=rgb-p;vec3 v1=(p+0.5)*LUT_TEXEL_WIDTH;vec3 v4=(p+1.5)*LUT_TEXEL_WIDTH;vec3 v2,v3;vec3 frac;if(f.r>=f.g){if(f.g>f.b){frac=f.rgb;v2=vec3(v4.x,v1.y,v1.z);v3=vec3(v4.x,v4.y,v1.z);}else if(f.r>=f.b){frac=f.rbg;v2=vec3(v4.x,v1.y,v1.z);v3=vec3(v4.x,v1.y,v4.z);}else{frac=f.brg;v2=vec3(v1.x,v1.y,v4.z);v3=vec3(v4.x,v1.y,v4.z);}}else{if(f.b>f.g){frac=f.bgr;v2=vec3(v1.x,v1.y,v4.z);v3=vec3(v1.x,v4.y,v4.z);}else if(f.r>=f.b){frac=f.grb;v2=vec3(v1.x,v4.y,v1.z);v3=vec3(v4.x,v4.y,v1.z);}else{frac=f.gbr;v2=vec3(v1.x,v4.y,v1.z);v3=vec3(v1.x,v4.y,v4.z);}}vec4 n1=texture(lut,v1);vec4 n2=texture(lut,v2);vec4 n3=texture(lut,v3);vec4 n4=texture(lut,v4);vec4 weights=vec4(1.0-frac.x,frac.x-frac.y,frac.y-frac.z,frac.z);vec4 result=weights*mat4(vec4(n1.r,n2.r,n3.r,n4.r),vec4(n1.g,n2.g,n3.g,n4.g),vec4(n1.b,n2.b,n3.b,n4.b),vec4(1.0));return vec4(result.rgb,1.0); -#else -return texture(lut,rgb); -#endif +`, + Table = ({ data: tt, showMuted: et }) => { + const nt = async (rt, it) => { + if (tt != null && tt.length) + try { + await putNodeData({ ref_id: rt, node_name: 'muted_topic', node_value: it }) + } catch (ot) { + console.warn(ot) + } + } + return tt != null && tt.length + ? jsxRuntimeExports.jsxs(MaterialTable, { + component: 'table', + children: [ + jsxRuntimeExports.jsx(StyledTableHead, { + children: jsxRuntimeExports.jsxs(TableRow$1, { + component: 'tr', + children: [ + jsxRuntimeExports.jsx(StyledTableCell, { className: 'empty' }), + jsxRuntimeExports.jsx(StyledTableCell, { children: 'Type' }), + jsxRuntimeExports.jsx(StyledTableCell, { children: et ? 'Unmute' : 'Mute' }), + ], + }), + }), + (tt == null ? void 0 : tt.length) && + jsxRuntimeExports.jsx('tbody', { + children: + tt == null + ? void 0 + : tt.map((rt) => + jsxRuntimeExports.jsxs( + StyledTableRow, + { + children: [ + jsxRuntimeExports.jsx(StyledTableCell, { className: 'empty' }), + jsxRuntimeExports.jsx(StyledTableCell, { children: rt.topic }), + jsxRuntimeExports.jsx(StyledTableCell, { + className: 'cell-center', + children: jsxRuntimeExports.jsx(Flex, { + direction: 'row', + justify: 'space-between', + children: jsxRuntimeExports.jsx('div', { + className: 'approve-wrapper', + children: rt.muted_topic + ? jsxRuntimeExports.jsx(IconWrapper$2, { + className: 'centered', + onClick: () => nt(rt.ref_id, !1), + children: jsxRuntimeExports.jsx(MdCheckCircle, { + color: colors.primaryGreen, + fontSize: 24, + }), + }) + : jsxRuntimeExports.jsx(IconWrapper$2, { + className: 'centered', + onClick: () => nt(rt.ref_id, !0), + children: jsxRuntimeExports.jsx(MdCancel, { + color: colors.primaryRed, + fontSize: 24, + }), + }), + }), + }), + }), + jsxRuntimeExports.jsx(StyledTableCell, { className: 'empty' }), + ], + }, + rt.topic, + ), + ), + }), + ], + }) + : jsxRuntimeExports.jsxs(Flex, { + children: [ + jsxRuntimeExports.jsx(Text$3, { children: 'There is not any results for selected filters' }), + jsxRuntimeExports.jsx(FilterOffIcon, {}), + ], + }) + }, + IconWrapper$2 = styled$4(Flex)` + width: 20px; + height: 20px; + border-radius: 50%; + cursor: pointer; + background: transparent; + color: ${colors.lightBlue500}; + &.centered { + margin: 0 auto; + } + + & + & { + margin-left: 4px; + } +`, + TopicSources = () => { + const [tt, et] = reactExports.useState(!0), + [nt, rt] = reactExports.useState(!1), + [it, ot] = useDataStore((at) => [at.topics, at.setTopics]) + return ( + reactExports.useEffect(() => { + ;(async () => { + et(!0) + try { + const lt = await getTopicsData({ muted: nt ? 'True' : 'False' }) + ot(lt.data) + } catch (st) { + console.warn(st) + } finally { + et(!1) + } + })() + }, [ot, nt]), + jsxRuntimeExports.jsxs(Wrapper$i, { + align: 'stretch', + direction: 'column', + justify: 'flex-end', + children: [ + jsxRuntimeExports.jsx(Heading$4, { + align: 'flex-start', + justify: 'space-between', + children: jsxRuntimeExports.jsx(Text$3, { className: 'title', children: 'Topics' }), + }), + jsxRuntimeExports.jsx(Pill, { + className: 'booster__pill', + onClick: () => rt(!nt), + style: { marginLeft: '30px', marginBottom: '10px', padding: '5px 10px 5px 10px', width: 'fit-content' }, + children: tt + ? jsxRuntimeExports.jsx(ClipLoader$2, { color: colors.white }) + : jsxRuntimeExports.jsx(Flex, { + align: 'center', + direction: 'row', + justify: 'center', + children: jsxRuntimeExports.jsxs('div', { + style: { fontSize: 10 }, + children: ['Show ', nt ? 'Unmuted' : 'Muted'], + }), + }), + }), + jsxRuntimeExports.jsx(TableWrapper, { + align: 'center', + justify: tt ? 'center' : 'flex-start', + children: tt + ? jsxRuntimeExports.jsx(ClipLoader$2, { color: colors.white }) + : jsxRuntimeExports.jsx(Table, { data: it, showMuted: nt }), + }), + ], + }) + ) + }, + Wrapper$i = styled$4(Flex)` + flex: 1; + + .title { + margin-bottom: 32px; + font-size: 20px; + color: ${colors.white}; + font-family: Barlow; + font-size: 22px; + font-style: normal; + font-weight: 600; + line-height: normal; + } + + .subtitle { + color: ${colors.GRAY3}; + font-family: Barlow; + font-size: 13px; + font-style: normal; + font-weight: 400; + line-height: normal; + } + + & .filters { + overflow-x: auto; + } +`, + TableWrapper = styled$4(Flex)` + min-height: 0; + overflow: auto; + flex: 1; + width: 100%; +`, + TabPanel = (tt) => { + const { children: et, value: nt, index: rt, ...it } = tt + return nt === rt + ? jsxRuntimeExports.jsx(TabPanelWrapper, { + 'aria-labelledby': `simple-tab-${rt}`, + hidden: nt !== rt, + id: `simple-tabpanel-${rt}`, + role: 'tabpanel', + ...it, + children: et, + }) + : null + } + function a11yProps(tt) { + return { id: `simple-tab-${tt}`, 'aria-controls': `simple-tabpanel-${tt}` } + } + const SourcesView = () => { + const [tt, et] = reactExports.useState(0), + nt = (rt, it) => { + et(it) + } + return jsxRuntimeExports.jsxs(Wrapper$h, { + direction: 'column', + children: [ + jsxRuntimeExports.jsxs(StyledTabs, { + 'aria-label': 'basic tabs example', + onChange: nt, + value: tt, + children: [ + jsxRuntimeExports.jsx(StyledTab, { disableRipple: !0, label: 'Sources table', ...a11yProps(0) }), + jsxRuntimeExports.jsx(StyledTab, { + color: colors.white, + disableRipple: !0, + label: 'Queued sources', + ...a11yProps(1), + }), + jsxRuntimeExports.jsx(StyledTab, { + color: colors.white, + disableRipple: !0, + label: 'Topics', + ...a11yProps(1), + }), + ], + }), + jsxRuntimeExports.jsx(TabPanel, { index: 0, value: tt, children: jsxRuntimeExports.jsx(Sources, {}) }), + jsxRuntimeExports.jsx(TabPanel, { index: 1, value: tt, children: jsxRuntimeExports.jsx(QueuedSources, {}) }), + jsxRuntimeExports.jsx(TabPanel, { index: 2, value: tt, children: jsxRuntimeExports.jsx(TopicSources, {}) }), + ], + }) + }, + StyledTabs = styled$4(Tabs$1)` + && { + background: rgba(0, 0, 0, 0.2); + + .MuiTabs-indicator { + background: ${colors.primaryBlue}; + } + } +`, + StyledTab = styled$4(Tab$2)` + && { + padding: 30px 0 24px; + color: ${colors.GRAY6}; + margin-left: 34px; + font-family: Barlow; + font-size: 16px; + font-style: normal; + font-weight: 500; + + &.Mui-selected { + color: ${colors.white}; + } + } +`, + TabPanelWrapper = styled$4(Flex)` + display: flex; + flex: 1; + min-height: 572px; + padding: 20px 0; + max-height: 572px; +`, + Wrapper$h = styled$4(Flex)` + min-height: 0; + flex: 1; +`, + SourcesTableModal = () => { + const { close: tt } = useModal('sourcesTable') + return jsxRuntimeExports.jsx(BaseModal, { + background: 'BG1', + id: 'sourcesTable', + kind: 'large', + noWrap: !0, + onClose: tt, + children: jsxRuntimeExports.jsx(SourcesView, {}), + }) + }, + BubbleChartIcon = (tt) => + jsxRuntimeExports.jsx('svg', { + width: '1em', + height: '1em', + viewBox: '0 0 20 20', + fill: 'currentColor', + xmlns: 'http://www.w3.org/2000/svg', + children: jsxRuntimeExports.jsxs('g', { + id: 'bubble_chart', + children: [ + jsxRuntimeExports.jsx('mask', { + id: 'mask0_1551_42', + maskUnits: 'userSpaceOnUse', + x: '0', + y: '0', + width: '20', + height: '20', + children: jsxRuntimeExports.jsx('rect', { + id: 'Bounding box', + width: '1em', + height: '1em', + fill: 'currentColor', + }), + }), + jsxRuntimeExports.jsx('g', { + mask: 'url(#mask0_1551_42)', + children: jsxRuntimeExports.jsx('path', { + id: 'bubble_chart_2', + d: 'M5.83333 15C4.91667 15 4.13194 14.6736 3.47917 14.0208C2.82639 13.3681 2.5 12.5833 2.5 11.6667C2.5 10.75 2.82639 9.96528 3.47917 9.3125C4.13194 8.65972 4.91667 8.33333 5.83333 8.33333C6.75 8.33333 7.53472 8.65972 8.1875 9.3125C8.84028 9.96528 9.16667 10.75 9.16667 11.6667C9.16667 12.5833 8.84028 13.3681 8.1875 14.0208C7.53472 14.6736 6.75 15 5.83333 15ZM13.75 11.6667C12.4722 11.6667 11.3889 11.2222 10.5 10.3333C9.61111 9.44444 9.16667 8.36111 9.16667 7.08333C9.16667 5.80556 9.61111 4.72222 10.5 3.83333C11.3889 2.94444 12.4722 2.5 13.75 2.5C15.0278 2.5 16.1111 2.94444 17 3.83333C17.8889 4.72222 18.3333 5.80556 18.3333 7.08333C18.3333 8.36111 17.8889 9.44444 17 10.3333C16.1111 11.2222 15.0278 11.6667 13.75 11.6667ZM12.0833 17.5C11.3889 17.5 10.7986 17.2569 10.3125 16.7708C9.82639 16.2847 9.58333 15.6944 9.58333 15C9.58333 14.3056 9.82639 13.7153 10.3125 13.2292C10.7986 12.7431 11.3889 12.5 12.0833 12.5C12.7778 12.5 13.3681 12.7431 13.8542 13.2292C14.3403 13.7153 14.5833 14.3056 14.5833 15C14.5833 15.6944 14.3403 16.2847 13.8542 16.7708C13.3681 17.2569 12.7778 17.5 12.0833 17.5Z', + fill: 'currentColor', + }), + }), + ], + }), + }), + CommunitiesIcon = (tt) => + jsxRuntimeExports.jsx('svg', { + width: '1em', + height: '1em', + viewBox: '0 0 20 20', + fill: 'currentColor', + xmlns: 'http://www.w3.org/2000/svg', + children: jsxRuntimeExports.jsxs('g', { + id: 'communities', + children: [ + jsxRuntimeExports.jsx('mask', { + id: 'mask0_1551_39', + maskUnits: 'userSpaceOnUse', + x: '0', + y: '0', + width: '20', + height: '20', + children: jsxRuntimeExports.jsx('rect', { + id: 'Bounding box', + width: '1em', + height: '1em', + fill: 'currentColor', + }), + }), + jsxRuntimeExports.jsx('g', { + mask: 'url(#mask0_1551_39)', + children: jsxRuntimeExports.jsx('path', { + id: 'communities_2', + d: 'M7.50002 13.125C7.90494 13.125 8.24921 12.9832 8.53285 12.6995C8.81651 12.4159 8.95833 12.0716 8.95833 11.6667C8.95833 11.2618 8.81651 10.9175 8.53285 10.6339C8.24921 10.3502 7.90494 10.2084 7.50002 10.2084C7.0951 10.2084 6.75083 10.3502 6.46719 10.6339C6.18353 10.9175 6.04171 11.2618 6.04171 11.6667C6.04171 12.0716 6.18353 12.4159 6.46719 12.6995C6.75083 12.9832 7.0951 13.125 7.50002 13.125ZM12.5 13.125C12.9049 13.125 13.2492 12.9832 13.5329 12.6995C13.8165 12.4159 13.9583 12.0716 13.9583 11.6667C13.9583 11.2618 13.8165 10.9175 13.5329 10.6339C13.2492 10.3502 12.9049 10.2084 12.5 10.2084C12.0951 10.2084 11.7508 10.3502 11.4672 10.6339C11.1835 10.9175 11.0417 11.2618 11.0417 11.6667C11.0417 12.0716 11.1835 12.4159 11.4672 12.6995C11.7508 12.9832 12.0951 13.125 12.5 13.125ZM10 8.95833C10.4049 8.95833 10.7492 8.81651 11.0329 8.53285C11.3165 8.24922 11.4583 7.90494 11.4583 7.50002C11.4583 7.0951 11.3165 6.75083 11.0329 6.46719C10.7492 6.18354 10.4049 6.04171 10 6.04171C9.5951 6.04171 9.25083 6.18354 8.96719 6.46719C8.68354 6.75083 8.54171 7.0951 8.54171 7.50002C8.54171 7.90494 8.68354 8.24922 8.96719 8.53285C9.25083 8.81651 9.5951 8.95833 10 8.95833ZM10.0014 17.9167C8.90647 17.9167 7.87728 17.7089 6.91383 17.2933C5.95037 16.8778 5.1123 16.3138 4.39962 15.6015C3.68693 14.8891 3.12271 14.0514 2.70698 13.0884C2.29124 12.1253 2.08337 11.0964 2.08337 10.0014C2.08337 8.90647 2.29115 7.87728 2.70671 6.91383C3.12226 5.95037 3.68622 5.11231 4.39858 4.39963C5.11096 3.68693 5.94866 3.12272 6.91169 2.70698C7.8747 2.29124 8.90368 2.08337 9.99862 2.08337C11.0936 2.08337 12.1228 2.29115 13.0862 2.70671C14.0497 3.12226 14.8877 3.68622 15.6004 4.39858C16.3131 5.11096 16.8773 5.94866 17.2931 6.91169C17.7088 7.8747 17.9167 8.90368 17.9167 9.99863C17.9167 11.0936 17.7089 12.1228 17.2933 13.0862C16.8778 14.0497 16.3138 14.8877 15.6015 15.6004C14.8891 16.3131 14.0514 16.8773 13.0884 17.2931C12.1253 17.7088 11.0964 17.9167 10.0014 17.9167ZM10 16.6667C11.8611 16.6667 13.4375 16.0209 14.7292 14.7292C16.0209 13.4375 16.6667 11.8611 16.6667 10C16.6667 8.13891 16.0209 6.56252 14.7292 5.27085C13.4375 3.97919 11.8611 3.33335 10 3.33335C8.13891 3.33335 6.56252 3.97919 5.27085 5.27085C3.97919 6.56252 3.33335 8.13891 3.33335 10C3.33335 11.8611 3.97919 13.4375 5.27085 14.7292C6.56252 16.0209 8.13891 16.6667 10 16.6667Z', + fill: 'currentColor', + }), + }), + ], + }), + }), + GrainIcon = (tt) => + jsxRuntimeExports.jsx('svg', { + width: '1em', + height: '1em', + viewBox: '0 0 20 20', + fill: 'currentColor', + xmlns: 'http://www.w3.org/2000/svg', + children: jsxRuntimeExports.jsxs('g', { + id: 'grain', + children: [ + jsxRuntimeExports.jsx('mask', { + id: 'mask0_1551_45', + maskUnits: 'userSpaceOnUse', + x: '0', + y: '0', + width: '20', + height: '20', + children: jsxRuntimeExports.jsx('rect', { + id: 'Bounding box', + width: '1em', + height: '1em', + fill: 'currentColor', + }), + }), + jsxRuntimeExports.jsx('g', { + mask: 'url(#mask0_1551_45)', + children: jsxRuntimeExports.jsx('path', { + id: 'grain_2', + d: 'M4.99999 16.5064C4.57906 16.5064 4.22276 16.3605 3.93109 16.0689C3.63942 15.7772 3.49359 15.4209 3.49359 15C3.49359 14.5791 3.63942 14.2228 3.93109 13.9311C4.22276 13.6394 4.57906 13.4936 4.99999 13.4936C5.42092 13.4936 5.77722 13.6394 6.06888 13.9311C6.36055 14.2228 6.50638 14.5791 6.50638 15C6.50638 15.4209 6.36055 15.7772 6.06888 16.0689C5.77722 16.3605 5.42092 16.5064 4.99999 16.5064ZM11.6667 16.5064C11.2457 16.5064 10.8894 16.3605 10.5978 16.0689C10.3061 15.7772 10.1603 15.4209 10.1603 15C10.1603 14.5791 10.3061 14.2228 10.5978 13.9311C10.8894 13.6394 11.2457 13.4936 11.6667 13.4936C12.0876 13.4936 12.4439 13.6394 12.7355 13.9311C13.0272 14.2228 13.1731 14.5791 13.1731 15C13.1731 15.4209 13.0272 15.7772 12.7355 16.0689C12.4439 16.3605 12.0876 16.5064 11.6667 16.5064ZM8.33332 13.1731C7.91239 13.1731 7.55609 13.0272 7.26442 12.7355C6.97276 12.4439 6.82692 12.0876 6.82692 11.6667C6.82692 11.2457 6.97276 10.8894 7.26442 10.5978C7.55609 10.3061 7.91239 10.1603 8.33332 10.1603C8.75425 10.1603 9.11055 10.3061 9.40222 10.5978C9.69388 10.8894 9.83972 11.2457 9.83972 11.6667C9.83972 12.0876 9.69388 12.4439 9.40222 12.7355C9.11055 13.0272 8.75425 13.1731 8.33332 13.1731ZM15 13.1731C14.5791 13.1731 14.2228 13.0272 13.9311 12.7355C13.6394 12.4439 13.4936 12.0876 13.4936 11.6667C13.4936 11.2457 13.6394 10.8894 13.9311 10.5978C14.2228 10.3061 14.5791 10.1603 15 10.1603C15.4209 10.1603 15.7772 10.3061 16.0689 10.5978C16.3605 10.8894 16.5064 11.2457 16.5064 11.6667C16.5064 12.0876 16.3605 12.4439 16.0689 12.7355C15.7772 13.0272 15.4209 13.1731 15 13.1731ZM4.99999 9.83972C4.57906 9.83972 4.22276 9.69388 3.93109 9.40222C3.63942 9.11055 3.49359 8.75425 3.49359 8.33332C3.49359 7.91239 3.63942 7.55609 3.93109 7.26442C4.22276 6.97276 4.57906 6.82692 4.99999 6.82692C5.42092 6.82692 5.77722 6.97276 6.06888 7.26442C6.36055 7.55609 6.50638 7.91239 6.50638 8.33332C6.50638 8.75425 6.36055 9.11055 6.06888 9.40222C5.77722 9.69388 5.42092 9.83972 4.99999 9.83972ZM11.6667 9.83972C11.2457 9.83972 10.8894 9.69388 10.5978 9.40222C10.3061 9.11055 10.1603 8.75425 10.1603 8.33332C10.1603 7.91239 10.3061 7.55609 10.5978 7.26442C10.8894 6.97276 11.2457 6.82692 11.6667 6.82692C12.0876 6.82692 12.4439 6.97276 12.7355 7.26442C13.0272 7.55609 13.1731 7.91239 13.1731 8.33332C13.1731 8.75425 13.0272 9.11055 12.7355 9.40222C12.4439 9.69388 12.0876 9.83972 11.6667 9.83972ZM8.33332 6.50638C7.91239 6.50638 7.55609 6.36055 7.26442 6.06888C6.97276 5.77722 6.82692 5.42092 6.82692 4.99999C6.82692 4.57906 6.97276 4.22276 7.26442 3.93109C7.55609 3.63942 7.91239 3.49359 8.33332 3.49359C8.75425 3.49359 9.11055 3.63942 9.40222 3.93109C9.69388 4.22276 9.83972 4.57906 9.83972 4.99999C9.83972 5.42092 9.69388 5.77722 9.40222 6.06888C9.11055 6.36055 8.75425 6.50638 8.33332 6.50638ZM15 6.50638C14.5791 6.50638 14.2228 6.36055 13.9311 6.06888C13.6394 5.77722 13.4936 5.42092 13.4936 4.99999C13.4936 4.57906 13.6394 4.22276 13.9311 3.93109C14.2228 3.63942 14.5791 3.49359 15 3.49359C15.4209 3.49359 15.7772 3.63942 16.0689 3.93109C16.3605 4.22276 16.5064 4.57906 16.5064 4.99999C16.5064 5.42092 16.3605 5.77722 16.0689 6.06888C15.7772 6.36055 15.4209 6.50638 15 6.50638Z', + fill: 'currentColor', + }), + }), + ], + }), + }), + PublicIcon = (tt) => + jsxRuntimeExports.jsx('svg', { + width: '1em', + height: '1em', + viewBox: '0 0 20 20', + fill: 'currentColor', + xmlns: 'http://www.w3.org/2000/svg', + children: jsxRuntimeExports.jsxs('g', { + id: 'public', + children: [ + jsxRuntimeExports.jsx('mask', { + id: 'mask0_1551_36', + maskUnits: 'userSpaceOnUse', + x: '0', + y: '0', + width: '20', + height: '20', + children: jsxRuntimeExports.jsx('rect', { + id: 'Bounding box', + width: '1em', + height: '1em', + fill: 'currentColor', + }), + }), + jsxRuntimeExports.jsx('g', { + mask: 'url(#mask0_1551_36)', + children: jsxRuntimeExports.jsx('path', { + id: 'public_2', + d: 'M10.0028 17.5C8.96567 17.5 7.9906 17.3032 7.07758 16.9096C6.16457 16.516 5.37037 15.9818 4.69498 15.3071C4.0196 14.6323 3.48493 13.8389 3.09096 12.9267C2.69699 12.0145 2.5 11.0399 2.5 10.0028C2.5 8.96567 2.6968 7.9906 3.0904 7.07758C3.48401 6.16457 4.01819 5.37037 4.69294 4.69498C5.36769 4.0196 6.16114 3.48493 7.07329 3.09096C7.98546 2.69699 8.9601 2.5 9.99721 2.5C11.0343 2.5 12.0094 2.6968 12.9224 3.0904C13.8354 3.48401 14.6296 4.01819 15.305 4.69294C15.9804 5.36769 16.5151 6.16114 16.909 7.07329C17.303 7.98546 17.5 8.9601 17.5 9.99721C17.5 11.0343 17.3032 12.0094 16.9096 12.9224C16.516 13.8354 15.9818 14.6296 15.3071 15.305C14.6323 15.9804 13.8389 16.5151 12.9267 16.909C12.0145 17.303 11.0399 17.5 10.0028 17.5ZM9.16667 16.625V15C8.70833 15 8.31597 14.8368 7.98958 14.5104C7.66319 14.184 7.5 13.7917 7.5 13.3333V12.5L3.5 8.5C3.45833 8.75 3.42014 9 3.38542 9.25C3.35069 9.5 3.33333 9.75 3.33333 10C3.33333 11.6806 3.88542 13.1528 4.98958 14.4167C6.09375 15.6806 7.48611 16.4167 9.16667 16.625ZM14.9167 14.5C15.1944 14.1944 15.4444 13.8646 15.6667 13.5104C15.8889 13.1562 16.0729 12.7882 16.2187 12.4062C16.3646 12.0243 16.4757 11.6319 16.5521 11.2292C16.6285 10.8264 16.6667 10.4167 16.6667 10C16.6667 8.63083 16.2909 7.38042 15.5393 6.24877C14.7877 5.11712 13.7746 4.30129 12.5 3.80129V4.16667C12.5 4.625 12.3368 5.01736 12.0104 5.34375C11.684 5.67014 11.2917 5.83333 10.8333 5.83333H9.16667V7.5C9.16667 7.73611 9.08681 7.93403 8.92708 8.09375C8.76736 8.25347 8.56944 8.33333 8.33333 8.33333H6.66667V10H11.6667C11.9028 10 12.1007 10.0799 12.2604 10.2396C12.4201 10.3993 12.5 10.5972 12.5 10.8333V13.3333H13.3333C13.6944 13.3333 14.0208 13.441 14.3125 13.6562C14.6042 13.8715 14.8056 14.1528 14.9167 14.5Z', + fill: 'currentColor', + }), + }), + ], + }), + }), + IconsMapper = { + split: jsxRuntimeExports.jsx(GrainIcon, {}), + force: jsxRuntimeExports.jsx(CommunitiesIcon, {}), + sphere: jsxRuntimeExports.jsx(BubbleChartIcon, {}), + earth: jsxRuntimeExports.jsx(PublicIcon, {}), + }, + GraphViewControl = () => { + const [tt, et] = useDataStore((rt) => [rt.graphStyle, rt.setGraphStyle]), + nt = (rt) => { + et(rt) + } + return jsxRuntimeExports.jsx(Wrapper$g, { + children: graphStyles.map((rt) => + jsxRuntimeExports.jsx( + Flex, + { className: clsx$1('icon', { active: tt === rt }), onClick: () => nt(rt), children: IconsMapper[rt] }, + rt, + ), + ), + }) + }, + Wrapper$g = styled$4(Flex).attrs({ direction: 'row', align: 'center', justify: 'flex-start' })` + padding: 6px 6px 6px 11px; + background: ${colors.BG1}; + border-radius: 200px; + .icon { + color: ${colors.GRAY6}; + font-size: 20px; + cursor: pointer; + + &:hover { + color: ${colors.GRAY3}; + } + + &:active { + color: ${colors.white}; + } + + &.active { + color: ${colors.white}; + } + } + + .icon + .icon { + margin-left: 20px; + } +`, + ActionsToolbar = () => + jsxRuntimeExports.jsx(Wrapper$f, { + id: 'actions-toolbar', + children: jsxRuntimeExports.jsx(GraphViewControl, {}), + }), + Wrapper$f = styled$4(Flex)` + position: absolute; + right: 20px; + bottom: 50px; +` + var lodash = { exports: {} } + /** + * @license + * Lodash + * Copyright OpenJS Foundation and other contributors + * Released under MIT license + * Based on Underscore.js 1.8.3 + * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + */ lodash.exports + ;(function (tt, et) { + ;(function () { + var nt, + rt = '4.17.21', + it = 200, + ot = 'Unsupported core-js use. Try https://npms.io/search?q=ponyfill.', + at = 'Expected a function', + st = 'Invalid `variable` option passed into `_.template`', + lt = '__lodash_hash_undefined__', + ct = 500, + ut = '__lodash_placeholder__', + ht = 1, + dt = 2, + pt = 4, + mt = 1, + gt = 2, + yt = 1, + bt = 2, + vt = 4, + xt = 8, + kt = 16, + St = 32, + Tt = 64, + At = 128, + Et = 256, + $t = 512, + Dt = 30, + jt = '...', + Pt = 800, + Ct = 16, + wt = 1, + It = 2, + Ot = 3, + Wt = 1 / 0, + zt = 9007199254740991, + Ft = 17976931348623157e292, + Nt = 0 / 0, + Ut = 4294967295, + Mt = Ut - 1, + Ht = Ut >>> 1, + en = [ + ['ary', At], + ['bind', yt], + ['bindKey', bt], + ['curry', xt], + ['curryRight', kt], + ['flip', $t], + ['partial', St], + ['partialRight', Tt], + ['rearg', Et], + ], + sn = '[object Arguments]', + Kt = '[object Array]', + rn = '[object AsyncFunction]', + nn = '[object Boolean]', + hn = '[object Date]', + vn = '[object DOMException]', + an = '[object Error]', + Qt = '[object Function]', + _n = '[object GeneratorFunction]', + Pn = '[object Map]', + $n = '[object Number]', + Nn = '[object Null]', + Tn = '[object Object]', + cn = '[object Promise]', + mn = '[object Proxy]', + In = '[object RegExp]', + An = '[object Set]', + wn = '[object String]', + fn = '[object Symbol]', + pn = '[object Undefined]', + kn = '[object WeakMap]', + Dn = '[object WeakSet]', + un = '[object ArrayBuffer]', + Zt = '[object DataView]', + Xt = '[object Float32Array]', + Sn = '[object Float64Array]', + Rn = '[object Int8Array]', + jn = '[object Int16Array]', + On = '[object Int32Array]', + Zn = '[object Uint8Array]', + Vn = '[object Uint8ClampedArray]', + qn = '[object Uint16Array]', + zn = '[object Uint32Array]', + Jn = /\b__p \+= '';/g, + Hn = /\b(__p \+=) '' \+/g, + pr = /(__e\(.*?\)|\b__t\)) \+\n'';/g, + fr = /&(?:amp|lt|gt|quot|#39);/g, + xr = /[&<>"']/g, + io = RegExp(fr.source), + Tr = RegExp(xr.source), + Ar = /<%-([\s\S]+?)%>/g, + qr = /<%([\s\S]+?)%>/g, + jr = /<%=([\s\S]+?)%>/g, + Fr = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, + ao = /^\w*$/, + Yr = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, + Dr = /[\\^$.*+?()[\]{}|]/g, + go = RegExp(Dr.source), + xn = /^\s+/, + Mn = /\s/, + dn = /\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/, + Jt = /\{\n\/\* \[wrapped with (.+)\] \*/, + En = /,? & /, + Ln = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g, + Un = /[()=,{}\[\]\/\s]/, + Kn = /\\(\\)?/g, + nr = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g, + lr = /\w*$/, + cr = /^[-+]0x[0-9a-f]+$/i, + Hr = /^0b[01]+$/i, + vr = /^\[object .+?Constructor\]$/, + Nr = /^0o[0-7]+$/i, + Gr = /^(?:0|[1-9]\d*)$/, + eo = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g, + Zr = /($^)/, + Jr = /['\n\r\u2028\u2029\\]/g, + wr = '\\ud800-\\udfff', + Mr = '\\u0300-\\u036f', + Ur = '\\ufe20-\\ufe2f', + Rr = '\\u20d0-\\u20ff', + Pr = Mr + Ur + Rr, + Lr = '\\u2700-\\u27bf', + Wr = 'a-z\\xdf-\\xf6\\xf8-\\xff', + Br = '\\xac\\xb1\\xd7\\xf7', + tr = '\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf', + ir = '\\u2000-\\u206f', + Sr = + ' \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000', + dr = 'A-Z\\xc0-\\xd6\\xd8-\\xde', + br = '\\ufe0e\\ufe0f', + $r = Br + tr + ir + Sr, + no = "['’]", + so = '[' + wr + ']', + fo = '[' + $r + ']', + po = '[' + Pr + ']', + Yn = '\\d+', + vo = '[' + Lr + ']', + _o = '[' + Wr + ']', + xo = '[^' + wr + $r + Yn + Lr + Wr + dr + ']', + bo = '\\ud83c[\\udffb-\\udfff]', + Co = '(?:' + po + '|' + bo + ')', + Ro = '[^' + wr + ']', + Wo = '(?:\\ud83c[\\udde6-\\uddff]){2}', + Po = '[\\ud800-\\udbff][\\udc00-\\udfff]', + Fo = '[' + dr + ']', + Go = '\\u200d', + Xo = '(?:' + _o + '|' + xo + ')', + ga = '(?:' + Fo + '|' + xo + ')', + na = '(?:' + no + '(?:d|ll|m|re|s|t|ve))?', + $a = '(?:' + no + '(?:D|LL|M|RE|S|T|VE))?', + Zo = Co + '?', + pu = '[' + br + ']?', + eu = '(?:' + Go + '(?:' + [Ro, Wo, Po].join('|') + ')' + pu + Zo + ')*', + No = '\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])', + Mp = '\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])', + tu = pu + Zo + eu, + op = '(?:' + [vo, Wo, Po].join('|') + ')' + tu, + Rp = '(?:' + [Ro + po + '?', po, Wo, Po, so].join('|') + ')', + mm = RegExp(no, 'g'), + ts = RegExp(po, 'g'), + mu = RegExp(bo + '(?=' + bo + ')|' + Rp + tu, 'g'), + gm = RegExp( + [ + Fo + '?' + _o + '+' + na + '(?=' + [fo, Fo, '$'].join('|') + ')', + ga + '+' + $a + '(?=' + [fo, Fo + Xo, '$'].join('|') + ')', + Fo + '?' + Xo + '+' + na, + Fo + '+' + $a, + Mp, + No, + Yn, + op, + ].join('|'), + 'g', + ), + Us = RegExp('[' + Go + wr + Pr + br + ']'), + Bp = /[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/, + Vu = [ + 'Array', + 'Buffer', + 'DataView', + 'Date', + 'Error', + 'Float32Array', + 'Float64Array', + 'Function', + 'Int8Array', + 'Int16Array', + 'Int32Array', + 'Map', + 'Math', + 'Object', + 'Promise', + 'RegExp', + 'Set', + 'String', + 'Symbol', + 'TypeError', + 'Uint8Array', + 'Uint8ClampedArray', + 'Uint16Array', + 'Uint32Array', + 'WeakMap', + '_', + 'clearTimeout', + 'isFinite', + 'parseInt', + 'setTimeout', + ], + Xs = -1, + Yo = {} + ;(Yo[Xt] = Yo[Sn] = Yo[Rn] = Yo[jn] = Yo[On] = Yo[Zn] = Yo[Vn] = Yo[qn] = Yo[zn] = !0), + (Yo[sn] = + Yo[Kt] = + Yo[un] = + Yo[nn] = + Yo[Zt] = + Yo[hn] = + Yo[an] = + Yo[Qt] = + Yo[Pn] = + Yo[$n] = + Yo[Tn] = + Yo[In] = + Yo[An] = + Yo[wn] = + Yo[kn] = + !1) + var Ko = {} + ;(Ko[sn] = + Ko[Kt] = + Ko[un] = + Ko[Zt] = + Ko[nn] = + Ko[hn] = + Ko[Xt] = + Ko[Sn] = + Ko[Rn] = + Ko[jn] = + Ko[On] = + Ko[Pn] = + Ko[$n] = + Ko[Tn] = + Ko[In] = + Ko[An] = + Ko[wn] = + Ko[fn] = + Ko[Zn] = + Ko[Vn] = + Ko[qn] = + Ko[zn] = + !0), + (Ko[an] = Ko[Qt] = Ko[kn] = !1) + var Zs = { + À: 'A', + Á: 'A', + Â: 'A', + Ã: 'A', + Ä: 'A', + Å: 'A', + à: 'a', + á: 'a', + â: 'a', + ã: 'a', + ä: 'a', + å: 'a', + Ç: 'C', + ç: 'c', + Ð: 'D', + ð: 'd', + È: 'E', + É: 'E', + Ê: 'E', + Ë: 'E', + è: 'e', + é: 'e', + ê: 'e', + ë: 'e', + Ì: 'I', + Í: 'I', + Î: 'I', + Ï: 'I', + ì: 'i', + í: 'i', + î: 'i', + ï: 'i', + Ñ: 'N', + ñ: 'n', + Ò: 'O', + Ó: 'O', + Ô: 'O', + Õ: 'O', + Ö: 'O', + Ø: 'O', + ò: 'o', + ó: 'o', + ô: 'o', + õ: 'o', + ö: 'o', + ø: 'o', + Ù: 'U', + Ú: 'U', + Û: 'U', + Ü: 'U', + ù: 'u', + ú: 'u', + û: 'u', + ü: 'u', + Ý: 'Y', + ý: 'y', + ÿ: 'y', + Æ: 'Ae', + æ: 'ae', + Þ: 'Th', + þ: 'th', + ß: 'ss', + Ā: 'A', + Ă: 'A', + Ą: 'A', + ā: 'a', + ă: 'a', + ą: 'a', + Ć: 'C', + Ĉ: 'C', + Ċ: 'C', + Č: 'C', + ć: 'c', + ĉ: 'c', + ċ: 'c', + č: 'c', + Ď: 'D', + Đ: 'D', + ď: 'd', + đ: 'd', + Ē: 'E', + Ĕ: 'E', + Ė: 'E', + Ę: 'E', + Ě: 'E', + ē: 'e', + ĕ: 'e', + ė: 'e', + ę: 'e', + ě: 'e', + Ĝ: 'G', + Ğ: 'G', + Ġ: 'G', + Ģ: 'G', + ĝ: 'g', + ğ: 'g', + ġ: 'g', + ģ: 'g', + Ĥ: 'H', + Ħ: 'H', + ĥ: 'h', + ħ: 'h', + Ĩ: 'I', + Ī: 'I', + Ĭ: 'I', + Į: 'I', + İ: 'I', + ĩ: 'i', + ī: 'i', + ĭ: 'i', + į: 'i', + ı: 'i', + Ĵ: 'J', + ĵ: 'j', + Ķ: 'K', + ķ: 'k', + ĸ: 'k', + Ĺ: 'L', + Ļ: 'L', + Ľ: 'L', + Ŀ: 'L', + Ł: 'L', + ĺ: 'l', + ļ: 'l', + ľ: 'l', + ŀ: 'l', + ł: 'l', + Ń: 'N', + Ņ: 'N', + Ň: 'N', + Ŋ: 'N', + ń: 'n', + ņ: 'n', + ň: 'n', + ŋ: 'n', + Ō: 'O', + Ŏ: 'O', + Ő: 'O', + ō: 'o', + ŏ: 'o', + ő: 'o', + Ŕ: 'R', + Ŗ: 'R', + Ř: 'R', + ŕ: 'r', + ŗ: 'r', + ř: 'r', + Ś: 'S', + Ŝ: 'S', + Ş: 'S', + Š: 'S', + ś: 's', + ŝ: 's', + ş: 's', + š: 's', + Ţ: 'T', + Ť: 'T', + Ŧ: 'T', + ţ: 't', + ť: 't', + ŧ: 't', + Ũ: 'U', + Ū: 'U', + Ŭ: 'U', + Ů: 'U', + Ű: 'U', + Ų: 'U', + ũ: 'u', + ū: 'u', + ŭ: 'u', + ů: 'u', + ű: 'u', + ų: 'u', + Ŵ: 'W', + ŵ: 'w', + Ŷ: 'Y', + ŷ: 'y', + Ÿ: 'Y', + Ź: 'Z', + Ż: 'Z', + Ž: 'Z', + ź: 'z', + ż: 'z', + ž: 'z', + IJ: 'IJ', + ij: 'ij', + Œ: 'Oe', + œ: 'oe', + ʼn: "'n", + ſ: 's', + }, + zs = { '&': '&', '<': '<', '>': '>', '"': '"', "'": ''' }, + nu = { '&': '&', '<': '<', '>': '>', '"': '"', ''': "'" }, + Cl = { '\\': '\\', "'": "'", '\n': 'n', '\r': 'r', '\u2028': 'u2028', '\u2029': 'u2029' }, + Op = parseFloat, + jp = parseInt, + Ws = typeof commonjsGlobal == 'object' && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal, + Hu = typeof self == 'object' && self && self.Object === Object && self, + ns = Ws || Hu || Function('return this')(), + gu = et && !et.nodeType && et, + ls = gu && !0 && tt && !tt.nodeType && tt, + ys = ls && ls.exports === gu, + Iu = ys && Ws.process, + rs = (function () { + try { + var er = ls && ls.require && ls.require('util').types + return er || (Iu && Iu.binding && Iu.binding('util')) + } catch {} + })(), + yu = rs && rs.isArrayBuffer, + Gu = rs && rs.isDate, + Dp = rs && rs.isMap, + bs = rs && rs.isRegExp, + $s = rs && rs.isSet, + os = rs && rs.isTypedArray + function Vo(er, Er, gr) { + switch (gr.length) { + case 0: + return er.call(Er) + case 1: + return er.call(Er, gr[0]) + case 2: + return er.call(Er, gr[0], gr[1]) + case 3: + return er.call(Er, gr[0], gr[1], gr[2]) + } + return er.apply(Er, gr) + } + function Js(er, Er, gr, ro) { + for (var To = -1, $o = er == null ? 0 : er.length; ++To < $o; ) { + var es = er[To] + Er(ro, es, gr(es), er) + } + return ro + } + function ws(er, Er) { + for (var gr = -1, ro = er == null ? 0 : er.length; ++gr < ro && Er(er[gr], gr, er) !== !1; ); + return er + } + function qm(er, Er) { + for (var gr = er == null ? 0 : er.length; gr-- && Er(er[gr], gr, er) !== !1; ); + return er + } + function Ym(er, Er) { + for (var gr = -1, ro = er == null ? 0 : er.length; ++gr < ro; ) if (!Er(er[gr], gr, er)) return !1 + return !0 + } + function Ps(er, Er) { + for (var gr = -1, ro = er == null ? 0 : er.length, To = 0, $o = []; ++gr < ro; ) { + var es = er[gr] + Er(es, gr, er) && ($o[To++] = es) + } + return $o + } + function Nl(er, Er) { + var gr = er == null ? 0 : er.length + return !!gr && Fl(er, Er, 0) > -1 + } + function ap(er, Er, gr) { + for (var ro = -1, To = er == null ? 0 : er.length; ++ro < To; ) if (gr(Er, er[ro])) return !0 + return !1 + } + function ba(er, Er) { + for (var gr = -1, ro = er == null ? 0 : er.length, To = Array(ro); ++gr < ro; ) To[gr] = Er(er[gr], gr, er) + return To + } + function Ll(er, Er) { + for (var gr = -1, ro = Er.length, To = er.length; ++gr < ro; ) er[To + gr] = Er[gr] + return er + } + function ym(er, Er, gr, ro) { + var To = -1, + $o = er == null ? 0 : er.length + for (ro && $o && (gr = er[++To]); ++To < $o; ) gr = Er(gr, er[To], To, er) + return gr + } + function By(er, Er, gr, ro) { + var To = er == null ? 0 : er.length + for (ro && To && (gr = er[--To]); To--; ) gr = Er(gr, er[To], To, er) + return gr + } + function Np(er, Er) { + for (var gr = -1, ro = er == null ? 0 : er.length; ++gr < ro; ) if (Er(er[gr], gr, er)) return !0 + return !1 + } + var bm = qs('length') + function Oy(er) { + return er.split('') + } + function jy(er) { + return er.match(Ln) || [] + } + function Km(er, Er, gr) { + var ro + return ( + gr(er, function (To, $o, es) { + if (Er(To, $o, es)) return (ro = $o), !1 + }), + ro + ) + } + function sp(er, Er, gr, ro) { + for (var To = er.length, $o = gr + (ro ? 1 : -1); ro ? $o-- : ++$o < To; ) if (Er(er[$o], $o, er)) return $o + return -1 + } + function Fl(er, Er, gr) { + return Er === Er ? dp(er, Er, gr) : sp(er, Lp, gr) + } + function lp(er, Er, gr, ro) { + for (var To = gr - 1, $o = er.length; ++To < $o; ) if (ro(er[To], Er)) return To + return -1 + } + function Lp(er) { + return er !== er + } + function Fp(er, Er) { + var gr = er == null ? 0 : er.length + return gr ? Ul(er, Er) / gr : Nt + } + function qs(er) { + return function (Er) { + return Er == null ? nt : Er[er] + } + } + function Ys(er) { + return function (Er) { + return er == null ? nt : er[Er] + } + } + function Au(er, Er, gr, ro, To) { + return ( + To(er, function ($o, es, ko) { + gr = ro ? ((ro = !1), $o) : Er(gr, $o, es, ko) + }), + gr + ) + } + function bu(er, Er) { + var gr = er.length + for (er.sort(Er); gr--; ) er[gr] = er[gr].value + return er + } + function Ul(er, Er) { + for (var gr, ro = -1, To = er.length; ++ro < To; ) { + var $o = Er(er[ro]) + $o !== nt && (gr = gr === nt ? $o : gr + $o) + } + return gr + } + function wu(er, Er) { + for (var gr = -1, ro = Array(er); ++gr < er; ) ro[gr] = Er(gr) + return ro + } + function Dy(er, Er) { + return ba(Er, function (gr) { + return [gr, er[gr]] + }) + } + function wm(er) { + return er && er.slice(0, fp(er) + 1).replace(xn, '') + } + function Vs(er) { + return function (Er) { + return er(Er) + } + } + function Hs(er, Er) { + return ba(Er, function (gr) { + return er[gr] + }) + } + function As(er, Er) { + return er.has(Er) + } + function _a(er, Er) { + for (var gr = -1, ro = er.length; ++gr < ro && Fl(Er, er[gr], 0) > -1; ); + return gr + } + function cp(er, Er) { + for (var gr = er.length; gr-- && Fl(Er, er[gr], 0) > -1; ); + return gr + } + function Wl(er, Er) { + for (var gr = er.length, ro = 0; gr--; ) er[gr] === Er && ++ro + return ro + } + var Ny = Ys(Zs), + Ly = Ys(zs) + function Xm(er) { + return '\\' + Cl[er] + } + function Zm(er, Er) { + return er == null ? nt : er[Er] + } + function qu(er) { + return Us.test(er) + } + function Up(er) { + return Bp.test(er) + } + function up(er) { + for (var Er, gr = []; !(Er = er.next()).done; ) gr.push(Er.value) + return gr + } + function zp(er) { + var Er = -1, + gr = Array(er.size) + return ( + er.forEach(function (ro, To) { + gr[++Er] = [To, ro] + }), + gr + ) + } + function hp(er, Er) { + return function (gr) { + return er(Er(gr)) + } + } + function Vl(er, Er) { + for (var gr = -1, ro = er.length, To = 0, $o = []; ++gr < ro; ) { + var es = er[gr] + ;(es === Er || es === ut) && ((er[gr] = ut), ($o[To++] = gr)) + } + return $o + } + function Wp(er) { + var Er = -1, + gr = Array(er.size) + return ( + er.forEach(function (ro) { + gr[++Er] = ro + }), + gr + ) + } + function Fy(er) { + var Er = -1, + gr = Array(er.size) + return ( + er.forEach(function (ro) { + gr[++Er] = [ro, ro] + }), + gr + ) + } + function dp(er, Er, gr) { + for (var ro = gr - 1, To = er.length; ++ro < To; ) if (er[ro] === Er) return ro + return -1 + } + function Uy(er, Er, gr) { + for (var ro = gr + 1; ro--; ) if (er[ro] === Er) return ro + return ro + } + function ru(er) { + return qu(er) ? iu(er) : bm(er) + } + function ss(er) { + return qu(er) ? Jm(er) : Oy(er) + } + function fp(er) { + for (var Er = er.length; Er-- && Mn.test(er.charAt(Er)); ); + return Er + } + var pp = Ys(nu) + function iu(er) { + for (var Er = (mu.lastIndex = 0); mu.test(er); ) ++Er + return Er + } + function Jm(er) { + return er.match(mu) || [] + } + function mp(er) { + return er.match(gm) || [] + } + var zy = function er(Er) { + Er = Er == null ? ns : Cu.defaults(ns.Object(), Er, Cu.pick(ns, Vu)) + var gr = Er.Array, + ro = Er.Date, + To = Er.Error, + $o = Er.Function, + es = Er.Math, + ko = Er.Object, + Es = Er.RegExp, + Ts = Er.String, + Gs = Er.TypeError, + $u = gr.prototype, + Vp = $o.prototype, + gp = ko.prototype, + vs = Er['__core-js_shared__'], + yp = Vp.toString, + qo = gp.hasOwnProperty, + Qm = 0, + ou = (function () { + var Rt = /[^.]+$/.exec((vs && vs.keys && vs.keys.IE_PROTO) || '') + return Rt ? 'Symbol(src)_1.' + Rt : '' + })(), + Qs = gp.toString, + Yu = yp.call(ko), + vm = ns._, + _m = Es( + '^' + + yp + .call(qo) + .replace(Dr, '\\$&') + .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + + '$', + ), + Hp = ys ? Er.Buffer : nt, + vu = Er.Symbol, + Gp = Er.Uint8Array, + _g = Hp ? Hp.allocUnsafe : nt, + qp = hp(ko.getPrototypeOf, ko), + ey = ko.create, + xm = gp.propertyIsEnumerable, + Pu = $u.splice, + ty = vu ? vu.isConcatSpreadable : nt, + Mu = vu ? vu.iterator : nt, + au = vu ? vu.toStringTag : nt, + bp = (function () { + try { + var Rt = dm(ko, 'defineProperty') + return Rt({}, '', {}), Rt + } catch {} + })(), + Yp = Er.clearTimeout !== ns.clearTimeout && Er.clearTimeout, + Wy = ro && ro.now !== ns.Date.now && ro.now, + Vy = Er.setTimeout !== ns.setTimeout && Er.setTimeout, + Kp = es.ceil, + Xp = es.floor, + Zp = ko.getOwnPropertySymbols, + Hy = Hp ? Hp.isBuffer : nt, + ny = Er.isFinite, + N0 = $u.join, + Gy = hp(ko.keys, ko), + _s = es.max, + Ms = es.min, + qy = ro.now, + Yy = Er.parseInt, + ry = es.random, + Ky = $u.reverse, + wp = dm(Er, 'DataView'), + Jp = dm(Er, 'Map'), + iy = dm(Er, 'Promise'), + vp = dm(Er, 'Set'), + Ku = dm(Er, 'WeakMap'), + Xu = dm(ko, 'create'), + km = Ku && new Ku(), + Zu = {}, + Xy = fm(wp), + Zy = fm(Jp), + Jy = fm(iy), + Qy = fm(vp), + su = fm(Ku), + Qp = vu ? vu.prototype : nt, + _u = Qp ? Qp.valueOf : nt, + _p = Qp ? Qp.toString : nt + function Fn(Rt) { + if (gs(Rt) && !Mo(Rt) && !(Rt instanceof yo)) { + if (Rt instanceof Rs) return Rt + if (qo.call(Rt, '__wrapped__')) return B1(Rt) + } + return new Rs(Rt) + } + var xu = (function () { + function Rt() {} + return function (Vt) { + if (!ds(Vt)) return {} + if (ey) return ey(Vt) + Rt.prototype = Vt + var Yt = new Rt() + return (Rt.prototype = nt), Yt + } + })() + function em() {} + function Rs(Rt, Vt) { + ;(this.__wrapped__ = Rt), + (this.__actions__ = []), + (this.__chain__ = !!Vt), + (this.__index__ = 0), + (this.__values__ = nt) + } + ;(Fn.templateSettings = { escape: Ar, evaluate: qr, interpolate: jr, variable: '', imports: { _: Fn } }), + (Fn.prototype = em.prototype), + (Fn.prototype.constructor = Fn), + (Rs.prototype = xu(em.prototype)), + (Rs.prototype.constructor = Rs) + function yo(Rt) { + ;(this.__wrapped__ = Rt), + (this.__actions__ = []), + (this.__dir__ = 1), + (this.__filtered__ = !1), + (this.__iteratees__ = []), + (this.__takeCount__ = Ut), + (this.__views__ = []) + } + function L0() { + var Rt = new yo(this.__wrapped__) + return ( + (Rt.__actions__ = Ns(this.__actions__)), + (Rt.__dir__ = this.__dir__), + (Rt.__filtered__ = this.__filtered__), + (Rt.__iteratees__ = Ns(this.__iteratees__)), + (Rt.__takeCount__ = this.__takeCount__), + (Rt.__views__ = Ns(this.__views__)), + Rt + ) + } + function F0() { + if (this.__filtered__) { + var Rt = new yo(this) + ;(Rt.__dir__ = -1), (Rt.__filtered__ = !0) + } else (Rt = this.clone()), (Rt.__dir__ *= -1) + return Rt + } + function yl() { + var Rt = this.__wrapped__.value(), + Vt = this.__dir__, + Yt = Mo(Rt), + yn = Vt < 0, + Bn = Yt ? Rt.length : 0, + Wn = kw(0, Bn, this.__views__), + Xn = Wn.start, + Qn = Wn.end, + ar = Qn - Xn, + Ir = yn ? Qn : Xn - 1, + Cr = this.__iteratees__, + Or = Cr.length, + Qr = 0, + uo = Ms(ar, this.__takeCount__) + if (!Yt || (!yn && Bn == ar && uo == ar)) return Nu(Rt, this.__actions__) + var So = [] + e: for (; ar-- && Qr < uo; ) { + Ir += Vt + for (var Lo = -1, Eo = Rt[Ir]; ++Lo < Or; ) { + var Uo = Cr[Lo], + Ho = Uo.iteratee, + Ql = Uo.type, + Al = Ho(Eo) + if (Ql == It) Eo = Al + else if (!Al) { + if (Ql == wt) continue e + break e + } + } + So[Qr++] = Eo + } + return So + } + ;(yo.prototype = xu(em.prototype)), (yo.prototype.constructor = yo) + function cs(Rt) { + var Vt = -1, + Yt = Rt == null ? 0 : Rt.length + for (this.clear(); ++Vt < Yt; ) { + var yn = Rt[Vt] + this.set(yn[0], yn[1]) + } + } + function e0() { + ;(this.__data__ = Xu ? Xu(null) : {}), (this.size = 0) + } + function n0(Rt) { + var Vt = this.has(Rt) && delete this.__data__[Rt] + return (this.size -= Vt ? 1 : 0), Vt + } + function r0(Rt) { + var Vt = this.__data__ + if (Xu) { + var Yt = Vt[Rt] + return Yt === lt ? nt : Yt + } + return qo.call(Vt, Rt) ? Vt[Rt] : nt + } + function i0(Rt) { + var Vt = this.__data__ + return Xu ? Vt[Rt] !== nt : qo.call(Vt, Rt) + } + function o0(Rt, Vt) { + var Yt = this.__data__ + return (this.size += this.has(Rt) ? 0 : 1), (Yt[Rt] = Xu && Vt === nt ? lt : Vt), this + } + ;(cs.prototype.clear = e0), + (cs.prototype.delete = n0), + (cs.prototype.get = r0), + (cs.prototype.has = i0), + (cs.prototype.set = o0) + function Hl(Rt) { + var Vt = -1, + Yt = Rt == null ? 0 : Rt.length + for (this.clear(); ++Vt < Yt; ) { + var yn = Rt[Vt] + this.set(yn[0], yn[1]) + } + } + function a0() { + ;(this.__data__ = []), (this.size = 0) + } + function oy(Rt) { + var Vt = this.__data__, + Yt = Bu(Vt, Rt) + if (Yt < 0) return !1 + var yn = Vt.length - 1 + return Yt == yn ? Vt.pop() : Pu.call(Vt, Yt, 1), --this.size, !0 + } + function s0(Rt) { + var Vt = this.__data__, + Yt = Bu(Vt, Rt) + return Yt < 0 ? nt : Vt[Yt][1] + } + function l0(Rt) { + return Bu(this.__data__, Rt) > -1 + } + function Sm(Rt, Vt) { + var Yt = this.__data__, + yn = Bu(Yt, Rt) + return yn < 0 ? (++this.size, Yt.push([Rt, Vt])) : (Yt[yn][1] = Vt), this + } + ;(Hl.prototype.clear = a0), + (Hl.prototype.delete = oy), + (Hl.prototype.get = s0), + (Hl.prototype.has = l0), + (Hl.prototype.set = Sm) + function $l(Rt) { + var Vt = -1, + Yt = Rt == null ? 0 : Rt.length + for (this.clear(); ++Vt < Yt; ) { + var yn = Rt[Vt] + this.set(yn[0], yn[1]) + } + } + function c0() { + ;(this.size = 0), (this.__data__ = { hash: new cs(), map: new (Jp || Hl)(), string: new cs() }) + } + function ay(Rt) { + var Vt = T0(this, Rt).delete(Rt) + return (this.size -= Vt ? 1 : 0), Vt + } + function u0(Rt) { + return T0(this, Rt).get(Rt) + } + function h0(Rt) { + return T0(this, Rt).has(Rt) + } + function Em(Rt, Vt) { + var Yt = T0(this, Rt), + yn = Yt.size + return Yt.set(Rt, Vt), (this.size += Yt.size == yn ? 0 : 1), this + } + ;($l.prototype.clear = c0), + ($l.prototype.delete = ay), + ($l.prototype.get = u0), + ($l.prototype.has = h0), + ($l.prototype.set = Em) + function Ru(Rt) { + var Vt = -1, + Yt = Rt == null ? 0 : Rt.length + for (this.__data__ = new $l(); ++Vt < Yt; ) this.add(Rt[Vt]) + } + function sy(Rt) { + return this.__data__.set(Rt, lt), this + } + function d0(Rt) { + return this.__data__.has(Rt) + } + ;(Ru.prototype.add = Ru.prototype.push = sy), (Ru.prototype.has = d0) + function xs(Rt) { + var Vt = (this.__data__ = new Hl(Rt)) + this.size = Vt.size + } + function U0() { + ;(this.__data__ = new Hl()), (this.size = 0) + } + function z0(Rt) { + var Vt = this.__data__, + Yt = Vt.delete(Rt) + return (this.size = Vt.size), Yt + } + function Tm(Rt) { + return this.__data__.get(Rt) + } + function Ju(Rt) { + return this.__data__.has(Rt) + } + function W0(Rt, Vt) { + var Yt = this.__data__ + if (Yt instanceof Hl) { + var yn = Yt.__data__ + if (!Jp || yn.length < it - 1) return yn.push([Rt, Vt]), (this.size = ++Yt.size), this + Yt = this.__data__ = new $l(yn) + } + return Yt.set(Rt, Vt), (this.size = Yt.size), this + } + ;(xs.prototype.clear = U0), + (xs.prototype.delete = z0), + (xs.prototype.get = Tm), + (xs.prototype.has = Ju), + (xs.prototype.set = W0) + function Xr(Rt, Vt) { + var Yt = Mo(Rt), + yn = !Yt && pm(Rt), + Bn = !Yt && !yn && Pp(Rt), + Wn = !Yt && !yn && !Bn && Wm(Rt), + Xn = Yt || yn || Bn || Wn, + Qn = Xn ? wu(Rt.length, Ts) : [], + ar = Qn.length + for (var Ir in Rt) + (Vt || qo.call(Rt, Ir)) && + !( + Xn && + (Ir == 'length' || + (Bn && (Ir == 'offset' || Ir == 'parent')) || + (Wn && (Ir == 'buffer' || Ir == 'byteLength' || Ir == 'byteOffset')) || + tp(Ir, ar)) + ) && + Qn.push(Ir) + return Qn + } + function tm(Rt) { + var Vt = Rt.length + return Vt ? Rt[cu(0, Vt - 1)] : nt + } + function ly(Rt, Vt) { + return I0(Ns(Rt), Ou(Vt, 0, Rt.length)) + } + function f0(Rt) { + return I0(Ns(Rt)) + } + function cy(Rt, Vt, Yt) { + ;((Yt !== nt && !Eu(Rt[Vt], Yt)) || (Yt === nt && !(Vt in Rt))) && lu(Rt, Vt, Yt) + } + function Gl(Rt, Vt, Yt) { + var yn = Rt[Vt] + ;(!(qo.call(Rt, Vt) && Eu(yn, Yt)) || (Yt === nt && !(Vt in Rt))) && lu(Rt, Vt, Yt) + } + function Bu(Rt, Vt) { + for (var Yt = Rt.length; Yt--; ) if (Eu(Rt[Yt][0], Vt)) return Yt + return -1 + } + function uy(Rt, Vt, Yt, yn) { + return ( + Yl(Rt, function (Bn, Wn, Xn) { + Vt(yn, Bn, Yt(Bn), Xn) + }), + yn + ) + } + function hy(Rt, Vt) { + return Rt && Rl(Vt, Fs(Vt), Rt) + } + function p0(Rt, Vt) { + return Rt && Rl(Vt, Ol(Vt), Rt) + } + function lu(Rt, Vt, Yt) { + Vt == '__proto__' && bp + ? bp(Rt, Vt, { configurable: !0, enumerable: !0, value: Yt, writable: !0 }) + : (Rt[Vt] = Yt) + } + function Im(Rt, Vt) { + for (var Yt = -1, yn = Vt.length, Bn = gr(yn), Wn = Rt == null; ++Yt < yn; ) + Bn[Yt] = Wn ? nt : s1(Rt, Vt[Yt]) + return Bn + } + function Ou(Rt, Vt, Yt) { + return Rt === Rt && (Yt !== nt && (Rt = Rt <= Yt ? Rt : Yt), Vt !== nt && (Rt = Rt >= Vt ? Rt : Vt)), Rt + } + function _l(Rt, Vt, Yt, yn, Bn, Wn) { + var Xn, + Qn = Vt & ht, + ar = Vt & dt, + Ir = Vt & pt + if ((Yt && (Xn = Bn ? Yt(Rt, yn, Bn, Wn) : Yt(Rt)), Xn !== nt)) return Xn + if (!ds(Rt)) return Rt + var Cr = Mo(Rt) + if (Cr) { + if (((Xn = Ew(Rt)), !Qn)) return Ns(Rt, Xn) + } else { + var Or = Ks(Rt), + Qr = Or == Qt || Or == _n + if (Pp(Rt)) return Ay(Rt, Qn) + if (Or == Tn || Or == sn || (Qr && !Bn)) { + if (((Xn = ar || Qr ? {} : E1(Rt)), !Qn)) return ar ? S0(Rt, p0(Xn, Rt)) : q0(Rt, hy(Xn, Rt)) + } else { + if (!Ko[Or]) return Bn ? Rt : {} + Xn = Tw(Rt, Or, Qn) + } + } + Wn || (Wn = new xs()) + var uo = Wn.get(Rt) + if (uo) return uo + Wn.set(Rt, Xn), + ew(Rt) + ? Rt.forEach(function (Eo) { + Xn.add(_l(Eo, Vt, Yt, Eo, Rt, Wn)) + }) + : J1(Rt) && + Rt.forEach(function (Eo, Uo) { + Xn.set(Uo, _l(Eo, Vt, Yt, Uo, Rt, Wn)) + }) + var So = Ir ? (ar ? zo : ms) : ar ? Ol : Fs, + Lo = Cr ? nt : So(Rt) + return ( + ws(Lo || Rt, function (Eo, Uo) { + Lo && ((Uo = Eo), (Eo = Rt[Uo])), Gl(Xn, Uo, _l(Eo, Vt, Yt, Uo, Rt, Wn)) + }), + Xn + ) + } + function dy(Rt) { + var Vt = Fs(Rt) + return function (Yt) { + return Am(Yt, Rt, Vt) + } + } + function Am(Rt, Vt, Yt) { + var yn = Yt.length + if (Rt == null) return !yn + for (Rt = ko(Rt); yn--; ) { + var Bn = Yt[yn], + Wn = Vt[Bn], + Xn = Rt[Bn] + if ((Xn === nt && !(Bn in Rt)) || !Wn(Xn)) return !1 + } + return !0 + } + function fy(Rt, Vt, Yt) { + if (typeof Rt != 'function') throw new Gs(at) + return My(function () { + Rt.apply(nt, Yt) + }, Vt) + } + function Qu(Rt, Vt, Yt, yn) { + var Bn = -1, + Wn = Nl, + Xn = !0, + Qn = Rt.length, + ar = [], + Ir = Vt.length + if (!Qn) return ar + Yt && (Vt = ba(Vt, Vs(Yt))), + yn ? ((Wn = ap), (Xn = !1)) : Vt.length >= it && ((Wn = As), (Xn = !1), (Vt = new Ru(Vt))) + e: for (; ++Bn < Qn; ) { + var Cr = Rt[Bn], + Or = Yt == null ? Cr : Yt(Cr) + if (((Cr = yn || Cr !== 0 ? Cr : 0), Xn && Or === Or)) { + for (var Qr = Ir; Qr--; ) if (Vt[Qr] === Or) continue e + ar.push(Cr) + } else Wn(Vt, Or, yn) || ar.push(Cr) + } + return ar + } + var Yl = $y(xl), + m0 = $y(kp, !0) + function V0(Rt, Vt) { + var Yt = !0 + return ( + Yl(Rt, function (yn, Bn, Wn) { + return (Yt = !!Vt(yn, Bn, Wn)), Yt + }), + Yt + ) + } + function nm(Rt, Vt, Yt) { + for (var yn = -1, Bn = Rt.length; ++yn < Bn; ) { + var Wn = Rt[yn], + Xn = Vt(Wn) + if (Xn != null && (Qn === nt ? Xn === Xn && !Jl(Xn) : Yt(Xn, Qn))) + var Qn = Xn, + ar = Wn + } + return ar + } + function g0(Rt, Vt, Yt, yn) { + var Bn = Rt.length + for ( + Yt = Do(Yt), + Yt < 0 && (Yt = -Yt > Bn ? 0 : Bn + Yt), + yn = yn === nt || yn > Bn ? Bn : Do(yn), + yn < 0 && (yn += Bn), + yn = Yt > yn ? 0 : nw(yn); + Yt < yn; + + ) + Rt[Yt++] = Vt + return Rt + } + function my(Rt, Vt) { + var Yt = [] + return ( + Yl(Rt, function (yn, Bn, Wn) { + Vt(yn, Bn, Wn) && Yt.push(yn) + }), + Yt + ) + } + function Is(Rt, Vt, Yt, yn, Bn) { + var Wn = -1, + Xn = Rt.length + for (Yt || (Yt = Aw), Bn || (Bn = []); ++Wn < Xn; ) { + var Qn = Rt[Wn] + Vt > 0 && Yt(Qn) ? (Vt > 1 ? Is(Qn, Vt - 1, Yt, yn, Bn) : Ll(Bn, Qn)) : yn || (Bn[Bn.length] = Qn) + } + return Bn + } + var xp = Fm(), + rm = Fm(!0) + function xl(Rt, Vt) { + return Rt && xp(Rt, Vt, Fs) + } + function kp(Rt, Vt) { + return Rt && rm(Rt, Vt, Fs) + } + function _h(Rt, Vt) { + return Ps(Vt, function (Yt) { + return np(Rt[Yt]) + }) + } + function Xl(Rt, Vt) { + Vt = Fu(Vt, Rt) + for (var Yt = 0, yn = Vt.length; Rt != null && Yt < yn; ) Rt = Rt[Wu(Vt[Yt++])] + return Yt && Yt == yn ? Rt : nt + } + function Cm(Rt, Vt, Yt) { + var yn = Vt(Rt) + return Mo(Rt) ? yn : Ll(yn, Yt(Rt)) + } + function Cs(Rt) { + return Rt == null ? (Rt === nt ? pn : Nn) : au && au in ko(Rt) ? xw(Rt) : Ow(Rt) + } + function im(Rt, Vt) { + return Rt > Vt + } + function y0(Rt, Vt) { + return Rt != null && qo.call(Rt, Vt) + } + function gy(Rt, Vt) { + return Rt != null && Vt in ko(Rt) + } + function H0(Rt, Vt, Yt) { + return Rt >= Ms(Vt, Yt) && Rt < _s(Vt, Yt) + } + function Sp(Rt, Vt, Yt) { + for ( + var yn = Yt ? ap : Nl, Bn = Rt[0].length, Wn = Rt.length, Xn = Wn, Qn = gr(Wn), ar = 1 / 0, Ir = []; + Xn--; + + ) { + var Cr = Rt[Xn] + Xn && Vt && (Cr = ba(Cr, Vs(Vt))), + (ar = Ms(Cr.length, ar)), + (Qn[Xn] = !Yt && (Vt || (Bn >= 120 && Cr.length >= 120)) ? new Ru(Xn && Cr) : nt) + } + Cr = Rt[0] + var Or = -1, + Qr = Qn[0] + e: for (; ++Or < Bn && Ir.length < ar; ) { + var uo = Cr[Or], + So = Vt ? Vt(uo) : uo + if (((uo = Yt || uo !== 0 ? uo : 0), !(Qr ? As(Qr, So) : yn(Ir, So, Yt)))) { + for (Xn = Wn; --Xn; ) { + var Lo = Qn[Xn] + if (!(Lo ? As(Lo, So) : yn(Rt[Xn], So, Yt))) continue e + } + Qr && Qr.push(So), Ir.push(uo) + } + } + return Ir + } + function yy(Rt, Vt, Yt, yn) { + return ( + xl(Rt, function (Bn, Wn, Xn) { + Vt(yn, Yt(Bn), Wn, Xn) + }), + yn + ) + } + function xa(Rt, Vt, Yt) { + ;(Vt = Fu(Vt, Rt)), (Rt = C1(Rt, Vt)) + var yn = Rt == null ? Rt : Rt[Wu(du(Vt))] + return yn == null ? nt : Vo(yn, Rt, Yt) + } + function Bo(Rt) { + return gs(Rt) && Cs(Rt) == sn + } + function fs(Rt) { + return gs(Rt) && Cs(Rt) == un + } + function ps(Rt) { + return gs(Rt) && Cs(Rt) == hn + } + function us(Rt, Vt, Yt, yn, Bn) { + return Rt === Vt + ? !0 + : Rt == null || Vt == null || (!gs(Rt) && !gs(Vt)) + ? Rt !== Rt && Vt !== Vt + : Sl(Rt, Vt, Yt, yn, us, Bn) + } + function Sl(Rt, Vt, Yt, yn, Bn, Wn) { + var Xn = Mo(Rt), + Qn = Mo(Vt), + ar = Xn ? Kt : Ks(Rt), + Ir = Qn ? Kt : Ks(Vt) + ;(ar = ar == sn ? Tn : ar), (Ir = Ir == sn ? Tn : Ir) + var Cr = ar == Tn, + Or = Ir == Tn, + Qr = ar == Ir + if (Qr && Pp(Rt)) { + if (!Pp(Vt)) return !1 + ;(Xn = !0), (Cr = !1) + } + if (Qr && !Cr) + return Wn || (Wn = new xs()), Xn || Wm(Rt) ? co(Rt, Vt, Yt, yn, Bn, Wn) : Oo(Rt, Vt, ar, Yt, yn, Bn, Wn) + if (!(Yt & mt)) { + var uo = Cr && qo.call(Rt, '__wrapped__'), + So = Or && qo.call(Vt, '__wrapped__') + if (uo || So) { + var Lo = uo ? Rt.value() : Rt, + Eo = So ? Vt.value() : Vt + return Wn || (Wn = new xs()), Bn(Lo, Eo, Yt, yn, Wn) + } + } + return Qr ? (Wn || (Wn = new xs()), Ao(Rt, Vt, Yt, yn, Bn, Wn)) : !1 + } + function Ep(Rt) { + return gs(Rt) && Ks(Rt) == Pn + } + function hs(Rt, Vt, Yt, yn) { + var Bn = Yt.length, + Wn = Bn, + Xn = !yn + if (Rt == null) return !Wn + for (Rt = ko(Rt); Bn--; ) { + var Qn = Yt[Bn] + if (Xn && Qn[2] ? Qn[1] !== Rt[Qn[0]] : !(Qn[0] in Rt)) return !1 + } + for (; ++Bn < Wn; ) { + Qn = Yt[Bn] + var ar = Qn[0], + Ir = Rt[ar], + Cr = Qn[1] + if (Xn && Qn[2]) { + if (Ir === nt && !(ar in Rt)) return !1 + } else { + var Or = new xs() + if (yn) var Qr = yn(Ir, Cr, ar, Rt, Vt, Or) + if (!(Qr === nt ? us(Cr, Ir, mt | gt, yn, Or) : Qr)) return !1 + } + } + return !0 + } + function Tp(Rt) { + if (!ds(Rt) || $w(Rt)) return !1 + var Vt = np(Rt) ? _m : vr + return Vt.test(fm(Rt)) + } + function Ip(Rt) { + return gs(Rt) && Cs(Rt) == In + } + function $m(Rt) { + return gs(Rt) && Ks(Rt) == An + } + function by(Rt) { + return gs(Rt) && R0(Rt.length) && !!Yo[Cs(Rt)] + } + function Ap(Rt) { + return typeof Rt == 'function' + ? Rt + : Rt == null + ? Dl + : typeof Rt == 'object' + ? Mo(Rt) + ? Pm(Rt[0], Rt[1]) + : am(Rt) + : fw(Rt) + } + function Bs(Rt) { + if (!Py(Rt)) return Gy(Rt) + var Vt = [] + for (var Yt in ko(Rt)) qo.call(Rt, Yt) && Yt != 'constructor' && Vt.push(Yt) + return Vt + } + function wy(Rt) { + if (!ds(Rt)) return Bw(Rt) + var Vt = Py(Rt), + Yt = [] + for (var yn in Rt) (yn == 'constructor' && (Vt || !qo.call(Rt, yn))) || Yt.push(yn) + return Yt + } + function om(Rt, Vt) { + return Rt < Vt + } + function _d(Rt, Vt) { + var Yt = -1, + yn = Bl(Rt) ? gr(Rt.length) : [] + return ( + Yl(Rt, function (Bn, Wn, Xn) { + yn[++Yt] = Vt(Bn, Wn, Xn) + }), + yn + ) + } + function am(Rt) { + var Vt = K0(Rt) + return Vt.length == 1 && Vt[0][2] + ? I1(Vt[0][0], Vt[0][1]) + : function (Yt) { + return Yt === Rt || hs(Yt, Rt, Vt) + } + } + function Pm(Rt, Vt) { + return Z0(Rt) && T1(Vt) + ? I1(Wu(Rt), Vt) + : function (Yt) { + var yn = s1(Yt, Rt) + return yn === nt && yn === Vt ? l1(Yt, Rt) : us(Vt, yn, mt | gt) + } + } + function Zl(Rt, Vt, Yt, yn, Bn) { + Rt !== Vt && + xp( + Vt, + function (Wn, Xn) { + if ((Bn || (Bn = new xs()), ds(Wn))) Mm(Rt, Vt, Xn, Yt, Zl, yn, Bn) + else { + var Qn = yn ? yn(Q0(Rt, Xn), Wn, Xn + '', Rt, Vt, Bn) : nt + Qn === nt && (Qn = Wn), cy(Rt, Xn, Qn) + } + }, + Ol, + ) + } + function Mm(Rt, Vt, Yt, yn, Bn, Wn, Xn) { + var Qn = Q0(Rt, Yt), + ar = Q0(Vt, Yt), + Ir = Xn.get(ar) + if (Ir) { + cy(Rt, Yt, Ir) + return + } + var Cr = Wn ? Wn(Qn, ar, Yt + '', Rt, Vt, Xn) : nt, + Or = Cr === nt + if (Or) { + var Qr = Mo(ar), + uo = !Qr && Pp(ar), + So = !Qr && !uo && Wm(ar) + ;(Cr = ar), + Qr || uo || So + ? Mo(Qn) + ? (Cr = Qn) + : ks(Qn) + ? (Cr = Ns(Qn)) + : uo + ? ((Or = !1), (Cr = Ay(ar, !0))) + : So + ? ((Or = !1), (Cr = k0(ar, !0))) + : (Cr = []) + : Ry(ar) || pm(ar) + ? ((Cr = Qn), pm(Qn) ? (Cr = rw(Qn)) : (!ds(Qn) || np(Qn)) && (Cr = E1(ar))) + : (Or = !1) + } + Or && (Xn.set(ar, Cr), Bn(Cr, ar, yn, Wn, Xn), Xn.delete(ar)), cy(Rt, Yt, Cr) + } + function ku(Rt, Vt) { + var Yt = Rt.length + if (Yt) return (Vt += Vt < 0 ? Yt : 0), tp(Vt, Yt) ? Rt[Vt] : nt + } + function sm(Rt, Vt, Yt) { + Vt.length + ? (Vt = ba(Vt, function (Wn) { + return Mo(Wn) + ? function (Xn) { + return Xl(Xn, Wn.length === 1 ? Wn[0] : Wn) + } + : Wn + })) + : (Vt = [Dl]) + var yn = -1 + Vt = ba(Vt, Vs(wo())) + var Bn = _d(Rt, function (Wn, Xn, Qn) { + var ar = ba(Vt, function (Ir) { + return Ir(Wn) + }) + return { criteria: ar, index: ++yn, value: Wn } + }) + return bu(Bn, function (Wn, Xn) { + return Lm(Wn, Xn, Yt) + }) + } + function lm(Rt, Vt) { + return Rm(Rt, Vt, function (Yt, yn) { + return l1(Rt, yn) + }) + } + function Rm(Rt, Vt, Yt) { + for (var yn = -1, Bn = Vt.length, Wn = {}; ++yn < Bn; ) { + var Xn = Vt[yn], + Qn = Xl(Rt, Xn) + Yt(Qn, Xn) && _f(Wn, Fu(Xn, Rt), Qn) + } + return Wn + } + function Bm(Rt) { + return function (Vt) { + return Xl(Vt, Rt) + } + } + function Cp(Rt, Vt, Yt, yn) { + var Bn = yn ? lp : Fl, + Wn = -1, + Xn = Vt.length, + Qn = Rt + for (Rt === Vt && (Vt = Ns(Vt)), Yt && (Qn = ba(Rt, Vs(Yt))); ++Wn < Xn; ) + for (var ar = 0, Ir = Vt[Wn], Cr = Yt ? Yt(Ir) : Ir; (ar = Bn(Qn, Cr, ar, yn)) > -1; ) + Qn !== Rt && Pu.call(Qn, ar, 1), Pu.call(Rt, ar, 1) + return Rt + } + function Os(Rt, Vt) { + for (var Yt = Rt ? Vt.length : 0, yn = Yt - 1; Yt--; ) { + var Bn = Vt[Yt] + if (Yt == yn || Bn !== Wn) { + var Wn = Bn + tp(Bn) ? Pu.call(Rt, Bn, 1) : Ey(Rt, Bn) + } + } + return Rt + } + function cu(Rt, Vt) { + return Rt + Xp(ry() * (Vt - Rt + 1)) + } + function Pl(Rt, Vt, Yt, yn) { + for (var Bn = -1, Wn = _s(Kp((Vt - Rt) / (Yt || 1)), 0), Xn = gr(Wn); Wn--; ) + (Xn[yn ? Wn : ++Bn] = Rt), (Rt += Yt) + return Xn + } + function $p(Rt, Vt) { + var Yt = '' + if (!Rt || Vt < 1 || Vt > zt) return Yt + do Vt % 2 && (Yt += Rt), (Vt = Xp(Vt / 2)), Vt && (Rt += Rt) + while (Vt) + return Yt + } + function mo(Rt, Vt) { + return _b(A1(Rt, Vt, Dl), Rt + '') + } + function b0(Rt) { + return tm(Vm(Rt)) + } + function vy(Rt, Vt) { + var Yt = Vm(Rt) + return I0(Yt, Ou(Vt, 0, Yt.length)) + } + function _f(Rt, Vt, Yt, yn) { + if (!ds(Rt)) return Rt + Vt = Fu(Vt, Rt) + for (var Bn = -1, Wn = Vt.length, Xn = Wn - 1, Qn = Rt; Qn != null && ++Bn < Wn; ) { + var ar = Wu(Vt[Bn]), + Ir = Yt + if (ar === '__proto__' || ar === 'constructor' || ar === 'prototype') return Rt + if (Bn != Xn) { + var Cr = Qn[ar] + ;(Ir = yn ? yn(Cr, ar, Qn) : nt), Ir === nt && (Ir = ds(Cr) ? Cr : tp(Vt[Bn + 1]) ? [] : {}) + } + Gl(Qn, ar, Ir), (Qn = Qn[ar]) + } + return Rt + } + var w0 = km + ? function (Rt, Vt) { + return km.set(Rt, Vt), Rt + } + : Dl, + ju = bp + ? function (Rt, Vt) { + return bp(Rt, 'toString', { configurable: !0, enumerable: !1, value: u1(Vt), writable: !0 }) + } + : Dl + function v0(Rt) { + return I0(Vm(Rt)) + } + function El(Rt, Vt, Yt) { + var yn = -1, + Bn = Rt.length + Vt < 0 && (Vt = -Vt > Bn ? 0 : Bn + Vt), + (Yt = Yt > Bn ? Bn : Yt), + Yt < 0 && (Yt += Bn), + (Bn = Vt > Yt ? 0 : (Yt - Vt) >>> 0), + (Vt >>>= 0) + for (var Wn = gr(Bn); ++yn < Bn; ) Wn[yn] = Rt[yn + Vt] + return Wn + } + function xy(Rt, Vt) { + var Yt + return ( + Yl(Rt, function (yn, Bn, Wn) { + return (Yt = Vt(yn, Bn, Wn)), !Yt + }), + !!Yt + ) + } + function uu(Rt, Vt, Yt) { + var yn = 0, + Bn = Rt == null ? yn : Rt.length + if (typeof Vt == 'number' && Vt === Vt && Bn <= Ht) { + for (; yn < Bn; ) { + var Wn = (yn + Bn) >>> 1, + Xn = Rt[Wn] + Xn !== null && !Jl(Xn) && (Yt ? Xn <= Vt : Xn < Vt) ? (yn = Wn + 1) : (Bn = Wn) + } + return Bn + } + return Om(Rt, Vt, Dl, Yt) + } + function Om(Rt, Vt, Yt, yn) { + var Bn = 0, + Wn = Rt == null ? 0 : Rt.length + if (Wn === 0) return 0 + Vt = Yt(Vt) + for (var Xn = Vt !== Vt, Qn = Vt === null, ar = Jl(Vt), Ir = Vt === nt; Bn < Wn; ) { + var Cr = Xp((Bn + Wn) / 2), + Or = Yt(Rt[Cr]), + Qr = Or !== nt, + uo = Or === null, + So = Or === Or, + Lo = Jl(Or) + if (Xn) var Eo = yn || So + else + Ir + ? (Eo = So && (yn || Qr)) + : Qn + ? (Eo = So && Qr && (yn || !uo)) + : ar + ? (Eo = So && Qr && !uo && (yn || !Lo)) + : uo || Lo + ? (Eo = !1) + : (Eo = yn ? Or <= Vt : Or < Vt) + Eo ? (Bn = Cr + 1) : (Wn = Cr) + } + return Ms(Wn, Mt) + } + function Sy(Rt, Vt) { + for (var Yt = -1, yn = Rt.length, Bn = 0, Wn = []; ++Yt < yn; ) { + var Xn = Rt[Yt], + Qn = Vt ? Vt(Xn) : Xn + if (!Yt || !Eu(Qn, ar)) { + var ar = Qn + Wn[Bn++] = Xn === 0 ? 0 : Xn + } + } + return Wn + } + function jm(Rt) { + return typeof Rt == 'number' ? Rt : Jl(Rt) ? Nt : +Rt + } + function js(Rt) { + if (typeof Rt == 'string') return Rt + if (Mo(Rt)) return ba(Rt, js) + '' + if (Jl(Rt)) return _p ? _p.call(Rt) : '' + var Vt = Rt + '' + return Vt == '0' && 1 / Rt == -Wt ? '-0' : Vt + } + function Du(Rt, Vt, Yt) { + var yn = -1, + Bn = Nl, + Wn = Rt.length, + Xn = !0, + Qn = [], + ar = Qn + if (Yt) (Xn = !1), (Bn = ap) + else if (Wn >= it) { + var Ir = Vt ? null : Ls(Rt) + if (Ir) return Wp(Ir) + ;(Xn = !1), (Bn = As), (ar = new Ru()) + } else ar = Vt ? [] : Qn + e: for (; ++yn < Wn; ) { + var Cr = Rt[yn], + Or = Vt ? Vt(Cr) : Cr + if (((Cr = Yt || Cr !== 0 ? Cr : 0), Xn && Or === Or)) { + for (var Qr = ar.length; Qr--; ) if (ar[Qr] === Or) continue e + Vt && ar.push(Or), Qn.push(Cr) + } else Bn(ar, Or, Yt) || (ar !== Qn && ar.push(Or), Qn.push(Cr)) + } + return Qn + } + function Ey(Rt, Vt) { + return (Vt = Fu(Vt, Rt)), (Rt = C1(Rt, Vt)), Rt == null || delete Rt[Wu(du(Vt))] + } + function Ty(Rt, Vt, Yt, yn) { + return _f(Rt, Vt, Yt(Xl(Rt, Vt)), yn) + } + function cm(Rt, Vt, Yt, yn) { + for (var Bn = Rt.length, Wn = yn ? Bn : -1; (yn ? Wn-- : ++Wn < Bn) && Vt(Rt[Wn], Wn, Rt); ); + return Yt ? El(Rt, yn ? 0 : Wn, yn ? Wn + 1 : Bn) : El(Rt, yn ? Wn + 1 : 0, yn ? Bn : Wn) + } + function Nu(Rt, Vt) { + var Yt = Rt + return ( + Yt instanceof yo && (Yt = Yt.value()), + ym( + Vt, + function (yn, Bn) { + return Bn.func.apply(Bn.thisArg, Ll([yn], Bn.args)) + }, + Yt, + ) + ) + } + function Iy(Rt, Vt, Yt) { + var yn = Rt.length + if (yn < 2) return yn ? Du(Rt[0]) : [] + for (var Bn = -1, Wn = gr(yn); ++Bn < yn; ) + for (var Xn = Rt[Bn], Qn = -1; ++Qn < yn; ) Qn != Bn && (Wn[Bn] = Qu(Wn[Bn] || Xn, Rt[Qn], Vt, Yt)) + return Du(Is(Wn, 1), Vt, Yt) + } + function Lu(Rt, Vt, Yt) { + for (var yn = -1, Bn = Rt.length, Wn = Vt.length, Xn = {}; ++yn < Bn; ) { + var Qn = yn < Wn ? Vt[yn] : nt + Yt(Xn, Rt[yn], Qn) + } + return Xn + } + function Dm(Rt) { + return ks(Rt) ? Rt : [] + } + function Ds(Rt) { + return typeof Rt == 'function' ? Rt : Dl + } + function Fu(Rt, Vt) { + return Mo(Rt) ? Rt : Z0(Rt, Vt) ? [Rt] : R1(Qo(Rt)) + } + var _0 = mo + function Uu(Rt, Vt, Yt) { + var yn = Rt.length + return (Yt = Yt === nt ? yn : Yt), !Vt && Yt >= yn ? Rt : El(Rt, Vt, Yt) + } + var x0 = + Yp || + function (Rt) { + return ns.clearTimeout(Rt) + } + function Ay(Rt, Vt) { + if (Vt) return Rt.slice() + var Yt = Rt.length, + yn = _g ? _g(Yt) : new Rt.constructor(Yt) + return Rt.copy(yn), yn + } + function Nm(Rt) { + var Vt = new Rt.constructor(Rt.byteLength) + return new Gp(Vt).set(new Gp(Rt)), Vt + } + function G0(Rt, Vt) { + var Yt = Vt ? Nm(Rt.buffer) : Rt.buffer + return new Rt.constructor(Yt, Rt.byteOffset, Rt.byteLength) + } + function Ml(Rt) { + var Vt = new Rt.constructor(Rt.source, lr.exec(Rt)) + return (Vt.lastIndex = Rt.lastIndex), Vt + } + function Cy(Rt) { + return _u ? ko(_u.call(Rt)) : {} + } + function k0(Rt, Vt) { + var Yt = Vt ? Nm(Rt.buffer) : Rt.buffer + return new Rt.constructor(Yt, Rt.byteOffset, Rt.length) + } + function Su(Rt, Vt) { + if (Rt !== Vt) { + var Yt = Rt !== nt, + yn = Rt === null, + Bn = Rt === Rt, + Wn = Jl(Rt), + Xn = Vt !== nt, + Qn = Vt === null, + ar = Vt === Vt, + Ir = Jl(Vt) + if ( + (!Qn && !Ir && !Wn && Rt > Vt) || + (Wn && Xn && ar && !Qn && !Ir) || + (yn && Xn && ar) || + (!Yt && ar) || + !Bn + ) + return 1 + if ( + (!yn && !Wn && !Ir && Rt < Vt) || + (Ir && Yt && Bn && !yn && !Wn) || + (Qn && Yt && Bn) || + (!Xn && Bn) || + !ar + ) + return -1 + } + return 0 + } + function Lm(Rt, Vt, Yt) { + for (var yn = -1, Bn = Rt.criteria, Wn = Vt.criteria, Xn = Bn.length, Qn = Yt.length; ++yn < Xn; ) { + var ar = Su(Bn[yn], Wn[yn]) + if (ar) { + if (yn >= Qn) return ar + var Ir = Yt[yn] + return ar * (Ir == 'desc' ? -1 : 1) + } + } + return Rt.index - Vt.index + } + function zu(Rt, Vt, Yt, yn) { + for ( + var Bn = -1, + Wn = Rt.length, + Xn = Yt.length, + Qn = -1, + ar = Vt.length, + Ir = _s(Wn - Xn, 0), + Cr = gr(ar + Ir), + Or = !yn; + ++Qn < ar; + + ) + Cr[Qn] = Vt[Qn] + for (; ++Bn < Xn; ) (Or || Bn < Wn) && (Cr[Yt[Bn]] = Rt[Bn]) + for (; Ir--; ) Cr[Qn++] = Rt[Bn++] + return Cr + } + function um(Rt, Vt, Yt, yn) { + for ( + var Bn = -1, + Wn = Rt.length, + Xn = -1, + Qn = Yt.length, + ar = -1, + Ir = Vt.length, + Cr = _s(Wn - Qn, 0), + Or = gr(Cr + Ir), + Qr = !yn; + ++Bn < Cr; + + ) + Or[Bn] = Rt[Bn] + for (var uo = Bn; ++ar < Ir; ) Or[uo + ar] = Vt[ar] + for (; ++Xn < Qn; ) (Qr || Bn < Wn) && (Or[uo + Yt[Xn]] = Rt[Bn++]) + return Or + } + function Ns(Rt, Vt) { + var Yt = -1, + yn = Rt.length + for (Vt || (Vt = gr(yn)); ++Yt < yn; ) Vt[Yt] = Rt[Yt] + return Vt + } + function Rl(Rt, Vt, Yt, yn) { + var Bn = !Yt + Yt || (Yt = {}) + for (var Wn = -1, Xn = Vt.length; ++Wn < Xn; ) { + var Qn = Vt[Wn], + ar = yn ? yn(Yt[Qn], Rt[Qn], Qn, Yt, Rt) : nt + ar === nt && (ar = Rt[Qn]), Bn ? lu(Yt, Qn, ar) : Gl(Yt, Qn, ar) + } + return Yt + } + function q0(Rt, Vt) { + return Rl(Rt, X0(Rt), Vt) + } + function S0(Rt, Vt) { + return Rl(Rt, k1(Rt), Vt) + } + function hm(Rt, Vt) { + return function (Yt, yn) { + var Bn = Mo(Yt) ? Js : uy, + Wn = Vt ? Vt() : {} + return Bn(Yt, Rt, wo(yn, 2), Wn) + } + } + function ep(Rt) { + return mo(function (Vt, Yt) { + var yn = -1, + Bn = Yt.length, + Wn = Bn > 1 ? Yt[Bn - 1] : nt, + Xn = Bn > 2 ? Yt[2] : nt + for ( + Wn = Rt.length > 3 && typeof Wn == 'function' ? (Bn--, Wn) : nt, + Xn && Il(Yt[0], Yt[1], Xn) && ((Wn = Bn < 3 ? nt : Wn), (Bn = 1)), + Vt = ko(Vt); + ++yn < Bn; + + ) { + var Qn = Yt[yn] + Qn && Rt(Vt, Qn, yn, Wn) + } + return Vt + }) + } + function $y(Rt, Vt) { + return function (Yt, yn) { + if (Yt == null) return Yt + if (!Bl(Yt)) return Rt(Yt, yn) + for ( + var Bn = Yt.length, Wn = Vt ? Bn : -1, Xn = ko(Yt); + (Vt ? Wn-- : ++Wn < Bn) && yn(Xn[Wn], Wn, Xn) !== !1; + + ); + return Yt + } + } + function Fm(Rt) { + return function (Vt, Yt, yn) { + for (var Bn = -1, Wn = ko(Vt), Xn = yn(Vt), Qn = Xn.length; Qn--; ) { + var ar = Xn[Rt ? Qn : ++Bn] + if (Yt(Wn[ar], ar, Wn) === !1) break + } + return Vt + } + } + function Y0(Rt, Vt, Yt) { + var yn = Vt & yt, + Bn = Lt(Rt) + function Wn() { + var Xn = this && this !== ns && this instanceof Wn ? Bn : Rt + return Xn.apply(yn ? Yt : this, arguments) + } + return Wn + } + function E0(Rt) { + return function (Vt) { + Vt = Qo(Vt) + var Yt = qu(Vt) ? ss(Vt) : nt, + yn = Yt ? Yt[0] : Vt.charAt(0), + Bn = Yt ? Uu(Yt, 1).join('') : Vt.slice(1) + return yn[Rt]() + Bn + } + } + function Bt(Rt) { + return function (Vt) { + return ym(hw(uw(Vt).replace(mm, '')), Rt, '') + } + } + function Lt(Rt) { + return function () { + var Vt = arguments + switch (Vt.length) { + case 0: + return new Rt() + case 1: + return new Rt(Vt[0]) + case 2: + return new Rt(Vt[0], Vt[1]) + case 3: + return new Rt(Vt[0], Vt[1], Vt[2]) + case 4: + return new Rt(Vt[0], Vt[1], Vt[2], Vt[3]) + case 5: + return new Rt(Vt[0], Vt[1], Vt[2], Vt[3], Vt[4]) + case 6: + return new Rt(Vt[0], Vt[1], Vt[2], Vt[3], Vt[4], Vt[5]) + case 7: + return new Rt(Vt[0], Vt[1], Vt[2], Vt[3], Vt[4], Vt[5], Vt[6]) + } + var Yt = xu(Rt.prototype), + yn = Rt.apply(Yt, Vt) + return ds(yn) ? yn : Yt + } + } + function Gt(Rt, Vt, Yt) { + var yn = Lt(Rt) + function Bn() { + for (var Wn = arguments.length, Xn = gr(Wn), Qn = Wn, ar = zm(Bn); Qn--; ) Xn[Qn] = arguments[Qn] + var Ir = Wn < 3 && Xn[0] !== ar && Xn[Wn - 1] !== ar ? [] : Vl(Xn, ar) + if (((Wn -= Ir.length), Wn < Yt)) return Jo(Rt, Vt, Cn, Bn.placeholder, nt, Xn, Ir, nt, nt, Yt - Wn) + var Cr = this && this !== ns && this instanceof Bn ? yn : Rt + return Vo(Cr, this, Xn) + } + return Bn + } + function tn(Rt) { + return function (Vt, Yt, yn) { + var Bn = ko(Vt) + if (!Bl(Vt)) { + var Wn = wo(Yt, 3) + ;(Vt = Fs(Vt)), + (Yt = function (Qn) { + return Wn(Bn[Qn], Qn, Bn) + }) + } + var Xn = Rt(Vt, Yt, yn) + return Xn > -1 ? Bn[Wn ? Vt[Xn] : Xn] : nt + } + } + function gn(Rt) { + return jo(function (Vt) { + var Yt = Vt.length, + yn = Yt, + Bn = Rs.prototype.thru + for (Rt && Vt.reverse(); yn--; ) { + var Wn = Vt[yn] + if (typeof Wn != 'function') throw new Gs(at) + if (Bn && !Xn && Um(Wn) == 'wrapper') var Xn = new Rs([], !0) + } + for (yn = Xn ? yn : Yt; ++yn < Yt; ) { + Wn = Vt[yn] + var Qn = Um(Wn), + ar = Qn == 'wrapper' ? hu(Wn) : nt + ar && J0(ar[0]) && ar[1] == (At | xt | St | Et) && !ar[4].length && ar[9] == 1 + ? (Xn = Xn[Um(ar[0])].apply(Xn, ar[3])) + : (Xn = Wn.length == 1 && J0(Wn) ? Xn[Qn]() : Xn.thru(Wn)) + } + return function () { + var Ir = arguments, + Cr = Ir[0] + if (Xn && Ir.length == 1 && Mo(Cr)) return Xn.plant(Cr).value() + for (var Or = 0, Qr = Yt ? Vt[Or].apply(this, Ir) : Cr; ++Or < Yt; ) Qr = Vt[Or].call(this, Qr) + return Qr + } + }) + } + function Cn(Rt, Vt, Yt, yn, Bn, Wn, Xn, Qn, ar, Ir) { + var Cr = Vt & At, + Or = Vt & yt, + Qr = Vt & bt, + uo = Vt & (xt | kt), + So = Vt & $t, + Lo = Qr ? nt : Lt(Rt) + function Eo() { + for (var Uo = arguments.length, Ho = gr(Uo), Ql = Uo; Ql--; ) Ho[Ql] = arguments[Ql] + if (uo) + var Al = zm(Eo), + _c = Wl(Ho, Al) + if ((yn && (Ho = zu(Ho, yn, Bn, uo)), Wn && (Ho = um(Ho, Wn, Xn, uo)), (Uo -= _c), uo && Uo < Ir)) { + var Ss = Vl(Ho, Al) + return Jo(Rt, Vt, Cn, Eo.placeholder, Yt, Ho, Ss, Qn, ar, Ir - Uo) + } + var Tu = Or ? Yt : this, + ip = Qr ? Tu[Rt] : Rt + return ( + (Uo = Ho.length), + Qn ? (Ho = jw(Ho, Qn)) : So && Uo > 1 && Ho.reverse(), + Cr && ar < Uo && (Ho.length = ar), + this && this !== ns && this instanceof Eo && (ip = Lo || Lt(ip)), + ip.apply(Tu, Ho) + ) + } + return Eo + } + function Gn(Rt, Vt) { + return function (Yt, yn) { + return yy(Yt, Rt, Vt(yn), {}) + } + } + function rr(Rt, Vt) { + return function (Yt, yn) { + var Bn + if (Yt === nt && yn === nt) return Vt + if ((Yt !== nt && (Bn = Yt), yn !== nt)) { + if (Bn === nt) return yn + typeof Yt == 'string' || typeof yn == 'string' + ? ((Yt = js(Yt)), (yn = js(yn))) + : ((Yt = jm(Yt)), (yn = jm(yn))), + (Bn = Rt(Yt, yn)) + } + return Bn + } + } + function _r(Rt) { + return jo(function (Vt) { + return ( + (Vt = ba(Vt, Vs(wo()))), + mo(function (Yt) { + var yn = this + return Rt(Vt, function (Bn) { + return Vo(Bn, yn, Yt) + }) + }) + ) + }) + } + function Vr(Rt, Vt) { + Vt = Vt === nt ? ' ' : js(Vt) + var Yt = Vt.length + if (Yt < 2) return Yt ? $p(Vt, Rt) : Vt + var yn = $p(Vt, Kp(Rt / ru(Vt))) + return qu(Vt) ? Uu(ss(yn), 0, Rt).join('') : yn.slice(0, Rt) + } + function oo(Rt, Vt, Yt, yn) { + var Bn = Vt & yt, + Wn = Lt(Rt) + function Xn() { + for ( + var Qn = -1, + ar = arguments.length, + Ir = -1, + Cr = yn.length, + Or = gr(Cr + ar), + Qr = this && this !== ns && this instanceof Xn ? Wn : Rt; + ++Ir < Cr; + + ) + Or[Ir] = yn[Ir] + for (; ar--; ) Or[Ir++] = arguments[++Qn] + return Vo(Qr, Bn ? Yt : this, Or) + } + return Xn + } + function Io(Rt) { + return function (Vt, Yt, yn) { + return ( + yn && typeof yn != 'number' && Il(Vt, Yt, yn) && (Yt = yn = nt), + (Vt = rp(Vt)), + Yt === nt ? ((Yt = Vt), (Vt = 0)) : (Yt = rp(Yt)), + (yn = yn === nt ? (Vt < Yt ? 1 : -1) : rp(yn)), + Pl(Vt, Yt, yn, Rt) + ) + } + } + function ho(Rt) { + return function (Vt, Yt) { + return (typeof Vt == 'string' && typeof Yt == 'string') || ((Vt = fu(Vt)), (Yt = fu(Yt))), Rt(Vt, Yt) + } + } + function Jo(Rt, Vt, Yt, yn, Bn, Wn, Xn, Qn, ar, Ir) { + var Cr = Vt & xt, + Or = Cr ? Xn : nt, + Qr = Cr ? nt : Xn, + uo = Cr ? Wn : nt, + So = Cr ? nt : Wn + ;(Vt |= Cr ? St : Tt), (Vt &= ~(Cr ? Tt : St)), Vt & vt || (Vt &= ~(yt | bt)) + var Lo = [Rt, Vt, Bn, uo, Or, So, Qr, Qn, ar, Ir], + Eo = Yt.apply(nt, Lo) + return J0(Rt) && $1(Eo, Lo), (Eo.placeholder = yn), P1(Eo, Rt, Vt) + } + function lo(Rt) { + var Vt = es[Rt] + return function (Yt, yn) { + if (((Yt = fu(Yt)), (yn = yn == null ? 0 : Ms(Do(yn), 292)), yn && ny(Yt))) { + var Bn = (Qo(Yt) + 'e').split('e'), + Wn = Vt(Bn[0] + 'e' + (+Bn[1] + yn)) + return (Bn = (Qo(Wn) + 'e').split('e')), +(Bn[0] + 'e' + (+Bn[1] - yn)) + } + return Vt(Yt) + } + } + var Ls = + vp && 1 / Wp(new vp([, -0]))[1] == Wt + ? function (Rt) { + return new vp(Rt) + } + : f1 + function Tl(Rt) { + return function (Vt) { + var Yt = Ks(Vt) + return Yt == Pn ? zp(Vt) : Yt == An ? Fy(Vt) : Dy(Vt, Rt(Vt)) + } + } + function ur(Rt, Vt, Yt, yn, Bn, Wn, Xn, Qn) { + var ar = Vt & bt + if (!ar && typeof Rt != 'function') throw new Gs(at) + var Ir = yn ? yn.length : 0 + if ( + (Ir || ((Vt &= ~(St | Tt)), (yn = Bn = nt)), + (Xn = Xn === nt ? Xn : _s(Do(Xn), 0)), + (Qn = Qn === nt ? Qn : Do(Qn)), + (Ir -= Bn ? Bn.length : 0), + Vt & Tt) + ) { + var Cr = yn, + Or = Bn + yn = Bn = nt + } + var Qr = ar ? nt : hu(Rt), + uo = [Rt, Vt, Yt, yn, Bn, Cr, Or, Wn, Xn, Qn] + if ( + (Qr && Rw(uo, Qr), + (Rt = uo[0]), + (Vt = uo[1]), + (Yt = uo[2]), + (yn = uo[3]), + (Bn = uo[4]), + (Qn = uo[9] = uo[9] === nt ? (ar ? 0 : Rt.length) : _s(uo[9] - Ir, 0)), + !Qn && Vt & (xt | kt) && (Vt &= ~(xt | kt)), + !Vt || Vt == yt) + ) + var So = Y0(Rt, Vt, Yt) + else + Vt == xt || Vt == kt + ? (So = Gt(Rt, Vt, Qn)) + : (Vt == St || Vt == (yt | St)) && !Bn.length + ? (So = oo(Rt, Vt, Yt, yn)) + : (So = Cn.apply(nt, uo)) + var Lo = Qr ? w0 : $1 + return P1(Lo(So, uo), Rt, Vt) + } + function or(Rt, Vt, Yt, yn) { + return Rt === nt || (Eu(Rt, gp[Yt]) && !qo.call(yn, Yt)) ? Vt : Rt + } + function yr(Rt, Vt, Yt, yn, Bn, Wn) { + return ds(Rt) && ds(Vt) && (Wn.set(Vt, Rt), Zl(Rt, Vt, nt, yr, Wn), Wn.delete(Vt)), Rt + } + function _i(Rt) { + return Ry(Rt) ? nt : Rt + } + function co(Rt, Vt, Yt, yn, Bn, Wn) { + var Xn = Yt & mt, + Qn = Rt.length, + ar = Vt.length + if (Qn != ar && !(Xn && ar > Qn)) return !1 + var Ir = Wn.get(Rt), + Cr = Wn.get(Vt) + if (Ir && Cr) return Ir == Vt && Cr == Rt + var Or = -1, + Qr = !0, + uo = Yt & gt ? new Ru() : nt + for (Wn.set(Rt, Vt), Wn.set(Vt, Rt); ++Or < Qn; ) { + var So = Rt[Or], + Lo = Vt[Or] + if (yn) var Eo = Xn ? yn(Lo, So, Or, Vt, Rt, Wn) : yn(So, Lo, Or, Rt, Vt, Wn) + if (Eo !== nt) { + if (Eo) continue + Qr = !1 + break + } + if (uo) { + if ( + !Np(Vt, function (Uo, Ho) { + if (!As(uo, Ho) && (So === Uo || Bn(So, Uo, Yt, yn, Wn))) return uo.push(Ho) + }) + ) { + Qr = !1 + break + } + } else if (!(So === Lo || Bn(So, Lo, Yt, yn, Wn))) { + Qr = !1 + break + } + } + return Wn.delete(Rt), Wn.delete(Vt), Qr + } + function Oo(Rt, Vt, Yt, yn, Bn, Wn, Xn) { + switch (Yt) { + case Zt: + if (Rt.byteLength != Vt.byteLength || Rt.byteOffset != Vt.byteOffset) return !1 + ;(Rt = Rt.buffer), (Vt = Vt.buffer) + case un: + return !(Rt.byteLength != Vt.byteLength || !Wn(new Gp(Rt), new Gp(Vt))) + case nn: + case hn: + case $n: + return Eu(+Rt, +Vt) + case an: + return Rt.name == Vt.name && Rt.message == Vt.message + case In: + case wn: + return Rt == Vt + '' + case Pn: + var Qn = zp + case An: + var ar = yn & mt + if ((Qn || (Qn = Wp), Rt.size != Vt.size && !ar)) return !1 + var Ir = Xn.get(Rt) + if (Ir) return Ir == Vt + ;(yn |= gt), Xn.set(Rt, Vt) + var Cr = co(Qn(Rt), Qn(Vt), yn, Bn, Wn, Xn) + return Xn.delete(Rt), Cr + case fn: + if (_u) return _u.call(Rt) == _u.call(Vt) + } + return !1 + } + function Ao(Rt, Vt, Yt, yn, Bn, Wn) { + var Xn = Yt & mt, + Qn = ms(Rt), + ar = Qn.length, + Ir = ms(Vt), + Cr = Ir.length + if (ar != Cr && !Xn) return !1 + for (var Or = ar; Or--; ) { + var Qr = Qn[Or] + if (!(Xn ? Qr in Vt : qo.call(Vt, Qr))) return !1 + } + var uo = Wn.get(Rt), + So = Wn.get(Vt) + if (uo && So) return uo == Vt && So == Rt + var Lo = !0 + Wn.set(Rt, Vt), Wn.set(Vt, Rt) + for (var Eo = Xn; ++Or < ar; ) { + Qr = Qn[Or] + var Uo = Rt[Qr], + Ho = Vt[Qr] + if (yn) var Ql = Xn ? yn(Ho, Uo, Qr, Vt, Rt, Wn) : yn(Uo, Ho, Qr, Rt, Vt, Wn) + if (!(Ql === nt ? Uo === Ho || Bn(Uo, Ho, Yt, yn, Wn) : Ql)) { + Lo = !1 + break + } + Eo || (Eo = Qr == 'constructor') + } + if (Lo && !Eo) { + var Al = Rt.constructor, + _c = Vt.constructor + Al != _c && + 'constructor' in Rt && + 'constructor' in Vt && + !(typeof Al == 'function' && Al instanceof Al && typeof _c == 'function' && _c instanceof _c) && + (Lo = !1) + } + return Wn.delete(Rt), Wn.delete(Vt), Lo + } + function jo(Rt) { + return _b(A1(Rt, nt, D1), Rt + '') + } + function ms(Rt) { + return Cm(Rt, Fs, X0) + } + function zo(Rt) { + return Cm(Rt, Ol, k1) + } + var hu = km + ? function (Rt) { + return km.get(Rt) + } + : f1 + function Um(Rt) { + for (var Vt = Rt.name + '', Yt = Zu[Vt], yn = qo.call(Zu, Vt) ? Yt.length : 0; yn--; ) { + var Bn = Yt[yn], + Wn = Bn.func + if (Wn == null || Wn == Rt) return Bn.name + } + return Vt + } + function zm(Rt) { + var Vt = qo.call(Fn, 'placeholder') ? Fn : Rt + return Vt.placeholder + } + function wo() { + var Rt = Fn.iteratee || h1 + return (Rt = Rt === h1 ? Ap : Rt), arguments.length ? Rt(arguments[0], arguments[1]) : Rt + } + function T0(Rt, Vt) { + var Yt = Rt.__data__ + return Cw(Vt) ? Yt[typeof Vt == 'string' ? 'string' : 'hash'] : Yt.map + } + function K0(Rt) { + for (var Vt = Fs(Rt), Yt = Vt.length; Yt--; ) { + var yn = Vt[Yt], + Bn = Rt[yn] + Vt[Yt] = [yn, Bn, T1(Bn)] + } + return Vt + } + function dm(Rt, Vt) { + var Yt = Zm(Rt, Vt) + return Tp(Yt) ? Yt : nt + } + function xw(Rt) { + var Vt = qo.call(Rt, au), + Yt = Rt[au] + try { + Rt[au] = nt + var yn = !0 + } catch {} + var Bn = Qs.call(Rt) + return yn && (Vt ? (Rt[au] = Yt) : delete Rt[au]), Bn + } + var X0 = Zp + ? function (Rt) { + return Rt == null + ? [] + : ((Rt = ko(Rt)), + Ps(Zp(Rt), function (Vt) { + return xm.call(Rt, Vt) + })) + } + : p1, + k1 = Zp + ? function (Rt) { + for (var Vt = []; Rt; ) Ll(Vt, X0(Rt)), (Rt = qp(Rt)) + return Vt + } + : p1, + Ks = Cs + ;((wp && Ks(new wp(new ArrayBuffer(1))) != Zt) || + (Jp && Ks(new Jp()) != Pn) || + (iy && Ks(iy.resolve()) != cn) || + (vp && Ks(new vp()) != An) || + (Ku && Ks(new Ku()) != kn)) && + (Ks = function (Rt) { + var Vt = Cs(Rt), + Yt = Vt == Tn ? Rt.constructor : nt, + yn = Yt ? fm(Yt) : '' + if (yn) + switch (yn) { + case Xy: + return Zt + case Zy: + return Pn + case Jy: + return cn + case Qy: + return An + case su: + return kn + } + return Vt + }) + function kw(Rt, Vt, Yt) { + for (var yn = -1, Bn = Yt.length; ++yn < Bn; ) { + var Wn = Yt[yn], + Xn = Wn.size + switch (Wn.type) { + case 'drop': + Rt += Xn + break + case 'dropRight': + Vt -= Xn + break + case 'take': + Vt = Ms(Vt, Rt + Xn) + break + case 'takeRight': + Rt = _s(Rt, Vt - Xn) + break + } + } + return { start: Rt, end: Vt } + } + function Sw(Rt) { + var Vt = Rt.match(Jt) + return Vt ? Vt[1].split(En) : [] + } + function S1(Rt, Vt, Yt) { + Vt = Fu(Vt, Rt) + for (var yn = -1, Bn = Vt.length, Wn = !1; ++yn < Bn; ) { + var Xn = Wu(Vt[yn]) + if (!(Wn = Rt != null && Yt(Rt, Xn))) break + Rt = Rt[Xn] + } + return Wn || ++yn != Bn + ? Wn + : ((Bn = Rt == null ? 0 : Rt.length), !!Bn && R0(Bn) && tp(Xn, Bn) && (Mo(Rt) || pm(Rt))) + } + function Ew(Rt) { + var Vt = Rt.length, + Yt = new Rt.constructor(Vt) + return ( + Vt && typeof Rt[0] == 'string' && qo.call(Rt, 'index') && ((Yt.index = Rt.index), (Yt.input = Rt.input)), + Yt + ) + } + function E1(Rt) { + return typeof Rt.constructor == 'function' && !Py(Rt) ? xu(qp(Rt)) : {} + } + function Tw(Rt, Vt, Yt) { + var yn = Rt.constructor + switch (Vt) { + case un: + return Nm(Rt) + case nn: + case hn: + return new yn(+Rt) + case Zt: + return G0(Rt, Yt) + case Xt: + case Sn: + case Rn: + case jn: + case On: + case Zn: + case Vn: + case qn: + case zn: + return k0(Rt, Yt) + case Pn: + return new yn() + case $n: + case wn: + return new yn(Rt) + case In: + return Ml(Rt) + case An: + return new yn() + case fn: + return Cy(Rt) + } + } + function Iw(Rt, Vt) { + var Yt = Vt.length + if (!Yt) return Rt + var yn = Yt - 1 + return ( + (Vt[yn] = (Yt > 1 ? '& ' : '') + Vt[yn]), + (Vt = Vt.join(Yt > 2 ? ', ' : ' ')), + Rt.replace( + dn, + `{ +/* [wrapped with ` + + Vt + + `] */ +`, + ) + ) + } + function Aw(Rt) { + return Mo(Rt) || pm(Rt) || !!(ty && Rt && Rt[ty]) + } + function tp(Rt, Vt) { + var Yt = typeof Rt + return ( + (Vt = Vt ?? zt), + !!Vt && (Yt == 'number' || (Yt != 'symbol' && Gr.test(Rt))) && Rt > -1 && Rt % 1 == 0 && Rt < Vt + ) + } + function Il(Rt, Vt, Yt) { + if (!ds(Yt)) return !1 + var yn = typeof Vt + return (yn == 'number' ? Bl(Yt) && tp(Vt, Yt.length) : yn == 'string' && Vt in Yt) ? Eu(Yt[Vt], Rt) : !1 + } + function Z0(Rt, Vt) { + if (Mo(Rt)) return !1 + var Yt = typeof Rt + return Yt == 'number' || Yt == 'symbol' || Yt == 'boolean' || Rt == null || Jl(Rt) + ? !0 + : ao.test(Rt) || !Fr.test(Rt) || (Vt != null && Rt in ko(Vt)) + } + function Cw(Rt) { + var Vt = typeof Rt + return Vt == 'string' || Vt == 'number' || Vt == 'symbol' || Vt == 'boolean' + ? Rt !== '__proto__' + : Rt === null + } + function J0(Rt) { + var Vt = Um(Rt), + Yt = Fn[Vt] + if (typeof Yt != 'function' || !(Vt in yo.prototype)) return !1 + if (Rt === Yt) return !0 + var yn = hu(Yt) + return !!yn && Rt === yn[0] + } + function $w(Rt) { + return !!ou && ou in Rt + } + var Pw = vs ? np : m1 + function Py(Rt) { + var Vt = Rt && Rt.constructor, + Yt = (typeof Vt == 'function' && Vt.prototype) || gp + return Rt === Yt + } + function T1(Rt) { + return Rt === Rt && !ds(Rt) + } + function I1(Rt, Vt) { + return function (Yt) { + return Yt == null ? !1 : Yt[Rt] === Vt && (Vt !== nt || Rt in ko(Yt)) + } + } + function Mw(Rt) { + var Vt = P0(Rt, function (yn) { + return Yt.size === ct && Yt.clear(), yn + }), + Yt = Vt.cache + return Vt + } + function Rw(Rt, Vt) { + var Yt = Rt[1], + yn = Vt[1], + Bn = Yt | yn, + Wn = Bn < (yt | bt | At), + Xn = + (yn == At && Yt == xt) || + (yn == At && Yt == Et && Rt[7].length <= Vt[8]) || + (yn == (At | Et) && Vt[7].length <= Vt[8] && Yt == xt) + if (!(Wn || Xn)) return Rt + yn & yt && ((Rt[2] = Vt[2]), (Bn |= Yt & yt ? 0 : vt)) + var Qn = Vt[3] + if (Qn) { + var ar = Rt[3] + ;(Rt[3] = ar ? zu(ar, Qn, Vt[4]) : Qn), (Rt[4] = ar ? Vl(Rt[3], ut) : Vt[4]) + } + return ( + (Qn = Vt[5]), + Qn && ((ar = Rt[5]), (Rt[5] = ar ? um(ar, Qn, Vt[6]) : Qn), (Rt[6] = ar ? Vl(Rt[5], ut) : Vt[6])), + (Qn = Vt[7]), + Qn && (Rt[7] = Qn), + yn & At && (Rt[8] = Rt[8] == null ? Vt[8] : Ms(Rt[8], Vt[8])), + Rt[9] == null && (Rt[9] = Vt[9]), + (Rt[0] = Vt[0]), + (Rt[1] = Bn), + Rt + ) + } + function Bw(Rt) { + var Vt = [] + if (Rt != null) for (var Yt in ko(Rt)) Vt.push(Yt) + return Vt + } + function Ow(Rt) { + return Qs.call(Rt) + } + function A1(Rt, Vt, Yt) { + return ( + (Vt = _s(Vt === nt ? Rt.length - 1 : Vt, 0)), + function () { + for (var yn = arguments, Bn = -1, Wn = _s(yn.length - Vt, 0), Xn = gr(Wn); ++Bn < Wn; ) + Xn[Bn] = yn[Vt + Bn] + Bn = -1 + for (var Qn = gr(Vt + 1); ++Bn < Vt; ) Qn[Bn] = yn[Bn] + return (Qn[Vt] = Yt(Xn)), Vo(Rt, this, Qn) + } + ) + } + function C1(Rt, Vt) { + return Vt.length < 2 ? Rt : Xl(Rt, El(Vt, 0, -1)) + } + function jw(Rt, Vt) { + for (var Yt = Rt.length, yn = Ms(Vt.length, Yt), Bn = Ns(Rt); yn--; ) { + var Wn = Vt[yn] + Rt[yn] = tp(Wn, Yt) ? Bn[Wn] : nt + } + return Rt + } + function Q0(Rt, Vt) { + if (!(Vt === 'constructor' && typeof Rt[Vt] == 'function') && Vt != '__proto__') return Rt[Vt] + } + var $1 = M1(w0), + My = + Vy || + function (Rt, Vt) { + return ns.setTimeout(Rt, Vt) + }, + _b = M1(ju) + function P1(Rt, Vt, Yt) { + var yn = Vt + '' + return _b(Rt, Iw(yn, Dw(Sw(yn), Yt))) + } + function M1(Rt) { + var Vt = 0, + Yt = 0 + return function () { + var yn = qy(), + Bn = Ct - (yn - Yt) + if (((Yt = yn), Bn > 0)) { + if (++Vt >= Pt) return arguments[0] + } else Vt = 0 + return Rt.apply(nt, arguments) + } + } + function I0(Rt, Vt) { + var Yt = -1, + yn = Rt.length, + Bn = yn - 1 + for (Vt = Vt === nt ? yn : Vt; ++Yt < Vt; ) { + var Wn = cu(Yt, Bn), + Xn = Rt[Wn] + ;(Rt[Wn] = Rt[Yt]), (Rt[Yt] = Xn) + } + return (Rt.length = Vt), Rt + } + var R1 = Mw(function (Rt) { + var Vt = [] + return ( + Rt.charCodeAt(0) === 46 && Vt.push(''), + Rt.replace(Yr, function (Yt, yn, Bn, Wn) { + Vt.push(Bn ? Wn.replace(Kn, '$1') : yn || Yt) + }), + Vt + ) + }) + function Wu(Rt) { + if (typeof Rt == 'string' || Jl(Rt)) return Rt + var Vt = Rt + '' + return Vt == '0' && 1 / Rt == -Wt ? '-0' : Vt + } + function fm(Rt) { + if (Rt != null) { + try { + return yp.call(Rt) + } catch {} + try { + return Rt + '' + } catch {} + } + return '' + } + function Dw(Rt, Vt) { + return ( + ws(en, function (Yt) { + var yn = '_.' + Yt[0] + Vt & Yt[1] && !Nl(Rt, yn) && Rt.push(yn) + }), + Rt.sort() + ) + } + function B1(Rt) { + if (Rt instanceof yo) return Rt.clone() + var Vt = new Rs(Rt.__wrapped__, Rt.__chain__) + return ( + (Vt.__actions__ = Ns(Rt.__actions__)), (Vt.__index__ = Rt.__index__), (Vt.__values__ = Rt.__values__), Vt + ) + } + function Nw(Rt, Vt, Yt) { + ;(Yt ? Il(Rt, Vt, Yt) : Vt === nt) ? (Vt = 1) : (Vt = _s(Do(Vt), 0)) + var yn = Rt == null ? 0 : Rt.length + if (!yn || Vt < 1) return [] + for (var Bn = 0, Wn = 0, Xn = gr(Kp(yn / Vt)); Bn < yn; ) Xn[Wn++] = El(Rt, Bn, (Bn += Vt)) + return Xn + } + function Lw(Rt) { + for (var Vt = -1, Yt = Rt == null ? 0 : Rt.length, yn = 0, Bn = []; ++Vt < Yt; ) { + var Wn = Rt[Vt] + Wn && (Bn[yn++] = Wn) + } + return Bn + } + function Fw() { + var Rt = arguments.length + if (!Rt) return [] + for (var Vt = gr(Rt - 1), Yt = arguments[0], yn = Rt; yn--; ) Vt[yn - 1] = arguments[yn] + return Ll(Mo(Yt) ? Ns(Yt) : [Yt], Is(Vt, 1)) + } + var Uw = mo(function (Rt, Vt) { + return ks(Rt) ? Qu(Rt, Is(Vt, 1, ks, !0)) : [] + }), + zw = mo(function (Rt, Vt) { + var Yt = du(Vt) + return ks(Yt) && (Yt = nt), ks(Rt) ? Qu(Rt, Is(Vt, 1, ks, !0), wo(Yt, 2)) : [] + }), + Ww = mo(function (Rt, Vt) { + var Yt = du(Vt) + return ks(Yt) && (Yt = nt), ks(Rt) ? Qu(Rt, Is(Vt, 1, ks, !0), nt, Yt) : [] + }) + function Vw(Rt, Vt, Yt) { + var yn = Rt == null ? 0 : Rt.length + return yn ? ((Vt = Yt || Vt === nt ? 1 : Do(Vt)), El(Rt, Vt < 0 ? 0 : Vt, yn)) : [] + } + function Hw(Rt, Vt, Yt) { + var yn = Rt == null ? 0 : Rt.length + return yn ? ((Vt = Yt || Vt === nt ? 1 : Do(Vt)), (Vt = yn - Vt), El(Rt, 0, Vt < 0 ? 0 : Vt)) : [] + } + function Gw(Rt, Vt) { + return Rt && Rt.length ? cm(Rt, wo(Vt, 3), !0, !0) : [] + } + function qw(Rt, Vt) { + return Rt && Rt.length ? cm(Rt, wo(Vt, 3), !0) : [] + } + function Yw(Rt, Vt, Yt, yn) { + var Bn = Rt == null ? 0 : Rt.length + return Bn + ? (Yt && typeof Yt != 'number' && Il(Rt, Vt, Yt) && ((Yt = 0), (yn = Bn)), g0(Rt, Vt, Yt, yn)) + : [] + } + function O1(Rt, Vt, Yt) { + var yn = Rt == null ? 0 : Rt.length + if (!yn) return -1 + var Bn = Yt == null ? 0 : Do(Yt) + return Bn < 0 && (Bn = _s(yn + Bn, 0)), sp(Rt, wo(Vt, 3), Bn) + } + function j1(Rt, Vt, Yt) { + var yn = Rt == null ? 0 : Rt.length + if (!yn) return -1 + var Bn = yn - 1 + return ( + Yt !== nt && ((Bn = Do(Yt)), (Bn = Yt < 0 ? _s(yn + Bn, 0) : Ms(Bn, yn - 1))), sp(Rt, wo(Vt, 3), Bn, !0) + ) + } + function D1(Rt) { + var Vt = Rt == null ? 0 : Rt.length + return Vt ? Is(Rt, 1) : [] + } + function Kw(Rt) { + var Vt = Rt == null ? 0 : Rt.length + return Vt ? Is(Rt, Wt) : [] + } + function Xw(Rt, Vt) { + var Yt = Rt == null ? 0 : Rt.length + return Yt ? ((Vt = Vt === nt ? 1 : Do(Vt)), Is(Rt, Vt)) : [] + } + function Zw(Rt) { + for (var Vt = -1, Yt = Rt == null ? 0 : Rt.length, yn = {}; ++Vt < Yt; ) { + var Bn = Rt[Vt] + yn[Bn[0]] = Bn[1] + } + return yn + } + function N1(Rt) { + return Rt && Rt.length ? Rt[0] : nt + } + function Jw(Rt, Vt, Yt) { + var yn = Rt == null ? 0 : Rt.length + if (!yn) return -1 + var Bn = Yt == null ? 0 : Do(Yt) + return Bn < 0 && (Bn = _s(yn + Bn, 0)), Fl(Rt, Vt, Bn) + } + function Qw(Rt) { + var Vt = Rt == null ? 0 : Rt.length + return Vt ? El(Rt, 0, -1) : [] + } + var ev = mo(function (Rt) { + var Vt = ba(Rt, Dm) + return Vt.length && Vt[0] === Rt[0] ? Sp(Vt) : [] + }), + tv = mo(function (Rt) { + var Vt = du(Rt), + Yt = ba(Rt, Dm) + return Vt === du(Yt) ? (Vt = nt) : Yt.pop(), Yt.length && Yt[0] === Rt[0] ? Sp(Yt, wo(Vt, 2)) : [] + }), + nv = mo(function (Rt) { + var Vt = du(Rt), + Yt = ba(Rt, Dm) + return ( + (Vt = typeof Vt == 'function' ? Vt : nt), + Vt && Yt.pop(), + Yt.length && Yt[0] === Rt[0] ? Sp(Yt, nt, Vt) : [] + ) + }) + function rv(Rt, Vt) { + return Rt == null ? '' : N0.call(Rt, Vt) + } + function du(Rt) { + var Vt = Rt == null ? 0 : Rt.length + return Vt ? Rt[Vt - 1] : nt + } + function iv(Rt, Vt, Yt) { + var yn = Rt == null ? 0 : Rt.length + if (!yn) return -1 + var Bn = yn + return ( + Yt !== nt && ((Bn = Do(Yt)), (Bn = Bn < 0 ? _s(yn + Bn, 0) : Ms(Bn, yn - 1))), + Vt === Vt ? Uy(Rt, Vt, Bn) : sp(Rt, Lp, Bn, !0) + ) + } + function ov(Rt, Vt) { + return Rt && Rt.length ? ku(Rt, Do(Vt)) : nt + } + var av = mo(L1) + function L1(Rt, Vt) { + return Rt && Rt.length && Vt && Vt.length ? Cp(Rt, Vt) : Rt + } + function sv(Rt, Vt, Yt) { + return Rt && Rt.length && Vt && Vt.length ? Cp(Rt, Vt, wo(Yt, 2)) : Rt + } + function lv(Rt, Vt, Yt) { + return Rt && Rt.length && Vt && Vt.length ? Cp(Rt, Vt, nt, Yt) : Rt + } + var cv = jo(function (Rt, Vt) { + var Yt = Rt == null ? 0 : Rt.length, + yn = Im(Rt, Vt) + return ( + Os( + Rt, + ba(Vt, function (Bn) { + return tp(Bn, Yt) ? +Bn : Bn + }).sort(Su), + ), + yn + ) + }) + function uv(Rt, Vt) { + var Yt = [] + if (!(Rt && Rt.length)) return Yt + var yn = -1, + Bn = [], + Wn = Rt.length + for (Vt = wo(Vt, 3); ++yn < Wn; ) { + var Xn = Rt[yn] + Vt(Xn, yn, Rt) && (Yt.push(Xn), Bn.push(yn)) + } + return Os(Rt, Bn), Yt + } + function e1(Rt) { + return Rt == null ? Rt : Ky.call(Rt) + } + function hv(Rt, Vt, Yt) { + var yn = Rt == null ? 0 : Rt.length + return yn + ? (Yt && typeof Yt != 'number' && Il(Rt, Vt, Yt) + ? ((Vt = 0), (Yt = yn)) + : ((Vt = Vt == null ? 0 : Do(Vt)), (Yt = Yt === nt ? yn : Do(Yt))), + El(Rt, Vt, Yt)) + : [] + } + function dv(Rt, Vt) { + return uu(Rt, Vt) + } + function fv(Rt, Vt, Yt) { + return Om(Rt, Vt, wo(Yt, 2)) + } + function pv(Rt, Vt) { + var Yt = Rt == null ? 0 : Rt.length + if (Yt) { + var yn = uu(Rt, Vt) + if (yn < Yt && Eu(Rt[yn], Vt)) return yn + } + return -1 + } + function mv(Rt, Vt) { + return uu(Rt, Vt, !0) + } + function gv(Rt, Vt, Yt) { + return Om(Rt, Vt, wo(Yt, 2), !0) + } + function yv(Rt, Vt) { + var Yt = Rt == null ? 0 : Rt.length + if (Yt) { + var yn = uu(Rt, Vt, !0) - 1 + if (Eu(Rt[yn], Vt)) return yn + } + return -1 + } + function bv(Rt) { + return Rt && Rt.length ? Sy(Rt) : [] + } + function wv(Rt, Vt) { + return Rt && Rt.length ? Sy(Rt, wo(Vt, 2)) : [] + } + function vv(Rt) { + var Vt = Rt == null ? 0 : Rt.length + return Vt ? El(Rt, 1, Vt) : [] + } + function _v(Rt, Vt, Yt) { + return Rt && Rt.length ? ((Vt = Yt || Vt === nt ? 1 : Do(Vt)), El(Rt, 0, Vt < 0 ? 0 : Vt)) : [] + } + function xv(Rt, Vt, Yt) { + var yn = Rt == null ? 0 : Rt.length + return yn ? ((Vt = Yt || Vt === nt ? 1 : Do(Vt)), (Vt = yn - Vt), El(Rt, Vt < 0 ? 0 : Vt, yn)) : [] + } + function kv(Rt, Vt) { + return Rt && Rt.length ? cm(Rt, wo(Vt, 3), !1, !0) : [] + } + function Sv(Rt, Vt) { + return Rt && Rt.length ? cm(Rt, wo(Vt, 3)) : [] + } + var Ev = mo(function (Rt) { + return Du(Is(Rt, 1, ks, !0)) + }), + Tv = mo(function (Rt) { + var Vt = du(Rt) + return ks(Vt) && (Vt = nt), Du(Is(Rt, 1, ks, !0), wo(Vt, 2)) + }), + Iv = mo(function (Rt) { + var Vt = du(Rt) + return (Vt = typeof Vt == 'function' ? Vt : nt), Du(Is(Rt, 1, ks, !0), nt, Vt) + }) + function Av(Rt) { + return Rt && Rt.length ? Du(Rt) : [] + } + function Cv(Rt, Vt) { + return Rt && Rt.length ? Du(Rt, wo(Vt, 2)) : [] + } + function $v(Rt, Vt) { + return (Vt = typeof Vt == 'function' ? Vt : nt), Rt && Rt.length ? Du(Rt, nt, Vt) : [] + } + function n1(Rt) { + if (!(Rt && Rt.length)) return [] + var Vt = 0 + return ( + (Rt = Ps(Rt, function (Yt) { + if (ks(Yt)) return (Vt = _s(Yt.length, Vt)), !0 + })), + wu(Vt, function (Yt) { + return ba(Rt, qs(Yt)) + }) + ) + } + function F1(Rt, Vt) { + if (!(Rt && Rt.length)) return [] + var Yt = n1(Rt) + return Vt == null + ? Yt + : ba(Yt, function (yn) { + return Vo(Vt, nt, yn) + }) + } + var Pv = mo(function (Rt, Vt) { + return ks(Rt) ? Qu(Rt, Vt) : [] + }), + Mv = mo(function (Rt) { + return Iy(Ps(Rt, ks)) + }), + Rv = mo(function (Rt) { + var Vt = du(Rt) + return ks(Vt) && (Vt = nt), Iy(Ps(Rt, ks), wo(Vt, 2)) + }), + Bv = mo(function (Rt) { + var Vt = du(Rt) + return (Vt = typeof Vt == 'function' ? Vt : nt), Iy(Ps(Rt, ks), nt, Vt) + }), + Ov = mo(n1) + function jv(Rt, Vt) { + return Lu(Rt || [], Vt || [], Gl) + } + function Dv(Rt, Vt) { + return Lu(Rt || [], Vt || [], _f) + } + var Nv = mo(function (Rt) { + var Vt = Rt.length, + Yt = Vt > 1 ? Rt[Vt - 1] : nt + return (Yt = typeof Yt == 'function' ? (Rt.pop(), Yt) : nt), F1(Rt, Yt) + }) + function U1(Rt) { + var Vt = Fn(Rt) + return (Vt.__chain__ = !0), Vt + } + function Lv(Rt, Vt) { + return Vt(Rt), Rt + } + function A0(Rt, Vt) { + return Vt(Rt) + } + var Fv = jo(function (Rt) { + var Vt = Rt.length, + Yt = Vt ? Rt[0] : 0, + yn = this.__wrapped__, + Bn = function (Wn) { + return Im(Wn, Rt) + } + return Vt > 1 || this.__actions__.length || !(yn instanceof yo) || !tp(Yt) + ? this.thru(Bn) + : ((yn = yn.slice(Yt, +Yt + (Vt ? 1 : 0))), + yn.__actions__.push({ func: A0, args: [Bn], thisArg: nt }), + new Rs(yn, this.__chain__).thru(function (Wn) { + return Vt && !Wn.length && Wn.push(nt), Wn + })) + }) + function Uv() { + return U1(this) + } + function zv() { + return new Rs(this.value(), this.__chain__) + } + function Wv() { + this.__values__ === nt && (this.__values__ = tw(this.value())) + var Rt = this.__index__ >= this.__values__.length, + Vt = Rt ? nt : this.__values__[this.__index__++] + return { done: Rt, value: Vt } + } + function Vv() { + return this + } + function Hv(Rt) { + for (var Vt, Yt = this; Yt instanceof em; ) { + var yn = B1(Yt) + ;(yn.__index__ = 0), (yn.__values__ = nt), Vt ? (Bn.__wrapped__ = yn) : (Vt = yn) + var Bn = yn + Yt = Yt.__wrapped__ + } + return (Bn.__wrapped__ = Rt), Vt + } + function Gv() { + var Rt = this.__wrapped__ + if (Rt instanceof yo) { + var Vt = Rt + return ( + this.__actions__.length && (Vt = new yo(this)), + (Vt = Vt.reverse()), + Vt.__actions__.push({ func: A0, args: [e1], thisArg: nt }), + new Rs(Vt, this.__chain__) + ) + } + return this.thru(e1) + } + function qv() { + return Nu(this.__wrapped__, this.__actions__) + } + var Yv = hm(function (Rt, Vt, Yt) { + qo.call(Rt, Yt) ? ++Rt[Yt] : lu(Rt, Yt, 1) + }) + function Kv(Rt, Vt, Yt) { + var yn = Mo(Rt) ? Ym : V0 + return Yt && Il(Rt, Vt, Yt) && (Vt = nt), yn(Rt, wo(Vt, 3)) + } + function Xv(Rt, Vt) { + var Yt = Mo(Rt) ? Ps : my + return Yt(Rt, wo(Vt, 3)) + } + var Zv = tn(O1), + Jv = tn(j1) + function Qv(Rt, Vt) { + return Is(C0(Rt, Vt), 1) + } + function e_(Rt, Vt) { + return Is(C0(Rt, Vt), Wt) + } + function t_(Rt, Vt, Yt) { + return (Yt = Yt === nt ? 1 : Do(Yt)), Is(C0(Rt, Vt), Yt) + } + function z1(Rt, Vt) { + var Yt = Mo(Rt) ? ws : Yl + return Yt(Rt, wo(Vt, 3)) + } + function W1(Rt, Vt) { + var Yt = Mo(Rt) ? qm : m0 + return Yt(Rt, wo(Vt, 3)) + } + var n_ = hm(function (Rt, Vt, Yt) { + qo.call(Rt, Yt) ? Rt[Yt].push(Vt) : lu(Rt, Yt, [Vt]) + }) + function r_(Rt, Vt, Yt, yn) { + ;(Rt = Bl(Rt) ? Rt : Vm(Rt)), (Yt = Yt && !yn ? Do(Yt) : 0) + var Bn = Rt.length + return ( + Yt < 0 && (Yt = _s(Bn + Yt, 0)), + B0(Rt) ? Yt <= Bn && Rt.indexOf(Vt, Yt) > -1 : !!Bn && Fl(Rt, Vt, Yt) > -1 + ) + } + var i_ = mo(function (Rt, Vt, Yt) { + var yn = -1, + Bn = typeof Vt == 'function', + Wn = Bl(Rt) ? gr(Rt.length) : [] + return ( + Yl(Rt, function (Xn) { + Wn[++yn] = Bn ? Vo(Vt, Xn, Yt) : xa(Xn, Vt, Yt) + }), + Wn + ) + }), + o_ = hm(function (Rt, Vt, Yt) { + lu(Rt, Yt, Vt) + }) + function C0(Rt, Vt) { + var Yt = Mo(Rt) ? ba : _d + return Yt(Rt, wo(Vt, 3)) + } + function a_(Rt, Vt, Yt, yn) { + return Rt == null + ? [] + : (Mo(Vt) || (Vt = Vt == null ? [] : [Vt]), + (Yt = yn ? nt : Yt), + Mo(Yt) || (Yt = Yt == null ? [] : [Yt]), + sm(Rt, Vt, Yt)) + } + var s_ = hm( + function (Rt, Vt, Yt) { + Rt[Yt ? 0 : 1].push(Vt) + }, + function () { + return [[], []] + }, + ) + function l_(Rt, Vt, Yt) { + var yn = Mo(Rt) ? ym : Au, + Bn = arguments.length < 3 + return yn(Rt, wo(Vt, 4), Yt, Bn, Yl) + } + function c_(Rt, Vt, Yt) { + var yn = Mo(Rt) ? By : Au, + Bn = arguments.length < 3 + return yn(Rt, wo(Vt, 4), Yt, Bn, m0) + } + function u_(Rt, Vt) { + var Yt = Mo(Rt) ? Ps : my + return Yt(Rt, M0(wo(Vt, 3))) + } + function h_(Rt) { + var Vt = Mo(Rt) ? tm : b0 + return Vt(Rt) + } + function d_(Rt, Vt, Yt) { + ;(Yt ? Il(Rt, Vt, Yt) : Vt === nt) ? (Vt = 1) : (Vt = Do(Vt)) + var yn = Mo(Rt) ? ly : vy + return yn(Rt, Vt) + } + function f_(Rt) { + var Vt = Mo(Rt) ? f0 : v0 + return Vt(Rt) + } + function p_(Rt) { + if (Rt == null) return 0 + if (Bl(Rt)) return B0(Rt) ? ru(Rt) : Rt.length + var Vt = Ks(Rt) + return Vt == Pn || Vt == An ? Rt.size : Bs(Rt).length + } + function m_(Rt, Vt, Yt) { + var yn = Mo(Rt) ? Np : xy + return Yt && Il(Rt, Vt, Yt) && (Vt = nt), yn(Rt, wo(Vt, 3)) + } + var g_ = mo(function (Rt, Vt) { + if (Rt == null) return [] + var Yt = Vt.length + return ( + Yt > 1 && Il(Rt, Vt[0], Vt[1]) ? (Vt = []) : Yt > 2 && Il(Vt[0], Vt[1], Vt[2]) && (Vt = [Vt[0]]), + sm(Rt, Is(Vt, 1), []) + ) + }), + $0 = + Wy || + function () { + return ns.Date.now() + } + function y_(Rt, Vt) { + if (typeof Vt != 'function') throw new Gs(at) + return ( + (Rt = Do(Rt)), + function () { + if (--Rt < 1) return Vt.apply(this, arguments) + } + ) + } + function V1(Rt, Vt, Yt) { + return (Vt = Yt ? nt : Vt), (Vt = Rt && Vt == null ? Rt.length : Vt), ur(Rt, At, nt, nt, nt, nt, Vt) + } + function H1(Rt, Vt) { + var Yt + if (typeof Vt != 'function') throw new Gs(at) + return ( + (Rt = Do(Rt)), + function () { + return --Rt > 0 && (Yt = Vt.apply(this, arguments)), Rt <= 1 && (Vt = nt), Yt + } + ) + } + var r1 = mo(function (Rt, Vt, Yt) { + var yn = yt + if (Yt.length) { + var Bn = Vl(Yt, zm(r1)) + yn |= St + } + return ur(Rt, yn, Vt, Yt, Bn) + }), + G1 = mo(function (Rt, Vt, Yt) { + var yn = yt | bt + if (Yt.length) { + var Bn = Vl(Yt, zm(G1)) + yn |= St + } + return ur(Vt, yn, Rt, Yt, Bn) + }) + function q1(Rt, Vt, Yt) { + Vt = Yt ? nt : Vt + var yn = ur(Rt, xt, nt, nt, nt, nt, nt, Vt) + return (yn.placeholder = q1.placeholder), yn + } + function Y1(Rt, Vt, Yt) { + Vt = Yt ? nt : Vt + var yn = ur(Rt, kt, nt, nt, nt, nt, nt, Vt) + return (yn.placeholder = Y1.placeholder), yn + } + function K1(Rt, Vt, Yt) { + var yn, + Bn, + Wn, + Xn, + Qn, + ar, + Ir = 0, + Cr = !1, + Or = !1, + Qr = !0 + if (typeof Rt != 'function') throw new Gs(at) + ;(Vt = fu(Vt) || 0), + ds(Yt) && + ((Cr = !!Yt.leading), + (Or = 'maxWait' in Yt), + (Wn = Or ? _s(fu(Yt.maxWait) || 0, Vt) : Wn), + (Qr = 'trailing' in Yt ? !!Yt.trailing : Qr)) + function uo(Ss) { + var Tu = yn, + ip = Bn + return (yn = Bn = nt), (Ir = Ss), (Xn = Rt.apply(ip, Tu)), Xn + } + function So(Ss) { + return (Ir = Ss), (Qn = My(Uo, Vt)), Cr ? uo(Ss) : Xn + } + function Lo(Ss) { + var Tu = Ss - ar, + ip = Ss - Ir, + pw = Vt - Tu + return Or ? Ms(pw, Wn - ip) : pw + } + function Eo(Ss) { + var Tu = Ss - ar, + ip = Ss - Ir + return ar === nt || Tu >= Vt || Tu < 0 || (Or && ip >= Wn) + } + function Uo() { + var Ss = $0() + if (Eo(Ss)) return Ho(Ss) + Qn = My(Uo, Lo(Ss)) + } + function Ho(Ss) { + return (Qn = nt), Qr && yn ? uo(Ss) : ((yn = Bn = nt), Xn) + } + function Ql() { + Qn !== nt && x0(Qn), (Ir = 0), (yn = ar = Bn = Qn = nt) + } + function Al() { + return Qn === nt ? Xn : Ho($0()) + } + function _c() { + var Ss = $0(), + Tu = Eo(Ss) + if (((yn = arguments), (Bn = this), (ar = Ss), Tu)) { + if (Qn === nt) return So(ar) + if (Or) return x0(Qn), (Qn = My(Uo, Vt)), uo(ar) + } + return Qn === nt && (Qn = My(Uo, Vt)), Xn + } + return (_c.cancel = Ql), (_c.flush = Al), _c + } + var b_ = mo(function (Rt, Vt) { + return fy(Rt, 1, Vt) + }), + w_ = mo(function (Rt, Vt, Yt) { + return fy(Rt, fu(Vt) || 0, Yt) + }) + function v_(Rt) { + return ur(Rt, $t) + } + function P0(Rt, Vt) { + if (typeof Rt != 'function' || (Vt != null && typeof Vt != 'function')) throw new Gs(at) + var Yt = function () { + var yn = arguments, + Bn = Vt ? Vt.apply(this, yn) : yn[0], + Wn = Yt.cache + if (Wn.has(Bn)) return Wn.get(Bn) + var Xn = Rt.apply(this, yn) + return (Yt.cache = Wn.set(Bn, Xn) || Wn), Xn + } + return (Yt.cache = new (P0.Cache || $l)()), Yt + } + P0.Cache = $l + function M0(Rt) { + if (typeof Rt != 'function') throw new Gs(at) + return function () { + var Vt = arguments + switch (Vt.length) { + case 0: + return !Rt.call(this) + case 1: + return !Rt.call(this, Vt[0]) + case 2: + return !Rt.call(this, Vt[0], Vt[1]) + case 3: + return !Rt.call(this, Vt[0], Vt[1], Vt[2]) + } + return !Rt.apply(this, Vt) + } + } + function __(Rt) { + return H1(2, Rt) + } + var x_ = _0(function (Rt, Vt) { + Vt = Vt.length == 1 && Mo(Vt[0]) ? ba(Vt[0], Vs(wo())) : ba(Is(Vt, 1), Vs(wo())) + var Yt = Vt.length + return mo(function (yn) { + for (var Bn = -1, Wn = Ms(yn.length, Yt); ++Bn < Wn; ) yn[Bn] = Vt[Bn].call(this, yn[Bn]) + return Vo(Rt, this, yn) + }) + }), + i1 = mo(function (Rt, Vt) { + var Yt = Vl(Vt, zm(i1)) + return ur(Rt, St, nt, Vt, Yt) + }), + X1 = mo(function (Rt, Vt) { + var Yt = Vl(Vt, zm(X1)) + return ur(Rt, Tt, nt, Vt, Yt) + }), + k_ = jo(function (Rt, Vt) { + return ur(Rt, Et, nt, nt, nt, Vt) + }) + function S_(Rt, Vt) { + if (typeof Rt != 'function') throw new Gs(at) + return (Vt = Vt === nt ? Vt : Do(Vt)), mo(Rt, Vt) + } + function E_(Rt, Vt) { + if (typeof Rt != 'function') throw new Gs(at) + return ( + (Vt = Vt == null ? 0 : _s(Do(Vt), 0)), + mo(function (Yt) { + var yn = Yt[Vt], + Bn = Uu(Yt, 0, Vt) + return yn && Ll(Bn, yn), Vo(Rt, this, Bn) + }) + ) + } + function T_(Rt, Vt, Yt) { + var yn = !0, + Bn = !0 + if (typeof Rt != 'function') throw new Gs(at) + return ( + ds(Yt) && ((yn = 'leading' in Yt ? !!Yt.leading : yn), (Bn = 'trailing' in Yt ? !!Yt.trailing : Bn)), + K1(Rt, Vt, { leading: yn, maxWait: Vt, trailing: Bn }) + ) + } + function I_(Rt) { + return V1(Rt, 1) + } + function A_(Rt, Vt) { + return i1(Ds(Vt), Rt) + } + function C_() { + if (!arguments.length) return [] + var Rt = arguments[0] + return Mo(Rt) ? Rt : [Rt] + } + function $_(Rt) { + return _l(Rt, pt) + } + function P_(Rt, Vt) { + return (Vt = typeof Vt == 'function' ? Vt : nt), _l(Rt, pt, Vt) + } + function M_(Rt) { + return _l(Rt, ht | pt) + } + function R_(Rt, Vt) { + return (Vt = typeof Vt == 'function' ? Vt : nt), _l(Rt, ht | pt, Vt) + } + function B_(Rt, Vt) { + return Vt == null || Am(Rt, Vt, Fs(Vt)) + } + function Eu(Rt, Vt) { + return Rt === Vt || (Rt !== Rt && Vt !== Vt) + } + var O_ = ho(im), + j_ = ho(function (Rt, Vt) { + return Rt >= Vt + }), + pm = Bo( + (function () { + return arguments + })(), + ) + ? Bo + : function (Rt) { + return gs(Rt) && qo.call(Rt, 'callee') && !xm.call(Rt, 'callee') + }, + Mo = gr.isArray, + D_ = yu ? Vs(yu) : fs + function Bl(Rt) { + return Rt != null && R0(Rt.length) && !np(Rt) + } + function ks(Rt) { + return gs(Rt) && Bl(Rt) + } + function N_(Rt) { + return Rt === !0 || Rt === !1 || (gs(Rt) && Cs(Rt) == nn) + } + var Pp = Hy || m1, + L_ = Gu ? Vs(Gu) : ps + function F_(Rt) { + return gs(Rt) && Rt.nodeType === 1 && !Ry(Rt) + } + function U_(Rt) { + if (Rt == null) return !0 + if ( + Bl(Rt) && + (Mo(Rt) || typeof Rt == 'string' || typeof Rt.splice == 'function' || Pp(Rt) || Wm(Rt) || pm(Rt)) + ) + return !Rt.length + var Vt = Ks(Rt) + if (Vt == Pn || Vt == An) return !Rt.size + if (Py(Rt)) return !Bs(Rt).length + for (var Yt in Rt) if (qo.call(Rt, Yt)) return !1 + return !0 + } + function z_(Rt, Vt) { + return us(Rt, Vt) + } + function W_(Rt, Vt, Yt) { + Yt = typeof Yt == 'function' ? Yt : nt + var yn = Yt ? Yt(Rt, Vt) : nt + return yn === nt ? us(Rt, Vt, nt, Yt) : !!yn + } + function o1(Rt) { + if (!gs(Rt)) return !1 + var Vt = Cs(Rt) + return Vt == an || Vt == vn || (typeof Rt.message == 'string' && typeof Rt.name == 'string' && !Ry(Rt)) + } + function V_(Rt) { + return typeof Rt == 'number' && ny(Rt) + } + function np(Rt) { + if (!ds(Rt)) return !1 + var Vt = Cs(Rt) + return Vt == Qt || Vt == _n || Vt == rn || Vt == mn + } + function Z1(Rt) { + return typeof Rt == 'number' && Rt == Do(Rt) + } + function R0(Rt) { + return typeof Rt == 'number' && Rt > -1 && Rt % 1 == 0 && Rt <= zt + } + function ds(Rt) { + var Vt = typeof Rt + return Rt != null && (Vt == 'object' || Vt == 'function') + } + function gs(Rt) { + return Rt != null && typeof Rt == 'object' + } + var J1 = Dp ? Vs(Dp) : Ep + function H_(Rt, Vt) { + return Rt === Vt || hs(Rt, Vt, K0(Vt)) + } + function G_(Rt, Vt, Yt) { + return (Yt = typeof Yt == 'function' ? Yt : nt), hs(Rt, Vt, K0(Vt), Yt) + } + function q_(Rt) { + return Q1(Rt) && Rt != +Rt + } + function Y_(Rt) { + if (Pw(Rt)) throw new To(ot) + return Tp(Rt) + } + function K_(Rt) { + return Rt === null + } + function X_(Rt) { + return Rt == null + } + function Q1(Rt) { + return typeof Rt == 'number' || (gs(Rt) && Cs(Rt) == $n) + } + function Ry(Rt) { + if (!gs(Rt) || Cs(Rt) != Tn) return !1 + var Vt = qp(Rt) + if (Vt === null) return !0 + var Yt = qo.call(Vt, 'constructor') && Vt.constructor + return typeof Yt == 'function' && Yt instanceof Yt && yp.call(Yt) == Yu + } + var a1 = bs ? Vs(bs) : Ip + function Z_(Rt) { + return Z1(Rt) && Rt >= -zt && Rt <= zt + } + var ew = $s ? Vs($s) : $m + function B0(Rt) { + return typeof Rt == 'string' || (!Mo(Rt) && gs(Rt) && Cs(Rt) == wn) + } + function Jl(Rt) { + return typeof Rt == 'symbol' || (gs(Rt) && Cs(Rt) == fn) + } + var Wm = os ? Vs(os) : by + function J_(Rt) { + return Rt === nt + } + function Q_(Rt) { + return gs(Rt) && Ks(Rt) == kn + } + function t2(Rt) { + return gs(Rt) && Cs(Rt) == Dn + } + var n2 = ho(om), + r2 = ho(function (Rt, Vt) { + return Rt <= Vt + }) + function tw(Rt) { + if (!Rt) return [] + if (Bl(Rt)) return B0(Rt) ? ss(Rt) : Ns(Rt) + if (Mu && Rt[Mu]) return up(Rt[Mu]()) + var Vt = Ks(Rt), + Yt = Vt == Pn ? zp : Vt == An ? Wp : Vm + return Yt(Rt) + } + function rp(Rt) { + if (!Rt) return Rt === 0 ? Rt : 0 + if (((Rt = fu(Rt)), Rt === Wt || Rt === -Wt)) { + var Vt = Rt < 0 ? -1 : 1 + return Vt * Ft + } + return Rt === Rt ? Rt : 0 + } + function Do(Rt) { + var Vt = rp(Rt), + Yt = Vt % 1 + return Vt === Vt ? (Yt ? Vt - Yt : Vt) : 0 + } + function nw(Rt) { + return Rt ? Ou(Do(Rt), 0, Ut) : 0 + } + function fu(Rt) { + if (typeof Rt == 'number') return Rt + if (Jl(Rt)) return Nt + if (ds(Rt)) { + var Vt = typeof Rt.valueOf == 'function' ? Rt.valueOf() : Rt + Rt = ds(Vt) ? Vt + '' : Vt + } + if (typeof Rt != 'string') return Rt === 0 ? Rt : +Rt + Rt = wm(Rt) + var Yt = Hr.test(Rt) + return Yt || Nr.test(Rt) ? jp(Rt.slice(2), Yt ? 2 : 8) : cr.test(Rt) ? Nt : +Rt + } + function rw(Rt) { + return Rl(Rt, Ol(Rt)) + } + function i2(Rt) { + return Rt ? Ou(Do(Rt), -zt, zt) : Rt === 0 ? Rt : 0 + } + function Qo(Rt) { + return Rt == null ? '' : js(Rt) + } + var o2 = ep(function (Rt, Vt) { + if (Py(Vt) || Bl(Vt)) { + Rl(Vt, Fs(Vt), Rt) + return + } + for (var Yt in Vt) qo.call(Vt, Yt) && Gl(Rt, Yt, Vt[Yt]) + }), + iw = ep(function (Rt, Vt) { + Rl(Vt, Ol(Vt), Rt) + }), + O0 = ep(function (Rt, Vt, Yt, yn) { + Rl(Vt, Ol(Vt), Rt, yn) + }), + s2 = ep(function (Rt, Vt, Yt, yn) { + Rl(Vt, Fs(Vt), Rt, yn) + }), + l2 = jo(Im) + function c2(Rt, Vt) { + var Yt = xu(Rt) + return Vt == null ? Yt : hy(Yt, Vt) + } + var u2 = mo(function (Rt, Vt) { + Rt = ko(Rt) + var Yt = -1, + yn = Vt.length, + Bn = yn > 2 ? Vt[2] : nt + for (Bn && Il(Vt[0], Vt[1], Bn) && (yn = 1); ++Yt < yn; ) + for (var Wn = Vt[Yt], Xn = Ol(Wn), Qn = -1, ar = Xn.length; ++Qn < ar; ) { + var Ir = Xn[Qn], + Cr = Rt[Ir] + ;(Cr === nt || (Eu(Cr, gp[Ir]) && !qo.call(Rt, Ir))) && (Rt[Ir] = Wn[Ir]) + } + return Rt + }), + h2 = mo(function (Rt) { + return Rt.push(nt, yr), Vo(ow, nt, Rt) + }) + function d2(Rt, Vt) { + return Km(Rt, wo(Vt, 3), xl) + } + function f2(Rt, Vt) { + return Km(Rt, wo(Vt, 3), kp) + } + function p2(Rt, Vt) { + return Rt == null ? Rt : xp(Rt, wo(Vt, 3), Ol) + } + function m2(Rt, Vt) { + return Rt == null ? Rt : rm(Rt, wo(Vt, 3), Ol) + } + function g2(Rt, Vt) { + return Rt && xl(Rt, wo(Vt, 3)) + } + function y2(Rt, Vt) { + return Rt && kp(Rt, wo(Vt, 3)) + } + function w2(Rt) { + return Rt == null ? [] : _h(Rt, Fs(Rt)) + } + function _2(Rt) { + return Rt == null ? [] : _h(Rt, Ol(Rt)) + } + function s1(Rt, Vt, Yt) { + var yn = Rt == null ? nt : Xl(Rt, Vt) + return yn === nt ? Yt : yn + } + function x2(Rt, Vt) { + return Rt != null && S1(Rt, Vt, y0) + } + function l1(Rt, Vt) { + return Rt != null && S1(Rt, Vt, gy) + } + var k2 = Gn(function (Rt, Vt, Yt) { + Vt != null && typeof Vt.toString != 'function' && (Vt = Qs.call(Vt)), (Rt[Vt] = Yt) + }, u1(Dl)), + S2 = Gn(function (Rt, Vt, Yt) { + Vt != null && typeof Vt.toString != 'function' && (Vt = Qs.call(Vt)), + qo.call(Rt, Vt) ? Rt[Vt].push(Yt) : (Rt[Vt] = [Yt]) + }, wo), + E2 = mo(xa) + function Fs(Rt) { + return Bl(Rt) ? Xr(Rt) : Bs(Rt) + } + function Ol(Rt) { + return Bl(Rt) ? Xr(Rt, !0) : wy(Rt) + } + function T2(Rt, Vt) { + var Yt = {} + return ( + (Vt = wo(Vt, 3)), + xl(Rt, function (yn, Bn, Wn) { + lu(Yt, Vt(yn, Bn, Wn), yn) + }), + Yt + ) + } + function I2(Rt, Vt) { + var Yt = {} + return ( + (Vt = wo(Vt, 3)), + xl(Rt, function (yn, Bn, Wn) { + lu(Yt, Bn, Vt(yn, Bn, Wn)) + }), + Yt + ) + } + var A2 = ep(function (Rt, Vt, Yt) { + Zl(Rt, Vt, Yt) + }), + ow = ep(function (Rt, Vt, Yt, yn) { + Zl(Rt, Vt, Yt, yn) + }), + C2 = jo(function (Rt, Vt) { + var Yt = {} + if (Rt == null) return Yt + var yn = !1 + ;(Vt = ba(Vt, function (Wn) { + return (Wn = Fu(Wn, Rt)), yn || (yn = Wn.length > 1), Wn + })), + Rl(Rt, zo(Rt), Yt), + yn && (Yt = _l(Yt, ht | dt | pt, _i)) + for (var Bn = Vt.length; Bn--; ) Ey(Yt, Vt[Bn]) + return Yt + }) + function $2(Rt, Vt) { + return aw(Rt, M0(wo(Vt))) + } + var P2 = jo(function (Rt, Vt) { + return Rt == null ? {} : lm(Rt, Vt) + }) + function aw(Rt, Vt) { + if (Rt == null) return {} + var Yt = ba(zo(Rt), function (yn) { + return [yn] + }) + return ( + (Vt = wo(Vt)), + Rm(Rt, Yt, function (yn, Bn) { + return Vt(yn, Bn[0]) + }) + ) + } + function M2(Rt, Vt, Yt) { + Vt = Fu(Vt, Rt) + var yn = -1, + Bn = Vt.length + for (Bn || ((Bn = 1), (Rt = nt)); ++yn < Bn; ) { + var Wn = Rt == null ? nt : Rt[Wu(Vt[yn])] + Wn === nt && ((yn = Bn), (Wn = Yt)), (Rt = np(Wn) ? Wn.call(Rt) : Wn) + } + return Rt + } + function R2(Rt, Vt, Yt) { + return Rt == null ? Rt : _f(Rt, Vt, Yt) + } + function B2(Rt, Vt, Yt, yn) { + return (yn = typeof yn == 'function' ? yn : nt), Rt == null ? Rt : _f(Rt, Vt, Yt, yn) + } + var sw = Tl(Fs), + lw = Tl(Ol) + function O2(Rt, Vt, Yt) { + var yn = Mo(Rt), + Bn = yn || Pp(Rt) || Wm(Rt) + if (((Vt = wo(Vt, 4)), Yt == null)) { + var Wn = Rt && Rt.constructor + Bn ? (Yt = yn ? new Wn() : []) : ds(Rt) ? (Yt = np(Wn) ? xu(qp(Rt)) : {}) : (Yt = {}) + } + return ( + (Bn ? ws : xl)(Rt, function (Xn, Qn, ar) { + return Vt(Yt, Xn, Qn, ar) + }), + Yt + ) + } + function j2(Rt, Vt) { + return Rt == null ? !0 : Ey(Rt, Vt) + } + function D2(Rt, Vt, Yt) { + return Rt == null ? Rt : Ty(Rt, Vt, Ds(Yt)) + } + function N2(Rt, Vt, Yt, yn) { + return (yn = typeof yn == 'function' ? yn : nt), Rt == null ? Rt : Ty(Rt, Vt, Ds(Yt), yn) + } + function Vm(Rt) { + return Rt == null ? [] : Hs(Rt, Fs(Rt)) + } + function L2(Rt) { + return Rt == null ? [] : Hs(Rt, Ol(Rt)) + } + function F2(Rt, Vt, Yt) { + return ( + Yt === nt && ((Yt = Vt), (Vt = nt)), + Yt !== nt && ((Yt = fu(Yt)), (Yt = Yt === Yt ? Yt : 0)), + Vt !== nt && ((Vt = fu(Vt)), (Vt = Vt === Vt ? Vt : 0)), + Ou(fu(Rt), Vt, Yt) + ) + } + function U2(Rt, Vt, Yt) { + return (Vt = rp(Vt)), Yt === nt ? ((Yt = Vt), (Vt = 0)) : (Yt = rp(Yt)), (Rt = fu(Rt)), H0(Rt, Vt, Yt) + } + function z2(Rt, Vt, Yt) { + if ( + (Yt && typeof Yt != 'boolean' && Il(Rt, Vt, Yt) && (Vt = Yt = nt), + Yt === nt && + (typeof Vt == 'boolean' ? ((Yt = Vt), (Vt = nt)) : typeof Rt == 'boolean' && ((Yt = Rt), (Rt = nt))), + Rt === nt && Vt === nt + ? ((Rt = 0), (Vt = 1)) + : ((Rt = rp(Rt)), Vt === nt ? ((Vt = Rt), (Rt = 0)) : (Vt = rp(Vt))), + Rt > Vt) + ) { + var yn = Rt + ;(Rt = Vt), (Vt = yn) + } + if (Yt || Rt % 1 || Vt % 1) { + var Bn = ry() + return Ms(Rt + Bn * (Vt - Rt + Op('1e-' + ((Bn + '').length - 1))), Vt) + } + return cu(Rt, Vt) + } + var W2 = Bt(function (Rt, Vt, Yt) { + return (Vt = Vt.toLowerCase()), Rt + (Yt ? cw(Vt) : Vt) + }) + function cw(Rt) { + return c1(Qo(Rt).toLowerCase()) + } + function uw(Rt) { + return (Rt = Qo(Rt)), Rt && Rt.replace(eo, Ny).replace(ts, '') + } + function V2(Rt, Vt, Yt) { + ;(Rt = Qo(Rt)), (Vt = js(Vt)) + var yn = Rt.length + Yt = Yt === nt ? yn : Ou(Do(Yt), 0, yn) + var Bn = Yt + return (Yt -= Vt.length), Yt >= 0 && Rt.slice(Yt, Bn) == Vt + } + function H2(Rt) { + return (Rt = Qo(Rt)), Rt && Tr.test(Rt) ? Rt.replace(xr, Ly) : Rt + } + function G2(Rt) { + return (Rt = Qo(Rt)), Rt && go.test(Rt) ? Rt.replace(Dr, '\\$&') : Rt + } + var q2 = Bt(function (Rt, Vt, Yt) { + return Rt + (Yt ? '-' : '') + Vt.toLowerCase() + }), + Y2 = Bt(function (Rt, Vt, Yt) { + return Rt + (Yt ? ' ' : '') + Vt.toLowerCase() + }), + K2 = E0('toLowerCase') + function X2(Rt, Vt, Yt) { + ;(Rt = Qo(Rt)), (Vt = Do(Vt)) + var yn = Vt ? ru(Rt) : 0 + if (!Vt || yn >= Vt) return Rt + var Bn = (Vt - yn) / 2 + return Vr(Xp(Bn), Yt) + Rt + Vr(Kp(Bn), Yt) + } + function Z2(Rt, Vt, Yt) { + ;(Rt = Qo(Rt)), (Vt = Do(Vt)) + var yn = Vt ? ru(Rt) : 0 + return Vt && yn < Vt ? Rt + Vr(Vt - yn, Yt) : Rt + } + function J2(Rt, Vt, Yt) { + ;(Rt = Qo(Rt)), (Vt = Do(Vt)) + var yn = Vt ? ru(Rt) : 0 + return Vt && yn < Vt ? Vr(Vt - yn, Yt) + Rt : Rt + } + function Q2(Rt, Vt, Yt) { + return Yt || Vt == null ? (Vt = 0) : Vt && (Vt = +Vt), Yy(Qo(Rt).replace(xn, ''), Vt || 0) + } + function ex(Rt, Vt, Yt) { + return (Yt ? Il(Rt, Vt, Yt) : Vt === nt) ? (Vt = 1) : (Vt = Do(Vt)), $p(Qo(Rt), Vt) + } + function tx() { + var Rt = arguments, + Vt = Qo(Rt[0]) + return Rt.length < 3 ? Vt : Vt.replace(Rt[1], Rt[2]) + } + var nx = Bt(function (Rt, Vt, Yt) { + return Rt + (Yt ? '_' : '') + Vt.toLowerCase() + }) + function rx(Rt, Vt, Yt) { + return ( + Yt && typeof Yt != 'number' && Il(Rt, Vt, Yt) && (Vt = Yt = nt), + (Yt = Yt === nt ? Ut : Yt >>> 0), + Yt + ? ((Rt = Qo(Rt)), + Rt && (typeof Vt == 'string' || (Vt != null && !a1(Vt))) && ((Vt = js(Vt)), !Vt && qu(Rt)) + ? Uu(ss(Rt), 0, Yt) + : Rt.split(Vt, Yt)) + : [] + ) + } + var ix = Bt(function (Rt, Vt, Yt) { + return Rt + (Yt ? ' ' : '') + c1(Vt) + }) + function ox(Rt, Vt, Yt) { + return ( + (Rt = Qo(Rt)), + (Yt = Yt == null ? 0 : Ou(Do(Yt), 0, Rt.length)), + (Vt = js(Vt)), + Rt.slice(Yt, Yt + Vt.length) == Vt + ) + } + function ax(Rt, Vt, Yt) { + var yn = Fn.templateSettings + Yt && Il(Rt, Vt, Yt) && (Vt = nt), (Rt = Qo(Rt)), (Vt = O0({}, Vt, yn, or)) + var Bn = O0({}, Vt.imports, yn.imports, or), + Wn = Fs(Bn), + Xn = Hs(Bn, Wn), + Qn, + ar, + Ir = 0, + Cr = Vt.interpolate || Zr, + Or = "__p += '", + Qr = Es( + (Vt.escape || Zr).source + + '|' + + Cr.source + + '|' + + (Cr === jr ? nr : Zr).source + + '|' + + (Vt.evaluate || Zr).source + + '|$', + 'g', + ), + uo = + '//# sourceURL=' + + (qo.call(Vt, 'sourceURL') + ? (Vt.sourceURL + '').replace(/\s/g, ' ') + : 'lodash.templateSources[' + ++Xs + ']') + + ` +` + Rt.replace(Qr, function (Eo, Uo, Ho, Ql, Al, _c) { + return ( + Ho || (Ho = Ql), + (Or += Rt.slice(Ir, _c).replace(Jr, Xm)), + Uo && + ((Qn = !0), + (Or += + `' + +__e(` + + Uo + + `) + +'`)), + Al && + ((ar = !0), + (Or += + `'; +` + + Al + + `; +__p += '`)), + Ho && + (Or += + `' + +((__t = (` + + Ho + + `)) == null ? '' : __t) + +'`), + (Ir = _c + Eo.length), + Eo + ) + }), + (Or += `'; +`) + var So = qo.call(Vt, 'variable') && Vt.variable + if (!So) + Or = + `with (obj) { +` + + Or + + ` } -#else -#ifdef LUT_PRECISION_HIGH -#ifdef GL_FRAGMENT_PRECISION_HIGH -uniform highp sampler2D lut; -#else -uniform mediump sampler2D lut; -#endif -#else -uniform lowp sampler2D lut; -#endif -vec4 applyLUT(const in vec3 rgb){float slice=rgb.b*LUT_SIZE;float slice0=floor(slice);float interp=slice-slice0;float centeredInterp=interp-0.5;float slice1=slice0+sign(centeredInterp); -#ifdef LUT_STRIP_HORIZONTAL -float xOffset=clamp(rgb.r*LUT_TEXEL_HEIGHT,LUT_TEXEL_WIDTH*0.5,LUT_TEXEL_HEIGHT-LUT_TEXEL_WIDTH*0.5);vec2 uv0=vec2(slice0*LUT_TEXEL_HEIGHT+xOffset,rgb.g);vec2 uv1=vec2(slice1*LUT_TEXEL_HEIGHT+xOffset,rgb.g); -#else -float yOffset=clamp(rgb.g*LUT_TEXEL_WIDTH,LUT_TEXEL_HEIGHT*0.5,LUT_TEXEL_WIDTH-LUT_TEXEL_HEIGHT*0.5);vec2 uv0=vec2(rgb.r,slice0*LUT_TEXEL_WIDTH+yOffset);vec2 uv1=vec2(rgb.r,slice1*LUT_TEXEL_WIDTH+yOffset); -#endif -vec4 sample0=texture2D(lut,uv0);vec4 sample1=texture2D(lut,uv1);return mix(sample0,sample1,abs(centeredInterp));} -#endif -void mainImage(const in vec4 inputColor,const in vec2 uv,out vec4 outputColor){vec3 c=inputColor.rgb; -#ifdef CUSTOM_INPUT_DOMAIN -if(c.r>=domainMin.r&&c.g>=domainMin.g&&c.b>=domainMin.b&&c.r<=domainMax.r&&c.g<=domainMax.g&&c.b<=domainMax.b){c=applyLUT(scale*c+offset).rgb;}else{c=inputColor.rgb;} -#else -#if !defined(LUT_3D) || defined(TETRAHEDRAL_INTERPOLATION) -c=clamp(c,0.0,1.0); -#endif -c=applyLUT(scale*c+offset).rgb; -#endif -outputColor=vec4(c,inputColor.a);}`,LUT3DEffect=class extends Effect$1{constructor(tt,{blendFunction:et=BlendFunction.SRC,tetrahedralInterpolation:nt=!1,inputEncoding:rt=sRGBEncoding,inputColorSpace:it}={}){super("LUT3DEffect",lut_3d_default,{blendFunction:et,uniforms:new Map([["lut",new Uniform(null)],["scale",new Uniform(new Vector3)],["offset",new Uniform(new Vector3)],["domainMin",new Uniform(null)],["domainMax",new Uniform(null)]])}),this.tetrahedralInterpolation=nt,this.inputColorSpace=it||encodingToColorSpace.get(rt),this.lut=tt}get inputEncoding(){return this.inputColorSpace}set inputEncoding(tt){this.inputColorSpace=tt}getInputEncoding(){return this.inputColorSpace}setInputEncoding(tt){this.inputColorSpace=tt}getOutputEncoding(){return this.outputColorSpace}get lut(){return this.uniforms.get("lut").value}set lut(tt){const et=this.defines,nt=this.uniforms;if(this.lut!==tt&&(nt.get("lut").value=tt,tt!==null)){const rt=tt.image,it=this.tetrahedralInterpolation;if(et.clear(),et.set("LUT_SIZE",Math.min(rt.width,rt.height).toFixed(16)),et.set("LUT_TEXEL_WIDTH",(1/rt.width).toFixed(16)),et.set("LUT_TEXEL_HEIGHT",(1/rt.height).toFixed(16)),nt.get("domainMin").value=null,nt.get("domainMax").value=null,(tt.type===FloatType||tt.type===HalfFloatType)&&et.set("LUT_PRECISION_HIGH","1"),rt.width>rt.height?et.set("LUT_STRIP_HORIZONTAL","1"):tt instanceof Data3DTexture&&et.set("LUT_3D","1"),tt instanceof LookupTexture){const ot=tt.domainMin,at=tt.domainMax;(ot.x!==0||ot.y!==0||ot.z!==0||at.x!==1||at.y!==1||at.z!==1)&&(et.set("CUSTOM_INPUT_DOMAIN","1"),nt.get("domainMin").value=ot.clone(),nt.get("domainMax").value=at.clone())}this.tetrahedralInterpolation=it}}getLUT(){return this.lut}setLUT(tt){this.lut=tt}updateScaleOffset(){const tt=this.lut;if(tt!==null){const et=Math.min(tt.image.width,tt.image.height),nt=this.uniforms.get("scale").value,rt=this.uniforms.get("offset").value;if(this.tetrahedralInterpolation&&tt instanceof Data3DTexture)if(this.defines.has("CUSTOM_INPUT_DOMAIN")){const it=tt.domainMax.clone().sub(tt.domainMin);nt.setScalar(et-1).divide(it),rt.copy(tt.domainMin).negate().multiply(nt)}else nt.setScalar(et-1),rt.setScalar(0);else if(this.defines.has("CUSTOM_INPUT_DOMAIN")){const it=tt.domainMax.clone().sub(tt.domainMin).multiplyScalar(et);nt.setScalar(et-1).divide(it),rt.copy(tt.domainMin).negate().multiply(nt).addScalar(1/(2*et))}else nt.setScalar((et-1)/et),rt.setScalar(1/(2*et))}}configureTetrahedralInterpolation(){const tt=this.lut;tt!==null&&(tt.minFilter=LinearFilter,tt.magFilter=LinearFilter,this.tetrahedralInterpolation&&(tt instanceof Data3DTexture?(tt.minFilter=NearestFilter,tt.magFilter=NearestFilter):console.warn("Tetrahedral interpolation requires a 3D texture")),tt.source===void 0&&(tt.needsUpdate=!0))}get tetrahedralInterpolation(){return this.defines.has("TETRAHEDRAL_INTERPOLATION")}set tetrahedralInterpolation(tt){tt?this.defines.set("TETRAHEDRAL_INTERPOLATION","1"):this.defines.delete("TETRAHEDRAL_INTERPOLATION"),this.configureTetrahedralInterpolation(),this.updateScaleOffset(),this.setChanged()}setTetrahedralInterpolationEnabled(tt){this.tetrahedralInterpolation=tt}},outline_default3=`uniform lowp sampler2D edgeTexture;uniform lowp sampler2D maskTexture;uniform vec3 visibleEdgeColor;uniform vec3 hiddenEdgeColor;uniform float pulse;uniform float edgeStrength; -#ifdef USE_PATTERN -uniform lowp sampler2D patternTexture;varying vec2 vUvPattern; -#endif -void mainImage(const in vec4 inputColor,const in vec2 uv,out vec4 outputColor){vec2 edge=texture2D(edgeTexture,uv).rg;vec2 mask=texture2D(maskTexture,uv).rg; -#ifndef X_RAY -edge.y=0.0; -#endif -edge*=(edgeStrength*mask.x*pulse);vec3 color=edge.x*visibleEdgeColor+edge.y*hiddenEdgeColor;float visibilityFactor=0.0; -#ifdef USE_PATTERN -vec4 patternColor=texture2D(patternTexture,vUvPattern); -#ifdef X_RAY -float hiddenFactor=0.5; -#else -float hiddenFactor=0.0; -#endif -visibilityFactor=(1.0-mask.y>0.0)?1.0:hiddenFactor;visibilityFactor*=(1.0-mask.x)*patternColor.a;color+=visibilityFactor*patternColor.rgb; -#endif -float alpha=max(max(edge.x,edge.y),visibilityFactor); -#ifdef ALPHA -outputColor=vec4(color,alpha); -#else -outputColor=vec4(color,max(alpha,inputColor.a)); -#endif -}`,outline_default4="uniform float patternScale;varying vec2 vUvPattern;void mainSupport(const in vec2 uv){vUvPattern=uv*vec2(aspect,1.0)*patternScale;}",OutlineEffect=class extends Effect$1{constructor(tt,et,{blendFunction:nt=BlendFunction.SCREEN,patternTexture:rt=null,patternScale:it=1,edgeStrength:ot=1,pulseSpeed:at=0,visibleEdgeColor:st=16777215,hiddenEdgeColor:lt=2230538,kernelSize:ct=KernelSize.VERY_SMALL,blur:ut=!1,xRay:ht=!0,multisampling:dt=0,resolutionScale:pt=.5,width:mt=Resolution.AUTO_SIZE,height:gt=Resolution.AUTO_SIZE,resolutionX:yt=mt,resolutionY:bt=gt}={}){super("OutlineEffect",outline_default3,{uniforms:new Map([["maskTexture",new Uniform(null)],["edgeTexture",new Uniform(null)],["edgeStrength",new Uniform(ot)],["visibleEdgeColor",new Uniform(new Color$1(st))],["hiddenEdgeColor",new Uniform(new Color$1(lt))],["pulse",new Uniform(1)],["patternScale",new Uniform(it)],["patternTexture",new Uniform(null)]])}),this.blendMode.addEventListener("change",St=>{this.blendMode.blendFunction===BlendFunction.ALPHA?this.defines.set("ALPHA","1"):this.defines.delete("ALPHA"),this.setChanged()}),this.blendMode.blendFunction=nt,this.patternTexture=rt,this.xRay=ht,this.scene=tt,this.camera=et,this.renderTargetMask=new WebGLRenderTarget(1,1),this.renderTargetMask.samples=dt,this.renderTargetMask.texture.name="Outline.Mask",this.uniforms.get("maskTexture").value=this.renderTargetMask.texture,this.renderTargetOutline=new WebGLRenderTarget(1,1,{depthBuffer:!1}),this.renderTargetOutline.texture.name="Outline.Edges",this.uniforms.get("edgeTexture").value=this.renderTargetOutline.texture,this.clearPass=new ClearPass,this.clearPass.overrideClearColor=new Color$1(0),this.clearPass.overrideClearAlpha=1,this.depthPass=new DepthPass(tt,et),this.maskPass=new RenderPass(tt,et,new DepthComparisonMaterial(this.depthPass.texture,et));const vt=this.maskPass.clearPass;vt.overrideClearColor=new Color$1(16777215),vt.overrideClearAlpha=1,this.blurPass=new KawaseBlurPass({resolutionScale:pt,resolutionX:yt,resolutionY:bt,kernelSize:ct}),this.blurPass.enabled=ut;const xt=this.blurPass.resolution;xt.addEventListener("change",St=>this.setSize(xt.baseWidth,xt.baseHeight)),this.outlinePass=new ShaderPass(new OutlineMaterial);const kt=this.outlinePass.fullscreenMaterial;kt.inputBuffer=this.renderTargetMask.texture,this.time=0,this.forceUpdate=!0,this.selection=new Selection$3,this.selection.layer=10,this.pulseSpeed=at}set mainScene(tt){this.scene=tt,this.depthPass.mainScene=tt,this.maskPass.mainScene=tt}set mainCamera(tt){this.camera=tt,this.depthPass.mainCamera=tt,this.maskPass.mainCamera=tt,this.maskPass.overrideMaterial.copyCameraSettings(tt)}get resolution(){return this.blurPass.resolution}getResolution(){return this.blurPass.getResolution()}get multisampling(){return this.renderTargetMask.samples}set multisampling(tt){this.renderTargetMask.samples=tt,this.renderTargetMask.dispose()}get patternScale(){return this.uniforms.get("patternScale").value}set patternScale(tt){this.uniforms.get("patternScale").value=tt}get edgeStrength(){return this.uniforms.get("edgeStrength").value}set edgeStrength(tt){this.uniforms.get("edgeStrength").value=tt}get visibleEdgeColor(){return this.uniforms.get("visibleEdgeColor").value}set visibleEdgeColor(tt){this.uniforms.get("visibleEdgeColor").value=tt}get hiddenEdgeColor(){return this.uniforms.get("hiddenEdgeColor").value}set hiddenEdgeColor(tt){this.uniforms.get("hiddenEdgeColor").value=tt}getBlurPass(){return this.blurPass}getSelection(){return this.selection}getPulseSpeed(){return this.pulseSpeed}setPulseSpeed(tt){this.pulseSpeed=tt}get width(){return this.resolution.width}set width(tt){this.resolution.preferredWidth=tt}get height(){return this.resolution.height}set height(tt){this.resolution.preferredHeight=tt}get selectionLayer(){return this.selection.layer}set selectionLayer(tt){this.selection.layer=tt}get dithering(){return this.blurPass.dithering}set dithering(tt){this.blurPass.dithering=tt}get kernelSize(){return this.blurPass.kernelSize}set kernelSize(tt){this.blurPass.kernelSize=tt}get blur(){return this.blurPass.enabled}set blur(tt){this.blurPass.enabled=tt}get xRay(){return this.defines.has("X_RAY")}set xRay(tt){this.xRay!==tt&&(tt?this.defines.set("X_RAY","1"):this.defines.delete("X_RAY"),this.setChanged())}isXRayEnabled(){return this.xRay}setXRayEnabled(tt){this.xRay=tt}get patternTexture(){return this.uniforms.get("patternTexture").value}set patternTexture(tt){tt!==null?(tt.wrapS=tt.wrapT=RepeatWrapping,this.defines.set("USE_PATTERN","1"),this.setVertexShader(outline_default4)):(this.defines.delete("USE_PATTERN"),this.setVertexShader(null)),this.uniforms.get("patternTexture").value=tt,this.setChanged()}setPatternTexture(tt){this.patternTexture=tt}getResolutionScale(){return this.resolution.scale}setResolutionScale(tt){this.resolution.scale=tt}setSelection(tt){return this.selection.set(tt),this}clearSelection(){return this.selection.clear(),this}selectObject(tt){return this.selection.add(tt),this}deselectObject(tt){return this.selection.delete(tt),this}update(tt,et,nt){const rt=this.scene,it=this.camera,ot=this.selection,st=this.uniforms.get("pulse"),lt=rt.background,ct=it.layers.mask;(this.forceUpdate||ot.size>0)&&(rt.background=null,st.value=1,this.pulseSpeed>0&&(st.value=Math.cos(this.time*this.pulseSpeed*10)*.375+.625),this.time+=nt,ot.setVisible(!1),this.depthPass.render(tt),ot.setVisible(!0),it.layers.set(ot.layer),this.maskPass.render(tt,this.renderTargetMask),it.layers.mask=ct,rt.background=lt,this.outlinePass.render(tt,null,this.renderTargetOutline),this.blurPass.enabled&&this.blurPass.render(tt,this.renderTargetOutline,this.renderTargetOutline)),this.forceUpdate=ot.size>0}setSize(tt,et){this.blurPass.setSize(tt,et),this.renderTargetMask.setSize(tt,et);const nt=this.resolution;nt.setBaseSize(tt,et);const rt=nt.width,it=nt.height;this.depthPass.setSize(rt,it),this.renderTargetOutline.setSize(rt,it),this.outlinePass.fullscreenMaterial.setSize(rt,it)}initialize(tt,et,nt){this.blurPass.initialize(tt,et,UnsignedByteType),nt!==void 0&&(this.depthPass.initialize(tt,et,nt),this.maskPass.initialize(tt,et,nt),this.outlinePass.initialize(tt,et,nt))}},pixelation_default="uniform bool active;uniform vec4 d;void mainUv(inout vec2 uv){if(active){uv=d.xy*(floor(uv*d.zw)+0.5);}}",PixelationEffect=class extends Effect$1{constructor(tt=30){super("PixelationEffect",pixelation_default,{uniforms:new Map([["active",new Uniform(!1)],["d",new Uniform(new Vector4)]])}),this.resolution=new Vector2,this._granularity=0,this.granularity=tt}get granularity(){return this._granularity}set granularity(tt){let et=Math.floor(tt);et%2>0&&(et+=1),this._granularity=et,this.uniforms.get("active").value=et>0,this.setSize(this.resolution.width,this.resolution.height)}getGranularity(){return this.granularity}setGranularity(tt){this.granularity=tt}setSize(tt,et){const nt=this.resolution;nt.set(tt,et);const rt=this.granularity,it=rt/nt.x,ot=rt/nt.y;this.uniforms.get("d").value.set(it,ot,1/it,1/ot)}},SelectiveBloomEffect=class extends BloomEffect{constructor(tt,et,nt){super(nt),this.setAttributes(this.getAttributes()|EffectAttribute.DEPTH),this.camera=et,this.depthPass=new DepthPass(tt,et),this.clearPass=new ClearPass(!0,!1,!1),this.clearPass.overrideClearColor=new Color$1(0),this.depthMaskPass=new ShaderPass(new DepthMaskMaterial);const rt=this.depthMaskMaterial;rt.copyCameraSettings(et),rt.depthBuffer1=this.depthPass.texture,rt.depthPacking1=RGBADepthPacking,rt.depthMode=EqualDepth,this.renderTargetMasked=new WebGLRenderTarget(1,1,{depthBuffer:!1}),this.renderTargetMasked.texture.name="Bloom.Masked",this.selection=new Selection$3,this.selection.layer=11,this._inverted=!1,this._ignoreBackground=!1}set mainScene(tt){this.depthPass.mainScene=tt}set mainCamera(tt){this.camera=tt,this.depthPass.mainCamera=tt,this.depthMaskMaterial.copyCameraSettings(tt)}getSelection(){return this.selection}get depthMaskMaterial(){return this.depthMaskPass.fullscreenMaterial}get inverted(){return this._inverted}set inverted(tt){this._inverted=tt,this.depthMaskMaterial.depthMode=tt?NotEqualDepth:EqualDepth}isInverted(){return this.inverted}setInverted(tt){this.inverted=tt}get ignoreBackground(){return this._ignoreBackground}set ignoreBackground(tt){this._ignoreBackground=tt,this.depthMaskMaterial.maxDepthStrategy=tt?DepthTestStrategy.DISCARD_MAX_DEPTH:DepthTestStrategy.KEEP_MAX_DEPTH}isBackgroundDisabled(){return this.ignoreBackground}setBackgroundDisabled(tt){this.ignoreBackground=tt}setDepthTexture(tt,et=BasicDepthPacking){this.depthMaskMaterial.depthBuffer0=tt,this.depthMaskMaterial.depthPacking0=et}update(tt,et,nt){const rt=this.camera,it=this.selection,ot=this.inverted;let at=et;if(this.ignoreBackground||!ot||it.size>0){const st=rt.layers.mask;rt.layers.set(it.layer),this.depthPass.render(tt),rt.layers.mask=st,at=this.renderTargetMasked,this.clearPass.render(tt,at),this.depthMaskPass.render(tt,et,at)}super.update(tt,at,nt)}setSize(tt,et){super.setSize(tt,et),this.renderTargetMasked.setSize(tt,et),this.depthPass.setSize(tt,et)}initialize(tt,et,nt){super.initialize(tt,et,nt),this.clearPass.initialize(tt,et,nt),this.depthPass.initialize(tt,et,nt),this.depthMaskPass.initialize(tt,et,nt),tt.capabilities.logarithmicDepthBuffer&&(this.depthMaskPass.fullscreenMaterial.defines.LOG_DEPTH="1"),nt!==void 0&&(this.renderTargetMasked.texture.type=nt,getOutputColorSpace(tt)===SRGBColorSpace&&setTextureColorSpace(this.renderTargetMasked.texture,SRGBColorSpace))}},ssao_default3=`uniform lowp sampler2D aoBuffer;uniform float luminanceInfluence;uniform float intensity; -#if THREE_REVISION < 143 -#define luminance(v) linearToRelativeLuminance(v) -#endif -#if defined(DEPTH_AWARE_UPSAMPLING) && defined(NORMAL_DEPTH) -#ifdef GL_FRAGMENT_PRECISION_HIGH -uniform highp sampler2D normalDepthBuffer; -#else -uniform mediump sampler2D normalDepthBuffer; -#endif -#endif -#ifdef COLORIZE -uniform vec3 color; -#endif -void mainImage(const in vec4 inputColor,const in vec2 uv,const in float depth,out vec4 outputColor){float aoLinear=texture2D(aoBuffer,uv).r; -#if defined(DEPTH_AWARE_UPSAMPLING) && defined(NORMAL_DEPTH) && __VERSION__ == 300 -vec4 normalDepth[4];normalDepth[0]=textureOffset(normalDepthBuffer,uv,ivec2(0,0));normalDepth[1]=textureOffset(normalDepthBuffer,uv,ivec2(0,1));normalDepth[2]=textureOffset(normalDepthBuffer,uv,ivec2(1,0));normalDepth[3]=textureOffset(normalDepthBuffer,uv,ivec2(1,1));float dot01=dot(normalDepth[0].rgb,normalDepth[1].rgb);float dot02=dot(normalDepth[0].rgb,normalDepth[2].rgb);float dot03=dot(normalDepth[0].rgb,normalDepth[3].rgb);float minDot=min(dot01,min(dot02,dot03));float s=step(THRESHOLD,minDot);float smallestDistance=1.0;int index;for(int i=0;i<4;++i){float distance=abs(depth-normalDepth[i].a);if(distancethis.setSize(jt.baseWidth,jt.baseHeight)),this.camera=tt,this.depthDownsamplingPass=new DepthDownsamplingPass({normalBuffer:et,resolutionScale:Tt}),this.depthDownsamplingPass.enabled=ot===null,this.ssaoPass=new ShaderPass(new SSAOMaterial(tt));const Pt=new NoiseTexture(NOISE_TEXTURE_SIZE,NOISE_TEXTURE_SIZE,RGBAFormat);Pt.wrapS=Pt.wrapT=RepeatWrapping;const Ct=this.ssaoMaterial;Ct.normalBuffer=et,Ct.noiseTexture=Pt,Ct.minRadiusScale=gt,Ct.samples=rt,Ct.radius=bt,Ct.rings=it,Ct.fade=kt,Ct.bias=xt,Ct.distanceThreshold=ht,Ct.distanceFalloff=dt,Ct.proximityThreshold=pt,Ct.proximityFalloff=mt,st!==void 0&&(Ct.worldDistanceThreshold=st),lt!==void 0&&(Ct.worldDistanceFalloff=lt),ct!==void 0&&(Ct.worldProximityThreshold=ct),ut!==void 0&&(Ct.worldProximityFalloff=ut),ot!==null&&(this.ssaoMaterial.normalDepthBuffer=ot,this.defines.set("NORMAL_DEPTH","1")),this.depthAwareUpsampling=at,this.color=St}set mainCamera(tt){this.camera=tt,this.ssaoMaterial.copyCameraSettings(tt)}get normalBuffer(){return this.ssaoMaterial.normalBuffer}set normalBuffer(tt){this.ssaoMaterial.normalBuffer=tt,this.depthDownsamplingPass.fullscreenMaterial.normalBuffer=tt}getResolution(){return this.resolution}get ssaoMaterial(){return this.ssaoPass.fullscreenMaterial}getSSAOMaterial(){return this.ssaoMaterial}get samples(){return this.ssaoMaterial.samples}set samples(tt){this.ssaoMaterial.samples=tt}get rings(){return this.ssaoMaterial.rings}set rings(tt){this.ssaoMaterial.rings=tt}get radius(){return this.ssaoMaterial.radius}set radius(tt){this.ssaoMaterial.radius=tt}get depthAwareUpsampling(){return this.defines.has("DEPTH_AWARE_UPSAMPLING")}set depthAwareUpsampling(tt){this.depthAwareUpsampling!==tt&&(tt?this.defines.set("DEPTH_AWARE_UPSAMPLING","1"):this.defines.delete("DEPTH_AWARE_UPSAMPLING"),this.setChanged())}isDepthAwareUpsamplingEnabled(){return this.depthAwareUpsampling}setDepthAwareUpsamplingEnabled(tt){this.depthAwareUpsampling=tt}get distanceScaling(){return!0}set distanceScaling(tt){}get color(){return this.uniforms.get("color").value}set color(tt){const et=this.uniforms,nt=this.defines;tt!==null?nt.has("COLORIZE")?et.get("color").value.set(tt):(nt.set("COLORIZE","1"),et.get("color").value=new Color$1(tt),this.setChanged()):nt.has("COLORIZE")&&(nt.delete("COLORIZE"),et.get("color").value=null,this.setChanged())}get luminanceInfluence(){return this.uniforms.get("luminanceInfluence").value}set luminanceInfluence(tt){this.uniforms.get("luminanceInfluence").value=tt}get intensity(){return this.uniforms.get("intensity").value}set intensity(tt){this.uniforms.get("intensity").value=tt}getColor(){return this.color}setColor(tt){this.color=tt}setDistanceCutoff(tt,et){this.ssaoMaterial.distanceThreshold=tt,this.ssaoMaterial.distanceFalloff=et}setProximityCutoff(tt,et){this.ssaoMaterial.proximityThreshold=tt,this.ssaoMaterial.proximityFalloff=et}setDepthTexture(tt,et=BasicDepthPacking){this.depthDownsamplingPass.setDepthTexture(tt,et),this.ssaoMaterial.depthBuffer=tt,this.ssaoMaterial.depthPacking=et}update(tt,et,nt){const rt=this.renderTarget;this.depthDownsamplingPass.enabled&&this.depthDownsamplingPass.render(tt),this.ssaoPass.render(tt,null,rt)}setSize(tt,et){const nt=this.resolution;nt.setBaseSize(tt,et);const rt=nt.width,it=nt.height;this.ssaoMaterial.copyCameraSettings(this.camera),this.ssaoMaterial.setSize(rt,it),this.renderTarget.setSize(rt,it),this.depthDownsamplingPass.resolution.scale=nt.scale,this.depthDownsamplingPass.setSize(tt,et)}initialize(tt,et,nt){try{let rt=this.uniforms.get("normalDepthBuffer").value;rt===null&&(this.depthDownsamplingPass.initialize(tt,et,nt),rt=this.depthDownsamplingPass.texture,this.uniforms.get("normalDepthBuffer").value=rt,this.ssaoMaterial.normalDepthBuffer=rt,this.defines.set("NORMAL_DEPTH","1"))}catch{this.depthDownsamplingPass.enabled=!1}}},texture_default=`#ifdef TEXTURE_PRECISION_HIGH -uniform mediump sampler2D map; -#else -uniform lowp sampler2D map; -#endif -varying vec2 vUv2;void mainImage(const in vec4 inputColor,const in vec2 uv,out vec4 outputColor){ -#ifdef UV_TRANSFORM -vec4 texel=texture2D(map,vUv2); -#else -vec4 texel=texture2D(map,uv); -#endif -outputColor=TEXEL;}`,texture_default2=`#ifdef ASPECT_CORRECTION -uniform float scale; -#else -uniform mat3 uvTransform; -#endif -varying vec2 vUv2;void mainSupport(const in vec2 uv){ -#ifdef ASPECT_CORRECTION -vUv2=uv*vec2(aspect,1.0)*scale; -#else -vUv2=(uvTransform*vec3(uv,1.0)).xy; -#endif -}`,TextureEffect=class extends Effect$1{constructor({blendFunction:tt,texture:et=null,aspectCorrection:nt=!1}={}){super("TextureEffect",texture_default,{blendFunction:tt,defines:new Map([["TEXEL","texel"]]),uniforms:new Map([["map",new Uniform(null)],["scale",new Uniform(1)],["uvTransform",new Uniform(null)]])}),this.texture=et,this.aspectCorrection=nt}get texture(){return this.uniforms.get("map").value}set texture(tt){const et=this.texture,nt=this.uniforms,rt=this.defines;et!==tt&&(nt.get("map").value=tt,nt.get("uvTransform").value=tt.matrix,rt.delete("TEXTURE_PRECISION_HIGH"),tt!==null&&(tt.matrixAutoUpdate?(rt.set("UV_TRANSFORM","1"),this.setVertexShader(texture_default2)):(rt.delete("UV_TRANSFORM"),this.setVertexShader(null)),tt.type!==UnsignedByteType&&rt.set("TEXTURE_PRECISION_HIGH","1"),(et===null||et.type!==tt.type||et.encoding!==tt.encoding)&&this.setChanged()))}getTexture(){return this.texture}setTexture(tt){this.texture=tt}get aspectCorrection(){return this.defines.has("ASPECT_CORRECTION")}set aspectCorrection(tt){this.aspectCorrection!==tt&&(tt?this.defines.set("ASPECT_CORRECTION","1"):this.defines.delete("ASPECT_CORRECTION"),this.setChanged())}get uvTransform(){const tt=this.texture;return tt!==null&&tt.matrixAutoUpdate}set uvTransform(tt){const et=this.texture;et!==null&&(et.matrixAutoUpdate=tt)}setTextureSwizzleRGBA(tt,et=tt,nt=tt,rt=tt){const it="rgba";let ot="";(tt!==ColorChannel.RED||et!==ColorChannel.GREEN||nt!==ColorChannel.BLUE||rt!==ColorChannel.ALPHA)&&(ot=[".",it[tt],it[et],it[nt],it[rt]].join("")),this.defines.set("TEXEL","texel"+ot),this.setChanged()}update(tt,et,nt){this.texture.matrixAutoUpdate&&this.texture.updateMatrix()}},vignette_default=`uniform float offset;uniform float darkness;void mainImage(const in vec4 inputColor,const in vec2 uv,out vec4 outputColor){const vec2 center=vec2(0.5);vec3 color=inputColor.rgb; -#if VIGNETTE_TECHNIQUE == 0 -float d=distance(uv,center);color*=smoothstep(0.8,offset*0.799,d*(darkness+offset)); -#else -vec2 coord=(uv-center)*vec2(offset);color=mix(color,vec3(1.0-darkness),dot(coord,coord)); -#endif -outputColor=vec4(color,inputColor.a);}`,VignetteEffect=class extends Effect$1{constructor({blendFunction:tt,technique:et=VignetteTechnique.DEFAULT,eskil:nt=!1,offset:rt=.5,darkness:it=.5}={}){super("VignetteEffect",vignette_default,{blendFunction:tt,defines:new Map([["VIGNETTE_TECHNIQUE",et.toFixed(0)]]),uniforms:new Map([["offset",new Uniform(rt)],["darkness",new Uniform(it)]])})}get technique(){return Number(this.defines.get("VIGNETTE_TECHNIQUE"))}set technique(tt){this.technique!==tt&&(this.defines.set("VIGNETTE_TECHNIQUE",tt.toFixed(0)),this.setChanged())}get eskil(){return this.technique===VignetteTechnique.ESKIL}set eskil(tt){this.technique=tt?VignetteTechnique.ESKIL:VignetteTechnique.DEFAULT}getTechnique(){return this.technique}setTechnique(tt){this.technique=tt}get offset(){return this.uniforms.get("offset").value}set offset(tt){this.uniforms.get("offset").value=tt}getOffset(){return this.offset}setOffset(tt){this.offset=tt}get darkness(){return this.uniforms.get("darkness").value}set darkness(tt){this.uniforms.get("darkness").value=tt}getDarkness(){return this.darkness}setDarkness(tt){this.darkness=tt}};function _defineProperty$C(tt,et,nt){return et in tt?Object.defineProperty(tt,et,{value:nt,enumerable:!0,configurable:!0,writable:!0}):tt[et]=nt,tt}function _arrayLikeToArray$o(tt,et){(et==null||et>tt.length)&&(et=tt.length);for(var nt=0,rt=new Array(et);ntMath.PI&&(nt-=Math.PI*2),nt}function _classCallCheck$f(tt,et){if(!(tt instanceof et))throw new TypeError("Cannot call a class as a function")}var Grad=function tt(et,nt,rt){var it=this;_classCallCheck$f(this,tt),_defineProperty$C(this,"dot2",function(ot,at){return it.x*ot+it.y*at}),_defineProperty$C(this,"dot3",function(ot,at,st){return it.x*ot+it.y*at+it.z*st}),this.x=et,this.y=nt,this.z=rt},grad3=[new Grad(1,1,0),new Grad(-1,1,0),new Grad(1,-1,0),new Grad(-1,-1,0),new Grad(1,0,1),new Grad(-1,0,1),new Grad(1,0,-1),new Grad(-1,0,-1),new Grad(0,1,1),new Grad(0,-1,1),new Grad(0,1,-1),new Grad(0,-1,-1)],p$1=[151,160,137,91,90,15,131,13,201,95,96,53,194,233,7,225,140,36,103,30,69,142,8,99,37,240,21,10,23,190,6,148,247,120,234,75,0,26,197,62,94,252,219,203,117,35,11,32,57,177,33,88,237,149,56,87,174,20,125,136,171,168,68,175,74,165,71,134,139,48,27,166,77,146,158,231,83,111,229,122,60,211,133,230,220,105,92,41,55,46,245,40,244,102,143,54,65,25,63,161,1,216,80,73,209,76,132,187,208,89,18,169,200,196,135,130,116,188,159,86,164,100,109,198,173,186,3,64,52,217,226,250,124,123,5,202,38,147,118,126,255,82,85,212,207,206,59,227,47,16,58,17,182,189,28,42,223,183,170,213,119,248,152,2,44,154,163,70,221,153,101,155,167,43,172,9,129,22,39,253,19,98,108,110,79,113,224,232,178,185,112,104,218,246,97,228,251,34,242,193,238,210,144,12,191,179,162,241,81,51,145,235,249,14,239,107,49,192,214,31,181,199,106,157,184,84,204,176,115,121,50,45,127,4,150,254,138,236,205,93,222,114,67,29,24,72,243,141,128,195,78,66,215,61,156,180],perm=new Array(512),gradP=new Array(512),seed$1=function(et){et>0&&et<1&&(et*=65536),et=Math.floor(et),et<256&&(et|=et<<8);for(var nt=0;nt<256;nt++){var rt;nt&1?rt=p$1[nt]^et&255:rt=p$1[nt]^et>>8&255,perm[nt]=perm[nt+256]=rt,gradP[nt]=gradP[nt+256]=grad3[rt%12]}};seed$1(0);function normalizeSeed(tt){if(typeof tt=="number")tt=Math.abs(tt);else if(typeof tt=="string"){var et=tt;tt=0;for(var nt=0;nt1&&arguments[1]!==void 0?arguments[1]:.01,rt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,it=arguments.length>3&&arguments[3]!==void 0?arguments[3]:1/(2*Math.PI);return rt/Math.atan(1/nt)*Math.atan(Math.sin(2*Math.PI*et*it)/nt)},exp$1=function(et){return 1/(1+et+.48*et*et+.235*et*et*et)};function damp(tt,et,nt){var rt=arguments.length>3&&arguments[3]!==void 0?arguments[3]:.25,it=arguments.length>4&&arguments[4]!==void 0?arguments[4]:.01,ot=arguments.length>5&&arguments[5]!==void 0?arguments[5]:1/0,at=arguments.length>6&&arguments[6]!==void 0?arguments[6]:exp$1,st=arguments.length>7&&arguments[7]!==void 0?arguments[7]:.001,lt="velocity_"+et;if(tt.__damp===void 0&&(tt.__damp={}),tt.__damp[lt]===void 0&&(tt.__damp[lt]=0),Math.abs(tt[et]-nt)<=st)return tt[et]=nt,!1;rt=Math.max(1e-4,rt);var ct=2/rt,ut=at(ct*it),ht=tt[et]-nt,dt=nt,pt=ot*rt;ht=Math.min(Math.max(ht,-pt),pt),nt=tt[et]-ht;var mt=(tt.__damp[lt]+ct*ht)*it;tt.__damp[lt]=(tt.__damp[lt]-ct*mt)*ut;var gt=nt+(ht+mt)*ut;return dt-tt[et]>0==gt>dt&&(gt=dt,tt.__damp[lt]=(gt-dt)/it),tt[et]=gt,!0}function dampAngle(tt,et,nt,rt,it,ot,at,st){return damp(tt,et,tt[et]+deltaAngle(tt[et],nt),rt,it,ot,at,st)}var v2d=new Vector2,a2,b2;function damp2(tt,et,nt,rt,it,ot,at){return typeof et=="number"?v2d.setScalar(et):Array.isArray(et)?v2d.set(et[0],et[1]):v2d.copy(et),a2=damp(tt,"x",v2d.x,nt,rt,it,ot,at),b2=damp(tt,"y",v2d.y,nt,rt,it,ot,at),a2||b2}var v3d=new Vector3,a3,b3,c3;function damp3(tt,et,nt,rt,it,ot,at){return typeof et=="number"?v3d.setScalar(et):Array.isArray(et)?v3d.set(et[0],et[1],et[2]):v3d.copy(et),a3=damp(tt,"x",v3d.x,nt,rt,it,ot,at),b3=damp(tt,"y",v3d.y,nt,rt,it,ot,at),c3=damp(tt,"z",v3d.z,nt,rt,it,ot,at),a3||b3||c3}var v4d=new Vector4,a4,b4,c4,d4;function damp4(tt,et,nt,rt,it,ot,at){return typeof et=="number"?v4d.setScalar(et):Array.isArray(et)?v4d.set(et[0],et[1],et[2],et[3]):v4d.copy(et),a4=damp(tt,"x",v4d.x,nt,rt,it,ot,at),b4=damp(tt,"y",v4d.y,nt,rt,it,ot,at),c4=damp(tt,"z",v4d.z,nt,rt,it,ot,at),d4=damp(tt,"w",v4d.w,nt,rt,it,ot,at),a4||b4||c4||d4}var rot=new Euler,aE,bE,cE;function dampE(tt,et,nt,rt,it,ot,at){return Array.isArray(et)?rot.set(et[0],et[1],et[2],et[3]):rot.copy(et),aE=dampAngle(tt,"x",rot.x,nt,rt,it,ot,at),bE=dampAngle(tt,"y",rot.y,nt,rt,it,ot,at),cE=dampAngle(tt,"z",rot.z,nt,rt,it,ot,at),aE||bE||cE}var col=new Color$1,aC,bC,cC;function dampC(tt,et,nt,rt,it,ot,at){return et instanceof Color$1?col.copy(et):Array.isArray(et)?col.setRGB(et[0],et[1],et[2]):col.set(et),aC=damp(tt,"r",col.r,nt,rt,it,ot,at),bC=damp(tt,"g",col.g,nt,rt,it,ot,at),cC=damp(tt,"b",col.b,nt,rt,it,ot,at),aC||bC||cC}var qt=new Quaternion,v4result=new Vector4,v4velocity=new Vector4,v4error=new Vector4,aQ,bQ,cQ,dQ;function dampQ(tt,et,nt,rt,it,ot,at){var st=tt;Array.isArray(et)?qt.set(et[0],et[1],et[2],et[3]):qt.copy(et);var lt=tt.dot(qt)>0?1:-1;return qt.x*=lt,qt.y*=lt,qt.z*=lt,qt.w*=lt,aQ=damp(tt,"x",qt.x,nt,rt,it,ot,at),bQ=damp(tt,"y",qt.y,nt,rt,it,ot,at),cQ=damp(tt,"z",qt.z,nt,rt,it,ot,at),dQ=damp(tt,"w",qt.w,nt,rt,it,ot,at),v4result.set(tt.x,tt.y,tt.z,tt.w).normalize(),v4velocity.set(st.__damp.velocity_x,st.__damp.velocity_y,st.__damp.velocity_z,st.__damp.velocity_w),v4error.copy(v4result).multiplyScalar(v4velocity.dot(v4result)/v4result.dot(v4result)),st.__damp.velocity_x-=v4error.x,st.__damp.velocity_y-=v4error.y,st.__damp.velocity_z-=v4error.z,st.__damp.velocity_w-=v4error.w,tt.set(v4result.x,v4result.y,v4result.z,v4result.w),aQ||bQ||cQ||dQ}var spherical=new Spherical,aS,bS,cS;function dampS(tt,et,nt,rt,it,ot,at){return Array.isArray(et)?spherical.set(et[0],et[1],et[2]):spherical.copy(et),aS=damp(tt,"radius",spherical.radius,nt,rt,it,ot,at),bS=dampAngle(tt,"phi",spherical.phi,nt,rt,it,ot,at),cS=dampAngle(tt,"theta",spherical.theta,nt,rt,it,ot,at),aS||bS||cS}var mat=new Matrix4,mPos=new Vector3,mRot=new Quaternion,mSca=new Vector3,aM,bM,cM;function dampM(tt,et,nt,rt,it,ot,at){var st=tt;return st.__damp===void 0&&(st.__damp={position:new Vector3,rotation:new Quaternion,scale:new Vector3},tt.decompose(st.__damp.position,st.__damp.rotation,st.__damp.scale)),Array.isArray(et)?mat.set.apply(mat,_toConsumableArray$d(et)):mat.copy(et),mat.decompose(mPos,mRot,mSca),aM=damp3(st.__damp.position,mPos,nt,rt,it,ot,at),bM=dampQ(st.__damp.rotation,mRot,nt,rt,it,ot,at),cM=damp3(st.__damp.scale,mSca,nt,rt,it,ot,at),tt.compose(st.__damp.position,st.__damp.rotation,st.__damp.scale),aM||bM||cM}var easing=Object.freeze({__proto__:null,rsqw,exp:exp$1,damp,dampAngle,damp2,damp3,damp4,dampE,dampC,dampQ,dampS,dampM});const selectionContext=reactExports.createContext(null);function Selection$2({children:tt,enabled:et=!0}){const[nt,rt]=reactExports.useState([]),it=reactExports.useMemo(()=>({selected:nt,select:rt,enabled:et}),[nt,rt,et]);return jsxRuntimeExports.jsx(selectionContext.Provider,{value:it,children:tt})}function Select({enabled:tt=!1,children:et,...nt}){const rt=reactExports.useRef(null),it=reactExports.useContext(selectionContext);return reactExports.useEffect(()=>{if(it&&tt){let ot=!1;const at=[];if(rt.current.traverse(st=>{st.type==="Mesh"&&at.push(st),it.selected.indexOf(st)===-1&&(ot=!0)}),ot)return it.select(st=>[...st,...at]),()=>{it.select(st=>st.filter(lt=>!at.includes(lt)))}}},[tt,et,it]),jsxRuntimeExports.jsx("group",{ref:rt,...nt,children:et})}const EffectComposerContext=reactExports.createContext(null),EffectComposer=React$1.memo(reactExports.forwardRef(({children:tt,camera:et,scene:nt,resolutionScale:rt,enabled:it=!0,renderPriority:ot=1,autoClear:at=!0,depthBuffer:st,disableNormalPass:lt,stencilBuffer:ct,multisampling:ut=8,frameBufferType:ht=HalfFloatType},dt)=>{const{gl:pt,scene:mt,camera:gt,size:yt}=useThree(),bt=nt||mt,vt=et||gt,[xt,kt,St]=reactExports.useMemo(()=>{const $t=isWebGL2Available$1(),Dt=new EffectComposer$1(pt,{depthBuffer:st,stencilBuffer:ct,multisampling:ut>0&&$t?ut:0,frameBufferType:ht});Dt.addPass(new RenderPass(bt,vt));let jt=null,Pt=null;return lt||(Pt=new NormalPass(bt,vt),Pt.enabled=!1,Dt.addPass(Pt),rt!==void 0&&$t&&(jt=new DepthDownsamplingPass({normalBuffer:Pt.texture,resolutionScale:rt}),jt.enabled=!1,Dt.addPass(jt))),[Dt,Pt,jt]},[vt,pt,st,ct,ut,ht,bt,lt,rt]);reactExports.useEffect(()=>xt==null?void 0:xt.setSize(yt.width,yt.height),[xt,yt]),useFrame(($t,Dt)=>{if(it){const jt=pt.autoClear;pt.autoClear=at,ct&&!at&&pt.clearStencil(),xt.render(Dt),pt.autoClear=jt}},it?ot:0);const Tt=reactExports.useRef(null),At=useInstanceHandle(Tt);reactExports.useLayoutEffect(()=>{const $t=[];if(Tt.current&&At.current&&xt){const Dt=At.current.objects;for(let jt=0;jt{for(const Dt of $t)xt==null||xt.removePass(Dt);kt&&(kt.enabled=!1),St&&(St.enabled=!1)}},[xt,tt,vt,kt,St,At]);const Et=reactExports.useMemo(()=>({composer:xt,normalPass:kt,downSamplingPass:St,resolutionScale:rt,camera:vt,scene:bt}),[xt,kt,St,rt,vt,bt]);return reactExports.useImperativeHandle(dt,()=>xt,[xt]),jsxRuntimeExports.jsx(EffectComposerContext.Provider,{value:Et,children:jsxRuntimeExports.jsx("group",{ref:Tt,children:tt})})})),resolveRef=tt=>typeof tt=="object"&&tt!=null&&"current"in tt?tt.current:tt;let i$1=0;const components=new WeakMap,wrapEffect=(tt,et)=>React$1.forwardRef(function({blendFunction:rt=et==null?void 0:et.blendFunction,opacity:it=et==null?void 0:et.opacity,...ot},at){let st=components.get(tt);if(!st){const ut=`@react-three/postprocessing/${tt.name}-${i$1++}`;extend$2({[ut]:tt}),components.set(tt,st=ut)}const lt=useThree(ut=>ut.camera),ct=React$1.useMemo(()=>{var ut,ht;return[...(ut=et==null?void 0:et.args)!=null?ut:[],...(ht=ot.args)!=null?ht:[{...et,...ot}]]},[JSON.stringify(ot)]);return jsxRuntimeExports.jsx(st,{camera:lt,"blendMode-blendFunction":rt,"blendMode-opacity-value":it,...ot,ref:at,args:ct})}),useVector2=(tt,et)=>{const nt=tt[et];return React$1.useMemo(()=>typeof nt=="number"?new Vector2(nt,nt):nt?new Vector2(...nt):new Vector2,[nt])},DepthOfField=reactExports.forwardRef(function({blendFunction:et,worldFocusDistance:nt,worldFocusRange:rt,focusDistance:it,focusRange:ot,focalLength:at,bokehScale:st,resolutionScale:lt,resolutionX:ct,resolutionY:ut,width:ht,height:dt,target:pt,depthTexture:mt,...gt},yt){const{camera:bt}=reactExports.useContext(EffectComposerContext),vt=pt!=null,xt=reactExports.useMemo(()=>{const kt=new DepthOfFieldEffect(bt,{blendFunction:et,worldFocusDistance:nt,worldFocusRange:rt,focusDistance:it,focusRange:ot,focalLength:at,bokehScale:st,resolutionScale:lt,resolutionX:ct,resolutionY:ut,width:ht,height:dt});vt&&(kt.target=new Vector3),mt&&kt.setDepthTexture(mt.texture,mt.packing);const St=kt.maskPass.getFullscreenMaterial();return St.maskFunction=MaskFunction.MULTIPLY_RGB_SET_ALPHA,kt},[bt,et,nt,rt,it,ot,at,st,lt,ct,ut,ht,dt,vt,mt]);return reactExports.useEffect(()=>()=>{xt.dispose()},[xt]),jsxRuntimeExports.jsx("primitive",{...gt,ref:yt,object:xt,target:pt})});reactExports.forwardRef(({target:tt=void 0,mouse:et=!1,debug:nt=void 0,manual:rt=!1,smoothTime:it=.25,...ot},at)=>{const st=reactExports.useRef(null),lt=reactExports.useRef(null),ct=reactExports.useRef(null),ut=useThree(({scene:St})=>St),ht=useThree(({pointer:St})=>St),{composer:dt,camera:pt}=reactExports.useContext(EffectComposerContext),[mt]=reactExports.useState(()=>new DepthPickingPass),[gt]=reactExports.useState(()=>new CopyPass);reactExports.useEffect(()=>(dt.addPass(mt),dt.addPass(gt),()=>{dt.removePass(mt),dt.removePass(gt)}),[dt,mt,gt]),reactExports.useEffect(()=>()=>{mt.dispose(),gt.dispose()},[mt,gt]);const[yt]=reactExports.useState(()=>new Vector3(0,0,0)),[bt]=reactExports.useState(()=>new Vector3(0,0,0)),vt=reactExports.useCallback(async(St,Tt)=>(bt.x=St,bt.y=Tt,bt.z=await mt.readDepth(bt),bt.z=bt.z*2-1,1-bt.z>1e-7?bt.unproject(pt):!1),[bt,mt,pt]),xt=reactExports.useCallback(async(St,Tt=!0)=>{var At;if(tt)yt.set(...tt);else{const{x:Et,y:$t}=et?ht:{x:0,y:0},Dt=await vt(Et,$t);Dt&&yt.copy(Dt)}Tt&&((At=st.current)!=null&&At.target)&&(it>0&&St>0?easing.damp3(st.current.target,yt,it,St):st.current.target.copy(yt))},[tt,yt,et,vt,it,ht]);useFrame(async(St,Tt)=>{var At;rt||xt(Tt),lt.current&<.current.position.copy(yt),ct.current&&((At=st.current)!=null&&At.target)&&ct.current.position.copy(st.current.target)});const kt=reactExports.useMemo(()=>({dofRef:st,hitpoint:yt,update:xt}),[yt,xt]);return reactExports.useImperativeHandle(at,()=>kt,[kt]),jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[nt?createPortal(jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs("mesh",{ref:lt,children:[jsxRuntimeExports.jsx("sphereGeometry",{args:[nt,16,16]}),jsxRuntimeExports.jsx("meshBasicMaterial",{color:"#00ff00",opacity:1,transparent:!0,depthWrite:!1})]}),jsxRuntimeExports.jsxs("mesh",{ref:ct,children:[jsxRuntimeExports.jsx("sphereGeometry",{args:[nt/2,16,16]}),jsxRuntimeExports.jsx("meshBasicMaterial",{color:"#00ff00",opacity:.5,transparent:!0,depthWrite:!1})]})]}),ut):null,jsxRuntimeExports.jsx(DepthOfField,{ref:st,...ot,target:yt})]})});const LensFlareShader={fragmentShader:` +` + else if (Un.test(So)) throw new To(st) + ;(Or = (ar ? Or.replace(Jn, '') : Or).replace(Hn, '$1').replace(pr, '$1;')), + (Or = + 'function(' + + (So || 'obj') + + `) { +` + + (So + ? '' + : `obj || (obj = {}); +`) + + "var __t, __p = ''" + + (Qn ? ', __e = _.escape' : '') + + (ar + ? `, __j = Array.prototype.join; +function print() { __p += __j.call(arguments, '') } +` + : `; +`) + + Or + + `return __p +}`) + var Lo = dw(function () { + return $o(Wn, uo + 'return ' + Or).apply(nt, Xn) + }) + if (((Lo.source = Or), o1(Lo))) throw Lo + return Lo + } + function sx(Rt) { + return Qo(Rt).toLowerCase() + } + function lx(Rt) { + return Qo(Rt).toUpperCase() + } + function cx(Rt, Vt, Yt) { + if (((Rt = Qo(Rt)), Rt && (Yt || Vt === nt))) return wm(Rt) + if (!Rt || !(Vt = js(Vt))) return Rt + var yn = ss(Rt), + Bn = ss(Vt), + Wn = _a(yn, Bn), + Xn = cp(yn, Bn) + 1 + return Uu(yn, Wn, Xn).join('') + } + function ux(Rt, Vt, Yt) { + if (((Rt = Qo(Rt)), Rt && (Yt || Vt === nt))) return Rt.slice(0, fp(Rt) + 1) + if (!Rt || !(Vt = js(Vt))) return Rt + var yn = ss(Rt), + Bn = cp(yn, ss(Vt)) + 1 + return Uu(yn, 0, Bn).join('') + } + function hx(Rt, Vt, Yt) { + if (((Rt = Qo(Rt)), Rt && (Yt || Vt === nt))) return Rt.replace(xn, '') + if (!Rt || !(Vt = js(Vt))) return Rt + var yn = ss(Rt), + Bn = _a(yn, ss(Vt)) + return Uu(yn, Bn).join('') + } + function dx(Rt, Vt) { + var Yt = Dt, + yn = jt + if (ds(Vt)) { + var Bn = 'separator' in Vt ? Vt.separator : Bn + ;(Yt = 'length' in Vt ? Do(Vt.length) : Yt), (yn = 'omission' in Vt ? js(Vt.omission) : yn) + } + Rt = Qo(Rt) + var Wn = Rt.length + if (qu(Rt)) { + var Xn = ss(Rt) + Wn = Xn.length + } + if (Yt >= Wn) return Rt + var Qn = Yt - ru(yn) + if (Qn < 1) return yn + var ar = Xn ? Uu(Xn, 0, Qn).join('') : Rt.slice(0, Qn) + if (Bn === nt) return ar + yn + if ((Xn && (Qn += ar.length - Qn), a1(Bn))) { + if (Rt.slice(Qn).search(Bn)) { + var Ir, + Cr = ar + for (Bn.global || (Bn = Es(Bn.source, Qo(lr.exec(Bn)) + 'g')), Bn.lastIndex = 0; (Ir = Bn.exec(Cr)); ) + var Or = Ir.index + ar = ar.slice(0, Or === nt ? Qn : Or) + } + } else if (Rt.indexOf(js(Bn), Qn) != Qn) { + var Qr = ar.lastIndexOf(Bn) + Qr > -1 && (ar = ar.slice(0, Qr)) + } + return ar + yn + } + function fx(Rt) { + return (Rt = Qo(Rt)), Rt && io.test(Rt) ? Rt.replace(fr, pp) : Rt + } + var mx = Bt(function (Rt, Vt, Yt) { + return Rt + (Yt ? ' ' : '') + Vt.toUpperCase() + }), + c1 = E0('toUpperCase') + function hw(Rt, Vt, Yt) { + return (Rt = Qo(Rt)), (Vt = Yt ? nt : Vt), Vt === nt ? (Up(Rt) ? mp(Rt) : jy(Rt)) : Rt.match(Vt) || [] + } + var dw = mo(function (Rt, Vt) { + try { + return Vo(Rt, nt, Vt) + } catch (Yt) { + return o1(Yt) ? Yt : new To(Yt) + } + }), + gx = jo(function (Rt, Vt) { + return ( + ws(Vt, function (Yt) { + ;(Yt = Wu(Yt)), lu(Rt, Yt, r1(Rt[Yt], Rt)) + }), + Rt + ) + }) + function yx(Rt) { + var Vt = Rt == null ? 0 : Rt.length, + Yt = wo() + return ( + (Rt = Vt + ? ba(Rt, function (yn) { + if (typeof yn[1] != 'function') throw new Gs(at) + return [Yt(yn[0]), yn[1]] + }) + : []), + mo(function (yn) { + for (var Bn = -1; ++Bn < Vt; ) { + var Wn = Rt[Bn] + if (Vo(Wn[0], this, yn)) return Vo(Wn[1], this, yn) + } + }) + ) + } + function bx(Rt) { + return dy(_l(Rt, ht)) + } + function u1(Rt) { + return function () { + return Rt + } + } + function wx(Rt, Vt) { + return Rt == null || Rt !== Rt ? Vt : Rt + } + var vx = gn(), + xx = gn(!0) + function Dl(Rt) { + return Rt + } + function h1(Rt) { + return Ap(typeof Rt == 'function' ? Rt : _l(Rt, ht)) + } + function Sx(Rt) { + return am(_l(Rt, ht)) + } + function Ex(Rt, Vt) { + return Pm(Rt, _l(Vt, ht)) + } + var Tx = mo(function (Rt, Vt) { + return function (Yt) { + return xa(Yt, Rt, Vt) + } + }), + Ix = mo(function (Rt, Vt) { + return function (Yt) { + return xa(Rt, Yt, Vt) + } + }) + function d1(Rt, Vt, Yt) { + var yn = Fs(Vt), + Bn = _h(Vt, yn) + Yt == null && + !(ds(Vt) && (Bn.length || !yn.length)) && + ((Yt = Vt), (Vt = Rt), (Rt = this), (Bn = _h(Vt, Fs(Vt)))) + var Wn = !(ds(Yt) && 'chain' in Yt) || !!Yt.chain, + Xn = np(Rt) + return ( + ws(Bn, function (Qn) { + var ar = Vt[Qn] + ;(Rt[Qn] = ar), + Xn && + (Rt.prototype[Qn] = function () { + var Ir = this.__chain__ + if (Wn || Ir) { + var Cr = Rt(this.__wrapped__), + Or = (Cr.__actions__ = Ns(this.__actions__)) + return Or.push({ func: ar, args: arguments, thisArg: Rt }), (Cr.__chain__ = Ir), Cr + } + return ar.apply(Rt, Ll([this.value()], arguments)) + }) + }), + Rt + ) + } + function Ax() { + return ns._ === this && (ns._ = vm), this + } + function f1() {} + function Cx(Rt) { + return ( + (Rt = Do(Rt)), + mo(function (Vt) { + return ku(Vt, Rt) + }) + ) + } + var $x = _r(ba), + Px = _r(Ym), + Mx = _r(Np) + function fw(Rt) { + return Z0(Rt) ? qs(Wu(Rt)) : Bm(Rt) + } + function Rx(Rt) { + return function (Vt) { + return Rt == null ? nt : Xl(Rt, Vt) + } + } + var Bx = Io(), + Ox = Io(!0) + function p1() { + return [] + } + function m1() { + return !1 + } + function jx() { + return {} + } + function Dx() { + return '' + } + function Nx() { + return !0 + } + function Lx(Rt, Vt) { + if (((Rt = Do(Rt)), Rt < 1 || Rt > zt)) return [] + var Yt = Ut, + yn = Ms(Rt, Ut) + ;(Vt = wo(Vt)), (Rt -= Ut) + for (var Bn = wu(yn, Vt); ++Yt < Rt; ) Vt(Yt) + return Bn + } + function Fx(Rt) { + return Mo(Rt) ? ba(Rt, Wu) : Jl(Rt) ? [Rt] : Ns(R1(Qo(Rt))) + } + function Ux(Rt) { + var Vt = ++Qm + return Qo(Rt) + Vt + } + var zx = rr(function (Rt, Vt) { + return Rt + Vt + }, 0), + Wx = lo('ceil'), + Vx = rr(function (Rt, Vt) { + return Rt / Vt + }, 1), + Hx = lo('floor') + function Gx(Rt) { + return Rt && Rt.length ? nm(Rt, Dl, im) : nt + } + function qx(Rt, Vt) { + return Rt && Rt.length ? nm(Rt, wo(Vt, 2), im) : nt + } + function Yx(Rt) { + return Fp(Rt, Dl) + } + function Kx(Rt, Vt) { + return Fp(Rt, wo(Vt, 2)) + } + function Xx(Rt) { + return Rt && Rt.length ? nm(Rt, Dl, om) : nt + } + function Zx(Rt, Vt) { + return Rt && Rt.length ? nm(Rt, wo(Vt, 2), om) : nt + } + var Jx = rr(function (Rt, Vt) { + return Rt * Vt + }, 1), + Qx = lo('round'), + e4 = rr(function (Rt, Vt) { + return Rt - Vt + }, 0) + function t4(Rt) { + return Rt && Rt.length ? Ul(Rt, Dl) : 0 + } + function n4(Rt, Vt) { + return Rt && Rt.length ? Ul(Rt, wo(Vt, 2)) : 0 + } + return ( + (Fn.after = y_), + (Fn.ary = V1), + (Fn.assign = o2), + (Fn.assignIn = iw), + (Fn.assignInWith = O0), + (Fn.assignWith = s2), + (Fn.at = l2), + (Fn.before = H1), + (Fn.bind = r1), + (Fn.bindAll = gx), + (Fn.bindKey = G1), + (Fn.castArray = C_), + (Fn.chain = U1), + (Fn.chunk = Nw), + (Fn.compact = Lw), + (Fn.concat = Fw), + (Fn.cond = yx), + (Fn.conforms = bx), + (Fn.constant = u1), + (Fn.countBy = Yv), + (Fn.create = c2), + (Fn.curry = q1), + (Fn.curryRight = Y1), + (Fn.debounce = K1), + (Fn.defaults = u2), + (Fn.defaultsDeep = h2), + (Fn.defer = b_), + (Fn.delay = w_), + (Fn.difference = Uw), + (Fn.differenceBy = zw), + (Fn.differenceWith = Ww), + (Fn.drop = Vw), + (Fn.dropRight = Hw), + (Fn.dropRightWhile = Gw), + (Fn.dropWhile = qw), + (Fn.fill = Yw), + (Fn.filter = Xv), + (Fn.flatMap = Qv), + (Fn.flatMapDeep = e_), + (Fn.flatMapDepth = t_), + (Fn.flatten = D1), + (Fn.flattenDeep = Kw), + (Fn.flattenDepth = Xw), + (Fn.flip = v_), + (Fn.flow = vx), + (Fn.flowRight = xx), + (Fn.fromPairs = Zw), + (Fn.functions = w2), + (Fn.functionsIn = _2), + (Fn.groupBy = n_), + (Fn.initial = Qw), + (Fn.intersection = ev), + (Fn.intersectionBy = tv), + (Fn.intersectionWith = nv), + (Fn.invert = k2), + (Fn.invertBy = S2), + (Fn.invokeMap = i_), + (Fn.iteratee = h1), + (Fn.keyBy = o_), + (Fn.keys = Fs), + (Fn.keysIn = Ol), + (Fn.map = C0), + (Fn.mapKeys = T2), + (Fn.mapValues = I2), + (Fn.matches = Sx), + (Fn.matchesProperty = Ex), + (Fn.memoize = P0), + (Fn.merge = A2), + (Fn.mergeWith = ow), + (Fn.method = Tx), + (Fn.methodOf = Ix), + (Fn.mixin = d1), + (Fn.negate = M0), + (Fn.nthArg = Cx), + (Fn.omit = C2), + (Fn.omitBy = $2), + (Fn.once = __), + (Fn.orderBy = a_), + (Fn.over = $x), + (Fn.overArgs = x_), + (Fn.overEvery = Px), + (Fn.overSome = Mx), + (Fn.partial = i1), + (Fn.partialRight = X1), + (Fn.partition = s_), + (Fn.pick = P2), + (Fn.pickBy = aw), + (Fn.property = fw), + (Fn.propertyOf = Rx), + (Fn.pull = av), + (Fn.pullAll = L1), + (Fn.pullAllBy = sv), + (Fn.pullAllWith = lv), + (Fn.pullAt = cv), + (Fn.range = Bx), + (Fn.rangeRight = Ox), + (Fn.rearg = k_), + (Fn.reject = u_), + (Fn.remove = uv), + (Fn.rest = S_), + (Fn.reverse = e1), + (Fn.sampleSize = d_), + (Fn.set = R2), + (Fn.setWith = B2), + (Fn.shuffle = f_), + (Fn.slice = hv), + (Fn.sortBy = g_), + (Fn.sortedUniq = bv), + (Fn.sortedUniqBy = wv), + (Fn.split = rx), + (Fn.spread = E_), + (Fn.tail = vv), + (Fn.take = _v), + (Fn.takeRight = xv), + (Fn.takeRightWhile = kv), + (Fn.takeWhile = Sv), + (Fn.tap = Lv), + (Fn.throttle = T_), + (Fn.thru = A0), + (Fn.toArray = tw), + (Fn.toPairs = sw), + (Fn.toPairsIn = lw), + (Fn.toPath = Fx), + (Fn.toPlainObject = rw), + (Fn.transform = O2), + (Fn.unary = I_), + (Fn.union = Ev), + (Fn.unionBy = Tv), + (Fn.unionWith = Iv), + (Fn.uniq = Av), + (Fn.uniqBy = Cv), + (Fn.uniqWith = $v), + (Fn.unset = j2), + (Fn.unzip = n1), + (Fn.unzipWith = F1), + (Fn.update = D2), + (Fn.updateWith = N2), + (Fn.values = Vm), + (Fn.valuesIn = L2), + (Fn.without = Pv), + (Fn.words = hw), + (Fn.wrap = A_), + (Fn.xor = Mv), + (Fn.xorBy = Rv), + (Fn.xorWith = Bv), + (Fn.zip = Ov), + (Fn.zipObject = jv), + (Fn.zipObjectDeep = Dv), + (Fn.zipWith = Nv), + (Fn.entries = sw), + (Fn.entriesIn = lw), + (Fn.extend = iw), + (Fn.extendWith = O0), + d1(Fn, Fn), + (Fn.add = zx), + (Fn.attempt = dw), + (Fn.camelCase = W2), + (Fn.capitalize = cw), + (Fn.ceil = Wx), + (Fn.clamp = F2), + (Fn.clone = $_), + (Fn.cloneDeep = M_), + (Fn.cloneDeepWith = R_), + (Fn.cloneWith = P_), + (Fn.conformsTo = B_), + (Fn.deburr = uw), + (Fn.defaultTo = wx), + (Fn.divide = Vx), + (Fn.endsWith = V2), + (Fn.eq = Eu), + (Fn.escape = H2), + (Fn.escapeRegExp = G2), + (Fn.every = Kv), + (Fn.find = Zv), + (Fn.findIndex = O1), + (Fn.findKey = d2), + (Fn.findLast = Jv), + (Fn.findLastIndex = j1), + (Fn.findLastKey = f2), + (Fn.floor = Hx), + (Fn.forEach = z1), + (Fn.forEachRight = W1), + (Fn.forIn = p2), + (Fn.forInRight = m2), + (Fn.forOwn = g2), + (Fn.forOwnRight = y2), + (Fn.get = s1), + (Fn.gt = O_), + (Fn.gte = j_), + (Fn.has = x2), + (Fn.hasIn = l1), + (Fn.head = N1), + (Fn.identity = Dl), + (Fn.includes = r_), + (Fn.indexOf = Jw), + (Fn.inRange = U2), + (Fn.invoke = E2), + (Fn.isArguments = pm), + (Fn.isArray = Mo), + (Fn.isArrayBuffer = D_), + (Fn.isArrayLike = Bl), + (Fn.isArrayLikeObject = ks), + (Fn.isBoolean = N_), + (Fn.isBuffer = Pp), + (Fn.isDate = L_), + (Fn.isElement = F_), + (Fn.isEmpty = U_), + (Fn.isEqual = z_), + (Fn.isEqualWith = W_), + (Fn.isError = o1), + (Fn.isFinite = V_), + (Fn.isFunction = np), + (Fn.isInteger = Z1), + (Fn.isLength = R0), + (Fn.isMap = J1), + (Fn.isMatch = H_), + (Fn.isMatchWith = G_), + (Fn.isNaN = q_), + (Fn.isNative = Y_), + (Fn.isNil = X_), + (Fn.isNull = K_), + (Fn.isNumber = Q1), + (Fn.isObject = ds), + (Fn.isObjectLike = gs), + (Fn.isPlainObject = Ry), + (Fn.isRegExp = a1), + (Fn.isSafeInteger = Z_), + (Fn.isSet = ew), + (Fn.isString = B0), + (Fn.isSymbol = Jl), + (Fn.isTypedArray = Wm), + (Fn.isUndefined = J_), + (Fn.isWeakMap = Q_), + (Fn.isWeakSet = t2), + (Fn.join = rv), + (Fn.kebabCase = q2), + (Fn.last = du), + (Fn.lastIndexOf = iv), + (Fn.lowerCase = Y2), + (Fn.lowerFirst = K2), + (Fn.lt = n2), + (Fn.lte = r2), + (Fn.max = Gx), + (Fn.maxBy = qx), + (Fn.mean = Yx), + (Fn.meanBy = Kx), + (Fn.min = Xx), + (Fn.minBy = Zx), + (Fn.stubArray = p1), + (Fn.stubFalse = m1), + (Fn.stubObject = jx), + (Fn.stubString = Dx), + (Fn.stubTrue = Nx), + (Fn.multiply = Jx), + (Fn.nth = ov), + (Fn.noConflict = Ax), + (Fn.noop = f1), + (Fn.now = $0), + (Fn.pad = X2), + (Fn.padEnd = Z2), + (Fn.padStart = J2), + (Fn.parseInt = Q2), + (Fn.random = z2), + (Fn.reduce = l_), + (Fn.reduceRight = c_), + (Fn.repeat = ex), + (Fn.replace = tx), + (Fn.result = M2), + (Fn.round = Qx), + (Fn.runInContext = er), + (Fn.sample = h_), + (Fn.size = p_), + (Fn.snakeCase = nx), + (Fn.some = m_), + (Fn.sortedIndex = dv), + (Fn.sortedIndexBy = fv), + (Fn.sortedIndexOf = pv), + (Fn.sortedLastIndex = mv), + (Fn.sortedLastIndexBy = gv), + (Fn.sortedLastIndexOf = yv), + (Fn.startCase = ix), + (Fn.startsWith = ox), + (Fn.subtract = e4), + (Fn.sum = t4), + (Fn.sumBy = n4), + (Fn.template = ax), + (Fn.times = Lx), + (Fn.toFinite = rp), + (Fn.toInteger = Do), + (Fn.toLength = nw), + (Fn.toLower = sx), + (Fn.toNumber = fu), + (Fn.toSafeInteger = i2), + (Fn.toString = Qo), + (Fn.toUpper = lx), + (Fn.trim = cx), + (Fn.trimEnd = ux), + (Fn.trimStart = hx), + (Fn.truncate = dx), + (Fn.unescape = fx), + (Fn.uniqueId = Ux), + (Fn.upperCase = mx), + (Fn.upperFirst = c1), + (Fn.each = z1), + (Fn.eachRight = W1), + (Fn.first = N1), + d1( + Fn, + (function () { + var Rt = {} + return ( + xl(Fn, function (Vt, Yt) { + qo.call(Fn.prototype, Yt) || (Rt[Yt] = Vt) + }), + Rt + ) + })(), + { chain: !1 }, + ), + (Fn.VERSION = rt), + ws(['bind', 'bindKey', 'curry', 'curryRight', 'partial', 'partialRight'], function (Rt) { + Fn[Rt].placeholder = Fn + }), + ws(['drop', 'take'], function (Rt, Vt) { + ;(yo.prototype[Rt] = function (Yt) { + Yt = Yt === nt ? 1 : _s(Do(Yt), 0) + var yn = this.__filtered__ && !Vt ? new yo(this) : this.clone() + return ( + yn.__filtered__ + ? (yn.__takeCount__ = Ms(Yt, yn.__takeCount__)) + : yn.__views__.push({ size: Ms(Yt, Ut), type: Rt + (yn.__dir__ < 0 ? 'Right' : '') }), + yn + ) + }), + (yo.prototype[Rt + 'Right'] = function (Yt) { + return this.reverse()[Rt](Yt).reverse() + }) + }), + ws(['filter', 'map', 'takeWhile'], function (Rt, Vt) { + var Yt = Vt + 1, + yn = Yt == wt || Yt == Ot + yo.prototype[Rt] = function (Bn) { + var Wn = this.clone() + return ( + Wn.__iteratees__.push({ iteratee: wo(Bn, 3), type: Yt }), + (Wn.__filtered__ = Wn.__filtered__ || yn), + Wn + ) + } + }), + ws(['head', 'last'], function (Rt, Vt) { + var Yt = 'take' + (Vt ? 'Right' : '') + yo.prototype[Rt] = function () { + return this[Yt](1).value()[0] + } + }), + ws(['initial', 'tail'], function (Rt, Vt) { + var Yt = 'drop' + (Vt ? '' : 'Right') + yo.prototype[Rt] = function () { + return this.__filtered__ ? new yo(this) : this[Yt](1) + } + }), + (yo.prototype.compact = function () { + return this.filter(Dl) + }), + (yo.prototype.find = function (Rt) { + return this.filter(Rt).head() + }), + (yo.prototype.findLast = function (Rt) { + return this.reverse().find(Rt) + }), + (yo.prototype.invokeMap = mo(function (Rt, Vt) { + return typeof Rt == 'function' + ? new yo(this) + : this.map(function (Yt) { + return xa(Yt, Rt, Vt) + }) + })), + (yo.prototype.reject = function (Rt) { + return this.filter(M0(wo(Rt))) + }), + (yo.prototype.slice = function (Rt, Vt) { + Rt = Do(Rt) + var Yt = this + return Yt.__filtered__ && (Rt > 0 || Vt < 0) + ? new yo(Yt) + : (Rt < 0 ? (Yt = Yt.takeRight(-Rt)) : Rt && (Yt = Yt.drop(Rt)), + Vt !== nt && ((Vt = Do(Vt)), (Yt = Vt < 0 ? Yt.dropRight(-Vt) : Yt.take(Vt - Rt))), + Yt) + }), + (yo.prototype.takeRightWhile = function (Rt) { + return this.reverse().takeWhile(Rt).reverse() + }), + (yo.prototype.toArray = function () { + return this.take(Ut) + }), + xl(yo.prototype, function (Rt, Vt) { + var Yt = /^(?:filter|find|map|reject)|While$/.test(Vt), + yn = /^(?:head|last)$/.test(Vt), + Bn = Fn[yn ? 'take' + (Vt == 'last' ? 'Right' : '') : Vt], + Wn = yn || /^find/.test(Vt) + Bn && + (Fn.prototype[Vt] = function () { + var Xn = this.__wrapped__, + Qn = yn ? [1] : arguments, + ar = Xn instanceof yo, + Ir = Qn[0], + Cr = ar || Mo(Xn), + Or = function (Uo) { + var Ho = Bn.apply(Fn, Ll([Uo], Qn)) + return yn && Qr ? Ho[0] : Ho + } + Cr && Yt && typeof Ir == 'function' && Ir.length != 1 && (ar = Cr = !1) + var Qr = this.__chain__, + uo = !!this.__actions__.length, + So = Wn && !Qr, + Lo = ar && !uo + if (!Wn && Cr) { + Xn = Lo ? Xn : new yo(this) + var Eo = Rt.apply(Xn, Qn) + return Eo.__actions__.push({ func: A0, args: [Or], thisArg: nt }), new Rs(Eo, Qr) + } + return So && Lo + ? Rt.apply(this, Qn) + : ((Eo = this.thru(Or)), So ? (yn ? Eo.value()[0] : Eo.value()) : Eo) + }) + }), + ws(['pop', 'push', 'shift', 'sort', 'splice', 'unshift'], function (Rt) { + var Vt = $u[Rt], + Yt = /^(?:push|sort|unshift)$/.test(Rt) ? 'tap' : 'thru', + yn = /^(?:pop|shift)$/.test(Rt) + Fn.prototype[Rt] = function () { + var Bn = arguments + if (yn && !this.__chain__) { + var Wn = this.value() + return Vt.apply(Mo(Wn) ? Wn : [], Bn) + } + return this[Yt](function (Xn) { + return Vt.apply(Mo(Xn) ? Xn : [], Bn) + }) + } + }), + xl(yo.prototype, function (Rt, Vt) { + var Yt = Fn[Vt] + if (Yt) { + var yn = Yt.name + '' + qo.call(Zu, yn) || (Zu[yn] = []), Zu[yn].push({ name: Vt, func: Yt }) + } + }), + (Zu[Cn(nt, bt).name] = [{ name: 'wrapper', func: nt }]), + (yo.prototype.clone = L0), + (yo.prototype.reverse = F0), + (yo.prototype.value = yl), + (Fn.prototype.at = Fv), + (Fn.prototype.chain = Uv), + (Fn.prototype.commit = zv), + (Fn.prototype.next = Wv), + (Fn.prototype.plant = Hv), + (Fn.prototype.reverse = Gv), + (Fn.prototype.toJSON = Fn.prototype.valueOf = Fn.prototype.value = qv), + (Fn.prototype.first = Fn.prototype.head), + Mu && (Fn.prototype[Mu] = Vv), + Fn + ) + }, + Cu = zy() + ls ? (((ls.exports = Cu)._ = Cu), (gu._ = Cu)) : (ns._ = Cu) + }).call(commonjsGlobal) + })(lodash, lodash.exports) + var lodashExports = lodash.exports + const AudioIcon = (tt) => + jsxRuntimeExports.jsx('svg', { + width: '1em', + height: '1em', + viewBox: '0 0 16 16', + fill: 'currentColor', + xmlns: 'http://www.w3.org/2000/svg', + children: jsxRuntimeExports.jsxs('g', { + id: 'Audio', + children: [ + jsxRuntimeExports.jsx('mask', { + id: 'mask0_1506_147', + maskUnits: 'userSpaceOnUse', + x: '0', + y: '0', + width: '16', + height: '16', + children: jsxRuntimeExports.jsx('rect', { + id: 'Bounding box', + width: '1em', + height: '1em', + fill: 'currentColor', + }), + }), + jsxRuntimeExports.jsx('g', { + mask: 'url(#mask0_1506_147)', + children: jsxRuntimeExports.jsx('path', { + id: 'headphones', + d: 'M4.48719 13.6667H3.53851C3.20175 13.6667 2.91671 13.55 2.68337 13.3167C2.45004 13.0833 2.33337 12.7983 2.33337 12.4615V8.00002C2.33337 7.21337 2.4821 6.47654 2.77954 5.78952C3.07697 5.10251 3.48124 4.50345 3.99234 3.99234C4.50345 3.48124 5.10247 3.07697 5.78941 2.77954C6.47634 2.4821 7.21309 2.33337 7.99966 2.33337C8.78622 2.33337 9.5231 2.4821 10.2103 2.77954C10.8975 3.07697 11.4966 3.48124 12.0077 3.99234C12.5188 4.50345 12.9231 5.10251 13.2205 5.78952C13.518 6.47654 13.6667 7.21337 13.6667 8.00002V12.4615C13.6667 12.7983 13.55 13.0833 13.3167 13.3167C13.0833 13.55 12.7983 13.6667 12.4615 13.6667H11.5129C11.1814 13.6667 10.8977 13.5487 10.6617 13.3127C10.4257 13.0767 10.3077 12.793 10.3077 12.4615V10.1539C10.3077 9.82247 10.4257 9.53878 10.6617 9.30278C10.8977 9.06676 11.1814 8.94876 11.5129 8.94876H12.6667V8.00002C12.6667 6.70002 12.2139 5.59725 11.3084 4.69169C10.4028 3.78614 9.30002 3.33336 8.00002 3.33336C6.70002 3.33336 5.59725 3.78614 4.69169 4.69169C3.78614 5.59725 3.33336 6.70002 3.33336 8.00002V8.94876H4.48719C4.8186 8.94876 5.10231 9.06676 5.33831 9.30278C5.57431 9.53878 5.69231 9.82247 5.69231 10.1539V12.4615C5.69231 12.793 5.57431 13.0767 5.33831 13.3127C5.10231 13.5487 4.8186 13.6667 4.48719 13.6667Z', + fill: 'currentColor', + }), + }), + ], + }), + }), + BudgetIcon = (tt) => + jsxRuntimeExports.jsx('svg', { + width: '1em', + height: '1em', + viewBox: '0 0 22 16', + fill: 'currentColor', + xmlns: 'http://www.w3.org/2000/svg', + children: jsxRuntimeExports.jsx('path', { + d: 'M14 16C11.7667 16 9.875 15.225 8.325 13.675C6.775 12.125 6 10.2333 6 8C6 5.76667 6.775 3.875 8.325 2.325C9.875 0.775 11.7667 0 14 0C16.2333 0 18.125 0.775 19.675 2.325C21.225 3.875 22 5.76667 22 8C22 10.2333 21.225 12.125 19.675 13.675C18.125 15.225 16.2333 16 14 16ZM4.625 15.25C3.225 14.6 2.10433 13.625 1.263 12.325C0.421 11.025 0 9.58333 0 8C0 6.41667 0.421 4.975 1.263 3.675C2.10433 2.375 3.225 1.4 4.625 0.75C4.975 0.583333 5.29167 0.595667 5.575 0.787C5.85833 0.979 6 1.29167 6 1.725C6 1.89167 5.946 2.054 5.838 2.212C5.72933 2.37067 5.59167 2.49167 5.425 2.575C4.375 3.05833 3.54167 3.78733 2.925 4.762C2.30833 5.73733 2 6.81667 2 8C2 9.18333 2.30833 10.2623 2.925 11.237C3.54167 12.2123 4.375 12.9417 5.425 13.425C5.59167 13.5083 5.72933 13.625 5.838 13.775C5.946 13.925 6 14.0917 6 14.275C6 14.6917 5.85833 15 5.575 15.2C5.29167 15.4 4.975 15.4167 4.625 15.25ZM14 14C15.6667 14 17.0833 13.4167 18.25 12.25C19.4167 11.0833 20 9.66667 20 8C20 6.33333 19.4167 4.91667 18.25 3.75C17.0833 2.58333 15.6667 2 14 2C12.3333 2 10.9167 2.58333 9.75 3.75C8.58333 4.91667 8 6.33333 8 8C8 9.66667 8.58333 11.0833 9.75 12.25C10.9167 13.4167 12.3333 14 14 14Z', + fill: 'currentColor', + }), + }), + NodesIcon = (tt) => + jsxRuntimeExports.jsx('svg', { + width: '1em', + height: '1em', + viewBox: '0 0 16 16', + fill: 'currentColor', + xmlns: 'http://www.w3.org/2000/svg', + children: jsxRuntimeExports.jsxs('g', { + id: 'Nodes', + children: [ + jsxRuntimeExports.jsx('mask', { + id: 'mask0_1506_141', + maskUnits: 'userSpaceOnUse', + x: '0', + y: '0', + width: '16', + height: '16', + children: jsxRuntimeExports.jsx('rect', { + id: 'Bounding box', + width: '1em', + height: '1em', + fill: 'currentColor', + }), + }), + jsxRuntimeExports.jsx('g', { + mask: 'url(#mask0_1506_141)', + children: jsxRuntimeExports.jsx('path', { + id: 'hub', + d: 'M4.00071 15.1667C3.49166 15.1667 3.05873 14.9886 2.70189 14.6322C2.34506 14.2759 2.16664 13.8432 2.16664 13.3341C2.16664 12.8251 2.3449 12.3922 2.70141 12.0353C3.05793 11.6785 3.49084 11.5001 4.00014 11.5001C4.14275 11.5001 4.28286 11.5178 4.42048 11.5533C4.55808 11.5887 4.68799 11.6364 4.81021 11.6962L6.13204 10.0513C5.85512 9.74962 5.66409 9.41201 5.55896 9.03851C5.45384 8.66501 5.43247 8.28938 5.49486 7.91161L3.57431 7.2757C3.40679 7.54493 3.18652 7.76074 2.91351 7.92313C2.6405 8.08552 2.33598 8.16671 1.99996 8.16671C1.4907 8.16671 1.05784 7.98855 0.701359 7.63221C0.344882 7.27588 0.166637 6.84319 0.166626 6.33415C0.166626 5.8251 0.344793 5.39217 0.701126 5.03533C1.05746 4.6785 1.49015 4.50008 1.99919 4.50008C2.50824 4.50008 2.94118 4.67832 3.29801 5.0348C3.65484 5.39128 3.83326 5.82414 3.83328 6.3334C3.83328 6.37272 3.83221 6.40563 3.83008 6.43211C3.82794 6.45861 3.82688 6.48511 3.82688 6.51161L5.74101 7.177C5.92476 6.83683 6.17711 6.54496 6.49806 6.30138C6.81899 6.05779 7.18715 5.90138 7.60253 5.83215V3.78595C7.17347 3.68509 6.82689 3.46821 6.56279 3.13531C6.29869 2.80241 6.16664 2.42312 6.16664 1.99742C6.16664 1.49064 6.34481 1.05883 6.70114 0.701999C7.05748 0.345166 7.49016 0.166748 7.99921 0.166748C8.50825 0.166748 8.94119 0.344987 9.29803 0.701465C9.65486 1.05794 9.83328 1.49081 9.83328 2.00007C9.83328 2.424 9.69951 2.80241 9.43199 3.13531C9.16448 3.46821 8.81961 3.68509 8.39739 3.78595V5.83215C8.81277 5.90138 9.17986 6.05779 9.49866 6.30138C9.81746 6.54496 10.0709 6.83683 10.2589 7.177L12.173 6.51161C12.1688 6.48084 12.1666 6.45327 12.1666 6.42892V6.3334C12.1666 5.82414 12.3448 5.39128 12.7011 5.0348C13.0575 4.67832 13.4902 4.50008 13.9992 4.50008C14.5083 4.50008 14.9412 4.67825 15.298 5.03458C15.6549 5.39091 15.8333 5.8236 15.8333 6.33265C15.8333 6.84169 15.655 7.27463 15.2986 7.63146C14.9421 7.9883 14.5092 8.16671 14 8.16671C13.6653 8.16671 13.3594 8.08552 13.0823 7.92313C12.8052 7.76074 12.5863 7.54493 12.4256 7.2757L10.5051 7.91161C10.5674 8.28938 10.5461 8.6633 10.441 9.03338C10.3358 9.40347 10.1448 9.74065 9.86788 10.0449L11.1897 11.6796C11.3119 11.624 11.4418 11.5802 11.5794 11.5481C11.7171 11.5161 11.8572 11.5001 11.9998 11.5001C12.5091 11.5001 12.942 11.6782 13.2985 12.0346C13.655 12.3909 13.8333 12.8236 13.8333 13.3326C13.8333 13.8417 13.6551 14.2746 13.2988 14.6315C12.9424 14.9883 12.5098 15.1667 12.0007 15.1667C11.4917 15.1667 11.0587 14.9885 10.7019 14.632C10.3451 14.2755 10.1666 13.8427 10.1666 13.3334C10.1666 13.1232 10.2006 12.9208 10.2686 12.7264C10.3365 12.5319 10.438 12.3535 10.573 12.1911L9.25123 10.5334C8.8726 10.759 8.45488 10.8718 7.99804 10.8718C7.54121 10.8718 7.12134 10.759 6.73844 10.5334L5.42688 12.1911C5.55764 12.3535 5.65807 12.5319 5.72816 12.7264C5.79824 12.9208 5.83328 13.1232 5.83328 13.3334C5.83328 13.8427 5.65511 14.2755 5.29878 14.632C4.94244 14.9885 4.50975 15.1667 4.00071 15.1667Z', + fill: 'currentColor', + }), + }), + ], + }), + }), + TwitterIcon = (tt) => + jsxRuntimeExports.jsx('svg', { + width: '1em', + height: '1em', + viewBox: '0 0 16 16', + fill: 'currentColor', + xmlns: 'http://www.w3.org/2000/svg', + children: jsxRuntimeExports.jsxs('g', { + id: 'Twitter', + children: [ + jsxRuntimeExports.jsx('mask', { + id: 'mask0_1506_167', + maskUnits: 'userSpaceOnUse', + x: '0', + y: '0', + width: '16', + height: '16', + children: jsxRuntimeExports.jsx('rect', { + id: 'Bounding box', + width: '1em', + height: '1em', + fill: 'currentColor', + }), + }), + jsxRuntimeExports.jsx('g', { + mask: 'url(#mask0_1506_167)', + children: jsxRuntimeExports.jsx('g', { + id: 'X', + children: jsxRuntimeExports.jsx('path', { + id: 'path1009', + d: 'M2.0317 2L7.05085 8.71109L2 14.1675H3.13674L7.55875 9.39033L11.1316 14.1675H15L9.69845 7.07891L14.3997 2H13.263L9.19054 6.39967L5.90008 2H2.0317ZM3.70336 2.83733H5.48051L13.3281 13.33H11.5509L3.70336 2.83733Z', + fill: 'currentColor', + }), + }), + }), + ], + }), + }), + VideoIcon = (tt) => + jsxRuntimeExports.jsx('svg', { + width: '1em', + height: '1em', + viewBox: '0 0 16 16', + fill: 'currentColor', + xmlns: 'http://www.w3.org/2000/svg', + children: jsxRuntimeExports.jsxs('g', { + id: 'Video', + children: [ + jsxRuntimeExports.jsx('mask', { + id: 'mask0_1506_153', + maskUnits: 'userSpaceOnUse', + x: '0', + y: '0', + width: '16', + height: '16', + children: jsxRuntimeExports.jsx('rect', { + id: 'Bounding box', + width: '1em', + height: '1em', + fill: 'currentColor', + }), + }), + jsxRuntimeExports.jsx('g', { + mask: 'url(#mask0_1506_153)', + children: jsxRuntimeExports.jsx('path', { + id: 'Subtract', + 'fill-rule': 'evenodd', + 'clip-rule': 'evenodd', + d: 'M14.3782 3.03719C15.0725 3.22309 15.6201 3.76987 15.8053 4.46427C16.1429 5.72367 16.1429 8.35001 16.1429 8.35001C16.1429 8.35001 16.1429 10.9773 15.8053 12.2358C15.6201 12.9302 15.0725 13.4769 14.3782 13.6628C13.1197 14 8.07143 14 8.07143 14C8.07143 14 3.02403 14 1.76471 13.6628C1.07038 13.4769 0.522808 12.9302 0.337533 12.2358C0 10.9764 0 8.35001 0 8.35001C0 8.35001 0 5.72367 0.337533 4.46427C0.522808 3.76987 1.07038 3.22309 1.76471 3.03719C3.02312 2.70001 8.07143 2.70001 8.07143 2.70001C8.07143 2.70001 13.1197 2.70001 14.3782 3.03719ZM10.4931 8.35003L6.45735 5.9286V10.7715L10.4931 8.35003Z', + fill: 'currentColor', + }), + }), + ], + }), + }), + EpisodeIcon = (tt) => + jsxRuntimeExports.jsx('svg', { + width: '1em', + height: '1em', + viewBox: '0 0 16 12', + fill: 'currentColor', + xmlns: 'http://www.w3.org/2000/svg', + children: jsxRuntimeExports.jsxs('g', { + id: 'Episode', + children: [ + jsxRuntimeExports.jsx('rect', { + id: 'Rectangle 4456', + x: '0.5', + y: '5.625', + width: '1em', + height: '1em', + rx: '0.5', + stroke: 'white', + }), + jsxRuntimeExports.jsx('path', { + id: 'Rectangle 4457', + d: 'M2.0625 3.0625H12.0625C12.6148 3.0625 13.0625 3.51022 13.0625 4.0625V9.9375', + stroke: 'white', + }), + jsxRuntimeExports.jsx('path', { + id: 'Rectangle 4458', + d: 'M4.125 1H14.125C14.6773 1 15.125 1.44772 15.125 2V7.875', + stroke: 'white', + }), + ], + }), + }), + Stats = () => { + const [tt, et] = reactExports.useState(null), + [nt] = useUserStore((it) => [it.budget]) + function rt(it) { + return it === null ? '?' : it.toLocaleString().split(',').join(' ') + } + return ( + reactExports.useEffect(() => { + ;(async () => { + try { + const ot = await api.get('/stats') + ot && + et({ + numAudio: ot.num_audio, + numContributors: ot.num_contributors, + numDaily: ot.num_daily, + numEpisodes: ot.num_episodes, + numNodes: ot.num_nodes, + numTwitterSpace: ot.num_twitter_space, + numVideo: ot.num_video, + }) + } catch { + lodashExports.noop() + } + })() + }, []), + tt + ? jsxRuntimeExports.jsxs(StatisticsContainer, { + children: [ + jsxRuntimeExports.jsxs(StatisticsWrapper, { + children: [ + jsxRuntimeExports.jsxs(Stat, { + children: [ + jsxRuntimeExports.jsx('div', { + className: 'icon', + children: jsxRuntimeExports.jsx(NodesIcon, {}), + }), + jsxRuntimeExports.jsx('div', { className: 'text', children: tt.numNodes }), + ], + }), + jsxRuntimeExports.jsxs(Stat, { + children: [ + jsxRuntimeExports.jsx('div', { + className: 'icon', + children: jsxRuntimeExports.jsx(EpisodeIcon, {}), + }), + jsxRuntimeExports.jsx('div', { className: 'text', children: tt.numEpisodes }), + ], + }), + jsxRuntimeExports.jsxs(Stat, { + children: [ + jsxRuntimeExports.jsx('div', { + className: 'icon', + children: jsxRuntimeExports.jsx(AudioIcon, {}), + }), + jsxRuntimeExports.jsx('div', { className: 'text', children: tt.numAudio }), + ], + }), + jsxRuntimeExports.jsxs(Stat, { + children: [ + jsxRuntimeExports.jsx('div', { + className: 'icon', + children: jsxRuntimeExports.jsx(VideoIcon, {}), + }), + jsxRuntimeExports.jsx('div', { className: 'text', children: tt.numVideo }), + ], + }), + jsxRuntimeExports.jsxs(Stat, { + children: [ + jsxRuntimeExports.jsx('div', { + className: 'icon', + children: jsxRuntimeExports.jsx(TwitterIcon, {}), + }), + jsxRuntimeExports.jsx('div', { className: 'text', children: tt.numTwitterSpace }), + ], + }), + ], + }), + jsxRuntimeExports.jsx(StatisticsBudget, { + children: jsxRuntimeExports.jsxs(Budget, { + children: [ + jsxRuntimeExports.jsx('div', { + className: 'icon', + children: jsxRuntimeExports.jsx(BudgetIcon, {}), + }), + jsxRuntimeExports.jsx('div', { + className: 'text', + children: jsxRuntimeExports.jsxs('p', { + children: [ + `${rt(nt)} `, + ' ', + jsxRuntimeExports.jsx('span', { className: 'budgetUnit', children: 'SAT' }), + ], + }), + }), + ], + }), + }), + ], + }) + : null + ) + }, + StatisticsWrapper = styled$4(Flex).attrs({ align: 'center', direction: 'row', grow: 1, justify: 'flex-start' })``, + StatisticsBudget = styled$4(Flex).attrs({ align: 'center', direction: 'row', grow: 1, justify: 'flex-end' })``, + StatisticsContainer = styled$4(Flex).attrs({ align: 'center', direction: 'row', grow: 1 })` + justify-content: between; +`, + Stat = styled$4(Flex).attrs({ align: 'center', direction: 'row', justify: 'flex-start' })` + color: ${colors.white}; + background: ${colors.BG1}; + padding: 6px 10px 6px 8px; + font-family: Barlow; + font-size: 13px; + font-style: normal; + font-weight: 500; + line-height: 15px; + letter-spacing: 0.78px; + margin: 0 8px; + border-radius: 200px; + + &:hover { + background: ${colors.BUTTON1_PRESS}; + } + + &:active { + background: ${colors.BUTTON1}; + } + + .icon { + margin-right: 8px; + font-size: 16px; + } + + .text { + } +`, + Budget = styled$4(Flex).attrs({ align: 'center', direction: 'row' })` + display: flex; + height: 2.5rem; + padding: 0.75rem 0.9375rem 0.75rem 0.9375rem; + align-items: center; + gap: 0.625rem; + color: ${colors.white}; + background: ${colors.BG1}; + font-family: Barlow; + font-size: 0.75rem; + font-style: normal; + font-weight: 500; + line-height: normal; + letter-spacing: 0.0075rem; + border-radius: 12.5rem; + + &:hover { + background: ${colors.BUTTON1_PRESS}; + } + + &:active { + background: ${colors.BUTTON1}; + } + + .icon { + display: flex; + align-items: center; + justify-content: center; + } + + .budgetUnit { + color: ${colors.GRAY6}; + } + + .text { + display: flex; + align-items: center; + justify-content: center; + } +`, + defaultData$2 = { description: '', mission_statement: '', search_term: '', title: '' }, + AppBar = () => { + const [tt, et] = reactExports.useState(defaultData$2) + return ( + reactExports.useEffect(() => { + ;(async () => { + try { + const rt = await getAboutData() + et(rt) + } catch (rt) { + console.warn(rt) + } + })() + }, []), + jsxRuntimeExports.jsxs(Header$2, { + children: [ + jsxRuntimeExports.jsxs(TitleWrapper, { + children: [ + jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { + children: + tt.title && + jsxRuntimeExports.jsx(Text$3, { className: 'title', color: 'white', children: tt.title }), + }), + jsxRuntimeExports.jsx(Text$3, { className: 'subtitle', children: ' Second Brain' }), + ], + }), + jsxRuntimeExports.jsx(Stats, {}), + ], + }) + ) + }, + Header$2 = styled$4(Flex).attrs({ align: 'center', direction: 'row', grow: 1, justify: 'flex-start' })` + height: 64px; + position: absolute; + top: 0px; + left: 64px; + right: 32px; + transition: opacity 1s; + z-index: 99; + padding: 20px 23px; +`, + TitleWrapper = styled$4.div` + ${media.smallOnly` + display: none; + `} + + width: 367px; + + .title { + color: var(--Primary-Text, #fff); + font-family: Barlow; + font-size: 22px; + font-style: normal; + font-weight: 700; + line-height: 16px; /* 72.727% */ + letter-spacing: 0.22px; + } + + .subtitle { + color: ${colors.GRAY6}; + font-family: Barlow; + font-size: 22px; + font-style: normal; + font-weight: 400; + line-height: 16px; + letter-spacing: 0.22px; + } +` + function r$1(tt) { + var et, + nt, + rt = '' + if (typeof tt == 'string' || typeof tt == 'number') rt += tt + else if (typeof tt == 'object') + if (Array.isArray(tt)) + for (et = 0; et < tt.length; et++) tt[et] && (nt = r$1(tt[et])) && (rt && (rt += ' '), (rt += nt)) + else for (et in tt) tt[et] && (rt && (rt += ' '), (rt += et)) + return rt + } + function clsx() { + for (var tt, et, nt = 0, rt = ''; nt < arguments.length; ) + (tt = arguments[nt++]) && (et = r$1(tt)) && (rt && (rt += ' '), (rt += et)) + return rt + } + const _excluded$F = ['localeText'], + MuiPickersAdapterContext = reactExports.createContext(null), + LocalizationProvider = function (et) { + var nt + const { localeText: rt } = et, + it = _objectWithoutPropertiesLoose$m(et, _excluded$F), + { utils: ot, localeText: at } = + (nt = reactExports.useContext(MuiPickersAdapterContext)) != null ? nt : { utils: void 0, localeText: void 0 }, + st = useThemeProps({ props: it, name: 'MuiLocalizationProvider' }), + { children: lt, dateAdapter: ct, dateFormats: ut, dateLibInstance: ht, adapterLocale: dt, localeText: pt } = st, + mt = reactExports.useMemo(() => _extends$u({}, pt, at, rt), [pt, at, rt]), + gt = reactExports.useMemo(() => { + if (!ct) return ot || null + const vt = new ct({ locale: dt, formats: ut, instance: ht }) + if (!vt.isMUIAdapter) + throw new Error( + [ + 'MUI: The date adapter should be imported from `@mui/x-date-pickers` or `@mui/x-date-pickers-pro`, not from `@date-io`', + "For example, `import { AdapterDayjs } from '@mui/x-date-pickers/AdapterDayjs'` instead of `import AdapterDayjs from '@date-io/dayjs'`", + 'More information on the installation documentation: https://mui.com/x/react-date-pickers/getting-started/#installation', + ].join(` +`), + ) + return vt + }, [ct, dt, ut, ht, ot]), + yt = reactExports.useMemo( + () => + gt ? { minDate: gt.date('1900-01-01T00:00:00.000'), maxDate: gt.date('2099-12-31T00:00:00.000') } : null, + [gt], + ), + bt = reactExports.useMemo(() => ({ utils: gt, defaultDates: yt, localeText: mt }), [yt, gt, mt]) + return jsxRuntimeExports.jsx(MuiPickersAdapterContext.Provider, { value: bt, children: lt }) + }, + getPickersLocalization = (tt) => ({ + components: { MuiLocalizationProvider: { defaultProps: { localeText: _extends$u({}, tt) } } }, + }), + enUSPickers = { + previousMonth: 'Previous month', + nextMonth: 'Next month', + openPreviousView: 'open previous view', + openNextView: 'open next view', + calendarViewSwitchingButtonAriaLabel: (tt) => + tt === 'year' ? 'year view is open, switch to calendar view' : 'calendar view is open, switch to year view', + start: 'Start', + end: 'End', + cancelButtonLabel: 'Cancel', + clearButtonLabel: 'Clear', + okButtonLabel: 'OK', + todayButtonLabel: 'Today', + datePickerToolbarTitle: 'Select date', + dateTimePickerToolbarTitle: 'Select date & time', + timePickerToolbarTitle: 'Select time', + dateRangePickerToolbarTitle: 'Select date range', + clockLabelText: (tt, et, nt) => + `Select ${tt}. ${et === null ? 'No time selected' : `Selected time is ${nt.format(et, 'fullTime')}`}`, + hoursClockNumberText: (tt) => `${tt} hours`, + minutesClockNumberText: (tt) => `${tt} minutes`, + secondsClockNumberText: (tt) => `${tt} seconds`, + selectViewText: (tt) => `Select ${tt}`, + calendarWeekNumberHeaderLabel: 'Week number', + calendarWeekNumberHeaderText: '#', + calendarWeekNumberAriaLabelText: (tt) => `Week ${tt}`, + calendarWeekNumberText: (tt) => `${tt}`, + openDatePickerDialogue: (tt, et) => + tt !== null && et.isValid(tt) ? `Choose date, selected date is ${et.format(tt, 'fullDate')}` : 'Choose date', + openTimePickerDialogue: (tt, et) => + tt !== null && et.isValid(tt) ? `Choose time, selected time is ${et.format(tt, 'fullTime')}` : 'Choose time', + fieldClearLabel: 'Clear value', + timeTableLabel: 'pick time', + dateTableLabel: 'pick date', + fieldYearPlaceholder: (tt) => 'Y'.repeat(tt.digitAmount), + fieldMonthPlaceholder: (tt) => (tt.contentType === 'letter' ? 'MMMM' : 'MM'), + fieldDayPlaceholder: () => 'DD', + fieldWeekDayPlaceholder: (tt) => (tt.contentType === 'letter' ? 'EEEE' : 'EE'), + fieldHoursPlaceholder: () => 'hh', + fieldMinutesPlaceholder: () => 'mm', + fieldSecondsPlaceholder: () => 'ss', + fieldMeridiemPlaceholder: () => 'aa', + }, + DEFAULT_LOCALE = enUSPickers + getPickersLocalization(enUSPickers) + const useLocalizationContext = () => { + const tt = reactExports.useContext(MuiPickersAdapterContext) + if (tt === null) + throw new Error( + [ + 'MUI: Can not find the date and time pickers localization context.', + 'It looks like you forgot to wrap your component in LocalizationProvider.', + 'This can also happen if you are bundling multiple versions of the `@mui/x-date-pickers` package', + ].join(` +`), + ) + if (tt.utils === null) + throw new Error( + [ + 'MUI: Can not find the date and time pickers adapter from its localization context.', + 'It looks like you forgot to pass a `dateAdapter` to your LocalizationProvider.', + ].join(` +`), + ) + const et = reactExports.useMemo(() => _extends$u({}, DEFAULT_LOCALE, tt.localeText), [tt.localeText]) + return reactExports.useMemo(() => _extends$u({}, tt, { localeText: et }), [tt, et]) + }, + useUtils = () => useLocalizationContext().utils, + useDefaultDates = () => useLocalizationContext().defaultDates, + useLocaleText = () => useLocalizationContext().localeText, + useNow = (tt) => { + const et = useUtils(), + nt = reactExports.useRef() + return nt.current === void 0 && (nt.current = et.dateWithTimezone(void 0, tt)), nt.current + }, + ArrowDropDownIcon = createSvgIcon(jsxRuntimeExports.jsx('path', { d: 'M7 10l5 5 5-5z' }), 'ArrowDropDown'), + ArrowLeftIcon = createSvgIcon( + jsxRuntimeExports.jsx('path', { d: 'M15.41 16.59L10.83 12l4.58-4.59L14 6l-6 6 6 6 1.41-1.41z' }), + 'ArrowLeft', + ), + ArrowRightIcon = createSvgIcon( + jsxRuntimeExports.jsx('path', { d: 'M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z' }), + 'ArrowRight', + ), + CalendarIcon = createSvgIcon( + jsxRuntimeExports.jsx('path', { + d: 'M17 12h-5v5h5v-5zM16 1v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2h-1V1h-2zm3 18H5V8h14v11z', + }), + 'Calendar', + ) + createSvgIcon( + jsxRuntimeExports.jsxs(reactExports.Fragment, { + children: [ + jsxRuntimeExports.jsx('path', { + d: 'M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z', + }), + jsxRuntimeExports.jsx('path', { d: 'M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z' }), + ], + }), + 'Clock', + ) + createSvgIcon( + jsxRuntimeExports.jsx('path', { + d: 'M9 11H7v2h2v-2zm4 0h-2v2h2v-2zm4 0h-2v2h2v-2zm2-7h-1V2h-2v2H8V2H6v2H5c-1.11 0-1.99.9-1.99 2L3 20c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 16H5V9h14v11z', + }), + 'DateRange', + ) + createSvgIcon( + jsxRuntimeExports.jsxs(reactExports.Fragment, { + children: [ + jsxRuntimeExports.jsx('path', { + d: 'M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z', + }), + jsxRuntimeExports.jsx('path', { d: 'M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z' }), + ], + }), + 'Time', + ) + const ClearIcon = createSvgIcon( + jsxRuntimeExports.jsx('path', { + d: 'M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z', + }), + 'Clear', + ) + function getPickersArrowSwitcherUtilityClass(tt) { + return generateUtilityClass('MuiPickersArrowSwitcher', tt) + } + generateUtilityClasses('MuiPickersArrowSwitcher', ['root', 'spacer', 'button']) + const _excluded$E = [ + 'children', + 'className', + 'slots', + 'slotProps', + 'isNextDisabled', + 'isNextHidden', + 'onGoToNext', + 'nextLabel', + 'isPreviousDisabled', + 'isPreviousHidden', + 'onGoToPrevious', + 'previousLabel', + ], + _excluded2$b = ['ownerState'], + _excluded3$3 = ['ownerState'], + PickersArrowSwitcherRoot = styled$1('div', { + name: 'MuiPickersArrowSwitcher', + slot: 'Root', + overridesResolver: (tt, et) => et.root, + })({ display: 'flex' }), + PickersArrowSwitcherSpacer = styled$1('div', { + name: 'MuiPickersArrowSwitcher', + slot: 'Spacer', + overridesResolver: (tt, et) => et.spacer, + })(({ theme: tt }) => ({ width: tt.spacing(3) })), + PickersArrowSwitcherButton = styled$1(IconButton$2, { + name: 'MuiPickersArrowSwitcher', + slot: 'Button', + overridesResolver: (tt, et) => et.button, + })(({ ownerState: tt }) => _extends$u({}, tt.hidden && { visibility: 'hidden' })), + useUtilityClasses$f = (tt) => { + const { classes: et } = tt + return composeClasses( + { root: ['root'], spacer: ['spacer'], button: ['button'] }, + getPickersArrowSwitcherUtilityClass, + et, + ) + }, + PickersArrowSwitcher = reactExports.forwardRef(function (et, nt) { + var rt, it, ot, at + const lt = useTheme().direction === 'rtl', + ct = useThemeProps({ props: et, name: 'MuiPickersArrowSwitcher' }), + { + children: ut, + className: ht, + slots: dt, + slotProps: pt, + isNextDisabled: mt, + isNextHidden: gt, + onGoToNext: yt, + nextLabel: bt, + isPreviousDisabled: vt, + isPreviousHidden: xt, + onGoToPrevious: kt, + previousLabel: St, + } = ct, + Tt = _objectWithoutPropertiesLoose$m(ct, _excluded$E), + At = ct, + Et = useUtilityClasses$f(At), + $t = { isDisabled: mt, isHidden: gt, goTo: yt, label: bt }, + Dt = { isDisabled: vt, isHidden: xt, goTo: kt, label: St }, + jt = (rt = dt == null ? void 0 : dt.previousIconButton) != null ? rt : PickersArrowSwitcherButton, + Pt = useSlotProps({ + elementType: jt, + externalSlotProps: pt == null ? void 0 : pt.previousIconButton, + additionalProps: { + size: 'medium', + title: Dt.label, + 'aria-label': Dt.label, + disabled: Dt.isDisabled, + edge: 'end', + onClick: Dt.goTo, + }, + ownerState: _extends$u({}, At, { hidden: Dt.isHidden }), + className: Et.button, + }), + Ct = (it = dt == null ? void 0 : dt.nextIconButton) != null ? it : PickersArrowSwitcherButton, + wt = useSlotProps({ + elementType: Ct, + externalSlotProps: pt == null ? void 0 : pt.nextIconButton, + additionalProps: { + size: 'medium', + title: $t.label, + 'aria-label': $t.label, + disabled: $t.isDisabled, + edge: 'start', + onClick: $t.goTo, + }, + ownerState: _extends$u({}, At, { hidden: $t.isHidden }), + className: Et.button, + }), + It = (ot = dt == null ? void 0 : dt.leftArrowIcon) != null ? ot : ArrowLeftIcon, + Ot = useSlotProps({ + elementType: It, + externalSlotProps: pt == null ? void 0 : pt.leftArrowIcon, + additionalProps: { fontSize: 'inherit' }, + ownerState: void 0, + }), + Wt = _objectWithoutPropertiesLoose$m(Ot, _excluded2$b), + zt = (at = dt == null ? void 0 : dt.rightArrowIcon) != null ? at : ArrowRightIcon, + Ft = useSlotProps({ + elementType: zt, + externalSlotProps: pt == null ? void 0 : pt.rightArrowIcon, + additionalProps: { fontSize: 'inherit' }, + ownerState: void 0, + }), + Nt = _objectWithoutPropertiesLoose$m(Ft, _excluded3$3) + return jsxRuntimeExports.jsxs( + PickersArrowSwitcherRoot, + _extends$u({ ref: nt, className: clsx(Et.root, ht), ownerState: At }, Tt, { + children: [ + jsxRuntimeExports.jsx( + jt, + _extends$u({}, Pt, { + children: lt + ? jsxRuntimeExports.jsx(zt, _extends$u({}, Nt)) + : jsxRuntimeExports.jsx(It, _extends$u({}, Wt)), + }), + ), + ut + ? jsxRuntimeExports.jsx(Typography$1, { variant: 'subtitle1', component: 'span', children: ut }) + : jsxRuntimeExports.jsx(PickersArrowSwitcherSpacer, { className: Et.spacer, ownerState: At }), + jsxRuntimeExports.jsx( + Ct, + _extends$u({}, wt, { + children: lt + ? jsxRuntimeExports.jsx(It, _extends$u({}, Wt)) + : jsxRuntimeExports.jsx(zt, _extends$u({}, Nt)), + }), + ), + ], + }), + ) + }), + areViewsEqual = (tt, et) => (tt.length !== et.length ? !1 : et.every((nt) => tt.includes(nt))), + applyDefaultViewProps = ({ openTo: tt, defaultOpenTo: et, views: nt, defaultViews: rt }) => { + const it = nt ?? rt + let ot + if (tt != null) ot = tt + else if (it.includes(et)) ot = et + else if (it.length > 0) ot = it[0] + else throw new Error('MUI: The `views` prop must contain at least one view') + return { views: it, openTo: ot } + }, + timeViews = ['hours', 'minutes', 'seconds'], + isTimeView = (tt) => timeViews.includes(tt), + getSecondsInDay = (tt, et) => et.getHours(tt) * 3600 + et.getMinutes(tt) * 60 + et.getSeconds(tt), + createIsAfterIgnoreDatePart = (tt, et) => (nt, rt) => + tt ? et.isAfter(nt, rt) : getSecondsInDay(nt, et) > getSecondsInDay(rt, et) + function useViews({ + onChange: tt, + onViewChange: et, + openTo: nt, + view: rt, + views: it, + autoFocus: ot, + focusedView: at, + onFocusedViewChange: st, + }) { + var lt, ct + const ut = reactExports.useRef(nt), + ht = reactExports.useRef(it), + dt = reactExports.useRef(it.includes(nt) ? nt : it[0]), + [pt, mt] = useControlled({ name: 'useViews', state: 'view', controlled: rt, default: dt.current }), + gt = reactExports.useRef(ot ? pt : null), + [yt, bt] = useControlled({ name: 'useViews', state: 'focusedView', controlled: at, default: gt.current }) + reactExports.useEffect(() => { + ;((ut.current && ut.current !== nt) || (ht.current && ht.current.some((Dt) => !it.includes(Dt)))) && + (mt(it.includes(nt) ? nt : it[0]), (ht.current = it), (ut.current = nt)) + }, [nt, mt, pt, it]) + const vt = it.indexOf(pt), + xt = (lt = it[vt - 1]) != null ? lt : null, + kt = (ct = it[vt + 1]) != null ? ct : null, + St = useEventCallback((Dt, jt) => { + bt(jt ? Dt : (Pt) => (Dt === Pt ? null : Pt)), st == null || st(Dt, jt) + }), + Tt = useEventCallback((Dt) => { + Dt !== pt && (mt(Dt), St(Dt, !0), et && et(Dt)) + }), + At = useEventCallback(() => { + kt && Tt(kt), St(kt, !0) + }), + Et = useEventCallback((Dt, jt, Pt) => { + const Ct = jt === 'finish', + wt = Pt ? it.indexOf(Pt) < it.length - 1 : !!kt + tt(Dt, Ct && wt ? 'partial' : jt), Ct && At() + }), + $t = useEventCallback((Dt, jt, Pt) => { + tt(Dt, jt ? 'partial' : 'finish', Pt), jt && (Tt(jt), St(jt, !0)) + }) + return { + view: pt, + setView: Tt, + focusedView: yt, + setFocusedView: St, + nextView: kt, + previousView: xt, + defaultView: dt.current, + goToNextView: At, + setValueAndGoToNextView: Et, + setValueAndGoToView: $t, + } + } + function useNextMonthDisabled(tt, { disableFuture: et, maxDate: nt, timezone: rt }) { + const it = useUtils() + return reactExports.useMemo(() => { + const ot = it.dateWithTimezone(void 0, rt), + at = it.startOfMonth(et && it.isBefore(ot, nt) ? ot : nt) + return !it.isAfter(at, tt) + }, [et, nt, tt, it, rt]) + } + function usePreviousMonthDisabled(tt, { disablePast: et, minDate: nt, timezone: rt }) { + const it = useUtils() + return reactExports.useMemo(() => { + const ot = it.dateWithTimezone(void 0, rt), + at = it.startOfMonth(et && it.isAfter(ot, nt) ? ot : nt) + return !it.isBefore(at, tt) + }, [et, nt, tt, it, rt]) + } + const DAY_SIZE = 36, + DAY_MARGIN = 2, + DIALOG_WIDTH = 320, + MAX_CALENDAR_HEIGHT = 280, + VIEW_HEIGHT = 334, + PickerViewRoot = styled$1('div')({ + overflow: 'hidden', + width: DIALOG_WIDTH, + maxHeight: VIEW_HEIGHT, + display: 'flex', + flexDirection: 'column', + margin: '0 auto', + }), + findClosestEnabledDate = ({ + date: tt, + disableFuture: et, + disablePast: nt, + maxDate: rt, + minDate: it, + isDateDisabled: ot, + utils: at, + timezone: st, + }) => { + const lt = at.startOfDay(at.dateWithTimezone(void 0, st)) + nt && at.isBefore(it, lt) && (it = lt), et && at.isAfter(rt, lt) && (rt = lt) + let ct = tt, + ut = tt + for ( + at.isBefore(tt, it) && ((ct = it), (ut = null)), at.isAfter(tt, rt) && (ut && (ut = rt), (ct = null)); + ct || ut; + + ) { + if ((ct && at.isAfter(ct, rt) && (ct = null), ut && at.isBefore(ut, it) && (ut = null), ct)) { + if (!ot(ct)) return ct + ct = at.addDays(ct, 1) + } + if (ut) { + if (!ot(ut)) return ut + ut = at.addDays(ut, -1) + } + } + return null + }, + replaceInvalidDateByNull = (tt, et) => (et == null || !tt.isValid(et) ? null : et), + applyDefaultDate = (tt, et, nt) => (et == null || !tt.isValid(et) ? nt : et), + areDatesEqual$1 = (tt, et, nt) => + !tt.isValid(et) && et != null && !tt.isValid(nt) && nt != null ? !0 : tt.isEqual(et, nt), + getMonthsInYear = (tt, et) => { + const rt = [tt.startOfYear(et)] + for (; rt.length < 12; ) { + const it = rt[rt.length - 1] + rt.push(tt.addMonths(it, 1)) + } + return rt + }, + mergeDateAndTime = (tt, et, nt) => { + let rt = et + return ( + (rt = tt.setHours(rt, tt.getHours(nt))), + (rt = tt.setMinutes(rt, tt.getMinutes(nt))), + (rt = tt.setSeconds(rt, tt.getSeconds(nt))), + rt + ) + }, + getTodayDate = (tt, et, nt) => + nt === 'date' ? tt.startOfDay(tt.dateWithTimezone(void 0, et)) : tt.dateWithTimezone(void 0, et), + dateViews = ['year', 'month', 'day'], + isDatePickerView = (tt) => dateViews.includes(tt), + resolveDateFormat = (tt, { format: et, views: nt }, rt) => { + if (et != null) return et + const it = tt.formats + return areViewsEqual(nt, ['year']) + ? it.year + : areViewsEqual(nt, ['month']) + ? it.month + : areViewsEqual(nt, ['day']) + ? it.dayOfMonth + : areViewsEqual(nt, ['month', 'year']) + ? `${it.month} ${it.year}` + : areViewsEqual(nt, ['day', 'month']) + ? `${it.month} ${it.dayOfMonth}` + : rt + ? /en/.test(tt.getCurrentLocaleCode()) + ? it.normalDateWithWeekday + : it.normalDate + : it.keyboardDate + }, + getWeekdays = (tt, et) => { + const nt = tt.startOfWeek(et) + return [0, 1, 2, 3, 4, 5, 6].map((rt) => tt.addDays(nt, rt)) + }, + useValueWithTimezone = ({ timezone: tt, value: et, defaultValue: nt, onChange: rt, valueManager: it }) => { + var ot, at + const st = useUtils(), + lt = reactExports.useRef(nt), + ct = (ot = et ?? lt.current) != null ? ot : it.emptyValue, + ut = reactExports.useMemo(() => it.getTimezone(st, ct), [st, it, ct]), + ht = useEventCallback((gt) => (ut == null ? gt : it.setTimezone(st, ut, gt))), + dt = (at = tt ?? ut) != null ? at : 'default', + pt = reactExports.useMemo(() => it.setTimezone(st, dt, ct), [it, st, dt, ct]), + mt = useEventCallback((gt, ...yt) => { + const bt = ht(gt) + rt == null || rt(bt, ...yt) + }) + return { value: pt, handleValueChange: mt, timezone: dt } + }, + useControlledValueWithTimezone = ({ + name: tt, + timezone: et, + value: nt, + defaultValue: rt, + onChange: it, + valueManager: ot, + }) => { + const [at, st] = useControlled({ name: tt, state: 'value', controlled: nt, default: rt ?? ot.emptyValue }), + lt = useEventCallback((ct, ...ut) => { + st(ct), it == null || it(ct, ...ut) + }) + return useValueWithTimezone({ timezone: et, value: at, defaultValue: void 0, onChange: lt, valueManager: ot }) + }, + SECTION_TYPE_GRANULARITY = { year: 1, month: 2, day: 3, hours: 4, minutes: 5, seconds: 6, milliseconds: 7 }, + getSectionTypeGranularity = (tt) => + Math.max( + ...tt.map((et) => { + var nt + return (nt = SECTION_TYPE_GRANULARITY[et.type]) != null ? nt : 1 + }), + ), + roundDate = (tt, et, nt) => { + if (et === SECTION_TYPE_GRANULARITY.year) return tt.startOfYear(nt) + if (et === SECTION_TYPE_GRANULARITY.month) return tt.startOfMonth(nt) + if (et === SECTION_TYPE_GRANULARITY.day) return tt.startOfDay(nt) + let rt = nt + return ( + et < SECTION_TYPE_GRANULARITY.minutes && (rt = tt.setMinutes(rt, 0)), + et < SECTION_TYPE_GRANULARITY.seconds && (rt = tt.setSeconds(rt, 0)), + et < SECTION_TYPE_GRANULARITY.milliseconds && (rt = tt.setMilliseconds(rt, 0)), + rt + ) + }, + getDefaultReferenceDate = ({ props: tt, utils: et, granularity: nt, timezone: rt, getTodayDate: it }) => { + var ot + let at = it ? it() : roundDate(et, nt, getTodayDate(et, rt)) + tt.minDate != null && et.isAfterDay(tt.minDate, at) && (at = roundDate(et, nt, tt.minDate)), + tt.maxDate != null && et.isBeforeDay(tt.maxDate, at) && (at = roundDate(et, nt, tt.maxDate)) + const st = createIsAfterIgnoreDatePart((ot = tt.disableIgnoringDatePartForTimeValidation) != null ? ot : !1, et) + return ( + tt.minTime != null && + st(tt.minTime, at) && + (at = roundDate( + et, + nt, + tt.disableIgnoringDatePartForTimeValidation ? tt.minTime : mergeDateAndTime(et, at, tt.minTime), + )), + tt.maxTime != null && + st(at, tt.maxTime) && + (at = roundDate( + et, + nt, + tt.disableIgnoringDatePartForTimeValidation ? tt.maxTime : mergeDateAndTime(et, at, tt.maxTime), + )), + at + ) + }, + getDateSectionConfigFromFormatToken = (tt, et) => { + const nt = tt.formatTokenMap[et] + if (nt == null) + throw new Error( + [ + `MUI: The token "${et}" is not supported by the Date and Time Pickers.`, + 'Please try using another token or open an issue on https://github.com/mui/mui-x/issues/new/choose if you think it should be supported.', + ].join(` +`), + ) + return typeof nt == 'string' + ? { type: nt, contentType: nt === 'meridiem' ? 'letter' : 'digit', maxLength: void 0 } + : { type: nt.sectionType, contentType: nt.contentType, maxLength: nt.maxLength } + }, + getDeltaFromKeyCode = (tt) => { + switch (tt) { + case 'ArrowUp': + return 1 + case 'ArrowDown': + return -1 + case 'PageUp': + return 5 + case 'PageDown': + return -5 + default: + return 0 + } + }, + getDaysInWeekStr = (tt, et, nt) => { + const rt = [], + it = tt.dateWithTimezone(void 0, et), + ot = tt.startOfWeek(it), + at = tt.endOfWeek(it) + let st = ot + for (; tt.isBefore(st, at); ) rt.push(st), (st = tt.addDays(st, 1)) + return rt.map((lt) => tt.formatByString(lt, nt)) + }, + getLetterEditingOptions = (tt, et, nt, rt) => { + switch (nt) { + case 'month': + return getMonthsInYear(tt, tt.dateWithTimezone(void 0, et)).map((it) => tt.formatByString(it, rt)) + case 'weekDay': + return getDaysInWeekStr(tt, et, rt) + case 'meridiem': { + const it = tt.dateWithTimezone(void 0, et) + return [tt.startOfDay(it), tt.endOfDay(it)].map((ot) => tt.formatByString(ot, rt)) + } + default: + return [] + } + }, + cleanLeadingZeros = (tt, et, nt) => { + let rt = et + for (rt = Number(rt).toString(); rt.length < nt; ) rt = `0${rt}` + return rt + }, + cleanDigitSectionValue = (tt, et, nt, rt, it) => { + if (it.type === 'day' && it.contentType === 'digit-with-letter') { + const at = tt.setDate(rt.longestMonth, nt) + return tt.formatByString(at, it.format) + } + const ot = nt.toString() + return it.hasLeadingZerosInInput ? cleanLeadingZeros(tt, ot, it.maxLength) : ot + }, + adjustSectionValue = (tt, et, nt, rt, it, ot, at) => { + const st = getDeltaFromKeyCode(rt), + lt = rt === 'Home', + ct = rt === 'End', + ut = nt.value === '' || lt || ct, + ht = () => { + const pt = it[nt.type]({ currentDate: ot, format: nt.format, contentType: nt.contentType }), + mt = (vt) => cleanDigitSectionValue(tt, et, vt, pt, nt), + gt = nt.type === 'minutes' && at != null && at.minutesStep ? at.minutesStep : 1 + let bt = parseInt(nt.value, 10) + st * gt + if (ut) { + if (nt.type === 'year' && !ct && !lt) return tt.formatByString(tt.dateWithTimezone(void 0, et), nt.format) + st > 0 || lt ? (bt = pt.minimum) : (bt = pt.maximum) + } + return ( + bt % gt !== 0 && ((st < 0 || lt) && (bt += gt - ((gt + bt) % gt)), (st > 0 || ct) && (bt -= bt % gt)), + bt > pt.maximum + ? mt(pt.minimum + ((bt - pt.maximum - 1) % (pt.maximum - pt.minimum + 1))) + : bt < pt.minimum + ? mt(pt.maximum - ((pt.minimum - bt - 1) % (pt.maximum - pt.minimum + 1))) + : mt(bt) + ) + }, + dt = () => { + const pt = getLetterEditingOptions(tt, et, nt.type, nt.format) + if (pt.length === 0) return nt.value + if (ut) return st > 0 || lt ? pt[0] : pt[pt.length - 1] + const gt = (pt.indexOf(nt.value) + pt.length + st) % pt.length + return pt[gt] + } + return nt.contentType === 'digit' || nt.contentType === 'digit-with-letter' ? ht() : dt() + }, + getSectionVisibleValue = (tt, et) => { + let nt = tt.value || tt.placeholder + const rt = et === 'non-input' ? tt.hasLeadingZerosInFormat : tt.hasLeadingZerosInInput + return ( + et === 'non-input' && tt.hasLeadingZerosInInput && !tt.hasLeadingZerosInFormat && (nt = Number(nt).toString()), + ['input-rtl', 'input-ltr'].includes(et) && + tt.contentType === 'digit' && + !rt && + nt.length === 1 && + (nt = `${nt}‎`), + et === 'input-rtl' && (nt = `⁨${nt}⁩`), + nt + ) + }, + cleanString = (tt) => tt.replace(/[\u2066\u2067\u2068\u2069]/g, ''), + addPositionPropertiesToSections = (tt, et) => { + let nt = 0, + rt = et ? 1 : 0 + const it = [] + for (let ot = 0; ot < tt.length; ot += 1) { + const at = tt[ot], + st = getSectionVisibleValue(at, et ? 'input-rtl' : 'input-ltr'), + lt = `${at.startSeparator}${st}${at.endSeparator}`, + ct = cleanString(lt).length, + ut = lt.length, + ht = cleanString(st), + dt = rt + st.indexOf(ht[0]) + at.startSeparator.length, + pt = dt + ht.length + it.push(_extends$u({}, at, { start: nt, end: nt + ct, startInInput: dt, endInInput: pt })), + (nt += ct), + (rt += ut) + } + return it + }, + getSectionPlaceholder = (tt, et, nt, rt, it) => { + switch (rt.type) { + case 'year': + return nt.fieldYearPlaceholder({ digitAmount: tt.formatByString(tt.dateWithTimezone(void 0, et), it).length }) + case 'month': + return nt.fieldMonthPlaceholder({ contentType: rt.contentType }) + case 'day': + return nt.fieldDayPlaceholder() + case 'weekDay': + return nt.fieldWeekDayPlaceholder({ contentType: rt.contentType }) + case 'hours': + return nt.fieldHoursPlaceholder() + case 'minutes': + return nt.fieldMinutesPlaceholder() + case 'seconds': + return nt.fieldSecondsPlaceholder() + case 'meridiem': + return nt.fieldMeridiemPlaceholder() + default: + return it + } + }, + changeSectionValueFormat = (tt, et, nt, rt) => tt.formatByString(tt.parse(et, nt), rt), + isFourDigitYearFormat = (tt, et, nt) => tt.formatByString(tt.dateWithTimezone(void 0, et), nt).length === 4, + doesSectionFormatHaveLeadingZeros = (tt, et, nt, rt, it) => { + if (nt !== 'digit') return !1 + const ot = tt.dateWithTimezone(void 0, et) + switch (rt) { + case 'year': + return isFourDigitYearFormat(tt, et, it) + ? tt.formatByString(tt.setYear(ot, 1), it) === '0001' + : tt.formatByString(tt.setYear(ot, 2001), it) === '01' + case 'month': + return tt.formatByString(tt.startOfYear(ot), it).length > 1 + case 'day': + return tt.formatByString(tt.startOfMonth(ot), it).length > 1 + case 'weekDay': + return tt.formatByString(tt.startOfWeek(ot), it).length > 1 + case 'hours': + return tt.formatByString(tt.setHours(ot, 1), it).length > 1 + case 'minutes': + return tt.formatByString(tt.setMinutes(ot, 1), it).length > 1 + case 'seconds': + return tt.formatByString(tt.setMinutes(ot, 1), it).length > 1 + default: + throw new Error('Invalid section type') + } + }, + getEscapedPartsFromFormat = (tt, et) => { + const nt = [], + { start: rt, end: it } = tt.escapedCharacters, + ot = new RegExp(`(\\${rt}[^\\${it}]*\\${it})+`, 'g') + let at = null + for (; (at = ot.exec(et)); ) nt.push({ start: at.index, end: ot.lastIndex - 1 }) + return nt + }, + splitFormatIntoSections = (tt, et, nt, rt, it, ot, at, st) => { + let lt = '' + const ct = [], + ut = tt.date(), + ht = (xt) => { + if (xt === '') return null + const kt = getDateSectionConfigFromFormatToken(tt, xt), + St = doesSectionFormatHaveLeadingZeros(tt, et, kt.contentType, kt.type, xt), + Tt = at ? St : kt.contentType === 'digit', + At = it != null && tt.isValid(it) + let Et = At ? tt.formatByString(it, xt) : '', + $t = null + if (Tt) + if (St) $t = Et === '' ? tt.formatByString(ut, xt).length : Et.length + else { + if (kt.maxLength == null) + throw new Error(`MUI: The token ${xt} should have a 'maxDigitNumber' property on it's adapter`) + ;($t = kt.maxLength), At && (Et = cleanLeadingZeros(tt, Et, $t)) + } + return ( + ct.push( + _extends$u({}, kt, { + format: xt, + maxLength: $t, + value: Et, + placeholder: getSectionPlaceholder(tt, et, nt, kt, xt), + hasLeadingZeros: St, + hasLeadingZerosInFormat: St, + hasLeadingZerosInInput: Tt, + startSeparator: ct.length === 0 ? lt : '', + endSeparator: '', + modified: !1, + }), + ), + null + ) + } + let dt = 10, + pt = rt, + mt = tt.expandFormat(rt) + for (; mt !== pt; ) + if (((pt = mt), (mt = tt.expandFormat(pt)), (dt -= 1), dt < 0)) + throw new Error( + 'MUI: The format expansion seems to be enter in an infinite loop. Please open an issue with the format passed to the picker component', + ) + const gt = mt, + yt = getEscapedPartsFromFormat(tt, gt), + bt = new RegExp( + `^(${Object.keys(tt.formatTokenMap) + .sort((xt, kt) => kt.length - xt.length) + .join('|')})`, + 'g', + ) + let vt = '' + for (let xt = 0; xt < gt.length; xt += 1) { + const kt = yt.find(($t) => $t.start <= xt && $t.end >= xt), + St = gt[xt], + Tt = kt != null, + At = `${vt}${gt.slice(xt)}`, + Et = bt.test(At) + !Tt && St.match(/([A-Za-z]+)/) && Et + ? ((vt = At.slice(0, bt.lastIndex)), (xt += bt.lastIndex - 1)) + : (Tt && (kt == null ? void 0 : kt.start) === xt) || + (kt == null ? void 0 : kt.end) === xt || + (ht(vt), (vt = ''), ct.length === 0 ? (lt += St) : (ct[ct.length - 1].endSeparator += St)) + } + return ( + ht(vt), + ct.map((xt) => { + const kt = (St) => { + let Tt = St + return ( + st && Tt !== null && Tt.includes(' ') && (Tt = `⁩${Tt}⁦`), + ot === 'spacious' && ['/', '.', '-'].includes(Tt) && (Tt = ` ${Tt} `), + Tt + ) + } + return (xt.startSeparator = kt(xt.startSeparator)), (xt.endSeparator = kt(xt.endSeparator)), xt + }) + ) + }, + getDateFromDateSections = (tt, et) => { + const nt = et.some((st) => st.type === 'day'), + rt = [], + it = [] + for (let st = 0; st < et.length; st += 1) { + const lt = et[st] + ;(nt && lt.type === 'weekDay') || (rt.push(lt.format), it.push(getSectionVisibleValue(lt, 'non-input'))) + } + const ot = rt.join(' '), + at = it.join(' ') + return tt.parse(at, ot) + }, + createDateStrForInputFromSections = (tt, et) => { + const rt = tt + .map((it) => { + const ot = getSectionVisibleValue(it, et ? 'input-rtl' : 'input-ltr') + return `${it.startSeparator}${ot}${it.endSeparator}` + }) + .join('') + return et ? `⁦${rt}⁩` : rt + }, + getSectionsBoundaries = (tt, et) => { + const nt = tt.dateWithTimezone(void 0, et), + rt = tt.endOfYear(nt), + it = tt.endOfDay(nt), + { maxDaysInMonth: ot, longestMonth: at } = getMonthsInYear(tt, nt).reduce( + (st, lt) => { + const ct = tt.getDaysInMonth(lt) + return ct > st.maxDaysInMonth ? { maxDaysInMonth: ct, longestMonth: lt } : st + }, + { maxDaysInMonth: 0, longestMonth: null }, + ) + return { + year: ({ format: st }) => ({ minimum: 0, maximum: isFourDigitYearFormat(tt, et, st) ? 9999 : 99 }), + month: () => ({ minimum: 1, maximum: tt.getMonth(rt) + 1 }), + day: ({ currentDate: st }) => ({ + minimum: 1, + maximum: st != null && tt.isValid(st) ? tt.getDaysInMonth(st) : ot, + longestMonth: at, + }), + weekDay: ({ format: st, contentType: lt }) => { + if (lt === 'digit') { + const ct = getDaysInWeekStr(tt, et, st).map(Number) + return { minimum: Math.min(...ct), maximum: Math.max(...ct) } + } + return { minimum: 1, maximum: 7 } + }, + hours: ({ format: st }) => { + const lt = tt.getHours(it) + return tt.formatByString(tt.endOfDay(nt), st) !== lt.toString() + ? { minimum: 1, maximum: Number(tt.formatByString(tt.startOfDay(nt), st)) } + : { minimum: 0, maximum: lt } + }, + minutes: () => ({ minimum: 0, maximum: tt.getMinutes(it) }), + seconds: () => ({ minimum: 0, maximum: tt.getSeconds(it) }), + meridiem: () => ({ minimum: 0, maximum: 0 }), + } + }, + transferDateSectionValue = (tt, et, nt, rt, it) => { + switch (nt.type) { + case 'year': + return tt.setYear(it, tt.getYear(rt)) + case 'month': + return tt.setMonth(it, tt.getMonth(rt)) + case 'weekDay': { + const ot = getDaysInWeekStr(tt, et, nt.format), + at = tt.formatByString(rt, nt.format), + st = ot.indexOf(at), + ct = ot.indexOf(nt.value) - st + return tt.addDays(rt, ct) + } + case 'day': + return tt.setDate(it, tt.getDate(rt)) + case 'meridiem': { + const ot = tt.getHours(rt) < 12, + at = tt.getHours(it) + return ot && at >= 12 ? tt.addHours(it, -12) : !ot && at < 12 ? tt.addHours(it, 12) : it + } + case 'hours': + return tt.setHours(it, tt.getHours(rt)) + case 'minutes': + return tt.setMinutes(it, tt.getMinutes(rt)) + case 'seconds': + return tt.setSeconds(it, tt.getSeconds(rt)) + default: + return it + } + }, + reliableSectionModificationOrder = { + year: 1, + month: 2, + day: 3, + weekDay: 4, + hours: 5, + minutes: 6, + seconds: 7, + meridiem: 8, + }, + mergeDateIntoReferenceDate = (tt, et, nt, rt, it, ot) => + [...rt] + .sort((at, st) => reliableSectionModificationOrder[at.type] - reliableSectionModificationOrder[st.type]) + .reduce((at, st) => (!ot || st.modified ? transferDateSectionValue(tt, et, st, nt, at) : at), it), + isAndroid = () => navigator.userAgent.toLowerCase().indexOf('android') > -1, + getSectionOrder = (tt, et) => { + const nt = {} + if (!et) + return ( + tt.forEach((lt, ct) => { + const ut = ct === 0 ? null : ct - 1, + ht = ct === tt.length - 1 ? null : ct + 1 + nt[ct] = { leftIndex: ut, rightIndex: ht } + }), + { neighbors: nt, startIndex: 0, endIndex: tt.length - 1 } + ) + const rt = {}, + it = {} + let ot = 0, + at = 0, + st = tt.length - 1 + for (; st >= 0; ) { + ;(at = tt.findIndex((lt, ct) => { + var ut + return ct >= ot && ((ut = lt.endSeparator) == null ? void 0 : ut.includes(' ')) && lt.endSeparator !== ' / ' + })), + at === -1 && (at = tt.length - 1) + for (let lt = at; lt >= ot; lt -= 1) (it[lt] = st), (rt[st] = lt), (st -= 1) + ot = at + 1 + } + return ( + tt.forEach((lt, ct) => { + const ut = it[ct], + ht = ut === 0 ? null : rt[ut - 1], + dt = ut === tt.length - 1 ? null : rt[ut + 1] + nt[ct] = { leftIndex: ht, rightIndex: dt } + }), + { neighbors: nt, startIndex: rt[0], endIndex: rt[tt.length - 1] } + ) + }, + _excluded$D = ['value', 'referenceDate'], + singleItemValueManager = { + emptyValue: null, + getTodayValue: getTodayDate, + getInitialReferenceValue: (tt) => { + let { value: et, referenceDate: nt } = tt, + rt = _objectWithoutPropertiesLoose$m(tt, _excluded$D) + return et != null && rt.utils.isValid(et) ? et : nt ?? getDefaultReferenceDate(rt) + }, + cleanValue: replaceInvalidDateByNull, + areValuesEqual: areDatesEqual$1, + isSameError: (tt, et) => tt === et, + hasError: (tt) => tt != null, + defaultErrorState: null, + getTimezone: (tt, et) => (et == null || !tt.isValid(et) ? null : tt.getTimezone(et)), + setTimezone: (tt, et, nt) => (nt == null ? null : tt.setTimezone(nt, et)), + }, + singleItemFieldValueManager = { + updateReferenceValue: (tt, et, nt) => (et == null || !tt.isValid(et) ? nt : et), + getSectionsFromValue: (tt, et, nt, rt, it) => + !tt.isValid(et) && !!nt ? nt : addPositionPropertiesToSections(it(et), rt), + getValueStrFromSections: createDateStrForInputFromSections, + getActiveDateManager: (tt, et) => ({ + date: et.value, + referenceDate: et.referenceValue, + getSections: (nt) => nt, + getNewValuesFromNewActiveDate: (nt) => ({ + value: nt, + referenceValue: nt == null || !tt.isValid(nt) ? et.referenceValue : nt, + }), + }), + parseValueStr: (tt, et, nt) => nt(tt.trim(), et), + }, + uncapitalizeObjectKeys = (tt) => { + if (tt !== void 0) + return Object.keys(tt).reduce( + (et, nt) => _extends$u({}, et, { [`${nt.slice(0, 1).toLowerCase()}${nt.slice(1)}`]: tt[nt] }), + {}, + ) + } + function getPickersDayUtilityClass(tt) { + return generateUtilityClass('MuiPickersDay', tt) + } + const pickersDayClasses = generateUtilityClasses('MuiPickersDay', [ + 'root', + 'dayWithMargin', + 'dayOutsideMonth', + 'hiddenDaySpacingFiller', + 'today', + 'selected', + 'disabled', + ]), + _excluded$C = [ + 'autoFocus', + 'className', + 'day', + 'disabled', + 'disableHighlightToday', + 'disableMargin', + 'hidden', + 'isAnimating', + 'onClick', + 'onDaySelect', + 'onFocus', + 'onBlur', + 'onKeyDown', + 'onMouseDown', + 'onMouseEnter', + 'outsideCurrentMonth', + 'selected', + 'showDaysOutsideCurrentMonth', + 'children', + 'today', + 'isFirstVisibleCell', + 'isLastVisibleCell', + ], + useUtilityClasses$e = (tt) => { + const { + selected: et, + disableMargin: nt, + disableHighlightToday: rt, + today: it, + disabled: ot, + outsideCurrentMonth: at, + showDaysOutsideCurrentMonth: st, + classes: lt, + } = tt, + ct = at && !st + return composeClasses( + { + root: [ + 'root', + et && !ct && 'selected', + ot && 'disabled', + !nt && 'dayWithMargin', + !rt && it && 'today', + at && st && 'dayOutsideMonth', + ct && 'hiddenDaySpacingFiller', + ], + hiddenDaySpacingFiller: ['hiddenDaySpacingFiller'], + }, + getPickersDayUtilityClass, + lt, + ) + }, + styleArg = ({ theme: tt, ownerState: et }) => + _extends$u( + {}, + tt.typography.caption, + { + width: DAY_SIZE, + height: DAY_SIZE, + borderRadius: '50%', + padding: 0, + backgroundColor: 'transparent', + transition: tt.transitions.create('background-color', { duration: tt.transitions.duration.short }), + color: (tt.vars || tt).palette.text.primary, + '@media (pointer: fine)': { + '&:hover': { + backgroundColor: tt.vars + ? `rgba(${tt.vars.palette.primary.mainChannel} / ${tt.vars.palette.action.hoverOpacity})` + : alpha$1(tt.palette.primary.main, tt.palette.action.hoverOpacity), + }, + }, + '&:focus': { + backgroundColor: tt.vars + ? `rgba(${tt.vars.palette.primary.mainChannel} / ${tt.vars.palette.action.focusOpacity})` + : alpha$1(tt.palette.primary.main, tt.palette.action.focusOpacity), + [`&.${pickersDayClasses.selected}`]: { + willChange: 'background-color', + backgroundColor: (tt.vars || tt).palette.primary.dark, + }, + }, + [`&.${pickersDayClasses.selected}`]: { + color: (tt.vars || tt).palette.primary.contrastText, + backgroundColor: (tt.vars || tt).palette.primary.main, + fontWeight: tt.typography.fontWeightMedium, + '&:hover': { willChange: 'background-color', backgroundColor: (tt.vars || tt).palette.primary.dark }, + }, + [`&.${pickersDayClasses.disabled}:not(.${pickersDayClasses.selected})`]: { + color: (tt.vars || tt).palette.text.disabled, + }, + [`&.${pickersDayClasses.disabled}&.${pickersDayClasses.selected}`]: { opacity: 0.6 }, + }, + !et.disableMargin && { margin: `0 ${DAY_MARGIN}px` }, + et.outsideCurrentMonth && et.showDaysOutsideCurrentMonth && { color: (tt.vars || tt).palette.text.secondary }, + !et.disableHighlightToday && + et.today && { + [`&:not(.${pickersDayClasses.selected})`]: { + border: `1px solid ${(tt.vars || tt).palette.text.secondary}`, + }, + }, + ), + overridesResolver = (tt, et) => { + const { ownerState: nt } = tt + return [ + et.root, + !nt.disableMargin && et.dayWithMargin, + !nt.disableHighlightToday && nt.today && et.today, + !nt.outsideCurrentMonth && nt.showDaysOutsideCurrentMonth && et.dayOutsideMonth, + nt.outsideCurrentMonth && !nt.showDaysOutsideCurrentMonth && et.hiddenDaySpacingFiller, + ] + }, + PickersDayRoot = styled$1(ButtonBase$1, { name: 'MuiPickersDay', slot: 'Root', overridesResolver })(styleArg), + PickersDayFiller = styled$1('div', { name: 'MuiPickersDay', slot: 'Root', overridesResolver })( + ({ theme: tt, ownerState: et }) => + _extends$u({}, styleArg({ theme: tt, ownerState: et }), { opacity: 0, pointerEvents: 'none' }), + ), + noop$5 = () => {}, + PickersDayRaw = reactExports.forwardRef(function (et, nt) { + const rt = useThemeProps({ props: et, name: 'MuiPickersDay' }), + { + autoFocus: it = !1, + className: ot, + day: at, + disabled: st = !1, + disableHighlightToday: lt = !1, + disableMargin: ct = !1, + isAnimating: ut, + onClick: ht, + onDaySelect: dt, + onFocus: pt = noop$5, + onBlur: mt = noop$5, + onKeyDown: gt = noop$5, + onMouseDown: yt = noop$5, + onMouseEnter: bt = noop$5, + outsideCurrentMonth: vt, + selected: xt = !1, + showDaysOutsideCurrentMonth: kt = !1, + children: St, + today: Tt = !1, + } = rt, + At = _objectWithoutPropertiesLoose$m(rt, _excluded$C), + Et = _extends$u({}, rt, { + autoFocus: it, + disabled: st, + disableHighlightToday: lt, + disableMargin: ct, + selected: xt, + showDaysOutsideCurrentMonth: kt, + today: Tt, + }), + $t = useUtilityClasses$e(Et), + Dt = useUtils(), + jt = reactExports.useRef(null), + Pt = useForkRef(jt, nt) + useEnhancedEffect$1(() => { + it && !st && !ut && !vt && jt.current.focus() + }, [it, st, ut, vt]) + const Ct = (It) => { + yt(It), vt && It.preventDefault() + }, + wt = (It) => { + st || dt(at), vt && It.currentTarget.focus(), ht && ht(It) + } + return vt && !kt + ? jsxRuntimeExports.jsx(PickersDayFiller, { + className: clsx($t.root, $t.hiddenDaySpacingFiller, ot), + ownerState: Et, + role: At.role, + }) + : jsxRuntimeExports.jsx( + PickersDayRoot, + _extends$u( + { + className: clsx($t.root, ot), + ref: Pt, + centerRipple: !0, + disabled: st, + tabIndex: xt ? 0 : -1, + onKeyDown: (It) => gt(It, at), + onFocus: (It) => pt(It, at), + onBlur: (It) => mt(It, at), + onMouseEnter: (It) => bt(It, at), + onClick: wt, + onMouseDown: Ct, + }, + At, + { ownerState: Et, children: St || Dt.format(at, 'dayOfMonth') }, + ), + ) + }), + PickersDay = reactExports.memo(PickersDayRaw) + function useValidation(tt, et, nt, rt) { + const { value: it, onError: ot } = tt, + at = useLocalizationContext(), + st = reactExports.useRef(rt), + lt = et({ adapter: at, value: it, props: tt }) + return ( + reactExports.useEffect(() => { + ot && !nt(lt, st.current) && ot(lt, it), (st.current = lt) + }, [nt, ot, st, lt, it]), + lt + ) + } + const useFieldState = (tt) => { + const et = useUtils(), + nt = useLocaleText(), + rt = useLocalizationContext(), + ot = useTheme().direction === 'rtl', + { + valueManager: at, + fieldValueManager: st, + valueType: lt, + validator: ct, + internalProps: ut, + internalProps: { + value: ht, + defaultValue: dt, + referenceDate: pt, + onChange: mt, + format: gt, + formatDensity: yt = 'dense', + selectedSections: bt, + onSelectedSectionsChange: vt, + shouldRespectLeadingZeros: xt = !1, + timezone: kt, + }, + } = tt, + { + timezone: St, + value: Tt, + handleValueChange: At, + } = useValueWithTimezone({ timezone: kt, value: ht, defaultValue: dt, onChange: mt, valueManager: at }), + Et = reactExports.useMemo(() => getSectionsBoundaries(et, St), [et, St]), + $t = reactExports.useCallback( + (en, sn = null) => + st.getSectionsFromValue(et, en, sn, ot, (Kt) => splitFormatIntoSections(et, St, nt, gt, Kt, yt, xt, ot)), + [st, gt, nt, ot, xt, et, yt, St], + ), + Dt = reactExports.useMemo(() => st.getValueStrFromSections($t(at.emptyValue), ot), [st, $t, at.emptyValue, ot]), + [jt, Pt] = reactExports.useState(() => { + const en = $t(Tt), + sn = { sections: en, value: Tt, referenceValue: at.emptyValue, tempValueStrAndroid: null }, + Kt = getSectionTypeGranularity(en), + rn = at.getInitialReferenceValue({ + referenceDate: pt, + value: Tt, + utils: et, + props: ut, + granularity: Kt, + timezone: St, + }) + return _extends$u({}, sn, { referenceValue: rn }) + }), + [Ct, wt] = useControlled({ controlled: bt, default: null, name: 'useField', state: 'selectedSectionIndexes' }), + It = (en) => { + wt(en), vt == null || vt(en), Pt((sn) => _extends$u({}, sn, { selectedSectionQuery: null })) + }, + Ot = reactExports.useMemo(() => { + if (Ct == null) return null + if (Ct === 'all') + return { startIndex: 0, endIndex: jt.sections.length - 1, shouldSelectBoundarySelectors: !0 } + if (typeof Ct == 'number') return { startIndex: Ct, endIndex: Ct } + if (typeof Ct == 'string') { + const en = jt.sections.findIndex((sn) => sn.type === Ct) + return { startIndex: en, endIndex: en } + } + return Ct + }, [Ct, jt.sections]), + Wt = ({ value: en, referenceValue: sn, sections: Kt }) => { + Pt((nn) => _extends$u({}, nn, { sections: Kt, value: en, referenceValue: sn, tempValueStrAndroid: null })) + const rn = { + validationError: ct({ adapter: rt, value: en, props: _extends$u({}, ut, { value: en, timezone: St }) }), + } + At(en, rn) + }, + zt = (en, sn) => { + const Kt = [...jt.sections] + return (Kt[en] = _extends$u({}, Kt[en], { value: sn, modified: !0 })), addPositionPropertiesToSections(Kt, ot) + }, + Ft = () => { + at.areValuesEqual(et, jt.value, at.emptyValue) || + Wt({ value: at.emptyValue, referenceValue: jt.referenceValue, sections: $t(at.emptyValue) }) + }, + Nt = () => { + if (Ot == null) return + const en = jt.sections[Ot.startIndex] + if (en.value === '') return + const sn = st.getActiveDateManager(et, jt, en), + rn = sn.getSections(jt.sections).filter((an) => an.value !== '').length === 1, + nn = zt(Ot.startIndex, ''), + hn = rn ? null : et.date(new Date('')), + vn = sn.getNewValuesFromNewActiveDate(hn) + ;(hn != null && !et.isValid(hn)) != (sn.date != null && !et.isValid(sn.date)) + ? Wt(_extends$u({}, vn, { sections: nn })) + : Pt((an) => _extends$u({}, an, vn, { sections: nn, tempValueStrAndroid: null })) + }, + Ut = (en) => { + const sn = (nn, hn) => { + const vn = et.parse(nn, gt) + if (vn == null || !et.isValid(vn)) return null + const an = splitFormatIntoSections(et, St, nt, gt, vn, yt, xt, ot) + return mergeDateIntoReferenceDate(et, St, vn, an, hn, !1) + }, + Kt = st.parseValueStr(en, jt.referenceValue, sn), + rn = st.updateReferenceValue(et, Kt, jt.referenceValue) + Wt({ value: Kt, referenceValue: rn, sections: $t(Kt, jt.sections) }) + }, + Mt = ({ activeSection: en, newSectionValue: sn, shouldGoToNextSection: Kt }) => { + Kt && Ot && Ot.startIndex < jt.sections.length - 1 + ? It(Ot.startIndex + 1) + : Ot && Ot.startIndex !== Ot.endIndex && It(Ot.startIndex) + const rn = st.getActiveDateManager(et, jt, en), + nn = zt(Ot.startIndex, sn), + hn = rn.getSections(nn), + vn = getDateFromDateSections(et, hn) + let an, Qt + if (vn != null && et.isValid(vn)) { + const _n = mergeDateIntoReferenceDate(et, St, vn, hn, rn.referenceDate, !0) + ;(an = rn.getNewValuesFromNewActiveDate(_n)), (Qt = !0) + } else + (an = rn.getNewValuesFromNewActiveDate(vn)), + (Qt = (vn != null && !et.isValid(vn)) != (rn.date != null && !et.isValid(rn.date))) + return Qt + ? Wt(_extends$u({}, an, { sections: nn })) + : Pt((_n) => _extends$u({}, _n, an, { sections: nn, tempValueStrAndroid: null })) + }, + Ht = (en) => Pt((sn) => _extends$u({}, sn, { tempValueStrAndroid: en })) + return ( + reactExports.useEffect(() => { + const en = $t(jt.value) + Pt((sn) => _extends$u({}, sn, { sections: en })) + }, [gt, et.locale]), + reactExports.useEffect(() => { + let en = !1 + at.areValuesEqual(et, jt.value, Tt) + ? (en = at.getTimezone(et, jt.value) !== at.getTimezone(et, Tt)) + : (en = !0), + en && + Pt((sn) => + _extends$u({}, sn, { + value: Tt, + referenceValue: st.updateReferenceValue(et, Tt, sn.referenceValue), + sections: $t(Tt), + }), + ) + }, [Tt]), + { + state: jt, + selectedSectionIndexes: Ot, + setSelectedSections: It, + clearValue: Ft, + clearActiveSection: Nt, + updateSectionValue: Mt, + updateValueFromValueStr: Ut, + setTempAndroidValueStr: Ht, + sectionsValueBoundaries: Et, + placeholder: Dt, + timezone: St, + } + ) + }, + QUERY_LIFE_DURATION_MS = 5e3, + isQueryResponseWithoutValue = (tt) => tt.saveQuery != null, + useFieldCharacterEditing = ({ + sections: tt, + updateSectionValue: et, + sectionsValueBoundaries: nt, + setTempAndroidValueStr: rt, + timezone: it, + }) => { + const ot = useUtils(), + [at, st] = reactExports.useState(null), + lt = useEventCallback(() => st(null)) + reactExports.useEffect(() => { + var pt + at != null && ((pt = tt[at.sectionIndex]) == null ? void 0 : pt.type) !== at.sectionType && lt() + }, [tt, at, lt]), + reactExports.useEffect(() => { + if (at != null) { + const pt = setTimeout(() => lt(), QUERY_LIFE_DURATION_MS) + return () => { + window.clearTimeout(pt) + } + } + return () => {} + }, [at, lt]) + const ct = ({ keyPressed: pt, sectionIndex: mt }, gt, yt) => { + const bt = pt.toLowerCase(), + vt = tt[mt] + if (at != null && (!yt || yt(at.value)) && at.sectionIndex === mt) { + const kt = `${at.value}${bt}`, + St = gt(kt, vt) + if (!isQueryResponseWithoutValue(St)) return st({ sectionIndex: mt, value: kt, sectionType: vt.type }), St + } + const xt = gt(bt, vt) + return isQueryResponseWithoutValue(xt) && !xt.saveQuery + ? (lt(), null) + : (st({ sectionIndex: mt, value: bt, sectionType: vt.type }), isQueryResponseWithoutValue(xt) ? null : xt) + }, + ut = (pt) => { + const mt = (bt, vt, xt) => { + const kt = vt.filter((St) => St.toLowerCase().startsWith(xt)) + return kt.length === 0 + ? { saveQuery: !1 } + : { sectionValue: kt[0], shouldGoToNextSection: kt.length === 1 } + }, + gt = (bt, vt, xt, kt) => { + const St = (Tt) => getLetterEditingOptions(ot, it, vt.type, Tt) + if (vt.contentType === 'letter') return mt(vt.format, St(vt.format), bt) + if (xt && kt != null && getDateSectionConfigFromFormatToken(ot, xt).contentType === 'letter') { + const Tt = St(xt), + At = mt(xt, Tt, bt) + return isQueryResponseWithoutValue(At) + ? { saveQuery: !1 } + : _extends$u({}, At, { sectionValue: kt(At.sectionValue, Tt) }) + } + return { saveQuery: !1 } + } + return ct(pt, (bt, vt) => { + switch (vt.type) { + case 'month': { + const xt = (kt) => changeSectionValueFormat(ot, kt, ot.formats.month, vt.format) + return gt(bt, vt, ot.formats.month, xt) + } + case 'weekDay': { + const xt = (kt, St) => St.indexOf(kt).toString() + return gt(bt, vt, ot.formats.weekday, xt) + } + case 'meridiem': + return gt(bt, vt) + default: + return { saveQuery: !1 } + } + }) + }, + ht = (pt) => { + const mt = (yt, bt) => { + const vt = +`${yt}`, + xt = nt[bt.type]({ currentDate: null, format: bt.format, contentType: bt.contentType }) + if (vt > xt.maximum) return { saveQuery: !1 } + if (vt < xt.minimum) return { saveQuery: !0 } + const kt = +`${yt}0` > xt.maximum || yt.length === xt.maximum.toString().length + return { sectionValue: cleanDigitSectionValue(ot, it, vt, xt, bt), shouldGoToNextSection: kt } + } + return ct( + pt, + (yt, bt) => { + if (bt.contentType === 'digit' || bt.contentType === 'digit-with-letter') return mt(yt, bt) + if (bt.type === 'month') { + const vt = doesSectionFormatHaveLeadingZeros(ot, it, 'digit', 'month', 'MM'), + xt = mt(yt, { + type: bt.type, + format: 'MM', + hasLeadingZerosInFormat: vt, + hasLeadingZerosInInput: !0, + contentType: 'digit', + maxLength: 2, + }) + if (isQueryResponseWithoutValue(xt)) return xt + const kt = changeSectionValueFormat(ot, xt.sectionValue, 'MM', bt.format) + return _extends$u({}, xt, { sectionValue: kt }) + } + if (bt.type === 'weekDay') { + const vt = mt(yt, bt) + if (isQueryResponseWithoutValue(vt)) return vt + const xt = getDaysInWeekStr(ot, it, bt.format)[Number(vt.sectionValue) - 1] + return _extends$u({}, vt, { sectionValue: xt }) + } + return { saveQuery: !1 } + }, + (yt) => !Number.isNaN(Number(yt)), + ) + } + return { + applyCharacterEditing: useEventCallback((pt) => { + const mt = tt[pt.sectionIndex], + yt = !Number.isNaN(Number(pt.keyPressed)) ? ht(pt) : ut(pt) + yt == null + ? rt(null) + : et({ + activeSection: mt, + newSectionValue: yt.sectionValue, + shouldGoToNextSection: yt.shouldGoToNextSection, + }) + }), + resetCharacterQuery: lt, + } + } + function arrayIncludes$2(tt, et) { + return Array.isArray(et) ? et.every((nt) => tt.indexOf(nt) !== -1) : tt.indexOf(et) !== -1 + } + const onSpaceOrEnter = (tt, et) => (nt) => { + ;(nt.key === 'Enter' || nt.key === ' ') && (tt(nt), nt.preventDefault(), nt.stopPropagation()), et && et(nt) + }, + getActiveElement = (tt = document) => { + const et = tt.activeElement + return et ? (et.shadowRoot ? getActiveElement(et.shadowRoot) : et) : null + }, + DEFAULT_DESKTOP_MODE_MEDIA_QUERY = '@media (pointer: fine)', + _excluded$B = [ + 'onClick', + 'onKeyDown', + 'onFocus', + 'onBlur', + 'onMouseUp', + 'onPaste', + 'error', + 'clearable', + 'onClear', + 'disabled', + ], + useField = (tt) => { + const et = useUtils(), + { + state: nt, + selectedSectionIndexes: rt, + setSelectedSections: it, + clearValue: ot, + clearActiveSection: at, + updateSectionValue: st, + updateValueFromValueStr: lt, + setTempAndroidValueStr: ct, + sectionsValueBoundaries: ut, + placeholder: ht, + timezone: dt, + } = useFieldState(tt), + { + inputRef: pt, + internalProps: mt, + internalProps: { readOnly: gt = !1, unstableFieldRef: yt, minutesStep: bt }, + forwardedProps: { + onClick: vt, + onKeyDown: xt, + onFocus: kt, + onBlur: St, + onMouseUp: Tt, + onPaste: At, + error: Et, + clearable: $t, + onClear: Dt, + disabled: jt, + }, + fieldValueManager: Pt, + valueManager: Ct, + validator: wt, + } = tt, + It = _objectWithoutPropertiesLoose$m(tt.forwardedProps, _excluded$B), + { applyCharacterEditing: Ot, resetCharacterQuery: Wt } = useFieldCharacterEditing({ + sections: nt.sections, + updateSectionValue: st, + sectionsValueBoundaries: ut, + setTempAndroidValueStr: ct, + timezone: dt, + }), + zt = reactExports.useRef(null), + Ft = useForkRef(pt, zt), + Nt = reactExports.useRef(void 0), + Mt = useTheme().direction === 'rtl', + Ht = reactExports.useMemo(() => getSectionOrder(nt.sections, Mt), [nt.sections, Mt]), + en = () => { + var In + if (gt) { + it(null) + return + } + const An = (In = zt.current.selectionStart) != null ? In : 0 + let wn + An <= nt.sections[0].startInInput || An >= nt.sections[nt.sections.length - 1].endInInput + ? (wn = 1) + : (wn = nt.sections.findIndex((pn) => pn.startInInput - pn.startSeparator.length > An)) + const fn = wn === -1 ? nt.sections.length - 1 : wn - 1 + it(fn) + }, + sn = useEventCallback((In, ...An) => { + In.isDefaultPrevented() || (vt == null || vt(In, ...An), en()) + }), + Kt = useEventCallback((In) => { + Tt == null || Tt(In), In.preventDefault() + }), + rn = useEventCallback((...In) => { + kt == null || kt(...In) + const An = zt.current + window.clearTimeout(Nt.current), + (Nt.current = setTimeout(() => { + !An || + An !== zt.current || + rt != null || + gt || + (An.value.length && Number(An.selectionEnd) - Number(An.selectionStart) === An.value.length + ? it('all') + : en()) + })) + }), + nn = useEventCallback((...In) => { + St == null || St(...In), it(null) + }), + hn = useEventCallback((In) => { + if ((At == null || At(In), gt)) { + In.preventDefault() + return + } + const An = In.clipboardData.getData('text') + if (rt && rt.startIndex === rt.endIndex) { + const wn = nt.sections[rt.startIndex], + fn = /^[a-zA-Z]+$/.test(An), + pn = /^[0-9]+$/.test(An), + kn = /^(([a-zA-Z]+)|)([0-9]+)(([a-zA-Z]+)|)$/.test(An) + if ( + (wn.contentType === 'letter' && fn) || + (wn.contentType === 'digit' && pn) || + (wn.contentType === 'digit-with-letter' && kn) + ) + return + if (fn || pn) { + In.preventDefault() + return + } + } + In.preventDefault(), Wt(), lt(An) + }), + vn = useEventCallback((In) => { + if (gt) return + const An = In.target.value, + wn = In.nativeEvent.data, + fn = wn && wn.length > 1, + pn = fn ? wn : An, + kn = cleanString(pn) + if (rt == null || fn) { + lt(fn ? wn : kn) + return + } + let Dn + if (rt.startIndex === 0 && rt.endIndex === nt.sections.length - 1 && kn.length === 1) Dn = kn + else { + const un = cleanString(Pt.getValueStrFromSections(nt.sections, Mt)) + let Zt = -1, + Xt = -1 + for (let On = 0; On < un.length; On += 1) + Zt === -1 && un[On] !== kn[On] && (Zt = On), + Xt === -1 && un[un.length - On - 1] !== kn[kn.length - On - 1] && (Xt = On) + const Sn = nt.sections[rt.startIndex] + if (Zt < Sn.start || un.length - Xt - 1 > Sn.end) return + const jn = kn.length - un.length + Sn.end - cleanString(Sn.endSeparator || '').length + Dn = kn.slice(Sn.start + cleanString(Sn.startSeparator || '').length, jn) + } + if (isAndroid() && Dn.length === 0) { + ct(pn) + return + } + Ot({ keyPressed: Dn, sectionIndex: rt.startIndex }) + }), + an = useEventCallback((In) => { + switch ((xt == null || xt(In), !0)) { + case In.key === 'a' && (In.ctrlKey || In.metaKey): { + In.preventDefault(), it('all') + break + } + case In.key === 'ArrowRight': { + if ((In.preventDefault(), rt == null)) it(Ht.startIndex) + else if (rt.startIndex !== rt.endIndex) it(rt.endIndex) + else { + const An = Ht.neighbors[rt.startIndex].rightIndex + An !== null && it(An) + } + break + } + case In.key === 'ArrowLeft': { + if ((In.preventDefault(), rt == null)) it(Ht.endIndex) + else if (rt.startIndex !== rt.endIndex) it(rt.startIndex) + else { + const An = Ht.neighbors[rt.startIndex].leftIndex + An !== null && it(An) + } + break + } + case ['Backspace', 'Delete'].includes(In.key): { + if ((In.preventDefault(), gt)) break + rt == null || (rt.startIndex === 0 && rt.endIndex === nt.sections.length - 1) ? ot() : at(), Wt() + break + } + case ['ArrowUp', 'ArrowDown', 'Home', 'End', 'PageUp', 'PageDown'].includes(In.key): { + if ((In.preventDefault(), gt || rt == null)) break + const An = nt.sections[rt.startIndex], + wn = Pt.getActiveDateManager(et, nt, An), + fn = adjustSectionValue(et, dt, An, In.key, ut, wn.date, { minutesStep: bt }) + st({ activeSection: An, newSectionValue: fn, shouldGoToNextSection: !1 }) + break + } + } + }) + useEnhancedEffect$1(() => { + if (!zt.current) return + if (rt == null) { + zt.current.scrollLeft && (zt.current.scrollLeft = 0) + return + } + const In = nt.sections[rt.startIndex], + An = nt.sections[rt.endIndex] + let wn = In.startInInput, + fn = An.endInInput + if ( + (rt.shouldSelectBoundarySelectors && ((wn -= In.startSeparator.length), (fn += An.endSeparator.length)), + wn !== zt.current.selectionStart || fn !== zt.current.selectionEnd) + ) { + const pn = zt.current.scrollTop + zt.current === getActiveElement(document) && zt.current.setSelectionRange(wn, fn), (zt.current.scrollTop = pn) + } + }) + const Qt = useValidation( + _extends$u({}, mt, { value: nt.value, timezone: dt }), + wt, + Ct.isSameError, + Ct.defaultErrorState, + ), + _n = reactExports.useMemo(() => (Et !== void 0 ? Et : Ct.hasError(Qt)), [Ct, Qt, Et]) + reactExports.useEffect(() => { + !_n && !rt && Wt() + }, [nt.referenceValue, rt, _n]), + reactExports.useEffect( + () => ( + zt.current && zt.current === document.activeElement && it('all'), () => window.clearTimeout(Nt.current) + ), + [], + ), + reactExports.useEffect(() => { + nt.tempValueStrAndroid != null && rt != null && (Wt(), at()) + }, [nt.tempValueStrAndroid]) + const Pn = reactExports.useMemo(() => { + var In + return (In = nt.tempValueStrAndroid) != null ? In : Pt.getValueStrFromSections(nt.sections, Mt) + }, [nt.sections, Pt, nt.tempValueStrAndroid, Mt]), + $n = reactExports.useMemo( + () => (rt == null || nt.sections[rt.startIndex].contentType === 'letter' ? 'text' : 'numeric'), + [rt, nt.sections], + ), + Nn = zt.current && zt.current === getActiveElement(document), + Tn = Ct.areValuesEqual(et, nt.value, Ct.emptyValue), + cn = !Nn && Tn + reactExports.useImperativeHandle(yt, () => ({ + getSections: () => nt.sections, + getActiveSectionIndex: () => { + var In, An + const wn = (In = zt.current.selectionStart) != null ? In : 0, + fn = (An = zt.current.selectionEnd) != null ? An : 0 + if (wn === 0 && fn === 0) return null + const pn = + wn <= nt.sections[0].startInInput + ? 1 + : nt.sections.findIndex((kn) => kn.startInInput - kn.startSeparator.length > wn) + return pn === -1 ? nt.sections.length - 1 : pn - 1 + }, + setSelectedSections: (In) => it(In), + })) + const mn = useEventCallback((In, ...An) => { + var wn + In.preventDefault(), + Dt == null || Dt(In, ...An), + ot(), + zt == null || (wn = zt.current) == null || wn.focus(), + it(0) + }) + return _extends$u({ placeholder: ht, autoComplete: 'off', disabled: !!jt }, It, { + value: cn ? '' : Pn, + inputMode: $n, + readOnly: gt, + onClick: sn, + onFocus: rn, + onBlur: nn, + onPaste: hn, + onChange: vn, + onKeyDown: an, + onMouseUp: Kt, + onClear: mn, + error: _n, + ref: Ft, + clearable: !!($t && !Tn && !gt && !jt), + }) + }, + validateDate = ({ props: tt, value: et, adapter: nt }) => { + if (et === null) return null + const { + shouldDisableDate: rt, + shouldDisableMonth: it, + shouldDisableYear: ot, + disablePast: at, + disableFuture: st, + timezone: lt, + } = tt, + ct = nt.utils.dateWithTimezone(void 0, lt), + ut = applyDefaultDate(nt.utils, tt.minDate, nt.defaultDates.minDate), + ht = applyDefaultDate(nt.utils, tt.maxDate, nt.defaultDates.maxDate) + switch (!0) { + case !nt.utils.isValid(et): + return 'invalidDate' + case !!(rt && rt(et)): + return 'shouldDisableDate' + case !!(it && it(et)): + return 'shouldDisableMonth' + case !!(ot && ot(et)): + return 'shouldDisableYear' + case !!(st && nt.utils.isAfterDay(et, ct)): + return 'disableFuture' + case !!(at && nt.utils.isBeforeDay(et, ct)): + return 'disablePast' + case !!(ut && nt.utils.isBeforeDay(et, ut)): + return 'minDate' + case !!(ht && nt.utils.isAfterDay(et, ht)): + return 'maxDate' + default: + return null + } + }, + DATE_VALIDATION_PROP_NAMES = [ + 'disablePast', + 'disableFuture', + 'minDate', + 'maxDate', + 'shouldDisableDate', + 'shouldDisableMonth', + 'shouldDisableYear', + ], + TIME_VALIDATION_PROP_NAMES = [ + 'disablePast', + 'disableFuture', + 'minTime', + 'maxTime', + 'shouldDisableClock', + 'shouldDisableTime', + 'minutesStep', + 'ampm', + 'disableIgnoringDatePartForTimeValidation', + ], + DATE_TIME_VALIDATION_PROP_NAMES = ['minDateTime', 'maxDateTime'], + VALIDATION_PROP_NAMES = [ + ...DATE_VALIDATION_PROP_NAMES, + ...TIME_VALIDATION_PROP_NAMES, + ...DATE_TIME_VALIDATION_PROP_NAMES, + ], + extractValidationProps = (tt) => + VALIDATION_PROP_NAMES.reduce((et, nt) => (tt.hasOwnProperty(nt) && (et[nt] = tt[nt]), et), {}), + SHARED_FIELD_INTERNAL_PROP_NAMES = [ + 'value', + 'defaultValue', + 'referenceDate', + 'format', + 'formatDensity', + 'onChange', + 'timezone', + 'readOnly', + 'onError', + 'shouldRespectLeadingZeros', + 'selectedSections', + 'onSelectedSectionsChange', + 'unstableFieldRef', + ], + splitFieldInternalAndForwardedProps = (tt, et) => { + const nt = _extends$u({}, tt), + rt = {}, + it = (ot) => { + nt.hasOwnProperty(ot) && ((rt[ot] = nt[ot]), delete nt[ot]) + } + return ( + SHARED_FIELD_INTERNAL_PROP_NAMES.forEach(it), + et === 'date' + ? DATE_VALIDATION_PROP_NAMES.forEach(it) + : et === 'time' + ? TIME_VALIDATION_PROP_NAMES.forEach(it) + : et === 'date-time' && + (DATE_VALIDATION_PROP_NAMES.forEach(it), + TIME_VALIDATION_PROP_NAMES.forEach(it), + DATE_TIME_VALIDATION_PROP_NAMES.forEach(it)), + { forwardedProps: nt, internalProps: rt } + ) + }, + useDefaultizedDateField = (tt) => { + var et, nt, rt + const it = useUtils(), + ot = useDefaultDates() + return _extends$u({}, tt, { + disablePast: (et = tt.disablePast) != null ? et : !1, + disableFuture: (nt = tt.disableFuture) != null ? nt : !1, + format: (rt = tt.format) != null ? rt : it.formats.keyboardDate, + minDate: applyDefaultDate(it, tt.minDate, ot.minDate), + maxDate: applyDefaultDate(it, tt.maxDate, ot.maxDate), + }) + }, + useDateField = ({ props: tt, inputRef: et }) => { + const nt = useDefaultizedDateField(tt), + { forwardedProps: rt, internalProps: it } = splitFieldInternalAndForwardedProps(nt, 'date') + return useField({ + inputRef: et, + forwardedProps: rt, + internalProps: it, + valueManager: singleItemValueManager, + fieldValueManager: singleItemFieldValueManager, + validator: validateDate, + valueType: 'date', + }) + }, + PickersModalDialogRoot = styled$1(MuiDialog)({ + [`& .${dialogClasses$1.container}`]: { outline: 0 }, + [`& .${dialogClasses$1.paper}`]: { outline: 0, minWidth: DIALOG_WIDTH }, + }), + PickersModalDialogContent = styled$1(DialogContent$1)({ '&:first-of-type': { padding: 0 } }) + function PickersModalDialog(tt) { + var et, nt + const { children: rt, onDismiss: it, open: ot, slots: at, slotProps: st } = tt, + lt = (et = at == null ? void 0 : at.dialog) != null ? et : PickersModalDialogRoot, + ct = (nt = at == null ? void 0 : at.mobileTransition) != null ? nt : Fade$1 + return jsxRuntimeExports.jsx( + lt, + _extends$u({ open: ot, onClose: it }, st == null ? void 0 : st.dialog, { + TransitionComponent: ct, + TransitionProps: st == null ? void 0 : st.mobileTransition, + PaperComponent: at == null ? void 0 : at.mobilePaper, + PaperProps: st == null ? void 0 : st.mobilePaper, + children: jsxRuntimeExports.jsx(PickersModalDialogContent, { children: rt }), + }), + ) + } + function getPickersPopperUtilityClass(tt) { + return generateUtilityClass('MuiPickersPopper', tt) + } + generateUtilityClasses('MuiPickersPopper', ['root', 'paper']) + const PREFERS_REDUCED_MOTION = '@media (prefers-reduced-motion: reduce)', + mobileVersionMatches = typeof navigator < 'u' && navigator.userAgent.match(/android\s(\d+)|OS\s(\d+)/i), + androidVersion = mobileVersionMatches && mobileVersionMatches[1] ? parseInt(mobileVersionMatches[1], 10) : null, + iOSVersion = mobileVersionMatches && mobileVersionMatches[2] ? parseInt(mobileVersionMatches[2], 10) : null, + slowAnimationDevices = (androidVersion && androidVersion < 10) || (iOSVersion && iOSVersion < 13) || !1, + useDefaultReduceAnimations = () => + useMediaQuery(PREFERS_REDUCED_MOTION, { defaultMatches: !1 }) || slowAnimationDevices, + _excluded$A = [ + 'PaperComponent', + 'popperPlacement', + 'ownerState', + 'children', + 'paperSlotProps', + 'paperClasses', + 'onPaperClick', + 'onPaperTouchStart', + ], + useUtilityClasses$d = (tt) => { + const { classes: et } = tt + return composeClasses({ root: ['root'], paper: ['paper'] }, getPickersPopperUtilityClass, et) + }, + PickersPopperRoot = styled$1(MuiPopper, { + name: 'MuiPickersPopper', + slot: 'Root', + overridesResolver: (tt, et) => et.root, + })(({ theme: tt }) => ({ zIndex: tt.zIndex.modal })), + PickersPopperPaper = styled$1(Paper$1, { + name: 'MuiPickersPopper', + slot: 'Paper', + overridesResolver: (tt, et) => et.paper, + })(({ ownerState: tt }) => + _extends$u( + { outline: 0, transformOrigin: 'top center' }, + tt.placement.includes('top') && { transformOrigin: 'bottom center' }, + ), + ) + function clickedRootScrollbar(tt, et) { + return et.documentElement.clientWidth < tt.clientX || et.documentElement.clientHeight < tt.clientY + } + function useClickAwayListener(tt, et) { + const nt = reactExports.useRef(!1), + rt = reactExports.useRef(!1), + it = reactExports.useRef(null), + ot = reactExports.useRef(!1) + reactExports.useEffect(() => { + if (!tt) return + function lt() { + ot.current = !0 + } + return ( + document.addEventListener('mousedown', lt, !0), + document.addEventListener('touchstart', lt, !0), + () => { + document.removeEventListener('mousedown', lt, !0), + document.removeEventListener('touchstart', lt, !0), + (ot.current = !1) + } + ) + }, [tt]) + const at = useEventCallback((lt) => { + if (!ot.current) return + const ct = rt.current + rt.current = !1 + const ut = ownerDocument(it.current) + if (!it.current || ('clientX' in lt && clickedRootScrollbar(lt, ut))) return + if (nt.current) { + nt.current = !1 + return + } + let ht + lt.composedPath + ? (ht = lt.composedPath().indexOf(it.current) > -1) + : (ht = !ut.documentElement.contains(lt.target) || it.current.contains(lt.target)), + !ht && !ct && et(lt) + }), + st = () => { + rt.current = !0 + } + return ( + reactExports.useEffect(() => { + if (tt) { + const lt = ownerDocument(it.current), + ct = () => { + nt.current = !0 + } + return ( + lt.addEventListener('touchstart', at), + lt.addEventListener('touchmove', ct), + () => { + lt.removeEventListener('touchstart', at), lt.removeEventListener('touchmove', ct) + } + ) + } + }, [tt, at]), + reactExports.useEffect(() => { + if (tt) { + const lt = ownerDocument(it.current) + return ( + lt.addEventListener('click', at), + () => { + lt.removeEventListener('click', at), (rt.current = !1) + } + ) + } + }, [tt, at]), + [it, st, st] + ) + } + const PickersPopperPaperWrapper = reactExports.forwardRef((tt, et) => { + const { + PaperComponent: nt, + popperPlacement: rt, + ownerState: it, + children: ot, + paperSlotProps: at, + paperClasses: st, + onPaperClick: lt, + onPaperTouchStart: ct, + } = tt, + ut = _objectWithoutPropertiesLoose$m(tt, _excluded$A), + ht = _extends$u({}, it, { placement: rt }), + dt = useSlotProps({ + elementType: nt, + externalSlotProps: at, + additionalProps: { tabIndex: -1, elevation: 8, ref: et }, + className: st, + ownerState: ht, + }) + return jsxRuntimeExports.jsx( + nt, + _extends$u({}, ut, dt, { + onClick: (pt) => { + var mt + lt(pt), (mt = dt.onClick) == null || mt.call(dt, pt) + }, + onTouchStart: (pt) => { + var mt + ct(pt), (mt = dt.onTouchStart) == null || mt.call(dt, pt) + }, + ownerState: ht, + children: ot, + }), + ) + }) + function PickersPopper(tt) { + var et, nt, rt, it + const ot = useThemeProps({ props: tt, name: 'MuiPickersPopper' }), + { + anchorEl: at, + children: st, + containerRef: lt = null, + shouldRestoreFocus: ct, + onBlur: ut, + onDismiss: ht, + open: dt, + role: pt, + placement: mt, + slots: gt, + slotProps: yt, + reduceAnimations: bt, + } = ot + reactExports.useEffect(() => { + function Ft(Nt) { + dt && (Nt.key === 'Escape' || Nt.key === 'Esc') && ht() + } + return ( + document.addEventListener('keydown', Ft), + () => { + document.removeEventListener('keydown', Ft) + } + ) + }, [ht, dt]) + const vt = reactExports.useRef(null) + reactExports.useEffect(() => { + pt === 'tooltip' || + (ct && !ct()) || + (dt + ? (vt.current = getActiveElement(document)) + : vt.current && + vt.current instanceof HTMLElement && + setTimeout(() => { + vt.current instanceof HTMLElement && vt.current.focus() + })) + }, [dt, pt, ct]) + const [xt, kt, St] = useClickAwayListener(dt, ut ?? ht), + Tt = reactExports.useRef(null), + At = useForkRef(Tt, lt), + Et = useForkRef(At, xt), + $t = ot, + Dt = useUtilityClasses$d($t), + jt = useDefaultReduceAnimations(), + Pt = bt ?? jt, + Ct = (Ft) => { + Ft.key === 'Escape' && (Ft.stopPropagation(), ht()) + }, + wt = ((et = gt == null ? void 0 : gt.desktopTransition) != null ? et : Pt) ? Fade$1 : Grow$1, + It = (nt = gt == null ? void 0 : gt.desktopTrapFocus) != null ? nt : FocusTrap, + Ot = (rt = gt == null ? void 0 : gt.desktopPaper) != null ? rt : PickersPopperPaper, + Wt = (it = gt == null ? void 0 : gt.popper) != null ? it : PickersPopperRoot, + zt = useSlotProps({ + elementType: Wt, + externalSlotProps: yt == null ? void 0 : yt.popper, + additionalProps: { transition: !0, role: pt, open: dt, anchorEl: at, placement: mt, onKeyDown: Ct }, + className: Dt.root, + ownerState: ot, + }) + return jsxRuntimeExports.jsx( + Wt, + _extends$u({}, zt, { + children: ({ TransitionProps: Ft, placement: Nt }) => + jsxRuntimeExports.jsx( + It, + _extends$u( + { + open: dt, + disableAutoFocus: !0, + disableRestoreFocus: !0, + disableEnforceFocus: pt === 'tooltip', + isEnabled: () => !0, + }, + yt == null ? void 0 : yt.desktopTrapFocus, + { + children: jsxRuntimeExports.jsx( + wt, + _extends$u({}, Ft, yt == null ? void 0 : yt.desktopTransition, { + children: jsxRuntimeExports.jsx(PickersPopperPaperWrapper, { + PaperComponent: Ot, + ownerState: $t, + popperPlacement: Nt, + ref: Et, + onPaperClick: kt, + onPaperTouchStart: St, + paperClasses: Dt.paper, + paperSlotProps: yt == null ? void 0 : yt.desktopPaper, + children: st, + }), + }), + ), + }, + ), + ), + }), + ) + } + function getPickersToolbarUtilityClass(tt) { + return generateUtilityClass('MuiPickersToolbar', tt) + } + generateUtilityClasses('MuiPickersToolbar', ['root', 'content']) + const useUtilityClasses$c = (tt) => { + const { classes: et, isLandscape: nt } = tt + return composeClasses( + { root: ['root'], content: ['content'], penIconButton: ['penIconButton', nt && 'penIconButtonLandscape'] }, + getPickersToolbarUtilityClass, + et, + ) + }, + PickersToolbarRoot = styled$1('div', { + name: 'MuiPickersToolbar', + slot: 'Root', + overridesResolver: (tt, et) => et.root, + })(({ theme: tt, ownerState: et }) => + _extends$u( + { + display: 'flex', + flexDirection: 'column', + alignItems: 'flex-start', + justifyContent: 'space-between', + padding: tt.spacing(2, 3), + }, + et.isLandscape && { + height: 'auto', + maxWidth: 160, + padding: 16, + justifyContent: 'flex-start', + flexWrap: 'wrap', + }, + ), + ), + PickersToolbarContent = styled$1('div', { + name: 'MuiPickersToolbar', + slot: 'Content', + overridesResolver: (tt, et) => et.content, + })(({ ownerState: tt }) => { + var et + return { + display: 'flex', + flexWrap: 'wrap', + width: '100%', + justifyContent: tt.isLandscape ? 'flex-start' : 'space-between', + flexDirection: tt.isLandscape ? ((et = tt.landscapeDirection) != null ? et : 'column') : 'row', + flex: 1, + alignItems: tt.isLandscape ? 'flex-start' : 'center', + } + }), + PickersToolbar = reactExports.forwardRef(function (et, nt) { + const rt = useThemeProps({ props: et, name: 'MuiPickersToolbar' }), + { children: it, className: ot, toolbarTitle: at, hidden: st, titleId: lt } = rt, + ct = rt, + ut = useUtilityClasses$c(ct) + return st + ? null + : jsxRuntimeExports.jsxs(PickersToolbarRoot, { + ref: nt, + className: clsx(ut.root, ot), + ownerState: ct, + children: [ + jsxRuntimeExports.jsx(Typography$1, { + color: 'text.secondary', + variant: 'overline', + id: lt, + children: at, + }), + jsxRuntimeExports.jsx(PickersToolbarContent, { className: ut.content, ownerState: ct, children: it }), + ], + }) + }), + useOpenState = ({ open: tt, onOpen: et, onClose: nt }) => { + const rt = reactExports.useRef(typeof tt == 'boolean').current, + [it, ot] = reactExports.useState(!1) + reactExports.useEffect(() => { + if (rt) { + if (typeof tt != 'boolean') + throw new Error('You must not mix controlling and uncontrolled mode for `open` prop') + ot(tt) + } + }, [rt, tt]) + const at = reactExports.useCallback( + (st) => { + rt || ot(st), st && et && et(), !st && nt && nt() + }, + [rt, et, nt], + ) + return { isOpen: it, setIsOpen: at } + }, + shouldPublishValue = (tt) => { + const { action: et, hasChanged: nt, dateState: rt, isControlled: it } = tt, + ot = !it && !rt.hasBeenModifiedSinceMount + return et.name === 'setValueFromField' + ? !0 + : et.name === 'setValueFromAction' + ? ot && ['accept', 'today', 'clear'].includes(et.pickerAction) + ? !0 + : nt(rt.lastPublishedValue) + : (et.name === 'setValueFromView' && et.selectionState !== 'shallow') || et.name === 'setValueFromShortcut' + ? ot + ? !0 + : nt(rt.lastPublishedValue) + : !1 + }, + shouldCommitValue = (tt) => { + const { action: et, hasChanged: nt, dateState: rt, isControlled: it, closeOnSelect: ot } = tt, + at = !it && !rt.hasBeenModifiedSinceMount + return et.name === 'setValueFromAction' + ? at && ['accept', 'today', 'clear'].includes(et.pickerAction) + ? !0 + : nt(rt.lastCommittedValue) + : et.name === 'setValueFromView' && et.selectionState === 'finish' && ot + ? at + ? !0 + : nt(rt.lastCommittedValue) + : et.name === 'setValueFromShortcut' + ? et.changeImportance === 'accept' && nt(rt.lastCommittedValue) + : !1 + }, + shouldClosePicker = (tt) => { + const { action: et, closeOnSelect: nt } = tt + return et.name === 'setValueFromAction' + ? !0 + : et.name === 'setValueFromView' + ? et.selectionState === 'finish' && nt + : et.name === 'setValueFromShortcut' + ? et.changeImportance === 'accept' + : !1 + }, + usePickerValue = ({ props: tt, valueManager: et, valueType: nt, wrapperVariant: rt, validator: it }) => { + const { + onAccept: ot, + onChange: at, + value: st, + defaultValue: lt, + closeOnSelect: ct = rt === 'desktop', + selectedSections: ut, + onSelectedSectionsChange: ht, + timezone: dt, + } = tt, + { current: pt } = reactExports.useRef(lt), + { current: mt } = reactExports.useRef(st !== void 0), + gt = useUtils(), + yt = useLocalizationContext(), + [bt, vt] = useControlled({ controlled: ut, default: null, name: 'usePickerValue', state: 'selectedSections' }), + { isOpen: xt, setIsOpen: kt } = useOpenState(tt), + [St, Tt] = reactExports.useState(() => { + let rn + return ( + st !== void 0 ? (rn = st) : pt !== void 0 ? (rn = pt) : (rn = et.emptyValue), + { + draft: rn, + lastPublishedValue: rn, + lastCommittedValue: rn, + lastControlledValue: st, + hasBeenModifiedSinceMount: !1, + } + ) + }), + { timezone: At, handleValueChange: Et } = useValueWithTimezone({ + timezone: dt, + value: st, + defaultValue: pt, + onChange: at, + valueManager: et, + }) + useValidation(_extends$u({}, tt, { value: St.draft, timezone: At }), it, et.isSameError, et.defaultErrorState) + const $t = useEventCallback((rn) => { + const nn = { + action: rn, + dateState: St, + hasChanged: (Qt) => !et.areValuesEqual(gt, rn.value, Qt), + isControlled: mt, + closeOnSelect: ct, + }, + hn = shouldPublishValue(nn), + vn = shouldCommitValue(nn), + an = shouldClosePicker(nn) + if ( + (Tt((Qt) => + _extends$u({}, Qt, { + draft: rn.value, + lastPublishedValue: hn ? rn.value : Qt.lastPublishedValue, + lastCommittedValue: vn ? rn.value : Qt.lastCommittedValue, + hasBeenModifiedSinceMount: !0, + }), + ), + hn) + ) { + const _n = { + validationError: + rn.name === 'setValueFromField' + ? rn.context.validationError + : it({ adapter: yt, value: rn.value, props: _extends$u({}, tt, { value: rn.value, timezone: At }) }), + } + rn.name === 'setValueFromShortcut' && rn.shortcut != null && (_n.shortcut = rn.shortcut), Et(rn.value, _n) + } + vn && ot && ot(rn.value), an && kt(!1) + }) + if (st !== void 0 && (St.lastControlledValue === void 0 || !et.areValuesEqual(gt, St.lastControlledValue, st))) { + const rn = et.areValuesEqual(gt, St.draft, st) + Tt((nn) => + _extends$u( + {}, + nn, + { lastControlledValue: st }, + rn ? {} : { lastCommittedValue: st, lastPublishedValue: st, draft: st, hasBeenModifiedSinceMount: !0 }, + ), + ) + } + const Dt = useEventCallback(() => { + $t({ value: et.emptyValue, name: 'setValueFromAction', pickerAction: 'clear' }) + }), + jt = useEventCallback(() => { + $t({ value: St.lastPublishedValue, name: 'setValueFromAction', pickerAction: 'accept' }) + }), + Pt = useEventCallback(() => { + $t({ value: St.lastPublishedValue, name: 'setValueFromAction', pickerAction: 'dismiss' }) + }), + Ct = useEventCallback(() => { + $t({ value: St.lastCommittedValue, name: 'setValueFromAction', pickerAction: 'cancel' }) + }), + wt = useEventCallback(() => { + $t({ value: et.getTodayValue(gt, At, nt), name: 'setValueFromAction', pickerAction: 'today' }) + }), + It = useEventCallback(() => kt(!0)), + Ot = useEventCallback(() => kt(!1)), + Wt = useEventCallback((rn, nn = 'partial') => $t({ name: 'setValueFromView', value: rn, selectionState: nn })), + zt = useEventCallback((rn, nn, hn) => + $t({ name: 'setValueFromShortcut', value: rn, changeImportance: nn ?? 'accept', shortcut: hn }), + ), + Ft = useEventCallback((rn, nn) => $t({ name: 'setValueFromField', value: rn, context: nn })), + Nt = useEventCallback((rn) => { + vt(rn), ht == null || ht(rn) + }), + Ut = { onClear: Dt, onAccept: jt, onDismiss: Pt, onCancel: Ct, onSetToday: wt, onOpen: It, onClose: Ot }, + Mt = { value: St.draft, onChange: Ft, selectedSections: bt, onSelectedSectionsChange: Nt }, + Ht = reactExports.useMemo(() => et.cleanValue(gt, St.draft), [gt, et, St.draft]), + en = { value: Ht, onChange: Wt, onClose: Ot, open: xt, onSelectedSectionsChange: Nt }, + Kt = _extends$u({}, Ut, { + value: Ht, + onChange: Wt, + onSelectShortcut: zt, + isValid: (rn) => { + const nn = it({ adapter: yt, value: rn, props: _extends$u({}, tt, { value: rn, timezone: At }) }) + return !et.hasError(nn) + }, + }) + return { open: xt, fieldProps: Mt, viewProps: en, layoutProps: Kt, actions: Ut } + }, + _excluded$z = ['className', 'sx'], + usePickerViews = ({ + props: tt, + propsFromPickerValue: et, + additionalViewProps: nt, + inputRef: rt, + autoFocusView: it, + }) => { + const { onChange: ot, open: at, onSelectedSectionsChange: st, onClose: lt } = et, + { views: ct, openTo: ut, onViewChange: ht, disableOpenPicker: dt, viewRenderers: pt, timezone: mt } = tt, + gt = _objectWithoutPropertiesLoose$m(tt, _excluded$z), + { + view: yt, + setView: bt, + defaultView: vt, + focusedView: xt, + setFocusedView: kt, + setValueAndGoToNextView: St, + } = useViews({ view: void 0, views: ct, openTo: ut, onChange: ot, onViewChange: ht, autoFocus: it }), + { hasUIView: Tt, viewModeLookup: At } = reactExports.useMemo( + () => + ct.reduce( + (wt, It) => { + let Ot + return ( + dt ? (Ot = 'field') : pt[It] != null ? (Ot = 'UI') : (Ot = 'field'), + (wt.viewModeLookup[It] = Ot), + Ot === 'UI' && (wt.hasUIView = !0), + wt + ) + }, + { hasUIView: !1, viewModeLookup: {} }, + ), + [dt, pt, ct], + ), + Et = reactExports.useMemo( + () => ct.reduce((wt, It) => (pt[It] != null && isTimeView(It) ? wt + 1 : wt), 0), + [pt, ct], + ), + $t = At[yt], + Dt = useEventCallback(() => $t === 'UI'), + [jt, Pt] = reactExports.useState($t === 'UI' ? yt : null) + return ( + jt !== yt && At[yt] === 'UI' && Pt(yt), + useEnhancedEffect$1(() => { + $t === 'field' && + at && + (lt(), + setTimeout(() => { + rt == null || rt.current.focus(), st(yt) + })) + }, [yt]), + useEnhancedEffect$1(() => { + if (!at) return + let wt = yt + $t === 'field' && jt != null && (wt = jt), + wt !== vt && At[wt] === 'UI' && At[vt] === 'UI' && (wt = vt), + wt !== yt && bt(wt), + kt(wt, !0) + }, [at]), + { + hasUIView: Tt, + shouldRestoreFocus: Dt, + layoutProps: { views: ct, view: jt, onViewChange: bt }, + renderCurrentView: () => { + if (jt == null) return null + const wt = pt[jt] + return wt == null + ? null + : wt( + _extends$u({}, gt, nt, et, { + views: ct, + timezone: mt, + onChange: St, + view: jt, + onViewChange: bt, + focusedView: xt, + onFocusedViewChange: kt, + showViewSwitcher: Et > 1, + timeViewsCount: Et, + }), + ) + }, + } + ) + } + function getOrientation() { + return typeof window > 'u' + ? 'portrait' + : window.screen && window.screen.orientation && window.screen.orientation.angle + ? Math.abs(window.screen.orientation.angle) === 90 + ? 'landscape' + : 'portrait' + : window.orientation && Math.abs(Number(window.orientation)) === 90 + ? 'landscape' + : 'portrait' + } + const useIsLandscape = (tt, et) => { + const [nt, rt] = reactExports.useState(getOrientation) + return ( + useEnhancedEffect$1(() => { + const ot = () => { + rt(getOrientation()) + } + return ( + window.addEventListener('orientationchange', ot), + () => { + window.removeEventListener('orientationchange', ot) + } + ) + }, []), + arrayIncludes$2(tt, ['hours', 'minutes', 'seconds']) ? !1 : (et || nt) === 'landscape' + ) + }, + usePickerLayoutProps = ({ props: tt, propsFromPickerValue: et, propsFromPickerViews: nt, wrapperVariant: rt }) => { + const { orientation: it } = tt, + ot = useIsLandscape(nt.views, it) + return { + layoutProps: _extends$u({}, nt, et, { + isLandscape: ot, + wrapperVariant: rt, + disabled: tt.disabled, + readOnly: tt.readOnly, + }), + } + }, + buildWarning = (tt, et = 'warning') => { + let nt = !1 + const rt = Array.isArray(tt) + ? tt.join(` +`) + : tt + return () => { + nt || ((nt = !0), et === 'error' ? console.error(rt) : console.warn(rt)) + } + } + buildWarning([ + 'The `renderInput` prop has been removed in version 6.0 of the Date and Time Pickers.', + 'You can replace it with the `textField` component slot in most cases.', + 'For more information, please have a look at the migration guide (https://mui.com/x/migration/migration-pickers-v5/#input-renderer-required-in-v5).', + ]) + const usePicker = ({ + props: tt, + valueManager: et, + valueType: nt, + wrapperVariant: rt, + inputRef: it, + additionalViewProps: ot, + validator: at, + autoFocusView: st, + }) => { + const lt = usePickerValue({ props: tt, valueManager: et, valueType: nt, wrapperVariant: rt, validator: at }), + ct = usePickerViews({ + props: tt, + inputRef: it, + additionalViewProps: ot, + autoFocusView: st, + propsFromPickerValue: lt.viewProps, + }), + ut = usePickerLayoutProps({ + props: tt, + wrapperVariant: rt, + propsFromPickerValue: lt.layoutProps, + propsFromPickerViews: ct.layoutProps, + }) + return { + open: lt.open, + actions: lt.actions, + fieldProps: lt.fieldProps, + renderCurrentView: ct.renderCurrentView, + hasUIView: ct.hasUIView, + shouldRestoreFocus: ct.shouldRestoreFocus, + layoutProps: ut.layoutProps, + } + } + function getPickersLayoutUtilityClass(tt) { + return generateUtilityClass('MuiPickersLayout', tt) + } + const pickersLayoutClasses = generateUtilityClasses('MuiPickersLayout', [ + 'root', + 'landscape', + 'contentWrapper', + 'toolbar', + 'actionBar', + 'shortcuts', + ]), + _excluded$y = ['onAccept', 'onClear', 'onCancel', 'onSetToday', 'actions'] + function PickersActionBar(tt) { + const { onAccept: et, onClear: nt, onCancel: rt, onSetToday: it, actions: ot } = tt, + at = _objectWithoutPropertiesLoose$m(tt, _excluded$y), + st = useLocaleText() + if (ot == null || ot.length === 0) return null + const lt = + ot == null + ? void 0 + : ot.map((ct) => { + switch (ct) { + case 'clear': + return jsxRuntimeExports.jsx(Button$2, { onClick: nt, children: st.clearButtonLabel }, ct) + case 'cancel': + return jsxRuntimeExports.jsx(Button$2, { onClick: rt, children: st.cancelButtonLabel }, ct) + case 'accept': + return jsxRuntimeExports.jsx(Button$2, { onClick: et, children: st.okButtonLabel }, ct) + case 'today': + return jsxRuntimeExports.jsx(Button$2, { onClick: it, children: st.todayButtonLabel }, ct) + default: + return null + } + }) + return jsxRuntimeExports.jsx(DialogActions$1, _extends$u({}, at, { children: lt })) + } + const _excluded$x = ['items', 'changeImportance', 'isLandscape', 'onChange', 'isValid'], + _excluded2$a = ['getValue'] + function PickersShortcuts(tt) { + const { items: et, changeImportance: nt, onChange: rt, isValid: it } = tt, + ot = _objectWithoutPropertiesLoose$m(tt, _excluded$x) + if (et == null || et.length === 0) return null + const at = et.map((st) => { + let { getValue: lt } = st, + ct = _objectWithoutPropertiesLoose$m(st, _excluded2$a) + const ut = lt({ isValid: it }) + return { + label: ct.label, + onClick: () => { + rt(ut, nt, ct) + }, + disabled: !it(ut), + } + }) + return jsxRuntimeExports.jsx( + List$1, + _extends$u( + { + dense: !0, + sx: [ + { maxHeight: VIEW_HEIGHT, maxWidth: 200, overflow: 'auto' }, + ...(Array.isArray(ot.sx) ? ot.sx : [ot.sx]), + ], + }, + ot, + { + children: at.map((st) => + jsxRuntimeExports.jsx( + ListItem$1, + { children: jsxRuntimeExports.jsx(Chip$1, _extends$u({}, st)) }, + st.label, + ), + ), + }, + ), + ) + } + function toolbarHasView(tt) { + return tt.view !== null + } + const useUtilityClasses$b = (tt) => { + const { classes: et, isLandscape: nt } = tt + return composeClasses( + { + root: ['root', nt && 'landscape'], + contentWrapper: ['contentWrapper'], + toolbar: ['toolbar'], + actionBar: ['actionBar'], + tabs: ['tabs'], + landscape: ['landscape'], + shortcuts: ['shortcuts'], + }, + getPickersLayoutUtilityClass, + et, + ) + }, + usePickerLayout = (tt) => { + var et, nt + const { + wrapperVariant: rt, + onAccept: it, + onClear: ot, + onCancel: at, + onSetToday: st, + view: lt, + views: ct, + onViewChange: ut, + value: ht, + onChange: dt, + onSelectShortcut: pt, + isValid: mt, + isLandscape: gt, + disabled: yt, + readOnly: bt, + children: vt, + components: xt, + componentsProps: kt, + slots: St, + slotProps: Tt, + } = tt, + At = St ?? uncapitalizeObjectKeys(xt), + Et = Tt ?? kt, + $t = useUtilityClasses$b(tt), + Dt = (et = At == null ? void 0 : At.actionBar) != null ? et : PickersActionBar, + jt = useSlotProps({ + elementType: Dt, + externalSlotProps: Et == null ? void 0 : Et.actionBar, + additionalProps: { + onAccept: it, + onClear: ot, + onCancel: at, + onSetToday: st, + actions: rt === 'desktop' ? [] : ['cancel', 'accept'], + className: $t.actionBar, + }, + ownerState: _extends$u({}, tt, { wrapperVariant: rt }), + }), + Pt = jsxRuntimeExports.jsx(Dt, _extends$u({}, jt)), + Ct = At == null ? void 0 : At.toolbar, + wt = useSlotProps({ + elementType: Ct, + externalSlotProps: Et == null ? void 0 : Et.toolbar, + additionalProps: { + isLandscape: gt, + onChange: dt, + value: ht, + view: lt, + onViewChange: ut, + views: ct, + disabled: yt, + readOnly: bt, + className: $t.toolbar, + }, + ownerState: _extends$u({}, tt, { wrapperVariant: rt }), + }), + It = toolbarHasView(wt) && Ct ? jsxRuntimeExports.jsx(Ct, _extends$u({}, wt)) : null, + Ot = vt, + Wt = At == null ? void 0 : At.tabs, + zt = + lt && Wt + ? jsxRuntimeExports.jsx(Wt, _extends$u({ view: lt, onViewChange: ut }, Et == null ? void 0 : Et.tabs)) + : null, + Ft = (nt = At == null ? void 0 : At.shortcuts) != null ? nt : PickersShortcuts, + Nt = useSlotProps({ + elementType: Ft, + externalSlotProps: Et == null ? void 0 : Et.shortcuts, + additionalProps: { isValid: mt, isLandscape: gt, onChange: pt, className: $t.shortcuts }, + ownerState: { isValid: mt, isLandscape: gt, onChange: pt, className: $t.shortcuts, wrapperVariant: rt }, + }), + Ut = lt && Ft ? jsxRuntimeExports.jsx(Ft, _extends$u({}, Nt)) : null + return { toolbar: It, content: Ot, tabs: zt, actionBar: Pt, shortcuts: Ut } + }, + usePickerLayout$1 = usePickerLayout, + useUtilityClasses$a = (tt) => { + const { isLandscape: et, classes: nt } = tt + return composeClasses( + { root: ['root', et && 'landscape'], contentWrapper: ['contentWrapper'] }, + getPickersLayoutUtilityClass, + nt, + ) + }, + PickersLayoutRoot = styled$1('div', { + name: 'MuiPickersLayout', + slot: 'Root', + overridesResolver: (tt, et) => et.root, + })(({ theme: tt, ownerState: et }) => ({ + display: 'grid', + gridAutoColumns: 'max-content auto max-content', + gridAutoRows: 'max-content auto max-content', + [`& .${pickersLayoutClasses.toolbar}`]: et.isLandscape + ? { gridColumn: tt.direction === 'rtl' ? 3 : 1, gridRow: '2 / 3' } + : { gridColumn: '2 / 4', gridRow: 1 }, + [`.${pickersLayoutClasses.shortcuts}`]: et.isLandscape + ? { gridColumn: '2 / 4', gridRow: 1 } + : { gridColumn: tt.direction === 'rtl' ? 3 : 1, gridRow: '2 / 3' }, + [`& .${pickersLayoutClasses.actionBar}`]: { gridColumn: '1 / 4', gridRow: 3 }, + })) + PickersLayoutRoot.propTypes = { + as: PropTypes.elementType, + ownerState: PropTypes.shape({ isLandscape: PropTypes.bool.isRequired }).isRequired, + sx: PropTypes.oneOfType([ + PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), + PropTypes.func, + PropTypes.object, + ]), + } + const PickersLayoutContentWrapper = styled$1('div', { + name: 'MuiPickersLayout', + slot: 'ContentWrapper', + overridesResolver: (tt, et) => et.contentWrapper, + })({ gridColumn: 2, gridRow: 2, display: 'flex', flexDirection: 'column' }), + PickersLayout = function (et) { + const nt = useThemeProps({ props: et, name: 'MuiPickersLayout' }), + { toolbar: rt, content: it, tabs: ot, actionBar: at, shortcuts: st } = usePickerLayout$1(nt), + { sx: lt, className: ct, isLandscape: ut, ref: ht, wrapperVariant: dt } = nt, + pt = nt, + mt = useUtilityClasses$a(pt) + return jsxRuntimeExports.jsxs(PickersLayoutRoot, { + ref: ht, + sx: lt, + className: clsx(ct, mt.root), + ownerState: pt, + children: [ + ut ? st : rt, + ut ? rt : st, + jsxRuntimeExports.jsx(PickersLayoutContentWrapper, { + className: mt.contentWrapper, + children: + dt === 'desktop' + ? jsxRuntimeExports.jsxs(reactExports.Fragment, { children: [it, ot] }) + : jsxRuntimeExports.jsxs(reactExports.Fragment, { children: [ot, it] }), + }), + at, + ], + }) + }, + getPickersSlideTransitionUtilityClass = (tt) => generateUtilityClass('MuiPickersSlideTransition', tt), + pickersSlideTransitionClasses = generateUtilityClasses('MuiPickersSlideTransition', [ + 'root', + 'slideEnter-left', + 'slideEnter-right', + 'slideEnterActive', + 'slideExit', + 'slideExitActiveLeft-left', + 'slideExitActiveLeft-right', + ]), + _excluded$w = ['children', 'className', 'reduceAnimations', 'slideDirection', 'transKey', 'classes'], + useUtilityClasses$9 = (tt) => { + const { classes: et, slideDirection: nt } = tt, + rt = { + root: ['root'], + exit: ['slideExit'], + enterActive: ['slideEnterActive'], + enter: [`slideEnter-${nt}`], + exitActive: [`slideExitActiveLeft-${nt}`], + } + return composeClasses(rt, getPickersSlideTransitionUtilityClass, et) + }, + PickersSlideTransitionRoot = styled$1(TransitionGroup$1, { + name: 'MuiPickersSlideTransition', + slot: 'Root', + overridesResolver: (tt, et) => [ + et.root, + { [`.${pickersSlideTransitionClasses['slideEnter-left']}`]: et['slideEnter-left'] }, + { [`.${pickersSlideTransitionClasses['slideEnter-right']}`]: et['slideEnter-right'] }, + { [`.${pickersSlideTransitionClasses.slideEnterActive}`]: et.slideEnterActive }, + { [`.${pickersSlideTransitionClasses.slideExit}`]: et.slideExit }, + { [`.${pickersSlideTransitionClasses['slideExitActiveLeft-left']}`]: et['slideExitActiveLeft-left'] }, + { [`.${pickersSlideTransitionClasses['slideExitActiveLeft-right']}`]: et['slideExitActiveLeft-right'] }, + ], + })(({ theme: tt }) => { + const et = tt.transitions.create('transform', { + duration: tt.transitions.duration.complex, + easing: 'cubic-bezier(0.35, 0.8, 0.4, 1)', + }) + return { + display: 'block', + position: 'relative', + overflowX: 'hidden', + '& > *': { position: 'absolute', top: 0, right: 0, left: 0 }, + [`& .${pickersSlideTransitionClasses['slideEnter-left']}`]: { + willChange: 'transform', + transform: 'translate(100%)', + zIndex: 1, + }, + [`& .${pickersSlideTransitionClasses['slideEnter-right']}`]: { + willChange: 'transform', + transform: 'translate(-100%)', + zIndex: 1, + }, + [`& .${pickersSlideTransitionClasses.slideEnterActive}`]: { transform: 'translate(0%)', transition: et }, + [`& .${pickersSlideTransitionClasses.slideExit}`]: { transform: 'translate(0%)' }, + [`& .${pickersSlideTransitionClasses['slideExitActiveLeft-left']}`]: { + willChange: 'transform', + transform: 'translate(-100%)', + transition: et, + zIndex: 0, + }, + [`& .${pickersSlideTransitionClasses['slideExitActiveLeft-right']}`]: { + willChange: 'transform', + transform: 'translate(100%)', + transition: et, + zIndex: 0, + }, + } + }) + function PickersSlideTransition(tt) { + const et = useThemeProps({ props: tt, name: 'MuiPickersSlideTransition' }), + { children: nt, className: rt, reduceAnimations: it, transKey: ot } = et, + at = _objectWithoutPropertiesLoose$m(et, _excluded$w), + st = useUtilityClasses$9(et), + lt = useTheme() + if (it) return jsxRuntimeExports.jsx('div', { className: clsx(st.root, rt), children: nt }) + const ct = { exit: st.exit, enterActive: st.enterActive, enter: st.enter, exitActive: st.exitActive } + return jsxRuntimeExports.jsx(PickersSlideTransitionRoot, { + className: clsx(st.root, rt), + childFactory: (ut) => reactExports.cloneElement(ut, { classNames: ct }), + role: 'presentation', + children: jsxRuntimeExports.jsx( + CSSTransition$1, + _extends$u( + { mountOnEnter: !0, unmountOnExit: !0, timeout: lt.transitions.duration.complex, classNames: ct }, + at, + { children: nt }, + ), + ot, + ), + }) + } + const useIsDateDisabled = ({ + shouldDisableDate: tt, + shouldDisableMonth: et, + shouldDisableYear: nt, + minDate: rt, + maxDate: it, + disableFuture: ot, + disablePast: at, + timezone: st, + }) => { + const lt = useLocalizationContext() + return reactExports.useCallback( + (ct) => + validateDate({ + adapter: lt, + value: ct, + props: { + shouldDisableDate: tt, + shouldDisableMonth: et, + shouldDisableYear: nt, + minDate: rt, + maxDate: it, + disableFuture: ot, + disablePast: at, + timezone: st, + }, + }) !== null, + [lt, tt, et, nt, rt, it, ot, at, st], + ) + }, + getDayCalendarUtilityClass = (tt) => generateUtilityClass('MuiDayCalendar', tt) + generateUtilityClasses('MuiDayCalendar', [ + 'root', + 'header', + 'weekDayLabel', + 'loadingContainer', + 'slideTransition', + 'monthContainer', + 'weekContainer', + 'weekNumberLabel', + 'weekNumber', + ]) + const _excluded$v = [ + 'parentProps', + 'day', + 'focusableDay', + 'selectedDays', + 'isDateDisabled', + 'currentMonthNumber', + 'isViewFocused', + ], + _excluded2$9 = ['ownerState'], + useUtilityClasses$8 = (tt) => { + const { classes: et } = tt + return composeClasses( + { + root: ['root'], + header: ['header'], + weekDayLabel: ['weekDayLabel'], + loadingContainer: ['loadingContainer'], + slideTransition: ['slideTransition'], + monthContainer: ['monthContainer'], + weekContainer: ['weekContainer'], + weekNumberLabel: ['weekNumberLabel'], + weekNumber: ['weekNumber'], + }, + getDayCalendarUtilityClass, + et, + ) + }, + weeksContainerHeight = (DAY_SIZE + DAY_MARGIN * 2) * 6, + PickersCalendarDayRoot = styled$1('div', { + name: 'MuiDayCalendar', + slot: 'Root', + overridesResolver: (tt, et) => et.root, + })({}), + PickersCalendarDayHeader = styled$1('div', { + name: 'MuiDayCalendar', + slot: 'Header', + overridesResolver: (tt, et) => et.header, + })({ display: 'flex', justifyContent: 'center', alignItems: 'center' }), + PickersCalendarWeekDayLabel = styled$1(Typography$1, { + name: 'MuiDayCalendar', + slot: 'WeekDayLabel', + overridesResolver: (tt, et) => et.weekDayLabel, + })(({ theme: tt }) => ({ + width: 36, + height: 40, + margin: '0 2px', + textAlign: 'center', + display: 'flex', + justifyContent: 'center', + alignItems: 'center', + color: (tt.vars || tt).palette.text.secondary, + })), + PickersCalendarWeekNumberLabel = styled$1(Typography$1, { + name: 'MuiDayCalendar', + slot: 'WeekNumberLabel', + overridesResolver: (tt, et) => et.weekNumberLabel, + })(({ theme: tt }) => ({ + width: 36, + height: 40, + margin: '0 2px', + textAlign: 'center', + display: 'flex', + justifyContent: 'center', + alignItems: 'center', + color: tt.palette.text.disabled, + })), + PickersCalendarWeekNumber = styled$1(Typography$1, { + name: 'MuiDayCalendar', + slot: 'WeekNumber', + overridesResolver: (tt, et) => et.weekNumber, + })(({ theme: tt }) => + _extends$u({}, tt.typography.caption, { + width: DAY_SIZE, + height: DAY_SIZE, + padding: 0, + margin: `0 ${DAY_MARGIN}px`, + color: tt.palette.text.disabled, + fontSize: '0.75rem', + alignItems: 'center', + justifyContent: 'center', + display: 'inline-flex', + }), + ), + PickersCalendarLoadingContainer = styled$1('div', { + name: 'MuiDayCalendar', + slot: 'LoadingContainer', + overridesResolver: (tt, et) => et.loadingContainer, + })({ display: 'flex', justifyContent: 'center', alignItems: 'center', minHeight: weeksContainerHeight }), + PickersCalendarSlideTransition = styled$1(PickersSlideTransition, { + name: 'MuiDayCalendar', + slot: 'SlideTransition', + overridesResolver: (tt, et) => et.slideTransition, + })({ minHeight: weeksContainerHeight }), + PickersCalendarWeekContainer = styled$1('div', { + name: 'MuiDayCalendar', + slot: 'MonthContainer', + overridesResolver: (tt, et) => et.monthContainer, + })({ overflow: 'hidden' }), + PickersCalendarWeek = styled$1('div', { + name: 'MuiDayCalendar', + slot: 'WeekContainer', + overridesResolver: (tt, et) => et.weekContainer, + })({ margin: `${DAY_MARGIN}px 0`, display: 'flex', justifyContent: 'center' }) + function WrappedDay(tt) { + var et, nt, rt + let { + parentProps: it, + day: ot, + focusableDay: at, + selectedDays: st, + isDateDisabled: lt, + currentMonthNumber: ct, + isViewFocused: ut, + } = tt, + ht = _objectWithoutPropertiesLoose$m(tt, _excluded$v) + const { + disabled: dt, + disableHighlightToday: pt, + isMonthSwitchingAnimating: mt, + showDaysOutsideCurrentMonth: gt, + components: yt, + componentsProps: bt, + slots: vt, + slotProps: xt, + timezone: kt, + } = it, + St = useUtils(), + Tt = useNow(kt), + At = at !== null && St.isSameDay(ot, at), + Et = st.some((Wt) => St.isSameDay(Wt, ot)), + $t = St.isSameDay(ot, Tt), + Dt = + (et = (nt = vt == null ? void 0 : vt.day) != null ? nt : yt == null ? void 0 : yt.Day) != null + ? et + : PickersDay, + jt = useSlotProps({ + elementType: Dt, + externalSlotProps: (rt = xt == null ? void 0 : xt.day) != null ? rt : bt == null ? void 0 : bt.day, + additionalProps: _extends$u( + { + disableHighlightToday: pt, + showDaysOutsideCurrentMonth: gt, + role: 'gridcell', + isAnimating: mt, + 'data-timestamp': St.toJsDate(ot).valueOf(), + }, + ht, + ), + ownerState: _extends$u({}, it, { day: ot, selected: Et }), + }), + Pt = _objectWithoutPropertiesLoose$m(jt, _excluded2$9), + Ct = reactExports.useMemo(() => dt || lt(ot), [dt, lt, ot]), + wt = reactExports.useMemo(() => St.getMonth(ot) !== ct, [St, ot, ct]), + It = reactExports.useMemo(() => { + const Wt = St.startOfMonth(St.setMonth(ot, ct)) + return gt ? St.isSameDay(ot, St.startOfWeek(Wt)) : St.isSameDay(ot, Wt) + }, [ct, ot, gt, St]), + Ot = reactExports.useMemo(() => { + const Wt = St.endOfMonth(St.setMonth(ot, ct)) + return gt ? St.isSameDay(ot, St.endOfWeek(Wt)) : St.isSameDay(ot, Wt) + }, [ct, ot, gt, St]) + return jsxRuntimeExports.jsx( + Dt, + _extends$u({}, Pt, { + day: ot, + disabled: Ct, + autoFocus: ut && At, + today: $t, + outsideCurrentMonth: wt, + isFirstVisibleCell: It, + isLastVisibleCell: Ot, + selected: Et, + tabIndex: At ? 0 : -1, + 'aria-selected': Et, + 'aria-current': $t ? 'date' : void 0, + }), + ) + } + function DayCalendar(tt) { + const et = useThemeProps({ props: tt, name: 'MuiDayCalendar' }), + { + onFocusedDayChange: nt, + className: rt, + currentMonth: it, + selectedDays: ot, + focusedDay: at, + loading: st, + onSelectedDaysChange: lt, + onMonthSwitchingAnimationEnd: ct, + readOnly: ut, + reduceAnimations: ht, + renderLoading: dt = () => jsxRuntimeExports.jsx('span', { children: '...' }), + slideDirection: pt, + TransitionProps: mt, + disablePast: gt, + disableFuture: yt, + minDate: bt, + maxDate: vt, + shouldDisableDate: xt, + shouldDisableMonth: kt, + shouldDisableYear: St, + dayOfWeekFormatter: Tt, + hasFocus: At, + onFocusedViewChange: Et, + gridLabelId: $t, + displayWeekNumber: Dt, + fixedWeekNumber: jt, + autoFocus: Pt, + timezone: Ct, + } = et, + wt = useNow(Ct), + It = useUtils(), + Ot = useUtilityClasses$8(et), + zt = useTheme().direction === 'rtl', + Ft = Tt || ((cn, mn) => It.format(mn, 'weekdayShort').charAt(0).toUpperCase()), + Nt = useIsDateDisabled({ + shouldDisableDate: xt, + shouldDisableMonth: kt, + shouldDisableYear: St, + minDate: bt, + maxDate: vt, + disablePast: gt, + disableFuture: yt, + timezone: Ct, + }), + Ut = useLocaleText(), + [Mt, Ht] = useControlled({ name: 'DayCalendar', state: 'hasFocus', controlled: At, default: Pt ?? !1 }), + [en, sn] = reactExports.useState(() => at || wt), + Kt = useEventCallback((cn) => { + ut || lt(cn) + }), + rn = (cn) => { + Nt(cn) || (nt(cn), sn(cn), Et == null || Et(!0), Ht(!0)) + }, + nn = useEventCallback((cn, mn) => { + switch (cn.key) { + case 'ArrowUp': + rn(It.addDays(mn, -7)), cn.preventDefault() + break + case 'ArrowDown': + rn(It.addDays(mn, 7)), cn.preventDefault() + break + case 'ArrowLeft': { + const In = It.addDays(mn, zt ? 1 : -1), + An = It.addMonths(mn, zt ? 1 : -1), + wn = findClosestEnabledDate({ + utils: It, + date: In, + minDate: zt ? In : It.startOfMonth(An), + maxDate: zt ? It.endOfMonth(An) : In, + isDateDisabled: Nt, + timezone: Ct, + }) + rn(wn || In), cn.preventDefault() + break + } + case 'ArrowRight': { + const In = It.addDays(mn, zt ? -1 : 1), + An = It.addMonths(mn, zt ? -1 : 1), + wn = findClosestEnabledDate({ + utils: It, + date: In, + minDate: zt ? It.startOfMonth(An) : In, + maxDate: zt ? In : It.endOfMonth(An), + isDateDisabled: Nt, + timezone: Ct, + }) + rn(wn || In), cn.preventDefault() + break + } + case 'Home': + rn(It.startOfWeek(mn)), cn.preventDefault() + break + case 'End': + rn(It.endOfWeek(mn)), cn.preventDefault() + break + case 'PageUp': + rn(It.addMonths(mn, 1)), cn.preventDefault() + break + case 'PageDown': + rn(It.addMonths(mn, -1)), cn.preventDefault() + break + } + }), + hn = useEventCallback((cn, mn) => rn(mn)), + vn = useEventCallback((cn, mn) => { + Mt && It.isSameDay(en, mn) && (Et == null || Et(!1)) + }), + an = It.getMonth(it), + Qt = reactExports.useMemo(() => ot.filter((cn) => !!cn).map((cn) => It.startOfDay(cn)), [It, ot]), + _n = an, + Pn = reactExports.useMemo(() => reactExports.createRef(), [_n]), + $n = It.startOfWeek(wt), + Nn = reactExports.useMemo(() => { + const cn = It.startOfMonth(it), + mn = It.endOfMonth(it) + return Nt(en) || It.isAfterDay(en, mn) || It.isBeforeDay(en, cn) + ? findClosestEnabledDate({ + utils: It, + date: en, + minDate: cn, + maxDate: mn, + disablePast: gt, + disableFuture: yt, + isDateDisabled: Nt, + timezone: Ct, + }) + : en + }, [it, yt, gt, en, Nt, It, Ct]), + Tn = reactExports.useMemo(() => { + const cn = It.setTimezone(it, Ct), + mn = It.getWeekArray(cn) + let In = It.addMonths(cn, 1) + for (; jt && mn.length < jt; ) { + const An = It.getWeekArray(In), + wn = It.isSameDay(mn[mn.length - 1][0], An[0][0]) + An.slice(wn ? 1 : 0).forEach((fn) => { + mn.length < jt && mn.push(fn) + }), + (In = It.addMonths(In, 1)) + } + return mn + }, [it, jt, It, Ct]) + return jsxRuntimeExports.jsxs(PickersCalendarDayRoot, { + role: 'grid', + 'aria-labelledby': $t, + className: Ot.root, + children: [ + jsxRuntimeExports.jsxs(PickersCalendarDayHeader, { + role: 'row', + className: Ot.header, + children: [ + Dt && + jsxRuntimeExports.jsx(PickersCalendarWeekNumberLabel, { + variant: 'caption', + role: 'columnheader', + 'aria-label': Ut.calendarWeekNumberHeaderLabel, + className: Ot.weekNumberLabel, + children: Ut.calendarWeekNumberHeaderText, + }), + getWeekdays(It, wt).map((cn, mn) => { + var In + const An = It.format(cn, 'weekdayShort').slice(0, 2) + return jsxRuntimeExports.jsx( + PickersCalendarWeekDayLabel, + { + variant: 'caption', + role: 'columnheader', + 'aria-label': It.format(It.addDays($n, mn), 'weekday'), + className: Ot.weekDayLabel, + children: (In = Ft == null ? void 0 : Ft(An, cn)) != null ? In : An, + }, + An + mn.toString(), + ) + }), + ], + }), + st + ? jsxRuntimeExports.jsx(PickersCalendarLoadingContainer, { className: Ot.loadingContainer, children: dt() }) + : jsxRuntimeExports.jsx( + PickersCalendarSlideTransition, + _extends$u( + { + transKey: _n, + onExited: ct, + reduceAnimations: ht, + slideDirection: pt, + className: clsx(rt, Ot.slideTransition), + }, + mt, + { + nodeRef: Pn, + children: jsxRuntimeExports.jsx(PickersCalendarWeekContainer, { + ref: Pn, + role: 'rowgroup', + className: Ot.monthContainer, + children: Tn.map((cn, mn) => + jsxRuntimeExports.jsxs( + PickersCalendarWeek, + { + role: 'row', + className: Ot.weekContainer, + 'aria-rowindex': mn + 1, + children: [ + Dt && + jsxRuntimeExports.jsx(PickersCalendarWeekNumber, { + className: Ot.weekNumber, + role: 'rowheader', + 'aria-label': Ut.calendarWeekNumberAriaLabelText(It.getWeekNumber(cn[0])), + children: Ut.calendarWeekNumberText(It.getWeekNumber(cn[0])), + }), + cn.map((In, An) => + jsxRuntimeExports.jsx( + WrappedDay, + { + parentProps: et, + day: In, + selectedDays: Qt, + focusableDay: Nn, + onKeyDown: nn, + onFocus: hn, + onBlur: vn, + onDaySelect: Kt, + isDateDisabled: Nt, + currentMonthNumber: an, + isViewFocused: Mt, + 'aria-colindex': An + 1, + }, + In.toString(), + ), + ), + ], + }, + `week-${cn[0]}`, + ), + ), + }), + }, + ), + ), + ], + }) + } + const createCalendarStateReducer = (tt, et, nt) => (rt, it) => { + switch (it.type) { + case 'changeMonth': + return _extends$u({}, rt, { + slideDirection: it.direction, + currentMonth: it.newMonth, + isMonthSwitchingAnimating: !tt, + }) + case 'finishMonthSwitchingAnimation': + return _extends$u({}, rt, { isMonthSwitchingAnimating: !1 }) + case 'changeFocusedDay': { + if (rt.focusedDay != null && it.focusedDay != null && nt.isSameDay(it.focusedDay, rt.focusedDay)) return rt + const ot = it.focusedDay != null && !et && !nt.isSameMonth(rt.currentMonth, it.focusedDay) + return _extends$u({}, rt, { + focusedDay: it.focusedDay, + isMonthSwitchingAnimating: ot && !tt && !it.withoutMonthSwitchingAnimation, + currentMonth: ot ? nt.startOfMonth(it.focusedDay) : rt.currentMonth, + slideDirection: it.focusedDay != null && nt.isAfterDay(it.focusedDay, rt.currentMonth) ? 'left' : 'right', + }) + } + default: + throw new Error('missing support') + } + }, + useCalendarState = (tt) => { + const { + value: et, + referenceDate: nt, + defaultCalendarMonth: rt, + disableFuture: it, + disablePast: ot, + disableSwitchToMonthOnDayFocus: at = !1, + maxDate: st, + minDate: lt, + onMonthChange: ct, + reduceAnimations: ut, + shouldDisableDate: ht, + timezone: dt, + } = tt, + pt = useNow(dt), + mt = useUtils(), + gt = reactExports.useRef(createCalendarStateReducer(!!ut, at, mt)).current, + yt = reactExports.useMemo(() => { + let Et = null + return ( + nt ? (Et = nt) : rt && (Et = mt.startOfMonth(rt)), + singleItemValueManager.getInitialReferenceValue({ + value: et, + utils: mt, + timezone: dt, + props: tt, + referenceDate: Et, + granularity: SECTION_TYPE_GRANULARITY.day, + }) + ) + }, []), + [bt, vt] = reactExports.useReducer(gt, { + isMonthSwitchingAnimating: !1, + focusedDay: et || pt, + currentMonth: mt.startOfMonth(yt), + slideDirection: 'left', + }), + xt = reactExports.useCallback( + (Et) => { + vt(_extends$u({ type: 'changeMonth' }, Et)), ct && ct(Et.newMonth) + }, + [ct], + ), + kt = reactExports.useCallback( + (Et) => { + const $t = Et + mt.isSameMonth($t, bt.currentMonth) || + xt({ newMonth: mt.startOfMonth($t), direction: mt.isAfterDay($t, bt.currentMonth) ? 'left' : 'right' }) + }, + [bt.currentMonth, xt, mt], + ), + St = useIsDateDisabled({ + shouldDisableDate: ht, + minDate: lt, + maxDate: st, + disableFuture: it, + disablePast: ot, + timezone: dt, + }), + Tt = reactExports.useCallback(() => { + vt({ type: 'finishMonthSwitchingAnimation' }) + }, []), + At = useEventCallback((Et, $t) => { + St(Et) || vt({ type: 'changeFocusedDay', focusedDay: Et, withoutMonthSwitchingAnimation: $t }) + }) + return { + referenceDate: yt, + calendarState: bt, + changeMonth: kt, + changeFocusedDay: At, + isDateDisabled: St, + onMonthSwitchingAnimationEnd: Tt, + handleChangeMonth: xt, + } + }, + _excluded$u = ['ownerState'], + useClearableField = ({ + clearable: tt, + fieldProps: et, + InputProps: nt, + onClear: rt, + slots: it, + slotProps: ot, + components: at, + componentsProps: st, + }) => { + var lt, ct, ut, ht, dt, pt + const mt = useLocaleText(), + gt = + (lt = (ct = it == null ? void 0 : it.clearButton) != null ? ct : at == null ? void 0 : at.ClearButton) != null + ? lt + : IconButton$2, + yt = useSlotProps({ + elementType: gt, + externalSlotProps: + (ut = ot == null ? void 0 : ot.clearButton) != null ? ut : st == null ? void 0 : st.clearButton, + ownerState: {}, + className: 'clearButton', + additionalProps: { title: mt.fieldClearLabel }, + }), + bt = _objectWithoutPropertiesLoose$m(yt, _excluded$u), + vt = + (ht = (dt = it == null ? void 0 : it.clearIcon) != null ? dt : at == null ? void 0 : at.ClearIcon) != null + ? ht + : ClearIcon, + xt = useSlotProps({ + elementType: vt, + externalSlotProps: + (pt = ot == null ? void 0 : ot.clearIcon) != null ? pt : st == null ? void 0 : st.clearIcon, + ownerState: {}, + }), + kt = _extends$u({}, nt, { + endAdornment: tt + ? jsxRuntimeExports.jsxs(reactExports.Fragment, { + children: [ + jsxRuntimeExports.jsx(MuiInputAdornment, { + position: 'end', + sx: { marginRight: nt != null && nt.endAdornment ? -1 : -1.5 }, + children: jsxRuntimeExports.jsx( + gt, + _extends$u({}, bt, { + onClick: rt, + children: jsxRuntimeExports.jsx(vt, _extends$u({ fontSize: 'small' }, xt)), + }), + ), + }), + nt == null ? void 0 : nt.endAdornment, + ], + }) + : nt == null + ? void 0 + : nt.endAdornment, + }), + St = _extends$u({}, et, { + sx: [ + { + '& .clearButton': { opacity: 1 }, + '@media (pointer: fine)': { + '& .clearButton': { opacity: 0 }, + '&:hover, &:focus-within': { '.clearButton': { opacity: 1 } }, + }, + }, + ...(Array.isArray(et.sx) ? et.sx : [et.sx]), + ], + }) + return { InputProps: kt, fieldProps: St } + }, + _excluded$t = ['components', 'componentsProps', 'slots', 'slotProps', 'InputProps', 'inputProps'], + _excluded2$8 = ['inputRef'], + _excluded3$2 = ['ref', 'onPaste', 'onKeyDown', 'inputMode', 'readOnly', 'clearable', 'onClear'], + DateField = reactExports.forwardRef(function (et, nt) { + var rt, it, ot + const at = useThemeProps({ props: et, name: 'MuiDateField' }), + { components: st, componentsProps: lt, slots: ct, slotProps: ut, InputProps: ht, inputProps: dt } = at, + pt = _objectWithoutPropertiesLoose$m(at, _excluded$t), + mt = at, + gt = + (rt = (it = ct == null ? void 0 : ct.textField) != null ? it : st == null ? void 0 : st.TextField) != null + ? rt + : MuiTextField, + yt = useSlotProps({ + elementType: gt, + externalSlotProps: + (ot = ut == null ? void 0 : ut.textField) != null ? ot : lt == null ? void 0 : lt.textField, + externalForwardedProps: pt, + ownerState: mt, + }), + { inputRef: bt } = yt, + vt = _objectWithoutPropertiesLoose$m(yt, _excluded2$8) + ;(vt.inputProps = _extends$u({}, dt, vt.inputProps)), (vt.InputProps = _extends$u({}, ht, vt.InputProps)) + const xt = useDateField({ props: vt, inputRef: bt }), + { ref: kt, onPaste: St, onKeyDown: Tt, inputMode: At, readOnly: Et, clearable: $t, onClear: Dt } = xt, + jt = _objectWithoutPropertiesLoose$m(xt, _excluded3$2), + { InputProps: Pt, fieldProps: Ct } = useClearableField({ + onClear: Dt, + clearable: $t, + fieldProps: jt, + InputProps: jt.InputProps, + slots: ct, + slotProps: ut, + components: st, + componentsProps: lt, + }) + return jsxRuntimeExports.jsx( + gt, + _extends$u({ ref: nt }, Ct, { + InputProps: _extends$u({}, Pt, { readOnly: Et }), + inputProps: _extends$u({}, jt.inputProps, { inputMode: At, onPaste: St, onKeyDown: Tt, ref: kt }), + }), + ) + }), + getPickersFadeTransitionGroupUtilityClass = (tt) => generateUtilityClass('MuiPickersFadeTransitionGroup', tt) + generateUtilityClasses('MuiPickersFadeTransitionGroup', ['root']) + const useUtilityClasses$7 = (tt) => { + const { classes: et } = tt + return composeClasses({ root: ['root'] }, getPickersFadeTransitionGroupUtilityClass, et) + }, + PickersFadeTransitionGroupRoot = styled$1(TransitionGroup$1, { + name: 'MuiPickersFadeTransitionGroup', + slot: 'Root', + overridesResolver: (tt, et) => et.root, + })({ display: 'block', position: 'relative' }) + function PickersFadeTransitionGroup(tt) { + const et = useThemeProps({ props: tt, name: 'MuiPickersFadeTransitionGroup' }), + { children: nt, className: rt, reduceAnimations: it, transKey: ot } = et, + at = useUtilityClasses$7(et), + st = useTheme() + return it + ? nt + : jsxRuntimeExports.jsx(PickersFadeTransitionGroupRoot, { + className: clsx(at.root, rt), + children: jsxRuntimeExports.jsx( + Fade$1, + { + appear: !1, + mountOnEnter: !0, + unmountOnExit: !0, + timeout: { + appear: st.transitions.duration.enteringScreen, + enter: st.transitions.duration.enteringScreen, + exit: 0, + }, + children: nt, + }, + ot, + ), + }) + } + function getPickersMonthUtilityClass(tt) { + return generateUtilityClass('MuiPickersMonth', tt) + } + const pickersMonthClasses = generateUtilityClasses('MuiPickersMonth', [ + 'root', + 'monthButton', + 'disabled', + 'selected', + ]), + _excluded$s = [ + 'autoFocus', + 'children', + 'disabled', + 'selected', + 'value', + 'tabIndex', + 'onClick', + 'onKeyDown', + 'onFocus', + 'onBlur', + 'aria-current', + 'aria-label', + 'monthsPerRow', + ], + useUtilityClasses$6 = (tt) => { + const { disabled: et, selected: nt, classes: rt } = tt + return composeClasses( + { root: ['root'], monthButton: ['monthButton', et && 'disabled', nt && 'selected'] }, + getPickersMonthUtilityClass, + rt, + ) + }, + PickersMonthRoot = styled$1('div', { + name: 'MuiPickersMonth', + slot: 'Root', + overridesResolver: (tt, et) => [et.root], + })(({ ownerState: tt }) => ({ + flexBasis: tt.monthsPerRow === 3 ? '33.3%' : '25%', + display: 'flex', + alignItems: 'center', + justifyContent: 'center', + })), + PickersMonthButton = styled$1('button', { + name: 'MuiPickersMonth', + slot: 'MonthButton', + overridesResolver: (tt, et) => [ + et.monthButton, + { [`&.${pickersMonthClasses.disabled}`]: et.disabled }, + { [`&.${pickersMonthClasses.selected}`]: et.selected }, + ], + })(({ theme: tt }) => + _extends$u({ color: 'unset', backgroundColor: 'transparent', border: 0, outline: 0 }, tt.typography.subtitle1, { + margin: '8px 0', + height: 36, + width: 72, + borderRadius: 18, + cursor: 'pointer', + '&:focus': { + backgroundColor: tt.vars + ? `rgba(${tt.vars.palette.action.activeChannel} / ${tt.vars.palette.action.hoverOpacity})` + : alpha$1(tt.palette.action.active, tt.palette.action.hoverOpacity), + }, + '&:hover': { + backgroundColor: tt.vars + ? `rgba(${tt.vars.palette.action.activeChannel} / ${tt.vars.palette.action.hoverOpacity})` + : alpha$1(tt.palette.action.active, tt.palette.action.hoverOpacity), + }, + '&:disabled': { cursor: 'auto', pointerEvents: 'none' }, + [`&.${pickersMonthClasses.disabled}`]: { color: (tt.vars || tt).palette.text.secondary }, + [`&.${pickersMonthClasses.selected}`]: { + color: (tt.vars || tt).palette.primary.contrastText, + backgroundColor: (tt.vars || tt).palette.primary.main, + '&:focus, &:hover': { backgroundColor: (tt.vars || tt).palette.primary.dark }, + }, + }), + ), + PickersMonth = reactExports.memo(function (et) { + const nt = useThemeProps({ props: et, name: 'MuiPickersMonth' }), + { + autoFocus: rt, + children: it, + disabled: ot, + selected: at, + value: st, + tabIndex: lt, + onClick: ct, + onKeyDown: ut, + onFocus: ht, + onBlur: dt, + 'aria-current': pt, + 'aria-label': mt, + } = nt, + gt = _objectWithoutPropertiesLoose$m(nt, _excluded$s), + yt = reactExports.useRef(null), + bt = useUtilityClasses$6(nt) + return ( + useEnhancedEffect$1(() => { + if (rt) { + var vt + ;(vt = yt.current) == null || vt.focus() + } + }, [rt]), + jsxRuntimeExports.jsx( + PickersMonthRoot, + _extends$u({ className: bt.root, ownerState: nt }, gt, { + children: jsxRuntimeExports.jsx(PickersMonthButton, { + ref: yt, + disabled: ot, + type: 'button', + role: 'radio', + tabIndex: ot ? -1 : lt, + 'aria-current': pt, + 'aria-checked': at, + 'aria-label': mt, + onClick: (vt) => ct(vt, st), + onKeyDown: (vt) => ut(vt, st), + onFocus: (vt) => ht(vt, st), + onBlur: (vt) => dt(vt, st), + className: bt.monthButton, + ownerState: nt, + children: it, + }), + }), + ) + ) + }) + function getMonthCalendarUtilityClass(tt) { + return generateUtilityClass('MuiMonthCalendar', tt) + } + generateUtilityClasses('MuiMonthCalendar', ['root']) + const _excluded$r = [ + 'className', + 'value', + 'defaultValue', + 'referenceDate', + 'disabled', + 'disableFuture', + 'disablePast', + 'maxDate', + 'minDate', + 'onChange', + 'shouldDisableMonth', + 'readOnly', + 'disableHighlightToday', + 'autoFocus', + 'onMonthFocus', + 'hasFocus', + 'onFocusedViewChange', + 'monthsPerRow', + 'timezone', + 'gridLabelId', + ], + useUtilityClasses$5 = (tt) => { + const { classes: et } = tt + return composeClasses({ root: ['root'] }, getMonthCalendarUtilityClass, et) + } + function useMonthCalendarDefaultizedProps(tt, et) { + const nt = useUtils(), + rt = useDefaultDates(), + it = useThemeProps({ props: tt, name: et }) + return _extends$u({ disableFuture: !1, disablePast: !1 }, it, { + minDate: applyDefaultDate(nt, it.minDate, rt.minDate), + maxDate: applyDefaultDate(nt, it.maxDate, rt.maxDate), + }) + } + const MonthCalendarRoot = styled$1('div', { + name: 'MuiMonthCalendar', + slot: 'Root', + overridesResolver: (tt, et) => et.root, + })({ + display: 'flex', + flexWrap: 'wrap', + alignContent: 'stretch', + padding: '0 4px', + width: DIALOG_WIDTH, + boxSizing: 'border-box', + }), + MonthCalendar = reactExports.forwardRef(function (et, nt) { + const rt = useMonthCalendarDefaultizedProps(et, 'MuiMonthCalendar'), + { + className: it, + value: ot, + defaultValue: at, + referenceDate: st, + disabled: lt, + disableFuture: ct, + disablePast: ut, + maxDate: ht, + minDate: dt, + onChange: pt, + shouldDisableMonth: mt, + readOnly: gt, + disableHighlightToday: yt, + autoFocus: bt = !1, + onMonthFocus: vt, + hasFocus: xt, + onFocusedViewChange: kt, + monthsPerRow: St = 3, + timezone: Tt, + gridLabelId: At, + } = rt, + Et = _objectWithoutPropertiesLoose$m(rt, _excluded$r), + { + value: $t, + handleValueChange: Dt, + timezone: jt, + } = useControlledValueWithTimezone({ + name: 'MonthCalendar', + timezone: Tt, + value: ot, + defaultValue: at, + onChange: pt, + valueManager: singleItemValueManager, + }), + Pt = useNow(jt), + Ct = useTheme$2(), + wt = useUtils(), + It = reactExports.useMemo( + () => + singleItemValueManager.getInitialReferenceValue({ + value: $t, + utils: wt, + props: rt, + timezone: jt, + referenceDate: st, + granularity: SECTION_TYPE_GRANULARITY.month, + }), + [], + ), + Ot = rt, + Wt = useUtilityClasses$5(Ot), + zt = reactExports.useMemo(() => wt.getMonth(Pt), [wt, Pt]), + Ft = reactExports.useMemo(() => ($t != null ? wt.getMonth($t) : yt ? null : wt.getMonth(It)), [$t, wt, yt, It]), + [Nt, Ut] = reactExports.useState(() => Ft || zt), + [Mt, Ht] = useControlled({ name: 'MonthCalendar', state: 'hasFocus', controlled: xt, default: bt ?? !1 }), + en = useEventCallback((an) => { + Ht(an), kt && kt(an) + }), + sn = reactExports.useCallback( + (an) => { + const Qt = wt.startOfMonth(ut && wt.isAfter(Pt, dt) ? Pt : dt), + _n = wt.startOfMonth(ct && wt.isBefore(Pt, ht) ? Pt : ht), + Pn = wt.startOfMonth(an) + return wt.isBefore(Pn, Qt) || wt.isAfter(Pn, _n) ? !0 : mt ? mt(Pn) : !1 + }, + [ct, ut, ht, dt, Pt, mt, wt], + ), + Kt = useEventCallback((an, Qt) => { + if (gt) return + const _n = wt.setMonth($t ?? It, Qt) + Dt(_n) + }), + rn = useEventCallback((an) => { + sn(wt.setMonth($t ?? It, an)) || (Ut(an), en(!0), vt && vt(an)) + }) + reactExports.useEffect(() => { + Ut((an) => (Ft !== null && an !== Ft ? Ft : an)) + }, [Ft]) + const nn = useEventCallback((an, Qt) => { + switch (an.key) { + case 'ArrowUp': + rn((12 + Qt - 3) % 12), an.preventDefault() + break + case 'ArrowDown': + rn((12 + Qt + 3) % 12), an.preventDefault() + break + case 'ArrowLeft': + rn((12 + Qt + (Ct.direction === 'ltr' ? -1 : 1)) % 12), an.preventDefault() + break + case 'ArrowRight': + rn((12 + Qt + (Ct.direction === 'ltr' ? 1 : -1)) % 12), an.preventDefault() + break + } + }), + hn = useEventCallback((an, Qt) => { + rn(Qt) + }), + vn = useEventCallback((an, Qt) => { + Nt === Qt && en(!1) + }) + return jsxRuntimeExports.jsx( + MonthCalendarRoot, + _extends$u( + { ref: nt, className: clsx(Wt.root, it), ownerState: Ot, role: 'radiogroup', 'aria-labelledby': At }, + Et, + { + children: getMonthsInYear(wt, $t ?? It).map((an) => { + const Qt = wt.getMonth(an), + _n = wt.format(an, 'monthShort'), + Pn = wt.format(an, 'month'), + $n = Qt === Ft, + Nn = lt || sn(an) + return jsxRuntimeExports.jsx( + PickersMonth, + { + selected: $n, + value: Qt, + onClick: Kt, + onKeyDown: nn, + autoFocus: Mt && Qt === Nt, + disabled: Nn, + tabIndex: Qt === Nt ? 0 : -1, + onFocus: hn, + onBlur: vn, + 'aria-current': zt === Qt ? 'date' : void 0, + 'aria-label': Pn, + monthsPerRow: St, + children: _n, + }, + _n, + ) + }), + }, + ), + ) + }) + function getPickersYearUtilityClass(tt) { + return generateUtilityClass('MuiPickersYear', tt) + } + const pickersYearClasses = generateUtilityClasses('MuiPickersYear', ['root', 'yearButton', 'selected', 'disabled']), + _excluded$q = [ + 'autoFocus', + 'className', + 'children', + 'disabled', + 'selected', + 'value', + 'tabIndex', + 'onClick', + 'onKeyDown', + 'onFocus', + 'onBlur', + 'aria-current', + 'yearsPerRow', + ], + useUtilityClasses$4 = (tt) => { + const { disabled: et, selected: nt, classes: rt } = tt + return composeClasses( + { root: ['root'], yearButton: ['yearButton', et && 'disabled', nt && 'selected'] }, + getPickersYearUtilityClass, + rt, + ) + }, + PickersYearRoot = styled$1('div', { + name: 'MuiPickersYear', + slot: 'Root', + overridesResolver: (tt, et) => [et.root], + })(({ ownerState: tt }) => ({ + flexBasis: tt.yearsPerRow === 3 ? '33.3%' : '25%', + display: 'flex', + alignItems: 'center', + justifyContent: 'center', + })), + PickersYearButton = styled$1('button', { + name: 'MuiPickersYear', + slot: 'YearButton', + overridesResolver: (tt, et) => [ + et.yearButton, + { [`&.${pickersYearClasses.disabled}`]: et.disabled }, + { [`&.${pickersYearClasses.selected}`]: et.selected }, + ], + })(({ theme: tt }) => + _extends$u({ color: 'unset', backgroundColor: 'transparent', border: 0, outline: 0 }, tt.typography.subtitle1, { + margin: '6px 0', + height: 36, + width: 72, + borderRadius: 18, + cursor: 'pointer', + '&:focus': { + backgroundColor: tt.vars + ? `rgba(${tt.vars.palette.action.activeChannel} / ${tt.vars.palette.action.focusOpacity})` + : alpha$1(tt.palette.action.active, tt.palette.action.focusOpacity), + }, + '&:hover': { + backgroundColor: tt.vars + ? `rgba(${tt.vars.palette.action.activeChannel} / ${tt.vars.palette.action.hoverOpacity})` + : alpha$1(tt.palette.action.active, tt.palette.action.hoverOpacity), + }, + '&:disabled': { cursor: 'auto', pointerEvents: 'none' }, + [`&.${pickersYearClasses.disabled}`]: { color: (tt.vars || tt).palette.text.secondary }, + [`&.${pickersYearClasses.selected}`]: { + color: (tt.vars || tt).palette.primary.contrastText, + backgroundColor: (tt.vars || tt).palette.primary.main, + '&:focus, &:hover': { backgroundColor: (tt.vars || tt).palette.primary.dark }, + }, + }), + ), + PickersYear = reactExports.memo(function (et) { + const nt = useThemeProps({ props: et, name: 'MuiPickersYear' }), + { + autoFocus: rt, + className: it, + children: ot, + disabled: at, + selected: st, + value: lt, + tabIndex: ct, + onClick: ut, + onKeyDown: ht, + onFocus: dt, + onBlur: pt, + 'aria-current': mt, + } = nt, + gt = _objectWithoutPropertiesLoose$m(nt, _excluded$q), + yt = reactExports.useRef(null), + bt = useUtilityClasses$4(nt) + return ( + reactExports.useEffect(() => { + rt && yt.current.focus() + }, [rt]), + jsxRuntimeExports.jsx( + PickersYearRoot, + _extends$u({ className: clsx(bt.root, it), ownerState: nt }, gt, { + children: jsxRuntimeExports.jsx(PickersYearButton, { + ref: yt, + disabled: at, + type: 'button', + role: 'radio', + tabIndex: at ? -1 : ct, + 'aria-current': mt, + 'aria-checked': st, + onClick: (vt) => ut(vt, lt), + onKeyDown: (vt) => ht(vt, lt), + onFocus: (vt) => dt(vt, lt), + onBlur: (vt) => pt(vt, lt), + className: bt.yearButton, + ownerState: nt, + children: ot, + }), + }), + ) + ) + }) + function getYearCalendarUtilityClass(tt) { + return generateUtilityClass('MuiYearCalendar', tt) + } + generateUtilityClasses('MuiYearCalendar', ['root']) + const _excluded$p = [ + 'autoFocus', + 'className', + 'value', + 'defaultValue', + 'referenceDate', + 'disabled', + 'disableFuture', + 'disablePast', + 'maxDate', + 'minDate', + 'onChange', + 'readOnly', + 'shouldDisableYear', + 'disableHighlightToday', + 'onYearFocus', + 'hasFocus', + 'onFocusedViewChange', + 'yearsPerRow', + 'timezone', + 'gridLabelId', + ], + useUtilityClasses$3 = (tt) => { + const { classes: et } = tt + return composeClasses({ root: ['root'] }, getYearCalendarUtilityClass, et) + } + function useYearCalendarDefaultizedProps(tt, et) { + var nt + const rt = useUtils(), + it = useDefaultDates(), + ot = useThemeProps({ props: tt, name: et }) + return _extends$u({ disablePast: !1, disableFuture: !1 }, ot, { + yearsPerRow: (nt = ot.yearsPerRow) != null ? nt : 3, + minDate: applyDefaultDate(rt, ot.minDate, it.minDate), + maxDate: applyDefaultDate(rt, ot.maxDate, it.maxDate), + }) + } + const YearCalendarRoot = styled$1('div', { + name: 'MuiYearCalendar', + slot: 'Root', + overridesResolver: (tt, et) => et.root, + })({ + display: 'flex', + flexDirection: 'row', + flexWrap: 'wrap', + overflowY: 'auto', + height: '100%', + padding: '0 4px', + width: DIALOG_WIDTH, + maxHeight: MAX_CALENDAR_HEIGHT, + boxSizing: 'border-box', + position: 'relative', + }), + YearCalendar = reactExports.forwardRef(function (et, nt) { + const rt = useYearCalendarDefaultizedProps(et, 'MuiYearCalendar'), + { + autoFocus: it, + className: ot, + value: at, + defaultValue: st, + referenceDate: lt, + disabled: ct, + disableFuture: ut, + disablePast: ht, + maxDate: dt, + minDate: pt, + onChange: mt, + readOnly: gt, + shouldDisableYear: yt, + disableHighlightToday: bt, + onYearFocus: vt, + hasFocus: xt, + onFocusedViewChange: kt, + yearsPerRow: St, + timezone: Tt, + gridLabelId: At, + } = rt, + Et = _objectWithoutPropertiesLoose$m(rt, _excluded$p), + { + value: $t, + handleValueChange: Dt, + timezone: jt, + } = useControlledValueWithTimezone({ + name: 'YearCalendar', + timezone: Tt, + value: at, + defaultValue: st, + onChange: mt, + valueManager: singleItemValueManager, + }), + Pt = useNow(jt), + Ct = useTheme$2(), + wt = useUtils(), + It = reactExports.useMemo( + () => + singleItemValueManager.getInitialReferenceValue({ + value: $t, + utils: wt, + props: rt, + timezone: jt, + referenceDate: lt, + granularity: SECTION_TYPE_GRANULARITY.year, + }), + [], + ), + Ot = rt, + Wt = useUtilityClasses$3(Ot), + zt = reactExports.useMemo(() => wt.getYear(Pt), [wt, Pt]), + Ft = reactExports.useMemo(() => ($t != null ? wt.getYear($t) : bt ? null : wt.getYear(It)), [$t, wt, bt, It]), + [Nt, Ut] = reactExports.useState(() => Ft || zt), + [Mt, Ht] = useControlled({ name: 'YearCalendar', state: 'hasFocus', controlled: xt, default: it ?? !1 }), + en = useEventCallback((_n) => { + Ht(_n), kt && kt(_n) + }), + sn = reactExports.useCallback( + (_n) => { + if ( + (ht && wt.isBeforeYear(_n, Pt)) || + (ut && wt.isAfterYear(_n, Pt)) || + (pt && wt.isBeforeYear(_n, pt)) || + (dt && wt.isAfterYear(_n, dt)) + ) + return !0 + if (!yt) return !1 + const Pn = wt.startOfYear(_n) + return yt(Pn) + }, + [ut, ht, dt, pt, Pt, yt, wt], + ), + Kt = useEventCallback((_n, Pn) => { + if (gt) return + const $n = wt.setYear($t ?? It, Pn) + Dt($n) + }), + rn = useEventCallback((_n) => { + sn(wt.setYear($t ?? It, _n)) || (Ut(_n), en(!0), vt == null || vt(_n)) + }) + reactExports.useEffect(() => { + Ut((_n) => (Ft !== null && _n !== Ft ? Ft : _n)) + }, [Ft]) + const nn = useEventCallback((_n, Pn) => { + switch (_n.key) { + case 'ArrowUp': + rn(Pn - St), _n.preventDefault() + break + case 'ArrowDown': + rn(Pn + St), _n.preventDefault() + break + case 'ArrowLeft': + rn(Pn + (Ct.direction === 'ltr' ? -1 : 1)), _n.preventDefault() + break + case 'ArrowRight': + rn(Pn + (Ct.direction === 'ltr' ? 1 : -1)), _n.preventDefault() + break + } + }), + hn = useEventCallback((_n, Pn) => { + rn(Pn) + }), + vn = useEventCallback((_n, Pn) => { + Nt === Pn && en(!1) + }), + an = reactExports.useRef(null), + Qt = useForkRef(nt, an) + return ( + reactExports.useEffect(() => { + if (it || an.current === null) return + const _n = an.current.querySelector('[tabindex="0"]') + if (!_n) return + const Pn = _n.offsetHeight, + $n = _n.offsetTop, + Nn = an.current.clientHeight, + Tn = an.current.scrollTop, + cn = $n + Pn + Pn > Nn || $n < Tn || (an.current.scrollTop = cn - Nn / 2 - Pn / 2) + }, [it]), + jsxRuntimeExports.jsx( + YearCalendarRoot, + _extends$u( + { ref: Qt, className: clsx(Wt.root, ot), ownerState: Ot, role: 'radiogroup', 'aria-labelledby': At }, + Et, + { + children: wt.getYearRange(pt, dt).map((_n) => { + const Pn = wt.getYear(_n), + $n = Pn === Ft, + Nn = ct || sn(_n) + return jsxRuntimeExports.jsx( + PickersYear, + { + selected: $n, + value: Pn, + onClick: Kt, + onKeyDown: nn, + autoFocus: Mt && Pn === Nt, + disabled: Nn, + tabIndex: Pn === Nt ? 0 : -1, + onFocus: hn, + onBlur: vn, + 'aria-current': zt === Pn ? 'date' : void 0, + yearsPerRow: St, + children: wt.format(_n, 'year'), + }, + wt.format(_n, 'year'), + ) + }), + }, + ), + ) + ) + }), + getPickersCalendarHeaderUtilityClass = (tt) => generateUtilityClass('MuiPickersCalendarHeader', tt), + pickersCalendarHeaderClasses = generateUtilityClasses('MuiPickersCalendarHeader', [ + 'root', + 'labelContainer', + 'label', + 'switchViewButton', + 'switchViewIcon', + ]), + _excluded$o = [ + 'slots', + 'slotProps', + 'currentMonth', + 'disabled', + 'disableFuture', + 'disablePast', + 'maxDate', + 'minDate', + 'onMonthChange', + 'onViewChange', + 'view', + 'reduceAnimations', + 'views', + 'labelId', + 'className', + 'timezone', + ], + _excluded2$7 = ['ownerState'], + useUtilityClasses$2 = (tt) => { + const { classes: et } = tt + return composeClasses( + { + root: ['root'], + labelContainer: ['labelContainer'], + label: ['label'], + switchViewButton: ['switchViewButton'], + switchViewIcon: ['switchViewIcon'], + }, + getPickersCalendarHeaderUtilityClass, + et, + ) + }, + PickersCalendarHeaderRoot = styled$1('div', { + name: 'MuiPickersCalendarHeader', + slot: 'Root', + overridesResolver: (tt, et) => et.root, + })({ + display: 'flex', + alignItems: 'center', + marginTop: 16, + marginBottom: 8, + paddingLeft: 24, + paddingRight: 12, + maxHeight: 30, + minHeight: 30, + }), + PickersCalendarHeaderLabelContainer = styled$1('div', { + name: 'MuiPickersCalendarHeader', + slot: 'LabelContainer', + overridesResolver: (tt, et) => et.labelContainer, + })(({ theme: tt }) => + _extends$u( + { display: 'flex', overflow: 'hidden', alignItems: 'center', cursor: 'pointer', marginRight: 'auto' }, + tt.typography.body1, + { fontWeight: tt.typography.fontWeightMedium }, + ), + ), + PickersCalendarHeaderLabel = styled$1('div', { + name: 'MuiPickersCalendarHeader', + slot: 'Label', + overridesResolver: (tt, et) => et.label, + })({ marginRight: 6 }), + PickersCalendarHeaderSwitchViewButton = styled$1(IconButton$2, { + name: 'MuiPickersCalendarHeader', + slot: 'SwitchViewButton', + overridesResolver: (tt, et) => et.switchViewButton, + })(({ ownerState: tt }) => + _extends$u( + { marginRight: 'auto' }, + tt.view === 'year' && { [`.${pickersCalendarHeaderClasses.switchViewIcon}`]: { transform: 'rotate(180deg)' } }, + ), + ), + PickersCalendarHeaderSwitchViewIcon = styled$1(ArrowDropDownIcon, { + name: 'MuiPickersCalendarHeader', + slot: 'SwitchViewIcon', + overridesResolver: (tt, et) => et.switchViewIcon, + })(({ theme: tt }) => ({ + willChange: 'transform', + transition: tt.transitions.create('transform'), + transform: 'rotate(0deg)', + })), + PickersCalendarHeader = reactExports.forwardRef(function (et, nt) { + var rt, it + const ot = useLocaleText(), + at = useUtils(), + st = useThemeProps({ props: et, name: 'MuiPickersCalendarHeader' }), + { + slots: lt, + slotProps: ct, + currentMonth: ut, + disabled: ht, + disableFuture: dt, + disablePast: pt, + maxDate: mt, + minDate: gt, + onMonthChange: yt, + onViewChange: bt, + view: vt, + reduceAnimations: xt, + views: kt, + labelId: St, + className: Tt, + timezone: At, + } = st, + Et = _objectWithoutPropertiesLoose$m(st, _excluded$o), + $t = st, + Dt = useUtilityClasses$2(st), + jt = (rt = lt == null ? void 0 : lt.switchViewButton) != null ? rt : PickersCalendarHeaderSwitchViewButton, + Pt = useSlotProps({ + elementType: jt, + externalSlotProps: ct == null ? void 0 : ct.switchViewButton, + additionalProps: { size: 'small', 'aria-label': ot.calendarViewSwitchingButtonAriaLabel(vt) }, + ownerState: $t, + className: Dt.switchViewButton, + }), + Ct = (it = lt == null ? void 0 : lt.switchViewIcon) != null ? it : PickersCalendarHeaderSwitchViewIcon, + wt = useSlotProps({ + elementType: Ct, + externalSlotProps: ct == null ? void 0 : ct.switchViewIcon, + ownerState: void 0, + className: Dt.switchViewIcon, + }), + It = _objectWithoutPropertiesLoose$m(wt, _excluded2$7), + Ot = () => yt(at.addMonths(ut, 1), 'left'), + Wt = () => yt(at.addMonths(ut, -1), 'right'), + zt = useNextMonthDisabled(ut, { disableFuture: dt, maxDate: mt, timezone: At }), + Ft = usePreviousMonthDisabled(ut, { disablePast: pt, minDate: gt, timezone: At }), + Nt = () => { + if (!(kt.length === 1 || !bt || ht)) + if (kt.length === 2) bt(kt.find((Ut) => Ut !== vt) || kt[0]) + else { + const Ut = kt.indexOf(vt) !== 0 ? 0 : 1 + bt(kt[Ut]) + } + } + return kt.length === 1 && kt[0] === 'year' + ? null + : jsxRuntimeExports.jsxs( + PickersCalendarHeaderRoot, + _extends$u({}, Et, { + ownerState: $t, + className: clsx(Tt, Dt.root), + ref: nt, + children: [ + jsxRuntimeExports.jsxs(PickersCalendarHeaderLabelContainer, { + role: 'presentation', + onClick: Nt, + ownerState: $t, + 'aria-live': 'polite', + className: Dt.labelContainer, + children: [ + jsxRuntimeExports.jsx(PickersFadeTransitionGroup, { + reduceAnimations: xt, + transKey: at.format(ut, 'monthAndYear'), + children: jsxRuntimeExports.jsx(PickersCalendarHeaderLabel, { + id: St, + ownerState: $t, + className: Dt.label, + children: at.format(ut, 'monthAndYear'), + }), + }), + kt.length > 1 && + !ht && + jsxRuntimeExports.jsx( + jt, + _extends$u({}, Pt, { children: jsxRuntimeExports.jsx(Ct, _extends$u({}, It)) }), + ), + ], + }), + jsxRuntimeExports.jsx(Fade$1, { + in: vt === 'day', + children: jsxRuntimeExports.jsx(PickersArrowSwitcher, { + slots: lt, + slotProps: ct, + onGoToPrevious: Wt, + isPreviousDisabled: Ft, + previousLabel: ot.previousMonth, + onGoToNext: Ot, + isNextDisabled: zt, + nextLabel: ot.nextMonth, + }), + }), + ], + }), + ) + }), + getDateCalendarUtilityClass = (tt) => generateUtilityClass('MuiDateCalendar', tt) + generateUtilityClasses('MuiDateCalendar', ['root', 'viewTransitionContainer']) + const _excluded$n = [ + 'autoFocus', + 'onViewChange', + 'value', + 'defaultValue', + 'referenceDate', + 'disableFuture', + 'disablePast', + 'defaultCalendarMonth', + 'onChange', + 'onYearChange', + 'onMonthChange', + 'reduceAnimations', + 'shouldDisableDate', + 'shouldDisableMonth', + 'shouldDisableYear', + 'view', + 'views', + 'openTo', + 'className', + 'disabled', + 'readOnly', + 'minDate', + 'maxDate', + 'disableHighlightToday', + 'focusedView', + 'onFocusedViewChange', + 'showDaysOutsideCurrentMonth', + 'fixedWeekNumber', + 'dayOfWeekFormatter', + 'components', + 'componentsProps', + 'slots', + 'slotProps', + 'loading', + 'renderLoading', + 'displayWeekNumber', + 'yearsPerRow', + 'monthsPerRow', + 'timezone', + ], + useUtilityClasses$1 = (tt) => { + const { classes: et } = tt + return composeClasses( + { root: ['root'], viewTransitionContainer: ['viewTransitionContainer'] }, + getDateCalendarUtilityClass, + et, + ) + } + function useDateCalendarDefaultizedProps(tt, et) { + var nt, rt, it, ot, at, st, lt + const ct = useUtils(), + ut = useDefaultDates(), + ht = useDefaultReduceAnimations(), + dt = useThemeProps({ props: tt, name: et }) + return _extends$u({}, dt, { + loading: (nt = dt.loading) != null ? nt : !1, + disablePast: (rt = dt.disablePast) != null ? rt : !1, + disableFuture: (it = dt.disableFuture) != null ? it : !1, + openTo: (ot = dt.openTo) != null ? ot : 'day', + views: (at = dt.views) != null ? at : ['year', 'day'], + reduceAnimations: (st = dt.reduceAnimations) != null ? st : ht, + renderLoading: (lt = dt.renderLoading) != null ? lt : () => jsxRuntimeExports.jsx('span', { children: '...' }), + minDate: applyDefaultDate(ct, dt.minDate, ut.minDate), + maxDate: applyDefaultDate(ct, dt.maxDate, ut.maxDate), + }) + } + const DateCalendarRoot = styled$1(PickerViewRoot, { + name: 'MuiDateCalendar', + slot: 'Root', + overridesResolver: (tt, et) => et.root, + })({ display: 'flex', flexDirection: 'column', height: VIEW_HEIGHT }), + DateCalendarViewTransitionContainer = styled$1(PickersFadeTransitionGroup, { + name: 'MuiDateCalendar', + slot: 'ViewTransitionContainer', + overridesResolver: (tt, et) => et.viewTransitionContainer, + })({}), + DateCalendar = reactExports.forwardRef(function (et, nt) { + var rt, it, ot + const at = useUtils(), + st = useId(), + lt = useDateCalendarDefaultizedProps(et, 'MuiDateCalendar'), + { + autoFocus: ct, + onViewChange: ut, + value: ht, + defaultValue: dt, + referenceDate: pt, + disableFuture: mt, + disablePast: gt, + defaultCalendarMonth: yt, + onChange: bt, + onYearChange: vt, + onMonthChange: xt, + reduceAnimations: kt, + shouldDisableDate: St, + shouldDisableMonth: Tt, + shouldDisableYear: At, + view: Et, + views: $t, + openTo: Dt, + className: jt, + disabled: Pt, + readOnly: Ct, + minDate: wt, + maxDate: It, + disableHighlightToday: Ot, + focusedView: Wt, + onFocusedViewChange: zt, + showDaysOutsideCurrentMonth: Ft, + fixedWeekNumber: Nt, + dayOfWeekFormatter: Ut, + components: Mt, + componentsProps: Ht, + slots: en, + slotProps: sn, + loading: Kt, + renderLoading: rn, + displayWeekNumber: nn, + yearsPerRow: hn, + monthsPerRow: vn, + timezone: an, + } = lt, + Qt = _objectWithoutPropertiesLoose$m(lt, _excluded$n), + { + value: _n, + handleValueChange: Pn, + timezone: $n, + } = useControlledValueWithTimezone({ + name: 'DateCalendar', + timezone: an, + value: ht, + defaultValue: dt, + onChange: bt, + valueManager: singleItemValueManager, + }), + { + view: Nn, + setView: Tn, + focusedView: cn, + setFocusedView: mn, + goToNextView: In, + setValueAndGoToNextView: An, + } = useViews({ + view: Et, + views: $t, + openTo: Dt, + onChange: Pn, + onViewChange: ut, + autoFocus: ct, + focusedView: Wt, + onFocusedViewChange: zt, + }), + { + referenceDate: wn, + calendarState: fn, + changeFocusedDay: pn, + changeMonth: kn, + handleChangeMonth: Dn, + isDateDisabled: un, + onMonthSwitchingAnimationEnd: Zt, + } = useCalendarState({ + value: _n, + defaultCalendarMonth: yt, + referenceDate: pt, + reduceAnimations: kt, + onMonthChange: xt, + minDate: wt, + maxDate: It, + shouldDisableDate: St, + disablePast: gt, + disableFuture: mt, + timezone: $n, + }), + Xt = (Pt && _n) || wt, + Sn = (Pt && _n) || It, + Rn = `${st}-grid-label`, + jn = cn !== null, + On = + (rt = + (it = en == null ? void 0 : en.calendarHeader) != null ? it : Mt == null ? void 0 : Mt.CalendarHeader) != + null + ? rt + : PickersCalendarHeader, + Zn = useSlotProps({ + elementType: On, + externalSlotProps: + (ot = sn == null ? void 0 : sn.calendarHeader) != null ? ot : Ht == null ? void 0 : Ht.calendarHeader, + additionalProps: { + views: $t, + view: Nn, + currentMonth: fn.currentMonth, + onViewChange: Tn, + onMonthChange: (Tr, Ar) => Dn({ newMonth: Tr, direction: Ar }), + minDate: Xt, + maxDate: Sn, + disabled: Pt, + disablePast: gt, + disableFuture: mt, + reduceAnimations: kt, + timezone: $n, + labelId: Rn, + slots: en, + slotProps: sn, + }, + ownerState: lt, + }), + Vn = useEventCallback((Tr) => { + const Ar = at.startOfMonth(Tr), + qr = at.endOfMonth(Tr), + jr = un(Tr) + ? findClosestEnabledDate({ + utils: at, + date: Tr, + minDate: at.isBefore(wt, Ar) ? Ar : wt, + maxDate: at.isAfter(It, qr) ? qr : It, + disablePast: gt, + disableFuture: mt, + isDateDisabled: un, + timezone: $n, + }) + : Tr + jr ? (An(jr, 'finish'), xt == null || xt(Ar)) : (In(), kn(Ar)), pn(jr, !0) + }), + qn = useEventCallback((Tr) => { + const Ar = at.startOfYear(Tr), + qr = at.endOfYear(Tr), + jr = un(Tr) + ? findClosestEnabledDate({ + utils: at, + date: Tr, + minDate: at.isBefore(wt, Ar) ? Ar : wt, + maxDate: at.isAfter(It, qr) ? qr : It, + disablePast: gt, + disableFuture: mt, + isDateDisabled: un, + timezone: $n, + }) + : Tr + jr ? (An(jr, 'finish'), vt == null || vt(jr)) : (In(), kn(Ar)), pn(jr, !0) + }), + zn = useEventCallback((Tr) => Pn(Tr && mergeDateAndTime(at, Tr, _n ?? wn), 'finish')) + reactExports.useEffect(() => { + _n != null && at.isValid(_n) && kn(_n) + }, [_n]) + const Jn = lt, + Hn = useUtilityClasses$1(Jn), + pr = { disablePast: gt, disableFuture: mt, maxDate: It, minDate: wt }, + fr = { disableHighlightToday: Ot, readOnly: Ct, disabled: Pt, timezone: $n, gridLabelId: Rn }, + xr = reactExports.useRef(Nn) + reactExports.useEffect(() => { + xr.current !== Nn && (cn === xr.current && mn(Nn, !0), (xr.current = Nn)) + }, [cn, mn, Nn]) + const io = reactExports.useMemo(() => [_n], [_n]) + return jsxRuntimeExports.jsxs( + DateCalendarRoot, + _extends$u({ ref: nt, className: clsx(Hn.root, jt), ownerState: Jn }, Qt, { + children: [ + jsxRuntimeExports.jsx(On, _extends$u({}, Zn)), + jsxRuntimeExports.jsx(DateCalendarViewTransitionContainer, { + reduceAnimations: kt, + className: Hn.viewTransitionContainer, + transKey: Nn, + ownerState: Jn, + children: jsxRuntimeExports.jsxs('div', { + children: [ + Nn === 'year' && + jsxRuntimeExports.jsx( + YearCalendar, + _extends$u({}, pr, fr, { + value: _n, + onChange: qn, + shouldDisableYear: At, + hasFocus: jn, + onFocusedViewChange: (Tr) => mn('year', Tr), + yearsPerRow: hn, + referenceDate: wn, + }), + ), + Nn === 'month' && + jsxRuntimeExports.jsx( + MonthCalendar, + _extends$u({}, pr, fr, { + hasFocus: jn, + className: jt, + value: _n, + onChange: Vn, + shouldDisableMonth: Tt, + onFocusedViewChange: (Tr) => mn('month', Tr), + monthsPerRow: vn, + referenceDate: wn, + }), + ), + Nn === 'day' && + jsxRuntimeExports.jsx( + DayCalendar, + _extends$u({}, fn, pr, fr, { + onMonthSwitchingAnimationEnd: Zt, + onFocusedDayChange: pn, + reduceAnimations: kt, + selectedDays: io, + onSelectedDaysChange: zn, + shouldDisableDate: St, + shouldDisableMonth: Tt, + shouldDisableYear: At, + hasFocus: jn, + onFocusedViewChange: (Tr) => mn('day', Tr), + showDaysOutsideCurrentMonth: Ft, + fixedWeekNumber: Nt, + dayOfWeekFormatter: Ut, + displayWeekNumber: nn, + components: Mt, + componentsProps: Ht, + slots: en, + slotProps: sn, + loading: Kt, + renderLoading: rn, + }), + ), + ], + }), + }), + ], + }), + ) + }) + function getDatePickerToolbarUtilityClass(tt) { + return generateUtilityClass('MuiDatePickerToolbar', tt) + } + generateUtilityClasses('MuiDatePickerToolbar', ['root', 'title']) + const _excluded$m = ['value', 'isLandscape', 'onChange', 'toolbarFormat', 'toolbarPlaceholder', 'views'], + useUtilityClasses = (tt) => { + const { classes: et } = tt + return composeClasses({ root: ['root'], title: ['title'] }, getDatePickerToolbarUtilityClass, et) + }, + DatePickerToolbarRoot = styled$1(PickersToolbar, { + name: 'MuiDatePickerToolbar', + slot: 'Root', + overridesResolver: (tt, et) => et.root, + })({}), + DatePickerToolbarTitle = styled$1(Typography$1, { + name: 'MuiDatePickerToolbar', + slot: 'Title', + overridesResolver: (tt, et) => et.title, + })(({ ownerState: tt }) => _extends$u({}, tt.isLandscape && { margin: 'auto 16px auto auto' })), + DatePickerToolbar = reactExports.forwardRef(function (et, nt) { + const rt = useThemeProps({ props: et, name: 'MuiDatePickerToolbar' }), + { value: it, isLandscape: ot, toolbarFormat: at, toolbarPlaceholder: st = '––', views: lt } = rt, + ct = _objectWithoutPropertiesLoose$m(rt, _excluded$m), + ut = useUtils(), + ht = useLocaleText(), + dt = useUtilityClasses(rt), + pt = reactExports.useMemo(() => { + if (!it) return st + const gt = resolveDateFormat(ut, { format: at, views: lt }, !0) + return ut.formatByString(it, gt) + }, [it, at, st, ut, lt]), + mt = rt + return jsxRuntimeExports.jsx( + DatePickerToolbarRoot, + _extends$u({ ref: nt, toolbarTitle: ht.datePickerToolbarTitle, isLandscape: ot, className: dt.root }, ct, { + children: jsxRuntimeExports.jsx(DatePickerToolbarTitle, { + variant: 'h4', + align: ot ? 'left' : 'center', + ownerState: mt, + className: dt.title, + children: pt, + }), + }), + ) + }) + function useDatePickerDefaultizedProps(tt, et) { + var nt, rt, it, ot + const at = useUtils(), + st = useDefaultDates(), + lt = useThemeProps({ props: tt, name: et }), + ct = reactExports.useMemo(() => { + var ht + return ((ht = lt.localeText) == null ? void 0 : ht.toolbarTitle) == null + ? lt.localeText + : _extends$u({}, lt.localeText, { datePickerToolbarTitle: lt.localeText.toolbarTitle }) + }, [lt.localeText]), + ut = (nt = lt.slots) != null ? nt : uncapitalizeObjectKeys(lt.components) + return _extends$u( + {}, + lt, + { localeText: ct }, + applyDefaultViewProps({ + views: lt.views, + openTo: lt.openTo, + defaultViews: ['year', 'day'], + defaultOpenTo: 'day', + }), + { + disableFuture: (rt = lt.disableFuture) != null ? rt : !1, + disablePast: (it = lt.disablePast) != null ? it : !1, + minDate: applyDefaultDate(at, lt.minDate, st.minDate), + maxDate: applyDefaultDate(at, lt.maxDate, st.maxDate), + slots: _extends$u({ toolbar: DatePickerToolbar }, ut), + slotProps: (ot = lt.slotProps) != null ? ot : lt.componentsProps, + }, + ) + } + const _excluded$l = ['props', 'getOpenDialogAriaText'], + _excluded2$6 = ['ownerState'], + _excluded3$1 = ['ownerState'], + useDesktopPicker = (tt) => { + var et, nt, rt, it, ot + let { props: at, getOpenDialogAriaText: st } = tt, + lt = _objectWithoutPropertiesLoose$m(tt, _excluded$l) + const { + slots: ct, + slotProps: ut, + className: ht, + sx: dt, + format: pt, + formatDensity: mt, + timezone: gt, + label: yt, + inputRef: bt, + readOnly: vt, + disabled: xt, + autoFocus: kt, + localeText: St, + reduceAnimations: Tt, + } = at, + At = useUtils(), + Et = reactExports.useRef(null), + $t = reactExports.useRef(null), + Dt = useId(), + jt = (et = ut == null || (nt = ut.toolbar) == null ? void 0 : nt.hidden) != null ? et : !1, + { + open: Pt, + actions: Ct, + hasUIView: wt, + layoutProps: It, + renderCurrentView: Ot, + shouldRestoreFocus: Wt, + fieldProps: zt, + } = usePicker( + _extends$u({}, lt, { + props: at, + inputRef: Et, + autoFocusView: !0, + additionalViewProps: {}, + wrapperVariant: 'desktop', + }), + ), + Ft = (rt = ct.inputAdornment) != null ? rt : MuiInputAdornment, + Nt = useSlotProps({ + elementType: Ft, + externalSlotProps: ut == null ? void 0 : ut.inputAdornment, + additionalProps: { position: 'end' }, + ownerState: at, + }), + Ut = _objectWithoutPropertiesLoose$m(Nt, _excluded2$6), + Mt = (it = ct.openPickerButton) != null ? it : IconButton$2, + Ht = useSlotProps({ + elementType: Mt, + externalSlotProps: ut == null ? void 0 : ut.openPickerButton, + additionalProps: { + disabled: xt || vt, + onClick: Pt ? Ct.onClose : Ct.onOpen, + 'aria-label': st(zt.value, At), + edge: Ut.position, + }, + ownerState: at, + }), + en = _objectWithoutPropertiesLoose$m(Ht, _excluded3$1), + sn = ct.openPickerIcon, + Kt = ct.field, + rn = useSlotProps({ + elementType: Kt, + externalSlotProps: ut == null ? void 0 : ut.field, + additionalProps: _extends$u({}, zt, jt && { id: Dt }, { + readOnly: vt, + disabled: xt, + className: ht, + sx: dt, + format: pt, + formatDensity: mt, + timezone: gt, + label: yt, + autoFocus: kt && !at.open, + focused: Pt ? !0 : void 0, + }), + ownerState: at, + }) + wt && + (rn.InputProps = _extends$u({}, rn.InputProps, { + ref: $t, + [`${Ut.position}Adornment`]: jsxRuntimeExports.jsx( + Ft, + _extends$u({}, Ut, { + children: jsxRuntimeExports.jsx( + Mt, + _extends$u({}, en, { + children: jsxRuntimeExports.jsx(sn, _extends$u({}, ut == null ? void 0 : ut.openPickerIcon)), + }), + ), + }), + ), + })) + const nn = _extends$u( + { textField: ct.textField, clearIcon: ct.clearIcon, clearButton: ct.clearButton }, + rn.slots, + ), + hn = (ot = ct.layout) != null ? ot : PickersLayout, + vn = useForkRef(Et, rn.inputRef, bt) + let an = Dt + jt && (yt ? (an = `${Dt}-label`) : (an = void 0)) + const Qt = _extends$u({}, ut, { + toolbar: _extends$u({}, ut == null ? void 0 : ut.toolbar, { titleId: Dt }), + popper: _extends$u({ 'aria-labelledby': an }, ut == null ? void 0 : ut.popper), + }) + return { + renderPicker: () => + jsxRuntimeExports.jsxs(LocalizationProvider, { + localeText: St, + children: [ + jsxRuntimeExports.jsx(Kt, _extends$u({}, rn, { slots: nn, slotProps: Qt, inputRef: vn })), + jsxRuntimeExports.jsx( + PickersPopper, + _extends$u({ role: 'dialog', placement: 'bottom-start', anchorEl: $t.current }, Ct, { + open: Pt, + slots: ct, + slotProps: Qt, + shouldRestoreFocus: Wt, + reduceAnimations: Tt, + children: jsxRuntimeExports.jsx( + hn, + _extends$u({}, It, Qt == null ? void 0 : Qt.layout, { slots: ct, slotProps: Qt, children: Ot() }), + ), + }), + ), + ], + }), + } + }, + renderDateViewCalendar = ({ + view: tt, + onViewChange: et, + views: nt, + focusedView: rt, + onFocusedViewChange: it, + value: ot, + defaultValue: at, + referenceDate: st, + onChange: lt, + className: ct, + classes: ut, + disableFuture: ht, + disablePast: dt, + minDate: pt, + maxDate: mt, + shouldDisableDate: gt, + shouldDisableMonth: yt, + shouldDisableYear: bt, + reduceAnimations: vt, + onMonthChange: xt, + monthsPerRow: kt, + onYearChange: St, + yearsPerRow: Tt, + defaultCalendarMonth: At, + components: Et, + componentsProps: $t, + slots: Dt, + slotProps: jt, + loading: Pt, + renderLoading: Ct, + disableHighlightToday: wt, + readOnly: It, + disabled: Ot, + showDaysOutsideCurrentMonth: Wt, + dayOfWeekFormatter: zt, + sx: Ft, + autoFocus: Nt, + fixedWeekNumber: Ut, + displayWeekNumber: Mt, + timezone: Ht, + }) => + jsxRuntimeExports.jsx(DateCalendar, { + view: tt, + onViewChange: et, + views: nt.filter(isDatePickerView), + focusedView: rt && isDatePickerView(rt) ? rt : null, + onFocusedViewChange: it, + value: ot, + defaultValue: at, + referenceDate: st, + onChange: lt, + className: ct, + classes: ut, + disableFuture: ht, + disablePast: dt, + minDate: pt, + maxDate: mt, + shouldDisableDate: gt, + shouldDisableMonth: yt, + shouldDisableYear: bt, + reduceAnimations: vt, + onMonthChange: xt, + monthsPerRow: kt, + onYearChange: St, + yearsPerRow: Tt, + defaultCalendarMonth: At, + components: Et, + componentsProps: $t, + slots: Dt, + slotProps: jt, + loading: Pt, + renderLoading: Ct, + disableHighlightToday: wt, + readOnly: It, + disabled: Ot, + showDaysOutsideCurrentMonth: Wt, + dayOfWeekFormatter: zt, + sx: Ft, + autoFocus: Nt, + fixedWeekNumber: Ut, + displayWeekNumber: Mt, + timezone: Ht, + }), + DesktopDatePicker = reactExports.forwardRef(function (et, nt) { + var rt, it, ot, at + const st = useLocaleText(), + lt = useUtils(), + ct = useDatePickerDefaultizedProps(et, 'MuiDesktopDatePicker'), + ut = _extends$u( + { day: renderDateViewCalendar, month: renderDateViewCalendar, year: renderDateViewCalendar }, + ct.viewRenderers, + ), + ht = _extends$u({}, ct, { + viewRenderers: ut, + format: resolveDateFormat(lt, ct, !1), + yearsPerRow: (rt = ct.yearsPerRow) != null ? rt : 4, + slots: _extends$u({ openPickerIcon: CalendarIcon, field: DateField }, ct.slots), + slotProps: _extends$u({}, ct.slotProps, { + field: (pt) => { + var mt + return _extends$u( + {}, + resolveComponentProps((mt = ct.slotProps) == null ? void 0 : mt.field, pt), + extractValidationProps(ct), + { ref: nt }, + ) + }, + toolbar: _extends$u({ hidden: !0 }, (it = ct.slotProps) == null ? void 0 : it.toolbar), + }), + }), + { renderPicker: dt } = useDesktopPicker({ + props: ht, + valueManager: singleItemValueManager, + valueType: 'date', + getOpenDialogAriaText: + (ot = (at = ht.localeText) == null ? void 0 : at.openDatePickerDialogue) != null + ? ot + : st.openDatePickerDialogue, + validator: validateDate, + }) + return dt() + }) + DesktopDatePicker.propTypes = { + autoFocus: PropTypes.bool, + className: PropTypes.string, + closeOnSelect: PropTypes.bool, + components: PropTypes.object, + componentsProps: PropTypes.object, + dayOfWeekFormatter: PropTypes.func, + defaultCalendarMonth: PropTypes.any, + defaultValue: PropTypes.any, + disabled: PropTypes.bool, + disableFuture: PropTypes.bool, + disableHighlightToday: PropTypes.bool, + disableOpenPicker: PropTypes.bool, + disablePast: PropTypes.bool, + displayWeekNumber: PropTypes.bool, + fixedWeekNumber: PropTypes.number, + format: PropTypes.string, + formatDensity: PropTypes.oneOf(['dense', 'spacious']), + inputRef: refType$1, + label: PropTypes.node, + loading: PropTypes.bool, + localeText: PropTypes.object, + maxDate: PropTypes.any, + minDate: PropTypes.any, + monthsPerRow: PropTypes.oneOf([3, 4]), + onAccept: PropTypes.func, + onChange: PropTypes.func, + onClose: PropTypes.func, + onError: PropTypes.func, + onMonthChange: PropTypes.func, + onOpen: PropTypes.func, + onSelectedSectionsChange: PropTypes.func, + onViewChange: PropTypes.func, + onYearChange: PropTypes.func, + open: PropTypes.bool, + openTo: PropTypes.oneOf(['day', 'month', 'year']), + orientation: PropTypes.oneOf(['landscape', 'portrait']), + readOnly: PropTypes.bool, + reduceAnimations: PropTypes.bool, + referenceDate: PropTypes.any, + renderLoading: PropTypes.func, + selectedSections: PropTypes.oneOfType([ + PropTypes.oneOf(['all', 'day', 'hours', 'meridiem', 'minutes', 'month', 'seconds', 'weekDay', 'year']), + PropTypes.number, + PropTypes.shape({ endIndex: PropTypes.number.isRequired, startIndex: PropTypes.number.isRequired }), + ]), + shouldDisableDate: PropTypes.func, + shouldDisableMonth: PropTypes.func, + shouldDisableYear: PropTypes.func, + showDaysOutsideCurrentMonth: PropTypes.bool, + slotProps: PropTypes.object, + slots: PropTypes.object, + sx: PropTypes.oneOfType([ + PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), + PropTypes.func, + PropTypes.object, + ]), + timezone: PropTypes.string, + value: PropTypes.any, + view: PropTypes.oneOf(['day', 'month', 'year']), + viewRenderers: PropTypes.shape({ day: PropTypes.func, month: PropTypes.func, year: PropTypes.func }), + views: PropTypes.arrayOf(PropTypes.oneOf(['day', 'month', 'year']).isRequired), + yearsPerRow: PropTypes.oneOf([3, 4]), + } + const _excluded$k = ['props', 'getOpenDialogAriaText'], + useMobilePicker = (tt) => { + var et, nt, rt + let { props: it, getOpenDialogAriaText: ot } = tt, + at = _objectWithoutPropertiesLoose$m(tt, _excluded$k) + const { + slots: st, + slotProps: lt, + className: ct, + sx: ut, + format: ht, + formatDensity: dt, + timezone: pt, + label: mt, + inputRef: gt, + readOnly: yt, + disabled: bt, + localeText: vt, + } = it, + xt = useUtils(), + kt = reactExports.useRef(null), + St = useId(), + Tt = (et = lt == null || (nt = lt.toolbar) == null ? void 0 : nt.hidden) != null ? et : !1, + { + open: At, + actions: Et, + layoutProps: $t, + renderCurrentView: Dt, + fieldProps: jt, + } = usePicker( + _extends$u({}, at, { + props: it, + inputRef: kt, + autoFocusView: !0, + additionalViewProps: {}, + wrapperVariant: 'mobile', + }), + ), + Pt = st.field, + Ct = useSlotProps({ + elementType: Pt, + externalSlotProps: lt == null ? void 0 : lt.field, + additionalProps: _extends$u( + {}, + jt, + Tt && { id: St }, + !(bt || yt) && { onClick: Et.onOpen, onKeyDown: onSpaceOrEnter(Et.onOpen) }, + { + readOnly: yt ?? !0, + disabled: bt, + className: ct, + sx: ut, + format: ht, + formatDensity: dt, + timezone: pt, + label: mt, + }, + ), + ownerState: it, + }) + Ct.inputProps = _extends$u({}, Ct.inputProps, { 'aria-label': ot(jt.value, xt) }) + const wt = _extends$u({ textField: st.textField }, Ct.slots), + It = (rt = st.layout) != null ? rt : PickersLayout, + Ot = useForkRef(kt, Ct.inputRef, gt) + let Wt = St + Tt && (mt ? (Wt = `${St}-label`) : (Wt = void 0)) + const zt = _extends$u({}, lt, { + toolbar: _extends$u({}, lt == null ? void 0 : lt.toolbar, { titleId: St }), + mobilePaper: _extends$u({ 'aria-labelledby': Wt }, lt == null ? void 0 : lt.mobilePaper), + }) + return { + renderPicker: () => + jsxRuntimeExports.jsxs(LocalizationProvider, { + localeText: vt, + children: [ + jsxRuntimeExports.jsx(Pt, _extends$u({}, Ct, { slots: wt, slotProps: zt, inputRef: Ot })), + jsxRuntimeExports.jsx( + PickersModalDialog, + _extends$u({}, Et, { + open: At, + slots: st, + slotProps: zt, + children: jsxRuntimeExports.jsx( + It, + _extends$u({}, $t, zt == null ? void 0 : zt.layout, { slots: st, slotProps: zt, children: Dt() }), + ), + }), + ), + ], + }), + } + }, + MobileDatePicker = reactExports.forwardRef(function (et, nt) { + var rt, it, ot + const at = useLocaleText(), + st = useUtils(), + lt = useDatePickerDefaultizedProps(et, 'MuiMobileDatePicker'), + ct = _extends$u( + { day: renderDateViewCalendar, month: renderDateViewCalendar, year: renderDateViewCalendar }, + lt.viewRenderers, + ), + ut = _extends$u({}, lt, { + viewRenderers: ct, + format: resolveDateFormat(st, lt, !1), + slots: _extends$u({ field: DateField }, lt.slots), + slotProps: _extends$u({}, lt.slotProps, { + field: (dt) => { + var pt + return _extends$u( + {}, + resolveComponentProps((pt = lt.slotProps) == null ? void 0 : pt.field, dt), + extractValidationProps(lt), + { ref: nt }, + ) + }, + toolbar: _extends$u({ hidden: !1 }, (rt = lt.slotProps) == null ? void 0 : rt.toolbar), + }), + }), + { renderPicker: ht } = useMobilePicker({ + props: ut, + valueManager: singleItemValueManager, + valueType: 'date', + getOpenDialogAriaText: + (it = (ot = ut.localeText) == null ? void 0 : ot.openDatePickerDialogue) != null + ? it + : at.openDatePickerDialogue, + validator: validateDate, + }) + return ht() + }) + MobileDatePicker.propTypes = { + autoFocus: PropTypes.bool, + className: PropTypes.string, + closeOnSelect: PropTypes.bool, + components: PropTypes.object, + componentsProps: PropTypes.object, + dayOfWeekFormatter: PropTypes.func, + defaultCalendarMonth: PropTypes.any, + defaultValue: PropTypes.any, + disabled: PropTypes.bool, + disableFuture: PropTypes.bool, + disableHighlightToday: PropTypes.bool, + disableOpenPicker: PropTypes.bool, + disablePast: PropTypes.bool, + displayWeekNumber: PropTypes.bool, + fixedWeekNumber: PropTypes.number, + format: PropTypes.string, + formatDensity: PropTypes.oneOf(['dense', 'spacious']), + inputRef: refType$1, + label: PropTypes.node, + loading: PropTypes.bool, + localeText: PropTypes.object, + maxDate: PropTypes.any, + minDate: PropTypes.any, + monthsPerRow: PropTypes.oneOf([3, 4]), + onAccept: PropTypes.func, + onChange: PropTypes.func, + onClose: PropTypes.func, + onError: PropTypes.func, + onMonthChange: PropTypes.func, + onOpen: PropTypes.func, + onSelectedSectionsChange: PropTypes.func, + onViewChange: PropTypes.func, + onYearChange: PropTypes.func, + open: PropTypes.bool, + openTo: PropTypes.oneOf(['day', 'month', 'year']), + orientation: PropTypes.oneOf(['landscape', 'portrait']), + readOnly: PropTypes.bool, + reduceAnimations: PropTypes.bool, + referenceDate: PropTypes.any, + renderLoading: PropTypes.func, + selectedSections: PropTypes.oneOfType([ + PropTypes.oneOf(['all', 'day', 'hours', 'meridiem', 'minutes', 'month', 'seconds', 'weekDay', 'year']), + PropTypes.number, + PropTypes.shape({ endIndex: PropTypes.number.isRequired, startIndex: PropTypes.number.isRequired }), + ]), + shouldDisableDate: PropTypes.func, + shouldDisableMonth: PropTypes.func, + shouldDisableYear: PropTypes.func, + showDaysOutsideCurrentMonth: PropTypes.bool, + slotProps: PropTypes.object, + slots: PropTypes.object, + sx: PropTypes.oneOfType([ + PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), + PropTypes.func, + PropTypes.object, + ]), + timezone: PropTypes.string, + value: PropTypes.any, + view: PropTypes.oneOf(['day', 'month', 'year']), + viewRenderers: PropTypes.shape({ day: PropTypes.func, month: PropTypes.func, year: PropTypes.func }), + views: PropTypes.arrayOf(PropTypes.oneOf(['day', 'month', 'year']).isRequired), + yearsPerRow: PropTypes.oneOf([3, 4]), + } + const _excluded$j = ['desktopModeMediaQuery'], + DatePicker = reactExports.forwardRef(function (et, nt) { + const rt = useThemeProps({ props: et, name: 'MuiDatePicker' }), + { desktopModeMediaQuery: it = DEFAULT_DESKTOP_MODE_MEDIA_QUERY } = rt, + ot = _objectWithoutPropertiesLoose$m(rt, _excluded$j) + return useMediaQuery(it, { defaultMatches: !0 }) + ? jsxRuntimeExports.jsx(DesktopDatePicker, _extends$u({ ref: nt }, ot)) + : jsxRuntimeExports.jsx(MobileDatePicker, _extends$u({ ref: nt }, ot)) + }) //! moment.js + //! version : 2.29.4 + //! authors : Tim Wood, Iskren Chernev, Moment.js contributors + //! license : MIT + //! momentjs.com + var hookCallback + function hooks() { + return hookCallback.apply(null, arguments) + } + function setHookCallback(tt) { + hookCallback = tt + } + function isArray$d(tt) { + return tt instanceof Array || Object.prototype.toString.call(tt) === '[object Array]' + } + function isObject$6(tt) { + return tt != null && Object.prototype.toString.call(tt) === '[object Object]' + } + function hasOwnProp(tt, et) { + return Object.prototype.hasOwnProperty.call(tt, et) + } + function isObjectEmpty(tt) { + if (Object.getOwnPropertyNames) return Object.getOwnPropertyNames(tt).length === 0 + var et + for (et in tt) if (hasOwnProp(tt, et)) return !1 + return !0 + } + function isUndefined(tt) { + return tt === void 0 + } + function isNumber$3(tt) { + return typeof tt == 'number' || Object.prototype.toString.call(tt) === '[object Number]' + } + function isDate(tt) { + return tt instanceof Date || Object.prototype.toString.call(tt) === '[object Date]' + } + function map$5(tt, et) { + var nt = [], + rt, + it = tt.length + for (rt = 0; rt < it; ++rt) nt.push(et(tt[rt], rt)) + return nt + } + function extend$1(tt, et) { + for (var nt in et) hasOwnProp(et, nt) && (tt[nt] = et[nt]) + return ( + hasOwnProp(et, 'toString') && (tt.toString = et.toString), + hasOwnProp(et, 'valueOf') && (tt.valueOf = et.valueOf), + tt + ) + } + function createUTC(tt, et, nt, rt) { + return createLocalOrUTC(tt, et, nt, rt, !0).utc() + } + function defaultParsingFlags() { + return { + empty: !1, + unusedTokens: [], + unusedInput: [], + overflow: -2, + charsLeftOver: 0, + nullInput: !1, + invalidEra: null, + invalidMonth: null, + invalidFormat: !1, + userInvalidated: !1, + iso: !1, + parsedDateParts: [], + era: null, + meridiem: null, + rfc2822: !1, + weekdayMismatch: !1, + } + } + function getParsingFlags(tt) { + return tt._pf == null && (tt._pf = defaultParsingFlags()), tt._pf + } + var some$1 + Array.prototype.some + ? (some$1 = Array.prototype.some) + : (some$1 = function (tt) { + var et = Object(this), + nt = et.length >>> 0, + rt + for (rt = 0; rt < nt; rt++) if (rt in et && tt.call(this, et[rt], rt, et)) return !0 + return !1 + }) + function isValid(tt) { + if (tt._isValid == null) { + var et = getParsingFlags(tt), + nt = some$1.call(et.parsedDateParts, function (it) { + return it != null + }), + rt = + !isNaN(tt._d.getTime()) && + et.overflow < 0 && + !et.empty && + !et.invalidEra && + !et.invalidMonth && + !et.invalidWeekday && + !et.weekdayMismatch && + !et.nullInput && + !et.invalidFormat && + !et.userInvalidated && + (!et.meridiem || (et.meridiem && nt)) + if ( + (tt._strict && (rt = rt && et.charsLeftOver === 0 && et.unusedTokens.length === 0 && et.bigHour === void 0), + Object.isFrozen == null || !Object.isFrozen(tt)) + ) + tt._isValid = rt + else return rt + } + return tt._isValid + } + function createInvalid(tt) { + var et = createUTC(NaN) + return tt != null ? extend$1(getParsingFlags(et), tt) : (getParsingFlags(et).userInvalidated = !0), et + } + var momentProperties = (hooks.momentProperties = []), + updateInProgress = !1 + function copyConfig(tt, et) { + var nt, + rt, + it, + ot = momentProperties.length + if ( + (isUndefined(et._isAMomentObject) || (tt._isAMomentObject = et._isAMomentObject), + isUndefined(et._i) || (tt._i = et._i), + isUndefined(et._f) || (tt._f = et._f), + isUndefined(et._l) || (tt._l = et._l), + isUndefined(et._strict) || (tt._strict = et._strict), + isUndefined(et._tzm) || (tt._tzm = et._tzm), + isUndefined(et._isUTC) || (tt._isUTC = et._isUTC), + isUndefined(et._offset) || (tt._offset = et._offset), + isUndefined(et._pf) || (tt._pf = getParsingFlags(et)), + isUndefined(et._locale) || (tt._locale = et._locale), + ot > 0) + ) + for (nt = 0; nt < ot; nt++) (rt = momentProperties[nt]), (it = et[rt]), isUndefined(it) || (tt[rt] = it) + return tt + } + function Moment(tt) { + copyConfig(this, tt), + (this._d = new Date(tt._d != null ? tt._d.getTime() : NaN)), + this.isValid() || (this._d = new Date(NaN)), + updateInProgress === !1 && ((updateInProgress = !0), hooks.updateOffset(this), (updateInProgress = !1)) + } + function isMoment(tt) { + return tt instanceof Moment || (tt != null && tt._isAMomentObject != null) + } + function warn$1(tt) { + hooks.suppressDeprecationWarnings === !1 && + typeof console < 'u' && + console.warn && + console.warn('Deprecation warning: ' + tt) + } + function deprecate(tt, et) { + var nt = !0 + return extend$1(function () { + if ((hooks.deprecationHandler != null && hooks.deprecationHandler(null, tt), nt)) { + var rt = [], + it, + ot, + at, + st = arguments.length + for (ot = 0; ot < st; ot++) { + if (((it = ''), typeof arguments[ot] == 'object')) { + it += + ` +[` + + ot + + '] ' + for (at in arguments[0]) hasOwnProp(arguments[0], at) && (it += at + ': ' + arguments[0][at] + ', ') + it = it.slice(0, -2) + } else it = arguments[ot] + rt.push(it) + } + warn$1( + tt + + ` +Arguments: ` + + Array.prototype.slice.call(rt).join('') + + ` +` + + new Error().stack, + ), + (nt = !1) + } + return et.apply(this, arguments) + }, et) + } + var deprecations = {} + function deprecateSimple(tt, et) { + hooks.deprecationHandler != null && hooks.deprecationHandler(tt, et), + deprecations[tt] || (warn$1(et), (deprecations[tt] = !0)) + } + hooks.suppressDeprecationWarnings = !1 + hooks.deprecationHandler = null + function isFunction$1(tt) { + return ( + (typeof Function < 'u' && tt instanceof Function) || Object.prototype.toString.call(tt) === '[object Function]' + ) + } + function set$1(tt) { + var et, nt + for (nt in tt) hasOwnProp(tt, nt) && ((et = tt[nt]), isFunction$1(et) ? (this[nt] = et) : (this['_' + nt] = et)) + ;(this._config = tt), + (this._dayOfMonthOrdinalParseLenient = new RegExp( + (this._dayOfMonthOrdinalParse.source || this._ordinalParse.source) + '|' + /\d{1,2}/.source, + )) + } + function mergeConfigs(tt, et) { + var nt = extend$1({}, tt), + rt + for (rt in et) + hasOwnProp(et, rt) && + (isObject$6(tt[rt]) && isObject$6(et[rt]) + ? ((nt[rt] = {}), extend$1(nt[rt], tt[rt]), extend$1(nt[rt], et[rt])) + : et[rt] != null + ? (nt[rt] = et[rt]) + : delete nt[rt]) + for (rt in tt) hasOwnProp(tt, rt) && !hasOwnProp(et, rt) && isObject$6(tt[rt]) && (nt[rt] = extend$1({}, nt[rt])) + return nt + } + function Locale(tt) { + tt != null && this.set(tt) + } + var keys$4 + Object.keys + ? (keys$4 = Object.keys) + : (keys$4 = function (tt) { + var et, + nt = [] + for (et in tt) hasOwnProp(tt, et) && nt.push(et) + return nt + }) + var defaultCalendar = { + sameDay: '[Today at] LT', + nextDay: '[Tomorrow at] LT', + nextWeek: 'dddd [at] LT', + lastDay: '[Yesterday at] LT', + lastWeek: '[Last] dddd [at] LT', + sameElse: 'L', + } + function calendar$1(tt, et, nt) { + var rt = this._calendar[tt] || this._calendar.sameElse + return isFunction$1(rt) ? rt.call(et, nt) : rt + } + function zeroFill(tt, et, nt) { + var rt = '' + Math.abs(tt), + it = et - rt.length, + ot = tt >= 0 + return (ot ? (nt ? '+' : '') : '-') + Math.pow(10, Math.max(0, it)).toString().substr(1) + rt + } + var formattingTokens = + /(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g, + localFormattingTokens = /(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g, + formatFunctions = {}, + formatTokenFunctions = {} + function addFormatToken(tt, et, nt, rt) { + var it = rt + typeof rt == 'string' && + (it = function () { + return this[rt]() + }), + tt && (formatTokenFunctions[tt] = it), + et && + (formatTokenFunctions[et[0]] = function () { + return zeroFill(it.apply(this, arguments), et[1], et[2]) + }), + nt && + (formatTokenFunctions[nt] = function () { + return this.localeData().ordinal(it.apply(this, arguments), tt) + }) + } + function removeFormattingTokens(tt) { + return tt.match(/\[[\s\S]/) ? tt.replace(/^\[|\]$/g, '') : tt.replace(/\\/g, '') + } + function makeFormatFunction(tt) { + var et = tt.match(formattingTokens), + nt, + rt + for (nt = 0, rt = et.length; nt < rt; nt++) + formatTokenFunctions[et[nt]] ? (et[nt] = formatTokenFunctions[et[nt]]) : (et[nt] = removeFormattingTokens(et[nt])) + return function (it) { + var ot = '', + at + for (at = 0; at < rt; at++) ot += isFunction$1(et[at]) ? et[at].call(it, tt) : et[at] + return ot + } + } + function formatMoment(tt, et) { + return tt.isValid() + ? ((et = expandFormat(et, tt.localeData())), + (formatFunctions[et] = formatFunctions[et] || makeFormatFunction(et)), + formatFunctions[et](tt)) + : tt.localeData().invalidDate() + } + function expandFormat(tt, et) { + var nt = 5 + function rt(it) { + return et.longDateFormat(it) || it + } + for (localFormattingTokens.lastIndex = 0; nt >= 0 && localFormattingTokens.test(tt); ) + (tt = tt.replace(localFormattingTokens, rt)), (localFormattingTokens.lastIndex = 0), (nt -= 1) + return tt + } + var defaultLongDateFormat = { + LTS: 'h:mm:ss A', + LT: 'h:mm A', + L: 'MM/DD/YYYY', + LL: 'MMMM D, YYYY', + LLL: 'MMMM D, YYYY h:mm A', + LLLL: 'dddd, MMMM D, YYYY h:mm A', + } + function longDateFormat(tt) { + var et = this._longDateFormat[tt], + nt = this._longDateFormat[tt.toUpperCase()] + return et || !nt + ? et + : ((this._longDateFormat[tt] = nt + .match(formattingTokens) + .map(function (rt) { + return rt === 'MMMM' || rt === 'MM' || rt === 'DD' || rt === 'dddd' ? rt.slice(1) : rt + }) + .join('')), + this._longDateFormat[tt]) + } + var defaultInvalidDate = 'Invalid date' + function invalidDate() { + return this._invalidDate + } + var defaultOrdinal = '%d', + defaultDayOfMonthOrdinalParse = /\d{1,2}/ + function ordinal$1(tt) { + return this._ordinal.replace('%d', tt) + } + var defaultRelativeTime = { + future: 'in %s', + past: '%s ago', + s: 'a few seconds', + ss: '%d seconds', + m: 'a minute', + mm: '%d minutes', + h: 'an hour', + hh: '%d hours', + d: 'a day', + dd: '%d days', + w: 'a week', + ww: '%d weeks', + M: 'a month', + MM: '%d months', + y: 'a year', + yy: '%d years', + } + function relativeTime(tt, et, nt, rt) { + var it = this._relativeTime[nt] + return isFunction$1(it) ? it(tt, et, nt, rt) : it.replace(/%d/i, tt) + } + function pastFuture(tt, et) { + var nt = this._relativeTime[tt > 0 ? 'future' : 'past'] + return isFunction$1(nt) ? nt(et) : nt.replace(/%s/i, et) + } + var aliases = {} + function addUnitAlias(tt, et) { + var nt = tt.toLowerCase() + aliases[nt] = aliases[nt + 's'] = aliases[et] = tt + } + function normalizeUnits(tt) { + return typeof tt == 'string' ? aliases[tt] || aliases[tt.toLowerCase()] : void 0 + } + function normalizeObjectUnits(tt) { + var et = {}, + nt, + rt + for (rt in tt) hasOwnProp(tt, rt) && ((nt = normalizeUnits(rt)), nt && (et[nt] = tt[rt])) + return et + } + var priorities = {} + function addUnitPriority(tt, et) { + priorities[tt] = et + } + function getPrioritizedUnits(tt) { + var et = [], + nt + for (nt in tt) hasOwnProp(tt, nt) && et.push({ unit: nt, priority: priorities[nt] }) + return ( + et.sort(function (rt, it) { + return rt.priority - it.priority + }), + et + ) + } + function isLeapYear(tt) { + return (tt % 4 === 0 && tt % 100 !== 0) || tt % 400 === 0 + } + function absFloor(tt) { + return tt < 0 ? Math.ceil(tt) || 0 : Math.floor(tt) + } + function toInt(tt) { + var et = +tt, + nt = 0 + return et !== 0 && isFinite(et) && (nt = absFloor(et)), nt + } + function makeGetSet(tt, et) { + return function (nt) { + return nt != null ? (set$1$1(this, tt, nt), hooks.updateOffset(this, et), this) : get$3(this, tt) + } + } + function get$3(tt, et) { + return tt.isValid() ? tt._d['get' + (tt._isUTC ? 'UTC' : '') + et]() : NaN + } + function set$1$1(tt, et, nt) { + tt.isValid() && + !isNaN(nt) && + (et === 'FullYear' && isLeapYear(tt.year()) && tt.month() === 1 && tt.date() === 29 + ? ((nt = toInt(nt)), tt._d['set' + (tt._isUTC ? 'UTC' : '') + et](nt, tt.month(), daysInMonth(nt, tt.month()))) + : tt._d['set' + (tt._isUTC ? 'UTC' : '') + et](nt)) + } + function stringGet(tt) { + return (tt = normalizeUnits(tt)), isFunction$1(this[tt]) ? this[tt]() : this + } + function stringSet(tt, et) { + if (typeof tt == 'object') { + tt = normalizeObjectUnits(tt) + var nt = getPrioritizedUnits(tt), + rt, + it = nt.length + for (rt = 0; rt < it; rt++) this[nt[rt].unit](tt[nt[rt].unit]) + } else if (((tt = normalizeUnits(tt)), isFunction$1(this[tt]))) return this[tt](et) + return this + } + var match1 = /\d/, + match2 = /\d\d/, + match3 = /\d{3}/, + match4 = /\d{4}/, + match6 = /[+-]?\d{6}/, + match1to2 = /\d\d?/, + match3to4 = /\d\d\d\d?/, + match5to6 = /\d\d\d\d\d\d?/, + match1to3 = /\d{1,3}/, + match1to4 = /\d{1,4}/, + match1to6 = /[+-]?\d{1,6}/, + matchUnsigned = /\d+/, + matchSigned = /[+-]?\d+/, + matchOffset = /Z|[+-]\d\d:?\d\d/gi, + matchShortOffset = /Z|[+-]\d\d(?::?\d\d)?/gi, + matchTimestamp = /[+-]?\d+(\.\d{1,3})?/, + matchWord = + /[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i, + regexes + regexes = {} + function addRegexToken(tt, et, nt) { + regexes[tt] = isFunction$1(et) + ? et + : function (rt, it) { + return rt && nt ? nt : et + } + } + function getParseRegexForToken(tt, et) { + return hasOwnProp(regexes, tt) ? regexes[tt](et._strict, et._locale) : new RegExp(unescapeFormat(tt)) + } + function unescapeFormat(tt) { + return regexEscape( + tt.replace('\\', '').replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g, function (et, nt, rt, it, ot) { + return nt || rt || it || ot + }), + ) + } + function regexEscape(tt) { + return tt.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&') + } + var tokens = {} + function addParseToken(tt, et) { + var nt, + rt = et, + it + for ( + typeof tt == 'string' && (tt = [tt]), + isNumber$3(et) && + (rt = function (ot, at) { + at[et] = toInt(ot) + }), + it = tt.length, + nt = 0; + nt < it; + nt++ + ) + tokens[tt[nt]] = rt + } + function addWeekParseToken(tt, et) { + addParseToken(tt, function (nt, rt, it, ot) { + ;(it._w = it._w || {}), et(nt, it._w, it, ot) + }) + } + function addTimeToArrayFromToken(tt, et, nt) { + et != null && hasOwnProp(tokens, tt) && tokens[tt](et, nt._a, nt, tt) + } + var YEAR = 0, + MONTH = 1, + DATE = 2, + HOUR = 3, + MINUTE = 4, + SECOND = 5, + MILLISECOND = 6, + WEEK = 7, + WEEKDAY = 8 + function mod(tt, et) { + return ((tt % et) + et) % et + } + var indexOf + Array.prototype.indexOf + ? (indexOf = Array.prototype.indexOf) + : (indexOf = function (tt) { + var et + for (et = 0; et < this.length; ++et) if (this[et] === tt) return et + return -1 + }) + function daysInMonth(tt, et) { + if (isNaN(tt) || isNaN(et)) return NaN + var nt = mod(et, 12) + return (tt += (et - nt) / 12), nt === 1 ? (isLeapYear(tt) ? 29 : 28) : 31 - ((nt % 7) % 2) + } + addFormatToken('M', ['MM', 2], 'Mo', function () { + return this.month() + 1 + }) + addFormatToken('MMM', 0, 0, function (tt) { + return this.localeData().monthsShort(this, tt) + }) + addFormatToken('MMMM', 0, 0, function (tt) { + return this.localeData().months(this, tt) + }) + addUnitAlias('month', 'M') + addUnitPriority('month', 8) + addRegexToken('M', match1to2) + addRegexToken('MM', match1to2, match2) + addRegexToken('MMM', function (tt, et) { + return et.monthsShortRegex(tt) + }) + addRegexToken('MMMM', function (tt, et) { + return et.monthsRegex(tt) + }) + addParseToken(['M', 'MM'], function (tt, et) { + et[MONTH] = toInt(tt) - 1 + }) + addParseToken(['MMM', 'MMMM'], function (tt, et, nt, rt) { + var it = nt._locale.monthsParse(tt, rt, nt._strict) + it != null ? (et[MONTH] = it) : (getParsingFlags(nt).invalidMonth = tt) + }) + var defaultLocaleMonths = + 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_'), + defaultLocaleMonthsShort = 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'), + MONTHS_IN_FORMAT = /D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/, + defaultMonthsShortRegex = matchWord, + defaultMonthsRegex = matchWord + function localeMonths(tt, et) { + return tt + ? isArray$d(this._months) + ? this._months[tt.month()] + : this._months[(this._months.isFormat || MONTHS_IN_FORMAT).test(et) ? 'format' : 'standalone'][tt.month()] + : isArray$d(this._months) + ? this._months + : this._months.standalone + } + function localeMonthsShort(tt, et) { + return tt + ? isArray$d(this._monthsShort) + ? this._monthsShort[tt.month()] + : this._monthsShort[MONTHS_IN_FORMAT.test(et) ? 'format' : 'standalone'][tt.month()] + : isArray$d(this._monthsShort) + ? this._monthsShort + : this._monthsShort.standalone + } + function handleStrictParse(tt, et, nt) { + var rt, + it, + ot, + at = tt.toLocaleLowerCase() + if (!this._monthsParse) + for (this._monthsParse = [], this._longMonthsParse = [], this._shortMonthsParse = [], rt = 0; rt < 12; ++rt) + (ot = createUTC([2e3, rt])), + (this._shortMonthsParse[rt] = this.monthsShort(ot, '').toLocaleLowerCase()), + (this._longMonthsParse[rt] = this.months(ot, '').toLocaleLowerCase()) + return nt + ? et === 'MMM' + ? ((it = indexOf.call(this._shortMonthsParse, at)), it !== -1 ? it : null) + : ((it = indexOf.call(this._longMonthsParse, at)), it !== -1 ? it : null) + : et === 'MMM' + ? ((it = indexOf.call(this._shortMonthsParse, at)), + it !== -1 ? it : ((it = indexOf.call(this._longMonthsParse, at)), it !== -1 ? it : null)) + : ((it = indexOf.call(this._longMonthsParse, at)), + it !== -1 ? it : ((it = indexOf.call(this._shortMonthsParse, at)), it !== -1 ? it : null)) + } + function localeMonthsParse(tt, et, nt) { + var rt, it, ot + if (this._monthsParseExact) return handleStrictParse.call(this, tt, et, nt) + for ( + this._monthsParse || ((this._monthsParse = []), (this._longMonthsParse = []), (this._shortMonthsParse = [])), + rt = 0; + rt < 12; + rt++ + ) { + if ( + ((it = createUTC([2e3, rt])), + nt && + !this._longMonthsParse[rt] && + ((this._longMonthsParse[rt] = new RegExp('^' + this.months(it, '').replace('.', '') + '$', 'i')), + (this._shortMonthsParse[rt] = new RegExp('^' + this.monthsShort(it, '').replace('.', '') + '$', 'i'))), + !nt && + !this._monthsParse[rt] && + ((ot = '^' + this.months(it, '') + '|^' + this.monthsShort(it, '')), + (this._monthsParse[rt] = new RegExp(ot.replace('.', ''), 'i'))), + nt && et === 'MMMM' && this._longMonthsParse[rt].test(tt)) + ) + return rt + if (nt && et === 'MMM' && this._shortMonthsParse[rt].test(tt)) return rt + if (!nt && this._monthsParse[rt].test(tt)) return rt + } + } + function setMonth(tt, et) { + var nt + if (!tt.isValid()) return tt + if (typeof et == 'string') { + if (/^\d+$/.test(et)) et = toInt(et) + else if (((et = tt.localeData().monthsParse(et)), !isNumber$3(et))) return tt + } + return ( + (nt = Math.min(tt.date(), daysInMonth(tt.year(), et))), + tt._d['set' + (tt._isUTC ? 'UTC' : '') + 'Month'](et, nt), + tt + ) + } + function getSetMonth(tt) { + return tt != null ? (setMonth(this, tt), hooks.updateOffset(this, !0), this) : get$3(this, 'Month') + } + function getDaysInMonth() { + return daysInMonth(this.year(), this.month()) + } + function monthsShortRegex(tt) { + return this._monthsParseExact + ? (hasOwnProp(this, '_monthsRegex') || computeMonthsParse.call(this), + tt ? this._monthsShortStrictRegex : this._monthsShortRegex) + : (hasOwnProp(this, '_monthsShortRegex') || (this._monthsShortRegex = defaultMonthsShortRegex), + this._monthsShortStrictRegex && tt ? this._monthsShortStrictRegex : this._monthsShortRegex) + } + function monthsRegex(tt) { + return this._monthsParseExact + ? (hasOwnProp(this, '_monthsRegex') || computeMonthsParse.call(this), + tt ? this._monthsStrictRegex : this._monthsRegex) + : (hasOwnProp(this, '_monthsRegex') || (this._monthsRegex = defaultMonthsRegex), + this._monthsStrictRegex && tt ? this._monthsStrictRegex : this._monthsRegex) + } + function computeMonthsParse() { + function tt(at, st) { + return st.length - at.length + } + var et = [], + nt = [], + rt = [], + it, + ot + for (it = 0; it < 12; it++) + (ot = createUTC([2e3, it])), + et.push(this.monthsShort(ot, '')), + nt.push(this.months(ot, '')), + rt.push(this.months(ot, '')), + rt.push(this.monthsShort(ot, '')) + for (et.sort(tt), nt.sort(tt), rt.sort(tt), it = 0; it < 12; it++) + (et[it] = regexEscape(et[it])), (nt[it] = regexEscape(nt[it])) + for (it = 0; it < 24; it++) rt[it] = regexEscape(rt[it]) + ;(this._monthsRegex = new RegExp('^(' + rt.join('|') + ')', 'i')), + (this._monthsShortRegex = this._monthsRegex), + (this._monthsStrictRegex = new RegExp('^(' + nt.join('|') + ')', 'i')), + (this._monthsShortStrictRegex = new RegExp('^(' + et.join('|') + ')', 'i')) + } + addFormatToken('Y', 0, 0, function () { + var tt = this.year() + return tt <= 9999 ? zeroFill(tt, 4) : '+' + tt + }) + addFormatToken(0, ['YY', 2], 0, function () { + return this.year() % 100 + }) + addFormatToken(0, ['YYYY', 4], 0, 'year') + addFormatToken(0, ['YYYYY', 5], 0, 'year') + addFormatToken(0, ['YYYYYY', 6, !0], 0, 'year') + addUnitAlias('year', 'y') + addUnitPriority('year', 1) + addRegexToken('Y', matchSigned) + addRegexToken('YY', match1to2, match2) + addRegexToken('YYYY', match1to4, match4) + addRegexToken('YYYYY', match1to6, match6) + addRegexToken('YYYYYY', match1to6, match6) + addParseToken(['YYYYY', 'YYYYYY'], YEAR) + addParseToken('YYYY', function (tt, et) { + et[YEAR] = tt.length === 2 ? hooks.parseTwoDigitYear(tt) : toInt(tt) + }) + addParseToken('YY', function (tt, et) { + et[YEAR] = hooks.parseTwoDigitYear(tt) + }) + addParseToken('Y', function (tt, et) { + et[YEAR] = parseInt(tt, 10) + }) + function daysInYear(tt) { + return isLeapYear(tt) ? 366 : 365 + } + hooks.parseTwoDigitYear = function (tt) { + return toInt(tt) + (toInt(tt) > 68 ? 1900 : 2e3) + } + var getSetYear = makeGetSet('FullYear', !0) + function getIsLeapYear() { + return isLeapYear(this.year()) + } + function createDate(tt, et, nt, rt, it, ot, at) { + var st + return ( + tt < 100 && tt >= 0 + ? ((st = new Date(tt + 400, et, nt, rt, it, ot, at)), isFinite(st.getFullYear()) && st.setFullYear(tt)) + : (st = new Date(tt, et, nt, rt, it, ot, at)), + st + ) + } + function createUTCDate(tt) { + var et, nt + return ( + tt < 100 && tt >= 0 + ? ((nt = Array.prototype.slice.call(arguments)), + (nt[0] = tt + 400), + (et = new Date(Date.UTC.apply(null, nt))), + isFinite(et.getUTCFullYear()) && et.setUTCFullYear(tt)) + : (et = new Date(Date.UTC.apply(null, arguments))), + et + ) + } + function firstWeekOffset(tt, et, nt) { + var rt = 7 + et - nt, + it = (7 + createUTCDate(tt, 0, rt).getUTCDay() - et) % 7 + return -it + rt - 1 + } + function dayOfYearFromWeeks(tt, et, nt, rt, it) { + var ot = (7 + nt - rt) % 7, + at = firstWeekOffset(tt, rt, it), + st = 1 + 7 * (et - 1) + ot + at, + lt, + ct + return ( + st <= 0 + ? ((lt = tt - 1), (ct = daysInYear(lt) + st)) + : st > daysInYear(tt) + ? ((lt = tt + 1), (ct = st - daysInYear(tt))) + : ((lt = tt), (ct = st)), + { year: lt, dayOfYear: ct } + ) + } + function weekOfYear(tt, et, nt) { + var rt = firstWeekOffset(tt.year(), et, nt), + it = Math.floor((tt.dayOfYear() - rt - 1) / 7) + 1, + ot, + at + return ( + it < 1 + ? ((at = tt.year() - 1), (ot = it + weeksInYear(at, et, nt))) + : it > weeksInYear(tt.year(), et, nt) + ? ((ot = it - weeksInYear(tt.year(), et, nt)), (at = tt.year() + 1)) + : ((at = tt.year()), (ot = it)), + { week: ot, year: at } + ) + } + function weeksInYear(tt, et, nt) { + var rt = firstWeekOffset(tt, et, nt), + it = firstWeekOffset(tt + 1, et, nt) + return (daysInYear(tt) - rt + it) / 7 + } + addFormatToken('w', ['ww', 2], 'wo', 'week') + addFormatToken('W', ['WW', 2], 'Wo', 'isoWeek') + addUnitAlias('week', 'w') + addUnitAlias('isoWeek', 'W') + addUnitPriority('week', 5) + addUnitPriority('isoWeek', 5) + addRegexToken('w', match1to2) + addRegexToken('ww', match1to2, match2) + addRegexToken('W', match1to2) + addRegexToken('WW', match1to2, match2) + addWeekParseToken(['w', 'ww', 'W', 'WW'], function (tt, et, nt, rt) { + et[rt.substr(0, 1)] = toInt(tt) + }) + function localeWeek(tt) { + return weekOfYear(tt, this._week.dow, this._week.doy).week + } + var defaultLocaleWeek = { dow: 0, doy: 6 } + function localeFirstDayOfWeek() { + return this._week.dow + } + function localeFirstDayOfYear() { + return this._week.doy + } + function getSetWeek(tt) { + var et = this.localeData().week(this) + return tt == null ? et : this.add((tt - et) * 7, 'd') + } + function getSetISOWeek(tt) { + var et = weekOfYear(this, 1, 4).week + return tt == null ? et : this.add((tt - et) * 7, 'd') + } + addFormatToken('d', 0, 'do', 'day') + addFormatToken('dd', 0, 0, function (tt) { + return this.localeData().weekdaysMin(this, tt) + }) + addFormatToken('ddd', 0, 0, function (tt) { + return this.localeData().weekdaysShort(this, tt) + }) + addFormatToken('dddd', 0, 0, function (tt) { + return this.localeData().weekdays(this, tt) + }) + addFormatToken('e', 0, 0, 'weekday') + addFormatToken('E', 0, 0, 'isoWeekday') + addUnitAlias('day', 'd') + addUnitAlias('weekday', 'e') + addUnitAlias('isoWeekday', 'E') + addUnitPriority('day', 11) + addUnitPriority('weekday', 11) + addUnitPriority('isoWeekday', 11) + addRegexToken('d', match1to2) + addRegexToken('e', match1to2) + addRegexToken('E', match1to2) + addRegexToken('dd', function (tt, et) { + return et.weekdaysMinRegex(tt) + }) + addRegexToken('ddd', function (tt, et) { + return et.weekdaysShortRegex(tt) + }) + addRegexToken('dddd', function (tt, et) { + return et.weekdaysRegex(tt) + }) + addWeekParseToken(['dd', 'ddd', 'dddd'], function (tt, et, nt, rt) { + var it = nt._locale.weekdaysParse(tt, rt, nt._strict) + it != null ? (et.d = it) : (getParsingFlags(nt).invalidWeekday = tt) + }) + addWeekParseToken(['d', 'e', 'E'], function (tt, et, nt, rt) { + et[rt] = toInt(tt) + }) + function parseWeekday(tt, et) { + return typeof tt != 'string' + ? tt + : isNaN(tt) + ? ((tt = et.weekdaysParse(tt)), typeof tt == 'number' ? tt : null) + : parseInt(tt, 10) + } + function parseIsoWeekday(tt, et) { + return typeof tt == 'string' ? et.weekdaysParse(tt) % 7 || 7 : isNaN(tt) ? null : tt + } + function shiftWeekdays(tt, et) { + return tt.slice(et, 7).concat(tt.slice(0, et)) + } + var defaultLocaleWeekdays = 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'), + defaultLocaleWeekdaysShort = 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'), + defaultLocaleWeekdaysMin = 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'), + defaultWeekdaysRegex = matchWord, + defaultWeekdaysShortRegex = matchWord, + defaultWeekdaysMinRegex = matchWord + function localeWeekdays(tt, et) { + var nt = isArray$d(this._weekdays) + ? this._weekdays + : this._weekdays[tt && tt !== !0 && this._weekdays.isFormat.test(et) ? 'format' : 'standalone'] + return tt === !0 ? shiftWeekdays(nt, this._week.dow) : tt ? nt[tt.day()] : nt + } + function localeWeekdaysShort(tt) { + return tt === !0 + ? shiftWeekdays(this._weekdaysShort, this._week.dow) + : tt + ? this._weekdaysShort[tt.day()] + : this._weekdaysShort + } + function localeWeekdaysMin(tt) { + return tt === !0 + ? shiftWeekdays(this._weekdaysMin, this._week.dow) + : tt + ? this._weekdaysMin[tt.day()] + : this._weekdaysMin + } + function handleStrictParse$1(tt, et, nt) { + var rt, + it, + ot, + at = tt.toLocaleLowerCase() + if (!this._weekdaysParse) + for (this._weekdaysParse = [], this._shortWeekdaysParse = [], this._minWeekdaysParse = [], rt = 0; rt < 7; ++rt) + (ot = createUTC([2e3, 1]).day(rt)), + (this._minWeekdaysParse[rt] = this.weekdaysMin(ot, '').toLocaleLowerCase()), + (this._shortWeekdaysParse[rt] = this.weekdaysShort(ot, '').toLocaleLowerCase()), + (this._weekdaysParse[rt] = this.weekdays(ot, '').toLocaleLowerCase()) + return nt + ? et === 'dddd' + ? ((it = indexOf.call(this._weekdaysParse, at)), it !== -1 ? it : null) + : et === 'ddd' + ? ((it = indexOf.call(this._shortWeekdaysParse, at)), it !== -1 ? it : null) + : ((it = indexOf.call(this._minWeekdaysParse, at)), it !== -1 ? it : null) + : et === 'dddd' + ? ((it = indexOf.call(this._weekdaysParse, at)), + it !== -1 || ((it = indexOf.call(this._shortWeekdaysParse, at)), it !== -1) + ? it + : ((it = indexOf.call(this._minWeekdaysParse, at)), it !== -1 ? it : null)) + : et === 'ddd' + ? ((it = indexOf.call(this._shortWeekdaysParse, at)), + it !== -1 || ((it = indexOf.call(this._weekdaysParse, at)), it !== -1) + ? it + : ((it = indexOf.call(this._minWeekdaysParse, at)), it !== -1 ? it : null)) + : ((it = indexOf.call(this._minWeekdaysParse, at)), + it !== -1 || ((it = indexOf.call(this._weekdaysParse, at)), it !== -1) + ? it + : ((it = indexOf.call(this._shortWeekdaysParse, at)), it !== -1 ? it : null)) + } + function localeWeekdaysParse(tt, et, nt) { + var rt, it, ot + if (this._weekdaysParseExact) return handleStrictParse$1.call(this, tt, et, nt) + for ( + this._weekdaysParse || + ((this._weekdaysParse = []), + (this._minWeekdaysParse = []), + (this._shortWeekdaysParse = []), + (this._fullWeekdaysParse = [])), + rt = 0; + rt < 7; + rt++ + ) { + if ( + ((it = createUTC([2e3, 1]).day(rt)), + nt && + !this._fullWeekdaysParse[rt] && + ((this._fullWeekdaysParse[rt] = new RegExp('^' + this.weekdays(it, '').replace('.', '\\.?') + '$', 'i')), + (this._shortWeekdaysParse[rt] = new RegExp('^' + this.weekdaysShort(it, '').replace('.', '\\.?') + '$', 'i')), + (this._minWeekdaysParse[rt] = new RegExp('^' + this.weekdaysMin(it, '').replace('.', '\\.?') + '$', 'i'))), + this._weekdaysParse[rt] || + ((ot = '^' + this.weekdays(it, '') + '|^' + this.weekdaysShort(it, '') + '|^' + this.weekdaysMin(it, '')), + (this._weekdaysParse[rt] = new RegExp(ot.replace('.', ''), 'i'))), + nt && et === 'dddd' && this._fullWeekdaysParse[rt].test(tt)) + ) + return rt + if (nt && et === 'ddd' && this._shortWeekdaysParse[rt].test(tt)) return rt + if (nt && et === 'dd' && this._minWeekdaysParse[rt].test(tt)) return rt + if (!nt && this._weekdaysParse[rt].test(tt)) return rt + } + } + function getSetDayOfWeek(tt) { + if (!this.isValid()) return tt != null ? this : NaN + var et = this._isUTC ? this._d.getUTCDay() : this._d.getDay() + return tt != null ? ((tt = parseWeekday(tt, this.localeData())), this.add(tt - et, 'd')) : et + } + function getSetLocaleDayOfWeek(tt) { + if (!this.isValid()) return tt != null ? this : NaN + var et = (this.day() + 7 - this.localeData()._week.dow) % 7 + return tt == null ? et : this.add(tt - et, 'd') + } + function getSetISODayOfWeek(tt) { + if (!this.isValid()) return tt != null ? this : NaN + if (tt != null) { + var et = parseIsoWeekday(tt, this.localeData()) + return this.day(this.day() % 7 ? et : et - 7) + } else return this.day() || 7 + } + function weekdaysRegex(tt) { + return this._weekdaysParseExact + ? (hasOwnProp(this, '_weekdaysRegex') || computeWeekdaysParse.call(this), + tt ? this._weekdaysStrictRegex : this._weekdaysRegex) + : (hasOwnProp(this, '_weekdaysRegex') || (this._weekdaysRegex = defaultWeekdaysRegex), + this._weekdaysStrictRegex && tt ? this._weekdaysStrictRegex : this._weekdaysRegex) + } + function weekdaysShortRegex(tt) { + return this._weekdaysParseExact + ? (hasOwnProp(this, '_weekdaysRegex') || computeWeekdaysParse.call(this), + tt ? this._weekdaysShortStrictRegex : this._weekdaysShortRegex) + : (hasOwnProp(this, '_weekdaysShortRegex') || (this._weekdaysShortRegex = defaultWeekdaysShortRegex), + this._weekdaysShortStrictRegex && tt ? this._weekdaysShortStrictRegex : this._weekdaysShortRegex) + } + function weekdaysMinRegex(tt) { + return this._weekdaysParseExact + ? (hasOwnProp(this, '_weekdaysRegex') || computeWeekdaysParse.call(this), + tt ? this._weekdaysMinStrictRegex : this._weekdaysMinRegex) + : (hasOwnProp(this, '_weekdaysMinRegex') || (this._weekdaysMinRegex = defaultWeekdaysMinRegex), + this._weekdaysMinStrictRegex && tt ? this._weekdaysMinStrictRegex : this._weekdaysMinRegex) + } + function computeWeekdaysParse() { + function tt(ut, ht) { + return ht.length - ut.length + } + var et = [], + nt = [], + rt = [], + it = [], + ot, + at, + st, + lt, + ct + for (ot = 0; ot < 7; ot++) + (at = createUTC([2e3, 1]).day(ot)), + (st = regexEscape(this.weekdaysMin(at, ''))), + (lt = regexEscape(this.weekdaysShort(at, ''))), + (ct = regexEscape(this.weekdays(at, ''))), + et.push(st), + nt.push(lt), + rt.push(ct), + it.push(st), + it.push(lt), + it.push(ct) + et.sort(tt), + nt.sort(tt), + rt.sort(tt), + it.sort(tt), + (this._weekdaysRegex = new RegExp('^(' + it.join('|') + ')', 'i')), + (this._weekdaysShortRegex = this._weekdaysRegex), + (this._weekdaysMinRegex = this._weekdaysRegex), + (this._weekdaysStrictRegex = new RegExp('^(' + rt.join('|') + ')', 'i')), + (this._weekdaysShortStrictRegex = new RegExp('^(' + nt.join('|') + ')', 'i')), + (this._weekdaysMinStrictRegex = new RegExp('^(' + et.join('|') + ')', 'i')) + } + function hFormat() { + return this.hours() % 12 || 12 + } + function kFormat() { + return this.hours() || 24 + } + addFormatToken('H', ['HH', 2], 0, 'hour') + addFormatToken('h', ['hh', 2], 0, hFormat) + addFormatToken('k', ['kk', 2], 0, kFormat) + addFormatToken('hmm', 0, 0, function () { + return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2) + }) + addFormatToken('hmmss', 0, 0, function () { + return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2) + zeroFill(this.seconds(), 2) + }) + addFormatToken('Hmm', 0, 0, function () { + return '' + this.hours() + zeroFill(this.minutes(), 2) + }) + addFormatToken('Hmmss', 0, 0, function () { + return '' + this.hours() + zeroFill(this.minutes(), 2) + zeroFill(this.seconds(), 2) + }) + function meridiem(tt, et) { + addFormatToken(tt, 0, 0, function () { + return this.localeData().meridiem(this.hours(), this.minutes(), et) + }) + } + meridiem('a', !0) + meridiem('A', !1) + addUnitAlias('hour', 'h') + addUnitPriority('hour', 13) + function matchMeridiem(tt, et) { + return et._meridiemParse + } + addRegexToken('a', matchMeridiem) + addRegexToken('A', matchMeridiem) + addRegexToken('H', match1to2) + addRegexToken('h', match1to2) + addRegexToken('k', match1to2) + addRegexToken('HH', match1to2, match2) + addRegexToken('hh', match1to2, match2) + addRegexToken('kk', match1to2, match2) + addRegexToken('hmm', match3to4) + addRegexToken('hmmss', match5to6) + addRegexToken('Hmm', match3to4) + addRegexToken('Hmmss', match5to6) + addParseToken(['H', 'HH'], HOUR) + addParseToken(['k', 'kk'], function (tt, et, nt) { + var rt = toInt(tt) + et[HOUR] = rt === 24 ? 0 : rt + }) + addParseToken(['a', 'A'], function (tt, et, nt) { + ;(nt._isPm = nt._locale.isPM(tt)), (nt._meridiem = tt) + }) + addParseToken(['h', 'hh'], function (tt, et, nt) { + ;(et[HOUR] = toInt(tt)), (getParsingFlags(nt).bigHour = !0) + }) + addParseToken('hmm', function (tt, et, nt) { + var rt = tt.length - 2 + ;(et[HOUR] = toInt(tt.substr(0, rt))), (et[MINUTE] = toInt(tt.substr(rt))), (getParsingFlags(nt).bigHour = !0) + }) + addParseToken('hmmss', function (tt, et, nt) { + var rt = tt.length - 4, + it = tt.length - 2 + ;(et[HOUR] = toInt(tt.substr(0, rt))), + (et[MINUTE] = toInt(tt.substr(rt, 2))), + (et[SECOND] = toInt(tt.substr(it))), + (getParsingFlags(nt).bigHour = !0) + }) + addParseToken('Hmm', function (tt, et, nt) { + var rt = tt.length - 2 + ;(et[HOUR] = toInt(tt.substr(0, rt))), (et[MINUTE] = toInt(tt.substr(rt))) + }) + addParseToken('Hmmss', function (tt, et, nt) { + var rt = tt.length - 4, + it = tt.length - 2 + ;(et[HOUR] = toInt(tt.substr(0, rt))), (et[MINUTE] = toInt(tt.substr(rt, 2))), (et[SECOND] = toInt(tt.substr(it))) + }) + function localeIsPM(tt) { + return (tt + '').toLowerCase().charAt(0) === 'p' + } + var defaultLocaleMeridiemParse = /[ap]\.?m?\.?/i, + getSetHour = makeGetSet('Hours', !0) + function localeMeridiem(tt, et, nt) { + return tt > 11 ? (nt ? 'pm' : 'PM') : nt ? 'am' : 'AM' + } + var baseConfig = { + calendar: defaultCalendar, + longDateFormat: defaultLongDateFormat, + invalidDate: defaultInvalidDate, + ordinal: defaultOrdinal, + dayOfMonthOrdinalParse: defaultDayOfMonthOrdinalParse, + relativeTime: defaultRelativeTime, + months: defaultLocaleMonths, + monthsShort: defaultLocaleMonthsShort, + week: defaultLocaleWeek, + weekdays: defaultLocaleWeekdays, + weekdaysMin: defaultLocaleWeekdaysMin, + weekdaysShort: defaultLocaleWeekdaysShort, + meridiemParse: defaultLocaleMeridiemParse, + }, + locales = {}, + localeFamilies = {}, + globalLocale + function commonPrefix(tt, et) { + var nt, + rt = Math.min(tt.length, et.length) + for (nt = 0; nt < rt; nt += 1) if (tt[nt] !== et[nt]) return nt + return rt + } + function normalizeLocale(tt) { + return tt && tt.toLowerCase().replace('_', '-') + } + function chooseLocale(tt) { + for (var et = 0, nt, rt, it, ot; et < tt.length; ) { + for ( + ot = normalizeLocale(tt[et]).split('-'), + nt = ot.length, + rt = normalizeLocale(tt[et + 1]), + rt = rt ? rt.split('-') : null; + nt > 0; + + ) { + if (((it = loadLocale(ot.slice(0, nt).join('-'))), it)) return it + if (rt && rt.length >= nt && commonPrefix(ot, rt) >= nt - 1) break + nt-- + } + et++ + } + return globalLocale + } + function isLocaleNameSane(tt) { + return tt.match('^[^/\\\\]*$') != null + } + function loadLocale(tt) { + var et = null, + nt + if (locales[tt] === void 0 && typeof module < 'u' && module && module.exports && isLocaleNameSane(tt)) + try { + ;(et = globalLocale._abbr), (nt = require), nt('./locale/' + tt), getSetGlobalLocale(et) + } catch { + locales[tt] = null + } + return locales[tt] + } + function getSetGlobalLocale(tt, et) { + var nt + return ( + tt && + (isUndefined(et) ? (nt = getLocale(tt)) : (nt = defineLocale(tt, et)), + nt + ? (globalLocale = nt) + : typeof console < 'u' && + console.warn && + console.warn('Locale ' + tt + ' not found. Did you forget to load it?')), + globalLocale._abbr + ) + } + function defineLocale(tt, et) { + if (et !== null) { + var nt, + rt = baseConfig + if (((et.abbr = tt), locales[tt] != null)) + deprecateSimple( + 'defineLocaleOverride', + 'use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info.', + ), + (rt = locales[tt]._config) + else if (et.parentLocale != null) + if (locales[et.parentLocale] != null) rt = locales[et.parentLocale]._config + else if (((nt = loadLocale(et.parentLocale)), nt != null)) rt = nt._config + else + return ( + localeFamilies[et.parentLocale] || (localeFamilies[et.parentLocale] = []), + localeFamilies[et.parentLocale].push({ name: tt, config: et }), + null + ) + return ( + (locales[tt] = new Locale(mergeConfigs(rt, et))), + localeFamilies[tt] && + localeFamilies[tt].forEach(function (it) { + defineLocale(it.name, it.config) + }), + getSetGlobalLocale(tt), + locales[tt] + ) + } else return delete locales[tt], null + } + function updateLocale(tt, et) { + if (et != null) { + var nt, + rt, + it = baseConfig + locales[tt] != null && locales[tt].parentLocale != null + ? locales[tt].set(mergeConfigs(locales[tt]._config, et)) + : ((rt = loadLocale(tt)), + rt != null && (it = rt._config), + (et = mergeConfigs(it, et)), + rt == null && (et.abbr = tt), + (nt = new Locale(et)), + (nt.parentLocale = locales[tt]), + (locales[tt] = nt)), + getSetGlobalLocale(tt) + } else + locales[tt] != null && + (locales[tt].parentLocale != null + ? ((locales[tt] = locales[tt].parentLocale), tt === getSetGlobalLocale() && getSetGlobalLocale(tt)) + : locales[tt] != null && delete locales[tt]) + return locales[tt] + } + function getLocale(tt) { + var et + if ((tt && tt._locale && tt._locale._abbr && (tt = tt._locale._abbr), !tt)) return globalLocale + if (!isArray$d(tt)) { + if (((et = loadLocale(tt)), et)) return et + tt = [tt] + } + return chooseLocale(tt) + } + function listLocales() { + return keys$4(locales) + } + function checkOverflow(tt) { + var et, + nt = tt._a + return ( + nt && + getParsingFlags(tt).overflow === -2 && + ((et = + nt[MONTH] < 0 || nt[MONTH] > 11 + ? MONTH + : nt[DATE] < 1 || nt[DATE] > daysInMonth(nt[YEAR], nt[MONTH]) + ? DATE + : nt[HOUR] < 0 || + nt[HOUR] > 24 || + (nt[HOUR] === 24 && (nt[MINUTE] !== 0 || nt[SECOND] !== 0 || nt[MILLISECOND] !== 0)) + ? HOUR + : nt[MINUTE] < 0 || nt[MINUTE] > 59 + ? MINUTE + : nt[SECOND] < 0 || nt[SECOND] > 59 + ? SECOND + : nt[MILLISECOND] < 0 || nt[MILLISECOND] > 999 + ? MILLISECOND + : -1), + getParsingFlags(tt)._overflowDayOfYear && (et < YEAR || et > DATE) && (et = DATE), + getParsingFlags(tt)._overflowWeeks && et === -1 && (et = WEEK), + getParsingFlags(tt)._overflowWeekday && et === -1 && (et = WEEKDAY), + (getParsingFlags(tt).overflow = et)), + tt + ) + } + var extendedIsoRegex = + /^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/, + basicIsoRegex = + /^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/, + tzRegex = /Z|[+-]\d\d(?::?\d\d)?/, + isoDates = [ + ['YYYYYY-MM-DD', /[+-]\d{6}-\d\d-\d\d/], + ['YYYY-MM-DD', /\d{4}-\d\d-\d\d/], + ['GGGG-[W]WW-E', /\d{4}-W\d\d-\d/], + ['GGGG-[W]WW', /\d{4}-W\d\d/, !1], + ['YYYY-DDD', /\d{4}-\d{3}/], + ['YYYY-MM', /\d{4}-\d\d/, !1], + ['YYYYYYMMDD', /[+-]\d{10}/], + ['YYYYMMDD', /\d{8}/], + ['GGGG[W]WWE', /\d{4}W\d{3}/], + ['GGGG[W]WW', /\d{4}W\d{2}/, !1], + ['YYYYDDD', /\d{7}/], + ['YYYYMM', /\d{6}/, !1], + ['YYYY', /\d{4}/, !1], + ], + isoTimes = [ + ['HH:mm:ss.SSSS', /\d\d:\d\d:\d\d\.\d+/], + ['HH:mm:ss,SSSS', /\d\d:\d\d:\d\d,\d+/], + ['HH:mm:ss', /\d\d:\d\d:\d\d/], + ['HH:mm', /\d\d:\d\d/], + ['HHmmss.SSSS', /\d\d\d\d\d\d\.\d+/], + ['HHmmss,SSSS', /\d\d\d\d\d\d,\d+/], + ['HHmmss', /\d\d\d\d\d\d/], + ['HHmm', /\d\d\d\d/], + ['HH', /\d\d/], + ], + aspNetJsonRegex = /^\/?Date\((-?\d+)/i, + rfc2822 = + /^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/, + obsOffsets = { + UT: 0, + GMT: 0, + EDT: -4 * 60, + EST: -5 * 60, + CDT: -5 * 60, + CST: -6 * 60, + MDT: -6 * 60, + MST: -7 * 60, + PDT: -7 * 60, + PST: -8 * 60, + } + function configFromISO(tt) { + var et, + nt, + rt = tt._i, + it = extendedIsoRegex.exec(rt) || basicIsoRegex.exec(rt), + ot, + at, + st, + lt, + ct = isoDates.length, + ut = isoTimes.length + if (it) { + for (getParsingFlags(tt).iso = !0, et = 0, nt = ct; et < nt; et++) + if (isoDates[et][1].exec(it[1])) { + ;(at = isoDates[et][0]), (ot = isoDates[et][2] !== !1) + break + } + if (at == null) { + tt._isValid = !1 + return + } + if (it[3]) { + for (et = 0, nt = ut; et < nt; et++) + if (isoTimes[et][1].exec(it[3])) { + st = (it[2] || ' ') + isoTimes[et][0] + break + } + if (st == null) { + tt._isValid = !1 + return + } + } + if (!ot && st != null) { + tt._isValid = !1 + return + } + if (it[4]) + if (tzRegex.exec(it[4])) lt = 'Z' + else { + tt._isValid = !1 + return + } + ;(tt._f = at + (st || '') + (lt || '')), configFromStringAndFormat(tt) + } else tt._isValid = !1 + } + function extractFromRFC2822Strings(tt, et, nt, rt, it, ot) { + var at = [ + untruncateYear(tt), + defaultLocaleMonthsShort.indexOf(et), + parseInt(nt, 10), + parseInt(rt, 10), + parseInt(it, 10), + ] + return ot && at.push(parseInt(ot, 10)), at + } + function untruncateYear(tt) { + var et = parseInt(tt, 10) + return et <= 49 ? 2e3 + et : et <= 999 ? 1900 + et : et + } + function preprocessRFC2822(tt) { + return tt + .replace(/\([^()]*\)|[\n\t]/g, ' ') + .replace(/(\s\s+)/g, ' ') + .replace(/^\s\s*/, '') + .replace(/\s\s*$/, '') + } + function checkWeekday(tt, et, nt) { + if (tt) { + var rt = defaultLocaleWeekdaysShort.indexOf(tt), + it = new Date(et[0], et[1], et[2]).getDay() + if (rt !== it) return (getParsingFlags(nt).weekdayMismatch = !0), (nt._isValid = !1), !1 + } + return !0 + } + function calculateOffset$1(tt, et, nt) { + if (tt) return obsOffsets[tt] + if (et) return 0 + var rt = parseInt(nt, 10), + it = rt % 100, + ot = (rt - it) / 100 + return ot * 60 + it + } + function configFromRFC2822(tt) { + var et = rfc2822.exec(preprocessRFC2822(tt._i)), + nt + if (et) { + if (((nt = extractFromRFC2822Strings(et[4], et[3], et[2], et[5], et[6], et[7])), !checkWeekday(et[1], nt, tt))) + return + ;(tt._a = nt), + (tt._tzm = calculateOffset$1(et[8], et[9], et[10])), + (tt._d = createUTCDate.apply(null, tt._a)), + tt._d.setUTCMinutes(tt._d.getUTCMinutes() - tt._tzm), + (getParsingFlags(tt).rfc2822 = !0) + } else tt._isValid = !1 + } + function configFromString(tt) { + var et = aspNetJsonRegex.exec(tt._i) + if (et !== null) { + tt._d = new Date(+et[1]) + return + } + if ((configFromISO(tt), tt._isValid === !1)) delete tt._isValid + else return + if ((configFromRFC2822(tt), tt._isValid === !1)) delete tt._isValid + else return + tt._strict ? (tt._isValid = !1) : hooks.createFromInputFallback(tt) + } + hooks.createFromInputFallback = deprecate( + 'value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.', + function (tt) { + tt._d = new Date(tt._i + (tt._useUTC ? ' UTC' : '')) + }, + ) + function defaults$1(tt, et, nt) { + return tt ?? et ?? nt + } + function currentDateArray(tt) { + var et = new Date(hooks.now()) + return tt._useUTC + ? [et.getUTCFullYear(), et.getUTCMonth(), et.getUTCDate()] + : [et.getFullYear(), et.getMonth(), et.getDate()] + } + function configFromArray(tt) { + var et, + nt, + rt = [], + it, + ot, + at + if (!tt._d) { + for ( + it = currentDateArray(tt), + tt._w && tt._a[DATE] == null && tt._a[MONTH] == null && dayOfYearFromWeekInfo(tt), + tt._dayOfYear != null && + ((at = defaults$1(tt._a[YEAR], it[YEAR])), + (tt._dayOfYear > daysInYear(at) || tt._dayOfYear === 0) && (getParsingFlags(tt)._overflowDayOfYear = !0), + (nt = createUTCDate(at, 0, tt._dayOfYear)), + (tt._a[MONTH] = nt.getUTCMonth()), + (tt._a[DATE] = nt.getUTCDate())), + et = 0; + et < 3 && tt._a[et] == null; + ++et + ) + tt._a[et] = rt[et] = it[et] + for (; et < 7; et++) tt._a[et] = rt[et] = tt._a[et] == null ? (et === 2 ? 1 : 0) : tt._a[et] + tt._a[HOUR] === 24 && + tt._a[MINUTE] === 0 && + tt._a[SECOND] === 0 && + tt._a[MILLISECOND] === 0 && + ((tt._nextDay = !0), (tt._a[HOUR] = 0)), + (tt._d = (tt._useUTC ? createUTCDate : createDate).apply(null, rt)), + (ot = tt._useUTC ? tt._d.getUTCDay() : tt._d.getDay()), + tt._tzm != null && tt._d.setUTCMinutes(tt._d.getUTCMinutes() - tt._tzm), + tt._nextDay && (tt._a[HOUR] = 24), + tt._w && typeof tt._w.d < 'u' && tt._w.d !== ot && (getParsingFlags(tt).weekdayMismatch = !0) + } + } + function dayOfYearFromWeekInfo(tt) { + var et, nt, rt, it, ot, at, st, lt, ct + ;(et = tt._w), + et.GG != null || et.W != null || et.E != null + ? ((ot = 1), + (at = 4), + (nt = defaults$1(et.GG, tt._a[YEAR], weekOfYear(createLocal(), 1, 4).year)), + (rt = defaults$1(et.W, 1)), + (it = defaults$1(et.E, 1)), + (it < 1 || it > 7) && (lt = !0)) + : ((ot = tt._locale._week.dow), + (at = tt._locale._week.doy), + (ct = weekOfYear(createLocal(), ot, at)), + (nt = defaults$1(et.gg, tt._a[YEAR], ct.year)), + (rt = defaults$1(et.w, ct.week)), + et.d != null + ? ((it = et.d), (it < 0 || it > 6) && (lt = !0)) + : et.e != null + ? ((it = et.e + ot), (et.e < 0 || et.e > 6) && (lt = !0)) + : (it = ot)), + rt < 1 || rt > weeksInYear(nt, ot, at) + ? (getParsingFlags(tt)._overflowWeeks = !0) + : lt != null + ? (getParsingFlags(tt)._overflowWeekday = !0) + : ((st = dayOfYearFromWeeks(nt, rt, it, ot, at)), (tt._a[YEAR] = st.year), (tt._dayOfYear = st.dayOfYear)) + } + hooks.ISO_8601 = function () {} + hooks.RFC_2822 = function () {} + function configFromStringAndFormat(tt) { + if (tt._f === hooks.ISO_8601) { + configFromISO(tt) + return + } + if (tt._f === hooks.RFC_2822) { + configFromRFC2822(tt) + return + } + ;(tt._a = []), (getParsingFlags(tt).empty = !0) + var et = '' + tt._i, + nt, + rt, + it, + ot, + at, + st = et.length, + lt = 0, + ct, + ut + for (it = expandFormat(tt._f, tt._locale).match(formattingTokens) || [], ut = it.length, nt = 0; nt < ut; nt++) + (ot = it[nt]), + (rt = (et.match(getParseRegexForToken(ot, tt)) || [])[0]), + rt && + ((at = et.substr(0, et.indexOf(rt))), + at.length > 0 && getParsingFlags(tt).unusedInput.push(at), + (et = et.slice(et.indexOf(rt) + rt.length)), + (lt += rt.length)), + formatTokenFunctions[ot] + ? (rt ? (getParsingFlags(tt).empty = !1) : getParsingFlags(tt).unusedTokens.push(ot), + addTimeToArrayFromToken(ot, rt, tt)) + : tt._strict && !rt && getParsingFlags(tt).unusedTokens.push(ot) + ;(getParsingFlags(tt).charsLeftOver = st - lt), + et.length > 0 && getParsingFlags(tt).unusedInput.push(et), + tt._a[HOUR] <= 12 && + getParsingFlags(tt).bigHour === !0 && + tt._a[HOUR] > 0 && + (getParsingFlags(tt).bigHour = void 0), + (getParsingFlags(tt).parsedDateParts = tt._a.slice(0)), + (getParsingFlags(tt).meridiem = tt._meridiem), + (tt._a[HOUR] = meridiemFixWrap(tt._locale, tt._a[HOUR], tt._meridiem)), + (ct = getParsingFlags(tt).era), + ct !== null && (tt._a[YEAR] = tt._locale.erasConvertYear(ct, tt._a[YEAR])), + configFromArray(tt), + checkOverflow(tt) + } + function meridiemFixWrap(tt, et, nt) { + var rt + return nt == null + ? et + : tt.meridiemHour != null + ? tt.meridiemHour(et, nt) + : (tt.isPM != null && ((rt = tt.isPM(nt)), rt && et < 12 && (et += 12), !rt && et === 12 && (et = 0)), et) + } + function configFromStringAndArray(tt) { + var et, + nt, + rt, + it, + ot, + at, + st = !1, + lt = tt._f.length + if (lt === 0) { + ;(getParsingFlags(tt).invalidFormat = !0), (tt._d = new Date(NaN)) + return + } + for (it = 0; it < lt; it++) + (ot = 0), + (at = !1), + (et = copyConfig({}, tt)), + tt._useUTC != null && (et._useUTC = tt._useUTC), + (et._f = tt._f[it]), + configFromStringAndFormat(et), + isValid(et) && (at = !0), + (ot += getParsingFlags(et).charsLeftOver), + (ot += getParsingFlags(et).unusedTokens.length * 10), + (getParsingFlags(et).score = ot), + st + ? ot < rt && ((rt = ot), (nt = et)) + : (rt == null || ot < rt || at) && ((rt = ot), (nt = et), at && (st = !0)) + extend$1(tt, nt || et) + } + function configFromObject(tt) { + if (!tt._d) { + var et = normalizeObjectUnits(tt._i), + nt = et.day === void 0 ? et.date : et.day + ;(tt._a = map$5([et.year, et.month, nt, et.hour, et.minute, et.second, et.millisecond], function (rt) { + return rt && parseInt(rt, 10) + })), + configFromArray(tt) + } + } + function createFromConfig(tt) { + var et = new Moment(checkOverflow(prepareConfig(tt))) + return et._nextDay && (et.add(1, 'd'), (et._nextDay = void 0)), et + } + function prepareConfig(tt) { + var et = tt._i, + nt = tt._f + return ( + (tt._locale = tt._locale || getLocale(tt._l)), + et === null || (nt === void 0 && et === '') + ? createInvalid({ nullInput: !0 }) + : (typeof et == 'string' && (tt._i = et = tt._locale.preparse(et)), + isMoment(et) + ? new Moment(checkOverflow(et)) + : (isDate(et) + ? (tt._d = et) + : isArray$d(nt) + ? configFromStringAndArray(tt) + : nt + ? configFromStringAndFormat(tt) + : configFromInput(tt), + isValid(tt) || (tt._d = null), + tt)) + ) + } + function configFromInput(tt) { + var et = tt._i + isUndefined(et) + ? (tt._d = new Date(hooks.now())) + : isDate(et) + ? (tt._d = new Date(et.valueOf())) + : typeof et == 'string' + ? configFromString(tt) + : isArray$d(et) + ? ((tt._a = map$5(et.slice(0), function (nt) { + return parseInt(nt, 10) + })), + configFromArray(tt)) + : isObject$6(et) + ? configFromObject(tt) + : isNumber$3(et) + ? (tt._d = new Date(et)) + : hooks.createFromInputFallback(tt) + } + function createLocalOrUTC(tt, et, nt, rt, it) { + var ot = {} + return ( + (et === !0 || et === !1) && ((rt = et), (et = void 0)), + (nt === !0 || nt === !1) && ((rt = nt), (nt = void 0)), + ((isObject$6(tt) && isObjectEmpty(tt)) || (isArray$d(tt) && tt.length === 0)) && (tt = void 0), + (ot._isAMomentObject = !0), + (ot._useUTC = ot._isUTC = it), + (ot._l = nt), + (ot._i = tt), + (ot._f = et), + (ot._strict = rt), + createFromConfig(ot) + ) + } + function createLocal(tt, et, nt, rt) { + return createLocalOrUTC(tt, et, nt, rt, !1) + } + var prototypeMin = deprecate( + 'moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/', + function () { + var tt = createLocal.apply(null, arguments) + return this.isValid() && tt.isValid() ? (tt < this ? this : tt) : createInvalid() + }, + ), + prototypeMax = deprecate( + 'moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/', + function () { + var tt = createLocal.apply(null, arguments) + return this.isValid() && tt.isValid() ? (tt > this ? this : tt) : createInvalid() + }, + ) + function pickBy(tt, et) { + var nt, rt + if ((et.length === 1 && isArray$d(et[0]) && (et = et[0]), !et.length)) return createLocal() + for (nt = et[0], rt = 1; rt < et.length; ++rt) (!et[rt].isValid() || et[rt][tt](nt)) && (nt = et[rt]) + return nt + } + function min$2() { + var tt = [].slice.call(arguments, 0) + return pickBy('isBefore', tt) + } + function max$2() { + var tt = [].slice.call(arguments, 0) + return pickBy('isAfter', tt) + } + var now$2 = function () { + return Date.now ? Date.now() : +new Date() + }, + ordering = ['year', 'quarter', 'month', 'week', 'day', 'hour', 'minute', 'second', 'millisecond'] + function isDurationValid(tt) { + var et, + nt = !1, + rt, + it = ordering.length + for (et in tt) + if (hasOwnProp(tt, et) && !(indexOf.call(ordering, et) !== -1 && (tt[et] == null || !isNaN(tt[et])))) return !1 + for (rt = 0; rt < it; ++rt) + if (tt[ordering[rt]]) { + if (nt) return !1 + parseFloat(tt[ordering[rt]]) !== toInt(tt[ordering[rt]]) && (nt = !0) + } + return !0 + } + function isValid$1() { + return this._isValid + } + function createInvalid$1() { + return createDuration(NaN) + } + function Duration(tt) { + var et = normalizeObjectUnits(tt), + nt = et.year || 0, + rt = et.quarter || 0, + it = et.month || 0, + ot = et.week || et.isoWeek || 0, + at = et.day || 0, + st = et.hour || 0, + lt = et.minute || 0, + ct = et.second || 0, + ut = et.millisecond || 0 + ;(this._isValid = isDurationValid(et)), + (this._milliseconds = +ut + ct * 1e3 + lt * 6e4 + st * 1e3 * 60 * 60), + (this._days = +at + ot * 7), + (this._months = +it + rt * 3 + nt * 12), + (this._data = {}), + (this._locale = getLocale()), + this._bubble() + } + function isDuration(tt) { + return tt instanceof Duration + } + function absRound(tt) { + return tt < 0 ? Math.round(-1 * tt) * -1 : Math.round(tt) + } + function compareArrays(tt, et, nt) { + var rt = Math.min(tt.length, et.length), + it = Math.abs(tt.length - et.length), + ot = 0, + at + for (at = 0; at < rt; at++) ((nt && tt[at] !== et[at]) || (!nt && toInt(tt[at]) !== toInt(et[at]))) && ot++ + return ot + it + } + function offset(tt, et) { + addFormatToken(tt, 0, 0, function () { + var nt = this.utcOffset(), + rt = '+' + return nt < 0 && ((nt = -nt), (rt = '-')), rt + zeroFill(~~(nt / 60), 2) + et + zeroFill(~~nt % 60, 2) + }) + } + offset('Z', ':') + offset('ZZ', '') + addRegexToken('Z', matchShortOffset) + addRegexToken('ZZ', matchShortOffset) + addParseToken(['Z', 'ZZ'], function (tt, et, nt) { + ;(nt._useUTC = !0), (nt._tzm = offsetFromString(matchShortOffset, tt)) + }) + var chunkOffset = /([\+\-]|\d\d)/gi + function offsetFromString(tt, et) { + var nt = (et || '').match(tt), + rt, + it, + ot + return nt === null + ? null + : ((rt = nt[nt.length - 1] || []), + (it = (rt + '').match(chunkOffset) || ['-', 0, 0]), + (ot = +(it[1] * 60) + toInt(it[2])), + ot === 0 ? 0 : it[0] === '+' ? ot : -ot) + } + function cloneWithOffset(tt, et) { + var nt, rt + return et._isUTC + ? ((nt = et.clone()), + (rt = (isMoment(tt) || isDate(tt) ? tt.valueOf() : createLocal(tt).valueOf()) - nt.valueOf()), + nt._d.setTime(nt._d.valueOf() + rt), + hooks.updateOffset(nt, !1), + nt) + : createLocal(tt).local() + } + function getDateOffset(tt) { + return -Math.round(tt._d.getTimezoneOffset()) + } + hooks.updateOffset = function () {} + function getSetOffset(tt, et, nt) { + var rt = this._offset || 0, + it + if (!this.isValid()) return tt != null ? this : NaN + if (tt != null) { + if (typeof tt == 'string') { + if (((tt = offsetFromString(matchShortOffset, tt)), tt === null)) return this + } else Math.abs(tt) < 16 && !nt && (tt = tt * 60) + return ( + !this._isUTC && et && (it = getDateOffset(this)), + (this._offset = tt), + (this._isUTC = !0), + it != null && this.add(it, 'm'), + rt !== tt && + (!et || this._changeInProgress + ? addSubtract(this, createDuration(tt - rt, 'm'), 1, !1) + : this._changeInProgress || + ((this._changeInProgress = !0), hooks.updateOffset(this, !0), (this._changeInProgress = null))), + this + ) + } else return this._isUTC ? rt : getDateOffset(this) + } + function getSetZone(tt, et) { + return tt != null ? (typeof tt != 'string' && (tt = -tt), this.utcOffset(tt, et), this) : -this.utcOffset() + } + function setOffsetToUTC(tt) { + return this.utcOffset(0, tt) + } + function setOffsetToLocal(tt) { + return ( + this._isUTC && (this.utcOffset(0, tt), (this._isUTC = !1), tt && this.subtract(getDateOffset(this), 'm')), this + ) + } + function setOffsetToParsedOffset() { + if (this._tzm != null) this.utcOffset(this._tzm, !1, !0) + else if (typeof this._i == 'string') { + var tt = offsetFromString(matchOffset, this._i) + tt != null ? this.utcOffset(tt) : this.utcOffset(0, !0) + } + return this + } + function hasAlignedHourOffset(tt) { + return this.isValid() ? ((tt = tt ? createLocal(tt).utcOffset() : 0), (this.utcOffset() - tt) % 60 === 0) : !1 + } + function isDaylightSavingTime() { + return this.utcOffset() > this.clone().month(0).utcOffset() || this.utcOffset() > this.clone().month(5).utcOffset() + } + function isDaylightSavingTimeShifted() { + if (!isUndefined(this._isDSTShifted)) return this._isDSTShifted + var tt = {}, + et + return ( + copyConfig(tt, this), + (tt = prepareConfig(tt)), + tt._a + ? ((et = tt._isUTC ? createUTC(tt._a) : createLocal(tt._a)), + (this._isDSTShifted = this.isValid() && compareArrays(tt._a, et.toArray()) > 0)) + : (this._isDSTShifted = !1), + this._isDSTShifted + ) + } + function isLocal() { + return this.isValid() ? !this._isUTC : !1 + } + function isUtcOffset() { + return this.isValid() ? this._isUTC : !1 + } + function isUtc() { + return this.isValid() ? this._isUTC && this._offset === 0 : !1 + } + var aspNetRegex = /^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/, + isoRegex = + /^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/ + function createDuration(tt, et) { + var nt = tt, + rt = null, + it, + ot, + at + return ( + isDuration(tt) + ? (nt = { ms: tt._milliseconds, d: tt._days, M: tt._months }) + : isNumber$3(tt) || !isNaN(+tt) + ? ((nt = {}), et ? (nt[et] = +tt) : (nt.milliseconds = +tt)) + : (rt = aspNetRegex.exec(tt)) + ? ((it = rt[1] === '-' ? -1 : 1), + (nt = { + y: 0, + d: toInt(rt[DATE]) * it, + h: toInt(rt[HOUR]) * it, + m: toInt(rt[MINUTE]) * it, + s: toInt(rt[SECOND]) * it, + ms: toInt(absRound(rt[MILLISECOND] * 1e3)) * it, + })) + : (rt = isoRegex.exec(tt)) + ? ((it = rt[1] === '-' ? -1 : 1), + (nt = { + y: parseIso(rt[2], it), + M: parseIso(rt[3], it), + w: parseIso(rt[4], it), + d: parseIso(rt[5], it), + h: parseIso(rt[6], it), + m: parseIso(rt[7], it), + s: parseIso(rt[8], it), + })) + : nt == null + ? (nt = {}) + : typeof nt == 'object' && + ('from' in nt || 'to' in nt) && + ((at = momentsDifference(createLocal(nt.from), createLocal(nt.to))), + (nt = {}), + (nt.ms = at.milliseconds), + (nt.M = at.months)), + (ot = new Duration(nt)), + isDuration(tt) && hasOwnProp(tt, '_locale') && (ot._locale = tt._locale), + isDuration(tt) && hasOwnProp(tt, '_isValid') && (ot._isValid = tt._isValid), + ot + ) + } + createDuration.fn = Duration.prototype + createDuration.invalid = createInvalid$1 + function parseIso(tt, et) { + var nt = tt && parseFloat(tt.replace(',', '.')) + return (isNaN(nt) ? 0 : nt) * et + } + function positiveMomentsDifference(tt, et) { + var nt = {} + return ( + (nt.months = et.month() - tt.month() + (et.year() - tt.year()) * 12), + tt.clone().add(nt.months, 'M').isAfter(et) && --nt.months, + (nt.milliseconds = +et - +tt.clone().add(nt.months, 'M')), + nt + ) + } + function momentsDifference(tt, et) { + var nt + return tt.isValid() && et.isValid() + ? ((et = cloneWithOffset(et, tt)), + tt.isBefore(et) + ? (nt = positiveMomentsDifference(tt, et)) + : ((nt = positiveMomentsDifference(et, tt)), (nt.milliseconds = -nt.milliseconds), (nt.months = -nt.months)), + nt) + : { milliseconds: 0, months: 0 } + } + function createAdder(tt, et) { + return function (nt, rt) { + var it, ot + return ( + rt !== null && + !isNaN(+rt) && + (deprecateSimple( + et, + 'moment().' + + et + + '(period, number) is deprecated. Please use moment().' + + et + + '(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.', + ), + (ot = nt), + (nt = rt), + (rt = ot)), + (it = createDuration(nt, rt)), + addSubtract(this, it, tt), + this + ) + } + } + function addSubtract(tt, et, nt, rt) { + var it = et._milliseconds, + ot = absRound(et._days), + at = absRound(et._months) + tt.isValid() && + ((rt = rt ?? !0), + at && setMonth(tt, get$3(tt, 'Month') + at * nt), + ot && set$1$1(tt, 'Date', get$3(tt, 'Date') + ot * nt), + it && tt._d.setTime(tt._d.valueOf() + it * nt), + rt && hooks.updateOffset(tt, ot || at)) + } + var add$1 = createAdder(1, 'add'), + subtract$1 = createAdder(-1, 'subtract') + function isString$1(tt) { + return typeof tt == 'string' || tt instanceof String + } + function isMomentInput(tt) { + return ( + isMoment(tt) || + isDate(tt) || + isString$1(tt) || + isNumber$3(tt) || + isNumberOrStringArray(tt) || + isMomentInputObject(tt) || + tt === null || + tt === void 0 + ) + } + function isMomentInputObject(tt) { + var et = isObject$6(tt) && !isObjectEmpty(tt), + nt = !1, + rt = [ + 'years', + 'year', + 'y', + 'months', + 'month', + 'M', + 'days', + 'day', + 'd', + 'dates', + 'date', + 'D', + 'hours', + 'hour', + 'h', + 'minutes', + 'minute', + 'm', + 'seconds', + 'second', + 's', + 'milliseconds', + 'millisecond', + 'ms', + ], + it, + ot, + at = rt.length + for (it = 0; it < at; it += 1) (ot = rt[it]), (nt = nt || hasOwnProp(tt, ot)) + return et && nt + } + function isNumberOrStringArray(tt) { + var et = isArray$d(tt), + nt = !1 + return ( + et && + (nt = + tt.filter(function (rt) { + return !isNumber$3(rt) && isString$1(tt) + }).length === 0), + et && nt + ) + } + function isCalendarSpec(tt) { + var et = isObject$6(tt) && !isObjectEmpty(tt), + nt = !1, + rt = ['sameDay', 'nextDay', 'lastDay', 'nextWeek', 'lastWeek', 'sameElse'], + it, + ot + for (it = 0; it < rt.length; it += 1) (ot = rt[it]), (nt = nt || hasOwnProp(tt, ot)) + return et && nt + } + function getCalendarFormat(tt, et) { + var nt = tt.diff(et, 'days', !0) + return nt < -6 + ? 'sameElse' + : nt < -1 + ? 'lastWeek' + : nt < 0 + ? 'lastDay' + : nt < 1 + ? 'sameDay' + : nt < 2 + ? 'nextDay' + : nt < 7 + ? 'nextWeek' + : 'sameElse' + } + function calendar$1$1(tt, et) { + arguments.length === 1 && + (arguments[0] + ? isMomentInput(arguments[0]) + ? ((tt = arguments[0]), (et = void 0)) + : isCalendarSpec(arguments[0]) && ((et = arguments[0]), (tt = void 0)) + : ((tt = void 0), (et = void 0))) + var nt = tt || createLocal(), + rt = cloneWithOffset(nt, this).startOf('day'), + it = hooks.calendarFormat(this, rt) || 'sameElse', + ot = et && (isFunction$1(et[it]) ? et[it].call(this, nt) : et[it]) + return this.format(ot || this.localeData().calendar(it, this, createLocal(nt))) + } + function clone$1() { + return new Moment(this) + } + function isAfter(tt, et) { + var nt = isMoment(tt) ? tt : createLocal(tt) + return this.isValid() && nt.isValid() + ? ((et = normalizeUnits(et) || 'millisecond'), + et === 'millisecond' ? this.valueOf() > nt.valueOf() : nt.valueOf() < this.clone().startOf(et).valueOf()) + : !1 + } + function isBefore(tt, et) { + var nt = isMoment(tt) ? tt : createLocal(tt) + return this.isValid() && nt.isValid() + ? ((et = normalizeUnits(et) || 'millisecond'), + et === 'millisecond' ? this.valueOf() < nt.valueOf() : this.clone().endOf(et).valueOf() < nt.valueOf()) + : !1 + } + function isBetween(tt, et, nt, rt) { + var it = isMoment(tt) ? tt : createLocal(tt), + ot = isMoment(et) ? et : createLocal(et) + return this.isValid() && it.isValid() && ot.isValid() + ? ((rt = rt || '()'), + (rt[0] === '(' ? this.isAfter(it, nt) : !this.isBefore(it, nt)) && + (rt[1] === ')' ? this.isBefore(ot, nt) : !this.isAfter(ot, nt))) + : !1 + } + function isSame(tt, et) { + var nt = isMoment(tt) ? tt : createLocal(tt), + rt + return this.isValid() && nt.isValid() + ? ((et = normalizeUnits(et) || 'millisecond'), + et === 'millisecond' + ? this.valueOf() === nt.valueOf() + : ((rt = nt.valueOf()), this.clone().startOf(et).valueOf() <= rt && rt <= this.clone().endOf(et).valueOf())) + : !1 + } + function isSameOrAfter(tt, et) { + return this.isSame(tt, et) || this.isAfter(tt, et) + } + function isSameOrBefore(tt, et) { + return this.isSame(tt, et) || this.isBefore(tt, et) + } + function diff(tt, et, nt) { + var rt, it, ot + if (!this.isValid()) return NaN + if (((rt = cloneWithOffset(tt, this)), !rt.isValid())) return NaN + switch (((it = (rt.utcOffset() - this.utcOffset()) * 6e4), (et = normalizeUnits(et)), et)) { + case 'year': + ot = monthDiff(this, rt) / 12 + break + case 'month': + ot = monthDiff(this, rt) + break + case 'quarter': + ot = monthDiff(this, rt) / 3 + break + case 'second': + ot = (this - rt) / 1e3 + break + case 'minute': + ot = (this - rt) / 6e4 + break + case 'hour': + ot = (this - rt) / 36e5 + break + case 'day': + ot = (this - rt - it) / 864e5 + break + case 'week': + ot = (this - rt - it) / 6048e5 + break + default: + ot = this - rt + } + return nt ? ot : absFloor(ot) + } + function monthDiff(tt, et) { + if (tt.date() < et.date()) return -monthDiff(et, tt) + var nt = (et.year() - tt.year()) * 12 + (et.month() - tt.month()), + rt = tt.clone().add(nt, 'months'), + it, + ot + return ( + et - rt < 0 + ? ((it = tt.clone().add(nt - 1, 'months')), (ot = (et - rt) / (rt - it))) + : ((it = tt.clone().add(nt + 1, 'months')), (ot = (et - rt) / (it - rt))), + -(nt + ot) || 0 + ) + } + hooks.defaultFormat = 'YYYY-MM-DDTHH:mm:ssZ' + hooks.defaultFormatUtc = 'YYYY-MM-DDTHH:mm:ss[Z]' + function toString$5() { + return this.clone().locale('en').format('ddd MMM DD YYYY HH:mm:ss [GMT]ZZ') + } + function toISOString(tt) { + if (!this.isValid()) return null + var et = tt !== !0, + nt = et ? this.clone().utc() : this + return nt.year() < 0 || nt.year() > 9999 + ? formatMoment(nt, et ? 'YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]' : 'YYYYYY-MM-DD[T]HH:mm:ss.SSSZ') + : isFunction$1(Date.prototype.toISOString) + ? et + ? this.toDate().toISOString() + : new Date(this.valueOf() + this.utcOffset() * 60 * 1e3).toISOString().replace('Z', formatMoment(nt, 'Z')) + : formatMoment(nt, et ? 'YYYY-MM-DD[T]HH:mm:ss.SSS[Z]' : 'YYYY-MM-DD[T]HH:mm:ss.SSSZ') + } + function inspect() { + if (!this.isValid()) return 'moment.invalid(/* ' + this._i + ' */)' + var tt = 'moment', + et = '', + nt, + rt, + it, + ot + return ( + this.isLocal() || ((tt = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone'), (et = 'Z')), + (nt = '[' + tt + '("]'), + (rt = 0 <= this.year() && this.year() <= 9999 ? 'YYYY' : 'YYYYYY'), + (it = '-MM-DD[T]HH:mm:ss.SSS'), + (ot = et + '[")]'), + this.format(nt + rt + it + ot) + ) + } + function format$1(tt) { + tt || (tt = this.isUtc() ? hooks.defaultFormatUtc : hooks.defaultFormat) + var et = formatMoment(this, tt) + return this.localeData().postformat(et) + } + function from(tt, et) { + return this.isValid() && ((isMoment(tt) && tt.isValid()) || createLocal(tt).isValid()) + ? createDuration({ to: this, from: tt }).locale(this.locale()).humanize(!et) + : this.localeData().invalidDate() + } + function fromNow(tt) { + return this.from(createLocal(), tt) + } + function to(tt, et) { + return this.isValid() && ((isMoment(tt) && tt.isValid()) || createLocal(tt).isValid()) + ? createDuration({ from: this, to: tt }).locale(this.locale()).humanize(!et) + : this.localeData().invalidDate() + } + function toNow(tt) { + return this.to(createLocal(), tt) + } + function locale$2(tt) { + var et + return tt === void 0 ? this._locale._abbr : ((et = getLocale(tt)), et != null && (this._locale = et), this) + } + var lang = deprecate( + 'moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.', + function (tt) { + return tt === void 0 ? this.localeData() : this.locale(tt) + }, + ) + function localeData() { + return this._locale + } + var MS_PER_SECOND = 1e3, + MS_PER_MINUTE = 60 * MS_PER_SECOND, + MS_PER_HOUR = 60 * MS_PER_MINUTE, + MS_PER_400_YEARS = (365 * 400 + 97) * 24 * MS_PER_HOUR + function mod$1(tt, et) { + return ((tt % et) + et) % et + } + function localStartOfDate(tt, et, nt) { + return tt < 100 && tt >= 0 ? new Date(tt + 400, et, nt) - MS_PER_400_YEARS : new Date(tt, et, nt).valueOf() + } + function utcStartOfDate(tt, et, nt) { + return tt < 100 && tt >= 0 ? Date.UTC(tt + 400, et, nt) - MS_PER_400_YEARS : Date.UTC(tt, et, nt) + } + function startOf(tt) { + var et, nt + if (((tt = normalizeUnits(tt)), tt === void 0 || tt === 'millisecond' || !this.isValid())) return this + switch (((nt = this._isUTC ? utcStartOfDate : localStartOfDate), tt)) { + case 'year': + et = nt(this.year(), 0, 1) + break + case 'quarter': + et = nt(this.year(), this.month() - (this.month() % 3), 1) + break + case 'month': + et = nt(this.year(), this.month(), 1) + break + case 'week': + et = nt(this.year(), this.month(), this.date() - this.weekday()) + break + case 'isoWeek': + et = nt(this.year(), this.month(), this.date() - (this.isoWeekday() - 1)) + break + case 'day': + case 'date': + et = nt(this.year(), this.month(), this.date()) + break + case 'hour': + ;(et = this._d.valueOf()), (et -= mod$1(et + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE), MS_PER_HOUR)) + break + case 'minute': + ;(et = this._d.valueOf()), (et -= mod$1(et, MS_PER_MINUTE)) + break + case 'second': + ;(et = this._d.valueOf()), (et -= mod$1(et, MS_PER_SECOND)) + break + } + return this._d.setTime(et), hooks.updateOffset(this, !0), this + } + function endOf(tt) { + var et, nt + if (((tt = normalizeUnits(tt)), tt === void 0 || tt === 'millisecond' || !this.isValid())) return this + switch (((nt = this._isUTC ? utcStartOfDate : localStartOfDate), tt)) { + case 'year': + et = nt(this.year() + 1, 0, 1) - 1 + break + case 'quarter': + et = nt(this.year(), this.month() - (this.month() % 3) + 3, 1) - 1 + break + case 'month': + et = nt(this.year(), this.month() + 1, 1) - 1 + break + case 'week': + et = nt(this.year(), this.month(), this.date() - this.weekday() + 7) - 1 + break + case 'isoWeek': + et = nt(this.year(), this.month(), this.date() - (this.isoWeekday() - 1) + 7) - 1 + break + case 'day': + case 'date': + et = nt(this.year(), this.month(), this.date() + 1) - 1 + break + case 'hour': + ;(et = this._d.valueOf()), + (et += MS_PER_HOUR - mod$1(et + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE), MS_PER_HOUR) - 1) + break + case 'minute': + ;(et = this._d.valueOf()), (et += MS_PER_MINUTE - mod$1(et, MS_PER_MINUTE) - 1) + break + case 'second': + ;(et = this._d.valueOf()), (et += MS_PER_SECOND - mod$1(et, MS_PER_SECOND) - 1) + break + } + return this._d.setTime(et), hooks.updateOffset(this, !0), this + } + function valueOf() { + return this._d.valueOf() - (this._offset || 0) * 6e4 + } + function unix() { + return Math.floor(this.valueOf() / 1e3) + } + function toDate() { + return new Date(this.valueOf()) + } + function toArray$2() { + var tt = this + return [tt.year(), tt.month(), tt.date(), tt.hour(), tt.minute(), tt.second(), tt.millisecond()] + } + function toObject() { + var tt = this + return { + years: tt.year(), + months: tt.month(), + date: tt.date(), + hours: tt.hours(), + minutes: tt.minutes(), + seconds: tt.seconds(), + milliseconds: tt.milliseconds(), + } + } + function toJSON() { + return this.isValid() ? this.toISOString() : null + } + function isValid$2() { + return isValid(this) + } + function parsingFlags() { + return extend$1({}, getParsingFlags(this)) + } + function invalidAt() { + return getParsingFlags(this).overflow + } + function creationData() { + return { input: this._i, format: this._f, locale: this._locale, isUTC: this._isUTC, strict: this._strict } + } + addFormatToken('N', 0, 0, 'eraAbbr') + addFormatToken('NN', 0, 0, 'eraAbbr') + addFormatToken('NNN', 0, 0, 'eraAbbr') + addFormatToken('NNNN', 0, 0, 'eraName') + addFormatToken('NNNNN', 0, 0, 'eraNarrow') + addFormatToken('y', ['y', 1], 'yo', 'eraYear') + addFormatToken('y', ['yy', 2], 0, 'eraYear') + addFormatToken('y', ['yyy', 3], 0, 'eraYear') + addFormatToken('y', ['yyyy', 4], 0, 'eraYear') + addRegexToken('N', matchEraAbbr) + addRegexToken('NN', matchEraAbbr) + addRegexToken('NNN', matchEraAbbr) + addRegexToken('NNNN', matchEraName) + addRegexToken('NNNNN', matchEraNarrow) + addParseToken(['N', 'NN', 'NNN', 'NNNN', 'NNNNN'], function (tt, et, nt, rt) { + var it = nt._locale.erasParse(tt, rt, nt._strict) + it ? (getParsingFlags(nt).era = it) : (getParsingFlags(nt).invalidEra = tt) + }) + addRegexToken('y', matchUnsigned) + addRegexToken('yy', matchUnsigned) + addRegexToken('yyy', matchUnsigned) + addRegexToken('yyyy', matchUnsigned) + addRegexToken('yo', matchEraYearOrdinal) + addParseToken(['y', 'yy', 'yyy', 'yyyy'], YEAR) + addParseToken(['yo'], function (tt, et, nt, rt) { + var it + nt._locale._eraYearOrdinalRegex && (it = tt.match(nt._locale._eraYearOrdinalRegex)), + nt._locale.eraYearOrdinalParse + ? (et[YEAR] = nt._locale.eraYearOrdinalParse(tt, it)) + : (et[YEAR] = parseInt(tt, 10)) + }) + function localeEras(tt, et) { + var nt, + rt, + it, + ot = this._eras || getLocale('en')._eras + for (nt = 0, rt = ot.length; nt < rt; ++nt) { + switch (typeof ot[nt].since) { + case 'string': + ;(it = hooks(ot[nt].since).startOf('day')), (ot[nt].since = it.valueOf()) + break + } + switch (typeof ot[nt].until) { + case 'undefined': + ot[nt].until = 1 / 0 + break + case 'string': + ;(it = hooks(ot[nt].until).startOf('day').valueOf()), (ot[nt].until = it.valueOf()) + break + } + } + return ot + } + function localeErasParse(tt, et, nt) { + var rt, + it, + ot = this.eras(), + at, + st, + lt + for (tt = tt.toUpperCase(), rt = 0, it = ot.length; rt < it; ++rt) + if (((at = ot[rt].name.toUpperCase()), (st = ot[rt].abbr.toUpperCase()), (lt = ot[rt].narrow.toUpperCase()), nt)) + switch (et) { + case 'N': + case 'NN': + case 'NNN': + if (st === tt) return ot[rt] + break + case 'NNNN': + if (at === tt) return ot[rt] + break + case 'NNNNN': + if (lt === tt) return ot[rt] + break + } + else if ([at, st, lt].indexOf(tt) >= 0) return ot[rt] + } + function localeErasConvertYear(tt, et) { + var nt = tt.since <= tt.until ? 1 : -1 + return et === void 0 ? hooks(tt.since).year() : hooks(tt.since).year() + (et - tt.offset) * nt + } + function getEraName() { + var tt, + et, + nt, + rt = this.localeData().eras() + for (tt = 0, et = rt.length; tt < et; ++tt) + if ( + ((nt = this.clone().startOf('day').valueOf()), + (rt[tt].since <= nt && nt <= rt[tt].until) || (rt[tt].until <= nt && nt <= rt[tt].since)) + ) + return rt[tt].name + return '' + } + function getEraNarrow() { + var tt, + et, + nt, + rt = this.localeData().eras() + for (tt = 0, et = rt.length; tt < et; ++tt) + if ( + ((nt = this.clone().startOf('day').valueOf()), + (rt[tt].since <= nt && nt <= rt[tt].until) || (rt[tt].until <= nt && nt <= rt[tt].since)) + ) + return rt[tt].narrow + return '' + } + function getEraAbbr() { + var tt, + et, + nt, + rt = this.localeData().eras() + for (tt = 0, et = rt.length; tt < et; ++tt) + if ( + ((nt = this.clone().startOf('day').valueOf()), + (rt[tt].since <= nt && nt <= rt[tt].until) || (rt[tt].until <= nt && nt <= rt[tt].since)) + ) + return rt[tt].abbr + return '' + } + function getEraYear() { + var tt, + et, + nt, + rt, + it = this.localeData().eras() + for (tt = 0, et = it.length; tt < et; ++tt) + if ( + ((nt = it[tt].since <= it[tt].until ? 1 : -1), + (rt = this.clone().startOf('day').valueOf()), + (it[tt].since <= rt && rt <= it[tt].until) || (it[tt].until <= rt && rt <= it[tt].since)) + ) + return (this.year() - hooks(it[tt].since).year()) * nt + it[tt].offset + return this.year() + } + function erasNameRegex(tt) { + return hasOwnProp(this, '_erasNameRegex') || computeErasParse.call(this), tt ? this._erasNameRegex : this._erasRegex + } + function erasAbbrRegex(tt) { + return hasOwnProp(this, '_erasAbbrRegex') || computeErasParse.call(this), tt ? this._erasAbbrRegex : this._erasRegex + } + function erasNarrowRegex(tt) { + return ( + hasOwnProp(this, '_erasNarrowRegex') || computeErasParse.call(this), tt ? this._erasNarrowRegex : this._erasRegex + ) + } + function matchEraAbbr(tt, et) { + return et.erasAbbrRegex(tt) + } + function matchEraName(tt, et) { + return et.erasNameRegex(tt) + } + function matchEraNarrow(tt, et) { + return et.erasNarrowRegex(tt) + } + function matchEraYearOrdinal(tt, et) { + return et._eraYearOrdinalRegex || matchUnsigned + } + function computeErasParse() { + var tt = [], + et = [], + nt = [], + rt = [], + it, + ot, + at = this.eras() + for (it = 0, ot = at.length; it < ot; ++it) + et.push(regexEscape(at[it].name)), + tt.push(regexEscape(at[it].abbr)), + nt.push(regexEscape(at[it].narrow)), + rt.push(regexEscape(at[it].name)), + rt.push(regexEscape(at[it].abbr)), + rt.push(regexEscape(at[it].narrow)) + ;(this._erasRegex = new RegExp('^(' + rt.join('|') + ')', 'i')), + (this._erasNameRegex = new RegExp('^(' + et.join('|') + ')', 'i')), + (this._erasAbbrRegex = new RegExp('^(' + tt.join('|') + ')', 'i')), + (this._erasNarrowRegex = new RegExp('^(' + nt.join('|') + ')', 'i')) + } + addFormatToken(0, ['gg', 2], 0, function () { + return this.weekYear() % 100 + }) + addFormatToken(0, ['GG', 2], 0, function () { + return this.isoWeekYear() % 100 + }) + function addWeekYearFormatToken(tt, et) { + addFormatToken(0, [tt, tt.length], 0, et) + } + addWeekYearFormatToken('gggg', 'weekYear') + addWeekYearFormatToken('ggggg', 'weekYear') + addWeekYearFormatToken('GGGG', 'isoWeekYear') + addWeekYearFormatToken('GGGGG', 'isoWeekYear') + addUnitAlias('weekYear', 'gg') + addUnitAlias('isoWeekYear', 'GG') + addUnitPriority('weekYear', 1) + addUnitPriority('isoWeekYear', 1) + addRegexToken('G', matchSigned) + addRegexToken('g', matchSigned) + addRegexToken('GG', match1to2, match2) + addRegexToken('gg', match1to2, match2) + addRegexToken('GGGG', match1to4, match4) + addRegexToken('gggg', match1to4, match4) + addRegexToken('GGGGG', match1to6, match6) + addRegexToken('ggggg', match1to6, match6) + addWeekParseToken(['gggg', 'ggggg', 'GGGG', 'GGGGG'], function (tt, et, nt, rt) { + et[rt.substr(0, 2)] = toInt(tt) + }) + addWeekParseToken(['gg', 'GG'], function (tt, et, nt, rt) { + et[rt] = hooks.parseTwoDigitYear(tt) + }) + function getSetWeekYear(tt) { + return getSetWeekYearHelper.call( + this, + tt, + this.week(), + this.weekday(), + this.localeData()._week.dow, + this.localeData()._week.doy, + ) + } + function getSetISOWeekYear(tt) { + return getSetWeekYearHelper.call(this, tt, this.isoWeek(), this.isoWeekday(), 1, 4) + } + function getISOWeeksInYear() { + return weeksInYear(this.year(), 1, 4) + } + function getISOWeeksInISOWeekYear() { + return weeksInYear(this.isoWeekYear(), 1, 4) + } + function getWeeksInYear() { + var tt = this.localeData()._week + return weeksInYear(this.year(), tt.dow, tt.doy) + } + function getWeeksInWeekYear() { + var tt = this.localeData()._week + return weeksInYear(this.weekYear(), tt.dow, tt.doy) + } + function getSetWeekYearHelper(tt, et, nt, rt, it) { + var ot + return tt == null + ? weekOfYear(this, rt, it).year + : ((ot = weeksInYear(tt, rt, it)), et > ot && (et = ot), setWeekAll.call(this, tt, et, nt, rt, it)) + } + function setWeekAll(tt, et, nt, rt, it) { + var ot = dayOfYearFromWeeks(tt, et, nt, rt, it), + at = createUTCDate(ot.year, 0, ot.dayOfYear) + return this.year(at.getUTCFullYear()), this.month(at.getUTCMonth()), this.date(at.getUTCDate()), this + } + addFormatToken('Q', 0, 'Qo', 'quarter') + addUnitAlias('quarter', 'Q') + addUnitPriority('quarter', 7) + addRegexToken('Q', match1) + addParseToken('Q', function (tt, et) { + et[MONTH] = (toInt(tt) - 1) * 3 + }) + function getSetQuarter(tt) { + return tt == null ? Math.ceil((this.month() + 1) / 3) : this.month((tt - 1) * 3 + (this.month() % 3)) + } + addFormatToken('D', ['DD', 2], 'Do', 'date') + addUnitAlias('date', 'D') + addUnitPriority('date', 9) + addRegexToken('D', match1to2) + addRegexToken('DD', match1to2, match2) + addRegexToken('Do', function (tt, et) { + return tt ? et._dayOfMonthOrdinalParse || et._ordinalParse : et._dayOfMonthOrdinalParseLenient + }) + addParseToken(['D', 'DD'], DATE) + addParseToken('Do', function (tt, et) { + et[DATE] = toInt(tt.match(match1to2)[0]) + }) + var getSetDayOfMonth = makeGetSet('Date', !0) + addFormatToken('DDD', ['DDDD', 3], 'DDDo', 'dayOfYear') + addUnitAlias('dayOfYear', 'DDD') + addUnitPriority('dayOfYear', 4) + addRegexToken('DDD', match1to3) + addRegexToken('DDDD', match3) + addParseToken(['DDD', 'DDDD'], function (tt, et, nt) { + nt._dayOfYear = toInt(tt) + }) + function getSetDayOfYear(tt) { + var et = Math.round((this.clone().startOf('day') - this.clone().startOf('year')) / 864e5) + 1 + return tt == null ? et : this.add(tt - et, 'd') + } + addFormatToken('m', ['mm', 2], 0, 'minute') + addUnitAlias('minute', 'm') + addUnitPriority('minute', 14) + addRegexToken('m', match1to2) + addRegexToken('mm', match1to2, match2) + addParseToken(['m', 'mm'], MINUTE) + var getSetMinute = makeGetSet('Minutes', !1) + addFormatToken('s', ['ss', 2], 0, 'second') + addUnitAlias('second', 's') + addUnitPriority('second', 15) + addRegexToken('s', match1to2) + addRegexToken('ss', match1to2, match2) + addParseToken(['s', 'ss'], SECOND) + var getSetSecond = makeGetSet('Seconds', !1) + addFormatToken('S', 0, 0, function () { + return ~~(this.millisecond() / 100) + }) + addFormatToken(0, ['SS', 2], 0, function () { + return ~~(this.millisecond() / 10) + }) + addFormatToken(0, ['SSS', 3], 0, 'millisecond') + addFormatToken(0, ['SSSS', 4], 0, function () { + return this.millisecond() * 10 + }) + addFormatToken(0, ['SSSSS', 5], 0, function () { + return this.millisecond() * 100 + }) + addFormatToken(0, ['SSSSSS', 6], 0, function () { + return this.millisecond() * 1e3 + }) + addFormatToken(0, ['SSSSSSS', 7], 0, function () { + return this.millisecond() * 1e4 + }) + addFormatToken(0, ['SSSSSSSS', 8], 0, function () { + return this.millisecond() * 1e5 + }) + addFormatToken(0, ['SSSSSSSSS', 9], 0, function () { + return this.millisecond() * 1e6 + }) + addUnitAlias('millisecond', 'ms') + addUnitPriority('millisecond', 16) + addRegexToken('S', match1to3, match1) + addRegexToken('SS', match1to3, match2) + addRegexToken('SSS', match1to3, match3) + var token, getSetMillisecond + for (token = 'SSSS'; token.length <= 9; token += 'S') addRegexToken(token, matchUnsigned) + function parseMs(tt, et) { + et[MILLISECOND] = toInt(('0.' + tt) * 1e3) + } + for (token = 'S'; token.length <= 9; token += 'S') addParseToken(token, parseMs) + getSetMillisecond = makeGetSet('Milliseconds', !1) + addFormatToken('z', 0, 0, 'zoneAbbr') + addFormatToken('zz', 0, 0, 'zoneName') + function getZoneAbbr() { + return this._isUTC ? 'UTC' : '' + } + function getZoneName() { + return this._isUTC ? 'Coordinated Universal Time' : '' + } + var proto = Moment.prototype + proto.add = add$1 + proto.calendar = calendar$1$1 + proto.clone = clone$1 + proto.diff = diff + proto.endOf = endOf + proto.format = format$1 + proto.from = from + proto.fromNow = fromNow + proto.to = to + proto.toNow = toNow + proto.get = stringGet + proto.invalidAt = invalidAt + proto.isAfter = isAfter + proto.isBefore = isBefore + proto.isBetween = isBetween + proto.isSame = isSame + proto.isSameOrAfter = isSameOrAfter + proto.isSameOrBefore = isSameOrBefore + proto.isValid = isValid$2 + proto.lang = lang + proto.locale = locale$2 + proto.localeData = localeData + proto.max = prototypeMax + proto.min = prototypeMin + proto.parsingFlags = parsingFlags + proto.set = stringSet + proto.startOf = startOf + proto.subtract = subtract$1 + proto.toArray = toArray$2 + proto.toObject = toObject + proto.toDate = toDate + proto.toISOString = toISOString + proto.inspect = inspect + typeof Symbol < 'u' && + Symbol.for != null && + (proto[Symbol.for('nodejs.util.inspect.custom')] = function () { + return 'Moment<' + this.format() + '>' + }) + proto.toJSON = toJSON + proto.toString = toString$5 + proto.unix = unix + proto.valueOf = valueOf + proto.creationData = creationData + proto.eraName = getEraName + proto.eraNarrow = getEraNarrow + proto.eraAbbr = getEraAbbr + proto.eraYear = getEraYear + proto.year = getSetYear + proto.isLeapYear = getIsLeapYear + proto.weekYear = getSetWeekYear + proto.isoWeekYear = getSetISOWeekYear + proto.quarter = proto.quarters = getSetQuarter + proto.month = getSetMonth + proto.daysInMonth = getDaysInMonth + proto.week = proto.weeks = getSetWeek + proto.isoWeek = proto.isoWeeks = getSetISOWeek + proto.weeksInYear = getWeeksInYear + proto.weeksInWeekYear = getWeeksInWeekYear + proto.isoWeeksInYear = getISOWeeksInYear + proto.isoWeeksInISOWeekYear = getISOWeeksInISOWeekYear + proto.date = getSetDayOfMonth + proto.day = proto.days = getSetDayOfWeek + proto.weekday = getSetLocaleDayOfWeek + proto.isoWeekday = getSetISODayOfWeek + proto.dayOfYear = getSetDayOfYear + proto.hour = proto.hours = getSetHour + proto.minute = proto.minutes = getSetMinute + proto.second = proto.seconds = getSetSecond + proto.millisecond = proto.milliseconds = getSetMillisecond + proto.utcOffset = getSetOffset + proto.utc = setOffsetToUTC + proto.local = setOffsetToLocal + proto.parseZone = setOffsetToParsedOffset + proto.hasAlignedHourOffset = hasAlignedHourOffset + proto.isDST = isDaylightSavingTime + proto.isLocal = isLocal + proto.isUtcOffset = isUtcOffset + proto.isUtc = isUtc + proto.isUTC = isUtc + proto.zoneAbbr = getZoneAbbr + proto.zoneName = getZoneName + proto.dates = deprecate('dates accessor is deprecated. Use date instead.', getSetDayOfMonth) + proto.months = deprecate('months accessor is deprecated. Use month instead', getSetMonth) + proto.years = deprecate('years accessor is deprecated. Use year instead', getSetYear) + proto.zone = deprecate( + 'moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/', + getSetZone, + ) + proto.isDSTShifted = deprecate( + 'isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information', + isDaylightSavingTimeShifted, + ) + function createUnix(tt) { + return createLocal(tt * 1e3) + } + function createInZone() { + return createLocal.apply(null, arguments).parseZone() + } + function preParsePostFormat(tt) { + return tt + } + var proto$1 = Locale.prototype + proto$1.calendar = calendar$1 + proto$1.longDateFormat = longDateFormat + proto$1.invalidDate = invalidDate + proto$1.ordinal = ordinal$1 + proto$1.preparse = preParsePostFormat + proto$1.postformat = preParsePostFormat + proto$1.relativeTime = relativeTime + proto$1.pastFuture = pastFuture + proto$1.set = set$1 + proto$1.eras = localeEras + proto$1.erasParse = localeErasParse + proto$1.erasConvertYear = localeErasConvertYear + proto$1.erasAbbrRegex = erasAbbrRegex + proto$1.erasNameRegex = erasNameRegex + proto$1.erasNarrowRegex = erasNarrowRegex + proto$1.months = localeMonths + proto$1.monthsShort = localeMonthsShort + proto$1.monthsParse = localeMonthsParse + proto$1.monthsRegex = monthsRegex + proto$1.monthsShortRegex = monthsShortRegex + proto$1.week = localeWeek + proto$1.firstDayOfYear = localeFirstDayOfYear + proto$1.firstDayOfWeek = localeFirstDayOfWeek + proto$1.weekdays = localeWeekdays + proto$1.weekdaysMin = localeWeekdaysMin + proto$1.weekdaysShort = localeWeekdaysShort + proto$1.weekdaysParse = localeWeekdaysParse + proto$1.weekdaysRegex = weekdaysRegex + proto$1.weekdaysShortRegex = weekdaysShortRegex + proto$1.weekdaysMinRegex = weekdaysMinRegex + proto$1.isPM = localeIsPM + proto$1.meridiem = localeMeridiem + function get$1$1(tt, et, nt, rt) { + var it = getLocale(), + ot = createUTC().set(rt, et) + return it[nt](ot, tt) + } + function listMonthsImpl(tt, et, nt) { + if ((isNumber$3(tt) && ((et = tt), (tt = void 0)), (tt = tt || ''), et != null)) return get$1$1(tt, et, nt, 'month') + var rt, + it = [] + for (rt = 0; rt < 12; rt++) it[rt] = get$1$1(tt, rt, nt, 'month') + return it + } + function listWeekdaysImpl(tt, et, nt, rt) { + typeof tt == 'boolean' + ? (isNumber$3(et) && ((nt = et), (et = void 0)), (et = et || '')) + : ((et = tt), (nt = et), (tt = !1), isNumber$3(et) && ((nt = et), (et = void 0)), (et = et || '')) + var it = getLocale(), + ot = tt ? it._week.dow : 0, + at, + st = [] + if (nt != null) return get$1$1(et, (nt + ot) % 7, rt, 'day') + for (at = 0; at < 7; at++) st[at] = get$1$1(et, (at + ot) % 7, rt, 'day') + return st + } + function listMonths(tt, et) { + return listMonthsImpl(tt, et, 'months') + } + function listMonthsShort(tt, et) { + return listMonthsImpl(tt, et, 'monthsShort') + } + function listWeekdays(tt, et, nt) { + return listWeekdaysImpl(tt, et, nt, 'weekdays') + } + function listWeekdaysShort(tt, et, nt) { + return listWeekdaysImpl(tt, et, nt, 'weekdaysShort') + } + function listWeekdaysMin(tt, et, nt) { + return listWeekdaysImpl(tt, et, nt, 'weekdaysMin') + } + getSetGlobalLocale('en', { + eras: [ + { since: '0001-01-01', until: 1 / 0, offset: 1, name: 'Anno Domini', narrow: 'AD', abbr: 'AD' }, + { since: '0000-12-31', until: -1 / 0, offset: 1, name: 'Before Christ', narrow: 'BC', abbr: 'BC' }, + ], + dayOfMonthOrdinalParse: /\d{1,2}(th|st|nd|rd)/, + ordinal: function (tt) { + var et = tt % 10, + nt = toInt((tt % 100) / 10) === 1 ? 'th' : et === 1 ? 'st' : et === 2 ? 'nd' : et === 3 ? 'rd' : 'th' + return tt + nt + }, + }) + hooks.lang = deprecate('moment.lang is deprecated. Use moment.locale instead.', getSetGlobalLocale) + hooks.langData = deprecate('moment.langData is deprecated. Use moment.localeData instead.', getLocale) + var mathAbs = Math.abs + function abs() { + var tt = this._data + return ( + (this._milliseconds = mathAbs(this._milliseconds)), + (this._days = mathAbs(this._days)), + (this._months = mathAbs(this._months)), + (tt.milliseconds = mathAbs(tt.milliseconds)), + (tt.seconds = mathAbs(tt.seconds)), + (tt.minutes = mathAbs(tt.minutes)), + (tt.hours = mathAbs(tt.hours)), + (tt.months = mathAbs(tt.months)), + (tt.years = mathAbs(tt.years)), + this + ) + } + function addSubtract$1(tt, et, nt, rt) { + var it = createDuration(et, nt) + return ( + (tt._milliseconds += rt * it._milliseconds), + (tt._days += rt * it._days), + (tt._months += rt * it._months), + tt._bubble() + ) + } + function add$1$1(tt, et) { + return addSubtract$1(this, tt, et, 1) + } + function subtract$1$1(tt, et) { + return addSubtract$1(this, tt, et, -1) + } + function absCeil(tt) { + return tt < 0 ? Math.floor(tt) : Math.ceil(tt) + } + function bubble() { + var tt = this._milliseconds, + et = this._days, + nt = this._months, + rt = this._data, + it, + ot, + at, + st, + lt + return ( + (tt >= 0 && et >= 0 && nt >= 0) || + (tt <= 0 && et <= 0 && nt <= 0) || + ((tt += absCeil(monthsToDays(nt) + et) * 864e5), (et = 0), (nt = 0)), + (rt.milliseconds = tt % 1e3), + (it = absFloor(tt / 1e3)), + (rt.seconds = it % 60), + (ot = absFloor(it / 60)), + (rt.minutes = ot % 60), + (at = absFloor(ot / 60)), + (rt.hours = at % 24), + (et += absFloor(at / 24)), + (lt = absFloor(daysToMonths(et))), + (nt += lt), + (et -= absCeil(monthsToDays(lt))), + (st = absFloor(nt / 12)), + (nt %= 12), + (rt.days = et), + (rt.months = nt), + (rt.years = st), + this + ) + } + function daysToMonths(tt) { + return (tt * 4800) / 146097 + } + function monthsToDays(tt) { + return (tt * 146097) / 4800 + } + function as(tt) { + if (!this.isValid()) return NaN + var et, + nt, + rt = this._milliseconds + if (((tt = normalizeUnits(tt)), tt === 'month' || tt === 'quarter' || tt === 'year')) + switch (((et = this._days + rt / 864e5), (nt = this._months + daysToMonths(et)), tt)) { + case 'month': + return nt + case 'quarter': + return nt / 3 + case 'year': + return nt / 12 + } + else + switch (((et = this._days + Math.round(monthsToDays(this._months))), tt)) { + case 'week': + return et / 7 + rt / 6048e5 + case 'day': + return et + rt / 864e5 + case 'hour': + return et * 24 + rt / 36e5 + case 'minute': + return et * 1440 + rt / 6e4 + case 'second': + return et * 86400 + rt / 1e3 + case 'millisecond': + return Math.floor(et * 864e5) + rt + default: + throw new Error('Unknown unit ' + tt) + } + } + function valueOf$1() { + return this.isValid() + ? this._milliseconds + this._days * 864e5 + (this._months % 12) * 2592e6 + toInt(this._months / 12) * 31536e6 + : NaN + } + function makeAs(tt) { + return function () { + return this.as(tt) + } + } + var asMilliseconds = makeAs('ms'), + asSeconds = makeAs('s'), + asMinutes = makeAs('m'), + asHours = makeAs('h'), + asDays = makeAs('d'), + asWeeks = makeAs('w'), + asMonths = makeAs('M'), + asQuarters = makeAs('Q'), + asYears = makeAs('y') + function clone$1$1() { + return createDuration(this) + } + function get$2$1(tt) { + return (tt = normalizeUnits(tt)), this.isValid() ? this[tt + 's']() : NaN + } + function makeGetter(tt) { + return function () { + return this.isValid() ? this._data[tt] : NaN + } + } + var milliseconds = makeGetter('milliseconds'), + seconds = makeGetter('seconds'), + minutes = makeGetter('minutes'), + hours = makeGetter('hours'), + days = makeGetter('days'), + months = makeGetter('months'), + years = makeGetter('years') + function weeks() { + return absFloor(this.days() / 7) + } + var round$1 = Math.round, + thresholds = { ss: 44, s: 45, m: 45, h: 22, d: 26, w: null, M: 11 } + function substituteTimeAgo(tt, et, nt, rt, it) { + return it.relativeTime(et || 1, !!nt, tt, rt) + } + function relativeTime$1(tt, et, nt, rt) { + var it = createDuration(tt).abs(), + ot = round$1(it.as('s')), + at = round$1(it.as('m')), + st = round$1(it.as('h')), + lt = round$1(it.as('d')), + ct = round$1(it.as('M')), + ut = round$1(it.as('w')), + ht = round$1(it.as('y')), + dt = + (ot <= nt.ss && ['s', ot]) || + (ot < nt.s && ['ss', ot]) || + (at <= 1 && ['m']) || + (at < nt.m && ['mm', at]) || + (st <= 1 && ['h']) || + (st < nt.h && ['hh', st]) || + (lt <= 1 && ['d']) || + (lt < nt.d && ['dd', lt]) + return ( + nt.w != null && (dt = dt || (ut <= 1 && ['w']) || (ut < nt.w && ['ww', ut])), + (dt = dt || (ct <= 1 && ['M']) || (ct < nt.M && ['MM', ct]) || (ht <= 1 && ['y']) || ['yy', ht]), + (dt[2] = et), + (dt[3] = +tt > 0), + (dt[4] = rt), + substituteTimeAgo.apply(null, dt) + ) + } + function getSetRelativeTimeRounding(tt) { + return tt === void 0 ? round$1 : typeof tt == 'function' ? ((round$1 = tt), !0) : !1 + } + function getSetRelativeTimeThreshold(tt, et) { + return thresholds[tt] === void 0 + ? !1 + : et === void 0 + ? thresholds[tt] + : ((thresholds[tt] = et), tt === 's' && (thresholds.ss = et - 1), !0) + } + function humanize(tt, et) { + if (!this.isValid()) return this.localeData().invalidDate() + var nt = !1, + rt = thresholds, + it, + ot + return ( + typeof tt == 'object' && ((et = tt), (tt = !1)), + typeof tt == 'boolean' && (nt = tt), + typeof et == 'object' && + ((rt = Object.assign({}, thresholds, et)), et.s != null && et.ss == null && (rt.ss = et.s - 1)), + (it = this.localeData()), + (ot = relativeTime$1(this, !nt, rt, it)), + nt && (ot = it.pastFuture(+this, ot)), + it.postformat(ot) + ) + } + var abs$1 = Math.abs + function sign$1(tt) { + return (tt > 0) - (tt < 0) || +tt + } + function toISOString$1() { + if (!this.isValid()) return this.localeData().invalidDate() + var tt = abs$1(this._milliseconds) / 1e3, + et = abs$1(this._days), + nt = abs$1(this._months), + rt, + it, + ot, + at, + st = this.asSeconds(), + lt, + ct, + ut, + ht + return st + ? ((rt = absFloor(tt / 60)), + (it = absFloor(rt / 60)), + (tt %= 60), + (rt %= 60), + (ot = absFloor(nt / 12)), + (nt %= 12), + (at = tt ? tt.toFixed(3).replace(/\.?0+$/, '') : ''), + (lt = st < 0 ? '-' : ''), + (ct = sign$1(this._months) !== sign$1(st) ? '-' : ''), + (ut = sign$1(this._days) !== sign$1(st) ? '-' : ''), + (ht = sign$1(this._milliseconds) !== sign$1(st) ? '-' : ''), + lt + + 'P' + + (ot ? ct + ot + 'Y' : '') + + (nt ? ct + nt + 'M' : '') + + (et ? ut + et + 'D' : '') + + (it || rt || tt ? 'T' : '') + + (it ? ht + it + 'H' : '') + + (rt ? ht + rt + 'M' : '') + + (tt ? ht + at + 'S' : '')) + : 'P0D' + } + var proto$2 = Duration.prototype + proto$2.isValid = isValid$1 + proto$2.abs = abs + proto$2.add = add$1$1 + proto$2.subtract = subtract$1$1 + proto$2.as = as + proto$2.asMilliseconds = asMilliseconds + proto$2.asSeconds = asSeconds + proto$2.asMinutes = asMinutes + proto$2.asHours = asHours + proto$2.asDays = asDays + proto$2.asWeeks = asWeeks + proto$2.asMonths = asMonths + proto$2.asQuarters = asQuarters + proto$2.asYears = asYears + proto$2.valueOf = valueOf$1 + proto$2._bubble = bubble + proto$2.clone = clone$1$1 + proto$2.get = get$2$1 + proto$2.milliseconds = milliseconds + proto$2.seconds = seconds + proto$2.minutes = minutes + proto$2.hours = hours + proto$2.days = days + proto$2.weeks = weeks + proto$2.months = months + proto$2.years = years + proto$2.humanize = humanize + proto$2.toISOString = toISOString$1 + proto$2.toString = toISOString$1 + proto$2.toJSON = toISOString$1 + proto$2.locale = locale$2 + proto$2.localeData = localeData + proto$2.toIsoString = deprecate( + 'toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)', + toISOString$1, + ) + proto$2.lang = lang + addFormatToken('X', 0, 0, 'unix') + addFormatToken('x', 0, 0, 'valueOf') + addRegexToken('x', matchSigned) + addRegexToken('X', matchTimestamp) + addParseToken('X', function (tt, et, nt) { + nt._d = new Date(parseFloat(tt) * 1e3) + }) + addParseToken('x', function (tt, et, nt) { + nt._d = new Date(toInt(tt)) + }) //! moment.js + hooks.version = '2.29.4' + setHookCallback(createLocal) + hooks.fn = proto + hooks.min = min$2 + hooks.max = max$2 + hooks.now = now$2 + hooks.utc = createUTC + hooks.unix = createUnix + hooks.months = listMonths + hooks.isDate = isDate + hooks.locale = getSetGlobalLocale + hooks.invalid = createInvalid + hooks.duration = createDuration + hooks.isMoment = isMoment + hooks.weekdays = listWeekdays + hooks.parseZone = createInZone + hooks.localeData = getLocale + hooks.isDuration = isDuration + hooks.monthsShort = listMonthsShort + hooks.weekdaysMin = listWeekdaysMin + hooks.defineLocale = defineLocale + hooks.updateLocale = updateLocale + hooks.locales = listLocales + hooks.weekdaysShort = listWeekdaysShort + hooks.normalizeUnits = normalizeUnits + hooks.relativeTimeRounding = getSetRelativeTimeRounding + hooks.relativeTimeThreshold = getSetRelativeTimeThreshold + hooks.calendarFormat = getCalendarFormat + hooks.prototype = proto + hooks.HTML5_FMT = { + DATETIME_LOCAL: 'YYYY-MM-DDTHH:mm', + DATETIME_LOCAL_SECONDS: 'YYYY-MM-DDTHH:mm:ss', + DATETIME_LOCAL_MS: 'YYYY-MM-DDTHH:mm:ss.SSS', + DATE: 'YYYY-MM-DD', + TIME: 'HH:mm', + TIME_SECONDS: 'HH:mm:ss', + TIME_MS: 'HH:mm:ss.SSS', + WEEK: 'GGGG-[W]WW', + MONTH: 'YYYY-MM', + } + var classnames = { exports: {} } + /*! + Copyright (c) 2018 Jed Watson. + Licensed under the MIT License (MIT), see + http://jedwatson.github.io/classnames +*/ ;(function (tt) { + ;(function () { + var et = {}.hasOwnProperty + function nt() { + for (var rt = [], it = 0; it < arguments.length; it++) { + var ot = arguments[it] + if (ot) { + var at = typeof ot + if (at === 'string' || at === 'number') rt.push(ot) + else if (Array.isArray(ot)) { + if (ot.length) { + var st = nt.apply(null, ot) + st && rt.push(st) + } + } else if (at === 'object') { + if (ot.toString !== Object.prototype.toString && !ot.toString.toString().includes('[native code]')) { + rt.push(ot.toString()) + continue + } + for (var lt in ot) et.call(ot, lt) && ot[lt] && rt.push(lt) + } + } + } + return rt.join(' ') + } + tt.exports ? ((nt.default = nt), (tt.exports = nt)) : (window.classNames = nt) + })() + })(classnames) + var classnamesExports = classnames.exports + const classNames = getDefaultExportFromCjs(classnamesExports) + var baseGetTag$4 = _baseGetTag, + isArray$c = isArray_1, + isObjectLike$5 = isObjectLike_1, + stringTag$1 = '[object String]' + function isString(tt) { + return typeof tt == 'string' || (!isArray$c(tt) && isObjectLike$5(tt) && baseGetTag$4(tt) == stringTag$1) + } + var isString_1 = isString + const _isString = getDefaultExportFromCjs(isString_1) + var baseGetTag$3 = _baseGetTag, + isObjectLike$4 = isObjectLike_1, + symbolTag$1 = '[object Symbol]' + function isSymbol$6(tt) { + return typeof tt == 'symbol' || (isObjectLike$4(tt) && baseGetTag$3(tt) == symbolTag$1) + } + var isSymbol_1 = isSymbol$6, + isArray$b = isArray_1, + isSymbol$5 = isSymbol_1, + reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, + reIsPlainProp = /^\w*$/ + function isKey$3(tt, et) { + if (isArray$b(tt)) return !1 + var nt = typeof tt + return nt == 'number' || nt == 'symbol' || nt == 'boolean' || tt == null || isSymbol$5(tt) + ? !0 + : reIsPlainProp.test(tt) || !reIsDeepProp.test(tt) || (et != null && tt in Object(et)) + } + var _isKey = isKey$3, + MapCache$1 = _MapCache, + FUNC_ERROR_TEXT$2 = 'Expected a function' + function memoize$2(tt, et) { + if (typeof tt != 'function' || (et != null && typeof et != 'function')) throw new TypeError(FUNC_ERROR_TEXT$2) + var nt = function () { + var rt = arguments, + it = et ? et.apply(this, rt) : rt[0], + ot = nt.cache + if (ot.has(it)) return ot.get(it) + var at = tt.apply(this, rt) + return (nt.cache = ot.set(it, at) || ot), at + } + return (nt.cache = new (memoize$2.Cache || MapCache$1)()), nt + } + memoize$2.Cache = MapCache$1 + var memoize_1 = memoize$2, + memoize$1 = memoize_1, + MAX_MEMOIZE_SIZE = 500 + function memoizeCapped$1(tt) { + var et = memoize$1(tt, function (rt) { + return nt.size === MAX_MEMOIZE_SIZE && nt.clear(), rt + }), + nt = et.cache + return et + } + var _memoizeCapped = memoizeCapped$1, + memoizeCapped = _memoizeCapped, + rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, + reEscapeChar = /\\(\\)?/g, + stringToPath$1 = memoizeCapped(function (tt) { + var et = [] + return ( + tt.charCodeAt(0) === 46 && et.push(''), + tt.replace(rePropName, function (nt, rt, it, ot) { + et.push(it ? ot.replace(reEscapeChar, '$1') : rt || nt) + }), + et + ) + }), + _stringToPath = stringToPath$1 + function arrayMap$3(tt, et) { + for (var nt = -1, rt = tt == null ? 0 : tt.length, it = Array(rt); ++nt < rt; ) it[nt] = et(tt[nt], nt, tt) + return it + } + var _arrayMap = arrayMap$3, + Symbol$4 = _Symbol, + arrayMap$2 = _arrayMap, + isArray$a = isArray_1, + isSymbol$4 = isSymbol_1, + INFINITY$3 = 1 / 0, + symbolProto$1 = Symbol$4 ? Symbol$4.prototype : void 0, + symbolToString = symbolProto$1 ? symbolProto$1.toString : void 0 + function baseToString$1(tt) { + if (typeof tt == 'string') return tt + if (isArray$a(tt)) return arrayMap$2(tt, baseToString$1) + '' + if (isSymbol$4(tt)) return symbolToString ? symbolToString.call(tt) : '' + var et = tt + '' + return et == '0' && 1 / tt == -INFINITY$3 ? '-0' : et + } + var _baseToString = baseToString$1, + baseToString = _baseToString + function toString$4(tt) { + return tt == null ? '' : baseToString(tt) + } + var toString_1 = toString$4, + isArray$9 = isArray_1, + isKey$2 = _isKey, + stringToPath = _stringToPath, + toString$3 = toString_1 + function castPath$2(tt, et) { + return isArray$9(tt) ? tt : isKey$2(tt, et) ? [tt] : stringToPath(toString$3(tt)) + } + var _castPath = castPath$2, + isSymbol$3 = isSymbol_1, + INFINITY$2 = 1 / 0 + function toKey$4(tt) { + if (typeof tt == 'string' || isSymbol$3(tt)) return tt + var et = tt + '' + return et == '0' && 1 / tt == -INFINITY$2 ? '-0' : et + } + var _toKey = toKey$4, + castPath$1 = _castPath, + toKey$3 = _toKey + function baseGet$3(tt, et) { + et = castPath$1(et, tt) + for (var nt = 0, rt = et.length; tt != null && nt < rt; ) tt = tt[toKey$3(et[nt++])] + return nt && nt == rt ? tt : void 0 + } + var _baseGet = baseGet$3, + baseGet$2 = _baseGet + function get$2(tt, et, nt) { + var rt = tt == null ? void 0 : baseGet$2(tt, et) + return rt === void 0 ? nt : rt + } + var get_1 = get$2 + const _get = getDefaultExportFromCjs(get_1) + function isNil(tt) { + return tt == null + } + var isNil_1 = isNil + const _isNil = getDefaultExportFromCjs(isNil_1) + var reactIs = { exports: {} }, + reactIs_production_min = {} + /** @license React v16.13.1 + * react-is.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ var b = typeof Symbol == 'function' && Symbol.for, + c$1 = b ? Symbol.for('react.element') : 60103, + d = b ? Symbol.for('react.portal') : 60106, + e = b ? Symbol.for('react.fragment') : 60107, + f = b ? Symbol.for('react.strict_mode') : 60108, + g = b ? Symbol.for('react.profiler') : 60114, + h$1 = b ? Symbol.for('react.provider') : 60109, + k$1 = b ? Symbol.for('react.context') : 60110, + l = b ? Symbol.for('react.async_mode') : 60111, + m = b ? Symbol.for('react.concurrent_mode') : 60111, + n = b ? Symbol.for('react.forward_ref') : 60112, + p = b ? Symbol.for('react.suspense') : 60113, + q = b ? Symbol.for('react.suspense_list') : 60120, + r = b ? Symbol.for('react.memo') : 60115, + t = b ? Symbol.for('react.lazy') : 60116, + v = b ? Symbol.for('react.block') : 60121, + w$1 = b ? Symbol.for('react.fundamental') : 60117, + x$1 = b ? Symbol.for('react.responder') : 60118, + y$1 = b ? Symbol.for('react.scope') : 60119 + function z(tt) { + if (typeof tt == 'object' && tt !== null) { + var et = tt.$$typeof + switch (et) { + case c$1: + switch (((tt = tt.type), tt)) { + case l: + case m: + case e: + case g: + case f: + case p: + return tt + default: + switch (((tt = tt && tt.$$typeof), tt)) { + case k$1: + case n: + case t: + case r: + case h$1: + return tt + default: + return et + } + } + case d: + return et + } + } + } + function A(tt) { + return z(tt) === m + } + reactIs_production_min.AsyncMode = l + reactIs_production_min.ConcurrentMode = m + reactIs_production_min.ContextConsumer = k$1 + reactIs_production_min.ContextProvider = h$1 + reactIs_production_min.Element = c$1 + reactIs_production_min.ForwardRef = n + reactIs_production_min.Fragment = e + reactIs_production_min.Lazy = t + reactIs_production_min.Memo = r + reactIs_production_min.Portal = d + reactIs_production_min.Profiler = g + reactIs_production_min.StrictMode = f + reactIs_production_min.Suspense = p + reactIs_production_min.isAsyncMode = function (tt) { + return A(tt) || z(tt) === l + } + reactIs_production_min.isConcurrentMode = A + reactIs_production_min.isContextConsumer = function (tt) { + return z(tt) === k$1 + } + reactIs_production_min.isContextProvider = function (tt) { + return z(tt) === h$1 + } + reactIs_production_min.isElement = function (tt) { + return typeof tt == 'object' && tt !== null && tt.$$typeof === c$1 + } + reactIs_production_min.isForwardRef = function (tt) { + return z(tt) === n + } + reactIs_production_min.isFragment = function (tt) { + return z(tt) === e + } + reactIs_production_min.isLazy = function (tt) { + return z(tt) === t + } + reactIs_production_min.isMemo = function (tt) { + return z(tt) === r + } + reactIs_production_min.isPortal = function (tt) { + return z(tt) === d + } + reactIs_production_min.isProfiler = function (tt) { + return z(tt) === g + } + reactIs_production_min.isStrictMode = function (tt) { + return z(tt) === f + } + reactIs_production_min.isSuspense = function (tt) { + return z(tt) === p + } + reactIs_production_min.isValidElementType = function (tt) { + return ( + typeof tt == 'string' || + typeof tt == 'function' || + tt === e || + tt === m || + tt === g || + tt === f || + tt === p || + tt === q || + (typeof tt == 'object' && + tt !== null && + (tt.$$typeof === t || + tt.$$typeof === r || + tt.$$typeof === h$1 || + tt.$$typeof === k$1 || + tt.$$typeof === n || + tt.$$typeof === w$1 || + tt.$$typeof === x$1 || + tt.$$typeof === y$1 || + tt.$$typeof === v)) + ) + } + reactIs_production_min.typeOf = z + reactIs.exports = reactIs_production_min + var reactIsExports = reactIs.exports, + baseGetTag$2 = _baseGetTag, + isObjectLike$3 = isObjectLike_1, + numberTag$1 = '[object Number]' + function isNumber$2(tt) { + return typeof tt == 'number' || (isObjectLike$3(tt) && baseGetTag$2(tt) == numberTag$1) + } + var isNumber_1 = isNumber$2 + const _isNumber = getDefaultExportFromCjs(isNumber_1) + var isNumber$1 = isNumber_1 + function isNaN$1(tt) { + return isNumber$1(tt) && tt != +tt + } + var _isNaN = isNaN$1 + const _isNaN$1 = getDefaultExportFromCjs(_isNaN) + var mathSign = function (et) { + return et === 0 ? 0 : et > 0 ? 1 : -1 + }, + isPercent = function (et) { + return _isString(et) && et.indexOf('%') === et.length - 1 + }, + isNumber = function (et) { + return _isNumber(et) && !_isNaN$1(et) + }, + isNumOrStr = function (et) { + return isNumber(et) || _isString(et) + }, + idCounter = 0, + uniqueId = function (et) { + var nt = ++idCounter + return ''.concat(et || '').concat(nt) + }, + getPercentValue = function (et, nt) { + var rt = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 0, + it = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : !1 + if (!isNumber(et) && !_isString(et)) return rt + var ot + if (isPercent(et)) { + var at = et.indexOf('%') + ot = (nt * parseFloat(et.slice(0, at))) / 100 + } else ot = +et + return _isNaN$1(ot) && (ot = rt), it && ot > nt && (ot = nt), ot + }, + getAnyElementOfObject = function (et) { + if (!et) return null + var nt = Object.keys(et) + return nt && nt.length ? et[nt[0]] : null + }, + hasDuplicate = function (et) { + if (!_isArray$1(et)) return !1 + for (var nt = et.length, rt = {}, it = 0; it < nt; it++) + if (!rt[et[it]]) rt[et[it]] = !0 + else return !0 + return !1 + }, + interpolateNumber$2 = function (et, nt) { + return isNumber(et) && isNumber(nt) + ? function (rt) { + return et + rt * (nt - et) + } + : function () { + return nt + } + } + function findEntryInArray(tt, et, nt) { + return !tt || !tt.length + ? null + : tt.find(function (rt) { + return rt && (typeof et == 'function' ? et(rt) : _get(rt, et)) === nt + }) + } + var getLinearRegression = function (et) { + if (!et || !et.length) return null + for ( + var nt = et.length, rt = 0, it = 0, ot = 0, at = 0, st = 1 / 0, lt = -1 / 0, ct = 0, ut = 0, ht = 0; + ht < nt; + ht++ + ) + (ct = et[ht].cx || 0), + (ut = et[ht].cy || 0), + (rt += ct), + (it += ut), + (ot += ct * ut), + (at += ct * ct), + (st = Math.min(st, ct)), + (lt = Math.max(lt, ct)) + var dt = nt * at !== rt * rt ? (nt * ot - rt * it) / (nt * at - rt * rt) : 0 + return { xmin: st, xmax: lt, a: dt, b: (it - dt * rt) / nt } + } + function shallowEqual(tt, et) { + for (var nt in tt) + if ({}.hasOwnProperty.call(tt, nt) && (!{}.hasOwnProperty.call(et, nt) || tt[nt] !== et[nt])) return !1 + for (var rt in et) if ({}.hasOwnProperty.call(et, rt) && !{}.hasOwnProperty.call(tt, rt)) return !1 + return !0 + } + function _typeof$E(tt) { + '@babel/helpers - typeof' + return ( + (_typeof$E = + typeof Symbol == 'function' && typeof Symbol.iterator == 'symbol' + ? function (et) { + return typeof et + } + : function (et) { + return et && typeof Symbol == 'function' && et.constructor === Symbol && et !== Symbol.prototype + ? 'symbol' + : typeof et + }), + _typeof$E(tt) + ) + } + var SVGContainerPropKeys = ['viewBox', 'children'], + SVGElementPropKeys = [ + 'aria-activedescendant', + 'aria-atomic', + 'aria-autocomplete', + 'aria-busy', + 'aria-checked', + 'aria-colcount', + 'aria-colindex', + 'aria-colspan', + 'aria-controls', + 'aria-current', + 'aria-describedby', + 'aria-details', + 'aria-disabled', + 'aria-errormessage', + 'aria-expanded', + 'aria-flowto', + 'aria-haspopup', + 'aria-hidden', + 'aria-invalid', + 'aria-keyshortcuts', + 'aria-label', + 'aria-labelledby', + 'aria-level', + 'aria-live', + 'aria-modal', + 'aria-multiline', + 'aria-multiselectable', + 'aria-orientation', + 'aria-owns', + 'aria-placeholder', + 'aria-posinset', + 'aria-pressed', + 'aria-readonly', + 'aria-relevant', + 'aria-required', + 'aria-roledescription', + 'aria-rowcount', + 'aria-rowindex', + 'aria-rowspan', + 'aria-selected', + 'aria-setsize', + 'aria-sort', + 'aria-valuemax', + 'aria-valuemin', + 'aria-valuenow', + 'aria-valuetext', + 'className', + 'color', + 'height', + 'id', + 'lang', + 'max', + 'media', + 'method', + 'min', + 'name', + 'style', + 'target', + 'width', + 'role', + 'tabIndex', + 'accentHeight', + 'accumulate', + 'additive', + 'alignmentBaseline', + 'allowReorder', + 'alphabetic', + 'amplitude', + 'arabicForm', + 'ascent', + 'attributeName', + 'attributeType', + 'autoReverse', + 'azimuth', + 'baseFrequency', + 'baselineShift', + 'baseProfile', + 'bbox', + 'begin', + 'bias', + 'by', + 'calcMode', + 'capHeight', + 'clip', + 'clipPath', + 'clipPathUnits', + 'clipRule', + 'colorInterpolation', + 'colorInterpolationFilters', + 'colorProfile', + 'colorRendering', + 'contentScriptType', + 'contentStyleType', + 'cursor', + 'cx', + 'cy', + 'd', + 'decelerate', + 'descent', + 'diffuseConstant', + 'direction', + 'display', + 'divisor', + 'dominantBaseline', + 'dur', + 'dx', + 'dy', + 'edgeMode', + 'elevation', + 'enableBackground', + 'end', + 'exponent', + 'externalResourcesRequired', + 'fill', + 'fillOpacity', + 'fillRule', + 'filter', + 'filterRes', + 'filterUnits', + 'floodColor', + 'floodOpacity', + 'focusable', + 'fontFamily', + 'fontSize', + 'fontSizeAdjust', + 'fontStretch', + 'fontStyle', + 'fontVariant', + 'fontWeight', + 'format', + 'from', + 'fx', + 'fy', + 'g1', + 'g2', + 'glyphName', + 'glyphOrientationHorizontal', + 'glyphOrientationVertical', + 'glyphRef', + 'gradientTransform', + 'gradientUnits', + 'hanging', + 'horizAdvX', + 'horizOriginX', + 'href', + 'ideographic', + 'imageRendering', + 'in2', + 'in', + 'intercept', + 'k1', + 'k2', + 'k3', + 'k4', + 'k', + 'kernelMatrix', + 'kernelUnitLength', + 'kerning', + 'keyPoints', + 'keySplines', + 'keyTimes', + 'lengthAdjust', + 'letterSpacing', + 'lightingColor', + 'limitingConeAngle', + 'local', + 'markerEnd', + 'markerHeight', + 'markerMid', + 'markerStart', + 'markerUnits', + 'markerWidth', + 'mask', + 'maskContentUnits', + 'maskUnits', + 'mathematical', + 'mode', + 'numOctaves', + 'offset', + 'opacity', + 'operator', + 'order', + 'orient', + 'orientation', + 'origin', + 'overflow', + 'overlinePosition', + 'overlineThickness', + 'paintOrder', + 'panose1', + 'pathLength', + 'patternContentUnits', + 'patternTransform', + 'patternUnits', + 'pointerEvents', + 'pointsAtX', + 'pointsAtY', + 'pointsAtZ', + 'preserveAlpha', + 'preserveAspectRatio', + 'primitiveUnits', + 'r', + 'radius', + 'refX', + 'refY', + 'renderingIntent', + 'repeatCount', + 'repeatDur', + 'requiredExtensions', + 'requiredFeatures', + 'restart', + 'result', + 'rotate', + 'rx', + 'ry', + 'seed', + 'shapeRendering', + 'slope', + 'spacing', + 'specularConstant', + 'specularExponent', + 'speed', + 'spreadMethod', + 'startOffset', + 'stdDeviation', + 'stemh', + 'stemv', + 'stitchTiles', + 'stopColor', + 'stopOpacity', + 'strikethroughPosition', + 'strikethroughThickness', + 'string', + 'stroke', + 'strokeDasharray', + 'strokeDashoffset', + 'strokeLinecap', + 'strokeLinejoin', + 'strokeMiterlimit', + 'strokeOpacity', + 'strokeWidth', + 'surfaceScale', + 'systemLanguage', + 'tableValues', + 'targetX', + 'targetY', + 'textAnchor', + 'textDecoration', + 'textLength', + 'textRendering', + 'to', + 'transform', + 'u1', + 'u2', + 'underlinePosition', + 'underlineThickness', + 'unicode', + 'unicodeBidi', + 'unicodeRange', + 'unitsPerEm', + 'vAlphabetic', + 'values', + 'vectorEffect', + 'version', + 'vertAdvY', + 'vertOriginX', + 'vertOriginY', + 'vHanging', + 'vIdeographic', + 'viewTarget', + 'visibility', + 'vMathematical', + 'widths', + 'wordSpacing', + 'writingMode', + 'x1', + 'x2', + 'x', + 'xChannelSelector', + 'xHeight', + 'xlinkActuate', + 'xlinkArcrole', + 'xlinkHref', + 'xlinkRole', + 'xlinkShow', + 'xlinkTitle', + 'xlinkType', + 'xmlBase', + 'xmlLang', + 'xmlns', + 'xmlnsXlink', + 'xmlSpace', + 'y1', + 'y2', + 'y', + 'yChannelSelector', + 'z', + 'zoomAndPan', + 'ref', + 'key', + 'angle', + ], + PolyElementKeys = ['points', 'pathLength'], + FilteredElementKeyMap = { svg: SVGContainerPropKeys, polygon: PolyElementKeys, polyline: PolyElementKeys }, + EventKeys = [ + 'dangerouslySetInnerHTML', + 'onCopy', + 'onCopyCapture', + 'onCut', + 'onCutCapture', + 'onPaste', + 'onPasteCapture', + 'onCompositionEnd', + 'onCompositionEndCapture', + 'onCompositionStart', + 'onCompositionStartCapture', + 'onCompositionUpdate', + 'onCompositionUpdateCapture', + 'onFocus', + 'onFocusCapture', + 'onBlur', + 'onBlurCapture', + 'onChange', + 'onChangeCapture', + 'onBeforeInput', + 'onBeforeInputCapture', + 'onInput', + 'onInputCapture', + 'onReset', + 'onResetCapture', + 'onSubmit', + 'onSubmitCapture', + 'onInvalid', + 'onInvalidCapture', + 'onLoad', + 'onLoadCapture', + 'onError', + 'onErrorCapture', + 'onKeyDown', + 'onKeyDownCapture', + 'onKeyPress', + 'onKeyPressCapture', + 'onKeyUp', + 'onKeyUpCapture', + 'onAbort', + 'onAbortCapture', + 'onCanPlay', + 'onCanPlayCapture', + 'onCanPlayThrough', + 'onCanPlayThroughCapture', + 'onDurationChange', + 'onDurationChangeCapture', + 'onEmptied', + 'onEmptiedCapture', + 'onEncrypted', + 'onEncryptedCapture', + 'onEnded', + 'onEndedCapture', + 'onLoadedData', + 'onLoadedDataCapture', + 'onLoadedMetadata', + 'onLoadedMetadataCapture', + 'onLoadStart', + 'onLoadStartCapture', + 'onPause', + 'onPauseCapture', + 'onPlay', + 'onPlayCapture', + 'onPlaying', + 'onPlayingCapture', + 'onProgress', + 'onProgressCapture', + 'onRateChange', + 'onRateChangeCapture', + 'onSeeked', + 'onSeekedCapture', + 'onSeeking', + 'onSeekingCapture', + 'onStalled', + 'onStalledCapture', + 'onSuspend', + 'onSuspendCapture', + 'onTimeUpdate', + 'onTimeUpdateCapture', + 'onVolumeChange', + 'onVolumeChangeCapture', + 'onWaiting', + 'onWaitingCapture', + 'onAuxClick', + 'onAuxClickCapture', + 'onClick', + 'onClickCapture', + 'onContextMenu', + 'onContextMenuCapture', + 'onDoubleClick', + 'onDoubleClickCapture', + 'onDrag', + 'onDragCapture', + 'onDragEnd', + 'onDragEndCapture', + 'onDragEnter', + 'onDragEnterCapture', + 'onDragExit', + 'onDragExitCapture', + 'onDragLeave', + 'onDragLeaveCapture', + 'onDragOver', + 'onDragOverCapture', + 'onDragStart', + 'onDragStartCapture', + 'onDrop', + 'onDropCapture', + 'onMouseDown', + 'onMouseDownCapture', + 'onMouseEnter', + 'onMouseLeave', + 'onMouseMove', + 'onMouseMoveCapture', + 'onMouseOut', + 'onMouseOutCapture', + 'onMouseOver', + 'onMouseOverCapture', + 'onMouseUp', + 'onMouseUpCapture', + 'onSelect', + 'onSelectCapture', + 'onTouchCancel', + 'onTouchCancelCapture', + 'onTouchEnd', + 'onTouchEndCapture', + 'onTouchMove', + 'onTouchMoveCapture', + 'onTouchStart', + 'onTouchStartCapture', + 'onPointerDown', + 'onPointerDownCapture', + 'onPointerMove', + 'onPointerMoveCapture', + 'onPointerUp', + 'onPointerUpCapture', + 'onPointerCancel', + 'onPointerCancelCapture', + 'onPointerEnter', + 'onPointerEnterCapture', + 'onPointerLeave', + 'onPointerLeaveCapture', + 'onPointerOver', + 'onPointerOverCapture', + 'onPointerOut', + 'onPointerOutCapture', + 'onGotPointerCapture', + 'onGotPointerCaptureCapture', + 'onLostPointerCapture', + 'onLostPointerCaptureCapture', + 'onScroll', + 'onScrollCapture', + 'onWheel', + 'onWheelCapture', + 'onAnimationStart', + 'onAnimationStartCapture', + 'onAnimationEnd', + 'onAnimationEndCapture', + 'onAnimationIteration', + 'onAnimationIterationCapture', + 'onTransitionEnd', + 'onTransitionEndCapture', + ], + adaptEventHandlers = function (et, nt) { + if (!et || typeof et == 'function' || typeof et == 'boolean') return null + var rt = et + if ((reactExports.isValidElement(et) && (rt = et.props), !_isObject$1(rt))) return null + var it = {} + return ( + Object.keys(rt).forEach(function (ot) { + EventKeys.includes(ot) && + (it[ot] = + nt || + function (at) { + return rt[ot](rt, at) + }) + }), + it + ) + }, + getEventHandlerOfChild = function (et, nt, rt) { + return function (it) { + return et(nt, rt, it), null + } + }, + adaptEventsOfChild = function (et, nt, rt) { + if (!_isObject$1(et) || _typeof$E(et) !== 'object') return null + var it = null + return ( + Object.keys(et).forEach(function (ot) { + var at = et[ot] + EventKeys.includes(ot) && + typeof at == 'function' && + (it || (it = {}), (it[ot] = getEventHandlerOfChild(at, nt, rt))) + }), + it + ) + }, + _excluded$i = ['children'], + _excluded2$5 = ['children'] + function _objectWithoutProperties$i(tt, et) { + if (tt == null) return {} + var nt = _objectWithoutPropertiesLoose$i(tt, et), + rt, + it + if (Object.getOwnPropertySymbols) { + var ot = Object.getOwnPropertySymbols(tt) + for (it = 0; it < ot.length; it++) + (rt = ot[it]), !(et.indexOf(rt) >= 0) && Object.prototype.propertyIsEnumerable.call(tt, rt) && (nt[rt] = tt[rt]) + } + return nt + } + function _objectWithoutPropertiesLoose$i(tt, et) { + if (tt == null) return {} + var nt = {}, + rt = Object.keys(tt), + it, + ot + for (ot = 0; ot < rt.length; ot++) (it = rt[ot]), !(et.indexOf(it) >= 0) && (nt[it] = tt[it]) + return nt + } + function _typeof$D(tt) { + '@babel/helpers - typeof' + return ( + (_typeof$D = + typeof Symbol == 'function' && typeof Symbol.iterator == 'symbol' + ? function (et) { + return typeof et + } + : function (et) { + return et && typeof Symbol == 'function' && et.constructor === Symbol && et !== Symbol.prototype + ? 'symbol' + : typeof et + }), + _typeof$D(tt) + ) + } + var REACT_BROWSER_EVENT_MAP = { + click: 'onClick', + mousedown: 'onMouseDown', + mouseup: 'onMouseUp', + mouseover: 'onMouseOver', + mousemove: 'onMouseMove', + mouseout: 'onMouseOut', + mouseenter: 'onMouseEnter', + mouseleave: 'onMouseLeave', + touchcancel: 'onTouchCancel', + touchend: 'onTouchEnd', + touchmove: 'onTouchMove', + touchstart: 'onTouchStart', + }, + getDisplayName = function (et) { + return typeof et == 'string' ? et : et ? et.displayName || et.name || 'Component' : '' + }, + lastChildren = null, + lastResult = null, + toArray$1 = function tt(et) { + if (et === lastChildren && _isArray$1(lastResult)) return lastResult + var nt = [] + return ( + reactExports.Children.forEach(et, function (rt) { + _isNil(rt) || (reactIsExports.isFragment(rt) ? (nt = nt.concat(tt(rt.props.children))) : nt.push(rt)) + }), + (lastResult = nt), + (lastChildren = et), + nt + ) + } + function findAllByType(tt, et) { + var nt = [], + rt = [] + return ( + _isArray$1(et) + ? (rt = et.map(function (it) { + return getDisplayName(it) + })) + : (rt = [getDisplayName(et)]), + toArray$1(tt).forEach(function (it) { + var ot = _get(it, 'type.displayName') || _get(it, 'type.name') + rt.indexOf(ot) !== -1 && nt.push(it) + }), + nt + ) + } + function findChildByType(tt, et) { + var nt = findAllByType(tt, et) + return nt && nt[0] + } + var validateWidthHeight = function (et) { + if (!et || !et.props) return !1 + var nt = et.props, + rt = nt.width, + it = nt.height + return !(!isNumber(rt) || rt <= 0 || !isNumber(it) || it <= 0) + }, + SVG_TAGS = [ + 'a', + 'altGlyph', + 'altGlyphDef', + 'altGlyphItem', + 'animate', + 'animateColor', + 'animateMotion', + 'animateTransform', + 'circle', + 'clipPath', + 'color-profile', + 'cursor', + 'defs', + 'desc', + 'ellipse', + 'feBlend', + 'feColormatrix', + 'feComponentTransfer', + 'feComposite', + 'feConvolveMatrix', + 'feDiffuseLighting', + 'feDisplacementMap', + 'feDistantLight', + 'feFlood', + 'feFuncA', + 'feFuncB', + 'feFuncG', + 'feFuncR', + 'feGaussianBlur', + 'feImage', + 'feMerge', + 'feMergeNode', + 'feMorphology', + 'feOffset', + 'fePointLight', + 'feSpecularLighting', + 'feSpotLight', + 'feTile', + 'feTurbulence', + 'filter', + 'font', + 'font-face', + 'font-face-format', + 'font-face-name', + 'font-face-url', + 'foreignObject', + 'g', + 'glyph', + 'glyphRef', + 'hkern', + 'image', + 'line', + 'lineGradient', + 'marker', + 'mask', + 'metadata', + 'missing-glyph', + 'mpath', + 'path', + 'pattern', + 'polygon', + 'polyline', + 'radialGradient', + 'rect', + 'script', + 'set', + 'stop', + 'style', + 'svg', + 'switch', + 'symbol', + 'text', + 'textPath', + 'title', + 'tref', + 'tspan', + 'use', + 'view', + 'vkern', + ], + isSvgElement = function (et) { + return et && et.type && _isString(et.type) && SVG_TAGS.indexOf(et.type) >= 0 + }, + isDotProps = function (et) { + return et && _typeof$D(et) === 'object' && 'cx' in et && 'cy' in et && 'r' in et + }, + isValidSpreadableProp = function (et, nt, rt, it) { + var ot, + at = + (ot = FilteredElementKeyMap == null ? void 0 : FilteredElementKeyMap[it]) !== null && ot !== void 0 ? ot : [] + return ( + (!_isFunction$1(et) && ((it && at.includes(nt)) || SVGElementPropKeys.includes(nt))) || + (rt && EventKeys.includes(nt)) + ) + }, + filterProps = function (et, nt, rt) { + if (!et || typeof et == 'function' || typeof et == 'boolean') return null + var it = et + if ((reactExports.isValidElement(et) && (it = et.props), !_isObject$1(it))) return null + var ot = {} + return ( + Object.keys(it).forEach(function (at) { + var st + isValidSpreadableProp((st = it) === null || st === void 0 ? void 0 : st[at], at, nt, rt) && (ot[at] = it[at]) + }), + ot + ) + }, + isChildrenEqual = function tt(et, nt) { + if (et === nt) return !0 + var rt = reactExports.Children.count(et) + if (rt !== reactExports.Children.count(nt)) return !1 + if (rt === 0) return !0 + if (rt === 1) return isSingleChildEqual(_isArray$1(et) ? et[0] : et, _isArray$1(nt) ? nt[0] : nt) + for (var it = 0; it < rt; it++) { + var ot = et[it], + at = nt[it] + if (_isArray$1(ot) || _isArray$1(at)) { + if (!tt(ot, at)) return !1 + } else if (!isSingleChildEqual(ot, at)) return !1 + } + return !0 + }, + isSingleChildEqual = function (et, nt) { + if (_isNil(et) && _isNil(nt)) return !0 + if (!_isNil(et) && !_isNil(nt)) { + var rt = et.props || {}, + it = rt.children, + ot = _objectWithoutProperties$i(rt, _excluded$i), + at = nt.props || {}, + st = at.children, + lt = _objectWithoutProperties$i(at, _excluded2$5) + return it && st ? shallowEqual(ot, lt) && isChildrenEqual(it, st) : !it && !st ? shallowEqual(ot, lt) : !1 + } + return !1 + }, + renderByOrder = function (et, nt) { + var rt = [], + it = {} + return ( + toArray$1(et).forEach(function (ot, at) { + if (isSvgElement(ot)) rt.push(ot) + else if (ot) { + var st = getDisplayName(ot.type), + lt = nt[st] || {}, + ct = lt.handler, + ut = lt.once + if (ct && (!ut || !it[st])) { + var ht = ct(ot, st, at) + rt.push(ht), (it[st] = !0) + } + } + }), + rt + ) + }, + getReactEventByType = function (et) { + var nt = et && et.type + return nt && REACT_BROWSER_EVENT_MAP[nt] ? REACT_BROWSER_EVENT_MAP[nt] : null + }, + parseChildIndex = function (et, nt) { + return toArray$1(nt).indexOf(et) + }, + _excluded$h = ['children', 'width', 'height', 'viewBox', 'className', 'style'] + function _extends$r() { + return ( + (_extends$r = Object.assign + ? Object.assign.bind() + : function (tt) { + for (var et = 1; et < arguments.length; et++) { + var nt = arguments[et] + for (var rt in nt) Object.prototype.hasOwnProperty.call(nt, rt) && (tt[rt] = nt[rt]) + } + return tt + }), + _extends$r.apply(this, arguments) + ) + } + function _objectWithoutProperties$h(tt, et) { + if (tt == null) return {} + var nt = _objectWithoutPropertiesLoose$h(tt, et), + rt, + it + if (Object.getOwnPropertySymbols) { + var ot = Object.getOwnPropertySymbols(tt) + for (it = 0; it < ot.length; it++) + (rt = ot[it]), !(et.indexOf(rt) >= 0) && Object.prototype.propertyIsEnumerable.call(tt, rt) && (nt[rt] = tt[rt]) + } + return nt + } + function _objectWithoutPropertiesLoose$h(tt, et) { + if (tt == null) return {} + var nt = {}, + rt = Object.keys(tt), + it, + ot + for (ot = 0; ot < rt.length; ot++) (it = rt[ot]), !(et.indexOf(it) >= 0) && (nt[it] = tt[it]) + return nt + } + function Surface(tt) { + var et = tt.children, + nt = tt.width, + rt = tt.height, + it = tt.viewBox, + ot = tt.className, + at = tt.style, + st = _objectWithoutProperties$h(tt, _excluded$h), + lt = it || { width: nt, height: rt, x: 0, y: 0 }, + ct = classNames('recharts-surface', ot) + return React$1.createElement( + 'svg', + _extends$r({}, filterProps(st, !0, 'svg'), { + className: ct, + width: nt, + height: rt, + style: at, + viewBox: ''.concat(lt.x, ' ').concat(lt.y, ' ').concat(lt.width, ' ').concat(lt.height), + }), + React$1.createElement('title', null, tt.title), + React$1.createElement('desc', null, tt.desc), + et, + ) + } + var _excluded$g = ['children', 'className'] + function _extends$q() { + return ( + (_extends$q = Object.assign + ? Object.assign.bind() + : function (tt) { + for (var et = 1; et < arguments.length; et++) { + var nt = arguments[et] + for (var rt in nt) Object.prototype.hasOwnProperty.call(nt, rt) && (tt[rt] = nt[rt]) + } + return tt + }), + _extends$q.apply(this, arguments) + ) + } + function _objectWithoutProperties$g(tt, et) { + if (tt == null) return {} + var nt = _objectWithoutPropertiesLoose$g(tt, et), + rt, + it + if (Object.getOwnPropertySymbols) { + var ot = Object.getOwnPropertySymbols(tt) + for (it = 0; it < ot.length; it++) + (rt = ot[it]), !(et.indexOf(rt) >= 0) && Object.prototype.propertyIsEnumerable.call(tt, rt) && (nt[rt] = tt[rt]) + } + return nt + } + function _objectWithoutPropertiesLoose$g(tt, et) { + if (tt == null) return {} + var nt = {}, + rt = Object.keys(tt), + it, + ot + for (ot = 0; ot < rt.length; ot++) (it = rt[ot]), !(et.indexOf(it) >= 0) && (nt[it] = tt[it]) + return nt + } + var Layer = React$1.forwardRef(function (tt, et) { + var nt = tt.children, + rt = tt.className, + it = _objectWithoutProperties$g(tt, _excluded$g), + ot = classNames('recharts-layer', rt) + return React$1.createElement('g', _extends$q({ className: ot }, filterProps(it, !0), { ref: et }), nt) + }), + HASH_UNDEFINED = '__lodash_hash_undefined__' + function setCacheAdd$1(tt) { + return this.__data__.set(tt, HASH_UNDEFINED), this + } + var _setCacheAdd = setCacheAdd$1 + function setCacheHas$1(tt) { + return this.__data__.has(tt) + } + var _setCacheHas = setCacheHas$1, + MapCache = _MapCache, + setCacheAdd = _setCacheAdd, + setCacheHas = _setCacheHas + function SetCache$2(tt) { + var et = -1, + nt = tt == null ? 0 : tt.length + for (this.__data__ = new MapCache(); ++et < nt; ) this.add(tt[et]) + } + SetCache$2.prototype.add = SetCache$2.prototype.push = setCacheAdd + SetCache$2.prototype.has = setCacheHas + var _SetCache = SetCache$2 + function arraySome$2(tt, et) { + for (var nt = -1, rt = tt == null ? 0 : tt.length; ++nt < rt; ) if (et(tt[nt], nt, tt)) return !0 + return !1 + } + var _arraySome = arraySome$2 + function cacheHas$2(tt, et) { + return tt.has(et) + } + var _cacheHas = cacheHas$2, + SetCache$1 = _SetCache, + arraySome$1 = _arraySome, + cacheHas$1 = _cacheHas, + COMPARE_PARTIAL_FLAG$5 = 1, + COMPARE_UNORDERED_FLAG$3 = 2 + function equalArrays$2(tt, et, nt, rt, it, ot) { + var at = nt & COMPARE_PARTIAL_FLAG$5, + st = tt.length, + lt = et.length + if (st != lt && !(at && lt > st)) return !1 + var ct = ot.get(tt), + ut = ot.get(et) + if (ct && ut) return ct == et && ut == tt + var ht = -1, + dt = !0, + pt = nt & COMPARE_UNORDERED_FLAG$3 ? new SetCache$1() : void 0 + for (ot.set(tt, et), ot.set(et, tt); ++ht < st; ) { + var mt = tt[ht], + gt = et[ht] + if (rt) var yt = at ? rt(gt, mt, ht, et, tt, ot) : rt(mt, gt, ht, tt, et, ot) + if (yt !== void 0) { + if (yt) continue + dt = !1 + break + } + if (pt) { + if ( + !arraySome$1(et, function (bt, vt) { + if (!cacheHas$1(pt, vt) && (mt === bt || it(mt, bt, nt, rt, ot))) return pt.push(vt) + }) + ) { + dt = !1 + break + } + } else if (!(mt === gt || it(mt, gt, nt, rt, ot))) { + dt = !1 + break + } + } + return ot.delete(tt), ot.delete(et), dt + } + var _equalArrays = equalArrays$2 + function mapToArray$1(tt) { + var et = -1, + nt = Array(tt.size) + return ( + tt.forEach(function (rt, it) { + nt[++et] = [it, rt] + }), + nt + ) + } + var _mapToArray = mapToArray$1 + function setToArray$3(tt) { + var et = -1, + nt = Array(tt.size) + return ( + tt.forEach(function (rt) { + nt[++et] = rt + }), + nt + ) + } + var _setToArray = setToArray$3, + Symbol$3 = _Symbol, + Uint8Array$1 = _Uint8Array, + eq$1 = eq_1, + equalArrays$1 = _equalArrays, + mapToArray = _mapToArray, + setToArray$2 = _setToArray, + COMPARE_PARTIAL_FLAG$4 = 1, + COMPARE_UNORDERED_FLAG$2 = 2, + boolTag$1 = '[object Boolean]', + dateTag = '[object Date]', + errorTag = '[object Error]', + mapTag = '[object Map]', + numberTag = '[object Number]', + regexpTag = '[object RegExp]', + setTag = '[object Set]', + stringTag = '[object String]', + symbolTag = '[object Symbol]', + arrayBufferTag = '[object ArrayBuffer]', + dataViewTag = '[object DataView]', + symbolProto = Symbol$3 ? Symbol$3.prototype : void 0, + symbolValueOf = symbolProto ? symbolProto.valueOf : void 0 + function equalByTag$1(tt, et, nt, rt, it, ot, at) { + switch (nt) { + case dataViewTag: + if (tt.byteLength != et.byteLength || tt.byteOffset != et.byteOffset) return !1 + ;(tt = tt.buffer), (et = et.buffer) + case arrayBufferTag: + return !(tt.byteLength != et.byteLength || !ot(new Uint8Array$1(tt), new Uint8Array$1(et))) + case boolTag$1: + case dateTag: + case numberTag: + return eq$1(+tt, +et) + case errorTag: + return tt.name == et.name && tt.message == et.message + case regexpTag: + case stringTag: + return tt == et + '' + case mapTag: + var st = mapToArray + case setTag: + var lt = rt & COMPARE_PARTIAL_FLAG$4 + if ((st || (st = setToArray$2), tt.size != et.size && !lt)) return !1 + var ct = at.get(tt) + if (ct) return ct == et + ;(rt |= COMPARE_UNORDERED_FLAG$2), at.set(tt, et) + var ut = equalArrays$1(st(tt), st(et), rt, it, ot, at) + return at.delete(tt), ut + case symbolTag: + if (symbolValueOf) return symbolValueOf.call(tt) == symbolValueOf.call(et) + } + return !1 + } + var _equalByTag = equalByTag$1, + getAllKeys = _getAllKeys, + COMPARE_PARTIAL_FLAG$3 = 1, + objectProto$2 = Object.prototype, + hasOwnProperty$3 = objectProto$2.hasOwnProperty + function equalObjects$1(tt, et, nt, rt, it, ot) { + var at = nt & COMPARE_PARTIAL_FLAG$3, + st = getAllKeys(tt), + lt = st.length, + ct = getAllKeys(et), + ut = ct.length + if (lt != ut && !at) return !1 + for (var ht = lt; ht--; ) { + var dt = st[ht] + if (!(at ? dt in et : hasOwnProperty$3.call(et, dt))) return !1 + } + var pt = ot.get(tt), + mt = ot.get(et) + if (pt && mt) return pt == et && mt == tt + var gt = !0 + ot.set(tt, et), ot.set(et, tt) + for (var yt = at; ++ht < lt; ) { + dt = st[ht] + var bt = tt[dt], + vt = et[dt] + if (rt) var xt = at ? rt(vt, bt, dt, et, tt, ot) : rt(bt, vt, dt, tt, et, ot) + if (!(xt === void 0 ? bt === vt || it(bt, vt, nt, rt, ot) : xt)) { + gt = !1 + break + } + yt || (yt = dt == 'constructor') + } + if (gt && !yt) { + var kt = tt.constructor, + St = et.constructor + kt != St && + 'constructor' in tt && + 'constructor' in et && + !(typeof kt == 'function' && kt instanceof kt && typeof St == 'function' && St instanceof St) && + (gt = !1) + } + return ot.delete(tt), ot.delete(et), gt + } + var _equalObjects = equalObjects$1, + Stack$1 = _Stack, + equalArrays = _equalArrays, + equalByTag = _equalByTag, + equalObjects = _equalObjects, + getTag$1 = _getTag, + isArray$8 = isArray_1, + isBuffer = isBufferExports, + isTypedArray$1 = isTypedArray_1, + COMPARE_PARTIAL_FLAG$2 = 1, + argsTag = '[object Arguments]', + arrayTag = '[object Array]', + objectTag$1 = '[object Object]', + objectProto$1 = Object.prototype, + hasOwnProperty$2 = objectProto$1.hasOwnProperty + function baseIsEqualDeep$1(tt, et, nt, rt, it, ot) { + var at = isArray$8(tt), + st = isArray$8(et), + lt = at ? arrayTag : getTag$1(tt), + ct = st ? arrayTag : getTag$1(et) + ;(lt = lt == argsTag ? objectTag$1 : lt), (ct = ct == argsTag ? objectTag$1 : ct) + var ut = lt == objectTag$1, + ht = ct == objectTag$1, + dt = lt == ct + if (dt && isBuffer(tt)) { + if (!isBuffer(et)) return !1 + ;(at = !0), (ut = !1) + } + if (dt && !ut) + return ( + ot || (ot = new Stack$1()), + at || isTypedArray$1(tt) ? equalArrays(tt, et, nt, rt, it, ot) : equalByTag(tt, et, lt, nt, rt, it, ot) + ) + if (!(nt & COMPARE_PARTIAL_FLAG$2)) { + var pt = ut && hasOwnProperty$2.call(tt, '__wrapped__'), + mt = ht && hasOwnProperty$2.call(et, '__wrapped__') + if (pt || mt) { + var gt = pt ? tt.value() : tt, + yt = mt ? et.value() : et + return ot || (ot = new Stack$1()), it(gt, yt, nt, rt, ot) + } + } + return dt ? (ot || (ot = new Stack$1()), equalObjects(tt, et, nt, rt, it, ot)) : !1 + } + var _baseIsEqualDeep = baseIsEqualDeep$1, + baseIsEqualDeep = _baseIsEqualDeep, + isObjectLike$2 = isObjectLike_1 + function baseIsEqual$3(tt, et, nt, rt, it) { + return tt === et + ? !0 + : tt == null || et == null || (!isObjectLike$2(tt) && !isObjectLike$2(et)) + ? tt !== tt && et !== et + : baseIsEqualDeep(tt, et, nt, rt, baseIsEqual$3, it) + } + var _baseIsEqual = baseIsEqual$3, + Stack = _Stack, + baseIsEqual$2 = _baseIsEqual, + COMPARE_PARTIAL_FLAG$1 = 1, + COMPARE_UNORDERED_FLAG$1 = 2 + function baseIsMatch$1(tt, et, nt, rt) { + var it = nt.length, + ot = it, + at = !rt + if (tt == null) return !ot + for (tt = Object(tt); it--; ) { + var st = nt[it] + if (at && st[2] ? st[1] !== tt[st[0]] : !(st[0] in tt)) return !1 + } + for (; ++it < ot; ) { + st = nt[it] + var lt = st[0], + ct = tt[lt], + ut = st[1] + if (at && st[2]) { + if (ct === void 0 && !(lt in tt)) return !1 + } else { + var ht = new Stack() + if (rt) var dt = rt(ct, ut, lt, tt, et, ht) + if (!(dt === void 0 ? baseIsEqual$2(ut, ct, COMPARE_PARTIAL_FLAG$1 | COMPARE_UNORDERED_FLAG$1, rt, ht) : dt)) + return !1 + } + } + return !0 + } + var _baseIsMatch = baseIsMatch$1, + isObject$5 = isObject_1 + function isStrictComparable$2(tt) { + return tt === tt && !isObject$5(tt) + } + var _isStrictComparable = isStrictComparable$2, + isStrictComparable$1 = _isStrictComparable, + keys$3 = keys_1 + function getMatchData$1(tt) { + for (var et = keys$3(tt), nt = et.length; nt--; ) { + var rt = et[nt], + it = tt[rt] + et[nt] = [rt, it, isStrictComparable$1(it)] + } + return et + } + var _getMatchData = getMatchData$1 + function matchesStrictComparable$2(tt, et) { + return function (nt) { + return nt == null ? !1 : nt[tt] === et && (et !== void 0 || tt in Object(nt)) + } + } + var _matchesStrictComparable = matchesStrictComparable$2, + baseIsMatch = _baseIsMatch, + getMatchData = _getMatchData, + matchesStrictComparable$1 = _matchesStrictComparable + function baseMatches$1(tt) { + var et = getMatchData(tt) + return et.length == 1 && et[0][2] + ? matchesStrictComparable$1(et[0][0], et[0][1]) + : function (nt) { + return nt === tt || baseIsMatch(nt, tt, et) + } + } + var _baseMatches = baseMatches$1 + function baseHasIn$1(tt, et) { + return tt != null && et in Object(tt) + } + var _baseHasIn = baseHasIn$1, + castPath = _castPath, + isArguments$1 = isArguments_1, + isArray$7 = isArray_1, + isIndex$1 = _isIndex, + isLength = isLength_1, + toKey$2 = _toKey + function hasPath$1(tt, et, nt) { + et = castPath(et, tt) + for (var rt = -1, it = et.length, ot = !1; ++rt < it; ) { + var at = toKey$2(et[rt]) + if (!(ot = tt != null && nt(tt, at))) break + tt = tt[at] + } + return ot || ++rt != it + ? ot + : ((it = tt == null ? 0 : tt.length), + !!it && isLength(it) && isIndex$1(at, it) && (isArray$7(tt) || isArguments$1(tt))) + } + var _hasPath = hasPath$1, + baseHasIn = _baseHasIn, + hasPath = _hasPath + function hasIn$1(tt, et) { + return tt != null && hasPath(tt, et, baseHasIn) + } + var hasIn_1 = hasIn$1, + baseIsEqual$1 = _baseIsEqual, + get$1 = get_1, + hasIn = hasIn_1, + isKey$1 = _isKey, + isStrictComparable = _isStrictComparable, + matchesStrictComparable = _matchesStrictComparable, + toKey$1 = _toKey, + COMPARE_PARTIAL_FLAG = 1, + COMPARE_UNORDERED_FLAG = 2 + function baseMatchesProperty$1(tt, et) { + return isKey$1(tt) && isStrictComparable(et) + ? matchesStrictComparable(toKey$1(tt), et) + : function (nt) { + var rt = get$1(nt, tt) + return rt === void 0 && rt === et + ? hasIn(nt, tt) + : baseIsEqual$1(et, rt, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG) + } + } + var _baseMatchesProperty = baseMatchesProperty$1 + function identity$d(tt) { + return tt + } + var identity_1 = identity$d + function baseProperty$1(tt) { + return function (et) { + return et == null ? void 0 : et[tt] + } + } + var _baseProperty = baseProperty$1, + baseGet$1 = _baseGet + function basePropertyDeep$1(tt) { + return function (et) { + return baseGet$1(et, tt) + } + } + var _basePropertyDeep = basePropertyDeep$1, + baseProperty = _baseProperty, + basePropertyDeep = _basePropertyDeep, + isKey = _isKey, + toKey = _toKey + function property$1(tt) { + return isKey(tt) ? baseProperty(toKey(tt)) : basePropertyDeep(tt) + } + var property_1 = property$1, + baseMatches = _baseMatches, + baseMatchesProperty = _baseMatchesProperty, + identity$c = identity_1, + isArray$6 = isArray_1, + property = property_1 + function baseIteratee$8(tt) { + return typeof tt == 'function' + ? tt + : tt == null + ? identity$c + : typeof tt == 'object' + ? isArray$6(tt) + ? baseMatchesProperty(tt[0], tt[1]) + : baseMatches(tt) + : property(tt) + } + var _baseIteratee = baseIteratee$8 + function baseFindIndex$2(tt, et, nt, rt) { + for (var it = tt.length, ot = nt + (rt ? 1 : -1); rt ? ot-- : ++ot < it; ) if (et(tt[ot], ot, tt)) return ot + return -1 + } + var _baseFindIndex = baseFindIndex$2 + function baseIsNaN$1(tt) { + return tt !== tt + } + var _baseIsNaN = baseIsNaN$1 + function strictIndexOf$1(tt, et, nt) { + for (var rt = nt - 1, it = tt.length; ++rt < it; ) if (tt[rt] === et) return rt + return -1 + } + var _strictIndexOf = strictIndexOf$1, + baseFindIndex$1 = _baseFindIndex, + baseIsNaN = _baseIsNaN, + strictIndexOf = _strictIndexOf + function baseIndexOf$1(tt, et, nt) { + return et === et ? strictIndexOf(tt, et, nt) : baseFindIndex$1(tt, baseIsNaN, nt) + } + var _baseIndexOf = baseIndexOf$1, + baseIndexOf = _baseIndexOf + function arrayIncludes$1(tt, et) { + var nt = tt == null ? 0 : tt.length + return !!nt && baseIndexOf(tt, et, 0) > -1 + } + var _arrayIncludes = arrayIncludes$1 + function arrayIncludesWith$1(tt, et, nt) { + for (var rt = -1, it = tt == null ? 0 : tt.length; ++rt < it; ) if (nt(et, tt[rt])) return !0 + return !1 + } + var _arrayIncludesWith = arrayIncludesWith$1 + function noop$4() {} + var noop_1 = noop$4, + Set$1 = _Set, + noop$3 = noop_1, + setToArray$1 = _setToArray, + INFINITY$1 = 1 / 0, + createSet$1 = + Set$1 && 1 / setToArray$1(new Set$1([, -0]))[1] == INFINITY$1 + ? function (tt) { + return new Set$1(tt) + } + : noop$3, + _createSet = createSet$1, + SetCache = _SetCache, + arrayIncludes = _arrayIncludes, + arrayIncludesWith = _arrayIncludesWith, + cacheHas = _cacheHas, + createSet = _createSet, + setToArray = _setToArray, + LARGE_ARRAY_SIZE = 200 + function baseUniq$1(tt, et, nt) { + var rt = -1, + it = arrayIncludes, + ot = tt.length, + at = !0, + st = [], + lt = st + if (nt) (at = !1), (it = arrayIncludesWith) + else if (ot >= LARGE_ARRAY_SIZE) { + var ct = et ? null : createSet(tt) + if (ct) return setToArray(ct) + ;(at = !1), (it = cacheHas), (lt = new SetCache()) + } else lt = et ? [] : st + e: for (; ++rt < ot; ) { + var ut = tt[rt], + ht = et ? et(ut) : ut + if (((ut = nt || ut !== 0 ? ut : 0), at && ht === ht)) { + for (var dt = lt.length; dt--; ) if (lt[dt] === ht) continue e + et && lt.push(ht), st.push(ut) + } else it(lt, ht, nt) || (lt !== st && lt.push(ht), st.push(ut)) + } + return st + } + var _baseUniq = baseUniq$1, + baseIteratee$7 = _baseIteratee, + baseUniq = _baseUniq + function uniqBy(tt, et) { + return tt && tt.length ? baseUniq(tt, baseIteratee$7(et)) : [] + } + var uniqBy_1 = uniqBy + const _uniqBy = getDefaultExportFromCjs(uniqBy_1) + var warn = function (et, nt) { + for (var rt = arguments.length, it = new Array(rt > 2 ? rt - 2 : 0), ot = 2; ot < rt; ot++) + it[ot - 2] = arguments[ot] + } + function baseSlice$1(tt, et, nt) { + var rt = -1, + it = tt.length + et < 0 && (et = -et > it ? 0 : it + et), + (nt = nt > it ? it : nt), + nt < 0 && (nt += it), + (it = et > nt ? 0 : (nt - et) >>> 0), + (et >>>= 0) + for (var ot = Array(it); ++rt < it; ) ot[rt] = tt[rt + et] + return ot + } + var _baseSlice = baseSlice$1, + baseSlice = _baseSlice + function castSlice$1(tt, et, nt) { + var rt = tt.length + return (nt = nt === void 0 ? rt : nt), !et && nt >= rt ? tt : baseSlice(tt, et, nt) + } + var _castSlice = castSlice$1, + rsAstralRange$1 = '\\ud800-\\udfff', + rsComboMarksRange$1 = '\\u0300-\\u036f', + reComboHalfMarksRange$1 = '\\ufe20-\\ufe2f', + rsComboSymbolsRange$1 = '\\u20d0-\\u20ff', + rsComboRange$1 = rsComboMarksRange$1 + reComboHalfMarksRange$1 + rsComboSymbolsRange$1, + rsVarRange$1 = '\\ufe0e\\ufe0f', + rsZWJ$1 = '\\u200d', + reHasUnicode = RegExp('[' + rsZWJ$1 + rsAstralRange$1 + rsComboRange$1 + rsVarRange$1 + ']') + function hasUnicode$2(tt) { + return reHasUnicode.test(tt) + } + var _hasUnicode = hasUnicode$2 + function asciiToArray$1(tt) { + return tt.split('') + } + var _asciiToArray = asciiToArray$1, + rsAstralRange = '\\ud800-\\udfff', + rsComboMarksRange = '\\u0300-\\u036f', + reComboHalfMarksRange = '\\ufe20-\\ufe2f', + rsComboSymbolsRange = '\\u20d0-\\u20ff', + rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange, + rsVarRange = '\\ufe0e\\ufe0f', + rsAstral = '[' + rsAstralRange + ']', + rsCombo = '[' + rsComboRange + ']', + rsFitz = '\\ud83c[\\udffb-\\udfff]', + rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')', + rsNonAstral = '[^' + rsAstralRange + ']', + rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}', + rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]', + rsZWJ = '\\u200d', + reOptMod = rsModifier + '?', + rsOptVar = '[' + rsVarRange + ']?', + rsOptJoin = + '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*', + rsSeq = rsOptVar + reOptMod + rsOptJoin, + rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')', + reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g') + function unicodeToArray$1(tt) { + return tt.match(reUnicode) || [] + } + var _unicodeToArray = unicodeToArray$1, + asciiToArray = _asciiToArray, + hasUnicode$1 = _hasUnicode, + unicodeToArray = _unicodeToArray + function stringToArray$1(tt) { + return hasUnicode$1(tt) ? unicodeToArray(tt) : asciiToArray(tt) + } + var _stringToArray = stringToArray$1, + castSlice = _castSlice, + hasUnicode = _hasUnicode, + stringToArray = _stringToArray, + toString$2 = toString_1 + function createCaseFirst$1(tt) { + return function (et) { + et = toString$2(et) + var nt = hasUnicode(et) ? stringToArray(et) : void 0, + rt = nt ? nt[0] : et.charAt(0), + it = nt ? castSlice(nt, 1).join('') : et.slice(1) + return rt[tt]() + it + } + } + var _createCaseFirst = createCaseFirst$1, + createCaseFirst = _createCaseFirst, + upperFirst = createCaseFirst('toUpperCase'), + upperFirst_1 = upperFirst + const _upperFirst = getDefaultExportFromCjs(upperFirst_1) + function constant$6(tt) { + return function () { + return tt + } + } + const cos = Math.cos, + sin = Math.sin, + sqrt$1 = Math.sqrt, + pi$2 = Math.PI, + tau$1 = 2 * pi$2, + pi$1 = Math.PI, + tau = 2 * pi$1, + epsilon = 1e-6, + tauEpsilon = tau - epsilon + function append(tt) { + this._ += tt[0] + for (let et = 1, nt = tt.length; et < nt; ++et) this._ += arguments[et] + tt[et] + } + function appendRound(tt) { + let et = Math.floor(tt) + if (!(et >= 0)) throw new Error(`invalid digits: ${tt}`) + if (et > 15) return append + const nt = 10 ** et + return function (rt) { + this._ += rt[0] + for (let it = 1, ot = rt.length; it < ot; ++it) this._ += Math.round(arguments[it] * nt) / nt + rt[it] + } + } + class Path { + constructor(et) { + ;(this._x0 = this._y0 = this._x1 = this._y1 = null), + (this._ = ''), + (this._append = et == null ? append : appendRound(et)) + } + moveTo(et, nt) { + this._append`M${(this._x0 = this._x1 = +et)},${(this._y0 = this._y1 = +nt)}` + } + closePath() { + this._x1 !== null && ((this._x1 = this._x0), (this._y1 = this._y0), this._append`Z`) + } + lineTo(et, nt) { + this._append`L${(this._x1 = +et)},${(this._y1 = +nt)}` + } + quadraticCurveTo(et, nt, rt, it) { + this._append`Q${+et},${+nt},${(this._x1 = +rt)},${(this._y1 = +it)}` + } + bezierCurveTo(et, nt, rt, it, ot, at) { + this._append`C${+et},${+nt},${+rt},${+it},${(this._x1 = +ot)},${(this._y1 = +at)}` + } + arcTo(et, nt, rt, it, ot) { + if (((et = +et), (nt = +nt), (rt = +rt), (it = +it), (ot = +ot), ot < 0)) + throw new Error(`negative radius: ${ot}`) + let at = this._x1, + st = this._y1, + lt = rt - et, + ct = it - nt, + ut = at - et, + ht = st - nt, + dt = ut * ut + ht * ht + if (this._x1 === null) this._append`M${(this._x1 = et)},${(this._y1 = nt)}` + else if (dt > epsilon) + if (!(Math.abs(ht * lt - ct * ut) > epsilon) || !ot) this._append`L${(this._x1 = et)},${(this._y1 = nt)}` + else { + let pt = rt - at, + mt = it - st, + gt = lt * lt + ct * ct, + yt = pt * pt + mt * mt, + bt = Math.sqrt(gt), + vt = Math.sqrt(dt), + xt = ot * Math.tan((pi$1 - Math.acos((gt + dt - yt) / (2 * bt * vt))) / 2), + kt = xt / vt, + St = xt / bt + Math.abs(kt - 1) > epsilon && this._append`L${et + kt * ut},${nt + kt * ht}`, + this._append`A${ot},${ot},0,0,${+(ht * pt > ut * mt)},${(this._x1 = et + St * lt)},${(this._y1 = + nt + St * ct)}` + } + } + arc(et, nt, rt, it, ot, at) { + if (((et = +et), (nt = +nt), (rt = +rt), (at = !!at), rt < 0)) throw new Error(`negative radius: ${rt}`) + let st = rt * Math.cos(it), + lt = rt * Math.sin(it), + ct = et + st, + ut = nt + lt, + ht = 1 ^ at, + dt = at ? it - ot : ot - it + this._x1 === null + ? this._append`M${ct},${ut}` + : (Math.abs(this._x1 - ct) > epsilon || Math.abs(this._y1 - ut) > epsilon) && this._append`L${ct},${ut}`, + rt && + (dt < 0 && (dt = (dt % tau) + tau), + dt > tauEpsilon + ? this._append`A${rt},${rt},0,1,${ht},${et - st},${nt - lt}A${rt},${rt},0,1,${ht},${(this._x1 = + ct)},${(this._y1 = ut)}` + : dt > epsilon && + this._append`A${rt},${rt},0,${+(dt >= pi$1)},${ht},${(this._x1 = et + rt * Math.cos(ot))},${(this._y1 = + nt + rt * Math.sin(ot))}`) + } + rect(et, nt, rt, it) { + this._append`M${(this._x0 = this._x1 = +et)},${(this._y0 = this._y1 = +nt)}h${(rt = +rt)}v${+it}h${-rt}Z` + } + toString() { + return this._ + } + } + function withPath(tt) { + let et = 3 + return ( + (tt.digits = function (nt) { + if (!arguments.length) return et + if (nt == null) et = null + else { + const rt = Math.floor(nt) + if (!(rt >= 0)) throw new RangeError(`invalid digits: ${nt}`) + et = rt + } + return tt + }), + () => new Path(et) + ) + } + function array$2(tt) { + return typeof tt == 'object' && 'length' in tt ? tt : Array.from(tt) + } + function Linear(tt) { + this._context = tt + } + Linear.prototype = { + areaStart: function () { + this._line = 0 + }, + areaEnd: function () { + this._line = NaN + }, + lineStart: function () { + this._point = 0 + }, + lineEnd: function () { + ;(this._line || (this._line !== 0 && this._point === 1)) && this._context.closePath(), + (this._line = 1 - this._line) + }, + point: function (tt, et) { + switch (((tt = +tt), (et = +et), this._point)) { + case 0: + ;(this._point = 1), this._line ? this._context.lineTo(tt, et) : this._context.moveTo(tt, et) + break + case 1: + this._point = 2 + default: + this._context.lineTo(tt, et) + break + } + }, + } + function curveLinear(tt) { + return new Linear(tt) + } + function x(tt) { + return tt[0] + } + function y(tt) { + return tt[1] + } + function shapeLine(tt, et) { + var nt = constant$6(!0), + rt = null, + it = curveLinear, + ot = null, + at = withPath(st) + ;(tt = typeof tt == 'function' ? tt : tt === void 0 ? x : constant$6(tt)), + (et = typeof et == 'function' ? et : et === void 0 ? y : constant$6(et)) + function st(lt) { + var ct, + ut = (lt = array$2(lt)).length, + ht, + dt = !1, + pt + for (rt == null && (ot = it((pt = at()))), ct = 0; ct <= ut; ++ct) + !(ct < ut && nt((ht = lt[ct]), ct, lt)) === dt && ((dt = !dt) ? ot.lineStart() : ot.lineEnd()), + dt && ot.point(+tt(ht, ct, lt), +et(ht, ct, lt)) + if (pt) return (ot = null), pt + '' || null + } + return ( + (st.x = function (lt) { + return arguments.length ? ((tt = typeof lt == 'function' ? lt : constant$6(+lt)), st) : tt + }), + (st.y = function (lt) { + return arguments.length ? ((et = typeof lt == 'function' ? lt : constant$6(+lt)), st) : et + }), + (st.defined = function (lt) { + return arguments.length ? ((nt = typeof lt == 'function' ? lt : constant$6(!!lt)), st) : nt + }), + (st.curve = function (lt) { + return arguments.length ? ((it = lt), rt != null && (ot = it(rt)), st) : it + }), + (st.context = function (lt) { + return arguments.length ? (lt == null ? (rt = ot = null) : (ot = it((rt = lt))), st) : rt + }), + st + ) + } + function shapeArea(tt, et, nt) { + var rt = null, + it = constant$6(!0), + ot = null, + at = curveLinear, + st = null, + lt = withPath(ct) + ;(tt = typeof tt == 'function' ? tt : tt === void 0 ? x : constant$6(+tt)), + (et = typeof et == 'function' ? et : constant$6(et === void 0 ? 0 : +et)), + (nt = typeof nt == 'function' ? nt : nt === void 0 ? y : constant$6(+nt)) + function ct(ht) { + var dt, + pt, + mt, + gt = (ht = array$2(ht)).length, + yt, + bt = !1, + vt, + xt = new Array(gt), + kt = new Array(gt) + for (ot == null && (st = at((vt = lt()))), dt = 0; dt <= gt; ++dt) { + if (!(dt < gt && it((yt = ht[dt]), dt, ht)) === bt) + if ((bt = !bt)) (pt = dt), st.areaStart(), st.lineStart() + else { + for (st.lineEnd(), st.lineStart(), mt = dt - 1; mt >= pt; --mt) st.point(xt[mt], kt[mt]) + st.lineEnd(), st.areaEnd() + } + bt && + ((xt[dt] = +tt(yt, dt, ht)), + (kt[dt] = +et(yt, dt, ht)), + st.point(rt ? +rt(yt, dt, ht) : xt[dt], nt ? +nt(yt, dt, ht) : kt[dt])) + } + if (vt) return (st = null), vt + '' || null + } + function ut() { + return shapeLine().defined(it).curve(at).context(ot) + } + return ( + (ct.x = function (ht) { + return arguments.length ? ((tt = typeof ht == 'function' ? ht : constant$6(+ht)), (rt = null), ct) : tt + }), + (ct.x0 = function (ht) { + return arguments.length ? ((tt = typeof ht == 'function' ? ht : constant$6(+ht)), ct) : tt + }), + (ct.x1 = function (ht) { + return arguments.length ? ((rt = ht == null ? null : typeof ht == 'function' ? ht : constant$6(+ht)), ct) : rt + }), + (ct.y = function (ht) { + return arguments.length ? ((et = typeof ht == 'function' ? ht : constant$6(+ht)), (nt = null), ct) : et + }), + (ct.y0 = function (ht) { + return arguments.length ? ((et = typeof ht == 'function' ? ht : constant$6(+ht)), ct) : et + }), + (ct.y1 = function (ht) { + return arguments.length ? ((nt = ht == null ? null : typeof ht == 'function' ? ht : constant$6(+ht)), ct) : nt + }), + (ct.lineX0 = ct.lineY0 = + function () { + return ut().x(tt).y(et) + }), + (ct.lineY1 = function () { + return ut().x(tt).y(nt) + }), + (ct.lineX1 = function () { + return ut().x(rt).y(et) + }), + (ct.defined = function (ht) { + return arguments.length ? ((it = typeof ht == 'function' ? ht : constant$6(!!ht)), ct) : it + }), + (ct.curve = function (ht) { + return arguments.length ? ((at = ht), ot != null && (st = at(ot)), ct) : at + }), + (ct.context = function (ht) { + return arguments.length ? (ht == null ? (ot = st = null) : (st = at((ot = ht))), ct) : ot + }), + ct + ) + } + class Bump { + constructor(et, nt) { + ;(this._context = et), (this._x = nt) + } + areaStart() { + this._line = 0 + } + areaEnd() { + this._line = NaN + } + lineStart() { + this._point = 0 + } + lineEnd() { + ;(this._line || (this._line !== 0 && this._point === 1)) && this._context.closePath(), + (this._line = 1 - this._line) + } + point(et, nt) { + switch (((et = +et), (nt = +nt), this._point)) { + case 0: { + ;(this._point = 1), this._line ? this._context.lineTo(et, nt) : this._context.moveTo(et, nt) + break + } + case 1: + this._point = 2 + default: { + this._x + ? this._context.bezierCurveTo((this._x0 = (this._x0 + et) / 2), this._y0, this._x0, nt, et, nt) + : this._context.bezierCurveTo(this._x0, (this._y0 = (this._y0 + nt) / 2), et, this._y0, et, nt) + break + } + } + ;(this._x0 = et), (this._y0 = nt) + } + } + function bumpX(tt) { + return new Bump(tt, !0) + } + function bumpY(tt) { + return new Bump(tt, !1) + } + const symbolCircle = { + draw(tt, et) { + const nt = sqrt$1(et / pi$2) + tt.moveTo(nt, 0), tt.arc(0, 0, nt, 0, tau$1) + }, + }, + symbolCross = { + draw(tt, et) { + const nt = sqrt$1(et / 5) / 2 + tt.moveTo(-3 * nt, -nt), + tt.lineTo(-nt, -nt), + tt.lineTo(-nt, -3 * nt), + tt.lineTo(nt, -3 * nt), + tt.lineTo(nt, -nt), + tt.lineTo(3 * nt, -nt), + tt.lineTo(3 * nt, nt), + tt.lineTo(nt, nt), + tt.lineTo(nt, 3 * nt), + tt.lineTo(-nt, 3 * nt), + tt.lineTo(-nt, nt), + tt.lineTo(-3 * nt, nt), + tt.closePath() + }, + }, + tan30 = sqrt$1(1 / 3), + tan30_2 = tan30 * 2, + symbolDiamond = { + draw(tt, et) { + const nt = sqrt$1(et / tan30_2), + rt = nt * tan30 + tt.moveTo(0, -nt), tt.lineTo(rt, 0), tt.lineTo(0, nt), tt.lineTo(-rt, 0), tt.closePath() + }, + }, + symbolSquare = { + draw(tt, et) { + const nt = sqrt$1(et), + rt = -nt / 2 + tt.rect(rt, rt, nt, nt) + }, + }, + ka = 0.8908130915292852, + kr = sin(pi$2 / 10) / sin((7 * pi$2) / 10), + kx = sin(tau$1 / 10) * kr, + ky = -cos(tau$1 / 10) * kr, + symbolStar = { + draw(tt, et) { + const nt = sqrt$1(et * ka), + rt = kx * nt, + it = ky * nt + tt.moveTo(0, -nt), tt.lineTo(rt, it) + for (let ot = 1; ot < 5; ++ot) { + const at = (tau$1 * ot) / 5, + st = cos(at), + lt = sin(at) + tt.lineTo(lt * nt, -st * nt), tt.lineTo(st * rt - lt * it, lt * rt + st * it) + } + tt.closePath() + }, + }, + sqrt3 = sqrt$1(3), + symbolTriangle = { + draw(tt, et) { + const nt = -sqrt$1(et / (sqrt3 * 3)) + tt.moveTo(0, nt * 2), tt.lineTo(-sqrt3 * nt, -nt), tt.lineTo(sqrt3 * nt, -nt), tt.closePath() + }, + }, + c = -0.5, + s = sqrt$1(3) / 2, + k = 1 / sqrt$1(12), + a = (k / 2 + 1) * 3, + symbolWye = { + draw(tt, et) { + const nt = sqrt$1(et / a), + rt = nt / 2, + it = nt * k, + ot = rt, + at = nt * k + nt, + st = -ot, + lt = at + tt.moveTo(rt, it), + tt.lineTo(ot, at), + tt.lineTo(st, lt), + tt.lineTo(c * rt - s * it, s * rt + c * it), + tt.lineTo(c * ot - s * at, s * ot + c * at), + tt.lineTo(c * st - s * lt, s * st + c * lt), + tt.lineTo(c * rt + s * it, c * it - s * rt), + tt.lineTo(c * ot + s * at, c * at - s * ot), + tt.lineTo(c * st + s * lt, c * lt - s * st), + tt.closePath() + }, + } + function Symbol$2(tt, et) { + let nt = null, + rt = withPath(it) + ;(tt = typeof tt == 'function' ? tt : constant$6(tt || symbolCircle)), + (et = typeof et == 'function' ? et : constant$6(et === void 0 ? 64 : +et)) + function it() { + let ot + if ((nt || (nt = ot = rt()), tt.apply(this, arguments).draw(nt, +et.apply(this, arguments)), ot)) + return (nt = null), ot + '' || null + } + return ( + (it.type = function (ot) { + return arguments.length ? ((tt = typeof ot == 'function' ? ot : constant$6(ot)), it) : tt + }), + (it.size = function (ot) { + return arguments.length ? ((et = typeof ot == 'function' ? ot : constant$6(+ot)), it) : et + }), + (it.context = function (ot) { + return arguments.length ? ((nt = ot ?? null), it) : nt + }), + it + ) + } + function noop$2() {} + function point$2(tt, et, nt) { + tt._context.bezierCurveTo( + (2 * tt._x0 + tt._x1) / 3, + (2 * tt._y0 + tt._y1) / 3, + (tt._x0 + 2 * tt._x1) / 3, + (tt._y0 + 2 * tt._y1) / 3, + (tt._x0 + 4 * tt._x1 + et) / 6, + (tt._y0 + 4 * tt._y1 + nt) / 6, + ) + } + function Basis(tt) { + this._context = tt + } + Basis.prototype = { + areaStart: function () { + this._line = 0 + }, + areaEnd: function () { + this._line = NaN + }, + lineStart: function () { + ;(this._x0 = this._x1 = this._y0 = this._y1 = NaN), (this._point = 0) + }, + lineEnd: function () { + switch (this._point) { + case 3: + point$2(this, this._x1, this._y1) + case 2: + this._context.lineTo(this._x1, this._y1) + break + } + ;(this._line || (this._line !== 0 && this._point === 1)) && this._context.closePath(), + (this._line = 1 - this._line) + }, + point: function (tt, et) { + switch (((tt = +tt), (et = +et), this._point)) { + case 0: + ;(this._point = 1), this._line ? this._context.lineTo(tt, et) : this._context.moveTo(tt, et) + break + case 1: + this._point = 2 + break + case 2: + ;(this._point = 3), this._context.lineTo((5 * this._x0 + this._x1) / 6, (5 * this._y0 + this._y1) / 6) + default: + point$2(this, tt, et) + break + } + ;(this._x0 = this._x1), (this._x1 = tt), (this._y0 = this._y1), (this._y1 = et) + }, + } + function curveBasis(tt) { + return new Basis(tt) + } + function BasisClosed(tt) { + this._context = tt + } + BasisClosed.prototype = { + areaStart: noop$2, + areaEnd: noop$2, + lineStart: function () { + ;(this._x0 = + this._x1 = + this._x2 = + this._x3 = + this._x4 = + this._y0 = + this._y1 = + this._y2 = + this._y3 = + this._y4 = + NaN), + (this._point = 0) + }, + lineEnd: function () { + switch (this._point) { + case 1: { + this._context.moveTo(this._x2, this._y2), this._context.closePath() + break + } + case 2: { + this._context.moveTo((this._x2 + 2 * this._x3) / 3, (this._y2 + 2 * this._y3) / 3), + this._context.lineTo((this._x3 + 2 * this._x2) / 3, (this._y3 + 2 * this._y2) / 3), + this._context.closePath() + break + } + case 3: { + this.point(this._x2, this._y2), this.point(this._x3, this._y3), this.point(this._x4, this._y4) + break + } + } + }, + point: function (tt, et) { + switch (((tt = +tt), (et = +et), this._point)) { + case 0: + ;(this._point = 1), (this._x2 = tt), (this._y2 = et) + break + case 1: + ;(this._point = 2), (this._x3 = tt), (this._y3 = et) + break + case 2: + ;(this._point = 3), + (this._x4 = tt), + (this._y4 = et), + this._context.moveTo((this._x0 + 4 * this._x1 + tt) / 6, (this._y0 + 4 * this._y1 + et) / 6) + break + default: + point$2(this, tt, et) + break + } + ;(this._x0 = this._x1), (this._x1 = tt), (this._y0 = this._y1), (this._y1 = et) + }, + } + function curveBasisClosed(tt) { + return new BasisClosed(tt) + } + function BasisOpen(tt) { + this._context = tt + } + BasisOpen.prototype = { + areaStart: function () { + this._line = 0 + }, + areaEnd: function () { + this._line = NaN + }, + lineStart: function () { + ;(this._x0 = this._x1 = this._y0 = this._y1 = NaN), (this._point = 0) + }, + lineEnd: function () { + ;(this._line || (this._line !== 0 && this._point === 3)) && this._context.closePath(), + (this._line = 1 - this._line) + }, + point: function (tt, et) { + switch (((tt = +tt), (et = +et), this._point)) { + case 0: + this._point = 1 + break + case 1: + this._point = 2 + break + case 2: + this._point = 3 + var nt = (this._x0 + 4 * this._x1 + tt) / 6, + rt = (this._y0 + 4 * this._y1 + et) / 6 + this._line ? this._context.lineTo(nt, rt) : this._context.moveTo(nt, rt) + break + case 3: + this._point = 4 + default: + point$2(this, tt, et) + break + } + ;(this._x0 = this._x1), (this._x1 = tt), (this._y0 = this._y1), (this._y1 = et) + }, + } + function curveBasisOpen(tt) { + return new BasisOpen(tt) + } + function LinearClosed(tt) { + this._context = tt + } + LinearClosed.prototype = { + areaStart: noop$2, + areaEnd: noop$2, + lineStart: function () { + this._point = 0 + }, + lineEnd: function () { + this._point && this._context.closePath() + }, + point: function (tt, et) { + ;(tt = +tt), + (et = +et), + this._point ? this._context.lineTo(tt, et) : ((this._point = 1), this._context.moveTo(tt, et)) + }, + } + function curveLinearClosed(tt) { + return new LinearClosed(tt) + } + function sign(tt) { + return tt < 0 ? -1 : 1 + } + function slope3(tt, et, nt) { + var rt = tt._x1 - tt._x0, + it = et - tt._x1, + ot = (tt._y1 - tt._y0) / (rt || (it < 0 && -0)), + at = (nt - tt._y1) / (it || (rt < 0 && -0)), + st = (ot * it + at * rt) / (rt + it) + return (sign(ot) + sign(at)) * Math.min(Math.abs(ot), Math.abs(at), 0.5 * Math.abs(st)) || 0 + } + function slope2(tt, et) { + var nt = tt._x1 - tt._x0 + return nt ? ((3 * (tt._y1 - tt._y0)) / nt - et) / 2 : et + } + function point$1(tt, et, nt) { + var rt = tt._x0, + it = tt._y0, + ot = tt._x1, + at = tt._y1, + st = (ot - rt) / 3 + tt._context.bezierCurveTo(rt + st, it + st * et, ot - st, at - st * nt, ot, at) + } + function MonotoneX(tt) { + this._context = tt + } + MonotoneX.prototype = { + areaStart: function () { + this._line = 0 + }, + areaEnd: function () { + this._line = NaN + }, + lineStart: function () { + ;(this._x0 = this._x1 = this._y0 = this._y1 = this._t0 = NaN), (this._point = 0) + }, + lineEnd: function () { + switch (this._point) { + case 2: + this._context.lineTo(this._x1, this._y1) + break + case 3: + point$1(this, this._t0, slope2(this, this._t0)) + break + } + ;(this._line || (this._line !== 0 && this._point === 1)) && this._context.closePath(), + (this._line = 1 - this._line) + }, + point: function (tt, et) { + var nt = NaN + if (((tt = +tt), (et = +et), !(tt === this._x1 && et === this._y1))) { + switch (this._point) { + case 0: + ;(this._point = 1), this._line ? this._context.lineTo(tt, et) : this._context.moveTo(tt, et) + break + case 1: + this._point = 2 + break + case 2: + ;(this._point = 3), point$1(this, slope2(this, (nt = slope3(this, tt, et))), nt) + break + default: + point$1(this, this._t0, (nt = slope3(this, tt, et))) + break + } + ;(this._x0 = this._x1), (this._x1 = tt), (this._y0 = this._y1), (this._y1 = et), (this._t0 = nt) + } + }, + } + function MonotoneY(tt) { + this._context = new ReflectContext(tt) + } + ;(MonotoneY.prototype = Object.create(MonotoneX.prototype)).point = function (tt, et) { + MonotoneX.prototype.point.call(this, et, tt) + } + function ReflectContext(tt) { + this._context = tt + } + ReflectContext.prototype = { + moveTo: function (tt, et) { + this._context.moveTo(et, tt) + }, + closePath: function () { + this._context.closePath() + }, + lineTo: function (tt, et) { + this._context.lineTo(et, tt) + }, + bezierCurveTo: function (tt, et, nt, rt, it, ot) { + this._context.bezierCurveTo(et, tt, rt, nt, ot, it) + }, + } + function monotoneX(tt) { + return new MonotoneX(tt) + } + function monotoneY(tt) { + return new MonotoneY(tt) + } + function Natural(tt) { + this._context = tt + } + Natural.prototype = { + areaStart: function () { + this._line = 0 + }, + areaEnd: function () { + this._line = NaN + }, + lineStart: function () { + ;(this._x = []), (this._y = []) + }, + lineEnd: function () { + var tt = this._x, + et = this._y, + nt = tt.length + if (nt) + if ((this._line ? this._context.lineTo(tt[0], et[0]) : this._context.moveTo(tt[0], et[0]), nt === 2)) + this._context.lineTo(tt[1], et[1]) + else + for (var rt = controlPoints(tt), it = controlPoints(et), ot = 0, at = 1; at < nt; ++ot, ++at) + this._context.bezierCurveTo(rt[0][ot], it[0][ot], rt[1][ot], it[1][ot], tt[at], et[at]) + ;(this._line || (this._line !== 0 && nt === 1)) && this._context.closePath(), + (this._line = 1 - this._line), + (this._x = this._y = null) + }, + point: function (tt, et) { + this._x.push(+tt), this._y.push(+et) + }, + } + function controlPoints(tt) { + var et, + nt = tt.length - 1, + rt, + it = new Array(nt), + ot = new Array(nt), + at = new Array(nt) + for (it[0] = 0, ot[0] = 2, at[0] = tt[0] + 2 * tt[1], et = 1; et < nt - 1; ++et) + (it[et] = 1), (ot[et] = 4), (at[et] = 4 * tt[et] + 2 * tt[et + 1]) + for (it[nt - 1] = 2, ot[nt - 1] = 7, at[nt - 1] = 8 * tt[nt - 1] + tt[nt], et = 1; et < nt; ++et) + (rt = it[et] / ot[et - 1]), (ot[et] -= rt), (at[et] -= rt * at[et - 1]) + for (it[nt - 1] = at[nt - 1] / ot[nt - 1], et = nt - 2; et >= 0; --et) it[et] = (at[et] - it[et + 1]) / ot[et] + for (ot[nt - 1] = (tt[nt] + it[nt - 1]) / 2, et = 0; et < nt - 1; ++et) ot[et] = 2 * tt[et + 1] - it[et + 1] + return [it, ot] + } + function curveNatural(tt) { + return new Natural(tt) + } + function Step(tt, et) { + ;(this._context = tt), (this._t = et) + } + Step.prototype = { + areaStart: function () { + this._line = 0 + }, + areaEnd: function () { + this._line = NaN + }, + lineStart: function () { + ;(this._x = this._y = NaN), (this._point = 0) + }, + lineEnd: function () { + 0 < this._t && this._t < 1 && this._point === 2 && this._context.lineTo(this._x, this._y), + (this._line || (this._line !== 0 && this._point === 1)) && this._context.closePath(), + this._line >= 0 && ((this._t = 1 - this._t), (this._line = 1 - this._line)) + }, + point: function (tt, et) { + switch (((tt = +tt), (et = +et), this._point)) { + case 0: + ;(this._point = 1), this._line ? this._context.lineTo(tt, et) : this._context.moveTo(tt, et) + break + case 1: + this._point = 2 + default: { + if (this._t <= 0) this._context.lineTo(this._x, et), this._context.lineTo(tt, et) + else { + var nt = this._x * (1 - this._t) + tt * this._t + this._context.lineTo(nt, this._y), this._context.lineTo(nt, et) + } + break + } + } + ;(this._x = tt), (this._y = et) + }, + } + function curveStep(tt) { + return new Step(tt, 0.5) + } + function stepBefore(tt) { + return new Step(tt, 0) + } + function stepAfter(tt) { + return new Step(tt, 1) + } + function stackOffsetNone(tt, et) { + if ((at = tt.length) > 1) + for (var nt = 1, rt, it, ot = tt[et[0]], at, st = ot.length; nt < at; ++nt) + for (it = ot, ot = tt[et[nt]], rt = 0; rt < st; ++rt) + ot[rt][1] += ot[rt][0] = isNaN(it[rt][1]) ? it[rt][0] : it[rt][1] + } + function stackOrderNone(tt) { + for (var et = tt.length, nt = new Array(et); --et >= 0; ) nt[et] = et + return nt + } + function stackValue(tt, et) { + return tt[et] + } + function stackSeries(tt) { + const et = [] + return (et.key = tt), et + } + function shapeStack() { + var tt = constant$6([]), + et = stackOrderNone, + nt = stackOffsetNone, + rt = stackValue + function it(ot) { + var at = Array.from(tt.apply(this, arguments), stackSeries), + st, + lt = at.length, + ct = -1, + ut + for (const ht of ot) for (st = 0, ++ct; st < lt; ++st) (at[st][ct] = [0, +rt(ht, at[st].key, ct, ot)]).data = ht + for (st = 0, ut = array$2(et(at)); st < lt; ++st) at[ut[st]].index = st + return nt(at, ut), at + } + return ( + (it.keys = function (ot) { + return arguments.length ? ((tt = typeof ot == 'function' ? ot : constant$6(Array.from(ot))), it) : tt + }), + (it.value = function (ot) { + return arguments.length ? ((rt = typeof ot == 'function' ? ot : constant$6(+ot)), it) : rt + }), + (it.order = function (ot) { + return arguments.length + ? ((et = ot == null ? stackOrderNone : typeof ot == 'function' ? ot : constant$6(Array.from(ot))), it) + : et + }), + (it.offset = function (ot) { + return arguments.length ? ((nt = ot ?? stackOffsetNone), it) : nt + }), + it + ) + } + function stackOffsetExpand(tt, et) { + if ((rt = tt.length) > 0) { + for (var nt, rt, it = 0, ot = tt[0].length, at; it < ot; ++it) { + for (at = nt = 0; nt < rt; ++nt) at += tt[nt][it][1] || 0 + if (at) for (nt = 0; nt < rt; ++nt) tt[nt][it][1] /= at + } + stackOffsetNone(tt, et) + } + } + function stackOffsetSilhouette(tt, et) { + if ((it = tt.length) > 0) { + for (var nt = 0, rt = tt[et[0]], it, ot = rt.length; nt < ot; ++nt) { + for (var at = 0, st = 0; at < it; ++at) st += tt[at][nt][1] || 0 + rt[nt][1] += rt[nt][0] = -st / 2 + } + stackOffsetNone(tt, et) + } + } + function stackOffsetWiggle(tt, et) { + if (!(!((at = tt.length) > 0) || !((ot = (it = tt[et[0]]).length) > 0))) { + for (var nt = 0, rt = 1, it, ot, at; rt < ot; ++rt) { + for (var st = 0, lt = 0, ct = 0; st < at; ++st) { + for ( + var ut = tt[et[st]], ht = ut[rt][1] || 0, dt = ut[rt - 1][1] || 0, pt = (ht - dt) / 2, mt = 0; + mt < st; + ++mt + ) { + var gt = tt[et[mt]], + yt = gt[rt][1] || 0, + bt = gt[rt - 1][1] || 0 + pt += yt - bt + } + ;(lt += ht), (ct += pt * ht) + } + ;(it[rt - 1][1] += it[rt - 1][0] = nt), lt && (nt -= ct / lt) + } + ;(it[rt - 1][1] += it[rt - 1][0] = nt), stackOffsetNone(tt, et) + } + } + function _typeof$C(tt) { + '@babel/helpers - typeof' + return ( + (_typeof$C = + typeof Symbol == 'function' && typeof Symbol.iterator == 'symbol' + ? function (et) { + return typeof et + } + : function (et) { + return et && typeof Symbol == 'function' && et.constructor === Symbol && et !== Symbol.prototype + ? 'symbol' + : typeof et + }), + _typeof$C(tt) + ) + } + var _excluded$f = ['type', 'size', 'sizeType'] + function _extends$p() { + return ( + (_extends$p = Object.assign + ? Object.assign.bind() + : function (tt) { + for (var et = 1; et < arguments.length; et++) { + var nt = arguments[et] + for (var rt in nt) Object.prototype.hasOwnProperty.call(nt, rt) && (tt[rt] = nt[rt]) + } + return tt + }), + _extends$p.apply(this, arguments) + ) + } + function ownKeys$z(tt, et) { + var nt = Object.keys(tt) + if (Object.getOwnPropertySymbols) { + var rt = Object.getOwnPropertySymbols(tt) + et && + (rt = rt.filter(function (it) { + return Object.getOwnPropertyDescriptor(tt, it).enumerable + })), + nt.push.apply(nt, rt) + } + return nt + } + function _objectSpread$z(tt) { + for (var et = 1; et < arguments.length; et++) { + var nt = arguments[et] != null ? arguments[et] : {} + et % 2 + ? ownKeys$z(Object(nt), !0).forEach(function (rt) { + _defineProperty$A(tt, rt, nt[rt]) + }) + : Object.getOwnPropertyDescriptors + ? Object.defineProperties(tt, Object.getOwnPropertyDescriptors(nt)) + : ownKeys$z(Object(nt)).forEach(function (rt) { + Object.defineProperty(tt, rt, Object.getOwnPropertyDescriptor(nt, rt)) + }) + } + return tt + } + function _defineProperty$A(tt, et, nt) { + return ( + (et = _toPropertyKey$A(et)), + et in tt + ? Object.defineProperty(tt, et, { value: nt, enumerable: !0, configurable: !0, writable: !0 }) + : (tt[et] = nt), + tt + ) + } + function _toPropertyKey$A(tt) { + var et = _toPrimitive$A(tt, 'string') + return _typeof$C(et) === 'symbol' ? et : String(et) + } + function _toPrimitive$A(tt, et) { + if (_typeof$C(tt) !== 'object' || tt === null) return tt + var nt = tt[Symbol.toPrimitive] + if (nt !== void 0) { + var rt = nt.call(tt, et || 'default') + if (_typeof$C(rt) !== 'object') return rt + throw new TypeError('@@toPrimitive must return a primitive value.') + } + return (et === 'string' ? String : Number)(tt) + } + function _objectWithoutProperties$f(tt, et) { + if (tt == null) return {} + var nt = _objectWithoutPropertiesLoose$f(tt, et), + rt, + it + if (Object.getOwnPropertySymbols) { + var ot = Object.getOwnPropertySymbols(tt) + for (it = 0; it < ot.length; it++) + (rt = ot[it]), !(et.indexOf(rt) >= 0) && Object.prototype.propertyIsEnumerable.call(tt, rt) && (nt[rt] = tt[rt]) + } + return nt + } + function _objectWithoutPropertiesLoose$f(tt, et) { + if (tt == null) return {} + var nt = {}, + rt = Object.keys(tt), + it, + ot + for (ot = 0; ot < rt.length; ot++) (it = rt[ot]), !(et.indexOf(it) >= 0) && (nt[it] = tt[it]) + return nt + } + var symbolFactories = { + symbolCircle, + symbolCross, + symbolDiamond, + symbolSquare, + symbolStar, + symbolTriangle, + symbolWye, + }, + RADIAN$1 = Math.PI / 180, + getSymbolFactory = function (et) { + var nt = 'symbol'.concat(_upperFirst(et)) + return symbolFactories[nt] || symbolCircle + }, + calculateAreaSize = function (et, nt, rt) { + if (nt === 'area') return et + switch (rt) { + case 'cross': + return (5 * et * et) / 9 + case 'diamond': + return (0.5 * et * et) / Math.sqrt(3) + case 'square': + return et * et + case 'star': { + var it = 18 * RADIAN$1 + return 1.25 * et * et * (Math.tan(it) - Math.tan(it * 2) * Math.pow(Math.tan(it), 2)) + } + case 'triangle': + return (Math.sqrt(3) * et * et) / 4 + case 'wye': + return ((21 - 10 * Math.sqrt(3)) * et * et) / 8 + default: + return (Math.PI * et * et) / 4 + } + }, + registerSymbol = function (et, nt) { + symbolFactories['symbol'.concat(_upperFirst(et))] = nt + }, + Symbols = function (et) { + var nt = et.type, + rt = nt === void 0 ? 'circle' : nt, + it = et.size, + ot = it === void 0 ? 64 : it, + at = et.sizeType, + st = at === void 0 ? 'area' : at, + lt = _objectWithoutProperties$f(et, _excluded$f), + ct = _objectSpread$z(_objectSpread$z({}, lt), {}, { type: rt, size: ot, sizeType: st }), + ut = function () { + var yt = getSymbolFactory(rt), + bt = Symbol$2().type(yt).size(calculateAreaSize(ot, st, rt)) + return bt() + }, + ht = ct.className, + dt = ct.cx, + pt = ct.cy, + mt = filterProps(ct, !0) + return dt === +dt && pt === +pt && ot === +ot + ? React$1.createElement( + 'path', + _extends$p({}, mt, { + className: classNames('recharts-symbols', ht), + transform: 'translate('.concat(dt, ', ').concat(pt, ')'), + d: ut(), + }), + ) + : null + } + Symbols.registerSymbol = registerSymbol + function _typeof$B(tt) { + '@babel/helpers - typeof' + return ( + (_typeof$B = + typeof Symbol == 'function' && typeof Symbol.iterator == 'symbol' + ? function (et) { + return typeof et + } + : function (et) { + return et && typeof Symbol == 'function' && et.constructor === Symbol && et !== Symbol.prototype + ? 'symbol' + : typeof et + }), + _typeof$B(tt) + ) + } + function _extends$o() { + return ( + (_extends$o = Object.assign + ? Object.assign.bind() + : function (tt) { + for (var et = 1; et < arguments.length; et++) { + var nt = arguments[et] + for (var rt in nt) Object.prototype.hasOwnProperty.call(nt, rt) && (tt[rt] = nt[rt]) + } + return tt + }), + _extends$o.apply(this, arguments) + ) + } + function ownKeys$y(tt, et) { + var nt = Object.keys(tt) + if (Object.getOwnPropertySymbols) { + var rt = Object.getOwnPropertySymbols(tt) + et && + (rt = rt.filter(function (it) { + return Object.getOwnPropertyDescriptor(tt, it).enumerable + })), + nt.push.apply(nt, rt) + } + return nt + } + function _objectSpread$y(tt) { + for (var et = 1; et < arguments.length; et++) { + var nt = arguments[et] != null ? arguments[et] : {} + et % 2 + ? ownKeys$y(Object(nt), !0).forEach(function (rt) { + _defineProperty$z(tt, rt, nt[rt]) + }) + : Object.getOwnPropertyDescriptors + ? Object.defineProperties(tt, Object.getOwnPropertyDescriptors(nt)) + : ownKeys$y(Object(nt)).forEach(function (rt) { + Object.defineProperty(tt, rt, Object.getOwnPropertyDescriptor(nt, rt)) + }) + } + return tt + } + function _classCallCheck$e(tt, et) { + if (!(tt instanceof et)) throw new TypeError('Cannot call a class as a function') + } + function _defineProperties$e(tt, et) { + for (var nt = 0; nt < et.length; nt++) { + var rt = et[nt] + ;(rt.enumerable = rt.enumerable || !1), + (rt.configurable = !0), + 'value' in rt && (rt.writable = !0), + Object.defineProperty(tt, _toPropertyKey$z(rt.key), rt) + } + } + function _createClass$e(tt, et, nt) { + return ( + et && _defineProperties$e(tt.prototype, et), + nt && _defineProperties$e(tt, nt), + Object.defineProperty(tt, 'prototype', { writable: !1 }), + tt + ) + } + function _inherits$b(tt, et) { + if (typeof et != 'function' && et !== null) + throw new TypeError('Super expression must either be null or a function') + ;(tt.prototype = Object.create(et && et.prototype, { constructor: { value: tt, writable: !0, configurable: !0 } })), + Object.defineProperty(tt, 'prototype', { writable: !1 }), + et && _setPrototypeOf$b(tt, et) + } + function _setPrototypeOf$b(tt, et) { + return ( + (_setPrototypeOf$b = Object.setPrototypeOf + ? Object.setPrototypeOf.bind() + : function (rt, it) { + return (rt.__proto__ = it), rt + }), + _setPrototypeOf$b(tt, et) + ) + } + function _createSuper$b(tt) { + var et = _isNativeReflectConstruct$b() + return function () { + var rt = _getPrototypeOf$b(tt), + it + if (et) { + var ot = _getPrototypeOf$b(this).constructor + it = Reflect.construct(rt, arguments, ot) + } else it = rt.apply(this, arguments) + return _possibleConstructorReturn$b(this, it) + } + } + function _possibleConstructorReturn$b(tt, et) { + if (et && (_typeof$B(et) === 'object' || typeof et == 'function')) return et + if (et !== void 0) throw new TypeError('Derived constructors may only return object or undefined') + return _assertThisInitialized$b(tt) + } + function _assertThisInitialized$b(tt) { + if (tt === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called") + return tt + } + function _isNativeReflectConstruct$b() { + if (typeof Reflect > 'u' || !Reflect.construct || Reflect.construct.sham) return !1 + if (typeof Proxy == 'function') return !0 + try { + return Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})), !0 + } catch { + return !1 + } + } + function _getPrototypeOf$b(tt) { + return ( + (_getPrototypeOf$b = Object.setPrototypeOf + ? Object.getPrototypeOf.bind() + : function (nt) { + return nt.__proto__ || Object.getPrototypeOf(nt) + }), + _getPrototypeOf$b(tt) + ) + } + function _defineProperty$z(tt, et, nt) { + return ( + (et = _toPropertyKey$z(et)), + et in tt + ? Object.defineProperty(tt, et, { value: nt, enumerable: !0, configurable: !0, writable: !0 }) + : (tt[et] = nt), + tt + ) + } + function _toPropertyKey$z(tt) { + var et = _toPrimitive$z(tt, 'string') + return _typeof$B(et) === 'symbol' ? et : String(et) + } + function _toPrimitive$z(tt, et) { + if (_typeof$B(tt) !== 'object' || tt === null) return tt + var nt = tt[Symbol.toPrimitive] + if (nt !== void 0) { + var rt = nt.call(tt, et || 'default') + if (_typeof$B(rt) !== 'object') return rt + throw new TypeError('@@toPrimitive must return a primitive value.') + } + return (et === 'string' ? String : Number)(tt) + } + var SIZE = 32, + DefaultLegendContent = (function (tt) { + _inherits$b(nt, tt) + var et = _createSuper$b(nt) + function nt() { + return _classCallCheck$e(this, nt), et.apply(this, arguments) + } + return ( + _createClass$e(nt, [ + { + key: 'renderIcon', + value: function (it) { + var ot = this.props.inactiveColor, + at = SIZE / 2, + st = SIZE / 6, + lt = SIZE / 3, + ct = it.inactive ? ot : it.color + if (it.type === 'plainline') + return React$1.createElement('line', { + strokeWidth: 4, + fill: 'none', + stroke: ct, + strokeDasharray: it.payload.strokeDasharray, + x1: 0, + y1: at, + x2: SIZE, + y2: at, + className: 'recharts-legend-icon', + }) + if (it.type === 'line') + return React$1.createElement('path', { + strokeWidth: 4, + fill: 'none', + stroke: ct, + d: 'M0,' + .concat(at, 'h') + .concat( + lt, + ` + A`, + ) + .concat(st, ',') + .concat(st, ',0,1,1,') + .concat(2 * lt, ',') + .concat( + at, + ` + H`, + ) + .concat(SIZE, 'M') + .concat(2 * lt, ',') + .concat( + at, + ` + A`, + ) + .concat(st, ',') + .concat(st, ',0,1,1,') + .concat(lt, ',') + .concat(at), + className: 'recharts-legend-icon', + }) + if (it.type === 'rect') + return React$1.createElement('path', { + stroke: 'none', + fill: ct, + d: 'M0,' + .concat(SIZE / 8, 'h') + .concat(SIZE, 'v') + .concat((SIZE * 3) / 4, 'h') + .concat(-SIZE, 'z'), + className: 'recharts-legend-icon', + }) + if (React$1.isValidElement(it.legendIcon)) { + var ut = _objectSpread$y({}, it) + return delete ut.legendIcon, React$1.cloneElement(it.legendIcon, ut) + } + return React$1.createElement(Symbols, { + fill: ct, + cx: at, + cy: at, + size: SIZE, + sizeType: 'diameter', + type: it.type, + }) + }, + }, + { + key: 'renderItems', + value: function () { + var it = this, + ot = this.props, + at = ot.payload, + st = ot.iconSize, + lt = ot.layout, + ct = ot.formatter, + ut = ot.inactiveColor, + ht = { x: 0, y: 0, width: SIZE, height: SIZE }, + dt = { display: lt === 'horizontal' ? 'inline-block' : 'block', marginRight: 10 }, + pt = { display: 'inline-block', verticalAlign: 'middle', marginRight: 4 } + return at.map(function (mt, gt) { + var yt, + bt = mt.formatter || ct, + vt = classNames( + ((yt = { 'recharts-legend-item': !0 }), + _defineProperty$z(yt, 'legend-item-'.concat(gt), !0), + _defineProperty$z(yt, 'inactive', mt.inactive), + yt), + ) + if (mt.type === 'none') return null + var xt = _isFunction$1(mt.value) ? null : mt.value + warn( + !_isFunction$1(mt.value), + `The name property is also required when using a function for the dataKey of a chart's cartesian components. Ex: `, + ) + var kt = mt.inactive ? ut : mt.color + return React$1.createElement( + 'li', + _extends$o( + { className: vt, style: dt, key: 'legend-item-'.concat(gt) }, + adaptEventsOfChild(it.props, mt, gt), + ), + React$1.createElement(Surface, { width: st, height: st, viewBox: ht, style: pt }, it.renderIcon(mt)), + React$1.createElement( + 'span', + { className: 'recharts-legend-item-text', style: { color: kt } }, + bt ? bt(xt, mt, gt) : xt, + ), + ) + }) + }, + }, + { + key: 'render', + value: function () { + var it = this.props, + ot = it.payload, + at = it.layout, + st = it.align + if (!ot || !ot.length) return null + var lt = { padding: 0, margin: 0, textAlign: at === 'horizontal' ? st : 'left' } + return React$1.createElement( + 'ul', + { className: 'recharts-default-legend', style: lt }, + this.renderItems(), + ) + }, + }, + ]), + nt + ) + })(reactExports.PureComponent) + _defineProperty$z(DefaultLegendContent, 'displayName', 'Legend') + _defineProperty$z(DefaultLegendContent, 'defaultProps', { + iconSize: 14, + layout: 'horizontal', + align: 'center', + verticalAlign: 'middle', + inactiveColor: '#ccc', + }) + function _typeof$A(tt) { + '@babel/helpers - typeof' + return ( + (_typeof$A = + typeof Symbol == 'function' && typeof Symbol.iterator == 'symbol' + ? function (et) { + return typeof et + } + : function (et) { + return et && typeof Symbol == 'function' && et.constructor === Symbol && et !== Symbol.prototype + ? 'symbol' + : typeof et + }), + _typeof$A(tt) + ) + } + var _excluded$e = ['ref'] + function ownKeys$x(tt, et) { + var nt = Object.keys(tt) + if (Object.getOwnPropertySymbols) { + var rt = Object.getOwnPropertySymbols(tt) + et && + (rt = rt.filter(function (it) { + return Object.getOwnPropertyDescriptor(tt, it).enumerable + })), + nt.push.apply(nt, rt) + } + return nt + } + function _objectSpread$x(tt) { + for (var et = 1; et < arguments.length; et++) { + var nt = arguments[et] != null ? arguments[et] : {} + et % 2 + ? ownKeys$x(Object(nt), !0).forEach(function (rt) { + _defineProperty$y(tt, rt, nt[rt]) + }) + : Object.getOwnPropertyDescriptors + ? Object.defineProperties(tt, Object.getOwnPropertyDescriptors(nt)) + : ownKeys$x(Object(nt)).forEach(function (rt) { + Object.defineProperty(tt, rt, Object.getOwnPropertyDescriptor(nt, rt)) + }) + } + return tt + } + function _classCallCheck$d(tt, et) { + if (!(tt instanceof et)) throw new TypeError('Cannot call a class as a function') + } + function _defineProperties$d(tt, et) { + for (var nt = 0; nt < et.length; nt++) { + var rt = et[nt] + ;(rt.enumerable = rt.enumerable || !1), + (rt.configurable = !0), + 'value' in rt && (rt.writable = !0), + Object.defineProperty(tt, _toPropertyKey$y(rt.key), rt) + } + } + function _createClass$d(tt, et, nt) { + return ( + et && _defineProperties$d(tt.prototype, et), + nt && _defineProperties$d(tt, nt), + Object.defineProperty(tt, 'prototype', { writable: !1 }), + tt + ) + } + function _inherits$a(tt, et) { + if (typeof et != 'function' && et !== null) + throw new TypeError('Super expression must either be null or a function') + ;(tt.prototype = Object.create(et && et.prototype, { constructor: { value: tt, writable: !0, configurable: !0 } })), + Object.defineProperty(tt, 'prototype', { writable: !1 }), + et && _setPrototypeOf$a(tt, et) + } + function _setPrototypeOf$a(tt, et) { + return ( + (_setPrototypeOf$a = Object.setPrototypeOf + ? Object.setPrototypeOf.bind() + : function (rt, it) { + return (rt.__proto__ = it), rt + }), + _setPrototypeOf$a(tt, et) + ) + } + function _createSuper$a(tt) { + var et = _isNativeReflectConstruct$a() + return function () { + var rt = _getPrototypeOf$a(tt), + it + if (et) { + var ot = _getPrototypeOf$a(this).constructor + it = Reflect.construct(rt, arguments, ot) + } else it = rt.apply(this, arguments) + return _possibleConstructorReturn$a(this, it) + } + } + function _possibleConstructorReturn$a(tt, et) { + if (et && (_typeof$A(et) === 'object' || typeof et == 'function')) return et + if (et !== void 0) throw new TypeError('Derived constructors may only return object or undefined') + return _assertThisInitialized$a(tt) + } + function _assertThisInitialized$a(tt) { + if (tt === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called") + return tt + } + function _isNativeReflectConstruct$a() { + if (typeof Reflect > 'u' || !Reflect.construct || Reflect.construct.sham) return !1 + if (typeof Proxy == 'function') return !0 + try { + return Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})), !0 + } catch { + return !1 + } + } + function _getPrototypeOf$a(tt) { + return ( + (_getPrototypeOf$a = Object.setPrototypeOf + ? Object.getPrototypeOf.bind() + : function (nt) { + return nt.__proto__ || Object.getPrototypeOf(nt) + }), + _getPrototypeOf$a(tt) + ) + } + function _defineProperty$y(tt, et, nt) { + return ( + (et = _toPropertyKey$y(et)), + et in tt + ? Object.defineProperty(tt, et, { value: nt, enumerable: !0, configurable: !0, writable: !0 }) + : (tt[et] = nt), + tt + ) + } + function _toPropertyKey$y(tt) { + var et = _toPrimitive$y(tt, 'string') + return _typeof$A(et) === 'symbol' ? et : String(et) + } + function _toPrimitive$y(tt, et) { + if (_typeof$A(tt) !== 'object' || tt === null) return tt + var nt = tt[Symbol.toPrimitive] + if (nt !== void 0) { + var rt = nt.call(tt, et || 'default') + if (_typeof$A(rt) !== 'object') return rt + throw new TypeError('@@toPrimitive must return a primitive value.') + } + return (et === 'string' ? String : Number)(tt) + } + function _objectWithoutProperties$e(tt, et) { + if (tt == null) return {} + var nt = _objectWithoutPropertiesLoose$e(tt, et), + rt, + it + if (Object.getOwnPropertySymbols) { + var ot = Object.getOwnPropertySymbols(tt) + for (it = 0; it < ot.length; it++) + (rt = ot[it]), !(et.indexOf(rt) >= 0) && Object.prototype.propertyIsEnumerable.call(tt, rt) && (nt[rt] = tt[rt]) + } + return nt + } + function _objectWithoutPropertiesLoose$e(tt, et) { + if (tt == null) return {} + var nt = {}, + rt = Object.keys(tt), + it, + ot + for (ot = 0; ot < rt.length; ot++) (it = rt[ot]), !(et.indexOf(it) >= 0) && (nt[it] = tt[it]) + return nt + } + function defaultUniqBy$1(tt) { + return tt.value + } + function getUniqPayload$1(tt, et) { + return tt === !0 ? _uniqBy(et, defaultUniqBy$1) : _isFunction$1(tt) ? _uniqBy(et, tt) : et + } + function renderContent$1(tt, et) { + if (React$1.isValidElement(tt)) return React$1.cloneElement(tt, et) + if (_isFunction$1(tt)) return React$1.createElement(tt, et) + et.ref + var nt = _objectWithoutProperties$e(et, _excluded$e) + return React$1.createElement(DefaultLegendContent, nt) + } + var EPS$2 = 1, + Legend = (function (tt) { + _inherits$a(nt, tt) + var et = _createSuper$a(nt) + function nt() { + var rt + _classCallCheck$d(this, nt) + for (var it = arguments.length, ot = new Array(it), at = 0; at < it; at++) ot[at] = arguments[at] + return ( + (rt = et.call.apply(et, [this].concat(ot))), + _defineProperty$y(_assertThisInitialized$a(rt), 'state', { boxWidth: -1, boxHeight: -1 }), + rt + ) + } + return ( + _createClass$d( + nt, + [ + { + key: 'componentDidMount', + value: function () { + this.updateBBox() + }, + }, + { + key: 'componentDidUpdate', + value: function () { + this.updateBBox() + }, + }, + { + key: 'getBBox', + value: function () { + return this.wrapperNode && this.wrapperNode.getBoundingClientRect + ? this.wrapperNode.getBoundingClientRect() + : null + }, + }, + { + key: 'getBBoxSnapshot', + value: function () { + var it = this.state, + ot = it.boxWidth, + at = it.boxHeight + return ot >= 0 && at >= 0 ? { width: ot, height: at } : null + }, + }, + { + key: 'getDefaultPosition', + value: function (it) { + var ot = this.props, + at = ot.layout, + st = ot.align, + lt = ot.verticalAlign, + ct = ot.margin, + ut = ot.chartWidth, + ht = ot.chartHeight, + dt, + pt + if (!it || ((it.left === void 0 || it.left === null) && (it.right === void 0 || it.right === null))) + if (st === 'center' && at === 'vertical') { + var mt = this.getBBoxSnapshot() || { width: 0 } + dt = { left: ((ut || 0) - mt.width) / 2 } + } else dt = st === 'right' ? { right: (ct && ct.right) || 0 } : { left: (ct && ct.left) || 0 } + if (!it || ((it.top === void 0 || it.top === null) && (it.bottom === void 0 || it.bottom === null))) + if (lt === 'middle') { + var gt = this.getBBoxSnapshot() || { height: 0 } + pt = { top: ((ht || 0) - gt.height) / 2 } + } else pt = lt === 'bottom' ? { bottom: (ct && ct.bottom) || 0 } : { top: (ct && ct.top) || 0 } + return _objectSpread$x(_objectSpread$x({}, dt), pt) + }, + }, + { + key: 'updateBBox', + value: function () { + var it = this.state, + ot = it.boxWidth, + at = it.boxHeight, + st = this.props.onBBoxUpdate + if (this.wrapperNode && this.wrapperNode.getBoundingClientRect) { + var lt = this.wrapperNode.getBoundingClientRect() + ;(Math.abs(lt.width - ot) > EPS$2 || Math.abs(lt.height - at) > EPS$2) && + this.setState({ boxWidth: lt.width, boxHeight: lt.height }, function () { + st && st(lt) + }) + } else + (ot !== -1 || at !== -1) && + this.setState({ boxWidth: -1, boxHeight: -1 }, function () { + st && st(null) + }) + }, + }, + { + key: 'render', + value: function () { + var it = this, + ot = this.props, + at = ot.content, + st = ot.width, + lt = ot.height, + ct = ot.wrapperStyle, + ut = ot.payloadUniqBy, + ht = ot.payload, + dt = _objectSpread$x( + _objectSpread$x( + { position: 'absolute', width: st || 'auto', height: lt || 'auto' }, + this.getDefaultPosition(ct), + ), + ct, + ) + return React$1.createElement( + 'div', + { + className: 'recharts-legend-wrapper', + style: dt, + ref: function (mt) { + it.wrapperNode = mt + }, + }, + renderContent$1( + at, + _objectSpread$x(_objectSpread$x({}, this.props), {}, { payload: getUniqPayload$1(ut, ht) }), + ), + ) + }, + }, + ], + [ + { + key: 'getWithHeight', + value: function (it, ot) { + var at = it.props.layout + return at === 'vertical' && isNumber(it.props.height) + ? { height: it.props.height } + : at === 'horizontal' + ? { width: it.props.width || ot } + : null + }, + }, + ], + ), + nt + ) + })(reactExports.PureComponent) + _defineProperty$y(Legend, 'displayName', 'Legend') + _defineProperty$y(Legend, 'defaultProps', { + iconSize: 14, + layout: 'horizontal', + align: 'center', + verticalAlign: 'bottom', + }) + var getOwnPropertyNames = Object.getOwnPropertyNames, + getOwnPropertySymbols = Object.getOwnPropertySymbols, + hasOwnProperty$1 = Object.prototype.hasOwnProperty + function combineComparators(tt, et) { + return function (rt, it, ot) { + return tt(rt, it, ot) && et(rt, it, ot) + } + } + function createIsCircular(tt) { + return function (nt, rt, it) { + if (!nt || !rt || typeof nt != 'object' || typeof rt != 'object') return tt(nt, rt, it) + var ot = it.cache, + at = ot.get(nt), + st = ot.get(rt) + if (at && st) return at === rt && st === nt + ot.set(nt, rt), ot.set(rt, nt) + var lt = tt(nt, rt, it) + return ot.delete(nt), ot.delete(rt), lt + } + } + function getStrictProperties(tt) { + return getOwnPropertyNames(tt).concat(getOwnPropertySymbols(tt)) + } + var hasOwn = + Object.hasOwn || + function (tt, et) { + return hasOwnProperty$1.call(tt, et) + } + function sameValueZeroEqual(tt, et) { + return tt || et ? tt === et : tt === et || (tt !== tt && et !== et) + } + var OWNER = '_owner', + getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor, + keys$2 = Object.keys + function areArraysEqual(tt, et, nt) { + var rt = tt.length + if (et.length !== rt) return !1 + for (; rt-- > 0; ) if (!nt.equals(tt[rt], et[rt], rt, rt, tt, et, nt)) return !1 + return !0 + } + function areDatesEqual(tt, et) { + return sameValueZeroEqual(tt.getTime(), et.getTime()) + } + function areMapsEqual(tt, et, nt) { + if (tt.size !== et.size) return !1 + for (var rt = {}, it = tt.entries(), ot = 0, at, st; (at = it.next()) && !at.done; ) { + for (var lt = et.entries(), ct = !1, ut = 0; (st = lt.next()) && !st.done; ) { + var ht = at.value, + dt = ht[0], + pt = ht[1], + mt = st.value, + gt = mt[0], + yt = mt[1] + !ct && + !rt[ut] && + (ct = nt.equals(dt, gt, ot, ut, tt, et, nt) && nt.equals(pt, yt, dt, gt, tt, et, nt)) && + (rt[ut] = !0), + ut++ + } + if (!ct) return !1 + ot++ + } + return !0 + } + function areObjectsEqual(tt, et, nt) { + var rt = keys$2(tt), + it = rt.length + if (keys$2(et).length !== it) return !1 + for (var ot; it-- > 0; ) + if ( + ((ot = rt[it]), + (ot === OWNER && (tt.$$typeof || et.$$typeof) && tt.$$typeof !== et.$$typeof) || + !hasOwn(et, ot) || + !nt.equals(tt[ot], et[ot], ot, ot, tt, et, nt)) + ) + return !1 + return !0 + } + function areObjectsEqualStrict(tt, et, nt) { + var rt = getStrictProperties(tt), + it = rt.length + if (getStrictProperties(et).length !== it) return !1 + for (var ot, at, st; it-- > 0; ) + if ( + ((ot = rt[it]), + (ot === OWNER && (tt.$$typeof || et.$$typeof) && tt.$$typeof !== et.$$typeof) || + !hasOwn(et, ot) || + !nt.equals(tt[ot], et[ot], ot, ot, tt, et, nt) || + ((at = getOwnPropertyDescriptor(tt, ot)), + (st = getOwnPropertyDescriptor(et, ot)), + (at || st) && + (!at || + !st || + at.configurable !== st.configurable || + at.enumerable !== st.enumerable || + at.writable !== st.writable))) + ) + return !1 + return !0 + } + function arePrimitiveWrappersEqual(tt, et) { + return sameValueZeroEqual(tt.valueOf(), et.valueOf()) + } + function areRegExpsEqual(tt, et) { + return tt.source === et.source && tt.flags === et.flags + } + function areSetsEqual(tt, et, nt) { + if (tt.size !== et.size) return !1 + for (var rt = {}, it = tt.values(), ot, at; (ot = it.next()) && !ot.done; ) { + for (var st = et.values(), lt = !1, ct = 0; (at = st.next()) && !at.done; ) + !lt && !rt[ct] && (lt = nt.equals(ot.value, at.value, ot.value, at.value, tt, et, nt)) && (rt[ct] = !0), ct++ + if (!lt) return !1 + } + return !0 + } + function areTypedArraysEqual(tt, et) { + var nt = tt.length + if (et.length !== nt) return !1 + for (; nt-- > 0; ) if (tt[nt] !== et[nt]) return !1 + return !0 + } + var ARGUMENTS_TAG = '[object Arguments]', + BOOLEAN_TAG = '[object Boolean]', + DATE_TAG = '[object Date]', + MAP_TAG = '[object Map]', + NUMBER_TAG = '[object Number]', + OBJECT_TAG = '[object Object]', + REG_EXP_TAG = '[object RegExp]', + SET_TAG = '[object Set]', + STRING_TAG = '[object String]', + isArray$5 = Array.isArray, + isTypedArray = typeof ArrayBuffer == 'function' && ArrayBuffer.isView ? ArrayBuffer.isView : null, + assign = Object.assign, + getTag = Object.prototype.toString.call.bind(Object.prototype.toString) + function createEqualityComparator(tt) { + var et = tt.areArraysEqual, + nt = tt.areDatesEqual, + rt = tt.areMapsEqual, + it = tt.areObjectsEqual, + ot = tt.arePrimitiveWrappersEqual, + at = tt.areRegExpsEqual, + st = tt.areSetsEqual, + lt = tt.areTypedArraysEqual + return function (ut, ht, dt) { + if (ut === ht) return !0 + if (ut == null || ht == null || typeof ut != 'object' || typeof ht != 'object') return ut !== ut && ht !== ht + var pt = ut.constructor + if (pt !== ht.constructor) return !1 + if (pt === Object) return it(ut, ht, dt) + if (isArray$5(ut)) return et(ut, ht, dt) + if (isTypedArray != null && isTypedArray(ut)) return lt(ut, ht, dt) + if (pt === Date) return nt(ut, ht, dt) + if (pt === RegExp) return at(ut, ht, dt) + if (pt === Map) return rt(ut, ht, dt) + if (pt === Set) return st(ut, ht, dt) + var mt = getTag(ut) + return mt === DATE_TAG + ? nt(ut, ht, dt) + : mt === REG_EXP_TAG + ? at(ut, ht, dt) + : mt === MAP_TAG + ? rt(ut, ht, dt) + : mt === SET_TAG + ? st(ut, ht, dt) + : mt === OBJECT_TAG + ? typeof ut.then != 'function' && typeof ht.then != 'function' && it(ut, ht, dt) + : mt === ARGUMENTS_TAG + ? it(ut, ht, dt) + : mt === BOOLEAN_TAG || mt === NUMBER_TAG || mt === STRING_TAG + ? ot(ut, ht, dt) + : !1 + } + } + function createEqualityComparatorConfig(tt) { + var et = tt.circular, + nt = tt.createCustomConfig, + rt = tt.strict, + it = { + areArraysEqual: rt ? areObjectsEqualStrict : areArraysEqual, + areDatesEqual, + areMapsEqual: rt ? combineComparators(areMapsEqual, areObjectsEqualStrict) : areMapsEqual, + areObjectsEqual: rt ? areObjectsEqualStrict : areObjectsEqual, + arePrimitiveWrappersEqual, + areRegExpsEqual, + areSetsEqual: rt ? combineComparators(areSetsEqual, areObjectsEqualStrict) : areSetsEqual, + areTypedArraysEqual: rt ? areObjectsEqualStrict : areTypedArraysEqual, + } + if ((nt && (it = assign({}, it, nt(it))), et)) { + var ot = createIsCircular(it.areArraysEqual), + at = createIsCircular(it.areMapsEqual), + st = createIsCircular(it.areObjectsEqual), + lt = createIsCircular(it.areSetsEqual) + it = assign({}, it, { areArraysEqual: ot, areMapsEqual: at, areObjectsEqual: st, areSetsEqual: lt }) + } + return it + } + function createInternalEqualityComparator(tt) { + return function (et, nt, rt, it, ot, at, st) { + return tt(et, nt, st) + } + } + function createIsEqual(tt) { + var et = tt.circular, + nt = tt.comparator, + rt = tt.createState, + it = tt.equals, + ot = tt.strict + if (rt) + return function (lt, ct) { + var ut = rt(), + ht = ut.cache, + dt = ht === void 0 ? (et ? new WeakMap() : void 0) : ht, + pt = ut.meta + return nt(lt, ct, { cache: dt, equals: it, meta: pt, strict: ot }) + } + if (et) + return function (lt, ct) { + return nt(lt, ct, { cache: new WeakMap(), equals: it, meta: void 0, strict: ot }) + } + var at = { cache: void 0, equals: it, meta: void 0, strict: ot } + return function (lt, ct) { + return nt(lt, ct, at) + } + } + var deepEqual = createCustomEqual() + createCustomEqual({ strict: !0 }) + createCustomEqual({ circular: !0 }) + createCustomEqual({ circular: !0, strict: !0 }) + createCustomEqual({ + createInternalComparator: function () { + return sameValueZeroEqual + }, + }) + createCustomEqual({ + strict: !0, + createInternalComparator: function () { + return sameValueZeroEqual + }, + }) + createCustomEqual({ + circular: !0, + createInternalComparator: function () { + return sameValueZeroEqual + }, + }) + createCustomEqual({ + circular: !0, + createInternalComparator: function () { + return sameValueZeroEqual + }, + strict: !0, + }) + function createCustomEqual(tt) { + tt === void 0 && (tt = {}) + var et = tt.circular, + nt = et === void 0 ? !1 : et, + rt = tt.createInternalComparator, + it = tt.createState, + ot = tt.strict, + at = ot === void 0 ? !1 : ot, + st = createEqualityComparatorConfig(tt), + lt = createEqualityComparator(st), + ct = rt ? rt(lt) : createInternalEqualityComparator(lt) + return createIsEqual({ circular: nt, comparator: lt, createState: it, equals: ct, strict: at }) + } + function safeRequestAnimationFrame(tt) { + typeof requestAnimationFrame < 'u' && requestAnimationFrame(tt) + } + function setRafTimeout(tt) { + var et = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0, + nt = -1, + rt = function it(ot) { + nt < 0 && (nt = ot), ot - nt > et ? (tt(ot), (nt = -1)) : safeRequestAnimationFrame(it) + } + requestAnimationFrame(rt) + } + function _typeof$z(tt) { + '@babel/helpers - typeof' + return ( + (_typeof$z = + typeof Symbol == 'function' && typeof Symbol.iterator == 'symbol' + ? function (et) { + return typeof et + } + : function (et) { + return et && typeof Symbol == 'function' && et.constructor === Symbol && et !== Symbol.prototype + ? 'symbol' + : typeof et + }), + _typeof$z(tt) + ) + } + function _toArray(tt) { + return _arrayWithHoles$d(tt) || _iterableToArray$d(tt) || _unsupportedIterableToArray$n(tt) || _nonIterableRest$d() + } + function _nonIterableRest$d() { + throw new TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`) + } + function _unsupportedIterableToArray$n(tt, et) { + if (tt) { + if (typeof tt == 'string') return _arrayLikeToArray$n(tt, et) + var nt = Object.prototype.toString.call(tt).slice(8, -1) + if ((nt === 'Object' && tt.constructor && (nt = tt.constructor.name), nt === 'Map' || nt === 'Set')) + return Array.from(tt) + if (nt === 'Arguments' || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(nt)) return _arrayLikeToArray$n(tt, et) + } + } + function _arrayLikeToArray$n(tt, et) { + ;(et == null || et > tt.length) && (et = tt.length) + for (var nt = 0, rt = new Array(et); nt < et; nt++) rt[nt] = tt[nt] + return rt + } + function _iterableToArray$d(tt) { + if ((typeof Symbol < 'u' && tt[Symbol.iterator] != null) || tt['@@iterator'] != null) return Array.from(tt) + } + function _arrayWithHoles$d(tt) { + if (Array.isArray(tt)) return tt + } + function createAnimateManager() { + var tt = {}, + et = function () { + return null + }, + nt = !1, + rt = function it(ot) { + if (!nt) { + if (Array.isArray(ot)) { + if (!ot.length) return + var at = ot, + st = _toArray(at), + lt = st[0], + ct = st.slice(1) + if (typeof lt == 'number') { + setRafTimeout(it.bind(null, ct), lt) + return + } + it(lt), setRafTimeout(it.bind(null, ct)) + return + } + _typeof$z(ot) === 'object' && ((tt = ot), et(tt)), typeof ot == 'function' && ot() + } + } + return { + stop: function () { + nt = !0 + }, + start: function (ot) { + ;(nt = !1), rt(ot) + }, + subscribe: function (ot) { + return ( + (et = ot), + function () { + et = function () { + return null + } + } + ) + }, + } + } + function _typeof$y(tt) { + '@babel/helpers - typeof' + return ( + (_typeof$y = + typeof Symbol == 'function' && typeof Symbol.iterator == 'symbol' + ? function (et) { + return typeof et + } + : function (et) { + return et && typeof Symbol == 'function' && et.constructor === Symbol && et !== Symbol.prototype + ? 'symbol' + : typeof et + }), + _typeof$y(tt) + ) + } + function ownKeys$w(tt, et) { + var nt = Object.keys(tt) + if (Object.getOwnPropertySymbols) { + var rt = Object.getOwnPropertySymbols(tt) + et && + (rt = rt.filter(function (it) { + return Object.getOwnPropertyDescriptor(tt, it).enumerable + })), + nt.push.apply(nt, rt) + } + return nt + } + function _objectSpread$w(tt) { + for (var et = 1; et < arguments.length; et++) { + var nt = arguments[et] != null ? arguments[et] : {} + et % 2 + ? ownKeys$w(Object(nt), !0).forEach(function (rt) { + _defineProperty$x(tt, rt, nt[rt]) + }) + : Object.getOwnPropertyDescriptors + ? Object.defineProperties(tt, Object.getOwnPropertyDescriptors(nt)) + : ownKeys$w(Object(nt)).forEach(function (rt) { + Object.defineProperty(tt, rt, Object.getOwnPropertyDescriptor(nt, rt)) + }) + } + return tt + } + function _defineProperty$x(tt, et, nt) { + return ( + (et = _toPropertyKey$x(et)), + et in tt + ? Object.defineProperty(tt, et, { value: nt, enumerable: !0, configurable: !0, writable: !0 }) + : (tt[et] = nt), + tt + ) + } + function _toPropertyKey$x(tt) { + var et = _toPrimitive$x(tt, 'string') + return _typeof$y(et) === 'symbol' ? et : String(et) + } + function _toPrimitive$x(tt, et) { + if (_typeof$y(tt) !== 'object' || tt === null) return tt + var nt = tt[Symbol.toPrimitive] + if (nt !== void 0) { + var rt = nt.call(tt, et || 'default') + if (_typeof$y(rt) !== 'object') return rt + throw new TypeError('@@toPrimitive must return a primitive value.') + } + return (et === 'string' ? String : Number)(tt) + } + var PREFIX_LIST$1 = ['Webkit', 'Moz', 'O', 'ms'], + IN_LINE_PREFIX_LIST = ['-webkit-', '-moz-', '-o-', '-ms-'], + IN_COMPATIBLE_PROPERTY = ['transform', 'transformOrigin', 'transition'], + getIntersectionKeys = function (et, nt) { + return [Object.keys(et), Object.keys(nt)].reduce(function (rt, it) { + return rt.filter(function (ot) { + return it.includes(ot) + }) + }) + }, + identity$b = function (et) { + return et + }, + getDashCase = function (et) { + return et.replace(/([A-Z])/g, function (nt) { + return '-'.concat(nt.toLowerCase()) + }) + }, + generatePrefixStyle$1 = function (et, nt) { + if (IN_COMPATIBLE_PROPERTY.indexOf(et) === -1) return _defineProperty$x({}, et, Number.isNaN(nt) ? 0 : nt) + var rt = et === 'transition', + it = et.replace(/(\w)/, function (at) { + return at.toUpperCase() + }), + ot = nt + return PREFIX_LIST$1.reduce(function (at, st, lt) { + return ( + rt && (ot = nt.replace(/(transform|transform-origin)/gim, ''.concat(IN_LINE_PREFIX_LIST[lt], '$1'))), + _objectSpread$w(_objectSpread$w({}, at), {}, _defineProperty$x({}, st + it, ot)) + ) + }, {}) + }, + mapObject = function (et, nt) { + return Object.keys(nt).reduce(function (rt, it) { + return _objectSpread$w(_objectSpread$w({}, rt), {}, _defineProperty$x({}, it, et(it, nt[it]))) + }, {}) + }, + translateStyle = function (et) { + return Object.keys(et).reduce(function (nt, rt) { + return _objectSpread$w(_objectSpread$w({}, nt), generatePrefixStyle$1(rt, nt[rt])) + }, et) + }, + getTransitionVal = function (et, nt, rt) { + return et + .map(function (it) { + return ''.concat(getDashCase(it), ' ').concat(nt, 'ms ').concat(rt) + }) + .join(',') + } + function _slicedToArray$c(tt, et) { + return ( + _arrayWithHoles$c(tt) || + _iterableToArrayLimit$c(tt, et) || + _unsupportedIterableToArray$m(tt, et) || + _nonIterableRest$c() + ) + } + function _nonIterableRest$c() { + throw new TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`) + } + function _iterableToArrayLimit$c(tt, et) { + var nt = tt == null ? null : (typeof Symbol < 'u' && tt[Symbol.iterator]) || tt['@@iterator'] + if (nt != null) { + var rt, + it, + ot, + at, + st = [], + lt = !0, + ct = !1 + try { + if (((ot = (nt = nt.call(tt)).next), et === 0)) { + if (Object(nt) !== nt) return + lt = !1 + } else for (; !(lt = (rt = ot.call(nt)).done) && (st.push(rt.value), st.length !== et); lt = !0); + } catch (ut) { + ;(ct = !0), (it = ut) + } finally { + try { + if (!lt && nt.return != null && ((at = nt.return()), Object(at) !== at)) return + } finally { + if (ct) throw it + } + } + return st + } + } + function _arrayWithHoles$c(tt) { + if (Array.isArray(tt)) return tt + } + function _toConsumableArray$c(tt) { + return ( + _arrayWithoutHoles$c(tt) || _iterableToArray$c(tt) || _unsupportedIterableToArray$m(tt) || _nonIterableSpread$c() + ) + } + function _nonIterableSpread$c() { + throw new TypeError(`Invalid attempt to spread non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`) + } + function _unsupportedIterableToArray$m(tt, et) { + if (tt) { + if (typeof tt == 'string') return _arrayLikeToArray$m(tt, et) + var nt = Object.prototype.toString.call(tt).slice(8, -1) + if ((nt === 'Object' && tt.constructor && (nt = tt.constructor.name), nt === 'Map' || nt === 'Set')) + return Array.from(tt) + if (nt === 'Arguments' || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(nt)) return _arrayLikeToArray$m(tt, et) + } + } + function _iterableToArray$c(tt) { + if ((typeof Symbol < 'u' && tt[Symbol.iterator] != null) || tt['@@iterator'] != null) return Array.from(tt) + } + function _arrayWithoutHoles$c(tt) { + if (Array.isArray(tt)) return _arrayLikeToArray$m(tt) + } + function _arrayLikeToArray$m(tt, et) { + ;(et == null || et > tt.length) && (et = tt.length) + for (var nt = 0, rt = new Array(et); nt < et; nt++) rt[nt] = tt[nt] + return rt + } + var ACCURACY = 1e-4, + cubicBezierFactor = function (et, nt) { + return [0, 3 * et, 3 * nt - 6 * et, 3 * et - 3 * nt + 1] + }, + multyTime = function (et, nt) { + return et + .map(function (rt, it) { + return rt * Math.pow(nt, it) + }) + .reduce(function (rt, it) { + return rt + it + }) + }, + cubicBezier = function (et, nt) { + return function (rt) { + var it = cubicBezierFactor(et, nt) + return multyTime(it, rt) + } + }, + derivativeCubicBezier = function (et, nt) { + return function (rt) { + var it = cubicBezierFactor(et, nt), + ot = [].concat( + _toConsumableArray$c( + it + .map(function (at, st) { + return at * st + }) + .slice(1), + ), + [0], + ) + return multyTime(ot, rt) + } + }, + configBezier = function () { + for (var et = arguments.length, nt = new Array(et), rt = 0; rt < et; rt++) nt[rt] = arguments[rt] + var it = nt[0], + ot = nt[1], + at = nt[2], + st = nt[3] + if (nt.length === 1) + switch (nt[0]) { + case 'linear': + ;(it = 0), (ot = 0), (at = 1), (st = 1) + break + case 'ease': + ;(it = 0.25), (ot = 0.1), (at = 0.25), (st = 1) + break + case 'ease-in': + ;(it = 0.42), (ot = 0), (at = 1), (st = 1) + break + case 'ease-out': + ;(it = 0.42), (ot = 0), (at = 0.58), (st = 1) + break + case 'ease-in-out': + ;(it = 0), (ot = 0), (at = 0.58), (st = 1) + break + default: { + var lt = nt[0].split('(') + if (lt[0] === 'cubic-bezier' && lt[1].split(')')[0].split(',').length === 4) { + var ct = lt[1] + .split(')')[0] + .split(',') + .map(function (yt) { + return parseFloat(yt) + }), + ut = _slicedToArray$c(ct, 4) + ;(it = ut[0]), (ot = ut[1]), (at = ut[2]), (st = ut[3]) + } + } + } + var ht = cubicBezier(it, at), + dt = cubicBezier(ot, st), + pt = derivativeCubicBezier(it, at), + mt = function (bt) { + return bt > 1 ? 1 : bt < 0 ? 0 : bt + }, + gt = function (bt) { + for (var vt = bt > 1 ? 1 : bt, xt = vt, kt = 0; kt < 8; ++kt) { + var St = ht(xt) - vt, + Tt = pt(xt) + if (Math.abs(St - vt) < ACCURACY || Tt < ACCURACY) return dt(xt) + xt = mt(xt - St / Tt) + } + return dt(xt) + } + return (gt.isStepper = !1), gt + }, + configSpring = function () { + var et = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, + nt = et.stiff, + rt = nt === void 0 ? 100 : nt, + it = et.damping, + ot = it === void 0 ? 8 : it, + at = et.dt, + st = at === void 0 ? 17 : at, + lt = function (ut, ht, dt) { + var pt = -(ut - ht) * rt, + mt = dt * ot, + gt = dt + ((pt - mt) * st) / 1e3, + yt = (dt * st) / 1e3 + ut + return Math.abs(yt - ht) < ACCURACY && Math.abs(gt) < ACCURACY ? [ht, 0] : [yt, gt] + } + return (lt.isStepper = !0), (lt.dt = st), lt + }, + configEasing = function () { + for (var et = arguments.length, nt = new Array(et), rt = 0; rt < et; rt++) nt[rt] = arguments[rt] + var it = nt[0] + if (typeof it == 'string') + switch (it) { + case 'ease': + case 'ease-in-out': + case 'ease-out': + case 'ease-in': + case 'linear': + return configBezier(it) + case 'spring': + return configSpring() + default: + if (it.split('(')[0] === 'cubic-bezier') return configBezier(it) + } + return typeof it == 'function' ? it : null + } + function _typeof$x(tt) { + '@babel/helpers - typeof' + return ( + (_typeof$x = + typeof Symbol == 'function' && typeof Symbol.iterator == 'symbol' + ? function (et) { + return typeof et + } + : function (et) { + return et && typeof Symbol == 'function' && et.constructor === Symbol && et !== Symbol.prototype + ? 'symbol' + : typeof et + }), + _typeof$x(tt) + ) + } + function _toConsumableArray$b(tt) { + return ( + _arrayWithoutHoles$b(tt) || _iterableToArray$b(tt) || _unsupportedIterableToArray$l(tt) || _nonIterableSpread$b() + ) + } + function _nonIterableSpread$b() { + throw new TypeError(`Invalid attempt to spread non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`) + } + function _iterableToArray$b(tt) { + if ((typeof Symbol < 'u' && tt[Symbol.iterator] != null) || tt['@@iterator'] != null) return Array.from(tt) + } + function _arrayWithoutHoles$b(tt) { + if (Array.isArray(tt)) return _arrayLikeToArray$l(tt) + } + function ownKeys$v(tt, et) { + var nt = Object.keys(tt) + if (Object.getOwnPropertySymbols) { + var rt = Object.getOwnPropertySymbols(tt) + et && + (rt = rt.filter(function (it) { + return Object.getOwnPropertyDescriptor(tt, it).enumerable + })), + nt.push.apply(nt, rt) + } + return nt + } + function _objectSpread$v(tt) { + for (var et = 1; et < arguments.length; et++) { + var nt = arguments[et] != null ? arguments[et] : {} + et % 2 + ? ownKeys$v(Object(nt), !0).forEach(function (rt) { + _defineProperty$w(tt, rt, nt[rt]) + }) + : Object.getOwnPropertyDescriptors + ? Object.defineProperties(tt, Object.getOwnPropertyDescriptors(nt)) + : ownKeys$v(Object(nt)).forEach(function (rt) { + Object.defineProperty(tt, rt, Object.getOwnPropertyDescriptor(nt, rt)) + }) + } + return tt + } + function _defineProperty$w(tt, et, nt) { + return ( + (et = _toPropertyKey$w(et)), + et in tt + ? Object.defineProperty(tt, et, { value: nt, enumerable: !0, configurable: !0, writable: !0 }) + : (tt[et] = nt), + tt + ) + } + function _toPropertyKey$w(tt) { + var et = _toPrimitive$w(tt, 'string') + return _typeof$x(et) === 'symbol' ? et : String(et) + } + function _toPrimitive$w(tt, et) { + if (_typeof$x(tt) !== 'object' || tt === null) return tt + var nt = tt[Symbol.toPrimitive] + if (nt !== void 0) { + var rt = nt.call(tt, et || 'default') + if (_typeof$x(rt) !== 'object') return rt + throw new TypeError('@@toPrimitive must return a primitive value.') + } + return (et === 'string' ? String : Number)(tt) + } + function _slicedToArray$b(tt, et) { + return ( + _arrayWithHoles$b(tt) || + _iterableToArrayLimit$b(tt, et) || + _unsupportedIterableToArray$l(tt, et) || + _nonIterableRest$b() + ) + } + function _nonIterableRest$b() { + throw new TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`) + } + function _unsupportedIterableToArray$l(tt, et) { + if (tt) { + if (typeof tt == 'string') return _arrayLikeToArray$l(tt, et) + var nt = Object.prototype.toString.call(tt).slice(8, -1) + if ((nt === 'Object' && tt.constructor && (nt = tt.constructor.name), nt === 'Map' || nt === 'Set')) + return Array.from(tt) + if (nt === 'Arguments' || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(nt)) return _arrayLikeToArray$l(tt, et) + } + } + function _arrayLikeToArray$l(tt, et) { + ;(et == null || et > tt.length) && (et = tt.length) + for (var nt = 0, rt = new Array(et); nt < et; nt++) rt[nt] = tt[nt] + return rt + } + function _iterableToArrayLimit$b(tt, et) { + var nt = tt == null ? null : (typeof Symbol < 'u' && tt[Symbol.iterator]) || tt['@@iterator'] + if (nt != null) { + var rt, + it, + ot, + at, + st = [], + lt = !0, + ct = !1 + try { + if (((ot = (nt = nt.call(tt)).next), et === 0)) { + if (Object(nt) !== nt) return + lt = !1 + } else for (; !(lt = (rt = ot.call(nt)).done) && (st.push(rt.value), st.length !== et); lt = !0); + } catch (ut) { + ;(ct = !0), (it = ut) + } finally { + try { + if (!lt && nt.return != null && ((at = nt.return()), Object(at) !== at)) return + } finally { + if (ct) throw it + } + } + return st + } + } + function _arrayWithHoles$b(tt) { + if (Array.isArray(tt)) return tt + } + var alpha = function (et, nt, rt) { + return et + (nt - et) * rt + }, + needContinue = function (et) { + var nt = et.from, + rt = et.to + return nt !== rt + }, + calStepperVals = function tt(et, nt, rt) { + var it = mapObject(function (ot, at) { + if (needContinue(at)) { + var st = et(at.from, at.to, at.velocity), + lt = _slicedToArray$b(st, 2), + ct = lt[0], + ut = lt[1] + return _objectSpread$v(_objectSpread$v({}, at), {}, { from: ct, velocity: ut }) + } + return at + }, nt) + return rt < 1 + ? mapObject(function (ot, at) { + return needContinue(at) + ? _objectSpread$v( + _objectSpread$v({}, at), + {}, + { velocity: alpha(at.velocity, it[ot].velocity, rt), from: alpha(at.from, it[ot].from, rt) }, + ) + : at + }, nt) + : tt(et, it, rt - 1) + } + const configUpdate = function (tt, et, nt, rt, it) { + var ot = getIntersectionKeys(tt, et), + at = ot.reduce(function (yt, bt) { + return _objectSpread$v(_objectSpread$v({}, yt), {}, _defineProperty$w({}, bt, [tt[bt], et[bt]])) + }, {}), + st = ot.reduce(function (yt, bt) { + return _objectSpread$v( + _objectSpread$v({}, yt), + {}, + _defineProperty$w({}, bt, { from: tt[bt], velocity: 0, to: et[bt] }), + ) + }, {}), + lt = -1, + ct, + ut, + ht = function () { + return null + }, + dt = function () { + return mapObject(function (bt, vt) { + return vt.from + }, st) + }, + pt = function () { + return !Object.values(st).filter(needContinue).length + }, + mt = function (bt) { + ct || (ct = bt) + var vt = bt - ct, + xt = vt / nt.dt + ;(st = calStepperVals(nt, st, xt)), + it(_objectSpread$v(_objectSpread$v(_objectSpread$v({}, tt), et), dt())), + (ct = bt), + pt() || (lt = requestAnimationFrame(ht)) + }, + gt = function (bt) { + ut || (ut = bt) + var vt = (bt - ut) / rt, + xt = mapObject(function (St, Tt) { + return alpha.apply(void 0, _toConsumableArray$b(Tt).concat([nt(vt)])) + }, at) + if ((it(_objectSpread$v(_objectSpread$v(_objectSpread$v({}, tt), et), xt)), vt < 1)) + lt = requestAnimationFrame(ht) + else { + var kt = mapObject(function (St, Tt) { + return alpha.apply(void 0, _toConsumableArray$b(Tt).concat([nt(1)])) + }, at) + it(_objectSpread$v(_objectSpread$v(_objectSpread$v({}, tt), et), kt)) + } + } + return ( + (ht = nt.isStepper ? mt : gt), + function () { + return ( + requestAnimationFrame(ht), + function () { + cancelAnimationFrame(lt) + } + ) + } + ) + } + function _typeof$w(tt) { + '@babel/helpers - typeof' + return ( + (_typeof$w = + typeof Symbol == 'function' && typeof Symbol.iterator == 'symbol' + ? function (et) { + return typeof et + } + : function (et) { + return et && typeof Symbol == 'function' && et.constructor === Symbol && et !== Symbol.prototype + ? 'symbol' + : typeof et + }), + _typeof$w(tt) + ) + } + var _excluded$d = [ + 'children', + 'begin', + 'duration', + 'attributeName', + 'easing', + 'isActive', + 'steps', + 'from', + 'to', + 'canBegin', + 'onAnimationEnd', + 'shouldReAnimate', + 'onAnimationReStart', + ] + function _objectWithoutProperties$d(tt, et) { + if (tt == null) return {} + var nt = _objectWithoutPropertiesLoose$d(tt, et), + rt, + it + if (Object.getOwnPropertySymbols) { + var ot = Object.getOwnPropertySymbols(tt) + for (it = 0; it < ot.length; it++) + (rt = ot[it]), !(et.indexOf(rt) >= 0) && Object.prototype.propertyIsEnumerable.call(tt, rt) && (nt[rt] = tt[rt]) + } + return nt + } + function _objectWithoutPropertiesLoose$d(tt, et) { + if (tt == null) return {} + var nt = {}, + rt = Object.keys(tt), + it, + ot + for (ot = 0; ot < rt.length; ot++) (it = rt[ot]), !(et.indexOf(it) >= 0) && (nt[it] = tt[it]) + return nt + } + function _toConsumableArray$a(tt) { + return ( + _arrayWithoutHoles$a(tt) || _iterableToArray$a(tt) || _unsupportedIterableToArray$k(tt) || _nonIterableSpread$a() + ) + } + function _nonIterableSpread$a() { + throw new TypeError(`Invalid attempt to spread non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`) + } + function _unsupportedIterableToArray$k(tt, et) { + if (tt) { + if (typeof tt == 'string') return _arrayLikeToArray$k(tt, et) + var nt = Object.prototype.toString.call(tt).slice(8, -1) + if ((nt === 'Object' && tt.constructor && (nt = tt.constructor.name), nt === 'Map' || nt === 'Set')) + return Array.from(tt) + if (nt === 'Arguments' || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(nt)) return _arrayLikeToArray$k(tt, et) + } + } + function _iterableToArray$a(tt) { + if ((typeof Symbol < 'u' && tt[Symbol.iterator] != null) || tt['@@iterator'] != null) return Array.from(tt) + } + function _arrayWithoutHoles$a(tt) { + if (Array.isArray(tt)) return _arrayLikeToArray$k(tt) + } + function _arrayLikeToArray$k(tt, et) { + ;(et == null || et > tt.length) && (et = tt.length) + for (var nt = 0, rt = new Array(et); nt < et; nt++) rt[nt] = tt[nt] + return rt + } + function ownKeys$u(tt, et) { + var nt = Object.keys(tt) + if (Object.getOwnPropertySymbols) { + var rt = Object.getOwnPropertySymbols(tt) + et && + (rt = rt.filter(function (it) { + return Object.getOwnPropertyDescriptor(tt, it).enumerable + })), + nt.push.apply(nt, rt) + } + return nt + } + function _objectSpread$u(tt) { + for (var et = 1; et < arguments.length; et++) { + var nt = arguments[et] != null ? arguments[et] : {} + et % 2 + ? ownKeys$u(Object(nt), !0).forEach(function (rt) { + _defineProperty$v(tt, rt, nt[rt]) + }) + : Object.getOwnPropertyDescriptors + ? Object.defineProperties(tt, Object.getOwnPropertyDescriptors(nt)) + : ownKeys$u(Object(nt)).forEach(function (rt) { + Object.defineProperty(tt, rt, Object.getOwnPropertyDescriptor(nt, rt)) + }) + } + return tt + } + function _defineProperty$v(tt, et, nt) { + return ( + (et = _toPropertyKey$v(et)), + et in tt + ? Object.defineProperty(tt, et, { value: nt, enumerable: !0, configurable: !0, writable: !0 }) + : (tt[et] = nt), + tt + ) + } + function _classCallCheck$c(tt, et) { + if (!(tt instanceof et)) throw new TypeError('Cannot call a class as a function') + } + function _defineProperties$c(tt, et) { + for (var nt = 0; nt < et.length; nt++) { + var rt = et[nt] + ;(rt.enumerable = rt.enumerable || !1), + (rt.configurable = !0), + 'value' in rt && (rt.writable = !0), + Object.defineProperty(tt, _toPropertyKey$v(rt.key), rt) + } + } + function _createClass$c(tt, et, nt) { + return ( + et && _defineProperties$c(tt.prototype, et), + nt && _defineProperties$c(tt, nt), + Object.defineProperty(tt, 'prototype', { writable: !1 }), + tt + ) + } + function _toPropertyKey$v(tt) { + var et = _toPrimitive$v(tt, 'string') + return _typeof$w(et) === 'symbol' ? et : String(et) + } + function _toPrimitive$v(tt, et) { + if (_typeof$w(tt) !== 'object' || tt === null) return tt + var nt = tt[Symbol.toPrimitive] + if (nt !== void 0) { + var rt = nt.call(tt, et || 'default') + if (_typeof$w(rt) !== 'object') return rt + throw new TypeError('@@toPrimitive must return a primitive value.') + } + return (et === 'string' ? String : Number)(tt) + } + function _inherits$9(tt, et) { + if (typeof et != 'function' && et !== null) + throw new TypeError('Super expression must either be null or a function') + ;(tt.prototype = Object.create(et && et.prototype, { constructor: { value: tt, writable: !0, configurable: !0 } })), + Object.defineProperty(tt, 'prototype', { writable: !1 }), + et && _setPrototypeOf$9(tt, et) + } + function _setPrototypeOf$9(tt, et) { + return ( + (_setPrototypeOf$9 = Object.setPrototypeOf + ? Object.setPrototypeOf.bind() + : function (rt, it) { + return (rt.__proto__ = it), rt + }), + _setPrototypeOf$9(tt, et) + ) + } + function _createSuper$9(tt) { + var et = _isNativeReflectConstruct$9() + return function () { + var rt = _getPrototypeOf$9(tt), + it + if (et) { + var ot = _getPrototypeOf$9(this).constructor + it = Reflect.construct(rt, arguments, ot) + } else it = rt.apply(this, arguments) + return _possibleConstructorReturn$9(this, it) + } + } + function _possibleConstructorReturn$9(tt, et) { + if (et && (_typeof$w(et) === 'object' || typeof et == 'function')) return et + if (et !== void 0) throw new TypeError('Derived constructors may only return object or undefined') + return _assertThisInitialized$9(tt) + } + function _assertThisInitialized$9(tt) { + if (tt === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called") + return tt + } + function _isNativeReflectConstruct$9() { + if (typeof Reflect > 'u' || !Reflect.construct || Reflect.construct.sham) return !1 + if (typeof Proxy == 'function') return !0 + try { + return Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})), !0 + } catch { + return !1 + } + } + function _getPrototypeOf$9(tt) { + return ( + (_getPrototypeOf$9 = Object.setPrototypeOf + ? Object.getPrototypeOf.bind() + : function (nt) { + return nt.__proto__ || Object.getPrototypeOf(nt) + }), + _getPrototypeOf$9(tt) + ) + } + var Animate = (function (tt) { + _inherits$9(nt, tt) + var et = _createSuper$9(nt) + function nt(rt, it) { + var ot + _classCallCheck$c(this, nt), (ot = et.call(this, rt, it)) + var at = ot.props, + st = at.isActive, + lt = at.attributeName, + ct = at.from, + ut = at.to, + ht = at.steps, + dt = at.children, + pt = at.duration + if ( + ((ot.handleStyleChange = ot.handleStyleChange.bind(_assertThisInitialized$9(ot))), + (ot.changeStyle = ot.changeStyle.bind(_assertThisInitialized$9(ot))), + !st || pt <= 0) + ) + return ( + (ot.state = { style: {} }), + typeof dt == 'function' && (ot.state = { style: ut }), + _possibleConstructorReturn$9(ot) + ) + if (ht && ht.length) ot.state = { style: ht[0].style } + else if (ct) { + if (typeof dt == 'function') return (ot.state = { style: ct }), _possibleConstructorReturn$9(ot) + ot.state = { style: lt ? _defineProperty$v({}, lt, ct) : ct } + } else ot.state = { style: {} } + return ot + } + return ( + _createClass$c(nt, [ + { + key: 'componentDidMount', + value: function () { + var it = this.props, + ot = it.isActive, + at = it.canBegin + ;(this.mounted = !0), !(!ot || !at) && this.runAnimation(this.props) + }, + }, + { + key: 'componentDidUpdate', + value: function (it) { + var ot = this.props, + at = ot.isActive, + st = ot.canBegin, + lt = ot.attributeName, + ct = ot.shouldReAnimate, + ut = ot.to, + ht = ot.from, + dt = this.state.style + if (st) { + if (!at) { + var pt = { style: lt ? _defineProperty$v({}, lt, ut) : ut } + this.state && dt && ((lt && dt[lt] !== ut) || (!lt && dt !== ut)) && this.setState(pt) + return + } + if (!(deepEqual(it.to, ut) && it.canBegin && it.isActive)) { + var mt = !it.canBegin || !it.isActive + this.manager && this.manager.stop(), this.stopJSAnimation && this.stopJSAnimation() + var gt = mt || ct ? ht : it.to + if (this.state && dt) { + var yt = { style: lt ? _defineProperty$v({}, lt, gt) : gt } + ;((lt && [lt] !== gt) || (!lt && dt !== gt)) && this.setState(yt) + } + this.runAnimation(_objectSpread$u(_objectSpread$u({}, this.props), {}, { from: gt, begin: 0 })) + } + } + }, + }, + { + key: 'componentWillUnmount', + value: function () { + this.mounted = !1 + var it = this.props.onAnimationEnd + this.unSubscribe && this.unSubscribe(), + this.manager && (this.manager.stop(), (this.manager = null)), + this.stopJSAnimation && this.stopJSAnimation(), + it && it() + }, + }, + { + key: 'handleStyleChange', + value: function (it) { + this.changeStyle(it) + }, + }, + { + key: 'changeStyle', + value: function (it) { + this.mounted && this.setState({ style: it }) + }, + }, + { + key: 'runJSAnimation', + value: function (it) { + var ot = this, + at = it.from, + st = it.to, + lt = it.duration, + ct = it.easing, + ut = it.begin, + ht = it.onAnimationEnd, + dt = it.onAnimationStart, + pt = configUpdate(at, st, configEasing(ct), lt, this.changeStyle), + mt = function () { + ot.stopJSAnimation = pt() + } + this.manager.start([dt, ut, mt, lt, ht]) + }, + }, + { + key: 'runStepAnimation', + value: function (it) { + var ot = this, + at = it.steps, + st = it.begin, + lt = it.onAnimationStart, + ct = at[0], + ut = ct.style, + ht = ct.duration, + dt = ht === void 0 ? 0 : ht, + pt = function (gt, yt, bt) { + if (bt === 0) return gt + var vt = yt.duration, + xt = yt.easing, + kt = xt === void 0 ? 'ease' : xt, + St = yt.style, + Tt = yt.properties, + At = yt.onAnimationEnd, + Et = bt > 0 ? at[bt - 1] : yt, + $t = Tt || Object.keys(St) + if (typeof kt == 'function' || kt === 'spring') + return [].concat(_toConsumableArray$a(gt), [ + ot.runJSAnimation.bind(ot, { from: Et.style, to: St, duration: vt, easing: kt }), + vt, + ]) + var Dt = getTransitionVal($t, vt, kt), + jt = _objectSpread$u(_objectSpread$u(_objectSpread$u({}, Et.style), St), {}, { transition: Dt }) + return [].concat(_toConsumableArray$a(gt), [jt, vt, At]).filter(identity$b) + } + return this.manager.start( + [lt].concat(_toConsumableArray$a(at.reduce(pt, [ut, Math.max(dt, st)])), [it.onAnimationEnd]), + ) + }, + }, + { + key: 'runAnimation', + value: function (it) { + this.manager || (this.manager = createAnimateManager()) + var ot = it.begin, + at = it.duration, + st = it.attributeName, + lt = it.to, + ct = it.easing, + ut = it.onAnimationStart, + ht = it.onAnimationEnd, + dt = it.steps, + pt = it.children, + mt = this.manager + if ( + ((this.unSubscribe = mt.subscribe(this.handleStyleChange)), + typeof ct == 'function' || typeof pt == 'function' || ct === 'spring') + ) { + this.runJSAnimation(it) + return + } + if (dt.length > 1) { + this.runStepAnimation(it) + return + } + var gt = st ? _defineProperty$v({}, st, lt) : lt, + yt = getTransitionVal(Object.keys(gt), at, ct) + mt.start([ut, ot, _objectSpread$u(_objectSpread$u({}, gt), {}, { transition: yt }), at, ht]) + }, + }, + { + key: 'render', + value: function () { + var it = this.props, + ot = it.children + it.begin + var at = it.duration + it.attributeName, it.easing + var st = it.isActive + it.steps, it.from, it.to, it.canBegin, it.onAnimationEnd, it.shouldReAnimate, it.onAnimationReStart + var lt = _objectWithoutProperties$d(it, _excluded$d), + ct = reactExports.Children.count(ot), + ut = translateStyle(this.state.style) + if (typeof ot == 'function') return ot(ut) + if (!st || ct === 0 || at <= 0) return ot + var ht = function (pt) { + var mt = pt.props, + gt = mt.style, + yt = gt === void 0 ? {} : gt, + bt = mt.className, + vt = reactExports.cloneElement( + pt, + _objectSpread$u( + _objectSpread$u({}, lt), + {}, + { style: _objectSpread$u(_objectSpread$u({}, yt), ut), className: bt }, + ), + ) + return vt + } + return ct === 1 + ? ht(reactExports.Children.only(ot)) + : React$1.createElement( + 'div', + null, + reactExports.Children.map(ot, function (dt) { + return ht(dt) + }), + ) + }, + }, + ]), + nt + ) + })(reactExports.PureComponent) + Animate.displayName = 'Animate' + Animate.defaultProps = { + begin: 0, + duration: 1e3, + from: '', + to: '', + attributeName: '', + easing: 'ease', + isActive: !0, + canBegin: !0, + steps: [], + onAnimationEnd: function () {}, + onAnimationStart: function () {}, + } + Animate.propTypes = { + from: PropTypes.oneOfType([PropTypes.object, PropTypes.string]), + to: PropTypes.oneOfType([PropTypes.object, PropTypes.string]), + attributeName: PropTypes.string, + duration: PropTypes.number, + begin: PropTypes.number, + easing: PropTypes.oneOfType([PropTypes.string, PropTypes.func]), + steps: PropTypes.arrayOf( + PropTypes.shape({ + duration: PropTypes.number.isRequired, + style: PropTypes.object.isRequired, + easing: PropTypes.oneOfType([ + PropTypes.oneOf(['ease', 'ease-in', 'ease-out', 'ease-in-out', 'linear']), + PropTypes.func, + ]), + properties: PropTypes.arrayOf('string'), + onAnimationEnd: PropTypes.func, + }), + ), + children: PropTypes.oneOfType([PropTypes.node, PropTypes.func]), + isActive: PropTypes.bool, + canBegin: PropTypes.bool, + onAnimationEnd: PropTypes.func, + shouldReAnimate: PropTypes.bool, + onAnimationStart: PropTypes.func, + onAnimationReStart: PropTypes.func, + } + Number.isFinite === void 0 && + (Number.isFinite = function (tt) { + return typeof tt == 'number' && isFinite(tt) + }) + PropTypes.object, PropTypes.object, PropTypes.object, PropTypes.element + PropTypes.object, + PropTypes.object, + PropTypes.object, + PropTypes.oneOfType([PropTypes.array, PropTypes.element]), + PropTypes.any + var Symbol$1 = _Symbol, + isArguments = isArguments_1, + isArray$4 = isArray_1, + spreadableSymbol = Symbol$1 ? Symbol$1.isConcatSpreadable : void 0 + function isFlattenable$1(tt) { + return isArray$4(tt) || isArguments(tt) || !!(spreadableSymbol && tt && tt[spreadableSymbol]) + } + var _isFlattenable = isFlattenable$1, + arrayPush = _arrayPush, + isFlattenable = _isFlattenable + function baseFlatten$2(tt, et, nt, rt, it) { + var ot = -1, + at = tt.length + for (nt || (nt = isFlattenable), it || (it = []); ++ot < at; ) { + var st = tt[ot] + et > 0 && nt(st) + ? et > 1 + ? baseFlatten$2(st, et - 1, nt, rt, it) + : arrayPush(it, st) + : rt || (it[it.length] = st) + } + return it + } + var _baseFlatten = baseFlatten$2 + function createBaseFor$1(tt) { + return function (et, nt, rt) { + for (var it = -1, ot = Object(et), at = rt(et), st = at.length; st--; ) { + var lt = at[tt ? st : ++it] + if (nt(ot[lt], lt, ot) === !1) break + } + return et + } + } + var _createBaseFor = createBaseFor$1, + createBaseFor = _createBaseFor, + baseFor$1 = createBaseFor(), + _baseFor = baseFor$1, + baseFor = _baseFor, + keys$1 = keys_1 + function baseForOwn$2(tt, et) { + return tt && baseFor(tt, et, keys$1) + } + var _baseForOwn = baseForOwn$2, + isArrayLike$3 = isArrayLike_1 + function createBaseEach$1(tt, et) { + return function (nt, rt) { + if (nt == null) return nt + if (!isArrayLike$3(nt)) return tt(nt, rt) + for ( + var it = nt.length, ot = et ? it : -1, at = Object(nt); + (et ? ot-- : ++ot < it) && rt(at[ot], ot, at) !== !1; + + ); + return nt + } + } + var _createBaseEach = createBaseEach$1, + baseForOwn$1 = _baseForOwn, + createBaseEach = _createBaseEach, + baseEach$3 = createBaseEach(baseForOwn$1), + _baseEach = baseEach$3, + baseEach$2 = _baseEach, + isArrayLike$2 = isArrayLike_1 + function baseMap$2(tt, et) { + var nt = -1, + rt = isArrayLike$2(tt) ? Array(tt.length) : [] + return ( + baseEach$2(tt, function (it, ot, at) { + rt[++nt] = et(it, ot, at) + }), + rt + ) + } + var _baseMap = baseMap$2 + function baseSortBy$1(tt, et) { + var nt = tt.length + for (tt.sort(et); nt--; ) tt[nt] = tt[nt].value + return tt + } + var _baseSortBy = baseSortBy$1, + isSymbol$2 = isSymbol_1 + function compareAscending$1(tt, et) { + if (tt !== et) { + var nt = tt !== void 0, + rt = tt === null, + it = tt === tt, + ot = isSymbol$2(tt), + at = et !== void 0, + st = et === null, + lt = et === et, + ct = isSymbol$2(et) + if ((!st && !ct && !ot && tt > et) || (ot && at && lt && !st && !ct) || (rt && at && lt) || (!nt && lt) || !it) + return 1 + if ((!rt && !ot && !ct && tt < et) || (ct && nt && it && !rt && !ot) || (st && nt && it) || (!at && it) || !lt) + return -1 + } + return 0 + } + var _compareAscending = compareAscending$1, + compareAscending = _compareAscending + function compareMultiple$1(tt, et, nt) { + for (var rt = -1, it = tt.criteria, ot = et.criteria, at = it.length, st = nt.length; ++rt < at; ) { + var lt = compareAscending(it[rt], ot[rt]) + if (lt) { + if (rt >= st) return lt + var ct = nt[rt] + return lt * (ct == 'desc' ? -1 : 1) + } + } + return tt.index - et.index + } + var _compareMultiple = compareMultiple$1, + arrayMap$1 = _arrayMap, + baseGet = _baseGet, + baseIteratee$6 = _baseIteratee, + baseMap$1 = _baseMap, + baseSortBy = _baseSortBy, + baseUnary = _baseUnary, + compareMultiple = _compareMultiple, + identity$a = identity_1, + isArray$3 = isArray_1 + function baseOrderBy$1(tt, et, nt) { + et.length + ? (et = arrayMap$1(et, function (ot) { + return isArray$3(ot) + ? function (at) { + return baseGet(at, ot.length === 1 ? ot[0] : ot) + } + : ot + })) + : (et = [identity$a]) + var rt = -1 + et = arrayMap$1(et, baseUnary(baseIteratee$6)) + var it = baseMap$1(tt, function (ot, at, st) { + var lt = arrayMap$1(et, function (ct) { + return ct(ot) + }) + return { criteria: lt, index: ++rt, value: ot } + }) + return baseSortBy(it, function (ot, at) { + return compareMultiple(ot, at, nt) + }) + } + var _baseOrderBy = baseOrderBy$1 + function apply$1(tt, et, nt) { + switch (nt.length) { + case 0: + return tt.call(et) + case 1: + return tt.call(et, nt[0]) + case 2: + return tt.call(et, nt[0], nt[1]) + case 3: + return tt.call(et, nt[0], nt[1], nt[2]) + } + return tt.apply(et, nt) + } + var _apply = apply$1, + apply = _apply, + nativeMax$3 = Math.max + function overRest$1(tt, et, nt) { + return ( + (et = nativeMax$3(et === void 0 ? tt.length - 1 : et, 0)), + function () { + for (var rt = arguments, it = -1, ot = nativeMax$3(rt.length - et, 0), at = Array(ot); ++it < ot; ) + at[it] = rt[et + it] + it = -1 + for (var st = Array(et + 1); ++it < et; ) st[it] = rt[it] + return (st[et] = nt(at)), apply(tt, this, st) + } + ) + } + var _overRest = overRest$1 + function constant$5(tt) { + return function () { + return tt + } + } + var constant_1 = constant$5, + constant$4 = constant_1, + defineProperty = _defineProperty$D, + identity$9 = identity_1, + baseSetToString$1 = defineProperty + ? function (tt, et) { + return defineProperty(tt, 'toString', { + configurable: !0, + enumerable: !1, + value: constant$4(et), + writable: !0, + }) + } + : identity$9, + _baseSetToString = baseSetToString$1, + HOT_COUNT = 800, + HOT_SPAN = 16, + nativeNow = Date.now + function shortOut$1(tt) { + var et = 0, + nt = 0 + return function () { + var rt = nativeNow(), + it = HOT_SPAN - (rt - nt) + if (((nt = rt), it > 0)) { + if (++et >= HOT_COUNT) return arguments[0] + } else et = 0 + return tt.apply(void 0, arguments) + } + } + var _shortOut = shortOut$1, + baseSetToString = _baseSetToString, + shortOut = _shortOut, + setToString$1 = shortOut(baseSetToString), + _setToString = setToString$1, + identity$8 = identity_1, + overRest = _overRest, + setToString = _setToString + function baseRest$1(tt, et) { + return setToString(overRest(tt, et, identity$8), tt + '') + } + var _baseRest = baseRest$1, + eq = eq_1, + isArrayLike$1 = isArrayLike_1, + isIndex = _isIndex, + isObject$4 = isObject_1 + function isIterateeCall$4(tt, et, nt) { + if (!isObject$4(nt)) return !1 + var rt = typeof et + return (rt == 'number' ? isArrayLike$1(nt) && isIndex(et, nt.length) : rt == 'string' && et in nt) + ? eq(nt[et], tt) + : !1 + } + var _isIterateeCall = isIterateeCall$4, + baseFlatten$1 = _baseFlatten, + baseOrderBy = _baseOrderBy, + baseRest = _baseRest, + isIterateeCall$3 = _isIterateeCall, + sortBy = baseRest(function (tt, et) { + if (tt == null) return [] + var nt = et.length + return ( + nt > 1 && isIterateeCall$3(tt, et[0], et[1]) + ? (et = []) + : nt > 2 && isIterateeCall$3(et[0], et[1], et[2]) && (et = [et[0]]), + baseOrderBy(tt, baseFlatten$1(et, 1), []) + ) + }), + sortBy_1 = sortBy + const _sortBy = getDefaultExportFromCjs(sortBy_1) + function _typeof$v(tt) { + '@babel/helpers - typeof' + return ( + (_typeof$v = + typeof Symbol == 'function' && typeof Symbol.iterator == 'symbol' + ? function (et) { + return typeof et + } + : function (et) { + return et && typeof Symbol == 'function' && et.constructor === Symbol && et !== Symbol.prototype + ? 'symbol' + : typeof et + }), + _typeof$v(tt) + ) + } + function _slicedToArray$a(tt, et) { + return ( + _arrayWithHoles$a(tt) || + _iterableToArrayLimit$a(tt, et) || + _unsupportedIterableToArray$j(tt, et) || + _nonIterableRest$a() + ) + } + function _nonIterableRest$a() { + throw new TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`) + } + function _unsupportedIterableToArray$j(tt, et) { + if (tt) { + if (typeof tt == 'string') return _arrayLikeToArray$j(tt, et) + var nt = Object.prototype.toString.call(tt).slice(8, -1) + if ((nt === 'Object' && tt.constructor && (nt = tt.constructor.name), nt === 'Map' || nt === 'Set')) + return Array.from(tt) + if (nt === 'Arguments' || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(nt)) return _arrayLikeToArray$j(tt, et) + } + } + function _arrayLikeToArray$j(tt, et) { + ;(et == null || et > tt.length) && (et = tt.length) + for (var nt = 0, rt = new Array(et); nt < et; nt++) rt[nt] = tt[nt] + return rt + } + function _iterableToArrayLimit$a(tt, et) { + var nt = tt == null ? null : (typeof Symbol < 'u' && tt[Symbol.iterator]) || tt['@@iterator'] + if (nt != null) { + var rt, + it, + ot, + at, + st = [], + lt = !0, + ct = !1 + try { + if (((ot = (nt = nt.call(tt)).next), et === 0)) { + if (Object(nt) !== nt) return + lt = !1 + } else for (; !(lt = (rt = ot.call(nt)).done) && (st.push(rt.value), st.length !== et); lt = !0); + } catch (ut) { + ;(ct = !0), (it = ut) + } finally { + try { + if (!lt && nt.return != null && ((at = nt.return()), Object(at) !== at)) return + } finally { + if (ct) throw it + } + } + return st + } + } + function _arrayWithHoles$a(tt) { + if (Array.isArray(tt)) return tt + } + function ownKeys$t(tt, et) { + var nt = Object.keys(tt) + if (Object.getOwnPropertySymbols) { + var rt = Object.getOwnPropertySymbols(tt) + et && + (rt = rt.filter(function (it) { + return Object.getOwnPropertyDescriptor(tt, it).enumerable + })), + nt.push.apply(nt, rt) + } + return nt + } + function _objectSpread$t(tt) { + for (var et = 1; et < arguments.length; et++) { + var nt = arguments[et] != null ? arguments[et] : {} + et % 2 + ? ownKeys$t(Object(nt), !0).forEach(function (rt) { + _defineProperty$u(tt, rt, nt[rt]) + }) + : Object.getOwnPropertyDescriptors + ? Object.defineProperties(tt, Object.getOwnPropertyDescriptors(nt)) + : ownKeys$t(Object(nt)).forEach(function (rt) { + Object.defineProperty(tt, rt, Object.getOwnPropertyDescriptor(nt, rt)) + }) + } + return tt + } + function _defineProperty$u(tt, et, nt) { + return ( + (et = _toPropertyKey$u(et)), + et in tt + ? Object.defineProperty(tt, et, { value: nt, enumerable: !0, configurable: !0, writable: !0 }) + : (tt[et] = nt), + tt + ) + } + function _toPropertyKey$u(tt) { + var et = _toPrimitive$u(tt, 'string') + return _typeof$v(et) === 'symbol' ? et : String(et) + } + function _toPrimitive$u(tt, et) { + if (_typeof$v(tt) !== 'object' || tt === null) return tt + var nt = tt[Symbol.toPrimitive] + if (nt !== void 0) { + var rt = nt.call(tt, et || 'default') + if (_typeof$v(rt) !== 'object') return rt + throw new TypeError('@@toPrimitive must return a primitive value.') + } + return (et === 'string' ? String : Number)(tt) + } + function defaultFormatter(tt) { + return _isArray$1(tt) && isNumOrStr(tt[0]) && isNumOrStr(tt[1]) ? tt.join(' ~ ') : tt + } + var DefaultTooltipContent = function (et) { + var nt = et.separator, + rt = nt === void 0 ? ' : ' : nt, + it = et.contentStyle, + ot = it === void 0 ? {} : it, + at = et.itemStyle, + st = at === void 0 ? {} : at, + lt = et.labelStyle, + ct = lt === void 0 ? {} : lt, + ut = et.payload, + ht = et.formatter, + dt = et.itemSorter, + pt = et.wrapperClassName, + mt = et.labelClassName, + gt = et.label, + yt = et.labelFormatter, + bt = function () { + if (ut && ut.length) { + var $t = { padding: 0, margin: 0 }, + Dt = (dt ? _sortBy(ut, dt) : ut).map(function (jt, Pt) { + if (jt.type === 'none') return null + var Ct = _objectSpread$t( + { display: 'block', paddingTop: 4, paddingBottom: 4, color: jt.color || '#000' }, + st, + ), + wt = jt.formatter || ht || defaultFormatter, + It = jt.value, + Ot = jt.name, + Wt = It, + zt = Ot + if (wt && Wt != null && zt != null) { + var Ft = wt(It, Ot, jt, Pt, ut) + if (Array.isArray(Ft)) { + var Nt = _slicedToArray$a(Ft, 2) + ;(Wt = Nt[0]), (zt = Nt[1]) + } else Wt = Ft + } + return React$1.createElement( + 'li', + { className: 'recharts-tooltip-item', key: 'tooltip-item-'.concat(Pt), style: Ct }, + isNumOrStr(zt) + ? React$1.createElement('span', { className: 'recharts-tooltip-item-name' }, zt) + : null, + isNumOrStr(zt) + ? React$1.createElement('span', { className: 'recharts-tooltip-item-separator' }, rt) + : null, + React$1.createElement('span', { className: 'recharts-tooltip-item-value' }, Wt), + React$1.createElement('span', { className: 'recharts-tooltip-item-unit' }, jt.unit || ''), + ) + }) + return React$1.createElement('ul', { className: 'recharts-tooltip-item-list', style: $t }, Dt) + } + return null + }, + vt = _objectSpread$t( + { margin: 0, padding: 10, backgroundColor: '#fff', border: '1px solid #ccc', whiteSpace: 'nowrap' }, + ot, + ), + xt = _objectSpread$t({ margin: 0 }, ct), + kt = !_isNil(gt), + St = kt ? gt : '', + Tt = classNames('recharts-default-tooltip', pt), + At = classNames('recharts-tooltip-label', mt) + return ( + kt && yt && ut !== void 0 && ut !== null && (St = yt(gt, ut)), + React$1.createElement( + 'div', + { className: Tt, style: vt }, + React$1.createElement('p', { className: At, style: xt }, React$1.isValidElement(St) ? St : ''.concat(St)), + bt(), + ) + ) + }, + parseIsSsrByDefault = function () { + return !(typeof window < 'u' && window.document && window.document.createElement && window.setTimeout) + }, + Global = { + isSsr: parseIsSsrByDefault(), + get: function (et) { + return Global[et] + }, + set: function (et, nt) { + if (typeof et == 'string') Global[et] = nt + else { + var rt = Object.keys(et) + rt && + rt.length && + rt.forEach(function (it) { + Global[it] = et[it] + }) + } + }, + } + function _typeof$u(tt) { + '@babel/helpers - typeof' + return ( + (_typeof$u = + typeof Symbol == 'function' && typeof Symbol.iterator == 'symbol' + ? function (et) { + return typeof et + } + : function (et) { + return et && typeof Symbol == 'function' && et.constructor === Symbol && et !== Symbol.prototype + ? 'symbol' + : typeof et + }), + _typeof$u(tt) + ) + } + function ownKeys$s(tt, et) { + var nt = Object.keys(tt) + if (Object.getOwnPropertySymbols) { + var rt = Object.getOwnPropertySymbols(tt) + et && + (rt = rt.filter(function (it) { + return Object.getOwnPropertyDescriptor(tt, it).enumerable + })), + nt.push.apply(nt, rt) + } + return nt + } + function _objectSpread$s(tt) { + for (var et = 1; et < arguments.length; et++) { + var nt = arguments[et] != null ? arguments[et] : {} + et % 2 + ? ownKeys$s(Object(nt), !0).forEach(function (rt) { + _defineProperty$t(tt, rt, nt[rt]) + }) + : Object.getOwnPropertyDescriptors + ? Object.defineProperties(tt, Object.getOwnPropertyDescriptors(nt)) + : ownKeys$s(Object(nt)).forEach(function (rt) { + Object.defineProperty(tt, rt, Object.getOwnPropertyDescriptor(nt, rt)) + }) + } + return tt + } + function _classCallCheck$b(tt, et) { + if (!(tt instanceof et)) throw new TypeError('Cannot call a class as a function') + } + function _defineProperties$b(tt, et) { + for (var nt = 0; nt < et.length; nt++) { + var rt = et[nt] + ;(rt.enumerable = rt.enumerable || !1), + (rt.configurable = !0), + 'value' in rt && (rt.writable = !0), + Object.defineProperty(tt, _toPropertyKey$t(rt.key), rt) + } + } + function _createClass$b(tt, et, nt) { + return ( + et && _defineProperties$b(tt.prototype, et), + nt && _defineProperties$b(tt, nt), + Object.defineProperty(tt, 'prototype', { writable: !1 }), + tt + ) + } + function _inherits$8(tt, et) { + if (typeof et != 'function' && et !== null) + throw new TypeError('Super expression must either be null or a function') + ;(tt.prototype = Object.create(et && et.prototype, { constructor: { value: tt, writable: !0, configurable: !0 } })), + Object.defineProperty(tt, 'prototype', { writable: !1 }), + et && _setPrototypeOf$8(tt, et) + } + function _setPrototypeOf$8(tt, et) { + return ( + (_setPrototypeOf$8 = Object.setPrototypeOf + ? Object.setPrototypeOf.bind() + : function (rt, it) { + return (rt.__proto__ = it), rt + }), + _setPrototypeOf$8(tt, et) + ) + } + function _createSuper$8(tt) { + var et = _isNativeReflectConstruct$8() + return function () { + var rt = _getPrototypeOf$8(tt), + it + if (et) { + var ot = _getPrototypeOf$8(this).constructor + it = Reflect.construct(rt, arguments, ot) + } else it = rt.apply(this, arguments) + return _possibleConstructorReturn$8(this, it) + } + } + function _possibleConstructorReturn$8(tt, et) { + if (et && (_typeof$u(et) === 'object' || typeof et == 'function')) return et + if (et !== void 0) throw new TypeError('Derived constructors may only return object or undefined') + return _assertThisInitialized$8(tt) + } + function _assertThisInitialized$8(tt) { + if (tt === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called") + return tt + } + function _isNativeReflectConstruct$8() { + if (typeof Reflect > 'u' || !Reflect.construct || Reflect.construct.sham) return !1 + if (typeof Proxy == 'function') return !0 + try { + return Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})), !0 + } catch { + return !1 + } + } + function _getPrototypeOf$8(tt) { + return ( + (_getPrototypeOf$8 = Object.setPrototypeOf + ? Object.getPrototypeOf.bind() + : function (nt) { + return nt.__proto__ || Object.getPrototypeOf(nt) + }), + _getPrototypeOf$8(tt) + ) + } + function _defineProperty$t(tt, et, nt) { + return ( + (et = _toPropertyKey$t(et)), + et in tt + ? Object.defineProperty(tt, et, { value: nt, enumerable: !0, configurable: !0, writable: !0 }) + : (tt[et] = nt), + tt + ) + } + function _toPropertyKey$t(tt) { + var et = _toPrimitive$t(tt, 'string') + return _typeof$u(et) === 'symbol' ? et : String(et) + } + function _toPrimitive$t(tt, et) { + if (_typeof$u(tt) !== 'object' || tt === null) return tt + var nt = tt[Symbol.toPrimitive] + if (nt !== void 0) { + var rt = nt.call(tt, et || 'default') + if (_typeof$u(rt) !== 'object') return rt + throw new TypeError('@@toPrimitive must return a primitive value.') + } + return (et === 'string' ? String : Number)(tt) + } + var CLS_PREFIX = 'recharts-tooltip-wrapper', + EPS$1 = 1 + function defaultUniqBy(tt) { + return tt.dataKey + } + function getUniqPayload(tt, et) { + return tt === !0 ? _uniqBy(et, defaultUniqBy) : _isFunction$1(tt) ? _uniqBy(et, tt) : et + } + function renderContent(tt, et) { + return React$1.isValidElement(tt) + ? React$1.cloneElement(tt, et) + : _isFunction$1(tt) + ? React$1.createElement(tt, et) + : React$1.createElement(DefaultTooltipContent, et) + } + var Tooltip = (function (tt) { + _inherits$8(nt, tt) + var et = _createSuper$8(nt) + function nt() { + var rt + _classCallCheck$b(this, nt) + for (var it = arguments.length, ot = new Array(it), at = 0; at < it; at++) ot[at] = arguments[at] + return ( + (rt = et.call.apply(et, [this].concat(ot))), + _defineProperty$t(_assertThisInitialized$8(rt), 'state', { + boxWidth: -1, + boxHeight: -1, + dismissed: !1, + dismissedAtCoordinate: { x: 0, y: 0 }, + }), + _defineProperty$t(_assertThisInitialized$8(rt), 'handleKeyDown', function (st) { + st.key === 'Escape' && + rt.setState({ + dismissed: !0, + dismissedAtCoordinate: _objectSpread$s( + _objectSpread$s({}, rt.state.dismissedAtCoordinate), + {}, + { x: rt.props.coordinate.x, y: rt.props.coordinate.y }, + ), + }) + }), + _defineProperty$t(_assertThisInitialized$8(rt), 'getTranslate', function (st) { + var lt = st.key, + ct = st.tooltipDimension, + ut = st.viewBoxDimension, + ht = rt.props, + dt = ht.allowEscapeViewBox, + pt = ht.reverseDirection, + mt = ht.coordinate, + gt = ht.offset, + yt = ht.position, + bt = ht.viewBox + if (yt && isNumber(yt[lt])) return yt[lt] + var vt = mt[lt] - ct - gt, + xt = mt[lt] + gt + if (dt[lt]) return pt[lt] ? vt : xt + if (pt[lt]) { + var kt = vt, + St = bt[lt] + return kt < St ? Math.max(xt, bt[lt]) : Math.max(vt, bt[lt]) + } + var Tt = xt + ct, + At = bt[lt] + ut + return Tt > At ? Math.max(vt, bt[lt]) : Math.max(xt, bt[lt]) + }), + rt + ) + } + return ( + _createClass$b(nt, [ + { + key: 'componentDidMount', + value: function () { + this.updateBBox() + }, + }, + { + key: 'componentWillUnmount', + value: function () { + document.removeEventListener('keydown', this.handleKeyDown) + }, + }, + { + key: 'componentDidUpdate', + value: function () { + this.updateBBox() + }, + }, + { + key: 'updateBBox', + value: function () { + var it = this.state, + ot = it.boxWidth, + at = it.boxHeight, + st = it.dismissed + if ( + (st + ? (document.removeEventListener('keydown', this.handleKeyDown), + (this.props.coordinate.x !== this.state.dismissedAtCoordinate.x || + this.props.coordinate.y !== this.state.dismissedAtCoordinate.y) && + this.setState({ dismissed: !1 })) + : document.addEventListener('keydown', this.handleKeyDown), + this.wrapperNode && this.wrapperNode.getBoundingClientRect) + ) { + var lt = this.wrapperNode.getBoundingClientRect() + ;(Math.abs(lt.width - ot) > EPS$1 || Math.abs(lt.height - at) > EPS$1) && + this.setState({ boxWidth: lt.width, boxHeight: lt.height }) + } else (ot !== -1 || at !== -1) && this.setState({ boxWidth: -1, boxHeight: -1 }) + }, + }, + { + key: 'render', + value: function () { + var it, + ot = this, + at = this.props, + st = at.payload, + lt = at.isAnimationActive, + ct = at.animationDuration, + ut = at.animationEasing, + ht = at.filterNull, + dt = at.payloadUniqBy, + pt = getUniqPayload( + dt, + ht && st && st.length + ? st.filter(function (Ct) { + return !_isNil(Ct.value) + }) + : st, + ), + mt = pt && pt.length, + gt = this.props, + yt = gt.content, + bt = gt.viewBox, + vt = gt.coordinate, + xt = gt.position, + kt = gt.active, + St = gt.wrapperStyle, + Tt = _objectSpread$s( + { + pointerEvents: 'none', + visibility: !this.state.dismissed && kt && mt ? 'visible' : 'hidden', + position: 'absolute', + top: 0, + left: 0, + }, + St, + ), + At, + Et + if (xt && isNumber(xt.x) && isNumber(xt.y)) (At = xt.x), (Et = xt.y) + else { + var $t = this.state, + Dt = $t.boxWidth, + jt = $t.boxHeight + Dt > 0 && jt > 0 && vt + ? ((At = this.getTranslate({ key: 'x', tooltipDimension: Dt, viewBoxDimension: bt.width })), + (Et = this.getTranslate({ key: 'y', tooltipDimension: jt, viewBoxDimension: bt.height }))) + : (Tt.visibility = 'hidden') + } + ;(Tt = _objectSpread$s( + _objectSpread$s( + {}, + translateStyle({ + transform: this.props.useTranslate3d + ? 'translate3d('.concat(At, 'px, ').concat(Et, 'px, 0)') + : 'translate('.concat(At, 'px, ').concat(Et, 'px)'), + }), + ), + Tt, + )), + lt && + kt && + (Tt = _objectSpread$s( + _objectSpread$s({}, translateStyle({ transition: 'transform '.concat(ct, 'ms ').concat(ut) })), + Tt, + )) + var Pt = classNames( + CLS_PREFIX, + ((it = {}), + _defineProperty$t( + it, + ''.concat(CLS_PREFIX, '-right'), + isNumber(At) && vt && isNumber(vt.x) && At >= vt.x, + ), + _defineProperty$t(it, ''.concat(CLS_PREFIX, '-left'), isNumber(At) && vt && isNumber(vt.x) && At < vt.x), + _defineProperty$t( + it, + ''.concat(CLS_PREFIX, '-bottom'), + isNumber(Et) && vt && isNumber(vt.y) && Et >= vt.y, + ), + _defineProperty$t(it, ''.concat(CLS_PREFIX, '-top'), isNumber(Et) && vt && isNumber(vt.y) && Et < vt.y), + it), + ) + return React$1.createElement( + 'div', + { + tabIndex: -1, + role: 'dialog', + className: Pt, + style: Tt, + ref: function (wt) { + ot.wrapperNode = wt + }, + }, + renderContent(yt, _objectSpread$s(_objectSpread$s({}, this.props), {}, { payload: pt })), + ) + }, + }, + ]), + nt + ) + })(reactExports.PureComponent) + _defineProperty$t(Tooltip, 'displayName', 'Tooltip') + _defineProperty$t(Tooltip, 'defaultProps', { + active: !1, + allowEscapeViewBox: { x: !1, y: !1 }, + reverseDirection: { x: !1, y: !1 }, + offset: 10, + viewBox: { x: 0, y: 0, height: 0, width: 0 }, + coordinate: { x: 0, y: 0 }, + cursorStyle: {}, + separator: ' : ', + wrapperStyle: {}, + contentStyle: {}, + itemStyle: {}, + labelStyle: {}, + cursor: !0, + trigger: 'hover', + isAnimationActive: !Global.isSsr, + animationEasing: 'ease', + animationDuration: 400, + filterNull: !0, + useTranslate3d: !1, + }) + var root$2 = _root, + now$1 = function () { + return root$2.Date.now() + }, + now_1 = now$1, + reWhitespace = /\s/ + function trimmedEndIndex$1(tt) { + for (var et = tt.length; et-- && reWhitespace.test(tt.charAt(et)); ); + return et + } + var _trimmedEndIndex = trimmedEndIndex$1, + trimmedEndIndex = _trimmedEndIndex, + reTrimStart = /^\s+/ + function baseTrim$1(tt) { + return tt && tt.slice(0, trimmedEndIndex(tt) + 1).replace(reTrimStart, '') + } + var _baseTrim = baseTrim$1, + baseTrim = _baseTrim, + isObject$3 = isObject_1, + isSymbol$1 = isSymbol_1, + NAN = 0 / 0, + reIsBadHex = /^[-+]0x[0-9a-f]+$/i, + reIsBinary = /^0b[01]+$/i, + reIsOctal = /^0o[0-7]+$/i, + freeParseInt = parseInt + function toNumber$2(tt) { + if (typeof tt == 'number') return tt + if (isSymbol$1(tt)) return NAN + if (isObject$3(tt)) { + var et = typeof tt.valueOf == 'function' ? tt.valueOf() : tt + tt = isObject$3(et) ? et + '' : et + } + if (typeof tt != 'string') return tt === 0 ? tt : +tt + tt = baseTrim(tt) + var nt = reIsBinary.test(tt) + return nt || reIsOctal.test(tt) ? freeParseInt(tt.slice(2), nt ? 2 : 8) : reIsBadHex.test(tt) ? NAN : +tt + } + var toNumber_1 = toNumber$2, + isObject$2 = isObject_1, + now = now_1, + toNumber$1 = toNumber_1, + FUNC_ERROR_TEXT$1 = 'Expected a function', + nativeMax$2 = Math.max, + nativeMin = Math.min + function debounce$1(tt, et, nt) { + var rt, + it, + ot, + at, + st, + lt, + ct = 0, + ut = !1, + ht = !1, + dt = !0 + if (typeof tt != 'function') throw new TypeError(FUNC_ERROR_TEXT$1) + ;(et = toNumber$1(et) || 0), + isObject$2(nt) && + ((ut = !!nt.leading), + (ht = 'maxWait' in nt), + (ot = ht ? nativeMax$2(toNumber$1(nt.maxWait) || 0, et) : ot), + (dt = 'trailing' in nt ? !!nt.trailing : dt)) + function pt(Tt) { + var At = rt, + Et = it + return (rt = it = void 0), (ct = Tt), (at = tt.apply(Et, At)), at + } + function mt(Tt) { + return (ct = Tt), (st = setTimeout(bt, et)), ut ? pt(Tt) : at + } + function gt(Tt) { + var At = Tt - lt, + Et = Tt - ct, + $t = et - At + return ht ? nativeMin($t, ot - Et) : $t + } + function yt(Tt) { + var At = Tt - lt, + Et = Tt - ct + return lt === void 0 || At >= et || At < 0 || (ht && Et >= ot) + } + function bt() { + var Tt = now() + if (yt(Tt)) return vt(Tt) + st = setTimeout(bt, gt(Tt)) + } + function vt(Tt) { + return (st = void 0), dt && rt ? pt(Tt) : ((rt = it = void 0), at) + } + function xt() { + st !== void 0 && clearTimeout(st), (ct = 0), (rt = lt = it = st = void 0) + } + function kt() { + return st === void 0 ? at : vt(now()) + } + function St() { + var Tt = now(), + At = yt(Tt) + if (((rt = arguments), (it = this), (lt = Tt), At)) { + if (st === void 0) return mt(lt) + if (ht) return clearTimeout(st), (st = setTimeout(bt, et)), pt(lt) + } + return st === void 0 && (st = setTimeout(bt, et)), at + } + return (St.cancel = xt), (St.flush = kt), St + } + var debounce_1 = debounce$1 + const debounce$2 = getDefaultExportFromCjs(debounce_1) + var debounce = debounce_1, + isObject$1 = isObject_1, + FUNC_ERROR_TEXT = 'Expected a function' + function throttle(tt, et, nt) { + var rt = !0, + it = !0 + if (typeof tt != 'function') throw new TypeError(FUNC_ERROR_TEXT) + return ( + isObject$1(nt) && ((rt = 'leading' in nt ? !!nt.leading : rt), (it = 'trailing' in nt ? !!nt.trailing : it)), + debounce(tt, et, { leading: rt, maxWait: et, trailing: it }) + ) + } + var throttle_1 = throttle + const _throttle = getDefaultExportFromCjs(throttle_1) + var extendStatics = function (tt, et) { + return ( + (extendStatics = + Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && + function (nt, rt) { + nt.__proto__ = rt + }) || + function (nt, rt) { + for (var it in rt) rt.hasOwnProperty(it) && (nt[it] = rt[it]) + }), + extendStatics(tt, et) + ) + } + function __extends(tt, et) { + extendStatics(tt, et) + function nt() { + this.constructor = tt + } + tt.prototype = et === null ? Object.create(et) : ((nt.prototype = et.prototype), new nt()) + } + function __rest$1(tt, et) { + var nt = {} + for (var rt in tt) Object.prototype.hasOwnProperty.call(tt, rt) && et.indexOf(rt) < 0 && (nt[rt] = tt[rt]) + if (tt != null && typeof Object.getOwnPropertySymbols == 'function') + for (var it = 0, rt = Object.getOwnPropertySymbols(tt); it < rt.length; it++) + et.indexOf(rt[it]) < 0 && Object.prototype.propertyIsEnumerable.call(tt, rt[it]) && (nt[rt[it]] = tt[rt[it]]) + return nt + } + var patchResizeHandler = function (tt, et, nt, rt) { + switch (et) { + case 'debounce': + return debounce$2(tt, nt, rt) + case 'throttle': + return _throttle(tt, nt, rt) + default: + return tt + } + }, + isFunction = function (tt) { + return typeof tt == 'function' + }, + isSSR = function () { + return typeof window > 'u' + }, + isDOMElement = function (tt) { + return tt instanceof Element || tt instanceof HTMLDocument + }, + createNotifier = function (tt, et, nt) { + return function (rt) { + var it = rt.width, + ot = rt.height + tt(function (at) { + return (at.width === it && at.height === ot) || (at.width === it && !nt) || (at.height === ot && !et) + ? at + : { width: it, height: ot } + }) + } + }, + ResizeDetector = (function (tt) { + __extends(et, tt) + function et(nt) { + var rt = tt.call(this, nt) || this + ;(rt.cancelHandler = function () { + rt.resizeHandler && rt.resizeHandler.cancel && (rt.resizeHandler.cancel(), (rt.resizeHandler = null)) + }), + (rt.attachObserver = function () { + var ct = rt.props, + ut = ct.targetRef, + ht = ct.observerOptions + if (!isSSR()) { + ut && ut.current && (rt.targetRef.current = ut.current) + var dt = rt.getElement() + dt && + ((rt.observableElement && rt.observableElement === dt) || + ((rt.observableElement = dt), rt.resizeObserver.observe(dt, ht))) + } + }), + (rt.getElement = function () { + var ct = rt.props, + ut = ct.querySelector, + ht = ct.targetDomEl + if (isSSR()) return null + if (ut) return document.querySelector(ut) + if (ht && isDOMElement(ht)) return ht + if (rt.targetRef && isDOMElement(rt.targetRef.current)) return rt.targetRef.current + var dt = reactDomExports.findDOMNode(rt) + if (!dt) return null + var pt = rt.getRenderType() + switch (pt) { + case 'renderProp': + return dt + case 'childFunction': + return dt + case 'child': + return dt + case 'childArray': + return dt + default: + return dt.parentElement + } + }), + (rt.createResizeHandler = function (ct) { + var ut = rt.props, + ht = ut.handleWidth, + dt = ht === void 0 ? !0 : ht, + pt = ut.handleHeight, + mt = pt === void 0 ? !0 : pt, + gt = ut.onResize + if (!(!dt && !mt)) { + var yt = createNotifier( + function (bt) { + return rt.setState(bt, function () { + return gt == null ? void 0 : gt(rt.state.width, rt.state.height) + }) + }, + dt, + mt, + ) + ct.forEach(function (bt) { + var vt = (bt && bt.contentRect) || {}, + xt = vt.width, + kt = vt.height, + St = !rt.skipOnMount && !isSSR() + St && yt({ width: xt, height: kt }), (rt.skipOnMount = !1) + }) + } + }), + (rt.getRenderType = function () { + var ct = rt.props, + ut = ct.render, + ht = ct.children + return isFunction(ut) + ? 'renderProp' + : isFunction(ht) + ? 'childFunction' + : reactExports.isValidElement(ht) + ? 'child' + : Array.isArray(ht) + ? 'childArray' + : 'parent' + }) + var it = nt.skipOnMount, + ot = nt.refreshMode, + at = nt.refreshRate, + st = at === void 0 ? 1e3 : at, + lt = nt.refreshOptions + return ( + (rt.state = { width: void 0, height: void 0 }), + (rt.skipOnMount = it), + (rt.targetRef = reactExports.createRef()), + (rt.observableElement = null), + isSSR() || + ((rt.resizeHandler = patchResizeHandler(rt.createResizeHandler, ot, st, lt)), + (rt.resizeObserver = new window.ResizeObserver(rt.resizeHandler))), + rt + ) + } + return ( + (et.prototype.componentDidMount = function () { + this.attachObserver() + }), + (et.prototype.componentDidUpdate = function () { + this.attachObserver() + }), + (et.prototype.componentWillUnmount = function () { + isSSR() || ((this.observableElement = null), this.resizeObserver.disconnect(), this.cancelHandler()) + }), + (et.prototype.render = function () { + var nt = this.props, + rt = nt.render, + it = nt.children, + ot = nt.nodeType, + at = ot === void 0 ? 'div' : ot, + st = this.state, + lt = st.width, + ct = st.height, + ut = { width: lt, height: ct, targetRef: this.targetRef }, + ht = this.getRenderType() + switch (ht) { + case 'renderProp': + return rt == null ? void 0 : rt(ut) + case 'childFunction': { + var dt = it + return dt == null ? void 0 : dt(ut) + } + case 'child': { + var pt = it + if (pt.type && typeof pt.type == 'string') { + ut.targetRef + var mt = __rest$1(ut, ['targetRef']) + return reactExports.cloneElement(pt, mt) + } + return reactExports.cloneElement(pt, ut) + } + case 'childArray': { + var gt = it + return gt.map(function (yt) { + return !!yt && reactExports.cloneElement(yt, ut) + }) + } + default: + return React$1.createElement(at, null) + } + }), + et + ) + })(reactExports.PureComponent) + function _typeof$t(tt) { + '@babel/helpers - typeof' + return ( + (_typeof$t = + typeof Symbol == 'function' && typeof Symbol.iterator == 'symbol' + ? function (et) { + return typeof et + } + : function (et) { + return et && typeof Symbol == 'function' && et.constructor === Symbol && et !== Symbol.prototype + ? 'symbol' + : typeof et + }), + _typeof$t(tt) + ) + } + function _extends$n() { + return ( + (_extends$n = Object.assign + ? Object.assign.bind() + : function (tt) { + for (var et = 1; et < arguments.length; et++) { + var nt = arguments[et] + for (var rt in nt) Object.prototype.hasOwnProperty.call(nt, rt) && (tt[rt] = nt[rt]) + } + return tt + }), + _extends$n.apply(this, arguments) + ) + } + function ownKeys$r(tt, et) { + var nt = Object.keys(tt) + if (Object.getOwnPropertySymbols) { + var rt = Object.getOwnPropertySymbols(tt) + et && + (rt = rt.filter(function (it) { + return Object.getOwnPropertyDescriptor(tt, it).enumerable + })), + nt.push.apply(nt, rt) + } + return nt + } + function _objectSpread$r(tt) { + for (var et = 1; et < arguments.length; et++) { + var nt = arguments[et] != null ? arguments[et] : {} + et % 2 + ? ownKeys$r(Object(nt), !0).forEach(function (rt) { + _defineProperty$s(tt, rt, nt[rt]) + }) + : Object.getOwnPropertyDescriptors + ? Object.defineProperties(tt, Object.getOwnPropertyDescriptors(nt)) + : ownKeys$r(Object(nt)).forEach(function (rt) { + Object.defineProperty(tt, rt, Object.getOwnPropertyDescriptor(nt, rt)) + }) + } + return tt + } + function _defineProperty$s(tt, et, nt) { + return ( + (et = _toPropertyKey$s(et)), + et in tt + ? Object.defineProperty(tt, et, { value: nt, enumerable: !0, configurable: !0, writable: !0 }) + : (tt[et] = nt), + tt + ) + } + function _toPropertyKey$s(tt) { + var et = _toPrimitive$s(tt, 'string') + return _typeof$t(et) === 'symbol' ? et : String(et) + } + function _toPrimitive$s(tt, et) { + if (_typeof$t(tt) !== 'object' || tt === null) return tt + var nt = tt[Symbol.toPrimitive] + if (nt !== void 0) { + var rt = nt.call(tt, et || 'default') + if (_typeof$t(rt) !== 'object') return rt + throw new TypeError('@@toPrimitive must return a primitive value.') + } + return (et === 'string' ? String : Number)(tt) + } + function _slicedToArray$9(tt, et) { + return ( + _arrayWithHoles$9(tt) || + _iterableToArrayLimit$9(tt, et) || + _unsupportedIterableToArray$i(tt, et) || + _nonIterableRest$9() + ) + } + function _nonIterableRest$9() { + throw new TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`) + } + function _unsupportedIterableToArray$i(tt, et) { + if (tt) { + if (typeof tt == 'string') return _arrayLikeToArray$i(tt, et) + var nt = Object.prototype.toString.call(tt).slice(8, -1) + if ((nt === 'Object' && tt.constructor && (nt = tt.constructor.name), nt === 'Map' || nt === 'Set')) + return Array.from(tt) + if (nt === 'Arguments' || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(nt)) return _arrayLikeToArray$i(tt, et) + } + } + function _arrayLikeToArray$i(tt, et) { + ;(et == null || et > tt.length) && (et = tt.length) + for (var nt = 0, rt = new Array(et); nt < et; nt++) rt[nt] = tt[nt] + return rt + } + function _iterableToArrayLimit$9(tt, et) { + var nt = tt == null ? null : (typeof Symbol < 'u' && tt[Symbol.iterator]) || tt['@@iterator'] + if (nt != null) { + var rt, + it, + ot, + at, + st = [], + lt = !0, + ct = !1 + try { + if (((ot = (nt = nt.call(tt)).next), et === 0)) { + if (Object(nt) !== nt) return + lt = !1 + } else for (; !(lt = (rt = ot.call(nt)).done) && (st.push(rt.value), st.length !== et); lt = !0); + } catch (ut) { + ;(ct = !0), (it = ut) + } finally { + try { + if (!lt && nt.return != null && ((at = nt.return()), Object(at) !== at)) return + } finally { + if (ct) throw it + } + } + return st + } + } + function _arrayWithHoles$9(tt) { + if (Array.isArray(tt)) return tt + } + var ResponsiveContainer = reactExports.forwardRef(function (tt, et) { + var nt = tt.aspect, + rt = tt.initialDimension, + it = rt === void 0 ? { width: -1, height: -1 } : rt, + ot = tt.width, + at = ot === void 0 ? '100%' : ot, + st = tt.height, + lt = st === void 0 ? '100%' : st, + ct = tt.minWidth, + ut = ct === void 0 ? 0 : ct, + ht = tt.minHeight, + dt = tt.maxHeight, + pt = tt.children, + mt = tt.debounce, + gt = mt === void 0 ? 0 : mt, + yt = tt.id, + bt = tt.className, + vt = tt.onResize, + xt = tt.style, + kt = xt === void 0 ? {} : xt, + St = reactExports.useState({ containerWidth: it.width, containerHeight: it.height }), + Tt = _slicedToArray$9(St, 2), + At = Tt[0], + Et = Tt[1], + $t = reactExports.useRef(null) + reactExports.useImperativeHandle( + et, + function () { + return $t + }, + [$t], + ) + var Dt = reactExports.useCallback(function () { + return $t.current + ? { containerWidth: $t.current.clientWidth, containerHeight: $t.current.clientHeight } + : null + }, []), + jt = reactExports.useCallback( + function () { + var wt = Dt() + if (wt) { + var It = wt.containerWidth, + Ot = wt.containerHeight + vt && vt(It, Ot), + Et(function (Wt) { + var zt = Wt.containerWidth, + Ft = Wt.containerHeight + return It !== zt || Ot !== Ft ? { containerWidth: It, containerHeight: Ot } : Wt + }) + } + }, + [Dt, vt], + ), + Pt = reactExports.useMemo( + function () { + var wt = At.containerWidth, + It = At.containerHeight + if (wt < 0 || It < 0) return null + warn( + isPercent(at) || isPercent(lt), + `The width(%s) and height(%s) are both fixed numbers, + maybe you don't need to use a ResponsiveContainer.`, + at, + lt, + ), + warn(!nt || nt > 0, 'The aspect(%s) must be greater than zero.', nt) + var Ot = isPercent(at) ? wt : at, + Wt = isPercent(lt) ? It : lt + return ( + nt && nt > 0 && (Ot ? (Wt = Ot / nt) : Wt && (Ot = Wt * nt), dt && Wt > dt && (Wt = dt)), + warn( + Ot > 0 || Wt > 0, + `The width(%s) and height(%s) of chart should be greater than 0, + please check the style of container, or the props width(%s) and height(%s), + or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the + height and width.`, + Ot, + Wt, + at, + lt, + ut, + ht, + nt, + ), + reactExports.cloneElement(pt, { width: Ot, height: Wt }) + ) + }, + [nt, pt, lt, dt, ht, ut, At, at], + ) + reactExports.useEffect( + function () { + var wt = Dt() + wt && Et(wt) + }, + [Dt], + ) + var Ct = _objectSpread$r( + _objectSpread$r({}, kt), + {}, + { width: at, height: lt, minWidth: ut, minHeight: ht, maxHeight: dt }, + ) + return React$1.createElement( + ResizeDetector, + { + handleWidth: !0, + handleHeight: !0, + onResize: jt, + targetRef: $t, + refreshMode: gt > 0 ? 'debounce' : void 0, + refreshRate: gt, + }, + React$1.createElement( + 'div', + _extends$n({}, yt != null ? { id: ''.concat(yt) } : {}, { + className: classNames('recharts-responsive-container', bt), + style: Ct, + ref: $t, + }), + Pt, + ), + ) + }), + Cell = function (et) { + return null + } + Cell.displayName = 'Cell' + function _typeof$s(tt) { + '@babel/helpers - typeof' + return ( + (_typeof$s = + typeof Symbol == 'function' && typeof Symbol.iterator == 'symbol' + ? function (et) { + return typeof et + } + : function (et) { + return et && typeof Symbol == 'function' && et.constructor === Symbol && et !== Symbol.prototype + ? 'symbol' + : typeof et + }), + _typeof$s(tt) + ) + } + function ownKeys$q(tt, et) { + var nt = Object.keys(tt) + if (Object.getOwnPropertySymbols) { + var rt = Object.getOwnPropertySymbols(tt) + et && + (rt = rt.filter(function (it) { + return Object.getOwnPropertyDescriptor(tt, it).enumerable + })), + nt.push.apply(nt, rt) + } + return nt + } + function _objectSpread$q(tt) { + for (var et = 1; et < arguments.length; et++) { + var nt = arguments[et] != null ? arguments[et] : {} + et % 2 + ? ownKeys$q(Object(nt), !0).forEach(function (rt) { + _defineProperty$r(tt, rt, nt[rt]) + }) + : Object.getOwnPropertyDescriptors + ? Object.defineProperties(tt, Object.getOwnPropertyDescriptors(nt)) + : ownKeys$q(Object(nt)).forEach(function (rt) { + Object.defineProperty(tt, rt, Object.getOwnPropertyDescriptor(nt, rt)) + }) + } + return tt + } + function _defineProperty$r(tt, et, nt) { + return ( + (et = _toPropertyKey$r(et)), + et in tt + ? Object.defineProperty(tt, et, { value: nt, enumerable: !0, configurable: !0, writable: !0 }) + : (tt[et] = nt), + tt + ) + } + function _toPropertyKey$r(tt) { + var et = _toPrimitive$r(tt, 'string') + return _typeof$s(et) === 'symbol' ? et : String(et) + } + function _toPrimitive$r(tt, et) { + if (_typeof$s(tt) !== 'object' || tt === null) return tt + var nt = tt[Symbol.toPrimitive] + if (nt !== void 0) { + var rt = nt.call(tt, et || 'default') + if (_typeof$s(rt) !== 'object') return rt + throw new TypeError('@@toPrimitive must return a primitive value.') + } + return (et === 'string' ? String : Number)(tt) + } + function _toConsumableArray$9(tt) { + return ( + _arrayWithoutHoles$9(tt) || _iterableToArray$9(tt) || _unsupportedIterableToArray$h(tt) || _nonIterableSpread$9() + ) + } + function _nonIterableSpread$9() { + throw new TypeError(`Invalid attempt to spread non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`) + } + function _unsupportedIterableToArray$h(tt, et) { + if (tt) { + if (typeof tt == 'string') return _arrayLikeToArray$h(tt, et) + var nt = Object.prototype.toString.call(tt).slice(8, -1) + if ((nt === 'Object' && tt.constructor && (nt = tt.constructor.name), nt === 'Map' || nt === 'Set')) + return Array.from(tt) + if (nt === 'Arguments' || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(nt)) return _arrayLikeToArray$h(tt, et) + } + } + function _iterableToArray$9(tt) { + if ((typeof Symbol < 'u' && tt[Symbol.iterator] != null) || tt['@@iterator'] != null) return Array.from(tt) + } + function _arrayWithoutHoles$9(tt) { + if (Array.isArray(tt)) return _arrayLikeToArray$h(tt) + } + function _arrayLikeToArray$h(tt, et) { + ;(et == null || et > tt.length) && (et = tt.length) + for (var nt = 0, rt = new Array(et); nt < et; nt++) rt[nt] = tt[nt] + return rt + } + var stringCache = { widthCache: {}, cacheCount: 0 }, + MAX_CACHE_NUM = 2e3, + SPAN_STYLE = { + position: 'absolute', + top: '-20000px', + left: 0, + padding: 0, + margin: 0, + border: 'none', + whiteSpace: 'pre', + }, + STYLE_LIST = [ + 'minWidth', + 'maxWidth', + 'width', + 'minHeight', + 'maxHeight', + 'height', + 'top', + 'left', + 'fontSize', + 'lineHeight', + 'padding', + 'margin', + 'paddingLeft', + 'paddingRight', + 'paddingTop', + 'paddingBottom', + 'marginLeft', + 'marginRight', + 'marginTop', + 'marginBottom', + ], + MEASUREMENT_SPAN_ID = 'recharts_measurement_span' + function autoCompleteStyle(tt, et) { + return STYLE_LIST.indexOf(tt) >= 0 && et === +et ? ''.concat(et, 'px') : et + } + function camelToMiddleLine(tt) { + var et = tt.split(''), + nt = et.reduce(function (rt, it) { + return it === it.toUpperCase() + ? [].concat(_toConsumableArray$9(rt), ['-', it.toLowerCase()]) + : [].concat(_toConsumableArray$9(rt), [it]) + }, []) + return nt.join('') + } + var getStyleString = function (et) { + return Object.keys(et).reduce(function (nt, rt) { + return ''.concat(nt).concat(camelToMiddleLine(rt), ':').concat(autoCompleteStyle(rt, et[rt]), ';') + }, '') + }, + getStringSize = function (et) { + var nt = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {} + if (et == null || Global.isSsr) return { width: 0, height: 0 } + var rt = ''.concat(et), + it = getStyleString(nt), + ot = ''.concat(rt, '-').concat(it) + if (stringCache.widthCache[ot]) return stringCache.widthCache[ot] + try { + var at = document.getElementById(MEASUREMENT_SPAN_ID) + at || + ((at = document.createElement('span')), + at.setAttribute('id', MEASUREMENT_SPAN_ID), + at.setAttribute('aria-hidden', 'true'), + document.body.appendChild(at)) + var st = _objectSpread$q(_objectSpread$q({}, SPAN_STYLE), nt) + Object.keys(st).map(function (ut) { + return (at.style[ut] = st[ut]), ut + }), + (at.textContent = rt) + var lt = at.getBoundingClientRect(), + ct = { width: lt.width, height: lt.height } + return ( + (stringCache.widthCache[ot] = ct), + ++stringCache.cacheCount > MAX_CACHE_NUM && ((stringCache.cacheCount = 0), (stringCache.widthCache = {})), + ct + ) + } catch { + return { width: 0, height: 0 } + } + }, + getOffset = function (et) { + var nt = et.ownerDocument.documentElement, + rt = { top: 0, left: 0 } + return ( + typeof et.getBoundingClientRect < 'u' && (rt = et.getBoundingClientRect()), + { top: rt.top + window.pageYOffset - nt.clientTop, left: rt.left + window.pageXOffset - nt.clientLeft } + ) + }, + calculateChartCoordinate = function (et, nt) { + return { chartX: Math.round(et.pageX - nt.left), chartY: Math.round(et.pageY - nt.top) } + } + function _typeof$r(tt) { + '@babel/helpers - typeof' + return ( + (_typeof$r = + typeof Symbol == 'function' && typeof Symbol.iterator == 'symbol' + ? function (et) { + return typeof et + } + : function (et) { + return et && typeof Symbol == 'function' && et.constructor === Symbol && et !== Symbol.prototype + ? 'symbol' + : typeof et + }), + _typeof$r(tt) + ) + } + function _slicedToArray$8(tt, et) { + return ( + _arrayWithHoles$8(tt) || + _iterableToArrayLimit$8(tt, et) || + _unsupportedIterableToArray$g(tt, et) || + _nonIterableRest$8() + ) + } + function _nonIterableRest$8() { + throw new TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`) + } + function _unsupportedIterableToArray$g(tt, et) { + if (tt) { + if (typeof tt == 'string') return _arrayLikeToArray$g(tt, et) + var nt = Object.prototype.toString.call(tt).slice(8, -1) + if ((nt === 'Object' && tt.constructor && (nt = tt.constructor.name), nt === 'Map' || nt === 'Set')) + return Array.from(tt) + if (nt === 'Arguments' || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(nt)) return _arrayLikeToArray$g(tt, et) + } + } + function _arrayLikeToArray$g(tt, et) { + ;(et == null || et > tt.length) && (et = tt.length) + for (var nt = 0, rt = new Array(et); nt < et; nt++) rt[nt] = tt[nt] + return rt + } + function _iterableToArrayLimit$8(tt, et) { + var nt = tt == null ? null : (typeof Symbol < 'u' && tt[Symbol.iterator]) || tt['@@iterator'] + if (nt != null) { + var rt, + it, + ot, + at, + st = [], + lt = !0, + ct = !1 + try { + if (((ot = (nt = nt.call(tt)).next), et === 0)) { + if (Object(nt) !== nt) return + lt = !1 + } else for (; !(lt = (rt = ot.call(nt)).done) && (st.push(rt.value), st.length !== et); lt = !0); + } catch (ut) { + ;(ct = !0), (it = ut) + } finally { + try { + if (!lt && nt.return != null && ((at = nt.return()), Object(at) !== at)) return + } finally { + if (ct) throw it + } + } + return st + } + } + function _arrayWithHoles$8(tt) { + if (Array.isArray(tt)) return tt + } + function _classCallCheck$a(tt, et) { + if (!(tt instanceof et)) throw new TypeError('Cannot call a class as a function') + } + function _defineProperties$a(tt, et) { + for (var nt = 0; nt < et.length; nt++) { + var rt = et[nt] + ;(rt.enumerable = rt.enumerable || !1), + (rt.configurable = !0), + 'value' in rt && (rt.writable = !0), + Object.defineProperty(tt, _toPropertyKey$q(rt.key), rt) + } + } + function _createClass$a(tt, et, nt) { + return ( + et && _defineProperties$a(tt.prototype, et), + nt && _defineProperties$a(tt, nt), + Object.defineProperty(tt, 'prototype', { writable: !1 }), + tt + ) + } + function _toPropertyKey$q(tt) { + var et = _toPrimitive$q(tt, 'string') + return _typeof$r(et) === 'symbol' ? et : String(et) + } + function _toPrimitive$q(tt, et) { + if (_typeof$r(tt) !== 'object' || tt === null) return tt + var nt = tt[Symbol.toPrimitive] + if (nt !== void 0) { + var rt = nt.call(tt, et || 'default') + if (_typeof$r(rt) !== 'object') return rt + throw new TypeError('@@toPrimitive must return a primitive value.') + } + return (et === 'string' ? String : Number)(tt) + } + var MULTIPLY_OR_DIVIDE_REGEX = /(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/, + ADD_OR_SUBTRACT_REGEX = /(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/, + CSS_LENGTH_UNIT_REGEX = /^px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q$/, + NUM_SPLIT_REGEX = /(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/, + CONVERSION_RATES = { cm: 96 / 2.54, mm: 96 / 25.4, pt: 96 / 72, pc: 96 / 6, in: 96, Q: 96 / (2.54 * 40), px: 1 }, + FIXED_CSS_LENGTH_UNITS = Object.keys(CONVERSION_RATES), + STR_NAN = 'NaN' + function convertToPx(tt, et) { + return tt * CONVERSION_RATES[et] + } + var DecimalCSS = (function () { + function tt(et, nt) { + _classCallCheck$a(this, tt), + (this.num = et), + (this.unit = nt), + (this.num = et), + (this.unit = nt), + Number.isNaN(et) && (this.unit = ''), + nt !== '' && !CSS_LENGTH_UNIT_REGEX.test(nt) && ((this.num = NaN), (this.unit = '')), + FIXED_CSS_LENGTH_UNITS.includes(nt) && ((this.num = convertToPx(et, nt)), (this.unit = 'px')) + } + return ( + _createClass$a( + tt, + [ + { + key: 'add', + value: function (nt) { + return this.unit !== nt.unit ? new tt(NaN, '') : new tt(this.num + nt.num, this.unit) + }, + }, + { + key: 'subtract', + value: function (nt) { + return this.unit !== nt.unit ? new tt(NaN, '') : new tt(this.num - nt.num, this.unit) + }, + }, + { + key: 'multiply', + value: function (nt) { + return this.unit !== '' && nt.unit !== '' && this.unit !== nt.unit + ? new tt(NaN, '') + : new tt(this.num * nt.num, this.unit || nt.unit) + }, + }, + { + key: 'divide', + value: function (nt) { + return this.unit !== '' && nt.unit !== '' && this.unit !== nt.unit + ? new tt(NaN, '') + : new tt(this.num / nt.num, this.unit || nt.unit) + }, + }, + { + key: 'toString', + value: function () { + return ''.concat(this.num).concat(this.unit) + }, + }, + { + key: 'isNaN', + value: function () { + return Number.isNaN(this.num) + }, + }, + ], + [ + { + key: 'parse', + value: function (nt) { + var rt, + it = (rt = NUM_SPLIT_REGEX.exec(nt)) !== null && rt !== void 0 ? rt : [], + ot = _slicedToArray$8(it, 3), + at = ot[1], + st = ot[2] + return new tt(parseFloat(at), st ?? '') + }, + }, + ], + ), + tt + ) + })() + function calculateArithmetic(tt) { + if (tt.includes(STR_NAN)) return STR_NAN + for (var et = tt; et.includes('*') || et.includes('/'); ) { + var nt, + rt = (nt = MULTIPLY_OR_DIVIDE_REGEX.exec(et)) !== null && nt !== void 0 ? nt : [], + it = _slicedToArray$8(rt, 4), + ot = it[1], + at = it[2], + st = it[3], + lt = DecimalCSS.parse(ot ?? ''), + ct = DecimalCSS.parse(st ?? ''), + ut = at === '*' ? lt.multiply(ct) : lt.divide(ct) + if (ut.isNaN()) return STR_NAN + et = et.replace(MULTIPLY_OR_DIVIDE_REGEX, ut.toString()) + } + for (; et.includes('+') || /.-\d+(?:\.\d+)?/.test(et); ) { + var ht, + dt = (ht = ADD_OR_SUBTRACT_REGEX.exec(et)) !== null && ht !== void 0 ? ht : [], + pt = _slicedToArray$8(dt, 4), + mt = pt[1], + gt = pt[2], + yt = pt[3], + bt = DecimalCSS.parse(mt ?? ''), + vt = DecimalCSS.parse(yt ?? ''), + xt = gt === '+' ? bt.add(vt) : bt.subtract(vt) + if (xt.isNaN()) return STR_NAN + et = et.replace(ADD_OR_SUBTRACT_REGEX, xt.toString()) + } + return et + } + var PARENTHESES_REGEX = /\(([^()]*)\)/ + function calculateParentheses(tt) { + for (var et = tt; et.includes('('); ) { + var nt = PARENTHESES_REGEX.exec(et), + rt = _slicedToArray$8(nt, 2), + it = rt[1] + et = et.replace(PARENTHESES_REGEX, calculateArithmetic(it)) + } + return et + } + function evaluateExpression(tt) { + var et = tt.replace(/\s+/g, '') + return (et = calculateParentheses(et)), (et = calculateArithmetic(et)), et + } + function safeEvaluateExpression(tt) { + try { + return evaluateExpression(tt) + } catch { + return STR_NAN + } + } + function reduceCSSCalc(tt) { + var et = safeEvaluateExpression(tt.slice(5, -1)) + return et === STR_NAN ? '' : et + } + var _excluded$c = ['x', 'y', 'lineHeight', 'capHeight', 'scaleToFit', 'textAnchor', 'verticalAnchor', 'fill'], + _excluded2$4 = ['dx', 'dy', 'angle', 'className', 'breakAll'] + function _extends$m() { + return ( + (_extends$m = Object.assign + ? Object.assign.bind() + : function (tt) { + for (var et = 1; et < arguments.length; et++) { + var nt = arguments[et] + for (var rt in nt) Object.prototype.hasOwnProperty.call(nt, rt) && (tt[rt] = nt[rt]) + } + return tt + }), + _extends$m.apply(this, arguments) + ) + } + function _objectWithoutProperties$c(tt, et) { + if (tt == null) return {} + var nt = _objectWithoutPropertiesLoose$c(tt, et), + rt, + it + if (Object.getOwnPropertySymbols) { + var ot = Object.getOwnPropertySymbols(tt) + for (it = 0; it < ot.length; it++) + (rt = ot[it]), !(et.indexOf(rt) >= 0) && Object.prototype.propertyIsEnumerable.call(tt, rt) && (nt[rt] = tt[rt]) + } + return nt + } + function _objectWithoutPropertiesLoose$c(tt, et) { + if (tt == null) return {} + var nt = {}, + rt = Object.keys(tt), + it, + ot + for (ot = 0; ot < rt.length; ot++) (it = rt[ot]), !(et.indexOf(it) >= 0) && (nt[it] = tt[it]) + return nt + } + function _slicedToArray$7(tt, et) { + return ( + _arrayWithHoles$7(tt) || + _iterableToArrayLimit$7(tt, et) || + _unsupportedIterableToArray$f(tt, et) || + _nonIterableRest$7() + ) + } + function _nonIterableRest$7() { + throw new TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`) + } + function _unsupportedIterableToArray$f(tt, et) { + if (tt) { + if (typeof tt == 'string') return _arrayLikeToArray$f(tt, et) + var nt = Object.prototype.toString.call(tt).slice(8, -1) + if ((nt === 'Object' && tt.constructor && (nt = tt.constructor.name), nt === 'Map' || nt === 'Set')) + return Array.from(tt) + if (nt === 'Arguments' || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(nt)) return _arrayLikeToArray$f(tt, et) + } + } + function _arrayLikeToArray$f(tt, et) { + ;(et == null || et > tt.length) && (et = tt.length) + for (var nt = 0, rt = new Array(et); nt < et; nt++) rt[nt] = tt[nt] + return rt + } + function _iterableToArrayLimit$7(tt, et) { + var nt = tt == null ? null : (typeof Symbol < 'u' && tt[Symbol.iterator]) || tt['@@iterator'] + if (nt != null) { + var rt, + it, + ot, + at, + st = [], + lt = !0, + ct = !1 + try { + if (((ot = (nt = nt.call(tt)).next), et === 0)) { + if (Object(nt) !== nt) return + lt = !1 + } else for (; !(lt = (rt = ot.call(nt)).done) && (st.push(rt.value), st.length !== et); lt = !0); + } catch (ut) { + ;(ct = !0), (it = ut) + } finally { + try { + if (!lt && nt.return != null && ((at = nt.return()), Object(at) !== at)) return + } finally { + if (ct) throw it + } + } + return st + } + } + function _arrayWithHoles$7(tt) { + if (Array.isArray(tt)) return tt + } + var BREAKING_SPACES = /[ \f\n\r\t\v\u2028\u2029]+/, + calculateWordWidths = function (et) { + var nt = et.children, + rt = et.breakAll, + it = et.style + try { + var ot = [] + _isNil(nt) || (rt ? (ot = nt.toString().split('')) : (ot = nt.toString().split(BREAKING_SPACES))) + var at = ot.map(function (lt) { + return { word: lt, width: getStringSize(lt, it).width } + }), + st = rt ? 0 : getStringSize(' ', it).width + return { wordsWithComputedWidth: at, spaceWidth: st } + } catch { + return null + } + }, + calculateWordsByLines = function (et, nt, rt, it, ot) { + var at = et.maxLines, + st = et.children, + lt = et.style, + ct = et.breakAll, + ut = isNumber(at), + ht = st, + dt = function () { + var It = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [] + return It.reduce(function (Ot, Wt) { + var zt = Wt.word, + Ft = Wt.width, + Nt = Ot[Ot.length - 1] + if (Nt && (it == null || ot || Nt.width + Ft + rt < Number(it))) Nt.words.push(zt), (Nt.width += Ft + rt) + else { + var Ut = { words: [zt], width: Ft } + Ot.push(Ut) + } + return Ot + }, []) + }, + pt = dt(nt), + mt = function (It) { + return It.reduce(function (Ot, Wt) { + return Ot.width > Wt.width ? Ot : Wt + }) + } + if (!ut) return pt + for ( + var gt = '…', + yt = function (It) { + var Ot = ht.slice(0, It), + Wt = calculateWordWidths({ breakAll: ct, style: lt, children: Ot + gt }).wordsWithComputedWidth, + zt = dt(Wt), + Ft = zt.length > at || mt(zt).width > Number(it) + return [Ft, zt] + }, + bt = 0, + vt = ht.length - 1, + xt = 0, + kt; + bt <= vt && xt <= ht.length - 1; + + ) { + var St = Math.floor((bt + vt) / 2), + Tt = St - 1, + At = yt(Tt), + Et = _slicedToArray$7(At, 2), + $t = Et[0], + Dt = Et[1], + jt = yt(St), + Pt = _slicedToArray$7(jt, 1), + Ct = Pt[0] + if ((!$t && !Ct && (bt = St + 1), $t && Ct && (vt = St - 1), !$t && Ct)) { + kt = Dt + break + } + xt++ + } + return kt || pt + }, + getWordsWithoutCalculate = function (et) { + var nt = _isNil(et) ? [] : et.toString().split(BREAKING_SPACES) + return [{ words: nt }] + }, + getWordsByLines = function (et) { + var nt = et.width, + rt = et.scaleToFit, + it = et.children, + ot = et.style, + at = et.breakAll, + st = et.maxLines + if ((nt || rt) && !Global.isSsr) { + var lt, + ct, + ut = calculateWordWidths({ breakAll: at, children: it, style: ot }) + if (ut) { + var ht = ut.wordsWithComputedWidth, + dt = ut.spaceWidth + ;(lt = ht), (ct = dt) + } else return getWordsWithoutCalculate(it) + return calculateWordsByLines({ breakAll: at, children: it, maxLines: st, style: ot }, lt, ct, nt, rt) + } + return getWordsWithoutCalculate(it) + }, + DEFAULT_FILL = '#808080', + Text = function (et) { + var nt = et.x, + rt = nt === void 0 ? 0 : nt, + it = et.y, + ot = it === void 0 ? 0 : it, + at = et.lineHeight, + st = at === void 0 ? '1em' : at, + lt = et.capHeight, + ct = lt === void 0 ? '0.71em' : lt, + ut = et.scaleToFit, + ht = ut === void 0 ? !1 : ut, + dt = et.textAnchor, + pt = dt === void 0 ? 'start' : dt, + mt = et.verticalAnchor, + gt = mt === void 0 ? 'end' : mt, + yt = et.fill, + bt = yt === void 0 ? DEFAULT_FILL : yt, + vt = _objectWithoutProperties$c(et, _excluded$c), + xt = reactExports.useMemo( + function () { + return getWordsByLines({ + breakAll: vt.breakAll, + children: vt.children, + maxLines: vt.maxLines, + scaleToFit: ht, + style: vt.style, + width: vt.width, + }) + }, + [vt.breakAll, vt.children, vt.maxLines, ht, vt.style, vt.width], + ), + kt = vt.dx, + St = vt.dy, + Tt = vt.angle, + At = vt.className, + Et = vt.breakAll, + $t = _objectWithoutProperties$c(vt, _excluded2$4) + if (!isNumOrStr(rt) || !isNumOrStr(ot)) return null + var Dt = rt + (isNumber(kt) ? kt : 0), + jt = ot + (isNumber(St) ? St : 0), + Pt + switch (gt) { + case 'start': + Pt = reduceCSSCalc('calc('.concat(ct, ')')) + break + case 'middle': + Pt = reduceCSSCalc( + 'calc(' + .concat((xt.length - 1) / 2, ' * -') + .concat(st, ' + (') + .concat(ct, ' / 2))'), + ) + break + default: + Pt = reduceCSSCalc('calc('.concat(xt.length - 1, ' * -').concat(st, ')')) + break + } + var Ct = [] + if (ht) { + var wt = xt[0].width, + It = vt.width + Ct.push('scale('.concat((isNumber(It) ? It / wt : 1) / wt, ')')) + } + return ( + Tt && Ct.push('rotate('.concat(Tt, ', ').concat(Dt, ', ').concat(jt, ')')), + Ct.length && ($t.transform = Ct.join(' ')), + React$1.createElement( + 'text', + _extends$m({}, filterProps($t, !0), { + x: Dt, + y: jt, + className: classNames('recharts-text', At), + textAnchor: pt, + fill: bt.includes('url') ? DEFAULT_FILL : bt, + }), + xt.map(function (Ot, Wt) { + return React$1.createElement( + 'tspan', + { x: Dt, dy: Wt === 0 ? Pt : st, key: Wt }, + Ot.words.join(Et ? '' : ' '), + ) + }), + ) + ) + }, + baseIsEqual = _baseIsEqual + function isEqual$1(tt, et) { + return baseIsEqual(tt, et) + } + var isEqual_1 = isEqual$1 + const _isEqual = getDefaultExportFromCjs(isEqual_1) + var isSymbol = isSymbol_1 + function baseExtremum$2(tt, et, nt) { + for (var rt = -1, it = tt.length; ++rt < it; ) { + var ot = tt[rt], + at = et(ot) + if (at != null && (st === void 0 ? at === at && !isSymbol(at) : nt(at, st))) + var st = at, + lt = ot + } + return lt + } + var _baseExtremum = baseExtremum$2 + function baseGt$1(tt, et) { + return tt > et + } + var _baseGt = baseGt$1, + baseExtremum$1 = _baseExtremum, + baseGt = _baseGt, + identity$7 = identity_1 + function max$1(tt) { + return tt && tt.length ? baseExtremum$1(tt, identity$7, baseGt) : void 0 + } + var max_1 = max$1 + const _max = getDefaultExportFromCjs(max_1) + function baseLt$1(tt, et) { + return tt < et + } + var _baseLt = baseLt$1, + baseExtremum = _baseExtremum, + baseLt = _baseLt, + identity$6 = identity_1 + function min$1(tt) { + return tt && tt.length ? baseExtremum(tt, identity$6, baseLt) : void 0 + } + var min_1 = min$1 + const _min = getDefaultExportFromCjs(min_1) + var arrayMap = _arrayMap, + baseIteratee$5 = _baseIteratee, + baseMap = _baseMap, + isArray$2 = isArray_1 + function map$4(tt, et) { + var nt = isArray$2(tt) ? arrayMap : baseMap + return nt(tt, baseIteratee$5(et)) + } + var map_1 = map$4, + baseFlatten = _baseFlatten, + map$3 = map_1 + function flatMap(tt, et) { + return baseFlatten(map$3(tt, et), 1) + } + var flatMap_1 = flatMap + const _flatMap = getDefaultExportFromCjs(flatMap_1) + function ascending$1(tt, et) { + return tt == null || et == null ? NaN : tt < et ? -1 : tt > et ? 1 : tt >= et ? 0 : NaN + } + function descending(tt, et) { + return tt == null || et == null ? NaN : et < tt ? -1 : et > tt ? 1 : et >= tt ? 0 : NaN + } + function bisector(tt) { + let et, nt, rt + tt.length !== 2 + ? ((et = ascending$1), (nt = (st, lt) => ascending$1(tt(st), lt)), (rt = (st, lt) => tt(st) - lt)) + : ((et = tt === ascending$1 || tt === descending ? tt : zero$1), (nt = tt), (rt = tt)) + function it(st, lt, ct = 0, ut = st.length) { + if (ct < ut) { + if (et(lt, lt) !== 0) return ut + do { + const ht = (ct + ut) >>> 1 + nt(st[ht], lt) < 0 ? (ct = ht + 1) : (ut = ht) + } while (ct < ut) + } + return ct + } + function ot(st, lt, ct = 0, ut = st.length) { + if (ct < ut) { + if (et(lt, lt) !== 0) return ut + do { + const ht = (ct + ut) >>> 1 + nt(st[ht], lt) <= 0 ? (ct = ht + 1) : (ut = ht) + } while (ct < ut) + } + return ct + } + function at(st, lt, ct = 0, ut = st.length) { + const ht = it(st, lt, ct, ut - 1) + return ht > ct && rt(st[ht - 1], lt) > -rt(st[ht], lt) ? ht - 1 : ht + } + return { left: it, center: at, right: ot } + } + function zero$1() { + return 0 + } + function number$3(tt) { + return tt === null ? NaN : +tt + } + function* numbers(tt, et) { + if (et === void 0) for (let nt of tt) nt != null && (nt = +nt) >= nt && (yield nt) + else { + let nt = -1 + for (let rt of tt) (rt = et(rt, ++nt, tt)) != null && (rt = +rt) >= rt && (yield rt) + } + } + const ascendingBisect = bisector(ascending$1), + bisectRight = ascendingBisect.right + bisector(number$3).center + const bisect = bisectRight + class InternMap extends Map { + constructor(et, nt = keyof) { + if ((super(), Object.defineProperties(this, { _intern: { value: new Map() }, _key: { value: nt } }), et != null)) + for (const [rt, it] of et) this.set(rt, it) + } + get(et) { + return super.get(intern_get(this, et)) + } + has(et) { + return super.has(intern_get(this, et)) + } + set(et, nt) { + return super.set(intern_set(this, et), nt) + } + delete(et) { + return super.delete(intern_delete(this, et)) + } + } + function intern_get({ _intern: tt, _key: et }, nt) { + const rt = et(nt) + return tt.has(rt) ? tt.get(rt) : nt + } + function intern_set({ _intern: tt, _key: et }, nt) { + const rt = et(nt) + return tt.has(rt) ? tt.get(rt) : (tt.set(rt, nt), nt) + } + function intern_delete({ _intern: tt, _key: et }, nt) { + const rt = et(nt) + return tt.has(rt) && ((nt = tt.get(rt)), tt.delete(rt)), nt + } + function keyof(tt) { + return tt !== null && typeof tt == 'object' ? tt.valueOf() : tt + } + function compareDefined(tt = ascending$1) { + if (tt === ascending$1) return ascendingDefined + if (typeof tt != 'function') throw new TypeError('compare is not a function') + return (et, nt) => { + const rt = tt(et, nt) + return rt || rt === 0 ? rt : (tt(nt, nt) === 0) - (tt(et, et) === 0) + } + } + function ascendingDefined(tt, et) { + return (tt == null || !(tt >= tt)) - (et == null || !(et >= et)) || (tt < et ? -1 : tt > et ? 1 : 0) + } + const e10 = Math.sqrt(50), + e5 = Math.sqrt(10), + e2 = Math.sqrt(2) + function tickSpec(tt, et, nt) { + const rt = (et - tt) / Math.max(0, nt), + it = Math.floor(Math.log10(rt)), + ot = rt / Math.pow(10, it), + at = ot >= e10 ? 10 : ot >= e5 ? 5 : ot >= e2 ? 2 : 1 + let st, lt, ct + return ( + it < 0 + ? ((ct = Math.pow(10, -it) / at), + (st = Math.round(tt * ct)), + (lt = Math.round(et * ct)), + st / ct < tt && ++st, + lt / ct > et && --lt, + (ct = -ct)) + : ((ct = Math.pow(10, it) * at), + (st = Math.round(tt / ct)), + (lt = Math.round(et / ct)), + st * ct < tt && ++st, + lt * ct > et && --lt), + lt < st && 0.5 <= nt && nt < 2 ? tickSpec(tt, et, nt * 2) : [st, lt, ct] + ) + } + function ticks(tt, et, nt) { + if (((et = +et), (tt = +tt), (nt = +nt), !(nt > 0))) return [] + if (tt === et) return [tt] + const rt = et < tt, + [it, ot, at] = rt ? tickSpec(et, tt, nt) : tickSpec(tt, et, nt) + if (!(ot >= it)) return [] + const st = ot - it + 1, + lt = new Array(st) + if (rt) + if (at < 0) for (let ct = 0; ct < st; ++ct) lt[ct] = (ot - ct) / -at + else for (let ct = 0; ct < st; ++ct) lt[ct] = (ot - ct) * at + else if (at < 0) for (let ct = 0; ct < st; ++ct) lt[ct] = (it + ct) / -at + else for (let ct = 0; ct < st; ++ct) lt[ct] = (it + ct) * at + return lt + } + function tickIncrement(tt, et, nt) { + return (et = +et), (tt = +tt), (nt = +nt), tickSpec(tt, et, nt)[2] + } + function tickStep(tt, et, nt) { + ;(et = +et), (tt = +tt), (nt = +nt) + const rt = et < tt, + it = rt ? tickIncrement(et, tt, nt) : tickIncrement(tt, et, nt) + return (rt ? -1 : 1) * (it < 0 ? 1 / -it : it) + } + function max(tt, et) { + let nt + if (et === void 0) for (const rt of tt) rt != null && (nt < rt || (nt === void 0 && rt >= rt)) && (nt = rt) + else { + let rt = -1 + for (let it of tt) (it = et(it, ++rt, tt)) != null && (nt < it || (nt === void 0 && it >= it)) && (nt = it) + } + return nt + } + function min(tt, et) { + let nt + if (et === void 0) for (const rt of tt) rt != null && (nt > rt || (nt === void 0 && rt >= rt)) && (nt = rt) + else { + let rt = -1 + for (let it of tt) (it = et(it, ++rt, tt)) != null && (nt > it || (nt === void 0 && it >= it)) && (nt = it) + } + return nt + } + function quickselect(tt, et, nt = 0, rt = 1 / 0, it) { + if ( + ((et = Math.floor(et)), + (nt = Math.floor(Math.max(0, nt))), + (rt = Math.floor(Math.min(tt.length - 1, rt))), + !(nt <= et && et <= rt)) + ) + return tt + for (it = it === void 0 ? ascendingDefined : compareDefined(it); rt > nt; ) { + if (rt - nt > 600) { + const lt = rt - nt + 1, + ct = et - nt + 1, + ut = Math.log(lt), + ht = 0.5 * Math.exp((2 * ut) / 3), + dt = 0.5 * Math.sqrt((ut * ht * (lt - ht)) / lt) * (ct - lt / 2 < 0 ? -1 : 1), + pt = Math.max(nt, Math.floor(et - (ct * ht) / lt + dt)), + mt = Math.min(rt, Math.floor(et + ((lt - ct) * ht) / lt + dt)) + quickselect(tt, et, pt, mt, it) + } + const ot = tt[et] + let at = nt, + st = rt + for (swap(tt, nt, et), it(tt[rt], ot) > 0 && swap(tt, nt, rt); at < st; ) { + for (swap(tt, at, st), ++at, --st; it(tt[at], ot) < 0; ) ++at + for (; it(tt[st], ot) > 0; ) --st + } + it(tt[nt], ot) === 0 ? swap(tt, nt, st) : (++st, swap(tt, st, rt)), + st <= et && (nt = st + 1), + et <= st && (rt = st - 1) + } + return tt + } + function swap(tt, et, nt) { + const rt = tt[et] + ;(tt[et] = tt[nt]), (tt[nt] = rt) + } + function quantile$1(tt, et, nt) { + if (((tt = Float64Array.from(numbers(tt, nt))), !(!(rt = tt.length) || isNaN((et = +et))))) { + if (et <= 0 || rt < 2) return min(tt) + if (et >= 1) return max(tt) + var rt, + it = (rt - 1) * et, + ot = Math.floor(it), + at = max(quickselect(tt, ot).subarray(0, ot + 1)), + st = min(tt.subarray(ot + 1)) + return at + (st - at) * (it - ot) + } + } + function quantileSorted(tt, et, nt = number$3) { + if (!(!(rt = tt.length) || isNaN((et = +et)))) { + if (et <= 0 || rt < 2) return +nt(tt[0], 0, tt) + if (et >= 1) return +nt(tt[rt - 1], rt - 1, tt) + var rt, + it = (rt - 1) * et, + ot = Math.floor(it), + at = +nt(tt[ot], ot, tt), + st = +nt(tt[ot + 1], ot + 1, tt) + return at + (st - at) * (it - ot) + } + } + function range$2(tt, et, nt) { + ;(tt = +tt), (et = +et), (nt = (it = arguments.length) < 2 ? ((et = tt), (tt = 0), 1) : it < 3 ? 1 : +nt) + for (var rt = -1, it = Math.max(0, Math.ceil((et - tt) / nt)) | 0, ot = new Array(it); ++rt < it; ) + ot[rt] = tt + rt * nt + return ot + } + function initRange(tt, et) { + switch (arguments.length) { + case 0: + break + case 1: + this.range(tt) + break + default: + this.range(et).domain(tt) + break + } + return this + } + function initInterpolator(tt, et) { + switch (arguments.length) { + case 0: + break + case 1: { + typeof tt == 'function' ? this.interpolator(tt) : this.range(tt) + break + } + default: { + this.domain(tt), typeof et == 'function' ? this.interpolator(et) : this.range(et) + break + } + } + return this + } + const implicit = Symbol('implicit') + function ordinal() { + var tt = new InternMap(), + et = [], + nt = [], + rt = implicit + function it(ot) { + let at = tt.get(ot) + if (at === void 0) { + if (rt !== implicit) return rt + tt.set(ot, (at = et.push(ot) - 1)) + } + return nt[at % nt.length] + } + return ( + (it.domain = function (ot) { + if (!arguments.length) return et.slice() + ;(et = []), (tt = new InternMap()) + for (const at of ot) tt.has(at) || tt.set(at, et.push(at) - 1) + return it + }), + (it.range = function (ot) { + return arguments.length ? ((nt = Array.from(ot)), it) : nt.slice() + }), + (it.unknown = function (ot) { + return arguments.length ? ((rt = ot), it) : rt + }), + (it.copy = function () { + return ordinal(et, nt).unknown(rt) + }), + initRange.apply(it, arguments), + it + ) + } + function band() { + var tt = ordinal().unknown(void 0), + et = tt.domain, + nt = tt.range, + rt = 0, + it = 1, + ot, + at, + st = !1, + lt = 0, + ct = 0, + ut = 0.5 + delete tt.unknown + function ht() { + var dt = et().length, + pt = it < rt, + mt = pt ? it : rt, + gt = pt ? rt : it + ;(ot = (gt - mt) / Math.max(1, dt - lt + ct * 2)), + st && (ot = Math.floor(ot)), + (mt += (gt - mt - ot * (dt - lt)) * ut), + (at = ot * (1 - lt)), + st && ((mt = Math.round(mt)), (at = Math.round(at))) + var yt = range$2(dt).map(function (bt) { + return mt + ot * bt + }) + return nt(pt ? yt.reverse() : yt) + } + return ( + (tt.domain = function (dt) { + return arguments.length ? (et(dt), ht()) : et() + }), + (tt.range = function (dt) { + return arguments.length ? (([rt, it] = dt), (rt = +rt), (it = +it), ht()) : [rt, it] + }), + (tt.rangeRound = function (dt) { + return ([rt, it] = dt), (rt = +rt), (it = +it), (st = !0), ht() + }), + (tt.bandwidth = function () { + return at + }), + (tt.step = function () { + return ot + }), + (tt.round = function (dt) { + return arguments.length ? ((st = !!dt), ht()) : st + }), + (tt.padding = function (dt) { + return arguments.length ? ((lt = Math.min(1, (ct = +dt))), ht()) : lt + }), + (tt.paddingInner = function (dt) { + return arguments.length ? ((lt = Math.min(1, dt)), ht()) : lt + }), + (tt.paddingOuter = function (dt) { + return arguments.length ? ((ct = +dt), ht()) : ct + }), + (tt.align = function (dt) { + return arguments.length ? ((ut = Math.max(0, Math.min(1, dt))), ht()) : ut + }), + (tt.copy = function () { + return band(et(), [rt, it]).round(st).paddingInner(lt).paddingOuter(ct).align(ut) + }), + initRange.apply(ht(), arguments) + ) + } + function pointish(tt) { + var et = tt.copy + return ( + (tt.padding = tt.paddingOuter), + delete tt.paddingInner, + delete tt.paddingOuter, + (tt.copy = function () { + return pointish(et()) + }), + tt + ) + } + function point() { + return pointish(band.apply(null, arguments).paddingInner(1)) + } + function define(tt, et, nt) { + ;(tt.prototype = et.prototype = nt), (nt.constructor = tt) + } + function extend(tt, et) { + var nt = Object.create(tt.prototype) + for (var rt in et) nt[rt] = et[rt] + return nt + } + function Color() {} + var darker = 0.7, + brighter = 1 / darker, + reI = '\\s*([+-]?\\d+)\\s*', + reN = '\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*', + reP = '\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*', + reHex = /^#([0-9a-f]{3,8})$/, + reRgbInteger = new RegExp(`^rgb\\(${reI},${reI},${reI}\\)$`), + reRgbPercent = new RegExp(`^rgb\\(${reP},${reP},${reP}\\)$`), + reRgbaInteger = new RegExp(`^rgba\\(${reI},${reI},${reI},${reN}\\)$`), + reRgbaPercent = new RegExp(`^rgba\\(${reP},${reP},${reP},${reN}\\)$`), + reHslPercent = new RegExp(`^hsl\\(${reN},${reP},${reP}\\)$`), + reHslaPercent = new RegExp(`^hsla\\(${reN},${reP},${reP},${reN}\\)$`), + named = { + aliceblue: 15792383, + antiquewhite: 16444375, + aqua: 65535, + aquamarine: 8388564, + azure: 15794175, + beige: 16119260, + bisque: 16770244, + black: 0, + blanchedalmond: 16772045, + blue: 255, + blueviolet: 9055202, + brown: 10824234, + burlywood: 14596231, + cadetblue: 6266528, + chartreuse: 8388352, + chocolate: 13789470, + coral: 16744272, + cornflowerblue: 6591981, + cornsilk: 16775388, + crimson: 14423100, + cyan: 65535, + darkblue: 139, + darkcyan: 35723, + darkgoldenrod: 12092939, + darkgray: 11119017, + darkgreen: 25600, + darkgrey: 11119017, + darkkhaki: 12433259, + darkmagenta: 9109643, + darkolivegreen: 5597999, + darkorange: 16747520, + darkorchid: 10040012, + darkred: 9109504, + darksalmon: 15308410, + darkseagreen: 9419919, + darkslateblue: 4734347, + darkslategray: 3100495, + darkslategrey: 3100495, + darkturquoise: 52945, + darkviolet: 9699539, + deeppink: 16716947, + deepskyblue: 49151, + dimgray: 6908265, + dimgrey: 6908265, + dodgerblue: 2003199, + firebrick: 11674146, + floralwhite: 16775920, + forestgreen: 2263842, + fuchsia: 16711935, + gainsboro: 14474460, + ghostwhite: 16316671, + gold: 16766720, + goldenrod: 14329120, + gray: 8421504, + green: 32768, + greenyellow: 11403055, + grey: 8421504, + honeydew: 15794160, + hotpink: 16738740, + indianred: 13458524, + indigo: 4915330, + ivory: 16777200, + khaki: 15787660, + lavender: 15132410, + lavenderblush: 16773365, + lawngreen: 8190976, + lemonchiffon: 16775885, + lightblue: 11393254, + lightcoral: 15761536, + lightcyan: 14745599, + lightgoldenrodyellow: 16448210, + lightgray: 13882323, + lightgreen: 9498256, + lightgrey: 13882323, + lightpink: 16758465, + lightsalmon: 16752762, + lightseagreen: 2142890, + lightskyblue: 8900346, + lightslategray: 7833753, + lightslategrey: 7833753, + lightsteelblue: 11584734, + lightyellow: 16777184, + lime: 65280, + limegreen: 3329330, + linen: 16445670, + magenta: 16711935, + maroon: 8388608, + mediumaquamarine: 6737322, + mediumblue: 205, + mediumorchid: 12211667, + mediumpurple: 9662683, + mediumseagreen: 3978097, + mediumslateblue: 8087790, + mediumspringgreen: 64154, + mediumturquoise: 4772300, + mediumvioletred: 13047173, + midnightblue: 1644912, + mintcream: 16121850, + mistyrose: 16770273, + moccasin: 16770229, + navajowhite: 16768685, + navy: 128, + oldlace: 16643558, + olive: 8421376, + olivedrab: 7048739, + orange: 16753920, + orangered: 16729344, + orchid: 14315734, + palegoldenrod: 15657130, + palegreen: 10025880, + paleturquoise: 11529966, + palevioletred: 14381203, + papayawhip: 16773077, + peachpuff: 16767673, + peru: 13468991, + pink: 16761035, + plum: 14524637, + powderblue: 11591910, + purple: 8388736, + rebeccapurple: 6697881, + red: 16711680, + rosybrown: 12357519, + royalblue: 4286945, + saddlebrown: 9127187, + salmon: 16416882, + sandybrown: 16032864, + seagreen: 3050327, + seashell: 16774638, + sienna: 10506797, + silver: 12632256, + skyblue: 8900331, + slateblue: 6970061, + slategray: 7372944, + slategrey: 7372944, + snow: 16775930, + springgreen: 65407, + steelblue: 4620980, + tan: 13808780, + teal: 32896, + thistle: 14204888, + tomato: 16737095, + turquoise: 4251856, + violet: 15631086, + wheat: 16113331, + white: 16777215, + whitesmoke: 16119285, + yellow: 16776960, + yellowgreen: 10145074, + } + define(Color, color, { + copy(tt) { + return Object.assign(new this.constructor(), this, tt) + }, + displayable() { + return this.rgb().displayable() + }, + hex: color_formatHex, + formatHex: color_formatHex, + formatHex8: color_formatHex8, + formatHsl: color_formatHsl, + formatRgb: color_formatRgb, + toString: color_formatRgb, + }) + function color_formatHex() { + return this.rgb().formatHex() + } + function color_formatHex8() { + return this.rgb().formatHex8() + } + function color_formatHsl() { + return hslConvert(this).formatHsl() + } + function color_formatRgb() { + return this.rgb().formatRgb() + } + function color(tt) { + var et, nt + return ( + (tt = (tt + '').trim().toLowerCase()), + (et = reHex.exec(tt)) + ? ((nt = et[1].length), + (et = parseInt(et[1], 16)), + nt === 6 + ? rgbn(et) + : nt === 3 + ? new Rgb( + ((et >> 8) & 15) | ((et >> 4) & 240), + ((et >> 4) & 15) | (et & 240), + ((et & 15) << 4) | (et & 15), + 1, + ) + : nt === 8 + ? rgba((et >> 24) & 255, (et >> 16) & 255, (et >> 8) & 255, (et & 255) / 255) + : nt === 4 + ? rgba( + ((et >> 12) & 15) | ((et >> 8) & 240), + ((et >> 8) & 15) | ((et >> 4) & 240), + ((et >> 4) & 15) | (et & 240), + (((et & 15) << 4) | (et & 15)) / 255, + ) + : null) + : (et = reRgbInteger.exec(tt)) + ? new Rgb(et[1], et[2], et[3], 1) + : (et = reRgbPercent.exec(tt)) + ? new Rgb((et[1] * 255) / 100, (et[2] * 255) / 100, (et[3] * 255) / 100, 1) + : (et = reRgbaInteger.exec(tt)) + ? rgba(et[1], et[2], et[3], et[4]) + : (et = reRgbaPercent.exec(tt)) + ? rgba((et[1] * 255) / 100, (et[2] * 255) / 100, (et[3] * 255) / 100, et[4]) + : (et = reHslPercent.exec(tt)) + ? hsla(et[1], et[2] / 100, et[3] / 100, 1) + : (et = reHslaPercent.exec(tt)) + ? hsla(et[1], et[2] / 100, et[3] / 100, et[4]) + : named.hasOwnProperty(tt) + ? rgbn(named[tt]) + : tt === 'transparent' + ? new Rgb(NaN, NaN, NaN, 0) + : null + ) + } + function rgbn(tt) { + return new Rgb((tt >> 16) & 255, (tt >> 8) & 255, tt & 255, 1) + } + function rgba(tt, et, nt, rt) { + return rt <= 0 && (tt = et = nt = NaN), new Rgb(tt, et, nt, rt) + } + function rgbConvert(tt) { + return ( + tt instanceof Color || (tt = color(tt)), tt ? ((tt = tt.rgb()), new Rgb(tt.r, tt.g, tt.b, tt.opacity)) : new Rgb() + ) + } + function rgb(tt, et, nt, rt) { + return arguments.length === 1 ? rgbConvert(tt) : new Rgb(tt, et, nt, rt ?? 1) + } + function Rgb(tt, et, nt, rt) { + ;(this.r = +tt), (this.g = +et), (this.b = +nt), (this.opacity = +rt) + } + define( + Rgb, + rgb, + extend(Color, { + brighter(tt) { + return ( + (tt = tt == null ? brighter : Math.pow(brighter, tt)), + new Rgb(this.r * tt, this.g * tt, this.b * tt, this.opacity) + ) + }, + darker(tt) { + return ( + (tt = tt == null ? darker : Math.pow(darker, tt)), + new Rgb(this.r * tt, this.g * tt, this.b * tt, this.opacity) + ) + }, + rgb() { + return this + }, + clamp() { + return new Rgb(clampi(this.r), clampi(this.g), clampi(this.b), clampa(this.opacity)) + }, + displayable() { + return ( + -0.5 <= this.r && + this.r < 255.5 && + -0.5 <= this.g && + this.g < 255.5 && + -0.5 <= this.b && + this.b < 255.5 && + 0 <= this.opacity && + this.opacity <= 1 + ) + }, + hex: rgb_formatHex, + formatHex: rgb_formatHex, + formatHex8: rgb_formatHex8, + formatRgb: rgb_formatRgb, + toString: rgb_formatRgb, + }), + ) + function rgb_formatHex() { + return `#${hex(this.r)}${hex(this.g)}${hex(this.b)}` + } + function rgb_formatHex8() { + return `#${hex(this.r)}${hex(this.g)}${hex(this.b)}${hex((isNaN(this.opacity) ? 1 : this.opacity) * 255)}` + } + function rgb_formatRgb() { + const tt = clampa(this.opacity) + return `${tt === 1 ? 'rgb(' : 'rgba('}${clampi(this.r)}, ${clampi(this.g)}, ${clampi(this.b)}${ + tt === 1 ? ')' : `, ${tt})` + }` + } + function clampa(tt) { + return isNaN(tt) ? 1 : Math.max(0, Math.min(1, tt)) + } + function clampi(tt) { + return Math.max(0, Math.min(255, Math.round(tt) || 0)) + } + function hex(tt) { + return (tt = clampi(tt)), (tt < 16 ? '0' : '') + tt.toString(16) + } + function hsla(tt, et, nt, rt) { + return ( + rt <= 0 ? (tt = et = nt = NaN) : nt <= 0 || nt >= 1 ? (tt = et = NaN) : et <= 0 && (tt = NaN), + new Hsl(tt, et, nt, rt) + ) + } + function hslConvert(tt) { + if (tt instanceof Hsl) return new Hsl(tt.h, tt.s, tt.l, tt.opacity) + if ((tt instanceof Color || (tt = color(tt)), !tt)) return new Hsl() + if (tt instanceof Hsl) return tt + tt = tt.rgb() + var et = tt.r / 255, + nt = tt.g / 255, + rt = tt.b / 255, + it = Math.min(et, nt, rt), + ot = Math.max(et, nt, rt), + at = NaN, + st = ot - it, + lt = (ot + it) / 2 + return ( + st + ? (et === ot + ? (at = (nt - rt) / st + (nt < rt) * 6) + : nt === ot + ? (at = (rt - et) / st + 2) + : (at = (et - nt) / st + 4), + (st /= lt < 0.5 ? ot + it : 2 - ot - it), + (at *= 60)) + : (st = lt > 0 && lt < 1 ? 0 : at), + new Hsl(at, st, lt, tt.opacity) + ) + } + function hsl(tt, et, nt, rt) { + return arguments.length === 1 ? hslConvert(tt) : new Hsl(tt, et, nt, rt ?? 1) + } + function Hsl(tt, et, nt, rt) { + ;(this.h = +tt), (this.s = +et), (this.l = +nt), (this.opacity = +rt) + } + define( + Hsl, + hsl, + extend(Color, { + brighter(tt) { + return (tt = tt == null ? brighter : Math.pow(brighter, tt)), new Hsl(this.h, this.s, this.l * tt, this.opacity) + }, + darker(tt) { + return (tt = tt == null ? darker : Math.pow(darker, tt)), new Hsl(this.h, this.s, this.l * tt, this.opacity) + }, + rgb() { + var tt = (this.h % 360) + (this.h < 0) * 360, + et = isNaN(tt) || isNaN(this.s) ? 0 : this.s, + nt = this.l, + rt = nt + (nt < 0.5 ? nt : 1 - nt) * et, + it = 2 * nt - rt + return new Rgb( + hsl2rgb(tt >= 240 ? tt - 240 : tt + 120, it, rt), + hsl2rgb(tt, it, rt), + hsl2rgb(tt < 120 ? tt + 240 : tt - 120, it, rt), + this.opacity, + ) + }, + clamp() { + return new Hsl(clamph(this.h), clampt(this.s), clampt(this.l), clampa(this.opacity)) + }, + displayable() { + return ( + ((0 <= this.s && this.s <= 1) || isNaN(this.s)) && + 0 <= this.l && + this.l <= 1 && + 0 <= this.opacity && + this.opacity <= 1 + ) + }, + formatHsl() { + const tt = clampa(this.opacity) + return `${tt === 1 ? 'hsl(' : 'hsla('}${clamph(this.h)}, ${clampt(this.s) * 100}%, ${clampt(this.l) * 100}%${ + tt === 1 ? ')' : `, ${tt})` + }` + }, + }), + ) + function clamph(tt) { + return (tt = (tt || 0) % 360), tt < 0 ? tt + 360 : tt + } + function clampt(tt) { + return Math.max(0, Math.min(1, tt || 0)) + } + function hsl2rgb(tt, et, nt) { + return ( + (tt < 60 ? et + ((nt - et) * tt) / 60 : tt < 180 ? nt : tt < 240 ? et + ((nt - et) * (240 - tt)) / 60 : et) * 255 + ) + } + const constant$3 = (tt) => () => tt + function linear$1(tt, et) { + return function (nt) { + return tt + nt * et + } + } + function exponential(tt, et, nt) { + return ( + (tt = Math.pow(tt, nt)), + (et = Math.pow(et, nt) - tt), + (nt = 1 / nt), + function (rt) { + return Math.pow(tt + rt * et, nt) + } + ) + } + function gamma(tt) { + return (tt = +tt) == 1 + ? nogamma + : function (et, nt) { + return nt - et ? exponential(et, nt, tt) : constant$3(isNaN(et) ? nt : et) + } + } + function nogamma(tt, et) { + var nt = et - tt + return nt ? linear$1(tt, nt) : constant$3(isNaN(tt) ? et : tt) + } + const interpolateRgb = (function tt(et) { + var nt = gamma(et) + function rt(it, ot) { + var at = nt((it = rgb(it)).r, (ot = rgb(ot)).r), + st = nt(it.g, ot.g), + lt = nt(it.b, ot.b), + ct = nogamma(it.opacity, ot.opacity) + return function (ut) { + return (it.r = at(ut)), (it.g = st(ut)), (it.b = lt(ut)), (it.opacity = ct(ut)), it + '' + } + } + return (rt.gamma = tt), rt + })(1) + function numberArray(tt, et) { + et || (et = []) + var nt = tt ? Math.min(et.length, tt.length) : 0, + rt = et.slice(), + it + return function (ot) { + for (it = 0; it < nt; ++it) rt[it] = tt[it] * (1 - ot) + et[it] * ot + return rt + } + } + function isNumberArray(tt) { + return ArrayBuffer.isView(tt) && !(tt instanceof DataView) + } + function genericArray(tt, et) { + var nt = et ? et.length : 0, + rt = tt ? Math.min(nt, tt.length) : 0, + it = new Array(rt), + ot = new Array(nt), + at + for (at = 0; at < rt; ++at) it[at] = interpolate$1(tt[at], et[at]) + for (; at < nt; ++at) ot[at] = et[at] + return function (st) { + for (at = 0; at < rt; ++at) ot[at] = it[at](st) + return ot + } + } + function date$1(tt, et) { + var nt = new Date() + return ( + (tt = +tt), + (et = +et), + function (rt) { + return nt.setTime(tt * (1 - rt) + et * rt), nt + } + ) + } + function interpolateNumber$1(tt, et) { + return ( + (tt = +tt), + (et = +et), + function (nt) { + return tt * (1 - nt) + et * nt + } + ) + } + function object$1(tt, et) { + var nt = {}, + rt = {}, + it + ;(tt === null || typeof tt != 'object') && (tt = {}), (et === null || typeof et != 'object') && (et = {}) + for (it in et) it in tt ? (nt[it] = interpolate$1(tt[it], et[it])) : (rt[it] = et[it]) + return function (ot) { + for (it in nt) rt[it] = nt[it](ot) + return rt + } + } + var reA = /[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g, + reB = new RegExp(reA.source, 'g') + function zero(tt) { + return function () { + return tt + } + } + function one(tt) { + return function (et) { + return tt(et) + '' + } + } + function interpolateString(tt, et) { + var nt = (reA.lastIndex = reB.lastIndex = 0), + rt, + it, + ot, + at = -1, + st = [], + lt = [] + for (tt = tt + '', et = et + ''; (rt = reA.exec(tt)) && (it = reB.exec(et)); ) + (ot = it.index) > nt && ((ot = et.slice(nt, ot)), st[at] ? (st[at] += ot) : (st[++at] = ot)), + (rt = rt[0]) === (it = it[0]) + ? st[at] + ? (st[at] += it) + : (st[++at] = it) + : ((st[++at] = null), lt.push({ i: at, x: interpolateNumber$1(rt, it) })), + (nt = reB.lastIndex) + return ( + nt < et.length && ((ot = et.slice(nt)), st[at] ? (st[at] += ot) : (st[++at] = ot)), + st.length < 2 + ? lt[0] + ? one(lt[0].x) + : zero(et) + : ((et = lt.length), + function (ct) { + for (var ut = 0, ht; ut < et; ++ut) st[(ht = lt[ut]).i] = ht.x(ct) + return st.join('') + }) + ) + } + function interpolate$1(tt, et) { + var nt = typeof et, + rt + return et == null || nt === 'boolean' + ? constant$3(et) + : (nt === 'number' + ? interpolateNumber$1 + : nt === 'string' + ? (rt = color(et)) + ? ((et = rt), interpolateRgb) + : interpolateString + : et instanceof color + ? interpolateRgb + : et instanceof Date + ? date$1 + : isNumberArray(et) + ? numberArray + : Array.isArray(et) + ? genericArray + : (typeof et.valueOf != 'function' && typeof et.toString != 'function') || isNaN(et) + ? object$1 + : interpolateNumber$1)(tt, et) + } + function interpolateRound(tt, et) { + return ( + (tt = +tt), + (et = +et), + function (nt) { + return Math.round(tt * (1 - nt) + et * nt) + } + ) + } + var degrees = 180 / Math.PI, + identity$5 = { translateX: 0, translateY: 0, rotate: 0, skewX: 0, scaleX: 1, scaleY: 1 } + function decompose(tt, et, nt, rt, it, ot) { + var at, st, lt + return ( + (at = Math.sqrt(tt * tt + et * et)) && ((tt /= at), (et /= at)), + (lt = tt * nt + et * rt) && ((nt -= tt * lt), (rt -= et * lt)), + (st = Math.sqrt(nt * nt + rt * rt)) && ((nt /= st), (rt /= st), (lt /= st)), + tt * rt < et * nt && ((tt = -tt), (et = -et), (lt = -lt), (at = -at)), + { + translateX: it, + translateY: ot, + rotate: Math.atan2(et, tt) * degrees, + skewX: Math.atan(lt) * degrees, + scaleX: at, + scaleY: st, + } + ) + } + var svgNode + function parseCss(tt) { + const et = new (typeof DOMMatrix == 'function' ? DOMMatrix : WebKitCSSMatrix)(tt + '') + return et.isIdentity ? identity$5 : decompose(et.a, et.b, et.c, et.d, et.e, et.f) + } + function parseSvg(tt) { + return tt == null || + (svgNode || (svgNode = document.createElementNS('http://www.w3.org/2000/svg', 'g')), + svgNode.setAttribute('transform', tt), + !(tt = svgNode.transform.baseVal.consolidate())) + ? identity$5 + : ((tt = tt.matrix), decompose(tt.a, tt.b, tt.c, tt.d, tt.e, tt.f)) + } + function interpolateTransform(tt, et, nt, rt) { + function it(ct) { + return ct.length ? ct.pop() + ' ' : '' + } + function ot(ct, ut, ht, dt, pt, mt) { + if (ct !== ht || ut !== dt) { + var gt = pt.push('translate(', null, et, null, nt) + mt.push({ i: gt - 4, x: interpolateNumber$1(ct, ht) }, { i: gt - 2, x: interpolateNumber$1(ut, dt) }) + } else (ht || dt) && pt.push('translate(' + ht + et + dt + nt) + } + function at(ct, ut, ht, dt) { + ct !== ut + ? (ct - ut > 180 ? (ut += 360) : ut - ct > 180 && (ct += 360), + dt.push({ i: ht.push(it(ht) + 'rotate(', null, rt) - 2, x: interpolateNumber$1(ct, ut) })) + : ut && ht.push(it(ht) + 'rotate(' + ut + rt) + } + function st(ct, ut, ht, dt) { + ct !== ut + ? dt.push({ i: ht.push(it(ht) + 'skewX(', null, rt) - 2, x: interpolateNumber$1(ct, ut) }) + : ut && ht.push(it(ht) + 'skewX(' + ut + rt) + } + function lt(ct, ut, ht, dt, pt, mt) { + if (ct !== ht || ut !== dt) { + var gt = pt.push(it(pt) + 'scale(', null, ',', null, ')') + mt.push({ i: gt - 4, x: interpolateNumber$1(ct, ht) }, { i: gt - 2, x: interpolateNumber$1(ut, dt) }) + } else (ht !== 1 || dt !== 1) && pt.push(it(pt) + 'scale(' + ht + ',' + dt + ')') + } + return function (ct, ut) { + var ht = [], + dt = [] + return ( + (ct = tt(ct)), + (ut = tt(ut)), + ot(ct.translateX, ct.translateY, ut.translateX, ut.translateY, ht, dt), + at(ct.rotate, ut.rotate, ht, dt), + st(ct.skewX, ut.skewX, ht, dt), + lt(ct.scaleX, ct.scaleY, ut.scaleX, ut.scaleY, ht, dt), + (ct = ut = null), + function (pt) { + for (var mt = -1, gt = dt.length, yt; ++mt < gt; ) ht[(yt = dt[mt]).i] = yt.x(pt) + return ht.join('') + } + ) + } + } + var interpolateTransformCss = interpolateTransform(parseCss, 'px, ', 'px)', 'deg)'), + interpolateTransformSvg = interpolateTransform(parseSvg, ', ', ')', ')'), + epsilon2 = 1e-12 + function cosh(tt) { + return ((tt = Math.exp(tt)) + 1 / tt) / 2 + } + function sinh(tt) { + return ((tt = Math.exp(tt)) - 1 / tt) / 2 + } + function tanh(tt) { + return ((tt = Math.exp(2 * tt)) - 1) / (tt + 1) + } + const interpolateZoom = (function tt(et, nt, rt) { + function it(ot, at) { + var st = ot[0], + lt = ot[1], + ct = ot[2], + ut = at[0], + ht = at[1], + dt = at[2], + pt = ut - st, + mt = ht - lt, + gt = pt * pt + mt * mt, + yt, + bt + if (gt < epsilon2) + (bt = Math.log(dt / ct) / et), + (yt = function (At) { + return [st + At * pt, lt + At * mt, ct * Math.exp(et * At * bt)] + }) + else { + var vt = Math.sqrt(gt), + xt = (dt * dt - ct * ct + rt * gt) / (2 * ct * nt * vt), + kt = (dt * dt - ct * ct - rt * gt) / (2 * dt * nt * vt), + St = Math.log(Math.sqrt(xt * xt + 1) - xt), + Tt = Math.log(Math.sqrt(kt * kt + 1) - kt) + ;(bt = (Tt - St) / et), + (yt = function (At) { + var Et = At * bt, + $t = cosh(St), + Dt = (ct / (nt * vt)) * ($t * tanh(et * Et + St) - sinh(St)) + return [st + Dt * pt, lt + Dt * mt, (ct * $t) / cosh(et * Et + St)] + }) + } + return (yt.duration = (bt * 1e3 * et) / Math.SQRT2), yt + } + return ( + (it.rho = function (ot) { + var at = Math.max(0.001, +ot), + st = at * at, + lt = st * st + return tt(at, st, lt) + }), + it + ) + })(Math.SQRT2, 2, 4) + function piecewise(tt, et) { + et === void 0 && ((et = tt), (tt = interpolate$1)) + for (var nt = 0, rt = et.length - 1, it = et[0], ot = new Array(rt < 0 ? 0 : rt); nt < rt; ) + ot[nt] = tt(it, (it = et[++nt])) + return function (at) { + var st = Math.max(0, Math.min(rt - 1, Math.floor((at *= rt)))) + return ot[st](at - st) + } + } + function constants(tt) { + return function () { + return tt + } + } + function number$2(tt) { + return +tt + } + var unit = [0, 1] + function identity$4(tt) { + return tt + } + function normalize(tt, et) { + return (et -= tt = +tt) + ? function (nt) { + return (nt - tt) / et + } + : constants(isNaN(et) ? NaN : 0.5) + } + function clamper(tt, et) { + var nt + return ( + tt > et && ((nt = tt), (tt = et), (et = nt)), + function (rt) { + return Math.max(tt, Math.min(et, rt)) + } + ) + } + function bimap(tt, et, nt) { + var rt = tt[0], + it = tt[1], + ot = et[0], + at = et[1] + return ( + it < rt ? ((rt = normalize(it, rt)), (ot = nt(at, ot))) : ((rt = normalize(rt, it)), (ot = nt(ot, at))), + function (st) { + return ot(rt(st)) + } + ) + } + function polymap(tt, et, nt) { + var rt = Math.min(tt.length, et.length) - 1, + it = new Array(rt), + ot = new Array(rt), + at = -1 + for (tt[rt] < tt[0] && ((tt = tt.slice().reverse()), (et = et.slice().reverse())); ++at < rt; ) + (it[at] = normalize(tt[at], tt[at + 1])), (ot[at] = nt(et[at], et[at + 1])) + return function (st) { + var lt = bisect(tt, st, 1, rt) - 1 + return ot[lt](it[lt](st)) + } + } + function copy$1(tt, et) { + return et + .domain(tt.domain()) + .range(tt.range()) + .interpolate(tt.interpolate()) + .clamp(tt.clamp()) + .unknown(tt.unknown()) + } + function transformer$2() { + var tt = unit, + et = unit, + nt = interpolate$1, + rt, + it, + ot, + at = identity$4, + st, + lt, + ct + function ut() { + var dt = Math.min(tt.length, et.length) + return ( + at !== identity$4 && (at = clamper(tt[0], tt[dt - 1])), (st = dt > 2 ? polymap : bimap), (lt = ct = null), ht + ) + } + function ht(dt) { + return dt == null || isNaN((dt = +dt)) ? ot : (lt || (lt = st(tt.map(rt), et, nt)))(rt(at(dt))) + } + return ( + (ht.invert = function (dt) { + return at(it((ct || (ct = st(et, tt.map(rt), interpolateNumber$1)))(dt))) + }), + (ht.domain = function (dt) { + return arguments.length ? ((tt = Array.from(dt, number$2)), ut()) : tt.slice() + }), + (ht.range = function (dt) { + return arguments.length ? ((et = Array.from(dt)), ut()) : et.slice() + }), + (ht.rangeRound = function (dt) { + return (et = Array.from(dt)), (nt = interpolateRound), ut() + }), + (ht.clamp = function (dt) { + return arguments.length ? ((at = dt ? !0 : identity$4), ut()) : at !== identity$4 + }), + (ht.interpolate = function (dt) { + return arguments.length ? ((nt = dt), ut()) : nt + }), + (ht.unknown = function (dt) { + return arguments.length ? ((ot = dt), ht) : ot + }), + function (dt, pt) { + return (rt = dt), (it = pt), ut() + } + ) + } + function continuous() { + return transformer$2()(identity$4, identity$4) + } + function formatDecimal(tt) { + return Math.abs((tt = Math.round(tt))) >= 1e21 ? tt.toLocaleString('en').replace(/,/g, '') : tt.toString(10) + } + function formatDecimalParts(tt, et) { + if ((nt = (tt = et ? tt.toExponential(et - 1) : tt.toExponential()).indexOf('e')) < 0) return null + var nt, + rt = tt.slice(0, nt) + return [rt.length > 1 ? rt[0] + rt.slice(2) : rt, +tt.slice(nt + 1)] + } + function exponent(tt) { + return (tt = formatDecimalParts(Math.abs(tt))), tt ? tt[1] : NaN + } + function formatGroup(tt, et) { + return function (nt, rt) { + for ( + var it = nt.length, ot = [], at = 0, st = tt[0], lt = 0; + it > 0 && + st > 0 && + (lt + st + 1 > rt && (st = Math.max(1, rt - lt)), + ot.push(nt.substring((it -= st), it + st)), + !((lt += st + 1) > rt)); + + ) + st = tt[(at = (at + 1) % tt.length)] + return ot.reverse().join(et) + } + } + function formatNumerals(tt) { + return function (et) { + return et.replace(/[0-9]/g, function (nt) { + return tt[+nt] + }) + } + } + var re$1 = /^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i + function formatSpecifier(tt) { + if (!(et = re$1.exec(tt))) throw new Error('invalid format: ' + tt) + var et + return new FormatSpecifier({ + fill: et[1], + align: et[2], + sign: et[3], + symbol: et[4], + zero: et[5], + width: et[6], + comma: et[7], + precision: et[8] && et[8].slice(1), + trim: et[9], + type: et[10], + }) + } + formatSpecifier.prototype = FormatSpecifier.prototype + function FormatSpecifier(tt) { + ;(this.fill = tt.fill === void 0 ? ' ' : tt.fill + ''), + (this.align = tt.align === void 0 ? '>' : tt.align + ''), + (this.sign = tt.sign === void 0 ? '-' : tt.sign + ''), + (this.symbol = tt.symbol === void 0 ? '' : tt.symbol + ''), + (this.zero = !!tt.zero), + (this.width = tt.width === void 0 ? void 0 : +tt.width), + (this.comma = !!tt.comma), + (this.precision = tt.precision === void 0 ? void 0 : +tt.precision), + (this.trim = !!tt.trim), + (this.type = tt.type === void 0 ? '' : tt.type + '') + } + FormatSpecifier.prototype.toString = function () { + return ( + this.fill + + this.align + + this.sign + + this.symbol + + (this.zero ? '0' : '') + + (this.width === void 0 ? '' : Math.max(1, this.width | 0)) + + (this.comma ? ',' : '') + + (this.precision === void 0 ? '' : '.' + Math.max(0, this.precision | 0)) + + (this.trim ? '~' : '') + + this.type + ) + } + function formatTrim(tt) { + e: for (var et = tt.length, nt = 1, rt = -1, it; nt < et; ++nt) + switch (tt[nt]) { + case '.': + rt = it = nt + break + case '0': + rt === 0 && (rt = nt), (it = nt) + break + default: + if (!+tt[nt]) break e + rt > 0 && (rt = 0) + break + } + return rt > 0 ? tt.slice(0, rt) + tt.slice(it + 1) : tt + } + var prefixExponent + function formatPrefixAuto(tt, et) { + var nt = formatDecimalParts(tt, et) + if (!nt) return tt + '' + var rt = nt[0], + it = nt[1], + ot = it - (prefixExponent = Math.max(-8, Math.min(8, Math.floor(it / 3))) * 3) + 1, + at = rt.length + return ot === at + ? rt + : ot > at + ? rt + new Array(ot - at + 1).join('0') + : ot > 0 + ? rt.slice(0, ot) + '.' + rt.slice(ot) + : '0.' + new Array(1 - ot).join('0') + formatDecimalParts(tt, Math.max(0, et + ot - 1))[0] + } + function formatRounded(tt, et) { + var nt = formatDecimalParts(tt, et) + if (!nt) return tt + '' + var rt = nt[0], + it = nt[1] + return it < 0 + ? '0.' + new Array(-it).join('0') + rt + : rt.length > it + 1 + ? rt.slice(0, it + 1) + '.' + rt.slice(it + 1) + : rt + new Array(it - rt.length + 2).join('0') + } + const formatTypes = { + '%': (tt, et) => (tt * 100).toFixed(et), + b: (tt) => Math.round(tt).toString(2), + c: (tt) => tt + '', + d: formatDecimal, + e: (tt, et) => tt.toExponential(et), + f: (tt, et) => tt.toFixed(et), + g: (tt, et) => tt.toPrecision(et), + o: (tt) => Math.round(tt).toString(8), + p: (tt, et) => formatRounded(tt * 100, et), + r: formatRounded, + s: formatPrefixAuto, + X: (tt) => Math.round(tt).toString(16).toUpperCase(), + x: (tt) => Math.round(tt).toString(16), + } + function identity$3(tt) { + return tt + } + var map$2 = Array.prototype.map, + prefixes = ['y', 'z', 'a', 'f', 'p', 'n', 'µ', 'm', '', 'k', 'M', 'G', 'T', 'P', 'E', 'Z', 'Y'] + function formatLocale$1(tt) { + var et = + tt.grouping === void 0 || tt.thousands === void 0 + ? identity$3 + : formatGroup(map$2.call(tt.grouping, Number), tt.thousands + ''), + nt = tt.currency === void 0 ? '' : tt.currency[0] + '', + rt = tt.currency === void 0 ? '' : tt.currency[1] + '', + it = tt.decimal === void 0 ? '.' : tt.decimal + '', + ot = tt.numerals === void 0 ? identity$3 : formatNumerals(map$2.call(tt.numerals, String)), + at = tt.percent === void 0 ? '%' : tt.percent + '', + st = tt.minus === void 0 ? '−' : tt.minus + '', + lt = tt.nan === void 0 ? 'NaN' : tt.nan + '' + function ct(ht) { + ht = formatSpecifier(ht) + var dt = ht.fill, + pt = ht.align, + mt = ht.sign, + gt = ht.symbol, + yt = ht.zero, + bt = ht.width, + vt = ht.comma, + xt = ht.precision, + kt = ht.trim, + St = ht.type + St === 'n' ? ((vt = !0), (St = 'g')) : formatTypes[St] || (xt === void 0 && (xt = 12), (kt = !0), (St = 'g')), + (yt || (dt === '0' && pt === '=')) && ((yt = !0), (dt = '0'), (pt = '=')) + var Tt = gt === '$' ? nt : gt === '#' && /[boxX]/.test(St) ? '0' + St.toLowerCase() : '', + At = gt === '$' ? rt : /[%p]/.test(St) ? at : '', + Et = formatTypes[St], + $t = /[defgprs%]/.test(St) + xt = xt === void 0 ? 6 : /[gprs]/.test(St) ? Math.max(1, Math.min(21, xt)) : Math.max(0, Math.min(20, xt)) + function Dt(jt) { + var Pt = Tt, + Ct = At, + wt, + It, + Ot + if (St === 'c') (Ct = Et(jt) + Ct), (jt = '') + else { + jt = +jt + var Wt = jt < 0 || 1 / jt < 0 + if ( + ((jt = isNaN(jt) ? lt : Et(Math.abs(jt), xt)), + kt && (jt = formatTrim(jt)), + Wt && +jt == 0 && mt !== '+' && (Wt = !1), + (Pt = (Wt ? (mt === '(' ? mt : st) : mt === '-' || mt === '(' ? '' : mt) + Pt), + (Ct = (St === 's' ? prefixes[8 + prefixExponent / 3] : '') + Ct + (Wt && mt === '(' ? ')' : '')), + $t) + ) { + for (wt = -1, It = jt.length; ++wt < It; ) + if (((Ot = jt.charCodeAt(wt)), 48 > Ot || Ot > 57)) { + ;(Ct = (Ot === 46 ? it + jt.slice(wt + 1) : jt.slice(wt)) + Ct), (jt = jt.slice(0, wt)) + break + } + } + } + vt && !yt && (jt = et(jt, 1 / 0)) + var zt = Pt.length + jt.length + Ct.length, + Ft = zt < bt ? new Array(bt - zt + 1).join(dt) : '' + switch ((vt && yt && ((jt = et(Ft + jt, Ft.length ? bt - Ct.length : 1 / 0)), (Ft = '')), pt)) { + case '<': + jt = Pt + jt + Ct + Ft + break + case '=': + jt = Pt + Ft + jt + Ct + break + case '^': + jt = Ft.slice(0, (zt = Ft.length >> 1)) + Pt + jt + Ct + Ft.slice(zt) + break + default: + jt = Ft + Pt + jt + Ct + break + } + return ot(jt) + } + return ( + (Dt.toString = function () { + return ht + '' + }), + Dt + ) + } + function ut(ht, dt) { + var pt = ct(((ht = formatSpecifier(ht)), (ht.type = 'f'), ht)), + mt = Math.max(-8, Math.min(8, Math.floor(exponent(dt) / 3))) * 3, + gt = Math.pow(10, -mt), + yt = prefixes[8 + mt / 3] + return function (bt) { + return pt(gt * bt) + yt + } + } + return { format: ct, formatPrefix: ut } + } + var locale$1, format, formatPrefix + defaultLocale$1({ thousands: ',', grouping: [3], currency: ['$', ''] }) + function defaultLocale$1(tt) { + return (locale$1 = formatLocale$1(tt)), (format = locale$1.format), (formatPrefix = locale$1.formatPrefix), locale$1 + } + function precisionFixed(tt) { + return Math.max(0, -exponent(Math.abs(tt))) + } + function precisionPrefix(tt, et) { + return Math.max(0, Math.max(-8, Math.min(8, Math.floor(exponent(et) / 3))) * 3 - exponent(Math.abs(tt))) + } + function precisionRound(tt, et) { + return (tt = Math.abs(tt)), (et = Math.abs(et) - tt), Math.max(0, exponent(et) - exponent(tt)) + 1 + } + function tickFormat(tt, et, nt, rt) { + var it = tickStep(tt, et, nt), + ot + switch (((rt = formatSpecifier(rt ?? ',f')), rt.type)) { + case 's': { + var at = Math.max(Math.abs(tt), Math.abs(et)) + return ( + rt.precision == null && !isNaN((ot = precisionPrefix(it, at))) && (rt.precision = ot), formatPrefix(rt, at) + ) + } + case '': + case 'e': + case 'g': + case 'p': + case 'r': { + rt.precision == null && + !isNaN((ot = precisionRound(it, Math.max(Math.abs(tt), Math.abs(et))))) && + (rt.precision = ot - (rt.type === 'e')) + break + } + case 'f': + case '%': { + rt.precision == null && !isNaN((ot = precisionFixed(it))) && (rt.precision = ot - (rt.type === '%') * 2) + break + } + } + return format(rt) + } + function linearish(tt) { + var et = tt.domain + return ( + (tt.ticks = function (nt) { + var rt = et() + return ticks(rt[0], rt[rt.length - 1], nt ?? 10) + }), + (tt.tickFormat = function (nt, rt) { + var it = et() + return tickFormat(it[0], it[it.length - 1], nt ?? 10, rt) + }), + (tt.nice = function (nt) { + nt == null && (nt = 10) + var rt = et(), + it = 0, + ot = rt.length - 1, + at = rt[it], + st = rt[ot], + lt, + ct, + ut = 10 + for (st < at && ((ct = at), (at = st), (st = ct), (ct = it), (it = ot), (ot = ct)); ut-- > 0; ) { + if (((ct = tickIncrement(at, st, nt)), ct === lt)) return (rt[it] = at), (rt[ot] = st), et(rt) + if (ct > 0) (at = Math.floor(at / ct) * ct), (st = Math.ceil(st / ct) * ct) + else if (ct < 0) (at = Math.ceil(at * ct) / ct), (st = Math.floor(st * ct) / ct) + else break + lt = ct + } + return tt + }), + tt + ) + } + function linear() { + var tt = continuous() + return ( + (tt.copy = function () { + return copy$1(tt, linear()) + }), + initRange.apply(tt, arguments), + linearish(tt) + ) + } + function identity$2(tt) { + var et + function nt(rt) { + return rt == null || isNaN((rt = +rt)) ? et : rt + } + return ( + (nt.invert = nt), + (nt.domain = nt.range = + function (rt) { + return arguments.length ? ((tt = Array.from(rt, number$2)), nt) : tt.slice() + }), + (nt.unknown = function (rt) { + return arguments.length ? ((et = rt), nt) : et + }), + (nt.copy = function () { + return identity$2(tt).unknown(et) + }), + (tt = arguments.length ? Array.from(tt, number$2) : [0, 1]), + linearish(nt) + ) + } + function nice(tt, et) { + tt = tt.slice() + var nt = 0, + rt = tt.length - 1, + it = tt[nt], + ot = tt[rt], + at + return ( + ot < it && ((at = nt), (nt = rt), (rt = at), (at = it), (it = ot), (ot = at)), + (tt[nt] = et.floor(it)), + (tt[rt] = et.ceil(ot)), + tt + ) + } + function transformLog(tt) { + return Math.log(tt) + } + function transformExp(tt) { + return Math.exp(tt) + } + function transformLogn(tt) { + return -Math.log(-tt) + } + function transformExpn(tt) { + return -Math.exp(-tt) + } + function pow10(tt) { + return isFinite(tt) ? +('1e' + tt) : tt < 0 ? 0 : tt + } + function powp(tt) { + return tt === 10 ? pow10 : tt === Math.E ? Math.exp : (et) => Math.pow(tt, et) + } + function logp(tt) { + return tt === Math.E + ? Math.log + : (tt === 10 && Math.log10) || (tt === 2 && Math.log2) || ((tt = Math.log(tt)), (et) => Math.log(et) / tt) + } + function reflect(tt) { + return (et, nt) => -tt(-et, nt) + } + function loggish(tt) { + const et = tt(transformLog, transformExp), + nt = et.domain + let rt = 10, + it, + ot + function at() { + return ( + (it = logp(rt)), + (ot = powp(rt)), + nt()[0] < 0 + ? ((it = reflect(it)), (ot = reflect(ot)), tt(transformLogn, transformExpn)) + : tt(transformLog, transformExp), + et + ) + } + return ( + (et.base = function (st) { + return arguments.length ? ((rt = +st), at()) : rt + }), + (et.domain = function (st) { + return arguments.length ? (nt(st), at()) : nt() + }), + (et.ticks = (st) => { + const lt = nt() + let ct = lt[0], + ut = lt[lt.length - 1] + const ht = ut < ct + ht && ([ct, ut] = [ut, ct]) + let dt = it(ct), + pt = it(ut), + mt, + gt + const yt = st == null ? 10 : +st + let bt = [] + if (!(rt % 1) && pt - dt < yt) { + if (((dt = Math.floor(dt)), (pt = Math.ceil(pt)), ct > 0)) { + for (; dt <= pt; ++dt) + for (mt = 1; mt < rt; ++mt) + if (((gt = dt < 0 ? mt / ot(-dt) : mt * ot(dt)), !(gt < ct))) { + if (gt > ut) break + bt.push(gt) + } + } else + for (; dt <= pt; ++dt) + for (mt = rt - 1; mt >= 1; --mt) + if (((gt = dt > 0 ? mt / ot(-dt) : mt * ot(dt)), !(gt < ct))) { + if (gt > ut) break + bt.push(gt) + } + bt.length * 2 < yt && (bt = ticks(ct, ut, yt)) + } else bt = ticks(dt, pt, Math.min(pt - dt, yt)).map(ot) + return ht ? bt.reverse() : bt + }), + (et.tickFormat = (st, lt) => { + if ( + (st == null && (st = 10), + lt == null && (lt = rt === 10 ? 's' : ','), + typeof lt != 'function' && + (!(rt % 1) && (lt = formatSpecifier(lt)).precision == null && (lt.trim = !0), (lt = format(lt))), + st === 1 / 0) + ) + return lt + const ct = Math.max(1, (rt * st) / et.ticks().length) + return (ut) => { + let ht = ut / ot(Math.round(it(ut))) + return ht * rt < rt - 0.5 && (ht *= rt), ht <= ct ? lt(ut) : '' + } + }), + (et.nice = () => nt(nice(nt(), { floor: (st) => ot(Math.floor(it(st))), ceil: (st) => ot(Math.ceil(it(st))) }))), + et + ) + } + function log() { + const tt = loggish(transformer$2()).domain([1, 10]) + return (tt.copy = () => copy$1(tt, log()).base(tt.base())), initRange.apply(tt, arguments), tt + } + function transformSymlog(tt) { + return function (et) { + return Math.sign(et) * Math.log1p(Math.abs(et / tt)) + } + } + function transformSymexp(tt) { + return function (et) { + return Math.sign(et) * Math.expm1(Math.abs(et)) * tt + } + } + function symlogish(tt) { + var et = 1, + nt = tt(transformSymlog(et), transformSymexp(et)) + return ( + (nt.constant = function (rt) { + return arguments.length ? tt(transformSymlog((et = +rt)), transformSymexp(et)) : et + }), + linearish(nt) + ) + } + function symlog() { + var tt = symlogish(transformer$2()) + return ( + (tt.copy = function () { + return copy$1(tt, symlog()).constant(tt.constant()) + }), + initRange.apply(tt, arguments) + ) + } + function transformPow(tt) { + return function (et) { + return et < 0 ? -Math.pow(-et, tt) : Math.pow(et, tt) + } + } + function transformSqrt(tt) { + return tt < 0 ? -Math.sqrt(-tt) : Math.sqrt(tt) + } + function transformSquare(tt) { + return tt < 0 ? -tt * tt : tt * tt + } + function powish(tt) { + var et = tt(identity$4, identity$4), + nt = 1 + function rt() { + return nt === 1 + ? tt(identity$4, identity$4) + : nt === 0.5 + ? tt(transformSqrt, transformSquare) + : tt(transformPow(nt), transformPow(1 / nt)) + } + return ( + (et.exponent = function (it) { + return arguments.length ? ((nt = +it), rt()) : nt + }), + linearish(et) + ) + } + function pow() { + var tt = powish(transformer$2()) + return ( + (tt.copy = function () { + return copy$1(tt, pow()).exponent(tt.exponent()) + }), + initRange.apply(tt, arguments), + tt + ) + } + function sqrt() { + return pow.apply(null, arguments).exponent(0.5) + } + function square(tt) { + return Math.sign(tt) * tt * tt + } + function unsquare(tt) { + return Math.sign(tt) * Math.sqrt(Math.abs(tt)) + } + function radial() { + var tt = continuous(), + et = [0, 1], + nt = !1, + rt + function it(ot) { + var at = unsquare(tt(ot)) + return isNaN(at) ? rt : nt ? Math.round(at) : at + } + return ( + (it.invert = function (ot) { + return tt.invert(square(ot)) + }), + (it.domain = function (ot) { + return arguments.length ? (tt.domain(ot), it) : tt.domain() + }), + (it.range = function (ot) { + return arguments.length ? (tt.range((et = Array.from(ot, number$2)).map(square)), it) : et.slice() + }), + (it.rangeRound = function (ot) { + return it.range(ot).round(!0) + }), + (it.round = function (ot) { + return arguments.length ? ((nt = !!ot), it) : nt + }), + (it.clamp = function (ot) { + return arguments.length ? (tt.clamp(ot), it) : tt.clamp() + }), + (it.unknown = function (ot) { + return arguments.length ? ((rt = ot), it) : rt + }), + (it.copy = function () { + return radial(tt.domain(), et).round(nt).clamp(tt.clamp()).unknown(rt) + }), + initRange.apply(it, arguments), + linearish(it) + ) + } + function quantile() { + var tt = [], + et = [], + nt = [], + rt + function it() { + var at = 0, + st = Math.max(1, et.length) + for (nt = new Array(st - 1); ++at < st; ) nt[at - 1] = quantileSorted(tt, at / st) + return ot + } + function ot(at) { + return at == null || isNaN((at = +at)) ? rt : et[bisect(nt, at)] + } + return ( + (ot.invertExtent = function (at) { + var st = et.indexOf(at) + return st < 0 ? [NaN, NaN] : [st > 0 ? nt[st - 1] : tt[0], st < nt.length ? nt[st] : tt[tt.length - 1]] + }), + (ot.domain = function (at) { + if (!arguments.length) return tt.slice() + tt = [] + for (let st of at) st != null && !isNaN((st = +st)) && tt.push(st) + return tt.sort(ascending$1), it() + }), + (ot.range = function (at) { + return arguments.length ? ((et = Array.from(at)), it()) : et.slice() + }), + (ot.unknown = function (at) { + return arguments.length ? ((rt = at), ot) : rt + }), + (ot.quantiles = function () { + return nt.slice() + }), + (ot.copy = function () { + return quantile().domain(tt).range(et).unknown(rt) + }), + initRange.apply(ot, arguments) + ) + } + function quantize() { + var tt = 0, + et = 1, + nt = 1, + rt = [0.5], + it = [0, 1], + ot + function at(lt) { + return lt != null && lt <= lt ? it[bisect(rt, lt, 0, nt)] : ot + } + function st() { + var lt = -1 + for (rt = new Array(nt); ++lt < nt; ) rt[lt] = ((lt + 1) * et - (lt - nt) * tt) / (nt + 1) + return at + } + return ( + (at.domain = function (lt) { + return arguments.length ? (([tt, et] = lt), (tt = +tt), (et = +et), st()) : [tt, et] + }), + (at.range = function (lt) { + return arguments.length ? ((nt = (it = Array.from(lt)).length - 1), st()) : it.slice() + }), + (at.invertExtent = function (lt) { + var ct = it.indexOf(lt) + return ct < 0 ? [NaN, NaN] : ct < 1 ? [tt, rt[0]] : ct >= nt ? [rt[nt - 1], et] : [rt[ct - 1], rt[ct]] + }), + (at.unknown = function (lt) { + return arguments.length && (ot = lt), at + }), + (at.thresholds = function () { + return rt.slice() + }), + (at.copy = function () { + return quantize().domain([tt, et]).range(it).unknown(ot) + }), + initRange.apply(linearish(at), arguments) + ) + } + function threshold() { + var tt = [0.5], + et = [0, 1], + nt, + rt = 1 + function it(ot) { + return ot != null && ot <= ot ? et[bisect(tt, ot, 0, rt)] : nt + } + return ( + (it.domain = function (ot) { + return arguments.length ? ((tt = Array.from(ot)), (rt = Math.min(tt.length, et.length - 1)), it) : tt.slice() + }), + (it.range = function (ot) { + return arguments.length ? ((et = Array.from(ot)), (rt = Math.min(tt.length, et.length - 1)), it) : et.slice() + }), + (it.invertExtent = function (ot) { + var at = et.indexOf(ot) + return [tt[at - 1], tt[at]] + }), + (it.unknown = function (ot) { + return arguments.length ? ((nt = ot), it) : nt + }), + (it.copy = function () { + return threshold().domain(tt).range(et).unknown(nt) + }), + initRange.apply(it, arguments) + ) + } + const t0 = new Date(), + t1 = new Date() + function timeInterval(tt, et, nt, rt) { + function it(ot) { + return tt((ot = arguments.length === 0 ? new Date() : new Date(+ot))), ot + } + return ( + (it.floor = (ot) => (tt((ot = new Date(+ot))), ot)), + (it.ceil = (ot) => (tt((ot = new Date(ot - 1))), et(ot, 1), tt(ot), ot)), + (it.round = (ot) => { + const at = it(ot), + st = it.ceil(ot) + return ot - at < st - ot ? at : st + }), + (it.offset = (ot, at) => (et((ot = new Date(+ot)), at == null ? 1 : Math.floor(at)), ot)), + (it.range = (ot, at, st) => { + const lt = [] + if (((ot = it.ceil(ot)), (st = st == null ? 1 : Math.floor(st)), !(ot < at) || !(st > 0))) return lt + let ct + do lt.push((ct = new Date(+ot))), et(ot, st), tt(ot) + while (ct < ot && ot < at) + return lt + }), + (it.filter = (ot) => + timeInterval( + (at) => { + if (at >= at) for (; tt(at), !ot(at); ) at.setTime(at - 1) + }, + (at, st) => { + if (at >= at) + if (st < 0) for (; ++st <= 0; ) for (; et(at, -1), !ot(at); ); + else for (; --st >= 0; ) for (; et(at, 1), !ot(at); ); + }, + )), + nt && + ((it.count = (ot, at) => (t0.setTime(+ot), t1.setTime(+at), tt(t0), tt(t1), Math.floor(nt(t0, t1)))), + (it.every = (ot) => ( + (ot = Math.floor(ot)), + !isFinite(ot) || !(ot > 0) + ? null + : ot > 1 + ? it.filter(rt ? (at) => rt(at) % ot === 0 : (at) => it.count(0, at) % ot === 0) + : it + ))), + it + ) + } + const millisecond = timeInterval( + () => {}, + (tt, et) => { + tt.setTime(+tt + et) + }, + (tt, et) => et - tt, + ) + millisecond.every = (tt) => ( + (tt = Math.floor(tt)), + !isFinite(tt) || !(tt > 0) + ? null + : tt > 1 + ? timeInterval( + (et) => { + et.setTime(Math.floor(et / tt) * tt) + }, + (et, nt) => { + et.setTime(+et + nt * tt) + }, + (et, nt) => (nt - et) / tt, + ) + : millisecond + ) + millisecond.range + const durationSecond = 1e3, + durationMinute = durationSecond * 60, + durationHour = durationMinute * 60, + durationDay = durationHour * 24, + durationWeek = durationDay * 7, + durationMonth = durationDay * 30, + durationYear = durationDay * 365, + second = timeInterval( + (tt) => { + tt.setTime(tt - tt.getMilliseconds()) + }, + (tt, et) => { + tt.setTime(+tt + et * durationSecond) + }, + (tt, et) => (et - tt) / durationSecond, + (tt) => tt.getUTCSeconds(), + ) + second.range + const timeMinute = timeInterval( + (tt) => { + tt.setTime(tt - tt.getMilliseconds() - tt.getSeconds() * durationSecond) + }, + (tt, et) => { + tt.setTime(+tt + et * durationMinute) + }, + (tt, et) => (et - tt) / durationMinute, + (tt) => tt.getMinutes(), + ) + timeMinute.range + const utcMinute = timeInterval( + (tt) => { + tt.setUTCSeconds(0, 0) + }, + (tt, et) => { + tt.setTime(+tt + et * durationMinute) + }, + (tt, et) => (et - tt) / durationMinute, + (tt) => tt.getUTCMinutes(), + ) + utcMinute.range + const timeHour = timeInterval( + (tt) => { + tt.setTime(tt - tt.getMilliseconds() - tt.getSeconds() * durationSecond - tt.getMinutes() * durationMinute) + }, + (tt, et) => { + tt.setTime(+tt + et * durationHour) + }, + (tt, et) => (et - tt) / durationHour, + (tt) => tt.getHours(), + ) + timeHour.range + const utcHour = timeInterval( + (tt) => { + tt.setUTCMinutes(0, 0, 0) + }, + (tt, et) => { + tt.setTime(+tt + et * durationHour) + }, + (tt, et) => (et - tt) / durationHour, + (tt) => tt.getUTCHours(), + ) + utcHour.range + const timeDay = timeInterval( + (tt) => tt.setHours(0, 0, 0, 0), + (tt, et) => tt.setDate(tt.getDate() + et), + (tt, et) => (et - tt - (et.getTimezoneOffset() - tt.getTimezoneOffset()) * durationMinute) / durationDay, + (tt) => tt.getDate() - 1, + ) + timeDay.range + const utcDay = timeInterval( + (tt) => { + tt.setUTCHours(0, 0, 0, 0) + }, + (tt, et) => { + tt.setUTCDate(tt.getUTCDate() + et) + }, + (tt, et) => (et - tt) / durationDay, + (tt) => tt.getUTCDate() - 1, + ) + utcDay.range + const unixDay = timeInterval( + (tt) => { + tt.setUTCHours(0, 0, 0, 0) + }, + (tt, et) => { + tt.setUTCDate(tt.getUTCDate() + et) + }, + (tt, et) => (et - tt) / durationDay, + (tt) => Math.floor(tt / durationDay), + ) + unixDay.range + function timeWeekday(tt) { + return timeInterval( + (et) => { + et.setDate(et.getDate() - ((et.getDay() + 7 - tt) % 7)), et.setHours(0, 0, 0, 0) + }, + (et, nt) => { + et.setDate(et.getDate() + nt * 7) + }, + (et, nt) => (nt - et - (nt.getTimezoneOffset() - et.getTimezoneOffset()) * durationMinute) / durationWeek, + ) + } + const timeSunday = timeWeekday(0), + timeMonday = timeWeekday(1), + timeTuesday = timeWeekday(2), + timeWednesday = timeWeekday(3), + timeThursday = timeWeekday(4), + timeFriday = timeWeekday(5), + timeSaturday = timeWeekday(6) + timeSunday.range + timeMonday.range + timeTuesday.range + timeWednesday.range + timeThursday.range + timeFriday.range + timeSaturday.range + function utcWeekday(tt) { + return timeInterval( + (et) => { + et.setUTCDate(et.getUTCDate() - ((et.getUTCDay() + 7 - tt) % 7)), et.setUTCHours(0, 0, 0, 0) + }, + (et, nt) => { + et.setUTCDate(et.getUTCDate() + nt * 7) + }, + (et, nt) => (nt - et) / durationWeek, + ) + } + const utcSunday = utcWeekday(0), + utcMonday = utcWeekday(1), + utcTuesday = utcWeekday(2), + utcWednesday = utcWeekday(3), + utcThursday = utcWeekday(4), + utcFriday = utcWeekday(5), + utcSaturday = utcWeekday(6) + utcSunday.range + utcMonday.range + utcTuesday.range + utcWednesday.range + utcThursday.range + utcFriday.range + utcSaturday.range + const timeMonth = timeInterval( + (tt) => { + tt.setDate(1), tt.setHours(0, 0, 0, 0) + }, + (tt, et) => { + tt.setMonth(tt.getMonth() + et) + }, + (tt, et) => et.getMonth() - tt.getMonth() + (et.getFullYear() - tt.getFullYear()) * 12, + (tt) => tt.getMonth(), + ) + timeMonth.range + const utcMonth = timeInterval( + (tt) => { + tt.setUTCDate(1), tt.setUTCHours(0, 0, 0, 0) + }, + (tt, et) => { + tt.setUTCMonth(tt.getUTCMonth() + et) + }, + (tt, et) => et.getUTCMonth() - tt.getUTCMonth() + (et.getUTCFullYear() - tt.getUTCFullYear()) * 12, + (tt) => tt.getUTCMonth(), + ) + utcMonth.range + const timeYear = timeInterval( + (tt) => { + tt.setMonth(0, 1), tt.setHours(0, 0, 0, 0) + }, + (tt, et) => { + tt.setFullYear(tt.getFullYear() + et) + }, + (tt, et) => et.getFullYear() - tt.getFullYear(), + (tt) => tt.getFullYear(), + ) + timeYear.every = (tt) => + !isFinite((tt = Math.floor(tt))) || !(tt > 0) + ? null + : timeInterval( + (et) => { + et.setFullYear(Math.floor(et.getFullYear() / tt) * tt), et.setMonth(0, 1), et.setHours(0, 0, 0, 0) + }, + (et, nt) => { + et.setFullYear(et.getFullYear() + nt * tt) + }, + ) + timeYear.range + const utcYear = timeInterval( + (tt) => { + tt.setUTCMonth(0, 1), tt.setUTCHours(0, 0, 0, 0) + }, + (tt, et) => { + tt.setUTCFullYear(tt.getUTCFullYear() + et) + }, + (tt, et) => et.getUTCFullYear() - tt.getUTCFullYear(), + (tt) => tt.getUTCFullYear(), + ) + utcYear.every = (tt) => + !isFinite((tt = Math.floor(tt))) || !(tt > 0) + ? null + : timeInterval( + (et) => { + et.setUTCFullYear(Math.floor(et.getUTCFullYear() / tt) * tt), + et.setUTCMonth(0, 1), + et.setUTCHours(0, 0, 0, 0) + }, + (et, nt) => { + et.setUTCFullYear(et.getUTCFullYear() + nt * tt) + }, + ) + utcYear.range + function ticker(tt, et, nt, rt, it, ot) { + const at = [ + [second, 1, durationSecond], + [second, 5, 5 * durationSecond], + [second, 15, 15 * durationSecond], + [second, 30, 30 * durationSecond], + [ot, 1, durationMinute], + [ot, 5, 5 * durationMinute], + [ot, 15, 15 * durationMinute], + [ot, 30, 30 * durationMinute], + [it, 1, durationHour], + [it, 3, 3 * durationHour], + [it, 6, 6 * durationHour], + [it, 12, 12 * durationHour], + [rt, 1, durationDay], + [rt, 2, 2 * durationDay], + [nt, 1, durationWeek], + [et, 1, durationMonth], + [et, 3, 3 * durationMonth], + [tt, 1, durationYear], + ] + function st(ct, ut, ht) { + const dt = ut < ct + dt && ([ct, ut] = [ut, ct]) + const pt = ht && typeof ht.range == 'function' ? ht : lt(ct, ut, ht), + mt = pt ? pt.range(ct, +ut + 1) : [] + return dt ? mt.reverse() : mt + } + function lt(ct, ut, ht) { + const dt = Math.abs(ut - ct) / ht, + pt = bisector(([, , yt]) => yt).right(at, dt) + if (pt === at.length) return tt.every(tickStep(ct / durationYear, ut / durationYear, ht)) + if (pt === 0) return millisecond.every(Math.max(tickStep(ct, ut, ht), 1)) + const [mt, gt] = at[dt / at[pt - 1][2] < at[pt][2] / dt ? pt - 1 : pt] + return mt.every(gt) + } + return [st, lt] + } + const [utcTicks, utcTickInterval] = ticker(utcYear, utcMonth, utcSunday, unixDay, utcHour, utcMinute), + [timeTicks, timeTickInterval] = ticker(timeYear, timeMonth, timeSunday, timeDay, timeHour, timeMinute) + function localDate(tt) { + if (0 <= tt.y && tt.y < 100) { + var et = new Date(-1, tt.m, tt.d, tt.H, tt.M, tt.S, tt.L) + return et.setFullYear(tt.y), et + } + return new Date(tt.y, tt.m, tt.d, tt.H, tt.M, tt.S, tt.L) + } + function utcDate(tt) { + if (0 <= tt.y && tt.y < 100) { + var et = new Date(Date.UTC(-1, tt.m, tt.d, tt.H, tt.M, tt.S, tt.L)) + return et.setUTCFullYear(tt.y), et + } + return new Date(Date.UTC(tt.y, tt.m, tt.d, tt.H, tt.M, tt.S, tt.L)) + } + function newDate(tt, et, nt) { + return { y: tt, m: et, d: nt, H: 0, M: 0, S: 0, L: 0 } + } + function formatLocale(tt) { + var et = tt.dateTime, + nt = tt.date, + rt = tt.time, + it = tt.periods, + ot = tt.days, + at = tt.shortDays, + st = tt.months, + lt = tt.shortMonths, + ct = formatRe(it), + ut = formatLookup(it), + ht = formatRe(ot), + dt = formatLookup(ot), + pt = formatRe(at), + mt = formatLookup(at), + gt = formatRe(st), + yt = formatLookup(st), + bt = formatRe(lt), + vt = formatLookup(lt), + xt = { + a: Wt, + A: zt, + b: Ft, + B: Nt, + c: null, + d: formatDayOfMonth, + e: formatDayOfMonth, + f: formatMicroseconds, + g: formatYearISO, + G: formatFullYearISO, + H: formatHour24, + I: formatHour12, + j: formatDayOfYear, + L: formatMilliseconds, + m: formatMonthNumber, + M: formatMinutes, + p: Ut, + q: Mt, + Q: formatUnixTimestamp, + s: formatUnixTimestampSeconds, + S: formatSeconds, + u: formatWeekdayNumberMonday, + U: formatWeekNumberSunday, + V: formatWeekNumberISO, + w: formatWeekdayNumberSunday, + W: formatWeekNumberMonday, + x: null, + X: null, + y: formatYear, + Y: formatFullYear, + Z: formatZone, + '%': formatLiteralPercent, + }, + kt = { + a: Ht, + A: en, + b: sn, + B: Kt, + c: null, + d: formatUTCDayOfMonth, + e: formatUTCDayOfMonth, + f: formatUTCMicroseconds, + g: formatUTCYearISO, + G: formatUTCFullYearISO, + H: formatUTCHour24, + I: formatUTCHour12, + j: formatUTCDayOfYear, + L: formatUTCMilliseconds, + m: formatUTCMonthNumber, + M: formatUTCMinutes, + p: rn, + q: nn, + Q: formatUnixTimestamp, + s: formatUnixTimestampSeconds, + S: formatUTCSeconds, + u: formatUTCWeekdayNumberMonday, + U: formatUTCWeekNumberSunday, + V: formatUTCWeekNumberISO, + w: formatUTCWeekdayNumberSunday, + W: formatUTCWeekNumberMonday, + x: null, + X: null, + y: formatUTCYear, + Y: formatUTCFullYear, + Z: formatUTCZone, + '%': formatLiteralPercent, + }, + St = { + a: Dt, + A: jt, + b: Pt, + B: Ct, + c: wt, + d: parseDayOfMonth, + e: parseDayOfMonth, + f: parseMicroseconds, + g: parseYear, + G: parseFullYear, + H: parseHour24, + I: parseHour24, + j: parseDayOfYear, + L: parseMilliseconds, + m: parseMonthNumber, + M: parseMinutes, + p: $t, + q: parseQuarter, + Q: parseUnixTimestamp, + s: parseUnixTimestampSeconds, + S: parseSeconds, + u: parseWeekdayNumberMonday, + U: parseWeekNumberSunday, + V: parseWeekNumberISO, + w: parseWeekdayNumberSunday, + W: parseWeekNumberMonday, + x: It, + X: Ot, + y: parseYear, + Y: parseFullYear, + Z: parseZone, + '%': parseLiteralPercent, + } + ;(xt.x = Tt(nt, xt)), + (xt.X = Tt(rt, xt)), + (xt.c = Tt(et, xt)), + (kt.x = Tt(nt, kt)), + (kt.X = Tt(rt, kt)), + (kt.c = Tt(et, kt)) + function Tt(hn, vn) { + return function (an) { + var Qt = [], + _n = -1, + Pn = 0, + $n = hn.length, + Nn, + Tn, + cn + for (an instanceof Date || (an = new Date(+an)); ++_n < $n; ) + hn.charCodeAt(_n) === 37 && + (Qt.push(hn.slice(Pn, _n)), + (Tn = pads[(Nn = hn.charAt(++_n))]) != null ? (Nn = hn.charAt(++_n)) : (Tn = Nn === 'e' ? ' ' : '0'), + (cn = vn[Nn]) && (Nn = cn(an, Tn)), + Qt.push(Nn), + (Pn = _n + 1)) + return Qt.push(hn.slice(Pn, _n)), Qt.join('') + } + } + function At(hn, vn) { + return function (an) { + var Qt = newDate(1900, void 0, 1), + _n = Et(Qt, hn, (an += ''), 0), + Pn, + $n + if (_n != an.length) return null + if ('Q' in Qt) return new Date(Qt.Q) + if ('s' in Qt) return new Date(Qt.s * 1e3 + ('L' in Qt ? Qt.L : 0)) + if ( + (vn && !('Z' in Qt) && (Qt.Z = 0), + 'p' in Qt && (Qt.H = (Qt.H % 12) + Qt.p * 12), + Qt.m === void 0 && (Qt.m = 'q' in Qt ? Qt.q : 0), + 'V' in Qt) + ) { + if (Qt.V < 1 || Qt.V > 53) return null + 'w' in Qt || (Qt.w = 1), + 'Z' in Qt + ? ((Pn = utcDate(newDate(Qt.y, 0, 1))), + ($n = Pn.getUTCDay()), + (Pn = $n > 4 || $n === 0 ? utcMonday.ceil(Pn) : utcMonday(Pn)), + (Pn = utcDay.offset(Pn, (Qt.V - 1) * 7)), + (Qt.y = Pn.getUTCFullYear()), + (Qt.m = Pn.getUTCMonth()), + (Qt.d = Pn.getUTCDate() + ((Qt.w + 6) % 7))) + : ((Pn = localDate(newDate(Qt.y, 0, 1))), + ($n = Pn.getDay()), + (Pn = $n > 4 || $n === 0 ? timeMonday.ceil(Pn) : timeMonday(Pn)), + (Pn = timeDay.offset(Pn, (Qt.V - 1) * 7)), + (Qt.y = Pn.getFullYear()), + (Qt.m = Pn.getMonth()), + (Qt.d = Pn.getDate() + ((Qt.w + 6) % 7))) + } else + ('W' in Qt || 'U' in Qt) && + ('w' in Qt || (Qt.w = 'u' in Qt ? Qt.u % 7 : 'W' in Qt ? 1 : 0), + ($n = 'Z' in Qt ? utcDate(newDate(Qt.y, 0, 1)).getUTCDay() : localDate(newDate(Qt.y, 0, 1)).getDay()), + (Qt.m = 0), + (Qt.d = 'W' in Qt ? ((Qt.w + 6) % 7) + Qt.W * 7 - (($n + 5) % 7) : Qt.w + Qt.U * 7 - (($n + 6) % 7))) + return 'Z' in Qt ? ((Qt.H += (Qt.Z / 100) | 0), (Qt.M += Qt.Z % 100), utcDate(Qt)) : localDate(Qt) + } + } + function Et(hn, vn, an, Qt) { + for (var _n = 0, Pn = vn.length, $n = an.length, Nn, Tn; _n < Pn; ) { + if (Qt >= $n) return -1 + if (((Nn = vn.charCodeAt(_n++)), Nn === 37)) { + if (((Nn = vn.charAt(_n++)), (Tn = St[Nn in pads ? vn.charAt(_n++) : Nn]), !Tn || (Qt = Tn(hn, an, Qt)) < 0)) + return -1 + } else if (Nn != an.charCodeAt(Qt++)) return -1 + } + return Qt + } + function $t(hn, vn, an) { + var Qt = ct.exec(vn.slice(an)) + return Qt ? ((hn.p = ut.get(Qt[0].toLowerCase())), an + Qt[0].length) : -1 + } + function Dt(hn, vn, an) { + var Qt = pt.exec(vn.slice(an)) + return Qt ? ((hn.w = mt.get(Qt[0].toLowerCase())), an + Qt[0].length) : -1 + } + function jt(hn, vn, an) { + var Qt = ht.exec(vn.slice(an)) + return Qt ? ((hn.w = dt.get(Qt[0].toLowerCase())), an + Qt[0].length) : -1 + } + function Pt(hn, vn, an) { + var Qt = bt.exec(vn.slice(an)) + return Qt ? ((hn.m = vt.get(Qt[0].toLowerCase())), an + Qt[0].length) : -1 + } + function Ct(hn, vn, an) { + var Qt = gt.exec(vn.slice(an)) + return Qt ? ((hn.m = yt.get(Qt[0].toLowerCase())), an + Qt[0].length) : -1 + } + function wt(hn, vn, an) { + return Et(hn, et, vn, an) + } + function It(hn, vn, an) { + return Et(hn, nt, vn, an) + } + function Ot(hn, vn, an) { + return Et(hn, rt, vn, an) + } + function Wt(hn) { + return at[hn.getDay()] + } + function zt(hn) { + return ot[hn.getDay()] + } + function Ft(hn) { + return lt[hn.getMonth()] + } + function Nt(hn) { + return st[hn.getMonth()] + } + function Ut(hn) { + return it[+(hn.getHours() >= 12)] + } + function Mt(hn) { + return 1 + ~~(hn.getMonth() / 3) + } + function Ht(hn) { + return at[hn.getUTCDay()] + } + function en(hn) { + return ot[hn.getUTCDay()] + } + function sn(hn) { + return lt[hn.getUTCMonth()] + } + function Kt(hn) { + return st[hn.getUTCMonth()] + } + function rn(hn) { + return it[+(hn.getUTCHours() >= 12)] + } + function nn(hn) { + return 1 + ~~(hn.getUTCMonth() / 3) + } + return { + format: function (hn) { + var vn = Tt((hn += ''), xt) + return ( + (vn.toString = function () { + return hn + }), + vn + ) + }, + parse: function (hn) { + var vn = At((hn += ''), !1) + return ( + (vn.toString = function () { + return hn + }), + vn + ) + }, + utcFormat: function (hn) { + var vn = Tt((hn += ''), kt) + return ( + (vn.toString = function () { + return hn + }), + vn + ) + }, + utcParse: function (hn) { + var vn = At((hn += ''), !0) + return ( + (vn.toString = function () { + return hn + }), + vn + ) + }, + } + } + var pads = { '-': '', _: ' ', 0: '0' }, + numberRe = /^\s*\d+/, + percentRe = /^%/, + requoteRe = /[\\^$*+?|[\]().{}]/g + function pad(tt, et, nt) { + var rt = tt < 0 ? '-' : '', + it = (rt ? -tt : tt) + '', + ot = it.length + return rt + (ot < nt ? new Array(nt - ot + 1).join(et) + it : it) + } + function requote(tt) { + return tt.replace(requoteRe, '\\$&') + } + function formatRe(tt) { + return new RegExp('^(?:' + tt.map(requote).join('|') + ')', 'i') + } + function formatLookup(tt) { + return new Map(tt.map((et, nt) => [et.toLowerCase(), nt])) + } + function parseWeekdayNumberSunday(tt, et, nt) { + var rt = numberRe.exec(et.slice(nt, nt + 1)) + return rt ? ((tt.w = +rt[0]), nt + rt[0].length) : -1 + } + function parseWeekdayNumberMonday(tt, et, nt) { + var rt = numberRe.exec(et.slice(nt, nt + 1)) + return rt ? ((tt.u = +rt[0]), nt + rt[0].length) : -1 + } + function parseWeekNumberSunday(tt, et, nt) { + var rt = numberRe.exec(et.slice(nt, nt + 2)) + return rt ? ((tt.U = +rt[0]), nt + rt[0].length) : -1 + } + function parseWeekNumberISO(tt, et, nt) { + var rt = numberRe.exec(et.slice(nt, nt + 2)) + return rt ? ((tt.V = +rt[0]), nt + rt[0].length) : -1 + } + function parseWeekNumberMonday(tt, et, nt) { + var rt = numberRe.exec(et.slice(nt, nt + 2)) + return rt ? ((tt.W = +rt[0]), nt + rt[0].length) : -1 + } + function parseFullYear(tt, et, nt) { + var rt = numberRe.exec(et.slice(nt, nt + 4)) + return rt ? ((tt.y = +rt[0]), nt + rt[0].length) : -1 + } + function parseYear(tt, et, nt) { + var rt = numberRe.exec(et.slice(nt, nt + 2)) + return rt ? ((tt.y = +rt[0] + (+rt[0] > 68 ? 1900 : 2e3)), nt + rt[0].length) : -1 + } + function parseZone(tt, et, nt) { + var rt = /^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(et.slice(nt, nt + 6)) + return rt ? ((tt.Z = rt[1] ? 0 : -(rt[2] + (rt[3] || '00'))), nt + rt[0].length) : -1 + } + function parseQuarter(tt, et, nt) { + var rt = numberRe.exec(et.slice(nt, nt + 1)) + return rt ? ((tt.q = rt[0] * 3 - 3), nt + rt[0].length) : -1 + } + function parseMonthNumber(tt, et, nt) { + var rt = numberRe.exec(et.slice(nt, nt + 2)) + return rt ? ((tt.m = rt[0] - 1), nt + rt[0].length) : -1 + } + function parseDayOfMonth(tt, et, nt) { + var rt = numberRe.exec(et.slice(nt, nt + 2)) + return rt ? ((tt.d = +rt[0]), nt + rt[0].length) : -1 + } + function parseDayOfYear(tt, et, nt) { + var rt = numberRe.exec(et.slice(nt, nt + 3)) + return rt ? ((tt.m = 0), (tt.d = +rt[0]), nt + rt[0].length) : -1 + } + function parseHour24(tt, et, nt) { + var rt = numberRe.exec(et.slice(nt, nt + 2)) + return rt ? ((tt.H = +rt[0]), nt + rt[0].length) : -1 + } + function parseMinutes(tt, et, nt) { + var rt = numberRe.exec(et.slice(nt, nt + 2)) + return rt ? ((tt.M = +rt[0]), nt + rt[0].length) : -1 + } + function parseSeconds(tt, et, nt) { + var rt = numberRe.exec(et.slice(nt, nt + 2)) + return rt ? ((tt.S = +rt[0]), nt + rt[0].length) : -1 + } + function parseMilliseconds(tt, et, nt) { + var rt = numberRe.exec(et.slice(nt, nt + 3)) + return rt ? ((tt.L = +rt[0]), nt + rt[0].length) : -1 + } + function parseMicroseconds(tt, et, nt) { + var rt = numberRe.exec(et.slice(nt, nt + 6)) + return rt ? ((tt.L = Math.floor(rt[0] / 1e3)), nt + rt[0].length) : -1 + } + function parseLiteralPercent(tt, et, nt) { + var rt = percentRe.exec(et.slice(nt, nt + 1)) + return rt ? nt + rt[0].length : -1 + } + function parseUnixTimestamp(tt, et, nt) { + var rt = numberRe.exec(et.slice(nt)) + return rt ? ((tt.Q = +rt[0]), nt + rt[0].length) : -1 + } + function parseUnixTimestampSeconds(tt, et, nt) { + var rt = numberRe.exec(et.slice(nt)) + return rt ? ((tt.s = +rt[0]), nt + rt[0].length) : -1 + } + function formatDayOfMonth(tt, et) { + return pad(tt.getDate(), et, 2) + } + function formatHour24(tt, et) { + return pad(tt.getHours(), et, 2) + } + function formatHour12(tt, et) { + return pad(tt.getHours() % 12 || 12, et, 2) + } + function formatDayOfYear(tt, et) { + return pad(1 + timeDay.count(timeYear(tt), tt), et, 3) + } + function formatMilliseconds(tt, et) { + return pad(tt.getMilliseconds(), et, 3) + } + function formatMicroseconds(tt, et) { + return formatMilliseconds(tt, et) + '000' + } + function formatMonthNumber(tt, et) { + return pad(tt.getMonth() + 1, et, 2) + } + function formatMinutes(tt, et) { + return pad(tt.getMinutes(), et, 2) + } + function formatSeconds(tt, et) { + return pad(tt.getSeconds(), et, 2) + } + function formatWeekdayNumberMonday(tt) { + var et = tt.getDay() + return et === 0 ? 7 : et + } + function formatWeekNumberSunday(tt, et) { + return pad(timeSunday.count(timeYear(tt) - 1, tt), et, 2) + } + function dISO(tt) { + var et = tt.getDay() + return et >= 4 || et === 0 ? timeThursday(tt) : timeThursday.ceil(tt) + } + function formatWeekNumberISO(tt, et) { + return (tt = dISO(tt)), pad(timeThursday.count(timeYear(tt), tt) + (timeYear(tt).getDay() === 4), et, 2) + } + function formatWeekdayNumberSunday(tt) { + return tt.getDay() + } + function formatWeekNumberMonday(tt, et) { + return pad(timeMonday.count(timeYear(tt) - 1, tt), et, 2) + } + function formatYear(tt, et) { + return pad(tt.getFullYear() % 100, et, 2) + } + function formatYearISO(tt, et) { + return (tt = dISO(tt)), pad(tt.getFullYear() % 100, et, 2) + } + function formatFullYear(tt, et) { + return pad(tt.getFullYear() % 1e4, et, 4) + } + function formatFullYearISO(tt, et) { + var nt = tt.getDay() + return (tt = nt >= 4 || nt === 0 ? timeThursday(tt) : timeThursday.ceil(tt)), pad(tt.getFullYear() % 1e4, et, 4) + } + function formatZone(tt) { + var et = tt.getTimezoneOffset() + return (et > 0 ? '-' : ((et *= -1), '+')) + pad((et / 60) | 0, '0', 2) + pad(et % 60, '0', 2) + } + function formatUTCDayOfMonth(tt, et) { + return pad(tt.getUTCDate(), et, 2) + } + function formatUTCHour24(tt, et) { + return pad(tt.getUTCHours(), et, 2) + } + function formatUTCHour12(tt, et) { + return pad(tt.getUTCHours() % 12 || 12, et, 2) + } + function formatUTCDayOfYear(tt, et) { + return pad(1 + utcDay.count(utcYear(tt), tt), et, 3) + } + function formatUTCMilliseconds(tt, et) { + return pad(tt.getUTCMilliseconds(), et, 3) + } + function formatUTCMicroseconds(tt, et) { + return formatUTCMilliseconds(tt, et) + '000' + } + function formatUTCMonthNumber(tt, et) { + return pad(tt.getUTCMonth() + 1, et, 2) + } + function formatUTCMinutes(tt, et) { + return pad(tt.getUTCMinutes(), et, 2) + } + function formatUTCSeconds(tt, et) { + return pad(tt.getUTCSeconds(), et, 2) + } + function formatUTCWeekdayNumberMonday(tt) { + var et = tt.getUTCDay() + return et === 0 ? 7 : et + } + function formatUTCWeekNumberSunday(tt, et) { + return pad(utcSunday.count(utcYear(tt) - 1, tt), et, 2) + } + function UTCdISO(tt) { + var et = tt.getUTCDay() + return et >= 4 || et === 0 ? utcThursday(tt) : utcThursday.ceil(tt) + } + function formatUTCWeekNumberISO(tt, et) { + return (tt = UTCdISO(tt)), pad(utcThursday.count(utcYear(tt), tt) + (utcYear(tt).getUTCDay() === 4), et, 2) + } + function formatUTCWeekdayNumberSunday(tt) { + return tt.getUTCDay() + } + function formatUTCWeekNumberMonday(tt, et) { + return pad(utcMonday.count(utcYear(tt) - 1, tt), et, 2) + } + function formatUTCYear(tt, et) { + return pad(tt.getUTCFullYear() % 100, et, 2) + } + function formatUTCYearISO(tt, et) { + return (tt = UTCdISO(tt)), pad(tt.getUTCFullYear() % 100, et, 2) + } + function formatUTCFullYear(tt, et) { + return pad(tt.getUTCFullYear() % 1e4, et, 4) + } + function formatUTCFullYearISO(tt, et) { + var nt = tt.getUTCDay() + return (tt = nt >= 4 || nt === 0 ? utcThursday(tt) : utcThursday.ceil(tt)), pad(tt.getUTCFullYear() % 1e4, et, 4) + } + function formatUTCZone() { + return '+0000' + } + function formatLiteralPercent() { + return '%' + } + function formatUnixTimestamp(tt) { + return +tt + } + function formatUnixTimestampSeconds(tt) { + return Math.floor(+tt / 1e3) + } + var locale, timeFormat, utcFormat + defaultLocale({ + dateTime: '%x, %X', + date: '%-m/%-d/%Y', + time: '%-I:%M:%S %p', + periods: ['AM', 'PM'], + days: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'], + shortDays: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'], + months: [ + 'January', + 'February', + 'March', + 'April', + 'May', + 'June', + 'July', + 'August', + 'September', + 'October', + 'November', + 'December', + ], + shortMonths: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'], + }) + function defaultLocale(tt) { + return ( + (locale = formatLocale(tt)), + (timeFormat = locale.format), + locale.parse, + (utcFormat = locale.utcFormat), + locale.utcParse, + locale + ) + } + function date(tt) { + return new Date(tt) + } + function number$1(tt) { + return tt instanceof Date ? +tt : +new Date(+tt) + } + function calendar(tt, et, nt, rt, it, ot, at, st, lt, ct) { + var ut = continuous(), + ht = ut.invert, + dt = ut.domain, + pt = ct('.%L'), + mt = ct(':%S'), + gt = ct('%I:%M'), + yt = ct('%I %p'), + bt = ct('%a %d'), + vt = ct('%b %d'), + xt = ct('%B'), + kt = ct('%Y') + function St(Tt) { + return ( + lt(Tt) < Tt + ? pt + : st(Tt) < Tt + ? mt + : at(Tt) < Tt + ? gt + : ot(Tt) < Tt + ? yt + : rt(Tt) < Tt + ? it(Tt) < Tt + ? bt + : vt + : nt(Tt) < Tt + ? xt + : kt + )(Tt) + } + return ( + (ut.invert = function (Tt) { + return new Date(ht(Tt)) + }), + (ut.domain = function (Tt) { + return arguments.length ? dt(Array.from(Tt, number$1)) : dt().map(date) + }), + (ut.ticks = function (Tt) { + var At = dt() + return tt(At[0], At[At.length - 1], Tt ?? 10) + }), + (ut.tickFormat = function (Tt, At) { + return At == null ? St : ct(At) + }), + (ut.nice = function (Tt) { + var At = dt() + return ( + (!Tt || typeof Tt.range != 'function') && (Tt = et(At[0], At[At.length - 1], Tt ?? 10)), + Tt ? dt(nice(At, Tt)) : ut + ) + }), + (ut.copy = function () { + return copy$1(ut, calendar(tt, et, nt, rt, it, ot, at, st, lt, ct)) + }), + ut + ) + } + function time() { + return initRange.apply( + calendar( + timeTicks, + timeTickInterval, + timeYear, + timeMonth, + timeSunday, + timeDay, + timeHour, + timeMinute, + second, + timeFormat, + ).domain([new Date(2e3, 0, 1), new Date(2e3, 0, 2)]), + arguments, + ) + } + function utcTime() { + return initRange.apply( + calendar( + utcTicks, + utcTickInterval, + utcYear, + utcMonth, + utcSunday, + utcDay, + utcHour, + utcMinute, + second, + utcFormat, + ).domain([Date.UTC(2e3, 0, 1), Date.UTC(2e3, 0, 2)]), + arguments, + ) + } + function transformer$1() { + var tt = 0, + et = 1, + nt, + rt, + it, + ot, + at = identity$4, + st = !1, + lt + function ct(ht) { + return ht == null || isNaN((ht = +ht)) + ? lt + : at(it === 0 ? 0.5 : ((ht = (ot(ht) - nt) * it), st ? Math.max(0, Math.min(1, ht)) : ht)) + } + ;(ct.domain = function (ht) { + return arguments.length + ? (([tt, et] = ht), (nt = ot((tt = +tt))), (rt = ot((et = +et))), (it = nt === rt ? 0 : 1 / (rt - nt)), ct) + : [tt, et] + }), + (ct.clamp = function (ht) { + return arguments.length ? ((st = !!ht), ct) : st + }), + (ct.interpolator = function (ht) { + return arguments.length ? ((at = ht), ct) : at + }) + function ut(ht) { + return function (dt) { + var pt, mt + return arguments.length ? (([pt, mt] = dt), (at = ht(pt, mt)), ct) : [at(0), at(1)] + } + } + return ( + (ct.range = ut(interpolate$1)), + (ct.rangeRound = ut(interpolateRound)), + (ct.unknown = function (ht) { + return arguments.length ? ((lt = ht), ct) : lt + }), + function (ht) { + return (ot = ht), (nt = ht(tt)), (rt = ht(et)), (it = nt === rt ? 0 : 1 / (rt - nt)), ct + } + ) + } + function copy(tt, et) { + return et.domain(tt.domain()).interpolator(tt.interpolator()).clamp(tt.clamp()).unknown(tt.unknown()) + } + function sequential() { + var tt = linearish(transformer$1()(identity$4)) + return ( + (tt.copy = function () { + return copy(tt, sequential()) + }), + initInterpolator.apply(tt, arguments) + ) + } + function sequentialLog() { + var tt = loggish(transformer$1()).domain([1, 10]) + return ( + (tt.copy = function () { + return copy(tt, sequentialLog()).base(tt.base()) + }), + initInterpolator.apply(tt, arguments) + ) + } + function sequentialSymlog() { + var tt = symlogish(transformer$1()) + return ( + (tt.copy = function () { + return copy(tt, sequentialSymlog()).constant(tt.constant()) + }), + initInterpolator.apply(tt, arguments) + ) + } + function sequentialPow() { + var tt = powish(transformer$1()) + return ( + (tt.copy = function () { + return copy(tt, sequentialPow()).exponent(tt.exponent()) + }), + initInterpolator.apply(tt, arguments) + ) + } + function sequentialSqrt() { + return sequentialPow.apply(null, arguments).exponent(0.5) + } + function sequentialQuantile() { + var tt = [], + et = identity$4 + function nt(rt) { + if (rt != null && !isNaN((rt = +rt))) return et((bisect(tt, rt, 1) - 1) / (tt.length - 1)) + } + return ( + (nt.domain = function (rt) { + if (!arguments.length) return tt.slice() + tt = [] + for (let it of rt) it != null && !isNaN((it = +it)) && tt.push(it) + return tt.sort(ascending$1), nt + }), + (nt.interpolator = function (rt) { + return arguments.length ? ((et = rt), nt) : et + }), + (nt.range = function () { + return tt.map((rt, it) => et(it / (tt.length - 1))) + }), + (nt.quantiles = function (rt) { + return Array.from({ length: rt + 1 }, (it, ot) => quantile$1(tt, ot / rt)) + }), + (nt.copy = function () { + return sequentialQuantile(et).domain(tt) + }), + initInterpolator.apply(nt, arguments) + ) + } + function transformer() { + var tt = 0, + et = 0.5, + nt = 1, + rt = 1, + it, + ot, + at, + st, + lt, + ct = identity$4, + ut, + ht = !1, + dt + function pt(gt) { + return isNaN((gt = +gt)) + ? dt + : ((gt = 0.5 + ((gt = +ut(gt)) - ot) * (rt * gt < rt * ot ? st : lt)), + ct(ht ? Math.max(0, Math.min(1, gt)) : gt)) + } + ;(pt.domain = function (gt) { + return arguments.length + ? (([tt, et, nt] = gt), + (it = ut((tt = +tt))), + (ot = ut((et = +et))), + (at = ut((nt = +nt))), + (st = it === ot ? 0 : 0.5 / (ot - it)), + (lt = ot === at ? 0 : 0.5 / (at - ot)), + (rt = ot < it ? -1 : 1), + pt) + : [tt, et, nt] + }), + (pt.clamp = function (gt) { + return arguments.length ? ((ht = !!gt), pt) : ht + }), + (pt.interpolator = function (gt) { + return arguments.length ? ((ct = gt), pt) : ct + }) + function mt(gt) { + return function (yt) { + var bt, vt, xt + return arguments.length + ? (([bt, vt, xt] = yt), (ct = piecewise(gt, [bt, vt, xt])), pt) + : [ct(0), ct(0.5), ct(1)] + } + } + return ( + (pt.range = mt(interpolate$1)), + (pt.rangeRound = mt(interpolateRound)), + (pt.unknown = function (gt) { + return arguments.length ? ((dt = gt), pt) : dt + }), + function (gt) { + return ( + (ut = gt), + (it = gt(tt)), + (ot = gt(et)), + (at = gt(nt)), + (st = it === ot ? 0 : 0.5 / (ot - it)), + (lt = ot === at ? 0 : 0.5 / (at - ot)), + (rt = ot < it ? -1 : 1), + pt + ) + } + ) + } + function diverging() { + var tt = linearish(transformer()(identity$4)) + return ( + (tt.copy = function () { + return copy(tt, diverging()) + }), + initInterpolator.apply(tt, arguments) + ) + } + function divergingLog() { + var tt = loggish(transformer()).domain([0.1, 1, 10]) + return ( + (tt.copy = function () { + return copy(tt, divergingLog()).base(tt.base()) + }), + initInterpolator.apply(tt, arguments) + ) + } + function divergingSymlog() { + var tt = symlogish(transformer()) + return ( + (tt.copy = function () { + return copy(tt, divergingSymlog()).constant(tt.constant()) + }), + initInterpolator.apply(tt, arguments) + ) + } + function divergingPow() { + var tt = powish(transformer()) + return ( + (tt.copy = function () { + return copy(tt, divergingPow()).exponent(tt.exponent()) + }), + initInterpolator.apply(tt, arguments) + ) + } + function divergingSqrt() { + return divergingPow.apply(null, arguments).exponent(0.5) + } + const d3Scales = Object.freeze( + Object.defineProperty( + { + __proto__: null, + scaleBand: band, + scaleDiverging: diverging, + scaleDivergingLog: divergingLog, + scaleDivergingPow: divergingPow, + scaleDivergingSqrt: divergingSqrt, + scaleDivergingSymlog: divergingSymlog, + scaleIdentity: identity$2, + scaleImplicit: implicit, + scaleLinear: linear, + scaleLog: log, + scaleOrdinal: ordinal, + scalePoint: point, + scalePow: pow, + scaleQuantile: quantile, + scaleQuantize: quantize, + scaleRadial: radial, + scaleSequential: sequential, + scaleSequentialLog: sequentialLog, + scaleSequentialPow: sequentialPow, + scaleSequentialQuantile: sequentialQuantile, + scaleSequentialSqrt: sequentialSqrt, + scaleSequentialSymlog: sequentialSymlog, + scaleSqrt: sqrt, + scaleSymlog: symlog, + scaleThreshold: threshold, + scaleTime: time, + scaleUtc: utcTime, + tickFormat, + }, + Symbol.toStringTag, + { value: 'Module' }, + ), + ) + var MAX_DIGITS = 1e9, + defaults = { + precision: 20, + rounding: 4, + toExpNeg: -7, + toExpPos: 21, + LN10: '2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286', + }, + Decimal, + external = !0, + decimalError = '[DecimalError] ', + invalidArgument = decimalError + 'Invalid argument: ', + exponentOutOfRange = decimalError + 'Exponent out of range: ', + mathfloor = Math.floor, + mathpow = Math.pow, + isDecimal = /^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i, + ONE, + BASE = 1e7, + LOG_BASE = 7, + MAX_SAFE_INTEGER = 9007199254740991, + MAX_E = mathfloor(MAX_SAFE_INTEGER / LOG_BASE), + P = {} + P.absoluteValue = P.abs = function () { + var tt = new this.constructor(this) + return tt.s && (tt.s = 1), tt + } + P.comparedTo = P.cmp = function (tt) { + var et, + nt, + rt, + it, + ot = this + if (((tt = new ot.constructor(tt)), ot.s !== tt.s)) return ot.s || -tt.s + if (ot.e !== tt.e) return (ot.e > tt.e) ^ (ot.s < 0) ? 1 : -1 + for (rt = ot.d.length, it = tt.d.length, et = 0, nt = rt < it ? rt : it; et < nt; ++et) + if (ot.d[et] !== tt.d[et]) return (ot.d[et] > tt.d[et]) ^ (ot.s < 0) ? 1 : -1 + return rt === it ? 0 : (rt > it) ^ (ot.s < 0) ? 1 : -1 + } + P.decimalPlaces = P.dp = function () { + var tt = this, + et = tt.d.length - 1, + nt = (et - tt.e) * LOG_BASE + if (((et = tt.d[et]), et)) for (; et % 10 == 0; et /= 10) nt-- + return nt < 0 ? 0 : nt + } + P.dividedBy = P.div = function (tt) { + return divide(this, new this.constructor(tt)) + } + P.dividedToIntegerBy = P.idiv = function (tt) { + var et = this, + nt = et.constructor + return round(divide(et, new nt(tt), 0, 1), nt.precision) + } + P.equals = P.eq = function (tt) { + return !this.cmp(tt) + } + P.exponent = function () { + return getBase10Exponent(this) + } + P.greaterThan = P.gt = function (tt) { + return this.cmp(tt) > 0 + } + P.greaterThanOrEqualTo = P.gte = function (tt) { + return this.cmp(tt) >= 0 + } + P.isInteger = P.isint = function () { + return this.e > this.d.length - 2 + } + P.isNegative = P.isneg = function () { + return this.s < 0 + } + P.isPositive = P.ispos = function () { + return this.s > 0 + } + P.isZero = function () { + return this.s === 0 + } + P.lessThan = P.lt = function (tt) { + return this.cmp(tt) < 0 + } + P.lessThanOrEqualTo = P.lte = function (tt) { + return this.cmp(tt) < 1 + } + P.logarithm = P.log = function (tt) { + var et, + nt = this, + rt = nt.constructor, + it = rt.precision, + ot = it + 5 + if (tt === void 0) tt = new rt(10) + else if (((tt = new rt(tt)), tt.s < 1 || tt.eq(ONE))) throw Error(decimalError + 'NaN') + if (nt.s < 1) throw Error(decimalError + (nt.s ? 'NaN' : '-Infinity')) + return nt.eq(ONE) + ? new rt(0) + : ((external = !1), (et = divide(ln(nt, ot), ln(tt, ot), ot)), (external = !0), round(et, it)) + } + P.minus = P.sub = function (tt) { + var et = this + return (tt = new et.constructor(tt)), et.s == tt.s ? subtract(et, tt) : add(et, ((tt.s = -tt.s), tt)) + } + P.modulo = P.mod = function (tt) { + var et, + nt = this, + rt = nt.constructor, + it = rt.precision + if (((tt = new rt(tt)), !tt.s)) throw Error(decimalError + 'NaN') + return nt.s + ? ((external = !1), (et = divide(nt, tt, 0, 1).times(tt)), (external = !0), nt.minus(et)) + : round(new rt(nt), it) + } + P.naturalExponential = P.exp = function () { + return exp(this) + } + P.naturalLogarithm = P.ln = function () { + return ln(this) + } + P.negated = P.neg = function () { + var tt = new this.constructor(this) + return (tt.s = -tt.s || 0), tt + } + P.plus = P.add = function (tt) { + var et = this + return (tt = new et.constructor(tt)), et.s == tt.s ? add(et, tt) : subtract(et, ((tt.s = -tt.s), tt)) + } + P.precision = P.sd = function (tt) { + var et, + nt, + rt, + it = this + if (tt !== void 0 && tt !== !!tt && tt !== 1 && tt !== 0) throw Error(invalidArgument + tt) + if (((et = getBase10Exponent(it) + 1), (rt = it.d.length - 1), (nt = rt * LOG_BASE + 1), (rt = it.d[rt]), rt)) { + for (; rt % 10 == 0; rt /= 10) nt-- + for (rt = it.d[0]; rt >= 10; rt /= 10) nt++ + } + return tt && et > nt ? et : nt + } + P.squareRoot = P.sqrt = function () { + var tt, + et, + nt, + rt, + it, + ot, + at, + st = this, + lt = st.constructor + if (st.s < 1) { + if (!st.s) return new lt(0) + throw Error(decimalError + 'NaN') + } + for ( + tt = getBase10Exponent(st), + external = !1, + it = Math.sqrt(+st), + it == 0 || it == 1 / 0 + ? ((et = digitsToString(st.d)), + (et.length + tt) % 2 == 0 && (et += '0'), + (it = Math.sqrt(et)), + (tt = mathfloor((tt + 1) / 2) - (tt < 0 || tt % 2)), + it == 1 / 0 ? (et = '5e' + tt) : ((et = it.toExponential()), (et = et.slice(0, et.indexOf('e') + 1) + tt)), + (rt = new lt(et))) + : (rt = new lt(it.toString())), + nt = lt.precision, + it = at = nt + 3; + ; - uniform float iTime; - uniform vec2 lensPosition; - uniform vec2 iResolution; - uniform vec3 colorGain; - uniform float starPoints; - uniform float glareSize; - uniform float flareSize; - uniform float flareSpeed; - uniform float flareShape; - uniform float haloScale; - uniform float opacity; - uniform bool animated; - uniform bool anamorphic; - uniform bool enabled; - uniform bool secondaryGhosts; - uniform bool starBurst; - uniform float ghostScale; - uniform bool aditionalStreaks; - uniform sampler2D lensDirtTexture; - vec2 vxtC; + ) + if ( + ((ot = rt), + (rt = ot.plus(divide(st, ot, at + 2)).times(0.5)), + digitsToString(ot.d).slice(0, at) === (et = digitsToString(rt.d)).slice(0, at)) + ) { + if (((et = et.slice(at - 3, at + 1)), it == at && et == '4999')) { + if ((round(ot, nt + 1, 0), ot.times(ot).eq(st))) { + rt = ot + break + } + } else if (et != '9999') break + at += 4 + } + return (external = !0), round(rt, nt) + } + P.times = P.mul = function (tt) { + var et, + nt, + rt, + it, + ot, + at, + st, + lt, + ct, + ut = this, + ht = ut.constructor, + dt = ut.d, + pt = (tt = new ht(tt)).d + if (!ut.s || !tt.s) return new ht(0) + for ( + tt.s *= ut.s, + nt = ut.e + tt.e, + lt = dt.length, + ct = pt.length, + lt < ct && ((ot = dt), (dt = pt), (pt = ot), (at = lt), (lt = ct), (ct = at)), + ot = [], + at = lt + ct, + rt = at; + rt--; - float rndf(float n){return fract(sin(n) * 43758.5453123);}float niz(float p){float fl = floor(p);float fc = fract(p);return mix(rndf(fl),rndf(fl + 1.0), fc);} - vec3 hsv2rgb(vec3 c){vec4 k = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0);vec3 p = abs(fract(c.xxx + k.xyz) * 6.0 - k.www);return c.z * mix(k.xxx, clamp(p - k.xxx, 0.0, 1.0), c.y);} - float satU(float x){return clamp(x, 0.,1.);}vec2 rtU(vec2 naz, float rtn){return vec2(cos(rtn) * naz.x + sin(rtn) * naz.y,cos(rtn) * naz.y - sin(rtn) * naz.x);} - vec3 drwF(vec2 p, float intensity, float rnd, float speed, int id){float flhos = (1. / 32.) * float(id) * 0.1;float lingrad = distance(vec2(0.), p);float expg = 1. / exp(lingrad * (fract(rnd) * 0.66 + 0.33));vec3 qzTg = hsv2rgb(vec3( fract( (expg * 8.) + speed * flareSpeed + flhos), pow(1.-abs(expg*2.-1.), 0.45), 20.0 * expg * intensity));float internalStarPoints;if(anamorphic){internalStarPoints = 1.0;} else{internalStarPoints = starPoints;}float ams = length(p * flareShape * sin(internalStarPoints * atan(p.x, p.y)));float kJhg = pow(1.-satU(ams), ( anamorphic ? 100. : 12.));kJhg += satU(expg-0.9) * 3.;kJhg = pow(kJhg * expg, 8. + (1.-intensity) * 5.);if(flareSpeed > 0.0){return vec3(kJhg) * qzTg;} else{return vec3(kJhg) * flareSize * 15.;}} - float ams2(vec3 a, vec3 b) { return abs(a.x - b.x) + abs(a.y - b.y) + abs(a.z - b.z);}vec3 satU(vec3 x){return clamp(x, vec3(0.0), vec3(1.0));} - float glR(vec2 naz, vec2 pos, float zsi){vec2 mni;if(animated){mni = rtU(naz-pos, iTime * 0.1);} else{mni = naz-pos;}float ang = atan(mni.y, mni.x) * (anamorphic ? 1.0 : starPoints);float ams2 = length(mni);ams2 = pow(ams2, .9);float f0 = 1.0/(length(naz-pos)*(1.0/zsi*16.0)+.2);return f0+f0*(sin((ang))*.2 +.3);} - float sdHex(vec2 p){p = abs(p);vec2 q = vec2(p.x*2.0*0.5773503, p.y + p.x*0.5773503);return dot(step(q.xy,q.yx), 1.0-q.yx);}float fpow(float x, float k){return x > k ? pow((x-k)/(1.0-k),2.0) : 0.0;} - vec3 rHx(vec2 naz, vec2 p, float s, vec3 col){naz -= p;if (abs(naz.x) < 0.2*s && abs(naz.y) < 0.2*s){return mix(vec3(0),mix(vec3(0),col,0.1 + fpow(length(naz/s),0.1)*10.0),smoothstep(0.0,0.1,sdHex(naz*20.0/s)));}return vec3(0);} - vec3 mLs(vec2 naz, vec2 pos){vec2 mni = naz-pos;vec2 zxMp = naz*(length(naz));float ang = atan(mni.x,mni.y);float f0 = .3/(length(naz-pos)*16.0+1.0);f0 = f0*(sin(niz(sin(ang*3.9-(animated ? iTime : 0.0) * 0.3) * starPoints))*.2 );float f1 = max(0.01-pow(length(naz+1.2*pos),1.9),.0)*7.0;float f2 = max(.9/(10.0+32.0*pow(length(zxMp+0.99*pos),2.0)),.0)*0.35;float f22 = max(.9/(11.0+32.0*pow(length(zxMp+0.85*pos),2.0)),.0)*0.23;float f23 = max(.9/(12.0+32.0*pow(length(zxMp+0.95*pos),2.0)),.0)*0.6;vec2 ztX = mix(naz,zxMp, 0.1);float f4 = max(0.01-pow(length(ztX+0.4*pos),2.9),.0)*4.02;float f42 = max(0.0-pow(length(ztX+0.45*pos),2.9),.0)*4.1;float f43 = max(0.01-pow(length(ztX+0.5*pos),2.9),.0)*4.6;ztX = mix(naz,zxMp,-.4);float f5 = max(0.01-pow(length(ztX+0.1*pos),5.5),.0)*2.0;float f52 = max(0.01-pow(length(ztX+0.2*pos),5.5),.0)*2.0;float f53 = max(0.01-pow(length(ztX+0.1*pos),5.5),.0)*2.0;ztX = mix(naz,zxMp, 2.1);float f6 = max(0.01-pow(length(ztX-0.3*pos),1.61),.0)*3.159;float f62 = max(0.01-pow(length(ztX-0.325*pos),1.614),.0)*3.14;float f63 = max(0.01-pow(length(ztX-0.389*pos),1.623),.0)*3.12;vec3 c = vec3(glR(naz,pos, glareSize));vec2 prot;if(animated){prot = rtU(naz - pos, (iTime * 0.1));} else if(anamorphic){prot = rtU(naz - pos, 1.570796);} else {prot = naz - pos;}c += drwF(prot, (anamorphic ? flareSize * 10. : flareSize), 0.1, iTime, 1);c.r+=f1+f2+f4+f5+f6; c.g+=f1+f22+f42+f52+f62; c.b+=f1+f23+f43+f53+f63;c = c*1.3 * vec3(length(zxMp)+.09);c+=vec3(f0);return c;} - vec3 cc(vec3 clr, float fct,float fct2){float w = clr.x+clr.y+clr.z;return mix(clr,vec3(w)*fct,w*fct2);}float rnd(vec2 p){float f = fract(sin(dot(p, vec2(12.1234, 72.8392) )*45123.2));return f;}float rnd(float w){float f = fract(sin(w)*1000.);return f;} - float rShp(vec2 p, int N){float f;float a=atan(p.x,p.y)+.2;float b=6.28319/float(N);f=smoothstep(.5,.51, cos(floor(.5+a/b)*b-a)*length(p.xy)* 2.0 -ghostScale);return f;} - vec3 drC(vec2 p, float zsi, float dCy, vec3 clr, vec3 clr2, float ams2, vec2 esom){float l = length(p + esom*(ams2*2.))+zsi/2.;float l2 = length(p + esom*(ams2*4.))+zsi/3.;float c = max(0.01-pow(length(p + esom*ams2), zsi*ghostScale), 0.0)*10.;float c1 = max(0.001-pow(l-0.3, 1./40.)+sin(l*20.), 0.0)*3.;float c2 = max(0.09/pow(length(p-esom*ams2/.5)*1., .95), 0.0)/20.;float s = max(0.02-pow(rShp(p*5. + esom*ams2*5. + dCy, 6) , 1.), 0.0)*1.5;clr = cos(vec3(0.44, .24, .2)*8. + ams2*4.)*0.5+.5;vec3 f = c*clr;f += c1*clr;f += c2*clr;f += s*clr;return f-0.01;} - vec4 geLC(float x){return vec4(vec3(mix(mix(mix(mix(mix(mix(mix(mix(mix(mix(mix(mix(mix(mix(mix(vec3(0., 0., 0.),vec3(0., 0., 0.), smoothstep(0.0, 0.063, x)),vec3(0., 0., 0.), smoothstep(0.063, 0.125, x)),vec3(0.0, 0., 0.), smoothstep(0.125, 0.188, x)),vec3(0.188, 0.131, 0.116), smoothstep(0.188, 0.227, x)),vec3(0.31, 0.204, 0.537), smoothstep(0.227, 0.251, x)),vec3(0.192, 0.106, 0.286), smoothstep(0.251, 0.314, x)),vec3(0.102, 0.008, 0.341), smoothstep(0.314, 0.392, x)),vec3(0.086, 0.0, 0.141), smoothstep(0.392, 0.502, x)),vec3(1.0, 0.31, 0.0), smoothstep(0.502, 0.604, x)),vec3(.1, 0.1, 0.1), smoothstep(0.604, 0.643, x)),vec3(1.0, 0.929, 0.0), smoothstep(0.643, 0.761, x)),vec3(1.0, 0.086, 0.424), smoothstep(0.761, 0.847, x)),vec3(1.0, 0.49, 0.0), smoothstep(0.847, 0.89, x)),vec3(0.945, 0.275, 0.475), smoothstep(0.89, 0.941, x)),vec3(0.251, 0.275, 0.796), smoothstep(0.941, 1.0, x))),1.0);} - float diTN(vec2 p){vec2 f = fract(p);f = (f * f) * (3.0 - (2.0 * f));float n = dot(floor(p), vec2(1.0, 157.0));vec4 a = fract(sin(vec4(n + 0.0, n + 1.0, n + 157.0, n + 158.0)) * 43758.5453123);return mix(mix(a.x, a.y, f.x), mix(a.z, a.w, f.x), f.y);} - float fbm(vec2 p){const mat2 m = mat2(0.80, -0.60, 0.60, 0.80);float f = 0.0;f += 0.5000*diTN(p); p = m*p*2.02;f += 0.2500*diTN(p); p = m*p*2.03;f += 0.1250*diTN(p); p = m*p*2.01;f += 0.0625*diTN(p);return f/0.9375;} - vec4 geLS(vec2 p){vec2 pp = (p - vec2(0.5)) * 2.0;float a = atan(pp.y, pp.x);vec4 cp = vec4(sin(a * 1.0), length(pp), sin(a * 13.0), sin(a * 53.0));float d = sin(clamp(pow(length(vec2(0.5) - p) * 0.5 + haloScale /2., 5.0), 0.0, 1.0) * 3.14159);vec3 c = vec3(d) * vec3(fbm(cp.xy * 16.0) * fbm(cp.zw * 9.0) * max(max(max(max(0.5, sin(a * 1.0)), sin(a * 3.0) * 0.8), sin(a * 7.0) * 0.8), sin(a * 9.0) * 10.6));c *= vec3(mix(2.0, (sin(length(pp.xy) * 256.0) * 0.5) + 0.5, sin((clamp((length(pp.xy) - 0.875) / 0.1, 0.0, 1.0) + 0.0) * 2.0 * 3.14159) * 1.5) + 0.5) * 0.3275;return vec4(vec3(c * 1.0), d);} - vec4 geLD(vec2 p){p.xy += vec2(fbm(p.yx * 3.0), fbm(p.yx * 2.0)) * 0.0825;vec3 o = vec3(mix(0.125, 0.25, max(max(smoothstep(0.1, 0.0, length(p - vec2(0.25))),smoothstep(0.4, 0.0, length(p - vec2(0.75)))),smoothstep(0.8, 0.0, length(p - vec2(0.875, 0.125))))));o += vec3(max(fbm(p * 1.0) - 0.5, 0.0)) * 0.5;o += vec3(max(fbm(p * 2.0) - 0.5, 0.0)) * 0.5;o += vec3(max(fbm(p * 4.0) - 0.5, 0.0)) * 0.25;o += vec3(max(fbm(p * 8.0) - 0.75, 0.0)) * 1.0;o += vec3(max(fbm(p * 16.0) - 0.75, 0.0)) * 0.75;o += vec3(max(fbm(p * 64.0) - 0.75, 0.0)) * 0.5;return vec4(clamp(o, vec3(0.15), vec3(1.0)), 1.0);} - vec4 txL(sampler2D tex, vec2 xtC){if(((xtC.x < 0.) || (xtC.y < 0.)) || ((xtC.x > 1.) || (xtC.y > 1.))){return vec4(0.0);}else{return texture(tex, xtC); }} - vec4 txD(sampler2D tex, vec2 xtC, vec2 dir, vec3 ditn) {return vec4(txL(tex, (xtC + (dir * ditn.r))).r,txL(tex, (xtC + (dir * ditn.g))).g,txL(tex, (xtC + (dir * ditn.b))).b,1.0);} - vec4 strB(){vec2 aspXtc = vec2(1.0) - (((vxtC - vec2(0.5)) * vec2(1.0)) + vec2(0.5)); vec2 xtC = vec2(1.0) - vxtC; vec2 ghvc = (vec2(0.5) - xtC) * 0.3 - lensPosition; vec2 ghNm = normalize(ghvc * vec2(1.0)) * vec2(1.0);vec2 haloVec = normalize(ghvc) * 0.6;vec2 hlNm = ghNm * 0.6;vec2 texelSize = vec2(1.0) / vec2(iResolution.xy);vec3 ditn = vec3(-(texelSize.x * 1.5), 0.2, texelSize.x * 1.5);vec4 c = vec4(0.0);for (int i = 0; i < 8; i++) {vec2 offset = xtC + (ghvc * float(i));c += txD(lensDirtTexture, offset, ghNm, ditn) * pow(max(0.0, 1.0 - (length(vec2(0.5) - offset) / length(vec2(0.5)))), 10.0);}vec2 uyTrz = xtC + hlNm; return (c * geLC((length(vec2(0.5) - aspXtc) / length(vec2(haloScale))))) +(txD(lensDirtTexture, uyTrz, ghNm, ditn) * pow(max(0.0, 1.0 - (length(vec2(0.5) - uyTrz) / length(vec2(0.5)))), 10.0));} - void mainImage(vec4 v,vec2 r,out vec4 i){vec2 g=r-.5;g.y*=iResolution.y/iResolution.x;vec2 l=lensPosition*.5;l.y*=iResolution.y/iResolution.x;vec3 f=mLs(g,l)*20.*colorGain/256.;if(aditionalStreaks){vec3 o=vec3(.9,.2,.1),p=vec3(.3,.1,.9);for(float n=0.;n<10.;n++)f+=drC(g,pow(rnd(n*2e3)*2.8,.1)+1.41,0.,o+n,p+n,rnd(n*20.)*3.+.2-.5,lensPosition);}if(secondaryGhosts){vec3 n=vec3(0);n+=rHx(g,-lensPosition*.25,ghostScale*1.4,vec3(.25,.35,0));n+=rHx(g,lensPosition*.25,ghostScale*.5,vec3(1,.5,.5));n+=rHx(g,lensPosition*.1,ghostScale*1.6,vec3(1));n+=rHx(g,lensPosition*1.8,ghostScale*2.,vec3(0,.5,.75));n+=rHx(g,lensPosition*1.25,ghostScale*.8,vec3(1,1,.5));n+=rHx(g,-lensPosition*1.25,ghostScale*5.,vec3(.5,.5,.25));n+=fpow(1.-abs(distance(lensPosition*.8,g)-.7),.985)*colorGain/2100.;f+=n;}if(starBurst){vxtC=g+.5;vec4 n=geLD(g);float o=1.-clamp(0.5,0.,.5)*2.;n+=mix(n,pow(n*2.,vec4(2))*.5,o);float s=(g.x+g.y)*(1./6.);vec2 d=mat2(cos(s),-sin(s),sin(s),cos(s))*vxtC;n+=geLS(d)*2.;f+=clamp(n.xyz*strB().xyz,.01,1.);}i=enabled?vec4(mix(f,vec3(0),opacity)+v.xyz,v.w):vec4(v);} -`};class LensFlareEffect extends Effect$1{constructor({blendFunction:et=BlendFunction.NORMAL,enabled:nt=!0,glareSize:rt=.2,lensPosition:it=[.01,.01],iResolution:ot=[0,0],starPoints:at=6,flareSize:st=.01,flareSpeed:lt=.01,flareShape:ct=.01,animated:ut=!0,anamorphic:ht=!1,colorGain:dt=new Color$1(20,20,20),lensDirtTexture:pt=null,haloScale:mt=.5,secondaryGhosts:gt=!0,aditionalStreaks:yt=!0,ghostScale:bt=0,opacity:vt=1,starBurst:xt=!1}={}){super("LensFlareEffect",LensFlareShader.fragmentShader,{blendFunction:et,uniforms:new Map([["enabled",new Uniform(nt)],["glareSize",new Uniform(rt)],["lensPosition",new Uniform(it)],["iTime",new Uniform(0)],["iResolution",new Uniform(ot)],["starPoints",new Uniform(at)],["flareSize",new Uniform(st)],["flareSpeed",new Uniform(lt)],["flareShape",new Uniform(ct)],["animated",new Uniform(ut)],["anamorphic",new Uniform(ht)],["colorGain",new Uniform(dt)],["lensDirtTexture",new Uniform(pt)],["haloScale",new Uniform(mt)],["secondaryGhosts",new Uniform(gt)],["aditionalStreaks",new Uniform(yt)],["ghostScale",new Uniform(bt)],["starBurst",new Uniform(xt)],["opacity",new Uniform(vt)]])})}update(et,nt,rt){const it=this.uniforms.get("iTime");it&&(it.value+=rt)}}reactExports.forwardRef(({position:tt=new Vector3(-25,6,-60),followMouse:et=!1,smoothTime:nt=.07,...rt},it)=>{const ot=useThree(({viewport:pt})=>pt),at=useThree(({raycaster:pt})=>pt),st=useThree(({pointer:pt})=>pt),{scene:lt,camera:ct}=reactExports.useContext(EffectComposerContext),[ut]=reactExports.useState(()=>new Vector3),[ht]=reactExports.useState(()=>new Vector2),dt=reactExports.useMemo(()=>new LensFlareEffect(rt),[rt]);return useFrame((pt,mt)=>{var gt,yt,bt;const vt=dt.uniforms.get("lensPosition"),xt=dt.uniforms.get("opacity");if(!vt||!xt)return;let kt=1;if(et)vt.value.x=st.x,vt.value.y=st.y,kt=0;else{if(ut.copy(tt).project(ct),ut.z>1)return;vt.value.x=ut.x,vt.value.y=ut.y,ht.set(ut.x,ut.y),at.setFromCamera(ht,ct);const St=at.intersectObjects(lt.children,!0),{object:Tt}=St[0];Tt&&(((gt=Tt.userData)==null?void 0:gt.lensflare)==="no-occlusion"?kt=0:Tt instanceof Mesh&&(((bt=(yt=Tt.material.uniforms)==null?void 0:yt._transmission)==null?void 0:bt.value)>.2||Tt.material._transmission&&Tt.material._transmission>.2?kt=.2:Tt.material.transparent&&(kt=Tt.material.opacity)))}easing.damp(xt,"value",kt,nt,mt)}),reactExports.useEffect(()=>{const pt=dt.uniforms.get("iResolution");pt&&(pt.value.x=ot.width,pt.value.y=ot.height)},[dt,ot]),jsxRuntimeExports.jsx("primitive",{ref:it,object:dt,dispose:null})});const Bloom=wrapEffect(BloomEffect,{blendFunction:BlendFunction.ADD});reactExports.forwardRef(function({blendFunction:et=BlendFunction.NORMAL},nt){const rt=reactExports.useMemo(()=>new ColorAverageEffect(et),[et]);return jsxRuntimeExports.jsx("primitive",{ref:nt,object:rt,dispose:null})});reactExports.forwardRef(function({active:et=!0,...nt},rt){const it=useThree(ut=>ut.invalidate),ot=useVector2(nt,"delay"),at=useVector2(nt,"duration"),st=useVector2(nt,"strength"),lt=useVector2(nt,"chromaticAberrationOffset"),ct=reactExports.useMemo(()=>new GlitchEffect({...nt,delay:ot,duration:at,strength:st,chromaticAberrationOffset:lt}),[ot,at,nt,st,lt]);return reactExports.useLayoutEffect(()=>{ct.mode=et?nt.mode||GlitchMode.SPORADIC:GlitchMode.DISABLED,it()},[et,ct,it,nt.mode]),reactExports.useEffect(()=>()=>{ct.dispose()},[ct]),jsxRuntimeExports.jsx("primitive",{ref:rt,object:ct,dispose:null})});reactExports.forwardRef(function(et,nt){const{camera:rt}=reactExports.useContext(EffectComposerContext),it=reactExports.useMemo(()=>new GodRaysEffect(rt,resolveRef(et.sun),et),[rt,et]);return reactExports.useLayoutEffect(()=>void(it.lightSource=resolveRef(et.sun)),[it,et.sun]),jsxRuntimeExports.jsx("primitive",{ref:nt,object:it,dispose:null})});reactExports.forwardRef(function({size:et,...nt},rt){const it=useThree(at=>at.invalidate),ot=reactExports.useMemo(()=>new GridEffect(nt),[nt]);return reactExports.useLayoutEffect(()=>{et&&ot.setSize(et.width,et.height),it()},[ot,et]),jsxRuntimeExports.jsx("primitive",{ref:rt,object:ot,dispose:null})});const Outline=reactExports.forwardRef(function({selection:et=[],selectionLayer:nt=10,blendFunction:rt,patternTexture:it,edgeStrength:ot,pulseSpeed:at,visibleEdgeColor:st,hiddenEdgeColor:lt,width:ct,height:ut,kernelSize:ht,blur:dt,xRay:pt,...mt},gt){const yt=useThree(St=>St.invalidate),{scene:bt,camera:vt}=reactExports.useContext(EffectComposerContext),xt=reactExports.useMemo(()=>new OutlineEffect(bt,vt,{blendFunction:rt,patternTexture:it,edgeStrength:ot,pulseSpeed:at,visibleEdgeColor:st,hiddenEdgeColor:lt,width:ct,height:ut,kernelSize:ht,blur:dt,xRay:pt,...mt}),[rt,dt,vt,ot,ut,lt,ht,it,at,bt,st,ct,pt]),kt=reactExports.useContext(selectionContext);return reactExports.useEffect(()=>{if(!kt&&et)return xt.selection.set(Array.isArray(et)?et.map(resolveRef):[resolveRef(et)]),yt(),()=>{xt.selection.clear(),yt()}},[xt,et,kt,yt]),reactExports.useEffect(()=>{xt.selectionLayer=nt,yt()},[xt,yt,nt]),reactExports.useRef(),reactExports.useEffect(()=>{var St;if(kt&&kt.enabled&&(St=kt.selected)!=null&&St.length)return xt.selection.set(kt.selected),yt(),()=>{xt.selection.clear(),yt()}},[kt,xt.selection,yt]),jsxRuntimeExports.jsx("primitive",{ref:gt,object:xt})});reactExports.forwardRef(function({granularity:et=5},nt){const rt=reactExports.useMemo(()=>new PixelationEffect(et),[et]);return jsxRuntimeExports.jsx("primitive",{ref:nt,object:rt,dispose:null})});const addLight=(tt,et)=>tt.layers.enable(et.selection.layer),removeLight=(tt,et)=>tt.layers.disable(et.selection.layer);reactExports.forwardRef(function({selection:et=[],selectionLayer:nt=10,lights:rt=[],luminanceThreshold:it,luminanceSmoothing:ot,intensity:at,width:st,height:lt,kernelSize:ct,mipmapBlur:ut,...ht},dt){rt.length===0&&console.warn("SelectiveBloom requires lights to work.");const pt=useThree(vt=>vt.invalidate),{scene:mt,camera:gt}=reactExports.useContext(EffectComposerContext),yt=reactExports.useMemo(()=>new SelectiveBloomEffect(mt,gt,{blendFunction:BlendFunction.ADD,luminanceThreshold:it,luminanceSmoothing:ot,intensity:at,width:st,height:lt,kernelSize:ct,mipmapBlur:ut,...ht}),[mt,gt,it,ot,at,st,lt,ct,ut,ht]),bt=reactExports.useContext(selectionContext);return reactExports.useEffect(()=>{if(!bt&&et)return yt.selection.set(Array.isArray(et)?et.map(resolveRef):[resolveRef(et)]),pt(),()=>{yt.selection.clear(),pt()}},[yt,et,bt,pt]),reactExports.useEffect(()=>{yt.selection.layer=nt,pt()},[yt,pt,nt]),reactExports.useEffect(()=>{if(rt&&rt.length>0)return rt.forEach(vt=>addLight(resolveRef(vt),yt)),pt(),()=>{rt.forEach(vt=>removeLight(resolveRef(vt),yt)),pt()}},[yt,pt,rt,nt]),reactExports.useEffect(()=>{var vt;if(bt&&bt.enabled&&(vt=bt.selected)!=null&&vt.length)return yt.selection.set(bt.selected),pt(),()=>{yt.selection.clear(),pt()}},[bt,yt.selection,pt]),jsxRuntimeExports.jsx("primitive",{ref:dt,object:yt,dispose:null})});reactExports.forwardRef(function(et,nt){const{camera:rt,normalPass:it,downSamplingPass:ot,resolutionScale:at}=reactExports.useContext(EffectComposerContext),st=reactExports.useMemo(()=>it===null&&ot===null?(console.error("Please enable the NormalPass in the EffectComposer in order to use SSAO."),{}):new SSAOEffect(rt,it&&!ot?it.texture:null,{blendFunction:BlendFunction.MULTIPLY,samples:30,rings:4,distanceThreshold:1,distanceFalloff:0,rangeThreshold:.5,rangeFalloff:.1,luminanceInfluence:.9,radius:20,bias:.5,intensity:1,color:void 0,normalDepthBuffer:ot?ot.texture:null,resolutionScale:at??1,depthAwareUpsampling:!0,...et}),[rt,it,et]);return jsxRuntimeExports.jsx("primitive",{ref:nt,object:st,dispose:null})});reactExports.forwardRef(function({textureSrc:et,texture:nt,...rt},it){const ot=useLoader(TextureLoader,et);reactExports.useLayoutEffect(()=>{ot.encoding=sRGBEncoding,ot.wrapS=ot.wrapT=RepeatWrapping},[ot]);const at=reactExports.useMemo(()=>new TextureEffect({...rt,texture:ot||nt}),[rt,ot,nt]);return jsxRuntimeExports.jsx("primitive",{ref:it,object:at,dispose:null})});const Vignette=wrapEffect(VignetteEffect);reactExports.forwardRef(function({lut:et,tetrahedralInterpolation:nt,...rt},it){const ot=reactExports.useMemo(()=>new LUT3DEffect(et,rt),[et,rt]),at=useThree(st=>st.invalidate);return reactExports.useLayoutEffect(()=>{nt&&(ot.tetrahedralInterpolation=nt),et&&(ot.lut=et),at()},[ot,at,et,nt]),jsxRuntimeExports.jsx("primitive",{ref:it,object:ot,dispose:null})});const fragment=` -uniform sampler2D uCharacters; -uniform float uCharactersCount; -uniform float uCellSize; -uniform bool uInvert; -uniform vec3 uColor; + ) + ot.push(0) + for (rt = ct; --rt >= 0; ) { + for (et = 0, it = lt + rt; it > rt; ) + (st = ot[it] + pt[rt] * dt[it - rt - 1] + et), (ot[it--] = st % BASE | 0), (et = (st / BASE) | 0) + ot[it] = (ot[it] + et) % BASE | 0 + } + for (; !ot[--at]; ) ot.pop() + return et ? ++nt : ot.shift(), (tt.d = ot), (tt.e = nt), external ? round(tt, ht.precision) : tt + } + P.toDecimalPlaces = P.todp = function (tt, et) { + var nt = this, + rt = nt.constructor + return ( + (nt = new rt(nt)), + tt === void 0 + ? nt + : (checkInt32(tt, 0, MAX_DIGITS), + et === void 0 ? (et = rt.rounding) : checkInt32(et, 0, 8), + round(nt, tt + getBase10Exponent(nt) + 1, et)) + ) + } + P.toExponential = function (tt, et) { + var nt, + rt = this, + it = rt.constructor + return ( + tt === void 0 + ? (nt = toString$1(rt, !0)) + : (checkInt32(tt, 0, MAX_DIGITS), + et === void 0 ? (et = it.rounding) : checkInt32(et, 0, 8), + (rt = round(new it(rt), tt + 1, et)), + (nt = toString$1(rt, !0, tt + 1))), + nt + ) + } + P.toFixed = function (tt, et) { + var nt, + rt, + it = this, + ot = it.constructor + return tt === void 0 + ? toString$1(it) + : (checkInt32(tt, 0, MAX_DIGITS), + et === void 0 ? (et = ot.rounding) : checkInt32(et, 0, 8), + (rt = round(new ot(it), tt + getBase10Exponent(it) + 1, et)), + (nt = toString$1(rt.abs(), !1, tt + getBase10Exponent(rt) + 1)), + it.isneg() && !it.isZero() ? '-' + nt : nt) + } + P.toInteger = P.toint = function () { + var tt = this, + et = tt.constructor + return round(new et(tt), getBase10Exponent(tt) + 1, et.rounding) + } + P.toNumber = function () { + return +this + } + P.toPower = P.pow = function (tt) { + var et, + nt, + rt, + it, + ot, + at, + st = this, + lt = st.constructor, + ct = 12, + ut = +(tt = new lt(tt)) + if (!tt.s) return new lt(ONE) + if (((st = new lt(st)), !st.s)) { + if (tt.s < 1) throw Error(decimalError + 'Infinity') + return st + } + if (st.eq(ONE)) return st + if (((rt = lt.precision), tt.eq(ONE))) return round(st, rt) + if (((et = tt.e), (nt = tt.d.length - 1), (at = et >= nt), (ot = st.s), at)) { + if ((nt = ut < 0 ? -ut : ut) <= MAX_SAFE_INTEGER) { + for ( + it = new lt(ONE), et = Math.ceil(rt / LOG_BASE + 4), external = !1; + nt % 2 && ((it = it.times(st)), truncate(it.d, et)), (nt = mathfloor(nt / 2)), nt !== 0; -const vec2 SIZE = vec2(16.); + ) + (st = st.times(st)), truncate(st.d, et) + return (external = !0), tt.s < 0 ? new lt(ONE).div(it) : round(it, rt) + } + } else if (ot < 0) throw Error(decimalError + 'NaN') + return ( + (ot = ot < 0 && tt.d[Math.max(et, nt)] & 1 ? -1 : 1), + (st.s = 1), + (external = !1), + (it = tt.times(ln(st, rt + ct))), + (external = !0), + (it = exp(it)), + (it.s = ot), + it + ) + } + P.toPrecision = function (tt, et) { + var nt, + rt, + it = this, + ot = it.constructor + return ( + tt === void 0 + ? ((nt = getBase10Exponent(it)), (rt = toString$1(it, nt <= ot.toExpNeg || nt >= ot.toExpPos))) + : (checkInt32(tt, 1, MAX_DIGITS), + et === void 0 ? (et = ot.rounding) : checkInt32(et, 0, 8), + (it = round(new ot(it), tt, et)), + (nt = getBase10Exponent(it)), + (rt = toString$1(it, tt <= nt || nt <= ot.toExpNeg, tt))), + rt + ) + } + P.toSignificantDigits = P.tosd = function (tt, et) { + var nt = this, + rt = nt.constructor + return ( + tt === void 0 + ? ((tt = rt.precision), (et = rt.rounding)) + : (checkInt32(tt, 1, MAX_DIGITS), et === void 0 ? (et = rt.rounding) : checkInt32(et, 0, 8)), + round(new rt(nt), tt, et) + ) + } + P.toString = + P.valueOf = + P.val = + P.toJSON = + P[Symbol.for('nodejs.util.inspect.custom')] = + function () { + var tt = this, + et = getBase10Exponent(tt), + nt = tt.constructor + return toString$1(tt, et <= nt.toExpNeg || et >= nt.toExpPos) + } + function add(tt, et) { + var nt, + rt, + it, + ot, + at, + st, + lt, + ct, + ut = tt.constructor, + ht = ut.precision + if (!tt.s || !et.s) return et.s || (et = new ut(tt)), external ? round(et, ht) : et + if (((lt = tt.d), (ct = et.d), (at = tt.e), (it = et.e), (lt = lt.slice()), (ot = at - it), ot)) { + for ( + ot < 0 ? ((rt = lt), (ot = -ot), (st = ct.length)) : ((rt = ct), (it = at), (st = lt.length)), + at = Math.ceil(ht / LOG_BASE), + st = at > st ? at + 1 : st + 1, + ot > st && ((ot = st), (rt.length = 1)), + rt.reverse(); + ot--; -vec3 greyscale(vec3 color, float strength) { - float g = dot(color, vec3(0.299, 0.587, 0.114)); - return mix(color, vec3(g), strength); -} + ) + rt.push(0) + rt.reverse() + } + for (st = lt.length, ot = ct.length, st - ot < 0 && ((ot = st), (rt = ct), (ct = lt), (lt = rt)), nt = 0; ot; ) + (nt = ((lt[--ot] = lt[ot] + ct[ot] + nt) / BASE) | 0), (lt[ot] %= BASE) + for (nt && (lt.unshift(nt), ++it), st = lt.length; lt[--st] == 0; ) lt.pop() + return (et.d = lt), (et.e = it), external ? round(et, ht) : et + } + function checkInt32(tt, et, nt) { + if (tt !== ~~tt || tt < et || tt > nt) throw Error(invalidArgument + tt) + } + function digitsToString(tt) { + var et, + nt, + rt, + it = tt.length - 1, + ot = '', + at = tt[0] + if (it > 0) { + for (ot += at, et = 1; et < it; et++) + (rt = tt[et] + ''), (nt = LOG_BASE - rt.length), nt && (ot += getZeroString(nt)), (ot += rt) + ;(at = tt[et]), (rt = at + ''), (nt = LOG_BASE - rt.length), nt && (ot += getZeroString(nt)) + } else if (at === 0) return '0' + for (; at % 10 === 0; ) at /= 10 + return ot + at + } + var divide = (function () { + function tt(rt, it) { + var ot, + at = 0, + st = rt.length + for (rt = rt.slice(); st--; ) (ot = rt[st] * it + at), (rt[st] = ot % BASE | 0), (at = (ot / BASE) | 0) + return at && rt.unshift(at), rt + } + function et(rt, it, ot, at) { + var st, lt + if (ot != at) lt = ot > at ? 1 : -1 + else + for (st = lt = 0; st < ot; st++) + if (rt[st] != it[st]) { + lt = rt[st] > it[st] ? 1 : -1 + break + } + return lt + } + function nt(rt, it, ot) { + for (var at = 0; ot--; ) (rt[ot] -= at), (at = rt[ot] < it[ot] ? 1 : 0), (rt[ot] = at * BASE + rt[ot] - it[ot]) + for (; !rt[0] && rt.length > 1; ) rt.shift() + } + return function (rt, it, ot, at) { + var st, + lt, + ct, + ut, + ht, + dt, + pt, + mt, + gt, + yt, + bt, + vt, + xt, + kt, + St, + Tt, + At, + Et, + $t = rt.constructor, + Dt = rt.s == it.s ? 1 : -1, + jt = rt.d, + Pt = it.d + if (!rt.s) return new $t(rt) + if (!it.s) throw Error(decimalError + 'Division by zero') + for ( + lt = rt.e - it.e, At = Pt.length, St = jt.length, pt = new $t(Dt), mt = pt.d = [], ct = 0; + Pt[ct] == (jt[ct] || 0); -vec3 greyscale(vec3 color) { - return greyscale(color, 1.0); -} + ) + ++ct + if ( + (Pt[ct] > (jt[ct] || 0) && --lt, + ot == null + ? (vt = ot = $t.precision) + : at + ? (vt = ot + (getBase10Exponent(rt) - getBase10Exponent(it)) + 1) + : (vt = ot), + vt < 0) + ) + return new $t(0) + if (((vt = (vt / LOG_BASE + 2) | 0), (ct = 0), At == 1)) + for (ut = 0, Pt = Pt[0], vt++; (ct < St || ut) && vt--; ct++) + (xt = ut * BASE + (jt[ct] || 0)), (mt[ct] = (xt / Pt) | 0), (ut = xt % Pt | 0) + else { + for ( + ut = (BASE / (Pt[0] + 1)) | 0, + ut > 1 && ((Pt = tt(Pt, ut)), (jt = tt(jt, ut)), (At = Pt.length), (St = jt.length)), + kt = At, + gt = jt.slice(0, At), + yt = gt.length; + yt < At; -void mainImage(const in vec4 inputColor, const in vec2 uv, out vec4 outputColor) { - vec2 cell = resolution / uCellSize; - vec2 grid = 1.0 / cell; - vec2 pixelizedUV = grid * (0.5 + floor(uv / grid)); - vec4 pixelized = texture2D(inputBuffer, pixelizedUV); - float greyscaled = greyscale(pixelized.rgb).r; + ) + gt[yt++] = 0 + ;(Et = Pt.slice()), Et.unshift(0), (Tt = Pt[0]), Pt[1] >= BASE / 2 && ++Tt + do + (ut = 0), + (st = et(Pt, gt, At, yt)), + st < 0 + ? ((bt = gt[0]), + At != yt && (bt = bt * BASE + (gt[1] || 0)), + (ut = (bt / Tt) | 0), + ut > 1 + ? (ut >= BASE && (ut = BASE - 1), + (ht = tt(Pt, ut)), + (dt = ht.length), + (yt = gt.length), + (st = et(ht, gt, dt, yt)), + st == 1 && (ut--, nt(ht, At < dt ? Et : Pt, dt))) + : (ut == 0 && (st = ut = 1), (ht = Pt.slice())), + (dt = ht.length), + dt < yt && ht.unshift(0), + nt(gt, ht, yt), + st == -1 && + ((yt = gt.length), (st = et(Pt, gt, At, yt)), st < 1 && (ut++, nt(gt, At < yt ? Et : Pt, yt))), + (yt = gt.length)) + : st === 0 && (ut++, (gt = [0])), + (mt[ct++] = ut), + st && gt[0] ? (gt[yt++] = jt[kt] || 0) : ((gt = [jt[kt]]), (yt = 1)) + while ((kt++ < St || gt[0] !== void 0) && vt--) + } + return mt[0] || mt.shift(), (pt.e = lt), round(pt, at ? ot + getBase10Exponent(pt) + 1 : ot) + } + })() + function exp(tt, et) { + var nt, + rt, + it, + ot, + at, + st, + lt = 0, + ct = 0, + ut = tt.constructor, + ht = ut.precision + if (getBase10Exponent(tt) > 16) throw Error(exponentOutOfRange + getBase10Exponent(tt)) + if (!tt.s) return new ut(ONE) + for (et == null ? ((external = !1), (st = ht)) : (st = et), at = new ut(0.03125); tt.abs().gte(0.1); ) + (tt = tt.times(at)), (ct += 5) + for ( + rt = ((Math.log(mathpow(2, ct)) / Math.LN10) * 2 + 5) | 0, + st += rt, + nt = it = ot = new ut(ONE), + ut.precision = st; + ; - if (uInvert) { - greyscaled = 1.0 - greyscaled; + ) { + if ( + ((it = round(it.times(tt), st)), + (nt = nt.times(++lt)), + (at = ot.plus(divide(it, nt, st))), + digitsToString(at.d).slice(0, st) === digitsToString(ot.d).slice(0, st)) + ) { + for (; ct--; ) ot = round(ot.times(ot), st) + return (ut.precision = ht), et == null ? ((external = !0), round(ot, ht)) : ot + } + ot = at + } + } + function getBase10Exponent(tt) { + for (var et = tt.e * LOG_BASE, nt = tt.d[0]; nt >= 10; nt /= 10) et++ + return et + } + function getLn10(tt, et, nt) { + if (et > tt.LN10.sd()) + throw ((external = !0), nt && (tt.precision = nt), Error(decimalError + 'LN10 precision limit exceeded')) + return round(new tt(tt.LN10), et) + } + function getZeroString(tt) { + for (var et = ''; tt--; ) et += '0' + return et + } + function ln(tt, et) { + var nt, + rt, + it, + ot, + at, + st, + lt, + ct, + ut, + ht = 1, + dt = 10, + pt = tt, + mt = pt.d, + gt = pt.constructor, + yt = gt.precision + if (pt.s < 1) throw Error(decimalError + (pt.s ? 'NaN' : '-Infinity')) + if (pt.eq(ONE)) return new gt(0) + if ((et == null ? ((external = !1), (ct = yt)) : (ct = et), pt.eq(10))) + return et == null && (external = !0), getLn10(gt, ct) + if ( + ((ct += dt), + (gt.precision = ct), + (nt = digitsToString(mt)), + (rt = nt.charAt(0)), + (ot = getBase10Exponent(pt)), + Math.abs(ot) < 15e14) + ) { + for (; (rt < 7 && rt != 1) || (rt == 1 && nt.charAt(1) > 3); ) + (pt = pt.times(tt)), (nt = digitsToString(pt.d)), (rt = nt.charAt(0)), ht++ + ;(ot = getBase10Exponent(pt)), rt > 1 ? ((pt = new gt('0.' + nt)), ot++) : (pt = new gt(rt + '.' + nt.slice(1))) + } else + return ( + (lt = getLn10(gt, ct + 2, yt).times(ot + '')), + (pt = ln(new gt(rt + '.' + nt.slice(1)), ct - dt).plus(lt)), + (gt.precision = yt), + et == null ? ((external = !0), round(pt, yt)) : pt + ) + for (st = at = pt = divide(pt.minus(ONE), pt.plus(ONE), ct), ut = round(pt.times(pt), ct), it = 3; ; ) { + if ( + ((at = round(at.times(ut), ct)), + (lt = st.plus(divide(at, new gt(it), ct))), + digitsToString(lt.d).slice(0, ct) === digitsToString(st.d).slice(0, ct)) + ) + return ( + (st = st.times(2)), + ot !== 0 && (st = st.plus(getLn10(gt, ct + 2, yt).times(ot + ''))), + (st = divide(st, new gt(ht), ct)), + (gt.precision = yt), + et == null ? ((external = !0), round(st, yt)) : st + ) + ;(st = lt), (it += 2) + } + } + function parseDecimal(tt, et) { + var nt, rt, it + for ( + (nt = et.indexOf('.')) > -1 && (et = et.replace('.', '')), + (rt = et.search(/e/i)) > 0 + ? (nt < 0 && (nt = rt), (nt += +et.slice(rt + 1)), (et = et.substring(0, rt))) + : nt < 0 && (nt = et.length), + rt = 0; + et.charCodeAt(rt) === 48; + + ) + ++rt + for (it = et.length; et.charCodeAt(it - 1) === 48; ) --it + if (((et = et.slice(rt, it)), et)) { + if ( + ((it -= rt), + (nt = nt - rt - 1), + (tt.e = mathfloor(nt / LOG_BASE)), + (tt.d = []), + (rt = (nt + 1) % LOG_BASE), + nt < 0 && (rt += LOG_BASE), + rt < it) + ) { + for (rt && tt.d.push(+et.slice(0, rt)), it -= LOG_BASE; rt < it; ) tt.d.push(+et.slice(rt, (rt += LOG_BASE))) + ;(et = et.slice(rt)), (rt = LOG_BASE - et.length) + } else rt -= it + for (; rt--; ) et += '0' + if ((tt.d.push(+et), external && (tt.e > MAX_E || tt.e < -MAX_E))) throw Error(exponentOutOfRange + nt) + } else (tt.s = 0), (tt.e = 0), (tt.d = [0]) + return tt + } + function round(tt, et, nt) { + var rt, + it, + ot, + at, + st, + lt, + ct, + ut, + ht = tt.d + for (at = 1, ot = ht[0]; ot >= 10; ot /= 10) at++ + if (((rt = et - at), rt < 0)) (rt += LOG_BASE), (it = et), (ct = ht[(ut = 0)]) + else { + if (((ut = Math.ceil((rt + 1) / LOG_BASE)), (ot = ht.length), ut >= ot)) return tt + for (ct = ot = ht[ut], at = 1; ot >= 10; ot /= 10) at++ + ;(rt %= LOG_BASE), (it = rt - LOG_BASE + at) + } + if ( + (nt !== void 0 && + ((ot = mathpow(10, at - it - 1)), + (st = (ct / ot) % 10 | 0), + (lt = et < 0 || ht[ut + 1] !== void 0 || ct % ot), + (lt = + nt < 4 + ? (st || lt) && (nt == 0 || nt == (tt.s < 0 ? 3 : 2)) + : st > 5 || + (st == 5 && + (nt == 4 || + lt || + (nt == 6 && (rt > 0 ? (it > 0 ? ct / mathpow(10, at - it) : 0) : ht[ut - 1]) % 10 & 1) || + nt == (tt.s < 0 ? 8 : 7))))), + et < 1 || !ht[0]) + ) + return ( + lt + ? ((ot = getBase10Exponent(tt)), + (ht.length = 1), + (et = et - ot - 1), + (ht[0] = mathpow(10, (LOG_BASE - (et % LOG_BASE)) % LOG_BASE)), + (tt.e = mathfloor(-et / LOG_BASE) || 0)) + : ((ht.length = 1), (ht[0] = tt.e = tt.s = 0)), + tt + ) + if ( + (rt == 0 + ? ((ht.length = ut), (ot = 1), ut--) + : ((ht.length = ut + 1), + (ot = mathpow(10, LOG_BASE - rt)), + (ht[ut] = it > 0 ? ((ct / mathpow(10, at - it)) % mathpow(10, it) | 0) * ot : 0)), + lt) + ) + for (;;) + if (ut == 0) { + ;(ht[0] += ot) == BASE && ((ht[0] = 1), ++tt.e) + break + } else { + if (((ht[ut] += ot), ht[ut] != BASE)) break + ;(ht[ut--] = 0), (ot = 1) + } + for (rt = ht.length; ht[--rt] === 0; ) ht.pop() + if (external && (tt.e > MAX_E || tt.e < -MAX_E)) throw Error(exponentOutOfRange + getBase10Exponent(tt)) + return tt + } + function subtract(tt, et) { + var nt, + rt, + it, + ot, + at, + st, + lt, + ct, + ut, + ht, + dt = tt.constructor, + pt = dt.precision + if (!tt.s || !et.s) return et.s ? (et.s = -et.s) : (et = new dt(tt)), external ? round(et, pt) : et + if (((lt = tt.d), (ht = et.d), (rt = et.e), (ct = tt.e), (lt = lt.slice()), (at = ct - rt), at)) { + for ( + ut = at < 0, + ut ? ((nt = lt), (at = -at), (st = ht.length)) : ((nt = ht), (rt = ct), (st = lt.length)), + it = Math.max(Math.ceil(pt / LOG_BASE), st) + 2, + at > it && ((at = it), (nt.length = 1)), + nt.reverse(), + it = at; + it--; + + ) + nt.push(0) + nt.reverse() + } else { + for (it = lt.length, st = ht.length, ut = it < st, ut && (st = it), it = 0; it < st; it++) + if (lt[it] != ht[it]) { + ut = lt[it] < ht[it] + break + } + at = 0 + } + for (ut && ((nt = lt), (lt = ht), (ht = nt), (et.s = -et.s)), st = lt.length, it = ht.length - st; it > 0; --it) + lt[st++] = 0 + for (it = ht.length; it > at; ) { + if (lt[--it] < ht[it]) { + for (ot = it; ot && lt[--ot] === 0; ) lt[ot] = BASE - 1 + --lt[ot], (lt[it] += BASE) + } + lt[it] -= ht[it] + } + for (; lt[--st] === 0; ) lt.pop() + for (; lt[0] === 0; lt.shift()) --rt + return lt[0] ? ((et.d = lt), (et.e = rt), external ? round(et, pt) : et) : new dt(0) + } + function toString$1(tt, et, nt) { + var rt, + it = getBase10Exponent(tt), + ot = digitsToString(tt.d), + at = ot.length + return ( + et + ? (nt && (rt = nt - at) > 0 + ? (ot = ot.charAt(0) + '.' + ot.slice(1) + getZeroString(rt)) + : at > 1 && (ot = ot.charAt(0) + '.' + ot.slice(1)), + (ot = ot + (it < 0 ? 'e' : 'e+') + it)) + : it < 0 + ? ((ot = '0.' + getZeroString(-it - 1) + ot), nt && (rt = nt - at) > 0 && (ot += getZeroString(rt))) + : it >= at + ? ((ot += getZeroString(it + 1 - at)), nt && (rt = nt - it - 1) > 0 && (ot = ot + '.' + getZeroString(rt))) + : ((rt = it + 1) < at && (ot = ot.slice(0, rt) + '.' + ot.slice(rt)), + nt && (rt = nt - at) > 0 && (it + 1 === at && (ot += '.'), (ot += getZeroString(rt)))), + tt.s < 0 ? '-' + ot : ot + ) + } + function truncate(tt, et) { + if (tt.length > et) return (tt.length = et), !0 + } + function clone(tt) { + var et, nt, rt + function it(ot) { + var at = this + if (!(at instanceof it)) return new it(ot) + if (((at.constructor = it), ot instanceof it)) { + ;(at.s = ot.s), (at.e = ot.e), (at.d = (ot = ot.d) ? ot.slice() : ot) + return + } + if (typeof ot == 'number') { + if (ot * 0 !== 0) throw Error(invalidArgument + ot) + if (ot > 0) at.s = 1 + else if (ot < 0) (ot = -ot), (at.s = -1) + else { + ;(at.s = 0), (at.e = 0), (at.d = [0]) + return + } + if (ot === ~~ot && ot < 1e7) { + ;(at.e = 0), (at.d = [ot]) + return + } + return parseDecimal(at, ot.toString()) + } else if (typeof ot != 'string') throw Error(invalidArgument + ot) + if ((ot.charCodeAt(0) === 45 ? ((ot = ot.slice(1)), (at.s = -1)) : (at.s = 1), isDecimal.test(ot))) + parseDecimal(at, ot) + else throw Error(invalidArgument + ot) + } + if ( + ((it.prototype = P), + (it.ROUND_UP = 0), + (it.ROUND_DOWN = 1), + (it.ROUND_CEIL = 2), + (it.ROUND_FLOOR = 3), + (it.ROUND_HALF_UP = 4), + (it.ROUND_HALF_DOWN = 5), + (it.ROUND_HALF_EVEN = 6), + (it.ROUND_HALF_CEIL = 7), + (it.ROUND_HALF_FLOOR = 8), + (it.clone = clone), + (it.config = it.set = config), + tt === void 0 && (tt = {}), + tt) + ) + for (rt = ['precision', 'rounding', 'toExpNeg', 'toExpPos', 'LN10'], et = 0; et < rt.length; ) + tt.hasOwnProperty((nt = rt[et++])) || (tt[nt] = this[nt]) + return it.config(tt), it + } + function config(tt) { + if (!tt || typeof tt != 'object') throw Error(decimalError + 'Object expected') + var et, + nt, + rt, + it = ['precision', 1, MAX_DIGITS, 'rounding', 0, 8, 'toExpNeg', -1 / 0, 0, 'toExpPos', 0, 1 / 0] + for (et = 0; et < it.length; et += 3) + if ((rt = tt[(nt = it[et])]) !== void 0) + if (mathfloor(rt) === rt && rt >= it[et + 1] && rt <= it[et + 2]) this[nt] = rt + else throw Error(invalidArgument + nt + ': ' + rt) + if ((rt = tt[(nt = 'LN10')]) !== void 0) + if (rt == Math.LN10) this[nt] = new this(rt) + else throw Error(invalidArgument + nt + ': ' + rt) + return this + } + var Decimal = clone(defaults) + ONE = new Decimal(1) + const Decimal$1 = Decimal + function _toConsumableArray$8(tt) { + return ( + _arrayWithoutHoles$8(tt) || _iterableToArray$8(tt) || _unsupportedIterableToArray$e(tt) || _nonIterableSpread$8() + ) + } + function _nonIterableSpread$8() { + throw new TypeError(`Invalid attempt to spread non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`) + } + function _unsupportedIterableToArray$e(tt, et) { + if (tt) { + if (typeof tt == 'string') return _arrayLikeToArray$e(tt, et) + var nt = Object.prototype.toString.call(tt).slice(8, -1) + if ((nt === 'Object' && tt.constructor && (nt = tt.constructor.name), nt === 'Map' || nt === 'Set')) + return Array.from(tt) + if (nt === 'Arguments' || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(nt)) return _arrayLikeToArray$e(tt, et) + } + } + function _iterableToArray$8(tt) { + if (typeof Symbol < 'u' && Symbol.iterator in Object(tt)) return Array.from(tt) + } + function _arrayWithoutHoles$8(tt) { + if (Array.isArray(tt)) return _arrayLikeToArray$e(tt) + } + function _arrayLikeToArray$e(tt, et) { + ;(et == null || et > tt.length) && (et = tt.length) + for (var nt = 0, rt = new Array(et); nt < et; nt++) rt[nt] = tt[nt] + return rt + } + var identity$1 = function (et) { + return et + }, + PLACE_HOLDER = { '@@functional/placeholder': !0 }, + isPlaceHolder = function (et) { + return et === PLACE_HOLDER + }, + curry0 = function (et) { + return function nt() { + return arguments.length === 0 || + (arguments.length === 1 && isPlaceHolder(arguments.length <= 0 ? void 0 : arguments[0])) + ? nt + : et.apply(void 0, arguments) + } + }, + curryN = function tt(et, nt) { + return et === 1 + ? nt + : curry0(function () { + for (var rt = arguments.length, it = new Array(rt), ot = 0; ot < rt; ot++) it[ot] = arguments[ot] + var at = it.filter(function (st) { + return st !== PLACE_HOLDER + }).length + return at >= et + ? nt.apply(void 0, it) + : tt( + et - at, + curry0(function () { + for (var st = arguments.length, lt = new Array(st), ct = 0; ct < st; ct++) lt[ct] = arguments[ct] + var ut = it.map(function (ht) { + return isPlaceHolder(ht) ? lt.shift() : ht + }) + return nt.apply(void 0, _toConsumableArray$8(ut).concat(lt)) + }), + ) + }) + }, + curry = function (et) { + return curryN(et.length, et) + }, + range$1 = function (et, nt) { + for (var rt = [], it = et; it < nt; ++it) rt[it - et] = it + return rt + }, + map$1 = curry(function (tt, et) { + return Array.isArray(et) + ? et.map(tt) + : Object.keys(et) + .map(function (nt) { + return et[nt] + }) + .map(tt) + }), + compose = function () { + for (var et = arguments.length, nt = new Array(et), rt = 0; rt < et; rt++) nt[rt] = arguments[rt] + if (!nt.length) return identity$1 + var it = nt.reverse(), + ot = it[0], + at = it.slice(1) + return function () { + return at.reduce(function (st, lt) { + return lt(st) + }, ot.apply(void 0, arguments)) + } + }, + reverse = function (et) { + return Array.isArray(et) ? et.reverse() : et.split('').reverse.join('') + }, + memoize = function (et) { + var nt = null, + rt = null + return function () { + for (var it = arguments.length, ot = new Array(it), at = 0; at < it; at++) ot[at] = arguments[at] + return ( + (nt && + ot.every(function (st, lt) { + return st === nt[lt] + })) || + ((nt = ot), (rt = et.apply(void 0, ot))), + rt + ) + } + } + function getDigitCount(tt) { + var et + return tt === 0 ? (et = 1) : (et = Math.floor(new Decimal$1(tt).abs().log(10).toNumber()) + 1), et + } + function rangeStep(tt, et, nt) { + for (var rt = new Decimal$1(tt), it = 0, ot = []; rt.lt(et) && it < 1e5; ) + ot.push(rt.toNumber()), (rt = rt.add(nt)), it++ + return ot + } + var interpolateNumber = curry(function (tt, et, nt) { + var rt = +tt, + it = +et + return rt + nt * (it - rt) + }), + uninterpolateNumber = curry(function (tt, et, nt) { + var rt = et - +tt + return (rt = rt || 1 / 0), (nt - tt) / rt + }), + uninterpolateTruncation = curry(function (tt, et, nt) { + var rt = et - +tt + return (rt = rt || 1 / 0), Math.max(0, Math.min(1, (nt - tt) / rt)) + }) + const Arithmetic = { rangeStep, getDigitCount, interpolateNumber, uninterpolateNumber, uninterpolateTruncation } + function _toConsumableArray$7(tt) { + return ( + _arrayWithoutHoles$7(tt) || _iterableToArray$7(tt) || _unsupportedIterableToArray$d(tt) || _nonIterableSpread$7() + ) + } + function _nonIterableSpread$7() { + throw new TypeError(`Invalid attempt to spread non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`) + } + function _iterableToArray$7(tt) { + if (typeof Symbol < 'u' && Symbol.iterator in Object(tt)) return Array.from(tt) + } + function _arrayWithoutHoles$7(tt) { + if (Array.isArray(tt)) return _arrayLikeToArray$d(tt) + } + function _slicedToArray$6(tt, et) { + return ( + _arrayWithHoles$6(tt) || + _iterableToArrayLimit$6(tt, et) || + _unsupportedIterableToArray$d(tt, et) || + _nonIterableRest$6() + ) + } + function _nonIterableRest$6() { + throw new TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`) + } + function _unsupportedIterableToArray$d(tt, et) { + if (tt) { + if (typeof tt == 'string') return _arrayLikeToArray$d(tt, et) + var nt = Object.prototype.toString.call(tt).slice(8, -1) + if ((nt === 'Object' && tt.constructor && (nt = tt.constructor.name), nt === 'Map' || nt === 'Set')) + return Array.from(tt) + if (nt === 'Arguments' || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(nt)) return _arrayLikeToArray$d(tt, et) + } + } + function _arrayLikeToArray$d(tt, et) { + ;(et == null || et > tt.length) && (et = tt.length) + for (var nt = 0, rt = new Array(et); nt < et; nt++) rt[nt] = tt[nt] + return rt + } + function _iterableToArrayLimit$6(tt, et) { + if (!(typeof Symbol > 'u' || !(Symbol.iterator in Object(tt)))) { + var nt = [], + rt = !0, + it = !1, + ot = void 0 + try { + for ( + var at = tt[Symbol.iterator](), st; + !(rt = (st = at.next()).done) && (nt.push(st.value), !(et && nt.length === et)); + rt = !0 + ); + } catch (lt) { + ;(it = !0), (ot = lt) + } finally { + try { + !rt && at.return != null && at.return() + } finally { + if (it) throw ot + } + } + return nt + } + } + function _arrayWithHoles$6(tt) { + if (Array.isArray(tt)) return tt + } + function getValidInterval(tt) { + var et = _slicedToArray$6(tt, 2), + nt = et[0], + rt = et[1], + it = nt, + ot = rt + return nt > rt && ((it = rt), (ot = nt)), [it, ot] + } + function getFormatStep(tt, et, nt) { + if (tt.lte(0)) return new Decimal$1(0) + var rt = Arithmetic.getDigitCount(tt.toNumber()), + it = new Decimal$1(10).pow(rt), + ot = tt.div(it), + at = rt !== 1 ? 0.05 : 0.1, + st = new Decimal$1(Math.ceil(ot.div(at).toNumber())).add(nt).mul(at), + lt = st.mul(it) + return et ? lt : new Decimal$1(Math.ceil(lt)) + } + function getTickOfSingleValue(tt, et, nt) { + var rt = 1, + it = new Decimal$1(tt) + if (!it.isint() && nt) { + var ot = Math.abs(tt) + ot < 1 + ? ((rt = new Decimal$1(10).pow(Arithmetic.getDigitCount(tt) - 1)), + (it = new Decimal$1(Math.floor(it.div(rt).toNumber())).mul(rt))) + : ot > 1 && (it = new Decimal$1(Math.floor(tt))) + } else tt === 0 ? (it = new Decimal$1(Math.floor((et - 1) / 2))) : nt || (it = new Decimal$1(Math.floor(tt))) + var at = Math.floor((et - 1) / 2), + st = compose( + map$1(function (lt) { + return it.add(new Decimal$1(lt - at).mul(rt)).toNumber() + }), + range$1, + ) + return st(0, et) + } + function calculateStep(tt, et, nt, rt) { + var it = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : 0 + if (!Number.isFinite((et - tt) / (nt - 1))) + return { step: new Decimal$1(0), tickMin: new Decimal$1(0), tickMax: new Decimal$1(0) } + var ot = getFormatStep(new Decimal$1(et).sub(tt).div(nt - 1), rt, it), + at + tt <= 0 && et >= 0 + ? (at = new Decimal$1(0)) + : ((at = new Decimal$1(tt).add(et).div(2)), (at = at.sub(new Decimal$1(at).mod(ot)))) + var st = Math.ceil(at.sub(tt).div(ot).toNumber()), + lt = Math.ceil(new Decimal$1(et).sub(at).div(ot).toNumber()), + ct = st + lt + 1 + return ct > nt + ? calculateStep(tt, et, nt, rt, it + 1) + : (ct < nt && ((lt = et > 0 ? lt + (nt - ct) : lt), (st = et > 0 ? st : st + (nt - ct))), + { step: ot, tickMin: at.sub(new Decimal$1(st).mul(ot)), tickMax: at.add(new Decimal$1(lt).mul(ot)) }) + } + function getNiceTickValuesFn(tt) { + var et = _slicedToArray$6(tt, 2), + nt = et[0], + rt = et[1], + it = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 6, + ot = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !0, + at = Math.max(it, 2), + st = getValidInterval([nt, rt]), + lt = _slicedToArray$6(st, 2), + ct = lt[0], + ut = lt[1] + if (ct === -1 / 0 || ut === 1 / 0) { + var ht = + ut === 1 / 0 + ? [ct].concat( + _toConsumableArray$7( + range$1(0, it - 1).map(function () { + return 1 / 0 + }), + ), + ) + : [].concat( + _toConsumableArray$7( + range$1(0, it - 1).map(function () { + return -1 / 0 + }), + ), + [ut], + ) + return nt > rt ? reverse(ht) : ht + } + if (ct === ut) return getTickOfSingleValue(ct, it, ot) + var dt = calculateStep(ct, ut, at, ot), + pt = dt.step, + mt = dt.tickMin, + gt = dt.tickMax, + yt = Arithmetic.rangeStep(mt, gt.add(new Decimal$1(0.1).mul(pt)), pt) + return nt > rt ? reverse(yt) : yt + } + function getTickValuesFixedDomainFn(tt, et) { + var nt = _slicedToArray$6(tt, 2), + rt = nt[0], + it = nt[1], + ot = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !0, + at = getValidInterval([rt, it]), + st = _slicedToArray$6(at, 2), + lt = st[0], + ct = st[1] + if (lt === -1 / 0 || ct === 1 / 0) return [rt, it] + if (lt === ct) return [lt] + var ut = Math.max(et, 2), + ht = getFormatStep(new Decimal$1(ct).sub(lt).div(ut - 1), ot, 0), + dt = [].concat( + _toConsumableArray$7( + Arithmetic.rangeStep(new Decimal$1(lt), new Decimal$1(ct).sub(new Decimal$1(0.99).mul(ht)), ht), + ), + [ct], + ) + return rt > it ? reverse(dt) : dt + } + var getNiceTickValues = memoize(getNiceTickValuesFn), + getTickValuesFixedDomain = memoize(getTickValuesFixedDomainFn), + _excluded$b = ['offset', 'layout', 'width', 'dataKey', 'data', 'dataPointFormatter', 'xAxis', 'yAxis'] + function _extends$l() { + return ( + (_extends$l = Object.assign + ? Object.assign.bind() + : function (tt) { + for (var et = 1; et < arguments.length; et++) { + var nt = arguments[et] + for (var rt in nt) Object.prototype.hasOwnProperty.call(nt, rt) && (tt[rt] = nt[rt]) + } + return tt + }), + _extends$l.apply(this, arguments) + ) + } + function _slicedToArray$5(tt, et) { + return ( + _arrayWithHoles$5(tt) || + _iterableToArrayLimit$5(tt, et) || + _unsupportedIterableToArray$c(tt, et) || + _nonIterableRest$5() + ) + } + function _nonIterableRest$5() { + throw new TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`) + } + function _unsupportedIterableToArray$c(tt, et) { + if (tt) { + if (typeof tt == 'string') return _arrayLikeToArray$c(tt, et) + var nt = Object.prototype.toString.call(tt).slice(8, -1) + if ((nt === 'Object' && tt.constructor && (nt = tt.constructor.name), nt === 'Map' || nt === 'Set')) + return Array.from(tt) + if (nt === 'Arguments' || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(nt)) return _arrayLikeToArray$c(tt, et) + } + } + function _arrayLikeToArray$c(tt, et) { + ;(et == null || et > tt.length) && (et = tt.length) + for (var nt = 0, rt = new Array(et); nt < et; nt++) rt[nt] = tt[nt] + return rt + } + function _iterableToArrayLimit$5(tt, et) { + var nt = tt == null ? null : (typeof Symbol < 'u' && tt[Symbol.iterator]) || tt['@@iterator'] + if (nt != null) { + var rt, + it, + ot, + at, + st = [], + lt = !0, + ct = !1 + try { + if (((ot = (nt = nt.call(tt)).next), et === 0)) { + if (Object(nt) !== nt) return + lt = !1 + } else for (; !(lt = (rt = ot.call(nt)).done) && (st.push(rt.value), st.length !== et); lt = !0); + } catch (ut) { + ;(ct = !0), (it = ut) + } finally { + try { + if (!lt && nt.return != null && ((at = nt.return()), Object(at) !== at)) return + } finally { + if (ct) throw it + } + } + return st + } + } + function _arrayWithHoles$5(tt) { + if (Array.isArray(tt)) return tt + } + function _objectWithoutProperties$b(tt, et) { + if (tt == null) return {} + var nt = _objectWithoutPropertiesLoose$b(tt, et), + rt, + it + if (Object.getOwnPropertySymbols) { + var ot = Object.getOwnPropertySymbols(tt) + for (it = 0; it < ot.length; it++) + (rt = ot[it]), !(et.indexOf(rt) >= 0) && Object.prototype.propertyIsEnumerable.call(tt, rt) && (nt[rt] = tt[rt]) + } + return nt + } + function _objectWithoutPropertiesLoose$b(tt, et) { + if (tt == null) return {} + var nt = {}, + rt = Object.keys(tt), + it, + ot + for (ot = 0; ot < rt.length; ot++) (it = rt[ot]), !(et.indexOf(it) >= 0) && (nt[it] = tt[it]) + return nt + } + function ErrorBar(tt) { + var et = tt.offset, + nt = tt.layout, + rt = tt.width, + it = tt.dataKey, + ot = tt.data, + at = tt.dataPointFormatter, + st = tt.xAxis, + lt = tt.yAxis, + ct = _objectWithoutProperties$b(tt, _excluded$b), + ut = filterProps(ct), + ht = ot.map(function (dt, pt) { + var mt = at(dt, it), + gt = mt.x, + yt = mt.y, + bt = mt.value, + vt = mt.errorVal + if (!vt) return null + var xt = [], + kt, + St + if (Array.isArray(vt)) { + var Tt = _slicedToArray$5(vt, 2) + ;(kt = Tt[0]), (St = Tt[1]) + } else kt = St = vt + if (nt === 'vertical') { + var At = st.scale, + Et = yt + et, + $t = Et + rt, + Dt = Et - rt, + jt = At(bt - kt), + Pt = At(bt + St) + xt.push({ x1: Pt, y1: $t, x2: Pt, y2: Dt }), + xt.push({ x1: jt, y1: Et, x2: Pt, y2: Et }), + xt.push({ x1: jt, y1: $t, x2: jt, y2: Dt }) + } else if (nt === 'horizontal') { + var Ct = lt.scale, + wt = gt + et, + It = wt - rt, + Ot = wt + rt, + Wt = Ct(bt - kt), + zt = Ct(bt + St) + xt.push({ x1: It, y1: zt, x2: Ot, y2: zt }), + xt.push({ x1: wt, y1: Wt, x2: wt, y2: zt }), + xt.push({ x1: It, y1: Wt, x2: Ot, y2: Wt }) + } + return React$1.createElement( + Layer, + _extends$l({ className: 'recharts-errorBar', key: 'bar-'.concat(pt) }, ut), + xt.map(function (Ft, Nt) { + return React$1.createElement('line', _extends$l({}, Ft, { key: 'line-'.concat(Nt) })) + }), + ) + }) + return React$1.createElement(Layer, { className: 'recharts-errorBars' }, ht) + } + ErrorBar.defaultProps = { stroke: 'black', strokeWidth: 1.5, width: 5, offset: 0, layout: 'horizontal' } + ErrorBar.displayName = 'ErrorBar' + function _typeof$q(tt) { + '@babel/helpers - typeof' + return ( + (_typeof$q = + typeof Symbol == 'function' && typeof Symbol.iterator == 'symbol' + ? function (et) { + return typeof et + } + : function (et) { + return et && typeof Symbol == 'function' && et.constructor === Symbol && et !== Symbol.prototype + ? 'symbol' + : typeof et + }), + _typeof$q(tt) + ) + } + function ownKeys$p(tt, et) { + var nt = Object.keys(tt) + if (Object.getOwnPropertySymbols) { + var rt = Object.getOwnPropertySymbols(tt) + et && + (rt = rt.filter(function (it) { + return Object.getOwnPropertyDescriptor(tt, it).enumerable + })), + nt.push.apply(nt, rt) + } + return nt + } + function _objectSpread$p(tt) { + for (var et = 1; et < arguments.length; et++) { + var nt = arguments[et] != null ? arguments[et] : {} + et % 2 + ? ownKeys$p(Object(nt), !0).forEach(function (rt) { + _defineProperty$q(tt, rt, nt[rt]) + }) + : Object.getOwnPropertyDescriptors + ? Object.defineProperties(tt, Object.getOwnPropertyDescriptors(nt)) + : ownKeys$p(Object(nt)).forEach(function (rt) { + Object.defineProperty(tt, rt, Object.getOwnPropertyDescriptor(nt, rt)) + }) + } + return tt + } + function _defineProperty$q(tt, et, nt) { + return ( + (et = _toPropertyKey$p(et)), + et in tt + ? Object.defineProperty(tt, et, { value: nt, enumerable: !0, configurable: !0, writable: !0 }) + : (tt[et] = nt), + tt + ) + } + function _toPropertyKey$p(tt) { + var et = _toPrimitive$p(tt, 'string') + return _typeof$q(et) === 'symbol' ? et : String(et) + } + function _toPrimitive$p(tt, et) { + if (_typeof$q(tt) !== 'object' || tt === null) return tt + var nt = tt[Symbol.toPrimitive] + if (nt !== void 0) { + var rt = nt.call(tt, et || 'default') + if (_typeof$q(rt) !== 'object') return rt + throw new TypeError('@@toPrimitive must return a primitive value.') + } + return (et === 'string' ? String : Number)(tt) + } + var getLegendProps = function (et) { + var nt = et.children, + rt = et.formattedGraphicalItems, + it = et.legendWidth, + ot = et.legendContent, + at = findChildByType(nt, Legend) + if (!at) return null + var st + return ( + at.props && at.props.payload + ? (st = at.props && at.props.payload) + : ot === 'children' + ? (st = (rt || []).reduce(function (lt, ct) { + var ut = ct.item, + ht = ct.props, + dt = ht.sectors || ht.data || [] + return lt.concat( + dt.map(function (pt) { + return { type: at.props.iconType || ut.props.legendType, value: pt.name, color: pt.fill, payload: pt } + }), + ) + }, [])) + : (st = (rt || []).map(function (lt) { + var ct = lt.item, + ut = ct.props, + ht = ut.dataKey, + dt = ut.name, + pt = ut.legendType, + mt = ut.hide + return { + inactive: mt, + dataKey: ht, + type: at.props.iconType || pt || 'square', + color: getMainColorOfGraphicItem(ct), + value: dt || ht, + payload: ct.props, + } + })), + _objectSpread$p( + _objectSpread$p(_objectSpread$p({}, at.props), Legend.getWithHeight(at, it)), + {}, + { payload: st, item: at }, + ) + ) + } + function _typeof$p(tt) { + '@babel/helpers - typeof' + return ( + (_typeof$p = + typeof Symbol == 'function' && typeof Symbol.iterator == 'symbol' + ? function (et) { + return typeof et + } + : function (et) { + return et && typeof Symbol == 'function' && et.constructor === Symbol && et !== Symbol.prototype + ? 'symbol' + : typeof et + }), + _typeof$p(tt) + ) + } + function ownKeys$o(tt, et) { + var nt = Object.keys(tt) + if (Object.getOwnPropertySymbols) { + var rt = Object.getOwnPropertySymbols(tt) + et && + (rt = rt.filter(function (it) { + return Object.getOwnPropertyDescriptor(tt, it).enumerable + })), + nt.push.apply(nt, rt) + } + return nt + } + function _objectSpread$o(tt) { + for (var et = 1; et < arguments.length; et++) { + var nt = arguments[et] != null ? arguments[et] : {} + et % 2 + ? ownKeys$o(Object(nt), !0).forEach(function (rt) { + _defineProperty$p(tt, rt, nt[rt]) + }) + : Object.getOwnPropertyDescriptors + ? Object.defineProperties(tt, Object.getOwnPropertyDescriptors(nt)) + : ownKeys$o(Object(nt)).forEach(function (rt) { + Object.defineProperty(tt, rt, Object.getOwnPropertyDescriptor(nt, rt)) + }) + } + return tt + } + function _defineProperty$p(tt, et, nt) { + return ( + (et = _toPropertyKey$o(et)), + et in tt + ? Object.defineProperty(tt, et, { value: nt, enumerable: !0, configurable: !0, writable: !0 }) + : (tt[et] = nt), + tt + ) + } + function _toPropertyKey$o(tt) { + var et = _toPrimitive$o(tt, 'string') + return _typeof$p(et) === 'symbol' ? et : String(et) + } + function _toPrimitive$o(tt, et) { + if (_typeof$p(tt) !== 'object' || tt === null) return tt + var nt = tt[Symbol.toPrimitive] + if (nt !== void 0) { + var rt = nt.call(tt, et || 'default') + if (_typeof$p(rt) !== 'object') return rt + throw new TypeError('@@toPrimitive must return a primitive value.') + } + return (et === 'string' ? String : Number)(tt) + } + function _toConsumableArray$6(tt) { + return ( + _arrayWithoutHoles$6(tt) || _iterableToArray$6(tt) || _unsupportedIterableToArray$b(tt) || _nonIterableSpread$6() + ) + } + function _nonIterableSpread$6() { + throw new TypeError(`Invalid attempt to spread non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`) + } + function _unsupportedIterableToArray$b(tt, et) { + if (tt) { + if (typeof tt == 'string') return _arrayLikeToArray$b(tt, et) + var nt = Object.prototype.toString.call(tt).slice(8, -1) + if ((nt === 'Object' && tt.constructor && (nt = tt.constructor.name), nt === 'Map' || nt === 'Set')) + return Array.from(tt) + if (nt === 'Arguments' || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(nt)) return _arrayLikeToArray$b(tt, et) + } + } + function _iterableToArray$6(tt) { + if ((typeof Symbol < 'u' && tt[Symbol.iterator] != null) || tt['@@iterator'] != null) return Array.from(tt) + } + function _arrayWithoutHoles$6(tt) { + if (Array.isArray(tt)) return _arrayLikeToArray$b(tt) + } + function _arrayLikeToArray$b(tt, et) { + ;(et == null || et > tt.length) && (et = tt.length) + for (var nt = 0, rt = new Array(et); nt < et; nt++) rt[nt] = tt[nt] + return rt + } + function getValueByDataKey(tt, et, nt) { + return _isNil(tt) || _isNil(et) ? nt : isNumOrStr(et) ? _get(tt, et, nt) : _isFunction$1(et) ? et(tt) : nt + } + function getDomainOfDataByKey(tt, et, nt, rt) { + var it = _flatMap(tt, function (st) { + return getValueByDataKey(st, et) + }) + if (nt === 'number') { + var ot = it.filter(function (st) { + return isNumber(st) || parseFloat(st) + }) + return ot.length ? [_min(ot), _max(ot)] : [1 / 0, -1 / 0] + } + var at = rt + ? it.filter(function (st) { + return !_isNil(st) + }) + : it + return at.map(function (st) { + return isNumOrStr(st) || st instanceof Date ? st : '' + }) + } + var calculateActiveTickIndex = function (et) { + var nt, + rt = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [], + it = arguments.length > 2 ? arguments[2] : void 0, + ot = arguments.length > 3 ? arguments[3] : void 0, + at = -1, + st = (nt = rt == null ? void 0 : rt.length) !== null && nt !== void 0 ? nt : 0 + if (st <= 1) return 0 + if (ot && ot.axisType === 'angleAxis' && Math.abs(Math.abs(ot.range[1] - ot.range[0]) - 360) <= 1e-6) + for (var lt = ot.range, ct = 0; ct < st; ct++) { + var ut = ct > 0 ? it[ct - 1].coordinate : it[st - 1].coordinate, + ht = it[ct].coordinate, + dt = ct >= st - 1 ? it[0].coordinate : it[ct + 1].coordinate, + pt = void 0 + if (mathSign(ht - ut) !== mathSign(dt - ht)) { + var mt = [] + if (mathSign(dt - ht) === mathSign(lt[1] - lt[0])) { + pt = dt + var gt = ht + lt[1] - lt[0] + ;(mt[0] = Math.min(gt, (gt + ut) / 2)), (mt[1] = Math.max(gt, (gt + ut) / 2)) + } else { + pt = ut + var yt = dt + lt[1] - lt[0] + ;(mt[0] = Math.min(ht, (yt + ht) / 2)), (mt[1] = Math.max(ht, (yt + ht) / 2)) + } + var bt = [Math.min(ht, (pt + ht) / 2), Math.max(ht, (pt + ht) / 2)] + if ((et > bt[0] && et <= bt[1]) || (et >= mt[0] && et <= mt[1])) { + at = it[ct].index + break + } + } else { + var vt = Math.min(ut, dt), + xt = Math.max(ut, dt) + if (et > (vt + ht) / 2 && et <= (xt + ht) / 2) { + at = it[ct].index + break + } + } + } + else + for (var kt = 0; kt < st; kt++) + if ( + (kt === 0 && et <= (rt[kt].coordinate + rt[kt + 1].coordinate) / 2) || + (kt > 0 && + kt < st - 1 && + et > (rt[kt].coordinate + rt[kt - 1].coordinate) / 2 && + et <= (rt[kt].coordinate + rt[kt + 1].coordinate) / 2) || + (kt === st - 1 && et > (rt[kt].coordinate + rt[kt - 1].coordinate) / 2) + ) { + at = rt[kt].index + break + } + return at + }, + getMainColorOfGraphicItem = function (et) { + var nt = et, + rt = nt.type.displayName, + it = et.props, + ot = it.stroke, + at = it.fill, + st + switch (rt) { + case 'Line': + st = ot + break + case 'Area': + case 'Radar': + st = ot && ot !== 'none' ? ot : at + break + default: + st = at + break + } + return st + }, + getBarSizeList = function (et) { + var nt = et.barSize, + rt = et.stackGroups, + it = rt === void 0 ? {} : rt + if (!it) return {} + for (var ot = {}, at = Object.keys(it), st = 0, lt = at.length; st < lt; st++) + for (var ct = it[at[st]].stackGroups, ut = Object.keys(ct), ht = 0, dt = ut.length; ht < dt; ht++) { + var pt = ct[ut[ht]], + mt = pt.items, + gt = pt.cateAxisId, + yt = mt.filter(function (xt) { + return getDisplayName(xt.type).indexOf('Bar') >= 0 + }) + if (yt && yt.length) { + var bt = yt[0].props.barSize, + vt = yt[0].props[gt] + ot[vt] || (ot[vt] = []), ot[vt].push({ item: yt[0], stackList: yt.slice(1), barSize: _isNil(bt) ? nt : bt }) + } + } + return ot + }, + getBarPosition = function (et) { + var nt = et.barGap, + rt = et.barCategoryGap, + it = et.bandSize, + ot = et.sizeList, + at = ot === void 0 ? [] : ot, + st = et.maxBarSize, + lt = at.length + if (lt < 1) return null + var ct = getPercentValue(nt, it, 0, !0), + ut, + ht = [] + if (at[0].barSize === +at[0].barSize) { + var dt = !1, + pt = it / lt, + mt = at.reduce(function (kt, St) { + return kt + St.barSize || 0 + }, 0) + ;(mt += (lt - 1) * ct), + mt >= it && ((mt -= (lt - 1) * ct), (ct = 0)), + mt >= it && pt > 0 && ((dt = !0), (pt *= 0.9), (mt = lt * pt)) + var gt = ((it - mt) / 2) >> 0, + yt = { offset: gt - ct, size: 0 } + ut = at.reduce(function (kt, St) { + var Tt = { item: St.item, position: { offset: yt.offset + yt.size + ct, size: dt ? pt : St.barSize } }, + At = [].concat(_toConsumableArray$6(kt), [Tt]) + return ( + (yt = At[At.length - 1].position), + St.stackList && + St.stackList.length && + St.stackList.forEach(function (Et) { + At.push({ item: Et, position: yt }) + }), + At + ) + }, ht) + } else { + var bt = getPercentValue(rt, it, 0, !0) + it - 2 * bt - (lt - 1) * ct <= 0 && (ct = 0) + var vt = (it - 2 * bt - (lt - 1) * ct) / lt + vt > 1 && (vt >>= 0) + var xt = st === +st ? Math.min(vt, st) : vt + ut = at.reduce(function (kt, St, Tt) { + var At = [].concat(_toConsumableArray$6(kt), [ + { item: St.item, position: { offset: bt + (vt + ct) * Tt + (vt - xt) / 2, size: xt } }, + ]) + return ( + St.stackList && + St.stackList.length && + St.stackList.forEach(function (Et) { + At.push({ item: Et, position: At[At.length - 1].position }) + }), + At + ) + }, ht) + } + return ut + }, + appendOffsetOfLegend = function (et, nt, rt, it) { + var ot = rt.children, + at = rt.width, + st = rt.margin, + lt = at - (st.left || 0) - (st.right || 0), + ct = getLegendProps({ children: ot, legendWidth: lt }) + if (ct) { + var ut = it || {}, + ht = ut.width, + dt = ut.height, + pt = ct.align, + mt = ct.verticalAlign, + gt = ct.layout + if ((gt === 'vertical' || (gt === 'horizontal' && mt === 'middle')) && pt !== 'center' && isNumber(et[pt])) + return _objectSpread$o(_objectSpread$o({}, et), {}, _defineProperty$p({}, pt, et[pt] + (ht || 0))) + if ((gt === 'horizontal' || (gt === 'vertical' && pt === 'center')) && mt !== 'middle' && isNumber(et[mt])) + return _objectSpread$o(_objectSpread$o({}, et), {}, _defineProperty$p({}, mt, et[mt] + (dt || 0))) + } + return et + }, + isErrorBarRelevantForAxis = function (et, nt, rt) { + return _isNil(nt) + ? !0 + : et === 'horizontal' + ? nt === 'yAxis' + : et === 'vertical' || rt === 'x' + ? nt === 'xAxis' + : rt === 'y' + ? nt === 'yAxis' + : !0 + }, + getDomainOfErrorBars = function (et, nt, rt, it, ot) { + var at = nt.props.children, + st = findAllByType(at, ErrorBar).filter(function (ct) { + return isErrorBarRelevantForAxis(it, ot, ct.props.direction) + }) + if (st && st.length) { + var lt = st.map(function (ct) { + return ct.props.dataKey + }) + return et.reduce( + function (ct, ut) { + var ht = getValueByDataKey(ut, rt, 0), + dt = _isArray$1(ht) ? [_min(ht), _max(ht)] : [ht, ht], + pt = lt.reduce( + function (mt, gt) { + var yt = getValueByDataKey(ut, gt, 0), + bt = dt[0] - Math.abs(_isArray$1(yt) ? yt[0] : yt), + vt = dt[1] + Math.abs(_isArray$1(yt) ? yt[1] : yt) + return [Math.min(bt, mt[0]), Math.max(vt, mt[1])] + }, + [1 / 0, -1 / 0], + ) + return [Math.min(pt[0], ct[0]), Math.max(pt[1], ct[1])] + }, + [1 / 0, -1 / 0], + ) + } + return null + }, + parseErrorBarsOfAxis = function (et, nt, rt, it, ot) { + var at = nt + .map(function (st) { + return getDomainOfErrorBars(et, st, rt, ot, it) + }) + .filter(function (st) { + return !_isNil(st) + }) + return at && at.length + ? at.reduce( + function (st, lt) { + return [Math.min(st[0], lt[0]), Math.max(st[1], lt[1])] + }, + [1 / 0, -1 / 0], + ) + : null + }, + getDomainOfItemsWithSameAxis = function (et, nt, rt, it, ot) { + var at = nt.map(function (lt) { + var ct = lt.props.dataKey + return (rt === 'number' && ct && getDomainOfErrorBars(et, lt, ct, it)) || getDomainOfDataByKey(et, ct, rt, ot) + }) + if (rt === 'number') + return at.reduce( + function (lt, ct) { + return [Math.min(lt[0], ct[0]), Math.max(lt[1], ct[1])] + }, + [1 / 0, -1 / 0], + ) + var st = {} + return at.reduce(function (lt, ct) { + for (var ut = 0, ht = ct.length; ut < ht; ut++) st[ct[ut]] || ((st[ct[ut]] = !0), lt.push(ct[ut])) + return lt + }, []) + }, + isCategoricalAxis = function (et, nt) { + return ( + (et === 'horizontal' && nt === 'xAxis') || + (et === 'vertical' && nt === 'yAxis') || + (et === 'centric' && nt === 'angleAxis') || + (et === 'radial' && nt === 'radiusAxis') + ) + }, + getCoordinatesOfGrid = function (et, nt, rt, it) { + if (it) + return et.map(function (lt) { + return lt.coordinate + }) + var ot, + at, + st = et.map(function (lt) { + return lt.coordinate === nt && (ot = !0), lt.coordinate === rt && (at = !0), lt.coordinate + }) + return ot || st.push(nt), at || st.push(rt), st + }, + getTicksOfAxis = function (et, nt, rt) { + if (!et) return null + var it = et.scale, + ot = et.duplicateDomain, + at = et.type, + st = et.range, + lt = et.realScaleType === 'scaleBand' ? it.bandwidth() / 2 : 2, + ct = (nt || rt) && at === 'category' && it.bandwidth ? it.bandwidth() / lt : 0 + if ( + ((ct = + et.axisType === 'angleAxis' && (st == null ? void 0 : st.length) >= 2 + ? mathSign(st[0] - st[1]) * 2 * ct + : ct), + nt && (et.ticks || et.niceTicks)) + ) { + var ut = (et.ticks || et.niceTicks).map(function (ht) { + var dt = ot ? ot.indexOf(ht) : ht + return { coordinate: it(dt) + ct, value: ht, offset: ct } + }) + return ut.filter(function (ht) { + return !_isNaN$1(ht.coordinate) + }) + } + return et.isCategorical && et.categoricalDomain + ? et.categoricalDomain.map(function (ht, dt) { + return { coordinate: it(ht) + ct, value: ht, index: dt, offset: ct } + }) + : it.ticks && !rt + ? it.ticks(et.tickCount).map(function (ht) { + return { coordinate: it(ht) + ct, value: ht, offset: ct } + }) + : it.domain().map(function (ht, dt) { + return { coordinate: it(ht) + ct, value: ot ? ot[ht] : ht, index: dt, offset: ct } + }) + }, + combineEventHandlers = function (et, nt, rt) { + var it + return ( + _isFunction$1(rt) ? (it = rt) : _isFunction$1(nt) && (it = nt), + _isFunction$1(et) || it + ? function (ot, at, st, lt) { + _isFunction$1(et) && et(ot, at, st, lt), _isFunction$1(it) && it(ot, at, st, lt) + } + : null + ) + }, + parseScale = function (et, nt, rt) { + var it = et.scale, + ot = et.type, + at = et.layout, + st = et.axisType + if (it === 'auto') + return at === 'radial' && st === 'radiusAxis' + ? { scale: band(), realScaleType: 'band' } + : at === 'radial' && st === 'angleAxis' + ? { scale: linear(), realScaleType: 'linear' } + : ot === 'category' && + nt && + (nt.indexOf('LineChart') >= 0 || nt.indexOf('AreaChart') >= 0 || (nt.indexOf('ComposedChart') >= 0 && !rt)) + ? { scale: point(), realScaleType: 'point' } + : ot === 'category' + ? { scale: band(), realScaleType: 'band' } + : { scale: linear(), realScaleType: 'linear' } + if (_isString(it)) { + var lt = 'scale'.concat(_upperFirst(it)) + return { scale: (d3Scales[lt] || point)(), realScaleType: d3Scales[lt] ? lt : 'point' } + } + return _isFunction$1(it) ? { scale: it } : { scale: point(), realScaleType: 'point' } + }, + EPS = 1e-4, + checkDomainOfScale = function (et) { + var nt = et.domain() + if (!(!nt || nt.length <= 2)) { + var rt = nt.length, + it = et.range(), + ot = Math.min(it[0], it[1]) - EPS, + at = Math.max(it[0], it[1]) + EPS, + st = et(nt[0]), + lt = et(nt[rt - 1]) + ;(st < ot || st > at || lt < ot || lt > at) && et.domain([nt[0], nt[rt - 1]]) + } + }, + findPositionOfBar = function (et, nt) { + if (!et) return null + for (var rt = 0, it = et.length; rt < it; rt++) if (et[rt].item === nt) return et[rt].position + return null + }, + truncateByDomain = function (et, nt) { + if (!nt || nt.length !== 2 || !isNumber(nt[0]) || !isNumber(nt[1])) return et + var rt = Math.min(nt[0], nt[1]), + it = Math.max(nt[0], nt[1]), + ot = [et[0], et[1]] + return ( + (!isNumber(et[0]) || et[0] < rt) && (ot[0] = rt), + (!isNumber(et[1]) || et[1] > it) && (ot[1] = it), + ot[0] > it && (ot[0] = it), + ot[1] < rt && (ot[1] = rt), + ot + ) + }, + offsetSign = function (et) { + var nt = et.length + if (!(nt <= 0)) + for (var rt = 0, it = et[0].length; rt < it; ++rt) + for (var ot = 0, at = 0, st = 0; st < nt; ++st) { + var lt = _isNaN$1(et[st][rt][1]) ? et[st][rt][0] : et[st][rt][1] + lt >= 0 + ? ((et[st][rt][0] = ot), (et[st][rt][1] = ot + lt), (ot = et[st][rt][1])) + : ((et[st][rt][0] = at), (et[st][rt][1] = at + lt), (at = et[st][rt][1])) + } + }, + offsetPositive = function (et) { + var nt = et.length + if (!(nt <= 0)) + for (var rt = 0, it = et[0].length; rt < it; ++rt) + for (var ot = 0, at = 0; at < nt; ++at) { + var st = _isNaN$1(et[at][rt][1]) ? et[at][rt][0] : et[at][rt][1] + st >= 0 + ? ((et[at][rt][0] = ot), (et[at][rt][1] = ot + st), (ot = et[at][rt][1])) + : ((et[at][rt][0] = 0), (et[at][rt][1] = 0)) + } + }, + STACK_OFFSET_MAP = { + sign: offsetSign, + expand: stackOffsetExpand, + none: stackOffsetNone, + silhouette: stackOffsetSilhouette, + wiggle: stackOffsetWiggle, + positive: offsetPositive, + }, + getStackedData = function (et, nt, rt) { + var it = nt.map(function (st) { + return st.props.dataKey + }), + ot = STACK_OFFSET_MAP[rt], + at = shapeStack() + .keys(it) + .value(function (st, lt) { + return +getValueByDataKey(st, lt, 0) + }) + .order(stackOrderNone) + .offset(ot) + return at(et) + }, + getStackGroupsByAxisId = function (et, nt, rt, it, ot, at) { + if (!et) return null + var st = at ? nt.reverse() : nt, + lt = {}, + ct = st.reduce(function (ht, dt) { + var pt = dt.props, + mt = pt.stackId, + gt = pt.hide + if (gt) return ht + var yt = dt.props[rt], + bt = ht[yt] || { hasStack: !1, stackGroups: {} } + if (isNumOrStr(mt)) { + var vt = bt.stackGroups[mt] || { numericAxisId: rt, cateAxisId: it, items: [] } + vt.items.push(dt), (bt.hasStack = !0), (bt.stackGroups[mt] = vt) + } else bt.stackGroups[uniqueId('_stackId_')] = { numericAxisId: rt, cateAxisId: it, items: [dt] } + return _objectSpread$o(_objectSpread$o({}, ht), {}, _defineProperty$p({}, yt, bt)) + }, lt), + ut = {} + return Object.keys(ct).reduce(function (ht, dt) { + var pt = ct[dt] + if (pt.hasStack) { + var mt = {} + pt.stackGroups = Object.keys(pt.stackGroups).reduce(function (gt, yt) { + var bt = pt.stackGroups[yt] + return _objectSpread$o( + _objectSpread$o({}, gt), + {}, + _defineProperty$p({}, yt, { + numericAxisId: rt, + cateAxisId: it, + items: bt.items, + stackedData: getStackedData(et, bt.items, ot), + }), + ) + }, mt) + } + return _objectSpread$o(_objectSpread$o({}, ht), {}, _defineProperty$p({}, dt, pt)) + }, ut) + }, + getTicksOfScale = function (et, nt) { + var rt = nt.realScaleType, + it = nt.type, + ot = nt.tickCount, + at = nt.originalDomain, + st = nt.allowDecimals, + lt = rt || nt.scale + if (lt !== 'auto' && lt !== 'linear') return null + if (ot && it === 'number' && at && (at[0] === 'auto' || at[1] === 'auto')) { + var ct = et.domain() + if (!ct.length) return null + var ut = getNiceTickValues(ct, ot, st) + return et.domain([_min(ut), _max(ut)]), { niceTicks: ut } + } + if (ot && it === 'number') { + var ht = et.domain(), + dt = getTickValuesFixedDomain(ht, ot, st) + return { niceTicks: dt } + } + return null + }, + getCateCoordinateOfLine = function (et) { + var nt = et.axis, + rt = et.ticks, + it = et.bandSize, + ot = et.entry, + at = et.index, + st = et.dataKey + if (nt.type === 'category') { + if (!nt.allowDuplicatedCategory && nt.dataKey && !_isNil(ot[nt.dataKey])) { + var lt = findEntryInArray(rt, 'value', ot[nt.dataKey]) + if (lt) return lt.coordinate + it / 2 + } + return rt[at] ? rt[at].coordinate + it / 2 : null + } + var ct = getValueByDataKey(ot, _isNil(st) ? nt.dataKey : st) + return _isNil(ct) ? null : nt.scale(ct) + }, + getCateCoordinateOfBar = function (et) { + var nt = et.axis, + rt = et.ticks, + it = et.offset, + ot = et.bandSize, + at = et.entry, + st = et.index + if (nt.type === 'category') return rt[st] ? rt[st].coordinate + it : null + var lt = getValueByDataKey(at, nt.dataKey, nt.domain[st]) + return _isNil(lt) ? null : nt.scale(lt) - ot / 2 + it + }, + getBaseValueOfBar = function (et) { + var nt = et.numericAxis, + rt = nt.scale.domain() + if (nt.type === 'number') { + var it = Math.min(rt[0], rt[1]), + ot = Math.max(rt[0], rt[1]) + return it <= 0 && ot >= 0 ? 0 : ot < 0 ? ot : it + } + return rt[0] + }, + getStackedDataOfItem = function (et, nt) { + var rt = et.props.stackId + if (isNumOrStr(rt)) { + var it = nt[rt] + if (it) { + var ot = it.items.indexOf(et) + return ot >= 0 ? it.stackedData[ot] : null + } + } + return null + }, + getDomainOfSingle = function (et) { + return et.reduce( + function (nt, rt) { + return [_min(rt.concat([nt[0]]).filter(isNumber)), _max(rt.concat([nt[1]]).filter(isNumber))] + }, + [1 / 0, -1 / 0], + ) + }, + getDomainOfStackGroups = function (et, nt, rt) { + return Object.keys(et) + .reduce( + function (it, ot) { + var at = et[ot], + st = at.stackedData, + lt = st.reduce( + function (ct, ut) { + var ht = getDomainOfSingle(ut.slice(nt, rt + 1)) + return [Math.min(ct[0], ht[0]), Math.max(ct[1], ht[1])] + }, + [1 / 0, -1 / 0], + ) + return [Math.min(lt[0], it[0]), Math.max(lt[1], it[1])] + }, + [1 / 0, -1 / 0], + ) + .map(function (it) { + return it === 1 / 0 || it === -1 / 0 ? 0 : it + }) + }, + MIN_VALUE_REG = /^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/, + MAX_VALUE_REG = /^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/, + parseSpecifiedDomain = function (et, nt, rt) { + if (_isFunction$1(et)) return et(nt, rt) + if (!_isArray$1(et)) return nt + var it = [] + if (isNumber(et[0])) it[0] = rt ? et[0] : Math.min(et[0], nt[0]) + else if (MIN_VALUE_REG.test(et[0])) { + var ot = +MIN_VALUE_REG.exec(et[0])[1] + it[0] = nt[0] - ot + } else _isFunction$1(et[0]) ? (it[0] = et[0](nt[0])) : (it[0] = nt[0]) + if (isNumber(et[1])) it[1] = rt ? et[1] : Math.max(et[1], nt[1]) + else if (MAX_VALUE_REG.test(et[1])) { + var at = +MAX_VALUE_REG.exec(et[1])[1] + it[1] = nt[1] + at + } else _isFunction$1(et[1]) ? (it[1] = et[1](nt[1])) : (it[1] = nt[1]) + return it + }, + getBandSizeOfAxis = function (et, nt, rt) { + if (et && et.scale && et.scale.bandwidth) { + var it = et.scale.bandwidth() + if (!rt || it > 0) return it + } + if (et && nt && nt.length >= 2) { + for ( + var ot = _sortBy(nt, function (ht) { + return ht.coordinate + }), + at = 1 / 0, + st = 1, + lt = ot.length; + st < lt; + st++ + ) { + var ct = ot[st], + ut = ot[st - 1] + at = Math.min((ct.coordinate || 0) - (ut.coordinate || 0), at) + } + return at === 1 / 0 ? 0 : at + } + return rt ? void 0 : 0 + }, + parseDomainOfCategoryAxis = function (et, nt, rt) { + return !et || !et.length || _isEqual(et, _get(rt, 'type.defaultProps.domain')) ? nt : et + }, + getTooltipItem = function (et, nt) { + var rt = et.props, + it = rt.dataKey, + ot = rt.name, + at = rt.unit, + st = rt.formatter, + lt = rt.tooltipType, + ct = rt.chartType + return _objectSpread$o( + _objectSpread$o({}, filterProps(et)), + {}, + { + dataKey: it, + unit: at, + formatter: st, + name: ot || it, + color: getMainColorOfGraphicItem(et), + value: getValueByDataKey(nt, it), + type: lt, + payload: nt, + chartType: ct, + }, + ) + } + function _typeof$o(tt) { + '@babel/helpers - typeof' + return ( + (_typeof$o = + typeof Symbol == 'function' && typeof Symbol.iterator == 'symbol' + ? function (et) { + return typeof et + } + : function (et) { + return et && typeof Symbol == 'function' && et.constructor === Symbol && et !== Symbol.prototype + ? 'symbol' + : typeof et + }), + _typeof$o(tt) + ) + } + function ownKeys$n(tt, et) { + var nt = Object.keys(tt) + if (Object.getOwnPropertySymbols) { + var rt = Object.getOwnPropertySymbols(tt) + et && + (rt = rt.filter(function (it) { + return Object.getOwnPropertyDescriptor(tt, it).enumerable + })), + nt.push.apply(nt, rt) + } + return nt + } + function _objectSpread$n(tt) { + for (var et = 1; et < arguments.length; et++) { + var nt = arguments[et] != null ? arguments[et] : {} + et % 2 + ? ownKeys$n(Object(nt), !0).forEach(function (rt) { + _defineProperty$o(tt, rt, nt[rt]) + }) + : Object.getOwnPropertyDescriptors + ? Object.defineProperties(tt, Object.getOwnPropertyDescriptors(nt)) + : ownKeys$n(Object(nt)).forEach(function (rt) { + Object.defineProperty(tt, rt, Object.getOwnPropertyDescriptor(nt, rt)) + }) + } + return tt + } + function _defineProperty$o(tt, et, nt) { + return ( + (et = _toPropertyKey$n(et)), + et in tt + ? Object.defineProperty(tt, et, { value: nt, enumerable: !0, configurable: !0, writable: !0 }) + : (tt[et] = nt), + tt + ) + } + function _toPropertyKey$n(tt) { + var et = _toPrimitive$n(tt, 'string') + return _typeof$o(et) === 'symbol' ? et : String(et) + } + function _toPrimitive$n(tt, et) { + if (_typeof$o(tt) !== 'object' || tt === null) return tt + var nt = tt[Symbol.toPrimitive] + if (nt !== void 0) { + var rt = nt.call(tt, et || 'default') + if (_typeof$o(rt) !== 'object') return rt + throw new TypeError('@@toPrimitive must return a primitive value.') + } + return (et === 'string' ? String : Number)(tt) + } + var RADIAN = Math.PI / 180, + radianToDegree = function (et) { + return (et * 180) / Math.PI + }, + polarToCartesian = function (et, nt, rt, it) { + return { x: et + Math.cos(-RADIAN * it) * rt, y: nt + Math.sin(-RADIAN * it) * rt } + }, + distanceBetweenPoints = function (et, nt) { + var rt = et.x, + it = et.y, + ot = nt.x, + at = nt.y + return Math.sqrt(Math.pow(rt - ot, 2) + Math.pow(it - at, 2)) + }, + getAngleOfPoint = function (et, nt) { + var rt = et.x, + it = et.y, + ot = nt.cx, + at = nt.cy, + st = distanceBetweenPoints({ x: rt, y: it }, { x: ot, y: at }) + if (st <= 0) return { radius: st } + var lt = (rt - ot) / st, + ct = Math.acos(lt) + return it > at && (ct = 2 * Math.PI - ct), { radius: st, angle: radianToDegree(ct), angleInRadian: ct } + }, + formatAngleOfSector = function (et) { + var nt = et.startAngle, + rt = et.endAngle, + it = Math.floor(nt / 360), + ot = Math.floor(rt / 360), + at = Math.min(it, ot) + return { startAngle: nt - at * 360, endAngle: rt - at * 360 } + }, + reverseFormatAngleOfSetor = function (et, nt) { + var rt = nt.startAngle, + it = nt.endAngle, + ot = Math.floor(rt / 360), + at = Math.floor(it / 360), + st = Math.min(ot, at) + return et + st * 360 + }, + inRangeOfSector = function (et, nt) { + var rt = et.x, + it = et.y, + ot = getAngleOfPoint({ x: rt, y: it }, nt), + at = ot.radius, + st = ot.angle, + lt = nt.innerRadius, + ct = nt.outerRadius + if (at < lt || at > ct) return !1 + if (at === 0) return !0 + var ut = formatAngleOfSector(nt), + ht = ut.startAngle, + dt = ut.endAngle, + pt = st, + mt + if (ht <= dt) { + for (; pt > dt; ) pt -= 360 + for (; pt < ht; ) pt += 360 + mt = pt >= ht && pt <= dt + } else { + for (; pt > ht; ) pt -= 360 + for (; pt < dt; ) pt += 360 + mt = pt >= dt && pt <= ht + } + return mt + ? _objectSpread$n(_objectSpread$n({}, nt), {}, { radius: at, angle: reverseFormatAngleOfSetor(pt, nt) }) + : null + } + function _typeof$n(tt) { + '@babel/helpers - typeof' + return ( + (_typeof$n = + typeof Symbol == 'function' && typeof Symbol.iterator == 'symbol' + ? function (et) { + return typeof et + } + : function (et) { + return et && typeof Symbol == 'function' && et.constructor === Symbol && et !== Symbol.prototype + ? 'symbol' + : typeof et + }), + _typeof$n(tt) + ) + } + var _excluded$a = ['offset'] + function _toConsumableArray$5(tt) { + return ( + _arrayWithoutHoles$5(tt) || _iterableToArray$5(tt) || _unsupportedIterableToArray$a(tt) || _nonIterableSpread$5() + ) + } + function _nonIterableSpread$5() { + throw new TypeError(`Invalid attempt to spread non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`) + } + function _unsupportedIterableToArray$a(tt, et) { + if (tt) { + if (typeof tt == 'string') return _arrayLikeToArray$a(tt, et) + var nt = Object.prototype.toString.call(tt).slice(8, -1) + if ((nt === 'Object' && tt.constructor && (nt = tt.constructor.name), nt === 'Map' || nt === 'Set')) + return Array.from(tt) + if (nt === 'Arguments' || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(nt)) return _arrayLikeToArray$a(tt, et) + } + } + function _iterableToArray$5(tt) { + if ((typeof Symbol < 'u' && tt[Symbol.iterator] != null) || tt['@@iterator'] != null) return Array.from(tt) + } + function _arrayWithoutHoles$5(tt) { + if (Array.isArray(tt)) return _arrayLikeToArray$a(tt) + } + function _arrayLikeToArray$a(tt, et) { + ;(et == null || et > tt.length) && (et = tt.length) + for (var nt = 0, rt = new Array(et); nt < et; nt++) rt[nt] = tt[nt] + return rt + } + function _objectWithoutProperties$a(tt, et) { + if (tt == null) return {} + var nt = _objectWithoutPropertiesLoose$a(tt, et), + rt, + it + if (Object.getOwnPropertySymbols) { + var ot = Object.getOwnPropertySymbols(tt) + for (it = 0; it < ot.length; it++) + (rt = ot[it]), !(et.indexOf(rt) >= 0) && Object.prototype.propertyIsEnumerable.call(tt, rt) && (nt[rt] = tt[rt]) + } + return nt + } + function _objectWithoutPropertiesLoose$a(tt, et) { + if (tt == null) return {} + var nt = {}, + rt = Object.keys(tt), + it, + ot + for (ot = 0; ot < rt.length; ot++) (it = rt[ot]), !(et.indexOf(it) >= 0) && (nt[it] = tt[it]) + return nt + } + function ownKeys$m(tt, et) { + var nt = Object.keys(tt) + if (Object.getOwnPropertySymbols) { + var rt = Object.getOwnPropertySymbols(tt) + et && + (rt = rt.filter(function (it) { + return Object.getOwnPropertyDescriptor(tt, it).enumerable + })), + nt.push.apply(nt, rt) + } + return nt + } + function _objectSpread$m(tt) { + for (var et = 1; et < arguments.length; et++) { + var nt = arguments[et] != null ? arguments[et] : {} + et % 2 + ? ownKeys$m(Object(nt), !0).forEach(function (rt) { + _defineProperty$n(tt, rt, nt[rt]) + }) + : Object.getOwnPropertyDescriptors + ? Object.defineProperties(tt, Object.getOwnPropertyDescriptors(nt)) + : ownKeys$m(Object(nt)).forEach(function (rt) { + Object.defineProperty(tt, rt, Object.getOwnPropertyDescriptor(nt, rt)) + }) + } + return tt + } + function _defineProperty$n(tt, et, nt) { + return ( + (et = _toPropertyKey$m(et)), + et in tt + ? Object.defineProperty(tt, et, { value: nt, enumerable: !0, configurable: !0, writable: !0 }) + : (tt[et] = nt), + tt + ) + } + function _toPropertyKey$m(tt) { + var et = _toPrimitive$m(tt, 'string') + return _typeof$n(et) === 'symbol' ? et : String(et) + } + function _toPrimitive$m(tt, et) { + if (_typeof$n(tt) !== 'object' || tt === null) return tt + var nt = tt[Symbol.toPrimitive] + if (nt !== void 0) { + var rt = nt.call(tt, et || 'default') + if (_typeof$n(rt) !== 'object') return rt + throw new TypeError('@@toPrimitive must return a primitive value.') + } + return (et === 'string' ? String : Number)(tt) + } + function _extends$k() { + return ( + (_extends$k = Object.assign + ? Object.assign.bind() + : function (tt) { + for (var et = 1; et < arguments.length; et++) { + var nt = arguments[et] + for (var rt in nt) Object.prototype.hasOwnProperty.call(nt, rt) && (tt[rt] = nt[rt]) + } + return tt + }), + _extends$k.apply(this, arguments) + ) + } + var getLabel = function (et) { + var nt = et.value, + rt = et.formatter, + it = _isNil(et.children) ? nt : et.children + return _isFunction$1(rt) ? rt(it) : it + }, + getDeltaAngle$1 = function (et, nt) { + var rt = mathSign(nt - et), + it = Math.min(Math.abs(nt - et), 360) + return rt * it + }, + renderRadialLabel = function (et, nt, rt) { + var it = et.position, + ot = et.viewBox, + at = et.offset, + st = et.className, + lt = ot, + ct = lt.cx, + ut = lt.cy, + ht = lt.innerRadius, + dt = lt.outerRadius, + pt = lt.startAngle, + mt = lt.endAngle, + gt = lt.clockWise, + yt = (ht + dt) / 2, + bt = getDeltaAngle$1(pt, mt), + vt = bt >= 0 ? 1 : -1, + xt, + kt + it === 'insideStart' + ? ((xt = pt + vt * at), (kt = gt)) + : it === 'insideEnd' + ? ((xt = mt - vt * at), (kt = !gt)) + : it === 'end' && ((xt = mt + vt * at), (kt = gt)), + (kt = bt <= 0 ? kt : !kt) + var St = polarToCartesian(ct, ut, yt, xt), + Tt = polarToCartesian(ct, ut, yt, xt + (kt ? 1 : -1) * 359), + At = 'M' + .concat(St.x, ',') + .concat( + St.y, + ` + A`, + ) + .concat(yt, ',') + .concat(yt, ',0,1,') + .concat( + kt ? 0 : 1, + `, + `, + ) + .concat(Tt.x, ',') + .concat(Tt.y), + Et = _isNil(et.id) ? uniqueId('recharts-radial-line-') : et.id + return React$1.createElement( + 'text', + _extends$k({}, rt, { dominantBaseline: 'central', className: classNames('recharts-radial-bar-label', st) }), + React$1.createElement('defs', null, React$1.createElement('path', { id: Et, d: At })), + React$1.createElement('textPath', { xlinkHref: '#'.concat(Et) }, nt), + ) + }, + getAttrsOfPolarLabel = function (et) { + var nt = et.viewBox, + rt = et.offset, + it = et.position, + ot = nt, + at = ot.cx, + st = ot.cy, + lt = ot.innerRadius, + ct = ot.outerRadius, + ut = ot.startAngle, + ht = ot.endAngle, + dt = (ut + ht) / 2 + if (it === 'outside') { + var pt = polarToCartesian(at, st, ct + rt, dt), + mt = pt.x, + gt = pt.y + return { x: mt, y: gt, textAnchor: mt >= at ? 'start' : 'end', verticalAnchor: 'middle' } + } + if (it === 'center') return { x: at, y: st, textAnchor: 'middle', verticalAnchor: 'middle' } + if (it === 'centerTop') return { x: at, y: st, textAnchor: 'middle', verticalAnchor: 'start' } + if (it === 'centerBottom') return { x: at, y: st, textAnchor: 'middle', verticalAnchor: 'end' } + var yt = (lt + ct) / 2, + bt = polarToCartesian(at, st, yt, dt), + vt = bt.x, + xt = bt.y + return { x: vt, y: xt, textAnchor: 'middle', verticalAnchor: 'middle' } + }, + getAttrsOfCartesianLabel = function (et) { + var nt = et.viewBox, + rt = et.parentViewBox, + it = et.offset, + ot = et.position, + at = nt, + st = at.x, + lt = at.y, + ct = at.width, + ut = at.height, + ht = ut >= 0 ? 1 : -1, + dt = ht * it, + pt = ht > 0 ? 'end' : 'start', + mt = ht > 0 ? 'start' : 'end', + gt = ct >= 0 ? 1 : -1, + yt = gt * it, + bt = gt > 0 ? 'end' : 'start', + vt = gt > 0 ? 'start' : 'end' + if (ot === 'top') { + var xt = { x: st + ct / 2, y: lt - ht * it, textAnchor: 'middle', verticalAnchor: pt } + return _objectSpread$m(_objectSpread$m({}, xt), rt ? { height: Math.max(lt - rt.y, 0), width: ct } : {}) + } + if (ot === 'bottom') { + var kt = { x: st + ct / 2, y: lt + ut + dt, textAnchor: 'middle', verticalAnchor: mt } + return _objectSpread$m( + _objectSpread$m({}, kt), + rt ? { height: Math.max(rt.y + rt.height - (lt + ut), 0), width: ct } : {}, + ) + } + if (ot === 'left') { + var St = { x: st - yt, y: lt + ut / 2, textAnchor: bt, verticalAnchor: 'middle' } + return _objectSpread$m(_objectSpread$m({}, St), rt ? { width: Math.max(St.x - rt.x, 0), height: ut } : {}) + } + if (ot === 'right') { + var Tt = { x: st + ct + yt, y: lt + ut / 2, textAnchor: vt, verticalAnchor: 'middle' } + return _objectSpread$m( + _objectSpread$m({}, Tt), + rt ? { width: Math.max(rt.x + rt.width - Tt.x, 0), height: ut } : {}, + ) + } + var At = rt ? { width: ct, height: ut } : {} + return ot === 'insideLeft' + ? _objectSpread$m({ x: st + yt, y: lt + ut / 2, textAnchor: vt, verticalAnchor: 'middle' }, At) + : ot === 'insideRight' + ? _objectSpread$m({ x: st + ct - yt, y: lt + ut / 2, textAnchor: bt, verticalAnchor: 'middle' }, At) + : ot === 'insideTop' + ? _objectSpread$m({ x: st + ct / 2, y: lt + dt, textAnchor: 'middle', verticalAnchor: mt }, At) + : ot === 'insideBottom' + ? _objectSpread$m({ x: st + ct / 2, y: lt + ut - dt, textAnchor: 'middle', verticalAnchor: pt }, At) + : ot === 'insideTopLeft' + ? _objectSpread$m({ x: st + yt, y: lt + dt, textAnchor: vt, verticalAnchor: mt }, At) + : ot === 'insideTopRight' + ? _objectSpread$m({ x: st + ct - yt, y: lt + dt, textAnchor: bt, verticalAnchor: mt }, At) + : ot === 'insideBottomLeft' + ? _objectSpread$m({ x: st + yt, y: lt + ut - dt, textAnchor: vt, verticalAnchor: pt }, At) + : ot === 'insideBottomRight' + ? _objectSpread$m({ x: st + ct - yt, y: lt + ut - dt, textAnchor: bt, verticalAnchor: pt }, At) + : _isObject$1(ot) && (isNumber(ot.x) || isPercent(ot.x)) && (isNumber(ot.y) || isPercent(ot.y)) + ? _objectSpread$m( + { + x: st + getPercentValue(ot.x, ct), + y: lt + getPercentValue(ot.y, ut), + textAnchor: 'end', + verticalAnchor: 'end', + }, + At, + ) + : _objectSpread$m({ x: st + ct / 2, y: lt + ut / 2, textAnchor: 'middle', verticalAnchor: 'middle' }, At) + }, + isPolar = function (et) { + return 'cx' in et && isNumber(et.cx) + } + function Label(tt) { + var et = tt.offset, + nt = et === void 0 ? 5 : et, + rt = _objectWithoutProperties$a(tt, _excluded$a), + it = _objectSpread$m({ offset: nt }, rt), + ot = it.viewBox, + at = it.position, + st = it.value, + lt = it.children, + ct = it.content, + ut = it.className, + ht = ut === void 0 ? '' : ut, + dt = it.textBreakAll + if (!ot || (_isNil(st) && _isNil(lt) && !reactExports.isValidElement(ct) && !_isFunction$1(ct))) return null + if (reactExports.isValidElement(ct)) return reactExports.cloneElement(ct, it) + var pt + if (_isFunction$1(ct)) { + if (((pt = reactExports.createElement(ct, it)), reactExports.isValidElement(pt))) return pt + } else pt = getLabel(it) + var mt = isPolar(ot), + gt = filterProps(it, !0) + if (mt && (at === 'insideStart' || at === 'insideEnd' || at === 'end')) return renderRadialLabel(it, pt, gt) + var yt = mt ? getAttrsOfPolarLabel(it) : getAttrsOfCartesianLabel(it) + return React$1.createElement( + Text, + _extends$k({ className: classNames('recharts-label', ht) }, gt, yt, { breakAll: dt }), + pt, + ) + } + Label.displayName = 'Label' + var parseViewBox = function (et) { + var nt = et.cx, + rt = et.cy, + it = et.angle, + ot = et.startAngle, + at = et.endAngle, + st = et.r, + lt = et.radius, + ct = et.innerRadius, + ut = et.outerRadius, + ht = et.x, + dt = et.y, + pt = et.top, + mt = et.left, + gt = et.width, + yt = et.height, + bt = et.clockWise, + vt = et.labelViewBox + if (vt) return vt + if (isNumber(gt) && isNumber(yt)) { + if (isNumber(ht) && isNumber(dt)) return { x: ht, y: dt, width: gt, height: yt } + if (isNumber(pt) && isNumber(mt)) return { x: pt, y: mt, width: gt, height: yt } + } + return isNumber(ht) && isNumber(dt) + ? { x: ht, y: dt, width: 0, height: 0 } + : isNumber(nt) && isNumber(rt) + ? { + cx: nt, + cy: rt, + startAngle: ot || it || 0, + endAngle: at || it || 0, + innerRadius: ct || 0, + outerRadius: ut || lt || st || 0, + clockWise: bt, + } + : et.viewBox + ? et.viewBox + : {} + }, + parseLabel = function (et, nt) { + return et + ? et === !0 + ? React$1.createElement(Label, { key: 'label-implicit', viewBox: nt }) + : isNumOrStr(et) + ? React$1.createElement(Label, { key: 'label-implicit', viewBox: nt, value: et }) + : reactExports.isValidElement(et) + ? et.type === Label + ? reactExports.cloneElement(et, { key: 'label-implicit', viewBox: nt }) + : React$1.createElement(Label, { key: 'label-implicit', content: et, viewBox: nt }) + : _isFunction$1(et) + ? React$1.createElement(Label, { key: 'label-implicit', content: et, viewBox: nt }) + : _isObject$1(et) + ? React$1.createElement(Label, _extends$k({ viewBox: nt }, et, { key: 'label-implicit' })) + : null + : null + }, + renderCallByParent$1 = function (et, nt) { + var rt = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !0 + if (!et || (!et.children && rt && !et.label)) return null + var it = et.children, + ot = parseViewBox(et), + at = findAllByType(it, Label).map(function (lt, ct) { + return reactExports.cloneElement(lt, { viewBox: nt || ot, key: 'label-'.concat(ct) }) + }) + if (!rt) return at + var st = parseLabel(et.label, nt || ot) + return [st].concat(_toConsumableArray$5(at)) + } + Label.parseViewBox = parseViewBox + Label.renderCallByParent = renderCallByParent$1 + function last(tt) { + var et = tt == null ? 0 : tt.length + return et ? tt[et - 1] : void 0 + } + var last_1 = last + const _last = getDefaultExportFromCjs(last_1) + function _typeof$m(tt) { + '@babel/helpers - typeof' + return ( + (_typeof$m = + typeof Symbol == 'function' && typeof Symbol.iterator == 'symbol' + ? function (et) { + return typeof et + } + : function (et) { + return et && typeof Symbol == 'function' && et.constructor === Symbol && et !== Symbol.prototype + ? 'symbol' + : typeof et + }), + _typeof$m(tt) + ) + } + var _excluded$9 = ['valueAccessor'], + _excluded2$3 = ['data', 'dataKey', 'clockWise', 'id', 'textBreakAll'] + function _toConsumableArray$4(tt) { + return ( + _arrayWithoutHoles$4(tt) || _iterableToArray$4(tt) || _unsupportedIterableToArray$9(tt) || _nonIterableSpread$4() + ) + } + function _nonIterableSpread$4() { + throw new TypeError(`Invalid attempt to spread non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`) + } + function _unsupportedIterableToArray$9(tt, et) { + if (tt) { + if (typeof tt == 'string') return _arrayLikeToArray$9(tt, et) + var nt = Object.prototype.toString.call(tt).slice(8, -1) + if ((nt === 'Object' && tt.constructor && (nt = tt.constructor.name), nt === 'Map' || nt === 'Set')) + return Array.from(tt) + if (nt === 'Arguments' || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(nt)) return _arrayLikeToArray$9(tt, et) + } + } + function _iterableToArray$4(tt) { + if ((typeof Symbol < 'u' && tt[Symbol.iterator] != null) || tt['@@iterator'] != null) return Array.from(tt) + } + function _arrayWithoutHoles$4(tt) { + if (Array.isArray(tt)) return _arrayLikeToArray$9(tt) + } + function _arrayLikeToArray$9(tt, et) { + ;(et == null || et > tt.length) && (et = tt.length) + for (var nt = 0, rt = new Array(et); nt < et; nt++) rt[nt] = tt[nt] + return rt + } + function _extends$j() { + return ( + (_extends$j = Object.assign + ? Object.assign.bind() + : function (tt) { + for (var et = 1; et < arguments.length; et++) { + var nt = arguments[et] + for (var rt in nt) Object.prototype.hasOwnProperty.call(nt, rt) && (tt[rt] = nt[rt]) + } + return tt + }), + _extends$j.apply(this, arguments) + ) + } + function ownKeys$l(tt, et) { + var nt = Object.keys(tt) + if (Object.getOwnPropertySymbols) { + var rt = Object.getOwnPropertySymbols(tt) + et && + (rt = rt.filter(function (it) { + return Object.getOwnPropertyDescriptor(tt, it).enumerable + })), + nt.push.apply(nt, rt) + } + return nt + } + function _objectSpread$l(tt) { + for (var et = 1; et < arguments.length; et++) { + var nt = arguments[et] != null ? arguments[et] : {} + et % 2 + ? ownKeys$l(Object(nt), !0).forEach(function (rt) { + _defineProperty$m(tt, rt, nt[rt]) + }) + : Object.getOwnPropertyDescriptors + ? Object.defineProperties(tt, Object.getOwnPropertyDescriptors(nt)) + : ownKeys$l(Object(nt)).forEach(function (rt) { + Object.defineProperty(tt, rt, Object.getOwnPropertyDescriptor(nt, rt)) + }) + } + return tt + } + function _defineProperty$m(tt, et, nt) { + return ( + (et = _toPropertyKey$l(et)), + et in tt + ? Object.defineProperty(tt, et, { value: nt, enumerable: !0, configurable: !0, writable: !0 }) + : (tt[et] = nt), + tt + ) + } + function _toPropertyKey$l(tt) { + var et = _toPrimitive$l(tt, 'string') + return _typeof$m(et) === 'symbol' ? et : String(et) + } + function _toPrimitive$l(tt, et) { + if (_typeof$m(tt) !== 'object' || tt === null) return tt + var nt = tt[Symbol.toPrimitive] + if (nt !== void 0) { + var rt = nt.call(tt, et || 'default') + if (_typeof$m(rt) !== 'object') return rt + throw new TypeError('@@toPrimitive must return a primitive value.') + } + return (et === 'string' ? String : Number)(tt) + } + function _objectWithoutProperties$9(tt, et) { + if (tt == null) return {} + var nt = _objectWithoutPropertiesLoose$9(tt, et), + rt, + it + if (Object.getOwnPropertySymbols) { + var ot = Object.getOwnPropertySymbols(tt) + for (it = 0; it < ot.length; it++) + (rt = ot[it]), !(et.indexOf(rt) >= 0) && Object.prototype.propertyIsEnumerable.call(tt, rt) && (nt[rt] = tt[rt]) + } + return nt + } + function _objectWithoutPropertiesLoose$9(tt, et) { + if (tt == null) return {} + var nt = {}, + rt = Object.keys(tt), + it, + ot + for (ot = 0; ot < rt.length; ot++) (it = rt[ot]), !(et.indexOf(it) >= 0) && (nt[it] = tt[it]) + return nt + } + var defaultAccessor = function (et) { + return _isArray$1(et.value) ? _last(et.value) : et.value + } + function LabelList(tt) { + var et = tt.valueAccessor, + nt = et === void 0 ? defaultAccessor : et, + rt = _objectWithoutProperties$9(tt, _excluded$9), + it = rt.data, + ot = rt.dataKey, + at = rt.clockWise, + st = rt.id, + lt = rt.textBreakAll, + ct = _objectWithoutProperties$9(rt, _excluded2$3) + return !it || !it.length + ? null + : React$1.createElement( + Layer, + { className: 'recharts-label-list' }, + it.map(function (ut, ht) { + var dt = _isNil(ot) ? nt(ut, ht) : getValueByDataKey(ut && ut.payload, ot), + pt = _isNil(st) ? {} : { id: ''.concat(st, '-').concat(ht) } + return React$1.createElement( + Label, + _extends$j({}, filterProps(ut, !0), ct, pt, { + parentViewBox: ut.parentViewBox, + index: ht, + value: dt, + textBreakAll: lt, + viewBox: Label.parseViewBox( + _isNil(at) ? ut : _objectSpread$l(_objectSpread$l({}, ut), {}, { clockWise: at }), + ), + key: 'label-'.concat(ht), + }), + ) + }), + ) + } + LabelList.displayName = 'LabelList' + function parseLabelList(tt, et) { + return tt + ? tt === !0 + ? React$1.createElement(LabelList, { key: 'labelList-implicit', data: et }) + : React$1.isValidElement(tt) || _isFunction$1(tt) + ? React$1.createElement(LabelList, { key: 'labelList-implicit', data: et, content: tt }) + : _isObject$1(tt) + ? React$1.createElement(LabelList, _extends$j({ data: et }, tt, { key: 'labelList-implicit' })) + : null + : null + } + function renderCallByParent(tt, et) { + var nt = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !0 + if (!tt || (!tt.children && nt && !tt.label)) return null + var rt = tt.children, + it = findAllByType(rt, LabelList).map(function (at, st) { + return reactExports.cloneElement(at, { data: et, key: 'labelList-'.concat(st) }) + }) + if (!nt) return it + var ot = parseLabelList(tt.label, et) + return [ot].concat(_toConsumableArray$4(it)) + } + LabelList.renderCallByParent = renderCallByParent + function _typeof$l(tt) { + '@babel/helpers - typeof' + return ( + (_typeof$l = + typeof Symbol == 'function' && typeof Symbol.iterator == 'symbol' + ? function (et) { + return typeof et + } + : function (et) { + return et && typeof Symbol == 'function' && et.constructor === Symbol && et !== Symbol.prototype + ? 'symbol' + : typeof et + }), + _typeof$l(tt) + ) + } + function _extends$i() { + return ( + (_extends$i = Object.assign + ? Object.assign.bind() + : function (tt) { + for (var et = 1; et < arguments.length; et++) { + var nt = arguments[et] + for (var rt in nt) Object.prototype.hasOwnProperty.call(nt, rt) && (tt[rt] = nt[rt]) + } + return tt + }), + _extends$i.apply(this, arguments) + ) + } + function ownKeys$k(tt, et) { + var nt = Object.keys(tt) + if (Object.getOwnPropertySymbols) { + var rt = Object.getOwnPropertySymbols(tt) + et && + (rt = rt.filter(function (it) { + return Object.getOwnPropertyDescriptor(tt, it).enumerable + })), + nt.push.apply(nt, rt) + } + return nt + } + function _objectSpread$k(tt) { + for (var et = 1; et < arguments.length; et++) { + var nt = arguments[et] != null ? arguments[et] : {} + et % 2 + ? ownKeys$k(Object(nt), !0).forEach(function (rt) { + _defineProperty$l(tt, rt, nt[rt]) + }) + : Object.getOwnPropertyDescriptors + ? Object.defineProperties(tt, Object.getOwnPropertyDescriptors(nt)) + : ownKeys$k(Object(nt)).forEach(function (rt) { + Object.defineProperty(tt, rt, Object.getOwnPropertyDescriptor(nt, rt)) + }) + } + return tt + } + function _defineProperty$l(tt, et, nt) { + return ( + (et = _toPropertyKey$k(et)), + et in tt + ? Object.defineProperty(tt, et, { value: nt, enumerable: !0, configurable: !0, writable: !0 }) + : (tt[et] = nt), + tt + ) + } + function _toPropertyKey$k(tt) { + var et = _toPrimitive$k(tt, 'string') + return _typeof$l(et) === 'symbol' ? et : String(et) + } + function _toPrimitive$k(tt, et) { + if (_typeof$l(tt) !== 'object' || tt === null) return tt + var nt = tt[Symbol.toPrimitive] + if (nt !== void 0) { + var rt = nt.call(tt, et || 'default') + if (_typeof$l(rt) !== 'object') return rt + throw new TypeError('@@toPrimitive must return a primitive value.') + } + return (et === 'string' ? String : Number)(tt) + } + var getDeltaAngle = function (et, nt) { + var rt = mathSign(nt - et), + it = Math.min(Math.abs(nt - et), 359.999) + return rt * it + }, + getTangentCircle = function (et) { + var nt = et.cx, + rt = et.cy, + it = et.radius, + ot = et.angle, + at = et.sign, + st = et.isExternal, + lt = et.cornerRadius, + ct = et.cornerIsExternal, + ut = lt * (st ? 1 : -1) + it, + ht = Math.asin(lt / ut) / RADIAN, + dt = ct ? ot : ot + at * ht, + pt = polarToCartesian(nt, rt, ut, dt), + mt = polarToCartesian(nt, rt, it, dt), + gt = ct ? ot - at * ht : ot, + yt = polarToCartesian(nt, rt, ut * Math.cos(ht * RADIAN), gt) + return { center: pt, circleTangency: mt, lineTangency: yt, theta: ht } + }, + getSectorPath = function (et) { + var nt = et.cx, + rt = et.cy, + it = et.innerRadius, + ot = et.outerRadius, + at = et.startAngle, + st = et.endAngle, + lt = getDeltaAngle(at, st), + ct = at + lt, + ut = polarToCartesian(nt, rt, ot, at), + ht = polarToCartesian(nt, rt, ot, ct), + dt = 'M ' + .concat(ut.x, ',') + .concat( + ut.y, + ` + A `, + ) + .concat(ot, ',') + .concat( + ot, + `,0, + `, + ) + .concat(+(Math.abs(lt) > 180), ',') + .concat( + +(at > ct), + `, + `, + ) + .concat(ht.x, ',') + .concat( + ht.y, + ` + `, + ) + if (it > 0) { + var pt = polarToCartesian(nt, rt, it, at), + mt = polarToCartesian(nt, rt, it, ct) + dt += 'L ' + .concat(mt.x, ',') + .concat( + mt.y, + ` + A `, + ) + .concat(it, ',') + .concat( + it, + `,0, + `, + ) + .concat(+(Math.abs(lt) > 180), ',') + .concat( + +(at <= ct), + `, + `, + ) + .concat(pt.x, ',') + .concat(pt.y, ' Z') + } else dt += 'L '.concat(nt, ',').concat(rt, ' Z') + return dt + }, + getSectorWithCorner = function (et) { + var nt = et.cx, + rt = et.cy, + it = et.innerRadius, + ot = et.outerRadius, + at = et.cornerRadius, + st = et.forceCornerRadius, + lt = et.cornerIsExternal, + ct = et.startAngle, + ut = et.endAngle, + ht = mathSign(ut - ct), + dt = getTangentCircle({ + cx: nt, + cy: rt, + radius: ot, + angle: ct, + sign: ht, + cornerRadius: at, + cornerIsExternal: lt, + }), + pt = dt.circleTangency, + mt = dt.lineTangency, + gt = dt.theta, + yt = getTangentCircle({ + cx: nt, + cy: rt, + radius: ot, + angle: ut, + sign: -ht, + cornerRadius: at, + cornerIsExternal: lt, + }), + bt = yt.circleTangency, + vt = yt.lineTangency, + xt = yt.theta, + kt = lt ? Math.abs(ct - ut) : Math.abs(ct - ut) - gt - xt + if (kt < 0) + return st + ? 'M ' + .concat(mt.x, ',') + .concat( + mt.y, + ` + a`, + ) + .concat(at, ',') + .concat(at, ',0,0,1,') + .concat( + at * 2, + `,0 + a`, + ) + .concat(at, ',') + .concat(at, ',0,0,1,') + .concat( + -at * 2, + `,0 + `, + ) + : getSectorPath({ cx: nt, cy: rt, innerRadius: it, outerRadius: ot, startAngle: ct, endAngle: ut }) + var St = 'M ' + .concat(mt.x, ',') + .concat( + mt.y, + ` + A`, + ) + .concat(at, ',') + .concat(at, ',0,0,') + .concat(+(ht < 0), ',') + .concat(pt.x, ',') + .concat( + pt.y, + ` + A`, + ) + .concat(ot, ',') + .concat(ot, ',0,') + .concat(+(kt > 180), ',') + .concat(+(ht < 0), ',') + .concat(bt.x, ',') + .concat( + bt.y, + ` + A`, + ) + .concat(at, ',') + .concat(at, ',0,0,') + .concat(+(ht < 0), ',') + .concat(vt.x, ',') + .concat( + vt.y, + ` + `, + ) + if (it > 0) { + var Tt = getTangentCircle({ + cx: nt, + cy: rt, + radius: it, + angle: ct, + sign: ht, + isExternal: !0, + cornerRadius: at, + cornerIsExternal: lt, + }), + At = Tt.circleTangency, + Et = Tt.lineTangency, + $t = Tt.theta, + Dt = getTangentCircle({ + cx: nt, + cy: rt, + radius: it, + angle: ut, + sign: -ht, + isExternal: !0, + cornerRadius: at, + cornerIsExternal: lt, + }), + jt = Dt.circleTangency, + Pt = Dt.lineTangency, + Ct = Dt.theta, + wt = lt ? Math.abs(ct - ut) : Math.abs(ct - ut) - $t - Ct + if (wt < 0 && at === 0) return ''.concat(St, 'L').concat(nt, ',').concat(rt, 'Z') + St += 'L' + .concat(Pt.x, ',') + .concat( + Pt.y, + ` + A`, + ) + .concat(at, ',') + .concat(at, ',0,0,') + .concat(+(ht < 0), ',') + .concat(jt.x, ',') + .concat( + jt.y, + ` + A`, + ) + .concat(it, ',') + .concat(it, ',0,') + .concat(+(wt > 180), ',') + .concat(+(ht > 0), ',') + .concat(At.x, ',') + .concat( + At.y, + ` + A`, + ) + .concat(at, ',') + .concat(at, ',0,0,') + .concat(+(ht < 0), ',') + .concat(Et.x, ',') + .concat(Et.y, 'Z') + } else St += 'L'.concat(nt, ',').concat(rt, 'Z') + return St + }, + defaultProps$3 = { + cx: 0, + cy: 0, + innerRadius: 0, + outerRadius: 0, + startAngle: 0, + endAngle: 0, + cornerRadius: 0, + forceCornerRadius: !1, + cornerIsExternal: !1, + }, + Sector = function (et) { + var nt = _objectSpread$k(_objectSpread$k({}, defaultProps$3), et), + rt = nt.cx, + it = nt.cy, + ot = nt.innerRadius, + at = nt.outerRadius, + st = nt.cornerRadius, + lt = nt.forceCornerRadius, + ct = nt.cornerIsExternal, + ut = nt.startAngle, + ht = nt.endAngle, + dt = nt.className + if (at < ot || ut === ht) return null + var pt = classNames('recharts-sector', dt), + mt = at - ot, + gt = getPercentValue(st, mt, 0, !0), + yt + return ( + gt > 0 && Math.abs(ut - ht) < 360 + ? (yt = getSectorWithCorner({ + cx: rt, + cy: it, + innerRadius: ot, + outerRadius: at, + cornerRadius: Math.min(gt, mt / 2), + forceCornerRadius: lt, + cornerIsExternal: ct, + startAngle: ut, + endAngle: ht, + })) + : (yt = getSectorPath({ cx: rt, cy: it, innerRadius: ot, outerRadius: at, startAngle: ut, endAngle: ht })), + React$1.createElement('path', _extends$i({}, filterProps(nt, !0), { className: pt, d: yt, role: 'img' })) + ) + } + function _typeof$k(tt) { + '@babel/helpers - typeof' + return ( + (_typeof$k = + typeof Symbol == 'function' && typeof Symbol.iterator == 'symbol' + ? function (et) { + return typeof et + } + : function (et) { + return et && typeof Symbol == 'function' && et.constructor === Symbol && et !== Symbol.prototype + ? 'symbol' + : typeof et + }), + _typeof$k(tt) + ) + } + function _extends$h() { + return ( + (_extends$h = Object.assign + ? Object.assign.bind() + : function (tt) { + for (var et = 1; et < arguments.length; et++) { + var nt = arguments[et] + for (var rt in nt) Object.prototype.hasOwnProperty.call(nt, rt) && (tt[rt] = nt[rt]) + } + return tt + }), + _extends$h.apply(this, arguments) + ) + } + function ownKeys$j(tt, et) { + var nt = Object.keys(tt) + if (Object.getOwnPropertySymbols) { + var rt = Object.getOwnPropertySymbols(tt) + et && + (rt = rt.filter(function (it) { + return Object.getOwnPropertyDescriptor(tt, it).enumerable + })), + nt.push.apply(nt, rt) + } + return nt + } + function _objectSpread$j(tt) { + for (var et = 1; et < arguments.length; et++) { + var nt = arguments[et] != null ? arguments[et] : {} + et % 2 + ? ownKeys$j(Object(nt), !0).forEach(function (rt) { + _defineProperty$k(tt, rt, nt[rt]) + }) + : Object.getOwnPropertyDescriptors + ? Object.defineProperties(tt, Object.getOwnPropertyDescriptors(nt)) + : ownKeys$j(Object(nt)).forEach(function (rt) { + Object.defineProperty(tt, rt, Object.getOwnPropertyDescriptor(nt, rt)) + }) + } + return tt + } + function _defineProperty$k(tt, et, nt) { + return ( + (et = _toPropertyKey$j(et)), + et in tt + ? Object.defineProperty(tt, et, { value: nt, enumerable: !0, configurable: !0, writable: !0 }) + : (tt[et] = nt), + tt + ) + } + function _toPropertyKey$j(tt) { + var et = _toPrimitive$j(tt, 'string') + return _typeof$k(et) === 'symbol' ? et : String(et) + } + function _toPrimitive$j(tt, et) { + if (_typeof$k(tt) !== 'object' || tt === null) return tt + var nt = tt[Symbol.toPrimitive] + if (nt !== void 0) { + var rt = nt.call(tt, et || 'default') + if (_typeof$k(rt) !== 'object') return rt + throw new TypeError('@@toPrimitive must return a primitive value.') + } + return (et === 'string' ? String : Number)(tt) + } + var CURVE_FACTORIES = { + curveBasisClosed, + curveBasisOpen, + curveBasis, + curveBumpX: bumpX, + curveBumpY: bumpY, + curveLinearClosed, + curveLinear, + curveMonotoneX: monotoneX, + curveMonotoneY: monotoneY, + curveNatural, + curveStep, + curveStepAfter: stepAfter, + curveStepBefore: stepBefore, + }, + defined = function (et) { + return et.x === +et.x && et.y === +et.y + }, + getX = function (et) { + return et.x + }, + getY = function (et) { + return et.y + }, + getCurveFactory = function (et, nt) { + if (_isFunction$1(et)) return et + var rt = 'curve'.concat(_upperFirst(et)) + return (rt === 'curveMonotone' || rt === 'curveBump') && nt + ? CURVE_FACTORIES[''.concat(rt).concat(nt === 'vertical' ? 'Y' : 'X')] + : CURVE_FACTORIES[rt] || curveLinear + }, + getPath$1 = function (et) { + var nt = et.type, + rt = nt === void 0 ? 'linear' : nt, + it = et.points, + ot = it === void 0 ? [] : it, + at = et.baseLine, + st = et.layout, + lt = et.connectNulls, + ct = lt === void 0 ? !1 : lt, + ut = getCurveFactory(rt, st), + ht = ct + ? ot.filter(function (gt) { + return defined(gt) + }) + : ot, + dt + if (_isArray$1(at)) { + var pt = ct + ? at.filter(function (gt) { + return defined(gt) + }) + : at, + mt = ht.map(function (gt, yt) { + return _objectSpread$j(_objectSpread$j({}, gt), {}, { base: pt[yt] }) + }) + return ( + st === 'vertical' + ? (dt = shapeArea() + .y(getY) + .x1(getX) + .x0(function (gt) { + return gt.base.x + })) + : (dt = shapeArea() + .x(getX) + .y1(getY) + .y0(function (gt) { + return gt.base.y + })), + dt.defined(defined).curve(ut), + dt(mt) + ) + } + return ( + st === 'vertical' && isNumber(at) + ? (dt = shapeArea().y(getY).x1(getX).x0(at)) + : isNumber(at) + ? (dt = shapeArea().x(getX).y1(getY).y0(at)) + : (dt = shapeLine().x(getX).y(getY)), + dt.defined(defined).curve(ut), + dt(ht) + ) + }, + Curve = function (et) { + var nt = et.className, + rt = et.points, + it = et.path, + ot = et.pathRef + if ((!rt || !rt.length) && !it) return null + var at = rt && rt.length ? getPath$1(et) : it + return React$1.createElement( + 'path', + _extends$h({}, filterProps(et), adaptEventHandlers(et), { + className: classNames('recharts-curve', nt), + d: at, + ref: ot, + }), + ) + } + function _typeof$j(tt) { + '@babel/helpers - typeof' + return ( + (_typeof$j = + typeof Symbol == 'function' && typeof Symbol.iterator == 'symbol' + ? function (et) { + return typeof et + } + : function (et) { + return et && typeof Symbol == 'function' && et.constructor === Symbol && et !== Symbol.prototype + ? 'symbol' + : typeof et + }), + _typeof$j(tt) + ) + } + function _extends$g() { + return ( + (_extends$g = Object.assign + ? Object.assign.bind() + : function (tt) { + for (var et = 1; et < arguments.length; et++) { + var nt = arguments[et] + for (var rt in nt) Object.prototype.hasOwnProperty.call(nt, rt) && (tt[rt] = nt[rt]) + } + return tt + }), + _extends$g.apply(this, arguments) + ) + } + function _slicedToArray$4(tt, et) { + return ( + _arrayWithHoles$4(tt) || + _iterableToArrayLimit$4(tt, et) || + _unsupportedIterableToArray$8(tt, et) || + _nonIterableRest$4() + ) + } + function _nonIterableRest$4() { + throw new TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`) + } + function _unsupportedIterableToArray$8(tt, et) { + if (tt) { + if (typeof tt == 'string') return _arrayLikeToArray$8(tt, et) + var nt = Object.prototype.toString.call(tt).slice(8, -1) + if ((nt === 'Object' && tt.constructor && (nt = tt.constructor.name), nt === 'Map' || nt === 'Set')) + return Array.from(tt) + if (nt === 'Arguments' || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(nt)) return _arrayLikeToArray$8(tt, et) + } + } + function _arrayLikeToArray$8(tt, et) { + ;(et == null || et > tt.length) && (et = tt.length) + for (var nt = 0, rt = new Array(et); nt < et; nt++) rt[nt] = tt[nt] + return rt + } + function _iterableToArrayLimit$4(tt, et) { + var nt = tt == null ? null : (typeof Symbol < 'u' && tt[Symbol.iterator]) || tt['@@iterator'] + if (nt != null) { + var rt, + it, + ot, + at, + st = [], + lt = !0, + ct = !1 + try { + if (((ot = (nt = nt.call(tt)).next), et === 0)) { + if (Object(nt) !== nt) return + lt = !1 + } else for (; !(lt = (rt = ot.call(nt)).done) && (st.push(rt.value), st.length !== et); lt = !0); + } catch (ut) { + ;(ct = !0), (it = ut) + } finally { + try { + if (!lt && nt.return != null && ((at = nt.return()), Object(at) !== at)) return + } finally { + if (ct) throw it + } + } + return st + } + } + function _arrayWithHoles$4(tt) { + if (Array.isArray(tt)) return tt + } + function ownKeys$i(tt, et) { + var nt = Object.keys(tt) + if (Object.getOwnPropertySymbols) { + var rt = Object.getOwnPropertySymbols(tt) + et && + (rt = rt.filter(function (it) { + return Object.getOwnPropertyDescriptor(tt, it).enumerable + })), + nt.push.apply(nt, rt) + } + return nt + } + function _objectSpread$i(tt) { + for (var et = 1; et < arguments.length; et++) { + var nt = arguments[et] != null ? arguments[et] : {} + et % 2 + ? ownKeys$i(Object(nt), !0).forEach(function (rt) { + _defineProperty$j(tt, rt, nt[rt]) + }) + : Object.getOwnPropertyDescriptors + ? Object.defineProperties(tt, Object.getOwnPropertyDescriptors(nt)) + : ownKeys$i(Object(nt)).forEach(function (rt) { + Object.defineProperty(tt, rt, Object.getOwnPropertyDescriptor(nt, rt)) + }) + } + return tt + } + function _defineProperty$j(tt, et, nt) { + return ( + (et = _toPropertyKey$i(et)), + et in tt + ? Object.defineProperty(tt, et, { value: nt, enumerable: !0, configurable: !0, writable: !0 }) + : (tt[et] = nt), + tt + ) + } + function _toPropertyKey$i(tt) { + var et = _toPrimitive$i(tt, 'string') + return _typeof$j(et) === 'symbol' ? et : String(et) + } + function _toPrimitive$i(tt, et) { + if (_typeof$j(tt) !== 'object' || tt === null) return tt + var nt = tt[Symbol.toPrimitive] + if (nt !== void 0) { + var rt = nt.call(tt, et || 'default') + if (_typeof$j(rt) !== 'object') return rt + throw new TypeError('@@toPrimitive must return a primitive value.') + } + return (et === 'string' ? String : Number)(tt) + } + var getRectanglePath = function (et, nt, rt, it, ot) { + var at = Math.min(Math.abs(rt) / 2, Math.abs(it) / 2), + st = it >= 0 ? 1 : -1, + lt = rt >= 0 ? 1 : -1, + ct = (it >= 0 && rt >= 0) || (it < 0 && rt < 0) ? 1 : 0, + ut + if (at > 0 && ot instanceof Array) { + for (var ht = [0, 0, 0, 0], dt = 0, pt = 4; dt < pt; dt++) ht[dt] = ot[dt] > at ? at : ot[dt] + ;(ut = 'M'.concat(et, ',').concat(nt + st * ht[0])), + ht[0] > 0 && + (ut += 'A ' + .concat(ht[0], ',') + .concat(ht[0], ',0,0,') + .concat(ct, ',') + .concat(et + lt * ht[0], ',') + .concat(nt)), + (ut += 'L '.concat(et + rt - lt * ht[1], ',').concat(nt)), + ht[1] > 0 && + (ut += 'A ' + .concat(ht[1], ',') + .concat(ht[1], ',0,0,') + .concat( + ct, + `, + `, + ) + .concat(et + rt, ',') + .concat(nt + st * ht[1])), + (ut += 'L '.concat(et + rt, ',').concat(nt + it - st * ht[2])), + ht[2] > 0 && + (ut += 'A ' + .concat(ht[2], ',') + .concat(ht[2], ',0,0,') + .concat( + ct, + `, + `, + ) + .concat(et + rt - lt * ht[2], ',') + .concat(nt + it)), + (ut += 'L '.concat(et + lt * ht[3], ',').concat(nt + it)), + ht[3] > 0 && + (ut += 'A ' + .concat(ht[3], ',') + .concat(ht[3], ',0,0,') + .concat( + ct, + `, + `, + ) + .concat(et, ',') + .concat(nt + it - st * ht[3])), + (ut += 'Z') + } else if (at > 0 && ot === +ot && ot > 0) { + var mt = Math.min(at, ot) + ut = 'M ' + .concat(et, ',') + .concat( + nt + st * mt, + ` + A `, + ) + .concat(mt, ',') + .concat(mt, ',0,0,') + .concat(ct, ',') + .concat(et + lt * mt, ',') + .concat( + nt, + ` + L `, + ) + .concat(et + rt - lt * mt, ',') + .concat( + nt, + ` + A `, + ) + .concat(mt, ',') + .concat(mt, ',0,0,') + .concat(ct, ',') + .concat(et + rt, ',') + .concat( + nt + st * mt, + ` + L `, + ) + .concat(et + rt, ',') + .concat( + nt + it - st * mt, + ` + A `, + ) + .concat(mt, ',') + .concat(mt, ',0,0,') + .concat(ct, ',') + .concat(et + rt - lt * mt, ',') + .concat( + nt + it, + ` + L `, + ) + .concat(et + lt * mt, ',') + .concat( + nt + it, + ` + A `, + ) + .concat(mt, ',') + .concat(mt, ',0,0,') + .concat(ct, ',') + .concat(et, ',') + .concat(nt + it - st * mt, ' Z') + } else ut = 'M '.concat(et, ',').concat(nt, ' h ').concat(rt, ' v ').concat(it, ' h ').concat(-rt, ' Z') + return ut + }, + isInRectangle = function (et, nt) { + if (!et || !nt) return !1 + var rt = et.x, + it = et.y, + ot = nt.x, + at = nt.y, + st = nt.width, + lt = nt.height + if (Math.abs(st) > 0 && Math.abs(lt) > 0) { + var ct = Math.min(ot, ot + st), + ut = Math.max(ot, ot + st), + ht = Math.min(at, at + lt), + dt = Math.max(at, at + lt) + return rt >= ct && rt <= ut && it >= ht && it <= dt + } + return !1 + }, + defaultProps$2 = { + x: 0, + y: 0, + width: 0, + height: 0, + radius: 0, + isAnimationActive: !1, + isUpdateAnimationActive: !1, + animationBegin: 0, + animationDuration: 1500, + animationEasing: 'ease', + }, + Rectangle = function (et) { + var nt = _objectSpread$i(_objectSpread$i({}, defaultProps$2), et), + rt = reactExports.useRef(), + it = reactExports.useState(-1), + ot = _slicedToArray$4(it, 2), + at = ot[0], + st = ot[1] + reactExports.useEffect(function () { + if (rt.current && rt.current.getTotalLength) + try { + var kt = rt.current.getTotalLength() + kt && st(kt) + } catch {} + }, []) + var lt = nt.x, + ct = nt.y, + ut = nt.width, + ht = nt.height, + dt = nt.radius, + pt = nt.className, + mt = nt.animationEasing, + gt = nt.animationDuration, + yt = nt.animationBegin, + bt = nt.isAnimationActive, + vt = nt.isUpdateAnimationActive + if (lt !== +lt || ct !== +ct || ut !== +ut || ht !== +ht || ut === 0 || ht === 0) return null + var xt = classNames('recharts-rectangle', pt) + return vt + ? React$1.createElement( + Animate, + { + canBegin: at > 0, + from: { width: ut, height: ht, x: lt, y: ct }, + to: { width: ut, height: ht, x: lt, y: ct }, + duration: gt, + animationEasing: mt, + isActive: vt, + }, + function (kt) { + var St = kt.width, + Tt = kt.height, + At = kt.x, + Et = kt.y + return React$1.createElement( + Animate, + { + canBegin: at > 0, + from: '0px '.concat(at === -1 ? 1 : at, 'px'), + to: ''.concat(at, 'px 0px'), + attributeName: 'strokeDasharray', + begin: yt, + duration: gt, + isActive: bt, + easing: mt, + }, + React$1.createElement( + 'path', + _extends$g({}, filterProps(nt, !0), { + className: xt, + d: getRectanglePath(At, Et, St, Tt, dt), + ref: rt, + }), + ), + ) + }, + ) + : React$1.createElement( + 'path', + _extends$g({}, filterProps(nt, !0), { className: xt, d: getRectanglePath(lt, ct, ut, ht, dt) }), + ) + } + function _extends$f() { + return ( + (_extends$f = Object.assign + ? Object.assign.bind() + : function (tt) { + for (var et = 1; et < arguments.length; et++) { + var nt = arguments[et] + for (var rt in nt) Object.prototype.hasOwnProperty.call(nt, rt) && (tt[rt] = nt[rt]) + } + return tt + }), + _extends$f.apply(this, arguments) + ) + } + var Dot = function (et) { + var nt = et.cx, + rt = et.cy, + it = et.r, + ot = et.className, + at = classNames('recharts-dot', ot) + return nt === +nt && rt === +rt && it === +it + ? React$1.createElement( + 'circle', + _extends$f({}, filterProps(et), adaptEventHandlers(et), { className: at, cx: nt, cy: rt, r: it }), + ) + : null + } + function _typeof$i(tt) { + '@babel/helpers - typeof' + return ( + (_typeof$i = + typeof Symbol == 'function' && typeof Symbol.iterator == 'symbol' + ? function (et) { + return typeof et + } + : function (et) { + return et && typeof Symbol == 'function' && et.constructor === Symbol && et !== Symbol.prototype + ? 'symbol' + : typeof et + }), + _typeof$i(tt) + ) + } + var _excluded$8 = ['x', 'y', 'top', 'left', 'width', 'height', 'className'] + function _extends$e() { + return ( + (_extends$e = Object.assign + ? Object.assign.bind() + : function (tt) { + for (var et = 1; et < arguments.length; et++) { + var nt = arguments[et] + for (var rt in nt) Object.prototype.hasOwnProperty.call(nt, rt) && (tt[rt] = nt[rt]) + } + return tt + }), + _extends$e.apply(this, arguments) + ) + } + function ownKeys$h(tt, et) { + var nt = Object.keys(tt) + if (Object.getOwnPropertySymbols) { + var rt = Object.getOwnPropertySymbols(tt) + et && + (rt = rt.filter(function (it) { + return Object.getOwnPropertyDescriptor(tt, it).enumerable + })), + nt.push.apply(nt, rt) + } + return nt + } + function _objectSpread$h(tt) { + for (var et = 1; et < arguments.length; et++) { + var nt = arguments[et] != null ? arguments[et] : {} + et % 2 + ? ownKeys$h(Object(nt), !0).forEach(function (rt) { + _defineProperty$i(tt, rt, nt[rt]) + }) + : Object.getOwnPropertyDescriptors + ? Object.defineProperties(tt, Object.getOwnPropertyDescriptors(nt)) + : ownKeys$h(Object(nt)).forEach(function (rt) { + Object.defineProperty(tt, rt, Object.getOwnPropertyDescriptor(nt, rt)) + }) + } + return tt + } + function _defineProperty$i(tt, et, nt) { + return ( + (et = _toPropertyKey$h(et)), + et in tt + ? Object.defineProperty(tt, et, { value: nt, enumerable: !0, configurable: !0, writable: !0 }) + : (tt[et] = nt), + tt + ) + } + function _toPropertyKey$h(tt) { + var et = _toPrimitive$h(tt, 'string') + return _typeof$i(et) === 'symbol' ? et : String(et) + } + function _toPrimitive$h(tt, et) { + if (_typeof$i(tt) !== 'object' || tt === null) return tt + var nt = tt[Symbol.toPrimitive] + if (nt !== void 0) { + var rt = nt.call(tt, et || 'default') + if (_typeof$i(rt) !== 'object') return rt + throw new TypeError('@@toPrimitive must return a primitive value.') + } + return (et === 'string' ? String : Number)(tt) + } + function _objectWithoutProperties$8(tt, et) { + if (tt == null) return {} + var nt = _objectWithoutPropertiesLoose$8(tt, et), + rt, + it + if (Object.getOwnPropertySymbols) { + var ot = Object.getOwnPropertySymbols(tt) + for (it = 0; it < ot.length; it++) + (rt = ot[it]), !(et.indexOf(rt) >= 0) && Object.prototype.propertyIsEnumerable.call(tt, rt) && (nt[rt] = tt[rt]) + } + return nt + } + function _objectWithoutPropertiesLoose$8(tt, et) { + if (tt == null) return {} + var nt = {}, + rt = Object.keys(tt), + it, + ot + for (ot = 0; ot < rt.length; ot++) (it = rt[ot]), !(et.indexOf(it) >= 0) && (nt[it] = tt[it]) + return nt + } + var getPath = function (et, nt, rt, it, ot, at) { + return 'M'.concat(et, ',').concat(ot, 'v').concat(it, 'M').concat(at, ',').concat(nt, 'h').concat(rt) + }, + Cross = function (et) { + var nt = et.x, + rt = nt === void 0 ? 0 : nt, + it = et.y, + ot = it === void 0 ? 0 : it, + at = et.top, + st = at === void 0 ? 0 : at, + lt = et.left, + ct = lt === void 0 ? 0 : lt, + ut = et.width, + ht = ut === void 0 ? 0 : ut, + dt = et.height, + pt = dt === void 0 ? 0 : dt, + mt = et.className, + gt = _objectWithoutProperties$8(et, _excluded$8), + yt = _objectSpread$h({ x: rt, y: ot, top: st, left: ct, width: ht, height: pt }, gt) + return !isNumber(rt) || !isNumber(ot) || !isNumber(ht) || !isNumber(pt) || !isNumber(st) || !isNumber(ct) + ? null + : React$1.createElement( + 'path', + _extends$e({}, filterProps(yt, !0), { + className: classNames('recharts-cross', mt), + d: getPath(rt, ot, ht, pt, st, ct), + }), + ) + }, + baseGetTag$1 = _baseGetTag, + isObjectLike$1 = isObjectLike_1, + boolTag = '[object Boolean]' + function isBoolean(tt) { + return tt === !0 || tt === !1 || (isObjectLike$1(tt) && baseGetTag$1(tt) == boolTag) + } + var isBoolean_1 = isBoolean + const _isBoolean = getDefaultExportFromCjs(isBoolean_1) + var baseGetTag = _baseGetTag, + getPrototype = _getPrototype, + isObjectLike = isObjectLike_1, + objectTag = '[object Object]', + funcProto = Function.prototype, + objectProto = Object.prototype, + funcToString = funcProto.toString, + hasOwnProperty = objectProto.hasOwnProperty, + objectCtorString = funcToString.call(Object) + function isPlainObject(tt) { + if (!isObjectLike(tt) || baseGetTag(tt) != objectTag) return !1 + var et = getPrototype(tt) + if (et === null) return !0 + var nt = hasOwnProperty.call(et, 'constructor') && et.constructor + return typeof nt == 'function' && nt instanceof nt && funcToString.call(nt) == objectCtorString + } + var isPlainObject_1 = isPlainObject + const _isPlainObject = getDefaultExportFromCjs(isPlainObject_1) + function _typeof$h(tt) { + '@babel/helpers - typeof' + return ( + (_typeof$h = + typeof Symbol == 'function' && typeof Symbol.iterator == 'symbol' + ? function (et) { + return typeof et + } + : function (et) { + return et && typeof Symbol == 'function' && et.constructor === Symbol && et !== Symbol.prototype + ? 'symbol' + : typeof et + }), + _typeof$h(tt) + ) + } + function _extends$d() { + return ( + (_extends$d = Object.assign + ? Object.assign.bind() + : function (tt) { + for (var et = 1; et < arguments.length; et++) { + var nt = arguments[et] + for (var rt in nt) Object.prototype.hasOwnProperty.call(nt, rt) && (tt[rt] = nt[rt]) + } + return tt + }), + _extends$d.apply(this, arguments) + ) + } + function _slicedToArray$3(tt, et) { + return ( + _arrayWithHoles$3(tt) || + _iterableToArrayLimit$3(tt, et) || + _unsupportedIterableToArray$7(tt, et) || + _nonIterableRest$3() + ) + } + function _nonIterableRest$3() { + throw new TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`) + } + function _unsupportedIterableToArray$7(tt, et) { + if (tt) { + if (typeof tt == 'string') return _arrayLikeToArray$7(tt, et) + var nt = Object.prototype.toString.call(tt).slice(8, -1) + if ((nt === 'Object' && tt.constructor && (nt = tt.constructor.name), nt === 'Map' || nt === 'Set')) + return Array.from(tt) + if (nt === 'Arguments' || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(nt)) return _arrayLikeToArray$7(tt, et) + } + } + function _arrayLikeToArray$7(tt, et) { + ;(et == null || et > tt.length) && (et = tt.length) + for (var nt = 0, rt = new Array(et); nt < et; nt++) rt[nt] = tt[nt] + return rt + } + function _iterableToArrayLimit$3(tt, et) { + var nt = tt == null ? null : (typeof Symbol < 'u' && tt[Symbol.iterator]) || tt['@@iterator'] + if (nt != null) { + var rt, + it, + ot, + at, + st = [], + lt = !0, + ct = !1 + try { + if (((ot = (nt = nt.call(tt)).next), et === 0)) { + if (Object(nt) !== nt) return + lt = !1 + } else for (; !(lt = (rt = ot.call(nt)).done) && (st.push(rt.value), st.length !== et); lt = !0); + } catch (ut) { + ;(ct = !0), (it = ut) + } finally { + try { + if (!lt && nt.return != null && ((at = nt.return()), Object(at) !== at)) return + } finally { + if (ct) throw it + } + } + return st + } + } + function _arrayWithHoles$3(tt) { + if (Array.isArray(tt)) return tt + } + function ownKeys$g(tt, et) { + var nt = Object.keys(tt) + if (Object.getOwnPropertySymbols) { + var rt = Object.getOwnPropertySymbols(tt) + et && + (rt = rt.filter(function (it) { + return Object.getOwnPropertyDescriptor(tt, it).enumerable + })), + nt.push.apply(nt, rt) + } + return nt + } + function _objectSpread$g(tt) { + for (var et = 1; et < arguments.length; et++) { + var nt = arguments[et] != null ? arguments[et] : {} + et % 2 + ? ownKeys$g(Object(nt), !0).forEach(function (rt) { + _defineProperty$h(tt, rt, nt[rt]) + }) + : Object.getOwnPropertyDescriptors + ? Object.defineProperties(tt, Object.getOwnPropertyDescriptors(nt)) + : ownKeys$g(Object(nt)).forEach(function (rt) { + Object.defineProperty(tt, rt, Object.getOwnPropertyDescriptor(nt, rt)) + }) + } + return tt + } + function _defineProperty$h(tt, et, nt) { + return ( + (et = _toPropertyKey$g(et)), + et in tt + ? Object.defineProperty(tt, et, { value: nt, enumerable: !0, configurable: !0, writable: !0 }) + : (tt[et] = nt), + tt + ) + } + function _toPropertyKey$g(tt) { + var et = _toPrimitive$g(tt, 'string') + return _typeof$h(et) === 'symbol' ? et : String(et) + } + function _toPrimitive$g(tt, et) { + if (_typeof$h(tt) !== 'object' || tt === null) return tt + var nt = tt[Symbol.toPrimitive] + if (nt !== void 0) { + var rt = nt.call(tt, et || 'default') + if (_typeof$h(rt) !== 'object') return rt + throw new TypeError('@@toPrimitive must return a primitive value.') + } + return (et === 'string' ? String : Number)(tt) + } + var getTrapezoidPath = function (et, nt, rt, it, ot) { + var at = rt - it, + st + return ( + (st = 'M '.concat(et, ',').concat(nt)), + (st += 'L '.concat(et + rt, ',').concat(nt)), + (st += 'L '.concat(et + rt - at / 2, ',').concat(nt + ot)), + (st += 'L '.concat(et + rt - at / 2 - it, ',').concat(nt + ot)), + (st += 'L '.concat(et, ',').concat(nt, ' Z')), + st + ) + }, + defaultProps$1 = { + x: 0, + y: 0, + upperWidth: 0, + lowerWidth: 0, + height: 0, + isUpdateAnimationActive: !1, + animationBegin: 0, + animationDuration: 1500, + animationEasing: 'ease', + }, + Trapezoid = function (et) { + var nt = _objectSpread$g(_objectSpread$g({}, defaultProps$1), et), + rt = reactExports.useRef(), + it = reactExports.useState(-1), + ot = _slicedToArray$3(it, 2), + at = ot[0], + st = ot[1] + reactExports.useEffect(function () { + if (rt.current && rt.current.getTotalLength) + try { + var xt = rt.current.getTotalLength() + xt && st(xt) + } catch {} + }, []) + var lt = nt.x, + ct = nt.y, + ut = nt.upperWidth, + ht = nt.lowerWidth, + dt = nt.height, + pt = nt.className, + mt = nt.animationEasing, + gt = nt.animationDuration, + yt = nt.animationBegin, + bt = nt.isUpdateAnimationActive + if (lt !== +lt || ct !== +ct || ut !== +ut || ht !== +ht || dt !== +dt || (ut === 0 && ht === 0) || dt === 0) + return null + var vt = classNames('recharts-trapezoid', pt) + return bt + ? React$1.createElement( + Animate, + { + canBegin: at > 0, + from: { upperWidth: 0, lowerWidth: 0, height: dt, x: lt, y: ct }, + to: { upperWidth: ut, lowerWidth: ht, height: dt, x: lt, y: ct }, + duration: gt, + animationEasing: mt, + isActive: bt, + }, + function (xt) { + var kt = xt.upperWidth, + St = xt.lowerWidth, + Tt = xt.height, + At = xt.x, + Et = xt.y + return React$1.createElement( + Animate, + { + canBegin: at > 0, + from: '0px '.concat(at === -1 ? 1 : at, 'px'), + to: ''.concat(at, 'px 0px'), + attributeName: 'strokeDasharray', + begin: yt, + duration: gt, + easing: mt, + }, + React$1.createElement( + 'path', + _extends$d({}, filterProps(nt, !0), { + className: vt, + d: getTrapezoidPath(At, Et, kt, St, Tt), + ref: rt, + }), + ), + ) + }, + ) + : React$1.createElement( + 'g', + null, + React$1.createElement( + 'path', + _extends$d({}, filterProps(nt, !0), { className: vt, d: getTrapezoidPath(lt, ct, ut, ht, dt) }), + ), + ) + }, + _excluded$7 = ['option', 'shapeType', 'propTransformer', 'activeClassName', 'isActive'] + function _typeof$g(tt) { + '@babel/helpers - typeof' + return ( + (_typeof$g = + typeof Symbol == 'function' && typeof Symbol.iterator == 'symbol' + ? function (et) { + return typeof et + } + : function (et) { + return et && typeof Symbol == 'function' && et.constructor === Symbol && et !== Symbol.prototype + ? 'symbol' + : typeof et + }), + _typeof$g(tt) + ) + } + function _objectWithoutProperties$7(tt, et) { + if (tt == null) return {} + var nt = _objectWithoutPropertiesLoose$7(tt, et), + rt, + it + if (Object.getOwnPropertySymbols) { + var ot = Object.getOwnPropertySymbols(tt) + for (it = 0; it < ot.length; it++) + (rt = ot[it]), !(et.indexOf(rt) >= 0) && Object.prototype.propertyIsEnumerable.call(tt, rt) && (nt[rt] = tt[rt]) + } + return nt + } + function _objectWithoutPropertiesLoose$7(tt, et) { + if (tt == null) return {} + var nt = {}, + rt = Object.keys(tt), + it, + ot + for (ot = 0; ot < rt.length; ot++) (it = rt[ot]), !(et.indexOf(it) >= 0) && (nt[it] = tt[it]) + return nt + } + function ownKeys$f(tt, et) { + var nt = Object.keys(tt) + if (Object.getOwnPropertySymbols) { + var rt = Object.getOwnPropertySymbols(tt) + et && + (rt = rt.filter(function (it) { + return Object.getOwnPropertyDescriptor(tt, it).enumerable + })), + nt.push.apply(nt, rt) + } + return nt + } + function _objectSpread$f(tt) { + for (var et = 1; et < arguments.length; et++) { + var nt = arguments[et] != null ? arguments[et] : {} + et % 2 + ? ownKeys$f(Object(nt), !0).forEach(function (rt) { + _defineProperty$g(tt, rt, nt[rt]) + }) + : Object.getOwnPropertyDescriptors + ? Object.defineProperties(tt, Object.getOwnPropertyDescriptors(nt)) + : ownKeys$f(Object(nt)).forEach(function (rt) { + Object.defineProperty(tt, rt, Object.getOwnPropertyDescriptor(nt, rt)) + }) + } + return tt + } + function _defineProperty$g(tt, et, nt) { + return ( + (et = _toPropertyKey$f(et)), + et in tt + ? Object.defineProperty(tt, et, { value: nt, enumerable: !0, configurable: !0, writable: !0 }) + : (tt[et] = nt), + tt + ) + } + function _toPropertyKey$f(tt) { + var et = _toPrimitive$f(tt, 'string') + return _typeof$g(et) === 'symbol' ? et : String(et) + } + function _toPrimitive$f(tt, et) { + if (_typeof$g(tt) !== 'object' || tt === null) return tt + var nt = tt[Symbol.toPrimitive] + if (nt !== void 0) { + var rt = nt.call(tt, et || 'default') + if (_typeof$g(rt) !== 'object') return rt + throw new TypeError('@@toPrimitive must return a primitive value.') + } + return (et === 'string' ? String : Number)(tt) + } + function defaultPropTransformer(tt, et) { + return _objectSpread$f(_objectSpread$f({}, et), tt) + } + function isSymbolsProps(tt, et) { + return tt === 'symbols' + } + function ShapeSelector(tt) { + var et = tt.shapeType, + nt = tt.elementProps + switch (et) { + case 'rectangle': + return React$1.createElement(Rectangle, nt) + case 'trapezoid': + return React$1.createElement(Trapezoid, nt) + case 'sector': + return React$1.createElement(Sector, nt) + case 'symbols': + if (isSymbolsProps(et)) return React$1.createElement(Symbols, nt) + break + default: + return null + } + } + function Shape(tt) { + var et = tt.option, + nt = tt.shapeType, + rt = tt.propTransformer, + it = rt === void 0 ? defaultPropTransformer : rt, + ot = tt.activeClassName, + at = ot === void 0 ? 'recharts-active-shape' : ot, + st = tt.isActive, + lt = _objectWithoutProperties$7(tt, _excluded$7), + ct + if (reactExports.isValidElement(et)) ct = reactExports.cloneElement(et, lt) + else if (_isFunction$1(et)) ct = et(lt) + else if (_isPlainObject(et) && !_isBoolean(et)) { + var ut = lt, + ht = it(et, ut) + ct = React$1.createElement(ShapeSelector, { shapeType: nt, elementProps: ht }) + } else { + var dt = lt + ct = React$1.createElement(ShapeSelector, { shapeType: nt, elementProps: dt }) + } + return st ? React$1.createElement(Layer, { className: at }, ct) : ct + } + function isFunnel(tt, et) { + return 'trapezoids' in tt.props + } + function isPie(tt, et) { + return 'sectors' in tt.props + } + function isScatter(tt, et) { + return 'points' in tt.props + } + function compareFunnel(tt, et) { + var nt, + rt, + it = tt.x === (et == null || (nt = et.labelViewBox) === null || nt === void 0 ? void 0 : nt.x) || tt.x === et.x, + ot = tt.y === (et == null || (rt = et.labelViewBox) === null || rt === void 0 ? void 0 : rt.y) || tt.y === et.y + return it && ot + } + function comparePie(tt, et) { + var nt = tt.endAngle === et.endAngle, + rt = tt.startAngle === et.startAngle + return nt && rt + } + function compareScatter(tt, et) { + var nt = tt.x === et.x, + rt = tt.y === et.y, + it = tt.z === et.z + return nt && rt && it + } + function getComparisonFn(tt, et) { + var nt + return ( + isFunnel(tt) ? (nt = compareFunnel) : isPie(tt) ? (nt = comparePie) : isScatter(tt) && (nt = compareScatter), nt + ) + } + function getShapeDataKey(tt, et) { + var nt + return isFunnel(tt) ? (nt = 'trapezoids') : isPie(tt) ? (nt = 'sectors') : isScatter(tt) && (nt = 'points'), nt + } + function getActiveShapeTooltipPayload(tt, et) { + if (isFunnel(tt)) { + var nt + return (nt = et.tooltipPayload) === null || + nt === void 0 || + (nt = nt[0]) === null || + nt === void 0 || + (nt = nt.payload) === null || + nt === void 0 + ? void 0 + : nt.payload + } + if (isPie(tt)) { + var rt + return (rt = et.tooltipPayload) === null || + rt === void 0 || + (rt = rt[0]) === null || + rt === void 0 || + (rt = rt.payload) === null || + rt === void 0 + ? void 0 + : rt.payload + } + return isScatter(tt) ? et.payload : {} + } + function getActiveShapeIndexForTooltip(tt) { + var et = tt.activeTooltipItem, + nt = tt.graphicalItem, + rt = tt.itemData, + it = getShapeDataKey(nt), + ot = getActiveShapeTooltipPayload(nt, et), + at = rt.filter(function (lt, ct) { + var ut = _isEqual(ot, lt), + ht = nt.props[it].filter(function (mt) { + var gt = getComparisonFn(nt) + return gt(mt, et) + }), + dt = nt.props[it].indexOf(ht[ht.length - 1]), + pt = ct === dt + return ut && pt + }), + st = rt.indexOf(at[at.length - 1]) + return st + } + var nativeCeil = Math.ceil, + nativeMax$1 = Math.max + function baseRange$1(tt, et, nt, rt) { + for (var it = -1, ot = nativeMax$1(nativeCeil((et - tt) / (nt || 1)), 0), at = Array(ot); ot--; ) + (at[rt ? ot : ++it] = tt), (tt += nt) + return at + } + var _baseRange = baseRange$1, + toNumber = toNumber_1, + INFINITY = 1 / 0, + MAX_INTEGER = 17976931348623157e292 + function toFinite$2(tt) { + if (!tt) return tt === 0 ? tt : 0 + if (((tt = toNumber(tt)), tt === INFINITY || tt === -INFINITY)) { + var et = tt < 0 ? -1 : 1 + return et * MAX_INTEGER + } + return tt === tt ? tt : 0 + } + var toFinite_1 = toFinite$2, + baseRange = _baseRange, + isIterateeCall$2 = _isIterateeCall, + toFinite$1 = toFinite_1 + function createRange$1(tt) { + return function (et, nt, rt) { + return ( + rt && typeof rt != 'number' && isIterateeCall$2(et, nt, rt) && (nt = rt = void 0), + (et = toFinite$1(et)), + nt === void 0 ? ((nt = et), (et = 0)) : (nt = toFinite$1(nt)), + (rt = rt === void 0 ? (et < nt ? 1 : -1) : toFinite$1(rt)), + baseRange(et, nt, rt, tt) + ) + } + } + var _createRange = createRange$1, + createRange = _createRange, + range = createRange(), + range_1 = range + const _range = getDefaultExportFromCjs(range_1) + function _typeof$f(tt) { + '@babel/helpers - typeof' + return ( + (_typeof$f = + typeof Symbol == 'function' && typeof Symbol.iterator == 'symbol' + ? function (et) { + return typeof et + } + : function (et) { + return et && typeof Symbol == 'function' && et.constructor === Symbol && et !== Symbol.prototype + ? 'symbol' + : typeof et + }), + _typeof$f(tt) + ) + } + function ownKeys$e(tt, et) { + var nt = Object.keys(tt) + if (Object.getOwnPropertySymbols) { + var rt = Object.getOwnPropertySymbols(tt) + et && + (rt = rt.filter(function (it) { + return Object.getOwnPropertyDescriptor(tt, it).enumerable + })), + nt.push.apply(nt, rt) + } + return nt + } + function _objectSpread$e(tt) { + for (var et = 1; et < arguments.length; et++) { + var nt = arguments[et] != null ? arguments[et] : {} + et % 2 + ? ownKeys$e(Object(nt), !0).forEach(function (rt) { + _defineProperty$f(tt, rt, nt[rt]) + }) + : Object.getOwnPropertyDescriptors + ? Object.defineProperties(tt, Object.getOwnPropertyDescriptors(nt)) + : ownKeys$e(Object(nt)).forEach(function (rt) { + Object.defineProperty(tt, rt, Object.getOwnPropertyDescriptor(nt, rt)) + }) + } + return tt + } + function _defineProperty$f(tt, et, nt) { + return ( + (et = _toPropertyKey$e(et)), + et in tt + ? Object.defineProperty(tt, et, { value: nt, enumerable: !0, configurable: !0, writable: !0 }) + : (tt[et] = nt), + tt + ) + } + function _toPropertyKey$e(tt) { + var et = _toPrimitive$e(tt, 'string') + return _typeof$f(et) === 'symbol' ? et : String(et) + } + function _toPrimitive$e(tt, et) { + if (_typeof$f(tt) !== 'object' || tt === null) return tt + var nt = tt[Symbol.toPrimitive] + if (nt !== void 0) { + var rt = nt.call(tt, et || 'default') + if (_typeof$f(rt) !== 'object') return rt + throw new TypeError('@@toPrimitive must return a primitive value.') + } + return (et === 'string' ? String : Number)(tt) + } + var PREFIX_LIST = ['Webkit', 'Moz', 'O', 'ms'], + generatePrefixStyle = function (et, nt) { + if (!et) return null + var rt = et.replace(/(\w)/, function (ot) { + return ot.toUpperCase() + }), + it = PREFIX_LIST.reduce(function (ot, at) { + return _objectSpread$e(_objectSpread$e({}, ot), {}, _defineProperty$f({}, at + rt, nt)) + }, {}) + return (it[et] = nt), it + } + function _typeof$e(tt) { + '@babel/helpers - typeof' + return ( + (_typeof$e = + typeof Symbol == 'function' && typeof Symbol.iterator == 'symbol' + ? function (et) { + return typeof et + } + : function (et) { + return et && typeof Symbol == 'function' && et.constructor === Symbol && et !== Symbol.prototype + ? 'symbol' + : typeof et + }), + _typeof$e(tt) + ) + } + function _extends$c() { + return ( + (_extends$c = Object.assign + ? Object.assign.bind() + : function (tt) { + for (var et = 1; et < arguments.length; et++) { + var nt = arguments[et] + for (var rt in nt) Object.prototype.hasOwnProperty.call(nt, rt) && (tt[rt] = nt[rt]) + } + return tt + }), + _extends$c.apply(this, arguments) + ) + } + function ownKeys$d(tt, et) { + var nt = Object.keys(tt) + if (Object.getOwnPropertySymbols) { + var rt = Object.getOwnPropertySymbols(tt) + et && + (rt = rt.filter(function (it) { + return Object.getOwnPropertyDescriptor(tt, it).enumerable + })), + nt.push.apply(nt, rt) + } + return nt + } + function _objectSpread$d(tt) { + for (var et = 1; et < arguments.length; et++) { + var nt = arguments[et] != null ? arguments[et] : {} + et % 2 + ? ownKeys$d(Object(nt), !0).forEach(function (rt) { + _defineProperty$e(tt, rt, nt[rt]) + }) + : Object.getOwnPropertyDescriptors + ? Object.defineProperties(tt, Object.getOwnPropertyDescriptors(nt)) + : ownKeys$d(Object(nt)).forEach(function (rt) { + Object.defineProperty(tt, rt, Object.getOwnPropertyDescriptor(nt, rt)) + }) + } + return tt + } + function _classCallCheck$9(tt, et) { + if (!(tt instanceof et)) throw new TypeError('Cannot call a class as a function') + } + function _defineProperties$9(tt, et) { + for (var nt = 0; nt < et.length; nt++) { + var rt = et[nt] + ;(rt.enumerable = rt.enumerable || !1), + (rt.configurable = !0), + 'value' in rt && (rt.writable = !0), + Object.defineProperty(tt, _toPropertyKey$d(rt.key), rt) + } + } + function _createClass$9(tt, et, nt) { + return ( + et && _defineProperties$9(tt.prototype, et), + nt && _defineProperties$9(tt, nt), + Object.defineProperty(tt, 'prototype', { writable: !1 }), + tt + ) + } + function _inherits$7(tt, et) { + if (typeof et != 'function' && et !== null) + throw new TypeError('Super expression must either be null or a function') + ;(tt.prototype = Object.create(et && et.prototype, { constructor: { value: tt, writable: !0, configurable: !0 } })), + Object.defineProperty(tt, 'prototype', { writable: !1 }), + et && _setPrototypeOf$7(tt, et) + } + function _setPrototypeOf$7(tt, et) { + return ( + (_setPrototypeOf$7 = Object.setPrototypeOf + ? Object.setPrototypeOf.bind() + : function (rt, it) { + return (rt.__proto__ = it), rt + }), + _setPrototypeOf$7(tt, et) + ) + } + function _createSuper$7(tt) { + var et = _isNativeReflectConstruct$7() + return function () { + var rt = _getPrototypeOf$7(tt), + it + if (et) { + var ot = _getPrototypeOf$7(this).constructor + it = Reflect.construct(rt, arguments, ot) + } else it = rt.apply(this, arguments) + return _possibleConstructorReturn$7(this, it) + } + } + function _possibleConstructorReturn$7(tt, et) { + if (et && (_typeof$e(et) === 'object' || typeof et == 'function')) return et + if (et !== void 0) throw new TypeError('Derived constructors may only return object or undefined') + return _assertThisInitialized$7(tt) + } + function _assertThisInitialized$7(tt) { + if (tt === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called") + return tt + } + function _isNativeReflectConstruct$7() { + if (typeof Reflect > 'u' || !Reflect.construct || Reflect.construct.sham) return !1 + if (typeof Proxy == 'function') return !0 + try { + return Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})), !0 + } catch { + return !1 + } + } + function _getPrototypeOf$7(tt) { + return ( + (_getPrototypeOf$7 = Object.setPrototypeOf + ? Object.getPrototypeOf.bind() + : function (nt) { + return nt.__proto__ || Object.getPrototypeOf(nt) + }), + _getPrototypeOf$7(tt) + ) + } + function _defineProperty$e(tt, et, nt) { + return ( + (et = _toPropertyKey$d(et)), + et in tt + ? Object.defineProperty(tt, et, { value: nt, enumerable: !0, configurable: !0, writable: !0 }) + : (tt[et] = nt), + tt + ) + } + function _toPropertyKey$d(tt) { + var et = _toPrimitive$d(tt, 'string') + return _typeof$e(et) === 'symbol' ? et : String(et) + } + function _toPrimitive$d(tt, et) { + if (_typeof$e(tt) !== 'object' || tt === null) return tt + var nt = tt[Symbol.toPrimitive] + if (nt !== void 0) { + var rt = nt.call(tt, et || 'default') + if (_typeof$e(rt) !== 'object') return rt + throw new TypeError('@@toPrimitive must return a primitive value.') + } + return (et === 'string' ? String : Number)(tt) + } + var createScale = function (et) { + var nt = et.data, + rt = et.startIndex, + it = et.endIndex, + ot = et.x, + at = et.width, + st = et.travellerWidth + if (!nt || !nt.length) return {} + var lt = nt.length, + ct = point() + .domain(_range(0, lt)) + .range([ot, ot + at - st]), + ut = ct.domain().map(function (ht) { + return ct(ht) + }) + return { + isTextActive: !1, + isSlideMoving: !1, + isTravellerMoving: !1, + isTravellerFocused: !1, + startX: ct(rt), + endX: ct(it), + scale: ct, + scaleValues: ut, + } + }, + isTouch = function (et) { + return et.changedTouches && !!et.changedTouches.length + }, + Brush = (function (tt) { + _inherits$7(nt, tt) + var et = _createSuper$7(nt) + function nt(rt) { + var it + return ( + _classCallCheck$9(this, nt), + (it = et.call(this, rt)), + _defineProperty$e(_assertThisInitialized$7(it), 'handleDrag', function (ot) { + it.leaveTimer && (clearTimeout(it.leaveTimer), (it.leaveTimer = null)), + it.state.isTravellerMoving ? it.handleTravellerMove(ot) : it.state.isSlideMoving && it.handleSlideDrag(ot) + }), + _defineProperty$e(_assertThisInitialized$7(it), 'handleTouchMove', function (ot) { + ot.changedTouches != null && ot.changedTouches.length > 0 && it.handleDrag(ot.changedTouches[0]) + }), + _defineProperty$e(_assertThisInitialized$7(it), 'handleDragEnd', function () { + it.setState({ isTravellerMoving: !1, isSlideMoving: !1 }, function () { + var ot = it.props, + at = ot.endIndex, + st = ot.onDragEnd, + lt = ot.startIndex + st == null || st({ endIndex: at, startIndex: lt }) + }), + it.detachDragEndListener() + }), + _defineProperty$e(_assertThisInitialized$7(it), 'handleLeaveWrapper', function () { + ;(it.state.isTravellerMoving || it.state.isSlideMoving) && + (it.leaveTimer = window.setTimeout(it.handleDragEnd, it.props.leaveTimeOut)) + }), + _defineProperty$e(_assertThisInitialized$7(it), 'handleEnterSlideOrTraveller', function () { + it.setState({ isTextActive: !0 }) + }), + _defineProperty$e(_assertThisInitialized$7(it), 'handleLeaveSlideOrTraveller', function () { + it.setState({ isTextActive: !1 }) + }), + _defineProperty$e(_assertThisInitialized$7(it), 'handleSlideDragStart', function (ot) { + var at = isTouch(ot) ? ot.changedTouches[0] : ot + it.setState({ isTravellerMoving: !1, isSlideMoving: !0, slideMoveStartX: at.pageX }), + it.attachDragEndListener() + }), + (it.travellerDragStartHandlers = { + startX: it.handleTravellerDragStart.bind(_assertThisInitialized$7(it), 'startX'), + endX: it.handleTravellerDragStart.bind(_assertThisInitialized$7(it), 'endX'), + }), + (it.state = {}), + it + ) + } + return ( + _createClass$9( + nt, + [ + { + key: 'componentWillUnmount', + value: function () { + this.leaveTimer && (clearTimeout(this.leaveTimer), (this.leaveTimer = null)), + this.detachDragEndListener() + }, + }, + { + key: 'getIndex', + value: function (it) { + var ot = it.startX, + at = it.endX, + st = this.state.scaleValues, + lt = this.props, + ct = lt.gap, + ut = lt.data, + ht = ut.length - 1, + dt = Math.min(ot, at), + pt = Math.max(ot, at), + mt = nt.getIndexInRange(st, dt), + gt = nt.getIndexInRange(st, pt) + return { startIndex: mt - (mt % ct), endIndex: gt === ht ? ht : gt - (gt % ct) } + }, + }, + { + key: 'getTextOfTick', + value: function (it) { + var ot = this.props, + at = ot.data, + st = ot.tickFormatter, + lt = ot.dataKey, + ct = getValueByDataKey(at[it], lt, it) + return _isFunction$1(st) ? st(ct, it) : ct + }, + }, + { + key: 'attachDragEndListener', + value: function () { + window.addEventListener('mouseup', this.handleDragEnd, !0), + window.addEventListener('touchend', this.handleDragEnd, !0), + window.addEventListener('mousemove', this.handleDrag, !0) + }, + }, + { + key: 'detachDragEndListener', + value: function () { + window.removeEventListener('mouseup', this.handleDragEnd, !0), + window.removeEventListener('touchend', this.handleDragEnd, !0), + window.removeEventListener('mousemove', this.handleDrag, !0) + }, + }, + { + key: 'handleSlideDrag', + value: function (it) { + var ot = this.state, + at = ot.slideMoveStartX, + st = ot.startX, + lt = ot.endX, + ct = this.props, + ut = ct.x, + ht = ct.width, + dt = ct.travellerWidth, + pt = ct.startIndex, + mt = ct.endIndex, + gt = ct.onChange, + yt = it.pageX - at + yt > 0 + ? (yt = Math.min(yt, ut + ht - dt - lt, ut + ht - dt - st)) + : yt < 0 && (yt = Math.max(yt, ut - st, ut - lt)) + var bt = this.getIndex({ startX: st + yt, endX: lt + yt }) + ;(bt.startIndex !== pt || bt.endIndex !== mt) && gt && gt(bt), + this.setState({ startX: st + yt, endX: lt + yt, slideMoveStartX: it.pageX }) + }, + }, + { + key: 'handleTravellerDragStart', + value: function (it, ot) { + var at = isTouch(ot) ? ot.changedTouches[0] : ot + this.setState({ + isSlideMoving: !1, + isTravellerMoving: !0, + movingTravellerId: it, + brushMoveStartX: at.pageX, + }), + this.attachDragEndListener() + }, + }, + { + key: 'handleTravellerMove', + value: function (it) { + var ot, + at = this.state, + st = at.brushMoveStartX, + lt = at.movingTravellerId, + ct = at.endX, + ut = at.startX, + ht = this.state[lt], + dt = this.props, + pt = dt.x, + mt = dt.width, + gt = dt.travellerWidth, + yt = dt.onChange, + bt = dt.gap, + vt = dt.data, + xt = { startX: this.state.startX, endX: this.state.endX }, + kt = it.pageX - st + kt > 0 ? (kt = Math.min(kt, pt + mt - gt - ht)) : kt < 0 && (kt = Math.max(kt, pt - ht)), + (xt[lt] = ht + kt) + var St = this.getIndex(xt), + Tt = St.startIndex, + At = St.endIndex, + Et = function () { + var Dt = vt.length - 1 + return ( + (lt === 'startX' && (ct > ut ? Tt % bt === 0 : At % bt === 0)) || + (ct < ut && At === Dt) || + (lt === 'endX' && (ct > ut ? At % bt === 0 : Tt % bt === 0)) || + (ct > ut && At === Dt) + ) + } + this.setState( + ((ot = {}), + _defineProperty$e(ot, lt, ht + kt), + _defineProperty$e(ot, 'brushMoveStartX', it.pageX), + ot), + function () { + yt && Et() && yt(St) + }, + ) + }, + }, + { + key: 'handleTravellerMoveKeyboard', + value: function (it, ot) { + var at = this, + st = this.state, + lt = st.scaleValues, + ct = st.startX, + ut = st.endX, + ht = this.state[ot], + dt = lt.indexOf(ht) + if (dt !== -1) { + var pt = dt + it + if (!(pt === -1 || pt >= lt.length)) { + var mt = lt[pt] + ;(ot === 'startX' && mt >= ut) || + (ot === 'endX' && mt <= ct) || + this.setState(_defineProperty$e({}, ot, mt), function () { + at.props.onChange(at.getIndex({ startX: at.state.startX, endX: at.state.endX })) + }) + } + } + }, + }, + { + key: 'renderBackground', + value: function () { + var it = this.props, + ot = it.x, + at = it.y, + st = it.width, + lt = it.height, + ct = it.fill, + ut = it.stroke + return React$1.createElement('rect', { stroke: ut, fill: ct, x: ot, y: at, width: st, height: lt }) + }, + }, + { + key: 'renderPanorama', + value: function () { + var it = this.props, + ot = it.x, + at = it.y, + st = it.width, + lt = it.height, + ct = it.data, + ut = it.children, + ht = it.padding, + dt = reactExports.Children.only(ut) + return dt + ? React$1.cloneElement(dt, { x: ot, y: at, width: st, height: lt, margin: ht, compact: !0, data: ct }) + : null + }, + }, + { + key: 'renderTravellerLayer', + value: function (it, ot) { + var at = this, + st = this.props, + lt = st.y, + ct = st.travellerWidth, + ut = st.height, + ht = st.traveller, + dt = Math.max(it, this.props.x), + pt = _objectSpread$d( + _objectSpread$d({}, filterProps(this.props)), + {}, + { x: dt, y: lt, width: ct, height: ut }, + ) + return React$1.createElement( + Layer, + { + tabIndex: 0, + role: 'slider', + className: 'recharts-brush-traveller', + onMouseEnter: this.handleEnterSlideOrTraveller, + onMouseLeave: this.handleLeaveSlideOrTraveller, + onMouseDown: this.travellerDragStartHandlers[ot], + onTouchStart: this.travellerDragStartHandlers[ot], + onKeyDown: function (gt) { + ;['ArrowLeft', 'ArrowRight'].includes(gt.key) && + (gt.preventDefault(), + gt.stopPropagation(), + at.handleTravellerMoveKeyboard(gt.key === 'ArrowRight' ? 1 : -1, ot)) + }, + onFocus: function () { + at.setState({ isTravellerFocused: !0 }) + }, + onBlur: function () { + at.setState({ isTravellerFocused: !1 }) + }, + style: { cursor: 'col-resize' }, + }, + nt.renderTraveller(ht, pt), + ) + }, + }, + { + key: 'renderSlide', + value: function (it, ot) { + var at = this.props, + st = at.y, + lt = at.height, + ct = at.stroke, + ut = at.travellerWidth, + ht = Math.min(it, ot) + ut, + dt = Math.max(Math.abs(ot - it) - ut, 0) + return React$1.createElement('rect', { + className: 'recharts-brush-slide', + onMouseEnter: this.handleEnterSlideOrTraveller, + onMouseLeave: this.handleLeaveSlideOrTraveller, + onMouseDown: this.handleSlideDragStart, + onTouchStart: this.handleSlideDragStart, + style: { cursor: 'move' }, + stroke: 'none', + fill: ct, + fillOpacity: 0.2, + x: ht, + y: st, + width: dt, + height: lt, + }) + }, + }, + { + key: 'renderText', + value: function () { + var it = this.props, + ot = it.startIndex, + at = it.endIndex, + st = it.y, + lt = it.height, + ct = it.travellerWidth, + ut = it.stroke, + ht = this.state, + dt = ht.startX, + pt = ht.endX, + mt = 5, + gt = { pointerEvents: 'none', fill: ut } + return React$1.createElement( + Layer, + { className: 'recharts-brush-texts' }, + React$1.createElement( + Text, + _extends$c( + { textAnchor: 'end', verticalAnchor: 'middle', x: Math.min(dt, pt) - mt, y: st + lt / 2 }, + gt, + ), + this.getTextOfTick(ot), + ), + React$1.createElement( + Text, + _extends$c( + { textAnchor: 'start', verticalAnchor: 'middle', x: Math.max(dt, pt) + ct + mt, y: st + lt / 2 }, + gt, + ), + this.getTextOfTick(at), + ), + ) + }, + }, + { + key: 'render', + value: function () { + var it = this.props, + ot = it.data, + at = it.className, + st = it.children, + lt = it.x, + ct = it.y, + ut = it.width, + ht = it.height, + dt = it.alwaysShowText, + pt = this.state, + mt = pt.startX, + gt = pt.endX, + yt = pt.isTextActive, + bt = pt.isSlideMoving, + vt = pt.isTravellerMoving, + xt = pt.isTravellerFocused + if ( + !ot || + !ot.length || + !isNumber(lt) || + !isNumber(ct) || + !isNumber(ut) || + !isNumber(ht) || + ut <= 0 || + ht <= 0 + ) + return null + var kt = classNames('recharts-brush', at), + St = React$1.Children.count(st) === 1, + Tt = generatePrefixStyle('userSelect', 'none') + return React$1.createElement( + Layer, + { + className: kt, + onMouseLeave: this.handleLeaveWrapper, + onTouchMove: this.handleTouchMove, + style: Tt, + }, + this.renderBackground(), + St && this.renderPanorama(), + this.renderSlide(mt, gt), + this.renderTravellerLayer(mt, 'startX'), + this.renderTravellerLayer(gt, 'endX'), + (yt || bt || vt || xt || dt) && this.renderText(), + ) + }, + }, + ], + [ + { + key: 'renderDefaultTraveller', + value: function (it) { + var ot = it.x, + at = it.y, + st = it.width, + lt = it.height, + ct = it.stroke, + ut = Math.floor(at + lt / 2) - 1 + return React$1.createElement( + React$1.Fragment, + null, + React$1.createElement('rect', { x: ot, y: at, width: st, height: lt, fill: ct, stroke: 'none' }), + React$1.createElement('line', { + x1: ot + 1, + y1: ut, + x2: ot + st - 1, + y2: ut, + fill: 'none', + stroke: '#fff', + }), + React$1.createElement('line', { + x1: ot + 1, + y1: ut + 2, + x2: ot + st - 1, + y2: ut + 2, + fill: 'none', + stroke: '#fff', + }), + ) + }, + }, + { + key: 'renderTraveller', + value: function (it, ot) { + var at + return ( + React$1.isValidElement(it) + ? (at = React$1.cloneElement(it, ot)) + : _isFunction$1(it) + ? (at = it(ot)) + : (at = nt.renderDefaultTraveller(ot)), + at + ) + }, + }, + { + key: 'getDerivedStateFromProps', + value: function (it, ot) { + var at = it.data, + st = it.width, + lt = it.x, + ct = it.travellerWidth, + ut = it.updateId, + ht = it.startIndex, + dt = it.endIndex + if (at !== ot.prevData || ut !== ot.prevUpdateId) + return _objectSpread$d( + { prevData: at, prevTravellerWidth: ct, prevUpdateId: ut, prevX: lt, prevWidth: st }, + at && at.length + ? createScale({ data: at, width: st, x: lt, travellerWidth: ct, startIndex: ht, endIndex: dt }) + : { scale: null, scaleValues: null }, + ) + if (ot.scale && (st !== ot.prevWidth || lt !== ot.prevX || ct !== ot.prevTravellerWidth)) { + ot.scale.range([lt, lt + st - ct]) + var pt = ot.scale.domain().map(function (mt) { + return ot.scale(mt) + }) + return { + prevData: at, + prevTravellerWidth: ct, + prevUpdateId: ut, + prevX: lt, + prevWidth: st, + startX: ot.scale(it.startIndex), + endX: ot.scale(it.endIndex), + scaleValues: pt, + } + } + return null + }, + }, + { + key: 'getIndexInRange', + value: function (it, ot) { + for (var at = it.length, st = 0, lt = at - 1; lt - st > 1; ) { + var ct = Math.floor((st + lt) / 2) + it[ct] > ot ? (lt = ct) : (st = ct) + } + return ot >= it[lt] ? lt : st + }, + }, + ], + ), + nt + ) + })(reactExports.PureComponent) + _defineProperty$e(Brush, 'displayName', 'Brush') + _defineProperty$e(Brush, 'defaultProps', { + height: 40, + travellerWidth: 5, + gap: 1, + fill: '#fff', + stroke: '#666', + padding: { top: 1, right: 1, bottom: 1, left: 1 }, + leaveTimeOut: 1e3, + alwaysShowText: !1, + }) + var baseEach$1 = _baseEach + function baseSome$1(tt, et) { + var nt + return ( + baseEach$1(tt, function (rt, it, ot) { + return (nt = et(rt, it, ot)), !nt + }), + !!nt + ) + } + var _baseSome = baseSome$1, + arraySome = _arraySome, + baseIteratee$4 = _baseIteratee, + baseSome = _baseSome, + isArray$1 = isArray_1, + isIterateeCall$1 = _isIterateeCall + function some(tt, et, nt) { + var rt = isArray$1(tt) ? arraySome : baseSome + return nt && isIterateeCall$1(tt, et, nt) && (et = void 0), rt(tt, baseIteratee$4(et)) + } + var some_1 = some + const _some = getDefaultExportFromCjs(some_1) + var ifOverflowMatches = function (et, nt) { + var rt = et.alwaysShow, + it = et.ifOverflow + return rt && (it = 'extendDomain'), it === nt + } + function arrayEvery$1(tt, et) { + for (var nt = -1, rt = tt == null ? 0 : tt.length; ++nt < rt; ) if (!et(tt[nt], nt, tt)) return !1 + return !0 + } + var _arrayEvery = arrayEvery$1, + baseEach = _baseEach + function baseEvery$1(tt, et) { + var nt = !0 + return ( + baseEach(tt, function (rt, it, ot) { + return (nt = !!et(rt, it, ot)), nt + }), + nt + ) + } + var _baseEvery = baseEvery$1, + arrayEvery = _arrayEvery, + baseEvery = _baseEvery, + baseIteratee$3 = _baseIteratee, + isArray = isArray_1, + isIterateeCall = _isIterateeCall + function every(tt, et, nt) { + var rt = isArray(tt) ? arrayEvery : baseEvery + return nt && isIterateeCall(tt, et, nt) && (et = void 0), rt(tt, baseIteratee$3(et)) + } + var every_1 = every + const _every = getDefaultExportFromCjs(every_1) + var baseAssignValue = _baseAssignValue, + baseForOwn = _baseForOwn, + baseIteratee$2 = _baseIteratee + function mapValues(tt, et) { + var nt = {} + return ( + (et = baseIteratee$2(et)), + baseForOwn(tt, function (rt, it, ot) { + baseAssignValue(nt, it, et(rt, it, ot)) + }), + nt + ) + } + var mapValues_1 = mapValues + const _mapValues = getDefaultExportFromCjs(mapValues_1) + function _typeof$d(tt) { + '@babel/helpers - typeof' + return ( + (_typeof$d = + typeof Symbol == 'function' && typeof Symbol.iterator == 'symbol' + ? function (et) { + return typeof et + } + : function (et) { + return et && typeof Symbol == 'function' && et.constructor === Symbol && et !== Symbol.prototype + ? 'symbol' + : typeof et + }), + _typeof$d(tt) + ) + } + var _excluded$6 = ['x', 'y'] + function _extends$b() { + return ( + (_extends$b = Object.assign + ? Object.assign.bind() + : function (tt) { + for (var et = 1; et < arguments.length; et++) { + var nt = arguments[et] + for (var rt in nt) Object.prototype.hasOwnProperty.call(nt, rt) && (tt[rt] = nt[rt]) + } + return tt + }), + _extends$b.apply(this, arguments) + ) + } + function ownKeys$c(tt, et) { + var nt = Object.keys(tt) + if (Object.getOwnPropertySymbols) { + var rt = Object.getOwnPropertySymbols(tt) + et && + (rt = rt.filter(function (it) { + return Object.getOwnPropertyDescriptor(tt, it).enumerable + })), + nt.push.apply(nt, rt) + } + return nt + } + function _objectSpread$c(tt) { + for (var et = 1; et < arguments.length; et++) { + var nt = arguments[et] != null ? arguments[et] : {} + et % 2 + ? ownKeys$c(Object(nt), !0).forEach(function (rt) { + _defineProperty$d(tt, rt, nt[rt]) + }) + : Object.getOwnPropertyDescriptors + ? Object.defineProperties(tt, Object.getOwnPropertyDescriptors(nt)) + : ownKeys$c(Object(nt)).forEach(function (rt) { + Object.defineProperty(tt, rt, Object.getOwnPropertyDescriptor(nt, rt)) + }) + } + return tt + } + function _defineProperty$d(tt, et, nt) { + return ( + (et = _toPropertyKey$c(et)), + et in tt + ? Object.defineProperty(tt, et, { value: nt, enumerable: !0, configurable: !0, writable: !0 }) + : (tt[et] = nt), + tt + ) + } + function _toPropertyKey$c(tt) { + var et = _toPrimitive$c(tt, 'string') + return _typeof$d(et) === 'symbol' ? et : String(et) + } + function _toPrimitive$c(tt, et) { + if (_typeof$d(tt) !== 'object' || tt === null) return tt + var nt = tt[Symbol.toPrimitive] + if (nt !== void 0) { + var rt = nt.call(tt, et || 'default') + if (_typeof$d(rt) !== 'object') return rt + throw new TypeError('@@toPrimitive must return a primitive value.') + } + return (et === 'string' ? String : Number)(tt) + } + function _objectWithoutProperties$6(tt, et) { + if (tt == null) return {} + var nt = _objectWithoutPropertiesLoose$6(tt, et), + rt, + it + if (Object.getOwnPropertySymbols) { + var ot = Object.getOwnPropertySymbols(tt) + for (it = 0; it < ot.length; it++) + (rt = ot[it]), !(et.indexOf(rt) >= 0) && Object.prototype.propertyIsEnumerable.call(tt, rt) && (nt[rt] = tt[rt]) + } + return nt + } + function _objectWithoutPropertiesLoose$6(tt, et) { + if (tt == null) return {} + var nt = {}, + rt = Object.keys(tt), + it, + ot + for (ot = 0; ot < rt.length; ot++) (it = rt[ot]), !(et.indexOf(it) >= 0) && (nt[it] = tt[it]) + return nt + } + function typeguardBarRectangleProps(tt, et) { + var nt = tt.x, + rt = tt.y, + it = _objectWithoutProperties$6(tt, _excluded$6), + ot = ''.concat(nt), + at = parseInt(ot, 10), + st = ''.concat(rt), + lt = parseInt(st, 10), + ct = ''.concat(et.height || it.height), + ut = parseInt(ct, 10), + ht = ''.concat(et.width || it.width), + dt = parseInt(ht, 10) + return _objectSpread$c( + _objectSpread$c( + _objectSpread$c(_objectSpread$c(_objectSpread$c({}, et), it), at ? { x: at } : {}), + lt ? { y: lt } : {}, + ), + {}, + { height: ut, width: dt, name: et.name, radius: et.radius }, + ) + } + function BarRectangle(tt) { + return React$1.createElement( + Shape, + _extends$b( + { shapeType: 'rectangle', propTransformer: typeguardBarRectangleProps, activeClassName: 'recharts-active-bar' }, + tt, + ), + ) + } + var _excluded$5 = ['value', 'background'] + function _typeof$c(tt) { + '@babel/helpers - typeof' + return ( + (_typeof$c = + typeof Symbol == 'function' && typeof Symbol.iterator == 'symbol' + ? function (et) { + return typeof et + } + : function (et) { + return et && typeof Symbol == 'function' && et.constructor === Symbol && et !== Symbol.prototype + ? 'symbol' + : typeof et + }), + _typeof$c(tt) + ) + } + function _objectWithoutProperties$5(tt, et) { + if (tt == null) return {} + var nt = _objectWithoutPropertiesLoose$5(tt, et), + rt, + it + if (Object.getOwnPropertySymbols) { + var ot = Object.getOwnPropertySymbols(tt) + for (it = 0; it < ot.length; it++) + (rt = ot[it]), !(et.indexOf(rt) >= 0) && Object.prototype.propertyIsEnumerable.call(tt, rt) && (nt[rt] = tt[rt]) + } + return nt + } + function _objectWithoutPropertiesLoose$5(tt, et) { + if (tt == null) return {} + var nt = {}, + rt = Object.keys(tt), + it, + ot + for (ot = 0; ot < rt.length; ot++) (it = rt[ot]), !(et.indexOf(it) >= 0) && (nt[it] = tt[it]) + return nt + } + function _extends$a() { + return ( + (_extends$a = Object.assign + ? Object.assign.bind() + : function (tt) { + for (var et = 1; et < arguments.length; et++) { + var nt = arguments[et] + for (var rt in nt) Object.prototype.hasOwnProperty.call(nt, rt) && (tt[rt] = nt[rt]) + } + return tt + }), + _extends$a.apply(this, arguments) + ) + } + function ownKeys$b(tt, et) { + var nt = Object.keys(tt) + if (Object.getOwnPropertySymbols) { + var rt = Object.getOwnPropertySymbols(tt) + et && + (rt = rt.filter(function (it) { + return Object.getOwnPropertyDescriptor(tt, it).enumerable + })), + nt.push.apply(nt, rt) + } + return nt + } + function _objectSpread$b(tt) { + for (var et = 1; et < arguments.length; et++) { + var nt = arguments[et] != null ? arguments[et] : {} + et % 2 + ? ownKeys$b(Object(nt), !0).forEach(function (rt) { + _defineProperty$c(tt, rt, nt[rt]) + }) + : Object.getOwnPropertyDescriptors + ? Object.defineProperties(tt, Object.getOwnPropertyDescriptors(nt)) + : ownKeys$b(Object(nt)).forEach(function (rt) { + Object.defineProperty(tt, rt, Object.getOwnPropertyDescriptor(nt, rt)) + }) + } + return tt + } + function _classCallCheck$8(tt, et) { + if (!(tt instanceof et)) throw new TypeError('Cannot call a class as a function') + } + function _defineProperties$8(tt, et) { + for (var nt = 0; nt < et.length; nt++) { + var rt = et[nt] + ;(rt.enumerable = rt.enumerable || !1), + (rt.configurable = !0), + 'value' in rt && (rt.writable = !0), + Object.defineProperty(tt, _toPropertyKey$b(rt.key), rt) + } + } + function _createClass$8(tt, et, nt) { + return ( + et && _defineProperties$8(tt.prototype, et), + nt && _defineProperties$8(tt, nt), + Object.defineProperty(tt, 'prototype', { writable: !1 }), + tt + ) + } + function _inherits$6(tt, et) { + if (typeof et != 'function' && et !== null) + throw new TypeError('Super expression must either be null or a function') + ;(tt.prototype = Object.create(et && et.prototype, { constructor: { value: tt, writable: !0, configurable: !0 } })), + Object.defineProperty(tt, 'prototype', { writable: !1 }), + et && _setPrototypeOf$6(tt, et) + } + function _setPrototypeOf$6(tt, et) { + return ( + (_setPrototypeOf$6 = Object.setPrototypeOf + ? Object.setPrototypeOf.bind() + : function (rt, it) { + return (rt.__proto__ = it), rt + }), + _setPrototypeOf$6(tt, et) + ) + } + function _createSuper$6(tt) { + var et = _isNativeReflectConstruct$6() + return function () { + var rt = _getPrototypeOf$6(tt), + it + if (et) { + var ot = _getPrototypeOf$6(this).constructor + it = Reflect.construct(rt, arguments, ot) + } else it = rt.apply(this, arguments) + return _possibleConstructorReturn$6(this, it) + } + } + function _possibleConstructorReturn$6(tt, et) { + if (et && (_typeof$c(et) === 'object' || typeof et == 'function')) return et + if (et !== void 0) throw new TypeError('Derived constructors may only return object or undefined') + return _assertThisInitialized$6(tt) + } + function _assertThisInitialized$6(tt) { + if (tt === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called") + return tt + } + function _isNativeReflectConstruct$6() { + if (typeof Reflect > 'u' || !Reflect.construct || Reflect.construct.sham) return !1 + if (typeof Proxy == 'function') return !0 + try { + return Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})), !0 + } catch { + return !1 + } + } + function _getPrototypeOf$6(tt) { + return ( + (_getPrototypeOf$6 = Object.setPrototypeOf + ? Object.getPrototypeOf.bind() + : function (nt) { + return nt.__proto__ || Object.getPrototypeOf(nt) + }), + _getPrototypeOf$6(tt) + ) + } + function _defineProperty$c(tt, et, nt) { + return ( + (et = _toPropertyKey$b(et)), + et in tt + ? Object.defineProperty(tt, et, { value: nt, enumerable: !0, configurable: !0, writable: !0 }) + : (tt[et] = nt), + tt + ) + } + function _toPropertyKey$b(tt) { + var et = _toPrimitive$b(tt, 'string') + return _typeof$c(et) === 'symbol' ? et : String(et) + } + function _toPrimitive$b(tt, et) { + if (_typeof$c(tt) !== 'object' || tt === null) return tt + var nt = tt[Symbol.toPrimitive] + if (nt !== void 0) { + var rt = nt.call(tt, et || 'default') + if (_typeof$c(rt) !== 'object') return rt + throw new TypeError('@@toPrimitive must return a primitive value.') + } + return (et === 'string' ? String : Number)(tt) + } + var Bar = (function (tt) { + _inherits$6(nt, tt) + var et = _createSuper$6(nt) + function nt() { + var rt + _classCallCheck$8(this, nt) + for (var it = arguments.length, ot = new Array(it), at = 0; at < it; at++) ot[at] = arguments[at] + return ( + (rt = et.call.apply(et, [this].concat(ot))), + _defineProperty$c(_assertThisInitialized$6(rt), 'state', { isAnimationFinished: !1 }), + _defineProperty$c(_assertThisInitialized$6(rt), 'id', uniqueId('recharts-bar-')), + _defineProperty$c(_assertThisInitialized$6(rt), 'handleAnimationEnd', function () { + var st = rt.props.onAnimationEnd + rt.setState({ isAnimationFinished: !0 }), st && st() + }), + _defineProperty$c(_assertThisInitialized$6(rt), 'handleAnimationStart', function () { + var st = rt.props.onAnimationStart + rt.setState({ isAnimationFinished: !1 }), st && st() + }), + rt + ) + } + return ( + _createClass$8( + nt, + [ + { + key: 'renderRectanglesStatically', + value: function (it) { + var ot = this, + at = this.props, + st = at.shape, + lt = at.dataKey, + ct = at.activeIndex, + ut = at.activeBar, + ht = filterProps(this.props) + return ( + it && + it.map(function (dt, pt) { + var mt = pt === ct, + gt = mt ? ut : st, + yt = _objectSpread$b( + _objectSpread$b(_objectSpread$b({}, ht), dt), + {}, + { + isActive: mt, + option: gt, + index: pt, + dataKey: lt, + onAnimationStart: ot.handleAnimationStart, + onAnimationEnd: ot.handleAnimationEnd, + }, + ) + return React$1.createElement( + Layer, + _extends$a({ className: 'recharts-bar-rectangle' }, adaptEventsOfChild(ot.props, dt, pt), { + key: 'rectangle-'.concat(pt), + }), + React$1.createElement(BarRectangle, yt), + ) + }) + ) + }, + }, + { + key: 'renderRectanglesWithAnimation', + value: function () { + var it = this, + ot = this.props, + at = ot.data, + st = ot.layout, + lt = ot.isAnimationActive, + ct = ot.animationBegin, + ut = ot.animationDuration, + ht = ot.animationEasing, + dt = ot.animationId, + pt = this.state.prevData + return React$1.createElement( + Animate, + { + begin: ct, + duration: ut, + isActive: lt, + easing: ht, + from: { t: 0 }, + to: { t: 1 }, + key: 'bar-'.concat(dt), + onAnimationEnd: this.handleAnimationEnd, + onAnimationStart: this.handleAnimationStart, + }, + function (mt) { + var gt = mt.t, + yt = at.map(function (bt, vt) { + var xt = pt && pt[vt] + if (xt) { + var kt = interpolateNumber$2(xt.x, bt.x), + St = interpolateNumber$2(xt.y, bt.y), + Tt = interpolateNumber$2(xt.width, bt.width), + At = interpolateNumber$2(xt.height, bt.height) + return _objectSpread$b( + _objectSpread$b({}, bt), + {}, + { x: kt(gt), y: St(gt), width: Tt(gt), height: At(gt) }, + ) + } + if (st === 'horizontal') { + var Et = interpolateNumber$2(0, bt.height), + $t = Et(gt) + return _objectSpread$b(_objectSpread$b({}, bt), {}, { y: bt.y + bt.height - $t, height: $t }) + } + var Dt = interpolateNumber$2(0, bt.width), + jt = Dt(gt) + return _objectSpread$b(_objectSpread$b({}, bt), {}, { width: jt }) + }) + return React$1.createElement(Layer, null, it.renderRectanglesStatically(yt)) + }, + ) + }, + }, + { + key: 'renderRectangles', + value: function () { + var it = this.props, + ot = it.data, + at = it.isAnimationActive, + st = this.state.prevData + return at && ot && ot.length && (!st || !_isEqual(st, ot)) + ? this.renderRectanglesWithAnimation() + : this.renderRectanglesStatically(ot) + }, + }, + { + key: 'renderBackground', + value: function () { + var it = this, + ot = this.props, + at = ot.data, + st = ot.dataKey, + lt = ot.activeIndex, + ct = filterProps(this.props.background) + return at.map(function (ut, ht) { + ut.value + var dt = ut.background, + pt = _objectWithoutProperties$5(ut, _excluded$5) + if (!dt) return null + var mt = _objectSpread$b( + _objectSpread$b( + _objectSpread$b(_objectSpread$b(_objectSpread$b({}, pt), {}, { fill: '#eee' }, dt), ct), + adaptEventsOfChild(it.props, ut, ht), + ), + {}, + { + onAnimationStart: it.handleAnimationStart, + onAnimationEnd: it.handleAnimationEnd, + dataKey: st, + index: ht, + key: 'background-bar-'.concat(ht), + className: 'recharts-bar-background-rectangle', + }, + ) + return React$1.createElement( + BarRectangle, + _extends$a({ option: it.props.background, isActive: ht === lt }, mt), + ) + }) + }, + }, + { + key: 'renderErrorBar', + value: function (it, ot) { + if (this.props.isAnimationActive && !this.state.isAnimationFinished) return null + var at = this.props, + st = at.data, + lt = at.xAxis, + ct = at.yAxis, + ut = at.layout, + ht = at.children, + dt = findAllByType(ht, ErrorBar) + if (!dt) return null + var pt = ut === 'vertical' ? st[0].height / 2 : st[0].width / 2, + mt = function (bt, vt) { + var xt = Array.isArray(bt.value) ? bt.value[1] : bt.value + return { x: bt.x, y: bt.y, value: xt, errorVal: getValueByDataKey(bt, vt) } + }, + gt = { clipPath: it ? 'url(#clipPath-'.concat(ot, ')') : null } + return React$1.createElement( + Layer, + gt, + dt.map(function (yt, bt) { + return React$1.cloneElement(yt, { + key: 'error-bar-'.concat(bt), + data: st, + xAxis: lt, + yAxis: ct, + layout: ut, + offset: pt, + dataPointFormatter: mt, + }) + }), + ) + }, + }, + { + key: 'render', + value: function () { + var it = this.props, + ot = it.hide, + at = it.data, + st = it.className, + lt = it.xAxis, + ct = it.yAxis, + ut = it.left, + ht = it.top, + dt = it.width, + pt = it.height, + mt = it.isAnimationActive, + gt = it.background, + yt = it.id + if (ot || !at || !at.length) return null + var bt = this.state.isAnimationFinished, + vt = classNames('recharts-bar', st), + xt = lt && lt.allowDataOverflow, + kt = ct && ct.allowDataOverflow, + St = xt || kt, + Tt = _isNil(yt) ? this.id : yt + return React$1.createElement( + Layer, + { className: vt }, + xt || kt + ? React$1.createElement( + 'defs', + null, + React$1.createElement( + 'clipPath', + { id: 'clipPath-'.concat(Tt) }, + React$1.createElement('rect', { + x: xt ? ut : ut - dt / 2, + y: kt ? ht : ht - pt / 2, + width: xt ? dt : dt * 2, + height: kt ? pt : pt * 2, + }), + ), + ) + : null, + React$1.createElement( + Layer, + { className: 'recharts-bar-rectangles', clipPath: St ? 'url(#clipPath-'.concat(Tt, ')') : null }, + gt ? this.renderBackground() : null, + this.renderRectangles(), + ), + this.renderErrorBar(St, Tt), + (!mt || bt) && LabelList.renderCallByParent(this.props, at), + ) + }, + }, + ], + [ + { + key: 'getDerivedStateFromProps', + value: function (it, ot) { + return it.animationId !== ot.prevAnimationId + ? { prevAnimationId: it.animationId, curData: it.data, prevData: ot.curData } + : it.data !== ot.curData + ? { curData: it.data } + : null + }, + }, + ], + ), + nt + ) + })(reactExports.PureComponent) + _defineProperty$c(Bar, 'displayName', 'Bar') + _defineProperty$c(Bar, 'defaultProps', { + xAxisId: 0, + yAxisId: 0, + legendType: 'rect', + minPointSize: 0, + hide: !1, + data: [], + layout: 'vertical', + activeBar: !0, + isAnimationActive: !Global.isSsr, + animationBegin: 0, + animationDuration: 400, + animationEasing: 'ease', + }) + _defineProperty$c(Bar, 'getComposedData', function (tt) { + var et = tt.props, + nt = tt.item, + rt = tt.barPosition, + it = tt.bandSize, + ot = tt.xAxis, + at = tt.yAxis, + st = tt.xAxisTicks, + lt = tt.yAxisTicks, + ct = tt.stackedData, + ut = tt.dataStartIndex, + ht = tt.displayedData, + dt = tt.offset, + pt = findPositionOfBar(rt, nt) + if (!pt) return null + var mt = et.layout, + gt = nt.props, + yt = gt.dataKey, + bt = gt.children, + vt = gt.minPointSize, + xt = mt === 'horizontal' ? at : ot, + kt = ct ? xt.scale.domain() : null, + St = getBaseValueOfBar({ numericAxis: xt }), + Tt = findAllByType(bt, Cell), + At = ht.map(function (Et, $t) { + var Dt, jt, Pt, Ct, wt, It + if ( + (ct + ? (Dt = truncateByDomain(ct[ut + $t], kt)) + : ((Dt = getValueByDataKey(Et, yt)), _isArray$1(Dt) || (Dt = [St, Dt])), + mt === 'horizontal') + ) { + var Ot, + Wt = [at.scale(Dt[0]), at.scale(Dt[1])], + zt = Wt[0], + Ft = Wt[1] + ;(jt = getCateCoordinateOfBar({ + axis: ot, + ticks: st, + bandSize: it, + offset: pt.offset, + entry: Et, + index: $t, + })), + (Pt = (Ot = Ft ?? zt) !== null && Ot !== void 0 ? Ot : void 0), + (Ct = pt.size) + var Nt = zt - Ft + if ( + ((wt = Number.isNaN(Nt) ? 0 : Nt), + (It = { x: jt, y: at.y, width: Ct, height: at.height }), + Math.abs(vt) > 0 && Math.abs(wt) < Math.abs(vt)) + ) { + var Ut = mathSign(wt || vt) * (Math.abs(vt) - Math.abs(wt)) + ;(Pt -= Ut), (wt += Ut) + } + } else { + var Mt = [ot.scale(Dt[0]), ot.scale(Dt[1])], + Ht = Mt[0], + en = Mt[1] + if ( + ((jt = Ht), + (Pt = getCateCoordinateOfBar({ + axis: at, + ticks: lt, + bandSize: it, + offset: pt.offset, + entry: Et, + index: $t, + })), + (Ct = en - Ht), + (wt = pt.size), + (It = { x: ot.x, y: Pt, width: ot.width, height: wt }), + Math.abs(vt) > 0 && Math.abs(Ct) < Math.abs(vt)) + ) { + var sn = mathSign(Ct || vt) * (Math.abs(vt) - Math.abs(Ct)) + Ct += sn + } + } + return _objectSpread$b( + _objectSpread$b( + _objectSpread$b({}, Et), + {}, + { x: jt, y: Pt, width: Ct, height: wt, value: ct ? Dt : Dt[1], payload: Et, background: It }, + Tt && Tt[$t] && Tt[$t].props, + ), + {}, + { tooltipPayload: [getTooltipItem(nt, Et)], tooltipPosition: { x: jt + Ct / 2, y: Pt + wt / 2 } }, + ) + }) + return _objectSpread$b({ data: At, layout: mt }, dt) + }) + function _typeof$b(tt) { + '@babel/helpers - typeof' + return ( + (_typeof$b = + typeof Symbol == 'function' && typeof Symbol.iterator == 'symbol' + ? function (et) { + return typeof et + } + : function (et) { + return et && typeof Symbol == 'function' && et.constructor === Symbol && et !== Symbol.prototype + ? 'symbol' + : typeof et + }), + _typeof$b(tt) + ) + } + function _classCallCheck$7(tt, et) { + if (!(tt instanceof et)) throw new TypeError('Cannot call a class as a function') + } + function _defineProperties$7(tt, et) { + for (var nt = 0; nt < et.length; nt++) { + var rt = et[nt] + ;(rt.enumerable = rt.enumerable || !1), + (rt.configurable = !0), + 'value' in rt && (rt.writable = !0), + Object.defineProperty(tt, _toPropertyKey$a(rt.key), rt) + } + } + function _createClass$7(tt, et, nt) { + return ( + et && _defineProperties$7(tt.prototype, et), + nt && _defineProperties$7(tt, nt), + Object.defineProperty(tt, 'prototype', { writable: !1 }), + tt + ) + } + function ownKeys$a(tt, et) { + var nt = Object.keys(tt) + if (Object.getOwnPropertySymbols) { + var rt = Object.getOwnPropertySymbols(tt) + et && + (rt = rt.filter(function (it) { + return Object.getOwnPropertyDescriptor(tt, it).enumerable + })), + nt.push.apply(nt, rt) + } + return nt + } + function _objectSpread$a(tt) { + for (var et = 1; et < arguments.length; et++) { + var nt = arguments[et] != null ? arguments[et] : {} + et % 2 + ? ownKeys$a(Object(nt), !0).forEach(function (rt) { + _defineProperty$b(tt, rt, nt[rt]) + }) + : Object.getOwnPropertyDescriptors + ? Object.defineProperties(tt, Object.getOwnPropertyDescriptors(nt)) + : ownKeys$a(Object(nt)).forEach(function (rt) { + Object.defineProperty(tt, rt, Object.getOwnPropertyDescriptor(nt, rt)) + }) + } + return tt + } + function _defineProperty$b(tt, et, nt) { + return ( + (et = _toPropertyKey$a(et)), + et in tt + ? Object.defineProperty(tt, et, { value: nt, enumerable: !0, configurable: !0, writable: !0 }) + : (tt[et] = nt), + tt + ) + } + function _toPropertyKey$a(tt) { + var et = _toPrimitive$a(tt, 'string') + return _typeof$b(et) === 'symbol' ? et : String(et) + } + function _toPrimitive$a(tt, et) { + if (_typeof$b(tt) !== 'object' || tt === null) return tt + var nt = tt[Symbol.toPrimitive] + if (nt !== void 0) { + var rt = nt.call(tt, et || 'default') + if (_typeof$b(rt) !== 'object') return rt + throw new TypeError('@@toPrimitive must return a primitive value.') + } + return (et === 'string' ? String : Number)(tt) + } + var formatAxisMap = function (et, nt, rt, it, ot) { + var at = et.width, + st = et.height, + lt = et.layout, + ct = et.children, + ut = Object.keys(nt), + ht = { + left: rt.left, + leftMirror: rt.left, + right: at - rt.right, + rightMirror: at - rt.right, + top: rt.top, + topMirror: rt.top, + bottom: st - rt.bottom, + bottomMirror: st - rt.bottom, + }, + dt = !!findChildByType(ct, Bar) + return ut.reduce(function (pt, mt) { + var gt = nt[mt], + yt = gt.orientation, + bt = gt.domain, + vt = gt.padding, + xt = vt === void 0 ? {} : vt, + kt = gt.mirror, + St = gt.reversed, + Tt = ''.concat(yt).concat(kt ? 'Mirror' : ''), + At, + Et, + $t, + Dt, + jt + if (gt.type === 'number' && (gt.padding === 'gap' || gt.padding === 'no-gap')) { + var Pt = bt[1] - bt[0], + Ct = 1 / 0, + wt = gt.categoricalDomain.sort() + wt.forEach(function (en, sn) { + sn > 0 && (Ct = Math.min((en || 0) - (wt[sn - 1] || 0), Ct)) + }) + var It = Ct / Pt, + Ot = gt.layout === 'vertical' ? rt.height : rt.width + if ((gt.padding === 'gap' && (At = (It * Ot) / 2), gt.padding === 'no-gap')) { + var Wt = getPercentValue(et.barCategoryGap, It * Ot), + zt = (It * Ot) / 2 + At = zt - Wt - ((zt - Wt) / Ot) * Wt + } + } + it === 'xAxis' + ? (Et = [rt.left + (xt.left || 0) + (At || 0), rt.left + rt.width - (xt.right || 0) - (At || 0)]) + : it === 'yAxis' + ? (Et = + lt === 'horizontal' + ? [rt.top + rt.height - (xt.bottom || 0), rt.top + (xt.top || 0)] + : [rt.top + (xt.top || 0) + (At || 0), rt.top + rt.height - (xt.bottom || 0) - (At || 0)]) + : (Et = gt.range), + St && (Et = [Et[1], Et[0]]) + var Ft = parseScale(gt, ot, dt), + Nt = Ft.scale, + Ut = Ft.realScaleType + Nt.domain(bt).range(Et), checkDomainOfScale(Nt) + var Mt = getTicksOfScale(Nt, _objectSpread$a(_objectSpread$a({}, gt), {}, { realScaleType: Ut })) + it === 'xAxis' + ? ((jt = (yt === 'top' && !kt) || (yt === 'bottom' && kt)), ($t = rt.left), (Dt = ht[Tt] - jt * gt.height)) + : it === 'yAxis' && + ((jt = (yt === 'left' && !kt) || (yt === 'right' && kt)), ($t = ht[Tt] - jt * gt.width), (Dt = rt.top)) + var Ht = _objectSpread$a( + _objectSpread$a(_objectSpread$a({}, gt), Mt), + {}, + { + realScaleType: Ut, + x: $t, + y: Dt, + scale: Nt, + width: it === 'xAxis' ? rt.width : gt.width, + height: it === 'yAxis' ? rt.height : gt.height, + }, + ) + return ( + (Ht.bandSize = getBandSizeOfAxis(Ht, Mt)), + !gt.hide && it === 'xAxis' + ? (ht[Tt] += (jt ? -1 : 1) * Ht.height) + : gt.hide || (ht[Tt] += (jt ? -1 : 1) * Ht.width), + _objectSpread$a(_objectSpread$a({}, pt), {}, _defineProperty$b({}, mt, Ht)) + ) + }, {}) + }, + rectWithPoints = function (et, nt) { + var rt = et.x, + it = et.y, + ot = nt.x, + at = nt.y + return { x: Math.min(rt, ot), y: Math.min(it, at), width: Math.abs(ot - rt), height: Math.abs(at - it) } + }, + rectWithCoords = function (et) { + var nt = et.x1, + rt = et.y1, + it = et.x2, + ot = et.y2 + return rectWithPoints({ x: nt, y: rt }, { x: it, y: ot }) + }, + ScaleHelper = (function () { + function tt(et) { + _classCallCheck$7(this, tt), (this.scale = et) + } + return ( + _createClass$7( + tt, + [ + { + key: 'domain', + get: function () { + return this.scale.domain + }, + }, + { + key: 'range', + get: function () { + return this.scale.range + }, + }, + { + key: 'rangeMin', + get: function () { + return this.range()[0] + }, + }, + { + key: 'rangeMax', + get: function () { + return this.range()[1] + }, + }, + { + key: 'bandwidth', + get: function () { + return this.scale.bandwidth + }, + }, + { + key: 'apply', + value: function (nt) { + var rt = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, + it = rt.bandAware, + ot = rt.position + if (nt !== void 0) { + if (ot) + switch (ot) { + case 'start': + return this.scale(nt) + case 'middle': { + var at = this.bandwidth ? this.bandwidth() / 2 : 0 + return this.scale(nt) + at + } + case 'end': { + var st = this.bandwidth ? this.bandwidth() : 0 + return this.scale(nt) + st + } + default: + return this.scale(nt) + } + if (it) { + var lt = this.bandwidth ? this.bandwidth() / 2 : 0 + return this.scale(nt) + lt + } + return this.scale(nt) + } + }, + }, + { + key: 'isInRange', + value: function (nt) { + var rt = this.range(), + it = rt[0], + ot = rt[rt.length - 1] + return it <= ot ? nt >= it && nt <= ot : nt >= ot && nt <= it + }, + }, + ], + [ + { + key: 'create', + value: function (nt) { + return new tt(nt) + }, + }, + ], + ), + tt + ) + })() + _defineProperty$b(ScaleHelper, 'EPS', 1e-4) + var createLabeledScales = function (et) { + var nt = Object.keys(et).reduce(function (rt, it) { + return _objectSpread$a(_objectSpread$a({}, rt), {}, _defineProperty$b({}, it, ScaleHelper.create(et[it]))) + }, {}) + return _objectSpread$a( + _objectSpread$a({}, nt), + {}, + { + apply: function (it) { + var ot = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, + at = ot.bandAware, + st = ot.position + return _mapValues(it, function (lt, ct) { + return nt[ct].apply(lt, { bandAware: at, position: st }) + }) + }, + isInRange: function (it) { + return _every(it, function (ot, at) { + return nt[at].isInRange(ot) + }) + }, + }, + ) + } + function normalizeAngle(tt) { + return ((tt % 180) + 180) % 180 + } + var getAngledRectangleWidth = function (et) { + var nt = et.width, + rt = et.height, + it = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0, + ot = normalizeAngle(it), + at = (ot * Math.PI) / 180, + st = Math.atan(rt / nt), + lt = at > st && at < Math.PI - st ? rt / Math.sin(at) : nt / Math.cos(at) + return Math.abs(lt) + } + function _typeof$a(tt) { + '@babel/helpers - typeof' + return ( + (_typeof$a = + typeof Symbol == 'function' && typeof Symbol.iterator == 'symbol' + ? function (et) { + return typeof et + } + : function (et) { + return et && typeof Symbol == 'function' && et.constructor === Symbol && et !== Symbol.prototype + ? 'symbol' + : typeof et + }), + _typeof$a(tt) + ) + } + function ownKeys$9(tt, et) { + var nt = Object.keys(tt) + if (Object.getOwnPropertySymbols) { + var rt = Object.getOwnPropertySymbols(tt) + et && + (rt = rt.filter(function (it) { + return Object.getOwnPropertyDescriptor(tt, it).enumerable + })), + nt.push.apply(nt, rt) + } + return nt + } + function _objectSpread$9(tt) { + for (var et = 1; et < arguments.length; et++) { + var nt = arguments[et] != null ? arguments[et] : {} + et % 2 + ? ownKeys$9(Object(nt), !0).forEach(function (rt) { + _defineProperty$a(tt, rt, nt[rt]) + }) + : Object.getOwnPropertyDescriptors + ? Object.defineProperties(tt, Object.getOwnPropertyDescriptors(nt)) + : ownKeys$9(Object(nt)).forEach(function (rt) { + Object.defineProperty(tt, rt, Object.getOwnPropertyDescriptor(nt, rt)) + }) + } + return tt + } + function _defineProperty$a(tt, et, nt) { + return ( + (et = _toPropertyKey$9(et)), + et in tt + ? Object.defineProperty(tt, et, { value: nt, enumerable: !0, configurable: !0, writable: !0 }) + : (tt[et] = nt), + tt + ) + } + function _toPropertyKey$9(tt) { + var et = _toPrimitive$9(tt, 'string') + return _typeof$a(et) === 'symbol' ? et : String(et) + } + function _toPrimitive$9(tt, et) { + if (_typeof$a(tt) !== 'object' || tt === null) return tt + var nt = tt[Symbol.toPrimitive] + if (nt !== void 0) { + var rt = nt.call(tt, et || 'default') + if (_typeof$a(rt) !== 'object') return rt + throw new TypeError('@@toPrimitive must return a primitive value.') + } + return (et === 'string' ? String : Number)(tt) + } + function _slicedToArray$2(tt, et) { + return ( + _arrayWithHoles$2(tt) || + _iterableToArrayLimit$2(tt, et) || + _unsupportedIterableToArray$6(tt, et) || + _nonIterableRest$2() + ) + } + function _nonIterableRest$2() { + throw new TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`) + } + function _unsupportedIterableToArray$6(tt, et) { + if (tt) { + if (typeof tt == 'string') return _arrayLikeToArray$6(tt, et) + var nt = Object.prototype.toString.call(tt).slice(8, -1) + if ((nt === 'Object' && tt.constructor && (nt = tt.constructor.name), nt === 'Map' || nt === 'Set')) + return Array.from(tt) + if (nt === 'Arguments' || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(nt)) return _arrayLikeToArray$6(tt, et) + } + } + function _arrayLikeToArray$6(tt, et) { + ;(et == null || et > tt.length) && (et = tt.length) + for (var nt = 0, rt = new Array(et); nt < et; nt++) rt[nt] = tt[nt] + return rt + } + function _iterableToArrayLimit$2(tt, et) { + var nt = tt == null ? null : (typeof Symbol < 'u' && tt[Symbol.iterator]) || tt['@@iterator'] + if (nt != null) { + var rt, + it, + ot, + at, + st = [], + lt = !0, + ct = !1 + try { + if (((ot = (nt = nt.call(tt)).next), et === 0)) { + if (Object(nt) !== nt) return + lt = !1 + } else for (; !(lt = (rt = ot.call(nt)).done) && (st.push(rt.value), st.length !== et); lt = !0); + } catch (ut) { + ;(ct = !0), (it = ut) + } finally { + try { + if (!lt && nt.return != null && ((at = nt.return()), Object(at) !== at)) return + } finally { + if (ct) throw it + } + } + return st + } + } + function _arrayWithHoles$2(tt) { + if (Array.isArray(tt)) return tt + } + function _extends$9() { + return ( + (_extends$9 = Object.assign + ? Object.assign.bind() + : function (tt) { + for (var et = 1; et < arguments.length; et++) { + var nt = arguments[et] + for (var rt in nt) Object.prototype.hasOwnProperty.call(nt, rt) && (tt[rt] = nt[rt]) + } + return tt + }), + _extends$9.apply(this, arguments) + ) + } + var renderLine = function (et, nt) { + var rt + return ( + React$1.isValidElement(et) + ? (rt = React$1.cloneElement(et, nt)) + : _isFunction$1(et) + ? (rt = et(nt)) + : (rt = React$1.createElement('line', _extends$9({}, nt, { className: 'recharts-reference-line-line' }))), + rt + ) + }, + getEndPoints = function (et, nt, rt, it, ot) { + var at = ot.viewBox, + st = at.x, + lt = at.y, + ct = at.width, + ut = at.height, + ht = ot.position + if (rt) { + var dt = ot.y, + pt = ot.yAxis.orientation, + mt = et.y.apply(dt, { position: ht }) + if (ifOverflowMatches(ot, 'discard') && !et.y.isInRange(mt)) return null + var gt = [ + { x: st + ct, y: mt }, + { x: st, y: mt }, + ] + return pt === 'left' ? gt.reverse() : gt + } + if (nt) { + var yt = ot.x, + bt = ot.xAxis.orientation, + vt = et.x.apply(yt, { position: ht }) + if (ifOverflowMatches(ot, 'discard') && !et.x.isInRange(vt)) return null + var xt = [ + { x: vt, y: lt + ut }, + { x: vt, y: lt }, + ] + return bt === 'top' ? xt.reverse() : xt + } + if (it) { + var kt = ot.segment, + St = kt.map(function (Tt) { + return et.apply(Tt, { position: ht }) + }) + return ifOverflowMatches(ot, 'discard') && + _some(St, function (Tt) { + return !et.isInRange(Tt) + }) + ? null + : St + } + return null + } + function ReferenceLine(tt) { + var et = tt.x, + nt = tt.y, + rt = tt.segment, + it = tt.xAxis, + ot = tt.yAxis, + at = tt.shape, + st = tt.className, + lt = tt.alwaysShow, + ct = tt.clipPathId + warn(lt === void 0, 'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.') + var ut = createLabeledScales({ x: it.scale, y: ot.scale }), + ht = isNumOrStr(et), + dt = isNumOrStr(nt), + pt = rt && rt.length === 2, + mt = getEndPoints(ut, ht, dt, pt, tt) + if (!mt) return null + var gt = _slicedToArray$2(mt, 2), + yt = gt[0], + bt = yt.x, + vt = yt.y, + xt = gt[1], + kt = xt.x, + St = xt.y, + Tt = ifOverflowMatches(tt, 'hidden') ? 'url(#'.concat(ct, ')') : void 0, + At = _objectSpread$9( + _objectSpread$9({ clipPath: Tt }, filterProps(tt, !0)), + {}, + { x1: bt, y1: vt, x2: kt, y2: St }, + ) + return React$1.createElement( + Layer, + { className: classNames('recharts-reference-line', st) }, + renderLine(at, At), + Label.renderCallByParent(tt, rectWithCoords({ x1: bt, y1: vt, x2: kt, y2: St })), + ) + } + ReferenceLine.displayName = 'ReferenceLine' + ReferenceLine.defaultProps = { + isFront: !1, + ifOverflow: 'discard', + xAxisId: 0, + yAxisId: 0, + fill: 'none', + stroke: '#ccc', + fillOpacity: 1, + strokeWidth: 1, + position: 'middle', + } + function _typeof$9(tt) { + '@babel/helpers - typeof' + return ( + (_typeof$9 = + typeof Symbol == 'function' && typeof Symbol.iterator == 'symbol' + ? function (et) { + return typeof et + } + : function (et) { + return et && typeof Symbol == 'function' && et.constructor === Symbol && et !== Symbol.prototype + ? 'symbol' + : typeof et + }), + _typeof$9(tt) + ) + } + function _extends$8() { + return ( + (_extends$8 = Object.assign + ? Object.assign.bind() + : function (tt) { + for (var et = 1; et < arguments.length; et++) { + var nt = arguments[et] + for (var rt in nt) Object.prototype.hasOwnProperty.call(nt, rt) && (tt[rt] = nt[rt]) + } + return tt + }), + _extends$8.apply(this, arguments) + ) + } + function ownKeys$8(tt, et) { + var nt = Object.keys(tt) + if (Object.getOwnPropertySymbols) { + var rt = Object.getOwnPropertySymbols(tt) + et && + (rt = rt.filter(function (it) { + return Object.getOwnPropertyDescriptor(tt, it).enumerable + })), + nt.push.apply(nt, rt) + } + return nt + } + function _objectSpread$8(tt) { + for (var et = 1; et < arguments.length; et++) { + var nt = arguments[et] != null ? arguments[et] : {} + et % 2 + ? ownKeys$8(Object(nt), !0).forEach(function (rt) { + _defineProperty$9(tt, rt, nt[rt]) + }) + : Object.getOwnPropertyDescriptors + ? Object.defineProperties(tt, Object.getOwnPropertyDescriptors(nt)) + : ownKeys$8(Object(nt)).forEach(function (rt) { + Object.defineProperty(tt, rt, Object.getOwnPropertyDescriptor(nt, rt)) + }) + } + return tt + } + function _defineProperty$9(tt, et, nt) { + return ( + (et = _toPropertyKey$8(et)), + et in tt + ? Object.defineProperty(tt, et, { value: nt, enumerable: !0, configurable: !0, writable: !0 }) + : (tt[et] = nt), + tt + ) + } + function _toPropertyKey$8(tt) { + var et = _toPrimitive$8(tt, 'string') + return _typeof$9(et) === 'symbol' ? et : String(et) + } + function _toPrimitive$8(tt, et) { + if (_typeof$9(tt) !== 'object' || tt === null) return tt + var nt = tt[Symbol.toPrimitive] + if (nt !== void 0) { + var rt = nt.call(tt, et || 'default') + if (_typeof$9(rt) !== 'object') return rt + throw new TypeError('@@toPrimitive must return a primitive value.') + } + return (et === 'string' ? String : Number)(tt) + } + var getCoordinate = function (et) { + var nt = et.x, + rt = et.y, + it = et.xAxis, + ot = et.yAxis, + at = createLabeledScales({ x: it.scale, y: ot.scale }), + st = at.apply({ x: nt, y: rt }, { bandAware: !0 }) + return ifOverflowMatches(et, 'discard') && !at.isInRange(st) ? null : st + } + function ReferenceDot(tt) { + var et = tt.x, + nt = tt.y, + rt = tt.r, + it = tt.alwaysShow, + ot = tt.clipPathId, + at = isNumOrStr(et), + st = isNumOrStr(nt) + if ( + (warn(it === void 0, 'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.'), + !at || !st) + ) + return null + var lt = getCoordinate(tt) + if (!lt) return null + var ct = lt.x, + ut = lt.y, + ht = tt.shape, + dt = tt.className, + pt = ifOverflowMatches(tt, 'hidden') ? 'url(#'.concat(ot, ')') : void 0, + mt = _objectSpread$8(_objectSpread$8({ clipPath: pt }, filterProps(tt, !0)), {}, { cx: ct, cy: ut }) + return React$1.createElement( + Layer, + { className: classNames('recharts-reference-dot', dt) }, + ReferenceDot.renderDot(ht, mt), + Label.renderCallByParent(tt, { x: ct - rt, y: ut - rt, width: 2 * rt, height: 2 * rt }), + ) + } + ReferenceDot.displayName = 'ReferenceDot' + ReferenceDot.defaultProps = { + isFront: !1, + ifOverflow: 'discard', + xAxisId: 0, + yAxisId: 0, + r: 10, + fill: '#fff', + stroke: '#ccc', + fillOpacity: 1, + strokeWidth: 1, + } + ReferenceDot.renderDot = function (tt, et) { + var nt + return ( + React$1.isValidElement(tt) + ? (nt = React$1.cloneElement(tt, et)) + : _isFunction$1(tt) + ? (nt = tt(et)) + : (nt = React$1.createElement( + Dot, + _extends$8({}, et, { cx: et.cx, cy: et.cy, className: 'recharts-reference-dot-dot' }), + )), + nt + ) + } + function _typeof$8(tt) { + '@babel/helpers - typeof' + return ( + (_typeof$8 = + typeof Symbol == 'function' && typeof Symbol.iterator == 'symbol' + ? function (et) { + return typeof et + } + : function (et) { + return et && typeof Symbol == 'function' && et.constructor === Symbol && et !== Symbol.prototype + ? 'symbol' + : typeof et + }), + _typeof$8(tt) + ) + } + function _extends$7() { + return ( + (_extends$7 = Object.assign + ? Object.assign.bind() + : function (tt) { + for (var et = 1; et < arguments.length; et++) { + var nt = arguments[et] + for (var rt in nt) Object.prototype.hasOwnProperty.call(nt, rt) && (tt[rt] = nt[rt]) + } + return tt + }), + _extends$7.apply(this, arguments) + ) + } + function ownKeys$7(tt, et) { + var nt = Object.keys(tt) + if (Object.getOwnPropertySymbols) { + var rt = Object.getOwnPropertySymbols(tt) + et && + (rt = rt.filter(function (it) { + return Object.getOwnPropertyDescriptor(tt, it).enumerable + })), + nt.push.apply(nt, rt) + } + return nt + } + function _objectSpread$7(tt) { + for (var et = 1; et < arguments.length; et++) { + var nt = arguments[et] != null ? arguments[et] : {} + et % 2 + ? ownKeys$7(Object(nt), !0).forEach(function (rt) { + _defineProperty$8(tt, rt, nt[rt]) + }) + : Object.getOwnPropertyDescriptors + ? Object.defineProperties(tt, Object.getOwnPropertyDescriptors(nt)) + : ownKeys$7(Object(nt)).forEach(function (rt) { + Object.defineProperty(tt, rt, Object.getOwnPropertyDescriptor(nt, rt)) + }) + } + return tt + } + function _defineProperty$8(tt, et, nt) { + return ( + (et = _toPropertyKey$7(et)), + et in tt + ? Object.defineProperty(tt, et, { value: nt, enumerable: !0, configurable: !0, writable: !0 }) + : (tt[et] = nt), + tt + ) + } + function _toPropertyKey$7(tt) { + var et = _toPrimitive$7(tt, 'string') + return _typeof$8(et) === 'symbol' ? et : String(et) + } + function _toPrimitive$7(tt, et) { + if (_typeof$8(tt) !== 'object' || tt === null) return tt + var nt = tt[Symbol.toPrimitive] + if (nt !== void 0) { + var rt = nt.call(tt, et || 'default') + if (_typeof$8(rt) !== 'object') return rt + throw new TypeError('@@toPrimitive must return a primitive value.') + } + return (et === 'string' ? String : Number)(tt) + } + var getRect = function (et, nt, rt, it, ot) { + var at = ot.x1, + st = ot.x2, + lt = ot.y1, + ct = ot.y2, + ut = ot.xAxis, + ht = ot.yAxis + if (!ut || !ht) return null + var dt = createLabeledScales({ x: ut.scale, y: ht.scale }), + pt = { + x: et ? dt.x.apply(at, { position: 'start' }) : dt.x.rangeMin, + y: rt ? dt.y.apply(lt, { position: 'start' }) : dt.y.rangeMin, + }, + mt = { + x: nt ? dt.x.apply(st, { position: 'end' }) : dt.x.rangeMax, + y: it ? dt.y.apply(ct, { position: 'end' }) : dt.y.rangeMax, + } + return ifOverflowMatches(ot, 'discard') && (!dt.isInRange(pt) || !dt.isInRange(mt)) ? null : rectWithPoints(pt, mt) + } + function ReferenceArea(tt) { + var et = tt.x1, + nt = tt.x2, + rt = tt.y1, + it = tt.y2, + ot = tt.className, + at = tt.alwaysShow, + st = tt.clipPathId + warn(at === void 0, 'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.') + var lt = isNumOrStr(et), + ct = isNumOrStr(nt), + ut = isNumOrStr(rt), + ht = isNumOrStr(it), + dt = tt.shape + if (!lt && !ct && !ut && !ht && !dt) return null + var pt = getRect(lt, ct, ut, ht, tt) + if (!pt && !dt) return null + var mt = ifOverflowMatches(tt, 'hidden') ? 'url(#'.concat(st, ')') : void 0 + return React$1.createElement( + Layer, + { className: classNames('recharts-reference-area', ot) }, + ReferenceArea.renderRect(dt, _objectSpread$7(_objectSpread$7({ clipPath: mt }, filterProps(tt, !0)), pt)), + Label.renderCallByParent(tt, pt), + ) + } + ReferenceArea.displayName = 'ReferenceArea' + ReferenceArea.defaultProps = { + isFront: !1, + ifOverflow: 'discard', + xAxisId: 0, + yAxisId: 0, + r: 10, + fill: '#ccc', + fillOpacity: 0.5, + stroke: 'none', + strokeWidth: 1, + } + ReferenceArea.renderRect = function (tt, et) { + var nt + return ( + React$1.isValidElement(tt) + ? (nt = React$1.cloneElement(tt, et)) + : _isFunction$1(tt) + ? (nt = tt(et)) + : (nt = React$1.createElement(Rectangle, _extends$7({}, et, { className: 'recharts-reference-area-rect' }))), + nt + ) + } + function getEveryNthWithCondition(tt, et, nt) { + if (et < 1) return [] + if (et === 1 && nt === void 0) return tt + for (var rt = [], it = 0; it < tt.length; it += et) + if (nt === void 0 || nt(tt[it]) === !0) rt.push(tt[it]) + else return + return rt + } + function getAngledTickWidth(tt, et, nt) { + var rt = { width: tt.width + et.width, height: tt.height + et.height } + return getAngledRectangleWidth(rt, nt) + } + function getTickBoundaries(tt, et, nt) { + var rt = nt === 'width', + it = tt.x, + ot = tt.y, + at = tt.width, + st = tt.height + return et === 1 + ? { start: rt ? it : ot, end: rt ? it + at : ot + st } + : { start: rt ? it + at : ot + st, end: rt ? it : ot } + } + function isVisible(tt, et, nt, rt, it) { + return tt * (et - (tt * nt) / 2 - rt) >= 0 && tt * (et + (tt * nt) / 2 - it) <= 0 + } + function getNumberIntervalTicks(tt, et) { + return getEveryNthWithCondition(tt, et + 1) + } + function getEquidistantTicks(tt, et, nt, rt, it) { + for (var ot = (rt || []).slice(), at = et.start, st = et.end, lt = 0, ct = 1, ut = at; ct <= ot.length; ) { + var ht = rt == null ? void 0 : rt[lt] + if (ht === void 0) return getEveryNthWithCondition(rt, ct) + var dt = nt(ht, lt), + pt = ht.coordinate, + mt = lt === 0 || isVisible(tt, pt, dt, ut, st) + mt || ((lt = 0), (ut = at), (ct += 1)), mt && ((ut = pt + tt * (dt / 2 + it)), (lt += ct)) + } + return [] + } + function _typeof$7(tt) { + '@babel/helpers - typeof' + return ( + (_typeof$7 = + typeof Symbol == 'function' && typeof Symbol.iterator == 'symbol' + ? function (et) { + return typeof et + } + : function (et) { + return et && typeof Symbol == 'function' && et.constructor === Symbol && et !== Symbol.prototype + ? 'symbol' + : typeof et + }), + _typeof$7(tt) + ) + } + function ownKeys$6(tt, et) { + var nt = Object.keys(tt) + if (Object.getOwnPropertySymbols) { + var rt = Object.getOwnPropertySymbols(tt) + et && + (rt = rt.filter(function (it) { + return Object.getOwnPropertyDescriptor(tt, it).enumerable + })), + nt.push.apply(nt, rt) + } + return nt + } + function _objectSpread$6(tt) { + for (var et = 1; et < arguments.length; et++) { + var nt = arguments[et] != null ? arguments[et] : {} + et % 2 + ? ownKeys$6(Object(nt), !0).forEach(function (rt) { + _defineProperty$7(tt, rt, nt[rt]) + }) + : Object.getOwnPropertyDescriptors + ? Object.defineProperties(tt, Object.getOwnPropertyDescriptors(nt)) + : ownKeys$6(Object(nt)).forEach(function (rt) { + Object.defineProperty(tt, rt, Object.getOwnPropertyDescriptor(nt, rt)) + }) + } + return tt + } + function _defineProperty$7(tt, et, nt) { + return ( + (et = _toPropertyKey$6(et)), + et in tt + ? Object.defineProperty(tt, et, { value: nt, enumerable: !0, configurable: !0, writable: !0 }) + : (tt[et] = nt), + tt + ) + } + function _toPropertyKey$6(tt) { + var et = _toPrimitive$6(tt, 'string') + return _typeof$7(et) === 'symbol' ? et : String(et) + } + function _toPrimitive$6(tt, et) { + if (_typeof$7(tt) !== 'object' || tt === null) return tt + var nt = tt[Symbol.toPrimitive] + if (nt !== void 0) { + var rt = nt.call(tt, et || 'default') + if (_typeof$7(rt) !== 'object') return rt + throw new TypeError('@@toPrimitive must return a primitive value.') + } + return (et === 'string' ? String : Number)(tt) + } + function getTicksEnd(tt, et, nt, rt, it) { + for (var ot = (rt || []).slice(), at = ot.length, st = et.start, lt = et.end, ct = at - 1; ct >= 0; ct--) { + var ut = ot[ct], + ht = nt(ut, ct) + if (ct === at - 1) { + var dt = tt * (ut.coordinate + (tt * ht) / 2 - lt) + ot[ct] = ut = _objectSpread$6( + _objectSpread$6({}, ut), + {}, + { tickCoord: dt > 0 ? ut.coordinate - dt * tt : ut.coordinate }, + ) + } else ot[ct] = ut = _objectSpread$6(_objectSpread$6({}, ut), {}, { tickCoord: ut.coordinate }) + var pt = isVisible(tt, ut.tickCoord, ht, st, lt) + pt && + ((lt = ut.tickCoord - tt * (ht / 2 + it)), + (ot[ct] = _objectSpread$6(_objectSpread$6({}, ut), {}, { isShow: !0 }))) + } + return ot + } + function getTicksStart(tt, et, nt, rt, it, ot) { + var at = (rt || []).slice(), + st = at.length, + lt = et.start, + ct = et.end + if (ot) { + var ut = rt[st - 1], + ht = nt(ut, st - 1), + dt = tt * (ut.coordinate + (tt * ht) / 2 - ct) + at[st - 1] = ut = _objectSpread$6( + _objectSpread$6({}, ut), + {}, + { tickCoord: dt > 0 ? ut.coordinate - dt * tt : ut.coordinate }, + ) + var pt = isVisible(tt, ut.tickCoord, ht, lt, ct) + pt && + ((ct = ut.tickCoord - tt * (ht / 2 + it)), + (at[st - 1] = _objectSpread$6(_objectSpread$6({}, ut), {}, { isShow: !0 }))) + } + for (var mt = ot ? st - 1 : st, gt = 0; gt < mt; gt++) { + var yt = at[gt], + bt = nt(yt, gt) + if (gt === 0) { + var vt = tt * (yt.coordinate - (tt * bt) / 2 - lt) + at[gt] = yt = _objectSpread$6( + _objectSpread$6({}, yt), + {}, + { tickCoord: vt < 0 ? yt.coordinate - vt * tt : yt.coordinate }, + ) + } else at[gt] = yt = _objectSpread$6(_objectSpread$6({}, yt), {}, { tickCoord: yt.coordinate }) + var xt = isVisible(tt, yt.tickCoord, bt, lt, ct) + xt && + ((lt = yt.tickCoord + tt * (bt / 2 + it)), + (at[gt] = _objectSpread$6(_objectSpread$6({}, yt), {}, { isShow: !0 }))) + } + return at + } + function getTicks(tt, et, nt) { + var rt = tt.tick, + it = tt.ticks, + ot = tt.viewBox, + at = tt.minTickGap, + st = tt.orientation, + lt = tt.interval, + ct = tt.tickFormatter, + ut = tt.unit, + ht = tt.angle + if (!it || !it.length || !rt) return [] + if (isNumber(lt) || Global.isSsr) return getNumberIntervalTicks(it, typeof lt == 'number' && isNumber(lt) ? lt : 0) + var dt = [], + pt = st === 'top' || st === 'bottom' ? 'width' : 'height', + mt = ut && pt === 'width' ? getStringSize(ut, { fontSize: et, letterSpacing: nt }) : { width: 0, height: 0 }, + gt = function (xt, kt) { + var St = _isFunction$1(ct) ? ct(xt.value, kt) : xt.value + return pt === 'width' + ? getAngledTickWidth(getStringSize(St, { fontSize: et, letterSpacing: nt }), mt, ht) + : getStringSize(St, { fontSize: et, letterSpacing: nt })[pt] + }, + yt = it.length >= 2 ? mathSign(it[1].coordinate - it[0].coordinate) : 1, + bt = getTickBoundaries(ot, yt, pt) + return lt === 'equidistantPreserveStart' + ? getEquidistantTicks(yt, bt, gt, it, at) + : (lt === 'preserveStart' || lt === 'preserveStartEnd' + ? (dt = getTicksStart(yt, bt, gt, it, at, lt === 'preserveStartEnd')) + : (dt = getTicksEnd(yt, bt, gt, it, at)), + dt.filter(function (vt) { + return vt.isShow + })) + } + var _excluded$4 = ['viewBox'], + _excluded2$2 = ['viewBox'], + _excluded3 = ['ticks'] + function _typeof$6(tt) { + '@babel/helpers - typeof' + return ( + (_typeof$6 = + typeof Symbol == 'function' && typeof Symbol.iterator == 'symbol' + ? function (et) { + return typeof et + } + : function (et) { + return et && typeof Symbol == 'function' && et.constructor === Symbol && et !== Symbol.prototype + ? 'symbol' + : typeof et + }), + _typeof$6(tt) + ) + } + function _extends$6() { + return ( + (_extends$6 = Object.assign + ? Object.assign.bind() + : function (tt) { + for (var et = 1; et < arguments.length; et++) { + var nt = arguments[et] + for (var rt in nt) Object.prototype.hasOwnProperty.call(nt, rt) && (tt[rt] = nt[rt]) + } + return tt + }), + _extends$6.apply(this, arguments) + ) + } + function ownKeys$5(tt, et) { + var nt = Object.keys(tt) + if (Object.getOwnPropertySymbols) { + var rt = Object.getOwnPropertySymbols(tt) + et && + (rt = rt.filter(function (it) { + return Object.getOwnPropertyDescriptor(tt, it).enumerable + })), + nt.push.apply(nt, rt) + } + return nt + } + function _objectSpread$5(tt) { + for (var et = 1; et < arguments.length; et++) { + var nt = arguments[et] != null ? arguments[et] : {} + et % 2 + ? ownKeys$5(Object(nt), !0).forEach(function (rt) { + _defineProperty$6(tt, rt, nt[rt]) + }) + : Object.getOwnPropertyDescriptors + ? Object.defineProperties(tt, Object.getOwnPropertyDescriptors(nt)) + : ownKeys$5(Object(nt)).forEach(function (rt) { + Object.defineProperty(tt, rt, Object.getOwnPropertyDescriptor(nt, rt)) + }) + } + return tt + } + function _objectWithoutProperties$4(tt, et) { + if (tt == null) return {} + var nt = _objectWithoutPropertiesLoose$4(tt, et), + rt, + it + if (Object.getOwnPropertySymbols) { + var ot = Object.getOwnPropertySymbols(tt) + for (it = 0; it < ot.length; it++) + (rt = ot[it]), !(et.indexOf(rt) >= 0) && Object.prototype.propertyIsEnumerable.call(tt, rt) && (nt[rt] = tt[rt]) + } + return nt + } + function _objectWithoutPropertiesLoose$4(tt, et) { + if (tt == null) return {} + var nt = {}, + rt = Object.keys(tt), + it, + ot + for (ot = 0; ot < rt.length; ot++) (it = rt[ot]), !(et.indexOf(it) >= 0) && (nt[it] = tt[it]) + return nt + } + function _classCallCheck$6(tt, et) { + if (!(tt instanceof et)) throw new TypeError('Cannot call a class as a function') + } + function _defineProperties$6(tt, et) { + for (var nt = 0; nt < et.length; nt++) { + var rt = et[nt] + ;(rt.enumerable = rt.enumerable || !1), + (rt.configurable = !0), + 'value' in rt && (rt.writable = !0), + Object.defineProperty(tt, _toPropertyKey$5(rt.key), rt) } - - float characterIndex = floor((uCharactersCount - 1.0) * greyscaled); - vec2 characterPosition = vec2(mod(characterIndex, SIZE.x), floor(characterIndex / SIZE.y)); - vec2 offset = vec2(characterPosition.x, -characterPosition.y) / SIZE; - vec2 charUV = mod(uv * (cell / SIZE), 1.0 / SIZE) - vec2(0., 1.0 / SIZE) + offset; - vec4 asciiCharacter = texture2D(uCharacters, charUV); - - asciiCharacter.rgb = uColor * asciiCharacter.r; - asciiCharacter.a = pixelized.a; - outputColor = asciiCharacter; -} -`;class ASCIIEffect extends Effect$1{constructor({characters:et=" .:,'-^=*+?!|0#X%WM@",fontSize:nt=54,cellSize:rt=16,color:it="#ffffff",invert:ot=!1}={}){const at=new Map([["uCharacters",new Uniform(new Texture)],["uCellSize",new Uniform(rt)],["uCharactersCount",new Uniform(et.length)],["uColor",new Uniform(new Color$1(it))],["uInvert",new Uniform(ot)]]);super("ASCIIEffect",fragment,{uniforms:at});const st=this.uniforms.get("uCharacters");st&&(st.value=this.createCharactersTexture(et,nt))}createCharactersTexture(et,nt){const rt=document.createElement("canvas"),it=1024,ot=16,at=it/ot;rt.width=rt.height=it;const st=new CanvasTexture(rt,void 0,RepeatWrapping,RepeatWrapping,NearestFilter,NearestFilter),lt=rt.getContext("2d");if(!lt)throw new Error("Context not available");lt.clearRect(0,0,it,it),lt.font=`${nt}px arial`,lt.textAlign="center",lt.textBaseline="middle",lt.fillStyle="#fff";for(let ct=0;ct{const at=reactExports.useMemo(()=>new ASCIIEffect({characters:tt,fontSize:et,cellSize:nt,color:rt,invert:it}),[tt,et,nt,rt,it]);return jsxRuntimeExports.jsx("primitive",{ref:ot,object:at})});var boxBlur=`#define GLSLIFY 1 -uniform float blur;uniform float blurSharpness;uniform int blurKernel;vec3 denoise(vec3 center,sampler2D tex,vec2 uv,vec2 invTexSize,float blur,float blurSharpness,int blurKernel){vec3 color;float total;vec3 col;float weight;for(int x=-blurKernel;x<=blurKernel;x++){for(int y=-blurKernel;y<=blurKernel;y++){col=textureLod(tex,uv+vec2(x,y)*invTexSize,0.).rgb;weight=1.0-abs(dot(col-center,vec3(0.25)));weight=pow(weight,blurSharpness);color+=col*weight;total+=weight;}}return color/total;}`,finalSSRShader=`#define GLSLIFY 1 -#define MODE_DEFAULT 0 -#define MODE_REFLECTIONS 1 -#define MODE_RAW_REFLECTION 2 -#define MODE_BLURRED_REFLECTIONS 3 -#define MODE_INPUT 4 -#define MODE_BLUR_MIX 5 -#define FLOAT_EPSILON 0.00001 -uniform sampler2D inputTexture;uniform sampler2D reflectionsTexture;uniform float samples; -#include -void mainImage(const in vec4 inputColor,const in vec2 uv,out vec4 outputColor){vec4 reflectionsTexel=texture2D(reflectionsTexture,vUv);ivec2 size=textureSize(reflectionsTexture,0);vec2 invTexSize=1./vec2(size.x,size.y);vec3 reflectionClr=reflectionsTexel.xyz;if(blur>FLOAT_EPSILON){vec3 blurredReflectionsColor=denoise(reflectionsTexel.rgb,reflectionsTexture,vUv,invTexSize,blur,blurSharpness,blurKernel);reflectionClr=mix(reflectionClr,blurredReflectionsColor.rgb,blur);} -#if RENDER_MODE == MODE_DEFAULT -outputColor=vec4(inputColor.rgb+reflectionClr,1.0); -#endif -#if RENDER_MODE == MODE_REFLECTIONS -outputColor=vec4(reflectionClr,1.0); -#endif -#if RENDER_MODE == MODE_RAW_REFLECTION -outputColor=vec4(reflectionsTexel.xyz,1.0); -#endif -#if RENDER_MODE == MODE_BLURRED_REFLECTIONS -outputColor=vec4(blurredReflectionsTexel.xyz,1.0); -#endif -#if RENDER_MODE == MODE_INPUT -outputColor=vec4(inputColor.xyz,1.0); -#endif -#if RENDER_MODE == MODE_BLUR_MIX -outputColor=vec4(vec3(blur),1.0); -#endif -}`,helperFunctions=`#define GLSLIFY 1 -vec3 getViewPosition(const float depth){float clipW=_projectionMatrix[2][3]*depth+_projectionMatrix[3][3];vec4 clipPosition=vec4((vec3(vUv,depth)-0.5)*2.0,1.0);clipPosition*=clipW;return(_inverseProjectionMatrix*clipPosition).xyz;}float getViewZ(const in float depth){ -#ifdef PERSPECTIVE_CAMERA -return perspectiveDepthToViewZ(depth,cameraNear,cameraFar); -#else -return orthographicDepthToViewZ(depth,cameraNear,cameraFar); -#endif -}vec3 screenSpaceToWorldSpace(const vec2 uv,const float depth){vec4 ndc=vec4((uv.x-0.5)*2.0,(uv.y-0.5)*2.0,(depth-0.5)*2.0,1.0);vec4 clip=_inverseProjectionMatrix*ndc;vec4 view=cameraMatrixWorld*(clip/clip.w);return view.xyz;} -#define Scale (vec3(0.8, 0.8, 0.8)) -#define K (19.19) -vec3 hash(vec3 a){a=fract(a*Scale);a+=dot(a,a.yxz+K);return fract((a.xxy+a.yxx)*a.zyx);}float fresnel_dielectric_cos(float cosi,float eta){float c=abs(cosi);float g=eta*eta-1.0+c*c;float result;if(g>0.0){g=sqrt(g);float A=(g-c)/(g+c);float B=(c*(g+c)-1.0)/(c*(g-c)+1.0);result=0.5*A*A*(1.0+B*B);}else{result=1.0;}return result;}float fresnel_dielectric(vec3 Incoming,vec3 Normal,float eta){float cosine=dot(Incoming,Normal);return min(1.0,5.0*fresnel_dielectric_cos(cosine,eta));}`,trCompose=`#define GLSLIFY 1 -#define INV_EULER 0.36787944117144233 -alpha=velocityDisocclusion0.5; -#ifdef boxBlur -if(needsBlur)inputColor=boxBlurredColor; -#endif -if(alpha==1.0){outputColor=accumulatedColor;}else{float m=mix(alpha,1.0,blend);if(needsBlur)m=0.0;outputColor=accumulatedColor*m+inputColor*(1.0-m);}`;class MRTMaterial extends ShaderMaterial{constructor(){super({type:"MRTMaterial",defines:{USE_UV:"",TEMPORAL_RESOLVE:""},uniforms:{opacity:new Uniform(1),normalMap:new Uniform(null),normalScale:new Uniform(new Vector2(1,1)),uvTransform:new Uniform(new Matrix3),roughness:new Uniform(1),roughnessMap:new Uniform(null)},vertexShader:` - #ifdef USE_MRT - varying vec2 vHighPrecisionZW; - #endif - #define NORMAL - #if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( TANGENTSPACE_NORMALMAP ) - varying vec3 vViewPosition; - #endif - #include - #include - #include - #include - #include - #include - #include - #include - #ifdef USE_UV - ${REVISION.replace(/\D+/g,"")>=151?"uniform mat3 uvTransform;":""} - #endif - void main() { - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( TANGENTSPACE_NORMALMAP ) - vViewPosition = - mvPosition.xyz; - #endif - #ifdef USE_MRT - vHighPrecisionZW = gl_Position.zw; - #endif - #ifdef USE_UV - vUv = ( uvTransform * vec3( uv, 1 ) ).xy; - #endif + } + function _createClass$6(tt, et, nt) { + return ( + et && _defineProperties$6(tt.prototype, et), + nt && _defineProperties$6(tt, nt), + Object.defineProperty(tt, 'prototype', { writable: !1 }), + tt + ) + } + function _inherits$5(tt, et) { + if (typeof et != 'function' && et !== null) + throw new TypeError('Super expression must either be null or a function') + ;(tt.prototype = Object.create(et && et.prototype, { constructor: { value: tt, writable: !0, configurable: !0 } })), + Object.defineProperty(tt, 'prototype', { writable: !1 }), + et && _setPrototypeOf$5(tt, et) + } + function _setPrototypeOf$5(tt, et) { + return ( + (_setPrototypeOf$5 = Object.setPrototypeOf + ? Object.setPrototypeOf.bind() + : function (rt, it) { + return (rt.__proto__ = it), rt + }), + _setPrototypeOf$5(tt, et) + ) + } + function _createSuper$5(tt) { + var et = _isNativeReflectConstruct$5() + return function () { + var rt = _getPrototypeOf$5(tt), + it + if (et) { + var ot = _getPrototypeOf$5(this).constructor + it = Reflect.construct(rt, arguments, ot) + } else it = rt.apply(this, arguments) + return _possibleConstructorReturn$5(this, it) + } + } + function _possibleConstructorReturn$5(tt, et) { + if (et && (_typeof$6(et) === 'object' || typeof et == 'function')) return et + if (et !== void 0) throw new TypeError('Derived constructors may only return object or undefined') + return _assertThisInitialized$5(tt) + } + function _assertThisInitialized$5(tt) { + if (tt === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called") + return tt + } + function _isNativeReflectConstruct$5() { + if (typeof Reflect > 'u' || !Reflect.construct || Reflect.construct.sham) return !1 + if (typeof Proxy == 'function') return !0 + try { + return Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})), !0 + } catch { + return !1 + } + } + function _getPrototypeOf$5(tt) { + return ( + (_getPrototypeOf$5 = Object.setPrototypeOf + ? Object.getPrototypeOf.bind() + : function (nt) { + return nt.__proto__ || Object.getPrototypeOf(nt) + }), + _getPrototypeOf$5(tt) + ) + } + function _defineProperty$6(tt, et, nt) { + return ( + (et = _toPropertyKey$5(et)), + et in tt + ? Object.defineProperty(tt, et, { value: nt, enumerable: !0, configurable: !0, writable: !0 }) + : (tt[et] = nt), + tt + ) + } + function _toPropertyKey$5(tt) { + var et = _toPrimitive$5(tt, 'string') + return _typeof$6(et) === 'symbol' ? et : String(et) + } + function _toPrimitive$5(tt, et) { + if (_typeof$6(tt) !== 'object' || tt === null) return tt + var nt = tt[Symbol.toPrimitive] + if (nt !== void 0) { + var rt = nt.call(tt, et || 'default') + if (_typeof$6(rt) !== 'object') return rt + throw new TypeError('@@toPrimitive must return a primitive value.') + } + return (et === 'string' ? String : Number)(tt) + } + var CartesianAxis = (function (tt) { + _inherits$5(nt, tt) + var et = _createSuper$5(nt) + function nt(rt) { + var it + return _classCallCheck$6(this, nt), (it = et.call(this, rt)), (it.state = { fontSize: '', letterSpacing: '' }), it + } + return ( + _createClass$6( + nt, + [ + { + key: 'shouldComponentUpdate', + value: function (it, ot) { + var at = it.viewBox, + st = _objectWithoutProperties$4(it, _excluded$4), + lt = this.props, + ct = lt.viewBox, + ut = _objectWithoutProperties$4(lt, _excluded2$2) + return !shallowEqual(at, ct) || !shallowEqual(st, ut) || !shallowEqual(ot, this.state) + }, + }, + { + key: 'componentDidMount', + value: function () { + var it = this.layerReference + if (it) { + var ot = it.getElementsByClassName('recharts-cartesian-axis-tick-value')[0] + ot && + this.setState({ + fontSize: window.getComputedStyle(ot).fontSize, + letterSpacing: window.getComputedStyle(ot).letterSpacing, + }) + } + }, + }, + { + key: 'getTickLineCoord', + value: function (it) { + var ot = this.props, + at = ot.x, + st = ot.y, + lt = ot.width, + ct = ot.height, + ut = ot.orientation, + ht = ot.tickSize, + dt = ot.mirror, + pt = ot.tickMargin, + mt, + gt, + yt, + bt, + vt, + xt, + kt = dt ? -1 : 1, + St = it.tickSize || ht, + Tt = isNumber(it.tickCoord) ? it.tickCoord : it.coordinate + switch (ut) { + case 'top': + ;(mt = gt = it.coordinate), (bt = st + +!dt * ct), (yt = bt - kt * St), (xt = yt - kt * pt), (vt = Tt) + break + case 'left': + ;(yt = bt = it.coordinate), (gt = at + +!dt * lt), (mt = gt - kt * St), (vt = mt - kt * pt), (xt = Tt) + break + case 'right': + ;(yt = bt = it.coordinate), (gt = at + +dt * lt), (mt = gt + kt * St), (vt = mt + kt * pt), (xt = Tt) + break + default: + ;(mt = gt = it.coordinate), (bt = st + +dt * ct), (yt = bt + kt * St), (xt = yt + kt * pt), (vt = Tt) + break + } + return { line: { x1: mt, y1: yt, x2: gt, y2: bt }, tick: { x: vt, y: xt } } + }, + }, + { + key: 'getTickTextAnchor', + value: function () { + var it = this.props, + ot = it.orientation, + at = it.mirror, + st + switch (ot) { + case 'left': + st = at ? 'start' : 'end' + break + case 'right': + st = at ? 'end' : 'start' + break + default: + st = 'middle' + break + } + return st + }, + }, + { + key: 'getTickVerticalAnchor', + value: function () { + var it = this.props, + ot = it.orientation, + at = it.mirror, + st = 'end' + switch (ot) { + case 'left': + case 'right': + st = 'middle' + break + case 'top': + st = at ? 'start' : 'end' + break + default: + st = at ? 'end' : 'start' + break + } + return st + }, + }, + { + key: 'renderAxisLine', + value: function () { + var it = this.props, + ot = it.x, + at = it.y, + st = it.width, + lt = it.height, + ct = it.orientation, + ut = it.mirror, + ht = it.axisLine, + dt = _objectSpread$5( + _objectSpread$5(_objectSpread$5({}, filterProps(this.props)), filterProps(ht)), + {}, + { fill: 'none' }, + ) + if (ct === 'top' || ct === 'bottom') { + var pt = +((ct === 'top' && !ut) || (ct === 'bottom' && ut)) + dt = _objectSpread$5( + _objectSpread$5({}, dt), + {}, + { x1: ot, y1: at + pt * lt, x2: ot + st, y2: at + pt * lt }, + ) + } else { + var mt = +((ct === 'left' && !ut) || (ct === 'right' && ut)) + dt = _objectSpread$5( + _objectSpread$5({}, dt), + {}, + { x1: ot + mt * st, y1: at, x2: ot + mt * st, y2: at + lt }, + ) + } + return React$1.createElement( + 'line', + _extends$6({}, dt, { className: classNames('recharts-cartesian-axis-line', _get(ht, 'className')) }), + ) + }, + }, + { + key: 'renderTicks', + value: function (it, ot, at) { + var st = this, + lt = this.props, + ct = lt.tickLine, + ut = lt.stroke, + ht = lt.tick, + dt = lt.tickFormatter, + pt = lt.unit, + mt = getTicks(_objectSpread$5(_objectSpread$5({}, this.props), {}, { ticks: it }), ot, at), + gt = this.getTickTextAnchor(), + yt = this.getTickVerticalAnchor(), + bt = filterProps(this.props), + vt = filterProps(ht), + xt = _objectSpread$5(_objectSpread$5({}, bt), {}, { fill: 'none' }, filterProps(ct)), + kt = mt.map(function (St, Tt) { + var At = st.getTickLineCoord(St), + Et = At.line, + $t = At.tick, + Dt = _objectSpread$5( + _objectSpread$5( + _objectSpread$5( + _objectSpread$5({ textAnchor: gt, verticalAnchor: yt }, bt), + {}, + { stroke: 'none', fill: ut }, + vt, + ), + $t, + ), + {}, + { index: Tt, payload: St, visibleTicksCount: mt.length, tickFormatter: dt }, + ) + return React$1.createElement( + Layer, + _extends$6( + { className: 'recharts-cartesian-axis-tick', key: 'tick-'.concat(Tt) }, + adaptEventsOfChild(st.props, St, Tt), + ), + ct && + React$1.createElement( + 'line', + _extends$6({}, xt, Et, { + className: classNames('recharts-cartesian-axis-tick-line', _get(ct, 'className')), + }), + ), + ht && + nt.renderTickItem( + ht, + Dt, + ''.concat(_isFunction$1(dt) ? dt(St.value, Tt) : St.value).concat(pt || ''), + ), + ) + }) + return React$1.createElement('g', { className: 'recharts-cartesian-axis-ticks' }, kt) + }, + }, + { + key: 'render', + value: function () { + var it = this, + ot = this.props, + at = ot.axisLine, + st = ot.width, + lt = ot.height, + ct = ot.ticksGenerator, + ut = ot.className, + ht = ot.hide + if (ht) return null + var dt = this.props, + pt = dt.ticks, + mt = _objectWithoutProperties$4(dt, _excluded3), + gt = pt + return ( + _isFunction$1(ct) && (gt = pt && pt.length > 0 ? ct(this.props) : ct(mt)), + st <= 0 || lt <= 0 || !gt || !gt.length + ? null + : React$1.createElement( + Layer, + { + className: classNames('recharts-cartesian-axis', ut), + ref: function (bt) { + it.layerReference = bt + }, + }, + at && this.renderAxisLine(), + this.renderTicks(gt, this.state.fontSize, this.state.letterSpacing), + Label.renderCallByParent(this.props), + ) + ) + }, + }, + ], + [ + { + key: 'renderTickItem', + value: function (it, ot, at) { + var st + return ( + React$1.isValidElement(it) + ? (st = React$1.cloneElement(it, ot)) + : _isFunction$1(it) + ? (st = it(ot)) + : (st = React$1.createElement( + Text, + _extends$6({}, ot, { className: 'recharts-cartesian-axis-tick-value' }), + at, + )), + st + ) + }, + }, + ], + ), + nt + ) + })(reactExports.Component) + _defineProperty$6(CartesianAxis, 'displayName', 'CartesianAxis') + _defineProperty$6(CartesianAxis, 'defaultProps', { + x: 0, + y: 0, + width: 0, + height: 0, + viewBox: { x: 0, y: 0, width: 0, height: 0 }, + orientation: 'bottom', + ticks: [], + stroke: '#666', + tickLine: !0, + axisLine: !0, + tick: !0, + mirror: !1, + minTickGap: 5, + tickSize: 6, + tickMargin: 2, + interval: 'preserveEnd', + }) + var _excluded$3 = ['x1', 'y1', 'x2', 'y2', 'key'], + _excluded2$1 = ['offset'] + function _typeof$5(tt) { + '@babel/helpers - typeof' + return ( + (_typeof$5 = + typeof Symbol == 'function' && typeof Symbol.iterator == 'symbol' + ? function (et) { + return typeof et + } + : function (et) { + return et && typeof Symbol == 'function' && et.constructor === Symbol && et !== Symbol.prototype + ? 'symbol' + : typeof et + }), + _typeof$5(tt) + ) + } + function _extends$5() { + return ( + (_extends$5 = Object.assign + ? Object.assign.bind() + : function (tt) { + for (var et = 1; et < arguments.length; et++) { + var nt = arguments[et] + for (var rt in nt) Object.prototype.hasOwnProperty.call(nt, rt) && (tt[rt] = nt[rt]) + } + return tt + }), + _extends$5.apply(this, arguments) + ) + } + function _objectWithoutProperties$3(tt, et) { + if (tt == null) return {} + var nt = _objectWithoutPropertiesLoose$3(tt, et), + rt, + it + if (Object.getOwnPropertySymbols) { + var ot = Object.getOwnPropertySymbols(tt) + for (it = 0; it < ot.length; it++) + (rt = ot[it]), !(et.indexOf(rt) >= 0) && Object.prototype.propertyIsEnumerable.call(tt, rt) && (nt[rt] = tt[rt]) + } + return nt + } + function _objectWithoutPropertiesLoose$3(tt, et) { + if (tt == null) return {} + var nt = {}, + rt = Object.keys(tt), + it, + ot + for (ot = 0; ot < rt.length; ot++) (it = rt[ot]), !(et.indexOf(it) >= 0) && (nt[it] = tt[it]) + return nt + } + function ownKeys$4(tt, et) { + var nt = Object.keys(tt) + if (Object.getOwnPropertySymbols) { + var rt = Object.getOwnPropertySymbols(tt) + et && + (rt = rt.filter(function (it) { + return Object.getOwnPropertyDescriptor(tt, it).enumerable + })), + nt.push.apply(nt, rt) + } + return nt + } + function _objectSpread$4(tt) { + for (var et = 1; et < arguments.length; et++) { + var nt = arguments[et] != null ? arguments[et] : {} + et % 2 + ? ownKeys$4(Object(nt), !0).forEach(function (rt) { + _defineProperty$5(tt, rt, nt[rt]) + }) + : Object.getOwnPropertyDescriptors + ? Object.defineProperties(tt, Object.getOwnPropertyDescriptors(nt)) + : ownKeys$4(Object(nt)).forEach(function (rt) { + Object.defineProperty(tt, rt, Object.getOwnPropertyDescriptor(nt, rt)) + }) + } + return tt + } + function _classCallCheck$5(tt, et) { + if (!(tt instanceof et)) throw new TypeError('Cannot call a class as a function') + } + function _defineProperties$5(tt, et) { + for (var nt = 0; nt < et.length; nt++) { + var rt = et[nt] + ;(rt.enumerable = rt.enumerable || !1), + (rt.configurable = !0), + 'value' in rt && (rt.writable = !0), + Object.defineProperty(tt, _toPropertyKey$4(rt.key), rt) + } + } + function _createClass$5(tt, et, nt) { + return ( + et && _defineProperties$5(tt.prototype, et), + nt && _defineProperties$5(tt, nt), + Object.defineProperty(tt, 'prototype', { writable: !1 }), + tt + ) + } + function _inherits$4(tt, et) { + if (typeof et != 'function' && et !== null) + throw new TypeError('Super expression must either be null or a function') + ;(tt.prototype = Object.create(et && et.prototype, { constructor: { value: tt, writable: !0, configurable: !0 } })), + Object.defineProperty(tt, 'prototype', { writable: !1 }), + et && _setPrototypeOf$4(tt, et) + } + function _setPrototypeOf$4(tt, et) { + return ( + (_setPrototypeOf$4 = Object.setPrototypeOf + ? Object.setPrototypeOf.bind() + : function (rt, it) { + return (rt.__proto__ = it), rt + }), + _setPrototypeOf$4(tt, et) + ) + } + function _createSuper$4(tt) { + var et = _isNativeReflectConstruct$4() + return function () { + var rt = _getPrototypeOf$4(tt), + it + if (et) { + var ot = _getPrototypeOf$4(this).constructor + it = Reflect.construct(rt, arguments, ot) + } else it = rt.apply(this, arguments) + return _possibleConstructorReturn$4(this, it) + } + } + function _possibleConstructorReturn$4(tt, et) { + if (et && (_typeof$5(et) === 'object' || typeof et == 'function')) return et + if (et !== void 0) throw new TypeError('Derived constructors may only return object or undefined') + return _assertThisInitialized$4(tt) + } + function _assertThisInitialized$4(tt) { + if (tt === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called") + return tt + } + function _isNativeReflectConstruct$4() { + if (typeof Reflect > 'u' || !Reflect.construct || Reflect.construct.sham) return !1 + if (typeof Proxy == 'function') return !0 + try { + return Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})), !0 + } catch { + return !1 + } + } + function _getPrototypeOf$4(tt) { + return ( + (_getPrototypeOf$4 = Object.setPrototypeOf + ? Object.getPrototypeOf.bind() + : function (nt) { + return nt.__proto__ || Object.getPrototypeOf(nt) + }), + _getPrototypeOf$4(tt) + ) + } + function _defineProperty$5(tt, et, nt) { + return ( + (et = _toPropertyKey$4(et)), + et in tt + ? Object.defineProperty(tt, et, { value: nt, enumerable: !0, configurable: !0, writable: !0 }) + : (tt[et] = nt), + tt + ) + } + function _toPropertyKey$4(tt) { + var et = _toPrimitive$4(tt, 'string') + return _typeof$5(et) === 'symbol' ? et : String(et) + } + function _toPrimitive$4(tt, et) { + if (_typeof$5(tt) !== 'object' || tt === null) return tt + var nt = tt[Symbol.toPrimitive] + if (nt !== void 0) { + var rt = nt.call(tt, et || 'default') + if (_typeof$5(rt) !== 'object') return rt + throw new TypeError('@@toPrimitive must return a primitive value.') + } + return (et === 'string' ? String : Number)(tt) + } + var CartesianGrid = (function (tt) { + _inherits$4(nt, tt) + var et = _createSuper$4(nt) + function nt() { + return _classCallCheck$5(this, nt), et.apply(this, arguments) + } + return ( + _createClass$5( + nt, + [ + { + key: 'renderHorizontal', + value: function (it) { + var ot = this, + at = this.props, + st = at.x, + lt = at.width, + ct = at.horizontal + if (!it || !it.length) return null + var ut = it.map(function (ht, dt) { + var pt = _objectSpread$4( + _objectSpread$4({}, ot.props), + {}, + { x1: st, y1: ht, x2: st + lt, y2: ht, key: 'line-'.concat(dt), index: dt }, + ) + return nt.renderLineItem(ct, pt) + }) + return React$1.createElement('g', { className: 'recharts-cartesian-grid-horizontal' }, ut) + }, + }, + { + key: 'renderVertical', + value: function (it) { + var ot = this, + at = this.props, + st = at.y, + lt = at.height, + ct = at.vertical + if (!it || !it.length) return null + var ut = it.map(function (ht, dt) { + var pt = _objectSpread$4( + _objectSpread$4({}, ot.props), + {}, + { x1: ht, y1: st, x2: ht, y2: st + lt, key: 'line-'.concat(dt), index: dt }, + ) + return nt.renderLineItem(ct, pt) + }) + return React$1.createElement('g', { className: 'recharts-cartesian-grid-vertical' }, ut) + }, + }, + { + key: 'renderVerticalStripes', + value: function (it) { + var ot = this.props.verticalFill + if (!ot || !ot.length) return null + var at = this.props, + st = at.fillOpacity, + lt = at.x, + ct = at.y, + ut = at.width, + ht = at.height, + dt = it + .map(function (mt) { + return Math.round(mt + lt - lt) + }) + .sort(function (mt, gt) { + return mt - gt + }) + lt !== dt[0] && dt.unshift(0) + var pt = dt.map(function (mt, gt) { + var yt = !dt[gt + 1], + bt = yt ? lt + ut - mt : dt[gt + 1] - mt + if (bt <= 0) return null + var vt = gt % ot.length + return React$1.createElement('rect', { + key: 'react-'.concat(gt), + x: mt, + y: ct, + width: bt, + height: ht, + stroke: 'none', + fill: ot[vt], + fillOpacity: st, + className: 'recharts-cartesian-grid-bg', + }) + }) + return React$1.createElement('g', { className: 'recharts-cartesian-gridstripes-vertical' }, pt) + }, + }, + { + key: 'renderHorizontalStripes', + value: function (it) { + var ot = this.props.horizontalFill + if (!ot || !ot.length) return null + var at = this.props, + st = at.fillOpacity, + lt = at.x, + ct = at.y, + ut = at.width, + ht = at.height, + dt = it + .map(function (mt) { + return Math.round(mt + ct - ct) + }) + .sort(function (mt, gt) { + return mt - gt + }) + ct !== dt[0] && dt.unshift(0) + var pt = dt.map(function (mt, gt) { + var yt = !dt[gt + 1], + bt = yt ? ct + ht - mt : dt[gt + 1] - mt + if (bt <= 0) return null + var vt = gt % ot.length + return React$1.createElement('rect', { + key: 'react-'.concat(gt), + y: mt, + x: lt, + height: bt, + width: ut, + stroke: 'none', + fill: ot[vt], + fillOpacity: st, + className: 'recharts-cartesian-grid-bg', + }) + }) + return React$1.createElement('g', { className: 'recharts-cartesian-gridstripes-horizontal' }, pt) + }, + }, + { + key: 'renderBackground', + value: function () { + var it = this.props.fill + if (!it || it === 'none') return null + var ot = this.props, + at = ot.fillOpacity, + st = ot.x, + lt = ot.y, + ct = ot.width, + ut = ot.height + return React$1.createElement('rect', { + x: st, + y: lt, + width: ct, + height: ut, + stroke: 'none', + fill: it, + fillOpacity: at, + className: 'recharts-cartesian-grid-bg', + }) + }, + }, + { + key: 'render', + value: function () { + var it = this.props, + ot = it.x, + at = it.y, + st = it.width, + lt = it.height, + ct = it.horizontal, + ut = it.vertical, + ht = it.horizontalCoordinatesGenerator, + dt = it.verticalCoordinatesGenerator, + pt = it.xAxis, + mt = it.yAxis, + gt = it.offset, + yt = it.chartWidth, + bt = it.chartHeight, + vt = it.syncWithTicks, + xt = it.horizontalValues, + kt = it.verticalValues + if ( + !isNumber(st) || + st <= 0 || + !isNumber(lt) || + lt <= 0 || + !isNumber(ot) || + ot !== +ot || + !isNumber(at) || + at !== +at + ) + return null + var St = this.props, + Tt = St.horizontalPoints, + At = St.verticalPoints + if ((!Tt || !Tt.length) && _isFunction$1(ht)) { + var Et = xt && xt.length + Tt = ht( + { + yAxis: _objectSpread$4(_objectSpread$4({}, mt), {}, { ticks: Et ? xt : mt.ticks }), + width: yt, + height: bt, + offset: gt, + }, + Et ? !0 : vt, + ) + } + if ((!At || !At.length) && _isFunction$1(dt)) { + var $t = kt && kt.length + At = dt( + { + xAxis: _objectSpread$4(_objectSpread$4({}, pt), {}, { ticks: $t ? kt : pt.ticks }), + width: yt, + height: bt, + offset: gt, + }, + $t ? !0 : vt, + ) + } + return React$1.createElement( + 'g', + { className: 'recharts-cartesian-grid' }, + this.renderBackground(), + ct && this.renderHorizontal(Tt), + ut && this.renderVertical(At), + ct && this.renderHorizontalStripes(Tt), + ut && this.renderVerticalStripes(At), + ) + }, + }, + ], + [ + { + key: 'renderLineItem', + value: function (it, ot) { + var at + if (React$1.isValidElement(it)) at = React$1.cloneElement(it, ot) + else if (_isFunction$1(it)) at = it(ot) + else { + var st = ot.x1, + lt = ot.y1, + ct = ot.x2, + ut = ot.y2, + ht = ot.key, + dt = _objectWithoutProperties$3(ot, _excluded$3), + pt = filterProps(dt) + pt.offset + var mt = _objectWithoutProperties$3(pt, _excluded2$1) + at = React$1.createElement( + 'line', + _extends$5({}, mt, { x1: st, y1: lt, x2: ct, y2: ut, fill: 'none', key: ht }), + ) + } + return at + }, + }, + ], + ), + nt + ) + })(reactExports.PureComponent) + _defineProperty$5(CartesianGrid, 'displayName', 'CartesianGrid') + _defineProperty$5(CartesianGrid, 'defaultProps', { + horizontal: !0, + vertical: !0, + horizontalPoints: [], + verticalPoints: [], + stroke: '#ccc', + fill: 'none', + verticalFill: [], + horizontalFill: [], + }) + var _excluded$2 = ['type', 'layout', 'connectNulls', 'ref'] + function _typeof$4(tt) { + '@babel/helpers - typeof' + return ( + (_typeof$4 = + typeof Symbol == 'function' && typeof Symbol.iterator == 'symbol' + ? function (et) { + return typeof et + } + : function (et) { + return et && typeof Symbol == 'function' && et.constructor === Symbol && et !== Symbol.prototype + ? 'symbol' + : typeof et + }), + _typeof$4(tt) + ) + } + function _objectWithoutProperties$2(tt, et) { + if (tt == null) return {} + var nt = _objectWithoutPropertiesLoose$2(tt, et), + rt, + it + if (Object.getOwnPropertySymbols) { + var ot = Object.getOwnPropertySymbols(tt) + for (it = 0; it < ot.length; it++) + (rt = ot[it]), !(et.indexOf(rt) >= 0) && Object.prototype.propertyIsEnumerable.call(tt, rt) && (nt[rt] = tt[rt]) + } + return nt + } + function _objectWithoutPropertiesLoose$2(tt, et) { + if (tt == null) return {} + var nt = {}, + rt = Object.keys(tt), + it, + ot + for (ot = 0; ot < rt.length; ot++) (it = rt[ot]), !(et.indexOf(it) >= 0) && (nt[it] = tt[it]) + return nt + } + function _extends$4() { + return ( + (_extends$4 = Object.assign + ? Object.assign.bind() + : function (tt) { + for (var et = 1; et < arguments.length; et++) { + var nt = arguments[et] + for (var rt in nt) Object.prototype.hasOwnProperty.call(nt, rt) && (tt[rt] = nt[rt]) + } + return tt + }), + _extends$4.apply(this, arguments) + ) + } + function ownKeys$3(tt, et) { + var nt = Object.keys(tt) + if (Object.getOwnPropertySymbols) { + var rt = Object.getOwnPropertySymbols(tt) + et && + (rt = rt.filter(function (it) { + return Object.getOwnPropertyDescriptor(tt, it).enumerable + })), + nt.push.apply(nt, rt) + } + return nt + } + function _objectSpread$3(tt) { + for (var et = 1; et < arguments.length; et++) { + var nt = arguments[et] != null ? arguments[et] : {} + et % 2 + ? ownKeys$3(Object(nt), !0).forEach(function (rt) { + _defineProperty$4(tt, rt, nt[rt]) + }) + : Object.getOwnPropertyDescriptors + ? Object.defineProperties(tt, Object.getOwnPropertyDescriptors(nt)) + : ownKeys$3(Object(nt)).forEach(function (rt) { + Object.defineProperty(tt, rt, Object.getOwnPropertyDescriptor(nt, rt)) + }) + } + return tt + } + function _toConsumableArray$3(tt) { + return ( + _arrayWithoutHoles$3(tt) || _iterableToArray$3(tt) || _unsupportedIterableToArray$5(tt) || _nonIterableSpread$3() + ) + } + function _nonIterableSpread$3() { + throw new TypeError(`Invalid attempt to spread non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`) + } + function _unsupportedIterableToArray$5(tt, et) { + if (tt) { + if (typeof tt == 'string') return _arrayLikeToArray$5(tt, et) + var nt = Object.prototype.toString.call(tt).slice(8, -1) + if ((nt === 'Object' && tt.constructor && (nt = tt.constructor.name), nt === 'Map' || nt === 'Set')) + return Array.from(tt) + if (nt === 'Arguments' || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(nt)) return _arrayLikeToArray$5(tt, et) + } + } + function _iterableToArray$3(tt) { + if ((typeof Symbol < 'u' && tt[Symbol.iterator] != null) || tt['@@iterator'] != null) return Array.from(tt) + } + function _arrayWithoutHoles$3(tt) { + if (Array.isArray(tt)) return _arrayLikeToArray$5(tt) + } + function _arrayLikeToArray$5(tt, et) { + ;(et == null || et > tt.length) && (et = tt.length) + for (var nt = 0, rt = new Array(et); nt < et; nt++) rt[nt] = tt[nt] + return rt + } + function _classCallCheck$4(tt, et) { + if (!(tt instanceof et)) throw new TypeError('Cannot call a class as a function') + } + function _defineProperties$4(tt, et) { + for (var nt = 0; nt < et.length; nt++) { + var rt = et[nt] + ;(rt.enumerable = rt.enumerable || !1), + (rt.configurable = !0), + 'value' in rt && (rt.writable = !0), + Object.defineProperty(tt, _toPropertyKey$3(rt.key), rt) + } + } + function _createClass$4(tt, et, nt) { + return ( + et && _defineProperties$4(tt.prototype, et), + nt && _defineProperties$4(tt, nt), + Object.defineProperty(tt, 'prototype', { writable: !1 }), + tt + ) + } + function _inherits$3(tt, et) { + if (typeof et != 'function' && et !== null) + throw new TypeError('Super expression must either be null or a function') + ;(tt.prototype = Object.create(et && et.prototype, { constructor: { value: tt, writable: !0, configurable: !0 } })), + Object.defineProperty(tt, 'prototype', { writable: !1 }), + et && _setPrototypeOf$3(tt, et) + } + function _setPrototypeOf$3(tt, et) { + return ( + (_setPrototypeOf$3 = Object.setPrototypeOf + ? Object.setPrototypeOf.bind() + : function (rt, it) { + return (rt.__proto__ = it), rt + }), + _setPrototypeOf$3(tt, et) + ) + } + function _createSuper$3(tt) { + var et = _isNativeReflectConstruct$3() + return function () { + var rt = _getPrototypeOf$3(tt), + it + if (et) { + var ot = _getPrototypeOf$3(this).constructor + it = Reflect.construct(rt, arguments, ot) + } else it = rt.apply(this, arguments) + return _possibleConstructorReturn$3(this, it) + } + } + function _possibleConstructorReturn$3(tt, et) { + if (et && (_typeof$4(et) === 'object' || typeof et == 'function')) return et + if (et !== void 0) throw new TypeError('Derived constructors may only return object or undefined') + return _assertThisInitialized$3(tt) + } + function _assertThisInitialized$3(tt) { + if (tt === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called") + return tt + } + function _isNativeReflectConstruct$3() { + if (typeof Reflect > 'u' || !Reflect.construct || Reflect.construct.sham) return !1 + if (typeof Proxy == 'function') return !0 + try { + return Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})), !0 + } catch { + return !1 + } + } + function _getPrototypeOf$3(tt) { + return ( + (_getPrototypeOf$3 = Object.setPrototypeOf + ? Object.getPrototypeOf.bind() + : function (nt) { + return nt.__proto__ || Object.getPrototypeOf(nt) + }), + _getPrototypeOf$3(tt) + ) + } + function _defineProperty$4(tt, et, nt) { + return ( + (et = _toPropertyKey$3(et)), + et in tt + ? Object.defineProperty(tt, et, { value: nt, enumerable: !0, configurable: !0, writable: !0 }) + : (tt[et] = nt), + tt + ) + } + function _toPropertyKey$3(tt) { + var et = _toPrimitive$3(tt, 'string') + return _typeof$4(et) === 'symbol' ? et : String(et) + } + function _toPrimitive$3(tt, et) { + if (_typeof$4(tt) !== 'object' || tt === null) return tt + var nt = tt[Symbol.toPrimitive] + if (nt !== void 0) { + var rt = nt.call(tt, et || 'default') + if (_typeof$4(rt) !== 'object') return rt + throw new TypeError('@@toPrimitive must return a primitive value.') + } + return (et === 'string' ? String : Number)(tt) + } + var Line = (function (tt) { + _inherits$3(nt, tt) + var et = _createSuper$3(nt) + function nt() { + var rt + _classCallCheck$4(this, nt) + for (var it = arguments.length, ot = new Array(it), at = 0; at < it; at++) ot[at] = arguments[at] + return ( + (rt = et.call.apply(et, [this].concat(ot))), + _defineProperty$4(_assertThisInitialized$3(rt), 'state', { isAnimationFinished: !0, totalLength: 0 }), + _defineProperty$4(_assertThisInitialized$3(rt), 'getStrokeDasharray', function (st, lt, ct) { + for ( + var ut = ct.reduce(function (vt, xt) { + return vt + xt + }), + ht = Math.floor(st / ut), + dt = st % ut, + pt = lt - st, + mt = [], + gt = 0, + yt = 0; + ; + yt += ct[gt], ++gt + ) + if (yt + ct[gt] > dt) { + mt = [].concat(_toConsumableArray$3(ct.slice(0, gt)), [dt - yt]) + break + } + var bt = mt.length % 2 === 0 ? [0, pt] : [pt] + return [] + .concat(_toConsumableArray$3(nt.repeat(ct, ht)), _toConsumableArray$3(mt), bt) + .map(function (vt) { + return ''.concat(vt, 'px') + }) + .join(', ') + }), + _defineProperty$4(_assertThisInitialized$3(rt), 'id', uniqueId('recharts-line-')), + _defineProperty$4(_assertThisInitialized$3(rt), 'pathRef', function (st) { + rt.mainCurve = st + }), + _defineProperty$4(_assertThisInitialized$3(rt), 'handleAnimationEnd', function () { + rt.setState({ isAnimationFinished: !0 }), rt.props.onAnimationEnd && rt.props.onAnimationEnd() + }), + _defineProperty$4(_assertThisInitialized$3(rt), 'handleAnimationStart', function () { + rt.setState({ isAnimationFinished: !1 }), rt.props.onAnimationStart && rt.props.onAnimationStart() + }), + rt + ) + } + return ( + _createClass$4( + nt, + [ + { + key: 'componentDidMount', + value: function () { + if (this.props.isAnimationActive) { + var it = this.getTotalLength() + this.setState({ totalLength: it }) + } + }, + }, + { + key: 'getTotalLength', + value: function () { + var it = this.mainCurve + try { + return (it && it.getTotalLength && it.getTotalLength()) || 0 + } catch { + return 0 + } + }, + }, + { + key: 'renderErrorBar', + value: function (it, ot) { + if (this.props.isAnimationActive && !this.state.isAnimationFinished) return null + var at = this.props, + st = at.points, + lt = at.xAxis, + ct = at.yAxis, + ut = at.layout, + ht = at.children, + dt = findAllByType(ht, ErrorBar) + if (!dt) return null + var pt = function (yt, bt) { + return { x: yt.x, y: yt.y, value: yt.value, errorVal: getValueByDataKey(yt.payload, bt) } + }, + mt = { clipPath: it ? 'url(#clipPath-'.concat(ot, ')') : null } + return React$1.createElement( + Layer, + mt, + dt.map(function (gt, yt) { + return React$1.cloneElement(gt, { + key: 'bar-'.concat(yt), + data: st, + xAxis: lt, + yAxis: ct, + layout: ut, + dataPointFormatter: pt, + }) + }), + ) + }, + }, + { + key: 'renderDots', + value: function (it, ot, at) { + var st = this.props.isAnimationActive + if (st && !this.state.isAnimationFinished) return null + var lt = this.props, + ct = lt.dot, + ut = lt.points, + ht = lt.dataKey, + dt = filterProps(this.props), + pt = filterProps(ct, !0), + mt = ut.map(function (yt, bt) { + var vt = _objectSpread$3( + _objectSpread$3(_objectSpread$3({ key: 'dot-'.concat(bt), r: 3 }, dt), pt), + {}, + { value: yt.value, dataKey: ht, cx: yt.x, cy: yt.y, index: bt, payload: yt.payload }, + ) + return nt.renderDotItem(ct, vt) + }), + gt = { clipPath: it ? 'url(#clipPath-'.concat(ot ? '' : 'dots-').concat(at, ')') : null } + return React$1.createElement(Layer, _extends$4({ className: 'recharts-line-dots', key: 'dots' }, gt), mt) + }, + }, + { + key: 'renderCurveStatically', + value: function (it, ot, at, st) { + var lt = this.props, + ct = lt.type, + ut = lt.layout, + ht = lt.connectNulls + lt.ref + var dt = _objectWithoutProperties$2(lt, _excluded$2), + pt = _objectSpread$3( + _objectSpread$3( + _objectSpread$3({}, filterProps(dt, !0)), + {}, + { + fill: 'none', + className: 'recharts-line-curve', + clipPath: ot ? 'url(#clipPath-'.concat(at, ')') : null, + points: it, + }, + st, + ), + {}, + { type: ct, layout: ut, connectNulls: ht }, + ) + return React$1.createElement(Curve, _extends$4({}, pt, { pathRef: this.pathRef })) + }, + }, + { + key: 'renderCurveWithAnimation', + value: function (it, ot) { + var at = this, + st = this.props, + lt = st.points, + ct = st.strokeDasharray, + ut = st.isAnimationActive, + ht = st.animationBegin, + dt = st.animationDuration, + pt = st.animationEasing, + mt = st.animationId, + gt = st.animateNewValues, + yt = st.width, + bt = st.height, + vt = this.state, + xt = vt.prevPoints, + kt = vt.totalLength + return React$1.createElement( + Animate, + { + begin: ht, + duration: dt, + isActive: ut, + easing: pt, + from: { t: 0 }, + to: { t: 1 }, + key: 'line-'.concat(mt), + onAnimationEnd: this.handleAnimationEnd, + onAnimationStart: this.handleAnimationStart, + }, + function (St) { + var Tt = St.t + if (xt) { + var At = xt.length / lt.length, + Et = lt.map(function (Ct, wt) { + var It = Math.floor(wt * At) + if (xt[It]) { + var Ot = xt[It], + Wt = interpolateNumber$2(Ot.x, Ct.x), + zt = interpolateNumber$2(Ot.y, Ct.y) + return _objectSpread$3(_objectSpread$3({}, Ct), {}, { x: Wt(Tt), y: zt(Tt) }) + } + if (gt) { + var Ft = interpolateNumber$2(yt * 2, Ct.x), + Nt = interpolateNumber$2(bt / 2, Ct.y) + return _objectSpread$3(_objectSpread$3({}, Ct), {}, { x: Ft(Tt), y: Nt(Tt) }) + } + return _objectSpread$3(_objectSpread$3({}, Ct), {}, { x: Ct.x, y: Ct.y }) + }) + return at.renderCurveStatically(Et, it, ot) + } + var $t = interpolateNumber$2(0, kt), + Dt = $t(Tt), + jt + if (ct) { + var Pt = '' + .concat(ct) + .split(/[,\s]+/gim) + .map(function (Ct) { + return parseFloat(Ct) + }) + jt = at.getStrokeDasharray(Dt, kt, Pt) + } else jt = ''.concat(Dt, 'px ').concat(kt - Dt, 'px') + return at.renderCurveStatically(lt, it, ot, { strokeDasharray: jt }) + }, + ) + }, + }, + { + key: 'renderCurve', + value: function (it, ot) { + var at = this.props, + st = at.points, + lt = at.isAnimationActive, + ct = this.state, + ut = ct.prevPoints, + ht = ct.totalLength + return lt && st && st.length && ((!ut && ht > 0) || !_isEqual(ut, st)) + ? this.renderCurveWithAnimation(it, ot) + : this.renderCurveStatically(st, it, ot) + }, + }, + { + key: 'render', + value: function () { + var it, + ot = this.props, + at = ot.hide, + st = ot.dot, + lt = ot.points, + ct = ot.className, + ut = ot.xAxis, + ht = ot.yAxis, + dt = ot.top, + pt = ot.left, + mt = ot.width, + gt = ot.height, + yt = ot.isAnimationActive, + bt = ot.id + if (at || !lt || !lt.length) return null + var vt = this.state.isAnimationFinished, + xt = lt.length === 1, + kt = classNames('recharts-line', ct), + St = ut && ut.allowDataOverflow, + Tt = ht && ht.allowDataOverflow, + At = St || Tt, + Et = _isNil(bt) ? this.id : bt, + $t = (it = filterProps(st)) !== null && it !== void 0 ? it : { r: 3, strokeWidth: 2 }, + Dt = $t.r, + jt = Dt === void 0 ? 3 : Dt, + Pt = $t.strokeWidth, + Ct = Pt === void 0 ? 2 : Pt, + wt = isDotProps(st) ? st : {}, + It = wt.clipDot, + Ot = It === void 0 ? !0 : It, + Wt = jt * 2 + Ct + return React$1.createElement( + Layer, + { className: kt }, + St || Tt + ? React$1.createElement( + 'defs', + null, + React$1.createElement( + 'clipPath', + { id: 'clipPath-'.concat(Et) }, + React$1.createElement('rect', { + x: St ? pt : pt - mt / 2, + y: Tt ? dt : dt - gt / 2, + width: St ? mt : mt * 2, + height: Tt ? gt : gt * 2, + }), + ), + !Ot && + React$1.createElement( + 'clipPath', + { id: 'clipPath-dots-'.concat(Et) }, + React$1.createElement('rect', { + x: pt - Wt / 2, + y: dt - Wt / 2, + width: mt + Wt, + height: gt + Wt, + }), + ), + ) + : null, + !xt && this.renderCurve(At, Et), + this.renderErrorBar(At, Et), + (xt || st) && this.renderDots(At, Ot, Et), + (!yt || vt) && LabelList.renderCallByParent(this.props, lt), + ) + }, + }, + ], + [ + { + key: 'getDerivedStateFromProps', + value: function (it, ot) { + return it.animationId !== ot.prevAnimationId + ? { prevAnimationId: it.animationId, curPoints: it.points, prevPoints: ot.curPoints } + : it.points !== ot.curPoints + ? { curPoints: it.points } + : null + }, + }, + { + key: 'repeat', + value: function (it, ot) { + for ( + var at = it.length % 2 !== 0 ? [].concat(_toConsumableArray$3(it), [0]) : it, st = [], lt = 0; + lt < ot; + ++lt + ) + st = [].concat(_toConsumableArray$3(st), _toConsumableArray$3(at)) + return st + }, + }, + { + key: 'renderDotItem', + value: function (it, ot) { + var at + if (React$1.isValidElement(it)) at = React$1.cloneElement(it, ot) + else if (_isFunction$1(it)) at = it(ot) + else { + var st = classNames('recharts-line-dot', it ? it.className : '') + at = React$1.createElement(Dot, _extends$4({}, ot, { className: st })) + } + return at + }, + }, + ], + ), + nt + ) + })(reactExports.PureComponent) + _defineProperty$4(Line, 'displayName', 'Line') + _defineProperty$4(Line, 'defaultProps', { + xAxisId: 0, + yAxisId: 0, + connectNulls: !1, + activeDot: !0, + dot: !0, + legendType: 'line', + stroke: '#3182bd', + strokeWidth: 1, + fill: '#fff', + points: [], + isAnimationActive: !Global.isSsr, + animateNewValues: !0, + animationBegin: 0, + animationDuration: 1500, + animationEasing: 'ease', + hide: !1, + label: !1, + }) + _defineProperty$4(Line, 'getComposedData', function (tt) { + var et = tt.props, + nt = tt.xAxis, + rt = tt.yAxis, + it = tt.xAxisTicks, + ot = tt.yAxisTicks, + at = tt.dataKey, + st = tt.bandSize, + lt = tt.displayedData, + ct = tt.offset, + ut = et.layout, + ht = lt.map(function (dt, pt) { + var mt = getValueByDataKey(dt, at) + return ut === 'horizontal' + ? { + x: getCateCoordinateOfLine({ axis: nt, ticks: it, bandSize: st, entry: dt, index: pt }), + y: _isNil(mt) ? null : rt.scale(mt), + value: mt, + payload: dt, + } + : { + x: _isNil(mt) ? null : nt.scale(mt), + y: getCateCoordinateOfLine({ axis: rt, ticks: ot, bandSize: st, entry: dt, index: pt }), + value: mt, + payload: dt, + } + }) + return _objectSpread$3({ points: ht, layout: ut }, ct) + }) + var ZAxis = function () { + return null + } + ZAxis.displayName = 'ZAxis' + ZAxis.defaultProps = { zAxisId: 0, range: [64, 64], scale: 'auto', type: 'number' } + var _excluded$1 = ['option', 'isActive'] + function _extends$3() { + return ( + (_extends$3 = Object.assign + ? Object.assign.bind() + : function (tt) { + for (var et = 1; et < arguments.length; et++) { + var nt = arguments[et] + for (var rt in nt) Object.prototype.hasOwnProperty.call(nt, rt) && (tt[rt] = nt[rt]) + } + return tt + }), + _extends$3.apply(this, arguments) + ) + } + function _objectWithoutProperties$1(tt, et) { + if (tt == null) return {} + var nt = _objectWithoutPropertiesLoose$1(tt, et), + rt, + it + if (Object.getOwnPropertySymbols) { + var ot = Object.getOwnPropertySymbols(tt) + for (it = 0; it < ot.length; it++) + (rt = ot[it]), !(et.indexOf(rt) >= 0) && Object.prototype.propertyIsEnumerable.call(tt, rt) && (nt[rt] = tt[rt]) + } + return nt + } + function _objectWithoutPropertiesLoose$1(tt, et) { + if (tt == null) return {} + var nt = {}, + rt = Object.keys(tt), + it, + ot + for (ot = 0; ot < rt.length; ot++) (it = rt[ot]), !(et.indexOf(it) >= 0) && (nt[it] = tt[it]) + return nt + } + function ScatterSymbol(tt) { + var et = tt.option, + nt = tt.isActive, + rt = _objectWithoutProperties$1(tt, _excluded$1) + return typeof et == 'string' + ? React$1.createElement( + Shape, + _extends$3( + { + option: React$1.createElement(Symbols, _extends$3({ type: et }, rt)), + isActive: nt, + shapeType: 'symbols', + }, + rt, + ), + ) + : React$1.createElement(Shape, _extends$3({ option: et, isActive: nt, shapeType: 'symbols' }, rt)) + } + function _typeof$3(tt) { + '@babel/helpers - typeof' + return ( + (_typeof$3 = + typeof Symbol == 'function' && typeof Symbol.iterator == 'symbol' + ? function (et) { + return typeof et + } + : function (et) { + return et && typeof Symbol == 'function' && et.constructor === Symbol && et !== Symbol.prototype + ? 'symbol' + : typeof et + }), + _typeof$3(tt) + ) + } + function _extends$2() { + return ( + (_extends$2 = Object.assign + ? Object.assign.bind() + : function (tt) { + for (var et = 1; et < arguments.length; et++) { + var nt = arguments[et] + for (var rt in nt) Object.prototype.hasOwnProperty.call(nt, rt) && (tt[rt] = nt[rt]) + } + return tt + }), + _extends$2.apply(this, arguments) + ) + } + function ownKeys$2(tt, et) { + var nt = Object.keys(tt) + if (Object.getOwnPropertySymbols) { + var rt = Object.getOwnPropertySymbols(tt) + et && + (rt = rt.filter(function (it) { + return Object.getOwnPropertyDescriptor(tt, it).enumerable + })), + nt.push.apply(nt, rt) + } + return nt + } + function _objectSpread$2(tt) { + for (var et = 1; et < arguments.length; et++) { + var nt = arguments[et] != null ? arguments[et] : {} + et % 2 + ? ownKeys$2(Object(nt), !0).forEach(function (rt) { + _defineProperty$3(tt, rt, nt[rt]) + }) + : Object.getOwnPropertyDescriptors + ? Object.defineProperties(tt, Object.getOwnPropertyDescriptors(nt)) + : ownKeys$2(Object(nt)).forEach(function (rt) { + Object.defineProperty(tt, rt, Object.getOwnPropertyDescriptor(nt, rt)) + }) + } + return tt + } + function _classCallCheck$3(tt, et) { + if (!(tt instanceof et)) throw new TypeError('Cannot call a class as a function') + } + function _defineProperties$3(tt, et) { + for (var nt = 0; nt < et.length; nt++) { + var rt = et[nt] + ;(rt.enumerable = rt.enumerable || !1), + (rt.configurable = !0), + 'value' in rt && (rt.writable = !0), + Object.defineProperty(tt, _toPropertyKey$2(rt.key), rt) + } + } + function _createClass$3(tt, et, nt) { + return ( + et && _defineProperties$3(tt.prototype, et), + nt && _defineProperties$3(tt, nt), + Object.defineProperty(tt, 'prototype', { writable: !1 }), + tt + ) + } + function _inherits$2(tt, et) { + if (typeof et != 'function' && et !== null) + throw new TypeError('Super expression must either be null or a function') + ;(tt.prototype = Object.create(et && et.prototype, { constructor: { value: tt, writable: !0, configurable: !0 } })), + Object.defineProperty(tt, 'prototype', { writable: !1 }), + et && _setPrototypeOf$2(tt, et) + } + function _setPrototypeOf$2(tt, et) { + return ( + (_setPrototypeOf$2 = Object.setPrototypeOf + ? Object.setPrototypeOf.bind() + : function (rt, it) { + return (rt.__proto__ = it), rt + }), + _setPrototypeOf$2(tt, et) + ) + } + function _createSuper$2(tt) { + var et = _isNativeReflectConstruct$2() + return function () { + var rt = _getPrototypeOf$2(tt), + it + if (et) { + var ot = _getPrototypeOf$2(this).constructor + it = Reflect.construct(rt, arguments, ot) + } else it = rt.apply(this, arguments) + return _possibleConstructorReturn$2(this, it) + } + } + function _possibleConstructorReturn$2(tt, et) { + if (et && (_typeof$3(et) === 'object' || typeof et == 'function')) return et + if (et !== void 0) throw new TypeError('Derived constructors may only return object or undefined') + return _assertThisInitialized$2(tt) + } + function _assertThisInitialized$2(tt) { + if (tt === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called") + return tt + } + function _isNativeReflectConstruct$2() { + if (typeof Reflect > 'u' || !Reflect.construct || Reflect.construct.sham) return !1 + if (typeof Proxy == 'function') return !0 + try { + return Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})), !0 + } catch { + return !1 + } + } + function _getPrototypeOf$2(tt) { + return ( + (_getPrototypeOf$2 = Object.setPrototypeOf + ? Object.getPrototypeOf.bind() + : function (nt) { + return nt.__proto__ || Object.getPrototypeOf(nt) + }), + _getPrototypeOf$2(tt) + ) + } + function _defineProperty$3(tt, et, nt) { + return ( + (et = _toPropertyKey$2(et)), + et in tt + ? Object.defineProperty(tt, et, { value: nt, enumerable: !0, configurable: !0, writable: !0 }) + : (tt[et] = nt), + tt + ) + } + function _toPropertyKey$2(tt) { + var et = _toPrimitive$2(tt, 'string') + return _typeof$3(et) === 'symbol' ? et : String(et) + } + function _toPrimitive$2(tt, et) { + if (_typeof$3(tt) !== 'object' || tt === null) return tt + var nt = tt[Symbol.toPrimitive] + if (nt !== void 0) { + var rt = nt.call(tt, et || 'default') + if (_typeof$3(rt) !== 'object') return rt + throw new TypeError('@@toPrimitive must return a primitive value.') + } + return (et === 'string' ? String : Number)(tt) + } + var Scatter = (function (tt) { + _inherits$2(nt, tt) + var et = _createSuper$2(nt) + function nt() { + var rt + _classCallCheck$3(this, nt) + for (var it = arguments.length, ot = new Array(it), at = 0; at < it; at++) ot[at] = arguments[at] + return ( + (rt = et.call.apply(et, [this].concat(ot))), + _defineProperty$3(_assertThisInitialized$2(rt), 'state', { isAnimationFinished: !1 }), + _defineProperty$3(_assertThisInitialized$2(rt), 'handleAnimationEnd', function () { + rt.setState({ isAnimationFinished: !0 }) + }), + _defineProperty$3(_assertThisInitialized$2(rt), 'handleAnimationStart', function () { + rt.setState({ isAnimationFinished: !1 }) + }), + _defineProperty$3(_assertThisInitialized$2(rt), 'id', uniqueId('recharts-scatter-')), + rt + ) + } + return ( + _createClass$3( + nt, + [ + { + key: 'renderSymbolsStatically', + value: function (it) { + var ot = this, + at = this.props, + st = at.shape, + lt = at.activeShape, + ct = at.activeIndex, + ut = filterProps(this.props) + return it.map(function (ht, dt) { + var pt = ct === dt, + mt = pt ? lt : st, + gt = _objectSpread$2(_objectSpread$2({ key: 'symbol-'.concat(dt) }, ut), ht) + return React$1.createElement( + Layer, + _extends$2({ className: 'recharts-scatter-symbol' }, adaptEventsOfChild(ot.props, ht, dt), { + key: 'symbol-'.concat(dt), + role: 'img', + }), + React$1.createElement(ScatterSymbol, _extends$2({ option: mt, isActive: pt }, gt)), + ) + }) + }, + }, + { + key: 'renderSymbolsWithAnimation', + value: function () { + var it = this, + ot = this.props, + at = ot.points, + st = ot.isAnimationActive, + lt = ot.animationBegin, + ct = ot.animationDuration, + ut = ot.animationEasing, + ht = ot.animationId, + dt = this.state.prevPoints + return React$1.createElement( + Animate, + { + begin: lt, + duration: ct, + isActive: st, + easing: ut, + from: { t: 0 }, + to: { t: 1 }, + key: 'pie-'.concat(ht), + onAnimationEnd: this.handleAnimationEnd, + onAnimationStart: this.handleAnimationStart, + }, + function (pt) { + var mt = pt.t, + gt = at.map(function (yt, bt) { + var vt = dt && dt[bt] + if (vt) { + var xt = interpolateNumber$2(vt.cx, yt.cx), + kt = interpolateNumber$2(vt.cy, yt.cy), + St = interpolateNumber$2(vt.size, yt.size) + return _objectSpread$2(_objectSpread$2({}, yt), {}, { cx: xt(mt), cy: kt(mt), size: St(mt) }) + } + var Tt = interpolateNumber$2(0, yt.size) + return _objectSpread$2(_objectSpread$2({}, yt), {}, { size: Tt(mt) }) + }) + return React$1.createElement(Layer, null, it.renderSymbolsStatically(gt)) + }, + ) + }, + }, + { + key: 'renderSymbols', + value: function () { + var it = this.props, + ot = it.points, + at = it.isAnimationActive, + st = this.state.prevPoints + return at && ot && ot.length && (!st || !_isEqual(st, ot)) + ? this.renderSymbolsWithAnimation() + : this.renderSymbolsStatically(ot) + }, + }, + { + key: 'renderErrorBar', + value: function () { + var it = this.props.isAnimationActive + if (it && !this.state.isAnimationFinished) return null + var ot = this.props, + at = ot.points, + st = ot.xAxis, + lt = ot.yAxis, + ct = ot.children, + ut = findAllByType(ct, ErrorBar) + return ut + ? ut.map(function (ht, dt) { + var pt = ht.props.direction + return React$1.cloneElement(ht, { + key: dt, + data: at, + xAxis: st, + yAxis: lt, + layout: pt === 'x' ? 'vertical' : 'horizontal', + dataPointFormatter: function (gt, yt) { + return { + x: gt.cx, + y: gt.cy, + value: pt === 'x' ? +gt.node.x : +gt.node.y, + errorVal: getValueByDataKey(gt, yt), + } + }, + }) + }) + : null + }, + }, + { + key: 'renderLine', + value: function () { + var it = this.props, + ot = it.points, + at = it.line, + st = it.lineType, + lt = it.lineJointType, + ct = filterProps(this.props), + ut = filterProps(at), + ht, + dt + if (st === 'joint') + ht = ot.map(function (kt) { + return { x: kt.cx, y: kt.cy } + }) + else if (st === 'fitting') { + var pt = getLinearRegression(ot), + mt = pt.xmin, + gt = pt.xmax, + yt = pt.a, + bt = pt.b, + vt = function (St) { + return yt * St + bt + } + ht = [ + { x: mt, y: vt(mt) }, + { x: gt, y: vt(gt) }, + ] + } + var xt = _objectSpread$2( + _objectSpread$2(_objectSpread$2({}, ct), {}, { fill: 'none', stroke: ct && ct.fill }, ut), + {}, + { points: ht }, + ) + return ( + React$1.isValidElement(at) + ? (dt = React$1.cloneElement(at, xt)) + : _isFunction$1(at) + ? (dt = at(xt)) + : (dt = React$1.createElement(Curve, _extends$2({}, xt, { type: lt }))), + React$1.createElement(Layer, { className: 'recharts-scatter-line', key: 'recharts-scatter-line' }, dt) + ) + }, + }, + { + key: 'render', + value: function () { + var it = this.props, + ot = it.hide, + at = it.points, + st = it.line, + lt = it.className, + ct = it.xAxis, + ut = it.yAxis, + ht = it.left, + dt = it.top, + pt = it.width, + mt = it.height, + gt = it.id, + yt = it.isAnimationActive + if (ot || !at || !at.length) return null + var bt = this.state.isAnimationFinished, + vt = classNames('recharts-scatter', lt), + xt = ct && ct.allowDataOverflow, + kt = ut && ut.allowDataOverflow, + St = xt || kt, + Tt = _isNil(gt) ? this.id : gt + return React$1.createElement( + Layer, + { className: vt, clipPath: St ? 'url(#clipPath-'.concat(Tt, ')') : null }, + xt || kt + ? React$1.createElement( + 'defs', + null, + React$1.createElement( + 'clipPath', + { id: 'clipPath-'.concat(Tt) }, + React$1.createElement('rect', { + x: xt ? ht : ht - pt / 2, + y: kt ? dt : dt - mt / 2, + width: xt ? pt : pt * 2, + height: kt ? mt : mt * 2, + }), + ), + ) + : null, + st && this.renderLine(), + this.renderErrorBar(), + React$1.createElement(Layer, { key: 'recharts-scatter-symbols' }, this.renderSymbols()), + (!yt || bt) && LabelList.renderCallByParent(this.props, at), + ) + }, + }, + ], + [ + { + key: 'getDerivedStateFromProps', + value: function (it, ot) { + return it.animationId !== ot.prevAnimationId + ? { prevAnimationId: it.animationId, curPoints: it.points, prevPoints: ot.curPoints } + : it.points !== ot.curPoints + ? { curPoints: it.points } + : null + }, + }, + ], + ), + nt + ) + })(reactExports.PureComponent) + _defineProperty$3(Scatter, 'displayName', 'Scatter') + _defineProperty$3(Scatter, 'defaultProps', { + xAxisId: 0, + yAxisId: 0, + zAxisId: 0, + legendType: 'circle', + lineType: 'joint', + lineJointType: 'linear', + data: [], + shape: 'circle', + hide: !1, + isAnimationActive: !Global.isSsr, + animationBegin: 0, + animationDuration: 400, + animationEasing: 'linear', + }) + _defineProperty$3(Scatter, 'getComposedData', function (tt) { + var et = tt.xAxis, + nt = tt.yAxis, + rt = tt.zAxis, + it = tt.item, + ot = tt.displayedData, + at = tt.xAxisTicks, + st = tt.yAxisTicks, + lt = tt.offset, + ct = it.props.tooltipType, + ut = findAllByType(it.props.children, Cell), + ht = _isNil(et.dataKey) ? it.props.dataKey : et.dataKey, + dt = _isNil(nt.dataKey) ? it.props.dataKey : nt.dataKey, + pt = rt && rt.dataKey, + mt = rt ? rt.range : ZAxis.defaultProps.range, + gt = mt && mt[0], + yt = et.scale.bandwidth ? et.scale.bandwidth() : 0, + bt = nt.scale.bandwidth ? nt.scale.bandwidth() : 0, + vt = ot.map(function (xt, kt) { + var St = getValueByDataKey(xt, ht), + Tt = getValueByDataKey(xt, dt), + At = (!_isNil(pt) && getValueByDataKey(xt, pt)) || '-', + Et = [ + { + name: _isNil(et.dataKey) ? it.props.name : et.name || et.dataKey, + unit: et.unit || '', + value: St, + payload: xt, + dataKey: ht, + type: ct, + }, + { + name: _isNil(nt.dataKey) ? it.props.name : nt.name || nt.dataKey, + unit: nt.unit || '', + value: Tt, + payload: xt, + dataKey: dt, + type: ct, + }, + ] + At !== '-' && + Et.push({ name: rt.name || rt.dataKey, unit: rt.unit || '', value: At, payload: xt, dataKey: pt, type: ct }) + var $t = getCateCoordinateOfLine({ axis: et, ticks: at, bandSize: yt, entry: xt, index: kt, dataKey: ht }), + Dt = getCateCoordinateOfLine({ axis: nt, ticks: st, bandSize: bt, entry: xt, index: kt, dataKey: dt }), + jt = At !== '-' ? rt.scale(At) : gt, + Pt = Math.sqrt(Math.max(jt, 0) / Math.PI) + return _objectSpread$2( + _objectSpread$2({}, xt), + {}, + { + cx: $t, + cy: Dt, + x: $t - Pt, + y: Dt - Pt, + xAxis: et, + yAxis: nt, + zAxis: rt, + width: 2 * Pt, + height: 2 * Pt, + size: jt, + node: { x: St, y: Tt, z: At }, + tooltipPayload: Et, + tooltipPosition: { x: $t, y: Dt }, + payload: xt, + }, + ut && ut[kt] && ut[kt].props, + ) + }) + return _objectSpread$2({ points: vt }, lt) + }) + var XAxis = function () { + return null + } + XAxis.displayName = 'XAxis' + XAxis.defaultProps = { + allowDecimals: !0, + hide: !1, + orientation: 'bottom', + width: 0, + height: 30, + mirror: !1, + xAxisId: 0, + tickCount: 5, + type: 'category', + padding: { left: 0, right: 0 }, + allowDataOverflow: !1, + scale: 'auto', + reversed: !1, + allowDuplicatedCategory: !0, + } + var YAxis = function () { + return null + } + YAxis.displayName = 'YAxis' + YAxis.defaultProps = { + allowDuplicatedCategory: !0, + allowDecimals: !0, + hide: !1, + orientation: 'left', + width: 60, + height: 0, + mirror: !1, + yAxisId: 0, + tickCount: 5, + type: 'number', + padding: { top: 0, bottom: 0 }, + allowDataOverflow: !1, + scale: 'auto', + reversed: !1, + } + var baseIteratee$1 = _baseIteratee, + isArrayLike = isArrayLike_1, + keys = keys_1 + function createFind$1(tt) { + return function (et, nt, rt) { + var it = Object(et) + if (!isArrayLike(et)) { + var ot = baseIteratee$1(nt) + ;(et = keys(et)), + (nt = function (st) { + return ot(it[st], st, it) + }) + } + var at = tt(et, nt, rt) + return at > -1 ? it[ot ? et[at] : at] : void 0 + } + } + var _createFind = createFind$1, + toFinite = toFinite_1 + function toInteger$1(tt) { + var et = toFinite(tt), + nt = et % 1 + return et === et ? (nt ? et - nt : et) : 0 + } + var toInteger_1 = toInteger$1, + baseFindIndex = _baseFindIndex, + baseIteratee = _baseIteratee, + toInteger = toInteger_1, + nativeMax = Math.max + function findIndex$1(tt, et, nt) { + var rt = tt == null ? 0 : tt.length + if (!rt) return -1 + var it = nt == null ? 0 : toInteger(nt) + return it < 0 && (it = nativeMax(rt + it, 0)), baseFindIndex(tt, baseIteratee(et), it) + } + var findIndex_1 = findIndex$1, + createFind = _createFind, + findIndex = findIndex_1, + find$1 = createFind(findIndex), + find_1 = find$1 + const _find = getDefaultExportFromCjs(find_1) + var prefix = 'Invariant failed' + function invariant(tt, et) { + if (!tt) throw new Error(prefix) + } + function getRadialCursorPoints(tt) { + var et = tt.cx, + nt = tt.cy, + rt = tt.radius, + it = tt.startAngle, + ot = tt.endAngle, + at = polarToCartesian(et, nt, rt, it), + st = polarToCartesian(et, nt, rt, ot) + return { points: [at, st], cx: et, cy: nt, radius: rt, startAngle: it, endAngle: ot } + } + function _toConsumableArray$2(tt) { + return ( + _arrayWithoutHoles$2(tt) || _iterableToArray$2(tt) || _unsupportedIterableToArray$4(tt) || _nonIterableSpread$2() + ) + } + function _nonIterableSpread$2() { + throw new TypeError(`Invalid attempt to spread non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`) + } + function _unsupportedIterableToArray$4(tt, et) { + if (tt) { + if (typeof tt == 'string') return _arrayLikeToArray$4(tt, et) + var nt = Object.prototype.toString.call(tt).slice(8, -1) + if ((nt === 'Object' && tt.constructor && (nt = tt.constructor.name), nt === 'Map' || nt === 'Set')) + return Array.from(tt) + if (nt === 'Arguments' || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(nt)) return _arrayLikeToArray$4(tt, et) + } + } + function _iterableToArray$2(tt) { + if ((typeof Symbol < 'u' && tt[Symbol.iterator] != null) || tt['@@iterator'] != null) return Array.from(tt) + } + function _arrayWithoutHoles$2(tt) { + if (Array.isArray(tt)) return _arrayLikeToArray$4(tt) + } + function _arrayLikeToArray$4(tt, et) { + ;(et == null || et > tt.length) && (et = tt.length) + for (var nt = 0, rt = new Array(et); nt < et; nt++) rt[nt] = tt[nt] + return rt + } + var detectReferenceElementsDomain = function (et, nt, rt, it, ot) { + var at = findAllByType(et, ReferenceLine), + st = findAllByType(et, ReferenceDot), + lt = [].concat(_toConsumableArray$2(at), _toConsumableArray$2(st)), + ct = findAllByType(et, ReferenceArea), + ut = ''.concat(it, 'Id'), + ht = it[0], + dt = nt + if ( + (lt.length && + (dt = lt.reduce(function (gt, yt) { + if (yt.props[ut] === rt && ifOverflowMatches(yt.props, 'extendDomain') && isNumber(yt.props[ht])) { + var bt = yt.props[ht] + return [Math.min(gt[0], bt), Math.max(gt[1], bt)] + } + return gt + }, dt)), + ct.length) + ) { + var pt = ''.concat(ht, '1'), + mt = ''.concat(ht, '2') + dt = ct.reduce(function (gt, yt) { + if ( + yt.props[ut] === rt && + ifOverflowMatches(yt.props, 'extendDomain') && + isNumber(yt.props[pt]) && + isNumber(yt.props[mt]) + ) { + var bt = yt.props[pt], + vt = yt.props[mt] + return [Math.min(gt[0], bt, vt), Math.max(gt[1], bt, vt)] + } + return gt + }, dt) + } + return ( + ot && + ot.length && + (dt = ot.reduce(function (gt, yt) { + return isNumber(yt) ? [Math.min(gt[0], yt), Math.max(gt[1], yt)] : gt + }, dt)), + dt + ) + }, + eventemitter3 = { exports: {} } + ;(function (tt) { + var et = Object.prototype.hasOwnProperty, + nt = '~' + function rt() {} + Object.create && ((rt.prototype = Object.create(null)), new rt().__proto__ || (nt = !1)) + function it(lt, ct, ut) { + ;(this.fn = lt), (this.context = ct), (this.once = ut || !1) + } + function ot(lt, ct, ut, ht, dt) { + if (typeof ut != 'function') throw new TypeError('The listener must be a function') + var pt = new it(ut, ht || lt, dt), + mt = nt ? nt + ct : ct + return ( + lt._events[mt] + ? lt._events[mt].fn + ? (lt._events[mt] = [lt._events[mt], pt]) + : lt._events[mt].push(pt) + : ((lt._events[mt] = pt), lt._eventsCount++), + lt + ) + } + function at(lt, ct) { + --lt._eventsCount === 0 ? (lt._events = new rt()) : delete lt._events[ct] + } + function st() { + ;(this._events = new rt()), (this._eventsCount = 0) + } + ;(st.prototype.eventNames = function () { + var ct = [], + ut, + ht + if (this._eventsCount === 0) return ct + for (ht in (ut = this._events)) et.call(ut, ht) && ct.push(nt ? ht.slice(1) : ht) + return Object.getOwnPropertySymbols ? ct.concat(Object.getOwnPropertySymbols(ut)) : ct + }), + (st.prototype.listeners = function (ct) { + var ut = nt ? nt + ct : ct, + ht = this._events[ut] + if (!ht) return [] + if (ht.fn) return [ht.fn] + for (var dt = 0, pt = ht.length, mt = new Array(pt); dt < pt; dt++) mt[dt] = ht[dt].fn + return mt + }), + (st.prototype.listenerCount = function (ct) { + var ut = nt ? nt + ct : ct, + ht = this._events[ut] + return ht ? (ht.fn ? 1 : ht.length) : 0 + }), + (st.prototype.emit = function (ct, ut, ht, dt, pt, mt) { + var gt = nt ? nt + ct : ct + if (!this._events[gt]) return !1 + var yt = this._events[gt], + bt = arguments.length, + vt, + xt + if (yt.fn) { + switch ((yt.once && this.removeListener(ct, yt.fn, void 0, !0), bt)) { + case 1: + return yt.fn.call(yt.context), !0 + case 2: + return yt.fn.call(yt.context, ut), !0 + case 3: + return yt.fn.call(yt.context, ut, ht), !0 + case 4: + return yt.fn.call(yt.context, ut, ht, dt), !0 + case 5: + return yt.fn.call(yt.context, ut, ht, dt, pt), !0 + case 6: + return yt.fn.call(yt.context, ut, ht, dt, pt, mt), !0 + } + for (xt = 1, vt = new Array(bt - 1); xt < bt; xt++) vt[xt - 1] = arguments[xt] + yt.fn.apply(yt.context, vt) + } else { + var kt = yt.length, + St + for (xt = 0; xt < kt; xt++) + switch ((yt[xt].once && this.removeListener(ct, yt[xt].fn, void 0, !0), bt)) { + case 1: + yt[xt].fn.call(yt[xt].context) + break + case 2: + yt[xt].fn.call(yt[xt].context, ut) + break + case 3: + yt[xt].fn.call(yt[xt].context, ut, ht) + break + case 4: + yt[xt].fn.call(yt[xt].context, ut, ht, dt) + break + default: + if (!vt) for (St = 1, vt = new Array(bt - 1); St < bt; St++) vt[St - 1] = arguments[St] + yt[xt].fn.apply(yt[xt].context, vt) + } + } + return !0 + }), + (st.prototype.on = function (ct, ut, ht) { + return ot(this, ct, ut, ht, !1) + }), + (st.prototype.once = function (ct, ut, ht) { + return ot(this, ct, ut, ht, !0) + }), + (st.prototype.removeListener = function (ct, ut, ht, dt) { + var pt = nt ? nt + ct : ct + if (!this._events[pt]) return this + if (!ut) return at(this, pt), this + var mt = this._events[pt] + if (mt.fn) mt.fn === ut && (!dt || mt.once) && (!ht || mt.context === ht) && at(this, pt) + else { + for (var gt = 0, yt = [], bt = mt.length; gt < bt; gt++) + (mt[gt].fn !== ut || (dt && !mt[gt].once) || (ht && mt[gt].context !== ht)) && yt.push(mt[gt]) + yt.length ? (this._events[pt] = yt.length === 1 ? yt[0] : yt) : at(this, pt) + } + return this + }), + (st.prototype.removeAllListeners = function (ct) { + var ut + return ( + ct + ? ((ut = nt ? nt + ct : ct), this._events[ut] && at(this, ut)) + : ((this._events = new rt()), (this._eventsCount = 0)), + this + ) + }), + (st.prototype.off = st.prototype.removeListener), + (st.prototype.addListener = st.prototype.on), + (st.prefixed = nt), + (st.EventEmitter = st), + (tt.exports = st) + })(eventemitter3) + var eventemitter3Exports = eventemitter3.exports + const EventEmitter = getDefaultExportFromCjs(eventemitter3Exports) + var eventCenter = new EventEmitter() + eventCenter.setMaxListeners && eventCenter.setMaxListeners(10) + var SYNC_EVENT = 'recharts.syncMouseEvents' + function _typeof$2(tt) { + '@babel/helpers - typeof' + return ( + (_typeof$2 = + typeof Symbol == 'function' && typeof Symbol.iterator == 'symbol' + ? function (et) { + return typeof et + } + : function (et) { + return et && typeof Symbol == 'function' && et.constructor === Symbol && et !== Symbol.prototype + ? 'symbol' + : typeof et + }), + _typeof$2(tt) + ) + } + function _classCallCheck$2(tt, et) { + if (!(tt instanceof et)) throw new TypeError('Cannot call a class as a function') + } + function _defineProperties$2(tt, et) { + for (var nt = 0; nt < et.length; nt++) { + var rt = et[nt] + ;(rt.enumerable = rt.enumerable || !1), + (rt.configurable = !0), + 'value' in rt && (rt.writable = !0), + Object.defineProperty(tt, _toPropertyKey$1(rt.key), rt) + } + } + function _createClass$2(tt, et, nt) { + return ( + et && _defineProperties$2(tt.prototype, et), + nt && _defineProperties$2(tt, nt), + Object.defineProperty(tt, 'prototype', { writable: !1 }), + tt + ) + } + function _defineProperty$2(tt, et, nt) { + return ( + (et = _toPropertyKey$1(et)), + et in tt + ? Object.defineProperty(tt, et, { value: nt, enumerable: !0, configurable: !0, writable: !0 }) + : (tt[et] = nt), + tt + ) + } + function _toPropertyKey$1(tt) { + var et = _toPrimitive$1(tt, 'string') + return _typeof$2(et) === 'symbol' ? et : String(et) + } + function _toPrimitive$1(tt, et) { + if (_typeof$2(tt) !== 'object' || tt === null) return tt + var nt = tt[Symbol.toPrimitive] + if (nt !== void 0) { + var rt = nt.call(tt, et || 'default') + if (_typeof$2(rt) !== 'object') return rt + throw new TypeError('@@toPrimitive must return a primitive value.') + } + return (et === 'string' ? String : Number)(tt) + } + var AccessibilityManager = (function () { + function tt() { + _classCallCheck$2(this, tt), + _defineProperty$2(this, 'activeIndex', 0), + _defineProperty$2(this, 'coordinateList', []), + _defineProperty$2(this, 'layout', 'horizontal') + } + return ( + _createClass$2(tt, [ + { + key: 'setDetails', + value: function (nt) { + var rt = nt.coordinateList, + it = rt === void 0 ? [] : rt, + ot = nt.container, + at = ot === void 0 ? null : ot, + st = nt.layout, + lt = st === void 0 ? null : st, + ct = nt.offset, + ut = ct === void 0 ? null : ct, + ht = nt.mouseHandlerCallback, + dt = ht === void 0 ? null : ht + ;(this.coordinateList = it ?? this.coordinateList), + (this.container = at ?? this.container), + (this.layout = lt ?? this.layout), + (this.offset = ut ?? this.offset), + (this.mouseHandlerCallback = dt ?? this.mouseHandlerCallback), + (this.activeIndex = Math.min(Math.max(this.activeIndex, 0), this.coordinateList.length - 1)) + }, + }, + { + key: 'focus', + value: function () { + this.spoofMouse() + }, + }, + { + key: 'keyboardEvent', + value: function (nt) { + if (this.coordinateList.length !== 0) + switch (nt.key) { + case 'ArrowRight': { + if (this.layout !== 'horizontal') return + ;(this.activeIndex = Math.min(this.activeIndex + 1, this.coordinateList.length - 1)), + this.spoofMouse() + break + } + case 'ArrowLeft': { + if (this.layout !== 'horizontal') return + ;(this.activeIndex = Math.max(this.activeIndex - 1, 0)), this.spoofMouse() + break + } + } + }, + }, + { + key: 'spoofMouse', + value: function () { + if (this.layout === 'horizontal' && this.coordinateList.length !== 0) { + var nt = this.container.getBoundingClientRect(), + rt = nt.x, + it = nt.y, + ot = nt.height, + at = this.coordinateList[this.activeIndex].coordinate, + st = rt + at, + lt = it + this.offset.top + ot / 2 + this.mouseHandlerCallback({ pageX: st, pageY: lt }) + } + }, + }, + ]), + tt + ) + })() + function isDomainSpecifiedByUser(tt, et, nt) { + if (nt === 'number' && et === !0 && Array.isArray(tt)) { + var rt = tt == null ? void 0 : tt[0], + it = tt == null ? void 0 : tt[1] + if (rt && it && isNumber(rt) && isNumber(it)) return !0 + } + return !1 + } + function deferer(tt) { + if (typeof requestAnimationFrame == 'function') { + var et = requestAnimationFrame(tt) + return function () { + return cancelAnimationFrame(et) + } + } + if (typeof setImmediate == 'function') { + var nt = setImmediate(tt) + return function () { + return clearImmediate(nt) + } + } + var rt = setTimeout(tt) + return function () { + return clearTimeout(rt) + } + } + function getCursorPoints(tt, et, nt) { + var rt, it, ot, at + if (tt === 'horizontal') (rt = et.x), (ot = rt), (it = nt.top), (at = nt.top + nt.height) + else if (tt === 'vertical') (it = et.y), (at = it), (rt = nt.left), (ot = nt.left + nt.width) + else if (et.cx != null && et.cy != null) + if (tt === 'centric') { + var st = et.cx, + lt = et.cy, + ct = et.innerRadius, + ut = et.outerRadius, + ht = et.angle, + dt = polarToCartesian(st, lt, ct, ht), + pt = polarToCartesian(st, lt, ut, ht) + ;(rt = dt.x), (it = dt.y), (ot = pt.x), (at = pt.y) + } else return getRadialCursorPoints(et) + return [ + { x: rt, y: it }, + { x: ot, y: at }, + ] + } + function getCursorRectangle(tt, et, nt, rt) { + var it = rt / 2 + return { + stroke: 'none', + fill: '#ccc', + x: tt === 'horizontal' ? et.x - it : nt.left + 0.5, + y: tt === 'horizontal' ? nt.top + 0.5 : et.y - it, + width: tt === 'horizontal' ? rt : nt.width - 1, + height: tt === 'horizontal' ? nt.height - 1 : rt, + } + } + var _excluded = ['item'], + _excluded2 = ['children', 'className', 'width', 'height', 'style', 'compact', 'title', 'desc'] + function _typeof$1(tt) { + '@babel/helpers - typeof' + return ( + (_typeof$1 = + typeof Symbol == 'function' && typeof Symbol.iterator == 'symbol' + ? function (et) { + return typeof et + } + : function (et) { + return et && typeof Symbol == 'function' && et.constructor === Symbol && et !== Symbol.prototype + ? 'symbol' + : typeof et + }), + _typeof$1(tt) + ) + } + function _slicedToArray$1(tt, et) { + return ( + _arrayWithHoles$1(tt) || + _iterableToArrayLimit$1(tt, et) || + _unsupportedIterableToArray$3(tt, et) || + _nonIterableRest$1() + ) + } + function _nonIterableRest$1() { + throw new TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`) + } + function _iterableToArrayLimit$1(tt, et) { + var nt = tt == null ? null : (typeof Symbol < 'u' && tt[Symbol.iterator]) || tt['@@iterator'] + if (nt != null) { + var rt, + it, + ot, + at, + st = [], + lt = !0, + ct = !1 + try { + if (((ot = (nt = nt.call(tt)).next), et === 0)) { + if (Object(nt) !== nt) return + lt = !1 + } else for (; !(lt = (rt = ot.call(nt)).done) && (st.push(rt.value), st.length !== et); lt = !0); + } catch (ut) { + ;(ct = !0), (it = ut) + } finally { + try { + if (!lt && nt.return != null && ((at = nt.return()), Object(at) !== at)) return + } finally { + if (ct) throw it + } + } + return st + } + } + function _arrayWithHoles$1(tt) { + if (Array.isArray(tt)) return tt + } + function _extends$1() { + return ( + (_extends$1 = Object.assign + ? Object.assign.bind() + : function (tt) { + for (var et = 1; et < arguments.length; et++) { + var nt = arguments[et] + for (var rt in nt) Object.prototype.hasOwnProperty.call(nt, rt) && (tt[rt] = nt[rt]) + } + return tt + }), + _extends$1.apply(this, arguments) + ) + } + function _objectWithoutProperties(tt, et) { + if (tt == null) return {} + var nt = _objectWithoutPropertiesLoose(tt, et), + rt, + it + if (Object.getOwnPropertySymbols) { + var ot = Object.getOwnPropertySymbols(tt) + for (it = 0; it < ot.length; it++) + (rt = ot[it]), !(et.indexOf(rt) >= 0) && Object.prototype.propertyIsEnumerable.call(tt, rt) && (nt[rt] = tt[rt]) + } + return nt + } + function _objectWithoutPropertiesLoose(tt, et) { + if (tt == null) return {} + var nt = {}, + rt = Object.keys(tt), + it, + ot + for (ot = 0; ot < rt.length; ot++) (it = rt[ot]), !(et.indexOf(it) >= 0) && (nt[it] = tt[it]) + return nt + } + function _classCallCheck$1(tt, et) { + if (!(tt instanceof et)) throw new TypeError('Cannot call a class as a function') + } + function _defineProperties$1(tt, et) { + for (var nt = 0; nt < et.length; nt++) { + var rt = et[nt] + ;(rt.enumerable = rt.enumerable || !1), + (rt.configurable = !0), + 'value' in rt && (rt.writable = !0), + Object.defineProperty(tt, _toPropertyKey(rt.key), rt) + } + } + function _createClass$1(tt, et, nt) { + return ( + et && _defineProperties$1(tt.prototype, et), + nt && _defineProperties$1(tt, nt), + Object.defineProperty(tt, 'prototype', { writable: !1 }), + tt + ) + } + function _inherits$1(tt, et) { + if (typeof et != 'function' && et !== null) + throw new TypeError('Super expression must either be null or a function') + ;(tt.prototype = Object.create(et && et.prototype, { constructor: { value: tt, writable: !0, configurable: !0 } })), + Object.defineProperty(tt, 'prototype', { writable: !1 }), + et && _setPrototypeOf$1(tt, et) + } + function _setPrototypeOf$1(tt, et) { + return ( + (_setPrototypeOf$1 = Object.setPrototypeOf + ? Object.setPrototypeOf.bind() + : function (rt, it) { + return (rt.__proto__ = it), rt + }), + _setPrototypeOf$1(tt, et) + ) + } + function _createSuper$1(tt) { + var et = _isNativeReflectConstruct$1() + return function () { + var rt = _getPrototypeOf$1(tt), + it + if (et) { + var ot = _getPrototypeOf$1(this).constructor + it = Reflect.construct(rt, arguments, ot) + } else it = rt.apply(this, arguments) + return _possibleConstructorReturn$1(this, it) + } + } + function _possibleConstructorReturn$1(tt, et) { + if (et && (_typeof$1(et) === 'object' || typeof et == 'function')) return et + if (et !== void 0) throw new TypeError('Derived constructors may only return object or undefined') + return _assertThisInitialized$1(tt) + } + function _assertThisInitialized$1(tt) { + if (tt === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called") + return tt + } + function _isNativeReflectConstruct$1() { + if (typeof Reflect > 'u' || !Reflect.construct || Reflect.construct.sham) return !1 + if (typeof Proxy == 'function') return !0 + try { + return Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})), !0 + } catch { + return !1 + } + } + function _getPrototypeOf$1(tt) { + return ( + (_getPrototypeOf$1 = Object.setPrototypeOf + ? Object.getPrototypeOf.bind() + : function (nt) { + return nt.__proto__ || Object.getPrototypeOf(nt) + }), + _getPrototypeOf$1(tt) + ) + } + function _toConsumableArray$1(tt) { + return ( + _arrayWithoutHoles$1(tt) || _iterableToArray$1(tt) || _unsupportedIterableToArray$3(tt) || _nonIterableSpread$1() + ) + } + function _nonIterableSpread$1() { + throw new TypeError(`Invalid attempt to spread non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`) + } + function _unsupportedIterableToArray$3(tt, et) { + if (tt) { + if (typeof tt == 'string') return _arrayLikeToArray$3(tt, et) + var nt = Object.prototype.toString.call(tt).slice(8, -1) + if ((nt === 'Object' && tt.constructor && (nt = tt.constructor.name), nt === 'Map' || nt === 'Set')) + return Array.from(tt) + if (nt === 'Arguments' || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(nt)) return _arrayLikeToArray$3(tt, et) + } + } + function _iterableToArray$1(tt) { + if ((typeof Symbol < 'u' && tt[Symbol.iterator] != null) || tt['@@iterator'] != null) return Array.from(tt) + } + function _arrayWithoutHoles$1(tt) { + if (Array.isArray(tt)) return _arrayLikeToArray$3(tt) + } + function _arrayLikeToArray$3(tt, et) { + ;(et == null || et > tt.length) && (et = tt.length) + for (var nt = 0, rt = new Array(et); nt < et; nt++) rt[nt] = tt[nt] + return rt + } + function ownKeys$1(tt, et) { + var nt = Object.keys(tt) + if (Object.getOwnPropertySymbols) { + var rt = Object.getOwnPropertySymbols(tt) + et && + (rt = rt.filter(function (it) { + return Object.getOwnPropertyDescriptor(tt, it).enumerable + })), + nt.push.apply(nt, rt) + } + return nt + } + function _objectSpread$1(tt) { + for (var et = 1; et < arguments.length; et++) { + var nt = arguments[et] != null ? arguments[et] : {} + et % 2 + ? ownKeys$1(Object(nt), !0).forEach(function (rt) { + _defineProperty$1(tt, rt, nt[rt]) + }) + : Object.getOwnPropertyDescriptors + ? Object.defineProperties(tt, Object.getOwnPropertyDescriptors(nt)) + : ownKeys$1(Object(nt)).forEach(function (rt) { + Object.defineProperty(tt, rt, Object.getOwnPropertyDescriptor(nt, rt)) + }) + } + return tt + } + function _defineProperty$1(tt, et, nt) { + return ( + (et = _toPropertyKey(et)), + et in tt + ? Object.defineProperty(tt, et, { value: nt, enumerable: !0, configurable: !0, writable: !0 }) + : (tt[et] = nt), + tt + ) + } + function _toPropertyKey(tt) { + var et = _toPrimitive(tt, 'string') + return _typeof$1(et) === 'symbol' ? et : String(et) + } + function _toPrimitive(tt, et) { + if (_typeof$1(tt) !== 'object' || tt === null) return tt + var nt = tt[Symbol.toPrimitive] + if (nt !== void 0) { + var rt = nt.call(tt, et || 'default') + if (_typeof$1(rt) !== 'object') return rt + throw new TypeError('@@toPrimitive must return a primitive value.') + } + return (et === 'string' ? String : Number)(tt) + } + var ORIENT_MAP = { xAxis: ['bottom', 'top'], yAxis: ['left', 'right'] }, + originCoordinate = { x: 0, y: 0 }, + isFinit = Number.isFinite ? Number.isFinite : isFinite, + calculateTooltipPos = function (et, nt) { + return nt === 'horizontal' ? et.x : nt === 'vertical' ? et.y : nt === 'centric' ? et.angle : et.radius + }, + getActiveCoordinate = function (et, nt, rt, it) { + var ot = nt.find(function (ut) { + return ut && ut.index === rt + }) + if (ot) { + if (et === 'horizontal') return { x: ot.coordinate, y: it.y } + if (et === 'vertical') return { x: it.x, y: ot.coordinate } + if (et === 'centric') { + var at = ot.coordinate, + st = it.radius + return _objectSpread$1( + _objectSpread$1(_objectSpread$1({}, it), polarToCartesian(it.cx, it.cy, st, at)), + {}, + { angle: at, radius: st }, + ) + } + var lt = ot.coordinate, + ct = it.angle + return _objectSpread$1( + _objectSpread$1(_objectSpread$1({}, it), polarToCartesian(it.cx, it.cy, lt, ct)), + {}, + { angle: ct, radius: lt }, + ) + } + return originCoordinate + }, + getDisplayedData = function (et, nt, rt) { + var it = nt.graphicalItems, + ot = nt.dataStartIndex, + at = nt.dataEndIndex, + st = (it || []).reduce(function (lt, ct) { + var ut = ct.props.data + return ut && ut.length ? [].concat(_toConsumableArray$1(lt), _toConsumableArray$1(ut)) : lt + }, []) + return st && st.length > 0 + ? st + : rt && rt.props && rt.props.data && rt.props.data.length > 0 + ? rt.props.data + : et && et.length && isNumber(ot) && isNumber(at) + ? et.slice(ot, at + 1) + : [] + } + function getDefaultDomainByAxisType(tt) { + return tt === 'number' ? [0, 'auto'] : void 0 + } + var getTooltipContent = function (et, nt, rt, it) { + var ot = et.graphicalItems, + at = et.tooltipAxis, + st = getDisplayedData(nt, et) + return rt < 0 || !ot || !ot.length || rt >= st.length + ? null + : ot.reduce(function (lt, ct) { + var ut = ct.props.hide + if (ut) return lt + var ht = ct.props.data, + dt = ht === void 0 ? nt : ht, + pt + if (at.dataKey && !at.allowDuplicatedCategory) { + var mt = dt === void 0 ? st : dt + pt = findEntryInArray(mt, at.dataKey, it) + } else pt = (dt && dt[rt]) || st[rt] + return pt ? [].concat(_toConsumableArray$1(lt), [getTooltipItem(ct, pt)]) : lt + }, []) + }, + getTooltipData = function (et, nt, rt, it) { + var ot = it || { x: et.chartX, y: et.chartY }, + at = calculateTooltipPos(ot, rt), + st = et.orderedTooltipTicks, + lt = et.tooltipAxis, + ct = et.tooltipTicks, + ut = calculateActiveTickIndex(at, st, ct, lt) + if (ut >= 0 && ct) { + var ht = ct[ut] && ct[ut].value, + dt = getTooltipContent(et, nt, ut, ht), + pt = getActiveCoordinate(rt, st, ut, ot) + return { activeTooltipIndex: ut, activeLabel: ht, activePayload: dt, activeCoordinate: pt } + } + return null + }, + getAxisMapByAxes = function (et, nt) { + var rt = nt.axes, + it = nt.graphicalItems, + ot = nt.axisType, + at = nt.axisIdKey, + st = nt.stackGroups, + lt = nt.dataStartIndex, + ct = nt.dataEndIndex, + ut = et.layout, + ht = et.children, + dt = et.stackOffset, + pt = isCategoricalAxis(ut, ot), + mt = rt.reduce(function (gt, yt) { + var bt, + vt = yt.props, + xt = vt.type, + kt = vt.dataKey, + St = vt.allowDataOverflow, + Tt = vt.allowDuplicatedCategory, + At = vt.scale, + Et = vt.ticks, + $t = vt.includeHidden, + Dt = yt.props[at] + if (gt[Dt]) return gt + var jt = getDisplayedData(et.data, { + graphicalItems: it.filter(function (Ht) { + return Ht.props[at] === Dt + }), + dataStartIndex: lt, + dataEndIndex: ct, + }), + Pt = jt.length, + Ct, + wt, + It + isDomainSpecifiedByUser(yt.props.domain, St, xt) && + ((Ct = parseSpecifiedDomain(yt.props.domain, null, St)), + pt && (xt === 'number' || At !== 'auto') && (It = getDomainOfDataByKey(jt, kt, 'category'))) + var Ot = getDefaultDomainByAxisType(xt) + if (!Ct || Ct.length === 0) { + var Wt, + zt = (Wt = yt.props.domain) !== null && Wt !== void 0 ? Wt : Ot + if (kt) { + if (((Ct = getDomainOfDataByKey(jt, kt, xt)), xt === 'category' && pt)) { + var Ft = hasDuplicate(Ct) + Tt && Ft + ? ((wt = Ct), (Ct = _range(0, Pt))) + : Tt || + (Ct = parseDomainOfCategoryAxis(zt, Ct, yt).reduce(function (Ht, en) { + return Ht.indexOf(en) >= 0 ? Ht : [].concat(_toConsumableArray$1(Ht), [en]) + }, [])) + } else if (xt === 'category') + Tt + ? (Ct = Ct.filter(function (Ht) { + return Ht !== '' && !_isNil(Ht) + })) + : (Ct = parseDomainOfCategoryAxis(zt, Ct, yt).reduce(function (Ht, en) { + return Ht.indexOf(en) >= 0 || en === '' || _isNil(en) + ? Ht + : [].concat(_toConsumableArray$1(Ht), [en]) + }, [])) + else if (xt === 'number') { + var Nt = parseErrorBarsOfAxis( + jt, + it.filter(function (Ht) { + return Ht.props[at] === Dt && ($t || !Ht.props.hide) + }), + kt, + ot, + ut, + ) + Nt && (Ct = Nt) + } + pt && (xt === 'number' || At !== 'auto') && (It = getDomainOfDataByKey(jt, kt, 'category')) + } else + pt + ? (Ct = _range(0, Pt)) + : st && st[Dt] && st[Dt].hasStack && xt === 'number' + ? (Ct = dt === 'expand' ? [0, 1] : getDomainOfStackGroups(st[Dt].stackGroups, lt, ct)) + : (Ct = getDomainOfItemsWithSameAxis( + jt, + it.filter(function (Ht) { + return Ht.props[at] === Dt && ($t || !Ht.props.hide) + }), + xt, + ut, + !0, + )) + if (xt === 'number') + (Ct = detectReferenceElementsDomain(ht, Ct, Dt, ot, Et)), zt && (Ct = parseSpecifiedDomain(zt, Ct, St)) + else if (xt === 'category' && zt) { + var Ut = zt, + Mt = Ct.every(function (Ht) { + return Ut.indexOf(Ht) >= 0 + }) + Mt && (Ct = Ut) + } + } + return _objectSpread$1( + _objectSpread$1({}, gt), + {}, + _defineProperty$1( + {}, + Dt, + _objectSpread$1( + _objectSpread$1({}, yt.props), + {}, + { + axisType: ot, + domain: Ct, + categoricalDomain: It, + duplicateDomain: wt, + originalDomain: (bt = yt.props.domain) !== null && bt !== void 0 ? bt : Ot, + isCategorical: pt, + layout: ut, + }, + ), + ), + ) + }, {}) + return mt + }, + getAxisMapByItems = function (et, nt) { + var rt = nt.graphicalItems, + it = nt.Axis, + ot = nt.axisType, + at = nt.axisIdKey, + st = nt.stackGroups, + lt = nt.dataStartIndex, + ct = nt.dataEndIndex, + ut = et.layout, + ht = et.children, + dt = getDisplayedData(et.data, { graphicalItems: rt, dataStartIndex: lt, dataEndIndex: ct }), + pt = dt.length, + mt = isCategoricalAxis(ut, ot), + gt = -1, + yt = rt.reduce(function (bt, vt) { + var xt = vt.props[at], + kt = getDefaultDomainByAxisType('number') + if (!bt[xt]) { + gt++ + var St + return ( + mt + ? (St = _range(0, pt)) + : st && st[xt] && st[xt].hasStack + ? ((St = getDomainOfStackGroups(st[xt].stackGroups, lt, ct)), + (St = detectReferenceElementsDomain(ht, St, xt, ot))) + : ((St = parseSpecifiedDomain( + kt, + getDomainOfItemsWithSameAxis( + dt, + rt.filter(function (Tt) { + return Tt.props[at] === xt && !Tt.props.hide + }), + 'number', + ut, + ), + it.defaultProps.allowDataOverflow, + )), + (St = detectReferenceElementsDomain(ht, St, xt, ot))), + _objectSpread$1( + _objectSpread$1({}, bt), + {}, + _defineProperty$1( + {}, + xt, + _objectSpread$1( + _objectSpread$1({ axisType: ot }, it.defaultProps), + {}, + { + hide: !0, + orientation: _get(ORIENT_MAP, ''.concat(ot, '.').concat(gt % 2), null), + domain: St, + originalDomain: kt, + isCategorical: mt, + layout: ut, + }, + ), + ), + ) + ) + } + return bt + }, {}) + return yt + }, + getAxisMap = function (et, nt) { + var rt = nt.axisType, + it = rt === void 0 ? 'xAxis' : rt, + ot = nt.AxisComp, + at = nt.graphicalItems, + st = nt.stackGroups, + lt = nt.dataStartIndex, + ct = nt.dataEndIndex, + ut = et.children, + ht = ''.concat(it, 'Id'), + dt = findAllByType(ut, ot), + pt = {} + return ( + dt && dt.length + ? (pt = getAxisMapByAxes(et, { + axes: dt, + graphicalItems: at, + axisType: it, + axisIdKey: ht, + stackGroups: st, + dataStartIndex: lt, + dataEndIndex: ct, + })) + : at && + at.length && + (pt = getAxisMapByItems(et, { + Axis: ot, + graphicalItems: at, + axisType: it, + axisIdKey: ht, + stackGroups: st, + dataStartIndex: lt, + dataEndIndex: ct, + })), + pt + ) + }, + tooltipTicksGenerator = function (et) { + var nt = getAnyElementOfObject(et), + rt = getTicksOfAxis(nt, !1, !0) + return { + tooltipTicks: rt, + orderedTooltipTicks: _sortBy(rt, function (it) { + return it.coordinate + }), + tooltipAxis: nt, + tooltipAxisBandSize: getBandSizeOfAxis(nt, rt), + } + }, + createDefaultState = function (et) { + var nt, + rt, + it = et.children, + ot = et.defaultShowTooltip, + at = findChildByType(it, Brush), + st = (at && at.props && at.props.startIndex) || 0, + lt = + (at == null || (nt = at.props) === null || nt === void 0 ? void 0 : nt.endIndex) !== void 0 + ? at == null || (rt = at.props) === null || rt === void 0 + ? void 0 + : rt.endIndex + : (et.data && et.data.length - 1) || 0 + return { + chartX: 0, + chartY: 0, + dataStartIndex: st, + dataEndIndex: lt, + activeTooltipIndex: -1, + isTooltipActive: _isNil(ot) ? !1 : ot, + } + }, + hasGraphicalBarItem = function (et) { + return !et || !et.length + ? !1 + : et.some(function (nt) { + var rt = getDisplayName(nt && nt.type) + return rt && rt.indexOf('Bar') >= 0 + }) + }, + getAxisNameByLayout = function (et) { + return et === 'horizontal' + ? { numericAxisName: 'yAxis', cateAxisName: 'xAxis' } + : et === 'vertical' + ? { numericAxisName: 'xAxis', cateAxisName: 'yAxis' } + : et === 'centric' + ? { numericAxisName: 'radiusAxis', cateAxisName: 'angleAxis' } + : { numericAxisName: 'angleAxis', cateAxisName: 'radiusAxis' } + }, + calculateOffset = function (et, nt) { + var rt = et.props, + it = et.graphicalItems, + ot = et.xAxisMap, + at = ot === void 0 ? {} : ot, + st = et.yAxisMap, + lt = st === void 0 ? {} : st, + ct = rt.width, + ut = rt.height, + ht = rt.children, + dt = rt.margin || {}, + pt = findChildByType(ht, Brush), + mt = findChildByType(ht, Legend), + gt = Object.keys(lt).reduce( + function (xt, kt) { + var St = lt[kt], + Tt = St.orientation + return !St.mirror && !St.hide + ? _objectSpread$1(_objectSpread$1({}, xt), {}, _defineProperty$1({}, Tt, xt[Tt] + St.width)) + : xt + }, + { left: dt.left || 0, right: dt.right || 0 }, + ), + yt = Object.keys(at).reduce( + function (xt, kt) { + var St = at[kt], + Tt = St.orientation + return !St.mirror && !St.hide + ? _objectSpread$1( + _objectSpread$1({}, xt), + {}, + _defineProperty$1({}, Tt, _get(xt, ''.concat(Tt)) + St.height), + ) + : xt + }, + { top: dt.top || 0, bottom: dt.bottom || 0 }, + ), + bt = _objectSpread$1(_objectSpread$1({}, yt), gt), + vt = bt.bottom + return ( + pt && (bt.bottom += pt.props.height || Brush.defaultProps.height), + mt && nt && (bt = appendOffsetOfLegend(bt, it, rt, nt)), + _objectSpread$1( + _objectSpread$1({ brushBottom: vt }, bt), + {}, + { width: ct - bt.left - bt.right, height: ut - bt.top - bt.bottom }, + ) + ) + }, + generateCategoricalChart = function (et) { + var nt, + rt = et.chartName, + it = et.GraphicalChild, + ot = et.defaultTooltipEventType, + at = ot === void 0 ? 'axis' : ot, + st = et.validateTooltipEventTypes, + lt = st === void 0 ? ['axis'] : st, + ct = et.axisComponents, + ut = et.legendContent, + ht = et.formatAxisMap, + dt = et.defaultProps, + pt = function (yt, bt) { + var vt = bt.graphicalItems, + xt = bt.stackGroups, + kt = bt.offset, + St = bt.updateId, + Tt = bt.dataStartIndex, + At = bt.dataEndIndex, + Et = yt.barSize, + $t = yt.layout, + Dt = yt.barGap, + jt = yt.barCategoryGap, + Pt = yt.maxBarSize, + Ct = getAxisNameByLayout($t), + wt = Ct.numericAxisName, + It = Ct.cateAxisName, + Ot = hasGraphicalBarItem(vt), + Wt = Ot && getBarSizeList({ barSize: Et, stackGroups: xt }), + zt = [] + return ( + vt.forEach(function (Ft, Nt) { + var Ut = getDisplayedData(yt.data, { dataStartIndex: Tt, dataEndIndex: At }, Ft), + Mt = Ft.props, + Ht = Mt.dataKey, + en = Mt.maxBarSize, + sn = Ft.props[''.concat(wt, 'Id')], + Kt = Ft.props[''.concat(It, 'Id')], + rn = {}, + nn = ct.reduce(function (An, wn) { + var fn, + pn = bt[''.concat(wn.axisType, 'Map')], + kn = Ft.props[''.concat(wn.axisType, 'Id')] + ;(pn && pn[kn]) || wn.axisType === 'zAxis' || invariant(!1) + var Dn = pn[kn] + return _objectSpread$1( + _objectSpread$1({}, An), + {}, + ((fn = {}), + _defineProperty$1(fn, wn.axisType, Dn), + _defineProperty$1(fn, ''.concat(wn.axisType, 'Ticks'), getTicksOfAxis(Dn)), + fn), + ) + }, rn), + hn = nn[It], + vn = nn[''.concat(It, 'Ticks')], + an = xt && xt[sn] && xt[sn].hasStack && getStackedDataOfItem(Ft, xt[sn].stackGroups), + Qt = getDisplayName(Ft.type).indexOf('Bar') >= 0, + _n = getBandSizeOfAxis(hn, vn), + Pn = [] + if (Qt) { + var $n, + Nn, + Tn = _isNil(en) ? Pt : en, + cn = + ($n = (Nn = getBandSizeOfAxis(hn, vn, !0)) !== null && Nn !== void 0 ? Nn : Tn) !== null && + $n !== void 0 + ? $n + : 0 + ;(Pn = getBarPosition({ + barGap: Dt, + barCategoryGap: jt, + bandSize: cn !== _n ? cn : _n, + sizeList: Wt[Kt], + maxBarSize: Tn, + })), + cn !== _n && + (Pn = Pn.map(function (An) { + return _objectSpread$1( + _objectSpread$1({}, An), + {}, + { + position: _objectSpread$1( + _objectSpread$1({}, An.position), + {}, + { offset: An.position.offset - cn / 2 }, + ), + }, + ) + })) + } + var mn = Ft && Ft.type && Ft.type.getComposedData + if (mn) { + var In + zt.push({ + props: _objectSpread$1( + _objectSpread$1( + {}, + mn( + _objectSpread$1( + _objectSpread$1({}, nn), + {}, + { + displayedData: Ut, + props: yt, + dataKey: Ht, + item: Ft, + bandSize: _n, + barPosition: Pn, + offset: kt, + stackedData: an, + layout: $t, + dataStartIndex: Tt, + dataEndIndex: At, + }, + ), + ), + ), + {}, + ((In = { key: Ft.key || 'item-'.concat(Nt) }), + _defineProperty$1(In, wt, nn[wt]), + _defineProperty$1(In, It, nn[It]), + _defineProperty$1(In, 'animationId', St), + In), + ), + childIndex: parseChildIndex(Ft, yt.children), + item: Ft, + }) + } + }), + zt + ) + }, + mt = function (yt, bt) { + var vt = yt.props, + xt = yt.dataStartIndex, + kt = yt.dataEndIndex, + St = yt.updateId + if (!validateWidthHeight({ props: vt })) return null + var Tt = vt.children, + At = vt.layout, + Et = vt.stackOffset, + $t = vt.data, + Dt = vt.reverseStackOrder, + jt = getAxisNameByLayout(At), + Pt = jt.numericAxisName, + Ct = jt.cateAxisName, + wt = findAllByType(Tt, it), + It = getStackGroupsByAxisId($t, wt, ''.concat(Pt, 'Id'), ''.concat(Ct, 'Id'), Et, Dt), + Ot = ct.reduce(function (Ut, Mt) { + var Ht = ''.concat(Mt.axisType, 'Map') + return _objectSpread$1( + _objectSpread$1({}, Ut), + {}, + _defineProperty$1( + {}, + Ht, + getAxisMap( + vt, + _objectSpread$1( + _objectSpread$1({}, Mt), + {}, + { + graphicalItems: wt, + stackGroups: Mt.axisType === Pt && It, + dataStartIndex: xt, + dataEndIndex: kt, + }, + ), + ), + ), + ) + }, {}), + Wt = calculateOffset( + _objectSpread$1(_objectSpread$1({}, Ot), {}, { props: vt, graphicalItems: wt }), + bt == null ? void 0 : bt.legendBBox, + ) + Object.keys(Ot).forEach(function (Ut) { + Ot[Ut] = ht(vt, Ot[Ut], Wt, Ut.replace('Map', ''), rt) + }) + var zt = Ot[''.concat(Ct, 'Map')], + Ft = tooltipTicksGenerator(zt), + Nt = pt( + vt, + _objectSpread$1( + _objectSpread$1({}, Ot), + {}, + { dataStartIndex: xt, dataEndIndex: kt, updateId: St, graphicalItems: wt, stackGroups: It, offset: Wt }, + ), + ) + return _objectSpread$1( + _objectSpread$1({ formattedGraphicalItems: Nt, graphicalItems: wt, offset: Wt, stackGroups: It }, Ft), + Ot, + ) + } + return ( + (nt = (function (gt) { + _inherits$1(bt, gt) + var yt = _createSuper$1(bt) + function bt(vt) { + var xt + return ( + _classCallCheck$1(this, bt), + (xt = yt.call(this, vt)), + _defineProperty$1(_assertThisInitialized$1(xt), 'accessibilityManager', new AccessibilityManager()), + _defineProperty$1(_assertThisInitialized$1(xt), 'clearDefer', function () { + xt.cancelDefer && (xt.cancelDefer(), (xt.cancelDefer = null)) + }), + _defineProperty$1(_assertThisInitialized$1(xt), 'handleLegendBBoxUpdate', function (kt) { + if (kt) { + var St = xt.state, + Tt = St.dataStartIndex, + At = St.dataEndIndex, + Et = St.updateId + xt.setState( + _objectSpread$1( + { legendBBox: kt }, + mt( + { props: xt.props, dataStartIndex: Tt, dataEndIndex: At, updateId: Et }, + _objectSpread$1(_objectSpread$1({}, xt.state), {}, { legendBBox: kt }), + ), + ), + ) } - `,fragmentShader:` - #define NORMAL - #if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( TANGENTSPACE_NORMALMAP ) - varying vec3 vViewPosition; - #endif - #include - #include - #include - #include - #include - #include - #include - #include - - #ifdef USE_MRT - layout(location = 0) out vec4 gNormal; - layout(location = 1) out vec4 gDepth; - - varying vec2 vHighPrecisionZW; - #endif - uniform float roughness; - void main() { - #include - #include - #include - #include - - float roughnessFactor = roughness; - - if(roughness > 10.0e9){ - roughnessFactor = 1.; - }else{ - #ifdef useRoughnessMap - vec4 texelRoughness = texture2D( roughnessMap, vUv ); - // reads channel G, compatible with a combined OcclusionRoughnessMetallic (RGB) texture - roughnessFactor *= texelRoughness.g; - #endif - } - - vec3 normalColor = packNormalToRGB( normal ); - #ifdef USE_MRT - float fragCoordZ = 0.5 * vHighPrecisionZW[0] / vHighPrecisionZW[1] + 0.5; - vec4 depthColor = packDepthToRGBA( fragCoordZ ); - gNormal = vec4( normalColor, roughnessFactor ); - gDepth = depthColor; - #else - gl_FragColor = vec4(normalColor, roughnessFactor); - #endif + }), + _defineProperty$1(_assertThisInitialized$1(xt), 'handleReceiveSyncEvent', function (kt, St, Tt) { + var At = xt.props.syncId + At === kt && + St !== xt.uniqueChartId && + (xt.clearDefer(), + (xt.cancelDefer = deferer(xt.applySyncEvent.bind(_assertThisInitialized$1(xt), Tt)))) + }), + _defineProperty$1(_assertThisInitialized$1(xt), 'handleBrushChange', function (kt) { + var St = kt.startIndex, + Tt = kt.endIndex + if (St !== xt.state.dataStartIndex || Tt !== xt.state.dataEndIndex) { + var At = xt.state.updateId + xt.setState(function () { + return _objectSpread$1( + { dataStartIndex: St, dataEndIndex: Tt }, + mt({ props: xt.props, dataStartIndex: St, dataEndIndex: Tt, updateId: At }, xt.state), + ) + }), + xt.triggerSyncEvent({ dataStartIndex: St, dataEndIndex: Tt }) } - `,toneMapped:!1}),this.normalMapType=TangentSpaceNormalMap,this.normalScale=new Vector2(1,1),Object.defineProperty(this,"glslVersion",{get(){return"USE_MRT"in this.defines?GLSL3:null},set(et){}})}}var vertexShader$1=`#define GLSLIFY 1 -varying vec2 vUv;void main(){vUv=position.xy*0.5+0.5;gl_Position=vec4(position.xy,1.0,1.0);}`,fragmentShader=`#define GLSLIFY 1 -varying vec2 vUv;uniform sampler2D inputTexture;uniform sampler2D accumulatedTexture;uniform sampler2D normalTexture;uniform sampler2D depthTexture;uniform sampler2D envMap;uniform mat4 _projectionMatrix;uniform mat4 _inverseProjectionMatrix;uniform mat4 cameraMatrixWorld;uniform float cameraNear;uniform float cameraFar;uniform float rayDistance;uniform float intensity;uniform float maxDepthDifference;uniform float roughnessFade;uniform float maxRoughness;uniform float fade;uniform float thickness;uniform float ior;uniform float samples;uniform float jitter;uniform float jitterRoughness; -#define INVALID_RAY_COORDS vec2(-1.0); -#define EARLY_OUT_COLOR vec4(0.0, 0.0, 0.0, 1.0) -#define FLOAT_EPSILON 0.00001 -float nearMinusFar;float nearMulFar;float farMinusNear; -#include -#include -vec2 RayMarch(vec3 dir,inout vec3 hitPos,inout float rayHitDepthDifference);vec2 BinarySearch(in vec3 dir,inout vec3 hitPos,inout float rayHitDepthDifference);float fastGetViewZ(const in float depth);vec3 getIBLRadiance(const in vec3 viewDir,const in vec3 normal,const in float roughness);void main(){vec4 depthTexel=textureLod(depthTexture,vUv,0.0);if(dot(depthTexel.rgb,depthTexel.rgb)1.0)jitterMix=1.0;jitt=mix(vec3(0.0),randomJitter*spread,jitterMix);}viewNormal+=jitt;float fresnelFactor=fresnel_dielectric(viewDir,viewNormal,ior);vec3 iblRadiance=getIBLRadiance(-viewDir,viewNormal,0.)*fresnelFactor;float lastFrameAlpha=textureLod(accumulatedTexture,vUv,0.0).a;if(roughness>maxRoughness||(roughness>1.0-FLOAT_EPSILON&&roughnessFade>1.0-FLOAT_EPSILON)){gl_FragColor=vec4(iblRadiance,lastFrameAlpha);return;}vec3 reflected=reflect(viewDir,viewNormal);vec3 rayDir=reflected*-viewPos.z;vec3 hitPos=viewPos;float rayHitDepthDifference;vec2 coords=RayMarch(rayDir,hitPos,rayHitDepthDifference);if(coords.x==-1.0){gl_FragColor=vec4(iblRadiance,lastFrameAlpha);return;}vec4 SSRTexel=textureLod(inputTexture,coords.xy,0.0);vec4 SSRTexelReflected=textureLod(accumulatedTexture,coords.xy,0.0);vec3 SSR=SSRTexel.rgb+SSRTexelReflected.rgb;float roughnessFactor=mix(specular,1.0,max(0.0,1.0-roughnessFade));vec2 coordsNDC=(coords.xy*2.0-1.0);float screenFade=0.1;float maxDimension=min(1.0,max(abs(coordsNDC.x),abs(coordsNDC.y)));float reflectionIntensity=1.0-(max(0.0,maxDimension-screenFade)/(1.0-screenFade));reflectionIntensity=max(0.,reflectionIntensity);vec3 finalSSR=mix(iblRadiance,SSR,reflectionIntensity)*roughnessFactor;if(fade!=0.0){vec3 hitWorldPos=screenSpaceToWorldSpace(coords,rayHitDepthDifference);float reflectionDistance=distance(hitWorldPos,worldPos)+1.0;float opacity=1.0/(reflectionDistance*fade*0.1);if(opacity>1.0)opacity=1.0;finalSSR*=opacity;}finalSSR*=fresnelFactor*intensity;finalSSR=min(vec3(1.0),finalSSR);float alpha=hitPos.z==1.0 ? 1.0 : SSRTexelReflected.a;alpha=min(lastFrameAlpha,alpha);gl_FragColor=vec4(finalSSR,alpha);}vec2 RayMarch(vec3 dir,inout vec3 hitPos,inout float rayHitDepthDifference){dir=normalize(dir);dir*=rayDistance/float(steps);float depth;vec4 projectedCoord;vec4 lastProjectedCoord;float unpackedDepth;vec4 depthTexel;for(int i=0;i1.0||projectedCoord.y<0.0||projectedCoord.y>1.0){return INVALID_RAY_COORDS;} -#endif -depthTexel=textureLod(depthTexture,projectedCoord.xy,0.0);unpackedDepth=unpackRGBAToDepth(depthTexel);depth=fastGetViewZ(unpackedDepth);rayHitDepthDifference=depth-hitPos.z;if(rayHitDepthDifference>=0.0&&rayHitDepthDifference0.0){return INVALID_RAY_COORDS;} -#endif -lastProjectedCoord=projectedCoord;}hitPos.z=1.0; -#ifndef missedRays -return INVALID_RAY_COORDS; -#endif -rayHitDepthDifference=unpackedDepth;return projectedCoord.xy;}vec2 BinarySearch(in vec3 dir,inout vec3 hitPos,inout float rayHitDepthDifference){float depth;vec4 projectedCoord;vec2 lastMinProjectedCoordXY;float unpackedDepth;vec4 depthTexel;for(int i=0;i0.0){hitPos-=dir;}else{hitPos+=dir;}}if(dot(depthTexel.rgb,depthTexel.rgb)maxDepthDifference)return INVALID_RAY_COORDS;projectedCoord=_projectionMatrix*vec4(hitPos,1.0);projectedCoord.xy/=projectedCoord.w;projectedCoord.xy=projectedCoord.xy*0.5+0.5;rayHitDepthDifference=unpackedDepth;return projectedCoord.xy;}float fastGetViewZ(const in float depth){ -#ifdef PERSPECTIVE_CAMERA -return nearMulFar/(farMinusNear*depth-cameraFar); -#else -return depth*nearMinusFar-cameraNear; -#endif -} -#include -#include -vec3 getIBLRadiance(const in vec3 viewDir,const in vec3 normal,const in float roughness){ -#if defined(ENVMAP_TYPE_CUBE_UV) -vec3 reflectVec=reflect(-viewDir,normal);reflectVec=normalize(mix(reflectVec,normal,roughness*roughness));reflectVec=inverseTransformDirection(reflectVec,viewMatrix);vec4 envMapColor=textureCubeUV(envMap,reflectVec,roughness);return envMapColor.rgb*intensity; -#else -return vec3(0.0); -#endif -}`;class ReflectionsMaterial extends ShaderMaterial{constructor(){super({type:"ReflectionsMaterial",uniforms:{inputTexture:new Uniform(null),accumulatedTexture:new Uniform(null),normalTexture:new Uniform(null),depthTexture:new Uniform(null),_projectionMatrix:new Uniform(new Matrix4),_inverseProjectionMatrix:new Uniform(new Matrix4),cameraMatrixWorld:new Uniform(new Matrix4),cameraNear:new Uniform(0),cameraFar:new Uniform(0),rayDistance:new Uniform(0),intensity:new Uniform(0),roughnessFade:new Uniform(0),fade:new Uniform(0),thickness:new Uniform(0),ior:new Uniform(0),maxDepthDifference:new Uniform(0),jitter:new Uniform(0),jitterRoughness:new Uniform(0),maxRoughness:new Uniform(0),samples:new Uniform(0),envMap:new Uniform(null),envMapPosition:new Uniform(new Vector3),envMapSize:new Uniform(new Vector3),viewMatrix:new Uniform(new Matrix4)},defines:{steps:20,refineSteps:5,CUBEUV_TEXEL_WIDTH:0,CUBEUV_TEXEL_HEIGHT:0,CUBEUV_MAX_MIP:0,vWorldPosition:"worldPos"},fragmentShader:fragmentShader.replace("#include ",helperFunctions),vertexShader:vertexShader$1,toneMapped:!1,depthWrite:!1,depthTest:!1})}}const getVisibleChildren=tt=>{const et=[tt],nt=[];for(;et.length!==0;){const rt=et.shift();rt.material&&nt.push(rt);for(const it of rt.children)it.visible&&et.push(it)}return nt},generateCubeUVSize=tt=>{const et=tt.envMapCubeUVHeight;if(et===null)return null;const nt=Math.log2(et)-2,rt=1/et;return{texelWidth:1/(3*Math.max(Math.pow(2,nt),7*16)),texelHeight:rt,maxMip:nt}},setupEnvMap=(tt,et,nt)=>{tt.uniforms.envMap.value=et;const rt=generateCubeUVSize({envMapCubeUVHeight:nt});tt.defines.ENVMAP_TYPE_CUBE_UV="",tt.defines.CUBEUV_TEXEL_WIDTH=rt.texelWidth,tt.defines.CUBEUV_TEXEL_HEIGHT=rt.texelHeight,tt.defines.CUBEUV_MAX_MIP=rt.maxMip+".0",tt.needsUpdate=!0},isWebGL2Available=()=>{try{const tt=document.createElement("canvas");return!!(window.WebGL2RenderingContext&&tt.getContext("webgl2"))}catch{return!1}};class ReflectionsPass extends Pass{constructor(et,nt={}){super("ReflectionsPass"),this.ssrEffect=void 0,this.cachedMaterials=new WeakMap,this.USE_MRT=!1,this.webgl1DepthPass=null,this.visibleMeshes=[],this.ssrEffect=et,this._scene=et._scene,this._camera=et._camera,this.fullscreenMaterial=new ReflectionsMaterial,et._camera.isPerspectiveCamera&&(this.fullscreenMaterial.defines.PERSPECTIVE_CAMERA="");const rt=nt.width||typeof window<"u"?window.innerWidth:2e3,it=nt.height||typeof window<"u"?window.innerHeight:1e3;this.renderTarget=new WebGLRenderTarget(rt,it,{minFilter:LinearFilter,magFilter:LinearFilter,type:HalfFloatType,depthBuffer:!1}),this.renderPass=new RenderPass(this._scene,this._camera),this.USE_MRT=isWebGL2Available(),this.USE_MRT?(this.gBuffersRenderTarget=new WebGLMultipleRenderTargets(rt,it,2,{minFilter:LinearFilter,magFilter:LinearFilter}),this.normalTexture=this.gBuffersRenderTarget.texture[0],this.depthTexture=this.gBuffersRenderTarget.texture[1]):(this.webgl1DepthPass=new DepthPass(this._scene,this._camera),this.webgl1DepthPass.renderTarget.minFilter=LinearFilter,this.webgl1DepthPass.renderTarget.magFilter=LinearFilter,this.webgl1DepthPass.renderTarget.texture.minFilter=LinearFilter,this.webgl1DepthPass.renderTarget.texture.magFilter=LinearFilter,this.webgl1DepthPass.setSize(typeof window<"u"?window.innerWidth:2e3,typeof window<"u"?window.innerHeight:1e3),this.gBuffersRenderTarget=new WebGLRenderTarget(rt,it,{minFilter:LinearFilter,magFilter:LinearFilter}),this.normalTexture=this.gBuffersRenderTarget.texture,this.depthTexture=this.webgl1DepthPass.texture),this.fullscreenMaterial.uniforms.normalTexture.value=this.normalTexture,this.fullscreenMaterial.uniforms.depthTexture.value=this.depthTexture,this.fullscreenMaterial.uniforms.accumulatedTexture.value=this.ssrEffect.temporalResolvePass.accumulatedTexture,this.fullscreenMaterial.uniforms.cameraMatrixWorld.value=this._camera.matrixWorld,this.fullscreenMaterial.uniforms._projectionMatrix.value=this._camera.projectionMatrix,this.fullscreenMaterial.uniforms._inverseProjectionMatrix.value=this._camera.projectionMatrixInverse}setSize(et,nt){this.renderTarget.setSize(et*this.ssrEffect.resolutionScale,nt*this.ssrEffect.resolutionScale),this.gBuffersRenderTarget.setSize(et*this.ssrEffect.resolutionScale,nt*this.ssrEffect.resolutionScale),this.fullscreenMaterial.uniforms.accumulatedTexture.value=this.ssrEffect.temporalResolvePass.accumulatedTexture,this.fullscreenMaterial.needsUpdate=!0}dispose(){this.renderTarget.dispose(),this.gBuffersRenderTarget.dispose(),this.renderPass.dispose(),this.USE_MRT||this.webgl1DepthPass.dispose(),this.fullscreenMaterial.dispose(),this.normalTexture=null,this.depthTexture=null,this.velocityTexture=null}keepMaterialMapUpdated(et,nt,rt,it){this.ssrEffect[it]?nt[rt]!==et[rt]&&(et[rt]=nt[rt],et.uniforms[rt].value=nt[rt],nt[rt]?et.defines[it]="":delete et.defines[it],et.needsUpdate=!0):et[rt]!==void 0&&(et[rt]=void 0,et.uniforms[rt].value=void 0,delete et.defines[it],et.needsUpdate=!0)}setMRTMaterialInScene(){this.visibleMeshes=getVisibleChildren(this._scene);for(const et of this.visibleMeshes)if(et.material){const nt=et.material;let[rt,it]=this.cachedMaterials.get(et)||[];if(nt!==rt){it&&it.dispose(),it=new MRTMaterial,this.USE_MRT&&(it.defines.USE_MRT=""),it.normalScale=nt.normalScale,it.uniforms.normalScale.value=nt.normalScale;const ot=nt.map||nt.normalMap||nt.roughnessMap||nt.metalnessMap;ot&&(it.uniforms.uvTransform.value=ot.matrix),this.cachedMaterials.set(et,[nt,it])}this.keepMaterialMapUpdated(it,nt,"normalMap","useNormalMap"),this.keepMaterialMapUpdated(it,nt,"roughnessMap","useRoughnessMap"),it.uniforms.roughness.value=this.ssrEffect.selection.size===0||this.ssrEffect.selection.has(et)?nt.roughness||0:1e11,et.material=it}}unsetMRTMaterialInScene(){for(const nt of this.visibleMeshes){var et;if(((et=nt.material)==null?void 0:et.type)==="MRTMaterial"){nt.visible=!0;const[rt]=this.cachedMaterials.get(nt);nt.material=rt}}}render(et,nt){this.setMRTMaterialInScene(),et.setRenderTarget(this.gBuffersRenderTarget),this.renderPass.render(et,this.gBuffersRenderTarget),this.unsetMRTMaterialInScene(),this.USE_MRT||this.webgl1DepthPass.renderPass.render(et,this.webgl1DepthPass.renderTarget),this.fullscreenMaterial.uniforms.inputTexture.value=nt.texture,this.fullscreenMaterial.uniforms.samples.value=this.ssrEffect.temporalResolvePass.samples,this.fullscreenMaterial.uniforms.cameraNear.value=this._camera.near,this.fullscreenMaterial.uniforms.cameraFar.value=this._camera.far,this.fullscreenMaterial.uniforms.viewMatrix.value.copy(this._camera.matrixWorldInverse),et.setRenderTarget(this.renderTarget),et.render(this.scene,this.camera)}}const defaultSSROptions={intensity:1,exponent:1,distance:10,fade:0,roughnessFade:1,thickness:10,ior:1.45,maxRoughness:1,maxDepthDifference:10,blend:.9,correction:1,correctionRadius:1,blur:.5,blurKernel:1,blurSharpness:10,jitter:0,jitterRoughness:0,steps:20,refineSteps:5,missedRays:!0,useNormalMap:!0,useRoughnessMap:!0,resolutionScale:1,velocityResolutionScale:1};var vertexShader=`#define GLSLIFY 1 -varying vec2 vUv;void main(){vUv=position.xy*0.5+0.5;gl_Position=vec4(position.xy,1.0,1.0);}`,temporalResolve=`#define GLSLIFY 1 -uniform sampler2D inputTexture;uniform sampler2D accumulatedTexture;uniform sampler2D velocityTexture;uniform sampler2D lastVelocityTexture;uniform float blend;uniform float correction;uniform float exponent;uniform float samples;uniform vec2 invTexSize;uniform mat4 curInverseProjectionMatrix;uniform mat4 curCameraMatrixWorld;uniform mat4 prevInverseProjectionMatrix;uniform mat4 prevCameraMatrixWorld;varying vec2 vUv; -#define MAX_NEIGHBOR_DEPTH_DIFFERENCE 0.001 -#define FLOAT_EPSILON 0.00001 -#define FLOAT_ONE_MINUS_EPSILON 0.99999 -vec3 transformexponent;vec3 undoColorTransformExponent;vec3 transformColor(vec3 color){if(exponent==1.0)return color;return pow(abs(color),transformexponent);}vec3 undoColorTransform(vec3 color){if(exponent==1.0)return color;return max(pow(abs(color),undoColorTransformExponent),vec3(0.0));}void main(){if(exponent!=1.0){transformexponent=vec3(1.0/exponent);undoColorTransformExponent=vec3(exponent);}vec4 inputTexel=textureLod(inputTexture,vUv,0.0);vec4 accumulatedTexel;vec3 inputColor=transformColor(inputTexel.rgb);vec3 accumulatedColor;float alpha=inputTexel.a;float velocityDisocclusion;bool didReproject=false; -#ifdef boxBlur -vec3 boxBlurredColor=inputTexel.rgb; -#endif -vec4 velocity=textureLod(velocityTexture,vUv,0.0);bool isMoving=alpha<1.0||dot(velocity.xy,velocity.xy)>0.0;if(isMoving){vec3 minNeighborColor=inputColor;vec3 maxNeighborColor=inputColor;vec3 col;vec2 neighborUv;vec2 reprojectedUv=vUv-velocity.xy;vec4 lastVelocity=textureLod(lastVelocityTexture,reprojectedUv,0.0);float depth=velocity.b;float closestDepth=depth;float lastClosestDepth=lastVelocity.b;float neighborDepth;float lastNeighborDepth;for(int x=-correctionRadius;x<=correctionRadius;x++){for(int y=-correctionRadius;y<=correctionRadius;y++){if(x!=0||y!=0){neighborUv=vUv+vec2(x,y)*invTexSize;vec4 neigborVelocity=textureLod(velocityTexture,neighborUv,0.0);neighborDepth=neigborVelocity.b;col=textureLod(inputTexture,neighborUv,0.0).xyz;int absX=abs(x);int absY=abs(y); -#ifdef dilation -if(absX==1&&absY==1){if(neighborDepth>closestDepth){velocity=neigborVelocity;closestDepth=neighborDepth;}vec4 lastNeighborVelocity=textureLod(velocityTexture,vUv+vec2(x,y)*invTexSize,0.0);lastNeighborDepth=lastNeighborVelocity.b;if(neighborDepth>closestDepth){lastVelocity=lastNeighborVelocity;lastClosestDepth=lastNeighborDepth;}} -#endif -if(abs(depth-neighborDepth)5 ? 121.0 : pow(float(correctionRadius*2+1),2.0);boxBlurredColor/=pxRadius;boxBlurredColor=transformColor(boxBlurredColor); -#endif -if(reprojectedUv.x>=0.0&&reprojectedUv.x<=1.0&&reprojectedUv.y>=0.0&&reprojectedUv.y<=1.0){accumulatedTexel=textureLod(accumulatedTexture,reprojectedUv,0.0);accumulatedColor=transformColor(accumulatedTexel.rgb);vec3 clampedColor=clamp(accumulatedColor,minNeighborColor,maxNeighborColor);accumulatedColor=mix(accumulatedColor,clampedColor,correction);didReproject=true;}else{ -#ifdef boxBlur -accumulatedColor=boxBlurredColor; -#else -accumulatedColor=inputColor; -#endif -}if(velocity.r>FLOAT_ONE_MINUS_EPSILON&&velocity.g>FLOAT_ONE_MINUS_EPSILON){alpha=0.0;velocityDisocclusion=1.0;}}else{accumulatedColor=transformColor(textureLod(accumulatedTexture,vUv,0.0).rgb);}vec3 outputColor=inputColor; -#include -gl_FragColor=vec4(undoColorTransform(outputColor),alpha);}`;class TemporalResolveMaterial extends ShaderMaterial{constructor(et){const nt=temporalResolve.replace("#include ",et);super({type:"TemporalResolveMaterial",uniforms:{inputTexture:new Uniform(null),accumulatedTexture:new Uniform(null),velocityTexture:new Uniform(null),lastVelocityTexture:new Uniform(null),samples:new Uniform(1),blend:new Uniform(.5),correction:new Uniform(1),exponent:new Uniform(1),invTexSize:new Uniform(new Vector2)},defines:{correctionRadius:1},vertexShader,fragmentShader:nt})}}const prev_skinning_pars_vertex=` - #ifdef USE_SKINNING - #ifdef BONE_TEXTURE - uniform sampler2D prevBoneTexture; - mat4 getPrevBoneMatrix( const in float i ) { - float j = i * 4.0; - float x = mod( j, float( boneTextureSize ) ); - float y = floor( j / float( boneTextureSize ) ); - float dx = 1.0 / float( boneTextureSize ); - float dy = 1.0 / float( boneTextureSize ); - y = dy * ( y + 0.5 ); - vec4 v1 = texture2D( prevBoneTexture, vec2( dx * ( x + 0.5 ), y ) ); - vec4 v2 = texture2D( prevBoneTexture, vec2( dx * ( x + 1.5 ), y ) ); - vec4 v3 = texture2D( prevBoneTexture, vec2( dx * ( x + 2.5 ), y ) ); - vec4 v4 = texture2D( prevBoneTexture, vec2( dx * ( x + 3.5 ), y ) ); - mat4 bone = mat4( v1, v2, v3, v4 ); - return bone; + }), + _defineProperty$1(_assertThisInitialized$1(xt), 'handleMouseEnter', function (kt) { + var St = xt.props.onMouseEnter, + Tt = xt.getMouseInfo(kt) + if (Tt) { + var At = _objectSpread$1(_objectSpread$1({}, Tt), {}, { isTooltipActive: !0 }) + xt.setState(At), xt.triggerSyncEvent(At), _isFunction$1(St) && St(At, kt) + } + }), + _defineProperty$1(_assertThisInitialized$1(xt), 'triggeredAfterMouseMove', function (kt) { + var St = xt.props.onMouseMove, + Tt = xt.getMouseInfo(kt), + At = Tt + ? _objectSpread$1(_objectSpread$1({}, Tt), {}, { isTooltipActive: !0 }) + : { isTooltipActive: !1 } + xt.setState(At), xt.triggerSyncEvent(At), _isFunction$1(St) && St(At, kt) + }), + _defineProperty$1(_assertThisInitialized$1(xt), 'handleItemMouseEnter', function (kt) { + xt.setState(function () { + return { + isTooltipActive: !0, + activeItem: kt, + activePayload: kt.tooltipPayload, + activeCoordinate: kt.tooltipPosition || { x: kt.cx, y: kt.cy }, + } + }) + }), + _defineProperty$1(_assertThisInitialized$1(xt), 'handleItemMouseLeave', function () { + xt.setState(function () { + return { isTooltipActive: !1 } + }) + }), + _defineProperty$1(_assertThisInitialized$1(xt), 'handleMouseMove', function (kt) { + kt && _isFunction$1(kt.persist) && kt.persist(), xt.triggeredAfterMouseMove(kt) + }), + _defineProperty$1(_assertThisInitialized$1(xt), 'handleMouseLeave', function (kt) { + var St = xt.props.onMouseLeave, + Tt = { isTooltipActive: !1 } + xt.setState(Tt), + xt.triggerSyncEvent(Tt), + _isFunction$1(St) && St(Tt, kt), + xt.cancelThrottledTriggerAfterMouseMove() + }), + _defineProperty$1(_assertThisInitialized$1(xt), 'handleOuterEvent', function (kt) { + var St = getReactEventByType(kt), + Tt = _get(xt.props, ''.concat(St)) + if (St && _isFunction$1(Tt)) { + var At + ;/.*touch.*/i.test(St) ? (At = xt.getMouseInfo(kt.changedTouches[0])) : (At = xt.getMouseInfo(kt)) + var Et = Tt + Et(At, kt) + } + }), + _defineProperty$1(_assertThisInitialized$1(xt), 'handleClick', function (kt) { + var St = xt.props.onClick, + Tt = xt.getMouseInfo(kt) + if (Tt) { + var At = _objectSpread$1(_objectSpread$1({}, Tt), {}, { isTooltipActive: !0 }) + xt.setState(At), xt.triggerSyncEvent(At), _isFunction$1(St) && St(At, kt) + } + }), + _defineProperty$1(_assertThisInitialized$1(xt), 'handleMouseDown', function (kt) { + var St = xt.props.onMouseDown + if (_isFunction$1(St)) { + var Tt = xt.getMouseInfo(kt) + St(Tt, kt) + } + }), + _defineProperty$1(_assertThisInitialized$1(xt), 'handleMouseUp', function (kt) { + var St = xt.props.onMouseUp + if (_isFunction$1(St)) { + var Tt = xt.getMouseInfo(kt) + St(Tt, kt) + } + }), + _defineProperty$1(_assertThisInitialized$1(xt), 'handleTouchMove', function (kt) { + kt.changedTouches != null && kt.changedTouches.length > 0 && xt.handleMouseMove(kt.changedTouches[0]) + }), + _defineProperty$1(_assertThisInitialized$1(xt), 'handleTouchStart', function (kt) { + kt.changedTouches != null && kt.changedTouches.length > 0 && xt.handleMouseDown(kt.changedTouches[0]) + }), + _defineProperty$1(_assertThisInitialized$1(xt), 'handleTouchEnd', function (kt) { + kt.changedTouches != null && kt.changedTouches.length > 0 && xt.handleMouseUp(kt.changedTouches[0]) + }), + _defineProperty$1(_assertThisInitialized$1(xt), 'verticalCoordinatesGenerator', function (kt, St) { + var Tt = kt.xAxis, + At = kt.width, + Et = kt.height, + $t = kt.offset + return getCoordinatesOfGrid( + getTicks( + _objectSpread$1( + _objectSpread$1(_objectSpread$1({}, CartesianAxis.defaultProps), Tt), + {}, + { ticks: getTicksOfAxis(Tt, !0), viewBox: { x: 0, y: 0, width: At, height: Et } }, + ), + ), + $t.left, + $t.left + $t.width, + St, + ) + }), + _defineProperty$1(_assertThisInitialized$1(xt), 'horizontalCoordinatesGenerator', function (kt, St) { + var Tt = kt.yAxis, + At = kt.width, + Et = kt.height, + $t = kt.offset + return getCoordinatesOfGrid( + getTicks( + _objectSpread$1( + _objectSpread$1(_objectSpread$1({}, CartesianAxis.defaultProps), Tt), + {}, + { ticks: getTicksOfAxis(Tt, !0), viewBox: { x: 0, y: 0, width: At, height: Et } }, + ), + ), + $t.top, + $t.top + $t.height, + St, + ) + }), + _defineProperty$1(_assertThisInitialized$1(xt), 'axesTicksGenerator', function (kt) { + return getTicksOfAxis(kt, !0) + }), + _defineProperty$1(_assertThisInitialized$1(xt), 'renderCursor', function (kt) { + var St = xt.state, + Tt = St.isTooltipActive, + At = St.activeCoordinate, + Et = St.activePayload, + $t = St.offset, + Dt = St.activeTooltipIndex, + jt = St.tooltipAxisBandSize, + Pt = xt.getTooltipEventType() + if (!kt || !kt.props.cursor || !Tt || !At || (rt !== 'ScatterChart' && Pt !== 'axis')) return null + var Ct = xt.props.layout, + wt, + It = Curve + if (rt === 'ScatterChart') (wt = At), (It = Cross) + else if (rt === 'BarChart') (wt = getCursorRectangle(Ct, At, $t, jt)), (It = Rectangle) + else if (Ct === 'radial') { + var Ot = getRadialCursorPoints(At), + Wt = Ot.cx, + zt = Ot.cy, + Ft = Ot.radius, + Nt = Ot.startAngle, + Ut = Ot.endAngle + ;(wt = { cx: Wt, cy: zt, startAngle: Nt, endAngle: Ut, innerRadius: Ft, outerRadius: Ft }), + (It = Sector) + } else (wt = { points: getCursorPoints(Ct, At, $t) }), (It = Curve) + var Mt = kt.key || '_recharts-cursor', + Ht = _objectSpread$1( + _objectSpread$1( + _objectSpread$1(_objectSpread$1({ stroke: '#ccc', pointerEvents: 'none' }, $t), wt), + filterProps(kt.props.cursor), + ), + {}, + { payload: Et, payloadIndex: Dt, key: Mt, className: 'recharts-tooltip-cursor' }, + ) + return reactExports.isValidElement(kt.props.cursor) + ? reactExports.cloneElement(kt.props.cursor, Ht) + : reactExports.createElement(It, Ht) + }), + _defineProperty$1(_assertThisInitialized$1(xt), 'renderPolarAxis', function (kt, St, Tt) { + var At = _get(kt, 'type.axisType'), + Et = _get(xt.state, ''.concat(At, 'Map')), + $t = Et && Et[kt.props[''.concat(At, 'Id')]] + return reactExports.cloneElement( + kt, + _objectSpread$1( + _objectSpread$1({}, $t), + {}, + { className: At, key: kt.key || ''.concat(St, '-').concat(Tt), ticks: getTicksOfAxis($t, !0) }, + ), + ) + }), + _defineProperty$1(_assertThisInitialized$1(xt), 'renderXAxis', function (kt, St, Tt) { + var At = xt.state.xAxisMap, + Et = At[kt.props.xAxisId] + return xt.renderAxis(Et, kt, St, Tt) + }), + _defineProperty$1(_assertThisInitialized$1(xt), 'renderYAxis', function (kt, St, Tt) { + var At = xt.state.yAxisMap, + Et = At[kt.props.yAxisId] + return xt.renderAxis(Et, kt, St, Tt) + }), + _defineProperty$1(_assertThisInitialized$1(xt), 'renderGrid', function (kt) { + var St = xt.state, + Tt = St.xAxisMap, + At = St.yAxisMap, + Et = St.offset, + $t = xt.props, + Dt = $t.width, + jt = $t.height, + Pt = getAnyElementOfObject(Tt), + Ct = _find(At, function (Ot) { + return _every(Ot.domain, isFinit) + }), + wt = Ct || getAnyElementOfObject(At), + It = kt.props || {} + return reactExports.cloneElement(kt, { + key: kt.key || 'grid', + x: isNumber(It.x) ? It.x : Et.left, + y: isNumber(It.y) ? It.y : Et.top, + width: isNumber(It.width) ? It.width : Et.width, + height: isNumber(It.height) ? It.height : Et.height, + xAxis: Pt, + yAxis: wt, + offset: Et, + chartWidth: Dt, + chartHeight: jt, + verticalCoordinatesGenerator: It.verticalCoordinatesGenerator || xt.verticalCoordinatesGenerator, + horizontalCoordinatesGenerator: + It.horizontalCoordinatesGenerator || xt.horizontalCoordinatesGenerator, + }) + }), + _defineProperty$1(_assertThisInitialized$1(xt), 'renderPolarGrid', function (kt) { + var St = kt.props, + Tt = St.radialLines, + At = St.polarAngles, + Et = St.polarRadius, + $t = xt.state, + Dt = $t.radiusAxisMap, + jt = $t.angleAxisMap, + Pt = getAnyElementOfObject(Dt), + Ct = getAnyElementOfObject(jt), + wt = Ct.cx, + It = Ct.cy, + Ot = Ct.innerRadius, + Wt = Ct.outerRadius + return reactExports.cloneElement(kt, { + polarAngles: _isArray$1(At) + ? At + : getTicksOfAxis(Ct, !0).map(function (zt) { + return zt.coordinate + }), + polarRadius: _isArray$1(Et) + ? Et + : getTicksOfAxis(Pt, !0).map(function (zt) { + return zt.coordinate + }), + cx: wt, + cy: It, + innerRadius: Ot, + outerRadius: Wt, + key: kt.key || 'polar-grid', + radialLines: Tt, + }) + }), + _defineProperty$1(_assertThisInitialized$1(xt), 'renderLegend', function () { + var kt = xt.state.formattedGraphicalItems, + St = xt.props, + Tt = St.children, + At = St.width, + Et = St.height, + $t = xt.props.margin || {}, + Dt = At - ($t.left || 0) - ($t.right || 0), + jt = getLegendProps({ children: Tt, formattedGraphicalItems: kt, legendWidth: Dt, legendContent: ut }) + if (!jt) return null + var Pt = jt.item, + Ct = _objectWithoutProperties(jt, _excluded) + return reactExports.cloneElement( + Pt, + _objectSpread$1( + _objectSpread$1({}, Ct), + {}, + { chartWidth: At, chartHeight: Et, margin: $t, onBBoxUpdate: xt.handleLegendBBoxUpdate }, + ), + ) + }), + _defineProperty$1(_assertThisInitialized$1(xt), 'renderTooltip', function () { + var kt = xt.props.children, + St = findChildByType(kt, Tooltip) + if (!St) return null + var Tt = xt.state, + At = Tt.isTooltipActive, + Et = Tt.activeCoordinate, + $t = Tt.activePayload, + Dt = Tt.activeLabel, + jt = Tt.offset + return reactExports.cloneElement(St, { + viewBox: _objectSpread$1(_objectSpread$1({}, jt), {}, { x: jt.left, y: jt.top }), + active: At, + label: Dt, + payload: At ? $t : [], + coordinate: Et, + }) + }), + _defineProperty$1(_assertThisInitialized$1(xt), 'renderBrush', function (kt) { + var St = xt.props, + Tt = St.margin, + At = St.data, + Et = xt.state, + $t = Et.offset, + Dt = Et.dataStartIndex, + jt = Et.dataEndIndex, + Pt = Et.updateId + return reactExports.cloneElement(kt, { + key: kt.key || '_recharts-brush', + onChange: combineEventHandlers(xt.handleBrushChange, null, kt.props.onChange), + data: At, + x: isNumber(kt.props.x) ? kt.props.x : $t.left, + y: isNumber(kt.props.y) ? kt.props.y : $t.top + $t.height + $t.brushBottom - (Tt.bottom || 0), + width: isNumber(kt.props.width) ? kt.props.width : $t.width, + startIndex: Dt, + endIndex: jt, + updateId: 'brush-'.concat(Pt), + }) + }), + _defineProperty$1(_assertThisInitialized$1(xt), 'renderReferenceElement', function (kt, St, Tt) { + if (!kt) return null + var At = _assertThisInitialized$1(xt), + Et = At.clipPathId, + $t = xt.state, + Dt = $t.xAxisMap, + jt = $t.yAxisMap, + Pt = $t.offset, + Ct = kt.props, + wt = Ct.xAxisId, + It = Ct.yAxisId + return reactExports.cloneElement(kt, { + key: kt.key || ''.concat(St, '-').concat(Tt), + xAxis: Dt[wt], + yAxis: jt[It], + viewBox: { x: Pt.left, y: Pt.top, width: Pt.width, height: Pt.height }, + clipPathId: Et, + }) + }), + _defineProperty$1(_assertThisInitialized$1(xt), 'renderActivePoints', function (kt) { + var St = kt.item, + Tt = kt.activePoint, + At = kt.basePoint, + Et = kt.childIndex, + $t = kt.isRange, + Dt = [], + jt = St.props.key, + Pt = St.item.props, + Ct = Pt.activeDot, + wt = Pt.dataKey, + It = _objectSpread$1( + _objectSpread$1( + { + index: Et, + dataKey: wt, + cx: Tt.x, + cy: Tt.y, + r: 4, + fill: getMainColorOfGraphicItem(St.item), + strokeWidth: 2, + stroke: '#fff', + payload: Tt.payload, + value: Tt.value, + key: ''.concat(jt, '-activePoint-').concat(Et), + }, + filterProps(Ct), + ), + adaptEventHandlers(Ct), + ) + return ( + Dt.push(bt.renderActiveDot(Ct, It)), + At + ? Dt.push( + bt.renderActiveDot( + Ct, + _objectSpread$1( + _objectSpread$1({}, It), + {}, + { cx: At.x, cy: At.y, key: ''.concat(jt, '-basePoint-').concat(Et) }, + ), + ), + ) + : $t && Dt.push(null), + Dt + ) + }), + _defineProperty$1(_assertThisInitialized$1(xt), 'renderGraphicChild', function (kt, St, Tt) { + var At = xt.filterFormatItem(kt, St, Tt) + if (!At) return null + var Et = xt.getTooltipEventType(), + $t = xt.state, + Dt = $t.isTooltipActive, + jt = $t.tooltipAxis, + Pt = $t.activeTooltipIndex, + Ct = $t.activeLabel, + wt = xt.props.children, + It = findChildByType(wt, Tooltip), + Ot = At.props, + Wt = Ot.points, + zt = Ot.isRange, + Ft = Ot.baseLine, + Nt = At.item.props, + Ut = Nt.activeDot, + Mt = Nt.hide, + Ht = Nt.activeBar, + en = Nt.activeShape, + sn = !!(!Mt && Dt && It && (Ut || Ht || en)), + Kt = {} + Et !== 'axis' && It && It.props.trigger === 'click' + ? (Kt = { onClick: combineEventHandlers(xt.handleItemMouseEnter, null, kt.props.onCLick) }) + : Et !== 'axis' && + (Kt = { + onMouseLeave: combineEventHandlers(xt.handleItemMouseLeave, null, kt.props.onMouseLeave), + onMouseEnter: combineEventHandlers(xt.handleItemMouseEnter, null, kt.props.onMouseEnter), + }) + var rn = reactExports.cloneElement(kt, _objectSpread$1(_objectSpread$1({}, At.props), Kt)) + function nn(In) { + return typeof jt.dataKey == 'function' ? jt.dataKey(In.payload) : null + } + if (sn) + if (Pt >= 0) { + var hn, vn + if (jt.dataKey && !jt.allowDuplicatedCategory) { + var an = typeof jt.dataKey == 'function' ? nn : 'payload.'.concat(jt.dataKey.toString()) + ;(hn = findEntryInArray(Wt, an, Ct)), (vn = zt && Ft && findEntryInArray(Ft, an, Ct)) + } else (hn = Wt == null ? void 0 : Wt[Pt]), (vn = zt && Ft && Ft[Pt]) + if (en || Ht) { + var Qt = kt.props.activeIndex !== void 0 ? kt.props.activeIndex : Pt + return [ + reactExports.cloneElement( + kt, + _objectSpread$1(_objectSpread$1(_objectSpread$1({}, At.props), Kt), {}, { activeIndex: Qt }), + ), + null, + null, + ] + } + if (!_isNil(hn)) + return [rn].concat( + _toConsumableArray$1( + xt.renderActivePoints({ + item: At, + activePoint: hn, + basePoint: vn, + childIndex: Pt, + isRange: zt, + }), + ), + ) + } else { + var _n, + Pn = + (_n = xt.getItemByXY(xt.state.activeCoordinate)) !== null && _n !== void 0 + ? _n + : { graphicalItem: rn }, + $n = Pn.graphicalItem, + Nn = $n.item, + Tn = Nn === void 0 ? kt : Nn, + cn = $n.childIndex, + mn = _objectSpread$1(_objectSpread$1(_objectSpread$1({}, At.props), Kt), {}, { activeIndex: cn }) + return [reactExports.cloneElement(Tn, mn), null, null] + } + return zt ? [rn, null, null] : [rn, null] + }), + _defineProperty$1(_assertThisInitialized$1(xt), 'renderCustomized', function (kt, St, Tt) { + return reactExports.cloneElement( + kt, + _objectSpread$1(_objectSpread$1({ key: 'recharts-customized-'.concat(Tt) }, xt.props), xt.state), + ) + }), + (xt.uniqueChartId = _isNil(vt.id) ? uniqueId('recharts') : vt.id), + (xt.clipPathId = ''.concat(xt.uniqueChartId, '-clip')), + vt.throttleDelay && + (xt.triggeredAfterMouseMove = _throttle(xt.triggeredAfterMouseMove, vt.throttleDelay)), + (xt.state = {}), + xt + ) + } + return ( + _createClass$1(bt, [ + { + key: 'componentDidMount', + value: function () { + var xt, kt + _isNil(this.props.syncId) || this.addListener(), + this.accessibilityManager.setDetails({ + container: this.container, + offset: { + left: (xt = this.props.margin.left) !== null && xt !== void 0 ? xt : 0, + top: (kt = this.props.margin.top) !== null && kt !== void 0 ? kt : 0, + }, + coordinateList: this.state.tooltipTicks, + mouseHandlerCallback: this.handleMouseMove, + layout: this.props.layout, + }) + }, + }, + { + key: 'getSnapshotBeforeUpdate', + value: function (xt, kt) { + if (!this.props.accessibilityLayer) return null + if ( + (this.state.tooltipTicks !== kt.tooltipTicks && + this.accessibilityManager.setDetails({ coordinateList: this.state.tooltipTicks }), + this.props.layout !== xt.layout && + this.accessibilityManager.setDetails({ layout: this.props.layout }), + this.props.margin !== xt.margin) + ) { + var St, Tt + this.accessibilityManager.setDetails({ + offset: { + left: (St = this.props.margin.left) !== null && St !== void 0 ? St : 0, + top: (Tt = this.props.margin.top) !== null && Tt !== void 0 ? Tt : 0, + }, + }) + } + return null + }, + }, + { + key: 'componentDidUpdate', + value: function (xt) { + _isNil(xt.syncId) && !_isNil(this.props.syncId) && this.addListener(), + !_isNil(xt.syncId) && _isNil(this.props.syncId) && this.removeListener() + }, + }, + { + key: 'componentWillUnmount', + value: function () { + this.clearDefer(), + _isNil(this.props.syncId) || this.removeListener(), + this.cancelThrottledTriggerAfterMouseMove() + }, + }, + { + key: 'cancelThrottledTriggerAfterMouseMove', + value: function () { + typeof this.triggeredAfterMouseMove.cancel == 'function' && this.triggeredAfterMouseMove.cancel() + }, + }, + { + key: 'getTooltipEventType', + value: function () { + var xt = findChildByType(this.props.children, Tooltip) + if (xt && _isBoolean(xt.props.shared)) { + var kt = xt.props.shared ? 'axis' : 'item' + return lt.indexOf(kt) >= 0 ? kt : at + } + return at + }, + }, + { + key: 'getMouseInfo', + value: function (xt) { + var kt + if (!this.container) return null + var St = getOffset(this.container), + Tt = calculateChartCoordinate(xt, St), + At = this.container, + Et = At == null || (kt = At.getBoundingClientRect()) === null || kt === void 0 ? void 0 : kt.width, + $t = At.offsetWidth, + Dt = Et / $t || 1, + jt = this.inRange(Tt.chartX, Tt.chartY, Dt) + if (!jt) return null + var Pt = this.state, + Ct = Pt.xAxisMap, + wt = Pt.yAxisMap, + It = this.getTooltipEventType() + if (It !== 'axis' && Ct && wt) { + var Ot = getAnyElementOfObject(Ct).scale, + Wt = getAnyElementOfObject(wt).scale, + zt = Ot && Ot.invert ? Ot.invert(Tt.chartX) : null, + Ft = Wt && Wt.invert ? Wt.invert(Tt.chartY) : null + return _objectSpread$1(_objectSpread$1({}, Tt), {}, { xValue: zt, yValue: Ft }) + } + var Nt = getTooltipData(this.state, this.props.data, this.props.layout, jt) + return Nt ? _objectSpread$1(_objectSpread$1({}, Tt), Nt) : null + }, + }, + { + key: 'inRange', + value: function (xt, kt) { + var St = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 1, + Tt = this.props.layout, + At = xt / St, + Et = kt / St + if (Tt === 'horizontal' || Tt === 'vertical') { + var $t = this.state.offset, + Dt = At >= $t.left && At <= $t.left + $t.width && Et >= $t.top && Et <= $t.top + $t.height + return Dt ? { x: At, y: Et } : null + } + var jt = this.state, + Pt = jt.angleAxisMap, + Ct = jt.radiusAxisMap + if (Pt && Ct) { + var wt = getAnyElementOfObject(Pt) + return inRangeOfSector({ x: At, y: Et }, wt) + } + return null + }, + }, + { + key: 'parseEventsOfWrapper', + value: function () { + var xt = this.props.children, + kt = this.getTooltipEventType(), + St = findChildByType(xt, Tooltip), + Tt = {} + St && + kt === 'axis' && + (St.props.trigger === 'click' + ? (Tt = { onClick: this.handleClick }) + : (Tt = { + onMouseEnter: this.handleMouseEnter, + onMouseMove: this.handleMouseMove, + onMouseLeave: this.handleMouseLeave, + onTouchMove: this.handleTouchMove, + onTouchStart: this.handleTouchStart, + onTouchEnd: this.handleTouchEnd, + })) + var At = adaptEventHandlers(this.props, this.handleOuterEvent) + return _objectSpread$1(_objectSpread$1({}, At), Tt) + }, + }, + { + key: 'addListener', + value: function () { + eventCenter.on(SYNC_EVENT, this.handleReceiveSyncEvent), + eventCenter.setMaxListeners && + eventCenter._maxListeners && + eventCenter.setMaxListeners(eventCenter._maxListeners + 1) + }, + }, + { + key: 'removeListener', + value: function () { + eventCenter.removeListener(SYNC_EVENT, this.handleReceiveSyncEvent), + eventCenter.setMaxListeners && + eventCenter._maxListeners && + eventCenter.setMaxListeners(eventCenter._maxListeners - 1) + }, + }, + { + key: 'triggerSyncEvent', + value: function (xt) { + var kt = this.props.syncId + _isNil(kt) || eventCenter.emit(SYNC_EVENT, kt, this.uniqueChartId, xt) + }, + }, + { + key: 'applySyncEvent', + value: function (xt) { + var kt = this.props, + St = kt.layout, + Tt = kt.syncMethod, + At = this.state.updateId, + Et = xt.dataStartIndex, + $t = xt.dataEndIndex + if (!_isNil(xt.dataStartIndex) || !_isNil(xt.dataEndIndex)) + this.setState( + _objectSpread$1( + { dataStartIndex: Et, dataEndIndex: $t }, + mt({ props: this.props, dataStartIndex: Et, dataEndIndex: $t, updateId: At }, this.state), + ), + ) + else if (_isNil(xt.activeTooltipIndex)) this.setState(xt) + else { + var Dt = xt.chartX, + jt = xt.chartY, + Pt = xt.activeTooltipIndex, + Ct = this.state, + wt = Ct.offset, + It = Ct.tooltipTicks + if (!wt) return + if (typeof Tt == 'function') Pt = Tt(It, xt) + else if (Tt === 'value') { + Pt = -1 + for (var Ot = 0; Ot < It.length; Ot++) + if (It[Ot].value === xt.activeLabel) { + Pt = Ot + break + } + } + var Wt = _objectSpread$1(_objectSpread$1({}, wt), {}, { x: wt.left, y: wt.top }), + zt = Math.min(Dt, Wt.x + Wt.width), + Ft = Math.min(jt, Wt.y + Wt.height), + Nt = It[Pt] && It[Pt].value, + Ut = getTooltipContent(this.state, this.props.data, Pt), + Mt = It[Pt] + ? { + x: St === 'horizontal' ? It[Pt].coordinate : zt, + y: St === 'horizontal' ? Ft : It[Pt].coordinate, + } + : originCoordinate + this.setState( + _objectSpread$1( + _objectSpread$1({}, xt), + {}, + { activeLabel: Nt, activeCoordinate: Mt, activePayload: Ut, activeTooltipIndex: Pt }, + ), + ) + } + }, + }, + { + key: 'filterFormatItem', + value: function (xt, kt, St) { + for (var Tt = this.state.formattedGraphicalItems, At = 0, Et = Tt.length; At < Et; At++) { + var $t = Tt[At] + if ( + $t.item === xt || + $t.props.key === xt.key || + (kt === getDisplayName($t.item.type) && St === $t.childIndex) + ) + return $t + } + return null + }, + }, + { + key: 'renderAxis', + value: function (xt, kt, St, Tt) { + var At = this.props, + Et = At.width, + $t = At.height + return React$1.createElement( + CartesianAxis, + _extends$1({}, xt, { + className: classNames('recharts-'.concat(xt.axisType, ' ').concat(xt.axisType), xt.className), + key: kt.key || ''.concat(St, '-').concat(Tt), + viewBox: { x: 0, y: 0, width: Et, height: $t }, + ticksGenerator: this.axesTicksGenerator, + }), + ) + }, + }, + { + key: 'renderClipPath', + value: function () { + var xt = this.clipPathId, + kt = this.state.offset, + St = kt.left, + Tt = kt.top, + At = kt.height, + Et = kt.width + return React$1.createElement( + 'defs', + null, + React$1.createElement( + 'clipPath', + { id: xt }, + React$1.createElement('rect', { x: St, y: Tt, height: At, width: Et }), + ), + ) + }, + }, + { + key: 'getXScales', + value: function () { + var xt = this.state.xAxisMap + return xt + ? Object.entries(xt).reduce(function (kt, St) { + var Tt = _slicedToArray$1(St, 2), + At = Tt[0], + Et = Tt[1] + return _objectSpread$1(_objectSpread$1({}, kt), {}, _defineProperty$1({}, At, Et.scale)) + }, {}) + : null + }, + }, + { + key: 'getYScales', + value: function () { + var xt = this.state.yAxisMap + return xt + ? Object.entries(xt).reduce(function (kt, St) { + var Tt = _slicedToArray$1(St, 2), + At = Tt[0], + Et = Tt[1] + return _objectSpread$1(_objectSpread$1({}, kt), {}, _defineProperty$1({}, At, Et.scale)) + }, {}) + : null + }, + }, + { + key: 'getXScaleByAxisId', + value: function (xt) { + var kt + return (kt = this.state.xAxisMap) === null || kt === void 0 || (kt = kt[xt]) === null || kt === void 0 + ? void 0 + : kt.scale + }, + }, + { + key: 'getYScaleByAxisId', + value: function (xt) { + var kt + return (kt = this.state.yAxisMap) === null || kt === void 0 || (kt = kt[xt]) === null || kt === void 0 + ? void 0 + : kt.scale + }, + }, + { + key: 'getItemByXY', + value: function (xt) { + var kt = this.state, + St = kt.formattedGraphicalItems, + Tt = kt.activeItem + if (St && St.length) + for (var At = 0, Et = St.length; At < Et; At++) { + var $t = St[At], + Dt = $t.props, + jt = $t.item, + Pt = getDisplayName(jt.type) + if (Pt === 'Bar') { + var Ct = (Dt.data || []).find(function (Wt) { + return isInRectangle(xt, Wt) + }) + if (Ct) return { graphicalItem: $t, payload: Ct } + } else if (Pt === 'RadialBar') { + var wt = (Dt.data || []).find(function (Wt) { + return inRangeOfSector(xt, Wt) + }) + if (wt) return { graphicalItem: $t, payload: wt } + } else if (isFunnel($t) || isPie($t) || isScatter($t)) { + var It = getActiveShapeIndexForTooltip({ + graphicalItem: $t, + activeTooltipItem: Tt, + itemData: jt.props.data, + }), + Ot = jt.props.activeIndex === void 0 ? It : jt.props.activeIndex + return { + graphicalItem: _objectSpread$1(_objectSpread$1({}, $t), {}, { childIndex: Ot }), + payload: isScatter($t) ? jt.props.data[It] : $t.props.data[It], + } + } + } + return null + }, + }, + { + key: 'render', + value: function () { + var xt = this + if (!validateWidthHeight(this)) return null + var kt = this.props, + St = kt.children, + Tt = kt.className, + At = kt.width, + Et = kt.height, + $t = kt.style, + Dt = kt.compact, + jt = kt.title, + Pt = kt.desc, + Ct = _objectWithoutProperties(kt, _excluded2), + wt = filterProps(Ct), + It = { + CartesianGrid: { handler: this.renderGrid, once: !0 }, + ReferenceArea: { handler: this.renderReferenceElement }, + ReferenceLine: { handler: this.renderReferenceElement }, + ReferenceDot: { handler: this.renderReferenceElement }, + XAxis: { handler: this.renderXAxis }, + YAxis: { handler: this.renderYAxis }, + Brush: { handler: this.renderBrush, once: !0 }, + Bar: { handler: this.renderGraphicChild }, + Line: { handler: this.renderGraphicChild }, + Area: { handler: this.renderGraphicChild }, + Radar: { handler: this.renderGraphicChild }, + RadialBar: { handler: this.renderGraphicChild }, + Scatter: { handler: this.renderGraphicChild }, + Pie: { handler: this.renderGraphicChild }, + Funnel: { handler: this.renderGraphicChild }, + Tooltip: { handler: this.renderCursor, once: !0 }, + PolarGrid: { handler: this.renderPolarGrid, once: !0 }, + PolarAngleAxis: { handler: this.renderPolarAxis }, + PolarRadiusAxis: { handler: this.renderPolarAxis }, + Customized: { handler: this.renderCustomized }, + } + if (Dt) + return React$1.createElement( + Surface, + _extends$1({}, wt, { width: At, height: Et, title: jt, desc: Pt }), + this.renderClipPath(), + renderByOrder(St, It), + ) + if (this.props.accessibilityLayer) { + var Ot, Wt + ;(wt.tabIndex = (Ot = 0) !== null && Ot !== void 0 ? Ot : this.props.tabIndex), + (wt.role = (Wt = 'img') !== null && Wt !== void 0 ? Wt : this.props.role), + (wt.onKeyDown = function (Ft) { + xt.accessibilityManager.keyboardEvent(Ft) + }), + (wt.onFocus = function () { + xt.accessibilityManager.focus() + }) + } + var zt = this.parseEventsOfWrapper() + return React$1.createElement( + 'div', + _extends$1( + { + className: classNames('recharts-wrapper', Tt), + style: _objectSpread$1({ position: 'relative', cursor: 'default', width: At, height: Et }, $t), + }, + zt, + { + ref: function (Nt) { + xt.container = Nt + }, + role: 'region', + }, + ), + React$1.createElement( + Surface, + _extends$1({}, wt, { width: At, height: Et, title: jt, desc: Pt }), + this.renderClipPath(), + renderByOrder(St, It), + ), + this.renderLegend(), + this.renderTooltip(), + ) + }, + }, + ]), + bt + ) + })(reactExports.Component)), + _defineProperty$1(nt, 'displayName', rt), + _defineProperty$1( + nt, + 'defaultProps', + _objectSpread$1( + { + layout: 'horizontal', + stackOffset: 'none', + barCategoryGap: '10%', + barGap: 4, + margin: { top: 5, right: 5, bottom: 5, left: 5 }, + reverseStackOrder: !1, + syncMethod: 'index', + }, + dt, + ), + ), + _defineProperty$1(nt, 'getDerivedStateFromProps', function (gt, yt) { + var bt = gt.data, + vt = gt.children, + xt = gt.width, + kt = gt.height, + St = gt.layout, + Tt = gt.stackOffset, + At = gt.margin + if (_isNil(yt.updateId)) { + var Et = createDefaultState(gt) + return _objectSpread$1( + _objectSpread$1( + _objectSpread$1({}, Et), + {}, + { updateId: 0 }, + mt(_objectSpread$1(_objectSpread$1({ props: gt }, Et), {}, { updateId: 0 }), yt), + ), + {}, + { + prevData: bt, + prevWidth: xt, + prevHeight: kt, + prevLayout: St, + prevStackOffset: Tt, + prevMargin: At, + prevChildren: vt, + }, + ) + } + if ( + bt !== yt.prevData || + xt !== yt.prevWidth || + kt !== yt.prevHeight || + St !== yt.prevLayout || + Tt !== yt.prevStackOffset || + !shallowEqual(At, yt.prevMargin) + ) { + var $t = createDefaultState(gt), + Dt = { chartX: yt.chartX, chartY: yt.chartY, isTooltipActive: yt.isTooltipActive }, + jt = _objectSpread$1(_objectSpread$1({}, getTooltipData(yt, bt, St)), {}, { updateId: yt.updateId + 1 }), + Pt = _objectSpread$1(_objectSpread$1(_objectSpread$1({}, $t), Dt), jt) + return _objectSpread$1( + _objectSpread$1(_objectSpread$1({}, Pt), mt(_objectSpread$1({ props: gt }, Pt), yt)), + {}, + { + prevData: bt, + prevWidth: xt, + prevHeight: kt, + prevLayout: St, + prevStackOffset: Tt, + prevMargin: At, + prevChildren: vt, + }, + ) + } + if (!isChildrenEqual(vt, yt.prevChildren)) { + var Ct = !_isNil(bt), + wt = Ct ? yt.updateId : yt.updateId + 1 + return _objectSpread$1( + _objectSpread$1( + { updateId: wt }, + mt(_objectSpread$1(_objectSpread$1({ props: gt }, yt), {}, { updateId: wt }), yt), + ), + {}, + { prevChildren: vt }, + ) + } + return null + }), + _defineProperty$1(nt, 'renderActiveDot', function (gt, yt) { + var bt + return ( + reactExports.isValidElement(gt) + ? (bt = reactExports.cloneElement(gt, yt)) + : _isFunction$1(gt) + ? (bt = gt(yt)) + : (bt = React$1.createElement(Dot, yt)), + React$1.createElement(Layer, { className: 'recharts-active-dot', key: yt.key }, bt) + ) + }), + nt + ) + }, + LineChart = generateCategoricalChart({ + chartName: 'LineChart', + GraphicalChild: Line, + axisComponents: [ + { axisType: 'xAxis', AxisComp: XAxis }, + { axisType: 'yAxis', AxisComp: YAxis }, + ], + formatAxisMap, + }), + ScatterChart = generateCategoricalChart({ + chartName: 'ScatterChart', + GraphicalChild: Scatter, + defaultTooltipEventType: 'item', + validateTooltipEventTypes: ['item'], + axisComponents: [ + { axisType: 'xAxis', AxisComp: XAxis }, + { axisType: 'yAxis', AxisComp: YAxis }, + { axisType: 'zAxis', AxisComp: ZAxis }, + ], + formatAxisMap, + }) + const RenderDot$1 = ({ cx: tt, cy: et }) => + jsxRuntimeExports.jsx(Dot, { cx: tt, cy: et, fill: colors.blueTextAccent, r: 2 }), + SentimentChart = ({ data: tt, width: et = 500, height: nt = 300 }) => + jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { + children: + (tt == null ? void 0 : tt.length) && + jsxRuntimeExports.jsxs(LineChart, { + data: tt, + height: nt, + id: 'cy-sentiment-chart', + margin: { bottom: 5, left: -20, right: 30, top: 5 }, + width: et, + children: [ + jsxRuntimeExports.jsx(CartesianGrid, { stroke: colors.lightBlue300, strokeDasharray: '5 5' }), + jsxRuntimeExports.jsx(XAxis, { + dataKey: 'date', + interval: Math.floor(tt.length / 3), + stroke: colors.blueTextAccent, + }), + jsxRuntimeExports.jsx(YAxis, { domain: [0, 10], stroke: colors.blueTextAccent }), + jsxRuntimeExports.jsx(Tooltip, {}), + jsxRuntimeExports.jsx(Line, { + dataKey: 'score', + dot: jsxRuntimeExports.jsx(RenderDot$1, {}), + stroke: '#8884d8', + type: 'monotone', + }), + ], + }), + }), + SentimentAnalysis = reactExports.memo(() => { + const tt = useAppStore((mt) => mt.currentSearch), + [et, nt] = reactExports.useState(void 0), + rt = hooks().startOf('day'), + it = hooks().subtract(1, 'year'), + ot = 3600 * 24, + [at] = useUserStore((mt) => [mt.setBudget]), + [st, lt] = reactExports.useState(hooks().startOf('day').subtract(20, 'day')), + ct = (Math.round((rt.unix() - st.unix()) / ot) + 1) * 50, + [ut, ht] = reactExports.useState(!1), + dt = async () => { + tt && + (ht(!0), + await executeIfProd(() => distExports$1.enable()), + getSentimentData({ topic: tt, cutoff_date: String(st.unix()) }) + .then(async (mt) => { + console.log(mt == null ? void 0 : mt.data), + nt( + mt == null + ? void 0 + : mt.data + .filter((gt) => gt.date) + .map((gt) => ({ + date: hooks.unix(Number(String(gt.date).split('.')[0])).format('MM/DD/YY'), + score: gt.sentiment_score, + })), + ), + await updateBudget(at) + }) + .catch(console.error) + .finally(() => { + ht(!1) + })) + }, + pt = reactExports.useRef(null) + return jsxRuntimeExports.jsxs(Stack$5, { + component: 'div', + flexGrow: 1, + p: 1, + spacing: 2, + width: '100%', + children: [ + ut && + jsxRuntimeExports.jsx(Stack$5, { + alignItems: 'center', + component: 'div', + flexGrow: 1, + p: 4, + spacing: 2, + width: '100%', + children: jsxRuntimeExports.jsx(PropagateLoader, { color: colors.white }), + }), + !ut && + jsxRuntimeExports.jsxs(ChartWrapper$1, { + ref: pt, + children: [ + jsxRuntimeExports.jsx(SentimentChart, { data: et, height: 280, width: 352 }), + Array.isArray(et) && + !ut && + !et.length && + jsxRuntimeExports.jsx(Text$3, { children: 'No data for this period' }), + ], + }), + jsxRuntimeExports.jsx(DatePicker, { + format: 'L', + label: 'From', + maxDate: rt, + minDate: it, + onChange: (mt) => lt(mt ?? hooks()), + sx: { background: colors.inputBg1, color: 'text.primary' }, + value: st, + }), + jsxRuntimeExports.jsx(Slider$1, { + component: 'div', + getAriaValueText: (mt) => hooks(mt).format('L'), + id: 'cy-sentiment-analysis-slider', + marks: !0, + max: rt.unix(), + min: it.unix(), + onChange: (mt, gt) => { + lt(hooks.unix(gt)) + }, + step: ot, + value: st.unix(), + valueLabelDisplay: 'auto', + valueLabelFormat: (mt) => hooks.unix(mt).format('L'), + }), + jsxRuntimeExports.jsxs(StyledButton$1, { + className: 'button', + id: 'cy-get-sentiment-analysis-btn', + onClick: dt, + children: ['Create a chart for ', ct.toFixed(), ' SATS'], + }), + ], + }) + }), + ChartWrapper$1 = styled$4.div` + flex: 1 1 auto; + width: 100%; +`, + StyledButton$1 = styled$4(Button)` + height: 48px; +`, + TABS = [ + { label: 'Teach me', value: 'teachMe' }, + { label: 'Ask question', value: 'askQuestion' }, + { label: 'Sentiment Analysis', value: 'sentiment' }, + ], + ActionsMenu = ({ onChange: tt, active: et }) => { + const nt = (rt, it) => { + tt(TABS[it].value) + } + return et + ? jsxRuntimeExports.jsx(MenuWrapper, { + direction: 'row', + id: 'cy-helper-menu', + maxWidth: '100%', + mb: 3, + overflow: 'auto', + spacing: 1, + children: TABS.map((rt, it) => + jsxRuntimeExports.jsx( + Chip$1, + { + color: rt.value === et ? 'primary' : 'default', + component: 'div', + id: rt.value, + label: rt.label, + onClick: (ot) => nt(ot, it), + }, + rt.value, + ), + ), + }) + : jsxRuntimeExports.jsx(Stack$5, { + component: 'div', + flexGrow: 1, + id: 'cy-helper-menu', + justifyContent: 'flex-end', + mb: 1, + spacing: 1, + children: TABS.map((rt, it) => + jsxRuntimeExports.jsx( + Chip$1, + { component: 'div', id: rt.value, label: rt.label, onClick: (ot) => nt(ot, it) }, + rt.value, + ), + ), + }) + }, + MenuWrapper = styled$1(Stack$5)(() => ({ + '&::-webkit-scrollbar': { width: '1px', height: '4px' }, + '&::-webkit-scrollbar-thumb': { width: '1px', height: '4px' }, + })), + PACKET_TYPES = Object.create(null) + PACKET_TYPES.open = '0' + PACKET_TYPES.close = '1' + PACKET_TYPES.ping = '2' + PACKET_TYPES.pong = '3' + PACKET_TYPES.message = '4' + PACKET_TYPES.upgrade = '5' + PACKET_TYPES.noop = '6' + const PACKET_TYPES_REVERSE = Object.create(null) + Object.keys(PACKET_TYPES).forEach((tt) => { + PACKET_TYPES_REVERSE[PACKET_TYPES[tt]] = tt + }) + const ERROR_PACKET = { type: 'error', data: 'parser error' }, + withNativeBlob$1 = + typeof Blob == 'function' || + (typeof Blob < 'u' && Object.prototype.toString.call(Blob) === '[object BlobConstructor]'), + withNativeArrayBuffer$2 = typeof ArrayBuffer == 'function', + isView$1 = (tt) => + typeof ArrayBuffer.isView == 'function' ? ArrayBuffer.isView(tt) : tt && tt.buffer instanceof ArrayBuffer, + encodePacket = ({ type: tt, data: et }, nt, rt) => + withNativeBlob$1 && et instanceof Blob + ? nt + ? rt(et) + : encodeBlobAsBase64(et, rt) + : withNativeArrayBuffer$2 && (et instanceof ArrayBuffer || isView$1(et)) + ? nt + ? rt(et) + : encodeBlobAsBase64(new Blob([et]), rt) + : rt(PACKET_TYPES[tt] + (et || '')), + encodeBlobAsBase64 = (tt, et) => { + const nt = new FileReader() + return ( + (nt.onload = function () { + const rt = nt.result.split(',')[1] + et('b' + (rt || '')) + }), + nt.readAsDataURL(tt) + ) + } + function toArray(tt) { + return tt instanceof Uint8Array + ? tt + : tt instanceof ArrayBuffer + ? new Uint8Array(tt) + : new Uint8Array(tt.buffer, tt.byteOffset, tt.byteLength) + } + let TEXT_ENCODER + function encodePacketToBinary(tt, et) { + if (withNativeBlob$1 && tt.data instanceof Blob) return tt.data.arrayBuffer().then(toArray).then(et) + if (withNativeArrayBuffer$2 && (tt.data instanceof ArrayBuffer || isView$1(tt.data))) return et(toArray(tt.data)) + encodePacket(tt, !1, (nt) => { + TEXT_ENCODER || (TEXT_ENCODER = new TextEncoder()), et(TEXT_ENCODER.encode(nt)) + }) + } + const chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/', + lookup$1 = typeof Uint8Array > 'u' ? [] : new Uint8Array(256) + for (let tt = 0; tt < chars.length; tt++) lookup$1[chars.charCodeAt(tt)] = tt + const decode$1 = (tt) => { + let et = tt.length * 0.75, + nt = tt.length, + rt, + it = 0, + ot, + at, + st, + lt + tt[tt.length - 1] === '=' && (et--, tt[tt.length - 2] === '=' && et--) + const ct = new ArrayBuffer(et), + ut = new Uint8Array(ct) + for (rt = 0; rt < nt; rt += 4) + (ot = lookup$1[tt.charCodeAt(rt)]), + (at = lookup$1[tt.charCodeAt(rt + 1)]), + (st = lookup$1[tt.charCodeAt(rt + 2)]), + (lt = lookup$1[tt.charCodeAt(rt + 3)]), + (ut[it++] = (ot << 2) | (at >> 4)), + (ut[it++] = ((at & 15) << 4) | (st >> 2)), + (ut[it++] = ((st & 3) << 6) | (lt & 63)) + return ct + }, + withNativeArrayBuffer$1 = typeof ArrayBuffer == 'function', + decodePacket = (tt, et) => { + if (typeof tt != 'string') return { type: 'message', data: mapBinary(tt, et) } + const nt = tt.charAt(0) + return nt === 'b' + ? { type: 'message', data: decodeBase64Packet(tt.substring(1), et) } + : PACKET_TYPES_REVERSE[nt] + ? tt.length > 1 + ? { type: PACKET_TYPES_REVERSE[nt], data: tt.substring(1) } + : { type: PACKET_TYPES_REVERSE[nt] } + : ERROR_PACKET + }, + decodeBase64Packet = (tt, et) => { + if (withNativeArrayBuffer$1) { + const nt = decode$1(tt) + return mapBinary(nt, et) + } else return { base64: !0, data: tt } + }, + mapBinary = (tt, et) => { + switch (et) { + case 'blob': + return tt instanceof Blob ? tt : new Blob([tt]) + case 'arraybuffer': + default: + return tt instanceof ArrayBuffer ? tt : tt.buffer + } + }, + SEPARATOR = String.fromCharCode(30), + encodePayload = (tt, et) => { + const nt = tt.length, + rt = new Array(nt) + let it = 0 + tt.forEach((ot, at) => { + encodePacket(ot, !1, (st) => { + ;(rt[at] = st), ++it === nt && et(rt.join(SEPARATOR)) + }) + }) + }, + decodePayload = (tt, et) => { + const nt = tt.split(SEPARATOR), + rt = [] + for (let it = 0; it < nt.length; it++) { + const ot = decodePacket(nt[it], et) + if ((rt.push(ot), ot.type === 'error')) break + } + return rt + } + function createPacketEncoderStream() { + return new TransformStream({ + transform(tt, et) { + encodePacketToBinary(tt, (nt) => { + const rt = nt.length + let it + if (rt < 126) (it = new Uint8Array(1)), new DataView(it.buffer).setUint8(0, rt) + else if (rt < 65536) { + it = new Uint8Array(3) + const ot = new DataView(it.buffer) + ot.setUint8(0, 126), ot.setUint16(1, rt) + } else { + it = new Uint8Array(9) + const ot = new DataView(it.buffer) + ot.setUint8(0, 127), ot.setBigUint64(1, BigInt(rt)) + } + tt.data && typeof tt.data != 'string' && (it[0] |= 128), et.enqueue(it), et.enqueue(nt) + }) + }, + }) + } + let TEXT_DECODER + function totalLength(tt) { + return tt.reduce((et, nt) => et + nt.length, 0) + } + function concatChunks(tt, et) { + if (tt[0].length === et) return tt.shift() + const nt = new Uint8Array(et) + let rt = 0 + for (let it = 0; it < et; it++) (nt[it] = tt[0][rt++]), rt === tt[0].length && (tt.shift(), (rt = 0)) + return tt.length && rt < tt[0].length && (tt[0] = tt[0].slice(rt)), nt + } + function createPacketDecoderStream(tt, et) { + TEXT_DECODER || (TEXT_DECODER = new TextDecoder()) + const nt = [] + let rt = 0, + it = -1, + ot = !1 + return new TransformStream({ + transform(at, st) { + for (nt.push(at); ; ) { + if (rt === 0) { + if (totalLength(nt) < 1) break + const lt = concatChunks(nt, 1) + ;(ot = (lt[0] & 128) === 128), (it = lt[0] & 127), it < 126 ? (rt = 3) : it === 126 ? (rt = 1) : (rt = 2) + } else if (rt === 1) { + if (totalLength(nt) < 2) break + const lt = concatChunks(nt, 2) + ;(it = new DataView(lt.buffer, lt.byteOffset, lt.length).getUint16(0)), (rt = 3) + } else if (rt === 2) { + if (totalLength(nt) < 8) break + const lt = concatChunks(nt, 8), + ct = new DataView(lt.buffer, lt.byteOffset, lt.length), + ut = ct.getUint32(0) + if (ut > Math.pow(2, 53 - 32) - 1) { + st.enqueue(ERROR_PACKET) + break + } + ;(it = ut * Math.pow(2, 32) + ct.getUint32(4)), (rt = 3) + } else { + if (totalLength(nt) < it) break + const lt = concatChunks(nt, it) + st.enqueue(decodePacket(ot ? lt : TEXT_DECODER.decode(lt), et)), (rt = 0) + } + if (it === 0 || it > tt) { + st.enqueue(ERROR_PACKET) + break + } + } + }, + }) + } + const protocol$1 = 4 + function Emitter(tt) { + if (tt) return mixin(tt) + } + function mixin(tt) { + for (var et in Emitter.prototype) tt[et] = Emitter.prototype[et] + return tt + } + Emitter.prototype.on = Emitter.prototype.addEventListener = function (tt, et) { + return ( + (this._callbacks = this._callbacks || {}), + (this._callbacks['$' + tt] = this._callbacks['$' + tt] || []).push(et), + this + ) + } + Emitter.prototype.once = function (tt, et) { + function nt() { + this.off(tt, nt), et.apply(this, arguments) + } + return (nt.fn = et), this.on(tt, nt), this + } + Emitter.prototype.off = + Emitter.prototype.removeListener = + Emitter.prototype.removeAllListeners = + Emitter.prototype.removeEventListener = + function (tt, et) { + if (((this._callbacks = this._callbacks || {}), arguments.length == 0)) return (this._callbacks = {}), this + var nt = this._callbacks['$' + tt] + if (!nt) return this + if (arguments.length == 1) return delete this._callbacks['$' + tt], this + for (var rt, it = 0; it < nt.length; it++) + if (((rt = nt[it]), rt === et || rt.fn === et)) { + nt.splice(it, 1) + break + } + return nt.length === 0 && delete this._callbacks['$' + tt], this + } + Emitter.prototype.emit = function (tt) { + this._callbacks = this._callbacks || {} + for (var et = new Array(arguments.length - 1), nt = this._callbacks['$' + tt], rt = 1; rt < arguments.length; rt++) + et[rt - 1] = arguments[rt] + if (nt) { + nt = nt.slice(0) + for (var rt = 0, it = nt.length; rt < it; ++rt) nt[rt].apply(this, et) + } + return this + } + Emitter.prototype.emitReserved = Emitter.prototype.emit + Emitter.prototype.listeners = function (tt) { + return (this._callbacks = this._callbacks || {}), this._callbacks['$' + tt] || [] + } + Emitter.prototype.hasListeners = function (tt) { + return !!this.listeners(tt).length + } + const globalThisShim = (() => (typeof self < 'u' ? self : typeof window < 'u' ? window : Function('return this')()))() + function pick(tt, ...et) { + return et.reduce((nt, rt) => (tt.hasOwnProperty(rt) && (nt[rt] = tt[rt]), nt), {}) + } + const NATIVE_SET_TIMEOUT = globalThisShim.setTimeout, + NATIVE_CLEAR_TIMEOUT = globalThisShim.clearTimeout + function installTimerFunctions(tt, et) { + et.useNativeTimers + ? ((tt.setTimeoutFn = NATIVE_SET_TIMEOUT.bind(globalThisShim)), + (tt.clearTimeoutFn = NATIVE_CLEAR_TIMEOUT.bind(globalThisShim))) + : ((tt.setTimeoutFn = globalThisShim.setTimeout.bind(globalThisShim)), + (tt.clearTimeoutFn = globalThisShim.clearTimeout.bind(globalThisShim))) + } + const BASE64_OVERHEAD = 1.33 + function byteLength(tt) { + return typeof tt == 'string' ? utf8Length(tt) : Math.ceil((tt.byteLength || tt.size) * BASE64_OVERHEAD) + } + function utf8Length(tt) { + let et = 0, + nt = 0 + for (let rt = 0, it = tt.length; rt < it; rt++) + (et = tt.charCodeAt(rt)), + et < 128 ? (nt += 1) : et < 2048 ? (nt += 2) : et < 55296 || et >= 57344 ? (nt += 3) : (rt++, (nt += 4)) + return nt + } + function encode$1(tt) { + let et = '' + for (let nt in tt) + tt.hasOwnProperty(nt) && + (et.length && (et += '&'), (et += encodeURIComponent(nt) + '=' + encodeURIComponent(tt[nt]))) + return et + } + function decode(tt) { + let et = {}, + nt = tt.split('&') + for (let rt = 0, it = nt.length; rt < it; rt++) { + let ot = nt[rt].split('=') + et[decodeURIComponent(ot[0])] = decodeURIComponent(ot[1]) + } + return et + } + class TransportError extends Error { + constructor(et, nt, rt) { + super(et), (this.description = nt), (this.context = rt), (this.type = 'TransportError') + } + } + class Transport extends Emitter { + constructor(et) { + super(), + (this.writable = !1), + installTimerFunctions(this, et), + (this.opts = et), + (this.query = et.query), + (this.socket = et.socket) + } + onError(et, nt, rt) { + return super.emitReserved('error', new TransportError(et, nt, rt)), this + } + open() { + return (this.readyState = 'opening'), this.doOpen(), this + } + close() { + return (this.readyState === 'opening' || this.readyState === 'open') && (this.doClose(), this.onClose()), this + } + send(et) { + this.readyState === 'open' && this.write(et) + } + onOpen() { + ;(this.readyState = 'open'), (this.writable = !0), super.emitReserved('open') + } + onData(et) { + const nt = decodePacket(et, this.socket.binaryType) + this.onPacket(nt) + } + onPacket(et) { + super.emitReserved('packet', et) + } + onClose(et) { + ;(this.readyState = 'closed'), super.emitReserved('close', et) + } + pause(et) {} + createUri(et, nt = {}) { + return et + '://' + this._hostname() + this._port() + this.opts.path + this._query(nt) + } + _hostname() { + const et = this.opts.hostname + return et.indexOf(':') === -1 ? et : '[' + et + ']' + } + _port() { + return this.opts.port && + ((this.opts.secure && +(this.opts.port !== 443)) || (!this.opts.secure && Number(this.opts.port) !== 80)) + ? ':' + this.opts.port + : '' + } + _query(et) { + const nt = encode$1(et) + return nt.length ? '?' + nt : '' + } + } + const alphabet = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_'.split(''), + length = 64, + map = {} + let seed = 0, + i = 0, + prev + function encode(tt) { + let et = '' + do (et = alphabet[tt % length] + et), (tt = Math.floor(tt / length)) + while (tt > 0) + return et + } + function yeast() { + const tt = encode(+new Date()) + return tt !== prev ? ((seed = 0), (prev = tt)) : tt + '.' + encode(seed++) + } + for (; i < length; i++) map[alphabet[i]] = i + let value = !1 + try { + value = typeof XMLHttpRequest < 'u' && 'withCredentials' in new XMLHttpRequest() + } catch {} + const hasCORS = value + function XHR(tt) { + const et = tt.xdomain + try { + if (typeof XMLHttpRequest < 'u' && (!et || hasCORS)) return new XMLHttpRequest() + } catch {} + if (!et) + try { + return new globalThisShim[['Active'].concat('Object').join('X')]('Microsoft.XMLHTTP') + } catch {} + } + function createCookieJar() {} + function empty$1() {} + const hasXHR2 = (function () { + return new XHR({ xdomain: !1 }).responseType != null + })() + class Polling extends Transport { + constructor(et) { + if ((super(et), (this.polling = !1), typeof location < 'u')) { + const rt = location.protocol === 'https:' + let it = location.port + it || (it = rt ? '443' : '80'), + (this.xd = (typeof location < 'u' && et.hostname !== location.hostname) || it !== et.port) + } + const nt = et && et.forceBase64 + ;(this.supportsBinary = hasXHR2 && !nt), this.opts.withCredentials && (this.cookieJar = void 0) + } + get name() { + return 'polling' + } + doOpen() { + this.poll() + } + pause(et) { + this.readyState = 'pausing' + const nt = () => { + ;(this.readyState = 'paused'), et() + } + if (this.polling || !this.writable) { + let rt = 0 + this.polling && + (rt++, + this.once('pollComplete', function () { + --rt || nt() + })), + this.writable || + (rt++, + this.once('drain', function () { + --rt || nt() + })) + } else nt() + } + poll() { + ;(this.polling = !0), this.doPoll(), this.emitReserved('poll') + } + onData(et) { + const nt = (rt) => { + if ((this.readyState === 'opening' && rt.type === 'open' && this.onOpen(), rt.type === 'close')) + return this.onClose({ description: 'transport closed by the server' }), !1 + this.onPacket(rt) + } + decodePayload(et, this.socket.binaryType).forEach(nt), + this.readyState !== 'closed' && + ((this.polling = !1), this.emitReserved('pollComplete'), this.readyState === 'open' && this.poll()) + } + doClose() { + const et = () => { + this.write([{ type: 'close' }]) + } + this.readyState === 'open' ? et() : this.once('open', et) + } + write(et) { + ;(this.writable = !1), + encodePayload(et, (nt) => { + this.doWrite(nt, () => { + ;(this.writable = !0), this.emitReserved('drain') + }) + }) + } + uri() { + const et = this.opts.secure ? 'https' : 'http', + nt = this.query || {} + return ( + this.opts.timestampRequests !== !1 && (nt[this.opts.timestampParam] = yeast()), + !this.supportsBinary && !nt.sid && (nt.b64 = 1), + this.createUri(et, nt) + ) + } + request(et = {}) { + return Object.assign(et, { xd: this.xd, cookieJar: this.cookieJar }, this.opts), new Request$1(this.uri(), et) + } + doWrite(et, nt) { + const rt = this.request({ method: 'POST', data: et }) + rt.on('success', nt), + rt.on('error', (it, ot) => { + this.onError('xhr post error', it, ot) + }) + } + doPoll() { + const et = this.request() + et.on('data', this.onData.bind(this)), + et.on('error', (nt, rt) => { + this.onError('xhr poll error', nt, rt) + }), + (this.pollXhr = et) + } + } + let Request$1 = class D0 extends Emitter { + constructor(et, nt) { + super(), + installTimerFunctions(this, nt), + (this.opts = nt), + (this.method = nt.method || 'GET'), + (this.uri = et), + (this.data = nt.data !== void 0 ? nt.data : null), + this.create() + } + create() { + var et + const nt = pick( + this.opts, + 'agent', + 'pfx', + 'key', + 'passphrase', + 'cert', + 'ca', + 'ciphers', + 'rejectUnauthorized', + 'autoUnref', + ) + nt.xdomain = !!this.opts.xd + const rt = (this.xhr = new XHR(nt)) + try { + rt.open(this.method, this.uri, !0) + try { + if (this.opts.extraHeaders) { + rt.setDisableHeaderCheck && rt.setDisableHeaderCheck(!0) + for (let it in this.opts.extraHeaders) + this.opts.extraHeaders.hasOwnProperty(it) && rt.setRequestHeader(it, this.opts.extraHeaders[it]) + } + } catch {} + if (this.method === 'POST') + try { + rt.setRequestHeader('Content-type', 'text/plain;charset=UTF-8') + } catch {} + try { + rt.setRequestHeader('Accept', '*/*') + } catch {} + ;(et = this.opts.cookieJar) === null || et === void 0 || et.addCookies(rt), + 'withCredentials' in rt && (rt.withCredentials = this.opts.withCredentials), + this.opts.requestTimeout && (rt.timeout = this.opts.requestTimeout), + (rt.onreadystatechange = () => { + var it + rt.readyState === 3 && ((it = this.opts.cookieJar) === null || it === void 0 || it.parseCookies(rt)), + rt.readyState === 4 && + (rt.status === 200 || rt.status === 1223 + ? this.onLoad() + : this.setTimeoutFn(() => { + this.onError(typeof rt.status == 'number' ? rt.status : 0) + }, 0)) + }), + rt.send(this.data) + } catch (it) { + this.setTimeoutFn(() => { + this.onError(it) + }, 0) + return + } + typeof document < 'u' && ((this.index = D0.requestsCount++), (D0.requests[this.index] = this)) + } + onError(et) { + this.emitReserved('error', et, this.xhr), this.cleanup(!0) + } + cleanup(et) { + if (!(typeof this.xhr > 'u' || this.xhr === null)) { + if (((this.xhr.onreadystatechange = empty$1), et)) + try { + this.xhr.abort() + } catch {} + typeof document < 'u' && delete D0.requests[this.index], (this.xhr = null) + } + } + onLoad() { + const et = this.xhr.responseText + et !== null && (this.emitReserved('data', et), this.emitReserved('success'), this.cleanup()) + } + abort() { + this.cleanup() + } + } + Request$1.requestsCount = 0 + Request$1.requests = {} + if (typeof document < 'u') { + if (typeof attachEvent == 'function') attachEvent('onunload', unloadHandler) + else if (typeof addEventListener == 'function') { + const tt = 'onpagehide' in globalThisShim ? 'pagehide' : 'unload' + addEventListener(tt, unloadHandler, !1) + } + } + function unloadHandler() { + for (let tt in Request$1.requests) Request$1.requests.hasOwnProperty(tt) && Request$1.requests[tt].abort() + } + const nextTick = (() => + typeof Promise == 'function' && typeof Promise.resolve == 'function' + ? (et) => Promise.resolve().then(et) + : (et, nt) => nt(et, 0))(), + WebSocket = globalThisShim.WebSocket || globalThisShim.MozWebSocket, + usingBrowserWebSocket = !0, + defaultBinaryType = 'arraybuffer', + isReactNative = + typeof navigator < 'u' && + typeof navigator.product == 'string' && + navigator.product.toLowerCase() === 'reactnative' + class WS extends Transport { + constructor(et) { + super(et), (this.supportsBinary = !et.forceBase64) + } + get name() { + return 'websocket' + } + doOpen() { + if (!this.check()) return + const et = this.uri(), + nt = this.opts.protocols, + rt = isReactNative + ? {} + : pick( + this.opts, + 'agent', + 'perMessageDeflate', + 'pfx', + 'key', + 'passphrase', + 'cert', + 'ca', + 'ciphers', + 'rejectUnauthorized', + 'localAddress', + 'protocolVersion', + 'origin', + 'maxPayload', + 'family', + 'checkServerIdentity', + ) + this.opts.extraHeaders && (rt.headers = this.opts.extraHeaders) + try { + this.ws = + usingBrowserWebSocket && !isReactNative + ? nt + ? new WebSocket(et, nt) + : new WebSocket(et) + : new WebSocket(et, nt, rt) + } catch (it) { + return this.emitReserved('error', it) + } + ;(this.ws.binaryType = this.socket.binaryType), this.addEventListeners() + } + addEventListeners() { + ;(this.ws.onopen = () => { + this.opts.autoUnref && this.ws._socket.unref(), this.onOpen() + }), + (this.ws.onclose = (et) => this.onClose({ description: 'websocket connection closed', context: et })), + (this.ws.onmessage = (et) => this.onData(et.data)), + (this.ws.onerror = (et) => this.onError('websocket error', et)) + } + write(et) { + this.writable = !1 + for (let nt = 0; nt < et.length; nt++) { + const rt = et[nt], + it = nt === et.length - 1 + encodePacket(rt, this.supportsBinary, (ot) => { + const at = {} + try { + usingBrowserWebSocket && this.ws.send(ot) + } catch {} + it && + nextTick(() => { + ;(this.writable = !0), this.emitReserved('drain') + }, this.setTimeoutFn) + }) + } + } + doClose() { + typeof this.ws < 'u' && (this.ws.close(), (this.ws = null)) + } + uri() { + const et = this.opts.secure ? 'wss' : 'ws', + nt = this.query || {} + return ( + this.opts.timestampRequests && (nt[this.opts.timestampParam] = yeast()), + this.supportsBinary || (nt.b64 = 1), + this.createUri(et, nt) + ) + } + check() { + return !!WebSocket + } + } + class WT extends Transport { + get name() { + return 'webtransport' + } + doOpen() { + typeof WebTransport == 'function' && + ((this.transport = new WebTransport(this.createUri('https'), this.opts.transportOptions[this.name])), + this.transport.closed + .then(() => { + this.onClose() + }) + .catch((et) => { + this.onError('webtransport error', et) + }), + this.transport.ready.then(() => { + this.transport.createBidirectionalStream().then((et) => { + const nt = createPacketDecoderStream(Number.MAX_SAFE_INTEGER, this.socket.binaryType), + rt = et.readable.pipeThrough(nt).getReader(), + it = createPacketEncoderStream() + it.readable.pipeTo(et.writable), (this.writer = it.writable.getWriter()) + const ot = () => { + rt.read() + .then(({ done: st, value: lt }) => { + st || (this.onPacket(lt), ot()) + }) + .catch((st) => {}) + } + ot() + const at = { type: 'open' } + this.query.sid && (at.data = `{"sid":"${this.query.sid}"}`), this.writer.write(at).then(() => this.onOpen()) + }) + })) + } + write(et) { + this.writable = !1 + for (let nt = 0; nt < et.length; nt++) { + const rt = et[nt], + it = nt === et.length - 1 + this.writer.write(rt).then(() => { + it && + nextTick(() => { + ;(this.writable = !0), this.emitReserved('drain') + }, this.setTimeoutFn) + }) + } + } + doClose() { + var et + ;(et = this.transport) === null || et === void 0 || et.close() + } + } + const transports = { websocket: WS, webtransport: WT, polling: Polling }, + re = + /^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/, + parts = [ + 'source', + 'protocol', + 'authority', + 'userInfo', + 'user', + 'password', + 'host', + 'port', + 'relative', + 'path', + 'directory', + 'file', + 'query', + 'anchor', + ] + function parse(tt) { + const et = tt, + nt = tt.indexOf('['), + rt = tt.indexOf(']') + nt != -1 && + rt != -1 && + (tt = tt.substring(0, nt) + tt.substring(nt, rt).replace(/:/g, ';') + tt.substring(rt, tt.length)) + let it = re.exec(tt || ''), + ot = {}, + at = 14 + for (; at--; ) ot[parts[at]] = it[at] || '' + return ( + nt != -1 && + rt != -1 && + ((ot.source = et), + (ot.host = ot.host.substring(1, ot.host.length - 1).replace(/;/g, ':')), + (ot.authority = ot.authority.replace('[', '').replace(']', '').replace(/;/g, ':')), + (ot.ipv6uri = !0)), + (ot.pathNames = pathNames(ot, ot.path)), + (ot.queryKey = queryKey(ot, ot.query)), + ot + ) + } + function pathNames(tt, et) { + const nt = /\/{2,9}/g, + rt = et.replace(nt, '/').split('/') + return ( + (et.slice(0, 1) == '/' || et.length === 0) && rt.splice(0, 1), + et.slice(-1) == '/' && rt.splice(rt.length - 1, 1), + rt + ) + } + function queryKey(tt, et) { + const nt = {} + return ( + et.replace(/(?:^|&)([^&=]*)=?([^&]*)/g, function (rt, it, ot) { + it && (nt[it] = ot) + }), + nt + ) + } + let Socket$1 = class Gm extends Emitter { + constructor(et, nt = {}) { + super(), + (this.binaryType = defaultBinaryType), + (this.writeBuffer = []), + et && typeof et == 'object' && ((nt = et), (et = null)), + et + ? ((et = parse(et)), + (nt.hostname = et.host), + (nt.secure = et.protocol === 'https' || et.protocol === 'wss'), + (nt.port = et.port), + et.query && (nt.query = et.query)) + : nt.host && (nt.hostname = parse(nt.host).host), + installTimerFunctions(this, nt), + (this.secure = nt.secure != null ? nt.secure : typeof location < 'u' && location.protocol === 'https:'), + nt.hostname && !nt.port && (nt.port = this.secure ? '443' : '80'), + (this.hostname = nt.hostname || (typeof location < 'u' ? location.hostname : 'localhost')), + (this.port = nt.port || (typeof location < 'u' && location.port ? location.port : this.secure ? '443' : '80')), + (this.transports = nt.transports || ['polling', 'websocket', 'webtransport']), + (this.writeBuffer = []), + (this.prevBufferLen = 0), + (this.opts = Object.assign( + { + path: '/engine.io', + agent: !1, + withCredentials: !1, + upgrade: !0, + timestampParam: 't', + rememberUpgrade: !1, + addTrailingSlash: !0, + rejectUnauthorized: !0, + perMessageDeflate: { threshold: 1024 }, + transportOptions: {}, + closeOnBeforeunload: !1, + }, + nt, + )), + (this.opts.path = this.opts.path.replace(/\/$/, '') + (this.opts.addTrailingSlash ? '/' : '')), + typeof this.opts.query == 'string' && (this.opts.query = decode(this.opts.query)), + (this.id = null), + (this.upgrades = null), + (this.pingInterval = null), + (this.pingTimeout = null), + (this.pingTimeoutTimer = null), + typeof addEventListener == 'function' && + (this.opts.closeOnBeforeunload && + ((this.beforeunloadEventListener = () => { + this.transport && (this.transport.removeAllListeners(), this.transport.close()) + }), + addEventListener('beforeunload', this.beforeunloadEventListener, !1)), + this.hostname !== 'localhost' && + ((this.offlineEventListener = () => { + this.onClose('transport close', { description: 'network connection lost' }) + }), + addEventListener('offline', this.offlineEventListener, !1))), + this.open() + } + createTransport(et) { + const nt = Object.assign({}, this.opts.query) + ;(nt.EIO = protocol$1), (nt.transport = et), this.id && (nt.sid = this.id) + const rt = Object.assign( + {}, + this.opts, + { query: nt, socket: this, hostname: this.hostname, secure: this.secure, port: this.port }, + this.opts.transportOptions[et], + ) + return new transports[et](rt) + } + open() { + let et + if (this.opts.rememberUpgrade && Gm.priorWebsocketSuccess && this.transports.indexOf('websocket') !== -1) + et = 'websocket' + else if (this.transports.length === 0) { + this.setTimeoutFn(() => { + this.emitReserved('error', 'No transports available') + }, 0) + return + } else et = this.transports[0] + this.readyState = 'opening' + try { + et = this.createTransport(et) + } catch { + this.transports.shift(), this.open() + return + } + et.open(), this.setTransport(et) + } + setTransport(et) { + this.transport && this.transport.removeAllListeners(), + (this.transport = et), + et + .on('drain', this.onDrain.bind(this)) + .on('packet', this.onPacket.bind(this)) + .on('error', this.onError.bind(this)) + .on('close', (nt) => this.onClose('transport close', nt)) + } + probe(et) { + let nt = this.createTransport(et), + rt = !1 + Gm.priorWebsocketSuccess = !1 + const it = () => { + rt || + (nt.send([{ type: 'ping', data: 'probe' }]), + nt.once('packet', (ht) => { + if (!rt) + if (ht.type === 'pong' && ht.data === 'probe') { + if (((this.upgrading = !0), this.emitReserved('upgrading', nt), !nt)) return + ;(Gm.priorWebsocketSuccess = nt.name === 'websocket'), + this.transport.pause(() => { + rt || + (this.readyState !== 'closed' && + (ut(), + this.setTransport(nt), + nt.send([{ type: 'upgrade' }]), + this.emitReserved('upgrade', nt), + (nt = null), + (this.upgrading = !1), + this.flush())) + }) + } else { + const dt = new Error('probe error') + ;(dt.transport = nt.name), this.emitReserved('upgradeError', dt) + } + })) + } + function ot() { + rt || ((rt = !0), ut(), nt.close(), (nt = null)) + } + const at = (ht) => { + const dt = new Error('probe error: ' + ht) + ;(dt.transport = nt.name), ot(), this.emitReserved('upgradeError', dt) + } + function st() { + at('transport closed') + } + function lt() { + at('socket closed') + } + function ct(ht) { + nt && ht.name !== nt.name && ot() + } + const ut = () => { + nt.removeListener('open', it), + nt.removeListener('error', at), + nt.removeListener('close', st), + this.off('close', lt), + this.off('upgrading', ct) + } + nt.once('open', it), + nt.once('error', at), + nt.once('close', st), + this.once('close', lt), + this.once('upgrading', ct), + this.upgrades.indexOf('webtransport') !== -1 && et !== 'webtransport' + ? this.setTimeoutFn(() => { + rt || nt.open() + }, 200) + : nt.open() + } + onOpen() { + if ( + ((this.readyState = 'open'), + (Gm.priorWebsocketSuccess = this.transport.name === 'websocket'), + this.emitReserved('open'), + this.flush(), + this.readyState === 'open' && this.opts.upgrade) + ) { + let et = 0 + const nt = this.upgrades.length + for (; et < nt; et++) this.probe(this.upgrades[et]) + } + } + onPacket(et) { + if (this.readyState === 'opening' || this.readyState === 'open' || this.readyState === 'closing') + switch ((this.emitReserved('packet', et), this.emitReserved('heartbeat'), this.resetPingTimeout(), et.type)) { + case 'open': + this.onHandshake(JSON.parse(et.data)) + break + case 'ping': + this.sendPacket('pong'), this.emitReserved('ping'), this.emitReserved('pong') + break + case 'error': + const nt = new Error('server error') + ;(nt.code = et.data), this.onError(nt) + break + case 'message': + this.emitReserved('data', et.data), this.emitReserved('message', et.data) + break } - #else - uniform mat4 prevBoneMatrices[ MAX_BONES ]; - mat4 getPrevBoneMatrix( const in float i ) { - mat4 bone = prevBoneMatrices[ int(i) ]; - return bone; + } + onHandshake(et) { + this.emitReserved('handshake', et), + (this.id = et.sid), + (this.transport.query.sid = et.sid), + (this.upgrades = this.filterUpgrades(et.upgrades)), + (this.pingInterval = et.pingInterval), + (this.pingTimeout = et.pingTimeout), + (this.maxPayload = et.maxPayload), + this.onOpen(), + this.readyState !== 'closed' && this.resetPingTimeout() + } + resetPingTimeout() { + this.clearTimeoutFn(this.pingTimeoutTimer), + (this.pingTimeoutTimer = this.setTimeoutFn(() => { + this.onClose('ping timeout') + }, this.pingInterval + this.pingTimeout)), + this.opts.autoUnref && this.pingTimeoutTimer.unref() + } + onDrain() { + this.writeBuffer.splice(0, this.prevBufferLen), + (this.prevBufferLen = 0), + this.writeBuffer.length === 0 ? this.emitReserved('drain') : this.flush() + } + flush() { + if (this.readyState !== 'closed' && this.transport.writable && !this.upgrading && this.writeBuffer.length) { + const et = this.getWritablePackets() + this.transport.send(et), (this.prevBufferLen = et.length), this.emitReserved('flush') + } + } + getWritablePackets() { + if (!(this.maxPayload && this.transport.name === 'polling' && this.writeBuffer.length > 1)) + return this.writeBuffer + let nt = 1 + for (let rt = 0; rt < this.writeBuffer.length; rt++) { + const it = this.writeBuffer[rt].data + if ((it && (nt += byteLength(it)), rt > 0 && nt > this.maxPayload)) return this.writeBuffer.slice(0, rt) + nt += 2 + } + return this.writeBuffer + } + write(et, nt, rt) { + return this.sendPacket('message', et, nt, rt), this + } + send(et, nt, rt) { + return this.sendPacket('message', et, nt, rt), this + } + sendPacket(et, nt, rt, it) { + if ( + (typeof nt == 'function' && ((it = nt), (nt = void 0)), + typeof rt == 'function' && ((it = rt), (rt = null)), + this.readyState === 'closing' || this.readyState === 'closed') + ) + return + ;(rt = rt || {}), (rt.compress = rt.compress !== !1) + const ot = { type: et, data: nt, options: rt } + this.emitReserved('packetCreate', ot), this.writeBuffer.push(ot), it && this.once('flush', it), this.flush() + } + close() { + const et = () => { + this.onClose('forced close'), this.transport.close() + }, + nt = () => { + this.off('upgrade', nt), this.off('upgradeError', nt), et() + }, + rt = () => { + this.once('upgrade', nt), this.once('upgradeError', nt) } - #endif - #endif -`,velocity_vertex=` - vec3 transformed; - - // Get the normal - ${ShaderChunk.skinbase_vertex} - ${ShaderChunk.beginnormal_vertex} - ${ShaderChunk.skinnormal_vertex} - ${ShaderChunk.defaultnormal_vertex} - - // Get the current vertex position - transformed = vec3( position ); - ${ShaderChunk.skinning_vertex} - newPosition = velocityMatrix * vec4( transformed, 1.0 ); - - // Get the previous vertex position - transformed = vec3( position ); - ${ShaderChunk.skinbase_vertex.replace(/mat4 /g,"").replace(/getBoneMatrix/g,"getPrevBoneMatrix")} - ${ShaderChunk.skinning_vertex.replace(/vec4 /g,"")} - prevPosition = prevVelocityMatrix * vec4( transformed, 1.0 ); - - gl_Position = newPosition; -`;class VelocityMaterial extends ShaderMaterial{constructor(){super({uniforms:{prevVelocityMatrix:{value:new Matrix4},velocityMatrix:{value:new Matrix4},prevBoneTexture:{value:null},interpolateGeometry:{value:0},intensity:{value:1},boneTexture:{value:null},alphaTest:{value:0},map:{value:null},alphaMap:{value:null},opacity:{value:1}},vertexShader:` - #define MAX_BONES 1024 - - ${ShaderChunk.skinning_pars_vertex} - ${prev_skinning_pars_vertex} - - uniform mat4 velocityMatrix; - uniform mat4 prevVelocityMatrix; - uniform float interpolateGeometry; - varying vec4 prevPosition; - varying vec4 newPosition; - varying vec2 vHighPrecisionZW; - - void main() { - - ${velocity_vertex} - - vHighPrecisionZW = gl_Position.zw; - - }`,fragmentShader:` - uniform float intensity; - varying vec4 prevPosition; - varying vec4 newPosition; - varying vec2 vHighPrecisionZW; - - void main() { - #ifdef FULL_MOVEMENT - gl_FragColor = vec4( 1., 1., 1. - gl_FragCoord.z, 0. ); - return; - #endif - - vec2 pos0 = (prevPosition.xy / prevPosition.w) * 0.5 + 0.5; - vec2 pos1 = (newPosition.xy / newPosition.w) * 0.5 + 0.5; - - vec2 vel = pos1 - pos0; - - float fragCoordZ = 0.5 * vHighPrecisionZW[0] / vHighPrecisionZW[1] + 0.5; - - gl_FragColor = vec4( vel, 1. - fragCoordZ, 0. ); - - }`}),this.isVelocityMaterial=!0}}const backgroundColor=new Color$1(0),updateProperties=["visible","wireframe","side"];class VelocityPass extends Pass{constructor(et,nt){var rt,it;super("VelocityPass"),this.cachedMaterials=new WeakMap,this.lastCameraTransform={position:new Vector3,quaternion:new Quaternion},this.visibleMeshes=[],this.renderedMeshesThisFrame=0,this.renderedMeshesLastFrame=0,this._scene=et,this._camera=nt,this.renderTarget=new WebGLRenderTarget(((rt=window)==null?void 0:rt.innerWidth)||1e3,((it=window)==null?void 0:it.innerHeight)||1e3,{type:HalfFloatType})}setVelocityMaterialInScene(){this.renderedMeshesThisFrame=0,this.visibleMeshes=getVisibleChildren(this._scene);for(const rt of this.visibleMeshes){var et;const it=rt.material;let[ot,at]=this.cachedMaterials.get(rt)||[];if(it!==ot){var nt;at=new VelocityMaterial,at.lastMatrixWorld=new Matrix4,rt.material=at,(nt=rt.skeleton)!=null&&nt.boneTexture&&this.saveBoneTexture(rt),this.cachedMaterials.set(rt,[it,at])}if(at.uniforms.velocityMatrix.value.multiplyMatrices(this._camera.projectionMatrix,rt.modelViewMatrix),rt.userData.needsUpdatedReflections||it.map instanceof VideoTexture?("FULL_MOVEMENT"in at.defines||(at.needsUpdate=!0),at.defines.FULL_MOVEMENT=""):"FULL_MOVEMENT"in at.defines&&(delete at.defines.FULL_MOVEMENT,at.needsUpdate=!0),rt.visible=this.cameraMovedThisFrame||!rt.matrixWorld.equals(at.lastMatrixWorld)||rt.skeleton||"FULL_MOVEMENT"in at.defines,rt.material=at,!!rt.visible){this.renderedMeshesThisFrame++;for(const st of updateProperties)at[st]=it[st];(et=rt.skeleton)!=null&&et.boneTexture&&(at.defines.USE_SKINNING="",at.defines.BONE_TEXTURE="",at.uniforms.boneTexture.value=rt.skeleton.boneTexture)}}}saveBoneTexture(et){let nt=et.material.uniforms.prevBoneTexture.value;if(nt&&nt.image.width===et.skeleton.boneTexture.width)nt=et.material.uniforms.prevBoneTexture.value,nt.image.data.set(et.skeleton.boneTexture.image.data);else{var rt;(rt=nt)==null||rt.dispose();const it=et.skeleton.boneTexture.image.data.slice(),ot=et.skeleton.boneTexture.image.width;nt=new DataTexture(it,ot,ot,RGBAFormat,FloatType),et.material.uniforms.prevBoneTexture.value=nt,nt.needsUpdate=!0}}unsetVelocityMaterialInScene(){for(const nt of this.visibleMeshes)if(nt.material.isVelocityMaterial){var et;nt.visible=!0,nt.material.lastMatrixWorld.copy(nt.matrixWorld),nt.material.uniforms.prevVelocityMatrix.value.multiplyMatrices(this._camera.projectionMatrix,nt.modelViewMatrix),(et=nt.skeleton)!=null&&et.boneTexture&&this.saveBoneTexture(nt),nt.material=this.cachedMaterials.get(nt)[0]}}setSize(et,nt){this.renderTarget.setSize(et,nt)}renderVelocity(et){if(et.setRenderTarget(this.renderTarget),this.renderedMeshesThisFrame>0){const{background:nt}=this._scene;this._scene.background=backgroundColor,et.render(this._scene,this._camera),this._scene.background=nt}else et.clearColor()}checkCameraMoved(){const et=this.lastCameraTransform.position.distanceToSquared(this._camera.position),nt=8*(1-this.lastCameraTransform.quaternion.dot(this._camera.quaternion));return et>1e-6||nt>1e-6?(this.lastCameraTransform.position.copy(this._camera.position),this.lastCameraTransform.quaternion.copy(this._camera.quaternion),!0):!1}render(et){this.cameraMovedThisFrame=this.checkCameraMoved(),this.setVelocityMaterialInScene(),(this.renderedMeshesThisFrame>0||this.renderedMeshesLastFrame>0)&&this.renderVelocity(et),this.unsetVelocityMaterialInScene(),this.renderedMeshesLastFrame=this.renderedMeshesThisFrame}}const zeroVec2=new Vector2;class TemporalResolvePass extends Pass{constructor(et,nt,rt,it={}){super("TemporalResolvePass"),this.velocityPass=null,this.velocityResolutionScale=1,this.samples=1,this.lastCameraTransform={position:new Vector3,quaternion:new Quaternion},this._scene=et,this._camera=nt,this.renderTarget=new WebGLRenderTarget(1,1,{minFilter:LinearFilter,magFilter:LinearFilter,type:HalfFloatType,depthBuffer:!1}),this.velocityPass=new VelocityPass(et,nt),this.fullscreenMaterial=new TemporalResolveMaterial(rt),this.fullscreenMaterial.defines.correctionRadius=it.correctionRadius||1,it.dilation&&(this.fullscreenMaterial.defines.dilation=""),it.boxBlur&&(this.fullscreenMaterial.defines.boxBlur=""),this.setupFramebuffers(1,1),this.checkCanUseSharedVelocityTexture()}dispose(){this._scene.userData.velocityTexture===this.velocityPass.renderTarget.texture&&(delete this._scene.userData.velocityTexture,delete this._scene.userData.lastVelocityTexture),this.renderTarget.dispose(),this.accumulatedTexture.dispose(),this.fullscreenMaterial.dispose(),this.velocityPass.dispose()}setSize(et,nt){this.renderTarget.setSize(et,nt),this.velocityPass.setSize(et*this.velocityResolutionScale,nt*this.velocityResolutionScale),this.velocityPass.renderTarget.texture.minFilter=this.velocityResolutionScale===1?NearestFilter:LinearFilter,this.velocityPass.renderTarget.texture.magFilter=this.velocityResolutionScale===1?NearestFilter:LinearFilter,this.velocityPass.renderTarget.texture.needsUpdate=!0,this.fullscreenMaterial.uniforms.invTexSize.value.set(1/et,1/nt),this.setupFramebuffers(et,nt)}setupFramebuffers(et,nt){this.accumulatedTexture&&this.accumulatedTexture.dispose(),this.lastVelocityTexture&&this.lastVelocityTexture.dispose(),this.accumulatedTexture=new FramebufferTexture(et,nt,RGBAFormat),this.accumulatedTexture.minFilter=LinearFilter,this.accumulatedTexture.magFilter=LinearFilter,this.accumulatedTexture.type=HalfFloatType,this.lastVelocityTexture=new FramebufferTexture(et*this.velocityResolutionScale,nt*this.velocityResolutionScale,RGBAFormat),this.lastVelocityTexture.minFilter=this.velocityResolutionScale===1?NearestFilter:LinearFilter,this.lastVelocityTexture.magFilter=this.velocityResolutionScale===1?NearestFilter:LinearFilter,this.lastVelocityTexture.type=HalfFloatType,this.fullscreenMaterial.uniforms.accumulatedTexture.value=this.accumulatedTexture,this.fullscreenMaterial.uniforms.lastVelocityTexture.value=this.lastVelocityTexture,this.fullscreenMaterial.needsUpdate=!0}checkCanUseSharedVelocityTexture(){return this._scene.userData.velocityTexture&&this.velocityPass.renderTarget.texture!==this._scene.userData.velocityTexture?this.velocityPass.renderTarget.texture===this.fullscreenMaterial.uniforms.velocityTexture.value&&(this.fullscreenMaterial.uniforms.lastVelocityTexture.value=this._scene.userData.lastVelocityTexture,this.fullscreenMaterial.uniforms.velocityTexture.value=this._scene.userData.velocityTexture,this.fullscreenMaterial.needsUpdate=!0):this.velocityPass.renderTarget.texture!==this.fullscreenMaterial.uniforms.velocityTexture.value&&(this.fullscreenMaterial.uniforms.velocityTexture.value=this.velocityPass.renderTarget.texture,this.fullscreenMaterial.uniforms.lastVelocityTexture.value=this.lastVelocityTexture,this.fullscreenMaterial.needsUpdate=!0,this._scene.userData.velocityTexture||(this._scene.userData.velocityTexture=this.velocityPass.renderTarget.texture,this._scene.userData.lastVelocityTexture=this.lastVelocityTexture)),this.velocityPass.renderTarget.texture!==this.fullscreenMaterial.uniforms.velocityTexture.value}checkNeedsResample(){const et=this.lastCameraTransform.position.distanceToSquared(this._camera.position),nt=8*(1-this.lastCameraTransform.quaternion.dot(this._camera.quaternion));(et>1e-6||nt>1e-6)&&(this.samples=1,this.lastCameraTransform.position.copy(this._camera.position),this.lastCameraTransform.quaternion.copy(this._camera.quaternion))}render(et){this.samples++,this.checkNeedsResample(),this.fullscreenMaterial.uniforms.samples.value=this.samples,et.setRenderTarget(this.renderTarget),et.render(this.scene,this.camera),et.copyFramebufferToTexture(zeroVec2,this.accumulatedTexture),et.setRenderTarget(this.velocityPass.renderTarget),et.copyFramebufferToTexture(zeroVec2,this.lastVelocityTexture)}}const halton=function(et,nt){let rt=1,it=0;for(;et>0;)rt/=nt,it+=rt*(et%nt),et=~~(et/nt);return it},generateHalton23Points=tt=>{const et=[];let nt=1;const rt=nt+tt;for(;nt { + this.upgrading ? rt() : et() + }) + : this.upgrading + ? rt() + : et()), + this + ) + } + onError(et) { + ;(Gm.priorWebsocketSuccess = !1), this.emitReserved('error', et), this.onClose('transport error', et) + } + onClose(et, nt) { + ;(this.readyState === 'opening' || this.readyState === 'open' || this.readyState === 'closing') && + (this.clearTimeoutFn(this.pingTimeoutTimer), + this.transport.removeAllListeners('close'), + this.transport.close(), + this.transport.removeAllListeners(), + typeof removeEventListener == 'function' && + (removeEventListener('beforeunload', this.beforeunloadEventListener, !1), + removeEventListener('offline', this.offlineEventListener, !1)), + (this.readyState = 'closed'), + (this.id = null), + this.emitReserved('close', et, nt), + (this.writeBuffer = []), + (this.prevBufferLen = 0)) + } + filterUpgrades(et) { + const nt = [] + let rt = 0 + const it = et.length + for (; rt < it; rt++) ~this.transports.indexOf(et[rt]) && nt.push(et[rt]) + return nt + } + } + Socket$1.protocol = protocol$1 + function url(tt, et = '', nt) { + let rt = tt + ;(nt = nt || (typeof location < 'u' && location)), + tt == null && (tt = nt.protocol + '//' + nt.host), + typeof tt == 'string' && + (tt.charAt(0) === '/' && (tt.charAt(1) === '/' ? (tt = nt.protocol + tt) : (tt = nt.host + tt)), + /^(https?|wss?):\/\//.test(tt) || (typeof nt < 'u' ? (tt = nt.protocol + '//' + tt) : (tt = 'https://' + tt)), + (rt = parse(tt))), + rt.port || + (/^(http|ws)$/.test(rt.protocol) ? (rt.port = '80') : /^(http|ws)s$/.test(rt.protocol) && (rt.port = '443')), + (rt.path = rt.path || '/') + const ot = rt.host.indexOf(':') !== -1 ? '[' + rt.host + ']' : rt.host + return ( + (rt.id = rt.protocol + '://' + ot + ':' + rt.port + et), + (rt.href = rt.protocol + '://' + ot + (nt && nt.port === rt.port ? '' : ':' + rt.port)), + rt + ) + } + const withNativeArrayBuffer = typeof ArrayBuffer == 'function', + isView = (tt) => + typeof ArrayBuffer.isView == 'function' ? ArrayBuffer.isView(tt) : tt.buffer instanceof ArrayBuffer, + toString = Object.prototype.toString, + withNativeBlob = + typeof Blob == 'function' || (typeof Blob < 'u' && toString.call(Blob) === '[object BlobConstructor]'), + withNativeFile = + typeof File == 'function' || (typeof File < 'u' && toString.call(File) === '[object FileConstructor]') + function isBinary(tt) { + return ( + (withNativeArrayBuffer && (tt instanceof ArrayBuffer || isView(tt))) || + (withNativeBlob && tt instanceof Blob) || + (withNativeFile && tt instanceof File) + ) + } + function hasBinary(tt, et) { + if (!tt || typeof tt != 'object') return !1 + if (Array.isArray(tt)) { + for (let nt = 0, rt = tt.length; nt < rt; nt++) if (hasBinary(tt[nt])) return !0 + return !1 + } + if (isBinary(tt)) return !0 + if (tt.toJSON && typeof tt.toJSON == 'function' && arguments.length === 1) return hasBinary(tt.toJSON(), !0) + for (const nt in tt) if (Object.prototype.hasOwnProperty.call(tt, nt) && hasBinary(tt[nt])) return !0 + return !1 + } + function deconstructPacket(tt) { + const et = [], + nt = tt.data, + rt = tt + return (rt.data = _deconstructPacket(nt, et)), (rt.attachments = et.length), { packet: rt, buffers: et } + } + function _deconstructPacket(tt, et) { + if (!tt) return tt + if (isBinary(tt)) { + const nt = { _placeholder: !0, num: et.length } + return et.push(tt), nt + } else if (Array.isArray(tt)) { + const nt = new Array(tt.length) + for (let rt = 0; rt < tt.length; rt++) nt[rt] = _deconstructPacket(tt[rt], et) + return nt + } else if (typeof tt == 'object' && !(tt instanceof Date)) { + const nt = {} + for (const rt in tt) Object.prototype.hasOwnProperty.call(tt, rt) && (nt[rt] = _deconstructPacket(tt[rt], et)) + return nt + } + return tt + } + function reconstructPacket(tt, et) { + return (tt.data = _reconstructPacket(tt.data, et)), delete tt.attachments, tt + } + function _reconstructPacket(tt, et) { + if (!tt) return tt + if (tt && tt._placeholder === !0) { + if (typeof tt.num == 'number' && tt.num >= 0 && tt.num < et.length) return et[tt.num] + throw new Error('illegal attachments') + } else if (Array.isArray(tt)) for (let nt = 0; nt < tt.length; nt++) tt[nt] = _reconstructPacket(tt[nt], et) + else if (typeof tt == 'object') + for (const nt in tt) Object.prototype.hasOwnProperty.call(tt, nt) && (tt[nt] = _reconstructPacket(tt[nt], et)) + return tt + } + const RESERVED_EVENTS$1 = [ + 'connect', + 'connect_error', + 'disconnect', + 'disconnecting', + 'newListener', + 'removeListener', + ], + protocol = 5 + var PacketType + ;(function (tt) { + ;(tt[(tt.CONNECT = 0)] = 'CONNECT'), + (tt[(tt.DISCONNECT = 1)] = 'DISCONNECT'), + (tt[(tt.EVENT = 2)] = 'EVENT'), + (tt[(tt.ACK = 3)] = 'ACK'), + (tt[(tt.CONNECT_ERROR = 4)] = 'CONNECT_ERROR'), + (tt[(tt.BINARY_EVENT = 5)] = 'BINARY_EVENT'), + (tt[(tt.BINARY_ACK = 6)] = 'BINARY_ACK') + })(PacketType || (PacketType = {})) + class Encoder { + constructor(et) { + this.replacer = et + } + encode(et) { + return (et.type === PacketType.EVENT || et.type === PacketType.ACK) && hasBinary(et) + ? this.encodeAsBinary({ + type: et.type === PacketType.EVENT ? PacketType.BINARY_EVENT : PacketType.BINARY_ACK, + nsp: et.nsp, + data: et.data, + id: et.id, + }) + : [this.encodeAsString(et)] + } + encodeAsString(et) { + let nt = '' + et.type + return ( + (et.type === PacketType.BINARY_EVENT || et.type === PacketType.BINARY_ACK) && (nt += et.attachments + '-'), + et.nsp && et.nsp !== '/' && (nt += et.nsp + ','), + et.id != null && (nt += et.id), + et.data != null && (nt += JSON.stringify(et.data, this.replacer)), + nt + ) + } + encodeAsBinary(et) { + const nt = deconstructPacket(et), + rt = this.encodeAsString(nt.packet), + it = nt.buffers + return it.unshift(rt), it + } + } + function isObject(tt) { + return Object.prototype.toString.call(tt) === '[object Object]' + } + class Decoder extends Emitter { + constructor(et) { + super(), (this.reviver = et) + } + add(et) { + let nt + if (typeof et == 'string') { + if (this.reconstructor) throw new Error('got plaintext data when reconstructing a packet') + nt = this.decodeString(et) + const rt = nt.type === PacketType.BINARY_EVENT + rt || nt.type === PacketType.BINARY_ACK + ? ((nt.type = rt ? PacketType.EVENT : PacketType.ACK), + (this.reconstructor = new BinaryReconstructor(nt)), + nt.attachments === 0 && super.emitReserved('decoded', nt)) + : super.emitReserved('decoded', nt) + } else if (isBinary(et) || et.base64) + if (this.reconstructor) + (nt = this.reconstructor.takeBinaryData(et)), + nt && ((this.reconstructor = null), super.emitReserved('decoded', nt)) + else throw new Error('got binary data when not reconstructing a packet') + else throw new Error('Unknown type: ' + et) + } + decodeString(et) { + let nt = 0 + const rt = { type: Number(et.charAt(0)) } + if (PacketType[rt.type] === void 0) throw new Error('unknown packet type ' + rt.type) + if (rt.type === PacketType.BINARY_EVENT || rt.type === PacketType.BINARY_ACK) { + const ot = nt + 1 + for (; et.charAt(++nt) !== '-' && nt != et.length; ); + const at = et.substring(ot, nt) + if (at != Number(at) || et.charAt(nt) !== '-') throw new Error('Illegal attachments') + rt.attachments = Number(at) + } + if (et.charAt(nt + 1) === '/') { + const ot = nt + 1 + for (; ++nt && !(et.charAt(nt) === ',' || nt === et.length); ); + rt.nsp = et.substring(ot, nt) + } else rt.nsp = '/' + const it = et.charAt(nt + 1) + if (it !== '' && Number(it) == it) { + const ot = nt + 1 + for (; ++nt; ) { + const at = et.charAt(nt) + if (at == null || Number(at) != at) { + --nt + break + } + if (nt === et.length) break + } + rt.id = Number(et.substring(ot, nt + 1)) + } + if (et.charAt(++nt)) { + const ot = this.tryParse(et.substr(nt)) + if (Decoder.isPayloadValid(rt.type, ot)) rt.data = ot + else throw new Error('invalid payload') + } + return rt + } + tryParse(et) { + try { + return JSON.parse(et, this.reviver) + } catch { + return !1 + } + } + static isPayloadValid(et, nt) { + switch (et) { + case PacketType.CONNECT: + return isObject(nt) + case PacketType.DISCONNECT: + return nt === void 0 + case PacketType.CONNECT_ERROR: + return typeof nt == 'string' || isObject(nt) + case PacketType.EVENT: + case PacketType.BINARY_EVENT: + return ( + Array.isArray(nt) && + (typeof nt[0] == 'number' || (typeof nt[0] == 'string' && RESERVED_EVENTS$1.indexOf(nt[0]) === -1)) + ) + case PacketType.ACK: + case PacketType.BINARY_ACK: + return Array.isArray(nt) + } + } + destroy() { + this.reconstructor && (this.reconstructor.finishedReconstruction(), (this.reconstructor = null)) + } + } + class BinaryReconstructor { + constructor(et) { + ;(this.packet = et), (this.buffers = []), (this.reconPack = et) + } + takeBinaryData(et) { + if ((this.buffers.push(et), this.buffers.length === this.reconPack.attachments)) { + const nt = reconstructPacket(this.reconPack, this.buffers) + return this.finishedReconstruction(), nt + } + return null + } + finishedReconstruction() { + ;(this.reconPack = null), (this.buffers = []) + } + } + const parser = Object.freeze( + Object.defineProperty( + { + __proto__: null, + Decoder, + Encoder, + get PacketType() { + return PacketType + }, + protocol, + }, + Symbol.toStringTag, + { value: 'Module' }, + ), + ) + function on(tt, et, nt) { + return ( + tt.on(et, nt), + function () { + tt.off(et, nt) + } + ) + } + const RESERVED_EVENTS = Object.freeze({ + connect: 1, + connect_error: 1, + disconnect: 1, + disconnecting: 1, + newListener: 1, + removeListener: 1, + }) + class Socket extends Emitter { + constructor(et, nt, rt) { + super(), + (this.connected = !1), + (this.recovered = !1), + (this.receiveBuffer = []), + (this.sendBuffer = []), + (this._queue = []), + (this._queueSeq = 0), + (this.ids = 0), + (this.acks = {}), + (this.flags = {}), + (this.io = et), + (this.nsp = nt), + rt && rt.auth && (this.auth = rt.auth), + (this._opts = Object.assign({}, rt)), + this.io._autoConnect && this.open() + } + get disconnected() { + return !this.connected + } + subEvents() { + if (this.subs) return + const et = this.io + this.subs = [ + on(et, 'open', this.onopen.bind(this)), + on(et, 'packet', this.onpacket.bind(this)), + on(et, 'error', this.onerror.bind(this)), + on(et, 'close', this.onclose.bind(this)), + ] + } + get active() { + return !!this.subs + } + connect() { + return this.connected + ? this + : (this.subEvents(), + this.io._reconnecting || this.io.open(), + this.io._readyState === 'open' && this.onopen(), + this) + } + open() { + return this.connect() + } + send(...et) { + return et.unshift('message'), this.emit.apply(this, et), this + } + emit(et, ...nt) { + if (RESERVED_EVENTS.hasOwnProperty(et)) throw new Error('"' + et.toString() + '" is a reserved event name') + if ((nt.unshift(et), this._opts.retries && !this.flags.fromQueue && !this.flags.volatile)) + return this._addToQueue(nt), this + const rt = { type: PacketType.EVENT, data: nt } + if ( + ((rt.options = {}), (rt.options.compress = this.flags.compress !== !1), typeof nt[nt.length - 1] == 'function') + ) { + const at = this.ids++, + st = nt.pop() + this._registerAckCallback(at, st), (rt.id = at) + } + const it = this.io.engine && this.io.engine.transport && this.io.engine.transport.writable + return ( + (this.flags.volatile && (!it || !this.connected)) || + (this.connected ? (this.notifyOutgoingListeners(rt), this.packet(rt)) : this.sendBuffer.push(rt)), + (this.flags = {}), + this + ) + } + _registerAckCallback(et, nt) { + var rt + const it = (rt = this.flags.timeout) !== null && rt !== void 0 ? rt : this._opts.ackTimeout + if (it === void 0) { + this.acks[et] = nt + return + } + const ot = this.io.setTimeoutFn(() => { + delete this.acks[et] + for (let at = 0; at < this.sendBuffer.length; at++) + this.sendBuffer[at].id === et && this.sendBuffer.splice(at, 1) + nt.call(this, new Error('operation has timed out')) + }, it) + this.acks[et] = (...at) => { + this.io.clearTimeoutFn(ot), nt.apply(this, [null, ...at]) + } + } + emitWithAck(et, ...nt) { + const rt = this.flags.timeout !== void 0 || this._opts.ackTimeout !== void 0 + return new Promise((it, ot) => { + nt.push((at, st) => (rt ? (at ? ot(at) : it(st)) : it(at))), this.emit(et, ...nt) + }) + } + _addToQueue(et) { + let nt + typeof et[et.length - 1] == 'function' && (nt = et.pop()) + const rt = { + id: this._queueSeq++, + tryCount: 0, + pending: !1, + args: et, + flags: Object.assign({ fromQueue: !0 }, this.flags), + } + et.push((it, ...ot) => + rt !== this._queue[0] + ? void 0 + : (it !== null + ? rt.tryCount > this._opts.retries && (this._queue.shift(), nt && nt(it)) + : (this._queue.shift(), nt && nt(null, ...ot)), + (rt.pending = !1), + this._drainQueue()), + ), + this._queue.push(rt), + this._drainQueue() + } + _drainQueue(et = !1) { + if (!this.connected || this._queue.length === 0) return + const nt = this._queue[0] + ;(nt.pending && !et) || + ((nt.pending = !0), nt.tryCount++, (this.flags = nt.flags), this.emit.apply(this, nt.args)) + } + packet(et) { + ;(et.nsp = this.nsp), this.io._packet(et) + } + onopen() { + typeof this.auth == 'function' + ? this.auth((et) => { + this._sendConnectPacket(et) + }) + : this._sendConnectPacket(this.auth) + } + _sendConnectPacket(et) { + this.packet({ + type: PacketType.CONNECT, + data: this._pid ? Object.assign({ pid: this._pid, offset: this._lastOffset }, et) : et, + }) + } + onerror(et) { + this.connected || this.emitReserved('connect_error', et) + } + onclose(et, nt) { + ;(this.connected = !1), delete this.id, this.emitReserved('disconnect', et, nt) + } + onpacket(et) { + if (et.nsp === this.nsp) + switch (et.type) { + case PacketType.CONNECT: + et.data && et.data.sid + ? this.onconnect(et.data.sid, et.data.pid) + : this.emitReserved( + 'connect_error', + new Error( + 'It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)', + ), + ) + break + case PacketType.EVENT: + case PacketType.BINARY_EVENT: + this.onevent(et) + break + case PacketType.ACK: + case PacketType.BINARY_ACK: + this.onack(et) + break + case PacketType.DISCONNECT: + this.ondisconnect() + break + case PacketType.CONNECT_ERROR: + this.destroy() + const rt = new Error(et.data.message) + ;(rt.data = et.data.data), this.emitReserved('connect_error', rt) + break + } + } + onevent(et) { + const nt = et.data || [] + et.id != null && nt.push(this.ack(et.id)), + this.connected ? this.emitEvent(nt) : this.receiveBuffer.push(Object.freeze(nt)) + } + emitEvent(et) { + if (this._anyListeners && this._anyListeners.length) { + const nt = this._anyListeners.slice() + for (const rt of nt) rt.apply(this, et) + } + super.emit.apply(this, et), + this._pid && et.length && typeof et[et.length - 1] == 'string' && (this._lastOffset = et[et.length - 1]) + } + ack(et) { + const nt = this + let rt = !1 + return function (...it) { + rt || ((rt = !0), nt.packet({ type: PacketType.ACK, id: et, data: it })) + } + } + onack(et) { + const nt = this.acks[et.id] + typeof nt == 'function' && (nt.apply(this, et.data), delete this.acks[et.id]) + } + onconnect(et, nt) { + ;(this.id = et), + (this.recovered = nt && this._pid === nt), + (this._pid = nt), + (this.connected = !0), + this.emitBuffered(), + this.emitReserved('connect'), + this._drainQueue(!0) + } + emitBuffered() { + this.receiveBuffer.forEach((et) => this.emitEvent(et)), + (this.receiveBuffer = []), + this.sendBuffer.forEach((et) => { + this.notifyOutgoingListeners(et), this.packet(et) + }), + (this.sendBuffer = []) + } + ondisconnect() { + this.destroy(), this.onclose('io server disconnect') + } + destroy() { + this.subs && (this.subs.forEach((et) => et()), (this.subs = void 0)), this.io._destroy(this) + } + disconnect() { + return ( + this.connected && this.packet({ type: PacketType.DISCONNECT }), + this.destroy(), + this.connected && this.onclose('io client disconnect'), + this + ) + } + close() { + return this.disconnect() + } + compress(et) { + return (this.flags.compress = et), this + } + get volatile() { + return (this.flags.volatile = !0), this + } + timeout(et) { + return (this.flags.timeout = et), this + } + onAny(et) { + return (this._anyListeners = this._anyListeners || []), this._anyListeners.push(et), this + } + prependAny(et) { + return (this._anyListeners = this._anyListeners || []), this._anyListeners.unshift(et), this + } + offAny(et) { + if (!this._anyListeners) return this + if (et) { + const nt = this._anyListeners + for (let rt = 0; rt < nt.length; rt++) if (et === nt[rt]) return nt.splice(rt, 1), this + } else this._anyListeners = [] + return this + } + listenersAny() { + return this._anyListeners || [] + } + onAnyOutgoing(et) { + return (this._anyOutgoingListeners = this._anyOutgoingListeners || []), this._anyOutgoingListeners.push(et), this + } + prependAnyOutgoing(et) { + return ( + (this._anyOutgoingListeners = this._anyOutgoingListeners || []), this._anyOutgoingListeners.unshift(et), this + ) + } + offAnyOutgoing(et) { + if (!this._anyOutgoingListeners) return this + if (et) { + const nt = this._anyOutgoingListeners + for (let rt = 0; rt < nt.length; rt++) if (et === nt[rt]) return nt.splice(rt, 1), this + } else this._anyOutgoingListeners = [] + return this + } + listenersAnyOutgoing() { + return this._anyOutgoingListeners || [] + } + notifyOutgoingListeners(et) { + if (this._anyOutgoingListeners && this._anyOutgoingListeners.length) { + const nt = this._anyOutgoingListeners.slice() + for (const rt of nt) rt.apply(this, et.data) + } + } + } + function Backoff(tt) { + ;(tt = tt || {}), + (this.ms = tt.min || 100), + (this.max = tt.max || 1e4), + (this.factor = tt.factor || 2), + (this.jitter = tt.jitter > 0 && tt.jitter <= 1 ? tt.jitter : 0), + (this.attempts = 0) + } + Backoff.prototype.duration = function () { + var tt = this.ms * Math.pow(this.factor, this.attempts++) + if (this.jitter) { + var et = Math.random(), + nt = Math.floor(et * this.jitter * tt) + tt = Math.floor(et * 10) & 1 ? tt + nt : tt - nt + } + return Math.min(tt, this.max) | 0 + } + Backoff.prototype.reset = function () { + this.attempts = 0 + } + Backoff.prototype.setMin = function (tt) { + this.ms = tt + } + Backoff.prototype.setMax = function (tt) { + this.max = tt + } + Backoff.prototype.setJitter = function (tt) { + this.jitter = tt + } + class Manager extends Emitter { + constructor(et, nt) { + var rt + super(), + (this.nsps = {}), + (this.subs = []), + et && typeof et == 'object' && ((nt = et), (et = void 0)), + (nt = nt || {}), + (nt.path = nt.path || '/socket.io'), + (this.opts = nt), + installTimerFunctions(this, nt), + this.reconnection(nt.reconnection !== !1), + this.reconnectionAttempts(nt.reconnectionAttempts || 1 / 0), + this.reconnectionDelay(nt.reconnectionDelay || 1e3), + this.reconnectionDelayMax(nt.reconnectionDelayMax || 5e3), + this.randomizationFactor((rt = nt.randomizationFactor) !== null && rt !== void 0 ? rt : 0.5), + (this.backoff = new Backoff({ + min: this.reconnectionDelay(), + max: this.reconnectionDelayMax(), + jitter: this.randomizationFactor(), + })), + this.timeout(nt.timeout == null ? 2e4 : nt.timeout), + (this._readyState = 'closed'), + (this.uri = et) + const it = nt.parser || parser + ;(this.encoder = new it.Encoder()), + (this.decoder = new it.Decoder()), + (this._autoConnect = nt.autoConnect !== !1), + this._autoConnect && this.open() + } + reconnection(et) { + return arguments.length ? ((this._reconnection = !!et), this) : this._reconnection + } + reconnectionAttempts(et) { + return et === void 0 ? this._reconnectionAttempts : ((this._reconnectionAttempts = et), this) + } + reconnectionDelay(et) { + var nt + return et === void 0 + ? this._reconnectionDelay + : ((this._reconnectionDelay = et), (nt = this.backoff) === null || nt === void 0 || nt.setMin(et), this) + } + randomizationFactor(et) { + var nt + return et === void 0 + ? this._randomizationFactor + : ((this._randomizationFactor = et), (nt = this.backoff) === null || nt === void 0 || nt.setJitter(et), this) + } + reconnectionDelayMax(et) { + var nt + return et === void 0 + ? this._reconnectionDelayMax + : ((this._reconnectionDelayMax = et), (nt = this.backoff) === null || nt === void 0 || nt.setMax(et), this) + } + timeout(et) { + return arguments.length ? ((this._timeout = et), this) : this._timeout + } + maybeReconnectOnOpen() { + !this._reconnecting && this._reconnection && this.backoff.attempts === 0 && this.reconnect() + } + open(et) { + if (~this._readyState.indexOf('open')) return this + this.engine = new Socket$1(this.uri, this.opts) + const nt = this.engine, + rt = this + ;(this._readyState = 'opening'), (this.skipReconnect = !1) + const it = on(nt, 'open', function () { + rt.onopen(), et && et() + }), + ot = (st) => { + this.cleanup(), + (this._readyState = 'closed'), + this.emitReserved('error', st), + et ? et(st) : this.maybeReconnectOnOpen() + }, + at = on(nt, 'error', ot) + if (this._timeout !== !1) { + const st = this._timeout, + lt = this.setTimeoutFn(() => { + it(), ot(new Error('timeout')), nt.close() + }, st) + this.opts.autoUnref && lt.unref(), + this.subs.push(() => { + this.clearTimeoutFn(lt) + }) + } + return this.subs.push(it), this.subs.push(at), this + } + connect(et) { + return this.open(et) + } + onopen() { + this.cleanup(), (this._readyState = 'open'), this.emitReserved('open') + const et = this.engine + this.subs.push( + on(et, 'ping', this.onping.bind(this)), + on(et, 'data', this.ondata.bind(this)), + on(et, 'error', this.onerror.bind(this)), + on(et, 'close', this.onclose.bind(this)), + on(this.decoder, 'decoded', this.ondecoded.bind(this)), + ) + } + onping() { + this.emitReserved('ping') + } + ondata(et) { + try { + this.decoder.add(et) + } catch (nt) { + this.onclose('parse error', nt) + } + } + ondecoded(et) { + nextTick(() => { + this.emitReserved('packet', et) + }, this.setTimeoutFn) + } + onerror(et) { + this.emitReserved('error', et) + } + socket(et, nt) { + let rt = this.nsps[et] + return ( + rt ? this._autoConnect && !rt.active && rt.connect() : ((rt = new Socket(this, et, nt)), (this.nsps[et] = rt)), + rt + ) + } + _destroy(et) { + const nt = Object.keys(this.nsps) + for (const rt of nt) if (this.nsps[rt].active) return + this._close() + } + _packet(et) { + const nt = this.encoder.encode(et) + for (let rt = 0; rt < nt.length; rt++) this.engine.write(nt[rt], et.options) + } + cleanup() { + this.subs.forEach((et) => et()), (this.subs.length = 0), this.decoder.destroy() + } + _close() { + ;(this.skipReconnect = !0), + (this._reconnecting = !1), + this.onclose('forced close'), + this.engine && this.engine.close() + } + disconnect() { + return this._close() + } + onclose(et, nt) { + this.cleanup(), + this.backoff.reset(), + (this._readyState = 'closed'), + this.emitReserved('close', et, nt), + this._reconnection && !this.skipReconnect && this.reconnect() + } + reconnect() { + if (this._reconnecting || this.skipReconnect) return this + const et = this + if (this.backoff.attempts >= this._reconnectionAttempts) + this.backoff.reset(), this.emitReserved('reconnect_failed'), (this._reconnecting = !1) + else { + const nt = this.backoff.duration() + this._reconnecting = !0 + const rt = this.setTimeoutFn(() => { + et.skipReconnect || + (this.emitReserved('reconnect_attempt', et.backoff.attempts), + !et.skipReconnect && + et.open((it) => { + it + ? ((et._reconnecting = !1), et.reconnect(), this.emitReserved('reconnect_error', it)) + : et.onreconnect() + })) + }, nt) + this.opts.autoUnref && rt.unref(), + this.subs.push(() => { + this.clearTimeoutFn(rt) + }) + } + } + onreconnect() { + const et = this.backoff.attempts + ;(this._reconnecting = !1), this.backoff.reset(), this.emitReserved('reconnect', et) + } + } + const cache = {} + function lookup(tt, et) { + typeof tt == 'object' && ((et = tt), (tt = void 0)), (et = et || {}) + const nt = url(tt, et.path || '/socket.io'), + rt = nt.source, + it = nt.id, + ot = nt.path, + at = cache[it] && ot in cache[it].nsps, + st = et.forceNew || et['force new connection'] || et.multiplex === !1 || at + let lt + return ( + st ? (lt = new Manager(rt, et)) : (cache[it] || (cache[it] = new Manager(rt, et)), (lt = cache[it])), + nt.query && !et.query && (et.query = nt.queryKey), + lt.socket(nt.path, et) + ) + } + Object.assign(lookup, { Manager, Socket, io: lookup, connect: lookup }) + const useSocket = () => { + const [tt, et] = reactExports.useState(null) + return ( + reactExports.useEffect(() => { + const nt = lookup(API_URL) + return ( + et(nt), + () => { + nt.disconnect() + } + ) + }, []), + tt + ) + }, + ITEM_HEIGHT = 48, + ITEM_PADDING_TOP = 8, + MenuProps = { PaperProps: { style: { maxHeight: ITEM_HEIGHT * 4.5 + ITEM_PADDING_TOP, width: 250 } } }, + names = ['Beginner', 'Intermediate', 'Advanced', 'Expert'], + AskQuestion = () => { + const tt = useDataStore((xt) => xt.data), + [et, nt] = reactExports.useState(''), + [rt, it] = reactExports.useState('Beginner'), + ot = useAppStore((xt) => xt.currentSearch), + at = reactExports.useRef(!1), + st = useSocket(), + [lt] = useUserStore((xt) => [xt.setBudget]), + [ct, ut, ht, dt, pt] = useTeachStore((xt) => [ + xt.askedQuestions, + xt.askedQuestionsAnswers, + xt.setAskedQuestion, + xt.setAskedQuestionAnswer, + xt.hasQuestionInProgress, + ]), + mt = reactExports.useCallback( + (xt) => { + dt(xt.answer), + toast(jsxRuntimeExports.jsx(ToastMessage, { message: 'Response is ready' }), { + position: toast.POSITION.BOTTOM_CENTER, + type: 'success', + }) + }, + [dt], + ) + reactExports.useEffect(() => { + at.current || (mt && st && (st.on('askquestionhook', mt), (at.current = !0))) + }, [mt, st]) + const gt = async () => { + et && (ht(et), nt('')) + try { + const xt = tt == null ? void 0 : tt.nodes.filter((Tt) => Tt.text), + kt = xt == null ? void 0 : xt.slice(0, 5), + St = (kt != null && kt.length ? kt.map((Tt) => Tt.text).join(' ') : '') + .substring(0, 2500) + .replace(/[?&=+/#]/g, (Tt) => `\\${Tt}`) + ot && + (await distExports$1.enable(), + await postAskQuestion({ expertise_level: rt, question_text: et, search_term: ot, transcripts: St }), + await updateBudget(lt), + toast(jsxRuntimeExports.jsx(ToastMessage, { message: 'We started preparing response for you' }), { + type: 'success', + })) + } catch (xt) { + console.error(xt) + } + }, + yt = rt && et.trim() && !pt, + bt = (xt) => { + it(xt.target.value) + }, + vt = async (xt) => { + if (pt) { + xt.preventDefault() + return + } + xt.keyCode === 13 && xt.shiftKey === !1 && yt && (xt.preventDefault(), gt()) + } + return jsxRuntimeExports.jsxs(AskQuestionContainer, { + children: [ + jsxRuntimeExports.jsx(Flex, { + children: jsxRuntimeExports.jsx(Flex, { + children: jsxRuntimeExports.jsxs(FormControl$1, { + component: 'div', + children: [ + jsxRuntimeExports.jsx(StyledInput, { + id: 'select-label', + size: 'small', + children: 'Expertise level', + }), + jsxRuntimeExports.jsx(StyledSelect, { + id: 'demo-multiple-name', + input: jsxRuntimeExports.jsx(OutlinedInput$1, { label: 'Expertise level' }), + labelId: 'select-label', + MenuProps, + onChange: bt, + size: 'small', + value: rt, + children: names.map((xt) => + jsxRuntimeExports.jsx(MenuItem$1, { component: 'li', value: xt, children: xt }, xt), + ), + }), + ], + }), + }), + }), + jsxRuntimeExports.jsx(ResponsesWrapper, { + children: + ct == null + ? void 0 + : ct.map((xt, kt) => + jsxRuntimeExports.jsxs( + Flex, + { + className: 'response', + py: 12, + children: [ + jsxRuntimeExports.jsx(Text$3, { kind: 'medium', children: xt }), + jsxRuntimeExports.jsx(Flex, { + py: 12, + children: + (ut == null ? void 0 : ut[kt]) !== void 0 + ? jsxRuntimeExports.jsx(Text$3, { color: 'unreadMsgText', children: ut[kt] }) + : jsxRuntimeExports.jsxs(Flex, { + align: 'center', + py: 12, + children: [ + jsxRuntimeExports.jsx(Flex, { + align: 'center', + py: 12, + children: jsxRuntimeExports.jsx(PropagateLoader, { color: colors.white }), + }), + jsxRuntimeExports.jsx(Flex, { + align: 'center', + py: 12, + children: jsxRuntimeExports.jsx(Text$3, { children: 'Generating response' }), + }), + ], + }), + }), + ], + }, + xt, + ), + ), + }), + jsxRuntimeExports.jsxs(TextAreaWrapper, { + onKeyDown: vt, + py: 12, + tabIndex: -1, + children: [ + jsxRuntimeExports.jsx(StyledTextarea, { + disabled: pt, + onChange: (xt) => nt(xt.target.value), + placeholder: 'Enter your question', + value: et, + }), + jsxRuntimeExports.jsx(IconWrapper$1, { + children: jsxRuntimeExports.jsx(MdSend, { color: yt ? colors.white : colors.gray300, size: '18' }), + }), + ], + }), + ], + }) + }, + AskQuestionContainer = styled$4.div` + margin-top: 20px; +`, + StyledTextarea = styled$4(TextareaAutosize)` + background: ${colors.inputBg1}; + max-width: 100%; + color: ${colors.secondaryText4}; + padding: 16px 8px; + border: none; + outline: none; +`, + StyledInput = styled$4(InputLabel$1)` + &.MuiFormLabel-root.MuiInputLabel-root { + color: ${colors.secondaryText4}; + } +`, + StyledSelect = styled$4(Select$4)` + .MuiInputBase-root { + color: blue; + } + background: ${colors.inputBg1}; - vec3 rbminmax; + .MuiSvgIcon-root { + color: ${colors.white}; + } - rbminmax.x = ( nDir.x > 0. ) ? rbmax.x : rbmin.x; - rbminmax.y = ( nDir.y > 0. ) ? rbmax.y : rbmin.y; - rbminmax.z = ( nDir.z > 0. ) ? rbmax.z : rbmin.z; + .MuiOutlinedInput-notchedOutline { + border: none; + } - float correction = min( min( rbminmax.x, rbminmax.y ), rbminmax.z ); - vec3 boxIntersection = vWorldPosition + nDir * correction; + .MuiSelect-select { + color: ${colors.white}; + } +`, + TextAreaWrapper = styled$4(Flex)` + position: relative; +`, + IconWrapper$1 = styled$4(Flex)` + position: absolute; + bottom: 20px; + right: 20px; + transform: rotate(-45deg); +`, + ResponsesWrapper = styled$4(Flex)` + flex-shrink: 1; + overflow: auto; - return boxIntersection - cubePos; + .response { + border-bottom: 1px solid ${colors.divider2}; + } +`, + emptyValue = {}, + HelperContext = reactExports.createContext(emptyValue), + useHelper = () => reactExports.useContext(HelperContext) + function cc(tt) { + if (typeof tt == 'string' || typeof tt == 'number') return '' + tt + let et = '' + if (Array.isArray(tt)) + for (let nt = 0, rt; nt < tt.length; nt++) (rt = cc(tt[nt])) !== '' && (et += (et && ' ') + rt) + else for (let nt in tt) tt[nt] && (et += (et && ' ') + nt) + return et + } + const { useSyncExternalStoreWithSelector } = useSyncExternalStoreExports + function useStoreWithEqualityFn(tt, et = tt.getState, nt) { + const rt = useSyncExternalStoreWithSelector(tt.subscribe, tt.getState, tt.getServerState || tt.getState, et, nt) + return reactExports.useDebugValue(rt), rt + } + const createWithEqualityFnImpl = (tt, et) => { + const nt = createStore$3(tt), + rt = (it, ot = et) => useStoreWithEqualityFn(nt, it, ot) + return Object.assign(rt, nt), rt + }, + createWithEqualityFn = (tt, et) => (tt ? createWithEqualityFnImpl(tt, et) : createWithEqualityFnImpl) + function shallow$1(tt, et) { + if (Object.is(tt, et)) return !0 + if (typeof tt != 'object' || tt === null || typeof et != 'object' || et === null) return !1 + if (tt instanceof Map && et instanceof Map) { + if (tt.size !== et.size) return !1 + for (const [rt, it] of tt) if (!Object.is(it, et.get(rt))) return !1 + return !0 } -#endif -`,getIBLIrradiance_patch=` -#ifdef BOX_PROJECTED_ENV_MAP - worldNormal = parallaxCorrectNormal( worldNormal, envMapSize, envMapPosition ); -#endif -`,getIBLRadiance_patch=` -#ifdef BOX_PROJECTED_ENV_MAP - reflectVec = parallaxCorrectNormal( reflectVec, envMapSize, envMapPosition ); -#endif -`;function useBoxProjectedEnvMap(tt,et,nt){tt.defines.BOX_PROJECTED_ENV_MAP="",tt.uniforms.envMapPosition={value:et},tt.uniforms.envMapSize={value:nt};const rt=new RegExp(escapeRegExp("vec3 worldNormal = inverseTransformDirection ( normal , viewMatrix ) ;").replaceAll(" ","\\s*"),"g"),it=new RegExp(escapeRegExp("reflectVec = inverseTransformDirection ( reflectVec , viewMatrix ) ;").replaceAll(" ","\\s*"),"g");tt.vertexShader=`varying vec3 vWorldPosition; -`+tt.vertexShader.replace("#include ",worldposReplace),tt.fragmentShader=boxProjectDefinitions+` -`+tt.fragmentShader.replace("#include ",ShaderChunk.envmap_physical_pars_fragment).replace(rt,`vec3 worldNormal = inverseTransformDirection( normal, viewMatrix ); - ${getIBLIrradiance_patch}`).replace(it,`reflectVec = inverseTransformDirection( reflectVec, viewMatrix ); - ${getIBLRadiance_patch}`)}const finalFragmentShader=finalSSRShader.replace("#include ",helperFunctions).replace("#include ",boxBlur),noResetSamplesProperties=["blur","blurSharpness","blurKernel"],defaultCubeRenderTarget=new WebGLCubeRenderTarget(1);let pmremGenerator;class SSREffect extends Effect$1{constructor(et,nt,rt=defaultSSROptions){super("SSREffect",finalFragmentShader,{type:"FinalSSRMaterial",uniforms:new Map([["reflectionsTexture",new Uniform(null)],["blur",new Uniform(0)],["blurSharpness",new Uniform(0)],["blurKernel",new Uniform(0)]]),defines:new Map([["RENDER_MODE","0"]])}),this.haltonSequence=generateHalton23Points(1024),this.haltonIndex=0,this.selection=new Selection$3,this.lastSize=void 0,this.cubeCamera=new CubeCamera(.001,1e3,defaultCubeRenderTarget),this.usingBoxProjectedEnvMap=!1,this._scene=et,this._camera=nt,rt={...defaultSSROptions,...rt,...{boxBlur:!0,dilation:!0}},this.temporalResolvePass=new TemporalResolvePass(et,nt,trCompose,rt),this.uniforms.get("reflectionsTexture").value=this.temporalResolvePass.renderTarget.texture,this.reflectionsPass=new ReflectionsPass(this,rt),this.temporalResolvePass.fullscreenMaterial.uniforms.inputTexture.value=this.reflectionsPass.renderTarget.texture,this.lastSize={width:rt.width,height:rt.height,resolutionScale:rt.resolutionScale,velocityResolutionScale:rt.velocityResolutionScale},this.setSize(rt.width,rt.height),this.makeOptionsReactive(rt)}makeOptionsReactive(et){let nt=!1;const rt=this.reflectionsPass.fullscreenMaterial.uniforms,it=Object.keys(rt);for(const ot of Object.keys(et))Object.defineProperty(this,ot,{get(){return et[ot]},set(at){if(!(et[ot]===at&&nt))switch(et[ot]=at,noResetSamplesProperties.includes(ot)||this.setSize(this.lastSize.width,this.lastSize.height,!0),ot){case"resolutionScale":this.setSize(this.lastSize.width,this.lastSize.height);break;case"velocityResolutionScale":this.temporalResolvePass.velocityResolutionScale=at,this.setSize(this.lastSize.width,this.lastSize.height,!0);break;case"blur":this.uniforms.get("blur").value=at;break;case"blurSharpness":this.uniforms.get("blurSharpness").value=at;break;case"blurKernel":this.uniforms.get("blurKernel").value=at;break;case"steps":this.reflectionsPass.fullscreenMaterial.defines.steps=parseInt(at),this.reflectionsPass.fullscreenMaterial.needsUpdate=nt;break;case"refineSteps":this.reflectionsPass.fullscreenMaterial.defines.refineSteps=parseInt(at),this.reflectionsPass.fullscreenMaterial.needsUpdate=nt;break;case"missedRays":at?this.reflectionsPass.fullscreenMaterial.defines.missedRays="":delete this.reflectionsPass.fullscreenMaterial.defines.missedRays,this.reflectionsPass.fullscreenMaterial.needsUpdate=nt;break;case"correctionRadius":this.temporalResolvePass.fullscreenMaterial.defines.correctionRadius=Math.round(at),this.temporalResolvePass.fullscreenMaterial.needsUpdate=nt;break;case"blend":this.temporalResolvePass.fullscreenMaterial.uniforms.blend.value=at;break;case"correction":this.temporalResolvePass.fullscreenMaterial.uniforms.correction.value=at;break;case"exponent":this.temporalResolvePass.fullscreenMaterial.uniforms.exponent.value=at;break;case"distance":rt.rayDistance.value=at;default:it.includes(ot)&&(rt[ot].value=at)}}}),this[ot]=et[ot];nt=!0}setSize(et,nt,rt=!1){!rt&&et===this.lastSize.width&&nt===this.lastSize.height&&this.resolutionScale===this.lastSize.resolutionScale&&this.velocityResolutionScale===this.lastSize.velocityResolutionScale||(this.temporalResolvePass.setSize(et,nt),this.reflectionsPass.setSize(et,nt),this.lastSize={width:et,height:nt,resolutionScale:this.resolutionScale,velocityResolutionScale:this.velocityResolutionScale})}generateBoxProjectedEnvMapFallback(et,nt=new Vector3,rt=new Vector3,it=512){this.cubeCamera.renderTarget.dispose(),this.cubeCamera.renderTarget=new WebGLCubeRenderTarget(it),this.cubeCamera.position.copy(nt),this.cubeCamera.updateMatrixWorld(),this.cubeCamera.update(et,this._scene),pmremGenerator||(pmremGenerator=new PMREMGenerator(et),pmremGenerator.compileCubemapShader());const ot=pmremGenerator.fromCubemap(this.cubeCamera.renderTarget.texture).texture;ot.minFilter=LinearFilter,ot.magFilter=LinearFilter;const at=this.reflectionsPass.fullscreenMaterial;return useBoxProjectedEnvMap(at,nt,rt),at.fragmentShader=at.fragmentShader.replace("vec3 worldPos","worldPos").replace("varying vec3 vWorldPosition;","vec3 worldPos;"),at.uniforms.envMapPosition.value.copy(nt),at.uniforms.envMapSize.value.copy(rt),setupEnvMap(at,ot,it),this.usingBoxProjectedEnvMap=!0,ot}setIBLRadiance(et,nt){this._scene.traverse(rt=>{if(rt.material){var it;const ot=(it=nt.properties.get(rt.material))==null?void 0:it.uniforms;ot&&"disableIBLRadiance"in ot&&(ot.disableIBLRadiance.value=et)}})}deleteBoxProjectedEnvMapFallback(){const et=this.reflectionsPass.fullscreenMaterial;et.uniforms.envMap.value=null,et.fragmentShader=et.fragmentShader.replace("worldPos = ","vec3 worldPos = "),delete et.defines.BOX_PROJECTED_ENV_MAP,et.needsUpdate=!0,this.usingBoxProjectedEnvMap=!1}dispose(){super.dispose(),this.reflectionsPass.dispose(),this.temporalResolvePass.dispose()}update(et,nt){if(!this.usingBoxProjectedEnvMap&&this._scene.environment){const st=this.reflectionsPass.fullscreenMaterial;let lt=null;if(this._scene.traverse(ct=>{if(!lt&&ct.material&&!ct.material.envMap){const ut=et.properties.get(ct.material);"envMap"in ut&&ut.envMap instanceof Texture&&(lt=ut.envMap)}}),lt){const ct=this._scene.environment.image.height;setupEnvMap(st,lt,ct)}}this.haltonIndex=(this.haltonIndex+1)%this.haltonSequence.length;const[rt,it]=this.haltonSequence[this.haltonIndex],{width:ot,height:at}=this.lastSize;this.temporalResolvePass.velocityPass.render(et),this._camera.setViewOffset&&this._camera.setViewOffset(ot,at,rt,it,ot,at),this.reflectionsPass.render(et,nt),this.temporalResolvePass.render(et),this._camera.clearViewOffset()}static patchDirectEnvIntensity(et=0){et===0?ShaderChunk.envmap_physical_pars_fragment=ShaderChunk.envmap_physical_pars_fragment.replace("vec3 getIBLRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness ) {","vec3 getIBLRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness ) { return vec3(0.0);"):ShaderChunk.envmap_physical_pars_fragment=ShaderChunk.envmap_physical_pars_fragment.replace("vec4 envMapColor = textureCubeUV( envMap, reflectVec, roughness );","vec4 envMapColor = textureCubeUV( envMap, reflectVec, roughness ) * "+et.toFixed(5)+";")}}reactExports.forwardRef(function({ENABLE_BLUR:et=!0,USE_MRT:nt=!0,...rt},it){const{invalidate:ot}=useThree(),{scene:at,camera:st}=reactExports.useContext(EffectComposerContext),lt=reactExports.useMemo(()=>new SSREffect(at,st,{ENABLE_BLUR:et,USE_MRT:nt,...rt}),[at,st,et,nt,rt]),ct=reactExports.useContext(selectionContext);return reactExports.useEffect(()=>{var ut;if(ct&&ct.enabled&&(ut=ct.selected)!=null&&ut.length)return lt.selection.set(ct.selected),ot(),()=>{lt.selection.clear(),ot()}},[ct]),jsxRuntimeExports.jsx("primitive",{ref:it,object:lt,...rt})});const $e4ca8dcb0218f846$var$_geometry=new BufferGeometry;$e4ca8dcb0218f846$var$_geometry.setAttribute("position",new BufferAttribute(new Float32Array([-1,-1,3,-1,-1,3]),2));$e4ca8dcb0218f846$var$_geometry.setAttribute("uv",new BufferAttribute(new Float32Array([0,0,2,0,0,2]),2));$e4ca8dcb0218f846$var$_geometry.boundingSphere=new Sphere;$e4ca8dcb0218f846$var$_geometry.computeBoundingSphere=function(){};const $e4ca8dcb0218f846$var$_camera=new OrthographicCamera;class $e4ca8dcb0218f846$export$dcd670d73db751f5{constructor(et){this._mesh=new Mesh($e4ca8dcb0218f846$var$_geometry,et),this._mesh.frustumCulled=!1}render(et){et.render(this._mesh,$e4ca8dcb0218f846$var$_camera)}get material(){return this._mesh.material}set material(et){this._mesh.material=et}dispose(){this._mesh.material.dispose(),this._mesh.geometry.dispose()}}const $1ed45968c1160c3c$export$c9b263b9a17dffd7={uniforms:{sceneDiffuse:{value:null},sceneDepth:{value:null},sceneNormal:{value:null},projMat:{value:new Matrix4},viewMat:{value:new Matrix4},projViewMat:{value:new Matrix4},projectionMatrixInv:{value:new Matrix4},viewMatrixInv:{value:new Matrix4},cameraPos:{value:new Vector3},resolution:{value:new Vector2},time:{value:0},samples:{value:[]},samplesR:{value:[]},bluenoise:{value:null},distanceFalloff:{value:1},radius:{value:5},near:{value:.1},far:{value:1e3},logDepth:{value:!1},ortho:{value:!1},screenSpaceRadius:{value:!1}},vertexShader:` -varying vec2 vUv; -void main() { - vUv = uv; - gl_Position = vec4(position, 1); -}`,fragmentShader:` - #define SAMPLES 16 - #define FSAMPLES 16.0 -uniform sampler2D sceneDiffuse; -uniform highp sampler2D sceneNormal; -uniform highp sampler2D sceneDepth; -uniform mat4 projectionMatrixInv; -uniform mat4 viewMatrixInv; -uniform mat4 projMat; -uniform mat4 viewMat; -uniform mat4 projViewMat; -uniform vec3 cameraPos; -uniform vec2 resolution; -uniform float time; -uniform vec3[SAMPLES] samples; -uniform float[SAMPLES] samplesR; -uniform float radius; -uniform float distanceFalloff; -uniform float near; -uniform float far; -uniform bool logDepth; -uniform bool ortho; -uniform bool screenSpaceRadius; -uniform sampler2D bluenoise; - varying vec2 vUv; - highp float linearize_depth(highp float d, highp float zNear,highp float zFar) + if (tt instanceof Set && et instanceof Set) { + if (tt.size !== et.size) return !1 + for (const rt of tt) if (!et.has(rt)) return !1 + return !0 + } + const nt = Object.keys(tt) + if (nt.length !== Object.keys(et).length) return !1 + for (let rt = 0; rt < nt.length; rt++) + if (!Object.prototype.hasOwnProperty.call(et, nt[rt]) || !Object.is(tt[nt[rt]], et[nt[rt]])) return !1 + return !0 + } + var xhtml = 'http://www.w3.org/1999/xhtml' + const namespaces = { + svg: 'http://www.w3.org/2000/svg', + xhtml, + xlink: 'http://www.w3.org/1999/xlink', + xml: 'http://www.w3.org/XML/1998/namespace', + xmlns: 'http://www.w3.org/2000/xmlns/', + } + function namespace(tt) { + var et = (tt += ''), + nt = et.indexOf(':') + return ( + nt >= 0 && (et = tt.slice(0, nt)) !== 'xmlns' && (tt = tt.slice(nt + 1)), + namespaces.hasOwnProperty(et) ? { space: namespaces[et], local: tt } : tt + ) + } + function creatorInherit(tt) { + return function () { + var et = this.ownerDocument, + nt = this.namespaceURI + return nt === xhtml && et.documentElement.namespaceURI === xhtml + ? et.createElement(tt) + : et.createElementNS(nt, tt) + } + } + function creatorFixed(tt) { + return function () { + return this.ownerDocument.createElementNS(tt.space, tt.local) + } + } + function creator(tt) { + var et = namespace(tt) + return (et.local ? creatorFixed : creatorInherit)(et) + } + function none() {} + function selector(tt) { + return tt == null + ? none + : function () { + return this.querySelector(tt) + } + } + function selection_select(tt) { + typeof tt != 'function' && (tt = selector(tt)) + for (var et = this._groups, nt = et.length, rt = new Array(nt), it = 0; it < nt; ++it) + for (var ot = et[it], at = ot.length, st = (rt[it] = new Array(at)), lt, ct, ut = 0; ut < at; ++ut) + (lt = ot[ut]) && + (ct = tt.call(lt, lt.__data__, ut, ot)) && + ('__data__' in lt && (ct.__data__ = lt.__data__), (st[ut] = ct)) + return new Selection$1(rt, this._parents) + } + function array$1(tt) { + return tt == null ? [] : Array.isArray(tt) ? tt : Array.from(tt) + } + function empty() { + return [] + } + function selectorAll(tt) { + return tt == null + ? empty + : function () { + return this.querySelectorAll(tt) + } + } + function arrayAll(tt) { + return function () { + return array$1(tt.apply(this, arguments)) + } + } + function selection_selectAll(tt) { + typeof tt == 'function' ? (tt = arrayAll(tt)) : (tt = selectorAll(tt)) + for (var et = this._groups, nt = et.length, rt = [], it = [], ot = 0; ot < nt; ++ot) + for (var at = et[ot], st = at.length, lt, ct = 0; ct < st; ++ct) + (lt = at[ct]) && (rt.push(tt.call(lt, lt.__data__, ct, at)), it.push(lt)) + return new Selection$1(rt, it) + } + function matcher(tt) { + return function () { + return this.matches(tt) + } + } + function childMatcher(tt) { + return function (et) { + return et.matches(tt) + } + } + var find = Array.prototype.find + function childFind(tt) { + return function () { + return find.call(this.children, tt) + } + } + function childFirst() { + return this.firstElementChild + } + function selection_selectChild(tt) { + return this.select(tt == null ? childFirst : childFind(typeof tt == 'function' ? tt : childMatcher(tt))) + } + var filter = Array.prototype.filter + function children() { + return Array.from(this.children) + } + function childrenFilter(tt) { + return function () { + return filter.call(this.children, tt) + } + } + function selection_selectChildren(tt) { + return this.selectAll(tt == null ? children : childrenFilter(typeof tt == 'function' ? tt : childMatcher(tt))) + } + function selection_filter(tt) { + typeof tt != 'function' && (tt = matcher(tt)) + for (var et = this._groups, nt = et.length, rt = new Array(nt), it = 0; it < nt; ++it) + for (var ot = et[it], at = ot.length, st = (rt[it] = []), lt, ct = 0; ct < at; ++ct) + (lt = ot[ct]) && tt.call(lt, lt.__data__, ct, ot) && st.push(lt) + return new Selection$1(rt, this._parents) + } + function sparse(tt) { + return new Array(tt.length) + } + function selection_enter() { + return new Selection$1(this._enter || this._groups.map(sparse), this._parents) + } + function EnterNode(tt, et) { + ;(this.ownerDocument = tt.ownerDocument), + (this.namespaceURI = tt.namespaceURI), + (this._next = null), + (this._parent = tt), + (this.__data__ = et) + } + EnterNode.prototype = { + constructor: EnterNode, + appendChild: function (tt) { + return this._parent.insertBefore(tt, this._next) + }, + insertBefore: function (tt, et) { + return this._parent.insertBefore(tt, et) + }, + querySelector: function (tt) { + return this._parent.querySelector(tt) + }, + querySelectorAll: function (tt) { + return this._parent.querySelectorAll(tt) + }, + } + function constant$2(tt) { + return function () { + return tt + } + } + function bindIndex(tt, et, nt, rt, it, ot) { + for (var at = 0, st, lt = et.length, ct = ot.length; at < ct; ++at) + (st = et[at]) ? ((st.__data__ = ot[at]), (rt[at] = st)) : (nt[at] = new EnterNode(tt, ot[at])) + for (; at < lt; ++at) (st = et[at]) && (it[at] = st) + } + function bindKey(tt, et, nt, rt, it, ot, at) { + var st, + lt, + ct = new Map(), + ut = et.length, + ht = ot.length, + dt = new Array(ut), + pt + for (st = 0; st < ut; ++st) + (lt = et[st]) && + ((dt[st] = pt = at.call(lt, lt.__data__, st, et) + ''), ct.has(pt) ? (it[st] = lt) : ct.set(pt, lt)) + for (st = 0; st < ht; ++st) + (pt = at.call(tt, ot[st], st, ot) + ''), + (lt = ct.get(pt)) + ? ((rt[st] = lt), (lt.__data__ = ot[st]), ct.delete(pt)) + : (nt[st] = new EnterNode(tt, ot[st])) + for (st = 0; st < ut; ++st) (lt = et[st]) && ct.get(dt[st]) === lt && (it[st] = lt) + } + function datum(tt) { + return tt.__data__ + } + function selection_data(tt, et) { + if (!arguments.length) return Array.from(this, datum) + var nt = et ? bindKey : bindIndex, + rt = this._parents, + it = this._groups + typeof tt != 'function' && (tt = constant$2(tt)) + for (var ot = it.length, at = new Array(ot), st = new Array(ot), lt = new Array(ot), ct = 0; ct < ot; ++ct) { + var ut = rt[ct], + ht = it[ct], + dt = ht.length, + pt = arraylike(tt.call(ut, ut && ut.__data__, ct, rt)), + mt = pt.length, + gt = (st[ct] = new Array(mt)), + yt = (at[ct] = new Array(mt)), + bt = (lt[ct] = new Array(dt)) + nt(ut, ht, gt, yt, bt, pt, et) + for (var vt = 0, xt = 0, kt, St; vt < mt; ++vt) + if ((kt = gt[vt])) { + for (vt >= xt && (xt = vt + 1); !(St = yt[xt]) && ++xt < mt; ); + kt._next = St || null + } + } + return (at = new Selection$1(at, rt)), (at._enter = st), (at._exit = lt), at + } + function arraylike(tt) { + return typeof tt == 'object' && 'length' in tt ? tt : Array.from(tt) + } + function selection_exit() { + return new Selection$1(this._exit || this._groups.map(sparse), this._parents) + } + function selection_join(tt, et, nt) { + var rt = this.enter(), + it = this, + ot = this.exit() + return ( + typeof tt == 'function' ? ((rt = tt(rt)), rt && (rt = rt.selection())) : (rt = rt.append(tt + '')), + et != null && ((it = et(it)), it && (it = it.selection())), + nt == null ? ot.remove() : nt(ot), + rt && it ? rt.merge(it).order() : it + ) + } + function selection_merge(tt) { + for ( + var et = tt.selection ? tt.selection() : tt, + nt = this._groups, + rt = et._groups, + it = nt.length, + ot = rt.length, + at = Math.min(it, ot), + st = new Array(it), + lt = 0; + lt < at; + ++lt + ) + for (var ct = nt[lt], ut = rt[lt], ht = ct.length, dt = (st[lt] = new Array(ht)), pt, mt = 0; mt < ht; ++mt) + (pt = ct[mt] || ut[mt]) && (dt[mt] = pt) + for (; lt < it; ++lt) st[lt] = nt[lt] + return new Selection$1(st, this._parents) + } + function selection_order() { + for (var tt = this._groups, et = -1, nt = tt.length; ++et < nt; ) + for (var rt = tt[et], it = rt.length - 1, ot = rt[it], at; --it >= 0; ) + (at = rt[it]) && (ot && at.compareDocumentPosition(ot) ^ 4 && ot.parentNode.insertBefore(at, ot), (ot = at)) + return this + } + function selection_sort(tt) { + tt || (tt = ascending) + function et(ht, dt) { + return ht && dt ? tt(ht.__data__, dt.__data__) : !ht - !dt + } + for (var nt = this._groups, rt = nt.length, it = new Array(rt), ot = 0; ot < rt; ++ot) { + for (var at = nt[ot], st = at.length, lt = (it[ot] = new Array(st)), ct, ut = 0; ut < st; ++ut) + (ct = at[ut]) && (lt[ut] = ct) + lt.sort(et) + } + return new Selection$1(it, this._parents).order() + } + function ascending(tt, et) { + return tt < et ? -1 : tt > et ? 1 : tt >= et ? 0 : NaN + } + function selection_call() { + var tt = arguments[0] + return (arguments[0] = this), tt.apply(null, arguments), this + } + function selection_nodes() { + return Array.from(this) + } + function selection_node() { + for (var tt = this._groups, et = 0, nt = tt.length; et < nt; ++et) + for (var rt = tt[et], it = 0, ot = rt.length; it < ot; ++it) { + var at = rt[it] + if (at) return at + } + return null + } + function selection_size() { + let tt = 0 + for (const et of this) ++tt + return tt + } + function selection_empty() { + return !this.node() + } + function selection_each(tt) { + for (var et = this._groups, nt = 0, rt = et.length; nt < rt; ++nt) + for (var it = et[nt], ot = 0, at = it.length, st; ot < at; ++ot) (st = it[ot]) && tt.call(st, st.__data__, ot, it) + return this + } + function attrRemove$1(tt) { + return function () { + this.removeAttribute(tt) + } + } + function attrRemoveNS$1(tt) { + return function () { + this.removeAttributeNS(tt.space, tt.local) + } + } + function attrConstant$1(tt, et) { + return function () { + this.setAttribute(tt, et) + } + } + function attrConstantNS$1(tt, et) { + return function () { + this.setAttributeNS(tt.space, tt.local, et) + } + } + function attrFunction$1(tt, et) { + return function () { + var nt = et.apply(this, arguments) + nt == null ? this.removeAttribute(tt) : this.setAttribute(tt, nt) + } + } + function attrFunctionNS$1(tt, et) { + return function () { + var nt = et.apply(this, arguments) + nt == null ? this.removeAttributeNS(tt.space, tt.local) : this.setAttributeNS(tt.space, tt.local, nt) + } + } + function selection_attr(tt, et) { + var nt = namespace(tt) + if (arguments.length < 2) { + var rt = this.node() + return nt.local ? rt.getAttributeNS(nt.space, nt.local) : rt.getAttribute(nt) + } + return this.each( + (et == null + ? nt.local + ? attrRemoveNS$1 + : attrRemove$1 + : typeof et == 'function' + ? nt.local + ? attrFunctionNS$1 + : attrFunction$1 + : nt.local + ? attrConstantNS$1 + : attrConstant$1)(nt, et), + ) + } + function defaultView(tt) { + return (tt.ownerDocument && tt.ownerDocument.defaultView) || (tt.document && tt) || tt.defaultView + } + function styleRemove$1(tt) { + return function () { + this.style.removeProperty(tt) + } + } + function styleConstant$1(tt, et, nt) { + return function () { + this.style.setProperty(tt, et, nt) + } + } + function styleFunction$1(tt, et, nt) { + return function () { + var rt = et.apply(this, arguments) + rt == null ? this.style.removeProperty(tt) : this.style.setProperty(tt, rt, nt) + } + } + function selection_style(tt, et, nt) { + return arguments.length > 1 + ? this.each( + (et == null ? styleRemove$1 : typeof et == 'function' ? styleFunction$1 : styleConstant$1)(tt, et, nt ?? ''), + ) + : styleValue(this.node(), tt) + } + function styleValue(tt, et) { + return tt.style.getPropertyValue(et) || defaultView(tt).getComputedStyle(tt, null).getPropertyValue(et) + } + function propertyRemove(tt) { + return function () { + delete this[tt] + } + } + function propertyConstant(tt, et) { + return function () { + this[tt] = et + } + } + function propertyFunction(tt, et) { + return function () { + var nt = et.apply(this, arguments) + nt == null ? delete this[tt] : (this[tt] = nt) + } + } + function selection_property(tt, et) { + return arguments.length > 1 + ? this.each((et == null ? propertyRemove : typeof et == 'function' ? propertyFunction : propertyConstant)(tt, et)) + : this.node()[tt] + } + function classArray(tt) { + return tt.trim().split(/^|\s+/) + } + function classList(tt) { + return tt.classList || new ClassList(tt) + } + function ClassList(tt) { + ;(this._node = tt), (this._names = classArray(tt.getAttribute('class') || '')) + } + ClassList.prototype = { + add: function (tt) { + var et = this._names.indexOf(tt) + et < 0 && (this._names.push(tt), this._node.setAttribute('class', this._names.join(' '))) + }, + remove: function (tt) { + var et = this._names.indexOf(tt) + et >= 0 && (this._names.splice(et, 1), this._node.setAttribute('class', this._names.join(' '))) + }, + contains: function (tt) { + return this._names.indexOf(tt) >= 0 + }, + } + function classedAdd(tt, et) { + for (var nt = classList(tt), rt = -1, it = et.length; ++rt < it; ) nt.add(et[rt]) + } + function classedRemove(tt, et) { + for (var nt = classList(tt), rt = -1, it = et.length; ++rt < it; ) nt.remove(et[rt]) + } + function classedTrue(tt) { + return function () { + classedAdd(this, tt) + } + } + function classedFalse(tt) { + return function () { + classedRemove(this, tt) + } + } + function classedFunction(tt, et) { + return function () { + ;(et.apply(this, arguments) ? classedAdd : classedRemove)(this, tt) + } + } + function selection_classed(tt, et) { + var nt = classArray(tt + '') + if (arguments.length < 2) { + for (var rt = classList(this.node()), it = -1, ot = nt.length; ++it < ot; ) if (!rt.contains(nt[it])) return !1 + return !0 + } + return this.each((typeof et == 'function' ? classedFunction : et ? classedTrue : classedFalse)(nt, et)) + } + function textRemove() { + this.textContent = '' + } + function textConstant$1(tt) { + return function () { + this.textContent = tt + } + } + function textFunction$1(tt) { + return function () { + var et = tt.apply(this, arguments) + this.textContent = et ?? '' + } + } + function selection_text(tt) { + return arguments.length + ? this.each(tt == null ? textRemove : (typeof tt == 'function' ? textFunction$1 : textConstant$1)(tt)) + : this.node().textContent + } + function htmlRemove() { + this.innerHTML = '' + } + function htmlConstant(tt) { + return function () { + this.innerHTML = tt + } + } + function htmlFunction(tt) { + return function () { + var et = tt.apply(this, arguments) + this.innerHTML = et ?? '' + } + } + function selection_html(tt) { + return arguments.length + ? this.each(tt == null ? htmlRemove : (typeof tt == 'function' ? htmlFunction : htmlConstant)(tt)) + : this.node().innerHTML + } + function raise() { + this.nextSibling && this.parentNode.appendChild(this) + } + function selection_raise() { + return this.each(raise) + } + function lower() { + this.previousSibling && this.parentNode.insertBefore(this, this.parentNode.firstChild) + } + function selection_lower() { + return this.each(lower) + } + function selection_append(tt) { + var et = typeof tt == 'function' ? tt : creator(tt) + return this.select(function () { + return this.appendChild(et.apply(this, arguments)) + }) + } + function constantNull() { + return null + } + function selection_insert(tt, et) { + var nt = typeof tt == 'function' ? tt : creator(tt), + rt = et == null ? constantNull : typeof et == 'function' ? et : selector(et) + return this.select(function () { + return this.insertBefore(nt.apply(this, arguments), rt.apply(this, arguments) || null) + }) + } + function remove() { + var tt = this.parentNode + tt && tt.removeChild(this) + } + function selection_remove() { + return this.each(remove) + } + function selection_cloneShallow() { + var tt = this.cloneNode(!1), + et = this.parentNode + return et ? et.insertBefore(tt, this.nextSibling) : tt + } + function selection_cloneDeep() { + var tt = this.cloneNode(!0), + et = this.parentNode + return et ? et.insertBefore(tt, this.nextSibling) : tt + } + function selection_clone(tt) { + return this.select(tt ? selection_cloneDeep : selection_cloneShallow) + } + function selection_datum(tt) { + return arguments.length ? this.property('__data__', tt) : this.node().__data__ + } + function contextListener(tt) { + return function (et) { + tt.call(this, et, this.__data__) + } + } + function parseTypenames(tt) { + return tt + .trim() + .split(/^|\s+/) + .map(function (et) { + var nt = '', + rt = et.indexOf('.') + return rt >= 0 && ((nt = et.slice(rt + 1)), (et = et.slice(0, rt))), { type: et, name: nt } + }) + } + function onRemove(tt) { + return function () { + var et = this.__on + if (et) { + for (var nt = 0, rt = -1, it = et.length, ot; nt < it; ++nt) + (ot = et[nt]), + (!tt.type || ot.type === tt.type) && ot.name === tt.name + ? this.removeEventListener(ot.type, ot.listener, ot.options) + : (et[++rt] = ot) + ++rt ? (et.length = rt) : delete this.__on + } + } + } + function onAdd(tt, et, nt) { + return function () { + var rt = this.__on, + it, + ot = contextListener(et) + if (rt) { + for (var at = 0, st = rt.length; at < st; ++at) + if ((it = rt[at]).type === tt.type && it.name === tt.name) { + this.removeEventListener(it.type, it.listener, it.options), + this.addEventListener(it.type, (it.listener = ot), (it.options = nt)), + (it.value = et) + return + } + } + this.addEventListener(tt.type, ot, nt), + (it = { type: tt.type, name: tt.name, value: et, listener: ot, options: nt }), + rt ? rt.push(it) : (this.__on = [it]) + } + } + function selection_on(tt, et, nt) { + var rt = parseTypenames(tt + ''), + it, + ot = rt.length, + at + if (arguments.length < 2) { + var st = this.node().__on + if (st) { + for (var lt = 0, ct = st.length, ut; lt < ct; ++lt) + for (it = 0, ut = st[lt]; it < ot; ++it) + if ((at = rt[it]).type === ut.type && at.name === ut.name) return ut.value + } + return + } + for (st = et ? onAdd : onRemove, it = 0; it < ot; ++it) this.each(st(rt[it], et, nt)) + return this + } + function dispatchEvent(tt, et, nt) { + var rt = defaultView(tt), + it = rt.CustomEvent + typeof it == 'function' + ? (it = new it(et, nt)) + : ((it = rt.document.createEvent('Event')), + nt ? (it.initEvent(et, nt.bubbles, nt.cancelable), (it.detail = nt.detail)) : it.initEvent(et, !1, !1)), + tt.dispatchEvent(it) + } + function dispatchConstant(tt, et) { + return function () { + return dispatchEvent(this, tt, et) + } + } + function dispatchFunction(tt, et) { + return function () { + return dispatchEvent(this, tt, et.apply(this, arguments)) + } + } + function selection_dispatch(tt, et) { + return this.each((typeof et == 'function' ? dispatchFunction : dispatchConstant)(tt, et)) + } + function* selection_iterator() { + for (var tt = this._groups, et = 0, nt = tt.length; et < nt; ++et) + for (var rt = tt[et], it = 0, ot = rt.length, at; it < ot; ++it) (at = rt[it]) && (yield at) + } + var root$1 = [null] + function Selection$1(tt, et) { + ;(this._groups = tt), (this._parents = et) + } + function selection() { + return new Selection$1([[document.documentElement]], root$1) + } + function selection_selection() { + return this + } + Selection$1.prototype = selection.prototype = { + constructor: Selection$1, + select: selection_select, + selectAll: selection_selectAll, + selectChild: selection_selectChild, + selectChildren: selection_selectChildren, + filter: selection_filter, + data: selection_data, + enter: selection_enter, + exit: selection_exit, + join: selection_join, + merge: selection_merge, + selection: selection_selection, + order: selection_order, + sort: selection_sort, + call: selection_call, + nodes: selection_nodes, + node: selection_node, + size: selection_size, + empty: selection_empty, + each: selection_each, + attr: selection_attr, + style: selection_style, + property: selection_property, + classed: selection_classed, + text: selection_text, + html: selection_html, + raise: selection_raise, + lower: selection_lower, + append: selection_append, + insert: selection_insert, + remove: selection_remove, + clone: selection_clone, + datum: selection_datum, + on: selection_on, + dispatch: selection_dispatch, + [Symbol.iterator]: selection_iterator, + } + function select(tt) { + return typeof tt == 'string' + ? new Selection$1([[document.querySelector(tt)]], [document.documentElement]) + : new Selection$1([[tt]], root$1) + } + function sourceEvent(tt) { + let et + for (; (et = tt.sourceEvent); ) tt = et + return tt + } + function pointer(tt, et) { + if (((tt = sourceEvent(tt)), et === void 0 && (et = tt.currentTarget), et)) { + var nt = et.ownerSVGElement || et + if (nt.createSVGPoint) { + var rt = nt.createSVGPoint() + return ( + (rt.x = tt.clientX), (rt.y = tt.clientY), (rt = rt.matrixTransform(et.getScreenCTM().inverse())), [rt.x, rt.y] + ) + } + if (et.getBoundingClientRect) { + var it = et.getBoundingClientRect() + return [tt.clientX - it.left - et.clientLeft, tt.clientY - it.top - et.clientTop] + } + } + return [tt.pageX, tt.pageY] + } + const nonpassive = { passive: !1 }, + nonpassivecapture = { capture: !0, passive: !1 } + function nopropagation$1(tt) { + tt.stopImmediatePropagation() + } + function noevent$1(tt) { + tt.preventDefault(), tt.stopImmediatePropagation() + } + function dragDisable(tt) { + var et = tt.document.documentElement, + nt = select(tt).on('dragstart.drag', noevent$1, nonpassivecapture) + 'onselectstart' in et + ? nt.on('selectstart.drag', noevent$1, nonpassivecapture) + : ((et.__noselect = et.style.MozUserSelect), (et.style.MozUserSelect = 'none')) + } + function yesdrag(tt, et) { + var nt = tt.document.documentElement, + rt = select(tt).on('dragstart.drag', null) + et && + (rt.on('click.drag', noevent$1, nonpassivecapture), + setTimeout(function () { + rt.on('click.drag', null) + }, 0)), + 'onselectstart' in nt + ? rt.on('selectstart.drag', null) + : ((nt.style.MozUserSelect = nt.__noselect), delete nt.__noselect) + } + const constant$1 = (tt) => () => tt + function DragEvent( + tt, { - return (zFar * zNear) / (zFar - d * (zFar - zNear)); + sourceEvent: et, + subject: nt, + target: rt, + identifier: it, + active: ot, + x: at, + y: st, + dx: lt, + dy: ct, + dispatch: ut, + }, + ) { + Object.defineProperties(this, { + type: { value: tt, enumerable: !0, configurable: !0 }, + sourceEvent: { value: et, enumerable: !0, configurable: !0 }, + subject: { value: nt, enumerable: !0, configurable: !0 }, + target: { value: rt, enumerable: !0, configurable: !0 }, + identifier: { value: it, enumerable: !0, configurable: !0 }, + active: { value: ot, enumerable: !0, configurable: !0 }, + x: { value: at, enumerable: !0, configurable: !0 }, + y: { value: st, enumerable: !0, configurable: !0 }, + dx: { value: lt, enumerable: !0, configurable: !0 }, + dy: { value: ct, enumerable: !0, configurable: !0 }, + _: { value: ut }, + }) + } + DragEvent.prototype.on = function () { + var tt = this._.on.apply(this._, arguments) + return tt === this._ ? this : tt + } + function defaultFilter$1(tt) { + return !tt.ctrlKey && !tt.button + } + function defaultContainer() { + return this.parentNode + } + function defaultSubject(tt, et) { + return et ?? { x: tt.x, y: tt.y } + } + function defaultTouchable$1() { + return navigator.maxTouchPoints || 'ontouchstart' in this + } + function drag() { + var tt = defaultFilter$1, + et = defaultContainer, + nt = defaultSubject, + rt = defaultTouchable$1, + it = {}, + ot = dispatch('start', 'drag', 'end'), + at = 0, + st, + lt, + ct, + ut, + ht = 0 + function dt(kt) { + kt.on('mousedown.drag', pt) + .filter(rt) + .on('touchstart.drag', yt) + .on('touchmove.drag', bt, nonpassive) + .on('touchend.drag touchcancel.drag', vt) + .style('touch-action', 'none') + .style('-webkit-tap-highlight-color', 'rgba(0,0,0,0)') } - highp float linearize_depth_ortho(highp float d, highp float nearZ, highp float farZ) { - return nearZ + (farZ - nearZ) * d; + function pt(kt, St) { + if (!(ut || !tt.call(this, kt, St))) { + var Tt = xt(this, et.call(this, kt, St), kt, St, 'mouse') + Tt && + (select(kt.view).on('mousemove.drag', mt, nonpassivecapture).on('mouseup.drag', gt, nonpassivecapture), + dragDisable(kt.view), + nopropagation$1(kt), + (ct = !1), + (st = kt.clientX), + (lt = kt.clientY), + Tt('start', kt)) + } } - highp float linearize_depth_log(highp float d, highp float nearZ,highp float farZ) { - float depth = pow(2.0, d * log2(farZ + 1.0)) - 1.0; - float a = farZ / (farZ - nearZ); - float b = farZ * nearZ / (nearZ - farZ); - float linDepth = a + b / depth; - return ortho ? linearize_depth_ortho( - linDepth, - nearZ, - farZ - ) :linearize_depth(linDepth, nearZ, farZ); + function mt(kt) { + if ((noevent$1(kt), !ct)) { + var St = kt.clientX - st, + Tt = kt.clientY - lt + ct = St * St + Tt * Tt > ht + } + it.mouse('drag', kt) } - - vec3 getWorldPosLog(vec3 posS) { - vec2 uv = posS.xy; - float z = posS.z; - float nearZ =near; - float farZ = far; - float depth = pow(2.0, z * log2(farZ + 1.0)) - 1.0; - float a = farZ / (farZ - nearZ); - float b = farZ * nearZ / (nearZ - farZ); - float linDepth = a + b / depth; - vec4 clipVec = vec4(uv, linDepth, 1.0) * 2.0 - 1.0; - vec4 wpos = projectionMatrixInv * clipVec; - return wpos.xyz / wpos.w; + function gt(kt) { + select(kt.view).on('mousemove.drag mouseup.drag', null), yesdrag(kt.view, ct), noevent$1(kt), it.mouse('end', kt) } - vec3 getWorldPos(float depth, vec2 coord) { - #ifdef LOGDEPTH - return getWorldPosLog(vec3(coord, depth)); - #endif - float z = depth * 2.0 - 1.0; - vec4 clipSpacePosition = vec4(coord * 2.0 - 1.0, z, 1.0); - vec4 viewSpacePosition = projectionMatrixInv * clipSpacePosition; - // Perspective division - vec4 worldSpacePosition = viewSpacePosition; - worldSpacePosition.xyz /= worldSpacePosition.w; - return worldSpacePosition.xyz; + function yt(kt, St) { + if (tt.call(this, kt, St)) { + var Tt = kt.changedTouches, + At = et.call(this, kt, St), + Et = Tt.length, + $t, + Dt + for ($t = 0; $t < Et; ++$t) + (Dt = xt(this, At, kt, St, Tt[$t].identifier, Tt[$t])) && (nopropagation$1(kt), Dt('start', kt, Tt[$t])) + } + } + function bt(kt) { + var St = kt.changedTouches, + Tt = St.length, + At, + Et + for (At = 0; At < Tt; ++At) (Et = it[St[At].identifier]) && (noevent$1(kt), Et('drag', kt, St[At])) + } + function vt(kt) { + var St = kt.changedTouches, + Tt = St.length, + At, + Et + for ( + ut && clearTimeout(ut), + ut = setTimeout(function () { + ut = null + }, 500), + At = 0; + At < Tt; + ++At + ) + (Et = it[St[At].identifier]) && (nopropagation$1(kt), Et('end', kt, St[At])) + } + function xt(kt, St, Tt, At, Et, $t) { + var Dt = ot.copy(), + jt = pointer($t || Tt, St), + Pt, + Ct, + wt + if ( + (wt = nt.call( + kt, + new DragEvent('beforestart', { + sourceEvent: Tt, + target: dt, + identifier: Et, + active: at, + x: jt[0], + y: jt[1], + dx: 0, + dy: 0, + dispatch: Dt, + }), + At, + )) != null + ) + return ( + (Pt = wt.x - jt[0] || 0), + (Ct = wt.y - jt[1] || 0), + function It(Ot, Wt, zt) { + var Ft = jt, + Nt + switch (Ot) { + case 'start': + ;(it[Et] = It), (Nt = at++) + break + case 'end': + delete it[Et], --at + case 'drag': + ;(jt = pointer(zt || Wt, St)), (Nt = at) + break + } + Dt.call( + Ot, + kt, + new DragEvent(Ot, { + sourceEvent: Wt, + subject: wt, + target: dt, + identifier: Et, + active: Nt, + x: jt[0] + Pt, + y: jt[1] + Ct, + dx: jt[0] - Ft[0], + dy: jt[1] - Ft[1], + dispatch: Dt, + }), + At, + ) + } + ) + } + return ( + (dt.filter = function (kt) { + return arguments.length ? ((tt = typeof kt == 'function' ? kt : constant$1(!!kt)), dt) : tt + }), + (dt.container = function (kt) { + return arguments.length ? ((et = typeof kt == 'function' ? kt : constant$1(kt)), dt) : et + }), + (dt.subject = function (kt) { + return arguments.length ? ((nt = typeof kt == 'function' ? kt : constant$1(kt)), dt) : nt + }), + (dt.touchable = function (kt) { + return arguments.length ? ((rt = typeof kt == 'function' ? kt : constant$1(!!kt)), dt) : rt + }), + (dt.on = function () { + var kt = ot.on.apply(ot, arguments) + return kt === ot ? dt : kt + }), + (dt.clickDistance = function (kt) { + return arguments.length ? ((ht = (kt = +kt) * kt), dt) : Math.sqrt(ht) + }), + dt + ) } + var emptyOn = dispatch('start', 'end', 'cancel', 'interrupt'), + emptyTween = [], + CREATED = 0, + SCHEDULED = 1, + STARTING = 2, + STARTED = 3, + RUNNING = 4, + ENDING = 5, + ENDED = 6 + function schedule(tt, et, nt, rt, it, ot) { + var at = tt.__transition + if (!at) tt.__transition = {} + else if (nt in at) return + create(tt, nt, { + name: et, + index: rt, + group: it, + on: emptyOn, + tween: emptyTween, + time: ot.time, + delay: ot.delay, + duration: ot.duration, + ease: ot.ease, + timer: null, + state: CREATED, + }) + } + function init(tt, et) { + var nt = get(tt, et) + if (nt.state > CREATED) throw new Error('too late; already scheduled') + return nt + } + function set(tt, et) { + var nt = get(tt, et) + if (nt.state > STARTED) throw new Error('too late; already running') + return nt + } + function get(tt, et) { + var nt = tt.__transition + if (!nt || !(nt = nt[et])) throw new Error('transition not found') + return nt + } + function create(tt, et, nt) { + var rt = tt.__transition, + it + ;(rt[et] = nt), (nt.timer = timer$1(ot, 0, nt.time)) + function ot(ct) { + ;(nt.state = SCHEDULED), nt.timer.restart(at, nt.delay, nt.time), nt.delay <= ct && at(ct - nt.delay) + } + function at(ct) { + var ut, ht, dt, pt + if (nt.state !== SCHEDULED) return lt() + for (ut in rt) + if (((pt = rt[ut]), pt.name === nt.name)) { + if (pt.state === STARTED) return timeout(at) + pt.state === RUNNING + ? ((pt.state = ENDED), + pt.timer.stop(), + pt.on.call('interrupt', tt, tt.__data__, pt.index, pt.group), + delete rt[ut]) + : +ut < et && + ((pt.state = ENDED), + pt.timer.stop(), + pt.on.call('cancel', tt, tt.__data__, pt.index, pt.group), + delete rt[ut]) + } + if ( + (timeout(function () { + nt.state === STARTED && ((nt.state = RUNNING), nt.timer.restart(st, nt.delay, nt.time), st(ct)) + }), + (nt.state = STARTING), + nt.on.call('start', tt, tt.__data__, nt.index, nt.group), + nt.state === STARTING) + ) { + for (nt.state = STARTED, it = new Array((dt = nt.tween.length)), ut = 0, ht = -1; ut < dt; ++ut) + (pt = nt.tween[ut].value.call(tt, tt.__data__, nt.index, nt.group)) && (it[++ht] = pt) + it.length = ht + 1 + } + } + function st(ct) { + for ( + var ut = + ct < nt.duration ? nt.ease.call(null, ct / nt.duration) : (nt.timer.restart(lt), (nt.state = ENDING), 1), + ht = -1, + dt = it.length; + ++ht < dt; - vec3 computeNormal(vec3 worldPos, vec2 vUv) { - ivec2 p = ivec2(vUv * resolution); - float c0 = texelFetch(sceneDepth, p, 0).x; - float l2 = texelFetch(sceneDepth, p - ivec2(2, 0), 0).x; - float l1 = texelFetch(sceneDepth, p - ivec2(1, 0), 0).x; - float r1 = texelFetch(sceneDepth, p + ivec2(1, 0), 0).x; - float r2 = texelFetch(sceneDepth, p + ivec2(2, 0), 0).x; - float b2 = texelFetch(sceneDepth, p - ivec2(0, 2), 0).x; - float b1 = texelFetch(sceneDepth, p - ivec2(0, 1), 0).x; - float t1 = texelFetch(sceneDepth, p + ivec2(0, 1), 0).x; - float t2 = texelFetch(sceneDepth, p + ivec2(0, 2), 0).x; - - float dl = abs((2.0 * l1 - l2) - c0); - float dr = abs((2.0 * r1 - r2) - c0); - float db = abs((2.0 * b1 - b2) - c0); - float dt = abs((2.0 * t1 - t2) - c0); - - vec3 ce = getWorldPos(c0, vUv).xyz; - - vec3 dpdx = (dl < dr) ? ce - getWorldPos(l1, (vUv - vec2(1.0 / resolution.x, 0.0))).xyz - : -ce + getWorldPos(r1, (vUv + vec2(1.0 / resolution.x, 0.0))).xyz; - vec3 dpdy = (db < dt) ? ce - getWorldPos(b1, (vUv - vec2(0.0, 1.0 / resolution.y))).xyz - : -ce + getWorldPos(t1, (vUv + vec2(0.0, 1.0 / resolution.y))).xyz; - - return normalize(cross(dpdx, dpdy)); -} - -void main() { - vec4 diffuse = texture2D(sceneDiffuse, vUv); - float depth = texture2D(sceneDepth, vUv).x; - if (depth == 1.0) { - gl_FragColor = vec4(vec3(1.0), 1.0); - return; + ) + it[ht].call(tt, ut) + nt.state === ENDING && (nt.on.call('end', tt, tt.__data__, nt.index, nt.group), lt()) + } + function lt() { + ;(nt.state = ENDED), nt.timer.stop(), delete rt[et] + for (var ct in rt) return + delete tt.__transition + } + } + function interrupt(tt, et) { + var nt = tt.__transition, + rt, + it, + ot = !0, + at + if (nt) { + et = et == null ? null : et + '' + for (at in nt) { + if ((rt = nt[at]).name !== et) { + ot = !1 + continue + } + ;(it = rt.state > STARTING && rt.state < ENDING), + (rt.state = ENDED), + rt.timer.stop(), + rt.on.call(it ? 'interrupt' : 'cancel', tt, tt.__data__, rt.index, rt.group), + delete nt[at] } - vec3 worldPos = getWorldPos(depth, vUv); - // vec3 normal = texture2D(sceneNormal, vUv).rgb;//computeNormal(worldPos, vUv); - #ifdef HALFRES - vec3 normal = texture2D(sceneNormal, vUv).rgb; - #else - vec3 normal = computeNormal(worldPos, vUv); - #endif - vec4 noise = texture2D(bluenoise, gl_FragCoord.xy / 128.0); - vec3 randomVec = normalize(noise.rgb * 2.0 - 1.0); - vec3 tangent = normalize(randomVec - normal * dot(randomVec, normal)); - vec3 bitangent = cross(normal, tangent); - mat3 tbn = mat3(tangent, bitangent, normal); - float occluded = 0.0; - float totalWeight = 0.0; - /* float radiusScreen = distance( - worldPos, - getWorldPos(depth, vUv + - vec2(48.0, 0.0) / resolution) - );/*vUv.x < 0.5 ? radius : min(distance( - worldPos, - getWorldPos(depth, vUv + - vec2(100.0, 0.0) / resolution) - ), radius); - float distanceFalloffScreen = radiusScreen * 0.2;*/ - float radiusToUse = screenSpaceRadius ? distance( - worldPos, - getWorldPos(depth, vUv + - vec2(radius, 0.0) / resolution) - ) : radius; - float distanceFalloffToUse =screenSpaceRadius ? - radiusToUse * distanceFalloff - : distanceFalloff; - float bias = (0.1 / near) * fwidth(distance(worldPos, cameraPos)) / radiusToUse; - for(float i = 0.0; i < FSAMPLES; i++) { - vec3 sampleDirection = - tbn * - samples[int(i)]; - ; - float moveAmt = samplesR[int(mod(i + noise.a * FSAMPLES, FSAMPLES))]; - vec3 samplePos = worldPos + radiusToUse * moveAmt * sampleDirection; - vec4 offset = projMat * vec4(samplePos, 1.0); - offset.xyz /= offset.w; - offset.xyz = offset.xyz * 0.5 + 0.5; - float sampleDepth = textureLod(sceneDepth, offset.xy, 0.0).x; - /*float distSample = logDepth ? linearize_depth_log(sampleDepth, near, far) - (ortho ? linearize_depth_ortho(sampleDepth, near, far) : linearize_depth(sampleDepth, near, far));*/ - #ifdef LOGDEPTH - float distSample = linearize_depth_log(sampleDepth, near, far); - #else - float distSample = ortho ? linearize_depth_ortho(sampleDepth, near, far) : linearize_depth(sampleDepth, near, far); - #endif - float distWorld = ortho ? linearize_depth_ortho(offset.z, near, far) : linearize_depth(offset.z, near, far); - float rangeCheck = smoothstep(0.0, 1.0, distanceFalloffToUse / (abs(distSample - distWorld))); - vec2 diff = gl_FragCoord.xy - ( offset.xy * resolution); - float weight = dot(sampleDirection, normal); - occluded += rangeCheck * weight * - (distSample + bias - < distWorld ? 1.0 : 0.0) * ( - (dot( - diff, - diff - - ) < 1.0 || (sampleDepth == depth) || ( - offset.x < 0.0 || offset.x > 1.0 || offset.y < 0.0 || offset.y > 1.0 - ) ? 0.0 : 1.0) - ); - totalWeight += weight; + ot && delete tt.__transition + } + } + function selection_interrupt(tt) { + return this.each(function () { + interrupt(this, tt) + }) + } + function tweenRemove(tt, et) { + var nt, rt + return function () { + var it = set(this, tt), + ot = it.tween + if (ot !== nt) { + rt = nt = ot + for (var at = 0, st = rt.length; at < st; ++at) + if (rt[at].name === et) { + ;(rt = rt.slice()), rt.splice(at, 1) + break + } } - float occ = clamp(1.0 - occluded / totalWeight, 0.0, 1.0); - gl_FragColor = vec4(0.5 + 0.5 * normal, occ); -}`},$12b21d24d1192a04$export$a815acccbd2c9a49={uniforms:{sceneDiffuse:{value:null},sceneDepth:{value:null},tDiffuse:{value:null},projMat:{value:new Matrix4},viewMat:{value:new Matrix4},projectionMatrixInv:{value:new Matrix4},viewMatrixInv:{value:new Matrix4},cameraPos:{value:new Vector3},resolution:{value:new Vector2},color:{value:new Vector3(0,0,0)},blueNoise:{value:null},downsampledDepth:{value:null},time:{value:0},intensity:{value:10},renderMode:{value:0},gammaCorrection:{value:!1},logDepth:{value:!1},ortho:{value:!1},near:{value:.1},far:{value:1e3},screenSpaceRadius:{value:!1},radius:{value:0},distanceFalloff:{value:1},fog:{value:!1},fogExp:{value:!1},fogDensity:{value:0},fogNear:{value:1/0},fogFar:{value:1/0},colorMultiply:{value:!0}},vertexShader:` - varying vec2 vUv; - void main() { - vUv = uv; - gl_Position = vec4(position, 1); - }`,fragmentShader:` - uniform sampler2D sceneDiffuse; - uniform highp sampler2D sceneDepth; - uniform highp sampler2D downsampledDepth; - uniform sampler2D tDiffuse; - uniform sampler2D blueNoise; - uniform vec2 resolution; - uniform vec3 color; - uniform mat4 projectionMatrixInv; - uniform mat4 viewMatrixInv; - uniform float intensity; - uniform float renderMode; - uniform float near; - uniform float far; - uniform bool gammaCorrection; - uniform bool logDepth; - uniform bool ortho; - uniform bool screenSpaceRadius; - uniform bool fog; - uniform bool fogExp; - uniform bool colorMultiply; - uniform float fogDensity; - uniform float fogNear; - uniform float fogFar; - uniform float radius; - uniform float distanceFalloff; - uniform vec3 cameraPos; - varying vec2 vUv; - highp float linearize_depth(highp float d, highp float zNear,highp float zFar) - { - return (zFar * zNear) / (zFar - d * (zFar - zNear)); + it.tween = rt + } + } + function tweenFunction(tt, et, nt) { + var rt, it + if (typeof nt != 'function') throw new Error() + return function () { + var ot = set(this, tt), + at = ot.tween + if (at !== rt) { + it = (rt = at).slice() + for (var st = { name: et, value: nt }, lt = 0, ct = it.length; lt < ct; ++lt) + if (it[lt].name === et) { + it[lt] = st + break + } + lt === ct && it.push(st) + } + ot.tween = it + } + } + function transition_tween(tt, et) { + var nt = this._id + if (((tt += ''), arguments.length < 2)) { + for (var rt = get(this.node(), nt).tween, it = 0, ot = rt.length, at; it < ot; ++it) + if ((at = rt[it]).name === tt) return at.value + return null + } + return this.each((et == null ? tweenRemove : tweenFunction)(nt, tt, et)) + } + function tweenValue(tt, et, nt) { + var rt = tt._id + return ( + tt.each(function () { + var it = set(this, rt) + ;(it.value || (it.value = {}))[et] = nt.apply(this, arguments) + }), + function (it) { + return get(it, rt).value[et] + } + ) + } + function interpolate(tt, et) { + var nt + return ( + typeof et == 'number' + ? interpolateNumber$1 + : et instanceof color + ? interpolateRgb + : (nt = color(et)) + ? ((et = nt), interpolateRgb) + : interpolateString + )(tt, et) + } + function attrRemove(tt) { + return function () { + this.removeAttribute(tt) + } + } + function attrRemoveNS(tt) { + return function () { + this.removeAttributeNS(tt.space, tt.local) + } + } + function attrConstant(tt, et, nt) { + var rt, + it = nt + '', + ot + return function () { + var at = this.getAttribute(tt) + return at === it ? null : at === rt ? ot : (ot = et((rt = at), nt)) + } + } + function attrConstantNS(tt, et, nt) { + var rt, + it = nt + '', + ot + return function () { + var at = this.getAttributeNS(tt.space, tt.local) + return at === it ? null : at === rt ? ot : (ot = et((rt = at), nt)) + } + } + function attrFunction(tt, et, nt) { + var rt, it, ot + return function () { + var at, + st = nt(this), + lt + return st == null + ? void this.removeAttribute(tt) + : ((at = this.getAttribute(tt)), + (lt = st + ''), + at === lt ? null : at === rt && lt === it ? ot : ((it = lt), (ot = et((rt = at), st)))) + } + } + function attrFunctionNS(tt, et, nt) { + var rt, it, ot + return function () { + var at, + st = nt(this), + lt + return st == null + ? void this.removeAttributeNS(tt.space, tt.local) + : ((at = this.getAttributeNS(tt.space, tt.local)), + (lt = st + ''), + at === lt ? null : at === rt && lt === it ? ot : ((it = lt), (ot = et((rt = at), st)))) + } + } + function transition_attr(tt, et) { + var nt = namespace(tt), + rt = nt === 'transform' ? interpolateTransformSvg : interpolate + return this.attrTween( + tt, + typeof et == 'function' + ? (nt.local ? attrFunctionNS : attrFunction)(nt, rt, tweenValue(this, 'attr.' + tt, et)) + : et == null + ? (nt.local ? attrRemoveNS : attrRemove)(nt) + : (nt.local ? attrConstantNS : attrConstant)(nt, rt, et), + ) + } + function attrInterpolate(tt, et) { + return function (nt) { + this.setAttribute(tt, et.call(this, nt)) + } + } + function attrInterpolateNS(tt, et) { + return function (nt) { + this.setAttributeNS(tt.space, tt.local, et.call(this, nt)) + } + } + function attrTweenNS(tt, et) { + var nt, rt + function it() { + var ot = et.apply(this, arguments) + return ot !== rt && (nt = (rt = ot) && attrInterpolateNS(tt, ot)), nt } - highp float linearize_depth_ortho(highp float d, highp float nearZ, highp float farZ) { - return nearZ + (farZ - nearZ) * d; + return (it._value = et), it + } + function attrTween(tt, et) { + var nt, rt + function it() { + var ot = et.apply(this, arguments) + return ot !== rt && (nt = (rt = ot) && attrInterpolate(tt, ot)), nt } - highp float linearize_depth_log(highp float d, highp float nearZ,highp float farZ) { - float depth = pow(2.0, d * log2(farZ + 1.0)) - 1.0; - float a = farZ / (farZ - nearZ); - float b = farZ * nearZ / (nearZ - farZ); - float linDepth = a + b / depth; - return ortho ? linearize_depth_ortho( - linDepth, - nearZ, - farZ - ) :linearize_depth(linDepth, nearZ, farZ); + return (it._value = et), it + } + function transition_attrTween(tt, et) { + var nt = 'attr.' + tt + if (arguments.length < 2) return (nt = this.tween(nt)) && nt._value + if (et == null) return this.tween(nt, null) + if (typeof et != 'function') throw new Error() + var rt = namespace(tt) + return this.tween(nt, (rt.local ? attrTweenNS : attrTween)(rt, et)) + } + function delayFunction(tt, et) { + return function () { + init(this, tt).delay = +et.apply(this, arguments) } - vec3 getWorldPosLog(vec3 posS) { - vec2 uv = posS.xy; - float z = posS.z; - float nearZ =near; - float farZ = far; - float depth = pow(2.0, z * log2(farZ + 1.0)) - 1.0; - float a = farZ / (farZ - nearZ); - float b = farZ * nearZ / (nearZ - farZ); - float linDepth = a + b / depth; - vec4 clipVec = vec4(uv, linDepth, 1.0) * 2.0 - 1.0; - vec4 wpos = projectionMatrixInv * clipVec; - return wpos.xyz / wpos.w; + } + function delayConstant(tt, et) { + return ( + (et = +et), + function () { + init(this, tt).delay = et } - vec3 getWorldPos(float depth, vec2 coord) { - // if (logDepth) { - #ifdef LOGDEPTH - return getWorldPosLog(vec3(coord, depth)); - #endif - // } - float z = depth * 2.0 - 1.0; - vec4 clipSpacePosition = vec4(coord * 2.0 - 1.0, z, 1.0); - vec4 viewSpacePosition = projectionMatrixInv * clipSpacePosition; - // Perspective division - vec4 worldSpacePosition = viewSpacePosition; - worldSpacePosition.xyz /= worldSpacePosition.w; - return worldSpacePosition.xyz; + ) + } + function transition_delay(tt) { + var et = this._id + return arguments.length + ? this.each((typeof tt == 'function' ? delayFunction : delayConstant)(et, tt)) + : get(this.node(), et).delay + } + function durationFunction(tt, et) { + return function () { + set(this, tt).duration = +et.apply(this, arguments) } - - vec3 computeNormal(vec3 worldPos, vec2 vUv) { - ivec2 p = ivec2(vUv * resolution); - float c0 = texelFetch(sceneDepth, p, 0).x; - float l2 = texelFetch(sceneDepth, p - ivec2(2, 0), 0).x; - float l1 = texelFetch(sceneDepth, p - ivec2(1, 0), 0).x; - float r1 = texelFetch(sceneDepth, p + ivec2(1, 0), 0).x; - float r2 = texelFetch(sceneDepth, p + ivec2(2, 0), 0).x; - float b2 = texelFetch(sceneDepth, p - ivec2(0, 2), 0).x; - float b1 = texelFetch(sceneDepth, p - ivec2(0, 1), 0).x; - float t1 = texelFetch(sceneDepth, p + ivec2(0, 1), 0).x; - float t2 = texelFetch(sceneDepth, p + ivec2(0, 2), 0).x; - - float dl = abs((2.0 * l1 - l2) - c0); - float dr = abs((2.0 * r1 - r2) - c0); - float db = abs((2.0 * b1 - b2) - c0); - float dt = abs((2.0 * t1 - t2) - c0); - - vec3 ce = getWorldPos(c0, vUv).xyz; - - vec3 dpdx = (dl < dr) ? ce - getWorldPos(l1, (vUv - vec2(1.0 / resolution.x, 0.0))).xyz - : -ce + getWorldPos(r1, (vUv + vec2(1.0 / resolution.x, 0.0))).xyz; - vec3 dpdy = (db < dt) ? ce - getWorldPos(b1, (vUv - vec2(0.0, 1.0 / resolution.y))).xyz - : -ce + getWorldPos(t1, (vUv + vec2(0.0, 1.0 / resolution.y))).xyz; - - return normalize(cross(dpdx, dpdy)); } - - #include - #include - void main() { - //vec4 texel = texture2D(tDiffuse, vUv);//vec3(0.0); - vec4 sceneTexel = texture2D(sceneDiffuse, vUv); - float depth = texture2D( - sceneDepth, - vUv - ).x; - #ifdef HALFRES - vec4 texel; - if (depth == 1.0) { - texel = vec4(0.0, 0.0, 0.0, 1.0); - } else { - vec3 worldPos = getWorldPos(depth, vUv); - vec3 normal = computeNormal(getWorldPos(depth, vUv), vUv); - // vec4 texel = texture2D(tDiffuse, vUv); - // Find closest depth; - float totalWeight = 0.0; - float radiusToUse = screenSpaceRadius ? distance( - worldPos, - getWorldPos(depth, vUv + - vec2(radius, 0.0) / resolution) - ) : radius; - float distanceFalloffToUse =screenSpaceRadius ? - radiusToUse * distanceFalloff - : distanceFalloff; - for(float x = -1.0; x <= 1.0; x++) { - for(float y = -1.0; y <= 1.0; y++) { - vec2 offset = vec2(x, y); - ivec2 p = ivec2( - (vUv * resolution * 0.5) + offset - ); - vec2 pUv = vec2(p) / (resolution * 0.5); - float sampleDepth = texelFetch(downsampledDepth,p, 0).x; - vec4 sampleInfo = texelFetch(tDiffuse, p, 0); - vec3 normalSample = sampleInfo.xyz * 2.0 - 1.0; - vec3 worldPosSample = getWorldPos(sampleDepth, pUv); - float tangentPlaneDist = abs(dot(worldPos - worldPosSample, normal)); - float rangeCheck = exp(-1.0 * tangentPlaneDist * (1.0 / distanceFalloffToUse)) * max(dot(normal, normalSample), 0.0); - float weight = rangeCheck; - totalWeight += weight; - texel += sampleInfo * weight; - } + function durationConstant(tt, et) { + return ( + (et = +et), + function () { + set(this, tt).duration = et + } + ) + } + function transition_duration(tt) { + var et = this._id + return arguments.length + ? this.each((typeof tt == 'function' ? durationFunction : durationConstant)(et, tt)) + : get(this.node(), et).duration + } + function easeConstant(tt, et) { + if (typeof et != 'function') throw new Error() + return function () { + set(this, tt).ease = et + } + } + function transition_ease(tt) { + var et = this._id + return arguments.length ? this.each(easeConstant(et, tt)) : get(this.node(), et).ease + } + function easeVarying(tt, et) { + return function () { + var nt = et.apply(this, arguments) + if (typeof nt != 'function') throw new Error() + set(this, tt).ease = nt + } + } + function transition_easeVarying(tt) { + if (typeof tt != 'function') throw new Error() + return this.each(easeVarying(this._id, tt)) + } + function transition_filter(tt) { + typeof tt != 'function' && (tt = matcher(tt)) + for (var et = this._groups, nt = et.length, rt = new Array(nt), it = 0; it < nt; ++it) + for (var ot = et[it], at = ot.length, st = (rt[it] = []), lt, ct = 0; ct < at; ++ct) + (lt = ot[ct]) && tt.call(lt, lt.__data__, ct, ot) && st.push(lt) + return new Transition(rt, this._parents, this._name, this._id) + } + function transition_merge(tt) { + if (tt._id !== this._id) throw new Error() + for ( + var et = this._groups, + nt = tt._groups, + rt = et.length, + it = nt.length, + ot = Math.min(rt, it), + at = new Array(rt), + st = 0; + st < ot; + ++st + ) + for (var lt = et[st], ct = nt[st], ut = lt.length, ht = (at[st] = new Array(ut)), dt, pt = 0; pt < ut; ++pt) + (dt = lt[pt] || ct[pt]) && (ht[pt] = dt) + for (; st < rt; ++st) at[st] = et[st] + return new Transition(at, this._parents, this._name, this._id) + } + function start(tt) { + return (tt + '') + .trim() + .split(/^|\s+/) + .every(function (et) { + var nt = et.indexOf('.') + return nt >= 0 && (et = et.slice(0, nt)), !et || et === 'start' + }) + } + function onFunction(tt, et, nt) { + var rt, + it, + ot = start(et) ? init : set + return function () { + var at = ot(this, tt), + st = at.on + st !== rt && (it = (rt = st).copy()).on(et, nt), (at.on = it) + } + } + function transition_on(tt, et) { + var nt = this._id + return arguments.length < 2 ? get(this.node(), nt).on.on(tt) : this.each(onFunction(nt, tt, et)) + } + function removeFunction(tt) { + return function () { + var et = this.parentNode + for (var nt in this.__transition) if (+nt !== tt) return + et && et.removeChild(this) + } + } + function transition_remove() { + return this.on('end.remove', removeFunction(this._id)) + } + function transition_select(tt) { + var et = this._name, + nt = this._id + typeof tt != 'function' && (tt = selector(tt)) + for (var rt = this._groups, it = rt.length, ot = new Array(it), at = 0; at < it; ++at) + for (var st = rt[at], lt = st.length, ct = (ot[at] = new Array(lt)), ut, ht, dt = 0; dt < lt; ++dt) + (ut = st[dt]) && + (ht = tt.call(ut, ut.__data__, dt, st)) && + ('__data__' in ut && (ht.__data__ = ut.__data__), + (ct[dt] = ht), + schedule(ct[dt], et, nt, dt, ct, get(ut, nt))) + return new Transition(ot, this._parents, et, nt) + } + function transition_selectAll(tt) { + var et = this._name, + nt = this._id + typeof tt != 'function' && (tt = selectorAll(tt)) + for (var rt = this._groups, it = rt.length, ot = [], at = [], st = 0; st < it; ++st) + for (var lt = rt[st], ct = lt.length, ut, ht = 0; ht < ct; ++ht) + if ((ut = lt[ht])) { + for (var dt = tt.call(ut, ut.__data__, ht, lt), pt, mt = get(ut, nt), gt = 0, yt = dt.length; gt < yt; ++gt) + (pt = dt[gt]) && schedule(pt, et, nt, gt, dt, mt) + ot.push(dt), at.push(ut) } - if (totalWeight == 0.0) { - texel = texture2D(tDiffuse, vUv); - } else { - texel /= totalWeight; + return new Transition(ot, at, et, nt) + } + var Selection = selection.prototype.constructor + function transition_selection() { + return new Selection(this._groups, this._parents) + } + function styleNull(tt, et) { + var nt, rt, it + return function () { + var ot = styleValue(this, tt), + at = (this.style.removeProperty(tt), styleValue(this, tt)) + return ot === at ? null : ot === nt && at === rt ? it : (it = et((nt = ot), (rt = at))) + } + } + function styleRemove(tt) { + return function () { + this.style.removeProperty(tt) + } + } + function styleConstant(tt, et, nt) { + var rt, + it = nt + '', + ot + return function () { + var at = styleValue(this, tt) + return at === it ? null : at === rt ? ot : (ot = et((rt = at), nt)) + } + } + function styleFunction(tt, et, nt) { + var rt, it, ot + return function () { + var at = styleValue(this, tt), + st = nt(this), + lt = st + '' + return ( + st == null && (lt = st = (this.style.removeProperty(tt), styleValue(this, tt))), + at === lt ? null : at === rt && lt === it ? ot : ((it = lt), (ot = et((rt = at), st))) + ) + } + } + function styleMaybeRemove(tt, et) { + var nt, + rt, + it, + ot = 'style.' + et, + at = 'end.' + ot, + st + return function () { + var lt = set(this, tt), + ct = lt.on, + ut = lt.value[ot] == null ? st || (st = styleRemove(et)) : void 0 + ;(ct !== nt || it !== ut) && (rt = (nt = ct).copy()).on(at, (it = ut)), (lt.on = rt) + } + } + function transition_style(tt, et, nt) { + var rt = (tt += '') == 'transform' ? interpolateTransformCss : interpolate + return et == null + ? this.styleTween(tt, styleNull(tt, rt)).on('end.style.' + tt, styleRemove(tt)) + : typeof et == 'function' + ? this.styleTween(tt, styleFunction(tt, rt, tweenValue(this, 'style.' + tt, et))).each( + styleMaybeRemove(this._id, tt), + ) + : this.styleTween(tt, styleConstant(tt, rt, et), nt).on('end.style.' + tt, null) + } + function styleInterpolate(tt, et, nt) { + return function (rt) { + this.style.setProperty(tt, et.call(this, rt), nt) + } + } + function styleTween(tt, et, nt) { + var rt, it + function ot() { + var at = et.apply(this, arguments) + return at !== it && (rt = (it = at) && styleInterpolate(tt, at, nt)), rt + } + return (ot._value = et), ot + } + function transition_styleTween(tt, et, nt) { + var rt = 'style.' + (tt += '') + if (arguments.length < 2) return (rt = this.tween(rt)) && rt._value + if (et == null) return this.tween(rt, null) + if (typeof et != 'function') throw new Error() + return this.tween(rt, styleTween(tt, et, nt ?? '')) + } + function textConstant(tt) { + return function () { + this.textContent = tt + } + } + function textFunction(tt) { + return function () { + var et = tt(this) + this.textContent = et ?? '' + } + } + function transition_text(tt) { + return this.tween( + 'text', + typeof tt == 'function' ? textFunction(tweenValue(this, 'text', tt)) : textConstant(tt == null ? '' : tt + ''), + ) + } + function textInterpolate(tt) { + return function (et) { + this.textContent = tt.call(this, et) + } + } + function textTween(tt) { + var et, nt + function rt() { + var it = tt.apply(this, arguments) + return it !== nt && (et = (nt = it) && textInterpolate(it)), et + } + return (rt._value = tt), rt + } + function transition_textTween(tt) { + var et = 'text' + if (arguments.length < 1) return (et = this.tween(et)) && et._value + if (tt == null) return this.tween(et, null) + if (typeof tt != 'function') throw new Error() + return this.tween(et, textTween(tt)) + } + function transition_transition() { + for (var tt = this._name, et = this._id, nt = newId(), rt = this._groups, it = rt.length, ot = 0; ot < it; ++ot) + for (var at = rt[ot], st = at.length, lt, ct = 0; ct < st; ++ct) + if ((lt = at[ct])) { + var ut = get(lt, et) + schedule(lt, tt, nt, ct, at, { + time: ut.time + ut.delay + ut.duration, + delay: 0, + duration: ut.duration, + ease: ut.ease, + }) + } + return new Transition(rt, this._parents, tt, nt) + } + function transition_end() { + var tt, + et, + nt = this, + rt = nt._id, + it = nt.size() + return new Promise(function (ot, at) { + var st = { value: at }, + lt = { + value: function () { + --it === 0 && ot() + }, } + nt.each(function () { + var ct = set(this, rt), + ut = ct.on + ut !== tt && ((et = (tt = ut).copy()), et._.cancel.push(st), et._.interrupt.push(st), et._.end.push(lt)), + (ct.on = et) + }), + it === 0 && ot() + }) + } + var id = 0 + function Transition(tt, et, nt, rt) { + ;(this._groups = tt), (this._parents = et), (this._name = nt), (this._id = rt) + } + function newId() { + return ++id + } + var selection_prototype = selection.prototype + Transition.prototype = { + constructor: Transition, + select: transition_select, + selectAll: transition_selectAll, + selectChild: selection_prototype.selectChild, + selectChildren: selection_prototype.selectChildren, + filter: transition_filter, + merge: transition_merge, + selection: transition_selection, + transition: transition_transition, + call: selection_prototype.call, + nodes: selection_prototype.nodes, + node: selection_prototype.node, + size: selection_prototype.size, + empty: selection_prototype.empty, + each: selection_prototype.each, + on: transition_on, + attr: transition_attr, + attrTween: transition_attrTween, + style: transition_style, + styleTween: transition_styleTween, + text: transition_text, + textTween: transition_textTween, + remove: transition_remove, + tween: transition_tween, + delay: transition_delay, + duration: transition_duration, + ease: transition_ease, + easeVarying: transition_easeVarying, + end: transition_end, + [Symbol.iterator]: selection_prototype[Symbol.iterator], + } + function cubicInOut(tt) { + return ((tt *= 2) <= 1 ? tt * tt * tt : (tt -= 2) * tt * tt + 2) / 2 + } + var defaultTiming = { time: null, delay: 0, duration: 250, ease: cubicInOut } + function inherit(tt, et) { + for (var nt; !(nt = tt.__transition) || !(nt = nt[et]); ) + if (!(tt = tt.parentNode)) throw new Error(`transition ${et} not found`) + return nt + } + function selection_transition(tt) { + var et, nt + tt instanceof Transition + ? ((et = tt._id), (tt = tt._name)) + : ((et = newId()), ((nt = defaultTiming).time = now$4()), (tt = tt == null ? null : tt + '')) + for (var rt = this._groups, it = rt.length, ot = 0; ot < it; ++ot) + for (var at = rt[ot], st = at.length, lt, ct = 0; ct < st; ++ct) + (lt = at[ct]) && schedule(lt, tt, et, ct, at, nt || inherit(lt, et)) + return new Transition(rt, this._parents, tt, et) + } + selection.prototype.interrupt = selection_interrupt + selection.prototype.transition = selection_transition + const constant = (tt) => () => tt + function ZoomEvent(tt, { sourceEvent: et, target: nt, transform: rt, dispatch: it }) { + Object.defineProperties(this, { + type: { value: tt, enumerable: !0, configurable: !0 }, + sourceEvent: { value: et, enumerable: !0, configurable: !0 }, + target: { value: nt, enumerable: !0, configurable: !0 }, + transform: { value: rt, enumerable: !0, configurable: !0 }, + _: { value: it }, + }) + } + function Transform(tt, et, nt) { + ;(this.k = tt), (this.x = et), (this.y = nt) + } + Transform.prototype = { + constructor: Transform, + scale: function (tt) { + return tt === 1 ? this : new Transform(this.k * tt, this.x, this.y) + }, + translate: function (tt, et) { + return (tt === 0) & (et === 0) ? this : new Transform(this.k, this.x + this.k * tt, this.y + this.k * et) + }, + apply: function (tt) { + return [tt[0] * this.k + this.x, tt[1] * this.k + this.y] + }, + applyX: function (tt) { + return tt * this.k + this.x + }, + applyY: function (tt) { + return tt * this.k + this.y + }, + invert: function (tt) { + return [(tt[0] - this.x) / this.k, (tt[1] - this.y) / this.k] + }, + invertX: function (tt) { + return (tt - this.x) / this.k + }, + invertY: function (tt) { + return (tt - this.y) / this.k + }, + rescaleX: function (tt) { + return tt.copy().domain(tt.range().map(this.invertX, this).map(tt.invert, tt)) + }, + rescaleY: function (tt) { + return tt.copy().domain(tt.range().map(this.invertY, this).map(tt.invert, tt)) + }, + toString: function () { + return 'translate(' + this.x + ',' + this.y + ') scale(' + this.k + ')' + }, + } + var identity = new Transform(1, 0, 0) + Transform.prototype + function nopropagation(tt) { + tt.stopImmediatePropagation() + } + function noevent(tt) { + tt.preventDefault(), tt.stopImmediatePropagation() + } + function defaultFilter(tt) { + return (!tt.ctrlKey || tt.type === 'wheel') && !tt.button + } + function defaultExtent() { + var tt = this + return tt instanceof SVGElement + ? ((tt = tt.ownerSVGElement || tt), + tt.hasAttribute('viewBox') + ? ((tt = tt.viewBox.baseVal), + [ + [tt.x, tt.y], + [tt.x + tt.width, tt.y + tt.height], + ]) + : [ + [0, 0], + [tt.width.baseVal.value, tt.height.baseVal.value], + ]) + : [ + [0, 0], + [tt.clientWidth, tt.clientHeight], + ] + } + function defaultTransform() { + return this.__zoom || identity + } + function defaultWheelDelta(tt) { + return -tt.deltaY * (tt.deltaMode === 1 ? 0.05 : tt.deltaMode ? 1 : 0.002) * (tt.ctrlKey ? 10 : 1) + } + function defaultTouchable() { + return navigator.maxTouchPoints || 'ontouchstart' in this + } + function defaultConstrain(tt, et, nt) { + var rt = tt.invertX(et[0][0]) - nt[0][0], + it = tt.invertX(et[1][0]) - nt[1][0], + ot = tt.invertY(et[0][1]) - nt[0][1], + at = tt.invertY(et[1][1]) - nt[1][1] + return tt.translate( + it > rt ? (rt + it) / 2 : Math.min(0, rt) || Math.max(0, it), + at > ot ? (ot + at) / 2 : Math.min(0, ot) || Math.max(0, at), + ) + } + function zoom() { + var tt = defaultFilter, + et = defaultExtent, + nt = defaultConstrain, + rt = defaultWheelDelta, + it = defaultTouchable, + ot = [0, 1 / 0], + at = [ + [-1 / 0, -1 / 0], + [1 / 0, 1 / 0], + ], + st = 250, + lt = interpolateZoom, + ct = dispatch('start', 'zoom', 'end'), + ut, + ht, + dt, + pt = 500, + mt = 150, + gt = 0, + yt = 10 + function bt(wt) { + wt.property('__zoom', defaultTransform) + .on('wheel.zoom', Et, { passive: !1 }) + .on('mousedown.zoom', $t) + .on('dblclick.zoom', Dt) + .filter(it) + .on('touchstart.zoom', jt) + .on('touchmove.zoom', Pt) + .on('touchend.zoom touchcancel.zoom', Ct) + .style('-webkit-tap-highlight-color', 'rgba(0,0,0,0)') } - #else - vec4 texel = texture2D(tDiffuse, vUv); - #endif - - - float finalAo = pow(texel.a, intensity); - float fogFactor; - float fogDepth = distance( - cameraPos, - getWorldPos(depth, vUv) - ); - if (fog) { - if (fogExp) { - fogFactor = 1.0 - exp( - fogDensity * fogDensity * fogDepth * fogDepth ); - } else { - fogFactor = smoothstep( fogNear, fogFar, fogDepth ); + ;(bt.transform = function (wt, It, Ot, Wt) { + var zt = wt.selection ? wt.selection() : wt + zt.property('__zoom', defaultTransform), + wt !== zt + ? St(wt, It, Ot, Wt) + : zt.interrupt().each(function () { + Tt(this, arguments) + .event(Wt) + .start() + .zoom(null, typeof It == 'function' ? It.apply(this, arguments) : It) + .end() + }) + }), + (bt.scaleBy = function (wt, It, Ot, Wt) { + bt.scaleTo( + wt, + function () { + var zt = this.__zoom.k, + Ft = typeof It == 'function' ? It.apply(this, arguments) : It + return zt * Ft + }, + Ot, + Wt, + ) + }), + (bt.scaleTo = function (wt, It, Ot, Wt) { + bt.transform( + wt, + function () { + var zt = et.apply(this, arguments), + Ft = this.__zoom, + Nt = Ot == null ? kt(zt) : typeof Ot == 'function' ? Ot.apply(this, arguments) : Ot, + Ut = Ft.invert(Nt), + Mt = typeof It == 'function' ? It.apply(this, arguments) : It + return nt(xt(vt(Ft, Mt), Nt, Ut), zt, at) + }, + Ot, + Wt, + ) + }), + (bt.translateBy = function (wt, It, Ot, Wt) { + bt.transform( + wt, + function () { + return nt( + this.__zoom.translate( + typeof It == 'function' ? It.apply(this, arguments) : It, + typeof Ot == 'function' ? Ot.apply(this, arguments) : Ot, + ), + et.apply(this, arguments), + at, + ) + }, + null, + Wt, + ) + }), + (bt.translateTo = function (wt, It, Ot, Wt, zt) { + bt.transform( + wt, + function () { + var Ft = et.apply(this, arguments), + Nt = this.__zoom, + Ut = Wt == null ? kt(Ft) : typeof Wt == 'function' ? Wt.apply(this, arguments) : Wt + return nt( + identity + .translate(Ut[0], Ut[1]) + .scale(Nt.k) + .translate( + typeof It == 'function' ? -It.apply(this, arguments) : -It, + typeof Ot == 'function' ? -Ot.apply(this, arguments) : -Ot, + ), + Ft, + at, + ) + }, + Wt, + zt, + ) + }) + function vt(wt, It) { + return (It = Math.max(ot[0], Math.min(ot[1], It))), It === wt.k ? wt : new Transform(It, wt.x, wt.y) + } + function xt(wt, It, Ot) { + var Wt = It[0] - Ot[0] * wt.k, + zt = It[1] - Ot[1] * wt.k + return Wt === wt.x && zt === wt.y ? wt : new Transform(wt.k, Wt, zt) + } + function kt(wt) { + return [(+wt[0][0] + +wt[1][0]) / 2, (+wt[0][1] + +wt[1][1]) / 2] + } + function St(wt, It, Ot, Wt) { + wt.on('start.zoom', function () { + Tt(this, arguments).event(Wt).start() + }) + .on('interrupt.zoom end.zoom', function () { + Tt(this, arguments).event(Wt).end() + }) + .tween('zoom', function () { + var zt = this, + Ft = arguments, + Nt = Tt(zt, Ft).event(Wt), + Ut = et.apply(zt, Ft), + Mt = Ot == null ? kt(Ut) : typeof Ot == 'function' ? Ot.apply(zt, Ft) : Ot, + Ht = Math.max(Ut[1][0] - Ut[0][0], Ut[1][1] - Ut[0][1]), + en = zt.__zoom, + sn = typeof It == 'function' ? It.apply(zt, Ft) : It, + Kt = lt(en.invert(Mt).concat(Ht / en.k), sn.invert(Mt).concat(Ht / sn.k)) + return function (rn) { + if (rn === 1) rn = sn + else { + var nn = Kt(rn), + hn = Ht / nn[2] + rn = new Transform(hn, Mt[0] - nn[0] * hn, Mt[1] - nn[1] * hn) } + Nt.zoom(null, rn) + } + }) + } + function Tt(wt, It, Ot) { + return (!Ot && wt.__zooming) || new At(wt, It) + } + function At(wt, It) { + ;(this.that = wt), + (this.args = It), + (this.active = 0), + (this.sourceEvent = null), + (this.extent = et.apply(wt, It)), + (this.taps = 0) + } + At.prototype = { + event: function (wt) { + return wt && (this.sourceEvent = wt), this + }, + start: function () { + return ++this.active === 1 && ((this.that.__zooming = this), this.emit('start')), this + }, + zoom: function (wt, It) { + return ( + this.mouse && wt !== 'mouse' && (this.mouse[1] = It.invert(this.mouse[0])), + this.touch0 && wt !== 'touch' && (this.touch0[1] = It.invert(this.touch0[0])), + this.touch1 && wt !== 'touch' && (this.touch1[1] = It.invert(this.touch1[0])), + (this.that.__zoom = It), + this.emit('zoom'), + this + ) + }, + end: function () { + return --this.active === 0 && (delete this.that.__zooming, this.emit('end')), this + }, + emit: function (wt) { + var It = select(this.that).datum() + ct.call( + wt, + this.that, + new ZoomEvent(wt, { + sourceEvent: this.sourceEvent, + target: bt, + type: wt, + transform: this.that.__zoom, + dispatch: ct, + }), + It, + ) + }, + } + function Et(wt, ...It) { + if (!tt.apply(this, arguments)) return + var Ot = Tt(this, It).event(wt), + Wt = this.__zoom, + zt = Math.max(ot[0], Math.min(ot[1], Wt.k * Math.pow(2, rt.apply(this, arguments)))), + Ft = pointer(wt) + if (Ot.wheel) + (Ot.mouse[0][0] !== Ft[0] || Ot.mouse[0][1] !== Ft[1]) && (Ot.mouse[1] = Wt.invert((Ot.mouse[0] = Ft))), + clearTimeout(Ot.wheel) + else { + if (Wt.k === zt) return + ;(Ot.mouse = [Ft, Wt.invert(Ft)]), interrupt(this), Ot.start() + } + noevent(wt), + (Ot.wheel = setTimeout(Nt, mt)), + Ot.zoom('mouse', nt(xt(vt(Wt, zt), Ot.mouse[0], Ot.mouse[1]), Ot.extent, at)) + function Nt() { + ;(Ot.wheel = null), Ot.end() + } + } + function $t(wt, ...It) { + if (dt || !tt.apply(this, arguments)) return + var Ot = wt.currentTarget, + Wt = Tt(this, It, !0).event(wt), + zt = select(wt.view).on('mousemove.zoom', Mt, !0).on('mouseup.zoom', Ht, !0), + Ft = pointer(wt, Ot), + Nt = wt.clientX, + Ut = wt.clientY + dragDisable(wt.view), nopropagation(wt), (Wt.mouse = [Ft, this.__zoom.invert(Ft)]), interrupt(this), Wt.start() + function Mt(en) { + if ((noevent(en), !Wt.moved)) { + var sn = en.clientX - Nt, + Kt = en.clientY - Ut + Wt.moved = sn * sn + Kt * Kt > gt } - finalAo = mix(finalAo, 1.0, fogFactor); - vec3 aoApplied = color * mix(vec3(1.0), sceneTexel.rgb, float(colorMultiply)); - if (renderMode == 0.0) { - gl_FragColor = vec4( mix(sceneTexel.rgb, aoApplied, 1.0 - finalAo), sceneTexel.a); - } else if (renderMode == 1.0) { - gl_FragColor = vec4( mix(vec3(1.0), aoApplied, 1.0 - finalAo), sceneTexel.a); - } else if (renderMode == 2.0) { - gl_FragColor = vec4( sceneTexel.rgb, sceneTexel.a); - } else if (renderMode == 3.0) { - if (vUv.x < 0.5) { - gl_FragColor = vec4( sceneTexel.rgb, sceneTexel.a); - } else if (abs(vUv.x - 0.5) < 1.0 / resolution.x) { - gl_FragColor = vec4(1.0); - } else { - gl_FragColor = vec4( mix(sceneTexel.rgb, aoApplied, 1.0 - finalAo), sceneTexel.a); - } - } else if (renderMode == 4.0) { - if (vUv.x < 0.5) { - gl_FragColor = vec4( sceneTexel.rgb, sceneTexel.a); - } else if (abs(vUv.x - 0.5) < 1.0 / resolution.x) { - gl_FragColor = vec4(1.0); - } else { - gl_FragColor = vec4( mix(vec3(1.0), aoApplied, 1.0 - finalAo), sceneTexel.a); - } + Wt.event(en).zoom('mouse', nt(xt(Wt.that.__zoom, (Wt.mouse[0] = pointer(en, Ot)), Wt.mouse[1]), Wt.extent, at)) + } + function Ht(en) { + zt.on('mousemove.zoom mouseup.zoom', null), yesdrag(en.view, Wt.moved), noevent(en), Wt.event(en).end() + } + } + function Dt(wt, ...It) { + if (tt.apply(this, arguments)) { + var Ot = this.__zoom, + Wt = pointer(wt.changedTouches ? wt.changedTouches[0] : wt, this), + zt = Ot.invert(Wt), + Ft = Ot.k * (wt.shiftKey ? 0.5 : 2), + Nt = nt(xt(vt(Ot, Ft), Wt, zt), et.apply(this, It), at) + noevent(wt), + st > 0 + ? select(this).transition().duration(st).call(St, Nt, Wt, wt) + : select(this).call(bt.transform, Nt, Wt, wt) + } + } + function jt(wt, ...It) { + if (tt.apply(this, arguments)) { + var Ot = wt.touches, + Wt = Ot.length, + zt = Tt(this, It, wt.changedTouches.length === Wt).event(wt), + Ft, + Nt, + Ut, + Mt + for (nopropagation(wt), Nt = 0; Nt < Wt; ++Nt) + (Ut = Ot[Nt]), + (Mt = pointer(Ut, this)), + (Mt = [Mt, this.__zoom.invert(Mt), Ut.identifier]), + zt.touch0 + ? !zt.touch1 && zt.touch0[2] !== Mt[2] && ((zt.touch1 = Mt), (zt.taps = 0)) + : ((zt.touch0 = Mt), (Ft = !0), (zt.taps = 1 + !!ut)) + ut && (ut = clearTimeout(ut)), + Ft && + (zt.taps < 2 && + ((ht = Mt[0]), + (ut = setTimeout(function () { + ut = null + }, pt))), + interrupt(this), + zt.start()) + } + } + function Pt(wt, ...It) { + if (this.__zooming) { + var Ot = Tt(this, It).event(wt), + Wt = wt.changedTouches, + zt = Wt.length, + Ft, + Nt, + Ut, + Mt + for (noevent(wt), Ft = 0; Ft < zt; ++Ft) + (Nt = Wt[Ft]), + (Ut = pointer(Nt, this)), + Ot.touch0 && Ot.touch0[2] === Nt.identifier + ? (Ot.touch0[0] = Ut) + : Ot.touch1 && Ot.touch1[2] === Nt.identifier && (Ot.touch1[0] = Ut) + if (((Nt = Ot.that.__zoom), Ot.touch1)) { + var Ht = Ot.touch0[0], + en = Ot.touch0[1], + sn = Ot.touch1[0], + Kt = Ot.touch1[1], + rn = (rn = sn[0] - Ht[0]) * rn + (rn = sn[1] - Ht[1]) * rn, + nn = (nn = Kt[0] - en[0]) * nn + (nn = Kt[1] - en[1]) * nn + ;(Nt = vt(Nt, Math.sqrt(rn / nn))), + (Ut = [(Ht[0] + sn[0]) / 2, (Ht[1] + sn[1]) / 2]), + (Mt = [(en[0] + Kt[0]) / 2, (en[1] + Kt[1]) / 2]) + } else if (Ot.touch0) (Ut = Ot.touch0[0]), (Mt = Ot.touch0[1]) + else return + Ot.zoom('touch', nt(xt(Nt, Ut, Mt), Ot.extent, at)) + } + } + function Ct(wt, ...It) { + if (this.__zooming) { + var Ot = Tt(this, It).event(wt), + Wt = wt.changedTouches, + zt = Wt.length, + Ft, + Nt + for ( + nopropagation(wt), + dt && clearTimeout(dt), + dt = setTimeout(function () { + dt = null + }, pt), + Ft = 0; + Ft < zt; + ++Ft + ) + (Nt = Wt[Ft]), + Ot.touch0 && Ot.touch0[2] === Nt.identifier + ? delete Ot.touch0 + : Ot.touch1 && Ot.touch1[2] === Nt.identifier && delete Ot.touch1 + if ((Ot.touch1 && !Ot.touch0 && ((Ot.touch0 = Ot.touch1), delete Ot.touch1), Ot.touch0)) + Ot.touch0[1] = this.__zoom.invert(Ot.touch0[0]) + else if ( + (Ot.end(), Ot.taps === 2 && ((Nt = pointer(Nt, this)), Math.hypot(ht[0] - Nt[0], ht[1] - Nt[1]) < yt)) + ) { + var Ut = select(this).on('dblclick.zoom') + Ut && Ut.apply(this, arguments) + } + } + } + return ( + (bt.wheelDelta = function (wt) { + return arguments.length ? ((rt = typeof wt == 'function' ? wt : constant(+wt)), bt) : rt + }), + (bt.filter = function (wt) { + return arguments.length ? ((tt = typeof wt == 'function' ? wt : constant(!!wt)), bt) : tt + }), + (bt.touchable = function (wt) { + return arguments.length ? ((it = typeof wt == 'function' ? wt : constant(!!wt)), bt) : it + }), + (bt.extent = function (wt) { + return arguments.length + ? ((et = + typeof wt == 'function' + ? wt + : constant([ + [+wt[0][0], +wt[0][1]], + [+wt[1][0], +wt[1][1]], + ])), + bt) + : et + }), + (bt.scaleExtent = function (wt) { + return arguments.length ? ((ot[0] = +wt[0]), (ot[1] = +wt[1]), bt) : [ot[0], ot[1]] + }), + (bt.translateExtent = function (wt) { + return arguments.length + ? ((at[0][0] = +wt[0][0]), (at[1][0] = +wt[1][0]), (at[0][1] = +wt[0][1]), (at[1][1] = +wt[1][1]), bt) + : [ + [at[0][0], at[0][1]], + [at[1][0], at[1][1]], + ] + }), + (bt.constrain = function (wt) { + return arguments.length ? ((nt = wt), bt) : nt + }), + (bt.duration = function (wt) { + return arguments.length ? ((st = +wt), bt) : st + }), + (bt.interpolate = function (wt) { + return arguments.length ? ((lt = wt), bt) : lt + }), + (bt.on = function () { + var wt = ct.on.apply(ct, arguments) + return wt === ct ? bt : wt + }), + (bt.clickDistance = function (wt) { + return arguments.length ? ((gt = (wt = +wt) * wt), bt) : Math.sqrt(gt) + }), + (bt.tapDistance = function (wt) { + return arguments.length ? ((yt = +wt), bt) : yt + }), + bt + ) + } + const StoreContext = reactExports.createContext(null), + Provider$1 = StoreContext.Provider, + errorMessages = { + error001: () => + '[React Flow]: Seems like you have not used zustand provider as an ancestor. Help: https://reactflow.dev/error#001', + error002: () => + "It looks like you've created a new nodeTypes or edgeTypes object. If this wasn't on purpose please define the nodeTypes/edgeTypes outside of the component or memoize them.", + error003: (tt) => `Node type "${tt}" not found. Using fallback type "default".`, + error004: () => 'The React Flow parent container needs a width and a height to render the graph.', + error005: () => 'Only child nodes can use a parent extent.', + error006: () => "Can't create edge. An edge needs a source and a target.", + error007: (tt) => `The old edge with id=${tt} does not exist.`, + error009: (tt) => `Marker type "${tt}" doesn't exist.`, + error008: (tt, et) => + `Couldn't create edge for ${tt ? 'target' : 'source'} handle id: "${ + tt ? et.targetHandle : et.sourceHandle + }", edge id: ${et.id}.`, + error010: () => 'Handle: No node id found. Make sure to only use a Handle inside a custom Node.', + error011: (tt) => `Edge type "${tt}" not found. Using fallback type "default".`, + error012: (tt) => + `Node with id "${tt}" does not exist, it may have been removed. This can happen when a node is deleted before the "onNodeClick" handler is called.`, + }, + zustandErrorMessage = errorMessages.error001() + function useStore(tt, et) { + const nt = reactExports.useContext(StoreContext) + if (nt === null) throw new Error(zustandErrorMessage) + return useStoreWithEqualityFn(nt, tt, et) + } + const useStoreApi = () => { + const tt = reactExports.useContext(StoreContext) + if (tt === null) throw new Error(zustandErrorMessage) + return reactExports.useMemo( + () => ({ getState: tt.getState, setState: tt.setState, subscribe: tt.subscribe, destroy: tt.destroy }), + [tt], + ) + }, + selector$g = (tt) => (tt.userSelectionActive ? 'none' : 'all') + function Panel({ position: tt, children: et, className: nt, style: rt, ...it }) { + const ot = useStore(selector$g), + at = `${tt}`.split('-') + return React$1.createElement( + 'div', + { className: cc(['react-flow__panel', nt, ...at]), style: { ...rt, pointerEvents: ot }, ...it }, + et, + ) + } + function Attribution({ proOptions: tt, position: et = 'bottom-right' }) { + return tt != null && tt.hideAttribution + ? null + : React$1.createElement( + Panel, + { + position: et, + className: 'react-flow__attribution', + 'data-message': + 'Please only hide this attribution when you are subscribed to React Flow Pro: https://pro.reactflow.dev', + }, + React$1.createElement( + 'a', + { + href: 'https://reactflow.dev', + target: '_blank', + rel: 'noopener noreferrer', + 'aria-label': 'React Flow attribution', + }, + 'React Flow', + ), + ) + } + const EdgeText = ({ + x: tt, + y: et, + label: nt, + labelStyle: rt = {}, + labelShowBg: it = !0, + labelBgStyle: ot = {}, + labelBgPadding: at = [2, 4], + labelBgBorderRadius: st = 2, + children: lt, + className: ct, + ...ut + }) => { + const ht = reactExports.useRef(null), + [dt, pt] = reactExports.useState({ x: 0, y: 0, width: 0, height: 0 }), + mt = cc(['react-flow__edge-textwrapper', ct]) + return ( + reactExports.useEffect(() => { + if (ht.current) { + const gt = ht.current.getBBox() + pt({ x: gt.x, y: gt.y, width: gt.width, height: gt.height }) + } + }, [nt]), + typeof nt > 'u' || !nt + ? null + : React$1.createElement( + 'g', + { + transform: `translate(${tt - dt.width / 2} ${et - dt.height / 2})`, + className: mt, + visibility: dt.width ? 'visible' : 'hidden', + ...ut, + }, + it && + React$1.createElement('rect', { + width: dt.width + 2 * at[0], + x: -at[0], + y: -at[1], + height: dt.height + 2 * at[1], + className: 'react-flow__edge-textbg', + style: ot, + rx: st, + ry: st, + }), + React$1.createElement( + 'text', + { className: 'react-flow__edge-text', y: dt.height / 2, dy: '0.3em', ref: ht, style: rt }, + nt, + ), + lt, + ) + ) + } + var EdgeText$1 = reactExports.memo(EdgeText) + const getDimensions = (tt) => ({ width: tt.offsetWidth, height: tt.offsetHeight }), + clamp = (tt, et = 0, nt = 1) => Math.min(Math.max(tt, et), nt), + clampPosition = (tt = { x: 0, y: 0 }, et) => ({ + x: clamp(tt.x, et[0][0], et[1][0]), + y: clamp(tt.y, et[0][1], et[1][1]), + }), + calcAutoPanVelocity = (tt, et, nt) => + tt < et ? clamp(Math.abs(tt - et), 1, 50) / 50 : tt > nt ? -clamp(Math.abs(tt - nt), 1, 50) / 50 : 0, + calcAutoPan = (tt, et) => { + const nt = calcAutoPanVelocity(tt.x, 35, et.width - 35) * 20, + rt = calcAutoPanVelocity(tt.y, 35, et.height - 35) * 20 + return [nt, rt] + }, + getHostForElement = (tt) => { + var et + return ((et = tt.getRootNode) == null ? void 0 : et.call(tt)) || (window == null ? void 0 : window.document) + }, + getBoundsOfBoxes = (tt, et) => ({ + x: Math.min(tt.x, et.x), + y: Math.min(tt.y, et.y), + x2: Math.max(tt.x2, et.x2), + y2: Math.max(tt.y2, et.y2), + }), + rectToBox = ({ x: tt, y: et, width: nt, height: rt }) => ({ x: tt, y: et, x2: tt + nt, y2: et + rt }), + boxToRect = ({ x: tt, y: et, x2: nt, y2: rt }) => ({ x: tt, y: et, width: nt - tt, height: rt - et }), + nodeToRect = (tt) => ({ ...(tt.positionAbsolute || { x: 0, y: 0 }), width: tt.width || 0, height: tt.height || 0 }), + getOverlappingArea = (tt, et) => { + const nt = Math.max(0, Math.min(tt.x + tt.width, et.x + et.width) - Math.max(tt.x, et.x)), + rt = Math.max(0, Math.min(tt.y + tt.height, et.y + et.height) - Math.max(tt.y, et.y)) + return Math.ceil(nt * rt) + }, + isRectObject = (tt) => isNumeric(tt.width) && isNumeric(tt.height) && isNumeric(tt.x) && isNumeric(tt.y), + isNumeric = (tt) => !isNaN(tt) && isFinite(tt), + internalsSymbol = Symbol.for('internals'), + elementSelectionKeys = ['Enter', ' ', 'Escape'], + devWarn = (tt, et) => {}, + isReactKeyboardEvent = (tt) => 'nativeEvent' in tt + function isInputDOMNode(tt) { + var it, ot + const et = isReactKeyboardEvent(tt) ? tt.nativeEvent : tt, + nt = ((ot = (it = et.composedPath) == null ? void 0 : it.call(et)) == null ? void 0 : ot[0]) || tt.target + return ( + ['INPUT', 'SELECT', 'TEXTAREA'].includes(nt == null ? void 0 : nt.nodeName) || + (nt == null ? void 0 : nt.hasAttribute('contenteditable')) || + !!(nt != null && nt.closest('.nokey')) + ) + } + const isMouseEvent = (tt) => 'clientX' in tt, + getEventPosition = (tt, et) => { + var ot, at + const nt = isMouseEvent(tt), + rt = nt ? tt.clientX : (ot = tt.touches) == null ? void 0 : ot[0].clientX, + it = nt ? tt.clientY : (at = tt.touches) == null ? void 0 : at[0].clientY + return { x: rt - ((et == null ? void 0 : et.left) ?? 0), y: it - ((et == null ? void 0 : et.top) ?? 0) } + }, + isMacOs = () => { + var tt + return ( + typeof navigator < 'u' && + ((tt = navigator == null ? void 0 : navigator.userAgent) == null ? void 0 : tt.indexOf('Mac')) >= 0 + ) + }, + BaseEdge = ({ + id: tt, + path: et, + labelX: nt, + labelY: rt, + label: it, + labelStyle: ot, + labelShowBg: at, + labelBgStyle: st, + labelBgPadding: lt, + labelBgBorderRadius: ct, + style: ut, + markerEnd: ht, + markerStart: dt, + interactionWidth: pt = 20, + }) => + React$1.createElement( + React$1.Fragment, + null, + React$1.createElement('path', { + id: tt, + style: ut, + d: et, + fill: 'none', + className: 'react-flow__edge-path', + markerEnd: ht, + markerStart: dt, + }), + pt && + React$1.createElement('path', { + d: et, + fill: 'none', + strokeOpacity: 0, + strokeWidth: pt, + className: 'react-flow__edge-interaction', + }), + it && isNumeric(nt) && isNumeric(rt) + ? React$1.createElement(EdgeText$1, { + x: nt, + y: rt, + label: it, + labelStyle: ot, + labelShowBg: at, + labelBgStyle: st, + labelBgPadding: lt, + labelBgBorderRadius: ct, + }) + : null, + ) + BaseEdge.displayName = 'BaseEdge' + function getMouseHandler$1(tt, et, nt) { + return nt === void 0 + ? nt + : (rt) => { + const it = et().edges.find((ot) => ot.id === tt) + it && nt(rt, { ...it }) } - #include - if (gammaCorrection) { - gl_FragColor = LinearTosRGB(gl_FragColor); + } + function getEdgeCenter({ sourceX: tt, sourceY: et, targetX: nt, targetY: rt }) { + const it = Math.abs(nt - tt) / 2, + ot = nt < tt ? nt + it : nt - it, + at = Math.abs(rt - et) / 2, + st = rt < et ? rt + at : rt - at + return [ot, st, it, at] + } + function getBezierEdgeCenter({ + sourceX: tt, + sourceY: et, + targetX: nt, + targetY: rt, + sourceControlX: it, + sourceControlY: ot, + targetControlX: at, + targetControlY: st, + }) { + const lt = tt * 0.125 + it * 0.375 + at * 0.375 + nt * 0.125, + ct = et * 0.125 + ot * 0.375 + st * 0.375 + rt * 0.125, + ut = Math.abs(lt - tt), + ht = Math.abs(ct - et) + return [lt, ct, ut, ht] + } + var ConnectionMode + ;(function (tt) { + ;(tt.Strict = 'strict'), (tt.Loose = 'loose') + })(ConnectionMode || (ConnectionMode = {})) + var PanOnScrollMode + ;(function (tt) { + ;(tt.Free = 'free'), (tt.Vertical = 'vertical'), (tt.Horizontal = 'horizontal') + })(PanOnScrollMode || (PanOnScrollMode = {})) + var SelectionMode + ;(function (tt) { + ;(tt.Partial = 'partial'), (tt.Full = 'full') + })(SelectionMode || (SelectionMode = {})) + var ConnectionLineType + ;(function (tt) { + ;(tt.Bezier = 'default'), + (tt.Straight = 'straight'), + (tt.Step = 'step'), + (tt.SmoothStep = 'smoothstep'), + (tt.SimpleBezier = 'simplebezier') + })(ConnectionLineType || (ConnectionLineType = {})) + var MarkerType + ;(function (tt) { + ;(tt.Arrow = 'arrow'), (tt.ArrowClosed = 'arrowclosed') + })(MarkerType || (MarkerType = {})) + var Position + ;(function (tt) { + ;(tt.Left = 'left'), (tt.Top = 'top'), (tt.Right = 'right'), (tt.Bottom = 'bottom') + })(Position || (Position = {})) + function getControl({ pos: tt, x1: et, y1: nt, x2: rt, y2: it }) { + return tt === Position.Left || tt === Position.Right ? [0.5 * (et + rt), nt] : [et, 0.5 * (nt + it)] + } + function getSimpleBezierPath({ + sourceX: tt, + sourceY: et, + sourcePosition: nt = Position.Bottom, + targetX: rt, + targetY: it, + targetPosition: ot = Position.Top, + }) { + const [at, st] = getControl({ pos: nt, x1: tt, y1: et, x2: rt, y2: it }), + [lt, ct] = getControl({ pos: ot, x1: rt, y1: it, x2: tt, y2: et }), + [ut, ht, dt, pt] = getBezierEdgeCenter({ + sourceX: tt, + sourceY: et, + targetX: rt, + targetY: it, + sourceControlX: at, + sourceControlY: st, + targetControlX: lt, + targetControlY: ct, + }) + return [`M${tt},${et} C${at},${st} ${lt},${ct} ${rt},${it}`, ut, ht, dt, pt] + } + const SimpleBezierEdge = reactExports.memo( + ({ + sourceX: tt, + sourceY: et, + targetX: nt, + targetY: rt, + sourcePosition: it = Position.Bottom, + targetPosition: ot = Position.Top, + label: at, + labelStyle: st, + labelShowBg: lt, + labelBgStyle: ct, + labelBgPadding: ut, + labelBgBorderRadius: ht, + style: dt, + markerEnd: pt, + markerStart: mt, + interactionWidth: gt, + }) => { + const [yt, bt, vt] = getSimpleBezierPath({ + sourceX: tt, + sourceY: et, + sourcePosition: it, + targetX: nt, + targetY: rt, + targetPosition: ot, + }) + return React$1.createElement(BaseEdge, { + path: yt, + labelX: bt, + labelY: vt, + label: at, + labelStyle: st, + labelShowBg: lt, + labelBgStyle: ct, + labelBgPadding: ut, + labelBgBorderRadius: ht, + style: dt, + markerEnd: pt, + markerStart: mt, + interactionWidth: gt, + }) + }, + ) + SimpleBezierEdge.displayName = 'SimpleBezierEdge' + const handleDirections = { + [Position.Left]: { x: -1, y: 0 }, + [Position.Right]: { x: 1, y: 0 }, + [Position.Top]: { x: 0, y: -1 }, + [Position.Bottom]: { x: 0, y: 1 }, + }, + getDirection = ({ source: tt, sourcePosition: et = Position.Bottom, target: nt }) => + et === Position.Left || et === Position.Right + ? tt.x < nt.x + ? { x: 1, y: 0 } + : { x: -1, y: 0 } + : tt.y < nt.y + ? { x: 0, y: 1 } + : { x: 0, y: -1 }, + distance = (tt, et) => Math.sqrt(Math.pow(et.x - tt.x, 2) + Math.pow(et.y - tt.y, 2)) + function getPoints({ + source: tt, + sourcePosition: et = Position.Bottom, + target: nt, + targetPosition: rt = Position.Top, + center: it, + offset: ot, + }) { + const at = handleDirections[et], + st = handleDirections[rt], + lt = { x: tt.x + at.x * ot, y: tt.y + at.y * ot }, + ct = { x: nt.x + st.x * ot, y: nt.y + st.y * ot }, + ut = getDirection({ source: lt, sourcePosition: et, target: ct }), + ht = ut.x !== 0 ? 'x' : 'y', + dt = ut[ht] + let pt = [], + mt, + gt + const yt = { x: 0, y: 0 }, + bt = { x: 0, y: 0 }, + [vt, xt, kt, St] = getEdgeCenter({ sourceX: tt.x, sourceY: tt.y, targetX: nt.x, targetY: nt.y }) + if (at[ht] * st[ht] === -1) { + ;(mt = it.x || vt), (gt = it.y || xt) + const At = [ + { x: mt, y: lt.y }, + { x: mt, y: ct.y }, + ], + Et = [ + { x: lt.x, y: gt }, + { x: ct.x, y: gt }, + ] + at[ht] === dt ? (pt = ht === 'x' ? At : Et) : (pt = ht === 'x' ? Et : At) + } else { + const At = [{ x: lt.x, y: ct.y }], + Et = [{ x: ct.x, y: lt.y }] + if ((ht === 'x' ? (pt = at.x === dt ? Et : At) : (pt = at.y === dt ? At : Et), et === rt)) { + const Ct = Math.abs(tt[ht] - nt[ht]) + if (Ct <= ot) { + const wt = Math.min(ot - 1, ot - Ct) + at[ht] === dt ? (yt[ht] = (lt[ht] > tt[ht] ? -1 : 1) * wt) : (bt[ht] = (ct[ht] > nt[ht] ? -1 : 1) * wt) } + } + if (et !== rt) { + const Ct = ht === 'x' ? 'y' : 'x', + wt = at[ht] === st[Ct], + It = lt[Ct] > ct[Ct], + Ot = lt[Ct] < ct[Ct] + ;((at[ht] === 1 && ((!wt && It) || (wt && Ot))) || (at[ht] !== 1 && ((!wt && Ot) || (wt && It)))) && + (pt = ht === 'x' ? At : Et) + } + const $t = { x: lt.x + yt.x, y: lt.y + yt.y }, + Dt = { x: ct.x + bt.x, y: ct.y + bt.y }, + jt = Math.max(Math.abs($t.x - pt[0].x), Math.abs(Dt.x - pt[0].x)), + Pt = Math.max(Math.abs($t.y - pt[0].y), Math.abs(Dt.y - pt[0].y)) + jt >= Pt ? ((mt = ($t.x + Dt.x) / 2), (gt = pt[0].y)) : ((mt = pt[0].x), (gt = ($t.y + Dt.y) / 2)) } - `},$e52378cd0f5a973d$export$57856b59f317262e={uniforms:{sceneDiffuse:{value:null},sceneDepth:{value:null},tDiffuse:{value:null},projMat:{value:new Matrix4},viewMat:{value:new Matrix4},projectionMatrixInv:{value:new Matrix4},viewMatrixInv:{value:new Matrix4},cameraPos:{value:new Vector3},resolution:{value:new Vector2},time:{value:0},r:{value:5},blueNoise:{value:null},radius:{value:12},worldRadius:{value:5},index:{value:0},poissonDisk:{value:[]},distanceFalloff:{value:1},near:{value:.1},far:{value:1e3},logDepth:{value:!1},screenSpaceRadius:{value:!1}},vertexShader:` - varying vec2 vUv; - void main() { - vUv = uv; - gl_Position = vec4(position, 1.0); - }`,fragmentShader:` - uniform sampler2D sceneDiffuse; - uniform highp sampler2D sceneDepth; - uniform sampler2D tDiffuse; - uniform sampler2D blueNoise; - uniform mat4 projectionMatrixInv; - uniform mat4 viewMatrixInv; - uniform vec2 resolution; - uniform float r; - uniform float radius; - uniform float worldRadius; - uniform float index; - uniform float near; - uniform float far; - uniform float distanceFalloff; - uniform bool logDepth; - uniform bool screenSpaceRadius; - varying vec2 vUv; - - highp float linearize_depth(highp float d, highp float zNear,highp float zFar) - { - highp float z_n = 2.0 * d - 1.0; - return 2.0 * zNear * zFar / (zFar + zNear - z_n * (zFar - zNear)); + return [[tt, { x: lt.x + yt.x, y: lt.y + yt.y }, ...pt, { x: ct.x + bt.x, y: ct.y + bt.y }, nt], mt, gt, kt, St] + } + function getBend(tt, et, nt, rt) { + const it = Math.min(distance(tt, et) / 2, distance(et, nt) / 2, rt), + { x: ot, y: at } = et + if ((tt.x === ot && ot === nt.x) || (tt.y === at && at === nt.y)) return `L${ot} ${at}` + if (tt.y === at) { + const ct = tt.x < nt.x ? -1 : 1, + ut = tt.y < nt.y ? 1 : -1 + return `L ${ot + it * ct},${at}Q ${ot},${at} ${ot},${at + it * ut}` } - highp float linearize_depth_log(highp float d, highp float nearZ,highp float farZ) { - float depth = pow(2.0, d * log2(farZ + 1.0)) - 1.0; - float a = farZ / (farZ - nearZ); - float b = farZ * nearZ / (nearZ - farZ); - float linDepth = a + b / depth; - return linearize_depth(linDepth, nearZ, farZ); - } - highp float linearize_depth_ortho(highp float d, highp float nearZ, highp float farZ) { - return nearZ + (farZ - nearZ) * d; - } - vec3 getWorldPosLog(vec3 posS) { - vec2 uv = posS.xy; - float z = posS.z; - float nearZ =near; - float farZ = far; - float depth = pow(2.0, z * log2(farZ + 1.0)) - 1.0; - float a = farZ / (farZ - nearZ); - float b = farZ * nearZ / (nearZ - farZ); - float linDepth = a + b / depth; - vec4 clipVec = vec4(uv, linDepth, 1.0) * 2.0 - 1.0; - vec4 wpos = projectionMatrixInv * clipVec; - return wpos.xyz / wpos.w; - } - vec3 getWorldPos(float depth, vec2 coord) { - #ifdef LOGDEPTH - return getWorldPosLog(vec3(coord, depth)); - #endif - - float z = depth * 2.0 - 1.0; - vec4 clipSpacePosition = vec4(coord * 2.0 - 1.0, z, 1.0); - vec4 viewSpacePosition = projectionMatrixInv * clipSpacePosition; - // Perspective division - vec4 worldSpacePosition = viewSpacePosition; - worldSpacePosition.xyz /= worldSpacePosition.w; - return worldSpacePosition.xyz; + const st = tt.x < nt.x ? 1 : -1, + lt = tt.y < nt.y ? -1 : 1 + return `L ${ot},${at + it * lt}Q ${ot},${at} ${ot + it * st},${at}` + } + function getSmoothStepPath({ + sourceX: tt, + sourceY: et, + sourcePosition: nt = Position.Bottom, + targetX: rt, + targetY: it, + targetPosition: ot = Position.Top, + borderRadius: at = 5, + centerX: st, + centerY: lt, + offset: ct = 20, + }) { + const [ut, ht, dt, pt, mt] = getPoints({ + source: { x: tt, y: et }, + sourcePosition: nt, + target: { x: rt, y: it }, + targetPosition: ot, + center: { x: st, y: lt }, + offset: ct, + }) + return [ + ut.reduce((yt, bt, vt) => { + let xt = '' + return ( + vt > 0 && vt < ut.length - 1 + ? (xt = getBend(ut[vt - 1], bt, ut[vt + 1], at)) + : (xt = `${vt === 0 ? 'M' : 'L'}${bt.x} ${bt.y}`), + (yt += xt), + yt + ) + }, ''), + ht, + dt, + pt, + mt, + ] + } + const SmoothStepEdge = reactExports.memo( + ({ + sourceX: tt, + sourceY: et, + targetX: nt, + targetY: rt, + label: it, + labelStyle: ot, + labelShowBg: at, + labelBgStyle: st, + labelBgPadding: lt, + labelBgBorderRadius: ct, + style: ut, + sourcePosition: ht = Position.Bottom, + targetPosition: dt = Position.Top, + markerEnd: pt, + markerStart: mt, + pathOptions: gt, + interactionWidth: yt, + }) => { + const [bt, vt, xt] = getSmoothStepPath({ + sourceX: tt, + sourceY: et, + sourcePosition: ht, + targetX: nt, + targetY: rt, + targetPosition: dt, + borderRadius: gt == null ? void 0 : gt.borderRadius, + offset: gt == null ? void 0 : gt.offset, + }) + return React$1.createElement(BaseEdge, { + path: bt, + labelX: vt, + labelY: xt, + label: it, + labelStyle: ot, + labelShowBg: at, + labelBgStyle: st, + labelBgPadding: lt, + labelBgBorderRadius: ct, + style: ut, + markerEnd: pt, + markerStart: mt, + interactionWidth: yt, + }) + }, + ) + SmoothStepEdge.displayName = 'SmoothStepEdge' + const StepEdge = reactExports.memo((tt) => { + var et + return React$1.createElement(SmoothStepEdge, { + ...tt, + pathOptions: reactExports.useMemo(() => { + var nt + return { borderRadius: 0, offset: (nt = tt.pathOptions) == null ? void 0 : nt.offset } + }, [(et = tt.pathOptions) == null ? void 0 : et.offset]), + }) + }) + StepEdge.displayName = 'StepEdge' + function getStraightPath({ sourceX: tt, sourceY: et, targetX: nt, targetY: rt }) { + const [it, ot, at, st] = getEdgeCenter({ sourceX: tt, sourceY: et, targetX: nt, targetY: rt }) + return [`M ${tt},${et}L ${nt},${rt}`, it, ot, at, st] + } + const StraightEdge = reactExports.memo( + ({ + sourceX: tt, + sourceY: et, + targetX: nt, + targetY: rt, + label: it, + labelStyle: ot, + labelShowBg: at, + labelBgStyle: st, + labelBgPadding: lt, + labelBgBorderRadius: ct, + style: ut, + markerEnd: ht, + markerStart: dt, + interactionWidth: pt, + }) => { + const [mt, gt, yt] = getStraightPath({ sourceX: tt, sourceY: et, targetX: nt, targetY: rt }) + return React$1.createElement(BaseEdge, { + path: mt, + labelX: gt, + labelY: yt, + label: it, + labelStyle: ot, + labelShowBg: at, + labelBgStyle: st, + labelBgPadding: lt, + labelBgBorderRadius: ct, + style: ut, + markerEnd: ht, + markerStart: dt, + interactionWidth: pt, + }) + }, + ) + StraightEdge.displayName = 'StraightEdge' + function calculateControlOffset(tt, et) { + return tt >= 0 ? 0.5 * tt : et * 25 * Math.sqrt(-tt) + } + function getControlWithCurvature({ pos: tt, x1: et, y1: nt, x2: rt, y2: it, c: ot }) { + switch (tt) { + case Position.Left: + return [et - calculateControlOffset(et - rt, ot), nt] + case Position.Right: + return [et + calculateControlOffset(rt - et, ot), nt] + case Position.Top: + return [et, nt - calculateControlOffset(nt - it, ot)] + case Position.Bottom: + return [et, nt + calculateControlOffset(it - nt, ot)] } - #include - #define NUM_SAMPLES 16 - uniform vec2 poissonDisk[NUM_SAMPLES]; - void main() { - const float pi = 3.14159; - vec2 texelSize = vec2(1.0 / resolution.x, 1.0 / resolution.y); - vec2 uv = vUv; - vec4 data = texture2D(tDiffuse, vUv); - float occlusion = data.a; - float baseOcc = data.a; - vec3 normal = data.rgb * 2.0 - 1.0; - float count = 1.0; - float d = texture2D(sceneDepth, vUv).x; - if (d == 1.0) { - gl_FragColor = data; - return; - } - vec3 worldPos = getWorldPos(d, vUv); - float size = radius; - float angle; - if (index == 0.0) { - angle = texture2D(blueNoise, gl_FragCoord.xy / 128.0).x * PI2; - } else if (index == 1.0) { - angle = texture2D(blueNoise, gl_FragCoord.xy / 128.0).y * PI2; - } else if (index == 2.0) { - angle = texture2D(blueNoise, gl_FragCoord.xy / 128.0).z * PI2; - } else { - angle = texture2D(blueNoise, gl_FragCoord.xy / 128.0).w * PI2; - } - - mat2 rotationMatrix = mat2(cos(angle), -sin(angle), sin(angle), cos(angle)); - float radiusToUse = screenSpaceRadius ? distance( - worldPos, - getWorldPos(d, vUv + - vec2(worldRadius, 0.0) / resolution) - ) : worldRadius; - float distanceFalloffToUse =screenSpaceRadius ? - radiusToUse * distanceFalloff - : distanceFalloff; - - - for(int i = 0; i < NUM_SAMPLES; i++) { - vec2 offset = (rotationMatrix * poissonDisk[i]) * texelSize * size; - vec4 dataSample = texture2D(tDiffuse, uv + offset); - float occSample = dataSample.a; - vec3 normalSample = dataSample.rgb * 2.0 - 1.0; - float dSample = texture2D(sceneDepth, uv + offset).x; - vec3 worldPosSample = getWorldPos(dSample, uv + offset); - float tangentPlaneDist = abs(dot(worldPos - worldPosSample, normal)); - float rangeCheck = dSample == 1.0 ? 0.0 :exp(-1.0 * tangentPlaneDist * (1.0 / distanceFalloffToUse)) * max(dot(normal, normalSample), 0.0) * (1.0 - abs(occSample - baseOcc)); - occlusion += occSample * rangeCheck; - count += rangeCheck; + } + function getBezierPath({ + sourceX: tt, + sourceY: et, + sourcePosition: nt = Position.Bottom, + targetX: rt, + targetY: it, + targetPosition: ot = Position.Top, + curvature: at = 0.25, + }) { + const [st, lt] = getControlWithCurvature({ pos: nt, x1: tt, y1: et, x2: rt, y2: it, c: at }), + [ct, ut] = getControlWithCurvature({ pos: ot, x1: rt, y1: it, x2: tt, y2: et, c: at }), + [ht, dt, pt, mt] = getBezierEdgeCenter({ + sourceX: tt, + sourceY: et, + targetX: rt, + targetY: it, + sourceControlX: st, + sourceControlY: lt, + targetControlX: ct, + targetControlY: ut, + }) + return [`M${tt},${et} C${st},${lt} ${ct},${ut} ${rt},${it}`, ht, dt, pt, mt] + } + const BezierEdge = reactExports.memo( + ({ + sourceX: tt, + sourceY: et, + targetX: nt, + targetY: rt, + sourcePosition: it = Position.Bottom, + targetPosition: ot = Position.Top, + label: at, + labelStyle: st, + labelShowBg: lt, + labelBgStyle: ct, + labelBgPadding: ut, + labelBgBorderRadius: ht, + style: dt, + markerEnd: pt, + markerStart: mt, + pathOptions: gt, + interactionWidth: yt, + }) => { + const [bt, vt, xt] = getBezierPath({ + sourceX: tt, + sourceY: et, + sourcePosition: it, + targetX: nt, + targetY: rt, + targetPosition: ot, + curvature: gt == null ? void 0 : gt.curvature, + }) + return React$1.createElement(BaseEdge, { + path: bt, + labelX: vt, + labelY: xt, + label: at, + labelStyle: st, + labelShowBg: lt, + labelBgStyle: ct, + labelBgPadding: ut, + labelBgBorderRadius: ht, + style: dt, + markerEnd: pt, + markerStart: mt, + interactionWidth: yt, + }) + }, + ) + BezierEdge.displayName = 'BezierEdge' + const NodeIdContext = reactExports.createContext(null), + Provider = NodeIdContext.Provider + NodeIdContext.Consumer + const useNodeId = () => reactExports.useContext(NodeIdContext), + isEdge = (tt) => 'id' in tt && 'source' in tt && 'target' in tt, + getEdgeId = ({ source: tt, sourceHandle: et, target: nt, targetHandle: rt }) => + `reactflow__edge-${tt}${et || ''}-${nt}${rt || ''}`, + getMarkerId = (tt, et) => + typeof tt > 'u' + ? '' + : typeof tt == 'string' + ? tt + : `${et ? `${et}__` : ''}${Object.keys(tt) + .sort() + .map((rt) => `${rt}=${tt[rt]}`) + .join('&')}`, + connectionExists = (tt, et) => + et.some( + (nt) => + nt.source === tt.source && + nt.target === tt.target && + (nt.sourceHandle === tt.sourceHandle || (!nt.sourceHandle && !tt.sourceHandle)) && + (nt.targetHandle === tt.targetHandle || (!nt.targetHandle && !tt.targetHandle)), + ), + addEdge = (tt, et) => { + if (!tt.source || !tt.target) return et + let nt + return ( + isEdge(tt) ? (nt = { ...tt }) : (nt = { ...tt, id: getEdgeId(tt) }), + connectionExists(nt, et) ? et : et.concat(nt) + ) + }, + pointToRendererPoint = ({ x: tt, y: et }, [nt, rt, it], ot, [at, st]) => { + const lt = { x: (tt - nt) / it, y: (et - rt) / it } + return ot ? { x: at * Math.round(lt.x / at), y: st * Math.round(lt.y / st) } : lt + }, + rendererPointToPoint = ({ x: tt, y: et }, [nt, rt, it]) => ({ x: tt * it + nt, y: et * it + rt }), + getNodePositionWithOrigin = (tt, et = [0, 0]) => { + if (!tt) return { x: 0, y: 0, positionAbsolute: { x: 0, y: 0 } } + const nt = (tt.width ?? 0) * et[0], + rt = (tt.height ?? 0) * et[1], + it = { x: tt.position.x - nt, y: tt.position.y - rt } + return { + ...it, + positionAbsolute: tt.positionAbsolute ? { x: tt.positionAbsolute.x - nt, y: tt.positionAbsolute.y - rt } : it, + } + }, + getRectOfNodes = (tt, et = [0, 0]) => { + if (tt.length === 0) return { x: 0, y: 0, width: 0, height: 0 } + const nt = tt.reduce( + (rt, it) => { + const { x: ot, y: at } = getNodePositionWithOrigin(it, et).positionAbsolute + return getBoundsOfBoxes(rt, rectToBox({ x: ot, y: at, width: it.width || 0, height: it.height || 0 })) + }, + { x: 1 / 0, y: 1 / 0, x2: -1 / 0, y2: -1 / 0 }, + ) + return boxToRect(nt) + }, + getNodesInside = (tt, et, [nt, rt, it] = [0, 0, 1], ot = !1, at = !1, st = [0, 0]) => { + const lt = { x: (et.x - nt) / it, y: (et.y - rt) / it, width: et.width / it, height: et.height / it }, + ct = [] + return ( + tt.forEach((ut) => { + const { width: ht, height: dt, selectable: pt = !0, hidden: mt = !1 } = ut + if ((at && !pt) || mt) return !1 + const { positionAbsolute: gt } = getNodePositionWithOrigin(ut, st), + yt = { x: gt.x, y: gt.y, width: ht || 0, height: dt || 0 }, + bt = getOverlappingArea(lt, yt), + vt = typeof ht > 'u' || typeof dt > 'u' || ht === null || dt === null, + xt = ot && bt > 0, + kt = (ht || 0) * (dt || 0) + ;(vt || xt || bt >= kt || ut.dragging) && ct.push(ut) + }), + ct + ) + }, + getConnectedEdges = (tt, et) => { + const nt = tt.map((rt) => rt.id) + return et.filter((rt) => nt.includes(rt.source) || nt.includes(rt.target)) + }, + getTransformForBounds = (tt, et, nt, rt, it, ot = 0.1) => { + const at = et / (tt.width * (1 + ot)), + st = nt / (tt.height * (1 + ot)), + lt = Math.min(at, st), + ct = clamp(lt, rt, it), + ut = tt.x + tt.width / 2, + ht = tt.y + tt.height / 2, + dt = et / 2 - ut * ct, + pt = nt / 2 - ht * ct + return [dt, pt, ct] + }, + getD3Transition = (tt, et = 0) => tt.transition().duration(et) + function getHandles(tt, et, nt, rt) { + return (et[nt] || []).reduce((it, ot) => { + var at, st + return ( + `${tt.id}-${ot.id}-${nt}` !== rt && + it.push({ + id: ot.id || null, + type: nt, + nodeId: tt.id, + x: (((at = tt.positionAbsolute) == null ? void 0 : at.x) ?? 0) + ot.x + ot.width / 2, + y: (((st = tt.positionAbsolute) == null ? void 0 : st.y) ?? 0) + ot.y + ot.height / 2, + }), + it + ) + }, []) + } + function getClosestHandle(tt, et, nt, rt, it, ot) { + const { x: at, y: st } = getEventPosition(tt), + ct = et.elementsFromPoint(at, st).find((mt) => mt.classList.contains('react-flow__handle')) + if (ct) { + const mt = ct.getAttribute('data-nodeid') + if (mt) { + const gt = getHandleType(void 0, ct), + yt = ct.getAttribute('data-handleid'), + bt = ot({ nodeId: mt, id: yt, type: gt }) + if (bt) return { handle: { id: yt, type: gt, nodeId: mt, x: nt.x, y: nt.y }, validHandleResult: bt } + } + } + let ut = [], + ht = 1 / 0 + if ( + (it.forEach((mt) => { + const gt = Math.sqrt((mt.x - nt.x) ** 2 + (mt.y - nt.y) ** 2) + if (gt <= rt) { + const yt = ot(mt) + gt <= ht && + (gt < ht + ? (ut = [{ handle: mt, validHandleResult: yt }]) + : gt === ht && ut.push({ handle: mt, validHandleResult: yt }), + (ht = gt)) } - occlusion /= count; - gl_FragColor = vec4(0.5 + 0.5 * normal, occlusion); + }), + !ut.length) + ) + return { handle: null, validHandleResult: defaultResult() } + if (ut.length === 1) return ut[0] + const dt = ut.some(({ validHandleResult: mt }) => mt.isValid), + pt = ut.some(({ handle: mt }) => mt.type === 'target') + return ( + ut.find(({ handle: mt, validHandleResult: gt }) => (pt ? mt.type === 'target' : dt ? gt.isValid : !0)) || ut[0] + ) + } + const nullConnection = { source: null, target: null, sourceHandle: null, targetHandle: null }, + defaultResult = () => ({ handleDomNode: null, isValid: !1, connection: nullConnection, endHandle: null }) + function isValidHandle(tt, et, nt, rt, it, ot, at) { + const st = it === 'target', + lt = at.querySelector( + `.react-flow__handle[data-id="${tt == null ? void 0 : tt.nodeId}-${tt == null ? void 0 : tt.id}-${ + tt == null ? void 0 : tt.type + }"]`, + ), + ct = { ...defaultResult(), handleDomNode: lt } + if (lt) { + const ut = getHandleType(void 0, lt), + ht = lt.getAttribute('data-nodeid'), + dt = lt.getAttribute('data-handleid'), + pt = lt.classList.contains('connectable'), + mt = lt.classList.contains('connectableend'), + gt = { source: st ? ht : nt, sourceHandle: st ? dt : rt, target: st ? nt : ht, targetHandle: st ? rt : dt } + ;(ct.connection = gt), + pt && + mt && + (et === ConnectionMode.Strict + ? (st && ut === 'source') || (!st && ut === 'target') + : ht !== nt || dt !== rt) && + ((ct.endHandle = { nodeId: ht, handleId: dt, type: ut }), (ct.isValid = ot(gt))) } - `},$26aca173e0984d99$export$1efdf491687cd442={uniforms:{sceneDepth:{value:null},resolution:{value:new Vector2},near:{value:.1},far:{value:1e3},viewMatrixInv:{value:new Matrix4},projectionMatrixInv:{value:new Matrix4},logDepth:{value:!1}},vertexShader:` - varying vec2 vUv; - void main() { - vUv = uv; - gl_Position = vec4(position, 1); - }`,fragmentShader:` - uniform highp sampler2D sceneDepth; - uniform vec2 resolution; - uniform float near; - uniform float far; - uniform bool logDepth; - uniform mat4 viewMatrixInv; - uniform mat4 projectionMatrixInv; - varying vec2 vUv; - layout(location = 1) out vec4 gNormal; - vec3 getWorldPosLog(vec3 posS) { - vec2 uv = posS.xy; - float z = posS.z; - float nearZ =near; - float farZ = far; - float depth = pow(2.0, z * log2(farZ + 1.0)) - 1.0; - float a = farZ / (farZ - nearZ); - float b = farZ * nearZ / (nearZ - farZ); - float linDepth = a + b / depth; - vec4 clipVec = vec4(uv, linDepth, 1.0) * 2.0 - 1.0; - vec4 wpos = projectionMatrixInv * clipVec; - return wpos.xyz / wpos.w; + return ct + } + function getHandleLookup({ nodes: tt, nodeId: et, handleId: nt, handleType: rt }) { + return tt.reduce((it, ot) => { + if (ot[internalsSymbol]) { + const { handleBounds: at } = ot[internalsSymbol] + let st = [], + lt = [] + at && + ((st = getHandles(ot, at, 'source', `${et}-${nt}-${rt}`)), + (lt = getHandles(ot, at, 'target', `${et}-${nt}-${rt}`))), + it.push(...st, ...lt) } - vec3 getWorldPos(float depth, vec2 coord) { - if (logDepth) { - return getWorldPosLog(vec3(coord, depth)); + return it + }, []) + } + function getHandleType(tt, et) { + return ( + tt || + (et != null && et.classList.contains('target') + ? 'target' + : et != null && et.classList.contains('source') + ? 'source' + : null) + ) + } + function resetRecentHandle(tt) { + tt == null || + tt.classList.remove('valid', 'connecting', 'react-flow__handle-valid', 'react-flow__handle-connecting') + } + function getConnectionStatus(tt, et) { + let nt = null + return et ? (nt = 'valid') : tt && !et && (nt = 'invalid'), nt + } + function handlePointerDown({ + event: tt, + handleId: et, + nodeId: nt, + onConnect: rt, + isTarget: it, + getState: ot, + setState: at, + isValidConnection: st, + edgeUpdaterType: lt, + onEdgeUpdateEnd: ct, + }) { + const ut = getHostForElement(tt.target), + { + connectionMode: ht, + domNode: dt, + autoPanOnConnect: pt, + connectionRadius: mt, + onConnectStart: gt, + panBy: yt, + getNodes: bt, + cancelConnection: vt, + } = ot() + let xt = 0, + kt + const { x: St, y: Tt } = getEventPosition(tt), + At = ut == null ? void 0 : ut.elementFromPoint(St, Tt), + Et = getHandleType(lt, At), + $t = dt == null ? void 0 : dt.getBoundingClientRect() + if (!$t || !Et) return + let Dt, + jt = getEventPosition(tt, $t), + Pt = !1, + Ct = null, + wt = !1, + It = null + const Ot = getHandleLookup({ nodes: bt(), nodeId: nt, handleId: et, handleType: Et }), + Wt = () => { + if (!pt) return + const [Nt, Ut] = calcAutoPan(jt, $t) + yt({ x: Nt, y: Ut }), (xt = requestAnimationFrame(Wt)) + } + at({ + connectionPosition: jt, + connectionStatus: null, + connectionNodeId: nt, + connectionHandleId: et, + connectionHandleType: Et, + connectionStartHandle: { nodeId: nt, handleId: et, type: Et }, + connectionEndHandle: null, + }), + gt == null || gt(tt, { nodeId: nt, handleId: et, handleType: Et }) + function zt(Nt) { + const { transform: Ut } = ot() + jt = getEventPosition(Nt, $t) + const { handle: Mt, validHandleResult: Ht } = getClosestHandle( + Nt, + ut, + pointToRendererPoint(jt, Ut, !1, [1, 1]), + mt, + Ot, + (en) => isValidHandle(en, ht, nt, et, it ? 'target' : 'source', st, ut), + ) + if ( + ((kt = Mt), + Pt || (Wt(), (Pt = !0)), + (It = Ht.handleDomNode), + (Ct = Ht.connection), + (wt = Ht.isValid), + at({ + connectionPosition: kt && wt ? rendererPointToPoint({ x: kt.x, y: kt.y }, Ut) : jt, + connectionStatus: getConnectionStatus(!!kt, wt), + connectionEndHandle: Ht.endHandle, + }), + !kt && !wt && !It) + ) + return resetRecentHandle(Dt) + Ct.source !== Ct.target && + It && + (resetRecentHandle(Dt), + (Dt = It), + It.classList.add('connecting', 'react-flow__handle-connecting'), + It.classList.toggle('valid', wt), + It.classList.toggle('react-flow__handle-valid', wt)) + } + function Ft(Nt) { + var Ut, Mt + ;(kt || It) && Ct && wt && (rt == null || rt(Ct)), + (Mt = (Ut = ot()).onConnectEnd) == null || Mt.call(Ut, Nt), + lt && (ct == null || ct(Nt)), + resetRecentHandle(Dt), + vt(), + cancelAnimationFrame(xt), + (Pt = !1), + (wt = !1), + (Ct = null), + (It = null), + ut.removeEventListener('mousemove', zt), + ut.removeEventListener('mouseup', Ft), + ut.removeEventListener('touchmove', zt), + ut.removeEventListener('touchend', Ft) + } + ut.addEventListener('mousemove', zt), + ut.addEventListener('mouseup', Ft), + ut.addEventListener('touchmove', zt), + ut.addEventListener('touchend', Ft) + } + const alwaysValid = () => !0, + selector$f = (tt) => ({ + connectionStartHandle: tt.connectionStartHandle, + connectOnClick: tt.connectOnClick, + noPanClassName: tt.noPanClassName, + }), + connectingSelector = (tt, et, nt) => (rt) => { + const { connectionStartHandle: it, connectionEndHandle: ot, connectionClickStartHandle: at } = rt + return { + connecting: + ((it == null ? void 0 : it.nodeId) === tt && + (it == null ? void 0 : it.handleId) === et && + (it == null ? void 0 : it.type) === nt) || + ((ot == null ? void 0 : ot.nodeId) === tt && + (ot == null ? void 0 : ot.handleId) === et && + (ot == null ? void 0 : ot.type) === nt), + clickConnecting: + (at == null ? void 0 : at.nodeId) === tt && + (at == null ? void 0 : at.handleId) === et && + (at == null ? void 0 : at.type) === nt, + } + }, + Handle = reactExports.forwardRef( + ( + { + type: tt = 'source', + position: et = Position.Top, + isValidConnection: nt, + isConnectable: rt = !0, + isConnectableStart: it = !0, + isConnectableEnd: ot = !0, + id: at, + onConnect: st, + children: lt, + className: ct, + onMouseDown: ut, + onTouchStart: ht, + ...dt + }, + pt, + ) => { + var $t, Dt + const mt = at || null, + gt = tt === 'target', + yt = useStoreApi(), + bt = useNodeId(), + { connectOnClick: vt, noPanClassName: xt } = useStore(selector$f, shallow$1), + { connecting: kt, clickConnecting: St } = useStore(connectingSelector(bt, mt, tt), shallow$1) + bt || (Dt = ($t = yt.getState()).onError) == null || Dt.call($t, '010', errorMessages.error010()) + const Tt = (jt) => { + const { defaultEdgeOptions: Pt, onConnect: Ct, hasDefaultEdges: wt } = yt.getState(), + It = { ...Pt, ...jt } + if (wt) { + const { edges: Ot, setEdges: Wt } = yt.getState() + Wt(addEdge(It, Ot)) + } + Ct == null || Ct(It), st == null || st(It) + }, + At = (jt) => { + if (!bt) return + const Pt = isMouseEvent(jt) + it && + ((Pt && jt.button === 0) || !Pt) && + handlePointerDown({ + event: jt, + handleId: mt, + nodeId: bt, + onConnect: Tt, + isTarget: gt, + getState: yt.getState, + setState: yt.setState, + isValidConnection: nt || yt.getState().isValidConnection || alwaysValid, + }), + Pt ? ut == null || ut(jt) : ht == null || ht(jt) + }, + Et = (jt) => { + const { + onClickConnectStart: Pt, + onClickConnectEnd: Ct, + connectionClickStartHandle: wt, + connectionMode: It, + isValidConnection: Ot, + } = yt.getState() + if (!bt || (!wt && !it)) return + if (!wt) { + Pt == null || Pt(jt, { nodeId: bt, handleId: mt, handleType: tt }), + yt.setState({ connectionClickStartHandle: { nodeId: bt, type: tt, handleId: mt } }) + return + } + const Wt = getHostForElement(jt.target), + zt = nt || Ot || alwaysValid, + { connection: Ft, isValid: Nt } = isValidHandle( + { nodeId: bt, id: mt, type: tt }, + It, + wt.nodeId, + wt.handleId || null, + wt.type, + zt, + Wt, + ) + Nt && Tt(Ft), Ct == null || Ct(jt), yt.setState({ connectionClickStartHandle: null }) + } + return React$1.createElement( + 'div', + { + 'data-handleid': mt, + 'data-nodeid': bt, + 'data-handlepos': et, + 'data-id': `${bt}-${mt}-${tt}`, + className: cc([ + 'react-flow__handle', + `react-flow__handle-${et}`, + 'nodrag', + xt, + ct, + { + source: !gt, + target: gt, + connectable: rt, + connectablestart: it, + connectableend: ot, + connecting: St, + connectionindicator: rt && ((it && !kt) || (ot && kt)), + }, + ]), + onMouseDown: At, + onTouchStart: At, + onClick: vt ? Et : void 0, + ref: pt, + ...dt, + }, + lt, + ) + }, + ) + Handle.displayName = 'Handle' + var Handle$1 = reactExports.memo(Handle) + const DefaultNode = ({ + data: tt, + isConnectable: et, + targetPosition: nt = Position.Top, + sourcePosition: rt = Position.Bottom, + }) => + React$1.createElement( + React$1.Fragment, + null, + React$1.createElement(Handle$1, { type: 'target', position: nt, isConnectable: et }), + tt == null ? void 0 : tt.label, + React$1.createElement(Handle$1, { type: 'source', position: rt, isConnectable: et }), + ) + DefaultNode.displayName = 'DefaultNode' + var DefaultNode$1 = reactExports.memo(DefaultNode) + const InputNode = ({ data: tt, isConnectable: et, sourcePosition: nt = Position.Bottom }) => + React$1.createElement( + React$1.Fragment, + null, + tt == null ? void 0 : tt.label, + React$1.createElement(Handle$1, { type: 'source', position: nt, isConnectable: et }), + ) + InputNode.displayName = 'InputNode' + var InputNode$1 = reactExports.memo(InputNode) + const OutputNode = ({ data: tt, isConnectable: et, targetPosition: nt = Position.Top }) => + React$1.createElement( + React$1.Fragment, + null, + React$1.createElement(Handle$1, { type: 'target', position: nt, isConnectable: et }), + tt == null ? void 0 : tt.label, + ) + OutputNode.displayName = 'OutputNode' + var OutputNode$1 = reactExports.memo(OutputNode) + const GroupNode = () => null + GroupNode.displayName = 'GroupNode' + const selector$e = (tt) => ({ + selectedNodes: tt.getNodes().filter((et) => et.selected), + selectedEdges: tt.edges.filter((et) => et.selected), + }), + selectId = (tt) => tt.id + function areEqual(tt, et) { + return ( + shallow$1(tt.selectedNodes.map(selectId), et.selectedNodes.map(selectId)) && + shallow$1(tt.selectedEdges.map(selectId), et.selectedEdges.map(selectId)) + ) + } + const SelectionListener = reactExports.memo(({ onSelectionChange: tt }) => { + const et = useStoreApi(), + { selectedNodes: nt, selectedEdges: rt } = useStore(selector$e, areEqual) + return ( + reactExports.useEffect(() => { + var ot, at + const it = { nodes: nt, edges: rt } + tt == null || tt(it), (at = (ot = et.getState()).onSelectionChange) == null || at.call(ot, it) + }, [nt, rt, tt]), + null + ) + }) + SelectionListener.displayName = 'SelectionListener' + const changeSelector = (tt) => !!tt.onSelectionChange + function Wrapper$1$1({ onSelectionChange: tt }) { + const et = useStore(changeSelector) + return tt || et ? React$1.createElement(SelectionListener, { onSelectionChange: tt }) : null + } + const selector$d = (tt) => ({ + setNodes: tt.setNodes, + setEdges: tt.setEdges, + setDefaultNodesAndEdges: tt.setDefaultNodesAndEdges, + setMinZoom: tt.setMinZoom, + setMaxZoom: tt.setMaxZoom, + setTranslateExtent: tt.setTranslateExtent, + setNodeExtent: tt.setNodeExtent, + reset: tt.reset, + }) + function useStoreUpdater(tt, et) { + reactExports.useEffect(() => { + typeof tt < 'u' && et(tt) + }, [tt]) + } + function useDirectStoreUpdater(tt, et, nt) { + reactExports.useEffect(() => { + typeof et < 'u' && nt({ [tt]: et }) + }, [et]) + } + const StoreUpdater = ({ + nodes: tt, + edges: et, + defaultNodes: nt, + defaultEdges: rt, + onConnect: it, + onConnectStart: ot, + onConnectEnd: at, + onClickConnectStart: st, + onClickConnectEnd: lt, + nodesDraggable: ct, + nodesConnectable: ut, + nodesFocusable: ht, + edgesFocusable: dt, + edgesUpdatable: pt, + elevateNodesOnSelect: mt, + minZoom: gt, + maxZoom: yt, + nodeExtent: bt, + onNodesChange: vt, + onEdgesChange: xt, + elementsSelectable: kt, + connectionMode: St, + snapGrid: Tt, + snapToGrid: At, + translateExtent: Et, + connectOnClick: $t, + defaultEdgeOptions: Dt, + fitView: jt, + fitViewOptions: Pt, + onNodesDelete: Ct, + onEdgesDelete: wt, + onNodeDrag: It, + onNodeDragStart: Ot, + onNodeDragStop: Wt, + onSelectionDrag: zt, + onSelectionDragStart: Ft, + onSelectionDragStop: Nt, + noPanClassName: Ut, + nodeOrigin: Mt, + rfId: Ht, + autoPanOnConnect: en, + autoPanOnNodeDrag: sn, + onError: Kt, + connectionRadius: rn, + isValidConnection: nn, + nodeDragThreshold: hn, + }) => { + const { + setNodes: vn, + setEdges: an, + setDefaultNodesAndEdges: Qt, + setMinZoom: _n, + setMaxZoom: Pn, + setTranslateExtent: $n, + setNodeExtent: Nn, + reset: Tn, + } = useStore(selector$d, shallow$1), + cn = useStoreApi() + return ( + reactExports.useEffect(() => { + const mn = rt == null ? void 0 : rt.map((In) => ({ ...In, ...Dt })) + return ( + Qt(nt, mn), + () => { + Tn() + } + ) + }, []), + useDirectStoreUpdater('defaultEdgeOptions', Dt, cn.setState), + useDirectStoreUpdater('connectionMode', St, cn.setState), + useDirectStoreUpdater('onConnect', it, cn.setState), + useDirectStoreUpdater('onConnectStart', ot, cn.setState), + useDirectStoreUpdater('onConnectEnd', at, cn.setState), + useDirectStoreUpdater('onClickConnectStart', st, cn.setState), + useDirectStoreUpdater('onClickConnectEnd', lt, cn.setState), + useDirectStoreUpdater('nodesDraggable', ct, cn.setState), + useDirectStoreUpdater('nodesConnectable', ut, cn.setState), + useDirectStoreUpdater('nodesFocusable', ht, cn.setState), + useDirectStoreUpdater('edgesFocusable', dt, cn.setState), + useDirectStoreUpdater('edgesUpdatable', pt, cn.setState), + useDirectStoreUpdater('elementsSelectable', kt, cn.setState), + useDirectStoreUpdater('elevateNodesOnSelect', mt, cn.setState), + useDirectStoreUpdater('snapToGrid', At, cn.setState), + useDirectStoreUpdater('snapGrid', Tt, cn.setState), + useDirectStoreUpdater('onNodesChange', vt, cn.setState), + useDirectStoreUpdater('onEdgesChange', xt, cn.setState), + useDirectStoreUpdater('connectOnClick', $t, cn.setState), + useDirectStoreUpdater('fitViewOnInit', jt, cn.setState), + useDirectStoreUpdater('fitViewOnInitOptions', Pt, cn.setState), + useDirectStoreUpdater('onNodesDelete', Ct, cn.setState), + useDirectStoreUpdater('onEdgesDelete', wt, cn.setState), + useDirectStoreUpdater('onNodeDrag', It, cn.setState), + useDirectStoreUpdater('onNodeDragStart', Ot, cn.setState), + useDirectStoreUpdater('onNodeDragStop', Wt, cn.setState), + useDirectStoreUpdater('onSelectionDrag', zt, cn.setState), + useDirectStoreUpdater('onSelectionDragStart', Ft, cn.setState), + useDirectStoreUpdater('onSelectionDragStop', Nt, cn.setState), + useDirectStoreUpdater('noPanClassName', Ut, cn.setState), + useDirectStoreUpdater('nodeOrigin', Mt, cn.setState), + useDirectStoreUpdater('rfId', Ht, cn.setState), + useDirectStoreUpdater('autoPanOnConnect', en, cn.setState), + useDirectStoreUpdater('autoPanOnNodeDrag', sn, cn.setState), + useDirectStoreUpdater('onError', Kt, cn.setState), + useDirectStoreUpdater('connectionRadius', rn, cn.setState), + useDirectStoreUpdater('isValidConnection', nn, cn.setState), + useDirectStoreUpdater('nodeDragThreshold', hn, cn.setState), + useStoreUpdater(tt, vn), + useStoreUpdater(et, an), + useStoreUpdater(gt, _n), + useStoreUpdater(yt, Pn), + useStoreUpdater(Et, $n), + useStoreUpdater(bt, Nn), + null + ) + }, + style$1 = { display: 'none' }, + ariaLiveStyle = { + position: 'absolute', + width: 1, + height: 1, + margin: -1, + border: 0, + padding: 0, + overflow: 'hidden', + clip: 'rect(0px, 0px, 0px, 0px)', + clipPath: 'inset(100%)', + }, + ARIA_NODE_DESC_KEY = 'react-flow__node-desc', + ARIA_EDGE_DESC_KEY = 'react-flow__edge-desc', + ARIA_LIVE_MESSAGE = 'react-flow__aria-live', + selector$c = (tt) => tt.ariaLiveMessage + function AriaLiveMessage({ rfId: tt }) { + const et = useStore(selector$c) + return React$1.createElement( + 'div', + { id: `${ARIA_LIVE_MESSAGE}-${tt}`, 'aria-live': 'assertive', 'aria-atomic': 'true', style: ariaLiveStyle }, + et, + ) + } + function A11yDescriptions({ rfId: tt, disableKeyboardA11y: et }) { + return React$1.createElement( + React$1.Fragment, + null, + React$1.createElement( + 'div', + { id: `${ARIA_NODE_DESC_KEY}-${tt}`, style: style$1 }, + 'Press enter or space to select a node.', + !et && 'You can then use the arrow keys to move the node around.', + ' Press delete to remove it and escape to cancel.', + ' ', + ), + React$1.createElement( + 'div', + { id: `${ARIA_EDGE_DESC_KEY}-${tt}`, style: style$1 }, + 'Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.', + ), + !et && React$1.createElement(AriaLiveMessage, { rfId: tt }), + ) + } + var useKeyPress = (tt = null, et = { actInsideInputWithModifier: !0 }) => { + const [nt, rt] = reactExports.useState(!1), + it = reactExports.useRef(!1), + ot = reactExports.useRef(new Set([])), + [at, st] = reactExports.useMemo(() => { + if (tt !== null) { + const ct = (Array.isArray(tt) ? tt : [tt]).filter((ht) => typeof ht == 'string').map((ht) => ht.split('+')), + ut = ct.reduce((ht, dt) => ht.concat(...dt), []) + return [ct, ut] } - float z = depth * 2.0 - 1.0; - vec4 clipSpacePosition = vec4(coord * 2.0 - 1.0, z, 1.0); - vec4 viewSpacePosition = projectionMatrixInv * clipSpacePosition; - // Perspective division - vec4 worldSpacePosition = viewSpacePosition; - worldSpacePosition.xyz /= worldSpacePosition.w; - return worldSpacePosition.xyz; + return [[], []] + }, [tt]) + return ( + reactExports.useEffect(() => { + const lt = typeof document < 'u' ? document : null, + ct = (et == null ? void 0 : et.target) || lt + if (tt !== null) { + const ut = (pt) => { + if ( + ((it.current = pt.ctrlKey || pt.metaKey || pt.shiftKey), + (!it.current || (it.current && !et.actInsideInputWithModifier)) && isInputDOMNode(pt)) + ) + return !1 + const gt = useKeyOrCode(pt.code, st) + ot.current.add(pt[gt]), isMatchingKey(at, ot.current, !1) && (pt.preventDefault(), rt(!0)) + }, + ht = (pt) => { + if ((!it.current || (it.current && !et.actInsideInputWithModifier)) && isInputDOMNode(pt)) return !1 + const gt = useKeyOrCode(pt.code, st) + isMatchingKey(at, ot.current, !0) ? (rt(!1), ot.current.clear()) : ot.current.delete(pt[gt]), + pt.key === 'Meta' && ot.current.clear(), + (it.current = !1) + }, + dt = () => { + ot.current.clear(), rt(!1) + } + return ( + ct == null || ct.addEventListener('keydown', ut), + ct == null || ct.addEventListener('keyup', ht), + window.addEventListener('blur', dt), + () => { + ct == null || ct.removeEventListener('keydown', ut), + ct == null || ct.removeEventListener('keyup', ht), + window.removeEventListener('blur', dt) + } + ) + } + }, [tt, rt]), + nt + ) + } + function isMatchingKey(tt, et, nt) { + return tt.filter((rt) => nt || rt.length === et.size).some((rt) => rt.every((it) => et.has(it))) + } + function useKeyOrCode(tt, et) { + return et.includes(tt) ? 'code' : 'key' + } + function calculateXYZPosition(tt, et, nt, rt) { + var at, st + if (!tt.parentNode) return nt + const it = et.get(tt.parentNode), + ot = getNodePositionWithOrigin(it, rt) + return calculateXYZPosition( + it, + et, + { + x: (nt.x ?? 0) + ot.x, + y: (nt.y ?? 0) + ot.y, + z: + (((at = it[internalsSymbol]) == null ? void 0 : at.z) ?? 0) > (nt.z ?? 0) + ? ((st = it[internalsSymbol]) == null ? void 0 : st.z) ?? 0 + : nt.z ?? 0, + }, + rt, + ) + } + function updateAbsoluteNodePositions(tt, et, nt) { + tt.forEach((rt) => { + var it + if (rt.parentNode && !tt.has(rt.parentNode)) throw new Error(`Parent node ${rt.parentNode} not found`) + if (rt.parentNode || (nt != null && nt[rt.id])) { + const { + x: ot, + y: at, + z: st, + } = calculateXYZPosition( + rt, + tt, + { ...rt.position, z: ((it = rt[internalsSymbol]) == null ? void 0 : it.z) ?? 0 }, + et, + ) + ;(rt.positionAbsolute = { x: ot, y: at }), + (rt[internalsSymbol].z = st), + nt != null && nt[rt.id] && (rt[internalsSymbol].isParent = !0) + } + }) + } + function createNodeInternals(tt, et, nt, rt) { + const it = new Map(), + ot = {}, + at = rt ? 1e3 : 0 + return ( + tt.forEach((st) => { + var ht + const lt = (isNumeric(st.zIndex) ? st.zIndex : 0) + (st.selected ? at : 0), + ct = et.get(st.id), + ut = { + width: ct == null ? void 0 : ct.width, + height: ct == null ? void 0 : ct.height, + ...st, + positionAbsolute: { x: st.position.x, y: st.position.y }, + } + st.parentNode && ((ut.parentNode = st.parentNode), (ot[st.parentNode] = !0)), + Object.defineProperty(ut, internalsSymbol, { + enumerable: !1, + value: { + handleBounds: (ht = ct == null ? void 0 : ct[internalsSymbol]) == null ? void 0 : ht.handleBounds, + z: lt, + }, + }), + it.set(st.id, ut) + }), + updateAbsoluteNodePositions(it, nt, ot), + it + ) + } + function fitView(tt, et = {}) { + const { + getNodes: nt, + width: rt, + height: it, + minZoom: ot, + maxZoom: at, + d3Zoom: st, + d3Selection: lt, + fitViewOnInitDone: ct, + fitViewOnInit: ut, + nodeOrigin: ht, + } = tt(), + dt = et.initial && !ct && ut + if (st && lt && (dt || !et.initial)) { + const mt = nt().filter((yt) => { + var vt + const bt = et.includeHiddenNodes ? yt.width && yt.height : !yt.hidden + return (vt = et.nodes) != null && vt.length ? bt && et.nodes.some((xt) => xt.id === yt.id) : bt + }), + gt = mt.every((yt) => yt.width && yt.height) + if (mt.length > 0 && gt) { + const yt = getRectOfNodes(mt, ht), + [bt, vt, xt] = getTransformForBounds(yt, rt, it, et.minZoom ?? ot, et.maxZoom ?? at, et.padding ?? 0.1), + kt = identity.translate(bt, vt).scale(xt) + return ( + typeof et.duration == 'number' && et.duration > 0 + ? st.transform(getD3Transition(lt, et.duration), kt) + : st.transform(lt, kt), + !0 + ) + } } - - vec3 computeNormal(vec3 worldPos, vec2 vUv) { - ivec2 p = ivec2(vUv * resolution); - float c0 = texelFetch(sceneDepth, p, 0).x; - float l2 = texelFetch(sceneDepth, p - ivec2(2, 0), 0).x; - float l1 = texelFetch(sceneDepth, p - ivec2(1, 0), 0).x; - float r1 = texelFetch(sceneDepth, p + ivec2(1, 0), 0).x; - float r2 = texelFetch(sceneDepth, p + ivec2(2, 0), 0).x; - float b2 = texelFetch(sceneDepth, p - ivec2(0, 2), 0).x; - float b1 = texelFetch(sceneDepth, p - ivec2(0, 1), 0).x; - float t1 = texelFetch(sceneDepth, p + ivec2(0, 1), 0).x; - float t2 = texelFetch(sceneDepth, p + ivec2(0, 2), 0).x; - - float dl = abs((2.0 * l1 - l2) - c0); - float dr = abs((2.0 * r1 - r2) - c0); - float db = abs((2.0 * b1 - b2) - c0); - float dt = abs((2.0 * t1 - t2) - c0); - - vec3 ce = getWorldPos(c0, vUv).xyz; - - vec3 dpdx = (dl < dr) ? ce - getWorldPos(l1, (vUv - vec2(1.0 / resolution.x, 0.0))).xyz - : -ce + getWorldPos(r1, (vUv + vec2(1.0 / resolution.x, 0.0))).xyz; - vec3 dpdy = (db < dt) ? ce - getWorldPos(b1, (vUv - vec2(0.0, 1.0 / resolution.y))).xyz - : -ce + getWorldPos(t1, (vUv + vec2(0.0, 1.0 / resolution.y))).xyz; - - return normalize(cross(dpdx, dpdy)); + return !1 } - void main() { - vec2 uv = vUv - vec2(0.5) / resolution; - vec2 pixelSize = vec2(1.0) / resolution; - vec2[] uvSamples = vec2[4]( - uv, - uv + vec2(pixelSize.x, 0.0), - uv + vec2(0.0, pixelSize.y), - uv + pixelSize - ); - float depth00 = texture2D(sceneDepth, uvSamples[0]).r; - float depth10 = texture2D(sceneDepth, uvSamples[1]).r; - float depth01 = texture2D(sceneDepth, uvSamples[2]).r; - float depth11 = texture2D(sceneDepth, uvSamples[3]).r; - float minDepth = min(min(depth00, depth10), min(depth01, depth11)); - float maxDepth = max(max(depth00, depth10), max(depth01, depth11)); - float targetDepth = minDepth; - // Checkerboard pattern to avoid artifacts - if (mod(gl_FragCoord.x + gl_FragCoord.y, 2.0) > 0.5) { - targetDepth = maxDepth; + function handleControlledNodeSelectionChange(tt, et) { + return ( + tt.forEach((nt) => { + const rt = et.get(nt.id) + rt && et.set(rt.id, { ...rt, [internalsSymbol]: rt[internalsSymbol], selected: nt.selected }) + }), + new Map(et) + ) + } + function handleControlledEdgeSelectionChange(tt, et) { + return et.map((nt) => { + const rt = tt.find((it) => it.id === nt.id) + return rt && (nt.selected = rt.selected), nt + }) + } + function updateNodesAndEdgesSelections({ changedNodes: tt, changedEdges: et, get: nt, set: rt }) { + const { + nodeInternals: it, + edges: ot, + onNodesChange: at, + onEdgesChange: st, + hasDefaultNodes: lt, + hasDefaultEdges: ct, + } = nt() + tt != null && + tt.length && + (lt && rt({ nodeInternals: handleControlledNodeSelectionChange(tt, it) }), at == null || at(tt)), + et != null && + et.length && + (ct && rt({ edges: handleControlledEdgeSelectionChange(et, ot) }), st == null || st(et)) + } + const noop$1 = () => {}, + initialViewportHelper = { + zoomIn: noop$1, + zoomOut: noop$1, + zoomTo: noop$1, + getZoom: () => 1, + setViewport: noop$1, + getViewport: () => ({ x: 0, y: 0, zoom: 1 }), + fitView: () => !1, + setCenter: noop$1, + fitBounds: noop$1, + project: (tt) => tt, + viewportInitialized: !1, + }, + selector$b = (tt) => ({ d3Zoom: tt.d3Zoom, d3Selection: tt.d3Selection }), + useViewportHelper = () => { + const tt = useStoreApi(), + { d3Zoom: et, d3Selection: nt } = useStore(selector$b, shallow$1) + return reactExports.useMemo( + () => + nt && et + ? { + zoomIn: (it) => et.scaleBy(getD3Transition(nt, it == null ? void 0 : it.duration), 1.2), + zoomOut: (it) => et.scaleBy(getD3Transition(nt, it == null ? void 0 : it.duration), 1 / 1.2), + zoomTo: (it, ot) => et.scaleTo(getD3Transition(nt, ot == null ? void 0 : ot.duration), it), + getZoom: () => tt.getState().transform[2], + setViewport: (it, ot) => { + const [at, st, lt] = tt.getState().transform, + ct = identity.translate(it.x ?? at, it.y ?? st).scale(it.zoom ?? lt) + et.transform(getD3Transition(nt, ot == null ? void 0 : ot.duration), ct) + }, + getViewport: () => { + const [it, ot, at] = tt.getState().transform + return { x: it, y: ot, zoom: at } + }, + fitView: (it) => fitView(tt.getState, it), + setCenter: (it, ot, at) => { + const { width: st, height: lt, maxZoom: ct } = tt.getState(), + ut = typeof (at == null ? void 0 : at.zoom) < 'u' ? at.zoom : ct, + ht = st / 2 - it * ut, + dt = lt / 2 - ot * ut, + pt = identity.translate(ht, dt).scale(ut) + et.transform(getD3Transition(nt, at == null ? void 0 : at.duration), pt) + }, + fitBounds: (it, ot) => { + const { width: at, height: st, minZoom: lt, maxZoom: ct } = tt.getState(), + [ut, ht, dt] = getTransformForBounds(it, at, st, lt, ct, (ot == null ? void 0 : ot.padding) ?? 0.1), + pt = identity.translate(ut, ht).scale(dt) + et.transform(getD3Transition(nt, ot == null ? void 0 : ot.duration), pt) + }, + project: (it) => { + const { transform: ot, snapToGrid: at, snapGrid: st } = tt.getState() + return pointToRendererPoint(it, ot, at, st) + }, + viewportInitialized: !0, + } + : initialViewportHelper, + [et, nt], + ) + } + function useReactFlow() { + const tt = useViewportHelper(), + et = useStoreApi(), + nt = reactExports.useCallback( + () => + et + .getState() + .getNodes() + .map((gt) => ({ ...gt })), + [], + ), + rt = reactExports.useCallback((gt) => et.getState().nodeInternals.get(gt), []), + it = reactExports.useCallback(() => { + const { edges: gt = [] } = et.getState() + return gt.map((yt) => ({ ...yt })) + }, []), + ot = reactExports.useCallback((gt) => { + const { edges: yt = [] } = et.getState() + return yt.find((bt) => bt.id === gt) + }, []), + at = reactExports.useCallback((gt) => { + const { getNodes: yt, setNodes: bt, hasDefaultNodes: vt, onNodesChange: xt } = et.getState(), + kt = yt(), + St = typeof gt == 'function' ? gt(kt) : gt + if (vt) bt(St) + else if (xt) { + const Tt = + St.length === 0 + ? kt.map((At) => ({ type: 'remove', id: At.id })) + : St.map((At) => ({ item: At, type: 'reset' })) + xt(Tt) + } + }, []), + st = reactExports.useCallback((gt) => { + const { edges: yt = [], setEdges: bt, hasDefaultEdges: vt, onEdgesChange: xt } = et.getState(), + kt = typeof gt == 'function' ? gt(yt) : gt + if (vt) bt(kt) + else if (xt) { + const St = + kt.length === 0 + ? yt.map((Tt) => ({ type: 'remove', id: Tt.id })) + : kt.map((Tt) => ({ item: Tt, type: 'reset' })) + xt(St) + } + }, []), + lt = reactExports.useCallback((gt) => { + const yt = Array.isArray(gt) ? gt : [gt], + { getNodes: bt, setNodes: vt, hasDefaultNodes: xt, onNodesChange: kt } = et.getState() + if (xt) { + const Tt = [...bt(), ...yt] + vt(Tt) + } else if (kt) { + const St = yt.map((Tt) => ({ item: Tt, type: 'add' })) + kt(St) + } + }, []), + ct = reactExports.useCallback((gt) => { + const yt = Array.isArray(gt) ? gt : [gt], + { edges: bt = [], setEdges: vt, hasDefaultEdges: xt, onEdgesChange: kt } = et.getState() + if (xt) vt([...bt, ...yt]) + else if (kt) { + const St = yt.map((Tt) => ({ item: Tt, type: 'add' })) + kt(St) } - int chosenIndex = 0; - float[] samples = float[4](depth00, depth10, depth01, depth11); - for(int i = 0; i < 4; ++i) { - if (samples[i] == targetDepth) { - chosenIndex = i; - break; - } + }, []), + ut = reactExports.useCallback(() => { + const { getNodes: gt, edges: yt = [], transform: bt } = et.getState(), + [vt, xt, kt] = bt + return { + nodes: gt().map((St) => ({ ...St })), + edges: yt.map((St) => ({ ...St })), + viewport: { x: vt, y: xt, zoom: kt }, } - gl_FragColor = vec4(samples[chosenIndex], 0.0, 0.0, 1.0); - gNormal = vec4(computeNormal( - getWorldPos(samples[chosenIndex], uvSamples[chosenIndex]), uvSamples[chosenIndex] - ), 0.0); - /* float[] samples = float[4](depth00, depth10, depth01, depth11); - float c = 0.25 * (depth00 + depth10 + depth01 + depth11); - float[] distances = float[4](depth00, depth10, depth01, depth11); - float maxDistance = max(max(distances[0], distances[1]), max(distances[2], distances[3])); - - int remaining[3]; - int rejected[3]; - int i, j, k; - - for(i = 0, j = 0, k = 0; i < 4; ++i) { - if (distances[i] < maxDistance) { - remaining[j++] = i; - } else { - rejected[k++] = i; - } + }, []), + ht = reactExports.useCallback(({ nodes: gt, edges: yt }) => { + const { + nodeInternals: bt, + getNodes: vt, + edges: xt, + hasDefaultNodes: kt, + hasDefaultEdges: St, + onNodesDelete: Tt, + onEdgesDelete: At, + onNodesChange: Et, + onEdgesChange: $t, + } = et.getState(), + Dt = (gt || []).map((It) => It.id), + jt = (yt || []).map((It) => It.id), + Pt = vt().reduce((It, Ot) => { + const Wt = !Dt.includes(Ot.id) && Ot.parentNode && It.find((Ft) => Ft.id === Ot.parentNode) + return ( + (typeof Ot.deletable == 'boolean' ? Ot.deletable : !0) && (Dt.includes(Ot.id) || Wt) && It.push(Ot), It + ) + }, []), + Ct = xt.filter((It) => (typeof It.deletable == 'boolean' ? It.deletable : !0)), + wt = Ct.filter((It) => jt.includes(It.id)) + if (Pt || wt) { + const It = getConnectedEdges(Pt, Ct), + Ot = [...wt, ...It], + Wt = Ot.reduce((zt, Ft) => (zt.includes(Ft.id) || zt.push(Ft.id), zt), []) + if ( + ((St || kt) && + (St && et.setState({ edges: xt.filter((zt) => !Wt.includes(zt.id)) }), + kt && + (Pt.forEach((zt) => { + bt.delete(zt.id) + }), + et.setState({ nodeInternals: new Map(bt) }))), + Wt.length > 0 && (At == null || At(Ot), $t && $t(Wt.map((zt) => ({ id: zt, type: 'remove' })))), + Pt.length > 0 && (Tt == null || Tt(Pt), Et)) + ) { + const zt = Pt.map((Ft) => ({ id: Ft.id, type: 'remove' })) + Et(zt) + } } - for(;j < 3;++j) { - remaining[j] = rejected[--k]; + }, []), + dt = reactExports.useCallback((gt) => { + const yt = isRectObject(gt), + bt = yt ? null : et.getState().nodeInternals.get(gt.id) + return [yt ? gt : nodeToRect(bt), bt, yt] + }, []), + pt = reactExports.useCallback((gt, yt = !0, bt) => { + const [vt, xt, kt] = dt(gt) + return vt + ? (bt || et.getState().getNodes()).filter((St) => { + if (!kt && (St.id === xt.id || !St.positionAbsolute)) return !1 + const Tt = nodeToRect(St), + At = getOverlappingArea(Tt, vt) + return (yt && At > 0) || At >= gt.width * gt.height + }) + : [] + }, []), + mt = reactExports.useCallback((gt, yt, bt = !0) => { + const [vt] = dt(gt) + if (!vt) return !1 + const xt = getOverlappingArea(vt, yt) + return (bt && xt > 0) || xt >= gt.width * gt.height + }, []) + return reactExports.useMemo( + () => ({ + ...tt, + getNodes: nt, + getNode: rt, + getEdges: it, + getEdge: ot, + setNodes: at, + setEdges: st, + addNodes: lt, + addEdges: ct, + toObject: ut, + deleteElements: ht, + getIntersectingNodes: pt, + isNodeIntersecting: mt, + }), + [tt, nt, rt, it, ot, at, st, lt, ct, ut, ht, pt, mt], + ) + } + const deleteKeyOptions = { actInsideInputWithModifier: !1 } + var useGlobalKeyHandler = ({ deleteKeyCode: tt, multiSelectionKeyCode: et }) => { + const nt = useStoreApi(), + { deleteElements: rt } = useReactFlow(), + it = useKeyPress(tt, deleteKeyOptions), + ot = useKeyPress(et) + reactExports.useEffect(() => { + if (it) { + const { edges: at, getNodes: st } = nt.getState(), + lt = st().filter((ut) => ut.selected), + ct = at.filter((ut) => ut.selected) + rt({ nodes: lt, edges: ct }), nt.setState({ nodesSelectionActive: !1 }) + } + }, [it]), + reactExports.useEffect(() => { + nt.setState({ multiSelectionActive: ot }) + }, [ot]) + } + function useResizeHandler(tt) { + const et = useStoreApi() + reactExports.useEffect(() => { + let nt + const rt = () => { + var ot, at + if (!tt.current) return + const it = getDimensions(tt.current) + ;(it.height === 0 || it.width === 0) && + ((at = (ot = et.getState()).onError) == null || at.call(ot, '004', errorMessages.error004())), + et.setState({ width: it.width || 500, height: it.height || 500 }) + } + return ( + rt(), + window.addEventListener('resize', rt), + tt.current && ((nt = new ResizeObserver(() => rt())), nt.observe(tt.current)), + () => { + window.removeEventListener('resize', rt), nt && tt.current && nt.unobserve(tt.current) } - vec3 s = vec3( - samples[remaining[0]], - samples[remaining[1]], - samples[remaining[2]] - ); - c = (s.x + s.y + s.z) / 3.0; - - distances[0] = abs(c - s.x); - distances[1] = abs(c - s.y); - distances[2] = abs(c - s.z); - - float minDistance = min(min(distances[0], distances[1]), distances[2]); - - for(i = 0; i < 3; ++i) { - if (distances[i] == minDistance) { - break; + ) + }, []) + } + const containerStyle = { position: 'absolute', width: '100%', height: '100%', top: 0, left: 0 }, + viewChanged = (tt, et) => tt.x !== et.x || tt.y !== et.y || tt.zoom !== et.k, + eventToFlowTransform = (tt) => ({ x: tt.x, y: tt.y, zoom: tt.k }), + isWrappedWithClass = (tt, et) => tt.target.closest(`.${et}`), + isRightClickPan = (tt, et) => et === 2 && Array.isArray(tt) && tt.includes(2), + wheelDelta = (tt) => { + const et = tt.ctrlKey && isMacOs() ? 10 : 1 + return -tt.deltaY * (tt.deltaMode === 1 ? 0.05 : tt.deltaMode ? 1 : 0.002) * et + }, + selector$a = (tt) => ({ + d3Zoom: tt.d3Zoom, + d3Selection: tt.d3Selection, + d3ZoomHandler: tt.d3ZoomHandler, + userSelectionActive: tt.userSelectionActive, + }), + ZoomPane = ({ + onMove: tt, + onMoveStart: et, + onMoveEnd: nt, + onPaneContextMenu: rt, + zoomOnScroll: it = !0, + zoomOnPinch: ot = !0, + panOnScroll: at = !1, + panOnScrollSpeed: st = 0.5, + panOnScrollMode: lt = PanOnScrollMode.Free, + zoomOnDoubleClick: ct = !0, + elementsSelectable: ut, + panOnDrag: ht = !0, + defaultViewport: dt, + translateExtent: pt, + minZoom: mt, + maxZoom: gt, + zoomActivationKeyCode: yt, + preventScrolling: bt = !0, + children: vt, + noWheelClassName: xt, + noPanClassName: kt, + }) => { + const St = reactExports.useRef(), + Tt = useStoreApi(), + At = reactExports.useRef(!1), + Et = reactExports.useRef(!1), + $t = reactExports.useRef(null), + Dt = reactExports.useRef({ x: 0, y: 0, zoom: 0 }), + { d3Zoom: jt, d3Selection: Pt, d3ZoomHandler: Ct, userSelectionActive: wt } = useStore(selector$a, shallow$1), + It = useKeyPress(yt), + Ot = reactExports.useRef(0), + Wt = reactExports.useRef(!1), + zt = reactExports.useRef() + return ( + useResizeHandler($t), + reactExports.useEffect(() => { + if ($t.current) { + const Ft = $t.current.getBoundingClientRect(), + Nt = zoom().scaleExtent([mt, gt]).translateExtent(pt), + Ut = select($t.current).call(Nt), + Mt = identity.translate(dt.x, dt.y).scale(clamp(dt.zoom, mt, gt)), + Ht = [ + [0, 0], + [Ft.width, Ft.height], + ], + en = Nt.constrain()(Mt, Ht, pt) + Nt.transform(Ut, en), + Nt.wheelDelta(wheelDelta), + Tt.setState({ + d3Zoom: Nt, + d3Selection: Ut, + d3ZoomHandler: Ut.on('wheel.zoom'), + transform: [en.x, en.y, en.k], + domNode: $t.current.closest('.react-flow'), + }) + } + }, []), + reactExports.useEffect(() => { + Pt && + jt && + (at && !It && !wt + ? Pt.on( + 'wheel.zoom', + (Ft) => { + if (isWrappedWithClass(Ft, xt)) return !1 + Ft.preventDefault(), Ft.stopImmediatePropagation() + const Nt = Pt.property('__zoom').k || 1, + Ut = isMacOs() + if (Ft.ctrlKey && ot && Ut) { + const hn = pointer(Ft), + vn = wheelDelta(Ft), + an = Nt * Math.pow(2, vn) + jt.scaleTo(Pt, an, hn, Ft) + return + } + const Mt = Ft.deltaMode === 1 ? 20 : 1 + let Ht = lt === PanOnScrollMode.Vertical ? 0 : Ft.deltaX * Mt, + en = lt === PanOnScrollMode.Horizontal ? 0 : Ft.deltaY * Mt + !Ut && Ft.shiftKey && lt !== PanOnScrollMode.Vertical && ((Ht = Ft.deltaY * Mt), (en = 0)), + jt.translateBy(Pt, -(Ht / Nt) * st, -(en / Nt) * st, { internal: !0 }) + const sn = eventToFlowTransform(Pt.property('__zoom')), + { onViewportChangeStart: Kt, onViewportChange: rn, onViewportChangeEnd: nn } = Tt.getState() + clearTimeout(zt.current), + Wt.current || ((Wt.current = !0), et == null || et(Ft, sn), Kt == null || Kt(sn)), + Wt.current && + (tt == null || tt(Ft, sn), + rn == null || rn(sn), + (zt.current = setTimeout(() => { + nt == null || nt(Ft, sn), nn == null || nn(sn), (Wt.current = !1) + }, 150))) + }, + { passive: !1 }, + ) + : typeof Ct < 'u' && + Pt.on( + 'wheel.zoom', + function (Ft, Nt) { + if (!bt || isWrappedWithClass(Ft, xt)) return null + Ft.preventDefault(), Ct.call(this, Ft, Nt) + }, + { passive: !1 }, + )) + }, [wt, at, lt, Pt, jt, Ct, It, ot, bt, xt, et, tt, nt]), + reactExports.useEffect(() => { + jt && + jt.on('start', (Ft) => { + var Mt, Ht + if (!Ft.sourceEvent || Ft.sourceEvent.internal) return null + Ot.current = (Mt = Ft.sourceEvent) == null ? void 0 : Mt.button + const { onViewportChangeStart: Nt } = Tt.getState(), + Ut = eventToFlowTransform(Ft.transform) + ;(At.current = !0), + (Dt.current = Ut), + ((Ht = Ft.sourceEvent) == null ? void 0 : Ht.type) === 'mousedown' && Tt.setState({ paneDragging: !0 }), + Nt == null || Nt(Ut), + et == null || et(Ft.sourceEvent, Ut) + }) + }, [jt, et]), + reactExports.useEffect(() => { + jt && + (wt && !At.current + ? jt.on('zoom', null) + : wt || + jt.on('zoom', (Ft) => { + var Ut + const { onViewportChange: Nt } = Tt.getState() + if ( + (Tt.setState({ transform: [Ft.transform.x, Ft.transform.y, Ft.transform.k] }), + (Et.current = !!(rt && isRightClickPan(ht, Ot.current ?? 0))), + (tt || Nt) && !((Ut = Ft.sourceEvent) != null && Ut.internal)) + ) { + const Mt = eventToFlowTransform(Ft.transform) + Nt == null || Nt(Mt), tt == null || tt(Ft.sourceEvent, Mt) + } + })) + }, [wt, jt, tt, ht, rt]), + reactExports.useEffect(() => { + jt && + jt.on('end', (Ft) => { + if (!Ft.sourceEvent || Ft.sourceEvent.internal) return null + const { onViewportChangeEnd: Nt } = Tt.getState() + if ( + ((At.current = !1), + Tt.setState({ paneDragging: !1 }), + rt && isRightClickPan(ht, Ot.current ?? 0) && !Et.current && rt(Ft.sourceEvent), + (Et.current = !1), + (nt || Nt) && viewChanged(Dt.current, Ft.transform)) + ) { + const Ut = eventToFlowTransform(Ft.transform) + ;(Dt.current = Ut), + clearTimeout(St.current), + (St.current = setTimeout( + () => { + Nt == null || Nt(Ut), nt == null || nt(Ft.sourceEvent, Ut) + }, + at ? 150 : 0, + )) + } + }) + }, [jt, at, ht, nt, rt]), + reactExports.useEffect(() => { + jt && + jt.filter((Ft) => { + const Nt = It || it, + Ut = ot && Ft.ctrlKey + if ( + (ht === !0 || (Array.isArray(ht) && ht.includes(1))) && + Ft.button === 1 && + Ft.type === 'mousedown' && + (isWrappedWithClass(Ft, 'react-flow__node') || isWrappedWithClass(Ft, 'react-flow__edge')) + ) + return !0 + if ( + (!ht && !Nt && !at && !ct && !ot) || + wt || + (!ct && Ft.type === 'dblclick') || + (isWrappedWithClass(Ft, xt) && Ft.type === 'wheel') || + (isWrappedWithClass(Ft, kt) && (Ft.type !== 'wheel' || (at && Ft.type === 'wheel'))) || + (!ot && Ft.ctrlKey && Ft.type === 'wheel') || + (!Nt && !at && !Ut && Ft.type === 'wheel') || + (!ht && (Ft.type === 'mousedown' || Ft.type === 'touchstart')) || + (Array.isArray(ht) && !ht.includes(Ft.button) && (Ft.type === 'mousedown' || Ft.type === 'touchstart')) + ) + return !1 + const Mt = (Array.isArray(ht) && ht.includes(Ft.button)) || !Ft.button || Ft.button <= 1 + return (!Ft.ctrlKey || Ft.type === 'wheel') && Mt + }) + }, [wt, jt, it, ot, at, ct, ht, ut, It]), + React$1.createElement('div', { className: 'react-flow__renderer', ref: $t, style: containerStyle }, vt) + ) + }, + selector$9 = (tt) => ({ userSelectionActive: tt.userSelectionActive, userSelectionRect: tt.userSelectionRect }) + function UserSelection() { + const { userSelectionActive: tt, userSelectionRect: et } = useStore(selector$9, shallow$1) + return tt && et + ? React$1.createElement('div', { + className: 'react-flow__selection react-flow__container', + style: { width: et.width, height: et.height, transform: `translate(${et.x}px, ${et.y}px)` }, + }) + : null + } + function handleParentExpand(tt, et) { + const nt = tt.find((rt) => rt.id === et.parentNode) + if (nt) { + const rt = et.position.x + et.width - nt.width, + it = et.position.y + et.height - nt.height + if (rt > 0 || it > 0 || et.position.x < 0 || et.position.y < 0) { + if ( + ((nt.style = { ...nt.style }), + (nt.style.width = nt.style.width ?? nt.width), + (nt.style.height = nt.style.height ?? nt.height), + rt > 0 && (nt.style.width += rt), + it > 0 && (nt.style.height += it), + et.position.x < 0) + ) { + const ot = Math.abs(et.position.x) + ;(nt.position.x = nt.position.x - ot), (nt.style.width += ot), (et.position.x = 0) + } + if (et.position.y < 0) { + const ot = Math.abs(et.position.y) + ;(nt.position.y = nt.position.y - ot), (nt.style.height += ot), (et.position.y = 0) + } + ;(nt.width = nt.style.width), (nt.height = nt.style.height) + } + } + } + function applyChanges(tt, et) { + if (tt.some((rt) => rt.type === 'reset')) return tt.filter((rt) => rt.type === 'reset').map((rt) => rt.item) + const nt = tt.filter((rt) => rt.type === 'add').map((rt) => rt.item) + return et.reduce((rt, it) => { + const ot = tt.filter((st) => st.id === it.id) + if (ot.length === 0) return rt.push(it), rt + const at = { ...it } + for (const st of ot) + if (st) + switch (st.type) { + case 'select': { + at.selected = st.selected + break } - }*/ - /* gl_FragColor = vec4(samples[remaining[i]], 0.0, 0.0, 0.0); - gNormal = vec4(computeNormal( - getWorldPos(samples[remaining[i]], uvSamples[remaining[i]]), uvSamples[remaining[i]] - ), 0.0);*/ - }`};var $06269ad78f3c5fdf$export$2e2bcd8739ae039="5L7pP4UXrOIr/VZ1G3f6p89FIWU7lqc7J3DPxKjJUXODJoHQzf/aNVM+ABlvhXeBGN7iC0WkmTjEaAqOItBfBdaK5KSGV1ET5SOKl3x9JOX5w2sAl6+6KjDhVUHgbqq7DZ5EeYzbdSNxtrQLW/KkPJoOTG4u5CBUZkCKHniY9l7DUgjuz708zG1HIC8qfohi1vPjPH9Lq47ksjRrjwXD4MlVCjdAqYFGodQ8tRmHkOfq4wVRIAHvoavPHvN1lpk3X4Y1yzAPGe8S9KBs3crc4GwlU1dEOXiWol/mgQqxkNqB1xd04+0Bmpwj0GcCc4NUi+c731FUxjvaexCkCJ0qhrJJ++htWqetNC4NewClu8aFRSwrqiJEGe+qtTg4CYCHaF1wJI0sy/ZBQAI0qAMyBvVjWZlv2pdkCaro9eWDLK5I4mbb8E4d7hZr9dDJiTJm6Bmb5S+2F7yal/JPdeLUfwq7jmVLaQfhv4tWMJAt7V4sG9LuAv2oPJgSj1nnlBvPibfHM2TrlWHwGCLGxW/5Jm2TotaDL+pHDM5pn1r0UuTZ24N8S5k68bLHW9tfD+2k4zGev23ExJb4YTRKWrj82N5LjJ26lj1BkGZ0CsXLGGELoPaYQomjTqPxYqhfwOwDliNGVqux9ffuybqOKgsbB51B1GbZfG8vHDBE2JQGib1mnCmWOWAMJcHN0cKeDHYTflbDTVXajtr68mwfRje6WueQ/6yWqmZMLWNH7P27zGFhMFqaqfg11Q88g/9UA/FROe9yfq0yOO0pnNAxvepFy2BpEbcgG+mCyjCC01JWlOZlIPdf1TtlyOt7L94ToYGCukoFt4OqwOrofamjECpSgKLLmrRM+sNRAw12eaqk8KtdFk7pn2IcDQiPXCh16t1a+psi+w9towHTKPyQM0StKr61b2BnN1HU+aezFNBLfHTiXwhGTbdxLLmrsAGIVSiNAeCGE8GlB0iOv2v78kP0CTmAPUEqnHYRSDlP+L6m/rYjEK6Q85GRDJi2W20/7NLPpSOaMR++IFvpkcwRuc59j8hh9tYlc1xjdt2jmp9KJczB7U9P43inuxLOv11P5/HYH5d6gLB0CsbGC8APjh+EcCP0zFWqlaACZweLhVfv3yiyd8R3bdVg8sRKsxPvhDaPpiFp9+MN+0Ua0bsPr+lhxfZhMhlevkLbR4ZvcSRP6ApQLy3+eMh9ehCB3z5DVAaN3P6J8pi5Qa88ZQsOuCTWyH6q8yMfBw8y8nm6jaOxJhPH6Hf0I4jmALUBsWKH4gWBnyijHh7z3/1HhQzFLRDRrIQwUtu11yk7U0gDw/FatOIZOJaBx3UqbUxSZ6dboFPm5pAyyXC2wYdSWlpZx/D2C6hDO2sJM4HT9IKWWmDkZIO2si/6BKHruXIEDpfAtz3xDlIdKnnlqnkfCyy6vNOPyuoWsSWBeiN0mcfIrnOtp2j7bxjOkr25skfS/lwOC692cEp7TKSlymbsyzoWg/0AN66SvQYo6BqpNwPpTaUu25zMWlwVUdfu1EEdc0O06TI0JmHk4f6GZQbfOs//OdgtGPO6uLoadJycR8Z80rkd88QoNmimZd8vcpQKScCFkxH1RMTkPlN3K7CL/NSMOiXEvxrn9VyUPFee63uRflgaPMSsafvqMgzTt3T1RaHNLLFatQbD0Vha4YXZ/6Ake7onM65nC9cyLkteYkDfHoJtef7wCrWXTK0+vH38VUBcFJP0+uUXpkiK0gDXNA39HL/qdVcaOA16kd2gzq8aHpNSaKtgMLJC6fdLLS/I/4lUWV2+djY9Rc3QuJOUrlHFQERtXN4xJaAHZERCUQZ9ND2pEtZg8dsnilcnqmqYn3c1sRyK0ziKpHNytEyi2gmzxEFchvT1uBWxZUikkAlWuyqvvhteSG9kFhTLNM97s3X1iS2UbE6cvApgbmeJ/KqtP0NNT3bZiG9TURInCZtVsNZzYus6On0wcdMlVfqo8XLhT5ojaOk4DtCyeoQkBt1mf5luFNaLFjI/1cnPefyCQwcq5ia/4pN4NB+xE/3SEPsliJypS964SI6o5fDVa0IERR8DoeQ+1iyRLU1qGYexB61ph4pkG1rf3c2YD6By1pFCmww9B0r2VjFeaubkIdgWx4RKLQRPLENdGo8ezI5mkNtdCws19aP1uHhenD+HKa8GDeLulb2fiMRhU2xJzzz9e4yOMPvEnGEfbCiQ17nUDpcFDWthr68mhZ4WiHUkRpaVWJNExuULcGkuyVLsQj59pf6OHFR7tofhy9FMrWPCEvX1d5sCVJt8yBFiB6NoOuwMy4wlso9I2G4E5/5B2c6vIZUUY9fFujT3hpkdTuVhbhBwLCtnlIjBpN4cq+waZ0wXSrmebcl+dcrb7sPh9jKxFINkScDTBgjSUfLkC3huJJs/M4M8AOFxbbSIVpBUarYFmLpGsv+V6TJnWNTwI41tubwo7QSI1VOdRKT/Pp8U3oK2ciDbeuWnAGAANvQjGfcewdAdo6H83XzqlK/4yudtFHJSv9Y+qJskwnVToH1I0+tJ3vsLBXtlvMzLIxUj/8LcqZnrNHfVRgabFNXW0qpUvDgxnP3f54KooR3NI+2Q/VHAYFigMkQE5dLH6C6fGs/TKeE6E2jOhZQcP9/rrJjJKcLYdn5cw6XLCUe9F7quk5Yhac+nYL5HOXvp6Q/5qbiQHkuebanX77YSNx34YaWYpcEHuY1u/lEVTCQ7taPaw3oNcn/qJhMzGPZUs3XAq48wj/hCIO2d5aFdfXnS0yg57/jxzDJBwkdOgeVnyyh19Iz1UqiysT4J1eeKwUuWEYln23ydtP7g3R1BnvnxqFPAnOMgOIop2dkXPfUh/9ZKV3ZQbZNactPD4ql5Qg9CxSBnIwzlj/tseQKWRstwNbf17neGwDFFWdm/8f+nDWt/WlKV3MUiAm3ci6xXMDSL5ubPXBg/gKEE7TsZVGUcrIbdXILcMngvGs7unvlPJh6oadeBDqiAviIZ/iyiUMdQZAuf/YBAY0VP1hcgInuWoKbx31AOjyTN2OOHrlthB3ny9JKHOAc8BMvqopikPldcwIQoFxTccKKIeI815GcwaKDLsMbCsxegrzXl8E0bpic/xffU9y1DCgeKZoF2PIY77RIn6kSRdBiGd8NtNwT74dyeFBMkYraPkudN26x9NPuBt4iCOAnBFaNSKVgKiZQruw22kM1fgBKG7cPYAxdHJ8M4V/jzBn2jEJg+jk/jjV4oMmMNOpKB5oVpVh7tK529Z+5vKZ0NSY2A4YdcT0x4BdkoNEDrpsTmekSTjvx9ZBiTHrm9M/n/hGmgpjz4WEjttRfAEy5DYH5vCK/9GuVPa4hoApFaNlrFD/n2PpKOw24iKujKhVIz41p1E0HwsCd/c17OA0H0RjZi1V/rjJLexUzpmXTMIMuzaOBbU4dxvQMgyvxJvR6DyF3BaHkaqT4P3FRYlm+zh8EEGgmkNqD1WRUubDW62VqLoH8UEelIpL7C8CguWWGGCAIDPma9bnh+7IJSt0Cn6ACER2mYk8dLsrN70RUVLiE0ig+08yPY9IOtuqHf/KYsT84BwhMcVq7t8q1WVjpJGNyXdtIPIjhAzabtrX03Itn29QO3TCixE9WpkHIOdAoGvqCrw1D3x9g9Px8u0yZZuulZuGy0veSY34KDSlhsO1zx2ZMrpDBzCHPB4niwApk6NevIvmBxU3+4yaewDvgEQDJ6Of5iRxjAIpp9UO8EzNY4blj4qh8SCSZTqbe/lShE6tNU9Y5IoWHeJxPcHF9KwYQD7lFcIpcscHrcfkHJfL2lL1zczKywEF7BwkjXEirgBcvNWayatqdTVT5oLbzTmED3EOYBSXFyb2VIYk3t0dOZWJdG1nP+W7Qfyeb8MSIyUGKEA57ptPxrPHKYGZPHsuBqQuVSrn0i8KJX+rlzAqo8AawchsJ26FckxTf5+joTcw+2y8c8bushpRYEbgrdr64ltEYPV2AbVgKXV3XACoD1gbs01CExbJALkuItjfYN3+6I8kbiTYmdzBLaNC+xu9z/eXcRQV1Lo8cJoSsKyWJPuTncu5vcmfMUAWmuwhjymK1rhYR8pQMXNQg9X+5ha5fEnap+LhUL1d5SURZz9rGdOWLhrMcMKSaU3LhOQ/6a6qSCwgzQxCW2gFs53fpvfWxhH+xDHdKRV6w29nQ6rNqd9by+zm1OpzYyJwvFyOkrVXQUwt4HaapnweCa7Tj2Mp/tT4YcY3Q/tk1czgkzlV5mpDrdp1spOYB8ionAwxujjdhj5y9qEHu0uc36PAKAYsKLaEoiwPnob0pdluPWdv4sNSlG8GWViI+x/Z4DkW/kSs2iE3ADFjg4TCvgCbX3v0Hz0KZkerrpzEIukAusidDs2g/w0zgmLnZXvVr5kkpwQTLZ0L6uaTHl0LVikIuNIVPmL3fOQJqIdfzymUN0zucIrDintBn6ICl/inj5zteISv5hEMGMqtHc2ghcFJvmH3ZhIZi34vqqTFCb9pltTYz582Y3dwYaHb9khdfve1YryzEwEKbI8qm62qv+NyllC+WxLLAJjz0ZaEF2aTn35qeFmkbP6LDYcbwqWxA0WKsteB7vy8bRHE4r8LhubWDc0pbe90XckSDDAkRej0TQlmWsWwaz18Tx2phykVvwuIRzf4kt9srT8N7gsMjMs0NLAAldabFf2tiMoaaxHcZSX51WPc1BrwApMxih227qTZkcgtkdK1h314XvZKUKh/XysWYnk1ST4kiBI1B9OlfTjB3WHzTAReFLofsGtikwpIXzQBc/gOjz2Thlj36WN0sxyf4RmAFtrYt64fwm+ThjbhlmUTZzebLl4yAkAqzJSfjPBZS2H/IvkkTUdVh0qdB6EuiHEjEil5lk9BTPzxmoW4Jx543hiyy4ASdYA2DNoprsR9iwGFwFG3F2vIROy4L5CZrl230+k733JwboSNBKngsaFPtqo+q3mFFSjC1k0kIAFmKihaYSwaSF7konmYHZWmchuaq15TpneA2ADSRvA07I7US0lTOOfKrgxhzRl0uJihcEZhhYWxObjvNTJ/5sR4Aa5wOQhGClGLb746cJhQ2E6Jie1hbGgWxUH7YSKETptrTeR/xfcMNk2WM12S0XElC9klR8O7jLYekEOZdscP0ypSdoCVZAoK+2ju2PHE869Q9rxCs9DVQco4BriiPbCjN/8tBjsah4IuboR5QbmbyDpcdXVxGMxvWKIjocBuKbjb+B4HvkunbG0wX0IFCjQKoNMFIKcJSJXtkP3EO+J16uh4img0LQlBAOYwBLupu5r1NALMo0g3xkd9b4f7KoCBWHeyk24FmYUCy/PGLv0xErOTyORp8TJ5nnc2k1dOVBTJok7iHye9dwxwRVP3c7eAS8pMmJYHGpzIHz6ii2WJm8HMTPAZdA4q+ugj3PNCL/N45kyglqvQV4f/+ryDDG5RPy5HVoV9FVuJcq2dxF9Y0heVoipV6q1LyfAeuMzbsUV+rsSBmCSV+1CdKlxy0T0Y6Om0X6701URm2Ml6DIQgJ/3KO6kwcMYRrmKsY7TfxWhSXZll+1PfyRXe9HS0t1IKTQMZL7ZqQ8D/o+en57Y9XAQ9C+kZYykNr0xOMxEwu2+Cppm69mQyTm3H7QX6kHvXF201r+KVAf354qypJC5OHSeBU47bM1bTaVmdVEWQ+9CcvvHdu8Ue5UndHM+EeukmR82voQpetZ7WJjyXs+tPS60nk09gymuORoHNtbm0VuvyigiEvOsyHiRBW7V6FyTCppLPEHvesan91SlEh1/QEunq+qgREFXByDwNKcAH5s8/RFg8hP4wcPmFqX0xXGSKY087bqRLsBZe52jThx0XLkhKQUWPvI18WQQS3g2Ra1pzQ1oNFKdfJJjyaH5tJH6w0/upJobwB8KZ5cIs9LnVGxfBaHXBfvLkNpab7dpU6TdcbBIc+A4bqXE/Xt8/xsGQOdoXra4Us5nDAM6v2BNBQaGMmgMfQQV+ikTteSHvyl8wUxULiYRIEKaiDxpBJnyf9OoqQdZVJ8ahqOvuwqq5mnDUAUzUr/Lvs1wLu2F+r4eZMfJPL4gV5mKLkITmozRnTvA7VABaxZmFRtkhvU5iH9RQ1z26ku7aABokvptx7RKZBVL6dveLKOzg0NC7HAxcg5kE1wuyJiEQLOpO0ma3AtWD2Q2Wmn2oPZeDYAwVyEpxuwDy7ivmdUDSL95ol3h2JByTMovOCgxZ1q4E5nwwa7+4WtDAse6bDdr27XgAi5Px3IWbyZ/vRiECKwOMeJSuIl8A4Ds0emI3SgKVVWVO5uyiEUET+ucEq0casA+DQyhzRc8j+Plo0pxKynB/t0uXod1FVV4fX1sC4kDfwFaUDGQ4p9HYgaMqIWX3OF/S8+vcR0JS0bDapWKJwAIIQiRUzvh5YwtzkjccbbrT9Ky/qt5X7MAGA0lzh43mDF9EB6lCGuO/aFCMhdOqNryvd73KdJNy3mxtT8AqgmG4xq7eE1jKu6rV0g8UGyMatzyIMjiOCf4lIJFzAfwDbIfC72TJ/TK+cGsLR8blpjlEILjD8Mxr7IffhbFhgo12CzXRQ2O8JqBJ70+t12385tSmFC8Or+U8svOaoGoojT1/EmjRMT7x2iTUZ7Ny02VGeMZTtGy029tGN1/9k7x3mFu63lYnaWjfJT1m1zpWO3HSXpGkFqVd/m3kDMv4X9rmLOpwEeu8r6TI6C2zUG+MT6v90OU3y5hKqLhpyFLGtkZhDmUg/W1JGSmA8N1TapR4Kny+P6+DuMadZ9+xBbv06nfOjMwkoTsjG0zFmNbvlxEjw+Pl5QYK+V8Qyb+nknZ0Nb/Ofi9+V0eoNtTrtD1/0wzUGGG5u2D/J1ouO/PjXFJVx6LurVnPOyFVbZx7s3ZSjSq+7YN3wzTbFbUvP8GBh7cKieJt56SIowQ2I577+UEXrxUKMFO+XaLLCALuiJWB2vUdpsT+kQ+adoeTfwOulXhd/KZ7ygjj6PhvGT1xzfT7hTwd6dzSB4xV70CesHC0dsg2VyujlMGBKjg5snbrHHX/LNj3SsoLGSX+bZNTDDCNTXh+dCVPlj4K8+hJ/kVddrbtZw26Hx5qYiv3oNNg5blHRSPtmojhZmBQAz8sLC9nAuWNSz1dIofFtlryEKklbdkhBCcx5dhj7pinXDNlCeatCeTCEjYCpZ3HRf5QzUcRR1Tdb3gwtYtpPdgMxmWfJGoZSu1EsCJbIhS16Ed97+8br4Ar1mB1GcnZVx/HPtJl4CgbHXrrDPwlE4od8deRQYLt9IlsvCqgesMmLAVxB+igH7WGTcY/e3lLHJ4rkBgh2p1QpUBRb/cSQsJCbosFDkalbJigimldVK7TIHKSq2w8mezku9hgw8fXJxGdXoL1ggma52kXzjP78l0d0zMwtTVlt0FqnRyGLPGEjmICzgSp7XPFlUr7AeMclQ4opqwBFInziM5F8oJJ8qeuckGOnAcZZOLl1+ZhGF17pfIuujipwFJL7ChIIB2vlo0IQZGTJPNa2YjNcGUw+a/gWYLkCp+bOGIYhWr08UIE709ZEHlUoEbumzgpJv1D0+hWYNEpj+laoZIK5weO2DFwLL6UBYNrXTm9YvvxeN9U9oKsB3zKBwzFFwDgid5ESMhy68xBnVa55sCZd+l5AnzT8etYjIwF/BGwEx1jjzFv32bk6EeJulESARh8RZ48o7rKw67UZpudPa15SDnL8AL8xMV2SC0D1P53p190zhCFkMmEiir2olwxcJppl/kLm6/0QSUQLNaxi1AC3Pg1CTosX2YQr73PjEIxIlg4mJ62vP7ZyoHE55B0SX9YrrrCPtNsrJEwtn6KOSt7nLT3n3DLJTPbLulcqQ1kETP6Huts29oP+JLEqRGWgnrqMD+mhCl1XCZifjgQ39AeudE8pyu2DqnYU3PyPbJhStq1HbP+VxgseWL+hQ+4w1okADlA9WqoaRuoS7IY77Cm40cJiE6FLomUMltT+xO3Upcv5dzSh9F57hodSBnMHukcH1kd9tqlpprBQ/Ij9E+wMQXrZG5PlzwYJ6jmRdnQtRj64wC/7vsDaaMFteBOUDR4ebRrNZJHhwlNEK9Bz3k7jqOV5KJpL74p2sQnd7vLE374Jz+G7H3RUbX17SobYOe9wKkL/Ja/zeiKExOBmPo0X29bURQMxJkN4ddbrHnOkn6+M1zTZHo0efsB23WSSsByfmye2ZuTEZ12J3Y8ffT6Fcv8XVfA/k+p+xJGreKHJRVUIBqfEIlRt987/QXkssXuvLkECSpVEBs+gE1meB6Xn1RWISG6sV3+KOVjiE9wGdRHS8rmTERRnk0mDNU/+kOQYN/6jdeq0IHeh9c6xlSNICo9OcX1MmAiEuvGay43xCZgxHeZqD7etZMigoJI5V2q7xDcXcPort7AEjLwWlEf4ouzy2iPa3lxpcJWdIcHjhLZf1zg/Kv3/yN1voOmCLrI1Fe0MuFbB0TFSUt+t4Wqe2Mj1o2KS0TFQPGRlFm26IvVP9OXKIQkjfueRtMPoqLfVgDhplKvWWJA673+52FgEEgm+HwEgzOjaTuBz639XtCTwaQL/DrCeRdXun0VU3HDmNmTkc6YrNR6tTVWnbqHwykSBswchFLnvouR0KRhDhZiTYYYNWdvXzY+61Jz5IBcTJavGXr9BcHdk/3tqaLbwCbfpwjxCFSUs1xfFcRzRfMAl+QYuCpsYGz9H01poc1LyzhXwmODmUSg/xFq/RosgYikz4Om/ni9QCcr28ZPISaKrY7O+CspM/s+sHtnA9o9WgFWhcBX2LDN2/AL5uB6UxL/RaBp7EI+JHGz6MeLfvSNJnBgI9THFdUwmg1AXb9pvd7ccLqRdmcHLRT1I2VuEAghBduBm7pHNrZIjb2UVrijpZPlGL68hr+SDlC31mdis0BjP4aZFEOcw+uB17y5u7WOnho60Vcy7gRr7BZ9z5zY1uIwo+tW1YKpuQpdR0Vi7AxKmaIa4jXTjUh7MRlNM0W/Ut/CSD7atFd4soMsX7QbcrUZZaWuN0KOVCL9E09UcJlX+esWK56mre/s6UO9ks0owQ+foaVopkuKG+HZYbE1L1e0VwY2J53aCpwC77HqtpyNtoIlBVzOPtFvzBpDV9TjiP3CcTTGqLKh+m7urHvtHSB/+cGuRk4SsTma9sPCVJ19UPvaAv5WB8u57lNeUewwKpXmmKm5XZV91+FqCCT6nVrrrOgXfYmGFlVjqsSn3/yufkGIdtmdD0yVBcYFR3hDx43e3E4iuiEtP3Me9gcsBqveQdKojKR//qD2nEDY0IktMgFvH+SqVWi9mAorym92NEGbY8MeDjp553MiTXCRSASPt+Ga5q7pB9vwFQCTpaoevx0yEfrq9rMs3eU6wclBMJ9Ve8m6QuLYZ58J41YG3jW/khW92h6M/vbFIUPuopZ6VVtpciesU74Ef7ic8iSymDohGeUn4ubT0vRsXmbsjaJaYhL8f+8I5EiD5l680MJbxX/4GYrOg4iPQqpKp0qddSu/HKtznHeVyxgTwhfEORMCwnaqetVSzvidaWN9P+fXtGXfEP9cTdwx2gKVfDdICq7hecgRhIs0qlCt6+5pGlCc6kWoplHa/KjP+FJdXBU/IDoKMxRjFhSYkggIkhvRKiN/b2ud8URPF+lB87AGAwyMjr/Wju2Uj5IrppXZWjI3d14BdKE2fhALyQPmHqqA+AXd2LwvRHcBq4mhOQ4oNRWH7wpzc6Pggfcbv9kqhLxrJKEaJqA6Rxi+TDNOJstd5DoRVCDjmVspCVyHJsFEWPg9+NA8l1e4X2PDvOd5MPZAGw6LRhWqeZoSQcPf9/dGJYAyzCmttlRnx0BfrKQ/G9i5DVJft9fuJwMi3OD/0Dv1bRoxcXAyZ0wMJ6rwk9RjRTF4ZK8JviCCNuVt/BqQYiphOzWCpnbwOZt6qXuiAabQWrS4mNXQ7cEErXR/yJcbdFp5nWE1bPBjD0fmG3ovMxmOq5blpcOs0DtNQpci1t+9DKERWAO53IVV/S4yhMklvIp0j0FIQgwjdUptqmoMYGVWSI5YkTKLHZdXRDv9zs+HdFZt1QVcdlGOgATro3fg6ticCrDQKUJC7bYX50wdvetilEwVenHhlr85HMLRLTD6nDXWId4ORLwwe5IXiOhpuZTVTv+xdkTxJofqeCRM/jcZqQlU0gFVTlYlfwMi6HKR2YG4fQ8TOtgR+yV+BMZb6L5OwDc/28/xdfD7GXFaVA2ZSObiIxBwT2Zev637EuvpM6rxcogdM4FJFa0ZhF7nrqtNsqWg5M7hZMORpjd4szf/wS+Ahs1shY54Ct5J1dOBO4sdEtSnRc0P9PhgyOCt6aQW98R22DpAcNTDe72AHK40vutKTPfpokghRPuGvz0dulBPKfC3O4KVDCyWrJGO7Ikdu06A0keKlVfi0tGcpO0NhzXEh75NHyMysAMV19fq7//sPC0For1k2uFEvq8lwrMAfmP7afR69U2RqaILHe7glpc8HmVf87Qb2ohsw+Di9U+ePdHLecS66MhB/0OwdcXR5WBcWTZLGq/kiAaT+bzkjR8GIpWdv6pfIgQ+Q0xdiKvo+gNB7/Nf9knNJGxnh7LeZEFtMn517tNc74PPS0M4K3I6HHZqNPA+VZcBc/g5a2ARyqKrJ4Z3krsuA+VOJJz2KJpBMgCCWFln3u7k6/q3DETAubKG/pt3ObaNT0NI0Qug90L2ip5dHnZJUjPTvK5E96aX/4mRU2u8n8kh6MKbY7ANBro3huF06U+JvfyELQP25oIaj+n0ITQ4KT9rXZD4EtBIOj95fYNldDN3io/VMIvWNj9P/b95WEMq8UAVfG2XG0N6fSYdnBEC7sUEbatbDICH9qA8TTuW9kEt9DlFOZFP7bdfYLa/khSY8W5K/AkIIAPXtMvyVKyESjKx9nfragssxC0jFMVY94d8lOAwRocdS/l/P43cBGa3IqDa0ihGPcmwS8O8Vj16Uy55rOrnN0shhRJZdW8I7F0Q0KeHc35GFo4aJOFc25gNafBu1V/VO0qS4Qkb6wjRrnlepUWjtYyaDABZceValuOMtoDdeIITWKOJiwGPpB12lQgwkmXh9M86podb0D117mNQ8ElluFvbaS8RTKQ6lyj88dUwoJU/ofOeubhoXWBF8eNumkVJu+As3ED/AvLlrV91UowIWI2m8HBG+a3k247ZKAGYsOcWe7fTWqL8eqwM5ZFuoXbeugPKuMOAtOsN+4dSwkhrSAlfGNTzFwEmCNWtzpa9CgPbYNcmoHtO8pj8qMvlGET6nrkJoQ2lp5MEUV1E2A4ZH70JUlCLXvqTIpZlzyxdr5p/GZiD1/BuFOGbyfFzhuxaC/l3lC2jjt6GNRBa06AqqPlYtdA7kiidYa5Qi0/XpXiMDyMXNOj3kmJEaXufW0GO8+DF8OoMULX1vvjCePKNis4AmxQKLCF+cjf/wyilCJvuiyLVPSdsuRTPZ0AhpdDF/1uFmDwG7iP3qYwNsKzqd3sYdnMolCOuQOIHWy1eQpWhuV+jmSeAC5zCc0/KsOIXkZPdiw8vtB33jEBpezpGDBP4JLY2wH1J7Fzp8y8RICqVd25mDT2tDb/L1mh4fv9TOfDH5dTeATqu+diOZi+/sIt18hiTovPsVQVaqXLPRx/4R/uH/86tBMcF+WBkThKLfblcVCIECc8DgNRVX97KdrsCeIK+CvJZMfwrftcDZDZyp7G8HeKl7bPYnTKX88dXAwAyz66O2chkPDHy/2K2XcT/61XnlAKgPwtI8yP9Vu45yh55KHhJu93mL4nfo8szp/IyDjmFHtSMqqoWsj8WaVhbjXgzZxcqZcyOe7pUK6aXF/Y32LnBOt0WN28UmHRiOpL525C63I2JQPX8vvOU0fz2ij74OeJ1Apgu3JRObfdo9xGDpp7cv3TdULEfNS6Gu3EJu7drBsBsogUqUc6wAUW3ux0/1hLVI/JEKJrAGm8g72C2aJSsGAsKFW4CBvBXVlNIKa5r7HvT1BeGYBfxTR1vhNlFFNN8WQYwr39yT/13XzRGiF2IsfE8HcN0+lN1zN/OnzekVBKkFY11GgrK5CLxrE/2HCEMwQb9yOuP2rTXiZzTEETp/ismFGcTWmbM9G1Sn2D/x3G74uWYZY4rgKB2Zo2bTKS6QnM5x1Yee66Y1L7K44AyiY5K2MH5wrTwxMFh+S8LzNQ25z6sunWZyiRwFIIvSnioltUXNiOr+XMZ6O9h9HcHxZJkfF0tUm6QkU7iJ2ozXARitiL86aqVsMOpmvdIBROhUoanPtCjgft8up3hAaKpw9Qs9MzYtBA2ijHXotzarkV3zKEK0dFFQUwT74NgCmGGuSCEDmFCezXPC9BhyGhmzNa6rQeQQz+r9CmGUZjIQEPsHwe86oCOQhWaHERsv5ia9rZvJ//7UXO7B329YUkLLAiqpLRsVV5XpcfdawlJqi/BVcCqO6dr9YJTFFRMVGhfUbB9YWNvYPY6RyaydAFYq1YIBQxuNAGfYWLMAHtt2XRHoOKCLz+qf5HCVBDOPOktQ3SdJBfxUkaiD585bmTzMwU3oeXUHZ55EC99Kz9kk4ZXMIENwVVpqW2JmGIcUiutIMj2KkpjE2QD+dIZUCxcX57kH7hiuUPnKCTdaw4KN95XPeFRvMcvo5L8LexWqvaJPECzwXCs/4XPAlSMpWUzBBjK3pEnkbueMkMJQrYcnXf7PjbAoJra1VLX4YuscQLpaeYWbT+h24hCFrfcHjxxx6WTSe4AGY/KHRZCQKqTuFWt0D8RmGWmvXSdg1ptIefYPshuIVZT7CV4Ny67fvjJugy0TNYHqoCO45CB88kxrvIsih19DqjD0UqiJsTFPcGW3P/ULOG3nb8CjpgVTIoa5nO9ZYEX4uEHu8hLXrJPjV1lTQ5xTdZVagg+Wj8V0EE4yPsTc345KM6lVXqLiHtm+G6edC4GVEiPgd98g+twSYm18gCsPnjqlLcFm9e72CLJbYD+ocIZOxuVjrX6IKh9fh7WqdIZ66x9PWkDGOVVGkx7jM76Ywe16DX9ng205kg5eq+R2q2MguTJxYv/wWHliD9mOYpzZKNXYC3Wr4iBGkm54hBwkPzFhiX/VBHdVH/KJ1ZIMOHxIN6arKdxrm6EBsgwDt0mPe0MX1HRUMq8ctcmysU6xX0bzM1J07kAvq33jw1q0Pq2cyMWme8F7aVkfhzZEFdyi8fVBQav0YZqvAjZ83WKH726rBx5Bn7GHFthR6H4lFsltu+jWmsAibJ3kpWMG/QbncU7n9skIBL0MuXXtj9sJg+4Dl0XhKJ1LcrMydaIgyrgZgScP4k8YQvcsBmD26X1iYXKLzMYfZn2IfRjznsrJ1e5cnl/3a5xiNoI6n1x1U36FWckJbyx+hiSZg0QqAqeeSvzFYMlZ2REnO/a6yoQhu7PdHMYEPFIvfyGeyCU8e7rpju4DrlOhszj9rOIpNsvCkuD+TLyf5J7D/wsPkBpscFVI1q7oUSU9bN30vH5AqnO7bsf+9rGhtVjOJQ32H9hHSAzR2ape4L0Cz4WxaySm4jvuGXwkFp5NMMLrgZ8LdA+5uLuyxO5SMOmJNDBcbbLefv7z6LyxBwltnfQLd7qqpG1MmNcoLUcx73BkNF/xpdS0cKd6G646ntChXSeTZJJTFYGw39T7fqXDPKoG2cF7/ZcTvME42gXLVjTqzAER1Rt5m7GYsh0X0+XgOeW9MJqE5j/rpGzY6vUu6ACcCTzDMdZHiWELpDnvgE1hmztLcSYz0MtNyUBLqvylUJJnJu79Sku9NMHCTkgqozTnhMFfduV2NLCSYvAI5HUvQp1h/M02vKFD6eosIkGTg6mujUo1W8hy5Knf/erkBQC9LzNqPAYCgR+hczgevta88NNqSlBZryq9QNeUK7RpbvHjoNhUKAAeNYH55LeTW36KyFaXdAkBvyNP9xmRuBokPi2OhqDby6IZ61mwfzG+GmACkS+G80A4WGON5izgJWeeDK91jzusfOi0RmEsVJXwbVUr8u/J2LCQaMnHhi+wJTEPN9tS2b6W4GRGCNmtjAMgPsP357nOeD3H2tcDAPu5xQBKMHf/j4ZhXlkvvy3YmBJsjsd4pSOlfPZCnw5JvzxEXM5JIc+E2mU4CgB0mdJnH4NEsCHYNeVRDXFNuyZUE4nuvaJf1h+11AWLdAZ72D9XNRcxfb2+XHZN/SN48U7yl+sNZhg5gn/PD8wkBtnRj1zBUPIWnoMP6yGUEEzuT+VaX3x2jEIZAZsr3rs9wCfY1Ss0EdIFFzBbyruUup4EPanbSYew5tf16/ZWVup5iykttuqL4xoC/jdZWsAZeSfDSd3fP9kbyAFYXkf0Q2lmxaTkKRZrCo9XCoiUG4yP1URJ5G7+HSOhhJp0Anz0N07QZtyFUye6rcgiOFbtyoO1lkuV0iQ602MTyFK9xLqNHtNy4cJaTO6hjtiwNynVc34ZA6H7k8ai6S6eF6jIG0xJx+JfP97lzuCZr8vU5SIzImaNpiQhyvDbz23//PJcOk7hD4iIvJzfIgOGIR6ZPEJpWHZQoacbF+omeHw8aWHaNOfaIyGeG4lEryMfhtNmWh4RAIpn8dLs7ZE2eTVDwK++xDoSUgh47WDmKlZ/k6OosEUoQjk7Q+Kp7OxwgMFShAv6z4pTW8loVj2+qXLQ0T3hmIue8qHy1o/HXjm089m71t6mrrUyDftqMYtmfvQXKDlZ+K1HR/FkqPSqcjGlcPPIwbMw3wIFKBdVMJ4pFLt+oOIkWZMw8pkoYZ3byw4LmAF+7BdicGXFcb5PWtDw5XNNVc6eB9dv0rAEpgr5J+bLr010bpfGw+IkRoxDbkDFmQdEQUSElP5bViLo1ur/23KN0jEwl+rGC6AUMKxHcv+T9F1Ktpn8jSSrKxJnVkK8UD/tH5DN6nXB8mjUdFU539e9ywLtLYCwmHYVEVqnFmdubduaSd1ivIo4pTsX+mJcOAkrR1D60RIoocCBIdwJhCBM1rOE2XSlPo0U+khALvw+zfxYzwzd4roWlLJkZheFRR8QB8v4USwmAcDswUZ2P/7v7Xa51Fs7orYebYyww4YW5869Y/c6Kq2eTR9HLSjYuChTkXaDygoo8nz/yJ0KzfX8oowaNAwz8HvQdlLU9V9hjqYMURyYvPzZ60G0itmUdZwB+sY6rUkMAZZtWStbDFmnk/dQorhwr3121XQWffrK3as0g29ASwxbsZ3dZAq/96b7/XWckbjmo8+jwdE680DzoEUUivnBgowMuBQxHXoGyp+w/cSGY88rWtmwoyNNIvChs/QsZRnbdV7y8x7t2RkliJV/j8e6qfctrTsMV22zoqgQuTSNFh7U7p/Q49L0kygXNnEYXCBDgi5BeNWxu7VjULcUHI+lGj+OTCEATzWrDmaynq3wT9IAejtvh3esCu6sEu9JOsXxMDpqxm4Tzl+pt2Wa5Bq3TM5TKH4N7KLir8FGIPA569+uJ1VEL3fW8Jyigz/nEUjAVYrdCWq2MnS4hQVgcvXq9aF7Xke/k++rAtIQqckPNwjKrV2t7HCOrA1ps88Y5Rw1Zp+9itnB71j8tNiQc7mV1kUCQXkoi5fOsq1uC6hUPUL7Z69NAM6lg0c/aeiifHoi35v+pVBh7CDM1XfvYpiK5JIbIQFHafmnhHfRTnMagKcjdE7zzgtxkTPKVrObTySTT51g9bB5ro/dzn/sB24fNM2LGJuRQsmC49PLi1jTRfZaLpo8Txxxczij5Pl2vur+S1wQW3W5qyVcIUySZHtFDQHv+EYDoZG1T1J7D91vEIV8dHzUBzW1UyuxRbP+M/CM/vsas6RzmS5traXnQ0Jzv9hYXxKHcs15TQCP744XsLjzFjILYURXFnhM+nnV0iO6nwls9TR4tlz1J9/NvE8FGg5mgpZA4htS05AK0NnU2gxuqf2vjCyWlm3ypKvaX4vxh8Um1MHGB2NTeAFhbDyGm+5w2zqJAWxVlj6dVePb5yR+aMhuz05YubCQJ0BOtoYQ6PoDoW5fCwCtXj5SHvCgL/3B5z2mcXWaRTf8/GsFAfX/ntdWZWFc2xg8MJeenwZ4dZUToce43If4zVb1ex3BMAWGhgkPwR5EgktZhW3Yi+nsnZTUr9FYI160YhAraB0zMV+ouHz6hYm25/ETDM0MTmcypoGgZISSkfwYAQaHGY45yZ91K4A4Mm4fnbMk8GTc4orypT3NLBqAxYdcY/qCH82PpIkmVOEHi1NoYaUymuImLLcib5pmd2MHTB3JR+4rLdRc3gtQ9zeFdciciRiWviu3HkqaLSxJeI2rgc7OKQslItumACQow89elXmi4P3gTZeCauvMH5nF4VrBcLjjwGD+KlKqe/RWIEgT2wGqAgSuL6b+RTTPnQZzxZ5y5HQJkEEKJp5NfoB8hJBM8qn6xbOFtyzBjVBrwSS1zCJR3lEc9ODQ5Wu/xct9/2Q6qLHnmNx6XwZus/i8rEd6UsVxGtoDrm+Br0L5oUojlwdcqyVV4PIMsR60JhZwJtgX7izQWj+GOeF9DA8Wexdmv6DWjgR8LEBp9YuPAM8tJDu3uCumNqHnF2ATYX/tuVO55OgQuiUhmDmJbF9jJyifBRtxOVI9DCNLUY71IXZYTuiYcnILQ/XHuVJ8aHDStL0N+3eYNvXwHi2vEiTPnBqzsC4TsPnFVnYY042j5i7C11AVdBZ1pGSa52jM9dIL119rry0mgGxFzI8xPs+7bmMfYKh37A4HtA081olG1m9S4Zch2hoNCGVvVhd6UL7C2d5hKIBHoB+Uxarq/4aQXhh7IWjSj+ca7Vhqb4+ZwY3nHXh2S9JH4XZxQojbe/eINxYlozTYtT2rpU/xbj+W2hXjFQ+z+dQ8wh9751MP0UpjutQdxz3/FJYAEG5BF400JXWCBs7KrCRf/l+F+d9EuwVk6thOPDB+HNS9iWlLmDgXvY6K0vgiyoeA3An+jWufdAG1suUMBuJT+/w0FNJZbObUT8c5q5WtQxASQF6E+/u8UwVBs1eo8jTamCrcdhZJlADJbqn3crcDHQlBQNGq7btcGKiJXW6q0cn3F0xzf+k1JJS2testB3rx15ZPTDXm8QV5XE2qxBOdM2n6t5YbxyNOmEdsHx+hMp+y9pWkcgw1NikeXuafJvzcjaNwE1Ad6gG79S68aO7jWpKgBETYLmV4ONHhBk7Be8tjf2WVvWMDQvQdOnk448yeMv1tQKU1xev0L171e/qxkMZbmkfKnd29XRCK2hgNNJhwt1qiYWZGKz7Di6K3fGDT7DO2YQ7WU33svE/WKGbWQEvzUV2w+VNYDocI4yxQ6i3i4zU2TjmjCwu5Pk+Ja9HSwLpEoUswq3tFJ1jimthgMXd7KjSl6Qd0K+vxWT8G4/+xITHsWDGSfQTSdFQth5uVVfa8wrkDZHTGVgpJys2ik+3I0dSf6TNo6A/sVptyY/kx1hdAWKPI6t/xj6s+fPMU3hg1vkEB0RRHq/tCy3KUUhzU/d0JKxTyjvUms5iy1GbOFco0NA4t83SK9sBmtLWm4kOLLflyxqgQYP08iyXwYXzKnlQ6VTipuaspSJ9g5H5Lu3eLMnPKbhcwuEg0VZ80ppJWjUnhS3rL35erzysp+fJhxsUs86m28/UwW+IgrS5Y0zWaxlFJ8xML5wk8sg1ragF+eNajyI0Y4mwStxt1RZH2BjaAhvu+SnNNIK88thEgZEsoHv+ii+OMmXJL7dnAiINVDz3tCnqDgpQX9OguNGgZj3axcjq1UgxDw785yNIpqNiLgv57399jVmJ0/RStNswaFIs6FtnkilFZldxj6m562jL4p5g3Y9XCiXRJX6nq2PGJFifFR7EyPG4jDMnBM4t+O8ZpEp3th7TCxEw+ZG4afHl4sNFaqxyLh6+979tt0Aq9BrqI+CS2U7HJoKiGmyVU1lFa3/0O5mNC1bzRgNMy+GXyifLwJP7FwUSUmxmVRpn+gnXWoIuswPutsiciurvN6lsMG7yqEc2Y5ZI3jrPgPq0xEKPZpF7teJa0TQn8BQL4Th+hjv2ByfwKookyXEmj0d1KMcsmfKaeKK3cZZubiYqmSCrnGpYTwgPk5itKucVtjViuswQsDR6TuyGSIHYvlz7wkLg1Rr0K9kV1o8RgABlhbLrN74cVWJW6TnfXN0q12JFMpUbEa8t1+j440FA+17o8qa8PQ9igkctVROVIfB3jU5vtGm5pYYHYSDvU2TEc15pIz19ka1q6c/7WXfF8+POkApdOw7nn7Kqz6V4tru7NXgnA/u0g6+fPRT3hp/QrDQwMsjwNCZxdWrR6pgCBDJNc7/KAlwC0UZ4yWQs0KsuwbbOgcTxQPK54wiXr7s+221hzZ8RVxfoRUKM3e4lpxHC83JllxlrV760tl06f7/65qhE1jhMfivAUXIXfRMe3uY/G2TpWYzDrw5Cm5cS062Bx9lhHq9gtJp8xZwAtSdSuW/Kd7+orEAiswA76N8ezmVGYgNaYlQ/xk930LAWAtKVBC4U6R08L45IohB1kFia7XJs0TcaT2zBZoLFuOGu4iJaoAnfjL3uS6gnRH7G7A+aT6ETlmkYUfgrBuaSLLDJfhPJe01PfN0oqBTeQURasl3N8BZiQSgdr0aDv3hPTiog4NSyfAUyy98WP7dnTDWQTY+Qwzgk1uxwRqHl5MpC/84Cuw1TXfRlgJrwPop10kCHjmffnFdxCe2J3R3J5j+3H/sZn3IUu3Suy+I+dAOMWvzwExNR3RRPVelZAhtarKlXPWNjPRIVP4JsAFSRXs3o/fSYAPaV/zP8q6DltH47/rYhCLdy/LrpOsbaLf09eACcClJosNefetNElkSFSuCgeY7oTAAl+8Y2zOXJb/bgEDpoDXfQqc6lnlBr/WsmVznkBS1M7ufiqpxvKXjwvR4WxLbh5NbMNy8LsnX4UiuAi8XonbSUcVZKQOWBYUecSOMj6jMG8gHu7WNreBHY90lV7FocDprSrSbexkAtMW9KlXcnrOyLnZdodGYdxz8aw71HztIqLhRdCOB6NyzHPoS2hDy6wLk0I5Jr2t+U0A+A7EsgSn/Ih03A5CspHnVF4MOic+Lck3m61Um+GHDEe4DrHBhmgtDlRQl1XJ/V/VumCHtUDDcZCkgjVMBOmVOGYW0Rcdi1ahdjhBcFlfjA+5cRjBop1aNDvdrf7CxkLVgxiCxhRctW8wczM8+kVmIrGtkaHGlr8y2D098HXE23r7fnJFUU68zyeyM265igNOGPzFG0dIgUDWN6S3ZcfMERJdWVvpGhVEHXNLeWqHiTcF3wOt0FbJY4XHEpmkoG9MQPJJ4ueQ01+MB+SR0rCSGzlE8zod19q75LlLWgzogpnJoD4gPxUYcX+Gpc5Ly4nk+Zm8LDXcNR7SNVxLh6NAcx8ekjb/AC7ADlRnfuHaHJaBodZr7RBX9FLTvocY6kY8bavdAkQicE9bbwGLkZu6whTCJ56lOvM39ijehpTOFqR3V53nQx4hfOvwRPU2y2w7UU8yiRbcyaX6jGJ9CRvl9ybV1tebTp5MMuMnwLcx/lven0w9T0atJuiUE2WtYGiVMaP3EchABl5AsyaCpu/BKAWDFvU2vaCL2/fJBKCKLjxG6xzT4Mh4wHhH3/EqsGSoQAHu2wbHmXHj2LvoW19GXDa2oyeKRwGG1PU+S7mE/S+UmjHiDF1oqJ0R5QsdjAZYN1MzpNX5YDqWYfhfdjAXyFQaVyGKkp1oEGTR8MK6jaGfRDFd41u2Ex8ac8jKPYu3pXsk8gu+m9tr1RVzTTuDsACW4S1h32yFHX7qpXSmA0QVEcR8W9j2Juu0pcYqTmdis88VgT3gq7iYue5Hx/3K6hFQa9rZrNSDcjaSQlNn4LSqs20bypnKqpzvnnxjMdz5StbzvoAJKgVZa4DLCVoJW765/KyTF4s4YztmAT1c0pTmKJHTpa106FegDo8p2zD6uOnwpYi0vJlRMDe9wPT6964UfAf6lq3qWypUOx9q6BbKEYt7K3gWMXDNN6wAm1fNnSOnZ4JkbPq7jLQrl0wL1V7QwO/sXneKGfTgUL28I5iPVG9dA2gS7Ki005JUR7Vmw4gX4TJvy1WS74cIXD08LCF5obqcZwamuoZ+FPMJEck0TLHjyH1baPr55/Cy0ptDfRJ7d89pbP48tLMHG5dO11Z8xSSpPGQSgXDWmpsNsmm+MvxJjMCi7OFDHxxpmTtjgnOCq+c7Fi1DybfhAntviKccz+sj+OPKPYOKeYYPLvq6MpUx/chSvBccg9dfbeqetQNCs3eiCFZTU1mrDido/mib64STMgsa+IKLk9PyxGGbVSQB9GsHto6f5prAFIbRDSItDedz3t5+Nn69FFS0nEfmkF7hKBmNVce5xv65USKGBoHYxJyutSGnRIq7vMDsAMvirOEJOzNi5Kt7fypuSU2c2Npo6UH5jMOkePH0TwgpammO3Fb2FX6f11309z/mqRmQ949HHRj/wMzKNx95M9pwKf+UQkMEwisL3YVotvHhCv4y00Ui0Ql8dR7tGqFcSdYtmoAOuAodkBNs4PZSjAAF7S/szwLddFMdCyB/dWPgFUiUE+WmUUCjYrKfJLQfNNpQ4NKaF57w7Kp/isZVwQPUJyjJavN3fQNKU+F74jVBJYQEcEdw0Niinyea0l9PJ1/AcTm/LI91RZjDvLI81pnat7RKU2P4/TnIAa3hIEfeg4iGQ+wTDlURK6YjNpN5s5VkQW9w7sDYKU4XmjyZsCQLxztqd4SDQvLyuPDhURAJXKfR1c7tq3mRu4usFHPqz7HgS0X7kNxiWWR3fb3uVwbgKpmgLYkwKrXKt09COw4MjhxeZlDXKy7nNLHXAIKPtferWQnZLboonQXK81x+BB3oUidBehK1swSXxVbscj/LsfONu/xYEXYPM3aMqIYd+2hAnFvDHbdrJLhGEd3sG5PyxqhzejhQJo9wauFK3xmPYqxB99J8zYU9/yzrEZNzzbvPoR9vUlE3Ha4zspVDzHHffPZMJ1VLZkKqGCf8ZqupqMt6T+NRPfmPm2xeDgvzMrRJEL4/zzlu7Z35smvzbgeC25VP2CUrZkRxEi15A0769ojdO1d7C9OG+swj1ROMM3NgKdeBADoRMeJkRZcZ1FbQu6C0BS9NNSaoxtFzYT4lX7+PQ7BKa84yrN+ujVVef+SgnEie1G0N+eOtbZF/UU+wkeerWjloYqFiqo0vBnmxh+TwNMo9I/8lfU2XTCT0K4OoWE08ipyNHjxHvfhY6qa3x4HzdQ8+jkiO5+j91YkihS5memfpFREHP/2veN5XcRue2zCVuAub8V6vDlOvyP+PBm+owyRhMmng5wwGGIXsOkQekXrXpE/6dFjkHwwoFoj5bIFiqp+4wHpSWRbv2xGrRpd2c87FzMP6Hfj/3LWIBqFiNOAxBw+AAP1XqUBszdZhzOSQrQS4Ein4fyV7MaGsB0VsMF4bPb4lx/foTGQRJv45LpoxDd84xCawHaX7jpXUrOdkFxx2oUvY2xqpgIvcVufwd+zAnaaVTnEyDXD7S/o/xrrk4mgTjXhcjj5Rzrbr23NmuZQvpdNzny5MCR9bwvIRIqzOZZLsstZSCDYa56JTvzxgBs20dYTtTUbe21uljlWqGfSh2bYAzOpf6UguK30ZxNXgLHs6Y6urtxFA5iLYvlue5mDONW0MOtQjhqr8fRbCkYneiDkvzHkQVT4F9v9vxh2SIGPBH8bZb8ugo/BSgXojeSdNXbBAIDsB6DUNSXnwlu/bFLaCqSbvu4+YLplwO1JbtrMf9ZUfsxerAZjB7E/zl3qwgK27FswemUmSM4i37YAVhQSocuV8AcDI/CSeCDNPavESshDQ8A/lVIrAJAMdP/rHXouiNU8RL/TIvfQiuZEb6dkIKMGGOW5kT8vO8pivWnT4v7qmwuJo52AS1r/RyQ2g/7c9ZJgmMIzf0GvJJRfMNu1utRNuLWHOm9JIMcJK3qiDtVpGCDP45W1oTTMUnMC91kYhP0GHjhCW8V38xhjHgFFBfuWMsmSQ9MvNqKXiqtUhDAkIy0PW7YSKaKUv6zctAiIk+Jt17kG6LpNVOeMvJnlVBaJSkKe0HTJJUMvf8R2zna35/yh2wNlWLzIP3BJR5aRNxkV94ICOlycI1/JYRZtzvWMNoIpQrdNvyBuBydhSwhRwPo079Xk/XQZpbhzN/KK4NbdJQV0JIMP+Y5UBIM3TTYlFGYVjcvA5yVozkimco91Fx/eo+ydgAx1gMezTh+bYxCtXPYkMoPdtaElRusxlmdSV9zgF4Np+iylun3LVxCycAFxGCFsmARf6y4I6zXY0tx81aQyalr3/ih+ZjxGNWdhItgNLdEZ/BOIJpPoAveh2bKbEFxU/M0+4xqDo3Ox8MnNn8Lmv15NJigSvJV+y2W/ZogEXNiv0/nuFzZGr0pKujOShzcdkEVlMw8mNZXZCbtM9V+mfawtLxCTvo+enFWhJcFv8LVTFycDjPGBXRQKNN+z68HJtYdpH++g5WdhQpCO+DE7Qdu6TmZgtetrpU2ZlgpslOx+4hb3aXaqbdc92LCh51er8vm1GQ9uWD9+fAPRV50ixhgc5zi2Jsg1xQVxzlaELRWJ5biyF+eCwNV0oFnTbBHr3Glm9qlGVOpoOsQC8hlNG88fxeAekkCGnHFn6i5WzyO7ShDYbZ2KM4eqndyy01v+6TFhmkxgc0dndt7EzRCcEfBxSaWZwcev6MDZcuvSZQ9CNSd4Tx25TY6UAbrhikuP1vNFfPdZhCG1pe6vx4D6Ez3zIb0zDa42FPpxWvIpEeXb7YTcfZOahSpSYaWLH/vq0F3U1KO7ZxliZpoMBBYJs91IE0bOkrPNQ/USYY0qKCO3CU+AFbOYxzKWBkIglrX34377BZ18MKQCv1KWfIHEeguSpvrNH5RQOD4LeiH2gdx1MOAKphlL41F4RpxaU4dy8xERFgqoyICQq9XmQ8WJSokwqvhQM0fLtsvyCO2PAkJ3BZg5IqoR5q/GdTLgOWPFR53Nqw9Ma5vBzZcQ4+iZgetmKg5ZIn+/7Jbi+VlViXuD9CaAUtdEmnwWTS7wZWuskVvc/SDaaKV+Jz6HrZTHo3UrAu0IZDBkXWmL+mTTjdTb1A+MdhKkY/hvFNwXj1FzUngsN58u/kTdJ3Xi0hy7efR6faAOi4SKGaiOty8lxDFkiD9wq2GW1EZEsoWGw/WzxXhWDzYY8CC7WuLFHc+x19jhH+FiLXwDIARRtnkJPF2BUPZ9+grZ3tjqAWhhN3h74w5pooRQUNATy05A9HDLnILGSCtfESoSilqtqAIQ/TV2t3KhOc+teDf5t+DqZDdB8Ob9YXyklrSO73pR0QAxPvQj57c6FIR5dOciqeHZ2LRABMROo8Jk8V6JFewCL8TCd/A5MSbXLky1cW7mXobqgeEXdFDoEydKo5oCuyn+2JYI/7pIGFAzErlHZ5hOaiT17HC3zp2HpJwsIAb4/oIoZ8x8ak43Yp83Ermq55Dg8HxKGHXbXs47sh0PzQELTGFsf5eO3lYAuJjMneoYWk8W/3tW2WLntEKBZEW4hOFgo8K58Rj0vk5KLyezu1d8SO/JcuxpOJqFUM2sxBmbQ/9qqwb90R0WulpR/Ju84bQ5/fTh7po/pbBb7AQaYNdK3fatD3K4TLHAaa66MQzp/+ZGyCjzo5OXRzJ8UHyg/YpNHvvlOpwQIOjakpLHwGV4WsLDPjEIqG23ily3LL0dlkYQxj3Xx0ApCo35zYGoGOtIclYS83MnI5TwVdQ+Hg453WFQN694DaqhGaL/dm0KncXYqXLi5polgT4DOrzD4oSVhrkh8GW2PaXjOFDCLPcn4RQj8dRGIJuV81LxMPZ0UL6zpkaebhbFBxcRJe38UiTbUPDjFWk2jBqzrBvXcKmgdDcmRyJhIpuq+3DQY464AlY42z2EM0yIK0I6b+VgpanMfpdWo7OxKY8RM5tSJv340/qD8SxrYsybMuUkF8fHj7HcvxEPC5YYrH4LW1YKg6QaeFZLvPbrHZHvi4OXLKkN8cGQO8019OKqcv6QnBlj01e7qS5evoGm53rv+VmDxxCXDiOrDg+IaPeMPrn8TJ1oReXYI3yb+4HQbikxP5TQXHk4YXPUv95+KmkxGsRgTwP71YiMpqNXp0loHZeXRp9i3euKrVtxMM0e6XAoACwNtcc6sOuhZVb1htBLudzahrDFt5GkdlwHjZl5y0LbvSHwII+qYeDwRKTTzyXaInHIM+8rc5TrjUlPRVwB5LKFpQnV8e7vLv7T7V/iJTW9h9TnRtNCSGcofBWYm5P7wZcAq3AFamEW/GMbo27ldz0plt5HI53ddWkn9IuCZY+Iy0MATUh3YenRTbVgdLYtu893SuN6EL4e9V4NhlzUjI8nOS6B99ecyC1Ot8sDahQpWHbmt2YvWGyL3S9tEVLKYs+LnghBmmSl2uPWfqPobPwBHNLW21LUjfZb7jfLMTsMp3icGO1npK/rCsUgdBVKVg0Ys+/WKuTmVJoC8Oe5h3PK1TQhbpZ2ytP9nlutQPtLAEt+CVT90DfVkn7lHLOX8AfS6HLzfHeAhu1alnl19RHKV1LI0G7RPzYgVaSpX7th9f06uo2WpxjL86i/2uzK2qj/ClHbGDyQr3F9/axmq4kJ7zZFVXVVwfiFr5bhUGVZeQJHKFAcsnqPKsb8vHyB9SpFpT9U1U7D4aS9vYgqajxhC+hOkolJV2dKAxysCkWBo3SPiPUrSQYZxOWwWCoQzbV0oeaDEcgUtqI3nq9TSmpQ688/+wb26P2CHLY1H7q5lypXSrnwnnztq/jN1o9lyvLmLyGguV0VJnDCREkiUNrZqGG06MsyA+Phd9CuFoM5M1Pyk7S6TJaHdTw0ni3n5ysAup0kyxr65lFc81NcH8xSmpp+iOEtQZrH/y01k1rGMRJAGFhi+nDecpUlnrh+qBOCMZCcSCovOPJrxjZnZJDMLdpMVu+tBSVS1nKxsYjY9Dtq1/++riVfLUVhzofIcIgQQPOqHioELxU3EpCcZMoL9laa5YlOZAMEp5apx7CphrkL+fyKbBAf8ctwVd93FTo7F5Oc/alNsCgK6lHruPROtN2RybiLqx8P5LTUZXU+Aoyz08zYHasR3U8hPDKj+6arWXR9yWdJoMn45prCSURKKy3+JHgvs2Ot6v6GbEtdCumgCttv2VNoU3KOqUwqNIWHqYm4eMijTM9VWB7umEyp7UPOI8fduHJY0W9xSCZdvc2xMjo3Zdu2o/WZKDMOSh9UmLvo45IBppD2dG++HJu8kbfFdlwuIxk2KHhgHQeNKcHhFkYGRzL2VJVMOAb0Co64wvds5CaYl9ZmBm4zuGDeaO2eI1XM4+rD/HmZyRF62SabgAe8TF43VuMutigJJMfbW2UK0azGLFbOfujnHD+GGBYmSmOQbUCOY99HYvswBQA6r9hrc2jtsUUxLVjxnZ4JnIrTwIVdWCTPtpJpvlA7m01/4tbUMyz9mv1jdN1jkiHQCJXXKg8bJ+aqW6rbwbn5yDSHBTcFXIegrhHGAjJOZI1pyP83Z3vMYTAJoo8V9IwyS+U6OVg78+IhSYHDYjRs8FrF8smHQ9h4qAYxp49rRP2d5uxLAuP72GvZaYvfeLOkMrcg0PkPuq7NsXhMFmiZa6PKBH1l+oKHI5DBLdZCvCwTPdXqmnz8gLzVRb/ixLTSdit2nrzt0x+5rDeZT+ac31NKNskQs6noKlQccyD3UxzfVZFmcbpmrfPsZD0Ve34xpKWk/E9Khn4A5yVPVq+dwnv0EyYecPqXGU7R8suTW0A6NJWweLI3iSGDlQXzMYsSWkSMhFTfyA2vTDt/3wXk+mVU6bRNkZvNnyVHYiA4tmnNwdh/RVsk/EgSerfTIf5VBmuAc2IKSeL5Nbrg3acgFj80mI8SWsc3dNAGCBLLMP89gH5UnLTKq78d9SxQH/g7DVnBh/qnBdw5CDrw/uMzcdXSxWqGIFcnQZt/1aOHxUg88MN2w+FPx/V75gy2wzEVe6G51PQIR2tZsxbv62HhgjwtlzrVREw/yzlaAiuXC26cnpvQzWXp2mOgihyPCWqq38nEadX2T7f1Y5zGxEGBaT//IcL/BsquAJX5EDbX8X1p8nLWR2yyjFRvqC/jssoCJBCDJOsZvoBfXqQSEKhNARH1YfueeKBslAwLi24/wAO1BHptlf1kQFNsOPlDvlYednrEp3a4SAz/G7LIVEsZBu0EKWZu/euB/XKdkGonP6t6lgEcCOw8mceuzvEVzyoPnMyzrqoNQXJb9C8ZCXSiedKiCgNwfNkpVlHbUgE2Rb9WFScOeEad+T+jT8XlSc8rcvkIuhAv/gxRu2eb2GonLTyokjcGF1EBpCJbhy2H3lhL0rdZIw1okA5pBg2oRfQceXTPzhuNKorTEF7t1UIgDqIo7/loxyTgbtKu29o9K9KujvCqUGyPY7upcfiZLNBVKh5uXAAZjQjhlhBp0ukmO4Avxu4xAVhCtnsOIA/tAm94U3HEuSr3wq+ZLo8pyoC9EB/q3pOzQRyCTkozmJwo1Ln/2xEbtNnS2S0NUIS3yz3/mBIdxONHxqP9FW+uoGI1F415lI1nZwK0SoPA0+flaokBGEoXgZnO4GOExU7VOjdPns59ekmDxqNhEHeAF5i5N/3W2NC1XGFjTpqLrnCECiwVkOTrLtp2ehUIaejOG6+1336YQSKMSsL4zhUjw6SQKryVRz5Ldn3R5/r8AOi02RJkQXPdvPsl/FMg96E/cJmIFLmEDzr1Gkh9G3zisG4pqM/MV6XIz+CtDUh6hmJB97VzN8jaPSS90vgDjvnaNlKky2/zIhE9ObugwrftI+Oi2a4VVaB/Mwn3VmaWjsU9NOf2usbcN/GLQMjvfeU/YvyEERPKw1leXZWWk1HXzY3P9MUq6MZq1hkEgFzds51mv8mnp1i4pQprPwY0TId1szXwe5TG+R5mMD76nGPQr7/EhQWksjsgGs7Zy5QYvMcGV5tcXJR+6hlHFIAc/M6XjkKYtwm673Bi+K1tNO9i1YBePTur4I+gMsOK7f7980mcJXhgdWdhNzUN2JvFsvXq3zZRG2V30sJtJYxj0aUv1u4/ppVHi1iHnTY3gDHsrQS8YwMX5XwZ2gcFYYe2wd7ZO9swr0gb8zf/fXx8QWKPXcK1UdJk3760B/TMlpWLCbhkqVoSTsOqzgkmFmFteCCTGhNyvFhw1RrTIWzRxq8Tj5FirvKvtkp2GAVhnZ7vnr71pyI0rKwQbVxKZuqM7GAvn2mRBj5p8djlHUsh/r/eBECptpbbjP5nFyuN4mvQLZCaxeTkDUzd/kNGLIzBFv1CElQO+xmf7Dzt1f7GM1Bh+wLDCJZlhcVDXbtPuGssdEie3lZNiWcXMTjZtWAT5MCmpq6JCRuFSHZYGKcSFZ9kOYJfEqLIcWdzpTA+Hmu+ktgSUwXVSwkaa/aHdZXh7IOyrudCBalCZpgXGRNbhN2XpEY60DXXO1Ci5ayZSoxtG0WRCC50+XtgWz7qgX5MRA5S+jzXCYy7O7Nn0ljVxiBxQNCZKZMTqi6mPfy2LZx76uyRUXHjnpJJEimflHDUxyX7fFg7iJvSrsZMH6Uv2xbfQNx5eCbx3oKycUrBY22KPmgfg/w07CDVsw6tb5VxPg5/X38cQtXI47U7MAGGjO28II12T+PjaXHlstPtkUQNn0DKkCYis+kVAkA1wyAJgYKLGnKD3nlVCarYqCkNIZbiVwO2Ydjl7N6iOtvvbAfuq7VKZLo0jEdw1YdsRaHcuJQulgb51JyELzYBkP1hd03IDcZfPg5XmNvYQSOINsCSn3BuLtkCPZRalK7+S97zxvJHiJCZJM9XP785NZ8B8fqDe/Ot0BS3PH1ptErwxBtpgfOj4d/41nrSjJQf9bV1kfdBHJxYbHILxOsWkZvoP/Z4Sl0Yx3bDjTF96xf96+6uIoQ351Ce6DeTwTnkPr20YwATlnhskWIddUohklNITCq/07zkiEc3B58uiBG6d9YAc4h/7s44FN2RG1UuZWeojrOZIhElvDP4KqHcOYbqqS95o7ilQH5ONJfy+aYiB+sPpn35HfHG3duLpNvBjXc+Klf4IKrFHjeVty02xPTNnbdL4gtkqPqMLhSgR/fDXzxJbSScqewiF1wdVoJ/fGL/nGWZfVlDHOQKD+/i/mqwXqvNqxtZeRHwoe/bodk66B9soOnZp36gdzVMRRQsQiBFf+HXjRcrRf9FsGghw3+qoN0JeeMvDJrkSBPsESDai/uVOzn2Ohge+UVdi050fdWpsjP0D/QuTdYs6QyI9xnhU8WT2+KBKzoZ7Bq8fOdKPeLulUhJjT34/EOnUloqus8+pzqNh/UdUOhgTlrbkuTfsaIYDm87u/GNIl3N53uaU8bgaBjpz0jdu1f59K4KFDtwUUeEUoeYx6DEkWKHdi7dtHhQF44lbysk7PqERrsuAQu2D5tDMl7kFoGdI8r/s8rMytJzYBU40wqeFvTl0ZVLdOB6Ya9E/f8VPbGx5MdpYqYMLMyB0QxVdnoJ+tgAQVWfH+jtOHD3PsjuT8dOTSrupuvHWRHQoGI1Qj1Hc6k+Mg84FAZ/gzl3SEzuGWZKFwuo2D3EiG95D2Z1szTqAuFRmT1nEh20tkC4ysmXx6JtN0taK1iRR62s2uNW5rSAvMEJ8yotr3UhJe22brlQn8Gvcq1I0aODaHJucQKVe6SXyfcDWODMw8xf+2C7Zx5a4Qlh7pJs550DictL4OxcDXKvVmLgVWRwb3moxv4kcxzm89EERJXCl7X/BziBkGQWOHPGF+6K5NFJYOFVv4+NyFq+OPMaSWZKoydplufY+CYyL63T8MCMmwqLTmAE8h0prhi174wnx7DHZWYuRJSYZ63uz97AGOzyI3aebclnud77znbZetbWUripe+AadLQeZPtWsF+FNiaXCy/98km137lWewyc7Gamai1Hd3Ls+KMMVh0R3NKTQ08TIClDfMKwUGKy/7YZlJHU3uW60X0r74Afh02v5MJgVOYkjmors6GAaDU7yKHydfkXYd6nEjYc76xws1LDLWCNNKBtUHNyLseOyNDgmHiJ41lXvq638RzDGis8WIniOb/pbTs+HsQVGPi6mxG+CU+oflMR6/qx3pVP+GPgqa0U0lo8MVmI1cBgSnPGgrh+J+m9TVg8nivua0EQP7xai44ruC5gsAVOp9bLsDXfHQujo6IpBmpfbbU8PDavZpTuJtmflVQuOImnRQ5kKoQz2NBFjdiHH3cF9QLgDP5vz/W5trCy22Uk+TCjXjdbCCHB3rJhKYTwiyQUf8xu6yTKtIwrbw4tzFgXDODmWYEnnpDupk3b4AP3qz4AZ2En5wi6aZV287AgCF4vH8TlWLni1E5Hd93vLxSYLBWSuj3eXGFtWyWpBkIeKu+YsBh19VeakA8OePM0ILu6dYYl9DNIK3kU1ybH+A5xYhFI/EqSX3vtNs6V5eQgxYLvu0hYFjiG+n8JzqLQVROiVa8XNQDYJtDAetPFSuEtGI3B8rnbbrNo9TJn/z3lRYq0ecBIe7a03vLESwhKOm1bGTk2kPMv/Sh9wyCOmIore7JhSFT9HIjonBfi+gcdDLfFt7dpShJmW1gkcXmitWwm1cC480CraHm/or2MHphB9Q1bmt/SBXFqXJdcv5GTt3IS2fRgqThhInCjRkh7Dk1iS2vMBLSGtRPppb4FEu762JehUMQxxLQre365CKoJGvJwVde91XQ+bDp5ZsMu/QHmLgITmwGXSpQFQlQBajqquxlwIOe2cyfezaSHIoRNLcwjW+epnmAtmmWA9KU29v/cA2iuWbj9ZV7HR4anhHkjbxnzKPHnIZ7Mm5wAf2o/3xUhnfH++quS20TdhalHgNhusidPKWyKWV8ZjFLgb1fX2r7ifLyUtxuKHHIfCWXQJ/DKeU61vxmPT34MTi2Q9r7/sK1CYuHVqMBsgtfenn31bUzCoyPN89KiO5wHveqnk3uyHnJSUBVTQQ3NyRPmeRKTQvWEBZ4QWcSgMyZF0RQgvUXRcp6KflF056fwahSioP622TdcTVYi4cAwSZLWDvfjoKFLMowPQpzn6ogXHc93fFA5NZmnwslSuesOyNI1EE3RM8kzat6thkmpOiGmm69Yn8yNuxz1YuuPWekoybkee106T9WTPXo44ea9E5QH2Ig6FZn716DBa2FyXHG1B+YfnmhbEpANlOi61BoGO4+G3WMJDokJXj9GhNsFqdaLjA1pkhLP+/mGCZoYsxNI+A+sMvWyoj+PMWeR8koRz+r9pNVEWT70WhiAkNTrojdr0sBLwxIM7D4zT+cVy96ZE+ABi9CqkM9VK7iOfkJVp7AqCqQ9EZ9emn8rB8zfoQZUBrVd6YS2AqiTFt0nJ8HfPGmnBWf3Xi5CgyWoLAmHJp/AfTdHB0+Ns5DlhL6UJ+O/6xys+CWVKtL9S8fVHkpwZZMJn6jVtiUTtXjywmiVXw9a6f/G7Qd4tZtcoS3aytxXYA9aGGmEeBobjiammhUaMDicH3nlOkDvvz19NqWOvHC2SMv7OQHtDIykYerPuoLz6SQNOBtw6oX2Sj3ZLITBDcWNx9CuZYYVaE+vleXnATrwn+PnuQ34jL52tp85aIOk684SUlQ8uyO2t+eIOHndZ3oxD+BcMAba/JVxRYUAUZoEw3D80WWOz0/ul+fYbhFnffx3PgOy2LLiu82D5FMSpi+Pd4EkIFTgfv7p/0vnX1wp0VpNzyXs/5S/4z0RFS21vIF67k1ERTfFuhLM/8fdbKognohMqTNF/+oqvXXLuJB7IHeDdn1X2eParLBEpz8y9CAN2g5VdE7EimekAOhkw+tTzqeEsgyQL4iVDnWrP/RcBd6CDm16/5t+I1SAxCn9wo8knzmpg8DYP8V/vHw8Stu7cliAt+G/VR4XPNZXWF2rZBeQO75os2jFJrbtkfhN9BzHT4HGgXTjyTy8NGsiQdeOw12GjYKCyxP+34kRHZqYsn0pFvVubB0+/emKRgiGXNRWQwMSvAB1xvTprD0Zyt08BjP/4W9HGNfNBcA0Qb9qF5hdQ4dDqpKAFLoIW2gFEVKOganw3M9/4WP9ckP0/g6kaJDRurtxNgT+PjvWYEWlFa80wKYCkd/0ZChV94njjGyg0t98Pz3AL2AFAhvRRiJwdfRcQqqhWkv/o6X45d5w1YLJOye3v7rgta7Ya0jAl/an42ng5Wz4S5we7n2+1W94JnpoGyV8WW2HYjKLkKmp4hBKlNtb5y4W1MrsG/wfq2N5Xrz2kqhdPQL/YoxgCQd6Y2KNkADVu7TxugQRWVuNL0BUj3JRFyWNeCmB74Wsz54OPnbq0GFFxzSkoiJ3Rtq8yEJMKvOMMalFKH7YFHKjb2nwrKVfuUUuRtTfJDiBuaEHHoX+MUrM2bBaAsSdnY5PjqcMBn/wwojQxzt2MoOCC3OEArr09ghhsj2M0mue5ntQcmcC1R/sK3zfShGJuazS+mJUeKxk5u36CYj8+SJCq8ZEv7bNf1+BywGeDQoTDGq6Yh1xW3Suwo2O/ykazTPK/TdVOICyiwK8MuQpK+FX3mqSPzxfLwFJ/iYDjs0WgW2kqXYgm+gkNToB5+jYH83Xlt0cbtEmkkBaVGlHz61rVuWzrK1yjn5nYHKvKCrBPPRth3AKDQQB83fdrbgIeIfB3iHya5NPpEyxbzmtN5Dnk7GqrQ4uu4h3QSoHU+74zs31cWqIx4SZ2bwWLvIxUtR6gufZhNZoMcmSB5z1O9TKvHMORD+VmuiqzsyJKA1OaApB+b9x6u9FTvUkalgl0r7raV+wRqimc2D7B1z/OiSagdd5UME2igLGUcgPlMSX1VsKQp/9yDiYei87KTBA2NPCUmgaLwVdvQFFFxWp2vGCY/KCUvxt3FOu6xIgwS4Vybvbj6feUCkrQPpO/wPHJPhAobSj/aa5YrUvjHMcQkDZwfc9mvghrk/PIPvcJa5InhVBfjh3Xr9vIvA4ac+m+pywS/EqkSX55xgiyj0TB1EE0NT3W2CPFdVD88P72SpdFzHS/6XsmbGtM8JE/m8eojzd4PM1bNADliZ+XG/9hbcKg6PftVKyKKt/8Bz4lGsHyT0VKj2vDGp/qDGBajSHrqzmpEjW5LXsb5kTV6HgbMcnPW2dzQju9N1sI/gPVlgGmk0bHKOX2Ws1q4aPizhcM/XiJ5EZNUK6bZNUeFaUJVTvGxglRUY7vdnoVOe0Raho3huh1XDeTlHpk/2gBjjhUQXe8FN5A4zcRqkNtKpSVq0xyw9j3yQlQxq/Lnqklpz8lXmzHkz8sX9HJjHwyn8UAjblvN0ZFIk4liejx0lVACoKvpsT9+pQoLY4weMHRzcuVC60DUFkaqLfclS4UJti5WK4FE3dYcc0OilX50uscLJomlR6pXriD6ELNNBWOSMt50CJjPkyt3Zn/xj1dlPVP1t6XExK+b3jMoULLPOrEGvjELfAMM1qcuBb0AijkIuFca8f8xapUlkvLjmmJW7RK94r8HaPzvmHHSqX9MXdivNI4A+JHy0VCe79UZZJvzMGzpnsj+Q6k3EItDBiA12fTMlSbEOMAWCdQq9TtyUiAaAqJozMzryEg0k+yVHqCc/DyJcCE2V4WXIhEnsOc5c8f4ChWfUaONhPPWogpDs/lyVCvp3m0NSfrAJKNiVy5aNC9gZ6c9BqwYgj/cDO3kdam6gCjhR+akALFYmt4ixHkWxKhDTGs5K+CwRiKJnvxP9dbxRPCBHbiVa8gsd2GuiNHZD98MNwXMdMC0MubVodd7dnyk3UQFfCIIL1osPxY0ZJ6DvZXwtZ2I0th6aqlTMULVo+lhSIU/5qO63lTSa3MgPRJEOi0AJ8/UlZuvgqLw9dyEDQoHTKWOsq+6fzoAyvIpv14fLaY+braPd6NkSaq0RClMenK1QLH87NZriUaeuCo6SZ7/CfUt2K6VOt0AjIK2jR0vorf6R8+TVzxZb+QdLimH9pU5tQc73xW93QRPMGy/gCK+R+YzmV4fHK52GWBEBL05EEoTY6OYG1WWji66dWnVTg0uPNw839p/yjLxkCfdTaH+v6hVUCd6HlROj6W8Mil6AYGC7NI2+qkZvJh/dAw/iQspXQNwwWHr6slLIp0hBHYTDh/J7Ba7ZR6cp3iU4bSXdmzhTahYDev4yKiIHyN64EANhI5OHYv1G4KXfIOvQizYWchPhzQg5eVGNMxsqrvWVxjtIbkKuHzE+IcA2NZ83GKz0D8z5zmgRnoJGKigseP9TmMS7BgAqtqyixA/SLc1KEUWrhXOQ6kA5ZQRazp3wwSa404cppBnfsS8EsEpbr/gXyW36cZ9pt1RhzyxGxDUmnZeBz/Uf1AP+gyLIg9x04u1fThm2w/H1ZXGvVqsO1VqutV5gUhFkdkwoCjzz3F3FUr1v0njGYT2mSZYvoF/fSd1W11c5VIhkEO06US5wYRmHVPYXmZnbK5YHQ8pkIDJ0yqssqFK34CuHE8RWb+Dr4omk779QOOcYomAMYQ9ILt2KUk2uNlahW/IjGtenuGLxb/t3aFoVz4oNwMZ7iyp4td8mdzgJAfnCcYtklubGAUB9k6bGC5DSkf5VFarnGEBWz600VGR8QywZ+jIYFZbtKT2QdDOYP6k7D8qVgEZByGmRedZRWaQDTggLyNgDD6pQwEeSs82+hTxWypqwU3zuAWqfwil+mytzVnKztyvMFJyJwPFaPr4Z3mTjyxCR2Jv674JVGGMUSWb0l+GtcYtd+NBGChwr8mB2hlyccget9liJhQEb0XgXfgVRlHlbO+jlZ9CcAew0Nw+tRcWgNnz/GL9Kur7RohRhaYZBBmQA6JhvzkazHRcdZDn0zDkfBmYP1PfQjP3d6qqx6gE7vrb3lBKEfK3Y/nCe4COdpr23oZCoIpssGXmqE8CGpO2bEwkSN6uqeqR4UtWR+xsgOzNeR49PTLJpFEAkXha5YaecJ8t/KR+eG7/HKV23zPZAMvHDC1rdxQ0l+6wlIgZbUybjBe6yusL7isRuuYYwg4+8+4lia2ox8RCdvmXlt00ZshBnAIfLkSwIqUzCcsD/d1ZG6Az728L4FCIqBKpbA6bzkJ87lYQpbaHpwPpqu3S0UqNDCwgg3q9MEn02X16E4xibz/rLx7NMDtHcwMOt9r1dVU6Hws9TvJVH7THrnSFESgN5eBy53Nq2Fdb8mySTxz5CitvVE+ZjHaYS3hq9Bax+uS7TxMIT4qJE7HGdsHM1/9uPNBylhP04Lck39JMe8v2dPOSJzyQoy8m/8Fc6h+X+5/mBVA9jAsG4vmx/KdUW+NXxgRt//SS2Ib7aGILsjOz+ZZQu/NMeuAsP1pFRTN90rqIVULbJ20ZJlrjoZD1VxHEoDFFGVWCVOT3jGK+vFD06gc3yDUSnZ7ZHjGmw4ZiAglY2nm78aUpXxI4BfUHqL6YQKFDCazUIryLi53RczlaTh0ry7WN4WpWK9sPJ0J49fu6RGUMYZd3+NrRvEdOrS5n+EJOTkr4lNzo8vawcYnR/n1Dq0rCHu5o2BGBEHABJbsFLi/mlWFO1MjpvUu6UPJjXlXse6MtBROT/mQfyegWGmFRQ7Q/O+rJp471+tQF10+bvkExfBoTQrewd5UwhAUODpyeW+aK6vx2AroUo2bGBZ/ZjcsJFfMYEMsm47LdQSq7T7peI2Ex+4/9oIAJGfhidbXA9UYPNhxigFTg83CETNYfYVkoambj3vv4MZNtE/wrIfTguBNqkQk9ebLPTmY2U4UCzbYqPKO5vjaZXeVksobDAJzhVjoU7p9TdFmNMyLyCQJryBSOcm0hFk/pcwcV15KZ/+IIqeQGPkTbiY1haWSnuQYBeyW5uSPHGtYw28cQS/v3rToNAUGVBSQ6zpBt4CHvaOfEJhuDJYZCcxvPeOStdCzaoSQn9nDe8wDc1MXrJ0+9N9TAKcS6u8ANLCLY4UfHLGf884/LFIn4OLOlRcNl7FS1IJgu1/vLm4INkgHt5ISp2vC3MFJHz1zJnopnKS1AgJtCmhJRZDaW6wis8CJ0KAJW0Yy0+kWI3lJ9N8yqJht68FMNVgkgaAGi5LuKmkZWm+ztKvf9gT8hJrXZkM/QdHI6wy9BqVeWa7g7ZM1YLbUv37YSnLmGsCrl/UVi/tG+fZbzY4bGye0zH08VQpGmyd/v++fS9EtasmbkQEIYnmLZLxO+tNHp3myIGwYBZVXjlWvrCiQcsP/Fu9l0HWmLBu3gvuJ4phtJsXXllJdM8iZIQR8Z6zEMs+cqVL7+TYhxDd0c0l4sbyIEw6N+V0v3ZbUlidyekdcz/aIomGdZtmdI+1QUrrHw7eDXT+G3zbTZMXxpEgJc4zY5bH5az8eHzwoo8QUleUKpVRrsErGmSF6GPJ2OltKYL6/C4zx4rHdcfsrQTcWBmrBWMMiFiU4NGtpYeACqYafRyu8j8x7ltp3nxVbsPO0MSoaR8tv61/q+YCqHX3h4vy4HzjCYEl+4ZDtj2+mawuj4J0rBpcDw+spzuCQ2khFbks09lPGxK8HYJl0Y/lNLUxGLZ+2h6+EFSaD22bYzF7dk/EhCWh6u/v1HUVKC/r/Wl6JHtd1V68J9zdOTgbvJuQug4r4vUV3JJolQQ5tecHKqcNoYjOIs6BZTlfB+yHGfGdxTKsGxbU/4taKuH8Qpd/M7fIG5zebrpiDHV97T4jiUNt7K64/u1e/+erXV34aOjfddcKNO76EzIf1pfD+KivBsRlzlsjj17aDPq/lnKHQCLsD+3TK021HNzhZyuwpLRKS3KE0XH/0TqUOr3VqLMcsSZM6349QJDznPG+sUqeS6wwMWp28TAoDKdmjzW6f+2au71HsOzLIeWencRa5JapKkVTYpvwMIC8u2L+/hYGJmk0588rq6Nnqe041NMzU6lj1K5KmSj0ZRiVpzu2FSTl4PBYHAuhe5dtwnRQwvvNqIELVxKMFWedxxB7UO4zpYRe2x0zH4X6pI2m4g6YdCs08vR9B7omy/goQUYbUZA+wJamq7/c0FhkNm74Mp05NSCK1Dcy1+9qp82p8XVkUB4+SsVRJ/Tqtn8v2esmemr7zjCfjLicMb05JqNoL6zzz0KaYkXeStBrF9+T7EbZTo2Fa/wS5NhJvRoZc8QUfS46HX8HIZ8A6LK8zKtROnakAnEEFoonVlvYR71xYuBAXbjtxfu/bteN8WkArB3//qp+3btpi2SIMyK6rX03iCLnzOd2OrPnD6xqgVT35e6NUMpN7EJSz0DRRzyze1J+Dx3cfx0M577W84qifD51mZG8VNbBf+5PxmGGrGOmkO+Q41YnCkx51D+X3CXsNAjaz/XfcPJUXJ00vaQyfYDtmFq4kU1ZHdnep48T4IskzPsYT9or3rd/ubiYLqeBqjnGbuNWb9ZdPDxkeBmJwYTjsTU+VugQmtz5+C3QBX0piVh3d7BK+Hk4mO3q8qJVQXeIqs4hKuRvBfIwwUyKg9W1x8dv+EwESuk2Bgs1+Zc3wzx4eGasynWs3V360wH3fKXZFTckeHZdgtzTqcQPC2hCHhSXyFMyljvrneLE+c+b/YQ0XcDBam1oAPzvKmmcgER6AqnyC32Ic4HMP4FQN2rh4Y2ntrawByV+9oq/Z8hdwQEPYRYiELBCnuGGXDQbl3ZLuUo0vfKU/AuMwYfNXmNM2vkn/GRrpc5WDP+MEL80tbJDZfDNBRfpfcvVpf75u0LrkIIjnU4adaolZWzB2yjIVwNrF7zF//n4N5xHeaGc7Vh1EYRdc0h2l23qFvLBNQ5kHbmX8Yta2Vj4DU6eBN3XyJBvJf9iL4x+hw1hx/7Ej5U8EZr/Qhgoni5r9PxBfU3fdvXICGW9DzST7GV141bvyMDXblFG5PizNjJUVAWNSxIAStz6+eDAbkYeAKTj6DIR6ysFvZAloBLCgSdMFd3ol/WXDQh3BbBtLqO9hp08BfumZjLpTJGRAIHzDizXZfhbgqejNSS27BIXQLV0muwzgXGqYt9McSvtLWo1Fos3k6Nu2qGyFftqQyDz0/bmgvtZyiFce/SLYnjt2Q9BnlmUVBWOtbDPvUgOSizvJDhdiSkbLLP96MJ7dKO3eUK2nZnpb4s4b2XGF4T6gC4qo9TDv9z2SY4Rffb/RjPs76P0YiWADpPB/nQjC2tDRlxt4sdNCIjmMsLgU+cr8cpyaMSYI9maP4HHww2jTPkGKvF6H6+DFAF+jAZKT9oi23gpZ2zavE0xXPkF7a2FTNJ3bwxvsJV+o0fXZAkmouYq6B2+6ccHhnUIeL10QtZaPoZPJB7/Xry/2Nv+JJFmQ/p2NSiO5bYGA8ej1vh5QlWhaX3JMs5gMBnyyIfXIMf4im0WEUnCPAJzq9q04Tmxzy7nGKKEf31kAp6IFk95aj0AogL7iljLVJlOXNvV7BwZn4dKfuZweSEZBqy+Mvual0TVDHiwHuIuXbvaw+OkU7aeAfck0Hc6H0jgt9g6Rxb6dAuaiKEN1cUYtD88y0b9Arq1q6ML9B20/FunTnZNF+IHgsg641FfllDFpQ+dqrIPKQ8IkLx/2ppx0ivQSrehNaf5dwtBjnPHroRGzG/RWOdiW0COPzepxIqcsWjhfmBXSUD7YCvPm/qTGcSnhcriFKew6a5s0AgK03I1gEifX6y90cJBY9REbQ7yW/XB+zAXN1XZQVEs7r+0ajtx8KvVBKJksKj5YFGdhEennMbwgCJJIMdt/pJD6FIcNVegt2LiQS70DAJeiNNG86dQVNYNZmYEfo8oa002xKLh1+rHlBX40iY8Wlv7FqswQFktpyLn5oSdo1jBRz8V3aRIOmhSnrs2wxGwGBEVEXvRm8RZVvSQ0xlKMVWs9Y7nnmJ9jEVuDL08D2ES3plzvCNP3FpKQeSknFeVBXv5T1Yk0/X5vdj1J1LYa6Ffxxrv90ObLHARkCI+tz6+0i5cZTinvgIYLMVnV/OL+m4RCsTy/+9VQPsYv6X2qSSlVdQ3KM1SOntMNUBpb4C0MsDh10xHQ0cbJK0gsR6X93ru63BDYbRZmPISt1casVwVVE7+u3l55XJGJ0Ev6S+2zpNqOAH66RuzpVskXE6X8x6wHOfp5PAI/7YG3Zozh1U27IXGEEKIm13Rt/nTE3pKWA7i1NFdVQKQ0CNdqEsBkjiuM41dd5rIbR4DMnoDva07v1esxYBGU4JWJUJQyejYbI9p7pqjrpHZUNlz2exX1lTAks+WxY6CExoPlSlNNv6AIsE0VdPmHOj4m0a8bigDelTpIL1WoePLhblmhRlkPDKiZvkzz6eG8vLeJjCGJL1+VFa4QREBVyuhcpZm1ygJm9kuQ+8v4yEMw0VO+TKee6sMFRVc/kS4IirJupnw48LoR2aRk+GuDBZ25xnKFxdSYqZqvWlEcemsbzl7wvQg5z2xKxEUsquyGziyzd/X+XFl/ct9KRLzyyb6ComIL8Wam9x6LPNZXvhO0QQZmQ8T2MFjmRJ42WyRzfyLGkJKft94uO0Yy6Fflo3AoIEon3XBygpi3Je932ToU5EKoikvqkeLFACpsBN5dseemiMdHxOJKrVJDdTS0qCcTzPCyz506oyENFdelskwdghmUnWyXK2WeJX2CBXudNUBON/i8kMdtJm52REvmGqVmxe5aricuTCGLbgZtYvigT++E7xltEh/ZgUoMP+d8vaPU/HdhZaUjsgQ8OoqZeezvNR2JFm2on+IliVyYQ/58LmZ2stgKoBbs4SllwiTpNRw7ecL2WR8bbg05aTN00C8aGWtReWSsYsirJ0K0I97flI2gJRRN717wESryWahXUAFZAdyD08j9SIZQm+wq5GkoUkK5cQ3wk1x01x4fKLPgPIj6D6lZiylqvWGtl6KxCfoSQXlNZIHeDsrIRqhINxdrCinM0iMMkveNxhqrEzhnBn8F6nXVY5zUDLzOXpp338I2HycFa2pueObEof3HQgFEMnHS3/CDKwJAyYl3HyA4X5vXUE8MMa79gYELseTf0IEUJRsfSa873vl6n29lFq+GCqF1I+mB5PSyLFvgHv6hG5Hd14PAHTKhY+xzCgOwwRZxygPwNET0UiO9ynH0p3j7GAFEs+VSjl4ArhHJbySohRLfm6B7FxxYJLJxJlQr5UdD+5Vs0nM6CehSZZNYw4FzcpYoL6nS+wGGSNKLVLXgbgvzAbT4B1J4GMS16IKMlo5S/dzM/NM4NI+a1Fuk4qwaewoHqGp78vgp+SkuhLyAVhI2Or50Id4LlHwRon9o7JT3D2pibchFvFi2VTEx6cLX/qorW2YGSSmnu9+M8teW9DIRH1TfabuDIuLk16NFz3kNr5QLPGAd0JzN2IYFA140yqfi9LfBcZI3aUK/Gt2bfMMk8eqttN8c92OmUYKUaHbB9C9cpEwaOYs49MztuGtI0VMqDDHN8HiRP55BpRIJtIWbSyi0/LOC94XhzqGVyuzaVaBfg0f++sV8wy7ytxlQYA9w1ejE0XaCkpM9zbOrymf4OrEaIyQX84Z9e6wQ1czIvOihnSaq/fcFdkxJcMzE2kWcARwWT1U80dW6B+v6HdclWMyMWLYr49iKWrhm7o1yumJKxVGiv1Rx3Tw61jrh+vuNjikpFRxa0F9G7ZWs57nuhaIeT8ZRjYzuyq4WZBEXs4CyfvmZxGcS4/G2aWon2O/UkjqrfdbBUF0yavSPdNJacaaZxFQNejGDPK7SCF82XxiahbNpwFs/t07gbCJkDUvvKjqaYv1SNJBa21RKsOuGJNKO/F6HTjc1Q5t8lqLL4e83gWTT4aubYGtE+D4e9zdPPo2R3dvG7bDrCQosp62YhTaV3B/kEQGqtzvu59fbgA6lFyGe7urhYr3TWCBFYBmrEpB78fWnXUEd1z0LSzMcWL6vuh4CJYR0tg1jX4H0wkw9mkbM07MXopLJ2Rt7/aL3Hl3MjO8h/1lqNlK74QTbgkurmgd23XflEcMhjO52Y/Wsz+CqwkBCDN8SUcd0hvJ6srikURdDKw75ZZMyms8NdzvzfsXreeCzpVaPKbkgWo0BlD+qWqaXziVa7YTSezNkCD1UBphMwE3IFwG3+Oja0AILbwR+VMjirrIkRPt+DMtp+OKLpkiE15AVv3jn19brZGZkhhAsuT2sTiWSjLvxJkMICAGdQY6CcJ1bmQsycrXCCxoxrME8B5k7aYQkl31h4kmnvmUA1Uo5bGEJkzebQNuMeVIRwKr7shM3Y3iowzuO8Jm833ALhjeDbR9i+ajGdiv5nuQcBDW0PZ0CB/GHvnmE702e3iEmWKin/StmkbfvsVh9mXnjLzZCRfht3g5Fu6OpDSsq1DSVUie4hNThGTSTWkOhTKbARv54Bxp1m/BqW0CfvfUJMQYci+HzQBrAw7lHJI8klNzq1wbwtxf0zzTFIpYQcsU3ddDWDMuciKmN+BHJ47B6FkgX4uR5QSWzLqgN2wQK1aLp2hgMJGqMII4rLK56VcDk89QQhw6cy8PCM19olNpuDwdrQFvP+77wiyyKx8Z4MVJNxV5vJWOwvF+aDouZMW5HNno5d960qcPPO89qYm6Zh6UO7MyFx272aWYtu/0+UZ6eThOP3s/uMGRarrYNGVN2bkl0VbM7ZArP2AnCQLuPoIbkry4nTS/RsIdFmPg98zeYI4R0RY41FQsBym1OXnJcHtmKPjfEXuujVQGfCPrCZsaT+vFbMFWIvUy7OxquIvdi2DVp3+q3E3NGG06d/cz77wgHGWrfcy5LJIzCMZHkk6m2QnZCXYVXwMsVhJI9nJcgG/CrU5lgDb/DlVEsXG06BHIuqVfnTyLdAQZYmJlEEk43pdgF69V12XC+sB9W5Tfm3jPwiHn/VmGszkYx+Er49CLbyk3hDBSKuzDj+nzCo77ZO40EIP4ZROdSwWlf5S8wfYcAzjNdj/aZ8uknw3tur126RfCzMA+cUo5mPaZL9cVp33X0mRTUIS2vgtwDRgsSSX5xcJUWR8gZbdeqyqQEEAeDu3+BMlrgYP2SH/le2u1yfVFn5JX9VQ04X9mmABR/KOd3rAYqR+OQwLWao9MXVS1y+0OKo0FlXuirKuPaY1BQbY3Vo05Gf/+N+u4rDcFBQqiCrYhgRAEjvVW9eNCaOsukcJWEaDuo/pWCYGJLadm4ssTCPvVVEJNBfVXAcTIxH4EFtWFMJUy5of50QNXNZBl+oRuFIkdbt04DeU6j2A3vzzP+IkMahLD6zBVJv+xRBIc5fODvnJMmJRMI8kcyMFqxpeWZAHxC68tGFNyl6yyGN95SwNYXwDSIQCPlL9bzjZaWNWvs5puiP2lbEBlDw5vCHtVmb/sD8QBgOhRassChwM5o5g4lhlD4u86wmdmVmhmEXnCyLeQJ0rRtqYIWRhg72ieDnqmPvOkDTWtKR38TeJwrK/7IRYfbNspygrU6yV9YtJyw3I3uEkDgbPrpcNUpISYvzv3beFg3ZN+swedqf3IVKkcdiAezu/KpHGHPyvX9oT6qzTS342/DenW9ctM197UfFl4rk21KxSma1KnLIWlGGasMF4+G3dxTnqBscul4CqNda6Qy8ita7HCzKlYa86yljm+HQA2B5ArJoZy4LNxeT9izFuQhEoEhUTNJQj2pCc/O44h8GpQX6XgpaAvAQJLVNq0yXGFbzb3O54XQ6sm557+lT3A+VWPyCJn1MLbsssHIdFhJcMtBFQYi0bS+exQ4Rq74xNE2CIRSzi3nj5TNy2AoO0gdyBC0/2iH67UB581jmM92OHqgD4EzAzyxDauPnlIdZu0nWwB4dtxWN+meq/faIuQpK2hoRP/ULwIJ9r3xyxtXxfFwJ3YquXldSEnxoPiYD85u0OAHvKOG6+3eBraUiOgvdfp1EjiroeSLLFutuPPV9XqhAReYPaRy87OAkV5tzSqvyfufCvOMTtkpxApWsJ9n+cNM2uBWu4lj1oDjGasCfCt6cfgCzh6UbZanbL/qCgf/iHjKYaavIiRLJrU2BuzdsP97XHkXLYbbfsHVTlXSohKOXOJ+3LiR6ix9UFLo9qieejYk+P4e5wC64jGQLSxJzYt3cErx1Rtc2+xlJaEBynLN4hLl/qOrgBM7a+yswC0Mh2OieA4SR6MfM9WK/FOWbVyoUBIUAKOhhIZp2LOgukk0/DInn7sF7dRP6Nw77MaAcYg6k0gdjQN9/1wtGVSBm+6LwkI+xfcK9l+JiWepXul+/EEdV7XXp/9lUsW4RQmIkda9H38FJj3EYJTrG4hEU9YWtNd2lKI1683cXFVzSMkh+2nuu9K0JUBoAnrYkKVZpAKF9G7y5n/KMZrP2xPuUFSOaruqriffSEX9Euj/k5dgewEyQCFTif83LhkIjt5qJ1LyI4ynIznWl1SoAdecEp+I5WmKBB2fr5yw33NX94q6HIP0jW3Np2E0r1f7fUjqdxV+iCRULU+yAwPXFvTL7HqfFLj+wCfIbOg+nsW03rGTf1haLvAZA/nC52pSDnC4f0qOiA6WtK20BldZUaA6GO3m5ZOCGyemGK4a12hM3BXnbladA/yTRV+pH7IiT/9WOijGGNXzV+K4wmdmRjU3It+QwUCRat2mGkEHhOcQY06pWeQqBGjHkWcceX8/drkk+tYysHMXVk8hLhLGjUVgivK1Ra4K+RtUcZO5fkVkWQ4W8fyo2tafhGEDSsflUH7yj8wsATBE9YpskR+r7Ac8xqdxtEAfRioGXSprjbLI2DAZZz9HAYR7rUHzvh/UPpFvrLbd/hFf7sF3RimWNpiGsQRZ11RqfZkck9IJu/FPU2DYr/HWUdskJHuLufXCvDbKn0F9sM31Hn3zIuAMTUc+tQsO9ll6jnNnW9Ulo7d32jEQMqJIrWQL5+Se0a8lKRp+XhYp4IfyUaTRC58vFEjKupeFEpU4EOp1AjeALc7vZV0ovza8QSl3ru6xFpY0/ckElMOChkhLWSDHLCKaFK/qC/SIfT50GJZnkCr5SgXZRddXq8Gc6XNjIzSdCF+9YlUFKMiri/sn1Gp/dEMhARah97GidLqitLNBlF+H8XoQmdrM3GXBSCN6izNn2ON0OzpCxOuM917OZCw2ZC0DSvNuTOFCGGYf1TYgUbgK2KKc4zm/25dz3GhVpFqs6x4yhZBbiy/6FD1vXW/aIcDiSUoIhwrUtxuGGZijb47Jz8JfUTblzx4eNPbXeYpygkQo1xXonjeouTuJvAH/zH+FK50zOLAtbN9AO6xjfX09CsjKitMVlHWmmQybLoBHBPkC5IbAZxvs3cH1VAcy2X90WL6y/0SXNsGeLBdr1OWVuYg+/wUNiR7QnP2ec7jNrZZOosT6Olwn02Dh6zSwKoDnMFLfk7lBO0p9mWjex7gEFXNfxFO19qmaoISUZEgdTuy7sHgrD/36o3XeFdzLFoFnOJa4yaENBXdTSmVZacz+5IGdVkEgjQt/TxuhNGHGtQuzNDfM4iNZ28Ly9S9WkUGMNAfDRLr4ipZkJxUA6HnlOi4Yb04/Ze8rB+HEXpDGC5Jpr4fN62LQh8o6kxknE1P5/rNmz43jehFlRUvCyNi3Y5St7lC7a2ogCt3Za6M7AshQdbVV2+R2DuuiLEJz0MLhnn/1/F2Z2U3h560PrnhR0Gc/5GW5DwO/DGrR/4PvL046BKjUp1lfrtKfE4osRTS9/oB0GrNW3cYgvhU8ld61sHhKOf4P94t4n7h9zdRXDaFv4ORPHokkY+NA9QA49RmsGMfJLu1/RXuluq0J4fsUUBoa9dL9T0yDJXvGtuoln8aYrNzoapa7E8cR73/wX6KwBPpwCUUlxsBtOj0rnca7zu5FqJC5W0U8Yt529SAI0S6nmWnS8zguQLRzf/gRLaqSQ6E9T6Q84u1cs56dzBMv2eBG+zAKw2V0x1NJX1gC8M2MYZpScdXEKPG1442UFWTEUlkM9OjbR4FurtJNV4IqEu1htlgltESO0SeZMHZ1JM7bNtYegevwPSCmW+S8uEGj7FTSSV0HbDg1rOnt4Ws8DxqN2T/HOXNd5NGboZ8VTSD6g6rLWcoWOwsyeG08GPG6KHPiLRunEdTPNmY74ObRGT1VCHP7nmBYmjnH+kqK6rDyrEoNjdqc8uG8yZrHWBXU9weqD5rpQ6S/annq7P/GiYepA2ZDdJA/GbdxpHYatPgkXt5sop564gVHZamW6cq/cdADaLCXWt1WgK7y11WaQR90YOen8BECQ56pmJbLvzzfWBhUUJP+dAEEK4o4wZv2+IBAFEdNkNF3mKntsLE5PDLA/IEiV0rziyORzLJsoxRMCQV/HlpCkXsaizcHT/vxU9iadf2hOkKehGum3973fFs7uRlqxz/oDerFL0617PqG+VYIxjeRb2IRLZJGH8vp8ITzF7U7HUg8Crs3WpVY5r8wxn8tzGvUUwY5csVu15Vmm1xcs0UL/lUCkrOXdLtlaa4pHLeQgpd/vu1ZzjMOcgzfQaIwiZK+fMZjRLAHUf83TSCOkovb3xPkD0jElmb4TBqFrwn8G4KWr+RM58qhCnlVimQ390m8YLz+fNHbBRDs7GJgHSK+v5Z9cwZq4glnR2eTjnqTy8Wo7BEg24CL/RT1AKzOIE7muo8oegzn8R6qab08LzTcbb0ippsScfjQoJhsr4jKG2pMVczpCYqptZcGD5rxTHFbL3+NDnEUptRMyARhF2FMiM7pgaB/IpAna1AHa5EPt7oBdzMGg7kOdSOpxrPXbdP3l/+QCfCLMpCsxFd3VAxA/IPVvK8JaenCYCadhyZ6rJeGxTUh11+OOAjrXIJxb/EbIy8rv6h7hywPp9ZhPCcgt9BN808JhGIaKwtL85jO5nipQyAF690xJ9A2DMuCx55TSG88fN6rqBMYDI+I+DtFmoAqJB27B/xxN9xMLnQwLcLCHOx4GIFCq3/6i7gwJePjoG/HKNb0XjhuEQmYFzTgtt/uIo1bBX4C+y1jrb+R0mRj+RyaDkRus8W4WW73qbcjpjIh2tGUY6KJyhEaKiK+LHG5euQeYZO4zXoKbZOWiJTvJNNVrWugpXkIIIE4zK/g4JKATQjtaC1qbJ6khaJHxOTS2goU5zGyjmaPKvVPrBh27E7E2iZ/6omwpBARV/9EKeU1m4Msz8Q7y3MzEF0C8VIIqAxB+Fk8qG970lhV/ZIX6CsxiHqybemqil3Qv/cWKm96fPoMJWSA1dcF03dSwSyNMdvKKBCYVYLuqr2pISKPaNRJJw2R43RNE6avh/TNA1tGJ/ilW/e4LbOvIh7cS2OsbjyXcD6WS0DYaDa+og0lSxehZQiDSt2fVdtF+DO7/cEUAM3uju47Fl17rUPkRPaheA+6/jpSYK5Nh6rSwO8Pbi1y4/L0L5SStva0NcscpH0pw/3Y9+Eqw1SDVvRn2r2d8vRC6YhQywdhKWraKGBMILqjiU2l5d3jb1tnQIwi95QiTJW7MAjJD4Plr9FGRGlM4NQyAiG8wSAKUbRCpmxE+zk9YhXjiC/Rbt983pV0VzovJW+90dH65IOb2VS+Wk+MpsRgZ86uEuxeGPyB++07HlAwqFjq0sm5Lvom/rcHSaLduJrDdabujYJRWbbY2QZptvGwTHAiaqsAafE9NQa2oq6hV8+E2YRbdEcrirxyx9JVWpti7CsFfA/egMevH0MR40/X1jQzMYbw6mr01MI833RiE3EuU79cpspC8tuN6QxFB7ExHF8yrFQ4vRniEkTgKc8kT2tC2HgNJJ+l/FwYXky6qbHj1cMtBGVOw3SFMHn5l5odYVrLqhL6R4DujKq/CEsEj742QjUogvrSb9DOh1Mm5Z7n6MI+YHii3bWp2abi25FJIiX3GM/137MQVr4wwQ5IQETnYx0CoXX1nLeqLjQ2VlOulhy58iVxN5d0Q2TEV6MPr+wA6lluGEC5890db42elDUvTbbMcjHGrT7WA4eEhNLqVT35NhLruSPkwg1UCAUz94Dj23i6dqS1MPh40Oyi0W+wfoWYXIw+siweU3qKdQM/IWLUwDjgMQuiK+CTyRgR/Cg+XmfazCLiF1JChK7C2x+ROCl4t2WjYngGRxBWRQqqrNqx1EesLx8Z8GOimBJK3Ip3O0TWp1z6fhibUBvCtBpCBH7Wz0MrsYEtW/6gd/rLbB2IcMxOrxgW5u+/ZBOjd+9Zg9SRf7ln5tqXgM7wZE2rj4u7BOezWvuyca2TpJkQOR8U/bR+LRjmN6RAS7MCfYSPtJWSbZYnQL8vGmJb39SyiYiER2Via1nlShjJEe3JgCwTOTiIQJ5h+NQeEs7qWkpIDJiQHb7VwcR7T1gLGhKAqUT5DPO5zvGPny/DOh+Lo+Xhxf5wTkF5p5yY0vM1gw2UZQ2nhCedQ+PBxACaAeuBYTyBs9aNWvYATPBLUtXJ3H/+rMIUQ3Xz5MJKdV6OhLEEK73rb9hfjPlA0gKO4j120U6VHh4AJvL3WqjaY/KCbwpCzUCADZmnJdpD4p4U5ry6/YuhcWXcVV4dFm5J8qADBWw9jPITjUtkf0lhIJkzhXLTcXQBZaaunvCCxyWh6ifYzNTTCGJcUD6DyfGam2zj4qdBy7DwBaL2S2IxicF7F2ubPDvx0+DEQVydAIF4Utn+/niyxDQpGlaaG5eRQcfYEHaZeHBOfZ8x6KnSsZnB8YZbLVBcEF3Mv/87cj4r/BYDYAaUWrrm/rWPImSVpvPlB3xQvVG305B+bCj4kIW4ZWzFnX7/nApDibPZxncAV04laDsD872g54z55DZylkUKHXF7Y5iFwsc0HDovYpJ1P+XIAb4pKZnw/e2BrTZn6jCeAAvAt6Z8EdXqS/KoRwK37xhZL7w17n2PYpqnoCtRAvnU/CocUq+el+PFEwM2GkhLBAJXvVbqxBMfPWlA8XMNY1+dfsV9Uy0C+WgSzcXw/ylN23DlELK9DPZ1nzFCvyDWygh1ABv0LXhuVuDEraYOrX0J/NpbYoxjl/mfncXN1DorfumMjOo/dWEk/OvdZ8w/66CtISpGM2htGRpT929qEz+kRM+2XpAqcSS9GOrLWVVUVIm3Ez/yIqAWm019Td/ytbE6eeYJaY+mJpelcp0h+4Y1hmcF9J6cZQEJi7foY8n1psVTCzE0QYMX+ScYxKxb/bU9eproUaSNTxHeNhomtba4y/CfLAZYXndn5ndeIjFIsRWRpwX3HwrIsKxRgd52tRs/iun5uy44w8u2wZgayiPbOTWGXUn/BDqak5EZebXbdQHyE0yEhUO5HcDnE6xlAuZFDSKLDTTZz9bWcfe1wy8KhSOwh15cBRibt+faUQgl7/5na6Nl5d1o7iUWTjOhjQa4z2Pha1PNGSn0hZFeICMKGtHJ6EGQbB+HF6+M2e8YSQjJ2cnG2SVpdzXlnkzxYqwXv0s0WM8nggSh7Viq5joXNiF3RJ0A9637p1HFJd2I7GrQ4ZTOWRi8jcZaL/25Pox9feMT7VDPV6TT++0Ri3a1aLS8IABZh2dWfxnBmXDWPdvrxmBiF3eePVqd2ZM5bI9YAN23/3qVLElDeD61xvgRdjkXkl2tqif3zsX1gGp9mzEm6suh1kWL75XC2kXlrCreiNi2pfI+iWVFJDXPd3MBNp7VSAZRp1jpt3ug1pQEM470lZXwotpDljklvGxuNeKwTuKNJw0EK74nc0d851QXL9P4pxZdM7pkmbA7IU2S2Xa/AJRP2VOz3Kyp9oW6FgoQi4noNkoHeNnprbQod8n+dQSSbMzNRZIuL/riHaxoOHkaGYwROCZwqcbK1tUnU2Qt1J+3UTvklj6wOD/d8lrZG7ucjZiCyHxK5XVtzq9lDJ4N1FvARCTUfnLeOLc5bmrtGvb8mmsr0lDDyR5607k41wzglZH1fExfmsXrEjiNLSzSKGb7FVusl07/BgeCclDsQkds2G654GVeUpX7UHaqQBEmJsIyvfxvz85+WyRaoYuQfSH9WpJLeUoXpUt7+Crnl1Jqz+eARyCmzL59OUUBwBuoQAl5VddIrfG6xvDA/RZBOV5AfwjOrJ2xRo4N42rCSFCcnOY7xfewl6tVLetiM2tGLqRLc9k/owyHriX1A9BnluzfDc5xdEUKyuwzWPG+tZGNDV0WLl1JyHPflzcBpj92G0AR0lGaMSZuKui5/LUMn69X9wPKc6FVkNEHEjHjQKPQjuFCokjN+N/6DlMscpE48IhHIa0Ghrc36GwGEiPRymXWKD/di92yfjZjDM3fdHBdwSxJRSBVKHSwh6Ey1/zWZRZ4kk+KMS8HuroIw1UPa+PDVpsSIKvmqZnZisbfHFWNW/dl9n5+wM4VIzhmrETz3k9WU3s+z84SHh2f7dGT/G5WvoisBYAgwm+pqFS0A8xyhy4PiKfgS+6TgnQD5hDEerpzgFSaMcw3yvDZ0+xfL0yznf0uY8N6APiqHdoJZOWqTPnTIbeBLc5dvFdh+mvD+sDtl8BAWzYR7QkSgnx30Ru7TH5a/g4byacurCNvG0lTgpkj9w42uqBp1zMsKr2riOCQwfCRKkuSX9CGADOYGqCHh1JUsk6RwvI9OvM9fCJoL7Sap8NUQ7mAvdB2ougA01NdqxVo8NeGta0R9C7QybiN4uAtDxw2zLTG9+0we68JkqZrj9tJilUV/f4wOLc83GfstXOVF2bAJ6zf56YworQQEDj6QnC+lqyMkGAr0QuAikm0jqS7fy9bYSBz5hekPILc94b8aUau3Kt69QI1kFEmcb19aFQA4bSegA9/hFi61RDIVQ7iOBqViYdGaK8d3zH5qWIjed0hR9e6o4zELdXWhOVOcPCmZIYYXvgUsAyGUoCszsCiTdwOaPEL2kRnYh0mNSZGb6/kr8XfbyUdbEZ7mDBYy0yTDxhkrpIoJmVutN6FHk/E4cTEolaGnv7x+QxQIKZus8IEygpdtBDxj+lC5M6HaJ313pLDYbjpCA+oYl11ISRJ/fB2oIdDBHFLefQmF1uHk7vtSmIyI7Q9HG0qxu8QRWecP8ipKR1o4bGrAhR2KcGEDE6k8r2F7N9lNUZCswXi/EXaOlPb9fdsaw1Sspku1xrmyADIImEs//XiPqI3Jl8BlrsHf1mAVCBmlqE7usMbDEpilt45ia5CXzVqlIZ95Fesu48LEATS3dyXVEjwQAqVbFBttbLfXvX4LhaGKv6P3XBsKWvqEFfq1rPYdohHtQH03ehlVMpZ/BRCBFV6dffGCrIa7OngRAbORd6wsIcR/gQSxhfrfHFmb9Ws3Pk/SikwIvAIYljNbXbvIpKTROSiPcmBDp4hxLkrjR+MfBFZLV5I4usLY6WYmjhT2kzW9XAxxLYCELLIf6lg6p/GFgpoRTm+yQ6PYtmKVvdTHyBxv28y3vTiy+reYBZqmC7x0TDasiMCcA+TxdKgDY4s61MpZyI1+RUzeMfx1qh9MBXg1tI/HSKpcUj7+qTrwp35J3ezefo6UZiEWMPBtx0/tJyaej7NUmUHVRBJfB1q0bsw4yHfui2ZOPNh/6R2/I0j09t9QGeRxpuJzB6DNbaPTOmER6WTXYEGXq7DhzkvCP247uSz6r7MfaasDs419fVF4RAt4XoxkFRmk3sjrhpNSeuDoG5RpjE4pI3rH/ESPaF6RIIJBiAbVU/ct/nKrDmBQPBYlNob0WmW07GhOvvz0m/BXTsPB8qA8Iesm6PsDuOLEEm5+jbniDFyXfndwIXHgWBB1GCyGV52MU+5iXguncQS8T+WyxaPDqCCXMjwPJxGObdF8mBkG2+SpqaBQkeN+1IL8Cbb72d3ySQUR/uO+N9v36KAiKVEPx8EERU0vfKi53JWN50+LSYqgHmF0UrnnHCNpcwfX8ezokGL4sK/rgFZlXnIqg6a8EJh7DfMOwMgTwRjjZ+TrXsj7SA6EaMRroFgxXRIOGDPYZgkadllrCosfuVZqNQwAY1cDJzuD4ocR7PgZYXbCA3g9Jd1PRx7PyRTNad56qFMVIv/9AYYd32opL/KQOuEa2LIoyMUHWsHVeJEgDnTAizkdfigKSmZVUDrztoGXA+B+9B+MYT2q5BETXJUKRLiEw3upTpXnlh7hkEk8/0D3rV1lUxxSlnDzLfFArxdnXRhBNu085RxiTwTISjItGPuj0MQknBfLTi9AeLTT9QUKRG7bxHm7P2Kei6fVAeNBP31q/OVsTuBJZfKaxLodsCxObxFdyJNLV2tAt+2SCAO5/VWcDOd7Or0wzbVGwbXJr73+/PYn3VfNQ4CSxdqgXNPWDqh9ZFVRQbSeb+bFmOpdkO7C70y6dTSHVuHlIY33/KV1QHDJ226atG4ltS4fk0ZNDrmPZ2Lps6qyMYO+Wkmsyw/ECuxfXcZ0zM7vmLjkk/LsX/XG0vaL3KZb2C51I5TVf8fBJmMxHHzKvaXDwSTGiya0f8ZZ3olqbqcd2cjXM0jicXlX0cJsaB81POyuItwEiYZwsHn4gymrnlD0mfAro2YoSC7KxDdL1DQVO+0a7fN1fLkv8ElaXx46Z8EGJ/W6akIr6uEuiFIQB9fHujgNzIzAgaDEYVITJJO5XQkyimdgaTBvra1hUbw4jb8imqVpd7G9dSoQVNPatqBlbm7NLsdI/einfpw6HdFlo9bpLb/wBxf2BGK/YWhn6LhzEvBuRuBZJTDv7HV9WfnA2SyT3HV/F6f+23aOYC8rxO7QQ1FI4/0m/OAHdCwYedzx6F6TIlSh668B+Id3ZxNP3V+Z82Tt/AHYSzDsxyYC8mxyk+Za4Q6u8y70AKpUm1NPP2WMeSHfqCc5mUcG67RR+sJWZg7P5iG4FPnFmWKv1nwwk+fM0IIA5p7xmHnj1zbj89sN0hc81tzI6enBjIyPd6P5GXzsmp9IRHKS506SAEK7IxfjQLxkNK1x+M8YAYLrD1qWXqo03kTvXgYllmtbguZX1FQGpXYjbZzgqSLxcXTKqQ/GhYqBJzZtvPaYGODBTozt0Rw6/vP+hTUJGOAYcEWWr5Mqy4792lLWmElkf2k2HiF5268DSkEL2oQl+VXl2NXgbfa8xxQoI7lpuNkURcA/pNz/go3LD+w41q4eQy20ecjCwekr0XfODump0XPUm2vvNfk4P/tAVA2PLhl21zoFOrSKjd6D1AiMtz/f41uWlBWCDDY4tDRMhyGsls4GW7P8b0/dGx6VTgC6oCCWxMyJyOgl5RPaFDE/EzGGGL9XUm5X9L3crn0DvEELm/Vx6HwlGWtnfZK7dA8/zJkr9b7PBgLeFlmXyfUBxZHF8kxgW5tcxvkEz0roS70jNLvk3QNCTUIwCHnqk5NRDEaewDCzjTR5lKzNzx1RHHJNiZZJ0lXrAsSM03iKPyYNdJfMwUAvRlKP49yIx7XS9cvseBWVvGNAc2I0PmR6Xc9KjqauqjgG/Q8i16OIPtQ2Ll3qDkunTNq2O65AEFG5qycHaB2/159N4n67iMEpyNowNdkq/ZlDxsX4dRKNvBUJaYqhID70qa2Rgq8+AzqTaJhuYrqrDDO1n/0rWggrBcFsYwo7ujJZblKGamFf+3B5MTAXNUOKn5PW91Gx56gtqTqz1dYMML1dFR/KZUZom7Wky7v9EfKnYbBseAvDuBFBFFCuXnhvWc/JS4ipUIe59Ls/kL+W5lteo1xt5bkJYfug17vGw6cqrOjTG4nQXZ+RbEDCMTf5JZ4DBcuVv+tGPyucc3B6R9NMF/lc4ubulrqcBPhRUjGBILbQ+4uBJ9eUHMAj2ijfMskRMLcV5FdgqIWhiEvxNVlZSRrzTzySfBUjZHCJQtbgDZ8nRWLwk6rQKWD5aSHuJh0vBgvlNTP+a4P7p59l0FYBPtoNpiFl/dOo05KHesQCueTxj7IB6io9sqTWxTu2PK2C3ACiXWNyxs52441hxg3eco87pSRV1NUvQeac35o3tgUpXtmtl2yHh3QO1mQ55wSqIri3PtVxJ57l0nOuyav/0ixzLEq3QlLZmLb8Y2JVlrdQMjhpcC1j0DS+VHrYIB4JgyXacVu9PCRoC5Y2+p8qfeJA3OFreaabxWxz5omyn/l55+ufQkO5e9iODCdLWl2crwLrUpaMCi8EUcVXGb3Z8oBCUdwuuohn1sivwQp1O+DaRFYXIbHQibdPfq4dU8WeiYJ4WKMlNEuQr/BRIGwOrAIM3Ppjmzvh27Lyx6xK14sUHgNy2ggNG57CBbXznFP/0NVrUQef5mMdso3AJ33SJxInqYebzcZ2pEVYHYczXE/+mcptBHb4ANtGohwQabL1xmFHav/wFH/al8TKjzGnYiFLEifJHL7OJD0x/rtzWuCrDToEWPBNtRKXFZqz/kBH6gsxzy/TUzP6R+C/A456FbGm8soK/uYyafgNmX0re6fgXeehUvtDCXdAUJElJt7AMv+VMdIrrOK7TAaHo6E8Khx1rq48yOqMqtC08so9cQh/AV760CiEtSm6PBL7JKCZBV4m7t8Gbbc4TQRawpuwTFyS/vt1JBnAQUBDPdEddlJlVAfbGy+OKkohOw9BB/JY9rDZQK1o/kpfl82umHijUnj0gVqhJCsrzUxYl+ygkRPDEPZqUIo/+AtsGplmBSxL8bUE1iBc8lCtShF2iqMC1DdHIH1DcucbSNtxOF9LY4IMng4T9eTYzDr+gnOPVxWBYMambJUexTzxyvFOneFg3r4FBEHqG3QZRgnKISYUQKv9B23A8vhFRe8uNZpBtiMtXqOQlVEbO/HzkRbqVaGj4s2XRVlhO+ewkvEaTp4pNLXG1OVF6ncxf3Fq94KmGuG29LLsFI1fuX35J0TsRNGo+TCioyTrXLVEjPztNVQL1/q5tGSrMPhfJEaQxHcrnqhVVqN1gfF+JK9Pgcud/lGa+Ig7eKQpJuUN+PYhBYQ/b6ahi4nLNe5+d8rQlfK/gl3OQ3WDGWuUMOt1YlBKoX+99JWlZr6tTAVgDF0NSHs5fqbU0euO7cXKnvVB3taBFHP6/KKZCBfGqzNo6DgZgiAELh1EYOni64dmOWUuwAQCKu+L8tnTFLlL6uKkaNtO8YGlOBVU9mQFYx4aGPgGEI/HTycxYXBClfKbmSErtcsuhalOh73FnzRz/thPjvRJcRwPtZmCHs1nYjivLMWWGprl4fRUOlrCDiwNU+9TZuaVsuCxj/4DzKfcla139igH7Z+0uskWkEq/c0mrsRLlVpl8ln0G77hwK9rLKc+RLeI6KLKy3Um5C6Of3qiKNoY/7ad3EFvdP4VICsuTMTii/bee9efmKAiym0A+l3hS7SofuEJ46In7BEO+Kf597wnd6s5mL1d5zNRBdOEmfNKyPdUuCW3u/SfFQes7nYlfV/B1DOE9p/pmgK+bx+eZdZUMu44uBGlaPvej5wxU9aumiyt/uCCZ4PyO0OYfFAMMqTaYcI8GxYeHO/3tDJsJisLleLpS/gvPLbEksIm3R4OCJ21S4P//uyzQ4EJZyYmWZjtknKJbz0vFEi0zDWnZHl4kvpMSPlVI8cEAG5r0JoNN59joEsMhUcPZ1YtIDYX9cnR711x6SQEnBGgTz6d3b1iebIdotlgqE03w87xlD0+qEykcVizaOB3Z+ocaMGWybZTIdpR4niV9mDm65EzKK8VQq59iMlABk54A7zAlMdkYNmaRuWJN+bLJ7RqEZf8vrpM0+3cwD0NctuwJJA13JIJVFlPStNIXzAW4pp1OnTx3rMZQfF+o4p92WDkF2tx1MUdC14Er9l1RlYsEYnOubj2IotL4tkgKwnE219ZsjXb8PJFkzakaWhRBJAkgbR6myiYFsJgC/lellsN9g1ML0j4HX4rwIzHbq20FDkBdfqN9SUnIbJf0QQr+QxHx4f0kRekXaqKZYUXYMbRKa6OObLPOaKGft7xFAgT2pHuSw7kdfloER91zsJPWQJbkAzyDFkkgUg80kW7n7n+WBN3CMXA3lU6QR23Ipx/98577h2OGkpcp5YiTX/TikBkcza+iwBGNBi/j+GwW8tGbKxpiSNEQqUDdqfscbVMQ+OSYGoeQKSLwREfUGDjR/emc+ZAJsy3sraTZkpHFZAI69dwO1dvsOw/Q+O/2lgghmEsk6NKzmfI+OYuOG2UoagP9Le/y9UABk4VHk54+6fW891qe1yVDT2KUc5hNeePBaQwVb5BQYPt/+2xEpqsHC4GY37hXyRSGvfwYa7DGUDbMKd8vud28h67mpOl7fe4uFRe/HOKf3TFs+9RX+QpL0+C2b4R/8VfkUQOABt4tcaDV34nU/UFXBUDvPYMYe0F24AZPIWphY9bLwt+tWvmuWwhvAgPN1rxvo3hpXvQNSPsVKgFUKENrmSCjWPYCUoQfJFpepI6oqpsVwJt6IlBFGO4soABNOS2KtnF9P7E9sSLK1WWOdGvYNhxKO5/D5ACMSM3oLy6XvjzPe57hP26DKKsIbhLZqcz8tJOcm1zlVKV87cVqDh5iOgGkNIKp7JU8eBp4VRPvv6peu3DR+ROhro3GOnpo6Cdltkq395hUi+pDXzwcONA2YjC4BKvX3JGZi77wJboSzwwPelRCe5297Gau3hHdjkNfDMaoCdfo4BX1IthlFNEHUm2nTsuiPe/rOux7FSlxIwT09NqnvyBmWQYcleqlPEreuoCZRFvXL07v84AxlxNdJM/atDmCjpmzumIoYOf4uVqV/8ZnSwV78WW0S0R7AwI0EDq4B6IaI6AUBwPrNLY0eeSw24zQ6qVAgBGW5aK79Mg+Skj4XxdPl8axMl4x6nwmnAfEBIju1ssp4yr/gdi9kl+ScGW3r5NVqJ1fXRkW9O0A6JBottvWGypQioSH2C46bepNpt5dXRK28XY0hseEnW9fDBaUMHziavWy8Q7jttulrsjOd5WunqGz20rPiwX/3fdKuQgv0g4CDqGBMamo9htCyKqN0qTOxWP5MmZG0lur+eIMwtcrfYqJujT19J3dps8mrCySt1MRdmlNIykG8cIMszw/nMlRV1DmpxNn2zf3gflXm1sXSH00EqrICj29dnyNSbIteQOqjPLqBf2QDDVVCAgcCz7vER9m5X4XkTIeB4ppqaFa2UHE05QSkAhs7FkyPf40UFGlKG8GnrdKq0ZLUk9m5jleTBwhdDsYP8HCDKRE6LS48qLHD4pvSl3XFvmH8KBEmyeyNwwJzAJQd8MqhmKsdandB6Ec1bHOw8agmVGP/vvY2C60X8AnR2r2HhdkUbclW9+ozjmxmipA1AJIZnqxg4aa1Le0RHfU2vkpf68y/rFMYgCXue7eNqxoS0NkOw9a9/WcDFJOh0Grb8zYjPgaSDENIFMCM0H5OlIqq2r2FKGkaQSMzVm87r9L7fysa4xxVMD0h7CIExLBVbCe1/r/WavK3yPhHVe3XBjyVTDOqI4/90N/Cm5KnqxFrVYOHbwMIXa3GwNwVME+38OpXvNwD6l+jN8BDCRDEjGDFC+WObTdm+5/tfm0QeEfVUYFtA7gTobiCnl8rywroMyBHNClofz+W7OhssrGuos+fRhh8kBA+Ni0fYdhKK+qCZaY0LUDpn17UUKCX6dOZccCYzSsD2iSQP74pFnhlkOzACsapdT20zbjF6ZqLgELUPT8IglaX38zP6zfdyBF+NjNf247XNtmIz4QCO5iRy/GcS8jjaWMfTxI3EbUvzrprtgRQDOz/eMnyVQVbbFiTMZfhfQLeu+j6iY0Qs/QYGFdHefwzAYuVpPhVZK/tXsy6DAioLlmNDzAu1eQ5ihCnobO+MOZtSD0+uTpiOAvPwGWf52xDUHj4zbdFtZULPV4c1TmWflDGMkg/Ia6kPHprHErwFTGoBg+1D6oX8lSPdz5srAF0RbktUTmq44+USAYYowZQOVbM3BWMc603Oy9SQD3buNTgzJ7yaMBbo/pjkzVrpW5xYH0Ra11ykiz32vo4nBg9Zvm92KHWhJm7uQJV5DMPA1JHBWBMcjz/uZupwXqjoTffeHZ17N3waXUaR7cZDs94ewlhsbQrmI7/A4zJDUZj0qKiVQhn3f3AneEhDwl6GUdCBdKY14q9n6ay58twW2PRXXPJ6UE6TUs6oqH/0xgDpP3bx/mfcCUy5oo91agCPtpTfowGZ0tyw5mIOsUqvdURDhjuWLX/WIqaPlYx3zmJ3ahTcxtC5xQgKWrQskF57LaOvwYN0lzIwz/joNYkiZwLyB7Joi0CsWWRC6SapEN5TClIisNQtNPmfwKaKYb+Hguo76RtcQMXdRZWjEJNHq8KZKeg/uWWDOW6aygLP9JDrNNW7JfWDyHPR8GL+29zBAD5FY1WZXsmYfdKU1VTLLzAHERJJGTpwKZH5k0uZrDYM8zG9WX+RVDM8bsmN8cI2wKz0Td8GEq9T4DvY6FuhMsqPGHC1tkLdxuwBYP0Lu2RvjXaxodrZhKfkkIwGcfm+lFS4WMFPCz3FwWwuvNLNqv7c85xnk3aXWl49yCW0YTzTqwyKuKWSIFJum5G8BBjvxx2yDOZMh18M2WhRGX5VA0p3eAilBsGa54P+iEat2c0lLnTrXg7fzDLJrjO/213hRmT/92zHwHShntUiR+9KUWKWRcx9OrMWfefEo/p2FR7dbNWoP/P/se7JJUfBzJixcPvTzMvSTQrccDAmpwoLnh6pnsAF37U9Cakvwb0EZzywhYhfUyAZ4oAu4R1X55yrbJifKRbLIC6NaYqZxbpzV9ec4/SFSjJKEvmVGa9tHfUJayAvrPPbVHNaxlbdJOOn7f43GTTdGGufXu/daAhuYtol2y5rFVUxlDpyKCfYRz3fOyJZEjhxizetlF5kpK8kUuEpKNWnSG9VEdmcn7Tu0/U9Pho+IZiTincXepD9zQXGusmr6j19TKRCe4dmbGmRl1cDDNABYeOKT51fHc6+d1Q9T2n1UMmkd+aiSUgNIrogqtnInezaEs7HmtmpjKttWg7ulLhPvEEnGE5TqPY3iCItPzYojGET4V755b+cNmqdG6OBTlbYjDs4AAp+ho1Iq8R/eWa0/FOyB4K5JLQ/WqwpaNPuaoufHcJMEld4peiw/7uIRZ9U4otV2lACBY2PfSUUu7vJ/iZUtvPoJmd8K/BmbnNo2iumTtQxEeARnjsHdzf1JrE1L6NGFsI7t81c5GCgmWILKM5pWDA5HO53I6aju6916JkUl1YcYyk9Hwwf/waKzGbNaeXD2d1jBd+rriDyPgR5p32kxAb41vjMM5QjUrVztISMmbVDBnx2qArnLJ6ECRGZcfK4U6LCAMxRtE+Y32MobWIYqbeJLCsaF4pCXyZjPABVmN36NRAavX8RXO80JuF2m/Snmg2NL0dSW67EVH9I4fcFSjpL73r6ohLh/V+uK3786Tpz4u9p1byZEEFVjn4eK4wBNeQ7DGhdbFbRTt6/9b55EBMfJGakrqZ4U+Fgnh2uIpidUcG+iBjHE5HMRX2ZKkKLyYQElkw/Kbj2w8OvDaxd8rzWoSUnwkiP9DB4L1FBdrrf9anTqNfPehHTBlyG9cgcQLrR8tQEZN9zuxs8BV1Zf+cIk9kSStcCODphQCbZP7NYhgTuqPh967gyo6DhJVEeM/gq2arEo3NkVtX7D7mzM4zzsjwEazeZbygY6xwP5F5NLqPJ0Hxncni2XMn/GdHQmTbQF1zee4LOhZaDlBzMZLsKXcJ3sJsBmPODcSW/FKYiVgzz7wLdz0C3bFpTwedWpIZzG+H0kpS6hOFF5yNj/xUGHEQK75qxYUFuXq2vFITPVf7aaAWUF+eBV5VbBqFcUccHNaTmGaDdRTdXTurKJ8ATxX0DHWz2qNhGP4nrYJRCKI12hvvahdfR6RlR+zca42mjybVuHEEGrU2KvnHy9+mmlQDH4jYHZKC6knkne5Q28ldgrISAF0p2u8YVTy2bGLZqUkIV6zWDXi0DuZMiQhOJwUgZQNnrjzpboxif7CaCAFdxHukA5fPTubF6aLOTWCnS/EP8ZSOIyNGpkn86BVLEgxNoCo5XDdJHdnSB0Zy+5O4NQSsoKdZzikwg0eSvXAE6j6WW27irlXjNHHxiuOY/LaFsSgXv62JfK2/O09r1DMjpxv32Y457Wd8wFBf9V6i6CdLP2Z9qNFsxcP88S7N6b5FAkZAkO78T3f4mpUVnXed/QQC1AAudBr+gg118i202+jHf4m1tBvD2iwt/8PqoAWQSajReU2kDJ91lZ9cqfgKVbzge5mUlKDSh7aeClFOoVz9UEdTQyNyjj+u7JaX9DWyqtt6955fcvBJF1aKEjjPQjYV4+FQr9Fnd8NqWavBRL91OUcILzXVselzvLQtPmmvtdhkUNi8G+O+b/qcVyHvls9lJjRGbe0YWtuq9zXA02yIjtBjoQd1vY0EmEFvb3u3xiPt9Wix6NZ7ljWQVbw229SAPrh/hsIECHTLmxKxWD3/K6TUieQeqJIfpcIoOQcgmvHDyyRUevzKImeikRzg+ly1+qSicz7hh/DCm/39Fyk6M86XNkhcEgJKANNt1matUHBPuMmqkqR0Irsee0uIofjg8efSzC4Ml6OzAV1PuydANODV+SaVqKrg8qTvT2ROpiQHqoOAq3EdFRo1QW+1ak/AYmGEVA4cF99A82GRm5mLHhLHqOSqBVNF5d+tjFko2morW+bAtWqE3Mhi2uYPJEeL+puWOoJaLV9uHtQIj2GvjqEnPiF3gSNk2kq1rb+v31DDwcalu1nsmfE1n7J39uQgliDyyoBoudkZrUtnIUrDsC6iGs/DA1YU+EpC8VYQ4iw91D0O8kJIRK0Zo3YzUzYnm6vxq+9EDAP5SWf+Eyupwlhcyq7rgfu0UcsS/cyy18bZBvpooyg1q0GNkTJ+MwtXBtDoaChHEqMdF/a7GjUgboSb8jHDJrfqRhQ/bbI62r8nHoOa6UgOaJLxxg1EhXpXmkd3Rch7uNxgpPzxP/mBdrGsygnoth1z7Q/YLYJb7LwpuGREdhP+ef4imi3CBmJrq9pWR8/s43S4uxqNYHUv9ha9RBACBhuz+S4xTQTZaCKSoDHnxC8CxGhiHczvJUTlt4rrWQpu9+AvsrR2wMvwqpTTd2ETTsO/P3JJiLBUvcs0TXCPCRY2h9Nx8ZqMz8XSEqa9ByDLoNM8PxxK/62v/Wkztb9dlxfHsl4u4UjIZo5lD7knNDevOZvFRYHhwFE22lXrX+Sffrt3y9R1DKaG/GlAPLQQX/Hetzpmce0TT69U3cFZSUWj1hcJa25OoCXx3O5jXSizjPu68eF6JRu4ly0GPmihJAcdY54LAu+PeTtHdGWaRfb6RVp9zxwP+2PoTSQm+qFhD5LkhsYuT1IwWLIAUjU9P0z7IOUj2QP4sYABt2vX5hJCVUnjOBPVGQTmwyR8LSRc2WvhlmD4DMitovW8AmruHvsuxxMnY/ybXB0f6jgvY+7tMu0sJN5r4DBEBXa37SH5PepbiAlY5L6+09qF9dbg57qZdXr+Lkj+9ODwIdoY9Ogs9QXAMPBK9sNLNDM1mFaODMVpqeBBx3+/X8BkyPofOmxl+kYJsG1PP50FDBXj0A4uVUwSXOnyDvjHd5pupMiy5DyOMVDjPDi22YVTeKKPxtGz5/wLm/x/DzHO4PBKlriUyR2fdazZ8MZwZO2yzm40RwLqezNhsNT7aqhOqWBMfTbYcyVtVzrROKLQ/cw8h9MBYgLQZ5m7RtajLhjAmwWRubbOysVY9+MbTxulvSqQymjxTj0/yGmowXOk8LorLHbyciHZbi5Wipq5e028xOnXPq0SO1Ei/BmXFCr+iw4toQwld1d5KXZJaq1eDPduqLEuVRpKA9CzB7KJsTTpdrYpMaOsIFM7Wgr9Oh/caoRAohQN6A6HSrmbUuxffYlS4ymc4W40QYfauuqpQ/JTXe2l3gW1vBU3Q0CQWi+YnGMAlM7QCe806vIrrgQmejgYb3z21bFn0KNZj8qMbtk0fubcrDYYwmBhjZezZtAK7N3MQKKCODWwtmN/WYEGctudKJzRB3xrBGIXPbh2oyOsQ4psvw2packPl36ulG2AlW5rvS3xsDrZG0jPgcLNOBZVquBKudvtx5EyYnivmLREWPn30cbkfL4RsfTwuJVSFZZJFh6UkofGq/bkz/WqbPwyDk8xppCVNz7JQstijvxEWrb40THMQJebLnzyY2q2jx2SLecaR7/0b676f5ddR3aDQqQxzS6YlPvFcYbw+8vic5SAk75H9CSsEorQCVlJSk7DU5HBRkzDnV2QtTJe9fsfqy1sQNBXqUXzv+3HDVDSjlHNPKEmNGm5+zlEP/Pa0mLR8hxOG5PeuHfsO4YAaC+btxGwKVWC9Se7tv8fBJBx1n+Kox6GyPB1SVukkNQkjh9dl8s6dR8uwRo6Ep3zrpyoDHwNvpGU0zV5/27gpveUjCyrt2ZF4TOPsS/WygLkfE2dbNXsNDXjU0kggbh+REnbrOGVNbeYAoc4ZX0aRdyTYOFzlRKaGo4MoHLkMH9FMwYlY+jItBYVbIzsByLIUmu7xM7N3q4VtOAzdBtYpwYx/5yTIIJ9yh2VZWg/uPZimDRgASUeaIeF/TU+n3NBLOkQvsf4CKuJi9s4FqpE2p0HLaw6yIcFU8mcl8Jx6XPWv+eL9Uv+Eyr1QVYQfaJcVwJ6kjFn9GSZ3uvbIxaZMwi7x+nNLp60sgdzogotqc5oVT+LDsygUDk+S361me7L2BWYFkcDER/Rx+J0tgDZ6wwKRu7kFtxCpqtt19WgsF6LzpqmDlLORvOsY68JnuZgBdo7ozFmFR6uGXxbySNeCvPKl92vkVsYEYjZ70nSsNQz9WiIy0pcd4Cjnd16gHVj3X+IIr+ZH/gTnYy0JQvVtpoQKA3yqTH8ZK5WAWFLSXjNeHCwtYmaan6uJoOWW3ktmR0n9j0uxSEniCHfobcaa4adhh6U65iKCHer9DsvpoFJxkj5jhGLhPSjJ+hLddzatV/1Ocn1CE5uZoZAMtgkhUYN5zk9+VUjJxOTjDsX8kQFan+fCSw0rK8IhXNp3dynfHXSYCNq076Pn60lpsgbLC41pl75UNjAtdkXJ0OFBP9SOFxYd/qxoACmCf2c4BNjgll3P8P77ikGQPLbKe6Bprf5RR7SLTcoLj+WEriYD+XvlnCQ6gwN09MIkc6PH+xS8JfJD7iyBoSsLx/L/1AzaxG7e0eIP2dxroERhpC6jg8arrg7XQBksDHIJZIPRhy16WjWaucMUOLtxrgBU9rezETjoCtMnBYdaOAagkVHdueRkp+p0+SRoZ4ejQaCwhOiYRYYJC7NsV73oO8dwYLioC3qILoo9B/eMud5uERJdTB+L3gaZcXObntZ43fegezhpmSwHyw4dM10xfsXF1MY5XAR1XmGR9Qz8Yrc2BSBiUUf1wSye1tGQLKtmsheBI0zWEKzJu8/tdWQ84lcWgnXo9INPwDU5XiJi0OyBQbwRH1ahR14L10g9kAYWlDK/0N3VzcgYYursjTtw/2wSHmfTGJsx5NOXmMmVliBLLHGu6G0jFBLZtUkH7EzFzorhlKhKRrLqXXlXpO8crQ3CHEcZLu9XzwCc9SvkPe94gxwonijdizLHtGfLLKLF1cdtXMFa7Mf4P/JQHiBZIRXBzCKoqPaIuvh7X4/SQdEJnxbsIECUF90ZnrLUpBjTXiX4XAc3Mse7eTXKyZp8Q3Sf1S3esZyDQl+BBER4PmbGOeQ+K1112FbEeyqQZg56WiQ0jRCUmP+Kew9A1ZxSjutLVOfkpuBwoSkP4RGNoe7WrmyTXKI6nk1Tnz0oe2Vm3PjBDf8Gwhe+fwAYSAjlPra1TtCj1uu1GcdIAm6ViQn9Srqf1ym9fPIxInLxt48mCIl6DSTi4ZJ+XkJrz2dXWQqhpSF4nNWapdIjJH+p1Opedufkw0xHlr4vORb9BCJ3W8vAPdZSqI7VxbNaaOfqhI/8w7L9horVKv7MLnEr2l2XgUM6+i5Ix58xgRlYVxa+ltEdaupD5yktPEOlldMIatEHTM9j7h7hxVvQPEbtQP6BmDdVaPz2u/o7+Aiy4lsXGE+Km2ss6828uqY4y28croxcwQBaemP2+4hEA88WmmXnQTmIMFje/i5qVzP/dynhApy5GEB55hU7+jPdveexxyrULupZB1hjyqISvKscuKXOXZUnp8dPLlTkOIlOhMu9t4Vx5PLPIDK0SdUiZ95AlS0+/1macnq6hXYYejgXigt9NePxN2PY9CC0HftH0q8httvBeLZ48ootbmSIZgK7/Wm1zqq/lUDZBL6CYC5KDyLg/WfRKIQMNyN2X432uLr/f/9AoV132hvDNWvIbdgJKmzFwnqjd8+MjwrCINW480Y/0ve7EpvtXHg4WzJv5MuILg89gjdMk86QRO9Q/YKdmb+HV6eMqRTq/oudO/E6zvH3NzGgHNz/zI4Clc1kXUMDTrnDpBI2KbWe//7iI6d1A8nhX4F+4tGki7hfsA4VOK83fdLmcdAGqQRjtItVXa3J7vhE+x0h3K+fVJpM2FZDdY7gVF9ME1rtQmyQOE+F7b6vQAUregqMnIegpxtIKRhyTvfx+DFWZLf+VUZHUO+CicH8sE+9LpldACFUpG+WMfE56X+8xIB5l+Eu4ij2kBUNYythq4o1kyIEuD1kt9XQ97gS9+waaIHokWae6jm/Y8Govgmk31Z2M0SBZAIeudbA/y6RkBys3zsWVHoPxD73jIs92cougppJ3Uxf/pQcoOw/qt20epdVJgHhT5/Rg5mNf+bvQ4LJnwSxs7VE9Qc/myZF4IFBUAom49bMTIghVW6RJ2gfXkP6ovc0THTEpxZWx4zTkARVTfH75vftaIkZptS+h3ERciwL+zFBfxojqrdRqqdkYWAVmXpf+ueckOfXPrN5b9eEwl8OJWgoXwyPM73RDn5ix09+qYTUbhIRquBAIHnO03H3q5TFdSXzP+sPDF+FV61ALiJwLttts7/NF2qhFJI57p4sixeZfoEtm0Dg5wGwPCH6tc6aqO8oe5R+IkDR8TuyFEN2w2kBdTxxvejaSoap3bQlCW4svakUIjVrpe7zCbbcGL0xSe/T3hysCfb20Xj0oFitmmY1Q+1QAbHJj3MfeeZfxuvYYoF7mLnb9sF2SPQEFrRwt08qapY0ODw4ReEM3TamVg4j3BvgKWWLIeWrMXPSM+I3hBzjUn6TbqMNWIPDWj5FBYrWBwXYB71BOpmX+5iYomjHoQ7LUcQ867QRS3qZXYnBbLy/FO2tEGfzE/rGyNxED2nvMySIIs4Fx3fZIsIZn/tCkocG9krZ5TWha4eDI3zmyCQeBMYsXlRDNsMfjEEBFh6/Qhq12c9IUp606kEY5bwbG/QnU+IAyJhlftn2f8iRL5A7v4R9oAJGU2GYjNHqZUGg2z6az4YMtQyXcV9X9WBRlaYnfVIRsmuVGDhDBIoG6C8AkCK6LdXd0NgeShgVCNpx7iacd6L5r4rVi1Gco6rCBwBfwyIJs4Fhnq8IZrURn9zhkJ2FenUPijnbIom4cDNJT3zqMfvySGt4ko2KqwoGDH25QLfuWMbcuRhuQwYKgCX9VgClxETR6DM5DNjTv7F3ysG0kI8NKZ5AZDzjJnJD4VVPwVR/fNKHpzgM8QQGSapVEbQCuiSw0xjHphp0eDxZeames1Mp9WwQ2puhmhj5ql1Lv0eYJEpN8RFa01yfNY0KZkTpYzcO/Ckhbb36k9esVXSMPl1G/K7/sR9Mcqvz7tEmdFwGaO02c6azfLxlRg6byx5y5aqHXBgH+N8X+0pGSjHsaENs0tEcJU4XtLrRLBJGIFVEe3TvIYkvc3siaU1d3xi9t7TPq1L/+hMRqojqmp8jBLyo7KEuYZeOKHFM3mUkV+XkyhiFhmwxtLgSsGMbh8fE6hCR2rTOIinlmsF74yj7IpViQkLbyCbrvDt5/yX6I7Y1abrFs7QBI3D9QnlxlwbgZHvFTKeaFKcI3NvUQFQURMimQ5M+eF6vwSlYff+7/cWpYmvPrIh9BVONzVYOe2tQdAWWT5fJSYL5Upt0L6Dl/pZObBEdo+FPC4b2+iU09eJ6vb/kc2/uq9CvCUV9KB+C/CPAJdOu7vq8wf/Yxy8081PEnm7VGsIzzoFYnDvfYTUyPhdXV2yICWljxWqkyEe4e1n+SZCRACDyiLTdzj5Dq5ThMdA+CNJhV09iM2iW1Pgf2XiLDkIpNo8ugDtNdVTMEBsO+uHzrqEI+EwMOFr2gevD8TkmyjvrYH9Bw6rkARUFwc7DRpOCIaACn2Edjv7bmiS3MFeVgdj1y0Rv+v1DYqY6EwHst3CNlpq6XBW7Q/fu+F1R20aHUR5Z1LIZ7wvY0E/w99bKzAyUjG7671ZUYF6F5+Ynv4Cm0twLZ+GTrBp8VL/LMeq8XYgzYldrklMglyWJS7iWBhdA5GraO3m3rO2AorN4N62bHcpIhG8kbvIkybnRVTEWt5a5f7iIYJN61OO1gLp+lMKa9CuaUR/y9eoF3/jHgqh6iPSadglFYQ/GTsLkzIXMTFtBelXwJHtvmQtoXItuOsLGvL2IK/M295YD8SaNfSND8zTfgUXGYQRyrzsPYC1cxWOto+YkW9R3EinZBFUy/5HWXF6WeqLcPADGeJH3U642mjV9hMqA/GY+7DcN2bpls25VizlGv+FyH0qhDmmd0gUS8y90rDX+Xk6y6McJ6S7gM/DYcoTHv/2NeKg4rjMw8TqrlL9LBcLKWQxtuJxVX7ObKDCs6fNlfUj6iRrGPFdJD+ziFknCJKgixZ5RJQEQZi2MefRmUYi5crYu3Oh50a5Jf+upvNzFAo7KhxO8WRvoqnLO0wvvdcPsaVUOIcvfZoUierdTyFyoxwnJI91KCBroEodybtBGshuLseewOL8RJP+H2Oqsca/SYdeeRtivXY+FFQeTQ33eeX3DdtS0+wgHXVCCQk/CkG/az4aY+ExO9eyJRmpeKAXose57USPZEoRKo6m3uIY0rsGhjw0xAS7X1DuBTFVuo29v3dChgu70cPjpl5/xQmrPdA36PXNZRWOszr9FtTYYxG7dHUooremnYo1QnUGWsN/xygLq9TDGLLhVH/pc4pD+15uGiALFzU4PINmfD25G8LAsJea1dQlpC1s7rkYJUQqIwFNDY4Eh0dawLn8fCol/rhUCEbEHM1dJlCBpXxKfm7zt/ZpsbXgy68nEkEoLjs9rk0E9GFFZoYLZv/4qZR7nl7qBbeALu0FWvdWoNb4hCvlkME+i5nbMafn9uVxxXlpXBlOxHA7IKvKJLMXQanWkuK9A+2VI1JSDoY06+R0/g5TPJIHfO3roljfhM9ncx6Qrk66xY1H0+2UgF+oQgm28A27u9+T4rGo0sT6suA8Jdwthg1T9gojZro33dFb5pubkZ5ZHchLzsKkibaR3DHxf769V4iImNuKKrpgMMK8vcvF4YgFx9Asca63MVyNPtp5+zXPASns3bwdmsxnn1S54GTdkB4DwX4L7JXMnQGqIaS+mPgWxbIZbFcDNIrMilEIEGFczfvcACtmReTyzqnpITyfsh5QK4RKX9ZWtvUy4bWXjsLYbNV7MrrZsT82c9cmf4f8I0sSYqVIlcUYgI782imxBuEKs3OWcogWDmwlr9TGLtVSSTlyzHUW4PU9f7Wv06gLioBSoAf5esTj3FD9kKtTKQZfTKEIOcCYWcfIk4IkcfoFGKSLqsHhBpBOTfEJ6dxkBJXCSlknDrb8XJYO4/96XFd4ThAg4/Heg3u5p1kP3QG2yMuUrty2cFQaT3cWMABIB2diEu/1KfFFSKbfjTp8aUhb99C/ZA5m7h8JWsGwT5Ml9Uhw6CmNHyRA15TyVwIsOH0I1tFeVqQaoqT7wGjyqrJ9bI+WtpjMv5CAGQfj+k2aPOJZ/zLvxAtkd/Bzh9BZPEwVE0I0DI82uWK72P5+mHKig5zbXYrQE5bSNA9/gHvSND2qLV3hLPnoJp5q/NeZX7mhb2aWf7qkF8iM4HEHQ6YiYA+E+kPmfMGabHq62QBi8sSJ3yb68iTcA4YT6f+gJb6G3adGkY9eeu7XQZiQEi2fXRSKUOj/zLkyh4R3hOAX6xhT1yCvCHT2Jb9tAzSMxe0RFbM3g6b/VHgP8nyZkt45j1ZYBTwOpQIaFU7nU5focNbiclNOds9b6I+FOnBXwyAf1ViJPMKBBofmR8wg+77g5o3CiYUzQ+KdNxUo14XQc58/GKrIq3XSIefM9azql5sX7KlTsU8DGT1HlHIYnd10cJYsAEHoN0mLKcHTySHsjTFesKWsmK+siZFXhlavE6F44mweXOrX6FBoELRrvIrsst4OH+O47VaML4CK/cNrjlTodfRr3u2XZsHCcw9kXLGX/15sm10DYmP3G3387x7LDyVoplrs0pzIvfcy41eb2Ob/wM6tQNLxQKnfSbL0eyYL+RWR09qeHT/lWpCFvcISYlmdF/jMaIWDyxE/LA1tguYOSiQtSqHfgqHr1n/k5nFhnUBnU1J1eys/8qySmWwIplgfD3uNcFHlg6trf2B11Om/f7E9onO53sWHhas4nNuhBJsUn2OjOnOAFZi2dcAvexHytVxIdybjHcEdXUcp0jkab19hwZ0RddTUGjtyulBmpbfGD+4d+oynTEjmMlYS/pfoCyhEk9XbgbBf7wtFs5qleFrCmB0NrUYZLxmw+2wFqYEUy2hYP3ZxY8uhRZeFXZfhOD58zGBx7lo4yMjiBc0zvOGqVQm8d4tk1CRpyGJOGJWVU4EpHPxqgMP6hV7f0IxJugziIEJHavrZauRXe0/THYEOKpl/a4jm/fah+oAzHRBqwetjJBSjNp5LaZ3ZUNQElZJBDOF1e4muumSHF6da394Cvppq45QN1B2wYBfbx4Y9fnq5b+heTNTCmP9XhMQGniDhmdhGzfPUY5YPvTUhEcaaA2ucNDUO/xvaUVhXDIodrM/05R31bnFkjUjn34N7Aiuagl9VB9SjYsu83Ws9eoevaZVwZMC4uiZko2GtNzZCyMHRq6GKhvEGBiM1gLyvMZk3eR2dGcn19YX72JnDBY6RWncG7lGAg0YZR9lyoCyQ13gtnyBi05gPlO9yOeIYGqQrhgRpR+pAvx4czdaBMpVI7SgZMAhMSsdPUEQ9stTtwSabBmrln0uHsOMhDvi0bNRUWUmqnu3eiLgzk2XKGyTaHCe59vZZcmDkk8aOO6pTw5H+DWALBPMcCOmfIz4cF9E5zesXbQkQNDFk7vlnAcetbpid+Ce9MnTb3Clhv0lL7lyusJYCpLpalVXmQ67YNR+IIDh9vW7XeWnU3FFfdnO0yqCON1josSLVMTTaH/T3Q7Y+gOUofDwwXaGyGRB+4GRC2kk7zANlgd7PmE5kXda4IpmTbP2OqUJ/O9EXW4aslQR5PtYy3tNMamtk4Lwzb6WIFll7MVBneG5vPfEGslblvK4unzLLIvceI6WxhiZNc/nr10k9nn8ikKPz5jmA9oC+lWIE8QR4XYTcO6WZ7VMORykmWLBbTE1NQc8/TBpYSaYjlsyOK50EEwZC6/hyMiltFDU/OcVfSs/4s0Rk68qJkU5mIFxzQcySQSzLKmqQzkbb2ZlC8MLMP8Tt/ui2UK3r3IoyOWjDNfAV+2/iYAbaU/gcEuC9PqZbBCpHpobrsMSJpIpAbdk+lZArMaQfdQP2kY9Krk6TsjNb/ad7Ghc/HTlJyxRISEoijGyuLhUJB5Ch35PrR1oibmRE3vvhC5cWj/AFFMlliT5ELHoj9ieMLEG0BOkVRUXKuv2bfaF8AdXORnzTtMfXYqB8UVY5TvybX4Mkg9YXaiDDrp7KV8wVHpmx3MIlmRkznG4Q7DbYNTZBEi2yxQfQW37NrAOyCP8AXP/EHi/BLLFg/ip1tleZLojlnpdzKgSmJyi4IRDWNifCtFxTRjzh2z9DNa3KUZLZnixrksQWHwp2gRkmuu7HYPHYIQrdjih0WnNb7CL7hFDLjbfGaVLQh5Fu7SHtZTqDYzgY4QnM/x2PC8v6+qmCAMbOvWxZOIxjgpUF1ud2/e41K1bJAXPTZ0ctJLsigJDqNH6fNsXGGXNx7cwJPgP6INK3Qxc3ylfv0L1e9m37k+CqkJJTN6MvvQuae8WjO1l0JvBh6yHIrZgf/Bt/DNS1QULgHfUCLdwH6GVXxn8JChzrTEJL4dTZGD6nCwPWD+eeU/jxNc/wph/HYngIZcSTOnA7ZoHemc7pUYXx0Nr45Sbce9CyAvFnCzoIYbXxoDXYVwt/7sf509VEfvoLzjbFrRKr4vntb5dgeDiwRX6neO0yQZsOSoVjVvOOSAuP4PT+ezKgOTL5CMeBFh5fTyCTneXHNexLrs1pBpLHH3kmt/Gi6938ByjJyGR1wM7/rvRQQoS1drQjQ0vefqIJKlavxUAyi0PuILAyGGfaeCzz00DKjY1cowpRuwwf7rYPEZOByjttnqj6EUZ84F5gZp+4HJmTpMjNq0q/lyKFhwHKG0wkVp5h+gESx82VKGR+mbao8YOh23JnEy+eNJ45yos7d1gFc6GC67dt+OzE5TpAYicEpe2YtuuIHNt0hQpdLBdS8eqx9D9RSrya3h16jYIp9Ogfv58USTrQa6bOJgC6Fuw3VSohoUOQpQ/XY+PVKw2eV8Q1N6yxzymT6QIiLizm3kcA+jtFVJVj/IlTTGr7Tj6P8fQmh0ag3AJfRbLs8nmEQ1QHGUtaUv9djTgKNG5hVLyiujHLL77tNlHcYLwqquU6Z2V+WMoDwfBiMDqK39/tNhs7dXQhQTHYkold5VgNmV+WJr8ETyoKTHTS8g1RZL+KCbZw1LZoGTgR6eNleq+XGRggG9pbw1+WcW0jzJpvQle+pDWTA3yPaJogeuohg7EijR/48Se6kjwNpGStelAHWNOtzrfgmNxtH9r1eSRWLz79nRNF5th43Vy+rZ9FcwK7PlfJojQmk6yDIgDVpS2IJtFflHkl2pdrA/ZK4Grks9dfURGUNk54HimplKaYEZX5dE2M9W/60vxTLBE6XeIZ01h4YiHBHGMX+eAHZAHpSk2dFZUbQL/ylbq8VdzyOCnwzB532xAsz2XqmJFNJCZ6YuvEpyZtLa07GuhPki8MeZUI63KN4jC30SSX7/bWpsMyfpqrzmMI+cCYlmRUB0Mu4kG/untuIlFzWG2JnuSThOvNB87WuxDF4K9MPLtApA2nPV+2yMqZtQu/5eBgMzg8/6FBhddJz3kV0onK4Jbo71w6dhI4czF3ksh7/wVe0vAH8B/pVGb1v7xscPIhg6KL+hvTtq6g1+kCPpBURUhkj6yrfPgZ3/Xtc22MaQJp0ouI8smF0IW7P8ZfkCNRlxyoz5rOlXJ2YoBYf+hZJACLpIW6Ecg7s2fptIWtvuAgGvGV7dSNLkYv17ghjkJQx6tLucnApd6V56PAKNj/7Yyi6MOC9uwvXC4HnQSolMT49c6/5ZRIfWauOyw+arQBxET3gqjgZPldHDuhPDdYxffuJ1ityuwa75OUwVzCfQ3DhhKAfuieBFYqqN1i5usxjNFwKad4V39gjt2wLjcS1yX59qz0LCyVW9KbSYU9A28hy5DC7hdtdQxRU9PX4vfg8R4KZzpT7OhJe4Rwnuob88KsYJT3Xdb5uQj/iI2b9k+IAL2RazReg2nxwi3ia771jH8mWcStAs1NJu+cMgx6oarFqLe8b1HSRxQ7za0WtQhVKdhOSo+l5MyUbO7l4rtMf8vOidRDYSBoESyiDirZR/lirb7mNwOHR9B00U3KDHjR+/6/p0FjHCVpWNOzJcWfIRQkZ6XmbdXoGNbYi+/6K31kVQSpEiFHlf0XTAzQKDh03BJv6aoldSXInQfAEINY34mN7TGvaILI1iq1F8qQD9LdUyM1y1GkmIcoViAyaqPmTF6srtanuyTM4L1D0wyuj0tEVAfuycGdwEON4fnsCqlt5T6S1obgnUutprS4s5WpzQgzd4U9TRXJErli2+o2bS7A/uISBZhgh/679K/zLda6gWtuZwAvTGNdCbAN9uwZti3Hk9kKWrIq/zDHz00+fSYLcc5sgjgY5sWd/F9nGirgGojICMTxUzGmVVyjsC+0iZ7i++UKuLA2KCekIgylXj+DAZVKUFgBgXYW5+1bwyASMUltB5MhCcaMuivyyhZw3MJ7OjjmJyH+sH7zwWOwFaztw+KQpl6ETunGZ4wgXDkkep9RDpXHKdERy5R1KfOfi61l4kXklOVi+UvIPbGuKxTqSuKxjgg5aUU0X3V/EKdOugbYyeYKlYTyfe6Py6u2Z+A0k4k2giHiUVqkoC8MKxTXxmChSs68WryAMhUxyo84ORdwTONcLdmrVJbnyH+ugmyyx9iKEPADsMijuo2U3uJDa7Wnfr9gcycQq006VxIwrhk0FV/BDjqzquNOsEJXdrimGw0G+JVU4/5BNk+lE5kSCYz9cOOfNBtbtPUoVHnu1jfPwwGlaTc7GUxPcDFnEgwaHh5znVnSwPAAdXz5o6vI34Epz0NKfx11wmUjfW8nTAn60/CwPV4XjHM2yzXbq/EA9hUimpPyH+gMWQc8fiEpaTtk7l1iADxvDO8EMdlaQ0nXdXnhCuCrsoC+Uvlb9IaXpTbhDyzTzYYUPRsJ1khYU6+UMPk1YHn7mE5V3/F28Yia/wrwDdF+R6TmVzsqudzix7NyUGk46wXs0WaHIURcZDicGiV7SEhoVNTU0zgBoaSd49LNnCcmSgWRMUa0JKdpcVnfovdDcIyEcqOXD4VeP1baW1O5XKi8DuZzNuEL/drafxlkHz2RIla0Jp8ILNn7S3fdeg9UhAx9q0+SKtkZq2KsJrdjjyAjr3GfTjVIDAz98414NxYOtS7EWs2ZaFK7+4WBYoC5Hkeq4b/TVXen2W5sxGUXGVbea0PfIOieEzqtacY9iZH8JBwrLvaO9mQx8S8Xs1qoQA5mRuhLUFIcDGMj1wJK/K+vclB5Bl071Plrpq5+L4WJ77f/haemR3QBDVN+DYo/NMMFkqokI7b1nRwuzDmI5dEx4XMlGANd6UtZZVQ12+CHjwiLfAM9yPWaei6wRjGbxBRZUWxyt/lA3BanlqVbrdSdMBG5p3j4Pa9sSfYjUr77zB9h2qpnC6V8u1+XFmGBTP3y97KCCHykGfB6mbCNng2OYcDfFxSp12MaqtqOwry+xB9gUkHlnfW9DENAGqcYOxFOWwZHAJEeIuPuyLr3pc8euQGkJA6K1rmHJDoeAl370hmHY+Wk02WBNr6bOj8owlbEPXZobBQ/xU4JVN9l2GH0nnIedokXyCvBiq+jOf90wECFhhyXgaKiOos+J5t5i72+cySCooSeyr88ULT2mwUuMCLDw9Pty72PByiEtatpiqNeZF8Kladg4jD+8iY+w8ru/PveAVmrABMft/YevFyzmyB1LNidUz8yrnolKmitwK2bPJrQzSfyMg7RCZtnj801QmxB2Hh1RdODJ04NYCR84mkyeVmLrySQsPfWBiZawIPusj3W803YTrCIFZh55a7RhYSAh5uolGsv0TMC+pfZ8CJFMfhrjIkPX4iPlpoVij0m+1EDPaObMhssohxiQLjAb8un88eH/6Z8SnJxoDDY9JjIkM28xe9G9BMqE8CdRizNqXF+yzFoq+i0JXmGCunk6mGwVz7dw0Aht2yZLXL1jgrrUpP84ikBVljLiJmABWcOUt5aq4e2FLPP4IYwNw6/6kBGhUw92jqGvzzSz2IXFoSGkFThCZ6Hdi95k3hbTR+UyOtNXxKf3qOHtoG1+tO5u2H6XvCe4OZ0IsSdV2C22f4X0XRjnoLI9dkAJcmaPzyLbgrWgj/dizWHsrNz5PzGCCZ7zywhZMyk6RrEJ5ucZ5k4Fosm8+U94ZyJFHYaHthMhJSLgoHd9plpggxNFeaBMx2BdSg8d0qM1P9s3xHTr7n+uvFsfU5qJafAkyfAi/gC+OLxCw0uMl/XJ+id3bpdG4VxQwyKvZaxCWrPaRHIy9KcdR43jv9jfykGUTzB9KjyF1G0SkyMHMeY5wgAmcEp9B8ffD92GR4FQExXAD/Rm70xyf9mrg0HowJ+Y5o1trz3gJx6Em+pGPt0PvCVSXsmyA7BLMqIiL8iKyvmFzR0O7FJPoUD5dZJ1eKn4tDUJJ4Umb72XTHqR1qs8KsHPpu1Bas2jM6FoTMyoX5aScTz2RVJH0xso6SkxxuMBg3uUblz4fj83SnK1GADX8ZJtrY6l5lrbF1/ZuSi1BShVAdFnfBB3Sh1SW4KQz2mL+Y4svWwspzeGp4W6pTFKdMDjOxHzkJHkAfLjLjqf+T1Axa9og+Cl7gRTi70bSWjsQM9F19HqH1IdJOoerLMQTLpuVpFU//G6/hsxG6sFsnzMJ7n73SbIizBrcriqJQot6sKe+uP1gONUVuBIPlDJA49atkvafSdkS4NR+zciAFrwoHjdIsVSJKqDxAVrM15uFJb4cUI1Z5j3Wgo4gLqLZDMdNtYKJ1P7oBTGSBKZGTqguAYXj9FtcQ4sSbuwAvEKj0iSHfGzNYpAzMhIVEl+O5tVLe4s/3uEd9Gsrl6bogS5HKQwX3XK8Vnj7lf+5qIQiTSzRnfkEpdxxgU0LAZG7OSxjiHkVD2gFaZ1GjKhIedce7dFUwac8qA8Ut250wwH7O4rKHFECWEhhPfyyNNFFWeFrcIjCB9QkpXuz0U80DXFirexggv6bCvxlzrpYL2A02HykHogeIIum14ATyzZnKSfKNZqYUHkFr6qN2/mPO1WK01C9CpwXcl3fLEficn+qMiFNH5a/JFJBAF2ZZWJ5EP8mGzPCF9CDlr0z0YHruP+6bAUG47CNw5yDdR0WDTjq/DqDE8W+/fc6iTB4r9945YbHjR76ZqoOFAkp3KnRniRLdWK5iKvLCCH/Jf9vzHnX4LfdHlAiEucOADd6aaTJnMDTB0DnLoW9pvA/TvJPoH2GYOwUyBgDkGv7VLqRPzjz9nIWylnnWqIlm7L9YRAuucHIleKaTQCeUrXP0Wnyp2nmBxzeDiVOPsap6l6MYLHO4xg8HBAK3J1dgvBpIjcYDKZexJV5mf8c0hpw5ODKTwdkKCeeTezcPXh/9nI/FlRcIYy8sH3nKCQ0EEucVi+uinLNXGTmZXSuB5jYC2k1R6X8FYDLSs7G3qg+Wa30/SZZVsN+vbIWPDRqs9HMz/V2eXRrxClGwzMRZTnpwuqrD1GTjLUluOf9uPygJGxe+/EB6Ak5UCCsCWe2GLD5iZX8ywqGyaP9CGKOOsQ504tSVjAMPPpKo7Ex8LT3xYdh4QReijfasLvMKd8/bu689y+WY+S8IO9LXV7KYzmOOycnb7imsjeiBPCZgNd2Hd2fLIQOaLorPkKjFZcGRaNO6lp+pBPTMvw9QIbYuQZBlhu48VmV3i/3Y0m71BChUWR3cdNSS4D96YC5J0Y7ZFqMHBW6G9p9pf1EMvsoq2dzX2wSvNYXqdP47zyePLrk+nreb97cBNao7U34lHDXeFQ+HqT8XvcE26g42SyQZmHFRlH2UZ0kohpcgm7Li2wAo0IHMre/0XfRV0HtarB6og11KC3Z7/RUcqKzEPA7ZEJQgZNgBZE02MFT702HN67p516Nvqkm0Gjx83wQdQMeqxlml8LDK0V5SdTdnatEK7C+bhiQ3CLRBupVuTeGYhJY/BbrqiE1SY1vdXZ2SFuvNbcrI6ErGJV8/qH1acDEtu58Cm9IYXlR4R//8FS+sjKjiIPcuzVQ+9bV25MODrRYTzxFJYbLhp2Um/HKOncgLdKHj7tOrMZfxR6CrV1qRAGh+vD5dMMDkqvh3RtFI8M/B+95gOm4879zLjARkfVycAOqjJdoBfgWjWNsJnafTkmc7B3nIQv/Doeol9zaGW/DlpeEHHLSCVAFpPcoRFbXqIB0NIfCnsKcK8GmaNVe1S1WmDjR9kV2WjYdDpu3d+gX3edjZ363f9jQEbUhFXtuRXOQv+gmYCubqBrqUoagUdP7xj0HIFEZg93/KZ2CrZfN9t0A6WcpUJBI5WLyoLnqf11jJxzi7XP7icTGifXh8HPdPwOvmb7A1BFcfY2H1yrgpQ9LL1WPc8f4dqfuE91BNq8DtcEql3/06rGk4gsNyWI77GnH9IKwUsAFlrpUmA3zzUPojorig8/2Cbd3TjsCKM9wxliCLyKPngKsM1KFkqM6bMFtyxYYrU2eewcxYM6RkLIzuCbt2tjjkrWkSVoIS5lGaeH9ACsgsCD8uBJTg2FG+jOXwTTSCvGIWOiSPmrIKKcqEISVvUcMWhHEeUKjXTMdtBmPl8s4WipwTYa2j7rmaa0RNf7IXAOT77NGep/q0h0KdWRo5UPERTufgAqHgtum1dZEPq6OH8ILA+nokd8MXPhCko+zgkNqNlrLQew5ugiVBI+TSaF0+Nh/0lIpsCoBQWlDacVD+Vx3x3aSXTbkp6URafBo7r4W0YMJYL0MnwFM5mzSBvH459mHAZ0yzT09dEXgjVW9/ggg2LxRO6yGo5FTpGQS5EwMSjG3crtd3U4X4CO+KX5W46TC5B/X/DpEipFhWLaE6rpYO0r44KwsS9Ge9H2dfFY3QNvXA1sWHN6WR25HgQ091u/FmxcmTXpvXerH0b5xRi1MwmGmrK4ZAT1TapoD8+smzXuW4xfFWkVDOL7zk9xNtB53A3+dJrIzc5OTB601UXSFtQkX3hWaSnhB0fIWaxp9w7vGQDYtDAeTTDigrLMhVNfLUpJcIxhrMjO0Amicb+Ubauev6gApJbByzVQRTWq047GGRSYgxukHnlk5+xWTYTi31cQQCJ9ILZRJ3tV05M1AIgNeeDW2H8IBJqkzSl9nnKSajGYOD7eMyjHHWbG4SEV8CvAH8Iew6SodPSlX4spOyb4O8XdYQ2bne98jMMolgBIbc8j1VfPhmdPcqVcmf5qMjZcC2VzGSMF9s4863hYPVGq86Huy5cmg6zBz+qDU3yje9vmEr3yJ6kZhF5z8UdlkJdjq/581O9VuCR2B3lyEAfQoUZot9HdVILawreyRxAy11JlpE3UoO/fi5/5omkUs0A7Gvb5+bsteFVIW+9l+qR2dINow47smAidv0bLLEr/yqKcUanjvixyzAQCM5CVzq0r7rDR9M7wjLxBq9eBWRVmyK9TfSJqXHjL8T3l8phqzWGZrkRC5oiPO6C5Wf59fFDP+ituUaiEqytebX0Feyu7U5Leql5gBMTdDPsmK7KUOyA5TuWxjGc7dN7kJKEYpro0VWRhjMArMIGbutu6vN2OSHb6nvd508S4Q34uCRKu96bSAD7YHASNVhzXv8N8jroYf5Y7E9s4wTpkvo3BZkkWqpF0M1vka3jjUC/JuZvw9V8avX+D9bciICl12vr/bQJxDe+TN9MQwDJwOe5HRWZKtCtH/1/2brHVDE381FF3JIILjZf20UTFL4MLwmZtFv3M88Bv1x6hEyoaAlZ5p5QEWzlw8bJBt8orARhiododtduYtJBSF7octT9JzbeKdozaif0LBWL/u9RjbeVNLZ8UV44Ye6Sz56Vn8QlwftWL01WoPryii3ZZ930Zx6Ins/HGvGQmHAD+2qvuKQAs8Y6ublb+Dvhp3Y2NNMjsuzOvb6m4YtkPzbhlctKadex8tBQuo0zhmSxfDIZm5VnEDdG2vZ6kcykYFxgAz3wrkVyXQnwxyQIeYMIHQYT+257jBWD0yJIiC3PqmohMzTC/65XVgSsowG2kgnlR7pYY18nBQ8aVfJ64D79rH2pymM4xMU1Zk/OS14XiDcldhO0c0RhQxiPSY72XYxpiaKVYmzOcEvI1PzQa7+LVZ6pBIwn8ffWvhqa38b3IskTs4RBkYs9i+i9/AqdAQg2IOeWv2fuo5tEcFyefI9nATJXQchbBEQO2Cj3kaBe2X+81o97B22kYSwjOkgZybf53qZFQ6p/N0dL/VnuL1cYTGi8k6rMpkKGx4j+Mc/fcHUVNXTKhyO10FkvHiN+qSbJGepJ/aLXoLZ8RET0Bshv/4hAQgzeS7yl0n74cedqdnmAeHmQ2CyXvMM0MWpEvA2ezZIKU+WvUSaGpTt1kvMloerqnqxHLfT01Yh2n3iD29EWnrQsyjedi1I5SUgvQKBM9G+oAai15cO1con2QFz3UK7w7ZgzM+vPmbk2QqR87fzlbdTSAhrLXzqVfLnWBA/4+5aC+0BRMZ6iX9lH3QXtKU9D01K3HprdilL456y5lsl38VQaMbz9hk0LgquziMY01Znz2WE4ClHG9cF/e7stVmn89oNFUE9NZ1RAc97KzDEWHLoKwlCG6L20/2Gj7/M6PDhsvhY+FMzYRg+v/0jo2gPT0UTCfaLBDRVvKQgUSYPMG1dr6ox7ohepBUS0msHq/V7A6Y9WfKDgSLatqTzwhOXnuXAoFc1LsdlV/Nv7XHqg5TAohZGa1mOn44SyY1fyPMCxL1QmxvhBC7mxDyj9DUnBpbjdAzrBW0mUzZ51brDVW3f0A8oKL6FYBf0mwK6YxDMJogq94OPgpZyKHKBYvJXMfs6u0pYnEn/jPeTVQMK6uY9Egww5setjqwdQmwi1ea0/uoNw7QKPorCWZohFt4VB+HUy/ObjCDdxryIg/y0wXGMwFyftSyf0v/ESOVaUNOHg1aA0SQ0KOwx/oqBneMvSoxZc7SqvQaHcx3ZLg7I0FQgQ9799KuVGTfGNgWvzIMnHqMNnCyCLJMNoNQK9XA4Wkq+6tVuCUREehKj+szE6KlaSwgAPfb6JeGqIyBrjJK/wNw2yPaYB9wHia3A56M5r4OplAvdVjO1vrsc4I8LAy1zqqpo0yM1hfixHeLNDG6ufXaX/4mWxYpqL3hBHpPbnox49P3jj/wGgdZFaJe1JTer036xd0Xak5qCI6SV86xqAdAChv6sj7ESw0SU7w0leCi/08lfYfucRQHdzjO3JkA7lvHw0ouMCSCweP+ms5HlStT1HLlgQ/pkLQ0HiDkuoPtTY6fDW0UPlH3ebKJKJsiIlEwAnWQ1ExfQhfs1IRdbEO6sgyC7u2YqSye9WFoH3s0+d4P2X78UPcUsRitbiSflMds3+5ixk47wEAbwHOouv3l0AUb9zZIP32hh+8n3fJx3LXT4wqErJXRmufydvyJuKW5IkA+rD7B5y3hJGUFrf+je8x2WEZ93MMZZjKF3R4hY4E82J7y0z9znWEXqtnGce0dejOBkrf6CbP1VCh4ixhRvmOXO9yA0A2XQqeWYNfk1eUkRWlybRDBiE5SOOtjudxOpqC6Hv0XRqdL58/dsrEItVoppvb13l9MrZRKzOe/vtw9JP9aAkOa7ra6MbT/3YE4LlEJ5ticKWKe+rOGibg+N20Vx6Vg7J3byZG9+hIpULnZWH4Tq3LmlMA+oUfgAbbzPl3twbDuQozSElI95KSsXaBWevUxIWPQdY+4eolMlTtLwn+51SP6BWFEiioYy+r2Rza4OqKJPMbx7t0CZCtpMKxYQ5JCowbAH7J4Y3Eh3C04j1H/2a7qH3cVo01mg0KjVVR59qENmLLCnQ4LNMS3i2XshEK7QAIvi4D+egZPpMUywog3s+tqRiaGXIEMFp3rd3TuvLXVT9tpJGxjgQLGMKXmGL1MVjoN97by2NaOn0JoIbOQqeBIHTVbBYNON5DD3XP+rStPIfVbuHd+90TJpGh8BlfV0dLneK2wDMnndVGVvQLhvaQxu6sL3XsvtxmQzeFWUSHLeAlmTc9yNQKkXtOJWS9faewS8yotiXdJQ6EI1vpVOHgh46gljSllVDRx9qlH7i2QFU/dKpaQEbpAFUBI/eSUGbpgT2ORGcUGXXDWjQJQo+nCkQVnIMRUCP367os5Iw4Rb3LDvOi+/mwcBozzUa4WkjVcSIURKO3RTFCiY9j3O6C5MBS6Y0WbBooC0nOzhKxL8xMIIaM/tnyEzIdlABrz3f9XlCiQ0hh+C7/bNp14eUvnjcHWjBOSw8E7BjzeXkRQkpIuZSOriwZ8PiOLZxCkXFOQ4hbXa4Tu69lccJ9Hd0F1lxkg5QnAhhfx5WdcTkBH3SibBUMCLPb/cYypz6s4GGDMV5smYibldp//j9gbCEhqanpxLsoexOMik4SOt879z21iz+8V3wgG8CicQsmxcsqCc5QUqOZhnpO4qAFgzHF+noxN835P4xf5EsOcPvYWwtzK3WEYVGy5tuvxE5WZB246SGIDgeC4sMge0B4p70Tse4b6NjlPHW+90GmqnySqY83r0ilaew46qmwi4RzmOcPehbn4YPCoISjQ44RURV++dfU53vcKhkSj6cWuh75tdSSUNMysFwoP+lN2gGTwxOfrha9wWxDPpimhEBVrt6dcBIvdoUbCLTDQDZuUOVVhZP4sATqq8z7Ai0STnGxzKmAHG+3I+/tvrDN/OOTHwR6W5aWSRj+M5wmS5hfdvimlus2z4pE6RV+l6scSEX3XjFUVgbSuuufln4qZfmgBxNvIZmkPtMh4WHAtuqRVdgDOLksqdhjqc9jrNVpRsYL4L5fXaKhNXYNJfTorxbaoSpoqj6ZEp05xsc4y4Qryx7BRs3iYvuHRbCUsiCPmmGdUPXDn6H7woEjiz1YeriH6NPF5au5aVrtcw0DvEgLLKMuVq6QvzE1mu+x9AFhhIEE3jVvzGWs7x+IBGJ2hfG8Kb57q5sDsPmddrc0s2doavGt3j59SpKkbETAVxcSwwHbpAEsYTNPM1KhVl7EPpQp+gNotyPx7hI11xG47CrYE7+4xlCFpaDwvf9FWescjE9qNrcgCXvSeme0GAOo6QjsttWQcRguwWZb6OG1VPN2xZcfyUeEGLHhPkrziDDf4SHNaCcXXJ9CtFdyRMVueZNWqaoSKhpFI91MMLSXju3pGbSzJlM8FPf/oxZbRADvlZZCyb8fbb4mQVBZZ3GWV4hj4PCrLA1qQvEqs9XLsRnoal9WaSQhWRzLJmCurnGGRc6wxyAAejp0pAR70k0M8R+ziXphTbSz5jU2xp2cFe1EhegrqPqjFAtYWbYwsm9X969oYf76RSVpD5DfI8iDfFILBkfvnZaZtHikQ2tfNY1T0QOYafZ+dfiQjWZxqrDxXDWbc/jYZSbOzpgJ0HvC9wodOgTk5d5d9dmNrnM0LH8bvtI4zgktUZdf/DkYM10EF8yMhbFqvpMTi+TaLBUNd9aLSzSGAqu41xsKxsEYHFPhxozYZMPCafc4U5t8Ja7k34czb9pTsN2JFnwl8AmZSpI39KzBoEcD8fz0CAcio2KlaDIhPF8V0HkEbwc2c0mkpBazhOMI1d4cxnKG15nlJ+haP4D9g/H1z7jIEHS7enL9st+r19iJpqLFuJiKD2NT7LXyBzaAcFxIJ/fo4roeZSvHUyfgqUjSVcPiszEAuk4Fgqjxih+ln6TZW8b5sbDIvrB1Ul++c1B63XbFgHdVJTaRPzIXeh5f5u+QYvfa7pHyQV0ZUIv4SnfFMvTC0g0/fdaaBd9rcpxu/CBpbobKZgCIyVRDZGdPlZs8UGyu7+Hxb64E/k0YIIyG0d7ZSIcU1dOwyAQt25Ow5B4W/oUhgU+Gf+qB/Eqf+V11+GylEkiyGag2sSabnAwgaqTr549u7USX8FH6EnKLv1g9jl2zIU7C6GM3aeDn8kP+9aBM0Agrl165RV4/UHaXPnrBjs3YOHlrMK9jziNkwwt6+rC5FPPvSm2uVuOQouD4+Rk/8X2VoT+8bijB9PNpfsOsNhiSOVgntu7dzfzJItraFExs2ylPt0vanTgZJP3SIxPvZsgaDSBNmxIh0KPLS+EZkJ1Xy0gY8WVOZDbYF9v0GJta6+GUy7ek8lisYumJ1nyw90NF5n7L6H1aFMYqA/WI2COJA7pWaf9Ugf5pniETIJNyNXtonwZOLeCG380p2a2m5Fs4WDJIbVCtkJ77ah+h3HMvJJ0fzW8OXfnZDuzbWB935lP5zr2+vOc7CL44LjNt8p2deJJKd+d8n1mwKwxWxUjkxJRVlpIqwq1a+Sfeu1oNGDaOXyS/LVoiWAi4/RFFK77j8sVBWyTeqc13DCYWKdEbHTgEcIdtBewm3fvU99V8J4gYLJijdis2O/D+3FBz8kG/SwAXwjzKgO1TmXuA3syLPxxfnEUxttkUPpzQJgAzcN6o79tpHr3QWX3TVy4USKZJPX/G7/sFv7TB2RKaM9LvG8518UTl/oNK6/mqMpSOqsv0xRVzNjumgamqz/e3LG3e1lkrW5SquqlrDJIrN90AProjO2hsva2vAv1ZNPbHVfvH6K8KnMmDbXcZImS+YAXafdXLVILS/Q0MSKuRaLPQABT6AsH1SpBlkiSLXyhT/gT5IbfD6Z1Jx0n7l33o2uGW4lgd8BRn8WUeEHBHEn2SCXVQwlREQtvN7iSC2y8qSngF4ytc3vgOucrGccauebyUn9sdKmkhMom+XHRGLg4yr7NW/ZAq8UDCTjimw0unj204NYoihtZTNdXwgmCpqzA6Y4a3S/braI7FEXELgpjVSnB+dqkyFq3Tny2G8lAz1OtN0TZdE3wgbqL8XtsE5Ut1NayTqmPNmEhJVC0f6ZfMop0HP5VawTxA+lq1XoeRAoIGH0ojuV+9O13sh2V2zoxj5jVyNGuZDtqZVlEeSIRI05PVi7nZfKw+EuT5YTkdX/qnx/AmQXABJR8mEbt5A8Oab2RqMdG+P0zvDI0gODnGDSO2w4ZOrD1zi5LnYaIljibbOMhpDWcwsd6Ry5eUmiLQ24OpaErO6a3/sYLybm9xOJLqfn7DNg/5SKBxEfKNyyUYP4KtkSMQI5Xo7dHcIhqH4l3CRK/gB7WtFU6bj0mReNJIitL8grYbUyZpqDuMDT5s5WQsWjOEmRSbMiH7HIkEIPvRu0WxMnRCJKjGFWdlKGqK96T7jlsEHCjsPjk/9VEQ4W5qB2tRAFGJ5YGgbmyYxqxGxduvkNdd3IZKcIbvtEtH4X7aHeyV4Dcn4wkEzUNRRhISM51Av5I1mwi2lj3DP8d6K9iFzNVDCSb+eb9pBu+SEqYrvFC8WKSi8OcZDj50KV871120hgz6n6OZy1KOh8OzKNuCKFt9mVlUfJKzD9gcuL53q+oTHGGIKFz4+4/zLC13N3l3y4Fn9dzM02uGyBGoJXmF3jrwW9OguOsh1FVykE1suM6kC/e005VRngkgcn29tixbfGSx7k8JzTId+5wTXE1HgKXCtGlwA7L6FxS+RUGGP2az1Em91D7THACjjqlVdoDOltQ7Yb4S8n4kG/m/CvtFfQB0e/e/JMgICLGKds6v5THENB7WYOdJ0P5s3GQzdbeXjUAG5Y2WCUBs5LZ6xDZzv1L7jfUHqBbmnHW7U4g+UTYB/tW7B0Ya0JAbpzWFSoVQH6CbY6q9fM8ccelwWdxeWdjZm+TcmBAHpje+emw8T5mUgl7Omvks7D2xk04/HjynzVyBN2dI3dBgxTkB1keL9tMN0WgyjY0ddKI8pigHP9lOa8hb7F2bZIa/FqS6JJPPHnlyPbVl+weIG7j4ocmWH/OkvaT4qtcbnafk2ocwOkjSqUob66ehit1UDMwKXreD2R92MZugTHNe/PWAZesANg9eBbm2p+4kqK52j8MW3AhqaffDN+kK195DUM4FLVYm8BQhOF+OWoM5tTD8LImCNRenutbU6qRxpaMDXCBU37/K3Y7eobcg/IaZaBuw44FteI67Hdgufk5VqCDjlK7jDBUtVq07hpPI9ymWW/m3nNLQlusNGDSBNYXOUBDRWNnHira/1eo9GEwVgpXn2tG1PUUxT15p/fbfGXCvpsj0QlzwErC0ge/Oqlsh7E0QhpqDAcvlBJOiXDD/bv01SkM269rmghWHJPUbmpq4trj7H6cCMXMIwWgOLaTXR0w3tamzJpReC8FXDNwkxSCbmg/ag17JdPyptz7mR3k6KvXor6tFCfEv85TW7CDWLEap1AC12Ym+LK9/CxdKPnXz9Qz4xNXGn3sG1wAfthifQfjDyiCnLo2uhuMzI9yKxH4PUTt52mReMLmnHFrrLpDYcPC+cU7ge55guYhGv/ANB92YzoXrI+Hs6gdXnnfE8GGhfydGwvKBKCtpDecGnu41Mz28j9/LTVtSV9WZEoxANMgPGo4BDbY2p69ixYGQWATdyg9TRDAK7f/Lrlubat60yuVZ9wcwqZ7NBP71mX6NEgdvfK1EgMnkZzsDQl/wWDHdAoOYCo4pKwY5I/V26cKTO4aMYcV/YDdgglOtas2KtIXBJAcgotsV4YfF+CDN4T5WdX808VdXh3/UXLrAdcMDF3QIXj1HyUHIOkXBH7DXICbJt9eNiowRXiuB0d1J/FqjPFe2IlNdXnwFwpRusB5PLSv0Lk/AdI1gQmao8wwLmnoh/L9riMbMMsWAOI+5B71d+lGTKlxx4hQn4ixRfedyZUUsRcpGrgAS1XqCKzggl0/LFuyQpe9BsgvZGkEHQ4ELkl6bcLtiHZ+7uFxmRjnV7v8PP1Whug1igIT3OTMnmb/dGJPuGKY5fRdvWoatxfNU3ABi+fY7eHiPqC0gQDpAC19twVfWBtBur+ST+y7fzmSE5Q0C3mcp8/31XIdqm7sEZJHtFnXBgaTyG+fWRGAY70K10IBvKH2TE6IMzm1k92/Cn2payTupKTtojgP3uaWIgFVgV0lD0WGR0PanqiKtrBFwqznvb/rz2PgpSjWd2BESLQpxY+6tmKXZnjvY9xfR12CQ8o/aKz1t+XxCSzy0uE5f/kaFUCrwxjL8gT7SEUJshp//5/yvPFJHgJlgsvXp+gRQCSzz+vS6rl3BhMsbj/HzwJYz8GsWppOQDGVswlOHEaFE/qhImhDrt2DUfNxtt21GW7KwJRn9/mtYIjlnnwgESPEpwoLyTru3SsVGzRxnZG6x+BiseUs57lTdb3H8KG7UPeH1SSjy9wZHELnar9x5cOtOR7lOvyjWm4Ab18Q+qoMxxLCFit0V8SmOu7AU8XGY3eSXb6Ly+kaQmDkRlOstgmcj+rD34KNz7LTvLL0O1Z9J/nCjp+1flOFgtbd7Yg0t5eNrPuppxYxJfSpnJRNL4S3YTffnV+x+zVsuioseET/On2wNi/TnL2rAQIKswi7Er3Sv48D/+PLsa2WJOSk6DqcCLmusILDiz0FwKEhMewrxtNyM2IAE0/6hiopIQoUgC6U8CLirhWbfVibSnCGZlF5uywIcaUlcEaYP/evokbi1NSquO62XNnWR4+fB3M1N7LaI5pwdHYOKEjg9OaSiTtEDypKGOVxZhdQS0jEvZ46foNS4SBpwZfPn60p6pQldNUmimhWeU5LUnEpZYjPJU6hmAsh4AKaLFfJANrZ9ou428yoEIFuiY9UgOYkqtSUocWxyijxK+NTtuDdbh7NJcyLIl6CUBWQjZiL34Bk0Qe3vmT9tpIKus3r5CvEdEu5Va2Wxm8CQJT9bESzuFBeH0QIRybKFAUVqNa9tCXukd1jwLXYKWsuMuFda8R1UjVG2cvAZ+R3lBV+nLksL4Ti6lubX3hKFcSyFsG5rK9pJt5nlSGIkBLP/HFqLL/KX0S96NdOo4CS+GYPBk+lBZxz6Yie12vvUj8l4t1ik/5PmvbLOTPCcaoPeZ7APUQIKIcxcNUDin3R1okbeAUGwt7Ja3G0ntQokBhlajisyXeqbfPLrTTKpTauclKp+DGdyBsbzFHEYtIqZnlLe5wjluF/UID6EgwWPGj0FVKM59Jom3+0Y1QTb+IKqHZv/0FIEEuVItlJHSixdza2w0UN80Hyc/eUGv6SBybC/EEs9cOcLBR1eeQXXe7p7hfIhtxxBrGhk9n7jom/4LXF125WzPmMCUiNyE8iO7sVSmRf/iSNFBveZWGPeCirfJ8a43fk5jCfA3NPEJyMAamu3Q5im0DKo8aonWXtye9iE8vraixlVTAGSXFMjP3+XiOE9jrnXTDzARnt7+9gvHctQpaAI0za6N7bq9R1lb55jILwmx4Ih4OA0K1/Xx7B9jytPFBRhEO8xqXLhxotsIRjnGRvnkMK/KJ1YhE9T2mNmclLYgMSn+7dzik8BzoHt+EcXstV8yNpTspqsnS96ATq3A66NbF449w9JqViBt4gWi7yVzt3kR4XSJ8iEB5anMqG+EsSyrMQVv0sMeEysGx+yYs6G2xPJw3zqTq4RzDQXPhYra/VMlt7E8zzl4D7L3HS3kkWf4ZkmFmnjcENPQdkmohl6p/gqkOg+8McyzNxxb5Fl19DsSr3MTuSMqhSKDn95ibzYCEdrZXJiKaqu7BFBuju+jSObOPchog2IsE/u/3U/UK2mntvSnD0qNkPYoRTskBnLJ3NJamL0V4sEbryX8NMr7MKMJ0+h2+xMKY4KERpvUrd0c6ABXWHqLdY1QTugC/5dhdoLy3+KwgG5FnL0MZw6qvOvHkKQRoQrcKLuwUld15s05QxurH67A9eAr02a/vUWNBIgP6vOa69ZZuZKElWttIerRDGIAkZ54fw7HBctSZtfspPxaliwbOEH/Laxot3ZQonzvXknSVodzZHA1Jw7BcNRsYvl+KJ0Y6pMRPpIbaN/QSuHtnjUoej+vlVhq5021xMUPKxCK/D8rSRbOmduHG85/JrIimgo5wXWP83lLvRaxwCxeTGVt44fTUqsfUARmQcS3f5DbHR9SZ4nJYIEvcCjIqLezJ3I6S7xBop57j3ZyMQX0Xxr5mc6IUmrlOXM9fJG5iDZQQ9rWsGZ0Y26GzTAEsD6pjPuDa1XAT1MRpxyZ8zN53sl1YEV0E0EHvZqcnBnqMTXRh6zC9PwDXEk3OHs2zLLIjBhY5+7lDxp1X0qcm8XtWorat33mUx+kEDDgaDUdpclQq/ZM6mMYoF433nKbCKDxCozugSPVaRjNPosMDy8FujvIJSb763XuBGBIYLS9x+HZhYiUa9xod0xKV9aRt7yczWWlLgfK8qn4fULHMBSP48m/wTWfDBdTH8uDAKt5WM033+2bCpxDhmZtE+d7XP65yBTOf9/EWaCG+Gs9/5kVbWS0JlfoDH6Si2tVCzCRGfV0XZAUWfXOMJ5F9dkMagbwaeqVqqbVONDQGg8zID5MUV7IkazdAz4JLOXsn1RuZnoZNIGV2Na15+dRKYUAmXFmkWBJpPMBwT8N4bd8VZwBnhm3WzH9S0sbpoP0sgf2OmPvQ6smMyfkVK+OLjXYubmtioAhdwDb5/pLRg3PGwfHEz6v9OOe4AK8iw2cma49tV44In8Rc9jGcqSQlFXPdlC8366ke4U/ITFy0/SQBl1vWvGk40KycwWGaLf8cCtEi/4X2W8961i6lYnpfNQhGcQyC8s2oIOW+Pw545Thq3ZBEyNC8YDr/pzCEmBI8U3A4IiQJoHiD9kUMNd8wfzysC2Kqc4OGeWYsJxmDev4Jn4HV+vqpgN6xxSEMABhRMdTteHiJAgnQEX9BR2V1sNqh5EcMvQNYYa5+bblQn7Rli1UFCtQkP6ECmGkxmPNkg2CGS2mmf0/WEuTZSyPMtbbrnftPgleOmJ3jSm0m1EU9fQHQo1NZti+KczpJ8mSYIVtXzXh4rNJcL3Fm7Bbftpjmj5UnuDpPk8HvqKOj2DGJyk4R0Md1x7umiH0DTOXaLwO0EI94k7n6R8nfqiwekgUQZ1rRek0HViM5YN0JLWp4f4NRE8ErcGNSHZd58+9Kx8lmkc9ogfQmX0rX1kB8QQzNbH+eVDee0jOQNUgQcew3y+0QbifXrtLHXDIxsqsej41Kz7vfcQRE1zUnY2phYNILK8a657zyHNMzPiRhxs28s1JX2kiCMEloubOXnc8BzU+n7LM9wztf63eFWN/eWHXVivSdCWg5DfWsk2CF8aFJrOP277QEPdkWlOlewCVEkLjyd5wUn9ZzaKOJKnDQDLfliiRLTKlU8TOeQj8jOU8FfpM9tayJTDpxw6sVlZuJRAILfxn+QAGIB/W1FGDjuuVu62hFDBdvzVSfge95Ebf9pclp0GrpV3S+gwBWn5J7aGiim/fRyIN7YVVXJsnAnVeq90vDdAV0XearTqjT2Ck/AMkBW6T/ls/6VUVnFWs01wxkahKR0tRwyLRKgHefm3RWie/pTVQpUMZw+/7ozQSW+7vuZd8lsvT1iX5rwlpiaFnOnDbHsr1As6vLETd5HVbcBCGbJHcS7ax9Byd50jdYyagUtjAaHYX8ryyuR/bDkw1o4j8+hXMfbzy+CVmgrfRDyl4dn+5LxrqRAXLoDKpQREAHqdLSsVSJh1s8KnZ/SsUVq27cq+O6LMSBmhT4X3E750rmWwCsoCre6bT//oFWYALjp2SbcxnULBaTvnYDHtfEbO1m/3c9nJk8ZO5KHQTV88ivTWN/S2EXwmisTPdcupMrvI8e48QZdkZu9WHyKron7MKhGFJw6Z0KZ3tleVrvvJo89siUwByPY+Hs4gkKPBQbLQOaedcv/xeM+Ih8rl1eHEC/C65xWVciToVqSGp9HfbhVzFSrO6kBnv7mJwnRLvMEwqiNankVdJJMw4icU3lKyw/ecNSWIUddqlbThYMiq8nHjRRufs+28cq0OI9zhpvxFvFgSZE/eAYvm0x+9lZO+EH9NkBngaqU1NMYhdombNuy3awUN9p0mJQ//e9L65YbShgoc+ZUlNy+c6F6gDEHXV0JrzevPIZFAe2RyRa2dNqzLvihAAMCszYueqszzXRkSyobx5+LTLK2V3lfg3wbS9DzP3QW7VHdHbjZcttQRvtjrGveJnNn2DE2ZDIbvkCrT0H8RzbGDdmIq4P1ey+hoY/W6NuZKOz4dv4HUNznxdKV1Wf3MvqUv35r2jTKvpPWBUWNm5fytX/QJwp6qkIOsSx7Y67BSCbCDVLM8/VcMG+T0j+INrgL9sfT1ICtACH8BI0G6ViUZPVzzCmQHW2oVIwZjAoFl6+meO/pD8teO1E+1y03mCpYfW9S8qhtH2GhlFlebPf4NbezVv9xbXKWz0xezRNQWqUqtYRTUbuzK7KTvjG4rQHfzBpVmK4wDLnSIwdSzTSk1fPNeY0WOpPZTLlvQ59xwgfFrb326vT2hS1JAZ9E6sujFtKTiJ7bxI6o4cBhDaX+adXREThhR+MwA4TqD7rga/o9iY7d6TVRe14CS2S3iSQsD0R6ApnhG/2Wa0A0AY2NtWTjmabdKU+KgIRDP9RQYVjXiF1qC+xyNVG03I9vpmEpY/G/zC4nLOKgXAZ/uTikHI9Afbkhfgfgo9arWbix5eH7WUo9RQygDzwCnVSjbXc7MihEufVj6WGbK963pw8VjY3RS8IH1cy2yZbIcKLO5CgAUcXJfF2+McnDLKtXxyZaf7SPA6KJq+zF2NHyfoeTOwHhGqNcnHVr1hT73pcoyXyfvCYBnG1Bp/aR9t8hoI7CXM3UZOisWGA1SHZ2jf7k9GlRnp3mF/c1AV+JjvUsnZrsybEOQJg/dn/9eJkyykQHjbF56zgcPX6DdMG03WKUMlYz+uOZ+5DZy9E9MZOZ9GMoLFdrIPPQQLjv+GlCMpoyHPXkzIODjHAID2PrnaRpqWVHh0rnieDILKq+Emrd5RnjgE9pDUXWTmHaKuqqYlcgEz4zbi46dbWrAAFBjsQq1rLHIiPJEcwFLCOY4JNlXRXQJqCUKXk2d1RSBGzDP6HDSpo863BhVRFFF6uIpjQV7j5ebFe3UkkO/+coIo2BTAcgBqOtQ134s9a4QJvofuqBYMGOBMsWZ+sn/2AOxDx6SfAnDFGw==";const $87431ee93b037844$var$bluenoiseBits=Uint8Array.from(atob($06269ad78f3c5fdf$export$2e2bcd8739ae039),tt=>tt.charCodeAt(0));function $87431ee93b037844$var$checkTimerQuery(tt,et,nt){if(et.getQueryParameter(tt,et.QUERY_RESULT_AVAILABLE)){const ot=et.getQueryParameter(tt,et.QUERY_RESULT)/1e6;nt.lastTime=ot}else setTimeout(()=>{$87431ee93b037844$var$checkTimerQuery(tt,et,nt)},1)}class $87431ee93b037844$export$2489f9981ab0fa82 extends Pass{constructor(et,nt,rt=512,it=512){super(),this.width=rt,this.height=it,this.clear=!0,this.camera=nt,this.scene=et,this.autosetGamma=!0,this.configuration=new Proxy({aoSamples:16,aoRadius:5,denoiseSamples:8,denoiseRadius:12,distanceFalloff:1,intensity:5,denoiseIterations:2,renderMode:0,color:new Color$1(0,0,0),gammaCorrection:!0,logarithmicDepthBuffer:!1,screenSpaceRadius:!1,halfRes:!1,depthAwareUpsampling:!0,colorMultiply:!0},{set:(ot,at,st)=>{const lt=ot[at];return ot[at]=st,at==="aoSamples"&<!==st&&this.configureAOPass(this.configuration.logarithmicDepthBuffer),at==="denoiseSamples"&<!==st&&this.configureDenoisePass(this.configuration.logarithmicDepthBuffer),at==="halfRes"&<!==st&&(this.configureAOPass(this.configuration.logarithmicDepthBuffer),this.configureHalfResTargets(),this.configureEffectCompositer(this.configuration.logarithmicDepthBuffer),this.setSize(this.width,this.height)),at==="depthAwareUpsampling"&<!==st&&this.configureEffectCompositer(this.configuration.logarithmicDepthBuffer),at==="gammaCorrection"&&(this.autosetGamma=!1),!0}}),this.samples=[],this.samplesR=[],this.samplesDenoise=[],this.configureEffectCompositer(this.configuration.logarithmicDepthBuffer),this.configureSampleDependentPasses(),this.configureHalfResTargets(),this.copyQuad=new $e4ca8dcb0218f846$export$dcd670d73db751f5(new ShaderMaterial({uniforms:{tDiffuse:{value:null}},depthWrite:!1,vertexShader:` - varying vec2 vUv; - void main() { - vUv = uv; - gl_Position = vec4(position, 1); + case 'position': { + typeof st.position < 'u' && (at.position = st.position), + typeof st.positionAbsolute < 'u' && (at.positionAbsolute = st.positionAbsolute), + typeof st.dragging < 'u' && (at.dragging = st.dragging), + at.expandParent && handleParentExpand(rt, at) + break } - `,fragmentShader:` - uniform sampler2D tDiffuse; - varying vec2 vUv; - void main() { - gl_FragColor = texture2D(tDiffuse, vUv); + case 'dimensions': { + typeof st.dimensions < 'u' && ((at.width = st.dimensions.width), (at.height = st.dimensions.height)), + typeof st.updateStyle < 'u' && (at.style = { ...(at.style || {}), ...st.dimensions }), + typeof st.resizing == 'boolean' && (at.resizing = st.resizing), + at.expandParent && handleParentExpand(rt, at) + break } - `})),this.writeTargetInternal=new WebGLRenderTarget(this.width,this.height,{minFilter:LinearFilter,magFilter:LinearFilter,depthBuffer:!1}),this.readTargetInternal=new WebGLRenderTarget(this.width,this.height,{minFilter:LinearFilter,magFilter:LinearFilter,depthBuffer:!1}),this.outputTargetInternal=new WebGLRenderTarget(this.width,this.height,{minFilter:LinearFilter,magFilter:LinearFilter,depthBuffer:!1}),this.bluenoise=new DataTexture($87431ee93b037844$var$bluenoiseBits,128,128),this.bluenoise.colorSpace=NoColorSpace$1,this.bluenoise.wrapS=RepeatWrapping,this.bluenoise.wrapT=RepeatWrapping,this.bluenoise.minFilter=NearestFilter,this.bluenoise.magFilter=NearestFilter,this.bluenoise.needsUpdate=!0,this.lastTime=0,this.needsDepthTexture=!0,this.needsSwap=!0,this._r=new Vector2,this._c=new Color$1}configureHalfResTargets(){this.configuration.halfRes?(this.depthDownsampleTarget=new WebGLMultipleRenderTargets(this.width/2,this.height/2,2),this.depthDownsampleTarget.texture[0].format=RedFormat,this.depthDownsampleTarget.texture[0].type=FloatType,this.depthDownsampleTarget.texture[0].minFilter=NearestFilter,this.depthDownsampleTarget.texture[0].magFilter=NearestFilter,this.depthDownsampleTarget.texture[0].depthBuffer=!1,this.depthDownsampleTarget.texture[1].format=RGBAFormat,this.depthDownsampleTarget.texture[1].type=HalfFloatType,this.depthDownsampleTarget.texture[1].minFilter=NearestFilter,this.depthDownsampleTarget.texture[1].magFilter=NearestFilter,this.depthDownsampleTarget.texture[1].depthBuffer=!1,this.depthDownsampleQuad=new $e4ca8dcb0218f846$export$dcd670d73db751f5(new ShaderMaterial($26aca173e0984d99$export$1efdf491687cd442))):(this.depthDownsampleTarget&&(this.depthDownsampleTarget.dispose(),this.depthDownsampleTarget=null),this.depthDownsampleQuad&&(this.depthDownsampleQuad.dispose(),this.depthDownsampleQuad=null))}configureSampleDependentPasses(){this.configureAOPass(this.configuration.logarithmicDepthBuffer),this.configureDenoisePass(this.configuration.logarithmicDepthBuffer)}configureAOPass(et=!1){this.samples=this.generateHemisphereSamples(this.configuration.aoSamples),this.samplesR=this.generateHemisphereSamplesR(this.configuration.aoSamples);const nt={...$1ed45968c1160c3c$export$c9b263b9a17dffd7};nt.fragmentShader=nt.fragmentShader.replace("16",this.configuration.aoSamples).replace("16.0",this.configuration.aoSamples+".0"),et&&(nt.fragmentShader=`#define LOGDEPTH -`+nt.fragmentShader),this.configuration.halfRes&&(nt.fragmentShader=`#define HALFRES -`+nt.fragmentShader),this.effectShaderQuad?(this.effectShaderQuad.material.dispose(),this.effectShaderQuad.material=new ShaderMaterial(nt)):this.effectShaderQuad=new $e4ca8dcb0218f846$export$dcd670d73db751f5(new ShaderMaterial(nt))}configureDenoisePass(et=!1){this.samplesDenoise=this.generateDenoiseSamples(this.configuration.denoiseSamples,11);const nt={...$e52378cd0f5a973d$export$57856b59f317262e};nt.fragmentShader=nt.fragmentShader.replace("16",this.configuration.denoiseSamples),et&&(nt.fragmentShader=`#define LOGDEPTH -`+nt.fragmentShader),this.poissonBlurQuad?(this.poissonBlurQuad.material.dispose(),this.poissonBlurQuad.material=new ShaderMaterial(nt)):this.poissonBlurQuad=new $e4ca8dcb0218f846$export$dcd670d73db751f5(new ShaderMaterial(nt))}configureEffectCompositer(et=!1){const nt={...$12b21d24d1192a04$export$a815acccbd2c9a49};et&&(nt.fragmentShader=`#define LOGDEPTH -`+nt.fragmentShader),this.configuration.halfRes&&this.configuration.depthAwareUpsampling&&(nt.fragmentShader=`#define HALFRES -`+nt.fragmentShader),this.effectCompositerQuad?(this.effectCompositerQuad.material.dispose(),this.effectCompositerQuad.material=new ShaderMaterial(nt)):this.effectCompositerQuad=new $e4ca8dcb0218f846$export$dcd670d73db751f5(new ShaderMaterial(nt))}generateHemisphereSamples(et){const nt=[];for(let rt=0;rttt.charCodeAt(0));reactExports.forwardRef(({halfRes:tt,screenSpaceRadius:et,quality:nt,depthAwareUpsampling:rt=!0,aoRadius:it=5,aoSamples:ot=16,denoiseSamples:at=4,denoiseRadius:st=12,distanceFalloff:lt=1,intensity:ct=1,color:ut,renderMode:ht=0},dt)=>{const{camera:pt,scene:mt}=useThree(),gt=reactExports.useMemo(()=>new $87431ee93b037844$export$2489f9981ab0fa82(mt,pt),[]);return reactExports.useLayoutEffect(()=>{applyProps(gt.configuration,{color:ut,aoRadius:it,distanceFalloff:lt,intensity:ct,aoSamples:ot,denoiseSamples:at,denoiseRadius:st,screenSpaceRadius:et,renderMode:ht,halfRes:tt,depthAwareUpsampling:rt})},[et,ut,it,lt,ct,ot,at,st,ht,tt,rt]),reactExports.useLayoutEffect(()=>{nt&>.setQualityMode(nt.charAt(0).toUpperCase()+nt.slice(1))},[nt]),jsxRuntimeExports.jsx("primitive",{ref:dt,object:gt})});function _objectWithoutPropertiesLoose$k(tt,et){if(tt==null)return{};var nt={},rt=Object.keys(tt),it,ot;for(ot=0;ot=0)&&(nt[it]=tt[it]);return nt}var _excluded$1$1=["color"],ActivityLogIcon=reactExports.forwardRef(function(tt,et){var nt=tt.color,rt=nt===void 0?"currentColor":nt,it=_objectWithoutPropertiesLoose$k(tt,_excluded$1$1);return reactExports.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},it,{ref:et}),reactExports.createElement("path",{d:"M0 1.5C0 1.22386 0.223858 1 0.5 1H2.5C2.77614 1 3 1.22386 3 1.5C3 1.77614 2.77614 2 2.5 2H0.5C0.223858 2 0 1.77614 0 1.5ZM4 1.5C4 1.22386 4.22386 1 4.5 1H14.5C14.7761 1 15 1.22386 15 1.5C15 1.77614 14.7761 2 14.5 2H4.5C4.22386 2 4 1.77614 4 1.5ZM4 4.5C4 4.22386 4.22386 4 4.5 4H11.5C11.7761 4 12 4.22386 12 4.5C12 4.77614 11.7761 5 11.5 5H4.5C4.22386 5 4 4.77614 4 4.5ZM0 7.5C0 7.22386 0.223858 7 0.5 7H2.5C2.77614 7 3 7.22386 3 7.5C3 7.77614 2.77614 8 2.5 8H0.5C0.223858 8 0 7.77614 0 7.5ZM4 7.5C4 7.22386 4.22386 7 4.5 7H14.5C14.7761 7 15 7.22386 15 7.5C15 7.77614 14.7761 8 14.5 8H4.5C4.22386 8 4 7.77614 4 7.5ZM4 10.5C4 10.2239 4.22386 10 4.5 10H11.5C11.7761 10 12 10.2239 12 10.5C12 10.7761 11.7761 11 11.5 11H4.5C4.22386 11 4 10.7761 4 10.5ZM0 13.5C0 13.2239 0.223858 13 0.5 13H2.5C2.77614 13 3 13.2239 3 13.5C3 13.7761 2.77614 14 2.5 14H0.5C0.223858 14 0 13.7761 0 13.5ZM4 13.5C4 13.2239 4.22386 13 4.5 13H14.5C14.7761 13 15 13.2239 15 13.5C15 13.7761 14.7761 14 14.5 14H4.5C4.22386 14 4 13.7761 4 13.5Z",fill:rt,fillRule:"evenodd",clipRule:"evenodd"}))}),_excluded$o$1=["color"],BarChartIcon=reactExports.forwardRef(function(tt,et){var nt=tt.color,rt=nt===void 0?"currentColor":nt,it=_objectWithoutPropertiesLoose$k(tt,_excluded$o$1);return reactExports.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},it,{ref:et}),reactExports.createElement("path",{d:"M11.5 1C11.7761 1 12 1.22386 12 1.5V13.5C12 13.7761 11.7761 14 11.5 14C11.2239 14 11 13.7761 11 13.5V1.5C11 1.22386 11.2239 1 11.5 1ZM9.5 3C9.77614 3 10 3.22386 10 3.5V13.5C10 13.7761 9.77614 14 9.5 14C9.22386 14 9 13.7761 9 13.5V3.5C9 3.22386 9.22386 3 9.5 3ZM13.5 3C13.7761 3 14 3.22386 14 3.5V13.5C14 13.7761 13.7761 14 13.5 14C13.2239 14 13 13.7761 13 13.5V3.5C13 3.22386 13.2239 3 13.5 3ZM5.5 4C5.77614 4 6 4.22386 6 4.5V13.5C6 13.7761 5.77614 14 5.5 14C5.22386 14 5 13.7761 5 13.5V4.5C5 4.22386 5.22386 4 5.5 4ZM1.5 5C1.77614 5 2 5.22386 2 5.5V13.5C2 13.7761 1.77614 14 1.5 14C1.22386 14 1 13.7761 1 13.5V5.5C1 5.22386 1.22386 5 1.5 5ZM7.5 5C7.77614 5 8 5.22386 8 5.5V13.5C8 13.7761 7.77614 14 7.5 14C7.22386 14 7 13.7761 7 13.5V5.5C7 5.22386 7.22386 5 7.5 5ZM3.5 7C3.77614 7 4 7.22386 4 7.5V13.5C4 13.7761 3.77614 14 3.5 14C3.22386 14 3 13.7761 3 13.5V7.5C3 7.22386 3.22386 7 3.5 7Z",fill:rt,fillRule:"evenodd",clipRule:"evenodd"}))}),_excluded$H=["color"],ButtonIcon=reactExports.forwardRef(function(tt,et){var nt=tt.color,rt=nt===void 0?"currentColor":nt,it=_objectWithoutPropertiesLoose$k(tt,_excluded$H);return reactExports.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},it,{ref:et}),reactExports.createElement("path",{d:"M2 5H13C13.5523 5 14 5.44772 14 6V9C14 9.55228 13.5523 10 13 10H2C1.44772 10 1 9.55228 1 9V6C1 5.44772 1.44772 5 2 5ZM0 6C0 4.89543 0.895431 4 2 4H13C14.1046 4 15 4.89543 15 6V9C15 10.1046 14.1046 11 13 11H2C0.89543 11 0 10.1046 0 9V6ZM4.5 6.75C4.08579 6.75 3.75 7.08579 3.75 7.5C3.75 7.91421 4.08579 8.25 4.5 8.25C4.91421 8.25 5.25 7.91421 5.25 7.5C5.25 7.08579 4.91421 6.75 4.5 6.75ZM6.75 7.5C6.75 7.08579 7.08579 6.75 7.5 6.75C7.91421 6.75 8.25 7.08579 8.25 7.5C8.25 7.91421 7.91421 8.25 7.5 8.25C7.08579 8.25 6.75 7.91421 6.75 7.5ZM10.5 6.75C10.0858 6.75 9.75 7.08579 9.75 7.5C9.75 7.91421 10.0858 8.25 10.5 8.25C10.9142 8.25 11.25 7.91421 11.25 7.5C11.25 7.08579 10.9142 6.75 10.5 6.75Z",fill:rt,fillRule:"evenodd",clipRule:"evenodd"}))}),_excluded$1w=["color"],CubeIcon=reactExports.forwardRef(function(tt,et){var nt=tt.color,rt=nt===void 0?"currentColor":nt,it=_objectWithoutPropertiesLoose$k(tt,_excluded$1w);return reactExports.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},it,{ref:et}),reactExports.createElement("path",{d:"M7.28856 0.796908C7.42258 0.734364 7.57742 0.734364 7.71144 0.796908L13.7114 3.59691C13.8875 3.67906 14 3.85574 14 4.05V10.95C14 11.1443 13.8875 11.3209 13.7114 11.4031L7.71144 14.2031C7.57742 14.2656 7.42258 14.2656 7.28856 14.2031L1.28856 11.4031C1.11252 11.3209 1 11.1443 1 10.95V4.05C1 3.85574 1.11252 3.67906 1.28856 3.59691L7.28856 0.796908ZM2 4.80578L7 6.93078V12.9649L2 10.6316V4.80578ZM8 12.9649L13 10.6316V4.80578L8 6.93078V12.9649ZM7.5 6.05672L12.2719 4.02866L7.5 1.80176L2.72809 4.02866L7.5 6.05672Z",fill:rt,fillRule:"evenodd",clipRule:"evenodd"}))}),_excluded$1H=["color"],DotIcon=reactExports.forwardRef(function(tt,et){var nt=tt.color,rt=nt===void 0?"currentColor":nt,it=_objectWithoutPropertiesLoose$k(tt,_excluded$1H);return reactExports.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},it,{ref:et}),reactExports.createElement("path",{d:"M7.5 9.125C8.39746 9.125 9.125 8.39746 9.125 7.5C9.125 6.60254 8.39746 5.875 7.5 5.875C6.60254 5.875 5.875 6.60254 5.875 7.5C5.875 8.39746 6.60254 9.125 7.5 9.125ZM7.5 10.125C8.94975 10.125 10.125 8.94975 10.125 7.5C10.125 6.05025 8.94975 4.875 7.5 4.875C6.05025 4.875 4.875 6.05025 4.875 7.5C4.875 8.94975 6.05025 10.125 7.5 10.125Z",fill:rt,fillRule:"evenodd",clipRule:"evenodd"}))}),_excluded$1W=["color"],DropdownMenuIcon=reactExports.forwardRef(function(tt,et){var nt=tt.color,rt=nt===void 0?"currentColor":nt,it=_objectWithoutPropertiesLoose$k(tt,_excluded$1W);return reactExports.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},it,{ref:et}),reactExports.createElement("path",{d:"M7.49999 3.09998C7.27907 3.09998 7.09999 3.27906 7.09999 3.49998C7.09999 3.72089 7.27907 3.89998 7.49999 3.89998H14.5C14.7209 3.89998 14.9 3.72089 14.9 3.49998C14.9 3.27906 14.7209 3.09998 14.5 3.09998H7.49999ZM7.49998 5.1C7.27907 5.1 7.09998 5.27908 7.09998 5.5C7.09998 5.72091 7.27907 5.9 7.49998 5.9H14.5C14.7209 5.9 14.9 5.72091 14.9 5.5C14.9 5.27908 14.7209 5.1 14.5 5.1H7.49998ZM7.1 7.5C7.1 7.27908 7.27909 7.1 7.5 7.1H14.5C14.7209 7.1 14.9 7.27908 14.9 7.5C14.9 7.72091 14.7209 7.9 14.5 7.9H7.5C7.27909 7.9 7.1 7.72091 7.1 7.5ZM7.49998 9.1C7.27907 9.1 7.09998 9.27908 7.09998 9.5C7.09998 9.72091 7.27907 9.9 7.49998 9.9H14.5C14.7209 9.9 14.9 9.72091 14.9 9.5C14.9 9.27908 14.7209 9.1 14.5 9.1H7.49998ZM7.09998 11.5C7.09998 11.2791 7.27907 11.1 7.49998 11.1H14.5C14.7209 11.1 14.9 11.2791 14.9 11.5C14.9 11.7209 14.7209 11.9 14.5 11.9H7.49998C7.27907 11.9 7.09998 11.7209 7.09998 11.5ZM2.5 9.25003L5 6.00003H0L2.5 9.25003Z",fill:rt,fillRule:"evenodd",clipRule:"evenodd"}))}),_excluded$25=["color"],EyeNoneIcon=reactExports.forwardRef(function(tt,et){var nt=tt.color,rt=nt===void 0?"currentColor":nt,it=_objectWithoutPropertiesLoose$k(tt,_excluded$25);return reactExports.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},it,{ref:et}),reactExports.createElement("path",{d:"M13.3536 2.35355C13.5488 2.15829 13.5488 1.84171 13.3536 1.64645C13.1583 1.45118 12.8417 1.45118 12.6464 1.64645L10.6828 3.61012C9.70652 3.21671 8.63759 3 7.5 3C4.30786 3 1.65639 4.70638 0.0760002 7.23501C-0.0253338 7.39715 -0.0253334 7.60288 0.0760014 7.76501C0.902945 9.08812 2.02314 10.1861 3.36061 10.9323L1.64645 12.6464C1.45118 12.8417 1.45118 13.1583 1.64645 13.3536C1.84171 13.5488 2.15829 13.5488 2.35355 13.3536L4.31723 11.3899C5.29348 11.7833 6.36241 12 7.5 12C10.6921 12 13.3436 10.2936 14.924 7.76501C15.0253 7.60288 15.0253 7.39715 14.924 7.23501C14.0971 5.9119 12.9769 4.81391 11.6394 4.06771L13.3536 2.35355ZM9.90428 4.38861C9.15332 4.1361 8.34759 4 7.5 4C4.80285 4 2.52952 5.37816 1.09622 7.50001C1.87284 8.6497 2.89609 9.58106 4.09974 10.1931L9.90428 4.38861ZM5.09572 10.6114L10.9003 4.80685C12.1039 5.41894 13.1272 6.35031 13.9038 7.50001C12.4705 9.62183 10.1971 11 7.5 11C6.65241 11 5.84668 10.8639 5.09572 10.6114Z",fill:rt,fillRule:"evenodd",clipRule:"evenodd"}))}),_excluded$26=["color"],EyeOpenIcon=reactExports.forwardRef(function(tt,et){var nt=tt.color,rt=nt===void 0?"currentColor":nt,it=_objectWithoutPropertiesLoose$k(tt,_excluded$26);return reactExports.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},it,{ref:et}),reactExports.createElement("path",{d:"M7.5 11C4.80285 11 2.52952 9.62184 1.09622 7.50001C2.52952 5.37816 4.80285 4 7.5 4C10.1971 4 12.4705 5.37816 13.9038 7.50001C12.4705 9.62183 10.1971 11 7.5 11ZM7.5 3C4.30786 3 1.65639 4.70638 0.0760002 7.23501C-0.0253338 7.39715 -0.0253334 7.60288 0.0760014 7.76501C1.65639 10.2936 4.30786 12 7.5 12C10.6921 12 13.3436 10.2936 14.924 7.76501C15.0253 7.60288 15.0253 7.39715 14.924 7.23501C13.3436 4.70638 10.6921 3 7.5 3ZM7.5 9.5C8.60457 9.5 9.5 8.60457 9.5 7.5C9.5 6.39543 8.60457 5.5 7.5 5.5C6.39543 5.5 5.5 6.39543 5.5 7.5C5.5 8.60457 6.39543 9.5 7.5 9.5Z",fill:rt,fillRule:"evenodd",clipRule:"evenodd"}))}),_excluded$2C=["color"],ImageIcon=reactExports.forwardRef(function(tt,et){var nt=tt.color,rt=nt===void 0?"currentColor":nt,it=_objectWithoutPropertiesLoose$k(tt,_excluded$2C);return reactExports.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},it,{ref:et}),reactExports.createElement("path",{d:"M2.5 1H12.5C13.3284 1 14 1.67157 14 2.5V12.5C14 13.3284 13.3284 14 12.5 14H2.5C1.67157 14 1 13.3284 1 12.5V2.5C1 1.67157 1.67157 1 2.5 1ZM2.5 2C2.22386 2 2 2.22386 2 2.5V8.3636L3.6818 6.6818C3.76809 6.59551 3.88572 6.54797 4.00774 6.55007C4.12975 6.55216 4.24568 6.60372 4.32895 6.69293L7.87355 10.4901L10.6818 7.6818C10.8575 7.50607 11.1425 7.50607 11.3182 7.6818L13 9.3636V2.5C13 2.22386 12.7761 2 12.5 2H2.5ZM2 12.5V9.6364L3.98887 7.64753L7.5311 11.4421L8.94113 13H2.5C2.22386 13 2 12.7761 2 12.5ZM12.5 13H10.155L8.48336 11.153L11 8.6364L13 10.6364V12.5C13 12.7761 12.7761 13 12.5 13ZM6.64922 5.5C6.64922 5.03013 7.03013 4.64922 7.5 4.64922C7.96987 4.64922 8.35078 5.03013 8.35078 5.5C8.35078 5.96987 7.96987 6.35078 7.5 6.35078C7.03013 6.35078 6.64922 5.96987 6.64922 5.5ZM7.5 3.74922C6.53307 3.74922 5.74922 4.53307 5.74922 5.5C5.74922 6.46693 6.53307 7.25078 7.5 7.25078C8.46693 7.25078 9.25078 6.46693 9.25078 5.5C9.25078 4.53307 8.46693 3.74922 7.5 3.74922Z",fill:rt,fillRule:"evenodd",clipRule:"evenodd"}))}),_excluded$2H=["color"],LapTimerIcon=reactExports.forwardRef(function(tt,et){var nt=tt.color,rt=nt===void 0?"currentColor":nt,it=_objectWithoutPropertiesLoose$k(tt,_excluded$2H);return reactExports.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},it,{ref:et}),reactExports.createElement("path",{d:"M5.49998 0.5C5.49998 0.223858 5.72383 0 5.99998 0H7.49998H8.99998C9.27612 0 9.49998 0.223858 9.49998 0.5C9.49998 0.776142 9.27612 1 8.99998 1H7.99998V2.11922C9.09832 2.20409 10.119 2.56622 10.992 3.13572C11.0116 3.10851 11.0336 3.08252 11.058 3.05806L12.058 2.05806C12.3021 1.81398 12.6978 1.81398 12.9419 2.05806C13.186 2.30214 13.186 2.69786 12.9419 2.94194L11.967 3.91682C13.1595 5.07925 13.9 6.70314 13.9 8.49998C13.9 12.0346 11.0346 14.9 7.49998 14.9C3.96535 14.9 1.09998 12.0346 1.09998 8.49998C1.09998 5.13361 3.69904 2.3743 6.99998 2.11922V1H5.99998C5.72383 1 5.49998 0.776142 5.49998 0.5ZM2.09998 8.49998C2.09998 5.51764 4.51764 3.09998 7.49998 3.09998C10.4823 3.09998 12.9 5.51764 12.9 8.49998C12.9 11.4823 10.4823 13.9 7.49998 13.9C4.51764 13.9 2.09998 11.4823 2.09998 8.49998ZM7.49998 8.49998V4.09998C5.06992 4.09998 3.09998 6.06992 3.09998 8.49998C3.09998 10.93 5.06992 12.9 7.49998 12.9C8.715 12.9 9.815 12.4075 10.6112 11.6112L7.49998 8.49998Z",fill:rt,fillRule:"evenodd",clipRule:"evenodd"}))}),_excluded$2J=["color"],LayersIcon=reactExports.forwardRef(function(tt,et){var nt=tt.color,rt=nt===void 0?"currentColor":nt,it=_objectWithoutPropertiesLoose$k(tt,_excluded$2J);return reactExports.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},it,{ref:et}),reactExports.createElement("path",{d:"M7.75432 0.819537C7.59742 0.726821 7.4025 0.726821 7.24559 0.819537L1.74559 4.06954C1.59336 4.15949 1.49996 4.32317 1.49996 4.5C1.49996 4.67683 1.59336 4.84051 1.74559 4.93046L7.24559 8.18046C7.4025 8.27318 7.59742 8.27318 7.75432 8.18046L13.2543 4.93046C13.4066 4.84051 13.5 4.67683 13.5 4.5C13.5 4.32317 13.4066 4.15949 13.2543 4.06954L7.75432 0.819537ZM7.49996 7.16923L2.9828 4.5L7.49996 1.83077L12.0171 4.5L7.49996 7.16923ZM1.5695 7.49564C1.70998 7.2579 2.01659 7.17906 2.25432 7.31954L7.49996 10.4192L12.7456 7.31954C12.9833 7.17906 13.2899 7.2579 13.4304 7.49564C13.5709 7.73337 13.4921 8.03998 13.2543 8.18046L7.75432 11.4305C7.59742 11.5232 7.4025 11.5232 7.24559 11.4305L1.74559 8.18046C1.50786 8.03998 1.42901 7.73337 1.5695 7.49564ZM1.56949 10.4956C1.70998 10.2579 2.01658 10.1791 2.25432 10.3195L7.49996 13.4192L12.7456 10.3195C12.9833 10.1791 13.2899 10.2579 13.4304 10.4956C13.5709 10.7334 13.4921 11.04 13.2543 11.1805L7.75432 14.4305C7.59742 14.5232 7.4025 14.5232 7.24559 14.4305L1.74559 11.1805C1.50785 11.04 1.42901 10.7334 1.56949 10.4956Z",fill:rt,fillRule:"evenodd",clipRule:"evenodd"}))}),_excluded$2Q=["color"],LightningBoltIcon=reactExports.forwardRef(function(tt,et){var nt=tt.color,rt=nt===void 0?"currentColor":nt,it=_objectWithoutPropertiesLoose$k(tt,_excluded$2Q);return reactExports.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},it,{ref:et}),reactExports.createElement("path",{d:"M8.69667 0.0403541C8.90859 0.131038 9.03106 0.354857 8.99316 0.582235L8.0902 6.00001H12.5C12.6893 6.00001 12.8625 6.10701 12.9472 6.27641C13.0319 6.4458 13.0136 6.6485 12.8999 6.80001L6.89997 14.8C6.76167 14.9844 6.51521 15.0503 6.30328 14.9597C6.09135 14.869 5.96888 14.6452 6.00678 14.4178L6.90974 9H2.49999C2.31061 9 2.13748 8.893 2.05278 8.72361C1.96809 8.55422 1.98636 8.35151 2.09999 8.2L8.09997 0.200038C8.23828 0.0156255 8.48474 -0.0503301 8.69667 0.0403541ZM3.49999 8.00001H7.49997C7.64695 8.00001 7.78648 8.06467 7.88148 8.17682C7.97648 8.28896 8.01733 8.43723 7.99317 8.5822L7.33027 12.5596L11.5 7.00001H7.49997C7.353 7.00001 7.21347 6.93534 7.11846 6.8232C7.02346 6.71105 6.98261 6.56279 7.00678 6.41781L7.66968 2.44042L3.49999 8.00001Z",fill:rt,fillRule:"evenodd",clipRule:"evenodd"}))}),_excluded$34=["color"],MarginIcon=reactExports.forwardRef(function(tt,et){var nt=tt.color,rt=nt===void 0?"currentColor":nt,it=_objectWithoutPropertiesLoose$k(tt,_excluded$34);return reactExports.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},it,{ref:et}),reactExports.createElement("path",{d:"M1.49988 2.00012C1.77602 2.00012 1.99988 1.77626 1.99988 1.50012C1.99988 1.22398 1.77602 1.00012 1.49988 1.00012C1.22374 1.00012 0.999878 1.22398 0.999878 1.50012C0.999878 1.77626 1.22374 2.00012 1.49988 2.00012ZM4.49988 2.00012C4.77602 2.00012 4.99988 1.77626 4.99988 1.50012C4.99988 1.22398 4.77602 1.00012 4.49988 1.00012C4.22374 1.00012 3.99988 1.22398 3.99988 1.50012C3.99988 1.77626 4.22374 2.00012 4.49988 2.00012ZM7.99988 1.50012C7.99988 1.77626 7.77602 2.00012 7.49988 2.00012C7.22374 2.00012 6.99988 1.77626 6.99988 1.50012C6.99988 1.22398 7.22374 1.00012 7.49988 1.00012C7.77602 1.00012 7.99988 1.22398 7.99988 1.50012ZM10.4999 2.00012C10.776 2.00012 10.9999 1.77626 10.9999 1.50012C10.9999 1.22398 10.776 1.00012 10.4999 1.00012C10.2237 1.00012 9.99988 1.22398 9.99988 1.50012C9.99988 1.77626 10.2237 2.00012 10.4999 2.00012ZM13.9999 1.50012C13.9999 1.77626 13.776 2.00012 13.4999 2.00012C13.2237 2.00012 12.9999 1.77626 12.9999 1.50012C12.9999 1.22398 13.2237 1.00012 13.4999 1.00012C13.776 1.00012 13.9999 1.22398 13.9999 1.50012ZM1.49988 14.0001C1.77602 14.0001 1.99988 13.7763 1.99988 13.5001C1.99988 13.224 1.77602 13.0001 1.49988 13.0001C1.22374 13.0001 0.999878 13.224 0.999878 13.5001C0.999878 13.7763 1.22374 14.0001 1.49988 14.0001ZM1.99988 10.5001C1.99988 10.7763 1.77602 11.0001 1.49988 11.0001C1.22374 11.0001 0.999878 10.7763 0.999878 10.5001C0.999878 10.224 1.22374 10.0001 1.49988 10.0001C1.77602 10.0001 1.99988 10.224 1.99988 10.5001ZM1.49988 8.00012C1.77602 8.00012 1.99988 7.77626 1.99988 7.50012C1.99988 7.22398 1.77602 7.00012 1.49988 7.00012C1.22374 7.00012 0.999878 7.22398 0.999878 7.50012C0.999878 7.77626 1.22374 8.00012 1.49988 8.00012ZM1.99988 4.50012C1.99988 4.77626 1.77602 5.00012 1.49988 5.00012C1.22374 5.00012 0.999878 4.77626 0.999878 4.50012C0.999878 4.22398 1.22374 4.00012 1.49988 4.00012C1.77602 4.00012 1.99988 4.22398 1.99988 4.50012ZM13.4999 11.0001C13.776 11.0001 13.9999 10.7763 13.9999 10.5001C13.9999 10.224 13.776 10.0001 13.4999 10.0001C13.2237 10.0001 12.9999 10.224 12.9999 10.5001C12.9999 10.7763 13.2237 11.0001 13.4999 11.0001ZM13.9999 7.50012C13.9999 7.77626 13.776 8.00012 13.4999 8.00012C13.2237 8.00012 12.9999 7.77626 12.9999 7.50012C12.9999 7.22398 13.2237 7.00012 13.4999 7.00012C13.776 7.00012 13.9999 7.22398 13.9999 7.50012ZM13.4999 5.00012C13.776 5.00012 13.9999 4.77626 13.9999 4.50012C13.9999 4.22398 13.776 4.00012 13.4999 4.00012C13.2237 4.00012 12.9999 4.22398 12.9999 4.50012C12.9999 4.77626 13.2237 5.00012 13.4999 5.00012ZM4.99988 13.5001C4.99988 13.7763 4.77602 14.0001 4.49988 14.0001C4.22374 14.0001 3.99988 13.7763 3.99988 13.5001C3.99988 13.224 4.22374 13.0001 4.49988 13.0001C4.77602 13.0001 4.99988 13.224 4.99988 13.5001ZM7.49988 14.0001C7.77602 14.0001 7.99988 13.7763 7.99988 13.5001C7.99988 13.224 7.77602 13.0001 7.49988 13.0001C7.22374 13.0001 6.99988 13.224 6.99988 13.5001C6.99988 13.7763 7.22374 14.0001 7.49988 14.0001ZM10.9999 13.5001C10.9999 13.7763 10.776 14.0001 10.4999 14.0001C10.2237 14.0001 9.99988 13.7763 9.99988 13.5001C9.99988 13.224 10.2237 13.0001 10.4999 13.0001C10.776 13.0001 10.9999 13.224 10.9999 13.5001ZM13.4999 14.0001C13.776 14.0001 13.9999 13.7763 13.9999 13.5001C13.9999 13.224 13.776 13.0001 13.4999 13.0001C13.2237 13.0001 12.9999 13.224 12.9999 13.5001C12.9999 13.7763 13.2237 14.0001 13.4999 14.0001ZM3.99988 5.00012C3.99988 4.44784 4.44759 4.00012 4.99988 4.00012H9.99988C10.5522 4.00012 10.9999 4.44784 10.9999 5.00012V10.0001C10.9999 10.5524 10.5522 11.0001 9.99988 11.0001H4.99988C4.44759 11.0001 3.99988 10.5524 3.99988 10.0001V5.00012ZM4.99988 5.00012H9.99988V10.0001H4.99988V5.00012Z",fill:rt,fillRule:"evenodd",clipRule:"evenodd"}))}),_excluded$37=["color"],MinusIcon=reactExports.forwardRef(function(tt,et){var nt=tt.color,rt=nt===void 0?"currentColor":nt,it=_objectWithoutPropertiesLoose$k(tt,_excluded$37);return reactExports.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},it,{ref:et}),reactExports.createElement("path",{d:"M2.25 7.5C2.25 7.22386 2.47386 7 2.75 7H12.25C12.5261 7 12.75 7.22386 12.75 7.5C12.75 7.77614 12.5261 8 12.25 8H2.75C2.47386 8 2.25 7.77614 2.25 7.5Z",fill:rt,fillRule:"evenodd",clipRule:"evenodd"}))}),_excluded$3m=["color"],PauseIcon=reactExports.forwardRef(function(tt,et){var nt=tt.color,rt=nt===void 0?"currentColor":nt,it=_objectWithoutPropertiesLoose$k(tt,_excluded$3m);return reactExports.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},it,{ref:et}),reactExports.createElement("path",{d:"M6.04995 2.74998C6.04995 2.44623 5.80371 2.19998 5.49995 2.19998C5.19619 2.19998 4.94995 2.44623 4.94995 2.74998V12.25C4.94995 12.5537 5.19619 12.8 5.49995 12.8C5.80371 12.8 6.04995 12.5537 6.04995 12.25V2.74998ZM10.05 2.74998C10.05 2.44623 9.80371 2.19998 9.49995 2.19998C9.19619 2.19998 8.94995 2.44623 8.94995 2.74998V12.25C8.94995 12.5537 9.19619 12.8 9.49995 12.8C9.80371 12.8 10.05 12.5537 10.05 12.25V2.74998Z",fill:rt,fillRule:"evenodd",clipRule:"evenodd"}))}),_excluded$3H=["color"],RocketIcon=reactExports.forwardRef(function(tt,et){var nt=tt.color,rt=nt===void 0?"currentColor":nt,it=_objectWithoutPropertiesLoose$k(tt,_excluded$3H);return reactExports.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},it,{ref:et}),reactExports.createElement("path",{d:"M6.85357 3.85355L7.65355 3.05353C8.2981 2.40901 9.42858 1.96172 10.552 1.80125C11.1056 1.72217 11.6291 1.71725 12.0564 1.78124C12.4987 1.84748 12.7698 1.97696 12.8965 2.10357C13.0231 2.23018 13.1526 2.50125 13.2188 2.94357C13.2828 3.37086 13.2779 3.89439 13.1988 4.44801C13.0383 5.57139 12.591 6.70188 11.9464 7.34645L7.49999 11.7929L6.35354 10.6465C6.15827 10.4512 5.84169 10.4512 5.64643 10.6465C5.45117 10.8417 5.45117 11.1583 5.64643 11.3536L7.14644 12.8536C7.34171 13.0488 7.65829 13.0488 7.85355 12.8536L8.40073 12.3064L9.57124 14.2572C9.65046 14.3893 9.78608 14.4774 9.9389 14.4963C10.0917 14.5151 10.2447 14.4624 10.3535 14.3536L12.3535 12.3536C12.4648 12.2423 12.5172 12.0851 12.495 11.9293L12.0303 8.67679L12.6536 8.05355C13.509 7.19808 14.0117 5.82855 14.1887 4.58943C14.2784 3.9618 14.2891 3.33847 14.2078 2.79546C14.1287 2.26748 13.9519 1.74482 13.6035 1.39645C13.2552 1.04809 12.7325 0.871332 12.2045 0.792264C11.6615 0.710945 11.0382 0.721644 10.4105 0.8113C9.17143 0.988306 7.80189 1.491 6.94644 2.34642L6.32322 2.96968L3.07071 2.50504C2.91492 2.48278 2.75773 2.53517 2.64645 2.64646L0.646451 4.64645C0.537579 4.75533 0.484938 4.90829 0.50375 5.0611C0.522563 5.21391 0.61073 5.34954 0.742757 5.42876L2.69364 6.59928L2.14646 7.14645C2.0527 7.24022 2.00002 7.3674 2.00002 7.50001C2.00002 7.63261 2.0527 7.75979 2.14646 7.85356L3.64647 9.35356C3.84173 9.54883 4.15831 9.54883 4.35357 9.35356C4.54884 9.1583 4.54884 8.84172 4.35357 8.64646L3.20712 7.50001L3.85357 6.85356L6.85357 3.85355ZM10.0993 13.1936L9.12959 11.5775L11.1464 9.56067L11.4697 11.8232L10.0993 13.1936ZM3.42251 5.87041L5.43935 3.85356L3.17678 3.53034L1.80638 4.90074L3.42251 5.87041ZM2.35356 10.3535C2.54882 10.1583 2.54882 9.8417 2.35356 9.64644C2.1583 9.45118 1.84171 9.45118 1.64645 9.64644L0.646451 10.6464C0.451188 10.8417 0.451188 11.1583 0.646451 11.3535C0.841713 11.5488 1.1583 11.5488 1.35356 11.3535L2.35356 10.3535ZM3.85358 11.8536C4.04884 11.6583 4.04885 11.3417 3.85359 11.1465C3.65833 10.9512 3.34175 10.9512 3.14648 11.1465L1.14645 13.1464C0.95119 13.3417 0.951187 13.6583 1.14645 13.8535C1.34171 14.0488 1.65829 14.0488 1.85355 13.8536L3.85358 11.8536ZM5.35356 13.3535C5.54882 13.1583 5.54882 12.8417 5.35356 12.6464C5.1583 12.4512 4.84171 12.4512 4.64645 12.6464L3.64645 13.6464C3.45119 13.8417 3.45119 14.1583 3.64645 14.3535C3.84171 14.5488 4.1583 14.5488 4.35356 14.3535L5.35356 13.3535ZM9.49997 6.74881C10.1897 6.74881 10.7488 6.1897 10.7488 5.5C10.7488 4.8103 10.1897 4.25118 9.49997 4.25118C8.81026 4.25118 8.25115 4.8103 8.25115 5.5C8.25115 6.1897 8.81026 6.74881 9.49997 6.74881Z",fill:rt,fillRule:"evenodd",clipRule:"evenodd"}))}),_excluded$3L=["color"],RulerHorizontalIcon=reactExports.forwardRef(function(tt,et){var nt=tt.color,rt=nt===void 0?"currentColor":nt,it=_objectWithoutPropertiesLoose$k(tt,_excluded$3L);return reactExports.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},it,{ref:et}),reactExports.createElement("path",{d:"M0.5 4C0.223858 4 0 4.22386 0 4.5V10.5C0 10.7761 0.223858 11 0.5 11H14.5C14.7761 11 15 10.7761 15 10.5V4.5C15 4.22386 14.7761 4 14.5 4H0.5ZM1 10V5H2.075V7.5C2.075 7.73472 2.26528 7.925 2.5 7.925C2.73472 7.925 2.925 7.73472 2.925 7.5V5H4.075V6.5C4.075 6.73472 4.26528 6.925 4.5 6.925C4.73472 6.925 4.925 6.73472 4.925 6.5V5H6.075V6.5C6.075 6.73472 6.26528 6.925 6.5 6.925C6.73472 6.925 6.925 6.73472 6.925 6.5V5H8.075V7.5C8.075 7.73472 8.26528 7.925 8.5 7.925C8.73472 7.925 8.925 7.73472 8.925 7.5V5H10.075V6.5C10.075 6.73472 10.2653 6.925 10.5 6.925C10.7347 6.925 10.925 6.73472 10.925 6.5V5H12.075V6.5C12.075 6.73472 12.2653 6.925 12.5 6.925C12.7347 6.925 12.925 6.73472 12.925 6.5V5H14V10H1Z",fill:rt,fillRule:"evenodd",clipRule:"evenodd"}))}),_excluded$4q=["color"],TextAlignJustifyIcon=reactExports.forwardRef(function(tt,et){var nt=tt.color,rt=nt===void 0?"currentColor":nt,it=_objectWithoutPropertiesLoose$k(tt,_excluded$4q);return reactExports.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},it,{ref:et}),reactExports.createElement("path",{d:"M2.5 4C2.22386 4 2 4.22386 2 4.5C2 4.77614 2.22386 5 2.5 5H12.5C12.7761 5 13 4.77614 13 4.5C13 4.22386 12.7761 4 12.5 4H2.5ZM2 7.5C2 7.22386 2.22386 7 2.5 7H12.5C12.7761 7 13 7.22386 13 7.5C13 7.77614 12.7761 8 12.5 8H2.5C2.22386 8 2 7.77614 2 7.5ZM2 10.5C2 10.2239 2.22386 10 2.5 10H12.5C12.7761 10 13 10.2239 13 10.5C13 10.7761 12.7761 11 12.5 11H2.5C2.22386 11 2 10.7761 2 10.5Z",fill:rt,fillRule:"evenodd",clipRule:"evenodd"}))}),_excluded$4H=["color"],TriangleDownIcon=reactExports.forwardRef(function(tt,et){var nt=tt.color,rt=nt===void 0?"currentColor":nt,it=_objectWithoutPropertiesLoose$k(tt,_excluded$4H);return reactExports.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},it,{ref:et}),reactExports.createElement("path",{d:"M4 6H11L7.5 10.5L4 6Z",fill:rt}))}),_excluded$4K=["color"],TriangleUpIcon=reactExports.forwardRef(function(tt,et){var nt=tt.color,rt=nt===void 0?"currentColor":nt,it=_objectWithoutPropertiesLoose$k(tt,_excluded$4K);return reactExports.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},it,{ref:et}),reactExports.createElement("path",{d:"M4 9H11L7.5 4.5L4 9Z",fill:rt}))}),_excluded$4R=["color"],VercelLogoIcon=reactExports.forwardRef(function(tt,et){var nt=tt.color,rt=nt===void 0?"currentColor":nt,it=_objectWithoutPropertiesLoose$k(tt,_excluded$4R);return reactExports.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},it,{ref:et}),reactExports.createElement("path",{d:"M7.49998 1L6.92321 2.00307L1.17498 12L0.599976 13H1.7535H13.2464H14.4L13.825 12L8.07674 2.00307L7.49998 1ZM7.49998 3.00613L2.3285 12H12.6714L7.49998 3.00613Z",fill:rt,fillRule:"evenodd",clipRule:"evenodd"}))});function _toPrimitive$B(tt,et){if(typeof tt!="object"||tt===null)return tt;var nt=tt[Symbol.toPrimitive];if(nt!==void 0){var rt=nt.call(tt,et||"default");if(typeof rt!="object")return rt;throw new TypeError("@@toPrimitive must return a primitive value.")}return(et==="string"?String:Number)(tt)}function _toPropertyKey$B(tt){var et=_toPrimitive$B(tt,"string");return typeof et=="symbol"?et:String(et)}function _defineProperty$B(tt,et,nt){return et=_toPropertyKey$B(et),et in tt?Object.defineProperty(tt,et,{value:nt,enumerable:!0,configurable:!0,writable:!0}):tt[et]=nt,tt}function ownKeys$A(tt,et){var nt=Object.keys(tt);if(Object.getOwnPropertySymbols){var rt=Object.getOwnPropertySymbols(tt);et&&(rt=rt.filter(function(it){return Object.getOwnPropertyDescriptor(tt,it).enumerable})),nt.push.apply(nt,rt)}return nt}function _objectSpread2(tt){for(var et=1;et(tt==null?void 0:tt.reduce((et,nt)=>et+nt,0))/tt.length;class GLPerf{constructor(et={}){this.names=[""],this.finished=[],this.gl=void 0,this.extension=void 0,this.query=void 0,this.paused=!1,this.overClock=!1,this.queryHasResult=!1,this.queryCreated=!1,this.isWebGL2=!0,this.memAccums=[],this.gpuAccums=[],this.activeAccums=[],this.logsAccums={mem:[],gpu:[],cpu:[],fps:[],fpsFixed:[]},this.fpsChart=[],this.gpuChart=[],this.cpuChart=[],this.memChart=[],this.paramLogger=()=>{},this.glFinish=()=>{},this.chartLogger=()=>{},this.chartLen=60,this.maxMemory=1500,this.chartHz=10,this.startCpuProfiling=!1,this.lastCalculateFixed=0,this.chartFrame=0,this.gpuTimeProcess=0,this.chartTime=0,this.activeQueries=0,this.circularId=0,this.detected=0,this.frameId=0,this.rafId=0,this.idleCbId=0,this.checkQueryId=0,this.uuid=void 0,this.currentCpu=0,this.currentMem=0,this.paramFrame=0,this.paramTime=0,this.now=()=>{},this.t0=0,window.GLPerf=window.GLPerf||{},Object.assign(this,et),this.fpsChart=new Array(this.chartLen).fill(0),this.gpuChart=new Array(this.chartLen).fill(0),this.cpuChart=new Array(this.chartLen).fill(0),this.memChart=new Array(this.chartLen).fill(0),this.now=()=>window.performance&&window.performance.now?window.performance.now():Date.now(),this.initGpu(),this.is120hz()}initGpu(){this.uuid=MathUtils.generateUUID(),this.gl&&(this.isWebGL2=!0,this.extension||(this.extension=this.gl.getExtension("EXT_disjoint_timer_query_webgl2")),this.extension===null&&(this.isWebGL2=!1))}is120hz(){let et=0;const nt=rt=>{++et<20?this.rafId=window.requestAnimationFrame(nt):(this.detected=Math.ceil(1e3*et/(rt-this.t0)/70),window.cancelAnimationFrame(this.rafId)),this.t0||(this.t0=rt)};this.rafId=window.requestAnimationFrame(nt)}addUI(et){this.names.indexOf(et)===-1&&(this.names.push(et),this.gpuAccums.push(0),this.activeAccums.push(!1))}nextFps(et){const nt=16.666666666666668,rt=nt-et.timeRemaining(),it=nt*overLimitFps.fpsLimit/10/rt;it<0||(overLimitFps.value=it,overLimitFps.isOverLimit<25?overLimitFps.isOverLimit++:usePerfStore.setState({overclockingFps:!0}))}nextFrame(et){this.frameId++;const nt=et||this.now();let rt=nt-this.paramTime,it=0;if(this.frameId<=1)this.paramFrame=this.frameId,this.paramTime=nt;else if(nt>=this.paramTime){this.maxMemory=window.performance.memory?window.performance.memory.jsHeapSizeLimit/1048576:0;const ot=this.frameId-this.paramFrame,at=ot*1e3/rt,st=usePerfStore.getState().overclockingFps?overLimitFps.value:at;if(it=this.isWebGL2?this.gpuAccums[0]:this.gpuAccums[0]/rt,this.isWebGL2?this.gpuAccums[0]=0:Promise.all(this.finished).then(()=>{this.gpuAccums[0]=0,this.finished=[]}),this.currentMem=Math.round(window.performance&&window.performance.memory?window.performance.memory.usedJSHeapSize/1048576:0),window.performance&&this.startCpuProfiling){window.performance.mark("cpu-finished");const lt=performance.measure("cpu-duration","cpu-started","cpu-finished");this.currentCpu=lt.duration,this.logsAccums.cpu.push(this.currentCpu),this.startCpuProfiling=!1}this.logsAccums.mem.push(this.currentMem),this.logsAccums.fpsFixed.push(at),this.logsAccums.fps.push(st),this.logsAccums.gpu.push(it),this.overClock&&typeof window.requestIdleCallback<"u"&&(overLimitFps.isOverLimit>0&&st>at?overLimitFps.isOverLimit--:usePerfStore.getState().overclockingFps&&usePerfStore.setState({overclockingFps:!1})),nt>=this.paramTime+180&&(this.paramLogger({cpu:average(this.logsAccums.cpu),gpu:average(this.logsAccums.gpu),mem:average(this.logsAccums.mem),fps:average(this.logsAccums.fps),duration:Math.round(rt),maxMemory:this.maxMemory,frameCount:ot}),this.logsAccums.mem=[],this.logsAccums.fps=[],this.logsAccums.gpu=[],this.logsAccums.cpu=[],this.paramFrame=this.frameId,this.paramTime=nt),this.overClock&&nt-this.lastCalculateFixed>=2*1e3&&(this.lastCalculateFixed=et,overLimitFps.fpsLimit=Math.round(average(this.logsAccums.fpsFixed)/10)*100,usePerfStore.setState({fpsLimit:overLimitFps.fpsLimit/10}),this.logsAccums.fpsFixed=[],this.paramFrame=this.frameId,this.paramTime=nt)}if(!this.detected||!this.chartFrame)this.chartFrame=this.frameId,this.chartTime=nt,this.circularId=0;else{const ot=nt-this.chartTime;let at=this.chartHz*ot/1e3;for(;--at>0&&this.detected;){const lt=(this.frameId-this.chartFrame)/ot*1e3,ct=usePerfStore.getState().overclockingFps?overLimitFps.value:lt;this.fpsChart[this.circularId%this.chartLen]=ct;const ut=1e3/this.currentMem,ht=this.currentCpu,dt=(this.isWebGL2?this.gpuAccums[1]*2:Math.round(this.gpuAccums[1]/rt*100))+4;dt>0&&(this.gpuChart[this.circularId%this.chartLen]=dt),ht>0&&(this.cpuChart[this.circularId%this.chartLen]=ht),ut>0&&(this.memChart[this.circularId%this.chartLen]=ut);for(let pt=0;pt0&&(it||this.activeAccums.forEach((lt,ct)=>{this.gpuAccums[ct]=st}))}}(rt||!this.query)&&(this.queryCreated=!0,this.query=et.createQuery(),et.beginQuery(nt.TIME_ELAPSED_EXT,this.query))}}endGpu(){const et=this.extension,nt=this.gl;this.isWebGL2&&this.queryCreated&&nt.getQuery(et.TIME_ELAPSED_EXT,nt.CURRENT_QUERY)&&nt.endQuery(et.TIME_ELAPSED_EXT)}begin(et){this.startGpu(),this.updateAccums(et)}end(et){this.endGpu(),this.updateAccums(et)}updateAccums(et){let nt=this.names.indexOf(et);nt===-1&&(nt=this.names.length,this.addUI(et));const rt=this.now();this.activeAccums[nt]=!this.activeAccums[nt],this.t0=rt}}const countGeoDrawCalls=tt=>{tt.forEach((et,nt)=>{const{meshes:rt}=et;if(!rt)return;let it={total:0,type:"Triangle",data:[]};Object.keys(rt).forEach(ot=>{const at=rt[ot],{geometry:st,material:lt}=at;let ct=st.index;const ut=st.attributes.position;if(!ut)return;let ht=1;lt.wireframe===!0&&(ht=0);const dt=ct!==null?ct.count:ut.count,pt=st.drawRange.start*ht,mt=st.drawRange.count*ht,gt=pt,yt=Math.min(dt,pt+mt)-1;let bt=1;const vt=at.count||1;let xt="Triangle",kt=0;at.isMesh?lt.wireframe===!0?(xt="Line",bt=bt/2):(xt="Triangle",bt=bt/3):at.isLine?(xt="Line",at.isLineSegments?bt=bt/2:at.isLineLoop?bt=bt:bt=bt-1):at.isPoints?(xt="Point",bt=bt):at.isSprite&&(xt="Triangle",bt=bt/3);const St=Math.round(Math.max(0,yt-gt+1)*(bt*vt));St>kt&&(kt=St,it.type=xt),it.total+=St,it.data.push({drawCount:St,type:xt}),at.userData.drawCount={type:xt,count:St}}),et.drawCounts=it})},updateMatrixWorldTemp=Object3D.prototype.updateMatrixWorld,updateWorldMatrixTemp=Object3D.prototype.updateWorldMatrix,updateMatrixTemp=Object3D.prototype.updateMatrix;let matriceWorldCount={value:0},matriceCount={value:0};const isUUID=tt=>{let et=""+tt;return et=et.match("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"),et!==null},addMuiPerfID=(tt,et)=>{tt.defines||(tt.defines={}),tt.defines&&!tt.defines.muiPerf&&(tt.defines=Object.assign(tt.defines||{},{muiPerf:tt.uuid}));const nt=tt.uuid;return et[nt]||(et[nt]={meshes:{},material:tt},tt.needsUpdate=!0),tt.needsUpdate=!1,nt},getMUIIndex=tt=>tt==="muiPerf",usePerfStore=react(tt=>({log:null,paused:!1,triggerProgramsUpdate:0,customData:0,fpsLimit:60,overclockingFps:!1,chart:{data:{fps:[],cpu:[],gpu:[],mem:[]},circularId:0},gl:void 0,objectWithMaterials:null,scene:void 0,programs:new Map,sceneLength:void 0,tab:"infos"})),Headless=({trackCPU:tt,overClock:et,chart:nt,deepAnalyze:rt,matrixUpdate:it})=>{const{gl:ot,scene:at}=useThree();usePerfStore.setState({gl:ot,scene:at});const st=reactExports.useMemo(()=>{const lt=new GLPerf({trackGPU:!0,overClock:et,chartLen:nt?nt.length:120,chartHz:nt?nt.hz:60,gl:ot.getContext(),chartLogger:ht=>{usePerfStore.setState({chart:ht})},paramLogger:ht=>{usePerfStore.setState({log:{maxMemory:ht.maxMemory,gpu:ht.gpu,cpu:ht.cpu,mem:ht.mem,fps:ht.fps,totalTime:ht.duration,frameCount:ht.frameCount}})}}),ct=new Map,ut=new Map;return Object.defineProperty(Scene.prototype,"onBeforeRender",{get(){return(...ht)=>{var dt;lt&<.begin("profiler"),(dt=ct.get(this))===null||dt===void 0||dt(...ht)}},set(ht){ct.set(this,ht)},configurable:!0}),Object.defineProperty(Scene.prototype,"onAfterRender",{get(){return(...ht)=>{var dt;lt&<.end("profiler"),(dt=ut.get(this))===null||dt===void 0||dt(...ht)}},set(ht){ut.set(this,ht)},configurable:!0}),lt},[]);return reactExports.useEffect(()=>{st&&(st.overClock=et||!1,et===!1&&(usePerfStore.setState({overclockingFps:!1}),overLimitFps.value=0,overLimitFps.isOverLimit=0),st.chartHz=(nt==null?void 0:nt.hz)||60,st.chartLen=(nt==null?void 0:nt.length)||120)},[et,st,nt==null?void 0:nt.length,nt==null?void 0:nt.hz]),reactExports.useEffect(()=>{it&&(Object3D.prototype.updateMatrixWorld=function(){(this.matrixWorldNeedsUpdate||arguments[0])&&matriceWorldCount.value++,updateMatrixWorldTemp.apply(this,arguments)},Object3D.prototype.updateWorldMatrix=function(){matriceWorldCount.value++,updateWorldMatrixTemp.apply(this,arguments)},Object3D.prototype.updateMatrix=function(){matriceCount.value++,updateMatrixTemp.apply(this,arguments)}),ot.info.autoReset=!1;let lt=null,ct=null;if(ot.info)return lt=addEffect(function(){usePerfStore.getState().paused&&usePerfStore.setState({paused:!1}),window.performance&&(window.performance.mark("cpu-started"),st.startCpuProfiling=!0),matriceCount.value-=1,matriceWorldCount.value=0,matriceCount.value=0,ot.info&&ot.info.reset()}),ct=addAfterEffect(function(){if(st&&!st.paused&&(st.nextFrame(window.performance.now()),et&&typeof window.requestIdleCallback<"u"&&(st.idleCbId=requestIdleCallback(st.nextFps))),rt){var ht,dt;const pt={},mt=new Map;at.traverse(function(yt){if((yt instanceof Mesh||yt instanceof Points)&&yt.material){let bt=yt.material.uuid;Array.isArray(yt.material)&&yt.material.length>1?bt=addMuiPerfID(yt.material[1],pt):bt=addMuiPerfID(yt.material,pt),pt[bt].meshes[yt.uuid]=yt}}),ot==null||(ht=ot.info)===null||ht===void 0||(dt=ht.programs)===null||dt===void 0||dt.forEach(gt=>{const yt=gt.cacheKey.split(","),bt=yt[yt.findIndex(getMUIIndex)+1];if(isUUID(bt)&&pt[bt]){const{material:vt,meshes:xt}=pt[bt];mt.set(bt,{program:gt,material:vt,meshes:xt,drawCounts:{total:0,type:"triangle",data:[]},expand:!1,visible:!0})}}),mt.size!==usePerfStore.getState().programs.size&&(countGeoDrawCalls(mt),usePerfStore.setState({programs:mt,triggerProgramsUpdate:usePerfStore.getState().triggerProgramsUpdate++}))}}),()=>{st&&(typeof window.cancelIdleCallback<"u"&&window.cancelIdleCallback(st.idleCbId),window.cancelAnimationFrame(st.rafId),window.cancelAnimationFrame(st.checkQueryId)),it&&(Object3D.prototype.updateMatrixWorld=updateMatrixTemp),lt(),ct()}},[st,ot,tt,nt,it]),reactExports.useEffect(()=>{const lt=addTail(function(){return st&&(st.paused=!0,matriceCount.value=0,matriceWorldCount.value=0,usePerfStore.setState({paused:!0,log:{maxMemory:0,gpu:0,mem:0,cpu:0,fps:0,totalTime:0,frameCount:0}})),!1});return()=>{lt()}},[]),null},PerfS=re$4("div",{position:"fixed",top:0,right:0,zIndex:9999,fontFamily:`-apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', - 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', - sans-serif`,backgroundColor:"rgba(36, 36, 36, .9)",color:"#fff",margin:0,minHeight:"100px",padding:"4px 0","-webkit-font-smoothing":"antialiased","-moz-osx-font-smoothing":"grayscale",userSelect:"none","&.top-left":{right:"initial",left:0},"&.bottom-left":{right:"initial",top:"initial",bottom:0,left:0,".__perf_toggle":{top:"-20px",bottom:"initial"}},"&.bottom-right":{top:"initial",bottom:0,".__perf_toggle":{top:"-20px",bottom:"initial"}},"&.minimal":{backgroundColor:"rgba(36, 36, 36, .75)"},"*":{margin:"0",padding:"0",border:"0",fontSize:"100%",lineHeight:"1",verticalAlign:"baseline"}}),PerfSmallI=re$4("small",{position:"absolute",right:0,fontSize:"10px"}),PerfI=re$4("div",{display:"inline-flex",fontStyle:"normal",padding:0,lineHeight:"13px",fontSize:"14px",width:"62px",position:"relative",pointerEvents:"auto",cursor:"default",fontWeight:500,letterSpacing:"0px",textAlign:"left",height:"29px",whiteSpace:"nowrap",justifyContent:"space-evenly",fontVariantNumeric:"tabular-nums",small:{paddingLeft:"12px"},svg:{padding:0,color:"rgba(145, 145, 145, 0.3)",fontSize:"40px",position:"absolute",zIndex:1,maxHeight:"20px",left:" 50%",marginLeft:"-23px",top:"4px"}}),PerfB=re$4("span",{verticalAlign:"bottom",position:"absolute",bottom:"5px",color:"rgba(101, 197, 188, 1)",textAlign:"right",letterSpacing:"1px",fontSize:"8px",fontWeight:"500",width:"60px"}),PerfIContainer=re$4("div",{display:"flex"}),ProgramHeader=re$4("div",{backgroundColor:"#404040",padding:"6px",display:"block",fontSize:"12px",marginBottom:"6px",cursor:"pointer","*":{cursor:"pointer !important"},"> span":{},small:{fontSize:"9px"},"> b":{marginRight:"4px",cursor:"pointer"}}),Graph$1=re$4("div",{height:"66px",overflow:"hidden",position:"absolute",pointerEvents:"none",display:"flex",top:"0px",justifyContent:"center",width:"100%",minWidth:"310px",margin:"0 auto",canvas:{background:"transparent !important",position:"absolute !important"}}),Graphpc=re$4("div",{textAlign:"center",fontWeight:700,fontSize:"12px",lineHeight:"12px",display:"flex",justifyContent:"center",alignItems:"center",verticalAlign:"middle",color:"#f1f1f1",padding:"7px",width:"100%",backgroundColor:"rgba(36, 36, 37, 0.8)",zIndex:1,position:"absolute",height:"100%"}),Toggle=re$4("div",{pointerEvents:"auto",justifyContent:"center",cursor:"pointer",fontSize:"12px",backgroundColor:"rgb(41, 43, 45)",marginTop:"6px",width:"auto",margin:"0",color:"rgba(145, 145, 145, 1)",textAlign:"center",display:"inline-block",verticalAlign:"middle",padding:"4px 6px","&.__perf_toggle_tab_active":{backgroundColor:"rgb(31 31 31)"},svg:{width:"12px",height:"12px",float:"left"}}),ToggleVisible=re$4("div",{pointerEvents:"auto",justifyContent:"center",cursor:"pointer",fontSize:"12px",float:"right",backgroundColor:"rgb(41, 43, 45)",width:"auto",margin:"0",color:"rgba(145, 145, 145, 1)",textAlign:"center",display:"inline-block",verticalAlign:"middle",padding:"4px 6px","&.__perf_toggle_tab_active":{backgroundColor:"rgb(31 31 31)"},svg:{width:"12px",height:"12px",float:"left"}}),ProgramGeo=re$4("div",{padding:"4px 6px",fontSize:"12px",pointerEvents:"auto"}),ProgramTitle=re$4("span",{fontWeight:"bold",letterSpacing:"0.08em",maxWidth:"145px",overflow:"hidden",textOverflow:"ellipsis",display:"inline-block",verticalAlign:"middle",fontSize:"11px",marginRight:"10px"}),ContainerScroll=re$4("div",{maxHeight:"50vh",overflowY:"auto",marginTop:"38px"}),ProgramsContainer=re$4("div",{marginTop:"0"}),ProgramsULHeader=re$4("div",{display:"flex",position:"relative",fontWeight:"bold",color:"#fff",lineHeight:"14px",svg:{marginRight:"4px",display:"inline-block"}}),ProgramsUL=re$4("ul",{display:"block",position:"relative",paddingLeft:"10px",margin:"6px 6px",img:{maxHeight:"60px",maxWidth:"100%",margin:"6px auto",display:"block"},"&:after":{content:"",position:"absolute",left:"0px",top:"0px",width:"1px",height:"100%",backgroundColor:"grey",transform:"translateX(-50%)",maxHeight:"50vh",overflowY:"auto"},li:{borderBottom:"1px solid #313131",display:"block",padding:"4px",margin:0,lineHeight:1,verticalAlign:"middle",height:"24px"},b:{fontWeight:"bold"},small:{textAlign:"revert",letterSpacing:"1px",fontSize:"10px",fontWeight:"500",marginLeft:"2px",color:"rgb(101, 197, 188)"}}),ProgramConsole=re$4("button",{fontWeight:"bold",letterSpacing:"0.02em",backgroundColor:"rgb(41, 43, 45)",color:"rgb(211, 211, 211)",overflow:"hidden",textOverflow:"ellipsis",cursor:"pointer",display:"block",verticalAlign:"middle",fontSize:"11px",padding:"5px",margin:"4px auto"}),ToggleContainer=re$4("div",{display:"flex",justifyContent:"center",cursor:"pointer",fontSize:"12px",backgroundColor:"rgb(41, 43, 45)",marginTop:"6px",width:"auto",margin:"0 auto",color:"rgba(145, 145, 145, 1)",textAlign:"center",position:"absolute",right:0,bottom:" -20px",svg:{width:"12px",height:"12px",float:"left"}}),ProgramsGeoLi=re$4("li",{display:"flex !important",height:"auto !important",span:{height:"40px",display:"block",position:"relative"},b:{paddingLeft:"12px"}}),TextHighHZ=reactExports.memo(({isPerf:tt,color:et,colorBlind:nt,customData:rt,isMemory:it,isShadersInfo:ot,metric:at,fontSize:st,offsetY:lt=0,offsetX:ct,round:ut,hasInstance:ht})=>{const{width:dt,height:pt}=useThree(yt=>yt.viewport),mt=reactExports.useRef(null),gt=reactExports.useRef(null);return useFrame(function(){const bt=usePerfStore.getState().gl,vt=usePerfStore.getState().log;if(!vt||!mt.current||(rt&&(mt.current.text=usePerfStore.getState().customData),!at))return;let xt=vt[at];if(ot){var kt;xt=(kt=bt.info.programs)===null||kt===void 0?void 0:kt.length}else at==="matriceCount"?xt=matriceCount.value:!tt&&bt.info.render&&(xt=(it?bt.info.memory:bt.info.render)[at]);if(at==="fps"&&(mt.current.color=usePerfStore.getState().overclockingFps?colorsGraph(nt).overClock.toString():`rgb(${colorsGraph(nt).fps.toString()})`),mt.current.text=(Math.round(xt*Math.pow(10,ut))/Math.pow(10,ut)).toFixed(ut),ht){const St=bt.info.instance;if(typeof St>"u"&&at!=="matriceCount")return;let Tt;at==="matriceCount"?Tt=matriceWorldCount.value:Tt=St[at],Tt>0?(mt.current.fontSize=st/1.15,gt.current.fontSize=xt>0?st/1.4:st,mt.current.position.y=pt/2-lt-st/1.9,gt.current.text=" ± "+(Math.round(Tt*Math.pow(10,ut))/Math.pow(10,ut)).toFixed(ut)):(mt.current.position.y=pt/2-lt-st,mt.current.fontSize=st)}matriceCount.value-=1,mt.current.updateMatrix(),mt.current.matrixWorld.copy(mt.current.matrix)}),jsxRuntimeExports.jsxs(reactExports.Suspense,{fallback:null,children:[jsxRuntimeExports.jsxs(Text$1,{textAlign:"justify",matrixAutoUpdate:!1,ref:mt,fontSize:st,position:[-dt/2+ct+st,pt/2-lt-st,0],color:et,characters:"0123456789",onUpdate:yt=>{yt.updateMatrix(),matriceCount.value-=1,yt.matrixWorld.copy(yt.matrix)},children:[jsxRuntimeExports.jsx("meshBasicMaterial",{blending:NormalBlending}),"0"]}),ht&&jsxRuntimeExports.jsx(Text$1,{textAlign:"justify",matrixAutoUpdate:!1,ref:gt,fontSize:8,position:[-dt/2+ct+st,pt/2-lt-st*1.15,0],color:"lightgrey",characters:"0123456789",onUpdate:yt=>{yt.updateMatrix(),matriceCount.value-=1,yt.matrixWorld.copy(yt.matrix)},children:jsxRuntimeExports.jsx("meshBasicMaterial",{blending:NormalBlending})})]})}),TextsHighHZ=({colorBlind:tt,customData:et,minimal:nt,matrixUpdate:rt})=>jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(TextHighHZ,{colorBlind:tt,color:`rgb(${colorsGraph(tt).fps.toString()})`,isPerf:!0,metric:"fps",fontSize:14,offsetX:140,round:0}),jsxRuntimeExports.jsx(TextHighHZ,{color:`rgb(${colorsGraph(tt).cpu.toString()})`,isPerf:!0,metric:"cpu",fontSize:14,offsetX:72,round:3}),jsxRuntimeExports.jsx(TextHighHZ,{color:`rgb(${colorsGraph(tt).gpu.toString()})`,isPerf:!0,metric:"gpu",fontSize:14,offsetX:10,round:3}),nt?null:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(TextHighHZ,{metric:"calls",fontSize:14,offsetX:200,round:0,hasInstance:!0}),jsxRuntimeExports.jsx(TextHighHZ,{metric:"triangles",fontSize:14,offsetX:260,round:0,hasInstance:!0}),jsxRuntimeExports.jsx(TextHighHZ,{isMemory:!0,metric:"geometries",fontSize:14,offsetY:30,offsetX:0,round:0}),jsxRuntimeExports.jsx(TextHighHZ,{isMemory:!0,metric:"textures",fontSize:14,offsetY:30,offsetX:80,round:0}),jsxRuntimeExports.jsx(TextHighHZ,{isShadersInfo:!0,metric:"programs",fontSize:14,offsetY:30,offsetX:140,round:0}),jsxRuntimeExports.jsx(TextHighHZ,{metric:"lines",fontSize:14,offsetY:30,offsetX:200,round:0,hasInstance:!0}),jsxRuntimeExports.jsx(TextHighHZ,{metric:"points",fontSize:14,offsetY:30,offsetX:260,round:0,hasInstance:!0}),rt&&jsxRuntimeExports.jsx(TextHighHZ,{isPerf:!0,metric:"matriceCount",fontSize:14,offsetY:30,offsetX:320,round:0,hasInstance:!0})]}),et&&jsxRuntimeExports.jsx(TextHighHZ,{color:`rgb(${colorsGraph(tt).custom.toString()})`,customData:et,fontSize:14,offsetY:0,offsetX:nt?200:320,round:0})]}),ChartCurve=({colorBlind:tt,minimal:et,chart:nt={length:30,hz:15}})=>{const rt=reactExports.useMemo(()=>({fps:new Float32Array(nt.length*3),cpu:new Float32Array(nt.length*3),gpu:new Float32Array(nt.length*3)}),[nt]),it=reactExports.useRef(null),ot=reactExports.useRef(null),at=reactExports.useRef(null),st=reactExports.useRef(null),lt=reactExports.useMemo(()=>new Vector3(0,0,0),[]),ct=(ut,ht=1,dt,pt)=>{let mt=0;const{width:gt,height:yt}=pt,bt=usePerfStore.getState().chart.data[ut];if(!bt||bt.length===0)return;const vt=et?2:6,xt=et?12:50;let kt=bt.length;for(let St=0;Stmt&&(mt=bt[Tt]*ht),lt.set(vt+St/(kt-1)*(gt-vt*2)-gt/2,Math.min(100,bt[Tt])*ht/100*(yt-vt*2-xt)-yt/2,0),lt.toArray(dt.attributes.position.array,St*3))}dt.attributes.position.needsUpdate=!0};return useFrame(function({viewport:ht}){ct("fps",1,it.current,ht),ot.current&&ot.current.color.set(usePerfStore.getState().overclockingFps?colorsGraph(tt).overClock.toString():`rgb(${colorsGraph(tt).fps.toString()})`),ct("gpu",5,at.current,ht),ct("cpu",5,st.current,ht)}),jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs("line",{children:[jsxRuntimeExports.jsx("bufferGeometry",{ref:it,children:jsxRuntimeExports.jsx("bufferAttribute",{attach:"attributes-position",count:nt.length,array:rt.fps,itemSize:3,usage:DynamicDrawUsage,needsUpdate:!0})}),jsxRuntimeExports.jsx("lineBasicMaterial",{ref:ot,color:`rgb(${colorsGraph(tt).fps.toString()})`,transparent:!0,opacity:.5})]}),jsxRuntimeExports.jsxs("line",{children:[jsxRuntimeExports.jsx("bufferGeometry",{ref:at,children:jsxRuntimeExports.jsx("bufferAttribute",{attach:"attributes-position",count:nt.length,array:rt.gpu,itemSize:3,usage:DynamicDrawUsage,needsUpdate:!0})}),jsxRuntimeExports.jsx("lineBasicMaterial",{color:`rgb(${colorsGraph(tt).gpu.toString()})`,transparent:!0,opacity:.5})]}),jsxRuntimeExports.jsxs("line",{children:[jsxRuntimeExports.jsx("bufferGeometry",{ref:st,children:jsxRuntimeExports.jsx("bufferAttribute",{attach:"attributes-position",count:nt.length,array:rt.cpu,itemSize:3,usage:DynamicDrawUsage,needsUpdate:!0})}),jsxRuntimeExports.jsx("lineBasicMaterial",{color:`rgb(${colorsGraph(tt).cpu.toString()})`,transparent:!0,opacity:.5})]})]})},ChartUI=({colorBlind:tt,chart:et,customData:nt,matrixUpdate:rt,showGraph:it=!0,antialias:ot=!0,minimal:at})=>{const st=reactExports.useRef(void 0),lt=usePerfStore(ct=>ct.paused);return jsxRuntimeExports.jsxs(Graph$1,{style:{display:"flex",position:"absolute",height:`${at?37:it?100:60}px`,minWidth:`${at?"100px":nt?"370px":"310px"}`},children:[jsxRuntimeExports.jsx(Canvas$1,{ref:st,orthographic:!0,dpr:ot?[1,2]:1,gl:{antialias:!0,alpha:!0,stencil:!1,depth:!1},onCreated:({scene:ct})=>{ct.traverse(ut=>{ut.matrixWorldAutoUpdate=!1,ut.matrixAutoUpdate=!1})},flat:!0,style:{marginBottom:"-42px",position:"relative",pointerEvents:"none",background:"transparent !important",height:`${at?37:it?100:60}px`},children:lt?null:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Renderer,{}),jsxRuntimeExports.jsx(TextsHighHZ,{customData:nt,minimal:at,matrixUpdate:rt}),it&&jsxRuntimeExports.jsx(ChartCurve,{colorBlind:tt,minimal:at,chart:et})]})}),lt&&jsxRuntimeExports.jsxs(Graphpc,{children:[jsxRuntimeExports.jsx(PauseIcon,{})," PAUSED"]})]})},Renderer=()=>(useFrame(function({gl:et,scene:nt,camera:rt}){rt.updateMatrix(),matriceCount.value-=1,rt.matrixWorld.copy(rt.matrix),rt.matrixWorldInverse.copy(rt.matrixWorld).invert(),et.render(nt,rt),matriceWorldCount.value=0,matriceCount.value=0},1/0),null);function _objectWithoutPropertiesLoose$j(tt,et){if(tt==null)return{};var nt={},rt=Object.keys(tt),it,ot;for(ot=0;ot=0)&&(nt[it]=tt[it]);return nt}function _objectWithoutProperties$j(tt,et){if(tt==null)return{};var nt=_objectWithoutPropertiesLoose$j(tt,et),rt,it;if(Object.getOwnPropertySymbols){var ot=Object.getOwnPropertySymbols(tt);for(it=0;it=0)&&Object.prototype.propertyIsEnumerable.call(tt,rt)&&(nt[rt]=tt[rt])}return nt}const _excluded$G=["portal","className","children"],Html=reactExports.forwardRef((tt,et)=>{let{portal:nt,className:rt,children:it}=tt,ot=_objectWithoutProperties$j(tt,_excluded$G);const at=useThree(ut=>ut.gl),st=reactExports.useRef(null),lt=reactExports.useRef(null),ct=(nt==null?void 0:nt.current)!=null?nt.current:at.domElement.parentNode;return reactExports.useLayoutEffect(()=>{if(!st.current||!ct)return;const ut=document.createElement("div"),ht=lt.current=createRoot$1(ut);return ct.appendChild(ut),()=>{ht.unmount(),lt.current=null,ct.removeChild(ut)}},[ct]),reactExports.useLayoutEffect(()=>{const ut=lt.current;ut&&ut.render(jsxRuntimeExports.jsx("div",{ref:et,className:rt,children:it}))}),jsxRuntimeExports.jsx("group",_objectSpread2(_objectSpread2({},ot),{},{ref:st}))}),addTextureUniforms=(tt,et)=>{const nt=it=>{switch(it){case 1e3:return"RepeatWrapping";case 1001:return"ClampToEdgeWrapping";case 1002:return"MirroredRepeatWrapping";default:return"ClampToEdgeWrapping"}},rt=it=>{switch(it){case 3e3:return"LinearEncoding";case 3001:return"sRGBEncoding";case 3002:return"RGBEEncoding";case 3003:return"LogLuvEncoding";case 3004:return"RGBM7Encoding";case 3005:return"RGBM16Encoding";case 3006:return"RGBDEncoding";case 3007:return"GammaEncoding";default:return"ClampToEdgeWrapping"}};return{name:tt,url:et.image.currentSrc,encoding:rt(et.encoding),wrapT:nt(et.image.wrapT),flipY:et.flipY.toString()}},UniformsGL=({program:tt,material:et,setTexNumber:nt})=>{const rt=usePerfStore(at=>at.gl),[it,ot]=reactExports.useState(null);return reactExports.useEffect(()=>{if(rt){const at=tt==null?void 0:tt.getUniforms();let st=0;const lt=new Map;at.seq.forEach(ct=>{if(!ct.id.includes("uTroika")&&ct.id!=="isOrthographic"&&ct.id!=="uvTransform"&&ct.id!=="lightProbe"&&ct.id!=="projectionMatrix"&&ct.id!=="viewMatrix"&&ct.id!=="normalMatrix"&&ct.id!=="modelMatrix"&&ct.id!=="modelViewMatrix"){let ut=[],ht={name:ct.id};ct.cache&&(ct.cache.forEach(dt=>{typeof dt<"u"&&ut.push(dt.toString().substring(0,4))}),ht.value=ut.join(),et[ct.id]&&et[ct.id].image&&et[ct.id].image&&(st++,ht.value=addTextureUniforms(ct.id,et[ct.id])),ht.value||(ht.value="empty"),lt.set(ct.id,ht))}}),et.uniforms&&Object.keys(et.uniforms).forEach(ct=>{const ut=et.uniforms[ct];if(ut.value){const{value:ht}=ut;let dt={name:ct};if(ct.includes("uTroika"))return;if(ht instanceof Texture)st++,dt.value=addTextureUniforms(ct,ht);else{let pt=JSON.stringify(ht);try{pt=JSON.stringify(ht)}catch{pt=ht.toString()}dt.value=pt}lt.set(ct,dt)}}),st>0&&nt(st),ot(lt)}},[]),jsxRuntimeExports.jsx(ProgramsUL,{children:it&&Array.from(it.values()).map(at=>jsxRuntimeExports.jsx("span",{children:typeof at.value=="string"?jsxRuntimeExports.jsx("li",{children:jsxRuntimeExports.jsxs("span",{children:[at.name," :"," ",jsxRuntimeExports.jsxs("b",{children:[at.value.substring(0,30),at.value.length>30?"...":""]})]})}):jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx("li",{children:jsxRuntimeExports.jsxs("b",{children:[at.value.name,":"]})}),jsxRuntimeExports.jsxs("div",{children:[Object.keys(at.value).map(st=>st!=="name"?jsxRuntimeExports.jsx("div",{children:st==="url"?jsxRuntimeExports.jsx("a",{href:at.value[st],target:"_blank",children:jsxRuntimeExports.jsx("img",{src:at.value[st]})}):jsxRuntimeExports.jsxs("li",{children:[st,": ",jsxRuntimeExports.jsx("b",{children:at.value[st]})]})},st):null),jsxRuntimeExports.jsxs(ProgramConsole,{onClick:()=>{var st;console.info(et[at.value.name]||(et==null||(st=et.uniforms[at.value.name])===null||st===void 0?void 0:st.value))},children:["console.info(",at.value.name,");"]})]})]})},at.name))})},DynamicDrawCallInfo=({el:tt})=>{usePerfStore(rt=>rt.log);const et=usePerfStore(rt=>rt.gl),nt=rt=>{if(!et)return 0;const it=Math.round(rt.drawCounts.total/(et.info.render.triangles+et.info.render.lines+et.info.render.points)*100*10)/10;return isFinite(it)&&it||0};return jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:tt.drawCounts.total>0&&jsxRuntimeExports.jsxs(PerfI,{style:{height:"auto",width:"auto",margin:"0 4px"},children:[tt.drawCounts.type==="Triangle"?jsxRuntimeExports.jsx(VercelLogoIcon,{style:{top:"-1px"}}):jsxRuntimeExports.jsx(ActivityLogIcon,{style:{top:"-1px"}}),tt.drawCounts.total,jsxRuntimeExports.jsxs("small",{children:[tt.drawCounts.type,"s"]}),et&&jsxRuntimeExports.jsxs(PerfB,{style:{bottom:"-10px",width:"40px",fontWeight:"bold"},children:[tt.visible&&!tt.material.wireframe?nt(tt):0,"%"]})]})})},ProgramUI=({el:tt})=>{const[et,nt]=reactExports.useState(tt.visible),[rt,it]=reactExports.useState(tt.expand),[ot,at]=reactExports.useState(0),{meshes:st,program:lt,material:ct}=tt;return jsxRuntimeExports.jsxs(ProgramGeo,{children:[jsxRuntimeExports.jsxs(ProgramHeader,{onClick:()=>{tt.expand=!rt,Object.keys(st).forEach(ut=>{const ht=st[ut];ht.material.wireframe=!1}),it(!rt)},children:[jsxRuntimeExports.jsx(Toggle,{style:{marginRight:"6px"},children:rt?jsxRuntimeExports.jsx("span",{children:jsxRuntimeExports.jsx(TriangleDownIcon,{})}):jsxRuntimeExports.jsx("span",{children:jsxRuntimeExports.jsx(TriangleUpIcon,{})})}),lt&&jsxRuntimeExports.jsxs("span",{children:[jsxRuntimeExports.jsx(ProgramTitle,{children:lt.name}),jsxRuntimeExports.jsxs(PerfI,{style:{height:"auto",width:"auto",margin:"0 4px"},children:[jsxRuntimeExports.jsx(LayersIcon,{style:{top:"-1px"}}),Object.keys(st).length,jsxRuntimeExports.jsx("small",{children:Object.keys(st).length>1?"users":"user"})]}),ot>0&&jsxRuntimeExports.jsxs(PerfI,{style:{height:"auto",width:"auto",margin:"0 4px"},children:[ot>1?jsxRuntimeExports.jsx(ImageIcon,{style:{top:"-1px"}}):jsxRuntimeExports.jsx(ImageIcon,{style:{top:"-1px"}}),ot,jsxRuntimeExports.jsx("small",{children:"tex"})]}),jsxRuntimeExports.jsx(DynamicDrawCallInfo,{el:tt}),ct.glslVersion==="300 es"&&jsxRuntimeExports.jsxs(PerfI,{style:{height:"auto",width:"auto",margin:"0 4px"},children:[jsxRuntimeExports.jsx(RocketIcon,{style:{top:"-1px"}}),"300",jsxRuntimeExports.jsx("small",{children:"es"}),jsxRuntimeExports.jsx(PerfB,{style:{bottom:"-10px",width:"40px"},children:"glsl"})]})]}),jsxRuntimeExports.jsx(ToggleVisible,{onPointerEnter:()=>{Object.keys(st).forEach(ut=>{const ht=st[ut];ht.material.wireframe=!0})},onPointerLeave:()=>{Object.keys(st).forEach(ut=>{const ht=st[ut];ht.material.wireframe=!1})},onClick:ut=>{ut.stopPropagation(),Object.keys(st).forEach(ht=>{const dt=st[ht],pt=!et;dt.visible=pt,tt.visible=pt,nt(pt)})},children:et?jsxRuntimeExports.jsx(EyeOpenIcon,{}):jsxRuntimeExports.jsx(EyeNoneIcon,{})})]}),jsxRuntimeExports.jsxs("div",{style:{maxHeight:rt?"9999px":0,overflow:"hidden"},children:[jsxRuntimeExports.jsxs(ProgramsULHeader,{children:[jsxRuntimeExports.jsx(ButtonIcon,{})," Uniforms:"]}),jsxRuntimeExports.jsx(UniformsGL,{program:lt,material:ct,setTexNumber:at}),jsxRuntimeExports.jsxs(ProgramsULHeader,{children:[jsxRuntimeExports.jsx(CubeIcon,{})," Geometries:"]}),jsxRuntimeExports.jsx(ProgramsUL,{children:st&&Object.keys(st).map(ut=>st[ut]&&st[ut].geometry&&jsxRuntimeExports.jsxs(ProgramsGeoLi,{children:[jsxRuntimeExports.jsxs("span",{children:[st[ut].geometry.type,": "]}),st[ut].userData&&st[ut].userData.drawCount&&jsxRuntimeExports.jsxs("b",{children:[jsxRuntimeExports.jsxs("div",{children:[st[ut].userData.drawCount.count,jsxRuntimeExports.jsxs("small",{children:[" ",st[ut].userData.drawCount.type,"s"]})]}),jsxRuntimeExports.jsx("br",{}),jsxRuntimeExports.jsxs("div",{children:[Math.round(estimateBytesUsed(st[ut].geometry)/1024*1e3)/1e3,"Kb",jsxRuntimeExports.jsx("small",{children:" memory used"})]})]})]},ut))}),jsxRuntimeExports.jsxs(ProgramConsole,{onClick:()=>{console.info(ct)},children:["console.info(",ct.type,")"]})]})]})},ProgramsUI=()=>{usePerfStore(et=>et.triggerProgramsUpdate);const tt=usePerfStore(et=>et.programs);return jsxRuntimeExports.jsx(ProgramsContainer,{children:tt&&Array.from(tt.values()).map(et=>et&&et?jsxRuntimeExports.jsx(ProgramUI,{el:et},et.material.uuid):null)})},colorsGraph=tt=>({overClock:"#ff6eff",fps:tt?"100, 143, 255":"238,38,110",cpu:tt?"254, 254, 98":"66,226,46",gpu:tt?"254,254,254":"253,151,31",custom:tt?"86,180,233":"40,255,255"}),DynamicUIPerf=({showGraph:tt,colorBlind:et})=>{const nt=usePerfStore(it=>it.overclockingFps),rt=usePerfStore(it=>it.fpsLimit);return jsxRuntimeExports.jsxs(PerfB,{style:tt?{color:nt?colorsGraph(et).overClock.toString():`rgb(${colorsGraph(et).fps})`}:{},children:["FPS ",nt?`${rt}🚀`:""]})},DynamicUI=({showGraph:tt,colorBlind:et,customData:nt,minimal:rt})=>{const it=usePerfStore(ot=>ot.gl);return it?jsxRuntimeExports.jsxs(PerfIContainer,{children:[jsxRuntimeExports.jsxs(PerfI,{children:[jsxRuntimeExports.jsx(LightningBoltIcon,{}),jsxRuntimeExports.jsx(PerfB,{style:tt?{color:`rgb(${colorsGraph(et).gpu.toString()})`}:{},children:"GPU"}),jsxRuntimeExports.jsx(PerfSmallI,{children:"ms"})]}),jsxRuntimeExports.jsxs(PerfI,{children:[jsxRuntimeExports.jsx(RulerHorizontalIcon,{}),jsxRuntimeExports.jsx(PerfB,{style:tt?{color:`rgb(${colorsGraph(et).cpu.toString()})`}:{},children:"CPU"}),jsxRuntimeExports.jsx(PerfSmallI,{children:"ms"})]}),jsxRuntimeExports.jsxs(PerfI,{children:[jsxRuntimeExports.jsx(LapTimerIcon,{}),jsxRuntimeExports.jsx(DynamicUIPerf,{showGraph:tt,colorBlind:et})]}),!rt&&it&&jsxRuntimeExports.jsxs(PerfI,{children:[jsxRuntimeExports.jsx(TextAlignJustifyIcon,{}),jsxRuntimeExports.jsx(PerfB,{children:it.info.render.calls===1?"call":"calls"})]}),!rt&&it&&jsxRuntimeExports.jsxs(PerfI,{children:[jsxRuntimeExports.jsx(VercelLogoIcon,{}),jsxRuntimeExports.jsx(PerfB,{children:"Triangles"})]}),nt&&jsxRuntimeExports.jsxs(PerfI,{children:[jsxRuntimeExports.jsx(BarChartIcon,{}),jsxRuntimeExports.jsx(PerfB,{style:tt?{color:`rgb(${colorsGraph(et).custom})`}:{},children:nt.name}),nt.info&&jsxRuntimeExports.jsx(PerfSmallI,{children:nt.info})]})]}):null},PerfUI=({showGraph:tt,colorBlind:et,deepAnalyze:nt,customData:rt,matrixUpdate:it,openByDefault:ot,minimal:at})=>jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(DynamicUI,{showGraph:tt,colorBlind:et,customData:rt,minimal:at}),!at&&jsxRuntimeExports.jsx(PerfThree,{matrixUpdate:it,openByDefault:ot,deepAnalyze:nt,showGraph:tt})]}),InfoUI=({matrixUpdate:tt})=>jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsxs(PerfI,{children:[jsxRuntimeExports.jsx(MarginIcon,{}),jsxRuntimeExports.jsx(PerfB,{children:"Geometries"})]}),jsxRuntimeExports.jsxs(PerfI,{children:[jsxRuntimeExports.jsx(ImageIcon,{}),jsxRuntimeExports.jsx(PerfB,{children:"Textures"})]}),jsxRuntimeExports.jsxs(PerfI,{children:[jsxRuntimeExports.jsx(ActivityLogIcon,{}),jsxRuntimeExports.jsx(PerfB,{children:"shaders"})]}),jsxRuntimeExports.jsxs(PerfI,{children:[jsxRuntimeExports.jsx(MinusIcon,{}),jsxRuntimeExports.jsx(PerfB,{children:"Lines"})]}),jsxRuntimeExports.jsxs(PerfI,{children:[jsxRuntimeExports.jsx(DotIcon,{}),jsxRuntimeExports.jsx(PerfB,{children:"Points"})]}),tt&&jsxRuntimeExports.jsxs(PerfI,{children:[jsxRuntimeExports.jsx(DropdownMenuIcon,{}),jsxRuntimeExports.jsx(PerfB,{children:"Matrices"})]})]}),ToggleEl=({tab:tt,title:et,set:nt})=>{const rt=usePerfStore(it=>it.tab);return jsxRuntimeExports.jsx(Toggle,{className:`${rt===tt?" __perf_toggle_tab_active":""}`,onClick:()=>{nt(!0),usePerfStore.setState({tab:tt})},children:jsxRuntimeExports.jsx("span",{children:et})})},PerfThree=({openByDefault:tt,showGraph:et,deepAnalyze:nt,matrixUpdate:rt})=>{const[it,ot]=React$1.useState(tt);return jsxRuntimeExports.jsxs("span",{children:[jsxRuntimeExports.jsx(TabContainers,{show:it,showGraph:et,matrixUpdate:rt}),tt&&!nt?null:jsxRuntimeExports.jsxs(ToggleContainer,{className:"__perf_toggle",children:[nt&&jsxRuntimeExports.jsx(ToggleEl,{tab:"programs",title:"Programs",set:ot}),nt&&jsxRuntimeExports.jsx(ToggleEl,{tab:"infos",title:"Infos",set:ot}),jsxRuntimeExports.jsx(Toggle,{onClick:()=>{ot(!it)},children:it?jsxRuntimeExports.jsxs("span",{children:[jsxRuntimeExports.jsx(TriangleDownIcon,{})," Minimize"]}):jsxRuntimeExports.jsxs("span",{children:[jsxRuntimeExports.jsx(TriangleUpIcon,{})," More"]})})]})]})},TabContainers=({show:tt,showGraph:et,matrixUpdate:nt})=>{const rt=usePerfStore(it=>it.tab);return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(InfoUI,{matrixUpdate:nt}),tt&&jsxRuntimeExports.jsx("div",{children:jsxRuntimeExports.jsx(ContainerScroll,{style:{marginTop:et?"38px":0},children:rt==="programs"&&jsxRuntimeExports.jsx(ProgramsUI,{})})})]})},Gui=({showGraph:tt,colorBlind:et,openByDefault:nt,className:rt,overClock:it,style:ot,position:at,chart:st,deepAnalyze:lt,antialias:ct,customData:ut,matrixUpdate:ht,minimal:dt})=>{const pt=reactExports.useRef(null);return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Headless,{chart:st,overClock:it,deepAnalyze:lt,matrixUpdate:ht}),jsxRuntimeExports.jsx(Html,{transform:!1,children:jsxRuntimeExports.jsxs(PerfS,{className:(rt?" ".concat(rt):" ")+` ${at||""} ${dt?"minimal":""}`,style:_objectSpread2({minHeight:dt?"37px":tt?"100px":"60px"},ot),ref:pt,children:[jsxRuntimeExports.jsx(ChartUI,{perfContainerRef:pt,colorBlind:et,chart:st,showGraph:tt,antialias:ct,customData:ut,minimal:dt,matrixUpdate:ht}),jsxRuntimeExports.jsx(PerfUI,{colorBlind:et,showGraph:tt,deepAnalyze:lt,openByDefault:nt,customData:ut,matrixUpdate:ht,minimal:dt})]})})]})},Perf=({headless:tt=!1,colorBlind:et=!1,overClock:nt=!1,showGraph:rt=!0,trackCPU:it=!1,deepAnalyze:ot=!1,antialias:at=!0,openByDefault:st=!0,customData:lt,matrixUpdate:ct=!1,position:ut="top-right",chart:ht={length:30,hz:15},className:dt,style:pt,minimal:mt=!1})=>tt?jsxRuntimeExports.jsx(Headless,{chart:ht,deepAnalyze:ot,matrixUpdate:ct,overClock:nt}):jsxRuntimeExports.jsx(Gui,{colorBlind:et,showGraph:rt,trackCPU:it,openByDefault:st,className:dt,style:pt,overClock:nt,position:ut,antialias:at,chart:ht,deepAnalyze:ot,minimal:mt,customData:lt,matrixUpdate:ct}),UNIVERSE_SCALE=5e3,DATA_COLOR_PALETTE={show:"#FF723C",clip:"#FFFF00",episode:"#FF7F50",guest:"#E066FF",topic:"#F8F8FF"},getNodeColorByType=(tt,et)=>{const nt=DATA_COLOR_PALETTE[tt]||"#F8F8FF";return et?nt:parseInt(nt.replace("#","0x"),16)},defaultData$5={isUserDragging:!1,isUserScrolling:!1,userMovedCamera:!1,isUserScrollingOnHtmlPanel:!1},useControlStore=react(tt=>({...defaultData$5,setIsUserDragging:et=>tt({isUserDragging:et}),setIsUserScrolling:et=>tt({isUserScrolling:et}),setUserMovedCamera:et=>tt({userMovedCamera:et}),setIsUserScrollingOnHtmlPanel:et=>tt({isUserScrollingOnHtmlPanel:et})}));function _assertThisInitialized$c(tt){if(tt===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return tt}function _inheritsLoose(tt,et){tt.prototype=Object.create(et.prototype),tt.prototype.constructor=tt,tt.__proto__=et}/*! - * GSAP 3.12.2 - * https://greensock.com - * - * @license Copyright 2008-2023, GreenSock. All rights reserved. - * Subject to the terms at https://greensock.com/standard-license or for - * Club GreenSock members, the agreement issued with that membership. - * @author: Jack Doyle, jack@greensock.com -*/var _config={autoSleep:120,force3D:"auto",nullTargetWarn:1,units:{lineHeight:""}},_defaults={duration:.5,overwrite:!1,delay:0},_suppressOverwrites,_reverting$1,_context,_bigNum$1=1e8,_tinyNum=1/_bigNum$1,_2PI=Math.PI*2,_HALF_PI=_2PI/4,_gsID=0,_sqrt=Math.sqrt,_cos=Math.cos,_sin=Math.sin,_isString$1=function(et){return typeof et=="string"},_isFunction=function(et){return typeof et=="function"},_isNumber$1=function(et){return typeof et=="number"},_isUndefined=function(et){return typeof et>"u"},_isObject=function(et){return typeof et=="object"},_isNotFalse=function(et){return et!==!1},_windowExists$1=function(){return typeof window<"u"},_isFuncOrString=function(et){return _isFunction(et)||_isString$1(et)},_isTypedArray=typeof ArrayBuffer=="function"&&ArrayBuffer.isView||function(){},_isArray=Array.isArray,_strictNumExp=/(?:-?\.?\d|\.)+/gi,_numExp=/[-+=.]*\d+[.e\-+]*\d*[e\-+]*\d*/g,_numWithUnitExp=/[-+=.]*\d+[.e-]*\d*[a-z%]*/g,_complexStringNumExp=/[-+=.]*\d+\.?\d*(?:e-|e\+)?\d*/gi,_relExp=/[+-]=-?[.\d]+/,_delimitedValueExp=/[^,'"\[\]\s]+/gi,_unitExp=/^[+\-=e\s\d]*\d+[.\d]*([a-z]*|%)\s*$/i,_globalTimeline,_win$1,_coreInitted,_doc$1,_globals={},_installScope={},_coreReady,_install=function(et){return(_installScope=_merge(et,_globals))&&gsap},_missingPlugin=function(et,nt){return console.warn("Invalid property",et,"set to",nt,"Missing plugin? gsap.registerPlugin()")},_warn=function(et,nt){return!nt&&console.warn(et)},_addGlobal=function(et,nt){return et&&(_globals[et]=nt)&&_installScope&&(_installScope[et]=nt)||_globals},_emptyFunc=function(){return 0},_startAtRevertConfig={suppressEvents:!0,isStart:!0,kill:!1},_revertConfigNoKill={suppressEvents:!0,kill:!1},_revertConfig={suppressEvents:!0},_reservedProps={},_lazyTweens=[],_lazyLookup={},_lastRenderedFrame,_plugins={},_effects={},_nextGCFrame=30,_harnessPlugins=[],_callbackNames="",_harness=function(et){var nt=et[0],rt,it;if(_isObject(nt)||_isFunction(nt)||(et=[et]),!(rt=(nt._gsap||{}).harness)){for(it=_harnessPlugins.length;it--&&!_harnessPlugins[it].targetTest(nt););rt=_harnessPlugins[it]}for(it=et.length;it--;)et[it]&&(et[it]._gsap||(et[it]._gsap=new GSCache(et[it],rt)))||et.splice(it,1);return et},_getCache=function(et){return et._gsap||_harness(toArray$3(et))[0]._gsap},_getProperty=function(et,nt,rt){return(rt=et[nt])&&_isFunction(rt)?et[nt]():_isUndefined(rt)&&et.getAttribute&&et.getAttribute(nt)||rt},_forEachName=function(et,nt){return(et=et.split(",")).forEach(nt)||et},_round=function(et){return Math.round(et*1e5)/1e5||0},_roundPrecise=function(et){return Math.round(et*1e7)/1e7||0},_parseRelative=function(et,nt){var rt=nt.charAt(0),it=parseFloat(nt.substr(2));return et=parseFloat(et),rt==="+"?et+it:rt==="-"?et-it:rt==="*"?et*it:et/it},_arrayContainsAny=function(et,nt){for(var rt=nt.length,it=0;et.indexOf(nt[it])<0&&++itst;)at=at._prev;return at?(nt._next=at._next,at._next=nt):(nt._next=et[rt],et[rt]=nt),nt._next?nt._next._prev=nt:et[it]=nt,nt._prev=at,nt.parent=nt._dp=et,nt},_removeLinkedListItem=function(et,nt,rt,it){rt===void 0&&(rt="_first"),it===void 0&&(it="_last");var ot=nt._prev,at=nt._next;ot?ot._next=at:et[rt]===nt&&(et[rt]=at),at?at._prev=ot:et[it]===nt&&(et[it]=ot),nt._next=nt._prev=nt.parent=null},_removeFromParent=function(et,nt){et.parent&&(!nt||et.parent.autoRemoveChildren)&&et.parent.remove&&et.parent.remove(et),et._act=0},_uncache=function(et,nt){if(et&&(!nt||nt._end>et._dur||nt._start<0))for(var rt=et;rt;)rt._dirty=1,rt=rt.parent;return et},_recacheAncestors=function(et){for(var nt=et.parent;nt&&nt.parent;)nt._dirty=1,nt.totalDuration(),nt=nt.parent;return et},_rewindStartAt=function(et,nt,rt,it){return et._startAt&&(_reverting$1?et._startAt.revert(_revertConfigNoKill):et.vars.immediateRender&&!et.vars.autoRevert||et._startAt.render(nt,!0,it))},_hasNoPausedAncestors=function tt(et){return!et||et._ts&&tt(et.parent)},_elapsedCycleDuration=function(et){return et._repeat?_animationCycle(et._tTime,et=et.duration()+et._rDelay)*et:0},_animationCycle=function(et,nt){var rt=Math.floor(et/=nt);return et&&rt===et?rt-1:rt},_parentToChildTotalTime=function(et,nt){return(et-nt._start)*nt._ts+(nt._ts>=0?0:nt._dirty?nt.totalDuration():nt._tDur)},_setEnd=function(et){return et._end=_roundPrecise(et._start+(et._tDur/Math.abs(et._ts||et._rts||_tinyNum)||0))},_alignPlayhead=function(et,nt){var rt=et._dp;return rt&&rt.smoothChildTiming&&et._ts&&(et._start=_roundPrecise(rt._time-(et._ts>0?nt/et._ts:((et._dirty?et.totalDuration():et._tDur)-nt)/-et._ts)),_setEnd(et),rt._dirty||_uncache(rt,et)),et},_postAddChecks=function(et,nt){var rt;if((nt._time||!nt._dur&&nt._initted||nt._start_tinyNum)&&nt.render(rt,!0)),_uncache(et,nt)._dp&&et._initted&&et._time>=et._dur&&et._ts){if(et._dur=0&&rt.totalTime(rt._tTime),rt=rt._dp;et._zTime=-_tinyNum}},_addToTimeline=function(et,nt,rt,it){return nt.parent&&_removeFromParent(nt),nt._start=_roundPrecise((_isNumber$1(rt)?rt:rt||et!==_globalTimeline?_parsePosition(et,rt,nt):et._time)+nt._delay),nt._end=_roundPrecise(nt._start+(nt.totalDuration()/Math.abs(nt.timeScale())||0)),_addLinkedListItem(et,nt,"_first","_last",et._sort?"_start":0),_isFromOrFromStart(nt)||(et._recent=nt),it||_postAddChecks(et,nt),et._ts<0&&_alignPlayhead(et,et._tTime),et},_scrollTrigger=function(et,nt){return(_globals.ScrollTrigger||_missingPlugin("scrollTrigger",nt))&&_globals.ScrollTrigger.create(nt,et)},_attemptInitTween=function(et,nt,rt,it,ot){if(_initTween(et,nt,ot),!et._initted)return 1;if(!rt&&et._pt&&!_reverting$1&&(et._dur&&et.vars.lazy!==!1||!et._dur&&et.vars.lazy)&&_lastRenderedFrame!==_ticker.frame)return _lazyTweens.push(et),et._lazy=[ot,it],1},_parentPlayheadIsBeforeStart=function tt(et){var nt=et.parent;return nt&&nt._ts&&nt._initted&&!nt._lock&&(nt.rawTime()<0||tt(nt))},_isFromOrFromStart=function(et){var nt=et.data;return nt==="isFromStart"||nt==="isStart"},_renderZeroDurationTween=function(et,nt,rt,it){var ot=et.ratio,at=nt<0||!nt&&(!et._start&&_parentPlayheadIsBeforeStart(et)&&!(!et._initted&&_isFromOrFromStart(et))||(et._ts<0||et._dp._ts<0)&&!_isFromOrFromStart(et))?0:1,st=et._rDelay,lt=0,ct,ut,ht;if(st&&et._repeat&&(lt=_clamp(0,et._tDur,nt),ut=_animationCycle(lt,st),et._yoyo&&ut&1&&(at=1-at),ut!==_animationCycle(et._tTime,st)&&(ot=1-at,et.vars.repeatRefresh&&et._initted&&et.invalidate())),at!==ot||_reverting$1||it||et._zTime===_tinyNum||!nt&&et._zTime){if(!et._initted&&_attemptInitTween(et,nt,it,rt,lt))return;for(ht=et._zTime,et._zTime=nt||(rt?_tinyNum:0),rt||(rt=nt&&!ht),et.ratio=at,et._from&&(at=1-at),et._time=0,et._tTime=lt,ct=et._pt;ct;)ct.r(at,ct.d),ct=ct._next;nt<0&&_rewindStartAt(et,nt,rt,!0),et._onUpdate&&!rt&&_callback(et,"onUpdate"),lt&&et._repeat&&!rt&&et.parent&&_callback(et,"onRepeat"),(nt>=et._tDur||nt<0)&&et.ratio===at&&(at&&_removeFromParent(et,1),!rt&&!_reverting$1&&(_callback(et,at?"onComplete":"onReverseComplete",!0),et._prom&&et._prom()))}else et._zTime||(et._zTime=nt)},_findNextPauseTween=function(et,nt,rt){var it;if(rt>nt)for(it=et._first;it&&it._start<=rt;){if(it.data==="isPause"&&it._start>nt)return it;it=it._next}else for(it=et._last;it&&it._start>=rt;){if(it.data==="isPause"&&it._start0&&!it&&_alignPlayhead(et,et._tTime=et._tDur*st),et.parent&&_setEnd(et),rt||_uncache(et.parent,et),et},_onUpdateTotalDuration=function(et){return et instanceof Timeline$1?_uncache(et):_setDuration(et,et._dur)},_zeroPosition={_start:0,endTime:_emptyFunc,totalDuration:_emptyFunc},_parsePosition=function tt(et,nt,rt){var it=et.labels,ot=et._recent||_zeroPosition,at=et.duration()>=_bigNum$1?ot.endTime(!1):et._dur,st,lt,ct;return _isString$1(nt)&&(isNaN(nt)||nt in it)?(lt=nt.charAt(0),ct=nt.substr(-1)==="%",st=nt.indexOf("="),lt==="<"||lt===">"?(st>=0&&(nt=nt.replace(/=/,"")),(lt==="<"?ot._start:ot.endTime(ot._repeat>=0))+(parseFloat(nt.substr(1))||0)*(ct?(st<0?ot:rt).totalDuration()/100:1)):st<0?(nt in it||(it[nt]=at),it[nt]):(lt=parseFloat(nt.charAt(st-1)+nt.substr(st+1)),ct&&rt&&(lt=lt/100*(_isArray(rt)?rt[0]:rt).totalDuration()),st>1?tt(et,nt.substr(0,st-1),rt)+lt:at+lt)):nt==null?at:+nt},_createTweenType=function(et,nt,rt){var it=_isNumber$1(nt[1]),ot=(it?2:1)+(et<2?0:1),at=nt[ot],st,lt;if(it&&(at.duration=nt[1]),at.parent=rt,et){for(st=at,lt=rt;lt&&!("immediateRender"in st);)st=lt.vars.defaults||{},lt=_isNotFalse(lt.vars.inherit)&<.parent;at.immediateRender=_isNotFalse(st.immediateRender),et<2?at.runBackwards=1:at.startAt=nt[ot-1]}return new Tween(nt[0],at,nt[ot+1])},_conditionalReturn=function(et,nt){return et||et===0?nt(et):nt},_clamp=function(et,nt,rt){return rtnt?nt:rt},getUnit=function(et,nt){return!_isString$1(et)||!(nt=_unitExp.exec(et))?"":nt[1]},clamp$2=function(et,nt,rt){return _conditionalReturn(rt,function(it){return _clamp(et,nt,it)})},_slice=[].slice,_isArrayLike=function(et,nt){return et&&_isObject(et)&&"length"in et&&(!nt&&!et.length||et.length-1 in et&&_isObject(et[0]))&&!et.nodeType&&et!==_win$1},_flatten=function(et,nt,rt){return rt===void 0&&(rt=[]),et.forEach(function(it){var ot;return _isString$1(it)&&!nt||_isArrayLike(it,1)?(ot=rt).push.apply(ot,toArray$3(it)):rt.push(it)})||rt},toArray$3=function(et,nt,rt){return _context&&!nt&&_context.selector?_context.selector(et):_isString$1(et)&&!rt&&(_coreInitted||!_wake())?_slice.call((nt||_doc$1).querySelectorAll(et),0):_isArray(et)?_flatten(et,rt):_isArrayLike(et)?_slice.call(et,0):et?[et]:[]},selector$1=function(et){return et=toArray$3(et)[0]||_warn("Invalid scope")||{},function(nt){var rt=et.current||et.nativeElement||et;return toArray$3(nt,rt.querySelectorAll?rt:rt===et?_warn("Invalid scope")||_doc$1.createElement("div"):et)}},shuffle=function(et){return et.sort(function(){return .5-Math.random()})},distribute=function(et){if(_isFunction(et))return et;var nt=_isObject(et)?et:{each:et},rt=_parseEase(nt.ease),it=nt.from||0,ot=parseFloat(nt.base)||0,at={},st=it>0&&it<1,lt=isNaN(it)||st,ct=nt.axis,ut=it,ht=it;return _isString$1(it)?ut=ht={center:.5,edges:.5,end:1}[it]||0:!st&<&&(ut=it[0],ht=it[1]),function(dt,pt,mt){var gt=(mt||nt).length,yt=at[gt],bt,vt,xt,kt,St,Tt,At,Et,$t;if(!yt){if($t=nt.grid==="auto"?0:(nt.grid||[1,_bigNum$1])[1],!$t){for(At=-_bigNum$1;At<(At=mt[$t++].getBoundingClientRect().left)&&$tAt&&(At=St),Stgt?gt-1:ct?ct==="y"?gt/$t:$t:Math.max($t,gt/$t))||0)*(it==="edges"?-1:1),yt.b=gt<0?ot-gt:ot,yt.u=getUnit(nt.amount||nt.each)||0,rt=rt&><0?_invertEase(rt):rt}return gt=(yt[dt]-yt.min)/yt.max||0,_roundPrecise(yt.b+(rt?rt(gt):gt)*yt.v)+yt.u}},_roundModifier=function(et){var nt=Math.pow(10,((et+"").split(".")[1]||"").length);return function(rt){var it=_roundPrecise(Math.round(parseFloat(rt)/et)*et*nt);return(it-it%1)/nt+(_isNumber$1(rt)?0:getUnit(rt))}},snap=function(et,nt){var rt=_isArray(et),it,ot;return!rt&&_isObject(et)&&(it=rt=et.radius||_bigNum$1,et.values?(et=toArray$3(et.values),(ot=!_isNumber$1(et[0]))&&(it*=it)):et=_roundModifier(et.increment)),_conditionalReturn(nt,rt?_isFunction(et)?function(at){return ot=et(at),Math.abs(ot-at)<=it?ot:at}:function(at){for(var st=parseFloat(ot?at.x:at),lt=parseFloat(ot?at.y:0),ct=_bigNum$1,ut=0,ht=et.length,dt,pt;ht--;)ot?(dt=et[ht].x-st,pt=et[ht].y-lt,dt=dt*dt+pt*pt):dt=Math.abs(et[ht]-st),dtit?ot-at:at)})},_replaceRandom=function(et){for(var nt=0,rt="",it,ot,at,st;~(it=et.indexOf("random(",nt));)at=et.indexOf(")",it),st=et.charAt(it+7)==="[",ot=et.substr(it+7,at-it-7).match(st?_delimitedValueExp:_strictNumExp),rt+=et.substr(nt,it-nt)+random(st?ot:+ot[0],st?0:+ot[1],+ot[2]||1e-5),nt=at+1;return rt+et.substr(nt,et.length-nt)},mapRange=function(et,nt,rt,it,ot){var at=nt-et,st=it-rt;return _conditionalReturn(ot,function(lt){return rt+((lt-et)/at*st||0)})},interpolate$2=function tt(et,nt,rt,it){var ot=isNaN(et+nt)?0:function(pt){return(1-pt)*et+pt*nt};if(!ot){var at=_isString$1(et),st={},lt,ct,ut,ht,dt;if(rt===!0&&(it=1)&&(rt=null),at)et={p:et},nt={p:nt};else if(_isArray(et)&&!_isArray(nt)){for(ut=[],ht=et.length,dt=ht-2,ct=1;ct(st=Math.abs(st))&&(lt=at,ot=st);return lt},_callback=function(et,nt,rt){var it=et.vars,ot=it[nt],at=_context,st=et._ctx,lt,ct,ut;if(ot)return lt=it[nt+"Params"],ct=it.callbackScope||et,rt&&_lazyTweens.length&&_lazyRender(),st&&(_context=st),ut=lt?ot.apply(ct,lt):ot.call(ct),_context=at,ut},_interrupt=function(et){return _removeFromParent(et),et.scrollTrigger&&et.scrollTrigger.kill(!!_reverting$1),et.progress()<1&&_callback(et,"onInterrupt"),et},_quickTween,_registerPluginQueue=[],_createPlugin=function(et){if(_windowExists$1()&&et){et=!et.name&&et.default||et;var nt=et.name,rt=_isFunction(et),it=nt&&!rt&&et.init?function(){this._props=[]}:et,ot={init:_emptyFunc,render:_renderPropTweens,add:_addPropTween,kill:_killPropTweensOf,modifier:_addPluginModifier,rawVars:0},at={targetTest:0,get:0,getSetter:_getSetter,aliases:{},register:0};if(_wake(),et!==it){if(_plugins[nt])return;_setDefaults(it,_setDefaults(_copyExcluding(et,ot),at)),_merge(it.prototype,_merge(ot,_copyExcluding(et,at))),_plugins[it.prop=nt]=it,et.targetTest&&(_harnessPlugins.push(it),_reservedProps[nt]=1),nt=(nt==="css"?"CSS":nt.charAt(0).toUpperCase()+nt.substr(1))+"Plugin"}_addGlobal(nt,it),et.register&&et.register(gsap,it,PropTween)}else et&&_registerPluginQueue.push(et)},_255=255,_colorLookup={aqua:[0,_255,_255],lime:[0,_255,0],silver:[192,192,192],black:[0,0,0],maroon:[128,0,0],teal:[0,128,128],blue:[0,0,_255],navy:[0,0,128],white:[_255,_255,_255],olive:[128,128,0],yellow:[_255,_255,0],orange:[_255,165,0],gray:[128,128,128],purple:[128,0,128],green:[0,128,0],red:[_255,0,0],pink:[_255,192,203],cyan:[0,_255,_255],transparent:[_255,_255,_255,0]},_hue=function(et,nt,rt){return et+=et<0?1:et>1?-1:0,(et*6<1?nt+(rt-nt)*et*6:et<.5?rt:et*3<2?nt+(rt-nt)*(2/3-et)*6:nt)*_255+.5|0},splitColor=function(et,nt,rt){var it=et?_isNumber$1(et)?[et>>16,et>>8&_255,et&_255]:0:_colorLookup.black,ot,at,st,lt,ct,ut,ht,dt,pt,mt;if(!it){if(et.substr(-1)===","&&(et=et.substr(0,et.length-1)),_colorLookup[et])it=_colorLookup[et];else if(et.charAt(0)==="#"){if(et.length<6&&(ot=et.charAt(1),at=et.charAt(2),st=et.charAt(3),et="#"+ot+ot+at+at+st+st+(et.length===5?et.charAt(4)+et.charAt(4):"")),et.length===9)return it=parseInt(et.substr(1,6),16),[it>>16,it>>8&_255,it&_255,parseInt(et.substr(7),16)/255];et=parseInt(et.substr(1),16),it=[et>>16,et>>8&_255,et&_255]}else if(et.substr(0,3)==="hsl"){if(it=mt=et.match(_strictNumExp),!nt)lt=+it[0]%360/360,ct=+it[1]/100,ut=+it[2]/100,at=ut<=.5?ut*(ct+1):ut+ct-ut*ct,ot=ut*2-at,it.length>3&&(it[3]*=1),it[0]=_hue(lt+1/3,ot,at),it[1]=_hue(lt,ot,at),it[2]=_hue(lt-1/3,ot,at);else if(~et.indexOf("="))return it=et.match(_numExp),rt&&it.length<4&&(it[3]=1),it}else it=et.match(_strictNumExp)||_colorLookup.transparent;it=it.map(Number)}return nt&&!mt&&(ot=it[0]/_255,at=it[1]/_255,st=it[2]/_255,ht=Math.max(ot,at,st),dt=Math.min(ot,at,st),ut=(ht+dt)/2,ht===dt?lt=ct=0:(pt=ht-dt,ct=ut>.5?pt/(2-ht-dt):pt/(ht+dt),lt=ht===ot?(at-st)/pt+(atet&&(rt+=bt-nt),it+=bt,St=it-rt,xt=St-at,(xt>0||vt)&&(Tt=++ht.frame,dt=St-ht.time*1e3,ht.time=St=St/1e3,at+=xt+(xt>=ot?4:ot-xt),kt=1),vt||(lt=ct(gt)),kt)for(pt=0;pt=bt&&pt--},_listeners:st},ht}(),_wake=function(){return!_tickerActive&&_ticker.wake()},_easeMap={},_customEaseExp=/^[\d.\-M][\d.\-,\s]/,_quotesExp=/["']/g,_parseObjectInString=function(et){for(var nt={},rt=et.substr(1,et.length-3).split(":"),it=rt[0],ot=1,at=rt.length,st,lt,ct;ot1&&rt.config?rt.config.apply(null,~et.indexOf("{")?[_parseObjectInString(nt[1])]:_valueInParentheses(et).split(",").map(_numericIfPossible)):_easeMap._CE&&_customEaseExp.test(et)?_easeMap._CE("",et):rt},_invertEase=function(et){return function(nt){return 1-et(1-nt)}},_propagateYoyoEase=function tt(et,nt){for(var rt=et._first,it;rt;)rt instanceof Timeline$1?tt(rt,nt):rt.vars.yoyoEase&&(!rt._yoyo||!rt._repeat)&&rt._yoyo!==nt&&(rt.timeline?tt(rt.timeline,nt):(it=rt._ease,rt._ease=rt._yEase,rt._yEase=it,rt._yoyo=nt)),rt=rt._next},_parseEase=function(et,nt){return et&&(_isFunction(et)?et:_easeMap[et]||_configEaseFromString(et))||nt},_insertEase=function(et,nt,rt,it){rt===void 0&&(rt=function(lt){return 1-nt(1-lt)}),it===void 0&&(it=function(lt){return lt<.5?nt(lt*2)/2:1-nt((1-lt)*2)/2});var ot={easeIn:nt,easeOut:rt,easeInOut:it},at;return _forEachName(et,function(st){_easeMap[st]=_globals[st]=ot,_easeMap[at=st.toLowerCase()]=rt;for(var lt in ot)_easeMap[at+(lt==="easeIn"?".in":lt==="easeOut"?".out":".inOut")]=_easeMap[st+"."+lt]=ot[lt]}),ot},_easeInOutFromOut=function(et){return function(nt){return nt<.5?(1-et(1-nt*2))/2:.5+et((nt-.5)*2)/2}},_configElastic=function tt(et,nt,rt){var it=nt>=1?nt:1,ot=(rt||(et?.3:.45))/(nt<1?nt:1),at=ot/_2PI*(Math.asin(1/it)||0),st=function(ut){return ut===1?1:it*Math.pow(2,-10*ut)*_sin((ut-at)*ot)+1},lt=et==="out"?st:et==="in"?function(ct){return 1-st(1-ct)}:_easeInOutFromOut(st);return ot=_2PI/ot,lt.config=function(ct,ut){return tt(et,ct,ut)},lt},_configBack=function tt(et,nt){nt===void 0&&(nt=1.70158);var rt=function(at){return at?--at*at*((nt+1)*at+nt)+1:0},it=et==="out"?rt:et==="in"?function(ot){return 1-rt(1-ot)}:_easeInOutFromOut(rt);return it.config=function(ot){return tt(et,ot)},it};_forEachName("Linear,Quad,Cubic,Quart,Quint,Strong",function(tt,et){var nt=et<5?et+1:et;_insertEase(tt+",Power"+(nt-1),et?function(rt){return Math.pow(rt,nt)}:function(rt){return rt},function(rt){return 1-Math.pow(1-rt,nt)},function(rt){return rt<.5?Math.pow(rt*2,nt)/2:1-Math.pow((1-rt)*2,nt)/2})});_easeMap.Linear.easeNone=_easeMap.none=_easeMap.Linear.easeIn;_insertEase("Elastic",_configElastic("in"),_configElastic("out"),_configElastic());(function(tt,et){var nt=1/et,rt=2*nt,it=2.5*nt,ot=function(st){return st0?rt+(rt+this._rDelay)*this._repeat:rt):this.totalDuration()&&this._dur},et.totalDuration=function(rt){return arguments.length?(this._dirty=0,_setDuration(this,this._repeat<0?rt:(rt-this._repeat*this._rDelay)/(this._repeat+1))):this._tDur},et.totalTime=function(rt,it){if(_wake(),!arguments.length)return this._tTime;var ot=this._dp;if(ot&&ot.smoothChildTiming&&this._ts){for(_alignPlayhead(this,rt),!ot._dp||ot.parent||_postAddChecks(ot,this);ot&&ot.parent;)ot.parent._time!==ot._start+(ot._ts>=0?ot._tTime/ot._ts:(ot.totalDuration()-ot._tTime)/-ot._ts)&&ot.totalTime(ot._tTime,!0),ot=ot.parent;!this.parent&&this._dp.autoRemoveChildren&&(this._ts>0&&rt0||!this._tDur&&!rt)&&_addToTimeline(this._dp,this,this._start-this._delay)}return(this._tTime!==rt||!this._dur&&!it||this._initted&&Math.abs(this._zTime)===_tinyNum||!rt&&!this._initted&&(this.add||this._ptLookup))&&(this._ts||(this._pTime=rt),_lazySafeRender(this,rt,it)),this},et.time=function(rt,it){return arguments.length?this.totalTime(Math.min(this.totalDuration(),rt+_elapsedCycleDuration(this))%(this._dur+this._rDelay)||(rt?this._dur:0),it):this._time},et.totalProgress=function(rt,it){return arguments.length?this.totalTime(this.totalDuration()*rt,it):this.totalDuration()?Math.min(1,this._tTime/this._tDur):this.ratio},et.progress=function(rt,it){return arguments.length?this.totalTime(this.duration()*(this._yoyo&&!(this.iteration()&1)?1-rt:rt)+_elapsedCycleDuration(this),it):this.duration()?Math.min(1,this._time/this._dur):this.ratio},et.iteration=function(rt,it){var ot=this.duration()+this._rDelay;return arguments.length?this.totalTime(this._time+(rt-1)*ot,it):this._repeat?_animationCycle(this._tTime,ot)+1:1},et.timeScale=function(rt){if(!arguments.length)return this._rts===-_tinyNum?0:this._rts;if(this._rts===rt)return this;var it=this.parent&&this._ts?_parentToChildTotalTime(this.parent._time,this):this._tTime;return this._rts=+rt||0,this._ts=this._ps||rt===-_tinyNum?0:this._rts,this.totalTime(_clamp(-Math.abs(this._delay),this._tDur,it),!0),_setEnd(this),_recacheAncestors(this)},et.paused=function(rt){return arguments.length?(this._ps!==rt&&(this._ps=rt,rt?(this._pTime=this._tTime||Math.max(-this._delay,this.rawTime()),this._ts=this._act=0):(_wake(),this._ts=this._rts,this.totalTime(this.parent&&!this.parent.smoothChildTiming?this.rawTime():this._tTime||this._pTime,this.progress()===1&&Math.abs(this._zTime)!==_tinyNum&&(this._tTime-=_tinyNum)))),this):this._ps},et.startTime=function(rt){if(arguments.length){this._start=rt;var it=this.parent||this._dp;return it&&(it._sort||!this.parent)&&_addToTimeline(it,this,rt-this._delay),this}return this._start},et.endTime=function(rt){return this._start+(_isNotFalse(rt)?this.totalDuration():this.duration())/Math.abs(this._ts||1)},et.rawTime=function(rt){var it=this.parent||this._dp;return it?rt&&(!this._ts||this._repeat&&this._time&&this.totalProgress()<1)?this._tTime%(this._dur+this._rDelay):this._ts?_parentToChildTotalTime(it.rawTime(rt),this):this._tTime:this._tTime},et.revert=function(rt){rt===void 0&&(rt=_revertConfig);var it=_reverting$1;return _reverting$1=rt,(this._initted||this._startAt)&&(this.timeline&&this.timeline.revert(rt),this.totalTime(-.01,rt.suppressEvents)),this.data!=="nested"&&rt.kill!==!1&&this.kill(),_reverting$1=it,this},et.globalTime=function(rt){for(var it=this,ot=arguments.length?rt:it.rawTime();it;)ot=it._start+ot/(it._ts||1),it=it._dp;return!this.parent&&this._sat?this._sat.vars.immediateRender?-1/0:this._sat.globalTime(rt):ot},et.repeat=function(rt){return arguments.length?(this._repeat=rt===1/0?-2:rt,_onUpdateTotalDuration(this)):this._repeat===-2?1/0:this._repeat},et.repeatDelay=function(rt){if(arguments.length){var it=this._time;return this._rDelay=rt,_onUpdateTotalDuration(this),it?this.time(it):this}return this._rDelay},et.yoyo=function(rt){return arguments.length?(this._yoyo=rt,this):this._yoyo},et.seek=function(rt,it){return this.totalTime(_parsePosition(this,rt),_isNotFalse(it))},et.restart=function(rt,it){return this.play().totalTime(rt?-this._delay:0,_isNotFalse(it))},et.play=function(rt,it){return rt!=null&&this.seek(rt,it),this.reversed(!1).paused(!1)},et.reverse=function(rt,it){return rt!=null&&this.seek(rt||this.totalDuration(),it),this.reversed(!0).paused(!1)},et.pause=function(rt,it){return rt!=null&&this.seek(rt,it),this.paused(!0)},et.resume=function(){return this.paused(!1)},et.reversed=function(rt){return arguments.length?(!!rt!==this.reversed()&&this.timeScale(-this._rts||(rt?-_tinyNum:0)),this):this._rts<0},et.invalidate=function(){return this._initted=this._act=0,this._zTime=-_tinyNum,this},et.isActive=function(){var rt=this.parent||this._dp,it=this._start,ot;return!!(!rt||this._ts&&this._initted&&rt.isActive()&&(ot=rt.rawTime(!0))>=it&&ot1?(it?(at[rt]=it,ot&&(at[rt+"Params"]=ot),rt==="onUpdate"&&(this._onUpdate=it)):delete at[rt],this):at[rt]},et.then=function(rt){var it=this;return new Promise(function(ot){var at=_isFunction(rt)?rt:_passThrough,st=function(){var ct=it.then;it.then=null,_isFunction(at)&&(at=at(it))&&(at.then||at===it)&&(it.then=ct),ot(at),it.then=ct};it._initted&&it.totalProgress()===1&&it._ts>=0||!it._tTime&&it._ts<0?st():it._prom=st})},et.kill=function(){_interrupt(this)},tt}();_setDefaults(Animation.prototype,{_time:0,_start:0,_end:0,_tTime:0,_tDur:0,_dirty:0,_repeat:0,_yoyo:!1,parent:null,_initted:!1,_rDelay:0,_ts:1,_dp:0,ratio:0,_zTime:-_tinyNum,_prom:0,_ps:!1,_rts:1});var Timeline$1=function(tt){_inheritsLoose(et,tt);function et(rt,it){var ot;return rt===void 0&&(rt={}),ot=tt.call(this,rt)||this,ot.labels={},ot.smoothChildTiming=!!rt.smoothChildTiming,ot.autoRemoveChildren=!!rt.autoRemoveChildren,ot._sort=_isNotFalse(rt.sortChildren),_globalTimeline&&_addToTimeline(rt.parent||_globalTimeline,_assertThisInitialized$c(ot),it),rt.reversed&&ot.reverse(),rt.paused&&ot.paused(!0),rt.scrollTrigger&&_scrollTrigger(_assertThisInitialized$c(ot),rt.scrollTrigger),ot}var nt=et.prototype;return nt.to=function(it,ot,at){return _createTweenType(0,arguments,this),this},nt.from=function(it,ot,at){return _createTweenType(1,arguments,this),this},nt.fromTo=function(it,ot,at,st){return _createTweenType(2,arguments,this),this},nt.set=function(it,ot,at){return ot.duration=0,ot.parent=this,_inheritDefaults(ot).repeatDelay||(ot.repeat=0),ot.immediateRender=!!ot.immediateRender,new Tween(it,ot,_parsePosition(this,at),1),this},nt.call=function(it,ot,at){return _addToTimeline(this,Tween.delayedCall(0,it,ot),at)},nt.staggerTo=function(it,ot,at,st,lt,ct,ut){return at.duration=ot,at.stagger=at.stagger||st,at.onComplete=ct,at.onCompleteParams=ut,at.parent=this,new Tween(it,at,_parsePosition(this,lt)),this},nt.staggerFrom=function(it,ot,at,st,lt,ct,ut){return at.runBackwards=1,_inheritDefaults(at).immediateRender=_isNotFalse(at.immediateRender),this.staggerTo(it,ot,at,st,lt,ct,ut)},nt.staggerFromTo=function(it,ot,at,st,lt,ct,ut,ht){return st.startAt=at,_inheritDefaults(st).immediateRender=_isNotFalse(st.immediateRender),this.staggerTo(it,ot,st,lt,ct,ut,ht)},nt.render=function(it,ot,at){var st=this._time,lt=this._dirty?this.totalDuration():this._tDur,ct=this._dur,ut=it<=0?0:_roundPrecise(it),ht=this._zTime<0!=it<0&&(this._initted||!ct),dt,pt,mt,gt,yt,bt,vt,xt,kt,St,Tt,At;if(this!==_globalTimeline&&ut>lt&&it>=0&&(ut=lt),ut!==this._tTime||at||ht){if(st!==this._time&&ct&&(ut+=this._time-st,it+=this._time-st),dt=ut,kt=this._start,xt=this._ts,bt=!xt,ht&&(ct||(st=this._zTime),(it||!ot)&&(this._zTime=it)),this._repeat){if(Tt=this._yoyo,yt=ct+this._rDelay,this._repeat<-1&&it<0)return this.totalTime(yt*100+it,ot,at);if(dt=_roundPrecise(ut%yt),ut===lt?(gt=this._repeat,dt=ct):(gt=~~(ut/yt),gt&>===ut/yt&&(dt=ct,gt--),dt>ct&&(dt=ct)),St=_animationCycle(this._tTime,yt),!st&&this._tTime&&St!==gt&&this._tTime-St*yt-this._dur<=0&&(St=gt),Tt&>&1&&(dt=ct-dt,At=1),gt!==St&&!this._lock){var Et=Tt&&St&1,$t=Et===(Tt&>&1);if(gt=st&&it>=0)for(pt=this._first;pt;){if(mt=pt._next,(pt._act||dt>=pt._start)&&pt._ts&&vt!==pt){if(pt.parent!==this)return this.render(it,ot,at);if(pt.render(pt._ts>0?(dt-pt._start)*pt._ts:(pt._dirty?pt.totalDuration():pt._tDur)+(dt-pt._start)*pt._ts,ot,at),dt!==this._time||!this._ts&&!bt){vt=0,mt&&(ut+=this._zTime=-_tinyNum);break}}pt=mt}else{pt=this._last;for(var Dt=it<0?it:dt;pt;){if(mt=pt._prev,(pt._act||Dt<=pt._end)&&pt._ts&&vt!==pt){if(pt.parent!==this)return this.render(it,ot,at);if(pt.render(pt._ts>0?(Dt-pt._start)*pt._ts:(pt._dirty?pt.totalDuration():pt._tDur)+(Dt-pt._start)*pt._ts,ot,at||_reverting$1&&(pt._initted||pt._startAt)),dt!==this._time||!this._ts&&!bt){vt=0,mt&&(ut+=this._zTime=Dt?-_tinyNum:_tinyNum);break}}pt=mt}}if(vt&&!ot&&(this.pause(),vt.render(dt>=st?0:-_tinyNum)._zTime=dt>=st?1:-1,this._ts))return this._start=kt,_setEnd(this),this.render(it,ot,at);this._onUpdate&&!ot&&_callback(this,"onUpdate",!0),(ut===lt&&this._tTime>=this.totalDuration()||!ut&&st)&&(kt===this._start||Math.abs(xt)!==Math.abs(this._ts))&&(this._lock||((it||!ct)&&(ut===lt&&this._ts>0||!ut&&this._ts<0)&&_removeFromParent(this,1),!ot&&!(it<0&&!st)&&(ut||st||!lt)&&(_callback(this,ut===lt&&it>=0?"onComplete":"onReverseComplete",!0),this._prom&&!(ut0)&&this._prom())))}return this},nt.add=function(it,ot){var at=this;if(_isNumber$1(ot)||(ot=_parsePosition(this,ot,it)),!(it instanceof Animation)){if(_isArray(it))return it.forEach(function(st){return at.add(st,ot)}),this;if(_isString$1(it))return this.addLabel(it,ot);if(_isFunction(it))it=Tween.delayedCall(0,it);else return this}return this!==it?_addToTimeline(this,it,ot):this},nt.getChildren=function(it,ot,at,st){it===void 0&&(it=!0),ot===void 0&&(ot=!0),at===void 0&&(at=!0),st===void 0&&(st=-_bigNum$1);for(var lt=[],ct=this._first;ct;)ct._start>=st&&(ct instanceof Tween?ot&<.push(ct):(at&<.push(ct),it&<.push.apply(lt,ct.getChildren(!0,ot,at)))),ct=ct._next;return lt},nt.getById=function(it){for(var ot=this.getChildren(1,1,1),at=ot.length;at--;)if(ot[at].vars.id===it)return ot[at]},nt.remove=function(it){return _isString$1(it)?this.removeLabel(it):_isFunction(it)?this.killTweensOf(it):(_removeLinkedListItem(this,it),it===this._recent&&(this._recent=this._last),_uncache(this))},nt.totalTime=function(it,ot){return arguments.length?(this._forcing=1,!this._dp&&this._ts&&(this._start=_roundPrecise(_ticker.time-(this._ts>0?it/this._ts:(this.totalDuration()-it)/-this._ts))),tt.prototype.totalTime.call(this,it,ot),this._forcing=0,this):this._tTime},nt.addLabel=function(it,ot){return this.labels[it]=_parsePosition(this,ot),this},nt.removeLabel=function(it){return delete this.labels[it],this},nt.addPause=function(it,ot,at){var st=Tween.delayedCall(0,ot||_emptyFunc,at);return st.data="isPause",this._hasPause=1,_addToTimeline(this,st,_parsePosition(this,it))},nt.removePause=function(it){var ot=this._first;for(it=_parsePosition(this,it);ot;)ot._start===it&&ot.data==="isPause"&&_removeFromParent(ot),ot=ot._next},nt.killTweensOf=function(it,ot,at){for(var st=this.getTweensOf(it,at),lt=st.length;lt--;)_overwritingTween!==st[lt]&&st[lt].kill(it,ot);return this},nt.getTweensOf=function(it,ot){for(var at=[],st=toArray$3(it),lt=this._first,ct=_isNumber$1(ot),ut;lt;)lt instanceof Tween?_arrayContainsAny(lt._targets,st)&&(ct?(!_overwritingTween||lt._initted&<._ts)&<.globalTime(0)<=ot&<.globalTime(lt.totalDuration())>ot:!ot||lt.isActive())&&at.push(lt):(ut=lt.getTweensOf(st,ot)).length&&at.push.apply(at,ut),lt=lt._next;return at},nt.tweenTo=function(it,ot){ot=ot||{};var at=this,st=_parsePosition(at,it),lt=ot,ct=lt.startAt,ut=lt.onStart,ht=lt.onStartParams,dt=lt.immediateRender,pt,mt=Tween.to(at,_setDefaults({ease:ot.ease||"none",lazy:!1,immediateRender:!1,time:st,overwrite:"auto",duration:ot.duration||Math.abs((st-(ct&&"time"in ct?ct.time:at._time))/at.timeScale())||_tinyNum,onStart:function(){if(at.pause(),!pt){var yt=ot.duration||Math.abs((st-(ct&&"time"in ct?ct.time:at._time))/at.timeScale());mt._dur!==yt&&_setDuration(mt,yt,0,1).render(mt._time,!0,!0),pt=1}ut&&ut.apply(mt,ht||[])}},ot));return dt?mt.render(0):mt},nt.tweenFromTo=function(it,ot,at){return this.tweenTo(ot,_setDefaults({startAt:{time:_parsePosition(this,it)}},at))},nt.recent=function(){return this._recent},nt.nextLabel=function(it){return it===void 0&&(it=this._time),_getLabelInDirection(this,_parsePosition(this,it))},nt.previousLabel=function(it){return it===void 0&&(it=this._time),_getLabelInDirection(this,_parsePosition(this,it),1)},nt.currentLabel=function(it){return arguments.length?this.seek(it,!0):this.previousLabel(this._time+_tinyNum)},nt.shiftChildren=function(it,ot,at){at===void 0&&(at=0);for(var st=this._first,lt=this.labels,ct;st;)st._start>=at&&(st._start+=it,st._end+=it),st=st._next;if(ot)for(ct in lt)lt[ct]>=at&&(lt[ct]+=it);return _uncache(this)},nt.invalidate=function(it){var ot=this._first;for(this._lock=0;ot;)ot.invalidate(it),ot=ot._next;return tt.prototype.invalidate.call(this,it)},nt.clear=function(it){it===void 0&&(it=!0);for(var ot=this._first,at;ot;)at=ot._next,this.remove(ot),ot=at;return this._dp&&(this._time=this._tTime=this._pTime=0),it&&(this.labels={}),_uncache(this)},nt.totalDuration=function(it){var ot=0,at=this,st=at._last,lt=_bigNum$1,ct,ut,ht;if(arguments.length)return at.timeScale((at._repeat<0?at.duration():at.totalDuration())/(at.reversed()?-it:it));if(at._dirty){for(ht=at.parent;st;)ct=st._prev,st._dirty&&st.totalDuration(),ut=st._start,ut>lt&&at._sort&&st._ts&&!at._lock?(at._lock=1,_addToTimeline(at,st,ut-st._delay,1)._lock=0):lt=ut,ut<0&&st._ts&&(ot-=ut,(!ht&&!at._dp||ht&&ht.smoothChildTiming)&&(at._start+=ut/at._ts,at._time-=ut,at._tTime-=ut),at.shiftChildren(-ut,!1,-1/0),lt=0),st._end>ot&&st._ts&&(ot=st._end),st=ct;_setDuration(at,at===_globalTimeline&&at._time>ot?at._time:ot,1,1),at._dirty=0}return at._tDur},et.updateRoot=function(it){if(_globalTimeline._ts&&(_lazySafeRender(_globalTimeline,_parentToChildTotalTime(it,_globalTimeline)),_lastRenderedFrame=_ticker.frame),_ticker.frame>=_nextGCFrame){_nextGCFrame+=_config.autoSleep||120;var ot=_globalTimeline._first;if((!ot||!ot._ts)&&_config.autoSleep&&_ticker._listeners.length<2){for(;ot&&!ot._ts;)ot=ot._next;ot||_ticker.sleep()}}},et}(Animation);_setDefaults(Timeline$1.prototype,{_lock:0,_hasPause:0,_forcing:0});var _addComplexStringPropTween=function(et,nt,rt,it,ot,at,st){var lt=new PropTween(this._pt,et,nt,0,1,_renderComplexString,null,ot),ct=0,ut=0,ht,dt,pt,mt,gt,yt,bt,vt;for(lt.b=rt,lt.e=it,rt+="",it+="",(bt=~it.indexOf("random("))&&(it=_replaceRandom(it)),at&&(vt=[rt,it],at(vt,et,nt),rt=vt[0],it=vt[1]),dt=rt.match(_complexStringNumExp)||[];ht=_complexStringNumExp.exec(it);)mt=ht[0],gt=it.substring(ct,ht.index),pt?pt=(pt+1)%5:gt.substr(-5)==="rgba("&&(pt=1),mt!==dt[ut++]&&(yt=parseFloat(dt[ut-1])||0,lt._pt={_next:lt._pt,p:gt||ut===1?gt:",",s:yt,c:mt.charAt(1)==="="?_parseRelative(yt,mt)-yt:parseFloat(mt)-yt,m:pt&&pt<4?Math.round:0},ct=_complexStringNumExp.lastIndex);return lt.c=ct")}),kt.duration();else{Tt={};for(Et in mt)Et==="ease"||Et==="easeEach"||_parseKeyframe(Et,mt[Et],Tt,mt.easeEach);for(Et in Tt)for(Ct=Tt[Et].sort(function(Ot,Wt){return Ot.t-Wt.t}),Pt=0,St=0;Stlt-_tinyNum&&!ut?lt:it<_tinyNum?0:it,dt,pt,mt,gt,yt,bt,vt,xt,kt;if(!ct)_renderZeroDurationTween(this,it,ot,at);else if(ht!==this._tTime||!it||at||!this._initted&&this._tTime||this._startAt&&this._zTime<0!==ut){if(dt=ht,xt=this.timeline,this._repeat){if(gt=ct+this._rDelay,this._repeat<-1&&ut)return this.totalTime(gt*100+it,ot,at);if(dt=_roundPrecise(ht%gt),ht===lt?(mt=this._repeat,dt=ct):(mt=~~(ht/gt),mt&&mt===ht/gt&&(dt=ct,mt--),dt>ct&&(dt=ct)),bt=this._yoyo&&mt&1,bt&&(kt=this._yEase,dt=ct-dt),yt=_animationCycle(this._tTime,gt),dt===st&&!at&&this._initted)return this._tTime=ht,this;mt!==yt&&(xt&&this._yEase&&_propagateYoyoEase(xt,bt),this.vars.repeatRefresh&&!bt&&!this._lock&&(this._lock=at=1,this.render(_roundPrecise(gt*mt),!0).invalidate()._lock=0))}if(!this._initted){if(_attemptInitTween(this,ut?it:dt,at,ot,ht))return this._tTime=0,this;if(st!==this._time)return this;if(ct!==this._dur)return this.render(it,ot,at)}if(this._tTime=ht,this._time=dt,!this._act&&this._ts&&(this._act=1,this._lazy=0),this.ratio=vt=(kt||this._ease)(dt/ct),this._from&&(this.ratio=vt=1-vt),dt&&!st&&!ot&&!mt&&(_callback(this,"onStart"),this._tTime!==ht))return this;for(pt=this._pt;pt;)pt.r(vt,pt.d),pt=pt._next;xt&&xt.render(it<0?it:!dt&&bt?-_tinyNum:xt._dur*xt._ease(dt/this._dur),ot,at)||this._startAt&&(this._zTime=it),this._onUpdate&&!ot&&(ut&&_rewindStartAt(this,it,ot,at),_callback(this,"onUpdate")),this._repeat&&mt!==yt&&this.vars.onRepeat&&!ot&&this.parent&&_callback(this,"onRepeat"),(ht===this._tDur||!ht)&&this._tTime===ht&&(ut&&!this._onUpdate&&_rewindStartAt(this,it,!0,!0),(it||!ct)&&(ht===this._tDur&&this._ts>0||!ht&&this._ts<0)&&_removeFromParent(this,1),!ot&&!(ut&&!st)&&(ht||st||bt)&&(_callback(this,ht===lt?"onComplete":"onReverseComplete",!0),this._prom&&!(ht0)&&this._prom()))}return this},nt.targets=function(){return this._targets},nt.invalidate=function(it){return(!it||!this.vars.runBackwards)&&(this._startAt=0),this._pt=this._op=this._onUpdate=this._lazy=this.ratio=0,this._ptLookup=[],this.timeline&&this.timeline.invalidate(it),tt.prototype.invalidate.call(this,it)},nt.resetTo=function(it,ot,at,st){_tickerActive||_ticker.wake(),this._ts||this.play();var lt=Math.min(this._dur,(this._dp._time-this._start)*this._ts),ct;return this._initted||_initTween(this,lt),ct=this._ease(lt/this._dur),_updatePropTweens(this,it,ot,at,st,ct,lt)?this.resetTo(it,ot,at,st):(_alignPlayhead(this,0),this.parent||_addLinkedListItem(this._dp,this,"_first","_last",this._dp._sort?"_start":0),this.render(0))},nt.kill=function(it,ot){if(ot===void 0&&(ot="all"),!it&&(!ot||ot==="all"))return this._lazy=this._pt=0,this.parent?_interrupt(this):this;if(this.timeline){var at=this.timeline.totalDuration();return this.timeline.killTweensOf(it,ot,_overwritingTween&&_overwritingTween.vars.overwrite!==!0)._first||_interrupt(this),this.parent&&at!==this.timeline.totalDuration()&&_setDuration(this,this._dur*this.timeline._tDur/at,0,1),this}var st=this._targets,lt=it?toArray$3(it):st,ct=this._ptLookup,ut=this._pt,ht,dt,pt,mt,gt,yt,bt;if((!ot||ot==="all")&&_arraysMatch(st,lt))return ot==="all"&&(this._pt=0),_interrupt(this);for(ht=this._op=this._op||[],ot!=="all"&&(_isString$1(ot)&&(gt={},_forEachName(ot,function(vt){return gt[vt]=1}),ot=gt),ot=_addAliasesToVars(st,ot)),bt=st.length;bt--;)if(~lt.indexOf(st[bt])){dt=ct[bt],ot==="all"?(ht[bt]=ot,mt=dt,pt={}):(pt=ht[bt]=ht[bt]||{},mt=ot);for(gt in mt)yt=dt&&dt[gt],yt&&((!("kill"in yt.d)||yt.d.kill(gt)===!0)&&_removeLinkedListItem(this,yt,"_pt"),delete dt[gt]),pt!=="all"&&(pt[gt]=1)}return this._initted&&!this._pt&&ut&&_interrupt(this),this},et.to=function(it,ot){return new et(it,ot,arguments[2])},et.from=function(it,ot){return _createTweenType(1,arguments)},et.delayedCall=function(it,ot,at,st){return new et(ot,0,{immediateRender:!1,lazy:!1,overwrite:!1,delay:it,onComplete:ot,onReverseComplete:ot,onCompleteParams:at,onReverseCompleteParams:at,callbackScope:st})},et.fromTo=function(it,ot,at){return _createTweenType(2,arguments)},et.set=function(it,ot){return ot.duration=0,ot.repeatDelay||(ot.repeat=0),new et(it,ot)},et.killTweensOf=function(it,ot,at){return _globalTimeline.killTweensOf(it,ot,at)},et}(Animation);_setDefaults(Tween.prototype,{_targets:[],_lazy:0,_startAt:0,_op:0,_onInit:0});_forEachName("staggerTo,staggerFrom,staggerFromTo",function(tt){Tween[tt]=function(){var et=new Timeline$1,nt=_slice.call(arguments,0);return nt.splice(tt==="staggerFromTo"?5:4,0,0),et[tt].apply(et,nt)}});var _setterPlain=function(et,nt,rt){return et[nt]=rt},_setterFunc=function(et,nt,rt){return et[nt](rt)},_setterFuncWithParam=function(et,nt,rt,it){return et[nt](it.fp,rt)},_setterAttribute=function(et,nt,rt){return et.setAttribute(nt,rt)},_getSetter=function(et,nt){return _isFunction(et[nt])?_setterFunc:_isUndefined(et[nt])&&et.setAttribute?_setterAttribute:_setterPlain},_renderPlain=function(et,nt){return nt.set(nt.t,nt.p,Math.round((nt.s+nt.c*et)*1e6)/1e6,nt)},_renderBoolean=function(et,nt){return nt.set(nt.t,nt.p,!!(nt.s+nt.c*et),nt)},_renderComplexString=function(et,nt){var rt=nt._pt,it="";if(!et&&nt.b)it=nt.b;else if(et===1&&nt.e)it=nt.e;else{for(;rt;)it=rt.p+(rt.m?rt.m(rt.s+rt.c*et):Math.round((rt.s+rt.c*et)*1e4)/1e4)+it,rt=rt._next;it+=nt.c}nt.set(nt.t,nt.p,it,nt)},_renderPropTweens=function(et,nt){for(var rt=nt._pt;rt;)rt.r(et,rt.d),rt=rt._next},_addPluginModifier=function(et,nt,rt,it){for(var ot=this._pt,at;ot;)at=ot._next,ot.p===it&&ot.modifier(et,nt,rt),ot=at},_killPropTweensOf=function(et){for(var nt=this._pt,rt,it;nt;)it=nt._next,nt.p===et&&!nt.op||nt.op===et?_removeLinkedListItem(this,nt,"_pt"):nt.dep||(rt=1),nt=it;return!rt},_setterWithModifier=function(et,nt,rt,it){it.mSet(et,nt,it.m.call(it.tween,rt,it.mt),it)},_sortPropTweensByPriority=function(et){for(var nt=et._pt,rt,it,ot,at;nt;){for(rt=nt._next,it=ot;it&&it.pr>nt.pr;)it=it._next;(nt._prev=it?it._prev:at)?nt._prev._next=nt:ot=nt,(nt._next=it)?it._prev=nt:at=nt,nt=rt}et._pt=ot},PropTween=function(){function tt(nt,rt,it,ot,at,st,lt,ct,ut){this.t=rt,this.s=ot,this.c=at,this.p=it,this.r=st||_renderPlain,this.d=lt||this,this.set=ct||_setterPlain,this.pr=ut||0,this._next=nt,nt&&(nt._prev=this)}var et=tt.prototype;return et.modifier=function(rt,it,ot){this.mSet=this.mSet||this.set,this.set=_setterWithModifier,this.m=rt,this.mt=ot,this.tween=it},tt}();_forEachName(_callbackNames+"parent,duration,ease,delay,overwrite,runBackwards,startAt,yoyo,immediateRender,repeat,repeatDelay,data,paused,reversed,lazy,callbackScope,stringFilter,id,yoyoEase,stagger,inherit,repeatRefresh,keyframes,autoRevert,scrollTrigger",function(tt){return _reservedProps[tt]=1});_globals.TweenMax=_globals.TweenLite=Tween;_globals.TimelineLite=_globals.TimelineMax=Timeline$1;_globalTimeline=new Timeline$1({sortChildren:!1,defaults:_defaults,autoRemoveChildren:!0,id:"root",smoothChildTiming:!0});_config.stringFilter=_colorStringFilter;var _media=[],_listeners={},_emptyArray=[],_lastMediaTime=0,_contextID=0,_dispatch=function(et){return(_listeners[et]||_emptyArray).map(function(nt){return nt()})},_onMediaChange=function(){var et=Date.now(),nt=[];et-_lastMediaTime>2&&(_dispatch("matchMediaInit"),_media.forEach(function(rt){var it=rt.queries,ot=rt.conditions,at,st,lt,ct;for(st in it)at=_win$1.matchMedia(it[st]).matches,at&&(lt=1),at!==ot[st]&&(ot[st]=at,ct=1);ct&&(rt.revert(),lt&&nt.push(rt))}),_dispatch("matchMediaRevert"),nt.forEach(function(rt){return rt.onMatch(rt)}),_lastMediaTime=et,_dispatch("matchMedia"))},Context$1=function(){function tt(nt,rt){this.selector=rt&&selector$1(rt),this.data=[],this._r=[],this.isReverted=!1,this.id=_contextID++,nt&&this.add(nt)}var et=tt.prototype;return et.add=function(rt,it,ot){_isFunction(rt)&&(ot=it,it=rt,rt=_isFunction);var at=this,st=function(){var ct=_context,ut=at.selector,ht;return ct&&ct!==at&&ct.data.push(at),ot&&(at.selector=selector$1(ot)),_context=at,ht=it.apply(at,arguments),_isFunction(ht)&&at._r.push(ht),_context=ct,at.selector=ut,at.isReverted=!1,ht};return at.last=st,rt===_isFunction?st(at):rt?at[rt]=st:st},et.ignore=function(rt){var it=_context;_context=null,rt(this),_context=it},et.getTweens=function(){var rt=[];return this.data.forEach(function(it){return it instanceof tt?rt.push.apply(rt,it.getTweens()):it instanceof Tween&&!(it.parent&&it.parent.data==="nested")&&rt.push(it)}),rt},et.clear=function(){this._r.length=this.data.length=0},et.kill=function(rt,it){var ot=this;if(rt){var at=this.getTweens();this.data.forEach(function(lt){lt.data==="isFlip"&&(lt.revert(),lt.getChildren(!0,!0,!1).forEach(function(ct){return at.splice(at.indexOf(ct),1)}))}),at.map(function(lt){return{g:lt.globalTime(0),t:lt}}).sort(function(lt,ct){return ct.g-lt.g||-1/0}).forEach(function(lt){return lt.t.revert(rt)}),this.data.forEach(function(lt){return!(lt instanceof Tween)&<.revert&<.revert(rt)}),this._r.forEach(function(lt){return lt(rt,ot)}),this.isReverted=!0}else this.data.forEach(function(lt){return lt.kill&<.kill()});if(this.clear(),it)for(var st=_media.length;st--;)_media[st].id===this.id&&_media.splice(st,1)},et.revert=function(rt){this.kill(rt||{})},tt}(),MatchMedia=function(){function tt(nt){this.contexts=[],this.scope=nt}var et=tt.prototype;return et.add=function(rt,it,ot){_isObject(rt)||(rt={matches:rt});var at=new Context$1(0,ot||this.scope),st=at.conditions={},lt,ct,ut;_context&&!at.selector&&(at.selector=_context.selector),this.contexts.push(at),it=at.add("onMatch",it),at.queries=rt;for(ct in rt)ct==="all"?ut=1:(lt=_win$1.matchMedia(rt[ct]),lt&&(_media.indexOf(at)<0&&_media.push(at),(st[ct]=lt.matches)&&(ut=1),lt.addListener?lt.addListener(_onMediaChange):lt.addEventListener("change",_onMediaChange)));return ut&&it(at),this},et.revert=function(rt){this.kill(rt||{})},et.kill=function(rt){this.contexts.forEach(function(it){return it.kill(rt,!0)})},tt}(),_gsap={registerPlugin:function(){for(var et=arguments.length,nt=new Array(et),rt=0;rt1){var it=et.map(function(ut){return gsap.quickSetter(ut,nt,rt)}),ot=it.length;return function(ut){for(var ht=ot;ht--;)it[ht](ut)}}et=et[0]||{};var at=_plugins[nt],st=_getCache(et),lt=st.harness&&(st.harness.aliases||{})[nt]||nt,ct=at?function(ut){var ht=new at;_quickTween._pt=0,ht.init(et,rt?ut+rt:ut,_quickTween,0,[et]),ht.render(1,ht),_quickTween._pt&&_renderPropTweens(1,_quickTween)}:st.set(et,lt);return at?ct:function(ut){return ct(et,lt,rt?ut+rt:ut,st,1)}},quickTo:function(et,nt,rt){var it,ot=gsap.to(et,_merge((it={},it[nt]="+=0.1",it.paused=!0,it),rt||{})),at=function(lt,ct,ut){return ot.resetTo(nt,lt,ct,ut)};return at.tween=ot,at},isTweening:function(et){return _globalTimeline.getTweensOf(et,!0).length>0},defaults:function(et){return et&&et.ease&&(et.ease=_parseEase(et.ease,_defaults.ease)),_mergeDeep(_defaults,et||{})},config:function(et){return _mergeDeep(_config,et||{})},registerEffect:function(et){var nt=et.name,rt=et.effect,it=et.plugins,ot=et.defaults,at=et.extendTimeline;(it||"").split(",").forEach(function(st){return st&&!_plugins[st]&&!_globals[st]&&_warn(nt+" effect requires "+st+" plugin.")}),_effects[nt]=function(st,lt,ct){return rt(toArray$3(st),_setDefaults(lt||{},ot),ct)},at&&(Timeline$1.prototype[nt]=function(st,lt,ct){return this.add(_effects[nt](st,_isObject(lt)?lt:(ct=lt)&&{},this),ct)})},registerEase:function(et,nt){_easeMap[et]=_parseEase(nt)},parseEase:function(et,nt){return arguments.length?_parseEase(et,nt):_easeMap},getById:function(et){return _globalTimeline.getById(et)},exportRoot:function(et,nt){et===void 0&&(et={});var rt=new Timeline$1(et),it,ot;for(rt.smoothChildTiming=_isNotFalse(et.smoothChildTiming),_globalTimeline.remove(rt),rt._dp=0,rt._time=rt._tTime=_globalTimeline._time,it=_globalTimeline._first;it;)ot=it._next,(nt||!(!it._dur&&it instanceof Tween&&it.vars.onComplete===it._targets[0]))&&_addToTimeline(rt,it,it._start-it._delay),it=ot;return _addToTimeline(_globalTimeline,rt,0),rt},context:function(et,nt){return et?new Context$1(et,nt):_context},matchMedia:function(et){return new MatchMedia(et)},matchMediaRefresh:function(){return _media.forEach(function(et){var nt=et.conditions,rt,it;for(it in nt)nt[it]&&(nt[it]=!1,rt=1);rt&&et.revert()})||_onMediaChange()},addEventListener:function(et,nt){var rt=_listeners[et]||(_listeners[et]=[]);~rt.indexOf(nt)||rt.push(nt)},removeEventListener:function(et,nt){var rt=_listeners[et],it=rt&&rt.indexOf(nt);it>=0&&rt.splice(it,1)},utils:{wrap,wrapYoyo,distribute,random,snap,normalize:normalize$1,getUnit,clamp:clamp$2,splitColor,toArray:toArray$3,selector:selector$1,mapRange,pipe,unitize,interpolate:interpolate$2,shuffle},install:_install,effects:_effects,ticker:_ticker,updateRoot:Timeline$1.updateRoot,plugins:_plugins,globalTimeline:_globalTimeline,core:{PropTween,globals:_addGlobal,Tween,Timeline:Timeline$1,Animation,getCache:_getCache,_removeLinkedListItem,reverting:function(){return _reverting$1},context:function(et){return et&&_context&&(_context.data.push(et),et._ctx=_context),_context},suppressOverwrites:function(et){return _suppressOverwrites=et}}};_forEachName("to,from,fromTo,delayedCall,set,killTweensOf",function(tt){return _gsap[tt]=Tween[tt]});_ticker.add(Timeline$1.updateRoot);_quickTween=_gsap.to({},{duration:0});var _getPluginPropTween=function(et,nt){for(var rt=et._pt;rt&&rt.p!==nt&&rt.op!==nt&&rt.fp!==nt;)rt=rt._next;return rt},_addModifiers=function(et,nt){var rt=et._targets,it,ot,at;for(it in nt)for(ot=rt.length;ot--;)at=et._ptLookup[ot][it],at&&(at=at.d)&&(at._pt&&(at=_getPluginPropTween(at,it)),at&&at.modifier&&at.modifier(nt[it],et,rt[ot],it))},_buildModifierPlugin=function(et,nt){return{name:et,rawVars:1,init:function(it,ot,at){at._onInit=function(st){var lt,ct;if(_isString$1(ot)&&(lt={},_forEachName(ot,function(ut){return lt[ut]=1}),ot=lt),nt){lt={};for(ct in ot)lt[ct]=nt(ot[ct]);ot=lt}_addModifiers(st,ot)}}}},gsap=_gsap.registerPlugin({name:"attr",init:function(et,nt,rt,it,ot){var at,st,lt;this.tween=rt;for(at in nt)lt=et.getAttribute(at)||"",st=this.add(et,"setAttribute",(lt||0)+"",nt[at],it,ot,0,0,at),st.op=at,st.b=lt,this._props.push(at)},render:function(et,nt){for(var rt=nt._pt;rt;)_reverting$1?rt.set(rt.t,rt.p,rt.b,rt):rt.r(et,rt.d),rt=rt._next}},{name:"endArray",init:function(et,nt){for(var rt=nt.length;rt--;)this.add(et,rt,et[rt]||0,nt[rt],0,0,0,0,0,1)}},_buildModifierPlugin("roundProps",_roundModifier),_buildModifierPlugin("modifiers"),_buildModifierPlugin("snap",snap))||_gsap;Tween.version=Timeline$1.version=gsap.version="3.12.2";_coreReady=1;_windowExists$1()&&_wake();_easeMap.Power0;_easeMap.Power1;_easeMap.Power2;_easeMap.Power3;_easeMap.Power4;_easeMap.Linear;_easeMap.Quad;_easeMap.Cubic;_easeMap.Quart;_easeMap.Quint;_easeMap.Strong;_easeMap.Elastic;_easeMap.Back;_easeMap.SteppedEase;_easeMap.Bounce;_easeMap.Sine;_easeMap.Expo;_easeMap.Circ;/*! - * CSSPlugin 3.12.2 - * https://greensock.com - * - * Copyright 2008-2023, GreenSock. All rights reserved. - * Subject to the terms at https://greensock.com/standard-license or for - * Club GreenSock members, the agreement issued with that membership. - * @author: Jack Doyle, jack@greensock.com -*/var _win,_doc,_docElement,_pluginInitted,_tempDiv,_recentSetterPlugin,_reverting,_windowExists=function(){return typeof window<"u"},_transformProps={},_RAD2DEG=180/Math.PI,_DEG2RAD=Math.PI/180,_atan2=Math.atan2,_bigNum=1e8,_capsExp=/([A-Z])/g,_horizontalExp=/(left|right|width|margin|padding|x)/i,_complexExp=/[\s,\(]\S/,_propertyAliases={autoAlpha:"opacity,visibility",scale:"scaleX,scaleY",alpha:"opacity"},_renderCSSProp=function(et,nt){return nt.set(nt.t,nt.p,Math.round((nt.s+nt.c*et)*1e4)/1e4+nt.u,nt)},_renderPropWithEnd=function(et,nt){return nt.set(nt.t,nt.p,et===1?nt.e:Math.round((nt.s+nt.c*et)*1e4)/1e4+nt.u,nt)},_renderCSSPropWithBeginning=function(et,nt){return nt.set(nt.t,nt.p,et?Math.round((nt.s+nt.c*et)*1e4)/1e4+nt.u:nt.b,nt)},_renderRoundedCSSProp=function(et,nt){var rt=nt.s+nt.c*et;nt.set(nt.t,nt.p,~~(rt+(rt<0?-.5:.5))+nt.u,nt)},_renderNonTweeningValue=function(et,nt){return nt.set(nt.t,nt.p,et?nt.e:nt.b,nt)},_renderNonTweeningValueOnlyAtEnd=function(et,nt){return nt.set(nt.t,nt.p,et!==1?nt.b:nt.e,nt)},_setterCSSStyle=function(et,nt,rt){return et.style[nt]=rt},_setterCSSProp=function(et,nt,rt){return et.style.setProperty(nt,rt)},_setterTransform=function(et,nt,rt){return et._gsap[nt]=rt},_setterScale=function(et,nt,rt){return et._gsap.scaleX=et._gsap.scaleY=rt},_setterScaleWithRender=function(et,nt,rt,it,ot){var at=et._gsap;at.scaleX=at.scaleY=rt,at.renderTransform(ot,at)},_setterTransformWithRender=function(et,nt,rt,it,ot){var at=et._gsap;at[nt]=rt,at.renderTransform(ot,at)},_transformProp="transform",_transformOriginProp=_transformProp+"Origin",_saveStyle=function tt(et,nt){var rt=this,it=this.target,ot=it.style;if(et in _transformProps&&ot){if(this.tfm=this.tfm||{},et!=="transform")et=_propertyAliases[et]||et,~et.indexOf(",")?et.split(",").forEach(function(at){return rt.tfm[at]=_get$1(it,at)}):this.tfm[et]=it._gsap.x?it._gsap[et]:_get$1(it,et);else return _propertyAliases.transform.split(",").forEach(function(at){return tt.call(rt,at,nt)});if(this.props.indexOf(_transformProp)>=0)return;it._gsap.svg&&(this.svgo=it.getAttribute("data-svg-origin"),this.props.push(_transformOriginProp,nt,"")),et=_transformProp}(ot||nt)&&this.props.push(et,nt,ot[et])},_removeIndependentTransforms=function(et){et.translate&&(et.removeProperty("translate"),et.removeProperty("scale"),et.removeProperty("rotate"))},_revertStyle=function(){var et=this.props,nt=this.target,rt=nt.style,it=nt._gsap,ot,at;for(ot=0;ot=0?_prefixes[at]:"")+et},_initCore=function(){_windowExists()&&window.document&&(_win=window,_doc=_win.document,_docElement=_doc.documentElement,_tempDiv=_createElement("div")||{style:{}},_createElement("div"),_transformProp=_checkPropPrefix(_transformProp),_transformOriginProp=_transformProp+"Origin",_tempDiv.style.cssText="border-width:0;line-height:0;position:absolute;padding:0",_supports3D=!!_checkPropPrefix("perspective"),_reverting=gsap.core.reverting,_pluginInitted=1)},_getBBoxHack=function tt(et){var nt=_createElement("svg",this.ownerSVGElement&&this.ownerSVGElement.getAttribute("xmlns")||"http://www.w3.org/2000/svg"),rt=this.parentNode,it=this.nextSibling,ot=this.style.cssText,at;if(_docElement.appendChild(nt),nt.appendChild(this),this.style.display="block",et)try{at=this.getBBox(),this._gsapBBox=this.getBBox,this.getBBox=tt}catch{}else this._gsapBBox&&(at=this._gsapBBox());return rt&&(it?rt.insertBefore(this,it):rt.appendChild(this)),_docElement.removeChild(nt),this.style.cssText=ot,at},_getAttributeFallbacks=function(et,nt){for(var rt=nt.length;rt--;)if(et.hasAttribute(nt[rt]))return et.getAttribute(nt[rt])},_getBBox=function(et){var nt;try{nt=et.getBBox()}catch{nt=_getBBoxHack.call(et,!0)}return nt&&(nt.width||nt.height)||et.getBBox===_getBBoxHack||(nt=_getBBoxHack.call(et,!0)),nt&&!nt.width&&!nt.x&&!nt.y?{x:+_getAttributeFallbacks(et,["x","cx","x1"])||0,y:+_getAttributeFallbacks(et,["y","cy","y1"])||0,width:0,height:0}:nt},_isSVG=function(et){return!!(et.getCTM&&(!et.parentNode||et.ownerSVGElement)&&_getBBox(et))},_removeProperty=function(et,nt){if(nt){var rt=et.style;nt in _transformProps&&nt!==_transformOriginProp&&(nt=_transformProp),rt.removeProperty?((nt.substr(0,2)==="ms"||nt.substr(0,6)==="webkit")&&(nt="-"+nt),rt.removeProperty(nt.replace(_capsExp,"-$1").toLowerCase())):rt.removeAttribute(nt)}},_addNonTweeningPT=function(et,nt,rt,it,ot,at){var st=new PropTween(et._pt,nt,rt,0,1,at?_renderNonTweeningValueOnlyAtEnd:_renderNonTweeningValue);return et._pt=st,st.b=it,st.e=ot,et._props.push(rt),st},_nonConvertibleUnits={deg:1,rad:1,turn:1},_nonStandardLayouts={grid:1,flex:1},_convertToUnit=function tt(et,nt,rt,it){var ot=parseFloat(rt)||0,at=(rt+"").trim().substr((ot+"").length)||"px",st=_tempDiv.style,lt=_horizontalExp.test(nt),ct=et.tagName.toLowerCase()==="svg",ut=(ct?"client":"offset")+(lt?"Width":"Height"),ht=100,dt=it==="px",pt=it==="%",mt,gt,yt,bt;return it===at||!ot||_nonConvertibleUnits[it]||_nonConvertibleUnits[at]?ot:(at!=="px"&&!dt&&(ot=tt(et,nt,rt,"px")),bt=et.getCTM&&_isSVG(et),(pt||at==="%")&&(_transformProps[nt]||~nt.indexOf("adius"))?(mt=bt?et.getBBox()[lt?"width":"height"]:et[ut],_round(pt?ot/mt*ht:ot/100*mt)):(st[lt?"width":"height"]=ht+(dt?at:it),gt=~nt.indexOf("adius")||it==="em"&&et.appendChild&&!ct?et:et.parentNode,bt&&(gt=(et.ownerSVGElement||{}).parentNode),(!gt||gt===_doc||!gt.appendChild)&&(gt=_doc.body),yt=gt._gsap,yt&&pt&&yt.width&<&&yt.time===_ticker.time&&!yt.uncache?_round(ot/yt.width*ht):((pt||at==="%")&&!_nonStandardLayouts[_getComputedProperty(gt,"display")]&&(st.position=_getComputedProperty(et,"position")),gt===et&&(st.position="static"),gt.appendChild(_tempDiv),mt=_tempDiv[ut],gt.removeChild(_tempDiv),st.position="absolute",lt&&pt&&(yt=_getCache(gt),yt.time=_ticker.time,yt.width=gt[ut]),_round(dt?mt*ot/ht:mt&&ot?ht/mt*ot:0))))},_get$1=function(et,nt,rt,it){var ot;return _pluginInitted||_initCore(),nt in _propertyAliases&&nt!=="transform"&&(nt=_propertyAliases[nt],~nt.indexOf(",")&&(nt=nt.split(",")[0])),_transformProps[nt]&&nt!=="transform"?(ot=_parseTransform(et,it),ot=nt!=="transformOrigin"?ot[nt]:ot.svg?ot.origin:_firstTwoOnly(_getComputedProperty(et,_transformOriginProp))+" "+ot.zOrigin+"px"):(ot=et.style[nt],(!ot||ot==="auto"||it||~(ot+"").indexOf("calc("))&&(ot=_specialProps[nt]&&_specialProps[nt](et,nt,rt)||_getComputedProperty(et,nt)||_getProperty(et,nt)||(nt==="opacity"?1:0))),rt&&!~(ot+"").trim().indexOf(" ")?_convertToUnit(et,nt,ot,rt)+rt:ot},_tweenComplexCSSString=function(et,nt,rt,it){if(!rt||rt==="none"){var ot=_checkPropPrefix(nt,et,1),at=ot&&_getComputedProperty(et,ot,1);at&&at!==rt?(nt=ot,rt=at):nt==="borderColor"&&(rt=_getComputedProperty(et,"borderTopColor"))}var st=new PropTween(this._pt,et.style,nt,0,1,_renderComplexString),lt=0,ct=0,ut,ht,dt,pt,mt,gt,yt,bt,vt,xt,kt,St;if(st.b=rt,st.e=it,rt+="",it+="",it==="auto"&&(et.style[nt]=it,it=_getComputedProperty(et,nt)||it,et.style[nt]=rt),ut=[rt,it],_colorStringFilter(ut),rt=ut[0],it=ut[1],dt=rt.match(_numWithUnitExp)||[],St=it.match(_numWithUnitExp)||[],St.length){for(;ht=_numWithUnitExp.exec(it);)yt=ht[0],vt=it.substring(lt,ht.index),mt?mt=(mt+1)%5:(vt.substr(-5)==="rgba("||vt.substr(-5)==="hsla(")&&(mt=1),yt!==(gt=dt[ct++]||"")&&(pt=parseFloat(gt)||0,kt=gt.substr((pt+"").length),yt.charAt(1)==="="&&(yt=_parseRelative(pt,yt)+kt),bt=parseFloat(yt),xt=yt.substr((bt+"").length),lt=_numWithUnitExp.lastIndex-xt.length,xt||(xt=xt||_config.units[nt]||kt,lt===it.length&&(it+=xt,st.e+=xt)),kt!==xt&&(pt=_convertToUnit(et,nt,gt,xt)||0),st._pt={_next:st._pt,p:vt||ct===1?vt:",",s:pt,c:bt-pt,m:mt&&mt<4||nt==="zIndex"?Math.round:0});st.c=lt-1;)st=ot[ct],_transformProps[st]&&(lt=1,st=st==="transformOrigin"?_transformOriginProp:_transformProp),_removeProperty(rt,st);lt&&(_removeProperty(rt,_transformProp),at&&(at.svg&&rt.removeAttribute("transform"),_parseTransform(rt,1),at.uncache=1,_removeIndependentTransforms(it)))}},_specialProps={clearProps:function(et,nt,rt,it,ot){if(ot.data!=="isFromStart"){var at=et._pt=new PropTween(et._pt,nt,rt,0,0,_renderClearProps);return at.u=it,at.pr=-10,at.tween=ot,et._props.push(rt),1}}},_identity2DMatrix=[1,0,0,1,0,0],_rotationalProperties={},_isNullTransform=function(et){return et==="matrix(1, 0, 0, 1, 0, 0)"||et==="none"||!et},_getComputedTransformMatrixAsArray=function(et){var nt=_getComputedProperty(et,_transformProp);return _isNullTransform(nt)?_identity2DMatrix:nt.substr(7).match(_numExp).map(_round)},_getMatrix=function(et,nt){var rt=et._gsap||_getCache(et),it=et.style,ot=_getComputedTransformMatrixAsArray(et),at,st,lt,ct;return rt.svg&&et.getAttribute("transform")?(lt=et.transform.baseVal.consolidate().matrix,ot=[lt.a,lt.b,lt.c,lt.d,lt.e,lt.f],ot.join(",")==="1,0,0,1,0,0"?_identity2DMatrix:ot):(ot===_identity2DMatrix&&!et.offsetParent&&et!==_docElement&&!rt.svg&&(lt=it.display,it.display="block",at=et.parentNode,(!at||!et.offsetParent)&&(ct=1,st=et.nextElementSibling,_docElement.appendChild(et)),ot=_getComputedTransformMatrixAsArray(et),lt?it.display=lt:_removeProperty(et,"display"),ct&&(st?at.insertBefore(et,st):at?at.appendChild(et):_docElement.removeChild(et))),nt&&ot.length>6?[ot[0],ot[1],ot[4],ot[5],ot[12],ot[13]]:ot)},_applySVGOrigin=function(et,nt,rt,it,ot,at){var st=et._gsap,lt=ot||_getMatrix(et,!0),ct=st.xOrigin||0,ut=st.yOrigin||0,ht=st.xOffset||0,dt=st.yOffset||0,pt=lt[0],mt=lt[1],gt=lt[2],yt=lt[3],bt=lt[4],vt=lt[5],xt=nt.split(" "),kt=parseFloat(xt[0])||0,St=parseFloat(xt[1])||0,Tt,At,Et,$t;rt?lt!==_identity2DMatrix&&(At=pt*yt-mt*gt)&&(Et=kt*(yt/At)+St*(-gt/At)+(gt*vt-yt*bt)/At,$t=kt*(-mt/At)+St*(pt/At)-(pt*vt-mt*bt)/At,kt=Et,St=$t):(Tt=_getBBox(et),kt=Tt.x+(~xt[0].indexOf("%")?kt/100*Tt.width:kt),St=Tt.y+(~(xt[1]||xt[0]).indexOf("%")?St/100*Tt.height:St)),it||it!==!1&&st.smooth?(bt=kt-ct,vt=St-ut,st.xOffset=ht+(bt*pt+vt*gt)-bt,st.yOffset=dt+(bt*mt+vt*yt)-vt):st.xOffset=st.yOffset=0,st.xOrigin=kt,st.yOrigin=St,st.smooth=!!it,st.origin=nt,st.originIsAbsolute=!!rt,et.style[_transformOriginProp]="0px 0px",at&&(_addNonTweeningPT(at,st,"xOrigin",ct,kt),_addNonTweeningPT(at,st,"yOrigin",ut,St),_addNonTweeningPT(at,st,"xOffset",ht,st.xOffset),_addNonTweeningPT(at,st,"yOffset",dt,st.yOffset)),et.setAttribute("data-svg-origin",kt+" "+St)},_parseTransform=function(et,nt){var rt=et._gsap||new GSCache(et);if("x"in rt&&!nt&&!rt.uncache)return rt;var it=et.style,ot=rt.scaleX<0,at="px",st="deg",lt=getComputedStyle(et),ct=_getComputedProperty(et,_transformOriginProp)||"0",ut,ht,dt,pt,mt,gt,yt,bt,vt,xt,kt,St,Tt,At,Et,$t,Dt,jt,Pt,Ct,wt,It,Ot,Wt,zt,Ft,Nt,Ut,Mt,Ht,en,sn;return ut=ht=dt=gt=yt=bt=vt=xt=kt=0,pt=mt=1,rt.svg=!!(et.getCTM&&_isSVG(et)),lt.translate&&((lt.translate!=="none"||lt.scale!=="none"||lt.rotate!=="none")&&(it[_transformProp]=(lt.translate!=="none"?"translate3d("+(lt.translate+" 0 0").split(" ").slice(0,3).join(", ")+") ":"")+(lt.rotate!=="none"?"rotate("+lt.rotate+") ":"")+(lt.scale!=="none"?"scale("+lt.scale.split(" ").join(",")+") ":"")+(lt[_transformProp]!=="none"?lt[_transformProp]:"")),it.scale=it.rotate=it.translate="none"),At=_getMatrix(et,rt.svg),rt.svg&&(rt.uncache?(zt=et.getBBox(),ct=rt.xOrigin-zt.x+"px "+(rt.yOrigin-zt.y)+"px",Wt=""):Wt=!nt&&et.getAttribute("data-svg-origin"),_applySVGOrigin(et,Wt||ct,!!Wt||rt.originIsAbsolute,rt.smooth!==!1,At)),St=rt.xOrigin||0,Tt=rt.yOrigin||0,At!==_identity2DMatrix&&(jt=At[0],Pt=At[1],Ct=At[2],wt=At[3],ut=It=At[4],ht=Ot=At[5],At.length===6?(pt=Math.sqrt(jt*jt+Pt*Pt),mt=Math.sqrt(wt*wt+Ct*Ct),gt=jt||Pt?_atan2(Pt,jt)*_RAD2DEG:0,vt=Ct||wt?_atan2(Ct,wt)*_RAD2DEG+gt:0,vt&&(mt*=Math.abs(Math.cos(vt*_DEG2RAD))),rt.svg&&(ut-=St-(St*jt+Tt*Ct),ht-=Tt-(St*Pt+Tt*wt))):(sn=At[6],Ht=At[7],Nt=At[8],Ut=At[9],Mt=At[10],en=At[11],ut=At[12],ht=At[13],dt=At[14],Et=_atan2(sn,Mt),yt=Et*_RAD2DEG,Et&&($t=Math.cos(-Et),Dt=Math.sin(-Et),Wt=It*$t+Nt*Dt,zt=Ot*$t+Ut*Dt,Ft=sn*$t+Mt*Dt,Nt=It*-Dt+Nt*$t,Ut=Ot*-Dt+Ut*$t,Mt=sn*-Dt+Mt*$t,en=Ht*-Dt+en*$t,It=Wt,Ot=zt,sn=Ft),Et=_atan2(-Ct,Mt),bt=Et*_RAD2DEG,Et&&($t=Math.cos(-Et),Dt=Math.sin(-Et),Wt=jt*$t-Nt*Dt,zt=Pt*$t-Ut*Dt,Ft=Ct*$t-Mt*Dt,en=wt*Dt+en*$t,jt=Wt,Pt=zt,Ct=Ft),Et=_atan2(Pt,jt),gt=Et*_RAD2DEG,Et&&($t=Math.cos(Et),Dt=Math.sin(Et),Wt=jt*$t+Pt*Dt,zt=It*$t+Ot*Dt,Pt=Pt*$t-jt*Dt,Ot=Ot*$t-It*Dt,jt=Wt,It=zt),yt&&Math.abs(yt)+Math.abs(gt)>359.9&&(yt=gt=0,bt=180-bt),pt=_round(Math.sqrt(jt*jt+Pt*Pt+Ct*Ct)),mt=_round(Math.sqrt(Ot*Ot+sn*sn)),Et=_atan2(It,Ot),vt=Math.abs(Et)>2e-4?Et*_RAD2DEG:0,kt=en?1/(en<0?-en:en):0),rt.svg&&(Wt=et.getAttribute("transform"),rt.forceCSS=et.setAttribute("transform","")||!_isNullTransform(_getComputedProperty(et,_transformProp)),Wt&&et.setAttribute("transform",Wt))),Math.abs(vt)>90&&Math.abs(vt)<270&&(ot?(pt*=-1,vt+=gt<=0?180:-180,gt+=gt<=0?180:-180):(mt*=-1,vt+=vt<=0?180:-180)),nt=nt||rt.uncache,rt.x=ut-((rt.xPercent=ut&&(!nt&&rt.xPercent||(Math.round(et.offsetWidth/2)===Math.round(-ut)?-50:0)))?et.offsetWidth*rt.xPercent/100:0)+at,rt.y=ht-((rt.yPercent=ht&&(!nt&&rt.yPercent||(Math.round(et.offsetHeight/2)===Math.round(-ht)?-50:0)))?et.offsetHeight*rt.yPercent/100:0)+at,rt.z=dt+at,rt.scaleX=_round(pt),rt.scaleY=_round(mt),rt.rotation=_round(gt)+st,rt.rotationX=_round(yt)+st,rt.rotationY=_round(bt)+st,rt.skewX=vt+st,rt.skewY=xt+st,rt.transformPerspective=kt+at,(rt.zOrigin=parseFloat(ct.split(" ")[2])||0)&&(it[_transformOriginProp]=_firstTwoOnly(ct)),rt.xOffset=rt.yOffset=0,rt.force3D=_config.force3D,rt.renderTransform=rt.svg?_renderSVGTransforms:_supports3D?_renderCSSTransforms:_renderNon3DTransforms,rt.uncache=0,rt},_firstTwoOnly=function(et){return(et=et.split(" "))[0]+" "+et[1]},_addPxTranslate=function(et,nt,rt){var it=getUnit(nt);return _round(parseFloat(nt)+parseFloat(_convertToUnit(et,"x",rt+"px",it)))+it},_renderNon3DTransforms=function(et,nt){nt.z="0px",nt.rotationY=nt.rotationX="0deg",nt.force3D=0,_renderCSSTransforms(et,nt)},_zeroDeg="0deg",_zeroPx="0px",_endParenthesis=") ",_renderCSSTransforms=function(et,nt){var rt=nt||this,it=rt.xPercent,ot=rt.yPercent,at=rt.x,st=rt.y,lt=rt.z,ct=rt.rotation,ut=rt.rotationY,ht=rt.rotationX,dt=rt.skewX,pt=rt.skewY,mt=rt.scaleX,gt=rt.scaleY,yt=rt.transformPerspective,bt=rt.force3D,vt=rt.target,xt=rt.zOrigin,kt="",St=bt==="auto"&&et&&et!==1||bt===!0;if(xt&&(ht!==_zeroDeg||ut!==_zeroDeg)){var Tt=parseFloat(ut)*_DEG2RAD,At=Math.sin(Tt),Et=Math.cos(Tt),$t;Tt=parseFloat(ht)*_DEG2RAD,$t=Math.cos(Tt),at=_addPxTranslate(vt,at,At*$t*-xt),st=_addPxTranslate(vt,st,-Math.sin(Tt)*-xt),lt=_addPxTranslate(vt,lt,Et*$t*-xt+xt)}yt!==_zeroPx&&(kt+="perspective("+yt+_endParenthesis),(it||ot)&&(kt+="translate("+it+"%, "+ot+"%) "),(St||at!==_zeroPx||st!==_zeroPx||lt!==_zeroPx)&&(kt+=lt!==_zeroPx||St?"translate3d("+at+", "+st+", "+lt+") ":"translate("+at+", "+st+_endParenthesis),ct!==_zeroDeg&&(kt+="rotate("+ct+_endParenthesis),ut!==_zeroDeg&&(kt+="rotateY("+ut+_endParenthesis),ht!==_zeroDeg&&(kt+="rotateX("+ht+_endParenthesis),(dt!==_zeroDeg||pt!==_zeroDeg)&&(kt+="skew("+dt+", "+pt+_endParenthesis),(mt!==1||gt!==1)&&(kt+="scale("+mt+", "+gt+_endParenthesis),vt.style[_transformProp]=kt||"translate(0, 0)"},_renderSVGTransforms=function(et,nt){var rt=nt||this,it=rt.xPercent,ot=rt.yPercent,at=rt.x,st=rt.y,lt=rt.rotation,ct=rt.skewX,ut=rt.skewY,ht=rt.scaleX,dt=rt.scaleY,pt=rt.target,mt=rt.xOrigin,gt=rt.yOrigin,yt=rt.xOffset,bt=rt.yOffset,vt=rt.forceCSS,xt=parseFloat(at),kt=parseFloat(st),St,Tt,At,Et,$t;lt=parseFloat(lt),ct=parseFloat(ct),ut=parseFloat(ut),ut&&(ut=parseFloat(ut),ct+=ut,lt+=ut),lt||ct?(lt*=_DEG2RAD,ct*=_DEG2RAD,St=Math.cos(lt)*ht,Tt=Math.sin(lt)*ht,At=Math.sin(lt-ct)*-dt,Et=Math.cos(lt-ct)*dt,ct&&(ut*=_DEG2RAD,$t=Math.tan(ct-ut),$t=Math.sqrt(1+$t*$t),At*=$t,Et*=$t,ut&&($t=Math.tan(ut),$t=Math.sqrt(1+$t*$t),St*=$t,Tt*=$t)),St=_round(St),Tt=_round(Tt),At=_round(At),Et=_round(Et)):(St=ht,Et=dt,Tt=At=0),(xt&&!~(at+"").indexOf("px")||kt&&!~(st+"").indexOf("px"))&&(xt=_convertToUnit(pt,"x",at,"px"),kt=_convertToUnit(pt,"y",st,"px")),(mt||gt||yt||bt)&&(xt=_round(xt+mt-(mt*St+gt*At)+yt),kt=_round(kt+gt-(mt*Tt+gt*Et)+bt)),(it||ot)&&($t=pt.getBBox(),xt=_round(xt+it/100*$t.width),kt=_round(kt+ot/100*$t.height)),$t="matrix("+St+","+Tt+","+At+","+Et+","+xt+","+kt+")",pt.setAttribute("transform",$t),vt&&(pt.style[_transformProp]=$t)},_addRotationalPropTween=function(et,nt,rt,it,ot){var at=360,st=_isString$1(ot),lt=parseFloat(ot)*(st&&~ot.indexOf("rad")?_RAD2DEG:1),ct=lt-it,ut=it+ct+"deg",ht,dt;return st&&(ht=ot.split("_")[1],ht==="short"&&(ct%=at,ct!==ct%(at/2)&&(ct+=ct<0?at:-at)),ht==="cw"&&ct<0?ct=(ct+at*_bigNum)%at-~~(ct/at)*at:ht==="ccw"&&ct>0&&(ct=(ct-at*_bigNum)%at-~~(ct/at)*at)),et._pt=dt=new PropTween(et._pt,nt,rt,it,ct,_renderPropWithEnd),dt.e=ut,dt.u="deg",et._props.push(rt),dt},_assign=function(et,nt){for(var rt in nt)et[rt]=nt[rt];return et},_addRawTransformPTs=function(et,nt,rt){var it=_assign({},rt._gsap),ot="perspective,force3D,transformOrigin,svgOrigin",at=rt.style,st,lt,ct,ut,ht,dt,pt,mt;it.svg?(ct=rt.getAttribute("transform"),rt.setAttribute("transform",""),at[_transformProp]=nt,st=_parseTransform(rt,1),_removeProperty(rt,_transformProp),rt.setAttribute("transform",ct)):(ct=getComputedStyle(rt)[_transformProp],at[_transformProp]=nt,st=_parseTransform(rt,1),at[_transformProp]=ct);for(lt in _transformProps)ct=it[lt],ut=st[lt],ct!==ut&&ot.indexOf(lt)<0&&(pt=getUnit(ct),mt=getUnit(ut),ht=pt!==mt?_convertToUnit(rt,lt,ct,mt):parseFloat(ct),dt=parseFloat(ut),et._pt=new PropTween(et._pt,st,lt,ht,dt-ht,_renderCSSProp),et._pt.u=mt||0,et._props.push(lt));_assign(st,it)};_forEachName("padding,margin,Width,Radius",function(tt,et){var nt="Top",rt="Right",it="Bottom",ot="Left",at=(et<3?[nt,rt,it,ot]:[nt+ot,nt+rt,it+rt,it+ot]).map(function(st){return et<2?tt+st:"border"+st+tt});_specialProps[et>1?"border"+tt:tt]=function(st,lt,ct,ut,ht){var dt,pt;if(arguments.length<4)return dt=at.map(function(mt){return _get$1(st,mt,ct)}),pt=dt.join(" "),pt.split(dt[0]).length===5?dt[0]:pt;dt=(ut+"").split(" "),pt={},at.forEach(function(mt,gt){return pt[mt]=dt[gt]=dt[gt]||dt[(gt-1)/2|0]}),st.init(lt,pt,ht)}});var CSSPlugin={name:"css",register:_initCore,targetTest:function(et){return et.style&&et.nodeType},init:function(et,nt,rt,it,ot){var at=this._props,st=et.style,lt=rt.vars.startAt,ct,ut,ht,dt,pt,mt,gt,yt,bt,vt,xt,kt,St,Tt,At,Et;_pluginInitted||_initCore(),this.styles=this.styles||_getStyleSaver(et),Et=this.styles.props,this.tween=rt;for(gt in nt)if(gt!=="autoRound"&&(ut=nt[gt],!(_plugins[gt]&&_checkPlugin(gt,nt,rt,it,et,ot)))){if(pt=typeof ut,mt=_specialProps[gt],pt==="function"&&(ut=ut.call(rt,it,et,ot),pt=typeof ut),pt==="string"&&~ut.indexOf("random(")&&(ut=_replaceRandom(ut)),mt)mt(this,et,gt,ut,rt)&&(At=1);else if(gt.substr(0,2)==="--")ct=(getComputedStyle(et).getPropertyValue(gt)+"").trim(),ut+="",_colorExp.lastIndex=0,_colorExp.test(ct)||(yt=getUnit(ct),bt=getUnit(ut)),bt?yt!==bt&&(ct=_convertToUnit(et,gt,ct,bt)+bt):yt&&(ut+=yt),this.add(st,"setProperty",ct,ut,it,ot,0,0,gt),at.push(gt),Et.push(gt,0,st[gt]);else if(pt!=="undefined"){if(lt&> in lt?(ct=typeof lt[gt]=="function"?lt[gt].call(rt,it,et,ot):lt[gt],_isString$1(ct)&&~ct.indexOf("random(")&&(ct=_replaceRandom(ct)),getUnit(ct+"")||(ct+=_config.units[gt]||getUnit(_get$1(et,gt))||""),(ct+"").charAt(1)==="="&&(ct=_get$1(et,gt))):ct=_get$1(et,gt),dt=parseFloat(ct),vt=pt==="string"&&ut.charAt(1)==="="&&ut.substr(0,2),vt&&(ut=ut.substr(2)),ht=parseFloat(ut),gt in _propertyAliases&&(gt==="autoAlpha"&&(dt===1&&_get$1(et,"visibility")==="hidden"&&ht&&(dt=0),Et.push("visibility",0,st.visibility),_addNonTweeningPT(this,st,"visibility",dt?"inherit":"hidden",ht?"inherit":"hidden",!ht)),gt!=="scale"&>!=="transform"&&(gt=_propertyAliases[gt],~gt.indexOf(",")&&(gt=gt.split(",")[0]))),xt=gt in _transformProps,xt){if(this.styles.save(gt),kt||(St=et._gsap,St.renderTransform&&!nt.parseTransform||_parseTransform(et,nt.parseTransform),Tt=nt.smoothOrigin!==!1&&St.smooth,kt=this._pt=new PropTween(this._pt,st,_transformProp,0,1,St.renderTransform,St,0,-1),kt.dep=1),gt==="scale")this._pt=new PropTween(this._pt,St,"scaleY",St.scaleY,(vt?_parseRelative(St.scaleY,vt+ht):ht)-St.scaleY||0,_renderCSSProp),this._pt.u=0,at.push("scaleY",gt),gt+="X";else if(gt==="transformOrigin"){Et.push(_transformOriginProp,0,st[_transformOriginProp]),ut=_convertKeywordsToPercentages(ut),St.svg?_applySVGOrigin(et,ut,0,Tt,0,this):(bt=parseFloat(ut.split(" ")[2])||0,bt!==St.zOrigin&&_addNonTweeningPT(this,St,"zOrigin",St.zOrigin,bt),_addNonTweeningPT(this,st,gt,_firstTwoOnly(ct),_firstTwoOnly(ut)));continue}else if(gt==="svgOrigin"){_applySVGOrigin(et,ut,1,Tt,0,this);continue}else if(gt in _rotationalProperties){_addRotationalPropTween(this,St,gt,dt,vt?_parseRelative(dt,vt+ut):ut);continue}else if(gt==="smoothOrigin"){_addNonTweeningPT(this,St,"smooth",St.smooth,ut);continue}else if(gt==="force3D"){St[gt]=ut;continue}else if(gt==="transform"){_addRawTransformPTs(this,ut,et);continue}}else gt in st||(gt=_checkPropPrefix(gt)||gt);if(xt||(ht||ht===0)&&(dt||dt===0)&&!_complexExp.test(ut)&> in st)yt=(ct+"").substr((dt+"").length),ht||(ht=0),bt=getUnit(ut)||(gt in _config.units?_config.units[gt]:yt),yt!==bt&&(dt=_convertToUnit(et,gt,ct,bt)),this._pt=new PropTween(this._pt,xt?St:st,gt,dt,(vt?_parseRelative(dt,vt+ht):ht)-dt,!xt&&(bt==="px"||gt==="zIndex")&&nt.autoRound!==!1?_renderRoundedCSSProp:_renderCSSProp),this._pt.u=bt||0,yt!==bt&&bt!=="%"&&(this._pt.b=ct,this._pt.r=_renderCSSPropWithBeginning);else if(gt in st)_tweenComplexCSSString.call(this,et,gt,ct,vt?vt+ut:ut);else if(gt in et)this.add(et,gt,ct||et[gt],vt?vt+ut:ut,it,ot);else if(gt!=="parseTransform"){_missingPlugin(gt,ut);continue}xt||(gt in st?Et.push(gt,0,st[gt]):Et.push(gt,1,ct||et[gt])),at.push(gt)}}At&&_sortPropTweensByPriority(this)},render:function(et,nt){if(nt.tween._time||!_reverting())for(var rt=nt._pt;rt;)rt.r(et,rt.d),rt=rt._next;else nt.styles.revert()},get:_get$1,aliases:_propertyAliases,getSetter:function(et,nt,rt){var it=_propertyAliases[nt];return it&&it.indexOf(",")<0&&(nt=it),nt in _transformProps&&nt!==_transformOriginProp&&(et._gsap.x||_get$1(et,"x"))?rt&&_recentSetterPlugin===rt?nt==="scale"?_setterScale:_setterTransform:(_recentSetterPlugin=rt||{})&&(nt==="scale"?_setterScaleWithRender:_setterTransformWithRender):et.style&&!_isUndefined(et.style[nt])?_setterCSSStyle:~nt.indexOf("-")?_setterCSSProp:_getSetter(et,nt)},core:{_removeProperty,_getMatrix}};gsap.utils.checkPrefix=_checkPropPrefix;gsap.core.getStyleSaver=_getStyleSaver;(function(tt,et,nt,rt){var it=_forEachName(tt+","+et+","+nt,function(ot){_transformProps[ot]=1});_forEachName(et,function(ot){_config.units[ot]="deg",_rotationalProperties[ot]=1}),_propertyAliases[it[13]]=tt+","+et,_forEachName(rt,function(ot){var at=ot.split(":");_propertyAliases[at[1]]=it[at[0]]})})("x,y,z,scale,scaleX,scaleY,xPercent,yPercent","rotation,rotationX,rotationY,skewX,skewY","transform,transformOrigin,svgOrigin,force3D,smoothOrigin,transformPerspective","0:translateX,1:translateY,2:translateZ,8:rotate,8:rotationZ,8:rotateZ,9:rotateX,10:rotateY");_forEachName("x,y,z,top,right,bottom,left,width,height,fontSize,padding,margin,perspective",function(tt){_config.units[tt]="px"});gsap.registerPlugin(CSSPlugin);var gsapWithCSS=gsap.registerPlugin(CSSPlugin)||gsap;gsapWithCSS.core.Tween;const createRoundedBoxGeometry=(tt,et,nt,rt,it)=>{const ot=new Shape$1,at=1e-5;ot.absarc(at,at,at,-Math.PI/2,-Math.PI,!0),ot.absarc(at,et-rt*2,at,Math.PI,Math.PI/2,!0),ot.absarc(tt-rt*2,et-rt*2,at,Math.PI/2,0,!0),ot.absarc(tt-rt*2,at,at,0,-Math.PI/2,!0);const st=new ExtrudeGeometry(ot,{depth:nt-rt*2,bevelEnabled:!0,bevelSegments:it,steps:2,bevelSize:rt,bevelThickness:rt,curveSegments:it});st.center();const lt=[],ct=st.getAttribute("normal"),ut=st.getAttribute("position");for(let ht=0;ht.9?(mt=pt.x/tt+.5,gt=1-(pt.z/nt+.5)):Math.abs(dt.x)>.9?(mt=-pt.z/nt+.5,gt=1-(-pt.y/et+.5)):Math.abs(dt.z)>.9&&(mt=pt.x/tt+.5,gt=1-(-pt.y/et+.5)),lt.push(mt,gt)}return st.setAttribute("uv",new Float32BufferAttribute(lt,2)),st};createRoundedBoxGeometry(10,10,10,2,10);const boxGeometry=new BoxGeometry(10,10,10),isMainTopic=tt=>tt.node_type==="topic"&&(tt.scale||1)>5,meshRenderLimit=500,meshRenderRadius=800;let nearbyNodeTimeout=null;const nearbyNodeTimeoutCycle=500,getNearbyNodeIds=(tt,et)=>{if(nearbyNodeTimeout)return null;nearbyNodeTimeout=setTimeout(()=>{nearbyNodeTimeout&&(clearTimeout(nearbyNodeTimeout),nearbyNodeTimeout=null)},nearbyNodeTimeoutCycle);const nt=[];return tt.forEach(it=>{const ot=et.position.distanceTo(variableVector3$1.set(it.x,it.y,it.z));otit.distance-ot.distance).slice(0,meshRenderLimit).map(it=>it.id)},initialCameraPosition=new Vector3(5e3,600,1600),arriveDistance=100,topicArriveDistance=600,selectionGraphDistance=2e3,selectionGraphCameraPosition={x:172.7392402058252,y:-239.04675366094037,z:-2e3},version$1="14.8.49",createExtendedExponentialRampToValueAutomationEvent=(tt,et,nt)=>({endTime:et,insertTime:nt,type:"exponentialRampToValue",value:tt}),createExtendedLinearRampToValueAutomationEvent=(tt,et,nt)=>({endTime:et,insertTime:nt,type:"linearRampToValue",value:tt}),createSetValueAutomationEvent=(tt,et)=>({startTime:et,type:"setValue",value:tt}),createSetValueCurveAutomationEvent=(tt,et,nt)=>({duration:nt,startTime:et,type:"setValueCurve",values:tt}),getTargetValueAtTime=(tt,et,{startTime:nt,target:rt,timeConstant:it})=>rt+(et-rt)*Math.exp((nt-tt)/it),isExponentialRampToValueAutomationEvent=tt=>tt.type==="exponentialRampToValue",isLinearRampToValueAutomationEvent=tt=>tt.type==="linearRampToValue",isAnyRampToValueAutomationEvent=tt=>isExponentialRampToValueAutomationEvent(tt)||isLinearRampToValueAutomationEvent(tt),isSetValueAutomationEvent=tt=>tt.type==="setValue",isSetValueCurveAutomationEvent=tt=>tt.type==="setValueCurve",getValueOfAutomationEventAtIndexAtTime=(tt,et,nt,rt)=>{const it=tt[et];return it===void 0?rt:isAnyRampToValueAutomationEvent(it)||isSetValueAutomationEvent(it)?it.value:isSetValueCurveAutomationEvent(it)?it.values[it.values.length-1]:getTargetValueAtTime(nt,getValueOfAutomationEventAtIndexAtTime(tt,et-1,it.startTime,rt),it)},getEndTimeAndValueOfPreviousAutomationEvent=(tt,et,nt,rt,it)=>nt===void 0?[rt.insertTime,it]:isAnyRampToValueAutomationEvent(nt)?[nt.endTime,nt.value]:isSetValueAutomationEvent(nt)?[nt.startTime,nt.value]:isSetValueCurveAutomationEvent(nt)?[nt.startTime+nt.duration,nt.values[nt.values.length-1]]:[nt.startTime,getValueOfAutomationEventAtIndexAtTime(tt,et-1,nt.startTime,it)],isCancelAndHoldAutomationEvent=tt=>tt.type==="cancelAndHold",isCancelScheduledValuesAutomationEvent=tt=>tt.type==="cancelScheduledValues",getEventTime=tt=>isCancelAndHoldAutomationEvent(tt)||isCancelScheduledValuesAutomationEvent(tt)?tt.cancelTime:isExponentialRampToValueAutomationEvent(tt)||isLinearRampToValueAutomationEvent(tt)?tt.endTime:tt.startTime,getExponentialRampValueAtTime=(tt,et,nt,{endTime:rt,value:it})=>nt===it?it:0nt+(tt-et)/(rt-et)*(it-nt),interpolateValue=(tt,et)=>{const nt=Math.floor(et),rt=Math.ceil(et);return nt===rt?tt[nt]:(1-(et-nt))*tt[nt]+(1-(rt-et))*tt[rt]},getValueCurveValueAtTime=(tt,{duration:et,startTime:nt,values:rt})=>{const it=(tt-nt)/et*(rt.length-1);return interpolateValue(rt,it)},isSetTargetAutomationEvent=tt=>tt.type==="setTarget";class AutomationEventList{constructor(et){this._automationEvents=[],this._currenTime=0,this._defaultValue=et}[Symbol.iterator](){return this._automationEvents[Symbol.iterator]()}add(et){const nt=getEventTime(et);if(isCancelAndHoldAutomationEvent(et)||isCancelScheduledValuesAutomationEvent(et)){const rt=this._automationEvents.findIndex(ot=>isCancelScheduledValuesAutomationEvent(et)&&isSetValueCurveAutomationEvent(ot)?ot.startTime+ot.duration>=nt:getEventTime(ot)>=nt),it=this._automationEvents[rt];if(rt!==-1&&(this._automationEvents=this._automationEvents.slice(0,rt)),isCancelAndHoldAutomationEvent(et)){const ot=this._automationEvents[this._automationEvents.length-1];if(it!==void 0&&isAnyRampToValueAutomationEvent(it)){if(ot!==void 0&&isSetTargetAutomationEvent(ot))throw new Error("The internal list is malformed.");const at=ot===void 0?it.insertTime:isSetValueCurveAutomationEvent(ot)?ot.startTime+ot.duration:getEventTime(ot),st=ot===void 0?this._defaultValue:isSetValueCurveAutomationEvent(ot)?ot.values[ot.values.length-1]:ot.value,lt=isExponentialRampToValueAutomationEvent(it)?getExponentialRampValueAtTime(nt,at,st,it):getLinearRampValueAtTime(nt,at,st,it),ct=isExponentialRampToValueAutomationEvent(it)?createExtendedExponentialRampToValueAutomationEvent(lt,nt,this._currenTime):createExtendedLinearRampToValueAutomationEvent(lt,nt,this._currenTime);this._automationEvents.push(ct)}if(ot!==void 0&&isSetTargetAutomationEvent(ot)&&this._automationEvents.push(createSetValueAutomationEvent(this.getValue(nt),nt)),ot!==void 0&&isSetValueCurveAutomationEvent(ot)&&ot.startTime+ot.duration>nt){const at=nt-ot.startTime,st=(ot.values.length-1)/ot.duration,lt=Math.max(2,1+Math.ceil(at*st)),ct=at/(lt-1)*st,ut=ot.values.slice(0,lt);if(ct<1)for(let ht=1;htgetEventTime(at)>nt),it=rt===-1?this._automationEvents[this._automationEvents.length-1]:this._automationEvents[rt-1];if(it!==void 0&&isSetValueCurveAutomationEvent(it)&&getEventTime(it)+it.duration>nt)return!1;const ot=isExponentialRampToValueAutomationEvent(et)?createExtendedExponentialRampToValueAutomationEvent(et.value,et.endTime,this._currenTime):isLinearRampToValueAutomationEvent(et)?createExtendedLinearRampToValueAutomationEvent(et.value,nt,this._currenTime):et;if(rt===-1)this._automationEvents.push(ot);else{if(isSetValueCurveAutomationEvent(et)&&nt+et.duration>getEventTime(this._automationEvents[rt]))return!1;this._automationEvents.splice(rt,0,ot)}}return!0}flush(et){const nt=this._automationEvents.findIndex(rt=>getEventTime(rt)>et);if(nt>1){const rt=this._automationEvents.slice(nt-1),it=rt[0];isSetTargetAutomationEvent(it)&&rt.unshift(createSetValueAutomationEvent(getValueOfAutomationEventAtIndexAtTime(this._automationEvents,nt-2,it.startTime,this._defaultValue),it.startTime)),this._automationEvents=rt}}getValue(et){if(this._automationEvents.length===0)return this._defaultValue;const nt=this._automationEvents.findIndex(at=>getEventTime(at)>et),rt=this._automationEvents[nt],it=(nt===-1?this._automationEvents.length:nt)-1,ot=this._automationEvents[it];if(ot!==void 0&&isSetTargetAutomationEvent(ot)&&(rt===void 0||!isAnyRampToValueAutomationEvent(rt)||rt.insertTime>et))return getTargetValueAtTime(et,getValueOfAutomationEventAtIndexAtTime(this._automationEvents,it-1,ot.startTime,this._defaultValue),ot);if(ot!==void 0&&isSetValueAutomationEvent(ot)&&(rt===void 0||!isAnyRampToValueAutomationEvent(rt)))return ot.value;if(ot!==void 0&&isSetValueCurveAutomationEvent(ot)&&(rt===void 0||!isAnyRampToValueAutomationEvent(rt)||ot.startTime+ot.duration>et))return et({cancelTime:tt,type:"cancelAndHold"}),createCancelScheduledValuesAutomationEvent=tt=>({cancelTime:tt,type:"cancelScheduledValues"}),createExponentialRampToValueAutomationEvent=(tt,et)=>({endTime:et,type:"exponentialRampToValue",value:tt}),createLinearRampToValueAutomationEvent=(tt,et)=>({endTime:et,type:"linearRampToValue",value:tt}),createSetTargetAutomationEvent=(tt,et,nt)=>({startTime:et,target:tt,timeConstant:nt,type:"setTarget"}),createAbortError=()=>new DOMException("","AbortError"),createAddActiveInputConnectionToAudioNode=tt=>(et,nt,[rt,it,ot],at)=>{tt(et[it],[nt,rt,ot],st=>st[0]===nt&&st[1]===rt,at)},createAddAudioNodeConnections=tt=>(et,nt,rt)=>{const it=[];for(let ot=0;ot(et,nt)=>{tt.set(et,{activeInputs:new Set,passiveInputs:new WeakMap,renderer:nt})},ACTIVE_AUDIO_NODE_STORE=new WeakSet,AUDIO_NODE_CONNECTIONS_STORE=new WeakMap,AUDIO_NODE_STORE=new WeakMap,AUDIO_PARAM_CONNECTIONS_STORE=new WeakMap,AUDIO_PARAM_STORE=new WeakMap,CONTEXT_STORE=new WeakMap,EVENT_LISTENERS=new WeakMap,CYCLE_COUNTERS=new WeakMap,NODE_NAME_TO_PROCESSOR_CONSTRUCTOR_MAPS=new WeakMap,NODE_TO_PROCESSOR_MAPS=new WeakMap,handler={construct(){return handler}},isConstructible=tt=>{try{const et=new Proxy(tt,handler);new et}catch{return!1}return!0},IMPORT_STATEMENT_REGEX=/^import(?:(?:[\s]+[\w]+|(?:[\s]+[\w]+[\s]*,)?[\s]*\{[\s]*[\w]+(?:[\s]+as[\s]+[\w]+)?(?:[\s]*,[\s]*[\w]+(?:[\s]+as[\s]+[\w]+)?)*[\s]*}|(?:[\s]+[\w]+[\s]*,)?[\s]*\*[\s]+as[\s]+[\w]+)[\s]+from)?(?:[\s]*)("([^"\\]|\\.)+"|'([^'\\]|\\.)+')(?:[\s]*);?/,splitImportStatements=(tt,et)=>{const nt=[];let rt=tt.replace(/^[\s]+/,""),it=rt.match(IMPORT_STATEMENT_REGEX);for(;it!==null;){const ot=it[1].slice(1,-1),at=it[0].replace(/([\s]+)?;?$/,"").replace(ot,new URL(ot,et).toString());nt.push(at),rt=rt.slice(it[0].length).replace(/^[\s]+/,""),it=rt.match(IMPORT_STATEMENT_REGEX)}return[nt.join(";"),rt]},verifyParameterDescriptors=tt=>{if(tt!==void 0&&!Array.isArray(tt))throw new TypeError("The parameterDescriptors property of given value for processorCtor is not an array.")},verifyProcessorCtor=tt=>{if(!isConstructible(tt))throw new TypeError("The given value for processorCtor should be a constructor.");if(tt.prototype===null||typeof tt.prototype!="object")throw new TypeError("The given value for processorCtor should have a prototype.")},createAddAudioWorkletModule=(tt,et,nt,rt,it,ot,at,st,lt,ct,ut,ht,dt)=>{let pt=0;return(mt,gt,yt={credentials:"omit"})=>{const bt=ut.get(mt);if(bt!==void 0&&bt.has(gt))return Promise.resolve();const vt=ct.get(mt);if(vt!==void 0){const St=vt.get(gt);if(St!==void 0)return St}const xt=ot(mt),kt=xt.audioWorklet===void 0?it(gt).then(([St,Tt])=>{const[At,Et]=splitImportStatements(St,Tt),$t=`${At};((a,b)=>{(a[b]=a[b]||[]).push((AudioWorkletProcessor,global,registerProcessor,sampleRate,self,window)=>{${Et} -})})(window,'_AWGS')`;return nt($t)}).then(()=>{const St=dt._AWGS.pop();if(St===void 0)throw new SyntaxError;rt(xt.currentTime,xt.sampleRate,()=>St(class{},void 0,(Tt,At)=>{if(Tt.trim()==="")throw et();const Et=NODE_NAME_TO_PROCESSOR_CONSTRUCTOR_MAPS.get(xt);if(Et!==void 0){if(Et.has(Tt))throw et();verifyProcessorCtor(At),verifyParameterDescriptors(At.parameterDescriptors),Et.set(Tt,At)}else verifyProcessorCtor(At),verifyParameterDescriptors(At.parameterDescriptors),NODE_NAME_TO_PROCESSOR_CONSTRUCTOR_MAPS.set(xt,new Map([[Tt,At]]))},xt.sampleRate,void 0,void 0))}):Promise.all([it(gt),Promise.resolve(tt(ht,ht))]).then(([[St,Tt],At])=>{const Et=pt+1;pt=Et;const[$t,Dt]=splitImportStatements(St,Tt),wt=`${$t};((AudioWorkletProcessor,registerProcessor)=>{${Dt} -})(${At?"AudioWorkletProcessor":"class extends AudioWorkletProcessor {__b=new WeakSet();constructor(){super();(p=>p.postMessage=(q=>(m,t)=>q.call(p,m,t?t.filter(u=>!this.__b.has(u)):t))(p.postMessage))(this.port)}}"},(n,p)=>registerProcessor(n,class extends p{${At?"":"__c = (a) => a.forEach(e=>this.__b.add(e.buffer));"}process(i,o,p){${At?"":"i.forEach(this.__c);o.forEach(this.__c);this.__c(Object.values(p));"}return super.process(i.map(j=>j.some(k=>k.length===0)?[]:j),o,p)}}));registerProcessor('__sac${Et}',class extends AudioWorkletProcessor{process(){return !1}})`,It=new Blob([wt],{type:"application/javascript; charset=utf-8"}),Ot=URL.createObjectURL(It);return xt.audioWorklet.addModule(Ot,yt).then(()=>{if(st(xt))return xt;const Wt=at(xt);return Wt.audioWorklet.addModule(Ot,yt).then(()=>Wt)}).then(Wt=>{if(lt===null)throw new SyntaxError;try{new lt(Wt,`__sac${Et}`)}catch{throw new SyntaxError}}).finally(()=>URL.revokeObjectURL(Ot))});return vt===void 0?ct.set(mt,new Map([[gt,kt]])):vt.set(gt,kt),kt.then(()=>{const St=ut.get(mt);St===void 0?ut.set(mt,new Set([gt])):St.add(gt)}).finally(()=>{const St=ct.get(mt);St!==void 0&&St.delete(gt)}),kt}},getValueForKey=(tt,et)=>{const nt=tt.get(et);if(nt===void 0)throw new Error("A value with the given key could not be found.");return nt},pickElementFromSet=(tt,et)=>{const nt=Array.from(tt).filter(et);if(nt.length>1)throw Error("More than one element was found.");if(nt.length===0)throw Error("No element was found.");const[rt]=nt;return tt.delete(rt),rt},deletePassiveInputConnectionToAudioNode=(tt,et,nt,rt)=>{const it=getValueForKey(tt,et),ot=pickElementFromSet(it,at=>at[0]===nt&&at[1]===rt);return it.size===0&&tt.delete(et),ot},getEventListenersOfAudioNode=tt=>getValueForKey(EVENT_LISTENERS,tt),setInternalStateToActive=tt=>{if(ACTIVE_AUDIO_NODE_STORE.has(tt))throw new Error("The AudioNode is already stored.");ACTIVE_AUDIO_NODE_STORE.add(tt),getEventListenersOfAudioNode(tt).forEach(et=>et(!0))},isAudioWorkletNode=tt=>"port"in tt,setInternalStateToPassive=tt=>{if(!ACTIVE_AUDIO_NODE_STORE.has(tt))throw new Error("The AudioNode is not stored.");ACTIVE_AUDIO_NODE_STORE.delete(tt),getEventListenersOfAudioNode(tt).forEach(et=>et(!1))},setInternalStateToPassiveWhenNecessary=(tt,et)=>{!isAudioWorkletNode(tt)&&et.every(nt=>nt.size===0)&&setInternalStateToPassive(tt)},createAddConnectionToAudioNode=(tt,et,nt,rt,it,ot,at,st,lt,ct,ut,ht,dt)=>{const pt=new WeakMap;return(mt,gt,yt,bt,vt)=>{const{activeInputs:xt,passiveInputs:kt}=ot(gt),{outputs:St}=ot(mt),Tt=st(mt),At=Et=>{const $t=lt(gt),Dt=lt(mt);if(Et){const jt=deletePassiveInputConnectionToAudioNode(kt,mt,yt,bt);tt(xt,mt,jt,!1),!vt&&!ht(mt)&&nt(Dt,$t,yt,bt),dt(gt)&&setInternalStateToActive(gt)}else{const jt=rt(xt,mt,yt,bt);et(kt,bt,jt,!1),!vt&&!ht(mt)&&it(Dt,$t,yt,bt);const Pt=at(gt);if(Pt===0)ut(gt)&&setInternalStateToPassiveWhenNecessary(gt,xt);else{const Ct=pt.get(gt);Ct!==void 0&&clearTimeout(Ct),pt.set(gt,setTimeout(()=>{ut(gt)&&setInternalStateToPassiveWhenNecessary(gt,xt)},Pt*1e3))}}};return ct(St,[gt,yt,bt],Et=>Et[0]===gt&&Et[1]===yt&&Et[2]===bt,!0)?(Tt.add(At),ut(mt)?tt(xt,mt,[yt,bt,At],!0):et(kt,bt,[mt,yt,At],!0),!0):!1}},createAddPassiveInputConnectionToAudioNode=tt=>(et,nt,[rt,it,ot],at)=>{const st=et.get(rt);st===void 0?et.set(rt,new Set([[it,nt,ot]])):tt(st,[it,nt,ot],lt=>lt[0]===it&<[1]===nt,at)},createAddSilentConnection=tt=>(et,nt)=>{const rt=tt(et,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete",gain:0});nt.connect(rt).connect(et.destination);const it=()=>{nt.removeEventListener("ended",it),nt.disconnect(rt),rt.disconnect()};nt.addEventListener("ended",it)},createAddUnrenderedAudioWorkletNode=tt=>(et,nt)=>{tt(et).add(nt)},DEFAULT_OPTIONS$j={channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",fftSize:2048,maxDecibels:-30,minDecibels:-100,smoothingTimeConstant:.8},createAnalyserNodeConstructor=(tt,et,nt,rt,it,ot)=>class extends tt{constructor(st,lt){const ct=it(st),ut={...DEFAULT_OPTIONS$j,...lt},ht=rt(ct,ut),dt=ot(ct)?et():null;super(st,!1,ht,dt),this._nativeAnalyserNode=ht}get fftSize(){return this._nativeAnalyserNode.fftSize}set fftSize(st){this._nativeAnalyserNode.fftSize=st}get frequencyBinCount(){return this._nativeAnalyserNode.frequencyBinCount}get maxDecibels(){return this._nativeAnalyserNode.maxDecibels}set maxDecibels(st){const lt=this._nativeAnalyserNode.maxDecibels;if(this._nativeAnalyserNode.maxDecibels=st,!(st>this._nativeAnalyserNode.minDecibels))throw this._nativeAnalyserNode.maxDecibels=lt,nt()}get minDecibels(){return this._nativeAnalyserNode.minDecibels}set minDecibels(st){const lt=this._nativeAnalyserNode.minDecibels;if(this._nativeAnalyserNode.minDecibels=st,!(this._nativeAnalyserNode.maxDecibels>st))throw this._nativeAnalyserNode.minDecibels=lt,nt()}get smoothingTimeConstant(){return this._nativeAnalyserNode.smoothingTimeConstant}set smoothingTimeConstant(st){this._nativeAnalyserNode.smoothingTimeConstant=st}getByteFrequencyData(st){this._nativeAnalyserNode.getByteFrequencyData(st)}getByteTimeDomainData(st){this._nativeAnalyserNode.getByteTimeDomainData(st)}getFloatFrequencyData(st){this._nativeAnalyserNode.getFloatFrequencyData(st)}getFloatTimeDomainData(st){this._nativeAnalyserNode.getFloatTimeDomainData(st)}},isOwnedByContext=(tt,et)=>tt.context===et,createAnalyserNodeRendererFactory=(tt,et,nt)=>()=>{const rt=new WeakMap,it=async(ot,at)=>{let st=et(ot);if(!isOwnedByContext(st,at)){const ct={channelCount:st.channelCount,channelCountMode:st.channelCountMode,channelInterpretation:st.channelInterpretation,fftSize:st.fftSize,maxDecibels:st.maxDecibels,minDecibels:st.minDecibels,smoothingTimeConstant:st.smoothingTimeConstant};st=tt(at,ct)}return rt.set(at,st),await nt(ot,at,st),st};return{render(ot,at){const st=rt.get(at);return st!==void 0?Promise.resolve(st):it(ot,at)}}},testAudioBufferCopyChannelMethodsOutOfBoundsSupport=tt=>{try{tt.copyToChannel(new Float32Array(1),0,-1)}catch{return!1}return!0},createIndexSizeError=()=>new DOMException("","IndexSizeError"),wrapAudioBufferGetChannelDataMethod=tt=>{tt.getChannelData=(et=>nt=>{try{return et.call(tt,nt)}catch(rt){throw rt.code===12?createIndexSizeError():rt}})(tt.getChannelData)},DEFAULT_OPTIONS$i={numberOfChannels:1},createAudioBufferConstructor=(tt,et,nt,rt,it,ot,at,st)=>{let lt=null;return class ww{constructor(ut){if(it===null)throw new Error("Missing the native OfflineAudioContext constructor.");const{length:ht,numberOfChannels:dt,sampleRate:pt}={...DEFAULT_OPTIONS$i,...ut};lt===null&&(lt=new it(1,1,44100));const mt=rt!==null&&et(ot,ot)?new rt({length:ht,numberOfChannels:dt,sampleRate:pt}):lt.createBuffer(dt,ht,pt);if(mt.numberOfChannels===0)throw nt();return typeof mt.copyFromChannel!="function"?(at(mt),wrapAudioBufferGetChannelDataMethod(mt)):et(testAudioBufferCopyChannelMethodsOutOfBoundsSupport,()=>testAudioBufferCopyChannelMethodsOutOfBoundsSupport(mt))||st(mt),tt.add(mt),mt}static[Symbol.hasInstance](ut){return ut!==null&&typeof ut=="object"&&Object.getPrototypeOf(ut)===ww.prototype||tt.has(ut)}}},MOST_NEGATIVE_SINGLE_FLOAT=-34028234663852886e22,MOST_POSITIVE_SINGLE_FLOAT=-MOST_NEGATIVE_SINGLE_FLOAT,isActiveAudioNode=tt=>ACTIVE_AUDIO_NODE_STORE.has(tt),DEFAULT_OPTIONS$h={buffer:null,channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",loop:!1,loopEnd:0,loopStart:0,playbackRate:1},createAudioBufferSourceNodeConstructor=(tt,et,nt,rt,it,ot,at,st)=>class extends tt{constructor(ct,ut){const ht=ot(ct),dt={...DEFAULT_OPTIONS$h,...ut},pt=it(ht,dt),mt=at(ht),gt=mt?et():null;super(ct,!1,pt,gt),this._audioBufferSourceNodeRenderer=gt,this._isBufferNullified=!1,this._isBufferSet=dt.buffer!==null,this._nativeAudioBufferSourceNode=pt,this._onended=null,this._playbackRate=nt(this,mt,pt.playbackRate,MOST_POSITIVE_SINGLE_FLOAT,MOST_NEGATIVE_SINGLE_FLOAT)}get buffer(){return this._isBufferNullified?null:this._nativeAudioBufferSourceNode.buffer}set buffer(ct){if(this._nativeAudioBufferSourceNode.buffer=ct,ct!==null){if(this._isBufferSet)throw rt();this._isBufferSet=!0}}get loop(){return this._nativeAudioBufferSourceNode.loop}set loop(ct){this._nativeAudioBufferSourceNode.loop=ct}get loopEnd(){return this._nativeAudioBufferSourceNode.loopEnd}set loopEnd(ct){this._nativeAudioBufferSourceNode.loopEnd=ct}get loopStart(){return this._nativeAudioBufferSourceNode.loopStart}set loopStart(ct){this._nativeAudioBufferSourceNode.loopStart=ct}get onended(){return this._onended}set onended(ct){const ut=typeof ct=="function"?st(this,ct):null;this._nativeAudioBufferSourceNode.onended=ut;const ht=this._nativeAudioBufferSourceNode.onended;this._onended=ht!==null&&ht===ut?ct:ht}get playbackRate(){return this._playbackRate}start(ct=0,ut=0,ht){if(this._nativeAudioBufferSourceNode.start(ct,ut,ht),this._audioBufferSourceNodeRenderer!==null&&(this._audioBufferSourceNodeRenderer.start=ht===void 0?[ct,ut]:[ct,ut,ht]),this.context.state!=="closed"){setInternalStateToActive(this);const dt=()=>{this._nativeAudioBufferSourceNode.removeEventListener("ended",dt),isActiveAudioNode(this)&&setInternalStateToPassive(this)};this._nativeAudioBufferSourceNode.addEventListener("ended",dt)}}stop(ct=0){this._nativeAudioBufferSourceNode.stop(ct),this._audioBufferSourceNodeRenderer!==null&&(this._audioBufferSourceNodeRenderer.stop=ct)}},createAudioBufferSourceNodeRendererFactory=(tt,et,nt,rt,it)=>()=>{const ot=new WeakMap;let at=null,st=null;const lt=async(ct,ut)=>{let ht=nt(ct);const dt=isOwnedByContext(ht,ut);if(!dt){const pt={buffer:ht.buffer,channelCount:ht.channelCount,channelCountMode:ht.channelCountMode,channelInterpretation:ht.channelInterpretation,loop:ht.loop,loopEnd:ht.loopEnd,loopStart:ht.loopStart,playbackRate:ht.playbackRate.value};ht=et(ut,pt),at!==null&&ht.start(...at),st!==null&&ht.stop(st)}return ot.set(ut,ht),dt?await tt(ut,ct.playbackRate,ht.playbackRate):await rt(ut,ct.playbackRate,ht.playbackRate),await it(ct,ut,ht),ht};return{set start(ct){at=ct},set stop(ct){st=ct},render(ct,ut){const ht=ot.get(ut);return ht!==void 0?Promise.resolve(ht):lt(ct,ut)}}},isAudioBufferSourceNode=tt=>"playbackRate"in tt,isBiquadFilterNode=tt=>"frequency"in tt&&"gain"in tt,isConstantSourceNode=tt=>"offset"in tt,isGainNode=tt=>!("frequency"in tt)&&"gain"in tt,isOscillatorNode=tt=>"detune"in tt&&"frequency"in tt,isStereoPannerNode=tt=>"pan"in tt,getAudioNodeConnections=tt=>getValueForKey(AUDIO_NODE_CONNECTIONS_STORE,tt),getAudioParamConnections=tt=>getValueForKey(AUDIO_PARAM_CONNECTIONS_STORE,tt),deactivateActiveAudioNodeInputConnections=(tt,et)=>{const{activeInputs:nt}=getAudioNodeConnections(tt);nt.forEach(it=>it.forEach(([ot])=>{et.includes(tt)||deactivateActiveAudioNodeInputConnections(ot,[...et,tt])}));const rt=isAudioBufferSourceNode(tt)?[tt.playbackRate]:isAudioWorkletNode(tt)?Array.from(tt.parameters.values()):isBiquadFilterNode(tt)?[tt.Q,tt.detune,tt.frequency,tt.gain]:isConstantSourceNode(tt)?[tt.offset]:isGainNode(tt)?[tt.gain]:isOscillatorNode(tt)?[tt.detune,tt.frequency]:isStereoPannerNode(tt)?[tt.pan]:[];for(const it of rt){const ot=getAudioParamConnections(it);ot!==void 0&&ot.activeInputs.forEach(([at])=>deactivateActiveAudioNodeInputConnections(at,et))}isActiveAudioNode(tt)&&setInternalStateToPassive(tt)},deactivateAudioGraph=tt=>{deactivateActiveAudioNodeInputConnections(tt.destination,[])},isValidLatencyHint=tt=>tt===void 0||typeof tt=="number"||typeof tt=="string"&&(tt==="balanced"||tt==="interactive"||tt==="playback"),createAudioContextConstructor=(tt,et,nt,rt,it,ot,at,st,lt)=>class extends tt{constructor(ut={}){if(lt===null)throw new Error("Missing the native AudioContext constructor.");let ht;try{ht=new lt(ut)}catch(mt){throw mt.code===12&&mt.message==="sampleRate is not in range"?nt():mt}if(ht===null)throw rt();if(!isValidLatencyHint(ut.latencyHint))throw new TypeError(`The provided value '${ut.latencyHint}' is not a valid enum value of type AudioContextLatencyCategory.`);if(ut.sampleRate!==void 0&&ht.sampleRate!==ut.sampleRate)throw nt();super(ht,2);const{latencyHint:dt}=ut,{sampleRate:pt}=ht;if(this._baseLatency=typeof ht.baseLatency=="number"?ht.baseLatency:dt==="balanced"?512/pt:dt==="interactive"||dt===void 0?256/pt:dt==="playback"?1024/pt:Math.max(2,Math.min(128,Math.round(dt*pt/128)))*128/pt,this._nativeAudioContext=ht,lt.name==="webkitAudioContext"?(this._nativeGainNode=ht.createGain(),this._nativeOscillatorNode=ht.createOscillator(),this._nativeGainNode.gain.value=1e-37,this._nativeOscillatorNode.connect(this._nativeGainNode).connect(ht.destination),this._nativeOscillatorNode.start()):(this._nativeGainNode=null,this._nativeOscillatorNode=null),this._state=null,ht.state==="running"){this._state="suspended";const mt=()=>{this._state==="suspended"&&(this._state=null),ht.removeEventListener("statechange",mt)};ht.addEventListener("statechange",mt)}}get baseLatency(){return this._baseLatency}get state(){return this._state!==null?this._state:this._nativeAudioContext.state}close(){return this.state==="closed"?this._nativeAudioContext.close().then(()=>{throw et()}):(this._state==="suspended"&&(this._state=null),this._nativeAudioContext.close().then(()=>{this._nativeGainNode!==null&&this._nativeOscillatorNode!==null&&(this._nativeOscillatorNode.stop(),this._nativeGainNode.disconnect(),this._nativeOscillatorNode.disconnect()),deactivateAudioGraph(this)}))}createMediaElementSource(ut){return new it(this,{mediaElement:ut})}createMediaStreamDestination(){return new ot(this)}createMediaStreamSource(ut){return new at(this,{mediaStream:ut})}createMediaStreamTrackSource(ut){return new st(this,{mediaStreamTrack:ut})}resume(){return this._state==="suspended"?new Promise((ut,ht)=>{const dt=()=>{this._nativeAudioContext.removeEventListener("statechange",dt),this._nativeAudioContext.state==="running"?ut():this.resume().then(ut,ht)};this._nativeAudioContext.addEventListener("statechange",dt)}):this._nativeAudioContext.resume().catch(ut=>{throw ut===void 0||ut.code===15?et():ut})}suspend(){return this._nativeAudioContext.suspend().catch(ut=>{throw ut===void 0?et():ut})}},createAudioDestinationNodeConstructor=(tt,et,nt,rt,it,ot,at,st)=>class extends tt{constructor(ct,ut){const ht=ot(ct),dt=at(ht),pt=it(ht,ut,dt),mt=dt?et(st):null;super(ct,!1,pt,mt),this._isNodeOfNativeOfflineAudioContext=dt,this._nativeAudioDestinationNode=pt}get channelCount(){return this._nativeAudioDestinationNode.channelCount}set channelCount(ct){if(this._isNodeOfNativeOfflineAudioContext)throw rt();if(ct>this._nativeAudioDestinationNode.maxChannelCount)throw nt();this._nativeAudioDestinationNode.channelCount=ct}get channelCountMode(){return this._nativeAudioDestinationNode.channelCountMode}set channelCountMode(ct){if(this._isNodeOfNativeOfflineAudioContext)throw rt();this._nativeAudioDestinationNode.channelCountMode=ct}get maxChannelCount(){return this._nativeAudioDestinationNode.maxChannelCount}},createAudioDestinationNodeRenderer=tt=>{const et=new WeakMap,nt=async(rt,it)=>{const ot=it.destination;return et.set(it,ot),await tt(rt,it,ot),ot};return{render(rt,it){const ot=et.get(it);return ot!==void 0?Promise.resolve(ot):nt(rt,it)}}},createAudioListenerFactory=(tt,et,nt,rt,it,ot,at,st)=>(lt,ct)=>{const ut=ct.listener,ht=()=>{const St=new Float32Array(1),Tt=et(ct,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"speakers",numberOfInputs:9}),At=at(ct);let Et=!1,$t=[0,0,-1,0,1,0],Dt=[0,0,0];const jt=()=>{if(Et)return;Et=!0;const It=rt(ct,256,9,0);It.onaudioprocess=({inputBuffer:Ot})=>{const Wt=[ot(Ot,St,0),ot(Ot,St,1),ot(Ot,St,2),ot(Ot,St,3),ot(Ot,St,4),ot(Ot,St,5)];Wt.some((Ft,Nt)=>Ft!==$t[Nt])&&(ut.setOrientation(...Wt),$t=Wt);const zt=[ot(Ot,St,6),ot(Ot,St,7),ot(Ot,St,8)];zt.some((Ft,Nt)=>Ft!==Dt[Nt])&&(ut.setPosition(...zt),Dt=zt)},Tt.connect(It)},Pt=It=>Ot=>{Ot!==$t[It]&&($t[It]=Ot,ut.setOrientation(...$t))},Ct=It=>Ot=>{Ot!==Dt[It]&&(Dt[It]=Ot,ut.setPosition(...Dt))},wt=(It,Ot,Wt)=>{const zt=nt(ct,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete",offset:Ot});zt.connect(Tt,0,It),zt.start(),Object.defineProperty(zt.offset,"defaultValue",{get(){return Ot}});const Ft=tt({context:lt},At,zt.offset,MOST_POSITIVE_SINGLE_FLOAT,MOST_NEGATIVE_SINGLE_FLOAT);return st(Ft,"value",Nt=>()=>Nt.call(Ft),Nt=>Ut=>{try{Nt.call(Ft,Ut)}catch(Mt){if(Mt.code!==9)throw Mt}jt(),At&&Wt(Ut)}),Ft.cancelAndHoldAtTime=(Nt=>At?()=>{throw it()}:(...Ut)=>{const Mt=Nt.apply(Ft,Ut);return jt(),Mt})(Ft.cancelAndHoldAtTime),Ft.cancelScheduledValues=(Nt=>At?()=>{throw it()}:(...Ut)=>{const Mt=Nt.apply(Ft,Ut);return jt(),Mt})(Ft.cancelScheduledValues),Ft.exponentialRampToValueAtTime=(Nt=>At?()=>{throw it()}:(...Ut)=>{const Mt=Nt.apply(Ft,Ut);return jt(),Mt})(Ft.exponentialRampToValueAtTime),Ft.linearRampToValueAtTime=(Nt=>At?()=>{throw it()}:(...Ut)=>{const Mt=Nt.apply(Ft,Ut);return jt(),Mt})(Ft.linearRampToValueAtTime),Ft.setTargetAtTime=(Nt=>At?()=>{throw it()}:(...Ut)=>{const Mt=Nt.apply(Ft,Ut);return jt(),Mt})(Ft.setTargetAtTime),Ft.setValueAtTime=(Nt=>At?()=>{throw it()}:(...Ut)=>{const Mt=Nt.apply(Ft,Ut);return jt(),Mt})(Ft.setValueAtTime),Ft.setValueCurveAtTime=(Nt=>At?()=>{throw it()}:(...Ut)=>{const Mt=Nt.apply(Ft,Ut);return jt(),Mt})(Ft.setValueCurveAtTime),Ft};return{forwardX:wt(0,0,Pt(0)),forwardY:wt(1,0,Pt(1)),forwardZ:wt(2,-1,Pt(2)),positionX:wt(6,0,Ct(0)),positionY:wt(7,0,Ct(1)),positionZ:wt(8,0,Ct(2)),upX:wt(3,0,Pt(3)),upY:wt(4,1,Pt(4)),upZ:wt(5,0,Pt(5))}},{forwardX:dt,forwardY:pt,forwardZ:mt,positionX:gt,positionY:yt,positionZ:bt,upX:vt,upY:xt,upZ:kt}=ut.forwardX===void 0?ht():ut;return{get forwardX(){return dt},get forwardY(){return pt},get forwardZ(){return mt},get positionX(){return gt},get positionY(){return yt},get positionZ(){return bt},get upX(){return vt},get upY(){return xt},get upZ(){return kt}}},isAudioNode$1=tt=>"context"in tt,isAudioNodeOutputConnection=tt=>isAudioNode$1(tt[0]),insertElementInSet=(tt,et,nt,rt)=>{for(const it of tt)if(nt(it)){if(rt)return!1;throw Error("The set contains at least one similar element.")}return tt.add(et),!0},addActiveInputConnectionToAudioParam=(tt,et,[nt,rt],it)=>{insertElementInSet(tt,[et,nt,rt],ot=>ot[0]===et&&ot[1]===nt,it)},addPassiveInputConnectionToAudioParam=(tt,[et,nt,rt],it)=>{const ot=tt.get(et);ot===void 0?tt.set(et,new Set([[nt,rt]])):insertElementInSet(ot,[nt,rt],at=>at[0]===nt,it)},isNativeAudioNodeFaker=tt=>"inputs"in tt,connectNativeAudioNodeToNativeAudioNode=(tt,et,nt,rt)=>{if(isNativeAudioNodeFaker(et)){const it=et.inputs[rt];return tt.connect(it,nt,0),[it,nt,0]}return tt.connect(et,nt,rt),[et,nt,rt]},deleteActiveInputConnection=(tt,et,nt)=>{for(const rt of tt)if(rt[0]===et&&rt[1]===nt)return tt.delete(rt),rt;return null},deleteActiveInputConnectionToAudioParam=(tt,et,nt)=>pickElementFromSet(tt,rt=>rt[0]===et&&rt[1]===nt),deleteEventListenerOfAudioNode=(tt,et)=>{if(!getEventListenersOfAudioNode(tt).delete(et))throw new Error("Missing the expected event listener.")},deletePassiveInputConnectionToAudioParam=(tt,et,nt)=>{const rt=getValueForKey(tt,et),it=pickElementFromSet(rt,ot=>ot[0]===nt);return rt.size===0&&tt.delete(et),it},disconnectNativeAudioNodeFromNativeAudioNode=(tt,et,nt,rt)=>{isNativeAudioNodeFaker(et)?tt.disconnect(et.inputs[rt],nt,0):tt.disconnect(et,nt,rt)},getNativeAudioNode=tt=>getValueForKey(AUDIO_NODE_STORE,tt),getNativeAudioParam=tt=>getValueForKey(AUDIO_PARAM_STORE,tt),isPartOfACycle=tt=>CYCLE_COUNTERS.has(tt),isPassiveAudioNode=tt=>!ACTIVE_AUDIO_NODE_STORE.has(tt),testAudioNodeDisconnectMethodSupport=(tt,et)=>new Promise(nt=>{if(et!==null)nt(!0);else{const rt=tt.createScriptProcessor(256,1,1),it=tt.createGain(),ot=tt.createBuffer(1,2,44100),at=ot.getChannelData(0);at[0]=1,at[1]=1;const st=tt.createBufferSource();st.buffer=ot,st.loop=!0,st.connect(rt).connect(tt.destination),st.connect(it),st.disconnect(it),rt.onaudioprocess=lt=>{const ct=lt.inputBuffer.getChannelData(0);Array.prototype.some.call(ct,ut=>ut===1)?nt(!0):nt(!1),st.stop(),rt.onaudioprocess=null,st.disconnect(rt),rt.disconnect(tt.destination)},st.start()}}),visitEachAudioNodeOnce=(tt,et)=>{const nt=new Map;for(const rt of tt)for(const it of rt){const ot=nt.get(it);nt.set(it,ot===void 0?1:ot+1)}nt.forEach((rt,it)=>et(it,rt))},isNativeAudioNode$1=tt=>"context"in tt,wrapAudioNodeDisconnectMethod=tt=>{const et=new Map;tt.connect=(nt=>(rt,it=0,ot=0)=>{const at=isNativeAudioNode$1(rt)?nt(rt,it,ot):nt(rt,it),st=et.get(rt);return st===void 0?et.set(rt,[{input:ot,output:it}]):st.every(lt=>lt.input!==ot||lt.output!==it)&&st.push({input:ot,output:it}),at})(tt.connect.bind(tt)),tt.disconnect=(nt=>(rt,it,ot)=>{if(nt.apply(tt),rt===void 0)et.clear();else if(typeof rt=="number")for(const[at,st]of et){const lt=st.filter(ct=>ct.output!==rt);lt.length===0?et.delete(at):et.set(at,lt)}else if(et.has(rt))if(it===void 0)et.delete(rt);else{const at=et.get(rt);if(at!==void 0){const st=at.filter(lt=>lt.output!==it&&(lt.input!==ot||ot===void 0));st.length===0?et.delete(rt):et.set(rt,st)}}for(const[at,st]of et)st.forEach(lt=>{isNativeAudioNode$1(at)?tt.connect(at,lt.output,lt.input):tt.connect(at,lt.output)})})(tt.disconnect)},addConnectionToAudioParamOfAudioContext=(tt,et,nt,rt)=>{const{activeInputs:it,passiveInputs:ot}=getAudioParamConnections(et),{outputs:at}=getAudioNodeConnections(tt),st=getEventListenersOfAudioNode(tt),lt=ct=>{const ut=getNativeAudioNode(tt),ht=getNativeAudioParam(et);if(ct){const dt=deletePassiveInputConnectionToAudioParam(ot,tt,nt);addActiveInputConnectionToAudioParam(it,tt,dt,!1),!rt&&!isPartOfACycle(tt)&&ut.connect(ht,nt)}else{const dt=deleteActiveInputConnectionToAudioParam(it,tt,nt);addPassiveInputConnectionToAudioParam(ot,dt,!1),!rt&&!isPartOfACycle(tt)&&ut.disconnect(ht,nt)}};return insertElementInSet(at,[et,nt],ct=>ct[0]===et&&ct[1]===nt,!0)?(st.add(lt),isActiveAudioNode(tt)?addActiveInputConnectionToAudioParam(it,tt,[nt,lt],!0):addPassiveInputConnectionToAudioParam(ot,[tt,nt,lt],!0),!0):!1},deleteInputConnectionOfAudioNode=(tt,et,nt,rt)=>{const{activeInputs:it,passiveInputs:ot}=getAudioNodeConnections(et),at=deleteActiveInputConnection(it[rt],tt,nt);return at===null?[deletePassiveInputConnectionToAudioNode(ot,tt,nt,rt)[2],!1]:[at[2],!0]},deleteInputConnectionOfAudioParam=(tt,et,nt)=>{const{activeInputs:rt,passiveInputs:it}=getAudioParamConnections(et),ot=deleteActiveInputConnection(rt,tt,nt);return ot===null?[deletePassiveInputConnectionToAudioParam(it,tt,nt)[1],!1]:[ot[2],!0]},deleteInputsOfAudioNode=(tt,et,nt,rt,it)=>{const[ot,at]=deleteInputConnectionOfAudioNode(tt,nt,rt,it);if(ot!==null&&(deleteEventListenerOfAudioNode(tt,ot),at&&!et&&!isPartOfACycle(tt)&&disconnectNativeAudioNodeFromNativeAudioNode(getNativeAudioNode(tt),getNativeAudioNode(nt),rt,it)),isActiveAudioNode(nt)){const{activeInputs:st}=getAudioNodeConnections(nt);setInternalStateToPassiveWhenNecessary(nt,st)}},deleteInputsOfAudioParam=(tt,et,nt,rt)=>{const[it,ot]=deleteInputConnectionOfAudioParam(tt,nt,rt);it!==null&&(deleteEventListenerOfAudioNode(tt,it),ot&&!et&&!isPartOfACycle(tt)&&getNativeAudioNode(tt).disconnect(getNativeAudioParam(nt),rt))},deleteAnyConnection=(tt,et)=>{const nt=getAudioNodeConnections(tt),rt=[];for(const it of nt.outputs)isAudioNodeOutputConnection(it)?deleteInputsOfAudioNode(tt,et,...it):deleteInputsOfAudioParam(tt,et,...it),rt.push(it[0]);return nt.outputs.clear(),rt},deleteConnectionAtOutput=(tt,et,nt)=>{const rt=getAudioNodeConnections(tt),it=[];for(const ot of rt.outputs)ot[1]===nt&&(isAudioNodeOutputConnection(ot)?deleteInputsOfAudioNode(tt,et,...ot):deleteInputsOfAudioParam(tt,et,...ot),it.push(ot[0]),rt.outputs.delete(ot));return it},deleteConnectionToDestination=(tt,et,nt,rt,it)=>{const ot=getAudioNodeConnections(tt);return Array.from(ot.outputs).filter(at=>at[0]===nt&&(rt===void 0||at[1]===rt)&&(it===void 0||at[2]===it)).map(at=>(isAudioNodeOutputConnection(at)?deleteInputsOfAudioNode(tt,et,...at):deleteInputsOfAudioParam(tt,et,...at),ot.outputs.delete(at),at[0]))},createAudioNodeConstructor=(tt,et,nt,rt,it,ot,at,st,lt,ct,ut,ht,dt,pt,mt,gt)=>class extends ct{constructor(bt,vt,xt,kt){super(xt),this._context=bt,this._nativeAudioNode=xt;const St=ut(bt);ht(St)&&nt(testAudioNodeDisconnectMethodSupport,()=>testAudioNodeDisconnectMethodSupport(St,gt))!==!0&&wrapAudioNodeDisconnectMethod(xt),AUDIO_NODE_STORE.set(this,xt),EVENT_LISTENERS.set(this,new Set),bt.state!=="closed"&&vt&&setInternalStateToActive(this),tt(this,kt,xt)}get channelCount(){return this._nativeAudioNode.channelCount}set channelCount(bt){this._nativeAudioNode.channelCount=bt}get channelCountMode(){return this._nativeAudioNode.channelCountMode}set channelCountMode(bt){this._nativeAudioNode.channelCountMode=bt}get channelInterpretation(){return this._nativeAudioNode.channelInterpretation}set channelInterpretation(bt){this._nativeAudioNode.channelInterpretation=bt}get context(){return this._context}get numberOfInputs(){return this._nativeAudioNode.numberOfInputs}get numberOfOutputs(){return this._nativeAudioNode.numberOfOutputs}connect(bt,vt=0,xt=0){if(vt<0||vt>=this._nativeAudioNode.numberOfOutputs)throw it();const kt=ut(this._context),St=mt(kt);if(dt(bt)||pt(bt))throw ot();if(isAudioNode$1(bt)){const Et=getNativeAudioNode(bt);try{const Dt=connectNativeAudioNodeToNativeAudioNode(this._nativeAudioNode,Et,vt,xt),jt=isPassiveAudioNode(this);(St||jt)&&this._nativeAudioNode.disconnect(...Dt),this.context.state!=="closed"&&!jt&&isPassiveAudioNode(bt)&&setInternalStateToActive(bt)}catch(Dt){throw Dt.code===12?ot():Dt}if(et(this,bt,vt,xt,St)){const Dt=lt([this],bt);visitEachAudioNodeOnce(Dt,rt(St))}return bt}const Tt=getNativeAudioParam(bt);if(Tt.name==="playbackRate"&&Tt.maxValue===1024)throw at();try{this._nativeAudioNode.connect(Tt,vt),(St||isPassiveAudioNode(this))&&this._nativeAudioNode.disconnect(Tt,vt)}catch(Et){throw Et.code===12?ot():Et}if(addConnectionToAudioParamOfAudioContext(this,bt,vt,St)){const Et=lt([this],bt);visitEachAudioNodeOnce(Et,rt(St))}}disconnect(bt,vt,xt){let kt;const St=ut(this._context),Tt=mt(St);if(bt===void 0)kt=deleteAnyConnection(this,Tt);else if(typeof bt=="number"){if(bt<0||bt>=this.numberOfOutputs)throw it();kt=deleteConnectionAtOutput(this,Tt,bt)}else{if(vt!==void 0&&(vt<0||vt>=this.numberOfOutputs)||isAudioNode$1(bt)&&xt!==void 0&&(xt<0||xt>=bt.numberOfInputs))throw it();if(kt=deleteConnectionToDestination(this,Tt,bt,vt,xt),kt.length===0)throw ot()}for(const At of kt){const Et=lt([this],At);visitEachAudioNodeOnce(Et,st)}}},createAudioParamFactory=(tt,et,nt,rt,it,ot,at,st,lt,ct,ut,ht,dt)=>(pt,mt,gt,yt=null,bt=null)=>{const vt=gt.value,xt=new AutomationEventList(vt),kt=mt?rt(xt):null,St={get defaultValue(){return vt},get maxValue(){return yt===null?gt.maxValue:yt},get minValue(){return bt===null?gt.minValue:bt},get value(){return gt.value},set value(Tt){gt.value=Tt,St.setValueAtTime(Tt,pt.context.currentTime)},cancelAndHoldAtTime(Tt){if(typeof gt.cancelAndHoldAtTime=="function")kt===null&&xt.flush(pt.context.currentTime),xt.add(it(Tt)),gt.cancelAndHoldAtTime(Tt);else{const At=Array.from(xt).pop();kt===null&&xt.flush(pt.context.currentTime),xt.add(it(Tt));const Et=Array.from(xt).pop();gt.cancelScheduledValues(Tt),At!==Et&&Et!==void 0&&(Et.type==="exponentialRampToValue"?gt.exponentialRampToValueAtTime(Et.value,Et.endTime):Et.type==="linearRampToValue"?gt.linearRampToValueAtTime(Et.value,Et.endTime):Et.type==="setValue"?gt.setValueAtTime(Et.value,Et.startTime):Et.type==="setValueCurve"&>.setValueCurveAtTime(Et.values,Et.startTime,Et.duration))}return St},cancelScheduledValues(Tt){return kt===null&&xt.flush(pt.context.currentTime),xt.add(ot(Tt)),gt.cancelScheduledValues(Tt),St},exponentialRampToValueAtTime(Tt,At){if(Tt===0)throw new RangeError;if(!Number.isFinite(At)||At<0)throw new RangeError;const Et=pt.context.currentTime;return kt===null&&xt.flush(Et),Array.from(xt).length===0&&(xt.add(ct(vt,Et)),gt.setValueAtTime(vt,Et)),xt.add(at(Tt,At)),gt.exponentialRampToValueAtTime(Tt,At),St},linearRampToValueAtTime(Tt,At){const Et=pt.context.currentTime;return kt===null&&xt.flush(Et),Array.from(xt).length===0&&(xt.add(ct(vt,Et)),gt.setValueAtTime(vt,Et)),xt.add(st(Tt,At)),gt.linearRampToValueAtTime(Tt,At),St},setTargetAtTime(Tt,At,Et){return kt===null&&xt.flush(pt.context.currentTime),xt.add(lt(Tt,At,Et)),gt.setTargetAtTime(Tt,At,Et),St},setValueAtTime(Tt,At){return kt===null&&xt.flush(pt.context.currentTime),xt.add(ct(Tt,At)),gt.setValueAtTime(Tt,At),St},setValueCurveAtTime(Tt,At,Et){const $t=Tt instanceof Float32Array?Tt:new Float32Array(Tt);if(ht!==null&&ht.name==="webkitAudioContext"){const Dt=At+Et,jt=pt.context.sampleRate,Pt=Math.ceil(At*jt),Ct=Math.floor(Dt*jt),wt=Ct-Pt,It=new Float32Array(wt);for(let Wt=0;Wt({replay(et){for(const nt of tt)if(nt.type==="exponentialRampToValue"){const{endTime:rt,value:it}=nt;et.exponentialRampToValueAtTime(it,rt)}else if(nt.type==="linearRampToValue"){const{endTime:rt,value:it}=nt;et.linearRampToValueAtTime(it,rt)}else if(nt.type==="setTarget"){const{startTime:rt,target:it,timeConstant:ot}=nt;et.setTargetAtTime(it,rt,ot)}else if(nt.type==="setValue"){const{startTime:rt,value:it}=nt;et.setValueAtTime(it,rt)}else if(nt.type==="setValueCurve"){const{duration:rt,startTime:it,values:ot}=nt;et.setValueCurveAtTime(ot,it,rt)}else throw new Error("Can't apply an unknown automation.")}});class ReadOnlyMap{constructor(et){this._map=new Map(et)}get size(){return this._map.size}entries(){return this._map.entries()}forEach(et,nt=null){return this._map.forEach((rt,it)=>et.call(nt,rt,it,this))}get(et){return this._map.get(et)}has(et){return this._map.has(et)}keys(){return this._map.keys()}values(){return this._map.values()}}const DEFAULT_OPTIONS$g={channelCount:2,channelCountMode:"explicit",channelInterpretation:"speakers",numberOfInputs:1,numberOfOutputs:1,parameterData:{},processorOptions:{}},createAudioWorkletNodeConstructor=(tt,et,nt,rt,it,ot,at,st,lt,ct,ut,ht,dt,pt)=>class extends et{constructor(gt,yt,bt){var vt;const xt=st(gt),kt=lt(xt),St=ut({...DEFAULT_OPTIONS$g,...bt});dt(St);const Tt=NODE_NAME_TO_PROCESSOR_CONSTRUCTOR_MAPS.get(xt),At=Tt==null?void 0:Tt.get(yt),Et=kt||xt.state!=="closed"?xt:(vt=at(xt))!==null&&vt!==void 0?vt:xt,$t=it(Et,kt?null:gt.baseLatency,ct,yt,At,St),Dt=kt?rt(yt,St,At):null;super(gt,!0,$t,Dt);const jt=[];$t.parameters.forEach((Ct,wt)=>{const It=nt(this,kt,Ct);jt.push([wt,It])}),this._nativeAudioWorkletNode=$t,this._onprocessorerror=null,this._parameters=new ReadOnlyMap(jt),kt&&tt(xt,this);const{activeInputs:Pt}=ot(this);ht($t,Pt)}get onprocessorerror(){return this._onprocessorerror}set onprocessorerror(gt){const yt=typeof gt=="function"?pt(this,gt):null;this._nativeAudioWorkletNode.onprocessorerror=yt;const bt=this._nativeAudioWorkletNode.onprocessorerror;this._onprocessorerror=bt!==null&&bt===yt?gt:bt}get parameters(){return this._parameters===null?this._nativeAudioWorkletNode.parameters:this._parameters}get port(){return this._nativeAudioWorkletNode.port}};function copyFromChannel(tt,et,nt,rt,it){if(typeof tt.copyFromChannel=="function")et[nt].byteLength===0&&(et[nt]=new Float32Array(128)),tt.copyFromChannel(et[nt],rt,it);else{const ot=tt.getChannelData(rt);if(et[nt].byteLength===0)et[nt]=ot.slice(it,it+128);else{const at=new Float32Array(ot.buffer,it*Float32Array.BYTES_PER_ELEMENT,128);et[nt].set(at)}}}const copyToChannel=(tt,et,nt,rt,it)=>{typeof tt.copyToChannel=="function"?et[nt].byteLength!==0&&tt.copyToChannel(et[nt],rt,it):et[nt].byteLength!==0&&tt.getChannelData(rt).set(et[nt],it)},createNestedArrays=(tt,et)=>{const nt=[];for(let rt=0;rt{const nt=getValueForKey(NODE_TO_PROCESSOR_MAPS,tt),rt=getNativeAudioNode(et);return getValueForKey(nt,rt)},processBuffer=async(tt,et,nt,rt,it,ot,at)=>{const st=et===null?Math.ceil(tt.context.length/128)*128:et.length,lt=rt.channelCount*rt.numberOfInputs,ct=it.reduce((yt,bt)=>yt+bt,0),ut=ct===0?null:nt.createBuffer(ct,st,nt.sampleRate);if(ot===void 0)throw new Error("Missing the processor constructor.");const ht=getAudioNodeConnections(tt),dt=await getAudioWorkletProcessor(nt,tt),pt=createNestedArrays(rt.numberOfInputs,rt.channelCount),mt=createNestedArrays(rt.numberOfOutputs,it),gt=Array.from(tt.parameters.keys()).reduce((yt,bt)=>({...yt,[bt]:new Float32Array(128)}),{});for(let yt=0;yt0&&et!==null)for(let bt=0;bt{copyFromChannel(et,gt,bt,lt+vt,yt)});for(let bt=0;btht.activeInputs[kt].size===0?[]:xt),vt=at(yt/nt.sampleRate,nt.sampleRate,()=>dt.process(bt,mt,gt));if(ut!==null)for(let xt=0,kt=0;xt(yt,bt,vt)=>{const xt=new WeakMap;let kt=null;const St=async(Tt,At)=>{let Et=ut(Tt),$t=null;const Dt=isOwnedByContext(Et,At),jt=Array.isArray(bt.outputChannelCount)?bt.outputChannelCount:Array.from(bt.outputChannelCount);if(ht===null){const Pt=jt.reduce((Ot,Wt)=>Ot+Wt,0),Ct=it(At,{channelCount:Math.max(1,Pt),channelCountMode:"explicit",channelInterpretation:"discrete",numberOfOutputs:Math.max(1,Pt)}),wt=[];for(let Ot=0;Ot{const Ut=new dt(Ft,Math.ceil(Tt.context.length/128)*128,At.sampleRate),Mt=[],Ht=[];for(let Kt=0;Kt{const rn=ot(Ut,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete",offset:Kt.value});return await pt(Ut,Kt,rn.offset),rn})),sn=rt(Ut,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"speakers",numberOfInputs:Math.max(1,Wt+zt)});for(let Kt=0;Ktmt(Tt,Ut,Kt))),gt(Ut)})(),At,bt,jt,vt,ct)}const Pt=await kt,Ct=nt(At,{buffer:null,channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",loop:!1,loopEnd:0,loopStart:0,playbackRate:1}),[wt,It,Ot]=$t;Pt!==null&&(Ct.buffer=Pt,Ct.start(0)),Ct.connect(wt);for(let Wt=0,zt=0;Wtclass extends mt{constructor(St,Tt){super(St,Tt),this._nativeContext=St,this._audioWorklet=tt===void 0?void 0:{addModule:(At,Et)=>tt(this,At,Et)}}get audioWorklet(){return this._audioWorklet}createAnalyser(){return new et(this)}createBiquadFilter(){return new it(this)}createBuffer(St,Tt,At){return new nt({length:Tt,numberOfChannels:St,sampleRate:At})}createBufferSource(){return new rt(this)}createChannelMerger(St=6){return new ot(this,{numberOfInputs:St})}createChannelSplitter(St=6){return new at(this,{numberOfOutputs:St})}createConstantSource(){return new st(this)}createConvolver(){return new lt(this)}createDelay(St=1){return new ut(this,{maxDelayTime:St})}createDynamicsCompressor(){return new ht(this)}createGain(){return new dt(this)}createIIRFilter(St,Tt){return new pt(this,{feedback:Tt,feedforward:St})}createOscillator(){return new gt(this)}createPanner(){return new yt(this)}createPeriodicWave(St,Tt,At={disableNormalization:!1}){return new bt(this,{...At,imag:Tt,real:St})}createStereoPanner(){return new vt(this)}createWaveShaper(){return new xt(this)}decodeAudioData(St,Tt,At){return ct(this._nativeContext,St).then(Et=>(typeof Tt=="function"&&Tt(Et),Et),Et=>{throw typeof At=="function"&&At(Et),Et})}},DEFAULT_OPTIONS$f={Q:1,channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",detune:0,frequency:350,gain:0,type:"lowpass"},createBiquadFilterNodeConstructor=(tt,et,nt,rt,it,ot,at,st)=>class extends tt{constructor(ct,ut){const ht=ot(ct),dt={...DEFAULT_OPTIONS$f,...ut},pt=it(ht,dt),mt=at(ht),gt=mt?nt():null;super(ct,!1,pt,gt),this._Q=et(this,mt,pt.Q,MOST_POSITIVE_SINGLE_FLOAT,MOST_NEGATIVE_SINGLE_FLOAT),this._detune=et(this,mt,pt.detune,1200*Math.log2(MOST_POSITIVE_SINGLE_FLOAT),-1200*Math.log2(MOST_POSITIVE_SINGLE_FLOAT)),this._frequency=et(this,mt,pt.frequency,ct.sampleRate/2,0),this._gain=et(this,mt,pt.gain,40*Math.log10(MOST_POSITIVE_SINGLE_FLOAT),MOST_NEGATIVE_SINGLE_FLOAT),this._nativeBiquadFilterNode=pt,st(this,1)}get detune(){return this._detune}get frequency(){return this._frequency}get gain(){return this._gain}get Q(){return this._Q}get type(){return this._nativeBiquadFilterNode.type}set type(ct){this._nativeBiquadFilterNode.type=ct}getFrequencyResponse(ct,ut,ht){try{this._nativeBiquadFilterNode.getFrequencyResponse(ct,ut,ht)}catch(dt){throw dt.code===11?rt():dt}if(ct.length!==ut.length||ut.length!==ht.length)throw rt()}},createBiquadFilterNodeRendererFactory=(tt,et,nt,rt,it)=>()=>{const ot=new WeakMap,at=async(st,lt)=>{let ct=nt(st);const ut=isOwnedByContext(ct,lt);if(!ut){const ht={Q:ct.Q.value,channelCount:ct.channelCount,channelCountMode:ct.channelCountMode,channelInterpretation:ct.channelInterpretation,detune:ct.detune.value,frequency:ct.frequency.value,gain:ct.gain.value,type:ct.type};ct=et(lt,ht)}return ot.set(lt,ct),ut?(await tt(lt,st.Q,ct.Q),await tt(lt,st.detune,ct.detune),await tt(lt,st.frequency,ct.frequency),await tt(lt,st.gain,ct.gain)):(await rt(lt,st.Q,ct.Q),await rt(lt,st.detune,ct.detune),await rt(lt,st.frequency,ct.frequency),await rt(lt,st.gain,ct.gain)),await it(st,lt,ct),ct};return{render(st,lt){const ct=ot.get(lt);return ct!==void 0?Promise.resolve(ct):at(st,lt)}}},createCacheTestResult=(tt,et)=>(nt,rt)=>{const it=et.get(nt);if(it!==void 0)return it;const ot=tt.get(nt);if(ot!==void 0)return ot;try{const at=rt();return at instanceof Promise?(tt.set(nt,at),at.catch(()=>!1).then(st=>(tt.delete(nt),et.set(nt,st),st))):(et.set(nt,at),at)}catch{return et.set(nt,!1),!1}},DEFAULT_OPTIONS$e={channelCount:1,channelCountMode:"explicit",channelInterpretation:"speakers",numberOfInputs:6},createChannelMergerNodeConstructor=(tt,et,nt,rt,it)=>class extends tt{constructor(at,st){const lt=rt(at),ct={...DEFAULT_OPTIONS$e,...st},ut=nt(lt,ct),ht=it(lt)?et():null;super(at,!1,ut,ht)}},createChannelMergerNodeRendererFactory=(tt,et,nt)=>()=>{const rt=new WeakMap,it=async(ot,at)=>{let st=et(ot);if(!isOwnedByContext(st,at)){const ct={channelCount:st.channelCount,channelCountMode:st.channelCountMode,channelInterpretation:st.channelInterpretation,numberOfInputs:st.numberOfInputs};st=tt(at,ct)}return rt.set(at,st),await nt(ot,at,st),st};return{render(ot,at){const st=rt.get(at);return st!==void 0?Promise.resolve(st):it(ot,at)}}},DEFAULT_OPTIONS$d={channelCount:6,channelCountMode:"explicit",channelInterpretation:"discrete",numberOfOutputs:6},createChannelSplitterNodeConstructor=(tt,et,nt,rt,it,ot)=>class extends tt{constructor(st,lt){const ct=rt(st),ut=ot({...DEFAULT_OPTIONS$d,...lt}),ht=nt(ct,ut),dt=it(ct)?et():null;super(st,!1,ht,dt)}},createChannelSplitterNodeRendererFactory=(tt,et,nt)=>()=>{const rt=new WeakMap,it=async(ot,at)=>{let st=et(ot);if(!isOwnedByContext(st,at)){const ct={channelCount:st.channelCount,channelCountMode:st.channelCountMode,channelInterpretation:st.channelInterpretation,numberOfOutputs:st.numberOfOutputs};st=tt(at,ct)}return rt.set(at,st),await nt(ot,at,st),st};return{render(ot,at){const st=rt.get(at);return st!==void 0?Promise.resolve(st):it(ot,at)}}},createConnectAudioParam=tt=>(et,nt,rt)=>tt(nt,et,rt),createConnectMultipleOutputs=tt=>(et,nt,rt=0,it=0)=>{const ot=et[rt];if(ot===void 0)throw tt();return isNativeAudioNode$1(nt)?ot.connect(nt,0,it):ot.connect(nt,0)},createConnectedNativeAudioBufferSourceNodeFactory=tt=>(et,nt)=>{const rt=tt(et,{buffer:null,channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",loop:!1,loopEnd:0,loopStart:0,playbackRate:1}),it=et.createBuffer(1,2,44100);return rt.buffer=it,rt.loop=!0,rt.connect(nt),rt.start(),()=>{rt.stop(),rt.disconnect(nt)}},DEFAULT_OPTIONS$c={channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",offset:1},createConstantSourceNodeConstructor=(tt,et,nt,rt,it,ot,at)=>class extends tt{constructor(lt,ct){const ut=it(lt),ht={...DEFAULT_OPTIONS$c,...ct},dt=rt(ut,ht),pt=ot(ut),mt=pt?nt():null;super(lt,!1,dt,mt),this._constantSourceNodeRenderer=mt,this._nativeConstantSourceNode=dt,this._offset=et(this,pt,dt.offset,MOST_POSITIVE_SINGLE_FLOAT,MOST_NEGATIVE_SINGLE_FLOAT),this._onended=null}get offset(){return this._offset}get onended(){return this._onended}set onended(lt){const ct=typeof lt=="function"?at(this,lt):null;this._nativeConstantSourceNode.onended=ct;const ut=this._nativeConstantSourceNode.onended;this._onended=ut!==null&&ut===ct?lt:ut}start(lt=0){if(this._nativeConstantSourceNode.start(lt),this._constantSourceNodeRenderer!==null&&(this._constantSourceNodeRenderer.start=lt),this.context.state!=="closed"){setInternalStateToActive(this);const ct=()=>{this._nativeConstantSourceNode.removeEventListener("ended",ct),isActiveAudioNode(this)&&setInternalStateToPassive(this)};this._nativeConstantSourceNode.addEventListener("ended",ct)}}stop(lt=0){this._nativeConstantSourceNode.stop(lt),this._constantSourceNodeRenderer!==null&&(this._constantSourceNodeRenderer.stop=lt)}},createConstantSourceNodeRendererFactory=(tt,et,nt,rt,it)=>()=>{const ot=new WeakMap;let at=null,st=null;const lt=async(ct,ut)=>{let ht=nt(ct);const dt=isOwnedByContext(ht,ut);if(!dt){const pt={channelCount:ht.channelCount,channelCountMode:ht.channelCountMode,channelInterpretation:ht.channelInterpretation,offset:ht.offset.value};ht=et(ut,pt),at!==null&&ht.start(at),st!==null&&ht.stop(st)}return ot.set(ut,ht),dt?await tt(ut,ct.offset,ht.offset):await rt(ut,ct.offset,ht.offset),await it(ct,ut,ht),ht};return{set start(ct){at=ct},set stop(ct){st=ct},render(ct,ut){const ht=ot.get(ut);return ht!==void 0?Promise.resolve(ht):lt(ct,ut)}}},createConvertNumberToUnsignedLong=tt=>et=>(tt[0]=et,tt[0]),DEFAULT_OPTIONS$b={buffer:null,channelCount:2,channelCountMode:"clamped-max",channelInterpretation:"speakers",disableNormalization:!1},createConvolverNodeConstructor=(tt,et,nt,rt,it,ot)=>class extends tt{constructor(st,lt){const ct=rt(st),ut={...DEFAULT_OPTIONS$b,...lt},ht=nt(ct,ut),pt=it(ct)?et():null;super(st,!1,ht,pt),this._isBufferNullified=!1,this._nativeConvolverNode=ht,ut.buffer!==null&&ot(this,ut.buffer.duration)}get buffer(){return this._isBufferNullified?null:this._nativeConvolverNode.buffer}set buffer(st){if(this._nativeConvolverNode.buffer=st,st===null&&this._nativeConvolverNode.buffer!==null){const lt=this._nativeConvolverNode.context;this._nativeConvolverNode.buffer=lt.createBuffer(1,1,lt.sampleRate),this._isBufferNullified=!0,ot(this,0)}else this._isBufferNullified=!1,ot(this,this._nativeConvolverNode.buffer===null?0:this._nativeConvolverNode.buffer.duration)}get normalize(){return this._nativeConvolverNode.normalize}set normalize(st){this._nativeConvolverNode.normalize=st}},createConvolverNodeRendererFactory=(tt,et,nt)=>()=>{const rt=new WeakMap,it=async(ot,at)=>{let st=et(ot);if(!isOwnedByContext(st,at)){const ct={buffer:st.buffer,channelCount:st.channelCount,channelCountMode:st.channelCountMode,channelInterpretation:st.channelInterpretation,disableNormalization:!st.normalize};st=tt(at,ct)}return rt.set(at,st),isNativeAudioNodeFaker(st)?await nt(ot,at,st.inputs[0]):await nt(ot,at,st),st};return{render(ot,at){const st=rt.get(at);return st!==void 0?Promise.resolve(st):it(ot,at)}}},createCreateNativeOfflineAudioContext=(tt,et)=>(nt,rt,it)=>{if(et===null)throw new Error("Missing the native OfflineAudioContext constructor.");try{return new et(nt,rt,it)}catch(ot){throw ot.name==="SyntaxError"?tt():ot}},createDataCloneError=()=>new DOMException("","DataCloneError"),detachArrayBuffer=tt=>{const{port1:et,port2:nt}=new MessageChannel;return new Promise(rt=>{const it=()=>{nt.onmessage=null,et.close(),nt.close(),rt()};nt.onmessage=()=>it();try{et.postMessage(tt,[tt])}catch{}finally{it()}})},createDecodeAudioData=(tt,et,nt,rt,it,ot,at,st,lt,ct,ut)=>(ht,dt)=>{const pt=at(ht)?ht:ot(ht);if(it.has(dt)){const mt=nt();return Promise.reject(mt)}try{it.add(dt)}catch{}return et(lt,()=>lt(pt))?pt.decodeAudioData(dt).then(mt=>(detachArrayBuffer(dt).catch(()=>{}),et(st,()=>st(mt))||ut(mt),tt.add(mt),mt)):new Promise((mt,gt)=>{const yt=async()=>{try{await detachArrayBuffer(dt)}catch{}},bt=vt=>{gt(vt),yt()};try{pt.decodeAudioData(dt,vt=>{typeof vt.copyFromChannel!="function"&&(ct(vt),wrapAudioBufferGetChannelDataMethod(vt)),tt.add(vt),yt().then(()=>mt(vt))},vt=>{bt(vt===null?rt():vt)})}catch(vt){bt(vt)}})},createDecrementCycleCounter=(tt,et,nt,rt,it,ot,at,st)=>(lt,ct)=>{const ut=et.get(lt);if(ut===void 0)throw new Error("Missing the expected cycle count.");const ht=ot(lt.context),dt=st(ht);if(ut===ct){if(et.delete(lt),!dt&&at(lt)){const pt=rt(lt),{outputs:mt}=nt(lt);for(const gt of mt)if(isAudioNodeOutputConnection(gt)){const yt=rt(gt[0]);tt(pt,yt,gt[1],gt[2])}else{const yt=it(gt[0]);pt.connect(yt,gt[1])}}}else et.set(lt,ut-ct)},DEFAULT_OPTIONS$a={channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",delayTime:0,maxDelayTime:1},createDelayNodeConstructor=(tt,et,nt,rt,it,ot,at)=>class extends tt{constructor(lt,ct){const ut=it(lt),ht={...DEFAULT_OPTIONS$a,...ct},dt=rt(ut,ht),pt=ot(ut),mt=pt?nt(ht.maxDelayTime):null;super(lt,!1,dt,mt),this._delayTime=et(this,pt,dt.delayTime),at(this,ht.maxDelayTime)}get delayTime(){return this._delayTime}},createDelayNodeRendererFactory=(tt,et,nt,rt,it)=>ot=>{const at=new WeakMap,st=async(lt,ct)=>{let ut=nt(lt);const ht=isOwnedByContext(ut,ct);if(!ht){const dt={channelCount:ut.channelCount,channelCountMode:ut.channelCountMode,channelInterpretation:ut.channelInterpretation,delayTime:ut.delayTime.value,maxDelayTime:ot};ut=et(ct,dt)}return at.set(ct,ut),ht?await tt(ct,lt.delayTime,ut.delayTime):await rt(ct,lt.delayTime,ut.delayTime),await it(lt,ct,ut),ut};return{render(lt,ct){const ut=at.get(ct);return ut!==void 0?Promise.resolve(ut):st(lt,ct)}}},createDeleteActiveInputConnectionToAudioNode=tt=>(et,nt,rt,it)=>tt(et[it],ot=>ot[0]===nt&&ot[1]===rt),createDeleteUnrenderedAudioWorkletNode=tt=>(et,nt)=>{tt(et).delete(nt)},isDelayNode=tt=>"delayTime"in tt,createDetectCycles=(tt,et,nt)=>function rt(it,ot){const at=isAudioNode$1(ot)?ot:nt(tt,ot);if(isDelayNode(at))return[];if(it[0]===at)return[it];if(it.includes(at))return[];const{outputs:st}=et(at);return Array.from(st).map(lt=>rt([...it,at],lt[0])).reduce((lt,ct)=>lt.concat(ct),[])},getOutputAudioNodeAtIndex=(tt,et,nt)=>{const rt=et[nt];if(rt===void 0)throw tt();return rt},createDisconnectMultipleOutputs=tt=>(et,nt=void 0,rt=void 0,it=0)=>nt===void 0?et.forEach(ot=>ot.disconnect()):typeof nt=="number"?getOutputAudioNodeAtIndex(tt,et,nt).disconnect():isNativeAudioNode$1(nt)?rt===void 0?et.forEach(ot=>ot.disconnect(nt)):it===void 0?getOutputAudioNodeAtIndex(tt,et,rt).disconnect(nt,0):getOutputAudioNodeAtIndex(tt,et,rt).disconnect(nt,0,it):rt===void 0?et.forEach(ot=>ot.disconnect(nt)):getOutputAudioNodeAtIndex(tt,et,rt).disconnect(nt,0),DEFAULT_OPTIONS$9={attack:.003,channelCount:2,channelCountMode:"clamped-max",channelInterpretation:"speakers",knee:30,ratio:12,release:.25,threshold:-24},createDynamicsCompressorNodeConstructor=(tt,et,nt,rt,it,ot,at,st)=>class extends tt{constructor(ct,ut){const ht=ot(ct),dt={...DEFAULT_OPTIONS$9,...ut},pt=rt(ht,dt),mt=at(ht),gt=mt?nt():null;super(ct,!1,pt,gt),this._attack=et(this,mt,pt.attack),this._knee=et(this,mt,pt.knee),this._nativeDynamicsCompressorNode=pt,this._ratio=et(this,mt,pt.ratio),this._release=et(this,mt,pt.release),this._threshold=et(this,mt,pt.threshold),st(this,.006)}get attack(){return this._attack}get channelCount(){return this._nativeDynamicsCompressorNode.channelCount}set channelCount(ct){const ut=this._nativeDynamicsCompressorNode.channelCount;if(this._nativeDynamicsCompressorNode.channelCount=ct,ct>2)throw this._nativeDynamicsCompressorNode.channelCount=ut,it()}get channelCountMode(){return this._nativeDynamicsCompressorNode.channelCountMode}set channelCountMode(ct){const ut=this._nativeDynamicsCompressorNode.channelCountMode;if(this._nativeDynamicsCompressorNode.channelCountMode=ct,ct==="max")throw this._nativeDynamicsCompressorNode.channelCountMode=ut,it()}get knee(){return this._knee}get ratio(){return this._ratio}get reduction(){return typeof this._nativeDynamicsCompressorNode.reduction.value=="number"?this._nativeDynamicsCompressorNode.reduction.value:this._nativeDynamicsCompressorNode.reduction}get release(){return this._release}get threshold(){return this._threshold}},createDynamicsCompressorNodeRendererFactory=(tt,et,nt,rt,it)=>()=>{const ot=new WeakMap,at=async(st,lt)=>{let ct=nt(st);const ut=isOwnedByContext(ct,lt);if(!ut){const ht={attack:ct.attack.value,channelCount:ct.channelCount,channelCountMode:ct.channelCountMode,channelInterpretation:ct.channelInterpretation,knee:ct.knee.value,ratio:ct.ratio.value,release:ct.release.value,threshold:ct.threshold.value};ct=et(lt,ht)}return ot.set(lt,ct),ut?(await tt(lt,st.attack,ct.attack),await tt(lt,st.knee,ct.knee),await tt(lt,st.ratio,ct.ratio),await tt(lt,st.release,ct.release),await tt(lt,st.threshold,ct.threshold)):(await rt(lt,st.attack,ct.attack),await rt(lt,st.knee,ct.knee),await rt(lt,st.ratio,ct.ratio),await rt(lt,st.release,ct.release),await rt(lt,st.threshold,ct.threshold)),await it(st,lt,ct),ct};return{render(st,lt){const ct=ot.get(lt);return ct!==void 0?Promise.resolve(ct):at(st,lt)}}},createEncodingError=()=>new DOMException("","EncodingError"),createEvaluateSource=tt=>et=>new Promise((nt,rt)=>{if(tt===null){rt(new SyntaxError);return}const it=tt.document.head;if(it===null)rt(new SyntaxError);else{const ot=tt.document.createElement("script"),at=new Blob([et],{type:"application/javascript"}),st=URL.createObjectURL(at),lt=tt.onerror,ct=()=>{tt.onerror=lt,URL.revokeObjectURL(st)};tt.onerror=(ut,ht,dt,pt,mt)=>{if(ht===st||ht===tt.location.href&&dt===1&&pt===1)return ct(),rt(mt),!1;if(lt!==null)return lt(ut,ht,dt,pt,mt)},ot.onerror=()=>{ct(),rt(new SyntaxError)},ot.onload=()=>{ct(),nt()},ot.src=st,ot.type="module",it.appendChild(ot)}}),createEventTargetConstructor=tt=>class{constructor(nt){this._nativeEventTarget=nt,this._listeners=new WeakMap}addEventListener(nt,rt,it){if(rt!==null){let ot=this._listeners.get(rt);ot===void 0&&(ot=tt(this,rt),typeof rt=="function"&&this._listeners.set(rt,ot)),this._nativeEventTarget.addEventListener(nt,ot,it)}}dispatchEvent(nt){return this._nativeEventTarget.dispatchEvent(nt)}removeEventListener(nt,rt,it){const ot=rt===null?void 0:this._listeners.get(rt);this._nativeEventTarget.removeEventListener(nt,ot===void 0?null:ot,it)}},createExposeCurrentFrameAndCurrentTime=tt=>(et,nt,rt)=>{Object.defineProperties(tt,{currentFrame:{configurable:!0,get(){return Math.round(et*nt)}},currentTime:{configurable:!0,get(){return et}}});try{return rt()}finally{tt!==null&&(delete tt.currentFrame,delete tt.currentTime)}},createFetchSource=tt=>async et=>{try{const nt=await fetch(et);if(nt.ok)return[await nt.text(),nt.url]}catch{}throw tt()},DEFAULT_OPTIONS$8={channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",gain:1},createGainNodeConstructor=(tt,et,nt,rt,it,ot)=>class extends tt{constructor(st,lt){const ct=it(st),ut={...DEFAULT_OPTIONS$8,...lt},ht=rt(ct,ut),dt=ot(ct),pt=dt?nt():null;super(st,!1,ht,pt),this._gain=et(this,dt,ht.gain,MOST_POSITIVE_SINGLE_FLOAT,MOST_NEGATIVE_SINGLE_FLOAT)}get gain(){return this._gain}},createGainNodeRendererFactory=(tt,et,nt,rt,it)=>()=>{const ot=new WeakMap,at=async(st,lt)=>{let ct=nt(st);const ut=isOwnedByContext(ct,lt);if(!ut){const ht={channelCount:ct.channelCount,channelCountMode:ct.channelCountMode,channelInterpretation:ct.channelInterpretation,gain:ct.gain.value};ct=et(lt,ht)}return ot.set(lt,ct),ut?await tt(lt,st.gain,ct.gain):await rt(lt,st.gain,ct.gain),await it(st,lt,ct),ct};return{render(st,lt){const ct=ot.get(lt);return ct!==void 0?Promise.resolve(ct):at(st,lt)}}},createGetActiveAudioWorkletNodeInputs=(tt,et)=>nt=>et(tt,nt),createGetAudioNodeRenderer=tt=>et=>{const nt=tt(et);if(nt.renderer===null)throw new Error("Missing the renderer of the given AudioNode in the audio graph.");return nt.renderer},createGetAudioNodeTailTime=tt=>et=>{var nt;return(nt=tt.get(et))!==null&&nt!==void 0?nt:0},createGetAudioParamRenderer=tt=>et=>{const nt=tt(et);if(nt.renderer===null)throw new Error("Missing the renderer of the given AudioParam in the audio graph.");return nt.renderer},createGetBackupOfflineAudioContext=tt=>et=>tt.get(et),createInvalidStateError=()=>new DOMException("","InvalidStateError"),createGetNativeContext=tt=>et=>{const nt=tt.get(et);if(nt===void 0)throw createInvalidStateError();return nt},createGetOrCreateBackupOfflineAudioContext=(tt,et)=>nt=>{let rt=tt.get(nt);if(rt!==void 0)return rt;if(et===null)throw new Error("Missing the native OfflineAudioContext constructor.");return rt=new et(1,1,44100),tt.set(nt,rt),rt},createGetUnrenderedAudioWorkletNodes=tt=>et=>{const nt=tt.get(et);if(nt===void 0)throw new Error("The context has no set of AudioWorkletNodes.");return nt},createInvalidAccessError=()=>new DOMException("","InvalidAccessError"),wrapIIRFilterNodeGetFrequencyResponseMethod=tt=>{tt.getFrequencyResponse=(et=>(nt,rt,it)=>{if(nt.length!==rt.length||rt.length!==it.length)throw createInvalidAccessError();return et.call(tt,nt,rt,it)})(tt.getFrequencyResponse)},DEFAULT_OPTIONS$7={channelCount:2,channelCountMode:"max",channelInterpretation:"speakers"},createIIRFilterNodeConstructor=(tt,et,nt,rt,it,ot)=>class extends tt{constructor(st,lt){const ct=rt(st),ut=it(ct),ht={...DEFAULT_OPTIONS$7,...lt},dt=et(ct,ut?null:st.baseLatency,ht),pt=ut?nt(ht.feedback,ht.feedforward):null;super(st,!1,dt,pt),wrapIIRFilterNodeGetFrequencyResponseMethod(dt),this._nativeIIRFilterNode=dt,ot(this,1)}getFrequencyResponse(st,lt,ct){return this._nativeIIRFilterNode.getFrequencyResponse(st,lt,ct)}},filterBuffer=(tt,et,nt,rt,it,ot,at,st,lt,ct,ut)=>{const ht=ct.length;let dt=st;for(let pt=0;pt{const it=nt instanceof Float64Array?nt:new Float64Array(nt),ot=rt instanceof Float64Array?rt:new Float64Array(rt),at=it.length,st=ot.length,lt=Math.min(at,st);if(it[0]!==1){for(let mt=0;mt(ot,at)=>{const st=new WeakMap;let lt=null;const ct=async(ut,ht)=>{let dt=null,pt=et(ut);const mt=isOwnedByContext(pt,ht);if(ht.createIIRFilter===void 0?dt=tt(ht,{buffer:null,channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",loop:!1,loopEnd:0,loopStart:0,playbackRate:1}):mt||(pt=ht.createIIRFilter(at,ot)),st.set(ht,dt===null?pt:dt),dt!==null){if(lt===null){if(nt===null)throw new Error("Missing the native OfflineAudioContext constructor.");const yt=new nt(ut.context.destination.channelCount,ut.context.length,ht.sampleRate);lt=(async()=>{await rt(ut,yt,yt.destination);const bt=await it(yt);return filterFullBuffer(bt,ht,ot,at)})()}const gt=await lt;return dt.buffer=gt,dt.start(0),dt}return await rt(ut,ht,pt),pt};return{render(ut,ht){const dt=st.get(ht);return dt!==void 0?Promise.resolve(dt):ct(ut,ht)}}},createIncrementCycleCounterFactory=(tt,et,nt,rt,it,ot)=>at=>(st,lt)=>{const ct=tt.get(st);if(ct===void 0){if(!at&&ot(st)){const ut=rt(st),{outputs:ht}=nt(st);for(const dt of ht)if(isAudioNodeOutputConnection(dt)){const pt=rt(dt[0]);et(ut,pt,dt[1],dt[2])}else{const pt=it(dt[0]);ut.disconnect(pt,dt[1])}}tt.set(st,lt)}else tt.set(st,ct+lt)},createIsAnyAudioContext=(tt,et)=>nt=>{const rt=tt.get(nt);return et(rt)||et(nt)},createIsAnyAudioNode=(tt,et)=>nt=>tt.has(nt)||et(nt),createIsAnyAudioParam=(tt,et)=>nt=>tt.has(nt)||et(nt),createIsAnyOfflineAudioContext=(tt,et)=>nt=>{const rt=tt.get(nt);return et(rt)||et(nt)},createIsNativeAudioContext=tt=>et=>tt!==null&&et instanceof tt,createIsNativeAudioNode=tt=>et=>tt!==null&&typeof tt.AudioNode=="function"&&et instanceof tt.AudioNode,createIsNativeAudioParam=tt=>et=>tt!==null&&typeof tt.AudioParam=="function"&&et instanceof tt.AudioParam,createIsNativeContext=(tt,et)=>nt=>tt(nt)||et(nt),createIsNativeOfflineAudioContext=tt=>et=>tt!==null&&et instanceof tt,createIsSecureContext=tt=>tt!==null&&tt.isSecureContext,createMediaElementAudioSourceNodeConstructor=(tt,et,nt,rt)=>class extends tt{constructor(ot,at){const st=nt(ot),lt=et(st,at);if(rt(st))throw TypeError();super(ot,!0,lt,null),this._nativeMediaElementAudioSourceNode=lt}get mediaElement(){return this._nativeMediaElementAudioSourceNode.mediaElement}},DEFAULT_OPTIONS$6={channelCount:2,channelCountMode:"explicit",channelInterpretation:"speakers"},createMediaStreamAudioDestinationNodeConstructor=(tt,et,nt,rt)=>class extends tt{constructor(ot,at){const st=nt(ot);if(rt(st))throw new TypeError;const lt={...DEFAULT_OPTIONS$6,...at},ct=et(st,lt);super(ot,!1,ct,null),this._nativeMediaStreamAudioDestinationNode=ct}get stream(){return this._nativeMediaStreamAudioDestinationNode.stream}},createMediaStreamAudioSourceNodeConstructor=(tt,et,nt,rt)=>class extends tt{constructor(ot,at){const st=nt(ot),lt=et(st,at);if(rt(st))throw new TypeError;super(ot,!0,lt,null),this._nativeMediaStreamAudioSourceNode=lt}get mediaStream(){return this._nativeMediaStreamAudioSourceNode.mediaStream}},createMediaStreamTrackAudioSourceNodeConstructor=(tt,et,nt)=>class extends tt{constructor(it,ot){const at=nt(it),st=et(at,ot);super(it,!0,st,null)}},createMinimalBaseAudioContextConstructor=(tt,et,nt,rt,it,ot)=>class extends nt{constructor(st,lt){super(st),this._nativeContext=st,CONTEXT_STORE.set(this,st),rt(st)&&it.set(st,new Set),this._destination=new tt(this,lt),this._listener=et(this,st),this._onstatechange=null}get currentTime(){return this._nativeContext.currentTime}get destination(){return this._destination}get listener(){return this._listener}get onstatechange(){return this._onstatechange}set onstatechange(st){const lt=typeof st=="function"?ot(this,st):null;this._nativeContext.onstatechange=lt;const ct=this._nativeContext.onstatechange;this._onstatechange=ct!==null&&ct===lt?st:ct}get sampleRate(){return this._nativeContext.sampleRate}get state(){return this._nativeContext.state}},testPromiseSupport=tt=>{const et=new Uint32Array([1179011410,40,1163280727,544501094,16,131073,44100,176400,1048580,1635017060,4,0]);try{const nt=tt.decodeAudioData(et.buffer,()=>{});return nt===void 0?!1:(nt.catch(()=>{}),!0)}catch{}return!1},createMonitorConnections=(tt,et)=>(nt,rt,it)=>{const ot=new Set;return nt.connect=(at=>(st,lt=0,ct=0)=>{const ut=ot.size===0;if(et(st))return at.call(nt,st,lt,ct),tt(ot,[st,lt,ct],ht=>ht[0]===st&&ht[1]===lt&&ht[2]===ct,!0),ut&&rt(),st;at.call(nt,st,lt),tt(ot,[st,lt],ht=>ht[0]===st&&ht[1]===lt,!0),ut&&rt()})(nt.connect),nt.disconnect=(at=>(st,lt,ct)=>{const ut=ot.size>0;if(st===void 0)at.apply(nt),ot.clear();else if(typeof st=="number"){at.call(nt,st);for(const dt of ot)dt[1]===st&&ot.delete(dt)}else{et(st)?at.call(nt,st,lt,ct):at.call(nt,st,lt);for(const dt of ot)dt[0]===st&&(lt===void 0||dt[1]===lt)&&(ct===void 0||dt[2]===ct)&&ot.delete(dt)}const ht=ot.size===0;ut&&ht&&it()})(nt.disconnect),nt},assignNativeAudioNodeOption=(tt,et,nt)=>{const rt=et[nt];rt!==void 0&&rt!==tt[nt]&&(tt[nt]=rt)},assignNativeAudioNodeOptions=(tt,et)=>{assignNativeAudioNodeOption(tt,et,"channelCount"),assignNativeAudioNodeOption(tt,et,"channelCountMode"),assignNativeAudioNodeOption(tt,et,"channelInterpretation")},testAnalyserNodeGetFloatTimeDomainDataMethodSupport=tt=>typeof tt.getFloatTimeDomainData=="function",wrapAnalyserNodeGetFloatTimeDomainDataMethod=tt=>{tt.getFloatTimeDomainData=et=>{const nt=new Uint8Array(et.length);tt.getByteTimeDomainData(nt);const rt=Math.max(nt.length,tt.fftSize);for(let it=0;it(nt,rt)=>{const it=nt.createAnalyser();if(assignNativeAudioNodeOptions(it,rt),!(rt.maxDecibels>rt.minDecibels))throw et();return assignNativeAudioNodeOption(it,rt,"fftSize"),assignNativeAudioNodeOption(it,rt,"maxDecibels"),assignNativeAudioNodeOption(it,rt,"minDecibels"),assignNativeAudioNodeOption(it,rt,"smoothingTimeConstant"),tt(testAnalyserNodeGetFloatTimeDomainDataMethodSupport,()=>testAnalyserNodeGetFloatTimeDomainDataMethodSupport(it))||wrapAnalyserNodeGetFloatTimeDomainDataMethod(it),it},createNativeAudioBufferConstructor=tt=>tt===null?null:tt.hasOwnProperty("AudioBuffer")?tt.AudioBuffer:null,assignNativeAudioNodeAudioParamValue=(tt,et,nt)=>{const rt=et[nt];rt!==void 0&&rt!==tt[nt].value&&(tt[nt].value=rt)},wrapAudioBufferSourceNodeStartMethodConsecutiveCalls=tt=>{tt.start=(et=>{let nt=!1;return(rt=0,it=0,ot)=>{if(nt)throw createInvalidStateError();et.call(tt,rt,it,ot),nt=!0}})(tt.start)},wrapAudioScheduledSourceNodeStartMethodNegativeParameters=tt=>{tt.start=(et=>(nt=0,rt=0,it)=>{if(typeof it=="number"&&it<0||rt<0||nt<0)throw new RangeError("The parameters can't be negative.");et.call(tt,nt,rt,it)})(tt.start)},wrapAudioScheduledSourceNodeStopMethodNegativeParameters=tt=>{tt.stop=(et=>(nt=0)=>{if(nt<0)throw new RangeError("The parameter can't be negative.");et.call(tt,nt)})(tt.stop)},createNativeAudioBufferSourceNodeFactory=(tt,et,nt,rt,it,ot,at,st,lt,ct,ut)=>(ht,dt)=>{const pt=ht.createBufferSource();return assignNativeAudioNodeOptions(pt,dt),assignNativeAudioNodeAudioParamValue(pt,dt,"playbackRate"),assignNativeAudioNodeOption(pt,dt,"buffer"),assignNativeAudioNodeOption(pt,dt,"loop"),assignNativeAudioNodeOption(pt,dt,"loopEnd"),assignNativeAudioNodeOption(pt,dt,"loopStart"),et(nt,()=>nt(ht))||wrapAudioBufferSourceNodeStartMethodConsecutiveCalls(pt),et(rt,()=>rt(ht))||lt(pt),et(it,()=>it(ht))||ct(pt,ht),et(ot,()=>ot(ht))||wrapAudioScheduledSourceNodeStartMethodNegativeParameters(pt),et(at,()=>at(ht))||ut(pt,ht),et(st,()=>st(ht))||wrapAudioScheduledSourceNodeStopMethodNegativeParameters(pt),tt(ht,pt),pt},createNativeAudioContextConstructor=tt=>tt===null?null:tt.hasOwnProperty("AudioContext")?tt.AudioContext:tt.hasOwnProperty("webkitAudioContext")?tt.webkitAudioContext:null,createNativeAudioDestinationNodeFactory=(tt,et)=>(nt,rt,it)=>{const ot=nt.destination;if(ot.channelCount!==rt)try{ot.channelCount=rt}catch{}it&&ot.channelCountMode!=="explicit"&&(ot.channelCountMode="explicit"),ot.maxChannelCount===0&&Object.defineProperty(ot,"maxChannelCount",{value:rt});const at=tt(nt,{channelCount:rt,channelCountMode:ot.channelCountMode,channelInterpretation:ot.channelInterpretation,gain:1});return et(at,"channelCount",st=>()=>st.call(at),st=>lt=>{st.call(at,lt);try{ot.channelCount=lt}catch(ct){if(lt>ot.maxChannelCount)throw ct}}),et(at,"channelCountMode",st=>()=>st.call(at),st=>lt=>{st.call(at,lt),ot.channelCountMode=lt}),et(at,"channelInterpretation",st=>()=>st.call(at),st=>lt=>{st.call(at,lt),ot.channelInterpretation=lt}),Object.defineProperty(at,"maxChannelCount",{get:()=>ot.maxChannelCount}),at.connect(ot),at},createNativeAudioWorkletNodeConstructor=tt=>tt===null?null:tt.hasOwnProperty("AudioWorkletNode")?tt.AudioWorkletNode:null,testClonabilityOfAudioWorkletNodeOptions=tt=>{const{port1:et}=new MessageChannel;try{et.postMessage(tt)}finally{et.close()}},createNativeAudioWorkletNodeFactory=(tt,et,nt,rt,it)=>(ot,at,st,lt,ct,ut)=>{if(st!==null)try{const ht=new st(ot,lt,ut),dt=new Map;let pt=null;if(Object.defineProperties(ht,{channelCount:{get:()=>ut.channelCount,set:()=>{throw tt()}},channelCountMode:{get:()=>"explicit",set:()=>{throw tt()}},onprocessorerror:{get:()=>pt,set:mt=>{typeof pt=="function"&&ht.removeEventListener("processorerror",pt),pt=typeof mt=="function"?mt:null,typeof pt=="function"&&ht.addEventListener("processorerror",pt)}}}),ht.addEventListener=(mt=>(...gt)=>{if(gt[0]==="processorerror"){const yt=typeof gt[1]=="function"?gt[1]:typeof gt[1]=="object"&>[1]!==null&&typeof gt[1].handleEvent=="function"?gt[1].handleEvent:null;if(yt!==null){const bt=dt.get(gt[1]);bt!==void 0?gt[1]=bt:(gt[1]=vt=>{vt.type==="error"?(Object.defineProperties(vt,{type:{value:"processorerror"}}),yt(vt)):yt(new ErrorEvent(gt[0],{...vt}))},dt.set(yt,gt[1]))}}return mt.call(ht,"error",gt[1],gt[2]),mt.call(ht,...gt)})(ht.addEventListener),ht.removeEventListener=(mt=>(...gt)=>{if(gt[0]==="processorerror"){const yt=dt.get(gt[1]);yt!==void 0&&(dt.delete(gt[1]),gt[1]=yt)}return mt.call(ht,"error",gt[1],gt[2]),mt.call(ht,gt[0],gt[1],gt[2])})(ht.removeEventListener),ut.numberOfOutputs!==0){const mt=nt(ot,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete",gain:0});return ht.connect(mt).connect(ot.destination),it(ht,()=>mt.disconnect(),()=>mt.connect(ot.destination))}return ht}catch(ht){throw ht.code===11?rt():ht}if(ct===void 0)throw rt();return testClonabilityOfAudioWorkletNodeOptions(ut),et(ot,at,ct,ut)},computeBufferSize=(tt,et)=>tt===null?512:Math.max(512,Math.min(16384,Math.pow(2,Math.round(Math.log2(tt*et))))),cloneAudioWorkletNodeOptions=tt=>new Promise((et,nt)=>{const{port1:rt,port2:it}=new MessageChannel;rt.onmessage=({data:ot})=>{rt.close(),it.close(),et(ot)},rt.onmessageerror=({data:ot})=>{rt.close(),it.close(),nt(ot)},it.postMessage(tt)}),createAudioWorkletProcessorPromise=async(tt,et)=>{const nt=await cloneAudioWorkletNodeOptions(et);return new tt(nt)},createAudioWorkletProcessor=(tt,et,nt,rt)=>{let it=NODE_TO_PROCESSOR_MAPS.get(tt);it===void 0&&(it=new WeakMap,NODE_TO_PROCESSOR_MAPS.set(tt,it));const ot=createAudioWorkletProcessorPromise(nt,rt);return it.set(et,ot),ot},createNativeAudioWorkletNodeFakerFactory=(tt,et,nt,rt,it,ot,at,st,lt,ct,ut,ht,dt)=>(pt,mt,gt,yt)=>{if(yt.numberOfInputs===0&&yt.numberOfOutputs===0)throw lt();const bt=Array.isArray(yt.outputChannelCount)?yt.outputChannelCount:Array.from(yt.outputChannelCount);if(bt.some($n=>$n<1))throw lt();if(bt.length!==yt.numberOfOutputs)throw et();if(yt.channelCountMode!=="explicit")throw lt();const vt=yt.channelCount*yt.numberOfInputs,xt=bt.reduce(($n,Nn)=>$n+Nn,0),kt=gt.parameterDescriptors===void 0?0:gt.parameterDescriptors.length;if(vt+kt>6||xt>6)throw lt();const St=new MessageChannel,Tt=[],At=[];for(let $n=0;$n$n===void 0?0:$n},maxValue:{get:()=>Nn===void 0?MOST_POSITIVE_SINGLE_FLOAT:Nn},minValue:{get:()=>Tn===void 0?MOST_NEGATIVE_SINGLE_FLOAT:Tn}}),Et.push(mn)}const $t=rt(pt,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"speakers",numberOfInputs:Math.max(1,vt+kt)}),Dt=computeBufferSize(mt,pt.sampleRate),jt=st(pt,Dt,vt+kt,Math.max(1,xt)),Pt=it(pt,{channelCount:Math.max(1,xt),channelCountMode:"explicit",channelInterpretation:"discrete",numberOfOutputs:Math.max(1,xt)}),Ct=[];for(let $n=0;$n{const Tn=Et[Nn];return Tn.connect($t,0,vt+Nn),Tn.start(0),[$n,Tn.offset]}));$t.connect(jt);let It=yt.channelInterpretation,Ot=null;const Wt=yt.numberOfOutputs===0?[jt]:Ct,zt={get bufferSize(){return Dt},get channelCount(){return yt.channelCount},set channelCount($n){throw nt()},get channelCountMode(){return yt.channelCountMode},set channelCountMode($n){throw nt()},get channelInterpretation(){return It},set channelInterpretation($n){for(const Nn of Tt)Nn.channelInterpretation=$n;It=$n},get context(){return jt.context},get inputs(){return Tt},get numberOfInputs(){return yt.numberOfInputs},get numberOfOutputs(){return yt.numberOfOutputs},get onprocessorerror(){return Ot},set onprocessorerror($n){typeof Ot=="function"&&zt.removeEventListener("processorerror",Ot),Ot=typeof $n=="function"?$n:null,typeof Ot=="function"&&zt.addEventListener("processorerror",Ot)},get parameters(){return wt},get port(){return St.port2},addEventListener(...$n){return jt.addEventListener($n[0],$n[1],$n[2])},connect:tt.bind(null,Wt),disconnect:ct.bind(null,Wt),dispatchEvent(...$n){return jt.dispatchEvent($n[0])},removeEventListener(...$n){return jt.removeEventListener($n[0],$n[1],$n[2])}},Ft=new Map;St.port1.addEventListener=($n=>(...Nn)=>{if(Nn[0]==="message"){const Tn=typeof Nn[1]=="function"?Nn[1]:typeof Nn[1]=="object"&&Nn[1]!==null&&typeof Nn[1].handleEvent=="function"?Nn[1].handleEvent:null;if(Tn!==null){const cn=Ft.get(Nn[1]);cn!==void 0?Nn[1]=cn:(Nn[1]=mn=>{ut(pt.currentTime,pt.sampleRate,()=>Tn(mn))},Ft.set(Tn,Nn[1]))}}return $n.call(St.port1,Nn[0],Nn[1],Nn[2])})(St.port1.addEventListener),St.port1.removeEventListener=($n=>(...Nn)=>{if(Nn[0]==="message"){const Tn=Ft.get(Nn[1]);Tn!==void 0&&(Ft.delete(Nn[1]),Nn[1]=Tn)}return $n.call(St.port1,Nn[0],Nn[1],Nn[2])})(St.port1.removeEventListener);let Nt=null;Object.defineProperty(St.port1,"onmessage",{get:()=>Nt,set:$n=>{typeof Nt=="function"&&St.port1.removeEventListener("message",Nt),Nt=typeof $n=="function"?$n:null,typeof Nt=="function"&&(St.port1.addEventListener("message",Nt),St.port1.start())}}),gt.prototype.port=St.port1;let Ut=null;createAudioWorkletProcessor(pt,zt,gt,yt).then($n=>Ut=$n);const Ht=createNestedArrays(yt.numberOfInputs,yt.channelCount),en=createNestedArrays(yt.numberOfOutputs,bt),sn=gt.parameterDescriptors===void 0?[]:gt.parameterDescriptors.reduce(($n,{name:Nn})=>({...$n,[Nn]:new Float32Array(128)}),{});let Kt=!0;const rn=()=>{yt.numberOfOutputs>0&&jt.disconnect(Pt);for(let $n=0,Nn=0;$n{if(Ut!==null){const Tn=ht(zt);for(let cn=0;cn{copyFromChannel($n,sn,mn,vt+In,cn)});for(let mn=0;mn{if(Tn[wn].size>0)return nn.set(wn,Dt/128),An;const pn=nn.get(wn);return pn===void 0?[]:(An.every(kn=>kn.every(Dn=>Dn===0))&&(pn===1?nn.delete(wn):nn.set(wn,pn-1)),An)});Kt=ut(pt.currentTime+cn/pt.sampleRate,pt.sampleRate,()=>Ut.process(mn,en,sn));for(let An=0,wn=0;Anjt.connect(vn).connect(pt.destination),Qt=()=>{jt.disconnect(vn),vn.disconnect()},_n=()=>{if(Kt){Qt(),yt.numberOfOutputs>0&&jt.connect(Pt);for(let $n=0,Nn=0;$n{Kt&&(an(),rn()),hn=!1};return an(),dt(zt,_n,Pn)},createNativeBiquadFilterNode=(tt,et)=>{const nt=tt.createBiquadFilter();return assignNativeAudioNodeOptions(nt,et),assignNativeAudioNodeAudioParamValue(nt,et,"Q"),assignNativeAudioNodeAudioParamValue(nt,et,"detune"),assignNativeAudioNodeAudioParamValue(nt,et,"frequency"),assignNativeAudioNodeAudioParamValue(nt,et,"gain"),assignNativeAudioNodeOption(nt,et,"type"),nt},createNativeChannelMergerNodeFactory=(tt,et)=>(nt,rt)=>{const it=nt.createChannelMerger(rt.numberOfInputs);return tt!==null&&tt.name==="webkitAudioContext"&&et(nt,it),assignNativeAudioNodeOptions(it,rt),it},wrapChannelSplitterNode=tt=>{const et=tt.numberOfOutputs;Object.defineProperty(tt,"channelCount",{get:()=>et,set:nt=>{if(nt!==et)throw createInvalidStateError()}}),Object.defineProperty(tt,"channelCountMode",{get:()=>"explicit",set:nt=>{if(nt!=="explicit")throw createInvalidStateError()}}),Object.defineProperty(tt,"channelInterpretation",{get:()=>"discrete",set:nt=>{if(nt!=="discrete")throw createInvalidStateError()}})},createNativeChannelSplitterNode=(tt,et)=>{const nt=tt.createChannelSplitter(et.numberOfOutputs);return assignNativeAudioNodeOptions(nt,et),wrapChannelSplitterNode(nt),nt},createNativeConstantSourceNodeFactory=(tt,et,nt,rt,it)=>(ot,at)=>{if(ot.createConstantSource===void 0)return nt(ot,at);const st=ot.createConstantSource();return assignNativeAudioNodeOptions(st,at),assignNativeAudioNodeAudioParamValue(st,at,"offset"),et(rt,()=>rt(ot))||wrapAudioScheduledSourceNodeStartMethodNegativeParameters(st),et(it,()=>it(ot))||wrapAudioScheduledSourceNodeStopMethodNegativeParameters(st),tt(ot,st),st},interceptConnections=(tt,et)=>(tt.connect=et.connect.bind(et),tt.disconnect=et.disconnect.bind(et),tt),createNativeConstantSourceNodeFakerFactory=(tt,et,nt,rt)=>(it,{offset:ot,...at})=>{const st=it.createBuffer(1,2,44100),lt=et(it,{buffer:null,channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",loop:!1,loopEnd:0,loopStart:0,playbackRate:1}),ct=nt(it,{...at,gain:ot}),ut=st.getChannelData(0);ut[0]=1,ut[1]=1,lt.buffer=st,lt.loop=!0;const ht={get bufferSize(){},get channelCount(){return ct.channelCount},set channelCount(mt){ct.channelCount=mt},get channelCountMode(){return ct.channelCountMode},set channelCountMode(mt){ct.channelCountMode=mt},get channelInterpretation(){return ct.channelInterpretation},set channelInterpretation(mt){ct.channelInterpretation=mt},get context(){return ct.context},get inputs(){return[]},get numberOfInputs(){return lt.numberOfInputs},get numberOfOutputs(){return ct.numberOfOutputs},get offset(){return ct.gain},get onended(){return lt.onended},set onended(mt){lt.onended=mt},addEventListener(...mt){return lt.addEventListener(mt[0],mt[1],mt[2])},dispatchEvent(...mt){return lt.dispatchEvent(mt[0])},removeEventListener(...mt){return lt.removeEventListener(mt[0],mt[1],mt[2])},start(mt=0){lt.start.call(lt,mt)},stop(mt=0){lt.stop.call(lt,mt)}},dt=()=>lt.connect(ct),pt=()=>lt.disconnect(ct);return tt(it,lt),rt(interceptConnections(ht,ct),dt,pt)},createNativeConvolverNodeFactory=(tt,et)=>(nt,rt)=>{const it=nt.createConvolver();if(assignNativeAudioNodeOptions(it,rt),rt.disableNormalization===it.normalize&&(it.normalize=!rt.disableNormalization),assignNativeAudioNodeOption(it,rt,"buffer"),rt.channelCount>2||(et(it,"channelCount",ot=>()=>ot.call(it),ot=>at=>{if(at>2)throw tt();return ot.call(it,at)}),rt.channelCountMode==="max"))throw tt();return et(it,"channelCountMode",ot=>()=>ot.call(it),ot=>at=>{if(at==="max")throw tt();return ot.call(it,at)}),it},createNativeDelayNode=(tt,et)=>{const nt=tt.createDelay(et.maxDelayTime);return assignNativeAudioNodeOptions(nt,et),assignNativeAudioNodeAudioParamValue(nt,et,"delayTime"),nt},createNativeDynamicsCompressorNodeFactory=tt=>(et,nt)=>{const rt=et.createDynamicsCompressor();if(assignNativeAudioNodeOptions(rt,nt),nt.channelCount>2||nt.channelCountMode==="max")throw tt();return assignNativeAudioNodeAudioParamValue(rt,nt,"attack"),assignNativeAudioNodeAudioParamValue(rt,nt,"knee"),assignNativeAudioNodeAudioParamValue(rt,nt,"ratio"),assignNativeAudioNodeAudioParamValue(rt,nt,"release"),assignNativeAudioNodeAudioParamValue(rt,nt,"threshold"),rt},createNativeGainNode=(tt,et)=>{const nt=tt.createGain();return assignNativeAudioNodeOptions(nt,et),assignNativeAudioNodeAudioParamValue(nt,et,"gain"),nt},createNativeIIRFilterNodeFactory=tt=>(et,nt,rt)=>{if(et.createIIRFilter===void 0)return tt(et,nt,rt);const it=et.createIIRFilter(rt.feedforward,rt.feedback);return assignNativeAudioNodeOptions(it,rt),it};function divide$1(tt,et){const nt=et[0]*et[0]+et[1]*et[1];return[(tt[0]*et[0]+tt[1]*et[1])/nt,(tt[1]*et[0]-tt[0]*et[1])/nt]}function multiply(tt,et){return[tt[0]*et[0]-tt[1]*et[1],tt[0]*et[1]+tt[1]*et[0]]}function evaluatePolynomial(tt,et){let nt=[0,0];for(let rt=tt.length-1;rt>=0;rt-=1)nt=multiply(nt,et),nt[0]+=tt[rt];return nt}const createNativeIIRFilterNodeFakerFactory=(tt,et,nt,rt)=>(it,ot,{channelCount:at,channelCountMode:st,channelInterpretation:lt,feedback:ct,feedforward:ut})=>{const ht=computeBufferSize(ot,it.sampleRate),dt=ct instanceof Float64Array?ct:new Float64Array(ct),pt=ut instanceof Float64Array?ut:new Float64Array(ut),mt=dt.length,gt=pt.length,yt=Math.min(mt,gt);if(mt===0||mt>20)throw rt();if(dt[0]===0)throw et();if(gt===0||gt>20)throw rt();if(pt[0]===0)throw et();if(dt[0]!==1){for(let Et=0;Et{const $t=Et.inputBuffer,Dt=Et.outputBuffer,jt=$t.numberOfChannels;for(let Pt=0;Pttt.createMediaElementSource(et.mediaElement),createNativeMediaStreamAudioDestinationNode=(tt,et)=>{const nt=tt.createMediaStreamDestination();return assignNativeAudioNodeOptions(nt,et),nt.numberOfOutputs===1&&Object.defineProperty(nt,"numberOfOutputs",{get:()=>0}),nt},createNativeMediaStreamAudioSourceNode=(tt,{mediaStream:et})=>{const nt=et.getAudioTracks();nt.sort((ot,at)=>ot.idat.id?1:0);const rt=nt.slice(0,1),it=tt.createMediaStreamSource(new MediaStream(rt));return Object.defineProperty(it,"mediaStream",{value:et}),it},createNativeMediaStreamTrackAudioSourceNodeFactory=(tt,et)=>(nt,{mediaStreamTrack:rt})=>{if(typeof nt.createMediaStreamTrackSource=="function")return nt.createMediaStreamTrackSource(rt);const it=new MediaStream([rt]),ot=nt.createMediaStreamSource(it);if(rt.kind!=="audio")throw tt();if(et(nt))throw new TypeError;return ot},createNativeOfflineAudioContextConstructor=tt=>tt===null?null:tt.hasOwnProperty("OfflineAudioContext")?tt.OfflineAudioContext:tt.hasOwnProperty("webkitOfflineAudioContext")?tt.webkitOfflineAudioContext:null,createNativeOscillatorNodeFactory=(tt,et,nt,rt,it,ot)=>(at,st)=>{const lt=at.createOscillator();return assignNativeAudioNodeOptions(lt,st),assignNativeAudioNodeAudioParamValue(lt,st,"detune"),assignNativeAudioNodeAudioParamValue(lt,st,"frequency"),st.periodicWave!==void 0?lt.setPeriodicWave(st.periodicWave):assignNativeAudioNodeOption(lt,st,"type"),et(nt,()=>nt(at))||wrapAudioScheduledSourceNodeStartMethodNegativeParameters(lt),et(rt,()=>rt(at))||ot(lt,at),et(it,()=>it(at))||wrapAudioScheduledSourceNodeStopMethodNegativeParameters(lt),tt(at,lt),lt},createNativePannerNodeFactory=tt=>(et,nt)=>{const rt=et.createPanner();return rt.orientationX===void 0?tt(et,nt):(assignNativeAudioNodeOptions(rt,nt),assignNativeAudioNodeAudioParamValue(rt,nt,"orientationX"),assignNativeAudioNodeAudioParamValue(rt,nt,"orientationY"),assignNativeAudioNodeAudioParamValue(rt,nt,"orientationZ"),assignNativeAudioNodeAudioParamValue(rt,nt,"positionX"),assignNativeAudioNodeAudioParamValue(rt,nt,"positionY"),assignNativeAudioNodeAudioParamValue(rt,nt,"positionZ"),assignNativeAudioNodeOption(rt,nt,"coneInnerAngle"),assignNativeAudioNodeOption(rt,nt,"coneOuterAngle"),assignNativeAudioNodeOption(rt,nt,"coneOuterGain"),assignNativeAudioNodeOption(rt,nt,"distanceModel"),assignNativeAudioNodeOption(rt,nt,"maxDistance"),assignNativeAudioNodeOption(rt,nt,"panningModel"),assignNativeAudioNodeOption(rt,nt,"refDistance"),assignNativeAudioNodeOption(rt,nt,"rolloffFactor"),rt)},createNativePannerNodeFakerFactory=(tt,et,nt,rt,it,ot,at,st,lt,ct)=>(ut,{coneInnerAngle:ht,coneOuterAngle:dt,coneOuterGain:pt,distanceModel:mt,maxDistance:gt,orientationX:yt,orientationY:bt,orientationZ:vt,panningModel:xt,positionX:kt,positionY:St,positionZ:Tt,refDistance:At,rolloffFactor:Et,...$t})=>{const Dt=ut.createPanner();if($t.channelCount>2||$t.channelCountMode==="max")throw at();assignNativeAudioNodeOptions(Dt,$t);const jt={channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete"},Pt=nt(ut,{...jt,channelInterpretation:"speakers",numberOfInputs:6}),Ct=rt(ut,{...$t,gain:1}),wt=rt(ut,{...jt,gain:1}),It=rt(ut,{...jt,gain:0}),Ot=rt(ut,{...jt,gain:0}),Wt=rt(ut,{...jt,gain:0}),zt=rt(ut,{...jt,gain:0}),Ft=rt(ut,{...jt,gain:0}),Nt=it(ut,256,6,1),Ut=ot(ut,{...jt,curve:new Float32Array([1,1]),oversample:"none"});let Mt=[yt,bt,vt],Ht=[kt,St,Tt];const en=new Float32Array(1);Nt.onaudioprocess=({inputBuffer:nn})=>{const hn=[lt(nn,en,0),lt(nn,en,1),lt(nn,en,2)];hn.some((an,Qt)=>an!==Mt[Qt])&&(Dt.setOrientation(...hn),Mt=hn);const vn=[lt(nn,en,3),lt(nn,en,4),lt(nn,en,5)];vn.some((an,Qt)=>an!==Ht[Qt])&&(Dt.setPosition(...vn),Ht=vn)},Object.defineProperty(It.gain,"defaultValue",{get:()=>0}),Object.defineProperty(Ot.gain,"defaultValue",{get:()=>0}),Object.defineProperty(Wt.gain,"defaultValue",{get:()=>0}),Object.defineProperty(zt.gain,"defaultValue",{get:()=>0}),Object.defineProperty(Ft.gain,"defaultValue",{get:()=>0});const sn={get bufferSize(){},get channelCount(){return Dt.channelCount},set channelCount(nn){if(nn>2)throw at();Ct.channelCount=nn,Dt.channelCount=nn},get channelCountMode(){return Dt.channelCountMode},set channelCountMode(nn){if(nn==="max")throw at();Ct.channelCountMode=nn,Dt.channelCountMode=nn},get channelInterpretation(){return Dt.channelInterpretation},set channelInterpretation(nn){Ct.channelInterpretation=nn,Dt.channelInterpretation=nn},get coneInnerAngle(){return Dt.coneInnerAngle},set coneInnerAngle(nn){Dt.coneInnerAngle=nn},get coneOuterAngle(){return Dt.coneOuterAngle},set coneOuterAngle(nn){Dt.coneOuterAngle=nn},get coneOuterGain(){return Dt.coneOuterGain},set coneOuterGain(nn){if(nn<0||nn>1)throw et();Dt.coneOuterGain=nn},get context(){return Dt.context},get distanceModel(){return Dt.distanceModel},set distanceModel(nn){Dt.distanceModel=nn},get inputs(){return[Ct]},get maxDistance(){return Dt.maxDistance},set maxDistance(nn){if(nn<0)throw new RangeError;Dt.maxDistance=nn},get numberOfInputs(){return Dt.numberOfInputs},get numberOfOutputs(){return Dt.numberOfOutputs},get orientationX(){return wt.gain},get orientationY(){return It.gain},get orientationZ(){return Ot.gain},get panningModel(){return Dt.panningModel},set panningModel(nn){Dt.panningModel=nn},get positionX(){return Wt.gain},get positionY(){return zt.gain},get positionZ(){return Ft.gain},get refDistance(){return Dt.refDistance},set refDistance(nn){if(nn<0)throw new RangeError;Dt.refDistance=nn},get rolloffFactor(){return Dt.rolloffFactor},set rolloffFactor(nn){if(nn<0)throw new RangeError;Dt.rolloffFactor=nn},addEventListener(...nn){return Ct.addEventListener(nn[0],nn[1],nn[2])},dispatchEvent(...nn){return Ct.dispatchEvent(nn[0])},removeEventListener(...nn){return Ct.removeEventListener(nn[0],nn[1],nn[2])}};ht!==sn.coneInnerAngle&&(sn.coneInnerAngle=ht),dt!==sn.coneOuterAngle&&(sn.coneOuterAngle=dt),pt!==sn.coneOuterGain&&(sn.coneOuterGain=pt),mt!==sn.distanceModel&&(sn.distanceModel=mt),gt!==sn.maxDistance&&(sn.maxDistance=gt),yt!==sn.orientationX.value&&(sn.orientationX.value=yt),bt!==sn.orientationY.value&&(sn.orientationY.value=bt),vt!==sn.orientationZ.value&&(sn.orientationZ.value=vt),xt!==sn.panningModel&&(sn.panningModel=xt),kt!==sn.positionX.value&&(sn.positionX.value=kt),St!==sn.positionY.value&&(sn.positionY.value=St),Tt!==sn.positionZ.value&&(sn.positionZ.value=Tt),At!==sn.refDistance&&(sn.refDistance=At),Et!==sn.rolloffFactor&&(sn.rolloffFactor=Et),(Mt[0]!==1||Mt[1]!==0||Mt[2]!==0)&&Dt.setOrientation(...Mt),(Ht[0]!==0||Ht[1]!==0||Ht[2]!==0)&&Dt.setPosition(...Ht);const Kt=()=>{Ct.connect(Dt),tt(Ct,Ut,0,0),Ut.connect(wt).connect(Pt,0,0),Ut.connect(It).connect(Pt,0,1),Ut.connect(Ot).connect(Pt,0,2),Ut.connect(Wt).connect(Pt,0,3),Ut.connect(zt).connect(Pt,0,4),Ut.connect(Ft).connect(Pt,0,5),Pt.connect(Nt).connect(ut.destination)},rn=()=>{Ct.disconnect(Dt),st(Ct,Ut,0,0),Ut.disconnect(wt),wt.disconnect(Pt),Ut.disconnect(It),It.disconnect(Pt),Ut.disconnect(Ot),Ot.disconnect(Pt),Ut.disconnect(Wt),Wt.disconnect(Pt),Ut.disconnect(zt),zt.disconnect(Pt),Ut.disconnect(Ft),Ft.disconnect(Pt),Pt.disconnect(Nt),Nt.disconnect(ut.destination)};return ct(interceptConnections(sn,Dt),Kt,rn)},createNativePeriodicWaveFactory=tt=>(et,{disableNormalization:nt,imag:rt,real:it})=>{const ot=rt instanceof Float32Array?rt:new Float32Array(rt),at=it instanceof Float32Array?it:new Float32Array(it),st=et.createPeriodicWave(at,ot,{disableNormalization:nt});if(Array.from(rt).length<2)throw tt();return st},createNativeScriptProcessorNode=(tt,et,nt,rt)=>tt.createScriptProcessor(et,nt,rt),createNativeStereoPannerNodeFactory=(tt,et)=>(nt,rt)=>{const it=rt.channelCountMode;if(it==="clamped-max")throw et();if(nt.createStereoPanner===void 0)return tt(nt,rt);const ot=nt.createStereoPanner();return assignNativeAudioNodeOptions(ot,rt),assignNativeAudioNodeAudioParamValue(ot,rt,"pan"),Object.defineProperty(ot,"channelCountMode",{get:()=>it,set:at=>{if(at!==it)throw et()}}),ot},createNativeStereoPannerNodeFakerFactory=(tt,et,nt,rt,it,ot)=>{const st=new Float32Array([1,1]),lt=Math.PI/2,ct={channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete"},ut={...ct,oversample:"none"},ht=(mt,gt,yt,bt)=>{const vt=new Float32Array(16385),xt=new Float32Array(16385);for(let $t=0;$t<16385;$t+=1){const Dt=$t/16384*lt;vt[$t]=Math.cos(Dt),xt[$t]=Math.sin(Dt)}const kt=nt(mt,{...ct,gain:0}),St=rt(mt,{...ut,curve:vt}),Tt=rt(mt,{...ut,curve:st}),At=nt(mt,{...ct,gain:0}),Et=rt(mt,{...ut,curve:xt});return{connectGraph(){gt.connect(kt),gt.connect(Tt.inputs===void 0?Tt:Tt.inputs[0]),gt.connect(At),Tt.connect(yt),yt.connect(St.inputs===void 0?St:St.inputs[0]),yt.connect(Et.inputs===void 0?Et:Et.inputs[0]),St.connect(kt.gain),Et.connect(At.gain),kt.connect(bt,0,0),At.connect(bt,0,1)},disconnectGraph(){gt.disconnect(kt),gt.disconnect(Tt.inputs===void 0?Tt:Tt.inputs[0]),gt.disconnect(At),Tt.disconnect(yt),yt.disconnect(St.inputs===void 0?St:St.inputs[0]),yt.disconnect(Et.inputs===void 0?Et:Et.inputs[0]),St.disconnect(kt.gain),Et.disconnect(At.gain),kt.disconnect(bt,0,0),At.disconnect(bt,0,1)}}},dt=(mt,gt,yt,bt)=>{const vt=new Float32Array(16385),xt=new Float32Array(16385),kt=new Float32Array(16385),St=new Float32Array(16385),Tt=Math.floor(16385/2);for(let Wt=0;Wt<16385;Wt+=1)if(Wt>Tt){const zt=(Wt-Tt)/(16384-Tt)*lt;vt[Wt]=Math.cos(zt),xt[Wt]=Math.sin(zt),kt[Wt]=0,St[Wt]=1}else{const zt=Wt/(16384-Tt)*lt;vt[Wt]=1,xt[Wt]=0,kt[Wt]=Math.cos(zt),St[Wt]=Math.sin(zt)}const At=et(mt,{channelCount:2,channelCountMode:"explicit",channelInterpretation:"discrete",numberOfOutputs:2}),Et=nt(mt,{...ct,gain:0}),$t=rt(mt,{...ut,curve:vt}),Dt=nt(mt,{...ct,gain:0}),jt=rt(mt,{...ut,curve:xt}),Pt=rt(mt,{...ut,curve:st}),Ct=nt(mt,{...ct,gain:0}),wt=rt(mt,{...ut,curve:kt}),It=nt(mt,{...ct,gain:0}),Ot=rt(mt,{...ut,curve:St});return{connectGraph(){gt.connect(At),gt.connect(Pt.inputs===void 0?Pt:Pt.inputs[0]),At.connect(Et,0),At.connect(Dt,0),At.connect(Ct,1),At.connect(It,1),Pt.connect(yt),yt.connect($t.inputs===void 0?$t:$t.inputs[0]),yt.connect(jt.inputs===void 0?jt:jt.inputs[0]),yt.connect(wt.inputs===void 0?wt:wt.inputs[0]),yt.connect(Ot.inputs===void 0?Ot:Ot.inputs[0]),$t.connect(Et.gain),jt.connect(Dt.gain),wt.connect(Ct.gain),Ot.connect(It.gain),Et.connect(bt,0,0),Ct.connect(bt,0,0),Dt.connect(bt,0,1),It.connect(bt,0,1)},disconnectGraph(){gt.disconnect(At),gt.disconnect(Pt.inputs===void 0?Pt:Pt.inputs[0]),At.disconnect(Et,0),At.disconnect(Dt,0),At.disconnect(Ct,1),At.disconnect(It,1),Pt.disconnect(yt),yt.disconnect($t.inputs===void 0?$t:$t.inputs[0]),yt.disconnect(jt.inputs===void 0?jt:jt.inputs[0]),yt.disconnect(wt.inputs===void 0?wt:wt.inputs[0]),yt.disconnect(Ot.inputs===void 0?Ot:Ot.inputs[0]),$t.disconnect(Et.gain),jt.disconnect(Dt.gain),wt.disconnect(Ct.gain),Ot.disconnect(It.gain),Et.disconnect(bt,0,0),Ct.disconnect(bt,0,0),Dt.disconnect(bt,0,1),It.disconnect(bt,0,1)}}},pt=(mt,gt,yt,bt,vt)=>{if(gt===1)return ht(mt,yt,bt,vt);if(gt===2)return dt(mt,yt,bt,vt);throw it()};return(mt,{channelCount:gt,channelCountMode:yt,pan:bt,...vt})=>{if(yt==="max")throw it();const xt=tt(mt,{...vt,channelCount:1,channelCountMode:yt,numberOfInputs:2}),kt=nt(mt,{...vt,channelCount:gt,channelCountMode:yt,gain:1}),St=nt(mt,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete",gain:bt});let{connectGraph:Tt,disconnectGraph:At}=pt(mt,gt,kt,St,xt);Object.defineProperty(St.gain,"defaultValue",{get:()=>0}),Object.defineProperty(St.gain,"maxValue",{get:()=>1}),Object.defineProperty(St.gain,"minValue",{get:()=>-1});const Et={get bufferSize(){},get channelCount(){return kt.channelCount},set channelCount(Pt){kt.channelCount!==Pt&&($t&&At(),{connectGraph:Tt,disconnectGraph:At}=pt(mt,Pt,kt,St,xt),$t&&Tt()),kt.channelCount=Pt},get channelCountMode(){return kt.channelCountMode},set channelCountMode(Pt){if(Pt==="clamped-max"||Pt==="max")throw it();kt.channelCountMode=Pt},get channelInterpretation(){return kt.channelInterpretation},set channelInterpretation(Pt){kt.channelInterpretation=Pt},get context(){return kt.context},get inputs(){return[kt]},get numberOfInputs(){return kt.numberOfInputs},get numberOfOutputs(){return kt.numberOfOutputs},get pan(){return St.gain},addEventListener(...Pt){return kt.addEventListener(Pt[0],Pt[1],Pt[2])},dispatchEvent(...Pt){return kt.dispatchEvent(Pt[0])},removeEventListener(...Pt){return kt.removeEventListener(Pt[0],Pt[1],Pt[2])}};let $t=!1;const Dt=()=>{Tt(),$t=!0},jt=()=>{At(),$t=!1};return ot(interceptConnections(Et,xt),Dt,jt)}},createNativeWaveShaperNodeFactory=(tt,et,nt,rt,it,ot,at)=>(st,lt)=>{const ct=st.createWaveShaper();if(ot!==null&&ot.name==="webkitAudioContext"&&st.createGain().gain.automationRate===void 0)return nt(st,lt);assignNativeAudioNodeOptions(ct,lt);const ut=lt.curve===null||lt.curve instanceof Float32Array?lt.curve:new Float32Array(lt.curve);if(ut!==null&&ut.length<2)throw et();assignNativeAudioNodeOption(ct,{curve:ut},"curve"),assignNativeAudioNodeOption(ct,lt,"oversample");let ht=null,dt=!1;return at(ct,"curve",gt=>()=>gt.call(ct),gt=>yt=>(gt.call(ct,yt),dt&&(rt(yt)&&ht===null?ht=tt(st,ct):!rt(yt)&&ht!==null&&(ht(),ht=null)),yt)),it(ct,()=>{dt=!0,rt(ct.curve)&&(ht=tt(st,ct))},()=>{dt=!1,ht!==null&&(ht(),ht=null)})},createNativeWaveShaperNodeFakerFactory=(tt,et,nt,rt,it)=>(ot,{curve:at,oversample:st,...lt})=>{const ct=ot.createWaveShaper(),ut=ot.createWaveShaper();assignNativeAudioNodeOptions(ct,lt),assignNativeAudioNodeOptions(ut,lt);const ht=nt(ot,{...lt,gain:1}),dt=nt(ot,{...lt,gain:-1}),pt=nt(ot,{...lt,gain:1}),mt=nt(ot,{...lt,gain:-1});let gt=null,yt=!1,bt=null;const vt={get bufferSize(){},get channelCount(){return ct.channelCount},set channelCount(St){ht.channelCount=St,dt.channelCount=St,ct.channelCount=St,pt.channelCount=St,ut.channelCount=St,mt.channelCount=St},get channelCountMode(){return ct.channelCountMode},set channelCountMode(St){ht.channelCountMode=St,dt.channelCountMode=St,ct.channelCountMode=St,pt.channelCountMode=St,ut.channelCountMode=St,mt.channelCountMode=St},get channelInterpretation(){return ct.channelInterpretation},set channelInterpretation(St){ht.channelInterpretation=St,dt.channelInterpretation=St,ct.channelInterpretation=St,pt.channelInterpretation=St,ut.channelInterpretation=St,mt.channelInterpretation=St},get context(){return ct.context},get curve(){return bt},set curve(St){if(St!==null&&St.length<2)throw et();if(St===null)ct.curve=St,ut.curve=St;else{const Tt=St.length,At=new Float32Array(Tt+2-Tt%2),Et=new Float32Array(Tt+2-Tt%2);At[0]=St[0],Et[0]=-St[Tt-1];const $t=Math.ceil((Tt+1)/2),Dt=(Tt+1)/2-1;for(let jt=1;jt<$t;jt+=1){const Pt=jt/$t*Dt,Ct=Math.floor(Pt),wt=Math.ceil(Pt);At[jt]=Ct===wt?St[Ct]:(1-(Pt-Ct))*St[Ct]+(1-(wt-Pt))*St[wt],Et[jt]=Ct===wt?-St[Tt-1-Ct]:-((1-(Pt-Ct))*St[Tt-1-Ct])-(1-(wt-Pt))*St[Tt-1-wt]}At[$t]=Tt%2===1?St[$t-1]:(St[$t-2]+St[$t-1])/2,ct.curve=At,ut.curve=Et}bt=St,yt&&(rt(bt)&>===null?gt=tt(ot,ht):gt!==null&&(gt(),gt=null))},get inputs(){return[ht]},get numberOfInputs(){return ct.numberOfInputs},get numberOfOutputs(){return ct.numberOfOutputs},get oversample(){return ct.oversample},set oversample(St){ct.oversample=St,ut.oversample=St},addEventListener(...St){return ht.addEventListener(St[0],St[1],St[2])},dispatchEvent(...St){return ht.dispatchEvent(St[0])},removeEventListener(...St){return ht.removeEventListener(St[0],St[1],St[2])}};at!==null&&(vt.curve=at instanceof Float32Array?at:new Float32Array(at)),st!==vt.oversample&&(vt.oversample=st);const xt=()=>{ht.connect(ct).connect(pt),ht.connect(dt).connect(ut).connect(mt).connect(pt),yt=!0,rt(bt)&&(gt=tt(ot,ht))},kt=()=>{ht.disconnect(ct),ct.disconnect(pt),ht.disconnect(dt),dt.disconnect(ut),ut.disconnect(mt),mt.disconnect(pt),yt=!1,gt!==null&&(gt(),gt=null)};return it(interceptConnections(vt,pt),xt,kt)},createNotSupportedError=()=>new DOMException("","NotSupportedError"),DEFAULT_OPTIONS$5={numberOfChannels:1},createOfflineAudioContextConstructor=(tt,et,nt,rt,it)=>class extends tt{constructor(at,st,lt){let ct;if(typeof at=="number"&&st!==void 0&<!==void 0)ct={length:st,numberOfChannels:at,sampleRate:lt};else if(typeof at=="object")ct=at;else throw new Error("The given parameters are not valid.");const{length:ut,numberOfChannels:ht,sampleRate:dt}={...DEFAULT_OPTIONS$5,...ct},pt=rt(ht,ut,dt);et(testPromiseSupport,()=>testPromiseSupport(pt))||pt.addEventListener("statechange",(()=>{let mt=0;const gt=yt=>{this._state==="running"&&(mt>0?(pt.removeEventListener("statechange",gt),yt.stopImmediatePropagation(),this._waitForThePromiseToSettle(yt)):mt+=1)};return gt})()),super(pt,ht),this._length=ut,this._nativeOfflineAudioContext=pt,this._state=null}get length(){return this._nativeOfflineAudioContext.length===void 0?this._length:this._nativeOfflineAudioContext.length}get state(){return this._state===null?this._nativeOfflineAudioContext.state:this._state}startRendering(){return this._state==="running"?Promise.reject(nt()):(this._state="running",it(this.destination,this._nativeOfflineAudioContext).finally(()=>{this._state=null,deactivateAudioGraph(this)}))}_waitForThePromiseToSettle(at){this._state===null?this._nativeOfflineAudioContext.dispatchEvent(at):setTimeout(()=>this._waitForThePromiseToSettle(at))}},DEFAULT_OPTIONS$4={channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",detune:0,frequency:440,periodicWave:void 0,type:"sine"},createOscillatorNodeConstructor=(tt,et,nt,rt,it,ot,at)=>class extends tt{constructor(lt,ct){const ut=it(lt),ht={...DEFAULT_OPTIONS$4,...ct},dt=nt(ut,ht),pt=ot(ut),mt=pt?rt():null,gt=lt.sampleRate/2;super(lt,!1,dt,mt),this._detune=et(this,pt,dt.detune,153600,-153600),this._frequency=et(this,pt,dt.frequency,gt,-gt),this._nativeOscillatorNode=dt,this._onended=null,this._oscillatorNodeRenderer=mt,this._oscillatorNodeRenderer!==null&&ht.periodicWave!==void 0&&(this._oscillatorNodeRenderer.periodicWave=ht.periodicWave)}get detune(){return this._detune}get frequency(){return this._frequency}get onended(){return this._onended}set onended(lt){const ct=typeof lt=="function"?at(this,lt):null;this._nativeOscillatorNode.onended=ct;const ut=this._nativeOscillatorNode.onended;this._onended=ut!==null&&ut===ct?lt:ut}get type(){return this._nativeOscillatorNode.type}set type(lt){this._nativeOscillatorNode.type=lt,this._oscillatorNodeRenderer!==null&&(this._oscillatorNodeRenderer.periodicWave=null)}setPeriodicWave(lt){this._nativeOscillatorNode.setPeriodicWave(lt),this._oscillatorNodeRenderer!==null&&(this._oscillatorNodeRenderer.periodicWave=lt)}start(lt=0){if(this._nativeOscillatorNode.start(lt),this._oscillatorNodeRenderer!==null&&(this._oscillatorNodeRenderer.start=lt),this.context.state!=="closed"){setInternalStateToActive(this);const ct=()=>{this._nativeOscillatorNode.removeEventListener("ended",ct),isActiveAudioNode(this)&&setInternalStateToPassive(this)};this._nativeOscillatorNode.addEventListener("ended",ct)}}stop(lt=0){this._nativeOscillatorNode.stop(lt),this._oscillatorNodeRenderer!==null&&(this._oscillatorNodeRenderer.stop=lt)}},createOscillatorNodeRendererFactory=(tt,et,nt,rt,it)=>()=>{const ot=new WeakMap;let at=null,st=null,lt=null;const ct=async(ut,ht)=>{let dt=nt(ut);const pt=isOwnedByContext(dt,ht);if(!pt){const mt={channelCount:dt.channelCount,channelCountMode:dt.channelCountMode,channelInterpretation:dt.channelInterpretation,detune:dt.detune.value,frequency:dt.frequency.value,periodicWave:at===null?void 0:at,type:dt.type};dt=et(ht,mt),st!==null&&dt.start(st),lt!==null&&dt.stop(lt)}return ot.set(ht,dt),pt?(await tt(ht,ut.detune,dt.detune),await tt(ht,ut.frequency,dt.frequency)):(await rt(ht,ut.detune,dt.detune),await rt(ht,ut.frequency,dt.frequency)),await it(ut,ht,dt),dt};return{set periodicWave(ut){at=ut},set start(ut){st=ut},set stop(ut){lt=ut},render(ut,ht){const dt=ot.get(ht);return dt!==void 0?Promise.resolve(dt):ct(ut,ht)}}},DEFAULT_OPTIONS$3={channelCount:2,channelCountMode:"clamped-max",channelInterpretation:"speakers",coneInnerAngle:360,coneOuterAngle:360,coneOuterGain:0,distanceModel:"inverse",maxDistance:1e4,orientationX:1,orientationY:0,orientationZ:0,panningModel:"equalpower",positionX:0,positionY:0,positionZ:0,refDistance:1,rolloffFactor:1},createPannerNodeConstructor=(tt,et,nt,rt,it,ot,at)=>class extends tt{constructor(lt,ct){const ut=it(lt),ht={...DEFAULT_OPTIONS$3,...ct},dt=nt(ut,ht),pt=ot(ut),mt=pt?rt():null;super(lt,!1,dt,mt),this._nativePannerNode=dt,this._orientationX=et(this,pt,dt.orientationX,MOST_POSITIVE_SINGLE_FLOAT,MOST_NEGATIVE_SINGLE_FLOAT),this._orientationY=et(this,pt,dt.orientationY,MOST_POSITIVE_SINGLE_FLOAT,MOST_NEGATIVE_SINGLE_FLOAT),this._orientationZ=et(this,pt,dt.orientationZ,MOST_POSITIVE_SINGLE_FLOAT,MOST_NEGATIVE_SINGLE_FLOAT),this._positionX=et(this,pt,dt.positionX,MOST_POSITIVE_SINGLE_FLOAT,MOST_NEGATIVE_SINGLE_FLOAT),this._positionY=et(this,pt,dt.positionY,MOST_POSITIVE_SINGLE_FLOAT,MOST_NEGATIVE_SINGLE_FLOAT),this._positionZ=et(this,pt,dt.positionZ,MOST_POSITIVE_SINGLE_FLOAT,MOST_NEGATIVE_SINGLE_FLOAT),at(this,1)}get coneInnerAngle(){return this._nativePannerNode.coneInnerAngle}set coneInnerAngle(lt){this._nativePannerNode.coneInnerAngle=lt}get coneOuterAngle(){return this._nativePannerNode.coneOuterAngle}set coneOuterAngle(lt){this._nativePannerNode.coneOuterAngle=lt}get coneOuterGain(){return this._nativePannerNode.coneOuterGain}set coneOuterGain(lt){this._nativePannerNode.coneOuterGain=lt}get distanceModel(){return this._nativePannerNode.distanceModel}set distanceModel(lt){this._nativePannerNode.distanceModel=lt}get maxDistance(){return this._nativePannerNode.maxDistance}set maxDistance(lt){this._nativePannerNode.maxDistance=lt}get orientationX(){return this._orientationX}get orientationY(){return this._orientationY}get orientationZ(){return this._orientationZ}get panningModel(){return this._nativePannerNode.panningModel}set panningModel(lt){this._nativePannerNode.panningModel=lt}get positionX(){return this._positionX}get positionY(){return this._positionY}get positionZ(){return this._positionZ}get refDistance(){return this._nativePannerNode.refDistance}set refDistance(lt){this._nativePannerNode.refDistance=lt}get rolloffFactor(){return this._nativePannerNode.rolloffFactor}set rolloffFactor(lt){this._nativePannerNode.rolloffFactor=lt}},createPannerNodeRendererFactory=(tt,et,nt,rt,it,ot,at,st,lt,ct)=>()=>{const ut=new WeakMap;let ht=null;const dt=async(pt,mt)=>{let gt=null,yt=ot(pt);const bt={channelCount:yt.channelCount,channelCountMode:yt.channelCountMode,channelInterpretation:yt.channelInterpretation},vt={...bt,coneInnerAngle:yt.coneInnerAngle,coneOuterAngle:yt.coneOuterAngle,coneOuterGain:yt.coneOuterGain,distanceModel:yt.distanceModel,maxDistance:yt.maxDistance,panningModel:yt.panningModel,refDistance:yt.refDistance,rolloffFactor:yt.rolloffFactor},xt=isOwnedByContext(yt,mt);if("bufferSize"in yt)gt=rt(mt,{...bt,gain:1});else if(!xt){const kt={...vt,orientationX:yt.orientationX.value,orientationY:yt.orientationY.value,orientationZ:yt.orientationZ.value,positionX:yt.positionX.value,positionY:yt.positionY.value,positionZ:yt.positionZ.value};yt=it(mt,kt)}if(ut.set(mt,gt===null?yt:gt),gt!==null){if(ht===null){if(at===null)throw new Error("Missing the native OfflineAudioContext constructor.");const jt=new at(6,pt.context.length,mt.sampleRate),Pt=et(jt,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"speakers",numberOfInputs:6});Pt.connect(jt.destination),ht=(async()=>{const Ct=await Promise.all([pt.orientationX,pt.orientationY,pt.orientationZ,pt.positionX,pt.positionY,pt.positionZ].map(async(wt,It)=>{const Ot=nt(jt,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete",offset:It===0?1:0});return await st(jt,wt,Ot.offset),Ot}));for(let wt=0;wt<6;wt+=1)Ct[wt].connect(Pt,0,wt),Ct[wt].start(0);return ct(jt)})()}const kt=await ht,St=rt(mt,{...bt,gain:1});await lt(pt,mt,St);const Tt=[];for(let jt=0;jtwt!==At[It])||Ct.some((wt,It)=>wt!==Et[It])){At=Pt,Et=Ct;const wt=jt/mt.sampleRate;$t.gain.setValueAtTime(0,wt),$t=rt(mt,{...bt,gain:0}),Dt=it(mt,{...vt,orientationX:At[0],orientationY:At[1],orientationZ:At[2],positionX:Et[0],positionY:Et[1],positionZ:Et[2]}),$t.gain.setValueAtTime(1,wt),St.connect($t).connect(Dt.inputs[0]),Dt.connect(gt)}}return gt}return xt?(await tt(mt,pt.orientationX,yt.orientationX),await tt(mt,pt.orientationY,yt.orientationY),await tt(mt,pt.orientationZ,yt.orientationZ),await tt(mt,pt.positionX,yt.positionX),await tt(mt,pt.positionY,yt.positionY),await tt(mt,pt.positionZ,yt.positionZ)):(await st(mt,pt.orientationX,yt.orientationX),await st(mt,pt.orientationY,yt.orientationY),await st(mt,pt.orientationZ,yt.orientationZ),await st(mt,pt.positionX,yt.positionX),await st(mt,pt.positionY,yt.positionY),await st(mt,pt.positionZ,yt.positionZ)),isNativeAudioNodeFaker(yt)?await lt(pt,mt,yt.inputs[0]):await lt(pt,mt,yt),yt};return{render(pt,mt){const gt=ut.get(mt);return gt!==void 0?Promise.resolve(gt):dt(pt,mt)}}},DEFAULT_OPTIONS$2={disableNormalization:!1},createPeriodicWaveConstructor=(tt,et,nt,rt)=>class vw{constructor(ot,at){const st=et(ot),lt=rt({...DEFAULT_OPTIONS$2,...at}),ct=tt(st,lt);return nt.add(ct),ct}static[Symbol.hasInstance](ot){return ot!==null&&typeof ot=="object"&&Object.getPrototypeOf(ot)===vw.prototype||nt.has(ot)}},createRenderAutomation=(tt,et)=>(nt,rt,it)=>(tt(rt).replay(it),et(rt,nt,it)),createRenderInputsOfAudioNode=(tt,et,nt)=>async(rt,it,ot)=>{const at=tt(rt);await Promise.all(at.activeInputs.map((st,lt)=>Array.from(st).map(async([ct,ut])=>{const dt=await et(ct).render(ct,it),pt=rt.context.destination;!nt(ct)&&(rt!==pt||!nt(rt))&&dt.connect(ot,ut,lt)})).reduce((st,lt)=>[...st,...lt],[]))},createRenderInputsOfAudioParam=(tt,et,nt)=>async(rt,it,ot)=>{const at=et(rt);await Promise.all(Array.from(at.activeInputs).map(async([st,lt])=>{const ut=await tt(st).render(st,it);nt(st)||ut.connect(ot,lt)}))},createRenderNativeOfflineAudioContext=(tt,et,nt,rt)=>it=>tt(testPromiseSupport,()=>testPromiseSupport(it))?Promise.resolve(tt(rt,rt)).then(ot=>{if(!ot){const at=nt(it,512,0,1);it.oncomplete=()=>{at.onaudioprocess=null,at.disconnect()},at.onaudioprocess=()=>it.currentTime,at.connect(it.destination)}return it.startRendering()}):new Promise(ot=>{const at=et(it,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete",gain:0});it.oncomplete=st=>{at.disconnect(),ot(st.renderedBuffer)},at.connect(it.destination),it.startRendering()}),createSetActiveAudioWorkletNodeInputs=tt=>(et,nt)=>{tt.set(et,nt)},createSetAudioNodeTailTime=tt=>(et,nt)=>tt.set(et,nt),createStartRendering=(tt,et,nt,rt,it,ot,at,st)=>(lt,ct)=>nt(lt).render(lt,ct).then(()=>Promise.all(Array.from(rt(ct)).map(ut=>nt(ut).render(ut,ct)))).then(()=>it(ct)).then(ut=>(typeof ut.copyFromChannel!="function"?(at(ut),wrapAudioBufferGetChannelDataMethod(ut)):et(ot,()=>ot(ut))||st(ut),tt.add(ut),ut)),DEFAULT_OPTIONS$1={channelCount:2,channelCountMode:"explicit",channelInterpretation:"speakers",pan:0},createStereoPannerNodeConstructor=(tt,et,nt,rt,it,ot)=>class extends tt{constructor(st,lt){const ct=it(st),ut={...DEFAULT_OPTIONS$1,...lt},ht=nt(ct,ut),dt=ot(ct),pt=dt?rt():null;super(st,!1,ht,pt),this._pan=et(this,dt,ht.pan)}get pan(){return this._pan}},createStereoPannerNodeRendererFactory=(tt,et,nt,rt,it)=>()=>{const ot=new WeakMap,at=async(st,lt)=>{let ct=nt(st);const ut=isOwnedByContext(ct,lt);if(!ut){const ht={channelCount:ct.channelCount,channelCountMode:ct.channelCountMode,channelInterpretation:ct.channelInterpretation,pan:ct.pan.value};ct=et(lt,ht)}return ot.set(lt,ct),ut?await tt(lt,st.pan,ct.pan):await rt(lt,st.pan,ct.pan),isNativeAudioNodeFaker(ct)?await it(st,lt,ct.inputs[0]):await it(st,lt,ct),ct};return{render(st,lt){const ct=ot.get(lt);return ct!==void 0?Promise.resolve(ct):at(st,lt)}}},createTestAudioBufferConstructorSupport=tt=>()=>{if(tt===null)return!1;try{new tt({length:1,sampleRate:44100})}catch{return!1}return!0},createTestAudioWorkletProcessorPostMessageSupport=(tt,et)=>async()=>{if(tt===null)return!0;if(et===null)return!1;const nt=new Blob(['class A extends AudioWorkletProcessor{process(i){this.port.postMessage(i,[i[0][0].buffer])}}registerProcessor("a",A)'],{type:"application/javascript; charset=utf-8"}),rt=new et(1,128,44100),it=URL.createObjectURL(nt);let ot=!1,at=!1;try{await rt.audioWorklet.addModule(it);const st=new tt(rt,"a",{numberOfOutputs:0}),lt=rt.createOscillator();st.port.onmessage=()=>ot=!0,st.onprocessorerror=()=>at=!0,lt.connect(st),lt.start(0),await rt.startRendering(),await new Promise(ct=>setTimeout(ct))}catch{}finally{URL.revokeObjectURL(it)}return ot&&!at},createTestOfflineAudioContextCurrentTimeSupport=(tt,et)=>()=>{if(et===null)return Promise.resolve(!1);const nt=new et(1,1,44100),rt=tt(nt,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete",gain:0});return new Promise(it=>{nt.oncomplete=()=>{rt.disconnect(),it(nt.currentTime!==0)},nt.startRendering()})},createUnknownError=()=>new DOMException("","UnknownError"),DEFAULT_OPTIONS={channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",curve:null,oversample:"none"},createWaveShaperNodeConstructor=(tt,et,nt,rt,it,ot,at)=>class extends tt{constructor(lt,ct){const ut=it(lt),ht={...DEFAULT_OPTIONS,...ct},dt=nt(ut,ht),mt=ot(ut)?rt():null;super(lt,!0,dt,mt),this._isCurveNullified=!1,this._nativeWaveShaperNode=dt,at(this,1)}get curve(){return this._isCurveNullified?null:this._nativeWaveShaperNode.curve}set curve(lt){if(lt===null)this._isCurveNullified=!0,this._nativeWaveShaperNode.curve=new Float32Array([0,0]);else{if(lt.length<2)throw et();this._isCurveNullified=!1,this._nativeWaveShaperNode.curve=lt}}get oversample(){return this._nativeWaveShaperNode.oversample}set oversample(lt){this._nativeWaveShaperNode.oversample=lt}},createWaveShaperNodeRendererFactory=(tt,et,nt)=>()=>{const rt=new WeakMap,it=async(ot,at)=>{let st=et(ot);if(!isOwnedByContext(st,at)){const ct={channelCount:st.channelCount,channelCountMode:st.channelCountMode,channelInterpretation:st.channelInterpretation,curve:st.curve,oversample:st.oversample};st=tt(at,ct)}return rt.set(at,st),isNativeAudioNodeFaker(st)?await nt(ot,at,st.inputs[0]):await nt(ot,at,st),st};return{render(ot,at){const st=rt.get(at);return st!==void 0?Promise.resolve(st):it(ot,at)}}},createWindow=()=>typeof window>"u"?null:window,createWrapAudioBufferCopyChannelMethods=(tt,et)=>nt=>{nt.copyFromChannel=(rt,it,ot=0)=>{const at=tt(ot),st=tt(it);if(st>=nt.numberOfChannels)throw et();const lt=nt.length,ct=nt.getChannelData(st),ut=rt.length;for(let ht=at<0?-at:0;ht+at{const at=tt(ot),st=tt(it);if(st>=nt.numberOfChannels)throw et();const lt=nt.length,ct=nt.getChannelData(st),ut=rt.length;for(let ht=at<0?-at:0;ht+atet=>{et.copyFromChannel=(nt=>(rt,it,ot=0)=>{const at=tt(ot),st=tt(it);if(at(rt,it,ot=0)=>{const at=tt(ot),st=tt(it);if(at(et,nt)=>{const rt=nt.createBuffer(1,1,44100);et.buffer===null&&(et.buffer=rt),tt(et,"buffer",it=>()=>{const ot=it.call(et);return ot===rt?null:ot},it=>ot=>it.call(et,ot===null?rt:ot))},createWrapChannelMergerNode=(tt,et)=>(nt,rt)=>{rt.channelCount=1,rt.channelCountMode="explicit",Object.defineProperty(rt,"channelCount",{get:()=>1,set:()=>{throw tt()}}),Object.defineProperty(rt,"channelCountMode",{get:()=>"explicit",set:()=>{throw tt()}});const it=nt.createBufferSource();et(rt,()=>{const st=rt.numberOfInputs;for(let lt=0;ltit.disconnect(rt))},getFirstSample=(tt,et,nt)=>tt.copyFromChannel===void 0?tt.getChannelData(nt)[0]:(tt.copyFromChannel(et,nt),et[0]),isDCCurve=tt=>{if(tt===null)return!1;const et=tt.length;return et%2!==0?tt[Math.floor(et/2)]!==0:tt[et/2-1]+tt[et/2]!==0},overwriteAccessors=(tt,et,nt,rt)=>{let it=tt;for(;!it.hasOwnProperty(et);)it=Object.getPrototypeOf(it);const{get:ot,set:at}=Object.getOwnPropertyDescriptor(it,et);Object.defineProperty(tt,et,{get:nt(ot),set:rt(at)})},sanitizeAudioWorkletNodeOptions=tt=>({...tt,outputChannelCount:tt.outputChannelCount!==void 0?tt.outputChannelCount:tt.numberOfInputs===1&&tt.numberOfOutputs===1?[tt.channelCount]:Array.from({length:tt.numberOfOutputs},()=>1)}),sanitizeChannelSplitterOptions=tt=>({...tt,channelCount:tt.numberOfOutputs}),sanitizePeriodicWaveOptions=tt=>{const{imag:et,real:nt}=tt;return et===void 0?nt===void 0?{...tt,imag:[0,0],real:[0,0]}:{...tt,imag:Array.from(nt,()=>0),real:nt}:nt===void 0?{...tt,imag:et,real:Array.from(et,()=>0)}:{...tt,imag:et,real:nt}},setValueAtTimeUntilPossible=(tt,et,nt)=>{try{tt.setValueAtTime(et,nt)}catch(rt){if(rt.code!==9)throw rt;setValueAtTimeUntilPossible(tt,et,nt+1e-7)}},testAudioBufferSourceNodeStartMethodConsecutiveCallsSupport=tt=>{const et=tt.createBufferSource();et.start();try{et.start()}catch{return!0}return!1},testAudioBufferSourceNodeStartMethodOffsetClampingSupport=tt=>{const et=tt.createBufferSource(),nt=tt.createBuffer(1,1,44100);et.buffer=nt;try{et.start(0,1)}catch{return!1}return!0},testAudioBufferSourceNodeStopMethodNullifiedBufferSupport=tt=>{const et=tt.createBufferSource();et.start();try{et.stop()}catch{return!1}return!0},testAudioScheduledSourceNodeStartMethodNegativeParametersSupport=tt=>{const et=tt.createOscillator();try{et.start(-1)}catch(nt){return nt instanceof RangeError}return!1},testAudioScheduledSourceNodeStopMethodConsecutiveCallsSupport=tt=>{const et=tt.createBuffer(1,1,44100),nt=tt.createBufferSource();nt.buffer=et,nt.start(),nt.stop();try{return nt.stop(),!0}catch{return!1}},testAudioScheduledSourceNodeStopMethodNegativeParametersSupport=tt=>{const et=tt.createOscillator();try{et.stop(-1)}catch(nt){return nt instanceof RangeError}return!1},testAudioWorkletNodeOptionsClonability=tt=>{const{port1:et,port2:nt}=new MessageChannel;try{et.postMessage(tt)}finally{et.close(),nt.close()}},wrapAudioBufferSourceNodeStartMethodOffsetClamping=tt=>{tt.start=(et=>(nt=0,rt=0,it)=>{const ot=tt.buffer,at=ot===null?rt:Math.min(ot.duration,rt);ot!==null&&at>ot.duration-.5/tt.context.sampleRate?et.call(tt,nt,0,0):et.call(tt,nt,at,it)})(tt.start)},wrapAudioScheduledSourceNodeStopMethodConsecutiveCalls=(tt,et)=>{const nt=et.createGain();tt.connect(nt);const rt=(it=>()=>{it.call(tt,nt),tt.removeEventListener("ended",rt)})(tt.disconnect);tt.addEventListener("ended",rt),interceptConnections(tt,nt),tt.stop=(it=>{let ot=!1;return(at=0)=>{if(ot)try{it.call(tt,at)}catch{nt.gain.setValueAtTime(0,at)}else it.call(tt,at),ot=!0}})(tt.stop)},wrapEventListener=(tt,et)=>nt=>{const rt={value:tt};return Object.defineProperties(nt,{currentTarget:rt,target:rt}),typeof et=="function"?et.call(tt,nt):et.handleEvent.call(tt,nt)},addActiveInputConnectionToAudioNode=createAddActiveInputConnectionToAudioNode(insertElementInSet),addPassiveInputConnectionToAudioNode=createAddPassiveInputConnectionToAudioNode(insertElementInSet),deleteActiveInputConnectionToAudioNode=createDeleteActiveInputConnectionToAudioNode(pickElementFromSet),audioNodeTailTimeStore=new WeakMap,getAudioNodeTailTime=createGetAudioNodeTailTime(audioNodeTailTimeStore),cacheTestResult=createCacheTestResult(new Map,new WeakMap),window$1=createWindow(),createNativeAnalyserNode=createNativeAnalyserNodeFactory(cacheTestResult,createIndexSizeError),getAudioNodeRenderer=createGetAudioNodeRenderer(getAudioNodeConnections),renderInputsOfAudioNode=createRenderInputsOfAudioNode(getAudioNodeConnections,getAudioNodeRenderer,isPartOfACycle),createAnalyserNodeRenderer=createAnalyserNodeRendererFactory(createNativeAnalyserNode,getNativeAudioNode,renderInputsOfAudioNode),getNativeContext=createGetNativeContext(CONTEXT_STORE),nativeOfflineAudioContextConstructor=createNativeOfflineAudioContextConstructor(window$1),isNativeOfflineAudioContext=createIsNativeOfflineAudioContext(nativeOfflineAudioContextConstructor),audioParamAudioNodeStore=new WeakMap,eventTargetConstructor=createEventTargetConstructor(wrapEventListener),nativeAudioContextConstructor=createNativeAudioContextConstructor(window$1),isNativeAudioContext=createIsNativeAudioContext(nativeAudioContextConstructor),isNativeAudioNode=createIsNativeAudioNode(window$1),isNativeAudioParam=createIsNativeAudioParam(window$1),nativeAudioWorkletNodeConstructor=createNativeAudioWorkletNodeConstructor(window$1),audioNodeConstructor=createAudioNodeConstructor(createAddAudioNodeConnections(AUDIO_NODE_CONNECTIONS_STORE),createAddConnectionToAudioNode(addActiveInputConnectionToAudioNode,addPassiveInputConnectionToAudioNode,connectNativeAudioNodeToNativeAudioNode,deleteActiveInputConnectionToAudioNode,disconnectNativeAudioNodeFromNativeAudioNode,getAudioNodeConnections,getAudioNodeTailTime,getEventListenersOfAudioNode,getNativeAudioNode,insertElementInSet,isActiveAudioNode,isPartOfACycle,isPassiveAudioNode),cacheTestResult,createIncrementCycleCounterFactory(CYCLE_COUNTERS,disconnectNativeAudioNodeFromNativeAudioNode,getAudioNodeConnections,getNativeAudioNode,getNativeAudioParam,isActiveAudioNode),createIndexSizeError,createInvalidAccessError,createNotSupportedError,createDecrementCycleCounter(connectNativeAudioNodeToNativeAudioNode,CYCLE_COUNTERS,getAudioNodeConnections,getNativeAudioNode,getNativeAudioParam,getNativeContext,isActiveAudioNode,isNativeOfflineAudioContext),createDetectCycles(audioParamAudioNodeStore,getAudioNodeConnections,getValueForKey),eventTargetConstructor,getNativeContext,isNativeAudioContext,isNativeAudioNode,isNativeAudioParam,isNativeOfflineAudioContext,nativeAudioWorkletNodeConstructor),analyserNodeConstructor=createAnalyserNodeConstructor(audioNodeConstructor,createAnalyserNodeRenderer,createIndexSizeError,createNativeAnalyserNode,getNativeContext,isNativeOfflineAudioContext),audioBufferStore=new WeakSet,nativeAudioBufferConstructor=createNativeAudioBufferConstructor(window$1),convertNumberToUnsignedLong=createConvertNumberToUnsignedLong(new Uint32Array(1)),wrapAudioBufferCopyChannelMethods=createWrapAudioBufferCopyChannelMethods(convertNumberToUnsignedLong,createIndexSizeError),wrapAudioBufferCopyChannelMethodsOutOfBounds=createWrapAudioBufferCopyChannelMethodsOutOfBounds(convertNumberToUnsignedLong),audioBufferConstructor=createAudioBufferConstructor(audioBufferStore,cacheTestResult,createNotSupportedError,nativeAudioBufferConstructor,nativeOfflineAudioContextConstructor,createTestAudioBufferConstructorSupport(nativeAudioBufferConstructor),wrapAudioBufferCopyChannelMethods,wrapAudioBufferCopyChannelMethodsOutOfBounds),addSilentConnection=createAddSilentConnection(createNativeGainNode),renderInputsOfAudioParam=createRenderInputsOfAudioParam(getAudioNodeRenderer,getAudioParamConnections,isPartOfACycle),connectAudioParam=createConnectAudioParam(renderInputsOfAudioParam),createNativeAudioBufferSourceNode=createNativeAudioBufferSourceNodeFactory(addSilentConnection,cacheTestResult,testAudioBufferSourceNodeStartMethodConsecutiveCallsSupport,testAudioBufferSourceNodeStartMethodOffsetClampingSupport,testAudioBufferSourceNodeStopMethodNullifiedBufferSupport,testAudioScheduledSourceNodeStartMethodNegativeParametersSupport,testAudioScheduledSourceNodeStopMethodConsecutiveCallsSupport,testAudioScheduledSourceNodeStopMethodNegativeParametersSupport,wrapAudioBufferSourceNodeStartMethodOffsetClamping,createWrapAudioBufferSourceNodeStopMethodNullifiedBuffer(overwriteAccessors),wrapAudioScheduledSourceNodeStopMethodConsecutiveCalls),renderAutomation=createRenderAutomation(createGetAudioParamRenderer(getAudioParamConnections),renderInputsOfAudioParam),createAudioBufferSourceNodeRenderer=createAudioBufferSourceNodeRendererFactory(connectAudioParam,createNativeAudioBufferSourceNode,getNativeAudioNode,renderAutomation,renderInputsOfAudioNode),createAudioParam=createAudioParamFactory(createAddAudioParamConnections(AUDIO_PARAM_CONNECTIONS_STORE),audioParamAudioNodeStore,AUDIO_PARAM_STORE,createAudioParamRenderer,createCancelAndHoldAutomationEvent,createCancelScheduledValuesAutomationEvent,createExponentialRampToValueAutomationEvent,createLinearRampToValueAutomationEvent,createSetTargetAutomationEvent,createSetValueAutomationEvent,createSetValueCurveAutomationEvent,nativeAudioContextConstructor,setValueAtTimeUntilPossible),audioBufferSourceNodeConstructor=createAudioBufferSourceNodeConstructor(audioNodeConstructor,createAudioBufferSourceNodeRenderer,createAudioParam,createInvalidStateError,createNativeAudioBufferSourceNode,getNativeContext,isNativeOfflineAudioContext,wrapEventListener),audioDestinationNodeConstructor=createAudioDestinationNodeConstructor(audioNodeConstructor,createAudioDestinationNodeRenderer,createIndexSizeError,createInvalidStateError,createNativeAudioDestinationNodeFactory(createNativeGainNode,overwriteAccessors),getNativeContext,isNativeOfflineAudioContext,renderInputsOfAudioNode),createBiquadFilterNodeRenderer=createBiquadFilterNodeRendererFactory(connectAudioParam,createNativeBiquadFilterNode,getNativeAudioNode,renderAutomation,renderInputsOfAudioNode),setAudioNodeTailTime=createSetAudioNodeTailTime(audioNodeTailTimeStore),biquadFilterNodeConstructor=createBiquadFilterNodeConstructor(audioNodeConstructor,createAudioParam,createBiquadFilterNodeRenderer,createInvalidAccessError,createNativeBiquadFilterNode,getNativeContext,isNativeOfflineAudioContext,setAudioNodeTailTime),monitorConnections=createMonitorConnections(insertElementInSet,isNativeAudioNode),wrapChannelMergerNode=createWrapChannelMergerNode(createInvalidStateError,monitorConnections),createNativeChannelMergerNode=createNativeChannelMergerNodeFactory(nativeAudioContextConstructor,wrapChannelMergerNode),createChannelMergerNodeRenderer=createChannelMergerNodeRendererFactory(createNativeChannelMergerNode,getNativeAudioNode,renderInputsOfAudioNode),channelMergerNodeConstructor=createChannelMergerNodeConstructor(audioNodeConstructor,createChannelMergerNodeRenderer,createNativeChannelMergerNode,getNativeContext,isNativeOfflineAudioContext),createChannelSplitterNodeRenderer=createChannelSplitterNodeRendererFactory(createNativeChannelSplitterNode,getNativeAudioNode,renderInputsOfAudioNode),channelSplitterNodeConstructor=createChannelSplitterNodeConstructor(audioNodeConstructor,createChannelSplitterNodeRenderer,createNativeChannelSplitterNode,getNativeContext,isNativeOfflineAudioContext,sanitizeChannelSplitterOptions),createNativeConstantSourceNodeFaker=createNativeConstantSourceNodeFakerFactory(addSilentConnection,createNativeAudioBufferSourceNode,createNativeGainNode,monitorConnections),createNativeConstantSourceNode=createNativeConstantSourceNodeFactory(addSilentConnection,cacheTestResult,createNativeConstantSourceNodeFaker,testAudioScheduledSourceNodeStartMethodNegativeParametersSupport,testAudioScheduledSourceNodeStopMethodNegativeParametersSupport),createConstantSourceNodeRenderer=createConstantSourceNodeRendererFactory(connectAudioParam,createNativeConstantSourceNode,getNativeAudioNode,renderAutomation,renderInputsOfAudioNode),constantSourceNodeConstructor=createConstantSourceNodeConstructor(audioNodeConstructor,createAudioParam,createConstantSourceNodeRenderer,createNativeConstantSourceNode,getNativeContext,isNativeOfflineAudioContext,wrapEventListener),createNativeConvolverNode=createNativeConvolverNodeFactory(createNotSupportedError,overwriteAccessors),createConvolverNodeRenderer=createConvolverNodeRendererFactory(createNativeConvolverNode,getNativeAudioNode,renderInputsOfAudioNode),convolverNodeConstructor=createConvolverNodeConstructor(audioNodeConstructor,createConvolverNodeRenderer,createNativeConvolverNode,getNativeContext,isNativeOfflineAudioContext,setAudioNodeTailTime),createDelayNodeRenderer=createDelayNodeRendererFactory(connectAudioParam,createNativeDelayNode,getNativeAudioNode,renderAutomation,renderInputsOfAudioNode),delayNodeConstructor=createDelayNodeConstructor(audioNodeConstructor,createAudioParam,createDelayNodeRenderer,createNativeDelayNode,getNativeContext,isNativeOfflineAudioContext,setAudioNodeTailTime),createNativeDynamicsCompressorNode=createNativeDynamicsCompressorNodeFactory(createNotSupportedError),createDynamicsCompressorNodeRenderer=createDynamicsCompressorNodeRendererFactory(connectAudioParam,createNativeDynamicsCompressorNode,getNativeAudioNode,renderAutomation,renderInputsOfAudioNode),dynamicsCompressorNodeConstructor=createDynamicsCompressorNodeConstructor(audioNodeConstructor,createAudioParam,createDynamicsCompressorNodeRenderer,createNativeDynamicsCompressorNode,createNotSupportedError,getNativeContext,isNativeOfflineAudioContext,setAudioNodeTailTime),createGainNodeRenderer=createGainNodeRendererFactory(connectAudioParam,createNativeGainNode,getNativeAudioNode,renderAutomation,renderInputsOfAudioNode),gainNodeConstructor=createGainNodeConstructor(audioNodeConstructor,createAudioParam,createGainNodeRenderer,createNativeGainNode,getNativeContext,isNativeOfflineAudioContext),createNativeIIRFilterNodeFaker=createNativeIIRFilterNodeFakerFactory(createInvalidAccessError,createInvalidStateError,createNativeScriptProcessorNode,createNotSupportedError),renderNativeOfflineAudioContext=createRenderNativeOfflineAudioContext(cacheTestResult,createNativeGainNode,createNativeScriptProcessorNode,createTestOfflineAudioContextCurrentTimeSupport(createNativeGainNode,nativeOfflineAudioContextConstructor)),createIIRFilterNodeRenderer=createIIRFilterNodeRendererFactory(createNativeAudioBufferSourceNode,getNativeAudioNode,nativeOfflineAudioContextConstructor,renderInputsOfAudioNode,renderNativeOfflineAudioContext),createNativeIIRFilterNode=createNativeIIRFilterNodeFactory(createNativeIIRFilterNodeFaker),iIRFilterNodeConstructor=createIIRFilterNodeConstructor(audioNodeConstructor,createNativeIIRFilterNode,createIIRFilterNodeRenderer,getNativeContext,isNativeOfflineAudioContext,setAudioNodeTailTime),createAudioListener=createAudioListenerFactory(createAudioParam,createNativeChannelMergerNode,createNativeConstantSourceNode,createNativeScriptProcessorNode,createNotSupportedError,getFirstSample,isNativeOfflineAudioContext,overwriteAccessors),unrenderedAudioWorkletNodeStore=new WeakMap,minimalBaseAudioContextConstructor=createMinimalBaseAudioContextConstructor(audioDestinationNodeConstructor,createAudioListener,eventTargetConstructor,isNativeOfflineAudioContext,unrenderedAudioWorkletNodeStore,wrapEventListener),createNativeOscillatorNode=createNativeOscillatorNodeFactory(addSilentConnection,cacheTestResult,testAudioScheduledSourceNodeStartMethodNegativeParametersSupport,testAudioScheduledSourceNodeStopMethodConsecutiveCallsSupport,testAudioScheduledSourceNodeStopMethodNegativeParametersSupport,wrapAudioScheduledSourceNodeStopMethodConsecutiveCalls),createOscillatorNodeRenderer=createOscillatorNodeRendererFactory(connectAudioParam,createNativeOscillatorNode,getNativeAudioNode,renderAutomation,renderInputsOfAudioNode),oscillatorNodeConstructor=createOscillatorNodeConstructor(audioNodeConstructor,createAudioParam,createNativeOscillatorNode,createOscillatorNodeRenderer,getNativeContext,isNativeOfflineAudioContext,wrapEventListener),createConnectedNativeAudioBufferSourceNode=createConnectedNativeAudioBufferSourceNodeFactory(createNativeAudioBufferSourceNode),createNativeWaveShaperNodeFaker=createNativeWaveShaperNodeFakerFactory(createConnectedNativeAudioBufferSourceNode,createInvalidStateError,createNativeGainNode,isDCCurve,monitorConnections),createNativeWaveShaperNode=createNativeWaveShaperNodeFactory(createConnectedNativeAudioBufferSourceNode,createInvalidStateError,createNativeWaveShaperNodeFaker,isDCCurve,monitorConnections,nativeAudioContextConstructor,overwriteAccessors),createNativePannerNodeFaker=createNativePannerNodeFakerFactory(connectNativeAudioNodeToNativeAudioNode,createInvalidStateError,createNativeChannelMergerNode,createNativeGainNode,createNativeScriptProcessorNode,createNativeWaveShaperNode,createNotSupportedError,disconnectNativeAudioNodeFromNativeAudioNode,getFirstSample,monitorConnections),createNativePannerNode=createNativePannerNodeFactory(createNativePannerNodeFaker),createPannerNodeRenderer=createPannerNodeRendererFactory(connectAudioParam,createNativeChannelMergerNode,createNativeConstantSourceNode,createNativeGainNode,createNativePannerNode,getNativeAudioNode,nativeOfflineAudioContextConstructor,renderAutomation,renderInputsOfAudioNode,renderNativeOfflineAudioContext),pannerNodeConstructor=createPannerNodeConstructor(audioNodeConstructor,createAudioParam,createNativePannerNode,createPannerNodeRenderer,getNativeContext,isNativeOfflineAudioContext,setAudioNodeTailTime),createNativePeriodicWave=createNativePeriodicWaveFactory(createIndexSizeError),periodicWaveConstructor=createPeriodicWaveConstructor(createNativePeriodicWave,getNativeContext,new WeakSet,sanitizePeriodicWaveOptions),nativeStereoPannerNodeFakerFactory=createNativeStereoPannerNodeFakerFactory(createNativeChannelMergerNode,createNativeChannelSplitterNode,createNativeGainNode,createNativeWaveShaperNode,createNotSupportedError,monitorConnections),createNativeStereoPannerNode=createNativeStereoPannerNodeFactory(nativeStereoPannerNodeFakerFactory,createNotSupportedError),createStereoPannerNodeRenderer=createStereoPannerNodeRendererFactory(connectAudioParam,createNativeStereoPannerNode,getNativeAudioNode,renderAutomation,renderInputsOfAudioNode),stereoPannerNodeConstructor=createStereoPannerNodeConstructor(audioNodeConstructor,createAudioParam,createNativeStereoPannerNode,createStereoPannerNodeRenderer,getNativeContext,isNativeOfflineAudioContext),createWaveShaperNodeRenderer=createWaveShaperNodeRendererFactory(createNativeWaveShaperNode,getNativeAudioNode,renderInputsOfAudioNode),waveShaperNodeConstructor=createWaveShaperNodeConstructor(audioNodeConstructor,createInvalidStateError,createNativeWaveShaperNode,createWaveShaperNodeRenderer,getNativeContext,isNativeOfflineAudioContext,setAudioNodeTailTime),isSecureContext=createIsSecureContext(window$1),exposeCurrentFrameAndCurrentTime=createExposeCurrentFrameAndCurrentTime(window$1),backupOfflineAudioContextStore=new WeakMap,getOrCreateBackupOfflineAudioContext=createGetOrCreateBackupOfflineAudioContext(backupOfflineAudioContextStore,nativeOfflineAudioContextConstructor),addAudioWorkletModule=isSecureContext?createAddAudioWorkletModule(cacheTestResult,createNotSupportedError,createEvaluateSource(window$1),exposeCurrentFrameAndCurrentTime,createFetchSource(createAbortError),getNativeContext,getOrCreateBackupOfflineAudioContext,isNativeOfflineAudioContext,nativeAudioWorkletNodeConstructor,new WeakMap,new WeakMap,createTestAudioWorkletProcessorPostMessageSupport(nativeAudioWorkletNodeConstructor,nativeOfflineAudioContextConstructor),window$1):void 0,isNativeContext=createIsNativeContext(isNativeAudioContext,isNativeOfflineAudioContext),decodeAudioData=createDecodeAudioData(audioBufferStore,cacheTestResult,createDataCloneError,createEncodingError,new WeakSet,getNativeContext,isNativeContext,testAudioBufferCopyChannelMethodsOutOfBoundsSupport,testPromiseSupport,wrapAudioBufferCopyChannelMethods,wrapAudioBufferCopyChannelMethodsOutOfBounds),baseAudioContextConstructor=createBaseAudioContextConstructor(addAudioWorkletModule,analyserNodeConstructor,audioBufferConstructor,audioBufferSourceNodeConstructor,biquadFilterNodeConstructor,channelMergerNodeConstructor,channelSplitterNodeConstructor,constantSourceNodeConstructor,convolverNodeConstructor,decodeAudioData,delayNodeConstructor,dynamicsCompressorNodeConstructor,gainNodeConstructor,iIRFilterNodeConstructor,minimalBaseAudioContextConstructor,oscillatorNodeConstructor,pannerNodeConstructor,periodicWaveConstructor,stereoPannerNodeConstructor,waveShaperNodeConstructor),mediaElementAudioSourceNodeConstructor=createMediaElementAudioSourceNodeConstructor(audioNodeConstructor,createNativeMediaElementAudioSourceNode,getNativeContext,isNativeOfflineAudioContext),mediaStreamAudioDestinationNodeConstructor=createMediaStreamAudioDestinationNodeConstructor(audioNodeConstructor,createNativeMediaStreamAudioDestinationNode,getNativeContext,isNativeOfflineAudioContext),mediaStreamAudioSourceNodeConstructor=createMediaStreamAudioSourceNodeConstructor(audioNodeConstructor,createNativeMediaStreamAudioSourceNode,getNativeContext,isNativeOfflineAudioContext),createNativeMediaStreamTrackAudioSourceNode=createNativeMediaStreamTrackAudioSourceNodeFactory(createInvalidStateError,isNativeOfflineAudioContext),mediaStreamTrackAudioSourceNodeConstructor=createMediaStreamTrackAudioSourceNodeConstructor(audioNodeConstructor,createNativeMediaStreamTrackAudioSourceNode,getNativeContext),audioContextConstructor=createAudioContextConstructor(baseAudioContextConstructor,createInvalidStateError,createNotSupportedError,createUnknownError,mediaElementAudioSourceNodeConstructor,mediaStreamAudioDestinationNodeConstructor,mediaStreamAudioSourceNodeConstructor,mediaStreamTrackAudioSourceNodeConstructor,nativeAudioContextConstructor),getUnrenderedAudioWorkletNodes=createGetUnrenderedAudioWorkletNodes(unrenderedAudioWorkletNodeStore),addUnrenderedAudioWorkletNode=createAddUnrenderedAudioWorkletNode(getUnrenderedAudioWorkletNodes),connectMultipleOutputs=createConnectMultipleOutputs(createIndexSizeError),deleteUnrenderedAudioWorkletNode=createDeleteUnrenderedAudioWorkletNode(getUnrenderedAudioWorkletNodes),disconnectMultipleOutputs=createDisconnectMultipleOutputs(createIndexSizeError),activeAudioWorkletNodeInputsStore=new WeakMap,getActiveAudioWorkletNodeInputs=createGetActiveAudioWorkletNodeInputs(activeAudioWorkletNodeInputsStore,getValueForKey),createNativeAudioWorkletNodeFaker=createNativeAudioWorkletNodeFakerFactory(connectMultipleOutputs,createIndexSizeError,createInvalidStateError,createNativeChannelMergerNode,createNativeChannelSplitterNode,createNativeConstantSourceNode,createNativeGainNode,createNativeScriptProcessorNode,createNotSupportedError,disconnectMultipleOutputs,exposeCurrentFrameAndCurrentTime,getActiveAudioWorkletNodeInputs,monitorConnections),createNativeAudioWorkletNode=createNativeAudioWorkletNodeFactory(createInvalidStateError,createNativeAudioWorkletNodeFaker,createNativeGainNode,createNotSupportedError,monitorConnections),createAudioWorkletNodeRenderer=createAudioWorkletNodeRendererFactory(connectAudioParam,connectMultipleOutputs,createNativeAudioBufferSourceNode,createNativeChannelMergerNode,createNativeChannelSplitterNode,createNativeConstantSourceNode,createNativeGainNode,deleteUnrenderedAudioWorkletNode,disconnectMultipleOutputs,exposeCurrentFrameAndCurrentTime,getNativeAudioNode,nativeAudioWorkletNodeConstructor,nativeOfflineAudioContextConstructor,renderAutomation,renderInputsOfAudioNode,renderNativeOfflineAudioContext),getBackupOfflineAudioContext=createGetBackupOfflineAudioContext(backupOfflineAudioContextStore),setActiveAudioWorkletNodeInputs=createSetActiveAudioWorkletNodeInputs(activeAudioWorkletNodeInputsStore),audioWorkletNodeConstructor=isSecureContext?createAudioWorkletNodeConstructor(addUnrenderedAudioWorkletNode,audioNodeConstructor,createAudioParam,createAudioWorkletNodeRenderer,createNativeAudioWorkletNode,getAudioNodeConnections,getBackupOfflineAudioContext,getNativeContext,isNativeOfflineAudioContext,nativeAudioWorkletNodeConstructor,sanitizeAudioWorkletNodeOptions,setActiveAudioWorkletNodeInputs,testAudioWorkletNodeOptionsClonability,wrapEventListener):void 0,createNativeOfflineAudioContext=createCreateNativeOfflineAudioContext(createNotSupportedError,nativeOfflineAudioContextConstructor),startRendering=createStartRendering(audioBufferStore,cacheTestResult,getAudioNodeRenderer,getUnrenderedAudioWorkletNodes,renderNativeOfflineAudioContext,testAudioBufferCopyChannelMethodsOutOfBoundsSupport,wrapAudioBufferCopyChannelMethods,wrapAudioBufferCopyChannelMethodsOutOfBounds),offlineAudioContextConstructor=createOfflineAudioContextConstructor(baseAudioContextConstructor,cacheTestResult,createInvalidStateError,createNativeOfflineAudioContext,startRendering),isAnyAudioContext=createIsAnyAudioContext(CONTEXT_STORE,isNativeAudioContext),isAnyAudioNode=createIsAnyAudioNode(AUDIO_NODE_STORE,isNativeAudioNode),isAnyAudioParam=createIsAnyAudioParam(AUDIO_PARAM_STORE,isNativeAudioParam),isAnyOfflineAudioContext=createIsAnyOfflineAudioContext(CONTEXT_STORE,isNativeOfflineAudioContext);function isUndef(tt){return typeof tt>"u"}function isDefined(tt){return!isUndef(tt)}function isFunction$2(tt){return typeof tt=="function"}function isNumber$4(tt){return typeof tt=="number"}function isObject$7(tt){return Object.prototype.toString.call(tt)==="[object Object]"&&tt.constructor===Object}function isBoolean$1(tt){return typeof tt=="boolean"}function isArray$e(tt){return Array.isArray(tt)}function isString$2(tt){return typeof tt=="string"}function isNote(tt){return isString$2(tt)&&/^([a-g]{1}(?:b|#|x|bb)?)(-?[0-9]+)/i.test(tt)}function assert(tt,et){if(!tt)throw new Error(et)}function assertRange(tt,et,nt=1/0){if(!(et<=tt&&tt<=nt))throw new RangeError(`Value must be within [${et}, ${nt}], got: ${tt}`)}function assertContextRunning(tt){!tt.isOffline&&tt.state!=="running"&&warn$2('The AudioContext is "suspended". Invoke Tone.start() from a user action to start the audio.')}let isInsideScheduledCallback=!1,printedScheduledWarning=!1;function enterScheduledCallback(tt){isInsideScheduledCallback=tt}function assertUsedScheduleTime(tt){isUndef(tt)&&isInsideScheduledCallback&&!printedScheduledWarning&&(printedScheduledWarning=!0,warn$2("Events scheduled inside of scheduled callbacks should use the passed in scheduling time. See https://github.com/Tonejs/Tone.js/wiki/Accurate-Timing"))}let defaultLogger=console;function log$1(...tt){defaultLogger.log(...tt)}function warn$2(...tt){defaultLogger.warn(...tt)}function createAudioContext(tt){return new audioContextConstructor(tt)}function createOfflineAudioContext(tt,et,nt){return new offlineAudioContextConstructor(tt,et,nt)}const theWindow=typeof self=="object"?self:null,hasAudioContext=theWindow&&(theWindow.hasOwnProperty("AudioContext")||theWindow.hasOwnProperty("webkitAudioContext"));function createAudioWorkletNode(tt,et,nt){return assert(isDefined(audioWorkletNodeConstructor),"This node only works in a secure context (https or localhost)"),new audioWorkletNodeConstructor(tt,et,nt)}class Ticker{constructor(et,nt,rt,it){this._callback=et,this._type=nt,this._minimumUpdateInterval=Math.max(128/(it||44100),.001),this.updateInterval=rt,this._createClock()}_createWorker(){const et=new Blob([` - // the initial timeout time - let timeoutTime = ${(this._updateInterval*1e3).toFixed(1)}; - // onmessage callback - self.onmessage = function(msg){ - timeoutTime = parseInt(msg.data); - }; - // the tick function which posts a message - // and schedules a new tick - function tick(){ - setTimeout(tick, timeoutTime); - self.postMessage('tick'); - } - // call tick initially - tick(); - `],{type:"text/javascript"}),nt=URL.createObjectURL(et),rt=new Worker(nt);rt.onmessage=this._callback.bind(this),this._worker=rt}_createTimeout(){this._timeout=setTimeout(()=>{this._createTimeout(),this._callback()},this._updateInterval*1e3)}_createClock(){if(this._type==="worker")try{this._createWorker()}catch{this._type="timeout",this._createClock()}else this._type==="timeout"&&this._createTimeout()}_disposeClock(){this._timeout&&clearTimeout(this._timeout),this._worker&&(this._worker.terminate(),this._worker.onmessage=null)}get updateInterval(){return this._updateInterval}set updateInterval(et){var nt;this._updateInterval=Math.max(et,this._minimumUpdateInterval),this._type==="worker"&&((nt=this._worker)===null||nt===void 0||nt.postMessage(this._updateInterval*1e3))}get type(){return this._type}set type(et){this._disposeClock(),this._type=et,this._createClock()}dispose(){this._disposeClock()}}function isAudioParam(tt){return isAnyAudioParam(tt)}function isAudioNode(tt){return isAnyAudioNode(tt)}function isOfflineAudioContext(tt){return isAnyOfflineAudioContext(tt)}function isAudioContext(tt){return isAnyAudioContext(tt)}function isAudioBuffer(tt){return tt instanceof audioBufferConstructor}function noCopy(tt,et){return tt==="value"||isAudioParam(et)||isAudioNode(et)||isAudioBuffer(et)}function deepMerge(tt,...et){if(!et.length)return tt;const nt=et.shift();if(isObject$7(tt)&&isObject$7(nt))for(const rt in nt)noCopy(rt,nt[rt])?tt[rt]=nt[rt]:isObject$7(nt[rt])?(tt[rt]||Object.assign(tt,{[rt]:{}}),deepMerge(tt[rt],nt[rt])):Object.assign(tt,{[rt]:nt[rt]});return deepMerge(tt,...et)}function deepEquals(tt,et){return tt.length===et.length&&tt.every((nt,rt)=>et[rt]===nt)}function optionsFromArguments(tt,et,nt=[],rt){const it={},ot=Array.from(et);if(isObject$7(ot[0])&&rt&&!Reflect.has(ot[0],rt)&&(Object.keys(ot[0]).some(st=>Reflect.has(tt,st))||(deepMerge(it,{[rt]:ot[0]}),nt.splice(nt.indexOf(rt),1),ot.shift())),ot.length===1&&isObject$7(ot[0]))deepMerge(it,ot[0]);else for(let at=0;at{Reflect.has(tt,nt)&&delete tt[nt]}),tt}/** - * Tone.js - * @author Yotam Mann - * @license http://opensource.org/licenses/MIT MIT License - * @copyright 2014-2019 Yotam Mann - */class Tone{constructor(){this.debug=!1,this._wasDisposed=!1}static getDefaults(){return{}}log(...et){(this.debug||theWindow&&this.toString()===theWindow.TONE_DEBUG_CLASS)&&log$1(this,...et)}dispose(){return this._wasDisposed=!0,this}get disposed(){return this._wasDisposed}toString(){return this.name}}Tone.version=version$1;const EPSILON=1e-6;function GT(tt,et){return tt>et+EPSILON}function GTE(tt,et){return GT(tt,et)||EQ(tt,et)}function LT(tt,et){return tt+EPSILONthis.memory){const nt=this.length-this.memory;this._timeline.splice(0,nt)}return this}remove(et){const nt=this._timeline.indexOf(et);return nt!==-1&&this._timeline.splice(nt,1),this}get(et,nt="time"){const rt=this._search(et,nt);return rt!==-1?this._timeline[rt]:null}peek(){return this._timeline[0]}shift(){return this._timeline.shift()}getAfter(et,nt="time"){const rt=this._search(et,nt);return rt+10&&this._timeline[nt-1].time=0?this._timeline[rt-1]:null}cancel(et){if(this._timeline.length>1){let nt=this._search(et);if(nt>=0)if(EQ(this._timeline[nt].time,et)){for(let rt=nt;rt>=0&&EQ(this._timeline[rt].time,et);rt--)nt=rt;this._timeline=this._timeline.slice(0,nt)}else this._timeline=this._timeline.slice(0,nt+1);else this._timeline=[]}else this._timeline.length===1&>E(this._timeline[0].time,et)&&(this._timeline=[]);return this}cancelBefore(et){const nt=this._search(et);return nt>=0&&(this._timeline=this._timeline.slice(nt+1)),this}previousEvent(et){const nt=this._timeline.indexOf(et);return nt>0?this._timeline[nt-1]:null}_search(et,nt="time"){if(this._timeline.length===0)return-1;let rt=0;const it=this._timeline.length;let ot=it;if(it>0&&this._timeline[it-1][nt]<=et)return it-1;for(;rt=0&&this._timeline[rt].time>=et;)rt--;return this._iterate(nt,rt+1),this}forEachAtTime(et,nt){const rt=this._search(et);if(rt!==-1&&EQ(this._timeline[rt].time,et)){let it=rt;for(let ot=rt;ot>=0&&EQ(this._timeline[ot].time,et);ot--)it=ot;this._iterate(ot=>{nt(ot)},it,rt)}return this}dispose(){return super.dispose(),this._timeline=[],this}}const notifyNewContext=[];function onContextInit(tt){notifyNewContext.push(tt)}function initializeContext(tt){notifyNewContext.forEach(et=>et(tt))}const notifyCloseContext=[];function onContextClose(tt){notifyCloseContext.push(tt)}function closeContext(tt){notifyCloseContext.forEach(et=>et(tt))}let Emitter$1=class _w extends Tone{constructor(){super(...arguments),this.name="Emitter"}on(et,nt){return et.split(/\W+/).forEach(it=>{isUndef(this._events)&&(this._events={}),this._events.hasOwnProperty(it)||(this._events[it]=[]),this._events[it].push(nt)}),this}once(et,nt){const rt=(...it)=>{nt(...it),this.off(et,rt)};return this.on(et,rt),this}off(et,nt){return et.split(/\W+/).forEach(it=>{if(isUndef(this._events)&&(this._events={}),this._events.hasOwnProperty(it))if(isUndef(nt))this._events[it]=[];else{const ot=this._events[it];for(let at=ot.length-1;at>=0;at--)ot[at]===nt&&ot.splice(at,1)}}),this}emit(et,...nt){if(this._events&&this._events.hasOwnProperty(et)){const rt=this._events[et].slice(0);for(let it=0,ot=rt.length;it{const rt=Object.getOwnPropertyDescriptor(_w.prototype,nt);Object.defineProperty(et.prototype,nt,rt)})}dispose(){return super.dispose(),this._events=void 0,this}};class BaseContext extends Emitter$1{constructor(){super(...arguments),this.isOffline=!1}toJSON(){return{}}}class Context extends BaseContext{constructor(){var et,nt;super(),this.name="Context",this._constants=new Map,this._timeouts=new Timeline,this._timeoutIds=0,this._initialized=!1,this._closeStarted=!1,this.isOffline=!1,this._workletPromise=null;const rt=optionsFromArguments(Context.getDefaults(),arguments,["context"]);rt.context?(this._context=rt.context,this._latencyHint=((et=arguments[0])===null||et===void 0?void 0:et.latencyHint)||""):(this._context=createAudioContext({latencyHint:rt.latencyHint}),this._latencyHint=rt.latencyHint),this._ticker=new Ticker(this.emit.bind(this,"tick"),rt.clockSource,rt.updateInterval,this._context.sampleRate),this.on("tick",this._timeoutLoop.bind(this)),this._context.onstatechange=()=>{this.emit("statechange",this.state)},this[!((nt=arguments[0])===null||nt===void 0)&&nt.hasOwnProperty("updateInterval")?"_lookAhead":"lookAhead"]=rt.lookAhead}static getDefaults(){return{clockSource:"worker",latencyHint:"interactive",lookAhead:.1,updateInterval:.05}}initialize(){return this._initialized||(initializeContext(this),this._initialized=!0),this}createAnalyser(){return this._context.createAnalyser()}createOscillator(){return this._context.createOscillator()}createBufferSource(){return this._context.createBufferSource()}createBiquadFilter(){return this._context.createBiquadFilter()}createBuffer(et,nt,rt){return this._context.createBuffer(et,nt,rt)}createChannelMerger(et){return this._context.createChannelMerger(et)}createChannelSplitter(et){return this._context.createChannelSplitter(et)}createConstantSource(){return this._context.createConstantSource()}createConvolver(){return this._context.createConvolver()}createDelay(et){return this._context.createDelay(et)}createDynamicsCompressor(){return this._context.createDynamicsCompressor()}createGain(){return this._context.createGain()}createIIRFilter(et,nt){return this._context.createIIRFilter(et,nt)}createPanner(){return this._context.createPanner()}createPeriodicWave(et,nt,rt){return this._context.createPeriodicWave(et,nt,rt)}createStereoPanner(){return this._context.createStereoPanner()}createWaveShaper(){return this._context.createWaveShaper()}createMediaStreamSource(et){return assert(isAudioContext(this._context),"Not available if OfflineAudioContext"),this._context.createMediaStreamSource(et)}createMediaElementSource(et){return assert(isAudioContext(this._context),"Not available if OfflineAudioContext"),this._context.createMediaElementSource(et)}createMediaStreamDestination(){return assert(isAudioContext(this._context),"Not available if OfflineAudioContext"),this._context.createMediaStreamDestination()}decodeAudioData(et){return this._context.decodeAudioData(et)}get currentTime(){return this._context.currentTime}get state(){return this._context.state}get sampleRate(){return this._context.sampleRate}get listener(){return this.initialize(),this._listener}set listener(et){assert(!this._initialized,"The listener cannot be set after initialization."),this._listener=et}get transport(){return this.initialize(),this._transport}set transport(et){assert(!this._initialized,"The transport cannot be set after initialization."),this._transport=et}get draw(){return this.initialize(),this._draw}set draw(et){assert(!this._initialized,"Draw cannot be set after initialization."),this._draw=et}get destination(){return this.initialize(),this._destination}set destination(et){assert(!this._initialized,"The destination cannot be set after initialization."),this._destination=et}createAudioWorkletNode(et,nt){return createAudioWorkletNode(this.rawContext,et,nt)}addAudioWorkletModule(et){return __awaiter(this,void 0,void 0,function*(){assert(isDefined(this.rawContext.audioWorklet),"AudioWorkletNode is only available in a secure context (https or localhost)"),this._workletPromise||(this._workletPromise=this.rawContext.audioWorklet.addModule(et)),yield this._workletPromise})}workletsAreReady(){return __awaiter(this,void 0,void 0,function*(){(yield this._workletPromise)?this._workletPromise:Promise.resolve()})}get updateInterval(){return this._ticker.updateInterval}set updateInterval(et){this._ticker.updateInterval=et}get clockSource(){return this._ticker.type}set clockSource(et){this._ticker.type=et}get lookAhead(){return this._lookAhead}set lookAhead(et){this._lookAhead=et,this.updateInterval=et?et/2:.01}get latencyHint(){return this._latencyHint}get rawContext(){return this._context}now(){return this._context.currentTime+this._lookAhead}immediate(){return this._context.currentTime}resume(){return isAudioContext(this._context)?this._context.resume():Promise.resolve()}close(){return __awaiter(this,void 0,void 0,function*(){isAudioContext(this._context)&&this.state!=="closed"&&!this._closeStarted&&(this._closeStarted=!0,yield this._context.close()),this._initialized&&closeContext(this)})}getConstant(et){if(this._constants.has(et))return this._constants.get(et);{const nt=this._context.createBuffer(1,128,this._context.sampleRate),rt=nt.getChannelData(0);for(let ot=0;otthis._constants[et].disconnect()),this.close(),this}_timeoutLoop(){const et=this.now();let nt=this._timeouts.peek();for(;this._timeouts.length&&nt&&nt.time<=et;)nt.callback(),this._timeouts.shift(),nt=this._timeouts.peek()}setTimeout(et,nt){this._timeoutIds++;const rt=this.now();return this._timeouts.add({callback:et,id:this._timeoutIds,time:rt+nt}),this._timeoutIds}clearTimeout(et){return this._timeouts.forEach(nt=>{nt.id===et&&this._timeouts.remove(nt)}),this}clearInterval(et){return this.clearTimeout(et)}setInterval(et,nt){const rt=++this._timeoutIds,it=()=>{const ot=this.now();this._timeouts.add({callback:()=>{et(),it()},id:rt,time:ot+nt})};return it(),rt}}class DummyContext extends BaseContext{constructor(){super(...arguments),this.lookAhead=0,this.latencyHint=0,this.isOffline=!1}createAnalyser(){return{}}createOscillator(){return{}}createBufferSource(){return{}}createBiquadFilter(){return{}}createBuffer(et,nt,rt){return{}}createChannelMerger(et){return{}}createChannelSplitter(et){return{}}createConstantSource(){return{}}createConvolver(){return{}}createDelay(et){return{}}createDynamicsCompressor(){return{}}createGain(){return{}}createIIRFilter(et,nt){return{}}createPanner(){return{}}createPeriodicWave(et,nt,rt){return{}}createStereoPanner(){return{}}createWaveShaper(){return{}}createMediaStreamSource(et){return{}}createMediaElementSource(et){return{}}createMediaStreamDestination(){return{}}decodeAudioData(et){return Promise.resolve({})}createAudioWorkletNode(et,nt){return{}}get rawContext(){return{}}addAudioWorkletModule(et){return __awaiter(this,void 0,void 0,function*(){return Promise.resolve()})}resume(){return Promise.resolve()}setTimeout(et,nt){return 0}clearTimeout(et){return this}setInterval(et,nt){return 0}clearInterval(et){return this}getConstant(et){return{}}get currentTime(){return 0}get state(){return{}}get sampleRate(){return 0}get listener(){return{}}get transport(){return{}}get draw(){return{}}set draw(et){}get destination(){return{}}set destination(et){}now(){return 0}immediate(){return 0}}function readOnly(tt,et){isArray$e(et)?et.forEach(nt=>readOnly(tt,nt)):Object.defineProperty(tt,et,{enumerable:!0,writable:!1})}function writable(tt,et){isArray$e(et)?et.forEach(nt=>writable(tt,nt)):Object.defineProperty(tt,et,{writable:!0})}const noOp=()=>{};class ToneAudioBuffer extends Tone{constructor(){super(),this.name="ToneAudioBuffer",this.onload=noOp;const et=optionsFromArguments(ToneAudioBuffer.getDefaults(),arguments,["url","onload","onerror"]);this.reverse=et.reverse,this.onload=et.onload,isString$2(et.url)?this.load(et.url).catch(et.onerror):et.url&&this.set(et.url)}static getDefaults(){return{onerror:noOp,onload:noOp,reverse:!1}}get sampleRate(){return this._buffer?this._buffer.sampleRate:getContext().sampleRate}set(et){return et instanceof ToneAudioBuffer?et.loaded?this._buffer=et.get():et.onload=()=>{this.set(et),this.onload(this)}:this._buffer=et,this._reversed&&this._reverse(),this}get(){return this._buffer}load(et){return __awaiter(this,void 0,void 0,function*(){const nt=ToneAudioBuffer.load(et).then(rt=>{this.set(rt),this.onload(this)});ToneAudioBuffer.downloads.push(nt);try{yield nt}finally{const rt=ToneAudioBuffer.downloads.indexOf(nt);ToneAudioBuffer.downloads.splice(rt,1)}return this})}dispose(){return super.dispose(),this._buffer=void 0,this}fromArray(et){const nt=isArray$e(et)&&et[0].length>0,rt=nt?et.length:1,it=nt?et[0].length:et.length,ot=getContext(),at=ot.createBuffer(rt,it,ot.sampleRate),st=!nt&&rt===1?[et]:et;for(let lt=0;ltit/rt),this.fromArray(nt)}return this}toArray(et){if(isNumber$4(et))return this.getChannelData(et);if(this.numberOfChannels===1)return this.toArray(0);{const nt=[];for(let rt=0;rt0}get duration(){return this._buffer?this._buffer.duration:0}get length(){return this._buffer?this._buffer.length:0}get numberOfChannels(){return this._buffer?this._buffer.numberOfChannels:0}get reverse(){return this._reversed}set reverse(et){this._reversed!==et&&(this._reversed=et,this._reverse())}static fromArray(et){return new ToneAudioBuffer().fromArray(et)}static fromUrl(et){return __awaiter(this,void 0,void 0,function*(){return yield new ToneAudioBuffer().load(et)})}static load(et){return __awaiter(this,void 0,void 0,function*(){const nt=et.match(/\[([^\]\[]+\|.+)\]$/);if(nt){const lt=nt[1].split("|");let ct=lt[0];for(const ut of lt)if(ToneAudioBuffer.supportsType(ut)){ct=ut;break}et=et.replace(nt[0],ct)}const rt=ToneAudioBuffer.baseUrl===""||ToneAudioBuffer.baseUrl.endsWith("/")?ToneAudioBuffer.baseUrl:ToneAudioBuffer.baseUrl+"/",it=document.createElement("a");it.href=rt+et,it.pathname=(it.pathname+it.hash).split("/").map(encodeURIComponent).join("/");const ot=yield fetch(it.href);if(!ot.ok)throw new Error(`could not load url: ${et}`);const at=yield ot.arrayBuffer();return yield getContext().decodeAudioData(at)})}static supportsType(et){const nt=et.split("."),rt=nt[nt.length-1];return document.createElement("audio").canPlayType("audio/"+rt)!==""}static loaded(){return __awaiter(this,void 0,void 0,function*(){for(yield Promise.resolve();ToneAudioBuffer.downloads.length;)yield ToneAudioBuffer.downloads[0]})}}ToneAudioBuffer.baseUrl="";ToneAudioBuffer.downloads=[];class OfflineContext extends Context{constructor(){super({clockSource:"offline",context:isOfflineAudioContext(arguments[0])?arguments[0]:createOfflineAudioContext(arguments[0],arguments[1]*arguments[2],arguments[2]),lookAhead:0,updateInterval:isOfflineAudioContext(arguments[0])?128/arguments[0].sampleRate:128/arguments[2]}),this.name="OfflineContext",this._currentTime=0,this.isOffline=!0,this._duration=isOfflineAudioContext(arguments[0])?arguments[0].length/arguments[0].sampleRate:arguments[1]}now(){return this._currentTime}get currentTime(){return this._currentTime}_renderClock(et){return __awaiter(this,void 0,void 0,function*(){let nt=0;for(;this._duration-this._currentTime>=0;){this.emit("tick"),this._currentTime+=128/this.sampleRate,nt++;const rt=Math.floor(this.sampleRate/128);et&&nt%rt===0&&(yield new Promise(it=>setTimeout(it,1)))}})}render(et=!0){return __awaiter(this,void 0,void 0,function*(){yield this.workletsAreReady(),yield this._renderClock(et);const nt=yield this._context.startRendering();return new ToneAudioBuffer(nt)})}close(){return Promise.resolve()}}const dummyContext=new DummyContext;let globalContext=dummyContext;function getContext(){return globalContext===dummyContext&&hasAudioContext&&setContext(new Context),globalContext}function setContext(tt,et=!1){et&&globalContext.dispose(),isAudioContext(tt)?globalContext=new Context(tt):isOfflineAudioContext(tt)?globalContext=new OfflineContext(tt):globalContext=tt}function start$1(){return globalContext.resume()}if(theWindow&&!theWindow.TONE_SILENCE_LOGGING){const et=` * Tone.js v${version$1} * `;console.log(`%c${et}`,"background: #000; color: #fff")}function dbToGain(tt){return Math.pow(10,tt/20)}function gainToDb(tt){return 20*(Math.log(tt)/Math.LN10)}function intervalToFrequencyRatio(tt){return Math.pow(2,tt/12)}let A4=440;function getA4(){return A4}function setA4(tt){A4=tt}function ftom(tt){return Math.round(ftomf(tt))}function ftomf(tt){return 69+12*Math.log2(tt/A4)}function mtof(tt){return A4*Math.pow(2,(tt-69)/12)}class TimeBaseClass extends Tone{constructor(et,nt,rt){super(),this.defaultUnits="s",this._val=nt,this._units=rt,this.context=et,this._expressions=this._getExpressions()}_getExpressions(){return{hz:{method:et=>this._frequencyToUnits(parseFloat(et)),regexp:/^(\d+(?:\.\d+)?)hz$/i},i:{method:et=>this._ticksToUnits(parseInt(et,10)),regexp:/^(\d+)i$/i},m:{method:et=>this._beatsToUnits(parseInt(et,10)*this._getTimeSignature()),regexp:/^(\d+)m$/i},n:{method:(et,nt)=>{const rt=parseInt(et,10),it=nt==="."?1.5:1;return rt===1?this._beatsToUnits(this._getTimeSignature())*it:this._beatsToUnits(4/rt)*it},regexp:/^(\d+)n(\.?)$/i},number:{method:et=>this._expressions[this.defaultUnits].method.call(this,et),regexp:/^(\d+(?:\.\d+)?)$/},s:{method:et=>this._secondsToUnits(parseFloat(et)),regexp:/^(\d+(?:\.\d+)?)s$/},samples:{method:et=>parseInt(et,10)/this.context.sampleRate,regexp:/^(\d+)samples$/},t:{method:et=>{const nt=parseInt(et,10);return this._beatsToUnits(8/(Math.floor(nt)*3))},regexp:/^(\d+)t$/i},tr:{method:(et,nt,rt)=>{let it=0;return et&&et!=="0"&&(it+=this._beatsToUnits(this._getTimeSignature()*parseFloat(et))),nt&&nt!=="0"&&(it+=this._beatsToUnits(parseFloat(nt))),rt&&rt!=="0"&&(it+=this._beatsToUnits(parseFloat(rt)/4)),it},regexp:/^(\d+(?:\.\d+)?):(\d+(?:\.\d+)?):?(\d+(?:\.\d+)?)?$/}}}valueOf(){if(this._val instanceof TimeBaseClass&&this.fromType(this._val),isUndef(this._val))return this._noArg();if(isString$2(this._val)&&isUndef(this._units)){for(const et in this._expressions)if(this._expressions[et].regexp.test(this._val.trim())){this._units=et;break}}else if(isObject$7(this._val)){let et=0;for(const nt in this._val)if(isDefined(this._val[nt])){const rt=this._val[nt],it=new this.constructor(this.context,nt).valueOf()*rt;et+=it}return et}if(isDefined(this._units)){const et=this._expressions[this._units],nt=this._val.toString().trim().match(et.regexp);return nt?et.method.apply(this,nt.slice(1)):et.method.call(this,this._val)}else return isString$2(this._val)?parseFloat(this._val):this._val}_frequencyToUnits(et){return 1/et}_beatsToUnits(et){return 60/this._getBpm()*et}_secondsToUnits(et){return et}_ticksToUnits(et){return et*this._beatsToUnits(1)/this._getPPQ()}_noArg(){return this._now()}_getBpm(){return this.context.transport.bpm.value}_getTimeSignature(){return this.context.transport.timeSignature}_getPPQ(){return this.context.transport.PPQ}fromType(et){switch(this._units=void 0,this.defaultUnits){case"s":this._val=et.toSeconds();break;case"i":this._val=et.toTicks();break;case"hz":this._val=et.toFrequency();break;case"midi":this._val=et.toMidi();break}return this}toFrequency(){return 1/this.toSeconds()}toSamples(){return this.toSeconds()*this.context.sampleRate}toMilliseconds(){return this.toSeconds()*1e3}}class TimeClass extends TimeBaseClass{constructor(){super(...arguments),this.name="TimeClass"}_getExpressions(){return Object.assign(super._getExpressions(),{now:{method:et=>this._now()+new this.constructor(this.context,et).valueOf(),regexp:/^\+(.+)/},quantize:{method:et=>{const nt=new TimeClass(this.context,et).valueOf();return this._secondsToUnits(this.context.transport.nextSubdivision(nt))},regexp:/^@(.+)/}})}quantize(et,nt=1){const rt=new this.constructor(this.context,et).valueOf(),it=this.valueOf(),st=Math.round(it/rt)*rt-it;return it+st*nt}toNotation(){const et=this.toSeconds(),nt=["1m"];for(let ot=1;ot<9;ot++){const at=Math.pow(2,ot);nt.push(at+"n."),nt.push(at+"n"),nt.push(at+"t")}nt.push("0");let rt=nt[0],it=new TimeClass(this.context,nt[0]).toSeconds();return nt.forEach(ot=>{const at=new TimeClass(this.context,ot).toSeconds();Math.abs(at-et)3&&(it=parseFloat(parseFloat(ot).toFixed(3))),[rt,nt,it].join(":")}toTicks(){const et=this._beatsToUnits(1);return this.valueOf()/et*this._getPPQ()}toSeconds(){return this.valueOf()}toMidi(){return ftom(this.toFrequency())}_now(){return this.context.now()}}class FrequencyClass extends TimeClass{constructor(){super(...arguments),this.name="Frequency",this.defaultUnits="hz"}static get A4(){return getA4()}static set A4(et){setA4(et)}_getExpressions(){return Object.assign({},super._getExpressions(),{midi:{regexp:/^(\d+(?:\.\d+)?midi)/,method(et){return this.defaultUnits==="midi"?et:FrequencyClass.mtof(et)}},note:{regexp:/^([a-g]{1}(?:b|#|##|x|bb|###|#x|x#|bbb)?)(-?[0-9]+)/i,method(et,nt){const it=noteToScaleIndex[et.toLowerCase()]+(parseInt(nt,10)+1)*12;return this.defaultUnits==="midi"?it:FrequencyClass.mtof(it)}},tr:{regexp:/^(\d+(?:\.\d+)?):(\d+(?:\.\d+)?):?(\d+(?:\.\d+)?)?/,method(et,nt,rt){let it=1;return et&&et!=="0"&&(it*=this._beatsToUnits(this._getTimeSignature()*parseFloat(et))),nt&&nt!=="0"&&(it*=this._beatsToUnits(parseFloat(nt))),rt&&rt!=="0"&&(it*=this._beatsToUnits(parseFloat(rt)/4)),it}}})}transpose(et){return new FrequencyClass(this.context,this.valueOf()*intervalToFrequencyRatio(et))}harmonize(et){return et.map(nt=>this.transpose(nt))}toMidi(){return ftom(this.valueOf())}toNote(){const et=this.toFrequency(),nt=Math.log2(et/FrequencyClass.A4);let rt=Math.round(12*nt)+57;const it=Math.floor(rt/12);return it<0&&(rt+=-12*it),scaleIndexToNote[rt%12]+it.toString()}toSeconds(){return 1/super.toSeconds()}toTicks(){const et=this._beatsToUnits(1),nt=this.valueOf()/et;return Math.floor(nt*this._getPPQ())}_noArg(){return 0}_frequencyToUnits(et){return et}_ticksToUnits(et){return 1/(et*60/(this._getBpm()*this._getPPQ()))}_beatsToUnits(et){return 1/super._beatsToUnits(et)}_secondsToUnits(et){return 1/et}static mtof(et){return mtof(et)}static ftom(et){return ftom(et)}}const noteToScaleIndex={cbbb:-3,cbb:-2,cb:-1,c:0,"c#":1,cx:2,"c##":2,"c###":3,"cx#":3,"c#x":3,dbbb:-1,dbb:0,db:1,d:2,"d#":3,dx:4,"d##":4,"d###":5,"dx#":5,"d#x":5,ebbb:1,ebb:2,eb:3,e:4,"e#":5,ex:6,"e##":6,"e###":7,"ex#":7,"e#x":7,fbbb:2,fbb:3,fb:4,f:5,"f#":6,fx:7,"f##":7,"f###":8,"fx#":8,"f#x":8,gbbb:4,gbb:5,gb:6,g:7,"g#":8,gx:9,"g##":9,"g###":10,"gx#":10,"g#x":10,abbb:6,abb:7,ab:8,a:9,"a#":10,ax:11,"a##":11,"a###":12,"ax#":12,"a#x":12,bbbb:8,bbb:9,bb:10,b:11,"b#":12,bx:13,"b##":13,"b###":14,"bx#":14,"b#x":14},scaleIndexToNote=["C","C#","D","D#","E","F","F#","G","G#","A","A#","B"];class TransportTimeClass extends TimeClass{constructor(){super(...arguments),this.name="TransportTime"}_now(){return this.context.transport.seconds}}class ToneWithContext extends Tone{constructor(){super();const et=optionsFromArguments(ToneWithContext.getDefaults(),arguments,["context"]);this.defaultContext?this.context=this.defaultContext:this.context=et.context}static getDefaults(){return{context:getContext()}}now(){return this.context.currentTime+this.context.lookAhead}immediate(){return this.context.currentTime}get sampleTime(){return 1/this.context.sampleRate}get blockTime(){return 128/this.context.sampleRate}toSeconds(et){return assertUsedScheduleTime(et),new TimeClass(this.context,et).toSeconds()}toFrequency(et){return new FrequencyClass(this.context,et).toFrequency()}toTicks(et){return new TransportTimeClass(this.context,et).toTicks()}_getPartialProperties(et){const nt=this.get();return Object.keys(nt).forEach(rt=>{isUndef(et[rt])&&delete nt[rt]}),nt}get(){const et=getDefaultsFromInstance(this);return Object.keys(et).forEach(nt=>{if(Reflect.has(this,nt)){const rt=this[nt];isDefined(rt)&&isDefined(rt.value)&&isDefined(rt.setValueAtTime)?et[nt]=rt.value:rt instanceof ToneWithContext?et[nt]=rt._getPartialProperties(et[nt]):isArray$e(rt)||isNumber$4(rt)||isString$2(rt)||isBoolean$1(rt)?et[nt]=rt:delete et[nt]}}),et}set(et){return Object.keys(et).forEach(nt=>{Reflect.has(this,nt)&&isDefined(this[nt])&&(this[nt]&&isDefined(this[nt].value)&&isDefined(this[nt].setValueAtTime)?this[nt].value!==et[nt]&&(this[nt].value=et[nt]):this[nt]instanceof ToneWithContext?this[nt].set(et[nt]):this[nt]=et[nt])}),this}}class StateTimeline extends Timeline{constructor(et="stopped"){super(),this.name="StateTimeline",this._initial=et,this.setStateAtTime(this._initial,0)}getValueAtTime(et){const nt=this.get(et);return nt!==null?nt.state:this._initial}setStateAtTime(et,nt,rt){return assertRange(nt,0),this.add(Object.assign({},rt,{state:et,time:nt})),this}getLastState(et,nt){const rt=this._search(nt);for(let it=rt;it>=0;it--){const ot=this._timeline[it];if(ot.state===et)return ot}}getNextState(et,nt){const rt=this._search(nt);if(rt!==-1)for(let it=rt;it0,"timeConstant must be a number greater than 0");const ot=this.toSeconds(nt);return this._assertRange(it),assert(isFinite(it)&&isFinite(ot),`Invalid argument(s) to setTargetAtTime: ${JSON.stringify(et)}, ${JSON.stringify(nt)}`),this._events.add({constant:rt,time:ot,type:"setTargetAtTime",value:it}),this.log(this.units,"setTargetAtTime",et,ot,rt),this._param.setTargetAtTime(it,ot,rt),this}setValueCurveAtTime(et,nt,rt,it=1){rt=this.toSeconds(rt),nt=this.toSeconds(nt);const ot=this._fromType(et[0])*it;this.setValueAtTime(this._toType(ot),nt);const at=rt/(et.length-1);for(let st=1;st{it.type==="cancelScheduledValues"?et.cancelScheduledValues(it.time):it.type==="setTargetAtTime"?et.setTargetAtTime(it.value,it.time,it.constant):et[it.type](it.value,it.time)}),this}setParam(et){assert(this._swappable,"The Param must be assigned as 'swappable' in the constructor");const nt=this.input;return nt.disconnect(this._param),this.apply(et),this._param=et,nt.connect(this._param),this}dispose(){return super.dispose(),this._events.dispose(),this}get defaultValue(){return this._toType(this._param.defaultValue)}_exponentialApproach(et,nt,rt,it,ot){return rt+(nt-rt)*Math.exp(-(ot-et)/it)}_linearInterpolate(et,nt,rt,it,ot){return nt+(it-nt)*((ot-et)/(rt-et))}_exponentialInterpolate(et,nt,rt,it,ot){return nt*Math.pow(it/nt,(ot-et)/(rt-et))}}class ToneAudioNode extends ToneWithContext{constructor(){super(...arguments),this._internalChannels=[]}get numberOfInputs(){return isDefined(this.input)?isAudioParam(this.input)||this.input instanceof Param?1:this.input.numberOfInputs:0}get numberOfOutputs(){return isDefined(this.output)?this.output.numberOfOutputs:0}_isAudioNode(et){return isDefined(et)&&(et instanceof ToneAudioNode||isAudioNode(et))}_getInternalNodes(){const et=this._internalChannels.slice(0);return this._isAudioNode(this.input)&&et.push(this.input),this._isAudioNode(this.output)&&this.input!==this.output&&et.push(this.output),et}_setChannelProperties(et){this._getInternalNodes().forEach(rt=>{rt.channelCount=et.channelCount,rt.channelCountMode=et.channelCountMode,rt.channelInterpretation=et.channelInterpretation})}_getChannelProperties(){const et=this._getInternalNodes();assert(et.length>0,"ToneAudioNode does not have any internal nodes");const nt=et[0];return{channelCount:nt.channelCount,channelCountMode:nt.channelCountMode,channelInterpretation:nt.channelInterpretation}}get channelCount(){return this._getChannelProperties().channelCount}set channelCount(et){const nt=this._getChannelProperties();this._setChannelProperties(Object.assign(nt,{channelCount:et}))}get channelCountMode(){return this._getChannelProperties().channelCountMode}set channelCountMode(et){const nt=this._getChannelProperties();this._setChannelProperties(Object.assign(nt,{channelCountMode:et}))}get channelInterpretation(){return this._getChannelProperties().channelInterpretation}set channelInterpretation(et){const nt=this._getChannelProperties();this._setChannelProperties(Object.assign(nt,{channelInterpretation:et}))}connect(et,nt=0,rt=0){return connect(this,et,nt,rt),this}toDestination(){return this.connect(this.context.destination),this}toMaster(){return warn$2("toMaster() has been renamed toDestination()"),this.toDestination()}disconnect(et,nt=0,rt=0){return disconnect(this,et,nt,rt),this}chain(...et){return connectSeries(this,...et),this}fan(...et){return et.forEach(nt=>this.connect(nt)),this}dispose(){return super.dispose(),isDefined(this.input)&&(this.input instanceof ToneAudioNode?this.input.dispose():isAudioNode(this.input)&&this.input.disconnect()),isDefined(this.output)&&(this.output instanceof ToneAudioNode?this.output.dispose():isAudioNode(this.output)&&this.output.disconnect()),this._internalChannels=[],this}}function connectSeries(...tt){const et=tt.shift();tt.reduce((nt,rt)=>(nt instanceof ToneAudioNode?nt.connect(rt):isAudioNode(nt)&&connect(nt,rt),rt),et)}function connect(tt,et,nt=0,rt=0){for(assert(isDefined(tt),"Cannot connect from undefined node"),assert(isDefined(et),"Cannot connect to undefined node"),(et instanceof ToneAudioNode||isAudioNode(et))&&assert(et.numberOfInputs>0,"Cannot connect to node with no inputs"),assert(tt.numberOfOutputs>0,"Cannot connect from node with no outputs");et instanceof ToneAudioNode||et instanceof Param;)isDefined(et.input)&&(et=et.input);for(;tt instanceof ToneAudioNode;)isDefined(tt.output)&&(tt=tt.output);isAudioParam(et)?tt.connect(et,nt):tt.connect(et,nt,rt)}function disconnect(tt,et,nt=0,rt=0){if(isDefined(et))for(;et instanceof ToneAudioNode;)et=et.input;for(;!isAudioNode(tt);)isDefined(tt.output)&&(tt=tt.output);isAudioParam(et)?tt.disconnect(et,nt):isAudioNode(et)?tt.disconnect(et,nt,rt):tt.disconnect()}class Gain extends ToneAudioNode{constructor(){super(optionsFromArguments(Gain.getDefaults(),arguments,["gain","units"])),this.name="Gain",this._gainNode=this.context.createGain(),this.input=this._gainNode,this.output=this._gainNode;const et=optionsFromArguments(Gain.getDefaults(),arguments,["gain","units"]);this.gain=new Param({context:this.context,convert:et.convert,param:this._gainNode.gain,units:et.units,value:et.gain,minValue:et.minValue,maxValue:et.maxValue}),readOnly(this,"gain")}static getDefaults(){return Object.assign(ToneAudioNode.getDefaults(),{convert:!0,gain:1,units:"gain"})}dispose(){return super.dispose(),this._gainNode.disconnect(),this.gain.dispose(),this}}class OneShotSource extends ToneAudioNode{constructor(et){super(et),this.onended=noOp,this._startTime=-1,this._stopTime=-1,this._timeout=-1,this.output=new Gain({context:this.context,gain:0}),this._gainNode=this.output,this.getStateAtTime=function(nt){const rt=this.toSeconds(nt);return this._startTime!==-1&&rt>=this._startTime&&(this._stopTime===-1||rt<=this._stopTime)?"started":"stopped"},this._fadeIn=et.fadeIn,this._fadeOut=et.fadeOut,this._curve=et.curve,this.onended=et.onended}static getDefaults(){return Object.assign(ToneAudioNode.getDefaults(),{curve:"linear",fadeIn:0,fadeOut:0,onended:noOp})}_startGain(et,nt=1){assert(this._startTime===-1,"Source cannot be started more than once");const rt=this.toSeconds(this._fadeIn);return this._startTime=et+rt,this._startTime=Math.max(this._startTime,this.context.currentTime),rt>0?(this._gainNode.gain.setValueAtTime(0,et),this._curve==="linear"?this._gainNode.gain.linearRampToValueAtTime(nt,et+rt):this._gainNode.gain.exponentialApproachValueAtTime(nt,et,rt)):this._gainNode.gain.setValueAtTime(nt,et),this}stop(et){return this.log("stop",et),this._stopGain(this.toSeconds(et)),this}_stopGain(et){assert(this._startTime!==-1,"'start' must be called before 'stop'"),this.cancelStop();const nt=this.toSeconds(this._fadeOut);return this._stopTime=this.toSeconds(et)+nt,this._stopTime=Math.max(this._stopTime,this.now()),nt>0?this._curve==="linear"?this._gainNode.gain.linearRampTo(0,nt,et):this._gainNode.gain.targetRampTo(0,nt,et):(this._gainNode.gain.cancelAndHoldAtTime(et),this._gainNode.gain.setValueAtTime(0,et)),this.context.clearTimeout(this._timeout),this._timeout=this.context.setTimeout(()=>{const rt=this._curve==="exponential"?nt*2:0;this._stopSource(this.now()+rt),this._onended()},this._stopTime-this.context.currentTime),this}_onended(){if(this.onended!==noOp&&(this.onended(this),this.onended=noOp,!this.context.isOffline)){const et=()=>this.dispose();typeof window.requestIdleCallback<"u"?window.requestIdleCallback(et):setTimeout(et,1e3)}}get state(){return this.getStateAtTime(this.now())}cancelStop(){return this.log("cancelStop"),assert(this._startTime!==-1,"Source is not started"),this._gainNode.gain.cancelScheduledValues(this._startTime+this.sampleTime),this.context.clearTimeout(this._timeout),this._stopTime=-1,this}dispose(){return super.dispose(),this._gainNode.dispose(),this.onended=noOp,this}}class ToneConstantSource extends OneShotSource{constructor(){super(optionsFromArguments(ToneConstantSource.getDefaults(),arguments,["offset"])),this.name="ToneConstantSource",this._source=this.context.createConstantSource();const et=optionsFromArguments(ToneConstantSource.getDefaults(),arguments,["offset"]);connect(this._source,this._gainNode),this.offset=new Param({context:this.context,convert:et.convert,param:this._source.offset,units:et.units,value:et.offset,minValue:et.minValue,maxValue:et.maxValue})}static getDefaults(){return Object.assign(OneShotSource.getDefaults(),{convert:!0,offset:1,units:"number"})}start(et){const nt=this.toSeconds(et);return this.log("start",nt),this._startGain(nt),this._source.start(nt),this}_stopSource(et){this._source.stop(et)}dispose(){return super.dispose(),this.state==="started"&&this.stop(),this._source.disconnect(),this.offset.dispose(),this}}class Signal extends ToneAudioNode{constructor(){super(optionsFromArguments(Signal.getDefaults(),arguments,["value","units"])),this.name="Signal",this.override=!0;const et=optionsFromArguments(Signal.getDefaults(),arguments,["value","units"]);this.output=this._constantSource=new ToneConstantSource({context:this.context,convert:et.convert,offset:et.value,units:et.units,minValue:et.minValue,maxValue:et.maxValue}),this._constantSource.start(0),this.input=this._param=this._constantSource.offset}static getDefaults(){return Object.assign(ToneAudioNode.getDefaults(),{convert:!0,units:"number",value:0})}connect(et,nt=0,rt=0){return connectSignal(this,et,nt,rt),this}dispose(){return super.dispose(),this._param.dispose(),this._constantSource.dispose(),this}setValueAtTime(et,nt){return this._param.setValueAtTime(et,nt),this}getValueAtTime(et){return this._param.getValueAtTime(et)}setRampPoint(et){return this._param.setRampPoint(et),this}linearRampToValueAtTime(et,nt){return this._param.linearRampToValueAtTime(et,nt),this}exponentialRampToValueAtTime(et,nt){return this._param.exponentialRampToValueAtTime(et,nt),this}exponentialRampTo(et,nt,rt){return this._param.exponentialRampTo(et,nt,rt),this}linearRampTo(et,nt,rt){return this._param.linearRampTo(et,nt,rt),this}targetRampTo(et,nt,rt){return this._param.targetRampTo(et,nt,rt),this}exponentialApproachValueAtTime(et,nt,rt){return this._param.exponentialApproachValueAtTime(et,nt,rt),this}setTargetAtTime(et,nt,rt){return this._param.setTargetAtTime(et,nt,rt),this}setValueCurveAtTime(et,nt,rt,it){return this._param.setValueCurveAtTime(et,nt,rt,it),this}cancelScheduledValues(et){return this._param.cancelScheduledValues(et),this}cancelAndHoldAtTime(et){return this._param.cancelAndHoldAtTime(et),this}rampTo(et,nt,rt){return this._param.rampTo(et,nt,rt),this}get value(){return this._param.value}set value(et){this._param.value=et}get convert(){return this._param.convert}set convert(et){this._param.convert=et}get units(){return this._param.units}get overridden(){return this._param.overridden}set overridden(et){this._param.overridden=et}get maxValue(){return this._param.maxValue}get minValue(){return this._param.minValue}apply(et){return this._param.apply(et),this}}function connectSignal(tt,et,nt,rt){(et instanceof Param||isAudioParam(et)||et instanceof Signal&&et.override)&&(et.cancelScheduledValues(0),et.setValueAtTime(0,0),et instanceof Signal&&(et.overridden=!0)),connect(tt,et,nt,rt)}class TickParam extends Param{constructor(){super(optionsFromArguments(TickParam.getDefaults(),arguments,["value"])),this.name="TickParam",this._events=new Timeline(1/0),this._multiplier=1;const et=optionsFromArguments(TickParam.getDefaults(),arguments,["value"]);this._multiplier=et.multiplier,this._events.cancel(0),this._events.add({ticks:0,time:0,type:"setValueAtTime",value:this._fromType(et.value)}),this.setValueAtTime(et.value,0)}static getDefaults(){return Object.assign(Param.getDefaults(),{multiplier:1,units:"hertz",value:1})}setTargetAtTime(et,nt,rt){nt=this.toSeconds(nt),this.setRampPoint(nt);const it=this._fromType(et),ot=this._events.get(nt),at=Math.round(Math.max(1/rt,1));for(let st=0;st<=at;st++){const lt=rt*st+nt,ct=this._exponentialApproach(ot.time,ot.value,it,rt,lt);this.linearRampToValueAtTime(this._toType(ct),lt)}return this}setValueAtTime(et,nt){const rt=this.toSeconds(nt);super.setValueAtTime(et,nt);const it=this._events.get(rt),ot=this._events.previousEvent(it),at=this._getTicksUntilEvent(ot,rt);return it.ticks=Math.max(at,0),this}linearRampToValueAtTime(et,nt){const rt=this.toSeconds(nt);super.linearRampToValueAtTime(et,nt);const it=this._events.get(rt),ot=this._events.previousEvent(it),at=this._getTicksUntilEvent(ot,rt);return it.ticks=Math.max(at,0),this}exponentialRampToValueAtTime(et,nt){nt=this.toSeconds(nt);const rt=this._fromType(et),it=this._events.get(nt),ot=Math.round(Math.max((nt-it.time)*10,1)),at=(nt-it.time)/ot;for(let st=0;st<=ot;st++){const lt=at*st+it.time,ct=this._exponentialInterpolate(it.time,it.value,nt,rt,lt);this.linearRampToValueAtTime(this._toType(ct),lt)}return this}_getTicksUntilEvent(et,nt){if(et===null)et={ticks:0,time:0,type:"setValueAtTime",value:0};else if(isUndef(et.ticks)){const at=this._events.previousEvent(et);et.ticks=this._getTicksUntilEvent(at,et.time)}const rt=this._fromType(this.getValueAtTime(et.time));let it=this._fromType(this.getValueAtTime(nt));const ot=this._events.get(nt);return ot&&ot.time===nt&&ot.type==="setValueAtTime"&&(it=this._fromType(this.getValueAtTime(nt-this.sampleTime))),.5*(nt-et.time)*(rt+it)+et.ticks}getTicksAtTime(et){const nt=this.toSeconds(et),rt=this._events.get(nt);return Math.max(this._getTicksUntilEvent(rt,nt),0)}getDurationOfTicks(et,nt){const rt=this.toSeconds(nt),it=this.getTicksAtTime(nt);return this.getTimeOfTick(it+et)-rt}getTimeOfTick(et){const nt=this._events.get(et,"ticks"),rt=this._events.getAfter(et,"ticks");if(nt&&nt.ticks===et)return nt.time;if(nt&&rt&&rt.type==="linearRampToValueAtTime"&&nt.value!==rt.value){const it=this._fromType(this.getValueAtTime(nt.time)),at=(this._fromType(this.getValueAtTime(rt.time))-it)/(rt.time-nt.time),st=Math.sqrt(Math.pow(it,2)-2*at*(nt.ticks-et)),lt=(-it+st)/at,ct=(-it-st)/at;return(lt>0?lt:ct)+nt.time}else return nt?nt.value===0?1/0:nt.time+(et-nt.ticks)/nt.value:et/this._initialValue}ticksToTime(et,nt){return this.getDurationOfTicks(et,nt)}timeToTicks(et,nt){const rt=this.toSeconds(nt),it=this.toSeconds(et),ot=this.getTicksAtTime(rt);return this.getTicksAtTime(rt+it)-ot}_fromType(et){return this.units==="bpm"&&this.multiplier?1/(60/et/this.multiplier):super._fromType(et)}_toType(et){return this.units==="bpm"&&this.multiplier?et/this.multiplier*60:super._toType(et)}get multiplier(){return this._multiplier}set multiplier(et){const nt=this.value;this._multiplier=et,this.cancelScheduledValues(0),this.setValueAtTime(nt,0)}}class TickSignal extends Signal{constructor(){super(optionsFromArguments(TickSignal.getDefaults(),arguments,["value"])),this.name="TickSignal";const et=optionsFromArguments(TickSignal.getDefaults(),arguments,["value"]);this.input=this._param=new TickParam({context:this.context,convert:et.convert,multiplier:et.multiplier,param:this._constantSource.offset,units:et.units,value:et.value})}static getDefaults(){return Object.assign(Signal.getDefaults(),{multiplier:1,units:"hertz",value:1})}ticksToTime(et,nt){return this._param.ticksToTime(et,nt)}timeToTicks(et,nt){return this._param.timeToTicks(et,nt)}getTimeOfTick(et){return this._param.getTimeOfTick(et)}getDurationOfTicks(et,nt){return this._param.getDurationOfTicks(et,nt)}getTicksAtTime(et){return this._param.getTicksAtTime(et)}get multiplier(){return this._param.multiplier}set multiplier(et){this._param.multiplier=et}dispose(){return super.dispose(),this._param.dispose(),this}}class TickSource extends ToneWithContext{constructor(){super(optionsFromArguments(TickSource.getDefaults(),arguments,["frequency"])),this.name="TickSource",this._state=new StateTimeline,this._tickOffset=new Timeline,this._ticksAtTime=new Timeline,this._secondsAtTime=new Timeline;const et=optionsFromArguments(TickSource.getDefaults(),arguments,["frequency"]);this.frequency=new TickSignal({context:this.context,units:et.units,value:et.frequency}),readOnly(this,"frequency"),this._state.setStateAtTime("stopped",0),this.setTicksAtTime(0,0)}static getDefaults(){return Object.assign({frequency:1,units:"hertz"},ToneWithContext.getDefaults())}get state(){return this.getStateAtTime(this.now())}start(et,nt){const rt=this.toSeconds(et);return this._state.getValueAtTime(rt)!=="started"&&(this._state.setStateAtTime("started",rt),isDefined(nt)&&this.setTicksAtTime(nt,rt),this._ticksAtTime.cancel(rt),this._secondsAtTime.cancel(rt)),this}stop(et){const nt=this.toSeconds(et);if(this._state.getValueAtTime(nt)==="stopped"){const rt=this._state.get(nt);rt&&rt.time>0&&(this._tickOffset.cancel(rt.time),this._state.cancel(rt.time))}return this._state.cancel(nt),this._state.setStateAtTime("stopped",nt),this.setTicksAtTime(0,nt),this._ticksAtTime.cancel(nt),this._secondsAtTime.cancel(nt),this}pause(et){const nt=this.toSeconds(et);return this._state.getValueAtTime(nt)==="started"&&(this._state.setStateAtTime("paused",nt),this._ticksAtTime.cancel(nt),this._secondsAtTime.cancel(nt)),this}cancel(et){return et=this.toSeconds(et),this._state.cancel(et),this._tickOffset.cancel(et),this._ticksAtTime.cancel(et),this._secondsAtTime.cancel(et),this}getTicksAtTime(et){const nt=this.toSeconds(et),rt=this._state.getLastState("stopped",nt),it=this._ticksAtTime.get(nt),ot={state:"paused",time:nt};this._state.add(ot);let at=it||rt,st=it?it.ticks:0,lt=null;return this._state.forEachBetween(at.time,nt+this.sampleTime,ct=>{let ut=at.time;const ht=this._tickOffset.get(ct.time);ht&&ht.time>=at.time&&(st=ht.ticks,ut=ht.time),at.state==="started"&&ct.state!=="started"&&(st+=this.frequency.getTicksAtTime(ct.time)-this.frequency.getTicksAtTime(ut),ct.time!=ot.time&&(lt={state:ct.state,time:ct.time,ticks:st})),at=ct}),this._state.remove(ot),lt&&this._ticksAtTime.add(lt),st}get ticks(){return this.getTicksAtTime(this.now())}set ticks(et){this.setTicksAtTime(et,this.now())}get seconds(){return this.getSecondsAtTime(this.now())}set seconds(et){const nt=this.now(),rt=this.frequency.timeToTicks(et,nt);this.setTicksAtTime(rt,nt)}getSecondsAtTime(et){et=this.toSeconds(et);const nt=this._state.getLastState("stopped",et),rt={state:"paused",time:et};this._state.add(rt);const it=this._secondsAtTime.get(et);let ot=it||nt,at=it?it.seconds:0,st=null;return this._state.forEachBetween(ot.time,et+this.sampleTime,lt=>{let ct=ot.time;const ut=this._tickOffset.get(lt.time);ut&&ut.time>=ot.time&&(at=ut.seconds,ct=ut.time),ot.state==="started"&<.state!=="started"&&(at+=lt.time-ct,lt.time!=rt.time&&(st={state:lt.state,time:lt.time,seconds:at})),ot=lt}),this._state.remove(rt),st&&this._secondsAtTime.add(st),at}setTicksAtTime(et,nt){return nt=this.toSeconds(nt),this._tickOffset.cancel(nt),this._tickOffset.add({seconds:this.frequency.getDurationOfTicks(et,nt),ticks:et,time:nt}),this._ticksAtTime.cancel(nt),this._secondsAtTime.cancel(nt),this}getStateAtTime(et){return et=this.toSeconds(et),this._state.getValueAtTime(et)}getTimeOfTick(et,nt=this.now()){const rt=this._tickOffset.get(nt),it=this._state.get(nt),ot=Math.max(rt.time,it.time),at=this.frequency.getTicksAtTime(ot)+et-rt.ticks;return this.frequency.getTimeOfTick(at)}forEachTickBetween(et,nt,rt){let it=this._state.get(et);this._state.forEachBetween(et,nt,at=>{it&&it.state==="started"&&at.state!=="started"&&this.forEachTickBetween(Math.max(it.time,et),at.time-this.sampleTime,rt),it=at});let ot=null;if(it&&it.state==="started"){const at=Math.max(it.time,et),st=this.frequency.getTicksAtTime(at),lt=this.frequency.getTicksAtTime(it.time),ct=st-lt;let ut=Math.ceil(ct)-ct;ut=EQ(ut,1)?0:ut;let ht=this.frequency.getTimeOfTick(st+ut);for(;ht{switch(rt.state){case"started":const it=this._tickSource.getTicksAtTime(rt.time);this.emit("start",rt.time,it);break;case"stopped":rt.time!==0&&this.emit("stop",rt.time);break;case"paused":this.emit("pause",rt.time);break}}),this._tickSource.forEachTickBetween(et,nt,(rt,it)=>{this.callback(rt,it)}))}getStateAtTime(et){const nt=this.toSeconds(et);return this._state.getValueAtTime(nt)}dispose(){return super.dispose(),this.context.off("tick",this._boundLoop),this._tickSource.dispose(),this._state.dispose(),this}}Emitter$1.mixin(Clock);class ToneAudioBuffers extends Tone{constructor(){super(),this.name="ToneAudioBuffers",this._buffers=new Map,this._loadingCount=0;const et=optionsFromArguments(ToneAudioBuffers.getDefaults(),arguments,["urls","onload","baseUrl"],"urls");this.baseUrl=et.baseUrl,Object.keys(et.urls).forEach(nt=>{this._loadingCount++;const rt=et.urls[nt];this.add(nt,rt,this._bufferLoaded.bind(this,et.onload),et.onerror)})}static getDefaults(){return{baseUrl:"",onerror:noOp,onload:noOp,urls:{}}}has(et){return this._buffers.has(et.toString())}get(et){return assert(this.has(et),`ToneAudioBuffers has no buffer named: ${et}`),this._buffers.get(et.toString())}_bufferLoaded(et){this._loadingCount--,this._loadingCount===0&&et&&et()}get loaded(){return Array.from(this._buffers).every(([et,nt])=>nt.loaded)}add(et,nt,rt=noOp,it=noOp){return isString$2(nt)?(this.baseUrl&&nt.trim().substring(0,11).toLowerCase()==="data:audio/"&&(this.baseUrl=""),this._buffers.set(et.toString(),new ToneAudioBuffer(this.baseUrl+nt,rt,it))):this._buffers.set(et.toString(),new ToneAudioBuffer(nt,rt,it)),this}dispose(){return super.dispose(),this._buffers.forEach(et=>et.dispose()),this._buffers.clear(),this}}class TicksClass extends TransportTimeClass{constructor(){super(...arguments),this.name="Ticks",this.defaultUnits="i"}_now(){return this.context.transport.ticks}_beatsToUnits(et){return this._getPPQ()*et}_secondsToUnits(et){return Math.floor(et/(60/this._getBpm())*this._getPPQ())}_ticksToUnits(et){return et}toTicks(){return this.valueOf()}toSeconds(){return this.valueOf()/this._getPPQ()*(60/this._getBpm())}}class Draw extends ToneWithContext{constructor(){super(...arguments),this.name="Draw",this.expiration=.25,this.anticipation=.008,this._events=new Timeline,this._boundDrawLoop=this._drawLoop.bind(this),this._animationFrame=-1}schedule(et,nt){return this._events.add({callback:et,time:this.toSeconds(nt)}),this._events.length===1&&(this._animationFrame=requestAnimationFrame(this._boundDrawLoop)),this}cancel(et){return this._events.cancel(this.toSeconds(et)),this}_drawLoop(){const et=this.context.currentTime;for(;this._events.length&&this._events.peek().time-this.anticipation<=et;){const nt=this._events.shift();nt&&et-nt.time<=this.expiration&&nt.callback()}this._events.length>0&&(this._animationFrame=requestAnimationFrame(this._boundDrawLoop))}dispose(){return super.dispose(),this._events.dispose(),cancelAnimationFrame(this._animationFrame),this}}onContextInit(tt=>{tt.draw=new Draw({context:tt})});onContextClose(tt=>{tt.draw.dispose()});class IntervalTimeline extends Tone{constructor(){super(...arguments),this.name="IntervalTimeline",this._root=null,this._length=0}add(et){assert(isDefined(et.time),"Events must have a time property"),assert(isDefined(et.duration),"Events must have a duration parameter"),et.time=et.time.valueOf();let nt=new IntervalNode(et.time,et.time+et.duration,et);for(this._root===null?this._root=nt:this._root.insert(nt),this._length++;nt!==null;)nt.updateHeight(),nt.updateMax(),this._rebalance(nt),nt=nt.parent;return this}remove(et){if(this._root!==null){const nt=[];this._root.search(et.time,nt);for(const rt of nt)if(rt.event===et){this._removeNode(rt),this._length--;break}}return this}get length(){return this._length}cancel(et){return this.forEachFrom(et,nt=>this.remove(nt)),this}_setRoot(et){this._root=et,this._root!==null&&(this._root.parent=null)}_replaceNodeInParent(et,nt){et.parent!==null?(et.isLeftChild()?et.parent.left=nt:et.parent.right=nt,this._rebalance(et.parent)):this._setRoot(nt)}_removeNode(et){if(et.left===null&&et.right===null)this._replaceNodeInParent(et,null);else if(et.right===null)this._replaceNodeInParent(et,et.left);else if(et.left===null)this._replaceNodeInParent(et,et.right);else{const nt=et.getBalance();let rt,it=null;if(nt>0)if(et.left.right===null)rt=et.left,rt.right=et.right,it=rt;else{for(rt=et.left.right;rt.right!==null;)rt=rt.right;rt.parent&&(rt.parent.right=rt.left,it=rt.parent,rt.left=et.left,rt.right=et.right)}else if(et.right.left===null)rt=et.right,rt.left=et.left,it=rt;else{for(rt=et.right.left;rt.left!==null;)rt=rt.left;rt.parent&&(rt.parent.left=rt.right,it=rt.parent,rt.left=et.left,rt.right=et.right)}et.parent!==null?et.isLeftChild()?et.parent.left=rt:et.parent.right=rt:this._setRoot(rt),it&&this._rebalance(it)}et.dispose()}_rotateLeft(et){const nt=et.parent,rt=et.isLeftChild(),it=et.right;it&&(et.right=it.left,it.left=et),nt!==null?rt?nt.left=it:nt.right=it:this._setRoot(it)}_rotateRight(et){const nt=et.parent,rt=et.isLeftChild(),it=et.left;it&&(et.left=it.right,it.right=et),nt!==null?rt?nt.left=it:nt.right=it:this._setRoot(it)}_rebalance(et){const nt=et.getBalance();nt>1&&et.left?et.left.getBalance()<0?this._rotateLeft(et.left):this._rotateRight(et):nt<-1&&et.right&&(et.right.getBalance()>0?this._rotateRight(et.right):this._rotateLeft(et))}get(et){if(this._root!==null){const nt=[];if(this._root.search(et,nt),nt.length>0){let rt=nt[0];for(let it=1;itrt.low&&(rt=nt[it]);return rt.event}}return null}forEach(et){if(this._root!==null){const nt=[];this._root.traverse(rt=>nt.push(rt)),nt.forEach(rt=>{rt.event&&et(rt.event)})}return this}forEachAtTime(et,nt){if(this._root!==null){const rt=[];this._root.search(et,rt),rt.forEach(it=>{it.event&&nt(it.event)})}return this}forEachFrom(et,nt){if(this._root!==null){const rt=[];this._root.searchAfter(et,rt),rt.forEach(it=>{it.event&&nt(it.event)})}return this}dispose(){return super.dispose(),this._root!==null&&this._root.traverse(et=>et.dispose()),this._root=null,this}}class IntervalNode{constructor(et,nt,rt){this._left=null,this._right=null,this.parent=null,this.height=0,this.event=rt,this.low=et,this.high=nt,this.max=this.high}insert(et){et.low<=this.low?this.left===null?this.left=et:this.left.insert(et):this.right===null?this.right=et:this.right.insert(et)}search(et,nt){et>this.max||(this.left!==null&&this.left.search(et,nt),this.low<=et&&this.high>et&&nt.push(this),!(this.low>et)&&this.right!==null&&this.right.search(et,nt))}searchAfter(et,nt){this.low>=et&&(nt.push(this),this.left!==null&&this.left.searchAfter(et,nt)),this.right!==null&&this.right.searchAfter(et,nt)}traverse(et){et(this),this.left!==null&&this.left.traverse(et),this.right!==null&&this.right.traverse(et)}updateHeight(){this.left!==null&&this.right!==null?this.height=Math.max(this.left.height,this.right.height)+1:this.right!==null?this.height=this.right.height+1:this.left!==null?this.height=this.left.height+1:this.height=0}updateMax(){this.max=this.high,this.left!==null&&(this.max=Math.max(this.max,this.left.max)),this.right!==null&&(this.max=Math.max(this.max,this.right.max))}getBalance(){let et=0;return this.left!==null&&this.right!==null?et=this.left.height-this.right.height:this.left!==null?et=this.left.height+1:this.right!==null&&(et=-(this.right.height+1)),et}isLeftChild(){return this.parent!==null&&this.parent.left===this}get left(){return this._left}set left(et){this._left=et,et!==null&&(et.parent=this),this.updateHeight(),this.updateMax()}get right(){return this._right}set right(et){this._right=et,et!==null&&(et.parent=this),this.updateHeight(),this.updateMax()}dispose(){this.parent=null,this._left=null,this._right=null,this.event=null}}class Volume extends ToneAudioNode{constructor(){super(optionsFromArguments(Volume.getDefaults(),arguments,["volume"])),this.name="Volume";const et=optionsFromArguments(Volume.getDefaults(),arguments,["volume"]);this.input=this.output=new Gain({context:this.context,gain:et.volume,units:"decibels"}),this.volume=this.output.gain,readOnly(this,"volume"),this._unmutedVolume=et.volume,this.mute=et.mute}static getDefaults(){return Object.assign(ToneAudioNode.getDefaults(),{mute:!1,volume:0})}get mute(){return this.volume.value===-1/0}set mute(et){!this.mute&&et?(this._unmutedVolume=this.volume.value,this.volume.value=-1/0):this.mute&&!et&&(this.volume.value=this._unmutedVolume)}dispose(){return super.dispose(),this.input.dispose(),this.volume.dispose(),this}}let Destination$1=class b1 extends ToneAudioNode{constructor(){super(optionsFromArguments(b1.getDefaults(),arguments)),this.name="Destination",this.input=new Volume({context:this.context}),this.output=new Gain({context:this.context}),this.volume=this.input.volume;const et=optionsFromArguments(b1.getDefaults(),arguments);connectSeries(this.input,this.output,this.context.rawContext.destination),this.mute=et.mute,this._internalChannels=[this.input,this.context.rawContext.destination,this.output]}static getDefaults(){return Object.assign(ToneAudioNode.getDefaults(),{mute:!1,volume:0})}get mute(){return this.input.mute}set mute(et){this.input.mute=et}chain(...et){return this.input.disconnect(),et.unshift(this.input),et.push(this.output),connectSeries(...et),this}get maxChannelCount(){return this.context.rawContext.destination.maxChannelCount}dispose(){return super.dispose(),this.volume.dispose(),this}};onContextInit(tt=>{tt.destination=new Destination$1({context:tt})});onContextClose(tt=>{tt.destination.dispose()});class TimelineValue extends Tone{constructor(et){super(),this.name="TimelineValue",this._timeline=new Timeline({memory:10}),this._initialValue=et}set(et,nt){return this._timeline.add({value:et,time:nt}),this}get(et){const nt=this._timeline.get(et);return nt?nt.value:this._initialValue}}class SignalOperator extends ToneAudioNode{constructor(){super(Object.assign(optionsFromArguments(SignalOperator.getDefaults(),arguments,["context"])))}connect(et,nt=0,rt=0){return connectSignal(this,et,nt,rt),this}}class WaveShaper extends SignalOperator{constructor(){super(Object.assign(optionsFromArguments(WaveShaper.getDefaults(),arguments,["mapping","length"]))),this.name="WaveShaper",this._shaper=this.context.createWaveShaper(),this.input=this._shaper,this.output=this._shaper;const et=optionsFromArguments(WaveShaper.getDefaults(),arguments,["mapping","length"]);isArray$e(et.mapping)||et.mapping instanceof Float32Array?this.curve=Float32Array.from(et.mapping):isFunction$2(et.mapping)&&this.setMap(et.mapping,et.length)}static getDefaults(){return Object.assign(Signal.getDefaults(),{length:1024})}setMap(et,nt=1024){const rt=new Float32Array(nt);for(let it=0,ot=nt;itrt.includes(et));assert(nt,"oversampling must be either 'none', '2x', or '4x'"),this._shaper.oversample=et}dispose(){return super.dispose(),this._shaper.disconnect(),this}}class Pow extends SignalOperator{constructor(){super(Object.assign(optionsFromArguments(Pow.getDefaults(),arguments,["value"]))),this.name="Pow";const et=optionsFromArguments(Pow.getDefaults(),arguments,["value"]);this._exponentScaler=this.input=this.output=new WaveShaper({context:this.context,mapping:this._expFunc(et.value),length:8192}),this._exponent=et.value}static getDefaults(){return Object.assign(SignalOperator.getDefaults(),{value:1})}_expFunc(et){return nt=>Math.pow(Math.abs(nt),et)}get value(){return this._exponent}set value(et){this._exponent=et,this._exponentScaler.setMap(this._expFunc(this._exponent))}dispose(){return super.dispose(),this._exponentScaler.dispose(),this}}class TransportEvent{constructor(et,nt){this.id=TransportEvent._eventId++,this._remainderTime=0;const rt=Object.assign(TransportEvent.getDefaults(),nt);this.transport=et,this.callback=rt.callback,this._once=rt.once,this.time=Math.floor(rt.time),this._remainderTime=rt.time-this.time}static getDefaults(){return{callback:noOp,once:!1,time:0}}get floatTime(){return this.time+this._remainderTime}invoke(et){if(this.callback){const nt=this.transport.bpm.getDurationOfTicks(1,et);this.callback(et+this._remainderTime*nt),this._once&&this.transport.clear(this.id)}}dispose(){return this.callback=void 0,this}}TransportEvent._eventId=0;class TransportRepeatEvent extends TransportEvent{constructor(et,nt){super(et,nt),this._currentId=-1,this._nextId=-1,this._nextTick=this.time,this._boundRestart=this._restart.bind(this);const rt=Object.assign(TransportRepeatEvent.getDefaults(),nt);this.duration=rt.duration,this._interval=rt.interval,this._nextTick=rt.time,this.transport.on("start",this._boundRestart),this.transport.on("loopStart",this._boundRestart),this.transport.on("ticks",this._boundRestart),this.context=this.transport.context,this._restart()}static getDefaults(){return Object.assign({},TransportEvent.getDefaults(),{duration:1/0,interval:1,once:!1})}invoke(et){this._createEvents(et),super.invoke(et)}_createEvent(){return LT(this._nextTick,this.floatTime+this.duration)?this.transport.scheduleOnce(this.invoke.bind(this),new TicksClass(this.context,this._nextTick).toSeconds()):-1}_createEvents(et){LT(this._nextTick+this._interval,this.floatTime+this.duration)&&(this._nextTick+=this._interval,this._currentId=this._nextId,this._nextId=this.transport.scheduleOnce(this.invoke.bind(this),new TicksClass(this.context,this._nextTick).toSeconds()))}_restart(et){this.transport.clear(this._currentId),this.transport.clear(this._nextId),this._nextTick=this.floatTime;const nt=this.transport.getTicksAtTime(et);GT(nt,this.time)&&(this._nextTick=this.floatTime+Math.ceil((nt-this.floatTime)/this._interval)*this._interval),this._currentId=this._createEvent(),this._nextTick+=this._interval,this._nextId=this._createEvent()}dispose(){return super.dispose(),this.transport.clear(this._currentId),this.transport.clear(this._nextId),this.transport.off("start",this._boundRestart),this.transport.off("loopStart",this._boundRestart),this.transport.off("ticks",this._boundRestart),this}}let Transport$1=class w1 extends ToneWithContext{constructor(){super(optionsFromArguments(w1.getDefaults(),arguments)),this.name="Transport",this._loop=new TimelineValue(!1),this._loopStart=0,this._loopEnd=0,this._scheduledEvents={},this._timeline=new Timeline,this._repeatedEvents=new IntervalTimeline,this._syncedSignals=[],this._swingAmount=0;const et=optionsFromArguments(w1.getDefaults(),arguments);this._ppq=et.ppq,this._clock=new Clock({callback:this._processTick.bind(this),context:this.context,frequency:0,units:"bpm"}),this._bindClockEvents(),this.bpm=this._clock.frequency,this._clock.frequency.multiplier=et.ppq,this.bpm.setValueAtTime(et.bpm,0),readOnly(this,"bpm"),this._timeSignature=et.timeSignature,this._swingTicks=et.ppq/2}static getDefaults(){return Object.assign(ToneWithContext.getDefaults(),{bpm:120,loopEnd:"4m",loopStart:0,ppq:192,swing:0,swingSubdivision:"8n",timeSignature:4})}_processTick(et,nt){if(this._loop.get(et)&&nt>=this._loopEnd&&(this.emit("loopEnd",et),this._clock.setTicksAtTime(this._loopStart,et),nt=this._loopStart,this.emit("loopStart",et,this._clock.getSecondsAtTime(et)),this.emit("loop",et)),this._swingAmount>0&&nt%this._ppq!==0&&nt%(this._swingTicks*2)!==0){const rt=nt%(this._swingTicks*2)/(this._swingTicks*2),it=Math.sin(rt*Math.PI)*this._swingAmount;et+=new TicksClass(this.context,this._swingTicks*2/3).toSeconds()*it}enterScheduledCallback(!0),this._timeline.forEachAtTime(nt,rt=>rt.invoke(et)),enterScheduledCallback(!1)}schedule(et,nt){const rt=new TransportEvent(this,{callback:et,time:new TransportTimeClass(this.context,nt).toTicks()});return this._addEvent(rt,this._timeline)}scheduleRepeat(et,nt,rt,it=1/0){const ot=new TransportRepeatEvent(this,{callback:et,duration:new TimeClass(this.context,it).toTicks(),interval:new TimeClass(this.context,nt).toTicks(),time:new TransportTimeClass(this.context,rt).toTicks()});return this._addEvent(ot,this._repeatedEvents)}scheduleOnce(et,nt){const rt=new TransportEvent(this,{callback:et,once:!0,time:new TransportTimeClass(this.context,nt).toTicks()});return this._addEvent(rt,this._timeline)}clear(et){if(this._scheduledEvents.hasOwnProperty(et)){const nt=this._scheduledEvents[et.toString()];nt.timeline.remove(nt.event),nt.event.dispose(),delete this._scheduledEvents[et.toString()]}return this}_addEvent(et,nt){return this._scheduledEvents[et.id.toString()]={event:et,timeline:nt},nt.add(et),et.id}cancel(et=0){const nt=this.toTicks(et);return this._timeline.forEachFrom(nt,rt=>this.clear(rt.id)),this._repeatedEvents.forEachFrom(nt,rt=>this.clear(rt.id)),this}_bindClockEvents(){this._clock.on("start",(et,nt)=>{nt=new TicksClass(this.context,nt).toSeconds(),this.emit("start",et,nt)}),this._clock.on("stop",et=>{this.emit("stop",et)}),this._clock.on("pause",et=>{this.emit("pause",et)})}get state(){return this._clock.getStateAtTime(this.now())}start(et,nt){this.context.resume();let rt;return isDefined(nt)&&(rt=this.toTicks(nt)),this._clock.start(et,rt),this}stop(et){return this._clock.stop(et),this}pause(et){return this._clock.pause(et),this}toggle(et){return et=this.toSeconds(et),this._clock.getStateAtTime(et)!=="started"?this.start(et):this.stop(et),this}get timeSignature(){return this._timeSignature}set timeSignature(et){isArray$e(et)&&(et=et[0]/et[1]*4),this._timeSignature=et}get loopStart(){return new TimeClass(this.context,this._loopStart,"i").toSeconds()}set loopStart(et){this._loopStart=this.toTicks(et)}get loopEnd(){return new TimeClass(this.context,this._loopEnd,"i").toSeconds()}set loopEnd(et){this._loopEnd=this.toTicks(et)}get loop(){return this._loop.get(this.now())}set loop(et){this._loop.set(et,this.now())}setLoopPoints(et,nt){return this.loopStart=et,this.loopEnd=nt,this}get swing(){return this._swingAmount}set swing(et){this._swingAmount=et}get swingSubdivision(){return new TicksClass(this.context,this._swingTicks).toNotation()}set swingSubdivision(et){this._swingTicks=this.toTicks(et)}get position(){const et=this.now(),nt=this._clock.getTicksAtTime(et);return new TicksClass(this.context,nt).toBarsBeatsSixteenths()}set position(et){const nt=this.toTicks(et);this.ticks=nt}get seconds(){return this._clock.seconds}set seconds(et){const nt=this.now(),rt=this._clock.frequency.timeToTicks(et,nt);this.ticks=rt}get progress(){if(this.loop){const et=this.now();return(this._clock.getTicksAtTime(et)-this._loopStart)/(this._loopEnd-this._loopStart)}else return 0}get ticks(){return this._clock.ticks}set ticks(et){if(this._clock.ticks!==et){const nt=this.now();if(this.state==="started"){const rt=this._clock.getTicksAtTime(nt),it=this._clock.frequency.getDurationOfTicks(Math.ceil(rt)-rt,nt),ot=nt+it;this.emit("stop",ot),this._clock.setTicksAtTime(et,ot),this.emit("start",ot,this._clock.getSecondsAtTime(ot))}else this.emit("ticks",nt),this._clock.setTicksAtTime(et,nt)}}getTicksAtTime(et){return this._clock.getTicksAtTime(et)}getSecondsAtTime(et){return this._clock.getSecondsAtTime(et)}get PPQ(){return this._clock.frequency.multiplier}set PPQ(et){this._clock.frequency.multiplier=et}nextSubdivision(et){if(et=this.toTicks(et),this.state!=="started")return 0;{const nt=this.now(),rt=this.getTicksAtTime(nt),it=et-rt%et;return this._clock.nextTickTime(it,nt)}}syncSignal(et,nt){const rt=this.now();let it=this.bpm,ot=1/(60/it.getValueAtTime(rt)/this.PPQ),at=[];if(et.units==="time"){const lt=.015625/ot,ct=new Gain(lt),ut=new Pow(-1),ht=new Gain(lt);it.chain(ct,ut,ht),it=ht,ot=1/ot,at=[ct,ut,ht]}nt||(et.getValueAtTime(rt)!==0?nt=et.getValueAtTime(rt)/ot:nt=0);const st=new Gain(nt);return it.connect(st),st.connect(et._param),at.push(st),this._syncedSignals.push({initial:et.value,nodes:at,signal:et}),et.value=0,this}unsyncSignal(et){for(let nt=this._syncedSignals.length-1;nt>=0;nt--){const rt=this._syncedSignals[nt];rt.signal===et&&(rt.nodes.forEach(it=>it.dispose()),rt.signal.value=rt.initial,this._syncedSignals.splice(nt,1))}return this}dispose(){return super.dispose(),this._clock.dispose(),writable(this,"bpm"),this._timeline.dispose(),this._repeatedEvents.dispose(),this}};Emitter$1.mixin(Transport$1);onContextInit(tt=>{tt.transport=new Transport$1({context:tt})});onContextClose(tt=>{tt.transport.dispose()});class Source extends ToneAudioNode{constructor(et){super(et),this.input=void 0,this._state=new StateTimeline("stopped"),this._synced=!1,this._scheduled=[],this._syncedStart=noOp,this._syncedStop=noOp,this._state.memory=100,this._state.increasing=!0,this._volume=this.output=new Volume({context:this.context,mute:et.mute,volume:et.volume}),this.volume=this._volume.volume,readOnly(this,"volume"),this.onstop=et.onstop}static getDefaults(){return Object.assign(ToneAudioNode.getDefaults(),{mute:!1,onstop:noOp,volume:0})}get state(){return this._synced?this.context.transport.state==="started"?this._state.getValueAtTime(this.context.transport.seconds):"stopped":this._state.getValueAtTime(this.now())}get mute(){return this._volume.mute}set mute(et){this._volume.mute=et}_clampToCurrentTime(et){return this._synced?et:Math.max(et,this.context.currentTime)}start(et,nt,rt){let it=isUndef(et)&&this._synced?this.context.transport.seconds:this.toSeconds(et);if(it=this._clampToCurrentTime(it),!this._synced&&this._state.getValueAtTime(it)==="started")assert(GT(it,this._state.get(it).time),"Start time must be strictly greater than previous start time"),this._state.cancel(it),this._state.setStateAtTime("started",it),this.log("restart",it),this.restart(it,nt,rt);else if(this.log("start",it),this._state.setStateAtTime("started",it),this._synced){const ot=this._state.get(it);ot&&(ot.offset=this.toSeconds(defaultArg(nt,0)),ot.duration=rt?this.toSeconds(rt):void 0);const at=this.context.transport.schedule(st=>{this._start(st,nt,rt)},it);this._scheduled.push(at),this.context.transport.state==="started"&&this.context.transport.getSecondsAtTime(this.immediate())>it&&this._syncedStart(this.now(),this.context.transport.seconds)}else assertContextRunning(this.context),this._start(it,nt,rt);return this}stop(et){let nt=isUndef(et)&&this._synced?this.context.transport.seconds:this.toSeconds(et);if(nt=this._clampToCurrentTime(nt),this._state.getValueAtTime(nt)==="started"||isDefined(this._state.getNextState("started",nt))){if(this.log("stop",nt),!this._synced)this._stop(nt);else{const rt=this.context.transport.schedule(this._stop.bind(this),nt);this._scheduled.push(rt)}this._state.cancel(nt),this._state.setStateAtTime("stopped",nt)}return this}restart(et,nt,rt){return et=this.toSeconds(et),this._state.getValueAtTime(et)==="started"&&(this._state.cancel(et),this._restart(et,nt,rt)),this}sync(){return this._synced||(this._synced=!0,this._syncedStart=(et,nt)=>{if(GT(nt,0)){const rt=this._state.get(nt);if(rt&&rt.state==="started"&&rt.time!==nt){const it=nt-this.toSeconds(rt.time);let ot;rt.duration&&(ot=this.toSeconds(rt.duration)-it),this._start(et,this.toSeconds(rt.offset)+it,ot)}}},this._syncedStop=et=>{const nt=this.context.transport.getSecondsAtTime(Math.max(et-this.sampleTime,0));this._state.getValueAtTime(nt)==="started"&&this._stop(et)},this.context.transport.on("start",this._syncedStart),this.context.transport.on("loopStart",this._syncedStart),this.context.transport.on("stop",this._syncedStop),this.context.transport.on("pause",this._syncedStop),this.context.transport.on("loopEnd",this._syncedStop)),this}unsync(){return this._synced&&(this.context.transport.off("stop",this._syncedStop),this.context.transport.off("pause",this._syncedStop),this.context.transport.off("loopEnd",this._syncedStop),this.context.transport.off("start",this._syncedStart),this.context.transport.off("loopStart",this._syncedStart)),this._synced=!1,this._scheduled.forEach(et=>this.context.transport.clear(et)),this._scheduled=[],this._state.cancel(0),this._stop(0),this}dispose(){return super.dispose(),this.onstop=noOp,this.unsync(),this._volume.dispose(),this._state.dispose(),this}}class ToneBufferSource extends OneShotSource{constructor(){super(optionsFromArguments(ToneBufferSource.getDefaults(),arguments,["url","onload"])),this.name="ToneBufferSource",this._source=this.context.createBufferSource(),this._internalChannels=[this._source],this._sourceStarted=!1,this._sourceStopped=!1;const et=optionsFromArguments(ToneBufferSource.getDefaults(),arguments,["url","onload"]);connect(this._source,this._gainNode),this._source.onended=()=>this._stopSource(),this.playbackRate=new Param({context:this.context,param:this._source.playbackRate,units:"positive",value:et.playbackRate}),this.loop=et.loop,this.loopStart=et.loopStart,this.loopEnd=et.loopEnd,this._buffer=new ToneAudioBuffer(et.url,et.onload,et.onerror),this._internalChannels.push(this._source)}static getDefaults(){return Object.assign(OneShotSource.getDefaults(),{url:new ToneAudioBuffer,loop:!1,loopEnd:0,loopStart:0,onload:noOp,onerror:noOp,playbackRate:1})}get fadeIn(){return this._fadeIn}set fadeIn(et){this._fadeIn=et}get fadeOut(){return this._fadeOut}set fadeOut(et){this._fadeOut=et}get curve(){return this._curve}set curve(et){this._curve=et}start(et,nt,rt,it=1){assert(this.buffer.loaded,"buffer is either not set or not loaded");const ot=this.toSeconds(et);this._startGain(ot,it),this.loop?nt=defaultArg(nt,this.loopStart):nt=defaultArg(nt,0);let at=Math.max(this.toSeconds(nt),0);if(this.loop){const st=this.toSeconds(this.loopEnd)||this.buffer.duration,lt=this.toSeconds(this.loopStart),ct=st-lt;GTE(at,st)&&(at=(at-lt)%ct+lt),EQ(at,this.buffer.duration)&&(at=0)}if(this._source.buffer=this.buffer.get(),this._source.loopEnd=this.toSeconds(this.loopEnd)||this.buffer.duration,LT(at,this.buffer.duration)&&(this._sourceStarted=!0,this._source.start(ot,at)),isDefined(rt)){let st=this.toSeconds(rt);st=Math.max(st,0),this.stop(ot+st)}return this}_stopSource(et){!this._sourceStopped&&this._sourceStarted&&(this._sourceStopped=!0,this._source.stop(this.toSeconds(et)),this._onended())}get loopStart(){return this._source.loopStart}set loopStart(et){this._source.loopStart=this.toSeconds(et)}get loopEnd(){return this._source.loopEnd}set loopEnd(et){this._source.loopEnd=this.toSeconds(et)}get buffer(){return this._buffer}set buffer(et){this._buffer.set(et)}get loop(){return this._source.loop}set loop(et){this._source.loop=et,this._sourceStarted&&this.cancelStop()}dispose(){return super.dispose(),this._source.onended=null,this._source.disconnect(),this._buffer.dispose(),this.playbackRate.dispose(),this}}class Noise extends Source{constructor(){super(optionsFromArguments(Noise.getDefaults(),arguments,["type"])),this.name="Noise",this._source=null;const et=optionsFromArguments(Noise.getDefaults(),arguments,["type"]);this._playbackRate=et.playbackRate,this.type=et.type,this._fadeIn=et.fadeIn,this._fadeOut=et.fadeOut}static getDefaults(){return Object.assign(Source.getDefaults(),{fadeIn:0,fadeOut:0,playbackRate:1,type:"white"})}get type(){return this._type}set type(et){if(assert(et in _noiseBuffers,"Noise: invalid type: "+et),this._type!==et&&(this._type=et,this.state==="started")){const nt=this.now();this._stop(nt),this._start(nt)}}get playbackRate(){return this._playbackRate}set playbackRate(et){this._playbackRate=et,this._source&&(this._source.playbackRate.value=et)}_start(et){const nt=_noiseBuffers[this._type];this._source=new ToneBufferSource({url:nt,context:this.context,fadeIn:this._fadeIn,fadeOut:this._fadeOut,loop:!0,onended:()=>this.onstop(this),playbackRate:this._playbackRate}).connect(this.output),this._source.start(this.toSeconds(et),Math.random()*(nt.duration-.001))}_stop(et){this._source&&(this._source.stop(this.toSeconds(et)),this._source=null)}get fadeIn(){return this._fadeIn}set fadeIn(et){this._fadeIn=et,this._source&&(this._source.fadeIn=this._fadeIn)}get fadeOut(){return this._fadeOut}set fadeOut(et){this._fadeOut=et,this._source&&(this._source.fadeOut=this._fadeOut)}_restart(et){this._stop(et),this._start(et)}dispose(){return super.dispose(),this._source&&this._source.disconnect(),this}}const BUFFER_LENGTH=44100*5,NUM_CHANNELS=2,_noiseCache={brown:null,pink:null,white:null},_noiseBuffers={get brown(){if(!_noiseCache.brown){const tt=[];for(let et=0;etthis.onstop(this)});this._oscillator=rt,this._wave?this._oscillator.setPeriodicWave(this._wave):this._oscillator.type=this._type,this._oscillator.connect(this.output),this.frequency.connect(this._oscillator.frequency),this.detune.connect(this._oscillator.detune),this._oscillator.start(nt)}_stop(et){const nt=this.toSeconds(et);this._oscillator&&this._oscillator.stop(nt)}_restart(et){const nt=this.toSeconds(et);return this.log("restart",nt),this._oscillator&&this._oscillator.cancelStop(),this._state.cancel(nt),this}syncFrequency(){return this.context.transport.syncSignal(this.frequency),this}unsyncFrequency(){return this.context.transport.unsyncSignal(this.frequency),this}_getCachedPeriodicWave(){if(this._type==="custom")return Oscillator._periodicWaveCache.find(nt=>nt.phase===this._phase&&deepEquals(nt.partials,this._partials));{const et=Oscillator._periodicWaveCache.find(nt=>nt.type===this._type&&nt.phase===this._phase);return this._partialCount=et?et.partialCount:this._partialCount,et}}get type(){return this._type}set type(et){this._type=et;const nt=["sine","square","sawtooth","triangle"].indexOf(et)!==-1;if(this._phase===0&&nt)this._wave=void 0,this._partialCount=0,this._oscillator!==null&&(this._oscillator.type=et);else{const rt=this._getCachedPeriodicWave();if(isDefined(rt)){const{partials:it,wave:ot}=rt;this._wave=ot,this._partials=it,this._oscillator!==null&&this._oscillator.setPeriodicWave(this._wave)}else{const[it,ot]=this._getRealImaginary(et,this._phase),at=this.context.createPeriodicWave(it,ot);this._wave=at,this._oscillator!==null&&this._oscillator.setPeriodicWave(this._wave),Oscillator._periodicWaveCache.push({imag:ot,partialCount:this._partialCount,partials:this._partials,phase:this._phase,real:it,type:this._type,wave:this._wave}),Oscillator._periodicWaveCache.length>100&&Oscillator._periodicWaveCache.shift()}}}get baseType(){return this._type.replace(this.partialCount.toString(),"")}set baseType(et){this.partialCount&&this._type!=="custom"&&et!=="custom"?this.type=et+this.partialCount:this.type=et}get partialCount(){return this._partialCount}set partialCount(et){assertRange(et,0);let nt=this._type;const rt=/^(sine|triangle|square|sawtooth)(\d+)$/.exec(this._type);if(rt&&(nt=rt[1]),this._type!=="custom")et===0?this.type=nt:this.type=nt+et.toString();else{const it=new Float32Array(et);this._partials.forEach((ot,at)=>it[at]=ot),this._partials=Array.from(it),this.type=this._type}}_getRealImaginary(et,nt){let it=2048;const ot=new Float32Array(it),at=new Float32Array(it);let st=1;if(et==="custom"){if(st=this._partials.length+1,this._partialCount=this._partials.length,it=st,this._partials.length===0)return[ot,at]}else{const lt=/^(sine|triangle|square|sawtooth)(\d+)$/.exec(et);lt?(st=parseInt(lt[2],10)+1,this._partialCount=parseInt(lt[2],10),et=lt[1],st=Math.max(st,2),it=st):this._partialCount=0,this._partials=[]}for(let lt=1;lt>1&1?-1:1):ut=0,this._partials[lt-1]=ut;break;case"custom":ut=this._partials[lt-1];break;default:throw new TypeError("Oscillator: invalid type: "+et)}ut!==0?(ot[lt]=-ut*Math.sin(nt*lt),at[lt]=ut*Math.cos(nt*lt)):(ot[lt]=0,at[lt]=0)}return[ot,at]}_inverseFFT(et,nt,rt){let it=0;const ot=et.length;for(let at=0;at(et+1)/2}),this.input=this._norm,this.output=this._norm}dispose(){return super.dispose(),this._norm.dispose(),this}}class Multiply extends Signal{constructor(){super(Object.assign(optionsFromArguments(Multiply.getDefaults(),arguments,["value"]))),this.name="Multiply",this.override=!1;const et=optionsFromArguments(Multiply.getDefaults(),arguments,["value"]);this._mult=this.input=this.output=new Gain({context:this.context,minValue:et.minValue,maxValue:et.maxValue}),this.factor=this._param=this._mult.gain,this.factor.setValueAtTime(et.value,0)}static getDefaults(){return Object.assign(Signal.getDefaults(),{value:0})}dispose(){return super.dispose(),this._mult.dispose(),this}}class AMOscillator extends Source{constructor(){super(optionsFromArguments(AMOscillator.getDefaults(),arguments,["frequency","type","modulationType"])),this.name="AMOscillator",this._modulationScale=new AudioToGain({context:this.context}),this._modulationNode=new Gain({context:this.context});const et=optionsFromArguments(AMOscillator.getDefaults(),arguments,["frequency","type","modulationType"]);this._carrier=new Oscillator({context:this.context,detune:et.detune,frequency:et.frequency,onstop:()=>this.onstop(this),phase:et.phase,type:et.type}),this.frequency=this._carrier.frequency,this.detune=this._carrier.detune,this._modulator=new Oscillator({context:this.context,phase:et.phase,type:et.modulationType}),this.harmonicity=new Multiply({context:this.context,units:"positive",value:et.harmonicity}),this.frequency.chain(this.harmonicity,this._modulator.frequency),this._modulator.chain(this._modulationScale,this._modulationNode.gain),this._carrier.chain(this._modulationNode,this.output),readOnly(this,["frequency","detune","harmonicity"])}static getDefaults(){return Object.assign(Oscillator.getDefaults(),{harmonicity:1,modulationType:"square"})}_start(et){this._modulator.start(et),this._carrier.start(et)}_stop(et){this._modulator.stop(et),this._carrier.stop(et)}_restart(et){this._modulator.restart(et),this._carrier.restart(et)}get type(){return this._carrier.type}set type(et){this._carrier.type=et}get baseType(){return this._carrier.baseType}set baseType(et){this._carrier.baseType=et}get partialCount(){return this._carrier.partialCount}set partialCount(et){this._carrier.partialCount=et}get modulationType(){return this._modulator.type}set modulationType(et){this._modulator.type=et}get phase(){return this._carrier.phase}set phase(et){this._carrier.phase=et,this._modulator.phase=et}get partials(){return this._carrier.partials}set partials(et){this._carrier.partials=et}asArray(et=1024){return __awaiter(this,void 0,void 0,function*(){return generateWaveform(this,et)})}dispose(){return super.dispose(),this.frequency.dispose(),this.detune.dispose(),this.harmonicity.dispose(),this._carrier.dispose(),this._modulator.dispose(),this._modulationNode.dispose(),this._modulationScale.dispose(),this}}class FMOscillator extends Source{constructor(){super(optionsFromArguments(FMOscillator.getDefaults(),arguments,["frequency","type","modulationType"])),this.name="FMOscillator",this._modulationNode=new Gain({context:this.context,gain:0});const et=optionsFromArguments(FMOscillator.getDefaults(),arguments,["frequency","type","modulationType"]);this._carrier=new Oscillator({context:this.context,detune:et.detune,frequency:0,onstop:()=>this.onstop(this),phase:et.phase,type:et.type}),this.detune=this._carrier.detune,this.frequency=new Signal({context:this.context,units:"frequency",value:et.frequency}),this._modulator=new Oscillator({context:this.context,phase:et.phase,type:et.modulationType}),this.harmonicity=new Multiply({context:this.context,units:"positive",value:et.harmonicity}),this.modulationIndex=new Multiply({context:this.context,units:"positive",value:et.modulationIndex}),this.frequency.connect(this._carrier.frequency),this.frequency.chain(this.harmonicity,this._modulator.frequency),this.frequency.chain(this.modulationIndex,this._modulationNode),this._modulator.connect(this._modulationNode.gain),this._modulationNode.connect(this._carrier.frequency),this._carrier.connect(this.output),this.detune.connect(this._modulator.detune),readOnly(this,["modulationIndex","frequency","detune","harmonicity"])}static getDefaults(){return Object.assign(Oscillator.getDefaults(),{harmonicity:1,modulationIndex:2,modulationType:"square"})}_start(et){this._modulator.start(et),this._carrier.start(et)}_stop(et){this._modulator.stop(et),this._carrier.stop(et)}_restart(et){return this._modulator.restart(et),this._carrier.restart(et),this}get type(){return this._carrier.type}set type(et){this._carrier.type=et}get baseType(){return this._carrier.baseType}set baseType(et){this._carrier.baseType=et}get partialCount(){return this._carrier.partialCount}set partialCount(et){this._carrier.partialCount=et}get modulationType(){return this._modulator.type}set modulationType(et){this._modulator.type=et}get phase(){return this._carrier.phase}set phase(et){this._carrier.phase=et,this._modulator.phase=et}get partials(){return this._carrier.partials}set partials(et){this._carrier.partials=et}asArray(et=1024){return __awaiter(this,void 0,void 0,function*(){return generateWaveform(this,et)})}dispose(){return super.dispose(),this.frequency.dispose(),this.harmonicity.dispose(),this._carrier.dispose(),this._modulator.dispose(),this._modulationNode.dispose(),this.modulationIndex.dispose(),this}}class PulseOscillator extends Source{constructor(){super(optionsFromArguments(PulseOscillator.getDefaults(),arguments,["frequency","width"])),this.name="PulseOscillator",this._widthGate=new Gain({context:this.context,gain:0}),this._thresh=new WaveShaper({context:this.context,mapping:nt=>nt<=0?-1:1});const et=optionsFromArguments(PulseOscillator.getDefaults(),arguments,["frequency","width"]);this.width=new Signal({context:this.context,units:"audioRange",value:et.width}),this._triangle=new Oscillator({context:this.context,detune:et.detune,frequency:et.frequency,onstop:()=>this.onstop(this),phase:et.phase,type:"triangle"}),this.frequency=this._triangle.frequency,this.detune=this._triangle.detune,this._triangle.chain(this._thresh,this.output),this.width.chain(this._widthGate,this._thresh),readOnly(this,["width","frequency","detune"])}static getDefaults(){return Object.assign(Source.getDefaults(),{detune:0,frequency:440,phase:0,type:"pulse",width:.2})}_start(et){et=this.toSeconds(et),this._triangle.start(et),this._widthGate.gain.setValueAtTime(1,et)}_stop(et){et=this.toSeconds(et),this._triangle.stop(et),this._widthGate.gain.cancelScheduledValues(et),this._widthGate.gain.setValueAtTime(0,et)}_restart(et){this._triangle.restart(et),this._widthGate.gain.cancelScheduledValues(et),this._widthGate.gain.setValueAtTime(1,et)}get phase(){return this._triangle.phase}set phase(et){this._triangle.phase=et}get type(){return"pulse"}get baseType(){return"pulse"}get partials(){return[]}get partialCount(){return 0}set carrierType(et){this._triangle.type=et}asArray(et=1024){return __awaiter(this,void 0,void 0,function*(){return generateWaveform(this,et)})}dispose(){return super.dispose(),this._triangle.dispose(),this.width.dispose(),this._widthGate.dispose(),this._thresh.dispose(),this}}class FatOscillator extends Source{constructor(){super(optionsFromArguments(FatOscillator.getDefaults(),arguments,["frequency","type","spread"])),this.name="FatOscillator",this._oscillators=[];const et=optionsFromArguments(FatOscillator.getDefaults(),arguments,["frequency","type","spread"]);this.frequency=new Signal({context:this.context,units:"frequency",value:et.frequency}),this.detune=new Signal({context:this.context,units:"cents",value:et.detune}),this._spread=et.spread,this._type=et.type,this._phase=et.phase,this._partials=et.partials,this._partialCount=et.partialCount,this.count=et.count,readOnly(this,["frequency","detune"])}static getDefaults(){return Object.assign(Oscillator.getDefaults(),{count:3,spread:20,type:"sawtooth"})}_start(et){et=this.toSeconds(et),this._forEach(nt=>nt.start(et))}_stop(et){et=this.toSeconds(et),this._forEach(nt=>nt.stop(et))}_restart(et){this._forEach(nt=>nt.restart(et))}_forEach(et){for(let nt=0;ntnt.type=et)}get spread(){return this._spread}set spread(et){if(this._spread=et,this._oscillators.length>1){const nt=-et/2,rt=et/(this._oscillators.length-1);this._forEach((it,ot)=>it.detune.value=nt+rt*ot)}}get count(){return this._oscillators.length}set count(et){if(assertRange(et,1),this._oscillators.length!==et){this._forEach(nt=>nt.dispose()),this._oscillators=[];for(let nt=0;ntthis.onstop(this):noOp});this.type==="custom"&&(rt.partials=this._partials),this.frequency.connect(rt.frequency),this.detune.connect(rt.detune),rt.detune.overridden=!1,rt.connect(this.output),this._oscillators[nt]=rt}this.spread=this._spread,this.state==="started"&&this._forEach(nt=>nt.start())}}get phase(){return this._phase}set phase(et){this._phase=et,this._forEach((nt,rt)=>nt.phase=this._phase+rt/this.count*360)}get baseType(){return this._oscillators[0].baseType}set baseType(et){this._forEach(nt=>nt.baseType=et),this._type=this._oscillators[0].type}get partials(){return this._oscillators[0].partials}set partials(et){this._partials=et,this._partialCount=this._partials.length,et.length&&(this._type="custom",this._forEach(nt=>nt.partials=et))}get partialCount(){return this._oscillators[0].partialCount}set partialCount(et){this._partialCount=et,this._forEach(nt=>nt.partialCount=et),this._type=this._oscillators[0].type}asArray(et=1024){return __awaiter(this,void 0,void 0,function*(){return generateWaveform(this,et)})}dispose(){return super.dispose(),this.frequency.dispose(),this.detune.dispose(),this._forEach(et=>et.dispose()),this}}class PWMOscillator extends Source{constructor(){super(optionsFromArguments(PWMOscillator.getDefaults(),arguments,["frequency","modulationFrequency"])),this.name="PWMOscillator",this.sourceType="pwm",this._scale=new Multiply({context:this.context,value:2});const et=optionsFromArguments(PWMOscillator.getDefaults(),arguments,["frequency","modulationFrequency"]);this._pulse=new PulseOscillator({context:this.context,frequency:et.modulationFrequency}),this._pulse.carrierType="sine",this.modulationFrequency=this._pulse.frequency,this._modulator=new Oscillator({context:this.context,detune:et.detune,frequency:et.frequency,onstop:()=>this.onstop(this),phase:et.phase}),this.frequency=this._modulator.frequency,this.detune=this._modulator.detune,this._modulator.chain(this._scale,this._pulse.width),this._pulse.connect(this.output),readOnly(this,["modulationFrequency","frequency","detune"])}static getDefaults(){return Object.assign(Source.getDefaults(),{detune:0,frequency:440,modulationFrequency:.4,phase:0,type:"pwm"})}_start(et){et=this.toSeconds(et),this._modulator.start(et),this._pulse.start(et)}_stop(et){et=this.toSeconds(et),this._modulator.stop(et),this._pulse.stop(et)}_restart(et){this._modulator.restart(et),this._pulse.restart(et)}get type(){return"pwm"}get baseType(){return"pwm"}get partials(){return[]}get partialCount(){return 0}get phase(){return this._modulator.phase}set phase(et){this._modulator.phase=et}asArray(et=1024){return __awaiter(this,void 0,void 0,function*(){return generateWaveform(this,et)})}dispose(){return super.dispose(),this._pulse.dispose(),this._scale.dispose(),this._modulator.dispose(),this}}const OmniOscillatorSourceMap={am:AMOscillator,fat:FatOscillator,fm:FMOscillator,oscillator:Oscillator,pulse:PulseOscillator,pwm:PWMOscillator};class OmniOscillator extends Source{constructor(){super(optionsFromArguments(OmniOscillator.getDefaults(),arguments,["frequency","type"])),this.name="OmniOscillator";const et=optionsFromArguments(OmniOscillator.getDefaults(),arguments,["frequency","type"]);this.frequency=new Signal({context:this.context,units:"frequency",value:et.frequency}),this.detune=new Signal({context:this.context,units:"cents",value:et.detune}),readOnly(this,["frequency","detune"]),this.set(et)}static getDefaults(){return Object.assign(Oscillator.getDefaults(),FMOscillator.getDefaults(),AMOscillator.getDefaults(),FatOscillator.getDefaults(),PulseOscillator.getDefaults(),PWMOscillator.getDefaults())}_start(et){this._oscillator.start(et)}_stop(et){this._oscillator.stop(et)}_restart(et){return this._oscillator.restart(et),this}get type(){let et="";return["am","fm","fat"].some(nt=>this._sourceType===nt)&&(et=this._sourceType),et+this._oscillator.type}set type(et){et.substr(0,2)==="fm"?(this._createNewOscillator("fm"),this._oscillator=this._oscillator,this._oscillator.type=et.substr(2)):et.substr(0,2)==="am"?(this._createNewOscillator("am"),this._oscillator=this._oscillator,this._oscillator.type=et.substr(2)):et.substr(0,3)==="fat"?(this._createNewOscillator("fat"),this._oscillator=this._oscillator,this._oscillator.type=et.substr(3)):et==="pwm"?(this._createNewOscillator("pwm"),this._oscillator=this._oscillator):et==="pulse"?this._createNewOscillator("pulse"):(this._createNewOscillator("oscillator"),this._oscillator=this._oscillator,this._oscillator.type=et)}get partials(){return this._oscillator.partials}set partials(et){!this._getOscType(this._oscillator,"pulse")&&!this._getOscType(this._oscillator,"pwm")&&(this._oscillator.partials=et)}get partialCount(){return this._oscillator.partialCount}set partialCount(et){!this._getOscType(this._oscillator,"pulse")&&!this._getOscType(this._oscillator,"pwm")&&(this._oscillator.partialCount=et)}set(et){return Reflect.has(et,"type")&&et.type&&(this.type=et.type),super.set(et),this}_createNewOscillator(et){if(et!==this._sourceType){this._sourceType=et;const nt=OmniOscillatorSourceMap[et],rt=this.now();if(this._oscillator){const it=this._oscillator;it.stop(rt),this.context.setTimeout(()=>it.dispose(),this.blockTime)}this._oscillator=new nt({context:this.context}),this.frequency.connect(this._oscillator.frequency),this.detune.connect(this._oscillator.detune),this._oscillator.connect(this.output),this._oscillator.onstop=()=>this.onstop(this),this.state==="started"&&this._oscillator.start(rt)}}get phase(){return this._oscillator.phase}set phase(et){this._oscillator.phase=et}get sourceType(){return this._sourceType}set sourceType(et){let nt="sine";this._oscillator.type!=="pwm"&&this._oscillator.type!=="pulse"&&(nt=this._oscillator.type),et==="fm"?this.type="fm"+nt:et==="am"?this.type="am"+nt:et==="fat"?this.type="fat"+nt:et==="oscillator"?this.type=nt:et==="pulse"?this.type="pulse":et==="pwm"&&(this.type="pwm")}_getOscType(et,nt){return et instanceof OmniOscillatorSourceMap[nt]}get baseType(){return this._oscillator.baseType}set baseType(et){!this._getOscType(this._oscillator,"pulse")&&!this._getOscType(this._oscillator,"pwm")&&et!=="pulse"&&et!=="pwm"&&(this._oscillator.baseType=et)}get width(){if(this._getOscType(this._oscillator,"pulse"))return this._oscillator.width}get count(){if(this._getOscType(this._oscillator,"fat"))return this._oscillator.count}set count(et){this._getOscType(this._oscillator,"fat")&&isNumber$4(et)&&(this._oscillator.count=et)}get spread(){if(this._getOscType(this._oscillator,"fat"))return this._oscillator.spread}set spread(et){this._getOscType(this._oscillator,"fat")&&isNumber$4(et)&&(this._oscillator.spread=et)}get modulationType(){if(this._getOscType(this._oscillator,"fm")||this._getOscType(this._oscillator,"am"))return this._oscillator.modulationType}set modulationType(et){(this._getOscType(this._oscillator,"fm")||this._getOscType(this._oscillator,"am"))&&isString$2(et)&&(this._oscillator.modulationType=et)}get modulationIndex(){if(this._getOscType(this._oscillator,"fm"))return this._oscillator.modulationIndex}get harmonicity(){if(this._getOscType(this._oscillator,"fm")||this._getOscType(this._oscillator,"am"))return this._oscillator.harmonicity}get modulationFrequency(){if(this._getOscType(this._oscillator,"pwm"))return this._oscillator.modulationFrequency}asArray(et=1024){return __awaiter(this,void 0,void 0,function*(){return generateWaveform(this,et)})}dispose(){return super.dispose(),this.detune.dispose(),this.frequency.dispose(),this._oscillator.dispose(),this}}class Add extends Signal{constructor(){super(Object.assign(optionsFromArguments(Add.getDefaults(),arguments,["value"]))),this.override=!1,this.name="Add",this._sum=new Gain({context:this.context}),this.input=this._sum,this.output=this._sum,this.addend=this._param,connectSeries(this._constantSource,this._sum)}static getDefaults(){return Object.assign(Signal.getDefaults(),{value:0})}dispose(){return super.dispose(),this._sum.dispose(),this}}class Scale extends SignalOperator{constructor(){super(Object.assign(optionsFromArguments(Scale.getDefaults(),arguments,["min","max"]))),this.name="Scale";const et=optionsFromArguments(Scale.getDefaults(),arguments,["min","max"]);this._mult=this.input=new Multiply({context:this.context,value:et.max-et.min}),this._add=this.output=new Add({context:this.context,value:et.min}),this._min=et.min,this._max=et.max,this.input.connect(this.output)}static getDefaults(){return Object.assign(SignalOperator.getDefaults(),{max:1,min:0})}get min(){return this._min}set min(et){this._min=et,this._setRange()}get max(){return this._max}set max(et){this._max=et,this._setRange()}_setRange(){this._add.value=this._min,this._mult.value=this._max-this._min}dispose(){return super.dispose(),this._add.dispose(),this._mult.dispose(),this}}function range$3(tt,et=1/0){const nt=new WeakMap;return function(rt,it){Reflect.defineProperty(rt,it,{configurable:!0,enumerable:!0,get:function(){return nt.get(this)},set:function(ot){assertRange(ot,tt,et),nt.set(this,ot)}})}}function timeRange(tt,et=1/0){const nt=new WeakMap;return function(rt,it){Reflect.defineProperty(rt,it,{configurable:!0,enumerable:!0,get:function(){return nt.get(this)},set:function(ot){assertRange(this.toSeconds(ot),tt,et),nt.set(this,ot)}})}}let Player$1=class x1 extends Source{constructor(){super(optionsFromArguments(x1.getDefaults(),arguments,["url","onload"])),this.name="Player",this._activeSources=new Set;const et=optionsFromArguments(x1.getDefaults(),arguments,["url","onload"]);this._buffer=new ToneAudioBuffer({onload:this._onload.bind(this,et.onload),onerror:et.onerror,reverse:et.reverse,url:et.url}),this.autostart=et.autostart,this._loop=et.loop,this._loopStart=et.loopStart,this._loopEnd=et.loopEnd,this._playbackRate=et.playbackRate,this.fadeIn=et.fadeIn,this.fadeOut=et.fadeOut}static getDefaults(){return Object.assign(Source.getDefaults(),{autostart:!1,fadeIn:0,fadeOut:0,loop:!1,loopEnd:0,loopStart:0,onload:noOp,onerror:noOp,playbackRate:1,reverse:!1})}load(et){return __awaiter(this,void 0,void 0,function*(){return yield this._buffer.load(et),this._onload(),this})}_onload(et=noOp){et(),this.autostart&&this.start()}_onSourceEnd(et){this.onstop(this),this._activeSources.delete(et),this._activeSources.size===0&&!this._synced&&this._state.getValueAtTime(this.now())==="started"&&(this._state.cancel(this.now()),this._state.setStateAtTime("stopped",this.now()))}start(et,nt,rt){return super.start(et,nt,rt),this}_start(et,nt,rt){this._loop?nt=defaultArg(nt,this._loopStart):nt=defaultArg(nt,0);const it=this.toSeconds(nt),ot=rt;rt=defaultArg(rt,Math.max(this._buffer.duration-it,0));let at=this.toSeconds(rt);at=at/this._playbackRate,et=this.toSeconds(et);const st=new ToneBufferSource({url:this._buffer,context:this.context,fadeIn:this.fadeIn,fadeOut:this.fadeOut,loop:this._loop,loopEnd:this._loopEnd,loopStart:this._loopStart,onended:this._onSourceEnd.bind(this),playbackRate:this._playbackRate}).connect(this.output);!this._loop&&!this._synced&&(this._state.cancel(et+at),this._state.setStateAtTime("stopped",et+at,{implicitEnd:!0})),this._activeSources.add(st),this._loop&&isUndef(ot)?st.start(et,it):st.start(et,it,at-this.toSeconds(this.fadeOut))}_stop(et){const nt=this.toSeconds(et);this._activeSources.forEach(rt=>rt.stop(nt))}restart(et,nt,rt){return super.restart(et,nt,rt),this}_restart(et,nt,rt){var it;(it=[...this._activeSources].pop())===null||it===void 0||it.stop(et),this._start(et,nt,rt)}seek(et,nt){const rt=this.toSeconds(nt);if(this._state.getValueAtTime(rt)==="started"){const it=this.toSeconds(et);this._stop(rt),this._start(rt,it)}return this}setLoopPoints(et,nt){return this.loopStart=et,this.loopEnd=nt,this}get loopStart(){return this._loopStart}set loopStart(et){this._loopStart=et,this.buffer.loaded&&assertRange(this.toSeconds(et),0,this.buffer.duration),this._activeSources.forEach(nt=>{nt.loopStart=et})}get loopEnd(){return this._loopEnd}set loopEnd(et){this._loopEnd=et,this.buffer.loaded&&assertRange(this.toSeconds(et),0,this.buffer.duration),this._activeSources.forEach(nt=>{nt.loopEnd=et})}get buffer(){return this._buffer}set buffer(et){this._buffer.set(et)}get loop(){return this._loop}set loop(et){if(this._loop!==et&&(this._loop=et,this._activeSources.forEach(nt=>{nt.loop=et}),et)){const nt=this._state.getNextState("stopped",this.now());nt&&this._state.cancel(nt.time)}}get playbackRate(){return this._playbackRate}set playbackRate(et){this._playbackRate=et;const nt=this.now(),rt=this._state.getNextState("stopped",nt);rt&&rt.implicitEnd&&(this._state.cancel(rt.time),this._activeSources.forEach(it=>it.cancelStop())),this._activeSources.forEach(it=>{it.playbackRate.setValueAtTime(et,nt)})}get reverse(){return this._buffer.reverse}set reverse(et){this._buffer.reverse=et}get loaded(){return this._buffer.loaded}dispose(){return super.dispose(),this._activeSources.forEach(et=>et.dispose()),this._activeSources.clear(),this._buffer.dispose(),this}};__decorate([timeRange(0)],Player$1.prototype,"fadeIn",void 0);__decorate([timeRange(0)],Player$1.prototype,"fadeOut",void 0);class GainToAudio extends SignalOperator{constructor(){super(...arguments),this.name="GainToAudio",this._norm=new WaveShaper({context:this.context,mapping:et=>Math.abs(et)*2-1}),this.input=this._norm,this.output=this._norm}dispose(){return super.dispose(),this._norm.dispose(),this}}class Envelope extends ToneAudioNode{constructor(){super(optionsFromArguments(Envelope.getDefaults(),arguments,["attack","decay","sustain","release"])),this.name="Envelope",this._sig=new Signal({context:this.context,value:0}),this.output=this._sig,this.input=void 0;const et=optionsFromArguments(Envelope.getDefaults(),arguments,["attack","decay","sustain","release"]);this.attack=et.attack,this.decay=et.decay,this.sustain=et.sustain,this.release=et.release,this.attackCurve=et.attackCurve,this.releaseCurve=et.releaseCurve,this.decayCurve=et.decayCurve}static getDefaults(){return Object.assign(ToneAudioNode.getDefaults(),{attack:.01,attackCurve:"linear",decay:.1,decayCurve:"exponential",release:1,releaseCurve:"exponential",sustain:.5})}get value(){return this.getValueAtTime(this.now())}_getCurve(et,nt){if(isString$2(et))return et;{let rt;for(rt in EnvelopeCurves)if(EnvelopeCurves[rt][nt]===et)return rt;return et}}_setCurve(et,nt,rt){if(isString$2(rt)&&Reflect.has(EnvelopeCurves,rt)){const it=EnvelopeCurves[rt];isObject$7(it)?et!=="_decayCurve"&&(this[et]=it[nt]):this[et]=it}else if(isArray$e(rt)&&et!=="_decayCurve")this[et]=rt;else throw new Error("Envelope: invalid curve: "+rt)}get attackCurve(){return this._getCurve(this._attackCurve,"In")}set attackCurve(et){this._setCurve("_attackCurve","In",et)}get releaseCurve(){return this._getCurve(this._releaseCurve,"Out")}set releaseCurve(et){this._setCurve("_releaseCurve","Out",et)}get decayCurve(){return this._getCurve(this._decayCurve,"Out")}set decayCurve(et){this._setCurve("_decayCurve","Out",et)}triggerAttack(et,nt=1){this.log("triggerAttack",et,nt),et=this.toSeconds(et);let it=this.toSeconds(this.attack);const ot=this.toSeconds(this.decay),at=this.getValueAtTime(et);if(at>0){const st=1/it;it=(1-at)/st}if(it0){const rt=this.toSeconds(this.release);rt{let et,nt;const rt=[];for(et=0;et<128;et++)rt[et]=Math.sin(et/(128-1)*(Math.PI/2));const it=[],ot=6.4;for(et=0;et<128-1;et++){nt=et/(128-1);const dt=Math.sin(nt*(Math.PI*2)*ot-Math.PI/2)+1;it[et]=dt/10+nt*.83}it[128-1]=1;const at=[],st=5;for(et=0;et<128;et++)at[et]=Math.ceil(et/(128-1)*st)/st;const lt=[];for(et=0;et<128;et++)nt=et/(128-1),lt[et]=.5*(1-Math.cos(Math.PI*nt));const ct=[];for(et=0;et<128;et++){nt=et/(128-1);const dt=Math.pow(nt,3)*4+.2,pt=Math.cos(dt*Math.PI*2*nt);ct[et]=Math.abs(pt*(1-nt))}function ut(dt){const pt=new Array(dt.length);for(let mt=0;mtthis._original_triggerRelease(nt);const et=optionsFromArguments(Instrument.getDefaults(),arguments);this._volume=this.output=new Volume({context:this.context,volume:et.volume}),this.volume=this._volume.volume,readOnly(this,"volume")}static getDefaults(){return Object.assign(ToneAudioNode.getDefaults(),{volume:0})}sync(){return this._syncState()&&(this._syncMethod("triggerAttack",1),this._syncMethod("triggerRelease",0),this.context.transport.on("stop",this._syncedRelease),this.context.transport.on("pause",this._syncedRelease),this.context.transport.on("loopEnd",this._syncedRelease)),this}_syncState(){let et=!1;return this._synced||(this._synced=!0,et=!0),et}_syncMethod(et,nt){const rt=this["_original_"+et]=this[et];this[et]=(...it)=>{const ot=it[nt],at=this.context.transport.schedule(st=>{it[nt]=st,rt.apply(this,it)},ot);this._scheduledEvents.push(at)}}unsync(){return this._scheduledEvents.forEach(et=>this.context.transport.clear(et)),this._scheduledEvents=[],this._synced&&(this._synced=!1,this.triggerAttack=this._original_triggerAttack,this.triggerRelease=this._original_triggerRelease,this.context.transport.off("stop",this._syncedRelease),this.context.transport.off("pause",this._syncedRelease),this.context.transport.off("loopEnd",this._syncedRelease)),this}triggerAttackRelease(et,nt,rt,it){const ot=this.toSeconds(rt),at=this.toSeconds(nt);return this.triggerAttack(et,ot,it),this.triggerRelease(ot+at),this}dispose(){return super.dispose(),this._volume.dispose(),this.unsync(),this._scheduledEvents=[],this}}class Monophonic extends Instrument{constructor(){super(optionsFromArguments(Monophonic.getDefaults(),arguments));const et=optionsFromArguments(Monophonic.getDefaults(),arguments);this.portamento=et.portamento,this.onsilence=et.onsilence}static getDefaults(){return Object.assign(Instrument.getDefaults(),{detune:0,onsilence:noOp,portamento:0})}triggerAttack(et,nt,rt=1){this.log("triggerAttack",et,nt,rt);const it=this.toSeconds(nt);return this._triggerEnvelopeAttack(it,rt),this.setNote(et,it),this}triggerRelease(et){this.log("triggerRelease",et);const nt=this.toSeconds(et);return this._triggerEnvelopeRelease(nt),this}setNote(et,nt){const rt=this.toSeconds(nt),it=et instanceof FrequencyClass?et.toFrequency():et;if(this.portamento>0&&this.getLevelAtTime(rt)>.05){const ot=this.toSeconds(this.portamento);this.frequency.exponentialRampTo(it,ot,rt)}else this.frequency.setValueAtTime(it,rt);return this}}__decorate([timeRange(0)],Monophonic.prototype,"portamento",void 0);class AmplitudeEnvelope extends Envelope{constructor(){super(optionsFromArguments(AmplitudeEnvelope.getDefaults(),arguments,["attack","decay","sustain","release"])),this.name="AmplitudeEnvelope",this._gainNode=new Gain({context:this.context,gain:0}),this.output=this._gainNode,this.input=this._gainNode,this._sig.connect(this._gainNode.gain),this.output=this._gainNode,this.input=this._gainNode}dispose(){return super.dispose(),this._gainNode.dispose(),this}}class Synth extends Monophonic{constructor(){super(optionsFromArguments(Synth.getDefaults(),arguments)),this.name="Synth";const et=optionsFromArguments(Synth.getDefaults(),arguments);this.oscillator=new OmniOscillator(Object.assign({context:this.context,detune:et.detune,onstop:()=>this.onsilence(this)},et.oscillator)),this.frequency=this.oscillator.frequency,this.detune=this.oscillator.detune,this.envelope=new AmplitudeEnvelope(Object.assign({context:this.context},et.envelope)),this.oscillator.chain(this.envelope,this.output),readOnly(this,["oscillator","frequency","detune","envelope"])}static getDefaults(){return Object.assign(Monophonic.getDefaults(),{envelope:Object.assign(omitFromObject(Envelope.getDefaults(),Object.keys(ToneAudioNode.getDefaults())),{attack:.005,decay:.1,release:1,sustain:.3}),oscillator:Object.assign(omitFromObject(OmniOscillator.getDefaults(),[...Object.keys(Source.getDefaults()),"frequency","detune"]),{type:"triangle"})})}_triggerEnvelopeAttack(et,nt){if(this.envelope.triggerAttack(et,nt),this.oscillator.start(et),this.envelope.sustain===0){const rt=this.toSeconds(this.envelope.attack),it=this.toSeconds(this.envelope.decay);this.oscillator.stop(et+rt+it)}}_triggerEnvelopeRelease(et){this.envelope.triggerRelease(et),this.oscillator.stop(et+this.toSeconds(this.envelope.release))}getLevelAtTime(et){return et=this.toSeconds(et),this.envelope.getValueAtTime(et)}dispose(){return super.dispose(),this.oscillator.dispose(),this.envelope.dispose(),this}}class BiquadFilter extends ToneAudioNode{constructor(){super(optionsFromArguments(BiquadFilter.getDefaults(),arguments,["frequency","type"])),this.name="BiquadFilter";const et=optionsFromArguments(BiquadFilter.getDefaults(),arguments,["frequency","type"]);this._filter=this.context.createBiquadFilter(),this.input=this.output=this._filter,this.Q=new Param({context:this.context,units:"number",value:et.Q,param:this._filter.Q}),this.frequency=new Param({context:this.context,units:"frequency",value:et.frequency,param:this._filter.frequency}),this.detune=new Param({context:this.context,units:"cents",value:et.detune,param:this._filter.detune}),this.gain=new Param({context:this.context,units:"decibels",convert:!1,value:et.gain,param:this._filter.gain}),this.type=et.type}static getDefaults(){return Object.assign(ToneAudioNode.getDefaults(),{Q:1,type:"lowpass",frequency:350,detune:0,gain:0})}get type(){return this._filter.type}set type(et){assert(["lowpass","highpass","bandpass","lowshelf","highshelf","notch","allpass","peaking"].indexOf(et)!==-1,`Invalid filter type: ${et}`),this._filter.type=et}getFrequencyResponse(et=128){const nt=new Float32Array(et);for(let at=0;atrt.type=et)}get rolloff(){return this._rolloff}set rolloff(et){const nt=isNumber$4(et)?et:parseInt(et,10),rt=[-12,-24,-48,-96];let it=rt.indexOf(nt);assert(it!==-1,`rolloff can only be ${rt.join(", ")}`),it+=1,this._rolloff=nt,this.input.disconnect(),this._filters.forEach(ot=>ot.disconnect()),this._filters=new Array(it);for(let ot=0;ot1);return this._filters.forEach(()=>{nt.getFrequencyResponse(et).forEach((ot,at)=>rt[at]*=ot)}),nt.dispose(),rt}dispose(){return super.dispose(),this._filters.forEach(et=>{et.dispose()}),writable(this,["detune","frequency","gain","Q"]),this.frequency.dispose(),this.Q.dispose(),this.detune.dispose(),this.gain.dispose(),this}}class FrequencyEnvelope extends Envelope{constructor(){super(optionsFromArguments(FrequencyEnvelope.getDefaults(),arguments,["attack","decay","sustain","release"])),this.name="FrequencyEnvelope";const et=optionsFromArguments(FrequencyEnvelope.getDefaults(),arguments,["attack","decay","sustain","release"]);this._octaves=et.octaves,this._baseFrequency=this.toFrequency(et.baseFrequency),this._exponent=this.input=new Pow({context:this.context,value:et.exponent}),this._scale=this.output=new Scale({context:this.context,min:this._baseFrequency,max:this._baseFrequency*Math.pow(2,this._octaves)}),this._sig.chain(this._exponent,this._scale)}static getDefaults(){return Object.assign(Envelope.getDefaults(),{baseFrequency:200,exponent:1,octaves:4})}get baseFrequency(){return this._baseFrequency}set baseFrequency(et){const nt=this.toFrequency(et);assertRange(nt,0),this._baseFrequency=nt,this._scale.min=this._baseFrequency,this.octaves=this._octaves}get octaves(){return this._octaves}set octaves(et){this._octaves=et,this._scale.max=this._baseFrequency*Math.pow(2,et)}get exponent(){return this._exponent.value}set exponent(et){this._exponent.value=et}dispose(){return super.dispose(),this._exponent.dispose(),this._scale.dispose(),this}}class MonoSynth extends Monophonic{constructor(){super(optionsFromArguments(MonoSynth.getDefaults(),arguments)),this.name="MonoSynth";const et=optionsFromArguments(MonoSynth.getDefaults(),arguments);this.oscillator=new OmniOscillator(Object.assign(et.oscillator,{context:this.context,detune:et.detune,onstop:()=>this.onsilence(this)})),this.frequency=this.oscillator.frequency,this.detune=this.oscillator.detune,this.filter=new Filter(Object.assign(et.filter,{context:this.context})),this.filterEnvelope=new FrequencyEnvelope(Object.assign(et.filterEnvelope,{context:this.context})),this.envelope=new AmplitudeEnvelope(Object.assign(et.envelope,{context:this.context})),this.oscillator.chain(this.filter,this.envelope,this.output),this.filterEnvelope.connect(this.filter.frequency),readOnly(this,["oscillator","frequency","detune","filter","filterEnvelope","envelope"])}static getDefaults(){return Object.assign(Monophonic.getDefaults(),{envelope:Object.assign(omitFromObject(Envelope.getDefaults(),Object.keys(ToneAudioNode.getDefaults())),{attack:.005,decay:.1,release:1,sustain:.9}),filter:Object.assign(omitFromObject(Filter.getDefaults(),Object.keys(ToneAudioNode.getDefaults())),{Q:1,rolloff:-12,type:"lowpass"}),filterEnvelope:Object.assign(omitFromObject(FrequencyEnvelope.getDefaults(),Object.keys(ToneAudioNode.getDefaults())),{attack:.6,baseFrequency:200,decay:.2,exponent:2,octaves:3,release:2,sustain:.5}),oscillator:Object.assign(omitFromObject(OmniOscillator.getDefaults(),Object.keys(Source.getDefaults())),{type:"sawtooth"})})}_triggerEnvelopeAttack(et,nt=1){if(this.envelope.triggerAttack(et,nt),this.filterEnvelope.triggerAttack(et),this.oscillator.start(et),this.envelope.sustain===0){const rt=this.toSeconds(this.envelope.attack),it=this.toSeconds(this.envelope.decay);this.oscillator.stop(et+rt+it)}}_triggerEnvelopeRelease(et){this.envelope.triggerRelease(et),this.filterEnvelope.triggerRelease(et),this.oscillator.stop(et+this.toSeconds(this.envelope.release))}getLevelAtTime(et){return et=this.toSeconds(et),this.envelope.getValueAtTime(et)}dispose(){return super.dispose(),this.oscillator.dispose(),this.envelope.dispose(),this.filterEnvelope.dispose(),this.filter.dispose(),this}}class MembraneSynth extends Synth{constructor(){super(optionsFromArguments(MembraneSynth.getDefaults(),arguments)),this.name="MembraneSynth",this.portamento=0;const et=optionsFromArguments(MembraneSynth.getDefaults(),arguments);this.pitchDecay=et.pitchDecay,this.octaves=et.octaves,readOnly(this,["oscillator","envelope"])}static getDefaults(){return deepMerge(Monophonic.getDefaults(),Synth.getDefaults(),{envelope:{attack:.001,attackCurve:"exponential",decay:.4,release:1.4,sustain:.01},octaves:10,oscillator:{type:"sine"},pitchDecay:.05})}setNote(et,nt){const rt=this.toSeconds(nt),it=this.toFrequency(et instanceof FrequencyClass?et.toFrequency():et),ot=it*this.octaves;return this.oscillator.frequency.setValueAtTime(ot,rt),this.oscillator.frequency.exponentialRampToValueAtTime(it,rt+this.toSeconds(this.pitchDecay)),this}dispose(){return super.dispose(),this}}__decorate([range$3(0)],MembraneSynth.prototype,"octaves",void 0);__decorate([timeRange(0)],MembraneSynth.prototype,"pitchDecay",void 0);const workletContext=new Set;function addToWorklet(tt){workletContext.add(tt)}function registerProcessor(tt,et){const nt=`registerProcessor("${tt}", ${et})`;workletContext.add(nt)}const toneAudioWorkletProcessor=` - /** - * The base AudioWorkletProcessor for use in Tone.js. Works with the [[ToneAudioWorklet]]. - */ - class ToneAudioWorkletProcessor extends AudioWorkletProcessor { - - constructor(options) { - - super(options); - /** - * If the processor was disposed or not. Keep alive until it's disposed. - */ - this.disposed = false; - /** - * The number of samples in the processing block - */ - this.blockSize = 128; - /** - * the sample rate - */ - this.sampleRate = sampleRate; - - this.port.onmessage = (event) => { - // when it receives a dispose - if (event.data === "dispose") { - this.disposed = true; - } - }; - } - } -`;addToWorklet(toneAudioWorkletProcessor);const singleIOProcess=` - /** - * Abstract class for a single input/output processor. - * has a 'generate' function which processes one sample at a time - */ - class SingleIOProcessor extends ToneAudioWorkletProcessor { - - constructor(options) { - super(Object.assign(options, { - numberOfInputs: 1, - numberOfOutputs: 1 - })); - /** - * Holds the name of the parameter and a single value of that - * parameter at the current sample - * @type { [name: string]: number } - */ - this.params = {} - } - - /** - * Generate an output sample from the input sample and parameters - * @abstract - * @param input number - * @param channel number - * @param parameters { [name: string]: number } - * @returns number - */ - generate(){} - - /** - * Update the private params object with the - * values of the parameters at the given index - * @param parameters { [name: string]: Float32Array }, - * @param index number - */ - updateParams(parameters, index) { - for (const paramName in parameters) { - const param = parameters[paramName]; - if (param.length > 1) { - this.params[paramName] = parameters[paramName][index]; - } else { - this.params[paramName] = parameters[paramName][0]; - } - } - } - - /** - * Process a single frame of the audio - * @param inputs Float32Array[][] - * @param outputs Float32Array[][] - */ - process(inputs, outputs, parameters) { - const input = inputs[0]; - const output = outputs[0]; - // get the parameter values - const channelCount = Math.max(input && input.length || 0, output.length); - for (let sample = 0; sample < this.blockSize; sample++) { - this.updateParams(parameters, sample); - for (let channel = 0; channel < channelCount; channel++) { - const inputSample = input && input.length ? input[channel][sample] : 0; - output[channel][sample] = this.generate(inputSample, channel, this.params); - } - } - return !this.disposed; - } - }; -`;addToWorklet(singleIOProcess);const delayLine=` - /** - * A multichannel buffer for use within an AudioWorkletProcessor as a delay line - */ - class DelayLine { - - constructor(size, channels) { - this.buffer = []; - this.writeHead = [] - this.size = size; + case 'remove': + return rt + } + return rt.push(at), rt + }, nt) + } + function applyNodeChanges(tt, et) { + return applyChanges(tt, et) + } + const createSelectionChange = (tt, et) => ({ id: tt, type: 'select', selected: et }) + function getSelectionChanges(tt, et) { + return tt.reduce((nt, rt) => { + const it = et.includes(rt.id) + return ( + !rt.selected && it + ? ((rt.selected = !0), nt.push(createSelectionChange(rt.id, !0))) + : rt.selected && !it && ((rt.selected = !1), nt.push(createSelectionChange(rt.id, !1))), + nt + ) + }, []) + } + const wrapHandler = (tt, et) => (nt) => { + nt.target === et.current && (tt == null || tt(nt)) + }, + selector$8 = (tt) => ({ + userSelectionActive: tt.userSelectionActive, + elementsSelectable: tt.elementsSelectable, + dragging: tt.paneDragging, + }), + Pane = reactExports.memo( + ({ + isSelecting: tt, + selectionMode: et = SelectionMode.Full, + panOnDrag: nt, + onSelectionStart: rt, + onSelectionEnd: it, + onPaneClick: ot, + onPaneContextMenu: at, + onPaneScroll: st, + onPaneMouseEnter: lt, + onPaneMouseMove: ct, + onPaneMouseLeave: ut, + children: ht, + }) => { + const dt = reactExports.useRef(null), + pt = useStoreApi(), + mt = reactExports.useRef(0), + gt = reactExports.useRef(0), + yt = reactExports.useRef(), + { userSelectionActive: bt, elementsSelectable: vt, dragging: xt } = useStore(selector$8, shallow$1), + kt = () => { + pt.setState({ userSelectionActive: !1, userSelectionRect: null }), (mt.current = 0), (gt.current = 0) + }, + St = (Ct) => { + ot == null || ot(Ct), pt.getState().resetSelectedElements(), pt.setState({ nodesSelectionActive: !1 }) + }, + Tt = (Ct) => { + if (Array.isArray(nt) && nt != null && nt.includes(2)) { + Ct.preventDefault() + return + } + at == null || at(Ct) + }, + At = st ? (Ct) => st(Ct) : void 0, + Et = (Ct) => { + const { resetSelectedElements: wt, domNode: It } = pt.getState() + if ( + ((yt.current = It == null ? void 0 : It.getBoundingClientRect()), + !vt || !tt || Ct.button !== 0 || Ct.target !== dt.current || !yt.current) + ) + return + const { x: Ot, y: Wt } = getEventPosition(Ct, yt.current) + wt(), + pt.setState({ userSelectionRect: { width: 0, height: 0, startX: Ot, startY: Wt, x: Ot, y: Wt } }), + rt == null || rt(Ct) + }, + $t = (Ct) => { + const { + userSelectionRect: wt, + nodeInternals: It, + edges: Ot, + transform: Wt, + onNodesChange: zt, + onEdgesChange: Ft, + nodeOrigin: Nt, + getNodes: Ut, + } = pt.getState() + if (!tt || !yt.current || !wt) return + pt.setState({ userSelectionActive: !0, nodesSelectionActive: !1 }) + const Mt = getEventPosition(Ct, yt.current), + Ht = wt.startX ?? 0, + en = wt.startY ?? 0, + sn = { + ...wt, + x: Mt.x < Ht ? Mt.x : Ht, + y: Mt.y < en ? Mt.y : en, + width: Math.abs(Mt.x - Ht), + height: Math.abs(Mt.y - en), + }, + Kt = Ut(), + rn = getNodesInside(It, sn, Wt, et === SelectionMode.Partial, !0, Nt), + nn = getConnectedEdges(rn, Ot).map((vn) => vn.id), + hn = rn.map((vn) => vn.id) + if (mt.current !== hn.length) { + mt.current = hn.length + const vn = getSelectionChanges(Kt, hn) + vn.length && (zt == null || zt(vn)) + } + if (gt.current !== nn.length) { + gt.current = nn.length + const vn = getSelectionChanges(Ot, nn) + vn.length && (Ft == null || Ft(vn)) + } + pt.setState({ userSelectionRect: sn }) + }, + Dt = (Ct) => { + if (Ct.button !== 0) return + const { userSelectionRect: wt } = pt.getState() + !bt && wt && Ct.target === dt.current && (St == null || St(Ct)), + pt.setState({ nodesSelectionActive: mt.current > 0 }), + kt(), + it == null || it(Ct) + }, + jt = (Ct) => { + bt && (pt.setState({ nodesSelectionActive: mt.current > 0 }), it == null || it(Ct)), kt() + }, + Pt = vt && (tt || bt) + return React$1.createElement( + 'div', + { + className: cc(['react-flow__pane', { dragging: xt, selection: tt }]), + onClick: Pt ? void 0 : wrapHandler(St, dt), + onContextMenu: wrapHandler(Tt, dt), + onWheel: wrapHandler(At, dt), + onMouseEnter: Pt ? void 0 : lt, + onMouseDown: Pt ? Et : void 0, + onMouseMove: Pt ? $t : ct, + onMouseUp: Pt ? Dt : void 0, + onMouseLeave: Pt ? jt : ut, + ref: dt, + style: containerStyle, + }, + ht, + React$1.createElement(UserSelection, null), + ) + }, + ) + Pane.displayName = 'Pane' + function isParentSelected(tt, et) { + if (!tt.parentNode) return !1 + const nt = et.get(tt.parentNode) + return nt ? (nt.selected ? !0 : isParentSelected(nt, et)) : !1 + } + function hasSelector(tt, et, nt) { + let rt = tt + do { + if (rt != null && rt.matches(et)) return !0 + if (rt === nt.current) return !1 + rt = rt.parentElement + } while (rt) + return !1 + } + function getDragItems(tt, et, nt, rt) { + return Array.from(tt.values()) + .filter( + (it) => + (it.selected || it.id === rt) && + (!it.parentNode || !isParentSelected(it, tt)) && + (it.draggable || (et && typeof it.draggable > 'u')), + ) + .map((it) => { + var ot, at + return { + id: it.id, + position: it.position || { x: 0, y: 0 }, + positionAbsolute: it.positionAbsolute || { x: 0, y: 0 }, + distance: { + x: nt.x - (((ot = it.positionAbsolute) == null ? void 0 : ot.x) ?? 0), + y: nt.y - (((at = it.positionAbsolute) == null ? void 0 : at.y) ?? 0), + }, + delta: { x: 0, y: 0 }, + extent: it.extent, + parentNode: it.parentNode, + width: it.width, + height: it.height, + expandParent: it.expandParent, + } + }) + } + function clampNodeExtent(tt, et) { + return !et || et === 'parent' ? et : [et[0], [et[1][0] - (tt.width || 0), et[1][1] - (tt.height || 0)]] + } + function calcNextPosition(tt, et, nt, rt, it = [0, 0], ot) { + const at = clampNodeExtent(tt, tt.extent || rt) + let st = at + if (tt.extent === 'parent' && !tt.expandParent) + if (tt.parentNode && tt.width && tt.height) { + const ut = nt.get(tt.parentNode), + { x: ht, y: dt } = getNodePositionWithOrigin(ut, it).positionAbsolute + st = + ut && isNumeric(ht) && isNumeric(dt) && isNumeric(ut.width) && isNumeric(ut.height) + ? [ + [ht + tt.width * it[0], dt + tt.height * it[1]], + [ht + ut.width - tt.width + tt.width * it[0], dt + ut.height - tt.height + tt.height * it[1]], + ] + : st + } else ot == null || ot('005', errorMessages.error005()), (st = at) + else if (tt.extent && tt.parentNode && tt.extent !== 'parent') { + const ut = nt.get(tt.parentNode), + { x: ht, y: dt } = getNodePositionWithOrigin(ut, it).positionAbsolute + st = [ + [tt.extent[0][0] + ht, tt.extent[0][1] + dt], + [tt.extent[1][0] + ht, tt.extent[1][1] + dt], + ] + } + let lt = { x: 0, y: 0 } + if (tt.parentNode) { + const ut = nt.get(tt.parentNode) + lt = getNodePositionWithOrigin(ut, it).positionAbsolute + } + const ct = st && st !== 'parent' ? clampPosition(et, st) : et + return { position: { x: ct.x - lt.x, y: ct.y - lt.y }, positionAbsolute: ct } + } + function getEventHandlerParams({ nodeId: tt, dragItems: et, nodeInternals: nt }) { + const rt = et.map((it) => ({ ...nt.get(it.id), position: it.position, positionAbsolute: it.positionAbsolute })) + return [tt ? rt.find((it) => it.id === tt) : rt[0], rt] + } + const getHandleBounds = (tt, et, nt, rt) => { + const it = et.querySelectorAll(tt) + if (!it || !it.length) return null + const ot = Array.from(it), + at = et.getBoundingClientRect(), + st = { x: at.width * rt[0], y: at.height * rt[1] } + return ot.map((lt) => { + const ct = lt.getBoundingClientRect() + return { + id: lt.getAttribute('data-handleid'), + position: lt.getAttribute('data-handlepos'), + x: (ct.left - at.left - st.x) / nt, + y: (ct.top - at.top - st.y) / nt, + ...getDimensions(lt), + } + }) + } + function getMouseHandler(tt, et, nt) { + return nt === void 0 + ? nt + : (rt) => { + const it = et().nodeInternals.get(tt) + it && nt(rt, { ...it }) + } + } + function handleNodeClick({ id: tt, store: et, unselect: nt = !1, nodeRef: rt }) { + const { + addSelectedNodes: it, + unselectNodesAndEdges: ot, + multiSelectionActive: at, + nodeInternals: st, + onError: lt, + } = et.getState(), + ct = st.get(tt) + if (!ct) { + lt == null || lt('012', errorMessages.error012(tt)) + return + } + et.setState({ nodesSelectionActive: !1 }), + ct.selected + ? (nt || (ct.selected && at)) && + (ot({ nodes: [ct], edges: [] }), + requestAnimationFrame(() => { + var ut + return (ut = rt == null ? void 0 : rt.current) == null ? void 0 : ut.blur() + })) + : it([tt]) + } + function useGetPointerPosition() { + const tt = useStoreApi() + return reactExports.useCallback(({ sourceEvent: nt }) => { + const { transform: rt, snapGrid: it, snapToGrid: ot } = tt.getState(), + at = nt.touches ? nt.touches[0].clientX : nt.clientX, + st = nt.touches ? nt.touches[0].clientY : nt.clientY, + lt = { x: (at - rt[0]) / rt[2], y: (st - rt[1]) / rt[2] } + return { + xSnapped: ot ? it[0] * Math.round(lt.x / it[0]) : lt.x, + ySnapped: ot ? it[1] * Math.round(lt.y / it[1]) : lt.y, + ...lt, + } + }, []) + } + function wrapSelectionDragFunc(tt) { + return (et, nt, rt) => (tt == null ? void 0 : tt(et, rt)) + } + function useDrag({ + nodeRef: tt, + disabled: et = !1, + noDragClassName: nt, + handleSelector: rt, + nodeId: it, + isSelectable: ot, + selectNodesOnDrag: at, + }) { + const st = useStoreApi(), + [lt, ct] = reactExports.useState(!1), + ut = reactExports.useRef([]), + ht = reactExports.useRef({ x: null, y: null }), + dt = reactExports.useRef(0), + pt = reactExports.useRef(null), + mt = reactExports.useRef({ x: 0, y: 0 }), + gt = reactExports.useRef(null), + yt = reactExports.useRef(!1), + bt = reactExports.useRef(!1), + vt = useGetPointerPosition() + return ( + reactExports.useEffect(() => { + if (tt != null && tt.current) { + const xt = select(tt.current), + kt = ({ x: At, y: Et }) => { + const { + nodeInternals: $t, + onNodeDrag: Dt, + onSelectionDrag: jt, + updateNodePositions: Pt, + nodeExtent: Ct, + snapGrid: wt, + snapToGrid: It, + nodeOrigin: Ot, + onError: Wt, + } = st.getState() + ht.current = { x: At, y: Et } + let zt = !1, + Ft = { x: 0, y: 0, x2: 0, y2: 0 } + if (ut.current.length > 1 && Ct) { + const Ut = getRectOfNodes(ut.current, Ot) + Ft = rectToBox(Ut) + } + if ( + ((ut.current = ut.current.map((Ut) => { + const Mt = { x: At - Ut.distance.x, y: Et - Ut.distance.y } + It && ((Mt.x = wt[0] * Math.round(Mt.x / wt[0])), (Mt.y = wt[1] * Math.round(Mt.y / wt[1]))) + const Ht = [ + [Ct[0][0], Ct[0][1]], + [Ct[1][0], Ct[1][1]], + ] + ut.current.length > 1 && + Ct && + !Ut.extent && + ((Ht[0][0] = Ut.positionAbsolute.x - Ft.x + Ct[0][0]), + (Ht[1][0] = Ut.positionAbsolute.x + (Ut.width ?? 0) - Ft.x2 + Ct[1][0]), + (Ht[0][1] = Ut.positionAbsolute.y - Ft.y + Ct[0][1]), + (Ht[1][1] = Ut.positionAbsolute.y + (Ut.height ?? 0) - Ft.y2 + Ct[1][1])) + const en = calcNextPosition(Ut, Mt, $t, Ht, Ot, Wt) + return ( + (zt = zt || Ut.position.x !== en.position.x || Ut.position.y !== en.position.y), + (Ut.position = en.position), + (Ut.positionAbsolute = en.positionAbsolute), + Ut + ) + })), + !zt) + ) + return + Pt(ut.current, !0, !0), ct(!0) + const Nt = it ? Dt : wrapSelectionDragFunc(jt) + if (Nt && gt.current) { + const [Ut, Mt] = getEventHandlerParams({ nodeId: it, dragItems: ut.current, nodeInternals: $t }) + Nt(gt.current, Ut, Mt) + } + }, + St = () => { + if (!pt.current) return + const [At, Et] = calcAutoPan(mt.current, pt.current) + if (At !== 0 || Et !== 0) { + const { transform: $t, panBy: Dt } = st.getState() + ;(ht.current.x = (ht.current.x ?? 0) - At / $t[2]), + (ht.current.y = (ht.current.y ?? 0) - Et / $t[2]), + Dt({ x: At, y: Et }) && kt(ht.current) + } + dt.current = requestAnimationFrame(St) + }, + Tt = (At) => { + var Ot + const { + nodeInternals: Et, + multiSelectionActive: $t, + nodesDraggable: Dt, + unselectNodesAndEdges: jt, + onNodeDragStart: Pt, + onSelectionDragStart: Ct, + } = st.getState() + bt.current = !0 + const wt = it ? Pt : wrapSelectionDragFunc(Ct) + ;(!at || !ot) && !$t && it && (((Ot = Et.get(it)) != null && Ot.selected) || jt()), + it && ot && at && handleNodeClick({ id: it, store: st, nodeRef: tt }) + const It = vt(At) + if (((ht.current = It), (ut.current = getDragItems(Et, Dt, It, it)), wt && ut.current)) { + const [Wt, zt] = getEventHandlerParams({ nodeId: it, dragItems: ut.current, nodeInternals: Et }) + wt(At.sourceEvent, Wt, zt) + } + } + if (et) xt.on('.drag', null) + else { + const At = drag() + .on('start', (Et) => { + const { domNode: $t, nodeDragThreshold: Dt } = st.getState() + Dt === 0 && Tt(Et) + const jt = vt(Et) + ;(ht.current = jt), + (pt.current = ($t == null ? void 0 : $t.getBoundingClientRect()) || null), + (mt.current = getEventPosition(Et.sourceEvent, pt.current)) + }) + .on('drag', (Et) => { + var Pt, Ct + const $t = vt(Et), + { autoPanOnNodeDrag: Dt, nodeDragThreshold: jt } = st.getState() + if ((!yt.current && bt.current && Dt && ((yt.current = !0), St()), !bt.current)) { + const wt = $t.xSnapped - (((Pt = ht == null ? void 0 : ht.current) == null ? void 0 : Pt.x) ?? 0), + It = $t.ySnapped - (((Ct = ht == null ? void 0 : ht.current) == null ? void 0 : Ct.y) ?? 0) + Math.sqrt(wt * wt + It * It) > jt && Tt(Et) + } + ;(ht.current.x !== $t.xSnapped || ht.current.y !== $t.ySnapped) && + ut.current && + bt.current && + ((gt.current = Et.sourceEvent), (mt.current = getEventPosition(Et.sourceEvent, pt.current)), kt($t)) + }) + .on('end', (Et) => { + if ( + bt.current && + (ct(!1), (yt.current = !1), (bt.current = !1), cancelAnimationFrame(dt.current), ut.current) + ) { + const { + updateNodePositions: $t, + nodeInternals: Dt, + onNodeDragStop: jt, + onSelectionDragStop: Pt, + } = st.getState(), + Ct = it ? jt : wrapSelectionDragFunc(Pt) + if (($t(ut.current, !1, !1), Ct)) { + const [wt, It] = getEventHandlerParams({ nodeId: it, dragItems: ut.current, nodeInternals: Dt }) + Ct(Et.sourceEvent, wt, It) + } + } + }) + .filter((Et) => { + const $t = Et.target + return !Et.button && (!nt || !hasSelector($t, `.${nt}`, tt)) && (!rt || hasSelector($t, rt, tt)) + }) + return ( + xt.call(At), + () => { + xt.on('.drag', null) + } + ) + } + } + }, [tt, et, nt, rt, ot, st, it, at, vt]), + lt + ) + } + function useUpdateNodePositions() { + const tt = useStoreApi() + return reactExports.useCallback((nt) => { + const { + nodeInternals: rt, + nodeExtent: it, + updateNodePositions: ot, + getNodes: at, + snapToGrid: st, + snapGrid: lt, + onError: ct, + nodesDraggable: ut, + } = tt.getState(), + ht = at().filter((vt) => vt.selected && (vt.draggable || (ut && typeof vt.draggable > 'u'))), + dt = st ? lt[0] : 5, + pt = st ? lt[1] : 5, + mt = nt.isShiftPressed ? 4 : 1, + gt = nt.x * dt * mt, + yt = nt.y * pt * mt, + bt = ht.map((vt) => { + if (vt.positionAbsolute) { + const xt = { x: vt.positionAbsolute.x + gt, y: vt.positionAbsolute.y + yt } + st && ((xt.x = lt[0] * Math.round(xt.x / lt[0])), (xt.y = lt[1] * Math.round(xt.y / lt[1]))) + const { positionAbsolute: kt, position: St } = calcNextPosition(vt, xt, rt, it, void 0, ct) + ;(vt.position = St), (vt.positionAbsolute = kt) + } + return vt + }) + ot(bt, !0, !1) + }, []) + } + const arrowKeyDiffs = { + ArrowUp: { x: 0, y: -1 }, + ArrowDown: { x: 0, y: 1 }, + ArrowLeft: { x: -1, y: 0 }, + ArrowRight: { x: 1, y: 0 }, + } + var wrapNode = (tt) => { + const et = ({ + id: nt, + type: rt, + data: it, + xPos: ot, + yPos: at, + xPosOrigin: st, + yPosOrigin: lt, + selected: ct, + onClick: ut, + onMouseEnter: ht, + onMouseMove: dt, + onMouseLeave: pt, + onContextMenu: mt, + onDoubleClick: gt, + style: yt, + className: bt, + isDraggable: vt, + isSelectable: xt, + isConnectable: kt, + isFocusable: St, + selectNodesOnDrag: Tt, + sourcePosition: At, + targetPosition: Et, + hidden: $t, + resizeObserver: Dt, + dragHandle: jt, + zIndex: Pt, + isParent: Ct, + noDragClassName: wt, + noPanClassName: It, + initialized: Ot, + disableKeyboardA11y: Wt, + ariaLabel: zt, + rfId: Ft, + }) => { + const Nt = useStoreApi(), + Ut = reactExports.useRef(null), + Mt = reactExports.useRef(At), + Ht = reactExports.useRef(Et), + en = reactExports.useRef(rt), + sn = xt || vt || ut || ht || dt || pt, + Kt = useUpdateNodePositions(), + rn = getMouseHandler(nt, Nt.getState, ht), + nn = getMouseHandler(nt, Nt.getState, dt), + hn = getMouseHandler(nt, Nt.getState, pt), + vn = getMouseHandler(nt, Nt.getState, mt), + an = getMouseHandler(nt, Nt.getState, gt), + Qt = ($n) => { + const { nodeDragThreshold: Nn } = Nt.getState() + if ((xt && (!Tt || !vt || Nn > 0) && handleNodeClick({ id: nt, store: Nt, nodeRef: Ut }), ut)) { + const Tn = Nt.getState().nodeInternals.get(nt) + Tn && ut($n, { ...Tn }) + } + }, + _n = ($n) => { + if (!isInputDOMNode($n)) + if (elementSelectionKeys.includes($n.key) && xt) { + const Nn = $n.key === 'Escape' + handleNodeClick({ id: nt, store: Nt, unselect: Nn, nodeRef: Ut }) + } else + !Wt && + vt && + ct && + Object.prototype.hasOwnProperty.call(arrowKeyDiffs, $n.key) && + (Nt.setState({ + ariaLiveMessage: `Moved selected node ${$n.key + .replace('Arrow', '') + .toLowerCase()}. New position, x: ${~~ot}, y: ${~~at}`, + }), + Kt({ x: arrowKeyDiffs[$n.key].x, y: arrowKeyDiffs[$n.key].y, isShiftPressed: $n.shiftKey })) + } + reactExports.useEffect(() => { + if (Ut.current && !$t) { + const $n = Ut.current + return Dt == null || Dt.observe($n), () => (Dt == null ? void 0 : Dt.unobserve($n)) + } + }, [$t]), + reactExports.useEffect(() => { + const $n = en.current !== rt, + Nn = Mt.current !== At, + Tn = Ht.current !== Et + Ut.current && + ($n || Nn || Tn) && + ($n && (en.current = rt), + Nn && (Mt.current = At), + Tn && (Ht.current = Et), + Nt.getState().updateNodeDimensions([{ id: nt, nodeElement: Ut.current, forceUpdate: !0 }])) + }, [nt, rt, At, Et]) + const Pn = useDrag({ + nodeRef: Ut, + disabled: $t || !vt, + noDragClassName: wt, + handleSelector: jt, + nodeId: nt, + isSelectable: xt, + selectNodesOnDrag: Tt, + }) + return $t + ? null + : React$1.createElement( + 'div', + { + className: cc([ + 'react-flow__node', + `react-flow__node-${rt}`, + { [It]: vt }, + bt, + { selected: ct, selectable: xt, parent: Ct, dragging: Pn }, + ]), + ref: Ut, + style: { + zIndex: Pt, + transform: `translate(${st}px,${lt}px)`, + pointerEvents: sn ? 'all' : 'none', + visibility: Ot ? 'visible' : 'hidden', + ...yt, + }, + 'data-id': nt, + 'data-testid': `rf__node-${nt}`, + onMouseEnter: rn, + onMouseMove: nn, + onMouseLeave: hn, + onContextMenu: vn, + onClick: Qt, + onDoubleClick: an, + onKeyDown: St ? _n : void 0, + tabIndex: St ? 0 : void 0, + role: St ? 'button' : void 0, + 'aria-describedby': Wt ? void 0 : `${ARIA_NODE_DESC_KEY}-${Ft}`, + 'aria-label': zt, + }, + React$1.createElement( + Provider, + { value: nt }, + React$1.createElement(tt, { + id: nt, + data: it, + type: rt, + xPos: ot, + yPos: at, + selected: ct, + isConnectable: kt, + sourcePosition: At, + targetPosition: Et, + dragging: Pn, + dragHandle: jt, + zIndex: Pt, + }), + ), + ) + } + return (et.displayName = 'NodeWrapper'), reactExports.memo(et) + } + const selector$7 = (tt) => { + const et = tt.getNodes().filter((nt) => nt.selected) + return { + ...getRectOfNodes(et, tt.nodeOrigin), + transformString: `translate(${tt.transform[0]}px,${tt.transform[1]}px) scale(${tt.transform[2]})`, + userSelectionActive: tt.userSelectionActive, + } + } + function NodesSelection({ onSelectionContextMenu: tt, noPanClassName: et, disableKeyboardA11y: nt }) { + const rt = useStoreApi(), + { + width: it, + height: ot, + x: at, + y: st, + transformString: lt, + userSelectionActive: ct, + } = useStore(selector$7, shallow$1), + ut = useUpdateNodePositions(), + ht = reactExports.useRef(null) + if ( + (reactExports.useEffect(() => { + var mt + nt || (mt = ht.current) == null || mt.focus({ preventScroll: !0 }) + }, [nt]), + useDrag({ nodeRef: ht }), + ct || !it || !ot) + ) + return null + const dt = tt + ? (mt) => { + const gt = rt + .getState() + .getNodes() + .filter((yt) => yt.selected) + tt(mt, gt) + } + : void 0, + pt = (mt) => { + Object.prototype.hasOwnProperty.call(arrowKeyDiffs, mt.key) && + ut({ x: arrowKeyDiffs[mt.key].x, y: arrowKeyDiffs[mt.key].y, isShiftPressed: mt.shiftKey }) + } + return React$1.createElement( + 'div', + { className: cc(['react-flow__nodesselection', 'react-flow__container', et]), style: { transform: lt } }, + React$1.createElement('div', { + ref: ht, + className: 'react-flow__nodesselection-rect', + onContextMenu: dt, + tabIndex: nt ? void 0 : -1, + onKeyDown: nt ? void 0 : pt, + style: { width: it, height: ot, top: st, left: at }, + }), + ) + } + var NodesSelection$1 = reactExports.memo(NodesSelection) + const selector$6 = (tt) => tt.nodesSelectionActive, + FlowRenderer = ({ + children: tt, + onPaneClick: et, + onPaneMouseEnter: nt, + onPaneMouseMove: rt, + onPaneMouseLeave: it, + onPaneContextMenu: ot, + onPaneScroll: at, + deleteKeyCode: st, + onMove: lt, + onMoveStart: ct, + onMoveEnd: ut, + selectionKeyCode: ht, + selectionOnDrag: dt, + selectionMode: pt, + onSelectionStart: mt, + onSelectionEnd: gt, + multiSelectionKeyCode: yt, + panActivationKeyCode: bt, + zoomActivationKeyCode: vt, + elementsSelectable: xt, + zoomOnScroll: kt, + zoomOnPinch: St, + panOnScroll: Tt, + panOnScrollSpeed: At, + panOnScrollMode: Et, + zoomOnDoubleClick: $t, + panOnDrag: Dt, + defaultViewport: jt, + translateExtent: Pt, + minZoom: Ct, + maxZoom: wt, + preventScrolling: It, + onSelectionContextMenu: Ot, + noWheelClassName: Wt, + noPanClassName: zt, + disableKeyboardA11y: Ft, + }) => { + const Nt = useStore(selector$6), + Ut = useKeyPress(ht), + Ht = useKeyPress(bt) || Dt, + en = Ut || (dt && Ht !== !0) + return ( + useGlobalKeyHandler({ deleteKeyCode: st, multiSelectionKeyCode: yt }), + React$1.createElement( + ZoomPane, + { + onMove: lt, + onMoveStart: ct, + onMoveEnd: ut, + onPaneContextMenu: ot, + elementsSelectable: xt, + zoomOnScroll: kt, + zoomOnPinch: St, + panOnScroll: Tt, + panOnScrollSpeed: At, + panOnScrollMode: Et, + zoomOnDoubleClick: $t, + panOnDrag: !Ut && Ht, + defaultViewport: jt, + translateExtent: Pt, + minZoom: Ct, + maxZoom: wt, + zoomActivationKeyCode: vt, + preventScrolling: It, + noWheelClassName: Wt, + noPanClassName: zt, + }, + React$1.createElement( + Pane, + { + onSelectionStart: mt, + onSelectionEnd: gt, + onPaneClick: et, + onPaneMouseEnter: nt, + onPaneMouseMove: rt, + onPaneMouseLeave: it, + onPaneContextMenu: ot, + onPaneScroll: at, + panOnDrag: Ht, + isSelecting: !!en, + selectionMode: pt, + }, + tt, + Nt && + React$1.createElement(NodesSelection$1, { + onSelectionContextMenu: Ot, + noPanClassName: zt, + disableKeyboardA11y: Ft, + }), + ), + ) + ) + } + FlowRenderer.displayName = 'FlowRenderer' + var FlowRenderer$1 = reactExports.memo(FlowRenderer) + function useVisibleNodes(tt) { + return useStore( + reactExports.useCallback( + (nt) => + tt + ? getNodesInside(nt.nodeInternals, { x: 0, y: 0, width: nt.width, height: nt.height }, nt.transform, !0) + : nt.getNodes(), + [tt], + ), + ) + } + function createNodeTypes(tt) { + const et = { + input: wrapNode(tt.input || InputNode$1), + default: wrapNode(tt.default || DefaultNode$1), + output: wrapNode(tt.output || OutputNode$1), + group: wrapNode(tt.group || GroupNode), + }, + nt = {}, + rt = Object.keys(tt) + .filter((it) => !['input', 'default', 'output', 'group'].includes(it)) + .reduce((it, ot) => ((it[ot] = wrapNode(tt[ot] || DefaultNode$1)), it), nt) + return { ...et, ...rt } + } + const getPositionWithOrigin = ({ x: tt, y: et, width: nt, height: rt, origin: it }) => + !nt || !rt + ? { x: tt, y: et } + : it[0] < 0 || it[1] < 0 || it[0] > 1 || it[1] > 1 + ? { x: tt, y: et } + : { x: tt - nt * it[0], y: et - rt * it[1] }, + selector$5 = (tt) => ({ + nodesDraggable: tt.nodesDraggable, + nodesConnectable: tt.nodesConnectable, + nodesFocusable: tt.nodesFocusable, + elementsSelectable: tt.elementsSelectable, + updateNodeDimensions: tt.updateNodeDimensions, + onError: tt.onError, + }), + NodeRenderer = (tt) => { + const { + nodesDraggable: et, + nodesConnectable: nt, + nodesFocusable: rt, + elementsSelectable: it, + updateNodeDimensions: ot, + onError: at, + } = useStore(selector$5, shallow$1), + st = useVisibleNodes(tt.onlyRenderVisibleElements), + lt = reactExports.useRef(), + ct = reactExports.useMemo(() => { + if (typeof ResizeObserver > 'u') return null + const ut = new ResizeObserver((ht) => { + const dt = ht.map((pt) => ({ + id: pt.target.getAttribute('data-id'), + nodeElement: pt.target, + forceUpdate: !0, + })) + ot(dt) + }) + return (lt.current = ut), ut + }, []) + return ( + reactExports.useEffect( + () => () => { + var ut + ;(ut = lt == null ? void 0 : lt.current) == null || ut.disconnect() + }, + [], + ), + React$1.createElement( + 'div', + { className: 'react-flow__nodes', style: containerStyle }, + st.map((ut) => { + var St, Tt + let ht = ut.type || 'default' + tt.nodeTypes[ht] || (at == null || at('003', errorMessages.error003(ht)), (ht = 'default')) + const dt = tt.nodeTypes[ht] || tt.nodeTypes.default, + pt = !!(ut.draggable || (et && typeof ut.draggable > 'u')), + mt = !!(ut.selectable || (it && typeof ut.selectable > 'u')), + gt = !!(ut.connectable || (nt && typeof ut.connectable > 'u')), + yt = !!(ut.focusable || (rt && typeof ut.focusable > 'u')), + bt = tt.nodeExtent ? clampPosition(ut.positionAbsolute, tt.nodeExtent) : ut.positionAbsolute, + vt = (bt == null ? void 0 : bt.x) ?? 0, + xt = (bt == null ? void 0 : bt.y) ?? 0, + kt = getPositionWithOrigin({ + x: vt, + y: xt, + width: ut.width ?? 0, + height: ut.height ?? 0, + origin: tt.nodeOrigin, + }) + return React$1.createElement(dt, { + key: ut.id, + id: ut.id, + className: ut.className, + style: ut.style, + type: ht, + data: ut.data, + sourcePosition: ut.sourcePosition || Position.Bottom, + targetPosition: ut.targetPosition || Position.Top, + hidden: ut.hidden, + xPos: vt, + yPos: xt, + xPosOrigin: kt.x, + yPosOrigin: kt.y, + selectNodesOnDrag: tt.selectNodesOnDrag, + onClick: tt.onNodeClick, + onMouseEnter: tt.onNodeMouseEnter, + onMouseMove: tt.onNodeMouseMove, + onMouseLeave: tt.onNodeMouseLeave, + onContextMenu: tt.onNodeContextMenu, + onDoubleClick: tt.onNodeDoubleClick, + selected: !!ut.selected, + isDraggable: pt, + isSelectable: mt, + isConnectable: gt, + isFocusable: yt, + resizeObserver: ct, + dragHandle: ut.dragHandle, + zIndex: ((St = ut[internalsSymbol]) == null ? void 0 : St.z) ?? 0, + isParent: !!((Tt = ut[internalsSymbol]) != null && Tt.isParent), + noDragClassName: tt.noDragClassName, + noPanClassName: tt.noPanClassName, + initialized: !!ut.width && !!ut.height, + rfId: tt.rfId, + disableKeyboardA11y: tt.disableKeyboardA11y, + ariaLabel: ut.ariaLabel, + }) + }), + ) + ) + } + NodeRenderer.displayName = 'NodeRenderer' + var NodeRenderer$1 = reactExports.memo(NodeRenderer) + const shiftX = (tt, et, nt) => (nt === Position.Left ? tt - et : nt === Position.Right ? tt + et : tt), + shiftY = (tt, et, nt) => (nt === Position.Top ? tt - et : nt === Position.Bottom ? tt + et : tt), + EdgeUpdaterClassName = 'react-flow__edgeupdater', + EdgeAnchor = ({ + position: tt, + centerX: et, + centerY: nt, + radius: rt = 10, + onMouseDown: it, + onMouseEnter: ot, + onMouseOut: at, + type: st, + }) => + React$1.createElement('circle', { + onMouseDown: it, + onMouseEnter: ot, + onMouseOut: at, + className: cc([EdgeUpdaterClassName, `${EdgeUpdaterClassName}-${st}`]), + cx: shiftX(et, rt, tt), + cy: shiftY(nt, rt, tt), + r: rt, + stroke: 'transparent', + fill: 'transparent', + }), + alwaysValidConnection = () => !0 + var wrapEdge = (tt) => { + const et = ({ + id: nt, + className: rt, + type: it, + data: ot, + onClick: at, + onEdgeDoubleClick: st, + selected: lt, + animated: ct, + label: ut, + labelStyle: ht, + labelShowBg: dt, + labelBgStyle: pt, + labelBgPadding: mt, + labelBgBorderRadius: gt, + style: yt, + source: bt, + target: vt, + sourceX: xt, + sourceY: kt, + targetX: St, + targetY: Tt, + sourcePosition: At, + targetPosition: Et, + elementsSelectable: $t, + hidden: Dt, + sourceHandleId: jt, + targetHandleId: Pt, + onContextMenu: Ct, + onMouseEnter: wt, + onMouseMove: It, + onMouseLeave: Ot, + edgeUpdaterRadius: Wt, + onEdgeUpdate: zt, + onEdgeUpdateStart: Ft, + onEdgeUpdateEnd: Nt, + markerEnd: Ut, + markerStart: Mt, + rfId: Ht, + ariaLabel: en, + isFocusable: sn, + isUpdatable: Kt, + pathOptions: rn, + interactionWidth: nn, + }) => { + const hn = reactExports.useRef(null), + [vn, an] = reactExports.useState(!1), + [Qt, _n] = reactExports.useState(!1), + Pn = useStoreApi(), + $n = reactExports.useMemo(() => `url(#${getMarkerId(Mt, Ht)})`, [Mt, Ht]), + Nn = reactExports.useMemo(() => `url(#${getMarkerId(Ut, Ht)})`, [Ut, Ht]) + if (Dt) return null + const Tn = (Sn) => { + var qn + const { + edges: Rn, + addSelectedEdges: jn, + unselectNodesAndEdges: On, + multiSelectionActive: Zn, + } = Pn.getState(), + Vn = Rn.find((zn) => zn.id === nt) + Vn && + ($t && + (Pn.setState({ nodesSelectionActive: !1 }), + Vn.selected && Zn ? (On({ nodes: [], edges: [Vn] }), (qn = hn.current) == null || qn.blur()) : jn([nt])), + at && at(Sn, Vn)) + }, + cn = getMouseHandler$1(nt, Pn.getState, st), + mn = getMouseHandler$1(nt, Pn.getState, Ct), + In = getMouseHandler$1(nt, Pn.getState, wt), + An = getMouseHandler$1(nt, Pn.getState, It), + wn = getMouseHandler$1(nt, Pn.getState, Ot), + fn = (Sn, Rn) => { + if (Sn.button !== 0) return + const { edges: jn, isValidConnection: On } = Pn.getState(), + Zn = Rn ? vt : bt, + Vn = (Rn ? Pt : jt) || null, + qn = Rn ? 'target' : 'source', + zn = On || alwaysValidConnection, + Jn = Rn, + Hn = jn.find((xr) => xr.id === nt) + _n(!0), Ft == null || Ft(Sn, Hn, qn) + const pr = (xr) => { + _n(!1), Nt == null || Nt(xr, Hn, qn) + } + handlePointerDown({ + event: Sn, + handleId: Vn, + nodeId: Zn, + onConnect: (xr) => (zt == null ? void 0 : zt(Hn, xr)), + isTarget: Jn, + getState: Pn.getState, + setState: Pn.setState, + isValidConnection: zn, + edgeUpdaterType: qn, + onEdgeUpdateEnd: pr, + }) + }, + pn = (Sn) => fn(Sn, !0), + kn = (Sn) => fn(Sn, !1), + Dn = () => an(!0), + un = () => an(!1), + Zt = !$t && !at, + Xt = (Sn) => { + var Rn + if (elementSelectionKeys.includes(Sn.key) && $t) { + const { unselectNodesAndEdges: jn, addSelectedEdges: On, edges: Zn } = Pn.getState() + Sn.key === 'Escape' + ? ((Rn = hn.current) == null || Rn.blur(), jn({ edges: [Zn.find((qn) => qn.id === nt)] })) + : On([nt]) + } + } + return React$1.createElement( + 'g', + { + className: cc([ + 'react-flow__edge', + `react-flow__edge-${it}`, + rt, + { selected: lt, animated: ct, inactive: Zt, updating: vn }, + ]), + onClick: Tn, + onDoubleClick: cn, + onContextMenu: mn, + onMouseEnter: In, + onMouseMove: An, + onMouseLeave: wn, + onKeyDown: sn ? Xt : void 0, + tabIndex: sn ? 0 : void 0, + role: sn ? 'button' : 'img', + 'data-testid': `rf__edge-${nt}`, + 'aria-label': en === null ? void 0 : en || `Edge from ${bt} to ${vt}`, + 'aria-describedby': sn ? `${ARIA_EDGE_DESC_KEY}-${Ht}` : void 0, + ref: hn, + }, + !Qt && + React$1.createElement(tt, { + id: nt, + source: bt, + target: vt, + selected: lt, + animated: ct, + label: ut, + labelStyle: ht, + labelShowBg: dt, + labelBgStyle: pt, + labelBgPadding: mt, + labelBgBorderRadius: gt, + data: ot, + style: yt, + sourceX: xt, + sourceY: kt, + targetX: St, + targetY: Tt, + sourcePosition: At, + targetPosition: Et, + sourceHandleId: jt, + targetHandleId: Pt, + markerStart: $n, + markerEnd: Nn, + pathOptions: rn, + interactionWidth: nn, + }), + Kt && + React$1.createElement( + React$1.Fragment, + null, + (Kt === 'source' || Kt === !0) && + React$1.createElement(EdgeAnchor, { + position: At, + centerX: xt, + centerY: kt, + radius: Wt, + onMouseDown: pn, + onMouseEnter: Dn, + onMouseOut: un, + type: 'source', + }), + (Kt === 'target' || Kt === !0) && + React$1.createElement(EdgeAnchor, { + position: Et, + centerX: St, + centerY: Tt, + radius: Wt, + onMouseDown: kn, + onMouseEnter: Dn, + onMouseOut: un, + type: 'target', + }), + ), + ) + } + return (et.displayName = 'EdgeWrapper'), reactExports.memo(et) + } + function createEdgeTypes(tt) { + const et = { + default: wrapEdge(tt.default || BezierEdge), + straight: wrapEdge(tt.bezier || StraightEdge), + step: wrapEdge(tt.step || StepEdge), + smoothstep: wrapEdge(tt.step || SmoothStepEdge), + simplebezier: wrapEdge(tt.simplebezier || SimpleBezierEdge), + }, + nt = {}, + rt = Object.keys(tt) + .filter((it) => !['default', 'bezier'].includes(it)) + .reduce((it, ot) => ((it[ot] = wrapEdge(tt[ot] || BezierEdge)), it), nt) + return { ...et, ...rt } + } + function getHandlePosition(tt, et, nt = null) { + const rt = ((nt == null ? void 0 : nt.x) || 0) + et.x, + it = ((nt == null ? void 0 : nt.y) || 0) + et.y, + ot = (nt == null ? void 0 : nt.width) || et.width, + at = (nt == null ? void 0 : nt.height) || et.height + switch (tt) { + case Position.Top: + return { x: rt + ot / 2, y: it } + case Position.Right: + return { x: rt + ot, y: it + at / 2 } + case Position.Bottom: + return { x: rt + ot / 2, y: it + at } + case Position.Left: + return { x: rt, y: it + at / 2 } + } + } + function getHandle(tt, et) { + return tt ? (tt.length === 1 || !et ? tt[0] : (et && tt.find((nt) => nt.id === et)) || null) : null + } + const getEdgePositions = (tt, et, nt, rt, it, ot) => { + const at = getHandlePosition(nt, tt, et), + st = getHandlePosition(ot, rt, it) + return { sourceX: at.x, sourceY: at.y, targetX: st.x, targetY: st.y } + } + function isEdgeVisible({ + sourcePos: tt, + targetPos: et, + sourceWidth: nt, + sourceHeight: rt, + targetWidth: it, + targetHeight: ot, + width: at, + height: st, + transform: lt, + }) { + const ct = { + x: Math.min(tt.x, et.x), + y: Math.min(tt.y, et.y), + x2: Math.max(tt.x + nt, et.x + it), + y2: Math.max(tt.y + rt, et.y + ot), + } + ct.x === ct.x2 && (ct.x2 += 1), ct.y === ct.y2 && (ct.y2 += 1) + const ut = rectToBox({ x: (0 - lt[0]) / lt[2], y: (0 - lt[1]) / lt[2], width: at / lt[2], height: st / lt[2] }), + ht = Math.max(0, Math.min(ut.x2, ct.x2) - Math.max(ut.x, ct.x)), + dt = Math.max(0, Math.min(ut.y2, ct.y2) - Math.max(ut.y, ct.y)) + return Math.ceil(ht * dt) > 0 + } + function getNodeData(tt) { + var rt, it, ot, at, st + const et = ((rt = tt == null ? void 0 : tt[internalsSymbol]) == null ? void 0 : rt.handleBounds) || null, + nt = + et && + (tt == null ? void 0 : tt.width) && + (tt == null ? void 0 : tt.height) && + typeof ((it = tt == null ? void 0 : tt.positionAbsolute) == null ? void 0 : it.x) < 'u' && + typeof ((ot = tt == null ? void 0 : tt.positionAbsolute) == null ? void 0 : ot.y) < 'u' + return [ + { + x: ((at = tt == null ? void 0 : tt.positionAbsolute) == null ? void 0 : at.x) || 0, + y: ((st = tt == null ? void 0 : tt.positionAbsolute) == null ? void 0 : st.y) || 0, + width: (tt == null ? void 0 : tt.width) || 0, + height: (tt == null ? void 0 : tt.height) || 0, + }, + et, + !!nt, + ] + } + const defaultEdgeTree = [{ level: 0, isMaxLevel: !0, edges: [] }] + function groupEdgesByZLevel(tt, et, nt = !1) { + let rt = -1 + const it = tt.reduce((at, st) => { + var ut, ht + const lt = isNumeric(st.zIndex) + let ct = lt ? st.zIndex : 0 + if (nt) { + const dt = et.get(st.target), + pt = et.get(st.source), + mt = st.selected || (dt == null ? void 0 : dt.selected) || (pt == null ? void 0 : pt.selected), + gt = Math.max( + ((ut = pt == null ? void 0 : pt[internalsSymbol]) == null ? void 0 : ut.z) || 0, + ((ht = dt == null ? void 0 : dt[internalsSymbol]) == null ? void 0 : ht.z) || 0, + 1e3, + ) + ct = (lt ? st.zIndex : 0) + (mt ? gt : 0) + } + return at[ct] ? at[ct].push(st) : (at[ct] = [st]), (rt = ct > rt ? ct : rt), at + }, {}), + ot = Object.entries(it).map(([at, st]) => { + const lt = +at + return { edges: st, level: lt, isMaxLevel: lt === rt } + }) + return ot.length === 0 ? defaultEdgeTree : ot + } + function useVisibleEdges(tt, et, nt) { + const rt = useStore( + reactExports.useCallback( + (it) => + tt + ? it.edges.filter((ot) => { + const at = et.get(ot.source), + st = et.get(ot.target) + return ( + (at == null ? void 0 : at.width) && + (at == null ? void 0 : at.height) && + (st == null ? void 0 : st.width) && + (st == null ? void 0 : st.height) && + isEdgeVisible({ + sourcePos: at.positionAbsolute || { x: 0, y: 0 }, + targetPos: st.positionAbsolute || { x: 0, y: 0 }, + sourceWidth: at.width, + sourceHeight: at.height, + targetWidth: st.width, + targetHeight: st.height, + width: it.width, + height: it.height, + transform: it.transform, + }) + ) + }) + : it.edges, + [tt, et], + ), + ) + return groupEdgesByZLevel(rt, et, nt) + } + const ArrowSymbol = ({ color: tt = 'none', strokeWidth: et = 1 }) => + React$1.createElement('polyline', { + style: { stroke: tt, strokeWidth: et }, + strokeLinecap: 'round', + strokeLinejoin: 'round', + fill: 'none', + points: '-5,-4 0,0 -5,4', + }), + ArrowClosedSymbol = ({ color: tt = 'none', strokeWidth: et = 1 }) => + React$1.createElement('polyline', { + style: { stroke: tt, fill: tt, strokeWidth: et }, + strokeLinecap: 'round', + strokeLinejoin: 'round', + points: '-5,-4 0,0 -5,4 -5,-4', + }), + MarkerSymbols = { [MarkerType.Arrow]: ArrowSymbol, [MarkerType.ArrowClosed]: ArrowClosedSymbol } + function useMarkerSymbol(tt) { + const et = useStoreApi() + return reactExports.useMemo(() => { + var it, ot + return Object.prototype.hasOwnProperty.call(MarkerSymbols, tt) + ? MarkerSymbols[tt] + : ((ot = (it = et.getState()).onError) == null || ot.call(it, '009', errorMessages.error009(tt)), null) + }, [tt]) + } + const Marker = ({ + id: tt, + type: et, + color: nt, + width: rt = 12.5, + height: it = 12.5, + markerUnits: ot = 'strokeWidth', + strokeWidth: at, + orient: st = 'auto-start-reverse', + }) => { + const lt = useMarkerSymbol(et) + return lt + ? React$1.createElement( + 'marker', + { + className: 'react-flow__arrowhead', + id: tt, + markerWidth: `${rt}`, + markerHeight: `${it}`, + viewBox: '-10 -10 20 20', + markerUnits: ot, + orient: st, + refX: '0', + refY: '0', + }, + React$1.createElement(lt, { color: nt, strokeWidth: at }), + ) + : null + }, + markerSelector = + ({ defaultColor: tt, rfId: et }) => + (nt) => { + const rt = [] + return nt.edges + .reduce( + (it, ot) => ( + [ot.markerStart, ot.markerEnd].forEach((at) => { + if (at && typeof at == 'object') { + const st = getMarkerId(at, et) + rt.includes(st) || (it.push({ id: st, color: at.color || tt, ...at }), rt.push(st)) + } + }), + it + ), + [], + ) + .sort((it, ot) => it.id.localeCompare(ot.id)) + }, + MarkerDefinitions = ({ defaultColor: tt, rfId: et }) => { + const nt = useStore( + reactExports.useCallback(markerSelector({ defaultColor: tt, rfId: et }), [tt, et]), + (rt, it) => !(rt.length !== it.length || rt.some((ot, at) => ot.id !== it[at].id)), + ) + return React$1.createElement( + 'defs', + null, + nt.map((rt) => + React$1.createElement(Marker, { + id: rt.id, + key: rt.id, + type: rt.type, + color: rt.color, + width: rt.width, + height: rt.height, + markerUnits: rt.markerUnits, + strokeWidth: rt.strokeWidth, + orient: rt.orient, + }), + ), + ) + } + MarkerDefinitions.displayName = 'MarkerDefinitions' + var MarkerDefinitions$1 = reactExports.memo(MarkerDefinitions) + const selector$4 = (tt) => ({ + nodesConnectable: tt.nodesConnectable, + edgesFocusable: tt.edgesFocusable, + edgesUpdatable: tt.edgesUpdatable, + elementsSelectable: tt.elementsSelectable, + width: tt.width, + height: tt.height, + connectionMode: tt.connectionMode, + nodeInternals: tt.nodeInternals, + onError: tt.onError, + }), + EdgeRenderer = ({ + defaultMarkerColor: tt, + onlyRenderVisibleElements: et, + elevateEdgesOnSelect: nt, + rfId: rt, + edgeTypes: it, + noPanClassName: ot, + onEdgeUpdate: at, + onEdgeContextMenu: st, + onEdgeMouseEnter: lt, + onEdgeMouseMove: ct, + onEdgeMouseLeave: ut, + onEdgeClick: ht, + edgeUpdaterRadius: dt, + onEdgeDoubleClick: pt, + onEdgeUpdateStart: mt, + onEdgeUpdateEnd: gt, + children: yt, + }) => { + const { + edgesFocusable: bt, + edgesUpdatable: vt, + elementsSelectable: xt, + width: kt, + height: St, + connectionMode: Tt, + nodeInternals: At, + onError: Et, + } = useStore(selector$4, shallow$1), + $t = useVisibleEdges(et, At, nt) + return kt + ? React$1.createElement( + React$1.Fragment, + null, + $t.map(({ level: Dt, edges: jt, isMaxLevel: Pt }) => + React$1.createElement( + 'svg', + { + key: Dt, + style: { zIndex: Dt }, + width: kt, + height: St, + className: 'react-flow__edges react-flow__container', + }, + Pt && React$1.createElement(MarkerDefinitions$1, { defaultColor: tt, rfId: rt }), + React$1.createElement( + 'g', + null, + jt.map((Ct) => { + const [wt, It, Ot] = getNodeData(At.get(Ct.source)), + [Wt, zt, Ft] = getNodeData(At.get(Ct.target)) + if (!Ot || !Ft) return null + let Nt = Ct.type || 'default' + it[Nt] || (Et == null || Et('011', errorMessages.error011(Nt)), (Nt = 'default')) + const Ut = it[Nt] || it.default, + Mt = Tt === ConnectionMode.Strict ? zt.target : (zt.target ?? []).concat(zt.source ?? []), + Ht = getHandle(It.source, Ct.sourceHandle), + en = getHandle(Mt, Ct.targetHandle), + sn = (Ht == null ? void 0 : Ht.position) || Position.Bottom, + Kt = (en == null ? void 0 : en.position) || Position.Top, + rn = !!(Ct.focusable || (bt && typeof Ct.focusable > 'u')), + nn = typeof at < 'u' && (Ct.updatable || (vt && typeof Ct.updatable > 'u')) + if (!Ht || !en) return Et == null || Et('008', errorMessages.error008(Ht, Ct)), null + const { + sourceX: hn, + sourceY: vn, + targetX: an, + targetY: Qt, + } = getEdgePositions(wt, Ht, sn, Wt, en, Kt) + return React$1.createElement(Ut, { + key: Ct.id, + id: Ct.id, + className: cc([Ct.className, ot]), + type: Nt, + data: Ct.data, + selected: !!Ct.selected, + animated: !!Ct.animated, + hidden: !!Ct.hidden, + label: Ct.label, + labelStyle: Ct.labelStyle, + labelShowBg: Ct.labelShowBg, + labelBgStyle: Ct.labelBgStyle, + labelBgPadding: Ct.labelBgPadding, + labelBgBorderRadius: Ct.labelBgBorderRadius, + style: Ct.style, + source: Ct.source, + target: Ct.target, + sourceHandleId: Ct.sourceHandle, + targetHandleId: Ct.targetHandle, + markerEnd: Ct.markerEnd, + markerStart: Ct.markerStart, + sourceX: hn, + sourceY: vn, + targetX: an, + targetY: Qt, + sourcePosition: sn, + targetPosition: Kt, + elementsSelectable: xt, + onEdgeUpdate: at, + onContextMenu: st, + onMouseEnter: lt, + onMouseMove: ct, + onMouseLeave: ut, + onClick: ht, + edgeUpdaterRadius: dt, + onEdgeDoubleClick: pt, + onEdgeUpdateStart: mt, + onEdgeUpdateEnd: gt, + rfId: rt, + ariaLabel: Ct.ariaLabel, + isFocusable: rn, + isUpdatable: nn, + pathOptions: 'pathOptions' in Ct ? Ct.pathOptions : void 0, + interactionWidth: Ct.interactionWidth, + }) + }), + ), + ), + ), + yt, + ) + : null + } + EdgeRenderer.displayName = 'EdgeRenderer' + var EdgeRenderer$1 = reactExports.memo(EdgeRenderer) + const selector$3 = (tt) => `translate(${tt.transform[0]}px,${tt.transform[1]}px) scale(${tt.transform[2]})` + function Viewport({ children: tt }) { + const et = useStore(selector$3) + return React$1.createElement( + 'div', + { className: 'react-flow__viewport react-flow__container', style: { transform: et } }, + tt, + ) + } + function useOnInitHandler(tt) { + const et = useReactFlow(), + nt = reactExports.useRef(!1) + reactExports.useEffect(() => { + !nt.current && et.viewportInitialized && tt && (setTimeout(() => tt(et), 1), (nt.current = !0)) + }, [tt, et.viewportInitialized]) + } + const oppositePosition = { + [Position.Left]: Position.Right, + [Position.Right]: Position.Left, + [Position.Top]: Position.Bottom, + [Position.Bottom]: Position.Top, + }, + ConnectionLine = ({ + nodeId: tt, + handleType: et, + style: nt, + type: rt = ConnectionLineType.Bezier, + CustomComponent: it, + connectionStatus: ot, + }) => { + var Tt, At, Et + const { + fromNode: at, + handleId: st, + toX: lt, + toY: ct, + connectionMode: ut, + } = useStore( + reactExports.useCallback( + ($t) => ({ + fromNode: $t.nodeInternals.get(tt), + handleId: $t.connectionHandleId, + toX: ($t.connectionPosition.x - $t.transform[0]) / $t.transform[2], + toY: ($t.connectionPosition.y - $t.transform[1]) / $t.transform[2], + connectionMode: $t.connectionMode, + }), + [tt], + ), + shallow$1, + ), + ht = (Tt = at == null ? void 0 : at[internalsSymbol]) == null ? void 0 : Tt.handleBounds + let dt = ht == null ? void 0 : ht[et] + if ( + (ut === ConnectionMode.Loose && (dt = dt || (ht == null ? void 0 : ht[et === 'source' ? 'target' : 'source'])), + !at || !dt) + ) + return null + const pt = st ? dt.find(($t) => $t.id === st) : dt[0], + mt = pt ? pt.x + pt.width / 2 : (at.width ?? 0) / 2, + gt = pt ? pt.y + pt.height / 2 : at.height ?? 0, + yt = (((At = at.positionAbsolute) == null ? void 0 : At.x) ?? 0) + mt, + bt = (((Et = at.positionAbsolute) == null ? void 0 : Et.y) ?? 0) + gt, + vt = pt == null ? void 0 : pt.position, + xt = vt ? oppositePosition[vt] : null + if (!vt || !xt) return null + if (it) + return React$1.createElement(it, { + connectionLineType: rt, + connectionLineStyle: nt, + fromNode: at, + fromHandle: pt, + fromX: yt, + fromY: bt, + toX: lt, + toY: ct, + fromPosition: vt, + toPosition: xt, + connectionStatus: ot, + }) + let kt = '' + const St = { sourceX: yt, sourceY: bt, sourcePosition: vt, targetX: lt, targetY: ct, targetPosition: xt } + return ( + rt === ConnectionLineType.Bezier + ? ([kt] = getBezierPath(St)) + : rt === ConnectionLineType.Step + ? ([kt] = getSmoothStepPath({ ...St, borderRadius: 0 })) + : rt === ConnectionLineType.SmoothStep + ? ([kt] = getSmoothStepPath(St)) + : rt === ConnectionLineType.SimpleBezier + ? ([kt] = getSimpleBezierPath(St)) + : (kt = `M${yt},${bt} ${lt},${ct}`), + React$1.createElement('path', { d: kt, fill: 'none', className: 'react-flow__connection-path', style: nt }) + ) + } + ConnectionLine.displayName = 'ConnectionLine' + const selector$2 = (tt) => ({ + nodeId: tt.connectionNodeId, + handleType: tt.connectionHandleType, + nodesConnectable: tt.nodesConnectable, + connectionStatus: tt.connectionStatus, + width: tt.width, + height: tt.height, + }) + function ConnectionLineWrapper({ containerStyle: tt, style: et, type: nt, component: rt }) { + const { + nodeId: it, + handleType: ot, + nodesConnectable: at, + width: st, + height: lt, + connectionStatus: ct, + } = useStore(selector$2, shallow$1) + return !(it && ot && st && at) + ? null + : React$1.createElement( + 'svg', + { + style: tt, + width: st, + height: lt, + className: 'react-flow__edges react-flow__connectionline react-flow__container', + }, + React$1.createElement( + 'g', + { className: cc(['react-flow__connection', ct]) }, + React$1.createElement(ConnectionLine, { + nodeId: it, + handleType: ot, + style: et, + type: nt, + CustomComponent: rt, + connectionStatus: ct, + }), + ), + ) + } + function useNodeOrEdgeTypes(tt, et) { + return reactExports.useRef(null), useStoreApi(), reactExports.useMemo(() => et(tt), [tt]) + } + const GraphView = ({ + nodeTypes: tt, + edgeTypes: et, + onMove: nt, + onMoveStart: rt, + onMoveEnd: it, + onInit: ot, + onNodeClick: at, + onEdgeClick: st, + onNodeDoubleClick: lt, + onEdgeDoubleClick: ct, + onNodeMouseEnter: ut, + onNodeMouseMove: ht, + onNodeMouseLeave: dt, + onNodeContextMenu: pt, + onSelectionContextMenu: mt, + onSelectionStart: gt, + onSelectionEnd: yt, + connectionLineType: bt, + connectionLineStyle: vt, + connectionLineComponent: xt, + connectionLineContainerStyle: kt, + selectionKeyCode: St, + selectionOnDrag: Tt, + selectionMode: At, + multiSelectionKeyCode: Et, + panActivationKeyCode: $t, + zoomActivationKeyCode: Dt, + deleteKeyCode: jt, + onlyRenderVisibleElements: Pt, + elementsSelectable: Ct, + selectNodesOnDrag: wt, + defaultViewport: It, + translateExtent: Ot, + minZoom: Wt, + maxZoom: zt, + preventScrolling: Ft, + defaultMarkerColor: Nt, + zoomOnScroll: Ut, + zoomOnPinch: Mt, + panOnScroll: Ht, + panOnScrollSpeed: en, + panOnScrollMode: sn, + zoomOnDoubleClick: Kt, + panOnDrag: rn, + onPaneClick: nn, + onPaneMouseEnter: hn, + onPaneMouseMove: vn, + onPaneMouseLeave: an, + onPaneScroll: Qt, + onPaneContextMenu: _n, + onEdgeUpdate: Pn, + onEdgeContextMenu: $n, + onEdgeMouseEnter: Nn, + onEdgeMouseMove: Tn, + onEdgeMouseLeave: cn, + edgeUpdaterRadius: mn, + onEdgeUpdateStart: In, + onEdgeUpdateEnd: An, + noDragClassName: wn, + noWheelClassName: fn, + noPanClassName: pn, + elevateEdgesOnSelect: kn, + disableKeyboardA11y: Dn, + nodeOrigin: un, + nodeExtent: Zt, + rfId: Xt, + }) => { + const Sn = useNodeOrEdgeTypes(tt, createNodeTypes), + Rn = useNodeOrEdgeTypes(et, createEdgeTypes) + return ( + useOnInitHandler(ot), + React$1.createElement( + FlowRenderer$1, + { + onPaneClick: nn, + onPaneMouseEnter: hn, + onPaneMouseMove: vn, + onPaneMouseLeave: an, + onPaneContextMenu: _n, + onPaneScroll: Qt, + deleteKeyCode: jt, + selectionKeyCode: St, + selectionOnDrag: Tt, + selectionMode: At, + onSelectionStart: gt, + onSelectionEnd: yt, + multiSelectionKeyCode: Et, + panActivationKeyCode: $t, + zoomActivationKeyCode: Dt, + elementsSelectable: Ct, + onMove: nt, + onMoveStart: rt, + onMoveEnd: it, + zoomOnScroll: Ut, + zoomOnPinch: Mt, + zoomOnDoubleClick: Kt, + panOnScroll: Ht, + panOnScrollSpeed: en, + panOnScrollMode: sn, + panOnDrag: rn, + defaultViewport: It, + translateExtent: Ot, + minZoom: Wt, + maxZoom: zt, + onSelectionContextMenu: mt, + preventScrolling: Ft, + noDragClassName: wn, + noWheelClassName: fn, + noPanClassName: pn, + disableKeyboardA11y: Dn, + }, + React$1.createElement( + Viewport, + null, + React$1.createElement( + EdgeRenderer$1, + { + edgeTypes: Rn, + onEdgeClick: st, + onEdgeDoubleClick: ct, + onEdgeUpdate: Pn, + onlyRenderVisibleElements: Pt, + onEdgeContextMenu: $n, + onEdgeMouseEnter: Nn, + onEdgeMouseMove: Tn, + onEdgeMouseLeave: cn, + onEdgeUpdateStart: In, + onEdgeUpdateEnd: An, + edgeUpdaterRadius: mn, + defaultMarkerColor: Nt, + noPanClassName: pn, + elevateEdgesOnSelect: !!kn, + disableKeyboardA11y: Dn, + rfId: Xt, + }, + React$1.createElement(ConnectionLineWrapper, { style: vt, type: bt, component: xt, containerStyle: kt }), + ), + React$1.createElement('div', { className: 'react-flow__edgelabel-renderer' }), + React$1.createElement(NodeRenderer$1, { + nodeTypes: Sn, + onNodeClick: at, + onNodeDoubleClick: lt, + onNodeMouseEnter: ut, + onNodeMouseMove: ht, + onNodeMouseLeave: dt, + onNodeContextMenu: pt, + selectNodesOnDrag: wt, + onlyRenderVisibleElements: Pt, + noPanClassName: pn, + noDragClassName: wn, + disableKeyboardA11y: Dn, + nodeOrigin: un, + nodeExtent: Zt, + rfId: Xt, + }), + ), + ) + ) + } + GraphView.displayName = 'GraphView' + var GraphView$1 = reactExports.memo(GraphView) + const infiniteExtent = [ + [Number.NEGATIVE_INFINITY, Number.NEGATIVE_INFINITY], + [Number.POSITIVE_INFINITY, Number.POSITIVE_INFINITY], + ], + initialState = { + rfId: '1', + width: 0, + height: 0, + transform: [0, 0, 1], + nodeInternals: new Map(), + edges: [], + onNodesChange: null, + onEdgesChange: null, + hasDefaultNodes: !1, + hasDefaultEdges: !1, + d3Zoom: null, + d3Selection: null, + d3ZoomHandler: void 0, + minZoom: 0.5, + maxZoom: 2, + translateExtent: infiniteExtent, + nodeExtent: infiniteExtent, + nodesSelectionActive: !1, + userSelectionActive: !1, + userSelectionRect: null, + connectionNodeId: null, + connectionHandleId: null, + connectionHandleType: 'source', + connectionPosition: { x: 0, y: 0 }, + connectionStatus: null, + connectionMode: ConnectionMode.Strict, + domNode: null, + paneDragging: !1, + noPanClassName: 'nopan', + nodeOrigin: [0, 0], + nodeDragThreshold: 0, + snapGrid: [15, 15], + snapToGrid: !1, + nodesDraggable: !0, + nodesConnectable: !0, + nodesFocusable: !0, + edgesFocusable: !0, + edgesUpdatable: !0, + elementsSelectable: !0, + elevateNodesOnSelect: !0, + fitViewOnInit: !1, + fitViewOnInitDone: !1, + fitViewOnInitOptions: void 0, + multiSelectionActive: !1, + connectionStartHandle: null, + connectionEndHandle: null, + connectionClickStartHandle: null, + connectOnClick: !0, + ariaLiveMessage: '', + autoPanOnConnect: !0, + autoPanOnNodeDrag: !0, + connectionRadius: 20, + onError: devWarn, + isValidConnection: void 0, + }, + createRFStore = () => + createWithEqualityFn( + (tt, et) => ({ + ...initialState, + setNodes: (nt) => { + const { nodeInternals: rt, nodeOrigin: it, elevateNodesOnSelect: ot } = et() + tt({ nodeInternals: createNodeInternals(nt, rt, it, ot) }) + }, + getNodes: () => Array.from(et().nodeInternals.values()), + setEdges: (nt) => { + const { defaultEdgeOptions: rt = {} } = et() + tt({ edges: nt.map((it) => ({ ...rt, ...it })) }) + }, + setDefaultNodesAndEdges: (nt, rt) => { + const it = typeof nt < 'u', + ot = typeof rt < 'u', + at = it ? createNodeInternals(nt, new Map(), et().nodeOrigin, et().elevateNodesOnSelect) : new Map() + tt({ nodeInternals: at, edges: ot ? rt : [], hasDefaultNodes: it, hasDefaultEdges: ot }) + }, + updateNodeDimensions: (nt) => { + const { + onNodesChange: rt, + nodeInternals: it, + fitViewOnInit: ot, + fitViewOnInitDone: at, + fitViewOnInitOptions: st, + domNode: lt, + nodeOrigin: ct, + } = et(), + ut = lt == null ? void 0 : lt.querySelector('.react-flow__viewport') + if (!ut) return + const ht = window.getComputedStyle(ut), + { m22: dt } = new window.DOMMatrixReadOnly(ht.transform), + pt = nt.reduce((gt, yt) => { + const bt = it.get(yt.id) + if (bt) { + const vt = getDimensions(yt.nodeElement) + !!(vt.width && vt.height && (bt.width !== vt.width || bt.height !== vt.height || yt.forceUpdate)) && + (it.set(bt.id, { + ...bt, + [internalsSymbol]: { + ...bt[internalsSymbol], + handleBounds: { + source: getHandleBounds('.source', yt.nodeElement, dt, ct), + target: getHandleBounds('.target', yt.nodeElement, dt, ct), + }, + }, + ...vt, + }), + gt.push({ id: bt.id, type: 'dimensions', dimensions: vt })) + } + return gt + }, []) + updateAbsoluteNodePositions(it, ct) + const mt = at || (ot && !at && fitView(et, { initial: !0, ...st })) + tt({ nodeInternals: new Map(it), fitViewOnInitDone: mt }), + (pt == null ? void 0 : pt.length) > 0 && (rt == null || rt(pt)) + }, + updateNodePositions: (nt, rt = !0, it = !1) => { + const { triggerNodeChanges: ot } = et(), + at = nt.map((st) => { + const lt = { id: st.id, type: 'position', dragging: it } + return rt && ((lt.positionAbsolute = st.positionAbsolute), (lt.position = st.position)), lt + }) + ot(at) + }, + triggerNodeChanges: (nt) => { + const { + onNodesChange: rt, + nodeInternals: it, + hasDefaultNodes: ot, + nodeOrigin: at, + getNodes: st, + elevateNodesOnSelect: lt, + } = et() + if (nt != null && nt.length) { + if (ot) { + const ct = applyNodeChanges(nt, st()), + ut = createNodeInternals(ct, it, at, lt) + tt({ nodeInternals: ut }) + } + rt == null || rt(nt) + } + }, + addSelectedNodes: (nt) => { + const { multiSelectionActive: rt, edges: it, getNodes: ot } = et() + let at, + st = null + rt + ? (at = nt.map((lt) => createSelectionChange(lt, !0))) + : ((at = getSelectionChanges(ot(), nt)), (st = getSelectionChanges(it, []))), + updateNodesAndEdgesSelections({ changedNodes: at, changedEdges: st, get: et, set: tt }) + }, + addSelectedEdges: (nt) => { + const { multiSelectionActive: rt, edges: it, getNodes: ot } = et() + let at, + st = null + rt + ? (at = nt.map((lt) => createSelectionChange(lt, !0))) + : ((at = getSelectionChanges(it, nt)), (st = getSelectionChanges(ot(), []))), + updateNodesAndEdgesSelections({ changedNodes: st, changedEdges: at, get: et, set: tt }) + }, + unselectNodesAndEdges: ({ nodes: nt, edges: rt } = {}) => { + const { edges: it, getNodes: ot } = et(), + at = nt || ot(), + st = rt || it, + lt = at.map((ut) => ((ut.selected = !1), createSelectionChange(ut.id, !1))), + ct = st.map((ut) => createSelectionChange(ut.id, !1)) + updateNodesAndEdgesSelections({ changedNodes: lt, changedEdges: ct, get: et, set: tt }) + }, + setMinZoom: (nt) => { + const { d3Zoom: rt, maxZoom: it } = et() + rt == null || rt.scaleExtent([nt, it]), tt({ minZoom: nt }) + }, + setMaxZoom: (nt) => { + const { d3Zoom: rt, minZoom: it } = et() + rt == null || rt.scaleExtent([it, nt]), tt({ maxZoom: nt }) + }, + setTranslateExtent: (nt) => { + var rt + ;(rt = et().d3Zoom) == null || rt.translateExtent(nt), tt({ translateExtent: nt }) + }, + resetSelectedElements: () => { + const { edges: nt, getNodes: rt } = et(), + ot = rt() + .filter((st) => st.selected) + .map((st) => createSelectionChange(st.id, !1)), + at = nt.filter((st) => st.selected).map((st) => createSelectionChange(st.id, !1)) + updateNodesAndEdgesSelections({ changedNodes: ot, changedEdges: at, get: et, set: tt }) + }, + setNodeExtent: (nt) => { + const { nodeInternals: rt } = et() + rt.forEach((it) => { + it.positionAbsolute = clampPosition(it.position, nt) + }), + tt({ nodeExtent: nt, nodeInternals: new Map(rt) }) + }, + panBy: (nt) => { + const { transform: rt, width: it, height: ot, d3Zoom: at, d3Selection: st, translateExtent: lt } = et() + if (!at || !st || (!nt.x && !nt.y)) return !1 + const ct = identity.translate(rt[0] + nt.x, rt[1] + nt.y).scale(rt[2]), + ut = [ + [0, 0], + [it, ot], + ], + ht = at == null ? void 0 : at.constrain()(ct, ut, lt) + return at.transform(st, ht), rt[0] !== ht.x || rt[1] !== ht.y || rt[2] !== ht.k + }, + cancelConnection: () => + tt({ + connectionNodeId: initialState.connectionNodeId, + connectionHandleId: initialState.connectionHandleId, + connectionHandleType: initialState.connectionHandleType, + connectionStatus: initialState.connectionStatus, + connectionStartHandle: initialState.connectionStartHandle, + connectionEndHandle: initialState.connectionEndHandle, + }), + reset: () => tt({ ...initialState }), + }), + Object.is, + ), + ReactFlowProvider = ({ children: tt }) => { + const et = reactExports.useRef(null) + return et.current || (et.current = createRFStore()), React$1.createElement(Provider$1, { value: et.current }, tt) + } + ReactFlowProvider.displayName = 'ReactFlowProvider' + const Wrapper$e = ({ children: tt }) => + reactExports.useContext(StoreContext) + ? React$1.createElement(React$1.Fragment, null, tt) + : React$1.createElement(ReactFlowProvider, null, tt) + Wrapper$e.displayName = 'ReactFlowWrapper' + const defaultNodeTypes = { input: InputNode$1, default: DefaultNode$1, output: OutputNode$1, group: GroupNode }, + defaultEdgeTypes = { + default: BezierEdge, + straight: StraightEdge, + step: StepEdge, + smoothstep: SmoothStepEdge, + simplebezier: SimpleBezierEdge, + }, + initNodeOrigin = [0, 0], + initSnapGrid = [15, 15], + initDefaultViewport = { x: 0, y: 0, zoom: 1 }, + wrapperStyle = { width: '100%', height: '100%', overflow: 'hidden', position: 'relative', zIndex: 0 }, + ReactFlow = reactExports.forwardRef( + ( + { + nodes: tt, + edges: et, + defaultNodes: nt, + defaultEdges: rt, + className: it, + nodeTypes: ot = defaultNodeTypes, + edgeTypes: at = defaultEdgeTypes, + onNodeClick: st, + onEdgeClick: lt, + onInit: ct, + onMove: ut, + onMoveStart: ht, + onMoveEnd: dt, + onConnect: pt, + onConnectStart: mt, + onConnectEnd: gt, + onClickConnectStart: yt, + onClickConnectEnd: bt, + onNodeMouseEnter: vt, + onNodeMouseMove: xt, + onNodeMouseLeave: kt, + onNodeContextMenu: St, + onNodeDoubleClick: Tt, + onNodeDragStart: At, + onNodeDrag: Et, + onNodeDragStop: $t, + onNodesDelete: Dt, + onEdgesDelete: jt, + onSelectionChange: Pt, + onSelectionDragStart: Ct, + onSelectionDrag: wt, + onSelectionDragStop: It, + onSelectionContextMenu: Ot, + onSelectionStart: Wt, + onSelectionEnd: zt, + connectionMode: Ft = ConnectionMode.Strict, + connectionLineType: Nt = ConnectionLineType.Bezier, + connectionLineStyle: Ut, + connectionLineComponent: Mt, + connectionLineContainerStyle: Ht, + deleteKeyCode: en = 'Backspace', + selectionKeyCode: sn = 'Shift', + selectionOnDrag: Kt = !1, + selectionMode: rn = SelectionMode.Full, + panActivationKeyCode: nn = 'Space', + multiSelectionKeyCode: hn = isMacOs() ? 'Meta' : 'Control', + zoomActivationKeyCode: vn = isMacOs() ? 'Meta' : 'Control', + snapToGrid: an = !1, + snapGrid: Qt = initSnapGrid, + onlyRenderVisibleElements: _n = !1, + selectNodesOnDrag: Pn = !0, + nodesDraggable: $n, + nodesConnectable: Nn, + nodesFocusable: Tn, + nodeOrigin: cn = initNodeOrigin, + edgesFocusable: mn, + edgesUpdatable: In, + elementsSelectable: An, + defaultViewport: wn = initDefaultViewport, + minZoom: fn = 0.5, + maxZoom: pn = 2, + translateExtent: kn = infiniteExtent, + preventScrolling: Dn = !0, + nodeExtent: un, + defaultMarkerColor: Zt = '#b1b1b7', + zoomOnScroll: Xt = !0, + zoomOnPinch: Sn = !0, + panOnScroll: Rn = !1, + panOnScrollSpeed: jn = 0.5, + panOnScrollMode: On = PanOnScrollMode.Free, + zoomOnDoubleClick: Zn = !0, + panOnDrag: Vn = !0, + onPaneClick: qn, + onPaneMouseEnter: zn, + onPaneMouseMove: Jn, + onPaneMouseLeave: Hn, + onPaneScroll: pr, + onPaneContextMenu: fr, + children: xr, + onEdgeUpdate: io, + onEdgeContextMenu: Tr, + onEdgeDoubleClick: Ar, + onEdgeMouseEnter: qr, + onEdgeMouseMove: jr, + onEdgeMouseLeave: Fr, + onEdgeUpdateStart: ao, + onEdgeUpdateEnd: Yr, + edgeUpdaterRadius: Dr = 10, + onNodesChange: go, + onEdgesChange: xn, + noDragClassName: Mn = 'nodrag', + noWheelClassName: dn = 'nowheel', + noPanClassName: Jt = 'nopan', + fitView: En = !1, + fitViewOptions: Ln, + connectOnClick: Un = !0, + attributionPosition: Kn, + proOptions: nr, + defaultEdgeOptions: lr, + elevateNodesOnSelect: cr = !0, + elevateEdgesOnSelect: Hr = !1, + disableKeyboardA11y: vr = !1, + autoPanOnConnect: Nr = !0, + autoPanOnNodeDrag: Gr = !0, + connectionRadius: eo = 20, + isValidConnection: Zr, + onError: Jr, + style: wr, + id: Mr, + nodeDragThreshold: Ur, + ...Rr + }, + Pr, + ) => { + const Lr = Mr || '1' + return React$1.createElement( + 'div', + { + ...Rr, + style: { ...wr, ...wrapperStyle }, + ref: Pr, + className: cc(['react-flow', it]), + 'data-testid': 'rf__wrapper', + id: Mr, + }, + React$1.createElement( + Wrapper$e, + null, + React$1.createElement(GraphView$1, { + onInit: ct, + onMove: ut, + onMoveStart: ht, + onMoveEnd: dt, + onNodeClick: st, + onEdgeClick: lt, + onNodeMouseEnter: vt, + onNodeMouseMove: xt, + onNodeMouseLeave: kt, + onNodeContextMenu: St, + onNodeDoubleClick: Tt, + nodeTypes: ot, + edgeTypes: at, + connectionLineType: Nt, + connectionLineStyle: Ut, + connectionLineComponent: Mt, + connectionLineContainerStyle: Ht, + selectionKeyCode: sn, + selectionOnDrag: Kt, + selectionMode: rn, + deleteKeyCode: en, + multiSelectionKeyCode: hn, + panActivationKeyCode: nn, + zoomActivationKeyCode: vn, + onlyRenderVisibleElements: _n, + selectNodesOnDrag: Pn, + defaultViewport: wn, + translateExtent: kn, + minZoom: fn, + maxZoom: pn, + preventScrolling: Dn, + zoomOnScroll: Xt, + zoomOnPinch: Sn, + zoomOnDoubleClick: Zn, + panOnScroll: Rn, + panOnScrollSpeed: jn, + panOnScrollMode: On, + panOnDrag: Vn, + onPaneClick: qn, + onPaneMouseEnter: zn, + onPaneMouseMove: Jn, + onPaneMouseLeave: Hn, + onPaneScroll: pr, + onPaneContextMenu: fr, + onSelectionContextMenu: Ot, + onSelectionStart: Wt, + onSelectionEnd: zt, + onEdgeUpdate: io, + onEdgeContextMenu: Tr, + onEdgeDoubleClick: Ar, + onEdgeMouseEnter: qr, + onEdgeMouseMove: jr, + onEdgeMouseLeave: Fr, + onEdgeUpdateStart: ao, + onEdgeUpdateEnd: Yr, + edgeUpdaterRadius: Dr, + defaultMarkerColor: Zt, + noDragClassName: Mn, + noWheelClassName: dn, + noPanClassName: Jt, + elevateEdgesOnSelect: Hr, + rfId: Lr, + disableKeyboardA11y: vr, + nodeOrigin: cn, + nodeExtent: un, + }), + React$1.createElement(StoreUpdater, { + nodes: tt, + edges: et, + defaultNodes: nt, + defaultEdges: rt, + onConnect: pt, + onConnectStart: mt, + onConnectEnd: gt, + onClickConnectStart: yt, + onClickConnectEnd: bt, + nodesDraggable: $n, + nodesConnectable: Nn, + nodesFocusable: Tn, + edgesFocusable: mn, + edgesUpdatable: In, + elementsSelectable: An, + elevateNodesOnSelect: cr, + minZoom: fn, + maxZoom: pn, + nodeExtent: un, + onNodesChange: go, + onEdgesChange: xn, + snapToGrid: an, + snapGrid: Qt, + connectionMode: Ft, + translateExtent: kn, + connectOnClick: Un, + defaultEdgeOptions: lr, + fitView: En, + fitViewOptions: Ln, + onNodesDelete: Dt, + onEdgesDelete: jt, + onNodeDragStart: At, + onNodeDrag: Et, + onNodeDragStop: $t, + onSelectionDrag: wt, + onSelectionDragStart: Ct, + onSelectionDragStop: It, + noPanClassName: Jt, + nodeOrigin: cn, + rfId: Lr, + autoPanOnConnect: Nr, + autoPanOnNodeDrag: Gr, + onError: Jr, + connectionRadius: eo, + isValidConnection: Zr, + nodeDragThreshold: Ur, + }), + React$1.createElement(Wrapper$1$1, { onSelectionChange: Pt }), + xr, + React$1.createElement(Attribution, { proOptions: nr, position: Kn }), + React$1.createElement(A11yDescriptions, { rfId: Lr, disableKeyboardA11y: vr }), + ), + ) + }, + ) + ReactFlow.displayName = 'ReactFlow' + const style = '', + TeachMe = () => { + const [tt, et] = useDataStore((mt) => [mt.data, mt.setTeachMe]), + [nt, rt] = useAppStore((mt) => [mt.currentSearch, mt.setSidebarOpen]), + [it] = useUserStore((mt) => [mt.setBudget]), + ot = reactExports.useRef(!1), + at = useSocket(), + [st, lt, ct, ut] = useTeachStore((mt) => [ + mt.setTeachMeAnswer, + mt.setHasTeachingInProgress, + mt.setInstagraphAnswer, + mt.setHasInstagraphInProgress, + ]), + ht = reactExports.useCallback( + (mt) => { + st(mt.tutorial), + toast(jsxRuntimeExports.jsx(ToastMessage, { message: 'Tutorial is ready' }), { + position: toast.POSITION.BOTTOM_CENTER, + type: 'success', + }) + }, + [st], + ), + dt = reactExports.useCallback( + (mt) => { + ct(mt), + toast(jsxRuntimeExports.jsx(ToastMessage, { message: 'Instagraph is ready' }), { + position: toast.POSITION.BOTTOM_CENTER, + type: 'success', + }) + }, + [ct], + ) + reactExports.useEffect(() => { + ot.current || + (ht && at && (at.on('teachmehook', ht), (ot.current = !0)), + dt && at && (at.on('instagraphhook', dt), (ot.current = !0))) + }, [at, ht, dt]) + const pt = async () => { + if (nt) { + lt(!0), ut(!0), rt(!0), et(!0) + try { + const mt = tt == null ? void 0 : tt.nodes.filter((bt) => bt.text), + gt = mt == null ? void 0 : mt.slice(0, 5), + yt = (gt != null && gt.length ? gt.map((bt) => bt.text).join(' ') : '') + .substring(0, 2500) + .replace(/[?&=+/#]/g, (bt) => `\\${bt}`) + await distExports$1.enable(), + await postTeachMe({ term: nt, transcripts: yt }), + await updateBudget(it), + toast(jsxRuntimeExports.jsx(ToastMessage, { message: 'We started preparing tutorial for you' }), { + type: 'success', + }), + await postInstagraph({ term: nt, transcripts: yt }), + await updateBudget(it), + toast(jsxRuntimeExports.jsx(ToastMessage, { message: 'We started preparing an instagraph for you' }), { + type: 'success', + }) + } catch { + lt(!1), ut(!1) + } + } + } + return jsxRuntimeExports.jsx(ButtonStyled, { onClick: () => pt(), children: 'Teach me' }) + }, + TeachMeLoader = ({ text: tt }) => + jsxRuntimeExports.jsxs(Flex, { + align: 'center', + justify: 'center', + py: 12, + children: [ + jsxRuntimeExports.jsx(Flex, { + align: 'center', + py: 12, + children: jsxRuntimeExports.jsx(PropagateLoader, { color: colors.white }), + }), + jsxRuntimeExports.jsx(Flex, { + align: 'center', + py: 12, + children: jsxRuntimeExports.jsx(Text$3, { children: tt }), + }), + ], + }), + TeachMeText = () => { + const [tt, et, nt, rt] = useTeachStore((ot) => [ + ot.teachMeAnswer, + ot.hasTeachingInProgress, + ot.instgraphAnswser, + ot.hasInstagraphInProgress, + ]), + it = !rt && !!(nt != null && nt.edges) && !!(nt != null && nt.nodes) + return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { + children: [ + it + ? jsxRuntimeExports.jsx(ReactFlow, { + edges: nt == null ? void 0 : nt.edges, + nodes: nt == null ? void 0 : nt.nodes, + }) + : jsxRuntimeExports.jsx(TeachMeLoader, { text: 'Generating instagraph' }), + et + ? jsxRuntimeExports.jsx(TeachMeLoader, { text: 'Generating tutorial' }) + : jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { + children: [ + jsxRuntimeExports.jsx(TeachMeAnswerFlex, { + children: jsxRuntimeExports.jsx(Text$3, { children: tt }), + }), + jsxRuntimeExports.jsx(AskQuestion, {}), + ], + }), + ], + }) + }, + ButtonStyled = styled$4(Button$2)``, + TeachMeAnswerFlex = styled$4(Flex)` + padding-left: 10px; + padding-right: 10px; +`, + MENU_WIDTH$2 = 400, + ComponentsMapper$1 = { + askQuestion: jsxRuntimeExports.jsx(AskQuestion, {}), + teachMe: jsxRuntimeExports.jsx(TeachMe, {}), + sentiment: jsxRuntimeExports.jsx(SentimentAnalysis, {}), + }, + heightMap = { askQuestion: 400, sentiment: 600, teachMe: 400, default: 200 }, + HelperContent = () => { + const { isShow: tt, setIsShow: et } = useHelper(), + [nt, rt] = reactExports.useState(null) + return jsxRuntimeExports.jsx(ContentWrapper$1, { + children: jsxRuntimeExports.jsx(Fade$1, { + in: tt, + mountOnEnter: !0, + unmountOnExit: !0, + children: jsxRuntimeExports.jsxs(Stack$5, { + bgcolor: colors.listBg, + component: Paper$1, + elevation: 2, + height: heightMap[nt ?? 'default'], + p: 2, + pb: 4, + pt: 4, + sx: { + transition: ({ transitions: it }) => `${it.create(['height', 'opacity'])}!important`, + overflowY: 'auto', + overflowX: 'hidden', + }, + width: { xs: 'calc(100vw - 8px * 4)', sm: MENU_WIDTH$2 }, + children: [ + jsxRuntimeExports.jsx(CloseButton$3, { + onClick: () => { + rt(null), et((it) => !it) + }, + }), + jsxRuntimeExports.jsx(ActionsMenu, { active: nt, onChange: rt }), + nt && ComponentsMapper$1[nt], + ], + }), + }), + }) + }, + ContentWrapper$1 = styled$1('div')(() => ({ position: 'absolute', bottom: '1rem', right: '1rem' })), + CloseButton$3 = styled$1((tt) => + jsxRuntimeExports.jsx(IconButton$2, { + component: 'button', + size: 'small', + ...tt, + children: jsxRuntimeExports.jsx(MdClose, {}), + }), + )(() => ({ position: 'absolute', right: '0.5rem', top: '0.5rem' })), + dpr = window.devicePixelRatio || 1, + pi = Math.PI, + points = 12, + radius = 200 * dpr, + h = 600 * dpr, + w = 600 * dpr, + center = { x: (w / 2) * dpr, y: (h / 2) * dpr }, + rangeMin = 3, + rangeMax = 25, + createBtn = (tt) => { + var at + const et = (at = tt.current) == null ? void 0 : at.getContext('2d'), + nt = tt.current + if (!et || !nt) return null + const rt = getGradients(et) + et.scale(dpr, dpr), (nt.width = w * dpr), (nt.height = h * dpr) + const it = getCircles(rt), + ot = setInterval(() => { + swingCircle(et, it, rt) + }, 16) + return () => clearInterval(ot) + } + function cycle(tt, et) { + return ((tt % et) + et) % et + } + function swingCircle(tt, et, nt) { + tt.clearRect(0, 0, w * dpr, h * dpr), (tt.globalAlpha = 0.9), (tt.globalCompositeOperation = 'screen') + for (let rt = 0; rt < et.length; rt += 1) { + const it = et[rt] + for (let at = 0; at < it.length; at += 1) { + it[at].phase += lodashExports.random(0, 9, !1) * -0.01 + const st = 4, + lt = radius + it[at].range * st * Math.sin(it[at].phase) - rangeMax + it[at].radian += pi / 360 + const ct = center.x + lt * Math.cos(it[at].radian), + ut = center.y + lt * Math.sin(it[at].radian) + it[at] = { x: ct, y: ut, radian: it[at].radian, range: it[at].range, phase: it[at].phase } + } + const ot = nt[rt] + drawCurve(it, ot, tt) + } + } + function getCircles(tt) { + const et = [] + for (let nt = 0; nt <= tt.length - 1; nt += 1) { + const rt = [] + let it = 0 + for (let ot = 0; ot < points; ot += 1) { + it = ((pi * 2) / points) * ot + const at = center.x + radius * Math.cos(it), + st = center.y + radius * Math.sin(it) + rt.push({ x: at, y: st, radian: it, range: lodashExports.random(rangeMin, rangeMax), phase: 0 }) + } + et.push(rt) + } + return et + } + function getGradients(tt) { + const et = tt.createLinearGradient(0, 0, w, 0) + et.addColorStop(0, colors.green100), et.addColorStop(1, colors.green400) + const nt = tt.createLinearGradient(0, 0, w, 0) + nt.addColorStop(0, colors.lightBlue300), nt.addColorStop(1, colors.lightBlue500) + const rt = tt.createLinearGradient(0, 0, w, 0) + rt.addColorStop(0, colors.bluePressState), rt.addColorStop(1, colors.blueTextAccent) + const it = tt.createLinearGradient(0, 0, w, 0) + return it.addColorStop(0, colors.modalShield), it.addColorStop(1, colors.primaryBlueBorder), [et, nt, rt, it] + } + function drawCurve(tt, et, nt) { + ;(nt.fillStyle = et), + nt.beginPath(), + nt.moveTo((tt[cycle(-1, points)].x + tt[0].x) / 2, (tt[cycle(-1, points)].y + tt[0].y) / 2) + for (let rt = 0; rt < tt.length; rt += 1) + nt.quadraticCurveTo( + tt[rt].x, + tt[rt].y, + (tt[rt].x + tt[cycle(rt + 1, points)].x) / 2, + (tt[rt].y + tt[cycle(rt + 1, points)].y) / 2, + ) + nt.closePath(), nt.fill() + } + const SiriLikeButton = ({ children: tt, ...et }) => { + const nt = reactExports.useRef(null) + return ( + reactExports.useEffect(() => { + const rt = createBtn(nt) + return () => { + rt == null || rt() + } + }, []), + jsxRuntimeExports.jsxs(ButtonContainer, { + ...et, + children: [ + tt && jsxRuntimeExports.jsx('div', { className: 'children', children: tt }), + jsxRuntimeExports.jsx(Canvas, { ref: nt }), + ], + }) + ) + }, + ButtonContainer = styled$1(ButtonBase$1)(() => ({ width: 48, height: 48, '& .children': { zIndex: 1 } })), + Canvas = styled$1('canvas')(() => ({ + position: 'absolute', + top: '50%', + left: '50%', + transform: 'translate(-50%, -50%)', + width: 70, + height: 70, + })), + OpenHelperBtn = () => { + const { setIsShow: tt } = useHelper(), + [et] = useAppStore((it) => [it.sidebarIsOpen]), + nt = reactExports.useRef(null), + rt = useAppStore((it) => it.currentSearch) + return ( + reactExports.useEffect(() => { + const it = createBtn(nt) + return () => { + it == null || it() + } + }, []), + rt + ? jsxRuntimeExports.jsx(FabContainer, { + sidebarIsOpen: et, + children: jsxRuntimeExports.jsx(SiriLikeButton, { id: 'cy-siri-btn', onClick: () => tt((it) => !it) }), + }) + : null + ) + }, + FabContainer = styled$1('div')(({ sidebarIsOpen: tt, theme: et }) => ({ + position: 'absolute', + bottom: '2rem', + transition: et.transitions.create(['right']), + right: tt ? 'calc((100% - 400px) / 2)' : '50%', + transform: 'translate(50%)', + })), + Helper = () => { + const [tt, et] = reactExports.useState(!1), + nt = reactExports.useMemo(() => ({ isShow: tt, setIsShow: et }), [tt]) + return jsxRuntimeExports.jsxs(HelperContext.Provider, { + value: nt, + children: [jsxRuntimeExports.jsx(OpenHelperBtn, {}), jsxRuntimeExports.jsx(HelperContent, {})], + }) + }, + AddContentIcon = (tt) => + jsxRuntimeExports.jsxs('svg', { + width: '1em', + height: '1em', + viewBox: '0 0 24 24', + fill: 'currentColor', + xmlns: 'http://www.w3.org/2000/svg', + children: [ + jsxRuntimeExports.jsx('mask', { + id: 'mask0_1259_25', + maskUnits: 'userSpaceOnUse', + x: '0', + y: '0', + width: '24', + height: '24', + children: jsxRuntimeExports.jsx('rect', { width: '1em', height: '1em', fill: 'currentColor' }), + }), + jsxRuntimeExports.jsx('g', { + mask: 'url(#mask0_1259_25)', + children: jsxRuntimeExports.jsx('path', { + d: 'M11.25 12.75V16C11.25 16.2125 11.3219 16.3906 11.4657 16.5343C11.6095 16.6781 11.7877 16.75 12.0003 16.75C12.2129 16.75 12.391 16.6781 12.5346 16.5343C12.6782 16.3906 12.75 16.2125 12.75 16V12.75H16C16.2125 12.75 16.3906 12.6781 16.5344 12.5343C16.6781 12.3904 16.75 12.2122 16.75 11.9997C16.75 11.7871 16.6781 11.609 16.5344 11.4654C16.3906 11.3218 16.2125 11.25 16 11.25H12.75V7.99998C12.75 7.78748 12.6781 7.60935 12.5343 7.4656C12.3905 7.32187 12.2123 7.25 11.9997 7.25C11.7871 7.25 11.609 7.32187 11.4654 7.4656C11.3218 7.60935 11.25 7.78748 11.25 7.99998V11.25H8.00001C7.78751 11.25 7.60939 11.3219 7.46566 11.4657C7.32191 11.6095 7.25003 11.7877 7.25003 12.0003C7.25003 12.2129 7.32191 12.391 7.46566 12.5346C7.60939 12.6782 7.78751 12.75 8.00001 12.75H11.25ZM12.0017 21.5C10.6877 21.5 9.45271 21.2506 8.29658 20.752C7.14043 20.2533 6.13475 19.5765 5.27953 18.7217C4.4243 17.8669 3.74724 16.8616 3.24836 15.706C2.74947 14.5504 2.50003 13.3156 2.50003 12.0017C2.50003 10.6877 2.74936 9.45268 3.24803 8.29655C3.7467 7.1404 4.42345 6.13472 5.27828 5.2795C6.13313 4.42427 7.13837 3.74721 8.29401 3.24833C9.44962 2.74944 10.6844 2.5 11.9983 2.5C13.3123 2.5 14.5473 2.74933 15.7034 3.248C16.8596 3.74667 17.8653 4.42342 18.7205 5.27825C19.5757 6.1331 20.2528 7.13834 20.7517 8.29398C21.2505 9.44959 21.5 10.6844 21.5 11.9983C21.5 13.3122 21.2506 14.5473 20.752 15.7034C20.2533 16.8596 19.5766 17.8652 18.7217 18.7205C17.8669 19.5757 16.8616 20.2527 15.706 20.7516C14.5504 21.2505 13.3156 21.5 12.0017 21.5ZM12 20C14.2333 20 16.125 19.225 17.675 17.675C19.225 16.125 20 14.2333 20 12C20 9.76664 19.225 7.87498 17.675 6.32498C16.125 4.77498 14.2333 3.99998 12 3.99998C9.76667 3.99998 7.87501 4.77498 6.32501 6.32498C4.77501 7.87498 4.00001 9.76664 4.00001 12C4.00001 14.2333 4.77501 16.125 6.32501 17.675C7.87501 19.225 9.76667 20 12 20Z', + fill: 'currentColor', + }), + }), + ], + }), + AddSourceIcon = (tt) => + jsxRuntimeExports.jsxs('svg', { + width: '1em', + height: '1em', + viewBox: '0 0 24 24', + fill: 'currentColor', + xmlns: 'http://www.w3.org/2000/svg', + children: [ + jsxRuntimeExports.jsx('mask', { + id: 'mask0_1259_27', + maskUnits: 'userSpaceOnUse', + x: '0', + y: '0', + width: '24', + height: '24', + children: jsxRuntimeExports.jsx('rect', { width: '1em', height: '1em', fill: 'currentColor' }), + }), + jsxRuntimeExports.jsx('g', { + mask: 'url(#mask0_1259_27)', + children: jsxRuntimeExports.jsx('path', { + d: 'M5.30773 20.5C4.81061 20.5 4.38506 20.3229 4.03106 19.9689C3.67704 19.6149 3.50003 19.1894 3.50003 18.6923V5.3077C3.50003 4.81058 3.67704 4.38503 4.03106 4.03103C4.38506 3.67701 4.81061 3.5 5.30773 3.5H18.6923C19.1894 3.5 19.615 3.67701 19.969 4.03103C20.323 4.38503 20.5 4.81058 20.5 5.3077V11.6327C20.2538 11.5275 20.0074 11.4384 19.7606 11.3654C19.5138 11.2923 19.2603 11.234 19 11.1904V5.3077C19 5.23077 18.968 5.16024 18.9039 5.09613C18.8397 5.03203 18.7692 4.99998 18.6923 4.99998H5.30773C5.2308 4.99998 5.16027 5.03203 5.09616 5.09613C5.03206 5.16024 5.00001 5.23077 5.00001 5.3077V18.6923C5.00001 18.7692 5.03206 18.8397 5.09616 18.9038C5.16027 18.9679 5.2308 19 5.30773 19H11.1654C11.2026 19.2769 11.2577 19.5387 11.3308 19.7855C11.4038 20.0323 11.4929 20.2705 11.5981 20.5H5.30773ZM5.00001 19V4.99998V11.1904V11.1154V19ZM7.25003 15.8849C7.25003 16.0975 7.32191 16.2756 7.46566 16.4192C7.60939 16.5628 7.78751 16.6346 8.00001 16.6346H11.2673C11.3109 16.3743 11.3757 16.1208 11.4616 15.874C11.5475 15.6272 11.641 15.3808 11.7423 15.1346H8.00001C7.78751 15.1346 7.60939 15.2065 7.46566 15.3503C7.32191 15.4941 7.25003 15.6723 7.25003 15.8849ZM7.25003 12.0003C7.25003 12.2129 7.32191 12.391 7.46566 12.5346C7.60939 12.6782 7.78751 12.75 8.00001 12.75H13.5904C14.0212 12.3846 14.4808 12.0785 14.9692 11.8317C15.4577 11.5849 15.9807 11.4096 16.5384 11.3058C16.4259 11.281 16.3009 11.2655 16.1634 11.2593C16.0259 11.2531 15.901 11.25 15.7885 11.25H8.00001C7.78751 11.25 7.60939 11.3219 7.46566 11.4657C7.32191 11.6095 7.25003 11.7877 7.25003 12.0003ZM7.25003 8.1157C7.25003 8.3283 7.32191 8.50639 7.46566 8.64998C7.60939 8.79356 7.78751 8.86535 8.00001 8.86535H16C16.2125 8.86535 16.3906 8.79344 16.5344 8.64963C16.6781 8.50583 16.75 8.32763 16.75 8.11503C16.75 7.90244 16.6781 7.72436 16.5344 7.58078C16.3906 7.43718 16.2125 7.36538 16 7.36538H8.00001C7.78751 7.36538 7.60939 7.43728 7.46566 7.5811C7.32191 7.72492 7.25003 7.90312 7.25003 8.1157ZM18 22.5576C16.7513 22.5576 15.6891 22.1198 14.8135 21.2442C13.9378 20.3685 13.5 19.3064 13.5 18.0577C13.5 16.809 13.9378 15.7468 14.8135 14.8712C15.6891 13.9955 16.7513 13.5577 18 13.5577C19.2487 13.5577 20.3109 13.9955 21.1865 14.8712C22.0622 15.7468 22.5 16.809 22.5 18.0577C22.5 19.3064 22.0622 20.3685 21.1865 21.2442C20.3109 22.1198 19.2487 22.5576 18 22.5576ZM17.5577 18.5V20.5577C17.5577 20.6756 17.6019 20.7788 17.6904 20.8673C17.7788 20.9557 17.8821 21 18 21C18.118 21 18.2212 20.9557 18.3096 20.8673C18.3981 20.7788 18.4423 20.6756 18.4423 20.5577V18.5H20.5C20.618 18.5 20.7212 18.4557 20.8096 18.3673C20.8981 18.2788 20.9423 18.1756 20.9423 18.0577C20.9423 17.9397 20.8981 17.8365 20.8096 17.748C20.7212 17.6596 20.618 17.6154 20.5 17.6154H18.4423V15.5577C18.4423 15.4397 18.3981 15.3365 18.3096 15.2481C18.2212 15.1596 18.118 15.1154 18 15.1154C17.8821 15.1154 17.7788 15.1596 17.6904 15.2481C17.6019 15.3365 17.5577 15.4397 17.5577 15.5577V17.6154H15.5C15.3821 17.6154 15.2788 17.6596 15.1904 17.748C15.1019 17.8365 15.0577 17.9397 15.0577 18.0577C15.0577 18.1756 15.1019 18.2788 15.1904 18.3673C15.2788 18.4557 15.3821 18.5 15.5 18.5H17.5577Z', + fill: 'currentColor', + }), + }), + ], + }), + SentimentDataIcon = (tt) => + jsxRuntimeExports.jsxs('svg', { + width: '1em', + height: '1em', + viewBox: '0 0 24 24', + fill: 'currentColor', + xmlns: 'http://www.w3.org/2000/svg', + children: [ + jsxRuntimeExports.jsx('mask', { + id: 'mask0_1259_28', + maskUnits: 'userSpaceOnUse', + x: '0', + y: '0', + width: '24', + height: '24', + children: jsxRuntimeExports.jsx('rect', { width: '1em', height: '1em', fill: 'currentColor' }), + }), + jsxRuntimeExports.jsx('g', { + mask: 'url(#mask0_1259_28)', + children: jsxRuntimeExports.jsx('path', { + d: 'M3 20.75L2.91345 19.4327L4.74998 17.6058V20.75H3ZM7.25003 20.75V15.1058L8.74998 13.6058V20.75H7.25003ZM11.25 20.75V13.6058L12.75 15.1308V20.75H11.25ZM15.25 20.75V15.1308L16.75 13.6308V20.75H15.25ZM19.25 20.75V11.1058L20.75 9.60583V20.75H19.25ZM3.25003 15.2192V13.1058L10 6.35581L14 10.3558L20.75 3.60583V5.71924L14 12.4692L10 8.46921L3.25003 15.2192Z', + fill: 'currentColor', + }), + }), + ], + }), + SourcesTableIcon = (tt) => + jsxRuntimeExports.jsxs('svg', { + width: '1em', + height: '1em', + viewBox: '0 0 24 24', + fill: 'currentColor', + xmlns: 'http://www.w3.org/2000/svg', + children: [ + jsxRuntimeExports.jsx('mask', { + id: 'mask0_1259_26', + maskUnits: 'userSpaceOnUse', + x: '0', + y: '0', + width: '24', + height: '24', + children: jsxRuntimeExports.jsx('rect', { width: '1em', height: '1em', fill: 'currentColor' }), + }), + jsxRuntimeExports.jsx('g', { + mask: 'url(#mask0_1259_26)', + children: jsxRuntimeExports.jsx('path', { + d: 'M10.0577 18.7499C9.84521 18.7499 9.66708 18.678 9.52333 18.5342C9.3796 18.3904 9.30773 18.2122 9.30773 17.9996C9.30773 17.787 9.3796 17.609 9.52333 17.4654C9.66708 17.3218 9.84521 17.25 10.0577 17.25H19.75C19.9625 17.25 20.1406 17.3219 20.2844 17.4657C20.4281 17.6095 20.5 17.7877 20.5 18.0003C20.5 18.2129 20.4281 18.391 20.2844 18.5346C20.1406 18.6782 19.9625 18.7499 19.75 18.7499H10.0577ZM10.0577 12.7499C9.84521 12.7499 9.66708 12.678 9.52333 12.5342C9.3796 12.3904 9.30773 12.2122 9.30773 11.9996C9.30773 11.787 9.3796 11.609 9.52333 11.4654C9.66708 11.3218 9.84521 11.25 10.0577 11.25H19.75C19.9625 11.25 20.1406 11.3219 20.2844 11.4657C20.4281 11.6095 20.5 11.7877 20.5 12.0003C20.5 12.2129 20.4281 12.391 20.2844 12.5346C20.1406 12.6782 19.9625 12.7499 19.75 12.7499H10.0577ZM10.0577 6.74995C9.84521 6.74995 9.66708 6.67805 9.52333 6.53425C9.3796 6.39043 9.30773 6.21223 9.30773 5.99965C9.30773 5.78705 9.3796 5.60896 9.52333 5.46537C9.66708 5.32179 9.84521 5.25 10.0577 5.25H19.75C19.9625 5.25 20.1406 5.3219 20.2844 5.4657C20.4281 5.60951 20.5 5.78771 20.5 6.0003C20.5 6.2129 20.4281 6.39099 20.2844 6.53457C20.1406 6.67816 19.9625 6.74995 19.75 6.74995H10.0577ZM5.16348 19.6634C4.70603 19.6634 4.31443 19.5005 3.98868 19.1748C3.66291 18.849 3.50003 18.4574 3.50003 18C3.50003 17.5425 3.66291 17.1509 3.98868 16.8252C4.31443 16.4994 4.70603 16.3365 5.16348 16.3365C5.62093 16.3365 6.01253 16.4994 6.33828 16.8252C6.66403 17.1509 6.82691 17.5425 6.82691 18C6.82691 18.4574 6.66403 18.849 6.33828 19.1748C6.01253 19.5005 5.62093 19.6634 5.16348 19.6634ZM5.16348 13.6634C4.70603 13.6634 4.31443 13.5005 3.98868 13.1748C3.66291 12.849 3.50003 12.4574 3.50003 12C3.50003 11.5425 3.66291 11.1509 3.98868 10.8252C4.31443 10.4994 4.70603 10.3365 5.16348 10.3365C5.62093 10.3365 6.01253 10.4994 6.33828 10.8252C6.66403 11.1509 6.82691 11.5425 6.82691 12C6.82691 12.4574 6.66403 12.849 6.33828 13.1748C6.01253 13.5005 5.62093 13.6634 5.16348 13.6634ZM5.16348 7.6634C4.70603 7.6634 4.31443 7.50052 3.98868 7.17477C3.66291 6.84902 3.50003 6.45742 3.50003 5.99997C3.50003 5.54252 3.66291 5.15092 3.98868 4.82517C4.31443 4.49942 4.70603 4.33655 5.16348 4.33655C5.62093 4.33655 6.01253 4.49942 6.33828 4.82517C6.66403 5.15092 6.82691 5.54252 6.82691 5.99997C6.82691 6.45742 6.66403 6.84902 6.33828 7.17477C6.01253 7.50052 5.62093 7.6634 5.16348 7.6634Z', + fill: 'currentColor', + }), + }), + ], + }), + MainToolbar = () => { + const [tt] = useAppStore((at) => [at.setSecondarySidebarActiveTab]), + { open: et, setAddNodeModalData: nt } = useModal('addNode'), + { open: rt } = useModal('sourcesTable'), + it = (at) => { + tt(at) + }, + ot = (at) => { + et(), nt(at) + } + return jsxRuntimeExports.jsxs(Wrapper$d, { + children: [ + jsxRuntimeExports.jsx(LogoButton, { + onClick: () => it('about'), + children: jsxRuntimeExports.jsx('img', { alt: 'Second brain', src: 'logo.svg' }), + }), + jsxRuntimeExports.jsxs(ActionButton, { + onClick: () => ot('content'), + children: [ + jsxRuntimeExports.jsx(IconWrapper, { children: jsxRuntimeExports.jsx(AddContentIcon, {}) }), + jsxRuntimeExports.jsx(Text$3, { children: 'Add Content' }), + ], + }), + jsxRuntimeExports.jsxs(ActionButton, { + onClick: () => ot('source'), + children: [ + jsxRuntimeExports.jsx(IconWrapper, { children: jsxRuntimeExports.jsx(AddSourceIcon, {}) }), + jsxRuntimeExports.jsx(Text$3, { children: 'Add Source' }), + ], + }), + jsxRuntimeExports.jsxs(ActionButton, { + id: 'cy-open-soure-table', + onClick: rt, + children: [ + jsxRuntimeExports.jsx(IconWrapper, { children: jsxRuntimeExports.jsx(SourcesTableIcon, {}) }), + jsxRuntimeExports.jsx(Text$3, { children: 'Source Table' }), + ], + }), + jsxRuntimeExports.jsxs(ActionButton, { + id: 'cy-open-sentiment-data', + onClick: () => it('sentiment'), + children: [ + jsxRuntimeExports.jsx(IconWrapper, { children: jsxRuntimeExports.jsx(SentimentDataIcon, {}) }), + jsxRuntimeExports.jsx(Text$3, { children: 'Sentiment Data' }), + ], + }), + ], + }) + }, + Wrapper$d = styled$4(Flex).attrs({ align: 'flex-start', direction: 'column', justify: 'flex-start' })` + flex: 0 0 64px; + z-index: 31; + transition: opacity 1s; + background: ${colors.BG2}; +`, + LogoButton = styled$4(Flex)` + background: blue; + align-items: center; + justify-content: center; + background: ${colors.primaryBlue}; + width: 64px; + height: 64px; + cursor: pointer; +`, + ActionButton = styled$4(Flex).attrs({ align: 'center', justify: 'center', p: 0 })` + position: relative; + width: 64px; + height: 58px; + padding: 0; + flex-direction: row; + color: ${colors.GRAY6}; + cursor: pointer; + transition: ${({ theme: tt }) => tt.transitions.create(['opacity', 'box-shadow', 'background-color'])}; - // create the empty channels - for (let i = 0; i < channels; i++) { - this.buffer[i] = new Float32Array(this.size); - this.writeHead[i] = 0; - } - } + &:before { + content: ''; + position: absolute; + left: 0; + top: 50%; + transform: translateY(-50%); + width: 4px; /* Initial width */ + height: 32px; /* Initial height on hover */ + background-color: transparent; + transition: height 0.3s, width 0.3s, background-color 0.3s; + } - /** - * Push a value onto the end - * @param channel number - * @param value number - */ - push(channel, value) { - this.writeHead[channel] += 1; - if (this.writeHead[channel] > this.size) { - this.writeHead[channel] = 0; - } - this.buffer[channel][this.writeHead[channel]] = value; - } + ${Text$3} { + display: none; + opacity: 0; + width: 0; + padding: 4px 10px; + border-radius: 4px; + background: #000; + box-shadow: 0px 4px 8px 0px rgba(0, 0, 0, 0.25); + position absolute; + left: 90%; + z-index: 99; + white-space: nowrap; + visibility: visible; + font-size: 11px; + font-style: normal; + font-weight: 400; + transition: ${({ theme: tt }) => tt.transitions.create(['opacity', 'visually'])}; + } - /** - * Get the recorded value of the channel given the delay - * @param channel number - * @param delay number delay samples - */ - get(channel, delay) { - let readHead = this.writeHead[channel] - Math.floor(delay); - if (readHead < 0) { - readHead += this.size; - } - return this.buffer[channel][readHead]; - } - } -`;addToWorklet(delayLine);const workletName$1="feedback-comb-filter",feedbackCombFilter=` - class FeedbackCombFilterWorklet extends SingleIOProcessor { + &:hover { + color: ${colors.white}; - constructor(options) { - super(options); - this.delayLine = new DelayLine(this.sampleRate, options.channelCount || 2); - } + &:before { + width: 3px; + height: 32px; + background-color: ${colors.primaryBlue}; + } - static get parameterDescriptors() { - return [{ - name: "delayTime", - defaultValue: 0.1, - minValue: 0, - maxValue: 1, - automationRate: "k-rate" - }, { - name: "feedback", - defaultValue: 0.5, - minValue: 0, - maxValue: 0.9999, - automationRate: "k-rate" - }]; - } + ${Text$3} { + display: block; + width: min-content; + opacity: 1; + visibility: visible; + } + } - generate(input, channel, parameters) { - const delayedSample = this.delayLine.get(channel, parameters.delayTime * this.sampleRate); - this.delayLine.push(channel, input + delayedSample * parameters.feedback); - return delayedSample; - } - } -`;registerProcessor(workletName$1,feedbackCombFilter);class Sampler extends Instrument{constructor(){super(optionsFromArguments(Sampler.getDefaults(),arguments,["urls","onload","baseUrl"],"urls")),this.name="Sampler",this._activeSources=new Map;const et=optionsFromArguments(Sampler.getDefaults(),arguments,["urls","onload","baseUrl"],"urls"),nt={};Object.keys(et.urls).forEach(rt=>{const it=parseInt(rt,10);if(assert(isNote(rt)||isNumber$4(it)&&isFinite(it),`url key is neither a note or midi pitch: ${rt}`),isNote(rt)){const ot=new FrequencyClass(this.context,rt).toMidi();nt[ot]=et.urls[rt]}else isNumber$4(it)&&isFinite(it)&&(nt[it]=et.urls[it])}),this._buffers=new ToneAudioBuffers({urls:nt,onload:et.onload,baseUrl:et.baseUrl,onerror:et.onerror}),this.attack=et.attack,this.release=et.release,this.curve=et.curve,this._buffers.loaded&&Promise.resolve().then(et.onload)}static getDefaults(){return Object.assign(Instrument.getDefaults(),{attack:0,baseUrl:"",curve:"exponential",onload:noOp,onerror:noOp,release:.1,urls:{}})}_findClosest(et){let rt=0;for(;rt<96;){if(this._buffers.has(et+rt))return-rt;if(this._buffers.has(et-rt))return rt;rt++}throw new Error(`No available buffers for note: ${et}`)}triggerAttack(et,nt,rt=1){return this.log("triggerAttack",et,nt,rt),Array.isArray(et)||(et=[et]),et.forEach(it=>{const ot=ftomf(new FrequencyClass(this.context,it).toFrequency()),at=Math.round(ot),st=ot-at,lt=this._findClosest(at),ct=at-lt,ut=this._buffers.get(ct),ht=intervalToFrequencyRatio(lt+st),dt=new ToneBufferSource({url:ut,context:this.context,curve:this.curve,fadeIn:this.attack,fadeOut:this.release,playbackRate:ht}).connect(this.output);dt.start(nt,0,ut.duration/ht,rt),isArray$e(this._activeSources.get(at))||this._activeSources.set(at,[]),this._activeSources.get(at).push(dt),dt.onended=()=>{if(this._activeSources&&this._activeSources.has(at)){const pt=this._activeSources.get(at),mt=pt.indexOf(dt);mt!==-1&&pt.splice(mt,1)}}}),this}triggerRelease(et,nt){return this.log("triggerRelease",et,nt),Array.isArray(et)||(et=[et]),et.forEach(rt=>{const it=new FrequencyClass(this.context,rt).toMidi();if(this._activeSources.has(it)&&this._activeSources.get(it).length){const ot=this._activeSources.get(it);nt=this.toSeconds(nt),ot.forEach(at=>{at.stop(nt)}),this._activeSources.set(it,[])}}),this}releaseAll(et){const nt=this.toSeconds(et);return this._activeSources.forEach(rt=>{for(;rt.length;)rt.shift().stop(nt)}),this}sync(){return this._syncState()&&(this._syncMethod("triggerAttack",1),this._syncMethod("triggerRelease",1)),this}triggerAttackRelease(et,nt,rt,it=1){const ot=this.toSeconds(rt);return this.triggerAttack(et,ot,it),isArray$e(nt)?(assert(isArray$e(et),"notes must be an array when duration is array"),et.forEach((at,st)=>{const lt=nt[Math.min(st,nt.length-1)];this.triggerRelease(at,ot+this.toSeconds(lt))})):this.triggerRelease(et,ot+this.toSeconds(nt)),this}add(et,nt,rt){if(assert(isNote(et)||isFinite(et),`note must be a pitch or midi: ${et}`),isNote(et)){const it=new FrequencyClass(this.context,et).toMidi();this._buffers.add(it,nt,rt)}else this._buffers.add(et,nt,rt);return this}get loaded(){return this._buffers.loaded}dispose(){return super.dispose(),this._buffers.dispose(),this._activeSources.forEach(et=>{et.forEach(nt=>nt.dispose())}),this._activeSources.clear(),this}}__decorate([timeRange(0)],Sampler.prototype,"attack",void 0);__decorate([timeRange(0)],Sampler.prototype,"release",void 0);class CrossFade extends ToneAudioNode{constructor(){super(Object.assign(optionsFromArguments(CrossFade.getDefaults(),arguments,["fade"]))),this.name="CrossFade",this._panner=this.context.createStereoPanner(),this._split=this.context.createChannelSplitter(2),this._g2a=new GainToAudio({context:this.context}),this.a=new Gain({context:this.context,gain:0}),this.b=new Gain({context:this.context,gain:0}),this.output=new Gain({context:this.context}),this._internalChannels=[this.a,this.b];const et=optionsFromArguments(CrossFade.getDefaults(),arguments,["fade"]);this.fade=new Signal({context:this.context,units:"normalRange",value:et.fade}),readOnly(this,"fade"),this.context.getConstant(1).connect(this._panner),this._panner.connect(this._split),this._panner.channelCount=1,this._panner.channelCountMode="explicit",connect(this._split,this.a.gain,0),connect(this._split,this.b.gain,1),this.fade.chain(this._g2a,this._panner.pan),this.a.connect(this.output),this.b.connect(this.output)}static getDefaults(){return Object.assign(ToneAudioNode.getDefaults(),{fade:.5})}dispose(){return super.dispose(),this.a.dispose(),this.b.dispose(),this.output.dispose(),this.fade.dispose(),this._g2a.dispose(),this._panner.disconnect(),this._split.disconnect(),this}}class Effect extends ToneAudioNode{constructor(et){super(et),this.name="Effect",this._dryWet=new CrossFade({context:this.context}),this.wet=this._dryWet.fade,this.effectSend=new Gain({context:this.context}),this.effectReturn=new Gain({context:this.context}),this.input=new Gain({context:this.context}),this.output=this._dryWet,this.input.fan(this._dryWet.a,this.effectSend),this.effectReturn.connect(this._dryWet.b),this.wet.setValueAtTime(et.wet,0),this._internalChannels=[this.effectReturn,this.effectSend],readOnly(this,"wet")}static getDefaults(){return Object.assign(ToneAudioNode.getDefaults(),{wet:1})}connectEffect(et){return this._internalChannels.push(et),this.effectSend.chain(et,this.effectReturn),this}dispose(){return super.dispose(),this._dryWet.dispose(),this.effectSend.dispose(),this.effectReturn.dispose(),this.wet.dispose(),this}}class Panner extends ToneAudioNode{constructor(){super(Object.assign(optionsFromArguments(Panner.getDefaults(),arguments,["pan"]))),this.name="Panner",this._panner=this.context.createStereoPanner(),this.input=this._panner,this.output=this._panner;const et=optionsFromArguments(Panner.getDefaults(),arguments,["pan"]);this.pan=new Param({context:this.context,param:this._panner.pan,value:et.pan,minValue:-1,maxValue:1}),this._panner.channelCount=et.channelCount,this._panner.channelCountMode="explicit",readOnly(this,"pan")}static getDefaults(){return Object.assign(ToneAudioNode.getDefaults(),{pan:0,channelCount:1})}dispose(){return super.dispose(),this._panner.disconnect(),this.pan.dispose(),this}}const workletName="bit-crusher",bitCrusherWorklet=` - class BitCrusherWorklet extends SingleIOProcessor { + &:active { + color: ${colors.white}; + background: ${colors.black}; + &:before { + width: 3px; + height: 100%; + background-color: ${colors.primaryBlue}; + } + } - static get parameterDescriptors() { - return [{ - name: "bits", - defaultValue: 12, - minValue: 1, - maxValue: 16, - automationRate: 'k-rate' - }]; - } + &.root { + border-radius: 50%; + padding: 0; + align-items: center; + justify-content: center; + border: none; + } +`, + IconWrapper = styled$4(Flex)` + justify-content: center; + align-items: center; + font-size: 24px; +`, + formatTokenMap = { + Y: 'year', + YY: 'year', + YYYY: { sectionType: 'year', contentType: 'digit', maxLength: 4 }, + M: { sectionType: 'month', contentType: 'digit', maxLength: 2 }, + MM: 'month', + MMM: { sectionType: 'month', contentType: 'letter' }, + MMMM: { sectionType: 'month', contentType: 'letter' }, + D: { sectionType: 'day', contentType: 'digit', maxLength: 2 }, + DD: 'day', + Do: { sectionType: 'day', contentType: 'digit-with-letter' }, + E: { sectionType: 'weekDay', contentType: 'digit', maxLength: 1 }, + e: { sectionType: 'weekDay', contentType: 'digit', maxLength: 1 }, + d: { sectionType: 'weekDay', contentType: 'digit', maxLength: 1 }, + dd: { sectionType: 'weekDay', contentType: 'letter' }, + ddd: { sectionType: 'weekDay', contentType: 'letter' }, + dddd: { sectionType: 'weekDay', contentType: 'letter' }, + A: 'meridiem', + a: 'meridiem', + H: { sectionType: 'hours', contentType: 'digit', maxLength: 2 }, + HH: 'hours', + h: { sectionType: 'hours', contentType: 'digit', maxLength: 2 }, + hh: 'hours', + m: { sectionType: 'minutes', contentType: 'digit', maxLength: 2 }, + mm: 'minutes', + s: { sectionType: 'seconds', contentType: 'digit', maxLength: 2 }, + ss: 'seconds', + }, + defaultFormats = { + year: 'YYYY', + month: 'MMMM', + monthShort: 'MMM', + dayOfMonth: 'D', + weekday: 'dddd', + weekdayShort: 'ddd', + hours24h: 'HH', + hours12h: 'hh', + meridiem: 'A', + minutes: 'mm', + seconds: 'ss', + fullDate: 'll', + fullDateWithWeekday: 'dddd, LL', + keyboardDate: 'L', + shortDate: 'MMM D', + normalDate: 'D MMMM', + normalDateWithWeekday: 'ddd, MMM D', + monthAndYear: 'MMMM YYYY', + monthAndDate: 'MMMM D', + fullTime: 'LT', + fullTime12h: 'hh:mm A', + fullTime24h: 'HH:mm', + fullDateTime: 'lll', + fullDateTime12h: 'll hh:mm A', + fullDateTime24h: 'll HH:mm', + keyboardDateTime: 'L LT', + keyboardDateTime12h: 'L hh:mm A', + keyboardDateTime24h: 'L HH:mm', + }, + MISSING_TIMEZONE_PLUGIN = [ + 'Missing timezone plugin', + 'To be able to use timezones, you have to pass the default export from `moment-timezone` to the `dateLibInstance` prop of `LocalizationProvider`', + 'Find more information on https://mui.com/x/react-date-pickers/timezone/#moment-and-timezone', + ].join(` +`) + class AdapterMoment { + constructor({ locale: et, formats: nt, instance: rt } = {}) { + ;(this.isMUIAdapter = !0), + (this.isTimezoneCompatible = !0), + (this.lib = 'moment'), + (this.moment = void 0), + (this.locale = void 0), + (this.formats = void 0), + (this.escapedCharacters = { start: '[', end: ']' }), + (this.formatTokenMap = formatTokenMap), + (this.setLocaleToValue = (it) => { + const ot = this.getCurrentLocaleCode() + return ot === it.locale() ? it : it.locale(ot) + }), + (this.syncMomentLocale = (it) => { + var ot + const at = hooks.locale(), + st = (ot = this.locale) != null ? ot : 'en-us' + if (at !== st) { + hooks.locale(st) + const lt = it() + return hooks.locale(at), lt + } + return it() + }), + (this.hasTimezonePlugin = () => typeof this.moment.tz < 'u'), + (this.createSystemDate = (it) => { + const ot = this.moment(it).local() + return this.locale === void 0 ? ot : ot.locale(this.locale) + }), + (this.createUTCDate = (it) => { + const ot = this.moment.utc(it) + return this.locale === void 0 ? ot : ot.locale(this.locale) + }), + (this.createTZDate = (it, ot) => { + if (!this.hasTimezonePlugin()) throw new Error(MISSING_TIMEZONE_PLUGIN) + const at = ot === 'default' ? this.moment(it) : this.moment.tz(it, ot) + return this.locale === void 0 ? at : at.locale(this.locale) + }), + (this.date = (it) => { + if (it === null) return null + const ot = this.moment(it) + return ot.locale(this.getCurrentLocaleCode()), ot + }), + (this.dateWithTimezone = (it, ot) => + it === null + ? null + : ot === 'UTC' + ? this.createUTCDate(it) + : ot === 'system' || (ot === 'default' && !this.hasTimezonePlugin()) + ? this.createSystemDate(it) + : this.createTZDate(it, ot)), + (this.getTimezone = (it) => { + var ot, at, st + const lt = (ot = it._z) == null ? void 0 : ot.name, + ct = it.isUTC() ? 'UTC' : 'system' + return (at = lt ?? ((st = this.moment.defaultZone) == null ? void 0 : st.name)) != null ? at : ct + }), + (this.setTimezone = (it, ot) => { + var at, st + if (this.getTimezone(it) === ot) return it + if (ot === 'UTC') return it.clone().utc() + if (ot === 'system') return it.clone().local() + if (!this.hasTimezonePlugin()) { + if (ot !== 'default') throw new Error(MISSING_TIMEZONE_PLUGIN) + return it + } + const lt = + ot === 'default' + ? (at = (st = this.moment.defaultZone) == null ? void 0 : st.name) != null + ? at + : 'system' + : ot + if (lt === 'system') return it.clone().local() + const ct = it.clone() + return ct.tz(lt), ct + }), + (this.toJsDate = (it) => it.toDate()), + (this.parseISO = (it) => this.moment(it, !0)), + (this.toISO = (it) => it.toISOString()), + (this.parse = (it, ot) => + it === '' ? null : this.locale ? this.moment(it, ot, this.locale, !0) : this.moment(it, ot, !0)), + (this.getCurrentLocaleCode = () => this.locale || hooks.locale()), + (this.is12HourCycleInCurrentLocale = () => + /A|a/.test(hooks.localeData(this.getCurrentLocaleCode()).longDateFormat('LT'))), + (this.expandFormat = (it) => { + const ot = /(\[[^[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})|./g + return it + .match(ot) + .map((at) => { + const st = at[0] + return st === 'L' || st === ';' ? hooks.localeData(this.getCurrentLocaleCode()).longDateFormat(at) : at + }) + .join('') + }), + (this.getFormatHelperText = (it) => this.expandFormat(it).replace(/a/gi, '(a|p)m').toLocaleLowerCase()), + (this.isNull = (it) => it === null), + (this.isValid = (it) => this.moment(it).isValid()), + (this.format = (it, ot) => this.formatByString(it, this.formats[ot])), + (this.formatByString = (it, ot) => { + const at = it.clone() + return at.locale(this.getCurrentLocaleCode()), at.format(ot) + }), + (this.formatNumber = (it) => it), + (this.getDiff = (it, ot, at) => it.diff(ot, at)), + (this.isEqual = (it, ot) => (it === null && ot === null ? !0 : this.moment(it).isSame(ot))), + (this.isSameYear = (it, ot) => it.isSame(ot, 'year')), + (this.isSameMonth = (it, ot) => it.isSame(ot, 'month')), + (this.isSameDay = (it, ot) => it.isSame(ot, 'day')), + (this.isSameHour = (it, ot) => it.isSame(ot, 'hour')), + (this.isAfter = (it, ot) => it.isAfter(ot)), + (this.isAfterYear = (it, ot) => it.isAfter(ot, 'year')), + (this.isAfterDay = (it, ot) => it.isAfter(ot, 'day')), + (this.isBefore = (it, ot) => it.isBefore(ot)), + (this.isBeforeYear = (it, ot) => it.isBefore(ot, 'year')), + (this.isBeforeDay = (it, ot) => it.isBefore(ot, 'day')), + (this.isWithinRange = (it, [ot, at]) => it.isBetween(ot, at, null, '[]')), + (this.startOfYear = (it) => it.clone().startOf('year')), + (this.startOfMonth = (it) => it.clone().startOf('month')), + (this.startOfWeek = (it) => it.clone().startOf('week')), + (this.startOfDay = (it) => it.clone().startOf('day')), + (this.endOfYear = (it) => it.clone().endOf('year')), + (this.endOfMonth = (it) => it.clone().endOf('month')), + (this.endOfWeek = (it) => it.clone().endOf('week')), + (this.endOfDay = (it) => it.clone().endOf('day')), + (this.addYears = (it, ot) => + ot < 0 ? it.clone().subtract(Math.abs(ot), 'years') : it.clone().add(ot, 'years')), + (this.addMonths = (it, ot) => + ot < 0 ? it.clone().subtract(Math.abs(ot), 'months') : it.clone().add(ot, 'months')), + (this.addWeeks = (it, ot) => + ot < 0 ? it.clone().subtract(Math.abs(ot), 'weeks') : it.clone().add(ot, 'weeks')), + (this.addDays = (it, ot) => (ot < 0 ? it.clone().subtract(Math.abs(ot), 'days') : it.clone().add(ot, 'days'))), + (this.addHours = (it, ot) => + ot < 0 ? it.clone().subtract(Math.abs(ot), 'hours') : it.clone().add(ot, 'hours')), + (this.addMinutes = (it, ot) => + ot < 0 ? it.clone().subtract(Math.abs(ot), 'minutes') : it.clone().add(ot, 'minutes')), + (this.addSeconds = (it, ot) => + ot < 0 ? it.clone().subtract(Math.abs(ot), 'seconds') : it.clone().add(ot, 'seconds')), + (this.getYear = (it) => it.get('year')), + (this.getMonth = (it) => it.get('month')), + (this.getDate = (it) => it.get('date')), + (this.getHours = (it) => it.get('hours')), + (this.getMinutes = (it) => it.get('minutes')), + (this.getSeconds = (it) => it.get('seconds')), + (this.getMilliseconds = (it) => it.get('milliseconds')), + (this.setYear = (it, ot) => it.clone().year(ot)), + (this.setMonth = (it, ot) => it.clone().month(ot)), + (this.setDate = (it, ot) => it.clone().date(ot)), + (this.setHours = (it, ot) => it.clone().hours(ot)), + (this.setMinutes = (it, ot) => it.clone().minutes(ot)), + (this.setSeconds = (it, ot) => it.clone().seconds(ot)), + (this.setMilliseconds = (it, ot) => it.clone().milliseconds(ot)), + (this.getDaysInMonth = (it) => it.daysInMonth()), + (this.getNextMonth = (it) => it.clone().add(1, 'month')), + (this.getPreviousMonth = (it) => it.clone().subtract(1, 'month')), + (this.getMonthArray = (it) => { + const at = [this.startOfYear(it)] + for (; at.length < 12; ) { + const st = at[at.length - 1] + at.push(this.getNextMonth(st)) + } + return at + }), + (this.mergeDateAndTime = (it, ot) => it.clone().hour(ot.hour()).minute(ot.minute()).second(ot.second())), + (this.getWeekdays = () => this.syncMomentLocale(() => hooks.weekdaysShort(!0))), + (this.getWeekArray = (it) => { + const ot = this.setLocaleToValue(it), + at = ot.clone().startOf('month').startOf('week'), + st = ot.clone().endOf('month').endOf('week') + let lt = 0, + ct = at + const ut = [] + for (; ct.isBefore(st); ) { + const ht = Math.floor(lt / 7) + ;(ut[ht] = ut[ht] || []), ut[ht].push(ct), (ct = ct.clone().add(1, 'day')), (lt += 1) + } + return ut + }), + (this.getWeekNumber = (it) => it.week()), + (this.getYearRange = (it, ot) => { + const at = this.moment(it).startOf('year'), + st = this.moment(ot).endOf('year'), + lt = [] + let ct = at + for (; ct.isBefore(st); ) lt.push(ct), (ct = ct.clone().add(1, 'year')) + return lt + }), + (this.getMeridiemText = (it) => + this.is12HourCycleInCurrentLocale() + ? hooks.localeData(this.getCurrentLocaleCode()).meridiem(it === 'am' ? 0 : 13, 0, !1) + : it === 'am' + ? 'AM' + : 'PM'), + (this.moment = rt || hooks), + (this.locale = et), + (this.formats = _extends$u({}, defaultFormats, nt)) + } + } + const MuiButton = { + defaultProps: { disableElevation: !0, disableRipple: !0 }, + styleOverrides: { + root: { + display: 'inline-flex', + padding: '12px 20px', + justifyContent: 'center', + alignItems: 'center', + gap: '10px', + borderRadius: '200px', + background: colors.BUTTON1, + color: 'var(--Primary-Text, #fff)', + fontFamily: 'Barlow', + fontSize: '12px', + fontStyle: 'normal', + fontWeight: '400', + lineHeight: '8px', + cursor: 'pointer', + columnGap: '6px', + '&:hover': { background: colors.BUTTON1_HOVER, color: colors.GRAY3, outline: 'none', boxShadow: 'none' }, + '&:focus': { outline: 'none', boxShadow: 'none', background: colors.BUTTON1_PRESS, color: colors.GRAY6 }, + '&:active': { outline: 'none', boxShadow: 'none', background: colors.BUTTON1_PRESS, color: colors.GRAY6 }, + '&.MuiButton-sizeSmall': { padding: '7px 16px', fontSize: '11px', lineHeight: '14px', fontWeight: 500 }, + '&.MuiButton-sizeLarge': { padding: '12px 24px', fontSize: '1.2rem' }, + '&.MuiButton-outlined': {}, + }, + outlined: { + borderColor: colors.BUTTON1, + borderWidth: '1px', + backgroundColor: 'transparent', + '&:hover': { borderColor: colors.BUTTON1_HOVER, backgroundColor: 'transparent', color: colors.GRAY3 }, + '&:active': { backgroundColor: colors.BUTTON1_PRESS, color: colors.GRAY6 }, + }, + containedSecondary: { + backgroundColor: colors.PRIMARY_BLUE, + borderRadius: '6px', + color: 'white', + '&:hover': { backgroundColor: colors.PRIMARY_BLUE_BORDER, color: colors.white }, + '&:active': { backgroundColor: colors.BLUE_PRESS_STATE, color: colors.white }, + '&:focus': { backgroundColor: colors.BLUE_PRESS_STATE, color: colors.white }, + }, + textSecondary: { color: 'purple', '&:hover': { color: 'darkpurple' } }, + startIcon: { fontSize: '1em', marginRight: 0 }, + endIcon: { fontSize: '1em' }, + }, + }, + palette = createPalette({ mode: 'dark', primary: { main: colors.primaryButton } }), + appTheme = createTheme({ + palette, + components: { MuiButton }, + typography: { button: { textTransform: 'none', whiteSpace: 'nowrap' } }, + breakpoints: { + values: { xs: breakpoints.small, sm: breakpoints.medium, md: breakpoints.large, lg: 1200, xl: 1500 }, + }, + }), + AppProviders = ({ children: tt }) => + jsxRuntimeExports.jsxs(ThemeProvider, { + theme: appTheme, + children: [ + jsxRuntimeExports.jsx(StyledEngineProvider, { injectFirst: !0 }), + jsxRuntimeExports.jsx(Le, { + theme: appTheme, + children: jsxRuntimeExports.jsx(LocalizationProvider, { dateAdapter: AdapterMoment, children: tt }), + }), + ], + }), + requiredRule = { required: { message: 'The field is required', value: !0 } }, + AboutAdminView = ({ initialValues: tt }) => { + const et = useForm({ defaultValues: tt, mode: 'onSubmit' }), + { isSubmitting: nt } = et.formState, + rt = et.handleSubmit(async (it) => { + try { + await postAboutData(it) + } catch (ot) { + console.warn(ot) + } + }) + return jsxRuntimeExports.jsx(FormProvider, { + ...et, + children: jsxRuntimeExports.jsx('form', { + id: 'add-node-form', + onSubmit: rt, + children: jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { + children: [ + jsxRuntimeExports.jsxs(Flex, { + children: [ + jsxRuntimeExports.jsx(Flex, { + pt: 12, + children: jsxRuntimeExports.jsx(TextInput, { + id: 'cy-about-title-id', + label: 'Graph Title', + maxLength: 50, + name: 'title', + placeholder: 'Type graph title here...', + rules: { ...requiredRule }, + }), + }), + jsxRuntimeExports.jsx(Flex, { + pt: 12, + children: jsxRuntimeExports.jsx(TextInput, { + id: 'cy-about-id', + label: 'Graph Description', + maxLength: 50, + name: 'description', + placeholder: 'Type graph description here...', + rules: { ...requiredRule }, + }), + }), + jsxRuntimeExports.jsx(Flex, { + pt: 12, + children: jsxRuntimeExports.jsx(TextInput, { + id: 'cy-about-mission_statement-id', + label: 'Mission Statement', + maxLength: 50, + name: 'mission_statement', + placeholder: 'Type mission statement here...', + rules: { ...requiredRule }, + }), + }), + jsxRuntimeExports.jsx(Flex, { + pt: 12, + children: jsxRuntimeExports.jsx(TextInput, { + id: 'cy-about-search_term-id', + label: 'Search Term', + maxLength: 50, + name: 'search_term', + placeholder: 'Type search term here...', + rules: { ...requiredRule }, + }), + }), + ], + }), + jsxRuntimeExports.jsx(Flex, { + pt: 8, + children: nt + ? jsxRuntimeExports.jsx(SubmitLoader, { + children: jsxRuntimeExports.jsx(ClipLoader$2, { color: colors.white, size: 20 }), + }) + : jsxRuntimeExports.jsx(Button, { + disabled: nt, + id: 'add-node-submit-cta', + kind: 'big', + type: 'submit', + children: 'Save changes', + }), + }), + ], + }), + }), + }) + }, + SubmitLoader = styled$4(Flex).attrs({ + align: 'center', + background: 'primaryButton', + borderRadius: 8, + justify: 'center', + })` + padding: 16px 24px; + opacity: 0.5; +`, + CommonView = ({ initialValues: tt }) => + jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { + children: [ + tt.title && + jsxRuntimeExports.jsxs(Flex, { + pt: 12, + children: [ + jsxRuntimeExports.jsx(Text$3, { kind: 'regular', children: 'Graph Title' }), + jsxRuntimeExports.jsx(Flex, { + pt: 12, + children: jsxRuntimeExports.jsx(Text$3, { className: 'value', kind: 'medium', children: tt.title }), + }), + ], + }), + tt.description && + jsxRuntimeExports.jsxs(Flex, { + pt: 12, + children: [ + jsxRuntimeExports.jsx(Text$3, { kind: 'regular', children: 'Graph Description' }), + jsxRuntimeExports.jsx(Flex, { + pt: 12, + children: jsxRuntimeExports.jsx(Text$3, { + className: 'value', + kind: 'medium', + children: tt.description, + }), + }), + ], + }), + tt.mission_statement && + jsxRuntimeExports.jsxs(Flex, { + pt: 12, + children: [ + jsxRuntimeExports.jsx(Text$3, { kind: 'regular', children: 'Mission Statement' }), + jsxRuntimeExports.jsx(Flex, { + pt: 12, + children: jsxRuntimeExports.jsx(Text$3, { + className: 'value', + kind: 'medium', + children: tt.mission_statement, + }), + }), + ], + }), + ], + }), + admins = [ + '02c431e64078b10925584d64824c9d1d12eca05e2c56660ffa5ac84aa6946adfe5', + '03a9a8d953fe747d0dd94dd3c567ddc58451101e987e2d2bf7a4d1e10a2c89ff38', + '024efa31d1e4f98bccc415b222c9d971866013ad6f95f7d1ed9e8be8e3355a36ff', + ], + defaultData$1 = { description: '', mission_statement: '', search_term: '', title: '' }, + About = () => { + const [tt, et, nt, rt] = useUserStore((ut) => [ut.setIsAdmin, ut.isAdmin, ut.setPubKey, ut.pubKey]), + [it, ot] = reactExports.useState(!1), + [at, st] = reactExports.useState(defaultData$1) + reactExports.useEffect(() => { + ;(async () => { + ot(!0) + try { + const ht = await getAboutData() + st(ht) + } catch (ht) { + console.warn(ht) + } finally { + ot(!1) + } + })() + }, []) + const lt = async () => { + await executeIfProd(async () => { + try { + const ut = await distExports$1.enable(), + ht = ut == null ? void 0 : ut.pubkey + nt(ht), ht && tt(ht && admins.includes(ht)) + } catch (ut) { + console.warn(ut) + } + }) + }, + ct = () => + rt + ? rt && et + ? null + : jsxRuntimeExports.jsx(Text$3, { children: 'You are not admin' }) + : jsxRuntimeExports.jsx(EditButton, { kind: 'small', onClick: lt, children: 'Admin' }) + return jsxRuntimeExports.jsxs(Wrapper$c, { + align: 'stretch', + direction: 'column', + justify: 'flex-end', + children: [ + jsxRuntimeExports.jsxs(Heading$3, { + align: 'center', + direction: 'row', + justify: 'space-between', + children: [jsxRuntimeExports.jsx(Text$3, { className: 'title', children: 'About' }), ct()], + }), + it + ? jsxRuntimeExports.jsx(ContentWrapper, { + align: 'center', + justify: 'center', + children: jsxRuntimeExports.jsx(ClipLoader$2, {}), + }) + : jsxRuntimeExports.jsx(ContentWrapper, { + align: 'stretch', + justify: 'flex-start', + children: et + ? jsxRuntimeExports.jsx(AboutAdminView, { initialValues: at }) + : jsxRuntimeExports.jsx(CommonView, { initialValues: at }), + }), + ], + }) + }, + Wrapper$c = styled$4(Flex)` + border-radius: 8px; + box-shadow: 0px 5px 6px rgb(0 0 0 / 50%); + padding: 16px; + flex: 1; - generate(input, _channel, parameters) { - const step = Math.pow(0.5, parameters.bits - 1); - const val = step * Math.floor(input / step + 0.5); - return val; - } - } -`;registerProcessor(workletName,bitCrusherWorklet);class Merge extends ToneAudioNode{constructor(){super(optionsFromArguments(Merge.getDefaults(),arguments,["channels"])),this.name="Merge";const et=optionsFromArguments(Merge.getDefaults(),arguments,["channels"]);this._merger=this.output=this.input=this.context.createChannelMerger(et.channels)}static getDefaults(){return Object.assign(ToneAudioNode.getDefaults(),{channels:2})}dispose(){return super.dispose(),this._merger.disconnect(),this}}class Reverb extends Effect{constructor(){super(optionsFromArguments(Reverb.getDefaults(),arguments,["decay"])),this.name="Reverb",this._convolver=this.context.createConvolver(),this.ready=Promise.resolve();const et=optionsFromArguments(Reverb.getDefaults(),arguments,["decay"]);this._decay=et.decay,this._preDelay=et.preDelay,this.generate(),this.connectEffect(this._convolver)}static getDefaults(){return Object.assign(Effect.getDefaults(),{decay:1.5,preDelay:.01})}get decay(){return this._decay}set decay(et){et=this.toSeconds(et),assertRange(et,.001),this._decay=et,this.generate()}get preDelay(){return this._preDelay}set preDelay(et){et=this.toSeconds(et),assertRange(et,0),this._preDelay=et,this.generate()}generate(){return __awaiter(this,void 0,void 0,function*(){const et=this.ready,nt=new OfflineContext(2,this._decay+this._preDelay,this.context.sampleRate),rt=new Noise({context:nt}),it=new Noise({context:nt}),ot=new Merge({context:nt});rt.connect(ot,0,0),it.connect(ot,0,1);const at=new Gain({context:nt}).toDestination();ot.connect(at),rt.start(0),it.start(0),at.gain.setValueAtTime(0,0),at.gain.setValueAtTime(1,this._preDelay),at.gain.exponentialApproachValueAtTime(0,this._preDelay,this.decay);const st=nt.render();return this.ready=st.then(noOp),yield et,this._convolver.buffer=(yield st).get(),this})}dispose(){return super.dispose(),this._convolver.disconnect(),this}}class Solo extends ToneAudioNode{constructor(){super(optionsFromArguments(Solo.getDefaults(),arguments,["solo"])),this.name="Solo";const et=optionsFromArguments(Solo.getDefaults(),arguments,["solo"]);this.input=this.output=new Gain({context:this.context}),Solo._allSolos.has(this.context)||Solo._allSolos.set(this.context,new Set),Solo._allSolos.get(this.context).add(this),this.solo=et.solo}static getDefaults(){return Object.assign(ToneAudioNode.getDefaults(),{solo:!1})}get solo(){return this._isSoloed()}set solo(et){et?this._addSolo():this._removeSolo(),Solo._allSolos.get(this.context).forEach(nt=>nt._updateSolo())}get muted(){return this.input.gain.value===0}_addSolo(){Solo._soloed.has(this.context)||Solo._soloed.set(this.context,new Set),Solo._soloed.get(this.context).add(this)}_removeSolo(){Solo._soloed.has(this.context)&&Solo._soloed.get(this.context).delete(this)}_isSoloed(){return Solo._soloed.has(this.context)&&Solo._soloed.get(this.context).has(this)}_noSolos(){return!Solo._soloed.has(this.context)||Solo._soloed.has(this.context)&&Solo._soloed.get(this.context).size===0}_updateSolo(){this._isSoloed()?this.input.gain.value=1:this._noSolos()?this.input.gain.value=1:this.input.gain.value=0}dispose(){return super.dispose(),Solo._allSolos.get(this.context).delete(this),this._removeSolo(),this}}Solo._allSolos=new Map;Solo._soloed=new Map;class PanVol extends ToneAudioNode{constructor(){super(optionsFromArguments(PanVol.getDefaults(),arguments,["pan","volume"])),this.name="PanVol";const et=optionsFromArguments(PanVol.getDefaults(),arguments,["pan","volume"]);this._panner=this.input=new Panner({context:this.context,pan:et.pan,channelCount:et.channelCount}),this.pan=this._panner.pan,this._volume=this.output=new Volume({context:this.context,volume:et.volume}),this.volume=this._volume.volume,this._panner.connect(this._volume),this.mute=et.mute,readOnly(this,["pan","volume"])}static getDefaults(){return Object.assign(ToneAudioNode.getDefaults(),{mute:!1,pan:0,volume:0,channelCount:1})}get mute(){return this._volume.mute}set mute(et){this._volume.mute=et}dispose(){return super.dispose(),this._panner.dispose(),this.pan.dispose(),this._volume.dispose(),this.volume.dispose(),this}}class Channel extends ToneAudioNode{constructor(){super(optionsFromArguments(Channel.getDefaults(),arguments,["volume","pan"])),this.name="Channel";const et=optionsFromArguments(Channel.getDefaults(),arguments,["volume","pan"]);this._solo=this.input=new Solo({solo:et.solo,context:this.context}),this._panVol=this.output=new PanVol({context:this.context,pan:et.pan,volume:et.volume,mute:et.mute,channelCount:et.channelCount}),this.pan=this._panVol.pan,this.volume=this._panVol.volume,this._solo.connect(this._panVol),readOnly(this,["pan","volume"])}static getDefaults(){return Object.assign(ToneAudioNode.getDefaults(),{pan:0,volume:0,mute:!1,solo:!1,channelCount:1})}get solo(){return this._solo.solo}set solo(et){this._solo.solo=et}get muted(){return this._solo.muted||this.mute}get mute(){return this._panVol.mute}set mute(et){this._panVol.mute=et}_getBus(et){return Channel.buses.has(et)||Channel.buses.set(et,new Gain({context:this.context})),Channel.buses.get(et)}send(et,nt=0){const rt=this._getBus(et),it=new Gain({context:this.context,units:"decibels",gain:nt});return this.connect(it),it.connect(rt),it}receive(et){return this._getBus(et).connect(this),this}dispose(){return super.dispose(),this._panVol.dispose(),this.pan.dispose(),this.volume.dispose(),this._solo.dispose(),this}}Channel.buses=new Map;class Listener extends ToneAudioNode{constructor(){super(...arguments),this.name="Listener",this.positionX=new Param({context:this.context,param:this.context.rawContext.listener.positionX}),this.positionY=new Param({context:this.context,param:this.context.rawContext.listener.positionY}),this.positionZ=new Param({context:this.context,param:this.context.rawContext.listener.positionZ}),this.forwardX=new Param({context:this.context,param:this.context.rawContext.listener.forwardX}),this.forwardY=new Param({context:this.context,param:this.context.rawContext.listener.forwardY}),this.forwardZ=new Param({context:this.context,param:this.context.rawContext.listener.forwardZ}),this.upX=new Param({context:this.context,param:this.context.rawContext.listener.upX}),this.upY=new Param({context:this.context,param:this.context.rawContext.listener.upY}),this.upZ=new Param({context:this.context,param:this.context.rawContext.listener.upZ})}static getDefaults(){return Object.assign(ToneAudioNode.getDefaults(),{positionX:0,positionY:0,positionZ:0,forwardX:0,forwardY:0,forwardZ:-1,upX:0,upY:1,upZ:0})}dispose(){return super.dispose(),this.positionX.dispose(),this.positionY.dispose(),this.positionZ.dispose(),this.forwardX.dispose(),this.forwardY.dispose(),this.forwardZ.dispose(),this.upX.dispose(),this.upY.dispose(),this.upZ.dispose(),this}}onContextInit(tt=>{tt.listener=new Listener({context:tt})});onContextClose(tt=>{tt.listener.dispose()});getContext().transport;const Destination=getContext().destination;getContext().destination;getContext().listener;getContext().draw;getContext();const highPassFilter=new Filter(900,"highpass"),effectsBus=new Volume(-6);effectsBus.chain(highPassFilter,Destination);const reverb=new Reverb(3).connect(effectsBus),monoSynth=new MonoSynth({envelope:{attack:0,decay:.9,sustain:.2,release:.1}});monoSynth.oscillator.type="triangle2";monoSynth.volume.value=-6;monoSynth.chain(highPassFilter,Destination);const monoSynth2=new MonoSynth({envelope:{attack:.4,decay:.9,sustain:.7,release:.6}}).connect(reverb);monoSynth2.oscillator.type="triangle";monoSynth2.volume.value=-6;monoSynth2.chain(highPassFilter,Destination);function addOrganicVariant(){return Math.floor((Math.random()-.5)*20)}let toneStarted=!1;const playInspectSound=async(tt=0)=>{toneStarted||(await start$1(),toneStarted=!0);try{if(tt>2e3)monoSynth2.triggerAttackRelease(60,.3);else if(tt>1e3){let et=310;et+=addOrganicVariant(),monoSynth.triggerAttackRelease(et,.001)}}catch(et){console.warn(et)}};let lookAtAnimationTimer,departAnimationTimer;const departAnimationTimerLength=4e3,lookAtAnimationTimerLength=2e3,useAutoNavigate=tt=>{const et=useSelectedNode(),nt=useDataStore(At=>At.cameraFocusTrigger),rt=useControlStore(At=>At.isUserDragging),it=useControlStore(At=>At.isUserScrolling),ot=useControlStore(At=>At.setUserMovedCamera),at=useDataStore(At=>At.setNearbyNodeIds),st=useDataStore(At=>At.showSelectionGraph),lt=useDataStore(At=>At.data),ct=useDataStore(At=>At.graphStyle),{camera:ut}=useThree(),[ht,dt]=reactExports.useState(!1),[pt,mt]=reactExports.useState(!1),[gt,yt]=reactExports.useState(arriveDistance),bt=reactExports.useMemo(()=>{if(st)return new Vector3(0,0,0);const At=lt==null?void 0:lt.nodes.find($t=>$t.ref_id===(et==null?void 0:et.ref_id));let Et=new Vector3(0,0,0);if(At&<){const $t=lt==null?void 0:lt.nodes.filter(wt=>{var It;return(It=At.children)==null?void 0:It.find(Ot=>Ot===wt.id)}),Dt=new Vector3(At.x,At.y,At.z);let jt=new Vector3(0,0,0);$t.map(wt=>(jt=jt.add(new Vector3(wt.x,wt.y,wt.z).normalize()),wt));const Pt=At.scale?1-1/(At.scale+10):1,Ct=Dt.sub(jt).multiplyScalar(.8*Pt);Et=Dt.add(Ct)}return Et},[st,et,lt]),vt=reactExports.useMemo(()=>{if(st)return new Vector3(0,0,0);const At=lt==null?void 0:lt.nodes.find(Et=>Et.ref_id===(et==null?void 0:et.ref_id));return new Vector3((At==null?void 0:At.x)||0,(At==null?void 0:At.y)||0,(At==null?void 0:At.z)||0)},[st,et,lt]);reactExports.useEffect(()=>{var At;st&&((At=tt.current)==null||At.setLookAt(selectionGraphCameraPosition.x,selectionGraphCameraPosition.y,selectionGraphCameraPosition.z,0,0,0,!1)),xt()},[st]),reactExports.useEffect(()=>{st?yt(selectionGraphDistance):(et==null?void 0:et.node_type)==="topic"?yt(topicArriveDistance):yt(arriveDistance)},[et,yt,st]),reactExports.useEffect(()=>{kt()},[nt]),reactExports.useEffect(()=>{(rt||it)&&(dt(!0),mt(!0))},[rt,it,dt,mt]),reactExports.useEffect(()=>{if(et)if(!st&&ct==="earth"&&(tt!=null&&tt.current)){const At=tt.current.camera.position.distanceTo(new Vector3),Et=getPointAbove(vt,-At/2);tt.current.setLookAt(Et.x,Et.y,Et.z,0,0,0,!0)}else lookAtAnimationTimer&&clearTimeout(lookAtAnimationTimer),lookAtAnimationTimer=setTimeout(()=>{mt(!0),clearTimeout(lookAtAnimationTimer)},lookAtAnimationTimerLength),xt();return()=>{lookAtAnimationTimer&&clearTimeout(lookAtAnimationTimer),departAnimationTimer&&clearTimeout(departAnimationTimer)}},[et]),useFrame(At=>{tt.current&&et&&(ht||St(bt,At.camera),pt||Tt(vt,At.camera))});const xt=()=>{if(et){const At=ut.position.distanceTo(bt);playInspectSound(At)}kt()},kt=()=>{dt(!1),mt(!1),ot(!1),departAnimationTimer&&clearTimeout(departAnimationTimer),departAnimationTimer=setTimeout(()=>{dt(!0),mt(!0)},departAnimationTimerLength)},St=(At,Et)=>{if(Et.position.distanceTo(At){var $t;($t=tt==null?void 0:tt.current)==null||$t.setLookAt(Et.position.x,Et.position.y,Et.position.z,At.x,At.y,At.z,!0)};return null},autoRotateSpeed=1;let cameraAnimation=null;const useCameraAnimations=(tt,{enabled:et})=>{const nt=useSelectedNode();useAutoNavigate(tt);const rt=useControlStore(ct=>ct.isUserDragging),it=useDataStore(ct=>ct.disableCameraRotation),ot=useDataStore(ct=>ct.data),at=useDataStore(ct=>ct.graphRadius),st=useDataStore(ct=>ct.setNearbyNodeIds);reactExports.useEffect(()=>{et||(cameraAnimation==null||cameraAnimation.kill(),cameraAnimation=null)},[et]);const lt=reactExports.useCallback(()=>{cameraAnimation==null||cameraAnimation.kill();const ct={value:-244},ut=gsapWithCSS.to(ct,{duration:5,keyframes:{"0%":{value:10},"100%":{delay:2,ease:"Power4.easeIn",value:-200}},onComplete:()=>{cameraAnimation=null},onInterrupt(){ut.kill()},onUpdate:()=>{var dt;const{value:ht}=ct;if(tt.current){const pt=getNearbyNodeIds((ot==null?void 0:ot.nodes)||[],tt.current.camera);pt&&st(pt),(dt=tt.current)==null||dt.dolly(ht,!1)}}});ut.play(),cameraAnimation=ut},[]);return reactExports.useEffect(()=>{tt.current&&at&&(tt.current.maxDistance=tt.current.getDistanceToFitSphere(at+200)),et&<()},[at]),reactExports.useEffect(()=>{!nt&&tt.current&&tt.current.setLookAt(initialCameraPosition.x,initialCameraPosition.y,initialCameraPosition.z,0,0,0,!0)},[nt]),useFrame((ct,ut)=>{tt.current&&(!it&&!rt&&(tt.current.azimuthAngle+=autoRotateSpeed*ut*MathUtils.DEG2RAD),tt.current.update(ut))}),null},Controls=({disableAnimations:tt})=>{const et=reactExports.useRef(null),nt=useDataStore(dt=>dt.graphStyle),rt=useDataStore(dt=>dt.data),it=useDataStore(dt=>dt.setNearbyNodeIds),ot=useDataStore(dt=>dt.setDisableCameraRotation),[at]=reactExports.useState(.8),{camera:st}=useThree(),[lt,ct,ut,ht]=useControlStore(dt=>[dt.isUserDragging,dt.setIsUserDragging,dt.isUserScrolling,dt.isUserScrollingOnHtmlPanel]);return useCameraAnimations(et,{enabled:!tt&&!ut&&!lt}),reactExports.useEffect(()=>{et.current&&et.current.setLookAt(initialCameraPosition.x,initialCameraPosition.y,initialCameraPosition.z,0,0,0,!0)},[nt]),reactExports.useEffect(()=>{if(!lt){const dt=getNearbyNodeIds((rt==null?void 0:rt.nodes)||[],st);dt&&it(dt)}},[st,st.position,st.position.x,st.position.y,st.position.z,rt==null?void 0:rt.nodes,it,lt]),reactExports.useEffect(()=>{lt&&ot(!0)},[lt,ot]),jsxRuntimeExports.jsx(CameraControls,{ref:et,boundaryEnclosesCamera:!0,enabled:!ht,makeDefault:!0,maxDistance:12e3,minDistance:100,onEnd:()=>ct(!1),onStart:()=>ct(!0),smoothTime:at})},smoothness={metalness:.9,roughness:0},materialOptions={...smoothness},blurryMaterial=new MeshStandardMaterial(materialOptions),BlurryInstances=({hide:tt})=>{const et=useGraphData(),nt=useDataStore(it=>it.graphStyle),rt=reactExports.useMemo(()=>et.nodes.map((it,ot)=>{if(it.node_type==="topic")return!1;const at=!isMainTopic(it),st=getNodeColorByType(it.node_type||"",!0);return jsxRuntimeExports.jsx(Instance,{color:st,name:it.id,position:[it.x,it.y,it.z],scale:at?(it.scale||1)*.9:0,userData:it},`${it.ref_id||it.id}-instanced-node-${ot}-${nt}`)}),[nt,et]);return jsxRuntimeExports.jsx(Instances,{geometry:boxGeometry,material:blurryMaterial,visible:!tt,children:rt})},loader=new TextureLoader,noImageTexture=loader.load("noimage.jpeg"),noImageMaterial=new MeshStandardMaterial({...smoothness,map:noImageTexture}),transparentValue=.4,noImageTransparentMaterial=new MeshStandardMaterial({...smoothness,map:noImageTexture,transparent:!0,opacity:transparentValue}),cachedMaterials={},useMaterial=(tt,et)=>{const[nt,rt]=reactExports.useState(noImageTexture),[it,ot]=reactExports.useState(noImageMaterial);return reactExports.useEffect(()=>{const at=`${tt}${et&&"-transparent"}`;if(cachedMaterials[at]){rt(cachedMaterials[at].texture),ot(cachedMaterials[at].material);return}loader.load(tt,st=>{const lt=new MeshStandardMaterial({map:st,transparent:et,opacity:et?transparentValue:1,...smoothness});cachedMaterials[at]={texture:st,material:lt},rt(st),ot(lt)},void 0,()=>{rt(noImageTexture),ot(et?noImageTransparentMaterial:noImageMaterial)})},[tt,et]),reactExports.useEffect(()=>function(){nt.dispose(),it.dispose()},[nt,it]),it},Cube=reactExports.memo(({node:tt,hide:et,animated:nt})=>{const rt=reactExports.useRef(null),[it]=reactExports.useState(boxGeometry),ot=useSelectedNode(),at=useDataStore(ut=>ut.showSelectionGraph),st=!!ot&&tt.ref_id===ot.ref_id,lt=useMaterial(tt.image_url||"noimage.jpeg",!1);useFrame((ut,ht)=>{nt&&rt.current&&(rt.current.position.set(tt.x,tt.y,tt.z),st&&(rt.current.rotation.y+=ht*1,rt.current.rotation.x-=ht*.6))}),reactExports.useEffect(()=>function(){it.dispose()},[it]);const ct=reactExports.useMemo(()=>at&&st?20:st?(tt.scale||1)*1.2:tt.scale,[tt,st,at]);return jsxRuntimeExports.jsx(Select,{enabled:!!st,children:jsxRuntimeExports.jsx("mesh",{ref:rt,geometry:boxGeometry,material:lt,name:tt.id,position:[tt.x,tt.y,tt.z],scale:ct,userData:tt,visible:!et})})});Cube.displayName="Cube";const TypesMapper={youtube:"video",podcast:"audio",episode:"audio",clip:"audio",tweet:"twitter",person:"person",guest:"person",twitter_space:"audio"},Avatar$1=styled$4.div` - background-image: ${({src:tt,type:et="audio"})=>`url(${tt}), url('/${TypesMapper[et]}_placeholder_img.png')`}; - background-size: contain; - background-repeat: no-repeat; - width: ${({size:tt=45})=>tt}px; - height: ${({size:tt=45})=>tt}px; - border-radius: ${({rounded:tt})=>tt?"50%":"2px"}; -`,EpisodeTypeImages={podcast:{img:"audio_badge.svg",label:"podcast"},clip:{img:"audio_badge.svg",label:"clip"},show:{img:"audio_badge.svg",label:"show"},tweet:{img:"twitter_badge.svg",label:"tweet"},twitter_space:{img:"audio_badge.svg",label:"twitter_space"},youtube:{img:"video_badge.svg",label:"episode"},episode:{img:"video_badge.svg",label:"episode"},document:{img:"notes_badge.svg",label:"text"}},TypeBadge=({type:tt})=>{var et,nt,rt;return jsxRuntimeExports.jsxs(EpisodeWrapper$3,{children:[jsxRuntimeExports.jsx("img",{alt:((et=EpisodeTypeImages[tt])==null?void 0:et.label)||tt,src:((nt=EpisodeTypeImages[tt])==null?void 0:nt.img)||""}),jsxRuntimeExports.jsx("div",{className:"label",children:((rt=EpisodeTypeImages[tt])==null?void 0:rt.label)||tt})]})},EpisodeWrapper$3=styled$4(Flex).attrs({direction:"row"})` - cursor: pointer; - background: ${colors.white}; - border-radius: 1px; - overflow: hidden; + .title { + margin-bottom: 16px; + font-size: 20px; + } - img { - width: 14px; - height: 14px; - object-fit: cover; + .value { + color: ${colors.lightBlue400}; + } +`, + ContentWrapper = styled$4(Flex)` + min-height: 0; + overflow: auto; + flex: 1; + width: 100%; +`, + EditButton = styled$4(Button)` + margin-left: auto; +`, + Heading$3 = styled$4(Flex)` + margin-bottom: 16px; + ${Text$3} { + margin-bottom: 0; } +`, + Sentiment = () => { + const [tt, et] = reactExports.useState(void 0), + [nt] = useUserStore((at) => [at.setBudget]), + [rt, it] = reactExports.useState(!1), + ot = async () => { + it(!0), + await executeIfProd(() => distExports$1.enable()), + getSentimentData() + .then(async (at) => { + et( + at == null + ? void 0 + : at.data + .filter((st) => st.date) + .map((st) => ({ + date: hooks.unix(Number(String(st.date).split('.')[0])).format('MM/DD/YY'), + score: st.sentiment_score, + })), + ), + await updateBudget(nt) + }) + .catch(console.error) + .finally(() => { + it(!1) + }) + } + return jsxRuntimeExports.jsxs(ChartWrapper, { + align: 'flex-start', + direction: 'column', + id: 'cy-sentiment-chart-wrapper', + justify: 'flex-end', + children: [ + jsxRuntimeExports.jsx(Text$3, { className: 'title', children: 'Sentiment chart' }), + rt && + jsxRuntimeExports.jsx(Stack$5, { + alignItems: 'center', + component: 'div', + flexGrow: 1, + p: 4, + spacing: 2, + width: '100%', + children: jsxRuntimeExports.jsx(PropagateLoader, { color: colors.white }), + }), + !(tt != null && tt.length) && + jsxRuntimeExports.jsx(StyledButton, { + className: 'button', + id: 'cy-get-sentiments-btn', + onClick: ot, + children: 'Get top 100 sentiments', + }), + jsxRuntimeExports.jsx(SentimentChart, { data: tt }), + ], + }) + }, + ChartWrapper = styled$4(Flex)` + border-radius: 8px; + box-shadow: 0px 5px 6px rgb(0 0 0 / 50%); + padding: 16px; - .label { - color: ${colors.BG1}; - font-family: Barlow; - font-size: 8px; - font-style: normal; - font-weight: 800; - line-height: 14px; - text-transform: uppercase; - line-height: 14px; - letter-spacing: 0.48px; - padding: 0 4px; + .title { + margin-bottom: 16px; + font-size: 20px; } -`,Tag=styled$4(Flex)` - text-align: center; - width: ${tt=>tt.type==="topic"?"auto":`${tt.size}px`}; - height: ${tt=>tt.type==="topic"?"auto":`${tt.size}px`}; - outline: 1px solid ${tt=>colors.white}; - outline-offset: 0px; - background: rgba(0, 0, 0, 0.75); - color: ${tt=>tt.fontColor}; - border-radius: ${tt=>`${tt.type==="guest"?"100%":"6px"}`}; - font-size: ${tt=>`${tt.fontSize}px`}; +`, + StyledButton = styled$4(Button)` + height: 48px; +`, + MENU_WIDTH$1 = 600, + ComponentsMapper = { + about: jsxRuntimeExports.jsx(About, {}), + sentiment: jsxRuntimeExports.jsx(Sentiment, {}), + sources: jsxRuntimeExports.jsx(SourcesView, {}), + '': null, + }, + SecondarySideBar = () => { + const [tt, et] = useAppStore((nt) => [nt.secondarySidebarActiveTab, nt.setSecondarySidebarActiveTab]) + return jsxRuntimeExports.jsx(Slide$1, { + direction: 'left', + in: !!tt, + mountOnEnter: !0, + unmountOnExit: !0, + children: jsxRuntimeExports.jsxs(Wrapper$b, { + id: 'secondary-sidebar-wrapper', + children: [ + jsxRuntimeExports.jsx(CloseButton$2, { + id: 'cy-close-secondary-sidebar', + onClick: () => et(''), + children: jsxRuntimeExports.jsx(MdClose, {}), + }), + ComponentsMapper[tt], + ], + }), + }) + }, + Wrapper$b = styled$4(Flex)(({ theme: tt }) => ({ + background: colors.BG1, + height: '100vh', + padding: '16px 20px', + width: '100%', + zIndex: 30, + display: 'flex', + [tt.breakpoints.up('sm')]: { width: MENU_WIDTH$1 }, + })), + CloseButton$2 = styled$4(Flex).attrs({ align: 'center', justify: 'center', p: 5 })` + background-color: ${colors.inputBg1}; + border-radius: 50%; + color: ${colors.mainBottomIcons}; cursor: pointer; - transition: font-size 0.4s, outline 0.4s; - transform: scale(${tt=>tt.scale}); - align-items: center; - justify-content: center; - font-family: Barlow; - font-size: 26px; - font-style: normal; - font-weight: 700; - text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5); + transition-duration: 0.2s; + align-self: flex-end; + margin-bottom: 16px; &:hover { - outline-offset: 4px; + background-color: ${colors.gray200}; } +`, + ChevronLeftIcon = (tt) => + jsxRuntimeExports.jsx('svg', { + width: '1em', + height: '1em', + viewBox: '0 0 18 18', + fill: 'currentColor', + xmlns: 'http://www.w3.org/2000/svg', + children: jsxRuntimeExports.jsxs('g', { + id: 'keyboard_arrow_left', + children: [ + jsxRuntimeExports.jsx('mask', { + id: 'mask0_1428_267', + maskUnits: 'userSpaceOnUse', + x: '0', + y: '0', + width: '18', + height: '18', + children: jsxRuntimeExports.jsx('path', { + id: 'Bounding box', + d: 'M0 0H18V18H0V0Z', + fill: 'currentColor', + }), + }), + jsxRuntimeExports.jsx('g', { + mask: 'url(#mask0_1428_267)', + children: jsxRuntimeExports.jsx('path', { + id: 'keyboard_arrow_left_2', + d: 'M8.10001 8.99998L11.025 11.925C11.1625 12.0625 11.2313 12.2375 11.2313 12.45C11.2313 12.6625 11.1625 12.8375 11.025 12.975C10.8875 13.1125 10.7125 13.1812 10.5 13.1812C10.2875 13.1812 10.1125 13.1125 9.97501 12.975L6.52501 9.52498C6.45001 9.44998 6.39688 9.36873 6.36563 9.28123C6.33438 9.19373 6.31876 9.09998 6.31876 8.99998C6.31876 8.89998 6.33438 8.80623 6.36563 8.71873C6.39688 8.63123 6.45001 8.54998 6.52501 8.47498L9.97501 5.02498C10.1125 4.88748 10.2875 4.81873 10.5 4.81873C10.7125 4.81873 10.8875 4.88748 11.025 5.02498C11.1625 5.16248 11.2313 5.33748 11.2313 5.54998C11.2313 5.76248 11.1625 5.93748 11.025 6.07498L8.10001 8.99998Z', + fill: 'currentColor', + }), + }), + ], + }), + }), + SearchIcon = (tt) => + jsxRuntimeExports.jsx('svg', { + width: '1em', + height: '1em', + viewBox: '0 0 32 32', + fill: 'currentColor', + xmlns: 'http://www.w3.org/2000/svg', + children: jsxRuntimeExports.jsx('g', { + id: 'Property 1=Normal', + children: jsxRuntimeExports.jsx('path', { + id: 'search', + d: 'M15.5192 20.6153C13.8115 20.6153 12.3654 20.023 11.1808 18.8384C9.99618 17.6538 9.40387 16.2077 9.40387 14.5C9.40387 12.7923 9.99618 11.3462 11.1808 10.1615C12.3654 8.97694 13.8115 8.38464 15.5192 8.38464C17.2269 8.38464 18.6731 8.97694 19.8577 10.1615C21.0423 11.3462 21.6346 12.7923 21.6346 14.5C21.6346 15.2141 21.5147 15.8961 21.275 16.5461C21.0352 17.1961 20.7153 17.7615 20.3153 18.2423L23.0692 20.9961C23.2077 21.1346 23.2785 21.3087 23.2817 21.5183C23.2849 21.7279 23.2141 21.9051 23.0692 22.05C22.9243 22.1948 22.7487 22.2673 22.5423 22.2673C22.3359 22.2673 22.1603 22.1948 22.0154 22.05L19.2615 19.2961C18.7615 19.7089 18.1865 20.032 17.5365 20.2653C16.8865 20.4987 16.2141 20.6153 15.5192 20.6153ZM15.5192 19.1154C16.8077 19.1154 17.899 18.6683 18.7933 17.774C19.6875 16.8798 20.1346 15.7885 20.1346 14.5C20.1346 13.2115 19.6875 12.1202 18.7933 11.2259C17.899 10.3317 16.8077 9.88459 15.5192 9.88459C14.2308 9.88459 13.1394 10.3317 12.2452 11.2259C11.351 12.1202 10.9038 13.2115 10.9038 14.5C10.9038 15.7885 11.351 16.8798 12.2452 17.774C13.1394 18.6683 14.2308 19.1154 15.5192 19.1154Z', + fill: 'currentColor', + }), + }), + }), + Input = styled$4.input.attrs(() => ({ autoCorrect: 'off', autoComplete: 'off' }))` + pointer-events: auto; + height: 48px; + padding: 0 20px; + z-index: 2; + box-shadow: 0px 1px 6px rgba(0, 0, 0, 0.1); + width: 100%; + color: #fff; + box-shadow: none; + border: none; + border-radius: 200px; + background: ${colors.BG2}; - &.selected { - .badge-wrapper { - top: 0; - } - - font-size: 36px; - - &:hover { - outline-offset: 0px; - } + &:focus { + outline: 1px solid ${colors.primaryBlue}; } - &.topic { - outline: none; - background: none; - &:hover { - font-size: 36px; - } - white-space: nowrap; - .badge-wrapper { - display: none; - } + &:hover { + background: ${colors.black}; } - .badge-wrapper { - position: absolute; - top: -7px; - left: -14px; + &::placeholder { + color: ${colors.GRAY7}; } -`;styled$4.img` - background-image: ${({src:tt})=>`url(${tt})`}; - background-size: contain; - background-repeat: no-repeat; - width: ${tt=>tt.size}px; - height: ${tt=>tt.size}px; - border-radius: ${tt=>tt.borderRadius}; -`;styled$4.div` - display: flex; - position: absolute; - bottom: -14px; - left: -5px; - width: auto; - justify-content: center; - align-items: center; -`;styled$4.div` - display: flex; - justify-content: center; - align-items: center; - background: ${colors.transparentBlack}; - border: 2px solid ${tt=>tt.color}; - color: #fff; - padding: 0 4px; - min-width: 30px; - height: 26px; - font-size: 12px; - font-weight: 500; - border-radius: 6px; - margin-right: 5px; -`;styled$4.div` - display: flex; - justify-content: center; - align-items: center; - border: 2px solid ${tt=>tt.color}44; - background: ${colors.transparentBlack}; - padding: 0 4px; - color: ${tt=>tt.color}; - min-width: 30px; - height: 26px; - font-size: 12px; - font-weight: 500; - border-radius: 6px; - margin-right: 5px; -`;const variableVector3=new Vector3,NodeBadge=({position:tt,userData:et,color:nt})=>{const rt=reactExports.useRef(null),[it,ot]=useDataStore(pt=>[pt.selectedNode,pt.setSelectedNode]),at=useDataStore(pt=>pt.setHoveredNode),st=useDataStore(pt=>pt.hoveredNode),lt=useDataStore(pt=>pt.showSelectionGraph),ct=((et==null?void 0:et.node_type)||"")==="topic",ut=((et==null?void 0:et.node_type)||"")==="guest"||((et==null?void 0:et.node_type)||"")==="person";useFrame(()=>{if(lt&&rt.current){const pt=variableVector3.set((et==null?void 0:et.x)||0,(et==null?void 0:et.y)||0,(et==null?void 0:et.z)||0);rt.current.position.copy(pt)}}),reactExports.useEffect(()=>function(){rt.current&&rt.current.clear()},[rt]);const ht=reactExports.useMemo(()=>(st==null?void 0:st.ref_id)===(et==null?void 0:et.ref_id),[st==null?void 0:st.ref_id,et==null?void 0:et.ref_id]),dt=(it==null?void 0:it.ref_id)===(et==null?void 0:et.ref_id);return dt&<||!dt?jsxRuntimeExports.jsx("group",{ref:rt,position:tt,children:jsxRuntimeExports.jsx(Html$1,{center:!0,sprite:!0,children:jsxRuntimeExports.jsxs(Tag,{className:clsx$1(et==null?void 0:et.node_type,{selected:dt}),color:nt,fontColor:colors.white,fontSize:ct?14:20,onClick:pt=>{pt.stopPropagation(),et&&ot(et)},onPointerOut:pt=>{pt.stopPropagation(),at(null)},onPointerOver:pt=>{pt.stopPropagation(),at(et||null)},scale:ht?1.05:1,selected:!1,size:dt?100:68,type:(et==null?void 0:et.node_type)||"",children:[!ut&&!ct?jsxRuntimeExports.jsx("div",{className:"badge-wrapper",children:jsxRuntimeExports.jsx(TypeBadge,{type:(et==null?void 0:et.node_type)||""})}):null,ct?et==null?void 0:et.label:jsxRuntimeExports.jsx(Avatar$1,{rounded:ut,size:dt?60:52,src:(et==null?void 0:et.image_url)||"audio_default.svg",type:et==null?void 0:et.node_type})]})})}):null},RelevanceBadges=reactExports.memo(()=>{const tt=useDataStore(at=>at.data),et=useSelectedNode(),nt=useDataStore(at=>at.showSelectionGraph),rt=useDataStore(at=>at.selectionGraphData),it=useDataStore(at=>at.selectedNodeRelativeIds),ot=reactExports.useMemo(()=>(nt?rt.nodes:(tt==null?void 0:tt.nodes)||[]).filter(lt=>it.includes((lt==null?void 0:lt.ref_id)||"")||(et==null?void 0:et.ref_id)===(lt==null?void 0:lt.ref_id)).map(lt=>{const ct=getNodeColorByType(lt.node_type||"",!0),ut=new Vector3((lt==null?void 0:lt.x)||0,(lt==null?void 0:lt.y)||0,(lt==null?void 0:lt.z)||0),ht=((tt==null?void 0:tt.nodes)||[]).filter(dt=>dt.ref_id&&nodesAreRelatives(dt,lt)).map(dt=>(dt==null?void 0:dt.ref_id)||"")||[];return jsxRuntimeExports.jsx(NodeBadge,{color:ct,position:ut,relativeIds:ht,userData:lt},`node-badge-${lt.ref_id}`)}),[it,tt==null?void 0:tt.nodes,nt,rt,et]);return jsxRuntimeExports.jsx(reactExports.Fragment,{children:ot.length?ot:null},"node-badges")});RelevanceBadges.displayName="RelevanceBadges";const Segment=({link:tt,animated:et})=>{const nt=reactExports.useRef(null),rt=useSelectedNode(),[it,ot]=reactExports.useState(new Vector3(0,0,0)),[at,st]=reactExports.useState(new Vector3(0,0,0)),[lt,ct]=reactExports.useState(8947848),ut=useDataStore(ht=>ht.selectionGraphData);return reactExports.useEffect(()=>{var pt,mt,gt,yt,bt,vt;const ht=(rt==null?void 0:rt.ref_id)||"",dt=rt&&(ht===tt.targetRef||ht===tt.sourceRef);!tt.onlyVisibleOnSelect||dt?(ot(new Vector3(((pt=tt.sourcePosition)==null?void 0:pt.x)||0,((mt=tt.sourcePosition)==null?void 0:mt.y)||0,((gt=tt.sourcePosition)==null?void 0:gt.z)||0)),st(new Vector3(((yt=tt.targetPosition)==null?void 0:yt.x)||0,((bt=tt.targetPosition)==null?void 0:bt.y)||0,((vt=tt.targetPosition)==null?void 0:vt.z)||0))):(ot(new Vector3(0,0,0)),st(new Vector3(0,0,0))),ct(dt?tt.color||NODE_RELATIVE_HIGHLIGHT_COLORS.children.segmentColor:rt?5592405:8947848)},[rt,tt]),useFrame(()=>{if(et&&nt.current){const ht=ut.nodes.find(pt=>pt.ref_id===tt.sourceRef),dt=ut.nodes.find(pt=>pt.ref_id===tt.targetRef);nt.current.start.set((ht==null?void 0:ht.x)||0,(ht==null?void 0:ht.y)||0,(ht==null?void 0:ht.z)||0),nt.current.end.set((dt==null?void 0:dt.x)||0,(dt==null?void 0:dt.y)||0,(dt==null?void 0:dt.z)||0)}}),jsxRuntimeExports.jsx(Segment$1,{ref:nt,color:"0xFFFFFF",end:at,start:it})},fontProps={font:"/fonts/Inter-Bold.woff",characters:"abcdefghijklmnopqrstuvwxyz0123456789!",fontSize:2,letterSpacing:-.05,lineHeight:1,"material-toneMapped":!1},TextNode=reactExports.memo(({node:tt,hide:et})=>{const nt=reactExports.useRef(null),rt=useSelectedNode(),ot=useDataStore(ut=>ut.selectedNodeRelativeIds).includes((tt==null?void 0:tt.ref_id)||""),at=!!rt&&(rt==null?void 0:rt.id)===tt.id,st=useDataStore(ut=>ut.showSelectionGraph);useFrame(({camera:ut})=>{nt!=null&&nt.current&&(nt.current.quaternion.copy(ut.quaternion),st&&nt.current.position.set(tt.x,tt.y,tt.z))});const lt=reactExports.useMemo(()=>{let ut=(tt.scale||1)*4;return st&&at?ut=40:!at&&ot&&(ut=0),ut},[tt.scale,at,ot,st]),ct=reactExports.useMemo(()=>rt&&rt.node_type==="topic"&&!at?.2:1,[at,rt]);return jsxRuntimeExports.jsx(Text$1,{ref:nt,anchorX:"center",anchorY:"middle",color:colors.white,fillOpacity:ct,position:[tt.x,tt.y,tt.z],scale:lt,userData:tt,visible:!et,...fontProps,children:tt.label})});TextNode.displayName="TextNode";let simulation2d=null;const SelectionDataNodes=reactExports.memo(()=>{const tt=useGraphData(),et=useSelectedNode(),nt=useDataStore(ot=>ot.selectedNodeRelativeIds),rt=useDataStore(ot=>ot.selectionGraphData),it=useDataStore(ot=>ot.setSelectionData);return reactExports.useEffect(()=>{const ot=tt.nodes.filter(st=>st.ref_id===(et==null?void 0:et.ref_id)||nt.includes((st==null?void 0:st.ref_id)||"")).map(st=>{const lt=st.ref_id===(et==null?void 0:et.ref_id)&&st.node_type!=="topic"?{fx:0,fy:0,fz:0}:{};return{...st,x:0,y:0,z:0,...lt}}),at=generateLinksFromNodeData(ot,!1,!1);it({nodes:ot,links:at})},[tt,et,nt,it]),reactExports.useEffect(()=>{simulation2d=runForceSimulation(rt.nodes,rt.links,{numDimensions:2,forceLinkStrength:.01,forceCenterStrength:.85,forceChargeStrength:-20,velocityDecay:.9})},[rt]),useFrame(()=>{simulation2d&&simulation2d.tick()}),jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[rt==null?void 0:rt.nodes.map(ot=>ot.node_type==="topic"?jsxRuntimeExports.jsx(TextNode,{hide:!0,node:ot},`${ot.ref_id||ot.id}-compact`):jsxRuntimeExports.jsx(Cube,{animated:!0,hide:!0,node:ot},`${ot.ref_id||ot.id}-compact`)),jsxRuntimeExports.jsx(Segments,{fog:!0,lineWidth:.9,children:(rt==null?void 0:rt.links).map((ot,at)=>jsxRuntimeExports.jsx(Segment,{animated:!0,link:ot},at.toString()))},`selection-links-${rt==null?void 0:rt.links.length}`)]})});SelectionDataNodes.displayName="SelectionDataNodes";const Cubes=reactExports.memo(()=>{const tt=useGraphData(),et=useSelectedNode(),nt=useDataStore(dt=>dt.nearbyNodeIds),rt=useDataStore(dt=>dt.setHoveredNode),it=useDataStore(dt=>dt.showSelectionGraph),ot=useDataStore(dt=>dt.selectionGraphData),at=useAppStore(dt=>dt.setTranscriptOpen),st=reactExports.useCallback(dt=>!!(it&&!ot.nodes.find(pt=>pt.ref_id===dt.ref_id)),[it,ot]),lt=reactExports.useCallback(dt=>{const pt=dt==null?void 0:dt[0];pt&&(at(!1),pt.userData&&(st(pt.userData)||useDataStore.getState().setSelectedNode((pt==null?void 0:pt.userData)||null)))},[at,st]),ct=reactExports.useCallback(dt=>{dt.stopPropagation(),rt(null)},[rt]),ut=reactExports.useCallback(dt=>{var gt;const mt=dt.intersections.map(yt=>yt.object)[0];if((gt=mt==null?void 0:mt.userData)!=null&>.ref_id){const yt=mt.userData;st(yt)||(dt.stopPropagation(),rt(yt))}},[rt,st]),ht=it&&!!et;return jsxRuntimeExports.jsxs(Select$1,{filter:dt=>dt.filter(pt=>{var mt;return!!((mt=pt.userData)!=null&&mt.id)}),onChange:lt,onPointerOut:ct,onPointerOver:ut,children:[jsxRuntimeExports.jsx(BlurryInstances,{hide:ht}),tt.nodes.filter(dt=>{const pt=(dt==null?void 0:dt.ref_id)===(et==null?void 0:et.ref_id);return nt.includes(dt.ref_id||"")||isMainTopic(dt)||pt}).map(dt=>dt.node_type==="topic"?jsxRuntimeExports.jsx(TextNode,{hide:ht,node:dt},dt.ref_id||dt.id):jsxRuntimeExports.jsx(Cube,{hide:ht,node:dt},dt.ref_id||dt.id)),ht&&jsxRuntimeExports.jsx(SelectionDataNodes,{}),jsxRuntimeExports.jsx(RelevanceBadges,{})]})});Cubes.displayName="Cubes";const defaultData$4={earthRef:null},useRefStore=react(tt=>({...defaultData$4,setEarthRef:et=>tt({earthRef:et})})),getCurvedLineFromStartAndEnd=(tt,et)=>{const nt=new Quaternion().setFromUnitVectors(new Vector3(0,1,0),tt.clone().normalize()),rt=new Quaternion().setFromUnitVectors(new Vector3(0,1,0),et.clone().normalize()),it=new Quaternion,ot=50,at=[];for(let lt=0;lt<=ot;lt+=1){const ct=lt/ot;it.slerpQuaternions(nt,rt,ct);const ut=new Vector3(0,1,0).applyQuaternion(it).multiplyScalar(EARTH_RADIUS+EARTH_DATA_PADDING);at.push(ut)}return new CatmullRomCurve3(at).getPoints(ot)},CurvedLine=({link:tt})=>{const et=useSelectedNode(),[nt,rt]=reactExports.useState(8947848);reactExports.useEffect(()=>{const ot=(et==null?void 0:et.ref_id)||"",at=et&&(ot===tt.targetRef||ot===tt.sourceRef);rt(at?tt.color||NODE_RELATIVE_HIGHLIGHT_COLORS.children.segmentColor:et?5592405:8947848)},[et,tt]);const it=reactExports.useMemo(()=>{var ct,ut,ht,dt,pt,mt;const ot=(et==null?void 0:et.ref_id)||"",at=et&&(ot===tt.targetRef||ot===tt.sourceRef);if(!(!tt.onlyVisibleOnSelect||at))return[];const st=new Vector3(((ct=tt.sourcePosition)==null?void 0:ct.x)||0,((ut=tt.sourcePosition)==null?void 0:ut.y)||0,((ht=tt.sourcePosition)==null?void 0:ht.z)||0),lt=new Vector3(((dt=tt.targetPosition)==null?void 0:dt.x)||0,((pt=tt.targetPosition)==null?void 0:pt.y)||0,((mt=tt.targetPosition)==null?void 0:mt.z)||0);return getCurvedLineFromStartAndEnd(st,lt)},[tt,et]);return it.length?jsxRuntimeExports.jsx(Line$1,{color:nt,dashed:!1,lineWidth:3,points:it}):null},center$1=new Vector3(0,0,0),Earth=()=>{const tt=reactExports.useRef(null),et=reactExports.useRef(null),nt=useDataStore(lt=>lt.graphStyle),rt=useDataStore(lt=>lt.showSelectionGraph),it=useDataStore(lt=>lt.data),ot=useRefStore(lt=>lt.setEarthRef),at=useTexture("textures/earth/galaxy.png"),st=useTexture("textures/earth/clouds.png");return useFrame(({camera:lt})=>{et.current&&et.current.position.copy(lt.getWorldPosition(center$1))}),reactExports.useLayoutEffect(()=>{tt.current&&ot(tt)},[ot]),nt!=="earth"||rt?null:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs("mesh",{ref:tt,userData:{type:"earth"},children:[jsxRuntimeExports.jsx("sphereGeometry",{args:[EARTH_RADIUS,200,200]}),jsxRuntimeExports.jsx(EarthMaterial,{})]}),jsxRuntimeExports.jsxs("mesh",{children:[jsxRuntimeExports.jsx("sphereGeometry",{args:[EARTH_RADIUS+2,200,200]}),jsxRuntimeExports.jsx("meshStandardMaterial",{alphaMap:st,map:st,transparent:!0})]}),jsxRuntimeExports.jsxs("mesh",{children:[jsxRuntimeExports.jsx("sphereGeometry",{args:[EARTH_RADIUS*4,200,200]}),jsxRuntimeExports.jsx("meshStandardMaterial",{map:at,opacity:.4,side:DoubleSide,transparent:!0})]}),jsxRuntimeExports.jsx("directionalLight",{ref:et,intensity:.9,position:[0,0,EARTH_RADIUS*3]}),it==null?void 0:it.links.map((lt,ct)=>jsxRuntimeExports.jsx(CurvedLine,{link:lt},`curved-${ct}`))]})},EarthMaterial=()=>{const tt=useTexture("textures/earth/earth.jpeg"),et=useTexture("textures/earth/bump.jpeg"),nt=useTexture("textures/earth/water.png"),rt=reactExports.useMemo(()=>new MeshStandardMaterial({map:tt,bumpMap:et,aoMap:et,roughnessMap:et,metalnessMap:nt,toneMapped:!0,roughness:35,metalness:0}),[tt,et,nt]);return jsxRuntimeExports.jsx("meshStandardMaterial",{...rt})},particleCount=2e3,radiusLimit=UNIVERSE_SCALE*4,colorsArray=Object.values(DATA_COLOR_PALETTE).map(tt=>tt),Particles=()=>{const tt=reactExports.useRef(null);useFrame(()=>{var at,st,lt;const it=((at=tt.current)==null?void 0:at.geometry.getAttribute("position")).array,ot=((st=tt.current)==null?void 0:st.geometry.getAttribute("velocity")).array;if(it&&ot){for(let ct=0;ctradiusLimit*radiusLimit){const vt=Math.random()*Math.PI*2,xt=Math.random()*Math.PI*2,kt=Math.random()*radiusLimit;it[ct]=Math.sin(vt)*Math.cos(xt)*kt,it[ct+1]=Math.sin(vt)*Math.sin(xt)*kt,it[ct+2]=Math.cos(vt)*kt}}((lt=tt.current)==null?void 0:lt.geometry.getAttribute("position")).needsUpdate=!0}});const et=reactExports.useMemo(()=>new Float32Array(particleCount*3),[]),nt=reactExports.useMemo(()=>new Float32Array(particleCount*3),[]);reactExports.useEffect(()=>{const it=radiusLimit;for(let ot=0;ot{rt.current&&tt.current&&(rt.current.setAttribute("position",new BufferAttribute(et,3)),rt.current.setAttribute("velocity",new BufferAttribute(nt,3)),tt.current.geometry=rt.current)},[et,nt]),reactExports.useEffect(()=>{if(rt.current){const it=[];for(let ot=0;ot({close:{backgroundColor:"rgba(48, 51, 66, 1)",borderColor:"#fff",fontColor:"rgba(255, 255, 255, 1)"},focus:{backgroundColor:tt?"rgba(255, 255, 255, 0.90);":"rgba(255, 255, 255, 0.90)",borderColor:tt?"#FFDB58bb":"#fff",fontColor:"rgba(48, 51, 66, 1)"},menu:{backgroundColor:"#00000066",borderColor:tt?"#ffffff66":"#5078f2",fontColor:tt?"#ffffff66":"#fff"}}),reuseableVector3=new Vector3,NodeControls=reactExports.memo(()=>{const tt=reactExports.useRef(null),et=useAppStore(ut=>ut.setSidebarOpen),nt=useDataStore(ut=>ut.showSelectionGraph),rt=useDataStore(ut=>ut.selectionGraphData),it=useDataStore(ut=>ut.data),ot=useSelectedNode(),at=useDataStore(ut=>ut.setSelectedNode),st=useDataStore(ut=>ut.setShowSelectionGraph);useFrame(()=>{lt()});const lt=reactExports.useCallback(()=>{const ut=nt?rt:it;if(tt.current){const ht=ut==null?void 0:ut.nodes.find(dt=>dt.ref_id===(ot==null?void 0:ot.ref_id));if(ht){const dt=reuseableVector3.set(ht==null?void 0:ht.x,ht==null?void 0:ht.y,ht==null?void 0:ht.z);tt.current.position.copy(dt)}}},[ot,nt,rt,it]),ct=reactExports.useMemo(()=>[{key:"control-key-1",colors:buttonColors(nt).focus,icon:jsxRuntimeExports.jsx(MdViewInAr,{}),left:10,className:"expand",onClick:()=>{const ut=!nt;st(ut),ut&&et(!0)}},{key:"control-key-2",colors:buttonColors(!0).close,icon:jsxRuntimeExports.jsx(MdClose,{}),left:40,className:"exit",onClick:()=>{at(null),st(!1)}}],[st,at,et,nt]);return ot?jsxRuntimeExports.jsx("group",{ref:tt,children:jsxRuntimeExports.jsx(Html$1,{center:!0,className:"control-panel",onClick:ut=>ut.stopPropagation(),onKeyDown:ut=>ut.stopPropagation(),onPointerDown:ut=>ut.stopPropagation(),onPointerOut:ut=>ut.stopPropagation(),onPointerOver:ut=>ut.stopPropagation(),onPointerUp:ut=>ut.stopPropagation(),sprite:!0,zIndexRange:[16777271,16777272],children:ct.map(ut=>jsxRuntimeExports.jsx(IconButton,{backgroundColor:ut.colors.backgroundColor,borderColor:ut.colors.borderColor,className:ut.className,fontColor:ut.colors.fontColor,left:ut.left,onClick:ht=>{ht.stopPropagation(),ut.onClick()},children:ut.icon},ut.key))})}):null});NodeControls.displayName="NodeControls";const IconButton=styled$4.div` - position: fixed; - top: -60px; - left: ${tt=>-7+tt.left}px; - width: 24px; - height: 24px; - border-radius: 40px; - display: flex; - justify-content: center; - align-items: center; - background: ${tt=>tt.backgroundColor?tt.backgroundColor:"#000000bb"}; - color: ${tt=>tt.fontColor?tt.fontColor:"#ffffff"}; - border-radius: 100%; - font-size: 16px; - cursor: pointer; - transition: opacity 0.4s; - box-shadow: 0px 2px 12px rgba(0, 0, 0, 0.5); -`,NodeDetailsPanel=reactExports.memo(()=>jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsx(NodeControls,{})}));NodeDetailsPanel.displayName="NodeDetailsPanel";const Graph=()=>{const tt=useGraphData(),et=useDataStore(ot=>ot.isFetching),nt=useDataStore(ot=>ot.graphStyle),rt=useDataStore(ot=>ot.showSelectionGraph),it=reactExports.useMemo(()=>rt?0:nt==="force"?.2:.4,[rt,nt]);return et?null:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Cubes,{}),jsxRuntimeExports.jsx(Earth,{}),jsxRuntimeExports.jsx(Particles,{}),nt!=="earth"&&jsxRuntimeExports.jsx(Segments,{fog:!0,limit:tt.links.length,lineWidth:it,children:tt.links.map((ot,at)=>jsxRuntimeExports.jsx(Segment,{link:ot},at.toString()))},`links-${tt.links.length}-${nt}`),jsxRuntimeExports.jsx(NodeDetailsPanel,{})]})},Lights=()=>{const{fogColor:tt}=useControls("universe",{fogColor:GRAPH_FOG_COLOR}),et=useDataStore(ot=>ot.graphStyle),nt=reactExports.useRef(null),rt=reactExports.useRef(null),it=reactExports.useRef(null);return useFrame(({camera:ot,clock:at})=>{const st=at.getElapsedTime();if(nt.current){const ct=Math.sin(st/8)*1e3;nt.current.position.setZ(ct)}if(rt.current&&rt.current.position.lerp(ot.position,.5),it.current){const lt=st*.5,ct=Math.sin(lt)*UNIVERSE_SCALE,ut=Math.cos(lt)*UNIVERSE_SCALE;it.current.position.set(ct,0,ut)}}),jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx("hemisphereLight",{args:[colors.white,GRAPH_GROUND_COLOR,GRAPH_LIGHT_INTENSITY]}),et!=="earth"&&jsxRuntimeExports.jsx("fog",{args:[tt,5,18e3],attach:"fog"}),jsxRuntimeExports.jsx("ambientLight",{color:colors.white,intensity:1}),jsxRuntimeExports.jsx("pointLight",{ref:rt,color:colors.white,distance:4e3,intensity:5,position:[0,0,0]}),jsxRuntimeExports.jsx("directionalLight",{ref:it,color:colors.white,intensity:8,position:[UNIVERSE_SCALE,0,0]}),jsxRuntimeExports.jsx("pointLight",{ref:nt,color:colors.white,distance:4e3,intensity:8,position:[0,0,0]})]})};function formatDescription(tt){return tt?tt.replace(/[[]{2}/g,"").replace(/[\]]{2}/g,""):""}var loadjs_umd={exports:{}};(function(tt,et){(function(nt,rt){tt.exports=rt()})(commonjsGlobal,function(){var nt=function(){},rt={},it={},ot={};function at(dt,pt){dt=dt.push?dt:[dt];var mt=[],gt=dt.length,yt=gt,bt,vt,xt,kt;for(bt=function(St,Tt){Tt.length&&mt.push(St),yt--,yt||pt(mt)};gt--;){if(vt=dt[gt],xt=it[vt],xt){bt(vt,xt);continue}kt=ot[vt]=ot[vt]||[],kt.push(bt)}}function st(dt,pt){if(dt){var mt=ot[dt];if(it[dt]=pt,!!mt)for(;mt.length;)mt[0](dt,pt),mt.splice(0,1)}}function lt(dt,pt){dt.call&&(dt={success:dt}),pt.length?(dt.error||nt)(pt):(dt.success||nt)(dt)}function ct(dt,pt,mt,gt){var yt=document,bt=mt.async,vt=(mt.numRetries||0)+1,xt=mt.before||nt,kt=dt.replace(/[\?|#].*$/,""),St=dt.replace(/^(css|img)!/,""),Tt,At;gt=gt||0,/(^css!|\.css$)/.test(kt)?(At=yt.createElement("link"),At.rel="stylesheet",At.href=St,Tt="hideFocus"in At,Tt&&At.relList&&(Tt=0,At.rel="preload",At.as="style")):/(^img!|\.(png|gif|jpg|svg|webp)$)/.test(kt)?(At=yt.createElement("img"),At.src=St):(At=yt.createElement("script"),At.src=dt,At.async=bt===void 0?!0:bt),At.onload=At.onerror=At.onbeforeload=function(Et){var $t=Et.type[0];if(Tt)try{At.sheet.cssText.length||($t="e")}catch(Dt){Dt.code!=18&&($t="e")}if($t=="e"){if(gt+=1,gt{const[nt,rt]=reactExports.useState(!0);return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Flex,{direction:"row",children:jsxRuntimeExports.jsx(Flex,{align:"flex-start",pb:12,children:jsxRuntimeExports.jsxs(Text$3,{children:["Tweet by @",tt]})})}),jsxRuntimeExports.jsxs(Flex,{direction:"column",py:16,children:[nt&&jsxRuntimeExports.jsx(Flex,{align:"center",direction:"row",justify:"center",p:10,children:jsxRuntimeExports.jsx(ClipLoader$2,{color:colors.white})}),et&&jsxRuntimeExports.jsx(Tweet,{onLoad:()=>rt(!1),renderError:()=>jsxRuntimeExports.jsx(Error$1,{}),tweetId:et})]})]})},Error$1=()=>jsxRuntimeExports.jsx(Flex,{children:"Error occurred"}),Wrapper$n=styled$4(Flex)(({theme:tt})=>({position:"absolute",top:"20px",right:"20px",width:"300px",pointerEvents:"none",background:colors.dashboardHeader,boxShadow:"0px 1px 6px rgba(0, 0, 0, 0.1)",color:colors.primaryText1,zIndex:100,transition:"opacity 0.6s",padding:tt.spacing(2,3),[tt.breakpoints.down("sm")]:{padding:tt.spacing(1,1.5)}})),Divider$1=styled$4(Flex)` - width: 22.5%; -`,Tooltip$1=({node:tt})=>{if(!tt)return null;const{node_type:et,show_title:nt,episode_title:rt,description:it,label:ot,text:at,timestamp:st,type:lt,tweet_id:ct,twitter_handle:ut}=tt,ht=tt.guests;let dt=!1,pt=!1;ht&&(ht.length&&ht[0]!==null&&(dt=!0),typeof ht[0]=="object"&&(pt=!0));let mt=tt.image_url;if(lt==="twitter_space"&&(mt="twitter_placeholder.png"),mt==null)switch(et){case"guest":mt="person_placeholder2.png";break;default:mt="noimage.jpeg"}return jsxRuntimeExports.jsx(Wrapper$n,{borderRadius:8,px:24,py:16,children:et==="tweet"?jsxRuntimeExports.jsx(TwitData$1,{tweetId:ct,twitterHandle:ut}):jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs(Flex,{direction:"row",children:[jsxRuntimeExports.jsx(Divider$1,{}),jsxRuntimeExports.jsx(Flex,{align:"flex-start",pb:12,children:jsxRuntimeExports.jsx(Text$3,{children:et==null?void 0:et.toUpperCase()})})]}),jsxRuntimeExports.jsxs(Flex,{direction:"row",children:[jsxRuntimeExports.jsx(Flex,{pr:12,children:jsxRuntimeExports.jsx(Avatar$1,{src:mt,type:"person"})}),jsxRuntimeExports.jsxs("div",{children:[lt==="guest"?jsxRuntimeExports.jsxs(Flex,{direction:"column",children:[jsxRuntimeExports.jsx(Text$3,{children:ot}),at&&jsxRuntimeExports.jsx(Flex,{pt:4,children:jsxRuntimeExports.jsxs(Text$3,{color:"primaryText1",kind:"tiny",children:["@",at]})})]}):jsxRuntimeExports.jsx(Text$3,{color:"primaryText1",kind:"tiny",children:nt}),jsxRuntimeExports.jsxs(Flex,{pt:4,children:[et==="clip"||et==="episode"&&jsxRuntimeExports.jsx(Text$3,{color:"primaryText1",children:"Episode"}),et==="clip"?jsxRuntimeExports.jsx(Text$3,{as:"div",kind:"regularBold",children:formatDescription(it)}):jsxRuntimeExports.jsx(Text$3,{color:"primaryText1",kind:"tiny",children:rt})]}),jsxRuntimeExports.jsx(Text$3,{color:"primaryText1",kind:"tiny",children:st}),jsxRuntimeExports.jsxs(Flex,{pt:12,children:[et==="clip"&&jsxRuntimeExports.jsx(Text$3,{color:"primaryText1",children:"Episode"}),jsxRuntimeExports.jsx(Text$3,{color:"primaryText1",kind:"tiny",children:et==="clip"?rt:formatDescription(it)})]}),dt&&jsxRuntimeExports.jsxs(Flex,{pt:12,children:[jsxRuntimeExports.jsx(Text$3,{color:"primaryText1",children:"People"}),jsxRuntimeExports.jsx(Flex,{pt:4,children:jsxRuntimeExports.jsx(Text$3,{color:"primaryText1",kind:"tiny",children:pt?ht.map(gt=>gt.name?gt.name:`@${gt.twitter_handle}`).join(", "):ht==null?void 0:ht.join(", ")})})]})]})]})]})})},Overlay=()=>{const[tt,et,nt,rt]=useDataStore(ot=>[ot.selectedNode,ot.hoveredNode,ot.cameraFocusTrigger,ot.setCameraFocusTrigger]),it=useControlStore(ot=>ot.userMovedCamera);return reactExports.useEffect(()=>{document.body.style.cursor=et?"pointer":"auto"},[et]),jsxRuntimeExports.jsxs(OverlayWrap,{children:[!!tt&&it&&jsxRuntimeExports.jsx(Button,{background:"bluePressState",kind:"small",onClick:()=>rt(!nt),children:"Re-center map"}),et&&jsxRuntimeExports.jsx("div",{id:"tooltip-portal",children:jsxRuntimeExports.jsx(Tooltip$1,{node:et})})]})},OverlayWrap=styled$4("div")(({theme:tt})=>({position:"absolute",zIndex:1,top:0,left:0,userSelect:"none",pointerEvents:"none",display:"flex",justifyContent:"flex-end",alignItems:"flex-start",height:"100%",width:"100%",padding:"16px",[tt.breakpoints.down("sm")]:{top:50}})),Preloader=({fullSize:tt=!0})=>{const et=useAppStore(nt=>nt.sidebarIsOpen);return jsxRuntimeExports.jsx(Loader,{align:"center",className:clsx$1({"sidebar-is-open":et&&!tt}),justify:"center",children:jsxRuntimeExports.jsx(ClipLoader$2,{color:colors.SECONDARY_BLUE,size:64})})},Loader=styled$4(Flex)` - position: absolute; - left: 0; - right: 0; - bottom: 0; - top: 0; - background-color: ${colors.black}; - z-index: 1; -`,Fallback=()=>jsxRuntimeExports.jsx(Html$1,{children:jsxRuntimeExports.jsx(Loader$1,{})}),Content$1=()=>{const{universeColor:tt}=useControls("universe",{universeColor:colors.black}),et=useSelectedNode(),nt=reactExports.useMemo(()=>et!=null&&et.node_type?getNodeColorByType(et.node_type):outlineEffectColor,[et]);return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx("color",{args:[tt],attach:"background"}),jsxRuntimeExports.jsx(Lights,{}),jsxRuntimeExports.jsx(Controls,{}),jsxRuntimeExports.jsxs(Selection$2,{children:[jsxRuntimeExports.jsxs(EffectComposer,{autoClear:!1,multisampling:8,children:[jsxRuntimeExports.jsx(Vignette,{darkness:.7,eskil:!1,offset:.05}),jsxRuntimeExports.jsx(Bloom,{luminanceThreshold:1,mipmapBlur:!0,resolutionX:Resolution.AUTO_SIZE,resolutionY:Resolution.AUTO_SIZE}),jsxRuntimeExports.jsx(Outline,{blendFunction:BlendFunction.SCREEN,blur:!0,edgeStrength:4,hiddenEdgeColor:nt,visibleEdgeColor:nt})]}),jsxRuntimeExports.jsx(Graph,{})]})]})};let wheelEventTimeout=null;const cameraProps={aspect:window.innerWidth/window.innerHeight,far:3e4,near:1,position:[initialCameraPosition.x,initialCameraPosition.y,initialCameraPosition.z]},_Universe=()=>{const[tt,et,nt]=[useControlStore(at=>at.setIsUserScrollingOnHtmlPanel),useControlStore(at=>at.setIsUserScrolling),useControlStore(at=>at.setUserMovedCamera)],rt=useDataStore(at=>at.isFetching),it=reactExports.useCallback(at=>{var ct;const{target:st}=at,{offsetParent:lt}=st;wheelEventTimeout&&clearTimeout(wheelEventTimeout),(ct=lt==null?void 0:lt.classList)!=null&&ct.contains("html-panel")&<.clientHeight{et(!1),tt(!1)},200)},[et,tt,nt]),ot=reactExports.useCallback(at=>addToGlobalForE2e(at,"threeState"),[]);return jsxRuntimeExports.jsxs(Wrapper$m,{children:[jsxRuntimeExports.jsx(Overlay,{}),jsxRuntimeExports.jsx(reactExports.Suspense,{fallback:null,children:jsxRuntimeExports.jsxs(Canvas$1,{camera:cameraProps,id:"universe-canvas",onCreated:ot,onWheel:it,children:[isDevelopment&&jsxRuntimeExports.jsx(Perf,{position:"top-right"}),jsxRuntimeExports.jsxs(reactExports.Suspense,{fallback:jsxRuntimeExports.jsx(Fallback,{}),children:[jsxRuntimeExports.jsx(Preload,{}),jsxRuntimeExports.jsx(AdaptiveDpr,{}),jsxRuntimeExports.jsx(AdaptiveEvents,{}),jsxRuntimeExports.jsx(Content$1,{})]})]})}),rt&&jsxRuntimeExports.jsx(Preloader,{fullSize:!1})]})},Wrapper$m=styled$4(Flex)` - flex: 1 1 100%; + ${({ loading: tt }) => + tt && + Ae` + background-image: url('https://i.gifer.com/ZZ5H.gif'); + background-size: 25px 25px; + background-position: right center; + background-position-x: 95%; + background-repeat: no-repeat; + `} +`, + SearchBar = ({ loading: tt, onSubmit: et }) => { + const { register: nt } = useFormContext() + return jsxRuntimeExports.jsx(Input, { + ...nt('search'), + disabled: tt, + id: 'main-search', + loading: tt, + onKeyPress: (rt) => { + rt.key === 'Enter' && (et == null || et()) + }, + placeholder: 'Search (10 sats)', + type: 'text', + }) + }, + messages = [ + ['Searching', 'Podcast Index'], + ['Searching', 'YouTube'], + ['Searching', 'Twitter Spaces'], + ['Finding', 'Transcripts'], + ['Loading', 'Audio Clips'], + ['Loading', 'Video Clips'], + ['Preparing', 'Results'], + ], + FetchLoaderText = () => { + const [tt, et] = reactExports.useState(0) + return ( + reactExports.useEffect(() => { + if (tt === messages.length - 1) return + const nt = setTimeout(() => et((rt) => (rt + 1) % messages.length), 2e3) + return () => clearTimeout(nt) + }, [tt]), + jsxRuntimeExports.jsx(Wrapper$a, { + direction: 'column', + children: messages.map((nt, rt) => + jsxRuntimeExports.jsxs( + Flex, + { + className: clsx$1('raw-wrapper', { show: tt === rt }), + direction: 'row', + children: [ + jsxRuntimeExports.jsx('div', { className: clsx$1('action'), children: nt[0] }), + jsxRuntimeExports.jsx('div', { className: clsx$1('entity'), children: nt[1] }), + jsxRuntimeExports.jsx('div', { + children: jsxRuntimeExports.jsx(BeatLoader, { color: colors.SECONDARY_BLUE, size: 2 }), + }), + ], + }, + nt[1], + ), + ), + }) + ) + }, + Wrapper$a = styled$4(Flex)` + overflow: hidden; + height: 20px; position: relative; -`,Universe=reactExports.memo(_Universe),defaultData$3={askedQuestions:null,askedQuestionsAnswers:null,hasQuestionInProgress:!1,hasTeachingInProgress:!1,hasInstagraphInProgress:!1,teachMeAnswer:null,instgraphAnswser:null},useTeachStore=react(tt=>({...defaultData$3,setAskedQuestion:et=>tt(nt=>({askedQuestions:[...nt.askedQuestions||[],et],hasQuestionInProgress:!0})),setAskedQuestionAnswer:et=>tt(nt=>({askedQuestionsAnswers:[...nt.askedQuestionsAnswers||[],et],hasQuestionInProgress:!1})),setHasQuestionInProgress:et=>tt({hasQuestionInProgress:et}),setHasTeachingInProgress:et=>tt({hasTeachingInProgress:et}),setHasInstagraphInProgress:et=>tt({hasInstagraphInProgress:et}),setTeachMeAnswer:et=>tt({hasTeachingInProgress:!1,teachMeAnswer:et}),setInstagraphAnswer:et=>{var nt,rt,it,ot;(nt=et==null?void 0:et.instagraph)!=null&&nt.edges&&((rt=et==null?void 0:et.instagraph)!=null&&rt.nodes)&&tt({hasInstagraphInProgress:!1,instgraphAnswser:{edges:(it=et==null?void 0:et.instagraph)==null?void 0:it.edges,nodes:(ot=et==null?void 0:et.instagraph)==null?void 0:ot.nodes}})}})),version="0.1.86",StyledTableCell=styled$4(TableCell$1)` - && { + .action { color: ${colors.white}; - border: none; - padding: 6px 27px 6px 0; - color: ${colors.GRAY3}; - font-family: Barlow; - font-size: 14px; - font-style: normal; - font-weight: 500; - line-height: 24px; + margin-right: 8px; } - &.empty { - width: 36px; - padding: 0; - } -`,StyledTableRow=styled$4(TableRow$1)` - && { - height: 48px; - padding: 0 36px; - } - &:nth-child(odd) { - background-color: ${colors.BG3}; - } -`,StyledTableHead=styled$4(TableHead$1)` - && { - border-bottom: 1px solid ${colors.black}; + .raw-wrapper { + height: 0; + overflow: hidden; + transition: height 0.7s ease-in-out; + align-items: flex-end; + &.show { + height: 20px; + } } - ${StyledTableCell} { - color: ${colors.white}; - font-family: Barlow; - font-size: 11px; - font-style: normal; - font-weight: 700; - line-height: 18px; /* 163.636% */ - letter-spacing: 1.1px; - text-transform: uppercase; - } -`,StyledPill=styled$4(Button$2)` - &.selected { - background: ${colors.white}; - color: ${colors.BG1}; - pointer-events: none; + .entity { + color: ${colors.SECONDARY_BLUE}; } - - & + & { - margin-left: 16px; +`, + BrowseGalleryIcon = (tt) => + jsxRuntimeExports.jsx('svg', { + width: '1em', + height: '1em', + viewBox: '0 0 24 24', + fill: 'currentColor', + xmlns: 'http://www.w3.org/2000/svg', + children: jsxRuntimeExports.jsxs('g', { + id: 'browse_gallery', + children: [ + jsxRuntimeExports.jsx('mask', { + id: 'mask0_1360_27257', + maskUnits: 'userSpaceOnUse', + x: '0', + y: '0', + width: '24', + height: '24', + children: jsxRuntimeExports.jsx('rect', { + id: 'Bounding box', + width: '1em', + height: '1em', + fill: 'currentColor', + }), + }), + jsxRuntimeExports.jsx('g', { + mask: 'url(#mask0_1360_27257)', + children: jsxRuntimeExports.jsx('path', { + id: 'browse_gallery_2', + d: 'M11.8 15.8442L12.8442 14.8L9.74998 11.7026V7.25003H8.25003V12.2942L11.8 15.8442ZM18 19.9615V18.3C19.2333 17.7167 20.2083 16.8583 20.925 15.725C21.6417 14.5917 22 13.35 22 12C22 10.65 21.6417 9.40834 20.925 8.27501C20.2083 7.14167 19.2333 6.28334 18 5.70001V4.03851C19.6628 4.67184 20.9952 5.71318 21.9971 7.16253C22.999 8.61188 23.5 10.2244 23.5 12C23.5 13.7756 22.999 15.3881 21.9971 16.8375C20.9952 18.2868 19.6628 19.3282 18 19.9615ZM9.00055 20.5C7.8207 20.5 6.71539 20.2769 5.68463 19.8307C4.65386 19.3846 3.75514 18.7782 2.98848 18.0115C2.22181 17.2449 1.61541 16.3463 1.16927 15.3159C0.723092 14.2855 0.5 13.1804 0.5 12.0006C0.5 10.8207 0.723083 9.7154 1.16925 8.68463C1.6154 7.65386 2.2218 6.75515 2.98845 5.98848C3.75512 5.22183 4.65365 4.61543 5.68405 4.16928C6.71445 3.72311 7.81957 3.50003 8.99942 3.50003C10.1793 3.50003 11.2846 3.72311 12.3154 4.16928C13.3461 4.61543 14.2448 5.22183 15.0115 5.98848C15.7782 6.75515 16.3846 7.65368 16.8307 8.68408C17.2769 9.71448 17.5 10.8196 17.5 11.9995C17.5 13.1793 17.2769 14.2846 16.8307 15.3154C16.3846 16.3461 15.7782 17.2449 15.0115 18.0115C14.2448 18.7782 13.3463 19.3846 12.3159 19.8307C11.2855 20.2769 10.1804 20.5 9.00055 20.5ZM9 19C10.95 19 12.6042 18.3208 13.9625 16.9625C15.3208 15.6042 16 13.95 16 12C16 10.05 15.3208 8.39584 13.9625 7.03751C12.6042 5.67917 10.95 5.00001 9 5.00001C7.05 5.00001 5.39583 5.67917 4.0375 7.03751C2.67917 8.39584 2 10.05 2 12C2 13.95 2.67917 15.6042 4.0375 16.9625C5.39583 18.3208 7.05 19 9 19Z', + fill: 'currentColor', + }), + }), + ], + }), + }), + ScrollView = styled$4(Flex)` + overflow-y: auto; + overflow-x: hidden; + background: ${colors.body}; +`, + useIsMatchBreakpoint = (tt, et = 'down') => { + const nt = useTheme(), + [rt, it] = reactExports.useState(!1), + ot = nt.breakpoints[et](tt).split('@media')[1].trim() + return ( + reactExports.useEffect(() => { + const at = () => { + const { matches: st } = window.matchMedia(ot) + it(st) + } + return at(), window.addEventListener('resize', at), () => window.removeEventListener('resize', at) + }, [ot]), + rt + ) + }, + BoostIcon = (tt) => + jsxRuntimeExports.jsx('svg', { + width: '1em', + height: '1em', + viewBox: '0 0 9 9', + fill: 'currentColor', + xmlns: 'http://www.w3.org/2000/svg', + children: jsxRuntimeExports.jsx('path', { + id: 'Icon', + 'fill-rule': 'evenodd', + 'clip-rule': 'evenodd', + d: 'M7.97172 5.26825L8.23268 0.525927C8.24606 0.301673 8.05202 0.110397 7.81782 0.116993L3.00677 0.374226C2.66551 0.394014 2.51161 0.796353 2.7525 1.0338L7.30259 5.51889C7.54348 5.75633 7.95165 5.60463 7.97172 5.26825ZM5.56945 5.5915L2.67881 2.74215L1.79555 3.61278L4.6862 6.46213L5.56945 5.5915ZM1.14615 6.44238L0.0353953 5.34749L0.918648 4.47686L3.80929 7.32621L2.92604 8.19685L1.81528 7.10196L0.918648 7.98578C0.731292 8.17046 0.436874 8.17046 0.249518 7.98578C0.0621611 7.8011 0.0621611 7.51089 0.249517 7.32621L1.14615 6.44238Z', + fill: 'currentColor', + }), + }), + BoostAmt = ({ amt: tt }) => + jsxRuntimeExports.jsxs('div', { + style: { alignSelf: 'center' }, + children: [ + jsxRuntimeExports.jsx(BoostIcon, {}), + jsxRuntimeExports.jsx(StyledText, { color: 'white', children: tt }), + ], + }), + StyledText = styled$4(Text$3)` + padding-left: 10px; +`, + TypePerson = ({ title: tt, imageUrl: et, name: nt }) => + jsxRuntimeExports.jsxs(Flex, { + children: [ + jsxRuntimeExports.jsx(PictureWrapper$1, { + children: jsxRuntimeExports.jsx(Avatar$1, { rounded: !0, size: 64, src: et || '', type: 'person' }), + }), + (tt || nt) && jsxRuntimeExports.jsx(Name$1, { children: tt || nt }), + ], + }), + PictureWrapper$1 = styled$4(Flex)` + img { + width: 64px; + height: 64px + border-radius: 50%; + object-fit: cover; } -`,Heading$4=styled$4(Flex)` - margin-bottom: 26px; - padding: 0 36px; - ${Text$3} { - margin-bottom: 0; + margin-right: 16px; +`, + Name$1 = styled$4(Flex)` + color: ${colors.white}; + font-family: Barlow; + font-size: 13px; + font-style: normal; + font-weight: 600; + line-height: 17px; +`, + TypeTweet = ({ text: tt, imageUrl: et, date: nt, twitterHandle: rt, name: it, verified: ot }) => + jsxRuntimeExports.jsxs(Flex, { + direction: 'column', + children: [ + jsxRuntimeExports.jsxs(Flex, { + align: 'center', + direction: 'row', + pr: 16, + children: [ + jsxRuntimeExports.jsx(PictureWrapper, { + children: jsxRuntimeExports.jsx(Avatar$1, { rounded: !0, size: 27, src: et || '', type: 'person' }), + }), + jsxRuntimeExports.jsxs(Flex, { + children: [ + jsxRuntimeExports.jsxs(Name, { + align: 'center', + direction: 'row', + children: [ + it, + ot && + jsxRuntimeExports.jsx('div', { + className: 'verification', + children: jsxRuntimeExports.jsx('img', { alt: 'verified', src: 'verified_twitter.svg' }), + }), + ], + }), + rt && jsxRuntimeExports.jsxs(TwitterHandle$1, { children: ['@', rt] }), + ], + }), + ], + }), + jsxRuntimeExports.jsxs(Flex, { + grow: 1, + shrink: 1, + children: [ + jsxRuntimeExports.jsx(TwitText, { 'data-testid': 'episode-description', children: tt }), + jsxRuntimeExports.jsx(Flex, { + direction: 'row', + justify: 'flex-start', + children: !!nt && jsxRuntimeExports.jsx(Date$2, { children: hooks.unix(nt).format('ll') }), + }), + ], + }), + ], + }), + PictureWrapper = styled$4(Flex)` + img { + width: 64px; + height: 64px + border-radius: 50%; + object-fit: cover; } -`,sourcesMapper={[GITHUB_REPOSITORY]:"Github repository",[RSS]:"RSS link",[TOPIC]:"Topic",[TWITTER_HANDLE]:"Twitter Handle",[YOUTUBE_CHANNEL]:"Youtube channel"},TWITTER_LINK="https://twitter.com",ConfirmPopover=({message:tt="Are you sure you want to delete this item?",onConfirm:et,children:nt,anchorOrigin:rt={vertical:"bottom",horizontal:"center"},transformOrigin:it={vertical:"top",horizontal:"center"}})=>{const[ot,at]=reactExports.useState(null),st=dt=>{at(dt.currentTarget)},lt=()=>{at(null)},ct=()=>{et(),lt()},ut=()=>{lt()},ht=!!ot;return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx("div",{children:React$1.cloneElement(nt,{onClick:st})}),jsxRuntimeExports.jsx(Popover$1,{anchorEl:ot,anchorOrigin:rt,onClose:lt,open:ht,transformOrigin:it,children:jsxRuntimeExports.jsxs(Wrapper$l,{justify:"space-around",children:[jsxRuntimeExports.jsx(Text$3,{children:tt}),jsxRuntimeExports.jsxs(Flex,{align:"center",direction:"row",justify:"center",pt:8,children:[jsxRuntimeExports.jsx(Button,{kind:"small",onClick:ct,children:"Yes"}),jsxRuntimeExports.jsx(Button,{className:"secondary",kind:"small",onClick:ut,children:"No"})]})]})})]})},Wrapper$l=styled$4(Flex)` - background: ${colors.headerBackground}; + margin-right: 16px; +`, + Name = styled$4(Flex)` color: ${colors.white}; - padding: 16px 8px; - - .secondary { - margin-left: 8px; - background: transparent; - border: 1px solid ${colors.primaryButton}; + font-family: Barlow; + font-size: 11px; + font-style: normal; + font-weight: 600; + line-height: normal; + letter-spacing: -0.22px; + .verification { + margin-left: 4px; } -`,FilterOffIcon=tt=>jsxRuntimeExports.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsxs("g",{id:"filter_alt_off",children:[jsxRuntimeExports.jsx("mask",{id:"mask0_1543_23288",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"24",height:"24",children:jsxRuntimeExports.jsx("rect",{id:"Bounding box",width:"1em",height:"1em",fill:"currentColor"})}),jsxRuntimeExports.jsx("g",{mask:"url(#mask0_1543_23288)",children:jsxRuntimeExports.jsx("path",{id:"filter_alt_off_2",d:"M14.8 11.9748L6.82503 3.9998H19C19.4167 3.9998 19.7167 4.18314 19.9 4.5498C20.0834 4.91647 20.05 5.26647 19.8 5.5998L14.8 11.9748ZM19.775 22.5998L14 16.8248V18.9998C14 19.2831 13.9042 19.5206 13.7125 19.7123C13.5209 19.904 13.2834 19.9998 13 19.9998H11C10.7167 19.9998 10.4792 19.904 10.2875 19.7123C10.0959 19.5206 10 19.2831 10 18.9998V12.8248L1.40002 4.2248L2.80002 2.7998L21.2 21.1998L19.775 22.5998Z",fill:"currentColor"})})]})}),Table$2=({data:tt})=>{const et=useDataStore(at=>at.setQueuedSources),[nt,rt]=reactExports.useState(""),it=async at=>{if(tt!=null&&tt.length)try{const st=await distExports$1.enable();await approveRadarData(at,st.pubkey),et(tt.filter(lt=>lt.ref_id!==at))}catch(st){console.warn(st)}},ot=async at=>{if(!(!at||!(tt!=null&&tt.length))){rt(at);try{await deleteRadarData(at),et(tt==null?void 0:tt.filter(st=>st.ref_id!==at))}catch(st){console.warn(st)}finally{rt("")}}};return tt!=null&&tt.length?jsxRuntimeExports.jsxs(MaterialTable,{component:"table",children:[jsxRuntimeExports.jsx(StyledTableHead,{children:jsxRuntimeExports.jsxs(TableRow$1,{component:"tr",children:[jsxRuntimeExports.jsx(StyledTableCell,{className:"empty"}),jsxRuntimeExports.jsx(StyledTableCell,{children:"Type"}),jsxRuntimeExports.jsx(StyledTableCell,{children:"Source"}),jsxRuntimeExports.jsx(StyledTableCell,{}),jsxRuntimeExports.jsx(StyledTableCell,{className:"empty"})]})}),(tt==null?void 0:tt.length)&&jsxRuntimeExports.jsx("tbody",{children:tt==null?void 0:tt.map(at=>jsxRuntimeExports.jsxs(StyledTableRow,{children:[jsxRuntimeExports.jsx(StyledTableCell,{className:"empty"}),jsxRuntimeExports.jsx(StyledTableCell,{children:sourcesMapper[at.source_type]}),jsxRuntimeExports.jsx(StyledTableCell,{width:"268px",children:at.source_type==="twitter_handle"?jsxRuntimeExports.jsxs(StyledLink$1,{href:`${TWITTER_LINK}/${at.source}`,target:"_blank",children:["@",at.source]}):jsxRuntimeExports.jsx("div",{children:at.source})}),jsxRuntimeExports.jsx(StyledTableCell,{className:"cell-center",children:jsxRuntimeExports.jsxs(Flex,{direction:"row",justify:"space-between",children:[jsxRuntimeExports.jsx("div",{className:"approve-wrapper",children:jsxRuntimeExports.jsx(IconWrapper$4,{className:"centered",onClick:()=>it(at.ref_id),children:jsxRuntimeExports.jsx(MdCheckCircle,{color:colors.primaryGreen,fontSize:24})})}),jsxRuntimeExports.jsx("div",{className:"delete-wrapper",children:nt===at.ref_id?jsxRuntimeExports.jsx(ClipLoader$2,{color:colors.white,size:16}):jsxRuntimeExports.jsx(ConfirmPopover,{message:"Are you sure ?",onConfirm:()=>ot(at.ref_id),children:jsxRuntimeExports.jsx(IconWrapper$4,{className:"centered",children:jsxRuntimeExports.jsx(MdCancel,{color:colors.primaryRed,fontSize:24})})})})]})}),jsxRuntimeExports.jsx(StyledTableCell,{className:"empty"})]},at.source))})]}):jsxRuntimeExports.jsxs(Flex,{children:[jsxRuntimeExports.jsx(Text$3,{children:"There is not any results for selected filters"}),jsxRuntimeExports.jsx(FilterOffIcon,{})]})},IconWrapper$4=styled$4(Flex)` - width: 20px; - height: 20px; - border-radius: 50%; +`, + TwitterHandle$1 = styled$4(Flex)` + color: ${colors.GRAY7}; + font-family: Barlow; + font-size: 9px; + font-style: normal; + font-weight: 400; + line-height: normal; +`, + TwitText = styled$4(Flex)` + color: ${colors.white}; + font-family: Barlow; + font-size: 13px; + font-style: normal; + font-weight: 400; + line-height: 130%; + letter-spacing: -0.39px; + margin: 8px 0; + display: -webkit-box; + -webkit-line-clamp: 2; /* Limit to two lines */ + -webkit-box-orient: vertical; + overflow: hidden; + white-space: normal; +`, + EpisodeWrapper$2 = styled$4(Flex).attrs({ direction: 'column' })` + padding: 24px; cursor: pointer; - background: transparent; - color: ${colors.lightBlue500}; - &.centered { - margin: 0 auto; + border-top: 1px solid #101317; + background: ${colors.BG1}; + + .type-image { + width: 20px; + height: 20px; + border-radius: 50%; + margin-right: 8px; } - & + & { + .booster__pill { + margin-right: 0; + margin-top: 8px; + } + .player-controls { margin-left: 4px; } -`,StyledLink$1=styled$4.a` +`, + Episode = ({ + boostCount: tt, + date: et, + episodeTitle: nt, + id: rt, + isSelectedView: it = !1, + imageUrl: ot, + showTitle: at, + type: st, + text: lt, + name: ct, + profilePicture: ut, + verified: ht = !1, + twitterHandle: dt, + className: pt = 'episode-wrapper', + onClick: mt, + }) => { + const gt = useDataStore((bt) => bt.selectedTimestamp), + yt = !!(gt && gt.id === rt) + return jsxRuntimeExports.jsxs(EpisodeWrapper$2, { + className: pt, + isSelected: yt, + onClick: mt, + children: [ + st !== 'tweet' && + st !== 'person' && + st !== 'guest' && + jsxRuntimeExports.jsxs(Flex, { + direction: 'row', + children: [ + !it && + jsxRuntimeExports.jsx(Flex, { + align: 'center', + pr: 16, + children: jsxRuntimeExports.jsx(Avatar$1, { src: ot, type: st || '' }), + }), + jsxRuntimeExports.jsxs(Flex, { + grow: 1, + shrink: 1, + children: [ + jsxRuntimeExports.jsx(Flex, { + align: 'center', + direction: 'row', + justify: 'space-between', + children: jsxRuntimeExports.jsx(Flex, { + align: 'center', + direction: 'row', + children: st && jsxRuntimeExports.jsx(TypeBadge, { type: st }), + }), + }), + jsxRuntimeExports.jsx(Description$1, { 'data-testid': 'episode-description', children: nt }), + jsxRuntimeExports.jsxs(Flex, { + direction: 'row', + justify: 'flex-start', + children: [ + !!et && jsxRuntimeExports.jsx(Date$2, { children: hooks.unix(et).format('ll') }), + !!at && jsxRuntimeExports.jsx(Title, { children: at }), + !it && + tt > 0 && + jsxRuntimeExports.jsx(Flex, { + style: { marginLeft: 'auto' }, + children: jsxRuntimeExports.jsx(BoostAmt, { amt: tt }), + }), + ], + }), + ], + }), + ], + }), + ['person', 'guest'].includes(st) && + jsxRuntimeExports.jsx(TypePerson, { imageUrl: ot, name: ct || '', title: at || '' }), + st === 'tweet' && + jsxRuntimeExports.jsx(TypeTweet, { + date: et, + imageUrl: ut, + name: ct || '', + text: lt || '', + twitterHandle: dt, + verified: ht, + }), + ], + }) + }, + Description$1 = styled$4(Flex)` + font-family: Barlow; + font-size: 13px; + font-style: normal; + font-weight: 500; + line-height: 17px; color: ${colors.white}; - text-decoration: underline; - &:visited { - color: ${colors.white}; + margin: 16px 0; + display: -webkit-box; + -webkit-line-clamp: 2; /* Limit to two lines */ + -webkit-box-orient: vertical; + overflow: hidden; + white-space: normal; +`, + Date$2 = styled$4(Text$3)` + overflow: hidden; + color: ${colors.GRAY6}; + text-overflow: ellipsis; + font-family: Barlow; + font-size: 11px; + font-style: normal; + font-weight: 400; + line-height: 18px; + margin-right: 8px; + flex-shrink: 0; +`, + Title = styled$4(Date$2)` + display: flex; + flex-direction: row; + align-items: center; + flex-shrink: 1; + max-width: 100px; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; + &:before { + content: ''; + display: block; + border-radius: 2px; + margin-right: 8px; + width: 4px; + flex-shrink: 0; + height: 4px; + background: ${colors.GRAY6}; } -`,QueuedSources=()=>{const[tt,et]=reactExports.useState(!0),[nt,rt]=reactExports.useState(""),[it,ot]=useDataStore(lt=>[lt.queuedSources,lt.setQueuedSources]);reactExports.useEffect(()=>{(async()=>{et(!0);try{const ct=await getRadarData({approved:"False"});ot(ct.data)}catch(ct){console.warn(ct)}finally{et(!1)}})()},[ot]);const at=lt=>{rt(nt===lt||!lt?"":lt)},st=it==null?void 0:it.filter(lt=>!nt||lt.source_type===nt);return jsxRuntimeExports.jsxs(Wrapper$k,{align:"stretch",direction:"column",justify:"flex-end",children:[jsxRuntimeExports.jsxs(Heading$4,{align:"flex-start",justify:"space-between",children:[jsxRuntimeExports.jsx(Text$3,{className:"title",children:"Queued Sources"}),jsxRuntimeExports.jsx(Text$3,{className:"subtitle",children:"This is a queue of pending sources waiting for approval or denial from graph users. If you think a source will provide good content for the graph, you can pay to approve it. Think of this as an investment: you pay to add it to the source table, and if the content is popular you will earn from it. If content is not relevant to the graph, you should deny it."})]}),jsxRuntimeExports.jsxs(Flex,{className:"filters",direction:"row",pb:16,px:36,children:[jsxRuntimeExports.jsx(StyledPill,{className:clsx$1({selected:!nt}),onClick:()=>at(""),size:"small",children:"All"}),Object.keys(sourcesMapper).map(lt=>jsxRuntimeExports.jsx(StyledPill,{className:clsx$1({selected:lt===nt}),onClick:()=>at(lt),size:"small",children:sourcesMapper[lt]},lt))]}),jsxRuntimeExports.jsx(TableWrapper$2,{align:"center",justify:tt?"center":"flex-start",children:tt?jsxRuntimeExports.jsx(ClipLoader$2,{color:colors.white}):jsxRuntimeExports.jsx(Table$2,{data:st})})]})},Wrapper$k=styled$4(Flex)` - flex: 1; - - .title { - margin-bottom: 32px; - font-size: 20px; - color: ${colors.white}; +`, + Relevance = ({ isSearchResult: tt }) => { + const et = useGraphData(), + nt = reactExports.useRef(null), + rt = tt ? 80 : 10, + it = useDataStore((yt) => yt.setSelectedNode), + ot = useDataStore((yt) => yt.setSelectedTimestamp), + [at] = useAppStore((yt) => [yt.setSidebarOpen]), + st = useAppStore((yt) => yt.setRelevanceSelected), + [lt, ct] = reactExports.useState(0), + ht = lt * rt + rt, + dt = et.nodes.length - 1 > ht, + pt = useIsMatchBreakpoint('sm', 'down'), + mt = reactExports.useMemo( + () => [...et.nodes].sort((yt, bt) => (bt.date || 0) - (yt.date || 0)).slice(0, ht), + [et.nodes, ht], + ), + gt = reactExports.useCallback( + (yt) => { + saveConsumedContent(yt), ot(yt), st(!0), it(yt), pt && at(!1) + }, + [it, st, at, ot, pt], + ) + return jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { + children: jsxRuntimeExports.jsxs(ScrollView, { + ref: nt, + id: 'search-result-list', + shrink: 1, + children: [ + mt.map((yt, bt) => { + const { + image_url: vt, + date: xt, + boost: kt, + type: St, + id: Tt, + episode_title: At, + show_title: Et, + node_type: $t, + text: Dt, + name: jt, + profile_picture: Pt, + verified: Ct = !1, + twitter_handle: wt, + } = yt || {} + return jsxRuntimeExports.jsx( + Episode, + { + boostCount: kt || 0, + date: xt || 0, + episodeTitle: formatDescription(At), + id: Tt, + imageUrl: vt || 'audio_default.svg', + name: jt || '', + onClick: () => gt(yt), + profilePicture: Pt, + showTitle: formatDescription(Et), + text: Dt || '', + twitterHandle: wt, + type: St || $t, + verified: Ct, + }, + bt.toString(), + ) + }), + jsxRuntimeExports.jsx(LoadMoreWrapper, { + align: 'center', + background: 'BG1', + direction: 'row', + justify: 'center', + children: jsxRuntimeExports.jsx(Button$2, { + disabled: !dt, + onClick: () => { + var yt + dt && (ct(lt + 1), (yt = nt.current) == null || yt.scrollTo(0, 0)) + }, + size: 'medium', + children: 'Load More', + }), + }), + ], + }), + }) + }, + LoadMoreWrapper = styled$4(Flex)` + flex: 0 0 86px; +`, + _View$1 = ({ isSearchResult: tt }) => + jsxRuntimeExports.jsxs(Wrapper$9, { + children: [ + !tt && + jsxRuntimeExports.jsxs('div', { + className: 'heading', + children: [ + jsxRuntimeExports.jsx('span', { className: 'heading__title', children: 'Latest' }), + jsxRuntimeExports.jsx('span', { + className: 'heading__icon', + children: jsxRuntimeExports.jsx(BrowseGalleryIcon, {}), + }), + ], + }), + jsxRuntimeExports.jsx(Relevance, { isSearchResult: tt }), + ], + }), + LatestView = reactExports.memo(_View$1), + Wrapper$9 = styled$4(Flex)` + .heading { + color: ${colors.GRAY6}; + padding: 0 24px 16px 24px; font-family: Barlow; - font-size: 22px; + font-size: 14px; font-style: normal; - font-weight: 600; - line-height: normal; - } + font-weight: 700; + line-height: 20px; + letter-spacing: 1.12px; + text-transform: uppercase; + display: flex; + align-items: flex-end; - .subtitle { - color: ${colors.GRAY3}; - font-family: Barlow; - font-size: 13px; - font-style: normal; - font-weight: 400; - line-height: normal; + &__icon { + margin-left: 14px; + margin-bottom: -2px; + font-size: 24px; + } } - & .filters { - overflow-x: auto; - } -`,TableWrapper$2=styled$4(Flex)` - min-height: 0; - overflow: auto; - flex: 1; - width: 100%; -`,ShieldPersonIcon=tt=>jsxRuntimeExports.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 20 20",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsxs("g",{id:"shield_person",children:[jsxRuntimeExports.jsx("mask",{id:"mask0_1543_22988",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"20",height:"20",children:jsxRuntimeExports.jsx("rect",{id:"Bounding box",width:"1em",height:"1em",fill:"currentColor"})}),jsxRuntimeExports.jsx("g",{mask:"url(#mask0_1543_22988)",children:jsxRuntimeExports.jsx("path",{id:"shield_person_2",d:"M9.99998 10.6249C10.7521 10.6249 11.3915 10.3616 11.9182 9.83486C12.4449 9.30816 12.7083 8.66875 12.7083 7.91661C12.7083 7.16447 12.4449 6.52505 11.9182 5.99836C11.3915 5.47165 10.7521 5.20829 9.99998 5.20829C9.24784 5.20829 8.60842 5.47165 8.08173 5.99836C7.55502 6.52505 7.29167 7.16447 7.29167 7.91661C7.29167 8.66875 7.55502 9.30816 8.08173 9.83486C8.60842 10.3616 9.24784 10.6249 9.99998 10.6249ZM9.99998 17.9005C8.08973 17.376 6.57051 16.3049 5.44231 14.6874C4.3141 13.0699 3.75 11.2574 3.75 9.24994V4.45509L9.99998 2.11536L16.25 4.45509V9.24994C16.25 11.2574 15.6859 13.0699 14.5576 14.6874C13.4295 16.3049 11.9102 17.376 9.99998 17.9005ZM9.99998 16.5833C10.782 16.3301 11.4823 15.9422 12.1009 15.4198C12.7195 14.8974 13.2569 14.298 13.7131 13.6218C13.1373 13.3269 12.5371 13.1009 11.9126 12.9439C11.2882 12.7868 10.6506 12.7083 9.99998 12.7083C9.34934 12.7083 8.71179 12.7868 8.08733 12.9439C7.46286 13.1009 6.8627 13.3269 6.28685 13.6218C6.74305 14.298 7.28044 14.8974 7.89902 15.4198C8.51762 15.9422 9.21794 16.3301 9.99998 16.5833Z",fill:"currentColor"})})]})}),Table$1=({data:tt,canEdit:et=!1})=>{const nt=useDataStore(st=>st.setSources),[rt,it]=reactExports.useState(""),ot=async(st,lt)=>{if(tt!=null&&tt.length)try{await putRadarData(st,lt);const ct=tt==null?void 0:tt.findIndex(ht=>ht.ref_id===st),ut=[...tt];ut[ct]={...ut[ct],source:lt.source},nt(ut)}catch(ct){console.warn(ct)}},at=async st=>{if(!(!st||!(tt!=null&&tt.length))){it(st);try{await deleteRadarData(st),nt(tt==null?void 0:tt.filter(lt=>lt.ref_id!==st))}catch(lt){console.warn(lt)}finally{it("")}}};return tt!=null&&tt.length?jsxRuntimeExports.jsxs(MaterialTable,{"aria-label":"a dense table",component:"table",id:"sources-table",size:"small",children:[jsxRuntimeExports.jsx(StyledTableHead,{children:jsxRuntimeExports.jsxs(TableRow$1,{component:"tr",children:[jsxRuntimeExports.jsx(StyledTableCell,{className:"empty"}),jsxRuntimeExports.jsx(StyledTableCell,{children:"Type"}),jsxRuntimeExports.jsx(StyledTableCell,{align:"left",children:"Source"}),et&&jsxRuntimeExports.jsx(StyledTableCell,{align:"left"}),jsxRuntimeExports.jsx(StyledTableCell,{className:"empty"})]})}),jsxRuntimeExports.jsx(TableBody$1,{component:"tbody",children:tt==null?void 0:tt.map(st=>jsxRuntimeExports.jsxs(StyledTableRow,{children:[jsxRuntimeExports.jsx(StyledTableCell,{className:"empty"}),jsxRuntimeExports.jsx(StyledTableCell,{align:"left",children:sourcesMapper[st.source_type]}),jsxRuntimeExports.jsx(StyledTableCell,{align:"left",children:jsxRuntimeExports.jsx(ConditionalWrapper,{condition:et,wrapper:lt=>jsxRuntimeExports.jsx(EditableCell,{id:st.ref_id,onSave:ct=>ot(st.ref_id,{source:ct,source_type:st.source_type}),value:st.source,children:lt}),children:st.source_type===TWITTER_HANDLE||st.source_type===RSS?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[st.source_type===TWITTER_HANDLE&&jsxRuntimeExports.jsxs(StyledLink,{href:`${TWITTER_LINK}/${st.source}`,target:"_blank",children:["@",st.source]}),st.source_type===RSS&&jsxRuntimeExports.jsx(StyledLink,{href:st.source,target:"_blank",children:st.source})]}):jsxRuntimeExports.jsx("div",{children:st.source})})}),et&&jsxRuntimeExports.jsx(StyledTableCell,{align:"left",children:jsxRuntimeExports.jsx("div",{className:"delete-wrapper",id:`delete-${st.source}`,children:rt===st.ref_id?jsxRuntimeExports.jsx(ClipLoader$2,{color:colors.white}):jsxRuntimeExports.jsx(ConfirmPopover,{message:"Are you sure ?",onConfirm:()=>at(st.ref_id),children:jsxRuntimeExports.jsx(IconWrapper$3,{className:"centered",children:jsxRuntimeExports.jsx(MdDeleteForever,{})})})})}),jsxRuntimeExports.jsx(StyledTableCell,{className:"empty"})]},st.source))})]}):jsxRuntimeExports.jsxs(Flex,{children:[jsxRuntimeExports.jsx(Text$3,{children:"There is not any results for selected filters"}),jsxRuntimeExports.jsx(FilterOffIcon,{})]})};function ConditionalWrapper({condition:tt,wrapper:et,children:nt}){return tt?et(nt):nt}const EditableCell=({value:tt,onSave:et,id:nt,children:rt})=>{const[it,ot]=reactExports.useState(!1),[at,st]=reactExports.useState(tt),[lt,ct]=reactExports.useState(!1),ut=async()=>{if(nt){ct(!0);try{await et(at),ot(!1)}catch(ht){console.warn(ht)}finally{ct(!1)}}};return jsxRuntimeExports.jsx("div",{children:it?jsxRuntimeExports.jsxs(EditModeCellWrapper,{direction:"row",children:[jsxRuntimeExports.jsx(BaseTextInput,{className:"editable-cell__input",name:"cell-input",onChange:ht=>st(ht),value:at}),jsxRuntimeExports.jsx(IconWrapper$3,{align:"center",justify:"center",children:lt?jsxRuntimeExports.jsx(ClipLoader$2,{}):jsxRuntimeExports.jsx(MdCheck,{onClick:ut})}),jsxRuntimeExports.jsx(IconWrapper$3,{align:"center",className:"secondary",justify:"center",onClick:()=>ot(!1),children:jsxRuntimeExports.jsx(MdClose,{})})]}):jsxRuntimeExports.jsxs(EditableCellWrapper,{direction:"row",children:[rt,jsxRuntimeExports.jsx(IconWrapper$3,{onClick:()=>ot(!0),children:jsxRuntimeExports.jsx(MdOutlineModeEdit,{size:20})})]})})},EditModeCellWrapper=styled$4(Flex)` - display: flex; - width: 250px; - border: 2px solid ${colors.lightBlue300}; - padding: 4px; - height: 28px; - border-radius: 8px; - box-sizing: border-box; + .list { + list-style: none; + padding: 0; + margin: 0; + cursor: pointer; - .editable-cell__input { - flex: 1; - -webkit-text-fill-color: #fff; - padding: 0 4px; - color: #fff; + &-item { + padding: 18px 16px 18px 24px; + overflow: hidden; + color: ${colors.white}; + text-overflow: ellipsis; + font-family: Barlow; + font-size: 16px; + font-style: normal; + font-weight: 600; + line-height: 11px; + + &:hover { + background: rgba(0, 0, 0, 0.1); + color: ${colors.SECONDARY_BLUE}; + } + + &:active { + background: rgba(0, 0, 0, 0.2); + color: ${colors.PRIMARY_BLUE}; + } + } } -`,IconWrapper$3=styled$4(Flex)` - width: 20px; - height: 20px; - border-radius: 50%; +`, + EpisodeWrapper$1 = styled$4(Flex).attrs({ direction: 'column' })` + padding: 24px; cursor: pointer; - background: transparent; - color: ${colors.lightBlue500}; - &.centered { - margin: 0 auto; + border-top: 1px solid #101317; + background: ${colors.BG1}; + + .type-image { + width: 20px; + height: 20px; + border-radius: 50%; + margin-right: 8px; } - & + & { + .booster__pill { + margin-right: 0; + margin-top: 8px; + } + .player-controls { margin-left: 4px; } -`,EditableCellWrapper=styled$4(Flex)` - display: flex; - padding: 4px; - position: relative; - ${IconWrapper$3} { - visibility: hidden; + .title { + margin: 20px 0 8px; } - - &:hover { - ${IconWrapper$3} { - visibility: visible; - } +`, + StyledSkeleton$1 = styled$4(Skeleton$2)` + && { + background: rgba(0, 0, 0, 0.15); } -`,StyledLink=styled$4.a` +`, + EpisodeSkeleton = () => + jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { + children: Array(7) + .fill(null) + .map((tt, et) => + jsxRuntimeExports.jsx( + EpisodeWrapper$1, + { + children: jsxRuntimeExports.jsxs(Flex, { + direction: 'row', + children: [ + jsxRuntimeExports.jsx(Flex, { + align: 'center', + pr: 16, + children: jsxRuntimeExports.jsx(StyledSkeleton$1, { + animation: 'wave', + height: 64, + variant: 'rectangular', + width: 64, + }), + }), + jsxRuntimeExports.jsxs(Flex, { + grow: 1, + shrink: 1, + children: [ + jsxRuntimeExports.jsx(StyledSkeleton$1, { height: 10, variant: 'rectangular', width: 56 }), + jsxRuntimeExports.jsx(StyledSkeleton$1, { + className: 'title', + height: 10, + variant: 'rectangular', + width: 262, + }), + jsxRuntimeExports.jsx(StyledSkeleton$1, { height: 10, variant: 'rectangular', width: 149 }), + ], + }), + ], + }), + }, + et, + ), + ), + }) + styled$4(Flex)` + font-family: Barlow; + font-size: 13px; + font-style: normal; + font-weight: 500; + line-height: 17px; color: ${colors.white}; - text-decoration: underline; - &:visited { - color: ${colors.white}; + margin: 16px 0; + display: -webkit-box; + -webkit-line-clamp: 2; /* Limit to two lines */ + -webkit-box-orient: vertical; + overflow: hidden; + white-space: normal; +` + const Date$1 = styled$4(Text$3)` + overflow: hidden; + color: ${colors.GRAY6}; + text-overflow: ellipsis; + font-family: Barlow; + font-size: 11px; + font-style: normal; + font-weight: 400; + line-height: 18px; + margin-right: 8px; + flex-shrink: 0; +` + styled$4(Date$1)` + display: flex; + flex-direction: row; + align-items: center; + flex-shrink: 1; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; + &:before { + content: ''; + display: block; + border-radius: 2px; + margin-right: 8px; + width: 4px; + flex-shrink: 0; + height: 4px; + background: ${colors.GRAY6}; } -`,admins$1=["02c431e64078b10925584d64824c9d1d12eca05e2c56660ffa5ac84aa6946adfe5","03a9a8d953fe747d0dd94dd3c567ddc58451101e987e2d2bf7a4d1e10a2c89ff38","024efa31d1e4f98bccc415b222c9d971866013ad6f95f7d1ed9e8be8e3355a36ff","03bfe6723c06fb2b7546df1e8ca1a17ae5c504615da32c945425ccbe8d3ca6260d","024efa31d1e4f98bccc415b222c9d971866013ad6f95f7d1ed9e8be8e3355a36ff"],Sources=()=>{const[tt,et]=reactExports.useState(!0),[nt,rt]=reactExports.useState(""),[it,ot]=useDataStore(gt=>[gt.sources,gt.setSources]),[at,st,lt,ct]=useUserStore(gt=>[gt.setIsAdmin,gt.isAdmin,gt.setPubKey,gt.pubKey]);reactExports.useEffect(()=>{(async()=>{et(!0);try{const yt=await getRadarData();ot(yt.data)}catch(yt){console.warn(yt)}finally{et(!1)}})()},[ot]);const ut=gt=>{rt(nt===gt||!gt?"":gt)},ht=async()=>{await executeIfProd(async()=>{try{const gt=await distExports$1.enable(),yt=gt==null?void 0:gt.pubkey;lt(yt),yt&&at(yt&&admins$1.includes(yt))}catch(gt){console.warn(gt)}})},dt=async()=>{try{const gt=await triggerRadarJob();if(gt!=null&>.error){toast(jsxRuntimeExports.jsx(ToastMessage,{message:"An error happened"}),{icon:!1,position:toast.POSITION.BOTTOM_CENTER,type:"error"});return}toast(jsxRuntimeExports.jsx(ToastMessage,{message:"Job started"}),{icon:!1,position:toast.POSITION.BOTTOM_CENTER,type:"success"})}catch{toast(jsxRuntimeExports.jsx(ToastMessage,{message:"An error happened"}),{icon:!1,position:toast.POSITION.BOTTOM_CENTER,type:"error"})}},pt=()=>ct?ct&&st?jsxRuntimeExports.jsx(RunButton,{endIcon:jsxRuntimeExports.jsx(MdRestartAlt,{color:colors.white}),onClick:dt,size:"small",children:"Run"}):jsxRuntimeExports.jsx(Text$3,{children:"You are not admin"}):jsxRuntimeExports.jsx(EditButton$1,{color:"secondary",onClick:ht,size:"small",startIcon:jsxRuntimeExports.jsx(ShieldPersonIcon,{}),variant:"contained",children:"Admin"}),mt=it==null?void 0:it.filter(gt=>!nt||gt.source_type===nt);return jsxRuntimeExports.jsxs(Wrapper$j,{align:"stretch",direction:"column",justify:"flex-end",children:[jsxRuntimeExports.jsxs(Heading$4,{align:"center",direction:"row",justify:"space-between",children:[jsxRuntimeExports.jsx(Text$3,{className:"title",children:"Sources for this Graph"}),pt()]}),jsxRuntimeExports.jsxs(Flex,{className:"filters",direction:"row",pb:16,px:36,children:[jsxRuntimeExports.jsx(StyledPill,{className:clsx$1({selected:!nt}),onClick:()=>ut(""),size:"small",children:"All"}),Object.keys(sourcesMapper).map(gt=>jsxRuntimeExports.jsx(StyledPill,{className:clsx$1({selected:gt===nt}),onClick:()=>ut(gt),size:"small",children:sourcesMapper[gt]},gt))]}),jsxRuntimeExports.jsx(TableWrapper$1,{align:"center",justify:tt?"center":"flex-start",children:tt?jsxRuntimeExports.jsx(ClipLoader$2,{color:colors.white}):jsxRuntimeExports.jsx(Table$1,{canEdit:st,data:mt})})]})},Wrapper$j=styled$4(Flex)` - flex: 1; - .title { - margin-bottom: 16px; - font-size: 20px; - color: ${colors.white}; - font-family: Barlow; - font-size: 22px; - font-style: normal; - font-weight: 600; - line-height: normal; +` + const CloseIcon = (tt) => + jsxRuntimeExports.jsx('svg', { + width: '1em', + height: '1em', + viewBox: '0 0 32 32', + fill: 'currentColor', + xmlns: 'http://www.w3.org/2000/svg', + children: jsxRuntimeExports.jsxs('g', { + id: 'cancel', + children: [ + jsxRuntimeExports.jsx('mask', { + id: 'mask0_1264_3381', + maskUnits: 'userSpaceOnUse', + x: '0', + y: '0', + width: '32', + height: '32', + children: jsxRuntimeExports.jsx('rect', { + id: 'Bounding box', + width: '1em', + height: '1em', + fill: 'currentColor', + }), + }), + jsxRuntimeExports.jsx('g', { + mask: 'url(#mask0_1264_3381)', + children: jsxRuntimeExports.jsx('path', { + id: 'cancel_2', + d: 'M16 17.4051L20.0975 21.5025C20.2821 21.6872 20.5141 21.7816 20.7936 21.7859C21.0731 21.7902 21.3094 21.6957 21.5025 21.5025C21.6957 21.3094 21.7923 21.0752 21.7923 20.8C21.7923 20.5248 21.6957 20.2906 21.5025 20.0975L17.4051 16L21.5025 11.9025C21.6872 11.7179 21.7816 11.4859 21.7859 11.2064C21.7902 10.9269 21.6957 10.6906 21.5025 10.4975C21.3094 10.3043 21.0752 10.2077 20.8 10.2077C20.5248 10.2077 20.2906 10.3043 20.0975 10.4975L16 14.5949L11.9025 10.4975C11.7179 10.3129 11.4859 10.2184 11.2064 10.2141C10.9269 10.2099 10.6906 10.3043 10.4975 10.4975C10.3043 10.6906 10.2077 10.9248 10.2077 11.2C10.2077 11.4752 10.3043 11.7094 10.4975 11.9025L14.5949 16L10.4975 20.0975C10.3129 20.2821 10.2184 20.5141 10.2141 20.7936C10.2099 21.0731 10.3043 21.3094 10.4975 21.5025C10.6906 21.6957 10.9248 21.7923 11.2 21.7923C11.4752 21.7923 11.7094 21.6957 11.9025 21.5025L16 17.4051ZM16.0022 28.6666C14.2503 28.6666 12.6036 28.3342 11.0621 27.6693C9.52057 27.0044 8.17966 26.1021 7.03937 24.9623C5.89906 23.8225 4.99632 22.4822 4.33114 20.9413C3.66596 19.4005 3.33337 17.7542 3.33337 16.0022C3.33337 14.2503 3.66582 12.6036 4.33071 11.0621C4.9956 9.52057 5.89793 8.17967 7.03771 7.03938C8.17751 5.89907 9.51783 4.99632 11.0587 4.33114C12.5995 3.66596 14.2459 3.33337 15.9978 3.33337C17.7497 3.33337 19.3964 3.66582 20.9379 4.33071C22.4794 4.9956 23.8204 5.89793 24.9606 7.03771C26.101 8.17751 27.0037 9.51783 27.6689 11.0587C28.3341 12.5995 28.6666 14.2459 28.6666 15.9978C28.6666 17.7497 28.3342 19.3964 27.6693 20.9379C27.0044 22.4794 26.1021 23.8204 24.9623 24.9606C23.8225 26.101 22.4822 27.0037 20.9413 27.6689C19.4005 28.3341 17.7542 28.6666 16.0022 28.6666Z', + fill: 'currentColor', + }), + }), + ], + }), + }), + TextType = () => { + const tt = useSelectedNode() + return jsxRuntimeExports.jsx(Flex, { + align: 'center', + justify: 'center', + p: 12, + children: jsxRuntimeExports.jsx(Text$3, { + color: 'primaryText1', + kind: 'regular', + children: tt == null ? void 0 : tt.text, + }), + }) + } + var bundle = (function (tt) { + var et = {} + function nt(rt) { + if (et[rt]) return et[rt].exports + var it = (et[rt] = { i: rt, l: !1, exports: {} }) + return tt[rt].call(it.exports, it, it.exports, nt), (it.l = !0), it.exports + } + return ( + (nt.m = tt), + (nt.c = et), + (nt.d = function (rt, it, ot) { + nt.o(rt, it) || Object.defineProperty(rt, it, { enumerable: !0, get: ot }) + }), + (nt.r = function (rt) { + typeof Symbol < 'u' && Symbol.toStringTag && Object.defineProperty(rt, Symbol.toStringTag, { value: 'Module' }), + Object.defineProperty(rt, '__esModule', { value: !0 }) + }), + (nt.t = function (rt, it) { + if ((1 & it && (rt = nt(rt)), 8 & it || (4 & it && typeof rt == 'object' && rt && rt.__esModule))) return rt + var ot = Object.create(null) + if ( + (nt.r(ot), + Object.defineProperty(ot, 'default', { enumerable: !0, value: rt }), + 2 & it && typeof rt != 'string') + ) + for (var at in rt) + nt.d( + ot, + at, + function (st) { + return rt[st] + }.bind(null, at), + ) + return ot + }), + (nt.n = function (rt) { + var it = + rt && rt.__esModule + ? function () { + return rt.default + } + : function () { + return rt + } + return nt.d(it, 'a', it), it + }), + (nt.o = function (rt, it) { + return Object.prototype.hasOwnProperty.call(rt, it) + }), + (nt.p = ''), + nt((nt.s = 2)) + ) + })([ + function (tt, et) { + tt.exports = propTypesExports + }, + function (tt, et) { + tt.exports = reactExports + }, + function (module, __webpack_exports__, __webpack_require__) { + __webpack_require__.r(__webpack_exports__), + function (module) { + var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1), + react__WEBPACK_IMPORTED_MODULE_0___default = __webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__), + prop_types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(0), + prop_types__WEBPACK_IMPORTED_MODULE_1___default = __webpack_require__.n( + prop_types__WEBPACK_IMPORTED_MODULE_1__, + ), + enterModule + function _typeof(tt) { + return (_typeof = + typeof Symbol == 'function' && typeof Symbol.iterator == 'symbol' + ? function (et) { + return typeof et + } + : function (et) { + return et && typeof Symbol == 'function' && et.constructor === Symbol && et !== Symbol.prototype + ? 'symbol' + : typeof et + })(tt) + } + function _extends() { + return (_extends = + Object.assign || + function (tt) { + for (var et = 1; et < arguments.length; et++) { + var nt = arguments[et] + for (var rt in nt) Object.prototype.hasOwnProperty.call(nt, rt) && (tt[rt] = nt[rt]) + } + return tt + }).apply(this, arguments) + } + function _classCallCheck(tt, et) { + if (!(tt instanceof et)) throw new TypeError('Cannot call a class as a function') + } + function _defineProperties(tt, et) { + for (var nt = 0; nt < et.length; nt++) { + var rt = et[nt] + ;(rt.enumerable = rt.enumerable || !1), + (rt.configurable = !0), + 'value' in rt && (rt.writable = !0), + Object.defineProperty(tt, rt.key, rt) + } + } + function _createClass(tt, et, nt) { + return et && _defineProperties(tt.prototype, et), nt && _defineProperties(tt, nt), tt + } + function _inherits(tt, et) { + if (typeof et != 'function' && et !== null) + throw new TypeError('Super expression must either be null or a function') + ;(tt.prototype = Object.create(et && et.prototype, { + constructor: { value: tt, writable: !0, configurable: !0 }, + })), + et && _setPrototypeOf(tt, et) + } + function _setPrototypeOf(tt, et) { + return (_setPrototypeOf = + Object.setPrototypeOf || + function (nt, rt) { + return (nt.__proto__ = rt), nt + })(tt, et) + } + function _createSuper(tt) { + return function () { + var et, + nt = _getPrototypeOf(tt) + if (_isNativeReflectConstruct()) { + var rt = _getPrototypeOf(this).constructor + et = Reflect.construct(nt, arguments, rt) + } else et = nt.apply(this, arguments) + return _possibleConstructorReturn(this, et) + } + } + function _possibleConstructorReturn(tt, et) { + return !et || (_typeof(et) !== 'object' && typeof et != 'function') ? _assertThisInitialized(tt) : et + } + function _assertThisInitialized(tt) { + if (tt === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called") + return tt + } + function _isNativeReflectConstruct() { + 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 + } + } + function _getPrototypeOf(tt) { + return (_getPrototypeOf = Object.setPrototypeOf + ? Object.getPrototypeOf + : function (et) { + return et.__proto__ || Object.getPrototypeOf(et) + })(tt) + } + function _defineProperty(tt, et, nt) { + return ( + et in tt + ? Object.defineProperty(tt, et, { value: nt, enumerable: !0, configurable: !0, writable: !0 }) + : (tt[et] = nt), + tt + ) + } + ;(enterModule = typeof reactHotLoaderGlobal < 'u' ? reactHotLoaderGlobal.enterModule : void 0), + enterModule && enterModule(module), + typeof reactHotLoaderGlobal < 'u' && reactHotLoaderGlobal.default.signature + var ReactAudioPlayer = (function (_Component) { + _inherits(ReactAudioPlayer, _Component) + var _super = _createSuper(ReactAudioPlayer) + function ReactAudioPlayer() { + var tt + _classCallCheck(this, ReactAudioPlayer) + for (var et = arguments.length, nt = new Array(et), rt = 0; rt < et; rt++) nt[rt] = arguments[rt] + return ( + _defineProperty( + _assertThisInitialized((tt = _super.call.apply(_super, [this].concat(nt)))), + 'audioEl', + react__WEBPACK_IMPORTED_MODULE_0___default.a.createRef(), + ), + _defineProperty(_assertThisInitialized(tt), 'listenTracker', void 0), + _defineProperty(_assertThisInitialized(tt), 'onError', function (it) { + var ot, at + return (ot = (at = tt.props).onError) === null || ot === void 0 ? void 0 : ot.call(at, it) + }), + _defineProperty(_assertThisInitialized(tt), 'onCanPlay', function (it) { + var ot, at + return (ot = (at = tt.props).onCanPlay) === null || ot === void 0 ? void 0 : ot.call(at, it) + }), + _defineProperty(_assertThisInitialized(tt), 'onCanPlayThrough', function (it) { + var ot, at + return (ot = (at = tt.props).onCanPlayThrough) === null || ot === void 0 ? void 0 : ot.call(at, it) + }), + _defineProperty(_assertThisInitialized(tt), 'onPlay', function (it) { + var ot, at + tt.setListenTrack(), (ot = (at = tt.props).onPlay) === null || ot === void 0 || ot.call(at, it) + }), + _defineProperty(_assertThisInitialized(tt), 'onAbort', function (it) { + var ot, at + tt.clearListenTrack(), (ot = (at = tt.props).onAbort) === null || ot === void 0 || ot.call(at, it) + }), + _defineProperty(_assertThisInitialized(tt), 'onEnded', function (it) { + var ot, at + tt.clearListenTrack(), (ot = (at = tt.props).onEnded) === null || ot === void 0 || ot.call(at, it) + }), + _defineProperty(_assertThisInitialized(tt), 'onPause', function (it) { + var ot, at + tt.clearListenTrack(), (ot = (at = tt.props).onPause) === null || ot === void 0 || ot.call(at, it) + }), + _defineProperty(_assertThisInitialized(tt), 'onSeeked', function (it) { + var ot, at + ;(ot = (at = tt.props).onSeeked) === null || ot === void 0 || ot.call(at, it) + }), + _defineProperty(_assertThisInitialized(tt), 'onLoadedMetadata', function (it) { + var ot, at + ;(ot = (at = tt.props).onLoadedMetadata) === null || ot === void 0 || ot.call(at, it) + }), + _defineProperty(_assertThisInitialized(tt), 'onVolumeChanged', function (it) { + var ot, at + ;(ot = (at = tt.props).onVolumeChanged) === null || ot === void 0 || ot.call(at, it) + }), + tt + ) + } + return ( + _createClass(ReactAudioPlayer, [ + { + key: 'componentDidMount', + value: function () { + var tt = this.audioEl.current + tt && + (this.updateVolume(this.props.volume), + tt.addEventListener('error', this.onError), + tt.addEventListener('canplay', this.onCanPlay), + tt.addEventListener('canplaythrough', this.onCanPlayThrough), + tt.addEventListener('play', this.onPlay), + tt.addEventListener('abort', this.onAbort), + tt.addEventListener('ended', this.onEnded), + tt.addEventListener('pause', this.onPause), + tt.addEventListener('seeked', this.onSeeked), + tt.addEventListener('loadedmetadata', this.onLoadedMetadata), + tt.addEventListener('volumechange', this.onVolumeChanged)) + }, + }, + { + key: 'componentWillUnmount', + value: function () { + var tt = this.audioEl.current + tt && + (tt.removeEventListener('error', this.onError), + tt.removeEventListener('canplay', this.onCanPlay), + tt.removeEventListener('canplaythrough', this.onCanPlayThrough), + tt.removeEventListener('play', this.onPlay), + tt.removeEventListener('abort', this.onAbort), + tt.removeEventListener('ended', this.onEnded), + tt.removeEventListener('pause', this.onPause), + tt.removeEventListener('seeked', this.onSeeked), + tt.removeEventListener('loadedmetadata', this.onLoadedMetadata), + tt.removeEventListener('volumechange', this.onVolumeChanged)) + }, + }, + { + key: 'componentDidUpdate', + value: function (tt) { + this.updateVolume(this.props.volume) + }, + }, + { + key: 'setListenTrack', + value: function () { + var tt = this + if (!this.listenTracker) { + var et = this.props.listenInterval + this.listenTracker = window.setInterval(function () { + var nt, rt + tt.audioEl.current && + ((nt = (rt = tt.props).onListen) === null || + nt === void 0 || + nt.call(rt, tt.audioEl.current.currentTime)) + }, et) + } + }, + }, + { + key: 'updateVolume', + value: function (tt) { + var et = this.audioEl.current + et !== null && typeof tt == 'number' && tt !== (et == null ? void 0 : et.volume) && (et.volume = tt) + }, + }, + { + key: 'clearListenTrack', + value: function () { + this.listenTracker && (clearInterval(this.listenTracker), delete this.listenTracker) + }, + }, + { + key: 'render', + value: function () { + var tt = + this.props.children || + react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement( + 'p', + null, + 'Your browser does not support the ', + react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement('code', null, 'audio'), + ' element.', + ), + et = this.props.controls !== !1, + nt = this.props.title ? this.props.title : this.props.src, + rt = {} + return ( + this.props.controlsList && (rt.controlsList = this.props.controlsList), + react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement( + 'audio', + _extends( + { + autoPlay: this.props.autoPlay, + className: 'react-audio-player '.concat(this.props.className), + controls: et, + crossOrigin: this.props.crossOrigin, + id: this.props.id, + loop: this.props.loop, + muted: this.props.muted, + preload: this.props.preload, + ref: this.audioEl, + src: this.props.src, + style: this.props.style, + title: nt, + }, + rt, + ), + tt, + ) + ) + }, + }, + { + key: '__reactstandin__regenerateByEval', + value: function __reactstandin__regenerateByEval(key, code) { + this[key] = eval(code) + }, + }, + ]), + ReactAudioPlayer + ) + })(react__WEBPACK_IMPORTED_MODULE_0__.Component) + _defineProperty(ReactAudioPlayer, 'propTypes', void 0), + _defineProperty(ReactAudioPlayer, 'defaultProps', void 0), + (ReactAudioPlayer.defaultProps = { + autoPlay: !1, + children: null, + className: '', + controls: !1, + controlsList: '', + id: '', + listenInterval: 1e4, + loop: !1, + muted: !1, + onAbort: function () {}, + onCanPlay: function () {}, + onCanPlayThrough: function () {}, + onEnded: function () {}, + onError: function () {}, + onListen: function () {}, + onPause: function () {}, + onPlay: function () {}, + onSeeked: function () {}, + onVolumeChanged: function () {}, + onLoadedMetadata: function () {}, + preload: 'metadata', + style: {}, + title: '', + volume: 1, + }), + (ReactAudioPlayer.propTypes = { + autoPlay: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.bool, + children: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.element, + className: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string, + controls: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.bool, + controlsList: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string, + crossOrigin: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string, + id: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string, + listenInterval: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number, + loop: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.bool, + muted: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.bool, + onAbort: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.func, + onCanPlay: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.func, + onCanPlayThrough: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.func, + onEnded: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.func, + onError: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.func, + onListen: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.func, + onLoadedMetadata: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.func, + onPause: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.func, + onPlay: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.func, + onSeeked: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.func, + onVolumeChanged: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.func, + preload: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOf(['', 'none', 'metadata', 'auto']), + src: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string, + style: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.objectOf( + prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string, + ), + title: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string, + volume: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number, + }) + var _default = ReactAudioPlayer, + reactHotLoader, + leaveModule + ;(__webpack_exports__.default = _default), + (reactHotLoader = typeof reactHotLoaderGlobal < 'u' ? reactHotLoaderGlobal.default : void 0), + reactHotLoader && + (reactHotLoader.register( + ReactAudioPlayer, + 'ReactAudioPlayer', + '/home/justin/Projects/react-audio-player/src/index.tsx', + ), + reactHotLoader.register(_default, 'default', '/home/justin/Projects/react-audio-player/src/index.tsx')), + (leaveModule = typeof reactHotLoaderGlobal < 'u' ? reactHotLoaderGlobal.leaveModule : void 0), + leaveModule && leaveModule(module) + }.call(this, __webpack_require__(3)(module)) + }, + function (tt, et) { + tt.exports = function (nt) { + if (!nt.webpackPolyfill) { + var rt = Object.create(nt) + rt.children || (rt.children = []), + Object.defineProperty(rt, 'loaded', { + enumerable: !0, + get: function () { + return rt.l + }, + }), + Object.defineProperty(rt, 'id', { + enumerable: !0, + get: function () { + return rt.i + }, + }), + Object.defineProperty(rt, 'exports', { enumerable: !0 }), + (rt.webpackPolyfill = 1) + } + return rt + } + }, + ]) + const ReactAudioPlayer = getDefaultExportFromCjs(bundle), + videoTimetoSeconds = (tt) => { + const [et, nt, rt] = tt.split(':'), + it = parseInt(et, 10), + ot = parseInt(nt, 10), + at = parseInt(rt, 10) + return it * 3600 + ot * 60 + at + }, + Audio = styled$4(ReactAudioPlayer)` + width: 100%; +`, + _AudioPlayer = ({ + mediaUrl: tt, + timestamp: et, + play: nt, + onLoaded: rt = lodashExports.noop, + onError: it = lodashExports.noop, + onPause: ot = lodashExports.noop, + onPlay: at = lodashExports.noop, + }) => { + const [st, lt] = reactExports.useState(!1), + [ct, ut] = reactExports.useState(null) + return ( + reactExports.useEffect(() => { + lodashExports.isUndefined(nt) || !ct || (nt ? ct.play() : ct.pause()) + }, [nt, ct]), + reactExports.useEffect(() => { + const ht = document.getElementById('audio-player') + ht && ut(ht) + }, []), + reactExports.useEffect(() => { + if (ct) + return ( + ct.addEventListener('play', at), + ct.addEventListener('pause', ot), + () => { + ct.removeEventListener('play', at), ct.removeEventListener('pause', ot) + } + ) + }, [ot, at, ct]), + reactExports.useEffect( + () => () => { + ot() + }, + [ot], + ), + reactExports.useEffect(() => { + ot() + }, [tt, ot]), + reactExports.useEffect(() => { + ct && (ct.currentTime = et ? videoTimetoSeconds(et) : 0) + }, [et, ct]), + jsxRuntimeExports.jsx(Flex, { + children: st + ? jsxRuntimeExports.jsx(Text$3, { color: 'primaryRed', kind: 'medium', children: 'Audio failed to load' }) + : jsxRuntimeExports.jsx(Audio, { + controls: !0, + id: 'audio-player', + onError: () => { + lt(!0), it() + }, + onLoadedMetadata: () => { + lt(!1), rt() + }, + src: tt, + volume: 1, + }), + }) + ) + }, + AudioPlayer = reactExports.memo(_AudioPlayer) + var ClipLoader$1 = {}, + unitConverter = {} + Object.defineProperty(unitConverter, '__esModule', { value: !0 }) + unitConverter.cssValue = unitConverter.parseLengthAndUnit = void 0 + var cssUnit = { + cm: !0, + mm: !0, + in: !0, + px: !0, + pt: !0, + pc: !0, + em: !0, + ex: !0, + ch: !0, + rem: !0, + vw: !0, + vh: !0, + vmin: !0, + vmax: !0, + '%': !0, } - - & .filters { - overflow-x: auto; + function parseLengthAndUnit(tt) { + if (typeof tt == 'number') return { value: tt, unit: 'px' } + var et, + nt = (tt.match(/^[0-9.]*/) || '').toString() + nt.includes('.') ? (et = parseFloat(nt)) : (et = parseInt(nt, 10)) + var rt = (tt.match(/[^0-9]*$/) || '').toString() + return cssUnit[rt] + ? { value: et, unit: rt } + : (console.warn('React Spinners: '.concat(tt, ' is not a valid css value. Defaulting to ').concat(et, 'px.')), + { value: et, unit: 'px' }) } -`,TableWrapper$1=styled$4(Flex)` - min-height: 0; - overflow: auto; - flex: 1; - width: 100%; -`,RunButton=styled$4(Button$2)` - margin-left: 8px; -`,EditButton$1=styled$4(Button$2)` - margin-left: auto; -`,Pill=styled$4(Flex).attrs({align:"center",direction:"row",grow:0,justify:"center",shrink:0})` - border-radius: 20px; - color: ${colors.primaryText1}; - border: 2px solid ${colors.white}; - cursor: pointer; - font-size: 12px; - font-weight: 500; - line-height: 14px; - margin-right: 10px; - - opacity: ${({disabled:tt})=>tt?"0.7":"1"}; - - padding: 10px 20px; - -${({disabled:tt})=>tt&&Ae` - cursor: none; - opacity: 0.5; - `} - + unitConverter.parseLengthAndUnit = parseLengthAndUnit + function cssValue(tt) { + var et = parseLengthAndUnit(tt) + return ''.concat(et.value).concat(et.unit) } - - &:hover { - background: ${({selected:tt})=>tt?colors.gray300:colors.gray200}; + unitConverter.cssValue = cssValue + var animation = {} + Object.defineProperty(animation, '__esModule', { value: !0 }) + animation.createAnimation = void 0 + var createAnimation = function (tt, et, nt) { + var rt = 'react-spinners-'.concat(tt, '-').concat(nt) + if (typeof window > 'u' || !window.document) return rt + var it = document.createElement('style') + document.head.appendChild(it) + var ot = it.sheet, + at = ` + @keyframes ` + .concat( + rt, + ` { + `, + ) + .concat( + et, + ` + } + `, + ) + return ot && ot.insertRule(at, 0), rt } -} -`,Table=({data:tt,showMuted:et})=>{const nt=async(rt,it)=>{if(tt!=null&&tt.length)try{await putNodeData({ref_id:rt,node_name:"muted_topic",node_value:it})}catch(ot){console.warn(ot)}};return tt!=null&&tt.length?jsxRuntimeExports.jsxs(MaterialTable,{component:"table",children:[jsxRuntimeExports.jsx(StyledTableHead,{children:jsxRuntimeExports.jsxs(TableRow$1,{component:"tr",children:[jsxRuntimeExports.jsx(StyledTableCell,{className:"empty"}),jsxRuntimeExports.jsx(StyledTableCell,{children:"Type"}),jsxRuntimeExports.jsx(StyledTableCell,{children:et?"Unmute":"Mute"})]})}),(tt==null?void 0:tt.length)&&jsxRuntimeExports.jsx("tbody",{children:tt==null?void 0:tt.map(rt=>jsxRuntimeExports.jsxs(StyledTableRow,{children:[jsxRuntimeExports.jsx(StyledTableCell,{className:"empty"}),jsxRuntimeExports.jsx(StyledTableCell,{children:rt.topic}),jsxRuntimeExports.jsx(StyledTableCell,{className:"cell-center",children:jsxRuntimeExports.jsx(Flex,{direction:"row",justify:"space-between",children:jsxRuntimeExports.jsx("div",{className:"approve-wrapper",children:rt.muted_topic?jsxRuntimeExports.jsx(IconWrapper$2,{className:"centered",onClick:()=>nt(rt.ref_id,!1),children:jsxRuntimeExports.jsx(MdCheckCircle,{color:colors.primaryGreen,fontSize:24})}):jsxRuntimeExports.jsx(IconWrapper$2,{className:"centered",onClick:()=>nt(rt.ref_id,!0),children:jsxRuntimeExports.jsx(MdCancel,{color:colors.primaryRed,fontSize:24})})})})}),jsxRuntimeExports.jsx(StyledTableCell,{className:"empty"})]},rt.topic))})]}):jsxRuntimeExports.jsxs(Flex,{children:[jsxRuntimeExports.jsx(Text$3,{children:"There is not any results for selected filters"}),jsxRuntimeExports.jsx(FilterOffIcon,{})]})},IconWrapper$2=styled$4(Flex)` - width: 20px; - height: 20px; - border-radius: 50%; - cursor: pointer; - background: transparent; - color: ${colors.lightBlue500}; - &.centered { - margin: 0 auto; + animation.createAnimation = createAnimation + var __assign = + (commonjsGlobal && commonjsGlobal.__assign) || + function () { + return ( + (__assign = + Object.assign || + function (tt) { + for (var et, nt = 1, rt = arguments.length; nt < rt; nt++) { + et = arguments[nt] + for (var it in et) Object.prototype.hasOwnProperty.call(et, it) && (tt[it] = et[it]) + } + return tt + }), + __assign.apply(this, arguments) + ) + }, + __createBinding = + (commonjsGlobal && commonjsGlobal.__createBinding) || + (Object.create + ? function (tt, et, nt, rt) { + rt === void 0 && (rt = nt) + var it = Object.getOwnPropertyDescriptor(et, nt) + ;(!it || ('get' in it ? !et.__esModule : it.writable || it.configurable)) && + (it = { + enumerable: !0, + get: function () { + return et[nt] + }, + }), + Object.defineProperty(tt, rt, it) + } + : function (tt, et, nt, rt) { + rt === void 0 && (rt = nt), (tt[rt] = et[nt]) + }), + __setModuleDefault = + (commonjsGlobal && commonjsGlobal.__setModuleDefault) || + (Object.create + ? function (tt, et) { + Object.defineProperty(tt, 'default', { enumerable: !0, value: et }) + } + : function (tt, et) { + tt.default = et + }), + __importStar = + (commonjsGlobal && commonjsGlobal.__importStar) || + function (tt) { + if (tt && tt.__esModule) return tt + var et = {} + if (tt != null) + for (var nt in tt) + nt !== 'default' && Object.prototype.hasOwnProperty.call(tt, nt) && __createBinding(et, tt, nt) + return __setModuleDefault(et, tt), et + }, + __rest = + (commonjsGlobal && commonjsGlobal.__rest) || + function (tt, et) { + var nt = {} + for (var rt in tt) Object.prototype.hasOwnProperty.call(tt, rt) && et.indexOf(rt) < 0 && (nt[rt] = tt[rt]) + if (tt != null && typeof Object.getOwnPropertySymbols == 'function') + for (var it = 0, rt = Object.getOwnPropertySymbols(tt); it < rt.length; it++) + et.indexOf(rt[it]) < 0 && + Object.prototype.propertyIsEnumerable.call(tt, rt[it]) && + (nt[rt[it]] = tt[rt[it]]) + return nt + } + Object.defineProperty(ClipLoader$1, '__esModule', { value: !0 }) + var React = __importStar(reactExports), + unitConverter_1 = unitConverter, + animation_1 = animation, + clip = (0, animation_1.createAnimation)( + 'ClipLoader', + '0% {transform: rotate(0deg) scale(1)} 50% {transform: rotate(180deg) scale(0.8)} 100% {transform: rotate(360deg) scale(1)}', + 'clip', + ) + function ClipLoader(tt) { + var et = tt.loading, + nt = et === void 0 ? !0 : et, + rt = tt.color, + it = rt === void 0 ? '#000000' : rt, + ot = tt.speedMultiplier, + at = ot === void 0 ? 1 : ot, + st = tt.cssOverride, + lt = st === void 0 ? {} : st, + ct = tt.size, + ut = ct === void 0 ? 35 : ct, + ht = __rest(tt, ['loading', 'color', 'speedMultiplier', 'cssOverride', 'size']), + dt = __assign( + { + background: 'transparent !important', + width: (0, unitConverter_1.cssValue)(ut), + height: (0, unitConverter_1.cssValue)(ut), + borderRadius: '100%', + border: '2px solid', + borderTopColor: it, + borderBottomColor: 'transparent', + borderLeftColor: it, + borderRightColor: it, + display: 'inline-block', + animation: ''.concat(clip, ' ').concat(0.75 / at, 's 0s infinite linear'), + animationFillMode: 'both', + }, + lt, + ) + return nt ? React.createElement('span', __assign({ style: dt }, ht)) : null } - - & + & { - margin-left: 4px; + var _default = (ClipLoader$1.default = ClipLoader) + const sphinxPubkey = '023d8eb306f0027b902fbdc81d33b49b6558b3434d374626f8c324979c92d47c21', + boostAgainstBudget = async (tt) => { + let et = await distExports$1.enable(!0) + if ( + (et || console.warn('Sphinx enable failed, means no pubkey and no budget (including budget of 0)'), + (et = await distExports$1.keysend(sphinxPubkey, tt)), + !(et != null && et.success)) + ) { + if (((et = await distExports$1.topup()), !(et != null && et.budget) || (et == null ? void 0 : et.budget) < tt)) + throw new Error('Topup failed') + if (((et = await distExports$1.keysend(sphinxPubkey, tt)), !et)) throw new Error('Keysend failed after topup') + return et + } + return et + }, + boost = async (tt, et) => { + const nt = await boostAgainstBudget(et), + rt = { amount: et, refid: tt } + return await api.post('/boost', JSON.stringify(rt)), nt + }, + notify = (tt) => { + toast(jsxRuntimeExports.jsx(ToastMessage, { message: tt }), { + icon: !1, + position: toast.POSITION.BOTTOM_CENTER, + type: tt === BOOST_SUCCESS ? 'success' : 'error', + }) + }, + Booster = ({ count: tt = 0, updateCount: et, content: nt, readOnly: rt, refId: it }) => { + const [ot, at] = reactExports.useState(!1), + [st, lt] = reactExports.useState(!1), + [ct] = useUserStore((pt) => [pt.setBudget]) + reactExports.useEffect(() => { + lt(!1), at(!1) + }, [it]) + let { image_url: ut } = nt || {} + ut && (ut = ut.replace('.jpg', '_l.jpg')) + const ht = 5 + async function dt() { + if (!(ot || !it)) { + at(!0) + try { + const pt = await boost(it, ht) + lt(!0), notify(BOOST_SUCCESS), et && et(tt + ht), pt.budget && ct(pt.budget) + } catch { + notify(BOOST_ERROR_BUDGET) + } + at(!1) + } + } + return rt + ? tt + ? jsxRuntimeExports.jsx(Pill, { + className: 'booster__pill', + style: { padding: '1px 8px 1px 3px', width: 'fit-content' }, + children: jsxRuntimeExports.jsxs(Flex, { + align: 'center', + direction: 'row', + justify: 'center', + children: [ + jsxRuntimeExports.jsx(MdBolt, { fontSize: 12 }), + jsxRuntimeExports.jsx('div', { style: { fontSize: 10 }, children: tt || 0 }), + ], + }), + }) + : null + : jsxRuntimeExports.jsx('div', { + children: jsxRuntimeExports.jsx(Pill, { + disabled: ot, + onClick: async () => { + st || ot || (await dt()) + }, + style: { + padding: '4px 8px', + borderWidth: 0, + backgroundColor: '#303342', + height: '25px', + width: 'fit-content', + }, + children: ot + ? jsxRuntimeExports.jsx(_default, { color: '#fff', loading: !0, size: 10 }) + : jsxRuntimeExports.jsxs(Flex, { + align: 'center', + direction: 'row', + justify: 'space-around', + children: [ + jsxRuntimeExports.jsx(BoostIcon, { style: { color: colors.white } }), + jsxRuntimeExports.jsx('div', { style: { marginLeft: 8, marginRight: 8 }, children: 'Boost' }), + ], + }), + }), + }) + }, + defaultData = { isPlaying: !1 }, + usePlayerStore = react((tt) => ({ ...defaultData, setIsPlaying: (et) => tt({ isPlaying: et }) })), + NotesIcon = (tt) => + jsxRuntimeExports.jsx('svg', { + width: '1em', + height: '1em', + viewBox: '0 0 16 16', + fill: 'currentColor', + xmlns: 'http://www.w3.org/2000/svg', + children: jsxRuntimeExports.jsxs('g', { + id: 'notes', + children: [ + jsxRuntimeExports.jsx('mask', { + id: 'mask0_1473_73722', + maskUnits: 'userSpaceOnUse', + x: '0', + y: '0', + width: '16', + height: '16', + children: jsxRuntimeExports.jsx('rect', { + id: 'Bounding box', + width: '1em', + height: '1em', + fill: 'currentColor', + }), + }), + jsxRuntimeExports.jsx('g', { + mask: 'url(#mask0_1473_73722)', + children: jsxRuntimeExports.jsx('path', { + id: 'notes_2', + d: 'M2.83337 11.7564C2.69171 11.7564 2.57296 11.7085 2.47712 11.6126C2.38129 11.5167 2.33337 11.3979 2.33337 11.2562C2.33337 11.1144 2.38129 10.9957 2.47712 10.9C2.57296 10.8043 2.69171 10.7564 2.83337 10.7564H9.16668C9.30834 10.7564 9.42709 10.8043 9.52293 10.9002C9.61876 10.9961 9.66668 11.1149 9.66668 11.2566C9.66668 11.3983 9.61876 11.5171 9.52293 11.6128C9.42709 11.7085 9.30834 11.7564 9.16668 11.7564H2.83337ZM2.83337 8.49997C2.69171 8.49997 2.57296 8.45204 2.47712 8.35617C2.38129 8.2603 2.33337 8.1415 2.33337 7.99977C2.33337 7.85804 2.38129 7.73931 2.47712 7.64359C2.57296 7.54787 2.69171 7.50001 2.83337 7.50001H13.1667C13.3083 7.50001 13.4271 7.54794 13.5229 7.64381C13.6188 7.73969 13.6667 7.85849 13.6667 8.00021C13.6667 8.14194 13.6188 8.26067 13.5229 8.35639C13.4271 8.45211 13.3083 8.49997 13.1667 8.49997H2.83337ZM2.83337 5.24357C2.69171 5.24357 2.57296 5.19564 2.47712 5.09976C2.38129 5.00389 2.33337 4.88509 2.33337 4.74336C2.33337 4.60164 2.38129 4.48291 2.47712 4.38719C2.57296 4.29146 2.69171 4.24359 2.83337 4.24359H13.1667C13.3083 4.24359 13.4271 4.29153 13.5229 4.38741C13.6188 4.48329 13.6667 4.60209 13.6667 4.74381C13.6667 4.88554 13.6188 5.00427 13.5229 5.09999C13.4271 5.19571 13.3083 5.24357 13.1667 5.24357H2.83337Z', + fill: 'currentColor', + }), + }), + ], + }), + }), + Description = ({ stateless: tt, node: et }) => + jsxRuntimeExports.jsxs(Flex, { + grow: 1, + shrink: 1, + children: [ + jsxRuntimeExports.jsx(Header$1, { + children: + tt && + jsxRuntimeExports.jsxs(Heading$2, { + children: [ + jsxRuntimeExports.jsx('div', { className: 'icon', children: jsxRuntimeExports.jsx(NotesIcon, {}) }), + jsxRuntimeExports.jsx('div', { className: 'title', children: 'Description' }), + ], + }), + }), + jsxRuntimeExports.jsx(Box$1, { + children: et != null && et.description ? `"${et == null ? void 0 : et.description}"` : '...', + }), + ], + }), + Heading$2 = styled$4(Flex).attrs({ direction: 'row', align: 'center' })` + .icon { + font-size: 16px; + color: ${colors.GRAY3}; + margin-right: 7px; } -`,TopicSources=()=>{const[tt,et]=reactExports.useState(!0),[nt,rt]=reactExports.useState(!1),[it,ot]=useDataStore(at=>[at.topics,at.setTopics]);return reactExports.useEffect(()=>{(async()=>{et(!0);try{const lt=await getTopicsData({muted:nt?"True":"False"});ot(lt.data)}catch(st){console.warn(st)}finally{et(!1)}})()},[ot,nt]),jsxRuntimeExports.jsxs(Wrapper$i,{align:"stretch",direction:"column",justify:"flex-end",children:[jsxRuntimeExports.jsx(Heading$4,{align:"flex-start",justify:"space-between",children:jsxRuntimeExports.jsx(Text$3,{className:"title",children:"Topics"})}),jsxRuntimeExports.jsx(Pill,{className:"booster__pill",onClick:()=>rt(!nt),style:{marginLeft:"30px",marginBottom:"10px",padding:"5px 10px 5px 10px",width:"fit-content"},children:tt?jsxRuntimeExports.jsx(ClipLoader$2,{color:colors.white}):jsxRuntimeExports.jsx(Flex,{align:"center",direction:"row",justify:"center",children:jsxRuntimeExports.jsxs("div",{style:{fontSize:10},children:["Show ",nt?"Unmuted":"Muted"]})})}),jsxRuntimeExports.jsx(TableWrapper,{align:"center",justify:tt?"center":"flex-start",children:tt?jsxRuntimeExports.jsx(ClipLoader$2,{color:colors.white}):jsxRuntimeExports.jsx(Table,{data:it,showMuted:nt})})]})},Wrapper$i=styled$4(Flex)` - flex: 1; .title { - margin-bottom: 32px; - font-size: 20px; color: ${colors.white}; font-family: Barlow; - font-size: 22px; + font-size: 10px; font-style: normal; - font-weight: 600; + font-weight: 700; line-height: normal; + letter-spacing: 1px; + text-transform: uppercase; } - - .subtitle { +`, + Header$1 = styled$4(Flex).attrs({ direction: 'row', align: 'center', justify: 'space-between' })` + margin-bottom: 18px; +`, + Box$1 = styled$4(Flex)` + color: ${colors.white}; + text-overflow: ellipsis; + whitespace: nowrap; + font-family: Barlow; + font-size: 13px; + font-style: normal; + font-weight: 400; + line-height: 18px; +`, + CopyIcon = (tt) => + jsxRuntimeExports.jsx('svg', { + width: '1em', + height: '1em', + viewBox: '0 0 14 14', + fill: 'currentColor', + xmlns: 'http://www.w3.org/2000/svg', + children: jsxRuntimeExports.jsxs('g', { + id: 'content_copy', + children: [ + jsxRuntimeExports.jsx('mask', { + id: 'mask0_1489_75628', + maskUnits: 'userSpaceOnUse', + x: '0', + y: '0', + width: '14', + height: '14', + children: jsxRuntimeExports.jsx('rect', { + id: 'Bounding box', + width: '1em', + height: '1em', + fill: 'currentColor', + }), + }), + jsxRuntimeExports.jsx('g', { + mask: 'url(#mask0_1489_75628)', + children: jsxRuntimeExports.jsx('path', { + id: 'content_copy_2', + d: 'M5.28363 10.2083C4.98897 10.2083 4.73956 10.1063 4.5354 9.9021C4.33124 9.69793 4.22915 9.44852 4.22915 9.15385V2.51287C4.22915 2.21821 4.33124 1.96879 4.5354 1.76462C4.73956 1.56046 4.98897 1.45837 5.28363 1.45837H10.1746C10.4693 1.45837 10.7187 1.56046 10.9229 1.76462C11.127 1.96879 11.2291 2.21821 11.2291 2.51287V9.15385C11.2291 9.44852 11.127 9.69793 10.9229 9.9021C10.7187 10.1063 10.4693 10.2083 10.1746 10.2083H5.28363ZM5.28363 9.33336H10.1746C10.2195 9.33336 10.2606 9.31466 10.298 9.27727C10.3354 9.23987 10.3541 9.19873 10.3541 9.15385V2.51287C10.3541 2.46799 10.3354 2.42685 10.298 2.38945C10.2606 2.35206 10.2195 2.33336 10.1746 2.33336H5.28363C5.23875 2.33336 5.19762 2.35206 5.16023 2.38945C5.12282 2.42685 5.10412 2.46799 5.10412 2.51287V9.15385C5.10412 9.19873 5.12282 9.23987 5.16023 9.27727C5.19762 9.31466 5.23875 9.33336 5.28363 9.33336ZM3.24198 12.25C2.94733 12.25 2.69792 12.1479 2.49375 11.9437C2.28958 11.7396 2.1875 11.4902 2.1875 11.1955V3.67953H3.06249V11.1955C3.06249 11.2404 3.08118 11.2815 3.11857 11.3189C3.15597 11.3563 3.19711 11.375 3.24198 11.375H9.00796V12.25H3.24198Z', + fill: 'currentColor', + }), + }), + ], + }), + }), + copyNodeText = (tt) => { + if (tt === void 0) return + navigator.clipboard.writeText(tt) + const et = document.querySelector('.copy-button') + et && + (et.classList.add('copied'), + setTimeout(() => { + et.classList.remove('copied') + }, 1e3)) + }, + Transcript = ({ stateless: tt, node: et }) => { + const [nt, rt] = useAppStore((it) => [it.transcriptIsOpen, it.setTranscriptOpen]) + return !tt && !nt + ? null + : jsxRuntimeExports.jsxs(Flex, { + grow: 1, + shrink: 1, + children: [ + jsxRuntimeExports.jsxs(Header, { + children: [ + tt && + jsxRuntimeExports.jsxs(Heading$1, { + children: [ + jsxRuntimeExports.jsx('div', { + className: 'icon', + children: jsxRuntimeExports.jsx(NotesIcon, {}), + }), + jsxRuntimeExports.jsx('div', { className: 'title', children: 'Transcript' }), + ], + }), + et != null && et.text + ? jsxRuntimeExports.jsx(Button$2, { + endIcon: jsxRuntimeExports.jsx(CopyIcon, {}), + onPointerDown: () => copyNodeText(et == null ? void 0 : et.text), + size: 'small', + variant: 'outlined', + children: 'Copy', + }) + : jsxRuntimeExports.jsx('div', {}), + !tt && + jsxRuntimeExports.jsx(CloseButton$1, { + onClick: () => { + rt(!1) + }, + children: jsxRuntimeExports.jsx(MdClose, { fontSize: 35 }), + }), + ], + }), + jsxRuntimeExports.jsx(Box, { + children: et != null && et.text ? `"${et == null ? void 0 : et.text}"` : '...', + }), + ], + }) + }, + Heading$1 = styled$4(Flex).attrs({ direction: 'row', align: 'center' })` + .icon { + font-size: 16px; color: ${colors.GRAY3}; + margin-right: 7px; + } + + .title { + color: ${colors.white}; font-family: Barlow; - font-size: 13px; + font-size: 10px; font-style: normal; - font-weight: 400; + font-weight: 700; line-height: normal; + letter-spacing: 1px; + text-transform: uppercase; } - - & .filters { - overflow-x: auto; +`, + Header = styled$4(Flex).attrs({ direction: 'row', align: 'center', justify: 'space-between' })` + margin-bottom: 18px; +`, + CloseButton$1 = styled$4(Flex).attrs({})` + color: ${colors.mainBottomIcons}; + cursor: pointer; + &:hover { + color: ${colors.lightBlue500}; } -`,TableWrapper=styled$4(Flex)` - min-height: 0; - overflow: auto; +`, + Box = styled$4(Flex)` + color: ${colors.white}; + text-overflow: ellipsis; + whitespace: nowrap; + font-family: Barlow; + font-size: 13px; + font-style: normal; + font-weight: 400; + line-height: 18px; +`, + Wrapper$8 = styled$4(Flex)` flex: 1; - width: 100%; -`,TabPanel=tt=>{const{children:et,value:nt,index:rt,...it}=tt;return nt===rt?jsxRuntimeExports.jsx(TabPanelWrapper,{"aria-labelledby":`simple-tab-${rt}`,hidden:nt!==rt,id:`simple-tabpanel-${rt}`,role:"tabpanel",...it,children:et}):null};function a11yProps(tt){return{id:`simple-tab-${tt}`,"aria-controls":`simple-tabpanel-${tt}`}}const SourcesView=()=>{const[tt,et]=reactExports.useState(0),nt=(rt,it)=>{et(it)};return jsxRuntimeExports.jsxs(Wrapper$h,{direction:"column",children:[jsxRuntimeExports.jsxs(StyledTabs,{"aria-label":"basic tabs example",onChange:nt,value:tt,children:[jsxRuntimeExports.jsx(StyledTab,{disableRipple:!0,label:"Sources table",...a11yProps(0)}),jsxRuntimeExports.jsx(StyledTab,{color:colors.white,disableRipple:!0,label:"Queued sources",...a11yProps(1)}),jsxRuntimeExports.jsx(StyledTab,{color:colors.white,disableRipple:!0,label:"Topics",...a11yProps(1)})]}),jsxRuntimeExports.jsx(TabPanel,{index:0,value:tt,children:jsxRuntimeExports.jsx(Sources,{})}),jsxRuntimeExports.jsx(TabPanel,{index:1,value:tt,children:jsxRuntimeExports.jsx(QueuedSources,{})}),jsxRuntimeExports.jsx(TabPanel,{index:2,value:tt,children:jsxRuntimeExports.jsx(TopicSources,{})})]})},StyledTabs=styled$4(Tabs$1)` - && { - background: rgba(0, 0, 0, 0.2); - - .MuiTabs-indicator { - background: ${colors.primaryBlue}; - } - } -`,StyledTab=styled$4(Tab$2)` - && { - padding: 30px 0 24px; - color: ${colors.GRAY6}; - margin-left: 34px; - font-family: Barlow; + min-height: 100%; + flex-direction: column; + border-bottom: 1px solid #101317; + box-shadow: 0px 5px 6px rgba(0, 0, 0, 0.5); + z-index: 0; +`, + PlayerWrapper$1 = styled$4(Flex)` + padding: 30px 18px 0; +`, + StyledDivider$1 = styled$4(Divider$3)` + margin: auto 0px 2px 0px; + opacity: 75%; +`, + StyledEpisode$1 = styled$4(Episode)` + & { + border-top: none; + padding-bottom: 18px; font-size: 16px; - font-style: normal; - font-weight: 500; - - &.Mui-selected { - color: ${colors.white}; - } } -`,TabPanelWrapper=styled$4(Flex)` - display: flex; - flex: 1; - min-height: 572px; - padding: 20px 0; - max-height: 572px; -`,Wrapper$h=styled$4(Flex)` - min-height: 0; - flex: 1; -`,SourcesTableModal=()=>{const{close:tt}=useModal("sourcesTable");return jsxRuntimeExports.jsx(BaseModal,{background:"BG1",id:"sourcesTable",kind:"large",noWrap:!0,onClose:tt,children:jsxRuntimeExports.jsx(SourcesView,{})})},BubbleChartIcon=tt=>jsxRuntimeExports.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 20 20",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsxs("g",{id:"bubble_chart",children:[jsxRuntimeExports.jsx("mask",{id:"mask0_1551_42",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"20",height:"20",children:jsxRuntimeExports.jsx("rect",{id:"Bounding box",width:"1em",height:"1em",fill:"currentColor"})}),jsxRuntimeExports.jsx("g",{mask:"url(#mask0_1551_42)",children:jsxRuntimeExports.jsx("path",{id:"bubble_chart_2",d:"M5.83333 15C4.91667 15 4.13194 14.6736 3.47917 14.0208C2.82639 13.3681 2.5 12.5833 2.5 11.6667C2.5 10.75 2.82639 9.96528 3.47917 9.3125C4.13194 8.65972 4.91667 8.33333 5.83333 8.33333C6.75 8.33333 7.53472 8.65972 8.1875 9.3125C8.84028 9.96528 9.16667 10.75 9.16667 11.6667C9.16667 12.5833 8.84028 13.3681 8.1875 14.0208C7.53472 14.6736 6.75 15 5.83333 15ZM13.75 11.6667C12.4722 11.6667 11.3889 11.2222 10.5 10.3333C9.61111 9.44444 9.16667 8.36111 9.16667 7.08333C9.16667 5.80556 9.61111 4.72222 10.5 3.83333C11.3889 2.94444 12.4722 2.5 13.75 2.5C15.0278 2.5 16.1111 2.94444 17 3.83333C17.8889 4.72222 18.3333 5.80556 18.3333 7.08333C18.3333 8.36111 17.8889 9.44444 17 10.3333C16.1111 11.2222 15.0278 11.6667 13.75 11.6667ZM12.0833 17.5C11.3889 17.5 10.7986 17.2569 10.3125 16.7708C9.82639 16.2847 9.58333 15.6944 9.58333 15C9.58333 14.3056 9.82639 13.7153 10.3125 13.2292C10.7986 12.7431 11.3889 12.5 12.0833 12.5C12.7778 12.5 13.3681 12.7431 13.8542 13.2292C14.3403 13.7153 14.5833 14.3056 14.5833 15C14.5833 15.6944 14.3403 16.2847 13.8542 16.7708C13.3681 17.2569 12.7778 17.5 12.0833 17.5Z",fill:"currentColor"})})]})}),CommunitiesIcon=tt=>jsxRuntimeExports.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 20 20",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsxs("g",{id:"communities",children:[jsxRuntimeExports.jsx("mask",{id:"mask0_1551_39",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"20",height:"20",children:jsxRuntimeExports.jsx("rect",{id:"Bounding box",width:"1em",height:"1em",fill:"currentColor"})}),jsxRuntimeExports.jsx("g",{mask:"url(#mask0_1551_39)",children:jsxRuntimeExports.jsx("path",{id:"communities_2",d:"M7.50002 13.125C7.90494 13.125 8.24921 12.9832 8.53285 12.6995C8.81651 12.4159 8.95833 12.0716 8.95833 11.6667C8.95833 11.2618 8.81651 10.9175 8.53285 10.6339C8.24921 10.3502 7.90494 10.2084 7.50002 10.2084C7.0951 10.2084 6.75083 10.3502 6.46719 10.6339C6.18353 10.9175 6.04171 11.2618 6.04171 11.6667C6.04171 12.0716 6.18353 12.4159 6.46719 12.6995C6.75083 12.9832 7.0951 13.125 7.50002 13.125ZM12.5 13.125C12.9049 13.125 13.2492 12.9832 13.5329 12.6995C13.8165 12.4159 13.9583 12.0716 13.9583 11.6667C13.9583 11.2618 13.8165 10.9175 13.5329 10.6339C13.2492 10.3502 12.9049 10.2084 12.5 10.2084C12.0951 10.2084 11.7508 10.3502 11.4672 10.6339C11.1835 10.9175 11.0417 11.2618 11.0417 11.6667C11.0417 12.0716 11.1835 12.4159 11.4672 12.6995C11.7508 12.9832 12.0951 13.125 12.5 13.125ZM10 8.95833C10.4049 8.95833 10.7492 8.81651 11.0329 8.53285C11.3165 8.24922 11.4583 7.90494 11.4583 7.50002C11.4583 7.0951 11.3165 6.75083 11.0329 6.46719C10.7492 6.18354 10.4049 6.04171 10 6.04171C9.5951 6.04171 9.25083 6.18354 8.96719 6.46719C8.68354 6.75083 8.54171 7.0951 8.54171 7.50002C8.54171 7.90494 8.68354 8.24922 8.96719 8.53285C9.25083 8.81651 9.5951 8.95833 10 8.95833ZM10.0014 17.9167C8.90647 17.9167 7.87728 17.7089 6.91383 17.2933C5.95037 16.8778 5.1123 16.3138 4.39962 15.6015C3.68693 14.8891 3.12271 14.0514 2.70698 13.0884C2.29124 12.1253 2.08337 11.0964 2.08337 10.0014C2.08337 8.90647 2.29115 7.87728 2.70671 6.91383C3.12226 5.95037 3.68622 5.11231 4.39858 4.39963C5.11096 3.68693 5.94866 3.12272 6.91169 2.70698C7.8747 2.29124 8.90368 2.08337 9.99862 2.08337C11.0936 2.08337 12.1228 2.29115 13.0862 2.70671C14.0497 3.12226 14.8877 3.68622 15.6004 4.39858C16.3131 5.11096 16.8773 5.94866 17.2931 6.91169C17.7088 7.8747 17.9167 8.90368 17.9167 9.99863C17.9167 11.0936 17.7089 12.1228 17.2933 13.0862C16.8778 14.0497 16.3138 14.8877 15.6015 15.6004C14.8891 16.3131 14.0514 16.8773 13.0884 17.2931C12.1253 17.7088 11.0964 17.9167 10.0014 17.9167ZM10 16.6667C11.8611 16.6667 13.4375 16.0209 14.7292 14.7292C16.0209 13.4375 16.6667 11.8611 16.6667 10C16.6667 8.13891 16.0209 6.56252 14.7292 5.27085C13.4375 3.97919 11.8611 3.33335 10 3.33335C8.13891 3.33335 6.56252 3.97919 5.27085 5.27085C3.97919 6.56252 3.33335 8.13891 3.33335 10C3.33335 11.8611 3.97919 13.4375 5.27085 14.7292C6.56252 16.0209 8.13891 16.6667 10 16.6667Z",fill:"currentColor"})})]})}),GrainIcon=tt=>jsxRuntimeExports.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 20 20",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsxs("g",{id:"grain",children:[jsxRuntimeExports.jsx("mask",{id:"mask0_1551_45",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"20",height:"20",children:jsxRuntimeExports.jsx("rect",{id:"Bounding box",width:"1em",height:"1em",fill:"currentColor"})}),jsxRuntimeExports.jsx("g",{mask:"url(#mask0_1551_45)",children:jsxRuntimeExports.jsx("path",{id:"grain_2",d:"M4.99999 16.5064C4.57906 16.5064 4.22276 16.3605 3.93109 16.0689C3.63942 15.7772 3.49359 15.4209 3.49359 15C3.49359 14.5791 3.63942 14.2228 3.93109 13.9311C4.22276 13.6394 4.57906 13.4936 4.99999 13.4936C5.42092 13.4936 5.77722 13.6394 6.06888 13.9311C6.36055 14.2228 6.50638 14.5791 6.50638 15C6.50638 15.4209 6.36055 15.7772 6.06888 16.0689C5.77722 16.3605 5.42092 16.5064 4.99999 16.5064ZM11.6667 16.5064C11.2457 16.5064 10.8894 16.3605 10.5978 16.0689C10.3061 15.7772 10.1603 15.4209 10.1603 15C10.1603 14.5791 10.3061 14.2228 10.5978 13.9311C10.8894 13.6394 11.2457 13.4936 11.6667 13.4936C12.0876 13.4936 12.4439 13.6394 12.7355 13.9311C13.0272 14.2228 13.1731 14.5791 13.1731 15C13.1731 15.4209 13.0272 15.7772 12.7355 16.0689C12.4439 16.3605 12.0876 16.5064 11.6667 16.5064ZM8.33332 13.1731C7.91239 13.1731 7.55609 13.0272 7.26442 12.7355C6.97276 12.4439 6.82692 12.0876 6.82692 11.6667C6.82692 11.2457 6.97276 10.8894 7.26442 10.5978C7.55609 10.3061 7.91239 10.1603 8.33332 10.1603C8.75425 10.1603 9.11055 10.3061 9.40222 10.5978C9.69388 10.8894 9.83972 11.2457 9.83972 11.6667C9.83972 12.0876 9.69388 12.4439 9.40222 12.7355C9.11055 13.0272 8.75425 13.1731 8.33332 13.1731ZM15 13.1731C14.5791 13.1731 14.2228 13.0272 13.9311 12.7355C13.6394 12.4439 13.4936 12.0876 13.4936 11.6667C13.4936 11.2457 13.6394 10.8894 13.9311 10.5978C14.2228 10.3061 14.5791 10.1603 15 10.1603C15.4209 10.1603 15.7772 10.3061 16.0689 10.5978C16.3605 10.8894 16.5064 11.2457 16.5064 11.6667C16.5064 12.0876 16.3605 12.4439 16.0689 12.7355C15.7772 13.0272 15.4209 13.1731 15 13.1731ZM4.99999 9.83972C4.57906 9.83972 4.22276 9.69388 3.93109 9.40222C3.63942 9.11055 3.49359 8.75425 3.49359 8.33332C3.49359 7.91239 3.63942 7.55609 3.93109 7.26442C4.22276 6.97276 4.57906 6.82692 4.99999 6.82692C5.42092 6.82692 5.77722 6.97276 6.06888 7.26442C6.36055 7.55609 6.50638 7.91239 6.50638 8.33332C6.50638 8.75425 6.36055 9.11055 6.06888 9.40222C5.77722 9.69388 5.42092 9.83972 4.99999 9.83972ZM11.6667 9.83972C11.2457 9.83972 10.8894 9.69388 10.5978 9.40222C10.3061 9.11055 10.1603 8.75425 10.1603 8.33332C10.1603 7.91239 10.3061 7.55609 10.5978 7.26442C10.8894 6.97276 11.2457 6.82692 11.6667 6.82692C12.0876 6.82692 12.4439 6.97276 12.7355 7.26442C13.0272 7.55609 13.1731 7.91239 13.1731 8.33332C13.1731 8.75425 13.0272 9.11055 12.7355 9.40222C12.4439 9.69388 12.0876 9.83972 11.6667 9.83972ZM8.33332 6.50638C7.91239 6.50638 7.55609 6.36055 7.26442 6.06888C6.97276 5.77722 6.82692 5.42092 6.82692 4.99999C6.82692 4.57906 6.97276 4.22276 7.26442 3.93109C7.55609 3.63942 7.91239 3.49359 8.33332 3.49359C8.75425 3.49359 9.11055 3.63942 9.40222 3.93109C9.69388 4.22276 9.83972 4.57906 9.83972 4.99999C9.83972 5.42092 9.69388 5.77722 9.40222 6.06888C9.11055 6.36055 8.75425 6.50638 8.33332 6.50638ZM15 6.50638C14.5791 6.50638 14.2228 6.36055 13.9311 6.06888C13.6394 5.77722 13.4936 5.42092 13.4936 4.99999C13.4936 4.57906 13.6394 4.22276 13.9311 3.93109C14.2228 3.63942 14.5791 3.49359 15 3.49359C15.4209 3.49359 15.7772 3.63942 16.0689 3.93109C16.3605 4.22276 16.5064 4.57906 16.5064 4.99999C16.5064 5.42092 16.3605 5.77722 16.0689 6.06888C15.7772 6.36055 15.4209 6.50638 15 6.50638Z",fill:"currentColor"})})]})}),PublicIcon=tt=>jsxRuntimeExports.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 20 20",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsxs("g",{id:"public",children:[jsxRuntimeExports.jsx("mask",{id:"mask0_1551_36",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"20",height:"20",children:jsxRuntimeExports.jsx("rect",{id:"Bounding box",width:"1em",height:"1em",fill:"currentColor"})}),jsxRuntimeExports.jsx("g",{mask:"url(#mask0_1551_36)",children:jsxRuntimeExports.jsx("path",{id:"public_2",d:"M10.0028 17.5C8.96567 17.5 7.9906 17.3032 7.07758 16.9096C6.16457 16.516 5.37037 15.9818 4.69498 15.3071C4.0196 14.6323 3.48493 13.8389 3.09096 12.9267C2.69699 12.0145 2.5 11.0399 2.5 10.0028C2.5 8.96567 2.6968 7.9906 3.0904 7.07758C3.48401 6.16457 4.01819 5.37037 4.69294 4.69498C5.36769 4.0196 6.16114 3.48493 7.07329 3.09096C7.98546 2.69699 8.9601 2.5 9.99721 2.5C11.0343 2.5 12.0094 2.6968 12.9224 3.0904C13.8354 3.48401 14.6296 4.01819 15.305 4.69294C15.9804 5.36769 16.5151 6.16114 16.909 7.07329C17.303 7.98546 17.5 8.9601 17.5 9.99721C17.5 11.0343 17.3032 12.0094 16.9096 12.9224C16.516 13.8354 15.9818 14.6296 15.3071 15.305C14.6323 15.9804 13.8389 16.5151 12.9267 16.909C12.0145 17.303 11.0399 17.5 10.0028 17.5ZM9.16667 16.625V15C8.70833 15 8.31597 14.8368 7.98958 14.5104C7.66319 14.184 7.5 13.7917 7.5 13.3333V12.5L3.5 8.5C3.45833 8.75 3.42014 9 3.38542 9.25C3.35069 9.5 3.33333 9.75 3.33333 10C3.33333 11.6806 3.88542 13.1528 4.98958 14.4167C6.09375 15.6806 7.48611 16.4167 9.16667 16.625ZM14.9167 14.5C15.1944 14.1944 15.4444 13.8646 15.6667 13.5104C15.8889 13.1562 16.0729 12.7882 16.2187 12.4062C16.3646 12.0243 16.4757 11.6319 16.5521 11.2292C16.6285 10.8264 16.6667 10.4167 16.6667 10C16.6667 8.63083 16.2909 7.38042 15.5393 6.24877C14.7877 5.11712 13.7746 4.30129 12.5 3.80129V4.16667C12.5 4.625 12.3368 5.01736 12.0104 5.34375C11.684 5.67014 11.2917 5.83333 10.8333 5.83333H9.16667V7.5C9.16667 7.73611 9.08681 7.93403 8.92708 8.09375C8.76736 8.25347 8.56944 8.33333 8.33333 8.33333H6.66667V10H11.6667C11.9028 10 12.1007 10.0799 12.2604 10.2396C12.4201 10.3993 12.5 10.5972 12.5 10.8333V13.3333H13.3333C13.6944 13.3333 14.0208 13.441 14.3125 13.6562C14.6042 13.8715 14.8056 14.1528 14.9167 14.5Z",fill:"currentColor"})})]})}),IconsMapper={split:jsxRuntimeExports.jsx(GrainIcon,{}),force:jsxRuntimeExports.jsx(CommunitiesIcon,{}),sphere:jsxRuntimeExports.jsx(BubbleChartIcon,{}),earth:jsxRuntimeExports.jsx(PublicIcon,{})},GraphViewControl=()=>{const[tt,et]=useDataStore(rt=>[rt.graphStyle,rt.setGraphStyle]),nt=rt=>{et(rt)};return jsxRuntimeExports.jsx(Wrapper$g,{children:graphStyles.map(rt=>jsxRuntimeExports.jsx(Flex,{className:clsx$1("icon",{active:tt===rt}),onClick:()=>nt(rt),children:IconsMapper[rt]},rt))})},Wrapper$g=styled$4(Flex).attrs({direction:"row",align:"center",justify:"flex-start"})` - padding: 6px 6px 6px 11px; - background: ${colors.BG1}; - border-radius: 200px; - .icon { - color: ${colors.GRAY6}; - font-size: 20px; +`, + _AudioClip = () => { + const tt = useSelectedNode(), + et = useIsMatchBreakpoint('sm', 'down'), + nt = usePlayerStore((xt) => xt.isPlaying), + rt = usePlayerStore((xt) => xt.setIsPlaying), + it = reactExports.useRef(null), + { + image_url: ot, + show_title: at, + date: st, + boost: lt, + type: ct, + id: ut, + ref_id: ht, + episode_title: dt, + } = tt || {}, + [pt, mt] = reactExports.useState(lt || 0) + reactExports.useEffect( + () => () => { + rt(!1), it.current && it.current.scrollTo({ top: 0, behavior: 'auto' }) + }, + [rt], + ) + const gt = reactExports.useCallback(() => { + setIsTimestampLoaded(!0) + }, []), + yt = reactExports.useCallback(() => { + setIsTimestampLoaded(!0) + }, []), + bt = reactExports.useCallback(() => rt(!1), [rt]), + vt = reactExports.useCallback(() => rt(!0), [rt]) + return jsxRuntimeExports.jsxs(Wrapper$8, { + children: [ + jsxRuntimeExports.jsxs(PlayerWrapper$1, { + children: [ + jsxRuntimeExports.jsx(Flex, { + direction: 'row', + children: jsxRuntimeExports.jsx(Flex, { + direction: 'row', + grow: 1, + justify: 'center', + shrink: 1, + children: jsxRuntimeExports.jsx(Avatar$1, { + size: et ? 45 : 188, + src: (tt == null ? void 0 : tt.image_url) || 'audio_default.svg', + type: 'audio', + }), + }), + }), + jsxRuntimeExports.jsx(Flex, { + pt: 10, + children: jsxRuntimeExports.jsx(AudioPlayer, { + mediaUrl: (tt == null ? void 0 : tt.link) || '', + onError: gt, + onLoaded: yt, + onPause: bt, + onPlay: vt, + play: nt, + timestamp: (tt == null ? void 0 : tt.timestamp) || '', + }), + }), + ], + }), + jsxRuntimeExports.jsx(StyledEpisode$1, { + boostCount: lt || 0, + date: st || 0, + episodeTitle: formatDescription(dt), + id: ut, + imageUrl: ot || 'audio_default.svg', + isSelectedView: !0, + onClick: () => null, + showTitle: formatDescription(at), + type: ct, + }), + jsxRuntimeExports.jsx(StyledDivider$1, {}), + jsxRuntimeExports.jsxs('div', { + ref: it, + style: { overflow: 'auto', flex: 1, width: '100%' }, + children: [ + jsxRuntimeExports.jsxs(BoostWrapper$1, { + children: [ + jsxRuntimeExports.jsx(BoostAmt, { amt: pt }), + jsxRuntimeExports.jsx(Booster, { content: tt, count: pt, refId: ht, updateCount: mt }), + ], + }), + jsxRuntimeExports.jsx(StyledDivider$1, {}), + jsxRuntimeExports.jsx(TextWrapper$1, { + children: jsxRuntimeExports.jsx(Description, { node: tt, stateless: !0 }), + }), + jsxRuntimeExports.jsx(StyledDivider$1, {}), + jsxRuntimeExports.jsx(TextWrapper$1, { + children: jsxRuntimeExports.jsx(Transcript, { node: tt, stateless: !0 }), + }), + ], + }), + ], + }) + }, + AudioClip = reactExports.memo(_AudioClip), + BoostWrapper$1 = styled$4(Flex)` + flex-direction: row; + justify-content: space-between; + padding: 18px 18px 18px; +`, + TextWrapper$1 = styled$4(Flex)` + padding: 18px 18px 18px; +`, + Divider = styled$4(Flex)` + background: ${colors.divider2}; + height: 1px; + margin: auto 22px; +`, + getSelectedNodeTimestamps = (tt, et) => { + if (!et) return null + const nt = tt.filter( + (ot) => ot.show_title && ot.link && ot.show_title === et.show_title && ot.episode_title === et.episode_title, + ), + rt = lodashExports.groupBy(nt, (ot) => ot.timestamp), + it = lodashExports.values(rt).reduce((ot, at) => (at[0] && ot.push(at[0]), ot), []) + return ( + it.sort((ot, at) => { + var ht, dt + const [st] = ((ht = ot.timestamp) == null ? void 0 : ht.split('-')) || [''], + [lt] = ((dt = at.timestamp) == null ? void 0 : dt.split('-')) || [''], + ct = videoTimetoSeconds(st), + ut = videoTimetoSeconds(lt) + return ct - ut + }), + it + ) + }, + ErrorWrapper = styled$4(Flex)` + padding: 10px; + border-bottom: 1px solid ${colors.divider2}; +`, + ErrorMsgWrapper = styled$4.textarea` + resize: none; + margin-bottom: 5px; +`, + ErrorSection = () => { + const tt = useSelectedNode(), + [et, nt] = reactExports.useState(''), + [rt, it] = reactExports.useState(''), + ot = useAppStore((st) => st.setFlagErrorOpen), + at = async () => { + const st = { content_node_ref_id: tt == null ? void 0 : tt.ref_id, message: et } + ;(await distExports$1.enable(!0)) || console.warn('Sphinx enable failed') + try { + const ct = await api.post('/prediction/feedback', JSON.stringify(st)) + if (ct.error) { + const { message: ut } = ct.error + throw new Error(ut) + } + nt(''), it('Sent successfully') + } catch (ct) { + ct instanceof Error && it(ct.message || 'Failed to send') + } + } + return ( + reactExports.useEffect(() => { + et || it('') + }, [et]), + jsxRuntimeExports.jsxs(ErrorWrapper, { + children: [ + jsxRuntimeExports.jsx(Flex, { + align: 'center', + justify: 'center', + p: 6, + children: jsxRuntimeExports.jsx(Text$3, { color: 'white', kind: 'medium', children: 'Report Error' }), + }), + jsxRuntimeExports.jsx(ErrorMsgWrapper, { + cols: 1, + onChange: (st) => { + const { value: lt } = st.target + nt(lt) + }, + placeholder: 'flag incorrect information (misspelled words, etc)', + rows: 10, + value: et, + }), + jsxRuntimeExports.jsxs(Flex, { + direction: 'row', + justify: 'flex-end', + p: 8, + children: [ + rt && + jsxRuntimeExports.jsx(Flex, { + justify: 'center', + pb: 3, + style: { color: rt === 'Sent successfully' ? colors.green400 : '#FF8F80', marginRight: '20px' }, + children: rt, + }), + jsxRuntimeExports.jsx(Pill, { disabled: !et, onClick: at, children: 'Send' }), + jsxRuntimeExports.jsx(Pill, { + onClick: () => { + ot(!1), nt('') + }, + children: 'Cancel', + }), + ], + }), + ], + }) + ) + }, + FlagError = styled$4(Flex)` + color: ${({ flagErrorIsOpen: tt }) => (tt ? colors.lightBlue200 : colors.white)}; + padding: 0 0 0 8px; + &:hover { cursor: pointer; + color: ${colors.lightBlue200}; + } +`, + Actions = ({ transcript: tt }) => { + const [et, nt] = useAppStore((at) => [at.transcriptIsOpen, at.setTranscriptOpen]), + [rt, it] = useAppStore((at) => [at.flagErrorIsOpen, at.setFlagErrorOpen]), + ot = useDataStore((at) => at.selectedNode) + return jsxRuntimeExports.jsxs(Flex, { + align: 'center', + direction: 'row', + justify: 'space-between', + children: [ + jsxRuntimeExports.jsxs(Flex, { + align: 'center', + direction: 'row', + children: [ + tt && + jsxRuntimeExports.jsx(Pill, { + onClick: () => nt(!et), + selected: et, + style: { padding: '4px 8px' }, + children: 'Transcript', + }), + jsxRuntimeExports.jsx(Flex, { + pl: 10, + children: jsxRuntimeExports.jsx(Booster, { content: ot, refId: ot == null ? void 0 : ot.id }), + }), + ], + }), + jsxRuntimeExports.jsx(FlagError, { + flagErrorIsOpen: rt, + onClick: () => it(!rt), + children: jsxRuntimeExports.jsx(MdOutlinedFlag, { fontSize: 20 }), + }), + ], + }) + }, + Wrapper$7 = styled$4(Flex)` + flex-direction: column; + border-bottom: 1px solid #101317; + box-shadow: 0px 5px 6px rgba(0, 0, 0, 0.5); + z-index: 0; +`, + Heading = () => { + const tt = useSelectedNode(), + et = useDataStore((nt) => nt.selectedTimestamp) + return ( + reactExports.useEffect(() => { + if (!et) return + const { timestamp: nt } = et, + rt = document.getElementById('audio-player') + rt && (rt.currentTime = nt ? videoTimetoSeconds(nt) : 0) + }, [et]), + jsxRuntimeExports.jsxs(Wrapper$7, { + p: 20, + children: [ + jsxRuntimeExports.jsxs(Flex, { + direction: 'row', + children: [ + jsxRuntimeExports.jsx(Flex, { + pr: 24, + children: jsxRuntimeExports.jsx(Avatar$1, { + size: 80, + src: (tt == null ? void 0 : tt.image_url) || 'audio_default.svg', + type: 'person', + }), + }), + jsxRuntimeExports.jsxs(Flex, { + grow: 1, + shrink: 1, + children: [ + jsxRuntimeExports.jsx(Text$3, { + kind: 'heading', + children: (tt == null ? void 0 : tt.show_title) || 'Unknown', + }), + jsxRuntimeExports.jsx(Flex, { + pt: 10, + children: jsxRuntimeExports.jsx(Text$3, { + color: 'mainBottomIcons', + kind: 'regular', + children: tt == null ? void 0 : tt.episode_title, + }), + }), + ], + }), + ], + }), + jsxRuntimeExports.jsx(Flex, { + pb: 10, + pt: 30, + children: jsxRuntimeExports.jsx(Actions, { transcript: !0 }), + }), + jsxRuntimeExports.jsx(Flex, { + pt: 10, + children: jsxRuntimeExports.jsx(AudioPlayer, { + mediaUrl: (et == null ? void 0 : et.link) || '', + onError: () => { + setIsTimestampLoaded(!0) + }, + onLoaded: () => { + setIsTimestampLoaded(!0) + }, + timestamp: (et == null ? void 0 : et.timestamp) || '', + }), + }), + ], + }) + ) + }, + formatTimestamp = (tt) => { + const [et, nt] = tt.split('-') || ['', ''] + return parseInt(nt, 10) !== 0 ? `${et} - ${nt}` : et + }, + Wrapper$6 = styled$4(Flex).attrs(({ isSelected: tt }) => ({ + background: tt ? 'lightBlue100' : 'body', + direction: 'row', + }))` + cursor: pointer; + color: ${colors.primaryText1}; - &:hover { - color: ${colors.GRAY3}; - } - - &:active { - color: ${colors.white}; - } + ${({ isSelected: tt }) => + !tt && + Ae` + &:hover { + background: ${colors.dashboardHeader}; + } + `} +`, + Timestamp = ({ onClick: tt, timestamp: et }) => { + const nt = useDataStore((st) => st.selectedTimestamp), + rt = useDataStore((st) => st.isTimestampLoaded), + it = !!(nt && nt.timestamp === et.timestamp), + ot = it ? 'blueTextAccent' : 'placeholderText', + at = it + ? jsxRuntimeExports.jsx(MdPlayArrow, { color: colors[ot], fontSize: 18 }) + : jsxRuntimeExports.jsx(MdAccessTime, { color: colors[ot], fontSize: 18 }) + return jsxRuntimeExports.jsxs(Wrapper$6, { + isSelected: it, + onClick: tt, + px: 20, + py: 12, + children: [ + jsxRuntimeExports.jsx(Flex, { + direction: 'row', + px: 20, + children: + it && !rt ? jsxRuntimeExports.jsx(ClipLoader$2, { color: colors[ot], loading: !0, size: 14 }) : at, + }), + jsxRuntimeExports.jsxs('div', { + children: [ + jsxRuntimeExports.jsxs(Flex, { + align: 'center', + direction: 'row', + children: [ + et.timestamp && + jsxRuntimeExports.jsx(Text$3, { + color: 'primaryText1', + kind: it ? 'mediumBold' : 'medium', + children: formatTimestamp(et.timestamp), + }), + !!et.boost && + jsxRuntimeExports.jsx(Flex, { + pl: 10, + children: jsxRuntimeExports.jsx(Booster, { count: et.boost, readOnly: !0 }), + }), + ], + }), + jsxRuntimeExports.jsx(Flex, { + pt: 4, + children: jsxRuntimeExports.jsx(Text$3, { + color: it ? 'blueTextAccent' : 'mainBottomIcons', + kind: it ? 'regularBold' : 'regular', + children: formatDescription(et.description), + }), + }), + ], + }), + ], + }) + }, + Creator = () => { + const tt = useGraphData(), + et = useSelectedNode(), + nt = reactExports.useMemo( + () => getSelectedNodeTimestamps((tt == null ? void 0 : tt.nodes) || [], et), + [tt == null ? void 0 : tt.nodes, et], + ), + rt = useDataStore((ot) => ot.setSelectedTimestamp), + it = useAppStore((ot) => ot.flagErrorIsOpen) + return ( + reactExports.useEffect(() => { + nt != null && nt.length && rt(nt[0]) + }, [nt, rt]), + et + ? jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { + children: [ + jsxRuntimeExports.jsx(Heading, {}), + it && jsxRuntimeExports.jsx(ErrorSection, {}), + !!(nt != null && nt.length) && + jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { + children: [ + jsxRuntimeExports.jsx(Flex, { + pb: 20, + children: + nt == null + ? void 0 + : nt.map((ot, at) => + jsxRuntimeExports.jsx( + Timestamp, + { onClick: () => rt(ot), timestamp: ot }, + `${ot.episode_title}_${at}`, + ), + ), + }), + jsxRuntimeExports.jsx(Divider, {}), + ], + }), + ], + }) + : null + ) + }, + RenderDot = ({ cx: tt, cy: et }) => + jsxRuntimeExports.jsx(Dot, { cx: tt, cy: et, fill: colors.blueTextAccent, r: 2 }), + Data = () => { + const tt = useSelectedNode(), + et = [...((tt == null ? void 0 : tt.data) || [])].sort((it, ot) => (it.year || 0) - (ot.year || 0)), + nt = et.map((it) => it.year).filter((it) => it), + rt = et.map((it) => it.rate).filter((it) => it) + return jsxRuntimeExports.jsx(StyledFlex, { + direction: 'column', + px: 24, + py: 16, + children: jsxRuntimeExports.jsx(ResponsiveContainer, { + height: '100%', + width: '100%', + children: jsxRuntimeExports.jsxs(ScatterChart, { + margin: { bottom: 20, left: 20, right: 20, top: 20 }, + children: [ + jsxRuntimeExports.jsx(CartesianGrid, { stroke: '#f5f5f5' }), + jsxRuntimeExports.jsx(XAxis, { + dataKey: 'year', + domain: [Math.min(...nt), Math.max(...nt)], + label: { + fill: colors.white, + fontSize: '12px', + offset: -10, + position: 'insideBottom', + value: tt.x_axis_name, + }, + name: 'X', + tick: { fill: colors.white, fontSize: '8px' }, + type: 'number', + }), + jsxRuntimeExports.jsx(YAxis, { + color: '#000', + dataKey: 'rate', + domain: [Math.min(...rt), Math.max(...rt)], + label: { + angle: -90, + fill: colors.white, + fontSize: '12px', + offset: 0, + position: 'insideLeft', + value: tt.y_axis_name, + }, + name: 'Y', + tick: { fill: colors.white, fontSize: '8px' }, + type: 'number', + }), + jsxRuntimeExports.jsx(Tooltip, { cursor: { strokeDasharray: '3 3' } }), + jsxRuntimeExports.jsx(Scatter, { + data: et, + fill: colors.blueTextAccent, + line: !0, + name: 'A scatter', + shape: jsxRuntimeExports.jsx(RenderDot, {}), + }), + ], + }), + }), + }) + }, + StyledFlex = styled$4(Flex)` + width: 100%; + height: 100%; +`, + convertToChatMessage = (tt) => { + const et = /((http|https):\/\/[^\s]+)/g, + nt = /@(\w+)/g + let rt = tt.replace(/\\/g, '') + return ( + (rt = rt.replace(/'/g, '’')), + (rt = rt.replace(/\n/g, '
')), + (rt = rt.replace(et, '$1')), + (rt = rt.replace(nt, '@$1')), + rt + ) + }, + Messages = () => { + const { sender_pic: tt, sender_alias: et, date: nt, message_content: rt } = useSelectedNode() || {} + return jsxRuntimeExports.jsxs(Flex, { + direction: 'row', + children: [ + jsxRuntimeExports.jsx(Avatar, { src: tt }), + jsxRuntimeExports.jsxs(MessageWrapper, { + children: [ + jsxRuntimeExports.jsxs(Flex, { + align: 'flex-end', + className: 'info', + direction: 'row', + children: [ + et && jsxRuntimeExports.jsx('span', { className: 'info__name', children: et }), + nt && jsxRuntimeExports.jsx('span', { className: 'info__date', children: nt }), + ], + }), + rt && jsxRuntimeExports.jsx(Message, { dangerouslySetInnerHTML: { __html: convertToChatMessage(rt) } }), + ], + }), + ], + }) + }, + MessageWrapper = styled$4(Flex)` + color: ${colors.black}; + border-radius: 8px; + font-size: 20px; + margin-left: 8px; + flex: 1; - &.active { - color: ${colors.white}; - } + .info__date { + color: ${colors.textMessages}; + font-size: 14px; + margin-left: 8px; } - .icon + .icon { - margin-left: 20px; + .info__name { + color: ${colors.green400}; + font-size: 16px; + } +`, + Message = styled$4.div` + background: ${colors.white}; + border-radius: 8px; + padding: 16px; + position: relative; + &:before { + content: ''; + width: 0; + height: 0; + border-left: 10px solid transparent; + border-right: 10px solid transparent; + border-top: 10px solid ${colors.white}; + position: absolute; + left: -6px; + top: 0; } -`,ActionsToolbar=()=>jsxRuntimeExports.jsx(Wrapper$f,{id:"actions-toolbar",children:jsxRuntimeExports.jsx(GraphViewControl,{})}),Wrapper$f=styled$4(Flex)` - position: absolute; - right: 20px; - bottom: 50px; -`;var lodash={exports:{}};/** - * @license - * Lodash - * Copyright OpenJS Foundation and other contributors - * Released under MIT license - * Based on Underscore.js 1.8.3 - * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - */lodash.exports;(function(tt,et){(function(){var nt,rt="4.17.21",it=200,ot="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",at="Expected a function",st="Invalid `variable` option passed into `_.template`",lt="__lodash_hash_undefined__",ct=500,ut="__lodash_placeholder__",ht=1,dt=2,pt=4,mt=1,gt=2,yt=1,bt=2,vt=4,xt=8,kt=16,St=32,Tt=64,At=128,Et=256,$t=512,Dt=30,jt="...",Pt=800,Ct=16,wt=1,It=2,Ot=3,Wt=1/0,zt=9007199254740991,Ft=17976931348623157e292,Nt=0/0,Ut=4294967295,Mt=Ut-1,Ht=Ut>>>1,en=[["ary",At],["bind",yt],["bindKey",bt],["curry",xt],["curryRight",kt],["flip",$t],["partial",St],["partialRight",Tt],["rearg",Et]],sn="[object Arguments]",Kt="[object Array]",rn="[object AsyncFunction]",nn="[object Boolean]",hn="[object Date]",vn="[object DOMException]",an="[object Error]",Qt="[object Function]",_n="[object GeneratorFunction]",Pn="[object Map]",$n="[object Number]",Nn="[object Null]",Tn="[object Object]",cn="[object Promise]",mn="[object Proxy]",In="[object RegExp]",An="[object Set]",wn="[object String]",fn="[object Symbol]",pn="[object Undefined]",kn="[object WeakMap]",Dn="[object WeakSet]",un="[object ArrayBuffer]",Zt="[object DataView]",Xt="[object Float32Array]",Sn="[object Float64Array]",Rn="[object Int8Array]",jn="[object Int16Array]",On="[object Int32Array]",Zn="[object Uint8Array]",Vn="[object Uint8ClampedArray]",qn="[object Uint16Array]",zn="[object Uint32Array]",Jn=/\b__p \+= '';/g,Hn=/\b(__p \+=) '' \+/g,pr=/(__e\(.*?\)|\b__t\)) \+\n'';/g,fr=/&(?:amp|lt|gt|quot|#39);/g,xr=/[&<>"']/g,io=RegExp(fr.source),Tr=RegExp(xr.source),Ar=/<%-([\s\S]+?)%>/g,qr=/<%([\s\S]+?)%>/g,jr=/<%=([\s\S]+?)%>/g,Fr=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,ao=/^\w*$/,Yr=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Dr=/[\\^$.*+?()[\]{}|]/g,go=RegExp(Dr.source),xn=/^\s+/,Mn=/\s/,dn=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Jt=/\{\n\/\* \[wrapped with (.+)\] \*/,En=/,? & /,Ln=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Un=/[()=,{}\[\]\/\s]/,Kn=/\\(\\)?/g,nr=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,lr=/\w*$/,cr=/^[-+]0x[0-9a-f]+$/i,Hr=/^0b[01]+$/i,vr=/^\[object .+?Constructor\]$/,Nr=/^0o[0-7]+$/i,Gr=/^(?:0|[1-9]\d*)$/,eo=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Zr=/($^)/,Jr=/['\n\r\u2028\u2029\\]/g,wr="\\ud800-\\udfff",Mr="\\u0300-\\u036f",Ur="\\ufe20-\\ufe2f",Rr="\\u20d0-\\u20ff",Pr=Mr+Ur+Rr,Lr="\\u2700-\\u27bf",Wr="a-z\\xdf-\\xf6\\xf8-\\xff",Br="\\xac\\xb1\\xd7\\xf7",tr="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",ir="\\u2000-\\u206f",Sr=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",dr="A-Z\\xc0-\\xd6\\xd8-\\xde",br="\\ufe0e\\ufe0f",$r=Br+tr+ir+Sr,no="['’]",so="["+wr+"]",fo="["+$r+"]",po="["+Pr+"]",Yn="\\d+",vo="["+Lr+"]",_o="["+Wr+"]",xo="[^"+wr+$r+Yn+Lr+Wr+dr+"]",bo="\\ud83c[\\udffb-\\udfff]",Co="(?:"+po+"|"+bo+")",Ro="[^"+wr+"]",Wo="(?:\\ud83c[\\udde6-\\uddff]){2}",Po="[\\ud800-\\udbff][\\udc00-\\udfff]",Fo="["+dr+"]",Go="\\u200d",Xo="(?:"+_o+"|"+xo+")",ga="(?:"+Fo+"|"+xo+")",na="(?:"+no+"(?:d|ll|m|re|s|t|ve))?",$a="(?:"+no+"(?:D|LL|M|RE|S|T|VE))?",Zo=Co+"?",pu="["+br+"]?",eu="(?:"+Go+"(?:"+[Ro,Wo,Po].join("|")+")"+pu+Zo+")*",No="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Mp="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",tu=pu+Zo+eu,op="(?:"+[vo,Wo,Po].join("|")+")"+tu,Rp="(?:"+[Ro+po+"?",po,Wo,Po,so].join("|")+")",mm=RegExp(no,"g"),ts=RegExp(po,"g"),mu=RegExp(bo+"(?="+bo+")|"+Rp+tu,"g"),gm=RegExp([Fo+"?"+_o+"+"+na+"(?="+[fo,Fo,"$"].join("|")+")",ga+"+"+$a+"(?="+[fo,Fo+Xo,"$"].join("|")+")",Fo+"?"+Xo+"+"+na,Fo+"+"+$a,Mp,No,Yn,op].join("|"),"g"),Us=RegExp("["+Go+wr+Pr+br+"]"),Bp=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Vu=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Xs=-1,Yo={};Yo[Xt]=Yo[Sn]=Yo[Rn]=Yo[jn]=Yo[On]=Yo[Zn]=Yo[Vn]=Yo[qn]=Yo[zn]=!0,Yo[sn]=Yo[Kt]=Yo[un]=Yo[nn]=Yo[Zt]=Yo[hn]=Yo[an]=Yo[Qt]=Yo[Pn]=Yo[$n]=Yo[Tn]=Yo[In]=Yo[An]=Yo[wn]=Yo[kn]=!1;var Ko={};Ko[sn]=Ko[Kt]=Ko[un]=Ko[Zt]=Ko[nn]=Ko[hn]=Ko[Xt]=Ko[Sn]=Ko[Rn]=Ko[jn]=Ko[On]=Ko[Pn]=Ko[$n]=Ko[Tn]=Ko[In]=Ko[An]=Ko[wn]=Ko[fn]=Ko[Zn]=Ko[Vn]=Ko[qn]=Ko[zn]=!0,Ko[an]=Ko[Qt]=Ko[kn]=!1;var Zs={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},zs={"&":"&","<":"<",">":">",'"':""","'":"'"},nu={"&":"&","<":"<",">":">",""":'"',"'":"'"},Cl={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Op=parseFloat,jp=parseInt,Ws=typeof commonjsGlobal=="object"&&commonjsGlobal&&commonjsGlobal.Object===Object&&commonjsGlobal,Hu=typeof self=="object"&&self&&self.Object===Object&&self,ns=Ws||Hu||Function("return this")(),gu=et&&!et.nodeType&&et,ls=gu&&!0&&tt&&!tt.nodeType&&tt,ys=ls&&ls.exports===gu,Iu=ys&&Ws.process,rs=function(){try{var er=ls&&ls.require&&ls.require("util").types;return er||Iu&&Iu.binding&&Iu.binding("util")}catch{}}(),yu=rs&&rs.isArrayBuffer,Gu=rs&&rs.isDate,Dp=rs&&rs.isMap,bs=rs&&rs.isRegExp,$s=rs&&rs.isSet,os=rs&&rs.isTypedArray;function Vo(er,Er,gr){switch(gr.length){case 0:return er.call(Er);case 1:return er.call(Er,gr[0]);case 2:return er.call(Er,gr[0],gr[1]);case 3:return er.call(Er,gr[0],gr[1],gr[2])}return er.apply(Er,gr)}function Js(er,Er,gr,ro){for(var To=-1,$o=er==null?0:er.length;++To<$o;){var es=er[To];Er(ro,es,gr(es),er)}return ro}function ws(er,Er){for(var gr=-1,ro=er==null?0:er.length;++gr-1}function ap(er,Er,gr){for(var ro=-1,To=er==null?0:er.length;++ro-1;);return gr}function cp(er,Er){for(var gr=er.length;gr--&&Fl(Er,er[gr],0)>-1;);return gr}function Wl(er,Er){for(var gr=er.length,ro=0;gr--;)er[gr]===Er&&++ro;return ro}var Ny=Ys(Zs),Ly=Ys(zs);function Xm(er){return"\\"+Cl[er]}function Zm(er,Er){return er==null?nt:er[Er]}function qu(er){return Us.test(er)}function Up(er){return Bp.test(er)}function up(er){for(var Er,gr=[];!(Er=er.next()).done;)gr.push(Er.value);return gr}function zp(er){var Er=-1,gr=Array(er.size);return er.forEach(function(ro,To){gr[++Er]=[To,ro]}),gr}function hp(er,Er){return function(gr){return er(Er(gr))}}function Vl(er,Er){for(var gr=-1,ro=er.length,To=0,$o=[];++gr-1}function Sm(Rt,Vt){var Yt=this.__data__,yn=Bu(Yt,Rt);return yn<0?(++this.size,Yt.push([Rt,Vt])):Yt[yn][1]=Vt,this}Hl.prototype.clear=a0,Hl.prototype.delete=oy,Hl.prototype.get=s0,Hl.prototype.has=l0,Hl.prototype.set=Sm;function $l(Rt){var Vt=-1,Yt=Rt==null?0:Rt.length;for(this.clear();++Vt=Vt?Rt:Vt)),Rt}function _l(Rt,Vt,Yt,yn,Bn,Wn){var Xn,Qn=Vt&ht,ar=Vt&dt,Ir=Vt&pt;if(Yt&&(Xn=Bn?Yt(Rt,yn,Bn,Wn):Yt(Rt)),Xn!==nt)return Xn;if(!ds(Rt))return Rt;var Cr=Mo(Rt);if(Cr){if(Xn=Ew(Rt),!Qn)return Ns(Rt,Xn)}else{var Or=Ks(Rt),Qr=Or==Qt||Or==_n;if(Pp(Rt))return Ay(Rt,Qn);if(Or==Tn||Or==sn||Qr&&!Bn){if(Xn=ar||Qr?{}:E1(Rt),!Qn)return ar?S0(Rt,p0(Xn,Rt)):q0(Rt,hy(Xn,Rt))}else{if(!Ko[Or])return Bn?Rt:{};Xn=Tw(Rt,Or,Qn)}}Wn||(Wn=new xs);var uo=Wn.get(Rt);if(uo)return uo;Wn.set(Rt,Xn),ew(Rt)?Rt.forEach(function(Eo){Xn.add(_l(Eo,Vt,Yt,Eo,Rt,Wn))}):J1(Rt)&&Rt.forEach(function(Eo,Uo){Xn.set(Uo,_l(Eo,Vt,Yt,Uo,Rt,Wn))});var So=Ir?ar?zo:ms:ar?Ol:Fs,Lo=Cr?nt:So(Rt);return ws(Lo||Rt,function(Eo,Uo){Lo&&(Uo=Eo,Eo=Rt[Uo]),Gl(Xn,Uo,_l(Eo,Vt,Yt,Uo,Rt,Wn))}),Xn}function dy(Rt){var Vt=Fs(Rt);return function(Yt){return Am(Yt,Rt,Vt)}}function Am(Rt,Vt,Yt){var yn=Yt.length;if(Rt==null)return!yn;for(Rt=ko(Rt);yn--;){var Bn=Yt[yn],Wn=Vt[Bn],Xn=Rt[Bn];if(Xn===nt&&!(Bn in Rt)||!Wn(Xn))return!1}return!0}function fy(Rt,Vt,Yt){if(typeof Rt!="function")throw new Gs(at);return My(function(){Rt.apply(nt,Yt)},Vt)}function Qu(Rt,Vt,Yt,yn){var Bn=-1,Wn=Nl,Xn=!0,Qn=Rt.length,ar=[],Ir=Vt.length;if(!Qn)return ar;Yt&&(Vt=ba(Vt,Vs(Yt))),yn?(Wn=ap,Xn=!1):Vt.length>=it&&(Wn=As,Xn=!1,Vt=new Ru(Vt));e:for(;++BnBn?0:Bn+Yt),yn=yn===nt||yn>Bn?Bn:Do(yn),yn<0&&(yn+=Bn),yn=Yt>yn?0:nw(yn);Yt0&&Yt(Qn)?Vt>1?Is(Qn,Vt-1,Yt,yn,Bn):Ll(Bn,Qn):yn||(Bn[Bn.length]=Qn)}return Bn}var xp=Fm(),rm=Fm(!0);function xl(Rt,Vt){return Rt&&xp(Rt,Vt,Fs)}function kp(Rt,Vt){return Rt&&rm(Rt,Vt,Fs)}function _h(Rt,Vt){return Ps(Vt,function(Yt){return np(Rt[Yt])})}function Xl(Rt,Vt){Vt=Fu(Vt,Rt);for(var Yt=0,yn=Vt.length;Rt!=null&&YtVt}function y0(Rt,Vt){return Rt!=null&&qo.call(Rt,Vt)}function gy(Rt,Vt){return Rt!=null&&Vt in ko(Rt)}function H0(Rt,Vt,Yt){return Rt>=Ms(Vt,Yt)&&Rt<_s(Vt,Yt)}function Sp(Rt,Vt,Yt){for(var yn=Yt?ap:Nl,Bn=Rt[0].length,Wn=Rt.length,Xn=Wn,Qn=gr(Wn),ar=1/0,Ir=[];Xn--;){var Cr=Rt[Xn];Xn&&Vt&&(Cr=ba(Cr,Vs(Vt))),ar=Ms(Cr.length,ar),Qn[Xn]=!Yt&&(Vt||Bn>=120&&Cr.length>=120)?new Ru(Xn&&Cr):nt}Cr=Rt[0];var Or=-1,Qr=Qn[0];e:for(;++Or-1;)Qn!==Rt&&Pu.call(Qn,ar,1),Pu.call(Rt,ar,1);return Rt}function Os(Rt,Vt){for(var Yt=Rt?Vt.length:0,yn=Yt-1;Yt--;){var Bn=Vt[Yt];if(Yt==yn||Bn!==Wn){var Wn=Bn;tp(Bn)?Pu.call(Rt,Bn,1):Ey(Rt,Bn)}}return Rt}function cu(Rt,Vt){return Rt+Xp(ry()*(Vt-Rt+1))}function Pl(Rt,Vt,Yt,yn){for(var Bn=-1,Wn=_s(Kp((Vt-Rt)/(Yt||1)),0),Xn=gr(Wn);Wn--;)Xn[yn?Wn:++Bn]=Rt,Rt+=Yt;return Xn}function $p(Rt,Vt){var Yt="";if(!Rt||Vt<1||Vt>zt)return Yt;do Vt%2&&(Yt+=Rt),Vt=Xp(Vt/2),Vt&&(Rt+=Rt);while(Vt);return Yt}function mo(Rt,Vt){return _b(A1(Rt,Vt,Dl),Rt+"")}function b0(Rt){return tm(Vm(Rt))}function vy(Rt,Vt){var Yt=Vm(Rt);return I0(Yt,Ou(Vt,0,Yt.length))}function _f(Rt,Vt,Yt,yn){if(!ds(Rt))return Rt;Vt=Fu(Vt,Rt);for(var Bn=-1,Wn=Vt.length,Xn=Wn-1,Qn=Rt;Qn!=null&&++BnBn?0:Bn+Vt),Yt=Yt>Bn?Bn:Yt,Yt<0&&(Yt+=Bn),Bn=Vt>Yt?0:Yt-Vt>>>0,Vt>>>=0;for(var Wn=gr(Bn);++yn>>1,Xn=Rt[Wn];Xn!==null&&!Jl(Xn)&&(Yt?Xn<=Vt:Xn=it){var Ir=Vt?null:Ls(Rt);if(Ir)return Wp(Ir);Xn=!1,Bn=As,ar=new Ru}else ar=Vt?[]:Qn;e:for(;++yn=yn?Rt:El(Rt,Vt,Yt)}var x0=Yp||function(Rt){return ns.clearTimeout(Rt)};function Ay(Rt,Vt){if(Vt)return Rt.slice();var Yt=Rt.length,yn=_g?_g(Yt):new Rt.constructor(Yt);return Rt.copy(yn),yn}function Nm(Rt){var Vt=new Rt.constructor(Rt.byteLength);return new Gp(Vt).set(new Gp(Rt)),Vt}function G0(Rt,Vt){var Yt=Vt?Nm(Rt.buffer):Rt.buffer;return new Rt.constructor(Yt,Rt.byteOffset,Rt.byteLength)}function Ml(Rt){var Vt=new Rt.constructor(Rt.source,lr.exec(Rt));return Vt.lastIndex=Rt.lastIndex,Vt}function Cy(Rt){return _u?ko(_u.call(Rt)):{}}function k0(Rt,Vt){var Yt=Vt?Nm(Rt.buffer):Rt.buffer;return new Rt.constructor(Yt,Rt.byteOffset,Rt.length)}function Su(Rt,Vt){if(Rt!==Vt){var Yt=Rt!==nt,yn=Rt===null,Bn=Rt===Rt,Wn=Jl(Rt),Xn=Vt!==nt,Qn=Vt===null,ar=Vt===Vt,Ir=Jl(Vt);if(!Qn&&!Ir&&!Wn&&Rt>Vt||Wn&&Xn&&ar&&!Qn&&!Ir||yn&&Xn&&ar||!Yt&&ar||!Bn)return 1;if(!yn&&!Wn&&!Ir&&Rt=Qn)return ar;var Ir=Yt[yn];return ar*(Ir=="desc"?-1:1)}}return Rt.index-Vt.index}function zu(Rt,Vt,Yt,yn){for(var Bn=-1,Wn=Rt.length,Xn=Yt.length,Qn=-1,ar=Vt.length,Ir=_s(Wn-Xn,0),Cr=gr(ar+Ir),Or=!yn;++Qn1?Yt[Bn-1]:nt,Xn=Bn>2?Yt[2]:nt;for(Wn=Rt.length>3&&typeof Wn=="function"?(Bn--,Wn):nt,Xn&&Il(Yt[0],Yt[1],Xn)&&(Wn=Bn<3?nt:Wn,Bn=1),Vt=ko(Vt);++yn-1?Bn[Wn?Vt[Xn]:Xn]:nt}}function gn(Rt){return jo(function(Vt){var Yt=Vt.length,yn=Yt,Bn=Rs.prototype.thru;for(Rt&&Vt.reverse();yn--;){var Wn=Vt[yn];if(typeof Wn!="function")throw new Gs(at);if(Bn&&!Xn&&Um(Wn)=="wrapper")var Xn=new Rs([],!0)}for(yn=Xn?yn:Yt;++yn1&&Ho.reverse(),Cr&&arQn))return!1;var Ir=Wn.get(Rt),Cr=Wn.get(Vt);if(Ir&&Cr)return Ir==Vt&&Cr==Rt;var Or=-1,Qr=!0,uo=Yt>?new Ru:nt;for(Wn.set(Rt,Vt),Wn.set(Vt,Rt);++Or1?"& ":"")+Vt[yn],Vt=Vt.join(Yt>2?", ":" "),Rt.replace(dn,`{ -/* [wrapped with `+Vt+`] */ -`)}function Aw(Rt){return Mo(Rt)||pm(Rt)||!!(ty&&Rt&&Rt[ty])}function tp(Rt,Vt){var Yt=typeof Rt;return Vt=Vt??zt,!!Vt&&(Yt=="number"||Yt!="symbol"&&Gr.test(Rt))&&Rt>-1&&Rt%1==0&&Rt0){if(++Vt>=Pt)return arguments[0]}else Vt=0;return Rt.apply(nt,arguments)}}function I0(Rt,Vt){var Yt=-1,yn=Rt.length,Bn=yn-1;for(Vt=Vt===nt?yn:Vt;++Yt1?Rt[Vt-1]:nt;return Yt=typeof Yt=="function"?(Rt.pop(),Yt):nt,F1(Rt,Yt)});function U1(Rt){var Vt=Fn(Rt);return Vt.__chain__=!0,Vt}function Lv(Rt,Vt){return Vt(Rt),Rt}function A0(Rt,Vt){return Vt(Rt)}var Fv=jo(function(Rt){var Vt=Rt.length,Yt=Vt?Rt[0]:0,yn=this.__wrapped__,Bn=function(Wn){return Im(Wn,Rt)};return Vt>1||this.__actions__.length||!(yn instanceof yo)||!tp(Yt)?this.thru(Bn):(yn=yn.slice(Yt,+Yt+(Vt?1:0)),yn.__actions__.push({func:A0,args:[Bn],thisArg:nt}),new Rs(yn,this.__chain__).thru(function(Wn){return Vt&&!Wn.length&&Wn.push(nt),Wn}))});function Uv(){return U1(this)}function zv(){return new Rs(this.value(),this.__chain__)}function Wv(){this.__values__===nt&&(this.__values__=tw(this.value()));var Rt=this.__index__>=this.__values__.length,Vt=Rt?nt:this.__values__[this.__index__++];return{done:Rt,value:Vt}}function Vv(){return this}function Hv(Rt){for(var Vt,Yt=this;Yt instanceof em;){var yn=B1(Yt);yn.__index__=0,yn.__values__=nt,Vt?Bn.__wrapped__=yn:Vt=yn;var Bn=yn;Yt=Yt.__wrapped__}return Bn.__wrapped__=Rt,Vt}function Gv(){var Rt=this.__wrapped__;if(Rt instanceof yo){var Vt=Rt;return this.__actions__.length&&(Vt=new yo(this)),Vt=Vt.reverse(),Vt.__actions__.push({func:A0,args:[e1],thisArg:nt}),new Rs(Vt,this.__chain__)}return this.thru(e1)}function qv(){return Nu(this.__wrapped__,this.__actions__)}var Yv=hm(function(Rt,Vt,Yt){qo.call(Rt,Yt)?++Rt[Yt]:lu(Rt,Yt,1)});function Kv(Rt,Vt,Yt){var yn=Mo(Rt)?Ym:V0;return Yt&&Il(Rt,Vt,Yt)&&(Vt=nt),yn(Rt,wo(Vt,3))}function Xv(Rt,Vt){var Yt=Mo(Rt)?Ps:my;return Yt(Rt,wo(Vt,3))}var Zv=tn(O1),Jv=tn(j1);function Qv(Rt,Vt){return Is(C0(Rt,Vt),1)}function e_(Rt,Vt){return Is(C0(Rt,Vt),Wt)}function t_(Rt,Vt,Yt){return Yt=Yt===nt?1:Do(Yt),Is(C0(Rt,Vt),Yt)}function z1(Rt,Vt){var Yt=Mo(Rt)?ws:Yl;return Yt(Rt,wo(Vt,3))}function W1(Rt,Vt){var Yt=Mo(Rt)?qm:m0;return Yt(Rt,wo(Vt,3))}var n_=hm(function(Rt,Vt,Yt){qo.call(Rt,Yt)?Rt[Yt].push(Vt):lu(Rt,Yt,[Vt])});function r_(Rt,Vt,Yt,yn){Rt=Bl(Rt)?Rt:Vm(Rt),Yt=Yt&&!yn?Do(Yt):0;var Bn=Rt.length;return Yt<0&&(Yt=_s(Bn+Yt,0)),B0(Rt)?Yt<=Bn&&Rt.indexOf(Vt,Yt)>-1:!!Bn&&Fl(Rt,Vt,Yt)>-1}var i_=mo(function(Rt,Vt,Yt){var yn=-1,Bn=typeof Vt=="function",Wn=Bl(Rt)?gr(Rt.length):[];return Yl(Rt,function(Xn){Wn[++yn]=Bn?Vo(Vt,Xn,Yt):xa(Xn,Vt,Yt)}),Wn}),o_=hm(function(Rt,Vt,Yt){lu(Rt,Yt,Vt)});function C0(Rt,Vt){var Yt=Mo(Rt)?ba:_d;return Yt(Rt,wo(Vt,3))}function a_(Rt,Vt,Yt,yn){return Rt==null?[]:(Mo(Vt)||(Vt=Vt==null?[]:[Vt]),Yt=yn?nt:Yt,Mo(Yt)||(Yt=Yt==null?[]:[Yt]),sm(Rt,Vt,Yt))}var s_=hm(function(Rt,Vt,Yt){Rt[Yt?0:1].push(Vt)},function(){return[[],[]]});function l_(Rt,Vt,Yt){var yn=Mo(Rt)?ym:Au,Bn=arguments.length<3;return yn(Rt,wo(Vt,4),Yt,Bn,Yl)}function c_(Rt,Vt,Yt){var yn=Mo(Rt)?By:Au,Bn=arguments.length<3;return yn(Rt,wo(Vt,4),Yt,Bn,m0)}function u_(Rt,Vt){var Yt=Mo(Rt)?Ps:my;return Yt(Rt,M0(wo(Vt,3)))}function h_(Rt){var Vt=Mo(Rt)?tm:b0;return Vt(Rt)}function d_(Rt,Vt,Yt){(Yt?Il(Rt,Vt,Yt):Vt===nt)?Vt=1:Vt=Do(Vt);var yn=Mo(Rt)?ly:vy;return yn(Rt,Vt)}function f_(Rt){var Vt=Mo(Rt)?f0:v0;return Vt(Rt)}function p_(Rt){if(Rt==null)return 0;if(Bl(Rt))return B0(Rt)?ru(Rt):Rt.length;var Vt=Ks(Rt);return Vt==Pn||Vt==An?Rt.size:Bs(Rt).length}function m_(Rt,Vt,Yt){var yn=Mo(Rt)?Np:xy;return Yt&&Il(Rt,Vt,Yt)&&(Vt=nt),yn(Rt,wo(Vt,3))}var g_=mo(function(Rt,Vt){if(Rt==null)return[];var Yt=Vt.length;return Yt>1&&Il(Rt,Vt[0],Vt[1])?Vt=[]:Yt>2&&Il(Vt[0],Vt[1],Vt[2])&&(Vt=[Vt[0]]),sm(Rt,Is(Vt,1),[])}),$0=Wy||function(){return ns.Date.now()};function y_(Rt,Vt){if(typeof Vt!="function")throw new Gs(at);return Rt=Do(Rt),function(){if(--Rt<1)return Vt.apply(this,arguments)}}function V1(Rt,Vt,Yt){return Vt=Yt?nt:Vt,Vt=Rt&&Vt==null?Rt.length:Vt,ur(Rt,At,nt,nt,nt,nt,Vt)}function H1(Rt,Vt){var Yt;if(typeof Vt!="function")throw new Gs(at);return Rt=Do(Rt),function(){return--Rt>0&&(Yt=Vt.apply(this,arguments)),Rt<=1&&(Vt=nt),Yt}}var r1=mo(function(Rt,Vt,Yt){var yn=yt;if(Yt.length){var Bn=Vl(Yt,zm(r1));yn|=St}return ur(Rt,yn,Vt,Yt,Bn)}),G1=mo(function(Rt,Vt,Yt){var yn=yt|bt;if(Yt.length){var Bn=Vl(Yt,zm(G1));yn|=St}return ur(Vt,yn,Rt,Yt,Bn)});function q1(Rt,Vt,Yt){Vt=Yt?nt:Vt;var yn=ur(Rt,xt,nt,nt,nt,nt,nt,Vt);return yn.placeholder=q1.placeholder,yn}function Y1(Rt,Vt,Yt){Vt=Yt?nt:Vt;var yn=ur(Rt,kt,nt,nt,nt,nt,nt,Vt);return yn.placeholder=Y1.placeholder,yn}function K1(Rt,Vt,Yt){var yn,Bn,Wn,Xn,Qn,ar,Ir=0,Cr=!1,Or=!1,Qr=!0;if(typeof Rt!="function")throw new Gs(at);Vt=fu(Vt)||0,ds(Yt)&&(Cr=!!Yt.leading,Or="maxWait"in Yt,Wn=Or?_s(fu(Yt.maxWait)||0,Vt):Wn,Qr="trailing"in Yt?!!Yt.trailing:Qr);function uo(Ss){var Tu=yn,ip=Bn;return yn=Bn=nt,Ir=Ss,Xn=Rt.apply(ip,Tu),Xn}function So(Ss){return Ir=Ss,Qn=My(Uo,Vt),Cr?uo(Ss):Xn}function Lo(Ss){var Tu=Ss-ar,ip=Ss-Ir,pw=Vt-Tu;return Or?Ms(pw,Wn-ip):pw}function Eo(Ss){var Tu=Ss-ar,ip=Ss-Ir;return ar===nt||Tu>=Vt||Tu<0||Or&&ip>=Wn}function Uo(){var Ss=$0();if(Eo(Ss))return Ho(Ss);Qn=My(Uo,Lo(Ss))}function Ho(Ss){return Qn=nt,Qr&&yn?uo(Ss):(yn=Bn=nt,Xn)}function Ql(){Qn!==nt&&x0(Qn),Ir=0,yn=ar=Bn=Qn=nt}function Al(){return Qn===nt?Xn:Ho($0())}function _c(){var Ss=$0(),Tu=Eo(Ss);if(yn=arguments,Bn=this,ar=Ss,Tu){if(Qn===nt)return So(ar);if(Or)return x0(Qn),Qn=My(Uo,Vt),uo(ar)}return Qn===nt&&(Qn=My(Uo,Vt)),Xn}return _c.cancel=Ql,_c.flush=Al,_c}var b_=mo(function(Rt,Vt){return fy(Rt,1,Vt)}),w_=mo(function(Rt,Vt,Yt){return fy(Rt,fu(Vt)||0,Yt)});function v_(Rt){return ur(Rt,$t)}function P0(Rt,Vt){if(typeof Rt!="function"||Vt!=null&&typeof Vt!="function")throw new Gs(at);var Yt=function(){var yn=arguments,Bn=Vt?Vt.apply(this,yn):yn[0],Wn=Yt.cache;if(Wn.has(Bn))return Wn.get(Bn);var Xn=Rt.apply(this,yn);return Yt.cache=Wn.set(Bn,Xn)||Wn,Xn};return Yt.cache=new(P0.Cache||$l),Yt}P0.Cache=$l;function M0(Rt){if(typeof Rt!="function")throw new Gs(at);return function(){var Vt=arguments;switch(Vt.length){case 0:return!Rt.call(this);case 1:return!Rt.call(this,Vt[0]);case 2:return!Rt.call(this,Vt[0],Vt[1]);case 3:return!Rt.call(this,Vt[0],Vt[1],Vt[2])}return!Rt.apply(this,Vt)}}function __(Rt){return H1(2,Rt)}var x_=_0(function(Rt,Vt){Vt=Vt.length==1&&Mo(Vt[0])?ba(Vt[0],Vs(wo())):ba(Is(Vt,1),Vs(wo()));var Yt=Vt.length;return mo(function(yn){for(var Bn=-1,Wn=Ms(yn.length,Yt);++Bn=Vt}),pm=Bo(function(){return arguments}())?Bo:function(Rt){return gs(Rt)&&qo.call(Rt,"callee")&&!xm.call(Rt,"callee")},Mo=gr.isArray,D_=yu?Vs(yu):fs;function Bl(Rt){return Rt!=null&&R0(Rt.length)&&!np(Rt)}function ks(Rt){return gs(Rt)&&Bl(Rt)}function N_(Rt){return Rt===!0||Rt===!1||gs(Rt)&&Cs(Rt)==nn}var Pp=Hy||m1,L_=Gu?Vs(Gu):ps;function F_(Rt){return gs(Rt)&&Rt.nodeType===1&&!Ry(Rt)}function U_(Rt){if(Rt==null)return!0;if(Bl(Rt)&&(Mo(Rt)||typeof Rt=="string"||typeof Rt.splice=="function"||Pp(Rt)||Wm(Rt)||pm(Rt)))return!Rt.length;var Vt=Ks(Rt);if(Vt==Pn||Vt==An)return!Rt.size;if(Py(Rt))return!Bs(Rt).length;for(var Yt in Rt)if(qo.call(Rt,Yt))return!1;return!0}function z_(Rt,Vt){return us(Rt,Vt)}function W_(Rt,Vt,Yt){Yt=typeof Yt=="function"?Yt:nt;var yn=Yt?Yt(Rt,Vt):nt;return yn===nt?us(Rt,Vt,nt,Yt):!!yn}function o1(Rt){if(!gs(Rt))return!1;var Vt=Cs(Rt);return Vt==an||Vt==vn||typeof Rt.message=="string"&&typeof Rt.name=="string"&&!Ry(Rt)}function V_(Rt){return typeof Rt=="number"&&ny(Rt)}function np(Rt){if(!ds(Rt))return!1;var Vt=Cs(Rt);return Vt==Qt||Vt==_n||Vt==rn||Vt==mn}function Z1(Rt){return typeof Rt=="number"&&Rt==Do(Rt)}function R0(Rt){return typeof Rt=="number"&&Rt>-1&&Rt%1==0&&Rt<=zt}function ds(Rt){var Vt=typeof Rt;return Rt!=null&&(Vt=="object"||Vt=="function")}function gs(Rt){return Rt!=null&&typeof Rt=="object"}var J1=Dp?Vs(Dp):Ep;function H_(Rt,Vt){return Rt===Vt||hs(Rt,Vt,K0(Vt))}function G_(Rt,Vt,Yt){return Yt=typeof Yt=="function"?Yt:nt,hs(Rt,Vt,K0(Vt),Yt)}function q_(Rt){return Q1(Rt)&&Rt!=+Rt}function Y_(Rt){if(Pw(Rt))throw new To(ot);return Tp(Rt)}function K_(Rt){return Rt===null}function X_(Rt){return Rt==null}function Q1(Rt){return typeof Rt=="number"||gs(Rt)&&Cs(Rt)==$n}function Ry(Rt){if(!gs(Rt)||Cs(Rt)!=Tn)return!1;var Vt=qp(Rt);if(Vt===null)return!0;var Yt=qo.call(Vt,"constructor")&&Vt.constructor;return typeof Yt=="function"&&Yt instanceof Yt&&yp.call(Yt)==Yu}var a1=bs?Vs(bs):Ip;function Z_(Rt){return Z1(Rt)&&Rt>=-zt&&Rt<=zt}var ew=$s?Vs($s):$m;function B0(Rt){return typeof Rt=="string"||!Mo(Rt)&&gs(Rt)&&Cs(Rt)==wn}function Jl(Rt){return typeof Rt=="symbol"||gs(Rt)&&Cs(Rt)==fn}var Wm=os?Vs(os):by;function J_(Rt){return Rt===nt}function Q_(Rt){return gs(Rt)&&Ks(Rt)==kn}function t2(Rt){return gs(Rt)&&Cs(Rt)==Dn}var n2=ho(om),r2=ho(function(Rt,Vt){return Rt<=Vt});function tw(Rt){if(!Rt)return[];if(Bl(Rt))return B0(Rt)?ss(Rt):Ns(Rt);if(Mu&&Rt[Mu])return up(Rt[Mu]());var Vt=Ks(Rt),Yt=Vt==Pn?zp:Vt==An?Wp:Vm;return Yt(Rt)}function rp(Rt){if(!Rt)return Rt===0?Rt:0;if(Rt=fu(Rt),Rt===Wt||Rt===-Wt){var Vt=Rt<0?-1:1;return Vt*Ft}return Rt===Rt?Rt:0}function Do(Rt){var Vt=rp(Rt),Yt=Vt%1;return Vt===Vt?Yt?Vt-Yt:Vt:0}function nw(Rt){return Rt?Ou(Do(Rt),0,Ut):0}function fu(Rt){if(typeof Rt=="number")return Rt;if(Jl(Rt))return Nt;if(ds(Rt)){var Vt=typeof Rt.valueOf=="function"?Rt.valueOf():Rt;Rt=ds(Vt)?Vt+"":Vt}if(typeof Rt!="string")return Rt===0?Rt:+Rt;Rt=wm(Rt);var Yt=Hr.test(Rt);return Yt||Nr.test(Rt)?jp(Rt.slice(2),Yt?2:8):cr.test(Rt)?Nt:+Rt}function rw(Rt){return Rl(Rt,Ol(Rt))}function i2(Rt){return Rt?Ou(Do(Rt),-zt,zt):Rt===0?Rt:0}function Qo(Rt){return Rt==null?"":js(Rt)}var o2=ep(function(Rt,Vt){if(Py(Vt)||Bl(Vt)){Rl(Vt,Fs(Vt),Rt);return}for(var Yt in Vt)qo.call(Vt,Yt)&&Gl(Rt,Yt,Vt[Yt])}),iw=ep(function(Rt,Vt){Rl(Vt,Ol(Vt),Rt)}),O0=ep(function(Rt,Vt,Yt,yn){Rl(Vt,Ol(Vt),Rt,yn)}),s2=ep(function(Rt,Vt,Yt,yn){Rl(Vt,Fs(Vt),Rt,yn)}),l2=jo(Im);function c2(Rt,Vt){var Yt=xu(Rt);return Vt==null?Yt:hy(Yt,Vt)}var u2=mo(function(Rt,Vt){Rt=ko(Rt);var Yt=-1,yn=Vt.length,Bn=yn>2?Vt[2]:nt;for(Bn&&Il(Vt[0],Vt[1],Bn)&&(yn=1);++Yt1),Wn}),Rl(Rt,zo(Rt),Yt),yn&&(Yt=_l(Yt,ht|dt|pt,_i));for(var Bn=Vt.length;Bn--;)Ey(Yt,Vt[Bn]);return Yt});function $2(Rt,Vt){return aw(Rt,M0(wo(Vt)))}var P2=jo(function(Rt,Vt){return Rt==null?{}:lm(Rt,Vt)});function aw(Rt,Vt){if(Rt==null)return{};var Yt=ba(zo(Rt),function(yn){return[yn]});return Vt=wo(Vt),Rm(Rt,Yt,function(yn,Bn){return Vt(yn,Bn[0])})}function M2(Rt,Vt,Yt){Vt=Fu(Vt,Rt);var yn=-1,Bn=Vt.length;for(Bn||(Bn=1,Rt=nt);++ynVt){var yn=Rt;Rt=Vt,Vt=yn}if(Yt||Rt%1||Vt%1){var Bn=ry();return Ms(Rt+Bn*(Vt-Rt+Op("1e-"+((Bn+"").length-1))),Vt)}return cu(Rt,Vt)}var W2=Bt(function(Rt,Vt,Yt){return Vt=Vt.toLowerCase(),Rt+(Yt?cw(Vt):Vt)});function cw(Rt){return c1(Qo(Rt).toLowerCase())}function uw(Rt){return Rt=Qo(Rt),Rt&&Rt.replace(eo,Ny).replace(ts,"")}function V2(Rt,Vt,Yt){Rt=Qo(Rt),Vt=js(Vt);var yn=Rt.length;Yt=Yt===nt?yn:Ou(Do(Yt),0,yn);var Bn=Yt;return Yt-=Vt.length,Yt>=0&&Rt.slice(Yt,Bn)==Vt}function H2(Rt){return Rt=Qo(Rt),Rt&&Tr.test(Rt)?Rt.replace(xr,Ly):Rt}function G2(Rt){return Rt=Qo(Rt),Rt&&go.test(Rt)?Rt.replace(Dr,"\\$&"):Rt}var q2=Bt(function(Rt,Vt,Yt){return Rt+(Yt?"-":"")+Vt.toLowerCase()}),Y2=Bt(function(Rt,Vt,Yt){return Rt+(Yt?" ":"")+Vt.toLowerCase()}),K2=E0("toLowerCase");function X2(Rt,Vt,Yt){Rt=Qo(Rt),Vt=Do(Vt);var yn=Vt?ru(Rt):0;if(!Vt||yn>=Vt)return Rt;var Bn=(Vt-yn)/2;return Vr(Xp(Bn),Yt)+Rt+Vr(Kp(Bn),Yt)}function Z2(Rt,Vt,Yt){Rt=Qo(Rt),Vt=Do(Vt);var yn=Vt?ru(Rt):0;return Vt&&yn>>0,Yt?(Rt=Qo(Rt),Rt&&(typeof Vt=="string"||Vt!=null&&!a1(Vt))&&(Vt=js(Vt),!Vt&&qu(Rt))?Uu(ss(Rt),0,Yt):Rt.split(Vt,Yt)):[]}var ix=Bt(function(Rt,Vt,Yt){return Rt+(Yt?" ":"")+c1(Vt)});function ox(Rt,Vt,Yt){return Rt=Qo(Rt),Yt=Yt==null?0:Ou(Do(Yt),0,Rt.length),Vt=js(Vt),Rt.slice(Yt,Yt+Vt.length)==Vt}function ax(Rt,Vt,Yt){var yn=Fn.templateSettings;Yt&&Il(Rt,Vt,Yt)&&(Vt=nt),Rt=Qo(Rt),Vt=O0({},Vt,yn,or);var Bn=O0({},Vt.imports,yn.imports,or),Wn=Fs(Bn),Xn=Hs(Bn,Wn),Qn,ar,Ir=0,Cr=Vt.interpolate||Zr,Or="__p += '",Qr=Es((Vt.escape||Zr).source+"|"+Cr.source+"|"+(Cr===jr?nr:Zr).source+"|"+(Vt.evaluate||Zr).source+"|$","g"),uo="//# sourceURL="+(qo.call(Vt,"sourceURL")?(Vt.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Xs+"]")+` -`;Rt.replace(Qr,function(Eo,Uo,Ho,Ql,Al,_c){return Ho||(Ho=Ql),Or+=Rt.slice(Ir,_c).replace(Jr,Xm),Uo&&(Qn=!0,Or+=`' + -__e(`+Uo+`) + -'`),Al&&(ar=!0,Or+=`'; -`+Al+`; -__p += '`),Ho&&(Or+=`' + -((__t = (`+Ho+`)) == null ? '' : __t) + -'`),Ir=_c+Eo.length,Eo}),Or+=`'; -`;var So=qo.call(Vt,"variable")&&Vt.variable;if(!So)Or=`with (obj) { -`+Or+` -} -`;else if(Un.test(So))throw new To(st);Or=(ar?Or.replace(Jn,""):Or).replace(Hn,"$1").replace(pr,"$1;"),Or="function("+(So||"obj")+`) { -`+(So?"":`obj || (obj = {}); -`)+"var __t, __p = ''"+(Qn?", __e = _.escape":"")+(ar?`, __j = Array.prototype.join; -function print() { __p += __j.call(arguments, '') } -`:`; -`)+Or+`return __p -}`;var Lo=dw(function(){return $o(Wn,uo+"return "+Or).apply(nt,Xn)});if(Lo.source=Or,o1(Lo))throw Lo;return Lo}function sx(Rt){return Qo(Rt).toLowerCase()}function lx(Rt){return Qo(Rt).toUpperCase()}function cx(Rt,Vt,Yt){if(Rt=Qo(Rt),Rt&&(Yt||Vt===nt))return wm(Rt);if(!Rt||!(Vt=js(Vt)))return Rt;var yn=ss(Rt),Bn=ss(Vt),Wn=_a(yn,Bn),Xn=cp(yn,Bn)+1;return Uu(yn,Wn,Xn).join("")}function ux(Rt,Vt,Yt){if(Rt=Qo(Rt),Rt&&(Yt||Vt===nt))return Rt.slice(0,fp(Rt)+1);if(!Rt||!(Vt=js(Vt)))return Rt;var yn=ss(Rt),Bn=cp(yn,ss(Vt))+1;return Uu(yn,0,Bn).join("")}function hx(Rt,Vt,Yt){if(Rt=Qo(Rt),Rt&&(Yt||Vt===nt))return Rt.replace(xn,"");if(!Rt||!(Vt=js(Vt)))return Rt;var yn=ss(Rt),Bn=_a(yn,ss(Vt));return Uu(yn,Bn).join("")}function dx(Rt,Vt){var Yt=Dt,yn=jt;if(ds(Vt)){var Bn="separator"in Vt?Vt.separator:Bn;Yt="length"in Vt?Do(Vt.length):Yt,yn="omission"in Vt?js(Vt.omission):yn}Rt=Qo(Rt);var Wn=Rt.length;if(qu(Rt)){var Xn=ss(Rt);Wn=Xn.length}if(Yt>=Wn)return Rt;var Qn=Yt-ru(yn);if(Qn<1)return yn;var ar=Xn?Uu(Xn,0,Qn).join(""):Rt.slice(0,Qn);if(Bn===nt)return ar+yn;if(Xn&&(Qn+=ar.length-Qn),a1(Bn)){if(Rt.slice(Qn).search(Bn)){var Ir,Cr=ar;for(Bn.global||(Bn=Es(Bn.source,Qo(lr.exec(Bn))+"g")),Bn.lastIndex=0;Ir=Bn.exec(Cr);)var Or=Ir.index;ar=ar.slice(0,Or===nt?Qn:Or)}}else if(Rt.indexOf(js(Bn),Qn)!=Qn){var Qr=ar.lastIndexOf(Bn);Qr>-1&&(ar=ar.slice(0,Qr))}return ar+yn}function fx(Rt){return Rt=Qo(Rt),Rt&&io.test(Rt)?Rt.replace(fr,pp):Rt}var mx=Bt(function(Rt,Vt,Yt){return Rt+(Yt?" ":"")+Vt.toUpperCase()}),c1=E0("toUpperCase");function hw(Rt,Vt,Yt){return Rt=Qo(Rt),Vt=Yt?nt:Vt,Vt===nt?Up(Rt)?mp(Rt):jy(Rt):Rt.match(Vt)||[]}var dw=mo(function(Rt,Vt){try{return Vo(Rt,nt,Vt)}catch(Yt){return o1(Yt)?Yt:new To(Yt)}}),gx=jo(function(Rt,Vt){return ws(Vt,function(Yt){Yt=Wu(Yt),lu(Rt,Yt,r1(Rt[Yt],Rt))}),Rt});function yx(Rt){var Vt=Rt==null?0:Rt.length,Yt=wo();return Rt=Vt?ba(Rt,function(yn){if(typeof yn[1]!="function")throw new Gs(at);return[Yt(yn[0]),yn[1]]}):[],mo(function(yn){for(var Bn=-1;++Bnzt)return[];var Yt=Ut,yn=Ms(Rt,Ut);Vt=wo(Vt),Rt-=Ut;for(var Bn=wu(yn,Vt);++Yt0||Vt<0)?new yo(Yt):(Rt<0?Yt=Yt.takeRight(-Rt):Rt&&(Yt=Yt.drop(Rt)),Vt!==nt&&(Vt=Do(Vt),Yt=Vt<0?Yt.dropRight(-Vt):Yt.take(Vt-Rt)),Yt)},yo.prototype.takeRightWhile=function(Rt){return this.reverse().takeWhile(Rt).reverse()},yo.prototype.toArray=function(){return this.take(Ut)},xl(yo.prototype,function(Rt,Vt){var Yt=/^(?:filter|find|map|reject)|While$/.test(Vt),yn=/^(?:head|last)$/.test(Vt),Bn=Fn[yn?"take"+(Vt=="last"?"Right":""):Vt],Wn=yn||/^find/.test(Vt);Bn&&(Fn.prototype[Vt]=function(){var Xn=this.__wrapped__,Qn=yn?[1]:arguments,ar=Xn instanceof yo,Ir=Qn[0],Cr=ar||Mo(Xn),Or=function(Uo){var Ho=Bn.apply(Fn,Ll([Uo],Qn));return yn&&Qr?Ho[0]:Ho};Cr&&Yt&&typeof Ir=="function"&&Ir.length!=1&&(ar=Cr=!1);var Qr=this.__chain__,uo=!!this.__actions__.length,So=Wn&&!Qr,Lo=ar&&!uo;if(!Wn&&Cr){Xn=Lo?Xn:new yo(this);var Eo=Rt.apply(Xn,Qn);return Eo.__actions__.push({func:A0,args:[Or],thisArg:nt}),new Rs(Eo,Qr)}return So&&Lo?Rt.apply(this,Qn):(Eo=this.thru(Or),So?yn?Eo.value()[0]:Eo.value():Eo)})}),ws(["pop","push","shift","sort","splice","unshift"],function(Rt){var Vt=$u[Rt],Yt=/^(?:push|sort|unshift)$/.test(Rt)?"tap":"thru",yn=/^(?:pop|shift)$/.test(Rt);Fn.prototype[Rt]=function(){var Bn=arguments;if(yn&&!this.__chain__){var Wn=this.value();return Vt.apply(Mo(Wn)?Wn:[],Bn)}return this[Yt](function(Xn){return Vt.apply(Mo(Xn)?Xn:[],Bn)})}}),xl(yo.prototype,function(Rt,Vt){var Yt=Fn[Vt];if(Yt){var yn=Yt.name+"";qo.call(Zu,yn)||(Zu[yn]=[]),Zu[yn].push({name:Vt,func:Yt})}}),Zu[Cn(nt,bt).name]=[{name:"wrapper",func:nt}],yo.prototype.clone=L0,yo.prototype.reverse=F0,yo.prototype.value=yl,Fn.prototype.at=Fv,Fn.prototype.chain=Uv,Fn.prototype.commit=zv,Fn.prototype.next=Wv,Fn.prototype.plant=Hv,Fn.prototype.reverse=Gv,Fn.prototype.toJSON=Fn.prototype.valueOf=Fn.prototype.value=qv,Fn.prototype.first=Fn.prototype.head,Mu&&(Fn.prototype[Mu]=Vv),Fn},Cu=zy();ls?((ls.exports=Cu)._=Cu,gu._=Cu):ns._=Cu}).call(commonjsGlobal)})(lodash,lodash.exports);var lodashExports=lodash.exports;const AudioIcon=tt=>jsxRuntimeExports.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 16 16",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsxs("g",{id:"Audio",children:[jsxRuntimeExports.jsx("mask",{id:"mask0_1506_147",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"16",height:"16",children:jsxRuntimeExports.jsx("rect",{id:"Bounding box",width:"1em",height:"1em",fill:"currentColor"})}),jsxRuntimeExports.jsx("g",{mask:"url(#mask0_1506_147)",children:jsxRuntimeExports.jsx("path",{id:"headphones",d:"M4.48719 13.6667H3.53851C3.20175 13.6667 2.91671 13.55 2.68337 13.3167C2.45004 13.0833 2.33337 12.7983 2.33337 12.4615V8.00002C2.33337 7.21337 2.4821 6.47654 2.77954 5.78952C3.07697 5.10251 3.48124 4.50345 3.99234 3.99234C4.50345 3.48124 5.10247 3.07697 5.78941 2.77954C6.47634 2.4821 7.21309 2.33337 7.99966 2.33337C8.78622 2.33337 9.5231 2.4821 10.2103 2.77954C10.8975 3.07697 11.4966 3.48124 12.0077 3.99234C12.5188 4.50345 12.9231 5.10251 13.2205 5.78952C13.518 6.47654 13.6667 7.21337 13.6667 8.00002V12.4615C13.6667 12.7983 13.55 13.0833 13.3167 13.3167C13.0833 13.55 12.7983 13.6667 12.4615 13.6667H11.5129C11.1814 13.6667 10.8977 13.5487 10.6617 13.3127C10.4257 13.0767 10.3077 12.793 10.3077 12.4615V10.1539C10.3077 9.82247 10.4257 9.53878 10.6617 9.30278C10.8977 9.06676 11.1814 8.94876 11.5129 8.94876H12.6667V8.00002C12.6667 6.70002 12.2139 5.59725 11.3084 4.69169C10.4028 3.78614 9.30002 3.33336 8.00002 3.33336C6.70002 3.33336 5.59725 3.78614 4.69169 4.69169C3.78614 5.59725 3.33336 6.70002 3.33336 8.00002V8.94876H4.48719C4.8186 8.94876 5.10231 9.06676 5.33831 9.30278C5.57431 9.53878 5.69231 9.82247 5.69231 10.1539V12.4615C5.69231 12.793 5.57431 13.0767 5.33831 13.3127C5.10231 13.5487 4.8186 13.6667 4.48719 13.6667Z",fill:"currentColor"})})]})}),BudgetIcon=tt=>jsxRuntimeExports.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 22 16",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M14 16C11.7667 16 9.875 15.225 8.325 13.675C6.775 12.125 6 10.2333 6 8C6 5.76667 6.775 3.875 8.325 2.325C9.875 0.775 11.7667 0 14 0C16.2333 0 18.125 0.775 19.675 2.325C21.225 3.875 22 5.76667 22 8C22 10.2333 21.225 12.125 19.675 13.675C18.125 15.225 16.2333 16 14 16ZM4.625 15.25C3.225 14.6 2.10433 13.625 1.263 12.325C0.421 11.025 0 9.58333 0 8C0 6.41667 0.421 4.975 1.263 3.675C2.10433 2.375 3.225 1.4 4.625 0.75C4.975 0.583333 5.29167 0.595667 5.575 0.787C5.85833 0.979 6 1.29167 6 1.725C6 1.89167 5.946 2.054 5.838 2.212C5.72933 2.37067 5.59167 2.49167 5.425 2.575C4.375 3.05833 3.54167 3.78733 2.925 4.762C2.30833 5.73733 2 6.81667 2 8C2 9.18333 2.30833 10.2623 2.925 11.237C3.54167 12.2123 4.375 12.9417 5.425 13.425C5.59167 13.5083 5.72933 13.625 5.838 13.775C5.946 13.925 6 14.0917 6 14.275C6 14.6917 5.85833 15 5.575 15.2C5.29167 15.4 4.975 15.4167 4.625 15.25ZM14 14C15.6667 14 17.0833 13.4167 18.25 12.25C19.4167 11.0833 20 9.66667 20 8C20 6.33333 19.4167 4.91667 18.25 3.75C17.0833 2.58333 15.6667 2 14 2C12.3333 2 10.9167 2.58333 9.75 3.75C8.58333 4.91667 8 6.33333 8 8C8 9.66667 8.58333 11.0833 9.75 12.25C10.9167 13.4167 12.3333 14 14 14Z",fill:"currentColor"})}),NodesIcon=tt=>jsxRuntimeExports.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 16 16",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsxs("g",{id:"Nodes",children:[jsxRuntimeExports.jsx("mask",{id:"mask0_1506_141",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"16",height:"16",children:jsxRuntimeExports.jsx("rect",{id:"Bounding box",width:"1em",height:"1em",fill:"currentColor"})}),jsxRuntimeExports.jsx("g",{mask:"url(#mask0_1506_141)",children:jsxRuntimeExports.jsx("path",{id:"hub",d:"M4.00071 15.1667C3.49166 15.1667 3.05873 14.9886 2.70189 14.6322C2.34506 14.2759 2.16664 13.8432 2.16664 13.3341C2.16664 12.8251 2.3449 12.3922 2.70141 12.0353C3.05793 11.6785 3.49084 11.5001 4.00014 11.5001C4.14275 11.5001 4.28286 11.5178 4.42048 11.5533C4.55808 11.5887 4.68799 11.6364 4.81021 11.6962L6.13204 10.0513C5.85512 9.74962 5.66409 9.41201 5.55896 9.03851C5.45384 8.66501 5.43247 8.28938 5.49486 7.91161L3.57431 7.2757C3.40679 7.54493 3.18652 7.76074 2.91351 7.92313C2.6405 8.08552 2.33598 8.16671 1.99996 8.16671C1.4907 8.16671 1.05784 7.98855 0.701359 7.63221C0.344882 7.27588 0.166637 6.84319 0.166626 6.33415C0.166626 5.8251 0.344793 5.39217 0.701126 5.03533C1.05746 4.6785 1.49015 4.50008 1.99919 4.50008C2.50824 4.50008 2.94118 4.67832 3.29801 5.0348C3.65484 5.39128 3.83326 5.82414 3.83328 6.3334C3.83328 6.37272 3.83221 6.40563 3.83008 6.43211C3.82794 6.45861 3.82688 6.48511 3.82688 6.51161L5.74101 7.177C5.92476 6.83683 6.17711 6.54496 6.49806 6.30138C6.81899 6.05779 7.18715 5.90138 7.60253 5.83215V3.78595C7.17347 3.68509 6.82689 3.46821 6.56279 3.13531C6.29869 2.80241 6.16664 2.42312 6.16664 1.99742C6.16664 1.49064 6.34481 1.05883 6.70114 0.701999C7.05748 0.345166 7.49016 0.166748 7.99921 0.166748C8.50825 0.166748 8.94119 0.344987 9.29803 0.701465C9.65486 1.05794 9.83328 1.49081 9.83328 2.00007C9.83328 2.424 9.69951 2.80241 9.43199 3.13531C9.16448 3.46821 8.81961 3.68509 8.39739 3.78595V5.83215C8.81277 5.90138 9.17986 6.05779 9.49866 6.30138C9.81746 6.54496 10.0709 6.83683 10.2589 7.177L12.173 6.51161C12.1688 6.48084 12.1666 6.45327 12.1666 6.42892V6.3334C12.1666 5.82414 12.3448 5.39128 12.7011 5.0348C13.0575 4.67832 13.4902 4.50008 13.9992 4.50008C14.5083 4.50008 14.9412 4.67825 15.298 5.03458C15.6549 5.39091 15.8333 5.8236 15.8333 6.33265C15.8333 6.84169 15.655 7.27463 15.2986 7.63146C14.9421 7.9883 14.5092 8.16671 14 8.16671C13.6653 8.16671 13.3594 8.08552 13.0823 7.92313C12.8052 7.76074 12.5863 7.54493 12.4256 7.2757L10.5051 7.91161C10.5674 8.28938 10.5461 8.6633 10.441 9.03338C10.3358 9.40347 10.1448 9.74065 9.86788 10.0449L11.1897 11.6796C11.3119 11.624 11.4418 11.5802 11.5794 11.5481C11.7171 11.5161 11.8572 11.5001 11.9998 11.5001C12.5091 11.5001 12.942 11.6782 13.2985 12.0346C13.655 12.3909 13.8333 12.8236 13.8333 13.3326C13.8333 13.8417 13.6551 14.2746 13.2988 14.6315C12.9424 14.9883 12.5098 15.1667 12.0007 15.1667C11.4917 15.1667 11.0587 14.9885 10.7019 14.632C10.3451 14.2755 10.1666 13.8427 10.1666 13.3334C10.1666 13.1232 10.2006 12.9208 10.2686 12.7264C10.3365 12.5319 10.438 12.3535 10.573 12.1911L9.25123 10.5334C8.8726 10.759 8.45488 10.8718 7.99804 10.8718C7.54121 10.8718 7.12134 10.759 6.73844 10.5334L5.42688 12.1911C5.55764 12.3535 5.65807 12.5319 5.72816 12.7264C5.79824 12.9208 5.83328 13.1232 5.83328 13.3334C5.83328 13.8427 5.65511 14.2755 5.29878 14.632C4.94244 14.9885 4.50975 15.1667 4.00071 15.1667Z",fill:"currentColor"})})]})}),TwitterIcon=tt=>jsxRuntimeExports.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 16 16",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsxs("g",{id:"Twitter",children:[jsxRuntimeExports.jsx("mask",{id:"mask0_1506_167",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"16",height:"16",children:jsxRuntimeExports.jsx("rect",{id:"Bounding box",width:"1em",height:"1em",fill:"currentColor"})}),jsxRuntimeExports.jsx("g",{mask:"url(#mask0_1506_167)",children:jsxRuntimeExports.jsx("g",{id:"X",children:jsxRuntimeExports.jsx("path",{id:"path1009",d:"M2.0317 2L7.05085 8.71109L2 14.1675H3.13674L7.55875 9.39033L11.1316 14.1675H15L9.69845 7.07891L14.3997 2H13.263L9.19054 6.39967L5.90008 2H2.0317ZM3.70336 2.83733H5.48051L13.3281 13.33H11.5509L3.70336 2.83733Z",fill:"currentColor"})})})]})}),VideoIcon=tt=>jsxRuntimeExports.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 16 16",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsxs("g",{id:"Video",children:[jsxRuntimeExports.jsx("mask",{id:"mask0_1506_153",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"16",height:"16",children:jsxRuntimeExports.jsx("rect",{id:"Bounding box",width:"1em",height:"1em",fill:"currentColor"})}),jsxRuntimeExports.jsx("g",{mask:"url(#mask0_1506_153)",children:jsxRuntimeExports.jsx("path",{id:"Subtract","fill-rule":"evenodd","clip-rule":"evenodd",d:"M14.3782 3.03719C15.0725 3.22309 15.6201 3.76987 15.8053 4.46427C16.1429 5.72367 16.1429 8.35001 16.1429 8.35001C16.1429 8.35001 16.1429 10.9773 15.8053 12.2358C15.6201 12.9302 15.0725 13.4769 14.3782 13.6628C13.1197 14 8.07143 14 8.07143 14C8.07143 14 3.02403 14 1.76471 13.6628C1.07038 13.4769 0.522808 12.9302 0.337533 12.2358C0 10.9764 0 8.35001 0 8.35001C0 8.35001 0 5.72367 0.337533 4.46427C0.522808 3.76987 1.07038 3.22309 1.76471 3.03719C3.02312 2.70001 8.07143 2.70001 8.07143 2.70001C8.07143 2.70001 13.1197 2.70001 14.3782 3.03719ZM10.4931 8.35003L6.45735 5.9286V10.7715L10.4931 8.35003Z",fill:"currentColor"})})]})}),EpisodeIcon=tt=>jsxRuntimeExports.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 16 12",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsxs("g",{id:"Episode",children:[jsxRuntimeExports.jsx("rect",{id:"Rectangle 4456",x:"0.5",y:"5.625",width:"1em",height:"1em",rx:"0.5",stroke:"white"}),jsxRuntimeExports.jsx("path",{id:"Rectangle 4457",d:"M2.0625 3.0625H12.0625C12.6148 3.0625 13.0625 3.51022 13.0625 4.0625V9.9375",stroke:"white"}),jsxRuntimeExports.jsx("path",{id:"Rectangle 4458",d:"M4.125 1H14.125C14.6773 1 15.125 1.44772 15.125 2V7.875",stroke:"white"})]})}),Stats=()=>{const[tt,et]=reactExports.useState(null),[nt]=useUserStore(it=>[it.budget]);function rt(it){return it===null?"?":it.toLocaleString().split(",").join(" ")}return reactExports.useEffect(()=>{(async()=>{try{const ot=await api.get("/stats");ot&&et({numAudio:ot.num_audio,numContributors:ot.num_contributors,numDaily:ot.num_daily,numEpisodes:ot.num_episodes,numNodes:ot.num_nodes,numTwitterSpace:ot.num_twitter_space,numVideo:ot.num_video})}catch{lodashExports.noop()}})()},[]),tt?jsxRuntimeExports.jsxs(StatisticsContainer,{children:[jsxRuntimeExports.jsxs(StatisticsWrapper,{children:[jsxRuntimeExports.jsxs(Stat,{children:[jsxRuntimeExports.jsx("div",{className:"icon",children:jsxRuntimeExports.jsx(NodesIcon,{})}),jsxRuntimeExports.jsx("div",{className:"text",children:tt.numNodes})]}),jsxRuntimeExports.jsxs(Stat,{children:[jsxRuntimeExports.jsx("div",{className:"icon",children:jsxRuntimeExports.jsx(EpisodeIcon,{})}),jsxRuntimeExports.jsx("div",{className:"text",children:tt.numEpisodes})]}),jsxRuntimeExports.jsxs(Stat,{children:[jsxRuntimeExports.jsx("div",{className:"icon",children:jsxRuntimeExports.jsx(AudioIcon,{})}),jsxRuntimeExports.jsx("div",{className:"text",children:tt.numAudio})]}),jsxRuntimeExports.jsxs(Stat,{children:[jsxRuntimeExports.jsx("div",{className:"icon",children:jsxRuntimeExports.jsx(VideoIcon,{})}),jsxRuntimeExports.jsx("div",{className:"text",children:tt.numVideo})]}),jsxRuntimeExports.jsxs(Stat,{children:[jsxRuntimeExports.jsx("div",{className:"icon",children:jsxRuntimeExports.jsx(TwitterIcon,{})}),jsxRuntimeExports.jsx("div",{className:"text",children:tt.numTwitterSpace})]})]}),jsxRuntimeExports.jsx(StatisticsBudget,{children:jsxRuntimeExports.jsxs(Budget,{children:[jsxRuntimeExports.jsx("div",{className:"icon",children:jsxRuntimeExports.jsx(BudgetIcon,{})}),jsxRuntimeExports.jsx("div",{className:"text",children:jsxRuntimeExports.jsxs("p",{children:[`${rt(nt)} `," ",jsxRuntimeExports.jsx("span",{className:"budgetUnit",children:"SAT"})]})})]})})]}):null},StatisticsWrapper=styled$4(Flex).attrs({align:"center",direction:"row",grow:1,justify:"flex-start"})``,StatisticsBudget=styled$4(Flex).attrs({align:"center",direction:"row",grow:1,justify:"flex-end"})``,StatisticsContainer=styled$4(Flex).attrs({align:"center",direction:"row",grow:1})` - justify-content: between; -`,Stat=styled$4(Flex).attrs({align:"center",direction:"row",justify:"flex-start"})` - color: ${colors.white}; - background: ${colors.BG1}; - padding: 6px 10px 6px 8px; - font-family: Barlow; - font-size: 13px; - font-style: normal; - font-weight: 500; - line-height: 15px; - letter-spacing: 0.78px; - margin: 0 8px; - border-radius: 200px; - &:hover { - background: ${colors.BUTTON1_PRESS}; + .username { + color: ${colors.blueTextAccent}; } - &:active { - background: ${colors.BUTTON1}; + a { + color: ${colors.blueTextAccent}; + text-decoration: none; } - .icon { - margin-right: 8px; - font-size: 16px; + a:hover, + a:visited { + color: ${colors.blueTextAccent}; + text-decoration: none; } +`, + Avatar = styled$4.img` + width: 40px; + height: 40px; + border-radius: 50%; + background: green; +`, + Person = () => { + const tt = useSelectedNode() + return jsxRuntimeExports.jsxs(Flex, { + direction: 'row', + px: 24, + py: 16, + children: [ + jsxRuntimeExports.jsx(Avatar$1, { + size: 80, + src: (tt == null ? void 0 : tt.image_url) || 'person_placeholder2.png', + type: 'person', + }), + jsxRuntimeExports.jsx(Flex, { + p: 20, + children: jsxRuntimeExports.jsx(Text$3, { + color: 'primaryText1', + kind: 'bigHeading', + children: tt == null ? void 0 : tt.label, + }), + }), + ], + }) + }, + Wrapper$5 = styled$4(Flex)` + flex: 1; + min-height: 100%; + flex-direction: column; + border-bottom: 1px solid #101317; + box-shadow: 0px 5px 6px rgba(0, 0, 0, 0.5); + z-index: 0; +`, + EpisodeWrapper = styled$4(Flex).attrs(() => ({ direction: 'row' }))` + cursor: pointer; + color: ${colors.primaryText1}; +`, + EpisodePanel = ({ node: tt, onClick: et }) => { + var nt + return jsxRuntimeExports.jsx(EpisodeWrapper, { + onClick: et, + py: 12, + children: jsxRuntimeExports.jsxs('div', { + children: [ + jsxRuntimeExports.jsx(Flex, { + align: 'center', + direction: 'row', + children: jsxRuntimeExports.jsx(Text$3, { + color: 'primaryText1', + kind: 'regular', + children: tt.episode_title, + }), + }), + jsxRuntimeExports.jsx(Flex, { + pt: 4, + children: jsxRuntimeExports.jsxs(Text$3, { + color: 'mainBottomIcons', + kind: 'regular', + children: [((nt = tt == null ? void 0 : tt.children) == null ? void 0 : nt.length) || 0, ' clips'], + }), + }), + ], + }), + }) + }, + Show = () => { + const [tt, et] = useDataStore((it) => [it.selectedNode, it.setSelectedNode]), + nt = useGraphData(), + rt = reactExports.useMemo(() => { + var ot + const it = {} + return ( + (ot = tt == null ? void 0 : tt.children) != null && + ot.length && + tt.children.forEach((at) => { + const st = nt.nodes.find((lt) => lt.ref_id === at) + st && (it[at] = st) + }), + Object.values(it) + .filter((at) => at.node_type === 'episode') + .sort((at, st) => (st.weight || 0) - (at.weight || 0)) + ) + }, [nt.nodes, tt]) + return jsxRuntimeExports.jsxs(Wrapper$5, { + p: 20, + children: [ + jsxRuntimeExports.jsxs(Flex, { + direction: 'row', + children: [ + jsxRuntimeExports.jsx(Flex, { + pr: 24, + children: jsxRuntimeExports.jsx(Avatar$1, { + size: 80, + src: (tt == null ? void 0 : tt.image_url) || 'audio_default.svg', + type: 'audio', + }), + }), + jsxRuntimeExports.jsxs(Flex, { + grow: 1, + shrink: 1, + children: [ + jsxRuntimeExports.jsx(Text$3, { + kind: 'bigHeading', + children: (tt == null ? void 0 : tt.show_title) || 'Unknown', + }), + jsxRuntimeExports.jsx(Flex, { py: 16, children: jsxRuntimeExports.jsx(Actions, {}) }), + ], + }), + ], + }), + jsxRuntimeExports.jsxs(Flex, { + direction: 'column', + pt: 40, + children: [ + jsxRuntimeExports.jsx(Flex, { + pb: 20, + children: jsxRuntimeExports.jsx(Text$3, { kind: 'mediumBold', children: 'Related Episodes' }), + }), + rt.map((it) => jsxRuntimeExports.jsx(EpisodePanel, { node: it, onClick: () => et(it) }, it.ref_id)), + ], + }), + ], + }) + }, + Topic = () => { + const tt = useSelectedNode() + return jsxRuntimeExports.jsx(Flex, { + align: 'center', + justify: 'center', + children: jsxRuntimeExports.jsx(Text$3, { + color: 'primaryText1', + kind: 'hugeHeading', + children: tt == null ? void 0 : tt.label, + }), + }) + }, + TwitData = () => { + const tt = useSelectedNode(), + et = (tt == null ? void 0 : tt.tweet_id) || '' + return ( + tt && + jsxRuntimeExports.jsxs(Flex, { + direction: 'column', + px: 24, + py: 16, + children: [ + jsxRuntimeExports.jsx(Flex, { + align: 'center', + direction: 'row', + justify: 'flex-start', + p: 10, + children: jsxRuntimeExports.jsx(Text$3, { + color: 'primaryText1', + children: tt == null ? void 0 : tt.label, + }), + }), + et && + jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { + children: [ + jsxRuntimeExports.jsxs(TweetContainer, { + children: [ + jsxRuntimeExports.jsxs(Flex, { + direction: 'row', + children: [ + jsxRuntimeExports.jsx(ProfilePicture, { + children: jsxRuntimeExports.jsx('img', { + alt: 'Profile', + src: tt.profile_picture || 'twitter_placeholder.png', + }), + }), + jsxRuntimeExports.jsxs(AuthorInfo, { + children: [ + jsxRuntimeExports.jsx(AuthorName, { children: tt.name }), + jsxRuntimeExports.jsx(TwitterHandle, { + children: tt.twitter_handle || '@unknown_handle', + }), + ], + }), + ], + }), + jsxRuntimeExports.jsx(TweetText, { children: tt.text }), + ], + }), + jsxRuntimeExports.jsx(Flex, { + align: 'center', + children: jsxRuntimeExports.jsx('a', { + href: `https://twitter.com/Interior/status/${et}?open=system`, + children: jsxRuntimeExports.jsx(Button$2, { children: 'View comments ' }), + }), + }), + ], + }), + ], + }) + ) + }, + TweetContainer = styled$4.div` + padding: 10px; + border-radius: 6px; + display: flex; + flex-direction: column; + background: ${colors.BG1}; +`, + ProfilePicture = styled$4.div` + width: 50px; + height: 50px; + border-radius: 6px; + overflow: hidden; + margin-right: 10px; + flex: 1 1 50px; + max-width: 50px; + margin-bottom: 16px; - .text { + img { + width: 100%; + height: 100%; } -`,Budget=styled$4(Flex).attrs({align:"center",direction:"row"})` +`, + AuthorInfo = styled$4.div` display: flex; - height: 2.5rem; - padding: 0.75rem 0.9375rem 0.75rem 0.9375rem; - align-items: center; - gap: 0.625rem; + align-items: flex-start; + justify-content: flex-start; + margin-bottom: 5px; + flex-direction: column; +`, + AuthorName = styled$4.span` + font-family: Barlow; + font-weight: 700; color: ${colors.white}; - background: ${colors.BG1}; +`, + TwitterHandle = styled$4.span` + color: ${colors.PRIMARY_BLUE}; +`, + TweetText = styled$4.p` font-family: Barlow; - font-size: 0.75rem; + font-size: 16px; font-style: normal; font-weight: 500; - line-height: normal; - letter-spacing: 0.0075rem; - border-radius: 12.5rem; - - &:hover { - background: ${colors.BUTTON1_PRESS}; + line-height: 21px; + color: ${colors.white}; +`, + Twitter = () => jsxRuntimeExports.jsx('div', { children: 'Twitter' }) + var lib = {}, + players = {}, + utils = {}, + loadScript = function tt(et, nt, rt) { + var it = document.head || document.getElementsByTagName('head')[0], + ot = document.createElement('script') + typeof nt == 'function' && ((rt = nt), (nt = {})), + (nt = nt || {}), + (rt = rt || function () {}), + (ot.type = nt.type || 'text/javascript'), + (ot.charset = nt.charset || 'utf8'), + (ot.async = 'async' in nt ? !!nt.async : !0), + (ot.src = et), + nt.attrs && setAttributes(ot, nt.attrs), + nt.text && (ot.text = '' + nt.text) + var at = 'onload' in ot ? stdOnEnd : ieOnEnd + at(ot, rt), ot.onload || stdOnEnd(ot, rt), it.appendChild(ot) + } + function setAttributes(tt, et) { + for (var nt in et) tt.setAttribute(nt, et[nt]) + } + function stdOnEnd(tt, et) { + ;(tt.onload = function () { + ;(this.onerror = this.onload = null), et(null, tt) + }), + (tt.onerror = function () { + ;(this.onerror = this.onload = null), et(new Error('Failed to load ' + this.src), tt) + }) } - - &:active { - background: ${colors.BUTTON1}; + function ieOnEnd(tt, et) { + tt.onreadystatechange = function () { + ;(this.readyState != 'complete' && this.readyState != 'loaded') || + ((this.onreadystatechange = null), et(null, tt)) + } } - - .icon { - display: flex; - align-items: center; - justify-content: center; + var isMergeableObject = function tt(et) { + return isNonNullObject(et) && !isSpecial(et) } - - .budgetUnit { - color: ${colors.GRAY6}; + function isNonNullObject(tt) { + return !!tt && typeof tt == 'object' } - - .text { - display: flex; - align-items: center; - justify-content: center; + function isSpecial(tt) { + var et = Object.prototype.toString.call(tt) + return et === '[object RegExp]' || et === '[object Date]' || isReactElement(tt) } -`,defaultData$2={description:"",mission_statement:"",search_term:"",title:""},AppBar=()=>{const[tt,et]=reactExports.useState(defaultData$2);return reactExports.useEffect(()=>{(async()=>{try{const rt=await getAboutData();et(rt)}catch(rt){console.warn(rt)}})()},[]),jsxRuntimeExports.jsxs(Header$2,{children:[jsxRuntimeExports.jsxs(TitleWrapper,{children:[jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:tt.title&&jsxRuntimeExports.jsx(Text$3,{className:"title",color:"white",children:tt.title})}),jsxRuntimeExports.jsx(Text$3,{className:"subtitle",children:" Second Brain"})]}),jsxRuntimeExports.jsx(Stats,{})]})},Header$2=styled$4(Flex).attrs({align:"center",direction:"row",grow:1,justify:"flex-start"})` - height: 64px; - position: absolute; - top: 0px; - left: 64px; - right: 32px; - transition: opacity 1s; - z-index: 99; - padding: 20px 23px; -`,TitleWrapper=styled$4.div` - ${media.smallOnly` - display: none; - `} - - width: 367px; - - .title { - color: var(--Primary-Text, #fff); - font-family: Barlow; - font-size: 22px; - font-style: normal; - font-weight: 700; - line-height: 16px; /* 72.727% */ - letter-spacing: 0.22px; + var canUseSymbol = typeof Symbol == 'function' && Symbol.for, + REACT_ELEMENT_TYPE = canUseSymbol ? Symbol.for('react.element') : 60103 + function isReactElement(tt) { + return tt.$$typeof === REACT_ELEMENT_TYPE } - - .subtitle { - color: ${colors.GRAY6}; - font-family: Barlow; - font-size: 22px; - font-style: normal; - font-weight: 400; - line-height: 16px; - letter-spacing: 0.22px; + function emptyTarget(tt) { + return Array.isArray(tt) ? [] : {} } -`;function r$1(tt){var et,nt,rt="";if(typeof tt=="string"||typeof tt=="number")rt+=tt;else if(typeof tt=="object")if(Array.isArray(tt))for(et=0;et_extends$u({},pt,at,rt),[pt,at,rt]),gt=reactExports.useMemo(()=>{if(!ct)return ot||null;const vt=new ct({locale:dt,formats:ut,instance:ht});if(!vt.isMUIAdapter)throw new Error(["MUI: The date adapter should be imported from `@mui/x-date-pickers` or `@mui/x-date-pickers-pro`, not from `@date-io`","For example, `import { AdapterDayjs } from '@mui/x-date-pickers/AdapterDayjs'` instead of `import AdapterDayjs from '@date-io/dayjs'`","More information on the installation documentation: https://mui.com/x/react-date-pickers/getting-started/#installation"].join(` -`));return vt},[ct,dt,ut,ht,ot]),yt=reactExports.useMemo(()=>gt?{minDate:gt.date("1900-01-01T00:00:00.000"),maxDate:gt.date("2099-12-31T00:00:00.000")}:null,[gt]),bt=reactExports.useMemo(()=>({utils:gt,defaultDates:yt,localeText:mt}),[yt,gt,mt]);return jsxRuntimeExports.jsx(MuiPickersAdapterContext.Provider,{value:bt,children:lt})},getPickersLocalization=tt=>({components:{MuiLocalizationProvider:{defaultProps:{localeText:_extends$u({},tt)}}}}),enUSPickers={previousMonth:"Previous month",nextMonth:"Next month",openPreviousView:"open previous view",openNextView:"open next view",calendarViewSwitchingButtonAriaLabel:tt=>tt==="year"?"year view is open, switch to calendar view":"calendar view is open, switch to year view",start:"Start",end:"End",cancelButtonLabel:"Cancel",clearButtonLabel:"Clear",okButtonLabel:"OK",todayButtonLabel:"Today",datePickerToolbarTitle:"Select date",dateTimePickerToolbarTitle:"Select date & time",timePickerToolbarTitle:"Select time",dateRangePickerToolbarTitle:"Select date range",clockLabelText:(tt,et,nt)=>`Select ${tt}. ${et===null?"No time selected":`Selected time is ${nt.format(et,"fullTime")}`}`,hoursClockNumberText:tt=>`${tt} hours`,minutesClockNumberText:tt=>`${tt} minutes`,secondsClockNumberText:tt=>`${tt} seconds`,selectViewText:tt=>`Select ${tt}`,calendarWeekNumberHeaderLabel:"Week number",calendarWeekNumberHeaderText:"#",calendarWeekNumberAriaLabelText:tt=>`Week ${tt}`,calendarWeekNumberText:tt=>`${tt}`,openDatePickerDialogue:(tt,et)=>tt!==null&&et.isValid(tt)?`Choose date, selected date is ${et.format(tt,"fullDate")}`:"Choose date",openTimePickerDialogue:(tt,et)=>tt!==null&&et.isValid(tt)?`Choose time, selected time is ${et.format(tt,"fullTime")}`:"Choose time",fieldClearLabel:"Clear value",timeTableLabel:"pick time",dateTableLabel:"pick date",fieldYearPlaceholder:tt=>"Y".repeat(tt.digitAmount),fieldMonthPlaceholder:tt=>tt.contentType==="letter"?"MMMM":"MM",fieldDayPlaceholder:()=>"DD",fieldWeekDayPlaceholder:tt=>tt.contentType==="letter"?"EEEE":"EE",fieldHoursPlaceholder:()=>"hh",fieldMinutesPlaceholder:()=>"mm",fieldSecondsPlaceholder:()=>"ss",fieldMeridiemPlaceholder:()=>"aa"},DEFAULT_LOCALE=enUSPickers;getPickersLocalization(enUSPickers);const useLocalizationContext=()=>{const tt=reactExports.useContext(MuiPickersAdapterContext);if(tt===null)throw new Error(["MUI: Can not find the date and time pickers localization context.","It looks like you forgot to wrap your component in LocalizationProvider.","This can also happen if you are bundling multiple versions of the `@mui/x-date-pickers` package"].join(` -`));if(tt.utils===null)throw new Error(["MUI: Can not find the date and time pickers adapter from its localization context.","It looks like you forgot to pass a `dateAdapter` to your LocalizationProvider."].join(` -`));const et=reactExports.useMemo(()=>_extends$u({},DEFAULT_LOCALE,tt.localeText),[tt.localeText]);return reactExports.useMemo(()=>_extends$u({},tt,{localeText:et}),[tt,et])},useUtils=()=>useLocalizationContext().utils,useDefaultDates=()=>useLocalizationContext().defaultDates,useLocaleText=()=>useLocalizationContext().localeText,useNow=tt=>{const et=useUtils(),nt=reactExports.useRef();return nt.current===void 0&&(nt.current=et.dateWithTimezone(void 0,tt)),nt.current},ArrowDropDownIcon=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown"),ArrowLeftIcon=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M15.41 16.59L10.83 12l4.58-4.59L14 6l-6 6 6 6 1.41-1.41z"}),"ArrowLeft"),ArrowRightIcon=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"}),"ArrowRight"),CalendarIcon=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M17 12h-5v5h5v-5zM16 1v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2h-1V1h-2zm3 18H5V8h14v11z"}),"Calendar");createSvgIcon(jsxRuntimeExports.jsxs(reactExports.Fragment,{children:[jsxRuntimeExports.jsx("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),jsxRuntimeExports.jsx("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"})]}),"Clock");createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M9 11H7v2h2v-2zm4 0h-2v2h2v-2zm4 0h-2v2h2v-2zm2-7h-1V2h-2v2H8V2H6v2H5c-1.11 0-1.99.9-1.99 2L3 20c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 16H5V9h14v11z"}),"DateRange");createSvgIcon(jsxRuntimeExports.jsxs(reactExports.Fragment,{children:[jsxRuntimeExports.jsx("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),jsxRuntimeExports.jsx("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"})]}),"Time");const ClearIcon=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Clear");function getPickersArrowSwitcherUtilityClass(tt){return generateUtilityClass("MuiPickersArrowSwitcher",tt)}generateUtilityClasses("MuiPickersArrowSwitcher",["root","spacer","button"]);const _excluded$E=["children","className","slots","slotProps","isNextDisabled","isNextHidden","onGoToNext","nextLabel","isPreviousDisabled","isPreviousHidden","onGoToPrevious","previousLabel"],_excluded2$b=["ownerState"],_excluded3$3=["ownerState"],PickersArrowSwitcherRoot=styled$1("div",{name:"MuiPickersArrowSwitcher",slot:"Root",overridesResolver:(tt,et)=>et.root})({display:"flex"}),PickersArrowSwitcherSpacer=styled$1("div",{name:"MuiPickersArrowSwitcher",slot:"Spacer",overridesResolver:(tt,et)=>et.spacer})(({theme:tt})=>({width:tt.spacing(3)})),PickersArrowSwitcherButton=styled$1(IconButton$2,{name:"MuiPickersArrowSwitcher",slot:"Button",overridesResolver:(tt,et)=>et.button})(({ownerState:tt})=>_extends$u({},tt.hidden&&{visibility:"hidden"})),useUtilityClasses$f=tt=>{const{classes:et}=tt;return composeClasses({root:["root"],spacer:["spacer"],button:["button"]},getPickersArrowSwitcherUtilityClass,et)},PickersArrowSwitcher=reactExports.forwardRef(function(et,nt){var rt,it,ot,at;const lt=useTheme().direction==="rtl",ct=useThemeProps({props:et,name:"MuiPickersArrowSwitcher"}),{children:ut,className:ht,slots:dt,slotProps:pt,isNextDisabled:mt,isNextHidden:gt,onGoToNext:yt,nextLabel:bt,isPreviousDisabled:vt,isPreviousHidden:xt,onGoToPrevious:kt,previousLabel:St}=ct,Tt=_objectWithoutPropertiesLoose$m(ct,_excluded$E),At=ct,Et=useUtilityClasses$f(At),$t={isDisabled:mt,isHidden:gt,goTo:yt,label:bt},Dt={isDisabled:vt,isHidden:xt,goTo:kt,label:St},jt=(rt=dt==null?void 0:dt.previousIconButton)!=null?rt:PickersArrowSwitcherButton,Pt=useSlotProps({elementType:jt,externalSlotProps:pt==null?void 0:pt.previousIconButton,additionalProps:{size:"medium",title:Dt.label,"aria-label":Dt.label,disabled:Dt.isDisabled,edge:"end",onClick:Dt.goTo},ownerState:_extends$u({},At,{hidden:Dt.isHidden}),className:Et.button}),Ct=(it=dt==null?void 0:dt.nextIconButton)!=null?it:PickersArrowSwitcherButton,wt=useSlotProps({elementType:Ct,externalSlotProps:pt==null?void 0:pt.nextIconButton,additionalProps:{size:"medium",title:$t.label,"aria-label":$t.label,disabled:$t.isDisabled,edge:"start",onClick:$t.goTo},ownerState:_extends$u({},At,{hidden:$t.isHidden}),className:Et.button}),It=(ot=dt==null?void 0:dt.leftArrowIcon)!=null?ot:ArrowLeftIcon,Ot=useSlotProps({elementType:It,externalSlotProps:pt==null?void 0:pt.leftArrowIcon,additionalProps:{fontSize:"inherit"},ownerState:void 0}),Wt=_objectWithoutPropertiesLoose$m(Ot,_excluded2$b),zt=(at=dt==null?void 0:dt.rightArrowIcon)!=null?at:ArrowRightIcon,Ft=useSlotProps({elementType:zt,externalSlotProps:pt==null?void 0:pt.rightArrowIcon,additionalProps:{fontSize:"inherit"},ownerState:void 0}),Nt=_objectWithoutPropertiesLoose$m(Ft,_excluded3$3);return jsxRuntimeExports.jsxs(PickersArrowSwitcherRoot,_extends$u({ref:nt,className:clsx(Et.root,ht),ownerState:At},Tt,{children:[jsxRuntimeExports.jsx(jt,_extends$u({},Pt,{children:lt?jsxRuntimeExports.jsx(zt,_extends$u({},Nt)):jsxRuntimeExports.jsx(It,_extends$u({},Wt))})),ut?jsxRuntimeExports.jsx(Typography$1,{variant:"subtitle1",component:"span",children:ut}):jsxRuntimeExports.jsx(PickersArrowSwitcherSpacer,{className:Et.spacer,ownerState:At}),jsxRuntimeExports.jsx(Ct,_extends$u({},wt,{children:lt?jsxRuntimeExports.jsx(It,_extends$u({},Wt)):jsxRuntimeExports.jsx(zt,_extends$u({},Nt))}))]}))}),areViewsEqual=(tt,et)=>tt.length!==et.length?!1:et.every(nt=>tt.includes(nt)),applyDefaultViewProps=({openTo:tt,defaultOpenTo:et,views:nt,defaultViews:rt})=>{const it=nt??rt;let ot;if(tt!=null)ot=tt;else if(it.includes(et))ot=et;else if(it.length>0)ot=it[0];else throw new Error("MUI: The `views` prop must contain at least one view");return{views:it,openTo:ot}},timeViews=["hours","minutes","seconds"],isTimeView=tt=>timeViews.includes(tt),getSecondsInDay=(tt,et)=>et.getHours(tt)*3600+et.getMinutes(tt)*60+et.getSeconds(tt),createIsAfterIgnoreDatePart=(tt,et)=>(nt,rt)=>tt?et.isAfter(nt,rt):getSecondsInDay(nt,et)>getSecondsInDay(rt,et);function useViews({onChange:tt,onViewChange:et,openTo:nt,view:rt,views:it,autoFocus:ot,focusedView:at,onFocusedViewChange:st}){var lt,ct;const ut=reactExports.useRef(nt),ht=reactExports.useRef(it),dt=reactExports.useRef(it.includes(nt)?nt:it[0]),[pt,mt]=useControlled({name:"useViews",state:"view",controlled:rt,default:dt.current}),gt=reactExports.useRef(ot?pt:null),[yt,bt]=useControlled({name:"useViews",state:"focusedView",controlled:at,default:gt.current});reactExports.useEffect(()=>{(ut.current&&ut.current!==nt||ht.current&&ht.current.some(Dt=>!it.includes(Dt)))&&(mt(it.includes(nt)?nt:it[0]),ht.current=it,ut.current=nt)},[nt,mt,pt,it]);const vt=it.indexOf(pt),xt=(lt=it[vt-1])!=null?lt:null,kt=(ct=it[vt+1])!=null?ct:null,St=useEventCallback((Dt,jt)=>{bt(jt?Dt:Pt=>Dt===Pt?null:Pt),st==null||st(Dt,jt)}),Tt=useEventCallback(Dt=>{Dt!==pt&&(mt(Dt),St(Dt,!0),et&&et(Dt))}),At=useEventCallback(()=>{kt&&Tt(kt),St(kt,!0)}),Et=useEventCallback((Dt,jt,Pt)=>{const Ct=jt==="finish",wt=Pt?it.indexOf(Pt){tt(Dt,jt?"partial":"finish",Pt),jt&&(Tt(jt),St(jt,!0))});return{view:pt,setView:Tt,focusedView:yt,setFocusedView:St,nextView:kt,previousView:xt,defaultView:dt.current,goToNextView:At,setValueAndGoToNextView:Et,setValueAndGoToView:$t}}function useNextMonthDisabled(tt,{disableFuture:et,maxDate:nt,timezone:rt}){const it=useUtils();return reactExports.useMemo(()=>{const ot=it.dateWithTimezone(void 0,rt),at=it.startOfMonth(et&&it.isBefore(ot,nt)?ot:nt);return!it.isAfter(at,tt)},[et,nt,tt,it,rt])}function usePreviousMonthDisabled(tt,{disablePast:et,minDate:nt,timezone:rt}){const it=useUtils();return reactExports.useMemo(()=>{const ot=it.dateWithTimezone(void 0,rt),at=it.startOfMonth(et&&it.isAfter(ot,nt)?ot:nt);return!it.isBefore(at,tt)},[et,nt,tt,it,rt])}const DAY_SIZE=36,DAY_MARGIN=2,DIALOG_WIDTH=320,MAX_CALENDAR_HEIGHT=280,VIEW_HEIGHT=334,PickerViewRoot=styled$1("div")({overflow:"hidden",width:DIALOG_WIDTH,maxHeight:VIEW_HEIGHT,display:"flex",flexDirection:"column",margin:"0 auto"}),findClosestEnabledDate=({date:tt,disableFuture:et,disablePast:nt,maxDate:rt,minDate:it,isDateDisabled:ot,utils:at,timezone:st})=>{const lt=at.startOfDay(at.dateWithTimezone(void 0,st));nt&&at.isBefore(it,lt)&&(it=lt),et&&at.isAfter(rt,lt)&&(rt=lt);let ct=tt,ut=tt;for(at.isBefore(tt,it)&&(ct=it,ut=null),at.isAfter(tt,rt)&&(ut&&(ut=rt),ct=null);ct||ut;){if(ct&&at.isAfter(ct,rt)&&(ct=null),ut&&at.isBefore(ut,it)&&(ut=null),ct){if(!ot(ct))return ct;ct=at.addDays(ct,1)}if(ut){if(!ot(ut))return ut;ut=at.addDays(ut,-1)}}return null},replaceInvalidDateByNull=(tt,et)=>et==null||!tt.isValid(et)?null:et,applyDefaultDate=(tt,et,nt)=>et==null||!tt.isValid(et)?nt:et,areDatesEqual$1=(tt,et,nt)=>!tt.isValid(et)&&et!=null&&!tt.isValid(nt)&&nt!=null?!0:tt.isEqual(et,nt),getMonthsInYear=(tt,et)=>{const rt=[tt.startOfYear(et)];for(;rt.length<12;){const it=rt[rt.length-1];rt.push(tt.addMonths(it,1))}return rt},mergeDateAndTime=(tt,et,nt)=>{let rt=et;return rt=tt.setHours(rt,tt.getHours(nt)),rt=tt.setMinutes(rt,tt.getMinutes(nt)),rt=tt.setSeconds(rt,tt.getSeconds(nt)),rt},getTodayDate=(tt,et,nt)=>nt==="date"?tt.startOfDay(tt.dateWithTimezone(void 0,et)):tt.dateWithTimezone(void 0,et),dateViews=["year","month","day"],isDatePickerView=tt=>dateViews.includes(tt),resolveDateFormat=(tt,{format:et,views:nt},rt)=>{if(et!=null)return et;const it=tt.formats;return areViewsEqual(nt,["year"])?it.year:areViewsEqual(nt,["month"])?it.month:areViewsEqual(nt,["day"])?it.dayOfMonth:areViewsEqual(nt,["month","year"])?`${it.month} ${it.year}`:areViewsEqual(nt,["day","month"])?`${it.month} ${it.dayOfMonth}`:rt?/en/.test(tt.getCurrentLocaleCode())?it.normalDateWithWeekday:it.normalDate:it.keyboardDate},getWeekdays=(tt,et)=>{const nt=tt.startOfWeek(et);return[0,1,2,3,4,5,6].map(rt=>tt.addDays(nt,rt))},useValueWithTimezone=({timezone:tt,value:et,defaultValue:nt,onChange:rt,valueManager:it})=>{var ot,at;const st=useUtils(),lt=reactExports.useRef(nt),ct=(ot=et??lt.current)!=null?ot:it.emptyValue,ut=reactExports.useMemo(()=>it.getTimezone(st,ct),[st,it,ct]),ht=useEventCallback(gt=>ut==null?gt:it.setTimezone(st,ut,gt)),dt=(at=tt??ut)!=null?at:"default",pt=reactExports.useMemo(()=>it.setTimezone(st,dt,ct),[it,st,dt,ct]),mt=useEventCallback((gt,...yt)=>{const bt=ht(gt);rt==null||rt(bt,...yt)});return{value:pt,handleValueChange:mt,timezone:dt}},useControlledValueWithTimezone=({name:tt,timezone:et,value:nt,defaultValue:rt,onChange:it,valueManager:ot})=>{const[at,st]=useControlled({name:tt,state:"value",controlled:nt,default:rt??ot.emptyValue}),lt=useEventCallback((ct,...ut)=>{st(ct),it==null||it(ct,...ut)});return useValueWithTimezone({timezone:et,value:at,defaultValue:void 0,onChange:lt,valueManager:ot})},SECTION_TYPE_GRANULARITY={year:1,month:2,day:3,hours:4,minutes:5,seconds:6,milliseconds:7},getSectionTypeGranularity=tt=>Math.max(...tt.map(et=>{var nt;return(nt=SECTION_TYPE_GRANULARITY[et.type])!=null?nt:1})),roundDate=(tt,et,nt)=>{if(et===SECTION_TYPE_GRANULARITY.year)return tt.startOfYear(nt);if(et===SECTION_TYPE_GRANULARITY.month)return tt.startOfMonth(nt);if(et===SECTION_TYPE_GRANULARITY.day)return tt.startOfDay(nt);let rt=nt;return et{var ot;let at=it?it():roundDate(et,nt,getTodayDate(et,rt));tt.minDate!=null&&et.isAfterDay(tt.minDate,at)&&(at=roundDate(et,nt,tt.minDate)),tt.maxDate!=null&&et.isBeforeDay(tt.maxDate,at)&&(at=roundDate(et,nt,tt.maxDate));const st=createIsAfterIgnoreDatePart((ot=tt.disableIgnoringDatePartForTimeValidation)!=null?ot:!1,et);return tt.minTime!=null&&st(tt.minTime,at)&&(at=roundDate(et,nt,tt.disableIgnoringDatePartForTimeValidation?tt.minTime:mergeDateAndTime(et,at,tt.minTime))),tt.maxTime!=null&&st(at,tt.maxTime)&&(at=roundDate(et,nt,tt.disableIgnoringDatePartForTimeValidation?tt.maxTime:mergeDateAndTime(et,at,tt.maxTime))),at},getDateSectionConfigFromFormatToken=(tt,et)=>{const nt=tt.formatTokenMap[et];if(nt==null)throw new Error([`MUI: The token "${et}" is not supported by the Date and Time Pickers.`,"Please try using another token or open an issue on https://github.com/mui/mui-x/issues/new/choose if you think it should be supported."].join(` -`));return typeof nt=="string"?{type:nt,contentType:nt==="meridiem"?"letter":"digit",maxLength:void 0}:{type:nt.sectionType,contentType:nt.contentType,maxLength:nt.maxLength}},getDeltaFromKeyCode=tt=>{switch(tt){case"ArrowUp":return 1;case"ArrowDown":return-1;case"PageUp":return 5;case"PageDown":return-5;default:return 0}},getDaysInWeekStr=(tt,et,nt)=>{const rt=[],it=tt.dateWithTimezone(void 0,et),ot=tt.startOfWeek(it),at=tt.endOfWeek(it);let st=ot;for(;tt.isBefore(st,at);)rt.push(st),st=tt.addDays(st,1);return rt.map(lt=>tt.formatByString(lt,nt))},getLetterEditingOptions=(tt,et,nt,rt)=>{switch(nt){case"month":return getMonthsInYear(tt,tt.dateWithTimezone(void 0,et)).map(it=>tt.formatByString(it,rt));case"weekDay":return getDaysInWeekStr(tt,et,rt);case"meridiem":{const it=tt.dateWithTimezone(void 0,et);return[tt.startOfDay(it),tt.endOfDay(it)].map(ot=>tt.formatByString(ot,rt))}default:return[]}},cleanLeadingZeros=(tt,et,nt)=>{let rt=et;for(rt=Number(rt).toString();rt.length{if(it.type==="day"&&it.contentType==="digit-with-letter"){const at=tt.setDate(rt.longestMonth,nt);return tt.formatByString(at,it.format)}const ot=nt.toString();return it.hasLeadingZerosInInput?cleanLeadingZeros(tt,ot,it.maxLength):ot},adjustSectionValue=(tt,et,nt,rt,it,ot,at)=>{const st=getDeltaFromKeyCode(rt),lt=rt==="Home",ct=rt==="End",ut=nt.value===""||lt||ct,ht=()=>{const pt=it[nt.type]({currentDate:ot,format:nt.format,contentType:nt.contentType}),mt=vt=>cleanDigitSectionValue(tt,et,vt,pt,nt),gt=nt.type==="minutes"&&at!=null&&at.minutesStep?at.minutesStep:1;let bt=parseInt(nt.value,10)+st*gt;if(ut){if(nt.type==="year"&&!ct&&!lt)return tt.formatByString(tt.dateWithTimezone(void 0,et),nt.format);st>0||lt?bt=pt.minimum:bt=pt.maximum}return bt%gt!==0&&((st<0||lt)&&(bt+=gt-(gt+bt)%gt),(st>0||ct)&&(bt-=bt%gt)),bt>pt.maximum?mt(pt.minimum+(bt-pt.maximum-1)%(pt.maximum-pt.minimum+1)):bt{const pt=getLetterEditingOptions(tt,et,nt.type,nt.format);if(pt.length===0)return nt.value;if(ut)return st>0||lt?pt[0]:pt[pt.length-1];const gt=(pt.indexOf(nt.value)+pt.length+st)%pt.length;return pt[gt]};return nt.contentType==="digit"||nt.contentType==="digit-with-letter"?ht():dt()},getSectionVisibleValue=(tt,et)=>{let nt=tt.value||tt.placeholder;const rt=et==="non-input"?tt.hasLeadingZerosInFormat:tt.hasLeadingZerosInInput;return et==="non-input"&&tt.hasLeadingZerosInInput&&!tt.hasLeadingZerosInFormat&&(nt=Number(nt).toString()),["input-rtl","input-ltr"].includes(et)&&tt.contentType==="digit"&&!rt&&nt.length===1&&(nt=`${nt}‎`),et==="input-rtl"&&(nt=`⁨${nt}⁩`),nt},cleanString=tt=>tt.replace(/[\u2066\u2067\u2068\u2069]/g,""),addPositionPropertiesToSections=(tt,et)=>{let nt=0,rt=et?1:0;const it=[];for(let ot=0;ot{switch(rt.type){case"year":return nt.fieldYearPlaceholder({digitAmount:tt.formatByString(tt.dateWithTimezone(void 0,et),it).length});case"month":return nt.fieldMonthPlaceholder({contentType:rt.contentType});case"day":return nt.fieldDayPlaceholder();case"weekDay":return nt.fieldWeekDayPlaceholder({contentType:rt.contentType});case"hours":return nt.fieldHoursPlaceholder();case"minutes":return nt.fieldMinutesPlaceholder();case"seconds":return nt.fieldSecondsPlaceholder();case"meridiem":return nt.fieldMeridiemPlaceholder();default:return it}},changeSectionValueFormat=(tt,et,nt,rt)=>tt.formatByString(tt.parse(et,nt),rt),isFourDigitYearFormat=(tt,et,nt)=>tt.formatByString(tt.dateWithTimezone(void 0,et),nt).length===4,doesSectionFormatHaveLeadingZeros=(tt,et,nt,rt,it)=>{if(nt!=="digit")return!1;const ot=tt.dateWithTimezone(void 0,et);switch(rt){case"year":return isFourDigitYearFormat(tt,et,it)?tt.formatByString(tt.setYear(ot,1),it)==="0001":tt.formatByString(tt.setYear(ot,2001),it)==="01";case"month":return tt.formatByString(tt.startOfYear(ot),it).length>1;case"day":return tt.formatByString(tt.startOfMonth(ot),it).length>1;case"weekDay":return tt.formatByString(tt.startOfWeek(ot),it).length>1;case"hours":return tt.formatByString(tt.setHours(ot,1),it).length>1;case"minutes":return tt.formatByString(tt.setMinutes(ot,1),it).length>1;case"seconds":return tt.formatByString(tt.setMinutes(ot,1),it).length>1;default:throw new Error("Invalid section type")}},getEscapedPartsFromFormat=(tt,et)=>{const nt=[],{start:rt,end:it}=tt.escapedCharacters,ot=new RegExp(`(\\${rt}[^\\${it}]*\\${it})+`,"g");let at=null;for(;at=ot.exec(et);)nt.push({start:at.index,end:ot.lastIndex-1});return nt},splitFormatIntoSections=(tt,et,nt,rt,it,ot,at,st)=>{let lt="";const ct=[],ut=tt.date(),ht=xt=>{if(xt==="")return null;const kt=getDateSectionConfigFromFormatToken(tt,xt),St=doesSectionFormatHaveLeadingZeros(tt,et,kt.contentType,kt.type,xt),Tt=at?St:kt.contentType==="digit",At=it!=null&&tt.isValid(it);let Et=At?tt.formatByString(it,xt):"",$t=null;if(Tt)if(St)$t=Et===""?tt.formatByString(ut,xt).length:Et.length;else{if(kt.maxLength==null)throw new Error(`MUI: The token ${xt} should have a 'maxDigitNumber' property on it's adapter`);$t=kt.maxLength,At&&(Et=cleanLeadingZeros(tt,Et,$t))}return ct.push(_extends$u({},kt,{format:xt,maxLength:$t,value:Et,placeholder:getSectionPlaceholder(tt,et,nt,kt,xt),hasLeadingZeros:St,hasLeadingZerosInFormat:St,hasLeadingZerosInInput:Tt,startSeparator:ct.length===0?lt:"",endSeparator:"",modified:!1})),null};let dt=10,pt=rt,mt=tt.expandFormat(rt);for(;mt!==pt;)if(pt=mt,mt=tt.expandFormat(pt),dt-=1,dt<0)throw new Error("MUI: The format expansion seems to be enter in an infinite loop. Please open an issue with the format passed to the picker component");const gt=mt,yt=getEscapedPartsFromFormat(tt,gt),bt=new RegExp(`^(${Object.keys(tt.formatTokenMap).sort((xt,kt)=>kt.length-xt.length).join("|")})`,"g");let vt="";for(let xt=0;xt$t.start<=xt&&$t.end>=xt),St=gt[xt],Tt=kt!=null,At=`${vt}${gt.slice(xt)}`,Et=bt.test(At);!Tt&&St.match(/([A-Za-z]+)/)&&Et?(vt=At.slice(0,bt.lastIndex),xt+=bt.lastIndex-1):Tt&&(kt==null?void 0:kt.start)===xt||(kt==null?void 0:kt.end)===xt||(ht(vt),vt="",ct.length===0?lt+=St:ct[ct.length-1].endSeparator+=St)}return ht(vt),ct.map(xt=>{const kt=St=>{let Tt=St;return st&&Tt!==null&&Tt.includes(" ")&&(Tt=`⁩${Tt}⁦`),ot==="spacious"&&["/",".","-"].includes(Tt)&&(Tt=` ${Tt} `),Tt};return xt.startSeparator=kt(xt.startSeparator),xt.endSeparator=kt(xt.endSeparator),xt})},getDateFromDateSections=(tt,et)=>{const nt=et.some(st=>st.type==="day"),rt=[],it=[];for(let st=0;st{const rt=tt.map(it=>{const ot=getSectionVisibleValue(it,et?"input-rtl":"input-ltr");return`${it.startSeparator}${ot}${it.endSeparator}`}).join("");return et?`⁦${rt}⁩`:rt},getSectionsBoundaries=(tt,et)=>{const nt=tt.dateWithTimezone(void 0,et),rt=tt.endOfYear(nt),it=tt.endOfDay(nt),{maxDaysInMonth:ot,longestMonth:at}=getMonthsInYear(tt,nt).reduce((st,lt)=>{const ct=tt.getDaysInMonth(lt);return ct>st.maxDaysInMonth?{maxDaysInMonth:ct,longestMonth:lt}:st},{maxDaysInMonth:0,longestMonth:null});return{year:({format:st})=>({minimum:0,maximum:isFourDigitYearFormat(tt,et,st)?9999:99}),month:()=>({minimum:1,maximum:tt.getMonth(rt)+1}),day:({currentDate:st})=>({minimum:1,maximum:st!=null&&tt.isValid(st)?tt.getDaysInMonth(st):ot,longestMonth:at}),weekDay:({format:st,contentType:lt})=>{if(lt==="digit"){const ct=getDaysInWeekStr(tt,et,st).map(Number);return{minimum:Math.min(...ct),maximum:Math.max(...ct)}}return{minimum:1,maximum:7}},hours:({format:st})=>{const lt=tt.getHours(it);return tt.formatByString(tt.endOfDay(nt),st)!==lt.toString()?{minimum:1,maximum:Number(tt.formatByString(tt.startOfDay(nt),st))}:{minimum:0,maximum:lt}},minutes:()=>({minimum:0,maximum:tt.getMinutes(it)}),seconds:()=>({minimum:0,maximum:tt.getSeconds(it)}),meridiem:()=>({minimum:0,maximum:0})}},transferDateSectionValue=(tt,et,nt,rt,it)=>{switch(nt.type){case"year":return tt.setYear(it,tt.getYear(rt));case"month":return tt.setMonth(it,tt.getMonth(rt));case"weekDay":{const ot=getDaysInWeekStr(tt,et,nt.format),at=tt.formatByString(rt,nt.format),st=ot.indexOf(at),ct=ot.indexOf(nt.value)-st;return tt.addDays(rt,ct)}case"day":return tt.setDate(it,tt.getDate(rt));case"meridiem":{const ot=tt.getHours(rt)<12,at=tt.getHours(it);return ot&&at>=12?tt.addHours(it,-12):!ot&&at<12?tt.addHours(it,12):it}case"hours":return tt.setHours(it,tt.getHours(rt));case"minutes":return tt.setMinutes(it,tt.getMinutes(rt));case"seconds":return tt.setSeconds(it,tt.getSeconds(rt));default:return it}},reliableSectionModificationOrder={year:1,month:2,day:3,weekDay:4,hours:5,minutes:6,seconds:7,meridiem:8},mergeDateIntoReferenceDate=(tt,et,nt,rt,it,ot)=>[...rt].sort((at,st)=>reliableSectionModificationOrder[at.type]-reliableSectionModificationOrder[st.type]).reduce((at,st)=>!ot||st.modified?transferDateSectionValue(tt,et,st,nt,at):at,it),isAndroid=()=>navigator.userAgent.toLowerCase().indexOf("android")>-1,getSectionOrder=(tt,et)=>{const nt={};if(!et)return tt.forEach((lt,ct)=>{const ut=ct===0?null:ct-1,ht=ct===tt.length-1?null:ct+1;nt[ct]={leftIndex:ut,rightIndex:ht}}),{neighbors:nt,startIndex:0,endIndex:tt.length-1};const rt={},it={};let ot=0,at=0,st=tt.length-1;for(;st>=0;){at=tt.findIndex((lt,ct)=>{var ut;return ct>=ot&&((ut=lt.endSeparator)==null?void 0:ut.includes(" "))&<.endSeparator!==" / "}),at===-1&&(at=tt.length-1);for(let lt=at;lt>=ot;lt-=1)it[lt]=st,rt[st]=lt,st-=1;ot=at+1}return tt.forEach((lt,ct)=>{const ut=it[ct],ht=ut===0?null:rt[ut-1],dt=ut===tt.length-1?null:rt[ut+1];nt[ct]={leftIndex:ht,rightIndex:dt}}),{neighbors:nt,startIndex:rt[0],endIndex:rt[tt.length-1]}},_excluded$D=["value","referenceDate"],singleItemValueManager={emptyValue:null,getTodayValue:getTodayDate,getInitialReferenceValue:tt=>{let{value:et,referenceDate:nt}=tt,rt=_objectWithoutPropertiesLoose$m(tt,_excluded$D);return et!=null&&rt.utils.isValid(et)?et:nt??getDefaultReferenceDate(rt)},cleanValue:replaceInvalidDateByNull,areValuesEqual:areDatesEqual$1,isSameError:(tt,et)=>tt===et,hasError:tt=>tt!=null,defaultErrorState:null,getTimezone:(tt,et)=>et==null||!tt.isValid(et)?null:tt.getTimezone(et),setTimezone:(tt,et,nt)=>nt==null?null:tt.setTimezone(nt,et)},singleItemFieldValueManager={updateReferenceValue:(tt,et,nt)=>et==null||!tt.isValid(et)?nt:et,getSectionsFromValue:(tt,et,nt,rt,it)=>!tt.isValid(et)&&!!nt?nt:addPositionPropertiesToSections(it(et),rt),getValueStrFromSections:createDateStrForInputFromSections,getActiveDateManager:(tt,et)=>({date:et.value,referenceDate:et.referenceValue,getSections:nt=>nt,getNewValuesFromNewActiveDate:nt=>({value:nt,referenceValue:nt==null||!tt.isValid(nt)?et.referenceValue:nt})}),parseValueStr:(tt,et,nt)=>nt(tt.trim(),et)},uncapitalizeObjectKeys=tt=>{if(tt!==void 0)return Object.keys(tt).reduce((et,nt)=>_extends$u({},et,{[`${nt.slice(0,1).toLowerCase()}${nt.slice(1)}`]:tt[nt]}),{})};function getPickersDayUtilityClass(tt){return generateUtilityClass("MuiPickersDay",tt)}const pickersDayClasses=generateUtilityClasses("MuiPickersDay",["root","dayWithMargin","dayOutsideMonth","hiddenDaySpacingFiller","today","selected","disabled"]),_excluded$C=["autoFocus","className","day","disabled","disableHighlightToday","disableMargin","hidden","isAnimating","onClick","onDaySelect","onFocus","onBlur","onKeyDown","onMouseDown","onMouseEnter","outsideCurrentMonth","selected","showDaysOutsideCurrentMonth","children","today","isFirstVisibleCell","isLastVisibleCell"],useUtilityClasses$e=tt=>{const{selected:et,disableMargin:nt,disableHighlightToday:rt,today:it,disabled:ot,outsideCurrentMonth:at,showDaysOutsideCurrentMonth:st,classes:lt}=tt,ct=at&&!st;return composeClasses({root:["root",et&&!ct&&"selected",ot&&"disabled",!nt&&"dayWithMargin",!rt&&it&&"today",at&&st&&"dayOutsideMonth",ct&&"hiddenDaySpacingFiller"],hiddenDaySpacingFiller:["hiddenDaySpacingFiller"]},getPickersDayUtilityClass,lt)},styleArg=({theme:tt,ownerState:et})=>_extends$u({},tt.typography.caption,{width:DAY_SIZE,height:DAY_SIZE,borderRadius:"50%",padding:0,backgroundColor:"transparent",transition:tt.transitions.create("background-color",{duration:tt.transitions.duration.short}),color:(tt.vars||tt).palette.text.primary,"@media (pointer: fine)":{"&:hover":{backgroundColor:tt.vars?`rgba(${tt.vars.palette.primary.mainChannel} / ${tt.vars.palette.action.hoverOpacity})`:alpha$1(tt.palette.primary.main,tt.palette.action.hoverOpacity)}},"&:focus":{backgroundColor:tt.vars?`rgba(${tt.vars.palette.primary.mainChannel} / ${tt.vars.palette.action.focusOpacity})`:alpha$1(tt.palette.primary.main,tt.palette.action.focusOpacity),[`&.${pickersDayClasses.selected}`]:{willChange:"background-color",backgroundColor:(tt.vars||tt).palette.primary.dark}},[`&.${pickersDayClasses.selected}`]:{color:(tt.vars||tt).palette.primary.contrastText,backgroundColor:(tt.vars||tt).palette.primary.main,fontWeight:tt.typography.fontWeightMedium,"&:hover":{willChange:"background-color",backgroundColor:(tt.vars||tt).palette.primary.dark}},[`&.${pickersDayClasses.disabled}:not(.${pickersDayClasses.selected})`]:{color:(tt.vars||tt).palette.text.disabled},[`&.${pickersDayClasses.disabled}&.${pickersDayClasses.selected}`]:{opacity:.6}},!et.disableMargin&&{margin:`0 ${DAY_MARGIN}px`},et.outsideCurrentMonth&&et.showDaysOutsideCurrentMonth&&{color:(tt.vars||tt).palette.text.secondary},!et.disableHighlightToday&&et.today&&{[`&:not(.${pickersDayClasses.selected})`]:{border:`1px solid ${(tt.vars||tt).palette.text.secondary}`}}),overridesResolver=(tt,et)=>{const{ownerState:nt}=tt;return[et.root,!nt.disableMargin&&et.dayWithMargin,!nt.disableHighlightToday&&nt.today&&et.today,!nt.outsideCurrentMonth&&nt.showDaysOutsideCurrentMonth&&et.dayOutsideMonth,nt.outsideCurrentMonth&&!nt.showDaysOutsideCurrentMonth&&et.hiddenDaySpacingFiller]},PickersDayRoot=styled$1(ButtonBase$1,{name:"MuiPickersDay",slot:"Root",overridesResolver})(styleArg),PickersDayFiller=styled$1("div",{name:"MuiPickersDay",slot:"Root",overridesResolver})(({theme:tt,ownerState:et})=>_extends$u({},styleArg({theme:tt,ownerState:et}),{opacity:0,pointerEvents:"none"})),noop$5=()=>{},PickersDayRaw=reactExports.forwardRef(function(et,nt){const rt=useThemeProps({props:et,name:"MuiPickersDay"}),{autoFocus:it=!1,className:ot,day:at,disabled:st=!1,disableHighlightToday:lt=!1,disableMargin:ct=!1,isAnimating:ut,onClick:ht,onDaySelect:dt,onFocus:pt=noop$5,onBlur:mt=noop$5,onKeyDown:gt=noop$5,onMouseDown:yt=noop$5,onMouseEnter:bt=noop$5,outsideCurrentMonth:vt,selected:xt=!1,showDaysOutsideCurrentMonth:kt=!1,children:St,today:Tt=!1}=rt,At=_objectWithoutPropertiesLoose$m(rt,_excluded$C),Et=_extends$u({},rt,{autoFocus:it,disabled:st,disableHighlightToday:lt,disableMargin:ct,selected:xt,showDaysOutsideCurrentMonth:kt,today:Tt}),$t=useUtilityClasses$e(Et),Dt=useUtils(),jt=reactExports.useRef(null),Pt=useForkRef(jt,nt);useEnhancedEffect$1(()=>{it&&!st&&!ut&&!vt&&jt.current.focus()},[it,st,ut,vt]);const Ct=It=>{yt(It),vt&&It.preventDefault()},wt=It=>{st||dt(at),vt&&It.currentTarget.focus(),ht&&ht(It)};return vt&&!kt?jsxRuntimeExports.jsx(PickersDayFiller,{className:clsx($t.root,$t.hiddenDaySpacingFiller,ot),ownerState:Et,role:At.role}):jsxRuntimeExports.jsx(PickersDayRoot,_extends$u({className:clsx($t.root,ot),ref:Pt,centerRipple:!0,disabled:st,tabIndex:xt?0:-1,onKeyDown:It=>gt(It,at),onFocus:It=>pt(It,at),onBlur:It=>mt(It,at),onMouseEnter:It=>bt(It,at),onClick:wt,onMouseDown:Ct},At,{ownerState:Et,children:St||Dt.format(at,"dayOfMonth")}))}),PickersDay=reactExports.memo(PickersDayRaw);function useValidation(tt,et,nt,rt){const{value:it,onError:ot}=tt,at=useLocalizationContext(),st=reactExports.useRef(rt),lt=et({adapter:at,value:it,props:tt});return reactExports.useEffect(()=>{ot&&!nt(lt,st.current)&&ot(lt,it),st.current=lt},[nt,ot,st,lt,it]),lt}const useFieldState=tt=>{const et=useUtils(),nt=useLocaleText(),rt=useLocalizationContext(),ot=useTheme().direction==="rtl",{valueManager:at,fieldValueManager:st,valueType:lt,validator:ct,internalProps:ut,internalProps:{value:ht,defaultValue:dt,referenceDate:pt,onChange:mt,format:gt,formatDensity:yt="dense",selectedSections:bt,onSelectedSectionsChange:vt,shouldRespectLeadingZeros:xt=!1,timezone:kt}}=tt,{timezone:St,value:Tt,handleValueChange:At}=useValueWithTimezone({timezone:kt,value:ht,defaultValue:dt,onChange:mt,valueManager:at}),Et=reactExports.useMemo(()=>getSectionsBoundaries(et,St),[et,St]),$t=reactExports.useCallback((en,sn=null)=>st.getSectionsFromValue(et,en,sn,ot,Kt=>splitFormatIntoSections(et,St,nt,gt,Kt,yt,xt,ot)),[st,gt,nt,ot,xt,et,yt,St]),Dt=reactExports.useMemo(()=>st.getValueStrFromSections($t(at.emptyValue),ot),[st,$t,at.emptyValue,ot]),[jt,Pt]=reactExports.useState(()=>{const en=$t(Tt),sn={sections:en,value:Tt,referenceValue:at.emptyValue,tempValueStrAndroid:null},Kt=getSectionTypeGranularity(en),rn=at.getInitialReferenceValue({referenceDate:pt,value:Tt,utils:et,props:ut,granularity:Kt,timezone:St});return _extends$u({},sn,{referenceValue:rn})}),[Ct,wt]=useControlled({controlled:bt,default:null,name:"useField",state:"selectedSectionIndexes"}),It=en=>{wt(en),vt==null||vt(en),Pt(sn=>_extends$u({},sn,{selectedSectionQuery:null}))},Ot=reactExports.useMemo(()=>{if(Ct==null)return null;if(Ct==="all")return{startIndex:0,endIndex:jt.sections.length-1,shouldSelectBoundarySelectors:!0};if(typeof Ct=="number")return{startIndex:Ct,endIndex:Ct};if(typeof Ct=="string"){const en=jt.sections.findIndex(sn=>sn.type===Ct);return{startIndex:en,endIndex:en}}return Ct},[Ct,jt.sections]),Wt=({value:en,referenceValue:sn,sections:Kt})=>{Pt(nn=>_extends$u({},nn,{sections:Kt,value:en,referenceValue:sn,tempValueStrAndroid:null}));const rn={validationError:ct({adapter:rt,value:en,props:_extends$u({},ut,{value:en,timezone:St})})};At(en,rn)},zt=(en,sn)=>{const Kt=[...jt.sections];return Kt[en]=_extends$u({},Kt[en],{value:sn,modified:!0}),addPositionPropertiesToSections(Kt,ot)},Ft=()=>{at.areValuesEqual(et,jt.value,at.emptyValue)||Wt({value:at.emptyValue,referenceValue:jt.referenceValue,sections:$t(at.emptyValue)})},Nt=()=>{if(Ot==null)return;const en=jt.sections[Ot.startIndex];if(en.value==="")return;const sn=st.getActiveDateManager(et,jt,en),rn=sn.getSections(jt.sections).filter(an=>an.value!=="").length===1,nn=zt(Ot.startIndex,""),hn=rn?null:et.date(new Date("")),vn=sn.getNewValuesFromNewActiveDate(hn);(hn!=null&&!et.isValid(hn))!=(sn.date!=null&&!et.isValid(sn.date))?Wt(_extends$u({},vn,{sections:nn})):Pt(an=>_extends$u({},an,vn,{sections:nn,tempValueStrAndroid:null}))},Ut=en=>{const sn=(nn,hn)=>{const vn=et.parse(nn,gt);if(vn==null||!et.isValid(vn))return null;const an=splitFormatIntoSections(et,St,nt,gt,vn,yt,xt,ot);return mergeDateIntoReferenceDate(et,St,vn,an,hn,!1)},Kt=st.parseValueStr(en,jt.referenceValue,sn),rn=st.updateReferenceValue(et,Kt,jt.referenceValue);Wt({value:Kt,referenceValue:rn,sections:$t(Kt,jt.sections)})},Mt=({activeSection:en,newSectionValue:sn,shouldGoToNextSection:Kt})=>{Kt&&Ot&&Ot.startIndex_extends$u({},_n,an,{sections:nn,tempValueStrAndroid:null}))},Ht=en=>Pt(sn=>_extends$u({},sn,{tempValueStrAndroid:en}));return reactExports.useEffect(()=>{const en=$t(jt.value);Pt(sn=>_extends$u({},sn,{sections:en}))},[gt,et.locale]),reactExports.useEffect(()=>{let en=!1;at.areValuesEqual(et,jt.value,Tt)?en=at.getTimezone(et,jt.value)!==at.getTimezone(et,Tt):en=!0,en&&Pt(sn=>_extends$u({},sn,{value:Tt,referenceValue:st.updateReferenceValue(et,Tt,sn.referenceValue),sections:$t(Tt)}))},[Tt]),{state:jt,selectedSectionIndexes:Ot,setSelectedSections:It,clearValue:Ft,clearActiveSection:Nt,updateSectionValue:Mt,updateValueFromValueStr:Ut,setTempAndroidValueStr:Ht,sectionsValueBoundaries:Et,placeholder:Dt,timezone:St}},QUERY_LIFE_DURATION_MS=5e3,isQueryResponseWithoutValue=tt=>tt.saveQuery!=null,useFieldCharacterEditing=({sections:tt,updateSectionValue:et,sectionsValueBoundaries:nt,setTempAndroidValueStr:rt,timezone:it})=>{const ot=useUtils(),[at,st]=reactExports.useState(null),lt=useEventCallback(()=>st(null));reactExports.useEffect(()=>{var pt;at!=null&&((pt=tt[at.sectionIndex])==null?void 0:pt.type)!==at.sectionType&<()},[tt,at,lt]),reactExports.useEffect(()=>{if(at!=null){const pt=setTimeout(()=>lt(),QUERY_LIFE_DURATION_MS);return()=>{window.clearTimeout(pt)}}return()=>{}},[at,lt]);const ct=({keyPressed:pt,sectionIndex:mt},gt,yt)=>{const bt=pt.toLowerCase(),vt=tt[mt];if(at!=null&&(!yt||yt(at.value))&&at.sectionIndex===mt){const kt=`${at.value}${bt}`,St=gt(kt,vt);if(!isQueryResponseWithoutValue(St))return st({sectionIndex:mt,value:kt,sectionType:vt.type}),St}const xt=gt(bt,vt);return isQueryResponseWithoutValue(xt)&&!xt.saveQuery?(lt(),null):(st({sectionIndex:mt,value:bt,sectionType:vt.type}),isQueryResponseWithoutValue(xt)?null:xt)},ut=pt=>{const mt=(bt,vt,xt)=>{const kt=vt.filter(St=>St.toLowerCase().startsWith(xt));return kt.length===0?{saveQuery:!1}:{sectionValue:kt[0],shouldGoToNextSection:kt.length===1}},gt=(bt,vt,xt,kt)=>{const St=Tt=>getLetterEditingOptions(ot,it,vt.type,Tt);if(vt.contentType==="letter")return mt(vt.format,St(vt.format),bt);if(xt&&kt!=null&&getDateSectionConfigFromFormatToken(ot,xt).contentType==="letter"){const Tt=St(xt),At=mt(xt,Tt,bt);return isQueryResponseWithoutValue(At)?{saveQuery:!1}:_extends$u({},At,{sectionValue:kt(At.sectionValue,Tt)})}return{saveQuery:!1}};return ct(pt,(bt,vt)=>{switch(vt.type){case"month":{const xt=kt=>changeSectionValueFormat(ot,kt,ot.formats.month,vt.format);return gt(bt,vt,ot.formats.month,xt)}case"weekDay":{const xt=(kt,St)=>St.indexOf(kt).toString();return gt(bt,vt,ot.formats.weekday,xt)}case"meridiem":return gt(bt,vt);default:return{saveQuery:!1}}})},ht=pt=>{const mt=(yt,bt)=>{const vt=+`${yt}`,xt=nt[bt.type]({currentDate:null,format:bt.format,contentType:bt.contentType});if(vt>xt.maximum)return{saveQuery:!1};if(vtxt.maximum||yt.length===xt.maximum.toString().length;return{sectionValue:cleanDigitSectionValue(ot,it,vt,xt,bt),shouldGoToNextSection:kt}};return ct(pt,(yt,bt)=>{if(bt.contentType==="digit"||bt.contentType==="digit-with-letter")return mt(yt,bt);if(bt.type==="month"){const vt=doesSectionFormatHaveLeadingZeros(ot,it,"digit","month","MM"),xt=mt(yt,{type:bt.type,format:"MM",hasLeadingZerosInFormat:vt,hasLeadingZerosInInput:!0,contentType:"digit",maxLength:2});if(isQueryResponseWithoutValue(xt))return xt;const kt=changeSectionValueFormat(ot,xt.sectionValue,"MM",bt.format);return _extends$u({},xt,{sectionValue:kt})}if(bt.type==="weekDay"){const vt=mt(yt,bt);if(isQueryResponseWithoutValue(vt))return vt;const xt=getDaysInWeekStr(ot,it,bt.format)[Number(vt.sectionValue)-1];return _extends$u({},vt,{sectionValue:xt})}return{saveQuery:!1}},yt=>!Number.isNaN(Number(yt)))};return{applyCharacterEditing:useEventCallback(pt=>{const mt=tt[pt.sectionIndex],yt=!Number.isNaN(Number(pt.keyPressed))?ht(pt):ut(pt);yt==null?rt(null):et({activeSection:mt,newSectionValue:yt.sectionValue,shouldGoToNextSection:yt.shouldGoToNextSection})}),resetCharacterQuery:lt}};function arrayIncludes$2(tt,et){return Array.isArray(et)?et.every(nt=>tt.indexOf(nt)!==-1):tt.indexOf(et)!==-1}const onSpaceOrEnter=(tt,et)=>nt=>{(nt.key==="Enter"||nt.key===" ")&&(tt(nt),nt.preventDefault(),nt.stopPropagation()),et&&et(nt)},getActiveElement=(tt=document)=>{const et=tt.activeElement;return et?et.shadowRoot?getActiveElement(et.shadowRoot):et:null},DEFAULT_DESKTOP_MODE_MEDIA_QUERY="@media (pointer: fine)",_excluded$B=["onClick","onKeyDown","onFocus","onBlur","onMouseUp","onPaste","error","clearable","onClear","disabled"],useField=tt=>{const et=useUtils(),{state:nt,selectedSectionIndexes:rt,setSelectedSections:it,clearValue:ot,clearActiveSection:at,updateSectionValue:st,updateValueFromValueStr:lt,setTempAndroidValueStr:ct,sectionsValueBoundaries:ut,placeholder:ht,timezone:dt}=useFieldState(tt),{inputRef:pt,internalProps:mt,internalProps:{readOnly:gt=!1,unstableFieldRef:yt,minutesStep:bt},forwardedProps:{onClick:vt,onKeyDown:xt,onFocus:kt,onBlur:St,onMouseUp:Tt,onPaste:At,error:Et,clearable:$t,onClear:Dt,disabled:jt},fieldValueManager:Pt,valueManager:Ct,validator:wt}=tt,It=_objectWithoutPropertiesLoose$m(tt.forwardedProps,_excluded$B),{applyCharacterEditing:Ot,resetCharacterQuery:Wt}=useFieldCharacterEditing({sections:nt.sections,updateSectionValue:st,sectionsValueBoundaries:ut,setTempAndroidValueStr:ct,timezone:dt}),zt=reactExports.useRef(null),Ft=useForkRef(pt,zt),Nt=reactExports.useRef(void 0),Mt=useTheme().direction==="rtl",Ht=reactExports.useMemo(()=>getSectionOrder(nt.sections,Mt),[nt.sections,Mt]),en=()=>{var In;if(gt){it(null);return}const An=(In=zt.current.selectionStart)!=null?In:0;let wn;An<=nt.sections[0].startInInput||An>=nt.sections[nt.sections.length-1].endInInput?wn=1:wn=nt.sections.findIndex(pn=>pn.startInInput-pn.startSeparator.length>An);const fn=wn===-1?nt.sections.length-1:wn-1;it(fn)},sn=useEventCallback((In,...An)=>{In.isDefaultPrevented()||(vt==null||vt(In,...An),en())}),Kt=useEventCallback(In=>{Tt==null||Tt(In),In.preventDefault()}),rn=useEventCallback((...In)=>{kt==null||kt(...In);const An=zt.current;window.clearTimeout(Nt.current),Nt.current=setTimeout(()=>{!An||An!==zt.current||rt!=null||gt||(An.value.length&&Number(An.selectionEnd)-Number(An.selectionStart)===An.value.length?it("all"):en())})}),nn=useEventCallback((...In)=>{St==null||St(...In),it(null)}),hn=useEventCallback(In=>{if(At==null||At(In),gt){In.preventDefault();return}const An=In.clipboardData.getData("text");if(rt&&rt.startIndex===rt.endIndex){const wn=nt.sections[rt.startIndex],fn=/^[a-zA-Z]+$/.test(An),pn=/^[0-9]+$/.test(An),kn=/^(([a-zA-Z]+)|)([0-9]+)(([a-zA-Z]+)|)$/.test(An);if(wn.contentType==="letter"&&fn||wn.contentType==="digit"&&pn||wn.contentType==="digit-with-letter"&&kn)return;if(fn||pn){In.preventDefault();return}}In.preventDefault(),Wt(),lt(An)}),vn=useEventCallback(In=>{if(gt)return;const An=In.target.value,wn=In.nativeEvent.data,fn=wn&&wn.length>1,pn=fn?wn:An,kn=cleanString(pn);if(rt==null||fn){lt(fn?wn:kn);return}let Dn;if(rt.startIndex===0&&rt.endIndex===nt.sections.length-1&&kn.length===1)Dn=kn;else{const un=cleanString(Pt.getValueStrFromSections(nt.sections,Mt));let Zt=-1,Xt=-1;for(let On=0;OnSn.end)return;const jn=kn.length-un.length+Sn.end-cleanString(Sn.endSeparator||"").length;Dn=kn.slice(Sn.start+cleanString(Sn.startSeparator||"").length,jn)}if(isAndroid()&&Dn.length===0){ct(pn);return}Ot({keyPressed:Dn,sectionIndex:rt.startIndex})}),an=useEventCallback(In=>{switch(xt==null||xt(In),!0){case(In.key==="a"&&(In.ctrlKey||In.metaKey)):{In.preventDefault(),it("all");break}case In.key==="ArrowRight":{if(In.preventDefault(),rt==null)it(Ht.startIndex);else if(rt.startIndex!==rt.endIndex)it(rt.endIndex);else{const An=Ht.neighbors[rt.startIndex].rightIndex;An!==null&&it(An)}break}case In.key==="ArrowLeft":{if(In.preventDefault(),rt==null)it(Ht.endIndex);else if(rt.startIndex!==rt.endIndex)it(rt.startIndex);else{const An=Ht.neighbors[rt.startIndex].leftIndex;An!==null&&it(An)}break}case["Backspace","Delete"].includes(In.key):{if(In.preventDefault(),gt)break;rt==null||rt.startIndex===0&&rt.endIndex===nt.sections.length-1?ot():at(),Wt();break}case["ArrowUp","ArrowDown","Home","End","PageUp","PageDown"].includes(In.key):{if(In.preventDefault(),gt||rt==null)break;const An=nt.sections[rt.startIndex],wn=Pt.getActiveDateManager(et,nt,An),fn=adjustSectionValue(et,dt,An,In.key,ut,wn.date,{minutesStep:bt});st({activeSection:An,newSectionValue:fn,shouldGoToNextSection:!1});break}}});useEnhancedEffect$1(()=>{if(!zt.current)return;if(rt==null){zt.current.scrollLeft&&(zt.current.scrollLeft=0);return}const In=nt.sections[rt.startIndex],An=nt.sections[rt.endIndex];let wn=In.startInInput,fn=An.endInInput;if(rt.shouldSelectBoundarySelectors&&(wn-=In.startSeparator.length,fn+=An.endSeparator.length),wn!==zt.current.selectionStart||fn!==zt.current.selectionEnd){const pn=zt.current.scrollTop;zt.current===getActiveElement(document)&&zt.current.setSelectionRange(wn,fn),zt.current.scrollTop=pn}});const Qt=useValidation(_extends$u({},mt,{value:nt.value,timezone:dt}),wt,Ct.isSameError,Ct.defaultErrorState),_n=reactExports.useMemo(()=>Et!==void 0?Et:Ct.hasError(Qt),[Ct,Qt,Et]);reactExports.useEffect(()=>{!_n&&!rt&&Wt()},[nt.referenceValue,rt,_n]),reactExports.useEffect(()=>(zt.current&&zt.current===document.activeElement&&it("all"),()=>window.clearTimeout(Nt.current)),[]),reactExports.useEffect(()=>{nt.tempValueStrAndroid!=null&&rt!=null&&(Wt(),at())},[nt.tempValueStrAndroid]);const Pn=reactExports.useMemo(()=>{var In;return(In=nt.tempValueStrAndroid)!=null?In:Pt.getValueStrFromSections(nt.sections,Mt)},[nt.sections,Pt,nt.tempValueStrAndroid,Mt]),$n=reactExports.useMemo(()=>rt==null||nt.sections[rt.startIndex].contentType==="letter"?"text":"numeric",[rt,nt.sections]),Nn=zt.current&&zt.current===getActiveElement(document),Tn=Ct.areValuesEqual(et,nt.value,Ct.emptyValue),cn=!Nn&&Tn;reactExports.useImperativeHandle(yt,()=>({getSections:()=>nt.sections,getActiveSectionIndex:()=>{var In,An;const wn=(In=zt.current.selectionStart)!=null?In:0,fn=(An=zt.current.selectionEnd)!=null?An:0;if(wn===0&&fn===0)return null;const pn=wn<=nt.sections[0].startInInput?1:nt.sections.findIndex(kn=>kn.startInInput-kn.startSeparator.length>wn);return pn===-1?nt.sections.length-1:pn-1},setSelectedSections:In=>it(In)}));const mn=useEventCallback((In,...An)=>{var wn;In.preventDefault(),Dt==null||Dt(In,...An),ot(),zt==null||(wn=zt.current)==null||wn.focus(),it(0)});return _extends$u({placeholder:ht,autoComplete:"off",disabled:!!jt},It,{value:cn?"":Pn,inputMode:$n,readOnly:gt,onClick:sn,onFocus:rn,onBlur:nn,onPaste:hn,onChange:vn,onKeyDown:an,onMouseUp:Kt,onClear:mn,error:_n,ref:Ft,clearable:!!($t&&!Tn&&!gt&&!jt)})},validateDate=({props:tt,value:et,adapter:nt})=>{if(et===null)return null;const{shouldDisableDate:rt,shouldDisableMonth:it,shouldDisableYear:ot,disablePast:at,disableFuture:st,timezone:lt}=tt,ct=nt.utils.dateWithTimezone(void 0,lt),ut=applyDefaultDate(nt.utils,tt.minDate,nt.defaultDates.minDate),ht=applyDefaultDate(nt.utils,tt.maxDate,nt.defaultDates.maxDate);switch(!0){case!nt.utils.isValid(et):return"invalidDate";case!!(rt&&rt(et)):return"shouldDisableDate";case!!(it&&it(et)):return"shouldDisableMonth";case!!(ot&&ot(et)):return"shouldDisableYear";case!!(st&&nt.utils.isAfterDay(et,ct)):return"disableFuture";case!!(at&&nt.utils.isBeforeDay(et,ct)):return"disablePast";case!!(ut&&nt.utils.isBeforeDay(et,ut)):return"minDate";case!!(ht&&nt.utils.isAfterDay(et,ht)):return"maxDate";default:return null}},DATE_VALIDATION_PROP_NAMES=["disablePast","disableFuture","minDate","maxDate","shouldDisableDate","shouldDisableMonth","shouldDisableYear"],TIME_VALIDATION_PROP_NAMES=["disablePast","disableFuture","minTime","maxTime","shouldDisableClock","shouldDisableTime","minutesStep","ampm","disableIgnoringDatePartForTimeValidation"],DATE_TIME_VALIDATION_PROP_NAMES=["minDateTime","maxDateTime"],VALIDATION_PROP_NAMES=[...DATE_VALIDATION_PROP_NAMES,...TIME_VALIDATION_PROP_NAMES,...DATE_TIME_VALIDATION_PROP_NAMES],extractValidationProps=tt=>VALIDATION_PROP_NAMES.reduce((et,nt)=>(tt.hasOwnProperty(nt)&&(et[nt]=tt[nt]),et),{}),SHARED_FIELD_INTERNAL_PROP_NAMES=["value","defaultValue","referenceDate","format","formatDensity","onChange","timezone","readOnly","onError","shouldRespectLeadingZeros","selectedSections","onSelectedSectionsChange","unstableFieldRef"],splitFieldInternalAndForwardedProps=(tt,et)=>{const nt=_extends$u({},tt),rt={},it=ot=>{nt.hasOwnProperty(ot)&&(rt[ot]=nt[ot],delete nt[ot])};return SHARED_FIELD_INTERNAL_PROP_NAMES.forEach(it),et==="date"?DATE_VALIDATION_PROP_NAMES.forEach(it):et==="time"?TIME_VALIDATION_PROP_NAMES.forEach(it):et==="date-time"&&(DATE_VALIDATION_PROP_NAMES.forEach(it),TIME_VALIDATION_PROP_NAMES.forEach(it),DATE_TIME_VALIDATION_PROP_NAMES.forEach(it)),{forwardedProps:nt,internalProps:rt}},useDefaultizedDateField=tt=>{var et,nt,rt;const it=useUtils(),ot=useDefaultDates();return _extends$u({},tt,{disablePast:(et=tt.disablePast)!=null?et:!1,disableFuture:(nt=tt.disableFuture)!=null?nt:!1,format:(rt=tt.format)!=null?rt:it.formats.keyboardDate,minDate:applyDefaultDate(it,tt.minDate,ot.minDate),maxDate:applyDefaultDate(it,tt.maxDate,ot.maxDate)})},useDateField=({props:tt,inputRef:et})=>{const nt=useDefaultizedDateField(tt),{forwardedProps:rt,internalProps:it}=splitFieldInternalAndForwardedProps(nt,"date");return useField({inputRef:et,forwardedProps:rt,internalProps:it,valueManager:singleItemValueManager,fieldValueManager:singleItemFieldValueManager,validator:validateDate,valueType:"date"})},PickersModalDialogRoot=styled$1(MuiDialog)({[`& .${dialogClasses$1.container}`]:{outline:0},[`& .${dialogClasses$1.paper}`]:{outline:0,minWidth:DIALOG_WIDTH}}),PickersModalDialogContent=styled$1(DialogContent$1)({"&:first-of-type":{padding:0}});function PickersModalDialog(tt){var et,nt;const{children:rt,onDismiss:it,open:ot,slots:at,slotProps:st}=tt,lt=(et=at==null?void 0:at.dialog)!=null?et:PickersModalDialogRoot,ct=(nt=at==null?void 0:at.mobileTransition)!=null?nt:Fade$1;return jsxRuntimeExports.jsx(lt,_extends$u({open:ot,onClose:it},st==null?void 0:st.dialog,{TransitionComponent:ct,TransitionProps:st==null?void 0:st.mobileTransition,PaperComponent:at==null?void 0:at.mobilePaper,PaperProps:st==null?void 0:st.mobilePaper,children:jsxRuntimeExports.jsx(PickersModalDialogContent,{children:rt})}))}function getPickersPopperUtilityClass(tt){return generateUtilityClass("MuiPickersPopper",tt)}generateUtilityClasses("MuiPickersPopper",["root","paper"]);const PREFERS_REDUCED_MOTION="@media (prefers-reduced-motion: reduce)",mobileVersionMatches=typeof navigator<"u"&&navigator.userAgent.match(/android\s(\d+)|OS\s(\d+)/i),androidVersion=mobileVersionMatches&&mobileVersionMatches[1]?parseInt(mobileVersionMatches[1],10):null,iOSVersion=mobileVersionMatches&&mobileVersionMatches[2]?parseInt(mobileVersionMatches[2],10):null,slowAnimationDevices=androidVersion&&androidVersion<10||iOSVersion&&iOSVersion<13||!1,useDefaultReduceAnimations=()=>useMediaQuery(PREFERS_REDUCED_MOTION,{defaultMatches:!1})||slowAnimationDevices,_excluded$A=["PaperComponent","popperPlacement","ownerState","children","paperSlotProps","paperClasses","onPaperClick","onPaperTouchStart"],useUtilityClasses$d=tt=>{const{classes:et}=tt;return composeClasses({root:["root"],paper:["paper"]},getPickersPopperUtilityClass,et)},PickersPopperRoot=styled$1(MuiPopper,{name:"MuiPickersPopper",slot:"Root",overridesResolver:(tt,et)=>et.root})(({theme:tt})=>({zIndex:tt.zIndex.modal})),PickersPopperPaper=styled$1(Paper$1,{name:"MuiPickersPopper",slot:"Paper",overridesResolver:(tt,et)=>et.paper})(({ownerState:tt})=>_extends$u({outline:0,transformOrigin:"top center"},tt.placement.includes("top")&&{transformOrigin:"bottom center"}));function clickedRootScrollbar(tt,et){return et.documentElement.clientWidth{if(!tt)return;function lt(){ot.current=!0}return document.addEventListener("mousedown",lt,!0),document.addEventListener("touchstart",lt,!0),()=>{document.removeEventListener("mousedown",lt,!0),document.removeEventListener("touchstart",lt,!0),ot.current=!1}},[tt]);const at=useEventCallback(lt=>{if(!ot.current)return;const ct=rt.current;rt.current=!1;const ut=ownerDocument(it.current);if(!it.current||"clientX"in lt&&clickedRootScrollbar(lt,ut))return;if(nt.current){nt.current=!1;return}let ht;lt.composedPath?ht=lt.composedPath().indexOf(it.current)>-1:ht=!ut.documentElement.contains(lt.target)||it.current.contains(lt.target),!ht&&!ct&&et(lt)}),st=()=>{rt.current=!0};return reactExports.useEffect(()=>{if(tt){const lt=ownerDocument(it.current),ct=()=>{nt.current=!0};return lt.addEventListener("touchstart",at),lt.addEventListener("touchmove",ct),()=>{lt.removeEventListener("touchstart",at),lt.removeEventListener("touchmove",ct)}}},[tt,at]),reactExports.useEffect(()=>{if(tt){const lt=ownerDocument(it.current);return lt.addEventListener("click",at),()=>{lt.removeEventListener("click",at),rt.current=!1}}},[tt,at]),[it,st,st]}const PickersPopperPaperWrapper=reactExports.forwardRef((tt,et)=>{const{PaperComponent:nt,popperPlacement:rt,ownerState:it,children:ot,paperSlotProps:at,paperClasses:st,onPaperClick:lt,onPaperTouchStart:ct}=tt,ut=_objectWithoutPropertiesLoose$m(tt,_excluded$A),ht=_extends$u({},it,{placement:rt}),dt=useSlotProps({elementType:nt,externalSlotProps:at,additionalProps:{tabIndex:-1,elevation:8,ref:et},className:st,ownerState:ht});return jsxRuntimeExports.jsx(nt,_extends$u({},ut,dt,{onClick:pt=>{var mt;lt(pt),(mt=dt.onClick)==null||mt.call(dt,pt)},onTouchStart:pt=>{var mt;ct(pt),(mt=dt.onTouchStart)==null||mt.call(dt,pt)},ownerState:ht,children:ot}))});function PickersPopper(tt){var et,nt,rt,it;const ot=useThemeProps({props:tt,name:"MuiPickersPopper"}),{anchorEl:at,children:st,containerRef:lt=null,shouldRestoreFocus:ct,onBlur:ut,onDismiss:ht,open:dt,role:pt,placement:mt,slots:gt,slotProps:yt,reduceAnimations:bt}=ot;reactExports.useEffect(()=>{function Ft(Nt){dt&&(Nt.key==="Escape"||Nt.key==="Esc")&&ht()}return document.addEventListener("keydown",Ft),()=>{document.removeEventListener("keydown",Ft)}},[ht,dt]);const vt=reactExports.useRef(null);reactExports.useEffect(()=>{pt==="tooltip"||ct&&!ct()||(dt?vt.current=getActiveElement(document):vt.current&&vt.current instanceof HTMLElement&&setTimeout(()=>{vt.current instanceof HTMLElement&&vt.current.focus()}))},[dt,pt,ct]);const[xt,kt,St]=useClickAwayListener(dt,ut??ht),Tt=reactExports.useRef(null),At=useForkRef(Tt,lt),Et=useForkRef(At,xt),$t=ot,Dt=useUtilityClasses$d($t),jt=useDefaultReduceAnimations(),Pt=bt??jt,Ct=Ft=>{Ft.key==="Escape"&&(Ft.stopPropagation(),ht())},wt=((et=gt==null?void 0:gt.desktopTransition)!=null?et:Pt)?Fade$1:Grow$1,It=(nt=gt==null?void 0:gt.desktopTrapFocus)!=null?nt:FocusTrap,Ot=(rt=gt==null?void 0:gt.desktopPaper)!=null?rt:PickersPopperPaper,Wt=(it=gt==null?void 0:gt.popper)!=null?it:PickersPopperRoot,zt=useSlotProps({elementType:Wt,externalSlotProps:yt==null?void 0:yt.popper,additionalProps:{transition:!0,role:pt,open:dt,anchorEl:at,placement:mt,onKeyDown:Ct},className:Dt.root,ownerState:ot});return jsxRuntimeExports.jsx(Wt,_extends$u({},zt,{children:({TransitionProps:Ft,placement:Nt})=>jsxRuntimeExports.jsx(It,_extends$u({open:dt,disableAutoFocus:!0,disableRestoreFocus:!0,disableEnforceFocus:pt==="tooltip",isEnabled:()=>!0},yt==null?void 0:yt.desktopTrapFocus,{children:jsxRuntimeExports.jsx(wt,_extends$u({},Ft,yt==null?void 0:yt.desktopTransition,{children:jsxRuntimeExports.jsx(PickersPopperPaperWrapper,{PaperComponent:Ot,ownerState:$t,popperPlacement:Nt,ref:Et,onPaperClick:kt,onPaperTouchStart:St,paperClasses:Dt.paper,paperSlotProps:yt==null?void 0:yt.desktopPaper,children:st})}))}))}))}function getPickersToolbarUtilityClass(tt){return generateUtilityClass("MuiPickersToolbar",tt)}generateUtilityClasses("MuiPickersToolbar",["root","content"]);const useUtilityClasses$c=tt=>{const{classes:et,isLandscape:nt}=tt;return composeClasses({root:["root"],content:["content"],penIconButton:["penIconButton",nt&&"penIconButtonLandscape"]},getPickersToolbarUtilityClass,et)},PickersToolbarRoot=styled$1("div",{name:"MuiPickersToolbar",slot:"Root",overridesResolver:(tt,et)=>et.root})(({theme:tt,ownerState:et})=>_extends$u({display:"flex",flexDirection:"column",alignItems:"flex-start",justifyContent:"space-between",padding:tt.spacing(2,3)},et.isLandscape&&{height:"auto",maxWidth:160,padding:16,justifyContent:"flex-start",flexWrap:"wrap"})),PickersToolbarContent=styled$1("div",{name:"MuiPickersToolbar",slot:"Content",overridesResolver:(tt,et)=>et.content})(({ownerState:tt})=>{var et;return{display:"flex",flexWrap:"wrap",width:"100%",justifyContent:tt.isLandscape?"flex-start":"space-between",flexDirection:tt.isLandscape?(et=tt.landscapeDirection)!=null?et:"column":"row",flex:1,alignItems:tt.isLandscape?"flex-start":"center"}}),PickersToolbar=reactExports.forwardRef(function(et,nt){const rt=useThemeProps({props:et,name:"MuiPickersToolbar"}),{children:it,className:ot,toolbarTitle:at,hidden:st,titleId:lt}=rt,ct=rt,ut=useUtilityClasses$c(ct);return st?null:jsxRuntimeExports.jsxs(PickersToolbarRoot,{ref:nt,className:clsx(ut.root,ot),ownerState:ct,children:[jsxRuntimeExports.jsx(Typography$1,{color:"text.secondary",variant:"overline",id:lt,children:at}),jsxRuntimeExports.jsx(PickersToolbarContent,{className:ut.content,ownerState:ct,children:it})]})}),useOpenState=({open:tt,onOpen:et,onClose:nt})=>{const rt=reactExports.useRef(typeof tt=="boolean").current,[it,ot]=reactExports.useState(!1);reactExports.useEffect(()=>{if(rt){if(typeof tt!="boolean")throw new Error("You must not mix controlling and uncontrolled mode for `open` prop");ot(tt)}},[rt,tt]);const at=reactExports.useCallback(st=>{rt||ot(st),st&&et&&et(),!st&&nt&&nt()},[rt,et,nt]);return{isOpen:it,setIsOpen:at}},shouldPublishValue=tt=>{const{action:et,hasChanged:nt,dateState:rt,isControlled:it}=tt,ot=!it&&!rt.hasBeenModifiedSinceMount;return et.name==="setValueFromField"?!0:et.name==="setValueFromAction"?ot&&["accept","today","clear"].includes(et.pickerAction)?!0:nt(rt.lastPublishedValue):et.name==="setValueFromView"&&et.selectionState!=="shallow"||et.name==="setValueFromShortcut"?ot?!0:nt(rt.lastPublishedValue):!1},shouldCommitValue=tt=>{const{action:et,hasChanged:nt,dateState:rt,isControlled:it,closeOnSelect:ot}=tt,at=!it&&!rt.hasBeenModifiedSinceMount;return et.name==="setValueFromAction"?at&&["accept","today","clear"].includes(et.pickerAction)?!0:nt(rt.lastCommittedValue):et.name==="setValueFromView"&&et.selectionState==="finish"&&ot?at?!0:nt(rt.lastCommittedValue):et.name==="setValueFromShortcut"?et.changeImportance==="accept"&&nt(rt.lastCommittedValue):!1},shouldClosePicker=tt=>{const{action:et,closeOnSelect:nt}=tt;return et.name==="setValueFromAction"?!0:et.name==="setValueFromView"?et.selectionState==="finish"&&nt:et.name==="setValueFromShortcut"?et.changeImportance==="accept":!1},usePickerValue=({props:tt,valueManager:et,valueType:nt,wrapperVariant:rt,validator:it})=>{const{onAccept:ot,onChange:at,value:st,defaultValue:lt,closeOnSelect:ct=rt==="desktop",selectedSections:ut,onSelectedSectionsChange:ht,timezone:dt}=tt,{current:pt}=reactExports.useRef(lt),{current:mt}=reactExports.useRef(st!==void 0),gt=useUtils(),yt=useLocalizationContext(),[bt,vt]=useControlled({controlled:ut,default:null,name:"usePickerValue",state:"selectedSections"}),{isOpen:xt,setIsOpen:kt}=useOpenState(tt),[St,Tt]=reactExports.useState(()=>{let rn;return st!==void 0?rn=st:pt!==void 0?rn=pt:rn=et.emptyValue,{draft:rn,lastPublishedValue:rn,lastCommittedValue:rn,lastControlledValue:st,hasBeenModifiedSinceMount:!1}}),{timezone:At,handleValueChange:Et}=useValueWithTimezone({timezone:dt,value:st,defaultValue:pt,onChange:at,valueManager:et});useValidation(_extends$u({},tt,{value:St.draft,timezone:At}),it,et.isSameError,et.defaultErrorState);const $t=useEventCallback(rn=>{const nn={action:rn,dateState:St,hasChanged:Qt=>!et.areValuesEqual(gt,rn.value,Qt),isControlled:mt,closeOnSelect:ct},hn=shouldPublishValue(nn),vn=shouldCommitValue(nn),an=shouldClosePicker(nn);if(Tt(Qt=>_extends$u({},Qt,{draft:rn.value,lastPublishedValue:hn?rn.value:Qt.lastPublishedValue,lastCommittedValue:vn?rn.value:Qt.lastCommittedValue,hasBeenModifiedSinceMount:!0})),hn){const _n={validationError:rn.name==="setValueFromField"?rn.context.validationError:it({adapter:yt,value:rn.value,props:_extends$u({},tt,{value:rn.value,timezone:At})})};rn.name==="setValueFromShortcut"&&rn.shortcut!=null&&(_n.shortcut=rn.shortcut),Et(rn.value,_n)}vn&&ot&&ot(rn.value),an&&kt(!1)});if(st!==void 0&&(St.lastControlledValue===void 0||!et.areValuesEqual(gt,St.lastControlledValue,st))){const rn=et.areValuesEqual(gt,St.draft,st);Tt(nn=>_extends$u({},nn,{lastControlledValue:st},rn?{}:{lastCommittedValue:st,lastPublishedValue:st,draft:st,hasBeenModifiedSinceMount:!0}))}const Dt=useEventCallback(()=>{$t({value:et.emptyValue,name:"setValueFromAction",pickerAction:"clear"})}),jt=useEventCallback(()=>{$t({value:St.lastPublishedValue,name:"setValueFromAction",pickerAction:"accept"})}),Pt=useEventCallback(()=>{$t({value:St.lastPublishedValue,name:"setValueFromAction",pickerAction:"dismiss"})}),Ct=useEventCallback(()=>{$t({value:St.lastCommittedValue,name:"setValueFromAction",pickerAction:"cancel"})}),wt=useEventCallback(()=>{$t({value:et.getTodayValue(gt,At,nt),name:"setValueFromAction",pickerAction:"today"})}),It=useEventCallback(()=>kt(!0)),Ot=useEventCallback(()=>kt(!1)),Wt=useEventCallback((rn,nn="partial")=>$t({name:"setValueFromView",value:rn,selectionState:nn})),zt=useEventCallback((rn,nn,hn)=>$t({name:"setValueFromShortcut",value:rn,changeImportance:nn??"accept",shortcut:hn})),Ft=useEventCallback((rn,nn)=>$t({name:"setValueFromField",value:rn,context:nn})),Nt=useEventCallback(rn=>{vt(rn),ht==null||ht(rn)}),Ut={onClear:Dt,onAccept:jt,onDismiss:Pt,onCancel:Ct,onSetToday:wt,onOpen:It,onClose:Ot},Mt={value:St.draft,onChange:Ft,selectedSections:bt,onSelectedSectionsChange:Nt},Ht=reactExports.useMemo(()=>et.cleanValue(gt,St.draft),[gt,et,St.draft]),en={value:Ht,onChange:Wt,onClose:Ot,open:xt,onSelectedSectionsChange:Nt},Kt=_extends$u({},Ut,{value:Ht,onChange:Wt,onSelectShortcut:zt,isValid:rn=>{const nn=it({adapter:yt,value:rn,props:_extends$u({},tt,{value:rn,timezone:At})});return!et.hasError(nn)}});return{open:xt,fieldProps:Mt,viewProps:en,layoutProps:Kt,actions:Ut}},_excluded$z=["className","sx"],usePickerViews=({props:tt,propsFromPickerValue:et,additionalViewProps:nt,inputRef:rt,autoFocusView:it})=>{const{onChange:ot,open:at,onSelectedSectionsChange:st,onClose:lt}=et,{views:ct,openTo:ut,onViewChange:ht,disableOpenPicker:dt,viewRenderers:pt,timezone:mt}=tt,gt=_objectWithoutPropertiesLoose$m(tt,_excluded$z),{view:yt,setView:bt,defaultView:vt,focusedView:xt,setFocusedView:kt,setValueAndGoToNextView:St}=useViews({view:void 0,views:ct,openTo:ut,onChange:ot,onViewChange:ht,autoFocus:it}),{hasUIView:Tt,viewModeLookup:At}=reactExports.useMemo(()=>ct.reduce((wt,It)=>{let Ot;return dt?Ot="field":pt[It]!=null?Ot="UI":Ot="field",wt.viewModeLookup[It]=Ot,Ot==="UI"&&(wt.hasUIView=!0),wt},{hasUIView:!1,viewModeLookup:{}}),[dt,pt,ct]),Et=reactExports.useMemo(()=>ct.reduce((wt,It)=>pt[It]!=null&&isTimeView(It)?wt+1:wt,0),[pt,ct]),$t=At[yt],Dt=useEventCallback(()=>$t==="UI"),[jt,Pt]=reactExports.useState($t==="UI"?yt:null);return jt!==yt&&At[yt]==="UI"&&Pt(yt),useEnhancedEffect$1(()=>{$t==="field"&&at&&(lt(),setTimeout(()=>{rt==null||rt.current.focus(),st(yt)}))},[yt]),useEnhancedEffect$1(()=>{if(!at)return;let wt=yt;$t==="field"&&jt!=null&&(wt=jt),wt!==vt&&At[wt]==="UI"&&At[vt]==="UI"&&(wt=vt),wt!==yt&&bt(wt),kt(wt,!0)},[at]),{hasUIView:Tt,shouldRestoreFocus:Dt,layoutProps:{views:ct,view:jt,onViewChange:bt},renderCurrentView:()=>{if(jt==null)return null;const wt=pt[jt];return wt==null?null:wt(_extends$u({},gt,nt,et,{views:ct,timezone:mt,onChange:St,view:jt,onViewChange:bt,focusedView:xt,onFocusedViewChange:kt,showViewSwitcher:Et>1,timeViewsCount:Et}))}}};function getOrientation(){return typeof window>"u"?"portrait":window.screen&&window.screen.orientation&&window.screen.orientation.angle?Math.abs(window.screen.orientation.angle)===90?"landscape":"portrait":window.orientation&&Math.abs(Number(window.orientation))===90?"landscape":"portrait"}const useIsLandscape=(tt,et)=>{const[nt,rt]=reactExports.useState(getOrientation);return useEnhancedEffect$1(()=>{const ot=()=>{rt(getOrientation())};return window.addEventListener("orientationchange",ot),()=>{window.removeEventListener("orientationchange",ot)}},[]),arrayIncludes$2(tt,["hours","minutes","seconds"])?!1:(et||nt)==="landscape"},usePickerLayoutProps=({props:tt,propsFromPickerValue:et,propsFromPickerViews:nt,wrapperVariant:rt})=>{const{orientation:it}=tt,ot=useIsLandscape(nt.views,it);return{layoutProps:_extends$u({},nt,et,{isLandscape:ot,wrapperVariant:rt,disabled:tt.disabled,readOnly:tt.readOnly})}},buildWarning=(tt,et="warning")=>{let nt=!1;const rt=Array.isArray(tt)?tt.join(` -`):tt;return()=>{nt||(nt=!0,et==="error"?console.error(rt):console.warn(rt))}};buildWarning(["The `renderInput` prop has been removed in version 6.0 of the Date and Time Pickers.","You can replace it with the `textField` component slot in most cases.","For more information, please have a look at the migration guide (https://mui.com/x/migration/migration-pickers-v5/#input-renderer-required-in-v5)."]);const usePicker=({props:tt,valueManager:et,valueType:nt,wrapperVariant:rt,inputRef:it,additionalViewProps:ot,validator:at,autoFocusView:st})=>{const lt=usePickerValue({props:tt,valueManager:et,valueType:nt,wrapperVariant:rt,validator:at}),ct=usePickerViews({props:tt,inputRef:it,additionalViewProps:ot,autoFocusView:st,propsFromPickerValue:lt.viewProps}),ut=usePickerLayoutProps({props:tt,wrapperVariant:rt,propsFromPickerValue:lt.layoutProps,propsFromPickerViews:ct.layoutProps});return{open:lt.open,actions:lt.actions,fieldProps:lt.fieldProps,renderCurrentView:ct.renderCurrentView,hasUIView:ct.hasUIView,shouldRestoreFocus:ct.shouldRestoreFocus,layoutProps:ut.layoutProps}};function getPickersLayoutUtilityClass(tt){return generateUtilityClass("MuiPickersLayout",tt)}const pickersLayoutClasses=generateUtilityClasses("MuiPickersLayout",["root","landscape","contentWrapper","toolbar","actionBar","shortcuts"]),_excluded$y=["onAccept","onClear","onCancel","onSetToday","actions"];function PickersActionBar(tt){const{onAccept:et,onClear:nt,onCancel:rt,onSetToday:it,actions:ot}=tt,at=_objectWithoutPropertiesLoose$m(tt,_excluded$y),st=useLocaleText();if(ot==null||ot.length===0)return null;const lt=ot==null?void 0:ot.map(ct=>{switch(ct){case"clear":return jsxRuntimeExports.jsx(Button$2,{onClick:nt,children:st.clearButtonLabel},ct);case"cancel":return jsxRuntimeExports.jsx(Button$2,{onClick:rt,children:st.cancelButtonLabel},ct);case"accept":return jsxRuntimeExports.jsx(Button$2,{onClick:et,children:st.okButtonLabel},ct);case"today":return jsxRuntimeExports.jsx(Button$2,{onClick:it,children:st.todayButtonLabel},ct);default:return null}});return jsxRuntimeExports.jsx(DialogActions$1,_extends$u({},at,{children:lt}))}const _excluded$x=["items","changeImportance","isLandscape","onChange","isValid"],_excluded2$a=["getValue"];function PickersShortcuts(tt){const{items:et,changeImportance:nt,onChange:rt,isValid:it}=tt,ot=_objectWithoutPropertiesLoose$m(tt,_excluded$x);if(et==null||et.length===0)return null;const at=et.map(st=>{let{getValue:lt}=st,ct=_objectWithoutPropertiesLoose$m(st,_excluded2$a);const ut=lt({isValid:it});return{label:ct.label,onClick:()=>{rt(ut,nt,ct)},disabled:!it(ut)}});return jsxRuntimeExports.jsx(List$1,_extends$u({dense:!0,sx:[{maxHeight:VIEW_HEIGHT,maxWidth:200,overflow:"auto"},...Array.isArray(ot.sx)?ot.sx:[ot.sx]]},ot,{children:at.map(st=>jsxRuntimeExports.jsx(ListItem$1,{children:jsxRuntimeExports.jsx(Chip$1,_extends$u({},st))},st.label))}))}function toolbarHasView(tt){return tt.view!==null}const useUtilityClasses$b=tt=>{const{classes:et,isLandscape:nt}=tt;return composeClasses({root:["root",nt&&"landscape"],contentWrapper:["contentWrapper"],toolbar:["toolbar"],actionBar:["actionBar"],tabs:["tabs"],landscape:["landscape"],shortcuts:["shortcuts"]},getPickersLayoutUtilityClass,et)},usePickerLayout=tt=>{var et,nt;const{wrapperVariant:rt,onAccept:it,onClear:ot,onCancel:at,onSetToday:st,view:lt,views:ct,onViewChange:ut,value:ht,onChange:dt,onSelectShortcut:pt,isValid:mt,isLandscape:gt,disabled:yt,readOnly:bt,children:vt,components:xt,componentsProps:kt,slots:St,slotProps:Tt}=tt,At=St??uncapitalizeObjectKeys(xt),Et=Tt??kt,$t=useUtilityClasses$b(tt),Dt=(et=At==null?void 0:At.actionBar)!=null?et:PickersActionBar,jt=useSlotProps({elementType:Dt,externalSlotProps:Et==null?void 0:Et.actionBar,additionalProps:{onAccept:it,onClear:ot,onCancel:at,onSetToday:st,actions:rt==="desktop"?[]:["cancel","accept"],className:$t.actionBar},ownerState:_extends$u({},tt,{wrapperVariant:rt})}),Pt=jsxRuntimeExports.jsx(Dt,_extends$u({},jt)),Ct=At==null?void 0:At.toolbar,wt=useSlotProps({elementType:Ct,externalSlotProps:Et==null?void 0:Et.toolbar,additionalProps:{isLandscape:gt,onChange:dt,value:ht,view:lt,onViewChange:ut,views:ct,disabled:yt,readOnly:bt,className:$t.toolbar},ownerState:_extends$u({},tt,{wrapperVariant:rt})}),It=toolbarHasView(wt)&&Ct?jsxRuntimeExports.jsx(Ct,_extends$u({},wt)):null,Ot=vt,Wt=At==null?void 0:At.tabs,zt=lt&&Wt?jsxRuntimeExports.jsx(Wt,_extends$u({view:lt,onViewChange:ut},Et==null?void 0:Et.tabs)):null,Ft=(nt=At==null?void 0:At.shortcuts)!=null?nt:PickersShortcuts,Nt=useSlotProps({elementType:Ft,externalSlotProps:Et==null?void 0:Et.shortcuts,additionalProps:{isValid:mt,isLandscape:gt,onChange:pt,className:$t.shortcuts},ownerState:{isValid:mt,isLandscape:gt,onChange:pt,className:$t.shortcuts,wrapperVariant:rt}}),Ut=lt&&Ft?jsxRuntimeExports.jsx(Ft,_extends$u({},Nt)):null;return{toolbar:It,content:Ot,tabs:zt,actionBar:Pt,shortcuts:Ut}},usePickerLayout$1=usePickerLayout,useUtilityClasses$a=tt=>{const{isLandscape:et,classes:nt}=tt;return composeClasses({root:["root",et&&"landscape"],contentWrapper:["contentWrapper"]},getPickersLayoutUtilityClass,nt)},PickersLayoutRoot=styled$1("div",{name:"MuiPickersLayout",slot:"Root",overridesResolver:(tt,et)=>et.root})(({theme:tt,ownerState:et})=>({display:"grid",gridAutoColumns:"max-content auto max-content",gridAutoRows:"max-content auto max-content",[`& .${pickersLayoutClasses.toolbar}`]:et.isLandscape?{gridColumn:tt.direction==="rtl"?3:1,gridRow:"2 / 3"}:{gridColumn:"2 / 4",gridRow:1},[`.${pickersLayoutClasses.shortcuts}`]:et.isLandscape?{gridColumn:"2 / 4",gridRow:1}:{gridColumn:tt.direction==="rtl"?3:1,gridRow:"2 / 3"},[`& .${pickersLayoutClasses.actionBar}`]:{gridColumn:"1 / 4",gridRow:3}}));PickersLayoutRoot.propTypes={as:PropTypes.elementType,ownerState:PropTypes.shape({isLandscape:PropTypes.bool.isRequired}).isRequired,sx:PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func,PropTypes.object,PropTypes.bool])),PropTypes.func,PropTypes.object])};const PickersLayoutContentWrapper=styled$1("div",{name:"MuiPickersLayout",slot:"ContentWrapper",overridesResolver:(tt,et)=>et.contentWrapper})({gridColumn:2,gridRow:2,display:"flex",flexDirection:"column"}),PickersLayout=function(et){const nt=useThemeProps({props:et,name:"MuiPickersLayout"}),{toolbar:rt,content:it,tabs:ot,actionBar:at,shortcuts:st}=usePickerLayout$1(nt),{sx:lt,className:ct,isLandscape:ut,ref:ht,wrapperVariant:dt}=nt,pt=nt,mt=useUtilityClasses$a(pt);return jsxRuntimeExports.jsxs(PickersLayoutRoot,{ref:ht,sx:lt,className:clsx(ct,mt.root),ownerState:pt,children:[ut?st:rt,ut?rt:st,jsxRuntimeExports.jsx(PickersLayoutContentWrapper,{className:mt.contentWrapper,children:dt==="desktop"?jsxRuntimeExports.jsxs(reactExports.Fragment,{children:[it,ot]}):jsxRuntimeExports.jsxs(reactExports.Fragment,{children:[ot,it]})}),at]})},getPickersSlideTransitionUtilityClass=tt=>generateUtilityClass("MuiPickersSlideTransition",tt),pickersSlideTransitionClasses=generateUtilityClasses("MuiPickersSlideTransition",["root","slideEnter-left","slideEnter-right","slideEnterActive","slideExit","slideExitActiveLeft-left","slideExitActiveLeft-right"]),_excluded$w=["children","className","reduceAnimations","slideDirection","transKey","classes"],useUtilityClasses$9=tt=>{const{classes:et,slideDirection:nt}=tt,rt={root:["root"],exit:["slideExit"],enterActive:["slideEnterActive"],enter:[`slideEnter-${nt}`],exitActive:[`slideExitActiveLeft-${nt}`]};return composeClasses(rt,getPickersSlideTransitionUtilityClass,et)},PickersSlideTransitionRoot=styled$1(TransitionGroup$1,{name:"MuiPickersSlideTransition",slot:"Root",overridesResolver:(tt,et)=>[et.root,{[`.${pickersSlideTransitionClasses["slideEnter-left"]}`]:et["slideEnter-left"]},{[`.${pickersSlideTransitionClasses["slideEnter-right"]}`]:et["slideEnter-right"]},{[`.${pickersSlideTransitionClasses.slideEnterActive}`]:et.slideEnterActive},{[`.${pickersSlideTransitionClasses.slideExit}`]:et.slideExit},{[`.${pickersSlideTransitionClasses["slideExitActiveLeft-left"]}`]:et["slideExitActiveLeft-left"]},{[`.${pickersSlideTransitionClasses["slideExitActiveLeft-right"]}`]:et["slideExitActiveLeft-right"]}]})(({theme:tt})=>{const et=tt.transitions.create("transform",{duration:tt.transitions.duration.complex,easing:"cubic-bezier(0.35, 0.8, 0.4, 1)"});return{display:"block",position:"relative",overflowX:"hidden","& > *":{position:"absolute",top:0,right:0,left:0},[`& .${pickersSlideTransitionClasses["slideEnter-left"]}`]:{willChange:"transform",transform:"translate(100%)",zIndex:1},[`& .${pickersSlideTransitionClasses["slideEnter-right"]}`]:{willChange:"transform",transform:"translate(-100%)",zIndex:1},[`& .${pickersSlideTransitionClasses.slideEnterActive}`]:{transform:"translate(0%)",transition:et},[`& .${pickersSlideTransitionClasses.slideExit}`]:{transform:"translate(0%)"},[`& .${pickersSlideTransitionClasses["slideExitActiveLeft-left"]}`]:{willChange:"transform",transform:"translate(-100%)",transition:et,zIndex:0},[`& .${pickersSlideTransitionClasses["slideExitActiveLeft-right"]}`]:{willChange:"transform",transform:"translate(100%)",transition:et,zIndex:0}}});function PickersSlideTransition(tt){const et=useThemeProps({props:tt,name:"MuiPickersSlideTransition"}),{children:nt,className:rt,reduceAnimations:it,transKey:ot}=et,at=_objectWithoutPropertiesLoose$m(et,_excluded$w),st=useUtilityClasses$9(et),lt=useTheme();if(it)return jsxRuntimeExports.jsx("div",{className:clsx(st.root,rt),children:nt});const ct={exit:st.exit,enterActive:st.enterActive,enter:st.enter,exitActive:st.exitActive};return jsxRuntimeExports.jsx(PickersSlideTransitionRoot,{className:clsx(st.root,rt),childFactory:ut=>reactExports.cloneElement(ut,{classNames:ct}),role:"presentation",children:jsxRuntimeExports.jsx(CSSTransition$1,_extends$u({mountOnEnter:!0,unmountOnExit:!0,timeout:lt.transitions.duration.complex,classNames:ct},at,{children:nt}),ot)})}const useIsDateDisabled=({shouldDisableDate:tt,shouldDisableMonth:et,shouldDisableYear:nt,minDate:rt,maxDate:it,disableFuture:ot,disablePast:at,timezone:st})=>{const lt=useLocalizationContext();return reactExports.useCallback(ct=>validateDate({adapter:lt,value:ct,props:{shouldDisableDate:tt,shouldDisableMonth:et,shouldDisableYear:nt,minDate:rt,maxDate:it,disableFuture:ot,disablePast:at,timezone:st}})!==null,[lt,tt,et,nt,rt,it,ot,at,st])},getDayCalendarUtilityClass=tt=>generateUtilityClass("MuiDayCalendar",tt);generateUtilityClasses("MuiDayCalendar",["root","header","weekDayLabel","loadingContainer","slideTransition","monthContainer","weekContainer","weekNumberLabel","weekNumber"]);const _excluded$v=["parentProps","day","focusableDay","selectedDays","isDateDisabled","currentMonthNumber","isViewFocused"],_excluded2$9=["ownerState"],useUtilityClasses$8=tt=>{const{classes:et}=tt;return composeClasses({root:["root"],header:["header"],weekDayLabel:["weekDayLabel"],loadingContainer:["loadingContainer"],slideTransition:["slideTransition"],monthContainer:["monthContainer"],weekContainer:["weekContainer"],weekNumberLabel:["weekNumberLabel"],weekNumber:["weekNumber"]},getDayCalendarUtilityClass,et)},weeksContainerHeight=(DAY_SIZE+DAY_MARGIN*2)*6,PickersCalendarDayRoot=styled$1("div",{name:"MuiDayCalendar",slot:"Root",overridesResolver:(tt,et)=>et.root})({}),PickersCalendarDayHeader=styled$1("div",{name:"MuiDayCalendar",slot:"Header",overridesResolver:(tt,et)=>et.header})({display:"flex",justifyContent:"center",alignItems:"center"}),PickersCalendarWeekDayLabel=styled$1(Typography$1,{name:"MuiDayCalendar",slot:"WeekDayLabel",overridesResolver:(tt,et)=>et.weekDayLabel})(({theme:tt})=>({width:36,height:40,margin:"0 2px",textAlign:"center",display:"flex",justifyContent:"center",alignItems:"center",color:(tt.vars||tt).palette.text.secondary})),PickersCalendarWeekNumberLabel=styled$1(Typography$1,{name:"MuiDayCalendar",slot:"WeekNumberLabel",overridesResolver:(tt,et)=>et.weekNumberLabel})(({theme:tt})=>({width:36,height:40,margin:"0 2px",textAlign:"center",display:"flex",justifyContent:"center",alignItems:"center",color:tt.palette.text.disabled})),PickersCalendarWeekNumber=styled$1(Typography$1,{name:"MuiDayCalendar",slot:"WeekNumber",overridesResolver:(tt,et)=>et.weekNumber})(({theme:tt})=>_extends$u({},tt.typography.caption,{width:DAY_SIZE,height:DAY_SIZE,padding:0,margin:`0 ${DAY_MARGIN}px`,color:tt.palette.text.disabled,fontSize:"0.75rem",alignItems:"center",justifyContent:"center",display:"inline-flex"})),PickersCalendarLoadingContainer=styled$1("div",{name:"MuiDayCalendar",slot:"LoadingContainer",overridesResolver:(tt,et)=>et.loadingContainer})({display:"flex",justifyContent:"center",alignItems:"center",minHeight:weeksContainerHeight}),PickersCalendarSlideTransition=styled$1(PickersSlideTransition,{name:"MuiDayCalendar",slot:"SlideTransition",overridesResolver:(tt,et)=>et.slideTransition})({minHeight:weeksContainerHeight}),PickersCalendarWeekContainer=styled$1("div",{name:"MuiDayCalendar",slot:"MonthContainer",overridesResolver:(tt,et)=>et.monthContainer})({overflow:"hidden"}),PickersCalendarWeek=styled$1("div",{name:"MuiDayCalendar",slot:"WeekContainer",overridesResolver:(tt,et)=>et.weekContainer})({margin:`${DAY_MARGIN}px 0`,display:"flex",justifyContent:"center"});function WrappedDay(tt){var et,nt,rt;let{parentProps:it,day:ot,focusableDay:at,selectedDays:st,isDateDisabled:lt,currentMonthNumber:ct,isViewFocused:ut}=tt,ht=_objectWithoutPropertiesLoose$m(tt,_excluded$v);const{disabled:dt,disableHighlightToday:pt,isMonthSwitchingAnimating:mt,showDaysOutsideCurrentMonth:gt,components:yt,componentsProps:bt,slots:vt,slotProps:xt,timezone:kt}=it,St=useUtils(),Tt=useNow(kt),At=at!==null&&St.isSameDay(ot,at),Et=st.some(Wt=>St.isSameDay(Wt,ot)),$t=St.isSameDay(ot,Tt),Dt=(et=(nt=vt==null?void 0:vt.day)!=null?nt:yt==null?void 0:yt.Day)!=null?et:PickersDay,jt=useSlotProps({elementType:Dt,externalSlotProps:(rt=xt==null?void 0:xt.day)!=null?rt:bt==null?void 0:bt.day,additionalProps:_extends$u({disableHighlightToday:pt,showDaysOutsideCurrentMonth:gt,role:"gridcell",isAnimating:mt,"data-timestamp":St.toJsDate(ot).valueOf()},ht),ownerState:_extends$u({},it,{day:ot,selected:Et})}),Pt=_objectWithoutPropertiesLoose$m(jt,_excluded2$9),Ct=reactExports.useMemo(()=>dt||lt(ot),[dt,lt,ot]),wt=reactExports.useMemo(()=>St.getMonth(ot)!==ct,[St,ot,ct]),It=reactExports.useMemo(()=>{const Wt=St.startOfMonth(St.setMonth(ot,ct));return gt?St.isSameDay(ot,St.startOfWeek(Wt)):St.isSameDay(ot,Wt)},[ct,ot,gt,St]),Ot=reactExports.useMemo(()=>{const Wt=St.endOfMonth(St.setMonth(ot,ct));return gt?St.isSameDay(ot,St.endOfWeek(Wt)):St.isSameDay(ot,Wt)},[ct,ot,gt,St]);return jsxRuntimeExports.jsx(Dt,_extends$u({},Pt,{day:ot,disabled:Ct,autoFocus:ut&&At,today:$t,outsideCurrentMonth:wt,isFirstVisibleCell:It,isLastVisibleCell:Ot,selected:Et,tabIndex:At?0:-1,"aria-selected":Et,"aria-current":$t?"date":void 0}))}function DayCalendar(tt){const et=useThemeProps({props:tt,name:"MuiDayCalendar"}),{onFocusedDayChange:nt,className:rt,currentMonth:it,selectedDays:ot,focusedDay:at,loading:st,onSelectedDaysChange:lt,onMonthSwitchingAnimationEnd:ct,readOnly:ut,reduceAnimations:ht,renderLoading:dt=()=>jsxRuntimeExports.jsx("span",{children:"..."}),slideDirection:pt,TransitionProps:mt,disablePast:gt,disableFuture:yt,minDate:bt,maxDate:vt,shouldDisableDate:xt,shouldDisableMonth:kt,shouldDisableYear:St,dayOfWeekFormatter:Tt,hasFocus:At,onFocusedViewChange:Et,gridLabelId:$t,displayWeekNumber:Dt,fixedWeekNumber:jt,autoFocus:Pt,timezone:Ct}=et,wt=useNow(Ct),It=useUtils(),Ot=useUtilityClasses$8(et),zt=useTheme().direction==="rtl",Ft=Tt||((cn,mn)=>It.format(mn,"weekdayShort").charAt(0).toUpperCase()),Nt=useIsDateDisabled({shouldDisableDate:xt,shouldDisableMonth:kt,shouldDisableYear:St,minDate:bt,maxDate:vt,disablePast:gt,disableFuture:yt,timezone:Ct}),Ut=useLocaleText(),[Mt,Ht]=useControlled({name:"DayCalendar",state:"hasFocus",controlled:At,default:Pt??!1}),[en,sn]=reactExports.useState(()=>at||wt),Kt=useEventCallback(cn=>{ut||lt(cn)}),rn=cn=>{Nt(cn)||(nt(cn),sn(cn),Et==null||Et(!0),Ht(!0))},nn=useEventCallback((cn,mn)=>{switch(cn.key){case"ArrowUp":rn(It.addDays(mn,-7)),cn.preventDefault();break;case"ArrowDown":rn(It.addDays(mn,7)),cn.preventDefault();break;case"ArrowLeft":{const In=It.addDays(mn,zt?1:-1),An=It.addMonths(mn,zt?1:-1),wn=findClosestEnabledDate({utils:It,date:In,minDate:zt?In:It.startOfMonth(An),maxDate:zt?It.endOfMonth(An):In,isDateDisabled:Nt,timezone:Ct});rn(wn||In),cn.preventDefault();break}case"ArrowRight":{const In=It.addDays(mn,zt?-1:1),An=It.addMonths(mn,zt?-1:1),wn=findClosestEnabledDate({utils:It,date:In,minDate:zt?It.startOfMonth(An):In,maxDate:zt?In:It.endOfMonth(An),isDateDisabled:Nt,timezone:Ct});rn(wn||In),cn.preventDefault();break}case"Home":rn(It.startOfWeek(mn)),cn.preventDefault();break;case"End":rn(It.endOfWeek(mn)),cn.preventDefault();break;case"PageUp":rn(It.addMonths(mn,1)),cn.preventDefault();break;case"PageDown":rn(It.addMonths(mn,-1)),cn.preventDefault();break}}),hn=useEventCallback((cn,mn)=>rn(mn)),vn=useEventCallback((cn,mn)=>{Mt&&It.isSameDay(en,mn)&&(Et==null||Et(!1))}),an=It.getMonth(it),Qt=reactExports.useMemo(()=>ot.filter(cn=>!!cn).map(cn=>It.startOfDay(cn)),[It,ot]),_n=an,Pn=reactExports.useMemo(()=>reactExports.createRef(),[_n]),$n=It.startOfWeek(wt),Nn=reactExports.useMemo(()=>{const cn=It.startOfMonth(it),mn=It.endOfMonth(it);return Nt(en)||It.isAfterDay(en,mn)||It.isBeforeDay(en,cn)?findClosestEnabledDate({utils:It,date:en,minDate:cn,maxDate:mn,disablePast:gt,disableFuture:yt,isDateDisabled:Nt,timezone:Ct}):en},[it,yt,gt,en,Nt,It,Ct]),Tn=reactExports.useMemo(()=>{const cn=It.setTimezone(it,Ct),mn=It.getWeekArray(cn);let In=It.addMonths(cn,1);for(;jt&&mn.length{mn.length{var In;const An=It.format(cn,"weekdayShort").slice(0,2);return jsxRuntimeExports.jsx(PickersCalendarWeekDayLabel,{variant:"caption",role:"columnheader","aria-label":It.format(It.addDays($n,mn),"weekday"),className:Ot.weekDayLabel,children:(In=Ft==null?void 0:Ft(An,cn))!=null?In:An},An+mn.toString())})]}),st?jsxRuntimeExports.jsx(PickersCalendarLoadingContainer,{className:Ot.loadingContainer,children:dt()}):jsxRuntimeExports.jsx(PickersCalendarSlideTransition,_extends$u({transKey:_n,onExited:ct,reduceAnimations:ht,slideDirection:pt,className:clsx(rt,Ot.slideTransition)},mt,{nodeRef:Pn,children:jsxRuntimeExports.jsx(PickersCalendarWeekContainer,{ref:Pn,role:"rowgroup",className:Ot.monthContainer,children:Tn.map((cn,mn)=>jsxRuntimeExports.jsxs(PickersCalendarWeek,{role:"row",className:Ot.weekContainer,"aria-rowindex":mn+1,children:[Dt&&jsxRuntimeExports.jsx(PickersCalendarWeekNumber,{className:Ot.weekNumber,role:"rowheader","aria-label":Ut.calendarWeekNumberAriaLabelText(It.getWeekNumber(cn[0])),children:Ut.calendarWeekNumberText(It.getWeekNumber(cn[0]))}),cn.map((In,An)=>jsxRuntimeExports.jsx(WrappedDay,{parentProps:et,day:In,selectedDays:Qt,focusableDay:Nn,onKeyDown:nn,onFocus:hn,onBlur:vn,onDaySelect:Kt,isDateDisabled:Nt,currentMonthNumber:an,isViewFocused:Mt,"aria-colindex":An+1},In.toString()))]},`week-${cn[0]}`))})}))]})}const createCalendarStateReducer=(tt,et,nt)=>(rt,it)=>{switch(it.type){case"changeMonth":return _extends$u({},rt,{slideDirection:it.direction,currentMonth:it.newMonth,isMonthSwitchingAnimating:!tt});case"finishMonthSwitchingAnimation":return _extends$u({},rt,{isMonthSwitchingAnimating:!1});case"changeFocusedDay":{if(rt.focusedDay!=null&&it.focusedDay!=null&&nt.isSameDay(it.focusedDay,rt.focusedDay))return rt;const ot=it.focusedDay!=null&&!et&&!nt.isSameMonth(rt.currentMonth,it.focusedDay);return _extends$u({},rt,{focusedDay:it.focusedDay,isMonthSwitchingAnimating:ot&&!tt&&!it.withoutMonthSwitchingAnimation,currentMonth:ot?nt.startOfMonth(it.focusedDay):rt.currentMonth,slideDirection:it.focusedDay!=null&&nt.isAfterDay(it.focusedDay,rt.currentMonth)?"left":"right"})}default:throw new Error("missing support")}},useCalendarState=tt=>{const{value:et,referenceDate:nt,defaultCalendarMonth:rt,disableFuture:it,disablePast:ot,disableSwitchToMonthOnDayFocus:at=!1,maxDate:st,minDate:lt,onMonthChange:ct,reduceAnimations:ut,shouldDisableDate:ht,timezone:dt}=tt,pt=useNow(dt),mt=useUtils(),gt=reactExports.useRef(createCalendarStateReducer(!!ut,at,mt)).current,yt=reactExports.useMemo(()=>{let Et=null;return nt?Et=nt:rt&&(Et=mt.startOfMonth(rt)),singleItemValueManager.getInitialReferenceValue({value:et,utils:mt,timezone:dt,props:tt,referenceDate:Et,granularity:SECTION_TYPE_GRANULARITY.day})},[]),[bt,vt]=reactExports.useReducer(gt,{isMonthSwitchingAnimating:!1,focusedDay:et||pt,currentMonth:mt.startOfMonth(yt),slideDirection:"left"}),xt=reactExports.useCallback(Et=>{vt(_extends$u({type:"changeMonth"},Et)),ct&&ct(Et.newMonth)},[ct]),kt=reactExports.useCallback(Et=>{const $t=Et;mt.isSameMonth($t,bt.currentMonth)||xt({newMonth:mt.startOfMonth($t),direction:mt.isAfterDay($t,bt.currentMonth)?"left":"right"})},[bt.currentMonth,xt,mt]),St=useIsDateDisabled({shouldDisableDate:ht,minDate:lt,maxDate:st,disableFuture:it,disablePast:ot,timezone:dt}),Tt=reactExports.useCallback(()=>{vt({type:"finishMonthSwitchingAnimation"})},[]),At=useEventCallback((Et,$t)=>{St(Et)||vt({type:"changeFocusedDay",focusedDay:Et,withoutMonthSwitchingAnimation:$t})});return{referenceDate:yt,calendarState:bt,changeMonth:kt,changeFocusedDay:At,isDateDisabled:St,onMonthSwitchingAnimationEnd:Tt,handleChangeMonth:xt}},_excluded$u=["ownerState"],useClearableField=({clearable:tt,fieldProps:et,InputProps:nt,onClear:rt,slots:it,slotProps:ot,components:at,componentsProps:st})=>{var lt,ct,ut,ht,dt,pt;const mt=useLocaleText(),gt=(lt=(ct=it==null?void 0:it.clearButton)!=null?ct:at==null?void 0:at.ClearButton)!=null?lt:IconButton$2,yt=useSlotProps({elementType:gt,externalSlotProps:(ut=ot==null?void 0:ot.clearButton)!=null?ut:st==null?void 0:st.clearButton,ownerState:{},className:"clearButton",additionalProps:{title:mt.fieldClearLabel}}),bt=_objectWithoutPropertiesLoose$m(yt,_excluded$u),vt=(ht=(dt=it==null?void 0:it.clearIcon)!=null?dt:at==null?void 0:at.ClearIcon)!=null?ht:ClearIcon,xt=useSlotProps({elementType:vt,externalSlotProps:(pt=ot==null?void 0:ot.clearIcon)!=null?pt:st==null?void 0:st.clearIcon,ownerState:{}}),kt=_extends$u({},nt,{endAdornment:tt?jsxRuntimeExports.jsxs(reactExports.Fragment,{children:[jsxRuntimeExports.jsx(MuiInputAdornment,{position:"end",sx:{marginRight:nt!=null&&nt.endAdornment?-1:-1.5},children:jsxRuntimeExports.jsx(gt,_extends$u({},bt,{onClick:rt,children:jsxRuntimeExports.jsx(vt,_extends$u({fontSize:"small"},xt))}))}),nt==null?void 0:nt.endAdornment]}):nt==null?void 0:nt.endAdornment}),St=_extends$u({},et,{sx:[{"& .clearButton":{opacity:1},"@media (pointer: fine)":{"& .clearButton":{opacity:0},"&:hover, &:focus-within":{".clearButton":{opacity:1}}}},...Array.isArray(et.sx)?et.sx:[et.sx]]});return{InputProps:kt,fieldProps:St}},_excluded$t=["components","componentsProps","slots","slotProps","InputProps","inputProps"],_excluded2$8=["inputRef"],_excluded3$2=["ref","onPaste","onKeyDown","inputMode","readOnly","clearable","onClear"],DateField=reactExports.forwardRef(function(et,nt){var rt,it,ot;const at=useThemeProps({props:et,name:"MuiDateField"}),{components:st,componentsProps:lt,slots:ct,slotProps:ut,InputProps:ht,inputProps:dt}=at,pt=_objectWithoutPropertiesLoose$m(at,_excluded$t),mt=at,gt=(rt=(it=ct==null?void 0:ct.textField)!=null?it:st==null?void 0:st.TextField)!=null?rt:MuiTextField,yt=useSlotProps({elementType:gt,externalSlotProps:(ot=ut==null?void 0:ut.textField)!=null?ot:lt==null?void 0:lt.textField,externalForwardedProps:pt,ownerState:mt}),{inputRef:bt}=yt,vt=_objectWithoutPropertiesLoose$m(yt,_excluded2$8);vt.inputProps=_extends$u({},dt,vt.inputProps),vt.InputProps=_extends$u({},ht,vt.InputProps);const xt=useDateField({props:vt,inputRef:bt}),{ref:kt,onPaste:St,onKeyDown:Tt,inputMode:At,readOnly:Et,clearable:$t,onClear:Dt}=xt,jt=_objectWithoutPropertiesLoose$m(xt,_excluded3$2),{InputProps:Pt,fieldProps:Ct}=useClearableField({onClear:Dt,clearable:$t,fieldProps:jt,InputProps:jt.InputProps,slots:ct,slotProps:ut,components:st,componentsProps:lt});return jsxRuntimeExports.jsx(gt,_extends$u({ref:nt},Ct,{InputProps:_extends$u({},Pt,{readOnly:Et}),inputProps:_extends$u({},jt.inputProps,{inputMode:At,onPaste:St,onKeyDown:Tt,ref:kt})}))}),getPickersFadeTransitionGroupUtilityClass=tt=>generateUtilityClass("MuiPickersFadeTransitionGroup",tt);generateUtilityClasses("MuiPickersFadeTransitionGroup",["root"]);const useUtilityClasses$7=tt=>{const{classes:et}=tt;return composeClasses({root:["root"]},getPickersFadeTransitionGroupUtilityClass,et)},PickersFadeTransitionGroupRoot=styled$1(TransitionGroup$1,{name:"MuiPickersFadeTransitionGroup",slot:"Root",overridesResolver:(tt,et)=>et.root})({display:"block",position:"relative"});function PickersFadeTransitionGroup(tt){const et=useThemeProps({props:tt,name:"MuiPickersFadeTransitionGroup"}),{children:nt,className:rt,reduceAnimations:it,transKey:ot}=et,at=useUtilityClasses$7(et),st=useTheme();return it?nt:jsxRuntimeExports.jsx(PickersFadeTransitionGroupRoot,{className:clsx(at.root,rt),children:jsxRuntimeExports.jsx(Fade$1,{appear:!1,mountOnEnter:!0,unmountOnExit:!0,timeout:{appear:st.transitions.duration.enteringScreen,enter:st.transitions.duration.enteringScreen,exit:0},children:nt},ot)})}function getPickersMonthUtilityClass(tt){return generateUtilityClass("MuiPickersMonth",tt)}const pickersMonthClasses=generateUtilityClasses("MuiPickersMonth",["root","monthButton","disabled","selected"]),_excluded$s=["autoFocus","children","disabled","selected","value","tabIndex","onClick","onKeyDown","onFocus","onBlur","aria-current","aria-label","monthsPerRow"],useUtilityClasses$6=tt=>{const{disabled:et,selected:nt,classes:rt}=tt;return composeClasses({root:["root"],monthButton:["monthButton",et&&"disabled",nt&&"selected"]},getPickersMonthUtilityClass,rt)},PickersMonthRoot=styled$1("div",{name:"MuiPickersMonth",slot:"Root",overridesResolver:(tt,et)=>[et.root]})(({ownerState:tt})=>({flexBasis:tt.monthsPerRow===3?"33.3%":"25%",display:"flex",alignItems:"center",justifyContent:"center"})),PickersMonthButton=styled$1("button",{name:"MuiPickersMonth",slot:"MonthButton",overridesResolver:(tt,et)=>[et.monthButton,{[`&.${pickersMonthClasses.disabled}`]:et.disabled},{[`&.${pickersMonthClasses.selected}`]:et.selected}]})(({theme:tt})=>_extends$u({color:"unset",backgroundColor:"transparent",border:0,outline:0},tt.typography.subtitle1,{margin:"8px 0",height:36,width:72,borderRadius:18,cursor:"pointer","&:focus":{backgroundColor:tt.vars?`rgba(${tt.vars.palette.action.activeChannel} / ${tt.vars.palette.action.hoverOpacity})`:alpha$1(tt.palette.action.active,tt.palette.action.hoverOpacity)},"&:hover":{backgroundColor:tt.vars?`rgba(${tt.vars.palette.action.activeChannel} / ${tt.vars.palette.action.hoverOpacity})`:alpha$1(tt.palette.action.active,tt.palette.action.hoverOpacity)},"&:disabled":{cursor:"auto",pointerEvents:"none"},[`&.${pickersMonthClasses.disabled}`]:{color:(tt.vars||tt).palette.text.secondary},[`&.${pickersMonthClasses.selected}`]:{color:(tt.vars||tt).palette.primary.contrastText,backgroundColor:(tt.vars||tt).palette.primary.main,"&:focus, &:hover":{backgroundColor:(tt.vars||tt).palette.primary.dark}}})),PickersMonth=reactExports.memo(function(et){const nt=useThemeProps({props:et,name:"MuiPickersMonth"}),{autoFocus:rt,children:it,disabled:ot,selected:at,value:st,tabIndex:lt,onClick:ct,onKeyDown:ut,onFocus:ht,onBlur:dt,"aria-current":pt,"aria-label":mt}=nt,gt=_objectWithoutPropertiesLoose$m(nt,_excluded$s),yt=reactExports.useRef(null),bt=useUtilityClasses$6(nt);return useEnhancedEffect$1(()=>{if(rt){var vt;(vt=yt.current)==null||vt.focus()}},[rt]),jsxRuntimeExports.jsx(PickersMonthRoot,_extends$u({className:bt.root,ownerState:nt},gt,{children:jsxRuntimeExports.jsx(PickersMonthButton,{ref:yt,disabled:ot,type:"button",role:"radio",tabIndex:ot?-1:lt,"aria-current":pt,"aria-checked":at,"aria-label":mt,onClick:vt=>ct(vt,st),onKeyDown:vt=>ut(vt,st),onFocus:vt=>ht(vt,st),onBlur:vt=>dt(vt,st),className:bt.monthButton,ownerState:nt,children:it})}))});function getMonthCalendarUtilityClass(tt){return generateUtilityClass("MuiMonthCalendar",tt)}generateUtilityClasses("MuiMonthCalendar",["root"]);const _excluded$r=["className","value","defaultValue","referenceDate","disabled","disableFuture","disablePast","maxDate","minDate","onChange","shouldDisableMonth","readOnly","disableHighlightToday","autoFocus","onMonthFocus","hasFocus","onFocusedViewChange","monthsPerRow","timezone","gridLabelId"],useUtilityClasses$5=tt=>{const{classes:et}=tt;return composeClasses({root:["root"]},getMonthCalendarUtilityClass,et)};function useMonthCalendarDefaultizedProps(tt,et){const nt=useUtils(),rt=useDefaultDates(),it=useThemeProps({props:tt,name:et});return _extends$u({disableFuture:!1,disablePast:!1},it,{minDate:applyDefaultDate(nt,it.minDate,rt.minDate),maxDate:applyDefaultDate(nt,it.maxDate,rt.maxDate)})}const MonthCalendarRoot=styled$1("div",{name:"MuiMonthCalendar",slot:"Root",overridesResolver:(tt,et)=>et.root})({display:"flex",flexWrap:"wrap",alignContent:"stretch",padding:"0 4px",width:DIALOG_WIDTH,boxSizing:"border-box"}),MonthCalendar=reactExports.forwardRef(function(et,nt){const rt=useMonthCalendarDefaultizedProps(et,"MuiMonthCalendar"),{className:it,value:ot,defaultValue:at,referenceDate:st,disabled:lt,disableFuture:ct,disablePast:ut,maxDate:ht,minDate:dt,onChange:pt,shouldDisableMonth:mt,readOnly:gt,disableHighlightToday:yt,autoFocus:bt=!1,onMonthFocus:vt,hasFocus:xt,onFocusedViewChange:kt,monthsPerRow:St=3,timezone:Tt,gridLabelId:At}=rt,Et=_objectWithoutPropertiesLoose$m(rt,_excluded$r),{value:$t,handleValueChange:Dt,timezone:jt}=useControlledValueWithTimezone({name:"MonthCalendar",timezone:Tt,value:ot,defaultValue:at,onChange:pt,valueManager:singleItemValueManager}),Pt=useNow(jt),Ct=useTheme$2(),wt=useUtils(),It=reactExports.useMemo(()=>singleItemValueManager.getInitialReferenceValue({value:$t,utils:wt,props:rt,timezone:jt,referenceDate:st,granularity:SECTION_TYPE_GRANULARITY.month}),[]),Ot=rt,Wt=useUtilityClasses$5(Ot),zt=reactExports.useMemo(()=>wt.getMonth(Pt),[wt,Pt]),Ft=reactExports.useMemo(()=>$t!=null?wt.getMonth($t):yt?null:wt.getMonth(It),[$t,wt,yt,It]),[Nt,Ut]=reactExports.useState(()=>Ft||zt),[Mt,Ht]=useControlled({name:"MonthCalendar",state:"hasFocus",controlled:xt,default:bt??!1}),en=useEventCallback(an=>{Ht(an),kt&&kt(an)}),sn=reactExports.useCallback(an=>{const Qt=wt.startOfMonth(ut&&wt.isAfter(Pt,dt)?Pt:dt),_n=wt.startOfMonth(ct&&wt.isBefore(Pt,ht)?Pt:ht),Pn=wt.startOfMonth(an);return wt.isBefore(Pn,Qt)||wt.isAfter(Pn,_n)?!0:mt?mt(Pn):!1},[ct,ut,ht,dt,Pt,mt,wt]),Kt=useEventCallback((an,Qt)=>{if(gt)return;const _n=wt.setMonth($t??It,Qt);Dt(_n)}),rn=useEventCallback(an=>{sn(wt.setMonth($t??It,an))||(Ut(an),en(!0),vt&&vt(an))});reactExports.useEffect(()=>{Ut(an=>Ft!==null&&an!==Ft?Ft:an)},[Ft]);const nn=useEventCallback((an,Qt)=>{switch(an.key){case"ArrowUp":rn((12+Qt-3)%12),an.preventDefault();break;case"ArrowDown":rn((12+Qt+3)%12),an.preventDefault();break;case"ArrowLeft":rn((12+Qt+(Ct.direction==="ltr"?-1:1))%12),an.preventDefault();break;case"ArrowRight":rn((12+Qt+(Ct.direction==="ltr"?1:-1))%12),an.preventDefault();break}}),hn=useEventCallback((an,Qt)=>{rn(Qt)}),vn=useEventCallback((an,Qt)=>{Nt===Qt&&en(!1)});return jsxRuntimeExports.jsx(MonthCalendarRoot,_extends$u({ref:nt,className:clsx(Wt.root,it),ownerState:Ot,role:"radiogroup","aria-labelledby":At},Et,{children:getMonthsInYear(wt,$t??It).map(an=>{const Qt=wt.getMonth(an),_n=wt.format(an,"monthShort"),Pn=wt.format(an,"month"),$n=Qt===Ft,Nn=lt||sn(an);return jsxRuntimeExports.jsx(PickersMonth,{selected:$n,value:Qt,onClick:Kt,onKeyDown:nn,autoFocus:Mt&&Qt===Nt,disabled:Nn,tabIndex:Qt===Nt?0:-1,onFocus:hn,onBlur:vn,"aria-current":zt===Qt?"date":void 0,"aria-label":Pn,monthsPerRow:St,children:_n},_n)})}))});function getPickersYearUtilityClass(tt){return generateUtilityClass("MuiPickersYear",tt)}const pickersYearClasses=generateUtilityClasses("MuiPickersYear",["root","yearButton","selected","disabled"]),_excluded$q=["autoFocus","className","children","disabled","selected","value","tabIndex","onClick","onKeyDown","onFocus","onBlur","aria-current","yearsPerRow"],useUtilityClasses$4=tt=>{const{disabled:et,selected:nt,classes:rt}=tt;return composeClasses({root:["root"],yearButton:["yearButton",et&&"disabled",nt&&"selected"]},getPickersYearUtilityClass,rt)},PickersYearRoot=styled$1("div",{name:"MuiPickersYear",slot:"Root",overridesResolver:(tt,et)=>[et.root]})(({ownerState:tt})=>({flexBasis:tt.yearsPerRow===3?"33.3%":"25%",display:"flex",alignItems:"center",justifyContent:"center"})),PickersYearButton=styled$1("button",{name:"MuiPickersYear",slot:"YearButton",overridesResolver:(tt,et)=>[et.yearButton,{[`&.${pickersYearClasses.disabled}`]:et.disabled},{[`&.${pickersYearClasses.selected}`]:et.selected}]})(({theme:tt})=>_extends$u({color:"unset",backgroundColor:"transparent",border:0,outline:0},tt.typography.subtitle1,{margin:"6px 0",height:36,width:72,borderRadius:18,cursor:"pointer","&:focus":{backgroundColor:tt.vars?`rgba(${tt.vars.palette.action.activeChannel} / ${tt.vars.palette.action.focusOpacity})`:alpha$1(tt.palette.action.active,tt.palette.action.focusOpacity)},"&:hover":{backgroundColor:tt.vars?`rgba(${tt.vars.palette.action.activeChannel} / ${tt.vars.palette.action.hoverOpacity})`:alpha$1(tt.palette.action.active,tt.palette.action.hoverOpacity)},"&:disabled":{cursor:"auto",pointerEvents:"none"},[`&.${pickersYearClasses.disabled}`]:{color:(tt.vars||tt).palette.text.secondary},[`&.${pickersYearClasses.selected}`]:{color:(tt.vars||tt).palette.primary.contrastText,backgroundColor:(tt.vars||tt).palette.primary.main,"&:focus, &:hover":{backgroundColor:(tt.vars||tt).palette.primary.dark}}})),PickersYear=reactExports.memo(function(et){const nt=useThemeProps({props:et,name:"MuiPickersYear"}),{autoFocus:rt,className:it,children:ot,disabled:at,selected:st,value:lt,tabIndex:ct,onClick:ut,onKeyDown:ht,onFocus:dt,onBlur:pt,"aria-current":mt}=nt,gt=_objectWithoutPropertiesLoose$m(nt,_excluded$q),yt=reactExports.useRef(null),bt=useUtilityClasses$4(nt);return reactExports.useEffect(()=>{rt&&yt.current.focus()},[rt]),jsxRuntimeExports.jsx(PickersYearRoot,_extends$u({className:clsx(bt.root,it),ownerState:nt},gt,{children:jsxRuntimeExports.jsx(PickersYearButton,{ref:yt,disabled:at,type:"button",role:"radio",tabIndex:at?-1:ct,"aria-current":mt,"aria-checked":st,onClick:vt=>ut(vt,lt),onKeyDown:vt=>ht(vt,lt),onFocus:vt=>dt(vt,lt),onBlur:vt=>pt(vt,lt),className:bt.yearButton,ownerState:nt,children:ot})}))});function getYearCalendarUtilityClass(tt){return generateUtilityClass("MuiYearCalendar",tt)}generateUtilityClasses("MuiYearCalendar",["root"]);const _excluded$p=["autoFocus","className","value","defaultValue","referenceDate","disabled","disableFuture","disablePast","maxDate","minDate","onChange","readOnly","shouldDisableYear","disableHighlightToday","onYearFocus","hasFocus","onFocusedViewChange","yearsPerRow","timezone","gridLabelId"],useUtilityClasses$3=tt=>{const{classes:et}=tt;return composeClasses({root:["root"]},getYearCalendarUtilityClass,et)};function useYearCalendarDefaultizedProps(tt,et){var nt;const rt=useUtils(),it=useDefaultDates(),ot=useThemeProps({props:tt,name:et});return _extends$u({disablePast:!1,disableFuture:!1},ot,{yearsPerRow:(nt=ot.yearsPerRow)!=null?nt:3,minDate:applyDefaultDate(rt,ot.minDate,it.minDate),maxDate:applyDefaultDate(rt,ot.maxDate,it.maxDate)})}const YearCalendarRoot=styled$1("div",{name:"MuiYearCalendar",slot:"Root",overridesResolver:(tt,et)=>et.root})({display:"flex",flexDirection:"row",flexWrap:"wrap",overflowY:"auto",height:"100%",padding:"0 4px",width:DIALOG_WIDTH,maxHeight:MAX_CALENDAR_HEIGHT,boxSizing:"border-box",position:"relative"}),YearCalendar=reactExports.forwardRef(function(et,nt){const rt=useYearCalendarDefaultizedProps(et,"MuiYearCalendar"),{autoFocus:it,className:ot,value:at,defaultValue:st,referenceDate:lt,disabled:ct,disableFuture:ut,disablePast:ht,maxDate:dt,minDate:pt,onChange:mt,readOnly:gt,shouldDisableYear:yt,disableHighlightToday:bt,onYearFocus:vt,hasFocus:xt,onFocusedViewChange:kt,yearsPerRow:St,timezone:Tt,gridLabelId:At}=rt,Et=_objectWithoutPropertiesLoose$m(rt,_excluded$p),{value:$t,handleValueChange:Dt,timezone:jt}=useControlledValueWithTimezone({name:"YearCalendar",timezone:Tt,value:at,defaultValue:st,onChange:mt,valueManager:singleItemValueManager}),Pt=useNow(jt),Ct=useTheme$2(),wt=useUtils(),It=reactExports.useMemo(()=>singleItemValueManager.getInitialReferenceValue({value:$t,utils:wt,props:rt,timezone:jt,referenceDate:lt,granularity:SECTION_TYPE_GRANULARITY.year}),[]),Ot=rt,Wt=useUtilityClasses$3(Ot),zt=reactExports.useMemo(()=>wt.getYear(Pt),[wt,Pt]),Ft=reactExports.useMemo(()=>$t!=null?wt.getYear($t):bt?null:wt.getYear(It),[$t,wt,bt,It]),[Nt,Ut]=reactExports.useState(()=>Ft||zt),[Mt,Ht]=useControlled({name:"YearCalendar",state:"hasFocus",controlled:xt,default:it??!1}),en=useEventCallback(_n=>{Ht(_n),kt&&kt(_n)}),sn=reactExports.useCallback(_n=>{if(ht&&wt.isBeforeYear(_n,Pt)||ut&&wt.isAfterYear(_n,Pt)||pt&&wt.isBeforeYear(_n,pt)||dt&&wt.isAfterYear(_n,dt))return!0;if(!yt)return!1;const Pn=wt.startOfYear(_n);return yt(Pn)},[ut,ht,dt,pt,Pt,yt,wt]),Kt=useEventCallback((_n,Pn)=>{if(gt)return;const $n=wt.setYear($t??It,Pn);Dt($n)}),rn=useEventCallback(_n=>{sn(wt.setYear($t??It,_n))||(Ut(_n),en(!0),vt==null||vt(_n))});reactExports.useEffect(()=>{Ut(_n=>Ft!==null&&_n!==Ft?Ft:_n)},[Ft]);const nn=useEventCallback((_n,Pn)=>{switch(_n.key){case"ArrowUp":rn(Pn-St),_n.preventDefault();break;case"ArrowDown":rn(Pn+St),_n.preventDefault();break;case"ArrowLeft":rn(Pn+(Ct.direction==="ltr"?-1:1)),_n.preventDefault();break;case"ArrowRight":rn(Pn+(Ct.direction==="ltr"?1:-1)),_n.preventDefault();break}}),hn=useEventCallback((_n,Pn)=>{rn(Pn)}),vn=useEventCallback((_n,Pn)=>{Nt===Pn&&en(!1)}),an=reactExports.useRef(null),Qt=useForkRef(nt,an);return reactExports.useEffect(()=>{if(it||an.current===null)return;const _n=an.current.querySelector('[tabindex="0"]');if(!_n)return;const Pn=_n.offsetHeight,$n=_n.offsetTop,Nn=an.current.clientHeight,Tn=an.current.scrollTop,cn=$n+Pn;Pn>Nn||$n{const Pn=wt.getYear(_n),$n=Pn===Ft,Nn=ct||sn(_n);return jsxRuntimeExports.jsx(PickersYear,{selected:$n,value:Pn,onClick:Kt,onKeyDown:nn,autoFocus:Mt&&Pn===Nt,disabled:Nn,tabIndex:Pn===Nt?0:-1,onFocus:hn,onBlur:vn,"aria-current":zt===Pn?"date":void 0,yearsPerRow:St,children:wt.format(_n,"year")},wt.format(_n,"year"))})}))}),getPickersCalendarHeaderUtilityClass=tt=>generateUtilityClass("MuiPickersCalendarHeader",tt),pickersCalendarHeaderClasses=generateUtilityClasses("MuiPickersCalendarHeader",["root","labelContainer","label","switchViewButton","switchViewIcon"]),_excluded$o=["slots","slotProps","currentMonth","disabled","disableFuture","disablePast","maxDate","minDate","onMonthChange","onViewChange","view","reduceAnimations","views","labelId","className","timezone"],_excluded2$7=["ownerState"],useUtilityClasses$2=tt=>{const{classes:et}=tt;return composeClasses({root:["root"],labelContainer:["labelContainer"],label:["label"],switchViewButton:["switchViewButton"],switchViewIcon:["switchViewIcon"]},getPickersCalendarHeaderUtilityClass,et)},PickersCalendarHeaderRoot=styled$1("div",{name:"MuiPickersCalendarHeader",slot:"Root",overridesResolver:(tt,et)=>et.root})({display:"flex",alignItems:"center",marginTop:16,marginBottom:8,paddingLeft:24,paddingRight:12,maxHeight:30,minHeight:30}),PickersCalendarHeaderLabelContainer=styled$1("div",{name:"MuiPickersCalendarHeader",slot:"LabelContainer",overridesResolver:(tt,et)=>et.labelContainer})(({theme:tt})=>_extends$u({display:"flex",overflow:"hidden",alignItems:"center",cursor:"pointer",marginRight:"auto"},tt.typography.body1,{fontWeight:tt.typography.fontWeightMedium})),PickersCalendarHeaderLabel=styled$1("div",{name:"MuiPickersCalendarHeader",slot:"Label",overridesResolver:(tt,et)=>et.label})({marginRight:6}),PickersCalendarHeaderSwitchViewButton=styled$1(IconButton$2,{name:"MuiPickersCalendarHeader",slot:"SwitchViewButton",overridesResolver:(tt,et)=>et.switchViewButton})(({ownerState:tt})=>_extends$u({marginRight:"auto"},tt.view==="year"&&{[`.${pickersCalendarHeaderClasses.switchViewIcon}`]:{transform:"rotate(180deg)"}})),PickersCalendarHeaderSwitchViewIcon=styled$1(ArrowDropDownIcon,{name:"MuiPickersCalendarHeader",slot:"SwitchViewIcon",overridesResolver:(tt,et)=>et.switchViewIcon})(({theme:tt})=>({willChange:"transform",transition:tt.transitions.create("transform"),transform:"rotate(0deg)"})),PickersCalendarHeader=reactExports.forwardRef(function(et,nt){var rt,it;const ot=useLocaleText(),at=useUtils(),st=useThemeProps({props:et,name:"MuiPickersCalendarHeader"}),{slots:lt,slotProps:ct,currentMonth:ut,disabled:ht,disableFuture:dt,disablePast:pt,maxDate:mt,minDate:gt,onMonthChange:yt,onViewChange:bt,view:vt,reduceAnimations:xt,views:kt,labelId:St,className:Tt,timezone:At}=st,Et=_objectWithoutPropertiesLoose$m(st,_excluded$o),$t=st,Dt=useUtilityClasses$2(st),jt=(rt=lt==null?void 0:lt.switchViewButton)!=null?rt:PickersCalendarHeaderSwitchViewButton,Pt=useSlotProps({elementType:jt,externalSlotProps:ct==null?void 0:ct.switchViewButton,additionalProps:{size:"small","aria-label":ot.calendarViewSwitchingButtonAriaLabel(vt)},ownerState:$t,className:Dt.switchViewButton}),Ct=(it=lt==null?void 0:lt.switchViewIcon)!=null?it:PickersCalendarHeaderSwitchViewIcon,wt=useSlotProps({elementType:Ct,externalSlotProps:ct==null?void 0:ct.switchViewIcon,ownerState:void 0,className:Dt.switchViewIcon}),It=_objectWithoutPropertiesLoose$m(wt,_excluded2$7),Ot=()=>yt(at.addMonths(ut,1),"left"),Wt=()=>yt(at.addMonths(ut,-1),"right"),zt=useNextMonthDisabled(ut,{disableFuture:dt,maxDate:mt,timezone:At}),Ft=usePreviousMonthDisabled(ut,{disablePast:pt,minDate:gt,timezone:At}),Nt=()=>{if(!(kt.length===1||!bt||ht))if(kt.length===2)bt(kt.find(Ut=>Ut!==vt)||kt[0]);else{const Ut=kt.indexOf(vt)!==0?0:1;bt(kt[Ut])}};return kt.length===1&&kt[0]==="year"?null:jsxRuntimeExports.jsxs(PickersCalendarHeaderRoot,_extends$u({},Et,{ownerState:$t,className:clsx(Tt,Dt.root),ref:nt,children:[jsxRuntimeExports.jsxs(PickersCalendarHeaderLabelContainer,{role:"presentation",onClick:Nt,ownerState:$t,"aria-live":"polite",className:Dt.labelContainer,children:[jsxRuntimeExports.jsx(PickersFadeTransitionGroup,{reduceAnimations:xt,transKey:at.format(ut,"monthAndYear"),children:jsxRuntimeExports.jsx(PickersCalendarHeaderLabel,{id:St,ownerState:$t,className:Dt.label,children:at.format(ut,"monthAndYear")})}),kt.length>1&&!ht&&jsxRuntimeExports.jsx(jt,_extends$u({},Pt,{children:jsxRuntimeExports.jsx(Ct,_extends$u({},It))}))]}),jsxRuntimeExports.jsx(Fade$1,{in:vt==="day",children:jsxRuntimeExports.jsx(PickersArrowSwitcher,{slots:lt,slotProps:ct,onGoToPrevious:Wt,isPreviousDisabled:Ft,previousLabel:ot.previousMonth,onGoToNext:Ot,isNextDisabled:zt,nextLabel:ot.nextMonth})})]}))}),getDateCalendarUtilityClass=tt=>generateUtilityClass("MuiDateCalendar",tt);generateUtilityClasses("MuiDateCalendar",["root","viewTransitionContainer"]);const _excluded$n=["autoFocus","onViewChange","value","defaultValue","referenceDate","disableFuture","disablePast","defaultCalendarMonth","onChange","onYearChange","onMonthChange","reduceAnimations","shouldDisableDate","shouldDisableMonth","shouldDisableYear","view","views","openTo","className","disabled","readOnly","minDate","maxDate","disableHighlightToday","focusedView","onFocusedViewChange","showDaysOutsideCurrentMonth","fixedWeekNumber","dayOfWeekFormatter","components","componentsProps","slots","slotProps","loading","renderLoading","displayWeekNumber","yearsPerRow","monthsPerRow","timezone"],useUtilityClasses$1=tt=>{const{classes:et}=tt;return composeClasses({root:["root"],viewTransitionContainer:["viewTransitionContainer"]},getDateCalendarUtilityClass,et)};function useDateCalendarDefaultizedProps(tt,et){var nt,rt,it,ot,at,st,lt;const ct=useUtils(),ut=useDefaultDates(),ht=useDefaultReduceAnimations(),dt=useThemeProps({props:tt,name:et});return _extends$u({},dt,{loading:(nt=dt.loading)!=null?nt:!1,disablePast:(rt=dt.disablePast)!=null?rt:!1,disableFuture:(it=dt.disableFuture)!=null?it:!1,openTo:(ot=dt.openTo)!=null?ot:"day",views:(at=dt.views)!=null?at:["year","day"],reduceAnimations:(st=dt.reduceAnimations)!=null?st:ht,renderLoading:(lt=dt.renderLoading)!=null?lt:()=>jsxRuntimeExports.jsx("span",{children:"..."}),minDate:applyDefaultDate(ct,dt.minDate,ut.minDate),maxDate:applyDefaultDate(ct,dt.maxDate,ut.maxDate)})}const DateCalendarRoot=styled$1(PickerViewRoot,{name:"MuiDateCalendar",slot:"Root",overridesResolver:(tt,et)=>et.root})({display:"flex",flexDirection:"column",height:VIEW_HEIGHT}),DateCalendarViewTransitionContainer=styled$1(PickersFadeTransitionGroup,{name:"MuiDateCalendar",slot:"ViewTransitionContainer",overridesResolver:(tt,et)=>et.viewTransitionContainer})({}),DateCalendar=reactExports.forwardRef(function(et,nt){var rt,it,ot;const at=useUtils(),st=useId(),lt=useDateCalendarDefaultizedProps(et,"MuiDateCalendar"),{autoFocus:ct,onViewChange:ut,value:ht,defaultValue:dt,referenceDate:pt,disableFuture:mt,disablePast:gt,defaultCalendarMonth:yt,onChange:bt,onYearChange:vt,onMonthChange:xt,reduceAnimations:kt,shouldDisableDate:St,shouldDisableMonth:Tt,shouldDisableYear:At,view:Et,views:$t,openTo:Dt,className:jt,disabled:Pt,readOnly:Ct,minDate:wt,maxDate:It,disableHighlightToday:Ot,focusedView:Wt,onFocusedViewChange:zt,showDaysOutsideCurrentMonth:Ft,fixedWeekNumber:Nt,dayOfWeekFormatter:Ut,components:Mt,componentsProps:Ht,slots:en,slotProps:sn,loading:Kt,renderLoading:rn,displayWeekNumber:nn,yearsPerRow:hn,monthsPerRow:vn,timezone:an}=lt,Qt=_objectWithoutPropertiesLoose$m(lt,_excluded$n),{value:_n,handleValueChange:Pn,timezone:$n}=useControlledValueWithTimezone({name:"DateCalendar",timezone:an,value:ht,defaultValue:dt,onChange:bt,valueManager:singleItemValueManager}),{view:Nn,setView:Tn,focusedView:cn,setFocusedView:mn,goToNextView:In,setValueAndGoToNextView:An}=useViews({view:Et,views:$t,openTo:Dt,onChange:Pn,onViewChange:ut,autoFocus:ct,focusedView:Wt,onFocusedViewChange:zt}),{referenceDate:wn,calendarState:fn,changeFocusedDay:pn,changeMonth:kn,handleChangeMonth:Dn,isDateDisabled:un,onMonthSwitchingAnimationEnd:Zt}=useCalendarState({value:_n,defaultCalendarMonth:yt,referenceDate:pt,reduceAnimations:kt,onMonthChange:xt,minDate:wt,maxDate:It,shouldDisableDate:St,disablePast:gt,disableFuture:mt,timezone:$n}),Xt=Pt&&_n||wt,Sn=Pt&&_n||It,Rn=`${st}-grid-label`,jn=cn!==null,On=(rt=(it=en==null?void 0:en.calendarHeader)!=null?it:Mt==null?void 0:Mt.CalendarHeader)!=null?rt:PickersCalendarHeader,Zn=useSlotProps({elementType:On,externalSlotProps:(ot=sn==null?void 0:sn.calendarHeader)!=null?ot:Ht==null?void 0:Ht.calendarHeader,additionalProps:{views:$t,view:Nn,currentMonth:fn.currentMonth,onViewChange:Tn,onMonthChange:(Tr,Ar)=>Dn({newMonth:Tr,direction:Ar}),minDate:Xt,maxDate:Sn,disabled:Pt,disablePast:gt,disableFuture:mt,reduceAnimations:kt,timezone:$n,labelId:Rn,slots:en,slotProps:sn},ownerState:lt}),Vn=useEventCallback(Tr=>{const Ar=at.startOfMonth(Tr),qr=at.endOfMonth(Tr),jr=un(Tr)?findClosestEnabledDate({utils:at,date:Tr,minDate:at.isBefore(wt,Ar)?Ar:wt,maxDate:at.isAfter(It,qr)?qr:It,disablePast:gt,disableFuture:mt,isDateDisabled:un,timezone:$n}):Tr;jr?(An(jr,"finish"),xt==null||xt(Ar)):(In(),kn(Ar)),pn(jr,!0)}),qn=useEventCallback(Tr=>{const Ar=at.startOfYear(Tr),qr=at.endOfYear(Tr),jr=un(Tr)?findClosestEnabledDate({utils:at,date:Tr,minDate:at.isBefore(wt,Ar)?Ar:wt,maxDate:at.isAfter(It,qr)?qr:It,disablePast:gt,disableFuture:mt,isDateDisabled:un,timezone:$n}):Tr;jr?(An(jr,"finish"),vt==null||vt(jr)):(In(),kn(Ar)),pn(jr,!0)}),zn=useEventCallback(Tr=>Pn(Tr&&mergeDateAndTime(at,Tr,_n??wn),"finish"));reactExports.useEffect(()=>{_n!=null&&at.isValid(_n)&&kn(_n)},[_n]);const Jn=lt,Hn=useUtilityClasses$1(Jn),pr={disablePast:gt,disableFuture:mt,maxDate:It,minDate:wt},fr={disableHighlightToday:Ot,readOnly:Ct,disabled:Pt,timezone:$n,gridLabelId:Rn},xr=reactExports.useRef(Nn);reactExports.useEffect(()=>{xr.current!==Nn&&(cn===xr.current&&mn(Nn,!0),xr.current=Nn)},[cn,mn,Nn]);const io=reactExports.useMemo(()=>[_n],[_n]);return jsxRuntimeExports.jsxs(DateCalendarRoot,_extends$u({ref:nt,className:clsx(Hn.root,jt),ownerState:Jn},Qt,{children:[jsxRuntimeExports.jsx(On,_extends$u({},Zn)),jsxRuntimeExports.jsx(DateCalendarViewTransitionContainer,{reduceAnimations:kt,className:Hn.viewTransitionContainer,transKey:Nn,ownerState:Jn,children:jsxRuntimeExports.jsxs("div",{children:[Nn==="year"&&jsxRuntimeExports.jsx(YearCalendar,_extends$u({},pr,fr,{value:_n,onChange:qn,shouldDisableYear:At,hasFocus:jn,onFocusedViewChange:Tr=>mn("year",Tr),yearsPerRow:hn,referenceDate:wn})),Nn==="month"&&jsxRuntimeExports.jsx(MonthCalendar,_extends$u({},pr,fr,{hasFocus:jn,className:jt,value:_n,onChange:Vn,shouldDisableMonth:Tt,onFocusedViewChange:Tr=>mn("month",Tr),monthsPerRow:vn,referenceDate:wn})),Nn==="day"&&jsxRuntimeExports.jsx(DayCalendar,_extends$u({},fn,pr,fr,{onMonthSwitchingAnimationEnd:Zt,onFocusedDayChange:pn,reduceAnimations:kt,selectedDays:io,onSelectedDaysChange:zn,shouldDisableDate:St,shouldDisableMonth:Tt,shouldDisableYear:At,hasFocus:jn,onFocusedViewChange:Tr=>mn("day",Tr),showDaysOutsideCurrentMonth:Ft,fixedWeekNumber:Nt,dayOfWeekFormatter:Ut,displayWeekNumber:nn,components:Mt,componentsProps:Ht,slots:en,slotProps:sn,loading:Kt,renderLoading:rn}))]})})]}))});function getDatePickerToolbarUtilityClass(tt){return generateUtilityClass("MuiDatePickerToolbar",tt)}generateUtilityClasses("MuiDatePickerToolbar",["root","title"]);const _excluded$m=["value","isLandscape","onChange","toolbarFormat","toolbarPlaceholder","views"],useUtilityClasses=tt=>{const{classes:et}=tt;return composeClasses({root:["root"],title:["title"]},getDatePickerToolbarUtilityClass,et)},DatePickerToolbarRoot=styled$1(PickersToolbar,{name:"MuiDatePickerToolbar",slot:"Root",overridesResolver:(tt,et)=>et.root})({}),DatePickerToolbarTitle=styled$1(Typography$1,{name:"MuiDatePickerToolbar",slot:"Title",overridesResolver:(tt,et)=>et.title})(({ownerState:tt})=>_extends$u({},tt.isLandscape&&{margin:"auto 16px auto auto"})),DatePickerToolbar=reactExports.forwardRef(function(et,nt){const rt=useThemeProps({props:et,name:"MuiDatePickerToolbar"}),{value:it,isLandscape:ot,toolbarFormat:at,toolbarPlaceholder:st="––",views:lt}=rt,ct=_objectWithoutPropertiesLoose$m(rt,_excluded$m),ut=useUtils(),ht=useLocaleText(),dt=useUtilityClasses(rt),pt=reactExports.useMemo(()=>{if(!it)return st;const gt=resolveDateFormat(ut,{format:at,views:lt},!0);return ut.formatByString(it,gt)},[it,at,st,ut,lt]),mt=rt;return jsxRuntimeExports.jsx(DatePickerToolbarRoot,_extends$u({ref:nt,toolbarTitle:ht.datePickerToolbarTitle,isLandscape:ot,className:dt.root},ct,{children:jsxRuntimeExports.jsx(DatePickerToolbarTitle,{variant:"h4",align:ot?"left":"center",ownerState:mt,className:dt.title,children:pt})}))});function useDatePickerDefaultizedProps(tt,et){var nt,rt,it,ot;const at=useUtils(),st=useDefaultDates(),lt=useThemeProps({props:tt,name:et}),ct=reactExports.useMemo(()=>{var ht;return((ht=lt.localeText)==null?void 0:ht.toolbarTitle)==null?lt.localeText:_extends$u({},lt.localeText,{datePickerToolbarTitle:lt.localeText.toolbarTitle})},[lt.localeText]),ut=(nt=lt.slots)!=null?nt:uncapitalizeObjectKeys(lt.components);return _extends$u({},lt,{localeText:ct},applyDefaultViewProps({views:lt.views,openTo:lt.openTo,defaultViews:["year","day"],defaultOpenTo:"day"}),{disableFuture:(rt=lt.disableFuture)!=null?rt:!1,disablePast:(it=lt.disablePast)!=null?it:!1,minDate:applyDefaultDate(at,lt.minDate,st.minDate),maxDate:applyDefaultDate(at,lt.maxDate,st.maxDate),slots:_extends$u({toolbar:DatePickerToolbar},ut),slotProps:(ot=lt.slotProps)!=null?ot:lt.componentsProps})}const _excluded$l=["props","getOpenDialogAriaText"],_excluded2$6=["ownerState"],_excluded3$1=["ownerState"],useDesktopPicker=tt=>{var et,nt,rt,it,ot;let{props:at,getOpenDialogAriaText:st}=tt,lt=_objectWithoutPropertiesLoose$m(tt,_excluded$l);const{slots:ct,slotProps:ut,className:ht,sx:dt,format:pt,formatDensity:mt,timezone:gt,label:yt,inputRef:bt,readOnly:vt,disabled:xt,autoFocus:kt,localeText:St,reduceAnimations:Tt}=at,At=useUtils(),Et=reactExports.useRef(null),$t=reactExports.useRef(null),Dt=useId(),jt=(et=ut==null||(nt=ut.toolbar)==null?void 0:nt.hidden)!=null?et:!1,{open:Pt,actions:Ct,hasUIView:wt,layoutProps:It,renderCurrentView:Ot,shouldRestoreFocus:Wt,fieldProps:zt}=usePicker(_extends$u({},lt,{props:at,inputRef:Et,autoFocusView:!0,additionalViewProps:{},wrapperVariant:"desktop"})),Ft=(rt=ct.inputAdornment)!=null?rt:MuiInputAdornment,Nt=useSlotProps({elementType:Ft,externalSlotProps:ut==null?void 0:ut.inputAdornment,additionalProps:{position:"end"},ownerState:at}),Ut=_objectWithoutPropertiesLoose$m(Nt,_excluded2$6),Mt=(it=ct.openPickerButton)!=null?it:IconButton$2,Ht=useSlotProps({elementType:Mt,externalSlotProps:ut==null?void 0:ut.openPickerButton,additionalProps:{disabled:xt||vt,onClick:Pt?Ct.onClose:Ct.onOpen,"aria-label":st(zt.value,At),edge:Ut.position},ownerState:at}),en=_objectWithoutPropertiesLoose$m(Ht,_excluded3$1),sn=ct.openPickerIcon,Kt=ct.field,rn=useSlotProps({elementType:Kt,externalSlotProps:ut==null?void 0:ut.field,additionalProps:_extends$u({},zt,jt&&{id:Dt},{readOnly:vt,disabled:xt,className:ht,sx:dt,format:pt,formatDensity:mt,timezone:gt,label:yt,autoFocus:kt&&!at.open,focused:Pt?!0:void 0}),ownerState:at});wt&&(rn.InputProps=_extends$u({},rn.InputProps,{ref:$t,[`${Ut.position}Adornment`]:jsxRuntimeExports.jsx(Ft,_extends$u({},Ut,{children:jsxRuntimeExports.jsx(Mt,_extends$u({},en,{children:jsxRuntimeExports.jsx(sn,_extends$u({},ut==null?void 0:ut.openPickerIcon))}))}))}));const nn=_extends$u({textField:ct.textField,clearIcon:ct.clearIcon,clearButton:ct.clearButton},rn.slots),hn=(ot=ct.layout)!=null?ot:PickersLayout,vn=useForkRef(Et,rn.inputRef,bt);let an=Dt;jt&&(yt?an=`${Dt}-label`:an=void 0);const Qt=_extends$u({},ut,{toolbar:_extends$u({},ut==null?void 0:ut.toolbar,{titleId:Dt}),popper:_extends$u({"aria-labelledby":an},ut==null?void 0:ut.popper)});return{renderPicker:()=>jsxRuntimeExports.jsxs(LocalizationProvider,{localeText:St,children:[jsxRuntimeExports.jsx(Kt,_extends$u({},rn,{slots:nn,slotProps:Qt,inputRef:vn})),jsxRuntimeExports.jsx(PickersPopper,_extends$u({role:"dialog",placement:"bottom-start",anchorEl:$t.current},Ct,{open:Pt,slots:ct,slotProps:Qt,shouldRestoreFocus:Wt,reduceAnimations:Tt,children:jsxRuntimeExports.jsx(hn,_extends$u({},It,Qt==null?void 0:Qt.layout,{slots:ct,slotProps:Qt,children:Ot()}))}))]})}},renderDateViewCalendar=({view:tt,onViewChange:et,views:nt,focusedView:rt,onFocusedViewChange:it,value:ot,defaultValue:at,referenceDate:st,onChange:lt,className:ct,classes:ut,disableFuture:ht,disablePast:dt,minDate:pt,maxDate:mt,shouldDisableDate:gt,shouldDisableMonth:yt,shouldDisableYear:bt,reduceAnimations:vt,onMonthChange:xt,monthsPerRow:kt,onYearChange:St,yearsPerRow:Tt,defaultCalendarMonth:At,components:Et,componentsProps:$t,slots:Dt,slotProps:jt,loading:Pt,renderLoading:Ct,disableHighlightToday:wt,readOnly:It,disabled:Ot,showDaysOutsideCurrentMonth:Wt,dayOfWeekFormatter:zt,sx:Ft,autoFocus:Nt,fixedWeekNumber:Ut,displayWeekNumber:Mt,timezone:Ht})=>jsxRuntimeExports.jsx(DateCalendar,{view:tt,onViewChange:et,views:nt.filter(isDatePickerView),focusedView:rt&&isDatePickerView(rt)?rt:null,onFocusedViewChange:it,value:ot,defaultValue:at,referenceDate:st,onChange:lt,className:ct,classes:ut,disableFuture:ht,disablePast:dt,minDate:pt,maxDate:mt,shouldDisableDate:gt,shouldDisableMonth:yt,shouldDisableYear:bt,reduceAnimations:vt,onMonthChange:xt,monthsPerRow:kt,onYearChange:St,yearsPerRow:Tt,defaultCalendarMonth:At,components:Et,componentsProps:$t,slots:Dt,slotProps:jt,loading:Pt,renderLoading:Ct,disableHighlightToday:wt,readOnly:It,disabled:Ot,showDaysOutsideCurrentMonth:Wt,dayOfWeekFormatter:zt,sx:Ft,autoFocus:Nt,fixedWeekNumber:Ut,displayWeekNumber:Mt,timezone:Ht}),DesktopDatePicker=reactExports.forwardRef(function(et,nt){var rt,it,ot,at;const st=useLocaleText(),lt=useUtils(),ct=useDatePickerDefaultizedProps(et,"MuiDesktopDatePicker"),ut=_extends$u({day:renderDateViewCalendar,month:renderDateViewCalendar,year:renderDateViewCalendar},ct.viewRenderers),ht=_extends$u({},ct,{viewRenderers:ut,format:resolveDateFormat(lt,ct,!1),yearsPerRow:(rt=ct.yearsPerRow)!=null?rt:4,slots:_extends$u({openPickerIcon:CalendarIcon,field:DateField},ct.slots),slotProps:_extends$u({},ct.slotProps,{field:pt=>{var mt;return _extends$u({},resolveComponentProps((mt=ct.slotProps)==null?void 0:mt.field,pt),extractValidationProps(ct),{ref:nt})},toolbar:_extends$u({hidden:!0},(it=ct.slotProps)==null?void 0:it.toolbar)})}),{renderPicker:dt}=useDesktopPicker({props:ht,valueManager:singleItemValueManager,valueType:"date",getOpenDialogAriaText:(ot=(at=ht.localeText)==null?void 0:at.openDatePickerDialogue)!=null?ot:st.openDatePickerDialogue,validator:validateDate});return dt()});DesktopDatePicker.propTypes={autoFocus:PropTypes.bool,className:PropTypes.string,closeOnSelect:PropTypes.bool,components:PropTypes.object,componentsProps:PropTypes.object,dayOfWeekFormatter:PropTypes.func,defaultCalendarMonth:PropTypes.any,defaultValue:PropTypes.any,disabled:PropTypes.bool,disableFuture:PropTypes.bool,disableHighlightToday:PropTypes.bool,disableOpenPicker:PropTypes.bool,disablePast:PropTypes.bool,displayWeekNumber:PropTypes.bool,fixedWeekNumber:PropTypes.number,format:PropTypes.string,formatDensity:PropTypes.oneOf(["dense","spacious"]),inputRef:refType$1,label:PropTypes.node,loading:PropTypes.bool,localeText:PropTypes.object,maxDate:PropTypes.any,minDate:PropTypes.any,monthsPerRow:PropTypes.oneOf([3,4]),onAccept:PropTypes.func,onChange:PropTypes.func,onClose:PropTypes.func,onError:PropTypes.func,onMonthChange:PropTypes.func,onOpen:PropTypes.func,onSelectedSectionsChange:PropTypes.func,onViewChange:PropTypes.func,onYearChange:PropTypes.func,open:PropTypes.bool,openTo:PropTypes.oneOf(["day","month","year"]),orientation:PropTypes.oneOf(["landscape","portrait"]),readOnly:PropTypes.bool,reduceAnimations:PropTypes.bool,referenceDate:PropTypes.any,renderLoading:PropTypes.func,selectedSections:PropTypes.oneOfType([PropTypes.oneOf(["all","day","hours","meridiem","minutes","month","seconds","weekDay","year"]),PropTypes.number,PropTypes.shape({endIndex:PropTypes.number.isRequired,startIndex:PropTypes.number.isRequired})]),shouldDisableDate:PropTypes.func,shouldDisableMonth:PropTypes.func,shouldDisableYear:PropTypes.func,showDaysOutsideCurrentMonth:PropTypes.bool,slotProps:PropTypes.object,slots:PropTypes.object,sx:PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func,PropTypes.object,PropTypes.bool])),PropTypes.func,PropTypes.object]),timezone:PropTypes.string,value:PropTypes.any,view:PropTypes.oneOf(["day","month","year"]),viewRenderers:PropTypes.shape({day:PropTypes.func,month:PropTypes.func,year:PropTypes.func}),views:PropTypes.arrayOf(PropTypes.oneOf(["day","month","year"]).isRequired),yearsPerRow:PropTypes.oneOf([3,4])};const _excluded$k=["props","getOpenDialogAriaText"],useMobilePicker=tt=>{var et,nt,rt;let{props:it,getOpenDialogAriaText:ot}=tt,at=_objectWithoutPropertiesLoose$m(tt,_excluded$k);const{slots:st,slotProps:lt,className:ct,sx:ut,format:ht,formatDensity:dt,timezone:pt,label:mt,inputRef:gt,readOnly:yt,disabled:bt,localeText:vt}=it,xt=useUtils(),kt=reactExports.useRef(null),St=useId(),Tt=(et=lt==null||(nt=lt.toolbar)==null?void 0:nt.hidden)!=null?et:!1,{open:At,actions:Et,layoutProps:$t,renderCurrentView:Dt,fieldProps:jt}=usePicker(_extends$u({},at,{props:it,inputRef:kt,autoFocusView:!0,additionalViewProps:{},wrapperVariant:"mobile"})),Pt=st.field,Ct=useSlotProps({elementType:Pt,externalSlotProps:lt==null?void 0:lt.field,additionalProps:_extends$u({},jt,Tt&&{id:St},!(bt||yt)&&{onClick:Et.onOpen,onKeyDown:onSpaceOrEnter(Et.onOpen)},{readOnly:yt??!0,disabled:bt,className:ct,sx:ut,format:ht,formatDensity:dt,timezone:pt,label:mt}),ownerState:it});Ct.inputProps=_extends$u({},Ct.inputProps,{"aria-label":ot(jt.value,xt)});const wt=_extends$u({textField:st.textField},Ct.slots),It=(rt=st.layout)!=null?rt:PickersLayout,Ot=useForkRef(kt,Ct.inputRef,gt);let Wt=St;Tt&&(mt?Wt=`${St}-label`:Wt=void 0);const zt=_extends$u({},lt,{toolbar:_extends$u({},lt==null?void 0:lt.toolbar,{titleId:St}),mobilePaper:_extends$u({"aria-labelledby":Wt},lt==null?void 0:lt.mobilePaper)});return{renderPicker:()=>jsxRuntimeExports.jsxs(LocalizationProvider,{localeText:vt,children:[jsxRuntimeExports.jsx(Pt,_extends$u({},Ct,{slots:wt,slotProps:zt,inputRef:Ot})),jsxRuntimeExports.jsx(PickersModalDialog,_extends$u({},Et,{open:At,slots:st,slotProps:zt,children:jsxRuntimeExports.jsx(It,_extends$u({},$t,zt==null?void 0:zt.layout,{slots:st,slotProps:zt,children:Dt()}))}))]})}},MobileDatePicker=reactExports.forwardRef(function(et,nt){var rt,it,ot;const at=useLocaleText(),st=useUtils(),lt=useDatePickerDefaultizedProps(et,"MuiMobileDatePicker"),ct=_extends$u({day:renderDateViewCalendar,month:renderDateViewCalendar,year:renderDateViewCalendar},lt.viewRenderers),ut=_extends$u({},lt,{viewRenderers:ct,format:resolveDateFormat(st,lt,!1),slots:_extends$u({field:DateField},lt.slots),slotProps:_extends$u({},lt.slotProps,{field:dt=>{var pt;return _extends$u({},resolveComponentProps((pt=lt.slotProps)==null?void 0:pt.field,dt),extractValidationProps(lt),{ref:nt})},toolbar:_extends$u({hidden:!1},(rt=lt.slotProps)==null?void 0:rt.toolbar)})}),{renderPicker:ht}=useMobilePicker({props:ut,valueManager:singleItemValueManager,valueType:"date",getOpenDialogAriaText:(it=(ot=ut.localeText)==null?void 0:ot.openDatePickerDialogue)!=null?it:at.openDatePickerDialogue,validator:validateDate});return ht()});MobileDatePicker.propTypes={autoFocus:PropTypes.bool,className:PropTypes.string,closeOnSelect:PropTypes.bool,components:PropTypes.object,componentsProps:PropTypes.object,dayOfWeekFormatter:PropTypes.func,defaultCalendarMonth:PropTypes.any,defaultValue:PropTypes.any,disabled:PropTypes.bool,disableFuture:PropTypes.bool,disableHighlightToday:PropTypes.bool,disableOpenPicker:PropTypes.bool,disablePast:PropTypes.bool,displayWeekNumber:PropTypes.bool,fixedWeekNumber:PropTypes.number,format:PropTypes.string,formatDensity:PropTypes.oneOf(["dense","spacious"]),inputRef:refType$1,label:PropTypes.node,loading:PropTypes.bool,localeText:PropTypes.object,maxDate:PropTypes.any,minDate:PropTypes.any,monthsPerRow:PropTypes.oneOf([3,4]),onAccept:PropTypes.func,onChange:PropTypes.func,onClose:PropTypes.func,onError:PropTypes.func,onMonthChange:PropTypes.func,onOpen:PropTypes.func,onSelectedSectionsChange:PropTypes.func,onViewChange:PropTypes.func,onYearChange:PropTypes.func,open:PropTypes.bool,openTo:PropTypes.oneOf(["day","month","year"]),orientation:PropTypes.oneOf(["landscape","portrait"]),readOnly:PropTypes.bool,reduceAnimations:PropTypes.bool,referenceDate:PropTypes.any,renderLoading:PropTypes.func,selectedSections:PropTypes.oneOfType([PropTypes.oneOf(["all","day","hours","meridiem","minutes","month","seconds","weekDay","year"]),PropTypes.number,PropTypes.shape({endIndex:PropTypes.number.isRequired,startIndex:PropTypes.number.isRequired})]),shouldDisableDate:PropTypes.func,shouldDisableMonth:PropTypes.func,shouldDisableYear:PropTypes.func,showDaysOutsideCurrentMonth:PropTypes.bool,slotProps:PropTypes.object,slots:PropTypes.object,sx:PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func,PropTypes.object,PropTypes.bool])),PropTypes.func,PropTypes.object]),timezone:PropTypes.string,value:PropTypes.any,view:PropTypes.oneOf(["day","month","year"]),viewRenderers:PropTypes.shape({day:PropTypes.func,month:PropTypes.func,year:PropTypes.func}),views:PropTypes.arrayOf(PropTypes.oneOf(["day","month","year"]).isRequired),yearsPerRow:PropTypes.oneOf([3,4])};const _excluded$j=["desktopModeMediaQuery"],DatePicker=reactExports.forwardRef(function(et,nt){const rt=useThemeProps({props:et,name:"MuiDatePicker"}),{desktopModeMediaQuery:it=DEFAULT_DESKTOP_MODE_MEDIA_QUERY}=rt,ot=_objectWithoutPropertiesLoose$m(rt,_excluded$j);return useMediaQuery(it,{defaultMatches:!0})?jsxRuntimeExports.jsx(DesktopDatePicker,_extends$u({ref:nt},ot)):jsxRuntimeExports.jsx(MobileDatePicker,_extends$u({ref:nt},ot))});//! moment.js -//! version : 2.29.4 -//! authors : Tim Wood, Iskren Chernev, Moment.js contributors -//! license : MIT -//! momentjs.com -var hookCallback;function hooks(){return hookCallback.apply(null,arguments)}function setHookCallback(tt){hookCallback=tt}function isArray$d(tt){return tt instanceof Array||Object.prototype.toString.call(tt)==="[object Array]"}function isObject$6(tt){return tt!=null&&Object.prototype.toString.call(tt)==="[object Object]"}function hasOwnProp(tt,et){return Object.prototype.hasOwnProperty.call(tt,et)}function isObjectEmpty(tt){if(Object.getOwnPropertyNames)return Object.getOwnPropertyNames(tt).length===0;var et;for(et in tt)if(hasOwnProp(tt,et))return!1;return!0}function isUndefined(tt){return tt===void 0}function isNumber$3(tt){return typeof tt=="number"||Object.prototype.toString.call(tt)==="[object Number]"}function isDate(tt){return tt instanceof Date||Object.prototype.toString.call(tt)==="[object Date]"}function map$5(tt,et){var nt=[],rt,it=tt.length;for(rt=0;rt>>0,rt;for(rt=0;rt0)for(nt=0;nt=0;return(ot?nt?"+":"":"-")+Math.pow(10,Math.max(0,it)).toString().substr(1)+rt}var formattingTokens=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,localFormattingTokens=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,formatFunctions={},formatTokenFunctions={};function addFormatToken(tt,et,nt,rt){var it=rt;typeof rt=="string"&&(it=function(){return this[rt]()}),tt&&(formatTokenFunctions[tt]=it),et&&(formatTokenFunctions[et[0]]=function(){return zeroFill(it.apply(this,arguments),et[1],et[2])}),nt&&(formatTokenFunctions[nt]=function(){return this.localeData().ordinal(it.apply(this,arguments),tt)})}function removeFormattingTokens(tt){return tt.match(/\[[\s\S]/)?tt.replace(/^\[|\]$/g,""):tt.replace(/\\/g,"")}function makeFormatFunction(tt){var et=tt.match(formattingTokens),nt,rt;for(nt=0,rt=et.length;nt=0&&localFormattingTokens.test(tt);)tt=tt.replace(localFormattingTokens,rt),localFormattingTokens.lastIndex=0,nt-=1;return tt}var defaultLongDateFormat={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function longDateFormat(tt){var et=this._longDateFormat[tt],nt=this._longDateFormat[tt.toUpperCase()];return et||!nt?et:(this._longDateFormat[tt]=nt.match(formattingTokens).map(function(rt){return rt==="MMMM"||rt==="MM"||rt==="DD"||rt==="dddd"?rt.slice(1):rt}).join(""),this._longDateFormat[tt])}var defaultInvalidDate="Invalid date";function invalidDate(){return this._invalidDate}var defaultOrdinal="%d",defaultDayOfMonthOrdinalParse=/\d{1,2}/;function ordinal$1(tt){return this._ordinal.replace("%d",tt)}var defaultRelativeTime={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function relativeTime(tt,et,nt,rt){var it=this._relativeTime[nt];return isFunction$1(it)?it(tt,et,nt,rt):it.replace(/%d/i,tt)}function pastFuture(tt,et){var nt=this._relativeTime[tt>0?"future":"past"];return isFunction$1(nt)?nt(et):nt.replace(/%s/i,et)}var aliases={};function addUnitAlias(tt,et){var nt=tt.toLowerCase();aliases[nt]=aliases[nt+"s"]=aliases[et]=tt}function normalizeUnits(tt){return typeof tt=="string"?aliases[tt]||aliases[tt.toLowerCase()]:void 0}function normalizeObjectUnits(tt){var et={},nt,rt;for(rt in tt)hasOwnProp(tt,rt)&&(nt=normalizeUnits(rt),nt&&(et[nt]=tt[rt]));return et}var priorities={};function addUnitPriority(tt,et){priorities[tt]=et}function getPrioritizedUnits(tt){var et=[],nt;for(nt in tt)hasOwnProp(tt,nt)&&et.push({unit:nt,priority:priorities[nt]});return et.sort(function(rt,it){return rt.priority-it.priority}),et}function isLeapYear(tt){return tt%4===0&&tt%100!==0||tt%400===0}function absFloor(tt){return tt<0?Math.ceil(tt)||0:Math.floor(tt)}function toInt(tt){var et=+tt,nt=0;return et!==0&&isFinite(et)&&(nt=absFloor(et)),nt}function makeGetSet(tt,et){return function(nt){return nt!=null?(set$1$1(this,tt,nt),hooks.updateOffset(this,et),this):get$3(this,tt)}}function get$3(tt,et){return tt.isValid()?tt._d["get"+(tt._isUTC?"UTC":"")+et]():NaN}function set$1$1(tt,et,nt){tt.isValid()&&!isNaN(nt)&&(et==="FullYear"&&isLeapYear(tt.year())&&tt.month()===1&&tt.date()===29?(nt=toInt(nt),tt._d["set"+(tt._isUTC?"UTC":"")+et](nt,tt.month(),daysInMonth(nt,tt.month()))):tt._d["set"+(tt._isUTC?"UTC":"")+et](nt))}function stringGet(tt){return tt=normalizeUnits(tt),isFunction$1(this[tt])?this[tt]():this}function stringSet(tt,et){if(typeof tt=="object"){tt=normalizeObjectUnits(tt);var nt=getPrioritizedUnits(tt),rt,it=nt.length;for(rt=0;rt68?1900:2e3)};var getSetYear=makeGetSet("FullYear",!0);function getIsLeapYear(){return isLeapYear(this.year())}function createDate(tt,et,nt,rt,it,ot,at){var st;return tt<100&&tt>=0?(st=new Date(tt+400,et,nt,rt,it,ot,at),isFinite(st.getFullYear())&&st.setFullYear(tt)):st=new Date(tt,et,nt,rt,it,ot,at),st}function createUTCDate(tt){var et,nt;return tt<100&&tt>=0?(nt=Array.prototype.slice.call(arguments),nt[0]=tt+400,et=new Date(Date.UTC.apply(null,nt)),isFinite(et.getUTCFullYear())&&et.setUTCFullYear(tt)):et=new Date(Date.UTC.apply(null,arguments)),et}function firstWeekOffset(tt,et,nt){var rt=7+et-nt,it=(7+createUTCDate(tt,0,rt).getUTCDay()-et)%7;return-it+rt-1}function dayOfYearFromWeeks(tt,et,nt,rt,it){var ot=(7+nt-rt)%7,at=firstWeekOffset(tt,rt,it),st=1+7*(et-1)+ot+at,lt,ct;return st<=0?(lt=tt-1,ct=daysInYear(lt)+st):st>daysInYear(tt)?(lt=tt+1,ct=st-daysInYear(tt)):(lt=tt,ct=st),{year:lt,dayOfYear:ct}}function weekOfYear(tt,et,nt){var rt=firstWeekOffset(tt.year(),et,nt),it=Math.floor((tt.dayOfYear()-rt-1)/7)+1,ot,at;return it<1?(at=tt.year()-1,ot=it+weeksInYear(at,et,nt)):it>weeksInYear(tt.year(),et,nt)?(ot=it-weeksInYear(tt.year(),et,nt),at=tt.year()+1):(at=tt.year(),ot=it),{week:ot,year:at}}function weeksInYear(tt,et,nt){var rt=firstWeekOffset(tt,et,nt),it=firstWeekOffset(tt+1,et,nt);return(daysInYear(tt)-rt+it)/7}addFormatToken("w",["ww",2],"wo","week");addFormatToken("W",["WW",2],"Wo","isoWeek");addUnitAlias("week","w");addUnitAlias("isoWeek","W");addUnitPriority("week",5);addUnitPriority("isoWeek",5);addRegexToken("w",match1to2);addRegexToken("ww",match1to2,match2);addRegexToken("W",match1to2);addRegexToken("WW",match1to2,match2);addWeekParseToken(["w","ww","W","WW"],function(tt,et,nt,rt){et[rt.substr(0,1)]=toInt(tt)});function localeWeek(tt){return weekOfYear(tt,this._week.dow,this._week.doy).week}var defaultLocaleWeek={dow:0,doy:6};function localeFirstDayOfWeek(){return this._week.dow}function localeFirstDayOfYear(){return this._week.doy}function getSetWeek(tt){var et=this.localeData().week(this);return tt==null?et:this.add((tt-et)*7,"d")}function getSetISOWeek(tt){var et=weekOfYear(this,1,4).week;return tt==null?et:this.add((tt-et)*7,"d")}addFormatToken("d",0,"do","day");addFormatToken("dd",0,0,function(tt){return this.localeData().weekdaysMin(this,tt)});addFormatToken("ddd",0,0,function(tt){return this.localeData().weekdaysShort(this,tt)});addFormatToken("dddd",0,0,function(tt){return this.localeData().weekdays(this,tt)});addFormatToken("e",0,0,"weekday");addFormatToken("E",0,0,"isoWeekday");addUnitAlias("day","d");addUnitAlias("weekday","e");addUnitAlias("isoWeekday","E");addUnitPriority("day",11);addUnitPriority("weekday",11);addUnitPriority("isoWeekday",11);addRegexToken("d",match1to2);addRegexToken("e",match1to2);addRegexToken("E",match1to2);addRegexToken("dd",function(tt,et){return et.weekdaysMinRegex(tt)});addRegexToken("ddd",function(tt,et){return et.weekdaysShortRegex(tt)});addRegexToken("dddd",function(tt,et){return et.weekdaysRegex(tt)});addWeekParseToken(["dd","ddd","dddd"],function(tt,et,nt,rt){var it=nt._locale.weekdaysParse(tt,rt,nt._strict);it!=null?et.d=it:getParsingFlags(nt).invalidWeekday=tt});addWeekParseToken(["d","e","E"],function(tt,et,nt,rt){et[rt]=toInt(tt)});function parseWeekday(tt,et){return typeof tt!="string"?tt:isNaN(tt)?(tt=et.weekdaysParse(tt),typeof tt=="number"?tt:null):parseInt(tt,10)}function parseIsoWeekday(tt,et){return typeof tt=="string"?et.weekdaysParse(tt)%7||7:isNaN(tt)?null:tt}function shiftWeekdays(tt,et){return tt.slice(et,7).concat(tt.slice(0,et))}var defaultLocaleWeekdays="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),defaultLocaleWeekdaysShort="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),defaultLocaleWeekdaysMin="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),defaultWeekdaysRegex=matchWord,defaultWeekdaysShortRegex=matchWord,defaultWeekdaysMinRegex=matchWord;function localeWeekdays(tt,et){var nt=isArray$d(this._weekdays)?this._weekdays:this._weekdays[tt&&tt!==!0&&this._weekdays.isFormat.test(et)?"format":"standalone"];return tt===!0?shiftWeekdays(nt,this._week.dow):tt?nt[tt.day()]:nt}function localeWeekdaysShort(tt){return tt===!0?shiftWeekdays(this._weekdaysShort,this._week.dow):tt?this._weekdaysShort[tt.day()]:this._weekdaysShort}function localeWeekdaysMin(tt){return tt===!0?shiftWeekdays(this._weekdaysMin,this._week.dow):tt?this._weekdaysMin[tt.day()]:this._weekdaysMin}function handleStrictParse$1(tt,et,nt){var rt,it,ot,at=tt.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],rt=0;rt<7;++rt)ot=createUTC([2e3,1]).day(rt),this._minWeekdaysParse[rt]=this.weekdaysMin(ot,"").toLocaleLowerCase(),this._shortWeekdaysParse[rt]=this.weekdaysShort(ot,"").toLocaleLowerCase(),this._weekdaysParse[rt]=this.weekdays(ot,"").toLocaleLowerCase();return nt?et==="dddd"?(it=indexOf.call(this._weekdaysParse,at),it!==-1?it:null):et==="ddd"?(it=indexOf.call(this._shortWeekdaysParse,at),it!==-1?it:null):(it=indexOf.call(this._minWeekdaysParse,at),it!==-1?it:null):et==="dddd"?(it=indexOf.call(this._weekdaysParse,at),it!==-1||(it=indexOf.call(this._shortWeekdaysParse,at),it!==-1)?it:(it=indexOf.call(this._minWeekdaysParse,at),it!==-1?it:null)):et==="ddd"?(it=indexOf.call(this._shortWeekdaysParse,at),it!==-1||(it=indexOf.call(this._weekdaysParse,at),it!==-1)?it:(it=indexOf.call(this._minWeekdaysParse,at),it!==-1?it:null)):(it=indexOf.call(this._minWeekdaysParse,at),it!==-1||(it=indexOf.call(this._weekdaysParse,at),it!==-1)?it:(it=indexOf.call(this._shortWeekdaysParse,at),it!==-1?it:null))}function localeWeekdaysParse(tt,et,nt){var rt,it,ot;if(this._weekdaysParseExact)return handleStrictParse$1.call(this,tt,et,nt);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),rt=0;rt<7;rt++){if(it=createUTC([2e3,1]).day(rt),nt&&!this._fullWeekdaysParse[rt]&&(this._fullWeekdaysParse[rt]=new RegExp("^"+this.weekdays(it,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[rt]=new RegExp("^"+this.weekdaysShort(it,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[rt]=new RegExp("^"+this.weekdaysMin(it,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[rt]||(ot="^"+this.weekdays(it,"")+"|^"+this.weekdaysShort(it,"")+"|^"+this.weekdaysMin(it,""),this._weekdaysParse[rt]=new RegExp(ot.replace(".",""),"i")),nt&&et==="dddd"&&this._fullWeekdaysParse[rt].test(tt))return rt;if(nt&&et==="ddd"&&this._shortWeekdaysParse[rt].test(tt))return rt;if(nt&&et==="dd"&&this._minWeekdaysParse[rt].test(tt))return rt;if(!nt&&this._weekdaysParse[rt].test(tt))return rt}}function getSetDayOfWeek(tt){if(!this.isValid())return tt!=null?this:NaN;var et=this._isUTC?this._d.getUTCDay():this._d.getDay();return tt!=null?(tt=parseWeekday(tt,this.localeData()),this.add(tt-et,"d")):et}function getSetLocaleDayOfWeek(tt){if(!this.isValid())return tt!=null?this:NaN;var et=(this.day()+7-this.localeData()._week.dow)%7;return tt==null?et:this.add(tt-et,"d")}function getSetISODayOfWeek(tt){if(!this.isValid())return tt!=null?this:NaN;if(tt!=null){var et=parseIsoWeekday(tt,this.localeData());return this.day(this.day()%7?et:et-7)}else return this.day()||7}function weekdaysRegex(tt){return this._weekdaysParseExact?(hasOwnProp(this,"_weekdaysRegex")||computeWeekdaysParse.call(this),tt?this._weekdaysStrictRegex:this._weekdaysRegex):(hasOwnProp(this,"_weekdaysRegex")||(this._weekdaysRegex=defaultWeekdaysRegex),this._weekdaysStrictRegex&&tt?this._weekdaysStrictRegex:this._weekdaysRegex)}function weekdaysShortRegex(tt){return this._weekdaysParseExact?(hasOwnProp(this,"_weekdaysRegex")||computeWeekdaysParse.call(this),tt?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(hasOwnProp(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=defaultWeekdaysShortRegex),this._weekdaysShortStrictRegex&&tt?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function weekdaysMinRegex(tt){return this._weekdaysParseExact?(hasOwnProp(this,"_weekdaysRegex")||computeWeekdaysParse.call(this),tt?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(hasOwnProp(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=defaultWeekdaysMinRegex),this._weekdaysMinStrictRegex&&tt?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function computeWeekdaysParse(){function tt(ut,ht){return ht.length-ut.length}var et=[],nt=[],rt=[],it=[],ot,at,st,lt,ct;for(ot=0;ot<7;ot++)at=createUTC([2e3,1]).day(ot),st=regexEscape(this.weekdaysMin(at,"")),lt=regexEscape(this.weekdaysShort(at,"")),ct=regexEscape(this.weekdays(at,"")),et.push(st),nt.push(lt),rt.push(ct),it.push(st),it.push(lt),it.push(ct);et.sort(tt),nt.sort(tt),rt.sort(tt),it.sort(tt),this._weekdaysRegex=new RegExp("^("+it.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+rt.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+nt.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+et.join("|")+")","i")}function hFormat(){return this.hours()%12||12}function kFormat(){return this.hours()||24}addFormatToken("H",["HH",2],0,"hour");addFormatToken("h",["hh",2],0,hFormat);addFormatToken("k",["kk",2],0,kFormat);addFormatToken("hmm",0,0,function(){return""+hFormat.apply(this)+zeroFill(this.minutes(),2)});addFormatToken("hmmss",0,0,function(){return""+hFormat.apply(this)+zeroFill(this.minutes(),2)+zeroFill(this.seconds(),2)});addFormatToken("Hmm",0,0,function(){return""+this.hours()+zeroFill(this.minutes(),2)});addFormatToken("Hmmss",0,0,function(){return""+this.hours()+zeroFill(this.minutes(),2)+zeroFill(this.seconds(),2)});function meridiem(tt,et){addFormatToken(tt,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),et)})}meridiem("a",!0);meridiem("A",!1);addUnitAlias("hour","h");addUnitPriority("hour",13);function matchMeridiem(tt,et){return et._meridiemParse}addRegexToken("a",matchMeridiem);addRegexToken("A",matchMeridiem);addRegexToken("H",match1to2);addRegexToken("h",match1to2);addRegexToken("k",match1to2);addRegexToken("HH",match1to2,match2);addRegexToken("hh",match1to2,match2);addRegexToken("kk",match1to2,match2);addRegexToken("hmm",match3to4);addRegexToken("hmmss",match5to6);addRegexToken("Hmm",match3to4);addRegexToken("Hmmss",match5to6);addParseToken(["H","HH"],HOUR);addParseToken(["k","kk"],function(tt,et,nt){var rt=toInt(tt);et[HOUR]=rt===24?0:rt});addParseToken(["a","A"],function(tt,et,nt){nt._isPm=nt._locale.isPM(tt),nt._meridiem=tt});addParseToken(["h","hh"],function(tt,et,nt){et[HOUR]=toInt(tt),getParsingFlags(nt).bigHour=!0});addParseToken("hmm",function(tt,et,nt){var rt=tt.length-2;et[HOUR]=toInt(tt.substr(0,rt)),et[MINUTE]=toInt(tt.substr(rt)),getParsingFlags(nt).bigHour=!0});addParseToken("hmmss",function(tt,et,nt){var rt=tt.length-4,it=tt.length-2;et[HOUR]=toInt(tt.substr(0,rt)),et[MINUTE]=toInt(tt.substr(rt,2)),et[SECOND]=toInt(tt.substr(it)),getParsingFlags(nt).bigHour=!0});addParseToken("Hmm",function(tt,et,nt){var rt=tt.length-2;et[HOUR]=toInt(tt.substr(0,rt)),et[MINUTE]=toInt(tt.substr(rt))});addParseToken("Hmmss",function(tt,et,nt){var rt=tt.length-4,it=tt.length-2;et[HOUR]=toInt(tt.substr(0,rt)),et[MINUTE]=toInt(tt.substr(rt,2)),et[SECOND]=toInt(tt.substr(it))});function localeIsPM(tt){return(tt+"").toLowerCase().charAt(0)==="p"}var defaultLocaleMeridiemParse=/[ap]\.?m?\.?/i,getSetHour=makeGetSet("Hours",!0);function localeMeridiem(tt,et,nt){return tt>11?nt?"pm":"PM":nt?"am":"AM"}var baseConfig={calendar:defaultCalendar,longDateFormat:defaultLongDateFormat,invalidDate:defaultInvalidDate,ordinal:defaultOrdinal,dayOfMonthOrdinalParse:defaultDayOfMonthOrdinalParse,relativeTime:defaultRelativeTime,months:defaultLocaleMonths,monthsShort:defaultLocaleMonthsShort,week:defaultLocaleWeek,weekdays:defaultLocaleWeekdays,weekdaysMin:defaultLocaleWeekdaysMin,weekdaysShort:defaultLocaleWeekdaysShort,meridiemParse:defaultLocaleMeridiemParse},locales={},localeFamilies={},globalLocale;function commonPrefix(tt,et){var nt,rt=Math.min(tt.length,et.length);for(nt=0;nt0;){if(it=loadLocale(ot.slice(0,nt).join("-")),it)return it;if(rt&&rt.length>=nt&&commonPrefix(ot,rt)>=nt-1)break;nt--}et++}return globalLocale}function isLocaleNameSane(tt){return tt.match("^[^/\\\\]*$")!=null}function loadLocale(tt){var et=null,nt;if(locales[tt]===void 0&&typeof module<"u"&&module&&module.exports&&isLocaleNameSane(tt))try{et=globalLocale._abbr,nt=require,nt("./locale/"+tt),getSetGlobalLocale(et)}catch{locales[tt]=null}return locales[tt]}function getSetGlobalLocale(tt,et){var nt;return tt&&(isUndefined(et)?nt=getLocale(tt):nt=defineLocale(tt,et),nt?globalLocale=nt:typeof console<"u"&&console.warn&&console.warn("Locale "+tt+" not found. Did you forget to load it?")),globalLocale._abbr}function defineLocale(tt,et){if(et!==null){var nt,rt=baseConfig;if(et.abbr=tt,locales[tt]!=null)deprecateSimple("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),rt=locales[tt]._config;else if(et.parentLocale!=null)if(locales[et.parentLocale]!=null)rt=locales[et.parentLocale]._config;else if(nt=loadLocale(et.parentLocale),nt!=null)rt=nt._config;else return localeFamilies[et.parentLocale]||(localeFamilies[et.parentLocale]=[]),localeFamilies[et.parentLocale].push({name:tt,config:et}),null;return locales[tt]=new Locale(mergeConfigs(rt,et)),localeFamilies[tt]&&localeFamilies[tt].forEach(function(it){defineLocale(it.name,it.config)}),getSetGlobalLocale(tt),locales[tt]}else return delete locales[tt],null}function updateLocale(tt,et){if(et!=null){var nt,rt,it=baseConfig;locales[tt]!=null&&locales[tt].parentLocale!=null?locales[tt].set(mergeConfigs(locales[tt]._config,et)):(rt=loadLocale(tt),rt!=null&&(it=rt._config),et=mergeConfigs(it,et),rt==null&&(et.abbr=tt),nt=new Locale(et),nt.parentLocale=locales[tt],locales[tt]=nt),getSetGlobalLocale(tt)}else locales[tt]!=null&&(locales[tt].parentLocale!=null?(locales[tt]=locales[tt].parentLocale,tt===getSetGlobalLocale()&&getSetGlobalLocale(tt)):locales[tt]!=null&&delete locales[tt]);return locales[tt]}function getLocale(tt){var et;if(tt&&tt._locale&&tt._locale._abbr&&(tt=tt._locale._abbr),!tt)return globalLocale;if(!isArray$d(tt)){if(et=loadLocale(tt),et)return et;tt=[tt]}return chooseLocale(tt)}function listLocales(){return keys$4(locales)}function checkOverflow(tt){var et,nt=tt._a;return nt&&getParsingFlags(tt).overflow===-2&&(et=nt[MONTH]<0||nt[MONTH]>11?MONTH:nt[DATE]<1||nt[DATE]>daysInMonth(nt[YEAR],nt[MONTH])?DATE:nt[HOUR]<0||nt[HOUR]>24||nt[HOUR]===24&&(nt[MINUTE]!==0||nt[SECOND]!==0||nt[MILLISECOND]!==0)?HOUR:nt[MINUTE]<0||nt[MINUTE]>59?MINUTE:nt[SECOND]<0||nt[SECOND]>59?SECOND:nt[MILLISECOND]<0||nt[MILLISECOND]>999?MILLISECOND:-1,getParsingFlags(tt)._overflowDayOfYear&&(etDATE)&&(et=DATE),getParsingFlags(tt)._overflowWeeks&&et===-1&&(et=WEEK),getParsingFlags(tt)._overflowWeekday&&et===-1&&(et=WEEKDAY),getParsingFlags(tt).overflow=et),tt}var extendedIsoRegex=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,basicIsoRegex=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,tzRegex=/Z|[+-]\d\d(?::?\d\d)?/,isoDates=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],isoTimes=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],aspNetJsonRegex=/^\/?Date\((-?\d+)/i,rfc2822=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,obsOffsets={UT:0,GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function configFromISO(tt){var et,nt,rt=tt._i,it=extendedIsoRegex.exec(rt)||basicIsoRegex.exec(rt),ot,at,st,lt,ct=isoDates.length,ut=isoTimes.length;if(it){for(getParsingFlags(tt).iso=!0,et=0,nt=ct;etdaysInYear(at)||tt._dayOfYear===0)&&(getParsingFlags(tt)._overflowDayOfYear=!0),nt=createUTCDate(at,0,tt._dayOfYear),tt._a[MONTH]=nt.getUTCMonth(),tt._a[DATE]=nt.getUTCDate()),et=0;et<3&&tt._a[et]==null;++et)tt._a[et]=rt[et]=it[et];for(;et<7;et++)tt._a[et]=rt[et]=tt._a[et]==null?et===2?1:0:tt._a[et];tt._a[HOUR]===24&&tt._a[MINUTE]===0&&tt._a[SECOND]===0&&tt._a[MILLISECOND]===0&&(tt._nextDay=!0,tt._a[HOUR]=0),tt._d=(tt._useUTC?createUTCDate:createDate).apply(null,rt),ot=tt._useUTC?tt._d.getUTCDay():tt._d.getDay(),tt._tzm!=null&&tt._d.setUTCMinutes(tt._d.getUTCMinutes()-tt._tzm),tt._nextDay&&(tt._a[HOUR]=24),tt._w&&typeof tt._w.d<"u"&&tt._w.d!==ot&&(getParsingFlags(tt).weekdayMismatch=!0)}}function dayOfYearFromWeekInfo(tt){var et,nt,rt,it,ot,at,st,lt,ct;et=tt._w,et.GG!=null||et.W!=null||et.E!=null?(ot=1,at=4,nt=defaults$1(et.GG,tt._a[YEAR],weekOfYear(createLocal(),1,4).year),rt=defaults$1(et.W,1),it=defaults$1(et.E,1),(it<1||it>7)&&(lt=!0)):(ot=tt._locale._week.dow,at=tt._locale._week.doy,ct=weekOfYear(createLocal(),ot,at),nt=defaults$1(et.gg,tt._a[YEAR],ct.year),rt=defaults$1(et.w,ct.week),et.d!=null?(it=et.d,(it<0||it>6)&&(lt=!0)):et.e!=null?(it=et.e+ot,(et.e<0||et.e>6)&&(lt=!0)):it=ot),rt<1||rt>weeksInYear(nt,ot,at)?getParsingFlags(tt)._overflowWeeks=!0:lt!=null?getParsingFlags(tt)._overflowWeekday=!0:(st=dayOfYearFromWeeks(nt,rt,it,ot,at),tt._a[YEAR]=st.year,tt._dayOfYear=st.dayOfYear)}hooks.ISO_8601=function(){};hooks.RFC_2822=function(){};function configFromStringAndFormat(tt){if(tt._f===hooks.ISO_8601){configFromISO(tt);return}if(tt._f===hooks.RFC_2822){configFromRFC2822(tt);return}tt._a=[],getParsingFlags(tt).empty=!0;var et=""+tt._i,nt,rt,it,ot,at,st=et.length,lt=0,ct,ut;for(it=expandFormat(tt._f,tt._locale).match(formattingTokens)||[],ut=it.length,nt=0;nt0&&getParsingFlags(tt).unusedInput.push(at),et=et.slice(et.indexOf(rt)+rt.length),lt+=rt.length),formatTokenFunctions[ot]?(rt?getParsingFlags(tt).empty=!1:getParsingFlags(tt).unusedTokens.push(ot),addTimeToArrayFromToken(ot,rt,tt)):tt._strict&&!rt&&getParsingFlags(tt).unusedTokens.push(ot);getParsingFlags(tt).charsLeftOver=st-lt,et.length>0&&getParsingFlags(tt).unusedInput.push(et),tt._a[HOUR]<=12&&getParsingFlags(tt).bigHour===!0&&tt._a[HOUR]>0&&(getParsingFlags(tt).bigHour=void 0),getParsingFlags(tt).parsedDateParts=tt._a.slice(0),getParsingFlags(tt).meridiem=tt._meridiem,tt._a[HOUR]=meridiemFixWrap(tt._locale,tt._a[HOUR],tt._meridiem),ct=getParsingFlags(tt).era,ct!==null&&(tt._a[YEAR]=tt._locale.erasConvertYear(ct,tt._a[YEAR])),configFromArray(tt),checkOverflow(tt)}function meridiemFixWrap(tt,et,nt){var rt;return nt==null?et:tt.meridiemHour!=null?tt.meridiemHour(et,nt):(tt.isPM!=null&&(rt=tt.isPM(nt),rt&&et<12&&(et+=12),!rt&&et===12&&(et=0)),et)}function configFromStringAndArray(tt){var et,nt,rt,it,ot,at,st=!1,lt=tt._f.length;if(lt===0){getParsingFlags(tt).invalidFormat=!0,tt._d=new Date(NaN);return}for(it=0;itthis?this:tt:createInvalid()});function pickBy(tt,et){var nt,rt;if(et.length===1&&isArray$d(et[0])&&(et=et[0]),!et.length)return createLocal();for(nt=et[0],rt=1;rtthis.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function isDaylightSavingTimeShifted(){if(!isUndefined(this._isDSTShifted))return this._isDSTShifted;var tt={},et;return copyConfig(tt,this),tt=prepareConfig(tt),tt._a?(et=tt._isUTC?createUTC(tt._a):createLocal(tt._a),this._isDSTShifted=this.isValid()&&compareArrays(tt._a,et.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function isLocal(){return this.isValid()?!this._isUTC:!1}function isUtcOffset(){return this.isValid()?this._isUTC:!1}function isUtc(){return this.isValid()?this._isUTC&&this._offset===0:!1}var aspNetRegex=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,isoRegex=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function createDuration(tt,et){var nt=tt,rt=null,it,ot,at;return isDuration(tt)?nt={ms:tt._milliseconds,d:tt._days,M:tt._months}:isNumber$3(tt)||!isNaN(+tt)?(nt={},et?nt[et]=+tt:nt.milliseconds=+tt):(rt=aspNetRegex.exec(tt))?(it=rt[1]==="-"?-1:1,nt={y:0,d:toInt(rt[DATE])*it,h:toInt(rt[HOUR])*it,m:toInt(rt[MINUTE])*it,s:toInt(rt[SECOND])*it,ms:toInt(absRound(rt[MILLISECOND]*1e3))*it}):(rt=isoRegex.exec(tt))?(it=rt[1]==="-"?-1:1,nt={y:parseIso(rt[2],it),M:parseIso(rt[3],it),w:parseIso(rt[4],it),d:parseIso(rt[5],it),h:parseIso(rt[6],it),m:parseIso(rt[7],it),s:parseIso(rt[8],it)}):nt==null?nt={}:typeof nt=="object"&&("from"in nt||"to"in nt)&&(at=momentsDifference(createLocal(nt.from),createLocal(nt.to)),nt={},nt.ms=at.milliseconds,nt.M=at.months),ot=new Duration(nt),isDuration(tt)&&hasOwnProp(tt,"_locale")&&(ot._locale=tt._locale),isDuration(tt)&&hasOwnProp(tt,"_isValid")&&(ot._isValid=tt._isValid),ot}createDuration.fn=Duration.prototype;createDuration.invalid=createInvalid$1;function parseIso(tt,et){var nt=tt&&parseFloat(tt.replace(",","."));return(isNaN(nt)?0:nt)*et}function positiveMomentsDifference(tt,et){var nt={};return nt.months=et.month()-tt.month()+(et.year()-tt.year())*12,tt.clone().add(nt.months,"M").isAfter(et)&&--nt.months,nt.milliseconds=+et-+tt.clone().add(nt.months,"M"),nt}function momentsDifference(tt,et){var nt;return tt.isValid()&&et.isValid()?(et=cloneWithOffset(et,tt),tt.isBefore(et)?nt=positiveMomentsDifference(tt,et):(nt=positiveMomentsDifference(et,tt),nt.milliseconds=-nt.milliseconds,nt.months=-nt.months),nt):{milliseconds:0,months:0}}function createAdder(tt,et){return function(nt,rt){var it,ot;return rt!==null&&!isNaN(+rt)&&(deprecateSimple(et,"moment()."+et+"(period, number) is deprecated. Please use moment()."+et+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),ot=nt,nt=rt,rt=ot),it=createDuration(nt,rt),addSubtract(this,it,tt),this}}function addSubtract(tt,et,nt,rt){var it=et._milliseconds,ot=absRound(et._days),at=absRound(et._months);tt.isValid()&&(rt=rt??!0,at&&setMonth(tt,get$3(tt,"Month")+at*nt),ot&&set$1$1(tt,"Date",get$3(tt,"Date")+ot*nt),it&&tt._d.setTime(tt._d.valueOf()+it*nt),rt&&hooks.updateOffset(tt,ot||at))}var add$1=createAdder(1,"add"),subtract$1=createAdder(-1,"subtract");function isString$1(tt){return typeof tt=="string"||tt instanceof String}function isMomentInput(tt){return isMoment(tt)||isDate(tt)||isString$1(tt)||isNumber$3(tt)||isNumberOrStringArray(tt)||isMomentInputObject(tt)||tt===null||tt===void 0}function isMomentInputObject(tt){var et=isObject$6(tt)&&!isObjectEmpty(tt),nt=!1,rt=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],it,ot,at=rt.length;for(it=0;itnt.valueOf():nt.valueOf()9999?formatMoment(nt,et?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):isFunction$1(Date.prototype.toISOString)?et?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",formatMoment(nt,"Z")):formatMoment(nt,et?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function inspect(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var tt="moment",et="",nt,rt,it,ot;return this.isLocal()||(tt=this.utcOffset()===0?"moment.utc":"moment.parseZone",et="Z"),nt="["+tt+'("]',rt=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",it="-MM-DD[T]HH:mm:ss.SSS",ot=et+'[")]',this.format(nt+rt+it+ot)}function format$1(tt){tt||(tt=this.isUtc()?hooks.defaultFormatUtc:hooks.defaultFormat);var et=formatMoment(this,tt);return this.localeData().postformat(et)}function from(tt,et){return this.isValid()&&(isMoment(tt)&&tt.isValid()||createLocal(tt).isValid())?createDuration({to:this,from:tt}).locale(this.locale()).humanize(!et):this.localeData().invalidDate()}function fromNow(tt){return this.from(createLocal(),tt)}function to(tt,et){return this.isValid()&&(isMoment(tt)&&tt.isValid()||createLocal(tt).isValid())?createDuration({from:this,to:tt}).locale(this.locale()).humanize(!et):this.localeData().invalidDate()}function toNow(tt){return this.to(createLocal(),tt)}function locale$2(tt){var et;return tt===void 0?this._locale._abbr:(et=getLocale(tt),et!=null&&(this._locale=et),this)}var lang=deprecate("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(tt){return tt===void 0?this.localeData():this.locale(tt)});function localeData(){return this._locale}var MS_PER_SECOND=1e3,MS_PER_MINUTE=60*MS_PER_SECOND,MS_PER_HOUR=60*MS_PER_MINUTE,MS_PER_400_YEARS=(365*400+97)*24*MS_PER_HOUR;function mod$1(tt,et){return(tt%et+et)%et}function localStartOfDate(tt,et,nt){return tt<100&&tt>=0?new Date(tt+400,et,nt)-MS_PER_400_YEARS:new Date(tt,et,nt).valueOf()}function utcStartOfDate(tt,et,nt){return tt<100&&tt>=0?Date.UTC(tt+400,et,nt)-MS_PER_400_YEARS:Date.UTC(tt,et,nt)}function startOf(tt){var et,nt;if(tt=normalizeUnits(tt),tt===void 0||tt==="millisecond"||!this.isValid())return this;switch(nt=this._isUTC?utcStartOfDate:localStartOfDate,tt){case"year":et=nt(this.year(),0,1);break;case"quarter":et=nt(this.year(),this.month()-this.month()%3,1);break;case"month":et=nt(this.year(),this.month(),1);break;case"week":et=nt(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":et=nt(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":et=nt(this.year(),this.month(),this.date());break;case"hour":et=this._d.valueOf(),et-=mod$1(et+(this._isUTC?0:this.utcOffset()*MS_PER_MINUTE),MS_PER_HOUR);break;case"minute":et=this._d.valueOf(),et-=mod$1(et,MS_PER_MINUTE);break;case"second":et=this._d.valueOf(),et-=mod$1(et,MS_PER_SECOND);break}return this._d.setTime(et),hooks.updateOffset(this,!0),this}function endOf(tt){var et,nt;if(tt=normalizeUnits(tt),tt===void 0||tt==="millisecond"||!this.isValid())return this;switch(nt=this._isUTC?utcStartOfDate:localStartOfDate,tt){case"year":et=nt(this.year()+1,0,1)-1;break;case"quarter":et=nt(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":et=nt(this.year(),this.month()+1,1)-1;break;case"week":et=nt(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":et=nt(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":et=nt(this.year(),this.month(),this.date()+1)-1;break;case"hour":et=this._d.valueOf(),et+=MS_PER_HOUR-mod$1(et+(this._isUTC?0:this.utcOffset()*MS_PER_MINUTE),MS_PER_HOUR)-1;break;case"minute":et=this._d.valueOf(),et+=MS_PER_MINUTE-mod$1(et,MS_PER_MINUTE)-1;break;case"second":et=this._d.valueOf(),et+=MS_PER_SECOND-mod$1(et,MS_PER_SECOND)-1;break}return this._d.setTime(et),hooks.updateOffset(this,!0),this}function valueOf(){return this._d.valueOf()-(this._offset||0)*6e4}function unix(){return Math.floor(this.valueOf()/1e3)}function toDate(){return new Date(this.valueOf())}function toArray$2(){var tt=this;return[tt.year(),tt.month(),tt.date(),tt.hour(),tt.minute(),tt.second(),tt.millisecond()]}function toObject(){var tt=this;return{years:tt.year(),months:tt.month(),date:tt.date(),hours:tt.hours(),minutes:tt.minutes(),seconds:tt.seconds(),milliseconds:tt.milliseconds()}}function toJSON(){return this.isValid()?this.toISOString():null}function isValid$2(){return isValid(this)}function parsingFlags(){return extend$1({},getParsingFlags(this))}function invalidAt(){return getParsingFlags(this).overflow}function creationData(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}addFormatToken("N",0,0,"eraAbbr");addFormatToken("NN",0,0,"eraAbbr");addFormatToken("NNN",0,0,"eraAbbr");addFormatToken("NNNN",0,0,"eraName");addFormatToken("NNNNN",0,0,"eraNarrow");addFormatToken("y",["y",1],"yo","eraYear");addFormatToken("y",["yy",2],0,"eraYear");addFormatToken("y",["yyy",3],0,"eraYear");addFormatToken("y",["yyyy",4],0,"eraYear");addRegexToken("N",matchEraAbbr);addRegexToken("NN",matchEraAbbr);addRegexToken("NNN",matchEraAbbr);addRegexToken("NNNN",matchEraName);addRegexToken("NNNNN",matchEraNarrow);addParseToken(["N","NN","NNN","NNNN","NNNNN"],function(tt,et,nt,rt){var it=nt._locale.erasParse(tt,rt,nt._strict);it?getParsingFlags(nt).era=it:getParsingFlags(nt).invalidEra=tt});addRegexToken("y",matchUnsigned);addRegexToken("yy",matchUnsigned);addRegexToken("yyy",matchUnsigned);addRegexToken("yyyy",matchUnsigned);addRegexToken("yo",matchEraYearOrdinal);addParseToken(["y","yy","yyy","yyyy"],YEAR);addParseToken(["yo"],function(tt,et,nt,rt){var it;nt._locale._eraYearOrdinalRegex&&(it=tt.match(nt._locale._eraYearOrdinalRegex)),nt._locale.eraYearOrdinalParse?et[YEAR]=nt._locale.eraYearOrdinalParse(tt,it):et[YEAR]=parseInt(tt,10)});function localeEras(tt,et){var nt,rt,it,ot=this._eras||getLocale("en")._eras;for(nt=0,rt=ot.length;nt=0)return ot[rt]}function localeErasConvertYear(tt,et){var nt=tt.since<=tt.until?1:-1;return et===void 0?hooks(tt.since).year():hooks(tt.since).year()+(et-tt.offset)*nt}function getEraName(){var tt,et,nt,rt=this.localeData().eras();for(tt=0,et=rt.length;ttot&&(et=ot),setWeekAll.call(this,tt,et,nt,rt,it))}function setWeekAll(tt,et,nt,rt,it){var ot=dayOfYearFromWeeks(tt,et,nt,rt,it),at=createUTCDate(ot.year,0,ot.dayOfYear);return this.year(at.getUTCFullYear()),this.month(at.getUTCMonth()),this.date(at.getUTCDate()),this}addFormatToken("Q",0,"Qo","quarter");addUnitAlias("quarter","Q");addUnitPriority("quarter",7);addRegexToken("Q",match1);addParseToken("Q",function(tt,et){et[MONTH]=(toInt(tt)-1)*3});function getSetQuarter(tt){return tt==null?Math.ceil((this.month()+1)/3):this.month((tt-1)*3+this.month()%3)}addFormatToken("D",["DD",2],"Do","date");addUnitAlias("date","D");addUnitPriority("date",9);addRegexToken("D",match1to2);addRegexToken("DD",match1to2,match2);addRegexToken("Do",function(tt,et){return tt?et._dayOfMonthOrdinalParse||et._ordinalParse:et._dayOfMonthOrdinalParseLenient});addParseToken(["D","DD"],DATE);addParseToken("Do",function(tt,et){et[DATE]=toInt(tt.match(match1to2)[0])});var getSetDayOfMonth=makeGetSet("Date",!0);addFormatToken("DDD",["DDDD",3],"DDDo","dayOfYear");addUnitAlias("dayOfYear","DDD");addUnitPriority("dayOfYear",4);addRegexToken("DDD",match1to3);addRegexToken("DDDD",match3);addParseToken(["DDD","DDDD"],function(tt,et,nt){nt._dayOfYear=toInt(tt)});function getSetDayOfYear(tt){var et=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return tt==null?et:this.add(tt-et,"d")}addFormatToken("m",["mm",2],0,"minute");addUnitAlias("minute","m");addUnitPriority("minute",14);addRegexToken("m",match1to2);addRegexToken("mm",match1to2,match2);addParseToken(["m","mm"],MINUTE);var getSetMinute=makeGetSet("Minutes",!1);addFormatToken("s",["ss",2],0,"second");addUnitAlias("second","s");addUnitPriority("second",15);addRegexToken("s",match1to2);addRegexToken("ss",match1to2,match2);addParseToken(["s","ss"],SECOND);var getSetSecond=makeGetSet("Seconds",!1);addFormatToken("S",0,0,function(){return~~(this.millisecond()/100)});addFormatToken(0,["SS",2],0,function(){return~~(this.millisecond()/10)});addFormatToken(0,["SSS",3],0,"millisecond");addFormatToken(0,["SSSS",4],0,function(){return this.millisecond()*10});addFormatToken(0,["SSSSS",5],0,function(){return this.millisecond()*100});addFormatToken(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3});addFormatToken(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4});addFormatToken(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5});addFormatToken(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6});addUnitAlias("millisecond","ms");addUnitPriority("millisecond",16);addRegexToken("S",match1to3,match1);addRegexToken("SS",match1to3,match2);addRegexToken("SSS",match1to3,match3);var token,getSetMillisecond;for(token="SSSS";token.length<=9;token+="S")addRegexToken(token,matchUnsigned);function parseMs(tt,et){et[MILLISECOND]=toInt(("0."+tt)*1e3)}for(token="S";token.length<=9;token+="S")addParseToken(token,parseMs);getSetMillisecond=makeGetSet("Milliseconds",!1);addFormatToken("z",0,0,"zoneAbbr");addFormatToken("zz",0,0,"zoneName");function getZoneAbbr(){return this._isUTC?"UTC":""}function getZoneName(){return this._isUTC?"Coordinated Universal Time":""}var proto=Moment.prototype;proto.add=add$1;proto.calendar=calendar$1$1;proto.clone=clone$1;proto.diff=diff;proto.endOf=endOf;proto.format=format$1;proto.from=from;proto.fromNow=fromNow;proto.to=to;proto.toNow=toNow;proto.get=stringGet;proto.invalidAt=invalidAt;proto.isAfter=isAfter;proto.isBefore=isBefore;proto.isBetween=isBetween;proto.isSame=isSame;proto.isSameOrAfter=isSameOrAfter;proto.isSameOrBefore=isSameOrBefore;proto.isValid=isValid$2;proto.lang=lang;proto.locale=locale$2;proto.localeData=localeData;proto.max=prototypeMax;proto.min=prototypeMin;proto.parsingFlags=parsingFlags;proto.set=stringSet;proto.startOf=startOf;proto.subtract=subtract$1;proto.toArray=toArray$2;proto.toObject=toObject;proto.toDate=toDate;proto.toISOString=toISOString;proto.inspect=inspect;typeof Symbol<"u"&&Symbol.for!=null&&(proto[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"});proto.toJSON=toJSON;proto.toString=toString$5;proto.unix=unix;proto.valueOf=valueOf;proto.creationData=creationData;proto.eraName=getEraName;proto.eraNarrow=getEraNarrow;proto.eraAbbr=getEraAbbr;proto.eraYear=getEraYear;proto.year=getSetYear;proto.isLeapYear=getIsLeapYear;proto.weekYear=getSetWeekYear;proto.isoWeekYear=getSetISOWeekYear;proto.quarter=proto.quarters=getSetQuarter;proto.month=getSetMonth;proto.daysInMonth=getDaysInMonth;proto.week=proto.weeks=getSetWeek;proto.isoWeek=proto.isoWeeks=getSetISOWeek;proto.weeksInYear=getWeeksInYear;proto.weeksInWeekYear=getWeeksInWeekYear;proto.isoWeeksInYear=getISOWeeksInYear;proto.isoWeeksInISOWeekYear=getISOWeeksInISOWeekYear;proto.date=getSetDayOfMonth;proto.day=proto.days=getSetDayOfWeek;proto.weekday=getSetLocaleDayOfWeek;proto.isoWeekday=getSetISODayOfWeek;proto.dayOfYear=getSetDayOfYear;proto.hour=proto.hours=getSetHour;proto.minute=proto.minutes=getSetMinute;proto.second=proto.seconds=getSetSecond;proto.millisecond=proto.milliseconds=getSetMillisecond;proto.utcOffset=getSetOffset;proto.utc=setOffsetToUTC;proto.local=setOffsetToLocal;proto.parseZone=setOffsetToParsedOffset;proto.hasAlignedHourOffset=hasAlignedHourOffset;proto.isDST=isDaylightSavingTime;proto.isLocal=isLocal;proto.isUtcOffset=isUtcOffset;proto.isUtc=isUtc;proto.isUTC=isUtc;proto.zoneAbbr=getZoneAbbr;proto.zoneName=getZoneName;proto.dates=deprecate("dates accessor is deprecated. Use date instead.",getSetDayOfMonth);proto.months=deprecate("months accessor is deprecated. Use month instead",getSetMonth);proto.years=deprecate("years accessor is deprecated. Use year instead",getSetYear);proto.zone=deprecate("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",getSetZone);proto.isDSTShifted=deprecate("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",isDaylightSavingTimeShifted);function createUnix(tt){return createLocal(tt*1e3)}function createInZone(){return createLocal.apply(null,arguments).parseZone()}function preParsePostFormat(tt){return tt}var proto$1=Locale.prototype;proto$1.calendar=calendar$1;proto$1.longDateFormat=longDateFormat;proto$1.invalidDate=invalidDate;proto$1.ordinal=ordinal$1;proto$1.preparse=preParsePostFormat;proto$1.postformat=preParsePostFormat;proto$1.relativeTime=relativeTime;proto$1.pastFuture=pastFuture;proto$1.set=set$1;proto$1.eras=localeEras;proto$1.erasParse=localeErasParse;proto$1.erasConvertYear=localeErasConvertYear;proto$1.erasAbbrRegex=erasAbbrRegex;proto$1.erasNameRegex=erasNameRegex;proto$1.erasNarrowRegex=erasNarrowRegex;proto$1.months=localeMonths;proto$1.monthsShort=localeMonthsShort;proto$1.monthsParse=localeMonthsParse;proto$1.monthsRegex=monthsRegex;proto$1.monthsShortRegex=monthsShortRegex;proto$1.week=localeWeek;proto$1.firstDayOfYear=localeFirstDayOfYear;proto$1.firstDayOfWeek=localeFirstDayOfWeek;proto$1.weekdays=localeWeekdays;proto$1.weekdaysMin=localeWeekdaysMin;proto$1.weekdaysShort=localeWeekdaysShort;proto$1.weekdaysParse=localeWeekdaysParse;proto$1.weekdaysRegex=weekdaysRegex;proto$1.weekdaysShortRegex=weekdaysShortRegex;proto$1.weekdaysMinRegex=weekdaysMinRegex;proto$1.isPM=localeIsPM;proto$1.meridiem=localeMeridiem;function get$1$1(tt,et,nt,rt){var it=getLocale(),ot=createUTC().set(rt,et);return it[nt](ot,tt)}function listMonthsImpl(tt,et,nt){if(isNumber$3(tt)&&(et=tt,tt=void 0),tt=tt||"",et!=null)return get$1$1(tt,et,nt,"month");var rt,it=[];for(rt=0;rt<12;rt++)it[rt]=get$1$1(tt,rt,nt,"month");return it}function listWeekdaysImpl(tt,et,nt,rt){typeof tt=="boolean"?(isNumber$3(et)&&(nt=et,et=void 0),et=et||""):(et=tt,nt=et,tt=!1,isNumber$3(et)&&(nt=et,et=void 0),et=et||"");var it=getLocale(),ot=tt?it._week.dow:0,at,st=[];if(nt!=null)return get$1$1(et,(nt+ot)%7,rt,"day");for(at=0;at<7;at++)st[at]=get$1$1(et,(at+ot)%7,rt,"day");return st}function listMonths(tt,et){return listMonthsImpl(tt,et,"months")}function listMonthsShort(tt,et){return listMonthsImpl(tt,et,"monthsShort")}function listWeekdays(tt,et,nt){return listWeekdaysImpl(tt,et,nt,"weekdays")}function listWeekdaysShort(tt,et,nt){return listWeekdaysImpl(tt,et,nt,"weekdaysShort")}function listWeekdaysMin(tt,et,nt){return listWeekdaysImpl(tt,et,nt,"weekdaysMin")}getSetGlobalLocale("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(tt){var et=tt%10,nt=toInt(tt%100/10)===1?"th":et===1?"st":et===2?"nd":et===3?"rd":"th";return tt+nt}});hooks.lang=deprecate("moment.lang is deprecated. Use moment.locale instead.",getSetGlobalLocale);hooks.langData=deprecate("moment.langData is deprecated. Use moment.localeData instead.",getLocale);var mathAbs=Math.abs;function abs(){var tt=this._data;return this._milliseconds=mathAbs(this._milliseconds),this._days=mathAbs(this._days),this._months=mathAbs(this._months),tt.milliseconds=mathAbs(tt.milliseconds),tt.seconds=mathAbs(tt.seconds),tt.minutes=mathAbs(tt.minutes),tt.hours=mathAbs(tt.hours),tt.months=mathAbs(tt.months),tt.years=mathAbs(tt.years),this}function addSubtract$1(tt,et,nt,rt){var it=createDuration(et,nt);return tt._milliseconds+=rt*it._milliseconds,tt._days+=rt*it._days,tt._months+=rt*it._months,tt._bubble()}function add$1$1(tt,et){return addSubtract$1(this,tt,et,1)}function subtract$1$1(tt,et){return addSubtract$1(this,tt,et,-1)}function absCeil(tt){return tt<0?Math.floor(tt):Math.ceil(tt)}function bubble(){var tt=this._milliseconds,et=this._days,nt=this._months,rt=this._data,it,ot,at,st,lt;return tt>=0&&et>=0&&nt>=0||tt<=0&&et<=0&&nt<=0||(tt+=absCeil(monthsToDays(nt)+et)*864e5,et=0,nt=0),rt.milliseconds=tt%1e3,it=absFloor(tt/1e3),rt.seconds=it%60,ot=absFloor(it/60),rt.minutes=ot%60,at=absFloor(ot/60),rt.hours=at%24,et+=absFloor(at/24),lt=absFloor(daysToMonths(et)),nt+=lt,et-=absCeil(monthsToDays(lt)),st=absFloor(nt/12),nt%=12,rt.days=et,rt.months=nt,rt.years=st,this}function daysToMonths(tt){return tt*4800/146097}function monthsToDays(tt){return tt*146097/4800}function as(tt){if(!this.isValid())return NaN;var et,nt,rt=this._milliseconds;if(tt=normalizeUnits(tt),tt==="month"||tt==="quarter"||tt==="year")switch(et=this._days+rt/864e5,nt=this._months+daysToMonths(et),tt){case"month":return nt;case"quarter":return nt/3;case"year":return nt/12}else switch(et=this._days+Math.round(monthsToDays(this._months)),tt){case"week":return et/7+rt/6048e5;case"day":return et+rt/864e5;case"hour":return et*24+rt/36e5;case"minute":return et*1440+rt/6e4;case"second":return et*86400+rt/1e3;case"millisecond":return Math.floor(et*864e5)+rt;default:throw new Error("Unknown unit "+tt)}}function valueOf$1(){return this.isValid()?this._milliseconds+this._days*864e5+this._months%12*2592e6+toInt(this._months/12)*31536e6:NaN}function makeAs(tt){return function(){return this.as(tt)}}var asMilliseconds=makeAs("ms"),asSeconds=makeAs("s"),asMinutes=makeAs("m"),asHours=makeAs("h"),asDays=makeAs("d"),asWeeks=makeAs("w"),asMonths=makeAs("M"),asQuarters=makeAs("Q"),asYears=makeAs("y");function clone$1$1(){return createDuration(this)}function get$2$1(tt){return tt=normalizeUnits(tt),this.isValid()?this[tt+"s"]():NaN}function makeGetter(tt){return function(){return this.isValid()?this._data[tt]:NaN}}var milliseconds=makeGetter("milliseconds"),seconds=makeGetter("seconds"),minutes=makeGetter("minutes"),hours=makeGetter("hours"),days=makeGetter("days"),months=makeGetter("months"),years=makeGetter("years");function weeks(){return absFloor(this.days()/7)}var round$1=Math.round,thresholds={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function substituteTimeAgo(tt,et,nt,rt,it){return it.relativeTime(et||1,!!nt,tt,rt)}function relativeTime$1(tt,et,nt,rt){var it=createDuration(tt).abs(),ot=round$1(it.as("s")),at=round$1(it.as("m")),st=round$1(it.as("h")),lt=round$1(it.as("d")),ct=round$1(it.as("M")),ut=round$1(it.as("w")),ht=round$1(it.as("y")),dt=ot<=nt.ss&&["s",ot]||ot0,dt[4]=rt,substituteTimeAgo.apply(null,dt)}function getSetRelativeTimeRounding(tt){return tt===void 0?round$1:typeof tt=="function"?(round$1=tt,!0):!1}function getSetRelativeTimeThreshold(tt,et){return thresholds[tt]===void 0?!1:et===void 0?thresholds[tt]:(thresholds[tt]=et,tt==="s"&&(thresholds.ss=et-1),!0)}function humanize(tt,et){if(!this.isValid())return this.localeData().invalidDate();var nt=!1,rt=thresholds,it,ot;return typeof tt=="object"&&(et=tt,tt=!1),typeof tt=="boolean"&&(nt=tt),typeof et=="object"&&(rt=Object.assign({},thresholds,et),et.s!=null&&et.ss==null&&(rt.ss=et.s-1)),it=this.localeData(),ot=relativeTime$1(this,!nt,rt,it),nt&&(ot=it.pastFuture(+this,ot)),it.postformat(ot)}var abs$1=Math.abs;function sign$1(tt){return(tt>0)-(tt<0)||+tt}function toISOString$1(){if(!this.isValid())return this.localeData().invalidDate();var tt=abs$1(this._milliseconds)/1e3,et=abs$1(this._days),nt=abs$1(this._months),rt,it,ot,at,st=this.asSeconds(),lt,ct,ut,ht;return st?(rt=absFloor(tt/60),it=absFloor(rt/60),tt%=60,rt%=60,ot=absFloor(nt/12),nt%=12,at=tt?tt.toFixed(3).replace(/\.?0+$/,""):"",lt=st<0?"-":"",ct=sign$1(this._months)!==sign$1(st)?"-":"",ut=sign$1(this._days)!==sign$1(st)?"-":"",ht=sign$1(this._milliseconds)!==sign$1(st)?"-":"",lt+"P"+(ot?ct+ot+"Y":"")+(nt?ct+nt+"M":"")+(et?ut+et+"D":"")+(it||rt||tt?"T":"")+(it?ht+it+"H":"")+(rt?ht+rt+"M":"")+(tt?ht+at+"S":"")):"P0D"}var proto$2=Duration.prototype;proto$2.isValid=isValid$1;proto$2.abs=abs;proto$2.add=add$1$1;proto$2.subtract=subtract$1$1;proto$2.as=as;proto$2.asMilliseconds=asMilliseconds;proto$2.asSeconds=asSeconds;proto$2.asMinutes=asMinutes;proto$2.asHours=asHours;proto$2.asDays=asDays;proto$2.asWeeks=asWeeks;proto$2.asMonths=asMonths;proto$2.asQuarters=asQuarters;proto$2.asYears=asYears;proto$2.valueOf=valueOf$1;proto$2._bubble=bubble;proto$2.clone=clone$1$1;proto$2.get=get$2$1;proto$2.milliseconds=milliseconds;proto$2.seconds=seconds;proto$2.minutes=minutes;proto$2.hours=hours;proto$2.days=days;proto$2.weeks=weeks;proto$2.months=months;proto$2.years=years;proto$2.humanize=humanize;proto$2.toISOString=toISOString$1;proto$2.toString=toISOString$1;proto$2.toJSON=toISOString$1;proto$2.locale=locale$2;proto$2.localeData=localeData;proto$2.toIsoString=deprecate("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",toISOString$1);proto$2.lang=lang;addFormatToken("X",0,0,"unix");addFormatToken("x",0,0,"valueOf");addRegexToken("x",matchSigned);addRegexToken("X",matchTimestamp);addParseToken("X",function(tt,et,nt){nt._d=new Date(parseFloat(tt)*1e3)});addParseToken("x",function(tt,et,nt){nt._d=new Date(toInt(tt))});//! moment.js -hooks.version="2.29.4";setHookCallback(createLocal);hooks.fn=proto;hooks.min=min$2;hooks.max=max$2;hooks.now=now$2;hooks.utc=createUTC;hooks.unix=createUnix;hooks.months=listMonths;hooks.isDate=isDate;hooks.locale=getSetGlobalLocale;hooks.invalid=createInvalid;hooks.duration=createDuration;hooks.isMoment=isMoment;hooks.weekdays=listWeekdays;hooks.parseZone=createInZone;hooks.localeData=getLocale;hooks.isDuration=isDuration;hooks.monthsShort=listMonthsShort;hooks.weekdaysMin=listWeekdaysMin;hooks.defineLocale=defineLocale;hooks.updateLocale=updateLocale;hooks.locales=listLocales;hooks.weekdaysShort=listWeekdaysShort;hooks.normalizeUnits=normalizeUnits;hooks.relativeTimeRounding=getSetRelativeTimeRounding;hooks.relativeTimeThreshold=getSetRelativeTimeThreshold;hooks.calendarFormat=getCalendarFormat;hooks.prototype=proto;hooks.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"};var classnames={exports:{}};/*! - Copyright (c) 2018 Jed Watson. - Licensed under the MIT License (MIT), see - http://jedwatson.github.io/classnames -*/(function(tt){(function(){var et={}.hasOwnProperty;function nt(){for(var rt=[],it=0;it0?1:-1},isPercent=function(et){return _isString(et)&&et.indexOf("%")===et.length-1},isNumber=function(et){return _isNumber(et)&&!_isNaN$1(et)},isNumOrStr=function(et){return isNumber(et)||_isString(et)},idCounter=0,uniqueId=function(et){var nt=++idCounter;return"".concat(et||"").concat(nt)},getPercentValue=function(et,nt){var rt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,it=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!isNumber(et)&&!_isString(et))return rt;var ot;if(isPercent(et)){var at=et.indexOf("%");ot=nt*parseFloat(et.slice(0,at))/100}else ot=+et;return _isNaN$1(ot)&&(ot=rt),it&&ot>nt&&(ot=nt),ot},getAnyElementOfObject=function(et){if(!et)return null;var nt=Object.keys(et);return nt&&nt.length?et[nt[0]]:null},hasDuplicate=function(et){if(!_isArray$1(et))return!1;for(var nt=et.length,rt={},it=0;it=0)&&Object.prototype.propertyIsEnumerable.call(tt,rt)&&(nt[rt]=tt[rt])}return nt}function _objectWithoutPropertiesLoose$i(tt,et){if(tt==null)return{};var nt={},rt=Object.keys(tt),it,ot;for(ot=0;ot=0)&&(nt[it]=tt[it]);return nt}function _typeof$D(tt){"@babel/helpers - typeof";return _typeof$D=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(et){return typeof et}:function(et){return et&&typeof Symbol=="function"&&et.constructor===Symbol&&et!==Symbol.prototype?"symbol":typeof et},_typeof$D(tt)}var REACT_BROWSER_EVENT_MAP={click:"onClick",mousedown:"onMouseDown",mouseup:"onMouseUp",mouseover:"onMouseOver",mousemove:"onMouseMove",mouseout:"onMouseOut",mouseenter:"onMouseEnter",mouseleave:"onMouseLeave",touchcancel:"onTouchCancel",touchend:"onTouchEnd",touchmove:"onTouchMove",touchstart:"onTouchStart"},getDisplayName=function(et){return typeof et=="string"?et:et?et.displayName||et.name||"Component":""},lastChildren=null,lastResult=null,toArray$1=function tt(et){if(et===lastChildren&&_isArray$1(lastResult))return lastResult;var nt=[];return reactExports.Children.forEach(et,function(rt){_isNil(rt)||(reactIsExports.isFragment(rt)?nt=nt.concat(tt(rt.props.children)):nt.push(rt))}),lastResult=nt,lastChildren=et,nt};function findAllByType(tt,et){var nt=[],rt=[];return _isArray$1(et)?rt=et.map(function(it){return getDisplayName(it)}):rt=[getDisplayName(et)],toArray$1(tt).forEach(function(it){var ot=_get(it,"type.displayName")||_get(it,"type.name");rt.indexOf(ot)!==-1&&nt.push(it)}),nt}function findChildByType(tt,et){var nt=findAllByType(tt,et);return nt&&nt[0]}var validateWidthHeight=function(et){if(!et||!et.props)return!1;var nt=et.props,rt=nt.width,it=nt.height;return!(!isNumber(rt)||rt<=0||!isNumber(it)||it<=0)},SVG_TAGS=["a","altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","circle","clipPath","color-profile","cursor","defs","desc","ellipse","feBlend","feColormatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","font","font-face","font-face-format","font-face-name","font-face-url","foreignObject","g","glyph","glyphRef","hkern","image","line","lineGradient","marker","mask","metadata","missing-glyph","mpath","path","pattern","polygon","polyline","radialGradient","rect","script","set","stop","style","svg","switch","symbol","text","textPath","title","tref","tspan","use","view","vkern"],isSvgElement=function(et){return et&&et.type&&_isString(et.type)&&SVG_TAGS.indexOf(et.type)>=0},isDotProps=function(et){return et&&_typeof$D(et)==="object"&&"cx"in et&&"cy"in et&&"r"in et},isValidSpreadableProp=function(et,nt,rt,it){var ot,at=(ot=FilteredElementKeyMap==null?void 0:FilteredElementKeyMap[it])!==null&&ot!==void 0?ot:[];return!_isFunction$1(et)&&(it&&at.includes(nt)||SVGElementPropKeys.includes(nt))||rt&&EventKeys.includes(nt)},filterProps=function(et,nt,rt){if(!et||typeof et=="function"||typeof et=="boolean")return null;var it=et;if(reactExports.isValidElement(et)&&(it=et.props),!_isObject$1(it))return null;var ot={};return Object.keys(it).forEach(function(at){var st;isValidSpreadableProp((st=it)===null||st===void 0?void 0:st[at],at,nt,rt)&&(ot[at]=it[at])}),ot},isChildrenEqual=function tt(et,nt){if(et===nt)return!0;var rt=reactExports.Children.count(et);if(rt!==reactExports.Children.count(nt))return!1;if(rt===0)return!0;if(rt===1)return isSingleChildEqual(_isArray$1(et)?et[0]:et,_isArray$1(nt)?nt[0]:nt);for(var it=0;it=0)&&Object.prototype.propertyIsEnumerable.call(tt,rt)&&(nt[rt]=tt[rt])}return nt}function _objectWithoutPropertiesLoose$h(tt,et){if(tt==null)return{};var nt={},rt=Object.keys(tt),it,ot;for(ot=0;ot=0)&&(nt[it]=tt[it]);return nt}function Surface(tt){var et=tt.children,nt=tt.width,rt=tt.height,it=tt.viewBox,ot=tt.className,at=tt.style,st=_objectWithoutProperties$h(tt,_excluded$h),lt=it||{width:nt,height:rt,x:0,y:0},ct=classNames("recharts-surface",ot);return React$1.createElement("svg",_extends$r({},filterProps(st,!0,"svg"),{className:ct,width:nt,height:rt,style:at,viewBox:"".concat(lt.x," ").concat(lt.y," ").concat(lt.width," ").concat(lt.height)}),React$1.createElement("title",null,tt.title),React$1.createElement("desc",null,tt.desc),et)}var _excluded$g=["children","className"];function _extends$q(){return _extends$q=Object.assign?Object.assign.bind():function(tt){for(var et=1;et=0)&&Object.prototype.propertyIsEnumerable.call(tt,rt)&&(nt[rt]=tt[rt])}return nt}function _objectWithoutPropertiesLoose$g(tt,et){if(tt==null)return{};var nt={},rt=Object.keys(tt),it,ot;for(ot=0;ot=0)&&(nt[it]=tt[it]);return nt}var Layer=React$1.forwardRef(function(tt,et){var nt=tt.children,rt=tt.className,it=_objectWithoutProperties$g(tt,_excluded$g),ot=classNames("recharts-layer",rt);return React$1.createElement("g",_extends$q({className:ot},filterProps(it,!0),{ref:et}),nt)}),HASH_UNDEFINED="__lodash_hash_undefined__";function setCacheAdd$1(tt){return this.__data__.set(tt,HASH_UNDEFINED),this}var _setCacheAdd=setCacheAdd$1;function setCacheHas$1(tt){return this.__data__.has(tt)}var _setCacheHas=setCacheHas$1,MapCache=_MapCache,setCacheAdd=_setCacheAdd,setCacheHas=_setCacheHas;function SetCache$2(tt){var et=-1,nt=tt==null?0:tt.length;for(this.__data__=new MapCache;++etst))return!1;var ct=ot.get(tt),ut=ot.get(et);if(ct&&ut)return ct==et&&ut==tt;var ht=-1,dt=!0,pt=nt&COMPARE_UNORDERED_FLAG$3?new SetCache$1:void 0;for(ot.set(tt,et),ot.set(et,tt);++ht-1}var _arrayIncludes=arrayIncludes$1;function arrayIncludesWith$1(tt,et,nt){for(var rt=-1,it=tt==null?0:tt.length;++rt=LARGE_ARRAY_SIZE){var ct=et?null:createSet(tt);if(ct)return setToArray(ct);at=!1,it=cacheHas,lt=new SetCache}else lt=et?[]:st;e:for(;++rt2?rt-2:0),ot=2;otit?0:it+et),nt=nt>it?it:nt,nt<0&&(nt+=it),it=et>nt?0:nt-et>>>0,et>>>=0;for(var ot=Array(it);++rt=rt?tt:baseSlice(tt,et,nt)}var _castSlice=castSlice$1,rsAstralRange$1="\\ud800-\\udfff",rsComboMarksRange$1="\\u0300-\\u036f",reComboHalfMarksRange$1="\\ufe20-\\ufe2f",rsComboSymbolsRange$1="\\u20d0-\\u20ff",rsComboRange$1=rsComboMarksRange$1+reComboHalfMarksRange$1+rsComboSymbolsRange$1,rsVarRange$1="\\ufe0e\\ufe0f",rsZWJ$1="\\u200d",reHasUnicode=RegExp("["+rsZWJ$1+rsAstralRange$1+rsComboRange$1+rsVarRange$1+"]");function hasUnicode$2(tt){return reHasUnicode.test(tt)}var _hasUnicode=hasUnicode$2;function asciiToArray$1(tt){return tt.split("")}var _asciiToArray=asciiToArray$1,rsAstralRange="\\ud800-\\udfff",rsComboMarksRange="\\u0300-\\u036f",reComboHalfMarksRange="\\ufe20-\\ufe2f",rsComboSymbolsRange="\\u20d0-\\u20ff",rsComboRange=rsComboMarksRange+reComboHalfMarksRange+rsComboSymbolsRange,rsVarRange="\\ufe0e\\ufe0f",rsAstral="["+rsAstralRange+"]",rsCombo="["+rsComboRange+"]",rsFitz="\\ud83c[\\udffb-\\udfff]",rsModifier="(?:"+rsCombo+"|"+rsFitz+")",rsNonAstral="[^"+rsAstralRange+"]",rsRegional="(?:\\ud83c[\\udde6-\\uddff]){2}",rsSurrPair="[\\ud800-\\udbff][\\udc00-\\udfff]",rsZWJ="\\u200d",reOptMod=rsModifier+"?",rsOptVar="["+rsVarRange+"]?",rsOptJoin="(?:"+rsZWJ+"(?:"+[rsNonAstral,rsRegional,rsSurrPair].join("|")+")"+rsOptVar+reOptMod+")*",rsSeq=rsOptVar+reOptMod+rsOptJoin,rsSymbol="(?:"+[rsNonAstral+rsCombo+"?",rsCombo,rsRegional,rsSurrPair,rsAstral].join("|")+")",reUnicode=RegExp(rsFitz+"(?="+rsFitz+")|"+rsSymbol+rsSeq,"g");function unicodeToArray$1(tt){return tt.match(reUnicode)||[]}var _unicodeToArray=unicodeToArray$1,asciiToArray=_asciiToArray,hasUnicode$1=_hasUnicode,unicodeToArray=_unicodeToArray;function stringToArray$1(tt){return hasUnicode$1(tt)?unicodeToArray(tt):asciiToArray(tt)}var _stringToArray=stringToArray$1,castSlice=_castSlice,hasUnicode=_hasUnicode,stringToArray=_stringToArray,toString$2=toString_1;function createCaseFirst$1(tt){return function(et){et=toString$2(et);var nt=hasUnicode(et)?stringToArray(et):void 0,rt=nt?nt[0]:et.charAt(0),it=nt?castSlice(nt,1).join(""):et.slice(1);return rt[tt]()+it}}var _createCaseFirst=createCaseFirst$1,createCaseFirst=_createCaseFirst,upperFirst=createCaseFirst("toUpperCase"),upperFirst_1=upperFirst;const _upperFirst=getDefaultExportFromCjs(upperFirst_1);function constant$6(tt){return function(){return tt}}const cos=Math.cos,sin=Math.sin,sqrt$1=Math.sqrt,pi$2=Math.PI,tau$1=2*pi$2,pi$1=Math.PI,tau=2*pi$1,epsilon=1e-6,tauEpsilon=tau-epsilon;function append(tt){this._+=tt[0];for(let et=1,nt=tt.length;et=0))throw new Error(`invalid digits: ${tt}`);if(et>15)return append;const nt=10**et;return function(rt){this._+=rt[0];for(let it=1,ot=rt.length;itepsilon)if(!(Math.abs(ht*lt-ct*ut)>epsilon)||!ot)this._append`L${this._x1=et},${this._y1=nt}`;else{let pt=rt-at,mt=it-st,gt=lt*lt+ct*ct,yt=pt*pt+mt*mt,bt=Math.sqrt(gt),vt=Math.sqrt(dt),xt=ot*Math.tan((pi$1-Math.acos((gt+dt-yt)/(2*bt*vt)))/2),kt=xt/vt,St=xt/bt;Math.abs(kt-1)>epsilon&&this._append`L${et+kt*ut},${nt+kt*ht}`,this._append`A${ot},${ot},0,0,${+(ht*pt>ut*mt)},${this._x1=et+St*lt},${this._y1=nt+St*ct}`}}arc(et,nt,rt,it,ot,at){if(et=+et,nt=+nt,rt=+rt,at=!!at,rt<0)throw new Error(`negative radius: ${rt}`);let st=rt*Math.cos(it),lt=rt*Math.sin(it),ct=et+st,ut=nt+lt,ht=1^at,dt=at?it-ot:ot-it;this._x1===null?this._append`M${ct},${ut}`:(Math.abs(this._x1-ct)>epsilon||Math.abs(this._y1-ut)>epsilon)&&this._append`L${ct},${ut}`,rt&&(dt<0&&(dt=dt%tau+tau),dt>tauEpsilon?this._append`A${rt},${rt},0,1,${ht},${et-st},${nt-lt}A${rt},${rt},0,1,${ht},${this._x1=ct},${this._y1=ut}`:dt>epsilon&&this._append`A${rt},${rt},0,${+(dt>=pi$1)},${ht},${this._x1=et+rt*Math.cos(ot)},${this._y1=nt+rt*Math.sin(ot)}`)}rect(et,nt,rt,it){this._append`M${this._x0=this._x1=+et},${this._y0=this._y1=+nt}h${rt=+rt}v${+it}h${-rt}Z`}toString(){return this._}}function withPath(tt){let et=3;return tt.digits=function(nt){if(!arguments.length)return et;if(nt==null)et=null;else{const rt=Math.floor(nt);if(!(rt>=0))throw new RangeError(`invalid digits: ${nt}`);et=rt}return tt},()=>new Path(et)}function array$2(tt){return typeof tt=="object"&&"length"in tt?tt:Array.from(tt)}function Linear(tt){this._context=tt}Linear.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(tt,et){switch(tt=+tt,et=+et,this._point){case 0:this._point=1,this._line?this._context.lineTo(tt,et):this._context.moveTo(tt,et);break;case 1:this._point=2;default:this._context.lineTo(tt,et);break}}};function curveLinear(tt){return new Linear(tt)}function x(tt){return tt[0]}function y(tt){return tt[1]}function shapeLine(tt,et){var nt=constant$6(!0),rt=null,it=curveLinear,ot=null,at=withPath(st);tt=typeof tt=="function"?tt:tt===void 0?x:constant$6(tt),et=typeof et=="function"?et:et===void 0?y:constant$6(et);function st(lt){var ct,ut=(lt=array$2(lt)).length,ht,dt=!1,pt;for(rt==null&&(ot=it(pt=at())),ct=0;ct<=ut;++ct)!(ct=pt;--mt)st.point(xt[mt],kt[mt]);st.lineEnd(),st.areaEnd()}bt&&(xt[dt]=+tt(yt,dt,ht),kt[dt]=+et(yt,dt,ht),st.point(rt?+rt(yt,dt,ht):xt[dt],nt?+nt(yt,dt,ht):kt[dt]))}if(vt)return st=null,vt+""||null}function ut(){return shapeLine().defined(it).curve(at).context(ot)}return ct.x=function(ht){return arguments.length?(tt=typeof ht=="function"?ht:constant$6(+ht),rt=null,ct):tt},ct.x0=function(ht){return arguments.length?(tt=typeof ht=="function"?ht:constant$6(+ht),ct):tt},ct.x1=function(ht){return arguments.length?(rt=ht==null?null:typeof ht=="function"?ht:constant$6(+ht),ct):rt},ct.y=function(ht){return arguments.length?(et=typeof ht=="function"?ht:constant$6(+ht),nt=null,ct):et},ct.y0=function(ht){return arguments.length?(et=typeof ht=="function"?ht:constant$6(+ht),ct):et},ct.y1=function(ht){return arguments.length?(nt=ht==null?null:typeof ht=="function"?ht:constant$6(+ht),ct):nt},ct.lineX0=ct.lineY0=function(){return ut().x(tt).y(et)},ct.lineY1=function(){return ut().x(tt).y(nt)},ct.lineX1=function(){return ut().x(rt).y(et)},ct.defined=function(ht){return arguments.length?(it=typeof ht=="function"?ht:constant$6(!!ht),ct):it},ct.curve=function(ht){return arguments.length?(at=ht,ot!=null&&(st=at(ot)),ct):at},ct.context=function(ht){return arguments.length?(ht==null?ot=st=null:st=at(ot=ht),ct):ot},ct}class Bump{constructor(et,nt){this._context=et,this._x=nt}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(et,nt){switch(et=+et,nt=+nt,this._point){case 0:{this._point=1,this._line?this._context.lineTo(et,nt):this._context.moveTo(et,nt);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+et)/2,this._y0,this._x0,nt,et,nt):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+nt)/2,et,this._y0,et,nt);break}}this._x0=et,this._y0=nt}}function bumpX(tt){return new Bump(tt,!0)}function bumpY(tt){return new Bump(tt,!1)}const symbolCircle={draw(tt,et){const nt=sqrt$1(et/pi$2);tt.moveTo(nt,0),tt.arc(0,0,nt,0,tau$1)}},symbolCross={draw(tt,et){const nt=sqrt$1(et/5)/2;tt.moveTo(-3*nt,-nt),tt.lineTo(-nt,-nt),tt.lineTo(-nt,-3*nt),tt.lineTo(nt,-3*nt),tt.lineTo(nt,-nt),tt.lineTo(3*nt,-nt),tt.lineTo(3*nt,nt),tt.lineTo(nt,nt),tt.lineTo(nt,3*nt),tt.lineTo(-nt,3*nt),tt.lineTo(-nt,nt),tt.lineTo(-3*nt,nt),tt.closePath()}},tan30=sqrt$1(1/3),tan30_2=tan30*2,symbolDiamond={draw(tt,et){const nt=sqrt$1(et/tan30_2),rt=nt*tan30;tt.moveTo(0,-nt),tt.lineTo(rt,0),tt.lineTo(0,nt),tt.lineTo(-rt,0),tt.closePath()}},symbolSquare={draw(tt,et){const nt=sqrt$1(et),rt=-nt/2;tt.rect(rt,rt,nt,nt)}},ka=.8908130915292852,kr=sin(pi$2/10)/sin(7*pi$2/10),kx=sin(tau$1/10)*kr,ky=-cos(tau$1/10)*kr,symbolStar={draw(tt,et){const nt=sqrt$1(et*ka),rt=kx*nt,it=ky*nt;tt.moveTo(0,-nt),tt.lineTo(rt,it);for(let ot=1;ot<5;++ot){const at=tau$1*ot/5,st=cos(at),lt=sin(at);tt.lineTo(lt*nt,-st*nt),tt.lineTo(st*rt-lt*it,lt*rt+st*it)}tt.closePath()}},sqrt3=sqrt$1(3),symbolTriangle={draw(tt,et){const nt=-sqrt$1(et/(sqrt3*3));tt.moveTo(0,nt*2),tt.lineTo(-sqrt3*nt,-nt),tt.lineTo(sqrt3*nt,-nt),tt.closePath()}},c=-.5,s=sqrt$1(3)/2,k=1/sqrt$1(12),a=(k/2+1)*3,symbolWye={draw(tt,et){const nt=sqrt$1(et/a),rt=nt/2,it=nt*k,ot=rt,at=nt*k+nt,st=-ot,lt=at;tt.moveTo(rt,it),tt.lineTo(ot,at),tt.lineTo(st,lt),tt.lineTo(c*rt-s*it,s*rt+c*it),tt.lineTo(c*ot-s*at,s*ot+c*at),tt.lineTo(c*st-s*lt,s*st+c*lt),tt.lineTo(c*rt+s*it,c*it-s*rt),tt.lineTo(c*ot+s*at,c*at-s*ot),tt.lineTo(c*st+s*lt,c*lt-s*st),tt.closePath()}};function Symbol$2(tt,et){let nt=null,rt=withPath(it);tt=typeof tt=="function"?tt:constant$6(tt||symbolCircle),et=typeof et=="function"?et:constant$6(et===void 0?64:+et);function it(){let ot;if(nt||(nt=ot=rt()),tt.apply(this,arguments).draw(nt,+et.apply(this,arguments)),ot)return nt=null,ot+""||null}return it.type=function(ot){return arguments.length?(tt=typeof ot=="function"?ot:constant$6(ot),it):tt},it.size=function(ot){return arguments.length?(et=typeof ot=="function"?ot:constant$6(+ot),it):et},it.context=function(ot){return arguments.length?(nt=ot??null,it):nt},it}function noop$2(){}function point$2(tt,et,nt){tt._context.bezierCurveTo((2*tt._x0+tt._x1)/3,(2*tt._y0+tt._y1)/3,(tt._x0+2*tt._x1)/3,(tt._y0+2*tt._y1)/3,(tt._x0+4*tt._x1+et)/6,(tt._y0+4*tt._y1+nt)/6)}function Basis(tt){this._context=tt}Basis.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:point$2(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(tt,et){switch(tt=+tt,et=+et,this._point){case 0:this._point=1,this._line?this._context.lineTo(tt,et):this._context.moveTo(tt,et);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:point$2(this,tt,et);break}this._x0=this._x1,this._x1=tt,this._y0=this._y1,this._y1=et}};function curveBasis(tt){return new Basis(tt)}function BasisClosed(tt){this._context=tt}BasisClosed.prototype={areaStart:noop$2,areaEnd:noop$2,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(tt,et){switch(tt=+tt,et=+et,this._point){case 0:this._point=1,this._x2=tt,this._y2=et;break;case 1:this._point=2,this._x3=tt,this._y3=et;break;case 2:this._point=3,this._x4=tt,this._y4=et,this._context.moveTo((this._x0+4*this._x1+tt)/6,(this._y0+4*this._y1+et)/6);break;default:point$2(this,tt,et);break}this._x0=this._x1,this._x1=tt,this._y0=this._y1,this._y1=et}};function curveBasisClosed(tt){return new BasisClosed(tt)}function BasisOpen(tt){this._context=tt}BasisOpen.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(tt,et){switch(tt=+tt,et=+et,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var nt=(this._x0+4*this._x1+tt)/6,rt=(this._y0+4*this._y1+et)/6;this._line?this._context.lineTo(nt,rt):this._context.moveTo(nt,rt);break;case 3:this._point=4;default:point$2(this,tt,et);break}this._x0=this._x1,this._x1=tt,this._y0=this._y1,this._y1=et}};function curveBasisOpen(tt){return new BasisOpen(tt)}function LinearClosed(tt){this._context=tt}LinearClosed.prototype={areaStart:noop$2,areaEnd:noop$2,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(tt,et){tt=+tt,et=+et,this._point?this._context.lineTo(tt,et):(this._point=1,this._context.moveTo(tt,et))}};function curveLinearClosed(tt){return new LinearClosed(tt)}function sign(tt){return tt<0?-1:1}function slope3(tt,et,nt){var rt=tt._x1-tt._x0,it=et-tt._x1,ot=(tt._y1-tt._y0)/(rt||it<0&&-0),at=(nt-tt._y1)/(it||rt<0&&-0),st=(ot*it+at*rt)/(rt+it);return(sign(ot)+sign(at))*Math.min(Math.abs(ot),Math.abs(at),.5*Math.abs(st))||0}function slope2(tt,et){var nt=tt._x1-tt._x0;return nt?(3*(tt._y1-tt._y0)/nt-et)/2:et}function point$1(tt,et,nt){var rt=tt._x0,it=tt._y0,ot=tt._x1,at=tt._y1,st=(ot-rt)/3;tt._context.bezierCurveTo(rt+st,it+st*et,ot-st,at-st*nt,ot,at)}function MonotoneX(tt){this._context=tt}MonotoneX.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:point$1(this,this._t0,slope2(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(tt,et){var nt=NaN;if(tt=+tt,et=+et,!(tt===this._x1&&et===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(tt,et):this._context.moveTo(tt,et);break;case 1:this._point=2;break;case 2:this._point=3,point$1(this,slope2(this,nt=slope3(this,tt,et)),nt);break;default:point$1(this,this._t0,nt=slope3(this,tt,et));break}this._x0=this._x1,this._x1=tt,this._y0=this._y1,this._y1=et,this._t0=nt}}};function MonotoneY(tt){this._context=new ReflectContext(tt)}(MonotoneY.prototype=Object.create(MonotoneX.prototype)).point=function(tt,et){MonotoneX.prototype.point.call(this,et,tt)};function ReflectContext(tt){this._context=tt}ReflectContext.prototype={moveTo:function(tt,et){this._context.moveTo(et,tt)},closePath:function(){this._context.closePath()},lineTo:function(tt,et){this._context.lineTo(et,tt)},bezierCurveTo:function(tt,et,nt,rt,it,ot){this._context.bezierCurveTo(et,tt,rt,nt,ot,it)}};function monotoneX(tt){return new MonotoneX(tt)}function monotoneY(tt){return new MonotoneY(tt)}function Natural(tt){this._context=tt}Natural.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var tt=this._x,et=this._y,nt=tt.length;if(nt)if(this._line?this._context.lineTo(tt[0],et[0]):this._context.moveTo(tt[0],et[0]),nt===2)this._context.lineTo(tt[1],et[1]);else for(var rt=controlPoints(tt),it=controlPoints(et),ot=0,at=1;at=0;--et)it[et]=(at[et]-it[et+1])/ot[et];for(ot[nt-1]=(tt[nt]+it[nt-1])/2,et=0;et=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(tt,et){switch(tt=+tt,et=+et,this._point){case 0:this._point=1,this._line?this._context.lineTo(tt,et):this._context.moveTo(tt,et);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,et),this._context.lineTo(tt,et);else{var nt=this._x*(1-this._t)+tt*this._t;this._context.lineTo(nt,this._y),this._context.lineTo(nt,et)}break}}this._x=tt,this._y=et}};function curveStep(tt){return new Step(tt,.5)}function stepBefore(tt){return new Step(tt,0)}function stepAfter(tt){return new Step(tt,1)}function stackOffsetNone(tt,et){if((at=tt.length)>1)for(var nt=1,rt,it,ot=tt[et[0]],at,st=ot.length;nt=0;)nt[et]=et;return nt}function stackValue(tt,et){return tt[et]}function stackSeries(tt){const et=[];return et.key=tt,et}function shapeStack(){var tt=constant$6([]),et=stackOrderNone,nt=stackOffsetNone,rt=stackValue;function it(ot){var at=Array.from(tt.apply(this,arguments),stackSeries),st,lt=at.length,ct=-1,ut;for(const ht of ot)for(st=0,++ct;st0){for(var nt,rt,it=0,ot=tt[0].length,at;it0){for(var nt=0,rt=tt[et[0]],it,ot=rt.length;nt0)||!((ot=(it=tt[et[0]]).length)>0))){for(var nt=0,rt=1,it,ot,at;rt=0)&&Object.prototype.propertyIsEnumerable.call(tt,rt)&&(nt[rt]=tt[rt])}return nt}function _objectWithoutPropertiesLoose$f(tt,et){if(tt==null)return{};var nt={},rt=Object.keys(tt),it,ot;for(ot=0;ot=0)&&(nt[it]=tt[it]);return nt}var symbolFactories={symbolCircle,symbolCross,symbolDiamond,symbolSquare,symbolStar,symbolTriangle,symbolWye},RADIAN$1=Math.PI/180,getSymbolFactory=function(et){var nt="symbol".concat(_upperFirst(et));return symbolFactories[nt]||symbolCircle},calculateAreaSize=function(et,nt,rt){if(nt==="area")return et;switch(rt){case"cross":return 5*et*et/9;case"diamond":return .5*et*et/Math.sqrt(3);case"square":return et*et;case"star":{var it=18*RADIAN$1;return 1.25*et*et*(Math.tan(it)-Math.tan(it*2)*Math.pow(Math.tan(it),2))}case"triangle":return Math.sqrt(3)*et*et/4;case"wye":return(21-10*Math.sqrt(3))*et*et/8;default:return Math.PI*et*et/4}},registerSymbol=function(et,nt){symbolFactories["symbol".concat(_upperFirst(et))]=nt},Symbols=function(et){var nt=et.type,rt=nt===void 0?"circle":nt,it=et.size,ot=it===void 0?64:it,at=et.sizeType,st=at===void 0?"area":at,lt=_objectWithoutProperties$f(et,_excluded$f),ct=_objectSpread$z(_objectSpread$z({},lt),{},{type:rt,size:ot,sizeType:st}),ut=function(){var yt=getSymbolFactory(rt),bt=Symbol$2().type(yt).size(calculateAreaSize(ot,st,rt));return bt()},ht=ct.className,dt=ct.cx,pt=ct.cy,mt=filterProps(ct,!0);return dt===+dt&&pt===+pt&&ot===+ot?React$1.createElement("path",_extends$p({},mt,{className:classNames("recharts-symbols",ht),transform:"translate(".concat(dt,", ").concat(pt,")"),d:ut()})):null};Symbols.registerSymbol=registerSymbol;function _typeof$B(tt){"@babel/helpers - typeof";return _typeof$B=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(et){return typeof et}:function(et){return et&&typeof Symbol=="function"&&et.constructor===Symbol&&et!==Symbol.prototype?"symbol":typeof et},_typeof$B(tt)}function _extends$o(){return _extends$o=Object.assign?Object.assign.bind():function(tt){for(var et=1;et"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function _getPrototypeOf$b(tt){return _getPrototypeOf$b=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(nt){return nt.__proto__||Object.getPrototypeOf(nt)},_getPrototypeOf$b(tt)}function _defineProperty$z(tt,et,nt){return et=_toPropertyKey$z(et),et in tt?Object.defineProperty(tt,et,{value:nt,enumerable:!0,configurable:!0,writable:!0}):tt[et]=nt,tt}function _toPropertyKey$z(tt){var et=_toPrimitive$z(tt,"string");return _typeof$B(et)==="symbol"?et:String(et)}function _toPrimitive$z(tt,et){if(_typeof$B(tt)!=="object"||tt===null)return tt;var nt=tt[Symbol.toPrimitive];if(nt!==void 0){var rt=nt.call(tt,et||"default");if(_typeof$B(rt)!=="object")return rt;throw new TypeError("@@toPrimitive must return a primitive value.")}return(et==="string"?String:Number)(tt)}var SIZE=32,DefaultLegendContent=function(tt){_inherits$b(nt,tt);var et=_createSuper$b(nt);function nt(){return _classCallCheck$e(this,nt),et.apply(this,arguments)}return _createClass$e(nt,[{key:"renderIcon",value:function(it){var ot=this.props.inactiveColor,at=SIZE/2,st=SIZE/6,lt=SIZE/3,ct=it.inactive?ot:it.color;if(it.type==="plainline")return React$1.createElement("line",{strokeWidth:4,fill:"none",stroke:ct,strokeDasharray:it.payload.strokeDasharray,x1:0,y1:at,x2:SIZE,y2:at,className:"recharts-legend-icon"});if(it.type==="line")return React$1.createElement("path",{strokeWidth:4,fill:"none",stroke:ct,d:"M0,".concat(at,"h").concat(lt,` - A`).concat(st,",").concat(st,",0,1,1,").concat(2*lt,",").concat(at,` - H`).concat(SIZE,"M").concat(2*lt,",").concat(at,` - A`).concat(st,",").concat(st,",0,1,1,").concat(lt,",").concat(at),className:"recharts-legend-icon"});if(it.type==="rect")return React$1.createElement("path",{stroke:"none",fill:ct,d:"M0,".concat(SIZE/8,"h").concat(SIZE,"v").concat(SIZE*3/4,"h").concat(-SIZE,"z"),className:"recharts-legend-icon"});if(React$1.isValidElement(it.legendIcon)){var ut=_objectSpread$y({},it);return delete ut.legendIcon,React$1.cloneElement(it.legendIcon,ut)}return React$1.createElement(Symbols,{fill:ct,cx:at,cy:at,size:SIZE,sizeType:"diameter",type:it.type})}},{key:"renderItems",value:function(){var it=this,ot=this.props,at=ot.payload,st=ot.iconSize,lt=ot.layout,ct=ot.formatter,ut=ot.inactiveColor,ht={x:0,y:0,width:SIZE,height:SIZE},dt={display:lt==="horizontal"?"inline-block":"block",marginRight:10},pt={display:"inline-block",verticalAlign:"middle",marginRight:4};return at.map(function(mt,gt){var yt,bt=mt.formatter||ct,vt=classNames((yt={"recharts-legend-item":!0},_defineProperty$z(yt,"legend-item-".concat(gt),!0),_defineProperty$z(yt,"inactive",mt.inactive),yt));if(mt.type==="none")return null;var xt=_isFunction$1(mt.value)?null:mt.value;warn(!_isFunction$1(mt.value),`The name property is also required when using a function for the dataKey of a chart's cartesian components. Ex: `);var kt=mt.inactive?ut:mt.color;return React$1.createElement("li",_extends$o({className:vt,style:dt,key:"legend-item-".concat(gt)},adaptEventsOfChild(it.props,mt,gt)),React$1.createElement(Surface,{width:st,height:st,viewBox:ht,style:pt},it.renderIcon(mt)),React$1.createElement("span",{className:"recharts-legend-item-text",style:{color:kt}},bt?bt(xt,mt,gt):xt))})}},{key:"render",value:function(){var it=this.props,ot=it.payload,at=it.layout,st=it.align;if(!ot||!ot.length)return null;var lt={padding:0,margin:0,textAlign:at==="horizontal"?st:"left"};return React$1.createElement("ul",{className:"recharts-default-legend",style:lt},this.renderItems())}}]),nt}(reactExports.PureComponent);_defineProperty$z(DefaultLegendContent,"displayName","Legend");_defineProperty$z(DefaultLegendContent,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});function _typeof$A(tt){"@babel/helpers - typeof";return _typeof$A=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(et){return typeof et}:function(et){return et&&typeof Symbol=="function"&&et.constructor===Symbol&&et!==Symbol.prototype?"symbol":typeof et},_typeof$A(tt)}var _excluded$e=["ref"];function ownKeys$x(tt,et){var nt=Object.keys(tt);if(Object.getOwnPropertySymbols){var rt=Object.getOwnPropertySymbols(tt);et&&(rt=rt.filter(function(it){return Object.getOwnPropertyDescriptor(tt,it).enumerable})),nt.push.apply(nt,rt)}return nt}function _objectSpread$x(tt){for(var et=1;et"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function _getPrototypeOf$a(tt){return _getPrototypeOf$a=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(nt){return nt.__proto__||Object.getPrototypeOf(nt)},_getPrototypeOf$a(tt)}function _defineProperty$y(tt,et,nt){return et=_toPropertyKey$y(et),et in tt?Object.defineProperty(tt,et,{value:nt,enumerable:!0,configurable:!0,writable:!0}):tt[et]=nt,tt}function _toPropertyKey$y(tt){var et=_toPrimitive$y(tt,"string");return _typeof$A(et)==="symbol"?et:String(et)}function _toPrimitive$y(tt,et){if(_typeof$A(tt)!=="object"||tt===null)return tt;var nt=tt[Symbol.toPrimitive];if(nt!==void 0){var rt=nt.call(tt,et||"default");if(_typeof$A(rt)!=="object")return rt;throw new TypeError("@@toPrimitive must return a primitive value.")}return(et==="string"?String:Number)(tt)}function _objectWithoutProperties$e(tt,et){if(tt==null)return{};var nt=_objectWithoutPropertiesLoose$e(tt,et),rt,it;if(Object.getOwnPropertySymbols){var ot=Object.getOwnPropertySymbols(tt);for(it=0;it=0)&&Object.prototype.propertyIsEnumerable.call(tt,rt)&&(nt[rt]=tt[rt])}return nt}function _objectWithoutPropertiesLoose$e(tt,et){if(tt==null)return{};var nt={},rt=Object.keys(tt),it,ot;for(ot=0;ot=0)&&(nt[it]=tt[it]);return nt}function defaultUniqBy$1(tt){return tt.value}function getUniqPayload$1(tt,et){return tt===!0?_uniqBy(et,defaultUniqBy$1):_isFunction$1(tt)?_uniqBy(et,tt):et}function renderContent$1(tt,et){if(React$1.isValidElement(tt))return React$1.cloneElement(tt,et);if(_isFunction$1(tt))return React$1.createElement(tt,et);et.ref;var nt=_objectWithoutProperties$e(et,_excluded$e);return React$1.createElement(DefaultLegendContent,nt)}var EPS$2=1,Legend=function(tt){_inherits$a(nt,tt);var et=_createSuper$a(nt);function nt(){var rt;_classCallCheck$d(this,nt);for(var it=arguments.length,ot=new Array(it),at=0;at=0&&at>=0?{width:ot,height:at}:null}},{key:"getDefaultPosition",value:function(it){var ot=this.props,at=ot.layout,st=ot.align,lt=ot.verticalAlign,ct=ot.margin,ut=ot.chartWidth,ht=ot.chartHeight,dt,pt;if(!it||(it.left===void 0||it.left===null)&&(it.right===void 0||it.right===null))if(st==="center"&&at==="vertical"){var mt=this.getBBoxSnapshot()||{width:0};dt={left:((ut||0)-mt.width)/2}}else dt=st==="right"?{right:ct&&ct.right||0}:{left:ct&&ct.left||0};if(!it||(it.top===void 0||it.top===null)&&(it.bottom===void 0||it.bottom===null))if(lt==="middle"){var gt=this.getBBoxSnapshot()||{height:0};pt={top:((ht||0)-gt.height)/2}}else pt=lt==="bottom"?{bottom:ct&&ct.bottom||0}:{top:ct&&ct.top||0};return _objectSpread$x(_objectSpread$x({},dt),pt)}},{key:"updateBBox",value:function(){var it=this.state,ot=it.boxWidth,at=it.boxHeight,st=this.props.onBBoxUpdate;if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var lt=this.wrapperNode.getBoundingClientRect();(Math.abs(lt.width-ot)>EPS$2||Math.abs(lt.height-at)>EPS$2)&&this.setState({boxWidth:lt.width,boxHeight:lt.height},function(){st&&st(lt)})}else(ot!==-1||at!==-1)&&this.setState({boxWidth:-1,boxHeight:-1},function(){st&&st(null)})}},{key:"render",value:function(){var it=this,ot=this.props,at=ot.content,st=ot.width,lt=ot.height,ct=ot.wrapperStyle,ut=ot.payloadUniqBy,ht=ot.payload,dt=_objectSpread$x(_objectSpread$x({position:"absolute",width:st||"auto",height:lt||"auto"},this.getDefaultPosition(ct)),ct);return React$1.createElement("div",{className:"recharts-legend-wrapper",style:dt,ref:function(mt){it.wrapperNode=mt}},renderContent$1(at,_objectSpread$x(_objectSpread$x({},this.props),{},{payload:getUniqPayload$1(ut,ht)})))}}],[{key:"getWithHeight",value:function(it,ot){var at=it.props.layout;return at==="vertical"&&isNumber(it.props.height)?{height:it.props.height}:at==="horizontal"?{width:it.props.width||ot}:null}}]),nt}(reactExports.PureComponent);_defineProperty$y(Legend,"displayName","Legend");_defineProperty$y(Legend,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var getOwnPropertyNames=Object.getOwnPropertyNames,getOwnPropertySymbols=Object.getOwnPropertySymbols,hasOwnProperty$1=Object.prototype.hasOwnProperty;function combineComparators(tt,et){return function(rt,it,ot){return tt(rt,it,ot)&&et(rt,it,ot)}}function createIsCircular(tt){return function(nt,rt,it){if(!nt||!rt||typeof nt!="object"||typeof rt!="object")return tt(nt,rt,it);var ot=it.cache,at=ot.get(nt),st=ot.get(rt);if(at&&st)return at===rt&&st===nt;ot.set(nt,rt),ot.set(rt,nt);var lt=tt(nt,rt,it);return ot.delete(nt),ot.delete(rt),lt}}function getStrictProperties(tt){return getOwnPropertyNames(tt).concat(getOwnPropertySymbols(tt))}var hasOwn=Object.hasOwn||function(tt,et){return hasOwnProperty$1.call(tt,et)};function sameValueZeroEqual(tt,et){return tt||et?tt===et:tt===et||tt!==tt&&et!==et}var OWNER="_owner",getOwnPropertyDescriptor=Object.getOwnPropertyDescriptor,keys$2=Object.keys;function areArraysEqual(tt,et,nt){var rt=tt.length;if(et.length!==rt)return!1;for(;rt-- >0;)if(!nt.equals(tt[rt],et[rt],rt,rt,tt,et,nt))return!1;return!0}function areDatesEqual(tt,et){return sameValueZeroEqual(tt.getTime(),et.getTime())}function areMapsEqual(tt,et,nt){if(tt.size!==et.size)return!1;for(var rt={},it=tt.entries(),ot=0,at,st;(at=it.next())&&!at.done;){for(var lt=et.entries(),ct=!1,ut=0;(st=lt.next())&&!st.done;){var ht=at.value,dt=ht[0],pt=ht[1],mt=st.value,gt=mt[0],yt=mt[1];!ct&&!rt[ut]&&(ct=nt.equals(dt,gt,ot,ut,tt,et,nt)&&nt.equals(pt,yt,dt,gt,tt,et,nt))&&(rt[ut]=!0),ut++}if(!ct)return!1;ot++}return!0}function areObjectsEqual(tt,et,nt){var rt=keys$2(tt),it=rt.length;if(keys$2(et).length!==it)return!1;for(var ot;it-- >0;)if(ot=rt[it],ot===OWNER&&(tt.$$typeof||et.$$typeof)&&tt.$$typeof!==et.$$typeof||!hasOwn(et,ot)||!nt.equals(tt[ot],et[ot],ot,ot,tt,et,nt))return!1;return!0}function areObjectsEqualStrict(tt,et,nt){var rt=getStrictProperties(tt),it=rt.length;if(getStrictProperties(et).length!==it)return!1;for(var ot,at,st;it-- >0;)if(ot=rt[it],ot===OWNER&&(tt.$$typeof||et.$$typeof)&&tt.$$typeof!==et.$$typeof||!hasOwn(et,ot)||!nt.equals(tt[ot],et[ot],ot,ot,tt,et,nt)||(at=getOwnPropertyDescriptor(tt,ot),st=getOwnPropertyDescriptor(et,ot),(at||st)&&(!at||!st||at.configurable!==st.configurable||at.enumerable!==st.enumerable||at.writable!==st.writable)))return!1;return!0}function arePrimitiveWrappersEqual(tt,et){return sameValueZeroEqual(tt.valueOf(),et.valueOf())}function areRegExpsEqual(tt,et){return tt.source===et.source&&tt.flags===et.flags}function areSetsEqual(tt,et,nt){if(tt.size!==et.size)return!1;for(var rt={},it=tt.values(),ot,at;(ot=it.next())&&!ot.done;){for(var st=et.values(),lt=!1,ct=0;(at=st.next())&&!at.done;)!lt&&!rt[ct]&&(lt=nt.equals(ot.value,at.value,ot.value,at.value,tt,et,nt))&&(rt[ct]=!0),ct++;if(!lt)return!1}return!0}function areTypedArraysEqual(tt,et){var nt=tt.length;if(et.length!==nt)return!1;for(;nt-- >0;)if(tt[nt]!==et[nt])return!1;return!0}var ARGUMENTS_TAG="[object Arguments]",BOOLEAN_TAG="[object Boolean]",DATE_TAG="[object Date]",MAP_TAG="[object Map]",NUMBER_TAG="[object Number]",OBJECT_TAG="[object Object]",REG_EXP_TAG="[object RegExp]",SET_TAG="[object Set]",STRING_TAG="[object String]",isArray$5=Array.isArray,isTypedArray=typeof ArrayBuffer=="function"&&ArrayBuffer.isView?ArrayBuffer.isView:null,assign=Object.assign,getTag=Object.prototype.toString.call.bind(Object.prototype.toString);function createEqualityComparator(tt){var et=tt.areArraysEqual,nt=tt.areDatesEqual,rt=tt.areMapsEqual,it=tt.areObjectsEqual,ot=tt.arePrimitiveWrappersEqual,at=tt.areRegExpsEqual,st=tt.areSetsEqual,lt=tt.areTypedArraysEqual;return function(ut,ht,dt){if(ut===ht)return!0;if(ut==null||ht==null||typeof ut!="object"||typeof ht!="object")return ut!==ut&&ht!==ht;var pt=ut.constructor;if(pt!==ht.constructor)return!1;if(pt===Object)return it(ut,ht,dt);if(isArray$5(ut))return et(ut,ht,dt);if(isTypedArray!=null&&isTypedArray(ut))return lt(ut,ht,dt);if(pt===Date)return nt(ut,ht,dt);if(pt===RegExp)return at(ut,ht,dt);if(pt===Map)return rt(ut,ht,dt);if(pt===Set)return st(ut,ht,dt);var mt=getTag(ut);return mt===DATE_TAG?nt(ut,ht,dt):mt===REG_EXP_TAG?at(ut,ht,dt):mt===MAP_TAG?rt(ut,ht,dt):mt===SET_TAG?st(ut,ht,dt):mt===OBJECT_TAG?typeof ut.then!="function"&&typeof ht.then!="function"&&it(ut,ht,dt):mt===ARGUMENTS_TAG?it(ut,ht,dt):mt===BOOLEAN_TAG||mt===NUMBER_TAG||mt===STRING_TAG?ot(ut,ht,dt):!1}}function createEqualityComparatorConfig(tt){var et=tt.circular,nt=tt.createCustomConfig,rt=tt.strict,it={areArraysEqual:rt?areObjectsEqualStrict:areArraysEqual,areDatesEqual,areMapsEqual:rt?combineComparators(areMapsEqual,areObjectsEqualStrict):areMapsEqual,areObjectsEqual:rt?areObjectsEqualStrict:areObjectsEqual,arePrimitiveWrappersEqual,areRegExpsEqual,areSetsEqual:rt?combineComparators(areSetsEqual,areObjectsEqualStrict):areSetsEqual,areTypedArraysEqual:rt?areObjectsEqualStrict:areTypedArraysEqual};if(nt&&(it=assign({},it,nt(it))),et){var ot=createIsCircular(it.areArraysEqual),at=createIsCircular(it.areMapsEqual),st=createIsCircular(it.areObjectsEqual),lt=createIsCircular(it.areSetsEqual);it=assign({},it,{areArraysEqual:ot,areMapsEqual:at,areObjectsEqual:st,areSetsEqual:lt})}return it}function createInternalEqualityComparator(tt){return function(et,nt,rt,it,ot,at,st){return tt(et,nt,st)}}function createIsEqual(tt){var et=tt.circular,nt=tt.comparator,rt=tt.createState,it=tt.equals,ot=tt.strict;if(rt)return function(lt,ct){var ut=rt(),ht=ut.cache,dt=ht===void 0?et?new WeakMap:void 0:ht,pt=ut.meta;return nt(lt,ct,{cache:dt,equals:it,meta:pt,strict:ot})};if(et)return function(lt,ct){return nt(lt,ct,{cache:new WeakMap,equals:it,meta:void 0,strict:ot})};var at={cache:void 0,equals:it,meta:void 0,strict:ot};return function(lt,ct){return nt(lt,ct,at)}}var deepEqual=createCustomEqual();createCustomEqual({strict:!0});createCustomEqual({circular:!0});createCustomEqual({circular:!0,strict:!0});createCustomEqual({createInternalComparator:function(){return sameValueZeroEqual}});createCustomEqual({strict:!0,createInternalComparator:function(){return sameValueZeroEqual}});createCustomEqual({circular:!0,createInternalComparator:function(){return sameValueZeroEqual}});createCustomEqual({circular:!0,createInternalComparator:function(){return sameValueZeroEqual},strict:!0});function createCustomEqual(tt){tt===void 0&&(tt={});var et=tt.circular,nt=et===void 0?!1:et,rt=tt.createInternalComparator,it=tt.createState,ot=tt.strict,at=ot===void 0?!1:ot,st=createEqualityComparatorConfig(tt),lt=createEqualityComparator(st),ct=rt?rt(lt):createInternalEqualityComparator(lt);return createIsEqual({circular:nt,comparator:lt,createState:it,equals:ct,strict:at})}function safeRequestAnimationFrame(tt){typeof requestAnimationFrame<"u"&&requestAnimationFrame(tt)}function setRafTimeout(tt){var et=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,nt=-1,rt=function it(ot){nt<0&&(nt=ot),ot-nt>et?(tt(ot),nt=-1):safeRequestAnimationFrame(it)};requestAnimationFrame(rt)}function _typeof$z(tt){"@babel/helpers - typeof";return _typeof$z=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(et){return typeof et}:function(et){return et&&typeof Symbol=="function"&&et.constructor===Symbol&&et!==Symbol.prototype?"symbol":typeof et},_typeof$z(tt)}function _toArray(tt){return _arrayWithHoles$d(tt)||_iterableToArray$d(tt)||_unsupportedIterableToArray$n(tt)||_nonIterableRest$d()}function _nonIterableRest$d(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _unsupportedIterableToArray$n(tt,et){if(tt){if(typeof tt=="string")return _arrayLikeToArray$n(tt,et);var nt=Object.prototype.toString.call(tt).slice(8,-1);if(nt==="Object"&&tt.constructor&&(nt=tt.constructor.name),nt==="Map"||nt==="Set")return Array.from(tt);if(nt==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(nt))return _arrayLikeToArray$n(tt,et)}}function _arrayLikeToArray$n(tt,et){(et==null||et>tt.length)&&(et=tt.length);for(var nt=0,rt=new Array(et);nttt.length)&&(et=tt.length);for(var nt=0,rt=new Array(et);nt1?1:bt<0?0:bt},gt=function(bt){for(var vt=bt>1?1:bt,xt=vt,kt=0;kt<8;++kt){var St=ht(xt)-vt,Tt=pt(xt);if(Math.abs(St-vt)0&&arguments[0]!==void 0?arguments[0]:{},nt=et.stiff,rt=nt===void 0?100:nt,it=et.damping,ot=it===void 0?8:it,at=et.dt,st=at===void 0?17:at,lt=function(ut,ht,dt){var pt=-(ut-ht)*rt,mt=dt*ot,gt=dt+(pt-mt)*st/1e3,yt=dt*st/1e3+ut;return Math.abs(yt-ht)tt.length)&&(et=tt.length);for(var nt=0,rt=new Array(et);nt=0)&&Object.prototype.propertyIsEnumerable.call(tt,rt)&&(nt[rt]=tt[rt])}return nt}function _objectWithoutPropertiesLoose$d(tt,et){if(tt==null)return{};var nt={},rt=Object.keys(tt),it,ot;for(ot=0;ot=0)&&(nt[it]=tt[it]);return nt}function _toConsumableArray$a(tt){return _arrayWithoutHoles$a(tt)||_iterableToArray$a(tt)||_unsupportedIterableToArray$k(tt)||_nonIterableSpread$a()}function _nonIterableSpread$a(){throw new TypeError(`Invalid attempt to spread non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _unsupportedIterableToArray$k(tt,et){if(tt){if(typeof tt=="string")return _arrayLikeToArray$k(tt,et);var nt=Object.prototype.toString.call(tt).slice(8,-1);if(nt==="Object"&&tt.constructor&&(nt=tt.constructor.name),nt==="Map"||nt==="Set")return Array.from(tt);if(nt==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(nt))return _arrayLikeToArray$k(tt,et)}}function _iterableToArray$a(tt){if(typeof Symbol<"u"&&tt[Symbol.iterator]!=null||tt["@@iterator"]!=null)return Array.from(tt)}function _arrayWithoutHoles$a(tt){if(Array.isArray(tt))return _arrayLikeToArray$k(tt)}function _arrayLikeToArray$k(tt,et){(et==null||et>tt.length)&&(et=tt.length);for(var nt=0,rt=new Array(et);nt"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function _getPrototypeOf$9(tt){return _getPrototypeOf$9=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(nt){return nt.__proto__||Object.getPrototypeOf(nt)},_getPrototypeOf$9(tt)}var Animate=function(tt){_inherits$9(nt,tt);var et=_createSuper$9(nt);function nt(rt,it){var ot;_classCallCheck$c(this,nt),ot=et.call(this,rt,it);var at=ot.props,st=at.isActive,lt=at.attributeName,ct=at.from,ut=at.to,ht=at.steps,dt=at.children,pt=at.duration;if(ot.handleStyleChange=ot.handleStyleChange.bind(_assertThisInitialized$9(ot)),ot.changeStyle=ot.changeStyle.bind(_assertThisInitialized$9(ot)),!st||pt<=0)return ot.state={style:{}},typeof dt=="function"&&(ot.state={style:ut}),_possibleConstructorReturn$9(ot);if(ht&&ht.length)ot.state={style:ht[0].style};else if(ct){if(typeof dt=="function")return ot.state={style:ct},_possibleConstructorReturn$9(ot);ot.state={style:lt?_defineProperty$v({},lt,ct):ct}}else ot.state={style:{}};return ot}return _createClass$c(nt,[{key:"componentDidMount",value:function(){var it=this.props,ot=it.isActive,at=it.canBegin;this.mounted=!0,!(!ot||!at)&&this.runAnimation(this.props)}},{key:"componentDidUpdate",value:function(it){var ot=this.props,at=ot.isActive,st=ot.canBegin,lt=ot.attributeName,ct=ot.shouldReAnimate,ut=ot.to,ht=ot.from,dt=this.state.style;if(st){if(!at){var pt={style:lt?_defineProperty$v({},lt,ut):ut};this.state&&dt&&(lt&&dt[lt]!==ut||!lt&&dt!==ut)&&this.setState(pt);return}if(!(deepEqual(it.to,ut)&&it.canBegin&&it.isActive)){var mt=!it.canBegin||!it.isActive;this.manager&&this.manager.stop(),this.stopJSAnimation&&this.stopJSAnimation();var gt=mt||ct?ht:it.to;if(this.state&&dt){var yt={style:lt?_defineProperty$v({},lt,gt):gt};(lt&&[lt]!==gt||!lt&&dt!==gt)&&this.setState(yt)}this.runAnimation(_objectSpread$u(_objectSpread$u({},this.props),{},{from:gt,begin:0}))}}}},{key:"componentWillUnmount",value:function(){this.mounted=!1;var it=this.props.onAnimationEnd;this.unSubscribe&&this.unSubscribe(),this.manager&&(this.manager.stop(),this.manager=null),this.stopJSAnimation&&this.stopJSAnimation(),it&&it()}},{key:"handleStyleChange",value:function(it){this.changeStyle(it)}},{key:"changeStyle",value:function(it){this.mounted&&this.setState({style:it})}},{key:"runJSAnimation",value:function(it){var ot=this,at=it.from,st=it.to,lt=it.duration,ct=it.easing,ut=it.begin,ht=it.onAnimationEnd,dt=it.onAnimationStart,pt=configUpdate(at,st,configEasing(ct),lt,this.changeStyle),mt=function(){ot.stopJSAnimation=pt()};this.manager.start([dt,ut,mt,lt,ht])}},{key:"runStepAnimation",value:function(it){var ot=this,at=it.steps,st=it.begin,lt=it.onAnimationStart,ct=at[0],ut=ct.style,ht=ct.duration,dt=ht===void 0?0:ht,pt=function(gt,yt,bt){if(bt===0)return gt;var vt=yt.duration,xt=yt.easing,kt=xt===void 0?"ease":xt,St=yt.style,Tt=yt.properties,At=yt.onAnimationEnd,Et=bt>0?at[bt-1]:yt,$t=Tt||Object.keys(St);if(typeof kt=="function"||kt==="spring")return[].concat(_toConsumableArray$a(gt),[ot.runJSAnimation.bind(ot,{from:Et.style,to:St,duration:vt,easing:kt}),vt]);var Dt=getTransitionVal($t,vt,kt),jt=_objectSpread$u(_objectSpread$u(_objectSpread$u({},Et.style),St),{},{transition:Dt});return[].concat(_toConsumableArray$a(gt),[jt,vt,At]).filter(identity$b)};return this.manager.start([lt].concat(_toConsumableArray$a(at.reduce(pt,[ut,Math.max(dt,st)])),[it.onAnimationEnd]))}},{key:"runAnimation",value:function(it){this.manager||(this.manager=createAnimateManager());var ot=it.begin,at=it.duration,st=it.attributeName,lt=it.to,ct=it.easing,ut=it.onAnimationStart,ht=it.onAnimationEnd,dt=it.steps,pt=it.children,mt=this.manager;if(this.unSubscribe=mt.subscribe(this.handleStyleChange),typeof ct=="function"||typeof pt=="function"||ct==="spring"){this.runJSAnimation(it);return}if(dt.length>1){this.runStepAnimation(it);return}var gt=st?_defineProperty$v({},st,lt):lt,yt=getTransitionVal(Object.keys(gt),at,ct);mt.start([ut,ot,_objectSpread$u(_objectSpread$u({},gt),{},{transition:yt}),at,ht])}},{key:"render",value:function(){var it=this.props,ot=it.children;it.begin;var at=it.duration;it.attributeName,it.easing;var st=it.isActive;it.steps,it.from,it.to,it.canBegin,it.onAnimationEnd,it.shouldReAnimate,it.onAnimationReStart;var lt=_objectWithoutProperties$d(it,_excluded$d),ct=reactExports.Children.count(ot),ut=translateStyle(this.state.style);if(typeof ot=="function")return ot(ut);if(!st||ct===0||at<=0)return ot;var ht=function(pt){var mt=pt.props,gt=mt.style,yt=gt===void 0?{}:gt,bt=mt.className,vt=reactExports.cloneElement(pt,_objectSpread$u(_objectSpread$u({},lt),{},{style:_objectSpread$u(_objectSpread$u({},yt),ut),className:bt}));return vt};return ct===1?ht(reactExports.Children.only(ot)):React$1.createElement("div",null,reactExports.Children.map(ot,function(dt){return ht(dt)}))}}]),nt}(reactExports.PureComponent);Animate.displayName="Animate";Animate.defaultProps={begin:0,duration:1e3,from:"",to:"",attributeName:"",easing:"ease",isActive:!0,canBegin:!0,steps:[],onAnimationEnd:function(){},onAnimationStart:function(){}};Animate.propTypes={from:PropTypes.oneOfType([PropTypes.object,PropTypes.string]),to:PropTypes.oneOfType([PropTypes.object,PropTypes.string]),attributeName:PropTypes.string,duration:PropTypes.number,begin:PropTypes.number,easing:PropTypes.oneOfType([PropTypes.string,PropTypes.func]),steps:PropTypes.arrayOf(PropTypes.shape({duration:PropTypes.number.isRequired,style:PropTypes.object.isRequired,easing:PropTypes.oneOfType([PropTypes.oneOf(["ease","ease-in","ease-out","ease-in-out","linear"]),PropTypes.func]),properties:PropTypes.arrayOf("string"),onAnimationEnd:PropTypes.func})),children:PropTypes.oneOfType([PropTypes.node,PropTypes.func]),isActive:PropTypes.bool,canBegin:PropTypes.bool,onAnimationEnd:PropTypes.func,shouldReAnimate:PropTypes.bool,onAnimationStart:PropTypes.func,onAnimationReStart:PropTypes.func};Number.isFinite===void 0&&(Number.isFinite=function(tt){return typeof tt=="number"&&isFinite(tt)});PropTypes.object,PropTypes.object,PropTypes.object,PropTypes.element;PropTypes.object,PropTypes.object,PropTypes.object,PropTypes.oneOfType([PropTypes.array,PropTypes.element]),PropTypes.any;var Symbol$1=_Symbol,isArguments=isArguments_1,isArray$4=isArray_1,spreadableSymbol=Symbol$1?Symbol$1.isConcatSpreadable:void 0;function isFlattenable$1(tt){return isArray$4(tt)||isArguments(tt)||!!(spreadableSymbol&&tt&&tt[spreadableSymbol])}var _isFlattenable=isFlattenable$1,arrayPush=_arrayPush,isFlattenable=_isFlattenable;function baseFlatten$2(tt,et,nt,rt,it){var ot=-1,at=tt.length;for(nt||(nt=isFlattenable),it||(it=[]);++ot0&&nt(st)?et>1?baseFlatten$2(st,et-1,nt,rt,it):arrayPush(it,st):rt||(it[it.length]=st)}return it}var _baseFlatten=baseFlatten$2;function createBaseFor$1(tt){return function(et,nt,rt){for(var it=-1,ot=Object(et),at=rt(et),st=at.length;st--;){var lt=at[tt?st:++it];if(nt(ot[lt],lt,ot)===!1)break}return et}}var _createBaseFor=createBaseFor$1,createBaseFor=_createBaseFor,baseFor$1=createBaseFor(),_baseFor=baseFor$1,baseFor=_baseFor,keys$1=keys_1;function baseForOwn$2(tt,et){return tt&&baseFor(tt,et,keys$1)}var _baseForOwn=baseForOwn$2,isArrayLike$3=isArrayLike_1;function createBaseEach$1(tt,et){return function(nt,rt){if(nt==null)return nt;if(!isArrayLike$3(nt))return tt(nt,rt);for(var it=nt.length,ot=et?it:-1,at=Object(nt);(et?ot--:++otet||ot&&at&<&&!st&&!ct||rt&&at&<||!nt&<||!it)return 1;if(!rt&&!ot&&!ct&&tt=st)return lt;var ct=nt[rt];return lt*(ct=="desc"?-1:1)}}return tt.index-et.index}var _compareMultiple=compareMultiple$1,arrayMap$1=_arrayMap,baseGet=_baseGet,baseIteratee$6=_baseIteratee,baseMap$1=_baseMap,baseSortBy=_baseSortBy,baseUnary=_baseUnary,compareMultiple=_compareMultiple,identity$a=identity_1,isArray$3=isArray_1;function baseOrderBy$1(tt,et,nt){et.length?et=arrayMap$1(et,function(ot){return isArray$3(ot)?function(at){return baseGet(at,ot.length===1?ot[0]:ot)}:ot}):et=[identity$a];var rt=-1;et=arrayMap$1(et,baseUnary(baseIteratee$6));var it=baseMap$1(tt,function(ot,at,st){var lt=arrayMap$1(et,function(ct){return ct(ot)});return{criteria:lt,index:++rt,value:ot}});return baseSortBy(it,function(ot,at){return compareMultiple(ot,at,nt)})}var _baseOrderBy=baseOrderBy$1;function apply$1(tt,et,nt){switch(nt.length){case 0:return tt.call(et);case 1:return tt.call(et,nt[0]);case 2:return tt.call(et,nt[0],nt[1]);case 3:return tt.call(et,nt[0],nt[1],nt[2])}return tt.apply(et,nt)}var _apply=apply$1,apply=_apply,nativeMax$3=Math.max;function overRest$1(tt,et,nt){return et=nativeMax$3(et===void 0?tt.length-1:et,0),function(){for(var rt=arguments,it=-1,ot=nativeMax$3(rt.length-et,0),at=Array(ot);++it0){if(++et>=HOT_COUNT)return arguments[0]}else et=0;return tt.apply(void 0,arguments)}}var _shortOut=shortOut$1,baseSetToString=_baseSetToString,shortOut=_shortOut,setToString$1=shortOut(baseSetToString),_setToString=setToString$1,identity$8=identity_1,overRest=_overRest,setToString=_setToString;function baseRest$1(tt,et){return setToString(overRest(tt,et,identity$8),tt+"")}var _baseRest=baseRest$1,eq=eq_1,isArrayLike$1=isArrayLike_1,isIndex=_isIndex,isObject$4=isObject_1;function isIterateeCall$4(tt,et,nt){if(!isObject$4(nt))return!1;var rt=typeof et;return(rt=="number"?isArrayLike$1(nt)&&isIndex(et,nt.length):rt=="string"&&et in nt)?eq(nt[et],tt):!1}var _isIterateeCall=isIterateeCall$4,baseFlatten$1=_baseFlatten,baseOrderBy=_baseOrderBy,baseRest=_baseRest,isIterateeCall$3=_isIterateeCall,sortBy=baseRest(function(tt,et){if(tt==null)return[];var nt=et.length;return nt>1&&isIterateeCall$3(tt,et[0],et[1])?et=[]:nt>2&&isIterateeCall$3(et[0],et[1],et[2])&&(et=[et[0]]),baseOrderBy(tt,baseFlatten$1(et,1),[])}),sortBy_1=sortBy;const _sortBy=getDefaultExportFromCjs(sortBy_1);function _typeof$v(tt){"@babel/helpers - typeof";return _typeof$v=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(et){return typeof et}:function(et){return et&&typeof Symbol=="function"&&et.constructor===Symbol&&et!==Symbol.prototype?"symbol":typeof et},_typeof$v(tt)}function _slicedToArray$a(tt,et){return _arrayWithHoles$a(tt)||_iterableToArrayLimit$a(tt,et)||_unsupportedIterableToArray$j(tt,et)||_nonIterableRest$a()}function _nonIterableRest$a(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _unsupportedIterableToArray$j(tt,et){if(tt){if(typeof tt=="string")return _arrayLikeToArray$j(tt,et);var nt=Object.prototype.toString.call(tt).slice(8,-1);if(nt==="Object"&&tt.constructor&&(nt=tt.constructor.name),nt==="Map"||nt==="Set")return Array.from(tt);if(nt==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(nt))return _arrayLikeToArray$j(tt,et)}}function _arrayLikeToArray$j(tt,et){(et==null||et>tt.length)&&(et=tt.length);for(var nt=0,rt=new Array(et);nt"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function _getPrototypeOf$8(tt){return _getPrototypeOf$8=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(nt){return nt.__proto__||Object.getPrototypeOf(nt)},_getPrototypeOf$8(tt)}function _defineProperty$t(tt,et,nt){return et=_toPropertyKey$t(et),et in tt?Object.defineProperty(tt,et,{value:nt,enumerable:!0,configurable:!0,writable:!0}):tt[et]=nt,tt}function _toPropertyKey$t(tt){var et=_toPrimitive$t(tt,"string");return _typeof$u(et)==="symbol"?et:String(et)}function _toPrimitive$t(tt,et){if(_typeof$u(tt)!=="object"||tt===null)return tt;var nt=tt[Symbol.toPrimitive];if(nt!==void 0){var rt=nt.call(tt,et||"default");if(_typeof$u(rt)!=="object")return rt;throw new TypeError("@@toPrimitive must return a primitive value.")}return(et==="string"?String:Number)(tt)}var CLS_PREFIX="recharts-tooltip-wrapper",EPS$1=1;function defaultUniqBy(tt){return tt.dataKey}function getUniqPayload(tt,et){return tt===!0?_uniqBy(et,defaultUniqBy):_isFunction$1(tt)?_uniqBy(et,tt):et}function renderContent(tt,et){return React$1.isValidElement(tt)?React$1.cloneElement(tt,et):_isFunction$1(tt)?React$1.createElement(tt,et):React$1.createElement(DefaultTooltipContent,et)}var Tooltip=function(tt){_inherits$8(nt,tt);var et=_createSuper$8(nt);function nt(){var rt;_classCallCheck$b(this,nt);for(var it=arguments.length,ot=new Array(it),at=0;atAt?Math.max(vt,bt[lt]):Math.max(xt,bt[lt])}),rt}return _createClass$b(nt,[{key:"componentDidMount",value:function(){this.updateBBox()}},{key:"componentWillUnmount",value:function(){document.removeEventListener("keydown",this.handleKeyDown)}},{key:"componentDidUpdate",value:function(){this.updateBBox()}},{key:"updateBBox",value:function(){var it=this.state,ot=it.boxWidth,at=it.boxHeight,st=it.dismissed;if(st?(document.removeEventListener("keydown",this.handleKeyDown),(this.props.coordinate.x!==this.state.dismissedAtCoordinate.x||this.props.coordinate.y!==this.state.dismissedAtCoordinate.y)&&this.setState({dismissed:!1})):document.addEventListener("keydown",this.handleKeyDown),this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var lt=this.wrapperNode.getBoundingClientRect();(Math.abs(lt.width-ot)>EPS$1||Math.abs(lt.height-at)>EPS$1)&&this.setState({boxWidth:lt.width,boxHeight:lt.height})}else(ot!==-1||at!==-1)&&this.setState({boxWidth:-1,boxHeight:-1})}},{key:"render",value:function(){var it,ot=this,at=this.props,st=at.payload,lt=at.isAnimationActive,ct=at.animationDuration,ut=at.animationEasing,ht=at.filterNull,dt=at.payloadUniqBy,pt=getUniqPayload(dt,ht&&st&&st.length?st.filter(function(Ct){return!_isNil(Ct.value)}):st),mt=pt&&pt.length,gt=this.props,yt=gt.content,bt=gt.viewBox,vt=gt.coordinate,xt=gt.position,kt=gt.active,St=gt.wrapperStyle,Tt=_objectSpread$s({pointerEvents:"none",visibility:!this.state.dismissed&&kt&&mt?"visible":"hidden",position:"absolute",top:0,left:0},St),At,Et;if(xt&&isNumber(xt.x)&&isNumber(xt.y))At=xt.x,Et=xt.y;else{var $t=this.state,Dt=$t.boxWidth,jt=$t.boxHeight;Dt>0&&jt>0&&vt?(At=this.getTranslate({key:"x",tooltipDimension:Dt,viewBoxDimension:bt.width}),Et=this.getTranslate({key:"y",tooltipDimension:jt,viewBoxDimension:bt.height})):Tt.visibility="hidden"}Tt=_objectSpread$s(_objectSpread$s({},translateStyle({transform:this.props.useTranslate3d?"translate3d(".concat(At,"px, ").concat(Et,"px, 0)"):"translate(".concat(At,"px, ").concat(Et,"px)")})),Tt),lt&&kt&&(Tt=_objectSpread$s(_objectSpread$s({},translateStyle({transition:"transform ".concat(ct,"ms ").concat(ut)})),Tt));var Pt=classNames(CLS_PREFIX,(it={},_defineProperty$t(it,"".concat(CLS_PREFIX,"-right"),isNumber(At)&&vt&&isNumber(vt.x)&&At>=vt.x),_defineProperty$t(it,"".concat(CLS_PREFIX,"-left"),isNumber(At)&&vt&&isNumber(vt.x)&&At=vt.y),_defineProperty$t(it,"".concat(CLS_PREFIX,"-top"),isNumber(Et)&&vt&&isNumber(vt.y)&&Et=et||At<0||ht&&Et>=ot}function bt(){var Tt=now();if(yt(Tt))return vt(Tt);st=setTimeout(bt,gt(Tt))}function vt(Tt){return st=void 0,dt&&rt?pt(Tt):(rt=it=void 0,at)}function xt(){st!==void 0&&clearTimeout(st),ct=0,rt=lt=it=st=void 0}function kt(){return st===void 0?at:vt(now())}function St(){var Tt=now(),At=yt(Tt);if(rt=arguments,it=this,lt=Tt,At){if(st===void 0)return mt(lt);if(ht)return clearTimeout(st),st=setTimeout(bt,et),pt(lt)}return st===void 0&&(st=setTimeout(bt,et)),at}return St.cancel=xt,St.flush=kt,St}var debounce_1=debounce$1;const debounce$2=getDefaultExportFromCjs(debounce_1);var debounce=debounce_1,isObject$1=isObject_1,FUNC_ERROR_TEXT="Expected a function";function throttle(tt,et,nt){var rt=!0,it=!0;if(typeof tt!="function")throw new TypeError(FUNC_ERROR_TEXT);return isObject$1(nt)&&(rt="leading"in nt?!!nt.leading:rt,it="trailing"in nt?!!nt.trailing:it),debounce(tt,et,{leading:rt,maxWait:et,trailing:it})}var throttle_1=throttle;const _throttle=getDefaultExportFromCjs(throttle_1);var extendStatics=function(tt,et){return extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(nt,rt){nt.__proto__=rt}||function(nt,rt){for(var it in rt)rt.hasOwnProperty(it)&&(nt[it]=rt[it])},extendStatics(tt,et)};function __extends(tt,et){extendStatics(tt,et);function nt(){this.constructor=tt}tt.prototype=et===null?Object.create(et):(nt.prototype=et.prototype,new nt)}function __rest$1(tt,et){var nt={};for(var rt in tt)Object.prototype.hasOwnProperty.call(tt,rt)&&et.indexOf(rt)<0&&(nt[rt]=tt[rt]);if(tt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var it=0,rt=Object.getOwnPropertySymbols(tt);it"u"},isDOMElement=function(tt){return tt instanceof Element||tt instanceof HTMLDocument},createNotifier=function(tt,et,nt){return function(rt){var it=rt.width,ot=rt.height;tt(function(at){return at.width===it&&at.height===ot||at.width===it&&!nt||at.height===ot&&!et?at:{width:it,height:ot}})}},ResizeDetector=function(tt){__extends(et,tt);function et(nt){var rt=tt.call(this,nt)||this;rt.cancelHandler=function(){rt.resizeHandler&&rt.resizeHandler.cancel&&(rt.resizeHandler.cancel(),rt.resizeHandler=null)},rt.attachObserver=function(){var ct=rt.props,ut=ct.targetRef,ht=ct.observerOptions;if(!isSSR()){ut&&ut.current&&(rt.targetRef.current=ut.current);var dt=rt.getElement();dt&&(rt.observableElement&&rt.observableElement===dt||(rt.observableElement=dt,rt.resizeObserver.observe(dt,ht)))}},rt.getElement=function(){var ct=rt.props,ut=ct.querySelector,ht=ct.targetDomEl;if(isSSR())return null;if(ut)return document.querySelector(ut);if(ht&&isDOMElement(ht))return ht;if(rt.targetRef&&isDOMElement(rt.targetRef.current))return rt.targetRef.current;var dt=reactDomExports.findDOMNode(rt);if(!dt)return null;var pt=rt.getRenderType();switch(pt){case"renderProp":return dt;case"childFunction":return dt;case"child":return dt;case"childArray":return dt;default:return dt.parentElement}},rt.createResizeHandler=function(ct){var ut=rt.props,ht=ut.handleWidth,dt=ht===void 0?!0:ht,pt=ut.handleHeight,mt=pt===void 0?!0:pt,gt=ut.onResize;if(!(!dt&&!mt)){var yt=createNotifier(function(bt){return rt.setState(bt,function(){return gt==null?void 0:gt(rt.state.width,rt.state.height)})},dt,mt);ct.forEach(function(bt){var vt=bt&&bt.contentRect||{},xt=vt.width,kt=vt.height,St=!rt.skipOnMount&&!isSSR();St&&yt({width:xt,height:kt}),rt.skipOnMount=!1})}},rt.getRenderType=function(){var ct=rt.props,ut=ct.render,ht=ct.children;return isFunction(ut)?"renderProp":isFunction(ht)?"childFunction":reactExports.isValidElement(ht)?"child":Array.isArray(ht)?"childArray":"parent"};var it=nt.skipOnMount,ot=nt.refreshMode,at=nt.refreshRate,st=at===void 0?1e3:at,lt=nt.refreshOptions;return rt.state={width:void 0,height:void 0},rt.skipOnMount=it,rt.targetRef=reactExports.createRef(),rt.observableElement=null,isSSR()||(rt.resizeHandler=patchResizeHandler(rt.createResizeHandler,ot,st,lt),rt.resizeObserver=new window.ResizeObserver(rt.resizeHandler)),rt}return et.prototype.componentDidMount=function(){this.attachObserver()},et.prototype.componentDidUpdate=function(){this.attachObserver()},et.prototype.componentWillUnmount=function(){isSSR()||(this.observableElement=null,this.resizeObserver.disconnect(),this.cancelHandler())},et.prototype.render=function(){var nt=this.props,rt=nt.render,it=nt.children,ot=nt.nodeType,at=ot===void 0?"div":ot,st=this.state,lt=st.width,ct=st.height,ut={width:lt,height:ct,targetRef:this.targetRef},ht=this.getRenderType();switch(ht){case"renderProp":return rt==null?void 0:rt(ut);case"childFunction":{var dt=it;return dt==null?void 0:dt(ut)}case"child":{var pt=it;if(pt.type&&typeof pt.type=="string"){ut.targetRef;var mt=__rest$1(ut,["targetRef"]);return reactExports.cloneElement(pt,mt)}return reactExports.cloneElement(pt,ut)}case"childArray":{var gt=it;return gt.map(function(yt){return!!yt&&reactExports.cloneElement(yt,ut)})}default:return React$1.createElement(at,null)}},et}(reactExports.PureComponent);function _typeof$t(tt){"@babel/helpers - typeof";return _typeof$t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(et){return typeof et}:function(et){return et&&typeof Symbol=="function"&&et.constructor===Symbol&&et!==Symbol.prototype?"symbol":typeof et},_typeof$t(tt)}function _extends$n(){return _extends$n=Object.assign?Object.assign.bind():function(tt){for(var et=1;ettt.length)&&(et=tt.length);for(var nt=0,rt=new Array(et);nt0,"The aspect(%s) must be greater than zero.",nt);var Ot=isPercent(at)?wt:at,Wt=isPercent(lt)?It:lt;return nt&&nt>0&&(Ot?Wt=Ot/nt:Wt&&(Ot=Wt*nt),dt&&Wt>dt&&(Wt=dt)),warn(Ot>0||Wt>0,`The width(%s) and height(%s) of chart should be greater than 0, - please check the style of container, or the props width(%s) and height(%s), - or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the - height and width.`,Ot,Wt,at,lt,ut,ht,nt),reactExports.cloneElement(pt,{width:Ot,height:Wt})},[nt,pt,lt,dt,ht,ut,At,at]);reactExports.useEffect(function(){var wt=Dt();wt&&Et(wt)},[Dt]);var Ct=_objectSpread$r(_objectSpread$r({},kt),{},{width:at,height:lt,minWidth:ut,minHeight:ht,maxHeight:dt});return React$1.createElement(ResizeDetector,{handleWidth:!0,handleHeight:!0,onResize:jt,targetRef:$t,refreshMode:gt>0?"debounce":void 0,refreshRate:gt},React$1.createElement("div",_extends$n({},yt!=null?{id:"".concat(yt)}:{},{className:classNames("recharts-responsive-container",bt),style:Ct,ref:$t}),Pt))}),Cell=function(et){return null};Cell.displayName="Cell";function _typeof$s(tt){"@babel/helpers - typeof";return _typeof$s=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(et){return typeof et}:function(et){return et&&typeof Symbol=="function"&&et.constructor===Symbol&&et!==Symbol.prototype?"symbol":typeof et},_typeof$s(tt)}function ownKeys$q(tt,et){var nt=Object.keys(tt);if(Object.getOwnPropertySymbols){var rt=Object.getOwnPropertySymbols(tt);et&&(rt=rt.filter(function(it){return Object.getOwnPropertyDescriptor(tt,it).enumerable})),nt.push.apply(nt,rt)}return nt}function _objectSpread$q(tt){for(var et=1;ettt.length)&&(et=tt.length);for(var nt=0,rt=new Array(et);nt=0&&et===+et?"".concat(et,"px"):et}function camelToMiddleLine(tt){var et=tt.split(""),nt=et.reduce(function(rt,it){return it===it.toUpperCase()?[].concat(_toConsumableArray$9(rt),["-",it.toLowerCase()]):[].concat(_toConsumableArray$9(rt),[it])},[]);return nt.join("")}var getStyleString=function(et){return Object.keys(et).reduce(function(nt,rt){return"".concat(nt).concat(camelToMiddleLine(rt),":").concat(autoCompleteStyle(rt,et[rt]),";")},"")},getStringSize=function(et){var nt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(et==null||Global.isSsr)return{width:0,height:0};var rt="".concat(et),it=getStyleString(nt),ot="".concat(rt,"-").concat(it);if(stringCache.widthCache[ot])return stringCache.widthCache[ot];try{var at=document.getElementById(MEASUREMENT_SPAN_ID);at||(at=document.createElement("span"),at.setAttribute("id",MEASUREMENT_SPAN_ID),at.setAttribute("aria-hidden","true"),document.body.appendChild(at));var st=_objectSpread$q(_objectSpread$q({},SPAN_STYLE),nt);Object.keys(st).map(function(ut){return at.style[ut]=st[ut],ut}),at.textContent=rt;var lt=at.getBoundingClientRect(),ct={width:lt.width,height:lt.height};return stringCache.widthCache[ot]=ct,++stringCache.cacheCount>MAX_CACHE_NUM&&(stringCache.cacheCount=0,stringCache.widthCache={}),ct}catch{return{width:0,height:0}}},getOffset=function(et){var nt=et.ownerDocument.documentElement,rt={top:0,left:0};return typeof et.getBoundingClientRect<"u"&&(rt=et.getBoundingClientRect()),{top:rt.top+window.pageYOffset-nt.clientTop,left:rt.left+window.pageXOffset-nt.clientLeft}},calculateChartCoordinate=function(et,nt){return{chartX:Math.round(et.pageX-nt.left),chartY:Math.round(et.pageY-nt.top)}};function _typeof$r(tt){"@babel/helpers - typeof";return _typeof$r=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(et){return typeof et}:function(et){return et&&typeof Symbol=="function"&&et.constructor===Symbol&&et!==Symbol.prototype?"symbol":typeof et},_typeof$r(tt)}function _slicedToArray$8(tt,et){return _arrayWithHoles$8(tt)||_iterableToArrayLimit$8(tt,et)||_unsupportedIterableToArray$g(tt,et)||_nonIterableRest$8()}function _nonIterableRest$8(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _unsupportedIterableToArray$g(tt,et){if(tt){if(typeof tt=="string")return _arrayLikeToArray$g(tt,et);var nt=Object.prototype.toString.call(tt).slice(8,-1);if(nt==="Object"&&tt.constructor&&(nt=tt.constructor.name),nt==="Map"||nt==="Set")return Array.from(tt);if(nt==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(nt))return _arrayLikeToArray$g(tt,et)}}function _arrayLikeToArray$g(tt,et){(et==null||et>tt.length)&&(et=tt.length);for(var nt=0,rt=new Array(et);nt=0)&&Object.prototype.propertyIsEnumerable.call(tt,rt)&&(nt[rt]=tt[rt])}return nt}function _objectWithoutPropertiesLoose$c(tt,et){if(tt==null)return{};var nt={},rt=Object.keys(tt),it,ot;for(ot=0;ot=0)&&(nt[it]=tt[it]);return nt}function _slicedToArray$7(tt,et){return _arrayWithHoles$7(tt)||_iterableToArrayLimit$7(tt,et)||_unsupportedIterableToArray$f(tt,et)||_nonIterableRest$7()}function _nonIterableRest$7(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _unsupportedIterableToArray$f(tt,et){if(tt){if(typeof tt=="string")return _arrayLikeToArray$f(tt,et);var nt=Object.prototype.toString.call(tt).slice(8,-1);if(nt==="Object"&&tt.constructor&&(nt=tt.constructor.name),nt==="Map"||nt==="Set")return Array.from(tt);if(nt==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(nt))return _arrayLikeToArray$f(tt,et)}}function _arrayLikeToArray$f(tt,et){(et==null||et>tt.length)&&(et=tt.length);for(var nt=0,rt=new Array(et);nt0&&arguments[0]!==void 0?arguments[0]:[];return It.reduce(function(Ot,Wt){var zt=Wt.word,Ft=Wt.width,Nt=Ot[Ot.length-1];if(Nt&&(it==null||ot||Nt.width+Ft+rtWt.width?Ot:Wt})};if(!ut)return pt;for(var gt="…",yt=function(It){var Ot=ht.slice(0,It),Wt=calculateWordWidths({breakAll:ct,style:lt,children:Ot+gt}).wordsWithComputedWidth,zt=dt(Wt),Ft=zt.length>at||mt(zt).width>Number(it);return[Ft,zt]},bt=0,vt=ht.length-1,xt=0,kt;bt<=vt&&xt<=ht.length-1;){var St=Math.floor((bt+vt)/2),Tt=St-1,At=yt(Tt),Et=_slicedToArray$7(At,2),$t=Et[0],Dt=Et[1],jt=yt(St),Pt=_slicedToArray$7(jt,1),Ct=Pt[0];if(!$t&&!Ct&&(bt=St+1),$t&&Ct&&(vt=St-1),!$t&&Ct){kt=Dt;break}xt++}return kt||pt},getWordsWithoutCalculate=function(et){var nt=_isNil(et)?[]:et.toString().split(BREAKING_SPACES);return[{words:nt}]},getWordsByLines=function(et){var nt=et.width,rt=et.scaleToFit,it=et.children,ot=et.style,at=et.breakAll,st=et.maxLines;if((nt||rt)&&!Global.isSsr){var lt,ct,ut=calculateWordWidths({breakAll:at,children:it,style:ot});if(ut){var ht=ut.wordsWithComputedWidth,dt=ut.spaceWidth;lt=ht,ct=dt}else return getWordsWithoutCalculate(it);return calculateWordsByLines({breakAll:at,children:it,maxLines:st,style:ot},lt,ct,nt,rt)}return getWordsWithoutCalculate(it)},DEFAULT_FILL="#808080",Text=function(et){var nt=et.x,rt=nt===void 0?0:nt,it=et.y,ot=it===void 0?0:it,at=et.lineHeight,st=at===void 0?"1em":at,lt=et.capHeight,ct=lt===void 0?"0.71em":lt,ut=et.scaleToFit,ht=ut===void 0?!1:ut,dt=et.textAnchor,pt=dt===void 0?"start":dt,mt=et.verticalAnchor,gt=mt===void 0?"end":mt,yt=et.fill,bt=yt===void 0?DEFAULT_FILL:yt,vt=_objectWithoutProperties$c(et,_excluded$c),xt=reactExports.useMemo(function(){return getWordsByLines({breakAll:vt.breakAll,children:vt.children,maxLines:vt.maxLines,scaleToFit:ht,style:vt.style,width:vt.width})},[vt.breakAll,vt.children,vt.maxLines,ht,vt.style,vt.width]),kt=vt.dx,St=vt.dy,Tt=vt.angle,At=vt.className,Et=vt.breakAll,$t=_objectWithoutProperties$c(vt,_excluded2$4);if(!isNumOrStr(rt)||!isNumOrStr(ot))return null;var Dt=rt+(isNumber(kt)?kt:0),jt=ot+(isNumber(St)?St:0),Pt;switch(gt){case"start":Pt=reduceCSSCalc("calc(".concat(ct,")"));break;case"middle":Pt=reduceCSSCalc("calc(".concat((xt.length-1)/2," * -").concat(st," + (").concat(ct," / 2))"));break;default:Pt=reduceCSSCalc("calc(".concat(xt.length-1," * -").concat(st,")"));break}var Ct=[];if(ht){var wt=xt[0].width,It=vt.width;Ct.push("scale(".concat((isNumber(It)?It/wt:1)/wt,")"))}return Tt&&Ct.push("rotate(".concat(Tt,", ").concat(Dt,", ").concat(jt,")")),Ct.length&&($t.transform=Ct.join(" ")),React$1.createElement("text",_extends$m({},filterProps($t,!0),{x:Dt,y:jt,className:classNames("recharts-text",At),textAnchor:pt,fill:bt.includes("url")?DEFAULT_FILL:bt}),xt.map(function(Ot,Wt){return React$1.createElement("tspan",{x:Dt,dy:Wt===0?Pt:st,key:Wt},Ot.words.join(Et?"":" "))}))},baseIsEqual=_baseIsEqual;function isEqual$1(tt,et){return baseIsEqual(tt,et)}var isEqual_1=isEqual$1;const _isEqual=getDefaultExportFromCjs(isEqual_1);var isSymbol=isSymbol_1;function baseExtremum$2(tt,et,nt){for(var rt=-1,it=tt.length;++rtet}var _baseGt=baseGt$1,baseExtremum$1=_baseExtremum,baseGt=_baseGt,identity$7=identity_1;function max$1(tt){return tt&&tt.length?baseExtremum$1(tt,identity$7,baseGt):void 0}var max_1=max$1;const _max=getDefaultExportFromCjs(max_1);function baseLt$1(tt,et){return ttet?1:tt>=et?0:NaN}function descending(tt,et){return tt==null||et==null?NaN:ettt?1:et>=tt?0:NaN}function bisector(tt){let et,nt,rt;tt.length!==2?(et=ascending$1,nt=(st,lt)=>ascending$1(tt(st),lt),rt=(st,lt)=>tt(st)-lt):(et=tt===ascending$1||tt===descending?tt:zero$1,nt=tt,rt=tt);function it(st,lt,ct=0,ut=st.length){if(ct>>1;nt(st[ht],lt)<0?ct=ht+1:ut=ht}while(ct>>1;nt(st[ht],lt)<=0?ct=ht+1:ut=ht}while(ctct&&rt(st[ht-1],lt)>-rt(st[ht],lt)?ht-1:ht}return{left:it,center:at,right:ot}}function zero$1(){return 0}function number$3(tt){return tt===null?NaN:+tt}function*numbers(tt,et){if(et===void 0)for(let nt of tt)nt!=null&&(nt=+nt)>=nt&&(yield nt);else{let nt=-1;for(let rt of tt)(rt=et(rt,++nt,tt))!=null&&(rt=+rt)>=rt&&(yield rt)}}const ascendingBisect=bisector(ascending$1),bisectRight=ascendingBisect.right;bisector(number$3).center;const bisect=bisectRight;class InternMap extends Map{constructor(et,nt=keyof){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:nt}}),et!=null)for(const[rt,it]of et)this.set(rt,it)}get(et){return super.get(intern_get(this,et))}has(et){return super.has(intern_get(this,et))}set(et,nt){return super.set(intern_set(this,et),nt)}delete(et){return super.delete(intern_delete(this,et))}}function intern_get({_intern:tt,_key:et},nt){const rt=et(nt);return tt.has(rt)?tt.get(rt):nt}function intern_set({_intern:tt,_key:et},nt){const rt=et(nt);return tt.has(rt)?tt.get(rt):(tt.set(rt,nt),nt)}function intern_delete({_intern:tt,_key:et},nt){const rt=et(nt);return tt.has(rt)&&(nt=tt.get(rt),tt.delete(rt)),nt}function keyof(tt){return tt!==null&&typeof tt=="object"?tt.valueOf():tt}function compareDefined(tt=ascending$1){if(tt===ascending$1)return ascendingDefined;if(typeof tt!="function")throw new TypeError("compare is not a function");return(et,nt)=>{const rt=tt(et,nt);return rt||rt===0?rt:(tt(nt,nt)===0)-(tt(et,et)===0)}}function ascendingDefined(tt,et){return(tt==null||!(tt>=tt))-(et==null||!(et>=et))||(ttet?1:0)}const e10=Math.sqrt(50),e5=Math.sqrt(10),e2=Math.sqrt(2);function tickSpec(tt,et,nt){const rt=(et-tt)/Math.max(0,nt),it=Math.floor(Math.log10(rt)),ot=rt/Math.pow(10,it),at=ot>=e10?10:ot>=e5?5:ot>=e2?2:1;let st,lt,ct;return it<0?(ct=Math.pow(10,-it)/at,st=Math.round(tt*ct),lt=Math.round(et*ct),st/ctet&&--lt,ct=-ct):(ct=Math.pow(10,it)*at,st=Math.round(tt/ct),lt=Math.round(et/ct),st*ctet&&--lt),lt0))return[];if(tt===et)return[tt];const rt=et=it))return[];const st=ot-it+1,lt=new Array(st);if(rt)if(at<0)for(let ct=0;ct=rt)&&(nt=rt);else{let rt=-1;for(let it of tt)(it=et(it,++rt,tt))!=null&&(nt=it)&&(nt=it)}return nt}function min(tt,et){let nt;if(et===void 0)for(const rt of tt)rt!=null&&(nt>rt||nt===void 0&&rt>=rt)&&(nt=rt);else{let rt=-1;for(let it of tt)(it=et(it,++rt,tt))!=null&&(nt>it||nt===void 0&&it>=it)&&(nt=it)}return nt}function quickselect(tt,et,nt=0,rt=1/0,it){if(et=Math.floor(et),nt=Math.floor(Math.max(0,nt)),rt=Math.floor(Math.min(tt.length-1,rt)),!(nt<=et&&et<=rt))return tt;for(it=it===void 0?ascendingDefined:compareDefined(it);rt>nt;){if(rt-nt>600){const lt=rt-nt+1,ct=et-nt+1,ut=Math.log(lt),ht=.5*Math.exp(2*ut/3),dt=.5*Math.sqrt(ut*ht*(lt-ht)/lt)*(ct-lt/2<0?-1:1),pt=Math.max(nt,Math.floor(et-ct*ht/lt+dt)),mt=Math.min(rt,Math.floor(et+(lt-ct)*ht/lt+dt));quickselect(tt,et,pt,mt,it)}const ot=tt[et];let at=nt,st=rt;for(swap(tt,nt,et),it(tt[rt],ot)>0&&swap(tt,nt,rt);at0;)--st}it(tt[nt],ot)===0?swap(tt,nt,st):(++st,swap(tt,st,rt)),st<=et&&(nt=st+1),et<=st&&(rt=st-1)}return tt}function swap(tt,et,nt){const rt=tt[et];tt[et]=tt[nt],tt[nt]=rt}function quantile$1(tt,et,nt){if(tt=Float64Array.from(numbers(tt,nt)),!(!(rt=tt.length)||isNaN(et=+et))){if(et<=0||rt<2)return min(tt);if(et>=1)return max(tt);var rt,it=(rt-1)*et,ot=Math.floor(it),at=max(quickselect(tt,ot).subarray(0,ot+1)),st=min(tt.subarray(ot+1));return at+(st-at)*(it-ot)}}function quantileSorted(tt,et,nt=number$3){if(!(!(rt=tt.length)||isNaN(et=+et))){if(et<=0||rt<2)return+nt(tt[0],0,tt);if(et>=1)return+nt(tt[rt-1],rt-1,tt);var rt,it=(rt-1)*et,ot=Math.floor(it),at=+nt(tt[ot],ot,tt),st=+nt(tt[ot+1],ot+1,tt);return at+(st-at)*(it-ot)}}function range$2(tt,et,nt){tt=+tt,et=+et,nt=(it=arguments.length)<2?(et=tt,tt=0,1):it<3?1:+nt;for(var rt=-1,it=Math.max(0,Math.ceil((et-tt)/nt))|0,ot=new Array(it);++rt>8&15|et>>4&240,et>>4&15|et&240,(et&15)<<4|et&15,1):nt===8?rgba(et>>24&255,et>>16&255,et>>8&255,(et&255)/255):nt===4?rgba(et>>12&15|et>>8&240,et>>8&15|et>>4&240,et>>4&15|et&240,((et&15)<<4|et&15)/255):null):(et=reRgbInteger.exec(tt))?new Rgb(et[1],et[2],et[3],1):(et=reRgbPercent.exec(tt))?new Rgb(et[1]*255/100,et[2]*255/100,et[3]*255/100,1):(et=reRgbaInteger.exec(tt))?rgba(et[1],et[2],et[3],et[4]):(et=reRgbaPercent.exec(tt))?rgba(et[1]*255/100,et[2]*255/100,et[3]*255/100,et[4]):(et=reHslPercent.exec(tt))?hsla(et[1],et[2]/100,et[3]/100,1):(et=reHslaPercent.exec(tt))?hsla(et[1],et[2]/100,et[3]/100,et[4]):named.hasOwnProperty(tt)?rgbn(named[tt]):tt==="transparent"?new Rgb(NaN,NaN,NaN,0):null}function rgbn(tt){return new Rgb(tt>>16&255,tt>>8&255,tt&255,1)}function rgba(tt,et,nt,rt){return rt<=0&&(tt=et=nt=NaN),new Rgb(tt,et,nt,rt)}function rgbConvert(tt){return tt instanceof Color||(tt=color(tt)),tt?(tt=tt.rgb(),new Rgb(tt.r,tt.g,tt.b,tt.opacity)):new Rgb}function rgb(tt,et,nt,rt){return arguments.length===1?rgbConvert(tt):new Rgb(tt,et,nt,rt??1)}function Rgb(tt,et,nt,rt){this.r=+tt,this.g=+et,this.b=+nt,this.opacity=+rt}define(Rgb,rgb,extend(Color,{brighter(tt){return tt=tt==null?brighter:Math.pow(brighter,tt),new Rgb(this.r*tt,this.g*tt,this.b*tt,this.opacity)},darker(tt){return tt=tt==null?darker:Math.pow(darker,tt),new Rgb(this.r*tt,this.g*tt,this.b*tt,this.opacity)},rgb(){return this},clamp(){return new Rgb(clampi(this.r),clampi(this.g),clampi(this.b),clampa(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:rgb_formatHex,formatHex:rgb_formatHex,formatHex8:rgb_formatHex8,formatRgb:rgb_formatRgb,toString:rgb_formatRgb}));function rgb_formatHex(){return`#${hex(this.r)}${hex(this.g)}${hex(this.b)}`}function rgb_formatHex8(){return`#${hex(this.r)}${hex(this.g)}${hex(this.b)}${hex((isNaN(this.opacity)?1:this.opacity)*255)}`}function rgb_formatRgb(){const tt=clampa(this.opacity);return`${tt===1?"rgb(":"rgba("}${clampi(this.r)}, ${clampi(this.g)}, ${clampi(this.b)}${tt===1?")":`, ${tt})`}`}function clampa(tt){return isNaN(tt)?1:Math.max(0,Math.min(1,tt))}function clampi(tt){return Math.max(0,Math.min(255,Math.round(tt)||0))}function hex(tt){return tt=clampi(tt),(tt<16?"0":"")+tt.toString(16)}function hsla(tt,et,nt,rt){return rt<=0?tt=et=nt=NaN:nt<=0||nt>=1?tt=et=NaN:et<=0&&(tt=NaN),new Hsl(tt,et,nt,rt)}function hslConvert(tt){if(tt instanceof Hsl)return new Hsl(tt.h,tt.s,tt.l,tt.opacity);if(tt instanceof Color||(tt=color(tt)),!tt)return new Hsl;if(tt instanceof Hsl)return tt;tt=tt.rgb();var et=tt.r/255,nt=tt.g/255,rt=tt.b/255,it=Math.min(et,nt,rt),ot=Math.max(et,nt,rt),at=NaN,st=ot-it,lt=(ot+it)/2;return st?(et===ot?at=(nt-rt)/st+(nt0&<<1?0:at,new Hsl(at,st,lt,tt.opacity)}function hsl(tt,et,nt,rt){return arguments.length===1?hslConvert(tt):new Hsl(tt,et,nt,rt??1)}function Hsl(tt,et,nt,rt){this.h=+tt,this.s=+et,this.l=+nt,this.opacity=+rt}define(Hsl,hsl,extend(Color,{brighter(tt){return tt=tt==null?brighter:Math.pow(brighter,tt),new Hsl(this.h,this.s,this.l*tt,this.opacity)},darker(tt){return tt=tt==null?darker:Math.pow(darker,tt),new Hsl(this.h,this.s,this.l*tt,this.opacity)},rgb(){var tt=this.h%360+(this.h<0)*360,et=isNaN(tt)||isNaN(this.s)?0:this.s,nt=this.l,rt=nt+(nt<.5?nt:1-nt)*et,it=2*nt-rt;return new Rgb(hsl2rgb(tt>=240?tt-240:tt+120,it,rt),hsl2rgb(tt,it,rt),hsl2rgb(tt<120?tt+240:tt-120,it,rt),this.opacity)},clamp(){return new Hsl(clamph(this.h),clampt(this.s),clampt(this.l),clampa(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const tt=clampa(this.opacity);return`${tt===1?"hsl(":"hsla("}${clamph(this.h)}, ${clampt(this.s)*100}%, ${clampt(this.l)*100}%${tt===1?")":`, ${tt})`}`}}));function clamph(tt){return tt=(tt||0)%360,tt<0?tt+360:tt}function clampt(tt){return Math.max(0,Math.min(1,tt||0))}function hsl2rgb(tt,et,nt){return(tt<60?et+(nt-et)*tt/60:tt<180?nt:tt<240?et+(nt-et)*(240-tt)/60:et)*255}const constant$3=tt=>()=>tt;function linear$1(tt,et){return function(nt){return tt+nt*et}}function exponential(tt,et,nt){return tt=Math.pow(tt,nt),et=Math.pow(et,nt)-tt,nt=1/nt,function(rt){return Math.pow(tt+rt*et,nt)}}function gamma(tt){return(tt=+tt)==1?nogamma:function(et,nt){return nt-et?exponential(et,nt,tt):constant$3(isNaN(et)?nt:et)}}function nogamma(tt,et){var nt=et-tt;return nt?linear$1(tt,nt):constant$3(isNaN(tt)?et:tt)}const interpolateRgb=function tt(et){var nt=gamma(et);function rt(it,ot){var at=nt((it=rgb(it)).r,(ot=rgb(ot)).r),st=nt(it.g,ot.g),lt=nt(it.b,ot.b),ct=nogamma(it.opacity,ot.opacity);return function(ut){return it.r=at(ut),it.g=st(ut),it.b=lt(ut),it.opacity=ct(ut),it+""}}return rt.gamma=tt,rt}(1);function numberArray(tt,et){et||(et=[]);var nt=tt?Math.min(et.length,tt.length):0,rt=et.slice(),it;return function(ot){for(it=0;itnt&&(ot=et.slice(nt,ot),st[at]?st[at]+=ot:st[++at]=ot),(rt=rt[0])===(it=it[0])?st[at]?st[at]+=it:st[++at]=it:(st[++at]=null,lt.push({i:at,x:interpolateNumber$1(rt,it)})),nt=reB.lastIndex;return nt180?ut+=360:ut-ct>180&&(ct+=360),dt.push({i:ht.push(it(ht)+"rotate(",null,rt)-2,x:interpolateNumber$1(ct,ut)})):ut&&ht.push(it(ht)+"rotate("+ut+rt)}function st(ct,ut,ht,dt){ct!==ut?dt.push({i:ht.push(it(ht)+"skewX(",null,rt)-2,x:interpolateNumber$1(ct,ut)}):ut&&ht.push(it(ht)+"skewX("+ut+rt)}function lt(ct,ut,ht,dt,pt,mt){if(ct!==ht||ut!==dt){var gt=pt.push(it(pt)+"scale(",null,",",null,")");mt.push({i:gt-4,x:interpolateNumber$1(ct,ht)},{i:gt-2,x:interpolateNumber$1(ut,dt)})}else(ht!==1||dt!==1)&&pt.push(it(pt)+"scale("+ht+","+dt+")")}return function(ct,ut){var ht=[],dt=[];return ct=tt(ct),ut=tt(ut),ot(ct.translateX,ct.translateY,ut.translateX,ut.translateY,ht,dt),at(ct.rotate,ut.rotate,ht,dt),st(ct.skewX,ut.skewX,ht,dt),lt(ct.scaleX,ct.scaleY,ut.scaleX,ut.scaleY,ht,dt),ct=ut=null,function(pt){for(var mt=-1,gt=dt.length,yt;++mtet&&(nt=tt,tt=et,et=nt),function(rt){return Math.max(tt,Math.min(et,rt))}}function bimap(tt,et,nt){var rt=tt[0],it=tt[1],ot=et[0],at=et[1];return it2?polymap:bimap,lt=ct=null,ht}function ht(dt){return dt==null||isNaN(dt=+dt)?ot:(lt||(lt=st(tt.map(rt),et,nt)))(rt(at(dt)))}return ht.invert=function(dt){return at(it((ct||(ct=st(et,tt.map(rt),interpolateNumber$1)))(dt)))},ht.domain=function(dt){return arguments.length?(tt=Array.from(dt,number$2),ut()):tt.slice()},ht.range=function(dt){return arguments.length?(et=Array.from(dt),ut()):et.slice()},ht.rangeRound=function(dt){return et=Array.from(dt),nt=interpolateRound,ut()},ht.clamp=function(dt){return arguments.length?(at=dt?!0:identity$4,ut()):at!==identity$4},ht.interpolate=function(dt){return arguments.length?(nt=dt,ut()):nt},ht.unknown=function(dt){return arguments.length?(ot=dt,ht):ot},function(dt,pt){return rt=dt,it=pt,ut()}}function continuous(){return transformer$2()(identity$4,identity$4)}function formatDecimal(tt){return Math.abs(tt=Math.round(tt))>=1e21?tt.toLocaleString("en").replace(/,/g,""):tt.toString(10)}function formatDecimalParts(tt,et){if((nt=(tt=et?tt.toExponential(et-1):tt.toExponential()).indexOf("e"))<0)return null;var nt,rt=tt.slice(0,nt);return[rt.length>1?rt[0]+rt.slice(2):rt,+tt.slice(nt+1)]}function exponent(tt){return tt=formatDecimalParts(Math.abs(tt)),tt?tt[1]:NaN}function formatGroup(tt,et){return function(nt,rt){for(var it=nt.length,ot=[],at=0,st=tt[0],lt=0;it>0&&st>0&&(lt+st+1>rt&&(st=Math.max(1,rt-lt)),ot.push(nt.substring(it-=st,it+st)),!((lt+=st+1)>rt));)st=tt[at=(at+1)%tt.length];return ot.reverse().join(et)}}function formatNumerals(tt){return function(et){return et.replace(/[0-9]/g,function(nt){return tt[+nt]})}}var re$1=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function formatSpecifier(tt){if(!(et=re$1.exec(tt)))throw new Error("invalid format: "+tt);var et;return new FormatSpecifier({fill:et[1],align:et[2],sign:et[3],symbol:et[4],zero:et[5],width:et[6],comma:et[7],precision:et[8]&&et[8].slice(1),trim:et[9],type:et[10]})}formatSpecifier.prototype=FormatSpecifier.prototype;function FormatSpecifier(tt){this.fill=tt.fill===void 0?" ":tt.fill+"",this.align=tt.align===void 0?">":tt.align+"",this.sign=tt.sign===void 0?"-":tt.sign+"",this.symbol=tt.symbol===void 0?"":tt.symbol+"",this.zero=!!tt.zero,this.width=tt.width===void 0?void 0:+tt.width,this.comma=!!tt.comma,this.precision=tt.precision===void 0?void 0:+tt.precision,this.trim=!!tt.trim,this.type=tt.type===void 0?"":tt.type+""}FormatSpecifier.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function formatTrim(tt){e:for(var et=tt.length,nt=1,rt=-1,it;nt0&&(rt=0);break}return rt>0?tt.slice(0,rt)+tt.slice(it+1):tt}var prefixExponent;function formatPrefixAuto(tt,et){var nt=formatDecimalParts(tt,et);if(!nt)return tt+"";var rt=nt[0],it=nt[1],ot=it-(prefixExponent=Math.max(-8,Math.min(8,Math.floor(it/3)))*3)+1,at=rt.length;return ot===at?rt:ot>at?rt+new Array(ot-at+1).join("0"):ot>0?rt.slice(0,ot)+"."+rt.slice(ot):"0."+new Array(1-ot).join("0")+formatDecimalParts(tt,Math.max(0,et+ot-1))[0]}function formatRounded(tt,et){var nt=formatDecimalParts(tt,et);if(!nt)return tt+"";var rt=nt[0],it=nt[1];return it<0?"0."+new Array(-it).join("0")+rt:rt.length>it+1?rt.slice(0,it+1)+"."+rt.slice(it+1):rt+new Array(it-rt.length+2).join("0")}const formatTypes={"%":(tt,et)=>(tt*100).toFixed(et),b:tt=>Math.round(tt).toString(2),c:tt=>tt+"",d:formatDecimal,e:(tt,et)=>tt.toExponential(et),f:(tt,et)=>tt.toFixed(et),g:(tt,et)=>tt.toPrecision(et),o:tt=>Math.round(tt).toString(8),p:(tt,et)=>formatRounded(tt*100,et),r:formatRounded,s:formatPrefixAuto,X:tt=>Math.round(tt).toString(16).toUpperCase(),x:tt=>Math.round(tt).toString(16)};function identity$3(tt){return tt}var map$2=Array.prototype.map,prefixes=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function formatLocale$1(tt){var et=tt.grouping===void 0||tt.thousands===void 0?identity$3:formatGroup(map$2.call(tt.grouping,Number),tt.thousands+""),nt=tt.currency===void 0?"":tt.currency[0]+"",rt=tt.currency===void 0?"":tt.currency[1]+"",it=tt.decimal===void 0?".":tt.decimal+"",ot=tt.numerals===void 0?identity$3:formatNumerals(map$2.call(tt.numerals,String)),at=tt.percent===void 0?"%":tt.percent+"",st=tt.minus===void 0?"−":tt.minus+"",lt=tt.nan===void 0?"NaN":tt.nan+"";function ct(ht){ht=formatSpecifier(ht);var dt=ht.fill,pt=ht.align,mt=ht.sign,gt=ht.symbol,yt=ht.zero,bt=ht.width,vt=ht.comma,xt=ht.precision,kt=ht.trim,St=ht.type;St==="n"?(vt=!0,St="g"):formatTypes[St]||(xt===void 0&&(xt=12),kt=!0,St="g"),(yt||dt==="0"&&pt==="=")&&(yt=!0,dt="0",pt="=");var Tt=gt==="$"?nt:gt==="#"&&/[boxX]/.test(St)?"0"+St.toLowerCase():"",At=gt==="$"?rt:/[%p]/.test(St)?at:"",Et=formatTypes[St],$t=/[defgprs%]/.test(St);xt=xt===void 0?6:/[gprs]/.test(St)?Math.max(1,Math.min(21,xt)):Math.max(0,Math.min(20,xt));function Dt(jt){var Pt=Tt,Ct=At,wt,It,Ot;if(St==="c")Ct=Et(jt)+Ct,jt="";else{jt=+jt;var Wt=jt<0||1/jt<0;if(jt=isNaN(jt)?lt:Et(Math.abs(jt),xt),kt&&(jt=formatTrim(jt)),Wt&&+jt==0&&mt!=="+"&&(Wt=!1),Pt=(Wt?mt==="("?mt:st:mt==="-"||mt==="("?"":mt)+Pt,Ct=(St==="s"?prefixes[8+prefixExponent/3]:"")+Ct+(Wt&&mt==="("?")":""),$t){for(wt=-1,It=jt.length;++wtOt||Ot>57){Ct=(Ot===46?it+jt.slice(wt+1):jt.slice(wt))+Ct,jt=jt.slice(0,wt);break}}}vt&&!yt&&(jt=et(jt,1/0));var zt=Pt.length+jt.length+Ct.length,Ft=zt>1)+Pt+jt+Ct+Ft.slice(zt);break;default:jt=Ft+Pt+jt+Ct;break}return ot(jt)}return Dt.toString=function(){return ht+""},Dt}function ut(ht,dt){var pt=ct((ht=formatSpecifier(ht),ht.type="f",ht)),mt=Math.max(-8,Math.min(8,Math.floor(exponent(dt)/3)))*3,gt=Math.pow(10,-mt),yt=prefixes[8+mt/3];return function(bt){return pt(gt*bt)+yt}}return{format:ct,formatPrefix:ut}}var locale$1,format,formatPrefix;defaultLocale$1({thousands:",",grouping:[3],currency:["$",""]});function defaultLocale$1(tt){return locale$1=formatLocale$1(tt),format=locale$1.format,formatPrefix=locale$1.formatPrefix,locale$1}function precisionFixed(tt){return Math.max(0,-exponent(Math.abs(tt)))}function precisionPrefix(tt,et){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(exponent(et)/3)))*3-exponent(Math.abs(tt)))}function precisionRound(tt,et){return tt=Math.abs(tt),et=Math.abs(et)-tt,Math.max(0,exponent(et)-exponent(tt))+1}function tickFormat(tt,et,nt,rt){var it=tickStep(tt,et,nt),ot;switch(rt=formatSpecifier(rt??",f"),rt.type){case"s":{var at=Math.max(Math.abs(tt),Math.abs(et));return rt.precision==null&&!isNaN(ot=precisionPrefix(it,at))&&(rt.precision=ot),formatPrefix(rt,at)}case"":case"e":case"g":case"p":case"r":{rt.precision==null&&!isNaN(ot=precisionRound(it,Math.max(Math.abs(tt),Math.abs(et))))&&(rt.precision=ot-(rt.type==="e"));break}case"f":case"%":{rt.precision==null&&!isNaN(ot=precisionFixed(it))&&(rt.precision=ot-(rt.type==="%")*2);break}}return format(rt)}function linearish(tt){var et=tt.domain;return tt.ticks=function(nt){var rt=et();return ticks(rt[0],rt[rt.length-1],nt??10)},tt.tickFormat=function(nt,rt){var it=et();return tickFormat(it[0],it[it.length-1],nt??10,rt)},tt.nice=function(nt){nt==null&&(nt=10);var rt=et(),it=0,ot=rt.length-1,at=rt[it],st=rt[ot],lt,ct,ut=10;for(st0;){if(ct=tickIncrement(at,st,nt),ct===lt)return rt[it]=at,rt[ot]=st,et(rt);if(ct>0)at=Math.floor(at/ct)*ct,st=Math.ceil(st/ct)*ct;else if(ct<0)at=Math.ceil(at*ct)/ct,st=Math.floor(st*ct)/ct;else break;lt=ct}return tt},tt}function linear(){var tt=continuous();return tt.copy=function(){return copy$1(tt,linear())},initRange.apply(tt,arguments),linearish(tt)}function identity$2(tt){var et;function nt(rt){return rt==null||isNaN(rt=+rt)?et:rt}return nt.invert=nt,nt.domain=nt.range=function(rt){return arguments.length?(tt=Array.from(rt,number$2),nt):tt.slice()},nt.unknown=function(rt){return arguments.length?(et=rt,nt):et},nt.copy=function(){return identity$2(tt).unknown(et)},tt=arguments.length?Array.from(tt,number$2):[0,1],linearish(nt)}function nice(tt,et){tt=tt.slice();var nt=0,rt=tt.length-1,it=tt[nt],ot=tt[rt],at;return otMath.pow(tt,et)}function logp(tt){return tt===Math.E?Math.log:tt===10&&Math.log10||tt===2&&Math.log2||(tt=Math.log(tt),et=>Math.log(et)/tt)}function reflect(tt){return(et,nt)=>-tt(-et,nt)}function loggish(tt){const et=tt(transformLog,transformExp),nt=et.domain;let rt=10,it,ot;function at(){return it=logp(rt),ot=powp(rt),nt()[0]<0?(it=reflect(it),ot=reflect(ot),tt(transformLogn,transformExpn)):tt(transformLog,transformExp),et}return et.base=function(st){return arguments.length?(rt=+st,at()):rt},et.domain=function(st){return arguments.length?(nt(st),at()):nt()},et.ticks=st=>{const lt=nt();let ct=lt[0],ut=lt[lt.length-1];const ht=ut0){for(;dt<=pt;++dt)for(mt=1;mtut)break;bt.push(gt)}}else for(;dt<=pt;++dt)for(mt=rt-1;mt>=1;--mt)if(gt=dt>0?mt/ot(-dt):mt*ot(dt),!(gtut)break;bt.push(gt)}bt.length*2{if(st==null&&(st=10),lt==null&&(lt=rt===10?"s":","),typeof lt!="function"&&(!(rt%1)&&(lt=formatSpecifier(lt)).precision==null&&(lt.trim=!0),lt=format(lt)),st===1/0)return lt;const ct=Math.max(1,rt*st/et.ticks().length);return ut=>{let ht=ut/ot(Math.round(it(ut)));return ht*rtnt(nice(nt(),{floor:st=>ot(Math.floor(it(st))),ceil:st=>ot(Math.ceil(it(st)))})),et}function log(){const tt=loggish(transformer$2()).domain([1,10]);return tt.copy=()=>copy$1(tt,log()).base(tt.base()),initRange.apply(tt,arguments),tt}function transformSymlog(tt){return function(et){return Math.sign(et)*Math.log1p(Math.abs(et/tt))}}function transformSymexp(tt){return function(et){return Math.sign(et)*Math.expm1(Math.abs(et))*tt}}function symlogish(tt){var et=1,nt=tt(transformSymlog(et),transformSymexp(et));return nt.constant=function(rt){return arguments.length?tt(transformSymlog(et=+rt),transformSymexp(et)):et},linearish(nt)}function symlog(){var tt=symlogish(transformer$2());return tt.copy=function(){return copy$1(tt,symlog()).constant(tt.constant())},initRange.apply(tt,arguments)}function transformPow(tt){return function(et){return et<0?-Math.pow(-et,tt):Math.pow(et,tt)}}function transformSqrt(tt){return tt<0?-Math.sqrt(-tt):Math.sqrt(tt)}function transformSquare(tt){return tt<0?-tt*tt:tt*tt}function powish(tt){var et=tt(identity$4,identity$4),nt=1;function rt(){return nt===1?tt(identity$4,identity$4):nt===.5?tt(transformSqrt,transformSquare):tt(transformPow(nt),transformPow(1/nt))}return et.exponent=function(it){return arguments.length?(nt=+it,rt()):nt},linearish(et)}function pow(){var tt=powish(transformer$2());return tt.copy=function(){return copy$1(tt,pow()).exponent(tt.exponent())},initRange.apply(tt,arguments),tt}function sqrt(){return pow.apply(null,arguments).exponent(.5)}function square(tt){return Math.sign(tt)*tt*tt}function unsquare(tt){return Math.sign(tt)*Math.sqrt(Math.abs(tt))}function radial(){var tt=continuous(),et=[0,1],nt=!1,rt;function it(ot){var at=unsquare(tt(ot));return isNaN(at)?rt:nt?Math.round(at):at}return it.invert=function(ot){return tt.invert(square(ot))},it.domain=function(ot){return arguments.length?(tt.domain(ot),it):tt.domain()},it.range=function(ot){return arguments.length?(tt.range((et=Array.from(ot,number$2)).map(square)),it):et.slice()},it.rangeRound=function(ot){return it.range(ot).round(!0)},it.round=function(ot){return arguments.length?(nt=!!ot,it):nt},it.clamp=function(ot){return arguments.length?(tt.clamp(ot),it):tt.clamp()},it.unknown=function(ot){return arguments.length?(rt=ot,it):rt},it.copy=function(){return radial(tt.domain(),et).round(nt).clamp(tt.clamp()).unknown(rt)},initRange.apply(it,arguments),linearish(it)}function quantile(){var tt=[],et=[],nt=[],rt;function it(){var at=0,st=Math.max(1,et.length);for(nt=new Array(st-1);++at0?nt[st-1]:tt[0],st=nt?[rt[nt-1],et]:[rt[ct-1],rt[ct]]},at.unknown=function(lt){return arguments.length&&(ot=lt),at},at.thresholds=function(){return rt.slice()},at.copy=function(){return quantize().domain([tt,et]).range(it).unknown(ot)},initRange.apply(linearish(at),arguments)}function threshold(){var tt=[.5],et=[0,1],nt,rt=1;function it(ot){return ot!=null&&ot<=ot?et[bisect(tt,ot,0,rt)]:nt}return it.domain=function(ot){return arguments.length?(tt=Array.from(ot),rt=Math.min(tt.length,et.length-1),it):tt.slice()},it.range=function(ot){return arguments.length?(et=Array.from(ot),rt=Math.min(tt.length,et.length-1),it):et.slice()},it.invertExtent=function(ot){var at=et.indexOf(ot);return[tt[at-1],tt[at]]},it.unknown=function(ot){return arguments.length?(nt=ot,it):nt},it.copy=function(){return threshold().domain(tt).range(et).unknown(nt)},initRange.apply(it,arguments)}const t0=new Date,t1=new Date;function timeInterval(tt,et,nt,rt){function it(ot){return tt(ot=arguments.length===0?new Date:new Date(+ot)),ot}return it.floor=ot=>(tt(ot=new Date(+ot)),ot),it.ceil=ot=>(tt(ot=new Date(ot-1)),et(ot,1),tt(ot),ot),it.round=ot=>{const at=it(ot),st=it.ceil(ot);return ot-at(et(ot=new Date(+ot),at==null?1:Math.floor(at)),ot),it.range=(ot,at,st)=>{const lt=[];if(ot=it.ceil(ot),st=st==null?1:Math.floor(st),!(ot0))return lt;let ct;do lt.push(ct=new Date(+ot)),et(ot,st),tt(ot);while(cttimeInterval(at=>{if(at>=at)for(;tt(at),!ot(at);)at.setTime(at-1)},(at,st)=>{if(at>=at)if(st<0)for(;++st<=0;)for(;et(at,-1),!ot(at););else for(;--st>=0;)for(;et(at,1),!ot(at););}),nt&&(it.count=(ot,at)=>(t0.setTime(+ot),t1.setTime(+at),tt(t0),tt(t1),Math.floor(nt(t0,t1))),it.every=ot=>(ot=Math.floor(ot),!isFinite(ot)||!(ot>0)?null:ot>1?it.filter(rt?at=>rt(at)%ot===0:at=>it.count(0,at)%ot===0):it)),it}const millisecond=timeInterval(()=>{},(tt,et)=>{tt.setTime(+tt+et)},(tt,et)=>et-tt);millisecond.every=tt=>(tt=Math.floor(tt),!isFinite(tt)||!(tt>0)?null:tt>1?timeInterval(et=>{et.setTime(Math.floor(et/tt)*tt)},(et,nt)=>{et.setTime(+et+nt*tt)},(et,nt)=>(nt-et)/tt):millisecond);millisecond.range;const durationSecond=1e3,durationMinute=durationSecond*60,durationHour=durationMinute*60,durationDay=durationHour*24,durationWeek=durationDay*7,durationMonth=durationDay*30,durationYear=durationDay*365,second=timeInterval(tt=>{tt.setTime(tt-tt.getMilliseconds())},(tt,et)=>{tt.setTime(+tt+et*durationSecond)},(tt,et)=>(et-tt)/durationSecond,tt=>tt.getUTCSeconds());second.range;const timeMinute=timeInterval(tt=>{tt.setTime(tt-tt.getMilliseconds()-tt.getSeconds()*durationSecond)},(tt,et)=>{tt.setTime(+tt+et*durationMinute)},(tt,et)=>(et-tt)/durationMinute,tt=>tt.getMinutes());timeMinute.range;const utcMinute=timeInterval(tt=>{tt.setUTCSeconds(0,0)},(tt,et)=>{tt.setTime(+tt+et*durationMinute)},(tt,et)=>(et-tt)/durationMinute,tt=>tt.getUTCMinutes());utcMinute.range;const timeHour=timeInterval(tt=>{tt.setTime(tt-tt.getMilliseconds()-tt.getSeconds()*durationSecond-tt.getMinutes()*durationMinute)},(tt,et)=>{tt.setTime(+tt+et*durationHour)},(tt,et)=>(et-tt)/durationHour,tt=>tt.getHours());timeHour.range;const utcHour=timeInterval(tt=>{tt.setUTCMinutes(0,0,0)},(tt,et)=>{tt.setTime(+tt+et*durationHour)},(tt,et)=>(et-tt)/durationHour,tt=>tt.getUTCHours());utcHour.range;const timeDay=timeInterval(tt=>tt.setHours(0,0,0,0),(tt,et)=>tt.setDate(tt.getDate()+et),(tt,et)=>(et-tt-(et.getTimezoneOffset()-tt.getTimezoneOffset())*durationMinute)/durationDay,tt=>tt.getDate()-1);timeDay.range;const utcDay=timeInterval(tt=>{tt.setUTCHours(0,0,0,0)},(tt,et)=>{tt.setUTCDate(tt.getUTCDate()+et)},(tt,et)=>(et-tt)/durationDay,tt=>tt.getUTCDate()-1);utcDay.range;const unixDay=timeInterval(tt=>{tt.setUTCHours(0,0,0,0)},(tt,et)=>{tt.setUTCDate(tt.getUTCDate()+et)},(tt,et)=>(et-tt)/durationDay,tt=>Math.floor(tt/durationDay));unixDay.range;function timeWeekday(tt){return timeInterval(et=>{et.setDate(et.getDate()-(et.getDay()+7-tt)%7),et.setHours(0,0,0,0)},(et,nt)=>{et.setDate(et.getDate()+nt*7)},(et,nt)=>(nt-et-(nt.getTimezoneOffset()-et.getTimezoneOffset())*durationMinute)/durationWeek)}const timeSunday=timeWeekday(0),timeMonday=timeWeekday(1),timeTuesday=timeWeekday(2),timeWednesday=timeWeekday(3),timeThursday=timeWeekday(4),timeFriday=timeWeekday(5),timeSaturday=timeWeekday(6);timeSunday.range;timeMonday.range;timeTuesday.range;timeWednesday.range;timeThursday.range;timeFriday.range;timeSaturday.range;function utcWeekday(tt){return timeInterval(et=>{et.setUTCDate(et.getUTCDate()-(et.getUTCDay()+7-tt)%7),et.setUTCHours(0,0,0,0)},(et,nt)=>{et.setUTCDate(et.getUTCDate()+nt*7)},(et,nt)=>(nt-et)/durationWeek)}const utcSunday=utcWeekday(0),utcMonday=utcWeekday(1),utcTuesday=utcWeekday(2),utcWednesday=utcWeekday(3),utcThursday=utcWeekday(4),utcFriday=utcWeekday(5),utcSaturday=utcWeekday(6);utcSunday.range;utcMonday.range;utcTuesday.range;utcWednesday.range;utcThursday.range;utcFriday.range;utcSaturday.range;const timeMonth=timeInterval(tt=>{tt.setDate(1),tt.setHours(0,0,0,0)},(tt,et)=>{tt.setMonth(tt.getMonth()+et)},(tt,et)=>et.getMonth()-tt.getMonth()+(et.getFullYear()-tt.getFullYear())*12,tt=>tt.getMonth());timeMonth.range;const utcMonth=timeInterval(tt=>{tt.setUTCDate(1),tt.setUTCHours(0,0,0,0)},(tt,et)=>{tt.setUTCMonth(tt.getUTCMonth()+et)},(tt,et)=>et.getUTCMonth()-tt.getUTCMonth()+(et.getUTCFullYear()-tt.getUTCFullYear())*12,tt=>tt.getUTCMonth());utcMonth.range;const timeYear=timeInterval(tt=>{tt.setMonth(0,1),tt.setHours(0,0,0,0)},(tt,et)=>{tt.setFullYear(tt.getFullYear()+et)},(tt,et)=>et.getFullYear()-tt.getFullYear(),tt=>tt.getFullYear());timeYear.every=tt=>!isFinite(tt=Math.floor(tt))||!(tt>0)?null:timeInterval(et=>{et.setFullYear(Math.floor(et.getFullYear()/tt)*tt),et.setMonth(0,1),et.setHours(0,0,0,0)},(et,nt)=>{et.setFullYear(et.getFullYear()+nt*tt)});timeYear.range;const utcYear=timeInterval(tt=>{tt.setUTCMonth(0,1),tt.setUTCHours(0,0,0,0)},(tt,et)=>{tt.setUTCFullYear(tt.getUTCFullYear()+et)},(tt,et)=>et.getUTCFullYear()-tt.getUTCFullYear(),tt=>tt.getUTCFullYear());utcYear.every=tt=>!isFinite(tt=Math.floor(tt))||!(tt>0)?null:timeInterval(et=>{et.setUTCFullYear(Math.floor(et.getUTCFullYear()/tt)*tt),et.setUTCMonth(0,1),et.setUTCHours(0,0,0,0)},(et,nt)=>{et.setUTCFullYear(et.getUTCFullYear()+nt*tt)});utcYear.range;function ticker(tt,et,nt,rt,it,ot){const at=[[second,1,durationSecond],[second,5,5*durationSecond],[second,15,15*durationSecond],[second,30,30*durationSecond],[ot,1,durationMinute],[ot,5,5*durationMinute],[ot,15,15*durationMinute],[ot,30,30*durationMinute],[it,1,durationHour],[it,3,3*durationHour],[it,6,6*durationHour],[it,12,12*durationHour],[rt,1,durationDay],[rt,2,2*durationDay],[nt,1,durationWeek],[et,1,durationMonth],[et,3,3*durationMonth],[tt,1,durationYear]];function st(ct,ut,ht){const dt=utyt).right(at,dt);if(pt===at.length)return tt.every(tickStep(ct/durationYear,ut/durationYear,ht));if(pt===0)return millisecond.every(Math.max(tickStep(ct,ut,ht),1));const[mt,gt]=at[dt/at[pt-1][2]53)return null;"w"in Qt||(Qt.w=1),"Z"in Qt?(Pn=utcDate(newDate(Qt.y,0,1)),$n=Pn.getUTCDay(),Pn=$n>4||$n===0?utcMonday.ceil(Pn):utcMonday(Pn),Pn=utcDay.offset(Pn,(Qt.V-1)*7),Qt.y=Pn.getUTCFullYear(),Qt.m=Pn.getUTCMonth(),Qt.d=Pn.getUTCDate()+(Qt.w+6)%7):(Pn=localDate(newDate(Qt.y,0,1)),$n=Pn.getDay(),Pn=$n>4||$n===0?timeMonday.ceil(Pn):timeMonday(Pn),Pn=timeDay.offset(Pn,(Qt.V-1)*7),Qt.y=Pn.getFullYear(),Qt.m=Pn.getMonth(),Qt.d=Pn.getDate()+(Qt.w+6)%7)}else("W"in Qt||"U"in Qt)&&("w"in Qt||(Qt.w="u"in Qt?Qt.u%7:"W"in Qt?1:0),$n="Z"in Qt?utcDate(newDate(Qt.y,0,1)).getUTCDay():localDate(newDate(Qt.y,0,1)).getDay(),Qt.m=0,Qt.d="W"in Qt?(Qt.w+6)%7+Qt.W*7-($n+5)%7:Qt.w+Qt.U*7-($n+6)%7);return"Z"in Qt?(Qt.H+=Qt.Z/100|0,Qt.M+=Qt.Z%100,utcDate(Qt)):localDate(Qt)}}function Et(hn,vn,an,Qt){for(var _n=0,Pn=vn.length,$n=an.length,Nn,Tn;_n=$n)return-1;if(Nn=vn.charCodeAt(_n++),Nn===37){if(Nn=vn.charAt(_n++),Tn=St[Nn in pads?vn.charAt(_n++):Nn],!Tn||(Qt=Tn(hn,an,Qt))<0)return-1}else if(Nn!=an.charCodeAt(Qt++))return-1}return Qt}function $t(hn,vn,an){var Qt=ct.exec(vn.slice(an));return Qt?(hn.p=ut.get(Qt[0].toLowerCase()),an+Qt[0].length):-1}function Dt(hn,vn,an){var Qt=pt.exec(vn.slice(an));return Qt?(hn.w=mt.get(Qt[0].toLowerCase()),an+Qt[0].length):-1}function jt(hn,vn,an){var Qt=ht.exec(vn.slice(an));return Qt?(hn.w=dt.get(Qt[0].toLowerCase()),an+Qt[0].length):-1}function Pt(hn,vn,an){var Qt=bt.exec(vn.slice(an));return Qt?(hn.m=vt.get(Qt[0].toLowerCase()),an+Qt[0].length):-1}function Ct(hn,vn,an){var Qt=gt.exec(vn.slice(an));return Qt?(hn.m=yt.get(Qt[0].toLowerCase()),an+Qt[0].length):-1}function wt(hn,vn,an){return Et(hn,et,vn,an)}function It(hn,vn,an){return Et(hn,nt,vn,an)}function Ot(hn,vn,an){return Et(hn,rt,vn,an)}function Wt(hn){return at[hn.getDay()]}function zt(hn){return ot[hn.getDay()]}function Ft(hn){return lt[hn.getMonth()]}function Nt(hn){return st[hn.getMonth()]}function Ut(hn){return it[+(hn.getHours()>=12)]}function Mt(hn){return 1+~~(hn.getMonth()/3)}function Ht(hn){return at[hn.getUTCDay()]}function en(hn){return ot[hn.getUTCDay()]}function sn(hn){return lt[hn.getUTCMonth()]}function Kt(hn){return st[hn.getUTCMonth()]}function rn(hn){return it[+(hn.getUTCHours()>=12)]}function nn(hn){return 1+~~(hn.getUTCMonth()/3)}return{format:function(hn){var vn=Tt(hn+="",xt);return vn.toString=function(){return hn},vn},parse:function(hn){var vn=At(hn+="",!1);return vn.toString=function(){return hn},vn},utcFormat:function(hn){var vn=Tt(hn+="",kt);return vn.toString=function(){return hn},vn},utcParse:function(hn){var vn=At(hn+="",!0);return vn.toString=function(){return hn},vn}}}var pads={"-":"",_:" ",0:"0"},numberRe=/^\s*\d+/,percentRe=/^%/,requoteRe=/[\\^$*+?|[\]().{}]/g;function pad(tt,et,nt){var rt=tt<0?"-":"",it=(rt?-tt:tt)+"",ot=it.length;return rt+(ot[et.toLowerCase(),nt]))}function parseWeekdayNumberSunday(tt,et,nt){var rt=numberRe.exec(et.slice(nt,nt+1));return rt?(tt.w=+rt[0],nt+rt[0].length):-1}function parseWeekdayNumberMonday(tt,et,nt){var rt=numberRe.exec(et.slice(nt,nt+1));return rt?(tt.u=+rt[0],nt+rt[0].length):-1}function parseWeekNumberSunday(tt,et,nt){var rt=numberRe.exec(et.slice(nt,nt+2));return rt?(tt.U=+rt[0],nt+rt[0].length):-1}function parseWeekNumberISO(tt,et,nt){var rt=numberRe.exec(et.slice(nt,nt+2));return rt?(tt.V=+rt[0],nt+rt[0].length):-1}function parseWeekNumberMonday(tt,et,nt){var rt=numberRe.exec(et.slice(nt,nt+2));return rt?(tt.W=+rt[0],nt+rt[0].length):-1}function parseFullYear(tt,et,nt){var rt=numberRe.exec(et.slice(nt,nt+4));return rt?(tt.y=+rt[0],nt+rt[0].length):-1}function parseYear(tt,et,nt){var rt=numberRe.exec(et.slice(nt,nt+2));return rt?(tt.y=+rt[0]+(+rt[0]>68?1900:2e3),nt+rt[0].length):-1}function parseZone(tt,et,nt){var rt=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(et.slice(nt,nt+6));return rt?(tt.Z=rt[1]?0:-(rt[2]+(rt[3]||"00")),nt+rt[0].length):-1}function parseQuarter(tt,et,nt){var rt=numberRe.exec(et.slice(nt,nt+1));return rt?(tt.q=rt[0]*3-3,nt+rt[0].length):-1}function parseMonthNumber(tt,et,nt){var rt=numberRe.exec(et.slice(nt,nt+2));return rt?(tt.m=rt[0]-1,nt+rt[0].length):-1}function parseDayOfMonth(tt,et,nt){var rt=numberRe.exec(et.slice(nt,nt+2));return rt?(tt.d=+rt[0],nt+rt[0].length):-1}function parseDayOfYear(tt,et,nt){var rt=numberRe.exec(et.slice(nt,nt+3));return rt?(tt.m=0,tt.d=+rt[0],nt+rt[0].length):-1}function parseHour24(tt,et,nt){var rt=numberRe.exec(et.slice(nt,nt+2));return rt?(tt.H=+rt[0],nt+rt[0].length):-1}function parseMinutes(tt,et,nt){var rt=numberRe.exec(et.slice(nt,nt+2));return rt?(tt.M=+rt[0],nt+rt[0].length):-1}function parseSeconds(tt,et,nt){var rt=numberRe.exec(et.slice(nt,nt+2));return rt?(tt.S=+rt[0],nt+rt[0].length):-1}function parseMilliseconds(tt,et,nt){var rt=numberRe.exec(et.slice(nt,nt+3));return rt?(tt.L=+rt[0],nt+rt[0].length):-1}function parseMicroseconds(tt,et,nt){var rt=numberRe.exec(et.slice(nt,nt+6));return rt?(tt.L=Math.floor(rt[0]/1e3),nt+rt[0].length):-1}function parseLiteralPercent(tt,et,nt){var rt=percentRe.exec(et.slice(nt,nt+1));return rt?nt+rt[0].length:-1}function parseUnixTimestamp(tt,et,nt){var rt=numberRe.exec(et.slice(nt));return rt?(tt.Q=+rt[0],nt+rt[0].length):-1}function parseUnixTimestampSeconds(tt,et,nt){var rt=numberRe.exec(et.slice(nt));return rt?(tt.s=+rt[0],nt+rt[0].length):-1}function formatDayOfMonth(tt,et){return pad(tt.getDate(),et,2)}function formatHour24(tt,et){return pad(tt.getHours(),et,2)}function formatHour12(tt,et){return pad(tt.getHours()%12||12,et,2)}function formatDayOfYear(tt,et){return pad(1+timeDay.count(timeYear(tt),tt),et,3)}function formatMilliseconds(tt,et){return pad(tt.getMilliseconds(),et,3)}function formatMicroseconds(tt,et){return formatMilliseconds(tt,et)+"000"}function formatMonthNumber(tt,et){return pad(tt.getMonth()+1,et,2)}function formatMinutes(tt,et){return pad(tt.getMinutes(),et,2)}function formatSeconds(tt,et){return pad(tt.getSeconds(),et,2)}function formatWeekdayNumberMonday(tt){var et=tt.getDay();return et===0?7:et}function formatWeekNumberSunday(tt,et){return pad(timeSunday.count(timeYear(tt)-1,tt),et,2)}function dISO(tt){var et=tt.getDay();return et>=4||et===0?timeThursday(tt):timeThursday.ceil(tt)}function formatWeekNumberISO(tt,et){return tt=dISO(tt),pad(timeThursday.count(timeYear(tt),tt)+(timeYear(tt).getDay()===4),et,2)}function formatWeekdayNumberSunday(tt){return tt.getDay()}function formatWeekNumberMonday(tt,et){return pad(timeMonday.count(timeYear(tt)-1,tt),et,2)}function formatYear(tt,et){return pad(tt.getFullYear()%100,et,2)}function formatYearISO(tt,et){return tt=dISO(tt),pad(tt.getFullYear()%100,et,2)}function formatFullYear(tt,et){return pad(tt.getFullYear()%1e4,et,4)}function formatFullYearISO(tt,et){var nt=tt.getDay();return tt=nt>=4||nt===0?timeThursday(tt):timeThursday.ceil(tt),pad(tt.getFullYear()%1e4,et,4)}function formatZone(tt){var et=tt.getTimezoneOffset();return(et>0?"-":(et*=-1,"+"))+pad(et/60|0,"0",2)+pad(et%60,"0",2)}function formatUTCDayOfMonth(tt,et){return pad(tt.getUTCDate(),et,2)}function formatUTCHour24(tt,et){return pad(tt.getUTCHours(),et,2)}function formatUTCHour12(tt,et){return pad(tt.getUTCHours()%12||12,et,2)}function formatUTCDayOfYear(tt,et){return pad(1+utcDay.count(utcYear(tt),tt),et,3)}function formatUTCMilliseconds(tt,et){return pad(tt.getUTCMilliseconds(),et,3)}function formatUTCMicroseconds(tt,et){return formatUTCMilliseconds(tt,et)+"000"}function formatUTCMonthNumber(tt,et){return pad(tt.getUTCMonth()+1,et,2)}function formatUTCMinutes(tt,et){return pad(tt.getUTCMinutes(),et,2)}function formatUTCSeconds(tt,et){return pad(tt.getUTCSeconds(),et,2)}function formatUTCWeekdayNumberMonday(tt){var et=tt.getUTCDay();return et===0?7:et}function formatUTCWeekNumberSunday(tt,et){return pad(utcSunday.count(utcYear(tt)-1,tt),et,2)}function UTCdISO(tt){var et=tt.getUTCDay();return et>=4||et===0?utcThursday(tt):utcThursday.ceil(tt)}function formatUTCWeekNumberISO(tt,et){return tt=UTCdISO(tt),pad(utcThursday.count(utcYear(tt),tt)+(utcYear(tt).getUTCDay()===4),et,2)}function formatUTCWeekdayNumberSunday(tt){return tt.getUTCDay()}function formatUTCWeekNumberMonday(tt,et){return pad(utcMonday.count(utcYear(tt)-1,tt),et,2)}function formatUTCYear(tt,et){return pad(tt.getUTCFullYear()%100,et,2)}function formatUTCYearISO(tt,et){return tt=UTCdISO(tt),pad(tt.getUTCFullYear()%100,et,2)}function formatUTCFullYear(tt,et){return pad(tt.getUTCFullYear()%1e4,et,4)}function formatUTCFullYearISO(tt,et){var nt=tt.getUTCDay();return tt=nt>=4||nt===0?utcThursday(tt):utcThursday.ceil(tt),pad(tt.getUTCFullYear()%1e4,et,4)}function formatUTCZone(){return"+0000"}function formatLiteralPercent(){return"%"}function formatUnixTimestamp(tt){return+tt}function formatUnixTimestampSeconds(tt){return Math.floor(+tt/1e3)}var locale,timeFormat,utcFormat;defaultLocale({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function defaultLocale(tt){return locale=formatLocale(tt),timeFormat=locale.format,locale.parse,utcFormat=locale.utcFormat,locale.utcParse,locale}function date(tt){return new Date(tt)}function number$1(tt){return tt instanceof Date?+tt:+new Date(+tt)}function calendar(tt,et,nt,rt,it,ot,at,st,lt,ct){var ut=continuous(),ht=ut.invert,dt=ut.domain,pt=ct(".%L"),mt=ct(":%S"),gt=ct("%I:%M"),yt=ct("%I %p"),bt=ct("%a %d"),vt=ct("%b %d"),xt=ct("%B"),kt=ct("%Y");function St(Tt){return(lt(Tt)et(it/(tt.length-1)))},nt.quantiles=function(rt){return Array.from({length:rt+1},(it,ot)=>quantile$1(tt,ot/rt))},nt.copy=function(){return sequentialQuantile(et).domain(tt)},initInterpolator.apply(nt,arguments)}function transformer(){var tt=0,et=.5,nt=1,rt=1,it,ot,at,st,lt,ct=identity$4,ut,ht=!1,dt;function pt(gt){return isNaN(gt=+gt)?dt:(gt=.5+((gt=+ut(gt))-ot)*(rt*gttt.e^ot.s<0?1:-1;for(rt=ot.d.length,it=tt.d.length,et=0,nt=rttt.d[et]^ot.s<0?1:-1;return rt===it?0:rt>it^ot.s<0?1:-1};P.decimalPlaces=P.dp=function(){var tt=this,et=tt.d.length-1,nt=(et-tt.e)*LOG_BASE;if(et=tt.d[et],et)for(;et%10==0;et/=10)nt--;return nt<0?0:nt};P.dividedBy=P.div=function(tt){return divide(this,new this.constructor(tt))};P.dividedToIntegerBy=P.idiv=function(tt){var et=this,nt=et.constructor;return round(divide(et,new nt(tt),0,1),nt.precision)};P.equals=P.eq=function(tt){return!this.cmp(tt)};P.exponent=function(){return getBase10Exponent(this)};P.greaterThan=P.gt=function(tt){return this.cmp(tt)>0};P.greaterThanOrEqualTo=P.gte=function(tt){return this.cmp(tt)>=0};P.isInteger=P.isint=function(){return this.e>this.d.length-2};P.isNegative=P.isneg=function(){return this.s<0};P.isPositive=P.ispos=function(){return this.s>0};P.isZero=function(){return this.s===0};P.lessThan=P.lt=function(tt){return this.cmp(tt)<0};P.lessThanOrEqualTo=P.lte=function(tt){return this.cmp(tt)<1};P.logarithm=P.log=function(tt){var et,nt=this,rt=nt.constructor,it=rt.precision,ot=it+5;if(tt===void 0)tt=new rt(10);else if(tt=new rt(tt),tt.s<1||tt.eq(ONE))throw Error(decimalError+"NaN");if(nt.s<1)throw Error(decimalError+(nt.s?"NaN":"-Infinity"));return nt.eq(ONE)?new rt(0):(external=!1,et=divide(ln(nt,ot),ln(tt,ot),ot),external=!0,round(et,it))};P.minus=P.sub=function(tt){var et=this;return tt=new et.constructor(tt),et.s==tt.s?subtract(et,tt):add(et,(tt.s=-tt.s,tt))};P.modulo=P.mod=function(tt){var et,nt=this,rt=nt.constructor,it=rt.precision;if(tt=new rt(tt),!tt.s)throw Error(decimalError+"NaN");return nt.s?(external=!1,et=divide(nt,tt,0,1).times(tt),external=!0,nt.minus(et)):round(new rt(nt),it)};P.naturalExponential=P.exp=function(){return exp(this)};P.naturalLogarithm=P.ln=function(){return ln(this)};P.negated=P.neg=function(){var tt=new this.constructor(this);return tt.s=-tt.s||0,tt};P.plus=P.add=function(tt){var et=this;return tt=new et.constructor(tt),et.s==tt.s?add(et,tt):subtract(et,(tt.s=-tt.s,tt))};P.precision=P.sd=function(tt){var et,nt,rt,it=this;if(tt!==void 0&&tt!==!!tt&&tt!==1&&tt!==0)throw Error(invalidArgument+tt);if(et=getBase10Exponent(it)+1,rt=it.d.length-1,nt=rt*LOG_BASE+1,rt=it.d[rt],rt){for(;rt%10==0;rt/=10)nt--;for(rt=it.d[0];rt>=10;rt/=10)nt++}return tt&&et>nt?et:nt};P.squareRoot=P.sqrt=function(){var tt,et,nt,rt,it,ot,at,st=this,lt=st.constructor;if(st.s<1){if(!st.s)return new lt(0);throw Error(decimalError+"NaN")}for(tt=getBase10Exponent(st),external=!1,it=Math.sqrt(+st),it==0||it==1/0?(et=digitsToString(st.d),(et.length+tt)%2==0&&(et+="0"),it=Math.sqrt(et),tt=mathfloor((tt+1)/2)-(tt<0||tt%2),it==1/0?et="5e"+tt:(et=it.toExponential(),et=et.slice(0,et.indexOf("e")+1)+tt),rt=new lt(et)):rt=new lt(it.toString()),nt=lt.precision,it=at=nt+3;;)if(ot=rt,rt=ot.plus(divide(st,ot,at+2)).times(.5),digitsToString(ot.d).slice(0,at)===(et=digitsToString(rt.d)).slice(0,at)){if(et=et.slice(at-3,at+1),it==at&&et=="4999"){if(round(ot,nt+1,0),ot.times(ot).eq(st)){rt=ot;break}}else if(et!="9999")break;at+=4}return external=!0,round(rt,nt)};P.times=P.mul=function(tt){var et,nt,rt,it,ot,at,st,lt,ct,ut=this,ht=ut.constructor,dt=ut.d,pt=(tt=new ht(tt)).d;if(!ut.s||!tt.s)return new ht(0);for(tt.s*=ut.s,nt=ut.e+tt.e,lt=dt.length,ct=pt.length,lt=0;){for(et=0,it=lt+rt;it>rt;)st=ot[it]+pt[rt]*dt[it-rt-1]+et,ot[it--]=st%BASE|0,et=st/BASE|0;ot[it]=(ot[it]+et)%BASE|0}for(;!ot[--at];)ot.pop();return et?++nt:ot.shift(),tt.d=ot,tt.e=nt,external?round(tt,ht.precision):tt};P.toDecimalPlaces=P.todp=function(tt,et){var nt=this,rt=nt.constructor;return nt=new rt(nt),tt===void 0?nt:(checkInt32(tt,0,MAX_DIGITS),et===void 0?et=rt.rounding:checkInt32(et,0,8),round(nt,tt+getBase10Exponent(nt)+1,et))};P.toExponential=function(tt,et){var nt,rt=this,it=rt.constructor;return tt===void 0?nt=toString$1(rt,!0):(checkInt32(tt,0,MAX_DIGITS),et===void 0?et=it.rounding:checkInt32(et,0,8),rt=round(new it(rt),tt+1,et),nt=toString$1(rt,!0,tt+1)),nt};P.toFixed=function(tt,et){var nt,rt,it=this,ot=it.constructor;return tt===void 0?toString$1(it):(checkInt32(tt,0,MAX_DIGITS),et===void 0?et=ot.rounding:checkInt32(et,0,8),rt=round(new ot(it),tt+getBase10Exponent(it)+1,et),nt=toString$1(rt.abs(),!1,tt+getBase10Exponent(rt)+1),it.isneg()&&!it.isZero()?"-"+nt:nt)};P.toInteger=P.toint=function(){var tt=this,et=tt.constructor;return round(new et(tt),getBase10Exponent(tt)+1,et.rounding)};P.toNumber=function(){return+this};P.toPower=P.pow=function(tt){var et,nt,rt,it,ot,at,st=this,lt=st.constructor,ct=12,ut=+(tt=new lt(tt));if(!tt.s)return new lt(ONE);if(st=new lt(st),!st.s){if(tt.s<1)throw Error(decimalError+"Infinity");return st}if(st.eq(ONE))return st;if(rt=lt.precision,tt.eq(ONE))return round(st,rt);if(et=tt.e,nt=tt.d.length-1,at=et>=nt,ot=st.s,at){if((nt=ut<0?-ut:ut)<=MAX_SAFE_INTEGER){for(it=new lt(ONE),et=Math.ceil(rt/LOG_BASE+4),external=!1;nt%2&&(it=it.times(st),truncate(it.d,et)),nt=mathfloor(nt/2),nt!==0;)st=st.times(st),truncate(st.d,et);return external=!0,tt.s<0?new lt(ONE).div(it):round(it,rt)}}else if(ot<0)throw Error(decimalError+"NaN");return ot=ot<0&&tt.d[Math.max(et,nt)]&1?-1:1,st.s=1,external=!1,it=tt.times(ln(st,rt+ct)),external=!0,it=exp(it),it.s=ot,it};P.toPrecision=function(tt,et){var nt,rt,it=this,ot=it.constructor;return tt===void 0?(nt=getBase10Exponent(it),rt=toString$1(it,nt<=ot.toExpNeg||nt>=ot.toExpPos)):(checkInt32(tt,1,MAX_DIGITS),et===void 0?et=ot.rounding:checkInt32(et,0,8),it=round(new ot(it),tt,et),nt=getBase10Exponent(it),rt=toString$1(it,tt<=nt||nt<=ot.toExpNeg,tt)),rt};P.toSignificantDigits=P.tosd=function(tt,et){var nt=this,rt=nt.constructor;return tt===void 0?(tt=rt.precision,et=rt.rounding):(checkInt32(tt,1,MAX_DIGITS),et===void 0?et=rt.rounding:checkInt32(et,0,8)),round(new rt(nt),tt,et)};P.toString=P.valueOf=P.val=P.toJSON=P[Symbol.for("nodejs.util.inspect.custom")]=function(){var tt=this,et=getBase10Exponent(tt),nt=tt.constructor;return toString$1(tt,et<=nt.toExpNeg||et>=nt.toExpPos)};function add(tt,et){var nt,rt,it,ot,at,st,lt,ct,ut=tt.constructor,ht=ut.precision;if(!tt.s||!et.s)return et.s||(et=new ut(tt)),external?round(et,ht):et;if(lt=tt.d,ct=et.d,at=tt.e,it=et.e,lt=lt.slice(),ot=at-it,ot){for(ot<0?(rt=lt,ot=-ot,st=ct.length):(rt=ct,it=at,st=lt.length),at=Math.ceil(ht/LOG_BASE),st=at>st?at+1:st+1,ot>st&&(ot=st,rt.length=1),rt.reverse();ot--;)rt.push(0);rt.reverse()}for(st=lt.length,ot=ct.length,st-ot<0&&(ot=st,rt=ct,ct=lt,lt=rt),nt=0;ot;)nt=(lt[--ot]=lt[ot]+ct[ot]+nt)/BASE|0,lt[ot]%=BASE;for(nt&&(lt.unshift(nt),++it),st=lt.length;lt[--st]==0;)lt.pop();return et.d=lt,et.e=it,external?round(et,ht):et}function checkInt32(tt,et,nt){if(tt!==~~tt||ttnt)throw Error(invalidArgument+tt)}function digitsToString(tt){var et,nt,rt,it=tt.length-1,ot="",at=tt[0];if(it>0){for(ot+=at,et=1;etat?1:-1;else for(st=lt=0;stit[st]?1:-1;break}return lt}function nt(rt,it,ot){for(var at=0;ot--;)rt[ot]-=at,at=rt[ot]1;)rt.shift()}return function(rt,it,ot,at){var st,lt,ct,ut,ht,dt,pt,mt,gt,yt,bt,vt,xt,kt,St,Tt,At,Et,$t=rt.constructor,Dt=rt.s==it.s?1:-1,jt=rt.d,Pt=it.d;if(!rt.s)return new $t(rt);if(!it.s)throw Error(decimalError+"Division by zero");for(lt=rt.e-it.e,At=Pt.length,St=jt.length,pt=new $t(Dt),mt=pt.d=[],ct=0;Pt[ct]==(jt[ct]||0);)++ct;if(Pt[ct]>(jt[ct]||0)&&--lt,ot==null?vt=ot=$t.precision:at?vt=ot+(getBase10Exponent(rt)-getBase10Exponent(it))+1:vt=ot,vt<0)return new $t(0);if(vt=vt/LOG_BASE+2|0,ct=0,At==1)for(ut=0,Pt=Pt[0],vt++;(ct1&&(Pt=tt(Pt,ut),jt=tt(jt,ut),At=Pt.length,St=jt.length),kt=At,gt=jt.slice(0,At),yt=gt.length;yt=BASE/2&&++Tt;do ut=0,st=et(Pt,gt,At,yt),st<0?(bt=gt[0],At!=yt&&(bt=bt*BASE+(gt[1]||0)),ut=bt/Tt|0,ut>1?(ut>=BASE&&(ut=BASE-1),ht=tt(Pt,ut),dt=ht.length,yt=gt.length,st=et(ht,gt,dt,yt),st==1&&(ut--,nt(ht,At16)throw Error(exponentOutOfRange+getBase10Exponent(tt));if(!tt.s)return new ut(ONE);for(et==null?(external=!1,st=ht):st=et,at=new ut(.03125);tt.abs().gte(.1);)tt=tt.times(at),ct+=5;for(rt=Math.log(mathpow(2,ct))/Math.LN10*2+5|0,st+=rt,nt=it=ot=new ut(ONE),ut.precision=st;;){if(it=round(it.times(tt),st),nt=nt.times(++lt),at=ot.plus(divide(it,nt,st)),digitsToString(at.d).slice(0,st)===digitsToString(ot.d).slice(0,st)){for(;ct--;)ot=round(ot.times(ot),st);return ut.precision=ht,et==null?(external=!0,round(ot,ht)):ot}ot=at}}function getBase10Exponent(tt){for(var et=tt.e*LOG_BASE,nt=tt.d[0];nt>=10;nt/=10)et++;return et}function getLn10(tt,et,nt){if(et>tt.LN10.sd())throw external=!0,nt&&(tt.precision=nt),Error(decimalError+"LN10 precision limit exceeded");return round(new tt(tt.LN10),et)}function getZeroString(tt){for(var et="";tt--;)et+="0";return et}function ln(tt,et){var nt,rt,it,ot,at,st,lt,ct,ut,ht=1,dt=10,pt=tt,mt=pt.d,gt=pt.constructor,yt=gt.precision;if(pt.s<1)throw Error(decimalError+(pt.s?"NaN":"-Infinity"));if(pt.eq(ONE))return new gt(0);if(et==null?(external=!1,ct=yt):ct=et,pt.eq(10))return et==null&&(external=!0),getLn10(gt,ct);if(ct+=dt,gt.precision=ct,nt=digitsToString(mt),rt=nt.charAt(0),ot=getBase10Exponent(pt),Math.abs(ot)<15e14){for(;rt<7&&rt!=1||rt==1&&nt.charAt(1)>3;)pt=pt.times(tt),nt=digitsToString(pt.d),rt=nt.charAt(0),ht++;ot=getBase10Exponent(pt),rt>1?(pt=new gt("0."+nt),ot++):pt=new gt(rt+"."+nt.slice(1))}else return lt=getLn10(gt,ct+2,yt).times(ot+""),pt=ln(new gt(rt+"."+nt.slice(1)),ct-dt).plus(lt),gt.precision=yt,et==null?(external=!0,round(pt,yt)):pt;for(st=at=pt=divide(pt.minus(ONE),pt.plus(ONE),ct),ut=round(pt.times(pt),ct),it=3;;){if(at=round(at.times(ut),ct),lt=st.plus(divide(at,new gt(it),ct)),digitsToString(lt.d).slice(0,ct)===digitsToString(st.d).slice(0,ct))return st=st.times(2),ot!==0&&(st=st.plus(getLn10(gt,ct+2,yt).times(ot+""))),st=divide(st,new gt(ht),ct),gt.precision=yt,et==null?(external=!0,round(st,yt)):st;st=lt,it+=2}}function parseDecimal(tt,et){var nt,rt,it;for((nt=et.indexOf("."))>-1&&(et=et.replace(".","")),(rt=et.search(/e/i))>0?(nt<0&&(nt=rt),nt+=+et.slice(rt+1),et=et.substring(0,rt)):nt<0&&(nt=et.length),rt=0;et.charCodeAt(rt)===48;)++rt;for(it=et.length;et.charCodeAt(it-1)===48;)--it;if(et=et.slice(rt,it),et){if(it-=rt,nt=nt-rt-1,tt.e=mathfloor(nt/LOG_BASE),tt.d=[],rt=(nt+1)%LOG_BASE,nt<0&&(rt+=LOG_BASE),rtMAX_E||tt.e<-MAX_E))throw Error(exponentOutOfRange+nt)}else tt.s=0,tt.e=0,tt.d=[0];return tt}function round(tt,et,nt){var rt,it,ot,at,st,lt,ct,ut,ht=tt.d;for(at=1,ot=ht[0];ot>=10;ot/=10)at++;if(rt=et-at,rt<0)rt+=LOG_BASE,it=et,ct=ht[ut=0];else{if(ut=Math.ceil((rt+1)/LOG_BASE),ot=ht.length,ut>=ot)return tt;for(ct=ot=ht[ut],at=1;ot>=10;ot/=10)at++;rt%=LOG_BASE,it=rt-LOG_BASE+at}if(nt!==void 0&&(ot=mathpow(10,at-it-1),st=ct/ot%10|0,lt=et<0||ht[ut+1]!==void 0||ct%ot,lt=nt<4?(st||lt)&&(nt==0||nt==(tt.s<0?3:2)):st>5||st==5&&(nt==4||lt||nt==6&&(rt>0?it>0?ct/mathpow(10,at-it):0:ht[ut-1])%10&1||nt==(tt.s<0?8:7))),et<1||!ht[0])return lt?(ot=getBase10Exponent(tt),ht.length=1,et=et-ot-1,ht[0]=mathpow(10,(LOG_BASE-et%LOG_BASE)%LOG_BASE),tt.e=mathfloor(-et/LOG_BASE)||0):(ht.length=1,ht[0]=tt.e=tt.s=0),tt;if(rt==0?(ht.length=ut,ot=1,ut--):(ht.length=ut+1,ot=mathpow(10,LOG_BASE-rt),ht[ut]=it>0?(ct/mathpow(10,at-it)%mathpow(10,it)|0)*ot:0),lt)for(;;)if(ut==0){(ht[0]+=ot)==BASE&&(ht[0]=1,++tt.e);break}else{if(ht[ut]+=ot,ht[ut]!=BASE)break;ht[ut--]=0,ot=1}for(rt=ht.length;ht[--rt]===0;)ht.pop();if(external&&(tt.e>MAX_E||tt.e<-MAX_E))throw Error(exponentOutOfRange+getBase10Exponent(tt));return tt}function subtract(tt,et){var nt,rt,it,ot,at,st,lt,ct,ut,ht,dt=tt.constructor,pt=dt.precision;if(!tt.s||!et.s)return et.s?et.s=-et.s:et=new dt(tt),external?round(et,pt):et;if(lt=tt.d,ht=et.d,rt=et.e,ct=tt.e,lt=lt.slice(),at=ct-rt,at){for(ut=at<0,ut?(nt=lt,at=-at,st=ht.length):(nt=ht,rt=ct,st=lt.length),it=Math.max(Math.ceil(pt/LOG_BASE),st)+2,at>it&&(at=it,nt.length=1),nt.reverse(),it=at;it--;)nt.push(0);nt.reverse()}else{for(it=lt.length,st=ht.length,ut=it0;--it)lt[st++]=0;for(it=ht.length;it>at;){if(lt[--it]0?ot=ot.charAt(0)+"."+ot.slice(1)+getZeroString(rt):at>1&&(ot=ot.charAt(0)+"."+ot.slice(1)),ot=ot+(it<0?"e":"e+")+it):it<0?(ot="0."+getZeroString(-it-1)+ot,nt&&(rt=nt-at)>0&&(ot+=getZeroString(rt))):it>=at?(ot+=getZeroString(it+1-at),nt&&(rt=nt-it-1)>0&&(ot=ot+"."+getZeroString(rt))):((rt=it+1)0&&(it+1===at&&(ot+="."),ot+=getZeroString(rt))),tt.s<0?"-"+ot:ot}function truncate(tt,et){if(tt.length>et)return tt.length=et,!0}function clone(tt){var et,nt,rt;function it(ot){var at=this;if(!(at instanceof it))return new it(ot);if(at.constructor=it,ot instanceof it){at.s=ot.s,at.e=ot.e,at.d=(ot=ot.d)?ot.slice():ot;return}if(typeof ot=="number"){if(ot*0!==0)throw Error(invalidArgument+ot);if(ot>0)at.s=1;else if(ot<0)ot=-ot,at.s=-1;else{at.s=0,at.e=0,at.d=[0];return}if(ot===~~ot&&ot<1e7){at.e=0,at.d=[ot];return}return parseDecimal(at,ot.toString())}else if(typeof ot!="string")throw Error(invalidArgument+ot);if(ot.charCodeAt(0)===45?(ot=ot.slice(1),at.s=-1):at.s=1,isDecimal.test(ot))parseDecimal(at,ot);else throw Error(invalidArgument+ot)}if(it.prototype=P,it.ROUND_UP=0,it.ROUND_DOWN=1,it.ROUND_CEIL=2,it.ROUND_FLOOR=3,it.ROUND_HALF_UP=4,it.ROUND_HALF_DOWN=5,it.ROUND_HALF_EVEN=6,it.ROUND_HALF_CEIL=7,it.ROUND_HALF_FLOOR=8,it.clone=clone,it.config=it.set=config,tt===void 0&&(tt={}),tt)for(rt=["precision","rounding","toExpNeg","toExpPos","LN10"],et=0;et=it[et+1]&&rt<=it[et+2])this[nt]=rt;else throw Error(invalidArgument+nt+": "+rt);if((rt=tt[nt="LN10"])!==void 0)if(rt==Math.LN10)this[nt]=new this(rt);else throw Error(invalidArgument+nt+": "+rt);return this}var Decimal=clone(defaults);ONE=new Decimal(1);const Decimal$1=Decimal;function _toConsumableArray$8(tt){return _arrayWithoutHoles$8(tt)||_iterableToArray$8(tt)||_unsupportedIterableToArray$e(tt)||_nonIterableSpread$8()}function _nonIterableSpread$8(){throw new TypeError(`Invalid attempt to spread non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _unsupportedIterableToArray$e(tt,et){if(tt){if(typeof tt=="string")return _arrayLikeToArray$e(tt,et);var nt=Object.prototype.toString.call(tt).slice(8,-1);if(nt==="Object"&&tt.constructor&&(nt=tt.constructor.name),nt==="Map"||nt==="Set")return Array.from(tt);if(nt==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(nt))return _arrayLikeToArray$e(tt,et)}}function _iterableToArray$8(tt){if(typeof Symbol<"u"&&Symbol.iterator in Object(tt))return Array.from(tt)}function _arrayWithoutHoles$8(tt){if(Array.isArray(tt))return _arrayLikeToArray$e(tt)}function _arrayLikeToArray$e(tt,et){(et==null||et>tt.length)&&(et=tt.length);for(var nt=0,rt=new Array(et);nt=et?nt.apply(void 0,it):tt(et-at,curry0(function(){for(var st=arguments.length,lt=new Array(st),ct=0;cttt.length)&&(et=tt.length);for(var nt=0,rt=new Array(et);nt"u"||!(Symbol.iterator in Object(tt)))){var nt=[],rt=!0,it=!1,ot=void 0;try{for(var at=tt[Symbol.iterator](),st;!(rt=(st=at.next()).done)&&(nt.push(st.value),!(et&&nt.length===et));rt=!0);}catch(lt){it=!0,ot=lt}finally{try{!rt&&at.return!=null&&at.return()}finally{if(it)throw ot}}return nt}}function _arrayWithHoles$6(tt){if(Array.isArray(tt))return tt}function getValidInterval(tt){var et=_slicedToArray$6(tt,2),nt=et[0],rt=et[1],it=nt,ot=rt;return nt>rt&&(it=rt,ot=nt),[it,ot]}function getFormatStep(tt,et,nt){if(tt.lte(0))return new Decimal$1(0);var rt=Arithmetic.getDigitCount(tt.toNumber()),it=new Decimal$1(10).pow(rt),ot=tt.div(it),at=rt!==1?.05:.1,st=new Decimal$1(Math.ceil(ot.div(at).toNumber())).add(nt).mul(at),lt=st.mul(it);return et?lt:new Decimal$1(Math.ceil(lt))}function getTickOfSingleValue(tt,et,nt){var rt=1,it=new Decimal$1(tt);if(!it.isint()&&nt){var ot=Math.abs(tt);ot<1?(rt=new Decimal$1(10).pow(Arithmetic.getDigitCount(tt)-1),it=new Decimal$1(Math.floor(it.div(rt).toNumber())).mul(rt)):ot>1&&(it=new Decimal$1(Math.floor(tt)))}else tt===0?it=new Decimal$1(Math.floor((et-1)/2)):nt||(it=new Decimal$1(Math.floor(tt)));var at=Math.floor((et-1)/2),st=compose(map$1(function(lt){return it.add(new Decimal$1(lt-at).mul(rt)).toNumber()}),range$1);return st(0,et)}function calculateStep(tt,et,nt,rt){var it=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0;if(!Number.isFinite((et-tt)/(nt-1)))return{step:new Decimal$1(0),tickMin:new Decimal$1(0),tickMax:new Decimal$1(0)};var ot=getFormatStep(new Decimal$1(et).sub(tt).div(nt-1),rt,it),at;tt<=0&&et>=0?at=new Decimal$1(0):(at=new Decimal$1(tt).add(et).div(2),at=at.sub(new Decimal$1(at).mod(ot)));var st=Math.ceil(at.sub(tt).div(ot).toNumber()),lt=Math.ceil(new Decimal$1(et).sub(at).div(ot).toNumber()),ct=st+lt+1;return ct>nt?calculateStep(tt,et,nt,rt,it+1):(ct0?lt+(nt-ct):lt,st=et>0?st:st+(nt-ct)),{step:ot,tickMin:at.sub(new Decimal$1(st).mul(ot)),tickMax:at.add(new Decimal$1(lt).mul(ot))})}function getNiceTickValuesFn(tt){var et=_slicedToArray$6(tt,2),nt=et[0],rt=et[1],it=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,ot=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,at=Math.max(it,2),st=getValidInterval([nt,rt]),lt=_slicedToArray$6(st,2),ct=lt[0],ut=lt[1];if(ct===-1/0||ut===1/0){var ht=ut===1/0?[ct].concat(_toConsumableArray$7(range$1(0,it-1).map(function(){return 1/0}))):[].concat(_toConsumableArray$7(range$1(0,it-1).map(function(){return-1/0})),[ut]);return nt>rt?reverse(ht):ht}if(ct===ut)return getTickOfSingleValue(ct,it,ot);var dt=calculateStep(ct,ut,at,ot),pt=dt.step,mt=dt.tickMin,gt=dt.tickMax,yt=Arithmetic.rangeStep(mt,gt.add(new Decimal$1(.1).mul(pt)),pt);return nt>rt?reverse(yt):yt}function getTickValuesFixedDomainFn(tt,et){var nt=_slicedToArray$6(tt,2),rt=nt[0],it=nt[1],ot=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,at=getValidInterval([rt,it]),st=_slicedToArray$6(at,2),lt=st[0],ct=st[1];if(lt===-1/0||ct===1/0)return[rt,it];if(lt===ct)return[lt];var ut=Math.max(et,2),ht=getFormatStep(new Decimal$1(ct).sub(lt).div(ut-1),ot,0),dt=[].concat(_toConsumableArray$7(Arithmetic.rangeStep(new Decimal$1(lt),new Decimal$1(ct).sub(new Decimal$1(.99).mul(ht)),ht)),[ct]);return rt>it?reverse(dt):dt}var getNiceTickValues=memoize(getNiceTickValuesFn),getTickValuesFixedDomain=memoize(getTickValuesFixedDomainFn),_excluded$b=["offset","layout","width","dataKey","data","dataPointFormatter","xAxis","yAxis"];function _extends$l(){return _extends$l=Object.assign?Object.assign.bind():function(tt){for(var et=1;ettt.length)&&(et=tt.length);for(var nt=0,rt=new Array(et);nt=0)&&Object.prototype.propertyIsEnumerable.call(tt,rt)&&(nt[rt]=tt[rt])}return nt}function _objectWithoutPropertiesLoose$b(tt,et){if(tt==null)return{};var nt={},rt=Object.keys(tt),it,ot;for(ot=0;ot=0)&&(nt[it]=tt[it]);return nt}function ErrorBar(tt){var et=tt.offset,nt=tt.layout,rt=tt.width,it=tt.dataKey,ot=tt.data,at=tt.dataPointFormatter,st=tt.xAxis,lt=tt.yAxis,ct=_objectWithoutProperties$b(tt,_excluded$b),ut=filterProps(ct),ht=ot.map(function(dt,pt){var mt=at(dt,it),gt=mt.x,yt=mt.y,bt=mt.value,vt=mt.errorVal;if(!vt)return null;var xt=[],kt,St;if(Array.isArray(vt)){var Tt=_slicedToArray$5(vt,2);kt=Tt[0],St=Tt[1]}else kt=St=vt;if(nt==="vertical"){var At=st.scale,Et=yt+et,$t=Et+rt,Dt=Et-rt,jt=At(bt-kt),Pt=At(bt+St);xt.push({x1:Pt,y1:$t,x2:Pt,y2:Dt}),xt.push({x1:jt,y1:Et,x2:Pt,y2:Et}),xt.push({x1:jt,y1:$t,x2:jt,y2:Dt})}else if(nt==="horizontal"){var Ct=lt.scale,wt=gt+et,It=wt-rt,Ot=wt+rt,Wt=Ct(bt-kt),zt=Ct(bt+St);xt.push({x1:It,y1:zt,x2:Ot,y2:zt}),xt.push({x1:wt,y1:Wt,x2:wt,y2:zt}),xt.push({x1:It,y1:Wt,x2:Ot,y2:Wt})}return React$1.createElement(Layer,_extends$l({className:"recharts-errorBar",key:"bar-".concat(pt)},ut),xt.map(function(Ft,Nt){return React$1.createElement("line",_extends$l({},Ft,{key:"line-".concat(Nt)}))}))});return React$1.createElement(Layer,{className:"recharts-errorBars"},ht)}ErrorBar.defaultProps={stroke:"black",strokeWidth:1.5,width:5,offset:0,layout:"horizontal"};ErrorBar.displayName="ErrorBar";function _typeof$q(tt){"@babel/helpers - typeof";return _typeof$q=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(et){return typeof et}:function(et){return et&&typeof Symbol=="function"&&et.constructor===Symbol&&et!==Symbol.prototype?"symbol":typeof et},_typeof$q(tt)}function ownKeys$p(tt,et){var nt=Object.keys(tt);if(Object.getOwnPropertySymbols){var rt=Object.getOwnPropertySymbols(tt);et&&(rt=rt.filter(function(it){return Object.getOwnPropertyDescriptor(tt,it).enumerable})),nt.push.apply(nt,rt)}return nt}function _objectSpread$p(tt){for(var et=1;ettt.length)&&(et=tt.length);for(var nt=0,rt=new Array(et);nt1&&arguments[1]!==void 0?arguments[1]:[],it=arguments.length>2?arguments[2]:void 0,ot=arguments.length>3?arguments[3]:void 0,at=-1,st=(nt=rt==null?void 0:rt.length)!==null&&nt!==void 0?nt:0;if(st<=1)return 0;if(ot&&ot.axisType==="angleAxis"&&Math.abs(Math.abs(ot.range[1]-ot.range[0])-360)<=1e-6)for(var lt=ot.range,ct=0;ct0?it[ct-1].coordinate:it[st-1].coordinate,ht=it[ct].coordinate,dt=ct>=st-1?it[0].coordinate:it[ct+1].coordinate,pt=void 0;if(mathSign(ht-ut)!==mathSign(dt-ht)){var mt=[];if(mathSign(dt-ht)===mathSign(lt[1]-lt[0])){pt=dt;var gt=ht+lt[1]-lt[0];mt[0]=Math.min(gt,(gt+ut)/2),mt[1]=Math.max(gt,(gt+ut)/2)}else{pt=ut;var yt=dt+lt[1]-lt[0];mt[0]=Math.min(ht,(yt+ht)/2),mt[1]=Math.max(ht,(yt+ht)/2)}var bt=[Math.min(ht,(pt+ht)/2),Math.max(ht,(pt+ht)/2)];if(et>bt[0]&&et<=bt[1]||et>=mt[0]&&et<=mt[1]){at=it[ct].index;break}}else{var vt=Math.min(ut,dt),xt=Math.max(ut,dt);if(et>(vt+ht)/2&&et<=(xt+ht)/2){at=it[ct].index;break}}}else for(var kt=0;kt0&&kt(rt[kt].coordinate+rt[kt-1].coordinate)/2&&et<=(rt[kt].coordinate+rt[kt+1].coordinate)/2||kt===st-1&&et>(rt[kt].coordinate+rt[kt-1].coordinate)/2){at=rt[kt].index;break}return at},getMainColorOfGraphicItem=function(et){var nt=et,rt=nt.type.displayName,it=et.props,ot=it.stroke,at=it.fill,st;switch(rt){case"Line":st=ot;break;case"Area":case"Radar":st=ot&&ot!=="none"?ot:at;break;default:st=at;break}return st},getBarSizeList=function(et){var nt=et.barSize,rt=et.stackGroups,it=rt===void 0?{}:rt;if(!it)return{};for(var ot={},at=Object.keys(it),st=0,lt=at.length;st=0});if(yt&&yt.length){var bt=yt[0].props.barSize,vt=yt[0].props[gt];ot[vt]||(ot[vt]=[]),ot[vt].push({item:yt[0],stackList:yt.slice(1),barSize:_isNil(bt)?nt:bt})}}return ot},getBarPosition=function(et){var nt=et.barGap,rt=et.barCategoryGap,it=et.bandSize,ot=et.sizeList,at=ot===void 0?[]:ot,st=et.maxBarSize,lt=at.length;if(lt<1)return null;var ct=getPercentValue(nt,it,0,!0),ut,ht=[];if(at[0].barSize===+at[0].barSize){var dt=!1,pt=it/lt,mt=at.reduce(function(kt,St){return kt+St.barSize||0},0);mt+=(lt-1)*ct,mt>=it&&(mt-=(lt-1)*ct,ct=0),mt>=it&&pt>0&&(dt=!0,pt*=.9,mt=lt*pt);var gt=(it-mt)/2>>0,yt={offset:gt-ct,size:0};ut=at.reduce(function(kt,St){var Tt={item:St.item,position:{offset:yt.offset+yt.size+ct,size:dt?pt:St.barSize}},At=[].concat(_toConsumableArray$6(kt),[Tt]);return yt=At[At.length-1].position,St.stackList&&St.stackList.length&&St.stackList.forEach(function(Et){At.push({item:Et,position:yt})}),At},ht)}else{var bt=getPercentValue(rt,it,0,!0);it-2*bt-(lt-1)*ct<=0&&(ct=0);var vt=(it-2*bt-(lt-1)*ct)/lt;vt>1&&(vt>>=0);var xt=st===+st?Math.min(vt,st):vt;ut=at.reduce(function(kt,St,Tt){var At=[].concat(_toConsumableArray$6(kt),[{item:St.item,position:{offset:bt+(vt+ct)*Tt+(vt-xt)/2,size:xt}}]);return St.stackList&&St.stackList.length&&St.stackList.forEach(function(Et){At.push({item:Et,position:At[At.length-1].position})}),At},ht)}return ut},appendOffsetOfLegend=function(et,nt,rt,it){var ot=rt.children,at=rt.width,st=rt.margin,lt=at-(st.left||0)-(st.right||0),ct=getLegendProps({children:ot,legendWidth:lt});if(ct){var ut=it||{},ht=ut.width,dt=ut.height,pt=ct.align,mt=ct.verticalAlign,gt=ct.layout;if((gt==="vertical"||gt==="horizontal"&&mt==="middle")&&pt!=="center"&&isNumber(et[pt]))return _objectSpread$o(_objectSpread$o({},et),{},_defineProperty$p({},pt,et[pt]+(ht||0)));if((gt==="horizontal"||gt==="vertical"&&pt==="center")&&mt!=="middle"&&isNumber(et[mt]))return _objectSpread$o(_objectSpread$o({},et),{},_defineProperty$p({},mt,et[mt]+(dt||0)))}return et},isErrorBarRelevantForAxis=function(et,nt,rt){return _isNil(nt)?!0:et==="horizontal"?nt==="yAxis":et==="vertical"||rt==="x"?nt==="xAxis":rt==="y"?nt==="yAxis":!0},getDomainOfErrorBars=function(et,nt,rt,it,ot){var at=nt.props.children,st=findAllByType(at,ErrorBar).filter(function(ct){return isErrorBarRelevantForAxis(it,ot,ct.props.direction)});if(st&&st.length){var lt=st.map(function(ct){return ct.props.dataKey});return et.reduce(function(ct,ut){var ht=getValueByDataKey(ut,rt,0),dt=_isArray$1(ht)?[_min(ht),_max(ht)]:[ht,ht],pt=lt.reduce(function(mt,gt){var yt=getValueByDataKey(ut,gt,0),bt=dt[0]-Math.abs(_isArray$1(yt)?yt[0]:yt),vt=dt[1]+Math.abs(_isArray$1(yt)?yt[1]:yt);return[Math.min(bt,mt[0]),Math.max(vt,mt[1])]},[1/0,-1/0]);return[Math.min(pt[0],ct[0]),Math.max(pt[1],ct[1])]},[1/0,-1/0])}return null},parseErrorBarsOfAxis=function(et,nt,rt,it,ot){var at=nt.map(function(st){return getDomainOfErrorBars(et,st,rt,ot,it)}).filter(function(st){return!_isNil(st)});return at&&at.length?at.reduce(function(st,lt){return[Math.min(st[0],lt[0]),Math.max(st[1],lt[1])]},[1/0,-1/0]):null},getDomainOfItemsWithSameAxis=function(et,nt,rt,it,ot){var at=nt.map(function(lt){var ct=lt.props.dataKey;return rt==="number"&&ct&&getDomainOfErrorBars(et,lt,ct,it)||getDomainOfDataByKey(et,ct,rt,ot)});if(rt==="number")return at.reduce(function(lt,ct){return[Math.min(lt[0],ct[0]),Math.max(lt[1],ct[1])]},[1/0,-1/0]);var st={};return at.reduce(function(lt,ct){for(var ut=0,ht=ct.length;ut=2?mathSign(st[0]-st[1])*2*ct:ct,nt&&(et.ticks||et.niceTicks)){var ut=(et.ticks||et.niceTicks).map(function(ht){var dt=ot?ot.indexOf(ht):ht;return{coordinate:it(dt)+ct,value:ht,offset:ct}});return ut.filter(function(ht){return!_isNaN$1(ht.coordinate)})}return et.isCategorical&&et.categoricalDomain?et.categoricalDomain.map(function(ht,dt){return{coordinate:it(ht)+ct,value:ht,index:dt,offset:ct}}):it.ticks&&!rt?it.ticks(et.tickCount).map(function(ht){return{coordinate:it(ht)+ct,value:ht,offset:ct}}):it.domain().map(function(ht,dt){return{coordinate:it(ht)+ct,value:ot?ot[ht]:ht,index:dt,offset:ct}})},combineEventHandlers=function(et,nt,rt){var it;return _isFunction$1(rt)?it=rt:_isFunction$1(nt)&&(it=nt),_isFunction$1(et)||it?function(ot,at,st,lt){_isFunction$1(et)&&et(ot,at,st,lt),_isFunction$1(it)&&it(ot,at,st,lt)}:null},parseScale=function(et,nt,rt){var it=et.scale,ot=et.type,at=et.layout,st=et.axisType;if(it==="auto")return at==="radial"&&st==="radiusAxis"?{scale:band(),realScaleType:"band"}:at==="radial"&&st==="angleAxis"?{scale:linear(),realScaleType:"linear"}:ot==="category"&&nt&&(nt.indexOf("LineChart")>=0||nt.indexOf("AreaChart")>=0||nt.indexOf("ComposedChart")>=0&&!rt)?{scale:point(),realScaleType:"point"}:ot==="category"?{scale:band(),realScaleType:"band"}:{scale:linear(),realScaleType:"linear"};if(_isString(it)){var lt="scale".concat(_upperFirst(it));return{scale:(d3Scales[lt]||point)(),realScaleType:d3Scales[lt]?lt:"point"}}return _isFunction$1(it)?{scale:it}:{scale:point(),realScaleType:"point"}},EPS=1e-4,checkDomainOfScale=function(et){var nt=et.domain();if(!(!nt||nt.length<=2)){var rt=nt.length,it=et.range(),ot=Math.min(it[0],it[1])-EPS,at=Math.max(it[0],it[1])+EPS,st=et(nt[0]),lt=et(nt[rt-1]);(stat||ltat)&&et.domain([nt[0],nt[rt-1]])}},findPositionOfBar=function(et,nt){if(!et)return null;for(var rt=0,it=et.length;rtit)&&(ot[1]=it),ot[0]>it&&(ot[0]=it),ot[1]=0?(et[st][rt][0]=ot,et[st][rt][1]=ot+lt,ot=et[st][rt][1]):(et[st][rt][0]=at,et[st][rt][1]=at+lt,at=et[st][rt][1])}},offsetPositive=function(et){var nt=et.length;if(!(nt<=0))for(var rt=0,it=et[0].length;rt=0?(et[at][rt][0]=ot,et[at][rt][1]=ot+st,ot=et[at][rt][1]):(et[at][rt][0]=0,et[at][rt][1]=0)}},STACK_OFFSET_MAP={sign:offsetSign,expand:stackOffsetExpand,none:stackOffsetNone,silhouette:stackOffsetSilhouette,wiggle:stackOffsetWiggle,positive:offsetPositive},getStackedData=function(et,nt,rt){var it=nt.map(function(st){return st.props.dataKey}),ot=STACK_OFFSET_MAP[rt],at=shapeStack().keys(it).value(function(st,lt){return+getValueByDataKey(st,lt,0)}).order(stackOrderNone).offset(ot);return at(et)},getStackGroupsByAxisId=function(et,nt,rt,it,ot,at){if(!et)return null;var st=at?nt.reverse():nt,lt={},ct=st.reduce(function(ht,dt){var pt=dt.props,mt=pt.stackId,gt=pt.hide;if(gt)return ht;var yt=dt.props[rt],bt=ht[yt]||{hasStack:!1,stackGroups:{}};if(isNumOrStr(mt)){var vt=bt.stackGroups[mt]||{numericAxisId:rt,cateAxisId:it,items:[]};vt.items.push(dt),bt.hasStack=!0,bt.stackGroups[mt]=vt}else bt.stackGroups[uniqueId("_stackId_")]={numericAxisId:rt,cateAxisId:it,items:[dt]};return _objectSpread$o(_objectSpread$o({},ht),{},_defineProperty$p({},yt,bt))},lt),ut={};return Object.keys(ct).reduce(function(ht,dt){var pt=ct[dt];if(pt.hasStack){var mt={};pt.stackGroups=Object.keys(pt.stackGroups).reduce(function(gt,yt){var bt=pt.stackGroups[yt];return _objectSpread$o(_objectSpread$o({},gt),{},_defineProperty$p({},yt,{numericAxisId:rt,cateAxisId:it,items:bt.items,stackedData:getStackedData(et,bt.items,ot)}))},mt)}return _objectSpread$o(_objectSpread$o({},ht),{},_defineProperty$p({},dt,pt))},ut)},getTicksOfScale=function(et,nt){var rt=nt.realScaleType,it=nt.type,ot=nt.tickCount,at=nt.originalDomain,st=nt.allowDecimals,lt=rt||nt.scale;if(lt!=="auto"&<!=="linear")return null;if(ot&&it==="number"&&at&&(at[0]==="auto"||at[1]==="auto")){var ct=et.domain();if(!ct.length)return null;var ut=getNiceTickValues(ct,ot,st);return et.domain([_min(ut),_max(ut)]),{niceTicks:ut}}if(ot&&it==="number"){var ht=et.domain(),dt=getTickValuesFixedDomain(ht,ot,st);return{niceTicks:dt}}return null},getCateCoordinateOfLine=function(et){var nt=et.axis,rt=et.ticks,it=et.bandSize,ot=et.entry,at=et.index,st=et.dataKey;if(nt.type==="category"){if(!nt.allowDuplicatedCategory&&nt.dataKey&&!_isNil(ot[nt.dataKey])){var lt=findEntryInArray(rt,"value",ot[nt.dataKey]);if(lt)return lt.coordinate+it/2}return rt[at]?rt[at].coordinate+it/2:null}var ct=getValueByDataKey(ot,_isNil(st)?nt.dataKey:st);return _isNil(ct)?null:nt.scale(ct)},getCateCoordinateOfBar=function(et){var nt=et.axis,rt=et.ticks,it=et.offset,ot=et.bandSize,at=et.entry,st=et.index;if(nt.type==="category")return rt[st]?rt[st].coordinate+it:null;var lt=getValueByDataKey(at,nt.dataKey,nt.domain[st]);return _isNil(lt)?null:nt.scale(lt)-ot/2+it},getBaseValueOfBar=function(et){var nt=et.numericAxis,rt=nt.scale.domain();if(nt.type==="number"){var it=Math.min(rt[0],rt[1]),ot=Math.max(rt[0],rt[1]);return it<=0&&ot>=0?0:ot<0?ot:it}return rt[0]},getStackedDataOfItem=function(et,nt){var rt=et.props.stackId;if(isNumOrStr(rt)){var it=nt[rt];if(it){var ot=it.items.indexOf(et);return ot>=0?it.stackedData[ot]:null}}return null},getDomainOfSingle=function(et){return et.reduce(function(nt,rt){return[_min(rt.concat([nt[0]]).filter(isNumber)),_max(rt.concat([nt[1]]).filter(isNumber))]},[1/0,-1/0])},getDomainOfStackGroups=function(et,nt,rt){return Object.keys(et).reduce(function(it,ot){var at=et[ot],st=at.stackedData,lt=st.reduce(function(ct,ut){var ht=getDomainOfSingle(ut.slice(nt,rt+1));return[Math.min(ct[0],ht[0]),Math.max(ct[1],ht[1])]},[1/0,-1/0]);return[Math.min(lt[0],it[0]),Math.max(lt[1],it[1])]},[1/0,-1/0]).map(function(it){return it===1/0||it===-1/0?0:it})},MIN_VALUE_REG=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,MAX_VALUE_REG=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,parseSpecifiedDomain=function(et,nt,rt){if(_isFunction$1(et))return et(nt,rt);if(!_isArray$1(et))return nt;var it=[];if(isNumber(et[0]))it[0]=rt?et[0]:Math.min(et[0],nt[0]);else if(MIN_VALUE_REG.test(et[0])){var ot=+MIN_VALUE_REG.exec(et[0])[1];it[0]=nt[0]-ot}else _isFunction$1(et[0])?it[0]=et[0](nt[0]):it[0]=nt[0];if(isNumber(et[1]))it[1]=rt?et[1]:Math.max(et[1],nt[1]);else if(MAX_VALUE_REG.test(et[1])){var at=+MAX_VALUE_REG.exec(et[1])[1];it[1]=nt[1]+at}else _isFunction$1(et[1])?it[1]=et[1](nt[1]):it[1]=nt[1];return it},getBandSizeOfAxis=function(et,nt,rt){if(et&&et.scale&&et.scale.bandwidth){var it=et.scale.bandwidth();if(!rt||it>0)return it}if(et&&nt&&nt.length>=2){for(var ot=_sortBy(nt,function(ht){return ht.coordinate}),at=1/0,st=1,lt=ot.length;stat&&(ct=2*Math.PI-ct),{radius:st,angle:radianToDegree(ct),angleInRadian:ct}},formatAngleOfSector=function(et){var nt=et.startAngle,rt=et.endAngle,it=Math.floor(nt/360),ot=Math.floor(rt/360),at=Math.min(it,ot);return{startAngle:nt-at*360,endAngle:rt-at*360}},reverseFormatAngleOfSetor=function(et,nt){var rt=nt.startAngle,it=nt.endAngle,ot=Math.floor(rt/360),at=Math.floor(it/360),st=Math.min(ot,at);return et+st*360},inRangeOfSector=function(et,nt){var rt=et.x,it=et.y,ot=getAngleOfPoint({x:rt,y:it},nt),at=ot.radius,st=ot.angle,lt=nt.innerRadius,ct=nt.outerRadius;if(atct)return!1;if(at===0)return!0;var ut=formatAngleOfSector(nt),ht=ut.startAngle,dt=ut.endAngle,pt=st,mt;if(ht<=dt){for(;pt>dt;)pt-=360;for(;pt=ht&&pt<=dt}else{for(;pt>ht;)pt-=360;for(;pt=dt&&pt<=ht}return mt?_objectSpread$n(_objectSpread$n({},nt),{},{radius:at,angle:reverseFormatAngleOfSetor(pt,nt)}):null};function _typeof$n(tt){"@babel/helpers - typeof";return _typeof$n=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(et){return typeof et}:function(et){return et&&typeof Symbol=="function"&&et.constructor===Symbol&&et!==Symbol.prototype?"symbol":typeof et},_typeof$n(tt)}var _excluded$a=["offset"];function _toConsumableArray$5(tt){return _arrayWithoutHoles$5(tt)||_iterableToArray$5(tt)||_unsupportedIterableToArray$a(tt)||_nonIterableSpread$5()}function _nonIterableSpread$5(){throw new TypeError(`Invalid attempt to spread non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _unsupportedIterableToArray$a(tt,et){if(tt){if(typeof tt=="string")return _arrayLikeToArray$a(tt,et);var nt=Object.prototype.toString.call(tt).slice(8,-1);if(nt==="Object"&&tt.constructor&&(nt=tt.constructor.name),nt==="Map"||nt==="Set")return Array.from(tt);if(nt==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(nt))return _arrayLikeToArray$a(tt,et)}}function _iterableToArray$5(tt){if(typeof Symbol<"u"&&tt[Symbol.iterator]!=null||tt["@@iterator"]!=null)return Array.from(tt)}function _arrayWithoutHoles$5(tt){if(Array.isArray(tt))return _arrayLikeToArray$a(tt)}function _arrayLikeToArray$a(tt,et){(et==null||et>tt.length)&&(et=tt.length);for(var nt=0,rt=new Array(et);nt=0)&&Object.prototype.propertyIsEnumerable.call(tt,rt)&&(nt[rt]=tt[rt])}return nt}function _objectWithoutPropertiesLoose$a(tt,et){if(tt==null)return{};var nt={},rt=Object.keys(tt),it,ot;for(ot=0;ot=0)&&(nt[it]=tt[it]);return nt}function ownKeys$m(tt,et){var nt=Object.keys(tt);if(Object.getOwnPropertySymbols){var rt=Object.getOwnPropertySymbols(tt);et&&(rt=rt.filter(function(it){return Object.getOwnPropertyDescriptor(tt,it).enumerable})),nt.push.apply(nt,rt)}return nt}function _objectSpread$m(tt){for(var et=1;et=0?1:-1,xt,kt;it==="insideStart"?(xt=pt+vt*at,kt=gt):it==="insideEnd"?(xt=mt-vt*at,kt=!gt):it==="end"&&(xt=mt+vt*at,kt=gt),kt=bt<=0?kt:!kt;var St=polarToCartesian(ct,ut,yt,xt),Tt=polarToCartesian(ct,ut,yt,xt+(kt?1:-1)*359),At="M".concat(St.x,",").concat(St.y,` - A`).concat(yt,",").concat(yt,",0,1,").concat(kt?0:1,`, - `).concat(Tt.x,",").concat(Tt.y),Et=_isNil(et.id)?uniqueId("recharts-radial-line-"):et.id;return React$1.createElement("text",_extends$k({},rt,{dominantBaseline:"central",className:classNames("recharts-radial-bar-label",st)}),React$1.createElement("defs",null,React$1.createElement("path",{id:Et,d:At})),React$1.createElement("textPath",{xlinkHref:"#".concat(Et)},nt))},getAttrsOfPolarLabel=function(et){var nt=et.viewBox,rt=et.offset,it=et.position,ot=nt,at=ot.cx,st=ot.cy,lt=ot.innerRadius,ct=ot.outerRadius,ut=ot.startAngle,ht=ot.endAngle,dt=(ut+ht)/2;if(it==="outside"){var pt=polarToCartesian(at,st,ct+rt,dt),mt=pt.x,gt=pt.y;return{x:mt,y:gt,textAnchor:mt>=at?"start":"end",verticalAnchor:"middle"}}if(it==="center")return{x:at,y:st,textAnchor:"middle",verticalAnchor:"middle"};if(it==="centerTop")return{x:at,y:st,textAnchor:"middle",verticalAnchor:"start"};if(it==="centerBottom")return{x:at,y:st,textAnchor:"middle",verticalAnchor:"end"};var yt=(lt+ct)/2,bt=polarToCartesian(at,st,yt,dt),vt=bt.x,xt=bt.y;return{x:vt,y:xt,textAnchor:"middle",verticalAnchor:"middle"}},getAttrsOfCartesianLabel=function(et){var nt=et.viewBox,rt=et.parentViewBox,it=et.offset,ot=et.position,at=nt,st=at.x,lt=at.y,ct=at.width,ut=at.height,ht=ut>=0?1:-1,dt=ht*it,pt=ht>0?"end":"start",mt=ht>0?"start":"end",gt=ct>=0?1:-1,yt=gt*it,bt=gt>0?"end":"start",vt=gt>0?"start":"end";if(ot==="top"){var xt={x:st+ct/2,y:lt-ht*it,textAnchor:"middle",verticalAnchor:pt};return _objectSpread$m(_objectSpread$m({},xt),rt?{height:Math.max(lt-rt.y,0),width:ct}:{})}if(ot==="bottom"){var kt={x:st+ct/2,y:lt+ut+dt,textAnchor:"middle",verticalAnchor:mt};return _objectSpread$m(_objectSpread$m({},kt),rt?{height:Math.max(rt.y+rt.height-(lt+ut),0),width:ct}:{})}if(ot==="left"){var St={x:st-yt,y:lt+ut/2,textAnchor:bt,verticalAnchor:"middle"};return _objectSpread$m(_objectSpread$m({},St),rt?{width:Math.max(St.x-rt.x,0),height:ut}:{})}if(ot==="right"){var Tt={x:st+ct+yt,y:lt+ut/2,textAnchor:vt,verticalAnchor:"middle"};return _objectSpread$m(_objectSpread$m({},Tt),rt?{width:Math.max(rt.x+rt.width-Tt.x,0),height:ut}:{})}var At=rt?{width:ct,height:ut}:{};return ot==="insideLeft"?_objectSpread$m({x:st+yt,y:lt+ut/2,textAnchor:vt,verticalAnchor:"middle"},At):ot==="insideRight"?_objectSpread$m({x:st+ct-yt,y:lt+ut/2,textAnchor:bt,verticalAnchor:"middle"},At):ot==="insideTop"?_objectSpread$m({x:st+ct/2,y:lt+dt,textAnchor:"middle",verticalAnchor:mt},At):ot==="insideBottom"?_objectSpread$m({x:st+ct/2,y:lt+ut-dt,textAnchor:"middle",verticalAnchor:pt},At):ot==="insideTopLeft"?_objectSpread$m({x:st+yt,y:lt+dt,textAnchor:vt,verticalAnchor:mt},At):ot==="insideTopRight"?_objectSpread$m({x:st+ct-yt,y:lt+dt,textAnchor:bt,verticalAnchor:mt},At):ot==="insideBottomLeft"?_objectSpread$m({x:st+yt,y:lt+ut-dt,textAnchor:vt,verticalAnchor:pt},At):ot==="insideBottomRight"?_objectSpread$m({x:st+ct-yt,y:lt+ut-dt,textAnchor:bt,verticalAnchor:pt},At):_isObject$1(ot)&&(isNumber(ot.x)||isPercent(ot.x))&&(isNumber(ot.y)||isPercent(ot.y))?_objectSpread$m({x:st+getPercentValue(ot.x,ct),y:lt+getPercentValue(ot.y,ut),textAnchor:"end",verticalAnchor:"end"},At):_objectSpread$m({x:st+ct/2,y:lt+ut/2,textAnchor:"middle",verticalAnchor:"middle"},At)},isPolar=function(et){return"cx"in et&&isNumber(et.cx)};function Label(tt){var et=tt.offset,nt=et===void 0?5:et,rt=_objectWithoutProperties$a(tt,_excluded$a),it=_objectSpread$m({offset:nt},rt),ot=it.viewBox,at=it.position,st=it.value,lt=it.children,ct=it.content,ut=it.className,ht=ut===void 0?"":ut,dt=it.textBreakAll;if(!ot||_isNil(st)&&_isNil(lt)&&!reactExports.isValidElement(ct)&&!_isFunction$1(ct))return null;if(reactExports.isValidElement(ct))return reactExports.cloneElement(ct,it);var pt;if(_isFunction$1(ct)){if(pt=reactExports.createElement(ct,it),reactExports.isValidElement(pt))return pt}else pt=getLabel(it);var mt=isPolar(ot),gt=filterProps(it,!0);if(mt&&(at==="insideStart"||at==="insideEnd"||at==="end"))return renderRadialLabel(it,pt,gt);var yt=mt?getAttrsOfPolarLabel(it):getAttrsOfCartesianLabel(it);return React$1.createElement(Text,_extends$k({className:classNames("recharts-label",ht)},gt,yt,{breakAll:dt}),pt)}Label.displayName="Label";var parseViewBox=function(et){var nt=et.cx,rt=et.cy,it=et.angle,ot=et.startAngle,at=et.endAngle,st=et.r,lt=et.radius,ct=et.innerRadius,ut=et.outerRadius,ht=et.x,dt=et.y,pt=et.top,mt=et.left,gt=et.width,yt=et.height,bt=et.clockWise,vt=et.labelViewBox;if(vt)return vt;if(isNumber(gt)&&isNumber(yt)){if(isNumber(ht)&&isNumber(dt))return{x:ht,y:dt,width:gt,height:yt};if(isNumber(pt)&&isNumber(mt))return{x:pt,y:mt,width:gt,height:yt}}return isNumber(ht)&&isNumber(dt)?{x:ht,y:dt,width:0,height:0}:isNumber(nt)&&isNumber(rt)?{cx:nt,cy:rt,startAngle:ot||it||0,endAngle:at||it||0,innerRadius:ct||0,outerRadius:ut||lt||st||0,clockWise:bt}:et.viewBox?et.viewBox:{}},parseLabel=function(et,nt){return et?et===!0?React$1.createElement(Label,{key:"label-implicit",viewBox:nt}):isNumOrStr(et)?React$1.createElement(Label,{key:"label-implicit",viewBox:nt,value:et}):reactExports.isValidElement(et)?et.type===Label?reactExports.cloneElement(et,{key:"label-implicit",viewBox:nt}):React$1.createElement(Label,{key:"label-implicit",content:et,viewBox:nt}):_isFunction$1(et)?React$1.createElement(Label,{key:"label-implicit",content:et,viewBox:nt}):_isObject$1(et)?React$1.createElement(Label,_extends$k({viewBox:nt},et,{key:"label-implicit"})):null:null},renderCallByParent$1=function(et,nt){var rt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!et||!et.children&&rt&&!et.label)return null;var it=et.children,ot=parseViewBox(et),at=findAllByType(it,Label).map(function(lt,ct){return reactExports.cloneElement(lt,{viewBox:nt||ot,key:"label-".concat(ct)})});if(!rt)return at;var st=parseLabel(et.label,nt||ot);return[st].concat(_toConsumableArray$5(at))};Label.parseViewBox=parseViewBox;Label.renderCallByParent=renderCallByParent$1;function last(tt){var et=tt==null?0:tt.length;return et?tt[et-1]:void 0}var last_1=last;const _last=getDefaultExportFromCjs(last_1);function _typeof$m(tt){"@babel/helpers - typeof";return _typeof$m=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(et){return typeof et}:function(et){return et&&typeof Symbol=="function"&&et.constructor===Symbol&&et!==Symbol.prototype?"symbol":typeof et},_typeof$m(tt)}var _excluded$9=["valueAccessor"],_excluded2$3=["data","dataKey","clockWise","id","textBreakAll"];function _toConsumableArray$4(tt){return _arrayWithoutHoles$4(tt)||_iterableToArray$4(tt)||_unsupportedIterableToArray$9(tt)||_nonIterableSpread$4()}function _nonIterableSpread$4(){throw new TypeError(`Invalid attempt to spread non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _unsupportedIterableToArray$9(tt,et){if(tt){if(typeof tt=="string")return _arrayLikeToArray$9(tt,et);var nt=Object.prototype.toString.call(tt).slice(8,-1);if(nt==="Object"&&tt.constructor&&(nt=tt.constructor.name),nt==="Map"||nt==="Set")return Array.from(tt);if(nt==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(nt))return _arrayLikeToArray$9(tt,et)}}function _iterableToArray$4(tt){if(typeof Symbol<"u"&&tt[Symbol.iterator]!=null||tt["@@iterator"]!=null)return Array.from(tt)}function _arrayWithoutHoles$4(tt){if(Array.isArray(tt))return _arrayLikeToArray$9(tt)}function _arrayLikeToArray$9(tt,et){(et==null||et>tt.length)&&(et=tt.length);for(var nt=0,rt=new Array(et);nt=0)&&Object.prototype.propertyIsEnumerable.call(tt,rt)&&(nt[rt]=tt[rt])}return nt}function _objectWithoutPropertiesLoose$9(tt,et){if(tt==null)return{};var nt={},rt=Object.keys(tt),it,ot;for(ot=0;ot=0)&&(nt[it]=tt[it]);return nt}var defaultAccessor=function(et){return _isArray$1(et.value)?_last(et.value):et.value};function LabelList(tt){var et=tt.valueAccessor,nt=et===void 0?defaultAccessor:et,rt=_objectWithoutProperties$9(tt,_excluded$9),it=rt.data,ot=rt.dataKey,at=rt.clockWise,st=rt.id,lt=rt.textBreakAll,ct=_objectWithoutProperties$9(rt,_excluded2$3);return!it||!it.length?null:React$1.createElement(Layer,{className:"recharts-label-list"},it.map(function(ut,ht){var dt=_isNil(ot)?nt(ut,ht):getValueByDataKey(ut&&ut.payload,ot),pt=_isNil(st)?{}:{id:"".concat(st,"-").concat(ht)};return React$1.createElement(Label,_extends$j({},filterProps(ut,!0),ct,pt,{parentViewBox:ut.parentViewBox,index:ht,value:dt,textBreakAll:lt,viewBox:Label.parseViewBox(_isNil(at)?ut:_objectSpread$l(_objectSpread$l({},ut),{},{clockWise:at})),key:"label-".concat(ht)}))}))}LabelList.displayName="LabelList";function parseLabelList(tt,et){return tt?tt===!0?React$1.createElement(LabelList,{key:"labelList-implicit",data:et}):React$1.isValidElement(tt)||_isFunction$1(tt)?React$1.createElement(LabelList,{key:"labelList-implicit",data:et,content:tt}):_isObject$1(tt)?React$1.createElement(LabelList,_extends$j({data:et},tt,{key:"labelList-implicit"})):null:null}function renderCallByParent(tt,et){var nt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!tt||!tt.children&&nt&&!tt.label)return null;var rt=tt.children,it=findAllByType(rt,LabelList).map(function(at,st){return reactExports.cloneElement(at,{data:et,key:"labelList-".concat(st)})});if(!nt)return it;var ot=parseLabelList(tt.label,et);return[ot].concat(_toConsumableArray$4(it))}LabelList.renderCallByParent=renderCallByParent;function _typeof$l(tt){"@babel/helpers - typeof";return _typeof$l=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(et){return typeof et}:function(et){return et&&typeof Symbol=="function"&&et.constructor===Symbol&&et!==Symbol.prototype?"symbol":typeof et},_typeof$l(tt)}function _extends$i(){return _extends$i=Object.assign?Object.assign.bind():function(tt){for(var et=1;et180),",").concat(+(at>ct),`, - `).concat(ht.x,",").concat(ht.y,` - `);if(it>0){var pt=polarToCartesian(nt,rt,it,at),mt=polarToCartesian(nt,rt,it,ct);dt+="L ".concat(mt.x,",").concat(mt.y,` - A `).concat(it,",").concat(it,`,0, - `).concat(+(Math.abs(lt)>180),",").concat(+(at<=ct),`, - `).concat(pt.x,",").concat(pt.y," Z")}else dt+="L ".concat(nt,",").concat(rt," Z");return dt},getSectorWithCorner=function(et){var nt=et.cx,rt=et.cy,it=et.innerRadius,ot=et.outerRadius,at=et.cornerRadius,st=et.forceCornerRadius,lt=et.cornerIsExternal,ct=et.startAngle,ut=et.endAngle,ht=mathSign(ut-ct),dt=getTangentCircle({cx:nt,cy:rt,radius:ot,angle:ct,sign:ht,cornerRadius:at,cornerIsExternal:lt}),pt=dt.circleTangency,mt=dt.lineTangency,gt=dt.theta,yt=getTangentCircle({cx:nt,cy:rt,radius:ot,angle:ut,sign:-ht,cornerRadius:at,cornerIsExternal:lt}),bt=yt.circleTangency,vt=yt.lineTangency,xt=yt.theta,kt=lt?Math.abs(ct-ut):Math.abs(ct-ut)-gt-xt;if(kt<0)return st?"M ".concat(mt.x,",").concat(mt.y,` - a`).concat(at,",").concat(at,",0,0,1,").concat(at*2,`,0 - a`).concat(at,",").concat(at,",0,0,1,").concat(-at*2,`,0 - `):getSectorPath({cx:nt,cy:rt,innerRadius:it,outerRadius:ot,startAngle:ct,endAngle:ut});var St="M ".concat(mt.x,",").concat(mt.y,` - A`).concat(at,",").concat(at,",0,0,").concat(+(ht<0),",").concat(pt.x,",").concat(pt.y,` - A`).concat(ot,",").concat(ot,",0,").concat(+(kt>180),",").concat(+(ht<0),",").concat(bt.x,",").concat(bt.y,` - A`).concat(at,",").concat(at,",0,0,").concat(+(ht<0),",").concat(vt.x,",").concat(vt.y,` - `);if(it>0){var Tt=getTangentCircle({cx:nt,cy:rt,radius:it,angle:ct,sign:ht,isExternal:!0,cornerRadius:at,cornerIsExternal:lt}),At=Tt.circleTangency,Et=Tt.lineTangency,$t=Tt.theta,Dt=getTangentCircle({cx:nt,cy:rt,radius:it,angle:ut,sign:-ht,isExternal:!0,cornerRadius:at,cornerIsExternal:lt}),jt=Dt.circleTangency,Pt=Dt.lineTangency,Ct=Dt.theta,wt=lt?Math.abs(ct-ut):Math.abs(ct-ut)-$t-Ct;if(wt<0&&at===0)return"".concat(St,"L").concat(nt,",").concat(rt,"Z");St+="L".concat(Pt.x,",").concat(Pt.y,` - A`).concat(at,",").concat(at,",0,0,").concat(+(ht<0),",").concat(jt.x,",").concat(jt.y,` - A`).concat(it,",").concat(it,",0,").concat(+(wt>180),",").concat(+(ht>0),",").concat(At.x,",").concat(At.y,` - A`).concat(at,",").concat(at,",0,0,").concat(+(ht<0),",").concat(Et.x,",").concat(Et.y,"Z")}else St+="L".concat(nt,",").concat(rt,"Z");return St},defaultProps$3={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},Sector=function(et){var nt=_objectSpread$k(_objectSpread$k({},defaultProps$3),et),rt=nt.cx,it=nt.cy,ot=nt.innerRadius,at=nt.outerRadius,st=nt.cornerRadius,lt=nt.forceCornerRadius,ct=nt.cornerIsExternal,ut=nt.startAngle,ht=nt.endAngle,dt=nt.className;if(at0&&Math.abs(ut-ht)<360?yt=getSectorWithCorner({cx:rt,cy:it,innerRadius:ot,outerRadius:at,cornerRadius:Math.min(gt,mt/2),forceCornerRadius:lt,cornerIsExternal:ct,startAngle:ut,endAngle:ht}):yt=getSectorPath({cx:rt,cy:it,innerRadius:ot,outerRadius:at,startAngle:ut,endAngle:ht}),React$1.createElement("path",_extends$i({},filterProps(nt,!0),{className:pt,d:yt,role:"img"}))};function _typeof$k(tt){"@babel/helpers - typeof";return _typeof$k=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(et){return typeof et}:function(et){return et&&typeof Symbol=="function"&&et.constructor===Symbol&&et!==Symbol.prototype?"symbol":typeof et},_typeof$k(tt)}function _extends$h(){return _extends$h=Object.assign?Object.assign.bind():function(tt){for(var et=1;ettt.length)&&(et=tt.length);for(var nt=0,rt=new Array(et);nt=0?1:-1,lt=rt>=0?1:-1,ct=it>=0&&rt>=0||it<0&&rt<0?1:0,ut;if(at>0&&ot instanceof Array){for(var ht=[0,0,0,0],dt=0,pt=4;dtat?at:ot[dt];ut="M".concat(et,",").concat(nt+st*ht[0]),ht[0]>0&&(ut+="A ".concat(ht[0],",").concat(ht[0],",0,0,").concat(ct,",").concat(et+lt*ht[0],",").concat(nt)),ut+="L ".concat(et+rt-lt*ht[1],",").concat(nt),ht[1]>0&&(ut+="A ".concat(ht[1],",").concat(ht[1],",0,0,").concat(ct,`, - `).concat(et+rt,",").concat(nt+st*ht[1])),ut+="L ".concat(et+rt,",").concat(nt+it-st*ht[2]),ht[2]>0&&(ut+="A ".concat(ht[2],",").concat(ht[2],",0,0,").concat(ct,`, - `).concat(et+rt-lt*ht[2],",").concat(nt+it)),ut+="L ".concat(et+lt*ht[3],",").concat(nt+it),ht[3]>0&&(ut+="A ".concat(ht[3],",").concat(ht[3],",0,0,").concat(ct,`, - `).concat(et,",").concat(nt+it-st*ht[3])),ut+="Z"}else if(at>0&&ot===+ot&&ot>0){var mt=Math.min(at,ot);ut="M ".concat(et,",").concat(nt+st*mt,` - A `).concat(mt,",").concat(mt,",0,0,").concat(ct,",").concat(et+lt*mt,",").concat(nt,` - L `).concat(et+rt-lt*mt,",").concat(nt,` - A `).concat(mt,",").concat(mt,",0,0,").concat(ct,",").concat(et+rt,",").concat(nt+st*mt,` - L `).concat(et+rt,",").concat(nt+it-st*mt,` - A `).concat(mt,",").concat(mt,",0,0,").concat(ct,",").concat(et+rt-lt*mt,",").concat(nt+it,` - L `).concat(et+lt*mt,",").concat(nt+it,` - A `).concat(mt,",").concat(mt,",0,0,").concat(ct,",").concat(et,",").concat(nt+it-st*mt," Z")}else ut="M ".concat(et,",").concat(nt," h ").concat(rt," v ").concat(it," h ").concat(-rt," Z");return ut},isInRectangle=function(et,nt){if(!et||!nt)return!1;var rt=et.x,it=et.y,ot=nt.x,at=nt.y,st=nt.width,lt=nt.height;if(Math.abs(st)>0&&Math.abs(lt)>0){var ct=Math.min(ot,ot+st),ut=Math.max(ot,ot+st),ht=Math.min(at,at+lt),dt=Math.max(at,at+lt);return rt>=ct&&rt<=ut&&it>=ht&&it<=dt}return!1},defaultProps$2={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},Rectangle=function(et){var nt=_objectSpread$i(_objectSpread$i({},defaultProps$2),et),rt=reactExports.useRef(),it=reactExports.useState(-1),ot=_slicedToArray$4(it,2),at=ot[0],st=ot[1];reactExports.useEffect(function(){if(rt.current&&rt.current.getTotalLength)try{var kt=rt.current.getTotalLength();kt&&st(kt)}catch{}},[]);var lt=nt.x,ct=nt.y,ut=nt.width,ht=nt.height,dt=nt.radius,pt=nt.className,mt=nt.animationEasing,gt=nt.animationDuration,yt=nt.animationBegin,bt=nt.isAnimationActive,vt=nt.isUpdateAnimationActive;if(lt!==+lt||ct!==+ct||ut!==+ut||ht!==+ht||ut===0||ht===0)return null;var xt=classNames("recharts-rectangle",pt);return vt?React$1.createElement(Animate,{canBegin:at>0,from:{width:ut,height:ht,x:lt,y:ct},to:{width:ut,height:ht,x:lt,y:ct},duration:gt,animationEasing:mt,isActive:vt},function(kt){var St=kt.width,Tt=kt.height,At=kt.x,Et=kt.y;return React$1.createElement(Animate,{canBegin:at>0,from:"0px ".concat(at===-1?1:at,"px"),to:"".concat(at,"px 0px"),attributeName:"strokeDasharray",begin:yt,duration:gt,isActive:bt,easing:mt},React$1.createElement("path",_extends$g({},filterProps(nt,!0),{className:xt,d:getRectanglePath(At,Et,St,Tt,dt),ref:rt})))}):React$1.createElement("path",_extends$g({},filterProps(nt,!0),{className:xt,d:getRectanglePath(lt,ct,ut,ht,dt)}))};function _extends$f(){return _extends$f=Object.assign?Object.assign.bind():function(tt){for(var et=1;et=0)&&Object.prototype.propertyIsEnumerable.call(tt,rt)&&(nt[rt]=tt[rt])}return nt}function _objectWithoutPropertiesLoose$8(tt,et){if(tt==null)return{};var nt={},rt=Object.keys(tt),it,ot;for(ot=0;ot=0)&&(nt[it]=tt[it]);return nt}var getPath=function(et,nt,rt,it,ot,at){return"M".concat(et,",").concat(ot,"v").concat(it,"M").concat(at,",").concat(nt,"h").concat(rt)},Cross=function(et){var nt=et.x,rt=nt===void 0?0:nt,it=et.y,ot=it===void 0?0:it,at=et.top,st=at===void 0?0:at,lt=et.left,ct=lt===void 0?0:lt,ut=et.width,ht=ut===void 0?0:ut,dt=et.height,pt=dt===void 0?0:dt,mt=et.className,gt=_objectWithoutProperties$8(et,_excluded$8),yt=_objectSpread$h({x:rt,y:ot,top:st,left:ct,width:ht,height:pt},gt);return!isNumber(rt)||!isNumber(ot)||!isNumber(ht)||!isNumber(pt)||!isNumber(st)||!isNumber(ct)?null:React$1.createElement("path",_extends$e({},filterProps(yt,!0),{className:classNames("recharts-cross",mt),d:getPath(rt,ot,ht,pt,st,ct)}))},baseGetTag$1=_baseGetTag,isObjectLike$1=isObjectLike_1,boolTag="[object Boolean]";function isBoolean(tt){return tt===!0||tt===!1||isObjectLike$1(tt)&&baseGetTag$1(tt)==boolTag}var isBoolean_1=isBoolean;const _isBoolean=getDefaultExportFromCjs(isBoolean_1);var baseGetTag=_baseGetTag,getPrototype=_getPrototype,isObjectLike=isObjectLike_1,objectTag="[object Object]",funcProto=Function.prototype,objectProto=Object.prototype,funcToString=funcProto.toString,hasOwnProperty=objectProto.hasOwnProperty,objectCtorString=funcToString.call(Object);function isPlainObject(tt){if(!isObjectLike(tt)||baseGetTag(tt)!=objectTag)return!1;var et=getPrototype(tt);if(et===null)return!0;var nt=hasOwnProperty.call(et,"constructor")&&et.constructor;return typeof nt=="function"&&nt instanceof nt&&funcToString.call(nt)==objectCtorString}var isPlainObject_1=isPlainObject;const _isPlainObject=getDefaultExportFromCjs(isPlainObject_1);function _typeof$h(tt){"@babel/helpers - typeof";return _typeof$h=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(et){return typeof et}:function(et){return et&&typeof Symbol=="function"&&et.constructor===Symbol&&et!==Symbol.prototype?"symbol":typeof et},_typeof$h(tt)}function _extends$d(){return _extends$d=Object.assign?Object.assign.bind():function(tt){for(var et=1;ettt.length)&&(et=tt.length);for(var nt=0,rt=new Array(et);nt0,from:{upperWidth:0,lowerWidth:0,height:dt,x:lt,y:ct},to:{upperWidth:ut,lowerWidth:ht,height:dt,x:lt,y:ct},duration:gt,animationEasing:mt,isActive:bt},function(xt){var kt=xt.upperWidth,St=xt.lowerWidth,Tt=xt.height,At=xt.x,Et=xt.y;return React$1.createElement(Animate,{canBegin:at>0,from:"0px ".concat(at===-1?1:at,"px"),to:"".concat(at,"px 0px"),attributeName:"strokeDasharray",begin:yt,duration:gt,easing:mt},React$1.createElement("path",_extends$d({},filterProps(nt,!0),{className:vt,d:getTrapezoidPath(At,Et,kt,St,Tt),ref:rt})))}):React$1.createElement("g",null,React$1.createElement("path",_extends$d({},filterProps(nt,!0),{className:vt,d:getTrapezoidPath(lt,ct,ut,ht,dt)})))},_excluded$7=["option","shapeType","propTransformer","activeClassName","isActive"];function _typeof$g(tt){"@babel/helpers - typeof";return _typeof$g=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(et){return typeof et}:function(et){return et&&typeof Symbol=="function"&&et.constructor===Symbol&&et!==Symbol.prototype?"symbol":typeof et},_typeof$g(tt)}function _objectWithoutProperties$7(tt,et){if(tt==null)return{};var nt=_objectWithoutPropertiesLoose$7(tt,et),rt,it;if(Object.getOwnPropertySymbols){var ot=Object.getOwnPropertySymbols(tt);for(it=0;it=0)&&Object.prototype.propertyIsEnumerable.call(tt,rt)&&(nt[rt]=tt[rt])}return nt}function _objectWithoutPropertiesLoose$7(tt,et){if(tt==null)return{};var nt={},rt=Object.keys(tt),it,ot;for(ot=0;ot=0)&&(nt[it]=tt[it]);return nt}function ownKeys$f(tt,et){var nt=Object.keys(tt);if(Object.getOwnPropertySymbols){var rt=Object.getOwnPropertySymbols(tt);et&&(rt=rt.filter(function(it){return Object.getOwnPropertyDescriptor(tt,it).enumerable})),nt.push.apply(nt,rt)}return nt}function _objectSpread$f(tt){for(var et=1;et"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function _getPrototypeOf$7(tt){return _getPrototypeOf$7=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(nt){return nt.__proto__||Object.getPrototypeOf(nt)},_getPrototypeOf$7(tt)}function _defineProperty$e(tt,et,nt){return et=_toPropertyKey$d(et),et in tt?Object.defineProperty(tt,et,{value:nt,enumerable:!0,configurable:!0,writable:!0}):tt[et]=nt,tt}function _toPropertyKey$d(tt){var et=_toPrimitive$d(tt,"string");return _typeof$e(et)==="symbol"?et:String(et)}function _toPrimitive$d(tt,et){if(_typeof$e(tt)!=="object"||tt===null)return tt;var nt=tt[Symbol.toPrimitive];if(nt!==void 0){var rt=nt.call(tt,et||"default");if(_typeof$e(rt)!=="object")return rt;throw new TypeError("@@toPrimitive must return a primitive value.")}return(et==="string"?String:Number)(tt)}var createScale=function(et){var nt=et.data,rt=et.startIndex,it=et.endIndex,ot=et.x,at=et.width,st=et.travellerWidth;if(!nt||!nt.length)return{};var lt=nt.length,ct=point().domain(_range(0,lt)).range([ot,ot+at-st]),ut=ct.domain().map(function(ht){return ct(ht)});return{isTextActive:!1,isSlideMoving:!1,isTravellerMoving:!1,isTravellerFocused:!1,startX:ct(rt),endX:ct(it),scale:ct,scaleValues:ut}},isTouch=function(et){return et.changedTouches&&!!et.changedTouches.length},Brush=function(tt){_inherits$7(nt,tt);var et=_createSuper$7(nt);function nt(rt){var it;return _classCallCheck$9(this,nt),it=et.call(this,rt),_defineProperty$e(_assertThisInitialized$7(it),"handleDrag",function(ot){it.leaveTimer&&(clearTimeout(it.leaveTimer),it.leaveTimer=null),it.state.isTravellerMoving?it.handleTravellerMove(ot):it.state.isSlideMoving&&it.handleSlideDrag(ot)}),_defineProperty$e(_assertThisInitialized$7(it),"handleTouchMove",function(ot){ot.changedTouches!=null&&ot.changedTouches.length>0&&it.handleDrag(ot.changedTouches[0])}),_defineProperty$e(_assertThisInitialized$7(it),"handleDragEnd",function(){it.setState({isTravellerMoving:!1,isSlideMoving:!1},function(){var ot=it.props,at=ot.endIndex,st=ot.onDragEnd,lt=ot.startIndex;st==null||st({endIndex:at,startIndex:lt})}),it.detachDragEndListener()}),_defineProperty$e(_assertThisInitialized$7(it),"handleLeaveWrapper",function(){(it.state.isTravellerMoving||it.state.isSlideMoving)&&(it.leaveTimer=window.setTimeout(it.handleDragEnd,it.props.leaveTimeOut))}),_defineProperty$e(_assertThisInitialized$7(it),"handleEnterSlideOrTraveller",function(){it.setState({isTextActive:!0})}),_defineProperty$e(_assertThisInitialized$7(it),"handleLeaveSlideOrTraveller",function(){it.setState({isTextActive:!1})}),_defineProperty$e(_assertThisInitialized$7(it),"handleSlideDragStart",function(ot){var at=isTouch(ot)?ot.changedTouches[0]:ot;it.setState({isTravellerMoving:!1,isSlideMoving:!0,slideMoveStartX:at.pageX}),it.attachDragEndListener()}),it.travellerDragStartHandlers={startX:it.handleTravellerDragStart.bind(_assertThisInitialized$7(it),"startX"),endX:it.handleTravellerDragStart.bind(_assertThisInitialized$7(it),"endX")},it.state={},it}return _createClass$9(nt,[{key:"componentWillUnmount",value:function(){this.leaveTimer&&(clearTimeout(this.leaveTimer),this.leaveTimer=null),this.detachDragEndListener()}},{key:"getIndex",value:function(it){var ot=it.startX,at=it.endX,st=this.state.scaleValues,lt=this.props,ct=lt.gap,ut=lt.data,ht=ut.length-1,dt=Math.min(ot,at),pt=Math.max(ot,at),mt=nt.getIndexInRange(st,dt),gt=nt.getIndexInRange(st,pt);return{startIndex:mt-mt%ct,endIndex:gt===ht?ht:gt-gt%ct}}},{key:"getTextOfTick",value:function(it){var ot=this.props,at=ot.data,st=ot.tickFormatter,lt=ot.dataKey,ct=getValueByDataKey(at[it],lt,it);return _isFunction$1(st)?st(ct,it):ct}},{key:"attachDragEndListener",value:function(){window.addEventListener("mouseup",this.handleDragEnd,!0),window.addEventListener("touchend",this.handleDragEnd,!0),window.addEventListener("mousemove",this.handleDrag,!0)}},{key:"detachDragEndListener",value:function(){window.removeEventListener("mouseup",this.handleDragEnd,!0),window.removeEventListener("touchend",this.handleDragEnd,!0),window.removeEventListener("mousemove",this.handleDrag,!0)}},{key:"handleSlideDrag",value:function(it){var ot=this.state,at=ot.slideMoveStartX,st=ot.startX,lt=ot.endX,ct=this.props,ut=ct.x,ht=ct.width,dt=ct.travellerWidth,pt=ct.startIndex,mt=ct.endIndex,gt=ct.onChange,yt=it.pageX-at;yt>0?yt=Math.min(yt,ut+ht-dt-lt,ut+ht-dt-st):yt<0&&(yt=Math.max(yt,ut-st,ut-lt));var bt=this.getIndex({startX:st+yt,endX:lt+yt});(bt.startIndex!==pt||bt.endIndex!==mt)&>&>(bt),this.setState({startX:st+yt,endX:lt+yt,slideMoveStartX:it.pageX})}},{key:"handleTravellerDragStart",value:function(it,ot){var at=isTouch(ot)?ot.changedTouches[0]:ot;this.setState({isSlideMoving:!1,isTravellerMoving:!0,movingTravellerId:it,brushMoveStartX:at.pageX}),this.attachDragEndListener()}},{key:"handleTravellerMove",value:function(it){var ot,at=this.state,st=at.brushMoveStartX,lt=at.movingTravellerId,ct=at.endX,ut=at.startX,ht=this.state[lt],dt=this.props,pt=dt.x,mt=dt.width,gt=dt.travellerWidth,yt=dt.onChange,bt=dt.gap,vt=dt.data,xt={startX:this.state.startX,endX:this.state.endX},kt=it.pageX-st;kt>0?kt=Math.min(kt,pt+mt-gt-ht):kt<0&&(kt=Math.max(kt,pt-ht)),xt[lt]=ht+kt;var St=this.getIndex(xt),Tt=St.startIndex,At=St.endIndex,Et=function(){var Dt=vt.length-1;return lt==="startX"&&(ct>ut?Tt%bt===0:At%bt===0)||ctut?At%bt===0:Tt%bt===0)||ct>ut&&At===Dt};this.setState((ot={},_defineProperty$e(ot,lt,ht+kt),_defineProperty$e(ot,"brushMoveStartX",it.pageX),ot),function(){yt&&Et()&&yt(St)})}},{key:"handleTravellerMoveKeyboard",value:function(it,ot){var at=this,st=this.state,lt=st.scaleValues,ct=st.startX,ut=st.endX,ht=this.state[ot],dt=lt.indexOf(ht);if(dt!==-1){var pt=dt+it;if(!(pt===-1||pt>=lt.length)){var mt=lt[pt];ot==="startX"&&mt>=ut||ot==="endX"&&mt<=ct||this.setState(_defineProperty$e({},ot,mt),function(){at.props.onChange(at.getIndex({startX:at.state.startX,endX:at.state.endX}))})}}}},{key:"renderBackground",value:function(){var it=this.props,ot=it.x,at=it.y,st=it.width,lt=it.height,ct=it.fill,ut=it.stroke;return React$1.createElement("rect",{stroke:ut,fill:ct,x:ot,y:at,width:st,height:lt})}},{key:"renderPanorama",value:function(){var it=this.props,ot=it.x,at=it.y,st=it.width,lt=it.height,ct=it.data,ut=it.children,ht=it.padding,dt=reactExports.Children.only(ut);return dt?React$1.cloneElement(dt,{x:ot,y:at,width:st,height:lt,margin:ht,compact:!0,data:ct}):null}},{key:"renderTravellerLayer",value:function(it,ot){var at=this,st=this.props,lt=st.y,ct=st.travellerWidth,ut=st.height,ht=st.traveller,dt=Math.max(it,this.props.x),pt=_objectSpread$d(_objectSpread$d({},filterProps(this.props)),{},{x:dt,y:lt,width:ct,height:ut});return React$1.createElement(Layer,{tabIndex:0,role:"slider",className:"recharts-brush-traveller",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.travellerDragStartHandlers[ot],onTouchStart:this.travellerDragStartHandlers[ot],onKeyDown:function(gt){["ArrowLeft","ArrowRight"].includes(gt.key)&&(gt.preventDefault(),gt.stopPropagation(),at.handleTravellerMoveKeyboard(gt.key==="ArrowRight"?1:-1,ot))},onFocus:function(){at.setState({isTravellerFocused:!0})},onBlur:function(){at.setState({isTravellerFocused:!1})},style:{cursor:"col-resize"}},nt.renderTraveller(ht,pt))}},{key:"renderSlide",value:function(it,ot){var at=this.props,st=at.y,lt=at.height,ct=at.stroke,ut=at.travellerWidth,ht=Math.min(it,ot)+ut,dt=Math.max(Math.abs(ot-it)-ut,0);return React$1.createElement("rect",{className:"recharts-brush-slide",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.handleSlideDragStart,onTouchStart:this.handleSlideDragStart,style:{cursor:"move"},stroke:"none",fill:ct,fillOpacity:.2,x:ht,y:st,width:dt,height:lt})}},{key:"renderText",value:function(){var it=this.props,ot=it.startIndex,at=it.endIndex,st=it.y,lt=it.height,ct=it.travellerWidth,ut=it.stroke,ht=this.state,dt=ht.startX,pt=ht.endX,mt=5,gt={pointerEvents:"none",fill:ut};return React$1.createElement(Layer,{className:"recharts-brush-texts"},React$1.createElement(Text,_extends$c({textAnchor:"end",verticalAnchor:"middle",x:Math.min(dt,pt)-mt,y:st+lt/2},gt),this.getTextOfTick(ot)),React$1.createElement(Text,_extends$c({textAnchor:"start",verticalAnchor:"middle",x:Math.max(dt,pt)+ct+mt,y:st+lt/2},gt),this.getTextOfTick(at)))}},{key:"render",value:function(){var it=this.props,ot=it.data,at=it.className,st=it.children,lt=it.x,ct=it.y,ut=it.width,ht=it.height,dt=it.alwaysShowText,pt=this.state,mt=pt.startX,gt=pt.endX,yt=pt.isTextActive,bt=pt.isSlideMoving,vt=pt.isTravellerMoving,xt=pt.isTravellerFocused;if(!ot||!ot.length||!isNumber(lt)||!isNumber(ct)||!isNumber(ut)||!isNumber(ht)||ut<=0||ht<=0)return null;var kt=classNames("recharts-brush",at),St=React$1.Children.count(st)===1,Tt=generatePrefixStyle("userSelect","none");return React$1.createElement(Layer,{className:kt,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:Tt},this.renderBackground(),St&&this.renderPanorama(),this.renderSlide(mt,gt),this.renderTravellerLayer(mt,"startX"),this.renderTravellerLayer(gt,"endX"),(yt||bt||vt||xt||dt)&&this.renderText())}}],[{key:"renderDefaultTraveller",value:function(it){var ot=it.x,at=it.y,st=it.width,lt=it.height,ct=it.stroke,ut=Math.floor(at+lt/2)-1;return React$1.createElement(React$1.Fragment,null,React$1.createElement("rect",{x:ot,y:at,width:st,height:lt,fill:ct,stroke:"none"}),React$1.createElement("line",{x1:ot+1,y1:ut,x2:ot+st-1,y2:ut,fill:"none",stroke:"#fff"}),React$1.createElement("line",{x1:ot+1,y1:ut+2,x2:ot+st-1,y2:ut+2,fill:"none",stroke:"#fff"}))}},{key:"renderTraveller",value:function(it,ot){var at;return React$1.isValidElement(it)?at=React$1.cloneElement(it,ot):_isFunction$1(it)?at=it(ot):at=nt.renderDefaultTraveller(ot),at}},{key:"getDerivedStateFromProps",value:function(it,ot){var at=it.data,st=it.width,lt=it.x,ct=it.travellerWidth,ut=it.updateId,ht=it.startIndex,dt=it.endIndex;if(at!==ot.prevData||ut!==ot.prevUpdateId)return _objectSpread$d({prevData:at,prevTravellerWidth:ct,prevUpdateId:ut,prevX:lt,prevWidth:st},at&&at.length?createScale({data:at,width:st,x:lt,travellerWidth:ct,startIndex:ht,endIndex:dt}):{scale:null,scaleValues:null});if(ot.scale&&(st!==ot.prevWidth||lt!==ot.prevX||ct!==ot.prevTravellerWidth)){ot.scale.range([lt,lt+st-ct]);var pt=ot.scale.domain().map(function(mt){return ot.scale(mt)});return{prevData:at,prevTravellerWidth:ct,prevUpdateId:ut,prevX:lt,prevWidth:st,startX:ot.scale(it.startIndex),endX:ot.scale(it.endIndex),scaleValues:pt}}return null}},{key:"getIndexInRange",value:function(it,ot){for(var at=it.length,st=0,lt=at-1;lt-st>1;){var ct=Math.floor((st+lt)/2);it[ct]>ot?lt=ct:st=ct}return ot>=it[lt]?lt:st}}]),nt}(reactExports.PureComponent);_defineProperty$e(Brush,"displayName","Brush");_defineProperty$e(Brush,"defaultProps",{height:40,travellerWidth:5,gap:1,fill:"#fff",stroke:"#666",padding:{top:1,right:1,bottom:1,left:1},leaveTimeOut:1e3,alwaysShowText:!1});var baseEach$1=_baseEach;function baseSome$1(tt,et){var nt;return baseEach$1(tt,function(rt,it,ot){return nt=et(rt,it,ot),!nt}),!!nt}var _baseSome=baseSome$1,arraySome=_arraySome,baseIteratee$4=_baseIteratee,baseSome=_baseSome,isArray$1=isArray_1,isIterateeCall$1=_isIterateeCall;function some(tt,et,nt){var rt=isArray$1(tt)?arraySome:baseSome;return nt&&isIterateeCall$1(tt,et,nt)&&(et=void 0),rt(tt,baseIteratee$4(et))}var some_1=some;const _some=getDefaultExportFromCjs(some_1);var ifOverflowMatches=function(et,nt){var rt=et.alwaysShow,it=et.ifOverflow;return rt&&(it="extendDomain"),it===nt};function arrayEvery$1(tt,et){for(var nt=-1,rt=tt==null?0:tt.length;++nt=0)&&Object.prototype.propertyIsEnumerable.call(tt,rt)&&(nt[rt]=tt[rt])}return nt}function _objectWithoutPropertiesLoose$6(tt,et){if(tt==null)return{};var nt={},rt=Object.keys(tt),it,ot;for(ot=0;ot=0)&&(nt[it]=tt[it]);return nt}function typeguardBarRectangleProps(tt,et){var nt=tt.x,rt=tt.y,it=_objectWithoutProperties$6(tt,_excluded$6),ot="".concat(nt),at=parseInt(ot,10),st="".concat(rt),lt=parseInt(st,10),ct="".concat(et.height||it.height),ut=parseInt(ct,10),ht="".concat(et.width||it.width),dt=parseInt(ht,10);return _objectSpread$c(_objectSpread$c(_objectSpread$c(_objectSpread$c(_objectSpread$c({},et),it),at?{x:at}:{}),lt?{y:lt}:{}),{},{height:ut,width:dt,name:et.name,radius:et.radius})}function BarRectangle(tt){return React$1.createElement(Shape,_extends$b({shapeType:"rectangle",propTransformer:typeguardBarRectangleProps,activeClassName:"recharts-active-bar"},tt))}var _excluded$5=["value","background"];function _typeof$c(tt){"@babel/helpers - typeof";return _typeof$c=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(et){return typeof et}:function(et){return et&&typeof Symbol=="function"&&et.constructor===Symbol&&et!==Symbol.prototype?"symbol":typeof et},_typeof$c(tt)}function _objectWithoutProperties$5(tt,et){if(tt==null)return{};var nt=_objectWithoutPropertiesLoose$5(tt,et),rt,it;if(Object.getOwnPropertySymbols){var ot=Object.getOwnPropertySymbols(tt);for(it=0;it=0)&&Object.prototype.propertyIsEnumerable.call(tt,rt)&&(nt[rt]=tt[rt])}return nt}function _objectWithoutPropertiesLoose$5(tt,et){if(tt==null)return{};var nt={},rt=Object.keys(tt),it,ot;for(ot=0;ot=0)&&(nt[it]=tt[it]);return nt}function _extends$a(){return _extends$a=Object.assign?Object.assign.bind():function(tt){for(var et=1;et"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function _getPrototypeOf$6(tt){return _getPrototypeOf$6=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(nt){return nt.__proto__||Object.getPrototypeOf(nt)},_getPrototypeOf$6(tt)}function _defineProperty$c(tt,et,nt){return et=_toPropertyKey$b(et),et in tt?Object.defineProperty(tt,et,{value:nt,enumerable:!0,configurable:!0,writable:!0}):tt[et]=nt,tt}function _toPropertyKey$b(tt){var et=_toPrimitive$b(tt,"string");return _typeof$c(et)==="symbol"?et:String(et)}function _toPrimitive$b(tt,et){if(_typeof$c(tt)!=="object"||tt===null)return tt;var nt=tt[Symbol.toPrimitive];if(nt!==void 0){var rt=nt.call(tt,et||"default");if(_typeof$c(rt)!=="object")return rt;throw new TypeError("@@toPrimitive must return a primitive value.")}return(et==="string"?String:Number)(tt)}var Bar=function(tt){_inherits$6(nt,tt);var et=_createSuper$6(nt);function nt(){var rt;_classCallCheck$8(this,nt);for(var it=arguments.length,ot=new Array(it),at=0;at0&&Math.abs(wt)0&&Math.abs(Ct)0&&(Ct=Math.min((en||0)-(wt[sn-1]||0),Ct))});var It=Ct/Pt,Ot=gt.layout==="vertical"?rt.height:rt.width;if(gt.padding==="gap"&&(At=It*Ot/2),gt.padding==="no-gap"){var Wt=getPercentValue(et.barCategoryGap,It*Ot),zt=It*Ot/2;At=zt-Wt-(zt-Wt)/Ot*Wt}}it==="xAxis"?Et=[rt.left+(xt.left||0)+(At||0),rt.left+rt.width-(xt.right||0)-(At||0)]:it==="yAxis"?Et=lt==="horizontal"?[rt.top+rt.height-(xt.bottom||0),rt.top+(xt.top||0)]:[rt.top+(xt.top||0)+(At||0),rt.top+rt.height-(xt.bottom||0)-(At||0)]:Et=gt.range,St&&(Et=[Et[1],Et[0]]);var Ft=parseScale(gt,ot,dt),Nt=Ft.scale,Ut=Ft.realScaleType;Nt.domain(bt).range(Et),checkDomainOfScale(Nt);var Mt=getTicksOfScale(Nt,_objectSpread$a(_objectSpread$a({},gt),{},{realScaleType:Ut}));it==="xAxis"?(jt=yt==="top"&&!kt||yt==="bottom"&&kt,$t=rt.left,Dt=ht[Tt]-jt*gt.height):it==="yAxis"&&(jt=yt==="left"&&!kt||yt==="right"&&kt,$t=ht[Tt]-jt*gt.width,Dt=rt.top);var Ht=_objectSpread$a(_objectSpread$a(_objectSpread$a({},gt),Mt),{},{realScaleType:Ut,x:$t,y:Dt,scale:Nt,width:it==="xAxis"?rt.width:gt.width,height:it==="yAxis"?rt.height:gt.height});return Ht.bandSize=getBandSizeOfAxis(Ht,Mt),!gt.hide&&it==="xAxis"?ht[Tt]+=(jt?-1:1)*Ht.height:gt.hide||(ht[Tt]+=(jt?-1:1)*Ht.width),_objectSpread$a(_objectSpread$a({},pt),{},_defineProperty$b({},mt,Ht))},{})},rectWithPoints=function(et,nt){var rt=et.x,it=et.y,ot=nt.x,at=nt.y;return{x:Math.min(rt,ot),y:Math.min(it,at),width:Math.abs(ot-rt),height:Math.abs(at-it)}},rectWithCoords=function(et){var nt=et.x1,rt=et.y1,it=et.x2,ot=et.y2;return rectWithPoints({x:nt,y:rt},{x:it,y:ot})},ScaleHelper=function(){function tt(et){_classCallCheck$7(this,tt),this.scale=et}return _createClass$7(tt,[{key:"domain",get:function(){return this.scale.domain}},{key:"range",get:function(){return this.scale.range}},{key:"rangeMin",get:function(){return this.range()[0]}},{key:"rangeMax",get:function(){return this.range()[1]}},{key:"bandwidth",get:function(){return this.scale.bandwidth}},{key:"apply",value:function(nt){var rt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},it=rt.bandAware,ot=rt.position;if(nt!==void 0){if(ot)switch(ot){case"start":return this.scale(nt);case"middle":{var at=this.bandwidth?this.bandwidth()/2:0;return this.scale(nt)+at}case"end":{var st=this.bandwidth?this.bandwidth():0;return this.scale(nt)+st}default:return this.scale(nt)}if(it){var lt=this.bandwidth?this.bandwidth()/2:0;return this.scale(nt)+lt}return this.scale(nt)}}},{key:"isInRange",value:function(nt){var rt=this.range(),it=rt[0],ot=rt[rt.length-1];return it<=ot?nt>=it&&nt<=ot:nt>=ot&&nt<=it}}],[{key:"create",value:function(nt){return new tt(nt)}}]),tt}();_defineProperty$b(ScaleHelper,"EPS",1e-4);var createLabeledScales=function(et){var nt=Object.keys(et).reduce(function(rt,it){return _objectSpread$a(_objectSpread$a({},rt),{},_defineProperty$b({},it,ScaleHelper.create(et[it])))},{});return _objectSpread$a(_objectSpread$a({},nt),{},{apply:function(it){var ot=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},at=ot.bandAware,st=ot.position;return _mapValues(it,function(lt,ct){return nt[ct].apply(lt,{bandAware:at,position:st})})},isInRange:function(it){return _every(it,function(ot,at){return nt[at].isInRange(ot)})}})};function normalizeAngle(tt){return(tt%180+180)%180}var getAngledRectangleWidth=function(et){var nt=et.width,rt=et.height,it=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,ot=normalizeAngle(it),at=ot*Math.PI/180,st=Math.atan(rt/nt),lt=at>st&&attt.length)&&(et=tt.length);for(var nt=0,rt=new Array(et);nt=0&&tt*(et+tt*nt/2-it)<=0}function getNumberIntervalTicks(tt,et){return getEveryNthWithCondition(tt,et+1)}function getEquidistantTicks(tt,et,nt,rt,it){for(var ot=(rt||[]).slice(),at=et.start,st=et.end,lt=0,ct=1,ut=at;ct<=ot.length;){var ht=rt==null?void 0:rt[lt];if(ht===void 0)return getEveryNthWithCondition(rt,ct);var dt=nt(ht,lt),pt=ht.coordinate,mt=lt===0||isVisible(tt,pt,dt,ut,st);mt||(lt=0,ut=at,ct+=1),mt&&(ut=pt+tt*(dt/2+it),lt+=ct)}return[]}function _typeof$7(tt){"@babel/helpers - typeof";return _typeof$7=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(et){return typeof et}:function(et){return et&&typeof Symbol=="function"&&et.constructor===Symbol&&et!==Symbol.prototype?"symbol":typeof et},_typeof$7(tt)}function ownKeys$6(tt,et){var nt=Object.keys(tt);if(Object.getOwnPropertySymbols){var rt=Object.getOwnPropertySymbols(tt);et&&(rt=rt.filter(function(it){return Object.getOwnPropertyDescriptor(tt,it).enumerable})),nt.push.apply(nt,rt)}return nt}function _objectSpread$6(tt){for(var et=1;et=0;ct--){var ut=ot[ct],ht=nt(ut,ct);if(ct===at-1){var dt=tt*(ut.coordinate+tt*ht/2-lt);ot[ct]=ut=_objectSpread$6(_objectSpread$6({},ut),{},{tickCoord:dt>0?ut.coordinate-dt*tt:ut.coordinate})}else ot[ct]=ut=_objectSpread$6(_objectSpread$6({},ut),{},{tickCoord:ut.coordinate});var pt=isVisible(tt,ut.tickCoord,ht,st,lt);pt&&(lt=ut.tickCoord-tt*(ht/2+it),ot[ct]=_objectSpread$6(_objectSpread$6({},ut),{},{isShow:!0}))}return ot}function getTicksStart(tt,et,nt,rt,it,ot){var at=(rt||[]).slice(),st=at.length,lt=et.start,ct=et.end;if(ot){var ut=rt[st-1],ht=nt(ut,st-1),dt=tt*(ut.coordinate+tt*ht/2-ct);at[st-1]=ut=_objectSpread$6(_objectSpread$6({},ut),{},{tickCoord:dt>0?ut.coordinate-dt*tt:ut.coordinate});var pt=isVisible(tt,ut.tickCoord,ht,lt,ct);pt&&(ct=ut.tickCoord-tt*(ht/2+it),at[st-1]=_objectSpread$6(_objectSpread$6({},ut),{},{isShow:!0}))}for(var mt=ot?st-1:st,gt=0;gt=2?mathSign(it[1].coordinate-it[0].coordinate):1,bt=getTickBoundaries(ot,yt,pt);return lt==="equidistantPreserveStart"?getEquidistantTicks(yt,bt,gt,it,at):(lt==="preserveStart"||lt==="preserveStartEnd"?dt=getTicksStart(yt,bt,gt,it,at,lt==="preserveStartEnd"):dt=getTicksEnd(yt,bt,gt,it,at),dt.filter(function(vt){return vt.isShow}))}var _excluded$4=["viewBox"],_excluded2$2=["viewBox"],_excluded3=["ticks"];function _typeof$6(tt){"@babel/helpers - typeof";return _typeof$6=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(et){return typeof et}:function(et){return et&&typeof Symbol=="function"&&et.constructor===Symbol&&et!==Symbol.prototype?"symbol":typeof et},_typeof$6(tt)}function _extends$6(){return _extends$6=Object.assign?Object.assign.bind():function(tt){for(var et=1;et=0)&&Object.prototype.propertyIsEnumerable.call(tt,rt)&&(nt[rt]=tt[rt])}return nt}function _objectWithoutPropertiesLoose$4(tt,et){if(tt==null)return{};var nt={},rt=Object.keys(tt),it,ot;for(ot=0;ot=0)&&(nt[it]=tt[it]);return nt}function _classCallCheck$6(tt,et){if(!(tt instanceof et))throw new TypeError("Cannot call a class as a function")}function _defineProperties$6(tt,et){for(var nt=0;nt"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function _getPrototypeOf$5(tt){return _getPrototypeOf$5=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(nt){return nt.__proto__||Object.getPrototypeOf(nt)},_getPrototypeOf$5(tt)}function _defineProperty$6(tt,et,nt){return et=_toPropertyKey$5(et),et in tt?Object.defineProperty(tt,et,{value:nt,enumerable:!0,configurable:!0,writable:!0}):tt[et]=nt,tt}function _toPropertyKey$5(tt){var et=_toPrimitive$5(tt,"string");return _typeof$6(et)==="symbol"?et:String(et)}function _toPrimitive$5(tt,et){if(_typeof$6(tt)!=="object"||tt===null)return tt;var nt=tt[Symbol.toPrimitive];if(nt!==void 0){var rt=nt.call(tt,et||"default");if(_typeof$6(rt)!=="object")return rt;throw new TypeError("@@toPrimitive must return a primitive value.")}return(et==="string"?String:Number)(tt)}var CartesianAxis=function(tt){_inherits$5(nt,tt);var et=_createSuper$5(nt);function nt(rt){var it;return _classCallCheck$6(this,nt),it=et.call(this,rt),it.state={fontSize:"",letterSpacing:""},it}return _createClass$6(nt,[{key:"shouldComponentUpdate",value:function(it,ot){var at=it.viewBox,st=_objectWithoutProperties$4(it,_excluded$4),lt=this.props,ct=lt.viewBox,ut=_objectWithoutProperties$4(lt,_excluded2$2);return!shallowEqual(at,ct)||!shallowEqual(st,ut)||!shallowEqual(ot,this.state)}},{key:"componentDidMount",value:function(){var it=this.layerReference;if(it){var ot=it.getElementsByClassName("recharts-cartesian-axis-tick-value")[0];ot&&this.setState({fontSize:window.getComputedStyle(ot).fontSize,letterSpacing:window.getComputedStyle(ot).letterSpacing})}}},{key:"getTickLineCoord",value:function(it){var ot=this.props,at=ot.x,st=ot.y,lt=ot.width,ct=ot.height,ut=ot.orientation,ht=ot.tickSize,dt=ot.mirror,pt=ot.tickMargin,mt,gt,yt,bt,vt,xt,kt=dt?-1:1,St=it.tickSize||ht,Tt=isNumber(it.tickCoord)?it.tickCoord:it.coordinate;switch(ut){case"top":mt=gt=it.coordinate,bt=st+ +!dt*ct,yt=bt-kt*St,xt=yt-kt*pt,vt=Tt;break;case"left":yt=bt=it.coordinate,gt=at+ +!dt*lt,mt=gt-kt*St,vt=mt-kt*pt,xt=Tt;break;case"right":yt=bt=it.coordinate,gt=at+ +dt*lt,mt=gt+kt*St,vt=mt+kt*pt,xt=Tt;break;default:mt=gt=it.coordinate,bt=st+ +dt*ct,yt=bt+kt*St,xt=yt+kt*pt,vt=Tt;break}return{line:{x1:mt,y1:yt,x2:gt,y2:bt},tick:{x:vt,y:xt}}}},{key:"getTickTextAnchor",value:function(){var it=this.props,ot=it.orientation,at=it.mirror,st;switch(ot){case"left":st=at?"start":"end";break;case"right":st=at?"end":"start";break;default:st="middle";break}return st}},{key:"getTickVerticalAnchor",value:function(){var it=this.props,ot=it.orientation,at=it.mirror,st="end";switch(ot){case"left":case"right":st="middle";break;case"top":st=at?"start":"end";break;default:st=at?"end":"start";break}return st}},{key:"renderAxisLine",value:function(){var it=this.props,ot=it.x,at=it.y,st=it.width,lt=it.height,ct=it.orientation,ut=it.mirror,ht=it.axisLine,dt=_objectSpread$5(_objectSpread$5(_objectSpread$5({},filterProps(this.props)),filterProps(ht)),{},{fill:"none"});if(ct==="top"||ct==="bottom"){var pt=+(ct==="top"&&!ut||ct==="bottom"&&ut);dt=_objectSpread$5(_objectSpread$5({},dt),{},{x1:ot,y1:at+pt*lt,x2:ot+st,y2:at+pt*lt})}else{var mt=+(ct==="left"&&!ut||ct==="right"&&ut);dt=_objectSpread$5(_objectSpread$5({},dt),{},{x1:ot+mt*st,y1:at,x2:ot+mt*st,y2:at+lt})}return React$1.createElement("line",_extends$6({},dt,{className:classNames("recharts-cartesian-axis-line",_get(ht,"className"))}))}},{key:"renderTicks",value:function(it,ot,at){var st=this,lt=this.props,ct=lt.tickLine,ut=lt.stroke,ht=lt.tick,dt=lt.tickFormatter,pt=lt.unit,mt=getTicks(_objectSpread$5(_objectSpread$5({},this.props),{},{ticks:it}),ot,at),gt=this.getTickTextAnchor(),yt=this.getTickVerticalAnchor(),bt=filterProps(this.props),vt=filterProps(ht),xt=_objectSpread$5(_objectSpread$5({},bt),{},{fill:"none"},filterProps(ct)),kt=mt.map(function(St,Tt){var At=st.getTickLineCoord(St),Et=At.line,$t=At.tick,Dt=_objectSpread$5(_objectSpread$5(_objectSpread$5(_objectSpread$5({textAnchor:gt,verticalAnchor:yt},bt),{},{stroke:"none",fill:ut},vt),$t),{},{index:Tt,payload:St,visibleTicksCount:mt.length,tickFormatter:dt});return React$1.createElement(Layer,_extends$6({className:"recharts-cartesian-axis-tick",key:"tick-".concat(Tt)},adaptEventsOfChild(st.props,St,Tt)),ct&&React$1.createElement("line",_extends$6({},xt,Et,{className:classNames("recharts-cartesian-axis-tick-line",_get(ct,"className"))})),ht&&nt.renderTickItem(ht,Dt,"".concat(_isFunction$1(dt)?dt(St.value,Tt):St.value).concat(pt||"")))});return React$1.createElement("g",{className:"recharts-cartesian-axis-ticks"},kt)}},{key:"render",value:function(){var it=this,ot=this.props,at=ot.axisLine,st=ot.width,lt=ot.height,ct=ot.ticksGenerator,ut=ot.className,ht=ot.hide;if(ht)return null;var dt=this.props,pt=dt.ticks,mt=_objectWithoutProperties$4(dt,_excluded3),gt=pt;return _isFunction$1(ct)&&(gt=pt&&pt.length>0?ct(this.props):ct(mt)),st<=0||lt<=0||!gt||!gt.length?null:React$1.createElement(Layer,{className:classNames("recharts-cartesian-axis",ut),ref:function(bt){it.layerReference=bt}},at&&this.renderAxisLine(),this.renderTicks(gt,this.state.fontSize,this.state.letterSpacing),Label.renderCallByParent(this.props))}}],[{key:"renderTickItem",value:function(it,ot,at){var st;return React$1.isValidElement(it)?st=React$1.cloneElement(it,ot):_isFunction$1(it)?st=it(ot):st=React$1.createElement(Text,_extends$6({},ot,{className:"recharts-cartesian-axis-tick-value"}),at),st}}]),nt}(reactExports.Component);_defineProperty$6(CartesianAxis,"displayName","CartesianAxis");_defineProperty$6(CartesianAxis,"defaultProps",{x:0,y:0,width:0,height:0,viewBox:{x:0,y:0,width:0,height:0},orientation:"bottom",ticks:[],stroke:"#666",tickLine:!0,axisLine:!0,tick:!0,mirror:!1,minTickGap:5,tickSize:6,tickMargin:2,interval:"preserveEnd"});var _excluded$3=["x1","y1","x2","y2","key"],_excluded2$1=["offset"];function _typeof$5(tt){"@babel/helpers - typeof";return _typeof$5=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(et){return typeof et}:function(et){return et&&typeof Symbol=="function"&&et.constructor===Symbol&&et!==Symbol.prototype?"symbol":typeof et},_typeof$5(tt)}function _extends$5(){return _extends$5=Object.assign?Object.assign.bind():function(tt){for(var et=1;et=0)&&Object.prototype.propertyIsEnumerable.call(tt,rt)&&(nt[rt]=tt[rt])}return nt}function _objectWithoutPropertiesLoose$3(tt,et){if(tt==null)return{};var nt={},rt=Object.keys(tt),it,ot;for(ot=0;ot=0)&&(nt[it]=tt[it]);return nt}function ownKeys$4(tt,et){var nt=Object.keys(tt);if(Object.getOwnPropertySymbols){var rt=Object.getOwnPropertySymbols(tt);et&&(rt=rt.filter(function(it){return Object.getOwnPropertyDescriptor(tt,it).enumerable})),nt.push.apply(nt,rt)}return nt}function _objectSpread$4(tt){for(var et=1;et"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function _getPrototypeOf$4(tt){return _getPrototypeOf$4=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(nt){return nt.__proto__||Object.getPrototypeOf(nt)},_getPrototypeOf$4(tt)}function _defineProperty$5(tt,et,nt){return et=_toPropertyKey$4(et),et in tt?Object.defineProperty(tt,et,{value:nt,enumerable:!0,configurable:!0,writable:!0}):tt[et]=nt,tt}function _toPropertyKey$4(tt){var et=_toPrimitive$4(tt,"string");return _typeof$5(et)==="symbol"?et:String(et)}function _toPrimitive$4(tt,et){if(_typeof$5(tt)!=="object"||tt===null)return tt;var nt=tt[Symbol.toPrimitive];if(nt!==void 0){var rt=nt.call(tt,et||"default");if(_typeof$5(rt)!=="object")return rt;throw new TypeError("@@toPrimitive must return a primitive value.")}return(et==="string"?String:Number)(tt)}var CartesianGrid=function(tt){_inherits$4(nt,tt);var et=_createSuper$4(nt);function nt(){return _classCallCheck$5(this,nt),et.apply(this,arguments)}return _createClass$5(nt,[{key:"renderHorizontal",value:function(it){var ot=this,at=this.props,st=at.x,lt=at.width,ct=at.horizontal;if(!it||!it.length)return null;var ut=it.map(function(ht,dt){var pt=_objectSpread$4(_objectSpread$4({},ot.props),{},{x1:st,y1:ht,x2:st+lt,y2:ht,key:"line-".concat(dt),index:dt});return nt.renderLineItem(ct,pt)});return React$1.createElement("g",{className:"recharts-cartesian-grid-horizontal"},ut)}},{key:"renderVertical",value:function(it){var ot=this,at=this.props,st=at.y,lt=at.height,ct=at.vertical;if(!it||!it.length)return null;var ut=it.map(function(ht,dt){var pt=_objectSpread$4(_objectSpread$4({},ot.props),{},{x1:ht,y1:st,x2:ht,y2:st+lt,key:"line-".concat(dt),index:dt});return nt.renderLineItem(ct,pt)});return React$1.createElement("g",{className:"recharts-cartesian-grid-vertical"},ut)}},{key:"renderVerticalStripes",value:function(it){var ot=this.props.verticalFill;if(!ot||!ot.length)return null;var at=this.props,st=at.fillOpacity,lt=at.x,ct=at.y,ut=at.width,ht=at.height,dt=it.map(function(mt){return Math.round(mt+lt-lt)}).sort(function(mt,gt){return mt-gt});lt!==dt[0]&&dt.unshift(0);var pt=dt.map(function(mt,gt){var yt=!dt[gt+1],bt=yt?lt+ut-mt:dt[gt+1]-mt;if(bt<=0)return null;var vt=gt%ot.length;return React$1.createElement("rect",{key:"react-".concat(gt),x:mt,y:ct,width:bt,height:ht,stroke:"none",fill:ot[vt],fillOpacity:st,className:"recharts-cartesian-grid-bg"})});return React$1.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},pt)}},{key:"renderHorizontalStripes",value:function(it){var ot=this.props.horizontalFill;if(!ot||!ot.length)return null;var at=this.props,st=at.fillOpacity,lt=at.x,ct=at.y,ut=at.width,ht=at.height,dt=it.map(function(mt){return Math.round(mt+ct-ct)}).sort(function(mt,gt){return mt-gt});ct!==dt[0]&&dt.unshift(0);var pt=dt.map(function(mt,gt){var yt=!dt[gt+1],bt=yt?ct+ht-mt:dt[gt+1]-mt;if(bt<=0)return null;var vt=gt%ot.length;return React$1.createElement("rect",{key:"react-".concat(gt),y:mt,x:lt,height:bt,width:ut,stroke:"none",fill:ot[vt],fillOpacity:st,className:"recharts-cartesian-grid-bg"})});return React$1.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},pt)}},{key:"renderBackground",value:function(){var it=this.props.fill;if(!it||it==="none")return null;var ot=this.props,at=ot.fillOpacity,st=ot.x,lt=ot.y,ct=ot.width,ut=ot.height;return React$1.createElement("rect",{x:st,y:lt,width:ct,height:ut,stroke:"none",fill:it,fillOpacity:at,className:"recharts-cartesian-grid-bg"})}},{key:"render",value:function(){var it=this.props,ot=it.x,at=it.y,st=it.width,lt=it.height,ct=it.horizontal,ut=it.vertical,ht=it.horizontalCoordinatesGenerator,dt=it.verticalCoordinatesGenerator,pt=it.xAxis,mt=it.yAxis,gt=it.offset,yt=it.chartWidth,bt=it.chartHeight,vt=it.syncWithTicks,xt=it.horizontalValues,kt=it.verticalValues;if(!isNumber(st)||st<=0||!isNumber(lt)||lt<=0||!isNumber(ot)||ot!==+ot||!isNumber(at)||at!==+at)return null;var St=this.props,Tt=St.horizontalPoints,At=St.verticalPoints;if((!Tt||!Tt.length)&&_isFunction$1(ht)){var Et=xt&&xt.length;Tt=ht({yAxis:_objectSpread$4(_objectSpread$4({},mt),{},{ticks:Et?xt:mt.ticks}),width:yt,height:bt,offset:gt},Et?!0:vt)}if((!At||!At.length)&&_isFunction$1(dt)){var $t=kt&&kt.length;At=dt({xAxis:_objectSpread$4(_objectSpread$4({},pt),{},{ticks:$t?kt:pt.ticks}),width:yt,height:bt,offset:gt},$t?!0:vt)}return React$1.createElement("g",{className:"recharts-cartesian-grid"},this.renderBackground(),ct&&this.renderHorizontal(Tt),ut&&this.renderVertical(At),ct&&this.renderHorizontalStripes(Tt),ut&&this.renderVerticalStripes(At))}}],[{key:"renderLineItem",value:function(it,ot){var at;if(React$1.isValidElement(it))at=React$1.cloneElement(it,ot);else if(_isFunction$1(it))at=it(ot);else{var st=ot.x1,lt=ot.y1,ct=ot.x2,ut=ot.y2,ht=ot.key,dt=_objectWithoutProperties$3(ot,_excluded$3),pt=filterProps(dt);pt.offset;var mt=_objectWithoutProperties$3(pt,_excluded2$1);at=React$1.createElement("line",_extends$5({},mt,{x1:st,y1:lt,x2:ct,y2:ut,fill:"none",key:ht}))}return at}}]),nt}(reactExports.PureComponent);_defineProperty$5(CartesianGrid,"displayName","CartesianGrid");_defineProperty$5(CartesianGrid,"defaultProps",{horizontal:!0,vertical:!0,horizontalPoints:[],verticalPoints:[],stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[]});var _excluded$2=["type","layout","connectNulls","ref"];function _typeof$4(tt){"@babel/helpers - typeof";return _typeof$4=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(et){return typeof et}:function(et){return et&&typeof Symbol=="function"&&et.constructor===Symbol&&et!==Symbol.prototype?"symbol":typeof et},_typeof$4(tt)}function _objectWithoutProperties$2(tt,et){if(tt==null)return{};var nt=_objectWithoutPropertiesLoose$2(tt,et),rt,it;if(Object.getOwnPropertySymbols){var ot=Object.getOwnPropertySymbols(tt);for(it=0;it=0)&&Object.prototype.propertyIsEnumerable.call(tt,rt)&&(nt[rt]=tt[rt])}return nt}function _objectWithoutPropertiesLoose$2(tt,et){if(tt==null)return{};var nt={},rt=Object.keys(tt),it,ot;for(ot=0;ot=0)&&(nt[it]=tt[it]);return nt}function _extends$4(){return _extends$4=Object.assign?Object.assign.bind():function(tt){for(var et=1;ettt.length)&&(et=tt.length);for(var nt=0,rt=new Array(et);nt"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function _getPrototypeOf$3(tt){return _getPrototypeOf$3=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(nt){return nt.__proto__||Object.getPrototypeOf(nt)},_getPrototypeOf$3(tt)}function _defineProperty$4(tt,et,nt){return et=_toPropertyKey$3(et),et in tt?Object.defineProperty(tt,et,{value:nt,enumerable:!0,configurable:!0,writable:!0}):tt[et]=nt,tt}function _toPropertyKey$3(tt){var et=_toPrimitive$3(tt,"string");return _typeof$4(et)==="symbol"?et:String(et)}function _toPrimitive$3(tt,et){if(_typeof$4(tt)!=="object"||tt===null)return tt;var nt=tt[Symbol.toPrimitive];if(nt!==void 0){var rt=nt.call(tt,et||"default");if(_typeof$4(rt)!=="object")return rt;throw new TypeError("@@toPrimitive must return a primitive value.")}return(et==="string"?String:Number)(tt)}var Line=function(tt){_inherits$3(nt,tt);var et=_createSuper$3(nt);function nt(){var rt;_classCallCheck$4(this,nt);for(var it=arguments.length,ot=new Array(it),at=0;atdt){mt=[].concat(_toConsumableArray$3(ct.slice(0,gt)),[dt-yt]);break}var bt=mt.length%2===0?[0,pt]:[pt];return[].concat(_toConsumableArray$3(nt.repeat(ct,ht)),_toConsumableArray$3(mt),bt).map(function(vt){return"".concat(vt,"px")}).join(", ")}),_defineProperty$4(_assertThisInitialized$3(rt),"id",uniqueId("recharts-line-")),_defineProperty$4(_assertThisInitialized$3(rt),"pathRef",function(st){rt.mainCurve=st}),_defineProperty$4(_assertThisInitialized$3(rt),"handleAnimationEnd",function(){rt.setState({isAnimationFinished:!0}),rt.props.onAnimationEnd&&rt.props.onAnimationEnd()}),_defineProperty$4(_assertThisInitialized$3(rt),"handleAnimationStart",function(){rt.setState({isAnimationFinished:!1}),rt.props.onAnimationStart&&rt.props.onAnimationStart()}),rt}return _createClass$4(nt,[{key:"componentDidMount",value:function(){if(this.props.isAnimationActive){var it=this.getTotalLength();this.setState({totalLength:it})}}},{key:"getTotalLength",value:function(){var it=this.mainCurve;try{return it&&it.getTotalLength&&it.getTotalLength()||0}catch{return 0}}},{key:"renderErrorBar",value:function(it,ot){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var at=this.props,st=at.points,lt=at.xAxis,ct=at.yAxis,ut=at.layout,ht=at.children,dt=findAllByType(ht,ErrorBar);if(!dt)return null;var pt=function(yt,bt){return{x:yt.x,y:yt.y,value:yt.value,errorVal:getValueByDataKey(yt.payload,bt)}},mt={clipPath:it?"url(#clipPath-".concat(ot,")"):null};return React$1.createElement(Layer,mt,dt.map(function(gt,yt){return React$1.cloneElement(gt,{key:"bar-".concat(yt),data:st,xAxis:lt,yAxis:ct,layout:ut,dataPointFormatter:pt})}))}},{key:"renderDots",value:function(it,ot,at){var st=this.props.isAnimationActive;if(st&&!this.state.isAnimationFinished)return null;var lt=this.props,ct=lt.dot,ut=lt.points,ht=lt.dataKey,dt=filterProps(this.props),pt=filterProps(ct,!0),mt=ut.map(function(yt,bt){var vt=_objectSpread$3(_objectSpread$3(_objectSpread$3({key:"dot-".concat(bt),r:3},dt),pt),{},{value:yt.value,dataKey:ht,cx:yt.x,cy:yt.y,index:bt,payload:yt.payload});return nt.renderDotItem(ct,vt)}),gt={clipPath:it?"url(#clipPath-".concat(ot?"":"dots-").concat(at,")"):null};return React$1.createElement(Layer,_extends$4({className:"recharts-line-dots",key:"dots"},gt),mt)}},{key:"renderCurveStatically",value:function(it,ot,at,st){var lt=this.props,ct=lt.type,ut=lt.layout,ht=lt.connectNulls;lt.ref;var dt=_objectWithoutProperties$2(lt,_excluded$2),pt=_objectSpread$3(_objectSpread$3(_objectSpread$3({},filterProps(dt,!0)),{},{fill:"none",className:"recharts-line-curve",clipPath:ot?"url(#clipPath-".concat(at,")"):null,points:it},st),{},{type:ct,layout:ut,connectNulls:ht});return React$1.createElement(Curve,_extends$4({},pt,{pathRef:this.pathRef}))}},{key:"renderCurveWithAnimation",value:function(it,ot){var at=this,st=this.props,lt=st.points,ct=st.strokeDasharray,ut=st.isAnimationActive,ht=st.animationBegin,dt=st.animationDuration,pt=st.animationEasing,mt=st.animationId,gt=st.animateNewValues,yt=st.width,bt=st.height,vt=this.state,xt=vt.prevPoints,kt=vt.totalLength;return React$1.createElement(Animate,{begin:ht,duration:dt,isActive:ut,easing:pt,from:{t:0},to:{t:1},key:"line-".concat(mt),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(St){var Tt=St.t;if(xt){var At=xt.length/lt.length,Et=lt.map(function(Ct,wt){var It=Math.floor(wt*At);if(xt[It]){var Ot=xt[It],Wt=interpolateNumber$2(Ot.x,Ct.x),zt=interpolateNumber$2(Ot.y,Ct.y);return _objectSpread$3(_objectSpread$3({},Ct),{},{x:Wt(Tt),y:zt(Tt)})}if(gt){var Ft=interpolateNumber$2(yt*2,Ct.x),Nt=interpolateNumber$2(bt/2,Ct.y);return _objectSpread$3(_objectSpread$3({},Ct),{},{x:Ft(Tt),y:Nt(Tt)})}return _objectSpread$3(_objectSpread$3({},Ct),{},{x:Ct.x,y:Ct.y})});return at.renderCurveStatically(Et,it,ot)}var $t=interpolateNumber$2(0,kt),Dt=$t(Tt),jt;if(ct){var Pt="".concat(ct).split(/[,\s]+/gim).map(function(Ct){return parseFloat(Ct)});jt=at.getStrokeDasharray(Dt,kt,Pt)}else jt="".concat(Dt,"px ").concat(kt-Dt,"px");return at.renderCurveStatically(lt,it,ot,{strokeDasharray:jt})})}},{key:"renderCurve",value:function(it,ot){var at=this.props,st=at.points,lt=at.isAnimationActive,ct=this.state,ut=ct.prevPoints,ht=ct.totalLength;return lt&&st&&st.length&&(!ut&&ht>0||!_isEqual(ut,st))?this.renderCurveWithAnimation(it,ot):this.renderCurveStatically(st,it,ot)}},{key:"render",value:function(){var it,ot=this.props,at=ot.hide,st=ot.dot,lt=ot.points,ct=ot.className,ut=ot.xAxis,ht=ot.yAxis,dt=ot.top,pt=ot.left,mt=ot.width,gt=ot.height,yt=ot.isAnimationActive,bt=ot.id;if(at||!lt||!lt.length)return null;var vt=this.state.isAnimationFinished,xt=lt.length===1,kt=classNames("recharts-line",ct),St=ut&&ut.allowDataOverflow,Tt=ht&&ht.allowDataOverflow,At=St||Tt,Et=_isNil(bt)?this.id:bt,$t=(it=filterProps(st))!==null&&it!==void 0?it:{r:3,strokeWidth:2},Dt=$t.r,jt=Dt===void 0?3:Dt,Pt=$t.strokeWidth,Ct=Pt===void 0?2:Pt,wt=isDotProps(st)?st:{},It=wt.clipDot,Ot=It===void 0?!0:It,Wt=jt*2+Ct;return React$1.createElement(Layer,{className:kt},St||Tt?React$1.createElement("defs",null,React$1.createElement("clipPath",{id:"clipPath-".concat(Et)},React$1.createElement("rect",{x:St?pt:pt-mt/2,y:Tt?dt:dt-gt/2,width:St?mt:mt*2,height:Tt?gt:gt*2})),!Ot&&React$1.createElement("clipPath",{id:"clipPath-dots-".concat(Et)},React$1.createElement("rect",{x:pt-Wt/2,y:dt-Wt/2,width:mt+Wt,height:gt+Wt}))):null,!xt&&this.renderCurve(At,Et),this.renderErrorBar(At,Et),(xt||st)&&this.renderDots(At,Ot,Et),(!yt||vt)&&LabelList.renderCallByParent(this.props,lt))}}],[{key:"getDerivedStateFromProps",value:function(it,ot){return it.animationId!==ot.prevAnimationId?{prevAnimationId:it.animationId,curPoints:it.points,prevPoints:ot.curPoints}:it.points!==ot.curPoints?{curPoints:it.points}:null}},{key:"repeat",value:function(it,ot){for(var at=it.length%2!==0?[].concat(_toConsumableArray$3(it),[0]):it,st=[],lt=0;lt=0)&&Object.prototype.propertyIsEnumerable.call(tt,rt)&&(nt[rt]=tt[rt])}return nt}function _objectWithoutPropertiesLoose$1(tt,et){if(tt==null)return{};var nt={},rt=Object.keys(tt),it,ot;for(ot=0;ot=0)&&(nt[it]=tt[it]);return nt}function ScatterSymbol(tt){var et=tt.option,nt=tt.isActive,rt=_objectWithoutProperties$1(tt,_excluded$1);return typeof et=="string"?React$1.createElement(Shape,_extends$3({option:React$1.createElement(Symbols,_extends$3({type:et},rt)),isActive:nt,shapeType:"symbols"},rt)):React$1.createElement(Shape,_extends$3({option:et,isActive:nt,shapeType:"symbols"},rt))}function _typeof$3(tt){"@babel/helpers - typeof";return _typeof$3=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(et){return typeof et}:function(et){return et&&typeof Symbol=="function"&&et.constructor===Symbol&&et!==Symbol.prototype?"symbol":typeof et},_typeof$3(tt)}function _extends$2(){return _extends$2=Object.assign?Object.assign.bind():function(tt){for(var et=1;et"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function _getPrototypeOf$2(tt){return _getPrototypeOf$2=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(nt){return nt.__proto__||Object.getPrototypeOf(nt)},_getPrototypeOf$2(tt)}function _defineProperty$3(tt,et,nt){return et=_toPropertyKey$2(et),et in tt?Object.defineProperty(tt,et,{value:nt,enumerable:!0,configurable:!0,writable:!0}):tt[et]=nt,tt}function _toPropertyKey$2(tt){var et=_toPrimitive$2(tt,"string");return _typeof$3(et)==="symbol"?et:String(et)}function _toPrimitive$2(tt,et){if(_typeof$3(tt)!=="object"||tt===null)return tt;var nt=tt[Symbol.toPrimitive];if(nt!==void 0){var rt=nt.call(tt,et||"default");if(_typeof$3(rt)!=="object")return rt;throw new TypeError("@@toPrimitive must return a primitive value.")}return(et==="string"?String:Number)(tt)}var Scatter=function(tt){_inherits$2(nt,tt);var et=_createSuper$2(nt);function nt(){var rt;_classCallCheck$3(this,nt);for(var it=arguments.length,ot=new Array(it),at=0;at-1?it[ot?et[at]:at]:void 0}}var _createFind=createFind$1,toFinite=toFinite_1;function toInteger$1(tt){var et=toFinite(tt),nt=et%1;return et===et?nt?et-nt:et:0}var toInteger_1=toInteger$1,baseFindIndex=_baseFindIndex,baseIteratee=_baseIteratee,toInteger=toInteger_1,nativeMax=Math.max;function findIndex$1(tt,et,nt){var rt=tt==null?0:tt.length;if(!rt)return-1;var it=nt==null?0:toInteger(nt);return it<0&&(it=nativeMax(rt+it,0)),baseFindIndex(tt,baseIteratee(et),it)}var findIndex_1=findIndex$1,createFind=_createFind,findIndex=findIndex_1,find$1=createFind(findIndex),find_1=find$1;const _find=getDefaultExportFromCjs(find_1);var prefix="Invariant failed";function invariant(tt,et){if(!tt)throw new Error(prefix)}function getRadialCursorPoints(tt){var et=tt.cx,nt=tt.cy,rt=tt.radius,it=tt.startAngle,ot=tt.endAngle,at=polarToCartesian(et,nt,rt,it),st=polarToCartesian(et,nt,rt,ot);return{points:[at,st],cx:et,cy:nt,radius:rt,startAngle:it,endAngle:ot}}function _toConsumableArray$2(tt){return _arrayWithoutHoles$2(tt)||_iterableToArray$2(tt)||_unsupportedIterableToArray$4(tt)||_nonIterableSpread$2()}function _nonIterableSpread$2(){throw new TypeError(`Invalid attempt to spread non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _unsupportedIterableToArray$4(tt,et){if(tt){if(typeof tt=="string")return _arrayLikeToArray$4(tt,et);var nt=Object.prototype.toString.call(tt).slice(8,-1);if(nt==="Object"&&tt.constructor&&(nt=tt.constructor.name),nt==="Map"||nt==="Set")return Array.from(tt);if(nt==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(nt))return _arrayLikeToArray$4(tt,et)}}function _iterableToArray$2(tt){if(typeof Symbol<"u"&&tt[Symbol.iterator]!=null||tt["@@iterator"]!=null)return Array.from(tt)}function _arrayWithoutHoles$2(tt){if(Array.isArray(tt))return _arrayLikeToArray$4(tt)}function _arrayLikeToArray$4(tt,et){(et==null||et>tt.length)&&(et=tt.length);for(var nt=0,rt=new Array(et);nt=0)&&Object.prototype.propertyIsEnumerable.call(tt,rt)&&(nt[rt]=tt[rt])}return nt}function _objectWithoutPropertiesLoose(tt,et){if(tt==null)return{};var nt={},rt=Object.keys(tt),it,ot;for(ot=0;ot=0)&&(nt[it]=tt[it]);return nt}function _classCallCheck$1(tt,et){if(!(tt instanceof et))throw new TypeError("Cannot call a class as a function")}function _defineProperties$1(tt,et){for(var nt=0;nt"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function _getPrototypeOf$1(tt){return _getPrototypeOf$1=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(nt){return nt.__proto__||Object.getPrototypeOf(nt)},_getPrototypeOf$1(tt)}function _toConsumableArray$1(tt){return _arrayWithoutHoles$1(tt)||_iterableToArray$1(tt)||_unsupportedIterableToArray$3(tt)||_nonIterableSpread$1()}function _nonIterableSpread$1(){throw new TypeError(`Invalid attempt to spread non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _unsupportedIterableToArray$3(tt,et){if(tt){if(typeof tt=="string")return _arrayLikeToArray$3(tt,et);var nt=Object.prototype.toString.call(tt).slice(8,-1);if(nt==="Object"&&tt.constructor&&(nt=tt.constructor.name),nt==="Map"||nt==="Set")return Array.from(tt);if(nt==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(nt))return _arrayLikeToArray$3(tt,et)}}function _iterableToArray$1(tt){if(typeof Symbol<"u"&&tt[Symbol.iterator]!=null||tt["@@iterator"]!=null)return Array.from(tt)}function _arrayWithoutHoles$1(tt){if(Array.isArray(tt))return _arrayLikeToArray$3(tt)}function _arrayLikeToArray$3(tt,et){(et==null||et>tt.length)&&(et=tt.length);for(var nt=0,rt=new Array(et);nt0?st:rt&&rt.props&&rt.props.data&&rt.props.data.length>0?rt.props.data:et&&et.length&&isNumber(ot)&&isNumber(at)?et.slice(ot,at+1):[]};function getDefaultDomainByAxisType(tt){return tt==="number"?[0,"auto"]:void 0}var getTooltipContent=function(et,nt,rt,it){var ot=et.graphicalItems,at=et.tooltipAxis,st=getDisplayedData(nt,et);return rt<0||!ot||!ot.length||rt>=st.length?null:ot.reduce(function(lt,ct){var ut=ct.props.hide;if(ut)return lt;var ht=ct.props.data,dt=ht===void 0?nt:ht,pt;if(at.dataKey&&!at.allowDuplicatedCategory){var mt=dt===void 0?st:dt;pt=findEntryInArray(mt,at.dataKey,it)}else pt=dt&&dt[rt]||st[rt];return pt?[].concat(_toConsumableArray$1(lt),[getTooltipItem(ct,pt)]):lt},[])},getTooltipData=function(et,nt,rt,it){var ot=it||{x:et.chartX,y:et.chartY},at=calculateTooltipPos(ot,rt),st=et.orderedTooltipTicks,lt=et.tooltipAxis,ct=et.tooltipTicks,ut=calculateActiveTickIndex(at,st,ct,lt);if(ut>=0&&ct){var ht=ct[ut]&&ct[ut].value,dt=getTooltipContent(et,nt,ut,ht),pt=getActiveCoordinate(rt,st,ut,ot);return{activeTooltipIndex:ut,activeLabel:ht,activePayload:dt,activeCoordinate:pt}}return null},getAxisMapByAxes=function(et,nt){var rt=nt.axes,it=nt.graphicalItems,ot=nt.axisType,at=nt.axisIdKey,st=nt.stackGroups,lt=nt.dataStartIndex,ct=nt.dataEndIndex,ut=et.layout,ht=et.children,dt=et.stackOffset,pt=isCategoricalAxis(ut,ot),mt=rt.reduce(function(gt,yt){var bt,vt=yt.props,xt=vt.type,kt=vt.dataKey,St=vt.allowDataOverflow,Tt=vt.allowDuplicatedCategory,At=vt.scale,Et=vt.ticks,$t=vt.includeHidden,Dt=yt.props[at];if(gt[Dt])return gt;var jt=getDisplayedData(et.data,{graphicalItems:it.filter(function(Ht){return Ht.props[at]===Dt}),dataStartIndex:lt,dataEndIndex:ct}),Pt=jt.length,Ct,wt,It;isDomainSpecifiedByUser(yt.props.domain,St,xt)&&(Ct=parseSpecifiedDomain(yt.props.domain,null,St),pt&&(xt==="number"||At!=="auto")&&(It=getDomainOfDataByKey(jt,kt,"category")));var Ot=getDefaultDomainByAxisType(xt);if(!Ct||Ct.length===0){var Wt,zt=(Wt=yt.props.domain)!==null&&Wt!==void 0?Wt:Ot;if(kt){if(Ct=getDomainOfDataByKey(jt,kt,xt),xt==="category"&&pt){var Ft=hasDuplicate(Ct);Tt&&Ft?(wt=Ct,Ct=_range(0,Pt)):Tt||(Ct=parseDomainOfCategoryAxis(zt,Ct,yt).reduce(function(Ht,en){return Ht.indexOf(en)>=0?Ht:[].concat(_toConsumableArray$1(Ht),[en])},[]))}else if(xt==="category")Tt?Ct=Ct.filter(function(Ht){return Ht!==""&&!_isNil(Ht)}):Ct=parseDomainOfCategoryAxis(zt,Ct,yt).reduce(function(Ht,en){return Ht.indexOf(en)>=0||en===""||_isNil(en)?Ht:[].concat(_toConsumableArray$1(Ht),[en])},[]);else if(xt==="number"){var Nt=parseErrorBarsOfAxis(jt,it.filter(function(Ht){return Ht.props[at]===Dt&&($t||!Ht.props.hide)}),kt,ot,ut);Nt&&(Ct=Nt)}pt&&(xt==="number"||At!=="auto")&&(It=getDomainOfDataByKey(jt,kt,"category"))}else pt?Ct=_range(0,Pt):st&&st[Dt]&&st[Dt].hasStack&&xt==="number"?Ct=dt==="expand"?[0,1]:getDomainOfStackGroups(st[Dt].stackGroups,lt,ct):Ct=getDomainOfItemsWithSameAxis(jt,it.filter(function(Ht){return Ht.props[at]===Dt&&($t||!Ht.props.hide)}),xt,ut,!0);if(xt==="number")Ct=detectReferenceElementsDomain(ht,Ct,Dt,ot,Et),zt&&(Ct=parseSpecifiedDomain(zt,Ct,St));else if(xt==="category"&&zt){var Ut=zt,Mt=Ct.every(function(Ht){return Ut.indexOf(Ht)>=0});Mt&&(Ct=Ut)}}return _objectSpread$1(_objectSpread$1({},gt),{},_defineProperty$1({},Dt,_objectSpread$1(_objectSpread$1({},yt.props),{},{axisType:ot,domain:Ct,categoricalDomain:It,duplicateDomain:wt,originalDomain:(bt=yt.props.domain)!==null&&bt!==void 0?bt:Ot,isCategorical:pt,layout:ut})))},{});return mt},getAxisMapByItems=function(et,nt){var rt=nt.graphicalItems,it=nt.Axis,ot=nt.axisType,at=nt.axisIdKey,st=nt.stackGroups,lt=nt.dataStartIndex,ct=nt.dataEndIndex,ut=et.layout,ht=et.children,dt=getDisplayedData(et.data,{graphicalItems:rt,dataStartIndex:lt,dataEndIndex:ct}),pt=dt.length,mt=isCategoricalAxis(ut,ot),gt=-1,yt=rt.reduce(function(bt,vt){var xt=vt.props[at],kt=getDefaultDomainByAxisType("number");if(!bt[xt]){gt++;var St;return mt?St=_range(0,pt):st&&st[xt]&&st[xt].hasStack?(St=getDomainOfStackGroups(st[xt].stackGroups,lt,ct),St=detectReferenceElementsDomain(ht,St,xt,ot)):(St=parseSpecifiedDomain(kt,getDomainOfItemsWithSameAxis(dt,rt.filter(function(Tt){return Tt.props[at]===xt&&!Tt.props.hide}),"number",ut),it.defaultProps.allowDataOverflow),St=detectReferenceElementsDomain(ht,St,xt,ot)),_objectSpread$1(_objectSpread$1({},bt),{},_defineProperty$1({},xt,_objectSpread$1(_objectSpread$1({axisType:ot},it.defaultProps),{},{hide:!0,orientation:_get(ORIENT_MAP,"".concat(ot,".").concat(gt%2),null),domain:St,originalDomain:kt,isCategorical:mt,layout:ut})))}return bt},{});return yt},getAxisMap=function(et,nt){var rt=nt.axisType,it=rt===void 0?"xAxis":rt,ot=nt.AxisComp,at=nt.graphicalItems,st=nt.stackGroups,lt=nt.dataStartIndex,ct=nt.dataEndIndex,ut=et.children,ht="".concat(it,"Id"),dt=findAllByType(ut,ot),pt={};return dt&&dt.length?pt=getAxisMapByAxes(et,{axes:dt,graphicalItems:at,axisType:it,axisIdKey:ht,stackGroups:st,dataStartIndex:lt,dataEndIndex:ct}):at&&at.length&&(pt=getAxisMapByItems(et,{Axis:ot,graphicalItems:at,axisType:it,axisIdKey:ht,stackGroups:st,dataStartIndex:lt,dataEndIndex:ct})),pt},tooltipTicksGenerator=function(et){var nt=getAnyElementOfObject(et),rt=getTicksOfAxis(nt,!1,!0);return{tooltipTicks:rt,orderedTooltipTicks:_sortBy(rt,function(it){return it.coordinate}),tooltipAxis:nt,tooltipAxisBandSize:getBandSizeOfAxis(nt,rt)}},createDefaultState=function(et){var nt,rt,it=et.children,ot=et.defaultShowTooltip,at=findChildByType(it,Brush),st=at&&at.props&&at.props.startIndex||0,lt=(at==null||(nt=at.props)===null||nt===void 0?void 0:nt.endIndex)!==void 0?at==null||(rt=at.props)===null||rt===void 0?void 0:rt.endIndex:et.data&&et.data.length-1||0;return{chartX:0,chartY:0,dataStartIndex:st,dataEndIndex:lt,activeTooltipIndex:-1,isTooltipActive:_isNil(ot)?!1:ot}},hasGraphicalBarItem=function(et){return!et||!et.length?!1:et.some(function(nt){var rt=getDisplayName(nt&&nt.type);return rt&&rt.indexOf("Bar")>=0})},getAxisNameByLayout=function(et){return et==="horizontal"?{numericAxisName:"yAxis",cateAxisName:"xAxis"}:et==="vertical"?{numericAxisName:"xAxis",cateAxisName:"yAxis"}:et==="centric"?{numericAxisName:"radiusAxis",cateAxisName:"angleAxis"}:{numericAxisName:"angleAxis",cateAxisName:"radiusAxis"}},calculateOffset=function(et,nt){var rt=et.props,it=et.graphicalItems,ot=et.xAxisMap,at=ot===void 0?{}:ot,st=et.yAxisMap,lt=st===void 0?{}:st,ct=rt.width,ut=rt.height,ht=rt.children,dt=rt.margin||{},pt=findChildByType(ht,Brush),mt=findChildByType(ht,Legend),gt=Object.keys(lt).reduce(function(xt,kt){var St=lt[kt],Tt=St.orientation;return!St.mirror&&!St.hide?_objectSpread$1(_objectSpread$1({},xt),{},_defineProperty$1({},Tt,xt[Tt]+St.width)):xt},{left:dt.left||0,right:dt.right||0}),yt=Object.keys(at).reduce(function(xt,kt){var St=at[kt],Tt=St.orientation;return!St.mirror&&!St.hide?_objectSpread$1(_objectSpread$1({},xt),{},_defineProperty$1({},Tt,_get(xt,"".concat(Tt))+St.height)):xt},{top:dt.top||0,bottom:dt.bottom||0}),bt=_objectSpread$1(_objectSpread$1({},yt),gt),vt=bt.bottom;return pt&&(bt.bottom+=pt.props.height||Brush.defaultProps.height),mt&&nt&&(bt=appendOffsetOfLegend(bt,it,rt,nt)),_objectSpread$1(_objectSpread$1({brushBottom:vt},bt),{},{width:ct-bt.left-bt.right,height:ut-bt.top-bt.bottom})},generateCategoricalChart=function(et){var nt,rt=et.chartName,it=et.GraphicalChild,ot=et.defaultTooltipEventType,at=ot===void 0?"axis":ot,st=et.validateTooltipEventTypes,lt=st===void 0?["axis"]:st,ct=et.axisComponents,ut=et.legendContent,ht=et.formatAxisMap,dt=et.defaultProps,pt=function(yt,bt){var vt=bt.graphicalItems,xt=bt.stackGroups,kt=bt.offset,St=bt.updateId,Tt=bt.dataStartIndex,At=bt.dataEndIndex,Et=yt.barSize,$t=yt.layout,Dt=yt.barGap,jt=yt.barCategoryGap,Pt=yt.maxBarSize,Ct=getAxisNameByLayout($t),wt=Ct.numericAxisName,It=Ct.cateAxisName,Ot=hasGraphicalBarItem(vt),Wt=Ot&&getBarSizeList({barSize:Et,stackGroups:xt}),zt=[];return vt.forEach(function(Ft,Nt){var Ut=getDisplayedData(yt.data,{dataStartIndex:Tt,dataEndIndex:At},Ft),Mt=Ft.props,Ht=Mt.dataKey,en=Mt.maxBarSize,sn=Ft.props["".concat(wt,"Id")],Kt=Ft.props["".concat(It,"Id")],rn={},nn=ct.reduce(function(An,wn){var fn,pn=bt["".concat(wn.axisType,"Map")],kn=Ft.props["".concat(wn.axisType,"Id")];pn&&pn[kn]||wn.axisType==="zAxis"||invariant(!1);var Dn=pn[kn];return _objectSpread$1(_objectSpread$1({},An),{},(fn={},_defineProperty$1(fn,wn.axisType,Dn),_defineProperty$1(fn,"".concat(wn.axisType,"Ticks"),getTicksOfAxis(Dn)),fn))},rn),hn=nn[It],vn=nn["".concat(It,"Ticks")],an=xt&&xt[sn]&&xt[sn].hasStack&&getStackedDataOfItem(Ft,xt[sn].stackGroups),Qt=getDisplayName(Ft.type).indexOf("Bar")>=0,_n=getBandSizeOfAxis(hn,vn),Pn=[];if(Qt){var $n,Nn,Tn=_isNil(en)?Pt:en,cn=($n=(Nn=getBandSizeOfAxis(hn,vn,!0))!==null&&Nn!==void 0?Nn:Tn)!==null&&$n!==void 0?$n:0;Pn=getBarPosition({barGap:Dt,barCategoryGap:jt,bandSize:cn!==_n?cn:_n,sizeList:Wt[Kt],maxBarSize:Tn}),cn!==_n&&(Pn=Pn.map(function(An){return _objectSpread$1(_objectSpread$1({},An),{},{position:_objectSpread$1(_objectSpread$1({},An.position),{},{offset:An.position.offset-cn/2})})}))}var mn=Ft&&Ft.type&&Ft.type.getComposedData;if(mn){var In;zt.push({props:_objectSpread$1(_objectSpread$1({},mn(_objectSpread$1(_objectSpread$1({},nn),{},{displayedData:Ut,props:yt,dataKey:Ht,item:Ft,bandSize:_n,barPosition:Pn,offset:kt,stackedData:an,layout:$t,dataStartIndex:Tt,dataEndIndex:At}))),{},(In={key:Ft.key||"item-".concat(Nt)},_defineProperty$1(In,wt,nn[wt]),_defineProperty$1(In,It,nn[It]),_defineProperty$1(In,"animationId",St),In)),childIndex:parseChildIndex(Ft,yt.children),item:Ft})}}),zt},mt=function(yt,bt){var vt=yt.props,xt=yt.dataStartIndex,kt=yt.dataEndIndex,St=yt.updateId;if(!validateWidthHeight({props:vt}))return null;var Tt=vt.children,At=vt.layout,Et=vt.stackOffset,$t=vt.data,Dt=vt.reverseStackOrder,jt=getAxisNameByLayout(At),Pt=jt.numericAxisName,Ct=jt.cateAxisName,wt=findAllByType(Tt,it),It=getStackGroupsByAxisId($t,wt,"".concat(Pt,"Id"),"".concat(Ct,"Id"),Et,Dt),Ot=ct.reduce(function(Ut,Mt){var Ht="".concat(Mt.axisType,"Map");return _objectSpread$1(_objectSpread$1({},Ut),{},_defineProperty$1({},Ht,getAxisMap(vt,_objectSpread$1(_objectSpread$1({},Mt),{},{graphicalItems:wt,stackGroups:Mt.axisType===Pt&&It,dataStartIndex:xt,dataEndIndex:kt}))))},{}),Wt=calculateOffset(_objectSpread$1(_objectSpread$1({},Ot),{},{props:vt,graphicalItems:wt}),bt==null?void 0:bt.legendBBox);Object.keys(Ot).forEach(function(Ut){Ot[Ut]=ht(vt,Ot[Ut],Wt,Ut.replace("Map",""),rt)});var zt=Ot["".concat(Ct,"Map")],Ft=tooltipTicksGenerator(zt),Nt=pt(vt,_objectSpread$1(_objectSpread$1({},Ot),{},{dataStartIndex:xt,dataEndIndex:kt,updateId:St,graphicalItems:wt,stackGroups:It,offset:Wt}));return _objectSpread$1(_objectSpread$1({formattedGraphicalItems:Nt,graphicalItems:wt,offset:Wt,stackGroups:It},Ft),Ot)};return nt=function(gt){_inherits$1(bt,gt);var yt=_createSuper$1(bt);function bt(vt){var xt;return _classCallCheck$1(this,bt),xt=yt.call(this,vt),_defineProperty$1(_assertThisInitialized$1(xt),"accessibilityManager",new AccessibilityManager),_defineProperty$1(_assertThisInitialized$1(xt),"clearDefer",function(){xt.cancelDefer&&(xt.cancelDefer(),xt.cancelDefer=null)}),_defineProperty$1(_assertThisInitialized$1(xt),"handleLegendBBoxUpdate",function(kt){if(kt){var St=xt.state,Tt=St.dataStartIndex,At=St.dataEndIndex,Et=St.updateId;xt.setState(_objectSpread$1({legendBBox:kt},mt({props:xt.props,dataStartIndex:Tt,dataEndIndex:At,updateId:Et},_objectSpread$1(_objectSpread$1({},xt.state),{},{legendBBox:kt}))))}}),_defineProperty$1(_assertThisInitialized$1(xt),"handleReceiveSyncEvent",function(kt,St,Tt){var At=xt.props.syncId;At===kt&&St!==xt.uniqueChartId&&(xt.clearDefer(),xt.cancelDefer=deferer(xt.applySyncEvent.bind(_assertThisInitialized$1(xt),Tt)))}),_defineProperty$1(_assertThisInitialized$1(xt),"handleBrushChange",function(kt){var St=kt.startIndex,Tt=kt.endIndex;if(St!==xt.state.dataStartIndex||Tt!==xt.state.dataEndIndex){var At=xt.state.updateId;xt.setState(function(){return _objectSpread$1({dataStartIndex:St,dataEndIndex:Tt},mt({props:xt.props,dataStartIndex:St,dataEndIndex:Tt,updateId:At},xt.state))}),xt.triggerSyncEvent({dataStartIndex:St,dataEndIndex:Tt})}}),_defineProperty$1(_assertThisInitialized$1(xt),"handleMouseEnter",function(kt){var St=xt.props.onMouseEnter,Tt=xt.getMouseInfo(kt);if(Tt){var At=_objectSpread$1(_objectSpread$1({},Tt),{},{isTooltipActive:!0});xt.setState(At),xt.triggerSyncEvent(At),_isFunction$1(St)&&St(At,kt)}}),_defineProperty$1(_assertThisInitialized$1(xt),"triggeredAfterMouseMove",function(kt){var St=xt.props.onMouseMove,Tt=xt.getMouseInfo(kt),At=Tt?_objectSpread$1(_objectSpread$1({},Tt),{},{isTooltipActive:!0}):{isTooltipActive:!1};xt.setState(At),xt.triggerSyncEvent(At),_isFunction$1(St)&&St(At,kt)}),_defineProperty$1(_assertThisInitialized$1(xt),"handleItemMouseEnter",function(kt){xt.setState(function(){return{isTooltipActive:!0,activeItem:kt,activePayload:kt.tooltipPayload,activeCoordinate:kt.tooltipPosition||{x:kt.cx,y:kt.cy}}})}),_defineProperty$1(_assertThisInitialized$1(xt),"handleItemMouseLeave",function(){xt.setState(function(){return{isTooltipActive:!1}})}),_defineProperty$1(_assertThisInitialized$1(xt),"handleMouseMove",function(kt){kt&&_isFunction$1(kt.persist)&&kt.persist(),xt.triggeredAfterMouseMove(kt)}),_defineProperty$1(_assertThisInitialized$1(xt),"handleMouseLeave",function(kt){var St=xt.props.onMouseLeave,Tt={isTooltipActive:!1};xt.setState(Tt),xt.triggerSyncEvent(Tt),_isFunction$1(St)&&St(Tt,kt),xt.cancelThrottledTriggerAfterMouseMove()}),_defineProperty$1(_assertThisInitialized$1(xt),"handleOuterEvent",function(kt){var St=getReactEventByType(kt),Tt=_get(xt.props,"".concat(St));if(St&&_isFunction$1(Tt)){var At;/.*touch.*/i.test(St)?At=xt.getMouseInfo(kt.changedTouches[0]):At=xt.getMouseInfo(kt);var Et=Tt;Et(At,kt)}}),_defineProperty$1(_assertThisInitialized$1(xt),"handleClick",function(kt){var St=xt.props.onClick,Tt=xt.getMouseInfo(kt);if(Tt){var At=_objectSpread$1(_objectSpread$1({},Tt),{},{isTooltipActive:!0});xt.setState(At),xt.triggerSyncEvent(At),_isFunction$1(St)&&St(At,kt)}}),_defineProperty$1(_assertThisInitialized$1(xt),"handleMouseDown",function(kt){var St=xt.props.onMouseDown;if(_isFunction$1(St)){var Tt=xt.getMouseInfo(kt);St(Tt,kt)}}),_defineProperty$1(_assertThisInitialized$1(xt),"handleMouseUp",function(kt){var St=xt.props.onMouseUp;if(_isFunction$1(St)){var Tt=xt.getMouseInfo(kt);St(Tt,kt)}}),_defineProperty$1(_assertThisInitialized$1(xt),"handleTouchMove",function(kt){kt.changedTouches!=null&&kt.changedTouches.length>0&&xt.handleMouseMove(kt.changedTouches[0])}),_defineProperty$1(_assertThisInitialized$1(xt),"handleTouchStart",function(kt){kt.changedTouches!=null&&kt.changedTouches.length>0&&xt.handleMouseDown(kt.changedTouches[0])}),_defineProperty$1(_assertThisInitialized$1(xt),"handleTouchEnd",function(kt){kt.changedTouches!=null&&kt.changedTouches.length>0&&xt.handleMouseUp(kt.changedTouches[0])}),_defineProperty$1(_assertThisInitialized$1(xt),"verticalCoordinatesGenerator",function(kt,St){var Tt=kt.xAxis,At=kt.width,Et=kt.height,$t=kt.offset;return getCoordinatesOfGrid(getTicks(_objectSpread$1(_objectSpread$1(_objectSpread$1({},CartesianAxis.defaultProps),Tt),{},{ticks:getTicksOfAxis(Tt,!0),viewBox:{x:0,y:0,width:At,height:Et}})),$t.left,$t.left+$t.width,St)}),_defineProperty$1(_assertThisInitialized$1(xt),"horizontalCoordinatesGenerator",function(kt,St){var Tt=kt.yAxis,At=kt.width,Et=kt.height,$t=kt.offset;return getCoordinatesOfGrid(getTicks(_objectSpread$1(_objectSpread$1(_objectSpread$1({},CartesianAxis.defaultProps),Tt),{},{ticks:getTicksOfAxis(Tt,!0),viewBox:{x:0,y:0,width:At,height:Et}})),$t.top,$t.top+$t.height,St)}),_defineProperty$1(_assertThisInitialized$1(xt),"axesTicksGenerator",function(kt){return getTicksOfAxis(kt,!0)}),_defineProperty$1(_assertThisInitialized$1(xt),"renderCursor",function(kt){var St=xt.state,Tt=St.isTooltipActive,At=St.activeCoordinate,Et=St.activePayload,$t=St.offset,Dt=St.activeTooltipIndex,jt=St.tooltipAxisBandSize,Pt=xt.getTooltipEventType();if(!kt||!kt.props.cursor||!Tt||!At||rt!=="ScatterChart"&&Pt!=="axis")return null;var Ct=xt.props.layout,wt,It=Curve;if(rt==="ScatterChart")wt=At,It=Cross;else if(rt==="BarChart")wt=getCursorRectangle(Ct,At,$t,jt),It=Rectangle;else if(Ct==="radial"){var Ot=getRadialCursorPoints(At),Wt=Ot.cx,zt=Ot.cy,Ft=Ot.radius,Nt=Ot.startAngle,Ut=Ot.endAngle;wt={cx:Wt,cy:zt,startAngle:Nt,endAngle:Ut,innerRadius:Ft,outerRadius:Ft},It=Sector}else wt={points:getCursorPoints(Ct,At,$t)},It=Curve;var Mt=kt.key||"_recharts-cursor",Ht=_objectSpread$1(_objectSpread$1(_objectSpread$1(_objectSpread$1({stroke:"#ccc",pointerEvents:"none"},$t),wt),filterProps(kt.props.cursor)),{},{payload:Et,payloadIndex:Dt,key:Mt,className:"recharts-tooltip-cursor"});return reactExports.isValidElement(kt.props.cursor)?reactExports.cloneElement(kt.props.cursor,Ht):reactExports.createElement(It,Ht)}),_defineProperty$1(_assertThisInitialized$1(xt),"renderPolarAxis",function(kt,St,Tt){var At=_get(kt,"type.axisType"),Et=_get(xt.state,"".concat(At,"Map")),$t=Et&&Et[kt.props["".concat(At,"Id")]];return reactExports.cloneElement(kt,_objectSpread$1(_objectSpread$1({},$t),{},{className:At,key:kt.key||"".concat(St,"-").concat(Tt),ticks:getTicksOfAxis($t,!0)}))}),_defineProperty$1(_assertThisInitialized$1(xt),"renderXAxis",function(kt,St,Tt){var At=xt.state.xAxisMap,Et=At[kt.props.xAxisId];return xt.renderAxis(Et,kt,St,Tt)}),_defineProperty$1(_assertThisInitialized$1(xt),"renderYAxis",function(kt,St,Tt){var At=xt.state.yAxisMap,Et=At[kt.props.yAxisId];return xt.renderAxis(Et,kt,St,Tt)}),_defineProperty$1(_assertThisInitialized$1(xt),"renderGrid",function(kt){var St=xt.state,Tt=St.xAxisMap,At=St.yAxisMap,Et=St.offset,$t=xt.props,Dt=$t.width,jt=$t.height,Pt=getAnyElementOfObject(Tt),Ct=_find(At,function(Ot){return _every(Ot.domain,isFinit)}),wt=Ct||getAnyElementOfObject(At),It=kt.props||{};return reactExports.cloneElement(kt,{key:kt.key||"grid",x:isNumber(It.x)?It.x:Et.left,y:isNumber(It.y)?It.y:Et.top,width:isNumber(It.width)?It.width:Et.width,height:isNumber(It.height)?It.height:Et.height,xAxis:Pt,yAxis:wt,offset:Et,chartWidth:Dt,chartHeight:jt,verticalCoordinatesGenerator:It.verticalCoordinatesGenerator||xt.verticalCoordinatesGenerator,horizontalCoordinatesGenerator:It.horizontalCoordinatesGenerator||xt.horizontalCoordinatesGenerator})}),_defineProperty$1(_assertThisInitialized$1(xt),"renderPolarGrid",function(kt){var St=kt.props,Tt=St.radialLines,At=St.polarAngles,Et=St.polarRadius,$t=xt.state,Dt=$t.radiusAxisMap,jt=$t.angleAxisMap,Pt=getAnyElementOfObject(Dt),Ct=getAnyElementOfObject(jt),wt=Ct.cx,It=Ct.cy,Ot=Ct.innerRadius,Wt=Ct.outerRadius;return reactExports.cloneElement(kt,{polarAngles:_isArray$1(At)?At:getTicksOfAxis(Ct,!0).map(function(zt){return zt.coordinate}),polarRadius:_isArray$1(Et)?Et:getTicksOfAxis(Pt,!0).map(function(zt){return zt.coordinate}),cx:wt,cy:It,innerRadius:Ot,outerRadius:Wt,key:kt.key||"polar-grid",radialLines:Tt})}),_defineProperty$1(_assertThisInitialized$1(xt),"renderLegend",function(){var kt=xt.state.formattedGraphicalItems,St=xt.props,Tt=St.children,At=St.width,Et=St.height,$t=xt.props.margin||{},Dt=At-($t.left||0)-($t.right||0),jt=getLegendProps({children:Tt,formattedGraphicalItems:kt,legendWidth:Dt,legendContent:ut});if(!jt)return null;var Pt=jt.item,Ct=_objectWithoutProperties(jt,_excluded);return reactExports.cloneElement(Pt,_objectSpread$1(_objectSpread$1({},Ct),{},{chartWidth:At,chartHeight:Et,margin:$t,onBBoxUpdate:xt.handleLegendBBoxUpdate}))}),_defineProperty$1(_assertThisInitialized$1(xt),"renderTooltip",function(){var kt=xt.props.children,St=findChildByType(kt,Tooltip);if(!St)return null;var Tt=xt.state,At=Tt.isTooltipActive,Et=Tt.activeCoordinate,$t=Tt.activePayload,Dt=Tt.activeLabel,jt=Tt.offset;return reactExports.cloneElement(St,{viewBox:_objectSpread$1(_objectSpread$1({},jt),{},{x:jt.left,y:jt.top}),active:At,label:Dt,payload:At?$t:[],coordinate:Et})}),_defineProperty$1(_assertThisInitialized$1(xt),"renderBrush",function(kt){var St=xt.props,Tt=St.margin,At=St.data,Et=xt.state,$t=Et.offset,Dt=Et.dataStartIndex,jt=Et.dataEndIndex,Pt=Et.updateId;return reactExports.cloneElement(kt,{key:kt.key||"_recharts-brush",onChange:combineEventHandlers(xt.handleBrushChange,null,kt.props.onChange),data:At,x:isNumber(kt.props.x)?kt.props.x:$t.left,y:isNumber(kt.props.y)?kt.props.y:$t.top+$t.height+$t.brushBottom-(Tt.bottom||0),width:isNumber(kt.props.width)?kt.props.width:$t.width,startIndex:Dt,endIndex:jt,updateId:"brush-".concat(Pt)})}),_defineProperty$1(_assertThisInitialized$1(xt),"renderReferenceElement",function(kt,St,Tt){if(!kt)return null;var At=_assertThisInitialized$1(xt),Et=At.clipPathId,$t=xt.state,Dt=$t.xAxisMap,jt=$t.yAxisMap,Pt=$t.offset,Ct=kt.props,wt=Ct.xAxisId,It=Ct.yAxisId;return reactExports.cloneElement(kt,{key:kt.key||"".concat(St,"-").concat(Tt),xAxis:Dt[wt],yAxis:jt[It],viewBox:{x:Pt.left,y:Pt.top,width:Pt.width,height:Pt.height},clipPathId:Et})}),_defineProperty$1(_assertThisInitialized$1(xt),"renderActivePoints",function(kt){var St=kt.item,Tt=kt.activePoint,At=kt.basePoint,Et=kt.childIndex,$t=kt.isRange,Dt=[],jt=St.props.key,Pt=St.item.props,Ct=Pt.activeDot,wt=Pt.dataKey,It=_objectSpread$1(_objectSpread$1({index:Et,dataKey:wt,cx:Tt.x,cy:Tt.y,r:4,fill:getMainColorOfGraphicItem(St.item),strokeWidth:2,stroke:"#fff",payload:Tt.payload,value:Tt.value,key:"".concat(jt,"-activePoint-").concat(Et)},filterProps(Ct)),adaptEventHandlers(Ct));return Dt.push(bt.renderActiveDot(Ct,It)),At?Dt.push(bt.renderActiveDot(Ct,_objectSpread$1(_objectSpread$1({},It),{},{cx:At.x,cy:At.y,key:"".concat(jt,"-basePoint-").concat(Et)}))):$t&&Dt.push(null),Dt}),_defineProperty$1(_assertThisInitialized$1(xt),"renderGraphicChild",function(kt,St,Tt){var At=xt.filterFormatItem(kt,St,Tt);if(!At)return null;var Et=xt.getTooltipEventType(),$t=xt.state,Dt=$t.isTooltipActive,jt=$t.tooltipAxis,Pt=$t.activeTooltipIndex,Ct=$t.activeLabel,wt=xt.props.children,It=findChildByType(wt,Tooltip),Ot=At.props,Wt=Ot.points,zt=Ot.isRange,Ft=Ot.baseLine,Nt=At.item.props,Ut=Nt.activeDot,Mt=Nt.hide,Ht=Nt.activeBar,en=Nt.activeShape,sn=!!(!Mt&&Dt&&It&&(Ut||Ht||en)),Kt={};Et!=="axis"&&It&&It.props.trigger==="click"?Kt={onClick:combineEventHandlers(xt.handleItemMouseEnter,null,kt.props.onCLick)}:Et!=="axis"&&(Kt={onMouseLeave:combineEventHandlers(xt.handleItemMouseLeave,null,kt.props.onMouseLeave),onMouseEnter:combineEventHandlers(xt.handleItemMouseEnter,null,kt.props.onMouseEnter)});var rn=reactExports.cloneElement(kt,_objectSpread$1(_objectSpread$1({},At.props),Kt));function nn(In){return typeof jt.dataKey=="function"?jt.dataKey(In.payload):null}if(sn)if(Pt>=0){var hn,vn;if(jt.dataKey&&!jt.allowDuplicatedCategory){var an=typeof jt.dataKey=="function"?nn:"payload.".concat(jt.dataKey.toString());hn=findEntryInArray(Wt,an,Ct),vn=zt&&Ft&&findEntryInArray(Ft,an,Ct)}else hn=Wt==null?void 0:Wt[Pt],vn=zt&&Ft&&Ft[Pt];if(en||Ht){var Qt=kt.props.activeIndex!==void 0?kt.props.activeIndex:Pt;return[reactExports.cloneElement(kt,_objectSpread$1(_objectSpread$1(_objectSpread$1({},At.props),Kt),{},{activeIndex:Qt})),null,null]}if(!_isNil(hn))return[rn].concat(_toConsumableArray$1(xt.renderActivePoints({item:At,activePoint:hn,basePoint:vn,childIndex:Pt,isRange:zt})))}else{var _n,Pn=(_n=xt.getItemByXY(xt.state.activeCoordinate))!==null&&_n!==void 0?_n:{graphicalItem:rn},$n=Pn.graphicalItem,Nn=$n.item,Tn=Nn===void 0?kt:Nn,cn=$n.childIndex,mn=_objectSpread$1(_objectSpread$1(_objectSpread$1({},At.props),Kt),{},{activeIndex:cn});return[reactExports.cloneElement(Tn,mn),null,null]}return zt?[rn,null,null]:[rn,null]}),_defineProperty$1(_assertThisInitialized$1(xt),"renderCustomized",function(kt,St,Tt){return reactExports.cloneElement(kt,_objectSpread$1(_objectSpread$1({key:"recharts-customized-".concat(Tt)},xt.props),xt.state))}),xt.uniqueChartId=_isNil(vt.id)?uniqueId("recharts"):vt.id,xt.clipPathId="".concat(xt.uniqueChartId,"-clip"),vt.throttleDelay&&(xt.triggeredAfterMouseMove=_throttle(xt.triggeredAfterMouseMove,vt.throttleDelay)),xt.state={},xt}return _createClass$1(bt,[{key:"componentDidMount",value:function(){var xt,kt;_isNil(this.props.syncId)||this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:(xt=this.props.margin.left)!==null&&xt!==void 0?xt:0,top:(kt=this.props.margin.top)!==null&&kt!==void 0?kt:0},coordinateList:this.state.tooltipTicks,mouseHandlerCallback:this.handleMouseMove,layout:this.props.layout})}},{key:"getSnapshotBeforeUpdate",value:function(xt,kt){if(!this.props.accessibilityLayer)return null;if(this.state.tooltipTicks!==kt.tooltipTicks&&this.accessibilityManager.setDetails({coordinateList:this.state.tooltipTicks}),this.props.layout!==xt.layout&&this.accessibilityManager.setDetails({layout:this.props.layout}),this.props.margin!==xt.margin){var St,Tt;this.accessibilityManager.setDetails({offset:{left:(St=this.props.margin.left)!==null&&St!==void 0?St:0,top:(Tt=this.props.margin.top)!==null&&Tt!==void 0?Tt:0}})}return null}},{key:"componentDidUpdate",value:function(xt){_isNil(xt.syncId)&&!_isNil(this.props.syncId)&&this.addListener(),!_isNil(xt.syncId)&&_isNil(this.props.syncId)&&this.removeListener()}},{key:"componentWillUnmount",value:function(){this.clearDefer(),_isNil(this.props.syncId)||this.removeListener(),this.cancelThrottledTriggerAfterMouseMove()}},{key:"cancelThrottledTriggerAfterMouseMove",value:function(){typeof this.triggeredAfterMouseMove.cancel=="function"&&this.triggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var xt=findChildByType(this.props.children,Tooltip);if(xt&&_isBoolean(xt.props.shared)){var kt=xt.props.shared?"axis":"item";return lt.indexOf(kt)>=0?kt:at}return at}},{key:"getMouseInfo",value:function(xt){var kt;if(!this.container)return null;var St=getOffset(this.container),Tt=calculateChartCoordinate(xt,St),At=this.container,Et=At==null||(kt=At.getBoundingClientRect())===null||kt===void 0?void 0:kt.width,$t=At.offsetWidth,Dt=Et/$t||1,jt=this.inRange(Tt.chartX,Tt.chartY,Dt);if(!jt)return null;var Pt=this.state,Ct=Pt.xAxisMap,wt=Pt.yAxisMap,It=this.getTooltipEventType();if(It!=="axis"&&Ct&&wt){var Ot=getAnyElementOfObject(Ct).scale,Wt=getAnyElementOfObject(wt).scale,zt=Ot&&Ot.invert?Ot.invert(Tt.chartX):null,Ft=Wt&&Wt.invert?Wt.invert(Tt.chartY):null;return _objectSpread$1(_objectSpread$1({},Tt),{},{xValue:zt,yValue:Ft})}var Nt=getTooltipData(this.state,this.props.data,this.props.layout,jt);return Nt?_objectSpread$1(_objectSpread$1({},Tt),Nt):null}},{key:"inRange",value:function(xt,kt){var St=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,Tt=this.props.layout,At=xt/St,Et=kt/St;if(Tt==="horizontal"||Tt==="vertical"){var $t=this.state.offset,Dt=At>=$t.left&&At<=$t.left+$t.width&&Et>=$t.top&&Et<=$t.top+$t.height;return Dt?{x:At,y:Et}:null}var jt=this.state,Pt=jt.angleAxisMap,Ct=jt.radiusAxisMap;if(Pt&&Ct){var wt=getAnyElementOfObject(Pt);return inRangeOfSector({x:At,y:Et},wt)}return null}},{key:"parseEventsOfWrapper",value:function(){var xt=this.props.children,kt=this.getTooltipEventType(),St=findChildByType(xt,Tooltip),Tt={};St&&kt==="axis"&&(St.props.trigger==="click"?Tt={onClick:this.handleClick}:Tt={onMouseEnter:this.handleMouseEnter,onMouseMove:this.handleMouseMove,onMouseLeave:this.handleMouseLeave,onTouchMove:this.handleTouchMove,onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd});var At=adaptEventHandlers(this.props,this.handleOuterEvent);return _objectSpread$1(_objectSpread$1({},At),Tt)}},{key:"addListener",value:function(){eventCenter.on(SYNC_EVENT,this.handleReceiveSyncEvent),eventCenter.setMaxListeners&&eventCenter._maxListeners&&eventCenter.setMaxListeners(eventCenter._maxListeners+1)}},{key:"removeListener",value:function(){eventCenter.removeListener(SYNC_EVENT,this.handleReceiveSyncEvent),eventCenter.setMaxListeners&&eventCenter._maxListeners&&eventCenter.setMaxListeners(eventCenter._maxListeners-1)}},{key:"triggerSyncEvent",value:function(xt){var kt=this.props.syncId;_isNil(kt)||eventCenter.emit(SYNC_EVENT,kt,this.uniqueChartId,xt)}},{key:"applySyncEvent",value:function(xt){var kt=this.props,St=kt.layout,Tt=kt.syncMethod,At=this.state.updateId,Et=xt.dataStartIndex,$t=xt.dataEndIndex;if(!_isNil(xt.dataStartIndex)||!_isNil(xt.dataEndIndex))this.setState(_objectSpread$1({dataStartIndex:Et,dataEndIndex:$t},mt({props:this.props,dataStartIndex:Et,dataEndIndex:$t,updateId:At},this.state)));else if(_isNil(xt.activeTooltipIndex))this.setState(xt);else{var Dt=xt.chartX,jt=xt.chartY,Pt=xt.activeTooltipIndex,Ct=this.state,wt=Ct.offset,It=Ct.tooltipTicks;if(!wt)return;if(typeof Tt=="function")Pt=Tt(It,xt);else if(Tt==="value"){Pt=-1;for(var Ot=0;OtjsxRuntimeExports.jsx(Dot,{cx:tt,cy:et,fill:colors.blueTextAccent,r:2}),SentimentChart=({data:tt,width:et=500,height:nt=300})=>jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:(tt==null?void 0:tt.length)&&jsxRuntimeExports.jsxs(LineChart,{data:tt,height:nt,id:"cy-sentiment-chart",margin:{bottom:5,left:-20,right:30,top:5},width:et,children:[jsxRuntimeExports.jsx(CartesianGrid,{stroke:colors.lightBlue300,strokeDasharray:"5 5"}),jsxRuntimeExports.jsx(XAxis,{dataKey:"date",interval:Math.floor(tt.length/3),stroke:colors.blueTextAccent}),jsxRuntimeExports.jsx(YAxis,{domain:[0,10],stroke:colors.blueTextAccent}),jsxRuntimeExports.jsx(Tooltip,{}),jsxRuntimeExports.jsx(Line,{dataKey:"score",dot:jsxRuntimeExports.jsx(RenderDot$1,{}),stroke:"#8884d8",type:"monotone"})]})}),SentimentAnalysis=reactExports.memo(()=>{const tt=useAppStore(mt=>mt.currentSearch),[et,nt]=reactExports.useState(void 0),rt=hooks().startOf("day"),it=hooks().subtract(1,"year"),ot=3600*24,[at]=useUserStore(mt=>[mt.setBudget]),[st,lt]=reactExports.useState(hooks().startOf("day").subtract(20,"day")),ct=(Math.round((rt.unix()-st.unix())/ot)+1)*50,[ut,ht]=reactExports.useState(!1),dt=async()=>{tt&&(ht(!0),await executeIfProd(()=>distExports$1.enable()),getSentimentData({topic:tt,cutoff_date:String(st.unix())}).then(async mt=>{console.log(mt==null?void 0:mt.data),nt(mt==null?void 0:mt.data.filter(gt=>gt.date).map(gt=>({date:hooks.unix(Number(String(gt.date).split(".")[0])).format("MM/DD/YY"),score:gt.sentiment_score}))),await updateBudget(at)}).catch(console.error).finally(()=>{ht(!1)}))},pt=reactExports.useRef(null);return jsxRuntimeExports.jsxs(Stack$5,{component:"div",flexGrow:1,p:1,spacing:2,width:"100%",children:[ut&&jsxRuntimeExports.jsx(Stack$5,{alignItems:"center",component:"div",flexGrow:1,p:4,spacing:2,width:"100%",children:jsxRuntimeExports.jsx(PropagateLoader,{color:colors.white})}),!ut&&jsxRuntimeExports.jsxs(ChartWrapper$1,{ref:pt,children:[jsxRuntimeExports.jsx(SentimentChart,{data:et,height:280,width:352}),Array.isArray(et)&&!ut&&!et.length&&jsxRuntimeExports.jsx(Text$3,{children:"No data for this period"})]}),jsxRuntimeExports.jsx(DatePicker,{format:"L",label:"From",maxDate:rt,minDate:it,onChange:mt=>lt(mt??hooks()),sx:{background:colors.inputBg1,color:"text.primary"},value:st}),jsxRuntimeExports.jsx(Slider$1,{component:"div",getAriaValueText:mt=>hooks(mt).format("L"),id:"cy-sentiment-analysis-slider",marks:!0,max:rt.unix(),min:it.unix(),onChange:(mt,gt)=>{lt(hooks.unix(gt))},step:ot,value:st.unix(),valueLabelDisplay:"auto",valueLabelFormat:mt=>hooks.unix(mt).format("L")}),jsxRuntimeExports.jsxs(StyledButton$1,{className:"button",id:"cy-get-sentiment-analysis-btn",onClick:dt,children:["Create a chart for ",ct.toFixed()," SATS"]})]})}),ChartWrapper$1=styled$4.div` - flex: 1 1 auto; - width: 100%; -`,StyledButton$1=styled$4(Button)` - height: 48px; -`,TABS=[{label:"Teach me",value:"teachMe"},{label:"Ask question",value:"askQuestion"},{label:"Sentiment Analysis",value:"sentiment"}],ActionsMenu=({onChange:tt,active:et})=>{const nt=(rt,it)=>{tt(TABS[it].value)};return et?jsxRuntimeExports.jsx(MenuWrapper,{direction:"row",id:"cy-helper-menu",maxWidth:"100%",mb:3,overflow:"auto",spacing:1,children:TABS.map((rt,it)=>jsxRuntimeExports.jsx(Chip$1,{color:rt.value===et?"primary":"default",component:"div",id:rt.value,label:rt.label,onClick:ot=>nt(ot,it)},rt.value))}):jsxRuntimeExports.jsx(Stack$5,{component:"div",flexGrow:1,id:"cy-helper-menu",justifyContent:"flex-end",mb:1,spacing:1,children:TABS.map((rt,it)=>jsxRuntimeExports.jsx(Chip$1,{component:"div",id:rt.value,label:rt.label,onClick:ot=>nt(ot,it)},rt.value))})},MenuWrapper=styled$1(Stack$5)(()=>({"&::-webkit-scrollbar":{width:"1px",height:"4px"},"&::-webkit-scrollbar-thumb":{width:"1px",height:"4px"}})),PACKET_TYPES=Object.create(null);PACKET_TYPES.open="0";PACKET_TYPES.close="1";PACKET_TYPES.ping="2";PACKET_TYPES.pong="3";PACKET_TYPES.message="4";PACKET_TYPES.upgrade="5";PACKET_TYPES.noop="6";const PACKET_TYPES_REVERSE=Object.create(null);Object.keys(PACKET_TYPES).forEach(tt=>{PACKET_TYPES_REVERSE[PACKET_TYPES[tt]]=tt});const ERROR_PACKET={type:"error",data:"parser error"},withNativeBlob$1=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",withNativeArrayBuffer$2=typeof ArrayBuffer=="function",isView$1=tt=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(tt):tt&&tt.buffer instanceof ArrayBuffer,encodePacket=({type:tt,data:et},nt,rt)=>withNativeBlob$1&&et instanceof Blob?nt?rt(et):encodeBlobAsBase64(et,rt):withNativeArrayBuffer$2&&(et instanceof ArrayBuffer||isView$1(et))?nt?rt(et):encodeBlobAsBase64(new Blob([et]),rt):rt(PACKET_TYPES[tt]+(et||"")),encodeBlobAsBase64=(tt,et)=>{const nt=new FileReader;return nt.onload=function(){const rt=nt.result.split(",")[1];et("b"+(rt||""))},nt.readAsDataURL(tt)};function toArray(tt){return tt instanceof Uint8Array?tt:tt instanceof ArrayBuffer?new Uint8Array(tt):new Uint8Array(tt.buffer,tt.byteOffset,tt.byteLength)}let TEXT_ENCODER;function encodePacketToBinary(tt,et){if(withNativeBlob$1&&tt.data instanceof Blob)return tt.data.arrayBuffer().then(toArray).then(et);if(withNativeArrayBuffer$2&&(tt.data instanceof ArrayBuffer||isView$1(tt.data)))return et(toArray(tt.data));encodePacket(tt,!1,nt=>{TEXT_ENCODER||(TEXT_ENCODER=new TextEncoder),et(TEXT_ENCODER.encode(nt))})}const chars="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",lookup$1=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let tt=0;tt{let et=tt.length*.75,nt=tt.length,rt,it=0,ot,at,st,lt;tt[tt.length-1]==="="&&(et--,tt[tt.length-2]==="="&&et--);const ct=new ArrayBuffer(et),ut=new Uint8Array(ct);for(rt=0;rt>4,ut[it++]=(at&15)<<4|st>>2,ut[it++]=(st&3)<<6|lt&63;return ct},withNativeArrayBuffer$1=typeof ArrayBuffer=="function",decodePacket=(tt,et)=>{if(typeof tt!="string")return{type:"message",data:mapBinary(tt,et)};const nt=tt.charAt(0);return nt==="b"?{type:"message",data:decodeBase64Packet(tt.substring(1),et)}:PACKET_TYPES_REVERSE[nt]?tt.length>1?{type:PACKET_TYPES_REVERSE[nt],data:tt.substring(1)}:{type:PACKET_TYPES_REVERSE[nt]}:ERROR_PACKET},decodeBase64Packet=(tt,et)=>{if(withNativeArrayBuffer$1){const nt=decode$1(tt);return mapBinary(nt,et)}else return{base64:!0,data:tt}},mapBinary=(tt,et)=>{switch(et){case"blob":return tt instanceof Blob?tt:new Blob([tt]);case"arraybuffer":default:return tt instanceof ArrayBuffer?tt:tt.buffer}},SEPARATOR=String.fromCharCode(30),encodePayload=(tt,et)=>{const nt=tt.length,rt=new Array(nt);let it=0;tt.forEach((ot,at)=>{encodePacket(ot,!1,st=>{rt[at]=st,++it===nt&&et(rt.join(SEPARATOR))})})},decodePayload=(tt,et)=>{const nt=tt.split(SEPARATOR),rt=[];for(let it=0;it{const rt=nt.length;let it;if(rt<126)it=new Uint8Array(1),new DataView(it.buffer).setUint8(0,rt);else if(rt<65536){it=new Uint8Array(3);const ot=new DataView(it.buffer);ot.setUint8(0,126),ot.setUint16(1,rt)}else{it=new Uint8Array(9);const ot=new DataView(it.buffer);ot.setUint8(0,127),ot.setBigUint64(1,BigInt(rt))}tt.data&&typeof tt.data!="string"&&(it[0]|=128),et.enqueue(it),et.enqueue(nt)})}})}let TEXT_DECODER;function totalLength(tt){return tt.reduce((et,nt)=>et+nt.length,0)}function concatChunks(tt,et){if(tt[0].length===et)return tt.shift();const nt=new Uint8Array(et);let rt=0;for(let it=0;itMath.pow(2,53-32)-1){st.enqueue(ERROR_PACKET);break}it=ut*Math.pow(2,32)+ct.getUint32(4),rt=3}else{if(totalLength(nt)tt){st.enqueue(ERROR_PACKET);break}}}})}const protocol$1=4;function Emitter(tt){if(tt)return mixin(tt)}function mixin(tt){for(var et in Emitter.prototype)tt[et]=Emitter.prototype[et];return tt}Emitter.prototype.on=Emitter.prototype.addEventListener=function(tt,et){return this._callbacks=this._callbacks||{},(this._callbacks["$"+tt]=this._callbacks["$"+tt]||[]).push(et),this};Emitter.prototype.once=function(tt,et){function nt(){this.off(tt,nt),et.apply(this,arguments)}return nt.fn=et,this.on(tt,nt),this};Emitter.prototype.off=Emitter.prototype.removeListener=Emitter.prototype.removeAllListeners=Emitter.prototype.removeEventListener=function(tt,et){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var nt=this._callbacks["$"+tt];if(!nt)return this;if(arguments.length==1)return delete this._callbacks["$"+tt],this;for(var rt,it=0;ittypeof self<"u"?self:typeof window<"u"?window:Function("return this")())();function pick(tt,...et){return et.reduce((nt,rt)=>(tt.hasOwnProperty(rt)&&(nt[rt]=tt[rt]),nt),{})}const NATIVE_SET_TIMEOUT=globalThisShim.setTimeout,NATIVE_CLEAR_TIMEOUT=globalThisShim.clearTimeout;function installTimerFunctions(tt,et){et.useNativeTimers?(tt.setTimeoutFn=NATIVE_SET_TIMEOUT.bind(globalThisShim),tt.clearTimeoutFn=NATIVE_CLEAR_TIMEOUT.bind(globalThisShim)):(tt.setTimeoutFn=globalThisShim.setTimeout.bind(globalThisShim),tt.clearTimeoutFn=globalThisShim.clearTimeout.bind(globalThisShim))}const BASE64_OVERHEAD=1.33;function byteLength(tt){return typeof tt=="string"?utf8Length(tt):Math.ceil((tt.byteLength||tt.size)*BASE64_OVERHEAD)}function utf8Length(tt){let et=0,nt=0;for(let rt=0,it=tt.length;rt=57344?nt+=3:(rt++,nt+=4);return nt}function encode$1(tt){let et="";for(let nt in tt)tt.hasOwnProperty(nt)&&(et.length&&(et+="&"),et+=encodeURIComponent(nt)+"="+encodeURIComponent(tt[nt]));return et}function decode(tt){let et={},nt=tt.split("&");for(let rt=0,it=nt.length;rt0);return et}function yeast(){const tt=encode(+new Date);return tt!==prev?(seed=0,prev=tt):tt+"."+encode(seed++)}for(;i{this.readyState="paused",et()};if(this.polling||!this.writable){let rt=0;this.polling&&(rt++,this.once("pollComplete",function(){--rt||nt()})),this.writable||(rt++,this.once("drain",function(){--rt||nt()}))}else nt()}poll(){this.polling=!0,this.doPoll(),this.emitReserved("poll")}onData(et){const nt=rt=>{if(this.readyState==="opening"&&rt.type==="open"&&this.onOpen(),rt.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(rt)};decodePayload(et,this.socket.binaryType).forEach(nt),this.readyState!=="closed"&&(this.polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this.poll())}doClose(){const et=()=>{this.write([{type:"close"}])};this.readyState==="open"?et():this.once("open",et)}write(et){this.writable=!1,encodePayload(et,nt=>{this.doWrite(nt,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const et=this.opts.secure?"https":"http",nt=this.query||{};return this.opts.timestampRequests!==!1&&(nt[this.opts.timestampParam]=yeast()),!this.supportsBinary&&!nt.sid&&(nt.b64=1),this.createUri(et,nt)}request(et={}){return Object.assign(et,{xd:this.xd,cookieJar:this.cookieJar},this.opts),new Request$1(this.uri(),et)}doWrite(et,nt){const rt=this.request({method:"POST",data:et});rt.on("success",nt),rt.on("error",(it,ot)=>{this.onError("xhr post error",it,ot)})}doPoll(){const et=this.request();et.on("data",this.onData.bind(this)),et.on("error",(nt,rt)=>{this.onError("xhr poll error",nt,rt)}),this.pollXhr=et}}let Request$1=class D0 extends Emitter{constructor(et,nt){super(),installTimerFunctions(this,nt),this.opts=nt,this.method=nt.method||"GET",this.uri=et,this.data=nt.data!==void 0?nt.data:null,this.create()}create(){var et;const nt=pick(this.opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");nt.xdomain=!!this.opts.xd;const rt=this.xhr=new XHR(nt);try{rt.open(this.method,this.uri,!0);try{if(this.opts.extraHeaders){rt.setDisableHeaderCheck&&rt.setDisableHeaderCheck(!0);for(let it in this.opts.extraHeaders)this.opts.extraHeaders.hasOwnProperty(it)&&rt.setRequestHeader(it,this.opts.extraHeaders[it])}}catch{}if(this.method==="POST")try{rt.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{rt.setRequestHeader("Accept","*/*")}catch{}(et=this.opts.cookieJar)===null||et===void 0||et.addCookies(rt),"withCredentials"in rt&&(rt.withCredentials=this.opts.withCredentials),this.opts.requestTimeout&&(rt.timeout=this.opts.requestTimeout),rt.onreadystatechange=()=>{var it;rt.readyState===3&&((it=this.opts.cookieJar)===null||it===void 0||it.parseCookies(rt)),rt.readyState===4&&(rt.status===200||rt.status===1223?this.onLoad():this.setTimeoutFn(()=>{this.onError(typeof rt.status=="number"?rt.status:0)},0))},rt.send(this.data)}catch(it){this.setTimeoutFn(()=>{this.onError(it)},0);return}typeof document<"u"&&(this.index=D0.requestsCount++,D0.requests[this.index]=this)}onError(et){this.emitReserved("error",et,this.xhr),this.cleanup(!0)}cleanup(et){if(!(typeof this.xhr>"u"||this.xhr===null)){if(this.xhr.onreadystatechange=empty$1,et)try{this.xhr.abort()}catch{}typeof document<"u"&&delete D0.requests[this.index],this.xhr=null}}onLoad(){const et=this.xhr.responseText;et!==null&&(this.emitReserved("data",et),this.emitReserved("success"),this.cleanup())}abort(){this.cleanup()}};Request$1.requestsCount=0;Request$1.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",unloadHandler);else if(typeof addEventListener=="function"){const tt="onpagehide"in globalThisShim?"pagehide":"unload";addEventListener(tt,unloadHandler,!1)}}function unloadHandler(){for(let tt in Request$1.requests)Request$1.requests.hasOwnProperty(tt)&&Request$1.requests[tt].abort()}const nextTick=(()=>typeof Promise=="function"&&typeof Promise.resolve=="function"?et=>Promise.resolve().then(et):(et,nt)=>nt(et,0))(),WebSocket=globalThisShim.WebSocket||globalThisShim.MozWebSocket,usingBrowserWebSocket=!0,defaultBinaryType="arraybuffer",isReactNative=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class WS extends Transport{constructor(et){super(et),this.supportsBinary=!et.forceBase64}get name(){return"websocket"}doOpen(){if(!this.check())return;const et=this.uri(),nt=this.opts.protocols,rt=isReactNative?{}:pick(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(rt.headers=this.opts.extraHeaders);try{this.ws=usingBrowserWebSocket&&!isReactNative?nt?new WebSocket(et,nt):new WebSocket(et):new WebSocket(et,nt,rt)}catch(it){return this.emitReserved("error",it)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=et=>this.onClose({description:"websocket connection closed",context:et}),this.ws.onmessage=et=>this.onData(et.data),this.ws.onerror=et=>this.onError("websocket error",et)}write(et){this.writable=!1;for(let nt=0;nt{const at={};try{usingBrowserWebSocket&&this.ws.send(ot)}catch{}it&&nextTick(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.close(),this.ws=null)}uri(){const et=this.opts.secure?"wss":"ws",nt=this.query||{};return this.opts.timestampRequests&&(nt[this.opts.timestampParam]=yeast()),this.supportsBinary||(nt.b64=1),this.createUri(et,nt)}check(){return!!WebSocket}}class WT extends Transport{get name(){return"webtransport"}doOpen(){typeof WebTransport=="function"&&(this.transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name]),this.transport.closed.then(()=>{this.onClose()}).catch(et=>{this.onError("webtransport error",et)}),this.transport.ready.then(()=>{this.transport.createBidirectionalStream().then(et=>{const nt=createPacketDecoderStream(Number.MAX_SAFE_INTEGER,this.socket.binaryType),rt=et.readable.pipeThrough(nt).getReader(),it=createPacketEncoderStream();it.readable.pipeTo(et.writable),this.writer=it.writable.getWriter();const ot=()=>{rt.read().then(({done:st,value:lt})=>{st||(this.onPacket(lt),ot())}).catch(st=>{})};ot();const at={type:"open"};this.query.sid&&(at.data=`{"sid":"${this.query.sid}"}`),this.writer.write(at).then(()=>this.onOpen())})}))}write(et){this.writable=!1;for(let nt=0;nt{it&&nextTick(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var et;(et=this.transport)===null||et===void 0||et.close()}}const transports={websocket:WS,webtransport:WT,polling:Polling},re=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,parts=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function parse(tt){const et=tt,nt=tt.indexOf("["),rt=tt.indexOf("]");nt!=-1&&rt!=-1&&(tt=tt.substring(0,nt)+tt.substring(nt,rt).replace(/:/g,";")+tt.substring(rt,tt.length));let it=re.exec(tt||""),ot={},at=14;for(;at--;)ot[parts[at]]=it[at]||"";return nt!=-1&&rt!=-1&&(ot.source=et,ot.host=ot.host.substring(1,ot.host.length-1).replace(/;/g,":"),ot.authority=ot.authority.replace("[","").replace("]","").replace(/;/g,":"),ot.ipv6uri=!0),ot.pathNames=pathNames(ot,ot.path),ot.queryKey=queryKey(ot,ot.query),ot}function pathNames(tt,et){const nt=/\/{2,9}/g,rt=et.replace(nt,"/").split("/");return(et.slice(0,1)=="/"||et.length===0)&&rt.splice(0,1),et.slice(-1)=="/"&&rt.splice(rt.length-1,1),rt}function queryKey(tt,et){const nt={};return et.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(rt,it,ot){it&&(nt[it]=ot)}),nt}let Socket$1=class Gm extends Emitter{constructor(et,nt={}){super(),this.binaryType=defaultBinaryType,this.writeBuffer=[],et&&typeof et=="object"&&(nt=et,et=null),et?(et=parse(et),nt.hostname=et.host,nt.secure=et.protocol==="https"||et.protocol==="wss",nt.port=et.port,et.query&&(nt.query=et.query)):nt.host&&(nt.hostname=parse(nt.host).host),installTimerFunctions(this,nt),this.secure=nt.secure!=null?nt.secure:typeof location<"u"&&location.protocol==="https:",nt.hostname&&!nt.port&&(nt.port=this.secure?"443":"80"),this.hostname=nt.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=nt.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=nt.transports||["polling","websocket","webtransport"],this.writeBuffer=[],this.prevBufferLen=0,this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},nt),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=decode(this.opts.query)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingTimeoutTimer=null,typeof addEventListener=="function"&&(this.opts.closeOnBeforeunload&&(this.beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this.beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this.offlineEventListener=()=>{this.onClose("transport close",{description:"network connection lost"})},addEventListener("offline",this.offlineEventListener,!1))),this.open()}createTransport(et){const nt=Object.assign({},this.opts.query);nt.EIO=protocol$1,nt.transport=et,this.id&&(nt.sid=this.id);const rt=Object.assign({},this.opts,{query:nt,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[et]);return new transports[et](rt)}open(){let et;if(this.opts.rememberUpgrade&&Gm.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1)et="websocket";else if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}else et=this.transports[0];this.readyState="opening";try{et=this.createTransport(et)}catch{this.transports.shift(),this.open();return}et.open(),this.setTransport(et)}setTransport(et){this.transport&&this.transport.removeAllListeners(),this.transport=et,et.on("drain",this.onDrain.bind(this)).on("packet",this.onPacket.bind(this)).on("error",this.onError.bind(this)).on("close",nt=>this.onClose("transport close",nt))}probe(et){let nt=this.createTransport(et),rt=!1;Gm.priorWebsocketSuccess=!1;const it=()=>{rt||(nt.send([{type:"ping",data:"probe"}]),nt.once("packet",ht=>{if(!rt)if(ht.type==="pong"&&ht.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",nt),!nt)return;Gm.priorWebsocketSuccess=nt.name==="websocket",this.transport.pause(()=>{rt||this.readyState!=="closed"&&(ut(),this.setTransport(nt),nt.send([{type:"upgrade"}]),this.emitReserved("upgrade",nt),nt=null,this.upgrading=!1,this.flush())})}else{const dt=new Error("probe error");dt.transport=nt.name,this.emitReserved("upgradeError",dt)}}))};function ot(){rt||(rt=!0,ut(),nt.close(),nt=null)}const at=ht=>{const dt=new Error("probe error: "+ht);dt.transport=nt.name,ot(),this.emitReserved("upgradeError",dt)};function st(){at("transport closed")}function lt(){at("socket closed")}function ct(ht){nt&&ht.name!==nt.name&&ot()}const ut=()=>{nt.removeListener("open",it),nt.removeListener("error",at),nt.removeListener("close",st),this.off("close",lt),this.off("upgrading",ct)};nt.once("open",it),nt.once("error",at),nt.once("close",st),this.once("close",lt),this.once("upgrading",ct),this.upgrades.indexOf("webtransport")!==-1&&et!=="webtransport"?this.setTimeoutFn(()=>{rt||nt.open()},200):nt.open()}onOpen(){if(this.readyState="open",Gm.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush(),this.readyState==="open"&&this.opts.upgrade){let et=0;const nt=this.upgrades.length;for(;et{this.onClose("ping timeout")},this.pingInterval+this.pingTimeout),this.opts.autoUnref&&this.pingTimeoutTimer.unref()}onDrain(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const et=this.getWritablePackets();this.transport.send(et),this.prevBufferLen=et.length,this.emitReserved("flush")}}getWritablePackets(){if(!(this.maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let nt=1;for(let rt=0;rt0&&nt>this.maxPayload)return this.writeBuffer.slice(0,rt);nt+=2}return this.writeBuffer}write(et,nt,rt){return this.sendPacket("message",et,nt,rt),this}send(et,nt,rt){return this.sendPacket("message",et,nt,rt),this}sendPacket(et,nt,rt,it){if(typeof nt=="function"&&(it=nt,nt=void 0),typeof rt=="function"&&(it=rt,rt=null),this.readyState==="closing"||this.readyState==="closed")return;rt=rt||{},rt.compress=rt.compress!==!1;const ot={type:et,data:nt,options:rt};this.emitReserved("packetCreate",ot),this.writeBuffer.push(ot),it&&this.once("flush",it),this.flush()}close(){const et=()=>{this.onClose("forced close"),this.transport.close()},nt=()=>{this.off("upgrade",nt),this.off("upgradeError",nt),et()},rt=()=>{this.once("upgrade",nt),this.once("upgradeError",nt)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?rt():et()}):this.upgrading?rt():et()),this}onError(et){Gm.priorWebsocketSuccess=!1,this.emitReserved("error",et),this.onClose("transport error",et)}onClose(et,nt){(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")&&(this.clearTimeoutFn(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),typeof removeEventListener=="function"&&(removeEventListener("beforeunload",this.beforeunloadEventListener,!1),removeEventListener("offline",this.offlineEventListener,!1)),this.readyState="closed",this.id=null,this.emitReserved("close",et,nt),this.writeBuffer=[],this.prevBufferLen=0)}filterUpgrades(et){const nt=[];let rt=0;const it=et.length;for(;rttypeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(tt):tt.buffer instanceof ArrayBuffer,toString=Object.prototype.toString,withNativeBlob=typeof Blob=="function"||typeof Blob<"u"&&toString.call(Blob)==="[object BlobConstructor]",withNativeFile=typeof File=="function"||typeof File<"u"&&toString.call(File)==="[object FileConstructor]";function isBinary(tt){return withNativeArrayBuffer&&(tt instanceof ArrayBuffer||isView(tt))||withNativeBlob&&tt instanceof Blob||withNativeFile&&tt instanceof File}function hasBinary(tt,et){if(!tt||typeof tt!="object")return!1;if(Array.isArray(tt)){for(let nt=0,rt=tt.length;nt=0&&tt.num{delete this.acks[et];for(let at=0;at{this.io.clearTimeoutFn(ot),nt.apply(this,[null,...at])}}emitWithAck(et,...nt){const rt=this.flags.timeout!==void 0||this._opts.ackTimeout!==void 0;return new Promise((it,ot)=>{nt.push((at,st)=>rt?at?ot(at):it(st):it(at)),this.emit(et,...nt)})}_addToQueue(et){let nt;typeof et[et.length-1]=="function"&&(nt=et.pop());const rt={id:this._queueSeq++,tryCount:0,pending:!1,args:et,flags:Object.assign({fromQueue:!0},this.flags)};et.push((it,...ot)=>rt!==this._queue[0]?void 0:(it!==null?rt.tryCount>this._opts.retries&&(this._queue.shift(),nt&&nt(it)):(this._queue.shift(),nt&&nt(null,...ot)),rt.pending=!1,this._drainQueue())),this._queue.push(rt),this._drainQueue()}_drainQueue(et=!1){if(!this.connected||this._queue.length===0)return;const nt=this._queue[0];nt.pending&&!et||(nt.pending=!0,nt.tryCount++,this.flags=nt.flags,this.emit.apply(this,nt.args))}packet(et){et.nsp=this.nsp,this.io._packet(et)}onopen(){typeof this.auth=="function"?this.auth(et=>{this._sendConnectPacket(et)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(et){this.packet({type:PacketType.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},et):et})}onerror(et){this.connected||this.emitReserved("connect_error",et)}onclose(et,nt){this.connected=!1,delete this.id,this.emitReserved("disconnect",et,nt)}onpacket(et){if(et.nsp===this.nsp)switch(et.type){case PacketType.CONNECT:et.data&&et.data.sid?this.onconnect(et.data.sid,et.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case PacketType.EVENT:case PacketType.BINARY_EVENT:this.onevent(et);break;case PacketType.ACK:case PacketType.BINARY_ACK:this.onack(et);break;case PacketType.DISCONNECT:this.ondisconnect();break;case PacketType.CONNECT_ERROR:this.destroy();const rt=new Error(et.data.message);rt.data=et.data.data,this.emitReserved("connect_error",rt);break}}onevent(et){const nt=et.data||[];et.id!=null&&nt.push(this.ack(et.id)),this.connected?this.emitEvent(nt):this.receiveBuffer.push(Object.freeze(nt))}emitEvent(et){if(this._anyListeners&&this._anyListeners.length){const nt=this._anyListeners.slice();for(const rt of nt)rt.apply(this,et)}super.emit.apply(this,et),this._pid&&et.length&&typeof et[et.length-1]=="string"&&(this._lastOffset=et[et.length-1])}ack(et){const nt=this;let rt=!1;return function(...it){rt||(rt=!0,nt.packet({type:PacketType.ACK,id:et,data:it}))}}onack(et){const nt=this.acks[et.id];typeof nt=="function"&&(nt.apply(this,et.data),delete this.acks[et.id])}onconnect(et,nt){this.id=et,this.recovered=nt&&this._pid===nt,this._pid=nt,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach(et=>this.emitEvent(et)),this.receiveBuffer=[],this.sendBuffer.forEach(et=>{this.notifyOutgoingListeners(et),this.packet(et)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(et=>et()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:PacketType.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(et){return this.flags.compress=et,this}get volatile(){return this.flags.volatile=!0,this}timeout(et){return this.flags.timeout=et,this}onAny(et){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(et),this}prependAny(et){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(et),this}offAny(et){if(!this._anyListeners)return this;if(et){const nt=this._anyListeners;for(let rt=0;rt0&&tt.jitter<=1?tt.jitter:0,this.attempts=0}Backoff.prototype.duration=function(){var tt=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var et=Math.random(),nt=Math.floor(et*this.jitter*tt);tt=Math.floor(et*10)&1?tt+nt:tt-nt}return Math.min(tt,this.max)|0};Backoff.prototype.reset=function(){this.attempts=0};Backoff.prototype.setMin=function(tt){this.ms=tt};Backoff.prototype.setMax=function(tt){this.max=tt};Backoff.prototype.setJitter=function(tt){this.jitter=tt};class Manager extends Emitter{constructor(et,nt){var rt;super(),this.nsps={},this.subs=[],et&&typeof et=="object"&&(nt=et,et=void 0),nt=nt||{},nt.path=nt.path||"/socket.io",this.opts=nt,installTimerFunctions(this,nt),this.reconnection(nt.reconnection!==!1),this.reconnectionAttempts(nt.reconnectionAttempts||1/0),this.reconnectionDelay(nt.reconnectionDelay||1e3),this.reconnectionDelayMax(nt.reconnectionDelayMax||5e3),this.randomizationFactor((rt=nt.randomizationFactor)!==null&&rt!==void 0?rt:.5),this.backoff=new Backoff({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(nt.timeout==null?2e4:nt.timeout),this._readyState="closed",this.uri=et;const it=nt.parser||parser;this.encoder=new it.Encoder,this.decoder=new it.Decoder,this._autoConnect=nt.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(et){return arguments.length?(this._reconnection=!!et,this):this._reconnection}reconnectionAttempts(et){return et===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=et,this)}reconnectionDelay(et){var nt;return et===void 0?this._reconnectionDelay:(this._reconnectionDelay=et,(nt=this.backoff)===null||nt===void 0||nt.setMin(et),this)}randomizationFactor(et){var nt;return et===void 0?this._randomizationFactor:(this._randomizationFactor=et,(nt=this.backoff)===null||nt===void 0||nt.setJitter(et),this)}reconnectionDelayMax(et){var nt;return et===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=et,(nt=this.backoff)===null||nt===void 0||nt.setMax(et),this)}timeout(et){return arguments.length?(this._timeout=et,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(et){if(~this._readyState.indexOf("open"))return this;this.engine=new Socket$1(this.uri,this.opts);const nt=this.engine,rt=this;this._readyState="opening",this.skipReconnect=!1;const it=on(nt,"open",function(){rt.onopen(),et&&et()}),ot=st=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",st),et?et(st):this.maybeReconnectOnOpen()},at=on(nt,"error",ot);if(this._timeout!==!1){const st=this._timeout,lt=this.setTimeoutFn(()=>{it(),ot(new Error("timeout")),nt.close()},st);this.opts.autoUnref&<.unref(),this.subs.push(()=>{this.clearTimeoutFn(lt)})}return this.subs.push(it),this.subs.push(at),this}connect(et){return this.open(et)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const et=this.engine;this.subs.push(on(et,"ping",this.onping.bind(this)),on(et,"data",this.ondata.bind(this)),on(et,"error",this.onerror.bind(this)),on(et,"close",this.onclose.bind(this)),on(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(et){try{this.decoder.add(et)}catch(nt){this.onclose("parse error",nt)}}ondecoded(et){nextTick(()=>{this.emitReserved("packet",et)},this.setTimeoutFn)}onerror(et){this.emitReserved("error",et)}socket(et,nt){let rt=this.nsps[et];return rt?this._autoConnect&&!rt.active&&rt.connect():(rt=new Socket(this,et,nt),this.nsps[et]=rt),rt}_destroy(et){const nt=Object.keys(this.nsps);for(const rt of nt)if(this.nsps[rt].active)return;this._close()}_packet(et){const nt=this.encoder.encode(et);for(let rt=0;rtet()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close"),this.engine&&this.engine.close()}disconnect(){return this._close()}onclose(et,nt){this.cleanup(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",et,nt),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const et=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const nt=this.backoff.duration();this._reconnecting=!0;const rt=this.setTimeoutFn(()=>{et.skipReconnect||(this.emitReserved("reconnect_attempt",et.backoff.attempts),!et.skipReconnect&&et.open(it=>{it?(et._reconnecting=!1,et.reconnect(),this.emitReserved("reconnect_error",it)):et.onreconnect()}))},nt);this.opts.autoUnref&&rt.unref(),this.subs.push(()=>{this.clearTimeoutFn(rt)})}}onreconnect(){const et=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",et)}}const cache={};function lookup(tt,et){typeof tt=="object"&&(et=tt,tt=void 0),et=et||{};const nt=url(tt,et.path||"/socket.io"),rt=nt.source,it=nt.id,ot=nt.path,at=cache[it]&&ot in cache[it].nsps,st=et.forceNew||et["force new connection"]||et.multiplex===!1||at;let lt;return st?lt=new Manager(rt,et):(cache[it]||(cache[it]=new Manager(rt,et)),lt=cache[it]),nt.query&&!et.query&&(et.query=nt.queryKey),lt.socket(nt.path,et)}Object.assign(lookup,{Manager,Socket,io:lookup,connect:lookup});const useSocket=()=>{const[tt,et]=reactExports.useState(null);return reactExports.useEffect(()=>{const nt=lookup(API_URL);return et(nt),()=>{nt.disconnect()}},[]),tt},ITEM_HEIGHT=48,ITEM_PADDING_TOP=8,MenuProps={PaperProps:{style:{maxHeight:ITEM_HEIGHT*4.5+ITEM_PADDING_TOP,width:250}}},names=["Beginner","Intermediate","Advanced","Expert"],AskQuestion=()=>{const tt=useDataStore(xt=>xt.data),[et,nt]=reactExports.useState(""),[rt,it]=reactExports.useState("Beginner"),ot=useAppStore(xt=>xt.currentSearch),at=reactExports.useRef(!1),st=useSocket(),[lt]=useUserStore(xt=>[xt.setBudget]),[ct,ut,ht,dt,pt]=useTeachStore(xt=>[xt.askedQuestions,xt.askedQuestionsAnswers,xt.setAskedQuestion,xt.setAskedQuestionAnswer,xt.hasQuestionInProgress]),mt=reactExports.useCallback(xt=>{dt(xt.answer),toast(jsxRuntimeExports.jsx(ToastMessage,{message:"Response is ready"}),{position:toast.POSITION.BOTTOM_CENTER,type:"success"})},[dt]);reactExports.useEffect(()=>{at.current||mt&&st&&(st.on("askquestionhook",mt),at.current=!0)},[mt,st]);const gt=async()=>{et&&(ht(et),nt(""));try{const xt=tt==null?void 0:tt.nodes.filter(Tt=>Tt.text),kt=xt==null?void 0:xt.slice(0,5),St=(kt!=null&&kt.length?kt.map(Tt=>Tt.text).join(" "):"").substring(0,2500).replace(/[?&=+/#]/g,Tt=>`\\${Tt}`);ot&&(await distExports$1.enable(),await postAskQuestion({expertise_level:rt,question_text:et,search_term:ot,transcripts:St}),await updateBudget(lt),toast(jsxRuntimeExports.jsx(ToastMessage,{message:"We started preparing response for you"}),{type:"success"}))}catch(xt){console.error(xt)}},yt=rt&&et.trim()&&!pt,bt=xt=>{it(xt.target.value)},vt=async xt=>{if(pt){xt.preventDefault();return}xt.keyCode===13&&xt.shiftKey===!1&&yt&&(xt.preventDefault(),gt())};return jsxRuntimeExports.jsxs(AskQuestionContainer,{children:[jsxRuntimeExports.jsx(Flex,{children:jsxRuntimeExports.jsx(Flex,{children:jsxRuntimeExports.jsxs(FormControl$1,{component:"div",children:[jsxRuntimeExports.jsx(StyledInput,{id:"select-label",size:"small",children:"Expertise level"}),jsxRuntimeExports.jsx(StyledSelect,{id:"demo-multiple-name",input:jsxRuntimeExports.jsx(OutlinedInput$1,{label:"Expertise level"}),labelId:"select-label",MenuProps,onChange:bt,size:"small",value:rt,children:names.map(xt=>jsxRuntimeExports.jsx(MenuItem$1,{component:"li",value:xt,children:xt},xt))})]})})}),jsxRuntimeExports.jsx(ResponsesWrapper,{children:ct==null?void 0:ct.map((xt,kt)=>jsxRuntimeExports.jsxs(Flex,{className:"response",py:12,children:[jsxRuntimeExports.jsx(Text$3,{kind:"medium",children:xt}),jsxRuntimeExports.jsx(Flex,{py:12,children:(ut==null?void 0:ut[kt])!==void 0?jsxRuntimeExports.jsx(Text$3,{color:"unreadMsgText",children:ut[kt]}):jsxRuntimeExports.jsxs(Flex,{align:"center",py:12,children:[jsxRuntimeExports.jsx(Flex,{align:"center",py:12,children:jsxRuntimeExports.jsx(PropagateLoader,{color:colors.white})}),jsxRuntimeExports.jsx(Flex,{align:"center",py:12,children:jsxRuntimeExports.jsx(Text$3,{children:"Generating response"})})]})})]},xt))}),jsxRuntimeExports.jsxs(TextAreaWrapper,{onKeyDown:vt,py:12,tabIndex:-1,children:[jsxRuntimeExports.jsx(StyledTextarea,{disabled:pt,onChange:xt=>nt(xt.target.value),placeholder:"Enter your question",value:et}),jsxRuntimeExports.jsx(IconWrapper$1,{children:jsxRuntimeExports.jsx(MdSend,{color:yt?colors.white:colors.gray300,size:"18"})})]})]})},AskQuestionContainer=styled$4.div` - margin-top: 20px; -`,StyledTextarea=styled$4(TextareaAutosize)` - background: ${colors.inputBg1}; - max-width: 100%; - color: ${colors.secondaryText4}; - padding: 16px 8px; - border: none; - outline: none; -`,StyledInput=styled$4(InputLabel$1)` - &.MuiFormLabel-root.MuiInputLabel-root { - color: ${colors.secondaryText4}; + function cloneUnlessOtherwiseSpecified(tt, et) { + return et.clone !== !1 && et.isMergeableObject(tt) ? deepmerge(emptyTarget(tt), tt, et) : tt } -`,StyledSelect=styled$4(Select$4)` - .MuiInputBase-root { - color: blue; + function defaultArrayMerge(tt, et, nt) { + return tt.concat(et).map(function (rt) { + return cloneUnlessOtherwiseSpecified(rt, nt) + }) } - background: ${colors.inputBg1}; - - .MuiSvgIcon-root { - color: ${colors.white}; + function getMergeFunction(tt, et) { + if (!et.customMerge) return deepmerge + var nt = et.customMerge(tt) + return typeof nt == 'function' ? nt : deepmerge } - - .MuiOutlinedInput-notchedOutline { - border: none; + function getEnumerableOwnPropertySymbols(tt) { + return Object.getOwnPropertySymbols + ? Object.getOwnPropertySymbols(tt).filter(function (et) { + return Object.propertyIsEnumerable.call(tt, et) + }) + : [] } - - .MuiSelect-select { - color: ${colors.white}; + function getKeys(tt) { + return Object.keys(tt).concat(getEnumerableOwnPropertySymbols(tt)) } -`,TextAreaWrapper=styled$4(Flex)` - position: relative; -`,IconWrapper$1=styled$4(Flex)` - position: absolute; - bottom: 20px; - right: 20px; - transform: rotate(-45deg); -`,ResponsesWrapper=styled$4(Flex)` - flex-shrink: 1; - overflow: auto; - - .response { - border-bottom: 1px solid ${colors.divider2}; + function propertyIsOnObject(tt, et) { + try { + return et in tt + } catch { + return !1 + } } -`,emptyValue={},HelperContext=reactExports.createContext(emptyValue),useHelper=()=>reactExports.useContext(HelperContext);function cc(tt){if(typeof tt=="string"||typeof tt=="number")return""+tt;let et="";if(Array.isArray(tt))for(let nt=0,rt;nt{const nt=createStore$3(tt),rt=(it,ot=et)=>useStoreWithEqualityFn(nt,it,ot);return Object.assign(rt,nt),rt},createWithEqualityFn=(tt,et)=>tt?createWithEqualityFnImpl(tt,et):createWithEqualityFnImpl;function shallow$1(tt,et){if(Object.is(tt,et))return!0;if(typeof tt!="object"||tt===null||typeof et!="object"||et===null)return!1;if(tt instanceof Map&&et instanceof Map){if(tt.size!==et.size)return!1;for(const[rt,it]of tt)if(!Object.is(it,et.get(rt)))return!1;return!0}if(tt instanceof Set&&et instanceof Set){if(tt.size!==et.size)return!1;for(const rt of tt)if(!et.has(rt))return!1;return!0}const nt=Object.keys(tt);if(nt.length!==Object.keys(et).length)return!1;for(let rt=0;rt=0&&(et=tt.slice(0,nt))!=="xmlns"&&(tt=tt.slice(nt+1)),namespaces.hasOwnProperty(et)?{space:namespaces[et],local:tt}:tt}function creatorInherit(tt){return function(){var et=this.ownerDocument,nt=this.namespaceURI;return nt===xhtml&&et.documentElement.namespaceURI===xhtml?et.createElement(tt):et.createElementNS(nt,tt)}}function creatorFixed(tt){return function(){return this.ownerDocument.createElementNS(tt.space,tt.local)}}function creator(tt){var et=namespace(tt);return(et.local?creatorFixed:creatorInherit)(et)}function none(){}function selector(tt){return tt==null?none:function(){return this.querySelector(tt)}}function selection_select(tt){typeof tt!="function"&&(tt=selector(tt));for(var et=this._groups,nt=et.length,rt=new Array(nt),it=0;it=xt&&(xt=vt+1);!(St=yt[xt])&&++xt=0;)(at=rt[it])&&(ot&&at.compareDocumentPosition(ot)^4&&ot.parentNode.insertBefore(at,ot),ot=at);return this}function selection_sort(tt){tt||(tt=ascending);function et(ht,dt){return ht&&dt?tt(ht.__data__,dt.__data__):!ht-!dt}for(var nt=this._groups,rt=nt.length,it=new Array(rt),ot=0;otet?1:tt>=et?0:NaN}function selection_call(){var tt=arguments[0];return arguments[0]=this,tt.apply(null,arguments),this}function selection_nodes(){return Array.from(this)}function selection_node(){for(var tt=this._groups,et=0,nt=tt.length;et1?this.each((et==null?styleRemove$1:typeof et=="function"?styleFunction$1:styleConstant$1)(tt,et,nt??"")):styleValue(this.node(),tt)}function styleValue(tt,et){return tt.style.getPropertyValue(et)||defaultView(tt).getComputedStyle(tt,null).getPropertyValue(et)}function propertyRemove(tt){return function(){delete this[tt]}}function propertyConstant(tt,et){return function(){this[tt]=et}}function propertyFunction(tt,et){return function(){var nt=et.apply(this,arguments);nt==null?delete this[tt]:this[tt]=nt}}function selection_property(tt,et){return arguments.length>1?this.each((et==null?propertyRemove:typeof et=="function"?propertyFunction:propertyConstant)(tt,et)):this.node()[tt]}function classArray(tt){return tt.trim().split(/^|\s+/)}function classList(tt){return tt.classList||new ClassList(tt)}function ClassList(tt){this._node=tt,this._names=classArray(tt.getAttribute("class")||"")}ClassList.prototype={add:function(tt){var et=this._names.indexOf(tt);et<0&&(this._names.push(tt),this._node.setAttribute("class",this._names.join(" ")))},remove:function(tt){var et=this._names.indexOf(tt);et>=0&&(this._names.splice(et,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(tt){return this._names.indexOf(tt)>=0}};function classedAdd(tt,et){for(var nt=classList(tt),rt=-1,it=et.length;++rt=0&&(nt=et.slice(rt+1),et=et.slice(0,rt)),{type:et,name:nt}})}function onRemove(tt){return function(){var et=this.__on;if(et){for(var nt=0,rt=-1,it=et.length,ot;nt()=>tt;function DragEvent(tt,{sourceEvent:et,subject:nt,target:rt,identifier:it,active:ot,x:at,y:st,dx:lt,dy:ct,dispatch:ut}){Object.defineProperties(this,{type:{value:tt,enumerable:!0,configurable:!0},sourceEvent:{value:et,enumerable:!0,configurable:!0},subject:{value:nt,enumerable:!0,configurable:!0},target:{value:rt,enumerable:!0,configurable:!0},identifier:{value:it,enumerable:!0,configurable:!0},active:{value:ot,enumerable:!0,configurable:!0},x:{value:at,enumerable:!0,configurable:!0},y:{value:st,enumerable:!0,configurable:!0},dx:{value:lt,enumerable:!0,configurable:!0},dy:{value:ct,enumerable:!0,configurable:!0},_:{value:ut}})}DragEvent.prototype.on=function(){var tt=this._.on.apply(this._,arguments);return tt===this._?this:tt};function defaultFilter$1(tt){return!tt.ctrlKey&&!tt.button}function defaultContainer(){return this.parentNode}function defaultSubject(tt,et){return et??{x:tt.x,y:tt.y}}function defaultTouchable$1(){return navigator.maxTouchPoints||"ontouchstart"in this}function drag(){var tt=defaultFilter$1,et=defaultContainer,nt=defaultSubject,rt=defaultTouchable$1,it={},ot=dispatch("start","drag","end"),at=0,st,lt,ct,ut,ht=0;function dt(kt){kt.on("mousedown.drag",pt).filter(rt).on("touchstart.drag",yt).on("touchmove.drag",bt,nonpassive).on("touchend.drag touchcancel.drag",vt).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function pt(kt,St){if(!(ut||!tt.call(this,kt,St))){var Tt=xt(this,et.call(this,kt,St),kt,St,"mouse");Tt&&(select(kt.view).on("mousemove.drag",mt,nonpassivecapture).on("mouseup.drag",gt,nonpassivecapture),dragDisable(kt.view),nopropagation$1(kt),ct=!1,st=kt.clientX,lt=kt.clientY,Tt("start",kt))}}function mt(kt){if(noevent$1(kt),!ct){var St=kt.clientX-st,Tt=kt.clientY-lt;ct=St*St+Tt*Tt>ht}it.mouse("drag",kt)}function gt(kt){select(kt.view).on("mousemove.drag mouseup.drag",null),yesdrag(kt.view,ct),noevent$1(kt),it.mouse("end",kt)}function yt(kt,St){if(tt.call(this,kt,St)){var Tt=kt.changedTouches,At=et.call(this,kt,St),Et=Tt.length,$t,Dt;for($t=0;$tCREATED)throw new Error("too late; already scheduled");return nt}function set(tt,et){var nt=get(tt,et);if(nt.state>STARTED)throw new Error("too late; already running");return nt}function get(tt,et){var nt=tt.__transition;if(!nt||!(nt=nt[et]))throw new Error("transition not found");return nt}function create(tt,et,nt){var rt=tt.__transition,it;rt[et]=nt,nt.timer=timer$1(ot,0,nt.time);function ot(ct){nt.state=SCHEDULED,nt.timer.restart(at,nt.delay,nt.time),nt.delay<=ct&&at(ct-nt.delay)}function at(ct){var ut,ht,dt,pt;if(nt.state!==SCHEDULED)return lt();for(ut in rt)if(pt=rt[ut],pt.name===nt.name){if(pt.state===STARTED)return timeout(at);pt.state===RUNNING?(pt.state=ENDED,pt.timer.stop(),pt.on.call("interrupt",tt,tt.__data__,pt.index,pt.group),delete rt[ut]):+utSTARTING&&rt.state=0&&(et=et.slice(0,nt)),!et||et==="start"})}function onFunction(tt,et,nt){var rt,it,ot=start(et)?init:set;return function(){var at=ot(this,tt),st=at.on;st!==rt&&(it=(rt=st).copy()).on(et,nt),at.on=it}}function transition_on(tt,et){var nt=this._id;return arguments.length<2?get(this.node(),nt).on.on(tt):this.each(onFunction(nt,tt,et))}function removeFunction(tt){return function(){var et=this.parentNode;for(var nt in this.__transition)if(+nt!==tt)return;et&&et.removeChild(this)}}function transition_remove(){return this.on("end.remove",removeFunction(this._id))}function transition_select(tt){var et=this._name,nt=this._id;typeof tt!="function"&&(tt=selector(tt));for(var rt=this._groups,it=rt.length,ot=new Array(it),at=0;at()=>tt;function ZoomEvent(tt,{sourceEvent:et,target:nt,transform:rt,dispatch:it}){Object.defineProperties(this,{type:{value:tt,enumerable:!0,configurable:!0},sourceEvent:{value:et,enumerable:!0,configurable:!0},target:{value:nt,enumerable:!0,configurable:!0},transform:{value:rt,enumerable:!0,configurable:!0},_:{value:it}})}function Transform(tt,et,nt){this.k=tt,this.x=et,this.y=nt}Transform.prototype={constructor:Transform,scale:function(tt){return tt===1?this:new Transform(this.k*tt,this.x,this.y)},translate:function(tt,et){return tt===0&et===0?this:new Transform(this.k,this.x+this.k*tt,this.y+this.k*et)},apply:function(tt){return[tt[0]*this.k+this.x,tt[1]*this.k+this.y]},applyX:function(tt){return tt*this.k+this.x},applyY:function(tt){return tt*this.k+this.y},invert:function(tt){return[(tt[0]-this.x)/this.k,(tt[1]-this.y)/this.k]},invertX:function(tt){return(tt-this.x)/this.k},invertY:function(tt){return(tt-this.y)/this.k},rescaleX:function(tt){return tt.copy().domain(tt.range().map(this.invertX,this).map(tt.invert,tt))},rescaleY:function(tt){return tt.copy().domain(tt.range().map(this.invertY,this).map(tt.invert,tt))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var identity=new Transform(1,0,0);Transform.prototype;function nopropagation(tt){tt.stopImmediatePropagation()}function noevent(tt){tt.preventDefault(),tt.stopImmediatePropagation()}function defaultFilter(tt){return(!tt.ctrlKey||tt.type==="wheel")&&!tt.button}function defaultExtent(){var tt=this;return tt instanceof SVGElement?(tt=tt.ownerSVGElement||tt,tt.hasAttribute("viewBox")?(tt=tt.viewBox.baseVal,[[tt.x,tt.y],[tt.x+tt.width,tt.y+tt.height]]):[[0,0],[tt.width.baseVal.value,tt.height.baseVal.value]]):[[0,0],[tt.clientWidth,tt.clientHeight]]}function defaultTransform(){return this.__zoom||identity}function defaultWheelDelta(tt){return-tt.deltaY*(tt.deltaMode===1?.05:tt.deltaMode?1:.002)*(tt.ctrlKey?10:1)}function defaultTouchable(){return navigator.maxTouchPoints||"ontouchstart"in this}function defaultConstrain(tt,et,nt){var rt=tt.invertX(et[0][0])-nt[0][0],it=tt.invertX(et[1][0])-nt[1][0],ot=tt.invertY(et[0][1])-nt[0][1],at=tt.invertY(et[1][1])-nt[1][1];return tt.translate(it>rt?(rt+it)/2:Math.min(0,rt)||Math.max(0,it),at>ot?(ot+at)/2:Math.min(0,ot)||Math.max(0,at))}function zoom(){var tt=defaultFilter,et=defaultExtent,nt=defaultConstrain,rt=defaultWheelDelta,it=defaultTouchable,ot=[0,1/0],at=[[-1/0,-1/0],[1/0,1/0]],st=250,lt=interpolateZoom,ct=dispatch("start","zoom","end"),ut,ht,dt,pt=500,mt=150,gt=0,yt=10;function bt(wt){wt.property("__zoom",defaultTransform).on("wheel.zoom",Et,{passive:!1}).on("mousedown.zoom",$t).on("dblclick.zoom",Dt).filter(it).on("touchstart.zoom",jt).on("touchmove.zoom",Pt).on("touchend.zoom touchcancel.zoom",Ct).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}bt.transform=function(wt,It,Ot,Wt){var zt=wt.selection?wt.selection():wt;zt.property("__zoom",defaultTransform),wt!==zt?St(wt,It,Ot,Wt):zt.interrupt().each(function(){Tt(this,arguments).event(Wt).start().zoom(null,typeof It=="function"?It.apply(this,arguments):It).end()})},bt.scaleBy=function(wt,It,Ot,Wt){bt.scaleTo(wt,function(){var zt=this.__zoom.k,Ft=typeof It=="function"?It.apply(this,arguments):It;return zt*Ft},Ot,Wt)},bt.scaleTo=function(wt,It,Ot,Wt){bt.transform(wt,function(){var zt=et.apply(this,arguments),Ft=this.__zoom,Nt=Ot==null?kt(zt):typeof Ot=="function"?Ot.apply(this,arguments):Ot,Ut=Ft.invert(Nt),Mt=typeof It=="function"?It.apply(this,arguments):It;return nt(xt(vt(Ft,Mt),Nt,Ut),zt,at)},Ot,Wt)},bt.translateBy=function(wt,It,Ot,Wt){bt.transform(wt,function(){return nt(this.__zoom.translate(typeof It=="function"?It.apply(this,arguments):It,typeof Ot=="function"?Ot.apply(this,arguments):Ot),et.apply(this,arguments),at)},null,Wt)},bt.translateTo=function(wt,It,Ot,Wt,zt){bt.transform(wt,function(){var Ft=et.apply(this,arguments),Nt=this.__zoom,Ut=Wt==null?kt(Ft):typeof Wt=="function"?Wt.apply(this,arguments):Wt;return nt(identity.translate(Ut[0],Ut[1]).scale(Nt.k).translate(typeof It=="function"?-It.apply(this,arguments):-It,typeof Ot=="function"?-Ot.apply(this,arguments):-Ot),Ft,at)},Wt,zt)};function vt(wt,It){return It=Math.max(ot[0],Math.min(ot[1],It)),It===wt.k?wt:new Transform(It,wt.x,wt.y)}function xt(wt,It,Ot){var Wt=It[0]-Ot[0]*wt.k,zt=It[1]-Ot[1]*wt.k;return Wt===wt.x&&zt===wt.y?wt:new Transform(wt.k,Wt,zt)}function kt(wt){return[(+wt[0][0]+ +wt[1][0])/2,(+wt[0][1]+ +wt[1][1])/2]}function St(wt,It,Ot,Wt){wt.on("start.zoom",function(){Tt(this,arguments).event(Wt).start()}).on("interrupt.zoom end.zoom",function(){Tt(this,arguments).event(Wt).end()}).tween("zoom",function(){var zt=this,Ft=arguments,Nt=Tt(zt,Ft).event(Wt),Ut=et.apply(zt,Ft),Mt=Ot==null?kt(Ut):typeof Ot=="function"?Ot.apply(zt,Ft):Ot,Ht=Math.max(Ut[1][0]-Ut[0][0],Ut[1][1]-Ut[0][1]),en=zt.__zoom,sn=typeof It=="function"?It.apply(zt,Ft):It,Kt=lt(en.invert(Mt).concat(Ht/en.k),sn.invert(Mt).concat(Ht/sn.k));return function(rn){if(rn===1)rn=sn;else{var nn=Kt(rn),hn=Ht/nn[2];rn=new Transform(hn,Mt[0]-nn[0]*hn,Mt[1]-nn[1]*hn)}Nt.zoom(null,rn)}})}function Tt(wt,It,Ot){return!Ot&&wt.__zooming||new At(wt,It)}function At(wt,It){this.that=wt,this.args=It,this.active=0,this.sourceEvent=null,this.extent=et.apply(wt,It),this.taps=0}At.prototype={event:function(wt){return wt&&(this.sourceEvent=wt),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(wt,It){return this.mouse&&wt!=="mouse"&&(this.mouse[1]=It.invert(this.mouse[0])),this.touch0&&wt!=="touch"&&(this.touch0[1]=It.invert(this.touch0[0])),this.touch1&&wt!=="touch"&&(this.touch1[1]=It.invert(this.touch1[0])),this.that.__zoom=It,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(wt){var It=select(this.that).datum();ct.call(wt,this.that,new ZoomEvent(wt,{sourceEvent:this.sourceEvent,target:bt,type:wt,transform:this.that.__zoom,dispatch:ct}),It)}};function Et(wt,...It){if(!tt.apply(this,arguments))return;var Ot=Tt(this,It).event(wt),Wt=this.__zoom,zt=Math.max(ot[0],Math.min(ot[1],Wt.k*Math.pow(2,rt.apply(this,arguments)))),Ft=pointer(wt);if(Ot.wheel)(Ot.mouse[0][0]!==Ft[0]||Ot.mouse[0][1]!==Ft[1])&&(Ot.mouse[1]=Wt.invert(Ot.mouse[0]=Ft)),clearTimeout(Ot.wheel);else{if(Wt.k===zt)return;Ot.mouse=[Ft,Wt.invert(Ft)],interrupt(this),Ot.start()}noevent(wt),Ot.wheel=setTimeout(Nt,mt),Ot.zoom("mouse",nt(xt(vt(Wt,zt),Ot.mouse[0],Ot.mouse[1]),Ot.extent,at));function Nt(){Ot.wheel=null,Ot.end()}}function $t(wt,...It){if(dt||!tt.apply(this,arguments))return;var Ot=wt.currentTarget,Wt=Tt(this,It,!0).event(wt),zt=select(wt.view).on("mousemove.zoom",Mt,!0).on("mouseup.zoom",Ht,!0),Ft=pointer(wt,Ot),Nt=wt.clientX,Ut=wt.clientY;dragDisable(wt.view),nopropagation(wt),Wt.mouse=[Ft,this.__zoom.invert(Ft)],interrupt(this),Wt.start();function Mt(en){if(noevent(en),!Wt.moved){var sn=en.clientX-Nt,Kt=en.clientY-Ut;Wt.moved=sn*sn+Kt*Kt>gt}Wt.event(en).zoom("mouse",nt(xt(Wt.that.__zoom,Wt.mouse[0]=pointer(en,Ot),Wt.mouse[1]),Wt.extent,at))}function Ht(en){zt.on("mousemove.zoom mouseup.zoom",null),yesdrag(en.view,Wt.moved),noevent(en),Wt.event(en).end()}}function Dt(wt,...It){if(tt.apply(this,arguments)){var Ot=this.__zoom,Wt=pointer(wt.changedTouches?wt.changedTouches[0]:wt,this),zt=Ot.invert(Wt),Ft=Ot.k*(wt.shiftKey?.5:2),Nt=nt(xt(vt(Ot,Ft),Wt,zt),et.apply(this,It),at);noevent(wt),st>0?select(this).transition().duration(st).call(St,Nt,Wt,wt):select(this).call(bt.transform,Nt,Wt,wt)}}function jt(wt,...It){if(tt.apply(this,arguments)){var Ot=wt.touches,Wt=Ot.length,zt=Tt(this,It,wt.changedTouches.length===Wt).event(wt),Ft,Nt,Ut,Mt;for(nopropagation(wt),Nt=0;Nt"[React Flow]: Seems like you have not used zustand provider as an ancestor. Help: https://reactflow.dev/error#001",error002:()=>"It looks like you've created a new nodeTypes or edgeTypes object. If this wasn't on purpose please define the nodeTypes/edgeTypes outside of the component or memoize them.",error003:tt=>`Node type "${tt}" not found. Using fallback type "default".`,error004:()=>"The React Flow parent container needs a width and a height to render the graph.",error005:()=>"Only child nodes can use a parent extent.",error006:()=>"Can't create edge. An edge needs a source and a target.",error007:tt=>`The old edge with id=${tt} does not exist.`,error009:tt=>`Marker type "${tt}" doesn't exist.`,error008:(tt,et)=>`Couldn't create edge for ${tt?"target":"source"} handle id: "${tt?et.targetHandle:et.sourceHandle}", edge id: ${et.id}.`,error010:()=>"Handle: No node id found. Make sure to only use a Handle inside a custom Node.",error011:tt=>`Edge type "${tt}" not found. Using fallback type "default".`,error012:tt=>`Node with id "${tt}" does not exist, it may have been removed. This can happen when a node is deleted before the "onNodeClick" handler is called.`},zustandErrorMessage=errorMessages.error001();function useStore(tt,et){const nt=reactExports.useContext(StoreContext);if(nt===null)throw new Error(zustandErrorMessage);return useStoreWithEqualityFn(nt,tt,et)}const useStoreApi=()=>{const tt=reactExports.useContext(StoreContext);if(tt===null)throw new Error(zustandErrorMessage);return reactExports.useMemo(()=>({getState:tt.getState,setState:tt.setState,subscribe:tt.subscribe,destroy:tt.destroy}),[tt])},selector$g=tt=>tt.userSelectionActive?"none":"all";function Panel({position:tt,children:et,className:nt,style:rt,...it}){const ot=useStore(selector$g),at=`${tt}`.split("-");return React$1.createElement("div",{className:cc(["react-flow__panel",nt,...at]),style:{...rt,pointerEvents:ot},...it},et)}function Attribution({proOptions:tt,position:et="bottom-right"}){return tt!=null&&tt.hideAttribution?null:React$1.createElement(Panel,{position:et,className:"react-flow__attribution","data-message":"Please only hide this attribution when you are subscribed to React Flow Pro: https://pro.reactflow.dev"},React$1.createElement("a",{href:"https://reactflow.dev",target:"_blank",rel:"noopener noreferrer","aria-label":"React Flow attribution"},"React Flow"))}const EdgeText=({x:tt,y:et,label:nt,labelStyle:rt={},labelShowBg:it=!0,labelBgStyle:ot={},labelBgPadding:at=[2,4],labelBgBorderRadius:st=2,children:lt,className:ct,...ut})=>{const ht=reactExports.useRef(null),[dt,pt]=reactExports.useState({x:0,y:0,width:0,height:0}),mt=cc(["react-flow__edge-textwrapper",ct]);return reactExports.useEffect(()=>{if(ht.current){const gt=ht.current.getBBox();pt({x:gt.x,y:gt.y,width:gt.width,height:gt.height})}},[nt]),typeof nt>"u"||!nt?null:React$1.createElement("g",{transform:`translate(${tt-dt.width/2} ${et-dt.height/2})`,className:mt,visibility:dt.width?"visible":"hidden",...ut},it&&React$1.createElement("rect",{width:dt.width+2*at[0],x:-at[0],y:-at[1],height:dt.height+2*at[1],className:"react-flow__edge-textbg",style:ot,rx:st,ry:st}),React$1.createElement("text",{className:"react-flow__edge-text",y:dt.height/2,dy:"0.3em",ref:ht,style:rt},nt),lt)};var EdgeText$1=reactExports.memo(EdgeText);const getDimensions=tt=>({width:tt.offsetWidth,height:tt.offsetHeight}),clamp=(tt,et=0,nt=1)=>Math.min(Math.max(tt,et),nt),clampPosition=(tt={x:0,y:0},et)=>({x:clamp(tt.x,et[0][0],et[1][0]),y:clamp(tt.y,et[0][1],et[1][1])}),calcAutoPanVelocity=(tt,et,nt)=>ttnt?-clamp(Math.abs(tt-nt),1,50)/50:0,calcAutoPan=(tt,et)=>{const nt=calcAutoPanVelocity(tt.x,35,et.width-35)*20,rt=calcAutoPanVelocity(tt.y,35,et.height-35)*20;return[nt,rt]},getHostForElement=tt=>{var et;return((et=tt.getRootNode)==null?void 0:et.call(tt))||(window==null?void 0:window.document)},getBoundsOfBoxes=(tt,et)=>({x:Math.min(tt.x,et.x),y:Math.min(tt.y,et.y),x2:Math.max(tt.x2,et.x2),y2:Math.max(tt.y2,et.y2)}),rectToBox=({x:tt,y:et,width:nt,height:rt})=>({x:tt,y:et,x2:tt+nt,y2:et+rt}),boxToRect=({x:tt,y:et,x2:nt,y2:rt})=>({x:tt,y:et,width:nt-tt,height:rt-et}),nodeToRect=tt=>({...tt.positionAbsolute||{x:0,y:0},width:tt.width||0,height:tt.height||0}),getOverlappingArea=(tt,et)=>{const nt=Math.max(0,Math.min(tt.x+tt.width,et.x+et.width)-Math.max(tt.x,et.x)),rt=Math.max(0,Math.min(tt.y+tt.height,et.y+et.height)-Math.max(tt.y,et.y));return Math.ceil(nt*rt)},isRectObject=tt=>isNumeric(tt.width)&&isNumeric(tt.height)&&isNumeric(tt.x)&&isNumeric(tt.y),isNumeric=tt=>!isNaN(tt)&&isFinite(tt),internalsSymbol=Symbol.for("internals"),elementSelectionKeys=["Enter"," ","Escape"],devWarn=(tt,et)=>{},isReactKeyboardEvent=tt=>"nativeEvent"in tt;function isInputDOMNode(tt){var it,ot;const et=isReactKeyboardEvent(tt)?tt.nativeEvent:tt,nt=((ot=(it=et.composedPath)==null?void 0:it.call(et))==null?void 0:ot[0])||tt.target;return["INPUT","SELECT","TEXTAREA"].includes(nt==null?void 0:nt.nodeName)||(nt==null?void 0:nt.hasAttribute("contenteditable"))||!!(nt!=null&&nt.closest(".nokey"))}const isMouseEvent=tt=>"clientX"in tt,getEventPosition=(tt,et)=>{var ot,at;const nt=isMouseEvent(tt),rt=nt?tt.clientX:(ot=tt.touches)==null?void 0:ot[0].clientX,it=nt?tt.clientY:(at=tt.touches)==null?void 0:at[0].clientY;return{x:rt-((et==null?void 0:et.left)??0),y:it-((et==null?void 0:et.top)??0)}},isMacOs=()=>{var tt;return typeof navigator<"u"&&((tt=navigator==null?void 0:navigator.userAgent)==null?void 0:tt.indexOf("Mac"))>=0},BaseEdge=({id:tt,path:et,labelX:nt,labelY:rt,label:it,labelStyle:ot,labelShowBg:at,labelBgStyle:st,labelBgPadding:lt,labelBgBorderRadius:ct,style:ut,markerEnd:ht,markerStart:dt,interactionWidth:pt=20})=>React$1.createElement(React$1.Fragment,null,React$1.createElement("path",{id:tt,style:ut,d:et,fill:"none",className:"react-flow__edge-path",markerEnd:ht,markerStart:dt}),pt&&React$1.createElement("path",{d:et,fill:"none",strokeOpacity:0,strokeWidth:pt,className:"react-flow__edge-interaction"}),it&&isNumeric(nt)&&isNumeric(rt)?React$1.createElement(EdgeText$1,{x:nt,y:rt,label:it,labelStyle:ot,labelShowBg:at,labelBgStyle:st,labelBgPadding:lt,labelBgBorderRadius:ct}):null);BaseEdge.displayName="BaseEdge";function getMouseHandler$1(tt,et,nt){return nt===void 0?nt:rt=>{const it=et().edges.find(ot=>ot.id===tt);it&&nt(rt,{...it})}}function getEdgeCenter({sourceX:tt,sourceY:et,targetX:nt,targetY:rt}){const it=Math.abs(nt-tt)/2,ot=nt{const[yt,bt,vt]=getSimpleBezierPath({sourceX:tt,sourceY:et,sourcePosition:it,targetX:nt,targetY:rt,targetPosition:ot});return React$1.createElement(BaseEdge,{path:yt,labelX:bt,labelY:vt,label:at,labelStyle:st,labelShowBg:lt,labelBgStyle:ct,labelBgPadding:ut,labelBgBorderRadius:ht,style:dt,markerEnd:pt,markerStart:mt,interactionWidth:gt})});SimpleBezierEdge.displayName="SimpleBezierEdge";const handleDirections={[Position.Left]:{x:-1,y:0},[Position.Right]:{x:1,y:0},[Position.Top]:{x:0,y:-1},[Position.Bottom]:{x:0,y:1}},getDirection=({source:tt,sourcePosition:et=Position.Bottom,target:nt})=>et===Position.Left||et===Position.Right?tt.xMath.sqrt(Math.pow(et.x-tt.x,2)+Math.pow(et.y-tt.y,2));function getPoints({source:tt,sourcePosition:et=Position.Bottom,target:nt,targetPosition:rt=Position.Top,center:it,offset:ot}){const at=handleDirections[et],st=handleDirections[rt],lt={x:tt.x+at.x*ot,y:tt.y+at.y*ot},ct={x:nt.x+st.x*ot,y:nt.y+st.y*ot},ut=getDirection({source:lt,sourcePosition:et,target:ct}),ht=ut.x!==0?"x":"y",dt=ut[ht];let pt=[],mt,gt;const yt={x:0,y:0},bt={x:0,y:0},[vt,xt,kt,St]=getEdgeCenter({sourceX:tt.x,sourceY:tt.y,targetX:nt.x,targetY:nt.y});if(at[ht]*st[ht]===-1){mt=it.x||vt,gt=it.y||xt;const At=[{x:mt,y:lt.y},{x:mt,y:ct.y}],Et=[{x:lt.x,y:gt},{x:ct.x,y:gt}];at[ht]===dt?pt=ht==="x"?At:Et:pt=ht==="x"?Et:At}else{const At=[{x:lt.x,y:ct.y}],Et=[{x:ct.x,y:lt.y}];if(ht==="x"?pt=at.x===dt?Et:At:pt=at.y===dt?At:Et,et===rt){const Ct=Math.abs(tt[ht]-nt[ht]);if(Ct<=ot){const wt=Math.min(ot-1,ot-Ct);at[ht]===dt?yt[ht]=(lt[ht]>tt[ht]?-1:1)*wt:bt[ht]=(ct[ht]>nt[ht]?-1:1)*wt}}if(et!==rt){const Ct=ht==="x"?"y":"x",wt=at[ht]===st[Ct],It=lt[Ct]>ct[Ct],Ot=lt[Ct]=Pt?(mt=($t.x+Dt.x)/2,gt=pt[0].y):(mt=pt[0].x,gt=($t.y+Dt.y)/2)}return[[tt,{x:lt.x+yt.x,y:lt.y+yt.y},...pt,{x:ct.x+bt.x,y:ct.y+bt.y},nt],mt,gt,kt,St]}function getBend(tt,et,nt,rt){const it=Math.min(distance(tt,et)/2,distance(et,nt)/2,rt),{x:ot,y:at}=et;if(tt.x===ot&&ot===nt.x||tt.y===at&&at===nt.y)return`L${ot} ${at}`;if(tt.y===at){const ct=tt.x{let xt="";return vt>0&&vt{const[bt,vt,xt]=getSmoothStepPath({sourceX:tt,sourceY:et,sourcePosition:ht,targetX:nt,targetY:rt,targetPosition:dt,borderRadius:gt==null?void 0:gt.borderRadius,offset:gt==null?void 0:gt.offset});return React$1.createElement(BaseEdge,{path:bt,labelX:vt,labelY:xt,label:it,labelStyle:ot,labelShowBg:at,labelBgStyle:st,labelBgPadding:lt,labelBgBorderRadius:ct,style:ut,markerEnd:pt,markerStart:mt,interactionWidth:yt})});SmoothStepEdge.displayName="SmoothStepEdge";const StepEdge=reactExports.memo(tt=>{var et;return React$1.createElement(SmoothStepEdge,{...tt,pathOptions:reactExports.useMemo(()=>{var nt;return{borderRadius:0,offset:(nt=tt.pathOptions)==null?void 0:nt.offset}},[(et=tt.pathOptions)==null?void 0:et.offset])})});StepEdge.displayName="StepEdge";function getStraightPath({sourceX:tt,sourceY:et,targetX:nt,targetY:rt}){const[it,ot,at,st]=getEdgeCenter({sourceX:tt,sourceY:et,targetX:nt,targetY:rt});return[`M ${tt},${et}L ${nt},${rt}`,it,ot,at,st]}const StraightEdge=reactExports.memo(({sourceX:tt,sourceY:et,targetX:nt,targetY:rt,label:it,labelStyle:ot,labelShowBg:at,labelBgStyle:st,labelBgPadding:lt,labelBgBorderRadius:ct,style:ut,markerEnd:ht,markerStart:dt,interactionWidth:pt})=>{const[mt,gt,yt]=getStraightPath({sourceX:tt,sourceY:et,targetX:nt,targetY:rt});return React$1.createElement(BaseEdge,{path:mt,labelX:gt,labelY:yt,label:it,labelStyle:ot,labelShowBg:at,labelBgStyle:st,labelBgPadding:lt,labelBgBorderRadius:ct,style:ut,markerEnd:ht,markerStart:dt,interactionWidth:pt})});StraightEdge.displayName="StraightEdge";function calculateControlOffset(tt,et){return tt>=0?.5*tt:et*25*Math.sqrt(-tt)}function getControlWithCurvature({pos:tt,x1:et,y1:nt,x2:rt,y2:it,c:ot}){switch(tt){case Position.Left:return[et-calculateControlOffset(et-rt,ot),nt];case Position.Right:return[et+calculateControlOffset(rt-et,ot),nt];case Position.Top:return[et,nt-calculateControlOffset(nt-it,ot)];case Position.Bottom:return[et,nt+calculateControlOffset(it-nt,ot)]}}function getBezierPath({sourceX:tt,sourceY:et,sourcePosition:nt=Position.Bottom,targetX:rt,targetY:it,targetPosition:ot=Position.Top,curvature:at=.25}){const[st,lt]=getControlWithCurvature({pos:nt,x1:tt,y1:et,x2:rt,y2:it,c:at}),[ct,ut]=getControlWithCurvature({pos:ot,x1:rt,y1:it,x2:tt,y2:et,c:at}),[ht,dt,pt,mt]=getBezierEdgeCenter({sourceX:tt,sourceY:et,targetX:rt,targetY:it,sourceControlX:st,sourceControlY:lt,targetControlX:ct,targetControlY:ut});return[`M${tt},${et} C${st},${lt} ${ct},${ut} ${rt},${it}`,ht,dt,pt,mt]}const BezierEdge=reactExports.memo(({sourceX:tt,sourceY:et,targetX:nt,targetY:rt,sourcePosition:it=Position.Bottom,targetPosition:ot=Position.Top,label:at,labelStyle:st,labelShowBg:lt,labelBgStyle:ct,labelBgPadding:ut,labelBgBorderRadius:ht,style:dt,markerEnd:pt,markerStart:mt,pathOptions:gt,interactionWidth:yt})=>{const[bt,vt,xt]=getBezierPath({sourceX:tt,sourceY:et,sourcePosition:it,targetX:nt,targetY:rt,targetPosition:ot,curvature:gt==null?void 0:gt.curvature});return React$1.createElement(BaseEdge,{path:bt,labelX:vt,labelY:xt,label:at,labelStyle:st,labelShowBg:lt,labelBgStyle:ct,labelBgPadding:ut,labelBgBorderRadius:ht,style:dt,markerEnd:pt,markerStart:mt,interactionWidth:yt})});BezierEdge.displayName="BezierEdge";const NodeIdContext=reactExports.createContext(null),Provider=NodeIdContext.Provider;NodeIdContext.Consumer;const useNodeId=()=>reactExports.useContext(NodeIdContext),isEdge=tt=>"id"in tt&&"source"in tt&&"target"in tt,getEdgeId=({source:tt,sourceHandle:et,target:nt,targetHandle:rt})=>`reactflow__edge-${tt}${et||""}-${nt}${rt||""}`,getMarkerId=(tt,et)=>typeof tt>"u"?"":typeof tt=="string"?tt:`${et?`${et}__`:""}${Object.keys(tt).sort().map(rt=>`${rt}=${tt[rt]}`).join("&")}`,connectionExists=(tt,et)=>et.some(nt=>nt.source===tt.source&&nt.target===tt.target&&(nt.sourceHandle===tt.sourceHandle||!nt.sourceHandle&&!tt.sourceHandle)&&(nt.targetHandle===tt.targetHandle||!nt.targetHandle&&!tt.targetHandle)),addEdge=(tt,et)=>{if(!tt.source||!tt.target)return et;let nt;return isEdge(tt)?nt={...tt}:nt={...tt,id:getEdgeId(tt)},connectionExists(nt,et)?et:et.concat(nt)},pointToRendererPoint=({x:tt,y:et},[nt,rt,it],ot,[at,st])=>{const lt={x:(tt-nt)/it,y:(et-rt)/it};return ot?{x:at*Math.round(lt.x/at),y:st*Math.round(lt.y/st)}:lt},rendererPointToPoint=({x:tt,y:et},[nt,rt,it])=>({x:tt*it+nt,y:et*it+rt}),getNodePositionWithOrigin=(tt,et=[0,0])=>{if(!tt)return{x:0,y:0,positionAbsolute:{x:0,y:0}};const nt=(tt.width??0)*et[0],rt=(tt.height??0)*et[1],it={x:tt.position.x-nt,y:tt.position.y-rt};return{...it,positionAbsolute:tt.positionAbsolute?{x:tt.positionAbsolute.x-nt,y:tt.positionAbsolute.y-rt}:it}},getRectOfNodes=(tt,et=[0,0])=>{if(tt.length===0)return{x:0,y:0,width:0,height:0};const nt=tt.reduce((rt,it)=>{const{x:ot,y:at}=getNodePositionWithOrigin(it,et).positionAbsolute;return getBoundsOfBoxes(rt,rectToBox({x:ot,y:at,width:it.width||0,height:it.height||0}))},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return boxToRect(nt)},getNodesInside=(tt,et,[nt,rt,it]=[0,0,1],ot=!1,at=!1,st=[0,0])=>{const lt={x:(et.x-nt)/it,y:(et.y-rt)/it,width:et.width/it,height:et.height/it},ct=[];return tt.forEach(ut=>{const{width:ht,height:dt,selectable:pt=!0,hidden:mt=!1}=ut;if(at&&!pt||mt)return!1;const{positionAbsolute:gt}=getNodePositionWithOrigin(ut,st),yt={x:gt.x,y:gt.y,width:ht||0,height:dt||0},bt=getOverlappingArea(lt,yt),vt=typeof ht>"u"||typeof dt>"u"||ht===null||dt===null,xt=ot&&bt>0,kt=(ht||0)*(dt||0);(vt||xt||bt>=kt||ut.dragging)&&ct.push(ut)}),ct},getConnectedEdges=(tt,et)=>{const nt=tt.map(rt=>rt.id);return et.filter(rt=>nt.includes(rt.source)||nt.includes(rt.target))},getTransformForBounds=(tt,et,nt,rt,it,ot=.1)=>{const at=et/(tt.width*(1+ot)),st=nt/(tt.height*(1+ot)),lt=Math.min(at,st),ct=clamp(lt,rt,it),ut=tt.x+tt.width/2,ht=tt.y+tt.height/2,dt=et/2-ut*ct,pt=nt/2-ht*ct;return[dt,pt,ct]},getD3Transition=(tt,et=0)=>tt.transition().duration(et);function getHandles(tt,et,nt,rt){return(et[nt]||[]).reduce((it,ot)=>{var at,st;return`${tt.id}-${ot.id}-${nt}`!==rt&&it.push({id:ot.id||null,type:nt,nodeId:tt.id,x:(((at=tt.positionAbsolute)==null?void 0:at.x)??0)+ot.x+ot.width/2,y:(((st=tt.positionAbsolute)==null?void 0:st.y)??0)+ot.y+ot.height/2}),it},[])}function getClosestHandle(tt,et,nt,rt,it,ot){const{x:at,y:st}=getEventPosition(tt),ct=et.elementsFromPoint(at,st).find(mt=>mt.classList.contains("react-flow__handle"));if(ct){const mt=ct.getAttribute("data-nodeid");if(mt){const gt=getHandleType(void 0,ct),yt=ct.getAttribute("data-handleid"),bt=ot({nodeId:mt,id:yt,type:gt});if(bt)return{handle:{id:yt,type:gt,nodeId:mt,x:nt.x,y:nt.y},validHandleResult:bt}}}let ut=[],ht=1/0;if(it.forEach(mt=>{const gt=Math.sqrt((mt.x-nt.x)**2+(mt.y-nt.y)**2);if(gt<=rt){const yt=ot(mt);gt<=ht&&(gtmt.isValid),pt=ut.some(({handle:mt})=>mt.type==="target");return ut.find(({handle:mt,validHandleResult:gt})=>pt?mt.type==="target":dt?gt.isValid:!0)||ut[0]}const nullConnection={source:null,target:null,sourceHandle:null,targetHandle:null},defaultResult=()=>({handleDomNode:null,isValid:!1,connection:nullConnection,endHandle:null});function isValidHandle(tt,et,nt,rt,it,ot,at){const st=it==="target",lt=at.querySelector(`.react-flow__handle[data-id="${tt==null?void 0:tt.nodeId}-${tt==null?void 0:tt.id}-${tt==null?void 0:tt.type}"]`),ct={...defaultResult(),handleDomNode:lt};if(lt){const ut=getHandleType(void 0,lt),ht=lt.getAttribute("data-nodeid"),dt=lt.getAttribute("data-handleid"),pt=lt.classList.contains("connectable"),mt=lt.classList.contains("connectableend"),gt={source:st?ht:nt,sourceHandle:st?dt:rt,target:st?nt:ht,targetHandle:st?rt:dt};ct.connection=gt,pt&&mt&&(et===ConnectionMode.Strict?st&&ut==="source"||!st&&ut==="target":ht!==nt||dt!==rt)&&(ct.endHandle={nodeId:ht,handleId:dt,type:ut},ct.isValid=ot(gt))}return ct}function getHandleLookup({nodes:tt,nodeId:et,handleId:nt,handleType:rt}){return tt.reduce((it,ot)=>{if(ot[internalsSymbol]){const{handleBounds:at}=ot[internalsSymbol];let st=[],lt=[];at&&(st=getHandles(ot,at,"source",`${et}-${nt}-${rt}`),lt=getHandles(ot,at,"target",`${et}-${nt}-${rt}`)),it.push(...st,...lt)}return it},[])}function getHandleType(tt,et){return tt||(et!=null&&et.classList.contains("target")?"target":et!=null&&et.classList.contains("source")?"source":null)}function resetRecentHandle(tt){tt==null||tt.classList.remove("valid","connecting","react-flow__handle-valid","react-flow__handle-connecting")}function getConnectionStatus(tt,et){let nt=null;return et?nt="valid":tt&&!et&&(nt="invalid"),nt}function handlePointerDown({event:tt,handleId:et,nodeId:nt,onConnect:rt,isTarget:it,getState:ot,setState:at,isValidConnection:st,edgeUpdaterType:lt,onEdgeUpdateEnd:ct}){const ut=getHostForElement(tt.target),{connectionMode:ht,domNode:dt,autoPanOnConnect:pt,connectionRadius:mt,onConnectStart:gt,panBy:yt,getNodes:bt,cancelConnection:vt}=ot();let xt=0,kt;const{x:St,y:Tt}=getEventPosition(tt),At=ut==null?void 0:ut.elementFromPoint(St,Tt),Et=getHandleType(lt,At),$t=dt==null?void 0:dt.getBoundingClientRect();if(!$t||!Et)return;let Dt,jt=getEventPosition(tt,$t),Pt=!1,Ct=null,wt=!1,It=null;const Ot=getHandleLookup({nodes:bt(),nodeId:nt,handleId:et,handleType:Et}),Wt=()=>{if(!pt)return;const[Nt,Ut]=calcAutoPan(jt,$t);yt({x:Nt,y:Ut}),xt=requestAnimationFrame(Wt)};at({connectionPosition:jt,connectionStatus:null,connectionNodeId:nt,connectionHandleId:et,connectionHandleType:Et,connectionStartHandle:{nodeId:nt,handleId:et,type:Et},connectionEndHandle:null}),gt==null||gt(tt,{nodeId:nt,handleId:et,handleType:Et});function zt(Nt){const{transform:Ut}=ot();jt=getEventPosition(Nt,$t);const{handle:Mt,validHandleResult:Ht}=getClosestHandle(Nt,ut,pointToRendererPoint(jt,Ut,!1,[1,1]),mt,Ot,en=>isValidHandle(en,ht,nt,et,it?"target":"source",st,ut));if(kt=Mt,Pt||(Wt(),Pt=!0),It=Ht.handleDomNode,Ct=Ht.connection,wt=Ht.isValid,at({connectionPosition:kt&&wt?rendererPointToPoint({x:kt.x,y:kt.y},Ut):jt,connectionStatus:getConnectionStatus(!!kt,wt),connectionEndHandle:Ht.endHandle}),!kt&&!wt&&!It)return resetRecentHandle(Dt);Ct.source!==Ct.target&&It&&(resetRecentHandle(Dt),Dt=It,It.classList.add("connecting","react-flow__handle-connecting"),It.classList.toggle("valid",wt),It.classList.toggle("react-flow__handle-valid",wt))}function Ft(Nt){var Ut,Mt;(kt||It)&&Ct&&wt&&(rt==null||rt(Ct)),(Mt=(Ut=ot()).onConnectEnd)==null||Mt.call(Ut,Nt),lt&&(ct==null||ct(Nt)),resetRecentHandle(Dt),vt(),cancelAnimationFrame(xt),Pt=!1,wt=!1,Ct=null,It=null,ut.removeEventListener("mousemove",zt),ut.removeEventListener("mouseup",Ft),ut.removeEventListener("touchmove",zt),ut.removeEventListener("touchend",Ft)}ut.addEventListener("mousemove",zt),ut.addEventListener("mouseup",Ft),ut.addEventListener("touchmove",zt),ut.addEventListener("touchend",Ft)}const alwaysValid=()=>!0,selector$f=tt=>({connectionStartHandle:tt.connectionStartHandle,connectOnClick:tt.connectOnClick,noPanClassName:tt.noPanClassName}),connectingSelector=(tt,et,nt)=>rt=>{const{connectionStartHandle:it,connectionEndHandle:ot,connectionClickStartHandle:at}=rt;return{connecting:(it==null?void 0:it.nodeId)===tt&&(it==null?void 0:it.handleId)===et&&(it==null?void 0:it.type)===nt||(ot==null?void 0:ot.nodeId)===tt&&(ot==null?void 0:ot.handleId)===et&&(ot==null?void 0:ot.type)===nt,clickConnecting:(at==null?void 0:at.nodeId)===tt&&(at==null?void 0:at.handleId)===et&&(at==null?void 0:at.type)===nt}},Handle=reactExports.forwardRef(({type:tt="source",position:et=Position.Top,isValidConnection:nt,isConnectable:rt=!0,isConnectableStart:it=!0,isConnectableEnd:ot=!0,id:at,onConnect:st,children:lt,className:ct,onMouseDown:ut,onTouchStart:ht,...dt},pt)=>{var $t,Dt;const mt=at||null,gt=tt==="target",yt=useStoreApi(),bt=useNodeId(),{connectOnClick:vt,noPanClassName:xt}=useStore(selector$f,shallow$1),{connecting:kt,clickConnecting:St}=useStore(connectingSelector(bt,mt,tt),shallow$1);bt||(Dt=($t=yt.getState()).onError)==null||Dt.call($t,"010",errorMessages.error010());const Tt=jt=>{const{defaultEdgeOptions:Pt,onConnect:Ct,hasDefaultEdges:wt}=yt.getState(),It={...Pt,...jt};if(wt){const{edges:Ot,setEdges:Wt}=yt.getState();Wt(addEdge(It,Ot))}Ct==null||Ct(It),st==null||st(It)},At=jt=>{if(!bt)return;const Pt=isMouseEvent(jt);it&&(Pt&&jt.button===0||!Pt)&&handlePointerDown({event:jt,handleId:mt,nodeId:bt,onConnect:Tt,isTarget:gt,getState:yt.getState,setState:yt.setState,isValidConnection:nt||yt.getState().isValidConnection||alwaysValid}),Pt?ut==null||ut(jt):ht==null||ht(jt)},Et=jt=>{const{onClickConnectStart:Pt,onClickConnectEnd:Ct,connectionClickStartHandle:wt,connectionMode:It,isValidConnection:Ot}=yt.getState();if(!bt||!wt&&!it)return;if(!wt){Pt==null||Pt(jt,{nodeId:bt,handleId:mt,handleType:tt}),yt.setState({connectionClickStartHandle:{nodeId:bt,type:tt,handleId:mt}});return}const Wt=getHostForElement(jt.target),zt=nt||Ot||alwaysValid,{connection:Ft,isValid:Nt}=isValidHandle({nodeId:bt,id:mt,type:tt},It,wt.nodeId,wt.handleId||null,wt.type,zt,Wt);Nt&&Tt(Ft),Ct==null||Ct(jt),yt.setState({connectionClickStartHandle:null})};return React$1.createElement("div",{"data-handleid":mt,"data-nodeid":bt,"data-handlepos":et,"data-id":`${bt}-${mt}-${tt}`,className:cc(["react-flow__handle",`react-flow__handle-${et}`,"nodrag",xt,ct,{source:!gt,target:gt,connectable:rt,connectablestart:it,connectableend:ot,connecting:St,connectionindicator:rt&&(it&&!kt||ot&&kt)}]),onMouseDown:At,onTouchStart:At,onClick:vt?Et:void 0,ref:pt,...dt},lt)});Handle.displayName="Handle";var Handle$1=reactExports.memo(Handle);const DefaultNode=({data:tt,isConnectable:et,targetPosition:nt=Position.Top,sourcePosition:rt=Position.Bottom})=>React$1.createElement(React$1.Fragment,null,React$1.createElement(Handle$1,{type:"target",position:nt,isConnectable:et}),tt==null?void 0:tt.label,React$1.createElement(Handle$1,{type:"source",position:rt,isConnectable:et}));DefaultNode.displayName="DefaultNode";var DefaultNode$1=reactExports.memo(DefaultNode);const InputNode=({data:tt,isConnectable:et,sourcePosition:nt=Position.Bottom})=>React$1.createElement(React$1.Fragment,null,tt==null?void 0:tt.label,React$1.createElement(Handle$1,{type:"source",position:nt,isConnectable:et}));InputNode.displayName="InputNode";var InputNode$1=reactExports.memo(InputNode);const OutputNode=({data:tt,isConnectable:et,targetPosition:nt=Position.Top})=>React$1.createElement(React$1.Fragment,null,React$1.createElement(Handle$1,{type:"target",position:nt,isConnectable:et}),tt==null?void 0:tt.label);OutputNode.displayName="OutputNode";var OutputNode$1=reactExports.memo(OutputNode);const GroupNode=()=>null;GroupNode.displayName="GroupNode";const selector$e=tt=>({selectedNodes:tt.getNodes().filter(et=>et.selected),selectedEdges:tt.edges.filter(et=>et.selected)}),selectId=tt=>tt.id;function areEqual(tt,et){return shallow$1(tt.selectedNodes.map(selectId),et.selectedNodes.map(selectId))&&shallow$1(tt.selectedEdges.map(selectId),et.selectedEdges.map(selectId))}const SelectionListener=reactExports.memo(({onSelectionChange:tt})=>{const et=useStoreApi(),{selectedNodes:nt,selectedEdges:rt}=useStore(selector$e,areEqual);return reactExports.useEffect(()=>{var ot,at;const it={nodes:nt,edges:rt};tt==null||tt(it),(at=(ot=et.getState()).onSelectionChange)==null||at.call(ot,it)},[nt,rt,tt]),null});SelectionListener.displayName="SelectionListener";const changeSelector=tt=>!!tt.onSelectionChange;function Wrapper$1$1({onSelectionChange:tt}){const et=useStore(changeSelector);return tt||et?React$1.createElement(SelectionListener,{onSelectionChange:tt}):null}const selector$d=tt=>({setNodes:tt.setNodes,setEdges:tt.setEdges,setDefaultNodesAndEdges:tt.setDefaultNodesAndEdges,setMinZoom:tt.setMinZoom,setMaxZoom:tt.setMaxZoom,setTranslateExtent:tt.setTranslateExtent,setNodeExtent:tt.setNodeExtent,reset:tt.reset});function useStoreUpdater(tt,et){reactExports.useEffect(()=>{typeof tt<"u"&&et(tt)},[tt])}function useDirectStoreUpdater(tt,et,nt){reactExports.useEffect(()=>{typeof et<"u"&&nt({[tt]:et})},[et])}const StoreUpdater=({nodes:tt,edges:et,defaultNodes:nt,defaultEdges:rt,onConnect:it,onConnectStart:ot,onConnectEnd:at,onClickConnectStart:st,onClickConnectEnd:lt,nodesDraggable:ct,nodesConnectable:ut,nodesFocusable:ht,edgesFocusable:dt,edgesUpdatable:pt,elevateNodesOnSelect:mt,minZoom:gt,maxZoom:yt,nodeExtent:bt,onNodesChange:vt,onEdgesChange:xt,elementsSelectable:kt,connectionMode:St,snapGrid:Tt,snapToGrid:At,translateExtent:Et,connectOnClick:$t,defaultEdgeOptions:Dt,fitView:jt,fitViewOptions:Pt,onNodesDelete:Ct,onEdgesDelete:wt,onNodeDrag:It,onNodeDragStart:Ot,onNodeDragStop:Wt,onSelectionDrag:zt,onSelectionDragStart:Ft,onSelectionDragStop:Nt,noPanClassName:Ut,nodeOrigin:Mt,rfId:Ht,autoPanOnConnect:en,autoPanOnNodeDrag:sn,onError:Kt,connectionRadius:rn,isValidConnection:nn,nodeDragThreshold:hn})=>{const{setNodes:vn,setEdges:an,setDefaultNodesAndEdges:Qt,setMinZoom:_n,setMaxZoom:Pn,setTranslateExtent:$n,setNodeExtent:Nn,reset:Tn}=useStore(selector$d,shallow$1),cn=useStoreApi();return reactExports.useEffect(()=>{const mn=rt==null?void 0:rt.map(In=>({...In,...Dt}));return Qt(nt,mn),()=>{Tn()}},[]),useDirectStoreUpdater("defaultEdgeOptions",Dt,cn.setState),useDirectStoreUpdater("connectionMode",St,cn.setState),useDirectStoreUpdater("onConnect",it,cn.setState),useDirectStoreUpdater("onConnectStart",ot,cn.setState),useDirectStoreUpdater("onConnectEnd",at,cn.setState),useDirectStoreUpdater("onClickConnectStart",st,cn.setState),useDirectStoreUpdater("onClickConnectEnd",lt,cn.setState),useDirectStoreUpdater("nodesDraggable",ct,cn.setState),useDirectStoreUpdater("nodesConnectable",ut,cn.setState),useDirectStoreUpdater("nodesFocusable",ht,cn.setState),useDirectStoreUpdater("edgesFocusable",dt,cn.setState),useDirectStoreUpdater("edgesUpdatable",pt,cn.setState),useDirectStoreUpdater("elementsSelectable",kt,cn.setState),useDirectStoreUpdater("elevateNodesOnSelect",mt,cn.setState),useDirectStoreUpdater("snapToGrid",At,cn.setState),useDirectStoreUpdater("snapGrid",Tt,cn.setState),useDirectStoreUpdater("onNodesChange",vt,cn.setState),useDirectStoreUpdater("onEdgesChange",xt,cn.setState),useDirectStoreUpdater("connectOnClick",$t,cn.setState),useDirectStoreUpdater("fitViewOnInit",jt,cn.setState),useDirectStoreUpdater("fitViewOnInitOptions",Pt,cn.setState),useDirectStoreUpdater("onNodesDelete",Ct,cn.setState),useDirectStoreUpdater("onEdgesDelete",wt,cn.setState),useDirectStoreUpdater("onNodeDrag",It,cn.setState),useDirectStoreUpdater("onNodeDragStart",Ot,cn.setState),useDirectStoreUpdater("onNodeDragStop",Wt,cn.setState),useDirectStoreUpdater("onSelectionDrag",zt,cn.setState),useDirectStoreUpdater("onSelectionDragStart",Ft,cn.setState),useDirectStoreUpdater("onSelectionDragStop",Nt,cn.setState),useDirectStoreUpdater("noPanClassName",Ut,cn.setState),useDirectStoreUpdater("nodeOrigin",Mt,cn.setState),useDirectStoreUpdater("rfId",Ht,cn.setState),useDirectStoreUpdater("autoPanOnConnect",en,cn.setState),useDirectStoreUpdater("autoPanOnNodeDrag",sn,cn.setState),useDirectStoreUpdater("onError",Kt,cn.setState),useDirectStoreUpdater("connectionRadius",rn,cn.setState),useDirectStoreUpdater("isValidConnection",nn,cn.setState),useDirectStoreUpdater("nodeDragThreshold",hn,cn.setState),useStoreUpdater(tt,vn),useStoreUpdater(et,an),useStoreUpdater(gt,_n),useStoreUpdater(yt,Pn),useStoreUpdater(Et,$n),useStoreUpdater(bt,Nn),null},style$1={display:"none"},ariaLiveStyle={position:"absolute",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(100%)"},ARIA_NODE_DESC_KEY="react-flow__node-desc",ARIA_EDGE_DESC_KEY="react-flow__edge-desc",ARIA_LIVE_MESSAGE="react-flow__aria-live",selector$c=tt=>tt.ariaLiveMessage;function AriaLiveMessage({rfId:tt}){const et=useStore(selector$c);return React$1.createElement("div",{id:`${ARIA_LIVE_MESSAGE}-${tt}`,"aria-live":"assertive","aria-atomic":"true",style:ariaLiveStyle},et)}function A11yDescriptions({rfId:tt,disableKeyboardA11y:et}){return React$1.createElement(React$1.Fragment,null,React$1.createElement("div",{id:`${ARIA_NODE_DESC_KEY}-${tt}`,style:style$1},"Press enter or space to select a node.",!et&&"You can then use the arrow keys to move the node around."," Press delete to remove it and escape to cancel."," "),React$1.createElement("div",{id:`${ARIA_EDGE_DESC_KEY}-${tt}`,style:style$1},"Press enter or space to select an edge. You can then press delete to remove it or escape to cancel."),!et&&React$1.createElement(AriaLiveMessage,{rfId:tt}))}var useKeyPress=(tt=null,et={actInsideInputWithModifier:!0})=>{const[nt,rt]=reactExports.useState(!1),it=reactExports.useRef(!1),ot=reactExports.useRef(new Set([])),[at,st]=reactExports.useMemo(()=>{if(tt!==null){const ct=(Array.isArray(tt)?tt:[tt]).filter(ht=>typeof ht=="string").map(ht=>ht.split("+")),ut=ct.reduce((ht,dt)=>ht.concat(...dt),[]);return[ct,ut]}return[[],[]]},[tt]);return reactExports.useEffect(()=>{const lt=typeof document<"u"?document:null,ct=(et==null?void 0:et.target)||lt;if(tt!==null){const ut=pt=>{if(it.current=pt.ctrlKey||pt.metaKey||pt.shiftKey,(!it.current||it.current&&!et.actInsideInputWithModifier)&&isInputDOMNode(pt))return!1;const gt=useKeyOrCode(pt.code,st);ot.current.add(pt[gt]),isMatchingKey(at,ot.current,!1)&&(pt.preventDefault(),rt(!0))},ht=pt=>{if((!it.current||it.current&&!et.actInsideInputWithModifier)&&isInputDOMNode(pt))return!1;const gt=useKeyOrCode(pt.code,st);isMatchingKey(at,ot.current,!0)?(rt(!1),ot.current.clear()):ot.current.delete(pt[gt]),pt.key==="Meta"&&ot.current.clear(),it.current=!1},dt=()=>{ot.current.clear(),rt(!1)};return ct==null||ct.addEventListener("keydown",ut),ct==null||ct.addEventListener("keyup",ht),window.addEventListener("blur",dt),()=>{ct==null||ct.removeEventListener("keydown",ut),ct==null||ct.removeEventListener("keyup",ht),window.removeEventListener("blur",dt)}}},[tt,rt]),nt};function isMatchingKey(tt,et,nt){return tt.filter(rt=>nt||rt.length===et.size).some(rt=>rt.every(it=>et.has(it)))}function useKeyOrCode(tt,et){return et.includes(tt)?"code":"key"}function calculateXYZPosition(tt,et,nt,rt){var at,st;if(!tt.parentNode)return nt;const it=et.get(tt.parentNode),ot=getNodePositionWithOrigin(it,rt);return calculateXYZPosition(it,et,{x:(nt.x??0)+ot.x,y:(nt.y??0)+ot.y,z:(((at=it[internalsSymbol])==null?void 0:at.z)??0)>(nt.z??0)?((st=it[internalsSymbol])==null?void 0:st.z)??0:nt.z??0},rt)}function updateAbsoluteNodePositions(tt,et,nt){tt.forEach(rt=>{var it;if(rt.parentNode&&!tt.has(rt.parentNode))throw new Error(`Parent node ${rt.parentNode} not found`);if(rt.parentNode||nt!=null&&nt[rt.id]){const{x:ot,y:at,z:st}=calculateXYZPosition(rt,tt,{...rt.position,z:((it=rt[internalsSymbol])==null?void 0:it.z)??0},et);rt.positionAbsolute={x:ot,y:at},rt[internalsSymbol].z=st,nt!=null&&nt[rt.id]&&(rt[internalsSymbol].isParent=!0)}})}function createNodeInternals(tt,et,nt,rt){const it=new Map,ot={},at=rt?1e3:0;return tt.forEach(st=>{var ht;const lt=(isNumeric(st.zIndex)?st.zIndex:0)+(st.selected?at:0),ct=et.get(st.id),ut={width:ct==null?void 0:ct.width,height:ct==null?void 0:ct.height,...st,positionAbsolute:{x:st.position.x,y:st.position.y}};st.parentNode&&(ut.parentNode=st.parentNode,ot[st.parentNode]=!0),Object.defineProperty(ut,internalsSymbol,{enumerable:!1,value:{handleBounds:(ht=ct==null?void 0:ct[internalsSymbol])==null?void 0:ht.handleBounds,z:lt}}),it.set(st.id,ut)}),updateAbsoluteNodePositions(it,nt,ot),it}function fitView(tt,et={}){const{getNodes:nt,width:rt,height:it,minZoom:ot,maxZoom:at,d3Zoom:st,d3Selection:lt,fitViewOnInitDone:ct,fitViewOnInit:ut,nodeOrigin:ht}=tt(),dt=et.initial&&!ct&&ut;if(st&<&&(dt||!et.initial)){const mt=nt().filter(yt=>{var vt;const bt=et.includeHiddenNodes?yt.width&&yt.height:!yt.hidden;return(vt=et.nodes)!=null&&vt.length?bt&&et.nodes.some(xt=>xt.id===yt.id):bt}),gt=mt.every(yt=>yt.width&&yt.height);if(mt.length>0&>){const yt=getRectOfNodes(mt,ht),[bt,vt,xt]=getTransformForBounds(yt,rt,it,et.minZoom??ot,et.maxZoom??at,et.padding??.1),kt=identity.translate(bt,vt).scale(xt);return typeof et.duration=="number"&&et.duration>0?st.transform(getD3Transition(lt,et.duration),kt):st.transform(lt,kt),!0}}return!1}function handleControlledNodeSelectionChange(tt,et){return tt.forEach(nt=>{const rt=et.get(nt.id);rt&&et.set(rt.id,{...rt,[internalsSymbol]:rt[internalsSymbol],selected:nt.selected})}),new Map(et)}function handleControlledEdgeSelectionChange(tt,et){return et.map(nt=>{const rt=tt.find(it=>it.id===nt.id);return rt&&(nt.selected=rt.selected),nt})}function updateNodesAndEdgesSelections({changedNodes:tt,changedEdges:et,get:nt,set:rt}){const{nodeInternals:it,edges:ot,onNodesChange:at,onEdgesChange:st,hasDefaultNodes:lt,hasDefaultEdges:ct}=nt();tt!=null&&tt.length&&(lt&&rt({nodeInternals:handleControlledNodeSelectionChange(tt,it)}),at==null||at(tt)),et!=null&&et.length&&(ct&&rt({edges:handleControlledEdgeSelectionChange(et,ot)}),st==null||st(et))}const noop$1=()=>{},initialViewportHelper={zoomIn:noop$1,zoomOut:noop$1,zoomTo:noop$1,getZoom:()=>1,setViewport:noop$1,getViewport:()=>({x:0,y:0,zoom:1}),fitView:()=>!1,setCenter:noop$1,fitBounds:noop$1,project:tt=>tt,viewportInitialized:!1},selector$b=tt=>({d3Zoom:tt.d3Zoom,d3Selection:tt.d3Selection}),useViewportHelper=()=>{const tt=useStoreApi(),{d3Zoom:et,d3Selection:nt}=useStore(selector$b,shallow$1);return reactExports.useMemo(()=>nt&&et?{zoomIn:it=>et.scaleBy(getD3Transition(nt,it==null?void 0:it.duration),1.2),zoomOut:it=>et.scaleBy(getD3Transition(nt,it==null?void 0:it.duration),1/1.2),zoomTo:(it,ot)=>et.scaleTo(getD3Transition(nt,ot==null?void 0:ot.duration),it),getZoom:()=>tt.getState().transform[2],setViewport:(it,ot)=>{const[at,st,lt]=tt.getState().transform,ct=identity.translate(it.x??at,it.y??st).scale(it.zoom??lt);et.transform(getD3Transition(nt,ot==null?void 0:ot.duration),ct)},getViewport:()=>{const[it,ot,at]=tt.getState().transform;return{x:it,y:ot,zoom:at}},fitView:it=>fitView(tt.getState,it),setCenter:(it,ot,at)=>{const{width:st,height:lt,maxZoom:ct}=tt.getState(),ut=typeof(at==null?void 0:at.zoom)<"u"?at.zoom:ct,ht=st/2-it*ut,dt=lt/2-ot*ut,pt=identity.translate(ht,dt).scale(ut);et.transform(getD3Transition(nt,at==null?void 0:at.duration),pt)},fitBounds:(it,ot)=>{const{width:at,height:st,minZoom:lt,maxZoom:ct}=tt.getState(),[ut,ht,dt]=getTransformForBounds(it,at,st,lt,ct,(ot==null?void 0:ot.padding)??.1),pt=identity.translate(ut,ht).scale(dt);et.transform(getD3Transition(nt,ot==null?void 0:ot.duration),pt)},project:it=>{const{transform:ot,snapToGrid:at,snapGrid:st}=tt.getState();return pointToRendererPoint(it,ot,at,st)},viewportInitialized:!0}:initialViewportHelper,[et,nt])};function useReactFlow(){const tt=useViewportHelper(),et=useStoreApi(),nt=reactExports.useCallback(()=>et.getState().getNodes().map(gt=>({...gt})),[]),rt=reactExports.useCallback(gt=>et.getState().nodeInternals.get(gt),[]),it=reactExports.useCallback(()=>{const{edges:gt=[]}=et.getState();return gt.map(yt=>({...yt}))},[]),ot=reactExports.useCallback(gt=>{const{edges:yt=[]}=et.getState();return yt.find(bt=>bt.id===gt)},[]),at=reactExports.useCallback(gt=>{const{getNodes:yt,setNodes:bt,hasDefaultNodes:vt,onNodesChange:xt}=et.getState(),kt=yt(),St=typeof gt=="function"?gt(kt):gt;if(vt)bt(St);else if(xt){const Tt=St.length===0?kt.map(At=>({type:"remove",id:At.id})):St.map(At=>({item:At,type:"reset"}));xt(Tt)}},[]),st=reactExports.useCallback(gt=>{const{edges:yt=[],setEdges:bt,hasDefaultEdges:vt,onEdgesChange:xt}=et.getState(),kt=typeof gt=="function"?gt(yt):gt;if(vt)bt(kt);else if(xt){const St=kt.length===0?yt.map(Tt=>({type:"remove",id:Tt.id})):kt.map(Tt=>({item:Tt,type:"reset"}));xt(St)}},[]),lt=reactExports.useCallback(gt=>{const yt=Array.isArray(gt)?gt:[gt],{getNodes:bt,setNodes:vt,hasDefaultNodes:xt,onNodesChange:kt}=et.getState();if(xt){const Tt=[...bt(),...yt];vt(Tt)}else if(kt){const St=yt.map(Tt=>({item:Tt,type:"add"}));kt(St)}},[]),ct=reactExports.useCallback(gt=>{const yt=Array.isArray(gt)?gt:[gt],{edges:bt=[],setEdges:vt,hasDefaultEdges:xt,onEdgesChange:kt}=et.getState();if(xt)vt([...bt,...yt]);else if(kt){const St=yt.map(Tt=>({item:Tt,type:"add"}));kt(St)}},[]),ut=reactExports.useCallback(()=>{const{getNodes:gt,edges:yt=[],transform:bt}=et.getState(),[vt,xt,kt]=bt;return{nodes:gt().map(St=>({...St})),edges:yt.map(St=>({...St})),viewport:{x:vt,y:xt,zoom:kt}}},[]),ht=reactExports.useCallback(({nodes:gt,edges:yt})=>{const{nodeInternals:bt,getNodes:vt,edges:xt,hasDefaultNodes:kt,hasDefaultEdges:St,onNodesDelete:Tt,onEdgesDelete:At,onNodesChange:Et,onEdgesChange:$t}=et.getState(),Dt=(gt||[]).map(It=>It.id),jt=(yt||[]).map(It=>It.id),Pt=vt().reduce((It,Ot)=>{const Wt=!Dt.includes(Ot.id)&&Ot.parentNode&&It.find(Ft=>Ft.id===Ot.parentNode);return(typeof Ot.deletable=="boolean"?Ot.deletable:!0)&&(Dt.includes(Ot.id)||Wt)&&It.push(Ot),It},[]),Ct=xt.filter(It=>typeof It.deletable=="boolean"?It.deletable:!0),wt=Ct.filter(It=>jt.includes(It.id));if(Pt||wt){const It=getConnectedEdges(Pt,Ct),Ot=[...wt,...It],Wt=Ot.reduce((zt,Ft)=>(zt.includes(Ft.id)||zt.push(Ft.id),zt),[]);if((St||kt)&&(St&&et.setState({edges:xt.filter(zt=>!Wt.includes(zt.id))}),kt&&(Pt.forEach(zt=>{bt.delete(zt.id)}),et.setState({nodeInternals:new Map(bt)}))),Wt.length>0&&(At==null||At(Ot),$t&&$t(Wt.map(zt=>({id:zt,type:"remove"})))),Pt.length>0&&(Tt==null||Tt(Pt),Et)){const zt=Pt.map(Ft=>({id:Ft.id,type:"remove"}));Et(zt)}}},[]),dt=reactExports.useCallback(gt=>{const yt=isRectObject(gt),bt=yt?null:et.getState().nodeInternals.get(gt.id);return[yt?gt:nodeToRect(bt),bt,yt]},[]),pt=reactExports.useCallback((gt,yt=!0,bt)=>{const[vt,xt,kt]=dt(gt);return vt?(bt||et.getState().getNodes()).filter(St=>{if(!kt&&(St.id===xt.id||!St.positionAbsolute))return!1;const Tt=nodeToRect(St),At=getOverlappingArea(Tt,vt);return yt&&At>0||At>=gt.width*gt.height}):[]},[]),mt=reactExports.useCallback((gt,yt,bt=!0)=>{const[vt]=dt(gt);if(!vt)return!1;const xt=getOverlappingArea(vt,yt);return bt&&xt>0||xt>=gt.width*gt.height},[]);return reactExports.useMemo(()=>({...tt,getNodes:nt,getNode:rt,getEdges:it,getEdge:ot,setNodes:at,setEdges:st,addNodes:lt,addEdges:ct,toObject:ut,deleteElements:ht,getIntersectingNodes:pt,isNodeIntersecting:mt}),[tt,nt,rt,it,ot,at,st,lt,ct,ut,ht,pt,mt])}const deleteKeyOptions={actInsideInputWithModifier:!1};var useGlobalKeyHandler=({deleteKeyCode:tt,multiSelectionKeyCode:et})=>{const nt=useStoreApi(),{deleteElements:rt}=useReactFlow(),it=useKeyPress(tt,deleteKeyOptions),ot=useKeyPress(et);reactExports.useEffect(()=>{if(it){const{edges:at,getNodes:st}=nt.getState(),lt=st().filter(ut=>ut.selected),ct=at.filter(ut=>ut.selected);rt({nodes:lt,edges:ct}),nt.setState({nodesSelectionActive:!1})}},[it]),reactExports.useEffect(()=>{nt.setState({multiSelectionActive:ot})},[ot])};function useResizeHandler(tt){const et=useStoreApi();reactExports.useEffect(()=>{let nt;const rt=()=>{var ot,at;if(!tt.current)return;const it=getDimensions(tt.current);(it.height===0||it.width===0)&&((at=(ot=et.getState()).onError)==null||at.call(ot,"004",errorMessages.error004())),et.setState({width:it.width||500,height:it.height||500})};return rt(),window.addEventListener("resize",rt),tt.current&&(nt=new ResizeObserver(()=>rt()),nt.observe(tt.current)),()=>{window.removeEventListener("resize",rt),nt&&tt.current&&nt.unobserve(tt.current)}},[])}const containerStyle={position:"absolute",width:"100%",height:"100%",top:0,left:0},viewChanged=(tt,et)=>tt.x!==et.x||tt.y!==et.y||tt.zoom!==et.k,eventToFlowTransform=tt=>({x:tt.x,y:tt.y,zoom:tt.k}),isWrappedWithClass=(tt,et)=>tt.target.closest(`.${et}`),isRightClickPan=(tt,et)=>et===2&&Array.isArray(tt)&&tt.includes(2),wheelDelta=tt=>{const et=tt.ctrlKey&&isMacOs()?10:1;return-tt.deltaY*(tt.deltaMode===1?.05:tt.deltaMode?1:.002)*et},selector$a=tt=>({d3Zoom:tt.d3Zoom,d3Selection:tt.d3Selection,d3ZoomHandler:tt.d3ZoomHandler,userSelectionActive:tt.userSelectionActive}),ZoomPane=({onMove:tt,onMoveStart:et,onMoveEnd:nt,onPaneContextMenu:rt,zoomOnScroll:it=!0,zoomOnPinch:ot=!0,panOnScroll:at=!1,panOnScrollSpeed:st=.5,panOnScrollMode:lt=PanOnScrollMode.Free,zoomOnDoubleClick:ct=!0,elementsSelectable:ut,panOnDrag:ht=!0,defaultViewport:dt,translateExtent:pt,minZoom:mt,maxZoom:gt,zoomActivationKeyCode:yt,preventScrolling:bt=!0,children:vt,noWheelClassName:xt,noPanClassName:kt})=>{const St=reactExports.useRef(),Tt=useStoreApi(),At=reactExports.useRef(!1),Et=reactExports.useRef(!1),$t=reactExports.useRef(null),Dt=reactExports.useRef({x:0,y:0,zoom:0}),{d3Zoom:jt,d3Selection:Pt,d3ZoomHandler:Ct,userSelectionActive:wt}=useStore(selector$a,shallow$1),It=useKeyPress(yt),Ot=reactExports.useRef(0),Wt=reactExports.useRef(!1),zt=reactExports.useRef();return useResizeHandler($t),reactExports.useEffect(()=>{if($t.current){const Ft=$t.current.getBoundingClientRect(),Nt=zoom().scaleExtent([mt,gt]).translateExtent(pt),Ut=select($t.current).call(Nt),Mt=identity.translate(dt.x,dt.y).scale(clamp(dt.zoom,mt,gt)),Ht=[[0,0],[Ft.width,Ft.height]],en=Nt.constrain()(Mt,Ht,pt);Nt.transform(Ut,en),Nt.wheelDelta(wheelDelta),Tt.setState({d3Zoom:Nt,d3Selection:Ut,d3ZoomHandler:Ut.on("wheel.zoom"),transform:[en.x,en.y,en.k],domNode:$t.current.closest(".react-flow")})}},[]),reactExports.useEffect(()=>{Pt&&jt&&(at&&!It&&!wt?Pt.on("wheel.zoom",Ft=>{if(isWrappedWithClass(Ft,xt))return!1;Ft.preventDefault(),Ft.stopImmediatePropagation();const Nt=Pt.property("__zoom").k||1,Ut=isMacOs();if(Ft.ctrlKey&&ot&&Ut){const hn=pointer(Ft),vn=wheelDelta(Ft),an=Nt*Math.pow(2,vn);jt.scaleTo(Pt,an,hn,Ft);return}const Mt=Ft.deltaMode===1?20:1;let Ht=lt===PanOnScrollMode.Vertical?0:Ft.deltaX*Mt,en=lt===PanOnScrollMode.Horizontal?0:Ft.deltaY*Mt;!Ut&&Ft.shiftKey&<!==PanOnScrollMode.Vertical&&(Ht=Ft.deltaY*Mt,en=0),jt.translateBy(Pt,-(Ht/Nt)*st,-(en/Nt)*st,{internal:!0});const sn=eventToFlowTransform(Pt.property("__zoom")),{onViewportChangeStart:Kt,onViewportChange:rn,onViewportChangeEnd:nn}=Tt.getState();clearTimeout(zt.current),Wt.current||(Wt.current=!0,et==null||et(Ft,sn),Kt==null||Kt(sn)),Wt.current&&(tt==null||tt(Ft,sn),rn==null||rn(sn),zt.current=setTimeout(()=>{nt==null||nt(Ft,sn),nn==null||nn(sn),Wt.current=!1},150))},{passive:!1}):typeof Ct<"u"&&Pt.on("wheel.zoom",function(Ft,Nt){if(!bt||isWrappedWithClass(Ft,xt))return null;Ft.preventDefault(),Ct.call(this,Ft,Nt)},{passive:!1}))},[wt,at,lt,Pt,jt,Ct,It,ot,bt,xt,et,tt,nt]),reactExports.useEffect(()=>{jt&&jt.on("start",Ft=>{var Mt,Ht;if(!Ft.sourceEvent||Ft.sourceEvent.internal)return null;Ot.current=(Mt=Ft.sourceEvent)==null?void 0:Mt.button;const{onViewportChangeStart:Nt}=Tt.getState(),Ut=eventToFlowTransform(Ft.transform);At.current=!0,Dt.current=Ut,((Ht=Ft.sourceEvent)==null?void 0:Ht.type)==="mousedown"&&Tt.setState({paneDragging:!0}),Nt==null||Nt(Ut),et==null||et(Ft.sourceEvent,Ut)})},[jt,et]),reactExports.useEffect(()=>{jt&&(wt&&!At.current?jt.on("zoom",null):wt||jt.on("zoom",Ft=>{var Ut;const{onViewportChange:Nt}=Tt.getState();if(Tt.setState({transform:[Ft.transform.x,Ft.transform.y,Ft.transform.k]}),Et.current=!!(rt&&isRightClickPan(ht,Ot.current??0)),(tt||Nt)&&!((Ut=Ft.sourceEvent)!=null&&Ut.internal)){const Mt=eventToFlowTransform(Ft.transform);Nt==null||Nt(Mt),tt==null||tt(Ft.sourceEvent,Mt)}}))},[wt,jt,tt,ht,rt]),reactExports.useEffect(()=>{jt&&jt.on("end",Ft=>{if(!Ft.sourceEvent||Ft.sourceEvent.internal)return null;const{onViewportChangeEnd:Nt}=Tt.getState();if(At.current=!1,Tt.setState({paneDragging:!1}),rt&&isRightClickPan(ht,Ot.current??0)&&!Et.current&&rt(Ft.sourceEvent),Et.current=!1,(nt||Nt)&&viewChanged(Dt.current,Ft.transform)){const Ut=eventToFlowTransform(Ft.transform);Dt.current=Ut,clearTimeout(St.current),St.current=setTimeout(()=>{Nt==null||Nt(Ut),nt==null||nt(Ft.sourceEvent,Ut)},at?150:0)}})},[jt,at,ht,nt,rt]),reactExports.useEffect(()=>{jt&&jt.filter(Ft=>{const Nt=It||it,Ut=ot&&Ft.ctrlKey;if((ht===!0||Array.isArray(ht)&&ht.includes(1))&&Ft.button===1&&Ft.type==="mousedown"&&(isWrappedWithClass(Ft,"react-flow__node")||isWrappedWithClass(Ft,"react-flow__edge")))return!0;if(!ht&&!Nt&&!at&&!ct&&!ot||wt||!ct&&Ft.type==="dblclick"||isWrappedWithClass(Ft,xt)&&Ft.type==="wheel"||isWrappedWithClass(Ft,kt)&&(Ft.type!=="wheel"||at&&Ft.type==="wheel")||!ot&&Ft.ctrlKey&&Ft.type==="wheel"||!Nt&&!at&&!Ut&&Ft.type==="wheel"||!ht&&(Ft.type==="mousedown"||Ft.type==="touchstart")||Array.isArray(ht)&&!ht.includes(Ft.button)&&(Ft.type==="mousedown"||Ft.type==="touchstart"))return!1;const Mt=Array.isArray(ht)&&ht.includes(Ft.button)||!Ft.button||Ft.button<=1;return(!Ft.ctrlKey||Ft.type==="wheel")&&Mt})},[wt,jt,it,ot,at,ct,ht,ut,It]),React$1.createElement("div",{className:"react-flow__renderer",ref:$t,style:containerStyle},vt)},selector$9=tt=>({userSelectionActive:tt.userSelectionActive,userSelectionRect:tt.userSelectionRect});function UserSelection(){const{userSelectionActive:tt,userSelectionRect:et}=useStore(selector$9,shallow$1);return tt&&et?React$1.createElement("div",{className:"react-flow__selection react-flow__container",style:{width:et.width,height:et.height,transform:`translate(${et.x}px, ${et.y}px)`}}):null}function handleParentExpand(tt,et){const nt=tt.find(rt=>rt.id===et.parentNode);if(nt){const rt=et.position.x+et.width-nt.width,it=et.position.y+et.height-nt.height;if(rt>0||it>0||et.position.x<0||et.position.y<0){if(nt.style={...nt.style},nt.style.width=nt.style.width??nt.width,nt.style.height=nt.style.height??nt.height,rt>0&&(nt.style.width+=rt),it>0&&(nt.style.height+=it),et.position.x<0){const ot=Math.abs(et.position.x);nt.position.x=nt.position.x-ot,nt.style.width+=ot,et.position.x=0}if(et.position.y<0){const ot=Math.abs(et.position.y);nt.position.y=nt.position.y-ot,nt.style.height+=ot,et.position.y=0}nt.width=nt.style.width,nt.height=nt.style.height}}}function applyChanges(tt,et){if(tt.some(rt=>rt.type==="reset"))return tt.filter(rt=>rt.type==="reset").map(rt=>rt.item);const nt=tt.filter(rt=>rt.type==="add").map(rt=>rt.item);return et.reduce((rt,it)=>{const ot=tt.filter(st=>st.id===it.id);if(ot.length===0)return rt.push(it),rt;const at={...it};for(const st of ot)if(st)switch(st.type){case"select":{at.selected=st.selected;break}case"position":{typeof st.position<"u"&&(at.position=st.position),typeof st.positionAbsolute<"u"&&(at.positionAbsolute=st.positionAbsolute),typeof st.dragging<"u"&&(at.dragging=st.dragging),at.expandParent&&handleParentExpand(rt,at);break}case"dimensions":{typeof st.dimensions<"u"&&(at.width=st.dimensions.width,at.height=st.dimensions.height),typeof st.updateStyle<"u"&&(at.style={...at.style||{},...st.dimensions}),typeof st.resizing=="boolean"&&(at.resizing=st.resizing),at.expandParent&&handleParentExpand(rt,at);break}case"remove":return rt}return rt.push(at),rt},nt)}function applyNodeChanges(tt,et){return applyChanges(tt,et)}const createSelectionChange=(tt,et)=>({id:tt,type:"select",selected:et});function getSelectionChanges(tt,et){return tt.reduce((nt,rt)=>{const it=et.includes(rt.id);return!rt.selected&&it?(rt.selected=!0,nt.push(createSelectionChange(rt.id,!0))):rt.selected&&!it&&(rt.selected=!1,nt.push(createSelectionChange(rt.id,!1))),nt},[])}const wrapHandler=(tt,et)=>nt=>{nt.target===et.current&&(tt==null||tt(nt))},selector$8=tt=>({userSelectionActive:tt.userSelectionActive,elementsSelectable:tt.elementsSelectable,dragging:tt.paneDragging}),Pane=reactExports.memo(({isSelecting:tt,selectionMode:et=SelectionMode.Full,panOnDrag:nt,onSelectionStart:rt,onSelectionEnd:it,onPaneClick:ot,onPaneContextMenu:at,onPaneScroll:st,onPaneMouseEnter:lt,onPaneMouseMove:ct,onPaneMouseLeave:ut,children:ht})=>{const dt=reactExports.useRef(null),pt=useStoreApi(),mt=reactExports.useRef(0),gt=reactExports.useRef(0),yt=reactExports.useRef(),{userSelectionActive:bt,elementsSelectable:vt,dragging:xt}=useStore(selector$8,shallow$1),kt=()=>{pt.setState({userSelectionActive:!1,userSelectionRect:null}),mt.current=0,gt.current=0},St=Ct=>{ot==null||ot(Ct),pt.getState().resetSelectedElements(),pt.setState({nodesSelectionActive:!1})},Tt=Ct=>{if(Array.isArray(nt)&&(nt!=null&&nt.includes(2))){Ct.preventDefault();return}at==null||at(Ct)},At=st?Ct=>st(Ct):void 0,Et=Ct=>{const{resetSelectedElements:wt,domNode:It}=pt.getState();if(yt.current=It==null?void 0:It.getBoundingClientRect(),!vt||!tt||Ct.button!==0||Ct.target!==dt.current||!yt.current)return;const{x:Ot,y:Wt}=getEventPosition(Ct,yt.current);wt(),pt.setState({userSelectionRect:{width:0,height:0,startX:Ot,startY:Wt,x:Ot,y:Wt}}),rt==null||rt(Ct)},$t=Ct=>{const{userSelectionRect:wt,nodeInternals:It,edges:Ot,transform:Wt,onNodesChange:zt,onEdgesChange:Ft,nodeOrigin:Nt,getNodes:Ut}=pt.getState();if(!tt||!yt.current||!wt)return;pt.setState({userSelectionActive:!0,nodesSelectionActive:!1});const Mt=getEventPosition(Ct,yt.current),Ht=wt.startX??0,en=wt.startY??0,sn={...wt,x:Mt.xvn.id),hn=rn.map(vn=>vn.id);if(mt.current!==hn.length){mt.current=hn.length;const vn=getSelectionChanges(Kt,hn);vn.length&&(zt==null||zt(vn))}if(gt.current!==nn.length){gt.current=nn.length;const vn=getSelectionChanges(Ot,nn);vn.length&&(Ft==null||Ft(vn))}pt.setState({userSelectionRect:sn})},Dt=Ct=>{if(Ct.button!==0)return;const{userSelectionRect:wt}=pt.getState();!bt&&wt&&Ct.target===dt.current&&(St==null||St(Ct)),pt.setState({nodesSelectionActive:mt.current>0}),kt(),it==null||it(Ct)},jt=Ct=>{bt&&(pt.setState({nodesSelectionActive:mt.current>0}),it==null||it(Ct)),kt()},Pt=vt&&(tt||bt);return React$1.createElement("div",{className:cc(["react-flow__pane",{dragging:xt,selection:tt}]),onClick:Pt?void 0:wrapHandler(St,dt),onContextMenu:wrapHandler(Tt,dt),onWheel:wrapHandler(At,dt),onMouseEnter:Pt?void 0:lt,onMouseDown:Pt?Et:void 0,onMouseMove:Pt?$t:ct,onMouseUp:Pt?Dt:void 0,onMouseLeave:Pt?jt:ut,ref:dt,style:containerStyle},ht,React$1.createElement(UserSelection,null))});Pane.displayName="Pane";function isParentSelected(tt,et){if(!tt.parentNode)return!1;const nt=et.get(tt.parentNode);return nt?nt.selected?!0:isParentSelected(nt,et):!1}function hasSelector(tt,et,nt){let rt=tt;do{if(rt!=null&&rt.matches(et))return!0;if(rt===nt.current)return!1;rt=rt.parentElement}while(rt);return!1}function getDragItems(tt,et,nt,rt){return Array.from(tt.values()).filter(it=>(it.selected||it.id===rt)&&(!it.parentNode||!isParentSelected(it,tt))&&(it.draggable||et&&typeof it.draggable>"u")).map(it=>{var ot,at;return{id:it.id,position:it.position||{x:0,y:0},positionAbsolute:it.positionAbsolute||{x:0,y:0},distance:{x:nt.x-(((ot=it.positionAbsolute)==null?void 0:ot.x)??0),y:nt.y-(((at=it.positionAbsolute)==null?void 0:at.y)??0)},delta:{x:0,y:0},extent:it.extent,parentNode:it.parentNode,width:it.width,height:it.height,expandParent:it.expandParent}})}function clampNodeExtent(tt,et){return!et||et==="parent"?et:[et[0],[et[1][0]-(tt.width||0),et[1][1]-(tt.height||0)]]}function calcNextPosition(tt,et,nt,rt,it=[0,0],ot){const at=clampNodeExtent(tt,tt.extent||rt);let st=at;if(tt.extent==="parent"&&!tt.expandParent)if(tt.parentNode&&tt.width&&tt.height){const ut=nt.get(tt.parentNode),{x:ht,y:dt}=getNodePositionWithOrigin(ut,it).positionAbsolute;st=ut&&isNumeric(ht)&&isNumeric(dt)&&isNumeric(ut.width)&&isNumeric(ut.height)?[[ht+tt.width*it[0],dt+tt.height*it[1]],[ht+ut.width-tt.width+tt.width*it[0],dt+ut.height-tt.height+tt.height*it[1]]]:st}else ot==null||ot("005",errorMessages.error005()),st=at;else if(tt.extent&&tt.parentNode&&tt.extent!=="parent"){const ut=nt.get(tt.parentNode),{x:ht,y:dt}=getNodePositionWithOrigin(ut,it).positionAbsolute;st=[[tt.extent[0][0]+ht,tt.extent[0][1]+dt],[tt.extent[1][0]+ht,tt.extent[1][1]+dt]]}let lt={x:0,y:0};if(tt.parentNode){const ut=nt.get(tt.parentNode);lt=getNodePositionWithOrigin(ut,it).positionAbsolute}const ct=st&&st!=="parent"?clampPosition(et,st):et;return{position:{x:ct.x-lt.x,y:ct.y-lt.y},positionAbsolute:ct}}function getEventHandlerParams({nodeId:tt,dragItems:et,nodeInternals:nt}){const rt=et.map(it=>({...nt.get(it.id),position:it.position,positionAbsolute:it.positionAbsolute}));return[tt?rt.find(it=>it.id===tt):rt[0],rt]}const getHandleBounds=(tt,et,nt,rt)=>{const it=et.querySelectorAll(tt);if(!it||!it.length)return null;const ot=Array.from(it),at=et.getBoundingClientRect(),st={x:at.width*rt[0],y:at.height*rt[1]};return ot.map(lt=>{const ct=lt.getBoundingClientRect();return{id:lt.getAttribute("data-handleid"),position:lt.getAttribute("data-handlepos"),x:(ct.left-at.left-st.x)/nt,y:(ct.top-at.top-st.y)/nt,...getDimensions(lt)}})};function getMouseHandler(tt,et,nt){return nt===void 0?nt:rt=>{const it=et().nodeInternals.get(tt);it&&nt(rt,{...it})}}function handleNodeClick({id:tt,store:et,unselect:nt=!1,nodeRef:rt}){const{addSelectedNodes:it,unselectNodesAndEdges:ot,multiSelectionActive:at,nodeInternals:st,onError:lt}=et.getState(),ct=st.get(tt);if(!ct){lt==null||lt("012",errorMessages.error012(tt));return}et.setState({nodesSelectionActive:!1}),ct.selected?(nt||ct.selected&&at)&&(ot({nodes:[ct],edges:[]}),requestAnimationFrame(()=>{var ut;return(ut=rt==null?void 0:rt.current)==null?void 0:ut.blur()})):it([tt])}function useGetPointerPosition(){const tt=useStoreApi();return reactExports.useCallback(({sourceEvent:nt})=>{const{transform:rt,snapGrid:it,snapToGrid:ot}=tt.getState(),at=nt.touches?nt.touches[0].clientX:nt.clientX,st=nt.touches?nt.touches[0].clientY:nt.clientY,lt={x:(at-rt[0])/rt[2],y:(st-rt[1])/rt[2]};return{xSnapped:ot?it[0]*Math.round(lt.x/it[0]):lt.x,ySnapped:ot?it[1]*Math.round(lt.y/it[1]):lt.y,...lt}},[])}function wrapSelectionDragFunc(tt){return(et,nt,rt)=>tt==null?void 0:tt(et,rt)}function useDrag({nodeRef:tt,disabled:et=!1,noDragClassName:nt,handleSelector:rt,nodeId:it,isSelectable:ot,selectNodesOnDrag:at}){const st=useStoreApi(),[lt,ct]=reactExports.useState(!1),ut=reactExports.useRef([]),ht=reactExports.useRef({x:null,y:null}),dt=reactExports.useRef(0),pt=reactExports.useRef(null),mt=reactExports.useRef({x:0,y:0}),gt=reactExports.useRef(null),yt=reactExports.useRef(!1),bt=reactExports.useRef(!1),vt=useGetPointerPosition();return reactExports.useEffect(()=>{if(tt!=null&&tt.current){const xt=select(tt.current),kt=({x:At,y:Et})=>{const{nodeInternals:$t,onNodeDrag:Dt,onSelectionDrag:jt,updateNodePositions:Pt,nodeExtent:Ct,snapGrid:wt,snapToGrid:It,nodeOrigin:Ot,onError:Wt}=st.getState();ht.current={x:At,y:Et};let zt=!1,Ft={x:0,y:0,x2:0,y2:0};if(ut.current.length>1&&Ct){const Ut=getRectOfNodes(ut.current,Ot);Ft=rectToBox(Ut)}if(ut.current=ut.current.map(Ut=>{const Mt={x:At-Ut.distance.x,y:Et-Ut.distance.y};It&&(Mt.x=wt[0]*Math.round(Mt.x/wt[0]),Mt.y=wt[1]*Math.round(Mt.y/wt[1]));const Ht=[[Ct[0][0],Ct[0][1]],[Ct[1][0],Ct[1][1]]];ut.current.length>1&&Ct&&!Ut.extent&&(Ht[0][0]=Ut.positionAbsolute.x-Ft.x+Ct[0][0],Ht[1][0]=Ut.positionAbsolute.x+(Ut.width??0)-Ft.x2+Ct[1][0],Ht[0][1]=Ut.positionAbsolute.y-Ft.y+Ct[0][1],Ht[1][1]=Ut.positionAbsolute.y+(Ut.height??0)-Ft.y2+Ct[1][1]);const en=calcNextPosition(Ut,Mt,$t,Ht,Ot,Wt);return zt=zt||Ut.position.x!==en.position.x||Ut.position.y!==en.position.y,Ut.position=en.position,Ut.positionAbsolute=en.positionAbsolute,Ut}),!zt)return;Pt(ut.current,!0,!0),ct(!0);const Nt=it?Dt:wrapSelectionDragFunc(jt);if(Nt&>.current){const[Ut,Mt]=getEventHandlerParams({nodeId:it,dragItems:ut.current,nodeInternals:$t});Nt(gt.current,Ut,Mt)}},St=()=>{if(!pt.current)return;const[At,Et]=calcAutoPan(mt.current,pt.current);if(At!==0||Et!==0){const{transform:$t,panBy:Dt}=st.getState();ht.current.x=(ht.current.x??0)-At/$t[2],ht.current.y=(ht.current.y??0)-Et/$t[2],Dt({x:At,y:Et})&&kt(ht.current)}dt.current=requestAnimationFrame(St)},Tt=At=>{var Ot;const{nodeInternals:Et,multiSelectionActive:$t,nodesDraggable:Dt,unselectNodesAndEdges:jt,onNodeDragStart:Pt,onSelectionDragStart:Ct}=st.getState();bt.current=!0;const wt=it?Pt:wrapSelectionDragFunc(Ct);(!at||!ot)&&!$t&&it&&((Ot=Et.get(it))!=null&&Ot.selected||jt()),it&&ot&&at&&handleNodeClick({id:it,store:st,nodeRef:tt});const It=vt(At);if(ht.current=It,ut.current=getDragItems(Et,Dt,It,it),wt&&ut.current){const[Wt,zt]=getEventHandlerParams({nodeId:it,dragItems:ut.current,nodeInternals:Et});wt(At.sourceEvent,Wt,zt)}};if(et)xt.on(".drag",null);else{const At=drag().on("start",Et=>{const{domNode:$t,nodeDragThreshold:Dt}=st.getState();Dt===0&&Tt(Et);const jt=vt(Et);ht.current=jt,pt.current=($t==null?void 0:$t.getBoundingClientRect())||null,mt.current=getEventPosition(Et.sourceEvent,pt.current)}).on("drag",Et=>{var Pt,Ct;const $t=vt(Et),{autoPanOnNodeDrag:Dt,nodeDragThreshold:jt}=st.getState();if(!yt.current&&bt.current&&Dt&&(yt.current=!0,St()),!bt.current){const wt=$t.xSnapped-(((Pt=ht==null?void 0:ht.current)==null?void 0:Pt.x)??0),It=$t.ySnapped-(((Ct=ht==null?void 0:ht.current)==null?void 0:Ct.y)??0);Math.sqrt(wt*wt+It*It)>jt&&Tt(Et)}(ht.current.x!==$t.xSnapped||ht.current.y!==$t.ySnapped)&&ut.current&&bt.current&&(gt.current=Et.sourceEvent,mt.current=getEventPosition(Et.sourceEvent,pt.current),kt($t))}).on("end",Et=>{if(bt.current&&(ct(!1),yt.current=!1,bt.current=!1,cancelAnimationFrame(dt.current),ut.current)){const{updateNodePositions:$t,nodeInternals:Dt,onNodeDragStop:jt,onSelectionDragStop:Pt}=st.getState(),Ct=it?jt:wrapSelectionDragFunc(Pt);if($t(ut.current,!1,!1),Ct){const[wt,It]=getEventHandlerParams({nodeId:it,dragItems:ut.current,nodeInternals:Dt});Ct(Et.sourceEvent,wt,It)}}}).filter(Et=>{const $t=Et.target;return!Et.button&&(!nt||!hasSelector($t,`.${nt}`,tt))&&(!rt||hasSelector($t,rt,tt))});return xt.call(At),()=>{xt.on(".drag",null)}}}},[tt,et,nt,rt,ot,st,it,at,vt]),lt}function useUpdateNodePositions(){const tt=useStoreApi();return reactExports.useCallback(nt=>{const{nodeInternals:rt,nodeExtent:it,updateNodePositions:ot,getNodes:at,snapToGrid:st,snapGrid:lt,onError:ct,nodesDraggable:ut}=tt.getState(),ht=at().filter(vt=>vt.selected&&(vt.draggable||ut&&typeof vt.draggable>"u")),dt=st?lt[0]:5,pt=st?lt[1]:5,mt=nt.isShiftPressed?4:1,gt=nt.x*dt*mt,yt=nt.y*pt*mt,bt=ht.map(vt=>{if(vt.positionAbsolute){const xt={x:vt.positionAbsolute.x+gt,y:vt.positionAbsolute.y+yt};st&&(xt.x=lt[0]*Math.round(xt.x/lt[0]),xt.y=lt[1]*Math.round(xt.y/lt[1]));const{positionAbsolute:kt,position:St}=calcNextPosition(vt,xt,rt,it,void 0,ct);vt.position=St,vt.positionAbsolute=kt}return vt});ot(bt,!0,!1)},[])}const arrowKeyDiffs={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}};var wrapNode=tt=>{const et=({id:nt,type:rt,data:it,xPos:ot,yPos:at,xPosOrigin:st,yPosOrigin:lt,selected:ct,onClick:ut,onMouseEnter:ht,onMouseMove:dt,onMouseLeave:pt,onContextMenu:mt,onDoubleClick:gt,style:yt,className:bt,isDraggable:vt,isSelectable:xt,isConnectable:kt,isFocusable:St,selectNodesOnDrag:Tt,sourcePosition:At,targetPosition:Et,hidden:$t,resizeObserver:Dt,dragHandle:jt,zIndex:Pt,isParent:Ct,noDragClassName:wt,noPanClassName:It,initialized:Ot,disableKeyboardA11y:Wt,ariaLabel:zt,rfId:Ft})=>{const Nt=useStoreApi(),Ut=reactExports.useRef(null),Mt=reactExports.useRef(At),Ht=reactExports.useRef(Et),en=reactExports.useRef(rt),sn=xt||vt||ut||ht||dt||pt,Kt=useUpdateNodePositions(),rn=getMouseHandler(nt,Nt.getState,ht),nn=getMouseHandler(nt,Nt.getState,dt),hn=getMouseHandler(nt,Nt.getState,pt),vn=getMouseHandler(nt,Nt.getState,mt),an=getMouseHandler(nt,Nt.getState,gt),Qt=$n=>{const{nodeDragThreshold:Nn}=Nt.getState();if(xt&&(!Tt||!vt||Nn>0)&&handleNodeClick({id:nt,store:Nt,nodeRef:Ut}),ut){const Tn=Nt.getState().nodeInternals.get(nt);Tn&&ut($n,{...Tn})}},_n=$n=>{if(!isInputDOMNode($n))if(elementSelectionKeys.includes($n.key)&&xt){const Nn=$n.key==="Escape";handleNodeClick({id:nt,store:Nt,unselect:Nn,nodeRef:Ut})}else!Wt&&vt&&ct&&Object.prototype.hasOwnProperty.call(arrowKeyDiffs,$n.key)&&(Nt.setState({ariaLiveMessage:`Moved selected node ${$n.key.replace("Arrow","").toLowerCase()}. New position, x: ${~~ot}, y: ${~~at}`}),Kt({x:arrowKeyDiffs[$n.key].x,y:arrowKeyDiffs[$n.key].y,isShiftPressed:$n.shiftKey}))};reactExports.useEffect(()=>{if(Ut.current&&!$t){const $n=Ut.current;return Dt==null||Dt.observe($n),()=>Dt==null?void 0:Dt.unobserve($n)}},[$t]),reactExports.useEffect(()=>{const $n=en.current!==rt,Nn=Mt.current!==At,Tn=Ht.current!==Et;Ut.current&&($n||Nn||Tn)&&($n&&(en.current=rt),Nn&&(Mt.current=At),Tn&&(Ht.current=Et),Nt.getState().updateNodeDimensions([{id:nt,nodeElement:Ut.current,forceUpdate:!0}]))},[nt,rt,At,Et]);const Pn=useDrag({nodeRef:Ut,disabled:$t||!vt,noDragClassName:wt,handleSelector:jt,nodeId:nt,isSelectable:xt,selectNodesOnDrag:Tt});return $t?null:React$1.createElement("div",{className:cc(["react-flow__node",`react-flow__node-${rt}`,{[It]:vt},bt,{selected:ct,selectable:xt,parent:Ct,dragging:Pn}]),ref:Ut,style:{zIndex:Pt,transform:`translate(${st}px,${lt}px)`,pointerEvents:sn?"all":"none",visibility:Ot?"visible":"hidden",...yt},"data-id":nt,"data-testid":`rf__node-${nt}`,onMouseEnter:rn,onMouseMove:nn,onMouseLeave:hn,onContextMenu:vn,onClick:Qt,onDoubleClick:an,onKeyDown:St?_n:void 0,tabIndex:St?0:void 0,role:St?"button":void 0,"aria-describedby":Wt?void 0:`${ARIA_NODE_DESC_KEY}-${Ft}`,"aria-label":zt},React$1.createElement(Provider,{value:nt},React$1.createElement(tt,{id:nt,data:it,type:rt,xPos:ot,yPos:at,selected:ct,isConnectable:kt,sourcePosition:At,targetPosition:Et,dragging:Pn,dragHandle:jt,zIndex:Pt})))};return et.displayName="NodeWrapper",reactExports.memo(et)};const selector$7=tt=>{const et=tt.getNodes().filter(nt=>nt.selected);return{...getRectOfNodes(et,tt.nodeOrigin),transformString:`translate(${tt.transform[0]}px,${tt.transform[1]}px) scale(${tt.transform[2]})`,userSelectionActive:tt.userSelectionActive}};function NodesSelection({onSelectionContextMenu:tt,noPanClassName:et,disableKeyboardA11y:nt}){const rt=useStoreApi(),{width:it,height:ot,x:at,y:st,transformString:lt,userSelectionActive:ct}=useStore(selector$7,shallow$1),ut=useUpdateNodePositions(),ht=reactExports.useRef(null);if(reactExports.useEffect(()=>{var mt;nt||(mt=ht.current)==null||mt.focus({preventScroll:!0})},[nt]),useDrag({nodeRef:ht}),ct||!it||!ot)return null;const dt=tt?mt=>{const gt=rt.getState().getNodes().filter(yt=>yt.selected);tt(mt,gt)}:void 0,pt=mt=>{Object.prototype.hasOwnProperty.call(arrowKeyDiffs,mt.key)&&ut({x:arrowKeyDiffs[mt.key].x,y:arrowKeyDiffs[mt.key].y,isShiftPressed:mt.shiftKey})};return React$1.createElement("div",{className:cc(["react-flow__nodesselection","react-flow__container",et]),style:{transform:lt}},React$1.createElement("div",{ref:ht,className:"react-flow__nodesselection-rect",onContextMenu:dt,tabIndex:nt?void 0:-1,onKeyDown:nt?void 0:pt,style:{width:it,height:ot,top:st,left:at}}))}var NodesSelection$1=reactExports.memo(NodesSelection);const selector$6=tt=>tt.nodesSelectionActive,FlowRenderer=({children:tt,onPaneClick:et,onPaneMouseEnter:nt,onPaneMouseMove:rt,onPaneMouseLeave:it,onPaneContextMenu:ot,onPaneScroll:at,deleteKeyCode:st,onMove:lt,onMoveStart:ct,onMoveEnd:ut,selectionKeyCode:ht,selectionOnDrag:dt,selectionMode:pt,onSelectionStart:mt,onSelectionEnd:gt,multiSelectionKeyCode:yt,panActivationKeyCode:bt,zoomActivationKeyCode:vt,elementsSelectable:xt,zoomOnScroll:kt,zoomOnPinch:St,panOnScroll:Tt,panOnScrollSpeed:At,panOnScrollMode:Et,zoomOnDoubleClick:$t,panOnDrag:Dt,defaultViewport:jt,translateExtent:Pt,minZoom:Ct,maxZoom:wt,preventScrolling:It,onSelectionContextMenu:Ot,noWheelClassName:Wt,noPanClassName:zt,disableKeyboardA11y:Ft})=>{const Nt=useStore(selector$6),Ut=useKeyPress(ht),Ht=useKeyPress(bt)||Dt,en=Ut||dt&&Ht!==!0;return useGlobalKeyHandler({deleteKeyCode:st,multiSelectionKeyCode:yt}),React$1.createElement(ZoomPane,{onMove:lt,onMoveStart:ct,onMoveEnd:ut,onPaneContextMenu:ot,elementsSelectable:xt,zoomOnScroll:kt,zoomOnPinch:St,panOnScroll:Tt,panOnScrollSpeed:At,panOnScrollMode:Et,zoomOnDoubleClick:$t,panOnDrag:!Ut&&Ht,defaultViewport:jt,translateExtent:Pt,minZoom:Ct,maxZoom:wt,zoomActivationKeyCode:vt,preventScrolling:It,noWheelClassName:Wt,noPanClassName:zt},React$1.createElement(Pane,{onSelectionStart:mt,onSelectionEnd:gt,onPaneClick:et,onPaneMouseEnter:nt,onPaneMouseMove:rt,onPaneMouseLeave:it,onPaneContextMenu:ot,onPaneScroll:at,panOnDrag:Ht,isSelecting:!!en,selectionMode:pt},tt,Nt&&React$1.createElement(NodesSelection$1,{onSelectionContextMenu:Ot,noPanClassName:zt,disableKeyboardA11y:Ft})))};FlowRenderer.displayName="FlowRenderer";var FlowRenderer$1=reactExports.memo(FlowRenderer);function useVisibleNodes(tt){return useStore(reactExports.useCallback(nt=>tt?getNodesInside(nt.nodeInternals,{x:0,y:0,width:nt.width,height:nt.height},nt.transform,!0):nt.getNodes(),[tt]))}function createNodeTypes(tt){const et={input:wrapNode(tt.input||InputNode$1),default:wrapNode(tt.default||DefaultNode$1),output:wrapNode(tt.output||OutputNode$1),group:wrapNode(tt.group||GroupNode)},nt={},rt=Object.keys(tt).filter(it=>!["input","default","output","group"].includes(it)).reduce((it,ot)=>(it[ot]=wrapNode(tt[ot]||DefaultNode$1),it),nt);return{...et,...rt}}const getPositionWithOrigin=({x:tt,y:et,width:nt,height:rt,origin:it})=>!nt||!rt?{x:tt,y:et}:it[0]<0||it[1]<0||it[0]>1||it[1]>1?{x:tt,y:et}:{x:tt-nt*it[0],y:et-rt*it[1]},selector$5=tt=>({nodesDraggable:tt.nodesDraggable,nodesConnectable:tt.nodesConnectable,nodesFocusable:tt.nodesFocusable,elementsSelectable:tt.elementsSelectable,updateNodeDimensions:tt.updateNodeDimensions,onError:tt.onError}),NodeRenderer=tt=>{const{nodesDraggable:et,nodesConnectable:nt,nodesFocusable:rt,elementsSelectable:it,updateNodeDimensions:ot,onError:at}=useStore(selector$5,shallow$1),st=useVisibleNodes(tt.onlyRenderVisibleElements),lt=reactExports.useRef(),ct=reactExports.useMemo(()=>{if(typeof ResizeObserver>"u")return null;const ut=new ResizeObserver(ht=>{const dt=ht.map(pt=>({id:pt.target.getAttribute("data-id"),nodeElement:pt.target,forceUpdate:!0}));ot(dt)});return lt.current=ut,ut},[]);return reactExports.useEffect(()=>()=>{var ut;(ut=lt==null?void 0:lt.current)==null||ut.disconnect()},[]),React$1.createElement("div",{className:"react-flow__nodes",style:containerStyle},st.map(ut=>{var St,Tt;let ht=ut.type||"default";tt.nodeTypes[ht]||(at==null||at("003",errorMessages.error003(ht)),ht="default");const dt=tt.nodeTypes[ht]||tt.nodeTypes.default,pt=!!(ut.draggable||et&&typeof ut.draggable>"u"),mt=!!(ut.selectable||it&&typeof ut.selectable>"u"),gt=!!(ut.connectable||nt&&typeof ut.connectable>"u"),yt=!!(ut.focusable||rt&&typeof ut.focusable>"u"),bt=tt.nodeExtent?clampPosition(ut.positionAbsolute,tt.nodeExtent):ut.positionAbsolute,vt=(bt==null?void 0:bt.x)??0,xt=(bt==null?void 0:bt.y)??0,kt=getPositionWithOrigin({x:vt,y:xt,width:ut.width??0,height:ut.height??0,origin:tt.nodeOrigin});return React$1.createElement(dt,{key:ut.id,id:ut.id,className:ut.className,style:ut.style,type:ht,data:ut.data,sourcePosition:ut.sourcePosition||Position.Bottom,targetPosition:ut.targetPosition||Position.Top,hidden:ut.hidden,xPos:vt,yPos:xt,xPosOrigin:kt.x,yPosOrigin:kt.y,selectNodesOnDrag:tt.selectNodesOnDrag,onClick:tt.onNodeClick,onMouseEnter:tt.onNodeMouseEnter,onMouseMove:tt.onNodeMouseMove,onMouseLeave:tt.onNodeMouseLeave,onContextMenu:tt.onNodeContextMenu,onDoubleClick:tt.onNodeDoubleClick,selected:!!ut.selected,isDraggable:pt,isSelectable:mt,isConnectable:gt,isFocusable:yt,resizeObserver:ct,dragHandle:ut.dragHandle,zIndex:((St=ut[internalsSymbol])==null?void 0:St.z)??0,isParent:!!((Tt=ut[internalsSymbol])!=null&&Tt.isParent),noDragClassName:tt.noDragClassName,noPanClassName:tt.noPanClassName,initialized:!!ut.width&&!!ut.height,rfId:tt.rfId,disableKeyboardA11y:tt.disableKeyboardA11y,ariaLabel:ut.ariaLabel})}))};NodeRenderer.displayName="NodeRenderer";var NodeRenderer$1=reactExports.memo(NodeRenderer);const shiftX=(tt,et,nt)=>nt===Position.Left?tt-et:nt===Position.Right?tt+et:tt,shiftY=(tt,et,nt)=>nt===Position.Top?tt-et:nt===Position.Bottom?tt+et:tt,EdgeUpdaterClassName="react-flow__edgeupdater",EdgeAnchor=({position:tt,centerX:et,centerY:nt,radius:rt=10,onMouseDown:it,onMouseEnter:ot,onMouseOut:at,type:st})=>React$1.createElement("circle",{onMouseDown:it,onMouseEnter:ot,onMouseOut:at,className:cc([EdgeUpdaterClassName,`${EdgeUpdaterClassName}-${st}`]),cx:shiftX(et,rt,tt),cy:shiftY(nt,rt,tt),r:rt,stroke:"transparent",fill:"transparent"}),alwaysValidConnection=()=>!0;var wrapEdge=tt=>{const et=({id:nt,className:rt,type:it,data:ot,onClick:at,onEdgeDoubleClick:st,selected:lt,animated:ct,label:ut,labelStyle:ht,labelShowBg:dt,labelBgStyle:pt,labelBgPadding:mt,labelBgBorderRadius:gt,style:yt,source:bt,target:vt,sourceX:xt,sourceY:kt,targetX:St,targetY:Tt,sourcePosition:At,targetPosition:Et,elementsSelectable:$t,hidden:Dt,sourceHandleId:jt,targetHandleId:Pt,onContextMenu:Ct,onMouseEnter:wt,onMouseMove:It,onMouseLeave:Ot,edgeUpdaterRadius:Wt,onEdgeUpdate:zt,onEdgeUpdateStart:Ft,onEdgeUpdateEnd:Nt,markerEnd:Ut,markerStart:Mt,rfId:Ht,ariaLabel:en,isFocusable:sn,isUpdatable:Kt,pathOptions:rn,interactionWidth:nn})=>{const hn=reactExports.useRef(null),[vn,an]=reactExports.useState(!1),[Qt,_n]=reactExports.useState(!1),Pn=useStoreApi(),$n=reactExports.useMemo(()=>`url(#${getMarkerId(Mt,Ht)})`,[Mt,Ht]),Nn=reactExports.useMemo(()=>`url(#${getMarkerId(Ut,Ht)})`,[Ut,Ht]);if(Dt)return null;const Tn=Sn=>{var qn;const{edges:Rn,addSelectedEdges:jn,unselectNodesAndEdges:On,multiSelectionActive:Zn}=Pn.getState(),Vn=Rn.find(zn=>zn.id===nt);Vn&&($t&&(Pn.setState({nodesSelectionActive:!1}),Vn.selected&&Zn?(On({nodes:[],edges:[Vn]}),(qn=hn.current)==null||qn.blur()):jn([nt])),at&&at(Sn,Vn))},cn=getMouseHandler$1(nt,Pn.getState,st),mn=getMouseHandler$1(nt,Pn.getState,Ct),In=getMouseHandler$1(nt,Pn.getState,wt),An=getMouseHandler$1(nt,Pn.getState,It),wn=getMouseHandler$1(nt,Pn.getState,Ot),fn=(Sn,Rn)=>{if(Sn.button!==0)return;const{edges:jn,isValidConnection:On}=Pn.getState(),Zn=Rn?vt:bt,Vn=(Rn?Pt:jt)||null,qn=Rn?"target":"source",zn=On||alwaysValidConnection,Jn=Rn,Hn=jn.find(xr=>xr.id===nt);_n(!0),Ft==null||Ft(Sn,Hn,qn);const pr=xr=>{_n(!1),Nt==null||Nt(xr,Hn,qn)};handlePointerDown({event:Sn,handleId:Vn,nodeId:Zn,onConnect:xr=>zt==null?void 0:zt(Hn,xr),isTarget:Jn,getState:Pn.getState,setState:Pn.setState,isValidConnection:zn,edgeUpdaterType:qn,onEdgeUpdateEnd:pr})},pn=Sn=>fn(Sn,!0),kn=Sn=>fn(Sn,!1),Dn=()=>an(!0),un=()=>an(!1),Zt=!$t&&!at,Xt=Sn=>{var Rn;if(elementSelectionKeys.includes(Sn.key)&&$t){const{unselectNodesAndEdges:jn,addSelectedEdges:On,edges:Zn}=Pn.getState();Sn.key==="Escape"?((Rn=hn.current)==null||Rn.blur(),jn({edges:[Zn.find(qn=>qn.id===nt)]})):On([nt])}};return React$1.createElement("g",{className:cc(["react-flow__edge",`react-flow__edge-${it}`,rt,{selected:lt,animated:ct,inactive:Zt,updating:vn}]),onClick:Tn,onDoubleClick:cn,onContextMenu:mn,onMouseEnter:In,onMouseMove:An,onMouseLeave:wn,onKeyDown:sn?Xt:void 0,tabIndex:sn?0:void 0,role:sn?"button":"img","data-testid":`rf__edge-${nt}`,"aria-label":en===null?void 0:en||`Edge from ${bt} to ${vt}`,"aria-describedby":sn?`${ARIA_EDGE_DESC_KEY}-${Ht}`:void 0,ref:hn},!Qt&&React$1.createElement(tt,{id:nt,source:bt,target:vt,selected:lt,animated:ct,label:ut,labelStyle:ht,labelShowBg:dt,labelBgStyle:pt,labelBgPadding:mt,labelBgBorderRadius:gt,data:ot,style:yt,sourceX:xt,sourceY:kt,targetX:St,targetY:Tt,sourcePosition:At,targetPosition:Et,sourceHandleId:jt,targetHandleId:Pt,markerStart:$n,markerEnd:Nn,pathOptions:rn,interactionWidth:nn}),Kt&&React$1.createElement(React$1.Fragment,null,(Kt==="source"||Kt===!0)&&React$1.createElement(EdgeAnchor,{position:At,centerX:xt,centerY:kt,radius:Wt,onMouseDown:pn,onMouseEnter:Dn,onMouseOut:un,type:"source"}),(Kt==="target"||Kt===!0)&&React$1.createElement(EdgeAnchor,{position:Et,centerX:St,centerY:Tt,radius:Wt,onMouseDown:kn,onMouseEnter:Dn,onMouseOut:un,type:"target"})))};return et.displayName="EdgeWrapper",reactExports.memo(et)};function createEdgeTypes(tt){const et={default:wrapEdge(tt.default||BezierEdge),straight:wrapEdge(tt.bezier||StraightEdge),step:wrapEdge(tt.step||StepEdge),smoothstep:wrapEdge(tt.step||SmoothStepEdge),simplebezier:wrapEdge(tt.simplebezier||SimpleBezierEdge)},nt={},rt=Object.keys(tt).filter(it=>!["default","bezier"].includes(it)).reduce((it,ot)=>(it[ot]=wrapEdge(tt[ot]||BezierEdge),it),nt);return{...et,...rt}}function getHandlePosition(tt,et,nt=null){const rt=((nt==null?void 0:nt.x)||0)+et.x,it=((nt==null?void 0:nt.y)||0)+et.y,ot=(nt==null?void 0:nt.width)||et.width,at=(nt==null?void 0:nt.height)||et.height;switch(tt){case Position.Top:return{x:rt+ot/2,y:it};case Position.Right:return{x:rt+ot,y:it+at/2};case Position.Bottom:return{x:rt+ot/2,y:it+at};case Position.Left:return{x:rt,y:it+at/2}}}function getHandle(tt,et){return tt?tt.length===1||!et?tt[0]:et&&tt.find(nt=>nt.id===et)||null:null}const getEdgePositions=(tt,et,nt,rt,it,ot)=>{const at=getHandlePosition(nt,tt,et),st=getHandlePosition(ot,rt,it);return{sourceX:at.x,sourceY:at.y,targetX:st.x,targetY:st.y}};function isEdgeVisible({sourcePos:tt,targetPos:et,sourceWidth:nt,sourceHeight:rt,targetWidth:it,targetHeight:ot,width:at,height:st,transform:lt}){const ct={x:Math.min(tt.x,et.x),y:Math.min(tt.y,et.y),x2:Math.max(tt.x+nt,et.x+it),y2:Math.max(tt.y+rt,et.y+ot)};ct.x===ct.x2&&(ct.x2+=1),ct.y===ct.y2&&(ct.y2+=1);const ut=rectToBox({x:(0-lt[0])/lt[2],y:(0-lt[1])/lt[2],width:at/lt[2],height:st/lt[2]}),ht=Math.max(0,Math.min(ut.x2,ct.x2)-Math.max(ut.x,ct.x)),dt=Math.max(0,Math.min(ut.y2,ct.y2)-Math.max(ut.y,ct.y));return Math.ceil(ht*dt)>0}function getNodeData(tt){var rt,it,ot,at,st;const et=((rt=tt==null?void 0:tt[internalsSymbol])==null?void 0:rt.handleBounds)||null,nt=et&&(tt==null?void 0:tt.width)&&(tt==null?void 0:tt.height)&&typeof((it=tt==null?void 0:tt.positionAbsolute)==null?void 0:it.x)<"u"&&typeof((ot=tt==null?void 0:tt.positionAbsolute)==null?void 0:ot.y)<"u";return[{x:((at=tt==null?void 0:tt.positionAbsolute)==null?void 0:at.x)||0,y:((st=tt==null?void 0:tt.positionAbsolute)==null?void 0:st.y)||0,width:(tt==null?void 0:tt.width)||0,height:(tt==null?void 0:tt.height)||0},et,!!nt]}const defaultEdgeTree=[{level:0,isMaxLevel:!0,edges:[]}];function groupEdgesByZLevel(tt,et,nt=!1){let rt=-1;const it=tt.reduce((at,st)=>{var ut,ht;const lt=isNumeric(st.zIndex);let ct=lt?st.zIndex:0;if(nt){const dt=et.get(st.target),pt=et.get(st.source),mt=st.selected||(dt==null?void 0:dt.selected)||(pt==null?void 0:pt.selected),gt=Math.max(((ut=pt==null?void 0:pt[internalsSymbol])==null?void 0:ut.z)||0,((ht=dt==null?void 0:dt[internalsSymbol])==null?void 0:ht.z)||0,1e3);ct=(lt?st.zIndex:0)+(mt?gt:0)}return at[ct]?at[ct].push(st):at[ct]=[st],rt=ct>rt?ct:rt,at},{}),ot=Object.entries(it).map(([at,st])=>{const lt=+at;return{edges:st,level:lt,isMaxLevel:lt===rt}});return ot.length===0?defaultEdgeTree:ot}function useVisibleEdges(tt,et,nt){const rt=useStore(reactExports.useCallback(it=>tt?it.edges.filter(ot=>{const at=et.get(ot.source),st=et.get(ot.target);return(at==null?void 0:at.width)&&(at==null?void 0:at.height)&&(st==null?void 0:st.width)&&(st==null?void 0:st.height)&&isEdgeVisible({sourcePos:at.positionAbsolute||{x:0,y:0},targetPos:st.positionAbsolute||{x:0,y:0},sourceWidth:at.width,sourceHeight:at.height,targetWidth:st.width,targetHeight:st.height,width:it.width,height:it.height,transform:it.transform})}):it.edges,[tt,et]));return groupEdgesByZLevel(rt,et,nt)}const ArrowSymbol=({color:tt="none",strokeWidth:et=1})=>React$1.createElement("polyline",{style:{stroke:tt,strokeWidth:et},strokeLinecap:"round",strokeLinejoin:"round",fill:"none",points:"-5,-4 0,0 -5,4"}),ArrowClosedSymbol=({color:tt="none",strokeWidth:et=1})=>React$1.createElement("polyline",{style:{stroke:tt,fill:tt,strokeWidth:et},strokeLinecap:"round",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4 -5,-4"}),MarkerSymbols={[MarkerType.Arrow]:ArrowSymbol,[MarkerType.ArrowClosed]:ArrowClosedSymbol};function useMarkerSymbol(tt){const et=useStoreApi();return reactExports.useMemo(()=>{var it,ot;return Object.prototype.hasOwnProperty.call(MarkerSymbols,tt)?MarkerSymbols[tt]:((ot=(it=et.getState()).onError)==null||ot.call(it,"009",errorMessages.error009(tt)),null)},[tt])}const Marker=({id:tt,type:et,color:nt,width:rt=12.5,height:it=12.5,markerUnits:ot="strokeWidth",strokeWidth:at,orient:st="auto-start-reverse"})=>{const lt=useMarkerSymbol(et);return lt?React$1.createElement("marker",{className:"react-flow__arrowhead",id:tt,markerWidth:`${rt}`,markerHeight:`${it}`,viewBox:"-10 -10 20 20",markerUnits:ot,orient:st,refX:"0",refY:"0"},React$1.createElement(lt,{color:nt,strokeWidth:at})):null},markerSelector=({defaultColor:tt,rfId:et})=>nt=>{const rt=[];return nt.edges.reduce((it,ot)=>([ot.markerStart,ot.markerEnd].forEach(at=>{if(at&&typeof at=="object"){const st=getMarkerId(at,et);rt.includes(st)||(it.push({id:st,color:at.color||tt,...at}),rt.push(st))}}),it),[]).sort((it,ot)=>it.id.localeCompare(ot.id))},MarkerDefinitions=({defaultColor:tt,rfId:et})=>{const nt=useStore(reactExports.useCallback(markerSelector({defaultColor:tt,rfId:et}),[tt,et]),(rt,it)=>!(rt.length!==it.length||rt.some((ot,at)=>ot.id!==it[at].id)));return React$1.createElement("defs",null,nt.map(rt=>React$1.createElement(Marker,{id:rt.id,key:rt.id,type:rt.type,color:rt.color,width:rt.width,height:rt.height,markerUnits:rt.markerUnits,strokeWidth:rt.strokeWidth,orient:rt.orient})))};MarkerDefinitions.displayName="MarkerDefinitions";var MarkerDefinitions$1=reactExports.memo(MarkerDefinitions);const selector$4=tt=>({nodesConnectable:tt.nodesConnectable,edgesFocusable:tt.edgesFocusable,edgesUpdatable:tt.edgesUpdatable,elementsSelectable:tt.elementsSelectable,width:tt.width,height:tt.height,connectionMode:tt.connectionMode,nodeInternals:tt.nodeInternals,onError:tt.onError}),EdgeRenderer=({defaultMarkerColor:tt,onlyRenderVisibleElements:et,elevateEdgesOnSelect:nt,rfId:rt,edgeTypes:it,noPanClassName:ot,onEdgeUpdate:at,onEdgeContextMenu:st,onEdgeMouseEnter:lt,onEdgeMouseMove:ct,onEdgeMouseLeave:ut,onEdgeClick:ht,edgeUpdaterRadius:dt,onEdgeDoubleClick:pt,onEdgeUpdateStart:mt,onEdgeUpdateEnd:gt,children:yt})=>{const{edgesFocusable:bt,edgesUpdatable:vt,elementsSelectable:xt,width:kt,height:St,connectionMode:Tt,nodeInternals:At,onError:Et}=useStore(selector$4,shallow$1),$t=useVisibleEdges(et,At,nt);return kt?React$1.createElement(React$1.Fragment,null,$t.map(({level:Dt,edges:jt,isMaxLevel:Pt})=>React$1.createElement("svg",{key:Dt,style:{zIndex:Dt},width:kt,height:St,className:"react-flow__edges react-flow__container"},Pt&&React$1.createElement(MarkerDefinitions$1,{defaultColor:tt,rfId:rt}),React$1.createElement("g",null,jt.map(Ct=>{const[wt,It,Ot]=getNodeData(At.get(Ct.source)),[Wt,zt,Ft]=getNodeData(At.get(Ct.target));if(!Ot||!Ft)return null;let Nt=Ct.type||"default";it[Nt]||(Et==null||Et("011",errorMessages.error011(Nt)),Nt="default");const Ut=it[Nt]||it.default,Mt=Tt===ConnectionMode.Strict?zt.target:(zt.target??[]).concat(zt.source??[]),Ht=getHandle(It.source,Ct.sourceHandle),en=getHandle(Mt,Ct.targetHandle),sn=(Ht==null?void 0:Ht.position)||Position.Bottom,Kt=(en==null?void 0:en.position)||Position.Top,rn=!!(Ct.focusable||bt&&typeof Ct.focusable>"u"),nn=typeof at<"u"&&(Ct.updatable||vt&&typeof Ct.updatable>"u");if(!Ht||!en)return Et==null||Et("008",errorMessages.error008(Ht,Ct)),null;const{sourceX:hn,sourceY:vn,targetX:an,targetY:Qt}=getEdgePositions(wt,Ht,sn,Wt,en,Kt);return React$1.createElement(Ut,{key:Ct.id,id:Ct.id,className:cc([Ct.className,ot]),type:Nt,data:Ct.data,selected:!!Ct.selected,animated:!!Ct.animated,hidden:!!Ct.hidden,label:Ct.label,labelStyle:Ct.labelStyle,labelShowBg:Ct.labelShowBg,labelBgStyle:Ct.labelBgStyle,labelBgPadding:Ct.labelBgPadding,labelBgBorderRadius:Ct.labelBgBorderRadius,style:Ct.style,source:Ct.source,target:Ct.target,sourceHandleId:Ct.sourceHandle,targetHandleId:Ct.targetHandle,markerEnd:Ct.markerEnd,markerStart:Ct.markerStart,sourceX:hn,sourceY:vn,targetX:an,targetY:Qt,sourcePosition:sn,targetPosition:Kt,elementsSelectable:xt,onEdgeUpdate:at,onContextMenu:st,onMouseEnter:lt,onMouseMove:ct,onMouseLeave:ut,onClick:ht,edgeUpdaterRadius:dt,onEdgeDoubleClick:pt,onEdgeUpdateStart:mt,onEdgeUpdateEnd:gt,rfId:rt,ariaLabel:Ct.ariaLabel,isFocusable:rn,isUpdatable:nn,pathOptions:"pathOptions"in Ct?Ct.pathOptions:void 0,interactionWidth:Ct.interactionWidth})})))),yt):null};EdgeRenderer.displayName="EdgeRenderer";var EdgeRenderer$1=reactExports.memo(EdgeRenderer);const selector$3=tt=>`translate(${tt.transform[0]}px,${tt.transform[1]}px) scale(${tt.transform[2]})`;function Viewport({children:tt}){const et=useStore(selector$3);return React$1.createElement("div",{className:"react-flow__viewport react-flow__container",style:{transform:et}},tt)}function useOnInitHandler(tt){const et=useReactFlow(),nt=reactExports.useRef(!1);reactExports.useEffect(()=>{!nt.current&&et.viewportInitialized&&tt&&(setTimeout(()=>tt(et),1),nt.current=!0)},[tt,et.viewportInitialized])}const oppositePosition={[Position.Left]:Position.Right,[Position.Right]:Position.Left,[Position.Top]:Position.Bottom,[Position.Bottom]:Position.Top},ConnectionLine=({nodeId:tt,handleType:et,style:nt,type:rt=ConnectionLineType.Bezier,CustomComponent:it,connectionStatus:ot})=>{var Tt,At,Et;const{fromNode:at,handleId:st,toX:lt,toY:ct,connectionMode:ut}=useStore(reactExports.useCallback($t=>({fromNode:$t.nodeInternals.get(tt),handleId:$t.connectionHandleId,toX:($t.connectionPosition.x-$t.transform[0])/$t.transform[2],toY:($t.connectionPosition.y-$t.transform[1])/$t.transform[2],connectionMode:$t.connectionMode}),[tt]),shallow$1),ht=(Tt=at==null?void 0:at[internalsSymbol])==null?void 0:Tt.handleBounds;let dt=ht==null?void 0:ht[et];if(ut===ConnectionMode.Loose&&(dt=dt||(ht==null?void 0:ht[et==="source"?"target":"source"])),!at||!dt)return null;const pt=st?dt.find($t=>$t.id===st):dt[0],mt=pt?pt.x+pt.width/2:(at.width??0)/2,gt=pt?pt.y+pt.height/2:at.height??0,yt=(((At=at.positionAbsolute)==null?void 0:At.x)??0)+mt,bt=(((Et=at.positionAbsolute)==null?void 0:Et.y)??0)+gt,vt=pt==null?void 0:pt.position,xt=vt?oppositePosition[vt]:null;if(!vt||!xt)return null;if(it)return React$1.createElement(it,{connectionLineType:rt,connectionLineStyle:nt,fromNode:at,fromHandle:pt,fromX:yt,fromY:bt,toX:lt,toY:ct,fromPosition:vt,toPosition:xt,connectionStatus:ot});let kt="";const St={sourceX:yt,sourceY:bt,sourcePosition:vt,targetX:lt,targetY:ct,targetPosition:xt};return rt===ConnectionLineType.Bezier?[kt]=getBezierPath(St):rt===ConnectionLineType.Step?[kt]=getSmoothStepPath({...St,borderRadius:0}):rt===ConnectionLineType.SmoothStep?[kt]=getSmoothStepPath(St):rt===ConnectionLineType.SimpleBezier?[kt]=getSimpleBezierPath(St):kt=`M${yt},${bt} ${lt},${ct}`,React$1.createElement("path",{d:kt,fill:"none",className:"react-flow__connection-path",style:nt})};ConnectionLine.displayName="ConnectionLine";const selector$2=tt=>({nodeId:tt.connectionNodeId,handleType:tt.connectionHandleType,nodesConnectable:tt.nodesConnectable,connectionStatus:tt.connectionStatus,width:tt.width,height:tt.height});function ConnectionLineWrapper({containerStyle:tt,style:et,type:nt,component:rt}){const{nodeId:it,handleType:ot,nodesConnectable:at,width:st,height:lt,connectionStatus:ct}=useStore(selector$2,shallow$1);return!(it&&ot&&st&&at)?null:React$1.createElement("svg",{style:tt,width:st,height:lt,className:"react-flow__edges react-flow__connectionline react-flow__container"},React$1.createElement("g",{className:cc(["react-flow__connection",ct])},React$1.createElement(ConnectionLine,{nodeId:it,handleType:ot,style:et,type:nt,CustomComponent:rt,connectionStatus:ct})))}function useNodeOrEdgeTypes(tt,et){return reactExports.useRef(null),useStoreApi(),reactExports.useMemo(()=>et(tt),[tt])}const GraphView=({nodeTypes:tt,edgeTypes:et,onMove:nt,onMoveStart:rt,onMoveEnd:it,onInit:ot,onNodeClick:at,onEdgeClick:st,onNodeDoubleClick:lt,onEdgeDoubleClick:ct,onNodeMouseEnter:ut,onNodeMouseMove:ht,onNodeMouseLeave:dt,onNodeContextMenu:pt,onSelectionContextMenu:mt,onSelectionStart:gt,onSelectionEnd:yt,connectionLineType:bt,connectionLineStyle:vt,connectionLineComponent:xt,connectionLineContainerStyle:kt,selectionKeyCode:St,selectionOnDrag:Tt,selectionMode:At,multiSelectionKeyCode:Et,panActivationKeyCode:$t,zoomActivationKeyCode:Dt,deleteKeyCode:jt,onlyRenderVisibleElements:Pt,elementsSelectable:Ct,selectNodesOnDrag:wt,defaultViewport:It,translateExtent:Ot,minZoom:Wt,maxZoom:zt,preventScrolling:Ft,defaultMarkerColor:Nt,zoomOnScroll:Ut,zoomOnPinch:Mt,panOnScroll:Ht,panOnScrollSpeed:en,panOnScrollMode:sn,zoomOnDoubleClick:Kt,panOnDrag:rn,onPaneClick:nn,onPaneMouseEnter:hn,onPaneMouseMove:vn,onPaneMouseLeave:an,onPaneScroll:Qt,onPaneContextMenu:_n,onEdgeUpdate:Pn,onEdgeContextMenu:$n,onEdgeMouseEnter:Nn,onEdgeMouseMove:Tn,onEdgeMouseLeave:cn,edgeUpdaterRadius:mn,onEdgeUpdateStart:In,onEdgeUpdateEnd:An,noDragClassName:wn,noWheelClassName:fn,noPanClassName:pn,elevateEdgesOnSelect:kn,disableKeyboardA11y:Dn,nodeOrigin:un,nodeExtent:Zt,rfId:Xt})=>{const Sn=useNodeOrEdgeTypes(tt,createNodeTypes),Rn=useNodeOrEdgeTypes(et,createEdgeTypes);return useOnInitHandler(ot),React$1.createElement(FlowRenderer$1,{onPaneClick:nn,onPaneMouseEnter:hn,onPaneMouseMove:vn,onPaneMouseLeave:an,onPaneContextMenu:_n,onPaneScroll:Qt,deleteKeyCode:jt,selectionKeyCode:St,selectionOnDrag:Tt,selectionMode:At,onSelectionStart:gt,onSelectionEnd:yt,multiSelectionKeyCode:Et,panActivationKeyCode:$t,zoomActivationKeyCode:Dt,elementsSelectable:Ct,onMove:nt,onMoveStart:rt,onMoveEnd:it,zoomOnScroll:Ut,zoomOnPinch:Mt,zoomOnDoubleClick:Kt,panOnScroll:Ht,panOnScrollSpeed:en,panOnScrollMode:sn,panOnDrag:rn,defaultViewport:It,translateExtent:Ot,minZoom:Wt,maxZoom:zt,onSelectionContextMenu:mt,preventScrolling:Ft,noDragClassName:wn,noWheelClassName:fn,noPanClassName:pn,disableKeyboardA11y:Dn},React$1.createElement(Viewport,null,React$1.createElement(EdgeRenderer$1,{edgeTypes:Rn,onEdgeClick:st,onEdgeDoubleClick:ct,onEdgeUpdate:Pn,onlyRenderVisibleElements:Pt,onEdgeContextMenu:$n,onEdgeMouseEnter:Nn,onEdgeMouseMove:Tn,onEdgeMouseLeave:cn,onEdgeUpdateStart:In,onEdgeUpdateEnd:An,edgeUpdaterRadius:mn,defaultMarkerColor:Nt,noPanClassName:pn,elevateEdgesOnSelect:!!kn,disableKeyboardA11y:Dn,rfId:Xt},React$1.createElement(ConnectionLineWrapper,{style:vt,type:bt,component:xt,containerStyle:kt})),React$1.createElement("div",{className:"react-flow__edgelabel-renderer"}),React$1.createElement(NodeRenderer$1,{nodeTypes:Sn,onNodeClick:at,onNodeDoubleClick:lt,onNodeMouseEnter:ut,onNodeMouseMove:ht,onNodeMouseLeave:dt,onNodeContextMenu:pt,selectNodesOnDrag:wt,onlyRenderVisibleElements:Pt,noPanClassName:pn,noDragClassName:wn,disableKeyboardA11y:Dn,nodeOrigin:un,nodeExtent:Zt,rfId:Xt})))};GraphView.displayName="GraphView";var GraphView$1=reactExports.memo(GraphView);const infiniteExtent=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],initialState={rfId:"1",width:0,height:0,transform:[0,0,1],nodeInternals:new Map,edges:[],onNodesChange:null,onEdgesChange:null,hasDefaultNodes:!1,hasDefaultEdges:!1,d3Zoom:null,d3Selection:null,d3ZoomHandler:void 0,minZoom:.5,maxZoom:2,translateExtent:infiniteExtent,nodeExtent:infiniteExtent,nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,connectionNodeId:null,connectionHandleId:null,connectionHandleType:"source",connectionPosition:{x:0,y:0},connectionStatus:null,connectionMode:ConnectionMode.Strict,domNode:null,paneDragging:!1,noPanClassName:"nopan",nodeOrigin:[0,0],nodeDragThreshold:0,snapGrid:[15,15],snapToGrid:!1,nodesDraggable:!0,nodesConnectable:!0,nodesFocusable:!0,edgesFocusable:!0,edgesUpdatable:!0,elementsSelectable:!0,elevateNodesOnSelect:!0,fitViewOnInit:!1,fitViewOnInitDone:!1,fitViewOnInitOptions:void 0,multiSelectionActive:!1,connectionStartHandle:null,connectionEndHandle:null,connectionClickStartHandle:null,connectOnClick:!0,ariaLiveMessage:"",autoPanOnConnect:!0,autoPanOnNodeDrag:!0,connectionRadius:20,onError:devWarn,isValidConnection:void 0},createRFStore=()=>createWithEqualityFn((tt,et)=>({...initialState,setNodes:nt=>{const{nodeInternals:rt,nodeOrigin:it,elevateNodesOnSelect:ot}=et();tt({nodeInternals:createNodeInternals(nt,rt,it,ot)})},getNodes:()=>Array.from(et().nodeInternals.values()),setEdges:nt=>{const{defaultEdgeOptions:rt={}}=et();tt({edges:nt.map(it=>({...rt,...it}))})},setDefaultNodesAndEdges:(nt,rt)=>{const it=typeof nt<"u",ot=typeof rt<"u",at=it?createNodeInternals(nt,new Map,et().nodeOrigin,et().elevateNodesOnSelect):new Map;tt({nodeInternals:at,edges:ot?rt:[],hasDefaultNodes:it,hasDefaultEdges:ot})},updateNodeDimensions:nt=>{const{onNodesChange:rt,nodeInternals:it,fitViewOnInit:ot,fitViewOnInitDone:at,fitViewOnInitOptions:st,domNode:lt,nodeOrigin:ct}=et(),ut=lt==null?void 0:lt.querySelector(".react-flow__viewport");if(!ut)return;const ht=window.getComputedStyle(ut),{m22:dt}=new window.DOMMatrixReadOnly(ht.transform),pt=nt.reduce((gt,yt)=>{const bt=it.get(yt.id);if(bt){const vt=getDimensions(yt.nodeElement);!!(vt.width&&vt.height&&(bt.width!==vt.width||bt.height!==vt.height||yt.forceUpdate))&&(it.set(bt.id,{...bt,[internalsSymbol]:{...bt[internalsSymbol],handleBounds:{source:getHandleBounds(".source",yt.nodeElement,dt,ct),target:getHandleBounds(".target",yt.nodeElement,dt,ct)}},...vt}),gt.push({id:bt.id,type:"dimensions",dimensions:vt}))}return gt},[]);updateAbsoluteNodePositions(it,ct);const mt=at||ot&&!at&&fitView(et,{initial:!0,...st});tt({nodeInternals:new Map(it),fitViewOnInitDone:mt}),(pt==null?void 0:pt.length)>0&&(rt==null||rt(pt))},updateNodePositions:(nt,rt=!0,it=!1)=>{const{triggerNodeChanges:ot}=et(),at=nt.map(st=>{const lt={id:st.id,type:"position",dragging:it};return rt&&(lt.positionAbsolute=st.positionAbsolute,lt.position=st.position),lt});ot(at)},triggerNodeChanges:nt=>{const{onNodesChange:rt,nodeInternals:it,hasDefaultNodes:ot,nodeOrigin:at,getNodes:st,elevateNodesOnSelect:lt}=et();if(nt!=null&&nt.length){if(ot){const ct=applyNodeChanges(nt,st()),ut=createNodeInternals(ct,it,at,lt);tt({nodeInternals:ut})}rt==null||rt(nt)}},addSelectedNodes:nt=>{const{multiSelectionActive:rt,edges:it,getNodes:ot}=et();let at,st=null;rt?at=nt.map(lt=>createSelectionChange(lt,!0)):(at=getSelectionChanges(ot(),nt),st=getSelectionChanges(it,[])),updateNodesAndEdgesSelections({changedNodes:at,changedEdges:st,get:et,set:tt})},addSelectedEdges:nt=>{const{multiSelectionActive:rt,edges:it,getNodes:ot}=et();let at,st=null;rt?at=nt.map(lt=>createSelectionChange(lt,!0)):(at=getSelectionChanges(it,nt),st=getSelectionChanges(ot(),[])),updateNodesAndEdgesSelections({changedNodes:st,changedEdges:at,get:et,set:tt})},unselectNodesAndEdges:({nodes:nt,edges:rt}={})=>{const{edges:it,getNodes:ot}=et(),at=nt||ot(),st=rt||it,lt=at.map(ut=>(ut.selected=!1,createSelectionChange(ut.id,!1))),ct=st.map(ut=>createSelectionChange(ut.id,!1));updateNodesAndEdgesSelections({changedNodes:lt,changedEdges:ct,get:et,set:tt})},setMinZoom:nt=>{const{d3Zoom:rt,maxZoom:it}=et();rt==null||rt.scaleExtent([nt,it]),tt({minZoom:nt})},setMaxZoom:nt=>{const{d3Zoom:rt,minZoom:it}=et();rt==null||rt.scaleExtent([it,nt]),tt({maxZoom:nt})},setTranslateExtent:nt=>{var rt;(rt=et().d3Zoom)==null||rt.translateExtent(nt),tt({translateExtent:nt})},resetSelectedElements:()=>{const{edges:nt,getNodes:rt}=et(),ot=rt().filter(st=>st.selected).map(st=>createSelectionChange(st.id,!1)),at=nt.filter(st=>st.selected).map(st=>createSelectionChange(st.id,!1));updateNodesAndEdgesSelections({changedNodes:ot,changedEdges:at,get:et,set:tt})},setNodeExtent:nt=>{const{nodeInternals:rt}=et();rt.forEach(it=>{it.positionAbsolute=clampPosition(it.position,nt)}),tt({nodeExtent:nt,nodeInternals:new Map(rt)})},panBy:nt=>{const{transform:rt,width:it,height:ot,d3Zoom:at,d3Selection:st,translateExtent:lt}=et();if(!at||!st||!nt.x&&!nt.y)return!1;const ct=identity.translate(rt[0]+nt.x,rt[1]+nt.y).scale(rt[2]),ut=[[0,0],[it,ot]],ht=at==null?void 0:at.constrain()(ct,ut,lt);return at.transform(st,ht),rt[0]!==ht.x||rt[1]!==ht.y||rt[2]!==ht.k},cancelConnection:()=>tt({connectionNodeId:initialState.connectionNodeId,connectionHandleId:initialState.connectionHandleId,connectionHandleType:initialState.connectionHandleType,connectionStatus:initialState.connectionStatus,connectionStartHandle:initialState.connectionStartHandle,connectionEndHandle:initialState.connectionEndHandle}),reset:()=>tt({...initialState})}),Object.is),ReactFlowProvider=({children:tt})=>{const et=reactExports.useRef(null);return et.current||(et.current=createRFStore()),React$1.createElement(Provider$1,{value:et.current},tt)};ReactFlowProvider.displayName="ReactFlowProvider";const Wrapper$e=({children:tt})=>reactExports.useContext(StoreContext)?React$1.createElement(React$1.Fragment,null,tt):React$1.createElement(ReactFlowProvider,null,tt);Wrapper$e.displayName="ReactFlowWrapper";const defaultNodeTypes={input:InputNode$1,default:DefaultNode$1,output:OutputNode$1,group:GroupNode},defaultEdgeTypes={default:BezierEdge,straight:StraightEdge,step:StepEdge,smoothstep:SmoothStepEdge,simplebezier:SimpleBezierEdge},initNodeOrigin=[0,0],initSnapGrid=[15,15],initDefaultViewport={x:0,y:0,zoom:1},wrapperStyle={width:"100%",height:"100%",overflow:"hidden",position:"relative",zIndex:0},ReactFlow=reactExports.forwardRef(({nodes:tt,edges:et,defaultNodes:nt,defaultEdges:rt,className:it,nodeTypes:ot=defaultNodeTypes,edgeTypes:at=defaultEdgeTypes,onNodeClick:st,onEdgeClick:lt,onInit:ct,onMove:ut,onMoveStart:ht,onMoveEnd:dt,onConnect:pt,onConnectStart:mt,onConnectEnd:gt,onClickConnectStart:yt,onClickConnectEnd:bt,onNodeMouseEnter:vt,onNodeMouseMove:xt,onNodeMouseLeave:kt,onNodeContextMenu:St,onNodeDoubleClick:Tt,onNodeDragStart:At,onNodeDrag:Et,onNodeDragStop:$t,onNodesDelete:Dt,onEdgesDelete:jt,onSelectionChange:Pt,onSelectionDragStart:Ct,onSelectionDrag:wt,onSelectionDragStop:It,onSelectionContextMenu:Ot,onSelectionStart:Wt,onSelectionEnd:zt,connectionMode:Ft=ConnectionMode.Strict,connectionLineType:Nt=ConnectionLineType.Bezier,connectionLineStyle:Ut,connectionLineComponent:Mt,connectionLineContainerStyle:Ht,deleteKeyCode:en="Backspace",selectionKeyCode:sn="Shift",selectionOnDrag:Kt=!1,selectionMode:rn=SelectionMode.Full,panActivationKeyCode:nn="Space",multiSelectionKeyCode:hn=isMacOs()?"Meta":"Control",zoomActivationKeyCode:vn=isMacOs()?"Meta":"Control",snapToGrid:an=!1,snapGrid:Qt=initSnapGrid,onlyRenderVisibleElements:_n=!1,selectNodesOnDrag:Pn=!0,nodesDraggable:$n,nodesConnectable:Nn,nodesFocusable:Tn,nodeOrigin:cn=initNodeOrigin,edgesFocusable:mn,edgesUpdatable:In,elementsSelectable:An,defaultViewport:wn=initDefaultViewport,minZoom:fn=.5,maxZoom:pn=2,translateExtent:kn=infiniteExtent,preventScrolling:Dn=!0,nodeExtent:un,defaultMarkerColor:Zt="#b1b1b7",zoomOnScroll:Xt=!0,zoomOnPinch:Sn=!0,panOnScroll:Rn=!1,panOnScrollSpeed:jn=.5,panOnScrollMode:On=PanOnScrollMode.Free,zoomOnDoubleClick:Zn=!0,panOnDrag:Vn=!0,onPaneClick:qn,onPaneMouseEnter:zn,onPaneMouseMove:Jn,onPaneMouseLeave:Hn,onPaneScroll:pr,onPaneContextMenu:fr,children:xr,onEdgeUpdate:io,onEdgeContextMenu:Tr,onEdgeDoubleClick:Ar,onEdgeMouseEnter:qr,onEdgeMouseMove:jr,onEdgeMouseLeave:Fr,onEdgeUpdateStart:ao,onEdgeUpdateEnd:Yr,edgeUpdaterRadius:Dr=10,onNodesChange:go,onEdgesChange:xn,noDragClassName:Mn="nodrag",noWheelClassName:dn="nowheel",noPanClassName:Jt="nopan",fitView:En=!1,fitViewOptions:Ln,connectOnClick:Un=!0,attributionPosition:Kn,proOptions:nr,defaultEdgeOptions:lr,elevateNodesOnSelect:cr=!0,elevateEdgesOnSelect:Hr=!1,disableKeyboardA11y:vr=!1,autoPanOnConnect:Nr=!0,autoPanOnNodeDrag:Gr=!0,connectionRadius:eo=20,isValidConnection:Zr,onError:Jr,style:wr,id:Mr,nodeDragThreshold:Ur,...Rr},Pr)=>{const Lr=Mr||"1";return React$1.createElement("div",{...Rr,style:{...wr,...wrapperStyle},ref:Pr,className:cc(["react-flow",it]),"data-testid":"rf__wrapper",id:Mr},React$1.createElement(Wrapper$e,null,React$1.createElement(GraphView$1,{onInit:ct,onMove:ut,onMoveStart:ht,onMoveEnd:dt,onNodeClick:st,onEdgeClick:lt,onNodeMouseEnter:vt,onNodeMouseMove:xt,onNodeMouseLeave:kt,onNodeContextMenu:St,onNodeDoubleClick:Tt,nodeTypes:ot,edgeTypes:at,connectionLineType:Nt,connectionLineStyle:Ut,connectionLineComponent:Mt,connectionLineContainerStyle:Ht,selectionKeyCode:sn,selectionOnDrag:Kt,selectionMode:rn,deleteKeyCode:en,multiSelectionKeyCode:hn,panActivationKeyCode:nn,zoomActivationKeyCode:vn,onlyRenderVisibleElements:_n,selectNodesOnDrag:Pn,defaultViewport:wn,translateExtent:kn,minZoom:fn,maxZoom:pn,preventScrolling:Dn,zoomOnScroll:Xt,zoomOnPinch:Sn,zoomOnDoubleClick:Zn,panOnScroll:Rn,panOnScrollSpeed:jn,panOnScrollMode:On,panOnDrag:Vn,onPaneClick:qn,onPaneMouseEnter:zn,onPaneMouseMove:Jn,onPaneMouseLeave:Hn,onPaneScroll:pr,onPaneContextMenu:fr,onSelectionContextMenu:Ot,onSelectionStart:Wt,onSelectionEnd:zt,onEdgeUpdate:io,onEdgeContextMenu:Tr,onEdgeDoubleClick:Ar,onEdgeMouseEnter:qr,onEdgeMouseMove:jr,onEdgeMouseLeave:Fr,onEdgeUpdateStart:ao,onEdgeUpdateEnd:Yr,edgeUpdaterRadius:Dr,defaultMarkerColor:Zt,noDragClassName:Mn,noWheelClassName:dn,noPanClassName:Jt,elevateEdgesOnSelect:Hr,rfId:Lr,disableKeyboardA11y:vr,nodeOrigin:cn,nodeExtent:un}),React$1.createElement(StoreUpdater,{nodes:tt,edges:et,defaultNodes:nt,defaultEdges:rt,onConnect:pt,onConnectStart:mt,onConnectEnd:gt,onClickConnectStart:yt,onClickConnectEnd:bt,nodesDraggable:$n,nodesConnectable:Nn,nodesFocusable:Tn,edgesFocusable:mn,edgesUpdatable:In,elementsSelectable:An,elevateNodesOnSelect:cr,minZoom:fn,maxZoom:pn,nodeExtent:un,onNodesChange:go,onEdgesChange:xn,snapToGrid:an,snapGrid:Qt,connectionMode:Ft,translateExtent:kn,connectOnClick:Un,defaultEdgeOptions:lr,fitView:En,fitViewOptions:Ln,onNodesDelete:Dt,onEdgesDelete:jt,onNodeDragStart:At,onNodeDrag:Et,onNodeDragStop:$t,onSelectionDrag:wt,onSelectionDragStart:Ct,onSelectionDragStop:It,noPanClassName:Jt,nodeOrigin:cn,rfId:Lr,autoPanOnConnect:Nr,autoPanOnNodeDrag:Gr,onError:Jr,connectionRadius:eo,isValidConnection:Zr,nodeDragThreshold:Ur}),React$1.createElement(Wrapper$1$1,{onSelectionChange:Pt}),xr,React$1.createElement(Attribution,{proOptions:nr,position:Kn}),React$1.createElement(A11yDescriptions,{rfId:Lr,disableKeyboardA11y:vr})))});ReactFlow.displayName="ReactFlow";const style="",TeachMe=()=>{const[tt,et]=useDataStore(mt=>[mt.data,mt.setTeachMe]),[nt,rt]=useAppStore(mt=>[mt.currentSearch,mt.setSidebarOpen]),[it]=useUserStore(mt=>[mt.setBudget]),ot=reactExports.useRef(!1),at=useSocket(),[st,lt,ct,ut]=useTeachStore(mt=>[mt.setTeachMeAnswer,mt.setHasTeachingInProgress,mt.setInstagraphAnswer,mt.setHasInstagraphInProgress]),ht=reactExports.useCallback(mt=>{st(mt.tutorial),toast(jsxRuntimeExports.jsx(ToastMessage,{message:"Tutorial is ready"}),{position:toast.POSITION.BOTTOM_CENTER,type:"success"})},[st]),dt=reactExports.useCallback(mt=>{ct(mt),toast(jsxRuntimeExports.jsx(ToastMessage,{message:"Instagraph is ready"}),{position:toast.POSITION.BOTTOM_CENTER,type:"success"})},[ct]);reactExports.useEffect(()=>{ot.current||(ht&&at&&(at.on("teachmehook",ht),ot.current=!0),dt&&at&&(at.on("instagraphhook",dt),ot.current=!0))},[at,ht,dt]);const pt=async()=>{if(nt){lt(!0),ut(!0),rt(!0),et(!0);try{const mt=tt==null?void 0:tt.nodes.filter(bt=>bt.text),gt=mt==null?void 0:mt.slice(0,5),yt=(gt!=null&>.length?gt.map(bt=>bt.text).join(" "):"").substring(0,2500).replace(/[?&=+/#]/g,bt=>`\\${bt}`);await distExports$1.enable(),await postTeachMe({term:nt,transcripts:yt}),await updateBudget(it),toast(jsxRuntimeExports.jsx(ToastMessage,{message:"We started preparing tutorial for you"}),{type:"success"}),await postInstagraph({term:nt,transcripts:yt}),await updateBudget(it),toast(jsxRuntimeExports.jsx(ToastMessage,{message:"We started preparing an instagraph for you"}),{type:"success"})}catch{lt(!1),ut(!1)}}};return jsxRuntimeExports.jsx(ButtonStyled,{onClick:()=>pt(),children:"Teach me"})},TeachMeLoader=({text:tt})=>jsxRuntimeExports.jsxs(Flex,{align:"center",justify:"center",py:12,children:[jsxRuntimeExports.jsx(Flex,{align:"center",py:12,children:jsxRuntimeExports.jsx(PropagateLoader,{color:colors.white})}),jsxRuntimeExports.jsx(Flex,{align:"center",py:12,children:jsxRuntimeExports.jsx(Text$3,{children:tt})})]}),TeachMeText=()=>{const[tt,et,nt,rt]=useTeachStore(ot=>[ot.teachMeAnswer,ot.hasTeachingInProgress,ot.instgraphAnswser,ot.hasInstagraphInProgress]),it=!rt&&!!(nt!=null&&nt.edges)&&!!(nt!=null&&nt.nodes);return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[it?jsxRuntimeExports.jsx(ReactFlow,{edges:nt==null?void 0:nt.edges,nodes:nt==null?void 0:nt.nodes}):jsxRuntimeExports.jsx(TeachMeLoader,{text:"Generating instagraph"}),et?jsxRuntimeExports.jsx(TeachMeLoader,{text:"Generating tutorial"}):jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(TeachMeAnswerFlex,{children:jsxRuntimeExports.jsx(Text$3,{children:tt})}),jsxRuntimeExports.jsx(AskQuestion,{})]})]})},ButtonStyled=styled$4(Button$2)``,TeachMeAnswerFlex=styled$4(Flex)` - padding-left: 10px; - padding-right: 10px; -`,MENU_WIDTH$2=400,ComponentsMapper$1={askQuestion:jsxRuntimeExports.jsx(AskQuestion,{}),teachMe:jsxRuntimeExports.jsx(TeachMe,{}),sentiment:jsxRuntimeExports.jsx(SentimentAnalysis,{})},heightMap={askQuestion:400,sentiment:600,teachMe:400,default:200},HelperContent=()=>{const{isShow:tt,setIsShow:et}=useHelper(),[nt,rt]=reactExports.useState(null);return jsxRuntimeExports.jsx(ContentWrapper$1,{children:jsxRuntimeExports.jsx(Fade$1,{in:tt,mountOnEnter:!0,unmountOnExit:!0,children:jsxRuntimeExports.jsxs(Stack$5,{bgcolor:colors.listBg,component:Paper$1,elevation:2,height:heightMap[nt??"default"],p:2,pb:4,pt:4,sx:{transition:({transitions:it})=>`${it.create(["height","opacity"])}!important`,overflowY:"auto",overflowX:"hidden"},width:{xs:"calc(100vw - 8px * 4)",sm:MENU_WIDTH$2},children:[jsxRuntimeExports.jsx(CloseButton$3,{onClick:()=>{rt(null),et(it=>!it)}}),jsxRuntimeExports.jsx(ActionsMenu,{active:nt,onChange:rt}),nt&&ComponentsMapper$1[nt]]})})})},ContentWrapper$1=styled$1("div")(()=>({position:"absolute",bottom:"1rem",right:"1rem"})),CloseButton$3=styled$1(tt=>jsxRuntimeExports.jsx(IconButton$2,{component:"button",size:"small",...tt,children:jsxRuntimeExports.jsx(MdClose,{})}))(()=>({position:"absolute",right:"0.5rem",top:"0.5rem"})),dpr=window.devicePixelRatio||1,pi=Math.PI,points=12,radius=200*dpr,h=600*dpr,w=600*dpr,center={x:w/2*dpr,y:h/2*dpr},rangeMin=3,rangeMax=25,createBtn=tt=>{var at;const et=(at=tt.current)==null?void 0:at.getContext("2d"),nt=tt.current;if(!et||!nt)return null;const rt=getGradients(et);et.scale(dpr,dpr),nt.width=w*dpr,nt.height=h*dpr;const it=getCircles(rt),ot=setInterval(()=>{swingCircle(et,it,rt)},16);return()=>clearInterval(ot)};function cycle(tt,et){return(tt%et+et)%et}function swingCircle(tt,et,nt){tt.clearRect(0,0,w*dpr,h*dpr),tt.globalAlpha=.9,tt.globalCompositeOperation="screen";for(let rt=0;rt{const nt=reactExports.useRef(null);return reactExports.useEffect(()=>{const rt=createBtn(nt);return()=>{rt==null||rt()}},[]),jsxRuntimeExports.jsxs(ButtonContainer,{...et,children:[tt&&jsxRuntimeExports.jsx("div",{className:"children",children:tt}),jsxRuntimeExports.jsx(Canvas,{ref:nt})]})},ButtonContainer=styled$1(ButtonBase$1)(()=>({width:48,height:48,"& .children":{zIndex:1}})),Canvas=styled$1("canvas")(()=>({position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",width:70,height:70})),OpenHelperBtn=()=>{const{setIsShow:tt}=useHelper(),[et]=useAppStore(it=>[it.sidebarIsOpen]),nt=reactExports.useRef(null),rt=useAppStore(it=>it.currentSearch);return reactExports.useEffect(()=>{const it=createBtn(nt);return()=>{it==null||it()}},[]),rt?jsxRuntimeExports.jsx(FabContainer,{sidebarIsOpen:et,children:jsxRuntimeExports.jsx(SiriLikeButton,{id:"cy-siri-btn",onClick:()=>tt(it=>!it)})}):null},FabContainer=styled$1("div")(({sidebarIsOpen:tt,theme:et})=>({position:"absolute",bottom:"2rem",transition:et.transitions.create(["right"]),right:tt?"calc((100% - 400px) / 2)":"50%",transform:"translate(50%)"})),Helper=()=>{const[tt,et]=reactExports.useState(!1),nt=reactExports.useMemo(()=>({isShow:tt,setIsShow:et}),[tt]);return jsxRuntimeExports.jsxs(HelperContext.Provider,{value:nt,children:[jsxRuntimeExports.jsx(OpenHelperBtn,{}),jsxRuntimeExports.jsx(HelperContent,{})]})},AddContentIcon=tt=>jsxRuntimeExports.jsxs("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntimeExports.jsx("mask",{id:"mask0_1259_25",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"24",height:"24",children:jsxRuntimeExports.jsx("rect",{width:"1em",height:"1em",fill:"currentColor"})}),jsxRuntimeExports.jsx("g",{mask:"url(#mask0_1259_25)",children:jsxRuntimeExports.jsx("path",{d:"M11.25 12.75V16C11.25 16.2125 11.3219 16.3906 11.4657 16.5343C11.6095 16.6781 11.7877 16.75 12.0003 16.75C12.2129 16.75 12.391 16.6781 12.5346 16.5343C12.6782 16.3906 12.75 16.2125 12.75 16V12.75H16C16.2125 12.75 16.3906 12.6781 16.5344 12.5343C16.6781 12.3904 16.75 12.2122 16.75 11.9997C16.75 11.7871 16.6781 11.609 16.5344 11.4654C16.3906 11.3218 16.2125 11.25 16 11.25H12.75V7.99998C12.75 7.78748 12.6781 7.60935 12.5343 7.4656C12.3905 7.32187 12.2123 7.25 11.9997 7.25C11.7871 7.25 11.609 7.32187 11.4654 7.4656C11.3218 7.60935 11.25 7.78748 11.25 7.99998V11.25H8.00001C7.78751 11.25 7.60939 11.3219 7.46566 11.4657C7.32191 11.6095 7.25003 11.7877 7.25003 12.0003C7.25003 12.2129 7.32191 12.391 7.46566 12.5346C7.60939 12.6782 7.78751 12.75 8.00001 12.75H11.25ZM12.0017 21.5C10.6877 21.5 9.45271 21.2506 8.29658 20.752C7.14043 20.2533 6.13475 19.5765 5.27953 18.7217C4.4243 17.8669 3.74724 16.8616 3.24836 15.706C2.74947 14.5504 2.50003 13.3156 2.50003 12.0017C2.50003 10.6877 2.74936 9.45268 3.24803 8.29655C3.7467 7.1404 4.42345 6.13472 5.27828 5.2795C6.13313 4.42427 7.13837 3.74721 8.29401 3.24833C9.44962 2.74944 10.6844 2.5 11.9983 2.5C13.3123 2.5 14.5473 2.74933 15.7034 3.248C16.8596 3.74667 17.8653 4.42342 18.7205 5.27825C19.5757 6.1331 20.2528 7.13834 20.7517 8.29398C21.2505 9.44959 21.5 10.6844 21.5 11.9983C21.5 13.3122 21.2506 14.5473 20.752 15.7034C20.2533 16.8596 19.5766 17.8652 18.7217 18.7205C17.8669 19.5757 16.8616 20.2527 15.706 20.7516C14.5504 21.2505 13.3156 21.5 12.0017 21.5ZM12 20C14.2333 20 16.125 19.225 17.675 17.675C19.225 16.125 20 14.2333 20 12C20 9.76664 19.225 7.87498 17.675 6.32498C16.125 4.77498 14.2333 3.99998 12 3.99998C9.76667 3.99998 7.87501 4.77498 6.32501 6.32498C4.77501 7.87498 4.00001 9.76664 4.00001 12C4.00001 14.2333 4.77501 16.125 6.32501 17.675C7.87501 19.225 9.76667 20 12 20Z",fill:"currentColor"})})]}),AddSourceIcon=tt=>jsxRuntimeExports.jsxs("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntimeExports.jsx("mask",{id:"mask0_1259_27",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"24",height:"24",children:jsxRuntimeExports.jsx("rect",{width:"1em",height:"1em",fill:"currentColor"})}),jsxRuntimeExports.jsx("g",{mask:"url(#mask0_1259_27)",children:jsxRuntimeExports.jsx("path",{d:"M5.30773 20.5C4.81061 20.5 4.38506 20.3229 4.03106 19.9689C3.67704 19.6149 3.50003 19.1894 3.50003 18.6923V5.3077C3.50003 4.81058 3.67704 4.38503 4.03106 4.03103C4.38506 3.67701 4.81061 3.5 5.30773 3.5H18.6923C19.1894 3.5 19.615 3.67701 19.969 4.03103C20.323 4.38503 20.5 4.81058 20.5 5.3077V11.6327C20.2538 11.5275 20.0074 11.4384 19.7606 11.3654C19.5138 11.2923 19.2603 11.234 19 11.1904V5.3077C19 5.23077 18.968 5.16024 18.9039 5.09613C18.8397 5.03203 18.7692 4.99998 18.6923 4.99998H5.30773C5.2308 4.99998 5.16027 5.03203 5.09616 5.09613C5.03206 5.16024 5.00001 5.23077 5.00001 5.3077V18.6923C5.00001 18.7692 5.03206 18.8397 5.09616 18.9038C5.16027 18.9679 5.2308 19 5.30773 19H11.1654C11.2026 19.2769 11.2577 19.5387 11.3308 19.7855C11.4038 20.0323 11.4929 20.2705 11.5981 20.5H5.30773ZM5.00001 19V4.99998V11.1904V11.1154V19ZM7.25003 15.8849C7.25003 16.0975 7.32191 16.2756 7.46566 16.4192C7.60939 16.5628 7.78751 16.6346 8.00001 16.6346H11.2673C11.3109 16.3743 11.3757 16.1208 11.4616 15.874C11.5475 15.6272 11.641 15.3808 11.7423 15.1346H8.00001C7.78751 15.1346 7.60939 15.2065 7.46566 15.3503C7.32191 15.4941 7.25003 15.6723 7.25003 15.8849ZM7.25003 12.0003C7.25003 12.2129 7.32191 12.391 7.46566 12.5346C7.60939 12.6782 7.78751 12.75 8.00001 12.75H13.5904C14.0212 12.3846 14.4808 12.0785 14.9692 11.8317C15.4577 11.5849 15.9807 11.4096 16.5384 11.3058C16.4259 11.281 16.3009 11.2655 16.1634 11.2593C16.0259 11.2531 15.901 11.25 15.7885 11.25H8.00001C7.78751 11.25 7.60939 11.3219 7.46566 11.4657C7.32191 11.6095 7.25003 11.7877 7.25003 12.0003ZM7.25003 8.1157C7.25003 8.3283 7.32191 8.50639 7.46566 8.64998C7.60939 8.79356 7.78751 8.86535 8.00001 8.86535H16C16.2125 8.86535 16.3906 8.79344 16.5344 8.64963C16.6781 8.50583 16.75 8.32763 16.75 8.11503C16.75 7.90244 16.6781 7.72436 16.5344 7.58078C16.3906 7.43718 16.2125 7.36538 16 7.36538H8.00001C7.78751 7.36538 7.60939 7.43728 7.46566 7.5811C7.32191 7.72492 7.25003 7.90312 7.25003 8.1157ZM18 22.5576C16.7513 22.5576 15.6891 22.1198 14.8135 21.2442C13.9378 20.3685 13.5 19.3064 13.5 18.0577C13.5 16.809 13.9378 15.7468 14.8135 14.8712C15.6891 13.9955 16.7513 13.5577 18 13.5577C19.2487 13.5577 20.3109 13.9955 21.1865 14.8712C22.0622 15.7468 22.5 16.809 22.5 18.0577C22.5 19.3064 22.0622 20.3685 21.1865 21.2442C20.3109 22.1198 19.2487 22.5576 18 22.5576ZM17.5577 18.5V20.5577C17.5577 20.6756 17.6019 20.7788 17.6904 20.8673C17.7788 20.9557 17.8821 21 18 21C18.118 21 18.2212 20.9557 18.3096 20.8673C18.3981 20.7788 18.4423 20.6756 18.4423 20.5577V18.5H20.5C20.618 18.5 20.7212 18.4557 20.8096 18.3673C20.8981 18.2788 20.9423 18.1756 20.9423 18.0577C20.9423 17.9397 20.8981 17.8365 20.8096 17.748C20.7212 17.6596 20.618 17.6154 20.5 17.6154H18.4423V15.5577C18.4423 15.4397 18.3981 15.3365 18.3096 15.2481C18.2212 15.1596 18.118 15.1154 18 15.1154C17.8821 15.1154 17.7788 15.1596 17.6904 15.2481C17.6019 15.3365 17.5577 15.4397 17.5577 15.5577V17.6154H15.5C15.3821 17.6154 15.2788 17.6596 15.1904 17.748C15.1019 17.8365 15.0577 17.9397 15.0577 18.0577C15.0577 18.1756 15.1019 18.2788 15.1904 18.3673C15.2788 18.4557 15.3821 18.5 15.5 18.5H17.5577Z",fill:"currentColor"})})]}),SentimentDataIcon=tt=>jsxRuntimeExports.jsxs("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntimeExports.jsx("mask",{id:"mask0_1259_28",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"24",height:"24",children:jsxRuntimeExports.jsx("rect",{width:"1em",height:"1em",fill:"currentColor"})}),jsxRuntimeExports.jsx("g",{mask:"url(#mask0_1259_28)",children:jsxRuntimeExports.jsx("path",{d:"M3 20.75L2.91345 19.4327L4.74998 17.6058V20.75H3ZM7.25003 20.75V15.1058L8.74998 13.6058V20.75H7.25003ZM11.25 20.75V13.6058L12.75 15.1308V20.75H11.25ZM15.25 20.75V15.1308L16.75 13.6308V20.75H15.25ZM19.25 20.75V11.1058L20.75 9.60583V20.75H19.25ZM3.25003 15.2192V13.1058L10 6.35581L14 10.3558L20.75 3.60583V5.71924L14 12.4692L10 8.46921L3.25003 15.2192Z",fill:"currentColor"})})]}),SourcesTableIcon=tt=>jsxRuntimeExports.jsxs("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntimeExports.jsx("mask",{id:"mask0_1259_26",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"24",height:"24",children:jsxRuntimeExports.jsx("rect",{width:"1em",height:"1em",fill:"currentColor"})}),jsxRuntimeExports.jsx("g",{mask:"url(#mask0_1259_26)",children:jsxRuntimeExports.jsx("path",{d:"M10.0577 18.7499C9.84521 18.7499 9.66708 18.678 9.52333 18.5342C9.3796 18.3904 9.30773 18.2122 9.30773 17.9996C9.30773 17.787 9.3796 17.609 9.52333 17.4654C9.66708 17.3218 9.84521 17.25 10.0577 17.25H19.75C19.9625 17.25 20.1406 17.3219 20.2844 17.4657C20.4281 17.6095 20.5 17.7877 20.5 18.0003C20.5 18.2129 20.4281 18.391 20.2844 18.5346C20.1406 18.6782 19.9625 18.7499 19.75 18.7499H10.0577ZM10.0577 12.7499C9.84521 12.7499 9.66708 12.678 9.52333 12.5342C9.3796 12.3904 9.30773 12.2122 9.30773 11.9996C9.30773 11.787 9.3796 11.609 9.52333 11.4654C9.66708 11.3218 9.84521 11.25 10.0577 11.25H19.75C19.9625 11.25 20.1406 11.3219 20.2844 11.4657C20.4281 11.6095 20.5 11.7877 20.5 12.0003C20.5 12.2129 20.4281 12.391 20.2844 12.5346C20.1406 12.6782 19.9625 12.7499 19.75 12.7499H10.0577ZM10.0577 6.74995C9.84521 6.74995 9.66708 6.67805 9.52333 6.53425C9.3796 6.39043 9.30773 6.21223 9.30773 5.99965C9.30773 5.78705 9.3796 5.60896 9.52333 5.46537C9.66708 5.32179 9.84521 5.25 10.0577 5.25H19.75C19.9625 5.25 20.1406 5.3219 20.2844 5.4657C20.4281 5.60951 20.5 5.78771 20.5 6.0003C20.5 6.2129 20.4281 6.39099 20.2844 6.53457C20.1406 6.67816 19.9625 6.74995 19.75 6.74995H10.0577ZM5.16348 19.6634C4.70603 19.6634 4.31443 19.5005 3.98868 19.1748C3.66291 18.849 3.50003 18.4574 3.50003 18C3.50003 17.5425 3.66291 17.1509 3.98868 16.8252C4.31443 16.4994 4.70603 16.3365 5.16348 16.3365C5.62093 16.3365 6.01253 16.4994 6.33828 16.8252C6.66403 17.1509 6.82691 17.5425 6.82691 18C6.82691 18.4574 6.66403 18.849 6.33828 19.1748C6.01253 19.5005 5.62093 19.6634 5.16348 19.6634ZM5.16348 13.6634C4.70603 13.6634 4.31443 13.5005 3.98868 13.1748C3.66291 12.849 3.50003 12.4574 3.50003 12C3.50003 11.5425 3.66291 11.1509 3.98868 10.8252C4.31443 10.4994 4.70603 10.3365 5.16348 10.3365C5.62093 10.3365 6.01253 10.4994 6.33828 10.8252C6.66403 11.1509 6.82691 11.5425 6.82691 12C6.82691 12.4574 6.66403 12.849 6.33828 13.1748C6.01253 13.5005 5.62093 13.6634 5.16348 13.6634ZM5.16348 7.6634C4.70603 7.6634 4.31443 7.50052 3.98868 7.17477C3.66291 6.84902 3.50003 6.45742 3.50003 5.99997C3.50003 5.54252 3.66291 5.15092 3.98868 4.82517C4.31443 4.49942 4.70603 4.33655 5.16348 4.33655C5.62093 4.33655 6.01253 4.49942 6.33828 4.82517C6.66403 5.15092 6.82691 5.54252 6.82691 5.99997C6.82691 6.45742 6.66403 6.84902 6.33828 7.17477C6.01253 7.50052 5.62093 7.6634 5.16348 7.6634Z",fill:"currentColor"})})]}),MainToolbar=()=>{const[tt]=useAppStore(at=>[at.setSecondarySidebarActiveTab]),{open:et,setAddNodeModalData:nt}=useModal("addNode"),{open:rt}=useModal("sourcesTable"),it=at=>{tt(at)},ot=at=>{et(),nt(at)};return jsxRuntimeExports.jsxs(Wrapper$d,{children:[jsxRuntimeExports.jsx(LogoButton,{onClick:()=>it("about"),children:jsxRuntimeExports.jsx("img",{alt:"Second brain",src:"logo.svg"})}),jsxRuntimeExports.jsxs(ActionButton,{onClick:()=>ot("content"),children:[jsxRuntimeExports.jsx(IconWrapper,{children:jsxRuntimeExports.jsx(AddContentIcon,{})}),jsxRuntimeExports.jsx(Text$3,{children:"Add Content"})]}),jsxRuntimeExports.jsxs(ActionButton,{onClick:()=>ot("source"),children:[jsxRuntimeExports.jsx(IconWrapper,{children:jsxRuntimeExports.jsx(AddSourceIcon,{})}),jsxRuntimeExports.jsx(Text$3,{children:"Add Source"})]}),jsxRuntimeExports.jsxs(ActionButton,{id:"cy-open-soure-table",onClick:rt,children:[jsxRuntimeExports.jsx(IconWrapper,{children:jsxRuntimeExports.jsx(SourcesTableIcon,{})}),jsxRuntimeExports.jsx(Text$3,{children:"Source Table"})]}),jsxRuntimeExports.jsxs(ActionButton,{id:"cy-open-sentiment-data",onClick:()=>it("sentiment"),children:[jsxRuntimeExports.jsx(IconWrapper,{children:jsxRuntimeExports.jsx(SentimentDataIcon,{})}),jsxRuntimeExports.jsx(Text$3,{children:"Sentiment Data"})]})]})},Wrapper$d=styled$4(Flex).attrs({align:"flex-start",direction:"column",justify:"flex-start"})` - flex: 0 0 64px; - z-index: 31; - transition: opacity 1s; - background: ${colors.BG2}; -`,LogoButton=styled$4(Flex)` - background: blue; - align-items: center; - justify-content: center; - background: ${colors.primaryBlue}; - width: 64px; - height: 64px; - cursor: pointer; -`,ActionButton=styled$4(Flex).attrs({align:"center",justify:"center",p:0})` - position: relative; - width: 64px; - height: 58px; - padding: 0; - flex-direction: row; - color: ${colors.GRAY6}; - cursor: pointer; - transition: ${({theme:tt})=>tt.transitions.create(["opacity","box-shadow","background-color"])}; - - &:before { - content: ''; - position: absolute; - left: 0; - top: 50%; - transform: translateY(-50%); - width: 4px; /* Initial width */ - height: 32px; /* Initial height on hover */ - background-color: transparent; - transition: height 0.3s, width 0.3s, background-color 0.3s; + function propertyIsUnsafe(tt, et) { + return ( + propertyIsOnObject(tt, et) && !(Object.hasOwnProperty.call(tt, et) && Object.propertyIsEnumerable.call(tt, et)) + ) } - - ${Text$3} { - display: none; - opacity: 0; - width: 0; - padding: 4px 10px; - border-radius: 4px; - background: #000; - box-shadow: 0px 4px 8px 0px rgba(0, 0, 0, 0.25); - position absolute; - left: 90%; - z-index: 99; - white-space: nowrap; - visibility: visible; - font-size: 11px; - font-style: normal; - font-weight: 400; - transition: ${({theme:tt})=>tt.transitions.create(["opacity","visually"])}; + function mergeObject(tt, et, nt) { + var rt = {} + return ( + nt.isMergeableObject(tt) && + getKeys(tt).forEach(function (it) { + rt[it] = cloneUnlessOtherwiseSpecified(tt[it], nt) + }), + getKeys(et).forEach(function (it) { + propertyIsUnsafe(tt, it) || + (propertyIsOnObject(tt, it) && nt.isMergeableObject(et[it]) + ? (rt[it] = getMergeFunction(it, nt)(tt[it], et[it], nt)) + : (rt[it] = cloneUnlessOtherwiseSpecified(et[it], nt))) + }), + rt + ) } - - &:hover { - color: ${colors.white}; - - &:before { - width: 3px; - height: 32px; - background-color: ${colors.primaryBlue}; + function deepmerge(tt, et, nt) { + ;(nt = nt || {}), + (nt.arrayMerge = nt.arrayMerge || defaultArrayMerge), + (nt.isMergeableObject = nt.isMergeableObject || isMergeableObject), + (nt.cloneUnlessOtherwiseSpecified = cloneUnlessOtherwiseSpecified) + var rt = Array.isArray(et), + it = Array.isArray(tt), + ot = rt === it + return ot ? (rt ? nt.arrayMerge(tt, et, nt) : mergeObject(tt, et, nt)) : cloneUnlessOtherwiseSpecified(et, nt) + } + deepmerge.all = function tt(et, nt) { + if (!Array.isArray(et)) throw new Error('first argument should be an array') + return et.reduce(function (rt, it) { + return deepmerge(rt, it, nt) + }, {}) + } + var deepmerge_1 = deepmerge, + cjs = deepmerge_1 + Object.defineProperty(utils, '__esModule', { value: !0 }) + utils.parseStartTime = parseStartTime + utils.parseEndTime = parseEndTime + utils.randomString = randomString + utils.queryString = queryString + utils.getSDK = getSDK + utils.getConfig = getConfig + utils.omit = omit + utils.callPlayer = callPlayer + utils.isMediaStream = isMediaStream + utils.isBlobUrl = isBlobUrl + utils.supportsWebKitPresentationMode = supportsWebKitPresentationMode + var _loadScript = _interopRequireDefault$2(loadScript), + _deepmerge$1 = _interopRequireDefault$2(cjs) + function _interopRequireDefault$2(tt) { + return tt && tt.__esModule ? tt : { default: tt } + } + function _slicedToArray(tt, et) { + return ( + _arrayWithHoles(tt) || + _iterableToArrayLimit(tt, et) || + _unsupportedIterableToArray$2(tt, et) || + _nonIterableRest() + ) + } + function _nonIterableRest() { + throw new TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`) + } + function _unsupportedIterableToArray$2(tt, et) { + if (tt) { + if (typeof tt == 'string') return _arrayLikeToArray$2(tt, et) + var nt = Object.prototype.toString.call(tt).slice(8, -1) + if ((nt === 'Object' && tt.constructor && (nt = tt.constructor.name), nt === 'Map' || nt === 'Set')) + return Array.from(tt) + if (nt === 'Arguments' || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(nt)) return _arrayLikeToArray$2(tt, et) } - - ${Text$3} { - display: block; - width: min-content; - opacity: 1; - visibility: visible; + } + function _arrayLikeToArray$2(tt, et) { + ;(et == null || et > tt.length) && (et = tt.length) + for (var nt = 0, rt = new Array(et); nt < et; nt++) rt[nt] = tt[nt] + return rt + } + function _iterableToArrayLimit(tt, et) { + if (!(typeof Symbol > 'u' || !(Symbol.iterator in Object(tt)))) { + var nt = [], + rt = !0, + it = !1, + ot = void 0 + try { + for ( + var at = tt[Symbol.iterator](), st; + !(rt = (st = at.next()).done) && (nt.push(st.value), !(et && nt.length === et)); + rt = !0 + ); + } catch (lt) { + ;(it = !0), (ot = lt) + } finally { + try { + !rt && at.return != null && at.return() + } finally { + if (it) throw ot + } + } + return nt } } - - &:active { - color: ${colors.white}; - background: ${colors.black}; - &:before { - width: 3px; - height: 100%; - background-color: ${colors.primaryBlue}; + function _arrayWithHoles(tt) { + if (Array.isArray(tt)) return tt + } + var MATCH_START_QUERY = /[?&#](?:start|t)=([0-9hms]+)/, + MATCH_END_QUERY = /[?&#]end=([0-9hms]+)/, + MATCH_START_STAMP = /(\d+)(h|m|s)/g, + MATCH_NUMERIC = /^\d+$/ + function parseTimeParam(tt, et) { + if (!(tt instanceof Array)) { + var nt = tt.match(et) + if (nt) { + var rt = nt[1] + if (rt.match(MATCH_START_STAMP)) return parseTimeString(rt) + if (MATCH_NUMERIC.test(rt)) return parseInt(rt) + } } } - - &.root { - border-radius: 50%; - padding: 0; - align-items: center; - justify-content: center; - border: none; + function parseTimeString(tt) { + for (var et = 0, nt = MATCH_START_STAMP.exec(tt); nt !== null; ) { + var rt = nt, + it = _slicedToArray(rt, 3), + ot = it[1], + at = it[2] + at === 'h' && (et += parseInt(ot, 10) * 60 * 60), + at === 'm' && (et += parseInt(ot, 10) * 60), + at === 's' && (et += parseInt(ot, 10)), + (nt = MATCH_START_STAMP.exec(tt)) + } + return et } -`,IconWrapper=styled$4(Flex)` - justify-content: center; - align-items: center; - font-size: 24px; -`,formatTokenMap={Y:"year",YY:"year",YYYY:{sectionType:"year",contentType:"digit",maxLength:4},M:{sectionType:"month",contentType:"digit",maxLength:2},MM:"month",MMM:{sectionType:"month",contentType:"letter"},MMMM:{sectionType:"month",contentType:"letter"},D:{sectionType:"day",contentType:"digit",maxLength:2},DD:"day",Do:{sectionType:"day",contentType:"digit-with-letter"},E:{sectionType:"weekDay",contentType:"digit",maxLength:1},e:{sectionType:"weekDay",contentType:"digit",maxLength:1},d:{sectionType:"weekDay",contentType:"digit",maxLength:1},dd:{sectionType:"weekDay",contentType:"letter"},ddd:{sectionType:"weekDay",contentType:"letter"},dddd:{sectionType:"weekDay",contentType:"letter"},A:"meridiem",a:"meridiem",H:{sectionType:"hours",contentType:"digit",maxLength:2},HH:"hours",h:{sectionType:"hours",contentType:"digit",maxLength:2},hh:"hours",m:{sectionType:"minutes",contentType:"digit",maxLength:2},mm:"minutes",s:{sectionType:"seconds",contentType:"digit",maxLength:2},ss:"seconds"},defaultFormats={year:"YYYY",month:"MMMM",monthShort:"MMM",dayOfMonth:"D",weekday:"dddd",weekdayShort:"ddd",hours24h:"HH",hours12h:"hh",meridiem:"A",minutes:"mm",seconds:"ss",fullDate:"ll",fullDateWithWeekday:"dddd, LL",keyboardDate:"L",shortDate:"MMM D",normalDate:"D MMMM",normalDateWithWeekday:"ddd, MMM D",monthAndYear:"MMMM YYYY",monthAndDate:"MMMM D",fullTime:"LT",fullTime12h:"hh:mm A",fullTime24h:"HH:mm",fullDateTime:"lll",fullDateTime12h:"ll hh:mm A",fullDateTime24h:"ll HH:mm",keyboardDateTime:"L LT",keyboardDateTime12h:"L hh:mm A",keyboardDateTime24h:"L HH:mm"},MISSING_TIMEZONE_PLUGIN=["Missing timezone plugin","To be able to use timezones, you have to pass the default export from `moment-timezone` to the `dateLibInstance` prop of `LocalizationProvider`","Find more information on https://mui.com/x/react-date-pickers/timezone/#moment-and-timezone"].join(` -`);class AdapterMoment{constructor({locale:et,formats:nt,instance:rt}={}){this.isMUIAdapter=!0,this.isTimezoneCompatible=!0,this.lib="moment",this.moment=void 0,this.locale=void 0,this.formats=void 0,this.escapedCharacters={start:"[",end:"]"},this.formatTokenMap=formatTokenMap,this.setLocaleToValue=it=>{const ot=this.getCurrentLocaleCode();return ot===it.locale()?it:it.locale(ot)},this.syncMomentLocale=it=>{var ot;const at=hooks.locale(),st=(ot=this.locale)!=null?ot:"en-us";if(at!==st){hooks.locale(st);const lt=it();return hooks.locale(at),lt}return it()},this.hasTimezonePlugin=()=>typeof this.moment.tz<"u",this.createSystemDate=it=>{const ot=this.moment(it).local();return this.locale===void 0?ot:ot.locale(this.locale)},this.createUTCDate=it=>{const ot=this.moment.utc(it);return this.locale===void 0?ot:ot.locale(this.locale)},this.createTZDate=(it,ot)=>{if(!this.hasTimezonePlugin())throw new Error(MISSING_TIMEZONE_PLUGIN);const at=ot==="default"?this.moment(it):this.moment.tz(it,ot);return this.locale===void 0?at:at.locale(this.locale)},this.date=it=>{if(it===null)return null;const ot=this.moment(it);return ot.locale(this.getCurrentLocaleCode()),ot},this.dateWithTimezone=(it,ot)=>it===null?null:ot==="UTC"?this.createUTCDate(it):ot==="system"||ot==="default"&&!this.hasTimezonePlugin()?this.createSystemDate(it):this.createTZDate(it,ot),this.getTimezone=it=>{var ot,at,st;const lt=(ot=it._z)==null?void 0:ot.name,ct=it.isUTC()?"UTC":"system";return(at=lt??((st=this.moment.defaultZone)==null?void 0:st.name))!=null?at:ct},this.setTimezone=(it,ot)=>{var at,st;if(this.getTimezone(it)===ot)return it;if(ot==="UTC")return it.clone().utc();if(ot==="system")return it.clone().local();if(!this.hasTimezonePlugin()){if(ot!=="default")throw new Error(MISSING_TIMEZONE_PLUGIN);return it}const lt=ot==="default"?(at=(st=this.moment.defaultZone)==null?void 0:st.name)!=null?at:"system":ot;if(lt==="system")return it.clone().local();const ct=it.clone();return ct.tz(lt),ct},this.toJsDate=it=>it.toDate(),this.parseISO=it=>this.moment(it,!0),this.toISO=it=>it.toISOString(),this.parse=(it,ot)=>it===""?null:this.locale?this.moment(it,ot,this.locale,!0):this.moment(it,ot,!0),this.getCurrentLocaleCode=()=>this.locale||hooks.locale(),this.is12HourCycleInCurrentLocale=()=>/A|a/.test(hooks.localeData(this.getCurrentLocaleCode()).longDateFormat("LT")),this.expandFormat=it=>{const ot=/(\[[^[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})|./g;return it.match(ot).map(at=>{const st=at[0];return st==="L"||st===";"?hooks.localeData(this.getCurrentLocaleCode()).longDateFormat(at):at}).join("")},this.getFormatHelperText=it=>this.expandFormat(it).replace(/a/gi,"(a|p)m").toLocaleLowerCase(),this.isNull=it=>it===null,this.isValid=it=>this.moment(it).isValid(),this.format=(it,ot)=>this.formatByString(it,this.formats[ot]),this.formatByString=(it,ot)=>{const at=it.clone();return at.locale(this.getCurrentLocaleCode()),at.format(ot)},this.formatNumber=it=>it,this.getDiff=(it,ot,at)=>it.diff(ot,at),this.isEqual=(it,ot)=>it===null&&ot===null?!0:this.moment(it).isSame(ot),this.isSameYear=(it,ot)=>it.isSame(ot,"year"),this.isSameMonth=(it,ot)=>it.isSame(ot,"month"),this.isSameDay=(it,ot)=>it.isSame(ot,"day"),this.isSameHour=(it,ot)=>it.isSame(ot,"hour"),this.isAfter=(it,ot)=>it.isAfter(ot),this.isAfterYear=(it,ot)=>it.isAfter(ot,"year"),this.isAfterDay=(it,ot)=>it.isAfter(ot,"day"),this.isBefore=(it,ot)=>it.isBefore(ot),this.isBeforeYear=(it,ot)=>it.isBefore(ot,"year"),this.isBeforeDay=(it,ot)=>it.isBefore(ot,"day"),this.isWithinRange=(it,[ot,at])=>it.isBetween(ot,at,null,"[]"),this.startOfYear=it=>it.clone().startOf("year"),this.startOfMonth=it=>it.clone().startOf("month"),this.startOfWeek=it=>it.clone().startOf("week"),this.startOfDay=it=>it.clone().startOf("day"),this.endOfYear=it=>it.clone().endOf("year"),this.endOfMonth=it=>it.clone().endOf("month"),this.endOfWeek=it=>it.clone().endOf("week"),this.endOfDay=it=>it.clone().endOf("day"),this.addYears=(it,ot)=>ot<0?it.clone().subtract(Math.abs(ot),"years"):it.clone().add(ot,"years"),this.addMonths=(it,ot)=>ot<0?it.clone().subtract(Math.abs(ot),"months"):it.clone().add(ot,"months"),this.addWeeks=(it,ot)=>ot<0?it.clone().subtract(Math.abs(ot),"weeks"):it.clone().add(ot,"weeks"),this.addDays=(it,ot)=>ot<0?it.clone().subtract(Math.abs(ot),"days"):it.clone().add(ot,"days"),this.addHours=(it,ot)=>ot<0?it.clone().subtract(Math.abs(ot),"hours"):it.clone().add(ot,"hours"),this.addMinutes=(it,ot)=>ot<0?it.clone().subtract(Math.abs(ot),"minutes"):it.clone().add(ot,"minutes"),this.addSeconds=(it,ot)=>ot<0?it.clone().subtract(Math.abs(ot),"seconds"):it.clone().add(ot,"seconds"),this.getYear=it=>it.get("year"),this.getMonth=it=>it.get("month"),this.getDate=it=>it.get("date"),this.getHours=it=>it.get("hours"),this.getMinutes=it=>it.get("minutes"),this.getSeconds=it=>it.get("seconds"),this.getMilliseconds=it=>it.get("milliseconds"),this.setYear=(it,ot)=>it.clone().year(ot),this.setMonth=(it,ot)=>it.clone().month(ot),this.setDate=(it,ot)=>it.clone().date(ot),this.setHours=(it,ot)=>it.clone().hours(ot),this.setMinutes=(it,ot)=>it.clone().minutes(ot),this.setSeconds=(it,ot)=>it.clone().seconds(ot),this.setMilliseconds=(it,ot)=>it.clone().milliseconds(ot),this.getDaysInMonth=it=>it.daysInMonth(),this.getNextMonth=it=>it.clone().add(1,"month"),this.getPreviousMonth=it=>it.clone().subtract(1,"month"),this.getMonthArray=it=>{const at=[this.startOfYear(it)];for(;at.length<12;){const st=at[at.length-1];at.push(this.getNextMonth(st))}return at},this.mergeDateAndTime=(it,ot)=>it.clone().hour(ot.hour()).minute(ot.minute()).second(ot.second()),this.getWeekdays=()=>this.syncMomentLocale(()=>hooks.weekdaysShort(!0)),this.getWeekArray=it=>{const ot=this.setLocaleToValue(it),at=ot.clone().startOf("month").startOf("week"),st=ot.clone().endOf("month").endOf("week");let lt=0,ct=at;const ut=[];for(;ct.isBefore(st);){const ht=Math.floor(lt/7);ut[ht]=ut[ht]||[],ut[ht].push(ct),ct=ct.clone().add(1,"day"),lt+=1}return ut},this.getWeekNumber=it=>it.week(),this.getYearRange=(it,ot)=>{const at=this.moment(it).startOf("year"),st=this.moment(ot).endOf("year"),lt=[];let ct=at;for(;ct.isBefore(st);)lt.push(ct),ct=ct.clone().add(1,"year");return lt},this.getMeridiemText=it=>this.is12HourCycleInCurrentLocale()?hooks.localeData(this.getCurrentLocaleCode()).meridiem(it==="am"?0:13,0,!1):it==="am"?"AM":"PM",this.moment=rt||hooks,this.locale=et,this.formats=_extends$u({},defaultFormats,nt)}}const MuiButton={defaultProps:{disableElevation:!0,disableRipple:!0},styleOverrides:{root:{display:"inline-flex",padding:"12px 20px",justifyContent:"center",alignItems:"center",gap:"10px",borderRadius:"200px",background:colors.BUTTON1,color:"var(--Primary-Text, #fff)",fontFamily:"Barlow",fontSize:"12px",fontStyle:"normal",fontWeight:"400",lineHeight:"8px",cursor:"pointer",columnGap:"6px","&:hover":{background:colors.BUTTON1_HOVER,color:colors.GRAY3,outline:"none",boxShadow:"none"},"&:focus":{outline:"none",boxShadow:"none",background:colors.BUTTON1_PRESS,color:colors.GRAY6},"&:active":{outline:"none",boxShadow:"none",background:colors.BUTTON1_PRESS,color:colors.GRAY6},"&.MuiButton-sizeSmall":{padding:"7px 16px",fontSize:"11px",lineHeight:"14px",fontWeight:500},"&.MuiButton-sizeLarge":{padding:"12px 24px",fontSize:"1.2rem"},"&.MuiButton-outlined":{}},outlined:{borderColor:colors.BUTTON1,borderWidth:"1px",backgroundColor:"transparent","&:hover":{borderColor:colors.BUTTON1_HOVER,backgroundColor:"transparent",color:colors.GRAY3},"&:active":{backgroundColor:colors.BUTTON1_PRESS,color:colors.GRAY6}},containedSecondary:{backgroundColor:colors.PRIMARY_BLUE,borderRadius:"6px",color:"white","&:hover":{backgroundColor:colors.PRIMARY_BLUE_BORDER,color:colors.white},"&:active":{backgroundColor:colors.BLUE_PRESS_STATE,color:colors.white},"&:focus":{backgroundColor:colors.BLUE_PRESS_STATE,color:colors.white}},textSecondary:{color:"purple","&:hover":{color:"darkpurple"}},startIcon:{fontSize:"1em",marginRight:0},endIcon:{fontSize:"1em"}}},palette=createPalette({mode:"dark",primary:{main:colors.primaryButton}}),appTheme=createTheme({palette,components:{MuiButton},typography:{button:{textTransform:"none",whiteSpace:"nowrap"}},breakpoints:{values:{xs:breakpoints.small,sm:breakpoints.medium,md:breakpoints.large,lg:1200,xl:1500}}}),AppProviders=({children:tt})=>jsxRuntimeExports.jsxs(ThemeProvider,{theme:appTheme,children:[jsxRuntimeExports.jsx(StyledEngineProvider,{injectFirst:!0}),jsxRuntimeExports.jsx(Le,{theme:appTheme,children:jsxRuntimeExports.jsx(LocalizationProvider,{dateAdapter:AdapterMoment,children:tt})})]}),requiredRule={required:{message:"The field is required",value:!0}},AboutAdminView=({initialValues:tt})=>{const et=useForm({defaultValues:tt,mode:"onSubmit"}),{isSubmitting:nt}=et.formState,rt=et.handleSubmit(async it=>{try{await postAboutData(it)}catch(ot){console.warn(ot)}});return jsxRuntimeExports.jsx(FormProvider,{...et,children:jsxRuntimeExports.jsx("form",{id:"add-node-form",onSubmit:rt,children:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs(Flex,{children:[jsxRuntimeExports.jsx(Flex,{pt:12,children:jsxRuntimeExports.jsx(TextInput,{id:"cy-about-title-id",label:"Graph Title",maxLength:50,name:"title",placeholder:"Type graph title here...",rules:{...requiredRule}})}),jsxRuntimeExports.jsx(Flex,{pt:12,children:jsxRuntimeExports.jsx(TextInput,{id:"cy-about-id",label:"Graph Description",maxLength:50,name:"description",placeholder:"Type graph description here...",rules:{...requiredRule}})}),jsxRuntimeExports.jsx(Flex,{pt:12,children:jsxRuntimeExports.jsx(TextInput,{id:"cy-about-mission_statement-id",label:"Mission Statement",maxLength:50,name:"mission_statement",placeholder:"Type mission statement here...",rules:{...requiredRule}})}),jsxRuntimeExports.jsx(Flex,{pt:12,children:jsxRuntimeExports.jsx(TextInput,{id:"cy-about-search_term-id",label:"Search Term",maxLength:50,name:"search_term",placeholder:"Type search term here...",rules:{...requiredRule}})})]}),jsxRuntimeExports.jsx(Flex,{pt:8,children:nt?jsxRuntimeExports.jsx(SubmitLoader,{children:jsxRuntimeExports.jsx(ClipLoader$2,{color:colors.white,size:20})}):jsxRuntimeExports.jsx(Button,{disabled:nt,id:"add-node-submit-cta",kind:"big",type:"submit",children:"Save changes"})})]})})})},SubmitLoader=styled$4(Flex).attrs({align:"center",background:"primaryButton",borderRadius:8,justify:"center"})` - padding: 16px 24px; - opacity: 0.5; -`,CommonView=({initialValues:tt})=>jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[tt.title&&jsxRuntimeExports.jsxs(Flex,{pt:12,children:[jsxRuntimeExports.jsx(Text$3,{kind:"regular",children:"Graph Title"}),jsxRuntimeExports.jsx(Flex,{pt:12,children:jsxRuntimeExports.jsx(Text$3,{className:"value",kind:"medium",children:tt.title})})]}),tt.description&&jsxRuntimeExports.jsxs(Flex,{pt:12,children:[jsxRuntimeExports.jsx(Text$3,{kind:"regular",children:"Graph Description"}),jsxRuntimeExports.jsx(Flex,{pt:12,children:jsxRuntimeExports.jsx(Text$3,{className:"value",kind:"medium",children:tt.description})})]}),tt.mission_statement&&jsxRuntimeExports.jsxs(Flex,{pt:12,children:[jsxRuntimeExports.jsx(Text$3,{kind:"regular",children:"Mission Statement"}),jsxRuntimeExports.jsx(Flex,{pt:12,children:jsxRuntimeExports.jsx(Text$3,{className:"value",kind:"medium",children:tt.mission_statement})})]})]}),admins=["02c431e64078b10925584d64824c9d1d12eca05e2c56660ffa5ac84aa6946adfe5","03a9a8d953fe747d0dd94dd3c567ddc58451101e987e2d2bf7a4d1e10a2c89ff38","024efa31d1e4f98bccc415b222c9d971866013ad6f95f7d1ed9e8be8e3355a36ff"],defaultData$1={description:"",mission_statement:"",search_term:"",title:""},About=()=>{const[tt,et,nt,rt]=useUserStore(ut=>[ut.setIsAdmin,ut.isAdmin,ut.setPubKey,ut.pubKey]),[it,ot]=reactExports.useState(!1),[at,st]=reactExports.useState(defaultData$1);reactExports.useEffect(()=>{(async()=>{ot(!0);try{const ht=await getAboutData();st(ht)}catch(ht){console.warn(ht)}finally{ot(!1)}})()},[]);const lt=async()=>{await executeIfProd(async()=>{try{const ut=await distExports$1.enable(),ht=ut==null?void 0:ut.pubkey;nt(ht),ht&&tt(ht&&admins.includes(ht))}catch(ut){console.warn(ut)}})},ct=()=>rt?rt&&et?null:jsxRuntimeExports.jsx(Text$3,{children:"You are not admin"}):jsxRuntimeExports.jsx(EditButton,{kind:"small",onClick:lt,children:"Admin"});return jsxRuntimeExports.jsxs(Wrapper$c,{align:"stretch",direction:"column",justify:"flex-end",children:[jsxRuntimeExports.jsxs(Heading$3,{align:"center",direction:"row",justify:"space-between",children:[jsxRuntimeExports.jsx(Text$3,{className:"title",children:"About"}),ct()]}),it?jsxRuntimeExports.jsx(ContentWrapper,{align:"center",justify:"center",children:jsxRuntimeExports.jsx(ClipLoader$2,{})}):jsxRuntimeExports.jsx(ContentWrapper,{align:"stretch",justify:"flex-start",children:et?jsxRuntimeExports.jsx(AboutAdminView,{initialValues:at}):jsxRuntimeExports.jsx(CommonView,{initialValues:at})})]})},Wrapper$c=styled$4(Flex)` - border-radius: 8px; - box-shadow: 0px 5px 6px rgb(0 0 0 / 50%); - padding: 16px; - flex: 1; - - .title { - margin-bottom: 16px; - font-size: 20px; + function parseStartTime(tt) { + return parseTimeParam(tt, MATCH_START_QUERY) } - - .value { - color: ${colors.lightBlue400}; + function parseEndTime(tt) { + return parseTimeParam(tt, MATCH_END_QUERY) } -`,ContentWrapper=styled$4(Flex)` - min-height: 0; - overflow: auto; - flex: 1; - width: 100%; -`,EditButton=styled$4(Button)` - margin-left: auto; -`,Heading$3=styled$4(Flex)` - margin-bottom: 16px; - ${Text$3} { - margin-bottom: 0; + function randomString() { + return Math.random().toString(36).substr(2, 5) } -`,Sentiment=()=>{const[tt,et]=reactExports.useState(void 0),[nt]=useUserStore(at=>[at.setBudget]),[rt,it]=reactExports.useState(!1),ot=async()=>{it(!0),await executeIfProd(()=>distExports$1.enable()),getSentimentData().then(async at=>{et(at==null?void 0:at.data.filter(st=>st.date).map(st=>({date:hooks.unix(Number(String(st.date).split(".")[0])).format("MM/DD/YY"),score:st.sentiment_score}))),await updateBudget(nt)}).catch(console.error).finally(()=>{it(!1)})};return jsxRuntimeExports.jsxs(ChartWrapper,{align:"flex-start",direction:"column",id:"cy-sentiment-chart-wrapper",justify:"flex-end",children:[jsxRuntimeExports.jsx(Text$3,{className:"title",children:"Sentiment chart"}),rt&&jsxRuntimeExports.jsx(Stack$5,{alignItems:"center",component:"div",flexGrow:1,p:4,spacing:2,width:"100%",children:jsxRuntimeExports.jsx(PropagateLoader,{color:colors.white})}),!(tt!=null&&tt.length)&&jsxRuntimeExports.jsx(StyledButton,{className:"button",id:"cy-get-sentiments-btn",onClick:ot,children:"Get top 100 sentiments"}),jsxRuntimeExports.jsx(SentimentChart,{data:tt})]})},ChartWrapper=styled$4(Flex)` - border-radius: 8px; - box-shadow: 0px 5px 6px rgb(0 0 0 / 50%); - padding: 16px; - - .title { - margin-bottom: 16px; - font-size: 20px; + function queryString(tt) { + return Object.keys(tt) + .map(function (et) { + return ''.concat(et, '=').concat(tt[et]) + }) + .join('&') } -`,StyledButton=styled$4(Button)` - height: 48px; -`,MENU_WIDTH$1=600,ComponentsMapper={about:jsxRuntimeExports.jsx(About,{}),sentiment:jsxRuntimeExports.jsx(Sentiment,{}),sources:jsxRuntimeExports.jsx(SourcesView,{}),"":null},SecondarySideBar=()=>{const[tt,et]=useAppStore(nt=>[nt.secondarySidebarActiveTab,nt.setSecondarySidebarActiveTab]);return jsxRuntimeExports.jsx(Slide$1,{direction:"left",in:!!tt,mountOnEnter:!0,unmountOnExit:!0,children:jsxRuntimeExports.jsxs(Wrapper$b,{id:"secondary-sidebar-wrapper",children:[jsxRuntimeExports.jsx(CloseButton$2,{id:"cy-close-secondary-sidebar",onClick:()=>et(""),children:jsxRuntimeExports.jsx(MdClose,{})}),ComponentsMapper[tt]]})})},Wrapper$b=styled$4(Flex)(({theme:tt})=>({background:colors.BG1,height:"100vh",padding:"16px 20px",width:"100%",zIndex:30,display:"flex",[tt.breakpoints.up("sm")]:{width:MENU_WIDTH$1}})),CloseButton$2=styled$4(Flex).attrs({align:"center",justify:"center",p:5})` - background-color: ${colors.inputBg1}; - border-radius: 50%; - color: ${colors.mainBottomIcons}; - cursor: pointer; - transition-duration: 0.2s; - align-self: flex-end; - margin-bottom: 16px; - - &:hover { - background-color: ${colors.gray200}; + function getGlobal(tt) { + return window[tt] + ? window[tt] + : window.exports && window.exports[tt] + ? window.exports[tt] + : window.module && window.module.exports && window.module.exports[tt] + ? window.module.exports[tt] + : null + } + var requests = {} + function getSDK(tt, et) { + var nt = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : null, + rt = + arguments.length > 3 && arguments[3] !== void 0 + ? arguments[3] + : function () { + return !0 + }, + it = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : _loadScript.default, + ot = getGlobal(et) + return ot && rt(ot) + ? Promise.resolve(ot) + : new Promise(function (at, st) { + if (requests[tt]) { + requests[tt].push({ resolve: at, reject: st }) + return + } + requests[tt] = [{ resolve: at, reject: st }] + var lt = function (ht) { + requests[tt].forEach(function (dt) { + return dt.resolve(ht) + }) + } + if (nt) { + var ct = window[nt] + window[nt] = function () { + ct && ct(), lt(getGlobal(et)) + } + } + it(tt, function (ut) { + ut + ? (requests[tt].forEach(function (ht) { + return ht.reject(ut) + }), + (requests[tt] = null)) + : nt || lt(getGlobal(et)) + }) + }) + } + function getConfig(tt, et) { + return (0, _deepmerge$1.default)(et.config, tt.config) + } + function omit(tt) { + for (var et, nt = arguments.length, rt = new Array(nt > 1 ? nt - 1 : 0), it = 1; it < nt; it++) + rt[it - 1] = arguments[it] + for ( + var ot = (et = []).concat.apply(et, rt), at = {}, st = Object.keys(tt), lt = 0, ct = st; + lt < ct.length; + lt++ + ) { + var ut = ct[lt] + ot.indexOf(ut) === -1 && (at[ut] = tt[ut]) + } + return at + } + function callPlayer(tt) { + var et + if (!this.player || !this.player[tt]) { + var nt = 'ReactPlayer: '.concat(this.constructor.displayName, ' player could not call %c').concat(tt, '%c – ') + return ( + this.player + ? this.player[tt] || (nt += 'The method was not available') + : (nt += 'The player was not available'), + console.warn(nt, 'font-weight: bold', ''), + null + ) + } + for (var rt = arguments.length, it = new Array(rt > 1 ? rt - 1 : 0), ot = 1; ot < rt; ot++) + it[ot - 1] = arguments[ot] + return (et = this.player)[tt].apply(et, it) + } + function isMediaStream(tt) { + return typeof window < 'u' && typeof window.MediaStream < 'u' && tt instanceof window.MediaStream + } + function isBlobUrl(tt) { + return /^blob:/.test(tt) + } + function supportsWebKitPresentationMode() { + var tt = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : document.createElement('video'), + et = /iPhone|iPod/.test(navigator.userAgent) === !1 + return tt.webkitSupportsPresentationMode && typeof tt.webkitSetPresentationMode == 'function' && et + } + var patterns = {} + Object.defineProperty(patterns, '__esModule', { value: !0 }) + patterns.canPlay = + patterns.FLV_EXTENSIONS = + patterns.DASH_EXTENSIONS = + patterns.HLS_EXTENSIONS = + patterns.VIDEO_EXTENSIONS = + patterns.AUDIO_EXTENSIONS = + patterns.MATCH_URL_KALTURA = + patterns.MATCH_URL_VIDYARD = + patterns.MATCH_URL_MIXCLOUD = + patterns.MATCH_URL_DAILYMOTION = + patterns.MATCH_URL_TWITCH_CHANNEL = + patterns.MATCH_URL_TWITCH_VIDEO = + patterns.MATCH_URL_WISTIA = + patterns.MATCH_URL_STREAMABLE = + patterns.MATCH_URL_FACEBOOK_WATCH = + patterns.MATCH_URL_FACEBOOK = + patterns.MATCH_URL_VIMEO = + patterns.MATCH_URL_SOUNDCLOUD = + patterns.MATCH_URL_YOUTUBE = + void 0 + var _utils$1 = utils + function _createForOfIteratorHelper(tt, et) { + var nt + if (typeof Symbol > 'u' || tt[Symbol.iterator] == null) { + if (Array.isArray(tt) || (nt = _unsupportedIterableToArray$1(tt)) || (et && tt && typeof tt.length == 'number')) { + nt && (tt = nt) + var rt = 0, + it = function () {} + return { + s: it, + n: function () { + return rt >= tt.length ? { done: !0 } : { done: !1, value: tt[rt++] } + }, + e: function (ct) { + throw ct + }, + f: it, + } + } + throw new TypeError(`Invalid attempt to iterate non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`) + } + var ot = !0, + at = !1, + st + return { + s: function () { + nt = tt[Symbol.iterator]() + }, + n: function () { + var ct = nt.next() + return (ot = ct.done), ct + }, + e: function (ct) { + ;(at = !0), (st = ct) + }, + f: function () { + try { + !ot && nt.return != null && nt.return() + } finally { + if (at) throw st + } + }, + } + } + function _unsupportedIterableToArray$1(tt, et) { + if (tt) { + if (typeof tt == 'string') return _arrayLikeToArray$1(tt, et) + var nt = Object.prototype.toString.call(tt).slice(8, -1) + if ((nt === 'Object' && tt.constructor && (nt = tt.constructor.name), nt === 'Map' || nt === 'Set')) + return Array.from(tt) + if (nt === 'Arguments' || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(nt)) return _arrayLikeToArray$1(tt, et) + } + } + function _arrayLikeToArray$1(tt, et) { + ;(et == null || et > tt.length) && (et = tt.length) + for (var nt = 0, rt = new Array(et); nt < et; nt++) rt[nt] = tt[nt] + return rt + } + var MATCH_URL_YOUTUBE = + /(?:youtu\.be\/|youtube(?:-nocookie|education)?\.com\/(?:embed\/|v\/|watch\/|watch\?v=|watch\?.+&v=|shorts\/|live\/))((\w|-){11})|youtube\.com\/playlist\?list=|youtube\.com\/user\// + patterns.MATCH_URL_YOUTUBE = MATCH_URL_YOUTUBE + var MATCH_URL_SOUNDCLOUD = /(?:soundcloud\.com|snd\.sc)\/[^.]+$/ + patterns.MATCH_URL_SOUNDCLOUD = MATCH_URL_SOUNDCLOUD + var MATCH_URL_VIMEO = /vimeo\.com\/(?!progressive_redirect).+/ + patterns.MATCH_URL_VIMEO = MATCH_URL_VIMEO + var MATCH_URL_FACEBOOK = /^https?:\/\/(www\.)?facebook\.com.*\/(video(s)?|watch|story)(\.php?|\/).+$/ + patterns.MATCH_URL_FACEBOOK = MATCH_URL_FACEBOOK + var MATCH_URL_FACEBOOK_WATCH = /^https?:\/\/fb\.watch\/.+$/ + patterns.MATCH_URL_FACEBOOK_WATCH = MATCH_URL_FACEBOOK_WATCH + var MATCH_URL_STREAMABLE = /streamable\.com\/([a-z0-9]+)$/ + patterns.MATCH_URL_STREAMABLE = MATCH_URL_STREAMABLE + var MATCH_URL_WISTIA = /(?:wistia\.(?:com|net)|wi\.st)\/(?:medias|embed)\/(?:iframe\/)?([^?]+)/ + patterns.MATCH_URL_WISTIA = MATCH_URL_WISTIA + var MATCH_URL_TWITCH_VIDEO = /(?:www\.|go\.)?twitch\.tv\/videos\/(\d+)($|\?)/ + patterns.MATCH_URL_TWITCH_VIDEO = MATCH_URL_TWITCH_VIDEO + var MATCH_URL_TWITCH_CHANNEL = /(?:www\.|go\.)?twitch\.tv\/([a-zA-Z0-9_]+)($|\?)/ + patterns.MATCH_URL_TWITCH_CHANNEL = MATCH_URL_TWITCH_CHANNEL + var MATCH_URL_DAILYMOTION = + /^(?:(?:https?):)?(?:\/\/)?(?:www\.)?(?:(?:dailymotion\.com(?:\/embed)?\/video)|dai\.ly)\/([a-zA-Z0-9]+)(?:_[\w_-]+)?(?:[\w.#_-]+)?/ + patterns.MATCH_URL_DAILYMOTION = MATCH_URL_DAILYMOTION + var MATCH_URL_MIXCLOUD = /mixcloud\.com\/([^/]+\/[^/]+)/ + patterns.MATCH_URL_MIXCLOUD = MATCH_URL_MIXCLOUD + var MATCH_URL_VIDYARD = /vidyard.com\/(?:watch\/)?([a-zA-Z0-9-_]+)/ + patterns.MATCH_URL_VIDYARD = MATCH_URL_VIDYARD + var MATCH_URL_KALTURA = + /^https?:\/\/[a-zA-Z]+\.kaltura.(com|org)\/p\/([0-9]+)\/sp\/([0-9]+)00\/embedIframeJs\/uiconf_id\/([0-9]+)\/partner_id\/([0-9]+)(.*)entry_id.([a-zA-Z0-9-_].*)$/ + patterns.MATCH_URL_KALTURA = MATCH_URL_KALTURA + var AUDIO_EXTENSIONS = /\.(m4a|m4b|mp4a|mpga|mp2|mp2a|mp3|m2a|m3a|wav|weba|aac|oga|spx)($|\?)/i + patterns.AUDIO_EXTENSIONS = AUDIO_EXTENSIONS + var VIDEO_EXTENSIONS = /\.(mp4|og[gv]|webm|mov|m4v)(#t=[,\d+]+)?($|\?)/i + patterns.VIDEO_EXTENSIONS = VIDEO_EXTENSIONS + var HLS_EXTENSIONS = /\.(m3u8)($|\?)/i + patterns.HLS_EXTENSIONS = HLS_EXTENSIONS + var DASH_EXTENSIONS = /\.(mpd)($|\?)/i + patterns.DASH_EXTENSIONS = DASH_EXTENSIONS + var FLV_EXTENSIONS = /\.(flv)($|\?)/i + patterns.FLV_EXTENSIONS = FLV_EXTENSIONS + var canPlayFile = function tt(et) { + if (et instanceof Array) { + var nt = _createForOfIteratorHelper(et), + rt + try { + for (nt.s(); !(rt = nt.n()).done; ) { + var it = rt.value + if ((typeof it == 'string' && tt(it)) || tt(it.src)) return !0 + } + } catch (ot) { + nt.e(ot) + } finally { + nt.f() + } + return !1 + } + return (0, _utils$1.isMediaStream)(et) || (0, _utils$1.isBlobUrl)(et) + ? !0 + : AUDIO_EXTENSIONS.test(et) || + VIDEO_EXTENSIONS.test(et) || + HLS_EXTENSIONS.test(et) || + DASH_EXTENSIONS.test(et) || + FLV_EXTENSIONS.test(et) + }, + canPlay = { + youtube: function tt(et) { + return et instanceof Array + ? et.every(function (nt) { + return MATCH_URL_YOUTUBE.test(nt) + }) + : MATCH_URL_YOUTUBE.test(et) + }, + soundcloud: function tt(et) { + return MATCH_URL_SOUNDCLOUD.test(et) && !AUDIO_EXTENSIONS.test(et) + }, + vimeo: function tt(et) { + return MATCH_URL_VIMEO.test(et) && !VIDEO_EXTENSIONS.test(et) && !HLS_EXTENSIONS.test(et) + }, + facebook: function tt(et) { + return MATCH_URL_FACEBOOK.test(et) || MATCH_URL_FACEBOOK_WATCH.test(et) + }, + streamable: function tt(et) { + return MATCH_URL_STREAMABLE.test(et) + }, + wistia: function tt(et) { + return MATCH_URL_WISTIA.test(et) + }, + twitch: function tt(et) { + return MATCH_URL_TWITCH_VIDEO.test(et) || MATCH_URL_TWITCH_CHANNEL.test(et) + }, + dailymotion: function tt(et) { + return MATCH_URL_DAILYMOTION.test(et) + }, + mixcloud: function tt(et) { + return MATCH_URL_MIXCLOUD.test(et) + }, + vidyard: function tt(et) { + return MATCH_URL_VIDYARD.test(et) + }, + kaltura: function tt(et) { + return MATCH_URL_KALTURA.test(et) + }, + file: canPlayFile, + } + patterns.canPlay = canPlay + var YouTube$1 = {}, + hasRequiredYouTube + function requireYouTube() { + return ( + hasRequiredYouTube || + ((hasRequiredYouTube = 1), + (function (tt) { + function et(zt) { + '@babel/helpers - typeof' + return ( + typeof Symbol == 'function' && typeof Symbol.iterator == 'symbol' + ? (et = function (Nt) { + return typeof Nt + }) + : (et = function (Nt) { + return Nt && typeof Symbol == 'function' && Nt.constructor === Symbol && Nt !== Symbol.prototype + ? 'symbol' + : typeof Nt + }), + et(zt) + ) + } + Object.defineProperty(tt, '__esModule', { value: !0 }), (tt.default = void 0) + var nt = at(reactExports), + rt = utils, + it = patterns + function ot() { + if (typeof WeakMap != 'function') return null + var zt = new WeakMap() + return ( + (ot = function () { + return zt + }), + zt + ) + } + function at(zt) { + if (zt && zt.__esModule) return zt + if (zt === null || (et(zt) !== 'object' && typeof zt != 'function')) return { default: zt } + var Ft = ot() + if (Ft && Ft.has(zt)) return Ft.get(zt) + var Nt = {}, + Ut = Object.defineProperty && Object.getOwnPropertyDescriptor + for (var Mt in zt) + if (Object.prototype.hasOwnProperty.call(zt, Mt)) { + var Ht = Ut ? Object.getOwnPropertyDescriptor(zt, Mt) : null + Ht && (Ht.get || Ht.set) ? Object.defineProperty(Nt, Mt, Ht) : (Nt[Mt] = zt[Mt]) + } + return (Nt.default = zt), Ft && Ft.set(zt, Nt), Nt + } + function st(zt, Ft) { + var Nt = Object.keys(zt) + if (Object.getOwnPropertySymbols) { + var Ut = Object.getOwnPropertySymbols(zt) + Ft && + (Ut = Ut.filter(function (Mt) { + return Object.getOwnPropertyDescriptor(zt, Mt).enumerable + })), + Nt.push.apply(Nt, Ut) + } + return Nt + } + function lt(zt) { + for (var Ft = 1; Ft < arguments.length; Ft++) { + var Nt = arguments[Ft] != null ? arguments[Ft] : {} + Ft % 2 + ? st(Object(Nt), !0).forEach(function (Ut) { + $t(zt, Ut, Nt[Ut]) + }) + : Object.getOwnPropertyDescriptors + ? Object.defineProperties(zt, Object.getOwnPropertyDescriptors(Nt)) + : st(Object(Nt)).forEach(function (Ut) { + Object.defineProperty(zt, Ut, Object.getOwnPropertyDescriptor(Nt, Ut)) + }) + } + return zt + } + function ct(zt, Ft) { + return mt(zt) || pt(zt, Ft) || ht(zt, Ft) || ut() + } + function ut() { + throw new TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`) + } + function ht(zt, Ft) { + if (zt) { + if (typeof zt == 'string') return dt(zt, Ft) + var Nt = Object.prototype.toString.call(zt).slice(8, -1) + if ((Nt === 'Object' && zt.constructor && (Nt = zt.constructor.name), Nt === 'Map' || Nt === 'Set')) + return Array.from(zt) + if (Nt === 'Arguments' || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Nt)) return dt(zt, Ft) + } + } + function dt(zt, Ft) { + ;(Ft == null || Ft > zt.length) && (Ft = zt.length) + for (var Nt = 0, Ut = new Array(Ft); Nt < Ft; Nt++) Ut[Nt] = zt[Nt] + return Ut + } + function pt(zt, Ft) { + if (!(typeof Symbol > 'u' || !(Symbol.iterator in Object(zt)))) { + var Nt = [], + Ut = !0, + Mt = !1, + Ht = void 0 + try { + for ( + var en = zt[Symbol.iterator](), sn; + !(Ut = (sn = en.next()).done) && (Nt.push(sn.value), !(Ft && Nt.length === Ft)); + Ut = !0 + ); + } catch (Kt) { + ;(Mt = !0), (Ht = Kt) + } finally { + try { + !Ut && en.return != null && en.return() + } finally { + if (Mt) throw Ht + } + } + return Nt + } + } + function mt(zt) { + if (Array.isArray(zt)) return zt + } + function gt(zt, Ft) { + if (!(zt instanceof Ft)) throw new TypeError('Cannot call a class as a function') + } + function yt(zt, Ft) { + for (var Nt = 0; Nt < Ft.length; Nt++) { + var Ut = Ft[Nt] + ;(Ut.enumerable = Ut.enumerable || !1), + (Ut.configurable = !0), + 'value' in Ut && (Ut.writable = !0), + Object.defineProperty(zt, Ut.key, Ut) + } + } + function bt(zt, Ft, Nt) { + return Ft && yt(zt.prototype, Ft), Nt && yt(zt, Nt), zt + } + function vt(zt, Ft) { + if (typeof Ft != 'function' && Ft !== null) + throw new TypeError('Super expression must either be null or a function') + ;(zt.prototype = Object.create(Ft && Ft.prototype, { + constructor: { value: zt, writable: !0, configurable: !0 }, + })), + Ft && xt(zt, Ft) + } + function xt(zt, Ft) { + return ( + (xt = + Object.setPrototypeOf || + function (Ut, Mt) { + return (Ut.__proto__ = Mt), Ut + }), + xt(zt, Ft) + ) + } + function kt(zt) { + var Ft = At() + return function () { + var Ut = Et(zt), + Mt + if (Ft) { + var Ht = Et(this).constructor + Mt = Reflect.construct(Ut, arguments, Ht) + } else Mt = Ut.apply(this, arguments) + return St(this, Mt) + } + } + function St(zt, Ft) { + return Ft && (et(Ft) === 'object' || typeof Ft == 'function') ? Ft : Tt(zt) + } + function Tt(zt) { + if (zt === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called") + return zt + } + function At() { + 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 + } + } + function Et(zt) { + return ( + (Et = Object.setPrototypeOf + ? Object.getPrototypeOf + : function (Nt) { + return Nt.__proto__ || Object.getPrototypeOf(Nt) + }), + Et(zt) + ) + } + function $t(zt, Ft, Nt) { + return ( + Ft in zt + ? Object.defineProperty(zt, Ft, { value: Nt, enumerable: !0, configurable: !0, writable: !0 }) + : (zt[Ft] = Nt), + zt + ) + } + var Dt = 'https://www.youtube.com/iframe_api', + jt = 'YT', + Pt = 'onYouTubeIframeAPIReady', + Ct = /[?&](?:list|channel)=([a-zA-Z0-9_-]+)/, + wt = /user\/([a-zA-Z0-9_-]+)\/?/, + It = /youtube-nocookie\.com/, + Ot = 'https://www.youtube-nocookie.com', + Wt = (function (zt) { + vt(Nt, zt) + var Ft = kt(Nt) + function Nt() { + var Ut + gt(this, Nt) + for (var Mt = arguments.length, Ht = new Array(Mt), en = 0; en < Mt; en++) Ht[en] = arguments[en] + return ( + (Ut = Ft.call.apply(Ft, [this].concat(Ht))), + $t(Tt(Ut), 'callPlayer', rt.callPlayer), + $t(Tt(Ut), 'parsePlaylist', function (sn) { + if (sn instanceof Array) return { listType: 'playlist', playlist: sn.map(Ut.getID).join(',') } + if (Ct.test(sn)) { + var Kt = sn.match(Ct), + rn = ct(Kt, 2), + nn = rn[1] + return { listType: 'playlist', list: nn.replace(/^UC/, 'UU') } + } + if (wt.test(sn)) { + var hn = sn.match(wt), + vn = ct(hn, 2), + an = vn[1] + return { listType: 'user_uploads', list: an } + } + return {} + }), + $t(Tt(Ut), 'onStateChange', function (sn) { + var Kt = sn.data, + rn = Ut.props, + nn = rn.onPlay, + hn = rn.onPause, + vn = rn.onBuffer, + an = rn.onBufferEnd, + Qt = rn.onEnded, + _n = rn.onReady, + Pn = rn.loop, + $n = rn.config, + Nn = $n.playerVars, + Tn = $n.onUnstarted, + cn = window[jt].PlayerState, + mn = cn.UNSTARTED, + In = cn.PLAYING, + An = cn.PAUSED, + wn = cn.BUFFERING, + fn = cn.ENDED, + pn = cn.CUED + if ( + (Kt === mn && Tn(), Kt === In && (nn(), an()), Kt === An && hn(), Kt === wn && vn(), Kt === fn) + ) { + var kn = !!Ut.callPlayer('getPlaylist') + Pn && !kn && (Nn.start ? Ut.seekTo(Nn.start) : Ut.play()), Qt() + } + Kt === pn && _n() + }), + $t(Tt(Ut), 'mute', function () { + Ut.callPlayer('mute') + }), + $t(Tt(Ut), 'unmute', function () { + Ut.callPlayer('unMute') + }), + $t(Tt(Ut), 'ref', function (sn) { + Ut.container = sn + }), + Ut + ) + } + return ( + bt(Nt, [ + { + key: 'componentDidMount', + value: function () { + this.props.onMount && this.props.onMount(this) + }, + }, + { + key: 'getID', + value: function (Mt) { + return !Mt || Mt instanceof Array || Ct.test(Mt) ? null : Mt.match(it.MATCH_URL_YOUTUBE)[1] + }, + }, + { + key: 'load', + value: function (Mt, Ht) { + var en = this, + sn = this.props, + Kt = sn.playing, + rn = sn.muted, + nn = sn.playsinline, + hn = sn.controls, + vn = sn.loop, + an = sn.config, + Qt = sn.onError, + _n = an.playerVars, + Pn = an.embedOptions, + $n = this.getID(Mt) + if (Ht) { + if (Ct.test(Mt) || wt.test(Mt) || Mt instanceof Array) { + this.player.loadPlaylist(this.parsePlaylist(Mt)) + return + } + this.player.cueVideoById({ + videoId: $n, + startSeconds: (0, rt.parseStartTime)(Mt) || _n.start, + endSeconds: (0, rt.parseEndTime)(Mt) || _n.end, + }) + return + } + ;(0, rt.getSDK)(Dt, jt, Pt, function (Nn) { + return Nn.loaded + }).then(function (Nn) { + en.container && + (en.player = new Nn.Player( + en.container, + lt( + { + width: '100%', + height: '100%', + videoId: $n, + playerVars: lt( + lt( + { + autoplay: Kt ? 1 : 0, + mute: rn ? 1 : 0, + controls: hn ? 1 : 0, + start: (0, rt.parseStartTime)(Mt), + end: (0, rt.parseEndTime)(Mt), + origin: window.location.origin, + playsinline: nn ? 1 : 0, + }, + en.parsePlaylist(Mt), + ), + _n, + ), + events: { + onReady: function () { + vn && en.player.setLoop(!0), en.props.onReady() + }, + onPlaybackRateChange: function (cn) { + return en.props.onPlaybackRateChange(cn.data) + }, + onPlaybackQualityChange: function (cn) { + return en.props.onPlaybackQualityChange(cn) + }, + onStateChange: en.onStateChange, + onError: function (cn) { + return Qt(cn.data) + }, + }, + host: It.test(Mt) ? Ot : void 0, + }, + Pn, + ), + )) + }, Qt), + Pn.events && + console.warn( + 'Using `embedOptions.events` will likely break things. Use ReactPlayer’s callback props instead, eg onReady, onPlay, onPause', + ) + }, + }, + { + key: 'play', + value: function () { + this.callPlayer('playVideo') + }, + }, + { + key: 'pause', + value: function () { + this.callPlayer('pauseVideo') + }, + }, + { + key: 'stop', + value: function () { + document.body.contains(this.callPlayer('getIframe')) && this.callPlayer('stopVideo') + }, + }, + { + key: 'seekTo', + value: function (Mt) { + var Ht = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1 + this.callPlayer('seekTo', Mt), !Ht && !this.props.playing && this.pause() + }, + }, + { + key: 'setVolume', + value: function (Mt) { + this.callPlayer('setVolume', Mt * 100) + }, + }, + { + key: 'setPlaybackRate', + value: function (Mt) { + this.callPlayer('setPlaybackRate', Mt) + }, + }, + { + key: 'setLoop', + value: function (Mt) { + this.callPlayer('setLoop', Mt) + }, + }, + { + key: 'getDuration', + value: function () { + return this.callPlayer('getDuration') + }, + }, + { + key: 'getCurrentTime', + value: function () { + return this.callPlayer('getCurrentTime') + }, + }, + { + key: 'getSecondsLoaded', + value: function () { + return this.callPlayer('getVideoLoadedFraction') * this.getDuration() + }, + }, + { + key: 'render', + value: function () { + var Mt = this.props.display, + Ht = { width: '100%', height: '100%', display: Mt } + return nt.default.createElement( + 'div', + { style: Ht }, + nt.default.createElement('div', { ref: this.ref }), + ) + }, + }, + ]), + Nt + ) + })(nt.Component) + ;(tt.default = Wt), $t(Wt, 'displayName', 'YouTube'), $t(Wt, 'canPlay', it.canPlay.youtube) + })(YouTube$1)), + YouTube$1 + ) } -`,ChevronLeftIcon=tt=>jsxRuntimeExports.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 18 18",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsxs("g",{id:"keyboard_arrow_left",children:[jsxRuntimeExports.jsx("mask",{id:"mask0_1428_267",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"18",height:"18",children:jsxRuntimeExports.jsx("path",{id:"Bounding box",d:"M0 0H18V18H0V0Z",fill:"currentColor"})}),jsxRuntimeExports.jsx("g",{mask:"url(#mask0_1428_267)",children:jsxRuntimeExports.jsx("path",{id:"keyboard_arrow_left_2",d:"M8.10001 8.99998L11.025 11.925C11.1625 12.0625 11.2313 12.2375 11.2313 12.45C11.2313 12.6625 11.1625 12.8375 11.025 12.975C10.8875 13.1125 10.7125 13.1812 10.5 13.1812C10.2875 13.1812 10.1125 13.1125 9.97501 12.975L6.52501 9.52498C6.45001 9.44998 6.39688 9.36873 6.36563 9.28123C6.33438 9.19373 6.31876 9.09998 6.31876 8.99998C6.31876 8.89998 6.33438 8.80623 6.36563 8.71873C6.39688 8.63123 6.45001 8.54998 6.52501 8.47498L9.97501 5.02498C10.1125 4.88748 10.2875 4.81873 10.5 4.81873C10.7125 4.81873 10.8875 4.88748 11.025 5.02498C11.1625 5.16248 11.2313 5.33748 11.2313 5.54998C11.2313 5.76248 11.1625 5.93748 11.025 6.07498L8.10001 8.99998Z",fill:"currentColor"})})]})}),SearchIcon=tt=>jsxRuntimeExports.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 32 32",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("g",{id:"Property 1=Normal",children:jsxRuntimeExports.jsx("path",{id:"search",d:"M15.5192 20.6153C13.8115 20.6153 12.3654 20.023 11.1808 18.8384C9.99618 17.6538 9.40387 16.2077 9.40387 14.5C9.40387 12.7923 9.99618 11.3462 11.1808 10.1615C12.3654 8.97694 13.8115 8.38464 15.5192 8.38464C17.2269 8.38464 18.6731 8.97694 19.8577 10.1615C21.0423 11.3462 21.6346 12.7923 21.6346 14.5C21.6346 15.2141 21.5147 15.8961 21.275 16.5461C21.0352 17.1961 20.7153 17.7615 20.3153 18.2423L23.0692 20.9961C23.2077 21.1346 23.2785 21.3087 23.2817 21.5183C23.2849 21.7279 23.2141 21.9051 23.0692 22.05C22.9243 22.1948 22.7487 22.2673 22.5423 22.2673C22.3359 22.2673 22.1603 22.1948 22.0154 22.05L19.2615 19.2961C18.7615 19.7089 18.1865 20.032 17.5365 20.2653C16.8865 20.4987 16.2141 20.6153 15.5192 20.6153ZM15.5192 19.1154C16.8077 19.1154 17.899 18.6683 18.7933 17.774C19.6875 16.8798 20.1346 15.7885 20.1346 14.5C20.1346 13.2115 19.6875 12.1202 18.7933 11.2259C17.899 10.3317 16.8077 9.88459 15.5192 9.88459C14.2308 9.88459 13.1394 10.3317 12.2452 11.2259C11.351 12.1202 10.9038 13.2115 10.9038 14.5C10.9038 15.7885 11.351 16.8798 12.2452 17.774C13.1394 18.6683 14.2308 19.1154 15.5192 19.1154Z",fill:"currentColor"})})}),Input=styled$4.input.attrs(()=>({autoCorrect:"off",autoComplete:"off"}))` - pointer-events: auto; - height: 48px; - padding: 0 20px; - z-index: 2; - box-shadow: 0px 1px 6px rgba(0, 0, 0, 0.1); - width: 100%; - color: #fff; - box-shadow: none; - border: none; - border-radius: 200px; - background: ${colors.BG2}; - - &:focus { - outline: 1px solid ${colors.primaryBlue}; + var SoundCloud = {}, + hasRequiredSoundCloud + function requireSoundCloud() { + return ( + hasRequiredSoundCloud || + ((hasRequiredSoundCloud = 1), + (function (tt) { + function et(At) { + '@babel/helpers - typeof' + return ( + typeof Symbol == 'function' && typeof Symbol.iterator == 'symbol' + ? (et = function ($t) { + return typeof $t + }) + : (et = function ($t) { + return $t && typeof Symbol == 'function' && $t.constructor === Symbol && $t !== Symbol.prototype + ? 'symbol' + : typeof $t + }), + et(At) + ) + } + Object.defineProperty(tt, '__esModule', { value: !0 }), (tt.default = void 0) + var nt = at(reactExports), + rt = utils, + it = patterns + function ot() { + if (typeof WeakMap != 'function') return null + var At = new WeakMap() + return ( + (ot = function () { + return At + }), + At + ) + } + function at(At) { + if (At && At.__esModule) return At + if (At === null || (et(At) !== 'object' && typeof At != 'function')) return { default: At } + var Et = ot() + if (Et && Et.has(At)) return Et.get(At) + var $t = {}, + Dt = Object.defineProperty && Object.getOwnPropertyDescriptor + for (var jt in At) + if (Object.prototype.hasOwnProperty.call(At, jt)) { + var Pt = Dt ? Object.getOwnPropertyDescriptor(At, jt) : null + Pt && (Pt.get || Pt.set) ? Object.defineProperty($t, jt, Pt) : ($t[jt] = At[jt]) + } + return ($t.default = At), Et && Et.set(At, $t), $t + } + function st(At, Et) { + var $t = Object.keys(At) + if (Object.getOwnPropertySymbols) { + var Dt = Object.getOwnPropertySymbols(At) + Et && + (Dt = Dt.filter(function (jt) { + return Object.getOwnPropertyDescriptor(At, jt).enumerable + })), + $t.push.apply($t, Dt) + } + return $t + } + function lt(At) { + for (var Et = 1; Et < arguments.length; Et++) { + var $t = arguments[Et] != null ? arguments[Et] : {} + Et % 2 + ? st(Object($t), !0).forEach(function (Dt) { + xt(At, Dt, $t[Dt]) + }) + : Object.getOwnPropertyDescriptors + ? Object.defineProperties(At, Object.getOwnPropertyDescriptors($t)) + : st(Object($t)).forEach(function (Dt) { + Object.defineProperty(At, Dt, Object.getOwnPropertyDescriptor($t, Dt)) + }) + } + return At + } + function ct(At, Et) { + if (!(At instanceof Et)) throw new TypeError('Cannot call a class as a function') + } + function ut(At, Et) { + for (var $t = 0; $t < Et.length; $t++) { + var Dt = Et[$t] + ;(Dt.enumerable = Dt.enumerable || !1), + (Dt.configurable = !0), + 'value' in Dt && (Dt.writable = !0), + Object.defineProperty(At, Dt.key, Dt) + } + } + function ht(At, Et, $t) { + return Et && ut(At.prototype, Et), $t && ut(At, $t), At + } + function dt(At, Et) { + if (typeof Et != 'function' && Et !== null) + throw new TypeError('Super expression must either be null or a function') + ;(At.prototype = Object.create(Et && Et.prototype, { + constructor: { value: At, writable: !0, configurable: !0 }, + })), + Et && pt(At, Et) + } + function pt(At, Et) { + return ( + (pt = + Object.setPrototypeOf || + function (Dt, jt) { + return (Dt.__proto__ = jt), Dt + }), + pt(At, Et) + ) + } + function mt(At) { + var Et = bt() + return function () { + var Dt = vt(At), + jt + if (Et) { + var Pt = vt(this).constructor + jt = Reflect.construct(Dt, arguments, Pt) + } else jt = Dt.apply(this, arguments) + return gt(this, jt) + } + } + function gt(At, Et) { + return Et && (et(Et) === 'object' || typeof Et == 'function') ? Et : yt(At) + } + function yt(At) { + if (At === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called") + return At + } + function bt() { + 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 + } + } + function vt(At) { + return ( + (vt = Object.setPrototypeOf + ? Object.getPrototypeOf + : function ($t) { + return $t.__proto__ || Object.getPrototypeOf($t) + }), + vt(At) + ) + } + function xt(At, Et, $t) { + return ( + Et in At + ? Object.defineProperty(At, Et, { value: $t, enumerable: !0, configurable: !0, writable: !0 }) + : (At[Et] = $t), + At + ) + } + var kt = 'https://w.soundcloud.com/player/api.js', + St = 'SC', + Tt = (function (At) { + dt($t, At) + var Et = mt($t) + function $t() { + var Dt + ct(this, $t) + for (var jt = arguments.length, Pt = new Array(jt), Ct = 0; Ct < jt; Ct++) Pt[Ct] = arguments[Ct] + return ( + (Dt = Et.call.apply(Et, [this].concat(Pt))), + xt(yt(Dt), 'callPlayer', rt.callPlayer), + xt(yt(Dt), 'duration', null), + xt(yt(Dt), 'currentTime', null), + xt(yt(Dt), 'fractionLoaded', null), + xt(yt(Dt), 'mute', function () { + Dt.setVolume(0) + }), + xt(yt(Dt), 'unmute', function () { + Dt.props.volume !== null && Dt.setVolume(Dt.props.volume) + }), + xt(yt(Dt), 'ref', function (wt) { + Dt.iframe = wt + }), + Dt + ) + } + return ( + ht($t, [ + { + key: 'componentDidMount', + value: function () { + this.props.onMount && this.props.onMount(this) + }, + }, + { + key: 'load', + value: function (jt, Pt) { + var Ct = this + ;(0, rt.getSDK)(kt, St).then(function (wt) { + if (Ct.iframe) { + var It = wt.Widget.Events, + Ot = It.PLAY, + Wt = It.PLAY_PROGRESS, + zt = It.PAUSE, + Ft = It.FINISH, + Nt = It.ERROR + Pt || + ((Ct.player = wt.Widget(Ct.iframe)), + Ct.player.bind(Ot, Ct.props.onPlay), + Ct.player.bind(zt, function () { + var Ut = Ct.duration - Ct.currentTime + Ut < 0.05 || Ct.props.onPause() + }), + Ct.player.bind(Wt, function (Ut) { + ;(Ct.currentTime = Ut.currentPosition / 1e3), (Ct.fractionLoaded = Ut.loadedProgress) + }), + Ct.player.bind(Ft, function () { + return Ct.props.onEnded() + }), + Ct.player.bind(Nt, function (Ut) { + return Ct.props.onError(Ut) + })), + Ct.player.load( + jt, + lt( + lt({}, Ct.props.config.options), + {}, + { + callback: function () { + Ct.player.getDuration(function (Mt) { + ;(Ct.duration = Mt / 1e3), Ct.props.onReady() + }) + }, + }, + ), + ) + } + }) + }, + }, + { + key: 'play', + value: function () { + this.callPlayer('play') + }, + }, + { + key: 'pause', + value: function () { + this.callPlayer('pause') + }, + }, + { key: 'stop', value: function () {} }, + { + key: 'seekTo', + value: function (jt) { + var Pt = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0 + this.callPlayer('seekTo', jt * 1e3), Pt || this.pause() + }, + }, + { + key: 'setVolume', + value: function (jt) { + this.callPlayer('setVolume', jt * 100) + }, + }, + { + key: 'getDuration', + value: function () { + return this.duration + }, + }, + { + key: 'getCurrentTime', + value: function () { + return this.currentTime + }, + }, + { + key: 'getSecondsLoaded', + value: function () { + return this.fractionLoaded * this.duration + }, + }, + { + key: 'render', + value: function () { + var jt = this.props.display, + Pt = { width: '100%', height: '100%', display: jt } + return nt.default.createElement('iframe', { + ref: this.ref, + src: 'https://w.soundcloud.com/player/?url='.concat(encodeURIComponent(this.props.url)), + style: Pt, + frameBorder: 0, + allow: 'autoplay', + }) + }, + }, + ]), + $t + ) + })(nt.Component) + ;(tt.default = Tt), + xt(Tt, 'displayName', 'SoundCloud'), + xt(Tt, 'canPlay', it.canPlay.soundcloud), + xt(Tt, 'loopOnEnded', !0) + })(SoundCloud)), + SoundCloud + ) } - - &:hover { - background: ${colors.black}; + var Vimeo = {}, + hasRequiredVimeo + function requireVimeo() { + return ( + hasRequiredVimeo || + ((hasRequiredVimeo = 1), + (function (tt) { + function et(Et) { + '@babel/helpers - typeof' + return ( + typeof Symbol == 'function' && typeof Symbol.iterator == 'symbol' + ? (et = function (Dt) { + return typeof Dt + }) + : (et = function (Dt) { + return Dt && typeof Symbol == 'function' && Dt.constructor === Symbol && Dt !== Symbol.prototype + ? 'symbol' + : typeof Dt + }), + et(Et) + ) + } + Object.defineProperty(tt, '__esModule', { value: !0 }), (tt.default = void 0) + var nt = at(reactExports), + rt = utils, + it = patterns + function ot() { + if (typeof WeakMap != 'function') return null + var Et = new WeakMap() + return ( + (ot = function () { + return Et + }), + Et + ) + } + function at(Et) { + if (Et && Et.__esModule) return Et + if (Et === null || (et(Et) !== 'object' && typeof Et != 'function')) return { default: Et } + var $t = ot() + if ($t && $t.has(Et)) return $t.get(Et) + var Dt = {}, + jt = Object.defineProperty && Object.getOwnPropertyDescriptor + for (var Pt in Et) + if (Object.prototype.hasOwnProperty.call(Et, Pt)) { + var Ct = jt ? Object.getOwnPropertyDescriptor(Et, Pt) : null + Ct && (Ct.get || Ct.set) ? Object.defineProperty(Dt, Pt, Ct) : (Dt[Pt] = Et[Pt]) + } + return (Dt.default = Et), $t && $t.set(Et, Dt), Dt + } + function st(Et, $t) { + var Dt = Object.keys(Et) + if (Object.getOwnPropertySymbols) { + var jt = Object.getOwnPropertySymbols(Et) + $t && + (jt = jt.filter(function (Pt) { + return Object.getOwnPropertyDescriptor(Et, Pt).enumerable + })), + Dt.push.apply(Dt, jt) + } + return Dt + } + function lt(Et) { + for (var $t = 1; $t < arguments.length; $t++) { + var Dt = arguments[$t] != null ? arguments[$t] : {} + $t % 2 + ? st(Object(Dt), !0).forEach(function (jt) { + xt(Et, jt, Dt[jt]) + }) + : Object.getOwnPropertyDescriptors + ? Object.defineProperties(Et, Object.getOwnPropertyDescriptors(Dt)) + : st(Object(Dt)).forEach(function (jt) { + Object.defineProperty(Et, jt, Object.getOwnPropertyDescriptor(Dt, jt)) + }) + } + return Et + } + function ct(Et, $t) { + if (!(Et instanceof $t)) throw new TypeError('Cannot call a class as a function') + } + function ut(Et, $t) { + for (var Dt = 0; Dt < $t.length; Dt++) { + var jt = $t[Dt] + ;(jt.enumerable = jt.enumerable || !1), + (jt.configurable = !0), + 'value' in jt && (jt.writable = !0), + Object.defineProperty(Et, jt.key, jt) + } + } + function ht(Et, $t, Dt) { + return $t && ut(Et.prototype, $t), Dt && ut(Et, Dt), Et + } + function dt(Et, $t) { + if (typeof $t != 'function' && $t !== null) + throw new TypeError('Super expression must either be null or a function') + ;(Et.prototype = Object.create($t && $t.prototype, { + constructor: { value: Et, writable: !0, configurable: !0 }, + })), + $t && pt(Et, $t) + } + function pt(Et, $t) { + return ( + (pt = + Object.setPrototypeOf || + function (jt, Pt) { + return (jt.__proto__ = Pt), jt + }), + pt(Et, $t) + ) + } + function mt(Et) { + var $t = bt() + return function () { + var jt = vt(Et), + Pt + if ($t) { + var Ct = vt(this).constructor + Pt = Reflect.construct(jt, arguments, Ct) + } else Pt = jt.apply(this, arguments) + return gt(this, Pt) + } + } + function gt(Et, $t) { + return $t && (et($t) === 'object' || typeof $t == 'function') ? $t : yt(Et) + } + function yt(Et) { + if (Et === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called") + return Et + } + function bt() { + 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 + } + } + function vt(Et) { + return ( + (vt = Object.setPrototypeOf + ? Object.getPrototypeOf + : function (Dt) { + return Dt.__proto__ || Object.getPrototypeOf(Dt) + }), + vt(Et) + ) + } + function xt(Et, $t, Dt) { + return ( + $t in Et + ? Object.defineProperty(Et, $t, { value: Dt, enumerable: !0, configurable: !0, writable: !0 }) + : (Et[$t] = Dt), + Et + ) + } + var kt = 'https://player.vimeo.com/api/player.js', + St = 'Vimeo', + Tt = function ($t) { + return $t.replace('/manage/videos', '') + }, + At = (function (Et) { + dt(Dt, Et) + var $t = mt(Dt) + function Dt() { + var jt + ct(this, Dt) + for (var Pt = arguments.length, Ct = new Array(Pt), wt = 0; wt < Pt; wt++) Ct[wt] = arguments[wt] + return ( + (jt = $t.call.apply($t, [this].concat(Ct))), + xt(yt(jt), 'callPlayer', rt.callPlayer), + xt(yt(jt), 'duration', null), + xt(yt(jt), 'currentTime', null), + xt(yt(jt), 'secondsLoaded', null), + xt(yt(jt), 'mute', function () { + jt.setMuted(!0) + }), + xt(yt(jt), 'unmute', function () { + jt.setMuted(!1) + }), + xt(yt(jt), 'ref', function (It) { + jt.container = It + }), + jt + ) + } + return ( + ht(Dt, [ + { + key: 'componentDidMount', + value: function () { + this.props.onMount && this.props.onMount(this) + }, + }, + { + key: 'load', + value: function (Pt) { + var Ct = this + ;(this.duration = null), + (0, rt.getSDK)(kt, St).then(function (wt) { + if (Ct.container) { + var It = Ct.props.config, + Ot = It.playerOptions, + Wt = It.title + ;(Ct.player = new wt.Player( + Ct.container, + lt( + { + url: Tt(Pt), + autoplay: Ct.props.playing, + muted: Ct.props.muted, + loop: Ct.props.loop, + playsinline: Ct.props.playsinline, + controls: Ct.props.controls, + }, + Ot, + ), + )), + Ct.player + .ready() + .then(function () { + var zt = Ct.container.querySelector('iframe') + ;(zt.style.width = '100%'), (zt.style.height = '100%'), Wt && (zt.title = Wt) + }) + .catch(Ct.props.onError), + Ct.player.on('loaded', function () { + Ct.props.onReady(), Ct.refreshDuration() + }), + Ct.player.on('play', function () { + Ct.props.onPlay(), Ct.refreshDuration() + }), + Ct.player.on('pause', Ct.props.onPause), + Ct.player.on('seeked', function (zt) { + return Ct.props.onSeek(zt.seconds) + }), + Ct.player.on('ended', Ct.props.onEnded), + Ct.player.on('error', Ct.props.onError), + Ct.player.on('timeupdate', function (zt) { + var Ft = zt.seconds + Ct.currentTime = Ft + }), + Ct.player.on('progress', function (zt) { + var Ft = zt.seconds + Ct.secondsLoaded = Ft + }), + Ct.player.on('bufferstart', Ct.props.onBuffer), + Ct.player.on('bufferend', Ct.props.onBufferEnd), + Ct.player.on('playbackratechange', function (zt) { + return Ct.props.onPlaybackRateChange(zt.playbackRate) + }) + } + }, this.props.onError) + }, + }, + { + key: 'refreshDuration', + value: function () { + var Pt = this + this.player.getDuration().then(function (Ct) { + Pt.duration = Ct + }) + }, + }, + { + key: 'play', + value: function () { + var Pt = this.callPlayer('play') + Pt && Pt.catch(this.props.onError) + }, + }, + { + key: 'pause', + value: function () { + this.callPlayer('pause') + }, + }, + { + key: 'stop', + value: function () { + this.callPlayer('unload') + }, + }, + { + key: 'seekTo', + value: function (Pt) { + var Ct = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0 + this.callPlayer('setCurrentTime', Pt), Ct || this.pause() + }, + }, + { + key: 'setVolume', + value: function (Pt) { + this.callPlayer('setVolume', Pt) + }, + }, + { + key: 'setMuted', + value: function (Pt) { + this.callPlayer('setMuted', Pt) + }, + }, + { + key: 'setLoop', + value: function (Pt) { + this.callPlayer('setLoop', Pt) + }, + }, + { + key: 'setPlaybackRate', + value: function (Pt) { + this.callPlayer('setPlaybackRate', Pt) + }, + }, + { + key: 'getDuration', + value: function () { + return this.duration + }, + }, + { + key: 'getCurrentTime', + value: function () { + return this.currentTime + }, + }, + { + key: 'getSecondsLoaded', + value: function () { + return this.secondsLoaded + }, + }, + { + key: 'render', + value: function () { + var Pt = this.props.display, + Ct = { width: '100%', height: '100%', overflow: 'hidden', display: Pt } + return nt.default.createElement('div', { key: this.props.url, ref: this.ref, style: Ct }) + }, + }, + ]), + Dt + ) + })(nt.Component) + ;(tt.default = At), + xt(At, 'displayName', 'Vimeo'), + xt(At, 'canPlay', it.canPlay.vimeo), + xt(At, 'forceLoad', !0) + })(Vimeo)), + Vimeo + ) } - - &::placeholder { - color: ${colors.GRAY7}; + var Facebook = {}, + hasRequiredFacebook + function requireFacebook() { + return ( + hasRequiredFacebook || + ((hasRequiredFacebook = 1), + (function (tt) { + function et(Et) { + '@babel/helpers - typeof' + return ( + typeof Symbol == 'function' && typeof Symbol.iterator == 'symbol' + ? (et = function (Dt) { + return typeof Dt + }) + : (et = function (Dt) { + return Dt && typeof Symbol == 'function' && Dt.constructor === Symbol && Dt !== Symbol.prototype + ? 'symbol' + : typeof Dt + }), + et(Et) + ) + } + Object.defineProperty(tt, '__esModule', { value: !0 }), (tt.default = void 0) + var nt = at(reactExports), + rt = utils, + it = patterns + function ot() { + if (typeof WeakMap != 'function') return null + var Et = new WeakMap() + return ( + (ot = function () { + return Et + }), + Et + ) + } + function at(Et) { + if (Et && Et.__esModule) return Et + if (Et === null || (et(Et) !== 'object' && typeof Et != 'function')) return { default: Et } + var $t = ot() + if ($t && $t.has(Et)) return $t.get(Et) + var Dt = {}, + jt = Object.defineProperty && Object.getOwnPropertyDescriptor + for (var Pt in Et) + if (Object.prototype.hasOwnProperty.call(Et, Pt)) { + var Ct = jt ? Object.getOwnPropertyDescriptor(Et, Pt) : null + Ct && (Ct.get || Ct.set) ? Object.defineProperty(Dt, Pt, Ct) : (Dt[Pt] = Et[Pt]) + } + return (Dt.default = Et), $t && $t.set(Et, Dt), Dt + } + function st() { + return ( + (st = + Object.assign || + function (Et) { + for (var $t = 1; $t < arguments.length; $t++) { + var Dt = arguments[$t] + for (var jt in Dt) Object.prototype.hasOwnProperty.call(Dt, jt) && (Et[jt] = Dt[jt]) + } + return Et + }), + st.apply(this, arguments) + ) + } + function lt(Et, $t) { + if (!(Et instanceof $t)) throw new TypeError('Cannot call a class as a function') + } + function ct(Et, $t) { + for (var Dt = 0; Dt < $t.length; Dt++) { + var jt = $t[Dt] + ;(jt.enumerable = jt.enumerable || !1), + (jt.configurable = !0), + 'value' in jt && (jt.writable = !0), + Object.defineProperty(Et, jt.key, jt) + } + } + function ut(Et, $t, Dt) { + return $t && ct(Et.prototype, $t), Dt && ct(Et, Dt), Et + } + function ht(Et, $t) { + if (typeof $t != 'function' && $t !== null) + throw new TypeError('Super expression must either be null or a function') + ;(Et.prototype = Object.create($t && $t.prototype, { + constructor: { value: Et, writable: !0, configurable: !0 }, + })), + $t && dt(Et, $t) + } + function dt(Et, $t) { + return ( + (dt = + Object.setPrototypeOf || + function (jt, Pt) { + return (jt.__proto__ = Pt), jt + }), + dt(Et, $t) + ) + } + function pt(Et) { + var $t = yt() + return function () { + var jt = bt(Et), + Pt + if ($t) { + var Ct = bt(this).constructor + Pt = Reflect.construct(jt, arguments, Ct) + } else Pt = jt.apply(this, arguments) + return mt(this, Pt) + } + } + function mt(Et, $t) { + return $t && (et($t) === 'object' || typeof $t == 'function') ? $t : gt(Et) + } + function gt(Et) { + if (Et === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called") + return Et + } + function yt() { + 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 + } + } + function bt(Et) { + return ( + (bt = Object.setPrototypeOf + ? Object.getPrototypeOf + : function (Dt) { + return Dt.__proto__ || Object.getPrototypeOf(Dt) + }), + bt(Et) + ) + } + function vt(Et, $t, Dt) { + return ( + $t in Et + ? Object.defineProperty(Et, $t, { value: Dt, enumerable: !0, configurable: !0, writable: !0 }) + : (Et[$t] = Dt), + Et + ) + } + var xt = 'https://connect.facebook.net/en_US/sdk.js', + kt = 'FB', + St = 'fbAsyncInit', + Tt = 'facebook-player-', + At = (function (Et) { + ht(Dt, Et) + var $t = pt(Dt) + function Dt() { + var jt + lt(this, Dt) + for (var Pt = arguments.length, Ct = new Array(Pt), wt = 0; wt < Pt; wt++) Ct[wt] = arguments[wt] + return ( + (jt = $t.call.apply($t, [this].concat(Ct))), + vt(gt(jt), 'callPlayer', rt.callPlayer), + vt(gt(jt), 'playerID', jt.props.config.playerId || ''.concat(Tt).concat((0, rt.randomString)())), + vt(gt(jt), 'mute', function () { + jt.callPlayer('mute') + }), + vt(gt(jt), 'unmute', function () { + jt.callPlayer('unmute') + }), + jt + ) + } + return ( + ut(Dt, [ + { + key: 'componentDidMount', + value: function () { + this.props.onMount && this.props.onMount(this) + }, + }, + { + key: 'load', + value: function (Pt, Ct) { + var wt = this + if (Ct) { + ;(0, rt.getSDK)(xt, kt, St).then(function (It) { + return It.XFBML.parse() + }) + return + } + ;(0, rt.getSDK)(xt, kt, St).then(function (It) { + It.init({ appId: wt.props.config.appId, xfbml: !0, version: wt.props.config.version }), + It.Event.subscribe('xfbml.render', function (Ot) { + wt.props.onLoaded() + }), + It.Event.subscribe('xfbml.ready', function (Ot) { + Ot.type === 'video' && + Ot.id === wt.playerID && + ((wt.player = Ot.instance), + wt.player.subscribe('startedPlaying', wt.props.onPlay), + wt.player.subscribe('paused', wt.props.onPause), + wt.player.subscribe('finishedPlaying', wt.props.onEnded), + wt.player.subscribe('startedBuffering', wt.props.onBuffer), + wt.player.subscribe('finishedBuffering', wt.props.onBufferEnd), + wt.player.subscribe('error', wt.props.onError), + wt.props.muted ? wt.callPlayer('mute') : wt.callPlayer('unmute'), + wt.props.onReady(), + (document.getElementById(wt.playerID).querySelector('iframe').style.visibility = + 'visible')) + }) + }) + }, + }, + { + key: 'play', + value: function () { + this.callPlayer('play') + }, + }, + { + key: 'pause', + value: function () { + this.callPlayer('pause') + }, + }, + { key: 'stop', value: function () {} }, + { + key: 'seekTo', + value: function (Pt) { + var Ct = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0 + this.callPlayer('seek', Pt), Ct || this.pause() + }, + }, + { + key: 'setVolume', + value: function (Pt) { + this.callPlayer('setVolume', Pt) + }, + }, + { + key: 'getDuration', + value: function () { + return this.callPlayer('getDuration') + }, + }, + { + key: 'getCurrentTime', + value: function () { + return this.callPlayer('getCurrentPosition') + }, + }, + { + key: 'getSecondsLoaded', + value: function () { + return null + }, + }, + { + key: 'render', + value: function () { + var Pt = this.props.config.attributes, + Ct = { width: '100%', height: '100%' } + return nt.default.createElement( + 'div', + st( + { + style: Ct, + id: this.playerID, + className: 'fb-video', + 'data-href': this.props.url, + 'data-autoplay': this.props.playing ? 'true' : 'false', + 'data-allowfullscreen': 'true', + 'data-controls': this.props.controls ? 'true' : 'false', + }, + Pt, + ), + ) + }, + }, + ]), + Dt + ) + })(nt.Component) + ;(tt.default = At), + vt(At, 'displayName', 'Facebook'), + vt(At, 'canPlay', it.canPlay.facebook), + vt(At, 'loopOnEnded', !0) + })(Facebook)), + Facebook + ) } - - ${({loading:tt})=>tt&&Ae` - background-image: url('https://i.gifer.com/ZZ5H.gif'); - background-size: 25px 25px; - background-position: right center; - background-position-x: 95%; - background-repeat: no-repeat; - `} -`,SearchBar=({loading:tt,onSubmit:et})=>{const{register:nt}=useFormContext();return jsxRuntimeExports.jsx(Input,{...nt("search"),disabled:tt,id:"main-search",loading:tt,onKeyPress:rt=>{rt.key==="Enter"&&(et==null||et())},placeholder:"Search (10 sats)",type:"text"})},messages=[["Searching","Podcast Index"],["Searching","YouTube"],["Searching","Twitter Spaces"],["Finding","Transcripts"],["Loading","Audio Clips"],["Loading","Video Clips"],["Preparing","Results"]],FetchLoaderText=()=>{const[tt,et]=reactExports.useState(0);return reactExports.useEffect(()=>{if(tt===messages.length-1)return;const nt=setTimeout(()=>et(rt=>(rt+1)%messages.length),2e3);return()=>clearTimeout(nt)},[tt]),jsxRuntimeExports.jsx(Wrapper$a,{direction:"column",children:messages.map((nt,rt)=>jsxRuntimeExports.jsxs(Flex,{className:clsx$1("raw-wrapper",{show:tt===rt}),direction:"row",children:[jsxRuntimeExports.jsx("div",{className:clsx$1("action"),children:nt[0]}),jsxRuntimeExports.jsx("div",{className:clsx$1("entity"),children:nt[1]}),jsxRuntimeExports.jsx("div",{children:jsxRuntimeExports.jsx(BeatLoader,{color:colors.SECONDARY_BLUE,size:2})})]},nt[1]))})},Wrapper$a=styled$4(Flex)` - overflow: hidden; - height: 20px; - position: relative; - .action { - color: ${colors.white}; - margin-right: 8px; + var Streamable = {}, + hasRequiredStreamable + function requireStreamable() { + return ( + hasRequiredStreamable || + ((hasRequiredStreamable = 1), + (function (tt) { + function et(St) { + '@babel/helpers - typeof' + return ( + typeof Symbol == 'function' && typeof Symbol.iterator == 'symbol' + ? (et = function (At) { + return typeof At + }) + : (et = function (At) { + return At && typeof Symbol == 'function' && At.constructor === Symbol && At !== Symbol.prototype + ? 'symbol' + : typeof At + }), + et(St) + ) + } + Object.defineProperty(tt, '__esModule', { value: !0 }), (tt.default = void 0) + var nt = at(reactExports), + rt = utils, + it = patterns + function ot() { + if (typeof WeakMap != 'function') return null + var St = new WeakMap() + return ( + (ot = function () { + return St + }), + St + ) + } + function at(St) { + if (St && St.__esModule) return St + if (St === null || (et(St) !== 'object' && typeof St != 'function')) return { default: St } + var Tt = ot() + if (Tt && Tt.has(St)) return Tt.get(St) + var At = {}, + Et = Object.defineProperty && Object.getOwnPropertyDescriptor + for (var $t in St) + if (Object.prototype.hasOwnProperty.call(St, $t)) { + var Dt = Et ? Object.getOwnPropertyDescriptor(St, $t) : null + Dt && (Dt.get || Dt.set) ? Object.defineProperty(At, $t, Dt) : (At[$t] = St[$t]) + } + return (At.default = St), Tt && Tt.set(St, At), At + } + function st(St, Tt) { + if (!(St instanceof Tt)) throw new TypeError('Cannot call a class as a function') + } + function lt(St, Tt) { + for (var At = 0; At < Tt.length; At++) { + var Et = Tt[At] + ;(Et.enumerable = Et.enumerable || !1), + (Et.configurable = !0), + 'value' in Et && (Et.writable = !0), + Object.defineProperty(St, Et.key, Et) + } + } + function ct(St, Tt, At) { + return Tt && lt(St.prototype, Tt), At && lt(St, At), St + } + function ut(St, Tt) { + if (typeof Tt != 'function' && Tt !== null) + throw new TypeError('Super expression must either be null or a function') + ;(St.prototype = Object.create(Tt && Tt.prototype, { + constructor: { value: St, writable: !0, configurable: !0 }, + })), + Tt && ht(St, Tt) + } + function ht(St, Tt) { + return ( + (ht = + Object.setPrototypeOf || + function (Et, $t) { + return (Et.__proto__ = $t), Et + }), + ht(St, Tt) + ) + } + function dt(St) { + var Tt = gt() + return function () { + var Et = yt(St), + $t + if (Tt) { + var Dt = yt(this).constructor + $t = Reflect.construct(Et, arguments, Dt) + } else $t = Et.apply(this, arguments) + return pt(this, $t) + } + } + function pt(St, Tt) { + return Tt && (et(Tt) === 'object' || typeof Tt == 'function') ? Tt : mt(St) + } + function mt(St) { + if (St === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called") + return St + } + function gt() { + 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 + } + } + function yt(St) { + return ( + (yt = Object.setPrototypeOf + ? Object.getPrototypeOf + : function (At) { + return At.__proto__ || Object.getPrototypeOf(At) + }), + yt(St) + ) + } + function bt(St, Tt, At) { + return ( + Tt in St + ? Object.defineProperty(St, Tt, { value: At, enumerable: !0, configurable: !0, writable: !0 }) + : (St[Tt] = At), + St + ) + } + var vt = 'https://cdn.embed.ly/player-0.1.0.min.js', + xt = 'playerjs', + kt = (function (St) { + ut(At, St) + var Tt = dt(At) + function At() { + var Et + st(this, At) + for (var $t = arguments.length, Dt = new Array($t), jt = 0; jt < $t; jt++) Dt[jt] = arguments[jt] + return ( + (Et = Tt.call.apply(Tt, [this].concat(Dt))), + bt(mt(Et), 'callPlayer', rt.callPlayer), + bt(mt(Et), 'duration', null), + bt(mt(Et), 'currentTime', null), + bt(mt(Et), 'secondsLoaded', null), + bt(mt(Et), 'mute', function () { + Et.callPlayer('mute') + }), + bt(mt(Et), 'unmute', function () { + Et.callPlayer('unmute') + }), + bt(mt(Et), 'ref', function (Pt) { + Et.iframe = Pt + }), + Et + ) + } + return ( + ct(At, [ + { + key: 'componentDidMount', + value: function () { + this.props.onMount && this.props.onMount(this) + }, + }, + { + key: 'load', + value: function ($t) { + var Dt = this + ;(0, rt.getSDK)(vt, xt).then(function (jt) { + Dt.iframe && + ((Dt.player = new jt.Player(Dt.iframe)), + Dt.player.setLoop(Dt.props.loop), + Dt.player.on('ready', Dt.props.onReady), + Dt.player.on('play', Dt.props.onPlay), + Dt.player.on('pause', Dt.props.onPause), + Dt.player.on('seeked', Dt.props.onSeek), + Dt.player.on('ended', Dt.props.onEnded), + Dt.player.on('error', Dt.props.onError), + Dt.player.on('timeupdate', function (Pt) { + var Ct = Pt.duration, + wt = Pt.seconds + ;(Dt.duration = Ct), (Dt.currentTime = wt) + }), + Dt.player.on('buffered', function (Pt) { + var Ct = Pt.percent + Dt.duration && (Dt.secondsLoaded = Dt.duration * Ct) + }), + Dt.props.muted && Dt.player.mute()) + }, this.props.onError) + }, + }, + { + key: 'play', + value: function () { + this.callPlayer('play') + }, + }, + { + key: 'pause', + value: function () { + this.callPlayer('pause') + }, + }, + { key: 'stop', value: function () {} }, + { + key: 'seekTo', + value: function ($t) { + var Dt = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0 + this.callPlayer('setCurrentTime', $t), Dt || this.pause() + }, + }, + { + key: 'setVolume', + value: function ($t) { + this.callPlayer('setVolume', $t * 100) + }, + }, + { + key: 'setLoop', + value: function ($t) { + this.callPlayer('setLoop', $t) + }, + }, + { + key: 'getDuration', + value: function () { + return this.duration + }, + }, + { + key: 'getCurrentTime', + value: function () { + return this.currentTime + }, + }, + { + key: 'getSecondsLoaded', + value: function () { + return this.secondsLoaded + }, + }, + { + key: 'render', + value: function () { + var $t = this.props.url.match(it.MATCH_URL_STREAMABLE)[1], + Dt = { width: '100%', height: '100%' } + return nt.default.createElement('iframe', { + ref: this.ref, + src: 'https://streamable.com/o/'.concat($t), + frameBorder: '0', + scrolling: 'no', + style: Dt, + allow: 'encrypted-media; autoplay; fullscreen;', + }) + }, + }, + ]), + At + ) + })(nt.Component) + ;(tt.default = kt), bt(kt, 'displayName', 'Streamable'), bt(kt, 'canPlay', it.canPlay.streamable) + })(Streamable)), + Streamable + ) } - - .raw-wrapper { - height: 0; - overflow: hidden; - transition: height 0.7s ease-in-out; - align-items: flex-end; - &.show { - height: 20px; - } + var Wistia = {}, + hasRequiredWistia + function requireWistia() { + return ( + hasRequiredWistia || + ((hasRequiredWistia = 1), + (function (tt) { + function et(Et) { + '@babel/helpers - typeof' + return ( + typeof Symbol == 'function' && typeof Symbol.iterator == 'symbol' + ? (et = function (Dt) { + return typeof Dt + }) + : (et = function (Dt) { + return Dt && typeof Symbol == 'function' && Dt.constructor === Symbol && Dt !== Symbol.prototype + ? 'symbol' + : typeof Dt + }), + et(Et) + ) + } + Object.defineProperty(tt, '__esModule', { value: !0 }), (tt.default = void 0) + var nt = at(reactExports), + rt = utils, + it = patterns + function ot() { + if (typeof WeakMap != 'function') return null + var Et = new WeakMap() + return ( + (ot = function () { + return Et + }), + Et + ) + } + function at(Et) { + if (Et && Et.__esModule) return Et + if (Et === null || (et(Et) !== 'object' && typeof Et != 'function')) return { default: Et } + var $t = ot() + if ($t && $t.has(Et)) return $t.get(Et) + var Dt = {}, + jt = Object.defineProperty && Object.getOwnPropertyDescriptor + for (var Pt in Et) + if (Object.prototype.hasOwnProperty.call(Et, Pt)) { + var Ct = jt ? Object.getOwnPropertyDescriptor(Et, Pt) : null + Ct && (Ct.get || Ct.set) ? Object.defineProperty(Dt, Pt, Ct) : (Dt[Pt] = Et[Pt]) + } + return (Dt.default = Et), $t && $t.set(Et, Dt), Dt + } + function st(Et, $t) { + var Dt = Object.keys(Et) + if (Object.getOwnPropertySymbols) { + var jt = Object.getOwnPropertySymbols(Et) + $t && + (jt = jt.filter(function (Pt) { + return Object.getOwnPropertyDescriptor(Et, Pt).enumerable + })), + Dt.push.apply(Dt, jt) + } + return Dt + } + function lt(Et) { + for (var $t = 1; $t < arguments.length; $t++) { + var Dt = arguments[$t] != null ? arguments[$t] : {} + $t % 2 + ? st(Object(Dt), !0).forEach(function (jt) { + xt(Et, jt, Dt[jt]) + }) + : Object.getOwnPropertyDescriptors + ? Object.defineProperties(Et, Object.getOwnPropertyDescriptors(Dt)) + : st(Object(Dt)).forEach(function (jt) { + Object.defineProperty(Et, jt, Object.getOwnPropertyDescriptor(Dt, jt)) + }) + } + return Et + } + function ct(Et, $t) { + if (!(Et instanceof $t)) throw new TypeError('Cannot call a class as a function') + } + function ut(Et, $t) { + for (var Dt = 0; Dt < $t.length; Dt++) { + var jt = $t[Dt] + ;(jt.enumerable = jt.enumerable || !1), + (jt.configurable = !0), + 'value' in jt && (jt.writable = !0), + Object.defineProperty(Et, jt.key, jt) + } + } + function ht(Et, $t, Dt) { + return $t && ut(Et.prototype, $t), Dt && ut(Et, Dt), Et + } + function dt(Et, $t) { + if (typeof $t != 'function' && $t !== null) + throw new TypeError('Super expression must either be null or a function') + ;(Et.prototype = Object.create($t && $t.prototype, { + constructor: { value: Et, writable: !0, configurable: !0 }, + })), + $t && pt(Et, $t) + } + function pt(Et, $t) { + return ( + (pt = + Object.setPrototypeOf || + function (jt, Pt) { + return (jt.__proto__ = Pt), jt + }), + pt(Et, $t) + ) + } + function mt(Et) { + var $t = bt() + return function () { + var jt = vt(Et), + Pt + if ($t) { + var Ct = vt(this).constructor + Pt = Reflect.construct(jt, arguments, Ct) + } else Pt = jt.apply(this, arguments) + return gt(this, Pt) + } + } + function gt(Et, $t) { + return $t && (et($t) === 'object' || typeof $t == 'function') ? $t : yt(Et) + } + function yt(Et) { + if (Et === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called") + return Et + } + function bt() { + 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 + } + } + function vt(Et) { + return ( + (vt = Object.setPrototypeOf + ? Object.getPrototypeOf + : function (Dt) { + return Dt.__proto__ || Object.getPrototypeOf(Dt) + }), + vt(Et) + ) + } + function xt(Et, $t, Dt) { + return ( + $t in Et + ? Object.defineProperty(Et, $t, { value: Dt, enumerable: !0, configurable: !0, writable: !0 }) + : (Et[$t] = Dt), + Et + ) + } + var kt = 'https://fast.wistia.com/assets/external/E-v1.js', + St = 'Wistia', + Tt = 'wistia-player-', + At = (function (Et) { + dt(Dt, Et) + var $t = mt(Dt) + function Dt() { + var jt + ct(this, Dt) + for (var Pt = arguments.length, Ct = new Array(Pt), wt = 0; wt < Pt; wt++) Ct[wt] = arguments[wt] + return ( + (jt = $t.call.apply($t, [this].concat(Ct))), + xt(yt(jt), 'callPlayer', rt.callPlayer), + xt(yt(jt), 'playerID', jt.props.config.playerId || ''.concat(Tt).concat((0, rt.randomString)())), + xt(yt(jt), 'onPlay', function () { + var It + return (It = jt.props).onPlay.apply(It, arguments) + }), + xt(yt(jt), 'onPause', function () { + var It + return (It = jt.props).onPause.apply(It, arguments) + }), + xt(yt(jt), 'onSeek', function () { + var It + return (It = jt.props).onSeek.apply(It, arguments) + }), + xt(yt(jt), 'onEnded', function () { + var It + return (It = jt.props).onEnded.apply(It, arguments) + }), + xt(yt(jt), 'onPlaybackRateChange', function () { + var It + return (It = jt.props).onPlaybackRateChange.apply(It, arguments) + }), + xt(yt(jt), 'mute', function () { + jt.callPlayer('mute') + }), + xt(yt(jt), 'unmute', function () { + jt.callPlayer('unmute') + }), + jt + ) + } + return ( + ht(Dt, [ + { + key: 'componentDidMount', + value: function () { + this.props.onMount && this.props.onMount(this) + }, + }, + { + key: 'load', + value: function (Pt) { + var Ct = this, + wt = this.props, + It = wt.playing, + Ot = wt.muted, + Wt = wt.controls, + zt = wt.onReady, + Ft = wt.config, + Nt = wt.onError + ;(0, rt.getSDK)(kt, St).then(function (Ut) { + Ft.customControls && + Ft.customControls.forEach(function (Mt) { + return Ut.defineControl(Mt) + }), + (window._wq = window._wq || []), + window._wq.push({ + id: Ct.playerID, + options: lt( + { + autoPlay: It, + silentAutoPlay: 'allow', + muted: Ot, + controlsVisibleOnLoad: Wt, + fullscreenButton: Wt, + playbar: Wt, + playbackRateControl: Wt, + qualityControl: Wt, + volumeControl: Wt, + settingsControl: Wt, + smallPlayButton: Wt, + }, + Ft.options, + ), + onReady: function (Ht) { + ;(Ct.player = Ht), + Ct.unbind(), + Ct.player.bind('play', Ct.onPlay), + Ct.player.bind('pause', Ct.onPause), + Ct.player.bind('seek', Ct.onSeek), + Ct.player.bind('end', Ct.onEnded), + Ct.player.bind('playbackratechange', Ct.onPlaybackRateChange), + zt() + }, + }) + }, Nt) + }, + }, + { + key: 'unbind', + value: function () { + this.player.unbind('play', this.onPlay), + this.player.unbind('pause', this.onPause), + this.player.unbind('seek', this.onSeek), + this.player.unbind('end', this.onEnded), + this.player.unbind('playbackratechange', this.onPlaybackRateChange) + }, + }, + { + key: 'play', + value: function () { + this.callPlayer('play') + }, + }, + { + key: 'pause', + value: function () { + this.callPlayer('pause') + }, + }, + { + key: 'stop', + value: function () { + this.unbind(), this.callPlayer('remove') + }, + }, + { + key: 'seekTo', + value: function (Pt) { + var Ct = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0 + this.callPlayer('time', Pt), Ct || this.pause() + }, + }, + { + key: 'setVolume', + value: function (Pt) { + this.callPlayer('volume', Pt) + }, + }, + { + key: 'setPlaybackRate', + value: function (Pt) { + this.callPlayer('playbackRate', Pt) + }, + }, + { + key: 'getDuration', + value: function () { + return this.callPlayer('duration') + }, + }, + { + key: 'getCurrentTime', + value: function () { + return this.callPlayer('time') + }, + }, + { + key: 'getSecondsLoaded', + value: function () { + return null + }, + }, + { + key: 'render', + value: function () { + var Pt = this.props.url, + Ct = Pt && Pt.match(it.MATCH_URL_WISTIA)[1], + wt = 'wistia_embed wistia_async_'.concat(Ct), + It = { width: '100%', height: '100%' } + return nt.default.createElement('div', { id: this.playerID, key: Ct, className: wt, style: It }) + }, + }, + ]), + Dt + ) + })(nt.Component) + ;(tt.default = At), + xt(At, 'displayName', 'Wistia'), + xt(At, 'canPlay', it.canPlay.wistia), + xt(At, 'loopOnEnded', !0) + })(Wistia)), + Wistia + ) } - - .entity { - color: ${colors.SECONDARY_BLUE}; + var Twitch = {}, + hasRequiredTwitch + function requireTwitch() { + return ( + hasRequiredTwitch || + ((hasRequiredTwitch = 1), + (function (tt) { + function et(Et) { + '@babel/helpers - typeof' + return ( + typeof Symbol == 'function' && typeof Symbol.iterator == 'symbol' + ? (et = function (Dt) { + return typeof Dt + }) + : (et = function (Dt) { + return Dt && typeof Symbol == 'function' && Dt.constructor === Symbol && Dt !== Symbol.prototype + ? 'symbol' + : typeof Dt + }), + et(Et) + ) + } + Object.defineProperty(tt, '__esModule', { value: !0 }), (tt.default = void 0) + var nt = at(reactExports), + rt = utils, + it = patterns + function ot() { + if (typeof WeakMap != 'function') return null + var Et = new WeakMap() + return ( + (ot = function () { + return Et + }), + Et + ) + } + function at(Et) { + if (Et && Et.__esModule) return Et + if (Et === null || (et(Et) !== 'object' && typeof Et != 'function')) return { default: Et } + var $t = ot() + if ($t && $t.has(Et)) return $t.get(Et) + var Dt = {}, + jt = Object.defineProperty && Object.getOwnPropertyDescriptor + for (var Pt in Et) + if (Object.prototype.hasOwnProperty.call(Et, Pt)) { + var Ct = jt ? Object.getOwnPropertyDescriptor(Et, Pt) : null + Ct && (Ct.get || Ct.set) ? Object.defineProperty(Dt, Pt, Ct) : (Dt[Pt] = Et[Pt]) + } + return (Dt.default = Et), $t && $t.set(Et, Dt), Dt + } + function st(Et, $t) { + var Dt = Object.keys(Et) + if (Object.getOwnPropertySymbols) { + var jt = Object.getOwnPropertySymbols(Et) + $t && + (jt = jt.filter(function (Pt) { + return Object.getOwnPropertyDescriptor(Et, Pt).enumerable + })), + Dt.push.apply(Dt, jt) + } + return Dt + } + function lt(Et) { + for (var $t = 1; $t < arguments.length; $t++) { + var Dt = arguments[$t] != null ? arguments[$t] : {} + $t % 2 + ? st(Object(Dt), !0).forEach(function (jt) { + xt(Et, jt, Dt[jt]) + }) + : Object.getOwnPropertyDescriptors + ? Object.defineProperties(Et, Object.getOwnPropertyDescriptors(Dt)) + : st(Object(Dt)).forEach(function (jt) { + Object.defineProperty(Et, jt, Object.getOwnPropertyDescriptor(Dt, jt)) + }) + } + return Et + } + function ct(Et, $t) { + if (!(Et instanceof $t)) throw new TypeError('Cannot call a class as a function') + } + function ut(Et, $t) { + for (var Dt = 0; Dt < $t.length; Dt++) { + var jt = $t[Dt] + ;(jt.enumerable = jt.enumerable || !1), + (jt.configurable = !0), + 'value' in jt && (jt.writable = !0), + Object.defineProperty(Et, jt.key, jt) + } + } + function ht(Et, $t, Dt) { + return $t && ut(Et.prototype, $t), Dt && ut(Et, Dt), Et + } + function dt(Et, $t) { + if (typeof $t != 'function' && $t !== null) + throw new TypeError('Super expression must either be null or a function') + ;(Et.prototype = Object.create($t && $t.prototype, { + constructor: { value: Et, writable: !0, configurable: !0 }, + })), + $t && pt(Et, $t) + } + function pt(Et, $t) { + return ( + (pt = + Object.setPrototypeOf || + function (jt, Pt) { + return (jt.__proto__ = Pt), jt + }), + pt(Et, $t) + ) + } + function mt(Et) { + var $t = bt() + return function () { + var jt = vt(Et), + Pt + if ($t) { + var Ct = vt(this).constructor + Pt = Reflect.construct(jt, arguments, Ct) + } else Pt = jt.apply(this, arguments) + return gt(this, Pt) + } + } + function gt(Et, $t) { + return $t && (et($t) === 'object' || typeof $t == 'function') ? $t : yt(Et) + } + function yt(Et) { + if (Et === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called") + return Et + } + function bt() { + 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 + } + } + function vt(Et) { + return ( + (vt = Object.setPrototypeOf + ? Object.getPrototypeOf + : function (Dt) { + return Dt.__proto__ || Object.getPrototypeOf(Dt) + }), + vt(Et) + ) + } + function xt(Et, $t, Dt) { + return ( + $t in Et + ? Object.defineProperty(Et, $t, { value: Dt, enumerable: !0, configurable: !0, writable: !0 }) + : (Et[$t] = Dt), + Et + ) + } + var kt = 'https://player.twitch.tv/js/embed/v1.js', + St = 'Twitch', + Tt = 'twitch-player-', + At = (function (Et) { + dt(Dt, Et) + var $t = mt(Dt) + function Dt() { + var jt + ct(this, Dt) + for (var Pt = arguments.length, Ct = new Array(Pt), wt = 0; wt < Pt; wt++) Ct[wt] = arguments[wt] + return ( + (jt = $t.call.apply($t, [this].concat(Ct))), + xt(yt(jt), 'callPlayer', rt.callPlayer), + xt(yt(jt), 'playerID', jt.props.config.playerId || ''.concat(Tt).concat((0, rt.randomString)())), + xt(yt(jt), 'mute', function () { + jt.callPlayer('setMuted', !0) + }), + xt(yt(jt), 'unmute', function () { + jt.callPlayer('setMuted', !1) + }), + jt + ) + } + return ( + ht(Dt, [ + { + key: 'componentDidMount', + value: function () { + this.props.onMount && this.props.onMount(this) + }, + }, + { + key: 'load', + value: function (Pt, Ct) { + var wt = this, + It = this.props, + Ot = It.playsinline, + Wt = It.onError, + zt = It.config, + Ft = It.controls, + Nt = it.MATCH_URL_TWITCH_CHANNEL.test(Pt), + Ut = Nt ? Pt.match(it.MATCH_URL_TWITCH_CHANNEL)[1] : Pt.match(it.MATCH_URL_TWITCH_VIDEO)[1] + if (Ct) { + Nt ? this.player.setChannel(Ut) : this.player.setVideo('v' + Ut) + return + } + ;(0, rt.getSDK)(kt, St).then(function (Mt) { + wt.player = new Mt.Player( + wt.playerID, + lt( + { + video: Nt ? '' : Ut, + channel: Nt ? Ut : '', + height: '100%', + width: '100%', + playsinline: Ot, + autoplay: wt.props.playing, + muted: wt.props.muted, + controls: Nt ? !0 : Ft, + time: (0, rt.parseStartTime)(Pt), + }, + zt.options, + ), + ) + var Ht = Mt.Player, + en = Ht.READY, + sn = Ht.PLAYING, + Kt = Ht.PAUSE, + rn = Ht.ENDED, + nn = Ht.ONLINE, + hn = Ht.OFFLINE, + vn = Ht.SEEK + wt.player.addEventListener(en, wt.props.onReady), + wt.player.addEventListener(sn, wt.props.onPlay), + wt.player.addEventListener(Kt, wt.props.onPause), + wt.player.addEventListener(rn, wt.props.onEnded), + wt.player.addEventListener(vn, wt.props.onSeek), + wt.player.addEventListener(nn, wt.props.onLoaded), + wt.player.addEventListener(hn, wt.props.onLoaded) + }, Wt) + }, + }, + { + key: 'play', + value: function () { + this.callPlayer('play') + }, + }, + { + key: 'pause', + value: function () { + this.callPlayer('pause') + }, + }, + { + key: 'stop', + value: function () { + this.callPlayer('pause') + }, + }, + { + key: 'seekTo', + value: function (Pt) { + var Ct = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0 + this.callPlayer('seek', Pt), Ct || this.pause() + }, + }, + { + key: 'setVolume', + value: function (Pt) { + this.callPlayer('setVolume', Pt) + }, + }, + { + key: 'getDuration', + value: function () { + return this.callPlayer('getDuration') + }, + }, + { + key: 'getCurrentTime', + value: function () { + return this.callPlayer('getCurrentTime') + }, + }, + { + key: 'getSecondsLoaded', + value: function () { + return null + }, + }, + { + key: 'render', + value: function () { + var Pt = { width: '100%', height: '100%' } + return nt.default.createElement('div', { style: Pt, id: this.playerID }) + }, + }, + ]), + Dt + ) + })(nt.Component) + ;(tt.default = At), + xt(At, 'displayName', 'Twitch'), + xt(At, 'canPlay', it.canPlay.twitch), + xt(At, 'loopOnEnded', !0) + })(Twitch)), + Twitch + ) } -`,BrowseGalleryIcon=tt=>jsxRuntimeExports.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsxs("g",{id:"browse_gallery",children:[jsxRuntimeExports.jsx("mask",{id:"mask0_1360_27257",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"24",height:"24",children:jsxRuntimeExports.jsx("rect",{id:"Bounding box",width:"1em",height:"1em",fill:"currentColor"})}),jsxRuntimeExports.jsx("g",{mask:"url(#mask0_1360_27257)",children:jsxRuntimeExports.jsx("path",{id:"browse_gallery_2",d:"M11.8 15.8442L12.8442 14.8L9.74998 11.7026V7.25003H8.25003V12.2942L11.8 15.8442ZM18 19.9615V18.3C19.2333 17.7167 20.2083 16.8583 20.925 15.725C21.6417 14.5917 22 13.35 22 12C22 10.65 21.6417 9.40834 20.925 8.27501C20.2083 7.14167 19.2333 6.28334 18 5.70001V4.03851C19.6628 4.67184 20.9952 5.71318 21.9971 7.16253C22.999 8.61188 23.5 10.2244 23.5 12C23.5 13.7756 22.999 15.3881 21.9971 16.8375C20.9952 18.2868 19.6628 19.3282 18 19.9615ZM9.00055 20.5C7.8207 20.5 6.71539 20.2769 5.68463 19.8307C4.65386 19.3846 3.75514 18.7782 2.98848 18.0115C2.22181 17.2449 1.61541 16.3463 1.16927 15.3159C0.723092 14.2855 0.5 13.1804 0.5 12.0006C0.5 10.8207 0.723083 9.7154 1.16925 8.68463C1.6154 7.65386 2.2218 6.75515 2.98845 5.98848C3.75512 5.22183 4.65365 4.61543 5.68405 4.16928C6.71445 3.72311 7.81957 3.50003 8.99942 3.50003C10.1793 3.50003 11.2846 3.72311 12.3154 4.16928C13.3461 4.61543 14.2448 5.22183 15.0115 5.98848C15.7782 6.75515 16.3846 7.65368 16.8307 8.68408C17.2769 9.71448 17.5 10.8196 17.5 11.9995C17.5 13.1793 17.2769 14.2846 16.8307 15.3154C16.3846 16.3461 15.7782 17.2449 15.0115 18.0115C14.2448 18.7782 13.3463 19.3846 12.3159 19.8307C11.2855 20.2769 10.1804 20.5 9.00055 20.5ZM9 19C10.95 19 12.6042 18.3208 13.9625 16.9625C15.3208 15.6042 16 13.95 16 12C16 10.05 15.3208 8.39584 13.9625 7.03751C12.6042 5.67917 10.95 5.00001 9 5.00001C7.05 5.00001 5.39583 5.67917 4.0375 7.03751C2.67917 8.39584 2 10.05 2 12C2 13.95 2.67917 15.6042 4.0375 16.9625C5.39583 18.3208 7.05 19 9 19Z",fill:"currentColor"})})]})}),ScrollView=styled$4(Flex)` - overflow-y: auto; - overflow-x: hidden; - background: ${colors.body}; -`,useIsMatchBreakpoint=(tt,et="down")=>{const nt=useTheme(),[rt,it]=reactExports.useState(!1),ot=nt.breakpoints[et](tt).split("@media")[1].trim();return reactExports.useEffect(()=>{const at=()=>{const{matches:st}=window.matchMedia(ot);it(st)};return at(),window.addEventListener("resize",at),()=>window.removeEventListener("resize",at)},[ot]),rt},BoostIcon=tt=>jsxRuntimeExports.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 9 9",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{id:"Icon","fill-rule":"evenodd","clip-rule":"evenodd",d:"M7.97172 5.26825L8.23268 0.525927C8.24606 0.301673 8.05202 0.110397 7.81782 0.116993L3.00677 0.374226C2.66551 0.394014 2.51161 0.796353 2.7525 1.0338L7.30259 5.51889C7.54348 5.75633 7.95165 5.60463 7.97172 5.26825ZM5.56945 5.5915L2.67881 2.74215L1.79555 3.61278L4.6862 6.46213L5.56945 5.5915ZM1.14615 6.44238L0.0353953 5.34749L0.918648 4.47686L3.80929 7.32621L2.92604 8.19685L1.81528 7.10196L0.918648 7.98578C0.731292 8.17046 0.436874 8.17046 0.249518 7.98578C0.0621611 7.8011 0.0621611 7.51089 0.249517 7.32621L1.14615 6.44238Z",fill:"currentColor"})}),BoostAmt=({amt:tt})=>jsxRuntimeExports.jsxs("div",{style:{alignSelf:"center"},children:[jsxRuntimeExports.jsx(BoostIcon,{}),jsxRuntimeExports.jsx(StyledText,{color:"white",children:tt})]}),StyledText=styled$4(Text$3)` - padding-left: 10px; -`,TypePerson=({title:tt,imageUrl:et,name:nt})=>jsxRuntimeExports.jsxs(Flex,{children:[jsxRuntimeExports.jsx(PictureWrapper$1,{children:jsxRuntimeExports.jsx(Avatar$1,{rounded:!0,size:64,src:et||"",type:"person"})}),(tt||nt)&&jsxRuntimeExports.jsx(Name$1,{children:tt||nt})]}),PictureWrapper$1=styled$4(Flex)` - img { - width: 64px; - height: 64px - border-radius: 50%; - object-fit: cover; + var DailyMotion = {}, + hasRequiredDailyMotion + function requireDailyMotion() { + return ( + hasRequiredDailyMotion || + ((hasRequiredDailyMotion = 1), + (function (tt) { + function et(wt) { + '@babel/helpers - typeof' + return ( + typeof Symbol == 'function' && typeof Symbol.iterator == 'symbol' + ? (et = function (Ot) { + return typeof Ot + }) + : (et = function (Ot) { + return Ot && typeof Symbol == 'function' && Ot.constructor === Symbol && Ot !== Symbol.prototype + ? 'symbol' + : typeof Ot + }), + et(wt) + ) + } + Object.defineProperty(tt, '__esModule', { value: !0 }), (tt.default = void 0) + var nt = at(reactExports), + rt = utils, + it = patterns + function ot() { + if (typeof WeakMap != 'function') return null + var wt = new WeakMap() + return ( + (ot = function () { + return wt + }), + wt + ) + } + function at(wt) { + if (wt && wt.__esModule) return wt + if (wt === null || (et(wt) !== 'object' && typeof wt != 'function')) return { default: wt } + var It = ot() + if (It && It.has(wt)) return It.get(wt) + var Ot = {}, + Wt = Object.defineProperty && Object.getOwnPropertyDescriptor + for (var zt in wt) + if (Object.prototype.hasOwnProperty.call(wt, zt)) { + var Ft = Wt ? Object.getOwnPropertyDescriptor(wt, zt) : null + Ft && (Ft.get || Ft.set) ? Object.defineProperty(Ot, zt, Ft) : (Ot[zt] = wt[zt]) + } + return (Ot.default = wt), It && It.set(wt, Ot), Ot + } + function st(wt, It) { + var Ot = Object.keys(wt) + if (Object.getOwnPropertySymbols) { + var Wt = Object.getOwnPropertySymbols(wt) + It && + (Wt = Wt.filter(function (zt) { + return Object.getOwnPropertyDescriptor(wt, zt).enumerable + })), + Ot.push.apply(Ot, Wt) + } + return Ot + } + function lt(wt) { + for (var It = 1; It < arguments.length; It++) { + var Ot = arguments[It] != null ? arguments[It] : {} + It % 2 + ? st(Object(Ot), !0).forEach(function (Wt) { + $t(wt, Wt, Ot[Wt]) + }) + : Object.getOwnPropertyDescriptors + ? Object.defineProperties(wt, Object.getOwnPropertyDescriptors(Ot)) + : st(Object(Ot)).forEach(function (Wt) { + Object.defineProperty(wt, Wt, Object.getOwnPropertyDescriptor(Ot, Wt)) + }) + } + return wt + } + function ct(wt, It) { + return mt(wt) || pt(wt, It) || ht(wt, It) || ut() + } + function ut() { + throw new TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`) + } + function ht(wt, It) { + if (wt) { + if (typeof wt == 'string') return dt(wt, It) + var Ot = Object.prototype.toString.call(wt).slice(8, -1) + if ((Ot === 'Object' && wt.constructor && (Ot = wt.constructor.name), Ot === 'Map' || Ot === 'Set')) + return Array.from(wt) + if (Ot === 'Arguments' || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Ot)) return dt(wt, It) + } + } + function dt(wt, It) { + ;(It == null || It > wt.length) && (It = wt.length) + for (var Ot = 0, Wt = new Array(It); Ot < It; Ot++) Wt[Ot] = wt[Ot] + return Wt + } + function pt(wt, It) { + if (!(typeof Symbol > 'u' || !(Symbol.iterator in Object(wt)))) { + var Ot = [], + Wt = !0, + zt = !1, + Ft = void 0 + try { + for ( + var Nt = wt[Symbol.iterator](), Ut; + !(Wt = (Ut = Nt.next()).done) && (Ot.push(Ut.value), !(It && Ot.length === It)); + Wt = !0 + ); + } catch (Mt) { + ;(zt = !0), (Ft = Mt) + } finally { + try { + !Wt && Nt.return != null && Nt.return() + } finally { + if (zt) throw Ft + } + } + return Ot + } + } + function mt(wt) { + if (Array.isArray(wt)) return wt + } + function gt(wt, It) { + if (!(wt instanceof It)) throw new TypeError('Cannot call a class as a function') + } + function yt(wt, It) { + for (var Ot = 0; Ot < It.length; Ot++) { + var Wt = It[Ot] + ;(Wt.enumerable = Wt.enumerable || !1), + (Wt.configurable = !0), + 'value' in Wt && (Wt.writable = !0), + Object.defineProperty(wt, Wt.key, Wt) + } + } + function bt(wt, It, Ot) { + return It && yt(wt.prototype, It), Ot && yt(wt, Ot), wt + } + function vt(wt, It) { + if (typeof It != 'function' && It !== null) + throw new TypeError('Super expression must either be null or a function') + ;(wt.prototype = Object.create(It && It.prototype, { + constructor: { value: wt, writable: !0, configurable: !0 }, + })), + It && xt(wt, It) + } + function xt(wt, It) { + return ( + (xt = + Object.setPrototypeOf || + function (Wt, zt) { + return (Wt.__proto__ = zt), Wt + }), + xt(wt, It) + ) + } + function kt(wt) { + var It = At() + return function () { + var Wt = Et(wt), + zt + if (It) { + var Ft = Et(this).constructor + zt = Reflect.construct(Wt, arguments, Ft) + } else zt = Wt.apply(this, arguments) + return St(this, zt) + } + } + function St(wt, It) { + return It && (et(It) === 'object' || typeof It == 'function') ? It : Tt(wt) + } + function Tt(wt) { + if (wt === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called") + return wt + } + function At() { + 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 + } + } + function Et(wt) { + return ( + (Et = Object.setPrototypeOf + ? Object.getPrototypeOf + : function (Ot) { + return Ot.__proto__ || Object.getPrototypeOf(Ot) + }), + Et(wt) + ) + } + function $t(wt, It, Ot) { + return ( + It in wt + ? Object.defineProperty(wt, It, { value: Ot, enumerable: !0, configurable: !0, writable: !0 }) + : (wt[It] = Ot), + wt + ) + } + var Dt = 'https://api.dmcdn.net/all.js', + jt = 'DM', + Pt = 'dmAsyncInit', + Ct = (function (wt) { + vt(Ot, wt) + var It = kt(Ot) + function Ot() { + var Wt + gt(this, Ot) + for (var zt = arguments.length, Ft = new Array(zt), Nt = 0; Nt < zt; Nt++) Ft[Nt] = arguments[Nt] + return ( + (Wt = It.call.apply(It, [this].concat(Ft))), + $t(Tt(Wt), 'callPlayer', rt.callPlayer), + $t(Tt(Wt), 'onDurationChange', function () { + var Ut = Wt.getDuration() + Wt.props.onDuration(Ut) + }), + $t(Tt(Wt), 'mute', function () { + Wt.callPlayer('setMuted', !0) + }), + $t(Tt(Wt), 'unmute', function () { + Wt.callPlayer('setMuted', !1) + }), + $t(Tt(Wt), 'ref', function (Ut) { + Wt.container = Ut + }), + Wt + ) + } + return ( + bt(Ot, [ + { + key: 'componentDidMount', + value: function () { + this.props.onMount && this.props.onMount(this) + }, + }, + { + key: 'load', + value: function (zt) { + var Ft = this, + Nt = this.props, + Ut = Nt.controls, + Mt = Nt.config, + Ht = Nt.onError, + en = Nt.playing, + sn = zt.match(it.MATCH_URL_DAILYMOTION), + Kt = ct(sn, 2), + rn = Kt[1] + if (this.player) { + this.player.load(rn, { start: (0, rt.parseStartTime)(zt), autoplay: en }) + return + } + ;(0, rt.getSDK)(Dt, jt, Pt, function (nn) { + return nn.player + }).then(function (nn) { + if (Ft.container) { + var hn = nn.player + Ft.player = new hn(Ft.container, { + width: '100%', + height: '100%', + video: rn, + params: lt( + { + controls: Ut, + autoplay: Ft.props.playing, + mute: Ft.props.muted, + start: (0, rt.parseStartTime)(zt), + origin: window.location.origin, + }, + Mt.params, + ), + events: { + apiready: Ft.props.onReady, + seeked: function () { + return Ft.props.onSeek(Ft.player.currentTime) + }, + video_end: Ft.props.onEnded, + durationchange: Ft.onDurationChange, + pause: Ft.props.onPause, + playing: Ft.props.onPlay, + waiting: Ft.props.onBuffer, + error: function (an) { + return Ht(an) + }, + }, + }) + } + }, Ht) + }, + }, + { + key: 'play', + value: function () { + this.callPlayer('play') + }, + }, + { + key: 'pause', + value: function () { + this.callPlayer('pause') + }, + }, + { key: 'stop', value: function () {} }, + { + key: 'seekTo', + value: function (zt) { + var Ft = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0 + this.callPlayer('seek', zt), Ft || this.pause() + }, + }, + { + key: 'setVolume', + value: function (zt) { + this.callPlayer('setVolume', zt) + }, + }, + { + key: 'getDuration', + value: function () { + return this.player.duration || null + }, + }, + { + key: 'getCurrentTime', + value: function () { + return this.player.currentTime + }, + }, + { + key: 'getSecondsLoaded', + value: function () { + return this.player.bufferedTime + }, + }, + { + key: 'render', + value: function () { + var zt = this.props.display, + Ft = { width: '100%', height: '100%', display: zt } + return nt.default.createElement( + 'div', + { style: Ft }, + nt.default.createElement('div', { ref: this.ref }), + ) + }, + }, + ]), + Ot + ) + })(nt.Component) + ;(tt.default = Ct), + $t(Ct, 'displayName', 'DailyMotion'), + $t(Ct, 'canPlay', it.canPlay.dailymotion), + $t(Ct, 'loopOnEnded', !0) + })(DailyMotion)), + DailyMotion + ) } - margin-right: 16px; -`,Name$1=styled$4(Flex)` - color: ${colors.white}; - font-family: Barlow; - font-size: 13px; - font-style: normal; - font-weight: 600; - line-height: 17px; -`,TypeTweet=({text:tt,imageUrl:et,date:nt,twitterHandle:rt,name:it,verified:ot})=>jsxRuntimeExports.jsxs(Flex,{direction:"column",children:[jsxRuntimeExports.jsxs(Flex,{align:"center",direction:"row",pr:16,children:[jsxRuntimeExports.jsx(PictureWrapper,{children:jsxRuntimeExports.jsx(Avatar$1,{rounded:!0,size:27,src:et||"",type:"person"})}),jsxRuntimeExports.jsxs(Flex,{children:[jsxRuntimeExports.jsxs(Name,{align:"center",direction:"row",children:[it,ot&&jsxRuntimeExports.jsx("div",{className:"verification",children:jsxRuntimeExports.jsx("img",{alt:"verified",src:"verified_twitter.svg"})})]}),rt&&jsxRuntimeExports.jsxs(TwitterHandle$1,{children:["@",rt]})]})]}),jsxRuntimeExports.jsxs(Flex,{grow:1,shrink:1,children:[jsxRuntimeExports.jsx(TwitText,{"data-testid":"episode-description",children:tt}),jsxRuntimeExports.jsx(Flex,{direction:"row",justify:"flex-start",children:!!nt&&jsxRuntimeExports.jsx(Date$2,{children:hooks.unix(nt).format("ll")})})]})]}),PictureWrapper=styled$4(Flex)` - img { - width: 64px; - height: 64px - border-radius: 50%; - object-fit: cover; + var Mixcloud = {}, + hasRequiredMixcloud + function requireMixcloud() { + return ( + hasRequiredMixcloud || + ((hasRequiredMixcloud = 1), + (function (tt) { + function et(At) { + '@babel/helpers - typeof' + return ( + typeof Symbol == 'function' && typeof Symbol.iterator == 'symbol' + ? (et = function ($t) { + return typeof $t + }) + : (et = function ($t) { + return $t && typeof Symbol == 'function' && $t.constructor === Symbol && $t !== Symbol.prototype + ? 'symbol' + : typeof $t + }), + et(At) + ) + } + Object.defineProperty(tt, '__esModule', { value: !0 }), (tt.default = void 0) + var nt = at(reactExports), + rt = utils, + it = patterns + function ot() { + if (typeof WeakMap != 'function') return null + var At = new WeakMap() + return ( + (ot = function () { + return At + }), + At + ) + } + function at(At) { + if (At && At.__esModule) return At + if (At === null || (et(At) !== 'object' && typeof At != 'function')) return { default: At } + var Et = ot() + if (Et && Et.has(At)) return Et.get(At) + var $t = {}, + Dt = Object.defineProperty && Object.getOwnPropertyDescriptor + for (var jt in At) + if (Object.prototype.hasOwnProperty.call(At, jt)) { + var Pt = Dt ? Object.getOwnPropertyDescriptor(At, jt) : null + Pt && (Pt.get || Pt.set) ? Object.defineProperty($t, jt, Pt) : ($t[jt] = At[jt]) + } + return ($t.default = At), Et && Et.set(At, $t), $t + } + function st(At, Et) { + var $t = Object.keys(At) + if (Object.getOwnPropertySymbols) { + var Dt = Object.getOwnPropertySymbols(At) + Et && + (Dt = Dt.filter(function (jt) { + return Object.getOwnPropertyDescriptor(At, jt).enumerable + })), + $t.push.apply($t, Dt) + } + return $t + } + function lt(At) { + for (var Et = 1; Et < arguments.length; Et++) { + var $t = arguments[Et] != null ? arguments[Et] : {} + Et % 2 + ? st(Object($t), !0).forEach(function (Dt) { + xt(At, Dt, $t[Dt]) + }) + : Object.getOwnPropertyDescriptors + ? Object.defineProperties(At, Object.getOwnPropertyDescriptors($t)) + : st(Object($t)).forEach(function (Dt) { + Object.defineProperty(At, Dt, Object.getOwnPropertyDescriptor($t, Dt)) + }) + } + return At + } + function ct(At, Et) { + if (!(At instanceof Et)) throw new TypeError('Cannot call a class as a function') + } + function ut(At, Et) { + for (var $t = 0; $t < Et.length; $t++) { + var Dt = Et[$t] + ;(Dt.enumerable = Dt.enumerable || !1), + (Dt.configurable = !0), + 'value' in Dt && (Dt.writable = !0), + Object.defineProperty(At, Dt.key, Dt) + } + } + function ht(At, Et, $t) { + return Et && ut(At.prototype, Et), $t && ut(At, $t), At + } + function dt(At, Et) { + if (typeof Et != 'function' && Et !== null) + throw new TypeError('Super expression must either be null or a function') + ;(At.prototype = Object.create(Et && Et.prototype, { + constructor: { value: At, writable: !0, configurable: !0 }, + })), + Et && pt(At, Et) + } + function pt(At, Et) { + return ( + (pt = + Object.setPrototypeOf || + function (Dt, jt) { + return (Dt.__proto__ = jt), Dt + }), + pt(At, Et) + ) + } + function mt(At) { + var Et = bt() + return function () { + var Dt = vt(At), + jt + if (Et) { + var Pt = vt(this).constructor + jt = Reflect.construct(Dt, arguments, Pt) + } else jt = Dt.apply(this, arguments) + return gt(this, jt) + } + } + function gt(At, Et) { + return Et && (et(Et) === 'object' || typeof Et == 'function') ? Et : yt(At) + } + function yt(At) { + if (At === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called") + return At + } + function bt() { + 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 + } + } + function vt(At) { + return ( + (vt = Object.setPrototypeOf + ? Object.getPrototypeOf + : function ($t) { + return $t.__proto__ || Object.getPrototypeOf($t) + }), + vt(At) + ) + } + function xt(At, Et, $t) { + return ( + Et in At + ? Object.defineProperty(At, Et, { value: $t, enumerable: !0, configurable: !0, writable: !0 }) + : (At[Et] = $t), + At + ) + } + var kt = 'https://widget.mixcloud.com/media/js/widgetApi.js', + St = 'Mixcloud', + Tt = (function (At) { + dt($t, At) + var Et = mt($t) + function $t() { + var Dt + ct(this, $t) + for (var jt = arguments.length, Pt = new Array(jt), Ct = 0; Ct < jt; Ct++) Pt[Ct] = arguments[Ct] + return ( + (Dt = Et.call.apply(Et, [this].concat(Pt))), + xt(yt(Dt), 'callPlayer', rt.callPlayer), + xt(yt(Dt), 'duration', null), + xt(yt(Dt), 'currentTime', null), + xt(yt(Dt), 'secondsLoaded', null), + xt(yt(Dt), 'mute', function () {}), + xt(yt(Dt), 'unmute', function () {}), + xt(yt(Dt), 'ref', function (wt) { + Dt.iframe = wt + }), + Dt + ) + } + return ( + ht($t, [ + { + key: 'componentDidMount', + value: function () { + this.props.onMount && this.props.onMount(this) + }, + }, + { + key: 'load', + value: function (jt) { + var Pt = this + ;(0, rt.getSDK)(kt, St).then(function (Ct) { + ;(Pt.player = Ct.PlayerWidget(Pt.iframe)), + Pt.player.ready.then(function () { + Pt.player.events.play.on(Pt.props.onPlay), + Pt.player.events.pause.on(Pt.props.onPause), + Pt.player.events.ended.on(Pt.props.onEnded), + Pt.player.events.error.on(Pt.props.error), + Pt.player.events.progress.on(function (wt, It) { + ;(Pt.currentTime = wt), (Pt.duration = It) + }), + Pt.props.onReady() + }) + }, this.props.onError) + }, + }, + { + key: 'play', + value: function () { + this.callPlayer('play') + }, + }, + { + key: 'pause', + value: function () { + this.callPlayer('pause') + }, + }, + { key: 'stop', value: function () {} }, + { + key: 'seekTo', + value: function (jt) { + var Pt = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0 + this.callPlayer('seek', jt), Pt || this.pause() + }, + }, + { key: 'setVolume', value: function (jt) {} }, + { + key: 'getDuration', + value: function () { + return this.duration + }, + }, + { + key: 'getCurrentTime', + value: function () { + return this.currentTime + }, + }, + { + key: 'getSecondsLoaded', + value: function () { + return null + }, + }, + { + key: 'render', + value: function () { + var jt = this.props, + Pt = jt.url, + Ct = jt.config, + wt = Pt.match(it.MATCH_URL_MIXCLOUD)[1], + It = { width: '100%', height: '100%' }, + Ot = (0, rt.queryString)(lt(lt({}, Ct.options), {}, { feed: '/'.concat(wt, '/') })) + return nt.default.createElement('iframe', { + key: wt, + ref: this.ref, + style: It, + src: 'https://www.mixcloud.com/widget/iframe/?'.concat(Ot), + frameBorder: '0', + allow: 'autoplay', + }) + }, + }, + ]), + $t + ) + })(nt.Component) + ;(tt.default = Tt), + xt(Tt, 'displayName', 'Mixcloud'), + xt(Tt, 'canPlay', it.canPlay.mixcloud), + xt(Tt, 'loopOnEnded', !0) + })(Mixcloud)), + Mixcloud + ) } - margin-right: 16px; -`,Name=styled$4(Flex)` - color: ${colors.white}; - font-family: Barlow; - font-size: 11px; - font-style: normal; - font-weight: 600; - line-height: normal; - letter-spacing: -0.22px; - .verification { - margin-left: 4px; + var Vidyard = {}, + hasRequiredVidyard + function requireVidyard() { + return ( + hasRequiredVidyard || + ((hasRequiredVidyard = 1), + (function (tt) { + function et(Et) { + '@babel/helpers - typeof' + return ( + typeof Symbol == 'function' && typeof Symbol.iterator == 'symbol' + ? (et = function (Dt) { + return typeof Dt + }) + : (et = function (Dt) { + return Dt && typeof Symbol == 'function' && Dt.constructor === Symbol && Dt !== Symbol.prototype + ? 'symbol' + : typeof Dt + }), + et(Et) + ) + } + Object.defineProperty(tt, '__esModule', { value: !0 }), (tt.default = void 0) + var nt = at(reactExports), + rt = utils, + it = patterns + function ot() { + if (typeof WeakMap != 'function') return null + var Et = new WeakMap() + return ( + (ot = function () { + return Et + }), + Et + ) + } + function at(Et) { + if (Et && Et.__esModule) return Et + if (Et === null || (et(Et) !== 'object' && typeof Et != 'function')) return { default: Et } + var $t = ot() + if ($t && $t.has(Et)) return $t.get(Et) + var Dt = {}, + jt = Object.defineProperty && Object.getOwnPropertyDescriptor + for (var Pt in Et) + if (Object.prototype.hasOwnProperty.call(Et, Pt)) { + var Ct = jt ? Object.getOwnPropertyDescriptor(Et, Pt) : null + Ct && (Ct.get || Ct.set) ? Object.defineProperty(Dt, Pt, Ct) : (Dt[Pt] = Et[Pt]) + } + return (Dt.default = Et), $t && $t.set(Et, Dt), Dt + } + function st(Et, $t) { + var Dt = Object.keys(Et) + if (Object.getOwnPropertySymbols) { + var jt = Object.getOwnPropertySymbols(Et) + $t && + (jt = jt.filter(function (Pt) { + return Object.getOwnPropertyDescriptor(Et, Pt).enumerable + })), + Dt.push.apply(Dt, jt) + } + return Dt + } + function lt(Et) { + for (var $t = 1; $t < arguments.length; $t++) { + var Dt = arguments[$t] != null ? arguments[$t] : {} + $t % 2 + ? st(Object(Dt), !0).forEach(function (jt) { + xt(Et, jt, Dt[jt]) + }) + : Object.getOwnPropertyDescriptors + ? Object.defineProperties(Et, Object.getOwnPropertyDescriptors(Dt)) + : st(Object(Dt)).forEach(function (jt) { + Object.defineProperty(Et, jt, Object.getOwnPropertyDescriptor(Dt, jt)) + }) + } + return Et + } + function ct(Et, $t) { + if (!(Et instanceof $t)) throw new TypeError('Cannot call a class as a function') + } + function ut(Et, $t) { + for (var Dt = 0; Dt < $t.length; Dt++) { + var jt = $t[Dt] + ;(jt.enumerable = jt.enumerable || !1), + (jt.configurable = !0), + 'value' in jt && (jt.writable = !0), + Object.defineProperty(Et, jt.key, jt) + } + } + function ht(Et, $t, Dt) { + return $t && ut(Et.prototype, $t), Dt && ut(Et, Dt), Et + } + function dt(Et, $t) { + if (typeof $t != 'function' && $t !== null) + throw new TypeError('Super expression must either be null or a function') + ;(Et.prototype = Object.create($t && $t.prototype, { + constructor: { value: Et, writable: !0, configurable: !0 }, + })), + $t && pt(Et, $t) + } + function pt(Et, $t) { + return ( + (pt = + Object.setPrototypeOf || + function (jt, Pt) { + return (jt.__proto__ = Pt), jt + }), + pt(Et, $t) + ) + } + function mt(Et) { + var $t = bt() + return function () { + var jt = vt(Et), + Pt + if ($t) { + var Ct = vt(this).constructor + Pt = Reflect.construct(jt, arguments, Ct) + } else Pt = jt.apply(this, arguments) + return gt(this, Pt) + } + } + function gt(Et, $t) { + return $t && (et($t) === 'object' || typeof $t == 'function') ? $t : yt(Et) + } + function yt(Et) { + if (Et === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called") + return Et + } + function bt() { + 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 + } + } + function vt(Et) { + return ( + (vt = Object.setPrototypeOf + ? Object.getPrototypeOf + : function (Dt) { + return Dt.__proto__ || Object.getPrototypeOf(Dt) + }), + vt(Et) + ) + } + function xt(Et, $t, Dt) { + return ( + $t in Et + ? Object.defineProperty(Et, $t, { value: Dt, enumerable: !0, configurable: !0, writable: !0 }) + : (Et[$t] = Dt), + Et + ) + } + var kt = 'https://play.vidyard.com/embed/v4.js', + St = 'VidyardV4', + Tt = 'onVidyardAPI', + At = (function (Et) { + dt(Dt, Et) + var $t = mt(Dt) + function Dt() { + var jt + ct(this, Dt) + for (var Pt = arguments.length, Ct = new Array(Pt), wt = 0; wt < Pt; wt++) Ct[wt] = arguments[wt] + return ( + (jt = $t.call.apply($t, [this].concat(Ct))), + xt(yt(jt), 'callPlayer', rt.callPlayer), + xt(yt(jt), 'mute', function () { + jt.setVolume(0) + }), + xt(yt(jt), 'unmute', function () { + jt.props.volume !== null && jt.setVolume(jt.props.volume) + }), + xt(yt(jt), 'ref', function (It) { + jt.container = It + }), + jt + ) + } + return ( + ht(Dt, [ + { + key: 'componentDidMount', + value: function () { + this.props.onMount && this.props.onMount(this) + }, + }, + { + key: 'load', + value: function (Pt) { + var Ct = this, + wt = this.props, + It = wt.playing, + Ot = wt.config, + Wt = wt.onError, + zt = wt.onDuration, + Ft = Pt && Pt.match(it.MATCH_URL_VIDYARD)[1] + this.player && this.stop(), + (0, rt.getSDK)(kt, St, Tt).then(function (Nt) { + Ct.container && + (Nt.api.addReadyListener(function (Ut, Mt) { + Ct.player || + ((Ct.player = Mt), + Ct.player.on('ready', Ct.props.onReady), + Ct.player.on('play', Ct.props.onPlay), + Ct.player.on('pause', Ct.props.onPause), + Ct.player.on('seek', Ct.props.onSeek), + Ct.player.on('playerComplete', Ct.props.onEnded)) + }, Ft), + Nt.api.renderPlayer( + lt({ uuid: Ft, container: Ct.container, autoplay: It ? 1 : 0 }, Ot.options), + ), + Nt.api.getPlayerMetadata(Ft).then(function (Ut) { + ;(Ct.duration = Ut.length_in_seconds), zt(Ut.length_in_seconds) + })) + }, Wt) + }, + }, + { + key: 'play', + value: function () { + this.callPlayer('play') + }, + }, + { + key: 'pause', + value: function () { + this.callPlayer('pause') + }, + }, + { + key: 'stop', + value: function () { + window.VidyardV4.api.destroyPlayer(this.player) + }, + }, + { + key: 'seekTo', + value: function (Pt) { + var Ct = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0 + this.callPlayer('seek', Pt), Ct || this.pause() + }, + }, + { + key: 'setVolume', + value: function (Pt) { + this.callPlayer('setVolume', Pt) + }, + }, + { + key: 'setPlaybackRate', + value: function (Pt) { + this.callPlayer('setPlaybackSpeed', Pt) + }, + }, + { + key: 'getDuration', + value: function () { + return this.duration + }, + }, + { + key: 'getCurrentTime', + value: function () { + return this.callPlayer('currentTime') + }, + }, + { + key: 'getSecondsLoaded', + value: function () { + return null + }, + }, + { + key: 'render', + value: function () { + var Pt = this.props.display, + Ct = { width: '100%', height: '100%', display: Pt } + return nt.default.createElement( + 'div', + { style: Ct }, + nt.default.createElement('div', { ref: this.ref }), + ) + }, + }, + ]), + Dt + ) + })(nt.Component) + ;(tt.default = At), xt(At, 'displayName', 'Vidyard'), xt(At, 'canPlay', it.canPlay.vidyard) + })(Vidyard)), + Vidyard + ) } -`,TwitterHandle$1=styled$4(Flex)` - color: ${colors.GRAY7}; - font-family: Barlow; - font-size: 9px; - font-style: normal; - font-weight: 400; - line-height: normal; -`,TwitText=styled$4(Flex)` - color: ${colors.white}; - font-family: Barlow; - font-size: 13px; - font-style: normal; - font-weight: 400; - line-height: 130%; - letter-spacing: -0.39px; - margin: 8px 0; - display: -webkit-box; - -webkit-line-clamp: 2; /* Limit to two lines */ - -webkit-box-orient: vertical; - overflow: hidden; - white-space: normal; -`,EpisodeWrapper$2=styled$4(Flex).attrs({direction:"column"})` - padding: 24px; - cursor: pointer; - border-top: 1px solid #101317; - background: ${colors.BG1}; - - .type-image { - width: 20px; - height: 20px; - border-radius: 50%; - margin-right: 8px; + var Kaltura = {}, + hasRequiredKaltura + function requireKaltura() { + return ( + hasRequiredKaltura || + ((hasRequiredKaltura = 1), + (function (tt) { + function et(St) { + '@babel/helpers - typeof' + return ( + typeof Symbol == 'function' && typeof Symbol.iterator == 'symbol' + ? (et = function (At) { + return typeof At + }) + : (et = function (At) { + return At && typeof Symbol == 'function' && At.constructor === Symbol && At !== Symbol.prototype + ? 'symbol' + : typeof At + }), + et(St) + ) + } + Object.defineProperty(tt, '__esModule', { value: !0 }), (tt.default = void 0) + var nt = at(reactExports), + rt = utils, + it = patterns + function ot() { + if (typeof WeakMap != 'function') return null + var St = new WeakMap() + return ( + (ot = function () { + return St + }), + St + ) + } + function at(St) { + if (St && St.__esModule) return St + if (St === null || (et(St) !== 'object' && typeof St != 'function')) return { default: St } + var Tt = ot() + if (Tt && Tt.has(St)) return Tt.get(St) + var At = {}, + Et = Object.defineProperty && Object.getOwnPropertyDescriptor + for (var $t in St) + if (Object.prototype.hasOwnProperty.call(St, $t)) { + var Dt = Et ? Object.getOwnPropertyDescriptor(St, $t) : null + Dt && (Dt.get || Dt.set) ? Object.defineProperty(At, $t, Dt) : (At[$t] = St[$t]) + } + return (At.default = St), Tt && Tt.set(St, At), At + } + function st(St, Tt) { + if (!(St instanceof Tt)) throw new TypeError('Cannot call a class as a function') + } + function lt(St, Tt) { + for (var At = 0; At < Tt.length; At++) { + var Et = Tt[At] + ;(Et.enumerable = Et.enumerable || !1), + (Et.configurable = !0), + 'value' in Et && (Et.writable = !0), + Object.defineProperty(St, Et.key, Et) + } + } + function ct(St, Tt, At) { + return Tt && lt(St.prototype, Tt), At && lt(St, At), St + } + function ut(St, Tt) { + if (typeof Tt != 'function' && Tt !== null) + throw new TypeError('Super expression must either be null or a function') + ;(St.prototype = Object.create(Tt && Tt.prototype, { + constructor: { value: St, writable: !0, configurable: !0 }, + })), + Tt && ht(St, Tt) + } + function ht(St, Tt) { + return ( + (ht = + Object.setPrototypeOf || + function (Et, $t) { + return (Et.__proto__ = $t), Et + }), + ht(St, Tt) + ) + } + function dt(St) { + var Tt = gt() + return function () { + var Et = yt(St), + $t + if (Tt) { + var Dt = yt(this).constructor + $t = Reflect.construct(Et, arguments, Dt) + } else $t = Et.apply(this, arguments) + return pt(this, $t) + } + } + function pt(St, Tt) { + return Tt && (et(Tt) === 'object' || typeof Tt == 'function') ? Tt : mt(St) + } + function mt(St) { + if (St === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called") + return St + } + function gt() { + 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 + } + } + function yt(St) { + return ( + (yt = Object.setPrototypeOf + ? Object.getPrototypeOf + : function (At) { + return At.__proto__ || Object.getPrototypeOf(At) + }), + yt(St) + ) + } + function bt(St, Tt, At) { + return ( + Tt in St + ? Object.defineProperty(St, Tt, { value: At, enumerable: !0, configurable: !0, writable: !0 }) + : (St[Tt] = At), + St + ) + } + var vt = 'https://cdn.embed.ly/player-0.1.0.min.js', + xt = 'playerjs', + kt = (function (St) { + ut(At, St) + var Tt = dt(At) + function At() { + var Et + st(this, At) + for (var $t = arguments.length, Dt = new Array($t), jt = 0; jt < $t; jt++) Dt[jt] = arguments[jt] + return ( + (Et = Tt.call.apply(Tt, [this].concat(Dt))), + bt(mt(Et), 'callPlayer', rt.callPlayer), + bt(mt(Et), 'duration', null), + bt(mt(Et), 'currentTime', null), + bt(mt(Et), 'secondsLoaded', null), + bt(mt(Et), 'mute', function () { + Et.callPlayer('mute') + }), + bt(mt(Et), 'unmute', function () { + Et.callPlayer('unmute') + }), + bt(mt(Et), 'ref', function (Pt) { + Et.iframe = Pt + }), + Et + ) + } + return ( + ct(At, [ + { + key: 'componentDidMount', + value: function () { + this.props.onMount && this.props.onMount(this) + }, + }, + { + key: 'load', + value: function ($t) { + var Dt = this + ;(0, rt.getSDK)(vt, xt).then(function (jt) { + Dt.iframe && + ((Dt.player = new jt.Player(Dt.iframe)), + Dt.player.on('ready', function () { + setTimeout(function () { + ;(Dt.player.isReady = !0), + Dt.player.setLoop(Dt.props.loop), + Dt.props.muted && Dt.player.mute(), + Dt.addListeners(Dt.player, Dt.props), + Dt.props.onReady() + }, 500) + })) + }, this.props.onError) + }, + }, + { + key: 'addListeners', + value: function ($t, Dt) { + var jt = this + $t.on('play', Dt.onPlay), + $t.on('pause', Dt.onPause), + $t.on('ended', Dt.onEnded), + $t.on('error', Dt.onError), + $t.on('timeupdate', function (Pt) { + var Ct = Pt.duration, + wt = Pt.seconds + ;(jt.duration = Ct), (jt.currentTime = wt) + }) + }, + }, + { + key: 'play', + value: function () { + this.callPlayer('play') + }, + }, + { + key: 'pause', + value: function () { + this.callPlayer('pause') + }, + }, + { key: 'stop', value: function () {} }, + { + key: 'seekTo', + value: function ($t) { + var Dt = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0 + this.callPlayer('setCurrentTime', $t), Dt || this.pause() + }, + }, + { + key: 'setVolume', + value: function ($t) { + this.callPlayer('setVolume', $t) + }, + }, + { + key: 'setLoop', + value: function ($t) { + this.callPlayer('setLoop', $t) + }, + }, + { + key: 'getDuration', + value: function () { + return this.duration + }, + }, + { + key: 'getCurrentTime', + value: function () { + return this.currentTime + }, + }, + { + key: 'getSecondsLoaded', + value: function () { + return this.secondsLoaded + }, + }, + { + key: 'render', + value: function () { + var $t = { width: '100%', height: '100%' } + return nt.default.createElement('iframe', { + ref: this.ref, + src: this.props.url, + frameBorder: '0', + scrolling: 'no', + style: $t, + allow: 'encrypted-media; autoplay; fullscreen;', + referrerPolicy: 'no-referrer-when-downgrade', + }) + }, + }, + ]), + At + ) + })(nt.Component) + ;(tt.default = kt), bt(kt, 'displayName', 'Kaltura'), bt(kt, 'canPlay', it.canPlay.kaltura) + })(Kaltura)), + Kaltura + ) } - - .booster__pill { - margin-right: 0; - margin-top: 8px; + var FilePlayer = {}, + hasRequiredFilePlayer + function requireFilePlayer() { + return ( + hasRequiredFilePlayer || + ((hasRequiredFilePlayer = 1), + (function (tt) { + function et(Wt) { + '@babel/helpers - typeof' + return ( + typeof Symbol == 'function' && typeof Symbol.iterator == 'symbol' + ? (et = function (Ft) { + return typeof Ft + }) + : (et = function (Ft) { + return Ft && typeof Symbol == 'function' && Ft.constructor === Symbol && Ft !== Symbol.prototype + ? 'symbol' + : typeof Ft + }), + et(Wt) + ) + } + Object.defineProperty(tt, '__esModule', { value: !0 }), (tt.default = void 0) + var nt = at(reactExports), + rt = utils, + it = patterns + function ot() { + if (typeof WeakMap != 'function') return null + var Wt = new WeakMap() + return ( + (ot = function () { + return Wt + }), + Wt + ) + } + function at(Wt) { + if (Wt && Wt.__esModule) return Wt + if (Wt === null || (et(Wt) !== 'object' && typeof Wt != 'function')) return { default: Wt } + var zt = ot() + if (zt && zt.has(Wt)) return zt.get(Wt) + var Ft = {}, + Nt = Object.defineProperty && Object.getOwnPropertyDescriptor + for (var Ut in Wt) + if (Object.prototype.hasOwnProperty.call(Wt, Ut)) { + var Mt = Nt ? Object.getOwnPropertyDescriptor(Wt, Ut) : null + Mt && (Mt.get || Mt.set) ? Object.defineProperty(Ft, Ut, Mt) : (Ft[Ut] = Wt[Ut]) + } + return (Ft.default = Wt), zt && zt.set(Wt, Ft), Ft + } + function st() { + return ( + (st = + Object.assign || + function (Wt) { + for (var zt = 1; zt < arguments.length; zt++) { + var Ft = arguments[zt] + for (var Nt in Ft) Object.prototype.hasOwnProperty.call(Ft, Nt) && (Wt[Nt] = Ft[Nt]) + } + return Wt + }), + st.apply(this, arguments) + ) + } + function lt(Wt, zt) { + if (!(Wt instanceof zt)) throw new TypeError('Cannot call a class as a function') + } + function ct(Wt, zt) { + for (var Ft = 0; Ft < zt.length; Ft++) { + var Nt = zt[Ft] + ;(Nt.enumerable = Nt.enumerable || !1), + (Nt.configurable = !0), + 'value' in Nt && (Nt.writable = !0), + Object.defineProperty(Wt, Nt.key, Nt) + } + } + function ut(Wt, zt, Ft) { + return zt && ct(Wt.prototype, zt), Ft && ct(Wt, Ft), Wt + } + function ht(Wt, zt) { + if (typeof zt != 'function' && zt !== null) + throw new TypeError('Super expression must either be null or a function') + ;(Wt.prototype = Object.create(zt && zt.prototype, { + constructor: { value: Wt, writable: !0, configurable: !0 }, + })), + zt && dt(Wt, zt) + } + function dt(Wt, zt) { + return ( + (dt = + Object.setPrototypeOf || + function (Nt, Ut) { + return (Nt.__proto__ = Ut), Nt + }), + dt(Wt, zt) + ) + } + function pt(Wt) { + var zt = yt() + return function () { + var Nt = bt(Wt), + Ut + if (zt) { + var Mt = bt(this).constructor + Ut = Reflect.construct(Nt, arguments, Mt) + } else Ut = Nt.apply(this, arguments) + return mt(this, Ut) + } + } + function mt(Wt, zt) { + return zt && (et(zt) === 'object' || typeof zt == 'function') ? zt : gt(Wt) + } + function gt(Wt) { + if (Wt === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called") + return Wt + } + function yt() { + 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 + } + } + function bt(Wt) { + return ( + (bt = Object.setPrototypeOf + ? Object.getPrototypeOf + : function (Ft) { + return Ft.__proto__ || Object.getPrototypeOf(Ft) + }), + bt(Wt) + ) + } + function vt(Wt, zt, Ft) { + return ( + zt in Wt + ? Object.defineProperty(Wt, zt, { value: Ft, enumerable: !0, configurable: !0, writable: !0 }) + : (Wt[zt] = Ft), + Wt + ) + } + var xt = typeof navigator < 'u', + kt = xt && navigator.platform === 'MacIntel' && navigator.maxTouchPoints > 1, + St = xt && (/iPad|iPhone|iPod/.test(navigator.userAgent) || kt) && !window.MSStream, + Tt = xt && /^((?!chrome|android).)*safari/i.test(navigator.userAgent) && !window.MSStream, + At = 'https://cdn.jsdelivr.net/npm/hls.js@VERSION/dist/hls.min.js', + Et = 'Hls', + $t = 'https://cdnjs.cloudflare.com/ajax/libs/dashjs/VERSION/dash.all.min.js', + Dt = 'dashjs', + jt = 'https://cdn.jsdelivr.net/npm/flv.js@VERSION/dist/flv.min.js', + Pt = 'flvjs', + Ct = /www\.dropbox\.com\/.+/, + wt = /https:\/\/watch\.cloudflarestream\.com\/([a-z0-9]+)/, + It = 'https://videodelivery.net/{id}/manifest/video.m3u8', + Ot = (function (Wt) { + ht(Ft, Wt) + var zt = pt(Ft) + function Ft() { + var Nt + lt(this, Ft) + for (var Ut = arguments.length, Mt = new Array(Ut), Ht = 0; Ht < Ut; Ht++) Mt[Ht] = arguments[Ht] + return ( + (Nt = zt.call.apply(zt, [this].concat(Mt))), + vt(gt(Nt), 'onReady', function () { + var en + return (en = Nt.props).onReady.apply(en, arguments) + }), + vt(gt(Nt), 'onPlay', function () { + var en + return (en = Nt.props).onPlay.apply(en, arguments) + }), + vt(gt(Nt), 'onBuffer', function () { + var en + return (en = Nt.props).onBuffer.apply(en, arguments) + }), + vt(gt(Nt), 'onBufferEnd', function () { + var en + return (en = Nt.props).onBufferEnd.apply(en, arguments) + }), + vt(gt(Nt), 'onPause', function () { + var en + return (en = Nt.props).onPause.apply(en, arguments) + }), + vt(gt(Nt), 'onEnded', function () { + var en + return (en = Nt.props).onEnded.apply(en, arguments) + }), + vt(gt(Nt), 'onError', function () { + var en + return (en = Nt.props).onError.apply(en, arguments) + }), + vt(gt(Nt), 'onPlayBackRateChange', function (en) { + return Nt.props.onPlaybackRateChange(en.target.playbackRate) + }), + vt(gt(Nt), 'onEnablePIP', function () { + var en + return (en = Nt.props).onEnablePIP.apply(en, arguments) + }), + vt(gt(Nt), 'onDisablePIP', function (en) { + var sn = Nt.props, + Kt = sn.onDisablePIP, + rn = sn.playing + Kt(en), rn && Nt.play() + }), + vt(gt(Nt), 'onPresentationModeChange', function (en) { + if (Nt.player && (0, rt.supportsWebKitPresentationMode)(Nt.player)) { + var sn = Nt.player.webkitPresentationMode + sn === 'picture-in-picture' ? Nt.onEnablePIP(en) : sn === 'inline' && Nt.onDisablePIP(en) + } + }), + vt(gt(Nt), 'onSeek', function (en) { + Nt.props.onSeek(en.target.currentTime) + }), + vt(gt(Nt), 'mute', function () { + Nt.player.muted = !0 + }), + vt(gt(Nt), 'unmute', function () { + Nt.player.muted = !1 + }), + vt(gt(Nt), 'renderSourceElement', function (en, sn) { + return typeof en == 'string' + ? nt.default.createElement('source', { key: sn, src: en }) + : nt.default.createElement('source', st({ key: sn }, en)) + }), + vt(gt(Nt), 'renderTrack', function (en, sn) { + return nt.default.createElement('track', st({ key: sn }, en)) + }), + vt(gt(Nt), 'ref', function (en) { + Nt.player && (Nt.prevPlayer = Nt.player), (Nt.player = en) + }), + Nt + ) + } + return ( + ut(Ft, [ + { + key: 'componentDidMount', + value: function () { + this.props.onMount && this.props.onMount(this), this.addListeners(this.player) + var Ut = this.getSource(this.props.url) + Ut && (this.player.src = Ut), (St || this.props.config.forceDisableHls) && this.player.load() + }, + }, + { + key: 'componentDidUpdate', + value: function (Ut) { + this.shouldUseAudio(this.props) !== this.shouldUseAudio(Ut) && + (this.removeListeners(this.prevPlayer, Ut.url), this.addListeners(this.player)), + this.props.url !== Ut.url && + !(0, rt.isMediaStream)(this.props.url) && + !(this.props.url instanceof Array) && + (this.player.srcObject = null) + }, + }, + { + key: 'componentWillUnmount', + value: function () { + this.player.removeAttribute('src'), + this.removeListeners(this.player), + this.hls && this.hls.destroy() + }, + }, + { + key: 'addListeners', + value: function (Ut) { + var Mt = this.props, + Ht = Mt.url, + en = Mt.playsinline + Ut.addEventListener('play', this.onPlay), + Ut.addEventListener('waiting', this.onBuffer), + Ut.addEventListener('playing', this.onBufferEnd), + Ut.addEventListener('pause', this.onPause), + Ut.addEventListener('seeked', this.onSeek), + Ut.addEventListener('ended', this.onEnded), + Ut.addEventListener('error', this.onError), + Ut.addEventListener('ratechange', this.onPlayBackRateChange), + Ut.addEventListener('enterpictureinpicture', this.onEnablePIP), + Ut.addEventListener('leavepictureinpicture', this.onDisablePIP), + Ut.addEventListener('webkitpresentationmodechanged', this.onPresentationModeChange), + this.shouldUseHLS(Ht) || Ut.addEventListener('canplay', this.onReady), + en && + (Ut.setAttribute('playsinline', ''), + Ut.setAttribute('webkit-playsinline', ''), + Ut.setAttribute('x5-playsinline', '')) + }, + }, + { + key: 'removeListeners', + value: function (Ut, Mt) { + Ut.removeEventListener('canplay', this.onReady), + Ut.removeEventListener('play', this.onPlay), + Ut.removeEventListener('waiting', this.onBuffer), + Ut.removeEventListener('playing', this.onBufferEnd), + Ut.removeEventListener('pause', this.onPause), + Ut.removeEventListener('seeked', this.onSeek), + Ut.removeEventListener('ended', this.onEnded), + Ut.removeEventListener('error', this.onError), + Ut.removeEventListener('ratechange', this.onPlayBackRateChange), + Ut.removeEventListener('enterpictureinpicture', this.onEnablePIP), + Ut.removeEventListener('leavepictureinpicture', this.onDisablePIP), + Ut.removeEventListener('webkitpresentationmodechanged', this.onPresentationModeChange), + this.shouldUseHLS(Mt) || Ut.removeEventListener('canplay', this.onReady) + }, + }, + { + key: 'shouldUseAudio', + value: function (Ut) { + return Ut.config.forceVideo || Ut.config.attributes.poster + ? !1 + : it.AUDIO_EXTENSIONS.test(Ut.url) || Ut.config.forceAudio + }, + }, + { + key: 'shouldUseHLS', + value: function (Ut) { + return (Tt && this.props.config.forceSafariHLS) || this.props.config.forceHLS + ? !0 + : St || this.props.config.forceDisableHls + ? !1 + : it.HLS_EXTENSIONS.test(Ut) || wt.test(Ut) + }, + }, + { + key: 'shouldUseDASH', + value: function (Ut) { + return it.DASH_EXTENSIONS.test(Ut) || this.props.config.forceDASH + }, + }, + { + key: 'shouldUseFLV', + value: function (Ut) { + return it.FLV_EXTENSIONS.test(Ut) || this.props.config.forceFLV + }, + }, + { + key: 'load', + value: function (Ut) { + var Mt = this, + Ht = this.props.config, + en = Ht.hlsVersion, + sn = Ht.hlsOptions, + Kt = Ht.dashVersion, + rn = Ht.flvVersion + if ( + (this.hls && this.hls.destroy(), + this.dash && this.dash.reset(), + this.shouldUseHLS(Ut) && + (0, rt.getSDK)(At.replace('VERSION', en), Et).then(function (nn) { + if ( + ((Mt.hls = new nn(sn)), + Mt.hls.on(nn.Events.MANIFEST_PARSED, function () { + Mt.props.onReady() + }), + Mt.hls.on(nn.Events.ERROR, function (vn, an) { + Mt.props.onError(vn, an, Mt.hls, nn) + }), + wt.test(Ut)) + ) { + var hn = Ut.match(wt)[1] + Mt.hls.loadSource(It.replace('{id}', hn)) + } else Mt.hls.loadSource(Ut) + Mt.hls.attachMedia(Mt.player), Mt.props.onLoaded() + }), + this.shouldUseDASH(Ut) && + (0, rt.getSDK)($t.replace('VERSION', Kt), Dt).then(function (nn) { + ;(Mt.dash = nn.MediaPlayer().create()), + Mt.dash.initialize(Mt.player, Ut, Mt.props.playing), + Mt.dash.on('error', Mt.props.onError), + parseInt(Kt) < 3 + ? Mt.dash.getDebug().setLogToBrowserConsole(!1) + : Mt.dash.updateSettings({ debug: { logLevel: nn.Debug.LOG_LEVEL_NONE } }), + Mt.props.onLoaded() + }), + this.shouldUseFLV(Ut) && + (0, rt.getSDK)(jt.replace('VERSION', rn), Pt).then(function (nn) { + ;(Mt.flv = nn.createPlayer({ type: 'flv', url: Ut })), + Mt.flv.attachMediaElement(Mt.player), + Mt.flv.on(nn.Events.ERROR, function (hn, vn) { + Mt.props.onError(hn, vn, Mt.flv, nn) + }), + Mt.flv.load(), + Mt.props.onLoaded() + }), + Ut instanceof Array) + ) + this.player.load() + else if ((0, rt.isMediaStream)(Ut)) + try { + this.player.srcObject = Ut + } catch { + this.player.src = window.URL.createObjectURL(Ut) + } + }, + }, + { + key: 'play', + value: function () { + var Ut = this.player.play() + Ut && Ut.catch(this.props.onError) + }, + }, + { + key: 'pause', + value: function () { + this.player.pause() + }, + }, + { + key: 'stop', + value: function () { + this.player.removeAttribute('src'), this.dash && this.dash.reset() + }, + }, + { + key: 'seekTo', + value: function (Ut) { + var Mt = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0 + ;(this.player.currentTime = Ut), Mt || this.pause() + }, + }, + { + key: 'setVolume', + value: function (Ut) { + this.player.volume = Ut + }, + }, + { + key: 'enablePIP', + value: function () { + this.player.requestPictureInPicture && document.pictureInPictureElement !== this.player + ? this.player.requestPictureInPicture() + : (0, rt.supportsWebKitPresentationMode)(this.player) && + this.player.webkitPresentationMode !== 'picture-in-picture' && + this.player.webkitSetPresentationMode('picture-in-picture') + }, + }, + { + key: 'disablePIP', + value: function () { + document.exitPictureInPicture && document.pictureInPictureElement === this.player + ? document.exitPictureInPicture() + : (0, rt.supportsWebKitPresentationMode)(this.player) && + this.player.webkitPresentationMode !== 'inline' && + this.player.webkitSetPresentationMode('inline') + }, + }, + { + key: 'setPlaybackRate', + value: function (Ut) { + try { + this.player.playbackRate = Ut + } catch (Mt) { + this.props.onError(Mt) + } + }, + }, + { + key: 'getDuration', + value: function () { + if (!this.player) return null + var Ut = this.player, + Mt = Ut.duration, + Ht = Ut.seekable + return Mt === 1 / 0 && Ht.length > 0 ? Ht.end(Ht.length - 1) : Mt + }, + }, + { + key: 'getCurrentTime', + value: function () { + return this.player ? this.player.currentTime : null + }, + }, + { + key: 'getSecondsLoaded', + value: function () { + if (!this.player) return null + var Ut = this.player.buffered + if (Ut.length === 0) return 0 + var Mt = Ut.end(Ut.length - 1), + Ht = this.getDuration() + return Mt > Ht ? Ht : Mt + }, + }, + { + key: 'getSource', + value: function (Ut) { + var Mt = this.shouldUseHLS(Ut), + Ht = this.shouldUseDASH(Ut), + en = this.shouldUseFLV(Ut) + if (!(Ut instanceof Array || (0, rt.isMediaStream)(Ut) || Mt || Ht || en)) + return Ct.test(Ut) ? Ut.replace('www.dropbox.com', 'dl.dropboxusercontent.com') : Ut + }, + }, + { + key: 'render', + value: function () { + var Ut = this.props, + Mt = Ut.url, + Ht = Ut.playing, + en = Ut.loop, + sn = Ut.controls, + Kt = Ut.muted, + rn = Ut.config, + nn = Ut.width, + hn = Ut.height, + vn = this.shouldUseAudio(this.props), + an = vn ? 'audio' : 'video', + Qt = { width: nn === 'auto' ? nn : '100%', height: hn === 'auto' ? hn : '100%' } + return nt.default.createElement( + an, + st( + { + ref: this.ref, + src: this.getSource(Mt), + style: Qt, + preload: 'auto', + autoPlay: Ht || void 0, + controls: sn, + muted: Kt, + loop: en, + }, + rn.attributes, + ), + Mt instanceof Array && Mt.map(this.renderSourceElement), + rn.tracks.map(this.renderTrack), + ) + }, + }, + ]), + Ft + ) + })(nt.Component) + ;(tt.default = Ot), vt(Ot, 'displayName', 'FilePlayer'), vt(Ot, 'canPlay', it.canPlay.file) + })(FilePlayer)), + FilePlayer + ) } - .player-controls { - margin-left: 4px; + ;(function (tt) { + Object.defineProperty(tt, '__esModule', { value: !0 }), (tt.default = void 0) + var et = reactExports, + nt = utils, + rt = patterns + function it(lt) { + '@babel/helpers - typeof' + return ( + typeof Symbol == 'function' && typeof Symbol.iterator == 'symbol' + ? (it = function (ut) { + return typeof ut + }) + : (it = function (ut) { + return ut && typeof Symbol == 'function' && ut.constructor === Symbol && ut !== Symbol.prototype + ? 'symbol' + : typeof ut + }), + it(lt) + ) + } + function ot() { + if (typeof WeakMap != 'function') return null + var lt = new WeakMap() + return ( + (ot = function () { + return lt + }), + lt + ) + } + function at(lt) { + if (lt && lt.__esModule) return lt + if (lt === null || (it(lt) !== 'object' && typeof lt != 'function')) return { default: lt } + var ct = ot() + if (ct && ct.has(lt)) return ct.get(lt) + var ut = {}, + ht = Object.defineProperty && Object.getOwnPropertyDescriptor + for (var dt in lt) + if (Object.prototype.hasOwnProperty.call(lt, dt)) { + var pt = ht ? Object.getOwnPropertyDescriptor(lt, dt) : null + pt && (pt.get || pt.set) ? Object.defineProperty(ut, dt, pt) : (ut[dt] = lt[dt]) + } + return (ut.default = lt), ct && ct.set(lt, ut), ut + } + var st = [ + { + key: 'youtube', + name: 'YouTube', + canPlay: rt.canPlay.youtube, + lazyPlayer: (0, et.lazy)(function () { + return Promise.resolve().then(function () { + return at(requireYouTube()) + }) + }), + }, + { + key: 'soundcloud', + name: 'SoundCloud', + canPlay: rt.canPlay.soundcloud, + lazyPlayer: (0, et.lazy)(function () { + return Promise.resolve().then(function () { + return at(requireSoundCloud()) + }) + }), + }, + { + key: 'vimeo', + name: 'Vimeo', + canPlay: rt.canPlay.vimeo, + lazyPlayer: (0, et.lazy)(function () { + return Promise.resolve().then(function () { + return at(requireVimeo()) + }) + }), + }, + { + key: 'facebook', + name: 'Facebook', + canPlay: rt.canPlay.facebook, + lazyPlayer: (0, et.lazy)(function () { + return Promise.resolve().then(function () { + return at(requireFacebook()) + }) + }), + }, + { + key: 'streamable', + name: 'Streamable', + canPlay: rt.canPlay.streamable, + lazyPlayer: (0, et.lazy)(function () { + return Promise.resolve().then(function () { + return at(requireStreamable()) + }) + }), + }, + { + key: 'wistia', + name: 'Wistia', + canPlay: rt.canPlay.wistia, + lazyPlayer: (0, et.lazy)(function () { + return Promise.resolve().then(function () { + return at(requireWistia()) + }) + }), + }, + { + key: 'twitch', + name: 'Twitch', + canPlay: rt.canPlay.twitch, + lazyPlayer: (0, et.lazy)(function () { + return Promise.resolve().then(function () { + return at(requireTwitch()) + }) + }), + }, + { + key: 'dailymotion', + name: 'DailyMotion', + canPlay: rt.canPlay.dailymotion, + lazyPlayer: (0, et.lazy)(function () { + return Promise.resolve().then(function () { + return at(requireDailyMotion()) + }) + }), + }, + { + key: 'mixcloud', + name: 'Mixcloud', + canPlay: rt.canPlay.mixcloud, + lazyPlayer: (0, et.lazy)(function () { + return Promise.resolve().then(function () { + return at(requireMixcloud()) + }) + }), + }, + { + key: 'vidyard', + name: 'Vidyard', + canPlay: rt.canPlay.vidyard, + lazyPlayer: (0, et.lazy)(function () { + return Promise.resolve().then(function () { + return at(requireVidyard()) + }) + }), + }, + { + key: 'kaltura', + name: 'Kaltura', + canPlay: rt.canPlay.kaltura, + lazyPlayer: (0, et.lazy)(function () { + return Promise.resolve().then(function () { + return at(requireKaltura()) + }) + }), + }, + { + key: 'file', + name: 'FilePlayer', + canPlay: rt.canPlay.file, + canEnablePIP: function (ct) { + return ( + rt.canPlay.file(ct) && + (document.pictureInPictureEnabled || (0, nt.supportsWebKitPresentationMode)()) && + !rt.AUDIO_EXTENSIONS.test(ct) + ) + }, + lazyPlayer: (0, et.lazy)(function () { + return Promise.resolve().then(function () { + return at(requireFilePlayer()) + }) + }), + }, + ] + tt.default = st + })(players) + var ReactPlayer$1 = {}, + safeIsNaN = + Number.isNaN || + function tt(et) { + return typeof et == 'number' && et !== et + } + function isEqual(tt, et) { + return !!(tt === et || (safeIsNaN(tt) && safeIsNaN(et))) } -`,Episode=({boostCount:tt,date:et,episodeTitle:nt,id:rt,isSelectedView:it=!1,imageUrl:ot,showTitle:at,type:st,text:lt,name:ct,profilePicture:ut,verified:ht=!1,twitterHandle:dt,className:pt="episode-wrapper",onClick:mt})=>{const gt=useDataStore(bt=>bt.selectedTimestamp),yt=!!(gt&>.id===rt);return jsxRuntimeExports.jsxs(EpisodeWrapper$2,{className:pt,isSelected:yt,onClick:mt,children:[st!=="tweet"&&st!=="person"&&st!=="guest"&&jsxRuntimeExports.jsxs(Flex,{direction:"row",children:[!it&&jsxRuntimeExports.jsx(Flex,{align:"center",pr:16,children:jsxRuntimeExports.jsx(Avatar$1,{src:ot,type:st||""})}),jsxRuntimeExports.jsxs(Flex,{grow:1,shrink:1,children:[jsxRuntimeExports.jsx(Flex,{align:"center",direction:"row",justify:"space-between",children:jsxRuntimeExports.jsx(Flex,{align:"center",direction:"row",children:st&&jsxRuntimeExports.jsx(TypeBadge,{type:st})})}),jsxRuntimeExports.jsx(Description$1,{"data-testid":"episode-description",children:nt}),jsxRuntimeExports.jsxs(Flex,{direction:"row",justify:"flex-start",children:[!!et&&jsxRuntimeExports.jsx(Date$2,{children:hooks.unix(et).format("ll")}),!!at&&jsxRuntimeExports.jsx(Title,{children:at}),!it&&tt>0&&jsxRuntimeExports.jsx(Flex,{style:{marginLeft:"auto"},children:jsxRuntimeExports.jsx(BoostAmt,{amt:tt})})]})]})]}),["person","guest"].includes(st)&&jsxRuntimeExports.jsx(TypePerson,{imageUrl:ot,name:ct||"",title:at||""}),st==="tweet"&&jsxRuntimeExports.jsx(TypeTweet,{date:et,imageUrl:ut,name:ct||"",text:lt||"",twitterHandle:dt,verified:ht})]})},Description$1=styled$4(Flex)` - font-family: Barlow; - font-size: 13px; - font-style: normal; - font-weight: 500; - line-height: 17px; - color: ${colors.white}; - margin: 16px 0; - display: -webkit-box; - -webkit-line-clamp: 2; /* Limit to two lines */ - -webkit-box-orient: vertical; - overflow: hidden; - white-space: normal; -`,Date$2=styled$4(Text$3)` - overflow: hidden; - color: ${colors.GRAY6}; - text-overflow: ellipsis; - font-family: Barlow; - font-size: 11px; - font-style: normal; - font-weight: 400; - line-height: 18px; - margin-right: 8px; - flex-shrink: 0; -`,Title=styled$4(Date$2)` - display: flex; - flex-direction: row; - align-items: center; - flex-shrink: 1; - max-width: 100px; - overflow: hidden; - white-space: nowrap; - text-overflow: ellipsis; - &:before { - content: ''; - display: block; - border-radius: 2px; - margin-right: 8px; - width: 4px; - flex-shrink: 0; - height: 4px; - background: ${colors.GRAY6}; + function areInputsEqual(tt, et) { + if (tt.length !== et.length) return !1 + for (var nt = 0; nt < tt.length; nt++) if (!isEqual(tt[nt], et[nt])) return !1 + return !0 } -`,Relevance=({isSearchResult:tt})=>{const et=useGraphData(),nt=reactExports.useRef(null),rt=tt?80:10,it=useDataStore(yt=>yt.setSelectedNode),ot=useDataStore(yt=>yt.setSelectedTimestamp),[at]=useAppStore(yt=>[yt.setSidebarOpen]),st=useAppStore(yt=>yt.setRelevanceSelected),[lt,ct]=reactExports.useState(0),ht=lt*rt+rt,dt=et.nodes.length-1>ht,pt=useIsMatchBreakpoint("sm","down"),mt=reactExports.useMemo(()=>[...et.nodes].sort((yt,bt)=>(bt.date||0)-(yt.date||0)).slice(0,ht),[et.nodes,ht]),gt=reactExports.useCallback(yt=>{saveConsumedContent(yt),ot(yt),st(!0),it(yt),pt&&at(!1)},[it,st,at,ot,pt]);return jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsxs(ScrollView,{ref:nt,id:"search-result-list",shrink:1,children:[mt.map((yt,bt)=>{const{image_url:vt,date:xt,boost:kt,type:St,id:Tt,episode_title:At,show_title:Et,node_type:$t,text:Dt,name:jt,profile_picture:Pt,verified:Ct=!1,twitter_handle:wt}=yt||{};return jsxRuntimeExports.jsx(Episode,{boostCount:kt||0,date:xt||0,episodeTitle:formatDescription(At),id:Tt,imageUrl:vt||"audio_default.svg",name:jt||"",onClick:()=>gt(yt),profilePicture:Pt,showTitle:formatDescription(Et),text:Dt||"",twitterHandle:wt,type:St||$t,verified:Ct},bt.toString())}),jsxRuntimeExports.jsx(LoadMoreWrapper,{align:"center",background:"BG1",direction:"row",justify:"center",children:jsxRuntimeExports.jsx(Button$2,{disabled:!dt,onClick:()=>{var yt;dt&&(ct(lt+1),(yt=nt.current)==null||yt.scrollTo(0,0))},size:"medium",children:"Load More"})})]})})},LoadMoreWrapper=styled$4(Flex)` - flex: 0 0 86px; -`,_View$1=({isSearchResult:tt})=>jsxRuntimeExports.jsxs(Wrapper$9,{children:[!tt&&jsxRuntimeExports.jsxs("div",{className:"heading",children:[jsxRuntimeExports.jsx("span",{className:"heading__title",children:"Latest"}),jsxRuntimeExports.jsx("span",{className:"heading__icon",children:jsxRuntimeExports.jsx(BrowseGalleryIcon,{})})]}),jsxRuntimeExports.jsx(Relevance,{isSearchResult:tt})]}),LatestView=reactExports.memo(_View$1),Wrapper$9=styled$4(Flex)` - .heading { - color: ${colors.GRAY6}; - padding: 0 24px 16px 24px; - font-family: Barlow; - font-size: 14px; - font-style: normal; - font-weight: 700; - line-height: 20px; - letter-spacing: 1.12px; - text-transform: uppercase; - display: flex; - align-items: flex-end; - - &__icon { - margin-left: 14px; - margin-bottom: -2px; - font-size: 24px; + function memoizeOne(tt, et) { + et === void 0 && (et = areInputsEqual) + var nt, + rt = [], + it, + ot = !1 + function at() { + for (var st = [], lt = 0; lt < arguments.length; lt++) st[lt] = arguments[lt] + return (ot && nt === this && et(st, rt)) || ((it = tt.apply(this, st)), (ot = !0), (nt = this), (rt = st)), it } + return at } - - .list { - list-style: none; - padding: 0; - margin: 0; - cursor: pointer; - - &-item { - padding: 18px 16px 18px 24px; - overflow: hidden; - color: ${colors.white}; - text-overflow: ellipsis; - font-family: Barlow; - font-size: 16px; - font-style: normal; - font-weight: 600; - line-height: 11px; - - &:hover { - background: rgba(0, 0, 0, 0.1); - color: ${colors.SECONDARY_BLUE}; + const memoizeOne_esm = Object.freeze( + Object.defineProperty({ __proto__: null, default: memoizeOne }, Symbol.toStringTag, { value: 'Module' }), + ), + require$$2 = getAugmentedNamespace(memoizeOne_esm) + var hasElementType = typeof Element < 'u', + hasMap = typeof Map == 'function', + hasSet = typeof Set == 'function', + hasArrayBuffer = typeof ArrayBuffer == 'function' && !!ArrayBuffer.isView + function equal(tt, et) { + if (tt === et) return !0 + if (tt && et && typeof tt == 'object' && typeof et == 'object') { + if (tt.constructor !== et.constructor) return !1 + var nt, rt, it + if (Array.isArray(tt)) { + if (((nt = tt.length), nt != et.length)) return !1 + for (rt = nt; rt-- !== 0; ) if (!equal(tt[rt], et[rt])) return !1 + return !0 } - - &:active { - background: rgba(0, 0, 0, 0.2); - color: ${colors.PRIMARY_BLUE}; + var ot + if (hasMap && tt instanceof Map && et instanceof Map) { + if (tt.size !== et.size) return !1 + for (ot = tt.entries(); !(rt = ot.next()).done; ) if (!et.has(rt.value[0])) return !1 + for (ot = tt.entries(); !(rt = ot.next()).done; ) if (!equal(rt.value[1], et.get(rt.value[0]))) return !1 + return !0 + } + if (hasSet && tt instanceof Set && et instanceof Set) { + if (tt.size !== et.size) return !1 + for (ot = tt.entries(); !(rt = ot.next()).done; ) if (!et.has(rt.value[0])) return !1 + return !0 } + if (hasArrayBuffer && ArrayBuffer.isView(tt) && ArrayBuffer.isView(et)) { + if (((nt = tt.length), nt != et.length)) return !1 + for (rt = nt; rt-- !== 0; ) if (tt[rt] !== et[rt]) return !1 + return !0 + } + if (tt.constructor === RegExp) return tt.source === et.source && tt.flags === et.flags + if (tt.valueOf !== Object.prototype.valueOf && typeof tt.valueOf == 'function' && typeof et.valueOf == 'function') + return tt.valueOf() === et.valueOf() + if ( + tt.toString !== Object.prototype.toString && + typeof tt.toString == 'function' && + typeof et.toString == 'function' + ) + return tt.toString() === et.toString() + if (((it = Object.keys(tt)), (nt = it.length), nt !== Object.keys(et).length)) return !1 + for (rt = nt; rt-- !== 0; ) if (!Object.prototype.hasOwnProperty.call(et, it[rt])) return !1 + if (hasElementType && tt instanceof Element) return !1 + for (rt = nt; rt-- !== 0; ) + if ( + !((it[rt] === '_owner' || it[rt] === '__v' || it[rt] === '__o') && tt.$$typeof) && + !equal(tt[it[rt]], et[it[rt]]) + ) + return !1 + return !0 } + return tt !== tt && et !== et } -`,EpisodeWrapper$1=styled$4(Flex).attrs({direction:"column"})` - padding: 24px; - cursor: pointer; - border-top: 1px solid #101317; - background: ${colors.BG1}; - - .type-image { - width: 20px; - height: 20px; - border-radius: 50%; - margin-right: 8px; + var reactFastCompare = function tt(et, nt) { + try { + return equal(et, nt) + } catch (rt) { + if ((rt.message || '').match(/stack|recursion/i)) + return console.warn('react-fast-compare cannot handle circular refs'), !1 + throw rt + } + }, + props = {} + Object.defineProperty(props, '__esModule', { value: !0 }) + props.defaultProps = props.propTypes = void 0 + var _propTypes = _interopRequireDefault$1(propTypesExports) + function _interopRequireDefault$1(tt) { + return tt && tt.__esModule ? tt : { default: tt } + } + var string = _propTypes.default.string, + bool = _propTypes.default.bool, + number = _propTypes.default.number, + array = _propTypes.default.array, + oneOfType = _propTypes.default.oneOfType, + shape = _propTypes.default.shape, + object = _propTypes.default.object, + func = _propTypes.default.func, + node = _propTypes.default.node, + propTypes = { + url: oneOfType([string, array, object]), + playing: bool, + loop: bool, + controls: bool, + volume: number, + muted: bool, + playbackRate: number, + width: oneOfType([string, number]), + height: oneOfType([string, number]), + style: object, + progressInterval: number, + playsinline: bool, + pip: bool, + stopOnUnmount: bool, + light: oneOfType([bool, string, object]), + playIcon: node, + previewTabIndex: number, + fallback: node, + oEmbedUrl: string, + wrapper: oneOfType([string, func, shape({ render: func.isRequired })]), + config: shape({ + soundcloud: shape({ options: object }), + youtube: shape({ playerVars: object, embedOptions: object, onUnstarted: func }), + facebook: shape({ appId: string, version: string, playerId: string, attributes: object }), + dailymotion: shape({ params: object }), + vimeo: shape({ playerOptions: object, title: string }), + file: shape({ + attributes: object, + tracks: array, + forceVideo: bool, + forceAudio: bool, + forceHLS: bool, + forceSafariHLS: bool, + forceDisableHls: bool, + forceDASH: bool, + forceFLV: bool, + hlsOptions: object, + hlsVersion: string, + dashVersion: string, + flvVersion: string, + }), + wistia: shape({ options: object, playerId: string, customControls: array }), + mixcloud: shape({ options: object }), + twitch: shape({ options: object, playerId: string }), + vidyard: shape({ options: object }), + }), + onReady: func, + onStart: func, + onPlay: func, + onPause: func, + onBuffer: func, + onBufferEnd: func, + onEnded: func, + onError: func, + onDuration: func, + onSeek: func, + onPlaybackRateChange: func, + onPlaybackQualityChange: func, + onProgress: func, + onClickPreview: func, + onEnablePIP: func, + onDisablePIP: func, + } + props.propTypes = propTypes + var noop = function tt() {}, + defaultProps = { + playing: !1, + loop: !1, + controls: !1, + volume: null, + muted: !1, + playbackRate: 1, + width: '640px', + height: '360px', + style: {}, + progressInterval: 1e3, + playsinline: !1, + pip: !1, + stopOnUnmount: !0, + light: !1, + fallback: null, + wrapper: 'div', + previewTabIndex: 0, + oEmbedUrl: 'https://noembed.com/embed?url={url}', + config: { + soundcloud: { + options: { + visual: !0, + buying: !1, + liking: !1, + download: !1, + sharing: !1, + show_comments: !1, + show_playcount: !1, + }, + }, + youtube: { + playerVars: { playsinline: 1, showinfo: 0, rel: 0, iv_load_policy: 3, modestbranding: 1 }, + embedOptions: {}, + onUnstarted: noop, + }, + facebook: { appId: '1309697205772819', version: 'v3.3', playerId: null, attributes: {} }, + dailymotion: { params: { api: 1, 'endscreen-enable': !1 } }, + vimeo: { playerOptions: { autopause: !1, byline: !1, portrait: !1, title: !1 }, title: null }, + file: { + attributes: {}, + tracks: [], + forceVideo: !1, + forceAudio: !1, + forceHLS: !1, + forceDASH: !1, + forceFLV: !1, + hlsOptions: {}, + hlsVersion: '1.1.4', + dashVersion: '3.1.3', + flvVersion: '1.5.0', + forceDisableHls: !1, + }, + wistia: { options: {}, playerId: null, customControls: null }, + mixcloud: { options: { hide_cover: 1 } }, + twitch: { options: {}, playerId: null }, + vidyard: { options: {} }, + }, + onReady: noop, + onStart: noop, + onPlay: noop, + onPause: noop, + onBuffer: noop, + onBufferEnd: noop, + onEnded: noop, + onError: noop, + onDuration: noop, + onSeek: noop, + onPlaybackRateChange: noop, + onPlaybackQualityChange: noop, + onProgress: noop, + onClickPreview: noop, + onEnablePIP: noop, + onDisablePIP: noop, + } + props.defaultProps = defaultProps + var Player = {} + ;(function (tt) { + function et(At) { + '@babel/helpers - typeof' + return ( + typeof Symbol == 'function' && typeof Symbol.iterator == 'symbol' + ? (et = function ($t) { + return typeof $t + }) + : (et = function ($t) { + return $t && typeof Symbol == 'function' && $t.constructor === Symbol && $t !== Symbol.prototype + ? 'symbol' + : typeof $t + }), + et(At) + ) + } + Object.defineProperty(tt, '__esModule', { value: !0 }), (tt.default = void 0) + var nt = lt(reactExports), + rt = at(reactFastCompare), + it = props, + ot = utils + function at(At) { + return At && At.__esModule ? At : { default: At } + } + function st() { + if (typeof WeakMap != 'function') return null + var At = new WeakMap() + return ( + (st = function () { + return At + }), + At + ) + } + function lt(At) { + if (At && At.__esModule) return At + if (At === null || (et(At) !== 'object' && typeof At != 'function')) return { default: At } + var Et = st() + if (Et && Et.has(At)) return Et.get(At) + var $t = {}, + Dt = Object.defineProperty && Object.getOwnPropertyDescriptor + for (var jt in At) + if (Object.prototype.hasOwnProperty.call(At, jt)) { + var Pt = Dt ? Object.getOwnPropertyDescriptor(At, jt) : null + Pt && (Pt.get || Pt.set) ? Object.defineProperty($t, jt, Pt) : ($t[jt] = At[jt]) + } + return ($t.default = At), Et && Et.set(At, $t), $t + } + function ct() { + return ( + (ct = + Object.assign || + function (At) { + for (var Et = 1; Et < arguments.length; Et++) { + var $t = arguments[Et] + for (var Dt in $t) Object.prototype.hasOwnProperty.call($t, Dt) && (At[Dt] = $t[Dt]) + } + return At + }), + ct.apply(this, arguments) + ) + } + function ut(At, Et) { + if (!(At instanceof Et)) throw new TypeError('Cannot call a class as a function') + } + function ht(At, Et) { + for (var $t = 0; $t < Et.length; $t++) { + var Dt = Et[$t] + ;(Dt.enumerable = Dt.enumerable || !1), + (Dt.configurable = !0), + 'value' in Dt && (Dt.writable = !0), + Object.defineProperty(At, Dt.key, Dt) + } + } + function dt(At, Et, $t) { + return Et && ht(At.prototype, Et), $t && ht(At, $t), At + } + function pt(At, Et) { + if (typeof Et != 'function' && Et !== null) + throw new TypeError('Super expression must either be null or a function') + ;(At.prototype = Object.create(Et && Et.prototype, { + constructor: { value: At, writable: !0, configurable: !0 }, + })), + Et && mt(At, Et) + } + function mt(At, Et) { + return ( + (mt = + Object.setPrototypeOf || + function (Dt, jt) { + return (Dt.__proto__ = jt), Dt + }), + mt(At, Et) + ) + } + function gt(At) { + var Et = vt() + return function () { + var Dt = xt(At), + jt + if (Et) { + var Pt = xt(this).constructor + jt = Reflect.construct(Dt, arguments, Pt) + } else jt = Dt.apply(this, arguments) + return yt(this, jt) + } + } + function yt(At, Et) { + return Et && (et(Et) === 'object' || typeof Et == 'function') ? Et : bt(At) + } + function bt(At) { + if (At === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called") + return At + } + function vt() { + 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 + } + } + function xt(At) { + return ( + (xt = Object.setPrototypeOf + ? Object.getPrototypeOf + : function ($t) { + return $t.__proto__ || Object.getPrototypeOf($t) + }), + xt(At) + ) + } + function kt(At, Et, $t) { + return ( + Et in At + ? Object.defineProperty(At, Et, { value: $t, enumerable: !0, configurable: !0, writable: !0 }) + : (At[Et] = $t), + At + ) + } + var St = 5e3, + Tt = (function (At) { + pt($t, At) + var Et = gt($t) + function $t() { + var Dt + ut(this, $t) + for (var jt = arguments.length, Pt = new Array(jt), Ct = 0; Ct < jt; Ct++) Pt[Ct] = arguments[Ct] + return ( + (Dt = Et.call.apply(Et, [this].concat(Pt))), + kt(bt(Dt), 'mounted', !1), + kt(bt(Dt), 'isReady', !1), + kt(bt(Dt), 'isPlaying', !1), + kt(bt(Dt), 'isLoading', !0), + kt(bt(Dt), 'loadOnReady', null), + kt(bt(Dt), 'startOnPlay', !0), + kt(bt(Dt), 'seekOnPlay', null), + kt(bt(Dt), 'onDurationCalled', !1), + kt(bt(Dt), 'handlePlayerMount', function (wt) { + if (Dt.player) { + Dt.progress() + return + } + ;(Dt.player = wt), Dt.player.load(Dt.props.url), Dt.progress() + }), + kt(bt(Dt), 'getInternalPlayer', function (wt) { + return Dt.player ? Dt.player[wt] : null + }), + kt(bt(Dt), 'progress', function () { + if (Dt.props.url && Dt.player && Dt.isReady) { + var wt = Dt.getCurrentTime() || 0, + It = Dt.getSecondsLoaded(), + Ot = Dt.getDuration() + if (Ot) { + var Wt = { playedSeconds: wt, played: wt / Ot } + It !== null && ((Wt.loadedSeconds = It), (Wt.loaded = It / Ot)), + (Wt.playedSeconds !== Dt.prevPlayed || Wt.loadedSeconds !== Dt.prevLoaded) && + Dt.props.onProgress(Wt), + (Dt.prevPlayed = Wt.playedSeconds), + (Dt.prevLoaded = Wt.loadedSeconds) + } + } + Dt.progressTimeout = setTimeout(Dt.progress, Dt.props.progressFrequency || Dt.props.progressInterval) + }), + kt(bt(Dt), 'handleReady', function () { + if (Dt.mounted) { + ;(Dt.isReady = !0), (Dt.isLoading = !1) + var wt = Dt.props, + It = wt.onReady, + Ot = wt.playing, + Wt = wt.volume, + zt = wt.muted + It(), + !zt && Wt !== null && Dt.player.setVolume(Wt), + Dt.loadOnReady + ? (Dt.player.load(Dt.loadOnReady, !0), (Dt.loadOnReady = null)) + : Ot && Dt.player.play(), + Dt.handleDurationCheck() + } + }), + kt(bt(Dt), 'handlePlay', function () { + ;(Dt.isPlaying = !0), (Dt.isLoading = !1) + var wt = Dt.props, + It = wt.onStart, + Ot = wt.onPlay, + Wt = wt.playbackRate + Dt.startOnPlay && + (Dt.player.setPlaybackRate && Wt !== 1 && Dt.player.setPlaybackRate(Wt), It(), (Dt.startOnPlay = !1)), + Ot(), + Dt.seekOnPlay && (Dt.seekTo(Dt.seekOnPlay), (Dt.seekOnPlay = null)), + Dt.handleDurationCheck() + }), + kt(bt(Dt), 'handlePause', function (wt) { + ;(Dt.isPlaying = !1), Dt.isLoading || Dt.props.onPause(wt) + }), + kt(bt(Dt), 'handleEnded', function () { + var wt = Dt.props, + It = wt.activePlayer, + Ot = wt.loop, + Wt = wt.onEnded + It.loopOnEnded && Ot && Dt.seekTo(0), Ot || ((Dt.isPlaying = !1), Wt()) + }), + kt(bt(Dt), 'handleError', function () { + var wt + ;(Dt.isLoading = !1), (wt = Dt.props).onError.apply(wt, arguments) + }), + kt(bt(Dt), 'handleDurationCheck', function () { + clearTimeout(Dt.durationCheckTimeout) + var wt = Dt.getDuration() + wt + ? Dt.onDurationCalled || (Dt.props.onDuration(wt), (Dt.onDurationCalled = !0)) + : (Dt.durationCheckTimeout = setTimeout(Dt.handleDurationCheck, 100)) + }), + kt(bt(Dt), 'handleLoaded', function () { + Dt.isLoading = !1 + }), + Dt + ) + } + return ( + dt($t, [ + { + key: 'componentDidMount', + value: function () { + this.mounted = !0 + }, + }, + { + key: 'componentWillUnmount', + value: function () { + clearTimeout(this.progressTimeout), + clearTimeout(this.durationCheckTimeout), + this.isReady && + this.props.stopOnUnmount && + (this.player.stop(), this.player.disablePIP && this.player.disablePIP()), + (this.mounted = !1) + }, + }, + { + key: 'componentDidUpdate', + value: function (jt) { + var Pt = this + if (this.player) { + var Ct = this.props, + wt = Ct.url, + It = Ct.playing, + Ot = Ct.volume, + Wt = Ct.muted, + zt = Ct.playbackRate, + Ft = Ct.pip, + Nt = Ct.loop, + Ut = Ct.activePlayer, + Mt = Ct.disableDeferredLoading + if (!(0, rt.default)(jt.url, wt)) { + if (this.isLoading && !Ut.forceLoad && !Mt && !(0, ot.isMediaStream)(wt)) { + console.warn( + 'ReactPlayer: the attempt to load '.concat( + wt, + ' is being deferred until the player has loaded', + ), + ), + (this.loadOnReady = wt) + return + } + ;(this.isLoading = !0), + (this.startOnPlay = !0), + (this.onDurationCalled = !1), + this.player.load(wt, this.isReady) + } + !jt.playing && It && !this.isPlaying && this.player.play(), + jt.playing && !It && this.isPlaying && this.player.pause(), + !jt.pip && Ft && this.player.enablePIP && this.player.enablePIP(), + jt.pip && !Ft && this.player.disablePIP && this.player.disablePIP(), + jt.volume !== Ot && Ot !== null && this.player.setVolume(Ot), + jt.muted !== Wt && + (Wt + ? this.player.mute() + : (this.player.unmute(), + Ot !== null && + setTimeout(function () { + return Pt.player.setVolume(Ot) + }))), + jt.playbackRate !== zt && this.player.setPlaybackRate && this.player.setPlaybackRate(zt), + jt.loop !== Nt && this.player.setLoop && this.player.setLoop(Nt) + } + }, + }, + { + key: 'getDuration', + value: function () { + return this.isReady ? this.player.getDuration() : null + }, + }, + { + key: 'getCurrentTime', + value: function () { + return this.isReady ? this.player.getCurrentTime() : null + }, + }, + { + key: 'getSecondsLoaded', + value: function () { + return this.isReady ? this.player.getSecondsLoaded() : null + }, + }, + { + key: 'seekTo', + value: function (jt, Pt, Ct) { + var wt = this + if (!this.isReady) { + jt !== 0 && + ((this.seekOnPlay = jt), + setTimeout(function () { + wt.seekOnPlay = null + }, St)) + return + } + var It = Pt ? Pt === 'fraction' : jt > 0 && jt < 1 + if (It) { + var Ot = this.player.getDuration() + if (!Ot) { + console.warn('ReactPlayer: could not seek using fraction – duration not yet available') + return + } + this.player.seekTo(Ot * jt, Ct) + return + } + this.player.seekTo(jt, Ct) + }, + }, + { + key: 'render', + value: function () { + var jt = this.props.activePlayer + return jt + ? nt.default.createElement( + jt, + ct({}, this.props, { + onMount: this.handlePlayerMount, + onReady: this.handleReady, + onPlay: this.handlePlay, + onPause: this.handlePause, + onEnded: this.handleEnded, + onLoaded: this.handleLoaded, + onError: this.handleError, + }), + ) + : null + }, + }, + ]), + $t + ) + })(nt.Component) + ;(tt.default = Tt), + kt(Tt, 'displayName', 'Player'), + kt(Tt, 'propTypes', it.propTypes), + kt(Tt, 'defaultProps', it.defaultProps) + })(Player) + var Preview$1 = {}, + hasRequiredPreview + function requirePreview() { + return ( + hasRequiredPreview || + ((hasRequiredPreview = 1), + (function (tt) { + function et(St) { + '@babel/helpers - typeof' + return ( + typeof Symbol == 'function' && typeof Symbol.iterator == 'symbol' + ? (et = function (At) { + return typeof At + }) + : (et = function (At) { + return At && typeof Symbol == 'function' && At.constructor === Symbol && At !== Symbol.prototype + ? 'symbol' + : typeof At + }), + et(St) + ) + } + Object.defineProperty(tt, '__esModule', { value: !0 }), (tt.default = void 0) + var nt = it(reactExports) + function rt() { + if (typeof WeakMap != 'function') return null + var St = new WeakMap() + return ( + (rt = function () { + return St + }), + St + ) + } + function it(St) { + if (St && St.__esModule) return St + if (St === null || (et(St) !== 'object' && typeof St != 'function')) return { default: St } + var Tt = rt() + if (Tt && Tt.has(St)) return Tt.get(St) + var At = {}, + Et = Object.defineProperty && Object.getOwnPropertyDescriptor + for (var $t in St) + if (Object.prototype.hasOwnProperty.call(St, $t)) { + var Dt = Et ? Object.getOwnPropertyDescriptor(St, $t) : null + Dt && (Dt.get || Dt.set) ? Object.defineProperty(At, $t, Dt) : (At[$t] = St[$t]) + } + return (At.default = St), Tt && Tt.set(St, At), At + } + function ot(St, Tt) { + var At = Object.keys(St) + if (Object.getOwnPropertySymbols) { + var Et = Object.getOwnPropertySymbols(St) + Tt && + (Et = Et.filter(function ($t) { + return Object.getOwnPropertyDescriptor(St, $t).enumerable + })), + At.push.apply(At, Et) + } + return At + } + function at(St) { + for (var Tt = 1; Tt < arguments.length; Tt++) { + var At = arguments[Tt] != null ? arguments[Tt] : {} + Tt % 2 + ? ot(Object(At), !0).forEach(function (Et) { + bt(St, Et, At[Et]) + }) + : Object.getOwnPropertyDescriptors + ? Object.defineProperties(St, Object.getOwnPropertyDescriptors(At)) + : ot(Object(At)).forEach(function (Et) { + Object.defineProperty(St, Et, Object.getOwnPropertyDescriptor(At, Et)) + }) + } + return St + } + function st(St, Tt) { + if (!(St instanceof Tt)) throw new TypeError('Cannot call a class as a function') + } + function lt(St, Tt) { + for (var At = 0; At < Tt.length; At++) { + var Et = Tt[At] + ;(Et.enumerable = Et.enumerable || !1), + (Et.configurable = !0), + 'value' in Et && (Et.writable = !0), + Object.defineProperty(St, Et.key, Et) + } + } + function ct(St, Tt, At) { + return Tt && lt(St.prototype, Tt), At && lt(St, At), St + } + function ut(St, Tt) { + if (typeof Tt != 'function' && Tt !== null) + throw new TypeError('Super expression must either be null or a function') + ;(St.prototype = Object.create(Tt && Tt.prototype, { + constructor: { value: St, writable: !0, configurable: !0 }, + })), + Tt && ht(St, Tt) + } + function ht(St, Tt) { + return ( + (ht = + Object.setPrototypeOf || + function (Et, $t) { + return (Et.__proto__ = $t), Et + }), + ht(St, Tt) + ) + } + function dt(St) { + var Tt = gt() + return function () { + var Et = yt(St), + $t + if (Tt) { + var Dt = yt(this).constructor + $t = Reflect.construct(Et, arguments, Dt) + } else $t = Et.apply(this, arguments) + return pt(this, $t) + } + } + function pt(St, Tt) { + return Tt && (et(Tt) === 'object' || typeof Tt == 'function') ? Tt : mt(St) + } + function mt(St) { + if (St === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called") + return St + } + function gt() { + 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 + } + } + function yt(St) { + return ( + (yt = Object.setPrototypeOf + ? Object.getPrototypeOf + : function (At) { + return At.__proto__ || Object.getPrototypeOf(At) + }), + yt(St) + ) + } + function bt(St, Tt, At) { + return ( + Tt in St + ? Object.defineProperty(St, Tt, { value: At, enumerable: !0, configurable: !0, writable: !0 }) + : (St[Tt] = At), + St + ) + } + var vt = '64px', + xt = {}, + kt = (function (St) { + ut(At, St) + var Tt = dt(At) + function At() { + var Et + st(this, At) + for (var $t = arguments.length, Dt = new Array($t), jt = 0; jt < $t; jt++) Dt[jt] = arguments[jt] + return ( + (Et = Tt.call.apply(Tt, [this].concat(Dt))), + bt(mt(Et), 'mounted', !1), + bt(mt(Et), 'state', { image: null }), + bt(mt(Et), 'handleKeyPress', function (Pt) { + ;(Pt.key === 'Enter' || Pt.key === ' ') && Et.props.onClick() + }), + Et + ) + } + return ( + ct(At, [ + { + key: 'componentDidMount', + value: function () { + ;(this.mounted = !0), this.fetchImage(this.props) + }, + }, + { + key: 'componentDidUpdate', + value: function ($t) { + var Dt = this.props, + jt = Dt.url, + Pt = Dt.light + ;($t.url !== jt || $t.light !== Pt) && this.fetchImage(this.props) + }, + }, + { + key: 'componentWillUnmount', + value: function () { + this.mounted = !1 + }, + }, + { + key: 'fetchImage', + value: function ($t) { + var Dt = this, + jt = $t.url, + Pt = $t.light, + Ct = $t.oEmbedUrl + if (!nt.default.isValidElement(Pt)) { + if (typeof Pt == 'string') { + this.setState({ image: Pt }) + return + } + if (xt[jt]) { + this.setState({ image: xt[jt] }) + return + } + return ( + this.setState({ image: null }), + window + .fetch(Ct.replace('{url}', jt)) + .then(function (wt) { + return wt.json() + }) + .then(function (wt) { + if (wt.thumbnail_url && Dt.mounted) { + var It = wt.thumbnail_url + .replace('height=100', 'height=480') + .replace('-d_295x166', '-d_640') + Dt.setState({ image: It }), (xt[jt] = It) + } + }) + ) + } + }, + }, + { + key: 'render', + value: function () { + var $t = this.props, + Dt = $t.light, + jt = $t.onClick, + Pt = $t.playIcon, + Ct = $t.previewTabIndex, + wt = this.state.image, + It = nt.default.isValidElement(Dt), + Ot = { display: 'flex', alignItems: 'center', justifyContent: 'center' }, + Wt = { + preview: at( + { + width: '100%', + height: '100%', + backgroundImage: wt && !It ? 'url('.concat(wt, ')') : void 0, + backgroundSize: 'cover', + backgroundPosition: 'center', + cursor: 'pointer', + }, + Ot, + ), + shadow: at( + { + background: 'radial-gradient(rgb(0, 0, 0, 0.3), rgba(0, 0, 0, 0) 60%)', + borderRadius: vt, + width: vt, + height: vt, + position: It ? 'absolute' : void 0, + }, + Ot, + ), + playIcon: { + borderStyle: 'solid', + borderWidth: '16px 0 16px 26px', + borderColor: 'transparent transparent transparent white', + marginLeft: '7px', + }, + }, + zt = nt.default.createElement( + 'div', + { style: Wt.shadow, className: 'react-player__shadow' }, + nt.default.createElement('div', { style: Wt.playIcon, className: 'react-player__play-icon' }), + ) + return nt.default.createElement( + 'div', + { + style: Wt.preview, + className: 'react-player__preview', + onClick: jt, + tabIndex: Ct, + onKeyPress: this.handleKeyPress, + }, + It ? Dt : null, + Pt || zt, + ) + }, + }, + ]), + At + ) + })(nt.Component) + tt.default = kt + })(Preview$1)), + Preview$1 + ) } - - .booster__pill { - margin-right: 0; - margin-top: 8px; + Object.defineProperty(ReactPlayer$1, '__esModule', { value: !0 }) + ReactPlayer$1.createReactPlayer = void 0 + var _react = _interopRequireWildcard(reactExports), + _deepmerge = _interopRequireDefault(cjs), + _memoizeOne = _interopRequireDefault(require$$2), + _reactFastCompare = _interopRequireDefault(reactFastCompare), + _props = props, + _utils = utils, + _Player3 = _interopRequireDefault(Player) + function _interopRequireDefault(tt) { + return tt && tt.__esModule ? tt : { default: tt } } - .player-controls { - margin-left: 4px; + function _typeof(tt) { + '@babel/helpers - typeof' + return ( + typeof Symbol == 'function' && typeof Symbol.iterator == 'symbol' + ? (_typeof = function (nt) { + return typeof nt + }) + : (_typeof = function (nt) { + return nt && typeof Symbol == 'function' && nt.constructor === Symbol && nt !== Symbol.prototype + ? 'symbol' + : typeof nt + }), + _typeof(tt) + ) } - - .title { - margin: 20px 0 8px; + function ownKeys(tt, et) { + var nt = Object.keys(tt) + if (Object.getOwnPropertySymbols) { + var rt = Object.getOwnPropertySymbols(tt) + et && + (rt = rt.filter(function (it) { + return Object.getOwnPropertyDescriptor(tt, it).enumerable + })), + nt.push.apply(nt, rt) + } + return nt } -`,StyledSkeleton$1=styled$4(Skeleton$2)` - && { - background: rgba(0, 0, 0, 0.15); + function _objectSpread(tt) { + for (var et = 1; et < arguments.length; et++) { + var nt = arguments[et] != null ? arguments[et] : {} + et % 2 + ? ownKeys(Object(nt), !0).forEach(function (rt) { + _defineProperty(tt, rt, nt[rt]) + }) + : Object.getOwnPropertyDescriptors + ? Object.defineProperties(tt, Object.getOwnPropertyDescriptors(nt)) + : ownKeys(Object(nt)).forEach(function (rt) { + Object.defineProperty(tt, rt, Object.getOwnPropertyDescriptor(nt, rt)) + }) + } + return tt } -`,EpisodeSkeleton=()=>jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:Array(7).fill(null).map((tt,et)=>jsxRuntimeExports.jsx(EpisodeWrapper$1,{children:jsxRuntimeExports.jsxs(Flex,{direction:"row",children:[jsxRuntimeExports.jsx(Flex,{align:"center",pr:16,children:jsxRuntimeExports.jsx(StyledSkeleton$1,{animation:"wave",height:64,variant:"rectangular",width:64})}),jsxRuntimeExports.jsxs(Flex,{grow:1,shrink:1,children:[jsxRuntimeExports.jsx(StyledSkeleton$1,{height:10,variant:"rectangular",width:56}),jsxRuntimeExports.jsx(StyledSkeleton$1,{className:"title",height:10,variant:"rectangular",width:262}),jsxRuntimeExports.jsx(StyledSkeleton$1,{height:10,variant:"rectangular",width:149})]})]})},et))});styled$4(Flex)` - font-family: Barlow; - font-size: 13px; - font-style: normal; - font-weight: 500; - line-height: 17px; - color: ${colors.white}; - margin: 16px 0; - display: -webkit-box; - -webkit-line-clamp: 2; /* Limit to two lines */ - -webkit-box-orient: vertical; - overflow: hidden; - white-space: normal; -`;const Date$1=styled$4(Text$3)` - overflow: hidden; - color: ${colors.GRAY6}; - text-overflow: ellipsis; - font-family: Barlow; - font-size: 11px; - font-style: normal; - font-weight: 400; - line-height: 18px; - margin-right: 8px; - flex-shrink: 0; -`;styled$4(Date$1)` - display: flex; - flex-direction: row; - align-items: center; - flex-shrink: 1; - overflow: hidden; - white-space: nowrap; - text-overflow: ellipsis; - &:before { - content: ''; - display: block; - border-radius: 2px; - margin-right: 8px; - width: 4px; - flex-shrink: 0; - height: 4px; - background: ${colors.GRAY6}; + function _extends() { + return ( + (_extends = + Object.assign || + function (tt) { + for (var et = 1; et < arguments.length; et++) { + var nt = arguments[et] + for (var rt in nt) Object.prototype.hasOwnProperty.call(nt, rt) && (tt[rt] = nt[rt]) + } + return tt + }), + _extends.apply(this, arguments) + ) } -`;const CloseIcon=tt=>jsxRuntimeExports.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 32 32",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsxs("g",{id:"cancel",children:[jsxRuntimeExports.jsx("mask",{id:"mask0_1264_3381",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"32",height:"32",children:jsxRuntimeExports.jsx("rect",{id:"Bounding box",width:"1em",height:"1em",fill:"currentColor"})}),jsxRuntimeExports.jsx("g",{mask:"url(#mask0_1264_3381)",children:jsxRuntimeExports.jsx("path",{id:"cancel_2",d:"M16 17.4051L20.0975 21.5025C20.2821 21.6872 20.5141 21.7816 20.7936 21.7859C21.0731 21.7902 21.3094 21.6957 21.5025 21.5025C21.6957 21.3094 21.7923 21.0752 21.7923 20.8C21.7923 20.5248 21.6957 20.2906 21.5025 20.0975L17.4051 16L21.5025 11.9025C21.6872 11.7179 21.7816 11.4859 21.7859 11.2064C21.7902 10.9269 21.6957 10.6906 21.5025 10.4975C21.3094 10.3043 21.0752 10.2077 20.8 10.2077C20.5248 10.2077 20.2906 10.3043 20.0975 10.4975L16 14.5949L11.9025 10.4975C11.7179 10.3129 11.4859 10.2184 11.2064 10.2141C10.9269 10.2099 10.6906 10.3043 10.4975 10.4975C10.3043 10.6906 10.2077 10.9248 10.2077 11.2C10.2077 11.4752 10.3043 11.7094 10.4975 11.9025L14.5949 16L10.4975 20.0975C10.3129 20.2821 10.2184 20.5141 10.2141 20.7936C10.2099 21.0731 10.3043 21.3094 10.4975 21.5025C10.6906 21.6957 10.9248 21.7923 11.2 21.7923C11.4752 21.7923 11.7094 21.6957 11.9025 21.5025L16 17.4051ZM16.0022 28.6666C14.2503 28.6666 12.6036 28.3342 11.0621 27.6693C9.52057 27.0044 8.17966 26.1021 7.03937 24.9623C5.89906 23.8225 4.99632 22.4822 4.33114 20.9413C3.66596 19.4005 3.33337 17.7542 3.33337 16.0022C3.33337 14.2503 3.66582 12.6036 4.33071 11.0621C4.9956 9.52057 5.89793 8.17967 7.03771 7.03938C8.17751 5.89907 9.51783 4.99632 11.0587 4.33114C12.5995 3.66596 14.2459 3.33337 15.9978 3.33337C17.7497 3.33337 19.3964 3.66582 20.9379 4.33071C22.4794 4.9956 23.8204 5.89793 24.9606 7.03771C26.101 8.17751 27.0037 9.51783 27.6689 11.0587C28.3341 12.5995 28.6666 14.2459 28.6666 15.9978C28.6666 17.7497 28.3342 19.3964 27.6693 20.9379C27.0044 22.4794 26.1021 23.8204 24.9623 24.9606C23.8225 26.101 22.4822 27.0037 20.9413 27.6689C19.4005 28.3341 17.7542 28.6666 16.0022 28.6666Z",fill:"currentColor"})})]})}),TextType=()=>{const tt=useSelectedNode();return jsxRuntimeExports.jsx(Flex,{align:"center",justify:"center",p:12,children:jsxRuntimeExports.jsx(Text$3,{color:"primaryText1",kind:"regular",children:tt==null?void 0:tt.text})})};var bundle=function(tt){var et={};function nt(rt){if(et[rt])return et[rt].exports;var it=et[rt]={i:rt,l:!1,exports:{}};return tt[rt].call(it.exports,it,it.exports,nt),it.l=!0,it.exports}return nt.m=tt,nt.c=et,nt.d=function(rt,it,ot){nt.o(rt,it)||Object.defineProperty(rt,it,{enumerable:!0,get:ot})},nt.r=function(rt){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(rt,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(rt,"__esModule",{value:!0})},nt.t=function(rt,it){if(1&it&&(rt=nt(rt)),8&it||4&it&&typeof rt=="object"&&rt&&rt.__esModule)return rt;var ot=Object.create(null);if(nt.r(ot),Object.defineProperty(ot,"default",{enumerable:!0,value:rt}),2&it&&typeof rt!="string")for(var at in rt)nt.d(ot,at,(function(st){return rt[st]}).bind(null,at));return ot},nt.n=function(rt){var it=rt&&rt.__esModule?function(){return rt.default}:function(){return rt};return nt.d(it,"a",it),it},nt.o=function(rt,it){return Object.prototype.hasOwnProperty.call(rt,it)},nt.p="",nt(nt.s=2)}([function(tt,et){tt.exports=propTypesExports},function(tt,et){tt.exports=reactExports},function(module,__webpack_exports__,__webpack_require__){__webpack_require__.r(__webpack_exports__),(function(module){var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(1),react__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__),prop_types__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(0),prop_types__WEBPACK_IMPORTED_MODULE_1___default=__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_1__),enterModule;function _typeof(tt){return(_typeof=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(et){return typeof et}:function(et){return et&&typeof Symbol=="function"&&et.constructor===Symbol&&et!==Symbol.prototype?"symbol":typeof et})(tt)}function _extends(){return(_extends=Object.assign||function(tt){for(var et=1;et"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}}function _getPrototypeOf(tt){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(et){return et.__proto__||Object.getPrototypeOf(et)})(tt)}function _defineProperty(tt,et,nt){return et in tt?Object.defineProperty(tt,et,{value:nt,enumerable:!0,configurable:!0,writable:!0}):tt[et]=nt,tt}enterModule=typeof reactHotLoaderGlobal<"u"?reactHotLoaderGlobal.enterModule:void 0,enterModule&&enterModule(module),typeof reactHotLoaderGlobal<"u"&&reactHotLoaderGlobal.default.signature;var ReactAudioPlayer=function(_Component){_inherits(ReactAudioPlayer,_Component);var _super=_createSuper(ReactAudioPlayer);function ReactAudioPlayer(){var tt;_classCallCheck(this,ReactAudioPlayer);for(var et=arguments.length,nt=new Array(et),rt=0;rt{const[et,nt,rt]=tt.split(":"),it=parseInt(et,10),ot=parseInt(nt,10),at=parseInt(rt,10);return it*3600+ot*60+at},Audio=styled$4(ReactAudioPlayer)` - width: 100%; -`,_AudioPlayer=({mediaUrl:tt,timestamp:et,play:nt,onLoaded:rt=lodashExports.noop,onError:it=lodashExports.noop,onPause:ot=lodashExports.noop,onPlay:at=lodashExports.noop})=>{const[st,lt]=reactExports.useState(!1),[ct,ut]=reactExports.useState(null);return reactExports.useEffect(()=>{lodashExports.isUndefined(nt)||!ct||(nt?ct.play():ct.pause())},[nt,ct]),reactExports.useEffect(()=>{const ht=document.getElementById("audio-player");ht&&ut(ht)},[]),reactExports.useEffect(()=>{if(ct)return ct.addEventListener("play",at),ct.addEventListener("pause",ot),()=>{ct.removeEventListener("play",at),ct.removeEventListener("pause",ot)}},[ot,at,ct]),reactExports.useEffect(()=>()=>{ot()},[ot]),reactExports.useEffect(()=>{ot()},[tt,ot]),reactExports.useEffect(()=>{ct&&(ct.currentTime=et?videoTimetoSeconds(et):0)},[et,ct]),jsxRuntimeExports.jsx(Flex,{children:st?jsxRuntimeExports.jsx(Text$3,{color:"primaryRed",kind:"medium",children:"Audio failed to load"}):jsxRuntimeExports.jsx(Audio,{controls:!0,id:"audio-player",onError:()=>{lt(!0),it()},onLoadedMetadata:()=>{lt(!1),rt()},src:tt,volume:1})})},AudioPlayer=reactExports.memo(_AudioPlayer);var ClipLoader$1={},unitConverter={};Object.defineProperty(unitConverter,"__esModule",{value:!0});unitConverter.cssValue=unitConverter.parseLengthAndUnit=void 0;var cssUnit={cm:!0,mm:!0,in:!0,px:!0,pt:!0,pc:!0,em:!0,ex:!0,ch:!0,rem:!0,vw:!0,vh:!0,vmin:!0,vmax:!0,"%":!0};function parseLengthAndUnit(tt){if(typeof tt=="number")return{value:tt,unit:"px"};var et,nt=(tt.match(/^[0-9.]*/)||"").toString();nt.includes(".")?et=parseFloat(nt):et=parseInt(nt,10);var rt=(tt.match(/[^0-9]*$/)||"").toString();return cssUnit[rt]?{value:et,unit:rt}:(console.warn("React Spinners: ".concat(tt," is not a valid css value. Defaulting to ").concat(et,"px.")),{value:et,unit:"px"})}unitConverter.parseLengthAndUnit=parseLengthAndUnit;function cssValue(tt){var et=parseLengthAndUnit(tt);return"".concat(et.value).concat(et.unit)}unitConverter.cssValue=cssValue;var animation={};Object.defineProperty(animation,"__esModule",{value:!0});animation.createAnimation=void 0;var createAnimation=function(tt,et,nt){var rt="react-spinners-".concat(tt,"-").concat(nt);if(typeof window>"u"||!window.document)return rt;var it=document.createElement("style");document.head.appendChild(it);var ot=it.sheet,at=` - @keyframes `.concat(rt,` { - `).concat(et,` + function _toConsumableArray(tt) { + return _arrayWithoutHoles(tt) || _iterableToArray(tt) || _unsupportedIterableToArray(tt) || _nonIterableSpread() + } + function _nonIterableSpread() { + throw new TypeError(`Invalid attempt to spread non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`) + } + function _unsupportedIterableToArray(tt, et) { + if (tt) { + if (typeof tt == 'string') return _arrayLikeToArray(tt, et) + var nt = Object.prototype.toString.call(tt).slice(8, -1) + if ((nt === 'Object' && tt.constructor && (nt = tt.constructor.name), nt === 'Map' || nt === 'Set')) + return Array.from(tt) + if (nt === 'Arguments' || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(nt)) return _arrayLikeToArray(tt, et) } - `);return ot&&ot.insertRule(at,0),rt};animation.createAnimation=createAnimation;var __assign=commonjsGlobal&&commonjsGlobal.__assign||function(){return __assign=Object.assign||function(tt){for(var et,nt=1,rt=arguments.length;nt{let et=await distExports$1.enable(!0);if(et||console.warn("Sphinx enable failed, means no pubkey and no budget (including budget of 0)"),et=await distExports$1.keysend(sphinxPubkey,tt),!(et!=null&&et.success)){if(et=await distExports$1.topup(),!(et!=null&&et.budget)||(et==null?void 0:et.budget){const nt=await boostAgainstBudget(et),rt={amount:et,refid:tt};return await api.post("/boost",JSON.stringify(rt)),nt},notify=tt=>{toast(jsxRuntimeExports.jsx(ToastMessage,{message:tt}),{icon:!1,position:toast.POSITION.BOTTOM_CENTER,type:tt===BOOST_SUCCESS?"success":"error"})},Booster=({count:tt=0,updateCount:et,content:nt,readOnly:rt,refId:it})=>{const[ot,at]=reactExports.useState(!1),[st,lt]=reactExports.useState(!1),[ct]=useUserStore(pt=>[pt.setBudget]);reactExports.useEffect(()=>{lt(!1),at(!1)},[it]);let{image_url:ut}=nt||{};ut&&(ut=ut.replace(".jpg","_l.jpg"));const ht=5;async function dt(){if(!(ot||!it)){at(!0);try{const pt=await boost(it,ht);lt(!0),notify(BOOST_SUCCESS),et&&et(tt+ht),pt.budget&&ct(pt.budget)}catch{notify(BOOST_ERROR_BUDGET)}at(!1)}}return rt?tt?jsxRuntimeExports.jsx(Pill,{className:"booster__pill",style:{padding:"1px 8px 1px 3px",width:"fit-content"},children:jsxRuntimeExports.jsxs(Flex,{align:"center",direction:"row",justify:"center",children:[jsxRuntimeExports.jsx(MdBolt,{fontSize:12}),jsxRuntimeExports.jsx("div",{style:{fontSize:10},children:tt||0})]})}):null:jsxRuntimeExports.jsx("div",{children:jsxRuntimeExports.jsx(Pill,{disabled:ot,onClick:async()=>{st||ot||await dt()},style:{padding:"4px 8px",borderWidth:0,backgroundColor:"#303342",height:"25px",width:"fit-content"},children:ot?jsxRuntimeExports.jsx(_default,{color:"#fff",loading:!0,size:10}):jsxRuntimeExports.jsxs(Flex,{align:"center",direction:"row",justify:"space-around",children:[jsxRuntimeExports.jsx(BoostIcon,{style:{color:colors.white}}),jsxRuntimeExports.jsx("div",{style:{marginLeft:8,marginRight:8},children:"Boost"})]})})})},defaultData={isPlaying:!1},usePlayerStore=react(tt=>({...defaultData,setIsPlaying:et=>tt({isPlaying:et})})),NotesIcon=tt=>jsxRuntimeExports.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 16 16",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsxs("g",{id:"notes",children:[jsxRuntimeExports.jsx("mask",{id:"mask0_1473_73722",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"16",height:"16",children:jsxRuntimeExports.jsx("rect",{id:"Bounding box",width:"1em",height:"1em",fill:"currentColor"})}),jsxRuntimeExports.jsx("g",{mask:"url(#mask0_1473_73722)",children:jsxRuntimeExports.jsx("path",{id:"notes_2",d:"M2.83337 11.7564C2.69171 11.7564 2.57296 11.7085 2.47712 11.6126C2.38129 11.5167 2.33337 11.3979 2.33337 11.2562C2.33337 11.1144 2.38129 10.9957 2.47712 10.9C2.57296 10.8043 2.69171 10.7564 2.83337 10.7564H9.16668C9.30834 10.7564 9.42709 10.8043 9.52293 10.9002C9.61876 10.9961 9.66668 11.1149 9.66668 11.2566C9.66668 11.3983 9.61876 11.5171 9.52293 11.6128C9.42709 11.7085 9.30834 11.7564 9.16668 11.7564H2.83337ZM2.83337 8.49997C2.69171 8.49997 2.57296 8.45204 2.47712 8.35617C2.38129 8.2603 2.33337 8.1415 2.33337 7.99977C2.33337 7.85804 2.38129 7.73931 2.47712 7.64359C2.57296 7.54787 2.69171 7.50001 2.83337 7.50001H13.1667C13.3083 7.50001 13.4271 7.54794 13.5229 7.64381C13.6188 7.73969 13.6667 7.85849 13.6667 8.00021C13.6667 8.14194 13.6188 8.26067 13.5229 8.35639C13.4271 8.45211 13.3083 8.49997 13.1667 8.49997H2.83337ZM2.83337 5.24357C2.69171 5.24357 2.57296 5.19564 2.47712 5.09976C2.38129 5.00389 2.33337 4.88509 2.33337 4.74336C2.33337 4.60164 2.38129 4.48291 2.47712 4.38719C2.57296 4.29146 2.69171 4.24359 2.83337 4.24359H13.1667C13.3083 4.24359 13.4271 4.29153 13.5229 4.38741C13.6188 4.48329 13.6667 4.60209 13.6667 4.74381C13.6667 4.88554 13.6188 5.00427 13.5229 5.09999C13.4271 5.19571 13.3083 5.24357 13.1667 5.24357H2.83337Z",fill:"currentColor"})})]})}),Description=({stateless:tt,node:et})=>jsxRuntimeExports.jsxs(Flex,{grow:1,shrink:1,children:[jsxRuntimeExports.jsx(Header$1,{children:tt&&jsxRuntimeExports.jsxs(Heading$2,{children:[jsxRuntimeExports.jsx("div",{className:"icon",children:jsxRuntimeExports.jsx(NotesIcon,{})}),jsxRuntimeExports.jsx("div",{className:"title",children:"Description"})]})}),jsxRuntimeExports.jsx(Box$1,{children:et!=null&&et.description?`"${et==null?void 0:et.description}"`:"..."})]}),Heading$2=styled$4(Flex).attrs({direction:"row",align:"center"})` - .icon { - font-size: 16px; - color: ${colors.GRAY3}; - margin-right: 7px; } - - .title { - color: ${colors.white}; - font-family: Barlow; - font-size: 10px; - font-style: normal; - font-weight: 700; - line-height: normal; - letter-spacing: 1px; - text-transform: uppercase; + function _iterableToArray(tt) { + if (typeof Symbol < 'u' && Symbol.iterator in Object(tt)) return Array.from(tt) } -`,Header$1=styled$4(Flex).attrs({direction:"row",align:"center",justify:"space-between"})` - margin-bottom: 18px; -`,Box$1=styled$4(Flex)` - color: ${colors.white}; - text-overflow: ellipsis; - whitespace: nowrap; - font-family: Barlow; - font-size: 13px; - font-style: normal; - font-weight: 400; - line-height: 18px; -`,CopyIcon=tt=>jsxRuntimeExports.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 14 14",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsxs("g",{id:"content_copy",children:[jsxRuntimeExports.jsx("mask",{id:"mask0_1489_75628",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"14",height:"14",children:jsxRuntimeExports.jsx("rect",{id:"Bounding box",width:"1em",height:"1em",fill:"currentColor"})}),jsxRuntimeExports.jsx("g",{mask:"url(#mask0_1489_75628)",children:jsxRuntimeExports.jsx("path",{id:"content_copy_2",d:"M5.28363 10.2083C4.98897 10.2083 4.73956 10.1063 4.5354 9.9021C4.33124 9.69793 4.22915 9.44852 4.22915 9.15385V2.51287C4.22915 2.21821 4.33124 1.96879 4.5354 1.76462C4.73956 1.56046 4.98897 1.45837 5.28363 1.45837H10.1746C10.4693 1.45837 10.7187 1.56046 10.9229 1.76462C11.127 1.96879 11.2291 2.21821 11.2291 2.51287V9.15385C11.2291 9.44852 11.127 9.69793 10.9229 9.9021C10.7187 10.1063 10.4693 10.2083 10.1746 10.2083H5.28363ZM5.28363 9.33336H10.1746C10.2195 9.33336 10.2606 9.31466 10.298 9.27727C10.3354 9.23987 10.3541 9.19873 10.3541 9.15385V2.51287C10.3541 2.46799 10.3354 2.42685 10.298 2.38945C10.2606 2.35206 10.2195 2.33336 10.1746 2.33336H5.28363C5.23875 2.33336 5.19762 2.35206 5.16023 2.38945C5.12282 2.42685 5.10412 2.46799 5.10412 2.51287V9.15385C5.10412 9.19873 5.12282 9.23987 5.16023 9.27727C5.19762 9.31466 5.23875 9.33336 5.28363 9.33336ZM3.24198 12.25C2.94733 12.25 2.69792 12.1479 2.49375 11.9437C2.28958 11.7396 2.1875 11.4902 2.1875 11.1955V3.67953H3.06249V11.1955C3.06249 11.2404 3.08118 11.2815 3.11857 11.3189C3.15597 11.3563 3.19711 11.375 3.24198 11.375H9.00796V12.25H3.24198Z",fill:"currentColor"})})]})}),copyNodeText=tt=>{if(tt===void 0)return;navigator.clipboard.writeText(tt);const et=document.querySelector(".copy-button");et&&(et.classList.add("copied"),setTimeout(()=>{et.classList.remove("copied")},1e3))},Transcript=({stateless:tt,node:et})=>{const[nt,rt]=useAppStore(it=>[it.transcriptIsOpen,it.setTranscriptOpen]);return!tt&&!nt?null:jsxRuntimeExports.jsxs(Flex,{grow:1,shrink:1,children:[jsxRuntimeExports.jsxs(Header,{children:[tt&&jsxRuntimeExports.jsxs(Heading$1,{children:[jsxRuntimeExports.jsx("div",{className:"icon",children:jsxRuntimeExports.jsx(NotesIcon,{})}),jsxRuntimeExports.jsx("div",{className:"title",children:"Transcript"})]}),et!=null&&et.text?jsxRuntimeExports.jsx(Button$2,{endIcon:jsxRuntimeExports.jsx(CopyIcon,{}),onPointerDown:()=>copyNodeText(et==null?void 0:et.text),size:"small",variant:"outlined",children:"Copy"}):jsxRuntimeExports.jsx("div",{}),!tt&&jsxRuntimeExports.jsx(CloseButton$1,{onClick:()=>{rt(!1)},children:jsxRuntimeExports.jsx(MdClose,{fontSize:35})})]}),jsxRuntimeExports.jsx(Box,{children:et!=null&&et.text?`"${et==null?void 0:et.text}"`:"..."})]})},Heading$1=styled$4(Flex).attrs({direction:"row",align:"center"})` - .icon { - font-size: 16px; - color: ${colors.GRAY3}; - margin-right: 7px; + function _arrayWithoutHoles(tt) { + if (Array.isArray(tt)) return _arrayLikeToArray(tt) } - - .title { - color: ${colors.white}; - font-family: Barlow; - font-size: 10px; - font-style: normal; - font-weight: 700; - line-height: normal; - letter-spacing: 1px; - text-transform: uppercase; + function _arrayLikeToArray(tt, et) { + ;(et == null || et > tt.length) && (et = tt.length) + for (var nt = 0, rt = new Array(et); nt < et; nt++) rt[nt] = tt[nt] + return rt } -`,Header=styled$4(Flex).attrs({direction:"row",align:"center",justify:"space-between"})` - margin-bottom: 18px; -`,CloseButton$1=styled$4(Flex).attrs({})` - color: ${colors.mainBottomIcons}; - cursor: pointer; - &:hover { - color: ${colors.lightBlue500}; + function _classCallCheck(tt, et) { + if (!(tt instanceof et)) throw new TypeError('Cannot call a class as a function') } -`,Box=styled$4(Flex)` - color: ${colors.white}; - text-overflow: ellipsis; - whitespace: nowrap; - font-family: Barlow; - font-size: 13px; - font-style: normal; - font-weight: 400; - line-height: 18px; -`,Wrapper$8=styled$4(Flex)` - flex: 1; - min-height: 100%; - flex-direction: column; - border-bottom: 1px solid #101317; - box-shadow: 0px 5px 6px rgba(0, 0, 0, 0.5); - z-index: 0; -`,PlayerWrapper$1=styled$4(Flex)` - padding: 30px 18px 0; -`,StyledDivider$1=styled$4(Divider$3)` - margin: auto 0px 2px 0px; - opacity: 75%; -`,StyledEpisode$1=styled$4(Episode)` - & { - border-top: none; - padding-bottom: 18px; - font-size: 16px; + function _defineProperties(tt, et) { + for (var nt = 0; nt < et.length; nt++) { + var rt = et[nt] + ;(rt.enumerable = rt.enumerable || !1), + (rt.configurable = !0), + 'value' in rt && (rt.writable = !0), + Object.defineProperty(tt, rt.key, rt) + } } -`,_AudioClip=()=>{const tt=useSelectedNode(),et=useIsMatchBreakpoint("sm","down"),nt=usePlayerStore(xt=>xt.isPlaying),rt=usePlayerStore(xt=>xt.setIsPlaying),it=reactExports.useRef(null),{image_url:ot,show_title:at,date:st,boost:lt,type:ct,id:ut,ref_id:ht,episode_title:dt}=tt||{},[pt,mt]=reactExports.useState(lt||0);reactExports.useEffect(()=>()=>{rt(!1),it.current&&it.current.scrollTo({top:0,behavior:"auto"})},[rt]);const gt=reactExports.useCallback(()=>{setIsTimestampLoaded(!0)},[]),yt=reactExports.useCallback(()=>{setIsTimestampLoaded(!0)},[]),bt=reactExports.useCallback(()=>rt(!1),[rt]),vt=reactExports.useCallback(()=>rt(!0),[rt]);return jsxRuntimeExports.jsxs(Wrapper$8,{children:[jsxRuntimeExports.jsxs(PlayerWrapper$1,{children:[jsxRuntimeExports.jsx(Flex,{direction:"row",children:jsxRuntimeExports.jsx(Flex,{direction:"row",grow:1,justify:"center",shrink:1,children:jsxRuntimeExports.jsx(Avatar$1,{size:et?45:188,src:(tt==null?void 0:tt.image_url)||"audio_default.svg",type:"audio"})})}),jsxRuntimeExports.jsx(Flex,{pt:10,children:jsxRuntimeExports.jsx(AudioPlayer,{mediaUrl:(tt==null?void 0:tt.link)||"",onError:gt,onLoaded:yt,onPause:bt,onPlay:vt,play:nt,timestamp:(tt==null?void 0:tt.timestamp)||""})})]}),jsxRuntimeExports.jsx(StyledEpisode$1,{boostCount:lt||0,date:st||0,episodeTitle:formatDescription(dt),id:ut,imageUrl:ot||"audio_default.svg",isSelectedView:!0,onClick:()=>null,showTitle:formatDescription(at),type:ct}),jsxRuntimeExports.jsx(StyledDivider$1,{}),jsxRuntimeExports.jsxs("div",{ref:it,style:{overflow:"auto",flex:1,width:"100%"},children:[jsxRuntimeExports.jsxs(BoostWrapper$1,{children:[jsxRuntimeExports.jsx(BoostAmt,{amt:pt}),jsxRuntimeExports.jsx(Booster,{content:tt,count:pt,refId:ht,updateCount:mt})]}),jsxRuntimeExports.jsx(StyledDivider$1,{}),jsxRuntimeExports.jsx(TextWrapper$1,{children:jsxRuntimeExports.jsx(Description,{node:tt,stateless:!0})}),jsxRuntimeExports.jsx(StyledDivider$1,{}),jsxRuntimeExports.jsx(TextWrapper$1,{children:jsxRuntimeExports.jsx(Transcript,{node:tt,stateless:!0})})]})]})},AudioClip=reactExports.memo(_AudioClip),BoostWrapper$1=styled$4(Flex)` - flex-direction: row; - justify-content: space-between; - padding: 18px 18px 18px; -`,TextWrapper$1=styled$4(Flex)` - padding: 18px 18px 18px; -`,Divider=styled$4(Flex)` - background: ${colors.divider2}; - height: 1px; - margin: auto 22px; -`,getSelectedNodeTimestamps=(tt,et)=>{if(!et)return null;const nt=tt.filter(ot=>ot.show_title&&ot.link&&ot.show_title===et.show_title&&ot.episode_title===et.episode_title),rt=lodashExports.groupBy(nt,ot=>ot.timestamp),it=lodashExports.values(rt).reduce((ot,at)=>(at[0]&&ot.push(at[0]),ot),[]);return it.sort((ot,at)=>{var ht,dt;const[st]=((ht=ot.timestamp)==null?void 0:ht.split("-"))||[""],[lt]=((dt=at.timestamp)==null?void 0:dt.split("-"))||[""],ct=videoTimetoSeconds(st),ut=videoTimetoSeconds(lt);return ct-ut}),it},ErrorWrapper=styled$4(Flex)` - padding: 10px; - border-bottom: 1px solid ${colors.divider2}; -`,ErrorMsgWrapper=styled$4.textarea` - resize: none; - margin-bottom: 5px; -`,ErrorSection=()=>{const tt=useSelectedNode(),[et,nt]=reactExports.useState(""),[rt,it]=reactExports.useState(""),ot=useAppStore(st=>st.setFlagErrorOpen),at=async()=>{const st={content_node_ref_id:tt==null?void 0:tt.ref_id,message:et};await distExports$1.enable(!0)||console.warn("Sphinx enable failed");try{const ct=await api.post("/prediction/feedback",JSON.stringify(st));if(ct.error){const{message:ut}=ct.error;throw new Error(ut)}nt(""),it("Sent successfully")}catch(ct){ct instanceof Error&&it(ct.message||"Failed to send")}};return reactExports.useEffect(()=>{et||it("")},[et]),jsxRuntimeExports.jsxs(ErrorWrapper,{children:[jsxRuntimeExports.jsx(Flex,{align:"center",justify:"center",p:6,children:jsxRuntimeExports.jsx(Text$3,{color:"white",kind:"medium",children:"Report Error"})}),jsxRuntimeExports.jsx(ErrorMsgWrapper,{cols:1,onChange:st=>{const{value:lt}=st.target;nt(lt)},placeholder:"flag incorrect information (misspelled words, etc)",rows:10,value:et}),jsxRuntimeExports.jsxs(Flex,{direction:"row",justify:"flex-end",p:8,children:[rt&&jsxRuntimeExports.jsx(Flex,{justify:"center",pb:3,style:{color:rt==="Sent successfully"?colors.green400:"#FF8F80",marginRight:"20px"},children:rt}),jsxRuntimeExports.jsx(Pill,{disabled:!et,onClick:at,children:"Send"}),jsxRuntimeExports.jsx(Pill,{onClick:()=>{ot(!1),nt("")},children:"Cancel"})]})]})},FlagError=styled$4(Flex)` - color: ${({flagErrorIsOpen:tt})=>tt?colors.lightBlue200:colors.white}; - padding: 0 0 0 8px; - &:hover { - cursor: pointer; - color: ${colors.lightBlue200}; + function _createClass(tt, et, nt) { + return et && _defineProperties(tt.prototype, et), nt && _defineProperties(tt, nt), tt } -`,Actions=({transcript:tt})=>{const[et,nt]=useAppStore(at=>[at.transcriptIsOpen,at.setTranscriptOpen]),[rt,it]=useAppStore(at=>[at.flagErrorIsOpen,at.setFlagErrorOpen]),ot=useDataStore(at=>at.selectedNode);return jsxRuntimeExports.jsxs(Flex,{align:"center",direction:"row",justify:"space-between",children:[jsxRuntimeExports.jsxs(Flex,{align:"center",direction:"row",children:[tt&&jsxRuntimeExports.jsx(Pill,{onClick:()=>nt(!et),selected:et,style:{padding:"4px 8px"},children:"Transcript"}),jsxRuntimeExports.jsx(Flex,{pl:10,children:jsxRuntimeExports.jsx(Booster,{content:ot,refId:ot==null?void 0:ot.id})})]}),jsxRuntimeExports.jsx(FlagError,{flagErrorIsOpen:rt,onClick:()=>it(!rt),children:jsxRuntimeExports.jsx(MdOutlinedFlag,{fontSize:20})})]})},Wrapper$7=styled$4(Flex)` - flex-direction: column; - border-bottom: 1px solid #101317; - box-shadow: 0px 5px 6px rgba(0, 0, 0, 0.5); - z-index: 0; -`,Heading=()=>{const tt=useSelectedNode(),et=useDataStore(nt=>nt.selectedTimestamp);return reactExports.useEffect(()=>{if(!et)return;const{timestamp:nt}=et,rt=document.getElementById("audio-player");rt&&(rt.currentTime=nt?videoTimetoSeconds(nt):0)},[et]),jsxRuntimeExports.jsxs(Wrapper$7,{p:20,children:[jsxRuntimeExports.jsxs(Flex,{direction:"row",children:[jsxRuntimeExports.jsx(Flex,{pr:24,children:jsxRuntimeExports.jsx(Avatar$1,{size:80,src:(tt==null?void 0:tt.image_url)||"audio_default.svg",type:"person"})}),jsxRuntimeExports.jsxs(Flex,{grow:1,shrink:1,children:[jsxRuntimeExports.jsx(Text$3,{kind:"heading",children:(tt==null?void 0:tt.show_title)||"Unknown"}),jsxRuntimeExports.jsx(Flex,{pt:10,children:jsxRuntimeExports.jsx(Text$3,{color:"mainBottomIcons",kind:"regular",children:tt==null?void 0:tt.episode_title})})]})]}),jsxRuntimeExports.jsx(Flex,{pb:10,pt:30,children:jsxRuntimeExports.jsx(Actions,{transcript:!0})}),jsxRuntimeExports.jsx(Flex,{pt:10,children:jsxRuntimeExports.jsx(AudioPlayer,{mediaUrl:(et==null?void 0:et.link)||"",onError:()=>{setIsTimestampLoaded(!0)},onLoaded:()=>{setIsTimestampLoaded(!0)},timestamp:(et==null?void 0:et.timestamp)||""})})]})},formatTimestamp=tt=>{const[et,nt]=tt.split("-")||["",""];return parseInt(nt,10)!==0?`${et} - ${nt}`:et},Wrapper$6=styled$4(Flex).attrs(({isSelected:tt})=>({background:tt?"lightBlue100":"body",direction:"row"}))` - cursor: pointer; - color: ${colors.primaryText1}; - - ${({isSelected:tt})=>!tt&&Ae` - &:hover { - background: ${colors.dashboardHeader}; - } - `} -`,Timestamp=({onClick:tt,timestamp:et})=>{const nt=useDataStore(st=>st.selectedTimestamp),rt=useDataStore(st=>st.isTimestampLoaded),it=!!(nt&&nt.timestamp===et.timestamp),ot=it?"blueTextAccent":"placeholderText",at=it?jsxRuntimeExports.jsx(MdPlayArrow,{color:colors[ot],fontSize:18}):jsxRuntimeExports.jsx(MdAccessTime,{color:colors[ot],fontSize:18});return jsxRuntimeExports.jsxs(Wrapper$6,{isSelected:it,onClick:tt,px:20,py:12,children:[jsxRuntimeExports.jsx(Flex,{direction:"row",px:20,children:it&&!rt?jsxRuntimeExports.jsx(ClipLoader$2,{color:colors[ot],loading:!0,size:14}):at}),jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsxs(Flex,{align:"center",direction:"row",children:[et.timestamp&&jsxRuntimeExports.jsx(Text$3,{color:"primaryText1",kind:it?"mediumBold":"medium",children:formatTimestamp(et.timestamp)}),!!et.boost&&jsxRuntimeExports.jsx(Flex,{pl:10,children:jsxRuntimeExports.jsx(Booster,{count:et.boost,readOnly:!0})})]}),jsxRuntimeExports.jsx(Flex,{pt:4,children:jsxRuntimeExports.jsx(Text$3,{color:it?"blueTextAccent":"mainBottomIcons",kind:it?"regularBold":"regular",children:formatDescription(et.description)})})]})]})},Creator=()=>{const tt=useGraphData(),et=useSelectedNode(),nt=reactExports.useMemo(()=>getSelectedNodeTimestamps((tt==null?void 0:tt.nodes)||[],et),[tt==null?void 0:tt.nodes,et]),rt=useDataStore(ot=>ot.setSelectedTimestamp),it=useAppStore(ot=>ot.flagErrorIsOpen);return reactExports.useEffect(()=>{nt!=null&&nt.length&&rt(nt[0])},[nt,rt]),et?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Heading,{}),it&&jsxRuntimeExports.jsx(ErrorSection,{}),!!(nt!=null&&nt.length)&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Flex,{pb:20,children:nt==null?void 0:nt.map((ot,at)=>jsxRuntimeExports.jsx(Timestamp,{onClick:()=>rt(ot),timestamp:ot},`${ot.episode_title}_${at}`))}),jsxRuntimeExports.jsx(Divider,{})]})]}):null},RenderDot=({cx:tt,cy:et})=>jsxRuntimeExports.jsx(Dot,{cx:tt,cy:et,fill:colors.blueTextAccent,r:2}),Data=()=>{const tt=useSelectedNode(),et=[...(tt==null?void 0:tt.data)||[]].sort((it,ot)=>(it.year||0)-(ot.year||0)),nt=et.map(it=>it.year).filter(it=>it),rt=et.map(it=>it.rate).filter(it=>it);return jsxRuntimeExports.jsx(StyledFlex,{direction:"column",px:24,py:16,children:jsxRuntimeExports.jsx(ResponsiveContainer,{height:"100%",width:"100%",children:jsxRuntimeExports.jsxs(ScatterChart,{margin:{bottom:20,left:20,right:20,top:20},children:[jsxRuntimeExports.jsx(CartesianGrid,{stroke:"#f5f5f5"}),jsxRuntimeExports.jsx(XAxis,{dataKey:"year",domain:[Math.min(...nt),Math.max(...nt)],label:{fill:colors.white,fontSize:"12px",offset:-10,position:"insideBottom",value:tt.x_axis_name},name:"X",tick:{fill:colors.white,fontSize:"8px"},type:"number"}),jsxRuntimeExports.jsx(YAxis,{color:"#000",dataKey:"rate",domain:[Math.min(...rt),Math.max(...rt)],label:{angle:-90,fill:colors.white,fontSize:"12px",offset:0,position:"insideLeft",value:tt.y_axis_name},name:"Y",tick:{fill:colors.white,fontSize:"8px"},type:"number"}),jsxRuntimeExports.jsx(Tooltip,{cursor:{strokeDasharray:"3 3"}}),jsxRuntimeExports.jsx(Scatter,{data:et,fill:colors.blueTextAccent,line:!0,name:"A scatter",shape:jsxRuntimeExports.jsx(RenderDot,{})})]})})})},StyledFlex=styled$4(Flex)` - width: 100%; - height: 100%; -`,convertToChatMessage=tt=>{const et=/((http|https):\/\/[^\s]+)/g,nt=/@(\w+)/g;let rt=tt.replace(/\\/g,"");return rt=rt.replace(/'/g,"’"),rt=rt.replace(/\n/g,"
"),rt=rt.replace(et,'$1'),rt=rt.replace(nt,'@$1'),rt},Messages=()=>{const{sender_pic:tt,sender_alias:et,date:nt,message_content:rt}=useSelectedNode()||{};return jsxRuntimeExports.jsxs(Flex,{direction:"row",children:[jsxRuntimeExports.jsx(Avatar,{src:tt}),jsxRuntimeExports.jsxs(MessageWrapper,{children:[jsxRuntimeExports.jsxs(Flex,{align:"flex-end",className:"info",direction:"row",children:[et&&jsxRuntimeExports.jsx("span",{className:"info__name",children:et}),nt&&jsxRuntimeExports.jsx("span",{className:"info__date",children:nt})]}),rt&&jsxRuntimeExports.jsx(Message,{dangerouslySetInnerHTML:{__html:convertToChatMessage(rt)}})]})]})},MessageWrapper=styled$4(Flex)` - color: ${colors.black}; - border-radius: 8px; - font-size: 20px; - margin-left: 8px; - flex: 1; - - .info__date { - color: ${colors.textMessages}; - font-size: 14px; - margin-left: 8px; + function _inherits(tt, et) { + if (typeof et != 'function' && et !== null) + throw new TypeError('Super expression must either be null or a function') + ;(tt.prototype = Object.create(et && et.prototype, { constructor: { value: tt, writable: !0, configurable: !0 } })), + et && _setPrototypeOf(tt, et) } - - .info__name { - color: ${colors.green400}; - font-size: 16px; + function _setPrototypeOf(tt, et) { + return ( + (_setPrototypeOf = + Object.setPrototypeOf || + function (rt, it) { + return (rt.__proto__ = it), rt + }), + _setPrototypeOf(tt, et) + ) } -`,Message=styled$4.div` - background: ${colors.white}; - border-radius: 8px; - padding: 16px; - position: relative; - &:before { - content: ''; - width: 0; - height: 0; - border-left: 10px solid transparent; - border-right: 10px solid transparent; - border-top: 10px solid ${colors.white}; - position: absolute; - left: -6px; - top: 0; + function _createSuper(tt) { + var et = _isNativeReflectConstruct() + return function () { + var rt = _getPrototypeOf(tt), + it + if (et) { + var ot = _getPrototypeOf(this).constructor + it = Reflect.construct(rt, arguments, ot) + } else it = rt.apply(this, arguments) + return _possibleConstructorReturn(this, it) + } } - - .username { - color: ${colors.blueTextAccent}; + function _possibleConstructorReturn(tt, et) { + return et && (_typeof(et) === 'object' || typeof et == 'function') ? et : _assertThisInitialized(tt) } - - a { - color: ${colors.blueTextAccent}; - text-decoration: none; + function _assertThisInitialized(tt) { + if (tt === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called") + return tt } - - a:hover, - a:visited { - color: ${colors.blueTextAccent}; - text-decoration: none; + function _isNativeReflectConstruct() { + 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 + } } -`,Avatar=styled$4.img` - width: 40px; - height: 40px; - border-radius: 50%; - background: green; -`,Person=()=>{const tt=useSelectedNode();return jsxRuntimeExports.jsxs(Flex,{direction:"row",px:24,py:16,children:[jsxRuntimeExports.jsx(Avatar$1,{size:80,src:(tt==null?void 0:tt.image_url)||"person_placeholder2.png",type:"person"}),jsxRuntimeExports.jsx(Flex,{p:20,children:jsxRuntimeExports.jsx(Text$3,{color:"primaryText1",kind:"bigHeading",children:tt==null?void 0:tt.label})})]})},Wrapper$5=styled$4(Flex)` - flex: 1; - min-height: 100%; - flex-direction: column; - border-bottom: 1px solid #101317; - box-shadow: 0px 5px 6px rgba(0, 0, 0, 0.5); - z-index: 0; -`,EpisodeWrapper=styled$4(Flex).attrs(()=>({direction:"row"}))` - cursor: pointer; - color: ${colors.primaryText1}; -`,EpisodePanel=({node:tt,onClick:et})=>{var nt;return jsxRuntimeExports.jsx(EpisodeWrapper,{onClick:et,py:12,children:jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx(Flex,{align:"center",direction:"row",children:jsxRuntimeExports.jsx(Text$3,{color:"primaryText1",kind:"regular",children:tt.episode_title})}),jsxRuntimeExports.jsx(Flex,{pt:4,children:jsxRuntimeExports.jsxs(Text$3,{color:"mainBottomIcons",kind:"regular",children:[((nt=tt==null?void 0:tt.children)==null?void 0:nt.length)||0," clips"]})})]})})},Show=()=>{const[tt,et]=useDataStore(it=>[it.selectedNode,it.setSelectedNode]),nt=useGraphData(),rt=reactExports.useMemo(()=>{var ot;const it={};return(ot=tt==null?void 0:tt.children)!=null&&ot.length&&tt.children.forEach(at=>{const st=nt.nodes.find(lt=>lt.ref_id===at);st&&(it[at]=st)}),Object.values(it).filter(at=>at.node_type==="episode").sort((at,st)=>(st.weight||0)-(at.weight||0))},[nt.nodes,tt]);return jsxRuntimeExports.jsxs(Wrapper$5,{p:20,children:[jsxRuntimeExports.jsxs(Flex,{direction:"row",children:[jsxRuntimeExports.jsx(Flex,{pr:24,children:jsxRuntimeExports.jsx(Avatar$1,{size:80,src:(tt==null?void 0:tt.image_url)||"audio_default.svg",type:"audio"})}),jsxRuntimeExports.jsxs(Flex,{grow:1,shrink:1,children:[jsxRuntimeExports.jsx(Text$3,{kind:"bigHeading",children:(tt==null?void 0:tt.show_title)||"Unknown"}),jsxRuntimeExports.jsx(Flex,{py:16,children:jsxRuntimeExports.jsx(Actions,{})})]})]}),jsxRuntimeExports.jsxs(Flex,{direction:"column",pt:40,children:[jsxRuntimeExports.jsx(Flex,{pb:20,children:jsxRuntimeExports.jsx(Text$3,{kind:"mediumBold",children:"Related Episodes"})}),rt.map(it=>jsxRuntimeExports.jsx(EpisodePanel,{node:it,onClick:()=>et(it)},it.ref_id))]})]})},Topic=()=>{const tt=useSelectedNode();return jsxRuntimeExports.jsx(Flex,{align:"center",justify:"center",children:jsxRuntimeExports.jsx(Text$3,{color:"primaryText1",kind:"hugeHeading",children:tt==null?void 0:tt.label})})},TwitData=()=>{const tt=useSelectedNode(),et=(tt==null?void 0:tt.tweet_id)||"";return tt&&jsxRuntimeExports.jsxs(Flex,{direction:"column",px:24,py:16,children:[jsxRuntimeExports.jsx(Flex,{align:"center",direction:"row",justify:"flex-start",p:10,children:jsxRuntimeExports.jsx(Text$3,{color:"primaryText1",children:tt==null?void 0:tt.label})}),et&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs(TweetContainer,{children:[jsxRuntimeExports.jsxs(Flex,{direction:"row",children:[jsxRuntimeExports.jsx(ProfilePicture,{children:jsxRuntimeExports.jsx("img",{alt:"Profile",src:tt.profile_picture||"twitter_placeholder.png"})}),jsxRuntimeExports.jsxs(AuthorInfo,{children:[jsxRuntimeExports.jsx(AuthorName,{children:tt.name}),jsxRuntimeExports.jsx(TwitterHandle,{children:tt.twitter_handle||"@unknown_handle"})]})]}),jsxRuntimeExports.jsx(TweetText,{children:tt.text})]}),jsxRuntimeExports.jsx(Flex,{align:"center",children:jsxRuntimeExports.jsx("a",{href:`https://twitter.com/Interior/status/${et}?open=system`,children:jsxRuntimeExports.jsx(Button$2,{children:"View comments "})})})]})]})},TweetContainer=styled$4.div` - padding: 10px; - border-radius: 6px; - display: flex; - flex-direction: column; - background: ${colors.BG1}; -`,ProfilePicture=styled$4.div` - width: 50px; - height: 50px; - border-radius: 6px; - overflow: hidden; - margin-right: 10px; - flex: 1 1 50px; - max-width: 50px; - margin-bottom: 16px; - - img { - width: 100%; - height: 100%; + function _getPrototypeOf(tt) { + return ( + (_getPrototypeOf = Object.setPrototypeOf + ? Object.getPrototypeOf + : function (nt) { + return nt.__proto__ || Object.getPrototypeOf(nt) + }), + _getPrototypeOf(tt) + ) } -`,AuthorInfo=styled$4.div` - display: flex; - align-items: flex-start; - justify-content: flex-start; - margin-bottom: 5px; - flex-direction: column; -`,AuthorName=styled$4.span` - font-family: Barlow; - font-weight: 700; - color: ${colors.white}; -`,TwitterHandle=styled$4.span` - color: ${colors.PRIMARY_BLUE}; -`,TweetText=styled$4.p` - font-family: Barlow; - font-size: 16px; - font-style: normal; - font-weight: 500; - line-height: 21px; - color: ${colors.white}; -`,Twitter=()=>jsxRuntimeExports.jsx("div",{children:"Twitter"});var lib={},players={},utils={},loadScript=function tt(et,nt,rt){var it=document.head||document.getElementsByTagName("head")[0],ot=document.createElement("script");typeof nt=="function"&&(rt=nt,nt={}),nt=nt||{},rt=rt||function(){},ot.type=nt.type||"text/javascript",ot.charset=nt.charset||"utf8",ot.async="async"in nt?!!nt.async:!0,ot.src=et,nt.attrs&&setAttributes(ot,nt.attrs),nt.text&&(ot.text=""+nt.text);var at="onload"in ot?stdOnEnd:ieOnEnd;at(ot,rt),ot.onload||stdOnEnd(ot,rt),it.appendChild(ot)};function setAttributes(tt,et){for(var nt in et)tt.setAttribute(nt,et[nt])}function stdOnEnd(tt,et){tt.onload=function(){this.onerror=this.onload=null,et(null,tt)},tt.onerror=function(){this.onerror=this.onload=null,et(new Error("Failed to load "+this.src),tt)}}function ieOnEnd(tt,et){tt.onreadystatechange=function(){this.readyState!="complete"&&this.readyState!="loaded"||(this.onreadystatechange=null,et(null,tt))}}var isMergeableObject=function tt(et){return isNonNullObject(et)&&!isSpecial(et)};function isNonNullObject(tt){return!!tt&&typeof tt=="object"}function isSpecial(tt){var et=Object.prototype.toString.call(tt);return et==="[object RegExp]"||et==="[object Date]"||isReactElement(tt)}var canUseSymbol=typeof Symbol=="function"&&Symbol.for,REACT_ELEMENT_TYPE=canUseSymbol?Symbol.for("react.element"):60103;function isReactElement(tt){return tt.$$typeof===REACT_ELEMENT_TYPE}function emptyTarget(tt){return Array.isArray(tt)?[]:{}}function cloneUnlessOtherwiseSpecified(tt,et){return et.clone!==!1&&et.isMergeableObject(tt)?deepmerge(emptyTarget(tt),tt,et):tt}function defaultArrayMerge(tt,et,nt){return tt.concat(et).map(function(rt){return cloneUnlessOtherwiseSpecified(rt,nt)})}function getMergeFunction(tt,et){if(!et.customMerge)return deepmerge;var nt=et.customMerge(tt);return typeof nt=="function"?nt:deepmerge}function getEnumerableOwnPropertySymbols(tt){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(tt).filter(function(et){return Object.propertyIsEnumerable.call(tt,et)}):[]}function getKeys(tt){return Object.keys(tt).concat(getEnumerableOwnPropertySymbols(tt))}function propertyIsOnObject(tt,et){try{return et in tt}catch{return!1}}function propertyIsUnsafe(tt,et){return propertyIsOnObject(tt,et)&&!(Object.hasOwnProperty.call(tt,et)&&Object.propertyIsEnumerable.call(tt,et))}function mergeObject(tt,et,nt){var rt={};return nt.isMergeableObject(tt)&&getKeys(tt).forEach(function(it){rt[it]=cloneUnlessOtherwiseSpecified(tt[it],nt)}),getKeys(et).forEach(function(it){propertyIsUnsafe(tt,it)||(propertyIsOnObject(tt,it)&&nt.isMergeableObject(et[it])?rt[it]=getMergeFunction(it,nt)(tt[it],et[it],nt):rt[it]=cloneUnlessOtherwiseSpecified(et[it],nt))}),rt}function deepmerge(tt,et,nt){nt=nt||{},nt.arrayMerge=nt.arrayMerge||defaultArrayMerge,nt.isMergeableObject=nt.isMergeableObject||isMergeableObject,nt.cloneUnlessOtherwiseSpecified=cloneUnlessOtherwiseSpecified;var rt=Array.isArray(et),it=Array.isArray(tt),ot=rt===it;return ot?rt?nt.arrayMerge(tt,et,nt):mergeObject(tt,et,nt):cloneUnlessOtherwiseSpecified(et,nt)}deepmerge.all=function tt(et,nt){if(!Array.isArray(et))throw new Error("first argument should be an array");return et.reduce(function(rt,it){return deepmerge(rt,it,nt)},{})};var deepmerge_1=deepmerge,cjs=deepmerge_1;Object.defineProperty(utils,"__esModule",{value:!0});utils.parseStartTime=parseStartTime;utils.parseEndTime=parseEndTime;utils.randomString=randomString;utils.queryString=queryString;utils.getSDK=getSDK;utils.getConfig=getConfig;utils.omit=omit;utils.callPlayer=callPlayer;utils.isMediaStream=isMediaStream;utils.isBlobUrl=isBlobUrl;utils.supportsWebKitPresentationMode=supportsWebKitPresentationMode;var _loadScript=_interopRequireDefault$2(loadScript),_deepmerge$1=_interopRequireDefault$2(cjs);function _interopRequireDefault$2(tt){return tt&&tt.__esModule?tt:{default:tt}}function _slicedToArray(tt,et){return _arrayWithHoles(tt)||_iterableToArrayLimit(tt,et)||_unsupportedIterableToArray$2(tt,et)||_nonIterableRest()}function _nonIterableRest(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _unsupportedIterableToArray$2(tt,et){if(tt){if(typeof tt=="string")return _arrayLikeToArray$2(tt,et);var nt=Object.prototype.toString.call(tt).slice(8,-1);if(nt==="Object"&&tt.constructor&&(nt=tt.constructor.name),nt==="Map"||nt==="Set")return Array.from(tt);if(nt==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(nt))return _arrayLikeToArray$2(tt,et)}}function _arrayLikeToArray$2(tt,et){(et==null||et>tt.length)&&(et=tt.length);for(var nt=0,rt=new Array(et);nt"u"||!(Symbol.iterator in Object(tt)))){var nt=[],rt=!0,it=!1,ot=void 0;try{for(var at=tt[Symbol.iterator](),st;!(rt=(st=at.next()).done)&&(nt.push(st.value),!(et&&nt.length===et));rt=!0);}catch(lt){it=!0,ot=lt}finally{try{!rt&&at.return!=null&&at.return()}finally{if(it)throw ot}}return nt}}function _arrayWithHoles(tt){if(Array.isArray(tt))return tt}var MATCH_START_QUERY=/[?&#](?:start|t)=([0-9hms]+)/,MATCH_END_QUERY=/[?&#]end=([0-9hms]+)/,MATCH_START_STAMP=/(\d+)(h|m|s)/g,MATCH_NUMERIC=/^\d+$/;function parseTimeParam(tt,et){if(!(tt instanceof Array)){var nt=tt.match(et);if(nt){var rt=nt[1];if(rt.match(MATCH_START_STAMP))return parseTimeString(rt);if(MATCH_NUMERIC.test(rt))return parseInt(rt)}}}function parseTimeString(tt){for(var et=0,nt=MATCH_START_STAMP.exec(tt);nt!==null;){var rt=nt,it=_slicedToArray(rt,3),ot=it[1],at=it[2];at==="h"&&(et+=parseInt(ot,10)*60*60),at==="m"&&(et+=parseInt(ot,10)*60),at==="s"&&(et+=parseInt(ot,10)),nt=MATCH_START_STAMP.exec(tt)}return et}function parseStartTime(tt){return parseTimeParam(tt,MATCH_START_QUERY)}function parseEndTime(tt){return parseTimeParam(tt,MATCH_END_QUERY)}function randomString(){return Math.random().toString(36).substr(2,5)}function queryString(tt){return Object.keys(tt).map(function(et){return"".concat(et,"=").concat(tt[et])}).join("&")}function getGlobal(tt){return window[tt]?window[tt]:window.exports&&window.exports[tt]?window.exports[tt]:window.module&&window.module.exports&&window.module.exports[tt]?window.module.exports[tt]:null}var requests={};function getSDK(tt,et){var nt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,rt=arguments.length>3&&arguments[3]!==void 0?arguments[3]:function(){return!0},it=arguments.length>4&&arguments[4]!==void 0?arguments[4]:_loadScript.default,ot=getGlobal(et);return ot&&rt(ot)?Promise.resolve(ot):new Promise(function(at,st){if(requests[tt]){requests[tt].push({resolve:at,reject:st});return}requests[tt]=[{resolve:at,reject:st}];var lt=function(ht){requests[tt].forEach(function(dt){return dt.resolve(ht)})};if(nt){var ct=window[nt];window[nt]=function(){ct&&ct(),lt(getGlobal(et))}}it(tt,function(ut){ut?(requests[tt].forEach(function(ht){return ht.reject(ut)}),requests[tt]=null):nt||lt(getGlobal(et))})})}function getConfig(tt,et){return(0,_deepmerge$1.default)(et.config,tt.config)}function omit(tt){for(var et,nt=arguments.length,rt=new Array(nt>1?nt-1:0),it=1;it1?rt-1:0),ot=1;ot0&&arguments[0]!==void 0?arguments[0]:document.createElement("video"),et=/iPhone|iPod/.test(navigator.userAgent)===!1;return tt.webkitSupportsPresentationMode&&typeof tt.webkitSetPresentationMode=="function"&&et}var patterns={};Object.defineProperty(patterns,"__esModule",{value:!0});patterns.canPlay=patterns.FLV_EXTENSIONS=patterns.DASH_EXTENSIONS=patterns.HLS_EXTENSIONS=patterns.VIDEO_EXTENSIONS=patterns.AUDIO_EXTENSIONS=patterns.MATCH_URL_KALTURA=patterns.MATCH_URL_VIDYARD=patterns.MATCH_URL_MIXCLOUD=patterns.MATCH_URL_DAILYMOTION=patterns.MATCH_URL_TWITCH_CHANNEL=patterns.MATCH_URL_TWITCH_VIDEO=patterns.MATCH_URL_WISTIA=patterns.MATCH_URL_STREAMABLE=patterns.MATCH_URL_FACEBOOK_WATCH=patterns.MATCH_URL_FACEBOOK=patterns.MATCH_URL_VIMEO=patterns.MATCH_URL_SOUNDCLOUD=patterns.MATCH_URL_YOUTUBE=void 0;var _utils$1=utils;function _createForOfIteratorHelper(tt,et){var nt;if(typeof Symbol>"u"||tt[Symbol.iterator]==null){if(Array.isArray(tt)||(nt=_unsupportedIterableToArray$1(tt))||et&&tt&&typeof tt.length=="number"){nt&&(tt=nt);var rt=0,it=function(){};return{s:it,n:function(){return rt>=tt.length?{done:!0}:{done:!1,value:tt[rt++]}},e:function(ct){throw ct},f:it}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var ot=!0,at=!1,st;return{s:function(){nt=tt[Symbol.iterator]()},n:function(){var ct=nt.next();return ot=ct.done,ct},e:function(ct){at=!0,st=ct},f:function(){try{!ot&&nt.return!=null&&nt.return()}finally{if(at)throw st}}}}function _unsupportedIterableToArray$1(tt,et){if(tt){if(typeof tt=="string")return _arrayLikeToArray$1(tt,et);var nt=Object.prototype.toString.call(tt).slice(8,-1);if(nt==="Object"&&tt.constructor&&(nt=tt.constructor.name),nt==="Map"||nt==="Set")return Array.from(tt);if(nt==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(nt))return _arrayLikeToArray$1(tt,et)}}function _arrayLikeToArray$1(tt,et){(et==null||et>tt.length)&&(et=tt.length);for(var nt=0,rt=new Array(et);ntzt.length)&&(Ft=zt.length);for(var Nt=0,Ut=new Array(Ft);Nt"u"||!(Symbol.iterator in Object(zt)))){var Nt=[],Ut=!0,Mt=!1,Ht=void 0;try{for(var en=zt[Symbol.iterator](),sn;!(Ut=(sn=en.next()).done)&&(Nt.push(sn.value),!(Ft&&Nt.length===Ft));Ut=!0);}catch(Kt){Mt=!0,Ht=Kt}finally{try{!Ut&&en.return!=null&&en.return()}finally{if(Mt)throw Ht}}return Nt}}function mt(zt){if(Array.isArray(zt))return zt}function gt(zt,Ft){if(!(zt instanceof Ft))throw new TypeError("Cannot call a class as a function")}function yt(zt,Ft){for(var Nt=0;Nt"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}}function Et(zt){return Et=Object.setPrototypeOf?Object.getPrototypeOf:function(Nt){return Nt.__proto__||Object.getPrototypeOf(Nt)},Et(zt)}function $t(zt,Ft,Nt){return Ft in zt?Object.defineProperty(zt,Ft,{value:Nt,enumerable:!0,configurable:!0,writable:!0}):zt[Ft]=Nt,zt}var Dt="https://www.youtube.com/iframe_api",jt="YT",Pt="onYouTubeIframeAPIReady",Ct=/[?&](?:list|channel)=([a-zA-Z0-9_-]+)/,wt=/user\/([a-zA-Z0-9_-]+)\/?/,It=/youtube-nocookie\.com/,Ot="https://www.youtube-nocookie.com",Wt=function(zt){vt(Nt,zt);var Ft=kt(Nt);function Nt(){var Ut;gt(this,Nt);for(var Mt=arguments.length,Ht=new Array(Mt),en=0;en1&&arguments[1]!==void 0?arguments[1]:!1;this.callPlayer("seekTo",Mt),!Ht&&!this.props.playing&&this.pause()}},{key:"setVolume",value:function(Mt){this.callPlayer("setVolume",Mt*100)}},{key:"setPlaybackRate",value:function(Mt){this.callPlayer("setPlaybackRate",Mt)}},{key:"setLoop",value:function(Mt){this.callPlayer("setLoop",Mt)}},{key:"getDuration",value:function(){return this.callPlayer("getDuration")}},{key:"getCurrentTime",value:function(){return this.callPlayer("getCurrentTime")}},{key:"getSecondsLoaded",value:function(){return this.callPlayer("getVideoLoadedFraction")*this.getDuration()}},{key:"render",value:function(){var Mt=this.props.display,Ht={width:"100%",height:"100%",display:Mt};return nt.default.createElement("div",{style:Ht},nt.default.createElement("div",{ref:this.ref}))}}]),Nt}(nt.Component);tt.default=Wt,$t(Wt,"displayName","YouTube"),$t(Wt,"canPlay",it.canPlay.youtube)}(YouTube$1)),YouTube$1}var SoundCloud={},hasRequiredSoundCloud;function requireSoundCloud(){return hasRequiredSoundCloud||(hasRequiredSoundCloud=1,function(tt){function et(At){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?et=function($t){return typeof $t}:et=function($t){return $t&&typeof Symbol=="function"&&$t.constructor===Symbol&&$t!==Symbol.prototype?"symbol":typeof $t},et(At)}Object.defineProperty(tt,"__esModule",{value:!0}),tt.default=void 0;var nt=at(reactExports),rt=utils,it=patterns;function ot(){if(typeof WeakMap!="function")return null;var At=new WeakMap;return ot=function(){return At},At}function at(At){if(At&&At.__esModule)return At;if(At===null||et(At)!=="object"&&typeof At!="function")return{default:At};var Et=ot();if(Et&&Et.has(At))return Et.get(At);var $t={},Dt=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var jt in At)if(Object.prototype.hasOwnProperty.call(At,jt)){var Pt=Dt?Object.getOwnPropertyDescriptor(At,jt):null;Pt&&(Pt.get||Pt.set)?Object.defineProperty($t,jt,Pt):$t[jt]=At[jt]}return $t.default=At,Et&&Et.set(At,$t),$t}function st(At,Et){var $t=Object.keys(At);if(Object.getOwnPropertySymbols){var Dt=Object.getOwnPropertySymbols(At);Et&&(Dt=Dt.filter(function(jt){return Object.getOwnPropertyDescriptor(At,jt).enumerable})),$t.push.apply($t,Dt)}return $t}function lt(At){for(var Et=1;Et"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}}function vt(At){return vt=Object.setPrototypeOf?Object.getPrototypeOf:function($t){return $t.__proto__||Object.getPrototypeOf($t)},vt(At)}function xt(At,Et,$t){return Et in At?Object.defineProperty(At,Et,{value:$t,enumerable:!0,configurable:!0,writable:!0}):At[Et]=$t,At}var kt="https://w.soundcloud.com/player/api.js",St="SC",Tt=function(At){dt($t,At);var Et=mt($t);function $t(){var Dt;ct(this,$t);for(var jt=arguments.length,Pt=new Array(jt),Ct=0;Ct1&&arguments[1]!==void 0?arguments[1]:!0;this.callPlayer("seekTo",jt*1e3),Pt||this.pause()}},{key:"setVolume",value:function(jt){this.callPlayer("setVolume",jt*100)}},{key:"getDuration",value:function(){return this.duration}},{key:"getCurrentTime",value:function(){return this.currentTime}},{key:"getSecondsLoaded",value:function(){return this.fractionLoaded*this.duration}},{key:"render",value:function(){var jt=this.props.display,Pt={width:"100%",height:"100%",display:jt};return nt.default.createElement("iframe",{ref:this.ref,src:"https://w.soundcloud.com/player/?url=".concat(encodeURIComponent(this.props.url)),style:Pt,frameBorder:0,allow:"autoplay"})}}]),$t}(nt.Component);tt.default=Tt,xt(Tt,"displayName","SoundCloud"),xt(Tt,"canPlay",it.canPlay.soundcloud),xt(Tt,"loopOnEnded",!0)}(SoundCloud)),SoundCloud}var Vimeo={},hasRequiredVimeo;function requireVimeo(){return hasRequiredVimeo||(hasRequiredVimeo=1,function(tt){function et(Et){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?et=function(Dt){return typeof Dt}:et=function(Dt){return Dt&&typeof Symbol=="function"&&Dt.constructor===Symbol&&Dt!==Symbol.prototype?"symbol":typeof Dt},et(Et)}Object.defineProperty(tt,"__esModule",{value:!0}),tt.default=void 0;var nt=at(reactExports),rt=utils,it=patterns;function ot(){if(typeof WeakMap!="function")return null;var Et=new WeakMap;return ot=function(){return Et},Et}function at(Et){if(Et&&Et.__esModule)return Et;if(Et===null||et(Et)!=="object"&&typeof Et!="function")return{default:Et};var $t=ot();if($t&&$t.has(Et))return $t.get(Et);var Dt={},jt=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var Pt in Et)if(Object.prototype.hasOwnProperty.call(Et,Pt)){var Ct=jt?Object.getOwnPropertyDescriptor(Et,Pt):null;Ct&&(Ct.get||Ct.set)?Object.defineProperty(Dt,Pt,Ct):Dt[Pt]=Et[Pt]}return Dt.default=Et,$t&&$t.set(Et,Dt),Dt}function st(Et,$t){var Dt=Object.keys(Et);if(Object.getOwnPropertySymbols){var jt=Object.getOwnPropertySymbols(Et);$t&&(jt=jt.filter(function(Pt){return Object.getOwnPropertyDescriptor(Et,Pt).enumerable})),Dt.push.apply(Dt,jt)}return Dt}function lt(Et){for(var $t=1;$t"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}}function vt(Et){return vt=Object.setPrototypeOf?Object.getPrototypeOf:function(Dt){return Dt.__proto__||Object.getPrototypeOf(Dt)},vt(Et)}function xt(Et,$t,Dt){return $t in Et?Object.defineProperty(Et,$t,{value:Dt,enumerable:!0,configurable:!0,writable:!0}):Et[$t]=Dt,Et}var kt="https://player.vimeo.com/api/player.js",St="Vimeo",Tt=function($t){return $t.replace("/manage/videos","")},At=function(Et){dt(Dt,Et);var $t=mt(Dt);function Dt(){var jt;ct(this,Dt);for(var Pt=arguments.length,Ct=new Array(Pt),wt=0;wt1&&arguments[1]!==void 0?arguments[1]:!0;this.callPlayer("setCurrentTime",Pt),Ct||this.pause()}},{key:"setVolume",value:function(Pt){this.callPlayer("setVolume",Pt)}},{key:"setMuted",value:function(Pt){this.callPlayer("setMuted",Pt)}},{key:"setLoop",value:function(Pt){this.callPlayer("setLoop",Pt)}},{key:"setPlaybackRate",value:function(Pt){this.callPlayer("setPlaybackRate",Pt)}},{key:"getDuration",value:function(){return this.duration}},{key:"getCurrentTime",value:function(){return this.currentTime}},{key:"getSecondsLoaded",value:function(){return this.secondsLoaded}},{key:"render",value:function(){var Pt=this.props.display,Ct={width:"100%",height:"100%",overflow:"hidden",display:Pt};return nt.default.createElement("div",{key:this.props.url,ref:this.ref,style:Ct})}}]),Dt}(nt.Component);tt.default=At,xt(At,"displayName","Vimeo"),xt(At,"canPlay",it.canPlay.vimeo),xt(At,"forceLoad",!0)}(Vimeo)),Vimeo}var Facebook={},hasRequiredFacebook;function requireFacebook(){return hasRequiredFacebook||(hasRequiredFacebook=1,function(tt){function et(Et){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?et=function(Dt){return typeof Dt}:et=function(Dt){return Dt&&typeof Symbol=="function"&&Dt.constructor===Symbol&&Dt!==Symbol.prototype?"symbol":typeof Dt},et(Et)}Object.defineProperty(tt,"__esModule",{value:!0}),tt.default=void 0;var nt=at(reactExports),rt=utils,it=patterns;function ot(){if(typeof WeakMap!="function")return null;var Et=new WeakMap;return ot=function(){return Et},Et}function at(Et){if(Et&&Et.__esModule)return Et;if(Et===null||et(Et)!=="object"&&typeof Et!="function")return{default:Et};var $t=ot();if($t&&$t.has(Et))return $t.get(Et);var Dt={},jt=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var Pt in Et)if(Object.prototype.hasOwnProperty.call(Et,Pt)){var Ct=jt?Object.getOwnPropertyDescriptor(Et,Pt):null;Ct&&(Ct.get||Ct.set)?Object.defineProperty(Dt,Pt,Ct):Dt[Pt]=Et[Pt]}return Dt.default=Et,$t&&$t.set(Et,Dt),Dt}function st(){return st=Object.assign||function(Et){for(var $t=1;$t"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}}function bt(Et){return bt=Object.setPrototypeOf?Object.getPrototypeOf:function(Dt){return Dt.__proto__||Object.getPrototypeOf(Dt)},bt(Et)}function vt(Et,$t,Dt){return $t in Et?Object.defineProperty(Et,$t,{value:Dt,enumerable:!0,configurable:!0,writable:!0}):Et[$t]=Dt,Et}var xt="https://connect.facebook.net/en_US/sdk.js",kt="FB",St="fbAsyncInit",Tt="facebook-player-",At=function(Et){ht(Dt,Et);var $t=pt(Dt);function Dt(){var jt;lt(this,Dt);for(var Pt=arguments.length,Ct=new Array(Pt),wt=0;wt1&&arguments[1]!==void 0?arguments[1]:!0;this.callPlayer("seek",Pt),Ct||this.pause()}},{key:"setVolume",value:function(Pt){this.callPlayer("setVolume",Pt)}},{key:"getDuration",value:function(){return this.callPlayer("getDuration")}},{key:"getCurrentTime",value:function(){return this.callPlayer("getCurrentPosition")}},{key:"getSecondsLoaded",value:function(){return null}},{key:"render",value:function(){var Pt=this.props.config.attributes,Ct={width:"100%",height:"100%"};return nt.default.createElement("div",st({style:Ct,id:this.playerID,className:"fb-video","data-href":this.props.url,"data-autoplay":this.props.playing?"true":"false","data-allowfullscreen":"true","data-controls":this.props.controls?"true":"false"},Pt))}}]),Dt}(nt.Component);tt.default=At,vt(At,"displayName","Facebook"),vt(At,"canPlay",it.canPlay.facebook),vt(At,"loopOnEnded",!0)}(Facebook)),Facebook}var Streamable={},hasRequiredStreamable;function requireStreamable(){return hasRequiredStreamable||(hasRequiredStreamable=1,function(tt){function et(St){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?et=function(At){return typeof At}:et=function(At){return At&&typeof Symbol=="function"&&At.constructor===Symbol&&At!==Symbol.prototype?"symbol":typeof At},et(St)}Object.defineProperty(tt,"__esModule",{value:!0}),tt.default=void 0;var nt=at(reactExports),rt=utils,it=patterns;function ot(){if(typeof WeakMap!="function")return null;var St=new WeakMap;return ot=function(){return St},St}function at(St){if(St&&St.__esModule)return St;if(St===null||et(St)!=="object"&&typeof St!="function")return{default:St};var Tt=ot();if(Tt&&Tt.has(St))return Tt.get(St);var At={},Et=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var $t in St)if(Object.prototype.hasOwnProperty.call(St,$t)){var Dt=Et?Object.getOwnPropertyDescriptor(St,$t):null;Dt&&(Dt.get||Dt.set)?Object.defineProperty(At,$t,Dt):At[$t]=St[$t]}return At.default=St,Tt&&Tt.set(St,At),At}function st(St,Tt){if(!(St instanceof Tt))throw new TypeError("Cannot call a class as a function")}function lt(St,Tt){for(var At=0;At"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}}function yt(St){return yt=Object.setPrototypeOf?Object.getPrototypeOf:function(At){return At.__proto__||Object.getPrototypeOf(At)},yt(St)}function bt(St,Tt,At){return Tt in St?Object.defineProperty(St,Tt,{value:At,enumerable:!0,configurable:!0,writable:!0}):St[Tt]=At,St}var vt="https://cdn.embed.ly/player-0.1.0.min.js",xt="playerjs",kt=function(St){ut(At,St);var Tt=dt(At);function At(){var Et;st(this,At);for(var $t=arguments.length,Dt=new Array($t),jt=0;jt<$t;jt++)Dt[jt]=arguments[jt];return Et=Tt.call.apply(Tt,[this].concat(Dt)),bt(mt(Et),"callPlayer",rt.callPlayer),bt(mt(Et),"duration",null),bt(mt(Et),"currentTime",null),bt(mt(Et),"secondsLoaded",null),bt(mt(Et),"mute",function(){Et.callPlayer("mute")}),bt(mt(Et),"unmute",function(){Et.callPlayer("unmute")}),bt(mt(Et),"ref",function(Pt){Et.iframe=Pt}),Et}return ct(At,[{key:"componentDidMount",value:function(){this.props.onMount&&this.props.onMount(this)}},{key:"load",value:function($t){var Dt=this;(0,rt.getSDK)(vt,xt).then(function(jt){Dt.iframe&&(Dt.player=new jt.Player(Dt.iframe),Dt.player.setLoop(Dt.props.loop),Dt.player.on("ready",Dt.props.onReady),Dt.player.on("play",Dt.props.onPlay),Dt.player.on("pause",Dt.props.onPause),Dt.player.on("seeked",Dt.props.onSeek),Dt.player.on("ended",Dt.props.onEnded),Dt.player.on("error",Dt.props.onError),Dt.player.on("timeupdate",function(Pt){var Ct=Pt.duration,wt=Pt.seconds;Dt.duration=Ct,Dt.currentTime=wt}),Dt.player.on("buffered",function(Pt){var Ct=Pt.percent;Dt.duration&&(Dt.secondsLoaded=Dt.duration*Ct)}),Dt.props.muted&&Dt.player.mute())},this.props.onError)}},{key:"play",value:function(){this.callPlayer("play")}},{key:"pause",value:function(){this.callPlayer("pause")}},{key:"stop",value:function(){}},{key:"seekTo",value:function($t){var Dt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;this.callPlayer("setCurrentTime",$t),Dt||this.pause()}},{key:"setVolume",value:function($t){this.callPlayer("setVolume",$t*100)}},{key:"setLoop",value:function($t){this.callPlayer("setLoop",$t)}},{key:"getDuration",value:function(){return this.duration}},{key:"getCurrentTime",value:function(){return this.currentTime}},{key:"getSecondsLoaded",value:function(){return this.secondsLoaded}},{key:"render",value:function(){var $t=this.props.url.match(it.MATCH_URL_STREAMABLE)[1],Dt={width:"100%",height:"100%"};return nt.default.createElement("iframe",{ref:this.ref,src:"https://streamable.com/o/".concat($t),frameBorder:"0",scrolling:"no",style:Dt,allow:"encrypted-media; autoplay; fullscreen;"})}}]),At}(nt.Component);tt.default=kt,bt(kt,"displayName","Streamable"),bt(kt,"canPlay",it.canPlay.streamable)}(Streamable)),Streamable}var Wistia={},hasRequiredWistia;function requireWistia(){return hasRequiredWistia||(hasRequiredWistia=1,function(tt){function et(Et){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?et=function(Dt){return typeof Dt}:et=function(Dt){return Dt&&typeof Symbol=="function"&&Dt.constructor===Symbol&&Dt!==Symbol.prototype?"symbol":typeof Dt},et(Et)}Object.defineProperty(tt,"__esModule",{value:!0}),tt.default=void 0;var nt=at(reactExports),rt=utils,it=patterns;function ot(){if(typeof WeakMap!="function")return null;var Et=new WeakMap;return ot=function(){return Et},Et}function at(Et){if(Et&&Et.__esModule)return Et;if(Et===null||et(Et)!=="object"&&typeof Et!="function")return{default:Et};var $t=ot();if($t&&$t.has(Et))return $t.get(Et);var Dt={},jt=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var Pt in Et)if(Object.prototype.hasOwnProperty.call(Et,Pt)){var Ct=jt?Object.getOwnPropertyDescriptor(Et,Pt):null;Ct&&(Ct.get||Ct.set)?Object.defineProperty(Dt,Pt,Ct):Dt[Pt]=Et[Pt]}return Dt.default=Et,$t&&$t.set(Et,Dt),Dt}function st(Et,$t){var Dt=Object.keys(Et);if(Object.getOwnPropertySymbols){var jt=Object.getOwnPropertySymbols(Et);$t&&(jt=jt.filter(function(Pt){return Object.getOwnPropertyDescriptor(Et,Pt).enumerable})),Dt.push.apply(Dt,jt)}return Dt}function lt(Et){for(var $t=1;$t"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}}function vt(Et){return vt=Object.setPrototypeOf?Object.getPrototypeOf:function(Dt){return Dt.__proto__||Object.getPrototypeOf(Dt)},vt(Et)}function xt(Et,$t,Dt){return $t in Et?Object.defineProperty(Et,$t,{value:Dt,enumerable:!0,configurable:!0,writable:!0}):Et[$t]=Dt,Et}var kt="https://fast.wistia.com/assets/external/E-v1.js",St="Wistia",Tt="wistia-player-",At=function(Et){dt(Dt,Et);var $t=mt(Dt);function Dt(){var jt;ct(this,Dt);for(var Pt=arguments.length,Ct=new Array(Pt),wt=0;wt1&&arguments[1]!==void 0?arguments[1]:!0;this.callPlayer("time",Pt),Ct||this.pause()}},{key:"setVolume",value:function(Pt){this.callPlayer("volume",Pt)}},{key:"setPlaybackRate",value:function(Pt){this.callPlayer("playbackRate",Pt)}},{key:"getDuration",value:function(){return this.callPlayer("duration")}},{key:"getCurrentTime",value:function(){return this.callPlayer("time")}},{key:"getSecondsLoaded",value:function(){return null}},{key:"render",value:function(){var Pt=this.props.url,Ct=Pt&&Pt.match(it.MATCH_URL_WISTIA)[1],wt="wistia_embed wistia_async_".concat(Ct),It={width:"100%",height:"100%"};return nt.default.createElement("div",{id:this.playerID,key:Ct,className:wt,style:It})}}]),Dt}(nt.Component);tt.default=At,xt(At,"displayName","Wistia"),xt(At,"canPlay",it.canPlay.wistia),xt(At,"loopOnEnded",!0)}(Wistia)),Wistia}var Twitch={},hasRequiredTwitch;function requireTwitch(){return hasRequiredTwitch||(hasRequiredTwitch=1,function(tt){function et(Et){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?et=function(Dt){return typeof Dt}:et=function(Dt){return Dt&&typeof Symbol=="function"&&Dt.constructor===Symbol&&Dt!==Symbol.prototype?"symbol":typeof Dt},et(Et)}Object.defineProperty(tt,"__esModule",{value:!0}),tt.default=void 0;var nt=at(reactExports),rt=utils,it=patterns;function ot(){if(typeof WeakMap!="function")return null;var Et=new WeakMap;return ot=function(){return Et},Et}function at(Et){if(Et&&Et.__esModule)return Et;if(Et===null||et(Et)!=="object"&&typeof Et!="function")return{default:Et};var $t=ot();if($t&&$t.has(Et))return $t.get(Et);var Dt={},jt=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var Pt in Et)if(Object.prototype.hasOwnProperty.call(Et,Pt)){var Ct=jt?Object.getOwnPropertyDescriptor(Et,Pt):null;Ct&&(Ct.get||Ct.set)?Object.defineProperty(Dt,Pt,Ct):Dt[Pt]=Et[Pt]}return Dt.default=Et,$t&&$t.set(Et,Dt),Dt}function st(Et,$t){var Dt=Object.keys(Et);if(Object.getOwnPropertySymbols){var jt=Object.getOwnPropertySymbols(Et);$t&&(jt=jt.filter(function(Pt){return Object.getOwnPropertyDescriptor(Et,Pt).enumerable})),Dt.push.apply(Dt,jt)}return Dt}function lt(Et){for(var $t=1;$t"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}}function vt(Et){return vt=Object.setPrototypeOf?Object.getPrototypeOf:function(Dt){return Dt.__proto__||Object.getPrototypeOf(Dt)},vt(Et)}function xt(Et,$t,Dt){return $t in Et?Object.defineProperty(Et,$t,{value:Dt,enumerable:!0,configurable:!0,writable:!0}):Et[$t]=Dt,Et}var kt="https://player.twitch.tv/js/embed/v1.js",St="Twitch",Tt="twitch-player-",At=function(Et){dt(Dt,Et);var $t=mt(Dt);function Dt(){var jt;ct(this,Dt);for(var Pt=arguments.length,Ct=new Array(Pt),wt=0;wt1&&arguments[1]!==void 0?arguments[1]:!0;this.callPlayer("seek",Pt),Ct||this.pause()}},{key:"setVolume",value:function(Pt){this.callPlayer("setVolume",Pt)}},{key:"getDuration",value:function(){return this.callPlayer("getDuration")}},{key:"getCurrentTime",value:function(){return this.callPlayer("getCurrentTime")}},{key:"getSecondsLoaded",value:function(){return null}},{key:"render",value:function(){var Pt={width:"100%",height:"100%"};return nt.default.createElement("div",{style:Pt,id:this.playerID})}}]),Dt}(nt.Component);tt.default=At,xt(At,"displayName","Twitch"),xt(At,"canPlay",it.canPlay.twitch),xt(At,"loopOnEnded",!0)}(Twitch)),Twitch}var DailyMotion={},hasRequiredDailyMotion;function requireDailyMotion(){return hasRequiredDailyMotion||(hasRequiredDailyMotion=1,function(tt){function et(wt){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?et=function(Ot){return typeof Ot}:et=function(Ot){return Ot&&typeof Symbol=="function"&&Ot.constructor===Symbol&&Ot!==Symbol.prototype?"symbol":typeof Ot},et(wt)}Object.defineProperty(tt,"__esModule",{value:!0}),tt.default=void 0;var nt=at(reactExports),rt=utils,it=patterns;function ot(){if(typeof WeakMap!="function")return null;var wt=new WeakMap;return ot=function(){return wt},wt}function at(wt){if(wt&&wt.__esModule)return wt;if(wt===null||et(wt)!=="object"&&typeof wt!="function")return{default:wt};var It=ot();if(It&&It.has(wt))return It.get(wt);var Ot={},Wt=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var zt in wt)if(Object.prototype.hasOwnProperty.call(wt,zt)){var Ft=Wt?Object.getOwnPropertyDescriptor(wt,zt):null;Ft&&(Ft.get||Ft.set)?Object.defineProperty(Ot,zt,Ft):Ot[zt]=wt[zt]}return Ot.default=wt,It&&It.set(wt,Ot),Ot}function st(wt,It){var Ot=Object.keys(wt);if(Object.getOwnPropertySymbols){var Wt=Object.getOwnPropertySymbols(wt);It&&(Wt=Wt.filter(function(zt){return Object.getOwnPropertyDescriptor(wt,zt).enumerable})),Ot.push.apply(Ot,Wt)}return Ot}function lt(wt){for(var It=1;Itwt.length)&&(It=wt.length);for(var Ot=0,Wt=new Array(It);Ot"u"||!(Symbol.iterator in Object(wt)))){var Ot=[],Wt=!0,zt=!1,Ft=void 0;try{for(var Nt=wt[Symbol.iterator](),Ut;!(Wt=(Ut=Nt.next()).done)&&(Ot.push(Ut.value),!(It&&Ot.length===It));Wt=!0);}catch(Mt){zt=!0,Ft=Mt}finally{try{!Wt&&Nt.return!=null&&Nt.return()}finally{if(zt)throw Ft}}return Ot}}function mt(wt){if(Array.isArray(wt))return wt}function gt(wt,It){if(!(wt instanceof It))throw new TypeError("Cannot call a class as a function")}function yt(wt,It){for(var Ot=0;Ot"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}}function Et(wt){return Et=Object.setPrototypeOf?Object.getPrototypeOf:function(Ot){return Ot.__proto__||Object.getPrototypeOf(Ot)},Et(wt)}function $t(wt,It,Ot){return It in wt?Object.defineProperty(wt,It,{value:Ot,enumerable:!0,configurable:!0,writable:!0}):wt[It]=Ot,wt}var Dt="https://api.dmcdn.net/all.js",jt="DM",Pt="dmAsyncInit",Ct=function(wt){vt(Ot,wt);var It=kt(Ot);function Ot(){var Wt;gt(this,Ot);for(var zt=arguments.length,Ft=new Array(zt),Nt=0;Nt1&&arguments[1]!==void 0?arguments[1]:!0;this.callPlayer("seek",zt),Ft||this.pause()}},{key:"setVolume",value:function(zt){this.callPlayer("setVolume",zt)}},{key:"getDuration",value:function(){return this.player.duration||null}},{key:"getCurrentTime",value:function(){return this.player.currentTime}},{key:"getSecondsLoaded",value:function(){return this.player.bufferedTime}},{key:"render",value:function(){var zt=this.props.display,Ft={width:"100%",height:"100%",display:zt};return nt.default.createElement("div",{style:Ft},nt.default.createElement("div",{ref:this.ref}))}}]),Ot}(nt.Component);tt.default=Ct,$t(Ct,"displayName","DailyMotion"),$t(Ct,"canPlay",it.canPlay.dailymotion),$t(Ct,"loopOnEnded",!0)}(DailyMotion)),DailyMotion}var Mixcloud={},hasRequiredMixcloud;function requireMixcloud(){return hasRequiredMixcloud||(hasRequiredMixcloud=1,function(tt){function et(At){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?et=function($t){return typeof $t}:et=function($t){return $t&&typeof Symbol=="function"&&$t.constructor===Symbol&&$t!==Symbol.prototype?"symbol":typeof $t},et(At)}Object.defineProperty(tt,"__esModule",{value:!0}),tt.default=void 0;var nt=at(reactExports),rt=utils,it=patterns;function ot(){if(typeof WeakMap!="function")return null;var At=new WeakMap;return ot=function(){return At},At}function at(At){if(At&&At.__esModule)return At;if(At===null||et(At)!=="object"&&typeof At!="function")return{default:At};var Et=ot();if(Et&&Et.has(At))return Et.get(At);var $t={},Dt=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var jt in At)if(Object.prototype.hasOwnProperty.call(At,jt)){var Pt=Dt?Object.getOwnPropertyDescriptor(At,jt):null;Pt&&(Pt.get||Pt.set)?Object.defineProperty($t,jt,Pt):$t[jt]=At[jt]}return $t.default=At,Et&&Et.set(At,$t),$t}function st(At,Et){var $t=Object.keys(At);if(Object.getOwnPropertySymbols){var Dt=Object.getOwnPropertySymbols(At);Et&&(Dt=Dt.filter(function(jt){return Object.getOwnPropertyDescriptor(At,jt).enumerable})),$t.push.apply($t,Dt)}return $t}function lt(At){for(var Et=1;Et"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}}function vt(At){return vt=Object.setPrototypeOf?Object.getPrototypeOf:function($t){return $t.__proto__||Object.getPrototypeOf($t)},vt(At)}function xt(At,Et,$t){return Et in At?Object.defineProperty(At,Et,{value:$t,enumerable:!0,configurable:!0,writable:!0}):At[Et]=$t,At}var kt="https://widget.mixcloud.com/media/js/widgetApi.js",St="Mixcloud",Tt=function(At){dt($t,At);var Et=mt($t);function $t(){var Dt;ct(this,$t);for(var jt=arguments.length,Pt=new Array(jt),Ct=0;Ct1&&arguments[1]!==void 0?arguments[1]:!0;this.callPlayer("seek",jt),Pt||this.pause()}},{key:"setVolume",value:function(jt){}},{key:"getDuration",value:function(){return this.duration}},{key:"getCurrentTime",value:function(){return this.currentTime}},{key:"getSecondsLoaded",value:function(){return null}},{key:"render",value:function(){var jt=this.props,Pt=jt.url,Ct=jt.config,wt=Pt.match(it.MATCH_URL_MIXCLOUD)[1],It={width:"100%",height:"100%"},Ot=(0,rt.queryString)(lt(lt({},Ct.options),{},{feed:"/".concat(wt,"/")}));return nt.default.createElement("iframe",{key:wt,ref:this.ref,style:It,src:"https://www.mixcloud.com/widget/iframe/?".concat(Ot),frameBorder:"0",allow:"autoplay"})}}]),$t}(nt.Component);tt.default=Tt,xt(Tt,"displayName","Mixcloud"),xt(Tt,"canPlay",it.canPlay.mixcloud),xt(Tt,"loopOnEnded",!0)}(Mixcloud)),Mixcloud}var Vidyard={},hasRequiredVidyard;function requireVidyard(){return hasRequiredVidyard||(hasRequiredVidyard=1,function(tt){function et(Et){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?et=function(Dt){return typeof Dt}:et=function(Dt){return Dt&&typeof Symbol=="function"&&Dt.constructor===Symbol&&Dt!==Symbol.prototype?"symbol":typeof Dt},et(Et)}Object.defineProperty(tt,"__esModule",{value:!0}),tt.default=void 0;var nt=at(reactExports),rt=utils,it=patterns;function ot(){if(typeof WeakMap!="function")return null;var Et=new WeakMap;return ot=function(){return Et},Et}function at(Et){if(Et&&Et.__esModule)return Et;if(Et===null||et(Et)!=="object"&&typeof Et!="function")return{default:Et};var $t=ot();if($t&&$t.has(Et))return $t.get(Et);var Dt={},jt=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var Pt in Et)if(Object.prototype.hasOwnProperty.call(Et,Pt)){var Ct=jt?Object.getOwnPropertyDescriptor(Et,Pt):null;Ct&&(Ct.get||Ct.set)?Object.defineProperty(Dt,Pt,Ct):Dt[Pt]=Et[Pt]}return Dt.default=Et,$t&&$t.set(Et,Dt),Dt}function st(Et,$t){var Dt=Object.keys(Et);if(Object.getOwnPropertySymbols){var jt=Object.getOwnPropertySymbols(Et);$t&&(jt=jt.filter(function(Pt){return Object.getOwnPropertyDescriptor(Et,Pt).enumerable})),Dt.push.apply(Dt,jt)}return Dt}function lt(Et){for(var $t=1;$t"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}}function vt(Et){return vt=Object.setPrototypeOf?Object.getPrototypeOf:function(Dt){return Dt.__proto__||Object.getPrototypeOf(Dt)},vt(Et)}function xt(Et,$t,Dt){return $t in Et?Object.defineProperty(Et,$t,{value:Dt,enumerable:!0,configurable:!0,writable:!0}):Et[$t]=Dt,Et}var kt="https://play.vidyard.com/embed/v4.js",St="VidyardV4",Tt="onVidyardAPI",At=function(Et){dt(Dt,Et);var $t=mt(Dt);function Dt(){var jt;ct(this,Dt);for(var Pt=arguments.length,Ct=new Array(Pt),wt=0;wt1&&arguments[1]!==void 0?arguments[1]:!0;this.callPlayer("seek",Pt),Ct||this.pause()}},{key:"setVolume",value:function(Pt){this.callPlayer("setVolume",Pt)}},{key:"setPlaybackRate",value:function(Pt){this.callPlayer("setPlaybackSpeed",Pt)}},{key:"getDuration",value:function(){return this.duration}},{key:"getCurrentTime",value:function(){return this.callPlayer("currentTime")}},{key:"getSecondsLoaded",value:function(){return null}},{key:"render",value:function(){var Pt=this.props.display,Ct={width:"100%",height:"100%",display:Pt};return nt.default.createElement("div",{style:Ct},nt.default.createElement("div",{ref:this.ref}))}}]),Dt}(nt.Component);tt.default=At,xt(At,"displayName","Vidyard"),xt(At,"canPlay",it.canPlay.vidyard)}(Vidyard)),Vidyard}var Kaltura={},hasRequiredKaltura;function requireKaltura(){return hasRequiredKaltura||(hasRequiredKaltura=1,function(tt){function et(St){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?et=function(At){return typeof At}:et=function(At){return At&&typeof Symbol=="function"&&At.constructor===Symbol&&At!==Symbol.prototype?"symbol":typeof At},et(St)}Object.defineProperty(tt,"__esModule",{value:!0}),tt.default=void 0;var nt=at(reactExports),rt=utils,it=patterns;function ot(){if(typeof WeakMap!="function")return null;var St=new WeakMap;return ot=function(){return St},St}function at(St){if(St&&St.__esModule)return St;if(St===null||et(St)!=="object"&&typeof St!="function")return{default:St};var Tt=ot();if(Tt&&Tt.has(St))return Tt.get(St);var At={},Et=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var $t in St)if(Object.prototype.hasOwnProperty.call(St,$t)){var Dt=Et?Object.getOwnPropertyDescriptor(St,$t):null;Dt&&(Dt.get||Dt.set)?Object.defineProperty(At,$t,Dt):At[$t]=St[$t]}return At.default=St,Tt&&Tt.set(St,At),At}function st(St,Tt){if(!(St instanceof Tt))throw new TypeError("Cannot call a class as a function")}function lt(St,Tt){for(var At=0;At"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}}function yt(St){return yt=Object.setPrototypeOf?Object.getPrototypeOf:function(At){return At.__proto__||Object.getPrototypeOf(At)},yt(St)}function bt(St,Tt,At){return Tt in St?Object.defineProperty(St,Tt,{value:At,enumerable:!0,configurable:!0,writable:!0}):St[Tt]=At,St}var vt="https://cdn.embed.ly/player-0.1.0.min.js",xt="playerjs",kt=function(St){ut(At,St);var Tt=dt(At);function At(){var Et;st(this,At);for(var $t=arguments.length,Dt=new Array($t),jt=0;jt<$t;jt++)Dt[jt]=arguments[jt];return Et=Tt.call.apply(Tt,[this].concat(Dt)),bt(mt(Et),"callPlayer",rt.callPlayer),bt(mt(Et),"duration",null),bt(mt(Et),"currentTime",null),bt(mt(Et),"secondsLoaded",null),bt(mt(Et),"mute",function(){Et.callPlayer("mute")}),bt(mt(Et),"unmute",function(){Et.callPlayer("unmute")}),bt(mt(Et),"ref",function(Pt){Et.iframe=Pt}),Et}return ct(At,[{key:"componentDidMount",value:function(){this.props.onMount&&this.props.onMount(this)}},{key:"load",value:function($t){var Dt=this;(0,rt.getSDK)(vt,xt).then(function(jt){Dt.iframe&&(Dt.player=new jt.Player(Dt.iframe),Dt.player.on("ready",function(){setTimeout(function(){Dt.player.isReady=!0,Dt.player.setLoop(Dt.props.loop),Dt.props.muted&&Dt.player.mute(),Dt.addListeners(Dt.player,Dt.props),Dt.props.onReady()},500)}))},this.props.onError)}},{key:"addListeners",value:function($t,Dt){var jt=this;$t.on("play",Dt.onPlay),$t.on("pause",Dt.onPause),$t.on("ended",Dt.onEnded),$t.on("error",Dt.onError),$t.on("timeupdate",function(Pt){var Ct=Pt.duration,wt=Pt.seconds;jt.duration=Ct,jt.currentTime=wt})}},{key:"play",value:function(){this.callPlayer("play")}},{key:"pause",value:function(){this.callPlayer("pause")}},{key:"stop",value:function(){}},{key:"seekTo",value:function($t){var Dt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;this.callPlayer("setCurrentTime",$t),Dt||this.pause()}},{key:"setVolume",value:function($t){this.callPlayer("setVolume",$t)}},{key:"setLoop",value:function($t){this.callPlayer("setLoop",$t)}},{key:"getDuration",value:function(){return this.duration}},{key:"getCurrentTime",value:function(){return this.currentTime}},{key:"getSecondsLoaded",value:function(){return this.secondsLoaded}},{key:"render",value:function(){var $t={width:"100%",height:"100%"};return nt.default.createElement("iframe",{ref:this.ref,src:this.props.url,frameBorder:"0",scrolling:"no",style:$t,allow:"encrypted-media; autoplay; fullscreen;",referrerPolicy:"no-referrer-when-downgrade"})}}]),At}(nt.Component);tt.default=kt,bt(kt,"displayName","Kaltura"),bt(kt,"canPlay",it.canPlay.kaltura)}(Kaltura)),Kaltura}var FilePlayer={},hasRequiredFilePlayer;function requireFilePlayer(){return hasRequiredFilePlayer||(hasRequiredFilePlayer=1,function(tt){function et(Wt){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?et=function(Ft){return typeof Ft}:et=function(Ft){return Ft&&typeof Symbol=="function"&&Ft.constructor===Symbol&&Ft!==Symbol.prototype?"symbol":typeof Ft},et(Wt)}Object.defineProperty(tt,"__esModule",{value:!0}),tt.default=void 0;var nt=at(reactExports),rt=utils,it=patterns;function ot(){if(typeof WeakMap!="function")return null;var Wt=new WeakMap;return ot=function(){return Wt},Wt}function at(Wt){if(Wt&&Wt.__esModule)return Wt;if(Wt===null||et(Wt)!=="object"&&typeof Wt!="function")return{default:Wt};var zt=ot();if(zt&&zt.has(Wt))return zt.get(Wt);var Ft={},Nt=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var Ut in Wt)if(Object.prototype.hasOwnProperty.call(Wt,Ut)){var Mt=Nt?Object.getOwnPropertyDescriptor(Wt,Ut):null;Mt&&(Mt.get||Mt.set)?Object.defineProperty(Ft,Ut,Mt):Ft[Ut]=Wt[Ut]}return Ft.default=Wt,zt&&zt.set(Wt,Ft),Ft}function st(){return st=Object.assign||function(Wt){for(var zt=1;zt"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}}function bt(Wt){return bt=Object.setPrototypeOf?Object.getPrototypeOf:function(Ft){return Ft.__proto__||Object.getPrototypeOf(Ft)},bt(Wt)}function vt(Wt,zt,Ft){return zt in Wt?Object.defineProperty(Wt,zt,{value:Ft,enumerable:!0,configurable:!0,writable:!0}):Wt[zt]=Ft,Wt}var xt=typeof navigator<"u",kt=xt&&navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1,St=xt&&(/iPad|iPhone|iPod/.test(navigator.userAgent)||kt)&&!window.MSStream,Tt=xt&&/^((?!chrome|android).)*safari/i.test(navigator.userAgent)&&!window.MSStream,At="https://cdn.jsdelivr.net/npm/hls.js@VERSION/dist/hls.min.js",Et="Hls",$t="https://cdnjs.cloudflare.com/ajax/libs/dashjs/VERSION/dash.all.min.js",Dt="dashjs",jt="https://cdn.jsdelivr.net/npm/flv.js@VERSION/dist/flv.min.js",Pt="flvjs",Ct=/www\.dropbox\.com\/.+/,wt=/https:\/\/watch\.cloudflarestream\.com\/([a-z0-9]+)/,It="https://videodelivery.net/{id}/manifest/video.m3u8",Ot=function(Wt){ht(Ft,Wt);var zt=pt(Ft);function Ft(){var Nt;lt(this,Ft);for(var Ut=arguments.length,Mt=new Array(Ut),Ht=0;Ht1&&arguments[1]!==void 0?arguments[1]:!0;this.player.currentTime=Ut,Mt||this.pause()}},{key:"setVolume",value:function(Ut){this.player.volume=Ut}},{key:"enablePIP",value:function(){this.player.requestPictureInPicture&&document.pictureInPictureElement!==this.player?this.player.requestPictureInPicture():(0,rt.supportsWebKitPresentationMode)(this.player)&&this.player.webkitPresentationMode!=="picture-in-picture"&&this.player.webkitSetPresentationMode("picture-in-picture")}},{key:"disablePIP",value:function(){document.exitPictureInPicture&&document.pictureInPictureElement===this.player?document.exitPictureInPicture():(0,rt.supportsWebKitPresentationMode)(this.player)&&this.player.webkitPresentationMode!=="inline"&&this.player.webkitSetPresentationMode("inline")}},{key:"setPlaybackRate",value:function(Ut){try{this.player.playbackRate=Ut}catch(Mt){this.props.onError(Mt)}}},{key:"getDuration",value:function(){if(!this.player)return null;var Ut=this.player,Mt=Ut.duration,Ht=Ut.seekable;return Mt===1/0&&Ht.length>0?Ht.end(Ht.length-1):Mt}},{key:"getCurrentTime",value:function(){return this.player?this.player.currentTime:null}},{key:"getSecondsLoaded",value:function(){if(!this.player)return null;var Ut=this.player.buffered;if(Ut.length===0)return 0;var Mt=Ut.end(Ut.length-1),Ht=this.getDuration();return Mt>Ht?Ht:Mt}},{key:"getSource",value:function(Ut){var Mt=this.shouldUseHLS(Ut),Ht=this.shouldUseDASH(Ut),en=this.shouldUseFLV(Ut);if(!(Ut instanceof Array||(0,rt.isMediaStream)(Ut)||Mt||Ht||en))return Ct.test(Ut)?Ut.replace("www.dropbox.com","dl.dropboxusercontent.com"):Ut}},{key:"render",value:function(){var Ut=this.props,Mt=Ut.url,Ht=Ut.playing,en=Ut.loop,sn=Ut.controls,Kt=Ut.muted,rn=Ut.config,nn=Ut.width,hn=Ut.height,vn=this.shouldUseAudio(this.props),an=vn?"audio":"video",Qt={width:nn==="auto"?nn:"100%",height:hn==="auto"?hn:"100%"};return nt.default.createElement(an,st({ref:this.ref,src:this.getSource(Mt),style:Qt,preload:"auto",autoPlay:Ht||void 0,controls:sn,muted:Kt,loop:en},rn.attributes),Mt instanceof Array&&Mt.map(this.renderSourceElement),rn.tracks.map(this.renderTrack))}}]),Ft}(nt.Component);tt.default=Ot,vt(Ot,"displayName","FilePlayer"),vt(Ot,"canPlay",it.canPlay.file)}(FilePlayer)),FilePlayer}(function(tt){Object.defineProperty(tt,"__esModule",{value:!0}),tt.default=void 0;var et=reactExports,nt=utils,rt=patterns;function it(lt){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?it=function(ut){return typeof ut}:it=function(ut){return ut&&typeof Symbol=="function"&&ut.constructor===Symbol&&ut!==Symbol.prototype?"symbol":typeof ut},it(lt)}function ot(){if(typeof WeakMap!="function")return null;var lt=new WeakMap;return ot=function(){return lt},lt}function at(lt){if(lt&<.__esModule)return lt;if(lt===null||it(lt)!=="object"&&typeof lt!="function")return{default:lt};var ct=ot();if(ct&&ct.has(lt))return ct.get(lt);var ut={},ht=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var dt in lt)if(Object.prototype.hasOwnProperty.call(lt,dt)){var pt=ht?Object.getOwnPropertyDescriptor(lt,dt):null;pt&&(pt.get||pt.set)?Object.defineProperty(ut,dt,pt):ut[dt]=lt[dt]}return ut.default=lt,ct&&ct.set(lt,ut),ut}var st=[{key:"youtube",name:"YouTube",canPlay:rt.canPlay.youtube,lazyPlayer:(0,et.lazy)(function(){return Promise.resolve().then(function(){return at(requireYouTube())})})},{key:"soundcloud",name:"SoundCloud",canPlay:rt.canPlay.soundcloud,lazyPlayer:(0,et.lazy)(function(){return Promise.resolve().then(function(){return at(requireSoundCloud())})})},{key:"vimeo",name:"Vimeo",canPlay:rt.canPlay.vimeo,lazyPlayer:(0,et.lazy)(function(){return Promise.resolve().then(function(){return at(requireVimeo())})})},{key:"facebook",name:"Facebook",canPlay:rt.canPlay.facebook,lazyPlayer:(0,et.lazy)(function(){return Promise.resolve().then(function(){return at(requireFacebook())})})},{key:"streamable",name:"Streamable",canPlay:rt.canPlay.streamable,lazyPlayer:(0,et.lazy)(function(){return Promise.resolve().then(function(){return at(requireStreamable())})})},{key:"wistia",name:"Wistia",canPlay:rt.canPlay.wistia,lazyPlayer:(0,et.lazy)(function(){return Promise.resolve().then(function(){return at(requireWistia())})})},{key:"twitch",name:"Twitch",canPlay:rt.canPlay.twitch,lazyPlayer:(0,et.lazy)(function(){return Promise.resolve().then(function(){return at(requireTwitch())})})},{key:"dailymotion",name:"DailyMotion",canPlay:rt.canPlay.dailymotion,lazyPlayer:(0,et.lazy)(function(){return Promise.resolve().then(function(){return at(requireDailyMotion())})})},{key:"mixcloud",name:"Mixcloud",canPlay:rt.canPlay.mixcloud,lazyPlayer:(0,et.lazy)(function(){return Promise.resolve().then(function(){return at(requireMixcloud())})})},{key:"vidyard",name:"Vidyard",canPlay:rt.canPlay.vidyard,lazyPlayer:(0,et.lazy)(function(){return Promise.resolve().then(function(){return at(requireVidyard())})})},{key:"kaltura",name:"Kaltura",canPlay:rt.canPlay.kaltura,lazyPlayer:(0,et.lazy)(function(){return Promise.resolve().then(function(){return at(requireKaltura())})})},{key:"file",name:"FilePlayer",canPlay:rt.canPlay.file,canEnablePIP:function(ct){return rt.canPlay.file(ct)&&(document.pictureInPictureEnabled||(0,nt.supportsWebKitPresentationMode)())&&!rt.AUDIO_EXTENSIONS.test(ct)},lazyPlayer:(0,et.lazy)(function(){return Promise.resolve().then(function(){return at(requireFilePlayer())})})}];tt.default=st})(players);var ReactPlayer$1={},safeIsNaN=Number.isNaN||function tt(et){return typeof et=="number"&&et!==et};function isEqual(tt,et){return!!(tt===et||safeIsNaN(tt)&&safeIsNaN(et))}function areInputsEqual(tt,et){if(tt.length!==et.length)return!1;for(var nt=0;nt"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}}function xt(At){return xt=Object.setPrototypeOf?Object.getPrototypeOf:function($t){return $t.__proto__||Object.getPrototypeOf($t)},xt(At)}function kt(At,Et,$t){return Et in At?Object.defineProperty(At,Et,{value:$t,enumerable:!0,configurable:!0,writable:!0}):At[Et]=$t,At}var St=5e3,Tt=function(At){pt($t,At);var Et=gt($t);function $t(){var Dt;ut(this,$t);for(var jt=arguments.length,Pt=new Array(jt),Ct=0;Ct0&&jt<1;if(It){var Ot=this.player.getDuration();if(!Ot){console.warn("ReactPlayer: could not seek using fraction – duration not yet available");return}this.player.seekTo(Ot*jt,Ct);return}this.player.seekTo(jt,Ct)}},{key:"render",value:function(){var jt=this.props.activePlayer;return jt?nt.default.createElement(jt,ct({},this.props,{onMount:this.handlePlayerMount,onReady:this.handleReady,onPlay:this.handlePlay,onPause:this.handlePause,onEnded:this.handleEnded,onLoaded:this.handleLoaded,onError:this.handleError})):null}}]),$t}(nt.Component);tt.default=Tt,kt(Tt,"displayName","Player"),kt(Tt,"propTypes",it.propTypes),kt(Tt,"defaultProps",it.defaultProps)})(Player);var Preview$1={},hasRequiredPreview;function requirePreview(){return hasRequiredPreview||(hasRequiredPreview=1,function(tt){function et(St){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?et=function(At){return typeof At}:et=function(At){return At&&typeof Symbol=="function"&&At.constructor===Symbol&&At!==Symbol.prototype?"symbol":typeof At},et(St)}Object.defineProperty(tt,"__esModule",{value:!0}),tt.default=void 0;var nt=it(reactExports);function rt(){if(typeof WeakMap!="function")return null;var St=new WeakMap;return rt=function(){return St},St}function it(St){if(St&&St.__esModule)return St;if(St===null||et(St)!=="object"&&typeof St!="function")return{default:St};var Tt=rt();if(Tt&&Tt.has(St))return Tt.get(St);var At={},Et=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var $t in St)if(Object.prototype.hasOwnProperty.call(St,$t)){var Dt=Et?Object.getOwnPropertyDescriptor(St,$t):null;Dt&&(Dt.get||Dt.set)?Object.defineProperty(At,$t,Dt):At[$t]=St[$t]}return At.default=St,Tt&&Tt.set(St,At),At}function ot(St,Tt){var At=Object.keys(St);if(Object.getOwnPropertySymbols){var Et=Object.getOwnPropertySymbols(St);Tt&&(Et=Et.filter(function($t){return Object.getOwnPropertyDescriptor(St,$t).enumerable})),At.push.apply(At,Et)}return At}function at(St){for(var Tt=1;Tt"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}}function yt(St){return yt=Object.setPrototypeOf?Object.getPrototypeOf:function(At){return At.__proto__||Object.getPrototypeOf(At)},yt(St)}function bt(St,Tt,At){return Tt in St?Object.defineProperty(St,Tt,{value:At,enumerable:!0,configurable:!0,writable:!0}):St[Tt]=At,St}var vt="64px",xt={},kt=function(St){ut(At,St);var Tt=dt(At);function At(){var Et;st(this,At);for(var $t=arguments.length,Dt=new Array($t),jt=0;jt<$t;jt++)Dt[jt]=arguments[jt];return Et=Tt.call.apply(Tt,[this].concat(Dt)),bt(mt(Et),"mounted",!1),bt(mt(Et),"state",{image:null}),bt(mt(Et),"handleKeyPress",function(Pt){(Pt.key==="Enter"||Pt.key===" ")&&Et.props.onClick()}),Et}return ct(At,[{key:"componentDidMount",value:function(){this.mounted=!0,this.fetchImage(this.props)}},{key:"componentDidUpdate",value:function($t){var Dt=this.props,jt=Dt.url,Pt=Dt.light;($t.url!==jt||$t.light!==Pt)&&this.fetchImage(this.props)}},{key:"componentWillUnmount",value:function(){this.mounted=!1}},{key:"fetchImage",value:function($t){var Dt=this,jt=$t.url,Pt=$t.light,Ct=$t.oEmbedUrl;if(!nt.default.isValidElement(Pt)){if(typeof Pt=="string"){this.setState({image:Pt});return}if(xt[jt]){this.setState({image:xt[jt]});return}return this.setState({image:null}),window.fetch(Ct.replace("{url}",jt)).then(function(wt){return wt.json()}).then(function(wt){if(wt.thumbnail_url&&Dt.mounted){var It=wt.thumbnail_url.replace("height=100","height=480").replace("-d_295x166","-d_640");Dt.setState({image:It}),xt[jt]=It}})}}},{key:"render",value:function(){var $t=this.props,Dt=$t.light,jt=$t.onClick,Pt=$t.playIcon,Ct=$t.previewTabIndex,wt=this.state.image,It=nt.default.isValidElement(Dt),Ot={display:"flex",alignItems:"center",justifyContent:"center"},Wt={preview:at({width:"100%",height:"100%",backgroundImage:wt&&!It?"url(".concat(wt,")"):void 0,backgroundSize:"cover",backgroundPosition:"center",cursor:"pointer"},Ot),shadow:at({background:"radial-gradient(rgb(0, 0, 0, 0.3), rgba(0, 0, 0, 0) 60%)",borderRadius:vt,width:vt,height:vt,position:It?"absolute":void 0},Ot),playIcon:{borderStyle:"solid",borderWidth:"16px 0 16px 26px",borderColor:"transparent transparent transparent white",marginLeft:"7px"}},zt=nt.default.createElement("div",{style:Wt.shadow,className:"react-player__shadow"},nt.default.createElement("div",{style:Wt.playIcon,className:"react-player__play-icon"}));return nt.default.createElement("div",{style:Wt.preview,className:"react-player__preview",onClick:jt,tabIndex:Ct,onKeyPress:this.handleKeyPress},It?Dt:null,Pt||zt)}}]),At}(nt.Component);tt.default=kt}(Preview$1)),Preview$1}Object.defineProperty(ReactPlayer$1,"__esModule",{value:!0});ReactPlayer$1.createReactPlayer=void 0;var _react=_interopRequireWildcard(reactExports),_deepmerge=_interopRequireDefault(cjs),_memoizeOne=_interopRequireDefault(require$$2),_reactFastCompare=_interopRequireDefault(reactFastCompare),_props=props,_utils=utils,_Player3=_interopRequireDefault(Player);function _interopRequireDefault(tt){return tt&&tt.__esModule?tt:{default:tt}}function _typeof(tt){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_typeof=function(nt){return typeof nt}:_typeof=function(nt){return nt&&typeof Symbol=="function"&&nt.constructor===Symbol&&nt!==Symbol.prototype?"symbol":typeof nt},_typeof(tt)}function ownKeys(tt,et){var nt=Object.keys(tt);if(Object.getOwnPropertySymbols){var rt=Object.getOwnPropertySymbols(tt);et&&(rt=rt.filter(function(it){return Object.getOwnPropertyDescriptor(tt,it).enumerable})),nt.push.apply(nt,rt)}return nt}function _objectSpread(tt){for(var et=1;ettt.length)&&(et=tt.length);for(var nt=0,rt=new Array(et);nt"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}}function _getPrototypeOf(tt){return _getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(nt){return nt.__proto__||Object.getPrototypeOf(nt)},_getPrototypeOf(tt)}function _defineProperty(tt,et,nt){return et in tt?Object.defineProperty(tt,et,{value:nt,enumerable:!0,configurable:!0,writable:!0}):tt[et]=nt,tt}function _getRequireWildcardCache(){if(typeof WeakMap!="function")return null;var tt=new WeakMap;return _getRequireWildcardCache=function(){return tt},tt}function _interopRequireWildcard(tt){if(tt&&tt.__esModule)return tt;if(tt===null||_typeof(tt)!=="object"&&typeof tt!="function")return{default:tt};var et=_getRequireWildcardCache();if(et&&et.has(tt))return et.get(tt);var nt={},rt=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var it in tt)if(Object.prototype.hasOwnProperty.call(tt,it)){var ot=rt?Object.getOwnPropertyDescriptor(tt,it):null;ot&&(ot.get||ot.set)?Object.defineProperty(nt,it,ot):nt[it]=tt[it]}return nt.default=tt,et&&et.set(tt,nt),nt}var Preview=(0,_react.lazy)(function(){return Promise.resolve().then(function(){return _interopRequireWildcard(requirePreview())})}),IS_BROWSER=typeof window<"u"&&window.document,IS_GLOBAL=typeof commonjsGlobal<"u"&&commonjsGlobal.window&&commonjsGlobal.window.document,SUPPORTED_PROPS=Object.keys(_props.propTypes),UniversalSuspense=IS_BROWSER||IS_GLOBAL?_react.Suspense:function(){return null},customPlayers=[],createReactPlayer=function tt(et,nt){var rt,it;return it=rt=function(ot){_inherits(st,ot);var at=_createSuper(st);function st(){var lt;_classCallCheck(this,st);for(var ct=arguments.length,ut=new Array(ct),ht=0;ht0&&arguments[0]!==void 0?arguments[0]:"player";return lt.player?lt.player.getInternalPlayer(dt):null}),_defineProperty(_assertThisInitialized(lt),"seekTo",function(dt,pt,mt){if(!lt.player)return null;lt.player.seekTo(dt,pt,mt)}),_defineProperty(_assertThisInitialized(lt),"handleReady",function(){lt.props.onReady(_assertThisInitialized(lt))}),_defineProperty(_assertThisInitialized(lt),"getActivePlayer",(0,_memoizeOne.default)(function(dt){for(var pt=0,mt=[].concat(customPlayers,_toConsumableArray(et));pt{const tt=useDataStore(yt=>yt.selectedNode),et=reactExports.useRef(null),nt=reactExports.useRef(null),{link:rt,timestamp:it,image_url:ot,date:at,boost:st,type:lt,id:ct,show_title:ut,episode_title:ht,ref_id:dt}=tt||{},[pt,mt]=reactExports.useState(st||0),gt=videoTimetoSeconds(it||"");return reactExports.useEffect(()=>{var yt;et.current&&((yt=et.current)==null||yt.seekTo(gt)),nt.current&&nt.current.scrollTo({top:0,behavior:"auto"})},[et,gt]),tt?jsxRuntimeExports.jsxs(Wrapper$4,{children:[jsxRuntimeExports.jsx(PlayerWrapper,{children:jsxRuntimeExports.jsx(Flex,{direction:"row",children:jsxRuntimeExports.jsx(ReactPlayer,{ref:et,controls:!0,height:"200px",playing:!0,url:rt,width:"100%"})})}),jsxRuntimeExports.jsx(StyledEpisode,{boostCount:pt||0,date:at||0,episodeTitle:formatDescription(ht),id:ct,imageUrl:ot||"video_default.svg",isSelectedView:!0,onClick:()=>null,showTitle:ut,type:lt}),jsxRuntimeExports.jsx(StyledDivider,{}),jsxRuntimeExports.jsxs("div",{ref:nt,style:{overflow:"auto",flex:1,width:"100%"},children:[jsxRuntimeExports.jsxs(BoostWrapper,{children:[jsxRuntimeExports.jsx(BoostAmt,{amt:pt}),jsxRuntimeExports.jsx(Booster,{content:tt,count:pt,refId:dt,updateCount:mt})]}),jsxRuntimeExports.jsx(StyledDivider,{}),jsxRuntimeExports.jsx(TextWrapper,{children:jsxRuntimeExports.jsx(Description,{node:tt,stateless:!0})}),jsxRuntimeExports.jsx(StyledDivider,{}),jsxRuntimeExports.jsx(TextWrapper,{children:jsxRuntimeExports.jsx(Transcript,{node:tt,stateless:!0})})]})]}):null},Wrapper$4=styled$4(Flex)` + function _defineProperty(tt, et, nt) { + return ( + et in tt + ? Object.defineProperty(tt, et, { value: nt, enumerable: !0, configurable: !0, writable: !0 }) + : (tt[et] = nt), + tt + ) + } + function _getRequireWildcardCache() { + if (typeof WeakMap != 'function') return null + var tt = new WeakMap() + return ( + (_getRequireWildcardCache = function () { + return tt + }), + tt + ) + } + function _interopRequireWildcard(tt) { + if (tt && tt.__esModule) return tt + if (tt === null || (_typeof(tt) !== 'object' && typeof tt != 'function')) return { default: tt } + var et = _getRequireWildcardCache() + if (et && et.has(tt)) return et.get(tt) + var nt = {}, + rt = Object.defineProperty && Object.getOwnPropertyDescriptor + for (var it in tt) + if (Object.prototype.hasOwnProperty.call(tt, it)) { + var ot = rt ? Object.getOwnPropertyDescriptor(tt, it) : null + ot && (ot.get || ot.set) ? Object.defineProperty(nt, it, ot) : (nt[it] = tt[it]) + } + return (nt.default = tt), et && et.set(tt, nt), nt + } + var Preview = (0, _react.lazy)(function () { + return Promise.resolve().then(function () { + return _interopRequireWildcard(requirePreview()) + }) + }), + IS_BROWSER = typeof window < 'u' && window.document, + IS_GLOBAL = typeof commonjsGlobal < 'u' && commonjsGlobal.window && commonjsGlobal.window.document, + SUPPORTED_PROPS = Object.keys(_props.propTypes), + UniversalSuspense = + IS_BROWSER || IS_GLOBAL + ? _react.Suspense + : function () { + return null + }, + customPlayers = [], + createReactPlayer = function tt(et, nt) { + var rt, it + return ( + (it = rt = + (function (ot) { + _inherits(st, ot) + var at = _createSuper(st) + function st() { + var lt + _classCallCheck(this, st) + for (var ct = arguments.length, ut = new Array(ct), ht = 0; ht < ct; ht++) ut[ht] = arguments[ht] + return ( + (lt = at.call.apply(at, [this].concat(ut))), + _defineProperty(_assertThisInitialized(lt), 'state', { showPreview: !!lt.props.light }), + _defineProperty(_assertThisInitialized(lt), 'references', { + wrapper: function (pt) { + lt.wrapper = pt + }, + player: function (pt) { + lt.player = pt + }, + }), + _defineProperty(_assertThisInitialized(lt), 'handleClickPreview', function (dt) { + lt.setState({ showPreview: !1 }), lt.props.onClickPreview(dt) + }), + _defineProperty(_assertThisInitialized(lt), 'showPreview', function () { + lt.setState({ showPreview: !0 }) + }), + _defineProperty(_assertThisInitialized(lt), 'getDuration', function () { + return lt.player ? lt.player.getDuration() : null + }), + _defineProperty(_assertThisInitialized(lt), 'getCurrentTime', function () { + return lt.player ? lt.player.getCurrentTime() : null + }), + _defineProperty(_assertThisInitialized(lt), 'getSecondsLoaded', function () { + return lt.player ? lt.player.getSecondsLoaded() : null + }), + _defineProperty(_assertThisInitialized(lt), 'getInternalPlayer', function () { + var dt = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 'player' + return lt.player ? lt.player.getInternalPlayer(dt) : null + }), + _defineProperty(_assertThisInitialized(lt), 'seekTo', function (dt, pt, mt) { + if (!lt.player) return null + lt.player.seekTo(dt, pt, mt) + }), + _defineProperty(_assertThisInitialized(lt), 'handleReady', function () { + lt.props.onReady(_assertThisInitialized(lt)) + }), + _defineProperty( + _assertThisInitialized(lt), + 'getActivePlayer', + (0, _memoizeOne.default)(function (dt) { + for (var pt = 0, mt = [].concat(customPlayers, _toConsumableArray(et)); pt < mt.length; pt++) { + var gt = mt[pt] + if (gt.canPlay(dt)) return gt + } + return nt || null + }), + ), + _defineProperty( + _assertThisInitialized(lt), + 'getConfig', + (0, _memoizeOne.default)(function (dt, pt) { + var mt = lt.props.config + return _deepmerge.default.all([ + _props.defaultProps.config, + _props.defaultProps.config[pt] || {}, + mt, + mt[pt] || {}, + ]) + }), + ), + _defineProperty( + _assertThisInitialized(lt), + 'getAttributes', + (0, _memoizeOne.default)(function (dt) { + return (0, _utils.omit)(lt.props, SUPPORTED_PROPS) + }), + ), + _defineProperty(_assertThisInitialized(lt), 'renderActivePlayer', function (dt) { + if (!dt) return null + var pt = lt.getActivePlayer(dt) + if (!pt) return null + var mt = lt.getConfig(dt, pt.key) + return _react.default.createElement( + _Player3.default, + _extends({}, lt.props, { + key: pt.key, + ref: lt.references.player, + config: mt, + activePlayer: pt.lazyPlayer || pt, + onReady: lt.handleReady, + }), + ) + }), + lt + ) + } + return ( + _createClass(st, [ + { + key: 'shouldComponentUpdate', + value: function (ct, ut) { + return ( + !(0, _reactFastCompare.default)(this.props, ct) || !(0, _reactFastCompare.default)(this.state, ut) + ) + }, + }, + { + key: 'componentDidUpdate', + value: function (ct) { + var ut = this.props.light + !ct.light && ut && this.setState({ showPreview: !0 }), + ct.light && !ut && this.setState({ showPreview: !1 }) + }, + }, + { + key: 'renderPreview', + value: function (ct) { + if (!ct) return null + var ut = this.props, + ht = ut.light, + dt = ut.playIcon, + pt = ut.previewTabIndex, + mt = ut.oEmbedUrl + return _react.default.createElement(Preview, { + url: ct, + light: ht, + playIcon: dt, + previewTabIndex: pt, + oEmbedUrl: mt, + onClick: this.handleClickPreview, + }) + }, + }, + { + key: 'render', + value: function () { + var ct = this.props, + ut = ct.url, + ht = ct.style, + dt = ct.width, + pt = ct.height, + mt = ct.fallback, + gt = ct.wrapper, + yt = this.state.showPreview, + bt = this.getAttributes(ut), + vt = typeof gt == 'string' ? this.references.wrapper : void 0 + return _react.default.createElement( + gt, + _extends( + { ref: vt, style: _objectSpread(_objectSpread({}, ht), {}, { width: dt, height: pt }) }, + bt, + ), + _react.default.createElement( + UniversalSuspense, + { fallback: mt }, + yt ? this.renderPreview(ut) : this.renderActivePlayer(ut), + ), + ) + }, + }, + ]), + st + ) + })(_react.Component)), + _defineProperty(rt, 'displayName', 'ReactPlayer'), + _defineProperty(rt, 'propTypes', _props.propTypes), + _defineProperty(rt, 'defaultProps', _props.defaultProps), + _defineProperty(rt, 'addCustomPlayer', function (ot) { + customPlayers.push(ot) + }), + _defineProperty(rt, 'removeCustomPlayers', function () { + customPlayers.length = 0 + }), + _defineProperty(rt, 'canPlay', function (ot) { + for (var at = 0, st = [].concat(customPlayers, _toConsumableArray(et)); at < st.length; at++) { + var lt = st[at] + if (lt.canPlay(ot)) return !0 + } + return !1 + }), + _defineProperty(rt, 'canEnablePIP', function (ot) { + for (var at = 0, st = [].concat(customPlayers, _toConsumableArray(et)); at < st.length; at++) { + var lt = st[at] + if (lt.canEnablePIP && lt.canEnablePIP(ot)) return !0 + } + return !1 + }), + it + ) + } + ReactPlayer$1.createReactPlayer = createReactPlayer + ;(function (tt) { + Object.defineProperty(tt, '__esModule', { value: !0 }), (tt.default = void 0) + var et = rt(players), + nt = ReactPlayer$1 + function rt(at) { + return at && at.__esModule ? at : { default: at } + } + var it = et.default[et.default.length - 1], + ot = (0, nt.createReactPlayer)(et.default, it) + tt.default = ot + })(lib) + const ReactPlayer = getDefaultExportFromCjs(lib), + YouTube = () => { + const tt = useDataStore((yt) => yt.selectedNode), + et = reactExports.useRef(null), + nt = reactExports.useRef(null), + { + link: rt, + timestamp: it, + image_url: ot, + date: at, + boost: st, + type: lt, + id: ct, + show_title: ut, + episode_title: ht, + ref_id: dt, + } = tt || {}, + [pt, mt] = reactExports.useState(st || 0), + gt = videoTimetoSeconds(it || '') + return ( + reactExports.useEffect(() => { + var yt + et.current && ((yt = et.current) == null || yt.seekTo(gt)), + nt.current && nt.current.scrollTo({ top: 0, behavior: 'auto' }) + }, [et, gt]), + tt + ? jsxRuntimeExports.jsxs(Wrapper$4, { + children: [ + jsxRuntimeExports.jsx(PlayerWrapper, { + children: jsxRuntimeExports.jsx(Flex, { + direction: 'row', + children: jsxRuntimeExports.jsx(ReactPlayer, { + ref: et, + controls: !0, + height: '200px', + playing: !0, + url: rt, + width: '100%', + }), + }), + }), + jsxRuntimeExports.jsx(StyledEpisode, { + boostCount: pt || 0, + date: at || 0, + episodeTitle: formatDescription(ht), + id: ct, + imageUrl: ot || 'video_default.svg', + isSelectedView: !0, + onClick: () => null, + showTitle: ut, + type: lt, + }), + jsxRuntimeExports.jsx(StyledDivider, {}), + jsxRuntimeExports.jsxs('div', { + ref: nt, + style: { overflow: 'auto', flex: 1, width: '100%' }, + children: [ + jsxRuntimeExports.jsxs(BoostWrapper, { + children: [ + jsxRuntimeExports.jsx(BoostAmt, { amt: pt }), + jsxRuntimeExports.jsx(Booster, { content: tt, count: pt, refId: dt, updateCount: mt }), + ], + }), + jsxRuntimeExports.jsx(StyledDivider, {}), + jsxRuntimeExports.jsx(TextWrapper, { + children: jsxRuntimeExports.jsx(Description, { node: tt, stateless: !0 }), + }), + jsxRuntimeExports.jsx(StyledDivider, {}), + jsxRuntimeExports.jsx(TextWrapper, { + children: jsxRuntimeExports.jsx(Transcript, { node: tt, stateless: !0 }), + }), + ], + }), + ], + }) + : null + ) + }, + Wrapper$4 = styled$4(Flex)` flex: 1; min-height: 100%; flex-direction: column; border-bottom: 1px solid #101317; box-shadow: 0px 5px 6px rgba(0, 0, 0, 0.5); z-index: 0; -`,PlayerWrapper=styled$4(Flex)` +`, + PlayerWrapper = styled$4(Flex)` padding: 30px 18px 0; -`,BoostWrapper=styled$4(Flex)` +`, + BoostWrapper = styled$4(Flex)` flex-direction: row; justify-content: space-between; padding: 18px 18px 18px; -`,TextWrapper=styled$4(Flex)` +`, + TextWrapper = styled$4(Flex)` padding: 18px 18px 18px; -`,StyledEpisode=styled$4(Episode)` +`, + StyledEpisode = styled$4(Episode)` & { border-top: none; padding-bottom: 18px; font-size: 16px; } -`,StyledDivider=styled$4(Divider)` +`, + StyledDivider = styled$4(Divider)` margin: auto 0px 2px 0px; opacity: 75%; -`,_View=()=>{const tt=useSelectedNode(),[et]=useDataStore(nt=>[nt.showTeachMe]);if(et)return jsxRuntimeExports.jsx(TeachMeText,{});switch(tt==null?void 0:tt.node_type){case"twitter":return jsxRuntimeExports.jsx(Twitter,{});case"guest":return jsxRuntimeExports.jsx(Person,{});case"data_series":return jsxRuntimeExports.jsx(Data,{});case"tribe_message":return jsxRuntimeExports.jsx(Messages,{});case"tweet":return jsxRuntimeExports.jsx(TwitData,{});case"topic":return jsxRuntimeExports.jsx(Topic,{});case"show":return jsxRuntimeExports.jsx(Show,{});case"clip":return(tt==null?void 0:tt.type)==="youtube"?jsxRuntimeExports.jsx(YouTube,{}):jsxRuntimeExports.jsx(AudioClip,{});case"document":return jsxRuntimeExports.jsx(TextType,{});default:return jsxRuntimeExports.jsx(Creator,{})}},SelectedNodeView=reactExports.memo(_View),SideBarSubView=({open:tt})=>{const[et,nt,rt]=useDataStore(it=>[it.setSelectedNode,it.setTeachMe,it.showTeachMe]);return jsxRuntimeExports.jsx(Slide$1,{direction:"right",in:tt,mountOnEnter:!0,style:{width:rt?"700px":""},unmountOnExit:!0,children:jsxRuntimeExports.jsxs(Wrapper$3,{children:[jsxRuntimeExports.jsx(ScrollWrapper$1,{children:jsxRuntimeExports.jsx(SelectedNodeView,{})}),jsxRuntimeExports.jsx(CloseButton,{onClick:()=>{et(null),nt(!1)},children:jsxRuntimeExports.jsx(CloseIcon,{})}),jsxRuntimeExports.jsx(CollapseButton$1,{onClick:()=>{et(null),nt(!1)},children:jsxRuntimeExports.jsx(ChevronLeftIcon,{})})]})})},Wrapper$3=styled$4(Flex)(({theme:tt})=>({position:"relative",background:colors.BG1,width:"100%",margin:"64px auto 20px 10px",borderRadius:"16px",zIndex:29,[tt.breakpoints.up("sm")]:{width:"390px"}})),CloseButton=styled$4(Flex)` +`, + _View = () => { + const tt = useSelectedNode(), + [et] = useDataStore((nt) => [nt.showTeachMe]) + if (et) return jsxRuntimeExports.jsx(TeachMeText, {}) + switch (tt == null ? void 0 : tt.node_type) { + case 'twitter': + return jsxRuntimeExports.jsx(Twitter, {}) + case 'guest': + return jsxRuntimeExports.jsx(Person, {}) + case 'data_series': + return jsxRuntimeExports.jsx(Data, {}) + case 'tribe_message': + return jsxRuntimeExports.jsx(Messages, {}) + case 'tweet': + return jsxRuntimeExports.jsx(TwitData, {}) + case 'topic': + return jsxRuntimeExports.jsx(Topic, {}) + case 'show': + return jsxRuntimeExports.jsx(Show, {}) + case 'clip': + return (tt == null ? void 0 : tt.type) === 'youtube' + ? jsxRuntimeExports.jsx(YouTube, {}) + : jsxRuntimeExports.jsx(AudioClip, {}) + case 'document': + return jsxRuntimeExports.jsx(TextType, {}) + default: + return jsxRuntimeExports.jsx(Creator, {}) + } + }, + SelectedNodeView = reactExports.memo(_View), + SideBarSubView = ({ open: tt }) => { + const [et, nt, rt] = useDataStore((it) => [it.setSelectedNode, it.setTeachMe, it.showTeachMe]) + return jsxRuntimeExports.jsx(Slide$1, { + direction: 'right', + in: tt, + mountOnEnter: !0, + style: { width: rt ? '700px' : '' }, + unmountOnExit: !0, + children: jsxRuntimeExports.jsxs(Wrapper$3, { + children: [ + jsxRuntimeExports.jsx(ScrollWrapper$1, { children: jsxRuntimeExports.jsx(SelectedNodeView, {}) }), + jsxRuntimeExports.jsx(CloseButton, { + onClick: () => { + et(null), nt(!1) + }, + children: jsxRuntimeExports.jsx(CloseIcon, {}), + }), + jsxRuntimeExports.jsx(CollapseButton$1, { + onClick: () => { + et(null), nt(!1) + }, + children: jsxRuntimeExports.jsx(ChevronLeftIcon, {}), + }), + ], + }), + }) + }, + Wrapper$3 = styled$4(Flex)(({ theme: tt }) => ({ + position: 'relative', + background: colors.BG1, + width: '100%', + margin: '64px auto 20px 10px', + borderRadius: '16px', + zIndex: 29, + [tt.breakpoints.up('sm')]: { width: '390px' }, + })), + CloseButton = styled$4(Flex)` font-size: 32px; color: ${colors.white}; cursor: pointer; @@ -8151,7 +234994,173 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho &:active { } -`,ScrollWrapper$1=styled$4(Flex)(()=>({height:"100%",width:"100%"})),CollapseButton$1=styled$4(Flex).attrs({align:"center",justify:"center",p:8})(({theme:tt})=>({backgroundColor:colors.BG1_NORMAL,cursor:"pointer",transitionDuration:"0.2s",position:"absolute",right:"0px",top:"50%",zIndex:1,width:"24px",height:"48px",transform:"translateY(-50%)",borderRadius:"0px 6px 6px 0px",boxShadow:"2px 0px 6px 0px rgba(0, 0, 0, 0.25) inset",color:colors.white,[tt.breakpoints.up("sm")]:{left:"100%"},"&:hover":{backgroundColor:colors.BG1_HOVER},"&:active":{backgroundColor:colors.BG1_PRESS,color:colors.GRAY6}})),ChevronRightIcon=tt=>jsxRuntimeExports.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 18 18",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsxs("g",{id:"chevron_right",children:[jsxRuntimeExports.jsx("mask",{id:"mask0_1247_21809",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"18",height:"18",children:jsxRuntimeExports.jsx("rect",{id:"Bounding box",width:"1em",height:"1em",fill:"currentColor"})}),jsxRuntimeExports.jsx("g",{mask:"url(#mask0_1247_21809)",children:jsxRuntimeExports.jsx("path",{id:"chevron_right_2",d:"M9.44998 8.99998L6.52498 6.07498C6.38748 5.93748 6.31873 5.76248 6.31873 5.54998C6.31873 5.33748 6.38748 5.16248 6.52498 5.02498C6.66248 4.88748 6.83748 4.81873 7.04998 4.81873C7.26248 4.81873 7.43748 4.88748 7.57498 5.02498L11.025 8.47498C11.1 8.54997 11.1531 8.63123 11.1844 8.71873C11.2156 8.80623 11.2312 8.89998 11.2312 8.99998C11.2312 9.09998 11.2156 9.19373 11.1844 9.28123C11.1531 9.36873 11.1 9.44998 11.025 9.52497L7.57498 12.975C7.43748 13.1125 7.26248 13.1812 7.04998 13.1812C6.83748 13.1812 6.66248 13.1125 6.52498 12.975C6.38748 12.8375 6.31873 12.6625 6.31873 12.45C6.31873 12.2375 6.38748 12.0625 6.52498 11.925L9.44998 8.99998Z",fill:"currentColor"})})]})}),Tab=()=>{const tt=useAppStore(et=>et.setSidebarOpen);return jsxRuntimeExports.jsx(ExpandButton,{onClick:()=>{tt(!0)},children:jsxRuntimeExports.jsx(ChevronRightIcon,{})})},ExpandButton=styled$4(Flex).attrs({align:"center",justify:"center",p:8})(({theme:tt})=>({backgroundColor:colors.BG1_NORMAL,cursor:"pointer",transitionDuration:"0.2s",position:"absolute",top:"50%",zIndex:1,width:"24px",height:"48px",transform:"translateY(-50%)",borderRadius:"0px 6px 6px 0px",boxShadow:"2px 0px 6px 0px rgba(0, 0, 0, 0.25) inset",color:colors.white,[tt.breakpoints.up("sm")]:{left:"64px"},"&:hover":{backgroundColor:colors.BG1_HOVER},"&:active":{backgroundColor:colors.BG1_PRESS,color:colors.GRAY6}})),TRENDING_TOPICS=["Drivechain","Ordinals","L402","Nostr","AI"],Trending=({onSubmit:tt})=>{const[et,nt]=reactExports.useState([]),[rt,it]=reactExports.useState(!1),{setValue:ot}=useFormContext();reactExports.useEffect(()=>{(async()=>{it(!0);try{const lt=await getTrends();lt.length&&nt(lt.map(ct=>ct.topic))}catch{nt(TRENDING_TOPICS)}finally{it(!1)}})()},[]);const at=st=>{ot("search",st),tt==null||tt()};return jsxRuntimeExports.jsxs(Wrapper$2,{children:[jsxRuntimeExports.jsxs("div",{className:"heading",children:[jsxRuntimeExports.jsx("span",{className:"heading__title",children:"Trending Topics"}),jsxRuntimeExports.jsx("span",{className:"heading__icon",children:rt?jsxRuntimeExports.jsx(ClipLoader$2,{color:colors.PRIMARY_BLUE,size:16}):jsxRuntimeExports.jsx(SentimentDataIcon,{})})]}),jsxRuntimeExports.jsx("ul",{className:"list",children:rt?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(StyledSkeleton,{animation:"wave",height:47,variant:"rectangular",width:382}),jsxRuntimeExports.jsx(StyledSkeleton,{animation:"wave",height:47,variant:"rectangular",width:382}),jsxRuntimeExports.jsx(StyledSkeleton,{animation:"wave",height:47,variant:"rectangular",width:382}),jsxRuntimeExports.jsx(StyledSkeleton,{animation:"wave",height:47,variant:"rectangular",width:382}),jsxRuntimeExports.jsx(StyledSkeleton,{animation:"wave",height:47,variant:"rectangular",width:382})]}):jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:et.map(st=>jsxRuntimeExports.jsxs(Flex,{className:"list-item",onClick:()=>at(st),children:["#",st]},st))})})]})},Wrapper$2=styled$4(Flex)` +`, + ScrollWrapper$1 = styled$4(Flex)(() => ({ height: '100%', width: '100%' })), + CollapseButton$1 = styled$4(Flex).attrs({ align: 'center', justify: 'center', p: 8 })(({ theme: tt }) => ({ + backgroundColor: colors.BG1_NORMAL, + cursor: 'pointer', + transitionDuration: '0.2s', + position: 'absolute', + right: '0px', + top: '50%', + zIndex: 1, + width: '24px', + height: '48px', + transform: 'translateY(-50%)', + borderRadius: '0px 6px 6px 0px', + boxShadow: '2px 0px 6px 0px rgba(0, 0, 0, 0.25) inset', + color: colors.white, + [tt.breakpoints.up('sm')]: { left: '100%' }, + '&:hover': { backgroundColor: colors.BG1_HOVER }, + '&:active': { backgroundColor: colors.BG1_PRESS, color: colors.GRAY6 }, + })), + ChevronRightIcon = (tt) => + jsxRuntimeExports.jsx('svg', { + width: '1em', + height: '1em', + viewBox: '0 0 18 18', + fill: 'currentColor', + xmlns: 'http://www.w3.org/2000/svg', + children: jsxRuntimeExports.jsxs('g', { + id: 'chevron_right', + children: [ + jsxRuntimeExports.jsx('mask', { + id: 'mask0_1247_21809', + maskUnits: 'userSpaceOnUse', + x: '0', + y: '0', + width: '18', + height: '18', + children: jsxRuntimeExports.jsx('rect', { + id: 'Bounding box', + width: '1em', + height: '1em', + fill: 'currentColor', + }), + }), + jsxRuntimeExports.jsx('g', { + mask: 'url(#mask0_1247_21809)', + children: jsxRuntimeExports.jsx('path', { + id: 'chevron_right_2', + d: 'M9.44998 8.99998L6.52498 6.07498C6.38748 5.93748 6.31873 5.76248 6.31873 5.54998C6.31873 5.33748 6.38748 5.16248 6.52498 5.02498C6.66248 4.88748 6.83748 4.81873 7.04998 4.81873C7.26248 4.81873 7.43748 4.88748 7.57498 5.02498L11.025 8.47498C11.1 8.54997 11.1531 8.63123 11.1844 8.71873C11.2156 8.80623 11.2312 8.89998 11.2312 8.99998C11.2312 9.09998 11.2156 9.19373 11.1844 9.28123C11.1531 9.36873 11.1 9.44998 11.025 9.52497L7.57498 12.975C7.43748 13.1125 7.26248 13.1812 7.04998 13.1812C6.83748 13.1812 6.66248 13.1125 6.52498 12.975C6.38748 12.8375 6.31873 12.6625 6.31873 12.45C6.31873 12.2375 6.38748 12.0625 6.52498 11.925L9.44998 8.99998Z', + fill: 'currentColor', + }), + }), + ], + }), + }), + Tab = () => { + const tt = useAppStore((et) => et.setSidebarOpen) + return jsxRuntimeExports.jsx(ExpandButton, { + onClick: () => { + tt(!0) + }, + children: jsxRuntimeExports.jsx(ChevronRightIcon, {}), + }) + }, + ExpandButton = styled$4(Flex).attrs({ align: 'center', justify: 'center', p: 8 })(({ theme: tt }) => ({ + backgroundColor: colors.BG1_NORMAL, + cursor: 'pointer', + transitionDuration: '0.2s', + position: 'absolute', + top: '50%', + zIndex: 1, + width: '24px', + height: '48px', + transform: 'translateY(-50%)', + borderRadius: '0px 6px 6px 0px', + boxShadow: '2px 0px 6px 0px rgba(0, 0, 0, 0.25) inset', + color: colors.white, + [tt.breakpoints.up('sm')]: { left: '64px' }, + '&:hover': { backgroundColor: colors.BG1_HOVER }, + '&:active': { backgroundColor: colors.BG1_PRESS, color: colors.GRAY6 }, + })), + TRENDING_TOPICS = ['Drivechain', 'Ordinals', 'L402', 'Nostr', 'AI'], + Trending = ({ onSubmit: tt }) => { + const [et, nt] = reactExports.useState([]), + [rt, it] = reactExports.useState(!1), + { setValue: ot } = useFormContext() + reactExports.useEffect(() => { + ;(async () => { + it(!0) + try { + const lt = await getTrends() + lt.length && nt(lt.map((ct) => ct.topic)) + } catch { + nt(TRENDING_TOPICS) + } finally { + it(!1) + } + })() + }, []) + const at = (st) => { + ot('search', st), tt == null || tt() + } + return jsxRuntimeExports.jsxs(Wrapper$2, { + children: [ + jsxRuntimeExports.jsxs('div', { + className: 'heading', + children: [ + jsxRuntimeExports.jsx('span', { className: 'heading__title', children: 'Trending Topics' }), + jsxRuntimeExports.jsx('span', { + className: 'heading__icon', + children: rt + ? jsxRuntimeExports.jsx(ClipLoader$2, { color: colors.PRIMARY_BLUE, size: 16 }) + : jsxRuntimeExports.jsx(SentimentDataIcon, {}), + }), + ], + }), + jsxRuntimeExports.jsx('ul', { + className: 'list', + children: rt + ? jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { + children: [ + jsxRuntimeExports.jsx(StyledSkeleton, { + animation: 'wave', + height: 47, + variant: 'rectangular', + width: 382, + }), + jsxRuntimeExports.jsx(StyledSkeleton, { + animation: 'wave', + height: 47, + variant: 'rectangular', + width: 382, + }), + jsxRuntimeExports.jsx(StyledSkeleton, { + animation: 'wave', + height: 47, + variant: 'rectangular', + width: 382, + }), + jsxRuntimeExports.jsx(StyledSkeleton, { + animation: 'wave', + height: 47, + variant: 'rectangular', + width: 382, + }), + jsxRuntimeExports.jsx(StyledSkeleton, { + animation: 'wave', + height: 47, + variant: 'rectangular', + width: 382, + }), + ], + }) + : jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { + children: et.map((st) => + jsxRuntimeExports.jsxs( + Flex, + { className: 'list-item', onClick: () => at(st), children: ['#', st] }, + st, + ), + ), + }), + }), + ], + }) + }, + Wrapper$2 = styled$4(Flex)` .heading { color: ${colors.GRAY6}; padding: 0 24px 9px 24px; @@ -8199,13 +235208,147 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho } } } -`,StyledSkeleton=styled$4(Skeleton$2)` +`, + StyledSkeleton = styled$4(Skeleton$2)` && { background: rgba(0, 0, 0, 0.15); } -`,MENU_WIDTH=390,Content=reactExports.forwardRef(({onSubmit:tt,subViewOpen:et},nt)=>{const[rt,it]=useDataStore(pt=>[pt.isFetching,pt.setTeachMe]),ot=useGraphData(),[at,st,lt]=useAppStore(pt=>[pt.setSidebarOpen,pt.currentSearch,pt.clearSearch]),{setValue:ct}=useFormContext(),ut=reactExports.useRef(null),[ht,dt]=reactExports.useState(!1);return reactExports.useEffect(()=>{const pt=ut.current;if(!pt)return;const mt=()=>{dt((pt==null?void 0:pt.scrollTop)>0)};pt.addEventListener("scroll",mt)},[]),jsxRuntimeExports.jsxs(Wrapper$1,{ref:nt,id:"sidebar-wrapper",children:[jsxRuntimeExports.jsx(TitlePlaceholder,{}),jsxRuntimeExports.jsxs(SearchWrapper,{className:clsx$1({"has-shadow":ht}),children:[jsxRuntimeExports.jsxs(Search,{children:[jsxRuntimeExports.jsx(SearchBar,{onSubmit:tt}),jsxRuntimeExports.jsx(InputButton,{onClick:()=>{if(st){ct("search",""),lt();return}tt==null||tt()},children:rt?jsxRuntimeExports.jsx(ClipLoader$2,{color:colors.SECONDARY_BLUE,size:"20"}):jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:st?jsxRuntimeExports.jsx(ClearIcon$1,{}):jsxRuntimeExports.jsx(SearchIcon,{})})})]}),st&&jsxRuntimeExports.jsx(SearchDetails,{children:rt?jsxRuntimeExports.jsx(FetchLoaderText,{}):jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs("div",{className:"left",children:[jsxRuntimeExports.jsx("span",{className:"count",children:ot.nodes.length}),jsxRuntimeExports.jsx("span",{className:"label",children:" results"})]}),jsxRuntimeExports.jsx("div",{className:"right",children:jsxRuntimeExports.jsx(TeachMe,{})})]})})]}),!et&&jsxRuntimeExports.jsx(CollapseButton,{onClick:()=>{at(!1),it(!1)},children:jsxRuntimeExports.jsx(ChevronLeftIcon,{})}),jsxRuntimeExports.jsxs(ScrollWrapper,{ref:ut,children:[!st&&jsxRuntimeExports.jsx(TrendingWrapper,{children:jsxRuntimeExports.jsx(Trending,{onSubmit:tt})}),jsxRuntimeExports.jsx(Flex,{children:rt?jsxRuntimeExports.jsx(EpisodeSkeleton,{}):jsxRuntimeExports.jsx(LatestView,{isSearchResult:!!st})})]})]})}),SideBar=({onSubmit:tt})=>{const et=useAppStore(ot=>ot.sidebarIsOpen),nt=useSelectedNode(),rt=!!nt&&nt.node_type!=="topic"&&et,[it]=useDataStore(ot=>[ot.showTeachMe]);return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Slide$1,{direction:"right",in:et,mountOnEnter:!0,unmountOnExit:!0,children:jsxRuntimeExports.jsx(Content,{onSubmit:tt,subViewOpen:rt})}),jsxRuntimeExports.jsx(SideBarSubView,{open:rt||!!it}),!et&&jsxRuntimeExports.jsx(Tab,{})]})},Wrapper$1=styled$4(Flex)(({theme:tt})=>({position:"relative",background:colors.BG1,height:"100vh",width:"100%",zIndex:30,[tt.breakpoints.up("sm")]:{width:MENU_WIDTH}})),SearchWrapper=styled$4(Flex).attrs({direction:"column",justify:"center",align:"stretch"})(({theme:tt})=>({padding:tt.spacing(3.75,2),[tt.breakpoints.up("sm")]:{padding:"12px"},"&.has-shadow":{borderBottom:"1px solid rgba(0, 0, 0, 0.25)",background:colors.BG1,boxShadow:"0px 1px 6px 0px rgba(0, 0, 0, 0.20)"}})),Search=styled$4(Flex).attrs({direction:"row",justify:"center",align:"center"})` +`, + MENU_WIDTH = 390, + Content = reactExports.forwardRef(({ onSubmit: tt, subViewOpen: et }, nt) => { + const [rt, it] = useDataStore((pt) => [pt.isFetching, pt.setTeachMe]), + ot = useGraphData(), + [at, st, lt] = useAppStore((pt) => [pt.setSidebarOpen, pt.currentSearch, pt.clearSearch]), + { setValue: ct } = useFormContext(), + ut = reactExports.useRef(null), + [ht, dt] = reactExports.useState(!1) + return ( + reactExports.useEffect(() => { + const pt = ut.current + if (!pt) return + const mt = () => { + dt((pt == null ? void 0 : pt.scrollTop) > 0) + } + pt.addEventListener('scroll', mt) + }, []), + jsxRuntimeExports.jsxs(Wrapper$1, { + ref: nt, + id: 'sidebar-wrapper', + children: [ + jsxRuntimeExports.jsx(TitlePlaceholder, {}), + jsxRuntimeExports.jsxs(SearchWrapper, { + className: clsx$1({ 'has-shadow': ht }), + children: [ + jsxRuntimeExports.jsxs(Search, { + children: [ + jsxRuntimeExports.jsx(SearchBar, { onSubmit: tt }), + jsxRuntimeExports.jsx(InputButton, { + onClick: () => { + if (st) { + ct('search', ''), lt() + return + } + tt == null || tt() + }, + children: rt + ? jsxRuntimeExports.jsx(ClipLoader$2, { color: colors.SECONDARY_BLUE, size: '20' }) + : jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { + children: st + ? jsxRuntimeExports.jsx(ClearIcon$1, {}) + : jsxRuntimeExports.jsx(SearchIcon, {}), + }), + }), + ], + }), + st && + jsxRuntimeExports.jsx(SearchDetails, { + children: rt + ? jsxRuntimeExports.jsx(FetchLoaderText, {}) + : jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { + children: [ + jsxRuntimeExports.jsxs('div', { + className: 'left', + children: [ + jsxRuntimeExports.jsx('span', { className: 'count', children: ot.nodes.length }), + jsxRuntimeExports.jsx('span', { className: 'label', children: ' results' }), + ], + }), + jsxRuntimeExports.jsx('div', { + className: 'right', + children: jsxRuntimeExports.jsx(TeachMe, {}), + }), + ], + }), + }), + ], + }), + !et && + jsxRuntimeExports.jsx(CollapseButton, { + onClick: () => { + at(!1), it(!1) + }, + children: jsxRuntimeExports.jsx(ChevronLeftIcon, {}), + }), + jsxRuntimeExports.jsxs(ScrollWrapper, { + ref: ut, + children: [ + !st && + jsxRuntimeExports.jsx(TrendingWrapper, { + children: jsxRuntimeExports.jsx(Trending, { onSubmit: tt }), + }), + jsxRuntimeExports.jsx(Flex, { + children: rt + ? jsxRuntimeExports.jsx(EpisodeSkeleton, {}) + : jsxRuntimeExports.jsx(LatestView, { isSearchResult: !!st }), + }), + ], + }), + ], + }) + ) + }), + SideBar = ({ onSubmit: tt }) => { + const et = useAppStore((ot) => ot.sidebarIsOpen), + nt = useSelectedNode(), + rt = !!nt && nt.node_type !== 'topic' && et, + [it] = useDataStore((ot) => [ot.showTeachMe]) + return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { + children: [ + jsxRuntimeExports.jsx(Slide$1, { + direction: 'right', + in: et, + mountOnEnter: !0, + unmountOnExit: !0, + children: jsxRuntimeExports.jsx(Content, { onSubmit: tt, subViewOpen: rt }), + }), + jsxRuntimeExports.jsx(SideBarSubView, { open: rt || !!it }), + !et && jsxRuntimeExports.jsx(Tab, {}), + ], + }) + }, + Wrapper$1 = styled$4(Flex)(({ theme: tt }) => ({ + position: 'relative', + background: colors.BG1, + height: '100vh', + width: '100%', + zIndex: 30, + [tt.breakpoints.up('sm')]: { width: MENU_WIDTH }, + })), + SearchWrapper = styled$4(Flex).attrs({ direction: 'column', justify: 'center', align: 'stretch' })( + ({ theme: tt }) => ({ + padding: tt.spacing(3.75, 2), + [tt.breakpoints.up('sm')]: { padding: '12px' }, + '&.has-shadow': { + borderBottom: '1px solid rgba(0, 0, 0, 0.25)', + background: colors.BG1, + boxShadow: '0px 1px 6px 0px rgba(0, 0, 0, 0.20)', + }, + }), + ), + Search = styled$4(Flex).attrs({ direction: 'row', justify: 'center', align: 'center' })` flex-grow: 1; -`,SearchDetails=styled$4(Flex).attrs({direction:"row",justify:"space-between",align:"center"})` +`, + SearchDetails = styled$4(Flex).attrs({ direction: 'row', justify: 'space-between', align: 'center' })` flex-grow: 1; color: ${colors.GRAY6}; font-family: Barlow; @@ -8222,7 +235365,8 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho .right { display: flex; } -`,InputButton=styled$4(Flex).attrs({align:"center",justify:"center",p:5})` +`, + InputButton = styled$4(Flex).attrs({ align: 'center', justify: 'center', p: 5 })` font-size: 32px; color: ${colors.mainBottomIcons}; cursor: pointer; @@ -8237,14 +235381,37 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho ${SearchWrapper} input:focus + & { color: ${colors.primaryBlue}; } -`,CollapseButton=styled$4(Flex).attrs({align:"center",justify:"center",p:8})(({theme:tt})=>({backgroundColor:colors.BG1_NORMAL,cursor:"pointer",transitionDuration:"0.2s",position:"absolute",right:"0px",top:"50%",zIndex:1,width:"24px",height:"48px",transform:"translateY(-50%)",borderRadius:"0px 6px 6px 0px",boxShadow:"2px 0px 6px 0px rgba(0, 0, 0, 0.25) inset",color:colors.white,[tt.breakpoints.up("sm")]:{left:"100%"},"&:hover":{backgroundColor:colors.BG1_HOVER},"&:active":{backgroundColor:colors.BG1_PRESS,color:colors.GRAY6}})),ScrollWrapper=styled$4(Flex)(()=>({overflow:"auto",flex:1,width:"100%"})),TitlePlaceholder=styled$4(Flex)` +`, + CollapseButton = styled$4(Flex).attrs({ align: 'center', justify: 'center', p: 8 })(({ theme: tt }) => ({ + backgroundColor: colors.BG1_NORMAL, + cursor: 'pointer', + transitionDuration: '0.2s', + position: 'absolute', + right: '0px', + top: '50%', + zIndex: 1, + width: '24px', + height: '48px', + transform: 'translateY(-50%)', + borderRadius: '0px 6px 6px 0px', + boxShadow: '2px 0px 6px 0px rgba(0, 0, 0, 0.25) inset', + color: colors.white, + [tt.breakpoints.up('sm')]: { left: '100%' }, + '&:hover': { backgroundColor: colors.BG1_HOVER }, + '&:active': { backgroundColor: colors.BG1_PRESS, color: colors.GRAY6 }, + })), + ScrollWrapper = styled$4(Flex)(() => ({ overflow: 'auto', flex: 1, width: '100%' })), + TitlePlaceholder = styled$4(Flex)` height: 64px; background: ${colors.BG2}; -`,TrendingWrapper=styled$4(Flex)` +`, + TrendingWrapper = styled$4(Flex)` padding: 0; margin-bottom: 36px; margin-top: 20px; -`;SideBar.displayName="Sidebar";const Toasts=styled$4(ToastContainer)` +` + SideBar.displayName = 'Sidebar' + const Toasts = styled$4(ToastContainer)` .Toastify__toast { background-color: ${colors.body}; } @@ -8261,15 +235428,220 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho .Toastify__progress-bar--success { background-color: ${colors.primaryGreen}; } -`,Wrapper=styled$4(Flex)` +`, + Wrapper = styled$4(Flex)` height: 100%; width: 100%; background-color: ${colors.black}; -`,Version=styled$4(Flex)` +`, + Version = styled$4(Flex)` position: absolute; bottom: 8px; left: 8px; color: ${colors.white}; font-size: 12px; opacity: 0.5; -`,App=()=>{const{open:tt}=useModal("budgetExplanation"),[et]=useUserStore(kt=>[kt.setBudget]),[nt,rt,it,ot,at,st]=[useAppStore(kt=>kt.setSidebarOpen),useAppStore(kt=>kt.currentSearch),useAppStore(kt=>kt.setCurrentSearch),useAppStore(kt=>kt.setRelevanceSelected),useAppStore(kt=>kt.setTranscriptOpen),useAppStore(kt=>kt.hasBudgetExplanationModalBeSeen)],lt=useTeachStore(kt=>kt.setTeachMeAnswer),[ct,ut,ht,dt,pt,mt,gt]=[useDataStore(kt=>kt.data),useDataStore(kt=>kt.setData),useDataStore(kt=>kt.fetchData),useDataStore(kt=>kt.graphStyle),useDataStore(kt=>kt.setSphinxModalOpen),useDataStore(kt=>kt.setSelectedNode),useDataStore(kt=>kt.setCategoryFilter)],yt=useForm({mode:"onChange"}),bt=yt.handleSubmit(({search:kt})=>{at(!1),mt(null),ot(!1),it(kt),lt(""),gt(null)}),vt=reactExports.useCallback(async()=>{rt&&(pt(!0),isE2E||(await distExports$1.enable(),await updateBudget(et)),await distExports$1.enable(),await updateBudget(et),pt(!1)),await ht(rt),nt(!0),await updateBudget(et)},[ht,rt,pt,nt,et]);reactExports.useEffect(()=>{if(rt&&!st){tt();return}vt()},[rt,vt,st]);const xt=()=>{if(ct){const kt=getGraphDataPositions(dt,ct.nodes);ut(kt)}};return reactExports.useEffect(()=>{xt()},[dt]),jsxRuntimeExports.jsxs(AppProviders,{children:[jsxRuntimeExports.jsx(GlobalStyle,{}),jsxRuntimeExports.jsx(Leva,{hidden:!isDevelopment}),jsxRuntimeExports.jsxs(Wrapper,{direction:"row",children:[jsxRuntimeExports.jsx(DataRetriever,{loader:jsxRuntimeExports.jsx(Preloader,{}),children:jsxRuntimeExports.jsxs(FormProvider,{...yt,children:[jsxRuntimeExports.jsx(MainToolbar,{}),jsxRuntimeExports.jsx(SideBar,{onSubmit:bt}),jsxRuntimeExports.jsx(Universe,{}),jsxRuntimeExports.jsx(SecondarySideBar,{}),jsxRuntimeExports.jsx(AppBar,{}),jsxRuntimeExports.jsxs(Version,{children:["v",version]}),jsxRuntimeExports.jsx(ActionsToolbar,{})]})}),jsxRuntimeExports.jsx(AddNodeModal,{}),jsxRuntimeExports.jsx(Toasts,{}),jsxRuntimeExports.jsx(BudgetExplanationModal,{}),jsxRuntimeExports.jsx(SourcesTableModal,{}),jsxRuntimeExports.jsx(Helper,{})]}),jsxRuntimeExports.jsx(E2ETests,{})]})},scriptRel="modulepreload",assetsURL=function(tt){return"/"+tt},seen={},__vitePreload=function tt(et,nt,rt){if(!nt||nt.length===0)return et();const it=document.getElementsByTagName("link");return Promise.all(nt.map(ot=>{if(ot=assetsURL(ot),ot in seen)return;seen[ot]=!0;const at=ot.endsWith(".css"),st=at?'[rel="stylesheet"]':"";if(!!rt)for(let ut=it.length-1;ut>=0;ut--){const ht=it[ut];if(ht.href===ot&&(!at||ht.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${ot}"]${st}`))return;const ct=document.createElement("link");if(ct.rel=at?"stylesheet":scriptRel,at||(ct.as="script",ct.crossOrigin=""),ct.href=ot,document.head.appendChild(ct),at)return new Promise((ut,ht)=>{ct.addEventListener("load",ut),ct.addEventListener("error",()=>ht(new Error(`Unable to preload CSS for ${ot}`)))})})).then(()=>et()).catch(ot=>{const at=new Event("vite:preloadError",{cancelable:!0});if(at.payload=ot,window.dispatchEvent(at),!at.defaultPrevented)throw ot})},reportWebVitals=tt=>{tt&&tt instanceof Function&&__vitePreload(()=>import("./web-vitals-60d3425a.js"),[]).then(({getCLS:et,getFID:nt,getFCP:rt,getLCP:it,getTTFB:ot})=>{et(tt),nt(tt),rt(tt),it(tt),ot(tt)})},index="",styles="",getElementsMemoized=()=>{const tt={};return()=>{if(tt.inner&&tt.body)return tt;const et=document.querySelector("body"),nt=document.createElement("div"),rt=document.createElement("div"),it=document.createElement("div"),ot=document.createElement("div"),at=()=>{nt.classList.toggle("hide")};return it.addEventListener("click",at),ot.addEventListener("click",at),nt.classList.add("loggerWrapper"),nt.classList.add("hide"),rt.classList.add("loggerInner"),it.classList.add("close"),ot.classList.add("open"),it.textContent="X",ot.textContent="OPEN LOG",et==null||et.appendChild(nt),et==null||et.appendChild(ot),nt.appendChild(it),nt.appendChild(rt),tt.body=et,tt.inner=rt,{body:et,inner:rt}}},getElements=getElementsMemoized(),variants=["log","info","warn","error"],logMessage=(tt,et)=>{const{inner:nt}=getElements(),rt=document.createElement("span");rt.textContent=tt,rt.classList.add("message"),rt.classList.add(et),nt.appendChild(rt)},overrideConsole=()=>{if(!window.location.hostname.includes("local"))return;const tt=function(et){const nt=variants.reduce((rt,it)=>({...rt,[it](...ot){et[it](...ot),logMessage(JSON.stringify(ot,null," "),it)}}),{});return{...et,...nt}}(window.console);window.console=tt},root=client$1.createRoot(document.getElementById("root"));root.render(isE2E?jsxRuntimeExports.jsx(App,{}):jsxRuntimeExports.jsx(React$1.StrictMode,{children:jsxRuntimeExports.jsx(App,{})}));reportWebVitals();overrideConsole()});export default s4(); +`, + App = () => { + const { open: tt } = useModal('budgetExplanation'), + [et] = useUserStore((kt) => [kt.setBudget]), + [nt, rt, it, ot, at, st] = [ + useAppStore((kt) => kt.setSidebarOpen), + useAppStore((kt) => kt.currentSearch), + useAppStore((kt) => kt.setCurrentSearch), + useAppStore((kt) => kt.setRelevanceSelected), + useAppStore((kt) => kt.setTranscriptOpen), + useAppStore((kt) => kt.hasBudgetExplanationModalBeSeen), + ], + lt = useTeachStore((kt) => kt.setTeachMeAnswer), + [ct, ut, ht, dt, pt, mt, gt] = [ + useDataStore((kt) => kt.data), + useDataStore((kt) => kt.setData), + useDataStore((kt) => kt.fetchData), + useDataStore((kt) => kt.graphStyle), + useDataStore((kt) => kt.setSphinxModalOpen), + useDataStore((kt) => kt.setSelectedNode), + useDataStore((kt) => kt.setCategoryFilter), + ], + yt = useForm({ mode: 'onChange' }), + bt = yt.handleSubmit(({ search: kt }) => { + at(!1), mt(null), ot(!1), it(kt), lt(''), gt(null) + }), + vt = reactExports.useCallback(async () => { + rt && + (pt(!0), + isE2E || (await distExports$1.enable(), await updateBudget(et)), + await distExports$1.enable(), + await updateBudget(et), + pt(!1)), + await ht(rt), + nt(!0), + await updateBudget(et) + }, [ht, rt, pt, nt, et]) + reactExports.useEffect(() => { + if (rt && !st) { + tt() + return + } + vt() + }, [rt, vt, st]) + const xt = () => { + if (ct) { + const kt = getGraphDataPositions(dt, ct.nodes) + ut(kt) + } + } + return ( + reactExports.useEffect(() => { + xt() + }, [dt]), + jsxRuntimeExports.jsxs(AppProviders, { + children: [ + jsxRuntimeExports.jsx(GlobalStyle, {}), + jsxRuntimeExports.jsx(Leva, { hidden: !isDevelopment }), + jsxRuntimeExports.jsxs(Wrapper, { + direction: 'row', + children: [ + jsxRuntimeExports.jsx(DataRetriever, { + loader: jsxRuntimeExports.jsx(Preloader, {}), + children: jsxRuntimeExports.jsxs(FormProvider, { + ...yt, + children: [ + jsxRuntimeExports.jsx(MainToolbar, {}), + jsxRuntimeExports.jsx(SideBar, { onSubmit: bt }), + jsxRuntimeExports.jsx(Universe, {}), + jsxRuntimeExports.jsx(SecondarySideBar, {}), + jsxRuntimeExports.jsx(AppBar, {}), + jsxRuntimeExports.jsxs(Version, { children: ['v', version] }), + jsxRuntimeExports.jsx(ActionsToolbar, {}), + ], + }), + }), + jsxRuntimeExports.jsx(AddNodeModal, {}), + jsxRuntimeExports.jsx(Toasts, {}), + jsxRuntimeExports.jsx(BudgetExplanationModal, {}), + jsxRuntimeExports.jsx(SourcesTableModal, {}), + jsxRuntimeExports.jsx(Helper, {}), + ], + }), + jsxRuntimeExports.jsx(E2ETests, {}), + ], + }) + ) + }, + scriptRel = 'modulepreload', + assetsURL = function (tt) { + return '/' + tt + }, + seen = {}, + __vitePreload = function tt(et, nt, rt) { + if (!nt || nt.length === 0) return et() + const it = document.getElementsByTagName('link') + return Promise.all( + nt.map((ot) => { + if (((ot = assetsURL(ot)), ot in seen)) return + seen[ot] = !0 + const at = ot.endsWith('.css'), + st = at ? '[rel="stylesheet"]' : '' + if (!!rt) + for (let ut = it.length - 1; ut >= 0; ut--) { + const ht = it[ut] + if (ht.href === ot && (!at || ht.rel === 'stylesheet')) return + } + else if (document.querySelector(`link[href="${ot}"]${st}`)) return + const ct = document.createElement('link') + if ( + ((ct.rel = at ? 'stylesheet' : scriptRel), + at || ((ct.as = 'script'), (ct.crossOrigin = '')), + (ct.href = ot), + document.head.appendChild(ct), + at) + ) + return new Promise((ut, ht) => { + ct.addEventListener('load', ut), + ct.addEventListener('error', () => ht(new Error(`Unable to preload CSS for ${ot}`))) + }) + }), + ) + .then(() => et()) + .catch((ot) => { + const at = new Event('vite:preloadError', { cancelable: !0 }) + if (((at.payload = ot), window.dispatchEvent(at), !at.defaultPrevented)) throw ot + }) + }, + reportWebVitals = (tt) => { + tt && + tt instanceof Function && + __vitePreload(() => import('./web-vitals-60d3425a.js'), []).then( + ({ getCLS: et, getFID: nt, getFCP: rt, getLCP: it, getTTFB: ot }) => { + et(tt), nt(tt), rt(tt), it(tt), ot(tt) + }, + ) + }, + index = '', + styles = '', + getElementsMemoized = () => { + const tt = {} + return () => { + if (tt.inner && tt.body) return tt + const et = document.querySelector('body'), + nt = document.createElement('div'), + rt = document.createElement('div'), + it = document.createElement('div'), + ot = document.createElement('div'), + at = () => { + nt.classList.toggle('hide') + } + return ( + it.addEventListener('click', at), + ot.addEventListener('click', at), + nt.classList.add('loggerWrapper'), + nt.classList.add('hide'), + rt.classList.add('loggerInner'), + it.classList.add('close'), + ot.classList.add('open'), + (it.textContent = 'X'), + (ot.textContent = 'OPEN LOG'), + et == null || et.appendChild(nt), + et == null || et.appendChild(ot), + nt.appendChild(it), + nt.appendChild(rt), + (tt.body = et), + (tt.inner = rt), + { body: et, inner: rt } + ) + } + }, + getElements = getElementsMemoized(), + variants = ['log', 'info', 'warn', 'error'], + logMessage = (tt, et) => { + const { inner: nt } = getElements(), + rt = document.createElement('span') + ;(rt.textContent = tt), rt.classList.add('message'), rt.classList.add(et), nt.appendChild(rt) + }, + overrideConsole = () => { + if (!window.location.hostname.includes('local')) return + const tt = (function (et) { + const nt = variants.reduce( + (rt, it) => ({ + ...rt, + [it](...ot) { + et[it](...ot), logMessage(JSON.stringify(ot, null, ' '), it) + }, + }), + {}, + ) + return { ...et, ...nt } + })(window.console) + window.console = tt + }, + root = client$1.createRoot(document.getElementById('root')) + root.render( + isE2E + ? jsxRuntimeExports.jsx(App, {}) + : jsxRuntimeExports.jsx(React$1.StrictMode, { children: jsxRuntimeExports.jsx(App, {}) }), + ) + reportWebVitals() + overrideConsole() +}) +export default s4() diff --git a/build/assets/index-381991a0.css b/build/assets/index-381991a0.css index 1533c8dad..0c6cb7422 100644 --- a/build/assets/index-381991a0.css +++ b/build/assets/index-381991a0.css @@ -1 +1,1145 @@ -:root{--toastify-color-light: #fff;--toastify-color-dark: #121212;--toastify-color-info: #3498db;--toastify-color-success: #07bc0c;--toastify-color-warning: #f1c40f;--toastify-color-error: #e74c3c;--toastify-color-transparent: rgba(255, 255, 255, .7);--toastify-icon-color-info: var(--toastify-color-info);--toastify-icon-color-success: var(--toastify-color-success);--toastify-icon-color-warning: var(--toastify-color-warning);--toastify-icon-color-error: var(--toastify-color-error);--toastify-toast-width: 320px;--toastify-toast-background: #fff;--toastify-toast-min-height: 64px;--toastify-toast-max-height: 800px;--toastify-font-family: sans-serif;--toastify-z-index: 9999;--toastify-text-color-light: #757575;--toastify-text-color-dark: #fff;--toastify-text-color-info: #fff;--toastify-text-color-success: #fff;--toastify-text-color-warning: #fff;--toastify-text-color-error: #fff;--toastify-spinner-color: #616161;--toastify-spinner-color-empty-area: #e0e0e0;--toastify-color-progress-light: linear-gradient( to right, #4cd964, #5ac8fa, #007aff, #34aadc, #5856d6, #ff2d55 );--toastify-color-progress-dark: #bb86fc;--toastify-color-progress-info: var(--toastify-color-info);--toastify-color-progress-success: var(--toastify-color-success);--toastify-color-progress-warning: var(--toastify-color-warning);--toastify-color-progress-error: var(--toastify-color-error)}.Toastify__toast-container{z-index:var(--toastify-z-index);-webkit-transform:translate3d(0,0,var(--toastify-z-index) px);position:fixed;padding:4px;width:var(--toastify-toast-width);box-sizing:border-box;color:#fff}.Toastify__toast-container--top-left{top:1em;left:1em}.Toastify__toast-container--top-center{top:1em;left:50%;transform:translate(-50%)}.Toastify__toast-container--top-right{top:1em;right:1em}.Toastify__toast-container--bottom-left{bottom:1em;left:1em}.Toastify__toast-container--bottom-center{bottom:1em;left:50%;transform:translate(-50%)}.Toastify__toast-container--bottom-right{bottom:1em;right:1em}@media only screen and (max-width : 480px){.Toastify__toast-container{width:100vw;padding:0;left:0;margin:0}.Toastify__toast-container--top-left,.Toastify__toast-container--top-center,.Toastify__toast-container--top-right{top:0;transform:translate(0)}.Toastify__toast-container--bottom-left,.Toastify__toast-container--bottom-center,.Toastify__toast-container--bottom-right{bottom:0;transform:translate(0)}.Toastify__toast-container--rtl{right:0;left:initial}}.Toastify__toast{position:relative;min-height:var(--toastify-toast-min-height);box-sizing:border-box;margin-bottom:1rem;padding:8px;border-radius:4px;box-shadow:0 1px 10px #0000001a,0 2px 15px #0000000d;display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;max-height:var(--toastify-toast-max-height);overflow:hidden;font-family:var(--toastify-font-family);cursor:pointer;direction:ltr}.Toastify__toast--rtl{direction:rtl}.Toastify__toast-body{margin:auto 0;-ms-flex:1 1 auto;flex:1 1 auto;padding:6px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.Toastify__toast-body>div:last-child{-ms-flex:1;flex:1}.Toastify__toast-icon{-webkit-margin-end:10px;margin-inline-end:10px;width:20px;-ms-flex-negative:0;flex-shrink:0;display:-ms-flexbox;display:flex}.Toastify--animate{animation-fill-mode:both;animation-duration:.7s}.Toastify--animate-icon{animation-fill-mode:both;animation-duration:.3s}@media only screen and (max-width : 480px){.Toastify__toast{margin-bottom:0;border-radius:0}}.Toastify__toast-theme--dark{background:var(--toastify-color-dark);color:var(--toastify-text-color-dark)}.Toastify__toast-theme--light,.Toastify__toast-theme--colored.Toastify__toast--default{background:var(--toastify-color-light);color:var(--toastify-text-color-light)}.Toastify__toast-theme--colored.Toastify__toast--info{color:var(--toastify-text-color-info);background:var(--toastify-color-info)}.Toastify__toast-theme--colored.Toastify__toast--success{color:var(--toastify-text-color-success);background:var(--toastify-color-success)}.Toastify__toast-theme--colored.Toastify__toast--warning{color:var(--toastify-text-color-warning);background:var(--toastify-color-warning)}.Toastify__toast-theme--colored.Toastify__toast--error{color:var(--toastify-text-color-error);background:var(--toastify-color-error)}.Toastify__progress-bar-theme--light{background:var(--toastify-color-progress-light)}.Toastify__progress-bar-theme--dark{background:var(--toastify-color-progress-dark)}.Toastify__progress-bar--info{background:var(--toastify-color-progress-info)}.Toastify__progress-bar--success{background:var(--toastify-color-progress-success)}.Toastify__progress-bar--warning{background:var(--toastify-color-progress-warning)}.Toastify__progress-bar--error{background:var(--toastify-color-progress-error)}.Toastify__progress-bar-theme--colored.Toastify__progress-bar--info,.Toastify__progress-bar-theme--colored.Toastify__progress-bar--success,.Toastify__progress-bar-theme--colored.Toastify__progress-bar--warning,.Toastify__progress-bar-theme--colored.Toastify__progress-bar--error{background:var(--toastify-color-transparent)}.Toastify__close-button{color:#fff;background:transparent;outline:none;border:none;padding:0;cursor:pointer;opacity:.7;transition:.3s ease;-ms-flex-item-align:start;align-self:flex-start}.Toastify__close-button--light{color:#000;opacity:.3}.Toastify__close-button>svg{fill:currentColor;height:16px;width:14px}.Toastify__close-button:hover,.Toastify__close-button:focus{opacity:1}@keyframes Toastify__trackProgress{0%{transform:scaleX(1)}to{transform:scaleX(0)}}.Toastify__progress-bar{position:absolute;bottom:0;left:0;width:100%;height:5px;z-index:var(--toastify-z-index);opacity:.7;transform-origin:left}.Toastify__progress-bar--animated{animation:Toastify__trackProgress linear 1 forwards}.Toastify__progress-bar--controlled{transition:transform .2s}.Toastify__progress-bar--rtl{right:0;left:initial;transform-origin:right}.Toastify__spinner{width:20px;height:20px;box-sizing:border-box;border:2px solid;border-radius:100%;border-color:var(--toastify-spinner-color-empty-area);border-right-color:var(--toastify-spinner-color);animation:Toastify__spin .65s linear infinite}@keyframes Toastify__bounceInRight{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(3000px,0,0)}60%{opacity:1;transform:translate3d(-25px,0,0)}75%{transform:translate3d(10px,0,0)}90%{transform:translate3d(-5px,0,0)}to{transform:none}}@keyframes Toastify__bounceOutRight{20%{opacity:1;transform:translate3d(-20px,0,0)}to{opacity:0;transform:translate3d(2000px,0,0)}}@keyframes Toastify__bounceInLeft{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(-3000px,0,0)}60%{opacity:1;transform:translate3d(25px,0,0)}75%{transform:translate3d(-10px,0,0)}90%{transform:translate3d(5px,0,0)}to{transform:none}}@keyframes Toastify__bounceOutLeft{20%{opacity:1;transform:translate3d(20px,0,0)}to{opacity:0;transform:translate3d(-2000px,0,0)}}@keyframes Toastify__bounceInUp{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(0,3000px,0)}60%{opacity:1;transform:translate3d(0,-20px,0)}75%{transform:translate3d(0,10px,0)}90%{transform:translate3d(0,-5px,0)}to{transform:translateZ(0)}}@keyframes Toastify__bounceOutUp{20%{transform:translate3d(0,-10px,0)}40%,45%{opacity:1;transform:translate3d(0,20px,0)}to{opacity:0;transform:translate3d(0,-2000px,0)}}@keyframes Toastify__bounceInDown{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(0,-3000px,0)}60%{opacity:1;transform:translate3d(0,25px,0)}75%{transform:translate3d(0,-10px,0)}90%{transform:translate3d(0,5px,0)}to{transform:none}}@keyframes Toastify__bounceOutDown{20%{transform:translate3d(0,10px,0)}40%,45%{opacity:1;transform:translate3d(0,-20px,0)}to{opacity:0;transform:translate3d(0,2000px,0)}}.Toastify__bounce-enter--top-left,.Toastify__bounce-enter--bottom-left{animation-name:Toastify__bounceInLeft}.Toastify__bounce-enter--top-right,.Toastify__bounce-enter--bottom-right{animation-name:Toastify__bounceInRight}.Toastify__bounce-enter--top-center{animation-name:Toastify__bounceInDown}.Toastify__bounce-enter--bottom-center{animation-name:Toastify__bounceInUp}.Toastify__bounce-exit--top-left,.Toastify__bounce-exit--bottom-left{animation-name:Toastify__bounceOutLeft}.Toastify__bounce-exit--top-right,.Toastify__bounce-exit--bottom-right{animation-name:Toastify__bounceOutRight}.Toastify__bounce-exit--top-center{animation-name:Toastify__bounceOutUp}.Toastify__bounce-exit--bottom-center{animation-name:Toastify__bounceOutDown}@keyframes Toastify__zoomIn{0%{opacity:0;transform:scale3d(.3,.3,.3)}50%{opacity:1}}@keyframes Toastify__zoomOut{0%{opacity:1}50%{opacity:0;transform:scale3d(.3,.3,.3)}to{opacity:0}}.Toastify__zoom-enter{animation-name:Toastify__zoomIn}.Toastify__zoom-exit{animation-name:Toastify__zoomOut}@keyframes Toastify__flipIn{0%{transform:perspective(400px) rotateX(90deg);animation-timing-function:ease-in;opacity:0}40%{transform:perspective(400px) rotateX(-20deg);animation-timing-function:ease-in}60%{transform:perspective(400px) rotateX(10deg);opacity:1}80%{transform:perspective(400px) rotateX(-5deg)}to{transform:perspective(400px)}}@keyframes Toastify__flipOut{0%{transform:perspective(400px)}30%{transform:perspective(400px) rotateX(-20deg);opacity:1}to{transform:perspective(400px) rotateX(90deg);opacity:0}}.Toastify__flip-enter{animation-name:Toastify__flipIn}.Toastify__flip-exit{animation-name:Toastify__flipOut}@keyframes Toastify__slideInRight{0%{transform:translate3d(110%,0,0);visibility:visible}to{transform:translateZ(0)}}@keyframes Toastify__slideInLeft{0%{transform:translate3d(-110%,0,0);visibility:visible}to{transform:translateZ(0)}}@keyframes Toastify__slideInUp{0%{transform:translate3d(0,110%,0);visibility:visible}to{transform:translateZ(0)}}@keyframes Toastify__slideInDown{0%{transform:translate3d(0,-110%,0);visibility:visible}to{transform:translateZ(0)}}@keyframes Toastify__slideOutRight{0%{transform:translateZ(0)}to{visibility:hidden;transform:translate3d(110%,0,0)}}@keyframes Toastify__slideOutLeft{0%{transform:translateZ(0)}to{visibility:hidden;transform:translate3d(-110%,0,0)}}@keyframes Toastify__slideOutDown{0%{transform:translateZ(0)}to{visibility:hidden;transform:translate3d(0,500px,0)}}@keyframes Toastify__slideOutUp{0%{transform:translateZ(0)}to{visibility:hidden;transform:translate3d(0,-500px,0)}}.Toastify__slide-enter--top-left,.Toastify__slide-enter--bottom-left{animation-name:Toastify__slideInLeft}.Toastify__slide-enter--top-right,.Toastify__slide-enter--bottom-right{animation-name:Toastify__slideInRight}.Toastify__slide-enter--top-center{animation-name:Toastify__slideInDown}.Toastify__slide-enter--bottom-center{animation-name:Toastify__slideInUp}.Toastify__slide-exit--top-left,.Toastify__slide-exit--bottom-left{animation-name:Toastify__slideOutLeft}.Toastify__slide-exit--top-right,.Toastify__slide-exit--bottom-right{animation-name:Toastify__slideOutRight}.Toastify__slide-exit--top-center{animation-name:Toastify__slideOutUp}.Toastify__slide-exit--bottom-center{animation-name:Toastify__slideOutDown}@keyframes Toastify__spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.react-flow__container{position:absolute;width:100%;height:100%;top:0;left:0}.react-flow__pane{z-index:1;cursor:-webkit-grab;cursor:grab}.react-flow__pane.selection{cursor:pointer}.react-flow__pane.dragging{cursor:-webkit-grabbing;cursor:grabbing}.react-flow__viewport{transform-origin:0 0;z-index:2;pointer-events:none}.react-flow__renderer{z-index:4}.react-flow__selection{z-index:6}.react-flow__nodesselection-rect:focus,.react-flow__nodesselection-rect:focus-visible{outline:none}.react-flow .react-flow__edges{pointer-events:none;overflow:visible}.react-flow__edge-path,.react-flow__connection-path{stroke:#b1b1b7;stroke-width:1;fill:none}.react-flow__edge{pointer-events:visibleStroke;cursor:pointer}.react-flow__edge.animated path{stroke-dasharray:5;-webkit-animation:dashdraw .5s linear infinite;animation:dashdraw .5s linear infinite}.react-flow__edge.animated path.react-flow__edge-interaction{stroke-dasharray:none;-webkit-animation:none;animation:none}.react-flow__edge.inactive{pointer-events:none}.react-flow__edge.selected,.react-flow__edge:focus,.react-flow__edge:focus-visible{outline:none}.react-flow__edge.selected .react-flow__edge-path,.react-flow__edge:focus .react-flow__edge-path,.react-flow__edge:focus-visible .react-flow__edge-path{stroke:#555}.react-flow__edge-textwrapper{pointer-events:all}.react-flow__edge-textbg{fill:#fff}.react-flow__edge .react-flow__edge-text{pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.react-flow__connection{pointer-events:none}.react-flow__connection .animated{stroke-dasharray:5;-webkit-animation:dashdraw .5s linear infinite;animation:dashdraw .5s linear infinite}.react-flow__connectionline{z-index:1001}.react-flow__nodes{pointer-events:none;transform-origin:0 0}.react-flow__node{position:absolute;-webkit-user-select:none;-moz-user-select:none;user-select:none;pointer-events:all;transform-origin:0 0;box-sizing:border-box;cursor:-webkit-grab;cursor:grab}.react-flow__node.dragging{cursor:-webkit-grabbing;cursor:grabbing}.react-flow__nodesselection{z-index:3;transform-origin:left top;pointer-events:none}.react-flow__nodesselection-rect{position:absolute;pointer-events:all;cursor:-webkit-grab;cursor:grab}.react-flow__handle{position:absolute;pointer-events:none;min-width:5px;min-height:5px;width:6px;height:6px;background:#1a192b;border:1px solid white;border-radius:100%}.react-flow__handle.connectionindicator{pointer-events:all;cursor:crosshair}.react-flow__handle-bottom{top:auto;left:50%;bottom:-4px;transform:translate(-50%)}.react-flow__handle-top{left:50%;top:-4px;transform:translate(-50%)}.react-flow__handle-left{top:50%;left:-4px;transform:translateY(-50%)}.react-flow__handle-right{right:-4px;top:50%;transform:translateY(-50%)}.react-flow__edgeupdater{cursor:move;pointer-events:all}.react-flow__panel{position:absolute;z-index:5;margin:15px}.react-flow__panel.top{top:0}.react-flow__panel.bottom{bottom:0}.react-flow__panel.left{left:0}.react-flow__panel.right{right:0}.react-flow__panel.center{left:50%;transform:translate(-50%)}.react-flow__attribution{font-size:10px;background:rgba(255,255,255,.5);padding:2px 3px;margin:0}.react-flow__attribution a{text-decoration:none;color:#999}@-webkit-keyframes dashdraw{0%{stroke-dashoffset:10}}@keyframes dashdraw{0%{stroke-dashoffset:10}}.react-flow__edgelabel-renderer{position:absolute;width:100%;height:100%;pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.react-flow__edge.updating .react-flow__edge-path{stroke:#777}.react-flow__edge-text{font-size:10px}.react-flow__node.selectable:focus,.react-flow__node.selectable:focus-visible{outline:none}.react-flow__node-default,.react-flow__node-input,.react-flow__node-output,.react-flow__node-group{padding:10px;border-radius:3px;width:150px;font-size:12px;color:#222;text-align:center;border-width:1px;border-style:solid;border-color:#1a192b;background-color:#fff}.react-flow__node-default.selectable:hover,.react-flow__node-input.selectable:hover,.react-flow__node-output.selectable:hover,.react-flow__node-group.selectable:hover{box-shadow:0 1px 4px 1px #00000014}.react-flow__node-default.selectable.selected,.react-flow__node-default.selectable:focus,.react-flow__node-default.selectable:focus-visible,.react-flow__node-input.selectable.selected,.react-flow__node-input.selectable:focus,.react-flow__node-input.selectable:focus-visible,.react-flow__node-output.selectable.selected,.react-flow__node-output.selectable:focus,.react-flow__node-output.selectable:focus-visible,.react-flow__node-group.selectable.selected,.react-flow__node-group.selectable:focus,.react-flow__node-group.selectable:focus-visible{box-shadow:0 0 0 .5px #1a192b}.react-flow__node-group{background-color:#f0f0f040}.react-flow__nodesselection-rect,.react-flow__selection{background:rgba(0,89,220,.08);border:1px dotted rgba(0,89,220,.8)}.react-flow__nodesselection-rect:focus,.react-flow__nodesselection-rect:focus-visible,.react-flow__selection:focus,.react-flow__selection:focus-visible{outline:none}.react-flow__controls{box-shadow:0 0 2px 1px #00000014}.react-flow__controls-button{border:none;background:#fefefe;border-bottom:1px solid #eee;box-sizing:content-box;display:flex;justify-content:center;align-items:center;width:16px;height:16px;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none;padding:5px}.react-flow__controls-button:hover{background:#f4f4f4}.react-flow__controls-button svg{width:100%;max-width:12px;max-height:12px}.react-flow__controls-button:disabled{pointer-events:none}.react-flow__controls-button:disabled svg{fill-opacity:.4}.react-flow__minimap{background-color:#fff}.react-flow__resize-control{position:absolute}.react-flow__resize-control.left,.react-flow__resize-control.right{cursor:ew-resize}.react-flow__resize-control.top,.react-flow__resize-control.bottom{cursor:ns-resize}.react-flow__resize-control.top.left,.react-flow__resize-control.bottom.right{cursor:nwse-resize}.react-flow__resize-control.bottom.left,.react-flow__resize-control.top.right{cursor:nesw-resize}.react-flow__resize-control.handle{width:4px;height:4px;border:1px solid #fff;border-radius:1px;background-color:#3367d9;transform:translate(-50%,-50%)}.react-flow__resize-control.handle.left{left:0;top:50%}.react-flow__resize-control.handle.right{left:100%;top:50%}.react-flow__resize-control.handle.top{left:50%;top:0}.react-flow__resize-control.handle.bottom{left:50%;top:100%}.react-flow__resize-control.handle.top.left,.react-flow__resize-control.handle.bottom.left{left:0}.react-flow__resize-control.handle.top.right,.react-flow__resize-control.handle.bottom.right{left:100%}.react-flow__resize-control.line{border-color:#3367d9;border-width:0;border-style:solid}.react-flow__resize-control.line.left,.react-flow__resize-control.line.right{width:1px;transform:translate(-50%);top:0;height:100%}.react-flow__resize-control.line.left{left:0;border-left-width:1px}.react-flow__resize-control.line.right{left:100%;border-right-width:1px}.react-flow__resize-control.line.top,.react-flow__resize-control.line.bottom{height:1px;transform:translateY(-50%);left:0;width:100%}.react-flow__resize-control.line.top{top:0;border-top-width:1px}.react-flow__resize-control.line.bottom{border-bottom-width:1px;top:100%}@font-face{font-family:Barlow;font-weight:200;src:local("Barlow"),url(/fonts/Barlow-ExtraLight.ttf) format("truetype")}@font-face{font-family:Barlow;font-weight:100;src:local("Barlow"),url(/fonts/Barlow-Thin.ttf) format("truetype")}@font-face{font-family:Barlow;font-weight:300;src:local("Barlow"),url(/fonts/Barlow-Light.ttf) format("truetype")}@font-face{font-family:Barlow;font-weight:400;src:local("Barlow"),url(/fonts/Barlow-Regular.ttf) format("truetype")}@font-face{font-family:Barlow;font-weight:500;src:local("Barlow"),url(/fonts/Barlow-Medium.ttf) format("truetype")}@font-face{font-family:Barlow;font-weight:600;src:local("Barlow"),url(/fonts/Barlow-SemiBold.ttf) format("truetype")}@font-face{font-family:Barlow;font-weight:700;src:local("Barlow"),url(/fonts/Barlow-Bold.ttf) format("truetype")}@font-face{font-family:Barlow;font-weight:800;src:local("Barlow"),url(/fonts/Barlow-ExtraBold.ttf) format("truetype")}html,body{margin:0;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;height:100%;width:100%;overflow:hidden}#root{height:100%;width:100%}#universe-canvas{z-index:0}*{scrollbar-width:8px}*::-webkit-scrollbar{width:8px}*::-webkit-scrollbar-thumb{background-clip:padding-box;background-color:#b0b7bc73;background:rgba(176,183,188,.45);width:8px;border-radius:8px}.loggerWrapper{position:absolute;bottom:0;right:0;z-index:100;width:100%;max-width:100vw;height:400px;background-color:#fff}.loggerWrapper.hide{display:none}.loggerWrapper .loggerInner{display:flex;flex-direction:column;overflow:auto;height:100%}.loggerWrapper .close{position:absolute;top:10px;right:10px;padding:5px 8px;color:#fff;background-color:red;border-radius:50%;cursor:pointer}.loggerWrapper.hide+.open{position:absolute;display:block;z-index:100;bottom:2rem;left:1rem;padding:1rem;background-color:#fff;font-weight:500;color:#000;cursor:pointer}.loggerWrapper+.open{display:none}.loggerWrapper .message{padding:1rem}.loggerWrapper .log,.loggerWrapper .info{border-top:2px solid #9f9f9f}.loggerWrapper .warn{color:#878000;background-color:#fff9c4;border-top:2px solid #ffe500}.loggerWrapper .error{color:#b71c1c;background-color:#ffcdd2;border-top:2px solid #e57373} +:root { + --toastify-color-light: #fff; + --toastify-color-dark: #121212; + --toastify-color-info: #3498db; + --toastify-color-success: #07bc0c; + --toastify-color-warning: #f1c40f; + --toastify-color-error: #e74c3c; + --toastify-color-transparent: rgba(255, 255, 255, 0.7); + --toastify-icon-color-info: var(--toastify-color-info); + --toastify-icon-color-success: var(--toastify-color-success); + --toastify-icon-color-warning: var(--toastify-color-warning); + --toastify-icon-color-error: var(--toastify-color-error); + --toastify-toast-width: 320px; + --toastify-toast-background: #fff; + --toastify-toast-min-height: 64px; + --toastify-toast-max-height: 800px; + --toastify-font-family: sans-serif; + --toastify-z-index: 9999; + --toastify-text-color-light: #757575; + --toastify-text-color-dark: #fff; + --toastify-text-color-info: #fff; + --toastify-text-color-success: #fff; + --toastify-text-color-warning: #fff; + --toastify-text-color-error: #fff; + --toastify-spinner-color: #616161; + --toastify-spinner-color-empty-area: #e0e0e0; + --toastify-color-progress-light: linear-gradient(to right, #4cd964, #5ac8fa, #007aff, #34aadc, #5856d6, #ff2d55); + --toastify-color-progress-dark: #bb86fc; + --toastify-color-progress-info: var(--toastify-color-info); + --toastify-color-progress-success: var(--toastify-color-success); + --toastify-color-progress-warning: var(--toastify-color-warning); + --toastify-color-progress-error: var(--toastify-color-error); +} +.Toastify__toast-container { + z-index: var(--toastify-z-index); + -webkit-transform: translate3d(0, 0, var(--toastify-z-index) px); + position: fixed; + padding: 4px; + width: var(--toastify-toast-width); + box-sizing: border-box; + color: #fff; +} +.Toastify__toast-container--top-left { + top: 1em; + left: 1em; +} +.Toastify__toast-container--top-center { + top: 1em; + left: 50%; + transform: translate(-50%); +} +.Toastify__toast-container--top-right { + top: 1em; + right: 1em; +} +.Toastify__toast-container--bottom-left { + bottom: 1em; + left: 1em; +} +.Toastify__toast-container--bottom-center { + bottom: 1em; + left: 50%; + transform: translate(-50%); +} +.Toastify__toast-container--bottom-right { + bottom: 1em; + right: 1em; +} +@media only screen and (max-width: 480px) { + .Toastify__toast-container { + width: 100vw; + padding: 0; + left: 0; + margin: 0; + } + .Toastify__toast-container--top-left, + .Toastify__toast-container--top-center, + .Toastify__toast-container--top-right { + top: 0; + transform: translate(0); + } + .Toastify__toast-container--bottom-left, + .Toastify__toast-container--bottom-center, + .Toastify__toast-container--bottom-right { + bottom: 0; + transform: translate(0); + } + .Toastify__toast-container--rtl { + right: 0; + left: initial; + } +} +.Toastify__toast { + position: relative; + min-height: var(--toastify-toast-min-height); + box-sizing: border-box; + margin-bottom: 1rem; + padding: 8px; + border-radius: 4px; + box-shadow: 0 1px 10px #0000001a, 0 2px 15px #0000000d; + display: -ms-flexbox; + display: flex; + -ms-flex-pack: justify; + justify-content: space-between; + max-height: var(--toastify-toast-max-height); + overflow: hidden; + font-family: var(--toastify-font-family); + cursor: pointer; + direction: ltr; +} +.Toastify__toast--rtl { + direction: rtl; +} +.Toastify__toast-body { + margin: auto 0; + -ms-flex: 1 1 auto; + flex: 1 1 auto; + padding: 6px; + display: -ms-flexbox; + display: flex; + -ms-flex-align: center; + align-items: center; +} +.Toastify__toast-body > div:last-child { + -ms-flex: 1; + flex: 1; +} +.Toastify__toast-icon { + -webkit-margin-end: 10px; + margin-inline-end: 10px; + width: 20px; + -ms-flex-negative: 0; + flex-shrink: 0; + display: -ms-flexbox; + display: flex; +} +.Toastify--animate { + animation-fill-mode: both; + animation-duration: 0.7s; +} +.Toastify--animate-icon { + animation-fill-mode: both; + animation-duration: 0.3s; +} +@media only screen and (max-width: 480px) { + .Toastify__toast { + margin-bottom: 0; + border-radius: 0; + } +} +.Toastify__toast-theme--dark { + background: var(--toastify-color-dark); + color: var(--toastify-text-color-dark); +} +.Toastify__toast-theme--light, +.Toastify__toast-theme--colored.Toastify__toast--default { + background: var(--toastify-color-light); + color: var(--toastify-text-color-light); +} +.Toastify__toast-theme--colored.Toastify__toast--info { + color: var(--toastify-text-color-info); + background: var(--toastify-color-info); +} +.Toastify__toast-theme--colored.Toastify__toast--success { + color: var(--toastify-text-color-success); + background: var(--toastify-color-success); +} +.Toastify__toast-theme--colored.Toastify__toast--warning { + color: var(--toastify-text-color-warning); + background: var(--toastify-color-warning); +} +.Toastify__toast-theme--colored.Toastify__toast--error { + color: var(--toastify-text-color-error); + background: var(--toastify-color-error); +} +.Toastify__progress-bar-theme--light { + background: var(--toastify-color-progress-light); +} +.Toastify__progress-bar-theme--dark { + background: var(--toastify-color-progress-dark); +} +.Toastify__progress-bar--info { + background: var(--toastify-color-progress-info); +} +.Toastify__progress-bar--success { + background: var(--toastify-color-progress-success); +} +.Toastify__progress-bar--warning { + background: var(--toastify-color-progress-warning); +} +.Toastify__progress-bar--error { + background: var(--toastify-color-progress-error); +} +.Toastify__progress-bar-theme--colored.Toastify__progress-bar--info, +.Toastify__progress-bar-theme--colored.Toastify__progress-bar--success, +.Toastify__progress-bar-theme--colored.Toastify__progress-bar--warning, +.Toastify__progress-bar-theme--colored.Toastify__progress-bar--error { + background: var(--toastify-color-transparent); +} +.Toastify__close-button { + color: #fff; + background: transparent; + outline: none; + border: none; + padding: 0; + cursor: pointer; + opacity: 0.7; + transition: 0.3s ease; + -ms-flex-item-align: start; + align-self: flex-start; +} +.Toastify__close-button--light { + color: #000; + opacity: 0.3; +} +.Toastify__close-button > svg { + fill: currentColor; + height: 16px; + width: 14px; +} +.Toastify__close-button:hover, +.Toastify__close-button:focus { + opacity: 1; +} +@keyframes Toastify__trackProgress { + 0% { + transform: scaleX(1); + } + to { + transform: scaleX(0); + } +} +.Toastify__progress-bar { + position: absolute; + bottom: 0; + left: 0; + width: 100%; + height: 5px; + z-index: var(--toastify-z-index); + opacity: 0.7; + transform-origin: left; +} +.Toastify__progress-bar--animated { + animation: Toastify__trackProgress linear 1 forwards; +} +.Toastify__progress-bar--controlled { + transition: transform 0.2s; +} +.Toastify__progress-bar--rtl { + right: 0; + left: initial; + transform-origin: right; +} +.Toastify__spinner { + width: 20px; + height: 20px; + box-sizing: border-box; + border: 2px solid; + border-radius: 100%; + border-color: var(--toastify-spinner-color-empty-area); + border-right-color: var(--toastify-spinner-color); + animation: Toastify__spin 0.65s linear infinite; +} +@keyframes Toastify__bounceInRight { + 0%, + 60%, + 75%, + 90%, + to { + animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1); + } + 0% { + opacity: 0; + transform: translate3d(3000px, 0, 0); + } + 60% { + opacity: 1; + transform: translate3d(-25px, 0, 0); + } + 75% { + transform: translate3d(10px, 0, 0); + } + 90% { + transform: translate3d(-5px, 0, 0); + } + to { + transform: none; + } +} +@keyframes Toastify__bounceOutRight { + 20% { + opacity: 1; + transform: translate3d(-20px, 0, 0); + } + to { + opacity: 0; + transform: translate3d(2000px, 0, 0); + } +} +@keyframes Toastify__bounceInLeft { + 0%, + 60%, + 75%, + 90%, + to { + animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1); + } + 0% { + opacity: 0; + transform: translate3d(-3000px, 0, 0); + } + 60% { + opacity: 1; + transform: translate3d(25px, 0, 0); + } + 75% { + transform: translate3d(-10px, 0, 0); + } + 90% { + transform: translate3d(5px, 0, 0); + } + to { + transform: none; + } +} +@keyframes Toastify__bounceOutLeft { + 20% { + opacity: 1; + transform: translate3d(20px, 0, 0); + } + to { + opacity: 0; + transform: translate3d(-2000px, 0, 0); + } +} +@keyframes Toastify__bounceInUp { + 0%, + 60%, + 75%, + 90%, + to { + animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1); + } + 0% { + opacity: 0; + transform: translate3d(0, 3000px, 0); + } + 60% { + opacity: 1; + transform: translate3d(0, -20px, 0); + } + 75% { + transform: translate3d(0, 10px, 0); + } + 90% { + transform: translate3d(0, -5px, 0); + } + to { + transform: translateZ(0); + } +} +@keyframes Toastify__bounceOutUp { + 20% { + transform: translate3d(0, -10px, 0); + } + 40%, + 45% { + opacity: 1; + transform: translate3d(0, 20px, 0); + } + to { + opacity: 0; + transform: translate3d(0, -2000px, 0); + } +} +@keyframes Toastify__bounceInDown { + 0%, + 60%, + 75%, + 90%, + to { + animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1); + } + 0% { + opacity: 0; + transform: translate3d(0, -3000px, 0); + } + 60% { + opacity: 1; + transform: translate3d(0, 25px, 0); + } + 75% { + transform: translate3d(0, -10px, 0); + } + 90% { + transform: translate3d(0, 5px, 0); + } + to { + transform: none; + } +} +@keyframes Toastify__bounceOutDown { + 20% { + transform: translate3d(0, 10px, 0); + } + 40%, + 45% { + opacity: 1; + transform: translate3d(0, -20px, 0); + } + to { + opacity: 0; + transform: translate3d(0, 2000px, 0); + } +} +.Toastify__bounce-enter--top-left, +.Toastify__bounce-enter--bottom-left { + animation-name: Toastify__bounceInLeft; +} +.Toastify__bounce-enter--top-right, +.Toastify__bounce-enter--bottom-right { + animation-name: Toastify__bounceInRight; +} +.Toastify__bounce-enter--top-center { + animation-name: Toastify__bounceInDown; +} +.Toastify__bounce-enter--bottom-center { + animation-name: Toastify__bounceInUp; +} +.Toastify__bounce-exit--top-left, +.Toastify__bounce-exit--bottom-left { + animation-name: Toastify__bounceOutLeft; +} +.Toastify__bounce-exit--top-right, +.Toastify__bounce-exit--bottom-right { + animation-name: Toastify__bounceOutRight; +} +.Toastify__bounce-exit--top-center { + animation-name: Toastify__bounceOutUp; +} +.Toastify__bounce-exit--bottom-center { + animation-name: Toastify__bounceOutDown; +} +@keyframes Toastify__zoomIn { + 0% { + opacity: 0; + transform: scale3d(0.3, 0.3, 0.3); + } + 50% { + opacity: 1; + } +} +@keyframes Toastify__zoomOut { + 0% { + opacity: 1; + } + 50% { + opacity: 0; + transform: scale3d(0.3, 0.3, 0.3); + } + to { + opacity: 0; + } +} +.Toastify__zoom-enter { + animation-name: Toastify__zoomIn; +} +.Toastify__zoom-exit { + animation-name: Toastify__zoomOut; +} +@keyframes Toastify__flipIn { + 0% { + transform: perspective(400px) rotateX(90deg); + animation-timing-function: ease-in; + opacity: 0; + } + 40% { + transform: perspective(400px) rotateX(-20deg); + animation-timing-function: ease-in; + } + 60% { + transform: perspective(400px) rotateX(10deg); + opacity: 1; + } + 80% { + transform: perspective(400px) rotateX(-5deg); + } + to { + transform: perspective(400px); + } +} +@keyframes Toastify__flipOut { + 0% { + transform: perspective(400px); + } + 30% { + transform: perspective(400px) rotateX(-20deg); + opacity: 1; + } + to { + transform: perspective(400px) rotateX(90deg); + opacity: 0; + } +} +.Toastify__flip-enter { + animation-name: Toastify__flipIn; +} +.Toastify__flip-exit { + animation-name: Toastify__flipOut; +} +@keyframes Toastify__slideInRight { + 0% { + transform: translate3d(110%, 0, 0); + visibility: visible; + } + to { + transform: translateZ(0); + } +} +@keyframes Toastify__slideInLeft { + 0% { + transform: translate3d(-110%, 0, 0); + visibility: visible; + } + to { + transform: translateZ(0); + } +} +@keyframes Toastify__slideInUp { + 0% { + transform: translate3d(0, 110%, 0); + visibility: visible; + } + to { + transform: translateZ(0); + } +} +@keyframes Toastify__slideInDown { + 0% { + transform: translate3d(0, -110%, 0); + visibility: visible; + } + to { + transform: translateZ(0); + } +} +@keyframes Toastify__slideOutRight { + 0% { + transform: translateZ(0); + } + to { + visibility: hidden; + transform: translate3d(110%, 0, 0); + } +} +@keyframes Toastify__slideOutLeft { + 0% { + transform: translateZ(0); + } + to { + visibility: hidden; + transform: translate3d(-110%, 0, 0); + } +} +@keyframes Toastify__slideOutDown { + 0% { + transform: translateZ(0); + } + to { + visibility: hidden; + transform: translate3d(0, 500px, 0); + } +} +@keyframes Toastify__slideOutUp { + 0% { + transform: translateZ(0); + } + to { + visibility: hidden; + transform: translate3d(0, -500px, 0); + } +} +.Toastify__slide-enter--top-left, +.Toastify__slide-enter--bottom-left { + animation-name: Toastify__slideInLeft; +} +.Toastify__slide-enter--top-right, +.Toastify__slide-enter--bottom-right { + animation-name: Toastify__slideInRight; +} +.Toastify__slide-enter--top-center { + animation-name: Toastify__slideInDown; +} +.Toastify__slide-enter--bottom-center { + animation-name: Toastify__slideInUp; +} +.Toastify__slide-exit--top-left, +.Toastify__slide-exit--bottom-left { + animation-name: Toastify__slideOutLeft; +} +.Toastify__slide-exit--top-right, +.Toastify__slide-exit--bottom-right { + animation-name: Toastify__slideOutRight; +} +.Toastify__slide-exit--top-center { + animation-name: Toastify__slideOutUp; +} +.Toastify__slide-exit--bottom-center { + animation-name: Toastify__slideOutDown; +} +@keyframes Toastify__spin { + 0% { + transform: rotate(0); + } + to { + transform: rotate(360deg); + } +} +.react-flow__container { + position: absolute; + width: 100%; + height: 100%; + top: 0; + left: 0; +} +.react-flow__pane { + z-index: 1; + cursor: -webkit-grab; + cursor: grab; +} +.react-flow__pane.selection { + cursor: pointer; +} +.react-flow__pane.dragging { + cursor: -webkit-grabbing; + cursor: grabbing; +} +.react-flow__viewport { + transform-origin: 0 0; + z-index: 2; + pointer-events: none; +} +.react-flow__renderer { + z-index: 4; +} +.react-flow__selection { + z-index: 6; +} +.react-flow__nodesselection-rect:focus, +.react-flow__nodesselection-rect:focus-visible { + outline: none; +} +.react-flow .react-flow__edges { + pointer-events: none; + overflow: visible; +} +.react-flow__edge-path, +.react-flow__connection-path { + stroke: #b1b1b7; + stroke-width: 1; + fill: none; +} +.react-flow__edge { + pointer-events: visibleStroke; + cursor: pointer; +} +.react-flow__edge.animated path { + stroke-dasharray: 5; + -webkit-animation: dashdraw 0.5s linear infinite; + animation: dashdraw 0.5s linear infinite; +} +.react-flow__edge.animated path.react-flow__edge-interaction { + stroke-dasharray: none; + -webkit-animation: none; + animation: none; +} +.react-flow__edge.inactive { + pointer-events: none; +} +.react-flow__edge.selected, +.react-flow__edge:focus, +.react-flow__edge:focus-visible { + outline: none; +} +.react-flow__edge.selected .react-flow__edge-path, +.react-flow__edge:focus .react-flow__edge-path, +.react-flow__edge:focus-visible .react-flow__edge-path { + stroke: #555; +} +.react-flow__edge-textwrapper { + pointer-events: all; +} +.react-flow__edge-textbg { + fill: #fff; +} +.react-flow__edge .react-flow__edge-text { + pointer-events: none; + -webkit-user-select: none; + -moz-user-select: none; + user-select: none; +} +.react-flow__connection { + pointer-events: none; +} +.react-flow__connection .animated { + stroke-dasharray: 5; + -webkit-animation: dashdraw 0.5s linear infinite; + animation: dashdraw 0.5s linear infinite; +} +.react-flow__connectionline { + z-index: 1001; +} +.react-flow__nodes { + pointer-events: none; + transform-origin: 0 0; +} +.react-flow__node { + position: absolute; + -webkit-user-select: none; + -moz-user-select: none; + user-select: none; + pointer-events: all; + transform-origin: 0 0; + box-sizing: border-box; + cursor: -webkit-grab; + cursor: grab; +} +.react-flow__node.dragging { + cursor: -webkit-grabbing; + cursor: grabbing; +} +.react-flow__nodesselection { + z-index: 3; + transform-origin: left top; + pointer-events: none; +} +.react-flow__nodesselection-rect { + position: absolute; + pointer-events: all; + cursor: -webkit-grab; + cursor: grab; +} +.react-flow__handle { + position: absolute; + pointer-events: none; + min-width: 5px; + min-height: 5px; + width: 6px; + height: 6px; + background: #1a192b; + border: 1px solid white; + border-radius: 100%; +} +.react-flow__handle.connectionindicator { + pointer-events: all; + cursor: crosshair; +} +.react-flow__handle-bottom { + top: auto; + left: 50%; + bottom: -4px; + transform: translate(-50%); +} +.react-flow__handle-top { + left: 50%; + top: -4px; + transform: translate(-50%); +} +.react-flow__handle-left { + top: 50%; + left: -4px; + transform: translateY(-50%); +} +.react-flow__handle-right { + right: -4px; + top: 50%; + transform: translateY(-50%); +} +.react-flow__edgeupdater { + cursor: move; + pointer-events: all; +} +.react-flow__panel { + position: absolute; + z-index: 5; + margin: 15px; +} +.react-flow__panel.top { + top: 0; +} +.react-flow__panel.bottom { + bottom: 0; +} +.react-flow__panel.left { + left: 0; +} +.react-flow__panel.right { + right: 0; +} +.react-flow__panel.center { + left: 50%; + transform: translate(-50%); +} +.react-flow__attribution { + font-size: 10px; + background: rgba(255, 255, 255, 0.5); + padding: 2px 3px; + margin: 0; +} +.react-flow__attribution a { + text-decoration: none; + color: #999; +} +@-webkit-keyframes dashdraw { + 0% { + stroke-dashoffset: 10; + } +} +@keyframes dashdraw { + 0% { + stroke-dashoffset: 10; + } +} +.react-flow__edgelabel-renderer { + position: absolute; + width: 100%; + height: 100%; + pointer-events: none; + -webkit-user-select: none; + -moz-user-select: none; + user-select: none; +} +.react-flow__edge.updating .react-flow__edge-path { + stroke: #777; +} +.react-flow__edge-text { + font-size: 10px; +} +.react-flow__node.selectable:focus, +.react-flow__node.selectable:focus-visible { + outline: none; +} +.react-flow__node-default, +.react-flow__node-input, +.react-flow__node-output, +.react-flow__node-group { + padding: 10px; + border-radius: 3px; + width: 150px; + font-size: 12px; + color: #222; + text-align: center; + border-width: 1px; + border-style: solid; + border-color: #1a192b; + background-color: #fff; +} +.react-flow__node-default.selectable:hover, +.react-flow__node-input.selectable:hover, +.react-flow__node-output.selectable:hover, +.react-flow__node-group.selectable:hover { + box-shadow: 0 1px 4px 1px #00000014; +} +.react-flow__node-default.selectable.selected, +.react-flow__node-default.selectable:focus, +.react-flow__node-default.selectable:focus-visible, +.react-flow__node-input.selectable.selected, +.react-flow__node-input.selectable:focus, +.react-flow__node-input.selectable:focus-visible, +.react-flow__node-output.selectable.selected, +.react-flow__node-output.selectable:focus, +.react-flow__node-output.selectable:focus-visible, +.react-flow__node-group.selectable.selected, +.react-flow__node-group.selectable:focus, +.react-flow__node-group.selectable:focus-visible { + box-shadow: 0 0 0 0.5px #1a192b; +} +.react-flow__node-group { + background-color: #f0f0f040; +} +.react-flow__nodesselection-rect, +.react-flow__selection { + background: rgba(0, 89, 220, 0.08); + border: 1px dotted rgba(0, 89, 220, 0.8); +} +.react-flow__nodesselection-rect:focus, +.react-flow__nodesselection-rect:focus-visible, +.react-flow__selection:focus, +.react-flow__selection:focus-visible { + outline: none; +} +.react-flow__controls { + box-shadow: 0 0 2px 1px #00000014; +} +.react-flow__controls-button { + border: none; + background: #fefefe; + border-bottom: 1px solid #eee; + box-sizing: content-box; + display: flex; + justify-content: center; + align-items: center; + width: 16px; + height: 16px; + cursor: pointer; + -webkit-user-select: none; + -moz-user-select: none; + user-select: none; + padding: 5px; +} +.react-flow__controls-button:hover { + background: #f4f4f4; +} +.react-flow__controls-button svg { + width: 100%; + max-width: 12px; + max-height: 12px; +} +.react-flow__controls-button:disabled { + pointer-events: none; +} +.react-flow__controls-button:disabled svg { + fill-opacity: 0.4; +} +.react-flow__minimap { + background-color: #fff; +} +.react-flow__resize-control { + position: absolute; +} +.react-flow__resize-control.left, +.react-flow__resize-control.right { + cursor: ew-resize; +} +.react-flow__resize-control.top, +.react-flow__resize-control.bottom { + cursor: ns-resize; +} +.react-flow__resize-control.top.left, +.react-flow__resize-control.bottom.right { + cursor: nwse-resize; +} +.react-flow__resize-control.bottom.left, +.react-flow__resize-control.top.right { + cursor: nesw-resize; +} +.react-flow__resize-control.handle { + width: 4px; + height: 4px; + border: 1px solid #fff; + border-radius: 1px; + background-color: #3367d9; + transform: translate(-50%, -50%); +} +.react-flow__resize-control.handle.left { + left: 0; + top: 50%; +} +.react-flow__resize-control.handle.right { + left: 100%; + top: 50%; +} +.react-flow__resize-control.handle.top { + left: 50%; + top: 0; +} +.react-flow__resize-control.handle.bottom { + left: 50%; + top: 100%; +} +.react-flow__resize-control.handle.top.left, +.react-flow__resize-control.handle.bottom.left { + left: 0; +} +.react-flow__resize-control.handle.top.right, +.react-flow__resize-control.handle.bottom.right { + left: 100%; +} +.react-flow__resize-control.line { + border-color: #3367d9; + border-width: 0; + border-style: solid; +} +.react-flow__resize-control.line.left, +.react-flow__resize-control.line.right { + width: 1px; + transform: translate(-50%); + top: 0; + height: 100%; +} +.react-flow__resize-control.line.left { + left: 0; + border-left-width: 1px; +} +.react-flow__resize-control.line.right { + left: 100%; + border-right-width: 1px; +} +.react-flow__resize-control.line.top, +.react-flow__resize-control.line.bottom { + height: 1px; + transform: translateY(-50%); + left: 0; + width: 100%; +} +.react-flow__resize-control.line.top { + top: 0; + border-top-width: 1px; +} +.react-flow__resize-control.line.bottom { + border-bottom-width: 1px; + top: 100%; +} +@font-face { + font-family: Barlow; + font-weight: 200; + src: local('Barlow'), url(/fonts/Barlow-ExtraLight.ttf) format('truetype'); +} +@font-face { + font-family: Barlow; + font-weight: 100; + src: local('Barlow'), url(/fonts/Barlow-Thin.ttf) format('truetype'); +} +@font-face { + font-family: Barlow; + font-weight: 300; + src: local('Barlow'), url(/fonts/Barlow-Light.ttf) format('truetype'); +} +@font-face { + font-family: Barlow; + font-weight: 400; + src: local('Barlow'), url(/fonts/Barlow-Regular.ttf) format('truetype'); +} +@font-face { + font-family: Barlow; + font-weight: 500; + src: local('Barlow'), url(/fonts/Barlow-Medium.ttf) format('truetype'); +} +@font-face { + font-family: Barlow; + font-weight: 600; + src: local('Barlow'), url(/fonts/Barlow-SemiBold.ttf) format('truetype'); +} +@font-face { + font-family: Barlow; + font-weight: 700; + src: local('Barlow'), url(/fonts/Barlow-Bold.ttf) format('truetype'); +} +@font-face { + font-family: Barlow; + font-weight: 800; + src: local('Barlow'), url(/fonts/Barlow-ExtraBold.ttf) format('truetype'); +} +html, +body { + margin: 0; + font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen, Ubuntu, Cantarell, Fira Sans, Droid Sans, + Helvetica Neue, sans-serif; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + height: 100%; + width: 100%; + overflow: hidden; +} +#root { + height: 100%; + width: 100%; +} +#universe-canvas { + z-index: 0; +} +* { + scrollbar-width: 8px; +} +*::-webkit-scrollbar { + width: 8px; +} +*::-webkit-scrollbar-thumb { + background-clip: padding-box; + background-color: #b0b7bc73; + background: rgba(176, 183, 188, 0.45); + width: 8px; + border-radius: 8px; +} +.loggerWrapper { + position: absolute; + bottom: 0; + right: 0; + z-index: 100; + width: 100%; + max-width: 100vw; + height: 400px; + background-color: #fff; +} +.loggerWrapper.hide { + display: none; +} +.loggerWrapper .loggerInner { + display: flex; + flex-direction: column; + overflow: auto; + height: 100%; +} +.loggerWrapper .close { + position: absolute; + top: 10px; + right: 10px; + padding: 5px 8px; + color: #fff; + background-color: red; + border-radius: 50%; + cursor: pointer; +} +.loggerWrapper.hide + .open { + position: absolute; + display: block; + z-index: 100; + bottom: 2rem; + left: 1rem; + padding: 1rem; + background-color: #fff; + font-weight: 500; + color: #000; + cursor: pointer; +} +.loggerWrapper + .open { + display: none; +} +.loggerWrapper .message { + padding: 1rem; +} +.loggerWrapper .log, +.loggerWrapper .info { + border-top: 2px solid #9f9f9f; +} +.loggerWrapper .warn { + color: #878000; + background-color: #fff9c4; + border-top: 2px solid #ffe500; +} +.loggerWrapper .error { + color: #b71c1c; + background-color: #ffcdd2; + border-top: 2px solid #e57373; +} diff --git a/build/assets/web-vitals-60d3425a.js b/build/assets/web-vitals-60d3425a.js index 77233a3e2..9f481dba9 100644 --- a/build/assets/web-vitals-60d3425a.js +++ b/build/assets/web-vitals-60d3425a.js @@ -1 +1,258 @@ -var m,l,C,T,f=function(t,e){return{name:t,value:e===void 0?-1:e,delta:0,entries:[],id:"v2-".concat(Date.now(),"-").concat(Math.floor(8999999999999*Math.random())+1e12)}},h=function(t,e){try{if(PerformanceObserver.supportedEntryTypes.includes(t)){if(t==="first-input"&&!("PerformanceEventTiming"in self))return;var i=new PerformanceObserver(function(a){return a.getEntries().map(e)});return i.observe({type:t,buffered:!0}),i}}catch{}},y=function(t,e){var i=function a(n){n.type!=="pagehide"&&document.visibilityState!=="hidden"||(t(n),e&&(removeEventListener("visibilitychange",a,!0),removeEventListener("pagehide",a,!0)))};addEventListener("visibilitychange",i,!0),addEventListener("pagehide",i,!0)},g=function(t){addEventListener("pageshow",function(e){e.persisted&&t(e)},!0)},v=function(t,e,i){var a;return function(n){e.value>=0&&(n||i)&&(e.delta=e.value-(a||0),(e.delta||a===void 0)&&(a=e.value,t(e)))}},p=-1,w=function(){return document.visibilityState==="hidden"?0:1/0},F=function(){y(function(t){var e=t.timeStamp;p=e},!0)},S=function(){return p<0&&(p=w(),F(),g(function(){setTimeout(function(){p=w(),F()},0)})),{get firstHiddenTime(){return p}}},A=function(t,e){var i,a=S(),n=f("FCP"),o=function(c){c.name==="first-contentful-paint"&&(u&&u.disconnect(),c.startTime-1&&t(s)},n=f("CLS",0),o=0,r=[],u=function(s){if(!s.hadRecentInput){var B=r[0],q=r[r.length-1];o&&s.startTime-q.startTime<1e3&&s.startTime-B.startTime<5e3?(o+=s.value,r.push(s)):(o=s.value,r=[s]),o>n.value&&(n.value=o,n.entries=r,i())}},c=h("layout-shift",u);c&&(i=v(a,n,e),y(function(){c.takeRecords().map(u),i(!0)}),g(function(){o=0,E=-1,n=f("CLS",0),i=v(a,n,e)}))},d={passive:!0,capture:!0},H=new Date,P=function(t,e){m||(m=e,l=t,C=new Date,k(removeEventListener),D())},D=function(){if(l>=0&&l1e12?new Date:performance.now())-t.timeStamp;t.type=="pointerdown"?function(i,a){var n=function(){P(i,a),r()},o=function(){r()},r=function(){removeEventListener("pointerup",n,d),removeEventListener("pointercancel",o,d)};addEventListener("pointerup",n,d),addEventListener("pointercancel",o,d)}(e,t):P(e,t)}},k=function(t){["mousedown","keydown","touchstart","pointerdown"].forEach(function(e){return t(e,I,d)})},M=function(t,e){var i,a=S(),n=f("FID"),o=function(u){u.startTimeperformance.now())return;i.entries=[a],t(i)}catch{}},document.readyState==="complete"?setTimeout(e,0):addEventListener("load",function(){return setTimeout(e,0)})};export{R as getCLS,A as getFCP,M as getFID,N as getLCP,O as getTTFB}; +var m, + l, + C, + T, + f = function (t, e) { + return { + name: t, + value: e === void 0 ? -1 : e, + delta: 0, + entries: [], + id: 'v2-'.concat(Date.now(), '-').concat(Math.floor(8999999999999 * Math.random()) + 1e12), + } + }, + h = function (t, e) { + try { + if (PerformanceObserver.supportedEntryTypes.includes(t)) { + if (t === 'first-input' && !('PerformanceEventTiming' in self)) return + var i = new PerformanceObserver(function (a) { + return a.getEntries().map(e) + }) + return i.observe({ type: t, buffered: !0 }), i + } + } catch {} + }, + y = function (t, e) { + var i = function a(n) { + ;(n.type !== 'pagehide' && document.visibilityState !== 'hidden') || + (t(n), e && (removeEventListener('visibilitychange', a, !0), removeEventListener('pagehide', a, !0))) + } + addEventListener('visibilitychange', i, !0), addEventListener('pagehide', i, !0) + }, + g = function (t) { + addEventListener( + 'pageshow', + function (e) { + e.persisted && t(e) + }, + !0, + ) + }, + v = function (t, e, i) { + var a + return function (n) { + e.value >= 0 && (n || i) && ((e.delta = e.value - (a || 0)), (e.delta || a === void 0) && ((a = e.value), t(e))) + } + }, + p = -1, + w = function () { + return document.visibilityState === 'hidden' ? 0 : 1 / 0 + }, + F = function () { + y(function (t) { + var e = t.timeStamp + p = e + }, !0) + }, + S = function () { + return ( + p < 0 && + ((p = w()), + F(), + g(function () { + setTimeout(function () { + ;(p = w()), F() + }, 0) + })), + { + get firstHiddenTime() { + return p + }, + } + ) + }, + A = function (t, e) { + var i, + a = S(), + n = f('FCP'), + o = function (c) { + c.name === 'first-contentful-paint' && + (u && u.disconnect(), c.startTime < a.firstHiddenTime && ((n.value = c.startTime), n.entries.push(c), i(!0))) + }, + r = + window.performance && performance.getEntriesByName && performance.getEntriesByName('first-contentful-paint')[0], + u = r ? null : h('paint', o) + ;(r || u) && + ((i = v(t, n, e)), + r && o(r), + g(function (c) { + ;(n = f('FCP')), + (i = v(t, n, e)), + requestAnimationFrame(function () { + requestAnimationFrame(function () { + ;(n.value = performance.now() - c.timeStamp), i(!0) + }) + }) + })) + }, + b = !1, + E = -1, + R = function (t, e) { + b || + (A(function (s) { + E = s.value + }), + (b = !0)) + var i, + a = function (s) { + E > -1 && t(s) + }, + n = f('CLS', 0), + o = 0, + r = [], + u = function (s) { + if (!s.hadRecentInput) { + var B = r[0], + q = r[r.length - 1] + o && s.startTime - q.startTime < 1e3 && s.startTime - B.startTime < 5e3 + ? ((o += s.value), r.push(s)) + : ((o = s.value), (r = [s])), + o > n.value && ((n.value = o), (n.entries = r), i()) + } + }, + c = h('layout-shift', u) + c && + ((i = v(a, n, e)), + y(function () { + c.takeRecords().map(u), i(!0) + }), + g(function () { + ;(o = 0), (E = -1), (n = f('CLS', 0)), (i = v(a, n, e)) + })) + }, + d = { passive: !0, capture: !0 }, + H = new Date(), + P = function (t, e) { + m || ((m = e), (l = t), (C = new Date()), k(removeEventListener), D()) + }, + D = function () { + if (l >= 0 && l < C - H) { + var t = { + entryType: 'first-input', + name: m.type, + target: m.target, + cancelable: m.cancelable, + startTime: m.timeStamp, + processingStart: m.timeStamp + l, + } + T.forEach(function (e) { + e(t) + }), + (T = []) + } + }, + I = function (t) { + if (t.cancelable) { + var e = (t.timeStamp > 1e12 ? new Date() : performance.now()) - t.timeStamp + t.type == 'pointerdown' + ? (function (i, a) { + var n = function () { + P(i, a), r() + }, + o = function () { + r() + }, + r = function () { + removeEventListener('pointerup', n, d), removeEventListener('pointercancel', o, d) + } + addEventListener('pointerup', n, d), addEventListener('pointercancel', o, d) + })(e, t) + : P(e, t) + } + }, + k = function (t) { + ;['mousedown', 'keydown', 'touchstart', 'pointerdown'].forEach(function (e) { + return t(e, I, d) + }) + }, + M = function (t, e) { + var i, + a = S(), + n = f('FID'), + o = function (u) { + u.startTime < a.firstHiddenTime && ((n.value = u.processingStart - u.startTime), n.entries.push(u), i(!0)) + }, + r = h('first-input', o) + ;(i = v(t, n, e)), + r && + y(function () { + r.takeRecords().map(o), r.disconnect() + }, !0), + r && + g(function () { + var u + ;(n = f('FID')), + (i = v(t, n, e)), + (T = []), + (l = -1), + (m = null), + k(addEventListener), + (u = o), + T.push(u), + D() + }) + }, + L = {}, + N = function (t, e) { + var i, + a = S(), + n = f('LCP'), + o = function (c) { + var s = c.startTime + s < a.firstHiddenTime && ((n.value = s), n.entries.push(c), i()) + }, + r = h('largest-contentful-paint', o) + if (r) { + i = v(t, n, e) + var u = function () { + L[n.id] || (r.takeRecords().map(o), r.disconnect(), (L[n.id] = !0), i(!0)) + } + ;['keydown', 'click'].forEach(function (c) { + addEventListener(c, u, { once: !0, capture: !0 }) + }), + y(u, !0), + g(function (c) { + ;(n = f('LCP')), + (i = v(t, n, e)), + requestAnimationFrame(function () { + requestAnimationFrame(function () { + ;(n.value = performance.now() - c.timeStamp), (L[n.id] = !0), i(!0) + }) + }) + }) + } + }, + O = function (t) { + var e, + i = f('TTFB') + ;(e = function () { + try { + var a = + performance.getEntriesByType('navigation')[0] || + (function () { + var n = performance.timing, + o = { entryType: 'navigation', startTime: 0 } + for (var r in n) r !== 'navigationStart' && r !== 'toJSON' && (o[r] = Math.max(n[r] - n.navigationStart, 0)) + return o + })() + if (((i.value = i.delta = a.responseStart), i.value < 0 || i.value > performance.now())) return + ;(i.entries = [a]), t(i) + } catch {} + }), + document.readyState === 'complete' + ? setTimeout(e, 0) + : addEventListener('load', function () { + return setTimeout(e, 0) + }) + } +export { R as getCLS, A as getFCP, M as getFID, N as getLCP, O as getTTFB } diff --git a/build/index.html b/build/index.html index 1605ea3ee..496abb7b8 100644 --- a/build/index.html +++ b/build/index.html @@ -23,14 +23,13 @@ --> Second Brain - +
- - + Second Brain - diff --git a/public/svg-icons/CheckIcon.svg b/public/svg-icons/CheckIcon.svg new file mode 100644 index 000000000..3bbaa4ec6 --- /dev/null +++ b/public/svg-icons/CheckIcon.svg @@ -0,0 +1,3 @@ + + + diff --git a/public/svg-icons/ChevronDownIcon.svg b/public/svg-icons/ChevronDownIcon.svg new file mode 100644 index 000000000..0b184dbf9 --- /dev/null +++ b/public/svg-icons/ChevronDownIcon.svg @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/public/svg-icons/ChevronUpIcon.svg b/public/svg-icons/ChevronUpIcon.svg new file mode 100644 index 000000000..8e968e456 --- /dev/null +++ b/public/svg-icons/ChevronUpIcon.svg @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/src/components/App/SideBar/Dropdown/index.tsx b/src/components/App/SideBar/Dropdown/index.tsx new file mode 100644 index 000000000..eb86d94e6 --- /dev/null +++ b/src/components/App/SideBar/Dropdown/index.tsx @@ -0,0 +1,141 @@ +import FormControl from '@mui/material/FormControl' +import Popover from '@mui/material/Popover' +import clsx from 'clsx' +import { useState } from 'react' +import styled from 'styled-components' +import CheckIcon from '~/components/Icons/CheckIcon' +import ChevronDownIcon from '~/components/Icons/ChevronDownIcon' +import ChevronUpIcon from '~/components/Icons/ChevronUpIcon' +import { Flex } from '~/components/common/Flex' +import { useDataStore } from '~/stores/useDataStore' +import { colors } from '~/utils/colors' + +type Option = Record + +const options: Option = { + all: 'All', + show: 'Show', + episode: 'Episode', + twitter_space: 'Twitter Space', + tweet: 'Tweet', + youtube: 'Video (Youtube)', + person: 'People (Person)', + document: 'Document', + podcast: 'Podcast', +} + +export const SelectWithPopover = () => { + const [anchorEl, setAnchorEl] = useState(null) + const [sidebarFilter, setSidebarFilter] = useDataStore((s) => [s.sidebarFilter, s.setSidebarFilter]) + + const handleOpenPopover = (event: React.MouseEvent) => { + setAnchorEl(event.currentTarget as HTMLElement) + } + + const handleClosePopover = () => { + setAnchorEl(null) + } + + const handleSelectChange = (option: string) => { + setSidebarFilter(option) + handleClosePopover() + } + + return ( +
+ +
Show
+
{options[sidebarFilter]}
+
{!anchorEl ? : }
+
+ + + {Object.keys(options).map((option) => ( + handleSelectChange(option)} + > + {option === sidebarFilter ? : null} + {options[option]} + + ))} + + +
+ ) +} + +const Action = styled(Flex).attrs({ + direction: 'row', + align: 'center', +})` + cursor: pointer; + flex-grow: 1; + color: ${colors.GRAY6}; + font-family: Barlow; + font-size: 13px; + font-style: normal; + font-weight: 500; + padding: 0 8px; + .value, + .icon { + color: ${colors.white}; + } + + .value { + margin: 0 8px 0 4px; + } +` + +const MenuItem = styled(Flex).attrs({ + direction: 'row', + align: 'center', +})` + font-family: Barlow; + font-size: 13px; + font-style: normal; + font-weight: 500; + color: ${colors.GRAY3}; + height: 27px; + cursor: pointer; + &.active { + color: ${colors.white}; + } + &:hover { + color: ${colors.white}; + } + + .icon { + margin-right: 8px; + width: 9px; + font-size: 10px; + } +` + +const StyledPopover = styled(Popover)` + .MuiPaper-root { + background: ${colors.BUTTON1}; + min-width: 149px; + padding: 16px; + color: ${colors.GRAY3}; + box-shadow: 0px 1px 6px 0px rgba(0, 0, 0, 0.2); + border-radius: 6px; + } +` diff --git a/src/components/App/SideBar/Relevance/Episode/index.tsx b/src/components/App/SideBar/Relevance/Episode/index.tsx index 05b3908e9..5d7a9d19d 100644 --- a/src/components/App/SideBar/Relevance/Episode/index.tsx +++ b/src/components/App/SideBar/Relevance/Episode/index.tsx @@ -153,19 +153,21 @@ export const Date = styled(Text)` ` export const Title = styled(Date)` - display: flex; - flex-direction: row; align-items: center; flex-shrink: 1; - max-width: 100px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; + position: relative; + padding-left: 12px; &:before { content: ''; display: block; border-radius: 2px; - margin-right: 8px; + position: absolute; + top: 50%; + transform: translateY(-50%); + left: 2px; width: 4px; flex-shrink: 0; height: 4px; diff --git a/src/components/App/SideBar/Relevance/index.tsx b/src/components/App/SideBar/Relevance/index.tsx index 65198b875..53d3b4442 100644 --- a/src/components/App/SideBar/Relevance/index.tsx +++ b/src/components/App/SideBar/Relevance/index.tsx @@ -1,11 +1,10 @@ import { Button } from '@mui/material' import { useCallback, useMemo, useRef, useState } from 'react' import styled from 'styled-components' -import { useGraphData } from '~/components/DataRetriever' import { ScrollView } from '~/components/ScrollView' import { Flex } from '~/components/common/Flex' import { useAppStore } from '~/stores/useAppStore' -import { useDataStore } from '~/stores/useDataStore' +import { useDataStore, useFilteredNodes } from '~/stores/useDataStore' import { NodeExtended } from '~/types' import { formatDescription } from '~/utils/formatDescription' import { saveConsumedContent } from '~/utils/relayHelper' @@ -17,30 +16,29 @@ type Props = { } export const Relevance = ({ isSearchResult }: Props) => { - const data = useGraphData() - const scrollViewRef = useRef(null) const pageSize = !isSearchResult ? 10 : 80 - const setSelectedNode = useDataStore((s) => s.setSelectedNode) - const setSelectedTimestamp = useDataStore((s) => s.setSelectedTimestamp) + const [setSelectedNode, setSelectedTimestamp] = useDataStore((s) => [s.setSelectedNode, s.setSelectedTimestamp]) const [setSidebarOpen] = useAppStore((s) => [s.setSidebarOpen]) const setRelevanceSelected = useAppStore((s) => s.setRelevanceSelected) const [currentPage, setCurrentPage] = useState(0) + const filteredNodes = useFilteredNodes() + const startSlice = currentPage * pageSize const endSlice = startSlice + pageSize - const hasNext = data.nodes.length - 1 > endSlice + const hasNext = filteredNodes.length - 1 > endSlice const isMobile = useIsMatchBreakpoint('sm', 'down') const currentNodes = useMemo( - () => [...data.nodes].sort((a, b) => (b.date || 0) - (a.date || 0)).slice(0, endSlice), - [data.nodes, endSlice], + () => [...filteredNodes].sort((a, b) => (b.date || 0) - (a.date || 0)).slice(0, endSlice), + [filteredNodes, endSlice], ) const handleNodeClick = useCallback( @@ -82,7 +80,7 @@ export const Relevance = ({ isSearchResult }: Props) => { date={date || 0} episodeTitle={formatDescription(episodeTitle)} id={id} - imageUrl={imageUrl || 'audio_default.svg'} + imageUrl={imageUrl || ''} name={name || ''} onClick={() => handleNodeClick(n)} profilePicture={profilePicture} diff --git a/src/components/App/SideBar/SelectedNodeView/index.tsx b/src/components/App/SideBar/SelectedNodeView/index.tsx index a83ab4297..92ee75604 100644 --- a/src/components/App/SideBar/SelectedNodeView/index.tsx +++ b/src/components/App/SideBar/SelectedNodeView/index.tsx @@ -1,6 +1,7 @@ import { memo } from 'react' -import { useSelectedNode, useDataStore } from '~/stores/useDataStore' +import { useDataStore, useSelectedNode } from '~/stores/useDataStore' import { TextType } from '../../Helper/AskQuestion/Text' +import { TeachMeText } from '../../Helper/TeachMe' import { AudioClip } from '../AudioClip' import { Creator } from '../Creator' import { Data } from '../Data' @@ -11,7 +12,6 @@ import { Topic } from '../Topic' import { TwitData } from '../TwitData' import { Twitter } from '../Twitter' import { YouTube } from '../YouTube' -import { TeachMeText } from '../../Helper/TeachMe' // eslint-disable-next-line no-underscore-dangle const _View = () => { @@ -37,6 +37,8 @@ const _View = () => { return case 'show': return + case 'youtube': + return case 'clip': if (selectedNode?.type === 'youtube') { return diff --git a/src/components/App/SideBar/Trending/index.tsx b/src/components/App/SideBar/Trending/index.tsx index c7064d6f3..5969e75c7 100644 --- a/src/components/App/SideBar/Trending/index.tsx +++ b/src/components/App/SideBar/Trending/index.tsx @@ -6,6 +6,7 @@ import styled from 'styled-components' import SentimentDataIcon from '~/components/Icons/SentimentDataIcon' import { Flex } from '~/components/common/Flex' import { getTrends } from '~/network/fetchGraphData' +import { useDataStore } from '~/stores/useDataStore' import { Trending as TrendingType } from '~/types' import { colors } from '~/utils/colors' @@ -16,9 +17,10 @@ type Props = { } export const Trending = ({ onSubmit }: Props) => { - const [trendingTopics, setTrendingTopics] = useState>([]) const [loading, setLoading] = useState(false) + const [trendingTopics, setTrendingTopics] = useDataStore((s) => [s.trendingTopics, s.setTrendingTopics]) + const { setValue } = useFormContext() useEffect(() => { @@ -38,8 +40,10 @@ export const Trending = ({ onSubmit }: Props) => { } } - init() - }, []) + if (!trendingTopics.length) { + init() + } + }, [trendingTopics, setTrendingTopics]) const selectTrending = (val: string) => { setValue('search', val) diff --git a/src/components/App/SideBar/index.tsx b/src/components/App/SideBar/index.tsx index 2f0835cb5..376b6a39d 100644 --- a/src/components/App/SideBar/index.tsx +++ b/src/components/App/SideBar/index.tsx @@ -4,7 +4,7 @@ import { forwardRef, useEffect, useRef, useState } from 'react' import { useFormContext } from 'react-hook-form' import { ClipLoader } from 'react-spinners' import styled from 'styled-components' -import { useGraphData } from '~/components/DataRetriever' +import { SelectWithPopover } from '~/components/App/SideBar/Dropdown' import ChevronLeftIcon from '~/components/Icons/ChevronLeftIcon' import ClearIcon from '~/components/Icons/ClearIcon' import SearchIcon from '~/components/Icons/SearchIcon' @@ -12,9 +12,8 @@ import { SearchBar } from '~/components/SearchBar' import { Flex } from '~/components/common/Flex' import { FetchLoaderText } from '~/components/common/Loader' import { useAppStore } from '~/stores/useAppStore' -import { useDataStore, useSelectedNode } from '~/stores/useDataStore' +import { useDataStore, useFilteredNodes, useSelectedNode } from '~/stores/useDataStore' import { colors } from '~/utils/colors' -import { TeachMe } from '../Helper/TeachMe' import { LatestView } from './Latest' import { EpisodeSkeleton } from './Relevance/EpisodeSkeleton' import { SideBarSubView } from './SidebarSubView' @@ -34,8 +33,13 @@ type ContentProp = { // eslint-disable-next-line react/display-name const Content = forwardRef(({ onSubmit, subViewOpen }, ref) => { - const [isLoading, setTeachMe] = useDataStore((s) => [s.isFetching, s.setTeachMe]) - const data = useGraphData() + const [isLoading, setTeachMe, setSidebarFilter] = useDataStore((s) => [ + s.isFetching, + s.setTeachMe, + s.setSidebarFilter, + ]) + + const filteredNodes = useFilteredNodes() const [setSidebarOpen, searchTerm, clearSearch] = useAppStore((s) => [ s.setSidebarOpen, @@ -73,6 +77,7 @@ const Content = forwardRef(({ onSubmit, subViewOpen if (searchTerm) { setValue('search', '') clearSearch() + setSidebarFilter('all') return } @@ -94,11 +99,11 @@ const Content = forwardRef(({ onSubmit, subViewOpen ) : ( <>
- {data.nodes.length} + {filteredNodes.length} results
- +
)} diff --git a/src/components/Icons/CheckIcon.tsx b/src/components/Icons/CheckIcon.tsx new file mode 100644 index 000000000..cc6a3f3be --- /dev/null +++ b/src/components/Icons/CheckIcon.tsx @@ -0,0 +1,13 @@ +/* eslint-disable */ +import React from 'react' + +const CheckIcon: React.FC> = (props) => ( + + + +) + +export default CheckIcon diff --git a/src/components/Icons/ChevronDownIcon.tsx b/src/components/Icons/ChevronDownIcon.tsx new file mode 100644 index 000000000..c19ef585e --- /dev/null +++ b/src/components/Icons/ChevronDownIcon.tsx @@ -0,0 +1,18 @@ +/* eslint-disable */ +import React from 'react' + +const ChevronDownIcon: React.FC> = (props) => ( + + + + + + + + +) + +export default ChevronDownIcon diff --git a/src/components/Icons/ChevronUpIcon.tsx b/src/components/Icons/ChevronUpIcon.tsx new file mode 100644 index 000000000..6f90f17fd --- /dev/null +++ b/src/components/Icons/ChevronUpIcon.tsx @@ -0,0 +1,18 @@ +/* eslint-disable */ +import React from 'react' + +const ChevronUpIcon: React.FC> = (props) => ( + + + + + + + + +) + +export default ChevronUpIcon diff --git a/src/stores/useDataStore/index.ts b/src/stores/useDataStore/index.ts index 3846c5b6f..94058c3ae 100644 --- a/src/stores/useDataStore/index.ts +++ b/src/stores/useDataStore/index.ts @@ -32,7 +32,11 @@ type DataStore = { showSelectionGraph: boolean showTeachMe: boolean hideNodeDetails: boolean + sidebarFilter: string + trendingTopics: string[] + setTrendingTopics: (trendingTopics: string[]) => void + setSidebarFilter: (filter: string) => void setScrollEventsDisabled: (scrollEventsDisabled: boolean) => void setCategoryFilter: (categoryFilter: NodeType | null) => void setDisableCameraRotation: (rotation: boolean) => void @@ -58,6 +62,8 @@ type DataStore = { const defaultData: Omit< DataStore, + | 'setTrendingTopics' + | 'setSidebarFilter' | 'fetchData' | 'setIsFetching' | 'setData' @@ -103,6 +109,8 @@ const defaultData: Omit< showSelectionGraph: false, showTeachMe: false, hideNodeDetails: false, + sidebarFilter: 'all', + trendingTopics: [], } export const useDataStore = create((set, get) => ({ @@ -131,6 +139,7 @@ export const useDataStore = create((set, get) => ({ showTeachMe: false, }) }, + setTrendingTopics: (trendingTopics) => set({ trendingTopics }), setIsFetching: (isFetching) => set({ isFetching }), setData: (data) => set({ data }), setSelectionData: (selectionGraphData) => set({ selectionGraphData }), @@ -160,6 +169,7 @@ export const useDataStore = create((set, get) => ({ }) } }, + setSidebarFilter: (sidebarFilter: string) => set({ sidebarFilter }), setSelectedTimestamp: (selectedTimestamp) => set({ selectedTimestamp }), setSources: (sources) => set({ sources }), setSphinxModalOpen: (sphinxModalIsOpen) => set({ sphinxModalIsOpen }), @@ -178,4 +188,9 @@ export const useDataStore = create((set, get) => ({ export const useSelectedNode = () => useDataStore((s) => s.selectedNode) +export const useFilteredNodes = () => + useDataStore((s) => + (s.data?.nodes || []).filter((i) => (s.sidebarFilter === 'all' ? true : i.node_type === s.sidebarFilter)), + ) + export const setIsTimestampLoaded = (isTimestampLoaded: boolean) => useDataStore.setState({ isTimestampLoaded })